[
  {
    "path": ".clang-tidy",
    "content": "# Generated from CLion Inspection settings\n---\nChecks: '-*,\nbugprone-argument-comment,\nbugprone-assert-side-effect,\nbugprone-bad-signal-to-kill-thread,\nbugprone-branch-clone,\nbugprone-copy-constructor-init,\nbugprone-dangling-handle,\nbugprone-dynamic-static-initializers,\nbugprone-fold-init-type,\nbugprone-forward-declaration-namespace,\nbugprone-forwarding-reference-overload,\nbugprone-inaccurate-erase,\nbugprone-incorrect-roundings,\nbugprone-integer-division,\nbugprone-lambda-function-name,\nbugprone-macro-parentheses,\nbugprone-macro-repeated-side-effects,\nbugprone-misplaced-operator-in-strlen-in-alloc,\nbugprone-misplaced-pointer-arithmetic-in-alloc,\nbugprone-misplaced-widening-cast,\nbugprone-move-forwarding-reference,\nbugprone-multiple-statement-macro,\nbugprone-no-escape,\nbugprone-not-null-terminated-result,\nbugprone-parent-virtual-call,\nbugprone-posix-return,\nbugprone-reserved-identifier,\nbugprone-sizeof-container,\nbugprone-sizeof-expression,\nbugprone-spuriously-wake-up-functions,\nbugprone-string-constructor,\nbugprone-string-integer-assignment,\nbugprone-string-literal-with-embedded-nul,\nbugprone-suspicious-enum-usage,\nbugprone-suspicious-include,\nbugprone-suspicious-memset-usage,\nbugprone-suspicious-missing-comma,\nbugprone-suspicious-semicolon,\nbugprone-suspicious-string-compare,\nbugprone-suspicious-memory-comparison,\nbugprone-suspicious-realloc-usage,\nbugprone-swapped-arguments,\nbugprone-terminating-continue,\nbugprone-throw-keyword-missing,\nbugprone-too-small-loop-variable,\nbugprone-undefined-memory-manipulation,\nbugprone-undelegated-constructor,\nbugprone-unhandled-self-assignment,\nbugprone-unused-raii,\nbugprone-unused-return-value,\nbugprone-use-after-move,\nbugprone-virtual-near-miss,\ncert-dcl21-cpp,\ncert-dcl58-cpp,\ncert-err34-c,\ncert-err52-cpp,\ncert-err60-cpp,\ncert-flp30-c,\ncert-msc50-cpp,\ncert-msc51-cpp,\ncert-str34-c,\ncppcoreguidelines-interfaces-global-init,\ncppcoreguidelines-narrowing-conversions,\ncppcoreguidelines-pro-type-member-init,\ncppcoreguidelines-pro-type-static-cast-downcast,\ncppcoreguidelines-slicing,\ngoogle-default-arguments,\ngoogle-explicit-constructor,\ngoogle-runtime-operator,\nhicpp-exception-baseclass,\nhicpp-multiway-paths-covered,\nmisc-misplaced-const,\nmisc-new-delete-overloads,\nmisc-no-recursion,\nmisc-non-copyable-objects,\nmisc-throw-by-value-catch-by-reference,\nmisc-unconventional-assign-operator,\nmisc-uniqueptr-reset-release,\nmodernize-avoid-bind,\nmodernize-concat-nested-namespaces,\nmodernize-deprecated-headers,\nmodernize-deprecated-ios-base-aliases,\nmodernize-loop-convert,\nmodernize-make-shared,\nmodernize-make-unique,\nmodernize-pass-by-value,\nmodernize-raw-string-literal,\nmodernize-redundant-void-arg,\nmodernize-replace-auto-ptr,\nmodernize-replace-disallow-copy-and-assign-macro,\nmodernize-replace-random-shuffle,\nmodernize-return-braced-init-list,\nmodernize-shrink-to-fit,\nmodernize-unary-static-assert,\nmodernize-use-auto,\nmodernize-use-bool-literals,\nmodernize-use-emplace,\nmodernize-use-equals-default,\nmodernize-use-equals-delete,\nmodernize-use-nodiscard,\nmodernize-use-noexcept,\nmodernize-use-nullptr,\nmodernize-use-override,\nmodernize-use-transparent-functors,\nmodernize-use-uncaught-exceptions,\nmpi-buffer-deref,\nmpi-type-mismatch,\nopenmp-use-default-none,\nperformance-faster-string-find,\nperformance-for-range-copy,\nperformance-implicit-conversion-in-loop,\nperformance-inefficient-algorithm,\nperformance-inefficient-string-concatenation,\nperformance-inefficient-vector-operation,\nperformance-move-const-arg,\nperformance-move-constructor-init,\nperformance-no-automatic-move,\nperformance-noexcept-move-constructor,\nperformance-trivially-destructible,\nperformance-type-promotion-in-math-fn,\nperformance-unnecessary-copy-initialization,\nperformance-unnecessary-value-param,\nportability-simd-intrinsics,\nreadability-avoid-const-params-in-decls,\nreadability-const-return-type,\nreadability-container-size-empty,\nreadability-convert-member-functions-to-static,\nreadability-delete-null-pointer,\nreadability-deleted-default,\nreadability-inconsistent-declaration-parameter-name,\nreadability-make-member-function-const,\nreadability-misleading-indentation,\nreadability-misplaced-array-index,\nreadability-non-const-parameter,\nreadability-redundant-control-flow,\nreadability-redundant-declaration,\nreadability-redundant-function-ptr-dereference,\nreadability-redundant-smartptr-get,\nreadability-redundant-string-cstr,\nreadability-redundant-string-init,\nreadability-simplify-subscript-expr,\nreadability-static-accessed-through-instance,\nreadability-static-definition-in-anonymous-namespace,\nreadability-string-compare,\nreadability-uniqueptr-delete-release,\nreadability-use-anyofallof'"
  },
  {
    "path": ".github/workflows/cmake.yml",
    "content": "name: Linux/MacOS Build\n\non:\n  push:\n  pull_request:\n    branches: [master]\n\n#env:\n\njobs:\n  build:\n    strategy:\n      fail-fast: false\n      matrix:\n        build_type : [ Release, Debug ]\n        os : [ macos-latest, ubuntu-24.04 ]\n        task_backend : [Threads, OneTBB, PaRSEC]  # OneTBB and LegacyTBB control which version of TBB to install\n        include:\n          - os: ubuntu-24.04\n            # gcc 14 causes build issues in code that uses RapidJSON: https://github.com/Tencent/rapidjson/issues/2277\n            cxx: /usr/bin/g++-13\n          - os: macos-latest\n            cxx: clang++\n          # Add GENTENSOR test configuration\n          - os: ubuntu-24.04\n            build_type: Debug\n            task_backend: Threads\n            cxx: /usr/bin/g++-13\n            gentensor: ON\n\n    name: \"${{ matrix.os }}: ${{ matrix.cxx }} ${{ matrix.build_type }} ${{ matrix.task_backend }}${{ matrix.gentensor && ' +GENTENSOR' || '' }}\"\n    runs-on: ${{ matrix.os }}\n    env:\n      CXX : ${{ matrix.cxx }}\n      CCACHE_DIR : ${{github.workspace}}/build/.ccache\n      CCACHE_COMPRESS : true\n      CCACHE_COMPRESSLEVEL : 6\n      MAD_SMALL_TESTS : 1\n      MAD_NUM_THREADS : 3\n      CTEST_OUTPUT_ON_FAILURE : 1\n      BUILD_CONFIG : >\n        -G Ninja\n        -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}\n        -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install\n        -DCMAKE_PREFIX_PATH=\"/usr/local/opt/bison;/usr/local/opt/libxc\"\n        -DBUILD_SHARED_LIBS=OFF\n        -DMPIEXEC_PREFLAGS='--bind-to;none;--allow-run-as-root'\n        -DBUILD_TESTING=ON\n        -DMADNESS_ENABLE_CEREAL=ON\n        -DMPI_CXX_SKIP_MPICXX=ON\n        -DCMAKE_CXX_STANDARD=${{ matrix.task_backend == 'Threads' && matrix.build_type == 'Debug' && '20' || '17' }}\n        -DMADNESS_BUILD_MADWORLD_ONLY=${{ matrix.task_backend != 'Threads' }}\n        -DMADNESS_BUILD_LIBRARIES_ONLY=${{ matrix.build_type == 'Debug' }}\n        -DENABLE_GENTENSOR=${{ matrix.gentensor || 'OFF' }}\n\n    steps:\n    - uses: actions/checkout@v4\n\n    - name: Create Build Environment\n      # Some projects don't allow in-source building, so create a separate build directory\n      # We'll use this as our working directory for all subsequent commands\n      run: cmake -E make_directory ${{github.workspace}}/build\n\n    - name: Process task_backend\n      run: |\n        if [ \"X${{ matrix.task_backend }}\" = \"XLegacyTBB\" ]; then\n          echo \"TASK_BACKEND=TBB\" >> $GITHUB_ENV\n        fi\n        if [ \"X${{ matrix.task_backend }}\" = \"XOneTBB\" ]; then\n          echo \"TASK_BACKEND=TBB\" >> $GITHUB_ENV\n        fi\n        if [ \"X${{ matrix.task_backend }}\" = \"XThreads\" ]; then\n          echo \"TASK_BACKEND=Pthreads\" >> $GITHUB_ENV\n        fi\n        if [ \"X${{ matrix.task_backend }}\" = \"XPaRSEC\" ]; then\n          echo \"TASK_BACKEND=PaRSEC\" >> $GITHUB_ENV\n          # do not bind threads to cores to avoid oversubscription\n          echo \"PARSEC_MCA_bind_threads=0\" >> $GITHUB_ENV\n        fi\n\n    - name: Install prerequisite MacOS packages\n      if: ${{ matrix.os == 'macos-latest' }}\n      run: |\n        brew install ninja boost eigen open-mpi bison ccache libxc\n        if [ \"X${{ matrix.task_backend }}\" = \"XLegacyTBB\" ]; then\n          brew install tbb@2020\n          echo \"TBBROOT=/usr/local/opt/tbb@2020\" >> $GITHUB_ENV\n        fi\n        if [ \"X${{ matrix.task_backend }}\" = \"XOneTBB\" ]; then\n          brew install tbb\n          echo \"TBBROOT=/usr/local/opt/tbb\" >> $GITHUB_ENV\n        fi\n\n    - name: Install prerequisites Ubuntu packages\n      if: ${{ matrix.os == 'ubuntu-24.04' }}\n      run: |\n        sudo apt-get update\n        sudo apt-get install ninja-build g++-13 liblapack-dev libboost-dev libboost-serialization-dev libeigen3-dev openmpi-bin libopenmpi-dev ccache\n        if [ \"X${{ matrix.task_backend }}\" = \"XOneTBB\" ]; then\n          wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB -O - | sudo apt-key add -\n          sudo add-apt-repository \"deb https://apt.repos.intel.com/oneapi all main\"\n          sudo apt-get install intel-oneapi-tbb-devel\n          echo \"TBBROOT=/opt/intel/oneapi/tbb/latest\" >> $GITHUB_ENV\n        fi\n        if [ \"X${{ matrix.task_backend }}\" = \"XLegacyTBB\" ]; then\n          sudo apt-get install libtbb-dev\n        fi\n        if [ \"X${{ matrix.build_type }}\" = \"XDebug\" ]; then\n          sudo apt-get install libcereal-dev\n        fi\n\n    - name: Prepare ccache timestamp\n      id: ccache_cache_timestamp\n      shell: cmake -P {0}\n      run: |\n        string(TIMESTAMP current_date \"%Y-%m-%d-%H;%M;%S\" UTC)\n        message(\"::set-output name=timestamp::${current_date}\")\n\n    - name: Setup ccache cache files\n      uses: actions/cache@v4\n      with:\n        path: ${{github.workspace}}/build/.ccache\n        key: ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}\n        restore-keys: |\n          ${{ matrix.config.name }}-ccache-\n\n    - name: Configure CMake\n      # Use a bash shell so we can use the same syntax for environment variable\n      # access regardless of the host operating system\n      shell: bash\n      working-directory: ${{github.workspace}}/build\n      # Note the current convention is to use the -S and -B options here to specify source \n      # and build directories, but this is only available with CMake 3.13 and higher.  \n      # The CMake binaries on the Github Actions machines are (as of this writing) 3.12\n      run: cmake $GITHUB_WORKSPACE $BUILD_CONFIG -DMADNESS_TASK_BACKEND=$TASK_BACKEND\n\n    - name: Build\n      working-directory: ${{github.workspace}}/build\n      shell: bash\n      # Execute the build.  You can specify a specific target with \"--target <NAME>\"\n      run: ccache -p && ccache -z && cmake --build . && ccache -s\n\n    - name: Test\n      working-directory: ${{github.workspace}}/build\n      shell: bash\n      run: cmake --build . --target check-short-madness\n\n    - name: Build and Test Python bindings\n      if: matrix.task_backend == 'Threads' && matrix.build_type == 'Release'\n      working-directory: ${{github.workspace}}/build\n      shell: bash\n      run: |\n        pip install numpy pytest matplotlib plotly\n        cmake $GITHUB_WORKSPACE $BUILD_CONFIG -DMADNESS_TASK_BACKEND=$TASK_BACKEND -DENABLE_PYTHON=ON\n        cmake --build . --target _pymadness\n        cd src/pymadness\n        PYTHONPATH=. python -m pytest -xvs $GITHUB_WORKSPACE/src/pymadness/tests/\n\n    - name: Install\n      if: matrix.build_type != 'Debug'\n      working-directory: ${{github.workspace}}/build\n      shell: bash\n      run: cmake --build . --target install\n\n    - name: Test Install Tree\n      if: matrix.build_type != 'Debug'\n      working-directory: ${{github.workspace}}/build\n      shell: bash\n      run: |\n        cmake -S $GITHUB_WORKSPACE/doc/tutorial -B test_install -DCMAKE_PREFIX_PATH=${{github.workspace}}/install\n        cmake --build test_install\n        test_install/test_runtime\n        # if built more than just MADWorld run the HF test\n        if [ \"X${{ matrix.task_backend }}\" = \"XThreads\" ]; then\n           test_install/simple_hf\n        fi\n"
  },
  {
    "path": ".github/workflows/conda-deploy.yml",
    "content": "name: Conda Deploy\n\non:\n  # Run after CI passes on master\n  workflow_run:\n    workflows: [\"Linux/MacOS Build\"]\n    types: [completed]\n    branches: [master]\n  # Also run on version tags\n  push:\n    tags:\n      - 'v*'\n  # Allow manual triggering\n  workflow_dispatch:\n\njobs:\n  conda-build-upload:\n    # Only run if CI succeeded (for workflow_run trigger) or if it's a tag/manual push\n    if: >\n      github.event_name == 'push' ||\n      github.event_name == 'workflow_dispatch' ||\n      (github.event.workflow_run.conclusion == 'success')\n    strategy:\n      fail-fast: false\n      matrix:\n        os: [ubuntu-24.04, macos-latest]\n        mpi: [nompi, openmpi]\n\n    name: \"conda ${{ matrix.os }} ${{ matrix.mpi }}\"\n    runs-on: ${{ matrix.os }}\n    permissions:\n      contents: read\n\n    defaults:\n      run:\n        shell: bash -el {0}\n\n    steps:\n    - uses: actions/checkout@v4\n      with:\n        fetch-depth: 0  # full history needed for git describe\n        repository: ${{ github.repository }}\n        ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.ref }}\n\n    - name: Determine version\n      id: version\n      env:\n        SOURCE_SHA: ${{ github.event.workflow_run.head_sha || github.sha }}\n      run: |\n        if [[ \"${GITHUB_REF}\" == refs/tags/v* ]]; then\n          VERSION=\"${GITHUB_REF#refs/tags/v}\"\n        else\n          # Use the most recent version tag, falling back to CMakeLists.txt\n          TAG_VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//')\n          if [ -z \"${TAG_VERSION}\" ]; then\n            MAJOR=$(grep -m1 'set(MADNESS_MAJOR_VERSION' CMakeLists.txt | grep -oE '[0-9]+')\n            MINOR=$(grep -m1 'set(MADNESS_MINOR_VERSION' CMakeLists.txt | grep -oE '[0-9]+')\n            MICRO=$(grep -m1 'set(MADNESS_MICRO_VERSION' CMakeLists.txt | grep -oE '[0-9]+')\n            TAG_VERSION=\"${MAJOR}.${MINOR}.${MICRO}\"\n          fi\n          SHORT_SHA=\"${SOURCE_SHA::8}\"\n          VERSION=\"${TAG_VERSION}.dev$(date +%Y%m%d)+${SHORT_SHA}\"\n        fi\n        echo \"version=$VERSION\" >> \"$GITHUB_OUTPUT\"\n        echo \"GIT_DESCRIBE_TAG=$VERSION\" >> \"$GITHUB_ENV\"\n        echo \"Version: $VERSION\"\n\n    - name: Set up Miniconda\n      uses: conda-incubator/setup-miniconda@v3\n      with:\n        auto-update-conda: true\n        python-version: \"3.12\"\n        channels: conda-forge,defaults\n        channel-priority: strict\n\n    - name: Install conda-build and anaconda-client\n      run: |\n        conda install -y conda-build anaconda-client\n\n    - name: Build conda package\n      env:\n        MPI_VARIANT: ${{ matrix.mpi }}\n      run: |\n        conda build conda-recipe/ \\\n          --no-anaconda-upload \\\n          --output-folder \"${{ github.workspace }}/conda-dist/\"\n\n    - name: Upload conda package as workflow artifact\n      uses: actions/upload-artifact@v4\n      with:\n        name: conda-${{ matrix.os }}-${{ matrix.mpi }}-${{ steps.version.outputs.version }}\n        path: ${{ github.workspace }}/conda-dist/**/*.conda\n        if-no-files-found: warn\n\n    - name: Upload to Anaconda.org\n      env:\n        ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}\n      run: |\n        find \"${{ github.workspace }}/conda-dist\" \\( -name '*.tar.bz2' -o -name '*.conda' \\) -print0 | \\\n          while IFS= read -r -d '' pkg; do\n            anaconda -t \"${ANACONDA_TOKEN}\" upload --user m-a-d-n-e-s-s --force \"$pkg\"\n          done\n"
  },
  {
    "path": ".github/workflows/make_doxygen.yml",
    "content": "name: publish-doxygen\n\n# Trigger this when a pull request is merged (which implies pushing to master).\non:\n  push:\n    branches:\n      - master\n\njobs:\n  doxygen:\n    runs-on: ubuntu-latest\n\n    steps:\n\n      - name: Git Checkout\n        uses: actions/checkout@v4\n\n      - name: Install prerequisites Ubuntu packages\n        run: |\n          sudo apt-get update\n          sudo apt-get install -y ninja-build g++-13 liblapack-dev openmpi-bin libopenmpi-dev libtbb-dev doxygen graphviz\n\n      - name: Configure CMake\n        shell: bash\n        working-directory: ${{github.workspace}}\n        run: |\n          cmake -E make_directory ${{github.workspace}}/build\n          cd build && cmake $GITHUB_WORKSPACE -G Ninja -DCMAKE_BUILD_TYPE=Release\n\n      - name: Build doxygen docs\n        shell: bash\n        working-directory: ${{github.workspace}}/build\n        run: cmake --build . --target html-madness\n\n      - name: Deploy to GitHub Pages\n        shell: bash\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          git config --global user.email \"action@github.com\"\n          git config --global user.name \"GitHub Actions\"\n          cmake -E make_directory ${{github.workspace}}/gh-pages-deploy\n          cp -rp ${{github.workspace}}/build/doc/html ${{github.workspace}}/gh-pages-deploy/api-doc\n          cd ${{github.workspace}}/gh-pages-deploy\n          # create a brand-new repo so that gh-pages contains no history\n          git init\n          git add .\n          git commit -q -m \"Generated API doc via GitHub Actions (run $GITHUB_RUN_NUMBER)\"\n          git checkout -b gh-pages\n          git remote add origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git\n          git push origin +gh-pages\n\n      - name: Result URLs\n        run: |\n          REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)\n          REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)\n          echo \"Formatted API docs:  https://$REPO_OWNER.github.io/$REPO_NAME/api-doc\"\n          echo \"\"\n          echo \"GitHub pages branch: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/gh-pages\"\n"
  },
  {
    "path": ".gitignore",
    "content": "build*\ncmake-build-debug*\n.history*\n\n# Compiled Object files\n*.slo\n*.lo\n*.o\n*.obj\n\n# Compiled Dynamic libraries\n*.so\n*.dylib\n*.dll\n\n# Compiled Static libraries\n*.lai\n*.la\n*.a\n*.lib\n\n# Executables\n*.exe\n*.out\n*.app\n\n.cproject\n.project\n.settings\n.idea\nMakefile.in\nsrc/madness/config.h.in\naclocal.m4\nautom4te.cache\nconfigure\ntest-driver\nlog.00*\norg.eclipse.cdt.core.prefs\norg.eclipse.cdt.ui.prefs\n.autotools\n.externalToolBuilders/org.eclipse.cdt.autotools.core.genmakebuilderV2.launch\ncompile\nconfig.guess\nconfig.sub\ndepcomp\ninstall-sh\nmissing\n/Default/\nlt~obsolete.m4\nltversion.m4\nltsugar.m4\nltoptions.m4\nltmain.sh\nlibtool.m4\nconfig.h.in~\ncmake/cmake-*\ncmake/bin\ncmake/doc\ncmake/share\nMakefile-prog.in\ncompile_commands.json\n*.idx\n.clang-format\n/cmake-build-debug/.ninja_deps\ncompile_commands\n.history/src/apps/molresponse/global_functions_20230530165227.cc\n.history/src/apps/molresponse/global_functions_20230530165428.cc\ndiff.txt\nnewdiff.txt\n.vscode/settings.json\n"
  },
  {
    "path": ".readthedocs.yaml",
    "content": "# .readthedocs.yaml\n# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details\n\n# Required\nversion: 2\n\n# Set the version of Python and other tools you might need\nbuild:\n  os: ubuntu-20.04\n  tools:\n    python: \"3.9\"\n    # You can also specify other tool versions:\n    # nodejs: \"16\"\n    # rust: \"1.55\"\n    # golang: \"1.17\"\n\n# Build documentation in the docs/ directory with Sphinx\nsphinx:\n   configuration: doc/conf.py\n\n# If using Sphinx, optionally build your docs in additional formats such as PDF\n# formats:\n#    - pdf\n\n# Optionally declare the Python requirements required to build your docs\npython:\n  install:\n  - requirements: doc/requirements.txt\n\n"
  },
  {
    "path": "AGENTS.md",
    "content": "# Agent Instructions for MADNESS\n\nCanonical guidance for coding agents working on this repo. For installing\ndependencies and walking through a first build, see `INSTALL.md`. This file\ncovers what an agent needs beyond that: the source layout, how tests are\norganized, and the project-specific gotchas that are easy to get wrong.\n\n`CLAUDE.md` is a symlink to this file; there is no vendor-specific variant.\n\n**How to use this file.** Treat it as a starting map, not authority. The code is the source of truth — when this file disagrees with what `grep`/`Read` show you, trust the code and flag the discrepancy so this file can be updated.\n\n_Last reviewed against master:_ 2026-04-23.\n\n## Platforms\n\nMADNESS targets POSIX only — Linux and macOS on x86-64, ARM64, and IBM\nPower. Windows is not supported. Do not add `#ifdef _WIN32` branches, path\nhandling that assumes backslashes, or dependencies that are Windows-only.\nPOSIX facilities (`pthread`, `mmap`, `fork`, `dlopen`, `sys/stat.h`, …) may\nbe used directly without feature detection beyond the existing\n`HAVE_*` macros.\n\n## Source tree\n\n- `src/madness/world` — parallel runtime, a.k.a. **MADWorld** (tasks, futures, MPI wrappers).\n- `src/madness/tensor` — dense tensors and BLAS/LAPACK wrappers.\n- `src/madness/mra` — multiresolution analysis (`Function<T,NDIM>`, operators).\n- `src/madness/chem` — electronic-structure building blocks (SCF, XC, …).\n- `src/madness/misc`, `src/madness/external` — utilities, bundled deps.\n- `src/apps/*` — end-user applications (`moldft`, `nemo`, `cc2`, `mp2`, …).\n- `src/examples`, `src/pymadness` — samples and Python bindings.\n\n## Build directories\n\nPrefer reusing an existing out-of-tree build directory over creating a new\none from scratch, so you don't re-pay CMake configure time. Common local\nconventions are `cmake-build-{debug,release,relwithdebinfo}` and `build*`.\nIf several exist side-by-side, check their\ncached CMake options (`grep … CMakeCache.txt`) — configure state often\ndiverges between them.\n\nFor focused iteration, these scope flags drop rebuild time substantially:\n\n- `-DMADNESS_BUILD_MADWORLD_ONLY=ON` — build only the runtime, skipping\n  `tensor`/`mra`/`chem`/`apps`. Right for work confined to `src/madness/world`.\n- `-DMADNESS_BUILD_LIBRARIES_ONLY=ON` — build the libraries, skip `src/apps`.\n  Right for changes to numerical layers when you don't need `moldft`/`nemo`/\n  `cc2`.\n\n## Tests\n\nTests live next to the sources they exercise and are registered through\n`add_unittests(component sources libs labels)` (see\n`cmake/modules/AddUnittests.cmake`). The macro emits:\n\n- one CTest entry per source file at `madness/test/<component>/<name>/run`,\n  with `<name>` derived from the source filename, and\n- a per-component `madness/test/<component>/build` entry that builds the\n  unit-test targets on demand.\n\nBoth entries carry the `labels` passed to the macro. There is no filename\nconvention — most test sources follow `test*.cc` / `test_*.cc` by habit,\nbut the macro accepts any source name (e.g. `src/madness/misc/interp3.cc`,\n`src/examples/periodic/erfcr.cc`).\n\nThe `check-short-madness` target runs everything labeled `short` or `medium`\nvia `ctest -L \"short|medium\"`. To run a subset without the full suite:\n\n```\nctest -L short -R \"madness/test/mra\"         # all mra tests in the short set\nctest -R \"madness/test/mra/test_cloud/run\"   # a single test by name\n```\n\nEach test is also a normal binary under\n`<build-dir>/<path-of-source-dir>/<name>` (mirroring the source tree, so\n`src/madness/mra` tests land at `<build-dir>/src/madness/mra/<name>`, and\n`src/examples/periodic` tests at `<build-dir>/src/examples/periodic/<name>`)\nand can be invoked directly for debugging.\n\n### Smoke test\n\n`testsuite` in `src/madness/mra` is the broad numerical-library regression\nharness. From a configured build directory:\n\n```\nninja testsuite\n./src/madness/mra/testsuite\n```\n\nSuccess: the program prints `testsuite passed:  true` and exits 0. For the\nMPI variant:\n\n```\nMAD_NUM_THREADS=2 mpiexec -np 2 ./src/madness/mra/testsuite\n```\n\n### moldft smoke\n\n```\nninja moldft\n./src/apps/moldft/moldft --geometry=water --dft=\"xc=lda\"\n```\n\nExit code 0 on success. Reference inputs for regression checks are in\n`src/apps/moldft/tests/*.in`.\n\n## Project-specific gotchas\n\n- **BLAS must be sequential.** MADNESS owns parallelism via its own task\n  pool; a threaded BLAS inside a task oversubscribes cores. Use\n  single-threaded MKL, Accelerate, or OpenBLAS-serial.\n- **Static libs are the default because ASLR is assumed.** Building shared\n  libs on a system without ASLR requires\n  `-DMADNESS_ASSUMES_ASLR_DISABLED=ON`. Do not flip `BUILD_SHARED_LIBS`\n  casually.\n- **MPI is required by default.** `-DENABLE_MPI=OFF` is rarely used but\n  still supported and maintained — in that mode `stubmpi.h` stands in for\n  the subset of MPI that `SafeMPI` uses. Any new code that reaches for MPI\n  must go through `SafeMPI` / `World::mpi` (see runtime invariants below)\n  so this path continues to compile.\n- **`-DENABLE_NEVER_SPIN=ON`** is a workaround for VMs/containers where\n  spinlocks burn CPU. Leave it off on bare metal.\n- **`-DENABLE_GENTENSOR=ON`** swaps in a compressed-tensor code path used\n  for 6D work (MP2, CC2). Off by default and tested in only one CI cell,\n  so changes in the tensor layer should be checked with it on when\n  relevant.\n\n## Runtime & deployment\n\nThese are concerns for launch scripts and performance tuning, not the source\nitself — and they are largely undiscoverable by reading the code.\n\n### Task backend\n\n`-DMADNESS_TASK_BACKEND={Pthreads,TBB,PaRSEC}` (CMake, default `Pthreads`):\n\n- **Pthreads** — MADNESS's own pool. Pick this when you need execution on\n  just the main thread; TBB and PaRSEC always spawn at least one worker.\n- **PaRSEC** — preferred for production. Disable PaRSEC's own thread\n  binding or it will fight the launcher:\n  `export PARSEC_MCA_bind_threads=0`.\n- **TBB** — Intel TBB task pool; autodetected when available.\n\n### Thread count and the comm thread\n\nWhenever `nranks > 1`, each rank spawns a dedicated MADNESS communication\nthread **in addition to** the `MAD_NUM_THREADS` workers. MPI implementations\ntypically want a core for their own progress thread too, so the budget is:\n\n- Comm-heavy workloads (MRA integral operators, TA tensor contractions):\n  `MAD_NUM_THREADS = hwthreads_per_rank − 2` (one hwthread each for the\n  MADNESS and MPI comm threads).\n- Small ranks (≈16 hwthreads) or light comm: `... − 1` is usually fine —\n  the two comm threads co-exist on one core without meaningful contention.\n- Never oversubscribe.\n\n### Rank pinning\n\nFor MRA workloads, pin each rank to an L3 slice (or NUMA domain on systems\nwithout L3-sized domains). Launch flags are deployment-specific:\n\n- OpenMPI: `mpirun --map-by l3cache` or `--map-by numa`.\n- Other MPI vendors: flags vary, some lack pinning entirely.\n- SLURM: `--cpu-bind` / `--distribution` rather than the MPI flags.\n\nDocument the chosen command with the application, not here.\n\n### Communication buffers\n\nOne-sided sends/receives use fixed-size buffers; 2-sided is supported but\nmuch slower, so the 1-sided path should fit the common message.\n\n- `MAD_BUFFER_SIZE` (env var, bytes) — default `3*512*1024` ≈ 1.5 MiB,\n  defined at `src/madness/world/worldrmi.h`.\n- MRA rule of thumb: a tree-node payload is\n  `sizeof(T) · (2k)^NDIM + metadata`. The default comfortably holds\n  several nodes at typical `k ≤ 10, NDIM ≤ 3`; raise it for larger `k`,\n  6D work, or TiledArray-style bulk tensor transfers.\n- MPI vendors have their own eager/rendezvous cutoffs (MVAPICH in\n  particular) — consult vendor docs when tuning comm perf.\n\n### Apple Silicon + Homebrew OpenMPI\n\nHomebrew's OpenMPI on Apple M-series links HWLOC, which probes hardware\nvia OpenCL and crashes at startup if launched outside `mpiexec`. Either:\n\n- Always launch via `mpiexec`, even for `-np 1`, or\n- `export HWLOC_COMPONENTS=darwin,no_os,-opencl` to skip the OpenCL probe.\n\n## Coding conventions\n\n### Error handling\n\nMADNESS ships several macros with distinct intent (`madness_exception.h`).\nPick by *why* you're checking, not by what's short to type:\n\n- **`MADNESS_CHECK(cond)` / `MADNESS_CHECK_THROW(cond, msg)`** — always-on\n  checks: state-machine preconditions, collective-ordering requirements,\n  user input validation. Use these for invariants that must hold in release\n  builds.\n- **`MADNESS_ASSERT(cond)`** — debug-only, expensive invariants. Its runtime\n  behavior (throw / abort / std::assert / disabled) depends on the\n  `ASSERTION_TYPE` CMake variable; release builds often compile these out.\n  Do **not** use for checks that must run in production.\n- **`MADNESS_EXCEPTION(msg, value)`** — explicit throw sites (unreachable\n  branches, unsupported configurations). Not a conditional.\n- **`MADNESS_ASSERT_NOEXCEPT`** — use inside `noexcept` functions where a\n  throwing `MADNESS_ASSERT` would call `std::terminate`.\n\n### CMake harness\n\nMADNESS is designed to be consumed by parent projects both as an installed\npackage *and* as a subproject (via `FetchContent` / `add_subdirectory`, e.g.\nfrom TiledArray and MPQC). Maintain both invariants when editing CMake.\n\n- **No generic target names.** `check`, `doc`, `unittests`, `applications`\n  would collide with a parent project's targets. Define subproject-scoped\n  targets with `add_custom_target_subproject(madness <name> …)` from\n  `cmake/modules/AddCustomTargetSubproject.cmake`; it creates `<name>-madness`\n  and hooks it into `<name>` if the parent already defined it.\n- **Use the `add_mad_*` wrappers**, not raw `add_library` / `add_executable`.\n  `add_mad_library` / `add_mad_hdr_library` / `add_mad_executable` apply\n  project-wide include paths, install rules, and the\n  `$<BUILD_INTERFACE:…>` / `$<INSTALL_INTERFACE:…>` generator expressions\n  that make targets consumable from both build and install trees.\n- **Consumable from both install tree and build tree.** Preserved via\n  `install(EXPORT madness …)` plus\n  `export(EXPORT madness FILE ${PROJECT_BINARY_DIR}/madness-targets.cmake)`\n  in the top-level `CMakeLists.txt`, and the genex pair in `add_mad_library`.\n  Breaks in either path (missing install rules on new targets, hard-coded\n  paths outside the genex) are silent regressions for downstream consumers.\n- **Optional dependencies follow the `FindOrFetch*` pattern** (e.g.\n  `FindOrFetchCereal.cmake`, `FindOrFetchPARSEC.cmake`): try `find_package`\n  first, fall back to `FetchContent`. Harness mantra: use preexisting deps\n  when available, build from source otherwise — except for the most basic\n  (MPI, BLAS), which must be found on the system.\n- **Component libraries** (`MADworld`, `MADmra`, `MADtensor`, `MADchem`, …)\n  are the public link targets. The aggregate `madness` library is composed\n  from per-component object libraries (`MADworld-obj`, etc.), which (a) lets\n  downstream projects pull a lean subset via `MADNESS_BUILD_MADWORLD_ONLY` /\n  `MADNESS_BUILD_LIBRARIES_ONLY`, and (b) lets developers build a single\n  component quickly without its prerequisites — useful for shorter build\n  tests during iteration.\n- **`CMAKE_FIND_NO_INSTALL_PREFIX=ON`** is set as a safety net so\n  `find_package` doesn't pick up a stale installed copy during development.\n\n### Commit messages\n\nWrite plain commit messages describing the change. **Do not append\n`Co-Authored-By: …` trailers crediting AI tooling** (Claude, Copilot,\nCodex, etc.). This project does not credit tooling in commit metadata —\nthe same way it doesn't credit the editor, compiler, or the vast body\nof prior work the tooling was trained on.\n\n## Consumer-facing invariants\n\nMADNESS is consumed by external projects — TiledArray leans on the parallel\nruntime (`src/madness/world`), MPQC leans on MRA (`src/madness/mra`). When\nediting in either area, preserve these invariants; they are not enforced at\ncompile time and breakage surfaces far downstream.\n\n### Runtime (`src/madness/world`)\n\n- `madness::initialize` must bracket all `World` / MPI use; `madness::finalize`\n  mirrors it. Creating a `World` or submitting tasks outside that window is\n  undefined.\n- `World` lifetimes must nest — destroy in reverse creation order.\n- `WorldObject` and `WorldContainer` require collective construction: every\n  rank in the enclosing `World` must create the same object in the same order.\n- Active-message handlers (`World::am`) run on runtime threads and must not\n  block waiting on further tasks or collective ops; post continuations instead.\n- **MPI is initialized at `MPI_THREAD_MULTIPLE`** — the only level tested\n  today, and required because tasks can spawn further (possibly remote)\n  tasks. This also constrains MPI-implementation choice: some MPI stacks\n  have performance cliffs under `THREAD_MULTIPLE`.\n- **Use `SafeMPI` / `World::mpi` for every MPI call; never raw `MPI_*`.**\n  Three reasons: automated error checking; optional serialization fallback\n  when the MPI implementation is not reliably thread-safe; and the\n  `ENABLE_MPI=OFF` build replaces MPI with `stubmpi.h`, which only declares\n  the subset of MPI that `SafeMPI` uses — raw MPI calls won't compile there.\n- **Never call MPI blocking collectives.** They park the calling thread\n  outside the task scheduler and can deadlock progress. Use MADNESS global\n  ops (`World::gop`) — non-blocking, composable with the runtime, and they\n  serialize user types via `madness::archive`.\n- `madness::archive` is the public serialization extension point — downstream\n  code teaches `Future`, `WorldContainer`, and AM payloads to transport custom\n  types by specializing archive traits, not by reaching into internals.\n- Outside tasks and the main thread, assume nothing in the runtime is\n  thread-safe unless the header documents it.\n- **Prefer explicit `World&` parameters** over `World::get_default()` in any\n  new API. TiledArray builds with `-DMADNESS_DISABLE_WORLD_GET_DEFAULT=ON`\n  to surface code that implicitly assumes the default World; MADNESS itself\n  is laxer, but APIs written to accept an explicit `World&` work in both\n  settings. App-level code may use the default where it is clearly the top\n  level.\n\n### MRA (`src/madness/mra`)\n\n- `madness::startup(world, argc, argv, quiet)` is the **MRA** initializer —\n  loads twoscale coefficients, autocorrelation data, and populates\n  `FunctionDefaults`. It must be called after `madness::initialize` and\n  before constructing any `Function<T,NDIM>` or MRA operator. Runtime-only\n  (MADWorld) code does not need it.\n- `Function<T,NDIM>` is a **shallow-copy handle** to a distributed\n  implementation — Python-like reference semantics, *not* copy-on-write.\n  `Function b = a;` shares the impl; mutations through `b` are observed\n  through `a`.\n- `Function` operations enqueue **async** tasks. Results are not observable\n  until an implicit fence (an observing op such as `norm2`, `trace`, `inner`)\n  or an explicit `world.gop.fence()`.\n- `Function` carries a `TreeState` (`reconstructed`, `compressed`,\n  `nonstandard`, `redundant`, …). Many operations assert on state — use\n  `change_tree_state` / `reconstruct` / `compress` rather than assuming.\n- Prefer the vectorized forms in `src/madness/mra/vmra.h`\n  (`std::vector<Function>` arithmetic, `apply`, inner products, …) over\n  hand-written loops over individual `Function`s — this is the canonical\n  idiom and the overhead is negligible.\n- `FunctionDefaults<NDIM>` is process-global mutable state (`k`, `thresh`,\n  cell, boundary conditions). Set it before constructing any `Function<NDIM>`;\n  changing it mid-run will not retroactively update existing functions.\n- `SeparatedConvolution` operators are tied to a specific `k`, box size, and\n  threshold — reuse one across `Function`s built with different defaults and\n  results are undefined.\n- Drive mutation from tasks or the main thread; don't mutate `Function`s\n  from arbitrary user threads.\n- **Checkpointing.** `Function::save` / `Function::load` go through\n  `ParallelOutputArchive` / `ParallelInputArchive` (binary fstream under the\n  hood). `FunctionDefaults<NDIM>` must match between save and load — same\n  cell, `k`, `thresh`, and boundary conditions — or `load` throws. There\n  is no migration path.\n\nFor API depth, see the Doxygen groups rather than restating signatures here.\n\n## Lint\n\nA `.clang-tidy` configuration is checked in. Run `clang-tidy` against\nchanged translation units before finishing non-trivial C++ edits.\n\n## Debugging aids\n\n- Memory profiling of `FunctionImpl` objects is always available via\n  `MemoryMeasurer::measure_and_print(world)`.\n- `-DENABLE_MEM_STATS=ON` and `-DENABLE_TENSOR_INSTANCE_COUNT=ON` provide\n  coarser, always-on counters for leak hunting (see `INSTALL.md`).\n\n## Reviewing a PR\n\nGuidance for agents doing PR review — focused on regressions CI won't\ncatch because its matrix is narrow. Flag these; don't nitpick style\n(`.clang-tidy` is the source of truth).\n\n- **Raw MPI calls.** Anything added outside `SafeMPI` / `World::mpi`\n  breaks `-DENABLE_MPI=OFF` and bypasses error checking / thread-safety\n  serialization.\n- **Blocking MPI collectives** (`MPI_Barrier`, `MPI_Allreduce`, …).\n  Push toward `World::gop`.\n- **Implicit default World.** `World::get_default()` in library code\n  breaks downstream builds (notably TiledArray's\n  `-DMADNESS_DISABLE_WORLD_GET_DEFAULT=ON`). Push for an explicit\n  `World&` parameter.\n- **Non-collective construction** of `WorldObject` / `WorldContainer`,\n  or any code path where ranks can diverge on construction order.\n- **Threaded-BLAS assumptions** (parallel loops around `gemm`, relying\n  on BLAS threading for speed).\n- **`Function` mutation from user threads** (not tasks or the main\n  thread) or mis-handled `TreeState` preconditions.\n- **Checkpoint-format breaks.** Any change to what `Function::save`\n  writes, or to `FunctionDefaults` fields consumed by `load`, is a\n  silent compat break — call it out.\n- **Tensor-layer changes without GENTENSOR coverage.** CI only tests\n  one GENTENSOR cell; ask the author to verify with\n  `-DENABLE_GENTENSOR=ON` locally if the change could affect the\n  compressed-tensor path.\n\n## Documentation\n\nDeveloper API docs are generated by Doxygen and published at\n<https://m-a-d-n-e-s-s.github.io/madness/api-doc/>. User-facing docs live at\n<https://madness.readthedocs.io/en/latest/>.\n"
  },
  {
    "path": "CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.12.0)  # for FindPython\n\nif(NOT CMAKE_BUILD_TYPE)\n  set(CMAKE_BUILD_TYPE Release)\nendif()\n\n## I know this is obnoxious but I don't know any other way to keep\n## things clean.  Make the build verbose so that people see the warning\n## messages and fix the issues --- some of them are real\n#set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL \"ON\")\n\n# safety net for dev workflow: accidental install will not affect FindOrFetch*\nif (NOT DEFINED CACHE{CMAKE_FIND_NO_INSTALL_PREFIX})\n  set(CMAKE_FIND_NO_INSTALL_PREFIX ON CACHE BOOL \"Whether find_* commands will search CMAKE_INSTALL_PREFIX and CMAKE_STAGING_PREFIX; see https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_NO_INSTALL_PREFIX.html#variable:CMAKE_FIND_NO_INSTALL_PREFIX\")\nendif()\n\n# Set MADNESS version\nset(MADNESS_MAJOR_VERSION 0)\nset(MADNESS_MINOR_VERSION 10)\nset(MADNESS_MICRO_VERSION 1)\nset(MADNESS_VERSION \"${MADNESS_MAJOR_VERSION}.${MADNESS_MINOR_VERSION}.${MADNESS_MICRO_VERSION}\")\n\n# Declare ourselves ============================================================\n\nproject(MADNESS\n        VERSION ${MADNESS_VERSION}\n        DESCRIPTION \"MADNESS: fast, adaptive multiresolution integrodifferential calculus in 1..6 dimensions\"\n        LANGUAGES CXX C ASM\n        HOMEPAGE_URL \"https://madness.readthedocs.io/\")\n\n# Add source directory =========================================================\n\nadd_definitions(-DMAD_ROOT_DIR=\"${PROJECT_SOURCE_DIR}\")\n\n# Add module directory and modules =============================================\n\nlist(APPEND CMAKE_MODULE_PATH \"${PROJECT_SOURCE_DIR}/cmake/modules/\")\ninclude(AddCustomTargetSubproject)\ninclude(AddOptions)\ninclude(AppendFlags)\ninclude(CheckIncludeFile)\ninclude(CheckTypeSize)\ninclude(CheckCXXSourceCompiles)\ninclude(CheckFunctionExists)\ninclude(CMakeDependentOption)\ninclude(AddMADLibrary)\ninclude(AddMADExecutable)\ninclude(AddUnittests)\ninclude(AddMPITests)\ninclude(AddScriptedTests)\ninclude(CMakePackageConfigHelpers)\ninclude(CopyTargetProperties)\ninclude(FeatureSummary)\ninclude(RedefaultableOption)\ninclude(FetchContent)\n\n# Check compiler feature support ===============================================\n\nset(CMAKE_CXX_STANDARD 17 CACHE STRING  \"C++ ISO Standard version\")\nif (NOT(CMAKE_CXX_STANDARD EQUAL 17 OR CMAKE_CXX_STANDARD EQUAL 20))\n  message(FATAL_ERROR \"C++ 2017 ISO Standard or higher is required to compile MADNESS\")\nendif()\n# C++20 is only configurable via compile features with cmake 3.12 and older\nif (CMAKE_CXX_STANDARD EQUAL 20 AND CMAKE_VERSION VERSION_LESS 3.12.0)\n  message(FATAL_ERROR \"C++ 2020 ISO Standard requires CMake version 3.12 or higher\")\nendif()\nset(CMAKE_CXX_STANDARD_REQUIRED ON)\nset(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL \"Whether to use extensions of C++ ISO Standard version\")\n\n# workaround for cmake bug: CheckCXXSourceCompiles does not respect CXX_STANDARD\n# see https://github.com/OPM/opm-common/blob/master/cmake/Modules/FindCXX11Features.cmake\nadd_options(CXX ALL_BUILDS ${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION})\n\n# Set install paths ============================================================\ninclude(GNUInstallDirs)\nset(MADNESS_INSTALL_BINDIR \"${CMAKE_INSTALL_BINDIR}\"\n    CACHE PATH \"MADNESS BIN install directory\")\nset(MADNESS_INSTALL_INCLUDEDIR \"${CMAKE_INSTALL_INCLUDEDIR}\"\n    CACHE PATH \"MADNESS INCLUDE install directory\")\nset(MADNESS_INSTALL_LIBDIR \"${CMAKE_INSTALL_LIBDIR}\"\n    CACHE PATH \"MADNESS LIB install directory\")\nset(MADNESS_INSTALL_DATADIR \"${CMAKE_INSTALL_DATAROOTDIR}/madness/${MADNESS_VERSION}/data\"\n    CACHE PATH \"MADNESS DATA install directory\")\nset(MADNESS_INSTALL_DOCDIR \"${CMAKE_INSTALL_DATAROOTDIR}/madness/${MADNESS_VERSION}/doc\"\n    CACHE PATH \"MADNESS DOC install directory\")\nset(MADNESS_INSTALL_CMAKEDIR \"${CMAKE_INSTALL_LIBDIR}/cmake/madness\"\n    CACHE PATH \"MADNESS CMAKE install directory\")\n\n# Build options  ==============================================================\n\nredefaultable_option(MADNESS_BUILD_LIBRARIES_ONLY \"Build only MADNESS libraries\" OFF)\nif (NOT MADNESS_BUILD_LIBRARIES_ONLY)\n  redefaultable_option(MADNESS_BUILD_MADWORLD_ONLY \"Build only MADWorld runtime (excluding BLAS/LAPACK interfaces)\" OFF)\nendif()\nredefaultable_option(MADNESS_ENABLE_CEREAL \"Support use of Cereal archives as backends for MADNESS serialization\" OFF)\n\n# Enable optional libraries ====================================================\n\n# Preload versions/tags of all dependencies ====================================\ninclude(external/versions.cmake)\n\n# Always search for libraries that are 'ON' by default. If a library is not\n# found, it is disabled without error. If the library is 'OFF' by default,\n# failure to find the library is an error. \n\noption(ENABLE_MPI \"Enable Message Passing Interface (MPI) Library\" ON)\n#redefaultable_option(ENABLE_MKL \"Search for Intel Math Kernel Library (MKL) for BLAS and LAPACK support\" ON)\noption(ENABLE_MKL \"Search for Intel Math Kernel Library (MKL) for BLAS and LAPACK support\" ON)\noption(ENABLE_ACML \"Search for AMD Core Math Library (ACML) for BLAS and LAPACK support\" ON)\noption(ENABLE_TCMALLOC_MINIMAL \"Enable use of tcmalloc_minimal library from Google Performance Tools (gperftools)\" OFF)\noption(ENABLE_GPERFTOOLS \"Enable use of full Google Performance Tools (gperftools)\" OFF)\noption(ENABLE_LIBUNWIND\n       \"Forces detection (and possible use) of Libunwind (normally Libunwind will be sought automatically if needed)\"\n        OFF)\noption(ENABLE_PAPI \"Enables use of PAPI\" OFF)\noption(ENABLE_LIBXC \"Enables use of the libxc library of density functionals\" ON)\noption(ENABLE_PCM \"Enables use of the polarizable continuum model library\" ON)\noption(ENABLE_INTEGRATORXX \"Enables use of the IntegratorXX for building DFT quadrature grids\" ON)\noption(ENABLE_PYTHON \"Enables Python bindings via pybind11\" OFF)\n\nset(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES})\ncheck_cxx_source_compiles(\n    \"\n    namespace madness {\n      template <typename T>\n      void mTxmq(long dimi, long dimj, long dimk,\n\t\t T* __restrict__ c, const T* a, const T* b, long ldb=-1);\n\n      template <>\n      void mTxmq(long dimi, long dimj, long dimk, double* __restrict__ c, const  double* a, const double* b, long ldb);\n    }\n    int main() { double a[1], b[1], c[1]; madness::mTxmq(1,1,1,c,a,b,1); return 0; }\n    \" HAVE_MTXMQ)\n\n  ####### preferred task backend\nset(MADNESS_TASK_VALID_BACKENDS Pthreads TBB PaRSEC)\nset(MADNESS_TASK_BACKEND Pthreads CACHE STRING \"The backend to use for dispatching tasks\")\nset_property(CACHE MADNESS_TASK_BACKEND PROPERTY STRINGS ${MADNESS_TASK_VALID_BACKENDS})\n\nif (DEFINED MADNESS_TASK_BACKEND)\n  if(NOT MADNESS_TASK_BACKEND IN_LIST MADNESS_TASK_VALID_BACKENDS)\n    message(FATAL_ERROR \"MADNESS_TASK_BACKEND must be one of ${MADNESS_TASK_VALID_BACKENDS}\")\n  endif()\n  if (MADNESS_TASK_BACKEND STREQUAL TBB)\n    set(ENABLE_TBB ON)\n  else()\n    set(ENABLE_TBB OFF)\n  endif()\n  if (MADNESS_TASK_BACKEND STREQUAL PaRSEC)\n    set(ENABLE_PARSEC ON)\n  else()\n    set(ENABLE_PARSEC OFF)\n  endif()\nelse (DEFINED MADNESS_TASK_BACKEND)\n  redefaultable_option(ENABLE_TBB \"Enables use of Intel Thread Building Blocks (TBB) as the task scheduler\" OFF)\n  option(ENABLE_PARSEC \"Enables use of PaRSEC as the task scheduler\" OFF)\n  if(ENABLE_PARSEC AND ENABLE_TBB)\n    message(FATAL_ERROR \"TBB and PaRSEC cannot be both enabled.\")\n  endif()\nendif(DEFINED MADNESS_TASK_BACKEND)\nif (ENABLE_TBB)\n  redefaultable_option(MADNESS_EXPLOIT_TBB_PRIORITY \"Enables use of Intel TBB task priorities\" OFF)\nendif(ENABLE_TBB)\n\noption(ENABLE_ELEMENTAL \"Enable Elemental library for distributed-memory linear algebra\" OFF)\nif (ENABLE_ELEMENTAL)\n  if (DEFINED ELEMENTAL_TAG)\n    if(\"${ELEMENTAL_TAG}\" STREQUAL \"\")\n      message(FATAL_ERROR \"Invalid value given for ELEMENTAL_TAG; specify a valid hash or tag.\")\n    endif()\n    message(STATUS \"Will compile Elemental source (tag=${ELEMENTAL_TAG}) in the build directory\")\n    set(ENABLE_ELEMENTAL_EMBEDDED OFF)\n    set(MADNESS_HAS_ELEMENTAL_EMBEDDED 0)\n  else (DEFINED ELEMENTAL_TAG)\n    message(STATUS \"Will use the embedded Elemental source(tag=v0.84)\")\n    set(ENABLE_ELEMENTAL_EMBEDDED ON)\n    set(MADNESS_HAS_ELEMENTAL_EMBEDDED 1)\n  endif (DEFINED ELEMENTAL_TAG)\n  set(MADNESS_HAS_ELEMENTAL 1)\nelse (ENABLE_ELEMENTAL)\n  set(MADNESS_HAS_ELEMENTAL 0)\nendif (ENABLE_ELEMENTAL)\nadd_feature_info(Elemental ENABLE_ELEMENTAL \"compiles parallel linear-algebra library Elemental as part of MADNESS\")\n\noption(ENABLE_BOOST \"Enable C++ Boost Libraries\" OFF)\n\n# Configure options ============================================================\n\noption(ENABLE_GENTENSOR \"Enable generic tensor support\" OFF)\nadd_feature_info(GENTENSOR ENABLE_GENTENSOR \"enables use of MRA Function compression that allows computing in 6 dimensions\")\nset(MADNESS_USE_GENTENSOR ${ENABLE_GENTENSOR} CACHE BOOL\n    \"enables use of MRA Function compression that allows computing in 6 dimensions\")\n\nif(ENABLE_GENTENSOR)\n  add_definitions(-DUSE_GENTENSOR)\nendif()\nset(TENSOR_USE_GENTENSOR ${ENABLE_GENTENSOR} CACHE BOOL \"enable generic tensors\")\n\noption(ENABLE_TASK_PROFILER\n    \"Enable task profiler that collects per-task start and stop times.\" OFF)\nadd_feature_info(TASK_PROFILER ENABLE_TASK_PROFILER \"supports task-level tracing of program execution\")\nset(MADNESS_TASK_PROFILING ${ENABLE_TASK_PROFILER} CACHE BOOL\n    \"Enable task profiler that collects per-task start and stop times.\")\n\noption(ENABLE_WORLD_PROFILE \"Enables profiling\" OFF)\nadd_feature_info(WORLD_PROFILE ENABLE_WORLD_PROFILE \"supports simple profiling of MADworld runtime\")\nset(WORLD_PROFILE_ENABLE ${ENABLE_WORLD_PROFILE} CACHE BOOL \n    \"Enables world profiling\")\n\noption(ENABLE_MEM_STATS \"Gather fine-grained memory statistics (expensive)\" OFF)\nadd_feature_info(MEM_STATS ENABLE_MEM_STATS \"gather fine-grained memory statistics (expensive)\")\nset(WORLD_GATHER_MEM_STATS ${ENABLE_MEM_STATS} CACHE BOOL \"Gather fine-grained memory statistics (expensive)\")\n\noption(ENABLE_MEM_PROFILE \"Turn on instrumented aggregate memory profiling (print_meminfo)\" OFF)\nadd_feature_info(MEM_PROFILE ENABLE_MEM_PROFILE \"instrumented aggregate memory profiling\")\nset(WORLD_MEM_PROFILE_ENABLE ${ENABLE_MEM_PROFILE} CACHE BOOL \"Turn on instrumented aggregate memory profiling (print_meminfo)\")\n\noption(ENABLE_TENSOR_BOUNDS_CHECKING\n    \"Enable checking of bounds in tensors ... slow but useful for debugging\" OFF)\nadd_feature_info(TENSOR_BOUNDS_CHECKING ENABLE_TENSOR_BOUNDS_CHECKING\n    \"Enable checking of bounds in tensors ... slow but useful for debugging\")\nset(TENSOR_BOUNDS_CHECKING ${ENABLE_TENSOR_BOUNDS_CHECKING} CACHE BOOL\n    \"Enable checking of bounds in tensors ... slow but useful for debugging\")\n\noption(ENABLE_TENSOR_INSTANCE_COUNT\n    \"Enable counting of allocated tensors for memory leak detection\" OFF)\nadd_feature_info(TENSOR_INSTANCE_COUNT ENABLE_TENSOR_INSTANCE_COUNT\n    \"Enable counting of allocated tensors for memory leak detection\")\nset(TENSOR_INSTANCE_COUNT CACHE BOOL\n    \"Enable counting of allocated tensors for memory leak detection\")\n\noption(ENABLE_SPINLOCKS\n    \"Enables use of spinlocks instead of mutexes (faster unless over subscribing processors)\" ON)\nadd_feature_info(SPINLOCKS ENABLE_SPINLOCKS\n    \"Enables use of spinlocks instead of mutexes (faster unless over subscribing processors)\")\nset(USE_SPINLOCKS ${ENABLE_SPINLOCKS} CACHE BOOL\n    \"Enables use of spinlocks instead of mutexes (faster unless over subscribing processors)\")\n\noption(ENABLE_NEVER_SPIN\n    \"Disables use of spinlocks (notably for use inside virtual machines)\" OFF)\nadd_feature_info(NEVER_SPIN ENABLE_NEVER_SPIN\n    \"Disables use of spinlocks (notably for use inside virtual machines)\")\nset(NEVER_SPIN ${ENABLE_NEVER_SPIN} CACHE BOOL\n    \"Disables use of spinlocks (notably for use inside virtual machines)\")\n\noption(ENABLE_DQ_PREBUF\n    \"Enables thread-local buffer for task aggregation to reduce lock contention\" ON)\nadd_feature_info(DQ_PREBUF ENABLE_DQ_PREBUF\n    \"Enables thread-local buffer for task aggregation to reduce lock contention\")\nset(MADNESS_DQ_USE_PREBUF ${ENABLE_DQ_PREBUF} CACHE BOOL\n    \"Enables thread-local buffer for task aggregation to reduce lock contention\")\n\nset(MADNESS_DQ_PREBUF_SIZE 20 CACHE STRING \"Number of entries in the thread-pool prebuffer for task aggregation to reduce lock contention\")\n\noption(ENABLE_BSEND_ACKS \n    \"Use MPI Send instead of MPI Bsend for huge message acknowledgements\" ON)\nadd_feature_info(BSEND_ACKS ENABLE_BSEND_ACKS\n    \"Use MPI Send instead of MPI Bsend for huge message acknowledgements\")\nset(MADNESS_USE_BSEND_ACKS ${ENABLE_BSEND_ACKS} CACHE BOOL\n    \"Use MPI Send instead of MPI Bsend for huge message acknowledgements\")\n\noption(DISABLE_WORLD_GET_DEFAULT \"Disables World::get_default()\" OFF)\nadd_feature_info(WORLD_GET_DEFAULT_DISABLE DISABLE_WORLD_GET_DEFAULT \"Disables World::get_default()\")\nset(WORLD_GET_DEFAULT_DISABLED ${DISABLE_WORLD_GET_DEFAULT} CACHE BOOL \n    \"Disables World::get_default()\")\n\noption(ENABLE_TASK_DEBUG_TRACE\n        \"Enable task debug tracing.\" OFF)\nadd_feature_info(TASK_DEBUG_TRACE ENABLE_TASK_DEBUG_TRACE \"supports debug trace of task engine\")\nset(MADNESS_TASK_DEBUG_TRACE ${ENABLE_TASK_DEBUG_TRACE} CACHE BOOL\n        \"Enable task debug tracing.\")\n\noption(ENABLE_WORLDOBJECT_FUTURE_TRACE\n        \"Enable tracing of futures assicuated with WorldObjects.\" OFF)\nadd_feature_info(WORLDOBJECT_FUTURE_TRACE ENABLE_WORLDOBJECT_FUTURE_TRACE \"supports tracing of futures associated with WorldObjects\")\nset(MADNESS_WORLDOBJECT_FUTURE_TRACE ${ENABLE_WORLDOBJECT_FUTURE_TRACE} CACHE BOOL\n        \"Enable tracing of futures assicuated with WorldObjects.\")\n\nset(FORTRAN_INTEGER_SIZE 4 CACHE STRING \"The fortran integer size (4 or 8 bytes) used for BLAS and LAPACK function calls\")\nif(NOT (FORTRAN_INTEGER_SIZE EQUAL 4 OR FORTRAN_INTEGER_SIZE EQUAL 8))\n  message(FATAL_ERROR \"Incorrect fortran integer size '${FORTRAN_INTEGER_SIZE}'\\n\"\n                       \"FORTRAN_INTEGER_SIZE must be equal to 4 or 8\")\nendif()\nadd_feature_info(\"FORTRAN_INTEGER_SIZE=${FORTRAN_INTEGER_SIZE}\" TRUE \"assumes Fortran integers to be ${FORTRAN_INTEGER_SIZE} bytes long\")\n\nif (CMAKE_BUILD_TYPE STREQUAL Release OR\n    CMAKE_BUILD_TYPE STREQUAL MinSizeRel)\n  set (DEFAULT_ASSERTION_TYPE \"disable\")\nelse ()\n  set (DEFAULT_ASSERTION_TYPE \"assert\")\nendif()\nset(ASSERTION_TYPE ${DEFAULT_ASSERTION_TYPE} CACHE STRING \"Define MADNESS assertion behavior (abort|assert|disable|throw)\")\nif(ASSERTION_TYPE STREQUAL \"abort\")\n  set(MADNESS_ASSERTIONS_ABORT 1)\nelseif(ASSERTION_TYPE STREQUAL \"assert\")\n  set(MADNESS_ASSERTIONS_ASSERT 1)\nelseif(ASSERTION_TYPE STREQUAL \"disable\")\n  set(MADNESS_ASSERTIONS_DISABLE 1)\nelseif(ASSERTION_TYPE STREQUAL \"throw\")\n  set(MADNESS_ASSERTIONS_THROW 1)\nelse()\n  message(WARNING \"Unsupported ASSERTION_TYPE '${ASSERTION_TYPE}'\")\n  set(ASSERTION_TYPE \"throw\")\n  set(MADNESS_ASSERTIONS_THROW 1)\nendif()\nmessage(STATUS \"Assertion type: ${ASSERTION_TYPE}\")\nadd_feature_info(\"ASSERTION_TYPE=${ASSERTION_TYPE}\" TRUE \"controls how MADNESS assertions (MADNESS_ASSERT) are handled\")\n\nset(MPI_THREAD \"multiple\" CACHE STRING \"Thread level for MPI (multiple|serialized)\")\nif(MPI_THREAD STREQUAL \"multiple\")\n  set(MADNESS_MPI_THREAD_LEVEL \"MPI_THREAD_MULTIPLE\")\nelseif(MPI_THREAD STREQUAL \"serialized\")\n  set(MADNESS_MPI_THREAD_LEVEL \"MPI_THREAD_SERIALIZED\")\n  if (ENABLE_ELEMENTAL)\n    message (FATAL_ERROR \"Use of Elemental precludes MPI_THREAD=serialized, must use MPI_THREAD=multiple\")\n  endif (ENABLE_ELEMENTAL)\nelse()\n  message(FATAL_ERROR \"Invalid value for MPI_THREAD '${MPI_THREAD}'; valid values are 'multiple' or 'serialized'\")\nendif()\nadd_feature_info(\"MPI_THREAD=${MPI_THREAD}\" TRUE \"controls the level of thread-safety support in MPI\")\n\n# Enable support for shared libraries ==========================================\n\nredefaultable_option(MADNESS_ASSUMES_ASLR_DISABLED \"MADNESS runtime assumes the Address Space Layout Randomization (ASLR) to be disabled\" OFF)\nadd_feature_info(ASSUMES_ASLR_DISABLED MADNESS_ASSUMES_ASLR_DISABLED\n    \"MADNESS runtime assumes the Address Space Layout Randomization (ASLR) to be disabled\")\nget_property(SUPPORTS_SHARED GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)\nif (SUPPORTS_SHARED AND MADNESS_ASSUMES_ASLR_DISABLED)\n  set(default_BUILD_SHARED_LIBS ON)\nelse ()\n  set(default_BUILD_SHARED_LIBS OFF)\nendif()\nredefaultable_option(BUILD_SHARED_LIBS \"Enable shared libraries\" default_BUILD_SHARED_LIBS)\nif (BUILD_SHARED_LIBS OR NOT MADNESS_ASSUMES_ASLR_DISABLED)\n  set(default_CMAKE_POSITION_INDEPENDENT_CODE ON)\nelse ()\n  set(default_CMAKE_POSITION_INDEPENDENT_CODE OFF)\nendif()\nredefaultable_option(CMAKE_POSITION_INDEPENDENT_CODE \"Default value for POSITION_INDEPENDENT_CODE of targets\" default_CMAKE_POSITION_INDEPENDENT_CODE)\n\nif(BUILD_SHARED_LIBS)\n  set(BLA_STATIC_DEFAULT FALSE)\n  set(CMAKE_MACOSX_RPATH TRUE)\nelse(BUILD_SHARED_LIBS)\n  set(BLA_STATIC_DEFAULT TRUE)\n  set(CMAKE_MACOSX_RPATH FALSE)\nendif(BUILD_SHARED_LIBS)\nif (NOT DEFINED BLA_STATIC)\n  set(BLA_STATIC ${BLA_STATIC_DEFAULT})\nendif()\n\nset(CMAKE_SKIP_RPATH FALSE)\nset(CMAKE_SKIP_BUILD_RPATH  FALSE)\nset(CMAKE_SKIP_INSTALL_RPATH FALSE)\n\n# Get host and platform information ============================================\n\nif(CMAKE_SYSTEM_NAME MATCHES \"Darwin\")\n  set(ON_A_MAC 1)\n  # look for frameworks and appbundles last\n  set(CMAKE_FIND_FRAMEWORK LAST)\n  set(CMAKE_FIND_APPBUNDLE LAST)\nendif()\n\nif (NOT DEFINED MADNESS_CONFIGURATION_USER)\n  if($ENV{USERNAME})\n    set(MADNESS_CONFIGURATION_USER \"$ENV{USERNAME}\" CACHE INTERNAL \"\")\n  elseif($ENV{USER})\n    set(MADNESS_CONFIGURATION_USER \"$ENV{USER}\" CACHE INTERNAL \"\")\n  else()\n    set(MADNESS_CONFIGURATION_USER \"$ENV{USER}\" CACHE INTERNAL \"\")\n  endif()\nendif (NOT DEFINED MADNESS_CONFIGURATION_USER)\nif (NOT DEFINED MADNESS_CONFIGURATION_HOST)\n  cmake_host_system_information(RESULT madness_configuration_host QUERY HOSTNAME)\n  set(MADNESS_CONFIGURATION_HOST \"${madness_configuration_host}\" CACHE INTERNAL \"\")\nendif (NOT DEFINED MADNESS_CONFIGURATION_HOST)\nif (NOT DEFINED MADNESS_CONFIGURATION_DATE)\n  string(TIMESTAMP madness_configuration_date)\n  set(MADNESS_CONFIGURATION_DATE \"${madness_configuration_date}\" CACHE INTERNAL \"\")\nendif (NOT DEFINED MADNESS_CONFIGURATION_DATE)\n\nset(MAD_BIND_DEFAULT \"OFF\" CACHE STRING \"The default binding for threads\")\n\n# Check if the target platform is CRAY XE\ncheck_cxx_source_compiles(\n    \"\n    #ifndef __CRAYXE\n    #error choke me\n    #endif\n    int main() { return 0; }\n    \" HAVE_CRAYXE)\n# Check if the target platform is CRAY XE\ncheck_cxx_source_compiles(\n    \"\n    #ifndef __CRAYXT\n    #error choke me\n    #endif\n    int main() { return 0; }\n    \" HAVE_CRAYXT)\nif(HAVE_CRAYXE)\n  set(AMD_QUADCORE_TUNE ON CACHE BOOL \"Target for tuning mtxmq kernels\")\n  set(USE_SPINLOCKS ON CACHE BOOL \n      \"Enables use of spinlocks instead of mutexs (faster unless over subscribing processors)\" FORCE)\n  set(MAD_BIND_DEFAULT \"1 0 2\" CACHE STRING \"The default binding for threads\" FORCE)\n  set(MPI_C_COMPILER cc CACHE STRING \"CRAY MPI C compiler\")\n  set(MPI_CXX_COMPILER CC CACHE STRING \"CRAY MPI C++ compiler\")\nendif()\n\n# Check if the target platform is BG/P\ncheck_cxx_source_compiles(\n    \"\n    #ifndef __bgp__\n    #error choke me\n    #endif\n    int main() { return 0; }\n    \" HAVE_IBMBGP)\n\n# Check if the target platform is BG/Q\ncheck_cxx_source_compiles(\n    \"\n    #ifndef __bgq__\n    #error choke me\n    #endif\n    int main() { return 0; }\n    \" HAVE_IBMBGQ)\n\nif(HAVE_IBMBGQ OR HAVE_IBMBGP)\n  set(USE_SPINLOCKS ON CACHE BOOL \n      \"Enables use of spinlocks instead of mutexs (faster unless over subscribing processors)\" FORCE)\nendif()\n\n\n# Check if the target is x86_64\ncheck_cxx_source_compiles(\n    \"\n    #if !(defined(__x86_64__) || defined(_M_X64))\n    #error Not x86_64\n    #endif\n    int main() { return 0; }\n    \" USE_X86_64_ASM)\n\nif(NOT USE_X86_64_ASM)\n  # Check if the target is x86\n  check_cxx_source_compiles(\n      \"\n      #if !(defined(__i386) || defined(_M_IX86))\n      #error Not x86\n      #endif\n      int main() { return 0; }\n      \" USE_X86_32_ASM)\nendif()\n\n# (try to) determine C++ ABI\n# ABI kinds are named as in https://clang.llvm.org/doxygen/classclang_1_1TargetCXXABI.html\n# we only need ABI for serializing member pointers, hence all ARM-based ABIs are represented by same kind\nset(MADNESS_CXX_ABI_GenericItanium 1)\nset(MADNESS_CXX_ABI_GenericARM 2)\nset(MADNESS_CXX_ABI_Microsoft 3)\nif (NOT CMAKE_SYSTEM_PROCESSOR)\n  set(processor_name ${CMAKE_HOST_SYSTEM_PROCESSOR})\nelse(NOT CMAKE_SYSTEM_PROCESSOR)\n  set(processor_name ${CMAKE_SYSTEM_PROCESSOR})\nendif(NOT CMAKE_SYSTEM_PROCESSOR)\nif(processor_name MATCHES \"^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)\" OR processor_name MATCHES \"^(arm.*|ARM.*)\" OR processor_name MATCHES \"^(mips.*|MIPS.*)\")\n  # on ARM everything, including Windows, targets ARM C++ ABI\n  set(MADNESS_CXX_ABI ${MADNESS_CXX_ABI_GenericARM})\nelseif(processor_name MATCHES \"amd64.*|x86_64.*|AMD64.*\" OR processor_name MATCHES \"i686.*|i386.*|x86.*\" OR processor_name MATCHES \"^(powerpc|ppc)64le\" OR processor_name MATCHES \"^(powerpc|ppc)64\")\n  if (CMAKE_SYSTEM_NAME STREQUAL Windows) # on x86 Windows all compilers (clang, intel) target Windows C++ ABI\n    set(MADNESS_CXX_ABI ${MADNESS_CXX_ABI_Microsoft})\n  else (CMAKE_SYSTEM_NAME STREQUAL Windows)  # everyone else uses Itanium C++ ABI\n    set(MADNESS_CXX_ABI ${MADNESS_CXX_ABI_GenericItanium})\n  endif (CMAKE_SYSTEM_NAME STREQUAL Windows)\nelse()\n  message(FATAL_ERROR \"Cannot determine C++ ABI for CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}, please file an issue\")\nendif()\n\n# Check compiler feature support ===============================================\n\n# Check for system include files\ncheck_include_file(sys/stat.h HAVE_SYS_STAT_H)\ncheck_include_file(sys/types.h HAVE_SYS_TYPES_H)\ncheck_include_file(unistd.h HAVE_UNISTD_H)\ncheck_include_file(sys/resource.h HAVE_RESOURCE_H)\nif(MADNESS_TASK_PROFILING)\n  check_include_file(execinfo.h HAVE_EXECINFO_H)\n  check_include_file(cxxabi.h HAVE_CXXABI_H)\n  if(NOT (HAVE_EXECINFO_H AND HAVE_CXXABI_H))\n    message(FATAL_ERROR \"Unable to find required header files execinfo.h and/or cxxabi.h\")\n  endif()\nendif()\n\n# Check type support\ncheck_type_size(\"int64_t\" HAVE_INT64_T)\ncheck_type_size(\"long double\" HAVE_LONG_DOUBLE)\ncheck_type_size(\"long long\" HAVE_LONG_LONG)\ncheck_cxx_source_compiles(\n    \"\n    #include <sys/types.h>\n    int main() { typedef pid_t test_t; return 0; }\n    \" SYS_TYPES_H_HAS_PID_T)\n\n# Check function support\ncheck_function_exists(fork HAVE_FORK)\ncheck_function_exists(memset HAVE_MEMSET)\ncheck_function_exists(posix_memalign HAVE_POSIX_MEMALIGN)\nif(HAVE_POSIX_MEMALIGN)\n  # look for both version of posix_memalign, with and without throw()\n  check_cxx_source_compiles(\n      \"\n      #include <stddef.h>\n      #include <stdlib.h>\n      extern \\\"C\\\"  int posix_memalign(void **memptr, size_t alignment, size_t size) throw();\n      int main() { void *m; posix_memalign(&m, 16, 1024); }\n      \" CHECK_STDLIB_H_HAS_POSIX_MEMALIGN_THROW)\n  if(NOT CHECK_STDLIB_H_HAS_POSIX_MEMALIGN_THROW)\n    check_cxx_source_compiles(\n        \"\n        #include <stddef.h>\n        #include <stdlib.h>\n        extern \\\"C\\\"  int posix_memalign(void **memptr, size_t alignment, size_t size);\n        int main() { void *m; posix_memalign(&m, 16, 1024); }\n        \" CHECK_STDLIB_H_HAS_POSIX_MEMALIGN)\n  endif()\n  if(NOT CHECK_STDLIB_H_HAS_POSIX_MEMALIGN_THROW AND NOT CHECK_STDLIB_H_HAS_POSIX_MEMALIGN)\n    set(MISSING_POSIX_MEMALIGN_PROTO 1)\n  endif()\n\nelse()\n  message(WARNING \"posix_memalign NOT FOUND ... enabling override of new/delete ... THIS WILL BE SLOW\")\nendif()\ncheck_function_exists(pow HAVE_POW)\ncheck_function_exists(random HAVE_RANDOM)\ncheck_function_exists(sleep HAVE_SLEEP)\ncheck_function_exists(strchr HAVE_STRCHR)\n# look for both version of posix_memalign, with and without throw()\ncheck_cxx_source_compiles(\n    \"\n    #include <cmath>\n    #include <cstdlib>\n    long (*absptr)(long) = &std::abs; \n    long a = -1;  \n    long b = std::abs(a);\n    int main() { return 0; }\n    \" HAVE_STD_ABS_LONG)\nif(NOT HAVE_STD_ABS_LONG)\n  check_cxx_source_compiles(\n      \"\n      #include <cmath>\n      #include <cstdlib>\n      long (*labsptr)(long) = &std::labs; \n      long a = -1l;  \n      long b = labs(a);\n      int main() { return 0; }\n      \" HAVE_LABS)\nendif()\nif(NOT CHECK_STDLIB_H_HAS_POSIX_MEMALIGN_THROW AND NOT CHECK_STDLIB_H_HAS_POSIX_MEMALIGN)\n  set(MISSING_POSIX_MEMALIGN_PROTO 1)\nendif()\n\n# Check for thread local storage keyword support.\n# thread_local, __thread , __thread_local, or __declspec(thread)\nif(NOT DEFINED THREAD_LOCAL_KEYWORD)\n  foreach(_thread_local_keyword thread_local __thread __thread_local)\n    check_cxx_source_compiles(\n        \"\n        ${_thread_local_keyword} int i = 0;\n        int main() { i = 1; return 0; }\n        \" THREAD_LOCAL_SUPPORT)\n    if(THREAD_LOCAL_SUPPORT AND _thread_local_keyword STREQUAL \"thread_local\")\n      message(STATUS \"Thread local keyword: thread_local\")\n      unset(THREAD_LOCAL_KEYWORD CACHE)\n      break()\n    elseif(THREAD_LOCAL_SUPPORT)\n      message(STATUS \"Thread local keyword: ${_thread_local_keyword}\")\n      set(THREAD_LOCAL_KEYWORD \"${_thread_local_keyword}\"\n          CACHE STRING \"thread local storage keyword, 'thread_local' in C++>11\")\n      break()\n    else()\n      unset(THREAD_LOCAL_SUPPORT CACHE)\n    endif()\n  endforeach()\n  \n  if(NOT DEFINED THREAD_LOCAL_SUPPORT)\n    message(FATAL_ERROR \"Unable to detect mandatory support for thread-local storage\")\n  endif()\nendif()\n\n\n# Check for restrict keyword support\n# restrict, __restrict, __restrict__, or _Restrict\nif(NOT DEFINED RESTRICT_KEYWORD)\n  foreach(_restrict_keyword restrict __restrict __restrict__ _Restrict)\n    check_cxx_source_compiles(\n        \"\n        int*  ${_restrict_keyword} i = nullptr;\n        int main() { *i = 1; return 0; }\n        \" RESTRICT_SUPPORT)\n    if(RESTRICT_SUPPORT AND _restrict_keyword STREQUAL \"restrict\")\n      unset(RESTRICT_KEYWORD CACHE)\n      break()\n    elseif(RESTRICT_SUPPORT)\n      set(RESTRICT_KEYWORD \"${_restrict_keyword}\"\n          CACHE STRING \"C++ equivialent of the C 'restrict' keyword\")\n      break()\n    else()\n      unset(RESTRICT_SUPPORT CACHE)\n    endif()\n  endforeach()\n\n  if(NOT DEFINED RESTRICT_SUPPORT)\n    # Set the restrict keyword to nothing so that it is not used\n    set(RESTRICT_KEYWORD \"\"\n        CACHE STRING \"C++ equivialent of the C 'restrict' keyword\")\n  endif()\n  \n  # Print restrict keyword search results\n  message(STATUS \"Restrict keyword: ${RESTRICT_KEYWORD}\")\nendif()\n\ncheck_cxx_source_compiles(\n    \"\n    template <typename T>\n    static inline void f(T* a) {};\n    template <typename T> void g(T* a) { f(a); }\n    template void g(int* a);\n    int main() { return 0; }\n    \" HAVE_UNQUALIFIED_STATIC_DECL)\n\n# Check linker feature support ===============================================\n\ninclude(CheckDisablePIESupport)\ncheck_disablepie_support(LINKER_HAS_DISABLEPIE_SUPPORT DISABLEPIE_LINKER_FLAG)\n\n# Check for applications =======================================================\n\nfind_package(Doxygen)\nfind_package(LATEX)\nfind_program(XTERM_EXECUTABLE xterm)\nif(XTERM_EXECUTABLE)\n  set(HAVE_XTERM 1)\n  message(STATUS \"Found xterm: ${XTERM_EXECUTABLE}\")\nendif()\nfind_program(GDB_EXECUTABLE gdb)\nif(GDB_EXECUTABLE)\n  set(HAVE_GDB 1)\n  message(STATUS \"Found gdb: ${GDB_EXECUTABLE}\")\nendif()\nfind_program(LLDB_EXECUTABLE lldb)\nif(LLDB_EXECUTABLE)\n  set(HAVE_LLDB 1)\n  message(STATUS \"Found lldb: ${LLDB_EXECUTABLE}\")\nendif()\n\n# ccache for caching builds\nfind_program(CCACHE ccache)\nif(CCACHE)\n  mark_as_advanced(CCACHE)\n  message (STATUS \"Found ccache: ${CCACHE}\")\n  set(CMAKE_CXX_COMPILER_LAUNCHER \"${CCACHE}\" CACHE STRING \"Compiler launcher to use for compiling C++\")\n  set(CMAKE_C_COMPILER_LAUNCHER \"${CCACHE}\" CACHE STRING \"Compiler launcher to use for compiling C\")\nendif(CCACHE)\n\n# Check for external dependencies ==============================================\ninclude(external/pthread.cmake)\ninclude(external/mpi.cmake)\ninclude(external/papi.cmake)\ninclude(external/libunwind.cmake)\ninclude(external/gperftools.cmake)\ninclude(external/tbb.cmake)\ninclude(external/parsec.cmake)\ninclude(external/boost.cmake)\nif (NOT MADNESS_BUILD_MADWORLD_ONLY OR MADNESS_BUILD_LIBRARIES_ONLY)\n  include(external/lapack.cmake)\n  include(external/libxc.cmake)\n  include(external/pcm.cmake)\n  include(external/integratorxx.cmake)\nendif ()\ninclude(external/pybind11.cmake)\n\nif (DEFINED ELEMENTAL_TAG)\n  include(external/elemental.cmake)\nendif (DEFINED ELEMENTAL_TAG)\n\n# Add project subdirectories ===================================================\n\n# predefine targets\nadd_custom_target(everything)\nadd_dependencies(everything madness)\n\nif(NOT (MADNESS_BUILD_MADWORLD_ONLY OR MADNESS_BUILD_LIBRARIES_ONLY) AND LAPACK_FOUND)\n\tadd_custom_target_subproject(madness numerical-examples)\n\tadd_custom_target_subproject(madness applications)\nendif()\n\n# Create build and install libraries libraries\nadd_custom_target(madness-libraries)\nadd_custom_target(install-madness-libraries)\nadd_dependencies(everything madness-libraries)\n\ninclude_directories(${PROJECT_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src)\nset(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE TRUE)\nset(CMAKE_INCLUDE_CURRENT_DIR TRUE)\ninclude(CTest)\nif(BUILD_TESTING)\n  set(MADNESS_HAS_GOOGLE_TEST 1)\n  add_custom_target_subproject(madness unittests)\n  add_custom_target_subproject(madness scripted_tests)\n  add_custom_target_subproject(madness check COMMAND ${CMAKE_CTEST_COMMAND} -V -R \"madness/test/\" USES_TERMINAL) # to be GNU compatible\n  add_custom_target_subproject(madness check-short COMMAND ${CMAKE_CTEST_COMMAND} -L \\\"short|medium\\\" -V -R \"madness/test/\" USES_TERMINAL) # to be GNU compatible\n  add_dependencies(everything unittests)\nendif()\nadd_subdirectory(src)\nadd_subdirectory(doc)\n\n# Generate configure files =====================================================\n\nconfigure_file(\n  ${PROJECT_SOURCE_DIR}/cmake/config.h.in\n  ${PROJECT_BINARY_DIR}/src/madness/config.h\n)\n\nconfigure_file(\n  ${PROJECT_SOURCE_DIR}/cmake/doxygen.cfg.in\n  ${PROJECT_BINARY_DIR}/doc/doxygen.cfg\n  @ONLY\n)\n\nCONFIGURE_FILE(\n  ${PROJECT_SOURCE_DIR}/config/MADNESS.pc.in\n  ${PROJECT_BINARY_DIR}/config/MADNESS.pc\n)\n\nCONFIGURE_FILE( \n  ${PROJECT_SOURCE_DIR}/admin/conda/Makefile.in\n  ${PROJECT_BINARY_DIR}/admin/conda/Makefile\n  @ONLY\n)\n\nCONFIGURE_FILE( \n  ${PROJECT_SOURCE_DIR}/admin/conda/recipe/build.sh.in\n  ${PROJECT_BINARY_DIR}/admin/conda/recipe/build.sh\n  @ONLY\n)\n\nCONFIGURE_FILE( \n  ${PROJECT_SOURCE_DIR}/admin/conda/recipe/meta.yaml.in\n  ${PROJECT_BINARY_DIR}/admin/conda/recipe/meta.yaml\n  @ONLY\n)\n\n\n# install config files\ninstall(FILES ${PROJECT_BINARY_DIR}/config/MADNESS.pc\n    DESTINATION lib/pkgconfig)\n\n# Install some CMake modules\ninstall(FILES\n        \"${PROJECT_SOURCE_DIR}/cmake/modules/FindTBB.cmake\"\n        DESTINATION \"${MADNESS_INSTALL_CMAKEDIR}/modules\"\n        COMPONENT madness-config)\n\n# Create the version file\nwrite_basic_package_version_file(madness-config-version.cmake\n  VERSION ${MADNESS_VERSION} COMPATIBILITY AnyNewerVersion)\n\n# Create the targets file for madness export set\n# N.B. ALL targets end up in madness export set, even if building only madworld\nexport(EXPORT madness FILE \"${PROJECT_BINARY_DIR}/madness-targets.cmake\")\n\n# Create the configure file\nconfigure_package_config_file(cmake/madness-config.cmake.in\n    \"${MADNESS_BINARY_DIR}/madness-config.cmake\"\n  INSTALL_DESTINATION \"${MADNESS_INSTALL_CMAKEDIR}\"\n  PATH_VARS CMAKE_INSTALL_PREFIX MADNESS_INSTALL_BINDIR \n            MADNESS_INSTALL_INCLUDEDIR MADNESS_INSTALL_LIBDIR\n            MADNESS_INSTALL_DATADIR MADNESS_INSTALL_DOCDIR \n            MADNESS_INSTALL_CMAKEDIR)\n\n# Install config, version, and target files\ninstall(EXPORT madness\n   \tFILE \"madness-targets.cmake\"\n   \tDESTINATION \"${MADNESS_INSTALL_CMAKEDIR}\" \n   \tCOMPONENT madness-config)\ninstall(FILES\n    \"${MADNESS_BINARY_DIR}/madness-config.cmake\"\n    \"${MADNESS_BINARY_DIR}/madness-config-version.cmake\"\n    DESTINATION \"${MADNESS_INSTALL_CMAKEDIR}\" \n    COMPONENT madness-config)\nadd_custom_target(install-madness-config\n     COMMAND ${CMAKE_COMMAND} -DCOMPONENT=madness-config -P ${PROJECT_BINARY_DIR}/cmake_install.cmake\n     COMMENT \"Installing MADNESS config components\"\n     USES_TERMINAL)\n\n# Add feature info for MPI tests\nif(MADNESS_HAS_MPI_TESTS)\n  add_feature_info(\"MPI tests\" MADNESS_HAS_MPI_TESTS \"MPI tests with multiple processes are configured (use MADNESS_MPI_NODE_OPTIONS at runtime to control execution)\")\nendif()\n\nfeature_summary(WHAT ALL\n                DESCRIPTION \"=== MADNESS Package/Feature Info ===\")\n\n"
  },
  {
    "path": "INSTALL.md",
    "content": "## Introduction\n\nLinux and MacOS are supported with x86, Arm64, and IBM Power processors. GPUs are not yet utilized.\n\nMADNESS uses CMake to configure the build. Assuming that necessary prerequisites (below) are installed on your system in default locations and the source has been downloaded into the directory `/path/to/madness/source`, you can make a directory (outside the source tree) to build in and configure the build as follows\n```\nmkdir build\ncd build\ncmake /path/to/madness/source\nmake applications\n```\nThe default make target builds only the numerical library and underlying runtime.  To build applications (e.g., `moldft`, `nemo`) specify either `applications` (for all of them) or the name of the desired application on the make command.  The target `everything` does what you expect. You can run executables and use libraries from the build directory, but to install into the default location (`/usr`) use `make install` (after first building the applications).\n\nIf required libraries are not in default locations or if you wish to override defaults, you may have to set CMake cache variables as described below.  For instance, to build a debug version, without MPI, and with installation in `/home/me/madinstall`\n```\ncmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_MPI=OFF -DCMAKE_INSTALL_PREFIX=/home/me/madinstall /path/to/madness/source\nmake applications\nmake install\n```\n\n\nBoolean values for cache variables (specified to CMake using the `-DVARIABLE_NAME` notation in the example above) are \nconsidered true if the constant is 1, ON, YES, TRUE, Y, or a non-zero number; or false if the constant is 0, OFF, NO, FALSE, N, or IGNORE.\n\n## Prerequisites\n\nFast BLAS and linear algebra libraries are essential. These must be sequential (single thread) implementations since MADNESS uses tasks/threads for parallelism and invokes the BLAS within a single-threaded task.  On X86, we recommend the free [Intel MKL library](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html#gs.8bsxug), which is auto detected on all platforms if the environment variable `MKLROOT` is set.  On MacOS, the Apple [Accelerate](https://developer.apple.com/documentation/accelerate) framework (installed as part of [Xcode](https://developer.apple.com/xcode/)) is also autodetected.  AMD ACML has not been tested in a while but can be enabled with the CMake variables below.  Other libraries need to have their link (and possibly also header) paths and flags provided in the CMake variables for the compiler and linker.  On ARM, we recommend the ARM performance library available with their optimized LLVM compiler and enabled with the `-armpl`` compiler+linker flag. The OpenBLAS libary for ARM (not on x86) had a major peformance problem when we last tested it in circa 2020 due to a mutex around a memory block shared by all threads (this issue was reported and might be fixed by now).\n\nAn MPI library is required by default, and should be autodected primarily by looking for the `mpicxx` command to compile C++ code with MPI.  If you wish to overide this, use the appropriate cmake or environment variables (below).  You can also disable use of MPI using `-DENABLE_MPI=OFF` --- in this case you can still use all cores within a shared memory computer.\n\nMADNESS will autodetect the [Intel TBB library](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onetbb.html#gs.8byhgg), which is available for free from Intel or via standard Linux package managers (even on ARM).  TBB provides a fast task pool.  If this is not detected, MADNESS will employ its own task pool.  [PaRSEC](https://icl.utk.edu/parsec/) can also be used (see variables below) but is not recommended unless you are using MADNESS with the [Template Task Graph](https://github.com/TESSEorg/ttg).\n\n### Minimal Ubuntu packages \n\nIf you are using a different distribution, just change the name of the command to install packages.\n\nFrom a vanilla desktop install of Ubuntu (tested with 23.0.4) \n```\n   sudo apt install build-essential cmake gcc g++ git intel-mkl mpich \n```\nIf you want to build the documentation then also\n```\n   sudo apt install doxygen graphviz texlive\n```\n\n### Minimal MacOS packages\n\nTo be written\n\n\nThe below summarizes some of the most useful CMake variables.\n\n## Compiler variables\n\nThe following CMake cache variables are used to specify the compilers, compiler\nflags, and linker flags.\n\n* CMAKE_C_COMPILER --- C compiler [default=search]\n* CMAKE_CXX_COMPILER --- C++ compiler [default=search]\n* CMAKE_ASM_COMPILER --- Assembly compiler [default=search]\n* MPI_CXX_COMPILER --- MPI C++ compiler wrapper [default=search]\n* MPI_C_COMPILER --- MPI C compiler wrapper [default=search]\n      \nYou can specify compile flags with the following variables. These cache variables\nare optional, and it is typically not necessary to specify these variables.\n\n* CMAKE_C_FLAGS --- Compile flags passed to the C compiler\n* CMAKE_CXX_FLAGS --- Compile flags passed to the C++ compiler\n* CMAKE_EXE_LINKER_FLAGS --- Linker flags to be used to create executables.\n* CMAKE_STATIC_LINKER_FLAGS --- Linker flags to be used to create static \n      libraries.\n* CMAKE_SHARED_LINKER_FLAGS --- Linker flags to be used to create shared \n      libraries.\n\n## Build options\n\nThe following CMake cache variables turn features on and off.\n\n* CMAKE_BUILD_TYPE --- Debug or Release\n* ENABLE_GENTENSOR --- Enable generic tensors; only useful if need\n                       compressed 6-d tensors, e.g. in MP2 [default=OFF]\n* ENABLE_TASK_PROFILER - Enable task profiler that collects per-task start and \n      stop times. [default=OFF]\n* ENABLE_WORLD_PROFILE --- Enables world profiling [default=OFF]\n* ENABLE_MEM_STATS --- Gather memory statistics (expensive) (default=OFF)\n* ENABLE_TENSOR_BOUNDS_CHECKING --- Enable checking of bounds in tensors ... \n      slow but useful for debugging [default=OFF]\n* ENABLE_TENSOR_INSTANCE_COUNT --- Enable counting of allocated tensors for \n      memory leak detection [default=OFF]\n* ENABLE_SPINLOCKS --- Enables use of spinlocks instead of mutexes (faster \n      unless over subscribing processors) [default=ON]\n* ENABLE_NEVER_SPIN --- Disables use of spinlocks (notably for use inside\n      virtual machines [default=OFF]\n* ENABLE_BSEND_ACKS --- Use MPI Send instead of MPI Bsend for huge message \n      acknowledgements [default=ON]\n* BUILD_TESTING --- Enables unit tests targets [default=ON]\n* FORTRAN_INTEGER_SIZE --- Set the fortran integer size (4 or 8 bytes) used for \n      BLAS and LAPACK function calls [default=4]\n* ASSERTION_TYPE --- Define MADNESS assertion behavior\n      (abort|assert|disable|throw) [default=throw]\n* MPI_THREAD --- Thread level for MPI (multiple|serialized)\" [default=multiple]\n* BUILD_SHARED_LIBS --- Enable shared libraries. This option is only available\n      if the platform supports shared libraries; if that's true and MADNESS_ASSUMES_ASLR_DISABLED is ON (see below) the default is ON,\n      otherwise the default is OFF.\n* MADNESS_BUILD_MADWORLD_ONLY --- whether to build the MADNESS runtime only; if `ON`, discovery of BLAS/LAPACK\n      and building of numerical components and applications will be disabled [default=`OFF`]\n* MADNESS_BUILD_LIBRARIES_ONLY --- whether to build the MADNESS libraries only; if `ON`,\n      building of numerical components and applications will be disabled and\n      the value of `MADNESS_BUILD_MADWORLD_ONLY` ignored [default=`OFF`]\n\n## External libraries\n\nThe following CMake cache variables enable the use of external libraries with\nMADNESS. If the WITH_* variable is set to \"ON\" by default, failure to find the\nexternal library is not an error. If you explicitly set a WITH_* variable to \n\"ON\" when the default is set to \"OFF,\" an error will occur if the library is\nnot found.\n\n* CMAKE_PREFIX_PATH - A semicolon seperated list of paths that are used when \n      searching for external libraries and dependencies. You may use this CMake\n      cache variable to specify the prefix for any of the dependencies, or you\n      may specify path for individual components below.\n\n* ENABLE_MPI --- Enable use of MPI, should specify MPI_CXX_COMPILER or MPI_C_COMPILER\n                 explicitly or have them in PATH; if not found will use StubMPI and\n                 be limited to 1 process [default=ON]\n\nIn the following section, each optional library privides four variables that\nthe user can use to enable cmake to find the correct dependencies: \n  * ENABLE_<LIB> --- Enable the library feathres (ON|OFF)\n  * <LIB>_ROOT_DIR --- Prefix path used to search for the external library.\n  * <LIB>_INCLUDE_DIR --- The external library include path. By default the\n        include path is ${<LIB>_ROOT_DIR}/include, if <LIB>_ROOT_DIR is\n        specified in the configure command.\n  * <LIB>_LIBRARY --- The external library path. By default the\n        include path is ${<LIB>_ROOT_DIR}/(lib64|lib), if <LIB>_ROOT_DIR is\n        specified in the configure command.\nIf the <LIB>_ROOT_DIR, <LIB>_INCLUDE_DIR, and <LIB>_LIBRARY will be used to\nsearch for specific dependencies. If the external library is not found in these\ngiven paths, or if the paths are not given, CMake will search the paths in \nCMAKE_PREFIX_PATH as well as other system paths.\n\n### Library of Exchange-Correlation DFT functionals (LIBXC):\n\nMADNESS can look for LibXC built/installed using CMake by default. You can help MADNESS find\nLibXC by providing hints to `find_package()`, e.g., by adding the installation prefix of LibXC to `CMAKE_PREFIX_PATH`.\nTo disable search for LibXC configure with `ENABLE_LIBXC=OFF`.\n\nE.g.,\n```\ncmake -DENABLE_LIBXC=ON -DCMAKE_PREFIX_PATH=/home/rjh/install ../madness\n```\n\n### Intel Threading Building Blocks (TBB):\n\n* Define MADNESS_TASK_BACKEND=TBB --- this should auto detect TBB if it is installed in a standard location.  If it is not, you'll have to also define\n  * TBB_ROOT_DIR --- The install prefix for TBB.  If TBB_ROOT_DIR is not given, it will be set to the value of the TBBROOT environment variable if it is set.  And if `cmake` still does not detect things you can set\n  * TBB_INCLUDE_DIR --- The path to the TBB include directory\n  * TBB_LIBRARY --- The path to the TBB library directory. By default, the library\n      search path is ${TBB_ROOT_DIR}/(lib/intel64/gcc4.4|lib) on Linux and\n      ${TBB_ROOT_DIR}/(lib/libc++|lib) on OS X, if TBB_ROOT_DIR is specified in\n      the configure command.\n  * Optionally, MADNESS_EXPLOIT_TBB_PRIORITY --- If ON, MADNESS will try to use Intel TBB task priorities [default=OFF]\n\n\n### Intel Math Kernel Library (MKL):\n\n* ENABLE_MKL --- Search for Intel MKL for BLAS and LAPACK support [default=ON]\n* MKL_ROOT_DIR --- The install prefix for MKL.\n* MKL_LIBRARY --- The path to the MKL library directory.\n\nIf MKL_ROOT_DIR is not given, it will be set to the value of the MKLROOT environment variable if it is set.\n\n### AMD Core Math Library (ACML):\n\n*This is out of date since ACML is now AOCL.*\n\n* ENABLE_ACML --- Search for AMD math library for BLAS and LAPACK support\n      [default=ON]\n* ACML_ROOT_DIR --- The install prefix for ACML.\n* ACML_LIBRARY --- The path to the ACML library directory.\n\n### Google Performance Tools (Gperftools):\n\n* ENABLE_GPERFTOOLS --- Enable use of gperftools, including tcmalloc.\n      [default=OFF]\n* ENABLE_TCMALLOC_MINIMAL --- Enable use of the minimal tcmalloc library only.\n      [default=OFF]\n* GPERFTOOLS_ROOT_DIR --- The install prefix for gperftools.\n* GPERFTOOLS_INCLUDE_DIR --- The path to the gperftools include directory.\n* GPERFTOOLS_LIBRARY --- The path to the gperftools library directory.\n\nIf GPERFTOOLS_ROOT_DIR is not given, it will be set to the value of the GPERFTOOLS_DIR environment variable if it is set.\n\n### Libunwind:\n\n* ENABLE_LIBUNWIND --- Force detection of gperftools [default=OFF, i.e. Libunwind will be searched for when needed]\n* LIBUNWIND_DIR --- The install prefix for Libunwind.\n\nIf LIBUNWIND_DIR is not given, it will be set to the value of the LIBUNWIND_DIR environment variable if it is set.\n\n### IntegratorXX for numerical integration via DFT grids\n* ENABLE_INTEGRATORXX --- Enables use of IntegratorXX\n* INTEGRATORXX_ROOT_DIR --- The install prefix for IntegratorXX\n* INTEGRATORXX_INCLUDE_DIR --- The path to the IntegratorXX include directory (should be added automatically when the correct PCM_ROOT_DIR is given)\n\nIntegratorXX is a library for numerical integration via DFT grids. It is used in the MP3 code of Madness for \ngenerating low-rank representations of 6D functions. \nIf IntegratorXX absent, a Gaussian-distributed random grid will be used, leading to slightly varying results in \ndifferent MP3 runs.\n\n\n### Polarizable Conitinuum Solver (PCM):\n\n* ENABLE_PCM --- Enables use of PCM\n* PCM_ROOT_DIR --- The install prefix for PCM \n* PCM_INCLUDE_DIR --- The path to the PCM include directory (should be added automatically when the correct PCM_ROOT_DIR is given)\n* PCM_LIBRARY --- The path to the PCM library (should be added automatically when the correct PCM_ROOT_DIR is given)\nset either PCM_ROOT_DIR or manually set PCM_INCLUDE_DIR and PCM_LIBRARY\nSee also\nmadness/CMakeLists.txt\nmadness/external/pcm.cmake\nmadness/modules/FindPCM.cmake\nmadness/src/apps/chem/CMakeLists.txt\n\n### Performance Application Programming Interface (PAPI):\n\n* ENABLE_PAPI --- Enables use of PAPI [default=OFF]\n* PAPI_ROOT_DIR --- The install prefix for PAPI.\n* PAPI_INCLUDE_DIR --- The path to the PAPI include directory.\n* PAPI_LIBRARY --- The path to the PAPI library directory.\n\n### Elemental parallel linear algebra library:\n\n*This has not been tested in some time.*\n      \nElemental provides optional distributed-memory linear algebra for some MADNESS application codes.\nMADNESS source includes (modified) Elemental v0.84, which has been validated to work with\nthe few MADNESS apps that can use Elemental. You can instruct MADNESS to download and compile\na more recent version of Elemental, if desired, but the apps will not use Elemental then.\nSuch bundling is currently necessary if your code uses the MADworld runtime AND Elemental because\nmadness::initialize will call El::initialize() .\n\n* ENABLE_ELEMENTAL --- Enable Elemental [default=OFF].\n* ELEMENTAL_TAG --- specifies the version of Elemental to be downloaded, compiled, and installed alongside\n                    MADNESS (numerical codes of MADNESS will not use Elemental).\n                    If not set, will use the included Elemental source.\n\n### Parallel Runtime Scheduling and Execution Controller (PaRSEC):\n\nRecommended only for TTG development.\n\n* ENABLE_PARSEC --- Enables use of PaRSEC as the task scheduler [default=OFF]. The use of Intel TBB should be disabled\n                    to use PaRSEC.\n\nIf ENABLE_PARSEC is set but PaRSEC is not found, it will be built from source.\n    \n## MADNESS Runtime and the Address Space Layout Randomization (ASLR)\n\nIf you can run with one process and are getting almost immediate segmentation violations with more processes, this might be the issue.\n\nASLR (Linux relevant documentation [here](https://linux-audit.com/linux-aslr-and-kernelrandomize_va_space-setting/))\nis a standard technique for increasing platform security implemented by the OS kernel and/or\nthe dynamic linker. By randomizing both where the shared libraries are loaded as well as (when enabled) the absolute\nposition of the executable in memory (such executables are known as position-independent executables). Until recently\nMADNESS could only be used with MPI on platforms with ASLR if built with static libraries (for MADNESS code; system and other libraries could still be shared).  However, static libraries make it hard to integrate with Python and other frameworks that demand shared libraries. \n\nIf properly configured and built, MADNESS can now be used on ASLR platforms using either static (the default and easiest) or shared libraries. Use the following variables to control the ASLR-related aspects of MADNESS runtime.\n\n* MADNESS_ASSUMES_ASLR_DISABLED --- MADNESS runtime will assume that the Address Space Layout Randomization (ASLR) is off.\n      By default MADNESS_ASSUMES_ASLR_DISABLED is set to OFF (i.e. MADNESS will assume that ASLR is enabled);\n      this will cause all libraries by default to be static (BUILD_SHARED_LIBS=OFF)\n      and compiled as position-independent code (CMAKE_POSITION_INDEPENDENT_CODE=ON).\n      This will also enable a runtime check for ASLR.\n* CMAKE_POSITION_INDEPENDENT_CODE --- This standard CMake variable controls whether targets are compiled by default\n      as position-independent code or not. If BUILD_SHARED_LIBS=OFF need to set this to ON if want to use the MADNESS\n      libraries to build shared libraries or position-independent executables.\n\nTo make things more concrete, consider the following 2 scenarios:\n* Platform with ASLR disabled --- set MADNESS_ASSUMES_ASLR_DISABLED=ON to set defaults correctly and enable the ASLR check.\n      BUILD_SHARED_LIBS can be set to ON (to produce shared libraries, e.g. to save space) or to OFF to\n      produce static libraries. If the static libraries will be linked into shared libraries set\n      CMAKE_POSITION_INDEPENDENT_CODE=ON, otherwise CMAKE_POSITION_INDEPENDENT_CODE will be set to OFF for maximum efficiency\n      of function calls.\n* Platform with ASLR enabled --- this is the default. Setting BUILD_SHARED_LIBS=ON in this scenario will produce\n      executables that can only be safely used with 1 MPI rank, thus BUILD_SHARED_LIBS will be defaulted to OFF (i.e.\n      MADNESS libraries will be build as static libraries). CMAKE_POSITION_INDEPENDENT_CODE is by default set to ON,\n      thus MADNESS libraries can be linked into position-independent executables safely. MADNESS libraries can also be\n      linked into a shared library and used with more than 1 MPI rank, provided that *ALL* code using MADNESS is part of the *SAME* shared library.\n      E.g. to link MADNESS into a Python module compile MADNESS and all libraries using MADNESS as shared libraries\n      (with CMAKE_POSITION_INDEPENDENT_CODE=ON) and link them all together into a single module.\n\n## Warning about fast memory allocators\n\nSummary: Only use fast memory allocators if you are using just 1 MPI process or have configured without MPI.\n\nDepending on the calculation and the number of threads being used, MADNESS can receive about a 10% or even more speedup from fast memory allocators such as tcmalloc, jemalloc, tbbmalloc, etc.  However, these **do not work with MPI over InfiniBand** and probably most other transport layers.  It can appear to work, and then fail with either wrong numbers or MPI errors. The reason is that IB requires that memory be pinned and hence MPI introduces its own memory allocator(s) to manage this.  By overriding the allocator, you will break the guarantee that memory is pinned.  \n\n## Toolchain files\n\n**Use of these files is now deprecated --- configuration should usually work without this.**  However, they can be useful if all else fails or on \"bleeding-edge\" supercomputers with non-standard software environments.\n\nMADNESS provides toolchain files for select systems. They contain the platform specific settings\nneccessary to build on the given platform. The toolchain files are included with\nthe MADNESS source in the cmake/toolchains directory.\n\n* CMAKE_TOOLCHAIN_FILE --- Specifies the path (including the file name) to the\n      toolchain file.\n\nFor example, to specify the toolchain file for Mira:\n\n    $ cmake -D CMAKE_TOOLCHAIN_FILE=/path/to/madness/source/cmake/toolchains/mira-gcc-essl.cmake \\\n        /path/to/madness/source\n    \n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (C) 1989, 1991 Free Software Foundation, Inc.\n59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\nEveryone is permitted to copy and distribute verbatim copies\nof this license document, but changing it is not allowed.\n\nPreamble\n\nThe licenses for most software are designed to take away your\nfreedom to share and change it. By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users. This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it. (Some other Free Software Foundation software is covered by\nthe GNU Library General Public License instead.) You can apply it to\nyour programs, too.\n\nWhen we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\nTo protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\nFor example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have. You must make sure that they, too, receive or can get the\nsource code. And you must show them these terms so they know their\nrights.\n\nWe protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\nAlso, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware. If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\nFinally, any free program is threatened constantly by software\npatents. We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary. To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\nThe precise terms and conditions for copying, distribution and\nmodification follow.\n\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License. The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage. (Hereinafter, translation is included without limitation in\nthe term \"modification\".) Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope. The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License. (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole. If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works. But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code. (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it. For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable. However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License. Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n5. You are not required to accept this License, since you have not\nsigned it. However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works. These actions are\nprohibited by law if you do not accept this License. Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions. You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all. For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices. Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded. In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number. If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation. If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission. For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this. Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\nNO WARRANTY\n\n11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\nEND OF TERMS AND CONDITIONS\n"
  },
  {
    "path": "README.md",
    "content": "MADNESS\n=======\n\nMultiresolution Adaptive Numerical Environment for Scientific Simulation\n\n# Summary\n\nMADNESS provides a high-level environment for the solution of integral and differential equations in many dimensions using adaptive, fast methods with guaranteed precision based on multi-resolution analysis and novel separated representations. \n\nThere are three main components to MADNESS. At the lowest level is a new petascale parallel programming environment that increases programmer productivity and code performance/scalability while maintaining backward compatibility with current programming tools such as MPI and Global Arrays. The numerical capabilities built upon the parallel tools provide a high-level environment for composing and solving numerical problems in many (1-6+) dimensions. \n\nFinally, built upon the numerical tools are new applications with initial focus upon chemistry, atomic and molecular physics, material science, and nuclear structure.\n\nUser documentation can be found on [readthedocs](https://madness.readthedocs.io/en/latest/).\n\nDeveloper documentation generated by doxygen can be found [here](https://m-a-d-n-e-s-s.github.io/madness/api-doc/).\n\n## Python bindings\n\n**[pymadness](src/pymadness/README.md)** provides Python bindings for MADNESS, exposing `Function<T,NDIM>` (1D–6D), integral operators, and derivatives to Python. Build with `cmake -DENABLE_PYTHON=ON`.\n\nHere's a [video](http://www.youtube.com/watch?v=dBwWjmf5Tic) about MADNESS.\n\n# Projects using MADNESS\n\nA non-exhaustive list of downstream projects built on MADNESS:\n\n* [TiledArray (TA)](https://github.com/ValeevGroup/tiledarray) — massively-parallel block-sparse tensor framework; consumes the MADNESS parallel runtime (MADWorld).\n* [MPQC](https://github.com/ValeevGroup/mpqc) — Massively Parallel Quantum Chemistry program; uses the MRA layer (`Function<T,NDIM>`, operators) and MADWorld through TA.\n* [Tequila](https://github.com/tequilahub/tequila) — quantum-algorithm development framework; uses MADNESS for classical chemistry back-ends.\n* [FrayedEnds](https://github.com/FabianLangkabel/FrayedEnds) — correlated electronic-structure code built on MADNESS MRA.\n\n# Funding\n\nThe developers gratefully acknowledge the support of:\n\n* The Department of Energy, Office of Science, Office of Basic Energy Sciences  \"Numerically-Exact Relativistic ManyBody Electronic Structure of Heavy Elements\" grant DE-SC0022327 ((Valeev, Virginia Tech, PI).\n\n* The EPEXA project, currently supported by the National Science Foundation under grants 1931387 at Stony Brook University, 1931347 at Virginia Tech, and 1931384 at the University of Tennesse, Knoxville.\n\n* The TESSE project, supported by the National Science Foundation under grants 1450344 at Stony Brook University, 1450262 at Virginia Tech, and 1450300 at the University of Tennesse, Knoxville.\n\n* The Department of Energy, Office of Science, Office of Basic Energy Sciences and Office of Advanced Scientific Computing Research, under contract DE-AC05-00OR22725 with Oak Ridge National Laboratory.\n\n* The National Science Foundation under grant 0509410 to the University of Tennessee in collaboration with The Ohio State University (P. Sadayappan). The MADNESS parallel runtime and parallel tree-algorithms include concepts and software developed under this project.\n\n* The National Science Foundation under grant NSF OCI-0904972 to the University of Tennessee. The solid state physics and multiconfiguration SCF capabilities are being developed by this project.\n\n* The National Science Foundation under grant NSF CHE-0625598 to the University of Tennessee, in collaboration with UIUC/NCSA. Some of the multi-threading and preliminary GPGPU ports were developed by this project.\n\n* The Defense Advanced Research Projects Agency (DARPA) under subcontract from Argonne National Laboratory as part of the High-Productivity Computer Systems (HPCS) language evaluation project.\n"
  },
  {
    "path": "_config.yml",
    "content": "theme: jekyll-theme-slate"
  },
  {
    "path": "admin/conda/README.md",
    "content": "# Conda Packaging for MADNESS\n\nConda packages are built and uploaded to [anaconda.org/m-a-d-n-e-s-s](https://anaconda.org/m-a-d-n-e-s-s) automatically via GitHub Actions.\n\n## Available Packages\n\n| Package | MPI | Install command |\n|---------|-----|-----------------|\n| `madness` | no | `conda install -c m-a-d-n-e-s-s madness` |\n| `madness-mpi` | Open MPI (from conda-forge) | `conda install -c m-a-d-n-e-s-s -c conda-forge madness-mpi` |\n\nBoth packages are built for Linux and macOS.\n\nThe **no-MPI** variant is the simplest option for single-node workstation use.\n\nThe **MPI variant** uses OpenMPI from conda-forge and is suitable for workstations and small clusters. Note that the conda-provided OpenMPI uses TCP networking and will not take advantage of high-performance interconnects (InfiniBand, Cray Aries, etc.).\n\n**For HPC clusters**: expert users who need optimal performance should build MADNESS from source to take full advantage of their hardware (native MPI, vendor-tuned BLAS/LAPACK, InfiniBand, etc.). See the main project README for build instructions.\n\n## Conda Recipe\n\nThe conda recipe lives in `/conda-recipe/` and consists of:\n\n- **`meta.yaml`** — Package metadata, dependencies, and build configuration. Uses Jinja templating with `GIT_DESCRIBE_TAG` for versioning and `MPI_VARIANT` to control MPI support. Conditional selectors (`# [mpi == 'openmpi']`) toggle MPI dependencies.\n- **`build.sh`** — Build script invoked by `conda build`. Runs the full CMake build inside the conda environment using conda-forge compilers and installs activation scripts that set `MRA_DATA_DIR` and `MRA_CHEMDATA_DIR`.\n\n## Automated Workflow\n\nThe workflow is defined in `/.github/workflows/conda-deploy.yml`. It runs automatically when:\n- The CI tests pass on `master` (triggered after the \"Linux/MacOS Build\" workflow succeeds)\n- A version tag (`v*`) is pushed\n- Manually via `workflow_dispatch`\n\nFor each trigger, four packages are built and uploaded (2 platforms x 2 MPI variants). Build artifacts are also saved as GitHub workflow artifacts.\n\nUntagged builds on `master` produce development versions like `0.10.1.dev20260325+abcd1234`. Tagged releases produce clean version numbers (see below).\n\n## Creating a Release with a Clean Version Number\n\n1. Update the version in `CMakeLists.txt` if needed:\n   ```cmake\n   set(MADNESS_MAJOR_VERSION 0)\n   set(MADNESS_MINOR_VERSION 10)\n   set(MADNESS_MICRO_VERSION 2)\n   ```\n\n2. Commit the version bump:\n   ```\n   git commit -am \"Bump version to 0.10.2\"\n   ```\n\n3. Create and push a tag:\n   ```\n   git tag v0.10.2\n   git push origin master --tags\n   ```\n\nThe tag triggers the conda deploy workflow directly, producing packages with version `0.10.2`.\n\n## Setup Requirements\n\nThe workflow requires an **Anaconda.org API token** stored as a GitHub repository secret:\n\n1. Go to [anaconda.org](https://anaconda.org) and log in to the `m-a-d-n-e-s-s` organization\n2. Navigate to Settings > Access and generate an API token with upload (write) permissions\n3. In the GitHub repository, go to Settings > Secrets and variables > Actions\n4. Add a new secret named `ANACONDA_TOKEN` with the token value\n\n## Manual Build (Legacy)\n\nThe `Makefile.in` and `recipe/` directory contain the original manual workflow. To use it:\n\n1. Configure MADNESS with CMake (this generates `admin/conda/Makefile` from `Makefile.in`)\n2. In the build directory's `admin/conda/`, run `make`\n3. Upload manually:\n   ```\n   anaconda login\n   anaconda upload /path/to/madness-*.tar.bz2\n   ```\n"
  },
  {
    "path": "admin/conda/recipe/meta.yaml.in",
    "content": "{% set name = \"madness\" %}\n{% set version = \"0.10.1\" %}\n\npackage:\n  name: \"{{ name|lower }}\"\n  version: \"{{ version }}\"\n\n\nsource:\n  url: \"@CMAKE_BINARY_DIR@/admin/conda/madness-conda.tar\"\n\n"
  },
  {
    "path": "admin/docker/README.md",
    "content": "# What\nThis repo contains scripts for building MADNESS containers usable for running applications and for development.\n\n# How\n- Authenticate with Docker Hub: `docker login -u <docker.com username>`\n- Build and push: `cd docker-images && make push/all`\n"
  },
  {
    "path": "admin/docker/images/Makefile",
    "content": "repo = rjharrison\nlatest ?= 22.04\nALL = ${repo}/ubuntu\\:22.04\n\n${repo}/ubuntu\\:%: build = docker build --build-arg ubuntuImage=ubuntu:$* -f ../ubuntu/Dockerfile ../ubuntu/\n\n${repo}/ubuntu: ${repo}/ubuntu\\:${latest}\n\tdocker tag ${repo}/ubuntu:${latest} $@\n\n${repo}/ubuntu\\:%:\n\t${build} -t $@\n\n${repo}/ubuntu\\:%.tar:\n\tmkdir -p ${repo}\n\tDOCKER_BUILDKIT=1 ${build} -o - > $@\n\nall: ${ALL} ${repo}/ubuntu\n\nall/tar: $(ALL:%=%.tar)\n\npush/%: ${repo}/ubuntu\\:%\n\tdocker push $?\n\npush/all: push/22.04\n"
  },
  {
    "path": "admin/docker/ubuntu/Dockerfile",
    "content": "ARG ubuntuImage\nFROM ${ubuntuImage}\n\nRUN apt-get update && \\\n    DEBIAN_FRONTEND=noninteractive apt-get install -y locales && \\\n    locale-gen \"en_US.UTF-8\" && \\\n    update-locale LANG=en_US.UTF-8\n\nENV LANGUAGE en_US:en\nENV LANG en_US.UTF-8 \nENV LC_ALL en_US.UTF-8\n\n# NB to enable nvidia docker runtime *with* --runtime nvidia\nENV NVIDIA_VISIBLE_DEVICES all\n\nRUN mkdir -p /home/m-a-d-n-e-s-s/\nCOPY ./Makefile /home/m-a-d-n-e-s-s/\nWORKDIR /home/m-a-d-n-e-s-s/\n\nRUN DEBIAN_FRONTEND=noninteractive \\\n    apt-get -yq update && \\\n    apt-get -yq install make wget curl\n\n# main, cmake, clang\nRUN make install/main && \\\n    make install/cmake && \\\n    make install/clang && \\\n    apt-get clean\n\n# Add MKL repo, download\nRUN make apt-add-repository/intel-mkl && \\\n    make download/intel-mkl && \\\n    make install/intel-mkl\n\n# build MADNESS\nRUN make build/madness\n\n\n"
  },
  {
    "path": "admin/docker/ubuntu/Makefile",
    "content": "ubuntu_codename ?= $(shell lsb_release -sc)\nclang_version ?= 13\n\nexport DEBIAN_FRONTEND=noninteractive\n\nubuntu_release = $(shell lsb_release -sr)\n\nintel_mkl_version ?= 2020.4-304\nintel_mkl := intel-mkl-\\*-${intel_mkl_version}\n\ninstall/main:\n\tapt-get update\n\tapt-get -yq install \\\n          lsb-release coreutils sudo bash-completion \\\n          apt-transport-https software-properties-common ca-certificates gnupg \\\n          linux-tools-common time pciutils \\\n          build-essential wget curl \\\n          git make ninja-build \\\n          gcc g++ gfortran gdb valgrind \\\n          libeigen3-dev \\\n          libblas-dev liblapack-dev liblapacke-dev \\\n          libunwind-dev libtbb-dev libomp-dev \\\n          libopenmpi-dev openmpi-bin libscalapack-openmpi-dev \\\n          libxc-dev \\\n          python3 python3-pip python3-numpy python3-dev python3-pytest \\\n          vim emacs-nox ccache\n\ninstall/docker:\n\tsudo apt-get install docker.io\n\ninstall/g++-%:\n\tapt-get -yq install gcc-$* g++-$* gfortran-$*\n\ninstall/add-apt-repository:\n\tapt-get update\n\tapt-get -yq install software-properties-common\n\n# CMake\ninstall/cmake:\n\twget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add -\n\tapt-add-repository \"deb https://apt.kitware.com/ubuntu/ ${ubuntu_codename} main\"\n\tapt-get -yq update\n\tapt-get -yq install cmake cmake-curses-gui\n\n\n# LLVM\ninstall/clang-%:\n\twget https://apt.llvm.org/llvm-snapshot.gpg.key -O - | apt-key add -\n\tadd-apt-repository \"deb http://apt.llvm.org/${ubuntu_codename}/ llvm-toolchain-${ubuntu_codename}-$* main\"\n\tapt-get -yq update\n\tapt-get -yq install clang-$* libomp-$*-dev\n\ninstall/clang: install/clang-${clang_version}\n\n\n# Intel\napt-add-repository/intel-mkl:\n\twget -O - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | apt-key add -\n\tapt-add-repository \"deb https://apt.repos.intel.com/mkl all main\"\n\tapt-get -yq update\n\ndownload/intel-mkl:\n\tapt-get install -yq --download-only ${intel_mkl}\n\ninstall/intel-mkl:\n\tapt-get -yq install ${intel_mkl}\n\trm -rf /opt/intel/mkl\n\tln -s /opt/intel/compilers_and_libraries_$(subst -,.,${intel_mkl_version})/linux/mkl /opt/intel/mkl\n\ttest -x /opt/intel/mkl/bin/mklvars.sh\n\n# MADNESS\nbuild/madness:\n\tgit clone https://github.com/m-a-d-n-e-s-s/madness /home/m-a-d-n-e-s-s/source\n\tMKLROOT=/opt/intel/mkl cmake -S /home/m-a-d-n-e-s-s/source -B /home/m-a-d-n-e-s-s/build -GNinja -DCMAKE_INSTALL_PREFIX=/home/m-a-d-n-e-s-s/install\n\tcmake --build /home/m-a-d-n-e-s-s/build --target applications-madness\n\tcmake --build /home/m-a-d-n-e-s-s/build --target install\n\n"
  },
  {
    "path": "admin/docker/ubuntu/sudoers",
    "content": "#\n# This file MUST be edited with the 'visudo' command as root.\n#\n# Please consider adding local content in /etc/sudoers.d/ instead of\n# directly modifying this file.\n#\n# See the man page for details on how to write a sudoers file.\n#\nDefaults\tenv_reset\nDefaults\tmail_badpass\nDefaults\tsecure_path=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin\"\n\n# Host alias specification\n\n# User alias specification\n\n# Cmnd alias specification\n\n# User privilege specification\nroot\tALL=(ALL:ALL) ALL\n\n# Members of the admin group may gain root privileges\n%admin ALL=(ALL) ALL\n\n# Allow members of group sudo to execute any command\n%sudo\tALL= (ALL:ALL) NOPASSWD: ALL\n\n# See sudoers(5) for more information on \"#include\" directives:\n\n#includedir /etc/sudoers.d\n"
  },
  {
    "path": "bin/latex2oo",
    "content": "#!/bin/csh\n\n# This sed script partially automates the conversion\n# from latex to openoffice focussing on the equations.\n\nsed \\\n    -e 's,\\\\begin{array}, matrix { ,g'   \\\n    -e 's,\\\\begin{eqnarray}, matrix { ,g'   \\\n    -e 's,\\\\begin{eqnarray\\*}, matrix { ,g' \\\n    -e 's,\\\\end{array}, } ,g'  \\\n    -e 's,\\\\end{eqnarray}, } ,g'  \\\n    -e 's,\\\\end{eqnarray\\*}, } ,g' \\\n    -e 's,\\\\left(, left ( ,g' \\\n    -e 's,\\\\right), right ) ,g' \\\n    -e 's,\\\\left\\\\lfloor, left lfloor ,g' \\\n    -e 's,\\\\right\\\\rfloor, right rfloor,g' \\\n    -e 's,\\\\left\\\\|, left ldline ,g' \\\n    -e 's,\\\\right\\\\|, right rdline ,g' \\\n    -e 's,\\\\left|, left lline ,g' \\\n    -e 's,\\\\right|, right rline ,g' \\\n    -e 's,\\\\left\\., left none ,g' \\\n    -e 's,\\\\right\\., right none ,g' \\\n    -e 's,& = &, # \"=\" # alignl ,g'  \\\n    -e 's,&=&, # \"=\" # alignl ,g'  \\\n    -e 's,\\\\asterisk, \"*\" ,g' \\\n    -e 's,\\\\dagger, %dagger ,g' \\\n    -e 's,\\\\ldots, dotslow ,g' \\\n    -e 's,\\\\alpha, %alpha ,g' \\\n    -e 's,\\\\beta, %beta ,g' \\\n    -e 's,\\\\gamma, %gamma ,g' \\\n    -e 's,\\\\delta, %delta ,g' \\\n    -e 's,\\\\epsilon, %epsilon ,g' \\\n    -e 's,\\\\mu, %mu ,g' \\\n    -e 's,\\\\nu, %nu ,g' \\\n    -e 's,\\\\omega, %omega ,g' \\\n    -e 's,\\\\tau, %tau ,g' \\\n    -e 's,\\\\phi, %phi ,g' \\\n    -e 's,\\\\psi, %psi ,g' \\\n    -e 's,\\\\sigma, %sigma ,g' \\\n    -e 's,\\\\lambda, %lambda ,g' \\\n    -e 's,\\\\approx, simeq ,g' \\\n    -e 's,\\\\tmop, nitalic,g' \\\n    -e 's,\\\\text, nitalic,g' \\\n    -e 's,\\\\mathd, d,g' \\\n    -e 's,\\\\sum_, sum from ,g' \\\n    -e 's,\\\\int_, int from ,g' \\\n    -e 's,\\\\infty, infinity ,g' \\\n    -e 's,\\\\oplus, %oplus ,g' \\\n    -e 's,\\\\\\\\, ## ,g' \\\n    -e 's,\\\\nonumber,,g' \\\n    -e 's,\\\\begin{equation},,g' \\\n    -e 's,\\\\end{equation},,g' \\\n    -e 's,\\\\\\[,,g' \\\n    -e 's,\\\\\\],,g' \\\n    -e 's,\\\\sqrt,sqrt,g' \\\n    -e 's,\\\\leqslant,<=,g' \\\n    -e 's,\\\\frac,frac,g' \\\n    -e 's,\\$,,g'    \\\n    -e 's,&, # ,g' \\\n    -e 's,\\\\, ,g'\n"
  },
  {
    "path": "bin/taskprofile.pl",
    "content": "#!/usr/bin/perl\n\n#\n#  This file is part of MADNESS.\n#\n#  Copyright (C) 2012 Jinmei Zhang, Edward Valeev\n#\n#  This program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2 of the License, or\n#  (at your option) any later version.\n#\n#  This program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with this program; if not, write to the Free Software\n#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n#\n#  For more information please contact:\n#\n#  Robert J. Harrison\n#  Oak Ridge National Laboratory\n#  One Bethel Valley Road\n#  P.O. Box 2008, MS-6367\n#\n#  email: harrisonrj@ornl.gov\n#  tel:   865-241-3937\n#  fax:   865-572-0680\n#\n#  $Id$\n#\n\n&usage() if $#ARGV == -1;\n\nmy %func_counts  = ();\nmy %func_tottime = ();\nmy %func_lattime = ();\n\nmy @funcs;\nmy $run_time     = 0;\nmy $tot_tasktime = 0;\nmy %have_thread     = {};\n\n# to produce time-histograms set this to 1 and adjust the number of timeslices, if needed\nmy $make_histo        = 1;\nmy $nslices           = 100;\nmy $skip_shorter_than =\n  0.00;    # skip if task shorter than this fraction of the timeslice\n\n# use this search pattern to only include particular tasks in the running histogram\nmy %runninghisto_includes = (\n  \"all\" => \".*\"   # account all tasks \n# add additional patterns below, e.g. for ta_dgemm these are useful\n  , \"contract\" => \"contract\"\n  , \"bcasth\" => \"bcast_.*_handler\"\n  , \"bcastt\" => \"BcastTask\"\n);\n\nforeach $file (@ARGV) {\n\n\t# Open file\n\topen( INFILE, \"<$file\" ) || die \"cannot open file $file\";\n\n\t# Collect data for each task in the file\n\twhile (<INFILE>) {\n\t\ts/\\n//g;\n\t\tmy @line = split(\"\\t\");\n\n\t\t# get task data\n\t\tmy $thread        = $line[0];    # Thread that the task ran on\n\t\tmy $func_address  = $line[1];    # Address of the task function\n\t\tmy $func_name     = $line[2];    # Name of task function\n\t\tmy $func_nthreads = $line[3];    # Number of threads used by the task\n\t\tmy $func_submit   = $line[4];    # Task submit time\n\t\tmy $func_start    = $line[5];    # Task start time\n\t\tmy $func_finish   = $line[6];    # Task finish time\n\n        # mark presence of this thread\n        $have_thread{$thread} = 1;\n\n\t\t# Calculate task run time and delay time\n\t\tmy $func_time      = ( $func_finish - $func_start ) * $func_nthreads;\n\t\tmy $func_delaytime = $func_start - $func_submit;\n\n\t\t# Accumulate function statistics\n\t\tif ( $func_counts{$func_name} == 0 ) {\n\t\t\tpush( @funcs, $func_name );\n\n\t\t\t$func_counts{$func_name}  = 1;\n\t\t\t$func_tottime{$func_name} = $func_time;\n\t\t\t$func_lattime{$func_name} = $func_delaytime;\n\n\t\t}\n\t\telse {\n\t\t\t++$func_counts{$func_name};\n\t\t\t$func_tottime{$func_name} += $func_time;\n\t\t\t$func_lattime{$func_name} += $func_delaytime;\n\t\t}\n\n\t\t# Get the run time\n\t\tif ( $run_time < $func_finish ) {\n\t\t\t$run_time = $func_finish;\n\t\t}\n\n\t\t# Accumulate total function run time\n\t\t$tot_functime += $func_time;\n\t}\n\tclose INFILE;\n}\n\nprintf \"\\nWall time:       %10.6f (s)\\n\", $run_time;\nprintf \"Total task time: %10.6f (s)\\n\\n\", $tot_functime;\n\nprintf \"%40s\\n\", \"Time (s)\";\nprintf \"%-5s %7s %7s %10s  %5s   %10s\\n\", \"name\", \"counts\", \"total\", \"average\",\n  \"%\", \"latency\";\n\nforeach $func ( sort by_time ( keys(%func_tottime) ) ) {\n\tmy $counts  = $func_counts{$func};\n\tmy $tottime = $func_tottime{$func};\n\n\tmy $avgtime  = $tottime / $counts;\n\tmy $lattime  = $func_lattime{$func} / $counts;\n\tmy $perctime = $tottime / $run_time * 100;\n\tprintf \"%s\\n %10d  %10.7f %10.7f %5d   %10.7f\\n\", $func, $counts, $tottime,\n\t  $avgtime, $perctime, $lattime;\n}\n\nprint \"\\n\";\n\n#\n# time histograms\n#\nif ($make_histo) {\n\tuse POSIX;\n\tmy $timestep = $run_time / $nslices;\n\n\t# time-weighted\n\tmy @pendinghisto = ();\n\tforeach $ts ( 0 .. $nslices - 1 ) { push @pendinghisto, 0.0; }\n\tmy @inprogresshisto = ();\n\tforeach $ts ( 0 .. $nslices - 1 ) { push @inprogresshisto, 0.0; }\n\tmy %runninghistos = {};\n    foreach my $key (keys %runninghisto_includes) {\n    \tmy $values = [];\n        foreach $ts ( 0 .. $nslices - 1 ) { push @$values, 0.0; }\n        $runninghistos{$key} = $values;\n    }\n\n\t# not time-weighted\n\tmy @spawnedhisto = ();\n\tforeach $ts ( 0 .. $nslices - 1 ) { push @spawnedhisto, 0.0; }\n\tmy @startedhisto = ();\n\tforeach $ts ( 0 .. $nslices - 1 ) { push @startedhisto, 0.0; }\n\tmy @retiredhisto = ();\n\tforeach $ts ( 0 .. $nslices - 1 ) { push @retiredhisto, 0.0; }\n\n    # this is the list of tasks active for each time slice\n    # each entry is (ref to) an array of tasks active (not necessarily actively running, i.e. could be waiting for\n    # subtasks to finish)\n    my @inprogresstasks = ();\n    foreach my $slice (0 .. $nslices-1) {\n    \t$inprogresstasks[$slice] = [];\n    }\n\n\tforeach $file (@ARGV) {\n\n\t\t# Open file\n\t\topen( INFILE, \"<$file\" ) || die \"cannot open file $file\";\n\n\t\t# this will keep running tasks for each thread for deeper processing\n\t\tmy %runningtasks = {};\n\t\tforeach my $threadid (keys %have_thread) {\n\t\t\t$runningtasks{$threadid} = [];\n\t\t}\n\n\t\t# Collect data for each task in the file\n\t\twhile (<INFILE>) {\n\t\t\ts/\\n//g;\n\t\t\tmy @line = split(\"\\t\");\n\n            my $thread        = $line[0];    # Thread that the task ran on\n            my $func_name     = $line[2];    # Name of task function\n\t\t\tmy $func_nthreads = $line[3];   # Number of threads used by the task\n#\t\t\tdie(\"don't know how to handle a multithreaded task\")\n#\t\t\t  if ( $func_nthreads != 1 );\n\t\t\tmy $time_submit = $line[4];     # Task submit time\n\t\t\tmy $time_start  = $line[5];     # Task start time\n\t\t\tmy $time_finish = $line[6];     # Task finish time\n\n            my $tasklist = $runningtasks{$thread};\n\t\t\tmy $task = { \"start\" => $time_start, \"finish\" => $time_finish,\n\t\t\t\t         \"name\" => $func_name, \"thread\" => $thread };\n\t\t\tpush @$tasklist, $task;\n\n\t\t\tif ( $time_start - $time_submit > $timestep * $skip_shorter_than ) {\n\t\t\t\tmy $submit_ts_0 = floor( $time_submit / $timestep );\n\t\t\t\tmy $submit_ts_1 = floor( $time_start / $timestep );\n\t\t\t\tif ( $submit_ts_0 != $submit_ts_1 ) {\n\t\t\t\t\t$pendinghisto[$submit_ts_0] +=\n\t\t\t\t\t  ( $submit_ts_0 + 1 ) - ( $time_submit / $timestep );\n\t\t\t\t\tforeach my $ts ( $submit_ts_0 + 1 .. $submit_ts_1 - 1 ) {\n\t\t\t\t\t\t$pendinghisto[$ts] += 1;\n\t\t\t\t\t}\n\t\t\t\t\t$pendinghisto[$submit_ts_1] +=\n\t\t\t\t\t  ( $time_start / $timestep ) - $submit_ts_1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$pendinghisto[$submit_ts_0] +=\n\t\t\t\t\t  ( $time_start - $time_submit ) / $timestep;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $time_finish - $time_start > $timestep * $skip_shorter_than ) {\n\t\t\t\tmy $start_ts_0 = floor( $time_start / $timestep );\n\t\t\t\tmy $start_ts_1 = floor( $time_finish / $timestep );\n\t\t\t\tif ( $start_ts_0 != $start_ts_1 ) {\n\t\t\t\t\t$inprogresshisto[$start_ts_0] +=\n\t\t\t\t\t  ( $start_ts_0 + 1 ) - ( $time_start / $timestep );\n\t\t\t\t\tpush @{ $$inprogresstasks[$start_ts_0] }, $task;\n\t\t\t\t\tforeach my $ts ( $start_ts_0 + 1 .. $start_ts_1 - 1 ) {\n\t\t\t\t\t\t$inprogresshisto[$ts] += 1;\n                        push @{ $$inprogresstasks[$ts] }, $task;\n\t\t\t\t\t}\n\t\t\t\t\t$inprogresshisto[$start_ts_1] +=\n\t\t\t\t\t  ( $time_finish / $timestep ) - $start_ts_1;\n                        push @{ $$inprogresstasks[$start_ts_1] }, $task;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$inprogresshisto[$start_ts_0] +=\n\t\t\t\t\t  ( $time_finish - $time_start ) / $timestep;\n                    push @{ $$inprogresstasks[$start_ts_0] }, $task;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmy $spawned_ts = floor( $time_submit / $timestep );\n\t\t\t$spawnedhisto[$spawned_ts] += 1;\n\t\t\tmy $started_ts = floor( $time_start / $timestep );\n\t\t\t$startedhisto[$started_ts] += 1;\n\t\t\tmy $stop_ts = floor( $time_finish / $timestep );\n\t\t\t$retiredhisto[$stop_ts] += 1;\n\t\t}\n\t\tclose INFILE;\n\n\t\t# compute the time-averaged # of running\n\t\tforeach my $threadid (keys %runningtasks) {\n#\t\t\tprintf STDOUT \"threadid = %d\\n\", $threadid;\n\t\t\tmy $tasklistref = $runningtasks{$threadid};\n\t\t\tmy @tasklist = sort { $$a{\"start\"} <=> $$b{\"start\"} } @$tasklistref;\n\t\t\t\t                  \n\t\t    my $time_finish_last = 0.0;\n\t\t\tforeach my $taskptr (@tasklist) {\n\t\t\t\tmy %task = %$taskptr;\n                my $time_start = $task{\"start\"};\n                my $time_finish = $task{\"finish\"};\n                my $func_name = $task{\"name\"};\n#\t\t\t\tprintf STDOUT \"%lf %lf\\n\", $task{\"start\"}, $task{\"finish\"};\n\n                if ($time_finish > $time_finish_last) {\n                \t\n                \tif ($time_start < $time_finish_last) {\n                \t\t$time_start = $time_finish_last;\n                \t}\n                \t\n                    my $start_ts_0 = floor( $time_start / $timestep );\n                    my $start_ts_1 = floor( $time_finish / $timestep );\n                    \n                    if ( $start_ts_0 != $start_ts_1 ) {\n                    \tforeach my $key (keys %runninghisto_includes) {\n                    \t\tmy $func_name_pattern = $runninghisto_includes{$key};\n                            if ($func_name =~ /$func_name_pattern/) {\n                              ${ $runninghistos{$key} }[$start_ts_0] +=\n                                  ( $start_ts_0 + 1 ) - ( $time_start / $timestep );\n                              foreach my $ts ( $start_ts_0 + 1 .. $start_ts_1 - 1 ) {\n                                  ${ $runninghistos{$key} }[$ts] += 1;\n                            }\n                            ${ $runninghistos{$key} }[$start_ts_1] +=\n                              ( $time_finish / $timestep ) - $start_ts_1;\n                            }                    \t\t\n                    \t}\n                    }\n                    else {\n                        foreach my $key (keys %runninghisto_includes) {\n                            my $func_name_pattern = $runninghisto_includes{$key};\n                            if ($func_name =~ /$func_name_pattern/) {\n                                ${ $runninghistos{$key} }[$start_ts_0] +=\n                                  ( $time_finish - $time_start ) / $timestep;\n                         \t}\n                        }\n                    }\n                \t\n                \t$time_finish_last = $time_finish;\n                }\n\t\t\t}\n\t\t}\n\n\t\t# print out the histograms for this trace\n\t\tprintf STDOUT \"file = %s\\n\",      $file;\n\t\tprintf STDOUT \"timestep = %lf\\n\", $timestep;\n\n\t\tprintf STDOUT \"# ts nspawned nstarted nretired\\n\";\n\t\tforeach my $ts ( 0 .. $nslices - 1 ) {\n\t\t\tprintf STDOUT \"%d\\t%lf\\t%lf\\t%lf\\n\", $ts, $spawnedhisto[$ts], $startedhisto[$ts], $retiredhisto[$ts];\n\t\t}\n#\t\tprintf STDOUT \"time-weighted # of waiting\\n\";\n#\t\tforeach my $ts ( 0 .. $nslices - 1 ) {\n#\t\t\tprintf STDOUT \"%d %lf\\n\", $ts, $pendinghisto[$ts];\n#\t\t}\n#\t\tprintf STDOUT \"time-weighted # of in-progress\\n\";\n#\t\tforeach my $ts ( 0 .. $nslices - 1 ) {\n#\t\t\tprintf STDOUT \"%d %lf\\n\", $ts, $inprogresshisto[$ts];\n#\t\t}\n\n\t\t# list keys in a reasonable order (keys returns keys in a weird order)\n\t\t# \"all\" first, then the rest\n\t\tmy @running_keys = (\"all\");\n\t\tforeach my $key (keys %runninghisto_includes) {\n\t\t\tpush @running_keys, $key if $key ne \"all\";\n\t\t}\n        printf STDOUT \"# ts, pend\";\t\t\n        foreach my $key (@running_keys) {\n        \tprintf STDOUT \", run_%s\", $key;\n        }\n        printf STDOUT \"\\n\";\n\t\tforeach my $ts ( 0 .. $nslices - 1 ) {\n\t\t\tprintf STDOUT \"%d\", $ts;\n\t\t\tprintf STDOUT \", %lf\", $pendinghisto[$ts];\n\t\t\tforeach my $key (@running_keys) {\n  \t\t\t    printf STDOUT \", %lf\", ${ $runninghistos{$key} }[$ts];\n\t\t\t}\n\t\t\tprintf STDOUT \"\\n\";\n\t\t}\n\t\t\n\t\tmy $active_tasks_fname = \"$file.active_tasks.log\";\n\t\topen ATFILE, \">$active_tasks_fname\" || die \"could not open $active_tasks_fname\";\n\t\tforeach my $ts (0 .. $nslices-1) {\n\t\t\tprintf ATFILE \"============================ ts %d: [%lf,%lf] =============================\\n\",\n\t\t\t  $ts, $ts*$timestep, ($ts+1)*$timestep;\n\t\t\tforeach my $taskref (sort { $$a{\"thread\"} <=> $$b{\"thread\"} } @{ $$inprogresstasks[$ts] }) {\n\t\t\t\tprintf ATFILE \"%d %s %lf %lf\\n\",\n\t\t\t\t  $$taskref{\"thread\"}, $$taskref{\"name\"},\n\t\t\t\t  $$taskref{\"start\"}, $$taskref{\"finish\"};\n\t\t\t}\n\t\t}\n\t\tclose ATFILE;\n\n\t}\n\n}\n\nexit 0;\n\nsub usage {\n\tprintf STDERR\n\t  \"taskprofile.pl converts trace files info a summary profile. Usage:\\n\";\n\tprintf STDERR\n\t  \"  taskprofile.pl <trace file1> [<trace file2> <trace file3>... ]\\n\";\n\texit 0;\n}\n\nsub by_time {\n\t$func_tottime{$b} <=> $func_tottime{$a};\n}\n"
  },
  {
    "path": "bin/test_utilities.py",
    "content": "import json\nimport subprocess\n\nclass madjsoncompare:\n    # \"\"\"takes two json output files and compares individual keys, accessed by a list of descending keys\"\"\"\n    def __init__(self, file1, file2):\n        \"\"\"Initialize with two json files, which are read and stored in data1 and data2\"\"\"\n        if not file1.endswith('.json'):\n            raise ValueError(\"File1 must be a JSON file\")\n        if not file2.endswith('.json'):\n            raise ValueError(\"File2 must be a JSON file\")\n        if not file1 or not file2:\n            raise ValueError(\"Both file1 and file2 must be provided\")\n        if not isinstance(file1, str) or not isinstance(file2, str):\n            raise TypeError(\"file1 and file2 must be strings representing file paths\")\n\n        # print out file names\n        print('comparing files:', file1, file2)\n        self.file1=file1\n        self.file2=file2\n        self.success=True\n\n        with open(file1, 'r') as f:\n            self.data1 = json.load(f)\n\n        with open(file2, 'r') as f:\n            self.data2 = json.load(f)\n\n#        print(\"json1\",self.data1)\n#        print(\"json2\",self.data2)\n\n    def exitcode(self):\n        if self.success:\n            return 0\n        else:\n            return 1\n\n    def compare(self, subsequentkeys, tolerance):\n        value1=self.data1\n        value2=self.data2\n        for i in subsequentkeys:\n#            print(\"key \", i, \" in \", value1, value2)\n            value1=value1[i]\n            value2=value2[i]\n\n        # print(\"type of key/value\",type(i),type(value1))\n        success=False\n        diff='is different'\n        if (type(value1)==float):\n            diff=abs(value1-value2)\n            success=diff<tolerance\n        elif (type(value1)==int):\n            diff=0\n            success=(value1==value2)\n        elif (type(value1)==str):\n            success=(value1==value2)\n            if success:\n                diff=''\n        else:\n            success=(value1==value2)\n            if success:\n                diff=''\n\n        if success:\n            print(\"key \", subsequentkeys, \" agrees to  \", tolerance,\": \", value1, value2, diff)\n        else:\n            print(\"key \", subsequentkeys, \" differs gt \", tolerance,\": \", value1, value2, diff)\n        self.success=self.success and success\n\n\n\ndef cleanup(prefix):\n    \"\"\"Remove output files and directories created during the test.\"\"\"\n    cmd = f'rm -r {prefix}.calc_info.json {prefix}'\n    print(\"Cleaning up with command:\", cmd)\n    subprocess.run(cmd, shell=True)\n\n\n\ndef skip_on_small_machines():\n    \"\"\"Check the number of threads available and skip the test if too few.\"\"\"\n    try:\n        num_threads=int(subprocess.check_output(\"echo $MAD_NUM_THREADS\", shell=True).strip())\n    except subprocess.CalledProcessError as e:\n        print(\"Error retrieving number of threads:\", e)\n        return True\n\n    print(\"Number of threads found to be:\", num_threads)\n    return (num_threads < 20)"
  },
  {
    "path": "cmake/Makefile",
    "content": "CMAKE := cmake-3.5.1\nURL := https://cmake.org/files/v3.5/$(CMAKE).tar.gz\nPREFIX := $(PWD)\n\nall: cmake\n\nwget := $(shell wget 2>/dev/null)\ncurl := $(shell curl 2>/dev/null)\n\nifneq  ($(wget), )\ndownload := wget $(URL) -O $(CMAKE).tar.gz\nelse\ndownload := curl $(URL) -o $(CMAKE).tar.gz\nendif\n\n\n$(CMAKE).tar.gz:\n\t$(download)\n\n.PHONY: cmake\ncmake: $(CMAKE).tar.gz\n\ttar -xzf $(CMAKE).tar.gz\n\tcd ./$(CMAKE)\n\tcd $(CMAKE) && ./configure --prefix=$(PREFIX) # --system-curl\n\tcd $(CMAKE) && make install\n\n\n"
  },
  {
    "path": "cmake/config.h.in",
    "content": "/* Input file cmake/config.h.in. */\n\n/* Define of package information */\n#define MADNESS_PACKAGE_NAME \"@PROJECT_NAME@\"\n#define MADNESS_PACKAGE_URL \"https://github.com/m-a-d-n-e-s-s/madness\"\n#define MADNESS_PACKAGE_VERSION \"@MADNESS_VERSION@\"\n#define MADNESS_VERSION \"@MADNESS_VERSION@\"\n#define MADNESS_MAJOR_VERSION @MADNESS_MAJOR_VERSION@\n#define MADNESS_MINOR_VERSION @MADNESS_MAJOR_VERSION@\n#define MADNESS_MICRO_VERSION @MADNESS_MAJOR_VERSION@\n\n/* Configured information */\n#define MADNESS_CONFIGURATION_CXX \"@CMAKE_CXX_COMPILER@\"\n#define MADNESS_CONFIGURATION_CXXFLAGS \"@CMAKE_CXX_FLAGS@\"\n#define HOST_SYSTEM \"@CMAKE_HOST_SYSTEM_NAME@\"\n#define MADNESS_CONFIGURATION_DATE \"@MADNESS_CONFIGURATION_DATE@\"\n#define MADNESS_CONFIGURATION_HOST \"@MADNESS_CONFIGURATION_HOST@\"\n#define MADNESS_CONFIGURATION_USER \"@MADNESS_CONFIGURATION_USER@\"\n\n/* Target for tuning mtxmq kernels */\n#cmakedefine AMD_QUADCORE_TUNE 1\n\n/* Fortran-C linking convention type and integer size */\n#cmakedefine FORTRAN_LINKAGE_LC 1\n#cmakedefine FORTRAN_LINKAGE_LCU 1\n#cmakedefine FORTRAN_LINKAGE_LCUU 1\n#cmakedefine FORTRAN_LINKAGE_UC 1\n#cmakedefine FORTRAN_LINKAGE_UCU 1\n#define MADNESS_FORTRAN_DEFAULT_INTEGER_SIZE @FORTRAN_INTEGER_SIZE@\n\n/* Defined system specific macros */\n#cmakedefine HAVE_CRAYXE 1\n#cmakedefine HAVE_CRAYXT 1\n#cmakedefine HAVE_IBMBGP 1\n#cmakedefine HAVE_IBMBGQ 1\n#cmakedefine ON_A_MAC 1\n#define MADNESS_CXX_ABI_GenericItanium @MADNESS_CXX_ABI_GenericItanium@\n#define MADNESS_CXX_ABI_GenericARM @MADNESS_CXX_ABI_GenericARM@\n#define MADNESS_CXX_ABI_Microsoft @MADNESS_CXX_ABI_Microsoft@\n#define MADNESS_CXX_ABI @MADNESS_CXX_ABI@\n\n/* Define type macros. */\n#cmakedefine HAVE_INT64_T 1\n#cmakedefine HAVE_LONG_LONG 1\n/* Define to `int' if <sys/types.h> does not define. */\n#cmakedefine SYS_TYPES_H_HAS_PID_T 1\n#if !defined(SYS_TYPES_H_HAS_PID_T)\n# define pid_t int\n#endif\n\n/* Define MADNESS has access to the library. */\n#cmakedefine HAVE_MTXMQ 1\n#cmakedefine HAVE_ACML 1\n#cmakedefine HAVE_INTEL_TBB 1\n#cmakedefine MADNESS_CAN_USE_TBB_PRIORITY 1\n#cmakedefine HAVE_PARSEC 1\n#cmakedefine HAVE_INTEL_MKL 1\n#cmakedefine HAVE_PAPI 1\n#cmakedefine MADNESS_HAS_PCM 1\n#cmakedefine MADNESS_HAS_LIBXC 1\n#cmakedefine MADNESS_HAS_INTEGRATORXX 1\n#cmakedefine MADNESS_HAS_BOOST 1\n#cmakedefine MADNESS_HAS_ELEMENTAL 1\n#cmakedefine MADNESS_HAS_ELEMENTAL_EMBEDDED 1\n#cmakedefine MADNESS_HAS_GOOGLE_PERF 1\n#cmakedefine MADNESS_HAS_GOOGLE_PERF_PROFILER 1\n#cmakedefine MADNESS_HAS_GOOGLE_PERF_TCMALLOC 1\n#cmakedefine MADNESS_HAS_GOOGLE_PERF_TCMALLOC_MINIMAL 1\n#cmakedefine MADNESS_HAS_GOOGLE_TEST 1\n#cmakedefine MADNESS_HAS_LIBUNWIND 1\n\n/* Define has access to function. */\n#cmakedefine HAVE_FORK 1\n#cmakedefine HAVE_MEMSET 1\n#cmakedefine HAVE_POSIX_MEMALIGN 1\n#cmakedefine MISSING_POSIX_MEMALIGN_PROTO 1\n#cmakedefine HAVE_POW 1\n#cmakedefine HAVE_RANDOM 1\n#cmakedefine HAVE_SLEEP 1\n#cmakedefine HAVE_STD_ABS_LONG 1\n#cmakedefine HAVE_STRCHR 1\n\n/* Define if header files are available. */\n#ifndef HAVE_SYS_STAT_H\n#cmakedefine HAVE_SYS_STAT_H 1\n#endif\n#ifndef HAVE_SYS_TYPES_H\n#cmakedefine HAVE_SYS_TYPES_H\n#endif\n#ifndef HAVE_UNISTD_H\n#cmakedefine HAVE_UNISTD_H 1\n#endif\n#ifndef HAVE_RESOURCE_H\n#cmakedefine HAVE_RESOURCE_H 1\n#endif\n#cmakedefine HAVE_ELEMENTAL_H 1\n#cmakedefine HAVE_EL_H 1\n\n/* Set if compiler will instantiate static templates */\n#cmakedefine HAVE_UNQUALIFIED_STATIC_DECL 1\n\n/* Set MADNESS assertions behavior */\n#cmakedefine MADNESS_ASSERTIONS_ABORT 1\n#cmakedefine MADNESS_ASSERTIONS_ASSERT 1\n#cmakedefine MADNESS_ASSERTIONS_DISABLE 1\n#cmakedefine MADNESS_ASSERTIONS_THROW 1\n\n/* The default binding for threads */\n#define MADNESS_TASK_BACKEND \"@MADNESS_TASK_BACKEND@\"\n\n/* Thread-safety level requested from MPI by MADNESS */\n#define MADNESS_MPI_THREAD_LEVEL @MADNESS_MPI_THREAD_LEVEL@\n#cmakedefine STUBOUTMPI 1\n#ifndef MADNESS_MPI_HEADER\n# cmakedefine MADNESS_MPI_HEADER \"@MADNESS_MPI_HEADER@\"\n#endif\n\n/* The default binding for threads */\n#define MAD_BIND_DEFAULT \"@MAD_BIND_DEFAULT@\"\n\n/* Define to enable MADNESS features */\n#cmakedefine MADNESS_TASK_PROFILING 1\n#cmakedefine MADNESS_USE_BSEND_ACKS 1\n#cmakedefine ENABLE_GENTENSOR 1\n#cmakedefine NEVER_SPIN 1\n#cmakedefine TENSOR_BOUNDS_CHECKING 1\n#cmakedefine TENSOR_INSTANCE_COUNT 1\n#cmakedefine USE_SPINLOCKS 1\n#cmakedefine WORLD_GATHER_MEM_STATS 1\n#cmakedefine WORLD_MEM_PROFILE_ENABLE 1\n#cmakedefine WORLD_PROFILE_ENABLE 1\n#cmakedefine MADNESS_TASK_DEBUG_TRACE 1\n#cmakedefine MADNESS_LINALG_USE_LAPACKE 1\n#cmakedefine MADNESS_DQ_USE_PREBUF 1\n#cmakedefine MADNESS_DQ_PREBUF_SIZE @MADNESS_DQ_PREBUF_SIZE@\n#cmakedefine MADNESS_ASSUMES_ASLR_DISABLED 1\n#cmakedefine MADNESS_WORLDOBJECT_FUTURE_TRACE 1\n#cmakedefine MADNESS_WORLDOBJECT_FUTURE_TRACE_WORLD_ID @MADNESS_WORLDOBJECT_FUTURE_TRACE_WORLD_ID@\n#cmakedefine MADNESS_WORLDOBJECT_FUTURE_TRACE_MAX_NOBJECTS @MADNESS_WORLDOBJECT_FUTURE_TRACE_MAX_NOBJECTS@\n\n/* Define to the equivalent of the C99 'restrict' keyword, or to\n   nothing if this is not supported.  Do not define if restrict is\n   supported directly.  */\n#define MADNESS_RESTRICT @RESTRICT_KEYWORD@\n/* Work around a bug in Sun C++: it does not support _Restrict or\n   __restrict__, even though the corresponding Sun C compiler ends up with\n   \"#define restrict _Restrict\" or \"#define restrict __restrict__\" in the\n   previous line.  Perhaps some future version of Sun C++ will work with\n   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */\n#if defined __SUNPRO_CC && !defined __RESTRICT\n# define _Restrict\n# define __restrict__\n#endif\n\n\n/* Define the thread_local key word. */\n#cmakedefine THREAD_LOCAL_KEYWORD @THREAD_LOCAL_KEYWORD@\n#if defined(THREAD_LOCAL_KEYWORD)\n# define thread_local THREAD_LOCAL_KEYWORD\n#endif\n\n/* Define to the application path if available */\n#cmakedefine HAVE_XTERM 1\n#cmakedefine XTERM_EXECUTABLE \"@XTERM_EXECUTABLE@\"\n#cmakedefine HAVE_GDB 1\n#cmakedefine GDB_EXECUTABLE \"@GDB_EXECUTABLE@\"\n#cmakedefine HAVE_LLDB 1\n#cmakedefine LLDB_EXECUTABLE \"@LLDB_EXECUTABLE@\"\n"
  },
  {
    "path": "cmake/doxygen.cfg.in",
    "content": "# Doxyfile 1.8.9.1\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) for a project.\n#\n# All text after a double hash (##) is considered a comment and is placed in\n# front of the TAG it is preceding.\n#\n# All text after a single hash (#) is considered a comment and will be ignored.\n# The format is:\n# TAG = value [value, ...]\n# For lists, items can also be appended using:\n# TAG += value [value, ...]\n# Values that contain spaces should be placed between quotes (\\\" \\\").\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\n\n# This tag specifies the encoding used for all characters in the config file\n# that follow. The default is UTF-8 which is also the encoding used for all text\n# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv\n# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv\n# for the list of possible encodings.\n# The default value is: UTF-8.\n\nDOXYFILE_ENCODING      = UTF-8\n\n# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by\n# double-quotes, unless you are using Doxywizard) that should identify the\n# project for which the documentation is generated. This name is used in the\n# title of most generated pages and in a few other places.\n# The default value is: My Project.\n\nPROJECT_NAME           = @PROJECT_NAME@\n\n# The PROJECT_NUMBER tag can be used to enter a project or revision number. This\n# could be handy for archiving the generated documentation or if some version\n# control system is used.\n\nPROJECT_NUMBER         = \"@MADNESS_VERSION@\"\n\n# Using the PROJECT_BRIEF tag one can provide an optional one line description\n# for a project that appears at the top of each page and should give viewer a\n# quick idea about the purpose of the project. Keep the description short.\n\nPROJECT_BRIEF          =\n\n# With the PROJECT_LOGO tag one can specify a logo or an icon that is included\n# in the documentation. The maximum height of the logo should not exceed 55\n# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy\n# the logo to the output directory.\n\nPROJECT_LOGO           =\n\n# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path\n# into which the generated documentation will be written. If a relative path is\n# entered, it will be relative to the location where doxygen was started. If\n# left blank the current directory will be used.\n\nOUTPUT_DIRECTORY       = ./\n\n# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-\n# directories (in 2 levels) under the output directory of each output format and\n# will distribute the generated files over these directories. Enabling this\n# option can be useful when feeding doxygen a huge amount of source files, where\n# putting all generated files in the same directory would otherwise causes\n# performance problems for the file system.\n# The default value is: NO.\n\nCREATE_SUBDIRS         = NO\n\n# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII\n# characters to appear in the names of generated files. If set to NO, non-ASCII\n# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode\n# U+3044.\n# The default value is: NO.\n\nALLOW_UNICODE_NAMES    = NO\n\n# The OUTPUT_LANGUAGE tag is used to specify the language in which all\n# documentation generated by doxygen is written. Doxygen will use this\n# information to generate all constant output in the proper language.\n# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,\n# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),\n# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,\n# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),\n# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,\n# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,\n# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,\n# Ukrainian and Vietnamese.\n# The default value is: English.\n\nOUTPUT_LANGUAGE        = English\n\n# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member\n# descriptions after the members that are listed in the file and class\n# documentation (similar to Javadoc). Set to NO to disable this.\n# The default value is: YES.\n\nBRIEF_MEMBER_DESC      = YES\n\n# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief\n# description of a member or function before the detailed description\n#\n# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the\n# brief descriptions will be completely suppressed.\n# The default value is: YES.\n\nREPEAT_BRIEF           = YES\n\n# This tag implements a quasi-intelligent brief description abbreviator that is\n# used to form the text in various listings. Each string in this list, if found\n# as the leading text of the brief description, will be stripped from the text\n# and the result, after processing the whole list, is used as the annotated\n# text. Otherwise, the brief description is used as-is. If left blank, the\n# following values are used ($name is automatically replaced with the name of\n# the entity):The $name class, The $name widget, The $name file, is, provides,\n# specifies, contains, represents, a, an and the.\n\nABBREVIATE_BRIEF       =\n\n# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then\n# doxygen will generate a detailed section even if there is only a brief\n# description.\n# The default value is: NO.\n\nALWAYS_DETAILED_SEC    = NO\n\n# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all\n# inherited members of a class in the documentation of that class as if those\n# members were ordinary class members. Constructors, destructors and assignment\n# operators of the base classes will not be shown.\n# The default value is: NO.\n\nINLINE_INHERITED_MEMB  = NO\n\n# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path\n# before files name in the file list and in the header files. If set to NO the\n# shortest path that makes the file name unique will be used\n# The default value is: YES.\n\nFULL_PATH_NAMES        = NO\n\n# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.\n# Stripping is only done if one of the specified strings matches the left-hand\n# part of the path. The tag can be used to show relative paths in the file list.\n# If left blank the directory from which doxygen is run is used as the path to\n# strip.\n#\n# Note that you can specify absolute paths here, but also relative paths, which\n# will be relative from the directory where doxygen is started.\n# This tag requires that the tag FULL_PATH_NAMES is set to YES.\n\nSTRIP_FROM_PATH        = @PROJECT_SOURCE_DIR@/src\n\n# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the\n# path mentioned in the documentation of a class, which tells the reader which\n# header file to include in order to use a class. If left blank only the name of\n# the header file containing the class definition is used. Otherwise one should\n# specify the list of include paths that are normally passed to the compiler\n# using the -I flag.\n\nSTRIP_FROM_INC_PATH    =\n\n# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but\n# less readable) file names. This can be useful is your file systems doesn't\n# support long names like on DOS, Mac, or CD-ROM.\n# The default value is: NO.\n\nSHORT_NAMES            = NO\n\n# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the\n# first line (until the first dot) of a Javadoc-style comment as the brief\n# description. If set to NO, the Javadoc-style will behave just like regular Qt-\n# style comments (thus requiring an explicit @brief command for a brief\n# description.)\n# The default value is: NO.\n\nJAVADOC_AUTOBRIEF      = NO\n\n# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first\n# line (until the first dot) of a Qt-style comment as the brief description. If\n# set to NO, the Qt-style will behave just like regular Qt-style comments (thus\n# requiring an explicit \\brief command for a brief description.)\n# The default value is: NO.\n\nQT_AUTOBRIEF           = NO\n\n# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a\n# multi-line C++ special comment block (i.e. a block of //! or /// comments) as\n# a brief description. This used to be the default behavior. The new default is\n# to treat a multi-line C++ comment block as a detailed description. Set this\n# tag to YES if you prefer the old behavior instead.\n#\n# Note that setting this tag to YES also means that rational rose comments are\n# not recognized any more.\n# The default value is: NO.\n\nMULTILINE_CPP_IS_BRIEF = NO\n\n# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the\n# documentation from any documented member that it re-implements.\n# The default value is: YES.\n\nINHERIT_DOCS           = YES\n\n# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new\n# page for each member. If set to NO, the documentation of a member will be part\n# of the file/class/namespace that contains it.\n# The default value is: NO.\n\nSEPARATE_MEMBER_PAGES  = NO\n\n# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen\n# uses this value to replace tabs by spaces in code fragments.\n# Minimum value: 1, maximum value: 16, default value: 4.\n\nTAB_SIZE               = 4\n\n# This tag can be used to specify a number of aliases that act as commands in\n# the documentation. An alias has the form:\n# name=value\n# For example adding\n# \"sideeffect=@par Side Effects:\\n\"\n# will allow you to put the command \\sideeffect (or @sideeffect) in the\n# documentation, which will result in a user-defined paragraph with heading\n# \"Side Effects:\". You can put \\n's in the value part of an alias to insert\n# newlines.\n\nALIASES                = \"website=https://github.com/m-a-d-n-e-s-s/madness\"\n\n# This tag can be used to specify a number of word-keyword mappings (TCL only).\n# A mapping has the form \"name=value\". For example adding \"class=itcl::class\"\n# will allow you to use the command class in the itcl::class meaning.\n\nTCL_SUBST              =\n\n# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources\n# only. Doxygen will then generate output that is more tailored for C. For\n# instance, some of the names that are used will be different. The list of all\n# members will be omitted, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_FOR_C  = NO\n\n# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or\n# Python sources only. Doxygen will then generate output that is more tailored\n# for that language. For instance, namespaces will be presented as packages,\n# qualified scopes will look different, etc.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_JAVA   = NO\n\n# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran\n# sources. Doxygen will then generate output that is tailored for Fortran.\n# The default value is: NO.\n\nOPTIMIZE_FOR_FORTRAN   = NO\n\n# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL\n# sources. Doxygen will then generate output that is tailored for VHDL.\n# The default value is: NO.\n\nOPTIMIZE_OUTPUT_VHDL   = NO\n\n# Doxygen selects the parser to use depending on the extension of the files it\n# parses. With this tag you can assign which parser to use for a given\n# extension. Doxygen has a built-in mapping, but you can override or extend it\n# using this tag. The format is ext=language, where ext is a file extension, and\n# language is one of the parsers supported by doxygen: IDL, Java, Javascript,\n# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:\n# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:\n# Fortran. In the later case the parser tries to guess whether the code is fixed\n# or free formatted code, this is the default for Fortran type files), VHDL. For\n# instance to make doxygen treat .inc files as Fortran files (default is PHP),\n# and .f files as C (default is Fortran), use: inc=Fortran f=C.\n#\n# Note: For files without extension you can use no_extension as a placeholder.\n#\n# Note that for custom extensions you also need to set FILE_PATTERNS otherwise\n# the files are not read by doxygen.\n\nEXTENSION_MAPPING      =\n\n# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments\n# according to the Markdown format, which allows for more readable\n# documentation. See http://daringfireball.net/projects/markdown/ for details.\n# The output of markdown processing is further processed by doxygen, so you can\n# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in\n# case of backward compatibilities issues.\n# The default value is: YES.\n\nMARKDOWN_SUPPORT       = YES\n\n# When enabled doxygen tries to link words that correspond to documented\n# classes, or namespaces to their corresponding documentation. Such a link can\n# be prevented in individual cases by putting a % sign in front of the word or\n# globally by setting AUTOLINK_SUPPORT to NO.\n# The default value is: YES.\n\nAUTOLINK_SUPPORT       = YES\n\n# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want\n# to include (a tag file for) the STL sources as input, then you should set this\n# tag to YES in order to let doxygen match functions declarations and\n# definitions whose arguments contain STL classes (e.g. func(std::string);\n# versus func(std::string) {}). This also make the inheritance and collaboration\n# diagrams that involve STL classes more complete and accurate.\n# The default value is: NO.\n\nBUILTIN_STL_SUPPORT    = NO\n\n# If you use Microsoft's C++/CLI language, you should set this option to YES to\n# enable parsing support.\n# The default value is: NO.\n\nCPP_CLI_SUPPORT        = NO\n\n# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:\n# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen\n# will parse them like normal C++ but will assume all classes use public instead\n# of private inheritance when no explicit protection keyword is present.\n# The default value is: NO.\n\nSIP_SUPPORT            = NO\n\n# For Microsoft's IDL there are propget and propput attributes to indicate\n# getter and setter methods for a property. Setting this option to YES will make\n# doxygen to replace the get and set methods by a property in the documentation.\n# This will only work if the methods are indeed getting or setting a simple\n# type. If this is not the case, or you want to show the methods anyway, you\n# should set this option to NO.\n# The default value is: YES.\n\nIDL_PROPERTY_SUPPORT   = YES\n\n# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC\n# tag is set to YES then doxygen will reuse the documentation of the first\n# member in the group (if any) for the other members of the group. By default\n# all members of a group must be documented explicitly.\n# The default value is: NO.\n\nDISTRIBUTE_GROUP_DOC   = NO\n\n# Set the SUBGROUPING tag to YES to allow class member groups of the same type\n# (for instance a group of public functions) to be put as a subgroup of that\n# type (e.g. under the Public Functions section). Set it to NO to prevent\n# subgrouping. Alternatively, this can be done per class using the\n# \\nosubgrouping command.\n# The default value is: YES.\n\nSUBGROUPING            = YES\n\n# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions\n# are shown inside the group in which they are included (e.g. using \\ingroup)\n# instead of on a separate page (for HTML and Man pages) or section (for LaTeX\n# and RTF).\n#\n# Note that this feature does not work in combination with\n# SEPARATE_MEMBER_PAGES.\n# The default value is: NO.\n\nINLINE_GROUPED_CLASSES = NO\n\n# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions\n# with only public data fields or simple typedef fields will be shown inline in\n# the documentation of the scope in which they are defined (i.e. file,\n# namespace, or group documentation), provided this scope is documented. If set\n# to NO, structs, classes, and unions are shown on a separate page (for HTML and\n# Man pages) or section (for LaTeX and RTF).\n# The default value is: NO.\n\nINLINE_SIMPLE_STRUCTS  = NO\n\n# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or\n# enum is documented as struct, union, or enum with the name of the typedef. So\n# typedef struct TypeS {} TypeT, will appear in the documentation as a struct\n# with name TypeT. When disabled the typedef will appear as a member of a file,\n# namespace, or class. And the struct will be named TypeS. This can typically be\n# useful for C code in case the coding convention dictates that all compound\n# types are typedef'ed and only the typedef is referenced, never the tag name.\n# The default value is: NO.\n\nTYPEDEF_HIDES_STRUCT   = NO\n\n# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This\n# cache is used to resolve symbols given their name and scope. Since this can be\n# an expensive process and often the same symbol appears multiple times in the\n# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small\n# doxygen will become slower. If the cache is too large, memory is wasted. The\n# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range\n# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536\n# symbols. At the end of a run doxygen will report the cache usage and suggest\n# the optimal cache size from a speed point of view.\n# Minimum value: 0, maximum value: 9, default value: 0.\n\nLOOKUP_CACHE_SIZE      = 0\n\n# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use\n# during processing. When set to 0 doxygen will based this on the number of\n# cores available in the system. You can set it explicitly to a value larger\n# than 0 to get more control over the balance between CPU load and processing\n# speed. At this moment only the input processing can be done using multiple\n# threads. Since this is still an experimental feature the default is set to 1,\n# which effectively disables parallel processing. Please report any issues you\n# encounter. Generating dot graphs in parallel is controlled by the\n# DOT_NUM_THREADS setting.\n# Minimum value: 0, maximum value: 32, default value: 1.\n\nNUM_PROC_THREADS       = 10\n\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\n\n# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in\n# documentation are documented, even if no documentation was available. Private\n# class members and static file members will be hidden unless the\n# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.\n# Note: This will also disable the warnings about undocumented members that are\n# normally produced when WARNINGS is set to YES.\n# The default value is: NO.\n\nEXTRACT_ALL            = YES\n\n# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will\n# be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PRIVATE        = YES\n\n# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal\n# scope will be included in the documentation.\n# The default value is: NO.\n\nEXTRACT_PACKAGE        = NO\n\n# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be\n# included in the documentation.\n# The default value is: NO.\n\nEXTRACT_STATIC         = YES\n\n# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined\n# locally in source files will be included in the documentation. If set to NO,\n# only classes defined in header files are included. Does not have any effect\n# for Java sources.\n# The default value is: YES.\n\nEXTRACT_LOCAL_CLASSES  = YES\n\n# This flag is only useful for Objective-C code. If set to YES, local methods,\n# which are defined in the implementation section but not in the interface are\n# included in the documentation. If set to NO, only methods in the interface are\n# included.\n# The default value is: NO.\n\nEXTRACT_LOCAL_METHODS  = NO\n\n# If this flag is set to YES, the members of anonymous namespaces will be\n# extracted and appear in the documentation as a namespace called\n# 'anonymous_namespace{file}', where file will be replaced with the base name of\n# the file that contains the anonymous namespace. By default anonymous namespace\n# are hidden.\n# The default value is: NO.\n\nEXTRACT_ANON_NSPACES   = NO\n\n# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all\n# undocumented members inside documented classes or files. If set to NO these\n# members will be included in the various overviews, but no documentation\n# section is generated. This option has no effect if EXTRACT_ALL is enabled.\n# The default value is: NO.\n\nHIDE_UNDOC_MEMBERS     = NO\n\n# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all\n# undocumented classes that are normally visible in the class hierarchy. If set\n# to NO, these classes will be included in the various overviews. This option\n# has no effect if EXTRACT_ALL is enabled.\n# The default value is: NO.\n\nHIDE_UNDOC_CLASSES     = NO\n\n# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend\n# (class|struct|union) declarations. If set to NO, these declarations will be\n# included in the documentation.\n# The default value is: NO.\n\nHIDE_FRIEND_COMPOUNDS  = NO\n\n# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any\n# documentation blocks found inside the body of a function. If set to NO, these\n# blocks will be appended to the function's detailed documentation block.\n# The default value is: NO.\n\nHIDE_IN_BODY_DOCS      = NO\n\n# The INTERNAL_DOCS tag determines if documentation that is typed after a\n# \\internal command is included. If the tag is set to NO then the documentation\n# will be excluded. Set it to YES to include the internal documentation.\n# The default value is: NO.\n\nINTERNAL_DOCS          = NO\n\n# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file\n# names in lower-case letters. If set to YES, upper-case letters are also\n# allowed. This is useful if you have classes or files whose names only differ\n# in case and if your file system supports case sensitive file names. Windows\n# and Mac users are advised to set this option to NO.\n# The default value is: system dependent.\n\nCASE_SENSE_NAMES       = YES\n\n# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with\n# their full class and namespace scopes in the documentation. If set to YES, the\n# scope will be hidden.\n# The default value is: NO.\n\nHIDE_SCOPE_NAMES       = NO\n\n# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will\n# append additional text to a page's title, such as Class Reference. If set to\n# YES the compound reference will be hidden.\n# The default value is: NO.\n\nHIDE_COMPOUND_REFERENCE= NO\n\n# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of\n# the files that are included by a file in the documentation of that file.\n# The default value is: YES.\n\nSHOW_INCLUDE_FILES     = YES\n\n# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each\n# grouped member an include statement to the documentation, telling the reader\n# which file to include in order to use the member.\n# The default value is: NO.\n\nSHOW_GROUPED_MEMB_INC  = NO\n\n# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include\n# files with double quotes in the documentation rather than with sharp brackets.\n# The default value is: NO.\n\nFORCE_LOCAL_INCLUDES   = NO\n\n# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the\n# documentation for inline members.\n# The default value is: YES.\n\nINLINE_INFO            = YES\n\n# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the\n# (detailed) documentation of file and class members alphabetically by member\n# name. If set to NO, the members will appear in declaration order.\n# The default value is: YES.\n\nSORT_MEMBER_DOCS       = YES\n\n# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief\n# descriptions of file, namespace and class members alphabetically by member\n# name. If set to NO, the members will appear in declaration order. Note that\n# this will also influence the order of the classes in the class list.\n# The default value is: NO.\n\nSORT_BRIEF_DOCS        = YES\n\n# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the\n# (brief and detailed) documentation of class members so that constructors and\n# destructors are listed first. If set to NO the constructors will appear in the\n# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.\n# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief\n# member documentation.\n# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting\n# detailed member documentation.\n# The default value is: NO.\n\nSORT_MEMBERS_CTORS_1ST = YES\n\n# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy\n# of group names into alphabetical order. If set to NO the group names will\n# appear in their defined order.\n# The default value is: NO.\n\nSORT_GROUP_NAMES       = NO\n\n# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by\n# fully-qualified names, including namespaces. If set to NO, the class list will\n# be sorted only by class name, not including the namespace part.\n# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\n# Note: This option applies only to the class list, not to the alphabetical\n# list.\n# The default value is: NO.\n\nSORT_BY_SCOPE_NAME     = NO\n\n# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper\n# type resolution of all parameters of a function it will reject a match between\n# the prototype and the implementation of a member function even if there is\n# only one candidate or it is obvious which candidate to choose by doing a\n# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still\n# accept a match between prototype and implementation in such cases.\n# The default value is: NO.\n\nSTRICT_PROTO_MATCHING  = NO\n\n# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo\n# list. This list is created by putting \\todo commands in the documentation.\n# The default value is: YES.\n\nGENERATE_TODOLIST      = YES\n\n# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test\n# list. This list is created by putting \\test commands in the documentation.\n# The default value is: YES.\n\nGENERATE_TESTLIST      = YES\n\n# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug\n# list. This list is created by putting \\bug commands in the documentation.\n# The default value is: YES.\n\nGENERATE_BUGLIST       = YES\n\n# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)\n# the deprecated list. This list is created by putting \\deprecated commands in\n# the documentation.\n# The default value is: YES.\n\nGENERATE_DEPRECATEDLIST= YES\n\n# The ENABLED_SECTIONS tag can be used to enable conditional documentation\n# sections, marked by \\if <section_label> ... \\endif and \\cond <section_label>\n# ... \\endcond blocks.\n\nENABLED_SECTIONS       =\n\n# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the\n# initial value of a variable or macro / define can have for it to appear in the\n# documentation. If the initializer consists of more lines than specified here\n# it will be hidden. Use a value of 0 to hide initializers completely. The\n# appearance of the value of individual variables and macros / defines can be\n# controlled using \\showinitializer or \\hideinitializer command in the\n# documentation regardless of this setting.\n# Minimum value: 0, maximum value: 10000, default value: 30.\n\nMAX_INITIALIZER_LINES  = 30\n\n# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at\n# the bottom of the documentation of classes and structs. If set to YES, the\n# list will mention the files that were used to generate the documentation.\n# The default value is: YES.\n\nSHOW_USED_FILES        = YES\n\n# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This\n# will remove the Files entry from the Quick Index and from the Folder Tree View\n# (if specified).\n# The default value is: YES.\n\nSHOW_FILES             = YES\n\n# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces\n# page. This will remove the Namespaces entry from the Quick Index and from the\n# Folder Tree View (if specified).\n# The default value is: YES.\n\nSHOW_NAMESPACES        = YES\n\n# The FILE_VERSION_FILTER tag can be used to specify a program or script that\n# doxygen should invoke to get the current version for each file (typically from\n# the version control system). Doxygen will invoke the program by executing (via\n# popen()) the command command input-file, where command is the value of the\n# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided\n# by doxygen. Whatever the program writes to standard output is used as the file\n# version. For an example see the documentation.\n\nFILE_VERSION_FILTER    =\n\n# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed\n# by doxygen. The layout file controls the global structure of the generated\n# output files in an output format independent way. To create the layout file\n# that represents doxygen's defaults, run doxygen with the -l option. You can\n# optionally specify a file name after the option, if omitted DoxygenLayout.xml\n# will be used as the name of the layout file.\n#\n# Note that if you run doxygen from a directory containing a file called\n# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE\n# tag is left empty.\n\nLAYOUT_FILE            =\n\n# The CITE_BIB_FILES tag can be used to specify one or more bib files containing\n# the reference definitions. This must be a list of .bib files. The .bib\n# extension is automatically appended if omitted. This requires the bibtex tool\n# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.\n# For LaTeX the style of the bibliography can be controlled using\n# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the\n# search path. See also \\cite for info how to create references.\n\nCITE_BIB_FILES         =\n\n#---------------------------------------------------------------------------\n# Configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\n\n# The QUIET tag can be used to turn on/off the messages that are generated to\n# standard output by doxygen. If QUIET is set to YES this implies that the\n# messages are off.\n# The default value is: NO.\n\nQUIET                  = NO\n\n# The WARNINGS tag can be used to turn on/off the warning messages that are\n# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES\n# this implies that the warnings are on.\n#\n# Tip: Turn warnings on while writing the documentation.\n# The default value is: YES.\n\nWARNINGS               = YES\n\n# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate\n# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag\n# will automatically be disabled.\n# The default value is: YES.\n\nWARN_IF_UNDOCUMENTED   = YES\n\n# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for\n# potential errors in the documentation, such as not documenting some parameters\n# in a documented function, or documenting parameters that don't exist or using\n# markup commands wrongly.\n# The default value is: YES.\n\nWARN_IF_DOC_ERROR      = YES\n\n# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that\n# are documented, but have no documentation for their parameters or return\n# value. If set to NO, doxygen will only warn about wrong or incomplete\n# parameter documentation, but not about the absence of documentation.\n# The default value is: NO.\n\nWARN_NO_PARAMDOC       = YES\n\n# The WARN_FORMAT tag determines the format of the warning messages that doxygen\n# can produce. The string should contain the $file, $line, and $text tags, which\n# will be replaced by the file and line number from which the warning originated\n# and the warning text. Optionally the format may contain $version, which will\n# be replaced by the version of the file (if it could be obtained via\n# FILE_VERSION_FILTER)\n# The default value is: $file:$line: $text.\n\nWARN_FORMAT            = \"$file:$line: $text\"\n\n# The WARN_LOGFILE tag can be used to specify a file to which warning and error\n# messages should be written. If left blank the output is written to standard\n# error (stderr).\n\nWARN_LOGFILE           = doxygen-warnings.txt\n\n#---------------------------------------------------------------------------\n# Configuration options related to the input files\n#---------------------------------------------------------------------------\n\n# The INPUT tag is used to specify the files and/or directories that contain\n# documented source files. You may enter file names like myfile.cpp or\n# directories like /usr/src/myproject. Separate the files or directories with\n# spaces.\n# Note: If this tag is empty the current directory is searched.\n\nINPUT                  = \"@PROJECT_SOURCE_DIR@/doc\" \\\n                         \"@PROJECT_SOURCE_DIR@/src\" \\\n                         \"@PROJECT_SOURCE_DIR@/bin\"\n\n# This tag can be used to specify the character encoding of the source files\n# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses\n# libiconv (or the iconv built into libc) for the transcoding. See the libiconv\n# documentation (see: http://www.gnu.org/software/libiconv) for the list of\n# possible encodings.\n# The default value is: UTF-8.\n\nINPUT_ENCODING         = UTF-8\n\n# If the value of the INPUT tag contains directories, you can use the\n# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and\n# *.h) to filter out the source-files in the directories. If left blank the\n# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,\n# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,\n# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,\n# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,\n# *.qsf, *.as and *.js.\n\nFILE_PATTERNS          = *.dox \\\n                         *.h \\\n                         *.cpp \\\n                         *.cc \\\n                         *.c\n\n# The RECURSIVE tag can be used to specify whether or not subdirectories should\n# be searched for input files as well.\n# The default value is: NO.\n\nRECURSIVE              = YES\n\n# The EXCLUDE tag can be used to specify files and/or directories that should be\n# excluded from the INPUT source files. This way you can easily exclude a\n# subdirectory from a directory tree whose root is specified with the INPUT tag.\n#\n# Note that relative paths are relative to the directory from which doxygen is\n# run.\n\nEXCLUDE                = \"@PROJECT_SOURCE_DIR@/src/madness/external\" \\\n                         \"@PROJECT_SOURCE_DIR@/src/apps/DFcode\" \\\n                         \"@PROJECT_SOURCE_DIR@/src/apps/ii\" \\\n                         \"@PROJECT_SOURCE_DIR@/src/apps/jacob\" \\\n                         \"@PROJECT_SOURCE_DIR@/src/apps/nick\" \\\n                         \"@PROJECT_SOURCE_DIR@/src/apps/polar\" \n\n# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n# directories that are symbolic links (a Unix file system feature) are excluded\n# from the input.\n# The default value is: NO.\n\nEXCLUDE_SYMLINKS       = NO\n\n# If the value of the INPUT tag contains directories, you can use the\n# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude\n# certain files from those directories.\n#\n# Note that the wildcards are matched against the file with absolute path, so to\n# exclude all test directories for example use the pattern */test/*\n\nEXCLUDE_PATTERNS       = LIBS.h \\\n                         mraX.cc \\\n                         mraX.h \\\n                         *.tex \n\n# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n# (namespaces, classes, functions, etc.) that should be excluded from the\n# output. The symbol name can be a fully qualified name, a word, or if the\n# wildcard * is used, a substring. Examples: ANamespace, AClass,\n# AClass::ANamespace, ANamespace::*Test\n#\n# Note that the wildcards are matched against the file with absolute path, so to\n# exclude all test directories use the pattern */test/*\n\nEXCLUDE_SYMBOLS        =\n\n# The EXAMPLE_PATH tag can be used to specify one or more files or directories\n# that contain example code fragments that are included (see the \\include\n# command).\n\nEXAMPLE_PATH           =\n\n# If the value of the EXAMPLE_PATH tag contains directories, you can use the\n# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and\n# *.h) to filter out the source-files in the directories. If left blank all\n# files are included.\n\nEXAMPLE_PATTERNS       =\n\n# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be\n# searched for input files to be used with the \\include or \\dontinclude commands\n# irrespective of the value of the RECURSIVE tag.\n# The default value is: NO.\n\nEXAMPLE_RECURSIVE      = NO\n\n# The IMAGE_PATH tag can be used to specify one or more files or directories\n# that contain images that are to be included in the documentation (see the\n# \\image command).\n\nIMAGE_PATH             =\n\n# The INPUT_FILTER tag can be used to specify a program that doxygen should\n# invoke to filter for each input file. Doxygen will invoke the filter program\n# by executing (via popen()) the command:\n#\n# <filter> <input-file>\n#\n# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the\n# name of an input file. Doxygen will then use the output that the filter\n# program writes to standard output. If FILTER_PATTERNS is specified, this tag\n# will be ignored.\n#\n# Note that the filter must not add or remove lines; it is applied before the\n# code is scanned, but not when the output code is generated. If lines are added\n# or removed, the anchors will not be placed correctly.\n\nINPUT_FILTER           =\n\n# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern\n# basis. Doxygen will compare the file name with each pattern and apply the\n# filter if there is a match. The filters are a list of the form: pattern=filter\n# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how\n# filters are used. If the FILTER_PATTERNS tag is empty or if none of the\n# patterns match the file name, INPUT_FILTER is applied.\n\nFILTER_PATTERNS        =\n\n# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using\n# INPUT_FILTER) will also be used to filter the input files that are used for\n# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).\n# The default value is: NO.\n\nFILTER_SOURCE_FILES    = NO\n\n# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file\n# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and\n# it is also possible to disable source filtering for a specific pattern using\n# *.ext= (so without naming a filter).\n# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.\n\nFILTER_SOURCE_PATTERNS =\n\n# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that\n# is part of the input, its contents will be placed on the main page\n# (index.html). This can be useful if you have a project on for instance GitHub\n# and want to reuse the introduction page also for the doxygen output.\n\nUSE_MDFILE_AS_MAINPAGE =\n\n#---------------------------------------------------------------------------\n# Configuration options related to source browsing\n#---------------------------------------------------------------------------\n\n# If the SOURCE_BROWSER tag is set to YES then a list of source files will be\n# generated. Documented entities will be cross-referenced with these sources.\n#\n# Note: To get rid of all source code in the generated output, make sure that\n# also VERBATIM_HEADERS is set to NO.\n# The default value is: NO.\n\nSOURCE_BROWSER         = NO\n\n# Setting the INLINE_SOURCES tag to YES will include the body of functions,\n# classes and enums directly into the documentation.\n# The default value is: NO.\n\nINLINE_SOURCES         = NO\n\n# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any\n# special comment blocks from generated source code fragments. Normal C, C++ and\n# Fortran comments will always remain visible.\n# The default value is: YES.\n\nSTRIP_CODE_COMMENTS    = NO\n\n# If the REFERENCED_BY_RELATION tag is set to YES then for each documented\n# function all documented functions referencing it will be listed.\n# The default value is: NO.\n\nREFERENCED_BY_RELATION = YES\n\n# If the REFERENCES_RELATION tag is set to YES then for each documented function\n# all documented entities called/used by that function will be listed.\n# The default value is: NO.\n\nREFERENCES_RELATION    = YES\n\n# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set\n# to YES then the hyperlinks from functions in REFERENCES_RELATION and\n# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will\n# link to the documentation.\n# The default value is: YES.\n\nREFERENCES_LINK_SOURCE = YES\n\n# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the\n# source code will show a tooltip with additional information such as prototype,\n# brief description and links to the definition and documentation. Since this\n# will make the HTML file larger and loading of large files a bit slower, you\n# can opt to disable this feature.\n# The default value is: YES.\n# This tag requires that the tag SOURCE_BROWSER is set to YES.\n\nSOURCE_TOOLTIPS        = YES\n\n# If the USE_HTAGS tag is set to YES then the references to source code will\n# point to the HTML generated by the htags(1) tool instead of doxygen built-in\n# source browser. The htags tool is part of GNU's global source tagging system\n# (see http://www.gnu.org/software/global/global.html). You will need version\n# 4.8.6 or higher.\n#\n# To use it do the following:\n# - Install the latest version of global\n# - Enable SOURCE_BROWSER and USE_HTAGS in the config file\n# - Make sure the INPUT points to the root of the source tree\n# - Run doxygen as normal\n#\n# Doxygen will invoke htags (and that will in turn invoke gtags), so these\n# tools must be available from the command line (i.e. in the search path).\n#\n# The result: instead of the source browser generated by doxygen, the links to\n# source code will now point to the output of htags.\n# The default value is: NO.\n# This tag requires that the tag SOURCE_BROWSER is set to YES.\n\nUSE_HTAGS              = NO\n\n# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a\n# verbatim copy of the header file for each class for which an include is\n# specified. Set to NO to disable this.\n# See also: Section \\class.\n# The default value is: YES.\n\nVERBATIM_HEADERS       = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\n\n# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all\n# compounds will be generated. Enable this if the project contains a lot of\n# classes, structs, unions or interfaces.\n# The default value is: YES.\n\nALPHABETICAL_INDEX     = NO\n\n# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in\n# which the alphabetical index list will be split.\n# Minimum value: 1, maximum value: 20, default value: 5.\n# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.\n\nCOLS_IN_ALPHA_INDEX    = 5\n\n# In case all classes in a project start with a common prefix, all classes will\n# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag\n# can be used to specify a prefix (or a list of prefixes) that should be ignored\n# while generating the index headers.\n# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.\n\nIGNORE_PREFIX          =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the HTML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output\n# The default value is: YES.\n\nGENERATE_HTML          = YES\n\n# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: html.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_OUTPUT            = html\n\n# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each\n# generated HTML page (for example: .htm, .php, .asp).\n# The default value is: .html.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FILE_EXTENSION    = .html\n\n# The HTML_HEADER tag can be used to specify a user-defined HTML header file for\n# each generated HTML page. If the tag is left blank doxygen will generate a\n# standard header.\n#\n# To get valid HTML the header file that includes any scripts and style sheets\n# that doxygen needs, which is dependent on the configuration options used (e.g.\n# the setting GENERATE_TREEVIEW). It is highly recommended to start with a\n# default header using\n# doxygen -w html new_header.html new_footer.html new_stylesheet.css\n# YourConfigFile\n# and then modify the file new_header.html. See also section \"Doxygen usage\"\n# for information on how to generate the default header that doxygen normally\n# uses.\n# Note: The header is subject to change so you typically have to regenerate the\n# default header when upgrading to a newer version of doxygen. For a description\n# of the possible markers and block names see the documentation.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_HEADER            =\n\n# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each\n# generated HTML page. If the tag is left blank doxygen will generate a standard\n# footer. See HTML_HEADER for more information on how to generate a default\n# footer and what special commands can be used inside the footer. See also\n# section \"Doxygen usage\" for information on how to generate the default footer\n# that doxygen normally uses.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_FOOTER            =\n\n# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style\n# sheet that is used by each HTML page. It can be used to fine-tune the look of\n# the HTML output. If left blank doxygen will generate a default style sheet.\n# See also section \"Doxygen usage\" for information on how to generate the style\n# sheet that doxygen normally uses.\n# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as\n# it is more robust and this tag (HTML_STYLESHEET) will in the future become\n# obsolete.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_STYLESHEET        =\n\n# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined\n# cascading style sheets that are included after the standard style sheets\n# created by doxygen. Using this option one can overrule certain style aspects.\n# This is preferred over using HTML_STYLESHEET since it does not replace the\n# standard style sheet and is therefore more robust against future updates.\n# Doxygen will copy the style sheet files to the output directory.\n# Note: The order of the extra style sheet files is of importance (e.g. the last\n# style sheet in the list overrules the setting of the previous ones in the\n# list). For an example see the documentation.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_EXTRA_STYLESHEET  =\n\n# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the HTML output directory. Note\n# that these files will be copied to the base HTML output directory. Use the\n# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n# files. In the HTML_STYLESHEET file, use the file name only. Also note that the\n# files will be copied as-is; there are no commands or markers available.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_EXTRA_FILES       =\n\n# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen\n# will adjust the colors in the style sheet and background images according to\n# this color. Hue is specified as an angle on a colorwheel, see\n# http://en.wikipedia.org/wiki/Hue for more information. For instance the value\n# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300\n# purple, and 360 is red again.\n# Minimum value: 0, maximum value: 359, default value: 220.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_HUE    = 220\n\n# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors\n# in the HTML output. For a value of 0 the output will use grayscales only. A\n# value of 255 will produce the most vivid colors.\n# Minimum value: 0, maximum value: 255, default value: 100.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_SAT    = 100\n\n# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the\n# luminance component of the colors in the HTML output. Values below 100\n# gradually make the output lighter, whereas values above 100 make the output\n# darker. The value divided by 100 is the actual gamma applied, so 80 represents\n# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not\n# change the gamma.\n# Minimum value: 40, maximum value: 240, default value: 80.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_COLORSTYLE_GAMMA  = 80\n\n# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML\n# page will contain the date and time when the page was generated. Setting this\n# to NO can help when comparing the output of multiple runs.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_TIMESTAMP         = YES\n\n# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML\n# documentation will contain sections that can be hidden and shown after the\n# page has loaded.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_DYNAMIC_SECTIONS  = NO\n\n# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries\n# shown in the various tree structured indices initially; the user can expand\n# and collapse entries dynamically later on. Doxygen will expand the tree to\n# such a level that at most the specified number of entries are visible (unless\n# a fully collapsed tree already exceeds this amount). So setting the number of\n# entries 1 will produce a full collapsed tree by default. 0 is a special value\n# representing an infinite number of entries and will result in a full expanded\n# tree by default.\n# Minimum value: 0, maximum value: 9999, default value: 100.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nHTML_INDEX_NUM_ENTRIES = 100\n\n# If the GENERATE_DOCSET tag is set to YES, additional index files will be\n# generated that can be used as input for Apple's Xcode 3 integrated development\n# environment (see: http://developer.apple.com/tools/xcode/), introduced with\n# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a\n# Makefile in the HTML output directory. Running make will produce the docset in\n# that directory and running make install will install the docset in\n# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at\n# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html\n# for more information.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_DOCSET        = NO\n\n# This tag determines the name of the docset feed. A documentation feed provides\n# an umbrella under which multiple documentation sets from a single provider\n# (such as a company or product suite) can be grouped.\n# The default value is: Doxygen generated docs.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_FEEDNAME        = \"Doxygen generated docs\"\n\n# This tag specifies a string that should uniquely identify the documentation\n# set bundle. This should be a reverse domain-name style string, e.g.\n# com.mycompany.MyDocSet. Doxygen will append .docset to the name.\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_BUNDLE_ID       = org.doxygen.Project\n\n# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify\n# the documentation publisher. This should be a reverse domain-name style\n# string, e.g. com.mycompany.MyDocSet.documentation.\n# The default value is: org.doxygen.Publisher.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_PUBLISHER_ID    = org.doxygen.Publisher\n\n# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.\n# The default value is: Publisher.\n# This tag requires that the tag GENERATE_DOCSET is set to YES.\n\nDOCSET_PUBLISHER_NAME  = Publisher\n\n# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three\n# additional HTML index files: index.hhp, index.hhc, and index.hhk. The\n# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop\n# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on\n# Windows.\n#\n# The HTML Help Workshop contains a compiler that can convert all HTML output\n# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML\n# files are now used as the Windows 98 help format, and will replace the old\n# Windows help format (.hlp) on all Windows platforms in the future. Compressed\n# HTML files also contain an index, a table of contents, and you can search for\n# words in the documentation. The HTML workshop also contains a viewer for\n# compressed HTML files.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_HTMLHELP      = NO\n\n# The CHM_FILE tag can be used to specify the file name of the resulting .chm\n# file. You can add a path in front of the file if the result should not be\n# written to the html output directory.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nCHM_FILE               =\n\n# The HHC_LOCATION tag can be used to specify the location (absolute path\n# including file name) of the HTML help compiler (hhc.exe). If non-empty,\n# doxygen will try to run the HTML help compiler on the generated index.hhp.\n# The file has to be specified with full path.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nHHC_LOCATION           =\n\n# The GENERATE_CHI flag controls if a separate .chi index file is generated\n# (YES) or that it should be included in the master .chm file (NO).\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nGENERATE_CHI           = NO\n\n# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)\n# and project file content.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nCHM_INDEX_ENCODING     =\n\n# The BINARY_TOC flag controls whether a binary table of contents is generated\n# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it\n# enables the Previous and Next buttons.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nBINARY_TOC             = NO\n\n# The TOC_EXPAND flag can be set to YES to add extra items for group members to\n# the table of contents of the HTML help documentation and to the tree view.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTMLHELP is set to YES.\n\nTOC_EXPAND             = NO\n\n# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and\n# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that\n# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help\n# (.qch) of the generated HTML documentation.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_QHP           = NO\n\n# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify\n# the file name of the resulting .qch file. The path specified is relative to\n# the HTML output folder.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQCH_FILE               =\n\n# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help\n# Project output. For more information please see Qt Help Project / Namespace\n# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_NAMESPACE          =\n\n# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt\n# Help Project output. For more information please see Qt Help Project / Virtual\n# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-\n# folders).\n# The default value is: doc.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_VIRTUAL_FOLDER     = doc\n\n# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom\n# filter to add. For more information please see Qt Help Project / Custom\n# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-\n# filters).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_CUST_FILTER_NAME   =\n\n# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the\n# custom filter to add. For more information please see Qt Help Project / Custom\n# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-\n# filters).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_CUST_FILTER_ATTRS  =\n\n# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this\n# project's filter section matches. Qt Help Project / Filter Attributes (see:\n# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHP_SECT_FILTER_ATTRS  =\n\n# The QHG_LOCATION tag can be used to specify the location of Qt's\n# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the\n# generated .qhp file.\n# This tag requires that the tag GENERATE_QHP is set to YES.\n\nQHG_LOCATION           =\n\n# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be\n# generated, together with the HTML files, they form an Eclipse help plugin. To\n# install this plugin and make it available under the help contents menu in\n# Eclipse, the contents of the directory containing the HTML and XML files needs\n# to be copied into the plugins directory of eclipse. The name of the directory\n# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.\n# After copying Eclipse needs to be restarted before the help appears.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_ECLIPSEHELP   = NO\n\n# A unique identifier for the Eclipse help plugin. When installing the plugin\n# the directory name containing the HTML and XML files should also have this\n# name. Each documentation set should have its own identifier.\n# The default value is: org.doxygen.Project.\n# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.\n\nECLIPSE_DOC_ID         = org.doxygen.Project\n\n# If you want full control over the layout of the generated HTML pages it might\n# be necessary to disable the index and replace it with your own. The\n# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top\n# of each HTML page. A value of NO enables the index and the value YES disables\n# it. Since the tabs in the index contain the same information as the navigation\n# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nDISABLE_INDEX          = NO\n\n# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index\n# structure should be generated to display hierarchical information. If the tag\n# value is set to YES, a side panel will be generated containing a tree-like\n# index structure (just like the one that is generated for HTML Help). For this\n# to work a browser that supports JavaScript, DHTML, CSS and frames is required\n# (i.e. any modern browser). Windows users are probably better off using the\n# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can\n# further fine-tune the look of the index. As an example, the default style\n# sheet generated by doxygen has an example that shows how to put an image at\n# the root of the tree instead of the PROJECT_NAME. Since the tree basically has\n# the same information as the tab index, you could consider setting\n# DISABLE_INDEX to YES when enabling this option.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nGENERATE_TREEVIEW      = NO\n\n# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that\n# doxygen will group on one line in the generated HTML documentation.\n#\n# Note that a value of 0 will completely suppress the enum values from appearing\n# in the overview section.\n# Minimum value: 0, maximum value: 20, default value: 4.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nENUM_VALUES_PER_LINE   = 4\n\n# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used\n# to set the initial width (in pixels) of the frame in which the tree is shown.\n# Minimum value: 0, maximum value: 1500, default value: 250.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nTREEVIEW_WIDTH         = 250\n\n# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to\n# external symbols imported via tag files in a separate window.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nEXT_LINKS_IN_WINDOW    = NO\n\n# Use this tag to change the font size of LaTeX formulas included as images in\n# the HTML documentation. When you change the font size after a successful\n# doxygen run you need to manually remove any form_*.png images from the HTML\n# output directory to force them to be regenerated.\n# Minimum value: 8, maximum value: 50, default value: 10.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nFORMULA_FONTSIZE       = 10\n\n# Use the FORMULA_TRANPARENT tag to determine whether or not the images\n# generated for formulas are transparent PNGs. Transparent PNGs are not\n# supported properly for IE 6.0, but are supported on all modern browsers.\n#\n# Note that when changing this option you need to delete any form_*.png files in\n# the HTML output directory before the changes have effect.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nFORMULA_TRANSPARENT    = YES\n\n# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see\n# http://www.mathjax.org) which uses client side Javascript for the rendering\n# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX\n# installed or if you want to formulas look prettier in the HTML output. When\n# enabled you may also need to install MathJax separately and configure the path\n# to it using the MATHJAX_RELPATH option.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nUSE_MATHJAX            = NO\n\n# When MathJax is enabled you can set the default output format to be used for\n# the MathJax output. See the MathJax site (see:\n# http://docs.mathjax.org/en/latest/output.html) for more details.\n# Possible values are: HTML-CSS (which is slower, but has the best\n# compatibility), NativeMML (i.e. MathML) and SVG.\n# The default value is: HTML-CSS.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_FORMAT         = HTML-CSS\n\n# When MathJax is enabled you need to specify the location relative to the HTML\n# output directory using the MATHJAX_RELPATH option. The destination directory\n# should contain the MathJax.js script. For instance, if the mathjax directory\n# is located at the same level as the HTML output directory, then\n# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax\n# Content Delivery Network so you can quickly see the result without installing\n# MathJax. However, it is strongly recommended to install a local copy of\n# MathJax from http://www.mathjax.org before deployment.\n# The default value is: http://cdn.mathjax.org/mathjax/latest.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest\n\n# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax\n# extension names that should be enabled during MathJax rendering. For example\n# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_EXTENSIONS     =\n\n# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces\n# of code that will be used on startup of the MathJax code. See the MathJax site\n# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an\n# example see the documentation.\n# This tag requires that the tag USE_MATHJAX is set to YES.\n\nMATHJAX_CODEFILE       =\n\n# When the SEARCHENGINE tag is enabled doxygen will generate a search box for\n# the HTML output. The underlying search engine uses javascript and DHTML and\n# should work on any modern browser. Note that when using HTML help\n# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)\n# there is already a search function so this one should typically be disabled.\n# For large projects the javascript based search engine can be slow, then\n# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to\n# search using the keyboard; to jump to the search box use <access key> + S\n# (what the <access key> is depends on the OS and browser, but it is typically\n# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down\n# key> to jump into the search results window, the results can be navigated\n# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel\n# the search. The filter options can be selected when the cursor is inside the\n# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>\n# to select a filter and <Enter> or <escape> to activate or cancel the filter\n# option.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_HTML is set to YES.\n\nSEARCHENGINE           = NO\n\n# When the SERVER_BASED_SEARCH tag is enabled the search engine will be\n# implemented using a web server instead of a web client using Javascript. There\n# are two flavors of web server based searching depending on the EXTERNAL_SEARCH\n# setting. When disabled, doxygen will generate a PHP script for searching and\n# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing\n# and searching needs to be provided by external tools. See the section\n# \"External Indexing and Searching\" for details.\n# The default value is: NO.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSERVER_BASED_SEARCH    = NO\n\n# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP\n# script for searching. Instead the search results are written to an XML file\n# which needs to be processed by an external indexer. Doxygen will invoke an\n# external search engine pointed to by the SEARCHENGINE_URL option to obtain the\n# search results.\n#\n# Doxygen ships with an example indexer (doxyindexer) and search engine\n# (doxysearch.cgi) which are based on the open source search engine library\n# Xapian (see: http://xapian.org/).\n#\n# See the section \"External Indexing and Searching\" for details.\n# The default value is: NO.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTERNAL_SEARCH        = NO\n\n# The SEARCHENGINE_URL should point to a search engine hosted by a web server\n# which will return the search results when EXTERNAL_SEARCH is enabled.\n#\n# Doxygen ships with an example indexer (doxyindexer) and search engine\n# (doxysearch.cgi) which are based on the open source search engine library\n# Xapian (see: http://xapian.org/). See the section \"External Indexing and\n# Searching\" for details.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSEARCHENGINE_URL       =\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed\n# search data is written to a file for indexing by an external tool. With the\n# SEARCHDATA_FILE tag the name of this file can be specified.\n# The default file is: searchdata.xml.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nSEARCHDATA_FILE        = searchdata.xml\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the\n# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is\n# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple\n# projects and redirect the results back to the right project.\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTERNAL_SEARCH_ID     =\n\n# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen\n# projects other than the one defined by this configuration file, but that are\n# all added to the same external search index. Each project needs to have a\n# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of\n# to a relative location where the documentation can be found. The format is:\n# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...\n# This tag requires that the tag SEARCHENGINE is set to YES.\n\nEXTRA_SEARCH_MAPPINGS  =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.\n# The default value is: YES.\n\nGENERATE_LATEX         = @LATEX_FOUND@\n\n# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: latex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_OUTPUT           = latex\n\n# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be\n# invoked.\n#\n# Note that when enabling USE_PDFLATEX this option is only used for generating\n# bitmaps for formulas in the HTML output, but not in the Makefile that is\n# written to the output directory.\n# The default file is: latex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_CMD_NAME         = @LATEX_COMPILER@\n\n# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate\n# index for LaTeX.\n# The default file is: makeindex.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nMAKEINDEX_CMD_NAME     =\n\n# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX\n# documents. This may be useful for small projects and may help to save some\n# trees in general.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nCOMPACT_LATEX          = NO\n\n# The PAPER_TYPE tag can be used to set the paper type that is used by the\n# printer.\n# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x\n# 14 inches) and executive (7.25 x 10.5 inches).\n# The default value is: a4.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nPAPER_TYPE             = letter\n\n# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names\n# that should be included in the LaTeX output. To get the times font for\n# instance you can specify\n# EXTRA_PACKAGES=times\n# If left blank no extra packages will be included.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nEXTRA_PACKAGES         =\n\n# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the\n# generated LaTeX document. The header should contain everything until the first\n# chapter. If it is left blank doxygen will generate a standard header. See\n# section \"Doxygen usage\" for information on how to let doxygen write the\n# default header to a separate file.\n#\n# Note: Only use a user-defined header if you know what you are doing! The\n# following commands have a special meaning inside the header: $title,\n# $datetime, $date, $doxygenversion, $projectname, $projectnumber,\n# $projectbrief, $projectlogo. Doxygen will replace $title with the empty\n# string, for the replacement values of the other commands the user is referred\n# to HTML_HEADER.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_HEADER           =\n\n# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the\n# generated LaTeX document. The footer should contain everything after the last\n# chapter. If it is left blank doxygen will generate a standard footer. See\n# LATEX_HEADER for more information on how to generate a default footer and what\n# special commands can be used inside the footer.\n#\n# Note: Only use a user-defined footer if you know what you are doing!\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_FOOTER           =\n\n# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined\n# LaTeX style sheets that are included after the standard style sheets created\n# by doxygen. Using this option one can overrule certain style aspects. Doxygen\n# will copy the style sheet files to the output directory.\n# Note: The order of the extra style sheet files is of importance (e.g. the last\n# style sheet in the list overrules the setting of the previous ones in the\n# list).\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_EXTRA_STYLESHEET =\n\n# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the LATEX_OUTPUT output\n# directory. Note that the files will be copied as-is; there are no commands or\n# markers available.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_EXTRA_FILES      =\n\n# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is\n# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will\n# contain links (just like the HTML output) instead of page references. This\n# makes the output suitable for online browsing using a PDF viewer.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nPDF_HYPERLINKS         = YES\n\n# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate\n# the PDF file directly from the LaTeX files. Set this option to YES, to get a\n# higher quality PDF documentation.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nUSE_PDFLATEX           = YES\n\n# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode\n# command to the generated LaTeX files. This will instruct LaTeX to keep running\n# if errors occur, instead of asking the user for help. This option is also used\n# when generating formulas in HTML.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_BATCHMODE        = NO\n\n# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the\n# index chapters (such as File Index, Compound Index, etc.) in the output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_HIDE_INDICES     = NO\n\n# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source\n# code with syntax highlighting in the LaTeX output.\n#\n# Note that which sources are shown also depends on other settings such as\n# SOURCE_BROWSER.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_SOURCE_CODE      = NO\n\n# The LATEX_BIB_STYLE tag can be used to specify the style to use for the\n# bibliography, e.g. plainnat, or ieeetr. See\n# http://en.wikipedia.org/wiki/BibTeX and \\cite for more info.\n# The default value is: plain.\n# This tag requires that the tag GENERATE_LATEX is set to YES.\n\nLATEX_BIB_STYLE        = plain\n\n#---------------------------------------------------------------------------\n# Configuration options related to the RTF output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The\n# RTF output is optimized for Word 97 and may not look too pretty with other RTF\n# readers/editors.\n# The default value is: NO.\n\nGENERATE_RTF           = NO\n\n# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: rtf.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_OUTPUT             = rtf\n\n# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF\n# documents. This may be useful for small projects and may help to save some\n# trees in general.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nCOMPACT_RTF            = NO\n\n# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will\n# contain hyperlink fields. The RTF file will contain links (just like the HTML\n# output) instead of page references. This makes the output suitable for online\n# browsing using Word or some other Word compatible readers that support those\n# fields.\n#\n# Note: WordPad (write) and others do not support links.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_HYPERLINKS         = NO\n\n# Load stylesheet definitions from file. Syntax is similar to doxygen's config\n# file, i.e. a series of assignments. You only have to provide replacements,\n# missing definitions are set to their default value.\n#\n# See also section \"Doxygen usage\" for information on how to generate the\n# default style sheet that doxygen normally uses.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_STYLESHEET_FILE    =\n\n# Set optional variables used in the generation of an RTF document. Syntax is\n# similar to doxygen's config file. A template extensions file can be generated\n# using doxygen -e rtf extensionFile.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_EXTENSIONS_FILE    =\n\n# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code\n# with syntax highlighting in the RTF output.\n#\n# Note that which sources are shown also depends on other settings such as\n# SOURCE_BROWSER.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_RTF is set to YES.\n\nRTF_SOURCE_CODE        = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the man page output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for\n# classes and files.\n# The default value is: NO.\n\nGENERATE_MAN           = NO\n\n# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it. A directory man3 will be created inside the directory specified by\n# MAN_OUTPUT.\n# The default directory is: man.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_OUTPUT             = man\n\n# The MAN_EXTENSION tag determines the extension that is added to the generated\n# man pages. In case the manual section does not start with a number, the number\n# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is\n# optional.\n# The default value is: .3.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_EXTENSION          = .3\n\n# The MAN_SUBDIR tag determines the name of the directory created within\n# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by\n# MAN_EXTENSION with the initial . removed.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_SUBDIR             =\n\n# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it\n# will generate one additional man file for each entity documented in the real\n# man page(s). These additional files only source the real man page, but without\n# them the man command would be unable to find the correct page.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_MAN is set to YES.\n\nMAN_LINKS              = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the XML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that\n# captures the structure of the code including all documentation.\n# The default value is: NO.\n\nGENERATE_XML           = NO\n\n# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a\n# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of\n# it.\n# The default directory is: xml.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_OUTPUT             = xml\n\n# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program\n# listings (including syntax highlighting and cross-referencing information) to\n# the XML output. Note that enabling this will significantly increase the size\n# of the XML output.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_XML is set to YES.\n\nXML_PROGRAMLISTING     = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to the DOCBOOK output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files\n# that can be used to generate PDF.\n# The default value is: NO.\n\nGENERATE_DOCBOOK       = NO\n\n# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in\n# front of it.\n# The default directory is: docbook.\n# This tag requires that the tag GENERATE_DOCBOOK is set to YES.\n\nDOCBOOK_OUTPUT         = docbook\n\n# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the\n# program listings (including syntax highlighting and cross-referencing\n# information) to the DOCBOOK output. Note that enabling this will significantly\n# increase the size of the DOCBOOK output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_DOCBOOK is set to YES.\n\nDOCBOOK_PROGRAMLISTING = NO\n\n#---------------------------------------------------------------------------\n# Configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an\n# AutoGen Definitions (see http://autogen.sf.net) file that captures the\n# structure of the code including all documentation. Note that this feature is\n# still experimental and incomplete at the moment.\n# The default value is: NO.\n\nGENERATE_AUTOGEN_DEF   = NO\n\n#---------------------------------------------------------------------------\n# Configuration options related to the Perl module output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module\n# file that captures the structure of the code including all documentation.\n#\n# Note that this feature is still experimental and incomplete at the moment.\n# The default value is: NO.\n\nGENERATE_PERLMOD       = NO\n\n# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary\n# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI\n# output from the Perl module output.\n# The default value is: NO.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_LATEX          = NO\n\n# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely\n# formatted so it can be parsed by a human reader. This is useful if you want to\n# understand what is going on. On the other hand, if this tag is set to NO, the\n# size of the Perl module output will be much smaller and Perl will parse it\n# just the same.\n# The default value is: YES.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_PRETTY         = YES\n\n# The names of the make variables in the generated doxyrules.make file are\n# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful\n# so different doxyrules.make files included by the same Makefile don't\n# overwrite each other's variables.\n# This tag requires that the tag GENERATE_PERLMOD is set to YES.\n\nPERLMOD_MAKEVAR_PREFIX =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor\n#---------------------------------------------------------------------------\n\n# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all\n# C-preprocessor directives found in the sources and include files.\n# The default value is: YES.\n\nENABLE_PREPROCESSING   = YES\n\n# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names\n# in the source code. If set to NO, only conditional compilation will be\n# performed. Macro expansion can be done in a controlled way by setting\n# EXPAND_ONLY_PREDEF to YES.\n# The default value is: NO.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nMACRO_EXPANSION        = NO\n\n# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then\n# the macro expansion is limited to the macros specified with the PREDEFINED and\n# EXPAND_AS_DEFINED tags.\n# The default value is: NO.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nEXPAND_ONLY_PREDEF     = NO\n\n# If the SEARCH_INCLUDES tag is set to YES, the include files in the\n# INCLUDE_PATH will be searched if a #include is found.\n# The default value is: YES.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nSEARCH_INCLUDES        = YES\n\n# The INCLUDE_PATH tag can be used to specify one or more directories that\n# contain include files that are not input files but should be processed by the\n# preprocessor.\n# This tag requires that the tag SEARCH_INCLUDES is set to YES.\n\nINCLUDE_PATH           =\n\n# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard\n# patterns (like *.h and *.hpp) to filter out the header-files in the\n# directories. If left blank, the patterns specified with FILE_PATTERNS will be\n# used.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nINCLUDE_FILE_PATTERNS  =\n\n# The PREDEFINED tag can be used to specify one or more macro names that are\n# defined before the preprocessor is started (similar to the -D option of e.g.\n# gcc). The argument of the tag is a list of macros of the form: name or\n# name=definition (no spaces). If the definition and the \"=\" are omitted, \"=1\"\n# is assumed. To prevent a macro definition from being undefined via #undef or\n# recursively expanded use the := operator instead of the = operator.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nPREDEFINED             = DOXYGEN_SHOULD_SKIP_THIS MADNESS_TASK_PROFILING \\\n                         HAVE_INTEL_TBB\n\n# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this\n# tag can be used to specify a list of macro names that should be expanded. The\n# macro definition that is found in the sources will be used. Use the PREDEFINED\n# tag if you want to use a different macro definition that overrules the\n# definition found in the source code.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nEXPAND_AS_DEFINED      =\n\n# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will\n# remove all references to function-like macros that are alone on a line, have\n# an all uppercase name, and do not end with a semicolon. Such function macros\n# are typically used for boiler-plate code, and will confuse the parser if not\n# removed.\n# The default value is: YES.\n# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.\n\nSKIP_FUNCTION_MACROS   = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to external references\n#---------------------------------------------------------------------------\n\n# The TAGFILES tag can be used to specify one or more tag files. For each tag\n# file the location of the external documentation should be added. The format of\n# a tag file without this location is as follows:\n# TAGFILES = file1 file2 ...\n# Adding location for the tag files is done as follows:\n# TAGFILES = file1=loc1 \"file2 = loc2\" ...\n# where loc1 and loc2 can be relative or absolute paths or URLs. See the\n# section \"Linking to external documentation\" for more information about the use\n# of tag files.\n# Note: Each tag file must have a unique name (where the name does NOT include\n# the path). If a tag file is not located in the directory in which doxygen is\n# run, you must also specify the path to the tagfile here.\n\nTAGFILES               =\n\n# When a file name is specified after GENERATE_TAGFILE, doxygen will create a\n# tag file that is based on the input files it reads. See section \"Linking to\n# external documentation\" for more information about the usage of tag files.\n\nGENERATE_TAGFILE       =\n\n# If the ALLEXTERNALS tag is set to YES, all external class will be listed in\n# the class index. If set to NO, only the inherited external classes will be\n# listed.\n# The default value is: NO.\n\nALLEXTERNALS           = NO\n\n# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed\n# in the modules index. If set to NO, only the current project's groups will be\n# listed.\n# The default value is: YES.\n\nEXTERNAL_GROUPS        = YES\n\n# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in\n# the related pages index. If set to NO, only the current project's pages will\n# be listed.\n# The default value is: YES.\n\nEXTERNAL_PAGES         = YES\n\n# The PERL_PATH should be the absolute path and name of the perl script\n# interpreter (i.e. the result of 'which perl').\n# The default file (with absolute path) is: /usr/bin/perl.\n\nPERL_PATH              = /usr/bin/perl\n\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool\n#---------------------------------------------------------------------------\n\n# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram\n# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to\n# NO turns the diagrams off. Note that this option also works with HAVE_DOT\n# disabled, but it is recommended to install and use dot, since it yields more\n# powerful graphs.\n# The default value is: YES.\n\nCLASS_DIAGRAMS         = YES\n\n# You can define message sequence charts within doxygen comments using the \\msc\n# command. Doxygen will then run the mscgen tool (see:\n# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the\n# documentation. The MSCGEN_PATH tag allows you to specify the directory where\n# the mscgen tool resides. If left empty the tool is assumed to be found in the\n# default search path.\n\nMSCGEN_PATH            =\n\n# You can include diagrams made with dia in doxygen documentation. Doxygen will\n# then run dia to produce the diagram and insert it in the documentation. The\n# DIA_PATH tag allows you to specify the directory where the dia binary resides.\n# If left empty dia is assumed to be found in the default search path.\n\nDIA_PATH               =\n\n# If set to YES the inheritance and collaboration graphs will hide inheritance\n# and usage relations if the target is undocumented or is not a class.\n# The default value is: YES.\n\nHIDE_UNDOC_RELATIONS   = YES\n\n# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is\n# available from the path. This tool is part of Graphviz (see:\n# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent\n# Bell Labs. The other options in this section have no effect if this option is\n# set to NO\n# The default value is: NO.\n\nHAVE_DOT               = @DOXYGEN_DOT_FOUND@\n\n# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed\n# to run in parallel. When set to 0 doxygen will base this on the number of\n# processors available in the system. You can set it explicitly to a value\n# larger than 0 to get control over the balance between CPU load and processing\n# speed.\n# Minimum value: 0, maximum value: 32, default value: 0.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_NUM_THREADS        = 10\n\n# When you want a differently looking font in the dot files that doxygen\n# generates you can specify the font name using DOT_FONTNAME. You need to make\n# sure dot is able to find the font, which can be done by putting it in a\n# standard location or by setting the DOTFONTPATH environment variable or by\n# setting DOT_FONTPATH to the directory containing the font.\n# The default value is: Helvetica.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTNAME           = FreeSans\n\n# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of\n# dot graphs.\n# Minimum value: 4, maximum value: 24, default value: 10.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTSIZE           = 10\n\n# By default doxygen will tell dot to use the default font as specified with\n# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set\n# the path where dot can find it using this tag.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_FONTPATH           =\n\n# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for\n# each documented class showing the direct and indirect inheritance relations.\n# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCLASS_GRAPH            = YES\n\n# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a\n# graph for each documented class showing the direct and indirect implementation\n# dependencies (inheritance, containment, and class references variables) of the\n# class with other documented classes.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCOLLABORATION_GRAPH    = YES\n\n# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for\n# groups, showing the direct groups dependencies.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGROUP_GRAPHS           = YES\n\n# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and\n# collaboration diagrams in a style similar to the OMG's Unified Modeling\n# Language.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nUML_LOOK               = NO\n\n# If the UML_LOOK tag is enabled, the fields and methods are shown inside the\n# class node. If there are many fields or methods and many nodes the graph may\n# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the\n# number of items for each type to make the size more manageable. Set this to 0\n# for no limit. Note that the threshold may be exceeded by 50% before the limit\n# is enforced. So when you set the threshold to 10, up to 15 fields may appear,\n# but if the number exceeds 15, the total amount of fields shown is limited to\n# 10.\n# Minimum value: 0, maximum value: 100, default value: 10.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nUML_LIMIT_NUM_FIELDS   = 10\n\n# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and\n# collaboration graphs will show the relations between templates and their\n# instances.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nTEMPLATE_RELATIONS     = NO\n\n# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to\n# YES then doxygen will generate a graph for each documented file showing the\n# direct and indirect include dependencies of the file with other documented\n# files.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINCLUDE_GRAPH          = YES\n\n# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are\n# set to YES then doxygen will generate a graph for each documented file showing\n# the direct and indirect include dependencies of the file with other documented\n# files.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINCLUDED_BY_GRAPH      = YES\n\n# If the CALL_GRAPH tag is set to YES then doxygen will generate a call\n# dependency graph for every global function or class method.\n#\n# Note that enabling this option will significantly increase the time of a run.\n# So in most cases it will be better to enable call graphs for selected\n# functions only using the \\callgraph command.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCALL_GRAPH             = NO\n\n# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller\n# dependency graph for every global function or class method.\n#\n# Note that enabling this option will significantly increase the time of a run.\n# So in most cases it will be better to enable caller graphs for selected\n# functions only using the \\callergraph command.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nCALLER_GRAPH           = NO\n\n# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical\n# hierarchy of all classes instead of a textual one.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGRAPHICAL_HIERARCHY    = YES\n\n# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the\n# dependencies a directory has on other directories in a graphical way. The\n# dependency relations are determined by the #include relations between the\n# files in the directories.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDIRECTORY_GRAPH        = YES\n\n# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n# generated by dot.\n# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order\n# to make the SVG files visible in IE 9+ (other browsers do not have this\n# requirement).\n# Possible values are: png, jpg, gif and svg.\n# The default value is: png.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_IMAGE_FORMAT       = png\n\n# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to\n# enable generation of interactive SVG images that allow zooming and panning.\n#\n# Note that this requires a modern browser other than Internet Explorer. Tested\n# and working are Firefox, Chrome, Safari, and Opera.\n# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make\n# the SVG files visible. Older versions of IE do not have SVG support.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nINTERACTIVE_SVG        = NO\n\n# The DOT_PATH tag can be used to specify the path where the dot tool can be\n# found. If left blank, it is assumed the dot tool can be found in the path.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_PATH               = @DOXYGEN_DOT_EXECUTABLE@\n\n# The DOTFILE_DIRS tag can be used to specify one or more directories that\n# contain dot files that are included in the documentation (see the \\dotfile\n# command).\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOTFILE_DIRS           =\n\n# The MSCFILE_DIRS tag can be used to specify one or more directories that\n# contain msc files that are included in the documentation (see the \\mscfile\n# command).\n\nMSCFILE_DIRS           =\n\n# The DIAFILE_DIRS tag can be used to specify one or more directories that\n# contain dia files that are included in the documentation (see the \\diafile\n# command).\n\nDIAFILE_DIRS           =\n\n# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the\n# path where java can find the plantuml.jar file. If left blank, it is assumed\n# PlantUML is not used or called during a preprocessing step. Doxygen will\n# generate a warning when it encounters a \\startuml command in this case and\n# will not generate output for the diagram.\n\nPLANTUML_JAR_PATH      =\n\n# When using plantuml, the specified paths are searched for files specified by\n# the !include statement in a plantuml block.\n\nPLANTUML_INCLUDE_PATH  =\n\n# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes\n# that will be shown in the graph. If the number of nodes in a graph becomes\n# larger than this value, doxygen will truncate the graph, which is visualized\n# by representing a node as a red box. Note that doxygen if the number of direct\n# children of the root node in a graph is already larger than\n# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that\n# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.\n# Minimum value: 0, maximum value: 10000, default value: 50.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_GRAPH_MAX_NODES    = 50\n\n# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs\n# generated by dot. A depth value of 3 means that only nodes reachable from the\n# root by following a path via at most 3 edges will be shown. Nodes that lay\n# further from the root node will be omitted. Note that setting this option to 1\n# or 2 may greatly reduce the computation time needed for large code bases. Also\n# note that the size of a graph can be further restricted by\n# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.\n# Minimum value: 0, maximum value: 1000, default value: 0.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nMAX_DOT_GRAPH_DEPTH    = 0\n\n# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent\n# background. This is disabled by default, because dot on Windows does not seem\n# to support this out of the box.\n#\n# Warning: Depending on the platform used, enabling this option may lead to\n# badly anti-aliased labels on the edges of a graph (i.e. they become hard to\n# read).\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_TRANSPARENT        = YES\n\n# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output\n# files in one run (i.e. multiple -o and -T options on the command line). This\n# makes dot run faster, but since only newer versions of dot (>1.8.10) support\n# this, this feature is disabled by default.\n# The default value is: NO.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_MULTI_TARGETS      = NO\n\n# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page\n# explaining the meaning of the various boxes and arrows in the dot generated\n# graphs.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nGENERATE_LEGEND        = YES\n\n# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot\n# files that are used to generate the various graphs.\n# The default value is: YES.\n# This tag requires that the tag HAVE_DOT is set to YES.\n\nDOT_CLEANUP            = YES\n"
  },
  {
    "path": "cmake/madness-config.cmake.in",
    "content": "# - CMAKE Config file for the MADNESS package\n#\n# Valid COMPONENTS: world tensor misc tensor linalg tinyxml muparser mra chem\n#\n# The following variables are defined:\n#  madness_FOUND                - System has the MADNESS package\n#  madness_INCLUDE_DIRS         - The MADNESS include directory\n#  madness_LIBRARIES            - The MADNESS libraries and their dependencies\n#  madness_INSTALL_LIBRARY_DIR  - Where MADNESS libraries will be installed (same for CONFIG files imported from the build and install trees)\n#  madness_<COMPONENT>_FOUND    - System has the specified MADNESS COMPONENT\n#  madness_<COMPONENT>_LIBRARY  - The MADNESS COMPONENT library\n#  madness_F77_INTEGER_SIZE     - The default F77 integer size used for BLAS calls\n#  madness_ASSUMES_ASLR_DISABLED - Whether MADNESS assumes ASLR to be disabled\n#\n# Additionally MADNESS exports the following variables from its dependent packages:\n# = LAPACK =\n#    LAPACK_LIBRARIES           Libraries providing LAPACK and its dependents\n#    LAPACK_INCLUDE_DIRS        Include directories where to locate the header files needed to use LAPACK_LIBRARIES\n#    LAPACK_COMPILE_DEFINITIONS Compile definitions needed to use the LAPACK header files\n#    LAPACK_COMPILE_OPTIONS     Compile options needed to use the LAPACK header files\n# = MPI =\n#    MPIEXEC_EXECUTABLE         Executable for running MPI programs\n#    MPIEXEC_NUMPROC_FLAG       Flag to pass to MPIEXEC_EXECUTABLE before giving\n#                               it the number of processors to run on\n#    MPIEXEC_PREFLAGS           Flags to pass to MPIEXEC_EXECUTABLE directly\n#                               before the executable to run.\n#    MPIEXEC_POSTFLAGS          Flags to pass to MPIEXEC_EXECUTABLE after other flags\n\n# Set package version\nset(madness_VERSION \"@MADNESS_VERSION@\")\n\n@PACKAGE_INIT@\n\nset(madness_CMAKE_TOOLCHAIN_FILE \"@CMAKE_TOOLCHAIN_FILE@\")\n\n# ensure that CMAKE_SYSTEM_NAME matches what was used to compile MADNESS\nif (NOT CMAKE_SYSTEM_NAME STREQUAL @CMAKE_SYSTEM_NAME@)\n  set (ERROR_MESSAGE \"CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}, does not match CMAKE_SYSTEM_NAME=@CMAKE_SYSTEM_NAME@ used to compile MADNESS\")\n  if (madness_CMAKE_TOOLCHAIN_FILE)\n    set (ERROR_MESSAGE \"${ERROR_MESSAGE}; make sure to use toolchain @CMAKE_TOOLCHAIN_FILE@ to compile your code!\")\n    message (FATAL_ERROR \"${ERROR_MESSAGE}\")\n  endif(madness_CMAKE_TOOLCHAIN_FILE)\nendif()\n\n# check for prereqs:\n# 1. Threads\nif (NOT TARGET Threads::Threads)\n  set(CMAKE_THREAD_PREFER_PTHREAD TRUE)\n  find_package(Threads REQUIRED)\nendif()\n\n# 2. Cereal\nset(madness_HAS_CEREAL @MADNESS_HAS_CEREAL@)\nif (madness_HAS_CEREAL)\n  get_filename_component(cereal_DIR \"@cereal_CONFIG@\" DIRECTORY)\n  find_package(cereal QUIET CONFIG HINTS \"${cereal_DIR}\")\n  if (NOT TARGET cereal)\n    add_library(cereal INTERFACE IMPORTED)\n    set_target_properties(cereal PROPERTIES\n          INTERFACE_INCLUDE_DIRECTORIES \"${cereal_INCLUDE_DIRS}\"\n          INTERFACE_COMPILE_DEFINITIONS \"CEREAL_THREAD_SAFE=1\")\n  endif(NOT TARGET cereal)\nendif(madness_HAS_CEREAL)\n\n# Set the madness libraries target\nset(madness_LIBRARIES madness)\n\nset(madness_SOURCE_DIR \"@MADNESS_SOURCE_DIR@\")\nset(madness_BINARY_DIR \"@MADNESS_BINARY_DIR@\")\n\n# Set Elemental variables\nset(madness_HAS_ELEMENTAL @MADNESS_HAS_ELEMENTAL@)\nset(madness_HAS_ELEMENTAL_EMBEDDED @MADNESS_HAS_ELEMENTAL_EMBEDDED@)\n\nset(madness_INSTALL_LIBRARY_DIR \"@PACKAGE_MADNESS_INSTALL_LIBDIR@\")\nset(madness_BUILD_INCLUDE_DIRS \"${madness_SOURCE_DIR}/src\" \":\" \"${madness_BINARY_DIR}/src\")\nset(madness_INSTALL_INCLUDE_DIRS \"@PACKAGE_MADNESS_INSTALL_INCLUDEDIR@\" \":\"\n      \"@PACKAGE_MADNESS_INSTALL_INCLUDEDIR@/madness/external\")\nset(madness_INSTALL_CMAKEDIR \"@PACKAGE_MADNESS_INSTALL_CMAKEDIR@\")\n\nif (madness_HAS_ELEMENTAL)\n  if(madness_HAS_ELEMENTAL_EMBEDDED)\n    set(Elemental_SOURCE_DIR \"@Elemental_SOURCE_DIR@\")\n    set(Elemental_BINARY_DIR \"@Elemental_BINARY_DIR@\")\n    list(APPEND madness_BUILD_INCLUDE_DIRS\n        \"${Elemental_SOURCE_DIR}/include\" \"${Elemental_BINARY_DIR}/include\"\n        \"${Elemental_SOURCE_DIR}/external/pmrrr/include\"\n        \"${Elemental_BINARY_DIR}/external/pmrrr/include\")\n  else(madness_HAS_ELEMENTAL_EMBEDDED)\n    set(Elemental_SOURCE_DIR \"@ELEMENTAL_SOURCE_DIR@\")\n    set(Elemental_BINARY_DIR \"@ELEMENTAL_BINARY_DIR@\")\n    # elemental package and component name depends on version\n    set(ELEMENTAL_PACKAGE_NAME @ELEMENTAL_PACKAGE_NAME@)\n    set(ELEMENTAL_CONFIGURE_NAME @ELEMENTAL_CONFIG_NAME@)\n    # where to look for elemental cmake config file\n    if(CMAKE_CURRENT_LIST_DIR EQUAL madness_BINARY_DIR)\n      set(Elemental_DIR \"${Elemental_BINARY_DIR}\")\n    else()\n      set(Elemental_DIR \"${PACKAGE_PREFIX_DIR}/CMake/elemental\")\n    endif()\n    find_package(${ELEMENTAL_CONFIGURE_NAME} REQUIRED\n                 COMPONENTS REQUIRED ${ELEMENTAL_PACKAGE_NAME})\n    list(APPEND madness_BUILD_INCLUDE_DIRS\n        \"${Elemental_SOURCE_DIR}/include\" \"${Elemental_BINARY_DIR}/include\"\n        \"${Elemental_SOURCE_DIR}/external/pmrrr/include\"\n        \"${Elemental_BINARY_DIR}/external/pmrrr/include\"\n        \"${Elemental_SOURCE_DIR}/external/pmrrr/suite_sparse\"\n        \"${Elemental_BINARY_DIR}/external/pmrrr/suite_sparse\"\n        )\n  endif(madness_HAS_ELEMENTAL_EMBEDDED)\nendif(madness_HAS_ELEMENTAL)\n\n# define madness_INCLUDE_DIRS according to where we are compiling: MADNESS build tree or outside\n# external packages should use madness_BUILD_INCLUDE_DIRS and madness_INSTALL_INCLUDE_DIRS directly\nif(CMAKE_CURRENT_LIST_DIR EQUAL madness_BINARY_DIR)\n  set(madness_INCLUDE_DIRS \"${madness_BUILD_INCLUDE_DIRS}\")\nelse()\n  set(madness_INCLUDE_DIRS \"${madness_INSTALL_INCLUDE_DIRS}\")\nendif()\n\n# Set the Fortran 77 integer size (4 or 8)\nset(madness_F77_INTEGER_SIZE @FORTRAN_INTEGER_SIZE@)\n\n# whether MADNESS assumes ASLR to be disabled\nset(madness_ASSUMES_ASLR_DISABLED \"@MADNESS_ASSUMES_ASLR_DISABLED@\")\n\n# list of dependencies of MADworld\nset(madness_MADWORLD_INTERFACE_LINK_LIBRARIES \"@MADNESS_MADWORLD_INTERFACE_LINK_LIBRARIES@\")\n\n########### LAPACK ############\n# this is formatted to be added to CMAKE_REQUIRED_LIBRARIES\nset(LAPACK_LIBRARIES \"@PROCESSED_LAPACK_LIBRARIES@\")\nset(LAPACK_INCLUDE_DIRS \"@LAPACK_INCLUDE_DIRS@\")\nset(LAPACK_COMPILE_DEFINITIONS \"@LAPACK_COMPILE_DEFINITIONS@\")\nset(LAPACK_COMPILE_OPTIONS \"@LAPACK_COMPILE_OPTIONS@\")\n\n########### MPI ############\nset(MPIEXEC_EXECUTABLE \"@MPIEXEC_EXECUTABLE@\" CACHE FILEPATH \"Executable for running MPI programs\")\nset(MPIEXEC_NUMPROC_FLAG \"@MPIEXEC_NUMPROC_FLAG@\" CACHE STRING \"Maximum number of processors available to run MPI applications\")\nset(MPIEXEC_PREFLAGS \"@MPIEXEC_PREFLAGS@\" CACHE STRING \"Flag used by MPI to specify the number of processes for mpiexec\")\nset(MPIEXEC_POSTFLAGS \"@MPIEXEC_POSTFLAGS@\" CACHE STRING \"These flags will be placed after all flags passed to mpiexec\")\n# load MPI::MPI_CXX ... also, if MADworld depends on PaRSEC, enable C language and load MPI_C\ncmake_policy(SET CMP0057 NEW)  # treat IN_LIST as operator\nif (MPI::MPI_CXX IN_LIST madness_MADWORLD_INTERFACE_LINK_LIBRARIES)\n    set(_mpi_languages CXX)\nendif()\nif (PaRSEC::parsec IN_LIST madness_MADWORLD_INTERFACE_LINK_LIBRARIES)\n   enable_language(C)\n   list(APPEND _mpi_languages C)\nendif()\nif (DEFINED _mpi_languages)\n        find_package(MPI REQUIRED COMPONENTS \"${_mpi_languages}\")\nendif()\n\n########### PaRSEC ############\nif (PaRSEC::parsec IN_LIST madness_MADWORLD_INTERFACE_LINK_LIBRARIES AND NOT TARGET PaRSEC::parsec)\n    include( CMakeFindDependencyMacro )\n    get_filename_component(_parsec_config_dir \"@PaRSEC_CONFIG@\" DIRECTORY)\n    find_dependency(PaRSEC CONFIG REQUIRED COMPONENTS parsec PATHS \"${_parsec_config_dir}\" NO_DEFAULT_PATH)\nendif()\n\n########### TBB ############\nif (TBB::tbb IN_LIST madness_MADWORLD_INTERFACE_LINK_LIBRARIES)\n   if (NOT TARGET TBB::tbb)\n       include( CMakeFindDependencyMacro )\n       if (NOT \"@TBB_CONFIG@\" STREQUAL \"\")\n           get_filename_component(_tbb_config_dir \"@TBB_CONFIG@\" DIRECTORY)\n           find_dependency(TBB CONFIG REQUIRED COMPONENTS tbb PATHS \"${_tbb_config_dir}\" NO_DEFAULT_PATH)\n       else()\n           # use madness' FindTBB\n           set(_orig_CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\")\n           if(CMAKE_CURRENT_LIST_DIR EQUAL madness_BINARY_DIR)\n               set(madness_MODULE_DIR \"${madness_SOURCE_DIR}/cmake/modules\")\n           else()\n               set(madness_MODULE_DIR \"${madness_INSTALL_CMAKEDIR}/modules\")\n           endif()\n           set(CMAKE_MODULE_PATH \"${madness_MODULE_DIR};${CMAKE_MODULE_PATH}\")\n           get_filename_component(_tbb_root_dir \"@TBB_INCLUDE_DIR@/..\" DIRECTORY)\n           find_dependency(TBB REQUIRED COMPONENTS tbb PATHS \"${_tbb_root_dir}\" NO_DEFAULT_PATH)\n           set(CMAKE_MODULE_PATH \"${_orig_CMAKE_MODULE_PATH}\")\n       endif()\n   endif()\nendif()\n\n########### LibXC ############\nset(MADNESS_HAS_LIBXC @MADNESS_HAS_LIBXC@)\nif (MADNESS_HAS_LIBXC AND NOT TARGET Libxc::xc)\n    include( CMakeFindDependencyMacro )\n    get_filename_component(_libxc_config_dir \"@Libxc_CONFIG@\" DIRECTORY)\n    find_dependency(Libxc CONFIG REQUIRED PATHS \"${_libxc_config_dir}\" NO_DEFAULT_PATH)\nendif()\n  \n### LAPACK_LIBRARIES might include IMPORTED targets that are not globally available\nif (LAPACK_LIBRARIES MATCHES OpenMP::OpenMP_C AND NOT TARGET OpenMP::OpenMP_C)\n  find_package(OpenMP REQUIRED COMPONENTS C)\nendif()\nif (LAPACK_LIBRARIES MATCHES Threads::Threads AND NOT TARGET Threads::Threads)\n  find_package(Threads REQUIRED)\nendif()\n\n# Include library IMPORT targets\nif(NOT TARGET madness)\n  include(\"${CMAKE_CURRENT_LIST_DIR}/madness-targets.cmake\")\nendif(NOT TARGET madness)\n\n# Set component variables\nforeach(_comp ${madness_FIND_COMPONENTS})\n  if((\"${_comp}\" STREQUAL madness AND TARGET madness) OR TARGET MAD${_comp})\n    set(madness_${_comp}_FOUND TRUE)\n    set(madness_${_comp}_LIBRARY MAD${_comp})\n  else()\n    set(madness_${_comp}_FOUND FALSE)\n    set(madness_${_comp}_LIBRARY \"madness_${_comp}_LIBRARY-NOTFOUND\")\n  endif()\nendforeach()\n\n# done\nset(madness_FOUND TRUE)\ncheck_required_components(madness)\n\n"
  },
  {
    "path": "cmake/modules/AddCustomTargetSubproject.cmake",
    "content": "# Copyright 2020 Eduard F Valeyev\n# Distributed under the OSI-approved BSD 3-Clause License.\n# See https://opensource.org/licenses/BSD-3-Clause for details.\n\n# copy of https://github.com/BTAS/BTAS/blob/master/cmake/modules/AddCustomTargetSubproject.cmake\n#\n# add_custom_target_subproject(proj X ...) defines custom target X-proj and\n# - if target X already exists, makes it depend on X-proj\n# - else creates target X depending on X-proj\n#\n# use case: if custom target names (e.g. \"check\", \"doc\", etc.) clash\n#           with other project's target when used as a subproject\n#\n# example: add_custom_target_subproject(myproject check USES_TERMINAL COMMAND ${CMAKE_CTEST_COMMAND} -V)\n#\n\nmacro(add_custom_target_subproject _subproj _name)\n\n  set(extra_args \"${ARGN}\")\n  add_custom_target(${_name}-${_subproj} ${extra_args})\n\n  # does the newly-created target get compiled by default?\n  list(FIND extra_args \"ALL\" extra_args_has_all)\n  if (NOT (extra_args_has_all EQUAL -1))\n    set (target_built_by_default ON)\n  endif()\n\n  if (TARGET ${_name})\n    # is existing target ${_name} also compiled by default?\n    # warn if not, but this project's target is since that\n    # may indicate inconsistent creation of generic targets\n    get_target_property(supertarget_not_built_by_default ${_name} EXCLUDE_FROM_ALL)\n    if (target_built_by_default AND supertarget_not_built_by_default)\n      message(WARNING \"Created target ${_name}-${_subproj} is built by default but \\\"super\\\"-target ${_name} is not; perhaps it should be?\")\n    endif()\n    add_dependencies(${_name} ${_name}-${_subproj})\n  else (TARGET ${_name})\n    # use ALL if given\n    if (target_built_by_default)\n      add_custom_target(${_name} ALL DEPENDS ${_name}-${_subproj})\n    else (target_built_by_default)\n      add_custom_target(${_name} DEPENDS ${_name}-${_subproj})\n    endif(target_built_by_default)\n  endif (TARGET ${_name})\n\nendmacro()\n"
  },
  {
    "path": "cmake/modules/AddMADExecutable.cmake",
    "content": "macro(add_mad_executable _name _source_files _libs)\n\n  add_executable(${_name} ${_source_files})\n  target_link_libraries(${_name} PRIVATE \"${_libs}\")\n  add_dependencies(everything ${_name})\n\nendmacro()\n"
  },
  {
    "path": "cmake/modules/AddMADLibrary.cmake",
    "content": "macro(add_mad_library _name _source_files _header_files _dep_mad_comp _include_dir)\n\n  if (NOT ${_source_files}) # no sources given? use add_mad_hdr_library\n    message (FATAL_ERROR \"add_mad_library: no sources given; probably want add_mad_hdr_library instead\")\n  endif()\n\n  add_library(MAD${_name}-obj OBJECT ${${_source_files}} ${${_header_files}})\n  # make library target(s)\n  # if building shared library, build static as well using the same objects\n  add_library(MAD${_name} $<TARGET_OBJECTS:MAD${_name}-obj>)\n  add_dependencies(madness-libraries MAD${_name})\n  if(BUILD_SHARED_LIBS)\n    if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)\n      set_target_properties(MAD${_name}-obj PROPERTIES POSITION_INDEPENDENT_CODE TRUE)  # this is the default anyway, but produce a warning just in case\n      message(WARNING \"building shared libraries, setting default for POSITION_INDEPENDENT_CODE to true (set CMAKE_POSITION_INDEPENDENT_CODE to change the default)\")\n    endif()\n  endif(BUILD_SHARED_LIBS)\n\n  # Pass the private MAD${_name} compile flags to MAD${_name}-obj\n  target_compile_definitions(MAD${_name}-obj PRIVATE \n      $<TARGET_PROPERTY:MAD${_name},COMPILE_DEFINITIONS>)\n  target_include_directories(MAD${_name}-obj PRIVATE \n      $<TARGET_PROPERTY:MAD${_name},INCLUDE_DIRECTORIES>)\n  target_compile_options(MAD${_name}-obj PRIVATE \n      $<TARGET_PROPERTY:MAD${_name},COMPILE_OPTIONS>)\n\n  # target-common setup\n  add_custom_target(install-madness-${_name}\n      COMMAND ${CMAKE_COMMAND} -DCOMPONENT=${_name} -P ${PROJECT_BINARY_DIR}/cmake_install.cmake\n      COMMENT \"Installing ${_name} library components\"\n      USES_TERMINAL)\n  add_dependencies(install-madness-${_name} install-madness-common)\n  add_dependencies(install-madness-libraries install-madness-${_name})\n  foreach(_dep ${_dep_mad_comp})\n    if(TARGET install-madness-${_dep})\n      add_dependencies(install-madness-${_name} install-madness-${_dep})\n    endif()\n  endforeach()\n\n  # configure each target\n    set(targetname MAD${_name})\n\n    target_include_directories(${targetname} PUBLIC\n        $<INSTALL_INTERFACE:${MADNESS_INSTALL_INCLUDEDIR}>)\n    set_target_properties(${targetname} PROPERTIES PUBLIC_HEADER \"${${_header_files}}\")\n\n    # Add library to the list of installed components\n    install(TARGETS ${targetname} EXPORT madness\n      COMPONENT ${_name}\n      PUBLIC_HEADER DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}/${_include_dir}\"\n      LIBRARY DESTINATION \"${MADNESS_INSTALL_LIBDIR}\"\n      ARCHIVE DESTINATION \"${MADNESS_INSTALL_LIBDIR}\"\n      INCLUDES DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}\")\n  \n    # Create a target to install the component\n    add_dependencies(install-madness-${_name} ${targetname})\n\n    set(LINK_FLAGS \"\")\n    foreach(_dep ${_dep_mad_comp})\n      if (${_dep}_is_mad_hdr_lib)\n        set(deptargetname MAD${_dep})\n      else(${_dep}_is_mad_hdr_lib)\n        set(deptargetname MAD${_dep})\n      endif(${_dep}_is_mad_hdr_lib)\n\n      if(TARGET ${deptargetname})\n        target_compile_definitions(${targetname} PUBLIC\n            $<TARGET_PROPERTY:${deptargetname},INTERFACE_COMPILE_DEFINITIONS>)\n        target_include_directories(${targetname} PUBLIC\n            $<TARGET_PROPERTY:${deptargetname},INTERFACE_INCLUDE_DIRECTORIES>)\n        target_compile_options(${targetname} PUBLIC\n            $<TARGET_PROPERTY:${deptargetname},INTERFACE_COMPILE_OPTIONS>)\n        if (${_dep}_is_mad_hdr_lib)\n          target_link_libraries(${targetname} INTERFACE ${_dep})\n        else()\n          target_link_libraries(${targetname} PUBLIC ${deptargetname})\n        endif()\n\n        # import LINK_FLAGS from dependent\n        get_property(deptargetname_LINK_FLAGS_SET TARGET ${deptargetname} PROPERTY LINK_FLAGS SET)\n        if (deptargetname_LINK_FLAGS_SET)\n          get_property(deptargetname_LINK_FLAGS TARGET ${deptargetname} PROPERTY LINK_FLAGS)\n          set(LINK_FLAGS \"${LINK_FLAGS} ${deptargetname_LINK_FLAGS}\")\n        endif ()\n        \n      endif()\n    endforeach(_dep ${_dep_mad_comp})\n    set_target_properties(${targetname} PROPERTIES LINK_FLAGS \"${LINK_FLAGS}\")\n    target_compile_features(${targetname} INTERFACE \"cxx_std_${CMAKE_CXX_STANDARD}\")\n\nendmacro()\n\n\nmacro(add_mad_hdr_library _name _header_files _dep_mad_comp _include_dir)\n\n  message (STATUS \"in add_mad_hdr_library(${_name})\")\n\n  # make INTERFACE library\n  add_library(MAD${_name} INTERFACE)\n  \n  # Add target dependencies\n  add_dependencies(libraries-madness MAD${_name})\n  \n  target_include_directories(MAD${_name} INTERFACE\n    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>\n    $<INSTALL_INTERFACE:${MADNESS_INSTALL_INCLUDEDIR}>\n  )\n  \n  # Add library to the list of installed components\n  install(TARGETS MAD${_name} EXPORT madness\n      COMPONENT ${_name})\n  \n  # Create a target to install the component\n  add_custom_target(install-madness-${_name}\n      COMMAND ${CMAKE_COMMAND} -DCOMPONENT=${_name} -P ${PROJECT_BINARY_DIR}/cmake_install.cmake\n      COMMENT \"Installing ${_name} library components\"\n      USES_TERMINAL)\n  add_dependencies(install-madness-${_name} MAD${_name})\n  add_dependencies(install-madness-libraries install-madness-${_name})\n\n  foreach(_dep ${_dep_mad_comp})\n    if(TARGET install-madness-${_dep})\n      add_dependencies(install-madness-${_name} install-madness-${_dep})\n    endif()\n    if(TARGET ${_dep})\n        target_compile_definitions(MAD${_name} PUBLIC \n          $<TARGET_PROPERTY:${_dep},INTERFACE_COMPILE_DEFINITIONS>)\n        target_include_directories(MAD${_name} PUBLIC \n          $<TARGET_PROPERTY:${_dep},INTERFACE_INCLUDE_DIRECTORIES>)\n        target_compile_options(MAD${_name} PUBLIC \n          $<TARGET_PROPERTY:${_dep},INTERFACE_COMPILE_OPTIONS>)\n      if (${_dep}_is_mad_hdr_lib)\n        target_link_libraries(MAD${_name} INTERFACE ${_dep})\n      else()\n        target_link_libraries(MAD${_name} PUBLIC ${_dep})\n      endif()\n    endif()\n  endforeach()\n  \n  target_compile_features(MAD${_name} INTERFACE \"cxx_std_${CMAKE_CXX_STANDARD}\")\n  if (CMAKE_CXX_STANDARD GREATER_EQUAL 20)\n    if (CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n      target_compile_options(MAD${_name} INTERFACE \"-Wno-deprecated-volatile\")\n    elseif(CMAKE_CXX_COMPILER_ID MATCHES \"GNU\")\n      target_compile_options(MAD${_name} INTERFACE \"-Wno-volatile\")\n    endif()\n  endif()\n\n  set(${_name}_is_mad_hdr_lib TRUE)\nendmacro()\n"
  },
  {
    "path": "cmake/modules/AddMPITests.cmake",
    "content": "# AddMPITests.cmake\n# \n# This module provides a macro for adding MPI-based tests with different\n# process counts. All MPI options are controlled via runtime environment variable.\n#\n# add_mpi_tests(_component _test_name _nprocs _libs _labels)\n#   - Adds MPI tests for a single test executable\n#   - Tests can run on single or multiple nodes depending on MPI configuration\n#\n# Environment Variables (runtime - can be set when running ctest):\n#   MADNESS_MPI_NODE_OPTIONS - Specify MPI execution options\n#                              Example: MADNESS_MPI_NODE_OPTIONS=\"--bind-to none\" ctest -R mpi\n#                              Example: MADNESS_MPI_NODE_OPTIONS=\"--hostfile /path/to/hostfile --map-by node\" ctest -R mpi\n#                              If not set, mpiexec will use its default behavior\n\n# Add MPI tests for a single test\n# Usage: add_mpi_tests(component test_name \"2;4;8\" \"libs\" \"labels\")\nmacro(add_mpi_tests _component _test_name _nprocs _libs _labels)\n  \n  # Track that MPI tests have been added\n  set(MADNESS_HAS_MPI_TESTS TRUE CACHE INTERNAL \"MPI tests have been configured\")\n  \n  if(NOT ENABLE_MPI OR NOT MPIEXEC_EXECUTABLE)\n    message(STATUS \"MPI not enabled or MPIEXEC not found, skipping MPI tests for ${_test_name}\")\n    # Create placeholder tests that will skip at runtime with explanation\n    foreach(NPROC ${_nprocs})\n      set(_mpi_test_name \"${_test_name}_mpi${NPROC}\")\n      add_test(NAME madness/test/${_component}/${_mpi_test_name}/run\n               COMMAND ${CMAKE_COMMAND} -E echo \"SKIPPED: MPI not enabled or mpiexec not found for ${_test_name}_mpi${NPROC}\")\n      set_tests_properties(madness/test/${_component}/${_mpi_test_name}/run\n                           PROPERTIES SKIP_RETURN_CODE 0\n                           LABELS \"${_labels};mpi\")\n    endforeach()\n    return()\n  endif()\n  \n  # Ensure the test executable exists or will be created\n  if(NOT TARGET ${_test_name})\n    message(WARNING \"Test target ${_test_name} does not exist. Make sure it is created before calling add_mpi_tests.\")\n  endif()\n  \n  foreach(NPROC ${_nprocs})\n    # Create test name\n    set(_mpi_test_name \"${_test_name}_mpi${NPROC}\")\n    \n    # Create a CMake wrapper script that will check for MADNESS_MPI_NODE_OPTIONS at runtime\n    set(_wrapper_script_template \"${CMAKE_CURRENT_BINARY_DIR}/run_${_mpi_test_name}.cmake.in\")\n    set(_wrapper_script \"${CMAKE_CURRENT_BINARY_DIR}/run_${_mpi_test_name}.cmake\")\n    \n    # Convert flags to space-separated strings\n    string(REPLACE \";\" \" \" MPIEXEC_PREFLAGS_STR \"${MPIEXEC_PREFLAGS}\")\n    string(REPLACE \";\" \" \" MPIEXEC_POSTFLAGS_STR \"${MPIEXEC_POSTFLAGS}\")\n    \n    # Write CMake script template with placeholder for target file\n    file(WRITE ${_wrapper_script_template} \"# Auto-generated wrapper script for MPI test\\n\")\n    file(APPEND ${_wrapper_script_template} \"# Check if MADNESS_MPI_NODE_OPTIONS is set in environment\\n\")\n    file(APPEND ${_wrapper_script_template} \"if(DEFINED ENV{MADNESS_MPI_NODE_OPTIONS})\\n\")\n    file(APPEND ${_wrapper_script_template} \"  set(MPI_OPTIONS \\\"\\$ENV{MADNESS_MPI_NODE_OPTIONS}\\\")\\n\")\n    file(APPEND ${_wrapper_script_template} \"  # Convert MPI_OPTIONS to list\\n\")\n    file(APPEND ${_wrapper_script_template} \"  separate_arguments(MPI_OPTIONS_LIST UNIX_COMMAND \\\"\\${MPI_OPTIONS}\\\")\\n\")\n    file(APPEND ${_wrapper_script_template} \"else()\\n\")\n    file(APPEND ${_wrapper_script_template} \"  set(MPI_OPTIONS_LIST \\\"\\\")\\n\")\n    file(APPEND ${_wrapper_script_template} \"endif()\\n\")\n    file(APPEND ${_wrapper_script_template} \"# Execute MPI command\\n\")\n    file(APPEND ${_wrapper_script_template} \"message(STATUS \\\"Running: ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${NPROC} \\${MPI_OPTIONS_LIST} ${MPIEXEC_PREFLAGS_STR} \\\\\\\"\\$<TARGET_FILE:${_test_name}>\\\\\\\" ${MPIEXEC_POSTFLAGS_STR}\\\")\\n\")\n    file(APPEND ${_wrapper_script_template} \"execute_process(\\n\")\n    file(APPEND ${_wrapper_script_template} \"  COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${NPROC} \\${MPI_OPTIONS_LIST} ${MPIEXEC_PREFLAGS_STR} \\\"$<TARGET_FILE:${_test_name}>\\\" ${MPIEXEC_POSTFLAGS_STR}\\n\")\n    file(APPEND ${_wrapper_script_template} \"  RESULT_VARIABLE _result\\n\")\n    file(APPEND ${_wrapper_script_template} \")\\n\")\n    file(APPEND ${_wrapper_script_template} \"if(NOT _result EQUAL 0)\\n\")\n    file(APPEND ${_wrapper_script_template} \"  message(FATAL_ERROR \\\"Test failed with exit code \\${_result}\\\")\\n\")\n    file(APPEND ${_wrapper_script_template} \"endif()\\n\")\n\n    # Use file(GENERATE) to resolve generator expressions at build time\n    file(GENERATE OUTPUT ${_wrapper_script} INPUT ${_wrapper_script_template})\n    \n    # Add the MPI test using the wrapper script\n    add_test(NAME madness/test/${_component}/${_mpi_test_name}/run\n             COMMAND ${CMAKE_COMMAND} -P ${_wrapper_script})\n    \n    # Set test properties\n    set_tests_properties(madness/test/${_component}/${_mpi_test_name}/run\n                         PROPERTIES DEPENDS madness/test/${_component}/build \n                         LABELS \"${_labels};mpi\")\n    \n    # Add dependency to component unittests\n    if(TARGET ${_component}_unittests-madness)\n      add_dependencies(${_component}_unittests-madness ${_test_name})\n    endif()\n  endforeach()\n  \nendmacro()\n"
  },
  {
    "path": "cmake/modules/AddOptions.cmake",
    "content": "# see https://github.com/WVU-ASEL/glidar/blob/master/cmake/Modules/AddOptions.cmake\n\n# - Add options without repeating them on the command line\n#\n# Synopsis:\n#\n#\tadd_options (lang build opts)\n#\n# where:\n#\n#\tlang       Name of the language whose compiler should receive the\n#\t           options, e.g. CXX. If a comma-separated list is received\n#\t           then the option is added for all those languages. Use the\n#\t           special value ALL_LANGUAGES for these languages: CXX, C\n#\t           and Fortran\n#\n#\tbuild      Kind of build to which this options should apply,\n#              such as DEBUG and RELEASE. This can also be a comma-\n#\t           separated list. Use the special value ALL_BUILDS to apply\n#\t           to all builds.\n#\n#\topts       List of options to add. Each should be quoted.\n#\n# Example:\n#\n#\tadd_options (CXX RELEASE \"-O3\" \"-DNDEBUG\" \"-Wall\")\n\nfunction (add_options langs builds)\n    # special handling of empty language specification\n    if (\"${langs}\" STREQUAL \"ALL_LANGUAGES\")\n        set (langs CXX C Fortran)\n    endif (\"${langs}\" STREQUAL \"ALL_LANGUAGES\")\n    foreach (lang IN LISTS langs)\n        # prepend underscore if necessary\n        foreach (build IN LISTS builds)\n            if (NOT (\"${build}\" STREQUAL \"ALL_BUILDS\"))\n                set (_bld \"_${build}\")\n                string (TOUPPER \"${_bld}\" _bld)\n            else (NOT (\"${build}\" STREQUAL \"ALL_BUILDS\"))\n                set (_bld \"\")\n            endif (NOT (\"${build}\" STREQUAL \"ALL_BUILDS\"))\n            # if we want everything in the \"global\" flag, then simply\n            # ignore the build type here and go add everything to that one\n            if (CMAKE_NOT_USING_CONFIG_FLAGS)\n                set (_bld \"\")\n            endif ()\n            foreach (_opt IN LISTS ARGN)\n                set (_var \"CMAKE_${lang}_FLAGS${_bld}\")\n                #message (STATUS \"Adding \\\"${_opt}\\\" to \\${${_var}}\")\n                # remove it first\n                string (REPLACE \"${_opt}\" \"\" _without \"${${_var}}\")\n                string (STRIP \"${_without}\" _without)\n                # we need to strip this one as well, so they are comparable\n                string (STRIP \"${${_var}}\" _stripped)\n                # if it wasn't there, then add it at the end\n                if (\"${_without}\" STREQUAL \"${_stripped}\")\n                    # don't add any extra spaces if no options yet are set\n                    if (NOT ${_stripped} STREQUAL \"\")\n                        set (${_var} \"${_stripped} ${_opt}\")\n                    else (NOT ${_stripped} STREQUAL \"\")\n                        set (${_var} \"${_opt}\")\n                    endif (NOT ${_stripped} STREQUAL \"\")\n                    set (${_var} \"${${_var}}\" PARENT_SCOPE)\n                endif (\"${_without}\" STREQUAL \"${_stripped}\")\n            endforeach (_opt)\n        endforeach (build)\n    endforeach (lang)\nendfunction (add_options lang build)\n\n# set varname to flag unless user has specified something that matches regex\nfunction (set_default_option lang varname flag regex)\n    # lang is either C, CXX or Fortran\n    if (\"${lang}\" STREQUAL \"Fortran\")\n        set (letter \"F\")\n    else ()\n        set (letter \"${lang}\")\n    endif ()\n    string (TOUPPER \"${CMAKE_BUILD_TYPE}\" _build)\n    if ((NOT (\"$ENV{${letter}FLAGS}\" MATCHES \"${regex}\"))\n            AND (NOT (\"${CMAKE_${lang}_FLAGS}\" MATCHES \"${regex}\"))\n            AND (NOT (\"${CMAKE_${lang}_FLAGS_${_build}}\" MATCHES \"${regex}\")))\n        set (${varname} ${flag} PARENT_SCOPE)\n    else ()\n        set (${varname} PARENT_SCOPE)\n    endif ()\nendfunction (set_default_option)\n\n# clear default options as a proxy for not using any default options\n# at all. there is one *huge* problem with this: CMake runs the platform\n# initialization before executing any line at all in the project and\n# there seems to be no way to disable that behaviour, so we cannot really\n# distinguish between a platform default and something that the user has\n# passed on the command line. the best thing we can do is to all user-\n# defined setting if they are something other than the platform default.\nmacro (no_default_options)\n    foreach (lang IN ITEMS C CXX Fortran)\n        foreach (build IN ITEMS DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)\n            if (\"${CMAKE_${lang}_FLAGS_${build}}\" STREQUAL \"${CMAKE_${lang}_FLAGS_${build}_INIT}\")\n                # for some strange reason we cannot clear this flag, only set it to empty\n                set (CMAKE_${lang}_FLAGS_${build} \"\")\n            endif ()\n        endforeach (build)\n    endforeach (lang)\nendmacro (no_default_options)"
  },
  {
    "path": "cmake/modules/AddScriptedTests.cmake",
    "content": "# macro will build (i.e. copy the test script to the build directory) and execute the script\n\n# example\n# CMakeLists.txt: add_scripted_tests(nemo_test1.py nemo)\n\n\nmacro(add_scripted_tests _testcase_in _binary _labels)\n\n  # convert test.py.in to test.py\n#  get_filename_component(_testcase \"${_testcase_in}\" NAME_WLE)\n  # possibly path/to/src/test.py.in and path/to/build/test.py\n  set(_testcase ${_testcase_in})\n\n  # Add targets and for scripted tests\n  add_custom_target_subproject(madness ${_testcase}_${_binary}_scripted_tests)\n  add_dependencies(scripted_tests-madness ${_testcase}_${_binary}_scripted_tests-madness)\n\n#   Add a test that builds the binary\n  add_test(madness/test/${_binary}/build\n          \"${CMAKE_COMMAND}\" --build ${CMAKE_BINARY_DIR} --target ${_binary})\n  set_tests_properties(madness/test/${_binary}/build PROPERTIES DEPENDS ${_binary})\n\n  # make sure that the build step has all labels\n  set_property(TEST madness/test/${_binary}/build PROPERTY LABELS \"${_labels}\" APPEND)\n\n#   Add a test that copies the test scripts and replaces the variable to the source directory\n#   containing the reference json outputs\n  if (0)\n  add_test(madness/test/scripted_tests/${_binary}/${_testcase}/copy\n          COMMAND ${CMAKE_COMMAND} -E copy\n          ${CMAKE_CURRENT_SOURCE_DIR}/${_testcase}\n          ${CMAKE_CURRENT_BINARY_DIR}/${_testcase})\n  set_tests_properties(madness/test/scripted_tests/${_binary}/${_testcase}/copy\n          PROPERTIES DEPENDS ${_binary} LABELS \"${_labels}\")\n  endif()\n  #  copy the test scripts and replaces the variable to the source directory containing the reference json outputs\n  set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR})\n  set(BINARY ${_binary})\n  set(TESTCASE ${_testcase})\n  configure_file(${_testcase} ${_testcase} @ONLY)\n\n#  message(STATUS \"testcase: \" ${_testcase})\n#  message(STATUS \"binary:   \" ${_binary})\n#  message(STATUS \"labels:   \" ${_labels})\n#  message(STATUS \"sourcedir \"  ${CMAKE_CURRENT_SOURCE_DIR})\n#  message(STATUS \"binarydir \"  ${CMAKE_CURRENT_BINARY_DIR})\n\n  # Add the tests (execution and result) and set dependencies\n  add_test(NAME madness/test/scripted_tests/${_binary}/${_testcase}/run COMMAND ${_testcase} --reference_directory=${CMAKE_CURRENT_SOURCE_DIR})\n  set_tests_properties(madness/test/scripted_tests/${_binary}/${_testcase}/run\n          PROPERTIES LABELS \"${_labels}\")\n\n  # if \"labels\" is \"verylong\", potentially skip the test on small machines\n    if (\"${_labels}\" MATCHES \"verylong\")\n        set_tests_properties(madness/test/scripted_tests/${_binary}/${_testcase}/run\n                PROPERTIES SKIP_RETURN_CODE 77)\n        set_tests_properties(madness/test/scripted_tests/${_binary}/${_testcase}/run\n                PROPERTIES SKIP_MESSAGE \"Test skipped on small machines\")\n        set_tests_properties(madness/test/scripted_tests/${_binary}/${_testcase}/run\n                PROPERTIES TIMEOUT 7200)\n    endif()\n\n\nendmacro()"
  },
  {
    "path": "cmake/modules/AddUnittests.cmake",
    "content": "macro(add_unittests _component _sources _libs _labels)\n\n  # Add targets and for world_unittests\n  if (NOT TARGET ${_component}_unittests)\n    add_custom_target_subproject(madness ${_component}_unittests)\n    add_dependencies(unittests-madness ${_component}_unittests-madness)\n  endif()\n\n  # Add a test that builds the unit tests\n  add_test(madness/test/${_component}/build\n      \"${CMAKE_COMMAND}\" --build ${CMAKE_BINARY_DIR} --target ${_component}_unittests-madness)\n  # make sure that the build step has all labels\n  set_property(TEST madness/test/${_component}/build PROPERTY LABELS \"${_labels}\" APPEND)\n\n  foreach(_source ${_sources})\n    # Get the test name (the file name of the first source)\n    string(REGEX MATCH \"[A-Za-z_][A-Za-z0-9_]*\\\\.cc\" _test_source \"${_source}\")\n    string(REGEX MATCHALL \"[A-Za-z0-9_\\\\.\\\\$<:>]+\" _source_list \"${_source}\")\n    get_filename_component(_test \"${_test_source}\" NAME_WE)\n    \n    # Create test executable\n    add_mad_executable(${_test} \"${_source_list}\" \"${_libs}\")\n\n    # Add the test and set dependencies\n    add_test(NAME madness/test/${_component}/${_test}/run COMMAND ${_test})\n    add_dependencies(${_component}_unittests-madness ${_test})\n    set_tests_properties(madness/test/${_component}/${_test}/run\n        PROPERTIES DEPENDS madness/test/${_component}/build LABELS \"${_labels}\")\n \n  endforeach()\n\nendmacro()"
  },
  {
    "path": "cmake/modules/AppendFlags.cmake",
    "content": "macro(append_flags _flags _append_flag)\n\n  string(STRIP \"${_append_flag}\" _append_flag )\n  set(${_flags} \"${${_flags}} ${_append_flag}\")\n  string(STRIP \"${${_flags}}\" ${_flags})\n\nendmacro()"
  },
  {
    "path": "cmake/modules/CheckCFortranFunctionExists.cmake",
    "content": "include(CheckFunctionExists)\n\nmacro(check_c_fortran_function_exists _func_base _result)\n  string(TOLOWER \"${_func_base}\" _func_base_lower)\n  string(TOUPPER \"${_func_base}\" _func_base_upper)\n  set(${_result} FALSE)\n  foreach(_func ${_func_base_lower}_;${_func_base_lower};${_func_base_lower}__;${_func_base_upper};${_func_base_upper}_)\n    check_function_exists(${_func} _${_func}_found)\n    if(_${_func}_found)\n      set(${_result} ${_func})\n      break()\n    else()  # try appending c++ libs if depend on c++ runtime\n      foreach(_cxxlib -lstdc++;-lc++)\n        cmake_push_check_state()\n        set(CMAKE_REQUIRED_LIBRARIES \"${CMAKE_REQUIRED_LIBRARIES};${_cxxlib}\")\n        check_function_exists(${_func} _${_func}_found_with_${_cxxlib})\n        cmake_pop_check_state()\n        if(_${_func}_found_with_${_cxxlib})\n          set(${_result} ${_func})\n          break()\n        endif()\n      endforeach()\n      if(${_result})\n        break()\n      endif()\n    endif()\n  endforeach()\nendmacro()"
  },
  {
    "path": "cmake/modules/CheckDisablePIESupport.cmake",
    "content": "\ninclude(CheckCXXCompilerFlag)\n\nmacro(check_disablepie_support _outvar _disablepie_linker_flags)\n\n  if(NOT ${_outvar})\n    message(STATUS \"Checking for PIE-disabling linker flags\")\n  endif()\n  \n  # set the flag manually for Darwin\n  if(CMAKE_SYSTEM_NAME MATCHES \"Darwin\")\n    set(disablepie_linker_flags \"-Wl,-no_pie\")\n  else()\n    set(disablepie_linker_flags )\n    foreach(_disablepie_test_flag \"-no-pie\")\n      \n      # Try compiling\n      unset(${_outvar} CACHE)\n      check_cxx_compiler_flag(${_disablepie_test_flag} ${_outvar})\n      \n      if(${_outvar})\n        list(APPEND disablepie_linker_flags \"${_disablepie_test_flag}\")\n        break()\n      endif()\n      \n    endforeach()\n  endif()\n\n  if (disablepie_linker_flags)\n    set(${_disablepie_linker_flags} \"${disablepie_linker_flags}\"\n          CACHE STRING \"Linker flags required to disable PIE support\")\n    mark_as_advanced(${_disablepie_linker_flags})\n    message(STATUS \"PIE-disabling linker flags: ${${_disablepie_linker_flags}}\")\n  endif()\n  \nendmacro(check_disablepie_support)"
  },
  {
    "path": "cmake/modules/ConvertIncludesListToCompilerArgs.cmake",
    "content": "#\n#  This file is a part of TiledArray.\n#  Copyright (C) 2013  Virginia Tech\n#\n#  This program is free software: you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation, either version 3 of the License, or\n#  (at your option) any later version.\n#\n#  This program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n#\n#  Justus Calvin\n#  Department of Chemistry, Virginia Tech\n#\n#  ConvertIncludesListToCompileArgs.cmake\n#  Sep 4, 2013\n#\n\n#\n# converts a list of include paths (second argument, don't forget to enclose the\n# list in quotes) into a list of command-line parameters to the compiler/.\n#\n\nmacro(convert_incs_to_compargs _args _inc_paths )\n  # transform library list into compiler args\n\n  # Add include paths to _args\n  foreach(_inc_path ${_inc_paths})\n    set(${_args} \"${${_args}} -I${_inc_path}\")\n  endforeach()\nendmacro()\n"
  },
  {
    "path": "cmake/modules/ConvertLibrariesListToCompilerArgs.cmake",
    "content": "#\n#  This file is a part of TiledArray.\n#  Copyright (C) 2013  Virginia Tech\n#\n#  This program is free software: you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation, either version 3 of the License, or\n#  (at your option) any later version.\n#\n#  This program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n#\n#  Justus Calvin\n#  Department of Chemistry, Virginia Tech\n#\n#  ConvertLibrariesListToCompilerArgs.cmake\n#  Jul 19, 2013\n#\n\n#\n# Converts a list of libraries (second argument, don't forget to enclose the \n# list in quotes) into a list of command-line parameters to the compiler/linker.\n#\n\nmacro(convert_libs_to_compargs _args _libs )\n  # transform library list into compiler args\n  foreach (_lib ${_libs})\n    get_filename_component(_ext ${_lib} EXT)\n    get_filename_component(_libname ${_lib} NAME_WE)\n    \n    if(APPLE AND \"${_ext}\" STREQUAL \".framework\")\n\n      # Handle Apple Frameworks\n      get_filename_component(_path ${_lib} PATH)\n      if(${_path} STREQUAL \"/System/Library/Frameworks\")\n        set(MAD_LIBS \"${${_args}} -F${_path} -framework ${_libname}\")\n      else()\n        set(MAD_LIBS \"${${_args}} -framework ${_libname}\")\n      endif()\n\n    else()\n      \n      # Handle the general case\n      set(MAD_LIBS \"${${_args}} ${_lib}\")\n    endif()\n\n  endforeach()\nendmacro()\n"
  },
  {
    "path": "cmake/modules/CopyTargetProperties.cmake",
    "content": "macro(copy_target_properties _intarget _outtarget _props)\n\n  foreach(_prop ${_props})\n    get_property(_prop_set TARGET ${_intarget} PROPERTY ${_prop} SET)\n    get_property(_prop_value TARGET ${_intarget} PROPERTY ${_prop})\n#    message(\"${_intarget}:${_prop} SET = '${_prop_set}'\")\n#    message(\"${_intarget}:${_prop} = '${_prop_value}'\")\n    if(_prop_set)\n      set_property(TARGET ${_outtarget} PROPERTY ${_prop} \"${_prop_value}\")\n      \n#      get_target_property(_new_value ${_outtarget} ${_prop})\n#      message(\"${_outtarget}:${_prop} = '${_new_value}'\")\n    endif()\n    \n    unset(_prop_set)\n    unset(_prop_value)\n  endforeach()\n\nendmacro()\n\nmacro(append_target_properties _intarget _outtarget _props)\n\n  foreach(_prop ${_props})\n    get_property(_prop_set TARGET ${_intarget} PROPERTY ${_prop} SET)\n    get_property(_prop_value TARGET ${_intarget} PROPERTY ${_prop})\n#    message(\"${_intarget}:${_prop} SET = '${_prop_set}'\")\n#    message(\"${_intarget}:${_prop} = '${_prop_value}'\")\n    if(_prop_set)\n      set_property(TARGET ${_outtarget} APPEND PROPERTY ${_prop} \"${_prop_value}\")\n      \n#      get_target_property(_new_value ${_outtarget} ${_prop})\n#      message(\"${_outtarget}:${_prop} = '${_new_value}'\")\n    endif()\n    \n    unset(_prop_set)\n    unset(_prop_value)\n  endforeach()\n\nendmacro()"
  },
  {
    "path": "cmake/modules/EchoTargetProperty.cmake",
    "content": "function(echo_target_property tgt prop)\n  # v for value, d for defined, s for set\n  get_property(s TARGET ${tgt} PROPERTY ${prop} SET)\n \n  # only produce output for values that are set\n  if(s)\n    get_property(v TARGET ${tgt} PROPERTY ${prop})\n    get_property(d TARGET ${tgt} PROPERTY ${prop} DEFINED)\n    message(\"tgt='${tgt}' prop='${prop}'\")\n    message(\"  value='${v}'\")\n    message(\"  defined='${d}'\")\n    message(\"  set='${s}'\")\n    message(\"\")\n  endif()\nendfunction()\n \nfunction(echo_target tgt)\n  if(NOT TARGET ${tgt})\n    message(\"There is no target named '${tgt}'\")\n    return()\n  endif()\n \n  set(props\n      ADDITIONAL_CLEAN_FILES\n      AIX_EXPORT_ALL_SYMBOLS\n      ALIASED_TARGET\n      ANDROID_ANT_ADDITIONAL_OPTIONS\n      ANDROID_API\n      ANDROID_API_MIN\n      ANDROID_ARCH\n      ANDROID_ASSETS_DIRECTORIES\n      ANDROID_GUI\n      ANDROID_JAR_DEPENDENCIES\n      ANDROID_JAR_DIRECTORIES\n      ANDROID_JAVA_SOURCE_DIR\n      ANDROID_NATIVE_LIB_DEPENDENCIES\n      ANDROID_NATIVE_LIB_DIRECTORIES\n      ANDROID_PROCESS_MAX\n      ANDROID_PROGUARD\n      ANDROID_PROGUARD_CONFIG_PATH\n      ANDROID_SECURE_PROPS_PATH\n      ANDROID_SKIP_ANT_STEP\n      ANDROID_STL_TYPE\n      ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>\n      ARCHIVE_OUTPUT_DIRECTORY\n      ARCHIVE_OUTPUT_NAME_<CONFIG>\n      ARCHIVE_OUTPUT_NAME\n      AUTOGEN_BUILD_DIR\n      AUTOGEN_ORIGIN_DEPENDS\n      AUTOGEN_PARALLEL\n      AUTOGEN_TARGET_DEPENDS\n      AUTOMOC\n      AUTOMOC_COMPILER_PREDEFINES\n      AUTOMOC_DEPEND_FILTERS\n      AUTOMOC_EXECUTABLE\n      AUTOMOC_MACRO_NAMES\n      AUTOMOC_MOC_OPTIONS\n      AUTOMOC_PATH_PREFIX\n      AUTORCC\n      AUTORCC_EXECUTABLE\n      AUTORCC_OPTIONS\n      AUTOUIC\n      AUTOUIC_EXECUTABLE\n      AUTOUIC_OPTIONS\n      AUTOUIC_SEARCH_PATHS\n      BINARY_DIR\n      BUILD_RPATH\n      BUILD_RPATH_USE_ORIGIN\n      BUILD_WITH_INSTALL_NAME_DIR\n      BUILD_WITH_INSTALL_RPATH\n      BUNDLE_EXTENSION\n      BUNDLE\n      C_EXTENSIONS\n      C_STANDARD\n      C_STANDARD_REQUIRED\n      COMMON_LANGUAGE_RUNTIME\n      COMPATIBLE_INTERFACE_BOOL\n      COMPATIBLE_INTERFACE_NUMBER_MAX\n      COMPATIBLE_INTERFACE_NUMBER_MIN\n      COMPATIBLE_INTERFACE_STRING\n      COMPILE_DEFINITIONS\n      COMPILE_FEATURES\n      COMPILE_FLAGS\n      COMPILE_OPTIONS\n      COMPILE_PDB_NAME\n      COMPILE_PDB_NAME_<CONFIG>\n      COMPILE_PDB_OUTPUT_DIRECTORY\n      COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>\n      <CONFIG>_OUTPUT_NAME\n      <CONFIG>_POSTFIX\n      CROSSCOMPILING_EMULATOR\n      CUDA_PTX_COMPILATION\n      CUDA_SEPARABLE_COMPILATION\n      CUDA_RESOLVE_DEVICE_SYMBOLS\n      CUDA_RUNTIME_LIBRARY\n      CUDA_EXTENSIONS\n      CUDA_STANDARD\n      CUDA_STANDARD_REQUIRED\n      CXX_EXTENSIONS\n      CXX_STANDARD\n      CXX_STANDARD_REQUIRED\n      DEBUG_POSTFIX\n      DEFINE_SYMBOL\n      DEPLOYMENT_REMOTE_DIRECTORY\n      DEPLOYMENT_ADDITIONAL_FILES\n      DEPRECATION\n      DISABLE_PRECOMPILE_HEADERS\n      DOTNET_TARGET_FRAMEWORK\n      DOTNET_TARGET_FRAMEWORK_VERSION\n      EchoString\n      ENABLE_EXPORTS\n      EXCLUDE_FROM_ALL\n      EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>\n      EXCLUDE_FROM_DEFAULT_BUILD\n      EXPORT_NAME\n      EXPORT_PROPERTIES\n      FOLDER\n      Fortran_FORMAT\n      Fortran_MODULE_DIRECTORY\n      FRAMEWORK\n      FRAMEWORK_VERSION\n      GENERATOR_FILE_NAME\n      GHS_INTEGRITY_APP\n      GHS_NO_SOURCE_GROUP_FILE\n      GNUtoMS\n      HAS_CXX\n      IMPLICIT_DEPENDS_INCLUDE_TRANSFORM\n      IMPORTED_COMMON_LANGUAGE_RUNTIME\n      IMPORTED_CONFIGURATIONS\n      IMPORTED_GLOBAL\n      IMPORTED_IMPLIB_<CONFIG>\n      IMPORTED_IMPLIB\n      IMPORTED_LIBNAME_<CONFIG>\n      IMPORTED_LIBNAME\n      IMPORTED_LINK_DEPENDENT_LIBRARIES_<CONFIG>\n      IMPORTED_LINK_DEPENDENT_LIBRARIES\n      IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG>\n      IMPORTED_LINK_INTERFACE_LANGUAGES\n      IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG>\n      IMPORTED_LINK_INTERFACE_LIBRARIES\n      IMPORTED_LINK_INTERFACE_MULTIPLICITY_<CONFIG>\n      IMPORTED_LINK_INTERFACE_MULTIPLICITY\n      IMPORTED_LOCATION_<CONFIG>\n      IMPORTED_LOCATION\n      IMPORTED_NO_SONAME_<CONFIG>\n      IMPORTED_NO_SONAME\n      IMPORTED_OBJECTS_<CONFIG>\n      IMPORTED_OBJECTS\n      IMPORTED\n      IMPORTED_SONAME_<CONFIG>\n      IMPORTED_SONAME\n      IMPORT_PREFIX\n      IMPORT_SUFFIX\n      INCLUDE_DIRECTORIES\n      INSTALL_NAME_DIR\n      INSTALL_REMOVE_ENVIRONMENT_RPATH\n      INSTALL_RPATH\n      INSTALL_RPATH_USE_LINK_PATH\n      INTERFACE_AUTOUIC_OPTIONS\n      INTERFACE_COMPILE_DEFINITIONS\n      INTERFACE_COMPILE_FEATURES\n      INTERFACE_COMPILE_OPTIONS\n      INTERFACE_INCLUDE_DIRECTORIES\n      INTERFACE_LINK_DEPENDS\n      INTERFACE_LINK_DIRECTORIES\n      INTERFACE_LINK_LIBRARIES\n      INTERFACE_LINK_OPTIONS\n      INTERFACE_PRECOMPILE_HEADERS\n      INTERFACE_POSITION_INDEPENDENT_CODE\n      INTERFACE_SOURCES\n      INTERFACE_SYSTEM_INCLUDE_DIRECTORIES\n      INTERPROCEDURAL_OPTIMIZATION_<CONFIG>\n      INTERPROCEDURAL_OPTIMIZATION\n      IOS_INSTALL_COMBINED\n      JOB_POOL_COMPILE\n      JOB_POOL_LINK\n      JOB_POOL_PRECOMPILE_HEADER\n      LABELS\n      <LANG>_CLANG_TIDY\n      <LANG>_COMPILER_LAUNCHER\n      <LANG>_CPPCHECK\n      <LANG>_CPPLINT\n      <LANG>_INCLUDE_WHAT_YOU_USE\n      <LANG>_VISIBILITY_PRESET\n      LIBRARY_OUTPUT_DIRECTORY_<CONFIG>\n      LIBRARY_OUTPUT_DIRECTORY\n      LIBRARY_OUTPUT_NAME_<CONFIG>\n      LIBRARY_OUTPUT_NAME\n      LINK_DEPENDS_NO_SHARED\n      LINK_DEPENDS\n      LINKER_LANGUAGE\n      LINK_DIRECTORIES\n      LINK_FLAGS_<CONFIG>\n      LINK_FLAGS\n      LINK_INTERFACE_LIBRARIES_<CONFIG>\n      LINK_INTERFACE_LIBRARIES\n      LINK_INTERFACE_MULTIPLICITY_<CONFIG>\n      LINK_INTERFACE_MULTIPLICITY\n      LINK_LIBRARIES\n      LINK_OPTIONS\n      LINK_SEARCH_END_STATIC\n      LINK_SEARCH_START_STATIC\n      LINK_WHAT_YOU_USE\n      LOCATION_<CONFIG>\n      LOCATION\n      MACHO_COMPATIBILITY_VERSION\n      MACHO_CURRENT_VERSION\n      MACOSX_BUNDLE_INFO_PLIST\n      MACOSX_BUNDLE\n      MACOSX_FRAMEWORK_INFO_PLIST\n      MACOSX_RPATH\n      MANUALLY_ADDED_DEPENDENCIES\n      MAP_IMPORTED_CONFIG_<CONFIG>\n      MSVC_RUNTIME_LIBRARY\n      NAME\n      NO_SONAME\n      NO_SYSTEM_FROM_IMPORTED\n      OBJC_EXTENSIONS\n      OBJC_STANDARD\n      OBJC_STANDARD_REQUIRED\n      OBJCXX_EXTENSIONS\n      OBJCXX_STANDARD\n      OBJCXX_STANDARD_REQUIRED\n      OSX_ARCHITECTURES_<CONFIG>\n      OSX_ARCHITECTURES\n      OUTPUT_NAME_<CONFIG>\n      OUTPUT_NAME\n      PDB_NAME_<CONFIG>\n      PDB_NAME\n      PDB_OUTPUT_DIRECTORY_<CONFIG>\n      PDB_OUTPUT_DIRECTORY\n      POSITION_INDEPENDENT_CODE\n      PRECOMPILE_HEADERS\n      PRECOMPILE_HEADERS_REUSE_FROM\n      PREFIX\n      PRIVATE_HEADER\n      PROJECT_LABEL\n      PUBLIC_HEADER\n      RESOURCE\n      RULE_LAUNCH_COMPILE\n      RULE_LAUNCH_CUSTOM\n      RULE_LAUNCH_LINK\n      RUNTIME_OUTPUT_DIRECTORY_<CONFIG>\n      RUNTIME_OUTPUT_DIRECTORY\n      RUNTIME_OUTPUT_NAME_<CONFIG>\n      RUNTIME_OUTPUT_NAME\n      SKIP_BUILD_RPATH\n      SOURCE_DIR\n      SOURCES\n      SOVERSION\n      STATIC_LIBRARY_FLAGS_<CONFIG>\n      STATIC_LIBRARY_FLAGS\n      STATIC_LIBRARY_OPTIONS\n      SUFFIX\n      Swift_DEPENDENCIES_FILE\n      Swift_LANGUAGE_VERSION\n      Swift_MODULE_DIRECTORY\n      Swift_MODULE_NAME\n      TYPE\n      UNITY_BUILD\n      UNITY_BUILD_BATCH_SIZE\n      UNITY_BUILD_CODE_AFTER_INCLUDE\n      UNITY_BUILD_CODE_BEFORE_INCLUDE\n      VERSION\n      VISIBILITY_INLINES_HIDDEN\n      VS_CONFIGURATION_TYPE\n      VS_DEBUGGER_COMMAND\n      VS_DEBUGGER_COMMAND_ARGUMENTS\n      VS_DEBUGGER_ENVIRONMENT\n      VS_DEBUGGER_WORKING_DIRECTORY\n      VS_DESKTOP_EXTENSIONS_VERSION\n      VS_DOTNET_REFERENCE_<refname>\n      VS_DOTNET_REFERENCEPROP_<refname>_TAG_<tagname>\n      VS_DOTNET_REFERENCES\n      VS_DOTNET_REFERENCES_COPY_LOCAL\n      VS_DOTNET_TARGET_FRAMEWORK_VERSION\n      VS_DOTNET_DOCUMENTATION_FILE\n      VS_DPI_AWARE\n      VS_GLOBAL_KEYWORD\n      VS_GLOBAL_PROJECT_TYPES\n      VS_GLOBAL_ROOTNAMESPACE\n      VS_GLOBAL_<variable>\n      VS_IOT_EXTENSIONS_VERSION\n      VS_IOT_STARTUP_TASK\n      VS_JUST_MY_CODE_DEBUGGING\n      VS_KEYWORD\n      VS_MOBILE_EXTENSIONS_VERSION\n      VS_NO_SOLUTION_DEPLOY\n      VS_PACKAGE_REFERENCES\n      VS_PROJECT_IMPORT\n      VS_SCC_AUXPATH\n      VS_SCC_LOCALPATH\n      VS_SCC_PROJECTNAME\n      VS_SCC_PROVIDER\n      VS_SDK_REFERENCES\n      VS_USER_PROPS\n      VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION\n      VS_WINRT_COMPONENT\n      VS_WINRT_EXTENSIONS\n      VS_WINRT_REFERENCES\n      WIN32_EXECUTABLE\n      WINDOWS_EXPORT_ALL_SYMBOLS\n      XCODE_ATTRIBUTE_<an-attribute>\n      XCODE_EXPLICIT_FILE_TYPE\n      XCODE_GENERATE_SCHEME\n      XCODE_PRODUCT_TYPE\n      XCODE_SCHEME_ADDRESS_SANITIZER\n      XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN\n      XCODE_SCHEME_ARGUMENTS\n      XCODE_SCHEME_DEBUG_AS_ROOT\n      XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING\n      XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER\n      XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS\n      XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE\n      XCODE_SCHEME_ENVIRONMENT\n      XCODE_SCHEME_EXECUTABLE\n      XCODE_SCHEME_GUARD_MALLOC\n      XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP\n      XCODE_SCHEME_MALLOC_GUARD_EDGES\n      XCODE_SCHEME_MALLOC_SCRIBBLE\n      XCODE_SCHEME_MALLOC_STACK\n      XCODE_SCHEME_THREAD_SANITIZER\n      XCODE_SCHEME_THREAD_SANITIZER_STOP\n      XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER\n      XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP\n      XCODE_SCHEME_WORKING_DIRECTORY\n      XCODE_SCHEME_ZOMBIE_OBJECTS\n      XCTEST\n  )\n\n  # build whitelist by filtering down from CMAKE_PROPERTY_LIST in case cmake is\n  # a different version, and one of our hardcoded whitelisted properties\n  # doesn't exist!\n  unset(whitelisted_props)\n  foreach(prop ${props})\n    if(prop MATCHES \"^(INTERFACE|[_a-z]|IMPORTED_LIBNAME_|MAP_IMPORTED_CONFIG_)|^(COMPATIBLE_INTERFACE_(BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|EXPORT_NAME|IMPORTED(_GLOBAL|_CONFIGURATIONS|_LIBNAME)?|NAME|TYPE|NO_SYSTEM_FROM_IMPORTED)$\")\n      list(APPEND whitelisted_props ${prop})\n    endif()\n  endforeach(prop)\n \n  message(\"======================== ${tgt} ========================\")\n  get_target_property(tgt_type ${tgt} TYPE)\n  if (tgt_type STREQUAL \"INTERFACE_LIBRARY\")\n    set(tgt_props_list \"${whitelisted_props}\")\n  else()\n    set(tgt_props_list \"${props}\")\n  endif()\n\n  foreach(p ${tgt_props_list})\n    echo_target_property(\"${tgt}\" \"${p}\")\n  endforeach()\n  message(\"\")\nendfunction()\n \n \nfunction(echo_targets)\n  set(tgts ${ARGV})\n  foreach(t ${tgts})\n    echo_target(\"${t}\")\n  endforeach()\nendfunction()\n \n"
  },
  {
    "path": "cmake/modules/FindACML.cmake",
    "content": "# - Try to find acml\n# Input variables:\n#  ACML_ROOT_DIR     - The acml install directory\n#  ACML_LIBRARY      - The acml library directory\n# Output variables:\n#  ACML_FOUND        - System has acml\n#  ACML_LIBRARIES    - The libraries needed to use acml\n\ninclude(FindPackageHandleStandardArgs)\n\nif(NOT ACML_FOUND)\n\n  # Set default sarch paths for acml\n  if(ACML_ROOT_DIR)\n    if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n      set(ACML_LIBRARY ${ACML_ROOT_DIR}/lib64;${ACML_ROOT_DIR}/lib CACHE PATH \"The library directory for acml\")\n    else()\n      set(ACML_LIBRARY ${ACML_ROOT_DIR}/lib CACHE PATH \"The library directory for acml\")\n    endif()\n  endif()\n  \n  find_library(ACML_LIBRARIES acml \n      HINTS ${ACML_LIBRARY})\n\n  # handle the QUIETLY and REQUIRED arguments and set ACML_FOUND to TRUE\n  # if all listed variables are TRUE\n  find_package_handle_standard_args(ACML\n      FOUND_VAR ACML_FOUND\n      REQUIRED_VARS ACML_LIBRARIES)\n\n  mark_as_advanced(ACML_INCLUDE_DIR ACML_LIBRARY \n      ACML_INCLUDE_DIRS ACML_LIBRARIES)\n\nendif()"
  },
  {
    "path": "cmake/modules/FindFFTW.cmake",
    "content": "# see https://github.com/egpbos/findFFTW/blob/master/FindFFTW.cmake\n\n# - Find the FFTW library\n#\n# Original version of this file:\n#   Copyright (c) 2015, Wenzel Jakob\n#   https://github.com/wjakob/layerlab/blob/master/cmake/FindFFTW.cmake, commit 4d58bfdc28891b4f9373dfe46239dda5a0b561c6\n# Modifications:\n#   Copyright (c) 2017, Patrick Bos\n#\n# Usage:\n#   find_package(FFTW [REQUIRED] [QUIET] [COMPONENTS component1 ... componentX] )\n#\n# It sets the following variables:\n#   FFTW_FOUND                  ... true if fftw is found on the system\n#   FFTW_[component]_LIB_FOUND  ... true if the component is found on the system (see components below)\n#   FFTW_LIBRARIES              ... full paths to all found fftw libraries\n#   FFTW_[component]_LIB        ... full path to one of the components (see below)\n#   FFTW_INCLUDE_DIRS           ... fftw include directory paths\n#\n# The following variables will be checked by the function\n#   FFTW_USE_STATIC_LIBS        ... if true, only static libraries are found, otherwise both static and shared.\n#   FFTW_ROOT                   ... if set, the libraries are exclusively searched\n#                                   under this path\n#\n# This package supports the following components:\n#   FLOAT_LIB\n#   DOUBLE_LIB\n#   LONGDOUBLE_LIB\n#   FLOAT_THREADS_LIB\n#   DOUBLE_THREADS_LIB\n#   LONGDOUBLE_THREADS_LIB\n#   FLOAT_OPENMP_LIB\n#   DOUBLE_OPENMP_LIB\n#   LONGDOUBLE_OPENMP_LIB\n#\n\n# TODO (maybe): extend with ExternalProject download + build option\n# TODO: put on conda-forge\n\n\nif( NOT FFTW_ROOT AND DEFINED ENV{FFTWDIR} )\n    set( FFTW_ROOT $ENV{FFTWDIR} )\nendif()\n\n# Check if we can use PkgConfig\nfind_package(PkgConfig)\n\n#Determine from PKG\nif( PKG_CONFIG_FOUND AND NOT FFTW_ROOT )\n    pkg_check_modules( PKG_FFTW QUIET \"fftw3\" )\nendif()\n\n#Check whether to search static or dynamic libs\nset( CMAKE_FIND_LIBRARY_SUFFIXES_SAV ${CMAKE_FIND_LIBRARY_SUFFIXES} )\n\nif( ${FFTW_USE_STATIC_LIBS} )\n    set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX} )\nelse()\n    set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV} )\nendif()\n\nif( FFTW_ROOT )\n    # find libs\n\n    find_library(\n            FFTW_DOUBLE_LIB\n            NAMES \"fftw3\" libfftw3-3\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_DOUBLE_THREADS_LIB\n            NAMES \"fftw3_threads\"\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_DOUBLE_OPENMP_LIB\n            NAMES \"fftw3_omp\"\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_DOUBLE_MPI_LIB\n            NAMES \"fftw3_mpi\"\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_FLOAT_LIB\n            NAMES \"fftw3f\" libfftw3f-3\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_FLOAT_THREADS_LIB\n            NAMES \"fftw3f_threads\"\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_FLOAT_OPENMP_LIB\n            NAMES \"fftw3f_omp\"\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_FLOAT_MPI_LIB\n            NAMES \"fftw3f_mpi\"\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_LONGDOUBLE_LIB\n            NAMES \"fftw3l\" libfftw3l-3\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_LONGDOUBLE_THREADS_LIB\n            NAMES \"fftw3l_threads\"\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_LONGDOUBLE_OPENMP_LIB\n            NAMES \"fftw3l_omp\"\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    find_library(\n            FFTW_LONGDOUBLE_MPI_LIB\n            NAMES \"fftw3l_mpi\"\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"lib\" \"lib64\"\n            NO_DEFAULT_PATH\n    )\n\n    #find includes\n    find_path(FFTW_INCLUDE_DIRS\n            NAMES \"fftw3.h\"\n            PATHS ${FFTW_ROOT}\n            PATH_SUFFIXES \"include\"\n            NO_DEFAULT_PATH\n    )\n\nelse()\n\n    find_library(\n            FFTW_DOUBLE_LIB\n            NAMES \"fftw3\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(\n            FFTW_DOUBLE_THREADS_LIB\n            NAMES \"fftw3_threads\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(\n            FFTW_DOUBLE_OPENMP_LIB\n            NAMES \"fftw3_omp\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(\n            FFTW_DOUBLE_MPI_LIB\n            NAMES \"fftw3_mpi\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(\n            FFTW_FLOAT_LIB\n            NAMES \"fftw3f\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(\n            FFTW_FLOAT_THREADS_LIB\n            NAMES \"fftw3f_threads\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(\n            FFTW_FLOAT_OPENMP_LIB\n            NAMES \"fftw3f_omp\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(\n            FFTW_FLOAT_MPI_LIB\n            NAMES \"fftw3f_mpi\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(\n            FFTW_LONGDOUBLE_LIB\n            NAMES \"fftw3l\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(\n            FFTW_LONGDOUBLE_THREADS_LIB\n            NAMES \"fftw3l_threads\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(FFTW_LONGDOUBLE_OPENMP_LIB\n            NAMES \"fftw3l_omp\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_library(FFTW_LONGDOUBLE_MPI_LIB\n            NAMES \"fftw3l_mpi\"\n            PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}\n    )\n\n    find_path(FFTW_INCLUDE_DIRS\n            NAMES \"fftw3.h\"\n            PATHS ${PKG_FFTW_INCLUDE_DIRS} ${INCLUDE_INSTALL_DIR}\n    )\n\nendif( FFTW_ROOT )\n\n#--------------------------------------- components\n\nif (FFTW_DOUBLE_LIB)\n    set(FFTW_DOUBLE_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_LIB})\n    add_library(FFTW::Double INTERFACE IMPORTED)\n    set_target_properties(FFTW::Double\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_DOUBLE_LIB}\"\n    )\nelse()\n    set(FFTW_DOUBLE_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_FLOAT_LIB)\n    set(FFTW_FLOAT_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_LIB})\n    add_library(FFTW::Float INTERFACE IMPORTED)\n    set_target_properties(FFTW::Float\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_FLOAT_LIB}\"\n    )\nelse()\n    set(FFTW_FLOAT_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_LONGDOUBLE_LIB)\n    set(FFTW_LONGDOUBLE_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_LIB})\n    add_library(FFTW::LongDouble INTERFACE IMPORTED)\n    set_target_properties(FFTW::LongDouble\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_LONGDOUBLE_LIB}\"\n    )\nelse()\n    set(FFTW_LONGDOUBLE_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_DOUBLE_THREADS_LIB)\n    set(FFTW_DOUBLE_THREADS_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_THREADS_LIB})\n    add_library(FFTW::DoubleThreads INTERFACE IMPORTED)\n    set_target_properties(FFTW::DoubleThreads\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_DOUBLE_THREADS_LIB}\"\n    )\nelse()\n    set(FFTW_DOUBLE_THREADS_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_FLOAT_THREADS_LIB)\n    set(FFTW_FLOAT_THREADS_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_THREADS_LIB})\n    add_library(FFTW::FloatThreads INTERFACE IMPORTED)\n    set_target_properties(FFTW::FloatThreads\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_FLOAT_THREADS_LIB}\"\n    )\nelse()\n    set(FFTW_FLOAT_THREADS_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_LONGDOUBLE_THREADS_LIB)\n    set(FFTW_LONGDOUBLE_THREADS_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_THREADS_LIB})\n    add_library(FFTW::LongDoubleThreads INTERFACE IMPORTED)\n    set_target_properties(FFTW::LongDoubleThreads\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_LONGDOUBLE_THREADS_LIB}\"\n    )\nelse()\n    set(FFTW_LONGDOUBLE_THREADS_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_DOUBLE_OPENMP_LIB)\n    set(FFTW_DOUBLE_OPENMP_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_OPENMP_LIB})\n    add_library(FFTW::DoubleOpenMP INTERFACE IMPORTED)\n    set_target_properties(FFTW::DoubleOpenMP\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_DOUBLE_OPENMP_LIB}\"\n    )\nelse()\n    set(FFTW_DOUBLE_OPENMP_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_FLOAT_OPENMP_LIB)\n    set(FFTW_FLOAT_OPENMP_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_OPENMP_LIB})\n    add_library(FFTW::FloatOpenMP INTERFACE IMPORTED)\n    set_target_properties(FFTW::FloatOpenMP\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_FLOAT_OPENMP_LIB}\"\n    )\nelse()\n    set(FFTW_FLOAT_OPENMP_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_LONGDOUBLE_OPENMP_LIB)\n    set(FFTW_LONGDOUBLE_OPENMP_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_OPENMP_LIB})\n    add_library(FFTW::LongDoubleOpenMP INTERFACE IMPORTED)\n    set_target_properties(FFTW::LongDoubleOpenMP\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_LONGDOUBLE_OPENMP_LIB}\"\n    )\nelse()\n    set(FFTW_LONGDOUBLE_OPENMP_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_DOUBLE_MPI_LIB)\n    set(FFTW_DOUBLE_MPI_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_MPI_LIB})\n    add_library(FFTW::DoubleMPI INTERFACE IMPORTED)\n    set_target_properties(FFTW::DoubleMPI\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_DOUBLE_MPI_LIB}\"\n    )\nelse()\n    set(FFTW_DOUBLE_MPI_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_FLOAT_MPI_LIB)\n    set(FFTW_FLOAT_MPI_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_MPI_LIB})\n    add_library(FFTW::FloatMPI INTERFACE IMPORTED)\n    set_target_properties(FFTW::FloatMPI\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_FLOAT_MPI_LIB}\"\n    )\nelse()\n    set(FFTW_FLOAT_MPI_LIB_FOUND FALSE)\nendif()\n\nif (FFTW_LONGDOUBLE_MPI_LIB)\n    set(FFTW_LONGDOUBLE_MPI_LIB_FOUND TRUE)\n    set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_MPI_LIB})\n    add_library(FFTW::LongDoubleMPI INTERFACE IMPORTED)\n    set_target_properties(FFTW::LongDoubleMPI\n            PROPERTIES INTERFACE_INCLUDE_DIRECTORIES \"${FFTW_INCLUDE_DIRS}\"\n            INTERFACE_LINK_LIBRARIES \"${FFTW_LONGDOUBLE_MPI_LIB}\"\n    )\nelse()\n    set(FFTW_LONGDOUBLE_MPI_LIB_FOUND FALSE)\nendif()\n\n#--------------------------------------- end components\n\nset( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV} )\n\ninclude(FindPackageHandleStandardArgs)\n\nfind_package_handle_standard_args(FFTW\n        REQUIRED_VARS FFTW_INCLUDE_DIRS\n        HANDLE_COMPONENTS\n)\n\nmark_as_advanced(\n        FFTW_INCLUDE_DIRS\n        FFTW_LIBRARIES\n        FFTW_FLOAT_LIB\n        FFTW_DOUBLE_LIB\n        FFTW_LONGDOUBLE_LIB\n        FFTW_FLOAT_THREADS_LIB\n        FFTW_DOUBLE_THREADS_LIB\n        FFTW_LONGDOUBLE_THREADS_LIB\n        FFTW_FLOAT_OPENMP_LIB\n        FFTW_DOUBLE_OPENMP_LIB\n        FFTW_LONGDOUBLE_OPENMP_LIB\n        FFTW_FLOAT_MPI_LIB\n        FFTW_DOUBLE_MPI_LIB\n        FFTW_LONGDOUBLE_MPI_LIB\n)"
  },
  {
    "path": "cmake/modules/FindGperftools.cmake",
    "content": "# - Try to find Google performance tools (gperftools)\n# Input variables:\n#   GPERFTOOLS_ROOT_DIR    - The gperftools install directory;\n#                            if not set the GPERFTOOLS_DIR environment variable will be used\n#   GPERFTOOLS_INCLUDE_DIR - The gperftools include directory\n#   GPERFTOOLS_LIBRARY     - The gperftools library directory\n# Components: profiler, and tcmalloc or tcmalloc_minimal\n# Output variables:\n#   GPERFTOOLS_FOUND        - System has gperftools\n#   GPERFTOOLS_INCLUDE_DIRS - The gperftools include directories\n#   GPERFTOOLS_LIBRARIES    - The libraries needed to use gperftools\n#   GPERFTOOLS_VERSION      - The version string for gperftools\n\ninclude(FindPackageHandleStandardArgs)\n  \nif(NOT DEFINED GPERFTOOLS_FOUND)\n\n  # If not set already, set GPERFTOOLS_ROOT_DIR from environment\n  if (DEFINED ENV{GPERFTOOLS_DIR} AND NOT DEFINED GPERFTOOLS_ROOT_DIR)\n    set(GPERFTOOLS_ROOT_DIR $ENV{GPERFTOOLS_DIR})\n  endif()\n\n  # Check to see if libunwind is required\n  set(GPERFTOOLS_DISABLE_PROFILER FALSE)\n  if((\";${Gperftools_FIND_COMPONENTS};\" MATCHES \";profiler;\") AND \n      (CMAKE_SYSTEM_NAME MATCHES \"Linux\" OR \n       CMAKE_SYSTEM_NAME MATCHES \"BlueGeneQ\" OR\n       CMAKE_SYSTEM_NAME MATCHES \"BlueGeneP\") AND\n       (CMAKE_SIZEOF_VOID_P EQUAL 8))\n       \n    # Libunwind is required by profiler on this platform\n    if(Gperftools_FIND_REQUIRED_profiler OR Gperftools_FIND_REQUIRED_tcmalloc_and_profiler)\n      find_package(Libunwind 0.99 REQUIRED)\n    else()\n      find_package(Libunwind)\n      if(NOT LIBUNWIND_FOUND OR LIBUNWIND_VERSION VERSION_LESS 0.99)\n        set(GPERFTOOLS_DISABLE_PROFILER TRUE)\n      endif()\n    endif()\n  endif()\n\n  # Check for invalid components\n  foreach(_comp ${Gperftools_FIND_COMPONENTS})\n    if((NOT _comp STREQUAL \"tcmalloc_and_profiler\") AND\n       (NOT _comp STREQUAL \"tcmalloc\") AND\n       (NOT _comp STREQUAL \"tcmalloc_minimal\") AND\n       (NOT _comp STREQUAL \"profiler\"))\n      message(FATAL_ERROR \"Invalid component specified for Gperftools: ${_comp}\")\n    endif()\n  endforeach()\n\n  # Check for valid component combinations\n  if(\";${Gperftools_FIND_COMPONENTS};\" MATCHES \";tcmalloc_and_profiler;\" AND \n      (\";${Gperftools_FIND_COMPONENTS};\" MATCHES \";tcmalloc;\" OR \n       \";${Gperftools_FIND_COMPONENTS};\" MATCHES \";tcmalloc_minimal;\" OR\n       \";${Gperftools_FIND_COMPONENTS};\" MATCHES \";profiler;\"))\n    message(\"ERROR: Invalid component selection for Gperftools: ${Gperftools_FIND_COMPONENTS}\")\n    message(\"ERROR: Gperftools cannot link both tcmalloc_and_profiler with the tcmalloc, tcmalloc_minimal, or profiler libraries\")\n    message(FATAL_ERROR \"Gperftools component list is invalid\")\n  endif()\n  if(\";${Gperftools_FIND_COMPONENTS};\" MATCHES \";tcmalloc;\" AND \";${Gperftools_FIND_COMPONENTS};\" MATCHES \";tcmalloc_minimal;\")\n    message(\"ERROR: Invalid component selection for Gperftools: ${Gperftools_FIND_COMPONENTS}\")\n    message(\"ERROR: Gperftools cannot link both tcmalloc and tcmalloc_minimal\")\n    message(FATAL_ERROR \"Gperftools component list is invalid\")\n  endif()\n\n  # Set default sarch paths for gperftools\n  if(GPERFTOOLS_ROOT_DIR)\n    set(GPERFTOOLS_INCLUDE_DIR ${GPERFTOOLS_ROOT_DIR}/include CACHE PATH \"The include directory for gperftools\")\n    if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n      set(GPERFTOOLS_LIBRARY ${GPERFTOOLS_ROOT_DIR}/lib64;${GPERFTOOLS_ROOT_DIR}/lib CACHE PATH \"The library directory for gperftools\")\n    else()\n      set(GPERFTOOLS_LIBRARY ${GPERFTOOLS_ROOT_DIR}/lib CACHE PATH \"The library directory for gperftools\")\n    endif()\n  endif()\n  \n  find_path(GPERFTOOLS_INCLUDE_DIRS NAMES gperftools/malloc_extension.h\n      HINTS ${GPERFTOOLS_INCLUDE_DIR})\n\n  # Search for component libraries\n  foreach(_comp ${Gperftools_FIND_COMPONENTS})\n    find_library(GPERFTOOLS_${_comp}_LIBRARY ${_comp} \n        HINTS ${GPERFTOOLS_LIBRARY})\n    if(GPERFTOOLS_${_comp}_LIBRARY)\n      set(Gperftools_${_comp}_FOUND TRUE)\n    else()\n      set(Gperftools_${_comp}_FOUND FALSE)\n    endif()\n    \n    # Exclude profiler from the found list if libunwind is required but not found\n    if(Gperftools_${_comp}_FOUND AND ${_comp} MATCHES \"profiler\" AND GPERFTOOLS_DISABLE_PROFILER)\n      set(Gperftools_${_comp}_FOUND FALSE)\n      set(GPERFTOOLS_${_comp}_LIBRARY \"GPERFTOOLS_${_comp}_LIBRARY-NOTFOUND\")\n      message(\"WARNING: Gperftools '${_comp}' requires libunwind 0.99 or later.\")\n      message(\"WARNING: Gperftools '${_comp}' will be disabled.\")\n    endif()\n    \n    if(\";${Gperftools_FIND_COMPONENTS};\" MATCHES \";${_comp};\" AND Gperftools_${_comp}_FOUND)\n      list(APPEND GPERFTOOLS_LIBRARIES \"${GPERFTOOLS_${_comp}_LIBRARY}\")\n    endif()\n  endforeach()\n  \n  # Set gperftools libraries if not set based on component list\n  if(NOT GPERFTOOLS_LIBRARIES)\n    if(Gperftools_tcmalloc_and_profiler_FOUND)\n      set(GPERFTOOLS_LIBRARIES \"${GPERFTOOLS_tcmalloc_and_profiler_LIBRARY}\")\n    elseif(Gperftools_tcmalloc_FOUND AND GPERFTOOLS_profiler_FOUND)\n      set(GPERFTOOLS_LIBRARIES \"${GPERFTOOLS_tcmalloc_LIBRARY}\" \"${GPERFTOOLS_profiler_LIBRARY}\")\n    elseif(Gperftools_profiler_FOUND)\n      set(GPERFTOOLS_LIBRARIES \"${GPERFTOOLS_profiler_LIBRARY}\")\n    elseif(Gperftools_tcmalloc_FOUND)\n      set(GPERFTOOLS_LIBRARIES \"${GPERFTOOLS_tcmalloc_LIBRARY}\")\n    elseif(Gperftools_tcmalloc_minimal_FOUND)\n      set(GPERFTOOLS_LIBRARIES \"${GPERFTOOLS_tcmalloc_minimal_LIBRARY}\")\n    endif()\n  endif()\n\n  # handle the QUIETLY and REQUIRED arguments and set GPERFTOOLS_FOUND to TRUE\n  # if all listed variables are TRUE\n  find_package_handle_standard_args(Gperftools\n      FOUND_VAR GPERFTOOLS_FOUND\n      REQUIRED_VARS GPERFTOOLS_LIBRARIES GPERFTOOLS_INCLUDE_DIRS\n      HANDLE_COMPONENTS)\n\n  mark_as_advanced(GPERFTOOLS_INCLUDE_DIR GPERFTOOLS_LIBRARY \n      GPERFTOOLS_INCLUDE_DIRS GPERFTOOLS_LIBRARIES)\n\n  # Add linker flags that instruct the compiler to exclude built in memory\n  # allocation functions. This works for GNU, Intel, and Clang. Other compilers\n  # may need to be added in the future.\n  if(GPERFTOOLS_LIBRARIES MATCHES \"tcmalloc\")\n    if((CMAKE_CXX_COMPILER_ID MATCHES \"GNU\") OR\n       (CMAKE_CXX_COMPILER_ID MATCHES \"AppleClang\") OR \n       (CMAKE_CXX_COMPILER_ID MATCHES \"Clang\") OR\n      ((CMAKE_CXX_COMPILER_ID MATCHES \"Intel\") AND (NOT CMAKE_CXX_PLATFORM_ID MATCHES \"Windows\"))) \n      list(APPEND GPERFTOOLS_LIBRARIES \"-fno-builtin-malloc\"\n          \"-fno-builtin-calloc\" \"-fno-builtin-realloc\" \"-fno-builtin-free\")\n    endif()\n  endif()\n\n  # Add libunwind flags to gperftools if the profiler is being used\n  if(GPERFTOOLS_LIBRARIES MATCHES \"profiler\" AND LIBUNWIND_FOUND)\n    list(APPEND GPERFTOOLS_INCLUDE_DIRS \"${LIBUNWIND_INCLUDE_DIR}\")\n    list(APPEND GPERFTOOLS_LIBRARIES \"${LIBUNWIND_LIBRARIES}\")\n  endif()\n  \n  unset(GPERFTOOLS_DISABLE_PROFILER)\n\nendif()\n"
  },
  {
    "path": "cmake/modules/FindIntegratorXX.cmake",
    "content": "# - Try to find INTEGRATORXX\n# Input variables:\n#  INTEGRATORXX_ROOT_DIR     - The INTEGRATORXX  install directory\n#  INTEGRATORXX_INCLUDE_DIR  - The INTEGRATORXX  include directory | optional, else determined from INTEGRATORXX_ROOT_DIR, dont set INTEGRATORXX_ROOT_DIR if you want to use this\n#  INTEGRATORXX_LIBRARY      - The INTEGRATORXX  library directory | optional, else determined from INTEGRATORXX_ROOT_DIR, ...\n# Output variables:\n#  INTEGRATORXX_FOUND        - System has INTEGRATORXX\n#  INTEGRATORXX_INCLUDE_DIRS - The INTEGRATORXX include directories\n#  INTEGRATORXX_LIBRARIES    - The libraries needed to use INTEGRATORXX\n#  INTEGRATORXX_VERSION      - The version string for INTEGRATORXX | currently unused\n\ninclude(FindPackageHandleStandardArgs)\n\nif(NOT INTEGRATORXX_FOUND)\n\n  # define include and library directories based on root directory\n  if(INTEGRATORXX_ROOT_DIR)\n    set(INTEGRATORXX_INCLUDE_DIR ${INTEGRATORXX_ROOT_DIR}/include/ CACHE PATH \"The include directory for INTEGRATORXX\")\n    if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n      set(INTEGRATORXX_LIBRARY ${INTEGRATORXX_ROOT_DIR}/lib;${INTEGRATORXX_ROOT_DIR}/lib64 CACHE PATH \"Linker Flags for IntegratorXX Library\")\n    else()\n      set(INTEGRATORXX_LIBRARY ${INTEGRATORXX_ROOT_DIR}/lib CACHE PATH \"Linker Flags for IntegratorXX Library\")\n    endif()\n  endif()\n  \n  find_path(INTEGRATORXX_INCLUDE_DIRS NAMES integratorxx/generators/impl/impl.hpp\n      HINTS ${INTEGRATORXX_INCLUDE_DIR})\n  \n\n  # handle the QUIETLY and REQUIRED arguments and set INTEGRATORXX_FOUND to TRUE\n  # if all listed variables are TRUE\n  find_package_handle_standard_args(IntegratorXX\n      FOUND_VAR INTEGRATORXX_FOUND\n      VERSION_VAR INTEGRATORXX_VERSION\n      REQUIRED_VARS INTEGRATORXX_INCLUDE_DIRS)\n\n  mark_as_advanced(INTEGRATORXX_INCLUDE_DIR INTEGRATORXX_INCLUDE_DIRS)\n\nendif()\n"
  },
  {
    "path": "cmake/modules/FindLibunwind.cmake",
    "content": "# - Try to find Libunwind\n# Input variables:\n#  LIBUNWIND_DIR     - The libunwind install directory;\n#                      if not set the LIBUNWIND_DIR environment variable will be used\n# Output variables:\n#  LIBUNWIND_FOUND        - System has libunwind\n#  LIBUNWIND_INCLUDE_DIR  - The libunwind include directories\n#  LIBUNWIND_LIBRARIES    - The libraries needed to use libunwind\n#  LIBUNWIND_VERSION      - The version string for libunwind\n\ninclude(FindPackageHandleStandardArgs)\n  \nif(NOT DEFINED LIBUNWIND_FOUND)\n\n  # if not set already, set LIBUNWIND_DIR from environment\n  if (DEFINED ENV{LIBUNWIND_DIR} AND NOT DEFINED LIBUNWIND_DIR)\n    set(LIBUNWIND_DIR $ENV{LIBUNWIND_DIR})\n  endif()\n\n  # Set default search paths for libunwind\n  if(LIBUNWIND_DIR)\n    set(LIBUNWIND_INCLUDE_DIR_HINT ${LIBUNWIND_DIR}/include CACHE PATH \"The include directory for libunwind\")\n    if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n      set(LIBUNWIND_LIBRARY_DIR_HINT ${LIBUNWIND_DIR}/lib64;${LIBUNWIND_DIR}/lib CACHE PATH \"The library directory for libunwind\")\n    else()\n      set(LIBUNWIND_LIBRARY_DIR_HINT ${LIBUNWIND_DIR}/lib CACHE PATH \"The library directory for libunwind\")\n    endif()\n  endif()\n\n  find_path(LIBUNWIND_INCLUDE_DIR NAMES libunwind.h\n      HINTS ${LIBUNWIND_INCLUDE_DIR_HINT})\n  \n  find_library(LIBUNWIND_LIBRARIES unwind \n      HINTS ${LIBUNWIND_LIBRARY_DIR_HINT})\n  \n  # Get libunwind version\n  if(EXISTS \"${LIBUNWIND_INCLUDE_DIR}/libunwind-common.h\")\n    file(READ \"${LIBUNWIND_INCLUDE_DIR}/libunwind-common.h\" _libunwind_version_header)\n    string(REGEX REPLACE \".*define[ \\t]+UNW_VERSION_MAJOR[ \\t]+([0-9]+).*\" \"\\\\1\" \n        LIBUNWIND_MAJOR_VERSION \"${_libunwind_version_header}\")\n    string(REGEX REPLACE \".*define[ \\t]+UNW_VERSION_MINOR[ \\t]+([0-9]+).*\" \"\\\\1\"\n        LIBUNWIND_MINOR_VERSION \"${_libunwind_version_header}\")\n    string(REGEX REPLACE \".*define[ \\t]+UNW_VERSION_EXTRA[ \\t]+([0-9]+).*\" \"\\\\1\"\n        LIBUNWIND_MICRO_VERSION \"${_libunwind_version_header}\")\n    set(LIBUNWIND_VERSION \"${LIBUNWIND_MAJOR_VERSION}.${LIBUNWIND_MINOR_VERSION}.${LIBUNWIND_MICRO_VERSION}\")\n    unset(_libunwind_version_header)\n  endif()\n\n  # handle the QUIETLY and REQUIRED arguments and set LIBUNWIND_FOUND to TRUE\n  # if all listed variables are TRUE\n  find_package_handle_standard_args(Libunwind\n      FOUND_VAR LIBUNWIND_FOUND\n      VERSION_VAR LIBUNWIND_VERSION \n      REQUIRED_VARS LIBUNWIND_LIBRARIES LIBUNWIND_INCLUDE_DIR)\n\n  mark_as_advanced(LIBUNWIND_INCLUDE_DIR_HINT LIBUNWIND_LIBRARY_DIR_HINT\n      LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES)\n\nendif()"
  },
  {
    "path": "cmake/modules/FindMKL.cmake",
    "content": "# - Try to find MKL\n# Input variables:\n#  MKL_ROOT_DIR         - The MKL install directory\n#  MKL_INCLUDE_DIR      - The MKL include directory\n#  MKL_LIBRARY          - The MKL library directory\n#  FORTRAN_INTEGER_SIZE - Set the integer size (4 or 8 bytes)\n#  BLA_STATIC           - Prefer to link against static lbraries\n# Output variables:\n#  MKL_FOUND            - System has MKL\n#  MKL_INCLUDE_DIRS     - The MKL include directories\n#  MKL_LIBRARIES        - The libraries needed to use MKL\n#  MKL_VERSION          - The version string for MKL\n\nif(NOT MKL_FOUND)\n\n  # If the user did not specify an MKL root directory, check for the MKLROOT\n  # environment variable or the presence of /opt/intel/mkl.\n  if(NOT MKL_ROOT_DIR OR NOT DEFINED MKL_ROOT_DIR)\n    if(EXISTS $ENV{MKLROOT})\n      set(MKL_ROOT_DIR \"$ENV{MKLROOT}\")\n    elseif(EXISTS /opt/intel/mkl)\n      set(MKL_ROOT_DIR /opt/intel/mkl)\n    endif()\n  endif()\n\n  if(MKL_ROOT_DIR)\n    set(MKL_INCLUDE_DIR ${MKL_ROOT_DIR}/include \n        CACHE PATH \"The include directory for MKL\")\n    # Set the MKL library directory if not specified by the user.\n    if(CMAKE_SYSTEM_NAME MATCHES \"Linux\")\n      set(MKL_LIBRARY ${MKL_ROOT_DIR}/lib/intel64 \n          CACHE PATH \"The library directory for MKL\")\n    else()\n      set(MKL_LIBRARY ${MKL_ROOT_DIR}/lib\n          CACHE PATH \"The library directory for MKL\")\n    endif()\n  endif()\n  \n  if(FORTRAN_INTEGER_SIZE EQUAL 4)\n    set(MKL_INT_TYPE \"lp64\")\n  elseif(FORTRAN_INTEGER_SIZE EQUAL 8)\n    set(MKL_INT_TYPE \"ilp64\")\n  else()\n    set(MKL_INT_TYPE \"lp64\")\n  endif()\n  \n  # There are no user specified components, but we use the component handling\n  # mechanism to make sure we find all the required libraries.\n  set(MKL_FIND_COMPONENTS mkl_intel_${MKL_INT_TYPE} mkl_core mkl_sequential)\n  set(MKL_FIND_REQUIRED_mkl_intel_${MKL_INT_TYPE} TRUE)\n  set(MKL_FIND_REQUIRED_mkl_core TRUE)\n  set(MKL_FIND_REQUIRED_mkl_sequential TRUE)\n  \n  # Search for MKL header files\n  find_path(MKL_INCLUDE_DIRS mkl.h\n      HINTS ${MKL_INCLUDE_DIR} /usr/include/mkl)\n      \n  # Get MKL version\n  if(MKL_INCLUDE_DIRS)\n    file(READ \"${MKL_INCLUDE_DIRS}/mkl_version.h\" _mkl_version_file)\n    string(REGEX REPLACE \".*#define __INTEL_MKL__ ([0-9]+).*\" \"\\\\1\"\n            MKL_VERSION_MAJOR \"${_mkl_version_file}\")\n    string(REGEX REPLACE \".*#define __INTEL_MKL_MINOR__ ([0-9]+).*\" \"\\\\1\"\n            MKL_VERSION_MINOR \"${_mkl_version_file}\")\n    string(REGEX REPLACE \".*#define __INTEL_MKL_UPDATE__ ([0-9]+).*\" \"\\\\1\"\n            MKL_VERSION_UPDATE \"${_mkl_version_file}\")\n    set(MKL_VERSION \"${MKL_VERSION_MAJOR}.${MKL_VERSION_MINOR}.${MKL_VERSION_UPDATE}\")\n    unset(_mkl_version_header)\n  endif()\n  \n  # Search for MKL libraries\n  foreach(_lib ${MKL_FIND_COMPONENTS})\n    if(BLA_STATIC)\n      find_library(MKL_${_lib}_LIBRARY ${CMAKE_STATIC_LIBRARY_PREFIX}${_lib}${CMAKE_STATIC_LIBRARY_SUFFIX} ${_lib}\n          HINTS ${MKL_LIBRARY})\n    else()\n      find_library(MKL_${_lib}_LIBRARY ${_lib}\n          HINTS ${MKL_LIBRARY})\n    endif()\n    if(MKL_${_lib}_LIBRARY)\n      set(MKL_${_lib}_FOUND TRUE)\n      list(APPEND MKL_LIBRARIESX ${MKL_${_lib}_LIBRARY})\n    else()\n      set(MKL_${_lib}_FOUND FALSE)\n    endif()\n  endforeach()\n  \n  # Set LAPACK_LIBRARIES variable if MKL was found\n  if(MKL_mkl_core_FOUND)\n    set(MKL_FOUND TRUE)\n    if(UNIX AND NOT APPLE AND BLA_STATIC)\n      set(MKL_LIBRARIES -Wl,--start-group ${MKL_LIBRARIESX} -Wl,--end-group -lm -ldl\n          CACHE STRING \"The Intel MKL libraries\")\n    else()\n      set(MKL_LIBRARIES ${MKL_LIBRARIESX} -lm -ldl\n          CACHE STRING \"The Intel MKL libraries\")\n    endif()\n  endif()\n  \n  # handle the QUIETLY and REQUIRED arguments and set MKL_FOUND to TRUE\n  # if all listed variables are TRUE\n  find_package_handle_standard_args(MKL\n      FOUND_VAR MKL_FOUND\n      VERSION_VAR MKL_VERSION \n      REQUIRED_VARS MKL_LIBRARIES MKL_INCLUDE_DIRS\n      HANDLE_COMPONENTS)\n\nendif()\n"
  },
  {
    "path": "cmake/modules/FindOrFetchCereal.cmake",
    "content": "if (NOT TARGET cereal)\n    find_package(cereal QUIET CONFIG)\n\n    if (TARGET cereal)\n        message(STATUS \"Found Cereal: cereal_CONFIG=${cereal_CONFIG}\")\n        target_compile_definitions(cereal INTERFACE\n                \"CEREAL_THREAD_SAFE=1\")\n    else (TARGET cereal)\n        # try looking for header-only cereal\n        find_path(cereal_header_paths_tmp\n                NAMES\n                cereal.hpp\n                PATH_SUFFIXES\n                include\n                cereal\n                cereal/include\n                )\n\n        get_filename_component(cereal_INCLUDE_DIRS ${cereal_header_paths_tmp} PATH)\n\n        include(FindPackageHandleStandardArgs)\n        set(cereal_FIND_QUIETLY 1)\n        find_package_handle_standard_args(cereal\n                REQUIRED_VARS cereal_INCLUDE_DIRS)\n\n        if (cereal_FOUND)\n            message(STATUS \"Found Cereal (header-only, at ${cereal_INCLUDE_DIRS})\")\n            add_library(cereal INTERFACE IMPORTED)\n            set_target_properties(cereal PROPERTIES\n                    INTERFACE_INCLUDE_DIRECTORIES \"${cereal_INCLUDE_DIRS}\"\n                    INTERFACE_COMPILE_DEFINITIONS \"CEREAL_THREAD_SAFE=1\")\n        endif ()\n\n        # if header-only cereal not found either fetchcontent it over\n        if (NOT TARGET cereal)\n            cmake_minimum_required(VERSION 3.14.0)  # for FetchContent_MakeAvailable\n            include(FetchContent)\n            FetchContent_Declare(\n                    cereal\n                    GIT_REPOSITORY https://github.com/USCiLab/cereal.git\n                    GIT_TAG v1.3.2)\n\n            # configure cereal\n            set(JUST_INSTALL_CEREAL ON CACHE BOOL \"\")\n            set(THREAD_SAFE ON CACHE BOOL \"\")\n            set(CEREAL_INSTALL ON CACHE BOOL \"\")\n\n            FetchContent_MakeAvailable(cereal)\n\n            # Export cereal target for build tree so MADNESS can export targets that depend on it\n            # Note: cereal v1.3.2 has its own install exports, but we need build tree export for MADNESS\n            export(TARGETS cereal FILE \"${PROJECT_BINARY_DIR}/cereal-targets.cmake\")\n\n            # set cereal_CONFIG to the install location so that we know where to find it\n            set(cereal_CONFIG ${CMAKE_INSTALL_PREFIX}/share/cmake/cereal/cereal-config.cmake)\n        endif (NOT TARGET cereal)\n\n    endif (TARGET cereal)\nendif (NOT TARGET cereal)\n\nif (TARGET cereal)\n    set(MADNESS_HAS_CEREAL ON CACHE BOOL \"MADNESS has access to Cereal\")\nelse (TARGET cereal)\n    message(FATAL_ERROR \"MADNESS_ENABLE_CEREAL=ON but could not find or fetch Cereal\")\nendif (TARGET cereal)"
  },
  {
    "path": "cmake/modules/FindOrFetchPARSEC.cmake",
    "content": "if (NOT TARGET PaRSEC::parsec)\n  find_package(PaRSEC CONFIG QUIET COMPONENTS parsec HINTS ${PaRSEC_ROOT_DIR})\n  if (TARGET PaRSEC::parsec)\n    message(STATUS \"Found PaRSEC CONFIG at ${PaRSEC_CONFIG}\")\n  endif (TARGET PaRSEC::parsec)\nendif (NOT TARGET PaRSEC::parsec)\n\nif (NOT TARGET PaRSEC::parsec)\n\n  # configure PaRSEC\n  set(SUPPORT_FORTRAN OFF CACHE BOOL \"Disable Fortran support in PaRSEC\")\n  set(CMAKE_CROSSCOMPILING OFF)\n  set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})\n\n  FetchContent_Declare(\n          PARSEC\n          GIT_REPOSITORY     https://github.com/ICLDisco/parsec.git\n          GIT_TAG            ${MADNESS_TRACKED_PARSEC_TAG}\n  )\n  FetchContent_MakeAvailable(PARSEC)\n  FetchContent_GetProperties(PARSEC\n          SOURCE_DIR PARSEC_SOURCE_DIR\n          BINARY_DIR PARSEC_BINARY_DIR\n          )\n\n  # disable unity builds for parsec libs\n  if (CMAKE_UNITY_BUILD)\n    set(_parsec_libs_to_not_unity_build parsec-base-obj parsec-ptgpp parsec)\n    foreach (_parsec_lib IN LISTS _parsec_libs_to_not_unity_build)\n      if(TARGET ${_parsec_lib})\n        set_target_properties(${_parsec_lib} PROPERTIES UNITY_BUILD OFF)\n        message(STATUS \"Will disable unity-build for target ${_parsec_lib}\")\n      else()\n        message(FATAL_ERROR \"FindOrFetchPaRSEC missing target ${_parsec_lib}\")\n      endif()\n    endforeach ()\n  endif(CMAKE_UNITY_BUILD)\n\n  # this is where PaRSECConfig.cmake will end up\n  # must be in sync with the \"install(FILES ...PaRSECConfig.cmake\" statement in PaRSEC source\n  set(PaRSEC_CONFIG \"${CMAKE_INSTALL_PREFIX}/share/cmake/parsec/PaRSECConfig.cmake\" CACHE INTERNAL \"The location of installed PaRSECConfig.cmake file\")\n\n  # export parsec targets from the build tree for the same to be possible for madness targets\n  export(EXPORT parsec-targets FILE \"${PROJECT_BINARY_DIR}/parsec-targets.cmake\")\n\nendif(NOT TARGET PaRSEC::parsec)\n\n# postcond check\nif (NOT TARGET PaRSEC::parsec)\n  message(FATAL_ERROR \"FindOrFetchPARSEC could not make PaRSEC::parsec target available\")\nendif(NOT TARGET PaRSEC::parsec)\n"
  },
  {
    "path": "cmake/modules/FindPCM.cmake",
    "content": "# - Try to find PCM\n# Input variables:\n#  PCM_ROOT_DIR     - The pcm  install directory\n#  PCM_INCLUDE_DIR  - The pcm  include directory | optional, else determined from PCM_ROOT_DIR, dont set PCM_ROOT_DIR if you want to use this\n#  PCM_LIBRARY      - The pcm  library directory | optional, else determined from PCM_ROOT_DIR, ...\n# Output variables:\n#  PCM_FOUND        - System has pcm\n#  PCM_INCLUDE_DIRS - The pcm include directories\n#  PCM_LIBRARIES    - The libraries needed to use pcm\n#  PCM_VERSION      - The version string for pcm | currently unused\n\ninclude(FindPackageHandleStandardArgs)\n\nif(NOT PCM_FOUND)\n\n  # define include and library directories based on root directory\n  if(PCM_ROOT_DIR) \n    set(PCM_INCLUDE_DIR ${PCM_ROOT_DIR}/include/ CACHE PATH \"The include directory for PCM\")\n    if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n      set(PCM_LIBRARY ${PCM_ROOT_DIR}/lib;${PCM_ROOT_DIR}/lib64 CACHE PATH \"Linker Flags for PCM Library\")\n    else()\n      set(PCM_LIBRARY ${PCM_ROOT_DIR}/lib CACHE PATH \"Linker Flags for PCM Library\")\n    endif()\n  endif()\n  \n  find_path(PCM_INCLUDE_DIRS NAMES PCMSolver/pcmsolver.h \n      HINTS ${PCM_INCLUDE_DIR})\n  \n  find_library(PCM_LIBRARIES NAMES pcm \n      HINTS ${PCM_LIBRARY})\n  \n  # Get PCM version\n#  if(PCM_INCLUDE_DIRS)\n#    file(READ \"${PCM_INCLUDE_DIRS}/GitInfo.hpp\" _PCM_version_header)\n#    string(REGEX MATCH \"define[ \\t]+PCM_VERSION[ \\t]+\\\\\\\"([0-9\\\\.]+)\\\\\\\"\" \n#        PCM_VERSION \"${_PCM_version_header}\")\n#    string(REGEX MATCH \"([0-9\\\\.]+)\" PCM_VERSION \"${PCM_VERSION}\")\n#    unset(_PCM_version_header)\n#  endif()\n\n\n  # handle the QUIETLY and REQUIRED arguments and set PCM_FOUND to TRUE\n  # if all listed variables are TRUE\n  find_package_handle_standard_args(PCM\n      FOUND_VAR PCM_FOUND\n      VERSION_VAR PCM_VERSION \n      REQUIRED_VARS PCM_LIBRARIES PCM_INCLUDE_DIRS)\n\n  mark_as_advanced(PCM_INCLUDE_DIR PCM_LIBRARY \n      PCM_INCLUDE_DIRS PCM_LIBRARIES)\n\nendif()\n"
  },
  {
    "path": "cmake/modules/FindPapi.cmake",
    "content": "# - Try to find Papi\n# Input variables:\n#  PAPI_ROOT_DIR     - The papi install directory\n#  PAPI_INCLUDE_DIR  - The papi include directory\n#  PAPI_LIBRARY      - The papi library directory\n# Output variables:\n#  PAPI_FOUND        - System has papi\n#  PAPI_INCLUDE_DIRS - The papi include directories\n#  PAPI_LIBRARIES    - The libraries needed to use papi\n\ninclude(FindPackageHandleStandardArgs)\n  \nif(NOT PAPI_FOUND)\n\n  # Set default sarch paths for papi\n  if(PAPI_ROOT_DIR)\n    set(PAPI_INCLUDE_DIR ${PAPI_ROOT_DIR}/include CACHE PATH \"The include directory for papi\")\n    if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n      set(PAPI_LIBRARY ${PAPI_ROOT_DIR}/lib64;${PAPI_ROOT_DIR}/lib CACHE PATH \"The library directory for papi\")\n    else()\n      set(PAPI_LIBRARY ${PAPI_ROOT_DIR}/lib CACHE PATH \"The library directory for papi\")\n    endif()\n  endif()\n  \n  find_path(PAPI_INCLUDE_DIRS NAMES papi.h\n      HINTS ${PAPI_INCLUDE_DIR})\n\n  find_library(PAPI_papi_LIBRARIES papi \n      HINTS ${PAPI_LIBRARY})\n\n  if(PAPI_INCLUDE_DIRS AND PAPI_papi_LIBRARY)\n    add_library(papi UNKNOWN IMPORTED)\n    set_target_properties(papi PROPERTIES\n        IMPORTED_LOCATION \"${PAPI_papi_LIBRARIES}\"\n        INTERFACE_INCLUDE_DIRECTORIES \"${PAPI_INCLUDE_DIRS}\")\n  endif()\n  \n  set(PAPI_LIBRARIES papi)\n  \n  # handle the QUIETLY and REQUIRED arguments and set PAPI_FOUND to TRUE\n  # if all listed variables are TRUE\n  find_package_handle_standard_args(Papi\n      FOUND_VAR PAPI_FOUND\n      REQUIRED_VARS PAPI_LIBRARIES PAPI_INCLUDE_DIRS)\n\n  mark_as_advanced(PAPI_INCLUDE_DIR PAPI_LIBRARY \n      PAPI_INCLUDE_DIRS PAPI_LIBRARIES)\n\nendif()"
  },
  {
    "path": "cmake/modules/FindTBB.cmake",
    "content": "# based https://github.com/Kitware/VTK/blob/master/CMake/FindTBB.cmake\n#\n# CHANGES:\n# - TBB_ROOT -> TBBROOT (tbb shell scripts set envvar TBBROOT)\n\n# - Find ThreadingBuildingBlocks include dirs and libraries\n# Use this module by invoking find_package with the form:\n#  find_package(TBB\n#    [REQUIRED]             # Fail with error if TBB is not found\n#    )                      #\n# Once done, this will define\n#\n#  TBB_FOUND - system has TBB\n#  TBB_INCLUDE_DIRS - the TBB include directories\n#  TBB_LIBRARIES - TBB libraries to be linked, doesn't include malloc or\n#                  malloc proxy\n#  TBB::tbb - imported target for the TBB library\n#\n#  TBB_VERSION_MAJOR - Major Product Version Number\n#  TBB_VERSION_MINOR - Minor Product Version Number\n#  TBB_INTERFACE_VERSION - Engineering Focused Version Number\n#  TBB_COMPATIBLE_INTERFACE_VERSION - The oldest major interface version\n#                                     still supported. This uses the engineering\n#                                     focused interface version numbers.\n#\n#  TBB_MALLOC_FOUND - system has TBB malloc library\n#  TBB_MALLOC_INCLUDE_DIRS - the TBB malloc include directories\n#  TBB_MALLOC_LIBRARIES - The TBB malloc libraries to be lined\n#  TBB::malloc - imported target for the TBB malloc library\n#\n#  TBB_MALLOC_PROXY_FOUND - system has TBB malloc proxy library\n#  TBB_MALLOC_PROXY_INCLUDE_DIRS = the TBB malloc proxy include directories\n#  TBB_MALLOC_PROXY_LIBRARIES - The TBB malloc proxy libraries to be lined\n#  TBB::malloc_proxy - imported target for the TBB malloc proxy library\n#\n#\n# This module reads hints about search locations from variables:\n#  ENV TBB_ARCH_PLATFORM - for eg. set it to \"mic\" for Xeon Phi builds\n#  ENV TBBROOT or just TBBROOT - root directory of tbb installation\n#  ENV TBB_BUILD_PREFIX - specifies the build prefix for user built tbb\n#                         libraries. Should be specified with ENV TBBROOT\n#                         and optionally...\n#  ENV TBB_BUILD_DIR - if build directory is different than ${TBBROOT}/build\n#\n#\n# Modified by Robert Maynard from the original OGRE source\n#\n#-------------------------------------------------------------------\n# This file is part of the CMake build system for OGRE\n#     (Object-oriented Graphics Rendering Engine)\n# For the latest info, see http://www.ogre3d.org/\n#\n# The contents of this file are placed in the public domain. Feel\n# free to make use of it in any way you like.\n#-------------------------------------------------------------------\n#\n#=============================================================================\n# Copyright 2010-2012 Kitware, Inc.\n# Copyright 2012      Rolf Eike Beer <eike@sf-mail.de>\n#\n# Distributed under the OSI-approved BSD License (the \"License\");\n# see accompanying file Copyright.txt for details.\n#\n# This software is distributed WITHOUT ANY WARRANTY; without even the\n# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the License for more information.\n#=============================================================================\n# (To distribute this file outside of CMake, substitute the full\n#  License text for the above reference.)\n\n\n#=============================================================================\n#  FindTBB helper functions and macros\n#\n\n#====================================================\n# Fix the library path in case it is a linker script\n#====================================================\nfunction(tbb_extract_real_library library real_library)\n  if(NOT UNIX OR NOT EXISTS ${library})\n    set(${real_library} \"${library}\" PARENT_SCOPE)\n    return()\n  endif()\n\n  #Read in the first 4 bytes and see if they are the ELF magic number\n  set(_elf_magic \"7f454c46\")\n  file(READ ${library} _hex_data OFFSET 0 LIMIT 4 HEX)\n  if(_hex_data STREQUAL _elf_magic)\n    #we have opened a elf binary so this is what\n    #we should link to\n    set(${real_library} \"${library}\" PARENT_SCOPE)\n    return()\n  endif()\n\n  file(READ ${library} _data OFFSET 0 LIMIT 1024)\n  if(\"${_data}\" MATCHES \"INPUT \\\\(([^(]+)\\\\)\")\n    #extract out the .so name from REGEX MATCH command\n    set(_proper_so_name \"${CMAKE_MATCH_1}\")\n\n    #construct path to the real .so which is presumed to be in the same directory\n    #as the input file\n    get_filename_component(_so_dir \"${library}\" DIRECTORY)\n    set(${real_library} \"${_so_dir}/${_proper_so_name}\" PARENT_SCOPE)\n  else()\n    #unable to determine what this library is so just hope everything works\n    #and pass it unmodified.\n    set(${real_library} \"${library}\" PARENT_SCOPE)\n  endif()\nendfunction()\n\n#===============================================\n# Do the final processing for the package find.\n#===============================================\nmacro(findpkg_finish PREFIX TARGET_NAME)\n  if (${PREFIX}_INCLUDE_DIR AND ${PREFIX}_LIBRARY)\n    set(${PREFIX}_FOUND TRUE)\n    set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIR})\n    set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARY})\n  else ()\n    if (${PREFIX}_FIND_REQUIRED AND NOT ${PREFIX}_FIND_QUIETLY)\n      message(FATAL_ERROR \"Required library ${PREFIX} not found.\")\n    endif ()\n  endif ()\n\n  if (NOT TARGET \"TBB::${TARGET_NAME}\")\n    if (${PREFIX}_LIBRARY_RELEASE)\n      tbb_extract_real_library(${${PREFIX}_LIBRARY_RELEASE} real_release)\n    endif ()\n    if (${PREFIX}_LIBRARY_DEBUG)\n      tbb_extract_real_library(${${PREFIX}_LIBRARY_DEBUG} real_debug)\n    endif ()\n    add_library(TBB::${TARGET_NAME} UNKNOWN IMPORTED)\n    set_target_properties(TBB::${TARGET_NAME} PROPERTIES\n            INTERFACE_INCLUDE_DIRECTORIES \"${${PREFIX}_INCLUDE_DIR}\")\n    if (${PREFIX}_LIBRARY_DEBUG AND ${PREFIX}_LIBRARY_RELEASE)\n      set_target_properties(TBB::${TARGET_NAME} PROPERTIES\n              IMPORTED_LOCATION \"${real_release}\"\n              IMPORTED_LOCATION_DEBUG \"${real_debug}\"\n              IMPORTED_LOCATION_RELEASE \"${real_release}\")\n    elseif (${PREFIX}_LIBRARY_RELEASE)\n      set_target_properties(TBB::${TARGET_NAME} PROPERTIES\n              IMPORTED_LOCATION \"${real_release}\")\n    elseif (${PREFIX}_LIBRARY_DEBUG)\n      set_target_properties(TBB::${TARGET_NAME} PROPERTIES\n              IMPORTED_LOCATION \"${real_debug}\")\n    endif ()\n    # on non-Windows platforms need C++ library\n    # tried IMPORTED_LINK_DEPENDENT_LIBRARIES\n    # and IMPORTED_LINK_INTERFACE_LANGUAGES (and changing UNKNOWN -> SHARED/STATIC in add_library)\n    # to pass this info, to no avail\n    if (NOT (WIN32 AND MSVC))\n      if (USE_LIBCXX)\n        set(std_cxx_lib_name c++)\n      else (USE_LIBCXX)\n        set(std_cxx_lib_name stdc++)\n      endif (USE_LIBCXX)\n      target_link_libraries(TBB::${TARGET_NAME} INTERFACE ${std_cxx_lib_name})\n      unset(std_cxx_lib_name)\n    endif ()\n  endif ()\n\n  #mark the following variables as internal variables\n  mark_as_advanced(${PREFIX}_INCLUDE_DIR\n          ${PREFIX}_LIBRARY\n          ${PREFIX}_LIBRARY_DEBUG\n          ${PREFIX}_LIBRARY_RELEASE)\nendmacro()\n\n#===============================================\n# Generate debug names from given release names\n#===============================================\nmacro(get_debug_names PREFIX)\n  foreach(i ${${PREFIX}})\n    set(${PREFIX}_DEBUG ${${PREFIX}_DEBUG} ${i}d ${i}D ${i}_d ${i}_D ${i}_debug ${i})\n  endforeach()\nendmacro()\n\n#===============================================\n# See if we have env vars to help us find tbb\n#===============================================\nmacro(getenv_path VAR)\n  set(ENV_${VAR} $ENV{${VAR}})\n  # replace won't work if var is blank\n  if (ENV_${VAR})\n    string( REGEX REPLACE \"\\\\\\\\\" \"/\" ENV_${VAR} ${ENV_${VAR}} )\n  endif ()\nendmacro()\n\n#===============================================\n# Couple a set of release AND debug libraries\n#===============================================\nmacro(make_library_set PREFIX)\n  if (${PREFIX}_RELEASE AND ${PREFIX}_DEBUG)\n    set(${PREFIX} optimized ${${PREFIX}_RELEASE} debug ${${PREFIX}_DEBUG})\n  elseif (${PREFIX}_RELEASE)\n    set(${PREFIX} ${${PREFIX}_RELEASE})\n  elseif (${PREFIX}_DEBUG)\n    set(${PREFIX} ${${PREFIX}_DEBUG})\n  endif ()\nendmacro()\n\n\n#=============================================================================\n#  Now to actually find TBB\n#\n\n# Get path, convert backslashes as ${ENV_${var}}\ngetenv_path(TBBROOT)\n\n# initialize search paths\nset(TBB_PREFIX_PATH ${TBBROOT} ${ENV_TBBROOT})\nset(TBB_INC_SEARCH_PATH \"\")\nset(TBB_LIB_SEARCH_PATH \"\")\n\n# Use TBBConfig.cmake if possible.\nset(_tbb_find_quiet)\nif (TBB_FIND_QUIETLY)\n  set(_tbb_find_quiet QUIET)\nendif ()\nset(_tbb_find_components)\nset(_tbb_find_optional_components)\nforeach (_tbb_find_component IN LISTS TBB_FIND_COMPONENTS)\n  if (TBB_FIND_REQUIRED_${_tbb_find_component})\n    list(APPEND _tbb_find_components \"${_tbb_find_component}\")\n  else ()\n    list(APPEND _tbb_find_optional_components \"${_tbb_find_component}\")\n  endif ()\nendforeach ()\nunset(_tbb_find_component)\nfind_package(TBB CONFIG ${_tbb_find_quiet}\n        COMPONENTS ${_tbb_find_components}\n        OPTIONAL_COMPONENTS ${_tbb_find_optional_components}\n        HINTS ${TBB_PREFIX_PATH})\nunset(_tbb_find_quiet)\nunset(_tbb_find_components)\nunset(_tbb_find_optional_components)\nif (TBB_FOUND)\n  return ()\nendif ()\n\n# If user built from sources\nset(TBB_BUILD_PREFIX $ENV{TBB_BUILD_PREFIX})\nif (TBB_BUILD_PREFIX AND ENV_TBBROOT)\n  getenv_path(TBB_BUILD_DIR)\n  if (NOT ENV_TBB_BUILD_DIR)\n    set(ENV_TBB_BUILD_DIR ${ENV_TBBROOT}/build)\n  endif ()\n\n  # include directory under ${ENV_TBBROOT}/include\n  list(APPEND TBB_LIB_SEARCH_PATH\n          ${ENV_TBB_BUILD_DIR}/${TBB_BUILD_PREFIX}_release\n          ${ENV_TBB_BUILD_DIR}/${TBB_BUILD_PREFIX}_debug)\nendif ()\n\n\n# For Windows, let's assume that the user might be using the precompiled\n# TBB packages from the main website. These use a rather awkward directory\n# structure (at least for automatically finding the right files) depending\n# on platform and compiler, but we'll do our best to accommodate it.\n# Not adding the same effort for the precompiled linux builds, though. Those\n# have different versions for CC compiler versions and linux kernels which\n# will never adequately match the user's setup, so there is no feasible way\n# to detect the \"best\" version to use. The user will have to manually\n# select the right files. (Chances are the distributions are shipping their\n# custom version of tbb, anyway, so the problem is probably nonexistent.)\nif (WIN32 AND MSVC)\n  set(COMPILER_PREFIX \"vc7.1\")\n  if (MSVC_VERSION EQUAL 1400)\n    set(COMPILER_PREFIX \"vc8\")\n  elseif(MSVC_VERSION EQUAL 1500)\n    set(COMPILER_PREFIX \"vc9\")\n  elseif(MSVC_VERSION EQUAL 1600)\n    set(COMPILER_PREFIX \"vc10\")\n  elseif(MSVC_VERSION EQUAL 1700)\n    set(COMPILER_PREFIX \"vc11\")\n  elseif(MSVC_VERSION EQUAL 1800)\n    set(COMPILER_PREFIX \"vc12\")\n  elseif(MSVC_VERSION GREATER_EQUAL 1900)\n    set(COMPILER_PREFIX \"vc14\")\n  endif ()\n\n  # for each prefix path, add ia32/64\\${COMPILER_PREFIX}\\lib to the lib search path\n  foreach (dir IN LISTS TBB_PREFIX_PATH)\n    if (CMAKE_CL_64)\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia64/${COMPILER_PREFIX}/lib)\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia64/${COMPILER_PREFIX})\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/${COMPILER_PREFIX}/lib)\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64/${COMPILER_PREFIX})\n    else ()\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/${COMPILER_PREFIX}/lib)\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32/${COMPILER_PREFIX})\n    endif ()\n  endforeach ()\nendif ()\n\n# For OS X binary distribution, choose libc++ based libraries for Mavericks (10.9)\n# and above and AppleClang\nif (CMAKE_SYSTEM_NAME STREQUAL \"Darwin\" AND\n        NOT CMAKE_SYSTEM_VERSION VERSION_LESS 13.0)\n  set (USE_LIBCXX OFF)\n  cmake_policy(GET CMP0025 POLICY_VAR)\n\n  if (POLICY_VAR STREQUAL \"NEW\")\n    if (CMAKE_CXX_COMPILER_ID STREQUAL \"AppleClang\")\n      set (USE_LIBCXX ON)\n    endif ()\n  else ()\n    if (CMAKE_CXX_COMPILER_ID STREQUAL \"Clang\")\n      set (USE_LIBCXX ON)\n    endif ()\n  endif ()\n\n  if (USE_LIBCXX)\n    foreach (dir IN LISTS TBB_PREFIX_PATH)\n      list (APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/libc++ ${dir}/libc++/lib)\n    endforeach ()\n  endif ()\nendif ()\n\n# check compiler ABI\nif (CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\")\n  set(COMPILER_PREFIX)\n  if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)\n    list(APPEND COMPILER_PREFIX \"gcc4.8\")\n  endif()\n  if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)\n    list(APPEND COMPILER_PREFIX \"gcc4.7\")\n  endif()\n  if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)\n    list(APPEND COMPILER_PREFIX \"gcc4.4\")\n  endif()\n  list(APPEND COMPILER_PREFIX \"gcc4.1\")\nelseif(CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n  set(COMPILER_PREFIX)\n  if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) # Complete guess\n    list(APPEND COMPILER_PREFIX \"gcc4.8\")\n  endif()\n  if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6)\n    list(APPEND COMPILER_PREFIX \"gcc4.7\")\n  endif()\n  list(APPEND COMPILER_PREFIX \"gcc4.4\")\nelse() # Assume compatibility with 4.4 for other compilers\n  list(APPEND COMPILER_PREFIX \"gcc4.4\")\nendif ()\n\n# if platform architecture is explicitly specified\nset(TBB_ARCH_PLATFORM $ENV{TBB_ARCH_PLATFORM})\nif (TBB_ARCH_PLATFORM)\n  foreach (dir IN LISTS TBB_PREFIX_PATH)\n    list(APPEND TBB_LIB_SEARCH_PATH ${dir}/${TBB_ARCH_PLATFORM}/lib)\n    list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/${TBB_ARCH_PLATFORM})\n  endforeach ()\nendif ()\n\nforeach (dir IN LISTS TBB_PREFIX_PATH)\n  foreach (prefix IN LISTS COMPILER_PREFIX)\n    if (CMAKE_SIZEOF_VOID_P EQUAL 8)\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64)\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64/${prefix})\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/lib)\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/${prefix}/lib)\n    else ()\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32)\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32/${prefix})\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/lib)\n      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/${prefix}/lib)\n    endif ()\n  endforeach()\nendforeach ()\n\n# add general search paths\nforeach (dir IN LISTS TBB_PREFIX_PATH)\n  list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib ${dir}/Lib ${dir}/lib/tbb\n          ${dir}/Libs)\n  list(APPEND TBB_INC_SEARCH_PATH ${dir}/include ${dir}/Include\n          ${dir}/include/tbb)\nendforeach ()\n\nset(TBB_LIBRARY_NAMES tbb)\nget_debug_names(TBB_LIBRARY_NAMES)\n\n\nfind_path(TBB_INCLUDE_DIR\n        NAMES tbb/tbb.h\n        PATHS ${TBB_INC_SEARCH_PATH})\n\nfind_library(TBB_LIBRARY_RELEASE\n        NAMES ${TBB_LIBRARY_NAMES}\n        PATHS ${TBB_LIB_SEARCH_PATH})\nfind_library(TBB_LIBRARY_DEBUG\n        NAMES ${TBB_LIBRARY_NAMES_DEBUG}\n        PATHS ${TBB_LIB_SEARCH_PATH})\nmake_library_set(TBB_LIBRARY)\n\nfindpkg_finish(TBB tbb)\n\n#if we haven't found TBB no point on going any further\nif (NOT TBB_FOUND)\n  return()\nendif ()\n\n#=============================================================================\n# Look for TBB's malloc package\nset(TBB_MALLOC_LIBRARY_NAMES tbbmalloc)\nget_debug_names(TBB_MALLOC_LIBRARY_NAMES)\n\nfind_path(TBB_MALLOC_INCLUDE_DIR\n        NAMES tbb/tbb.h\n        PATHS ${TBB_INC_SEARCH_PATH})\n\nfind_library(TBB_MALLOC_LIBRARY_RELEASE\n        NAMES ${TBB_MALLOC_LIBRARY_NAMES}\n        PATHS ${TBB_LIB_SEARCH_PATH})\nfind_library(TBB_MALLOC_LIBRARY_DEBUG\n        NAMES ${TBB_MALLOC_LIBRARY_NAMES_DEBUG}\n        PATHS ${TBB_LIB_SEARCH_PATH})\nmake_library_set(TBB_MALLOC_LIBRARY)\n\nfindpkg_finish(TBB_MALLOC tbbmalloc)\n\n#=============================================================================\n# Look for TBB's malloc proxy package\nset(TBB_MALLOC_PROXY_LIBRARY_NAMES tbbmalloc_proxy)\nget_debug_names(TBB_MALLOC_PROXY_LIBRARY_NAMES)\n\nfind_path(TBB_MALLOC_PROXY_INCLUDE_DIR\n        NAMES tbb/tbbmalloc_proxy.h\n        PATHS ${TBB_INC_SEARCH_PATH})\n\nfind_library(TBB_MALLOC_PROXY_LIBRARY_RELEASE\n        NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES}\n        PATHS ${TBB_LIB_SEARCH_PATH})\nfind_library(TBB_MALLOC_PROXY_LIBRARY_DEBUG\n        NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES_DEBUG}\n        PATHS ${TBB_LIB_SEARCH_PATH})\nmake_library_set(TBB_MALLOC_PROXY_LIBRARY)\n\nfindpkg_finish(TBB_MALLOC_PROXY tbbmalloc_proxy)\n\n\n#=============================================================================\n#parse all the version numbers from tbb\nif(NOT TBB_VERSION)\n  if (EXISTS \"${TBB_INCLUDE_DIR}/oneapi/tbb/version.h\")\n    file(STRINGS\n            \"${TBB_INCLUDE_DIR}/oneapi/tbb/version.h\"\n            TBB_VERSION_CONTENTS\n            REGEX \"VERSION\")\n  else()\n    #only read the start of the file\n    file(STRINGS\n            \"${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h\"\n            TBB_VERSION_CONTENTS\n            REGEX \"VERSION\")\n  endif()\n\n  string(REGEX REPLACE\n          \".*#define TBB_VERSION_MAJOR ([0-9]+).*\" \"\\\\1\"\n          TBB_VERSION_MAJOR \"${TBB_VERSION_CONTENTS}\")\n\n  string(REGEX REPLACE\n          \".*#define TBB_VERSION_MINOR ([0-9]+).*\" \"\\\\1\"\n          TBB_VERSION_MINOR \"${TBB_VERSION_CONTENTS}\")\n\n  string(REGEX REPLACE\n          \".*#define TBB_INTERFACE_VERSION ([0-9]+).*\" \"\\\\1\"\n          TBB_INTERFACE_VERSION \"${TBB_VERSION_CONTENTS}\")\n\n  string(REGEX REPLACE\n          \".*#define TBB_COMPATIBLE_INTERFACE_VERSION ([0-9]+).*\" \"\\\\1\"\n          TBB_COMPATIBLE_INTERFACE_VERSION \"${TBB_VERSION_CONTENTS}\")\n\nendif()\n"
  },
  {
    "path": "cmake/modules/GetGitMetadata.cmake",
    "content": "#\n# SPDX-FileCopyrightText: 2022 Eduard Valeyev <eduard@valeyev.net>\n#\n# SPDX-License-Identifier: BSD-2-Clause\n#\n\n#\n# vgkit_cmake_git_revision() defines variable ${PROJECT_NAME_UPPER}_GIT_REVISION,\n#   where ${PROJECT_NAME_UPPER} is the upper-case version of ${PROJECT_NAME}, to\n#   the \"long-form\" GIT revision produced by `git rev-parse -q HEAD` command.\n# N.B. If the variable is already defined will print a warning message but not change the value of\n#   ${PROJECT_NAME_UPPER}_GIT_REVISION\n#\nmacro(vgkit_cmake_git_revision)\n  string(TOUPPER \"${PROJECT_NAME}_GIT_REVISION\" vgkit_cmake_git_revision_result)\n  if (DEFINED ${vgkit_cmake_git_revision_result})\n    message(WARNING \"vgkit_cmake_git_revision() called for project ${PROJECT_NAME} but the result variable ${vgkit_cmake_git_revision_result} already defined; will not change its value\")\n  else()\n    if(EXISTS ${PROJECT_SOURCE_DIR}/.git)\n      find_package(Git REQUIRED)\n      if (GIT_FOUND)\n        execute_process(\n          COMMAND ${GIT_EXECUTABLE} rev-parse -q HEAD\n          WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}\n          RESULT_VARIABLE vgkit_cmake_git_revision_errcod\n          OUTPUT_VARIABLE ${vgkit_cmake_git_revision_result}\n          ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)\n        if(NOT vgkit_cmake_git_revision_errcod EQUAL 0)\n          set(${vgkit_cmake_git_revision_result} \"unknown\")\n        endif()\n        unset(vgkit_cmake_git_revision_errcod)\n      else()\n        set(${vgkit_cmake_git_revision_result} \"unknown\")\n      endif()\n    else()\n      set(${vgkit_cmake_git_revision_result} \"unknown\")\n    endif()\n  endif()\n  unset(vgkit_cmake_git_revision_result)\nendmacro()\n\n#\n# vgkit_cmake_git_description() defines variable ${PROJECT_NAME_UPPER}_GIT_DESCRIPTION,\n#   where ${PROJECT_NAME_UPPER} is the upper-case version of ${PROJECT_NAME}, to\n#   the human-readable form produced by `git describe --dirty` command.\n#   If the variable is already defined will print a warning message but not change the value of\n#   ${PROJECT_NAME_UPPER}_GIT_DESCRIPTION\n#\nmacro(vgkit_cmake_git_description)\n  string(TOUPPER \"${PROJECT_NAME}_GIT_DESCRIPTION\" vgkit_cmake_git_description_result)\n  if (DEFINED ${vgkit_cmake_git_description_result})\n    message(WARNING \"vgkit_cmake_git_description() called for project ${PROJECT_NAME} but the result variable ${vgkit_cmake_git_description_result} already defined; will not change its value\")\n  else()\n    if(EXISTS ${PROJECT_SOURCE_DIR}/.git)\n      find_package(Git REQUIRED)\n      if (GIT_FOUND)\n        execute_process(\n                COMMAND ${GIT_EXECUTABLE} describe --dirty\n                WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}\n                RESULT_VARIABLE vgkit_cmake_git_description_errcod\n                OUTPUT_VARIABLE ${vgkit_cmake_git_description_result}\n                ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)\n        if(NOT vgkit_cmake_git_description_errcod EQUAL 0)\n          set(${vgkit_cmake_git_description_errcod} \"unknown\")\n        endif()\n        unset(vgkit_cmake_git_description_errcod)\n      else()\n        set(${vgkit_cmake_git_description_errcod} \"unknown\")\n      endif()\n    else()\n      set(${vgkit_cmake_git_description_errcod} \"unknown\")\n    endif()\n  endif()\n  unset(vgkit_cmake_git_description_errcod)\nendmacro()\n\n#\n# vgkit_cmake_git_metadata() invokes vgkit_cmake_git_revision and vgkit_cmake_git_description\n#\nmacro(vgkit_cmake_git_metadata)\n  vgkit_cmake_git_revision()\n  vgkit_cmake_git_description()\nendmacro()\n"
  },
  {
    "path": "cmake/modules/RedefaultableOption.cmake",
    "content": "# if local variable is defined, use its value as the default, otherwise use _default\n# this is consistent with cmake 3.13 and later (see policy CMP0077)\nmacro(redefaultable_option _name _descr _default)\n\n  if (${_name})\n    set(${_name}_DEFAULT ${${_name}})\n  else()\n    set(${_name}_DEFAULT ${${_default}})\n  endif()\n  option(${_name} ${_descr} ${${_name}_DEFAULT})\n\nendmacro()"
  },
  {
    "path": "cmake/toolchains/arm-gnu-tbb.cmake",
    "content": "#\n# ARM Toolchain for MPI + TBB\n#\n# REQUIREMENTS:\n# - in PATH:\n#   mpicc and mpicxx\n#\n# OPTIONS:\n# - environment variables:\n#\n\n# Compilers\n\nif(NOT CMAKE_C_COMPILER)\n  set(CMAKE_C_COMPILER mpicc)\nendif()\nif(NOT CMAKE_CXX_COMPILER)\n  set(CMAKE_CXX_COMPILER mpicxx)\nendif()\nif (NOT MPI_C_COMPILER)\n  set(MPI_C_COMPILER mpicc)\nendif()\nif (NOT MPI_CXX_COMPILER)\n  set(MPI_CXX_COMPILER mpicxx)\nendif()\n\nset(CMAKE_C_FLAGS_DEBUG            \"-g -Wall -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C debug compile flags\")\nset(CMAKE_C_FLAGS_MINSIZEREL       \"-O1 -DNDEBUG -march=native\" CACHE STRING \"Inital C minimum size release compile flags\")\nset(CMAKE_C_FLAGS_RELEASE          \"-Ofast  -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fomit-frame-pointer -DNDEBUG -march=native\" CACHE STRING \"Inital C release compile flags\")\nset(CMAKE_C_FLAGS_RELWITHDEBINFO   \"-O2  -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -DNDEBUG -g -Wall -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C release with debug info compile flags\")\nset(CMAKE_CXX_FLAGS_DEBUG          \"-g -Wall -Wno-class-memaccess -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C++ debug compile flags\")\nset(CMAKE_CXX_FLAGS_MINSIZEREL     \"-O1 -DNDEBUG -march=native -Wall -Wno-class-memaccess -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C++ minimum size release compile flags\")\nset(CMAKE_CXX_FLAGS_RELEASE        \"-Ofast  -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fomit-frame-pointer -DNDEBUG -march=native -Wall -Wno-class-memaccess -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C++ release compile flags\")\nset(CMAKE_CXX_FLAGS_RELWITHDEBINFO \"-O2  -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -DNDEBUG -g -Wall -Wno-class-memaccess -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C++ release with debug info compile flags\")\n\n# Libraries\nif(EXISTS $ENV{TBBROOT})\n  set(TBB_ROOT_DIR \"$ENV{TBBROOT}\" CACHE PATH \"TBB root directory\")\nelse()\n  set(TBB_ROOT_DIR \"/opt/intel/tbb\" CACHE PATH \"TBB root directory\")\nendif()\n\n# Flags\nset(LAPACK_LIBRARIES \"-L/usr/lib/aarch64-linux-gnu/openblas\" \"-llapacke\" \"-llapack\" \"-lopenblas\")\n#set(LAPACK_LIBRARIES \"-L/opt/arm/armpl-19.2.0_Cortex-A72_Ubuntu-16.04_arm-hpc-compiler_19.2_aarch64-linux/lib\" \"-larmpl\" \"-lamath\")\n\n#set(LAPACK_COMPILE_DEFINITIONS MADNESS_LINALG_USE_LAPACKE CACHE STRING \"LAPACK preprocessor definitions\")\n#set(LAPACK_INCLUDE_DIRS ${MKL_ROOT_DIR}/include CACHE STRING \"LAPACK include directories\")\n\nset(INTEGER4 TRUE CACHE BOOL \"Set Fortran integer size to 4 bytes\")\nset(FORTRAN_INTEGER_SIZE \"4\" CACHE STRING \"Set Fortran integer size to 4 bytes\")\n"
  },
  {
    "path": "cmake/toolchains/dancer_gcc.cmake",
    "content": "# Set the system name so CMake uses the appropriate platform settings.\n# NOTE: The platforms settings for BlueGeneP are the same for BlueGeneQ \n# set(CMAKE_SYSTEM_NAME BlueGeneP-static)\n\n# # Set environment paths\n# set(IBM_DIR    \"$ENV{IBM_MAIN_DIR}\")\n# set(XLF_DIR    \"${IBM_DIR}/xlf/bg/14.1\")\n# set(XLSMP_DIR  \"${IBM_DIR}/xlsmp/bg/3.1\")\n# set(ESSL_DIR   \"/soft/libraries/essl/current/essl/5.1\")\n# set(LAPACK_DIR \"/soft/libraries/alcf/current/xl/LAPACK\")\n\n#set (PARSEC_DIR \"/home/aguermou/devel_build_gcc/install\")\n\n# # V1R2M0\n# #set(MPI_DIR   \"/bgsys/drivers/ppcfloor/comm/gcc\")\n# #set(PAMI_DIR  \"/bgsys/drivers/ppcfloor/comm/sys\")\n# # V1R2M1\n# #set(GCC_DIR    \"/bgsys/drivers/toolchain/V1R2M2_base_4.7.2/gnu-linux-4.7.2\")\n# # V1R2M2\n#set(GCC_DIR    \"/bgsys/drivers/toolchain/V1R2M2_base_4.7.2-efix14/gnu-linux-4.7.2-efix014\")\n# set(MPI_DIR    \"/bgsys/drivers/ppcfloor/comm\")\n# set(PAMI_DIR   \"/bgsys/drivers/ppcfloor/comm\")\n# set(SPI_DIR    \"/bgsys/drivers/ppcfloor/spi\")\n\n# Set compilers\nset(CMAKE_C_COMPILER       \"/opt/gcc-5.1/bin/gcc\")\nset(CMAKE_CXX_COMPILER     \"/opt/gcc-5.1/bin/g++\")\nset(CMAKE_Fortran_COMPILER \"/opt/gcc-5.1/bin/gfortran\")\nset(MPI_C_COMPILER         \"mpicc\")\nset(MPI_CXX_COMPILER       \"mpicxx\")\n\n# Set compile flags\nset(CMAKE_C_FLAGS_INIT             \"-std=c99\" CACHE STRING \"Inital C compile flags\")\nset(CMAKE_C_FLAGS_DEBUG            \"-g -Wall\" CACHE STRING \"Inital C debug compile flags\")\nset(CMAKE_C_FLAGS_MINSIZEREL       \"-Os -DNDEBUG\" CACHE STRING \"Inital C minimum size release compile flags\")\nset(CMAKE_C_FLAGS_RELEASE          \"-O3 -DNDEBUG\" CACHE STRING \"Inital C release compile flags\")\nset(CMAKE_C_FLAGS_RELWITHDEBINFO   \"-O2 -g -Wall\" CACHE STRING \"Inital C release with debug info compile flags\")\nset(CMAKE_CXX_FLAGS_INIT           \" -m64 -mcx16 -g -Wall\" CACHE STRING \"Inital C++ compile flags\")\nset(CMAKE_CXX_FLAGS_DEBUG          \"-g -Wall\" CACHE STRING \"Inital C++ debug compile flags\")\nset(CMAKE_CXX_FLAGS_MINSIZEREL     \"-Os -DNDEBUG\" CACHE STRING \"Inital C++ minimum size release compile flags\")\nset(CMAKE_CXX_FLAGS_RELEASE        \"-O3 -DNDEBUG\" CACHE STRING \"Inital C++ release compile flags\")\nset(CMAKE_CXX_FLAGS_RELWITHDEBINFO \"-O2 -g -Wall\" CACHE STRING \"Inital C++ release with debug info compile flags\")\n\n\n# Set library\n\n#set(XL_LIBRARIES ${XLSMP_DIR}/bglib64/libxlsmp.a)\n#set(XLF_LIBRARIES ${XLF_DIR}/bglib64/libxlf90_r.a;${XLF_DIR}/bglib64/libxlfmath.a;${XLF_DIR}/bglib64/libxlopt.a;${XLF_DIR}/bglib64/libxl.a;-ldl;-lm)\nset(BLAS_LIBRARIES /opt/intel/mkl/lib/intel64/libmkl_sequential.so;/opt/intel/mkl/lib/intel64/libmkl_core.so;/opt/intel/mkl/lib/intel64/libmkl_gf_lp64.so;-lm)\nset(LAPACK_LIBRARIES ${BLAS_LIBRARIES})\nset(FORTRAN_INTEGER_SIZE \"4\" CACHE STRING \"Set Fortran integer size in bytes\")\nset(HAVE_SPINLOCKS OFF CACHE BOOL \"Enable if pthread lib supports spinlocks in pmrrr\")\n\nset(PAPI_INCLUDE_DIR \"/opt/papi-5.4.3/include\")\nset(PAPI_LIBRARY \"/opt/papi-5.4.3/lib/libpapi.so\")\n\n\n##############################################################\n\n# set the search path for the environment coming with the compiler\n# and a directory where you can install your own compiled software\n#set(CMAKE_FIND_ROOT_PATH\n#    /bgsys/drivers/ppcfloor/\n#    ${MPI_DIR}\n#    ${PAMI_DIR}\n#    ${SPI_DIR}\n#    ${GCC_DIR}\n#    ${CLANG_DIR}\n#    ${IBM_DIR}\n#    ${XLF_DIR}\n#    ${XLSMP_DIR}\n#    ${ESSL_DIR})\n\n# adjust the default behaviour of the FIND_XXX() commands:\n# search headers and libraries in the target environment, search\n# programs in the host environment\n#set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n#set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\n##############################################################\n"
  },
  {
    "path": "cmake/toolchains/generic-mkl-tbb.cmake",
    "content": "#\n# Generic Toolchain for MPI + MKL + TBB\n#\n# REQUIREMENTS:\n# - in PATH:\n#   mpicc and mpicxx\n#\n# OPTIONS:\n# - environment variables:\n#   * MKLROOT: the MKL root directory; if not set, will use /opt/intel/mkl\n#   * TBBROOT: the TBB root directory; if not set, will use /opt/intel/tbb\n#\n\n# Compilers\n\n# These seem to break findmpi module\n#if(NOT CMAKE_C_COMPILER)\n#  set(CMAKE_C_COMPILER mpicc)\n#endif()\n#if(NOT CMAKE_CXX_COMPILER)\n#  set(CMAKE_CXX_COMPILER mpicxx)\n#endif()\n#if (NOT MPI_C_COMPILER)\n#  set(MPI_C_COMPILER mpicc)\n#endif()\n#if (NOT MPI_CXX_COMPILER)\n#  set(MPI_CXX_COMPILER mpicxx)\n#endif()\n\n# Specify the GNU compilers to use with Intel C/C++\nset(GCC_ROOT_DIR \"$ENV{GCC_DIR}\")\nset(GCC_SUFFIX \"$ENV{GCC_SUFFIX}\")\nif (CMAKE_CXX_COMPILER_ID EQUAL \"Intel\" AND GCC_ROOT_DIR)\n  set(CMAKE_C_FLAGS_INIT             \"-std=c99 -gcc-name=${GCC_ROOT_DIR}/bin/gcc${GCC_SUFFIX}\" CACHE STRING \"Inital C compile flags\")\n  set(CMAKE_CXX_FLAGS_INIT           \"-gxx-name=${GCC_ROOT_DIR}/bin/g++${GCC_SUFFIX}\" CACHE STRING \"Initial C++ compile flags\")\nelse()\n  set(CMAKE_C_FLAGS_INIT             \"-std=c99\" CACHE STRING \"Inital C compile flags\")\n  set(CMAKE_CXX_FLAGS_INIT           \"\" CACHE STRING \"Initial C++ compile flags\")\nendif()\n\nset(CMAKE_C_FLAGS_DEBUG            \"-g -Wall -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C debug compile flags\")\nset(CMAKE_C_FLAGS_MINSIZEREL       \"-O1 -DNDEBUG -march=native\" CACHE STRING \"Inital C minimum size release compile flags\")\nset(CMAKE_C_FLAGS_RELEASE          \"-O3 -DNDEBUG -march=native\" CACHE STRING \"Inital C release compile flags\")\nset(CMAKE_C_FLAGS_RELWITHDEBINFO   \"-O2 -DNDEBUG -g -Wall -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C release with debug info compile flags\")\nset(CMAKE_CXX_FLAGS_DEBUG          \"-g -Wall -Wno-class-memaccess -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C++ debug compile flags\")\nset(CMAKE_CXX_FLAGS_MINSIZEREL     \"-O1 -DNDEBUG -march=native -Wall -Wno-class-memaccess -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C++ minimum size release compile flags\")\nset(CMAKE_CXX_FLAGS_RELEASE        \"-O3 -DNDEBUG -march=native -Wall -Wno-class-memaccess -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C++ release compile flags\")\nset(CMAKE_CXX_FLAGS_RELWITHDEBINFO \"-O2 -DNDEBUG -g -Wall -Wno-class-memaccess -Wno-deprecated-declarations -Wno-comment\" CACHE STRING \"Inital C++ release with debug info compile flags\")\n\n# Libraries\nif(EXISTS $ENV{MKLROOT})\n  set(MKL_ROOT_DIR \"$ENV{MKLROOT}\" CACHE PATH \"MKL root directory\")\nelse()\n  set(MKL_ROOT_DIR \"/opt/intel/mkl\" CACHE PATH \"MKL root directory\")\nendif()\nif(EXISTS $ENV{TBBROOT})\n  set(TBB_ROOT_DIR \"$ENV{TBBROOT}\" CACHE PATH \"TBB root directory\")\nelse()\n  set(TBB_ROOT_DIR \"/opt/intel/tbb\" CACHE PATH \"TBB root directory\")\nendif()\n\n# Flags\nset(LAPACK_LIBRARIES \"-L${MKL_ROOT_DIR}/lib\" \"-lmkl_intel_ilp64\" \"-lmkl_core\"\n        \"-lmkl_sequential\" \"-lm\" CACHE STRING \"LAPACK linker flags\")\nset(LAPACK_INCLUDE_DIRS ${MKL_ROOT_DIR}/include CACHE STRING \"LAPACK include directories\")\nset(LAPACK_COMPILE_DEFINITIONS MKL_DIRECT_CALL;MKL_INT=long CACHE STRING \"LAPACK compile definitions\")\nset(FORTRAN_INTEGER_SIZE \"8\" CACHE STRING \"Set Fortran integer size to 8 bytes\")\n"
  },
  {
    "path": "cmake/toolchains/mira-clang11-essl.cmake",
    "content": "# Set the system name so CMake uses the appropriate platform settings.\n# NOTE: The platforms settings for BlueGeneP are the same for BlueGeneQ \nset(CMAKE_SYSTEM_NAME BlueGeneP-static)\n\n# Set environment paths\nset(CLANG_DIR  \"/soft/compilers/bgclang\")\nset(IBM_DIR    \"$ENV{IBM_MAIN_DIR}\")\nset(XLF_DIR    \"${IBM_DIR}/xlf/bg/14.1\")\nset(XLSMP_DIR  \"${IBM_DIR}/xlsmp/bg/3.1\")\nset(ESSL_DIR   \"/soft/libraries/essl/current/essl/5.1\")\nset(LAPACK_DIR \"/soft/libraries/alcf/current/xl/LAPACK\")\n\n# V1R2M0\n#set(MPI_DIR   \"/bgsys/drivers/ppcfloor/comm/gcc\")\n#set(PAMI_DIR  \"/bgsys/drivers/ppcfloor/comm/sys\")\n# V1R2M1\n#set(GCC_DIR    \"/bgsys/drivers/toolchain/V1R2M2_base_4.7.2/gnu-linux-4.7.2\")\n# V1R2M2\nset(GCC_DIR    \"/bgsys/drivers/toolchain/V1R2M2_base_4.7.2-efix14/gnu-linux-4.7.2-efix014\")\nset(MPI_DIR    \"/bgsys/drivers/ppcfloor/comm\")\nset(PAMI_DIR   \"/bgsys/drivers/ppcfloor/comm\")\nset(SPI_DIR    \"/bgsys/drivers/ppcfloor/spi\")\n\n# Set compilers\nset(CMAKE_C_COMPILER       \"${CLANG_DIR}/wbin/bgclang\")\nset(CMAKE_CXX_COMPILER     \"${CLANG_DIR}/wbin/bgclang++11\")\nset(CMAKE_Fortran_COMPILER \"${GCC_DIR}/bin/powerpc64-bgq-linux-gfortran\")\nset(MPI_C_COMPILER         \"mpicc\")\nset(MPI_CXX_COMPILER       \"mpicxx\")\n\n# Set compile flags\nset(CMAKE_C_FLAGS_INIT             \"-std=c99 -mcpu=a2 -mtune=a2\" CACHE STRING \"Inital C compile flags\")\nset(CMAKE_C_FLAGS_DEBUG            \"-g -Wall\" CACHE STRING \"Inital C debug compile flags\")\nset(CMAKE_C_FLAGS_MINSIZEREL       \"-Os -DNDEBUG\" CACHE STRING \"Inital C minimum size release compile flags\")\nset(CMAKE_C_FLAGS_RELEASE          \"-O3 -DNDEBUG\" CACHE STRING \"Inital C release compile flags\")\nset(CMAKE_C_FLAGS_RELWITHDEBINFO   \"-O2 -g -Wall\" CACHE STRING \"Inital C release with debug info compile flags\")\nset(CMAKE_CXX_FLAGS_INIT           \"-mcpu=a2 -mtune=a2 -Wno-deprecated-register\" CACHE STRING \"Inital C++ compile flags\")\nset(CMAKE_CXX_FLAGS_DEBUG          \"-g -Wall\" CACHE STRING \"Inital C++ debug compile flags\")\nset(CMAKE_CXX_FLAGS_MINSIZEREL     \"-Os -DNDEBUG\" CACHE STRING \"Inital C++ minimum size release compile flags\")\nset(CMAKE_CXX_FLAGS_RELEASE        \"-O3 -DNDEBUG\" CACHE STRING \"Inital C++ release compile flags\")\nset(CMAKE_CXX_FLAGS_RELWITHDEBINFO \"-O2 -g -Wall\" CACHE STRING \"Inital C++ release with debug info compile flags\")\n\n# Set library\n\nset(XL_LIBRARIES ${XLSMP_DIR}/bglib64/libxlsmp.a)\nset(XLF_LIBRARIES ${XLF_DIR}/bglib64/libxlf90_r.a;${XLF_DIR}/bglib64/libxlfmath.a;${XLF_DIR}/bglib64/libxlopt.a;${XLF_DIR}/bglib64/libxl.a)\nset(BLAS_LIBRARY ${ESSL_DIR}/lib64/libesslbg.a)\nset(BLAS_LIBRARIES ${BLAS_LIBRARY};${XLF_LIBRARIES};${XL_LIBRARIES})\nset(LAPACK_LIBRARY ${LAPACK_DIR}/lib/liblapack.a)\nset(LAPACK_LIBRARIES ${LAPACK_LIBRARY};${BLAS_LIBRARIES})\nset(FORTRAN_INTEGER_SIZE \"4\" CACHE STRING \"Set Fortran integer size in bytes\")\nset(HAVE_SPINLOCKS OFF CACHE BOOL \"Enable if pthread lib supports spinlocks in pmrrr\")\n\n"
  },
  {
    "path": "cmake/toolchains/mira-gcc-essl.cmake",
    "content": "# Set the system name so CMake uses the appropriate platform settings.\n# NOTE: The platforms settings for BlueGeneP are the same for BlueGeneQ \nset(CMAKE_SYSTEM_NAME BlueGeneP-static)\n\n# Set environment paths\nset(IBM_DIR    \"$ENV{IBM_MAIN_DIR}\")\nset(XLF_DIR    \"${IBM_DIR}/xlf/bg/14.1\")\nset(XLSMP_DIR  \"${IBM_DIR}/xlsmp/bg/3.1\")\nset(ESSL_DIR   \"/soft/libraries/essl/current/essl/5.1\")\nset(LAPACK_DIR \"/soft/libraries/alcf/current/xl/LAPACK\")\n\n# V1R2M0\n#set(MPI_DIR   \"/bgsys/drivers/ppcfloor/comm/gcc\")\n#set(PAMI_DIR  \"/bgsys/drivers/ppcfloor/comm/sys\")\n# V1R2M1\n#set(GCC_DIR    \"/bgsys/drivers/toolchain/V1R2M2_base_4.7.2/gnu-linux-4.7.2\")\n# V1R2M2\nset(GCC_DIR    \"/bgsys/drivers/toolchain/V1R2M2_base_4.7.2-efix14/gnu-linux-4.7.2-efix014\")\nset(MPI_DIR    \"/bgsys/drivers/ppcfloor/comm\")\nset(PAMI_DIR   \"/bgsys/drivers/ppcfloor/comm\")\nset(SPI_DIR    \"/bgsys/drivers/ppcfloor/spi\")\n\n# Set compilers\nset(CMAKE_C_COMPILER       \"${GCC_DIR}/bin/powerpc64-bgq-linux-gcc\")\nset(CMAKE_CXX_COMPILER     \"${GCC_DIR}/bin/powerpc64-bgq-linux-g++\")\nset(CMAKE_Fortran_COMPILER \"${GCC_DIR}/bin/powerpc64-bgq-linux-gfortran\")\nset(MPI_C_COMPILER         \"mpicc\")\nset(MPI_CXX_COMPILER       \"mpicxx\")\n\n# Set compile flags\nset(CMAKE_C_FLAGS_INIT             \"-std=c99 -mcpu=a2 -mtune=a2\" CACHE STRING \"Inital C compile flags\")\nset(CMAKE_C_FLAGS_DEBUG            \"-g -Wall\" CACHE STRING \"Inital C debug compile flags\")\nset(CMAKE_C_FLAGS_MINSIZEREL       \"-Os -DNDEBUG\" CACHE STRING \"Inital C minimum size release compile flags\")\nset(CMAKE_C_FLAGS_RELEASE          \"-O3 -DNDEBUG\" CACHE STRING \"Inital C release compile flags\")\nset(CMAKE_C_FLAGS_RELWITHDEBINFO   \"-O2 -g -Wall\" CACHE STRING \"Inital C release with debug info compile flags\")\nset(CMAKE_CXX_FLAGS_INIT           \" -mcpu=a2 -mtune=a2\" CACHE STRING \"Inital C++ compile flags\")\nset(CMAKE_CXX_FLAGS_DEBUG          \"-g -Wall\" CACHE STRING \"Inital C++ debug compile flags\")\nset(CMAKE_CXX_FLAGS_MINSIZEREL     \"-Os -DNDEBUG\" CACHE STRING \"Inital C++ minimum size release compile flags\")\nset(CMAKE_CXX_FLAGS_RELEASE        \"-O3 -DNDEBUG\" CACHE STRING \"Inital C++ release compile flags\")\nset(CMAKE_CXX_FLAGS_RELWITHDEBINFO \"-O2 -g -Wall\" CACHE STRING \"Inital C++ release with debug info compile flags\")\n\n\n# Set library\n\nset(XL_LIBRARIES ${XLSMP_DIR}/bglib64/libxlsmp.a)\nset(XLF_LIBRARIES ${XLF_DIR}/bglib64/libxlf90_r.a;${XLF_DIR}/bglib64/libxlfmath.a;${XLF_DIR}/bglib64/libxlopt.a;${XLF_DIR}/bglib64/libxl.a;-ldl;-lm;-lpthread)\nset(BLAS_LIBRARIES ${ESSL_DIR}/lib64/libesslbg.a;${BLAS_LIBRARY};${XLF_LIBRARIES};${XL_LIBRARIES})\nset(LAPACK_LIBRARIES ${LAPACK_DIR}/lib/liblapack.a;${BLAS_LIBRARIES})\nset(FORTRAN_INTEGER_SIZE \"4\" CACHE STRING \"Set Fortran integer size in bytes\")\nset(HAVE_SPINLOCKS OFF CACHE BOOL \"Enable if pthread lib supports spinlocks in pmrrr\")\n\n\n##############################################################\n\n# set the search path for the environment coming with the compiler\n# and a directory where you can install your own compiled software\n#set(CMAKE_FIND_ROOT_PATH\n#    /bgsys/drivers/ppcfloor/\n#    ${MPI_DIR}\n#    ${PAMI_DIR}\n#    ${SPI_DIR}\n#    ${GCC_DIR}\n#    ${CLANG_DIR}\n#    ${IBM_DIR}\n#    ${XLF_DIR}\n#    ${XLSMP_DIR}\n#    ${ESSL_DIR})\n\n# adjust the default behaviour of the FIND_XXX() commands:\n# search headers and libraries in the target environment, search\n# programs in the host environment\n#set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n#set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\n##############################################################\n"
  },
  {
    "path": "cmake/toolchains/osx-clang-accelerate-tbb.cmake",
    "content": "#\n# Generic Toolchain for OS X + MPI + TBB\n#\n# REQUIREMENTS:\n# - in PATH:\n#   mpicc and mpicxx, both using clang as the backend\n#\n# OPTIONS:\n# - environment variables:\n#   * MKLROOT: the MKL root directory; if not set, will use /opt/intel/mkl\n#   * TBBROOT: the TBB root directory; if not set, will use /opt/intel/tbb\n#\n\n# this is key to avoid RPATH problems\nset(CMAKE_SYSTEM_NAME Darwin)\n\n# Compilers\nset(CMAKE_C_COMPILER clang)\nset(CMAKE_CXX_COMPILER clang++)\nset(MPI_C_COMPILER mpicc)\nset(MPI_CXX_COMPILER mpicxx)\n\n# Compile flags\nset(CMAKE_C_FLAGS_INIT             \"-std=c99\" CACHE STRING \"Inital C compile flags\")\nset(CMAKE_C_FLAGS_DEBUG            \"-O0 -g -Wall\" CACHE STRING \"Inital C debug compile flags\")\nset(CMAKE_C_FLAGS_MINSIZEREL       \"-Os -march=native -DNDEBUG\" CACHE STRING \"Inital C minimum size release compile flags\")\nset(CMAKE_C_FLAGS_RELEASE          \"-O3 -march=native -DNDEBUG\" CACHE STRING \"Inital C release compile flags\")\nset(CMAKE_C_FLAGS_RELWITHDEBINFO   \"-O2 -g -Wall\" CACHE STRING \"Inital C release with debug info compile flags\")\nset(CMAKE_CXX_FLAGS_INIT           \" -stdlib=libc++\" CACHE STRING \"Inital C++ compile flags\")\nset(CMAKE_CXX_FLAGS_DEBUG          \"-O0 -g -Wall\" CACHE STRING \"Inital C++ debug compile flags\")\nset(CMAKE_CXX_FLAGS_MINSIZEREL     \"-Os -march=native -DNDEBUG\" CACHE STRING \"Inital C++ minimum size release compile flags\")\nset(CMAKE_CXX_FLAGS_RELEASE        \"-O3 -march=native -DNDEBUG\" CACHE STRING \"Inital C++ release compile flags\")\nset(CMAKE_CXX_FLAGS_RELWITHDEBINFO \"-O2 -g -Wall\" CACHE STRING \"Inital C++ release with debug info compile flags\")\n\n# Libraries\nif(EXISTS $ENV{TBBROOT})\n  set(TBB_ROOT_DIR \"$ENV{TBBROOT}\" CACHE PATH \"TBB root directory\")\nelse()\n  set(TBB_ROOT_DIR \"/opt/intel/tbb\" CACHE PATH \"TBB root directory\")\nendif()\n\n# Set BLAS/LAPACK flags\nset(ENABLE_MKL OFF)\nset(LAPACK_LIBRARIES \"-framework;Accelerate\" CACHE STRING \"LAPACK libraries\")\nset(LAPACK_COMPILE_OPTIONS \"-framework;Accelerate\" CACHE STRING \"LAPACK compiler options\")\nset(INTEGER4 TRUE CACHE BOOL \"Set Fortran integer size to 4 bytes\")\n\n"
  },
  {
    "path": "cmake/toolchains/osx-clang-mkl-tbb.cmake",
    "content": "#\n# Generic Toolchain for OS X + MPI + MKL + TBB\n#\n# REQUIREMENTS:\n# - in PATH:\n#   mpicc and mpicxx, both using clang as the backend\n#\n# OPTIONS:\n# - environment variables:\n#   * MKLROOT: the MKL root directory; if not set, will use /opt/intel/mkl\n#   * TBBROOT: the TBB root directory; if not set, will use /opt/intel/tbb\n#\n\n# this is key to avoid RPATH problems\nset(CMAKE_SYSTEM_NAME Darwin)\n\n# Compilers\nset(CMAKE_C_COMPILER clang)\nset(CMAKE_CXX_COMPILER clang++)\nset(MPI_C_COMPILER mpicc)\nset(MPI_CXX_COMPILER mpicxx)\n\n# Compile flags\nset(CMAKE_C_FLAGS_INIT             \"-std=c99\" CACHE STRING \"Inital C compile flags\")\nset(CMAKE_C_FLAGS_DEBUG            \"-g -Wall\" CACHE STRING \"Inital C debug compile flags\")\nset(CMAKE_C_FLAGS_MINSIZEREL       \"-Os -march=native -DNDEBUG\" CACHE STRING \"Inital C minimum size release compile flags\")\nset(CMAKE_C_FLAGS_RELEASE          \"-O3 -march=native -DNDEBUG\" CACHE STRING \"Inital C release compile flags\")\nset(CMAKE_C_FLAGS_RELWITHDEBINFO   \"-O2 -g -Wall\" CACHE STRING \"Inital C release with debug info compile flags\")\nset(CMAKE_CXX_FLAGS_INIT           \"-I/usr/local/include -stdlib=libc++\" CACHE STRING \"Inital C++ compile flags\")\nset(CMAKE_CXX_FLAGS_DEBUG          \"-g -Wall\" CACHE STRING \"Inital C++ debug compile flags\")\nset(CMAKE_CXX_FLAGS_MINSIZEREL     \"-Os -march=native -DNDEBUG\" CACHE STRING \"Inital C++ minimum size release compile flags\")\nset(CMAKE_CXX_FLAGS_RELEASE        \"-O3 -march=native -DNDEBUG\" CACHE STRING \"Inital C++ release compile flags\")\nset(CMAKE_CXX_FLAGS_RELWITHDEBINFO \"-O2 -g -Wall\" CACHE STRING \"Inital C++ release with debug info compile flags\")\n\n# Libraries\nif(EXISTS $ENV{MKLROOT})\n  set(MKL_ROOT_DIR \"$ENV{MKLROOT}\" CACHE PATH \"MKL root directory\")\nelse()\n  set(MKL_ROOT_DIR \"/opt/intel/mkl\" CACHE PATH \"MKL root directory\")\nendif()\nif(EXISTS $ENV{TBBROOT})\n  set(TBB_ROOT_DIR \"$ENV{TBBROOT}\" CACHE PATH \"TBB root directory\")\nelse()\n  set(TBB_ROOT_DIR \"/opt/intel/tbb\" CACHE PATH \"TBB root directory\")\nendif()\n\n# Flags\nset(LAPACK_LIBRARIES \"-L${MKL_ROOT_DIR}/lib\" \"-lmkl_intel_lp64\" \"-lmkl_core\"\n    \"-lmkl_sequential\" \"-lm\" CACHE STRING \"LAPACK linker flags\")\nset(LAPACK_INCLUDE_DIRS ${MKL_ROOT_DIR}/include CACHE STRING \"LAPACK include directories\")\nset(LAPACK_COMPILE_DEFINITIONS MKL_DIRECT_CALL CACHE STRING \"LAPACK compile definitions\")\nset(INTEGER4 TRUE CACHE BOOL \"Set Fortran integer size to 4 bytes\")"
  },
  {
    "path": "conda-recipe/.gitignore",
    "content": "# Override root .gitignore which excludes build*\n!build.sh\n\n# Ignore conda-build work directories\n.conda/\n"
  },
  {
    "path": "conda-recipe/build.sh",
    "content": "#!/bin/bash\nset -ex\n\nMPI_FLAG=\"-DENABLE_MPI=OFF\"\nif [ \"${MPI_VARIANT}\" = \"openmpi\" ]; then\n  MPI_FLAG=\"-DENABLE_MPI=ON\"\n  # Point OpenMPI wrappers at the host-env libraries/headers\n  export OPAL_PREFIX=\"${PREFIX}\"\n  # Use the build-env wrappers (they have the compiler toolchain)\n  MPI_FLAG=\"${MPI_FLAG} -DMPI_C_COMPILER=${BUILD_PREFIX}/bin/mpicc\"\n  MPI_FLAG=\"${MPI_FLAG} -DMPI_CXX_COMPILER=${BUILD_PREFIX}/bin/mpicxx\"\nfi\n\nmkdir -p build\ncd build\n\ncmake ${CMAKE_ARGS} \\\n  -G Ninja \\\n  -DCMAKE_BUILD_TYPE=Release \\\n  -DCMAKE_INSTALL_PREFIX=\"${PREFIX}\" \\\n  -DCMAKE_PREFIX_PATH=\"${PREFIX}\" \\\n  -DBUILD_SHARED_LIBS=OFF \\\n  -DBUILD_TESTING=OFF \\\n  ${MPI_FLAG} \\\n  -DENABLE_LIBXC=OFF \\\n  -DMADNESS_TASK_BACKEND=Pthreads \\\n  -DMPI_CXX_SKIP_MPICXX=ON \\\n  -DMPIEXEC_PREFLAGS='--allow-run-as-root' \\\n  ..\n\nninja install\n\n# Set up environment activation for MADNESS data directories\nmkdir -p \"${PREFIX}/etc/conda/activate.d\"\nmkdir -p \"${PREFIX}/etc/conda/deactivate.d\"\n\ncat > \"${PREFIX}/etc/conda/activate.d/activate_madness.sh\" <<'EOF'\n# MADNESS installs data into a versioned subdirectory; find the first one.\n# Only one version of MADNESS is expected per conda environment.\nMADNESS_DATA_BASE=\"${CONDA_PREFIX}/share/madness\"\nif [ -d \"${MADNESS_DATA_BASE}\" ]; then\n  for d in \"${MADNESS_DATA_BASE}\"/*; do\n    if [ -d \"$d/data\" ]; then\n      export MRA_DATA_DIR=\"$d/data\"\n      export MRA_CHEMDATA_DIR=\"$d/data\"\n      break\n    fi\n  done\nfi\nEOF\n\ncat > \"${PREFIX}/etc/conda/deactivate.d/deactivate_madness.sh\" <<'EOF'\nunset MRA_DATA_DIR\nunset MRA_CHEMDATA_DIR\nEOF\n"
  },
  {
    "path": "conda-recipe/meta.yaml",
    "content": "{% set version = environ.get('GIT_DESCRIBE_TAG', 'dev') %}\n{% set mpi = environ.get('MPI_VARIANT', 'nompi') %}\n\npackage:\n  name: {{ 'madness-mpi' if mpi == 'openmpi' else 'madness' }}\n  version: {{ version }}\n\nsource:\n  path: ..\n\nbuild:\n  number: 0\n  skip: true  # [win]\n  script_env:\n    - MPI_VARIANT={{ mpi }}\n    - OMPI_ALLOW_RUN_AS_ROOT=1\n    - OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1\n\nrequirements:\n  build:\n    - {{ compiler('cxx') }}\n    - {{ compiler('c') }}\n    - cmake >=3.12\n    - ninja\n{% if mpi == 'openmpi' %}\n    - openmpi\n{% endif %}\n  host:\n    - libblas\n    - liblapack\n{% if mpi == 'openmpi' %}\n    - openmpi\n{% endif %}\n  run:\n    - libblas\n    - liblapack\n{% if mpi == 'openmpi' %}\n    - openmpi\n{% endif %}\n\ntest:\n  commands:\n    - test -f $PREFIX/include/madness/world/world.h  # [unix]\n    - test -f $PREFIX/lib/libMADworld.a  # [unix]\n\nabout:\n  home: https://github.com/m-a-d-n-e-s-s/madness\n  license: GPL-2.0-or-later\n  license_file: LICENSE\n  summary: 'MADNESS: Multiresolution Adaptive Numerical Environment for Scientific Simulation'\n  description: |\n    MADNESS provides a high-level environment for the solution of integral and\n    differential equations in many dimensions using adaptive, fast methods with\n    guaranteed precision based on multi-resolution analysis and novel separated\n    representations.\n  dev_url: https://github.com/m-a-d-n-e-s-s/madness\n  doc_url: https://madness.readthedocs.io/\n\nextra:\n  recipe-maintainers:\n    - m-a-d-n-e-s-s\n"
  },
  {
    "path": "config/MADNESS.pc.in",
    "content": "prefix=@prefix@\nexec_prefix=@exec_prefix@\nlibdir=@libdir@\nincludedir=@includedir@\n\ncc=@CC@\ncxx=@CXX@\ncppflags=@CPPFLAGS@\ncxxflags=@CXXFLAGS@\nldflags=@LDFLAGS@\nlibs=@LIBS@\nfortran_integer_width=@MADNESS_FORTRAN_DEFAULT_INTEGER_SIZE@\n\nName: MADNESS\nDescription: Multiresolution Adaptive Numerical Environment for Scientific Simulation\nVersion: @PACKAGE_VERSION@\nLibs: -L${libdir} -lMADmra -lMADlinalg -lMADtensor -lMADmisc -lMADmuparser -lMADtinyxml -lMADworld ${libs}\nCflags: -I${includedir}\n"
  },
  {
    "path": "doc/CMakeLists.txt",
    "content": "# doc\n\nif(DOXYGEN_FOUND)\n  set_directory_properties(PROPERTY ADDITIONAL_MAKE_CLEAN_FILES html latex *~)\n\n  add_custom_target_subproject(madness html\n    COMMAND ${DOXYGEN_EXECUTABLE} doxygen.cfg\n    USES_TERMINAL)\n\n  add_custom_target_subproject(madness docs)\n  add_dependencies(docs-madness html-madness)\n\n  add_dependencies(everything docs)\n  add_dependencies(everything docs-madness)\n  add_dependencies(everything html-madness)\n\n  install(DIRECTORY html\n      DESTINATION \"${MADNESS_INSTALL_DOCDIR}\" OPTIONAL\n      COMPONENT docs)\nendif()\n"
  },
  {
    "path": "doc/INSTALL.md",
    "content": "# Installation\n\n```{include} ../INSTALL.md"
  },
  {
    "path": "doc/Latex/api.tex",
    "content": "% This file was converted to LaTeX by Writer2LaTeX ver. 1.1.7\n% see http://writer2latex.sourceforge.net for more info\n\\documentclass[letterpaper]{article}\n\\usepackage[ascii]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage[english]{babel}\n\\usepackage{amsmath}\n\\usepackage{amssymb,amsfonts,textcomp}\n\\usepackage{color}\n\\usepackage{array}\n\\usepackage{hhline}\n\\usepackage{hyperref}\n\\hypersetup{pdftex, colorlinks=true, linkcolor=blue, citecolor=blue, filecolor=blue, urlcolor=blue, pdftitle=, pdfauthor=Robert Harrison, pdfsubject=, pdfkeywords=}\n% Outline numbering\n\\setcounter{secnumdepth}{0}\n\\renewcommand\\thesubsection{\\arabic{subsection}}\n\\renewcommand\\thesubsubsection{\\arabic{subsection}.\\arabic{subsubsection}}\n\\renewcommand\\theparagraph{\\arabic{subsection}.\\arabic{subsubsection}.\\arabic{paragraph}}\n% List styles\n\\newcommand\\liststyleLi{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLii{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLiii{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLiv{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLv{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLvi{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLvii{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLviii{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLix{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n% Page layout (geometry)\n\\setlength\\voffset{-1in}\n\\setlength\\hoffset{-1in}\n\\setlength\\topmargin{0.7874in}\n\\setlength\\oddsidemargin{0.7874in}\n\\setlength\\textheight{9.062033in}\n\\setlength\\textwidth{6.9251995in}\n\\setlength\\footskip{26.148pt}\n\\setlength\\headheight{0cm}\n\\setlength\\headsep{0cm}\n% Footnote rule\n\\setlength{\\skip\\footins}{0.0469in}\n\\renewcommand\\footnoterule{\\vspace*{-0.0071in}\\setlength\\leftskip{0pt}\\setlength\\rightskip{0pt plus 1fil}\\noindent\\textcolor{black}{\\rule{0.25\\columnwidth}{0.0071in}}\\vspace*{0.0398in}}\n% Pages styles\n\\makeatletter\n\\newcommand\\ps@Standard{\n  \\renewcommand\\@oddhead{}\n  \\renewcommand\\@evenhead{}\n  \\renewcommand\\@oddfoot{\\hfill \\thepage{}}\n  \\renewcommand\\@evenfoot{\\@oddfoot}\n  \\renewcommand\\thepage{\\arabic{page}}\n}\n\\makeatother\n\\pagestyle{Standard}\n\\title{}\n\\author{Robert Harrison}\n\\date{2009-12-14}\n\\begin{document}\n\\section*{Summary of the MADNESS application programming interface}\nTHIS IS SADLY OUT OF DATE ... probably best to ignore this document until it is updated.\n\n\\subsection{Low-level sequential runtime}\n\\subsubsection{Shared pointers (sharedptr.h)}\nShared pointers in the spirit of Boost and the new C++ standard but with thread-safe reference counting and additional\nhooks to facilitate remote access, stealing, etc. Probably needs redesigning to sit on the new standard as appropriate,\nbut basic functionality will remain the same.\n\nBasic rule of thumb is when you allocate memory to immediately wrap the pointer in a \\texttt{SharedPointer} (or\n\\texttt{SharedArray}) so that you do not have to remember to delete it and so you can freely give others the pointer\nwithout anyone worrying about premature or double freeing of the data. Fast, thread-safe reference counting is\nperformed using the atomic operations.\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ template {\\textless}typename T{\\textgreater} class SharedPtr \\{}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Default constructor makes an null pointer}\n\n{\\ttfamily\n\\ \\ \\ \\ SharedPtr(); }\n\n{\\ttfamily\n\\ \\ \\ \\ /// Wrap a pointer with optional custom deleter}\n\n{\\ttfamily\n\\ \\ \\ \\ explicit SharedPtr(T* ptr, void (*deleter)(T*)=0) ;}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Wrap a pointer with optional custom deleter \\& ownership}\n\n{\\ttfamily\n\\ \\ \\ \\ explicit SharedPtr(T* ptr, bool own, void (*deleter)(T*)=0);}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Copy constructor generates new reference to same pointer}\n\n{\\ttfamily\n\\ \\ \\ \\ SharedPtr(const SharedPtr{\\textless}T{\\textgreater}\\& s) ;}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Copy constructor with static type conversion}\n\n{\\ttfamily\n\\ \\ \\ \\ template {\\textless}typename Q{\\textgreater} SharedPtr(const SharedPtr{\\textless}Q{\\textgreater}\\& s);}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Destructor decrements ref. count freeing data if zero}\n\n{\\ttfamily\n\\ \\ \\ \\ virtual \\~{}SharedPtr();}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Assignment}\n\n{\\ttfamily\n\\ \\ \\ \\ SharedPtr{\\textless}T{\\textgreater}\\& operator=(const SharedPtr{\\textless}T{\\textgreater}\\& s);}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Returns number of references}\n\n{\\ttfamily\n\\ \\ \\ \\ int use\\_count() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Returns the value of the pointer}\n\n{\\ttfamily\n\\ \\ \\ \\ T* get() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Returns true if the SharedPtr owns the pointer}\n\n{\\ttfamily\n\\ \\ \\ \\ bool owned() const; \\ }\n\n{\\ttfamily\n\\ \\ \\ \\ /// Cast of SharedPtr{\\textless}T{\\textgreater} to T* returns the value of the pointer}\n\n{\\ttfamily\n\\ \\ \\ \\ operator T*() const;}\n\n{\\ttfamily\n\\ \\ \\  \\ \\ /// Return pointer+offset}\n\n{\\ttfamily\n\\ \\ \\ \\ T* operator+(long offset) const;}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Return pointer-offset}\n\n{\\ttfamily\n\\ \\ \\ \\ T* operator-(long offset) const;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ /// Dereferencing returns a reference to pointed value}\n\n{\\ttfamily\n\\ \\ \\ \\ T\\& operator*() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ /// Member access via pointer works as expected}\n\n{\\ttfamily\n\\ \\ \\ \\ T* operator-{\\textgreater}() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Array indexing returns reference to indexed value}\n\n{\\ttfamily\n\\ \\ \\ \\ T\\& operator[](long index) const;}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Boolean value (test for null pointer)}\n\n{\\ttfamily\n\\ \\ \\ \\ operator bool() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Are two pointers equal?}\n\n{\\ttfamily\n\\ \\ \\ \\ bool operator==(const SharedPtr{\\textless}T{\\textgreater}\\& other) const;}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Are two pointers not equal?}\n\n{\\ttfamily\n\\ \\ \\ \\ bool operator!=(const SharedPtr{\\textless}T{\\textgreater}\\& other) const;}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Steal an un-owned reference to the pointer }\n\n{\\ttfamily\n\\ \\ \\ \\ SharedPtr{\\textless}T{\\textgreater} steal() const;}\n\n{\\ttfamily\n\\ \\ \\};}\n\n{\\ttfamily\n\\ \\ \\ /// A SharedArray uses delete [] is used to free it}\n\n{\\ttfamily\n\\ \\ \\ template {\\textless}class T{\\textgreater} \\ class SharedArray : public SharedPtr{\\textless}T{\\textgreater} \\{}\n\n{\\ttfamily\n\\ \\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ SharedArray(T* ptr = 0);}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ SharedArray(const SharedArray{\\textless}T{\\textgreater}\\& s);}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ /// Assignment}\n\n{\\ttfamily\n\\ \\ \\ \\ SharedArray\\& operator=(const SharedArray\\& s);}\n\n{\\ttfamily\n\\ \\ \\};}\n\n{\\ttfamily\n\\}}\n\n\\subsubsection{Serialization (archive.h, buffer\\_archive.h, mpi\\_archive.h, binary\\_fstream\\_archive.h, vector\\_archive.h, parallel\\_archive.h)}\nCentral to MADNESS's ability to move data and computation freely around the machine is the ability to serialize all data\ntypes with full type safety. For fundamental data types and standard containers this is already provided in\n\\texttt{archive.h} in which it is also described how to accomplish this for user types. See there for more info.\nVarious archives (serialized streams) are provided including MPI p2p messaging, binary/text sequential files, vectors,\nin-memory buffers (special) and parallel archives.\n\nIssues\n\n\\liststyleLi\n\\begin{itemize}\n\\item mpi\\_archive.h needs to be made independent of world so that it is more broadly useful and this discussion needs moving\nto the low-level parallel runtime level\n\\item discussion of parallel\\_archive.h should be up at the world level\n\\item discussion of serialization of World and WorldObjects into buffer\\_archive should be at the world level\n\\item need to implement type-safe serialization of ConcurrentHashMap to archive.h\n\\item need to discuss special role and overloading of buffer\\_archive (basically user should use vector\\_archive not buffer\\_archive which is reserved\nfor internal system use).\n\\item thread safety of archives (there is none!)\n\\end{itemize}\n\\subsubsection{Exceptions and assertions (madness\\_exception.h)}\nThere is a poorly realized goal to have all exceptions generated by MADNESS be derived from \\texttt{MadnessException}.\nThe \\texttt{MADNESS\\_EXCEPTION} macro wraps throwing an exception and stores the line number, function name, and source\nfile name in the object to aid in debugging. The \\texttt{MADNESS\\_ASSERTION} macro also captures the assertion code as\na string.\n\n\\subsubsection{Cpu time, wall time, processor frequency, cycle count (timers.h)}\nFast and accurate timers. Still need to understand multi-threaded and multi-core behavior.\n\n\\subsubsection{Profiling (worldprofile.h)}\nMADNESS is good at breaking many profilers due to extensive use of C++ templates, inlining, 1-sided communication, etc.\nFor this reason we have a simple but lightweight profiling class derived from the open source SHINY project (see\nsourceforge).\n\nIssues:\n\n\\liststyleLii\n\\begin{itemize}\n\\item Document the 3 or 4 useful macros\n\\item Describe briefly how it works\n\\item Make the darn thing thread safe\n\\end{itemize}\n\\subsubsection{Pseudo-random number generation (misc/ran.h)}\nA thread-safe pseudo-random number generator with single number and vector interfaces. It uses a lagged, Fibonacci\nsequence with parameters described in the header file. The quality should be very high, though there are even better\ngenerators now available and please note that although the implementation has been tested in various ways including\nusing Marsaglia's die-hard test the generator has not yet been employed in applications especially sensitive to the\nquality of the numbers. You can have multiple independent instantiations of \\texttt{Random} to obtain multiple\nindependent streams. The \\texttt{RandomValue} and \\texttt{RandomVector} functions all map to one shared default\ninstance.\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ struct RandomState; /// Used to set/get state of the generator}\n\n{\\ttfamily\n\\ \\ class Random \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ Random(unsigned int seed = 5461);}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ virtual \\~{}Random();}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ double get() ; // Returns a value uniform in [0,1)}\n\n{\\ttfamily\n\\ \\ \\ \\ /// Returns a vector uniform in [0,1)}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ template {\\textless}typename T{\\textgreater} \\ void getv(int n, T * restrict v); }\n\n{\\ttfamily\n\\ \\ \\ \\ /// Returns vector of random bytes in [0,256)}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ void getbytes(int n, unsigned char * restrict v); }\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ RandomState getstate() const; \\ /// Returns state of generator}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ void setstate(const RandomState \\&s); /// Restores state}\n\n{\\ttfamily\n\\ \\ \\ \\};}\n\n{\\ttfamily\n\\ \\ /// Random value generator with specializations for float,}\n\n{\\ttfamily\n\\ \\ /// double, complex{\\textless}float{\\textgreater}, complex{\\textless}double{\\textgreater}, int and long}\n\n{\\ttfamily\n\\ \\ \\ template {\\textless}class T{\\textgreater} \\ \\ T RandomValue();}\n\n{\\ttfamily\n\\ \\ /// Random vector generator with specializations for float,}\n\n{\\ttfamily\n\\ \\ /// double complex{\\textless}float{\\textgreater}, complex{\\textless}double{\\textgreater}, int and long}\n\n{\\ttfamily\n\\ \\ \\ template {\\textless}class T{\\textgreater} void RandomVector(int n, T* t);}\n\n{\\ttfamily\n\\}}\n\n\\subsubsection{Miscellaneous (misc.h)}\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ unsigned long checksum\\_file(const char* filename);}\n\n{\\ttfamily\n\\ \\ std::istream\\& position\\_stream(std::istream\\& f, }\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ const std::string\\& tag);}\n\n{\\ttfamily\n\\ \\ std::string lowercase(const std::string\\& s);}\n\n{\\ttfamily\n\\}}\n\n\\subsection{Low level parallel runtime}\nThis provides remote method invocation, threads, mutex, thread-safe containers, and the thread pool. At this level there\nis no knowledge of the World nor perhaps even of MPI. User applications will almost certainly never need these\ninterfaces, unless extending low-level MADNESS functionality. The interfaces relating to threading will evolve to be\ncompatible with the Intel TBB (we are already adopting some of their design elements).\n\n\\subsubsection{SafeMPI -- an optionally serialized MPI wrapper (safempi.h)}\nAll MPI communication must go through this interface. Wraps an MPI communicator and provides all necessary MPI\nfunctionality (please extend as necessary) plus a few small extensions. If the configure script determines that the\nlocal MPI implementation does not safely support entry by multiple threads, all calls into all instances of\n\\texttt{SafeMPI} are protected by a single mutex to ensure that only one thread is ever inside the MPI library. At some\npoint it may be necessary to implement funneling of all calls to one thread.\n\n{\\ttfamily\nnamespace SafeMPI \\{}\n\n{\\ttfamily\n\\ \\ class Intracomm \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ ... standard MPI::Intracomm methods ...}\n\n{\\ttfamily\n\\ \\ \\ \\ ... extensions to simplify p2p and tree-based communication}\n\n{\\ttfamily\n\\ \\ \\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ class Request \\{}\n\n{\\ttfamily\n\\ \\ \\ \\ public:}\n\n{\\ttfamily\n\\ \\ ... standard MPI::Request methods ...}\n\n{\\ttfamily\n\\ \\ \\};}\n\n{\\ttfamily\n\\}}\n\nRather than repeat the entire MPI interface we refer the user to the MPI manual or \\texttt{safempi.h}. \n\n\\subsubsection{RMI -- remote method invocation (worldrmi.h)}\nA single thread serves incoming active messages for all activities or Worlds on an SMP node. To be consistent with what\nthey actually do, this class probably needs to be renamed to active message (\\texttt{AM}) and \\texttt{WorldAmInterface}\nrenamed to \\texttt{WorldRMI}. The multi-threaded processes are identified using their rank in\n\\texttt{MPI::COMM\\_WORLD}. You are responsible for translating ranks from within your communicator to that within\n\\texttt{MPI::COMM\\_WORLD} by getting the groups from both communicators using \\texttt{Comm\\_group} and then creating a\nmap for the ranks using \\texttt{Group\\_translate\\_ranks}. Instantiation of the singleton is not thread safe and must be\ndone after initializing MPI but before it might be invoked by multiple threads. Before calling \\texttt{MPI::Finalize}\nyou must terminate the server so that it can clean up and terminate the server thread. Failure to do so will cause\noccasional SEGV upon program exit.\n\nMessages are a contiguous buffer of which the first \\texttt{RMI::HEADER\\_LEN} bytes are reserved for internal use. Upon\nreceipt, the user payload (at \\texttt{buf+HEADER\\_LEN}) is guaranteed to be aligned at least on a 16-byte boundary.\nWhen sending and receiving a message the length parameter (\\texttt{nbyte}) specifies the full length of the buffer\nincluding the header (i.e., the user data size is \\texttt{nbyte-HEADER\\_LEN}). The \\texttt{RMI::Request} data structure\nis copyable and provides at least the \\texttt{Test} and \\texttt{Testsome} interfaces of MPI, but note that MPI may not\nbe the underlying transport mechanism (on the Cray-XT we will soon be using a native Portals implementation).\n\nUnordered messages are processed in the order of receipt that due to multiple buffers and network routes may not\ncorrespond to the sending order. Ordered messages are processed in the order sent so that remote operations appear\nsequentially consistent to a single remote thread.\n\nHandlers should be lightweight operations and in particular should not block and to be fully safe should not send\nmessages (though this does work in the current MPI implementation). Anything expensive should be put as a task into the\nthread pool (below). Note that there is just one server thread which is useful for simplifying maintenance of remote\ndata structures, but means that if you abuse it communication can back up.\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ typedef void (*rmi\\_handlerT)(void* buf, size\\_t nbyte);}\n\n{\\ttfamily\n\\ \\ class RMI \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ typedef Request; // Type of structure returned by isend}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ static const size\\_t HEADER\\_LEN;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ static const size\\_t MAX\\_MSG\\_LEN;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ static const unsigned int ATTR\\_UNORDERED;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ static const unsigned int ATTR\\_ORDERED;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ static void begin(); // Instantiate the server}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ static void end(); // Terminate the server}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ static Request isend(const void* buf, size\\_t nbyte, \\newline\n\\ \\ \\ \\ \\ \\ \\ \\ ProcessID dest, rmi\\_handlerT func, \\newline\n\\ \\ \\ \\ \\ \\ \\ \\ unsigned int attr=ATTR\\_UNORDERED); // Async. send}\n\n{\\ttfamily\n\\ \\ \\};}\n\n{\\ttfamily\n\\}}\n\n\\subsubsection{Atomic operations on integers (madatomic.h)}\nThis minimal API is likely to change to become more compatible with Intel TBB and also as we port to more machines that\nmight force changes. Presently all functionality is provided via macros (since the original code is old and came from\nC). The argument \\texttt{ptr} refers to a pointer to a \\texttt{MADATOMIC\\_INT}. All operations on an atomic integer\nmust be through the API to ensure appropriate fencing of both memory and instructions. \n\n{\\ttfamily\nMADATOMIC\\_FENCE // Presently null and unused}\n\n{\\ttfamily\nMADATOMIC\\_INT // Type of an atomic integer (platform dependent).}\n\n{\\ttfamily\nMADATOMIC\\_INT\\_GET(ptr) // Read value of atomic integer}\n\n{\\ttfamily\nMADATOMIC\\_INT\\_SET(ptr,value) // Write value to atomic integer}\n\n{\\ttfamily\nMADATOMIC\\_INT\\_INC(ptr) // Atomic increment of atomic integer}\n\n{\\ttfamily\nMADATOMIC\\_INT\\_DEC\\_AND\\_TEST(ptr) // Decrement and test atomic integer}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\  \\ \\ // Returns true if result is zero}\n\n{\\ttfamily\nMADATOMIC\\_INITIALIZE(val) // For static initialization}\n\n\n\\bigskip\n\nStatic initialization of an integer (i.e., where it is declared) must be performed as follows\n\n{\\ttfamily\nMADATOMIC\\_INT atom = MADATOMIC\\_INITIALIZE(value)}\n\n\n\\bigskip\n\n\\subsubsection{Mutex, MutexReaderWriter, ScopedMutex, MutexWaiter (thread.h)}\nSimple locking mechanisms based upon either atomic memory operations or Pthread mutexes. The locks are spin-locks with a\nrudimentary back-off algorithm implemented by \\texttt{MutexWaiter}. Over subscribing processors might cause performance\nproblems without care. \\texttt{Mutex} provides a simple lock. \\texttt{MutexReaderWriter} provides a non-exclusive read\nlock and an exclusive write lock. \\texttt{ScopedMutex} wraps an existing \\texttt{Mutex} to protect an entire scope\nfollowing the rules of the lifetime of C++ objects. Mutexes of any kind cannot be copied or assigned. The locks are not\nrecursive -- i.e., if a thread has a lock and attempts to lock it again the results are undefined (probably deadlock).\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ class Mutex \\{}\n\n{\\ttfamily\n\\ \\ public:\\newline\n\\ \\ \\ \\ Mutex();}\n\n{\\ttfamily\n\\ \\ \\ \\ void lock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ void unlock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ bool try\\_lock() const; // Returns true if acquired}\n\n{\\ttfamily\n\\ \\ \\ \\ virtual \\~{}Mutex();}\n\n{\\ttfamily\n\\ \\ \\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ class MutexReaderWriter \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ static const int NOLOCK;}\n\n{\\ttfamily\n\\ \\ \\ \\ static const int READLOCK;}\n\n{\\ttfamily\n\\ \\ \\ \\ static const int WRITELOCK;}\n\n{\\ttfamily\n\\ \\ \\ \\ bool try\\_read\\_lock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ bool try\\_write\\_lock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ bool try\\_lock(int lockmode) const;}\n\n{\\ttfamily\n\\ \\ \\ \\ bool try\\_convert\\_read\\_lock\\_to\\_write\\_lock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ void read\\_lock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ void write\\_lock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ void lock(int lockmode) const;}\n\n{\\ttfamily\n\\ \\ \\ \\ void read\\_unlock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ void write\\_unlock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ void unlock(int lockmode) const;}\n\n{\\ttfamily\n\\ \\ \\ \\ void convert\\_read\\_lock\\_to\\_write\\_lock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ void convert\\_write\\_lock\\_to\\_read\\_lock() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ virtual \\~{}MutexReaderWriter();}\n\n{\\ttfamily\n\\ \\ \\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ class ScopedMutex \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ ScopedMutex(Mutex\\&); // Constructor acquires lock}\n\n{\\ttfamily\n\\ \\ \\ \\ ScopedMutex(Mutex*); // Constructor acquires lock\\newline\n\\ \\ \\ \\ virtual \\~{}ScopedMutex(); // Destructor releases lock}\n\n{\\ttfamily\n\\ \\ \\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ /// Attempt to acquire two locks without blocking while \\newline\n\\ \\ /// holding either one}\n\n{\\ttfamily\n\\ \\ bool try\\_two\\_locks(const Mutex\\& m1, const Mutex\\& m2);}\n\n{\\ttfamily\n\\}}\n\n\n\\bigskip\n\n\\subsubsection{Threads (thread.h)}\nThis provides simple wrappers around POSIX standard Pthread calls to simplify creation of detached system scheduled\nthreads. It is probable that this interface will change either to match Intel TBB or the new C++ standard. The first\nwrapper provides a base class that enables object instances to be associated with threads. The second is probably not\nworth discussing. The derived class must call \\texttt{ThreadBase::start()} to commence the thread which executes the\nvirtual run method. To terminate the thread the run method can return or the thread can invoke\n\\texttt{ThreadBase::exit()}. Another thread can cancel the thread by using \\texttt{ThreadBase::cancel()};\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ class ThreadBase \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ ThreadBase(); // Must invoke start() to start the thread.}\n\n{\\ttfamily\n\\ \\ \\ \\ virtual void run() = 0; // Implement this to do work}\n\n{\\ttfamily\n\\ \\ \\ \\ void start(); // Start the thread running}\n\n{\\ttfamily\n\\ \\ \\ \\ static void exit(); // Call for premature exit from run()}\n\n{\\ttfamily\n\\ \\ \\ \\ const pthread\\_t\\& get\\_id(); // Get pthread id (if running)}\n\n{\\ttfamily\n\\ \\ \\ \\ int get\\_pool\\_thread\\_index() const; // Index in ThreadPool or -1}\n\n{\\ttfamily\n\\ \\ \\ \\ int cancel() const; // Cancel this thread}\n\n{\\ttfamily\n\\ \\ \\ \\ virtual \\~{}ThreadBase();}\n\n{\\ttfamily\n\\ \\ \\ \\ \\};}\n\n{\\ttfamily\n\\}}\n\n\n\\bigskip\n\nMmm ... I see that the ThreadBase destructor does not cancel the thread if it is still running ... probably should? Seem\nto recall an issue here but it seems bad to delete the object and leave the thread running. \n\n\\subsubsection{Tasks, task attributes and the thread pool (thread.h)}\nThe primary (only?) source of SMP concurrency inside MADNESS comes from inserting tasks into the task queue for\nexecution by the pool of threads. The class is a singleton. The one pool of threads serves all activities and worlds\nwithin the SMP node so as to avoid oversubscribing the processors and to facilitate (eventually) switching between\ncache-aware and cache-oblivious computation. Presently we just have cache oblivious. A task is derived from\n\\texttt{PoolTaskInterface} and is submitted to the queue by invoking \\texttt{ThreadPool::add()} which takes ownership\nof the task and deletes it upon completion. Tasks have attributes that presently can specify high priority (task is\ninserted at the front of the queue instead of the rear), generation of additional parallelism, and stealable. The last\ntwo are presently ignored. As for the RMI class, instantiate the singleton with \\texttt{ThreadPool::begin()} before\nadding tasks to avoid a race condition. The number of threads may be specified as an argument or via the environment\nvariable \\texttt{POOL\\_NTHREAD} (probably to be renamed).\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ class TaskAttributes \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ static const unsigned long GENERATOR;}\n\n{\\ttfamily\n\\ \\ \\ \\ static const unsigned long STEALABLE;}\n\n{\\ttfamily\n\\ \\ \\ \\ static const unsigned long HIGHPRIORITY;}\n\n{\\ttfamily\n\\ \\ \\ \\ TaskAttributes(unsigned long flags = 0);}\n\n{\\ttfamily\n\\ \\ \\ \\ bool is\\_generator() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ bool is\\_stealable() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ bool is\\_high\\_priority() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ void set\\_generator (bool generator\\_hint);}\n\n{\\ttfamily\n\\ \\ \\ \\ void set\\_stealable (bool stealable);}\n\n{\\ttfamily\n\\ \\ \\ \\ void set\\_highpriority (bool hipri);}\n\n{\\ttfamily\n\\ \\ \\ \\ static TaskAttributes generator();}\n\n{\\ttfamily\n\\ \\ \\ \\ static TaskAttributes hipri();}\n\n{\\ttfamily\n\\ \\ \\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ class PoolTaskInterface : public TaskAttributes \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ PoolTaskInterface();}\n\n{\\ttfamily\n\\ \\ \\ \\ explicit PoolTaskInterface(const TaskAttributes\\& attr);}\n\n{\\ttfamily\n\\ \\ \\ \\ virtual void run() = 0; // Implement to do work}\n\n{\\ttfamily\n\\ \\ \\ \\ virtual \\~{}PoolTaskInterface() \\{\\}}\n\n{\\ttfamily\n\\ \\ \\ \\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ class ThreadPool \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ static void begin(nthread=0); // Instantiate the pool}\n\n{\\ttfamily\n\\ \\ \\ \\ static void add(PoolTaskInterface*); // Add task to queue}\n\n{\\ttfamily\n\\ \\ \\ \\ static void add(const std::vector{\\textless}PoolTaskInterface*{\\textgreater}\\&);}\n\n{\\ttfamily\n\\ \\ \\ \\ \\~{}ThreadPool() \\{\\};}\n\n{\\ttfamily\n\\ \\ \\ \\ \\};}\n\n{\\ttfamily\n\\}}\n\n\\subsubsection{Callbacks and tracking dependencies (worlddep.h)}\nMADNESS's internal execution is at least in part software data flow with dependencies between tasks being managed by\ncounting dependencies. Callbacks are used to count dependencies and to perform the action(s) taken when all\ndependencies are satisfied. The present rudimentary interface is thread safe and may be extended to provide greater\nfunctionality.\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ class CallbackInterface \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ virtual void notify() = 0;}\n\n{\\ttfamily\n\\ \\ \\ \\ virtual \\~{}CallbackInterface()\\{\\};}\n\n{\\ttfamily\n\\ \\ \\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ class DependencyInterface : public CallbackInterface \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ DependencyInterface(int ndep = 0);}\n\n{\\ttfamily\n\\ \\ \\ \\ int ndep() const; // Returns no. of unsatisfied dependencies}\n\n{\\ttfamily\n\\ \\ \\ \\ bool probe() const; // Returns true if ndep() == 0}\n\n{\\ttfamily\n\\ \\ \\ \\ void notify(); // Callback for dependency being satisfied}\n\n{\\ttfamily\n\\ \\ \\ \\ void inc(); // Increment the number of dependencies}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ // Registers a callback for when ndepend=0.}\n\n{\\ttfamily\n\\ \\ \\ \\ // If ndepend == 0, the callback is immediately invoked.}\n\n{\\ttfamily\n\\ \\ \\ \\ // ADDING A CALL BACK IS NOT PRESENTLY THREAD SAFE.}\n\n{\\ttfamily\n\\ \\ \\ \\ void register\\_callback(CallbackInterface* callback);}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ virtual \\~{}DependencyInterface();}\n\n{\\ttfamily\n\\ \\ \\ \\ \\};}\n\n\\}\n\n\\subsubsection{Ranges -- specifying parallel iteration}\nRanges automate the expression and decomposition of an index space for parallel iteration. Our present capability is\nextremely limited and crude when compared with the TBB, but hile our interface adopts some of the TBB conventions, we\nuse futures both internally and externally to facilitate the generation of more parallelism in the user code.\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ template {\\textless}typename iteratorT{\\textgreater} class Range \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ typedef iteratorT iterator;}\n\n{\\ttfamily\n\\ \\ \\ \\ Range(const iterator\\& start, const iterator\\& finish, \\newline\n\\ \\ \\ \\ \\ \\ \\ \\ int chunksize=-1);}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ Range(const Range\\& r);}\n\n{\\ttfamily\n\\ \\ \\ \\ Range(Range\\& r, const Split\\& split);}\n\n{\\ttfamily\n\\ \\ \\ \\ size\\_t size() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ bool empty() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ const iterator\\& begin() const;}\n\n{\\ttfamily\n\\ \\ \\ \\ const iterator\\& end() const;}\n\n{\\ttfamily\n\\ \\ \\};}\n\n{\\ttfamily\n\\}}\n\n\\subsubsection[Futures {}-- managing latency and dependencies (future.h and worldref.h)]{Futures -- managing latency\nand dependencies (future.h and worldref.h)}\nThe presently world level\n\n\\liststyleLiii\n\\begin{itemize}\n\\item {\\ttfamily\nFuture}\n\\item {\\ttfamily\nRemoteReference}\n\\end{itemize}\nclasses should be stripped of references to world and pushed down here so that we have a complete parallel programming\nenvironment independent of the World stuff.\n\n\\subsubsection{Concurrent hash map (worldhashmap.h)}\nA thread-safe hash map that is a drop in replacement for the GNU \\texttt{hash\\_map} and new C++\n\\ \\texttt{unordered\\_map}, but has the additional features\n\n\\liststyleLiv\n\\begin{itemize}\n\\item Concurrent deletions, insertions or modifications of entries do not invalidate iterators or pointers to entries\n(i.e., will not make them point to junk unless someone actually deletes the entry you are pointing at).\n\\item Intel TBB-style accessor interfaces to provide full thread-safe access to entries with either read or write\nmutexes.\n\\end{itemize}\nIssues:\n\n\\liststyleLv\n\\begin{itemize}\n\\item Should be renamed concurhashmap.h\n\\item Include class prototype here\n\\end{itemize}\n\n\\bigskip\n\n\\subsection{World level runtime}\nThe \\texttt{World} class encapsulates the entire global runtime environment for either all or a sub-group of processes.\nIt wraps a single MPI communicator. The main capabilities for the global runtime are\n\n\\liststyleLvi\n\\begin{itemize}\n\\item One-sided active messaging including remote task creation\n\\item Local and global fencing of AM and tasks (termination detection)\n\\item Global names (id) for objects\n\\item Globally addressable data structures including hash tables and arrays (still coming)\n\\item Parallel serialization of data \n\\end{itemize}\n\n\\bigskip\n\n\\subsubsection{World (world.h)}\n????\n\n\\subsubsection{World MPI interface (worldmpi.h)}\nThis is really a convenience for you to avoid having to first get the safe MPI communicator and then use it and is also\na hook for future instrumentation.\n\n\\subsubsection[World active message interface (worldam.h)]{World active message interface (worldam.h)}\nThis service sits on top of the global RMI described above (note that correct translation of ranks between communicators\nis not yet being performed ... i.e., only works for COMM\\_WORLD). It adds to the RMI interface automatic send buffer\nmanagement, eliminates user concern with the RMI header, throttles the number of outstanding send operations, and\npropagates state (the world, source process, message size) by encapsulatation in the class \\texttt{AmArg} that also\nfacilitates packing and unpacking of the message buffer using serialization.\n\nA World active message handler has this type\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ typedef void (*am\\_handlerT)(const AmArg\\&);}\n\n{\\ttfamily\n\\}}\n\n\\paragraph{AmArg (worldam.h)}\nThis class and its helper functions greatly simplify packing and unpacking data from message buffers.\n\n\n\\bigskip\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ class AmArg \\{}\n\n{\\ttfamily\n\\ \\ public:}\n\n{\\ttfamily\n\\ \\ \\ \\ AmArg();}\n\n{\\ttfamily\n\\ \\ \\ \\ unsigned char* buf() const; // Returns pointer to payload}\n\n{\\ttfamily\n\\ \\ \\ \\ size\\_t size() const; // Returns size of payload}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ template {\\textless}typename T{\\textgreater} \\ }\n\n{\\ttfamily\n\\ \\ \\ \\  \\ BufferInputArchive operator\\&(T\\& t) const; // Deserialize}\n\n{\\ttfamily\n\\ \\ \\ \\ template {\\textless}typename T{\\textgreater}}\n\n{\\ttfamily\n\\ \\ \\ \\  \\ BufferOutputArchive operator\\&(const T\\& t) const; // Serialize}\n\n{\\ttfamily\n\\ \\ \\ \\ ProcessID get\\_src() const; // Source of incoming msg.}\n\n{\\ttfamily\n\\ \\ \\ \\ World* get\\_world() const; // World of incoming msg.}\n\n{\\ttfamily\n\\ \\ \\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ // Allocates a new AmArg with nbytes of user data}\n\n{\\ttfamily\n\\ \\ \\ inline AmArg* alloc\\_am\\_arg(std::size\\_t nbyte);}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ // Duplicates an AmArg}\n\n{\\ttfamily\n\\ \\ \\ inline AmArg* copy\\_am\\_arg(const AmArg\\& arg);}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ // Frees an AmArg allocated with alloc\\_am\\_arg or copy\\_am\\_arg}\n\n{\\ttfamily\n\\ \\ inline void free\\_am\\_arg(AmArg* arg);}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ // Serialize one argument into a new AmArg}\n\n{\\ttfamily\n\\ \\ template {\\textless}typename A{\\textgreater}}\n\n{\\ttfamily\n\\ \\ inline AmArg* new\\_am\\_arg(const A\\& a);}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ // Serialize two arguments in a new AmArg}\n\n{\\ttfamily\n\\ \\ template {\\textless}typename A, typename B{\\textgreater}}\n\n{\\ttfamily\n\\ \\ inline AmArg* new\\_am\\_arg(const A\\& a, const B\\& b);}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ // Ditto for up to 10 arguments}\n\n{\\ttfamily\n\\}}\n\n\n\\bigskip\n\n\\paragraph{WorldAmInterface (worldam.h)}\nThis class is embedded inside World and you probably will not instantiate it separately.\n\n{\\ttfamily\nnamespace madness \\{}\n\n{\\ttfamily\n\\ \\ class WorldAmInterface \\{}\n\n{\\ttfamily\n\\ \\ \\ \\ WorldAmInterface(World\\& world);}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ // Ensures all local AM operations have completed}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ inline void fence();}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ // Sends non-blocking message -- user responsible for managing\\newline\n\\ \\ \\ \\ // completion and freeing buffer}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ RMI::Request isend\\_(ProcessID dest, am\\_handlerT op, \\newline\n\\ \\ \\ \\ \\ \\ \\ \\ const AmArg* arg, int attr=RMI::ATTR\\_ORDERED);}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ // Sends manged non-blocking non-blocking active message.\\newline\n\\ \\ \\ \\ // The buffer will be freed when the send is complete}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ void send(ProcessID dest, am\\_handlerT op, }\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ const AmArg* arg, int attr=RMI::ATTR\\_ORDERED);}\n\n{\\ttfamily\n\\ \\ \\ \\ \\};}\n\n{\\ttfamily\n\\}}\n\n\n\\bigskip\n\nThe \\texttt{fence()}method ensures local completion. After the call, all managed outgoing messages will have been sent\n(though not necessarily processed by the remote end) and all received incoming active messages will have been executed.\n\n\\subsubsection{World global operations (worldgop.h)}\nExcept for fence these were originally needed to avoid deadlock in the single threaded code. Are still useful if MPI is\nsingle-threaded (most common) or if we expose asynchronous global operations.\n\n\\liststyleLvii\n\\begin{itemize}\n\\item Add discussion of what global fence means and its cost\n\\end{itemize}\n\n\\bigskip\n\n\\subsubsection{World task interface (world\\_task\\_queue.h)}\nProvides submission of local and remote tasks using serialization to move arguments, and futures with callbacks to\nmanage dependencies. Counts number of pending tasks to enable fencing.\n\n\\subsubsection{World objects (world\\_object.h)}\nProvides global names for single replicated objects so that can send messages to instance of the logically same object\non a different processor without having to keep track of pointers etc.\n\n\\subsubsection[World container (worlddc.h)]{World container (worlddc.h)}\nA globally addressable hash table with one-sided access. Can send messages to either the container (using inherited\nWorldObj methods) or to items in the container. The latter is a centrally important ability because\n\n\\liststyleLviii\n\\begin{itemize}\n\\item it enables non-process-centric computing -- it eliminates reference to process number and hence \\ virtualizes how\nand where computation occurs\n\\item it automatically gives you a write lock on the item via a non-const accessor\n\\end{itemize}\nIssues\n\n\\liststyleLix\n\\begin{itemize}\n\\item Gotta be careful when acquiring other locks\n\\item Need to modify send protocol to break call chains\n\n\n\\bigskip\n\\end{itemize}\n\\end{document}\n"
  },
  {
    "path": "doc/Latex/apps/lrccs/LRCCS_Manual.tex",
    "content": "\\documentclass[10pt,a4paper]{scrartcl}\n\n\\usepackage{amsmath}\n\\usepackage{amsfonts}\n\\usepackage{amssymb}\n\\usepackage{color}\n\\usepackage[english]{babel}\n\\usepackage[\n\tcolorlinks=true,\n\turlcolor=blue,\n\tlinkcolor=green\n]{hyperref}\n\n% no indentation\n\\setlength{\\parindent}{0pt} \n\n\\begin{document}\n\\section*{MADNESS: CIS Excitation Energies}\nThe Tutorial was written for the Git commit \\textit{f03a51fbe4f5a30d870c28772e5960ae39502da9} which you can checkout before compiling via: \\\\\n\\textit{git checkout f03a51fbe4f5a30d870c28772e5960ae39502da9}\\\\\nIf you experience any sort of trouble please feel free to contact me at:\\\\\n\\href{mailto:jakob.kottmann@hu-berlin.de}{jakob.kottmann@hu-berlin.de}\n\n\\section{Built LRCCS}\nDetailed information can be found in the MADNESS wiki on Github: \\url{https://github.com/m-a-d-n-e-s-s/madness/wiki}\n\\begin{itemize}\n\\item Make shure you have Git installed\n\\item Make shure you have (see also the MADNESS wiki):\n\\begin{itemize}\n\\item C++11 Compiler: Clang-3.8 or later (Mac OS), GCC-4.8 or later (Linux)\n\\item Corresponding MPICH\n\\item GNU Autotools (autoconf 2.59 or later, automake 1.11 or later)\n\\end{itemize}\n\\item Get the MADNESS source Code from Github\\\\\n\\textit{git clone {https://github.com/m-a-d-n-e-s-s/madness.git} madness-source}\n\\item Execute \\textit{autogen.sh} in the madness-source directory\n\\item Configure MADNESSS in your compile directory like this (use the correct paths):\\\\\n\\textit{/path-to-source/madness-source/configure 'CC=/usr/bin/clang' 'CXX=/usr/bin/clang++'\n'MPICC=/opt/local/bin/mpicc-mpich-clang38' 'MPICXX=/opt/local/bin/mpicxx-mpich-clang38'} \n\\item Compile the MADNESS libraries in your compile directory\\\\\n\\textit{make -C /path-to-madness-compile/madness-compile/ libraries}\n\\item Compile cis in the MADNESS examples directory\\\\\n\\textit{make -C /path-to-madness-compile/madness-compile/src/apps/cis cis}\n\\end{itemize}\n\n\\section{Run LRCCS}\nAfter compiling you can execute \\textit{cis} in the \\textit{madness-compile/src/apps/cis} directory. For the calculation it is necessary that an input file with the name \\textit{input} is present in the directory from which you call \\textit{cis}.\n\n\\clearpage\n\\section{Quick Tutorial}\nThe programm \\textit{LRCCS} \\cite{mra-cis} will solve the linear-response equations for excitation energies in the CIS approximation via the following steps.\n\\begin{enumerate}\n\\item Solve Hartree-Fock (HF) ground state\n\\item Create guess vectorfunctions $\\lbrace x_i \\rbrace $ from the HF orbitals $\\lbrace \\phi_i \\rbrace$ via\n\\[ x_i = f\\cdot\\phi_i \\]\nwhere $f$ is constructed from polynomials (see Keyword section)\n\\item Iterate the guess vectorfunctions \n\\item Iterate the lowest guess vectorfunctions further\n\\item Iterate sequentially untill convergence\n\\end{enumerate}\nDetailed information can be found in \\cite{mra-cis}.\n\\subsection{Input File Structure}\nThe input file has four main sections.\n\\paragraph{Ground-State section:} Begins with \\textit{dft} and ends with \\textit{end}\\\\\n\nMandatory Keywords:\n\\begin{itemize}\n\\item xc value: \\textit{value} is the exchange correlation potential. To solve the CIS equations this has to be always \\textit{hf} \n\\item k value: \\textit{value} is the order of polynomials for the MRA representation (usually around 6-9)\n\\item econv value: \\textit{value} is the MRA:threshold for the HF orbitals and at the same time the convergence threshold for the energy\n\\end{itemize}\nOptional Keywords:\n\\begin{itemize}\n\\item L value: \\textit{value} it the size of the cubic simulation box in atomic units. Each dimension of the box runs rum -L to L (default is 50.0)\n\\item dconv value: \\textit{value} convergence threshold for the orbitals (does not affect MRA threshold)\n\\item nuclear\\_corrfac value: \\textit{value} is the nuclear correlation factor which is used \\\\\n(default is \\textit{none}, other options are \\textit{slater}, \\textit{GradientalGaussSlater}, \\textit{GaussSlater}, \\textit{LinearSlater} and\n\t    \\textit{Polynomial}). For more information see \\cite{nemo-I}.\n\\item no\\_compute or restart: Load the HF equations from the file \\textit{restartdata.00000} which has to be present in the same directory. If \\textit{restart} is chosen the HF orbitals will be re-iterated\n\\end{itemize}\n\n\\paragraph{Response Section:} Begins with \\textit{cc2} and ends with \\textit{end}\\\\\n\nMandatory Keywords\n\\begin{itemize}\n\\item thresh\\_3D value: \\textit{value} is the MRA threshold for the response vectorfunctions (default is 5)\n\\end{itemize}\nOptional Keywords\n\\begin{itemize}\n\\item tda\\_econv\\_hard value: \\textit{value} is the final convergence threshold for the excitation energies\n\\item tda\\_dconv\\_hard value: \\textit{value} is the final convergence threshold for the response vectorfunctions\n\\item tda\\_excitations value: \\textit{value} is the number of excitation energies which shall be calculated\n\\item tda\\_guess\\_excitations value: \\textit{value} is the number of guess excitations which is iterated in the beginning\n\\item tda\\_iterating\\_excitations value: \\textit{value} is the number of excitation vectors which are iterated together (change if you have memory problems)\n\\item freeze value: \\textit{value} is the number of frozen core orbitals\n\\item tda\\_guess value: \\textit{value} is the guess that is used (default is a big guess from a perturbed fock matrix). Possible entries are: \\textit{dipole}, \\textit{dipole+}, \\textit{quadrupole}, \\textit{big\\_fock\\_3}, \\textit{big\\_fock\\_4}, \\textit{c2v}, \\textit{c2v\\_big} and \\textit{custom}).\nThe polynomials which are used for the specific guesses will be displayed in the output. The \\textit{custom} valueword has to be used together with the \\textit{exop} valueword.\n\\item exop value: \\textit{value} is a custom polynomial to create a guess vectorfunction from the HF orbitals.\nExample: \\textit{exop x 1.0 y 2.0, x 3.0 z 1.0 c -2.0} corresponds to $xy^2 + -2.0\\cdot x^3z$.\nTo calculate more than one guess the exop keyword can used more than one time.\nExample: The following line would be equivalent with the \\textit{tda\\_guess dipole+} keyword: \\\\\n\\textit{tda\\_guess custom} \\\\\n\\textit{exop x 1.0}\\\\\n\\textit{exop y 1.0}\\\\\n\\textit{exop z 1.0}\\\\\n\\textit{exop x 2.0, y 2.0, z 2.0}\n\\end{itemize}\n\\clearpage\n\\paragraph{Geometry section:} Begins with \\textit{geometry} and ends with \\textit{end}. Contains the molecular coordinates in atomic units\n\\paragraph{Plot section:} Begins with \\textit{plot} and ends with \\textit{end}. Contains plotting information. Can in principle be empty but should be present. \n\\subsection{Example Input}\nThe example input File should also be found in the madness-source/src/apps/cis directory with the name \\textit{input}.\\\\\n\n\ndft\\\\\n  xc hf\\\\\n  econv 1.e-5\\\\\n  dconv 1.e-4\\\\\nend\\\\\n\ncc2\\\\\n  thresh\\_3D 1.e-4\\\\\n  tda\\_econv\\_hard 1.e-4\\\\\n  tda\\_dconv\\_hard 1.e-3\\\\\n  tda\\_guess dipole+ \\\\\nend\\\\\n\ngeometry\\\\\n\the 0.0 0.0 0.0\\\\\nend\\\\\n\nplot \\\\\n plane x1 x2\\\\\n origin 0.0 0.0 0.0\\\\\n zoom 1.0\\\\\nend\n\n%References\n\\bibliographystyle{plain}\n\\bibliography{references}\n\n\\end{document}\n"
  },
  {
    "path": "doc/Latex/apps/lrccs/references.bib",
    "content": "@Article{mra-cis,\nauthor =\"Kottmann, Jakob S. and H{\\\"o}fener, Sebastian and Bischoff, Florian A.\",\ntitle  =\"\\href{http://dx.doi.org/10.1039/C5CP00345H}{Numerically accurate linear response-properties in the configuration-interaction singles (CIS) approximation}\",\njournal  =\"Physical Chemistry Chemical Physics\",\nyear  =\"2015\",\nvolume  =\"17\",\nissue  =\"47\",\npages  =\"31453-31462\",\npublisher  =\"The Royal Society of Chemistry\",\ndoi  =\"10.1039/C5CP00345H\",\nurl  =\"http://dx.doi.org/10.1039/C5CP00345H\",\nabstract  =\"In the present work{,} we report an efficient implementation of configuration interaction singles (CIS) excitation energies and oscillator strengths using the multi-resolution analysis (MRA) framework to address the basis-set convergence of excited state computations. In MRA (ground-state) orbitals{,} excited states are constructed adaptively guaranteeing an overall precision. Thus not only valence but also{,} in particular{,} low-lying Rydberg states can be computed with consistent quality at the basis set limit a priori{,} or without special treatments{,} which is demonstrated using a small test set of organic molecules{,} basis sets{,} and states. We find that the new implementation of MRA-CIS excitation energy calculations is competitive with conventional LCAO calculations when the basis-set limit of medium-sized molecules is sought{,} which requires large{,} diffuse basis sets. This becomes particularly important if accurate calculations of molecular electronic absorption spectra with respect to basis-set incompleteness are required{,} in which both valence as well as Rydberg excitations can contribute to the molecule{'}s UV/VIS fingerprint.\"}\n\n\n@article{nemo-I,\n   author = \"Bischoff, Florian A.\",\n   title = \"\\href{http://scitation.aip.org/content/aip/journal/jcp/141/18/10.1063/1.4901021}{Regularizing the molecular potential in electronic structure calculations. {I}. {SCF} methods}\",\n   journal = \"The Journal of Chemical Physics\",\n   year = \"2014\",\n   volume = \"141\",\n   number = \"18\", \n   eid = 184105,\n   pages = \"\",\n   url = \"http://scitation.aip.org/content/aip/journal/jcp/141/18/10.1063/1.4901021\",\n   doi = \"http://dx.doi.org/10.1063/1.4901021\" \n}"
  },
  {
    "path": "doc/Latex/apps/moldft/manual.tex",
    "content": "\\documentclass[letterpaper]{book}\n\\usepackage{amssymb,amsmath,latexsym,hyperref,graphics,color}\n\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{2ex plus 0.5ex minus 0.2ex}\n\n\\begin{document}\n\n% Title Page\n\\title{MADNESS Molecular electronic structure calculations}\n\\date{Last Modification: 7/7/2016}\n\\maketitle\n\n% Copyright Page\n\\pagestyle{empty}\n\\null\\vfill\n\\noindent\nThis file is part of MADNESS.\n\n\nCopyright (C) 2007, 2010 Oak Ridge National Laboratory\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public\nLicense as published by the Free Software Foundation; either version 2 of the License, or(at your option) any later\nversion.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied\nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free\nSoftware Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\nFor more information please contact:\n\\begin{quote}\t\t\t\t\t\t\t\nRobert J. Harrison \t\t\t\t\\\\\nOak Ridge National Laboratory \t\\\\\nOne Bethel Valley Road \t\t\t\\\\\nP.O. Box 2008, MS-6367\t\t\t\\\\\nOak Ridge, TN 37831\t\t\t\t\\\\\n\t\t\t\t\t\t\t\t\\\\\nemail: harrisonrj@ornl.gov \t\t\\\\\ntel: 865-241-3937\t\t\t\t\\\\\nfax: 865-572-0680\t\n\\end{quote}\t\t\n\\newpage\n\n\n% Table of Contents Pages\n\\clearpage\n\\setcounter{page}{1}\n\\pagenumbering{roman}\n\n\\setcounter{tocdepth}{10}\n\\renewcommand\\contentsname{Table of Contents}\n\\tableofcontents\n\n\n\\clearpage\n\\setcounter{page}{1}\n\\pagenumbering{arabic}\n\n\\chapter{Overview}\n\n\\section{Capabilities}\n\n\n\n\\section{Current status}\n\nThe software is still in what might best described as pre-production\nquality.  Most things mostly work, but there are enough quirks that\nunfortunately it is far from being a black box like most Gaussian\ncodes.\n\nUsing the code to do actual science is the most effective mechanism\nfor us to find and fix issues, as well as to prioritize implementation\neffort.  Please report problems, issues and functionality requests to the\nMADNESS issue tracker at XXXXXXXXXXXXXXX.\n\n\\chapter{Configuring and building}\n\nThis is just for LI-red for the purposes of the summer school.\nMADNESS should build out of the box on most Linux and Apple Macintosh\nboxes. Intel MKL is now free so you should alway use that (download\nfrom Intel), and there is an open source version of Intel TBB (Linux\ndistributions should have that in their package managers).  If you are\nbuilding to run on a virtual machine you should configure with the\nnever spin option.\n\n\\begin{enumerate}\n\\item Copy the modules from section \\ref{sec:pbslired} below into your\n  \\verb+.bashrc+ file.  You will be using the Intel compiler, MPI, MKL\n  and TBB which is the recommended stack when running on a cluster.\n\n\\item Clone MADNESS from\n  \\url{https://github.com/m-a-d-n-e-s-s/madness}.  I (RJH) used\n  revision {\\tt a1b4bae8acf57ae363f24cb8a7ea9e7229a0d95f} for testing.\n\n\\item {\\tt cd madness}\n\n\\item \\verb+sh autogen.sh+ --- only need to do this after initial checkout\n\n\\item \\verb+autoreconf+ --- only need to do this if a configure script has changed\n\n\\item Configure with this command\n\\begin{verbatim}\n  ./configure --disable-shared \\\n       CC=mpiicc CXX=mpiicpc +\\verb+ MPICC=mpiicc MPICXX=mpiicpc\n\\end{verbatim}\nIf you have installed LIBXC you can specify it with option\n\\begin{verbatim}\n  --with-libxc=full-path-to-libxc+.\n\\end{verbatim}\n\n\\item \\verb+make -j 10 libraries+ --- using just 10 processes on\n  LI-red is to be social.  Also, if building on your own machine note\n  that some of the files can use over 2GB of memory to compile, so if\n  you have limited memory you may need to restrict the number of\n  processes.  If compiling on {\\tt cn-mem} I always use\n  \\verb+make -j libraries+ which uses maximum parallelism (since {\\tt\n    cn-mem} has 72 cores and 3 TB of memory.\n\n\\item \\verb+cd src/apps/moldft+\n\n\\item \\verb+make moldft+\n\n\\item \\verb+MAD_NUM_THREADS=10 ./moldft+ --- run a quick test (the {\\tt input} file by default does LDA water which is quick).\n\n\\end{enumerate}\n\n\n\\chapter{Execution}\n\nTo run {\\tt moldft} with a single, multi-threaded process simply\ninvoke the name of the executable with the name of the input file on\nthe command line.  If the input file is ommited, it defaults to a file\nnamed {\\tt input}.  E.g.,\n\n\\begin{verbatim}\n    ./moldft inputfilename\n\\end{verbatim}\n\n\nRecommendations:\n\\begin{itemize}\n\\item Use Intel TBB if it is available since it is more scalable than the old task pool.\n\\item By default, MADNESS will create one thread for every core in the\n  computer, but even with TBB it may be more effective to use fewer threads\n  (see the environment variable \\verb+MAD_NUM_THREADS+). E.g.,\n\\begin{verbatim}\n      MAD_NUM_THREADS=10 ./moldft inputfile\n\\end{verbatim}\n\\item Oversubscribing the cores can lead to very poor performance due to\n  cache contention and locks/mutexes being held by de-scheduled\n  threads. Oversubscription can happen due to other processes (of yourself or other users)\n  running at the same time, or from use of hyperthreading (which on Intel processors\n  makes one phyiscal core appear to the system as two cores).\n\\item Many threads seem to interact badly with how we are using MPI.\n  Thus, it can help both robustness and performance to use multiple\n  MPI processes per node with fewer threads per processes. As a side benefit you\n  can bind the threads associated with each process to execute on the same\n  socket, which improves thread scaling.  See the SeaWulf batch script below\n  for an example.\n\\end{itemize}\n\nTo run in parallel using MPI to create multiple, multi-threaded\nprocesses use the command {\\tt mpirun} (or on some systems {\\tt\n  mpiexec}) --- this is very system dependent so you may need\nadditional options to specify where and how many processes are created\n(see below for use on SeaWulf and LI-red).  E.g.,\n\n\\begin{verbatim}\n    export MAD_NUM_THREADS=10\n    mpirun -np 12 ./moldft inputfilename\n\\end{verbatim}\n\n\\subsection{Environment variables}\n\n\\verb+MAD_NUM_THREADS+ --- Sets the total number of threads to be used\nby MADNESS.  When running with just one process all threads are\ndevoted to computation (1 main thread with the remainder in the thread\npool).  When running with multiple MPI processes, one of the threads\nis devoted to communication.  If you have 8 or more cores per node, it\nis recommended to leave at least one free for use by the O/S and MPI.\n\n\\verb+MRA_DATA_DIR+ --- Full path to the directory containing the MRA\ndata files (twoscale and autocorrelation coefficients; Gauss-Legendre\nquadrature weights).  This is usually not needed unless you have moved\nthe build/installation directory.\n\n\\verb+MAD_BUFFER_SIZE+ --- Sets the buffer size (in bytes) used by the\nactive messages; an integer, with optional units (1KB = 1024, 1MB = 1024^2, etc.); default is 1536KB.\nNever needed by moldft?\n\n\\verb+MAD_RECV_BUFFERS+ --- Sets the number of receive buffers used by\nthe communication thread (default is 128 and a minimum of 32 is\nenforced).  If you are experiencing hangs when running with MPI,\nmaking this number a bit larger (e.g., 256) can sometimes help. Too\nmany buffers can cause performance problems.\n\n\\verb+MAD_SEND_BUFFERS+ --- Sets the number of outstanding\nasynchronous send buffers (default 128 and a minimum of 32 is\nenforced).  If you are experiencing hangs when running with MPI try\nmaking this smaller (to throttle the volume communication).\n\n\\verb+MAD_NSSEND+ --- Every \\verb+MAD_NSSEND+ messages, MADNESS\nrequests a receipt acknowledgment from the receiver in an attempt to\nthrottle the volume of communication.  The default is the number of\nsend buffers.  Set to the value \\verb+1+ to force receipt every\nmessage to be acknowledged.  This makes things a bit slower but can\nworkaround MPI hangs.\n\n\\subsection{PBS script for LI-red}\n\\label{sec:pbslired}\n\nThis example makes a 2 hour job running in the short queue on 8 nodes\nwith one process per node and job name {\\tt moldft}.  Each process\nwill use 20 threads.\n\n\\begin{verbatim}\n#!/bin/bash                                                                     \n#PBS -l nodes=8:ppn=1,walltime=02:00:00                                         \n#PBS -q short                                                                   \n#PBS -N moldft                                                                  \n\nexport EXE=/home/rjh/madness/src/apps/moldft/moldft\nexport INPUT=benzenehf.in\nexport OUTPUT=benzenehf.out\n\nexport I_MPI_FABRICS=shm:ofa\nexport MAD_NUM_THREADS=20\n\ncd $PBS_O_WORKDIR\n\nmpirun -ppn 1 $EXE $INPUT >& $OUTPUT\n\\end{verbatim}\n\nThe modules I (RJH) used for testing were (put the following in your \\verb+.bashrc+)\n\\begin{verbatim}\nmodule load shared                                                              \nmodule load torque/5.1.0                                                        \nmodule load maui/3.3.1                                                          \nmodule load gcc/4.9.2                                                           \nmodule load intel/compiler/64/16.0.2/2016.2.181                                 \nmodule load intel/mkl/64/11.3.2/2016.2.181\nmodule load intel-mpi/64/5.1.2/5.1.2.150.XXX\nmodule load intel/tbb/64/4.4.3/2016.2.181\nmodule load intel/vtune/2016/2016.1.1.434111\n\\end{verbatim}\n\n\\subsection{PBS script for SeaWulf}\n\nOn SeaWulf the PBS option {\\tt ppn} is presently not consistent with\nthat on LI-red --- this will change soon.  In the meantime the script\nis a little more complicated in order to get just two MADNESS\nprocesses per node with threads able to use all cores.\n\nASIDE: SeaWulf has 28 cores per node and a 40 Gbit/s InfiniBand\nnetwork whereas LI-red has 24 cores per node and a 56 Gbit/s network.\nSomehow these factors (or others?) combine to make MADNESS execution\non SeaWulf with 1 MPI process that uses 26 MADNESS threads/node not\nreliable.  Hence, the job below uses two MPI processes per node each\nwith 11 MADNESS threads.\n\n\\begin{verbatim}\n#!/bin/bash\n#PBS -l nodes=12:ppn=28,walltime=10:00:00\n#PBS -q default\n#PBS -N geomopt\n\n# Probably best to put these in your .bashrc so don't need here\nmodule load intel/compiler/64/16.0/2016.1.056.XXX\nmodule load intel/mkl/64/11.3/2016.1.056.XXX\nmodule load intel-mpi/64/5.1.2/5.1.2.150.XXX\nmodule load intel/tbb/64/4.4.3/2016.2.181\nexport INTEL_LICENSE_FILE=28518@129.49.83.234\n\n# Intel MPI should use shared-memory and OFED for communication\nexport I_MPI_FABRICS=shm:ofa\n\n# We will create two processes per node --- bind to separate sockets\nexport I_MPI_PIN_DOMAIN=socket\n\n# Should be set elsewhere but may not be\nexport I_MPI_HYDRA_BOOTSTRAP=rsh\n\n# 14 cores per socket = Linux+MPI+unknown+madness\nexport MAD_NUM_THREADS=11\n\n# Change to the directory from which the job was submitted\ncd $PBS_O_WORKDIR\n\n# Presently SeaWulf is configured so that to get a dedicated node we\n# need to set ppn=28 above which gives us 28 processes per node, but we\n# want two.  So need to make our own host file.\nsort < $PBS_NODEFILE | uniq > $$.hosts\nlet NPROC=$PBS_NUM_NODES*2\n\n# Paths to files\nMOLDFT=/gpfs/home/rharrison/madness/src/apps/moldft/moldft\nINPUTFILE=input\nOUTPUTFILE=output\n\n# Redirect output to a file so that can see it while job is running\n\nmpirun -f $$.hosts -ppn 2 -n $NPROC $MOLDFT $INPUTFILE  >& $OUTPUTFILE\n  \n\\end{verbatim}\n\n\n\\section{Input structure}\n\nPresently the input {\\em must} contain both a \\verb+dft+ and a\n\\verb+geometry+ input block.  The file is scanned for the first such\nblock (so you can have multiple blocks in a file --- just the first is\nused). Within these blocks, lines beginning with \\verb+#+ are read as comments.\nOutside these blocks, data is ignored.\n\n\\section{Reproducibility}\n\nFor small molecules, the calculations should usually be fully\nreprodicible from run to run or with different numbers of threads or\nprocesses.  However, for larger molecules, the different rounding\nerror arising from different order of parallel execution can cause\ndifferent execution paths.  So results may vary in the last digit or\nso, and sometimes more especially if additional/fewer iterations are\nmade.  However, results at convergence should {\\em always} agree to\nthe that expected from the truncation and convergence thresholds, and\nthe number of iterations between runs should only differ by about one.\nIf you are seeing worse behavior than this, then please send the input\nand output to the MADNESS issue tracker.\n\n\\chapter{Geometry specification}\n\n\\begin{verbatim}\n  geometry\n      units atomic or angstrom (default atomic)\n      eprec precision (default 1e-4)\n      tag x y z\n      pstag x y z charge\n  end\n\\end{verbatim}\n\nThe units and energy precision ({\\tt eprec}) must presently be specified {\\em before} coordinates of atoms are specified.\n\n{\\tt units} --- E.g., {\\tt units angstrom} --- The user input units which can be {\\tt atomic} or {\\tt angstrom} (default is {\\tt atomic}).  Beware --- presently, the output file always contains atomic units.\n\n{\\tt eprec} --- E.g., {\\tt eprec 1e-5} --- The energy error per atom\nin atomic units due to smoothing the nuclear potential (default is\n{\\tt 1e-4}).  The default is adequate for most chemical purposes\n(giving energy differences to at least {\\tt 1e-5} atomic units per atom\nand geometries accurate to about {\\tt 1e-3} atomic units) unless you\nare doing very high accuracy benchmark studies.  Gradients may get\nnoisy if you make {\\tt eprec} too small, though we don't have much\nexperience with this yet. \n\n{\\tt tag x y z} --- E.g., {\\tt Be 0.3 -0.1 3.1} --- Specifies an atom using its atomic symbol (case insensitive) and Cartesian coordinates.\n\n{\\tt bqtag x y z charge} --- E.g., {\\tt Bq9 20.0 20.0 20.0 -10.0} --- The tag must begin with {\\tt Bq} (case insensitive).  It is used to place a charge at an arbitrary location (e.g., to simulate an external field).\n\n{\\tt pstag x y z charge} --- E.g., {\\tt psBe 0.3 -0.1 3.1} --- The tag must begin with {\\tt ps} (case insensitive).  It is used to put a pseudopotential on selected atoms ({\\em I think ???????}).\n\n\n\\chapter{Ground state molecular DFT and HF}\n\n\\begin{verbatim}\n  dft\n      directives/keywords\n  end\n\\end{verbatim}\n\n{\\tt nopen value} --- E.g., {\\tt nopen 3} --- The number of unpaired spin orbitals, $n_\\alpha - n_\\beta$ (default {\\tt 0})\n\n{\\tt unrestricted} --- Selects a spin-unrestricted calculation (default is spin restricted)\n\n{\\tt xc value} --- E.g., {\\tt xc HF} --- Selects the exchange correlation potential (default is {\\tt LDA}). See XC section for more details.\n\n{\\tt aobasis value} --- E.g., {\\tt aobasis sto-3g} --- Sets the atomic orbital basis used for the initial guess.  Options are {\\tt sto-3g} (down to Iodine)  or {\\tt 6-31g} (down to Zinc, default).  \n\n{\\tt charge value} --- E.g., {\\tt charge -1.0} --- Total charge (default {\\tt 0}) on the molecule. Atomic units.\n\n{\\tt nvalpha value} --- E.g., {\\tt nvalpha 2} --- The number of alpha spin virtual orbitals to solve for (default {\\tt 0}) --- is this working now?\n\n{\\tt nvbeta value} --- E.g., {\\tt nvbeta 2} --- The number of beta spin virtual orbitals to solve for (default {\\tt 0}) --- is this working now?\n\n{\\tt no\\_orient} --- Do not reorient/translate the molecule to orientation/center.\n\n{\\tt core\\_type value} --- E.g., {\\tt What is available?} Selects the pseudopotential to be used on all atoms (can also do mixed all-electron/pseudopotential calculation).  Not heavily tested and unoptimized. (default is all electron).\n\n{\\tt psp\\_calc} --- Perform pseusopotential calculation on all atoms.  Not heavily tested and unoptimized. (default is all-electron)\n\n{\\tt L value} --- E.g., {\\tt L 50} --- Sets the computational box size to $[-L,L]^3$ atomic units (mostly for testing).  Default is to find cube that contains all nuclei and to add 50 atomic units.\n\n\\section{XC --- DFT exchange correlation}\n\nWithout LIBXC, the code just provides either Hartree-Fock ({\\tt xc HF}) or local (spin) density approximation ({\\tt xc LDA}, the default).\n\nWith LIBXC, in addition to HF and LDA (default) there are wide varity of GGA and hybrid functionals available --- the ones that have been tested (to some extent) have been provided with simple input formats\n\\begin{itemize}\n\\item Becke-Perdew (91?) --- \\verb+xc bp+\n\\item Becke-Perdew 86 --- \\verb+xc bp86+\n\\item PBE --- \\verb+xc pbe+\n\\item PBE-0 --- \\verb+xc pbe0+\n\\item B3LYP --- \\verb+xc b3lyp+\n\\end{itemize}\n\nThere is also a more general input format in which you can provide a list of functional names (using LIBXC's naming scheme) and the coefficient by which to scale it.  For instance, to get PBE-0 you could specify\n\\verb+xc GGA_X_PBE .75 GGA_C_PBE 1. HF_X .25+.\n\nWe have not yet implemented the near linear-scaling algorithm for HF\nexchange, which as a consequence is fairly slow and may require a lot\nof memory (there is low-memory algorithm in the code but I don't think\nit is yet available as an input option).\n\n\\section{Restarting}\n\nAt completion of an HF or DFT calculation, the molecular orbitals are\nsaved in the files \\verb+restartdata.*+ (with one file per I/O server\nprocess).  The projection of the orbtials onto the {\\tt sto-3G} AO basis\nset is saved into the file {\\tt restartaodata}.\n\n{\\tt restart} --- Restart from numerical orbitals from a previous calculation (default is no)\n\n{\\tt restartao} --- Restart from projection of orbitals onto AO basis\nset from a previous calculation (default is no unless doing geometry\noptimization).  If a restart file is not found, or the file contains\nincompatible data then the default atomic guess is used.\n\n{\\tt save value} --- E.g., {\\tt save false} --- Boolean flag to save (or not) orbitals at completion (default is true).\n\n\\section{Controlling convergence and accuracy}\n\nThe default convergence test is on both the 2-norm of change in density per atom (separately for each spin) between iterations and the residual error in each wave function.\n\n\\begin{verbatim}\n  converged = (da < dconv * molecule.natom()) && \n              (db < dconv * molecule.natom()) &&\n              (conv_only_dens || (max_residual < 5.0 * dconv))\n\\end{verbatim}\n\n{\\tt dconv value} --- E.g., {\\tt dconv 1e-5} --- SCF convergence criterion (default 1e-4 atomic units).  Suggest decreasing this to {\\tt 1e-5} for geometry optimization or property calculations.\n\n{\\tt canon} --- Solves for canonical orbitals or eigenfunctions (default is localized orbitals except for atoms and diatomics).\n\n{\\tt pm} --- Selects use of the Pipek-Mezy localized orbitals (default).\n\n{\\tt boys} --- Selects use of the Boys localized orbitals.\n\n{\\tt maxrotn value} --- E.g., {\\tt maxrotn 0.1} --- Used to restrict maximum rotation of orbitals (default {\\tt 0.25})\n\n{\\tt maxiter value} --- E.g., {\\tt maxiter 20} --- The maximum number of iterations (default is {\\tt 20})\n\n{\\tt maxsub value} --- E.g., {\\tt maxsub 5} --- The size of the iterative subspace (default is {\\tt 5}).  Sometimes it helps to make this larger.\n\n{\\tt protocol valuelist} --- E.g., {\\tt protocol 1e-4 1e-6 1e-8} --- Sets the solution protocol.  The default is `{\\tt 1e-4 1e-6} which means solve first using a truncation threshold of {\\tt 1e-4} (using $k=6$) and with a threshold of {\\tt 1e-6} (using $k=8$).\n\n{\\tt orbitalshift} --- E.g., {\\tt orbitalshift 0.1} --- Shifts the occupied orbitals down in energy by the given amount (default {\\tt 0}).  Is this working?\n\n{\\tt k value} --- E.g., {\\tt k 8} --- Sets the wavelet order to a fixed value (mostly only used for testing)\n\n{\\tt convonlydens} --- Just test on the change in the density for convergence.\n\n\n\\section{Geometry optimization}\n\nBy default geometry optimization is performed using the BFGS Hessian update algorithm.  The convergence test is on all of the 2-norm of the gradient, the change in the energy between iterations, and the maximum change in Cartesian coordinates (all in atomic units).  The \n\nFor geometry optimization it is recommended to select {\\tt dconv 1e-5} to obtain more accurate gradients.\n\n{\\tt gopt} --- Requests optimization of the geometry\n\n{\\tt gtol value} --- E.g., {\\tt gtol 1e-4} --- Sets the convergence threshold for the 2-norm of the gradient (default {\\tt 1e-3}).\n\n{\\tt gtest value} --- E.g., {\\tt gtest 1e-4} --- Sets the convergence threshold for the maximum change in Cartesian coordinates (default {\\tt 1e-3} atomic units).\n\n{\\tt gval value} --- E.g., {\\tt gval 1e-6} --- Sets the available precision in the energy (default is {\\tt 1e-5} atomic units).\n\n{\\tt gprec value} --- E.g., {\\tt gtest 1e-6} --- Sets the available precision in the gradient (default is {\\tt 1e-5} atomic units).\n\n{\\tt gmaxiter value} --- E.g., {\\tt gmaxiter 100} --- Sets the maximum number of geometry optimization iterations (default is 20).\n\n{\\tt algopt value} --- E.g., {\\tt algopt SR1} --- Selects the quasi-Newton update method (default is ).  Options are {\\tt BFGS} (default) or {\\tt SR1} (not heavily tested).  Case sensitive.\n\n\\section{Properties}\n\n{\\tt derivatives} --- Compute the derivates (default is false).\n\n{\\tt dipole} --- Compute the molecular dipole moment (default is false --- why?).\n\n{\\tt response} --- TBD\n\n{\\tt response\\_freq} ---  TBD\n\n{\\tt response\\_axis} --- TBD\n\n{\\tt rconv} --- TBD\n\n{\\tt efield} --- TBD\n\n{\\tt efield\\_axis x y z} --- TBD\n\n{\\tt print\\_dipole\\_matels} --- TBD\n\n\\section{Plotting}\n\nPlots are generated to OpenDX files.  In the {\\tt moldft} source directory are two useful files\n\n\\begin{itemize}\n\\item {\\tt vizit.net} --- An OpenDX visual program that displays a\n  molecule (from file {\\tt molecule.dx}) along with positive+negative\n  isosurfaces (with adjustable value)for a scalar field read from a\n  file.\n\n\\item {\\tt moldx.py} --- A Python program you can run with your {\\em\n  output} file as standard input to produce a {\\tt molecule.dx} file.\n  It is important to use your output file since {\\tt moldft} will (by\n  default) translate and rotate the molecular coordinates.\n  \n\\end{itemize}\n\n{\\tt plotmos lo hi} --- E.g., {\\tt plotmos 10 12} --- Plots the molecular orbitals in the given inclusive range (default is none).  Orbitals are numbered from zero.  Seems like this needs extending to accomodate unrestricted calculations.\n\n{\\tt plotdens} --- Plots the total electronic charge density and, if spin unrestricted, the spin density (default is off).\n\n{\\tt plotcoul} --- Plots the total (electronic + nuclear) electrostatic potential (default is off).\n\n{\\tt plotnpt value } --- E.g., {\\tt plotnpt 501} --- Sets the number of plots used per dimension in the cube of points (default 101).\n\n{\\tt plotcell xlo xhi ylo yhi zlo zhi} --- E.g., {\\tt plotcell -10 10 -15 15 -10 5} --- Sets the cell (in atomic units) used for plotting (default is the entire simulation cell).\n\n\\section{Parallel execution}\n\n{\\tt loadbal vnucfac parts} --- E.g., {\\tt loadbal 12 2} --- Adjusts data/loadbalance when running in parallel with MPI.  {\\tt vnucfac} (default 12) is extra weight associated with nuclear potential and {\\tt parts} (default 2) is the number of partitions (or subtrees) per node.  SCF\n\n{\\tt nio value} --- E.g., {\\tt nio 10} --- The number of MPI processes to use as I/O servers (default is 1)\n\n\n\\end{document}\n"
  },
  {
    "path": "doc/Latex/apps/nemo_mp2/aip.bst",
    "content": "%% #define AIP 1\t\t% Fri Jun 15 10:51:17 1990\n%% #include \"TEX$ROOT:[BIBTEX]PHYSICS.BTX\"\n\t% Please notify Charles Karney (Karney@Princeton.EDU)\n\t% of any bugs, improvements, etc.\n\n\t% For American Institute of Physics Journals\n\n\t% version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.\n\t% Copyright (C) 1985, all rights reserved.\n\t% Copying of this file is authorized only if either\n\t% (1) you make absolutely no changes to your copy, including name, or\n\t% (2) if you do make changes, you name it something other than\n\t% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.\n\t% This restriction helps ensure that all standard styles are identical.\n\t% The file btxbst.doc has the documentation for this style.\n\nENTRY\n  { address\n    author\n    booktitle\n    chapter\n    edition\n    editor\n    howpublished\n    institution\n    journal\n    key\n    month\n    note\n    number\n    organization\n    pages\n    publisher\n    school\n    series\n    title\n    type\n    volume\n    year\n  }\n  {}\n  { label }\n\nINTEGERS { output.state before.all mid.sentence after.sentence after.block }\n\nFUNCTION {init.state.consts}\n{ #0 'before.all :=\n  #1 'mid.sentence :=\n  #2 'after.sentence :=\n  #3 'after.block :=\n}\n\nSTRINGS { s t }\n\nFUNCTION {output.nonnull}\n{ 's :=\n  output.state mid.sentence =\n    { \", \" * write$ }\n    { output.state after.block =\n\t{ \",\" * write$\n\t  newline$\n\t  \"\\newblock \" write$\n\t}\n\t{ output.state before.all =\n\t    'write$\n\t    { add.period$ \" \" * write$ }\n\t  if$\n\t}\n      if$\n      mid.sentence 'output.state :=\n    }\n  if$\n  s\n}\n\nFUNCTION {output}\n{ duplicate$ empty$\n    'pop$\n    'output.nonnull\n  if$\n}\n\nFUNCTION {output.check}\n{ 't :=\n  duplicate$ empty$\n    { pop$ \"empty \" t * \" in \" * cite$ * warning$ }\n    'output.nonnull\n  if$\n}\n\nFUNCTION {output.bibitem}\n{ newline$\n  \"\\bibitem{\" write$\n  cite$ write$\n  \"}\" write$\n  newline$\n  \"\"\n  before.all 'output.state :=\n}\n\nFUNCTION {fin.entry}\n{ add.period$\n  write$\n  newline$\n}\n\nFUNCTION {new.block}\n{ output.state before.all =\n    'skip$\n    { after.block 'output.state := }\n  if$\n}\n\nFUNCTION {new.sentence}\n{ skip$\n}\n\nFUNCTION {not}\n{   { #0 }\n    { #1 }\n  if$\n}\n\nFUNCTION {and}\n{   'skip$\n    { pop$ #0 }\n  if$\n}\n\nFUNCTION {or}\n{   { pop$ #1 }\n    'skip$\n  if$\n}\n\nFUNCTION {new.block.checka}\n{ empty$\n    'skip$\n    'new.block\n  if$\n}\n\nFUNCTION {new.block.checkb}\n{ empty$\n  swap$ empty$\n  and\n    'skip$\n    'new.block\n  if$\n}\n\nFUNCTION {new.sentence.checka}\n{ empty$\n    'skip$\n    'new.sentence\n  if$\n}\n\nFUNCTION {new.sentence.checkb}\n{ empty$\n  swap$ empty$\n  and\n    'skip$\n    'new.sentence\n  if$\n}\n\nFUNCTION {field.or.null}\n{ duplicate$ empty$\n    { pop$ \"\" }\n    'skip$\n  if$\n}\n\nFUNCTION {emphasize}\n{ duplicate$ empty$\n    { pop$ \"\" }\n    { \"{\\em \" swap$ * \"}\" * }\n  if$\n}\n\nFUNCTION {embolden}\n{ duplicate$ empty$\n    { pop$ \"\" }\n    { \"{\\bf \" swap$ * \"}\" * }\n  if$\n}\n\nFUNCTION {paren}\n{ duplicate$ empty$\n    { pop$ \"\" }\n    { \"(\" swap$ * \")\" * }\n  if$\n}\n\nINTEGERS { nameptr namesleft numnames }\n\nINTEGERS { etal }\n\nFUNCTION {format.names}\n{ 's :=\n  #1 'nameptr :=\n  s num.names$ 'numnames :=\n  numnames #5 >\n  s numnames \"{ll}\" format.name$ \"others\" = numnames #1 > and\n  or 'etal :=\n  etal\n    { #1 #1 + 'namesleft := }\n    { numnames 'namesleft := }\n  if$\n    { namesleft #0 > }\n    { s nameptr \"{f.~}{vv~}{ll}{, jj}\" format.name$ 't :=\n      nameptr #1 >\n\t{ namesleft #1 >\n\t    { \", \" * t * }\n\t    { nameptr #2 >\n\t\t{ \",\" * }\n\t\t'skip$\n\t      if$\n\t      t \"others\" =\n\t      etal or\n\t\t{ \" et~al.\" * }\n\t\t{ \" and \" * t * }\n\t      if$\n\t    }\n\t  if$\n\t}\n\t't\n      if$\n      nameptr #1 + 'nameptr :=\n      namesleft #1 - 'namesleft :=\n    }\n  while$\n}\n\nFUNCTION {format.authors}\n{ author empty$\n    { \"\" }\n    { author format.names }\n  if$\n}\n\nFUNCTION {format.editors}\n{ editor empty$\n    { \"\" }\n    { editor format.names\n      editor num.names$ #1 >\n\t{ \", editors\" * }\n\t{ \", editor\" * }\n      if$\n    }\n  if$\n}\n\nFUNCTION {format.edited}\n{ editor empty$\n    { \"\" }\n    { \"edited by \" editor format.names * }\n  if$\n}\n\nFUNCTION {format.title}\n{ title empty$\n    { \"\" }\n    { title \"t\" change.case$ }\n  if$\n}\n\nFUNCTION {n.dashify}\n{ 't :=\n  \"\"\n    { t empty$ not }\n    { t #1 #1 substring$ \"-\" =\n\t{ t #1 #2 substring$ \"--\" = not\n\t    { \"--\" *\n\t      t #2 global.max$ substring$ 't :=\n\t    }\n\t    {   { t #1 #1 substring$ \"-\" = }\n\t\t{ \"-\" *\n\t\t  t #2 global.max$ substring$ 't :=\n\t\t}\n\t      while$\n\t    }\n\t  if$\n\t}\n\t{ t #1 #1 substring$ *\n\t  t #2 global.max$ substring$ 't :=\n\t}\n      if$\n    }\n  while$\n}\n\nFUNCTION {first.page}\n{ 't :=\n  \"\"\n    {  t empty$ not t #1 #1 substring$ \"-\" = not and }\n    { t #1 #1 substring$ *\n      t #2 global.max$ substring$ 't :=\n    }\n  while$\n}\n\nFUNCTION {format.date}\n{ year empty$\n    { \"\" }\n    'year\n  if$\n}\n\nFUNCTION {format.btitle}\n{ title emphasize\n}\n\nFUNCTION {tie.or.space.connect}\n{ duplicate$ text.length$ #3 <\n    { \"~\" }\n    { \" \" }\n  if$\n  swap$ * *\n}\n\nFUNCTION {either.or.check}\n{ empty$\n    'pop$\n    { \"can't use both \" swap$ * \" fields in \" * cite$ * warning$ }\n  if$\n}\n\nFUNCTION {format.bvolume}\n{ volume empty$\n    { \"\" }\n    { \"volume\" volume tie.or.space.connect\n      series empty$\n\t'skip$\n\t{ \" of \" * series emphasize * }\n      if$\n      \"volume and number\" number either.or.check\n    }\n  if$\n}\n\nFUNCTION {format.number.series}\n{ volume empty$\n    { number empty$\n\t{ series field.or.null }\n\t{ output.state mid.sentence =\n\t    { \"number\" }\n\t    { \"Number\" }\n\t  if$\n\t  number tie.or.space.connect\n\t  series empty$\n\t    { \"there's a number but no series in \" cite$ * warning$ }\n\t    { \" in \" * series * }\n\t  if$\n\t}\n      if$\n    }\n    { \"\" }\n  if$\n}\n\nFUNCTION {format.edition}\n{ edition empty$\n    { \"\" }\n    { output.state mid.sentence =\n\t{ edition \"l\" change.case$ \" edition\" * }\n\t{ edition \"t\" change.case$ \" edition\" * }\n      if$\n    }\n  if$\n}\n\nINTEGERS { multiresult }\n\nFUNCTION {multi.page.check}\n{ 't :=\n  #0 'multiresult :=\n    { multiresult not\n      t empty$ not\n      and\n    }\n    { t #1 #1 substring$\n      duplicate$ \"-\" =\n      swap$ duplicate$ \",\" =\n      swap$ \"+\" =\n      or or\n\t{ #1 'multiresult := }\n\t{ t #2 global.max$ substring$ 't := }\n      if$\n    }\n  while$\n  multiresult\n}\n\nFUNCTION {format.pages}\n{ pages empty$\n    { \"\" }\n    { pages multi.page.check\n\t{ \"pages\" pages n.dashify tie.or.space.connect }\n\t{ \"page\" pages tie.or.space.connect }\n      if$\n    }\n  if$\n}\n\nFUNCTION {format.pages.a}\n{ pages empty$\n    { \"\" }\n    { \"page\" pages first.page tie.or.space.connect }\n  if$\n}\n\nFUNCTION {format.vol.num.pages}\n{ volume field.or.null embolden\n  \" \" swap$ * *\n  pages empty$\n    'skip$\n    { duplicate$ empty$\n\t{ pop$ format.pages.a }\n\t{ \", \" * pages first.page * }\n      if$\n    }\n  if$\n}\n\nFUNCTION {format.chapter.pages}\n{ chapter empty$\n    'format.pages\n    { type empty$\n\t{ \"chapter\" }\n\t{ type \"l\" change.case$ }\n      if$\n      chapter tie.or.space.connect\n      pages empty$\n\t'skip$\n\t{ \", \" * format.pages * }\n      if$\n    }\n  if$\n}\n\nFUNCTION {format.in.ed.booktitle}\n{ booktitle empty$\n    { \"\" }\n    { editor empty$\n\t{ \"in \" booktitle emphasize * }\n\t{ \"in \" booktitle emphasize * \", \" * format.edited * }\n      if$\n    }\n  if$\n}\n\nFUNCTION {empty.misc.check}\n{ author empty$ title empty$ howpublished empty$\n  month empty$ year empty$ note empty$\n  and and and and and\n    { \"all relevant fields are empty in \" cite$ * warning$ }\n    'skip$\n  if$\n}\n\nFUNCTION {format.thesis.type}\n{ type empty$\n    'skip$\n    { pop$\n      type \"t\" change.case$\n    }\n  if$\n}\n\nFUNCTION {format.tr.number}\n{ type empty$\n    { \"Technical Report\" }\n    'type\n  if$\n  number empty$\n    { \"t\" change.case$ }\n    { number tie.or.space.connect }\n  if$\n}\n\nFUNCTION {format.article.crossref}\n{ key empty$\n    { journal empty$\n\t{ \"need key or journal for \" cite$ * \" to crossref \" * crossref *\n\t  warning$\n\t  \"\"\n\t}\n\t{ \"In \" journal * }\n      if$\n    }\n    { \"In \" key * }\n  if$\n  \" \\cite{\" * crossref * \"}\" *\n}\n\nFUNCTION {format.crossref.editor}\n{ editor #1 \"{vv~}{ll}\" format.name$\n  editor num.names$ duplicate$\n  #2 >\n    { pop$ \" et~al.\" * }\n    { #2 <\n\t'skip$\n\t{ editor #2 \"{ff }{vv }{ll}{ jj}\" format.name$ \"others\" =\n\t    { \" et~al.\" * }\n\t    { \" and \" * editor #2 \"{vv~}{ll}\" format.name$ * }\n\t  if$\n\t}\n      if$\n    }\n  if$\n}\n\nFUNCTION {format.book.crossref}\n{ volume empty$\n    { \"empty volume in \" cite$ * \"'s crossref of \" * crossref * warning$\n      \"In \"\n    }\n    { \"Volume\" volume tie.or.space.connect\n      \" of \" *\n    }\n  if$\n  editor empty$\n  editor field.or.null author field.or.null =\n  or\n    { key empty$\n\t{ series empty$\n\t    { \"need editor, key, or series for \" cite$ * \" to crossref \" *\n\t      crossref * warning$\n\t      \"\" *\n\t    }\n\t    { \"{\\em \" * series * \"\\/}\" * }\n\t  if$\n\t}\n\t{ key * }\n      if$\n    }\n    { format.crossref.editor * }\n  if$\n  \" \\cite{\" * crossref * \"}\" *\n}\n\nFUNCTION {format.incoll.inproc.crossref}\n{ editor empty$\n  editor field.or.null author field.or.null =\n  or\n    { key empty$\n\t{ booktitle empty$\n\t    { \"need editor, key, or booktitle for \" cite$ * \" to crossref \" *\n\t      crossref * warning$\n\t      \"\"\n\t    }\n\t    { \"In {\\em \" booktitle * \"\\/}\" * }\n\t  if$\n\t}\n\t{ \"In \" key * }\n      if$\n    }\n    { \"In \" format.crossref.editor * }\n  if$\n  \" \\cite{\" * crossref * \"}\" *\n}\n\nFUNCTION {article}\n{ output.bibitem\n  format.authors \"author\" output.check\n  new.block\n  crossref missing$\n    { journal field.or.null\n      format.vol.num.pages \n      format.date empty$\n\t'skip$\n\t{ duplicate$ empty$\n\t    { pop$ format.date paren }\n            { \" \" * format.date paren * }\n\t  if$\n\t}\n      if$\n      output\n    }\n    { format.article.crossref output.nonnull\n      format.pages output\n    }\n  if$\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {book}\n{ output.bibitem\n  author empty$\n    { format.editors \"author and editor\" output.check }\n    { format.authors output.nonnull\n      crossref missing$\n\t{ \"author and editor\" editor either.or.check }\n\t'skip$\n      if$\n    }\n  if$\n  new.block\n  format.btitle \"title\" output.check\n  crossref missing$\n    { format.bvolume output\n      new.block\n      format.number.series output\n      new.sentence\n      publisher \"publisher\" output.check\n      address output\n    }\n    { new.block\n      format.book.crossref output.nonnull\n    }\n  if$\n  format.edition output\n  format.date \"year\" output.check\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {booklet}\n{ output.bibitem\n  format.authors output\n  new.block\n  format.title \"title\" output.check\n  howpublished address new.block.checkb\n  howpublished output\n  address output\n  format.date output\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {inbook}\n{ output.bibitem\n  author empty$\n    { format.editors \"author and editor\" output.check }\n    { format.authors output.nonnull\n      crossref missing$\n\t{ \"author and editor\" editor either.or.check }\n\t'skip$\n      if$\n    }\n  if$\n  new.block\n  format.btitle \"title\" output.check\n  crossref missing$\n    { format.bvolume output\n      format.chapter.pages \"chapter and pages\" output.check\n      new.block\n      format.number.series output\n      new.sentence\n      publisher \"publisher\" output.check\n      address output\n    }\n    { format.chapter.pages \"chapter and pages\" output.check\n      new.block\n      format.book.crossref output.nonnull\n    }\n  if$\n  format.edition output\n  format.date \"year\" output.check\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {incollection}\n{ output.bibitem\n  format.authors \"author\" output.check\n  new.block\n  format.title \"title\" output.check\n  new.block\n  crossref missing$\n    { format.in.ed.booktitle \"booktitle\" output.check\n      format.bvolume output\n      format.number.series output\n      format.chapter.pages output\n      new.sentence\n      publisher \"publisher\" output.check\n      address output\n      format.edition output\n      format.date \"year\" output.check\n    }\n    { format.incoll.inproc.crossref output.nonnull\n      format.chapter.pages output\n    }\n  if$\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {inproceedings}\n{ output.bibitem\n  format.authors \"author\" output.check\n  new.block\n  format.title \"title\" output.check\n  new.block\n  crossref missing$\n    { format.in.ed.booktitle \"booktitle\" output.check\n      format.bvolume output\n      format.number.series output\n      format.pages output\n      address empty$\n\t{ organization publisher new.sentence.checkb\n\t  organization output\n\t  publisher output\n\t  format.date \"year\" output.check\n\t}\n\t{ address output.nonnull\n\t  format.date \"year\" output.check\n\t  new.sentence\n\t  organization output\n\t  publisher output\n\t}\n      if$\n    }\n    { format.incoll.inproc.crossref output.nonnull\n      format.pages output\n    }\n  if$\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {conference} { inproceedings }\n\nFUNCTION {manual}\n{ output.bibitem\n  author empty$\n    { organization empty$\n\t'skip$\n\t{ organization output.nonnull\n\t  address output\n\t}\n      if$\n    }\n    { format.authors output.nonnull }\n  if$\n  new.block\n  format.btitle \"title\" output.check\n  author empty$\n    { organization empty$\n\t{ address new.block.checka\n\t  address output\n\t}\n\t'skip$\n      if$\n    }\n    { organization address new.block.checkb\n      organization output\n      address output\n    }\n  if$\n  format.edition output\n  format.date output\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {mastersthesis}\n{ output.bibitem\n  format.authors \"author\" output.check\n  new.block\n  format.title \"title\" output.check\n  new.block\n  \"Master's thesis\" format.thesis.type output.nonnull\n  school \"school\" output.check\n  address output\n  format.date \"year\" output.check\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {misc}\n{ output.bibitem\n  format.authors output\n  title howpublished new.block.checkb\n  format.title output\n  howpublished new.block.checka\n  howpublished output\n  format.date output\n  new.block\n  note output\n  fin.entry\n  empty.misc.check\n}\n\nFUNCTION {phdthesis}\n{ output.bibitem\n  format.authors \"author\" output.check\n  new.block\n  format.btitle \"title\" output.check\n  new.block\n  \"PhD thesis\" format.thesis.type output.nonnull\n  school \"school\" output.check\n  address output\n  format.date \"year\" output.check\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {proceedings}\n{ output.bibitem\n  editor empty$\n    { organization output }\n    { format.editors output.nonnull }\n  if$\n  new.block\n  format.btitle \"title\" output.check\n  format.bvolume output\n  format.number.series output\n  address empty$\n    { editor empty$\n\t{ publisher new.sentence.checka }\n\t{ organization publisher new.sentence.checkb\n\t  organization output\n\t}\n      if$\n      publisher output\n      format.date \"year\" output.check\n    }\n    { address output.nonnull\n      format.date \"year\" output.check\n      new.sentence\n      editor empty$\n\t'skip$\n\t{ organization output }\n      if$\n      publisher output\n    }\n  if$\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {techreport}\n{ output.bibitem\n  format.authors \"author\" output.check\n  new.block\n  format.title \"title\" output.check\n  new.block\n  format.tr.number output.nonnull\n  institution \"institution\" output.check\n  address output\n  format.date \"year\" output.check\n  new.block\n  note output\n  fin.entry\n}\n\nFUNCTION {unpublished}\n{ output.bibitem\n  format.authors \"author\" output.check\n  new.block\n  format.title \"title\" output.check\n  new.block\n  note \"note\" output.check\n  format.date output\n  fin.entry\n}\n\nFUNCTION {default.type} { misc }\n\nMACRO {jan} {\"Jan.\"}\n\nMACRO {feb} {\"Feb.\"}\n\nMACRO {mar} {\"Mar.\"}\n\nMACRO {apr} {\"Apr.\"}\n\nMACRO {may} {\"May\"}\n\nMACRO {jun} {\"June\"}\n\nMACRO {jul} {\"July\"}\n\nMACRO {aug} {\"Aug.\"}\n\nMACRO {sep} {\"Sept.\"}\n\nMACRO {oct} {\"Oct.\"}\n\nMACRO {nov} {\"Nov.\"}\n\nMACRO {dec} {\"Dec.\"}\n\nMACRO {acmcs} {\"ACM Comput. Surv.\"}\n\nMACRO {acta} {\"Acta Inf.\"}\n\nMACRO {cacm} {\"Commun. ACM\"}\n\nMACRO {ibmjrd} {\"IBM J. Res. Dev.\"}\n\nMACRO {ibmsj} {\"IBM Syst.~J.\"}\n\nMACRO {ieeese} {\"IEEE Trans. Softw. Eng.\"}\n\nMACRO {ieeetc} {\"IEEE Trans. Comput.\"}\n\nMACRO {ieeetcad}\n {\"IEEE Trans. Comput.-Aided Design Integrated Circuits\"}\n\nMACRO {ipl} {\"Inf. Process. Lett.\"}\n\nMACRO {jacm} {\"J.~ACM\"}\n\nMACRO {jcss} {\"J.~Comput. Syst. Sci.\"}\n\nMACRO {scp} {\"Sci. Comput. Programming\"}\n\nMACRO {sicomp} {\"SIAM J. Comput.\"}\n\nMACRO {tocs} {\"ACM Trans. Comput. Syst.\"}\n\nMACRO {tods} {\"ACM Trans. Database Syst.\"}\n\nMACRO {tog} {\"ACM Trans. Gr.\"}\n\nMACRO {toms} {\"ACM Trans. Math. Softw.\"}\n\nMACRO {toois} {\"ACM Trans. Office Inf. Syst.\"}\n\nMACRO {toplas} {\"ACM Trans. Prog. Lang. Syst.\"}\n\nMACRO {tcs} {\"Theoretical Comput. Sci.\"}\n\nMACRO {advp} {\"Adv. Phys.\"}\nMACRO {ajp} {\"Am. J. Phys.\"}\nMACRO {ao} {\"Appl. Opt.\"}\nMACRO {apl} {\"Appl. Phys. Lett.\"}\nMACRO {apj} {\"Astrophys. J.\"}\nMACRO {baps} {\"Bull. Am. Phys. Soc.\"}\nMACRO {cpc} {\"Computer Phys. Comm.\"}\nMACRO {cppcf} {\"Comments Plasma Phys. Controlled Fusion\"}\nMACRO {fed} {\"Fusion Eng. Design\"}\nMACRO {ft} {\"Fusion Tech.\"}\nMACRO {ieeens} {\"IEEE Trans. Nucl. Sci.\"}\nMACRO {ieeeps} {\"IEEE Trans. Plasma Sci.\"}\nMACRO {ijimw} {\"Int. J. Infrared Millimeter Waves\"}\nMACRO {ip} {\"Infrared Phys.\"}\nMACRO {jap} {\"J. Appl. Phys.\"}\nMACRO {jcp} {\"J. Comput. Phys.\"}\nMACRO {jetp} {\"Sov. Phys.-JETP\"}\nMACRO {jfe} {\"J. Fusion Energy\"}\nMACRO {jfm} {\"J. Fluid Mech.\"}\nMACRO {jgr} {\"J. Geophys. Res.\"}\nMACRO {jmp} {\"J. Math. Phys.\"}\nMACRO {jne} {\"J. Nucl. Energy\"}\nMACRO {jnec} {\"J. Nucl. Energy, Part C\"}\nMACRO {jnm} {\"J. Nucl. Mater.\"}\nMACRO {josa} {\"J. Opt. Soc. Am.\"}\nMACRO {jpp} {\"J. Plasma Phys.\"}\nMACRO {jpsj} {\"J. Phys. Soc. Jpn\"}\nMACRO {jvst} {\"J. Vac. Sci. Technol.\"}\nMACRO {nedf} {\"Nucl. Eng. Design/Fusion\"}\nMACRO {nf} {\"Nucl. Fusion\"}\nMACRO {nim} {\"Nucl. Instrum. Methods\"}\nMACRO {nimpr} {\"Nucl. Instrum. Methods Phys. Research\"}\nMACRO {nt/f} {\"Nucl. Tech./Fusion\"}\nMACRO {pf} {\"Phys. Fluids\"}\nMACRO {pfa} {\"Phys. Fluids A\"}\nMACRO {pfb} {\"Phys. Fluids B\"}\nMACRO {pl} {\"Phys. Lett.\"}\nMACRO {pla} {\"Phys. Lett. A\"}\nMACRO {pnas} {\"Proc. Nat. Acad. Sci. USA\"}\nMACRO {pp} {\"Plasma Phys.\"}\nMACRO {ppcf} {\"Plasma Phys. Controlled Fusion\"}\nMACRO {prl} {\"Phys. Rev. Lett.\"}\nMACRO {pr} {\"Phys. Rev.\"}\nMACRO {pra} {\"Phys. Rev. A\"}\nMACRO {ps} {\"Physica Scripta\"}\nMACRO {rmp} {\"Rev. Mod. Phys.\"}\nMACRO {rsi} {\"Rev. Sci. Instrum.\"}\nMACRO {sjpp} {\"Sov. J. Plasma Phys.\"}\nMACRO {spd} {\"Sov. Phys.-Dokl.\"}\nMACRO {sptp} {\"Sov. Phys.-Tech. Phys.\"}\nMACRO {spu} {\"Sov. Phys.-Usp.\"}\n\nREAD\n\nSTRINGS { longest.label }\n\nINTEGERS { number.label longest.label.width }\n\nFUNCTION {initialize.longest.label}\n{ \"\" 'longest.label :=\n  #1 'number.label :=\n  #0 'longest.label.width :=\n}\n\nFUNCTION {longest.label.pass}\n{ number.label int.to.str$ 'label :=\n  number.label #1 + 'number.label :=\n  label width$ longest.label.width >\n    { label 'longest.label :=\n      label width$ 'longest.label.width :=\n    }\n    'skip$\n  if$\n}\n\nEXECUTE {initialize.longest.label}\n\nITERATE {longest.label.pass}\n\nFUNCTION {begin.bib}\n{ preamble$ empty$\n    'skip$\n    { preamble$ write$ newline$ }\n  if$\n  \"\\begin{thebibliography}{\"  longest.label  * \"}\" * write$ newline$\n}\n\nEXECUTE {begin.bib}\n\nEXECUTE {init.state.consts}\n\nITERATE {call.type$}\n\nFUNCTION {end.bib}\n{ newline$\n  \"\\end{thebibliography}\" write$ newline$\n}\n\nEXECUTE {end.bib}\n"
  },
  {
    "path": "doc/Latex/apps/nemo_mp2/aip.sty",
    "content": "% AIP (style option to ARTICLE) for American Institute of Physics journals\n% AIP DOCUMENT SUBSTYLE -- released 17 January 1989\n% Written by Charles Karney (Karney@ccc.nmfecc.gov).\n\n% This document style is designed for manuscripts to be submitted to\n% one of the journals published by the Americal Institute of Physics.\n% To use this give AIP as an optional argument to \\documentstyle.  The\n% main style should be ARTICLE.  E.g.,\n%     \\documentstyle[12pt,aip]{article}\n% This provides\n\n% (1) Section numbering for AIP journals (e.g., II.B.2.)\n\n% (2) Superscript reference numbers in citation and bibliography.  You\n% should put the references in the logically correct place, e.g., \"...  as\n% is given by Landau \\cite{landau}.  Next sentence ...\"  \\cite takes care\n% of removing the preceding spaces and putting the reference after the\n% punctuation (e.g, \"...  Landau.$^7$ ...\").\n\n% (3) Three or more consecutive reference numbers are represented as a\n% range.  Thus 1,3,4,5,6,8,9 is printed as 1,3--6,8,9.  No sorting is\n% performed; i.e., 1,3,2 is printed as such.\n\n% (4) \\citenum and \\citea give you more control over the appearance of\n% the citations.  \\citenum emits the plain citation number without\n% ornament as in \"...  as shown in Ref.~\\citenum{foo}.\".  \\citea puts it's\n% argument into the ornamentation for citations.  Thus \\cite{foo} is\n% equivalent to \\citea{\\citenum{foo}}.\n\n% (5) The \\maketitle command puts the \"date\" at the top.  Typical usage is\n%     \\begin{document}\n%     \\date{PPPL--2128 (1984)}\n%     \\title{Efficiency of Current Drive by Fast Waves}\n%     \\author{Charles F. F. Karney and Nathaniel J. Fisch\\\\\n%     Plasma Physics Laboratory, Princeton University\\\\Princeton, NJ 08543}\n%     \\maketitle\n%     \\begin{abstract}\n%     etc.\n\n% (6) Abstract appears full size.  Abstract is labeled ``Abstract'' unless\n% the ``abstract*'' environment is used.  Section I begins on a new page.\n\n% (7) First paragraph of sections, etc., is normally indented.\n\n% (8) In appendices equations are numbered as B2 etc.\n\n% (9) Appendix appears in the section title for appendices.  A period is\n% put after the section or appendix number.  E.g., I. Introduction.\n\n% (10) The ``thefigures'' and ``thetables'' environments are defined\n% analogously to ``thebibliography''.  This allows you the put the figure\n% captions and tables at the end of the document.  The entries are\n% preceded by \\figitem{<label>} and \\tableitem{<label>} respectively.\n% (This doesn't interfer with LaTeX's figure and table environments for\n% inserting figures within the text.)  ``thefigures'' is used as follows:\n%     \\begin{thefigures}{99}\n%     \\figitem{coords}  The coordinate system used in this work.\n%     etc.\n%     \\end{thefigures}\n% Figures and tables are refered to by the \\ref mechanism.  E.g.,\n% Fig.~\\ref{coords}.\n% The starred versions of these environments, e.g., ``thefigures*'' causes\n% the heading to appear in the singular, i.e., ``Figure'' instead of\n% ``Figures''.\n\n% (11) The first appendix, the references, figure captions, and tables\n% all start on on new pages.\n\n% (12) \\appendix* causes the appendices to be unnumbered.  This is normally\n% only sensible if you have just one appendix.  It is labeled ``Appendix.''\n% instead of ``Appendix A.''  The equation numbered are still labeled A3 etc.\n\n\\typeout{Document Substyle 'AIP'.  Released 17 January 1989}\n\n\\def\\thesection       {\\Roman{section}}\n\\def\\thesubsection    {\\Alph{subsection}}\n\\def\\thesubsubsection {\\arabic{subsubsection}}\n\n\\def\\thebibliography#1{\\par\\clearpage\\section*{References\\@mkboth\n  {REFERENCES}{REFERENCES}}\\list\n  {$\\m@th^{\\arabic{enumi}}$}{\\settowidth\\labelwidth{$\\m@th^{#1}$}%\n    \\labelsep0pt\\leftmargin\\parindent\n    \\itemindent-\\leftmargin\\advance\\itemindent\\labelwidth\n    \\usecounter{enumi}}\n    \\def\\newblock{\\hskip .11em plus .33em minus -.07em}\n    \\sloppy\n    \\sfcode`\\.=1000\\relax}\n\n% Superscript citations -- skip optional arg to \\cite\n% Move citation after period and comma.\n\\def\\@cite#1#2{\\unskip\\nobreak\\relax\n    \\def\\@tempa{$\\m@th^{\\hbox{\\the\\scriptfont0 #1}}$}%\n    \\futurelet\\@tempc\\@citexx}\n\\def\\@citexx{\\ifx.\\@tempc\\let\\@tempd=\\@citepunct\\else\n    \\ifx,\\@tempc\\let\\@tempd=\\@citepunct\\else\n    \\let\\@tempd=\\@tempa\\fi\\fi\\@tempd}\n\\def\\@citepunct{\\@tempc\\edef\\@sf{\\spacefactor=\\the\\spacefactor\\relax}\\@tempa\n    \\@sf\\@gobble}\n\n% \\citenum emits the plain citation number without ornament\n% \\citea puts it's argument into the ornamentation for citations\n% thus \\cite{foo} is equivalent to \\citea{\\citenum{foo}}\n\\def\\citenum#1{{\\def\\@cite##1##2{##1}\\cite{#1}}}\n\\def\\citea#1{\\@cite{#1}{}}\n\n% Collapse citation numbers to ranges.  Non-numeric and undefined labels\n% are handled.  No sorting is done.  E.g., 1,3,2,3,4,5,foo,1,2,3,?,4,5\n% gives 1,3,2-5,foo,1-3,?,4,5\n\\newcount\\@tempcntc\n\\def\\@citex[#1]#2{\\if@filesw\\immediate\\write\\@auxout{\\string\\citation{#2}}\\fi\n  \\@tempcnta\\z@\\@tempcntb\\m@ne\\def\\@citea{}\\@cite{\\@for\\@citeb:=#2\\do\n    {\\@ifundefined\n       {b@\\@citeb}{\\@citeo\\@tempcntb\\m@ne\\@citea\\def\\@citea{,}{\\bf ?}\\@warning\n       {Citation `\\@citeb' on page \\thepage \\space undefined}}%\n    {\\setbox\\z@\\hbox{\\global\\@tempcntc0\\csname b@\\@citeb\\endcsname\\relax}%\n     \\ifnum\\@tempcntc=\\z@ \\@citeo\\@tempcntb\\m@ne\n       \\@citea\\def\\@citea{,}\\hbox{\\csname b@\\@citeb\\endcsname}%\n     \\else\n      \\advance\\@tempcntb\\@ne\n      \\ifnum\\@tempcntb=\\@tempcntc\n      \\else\\advance\\@tempcntb\\m@ne\\@citeo\n      \\@tempcnta\\@tempcntc\\@tempcntb\\@tempcntc\\fi\\fi}}\\@citeo}{#1}}\n\\def\\@citeo{\\ifnum\\@tempcnta>\\@tempcntb\\else\\@citea\\def\\@citea{,}%\n  \\ifnum\\@tempcnta=\\@tempcntb\\the\\@tempcnta\\else\n   {\\advance\\@tempcnta\\@ne\\ifnum\\@tempcnta=\\@tempcntb \\else \\def\\@citea{--}\\fi\n    \\advance\\@tempcnta\\m@ne\\the\\@tempcnta\\@citea\\the\\@tempcntb}\\fi\\fi}\n\n% Title page\n\\def\\@maketitle{\\newpage\n \\null\n \\vskip 1em plus 2em minus 1em     % Vertical space before date.\n \\ifx\\@date\\@empty\\else\n   \\begin{flushright}\n    {\\normalsize \\@date}           % Date set in \\large size.\n   \\end{flushright}\n   \\vskip 2em plus 2em minus 1em   % Vertical space above title.\n \\fi\n \\begin{center}\n  {\\Large\\bf \\@title \\par}     % Title set in \\Large size. \n  \\vskip 1.5em plus 0em minus .5em  % Vertical space after title.\n  {\\large                        % each author set in \\large, in a\n   \\lineskip .5em plus 0em minus .3em   % tabular environment\n   \\begin{tabular}[t]{c}\\@author \n   \\end{tabular}\\par}\n\\end{center}\n \\par\n \\vskip 1.5em plus .5em minus .5em}     % Vertical space after author.\n\n\\newif\\if@starvariant \\@starvariantfalse\n\n\\def\\abstract{\\if@starvariant\\else\\section*{Abstract}\\fi}\n\\def\\endabstract{\\par\\clearpage}\n\n\\@namedef{abstract*}{\\@starvarianttrue\\abstract}\n\\@namedef{endabstract*}{\\endabstract}\n\n\\parskip 1.5pt plus 1.5pt          % Extra vertical space between paragraphs.\n\\tabcolsep 12pt\t\t\t   % Double column separation in tables\n\n\\def\\section{\\@startsection {section}{1}{\\z@}{3.5ex plus 1ex minus \n    .2ex}{2.3ex plus .2ex}{\\large\\bf}}\n\\def\\subsection{\\@startsection{subsection}{2}{\\z@}{3.25ex plus 1ex minus \n   .2ex}{1.5ex plus .2ex}{\\large\\bf}}\n\\def\\subsubsection{\\@startsection{subsubsection}{3}{\\z@}{3.25ex plus \n1ex minus .2ex}{1.5ex plus .2ex}{\\normalsize\\bf}}\n\n\\newif\\if@numbersec \\@numbersectrue\n\\def\\appendix{\\par\\clearpage\n  \\setcounter{section}{0}\n  \\setcounter{subsection}{0}\n  \\@addtoreset{equation}{section}\n  \\def\\theequation{\\thesection\\arabic{equation}}\n  \\def\\thesection{\\Alph{section}}\n  \\def\\thesubsection{\\arabic{subsection}}\n  \\@ifstar{\\def\\@sectname{Appendix}\\@numbersecfalse}\n          {\\def\\@sectname{Appendix~}\\@numbersectrue}}\n\n% Figures\n\\def\\thefigures#1{\\par\\clearpage\n \\if@starvariant\\section*{Figure\\@mkboth\n    {FIGURE}{FIGURE}}\\else\n  \\section*{Figures\\@mkboth\n    {FIGURES}{FIGURES}}\\fi\n \\list\n  {FIG.~\\arabic{enumi}.}{\\labelwidth\\parindent\\advance\\labelwidth -\\labelsep\n      \\leftmargin\\parindent\\usecounter{enumi}}}\n\\def\\figitem#1{\\item\\label{#1}}\n\\let\\endthefigures=\\endlist\n\n\\@namedef{thefigures*}{\\@starvarianttrue\\thefigures}\n\\@namedef{endthefigures*}{\\endthefigures}\n\n% Tables\n\\def\\thetables#1{\\par\\clearpage\n \\if@starvariant\\section*{Table\\@mkboth\n    {TABLE}{TABLE}}\\else\n  \\section*{Tables\\@mkboth\n    {TABLES}{TABLES}}\\fi\n \\list\n  {TABLE~\\Roman{enumi}.}{\\labelwidth-\\labelsep\n      \\leftmargin0pt\\usecounter{enumi}%\n      \\def\\theenumi{\\Roman{enumi}}}}\n\\def\\tableitem#1{\\item\\label{#1}}\n\\let\\endthetables=\\endlist\n\n\\@namedef{thetables*}{\\@starvarianttrue\\thetables}\n\\@namedef{endthetables*}{\\endthetables}\n\n% Put period after section number and allow for APPENDIX prefix.\n\\def\\@sect#1#2#3#4#5#6[#7]#8{\\ifnum #2>\\c@secnumdepth\n     \\def\\@svsec{}\\else \n     \\refstepcounter{#1}\\edef\\@svsec{\\ifnum #2=1 \\@sectname\n         \\if@numbersec\\csname the#1\\endcsname\\fi.\\else\n         \\csname the#1\\endcsname.\\fi\n\t\\hskip 1em }\\fi\n     \\@tempskipa #5\\relax\n      \\ifdim \\@tempskipa>\\z@ \n        \\begingroup #6\\relax\n          \\@hangfrom{\\hskip #3\\relax\\@svsec}{\\interlinepenalty \\@M #8\\par}\n        \\endgroup\n       \\csname #1mark\\endcsname{#7}\\addcontentsline\n         {toc}{#1}{\\ifnum #2>\\c@secnumdepth \\else\n                      \\protect\\numberline{\\csname the#1\\endcsname}\\fi\n                    #7}\\else\n        \\def\\@svsechd{#6\\hskip #3\\@svsec #8\\csname #1mark\\endcsname\n                      {#7}\\addcontentsline\n                           {toc}{#1}{\\ifnum #2>\\c@secnumdepth \\else\n                             \\protect\\numberline{\\csname the#1\\endcsname}\\fi\n                       #7}}\\fi\n     \\@xsect{#5}}\n\n\\def\\@sectname{}\n\n\\endinput\n"
  },
  {
    "path": "doc/Latex/apps/nemo_mp2/manual.tex",
    "content": "\\documentclass[10pt]{article}\n\n\\usepackage{amsmath}\n\\usepackage{amssymb}\n\n\\title{Manual for nemo and mp2 programs in MADNESS}\n\n\\begin{document}\n\n\\maketitle{}\n\n\\section{Intro}\nThe nemo program computes molecular HF and DFT energies and gradients using a nuclear correlation factor (ncf) as well as vibrational frequencies.\\cite{Bischoff:2014du} \nIn contrast, the moldft program does the same without using an ncf.\n\nThe mp2 program computes the MP2 energies on top of either the nemo or the moldft HF reference wave function.\\cite{Bischoff:2014ky,Bischoff:2013cx}\n\n\\section{Input sections}\n\\subsection{nemo}\nThe nemo program uses the same input parameters as moldft, with only a few restrictions and extensions.\nIn addition to the regular moldft input parameters there are the following options (all are optional)\n\\begin{description}\n\\item[nuclear\\_corrfac:]\t[\\textit{slater x, gaussslater, polynomialN, none}]\\\\\nwith $x>1$ recommended $x=2.0$, and  $3<N<11$, recommended $N=8$. Default is \"{}none\"{}.\n\\item[hessian] if present computes the hessian matrix and vibrational frequencies\n\\item[read\\_cphf] if present read in the solutions to the CPHF equations from a prior hessian calculation\n\\end{description}\nThere is no open-shell/spin-polarized version of nemo available.\n\nNote there is a inconsistency with the \\texttt{eprec} keyword in the geometry section. \nBecause there is no singular potential in the nemo calculation, the \\texttt{eprec} keyword is used to smoothen the derivatives of the nuclear correlation factor (It is a step function).\nTypically a factor of 1e-3 to 1.e-4 will give you micro-Hartree accuracy with respect to the energy of the (regularized) nuclear potential, and about 1 cm-1 accuracy with respect to vibrational frequencies.\n\n\\subsection{mp2}\nOn top of the HF reference wave function (from nemo or moldft) a MP2 calculation may be performed. \nThe relevant input is contained in the mp2 input section with the following keywords:\n\\begin{description}\n\\item[econv] \\textit{val} energy convergence threshold for the correlation energy. Recommended is 1.e-3 or 1.e-4.\n\\item[dconv]  \\textit{val}  [optional] residual for the convergence of the MP1 wave function. Default is sqrt(econv)*0.1;\n\\item[freeze]  \\textit{val}  number of frozen core electrons. Default is 0.\n\\item[maxsub]  \\textit{val}  size of the subspace of the KAIN solver for the MP1 wave function. Default is 3.\n\\end{description}\nOther options like k, L, or the nuclear correlation factor are taken from the reference input section.\nFor 6D calculations the polynomial order k must be chosen small to keep calculations reasonably fast, i.e. k=5,6. \nThe \\texttt{econv} keyword of the 3D reference will be overriden by mp2 to be 100 times tighter than the 6D correlation.\nLocal orbitals may be used.\n\n\\section{Example input}\ndft\\\\\n  xc       hf\\\\\n  canon\\\\\n  k        5\\\\\n  econv    1.00e-05\\\\\n  dconv    1.00e-04\\\\\n  maxiter  20\\\\\n  L        20\\\\\n  nuclear\\_corrfac  slater  2.0\\\\\nend\\\\\n\\\\\nmp2\\\\\n  econv    1.00e-03\\\\\n  dconv    3.16e-03\\\\\n  maxsub   3\\\\\n  freeze   1\\\\\nend\\\\\n\\\\\ngeometry\\\\\n  eprec 1.e-3\\\\\n  O  0.0    0.0 0.0\\\\\n  H  1.4375 0.0 1.15\\\\\n  H -1.4375 0.0 1.15\\\\\nend\\\\\n\n\\bibliographystyle{aip}\n\\bibliography{references}\n\n\n\\end{document}\n\n"
  },
  {
    "path": "doc/Latex/apps/nemo_mp2/references.bib",
    "content": "%% Created using Papers on Tue, 12 Jul 2016.\n%% http://papersapp.com/papers/\n\n@article{Bischoff:2013cx,\nauthor = {Bischoff, Florian Andreas and Valeev, Edward F},\ntitle = {{Computing molecular correlation energies with guaranteed precision}},\njournal = {J. Chem. Phys.},\nyear = {2013},\nvolume = {139},\nnumber = {11},\npages = {114106}\n}\n\n@article{Bischoff:2014ky,\nauthor = {Bischoff, Florian Andreas},\ntitle = {{Regularizing the molecular potential in electronic structure calculations. II. Many-body methods}},\njournal = {J. Chem. Phys.},\nyear = {2014},\nvolume = {141},\nnumber = {18},\npages = {184106},\nmonth = nov\n}\n\n@article{Bischoff:2014du,\nauthor = {Bischoff, Florian Andreas},\ntitle = {{Regularizing the molecular potential in electronic structure calculations. I. SCF methods}},\njournal = {J. Chem. Phys.},\nyear = {2014},\nvolume = {141},\nnumber = {18},\npages = {184105},\nmonth = nov\n}\n\n"
  },
  {
    "path": "doc/Latex/implementation.tex",
    "content": "\\documentclass[letterpaper]{book}\n%\\documentclass[letterpaper]{article}\n\\usepackage{hyperref}\n\\usepackage{amsmath}\n\\usepackage{graphics}\n\n%%\\hypersetup{pdftex, colorlinks=true, linkcolor=blue, citecolor=blue, filecolor=blue, urlcolor=blue, pdftitle=, pdfauthor=Robert Harrison, pdfsubject=, pdfkeywords=}\n%%% Outline numbering\n%%\\setcounter{secnumdepth}{3}\n%%\\renewcommand\\thesection{\\arabic{section}}\n%%\\renewcommand\\thesubsection{\\arabic{section}.\\arabic{subsection}}\n%%\\renewcommand\\thesubsubsection{\\arabic{section}.\\arabic{subsection}.\\arabic{subsubsection}}\n\n%%% Page layout (geometry)\n%%\\setlength\\voffset{-1in}\n%%\\setlength\\hoffset{-1in}\n%%\\setlength\\topmargin{0.7874in}\n%%\\setlength\\oddsidemargin{0.7874in}\n%%\\setlength\\textheight{8.825199in}\n%%\\setlength\\textwidth{6.9251995in}\n%%\\setlength\\footskip{0.6in}\n%%\\setlength\\headheight{0cm}\n%%\\setlength\\headsep{0cm}\n%%% Footnote rule\n%%\\setlength{\\skip\\footins}{0.0469in}\n%%\\renewcommand\\footnoterule{\\vspace*{-0.0071in}\\setlength\\leftskip{0pt}\\setlength\\rightskip{0pt plus 1fil}\\noindent\\textcolor{black}{\\rule{0.25\\columnwidth}{0.0071in}}\\vspace*{0.0398in}}\n\n% Paragraph formatting\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{2ex plus 0.5ex minus 0.2ex}\n\n\\begin{document}\n\n% Title Page\n\\title{MADNESS Implementation Notes}\n\\date{Last Modification: 12/14/2009}\n\\maketitle\n\n% Copyright Page\n\\pagestyle{empty}\n\\null\\vfill\n\\noindent\nThis file is part of MADNESS.\n\n\nCopyright (C) 2007, 2010 Oak Ridge National Laboratory\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public\nLicense as published by the Free Software Foundation; either version 2 of the License, or(at your option) any later\nversion.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied\nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free\nSoftware Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\nFor more information please contact:\n\\begin{quote}\t\t\t\t\t\t\t\nRobert J. Harrison \t\t\t\t\\\\\nOak Ridge National Laboratory \t\\\\\nOne Bethel Valley Road \t\t\t\\\\\nP.O. Box 2008, MS-6367\t\t\t\\\\\nOak Ridge, TN 37831\t\t\t\t\\\\\n\t\t\t\t\t\t\t\t\\\\\nemail: harrisonrj@ornl.gov \t\t\\\\\ntel: 865-241-3937\t\t\t\t\\\\\nfax: 865-572-0680\t\n\\end{quote}\t\t\n\\newpage\n\n\n% Table of Contents Pages\n\\clearpage\n\\setcounter{page}{1}\n\\pagenumbering{roman}\n\n\\setcounter{tocdepth}{10}\n\\renewcommand\\contentsname{Table of Contents}\n\\tableofcontents\n\n\n\\clearpage\n\\setcounter{page}{1}\n\\pagenumbering{arabic}\n\n\\chapter{Implementation Notes}\n\nThis document provides reference information concerning the mathematics, numerics, algorithms, and design of the\nmultiresolution capabilities of MADNESS. The information herein will be useful to both users of MADNESS and\nimplementers of new capabilities within MADNESS.\n\n\\section{ABGV}\nAnd references therein: that from which (nearly) all else follows.\n\nB. Alpert, G. Beylkin, D. Gines, L. Vozovoi, \\href{http://math.nist.gov/~BAlpert/mwpde.pdf}{Adaptive Solution of Partial\nDifferential Equations in Multiwavelet Bases,} \\textit{Journal of Computational Physics }\\textbf{182}, 149-190 (2002). \n\n\\section{Legendre scaling functions and multiwavelets}\n\\subsection{Scaling functions}\nThe mother Legendre scaling functions  $i=0,\\ldots ,k-1$ in 1D are defined as\n\n\\begin{equation}\n\\phi (x)=\\left\\{\\begin{matrix}\\sqrt{2i+1}P(2x-1)&0\\le x\\le 1\\\\0&\\mathrm{\\mathit{otherwise}}\\end{matrix}\\right.\n\\end{equation}\nThese are orthonormal on  $[0,1]$. The scaling functions scaled to level  $n=0,1,\\ldots $ and translated to box \n$l=0,\\ldots ,2^{n}-1$ span the space  $V_{n}^{k}$ and are defined by\n\n\\begin{equation}\\label{seq:refText1}\n\\phi _{il}^{n}(x)=2^{n/2}\\phi _{i}(2^{n}x-1)\n\\end{equation}\nThese are orthonormal on  $[2^{-n}l,2^{-n}(l+1)]$. The scaling functions by construction satisfy the following\nproperties:\n\n\\begin{itemize}\n\\item In the limit of either large \\textit{k }or large \\textit{n }the closure of  $V_{n}^{k}$ is a complete basis for \n$L_{2}[0,1]$.\n\\item Containment forming a ladder of spaces  $V_{0}^{k}\\subset V_{1}^{k}\\subset V_{2}^{k}\\subset \\cdots $.\n\\item Translation and dilation, c.f., (2).\n\\item Orthonormality within a scale  $\\int _{-\\infty }^{\\infty }{\\phi _{il}^{n}(x)\\phi _{jm}^{n}(x)\\mathit{dx}}=\\delta\n_{ij}\\delta _{lm}$.\n\\end{itemize}\nThe two-scale relationship describes how to expand exactly a polynomial at level \\textit{n }in terms of the polynomials\nat level \\textit{n+1.}\n\n\\begin{equation}\\label{seq:refText2}\n\\begin{matrix}\\hfill \\phi _{i}(x)&\\text{=}&\\sqrt{2}\\sum _{j=0}^{k-1}\\left(h_{ij}^{(0)}\\phi _{j}(2x)+h_{ij}^{(1)}\\phi\n_{j}(2x-1)\\right)\\\\\\phi _{il}^{n}(x)&\\text{=}&\\sum _{j=0}^{k-1}\\left(h_{ij}^{(0)}\\phi _{j2l}^{n+1}(x)+h_{ij}^{(1)}\\phi\n_{j2l+1}^{n+1}(x)\\right)\\hfill\\null \\end{matrix}\n\\end{equation}\nThe coefficients  $H^{(0)}$ and  $H^{(1)}$ are straightforwardly computed by left projection of the first equation in\n(3) with the fine-scale polynomials.\n\n\\subsection[Telescoping series]{Telescoping series}\nThe main point of multiresolution analysis is to separate the behavior of functions and operators at different length\nscales. Central to this is the telescoping series which \\textit{exactly }represents the basis at level \\textit{n }(the\nfinest scale) in terms of the basis at level zero (the coarsest scale) plus corrections at successively finer scales.\n\n\\begin{equation}\\label{seq:refText3}\nV_{n}^{k}=V_{0}^{k}+\\left(V_{1}^{k}-V_{0}^{k}\\right)+\\cdots +\\left(V_{n}^{k}-V_{n-1}^{k}\\right)\n\\end{equation}\nIf function is sufficiently smooth in some region of space to be represented at the desired precision at some level,\nthen the differences at finer scales will be negligibly small.\n\n\\subsection{Multi-wavelets}\nThe space of wavelets at level \\textit{n } $W_{n}^{k}$ is defined as the orthogonal complement of the scaling functions\n(polynomials) at level \\textit{n+1} to those at level \\textit{n. \\ }I.e., $V_{n+1}^{k}=V_{n}^{k}\\oplus W_{n}^{k}$.\nThus, by definition the functions in  $W_{n}^{k}$ are orthogonal to the functions in  $V_{n}^{k}$. \\ The wavelets at\nlevel \\textit{n }are constructed by expanding them in the polynomials at level \\textit{n+1}\n\n\\begin{equation}\\label{seq:refText4}\n\\begin{matrix}\\psi _{i}(x)&\\text{=}&\\sqrt{2}\\sum _{j=0}^{k-1}\\left(g_{ij}^{(0)}\\phi _{j}(2x)+g_{ij}^{(1)}\\phi\n_{j}(2x-1)\\right)\\\\\\psi _{il}^{n}(x)&\\text{=}&\\sum _{j=0}^{k-1}\\left(g_{ij}^{(0)}\\phi _{j2l}^{n+1}(x)+g_{ij}^{(1)}\\phi\n_{j2l+1}^{n+1}(x)\\right)\\hfill\\null \\end{matrix}\n\\end{equation}\nThe coefficients  $G^{(0)}$ and  $G^{(1)}$ are formed by orthogonalizing the wavelets to the polynomials at level n.\n\\ This determines the wavelets to within a unitary transformation and we follow the additional choices in Alpert's\npapers/thesis.\n\nThe wavelets have these properties\n\n\\begin{itemize}\n\\item Decomposition of  $V_{n}^{k}$\n\\end{itemize}\n\\begin{equation}\\label{seq:refText5}\nV_{n}^{k}=V_{0}^{k}\\oplus W_{0}^{k}\\oplus W_{1}^{k}\\oplus \\cdots \\oplus W_{n-1}^{k}\n\\end{equation}\n\n\\begin{itemize}\n\\item Translation and dilation  $\\psi _{il}^{n}(x)=2^{n/2}\\psi _{i}(2^{n}x-l)$\n\\item Orthnormality within and between scales\n\\end{itemize}\n\\begin{equation}\n\\begin{matrix}\\hfill \\int _{-\\infty }^{\\infty }\\psi _{il}^{n}(x)\\psi _{i'l'}^{n'}(x)\\mathit{dx}&\\text{=}&\\delta\n_{nn'}\\delta _{ii'}\\delta _{ll'}\\\\\\hfill \\int _{-\\infty }^{\\infty }\\psi _{il}^{n}(x)\\phi\n_{i'l'}^{n'}(x)\\mathit{dx}&\\text{=}&\\delta _{ii'}\\delta _{ll'}\\hfill\\null \\end{matrix}\n\\end{equation}\n\\subsection[\\ Function approximation in the scaling function basis]{\\ Function approximation in the scaling function\nbasis}\nA function \\textit{f(x)} may be approximated by expansion in the orthonormal scaling function basis at level \\textit{n\n}with the coefficients obtained by simple projection\n\n\\begin{equation}\\label{seq:refText7}\n\\begin{matrix}\\hfill f^{n}(x)&\\text{=}&\\sum _{l=0}^{2^{n}-1}\\sum _{i=0}^{k=1}s_{il}^{n}\\phi _{il}^{n}(x)\\hfill\\null\n\\\\\\hfill s_{il}^{n}&\\text{=}&\\int _{-\\infty }^{\\infty }f(x)\\phi _{il}^{n}(x)\\mathit{dx}\\hfill\\null \\end{matrix}\n\\end{equation}\n\n\\bigskip\n\nThe two scale relationships embodied in (3) and (5) may be combined to write the following matrix equation that relates\nthe scaling function basis at one scale with the scaling function and wavelet basis at the next coarsest scale.\n\n\\begin{equation}\n\\begin{matrix}\\hfill \\left(\\begin{matrix}\\hfill \\phi (x)\\\\\\hfill \\psi\n(x)\\end{matrix}\\right)&\\text{=}&\\sqrt{2}\\left(\\begin{matrix}H^{(0)}\\hfill\\null &H^{(1)}\\hfill\\null \\\\G^{(0)}\\hfill\\null\n&G^{(1)}\\hfill\\null \\end{matrix}\\right)\\left(\\begin{matrix}\\phi (2x)\\hfill\\null \\\\\\phi (2x-1)\\hfill\\null\n\\end{matrix}\\right)\\hfill\\null \\\\\\hfill \\left(\\begin{matrix}\\hfill \\phi _{l}^{n}(x)\\\\\\hfill \\psi\n_{l}^{n}(x)\\end{matrix}\\right)&\\text{=}&\\left(\\begin{matrix}H^{(0)}\\hfill\\null &H^{(1)}\\hfill\\null \\\\G^{(0)}\\hfill\\null\n&G^{(1)}\\hfill\\null \\end{matrix}\\right)\\left(\\begin{matrix}\\phi _{2l}^{n+1}(x)\\hfill\\null \\\\\\phi\n_{2l+1}^{n+1}(x)\\hfill\\null \\end{matrix}\\right)\\hfill\\null \\end{matrix}\n\\end{equation}\nSince the transformation is unitary, we also have\n\n\\begin{equation}\\label{seq:refText9}\n\\begin{matrix}\\hfill \\left(\\begin{matrix}\\hfill \\phi (2x)\\\\\\hfill \\phi\n(2x-1)\\end{matrix}\\right)&\\text{=}&\\sqrt{2}\\left(\\begin{matrix}H^{(0)}\\hfill\\null &H^{(1)}\\hfill\\null\n\\\\G^{(0)}\\hfill\\null &G^{(1)}\\hfill\\null \\end{matrix}\\right)^{T}\\left(\\begin{matrix}\\phi (x)\\hfill\\null \\\\\\psi\n(x)\\hfill\\null \\end{matrix}\\right)\\hfill\\null \\\\\\hfill \\left(\\begin{matrix}\\hfill \\phi _{2l}^{n+1}(x)\\\\\\hfill \\psi\n_{2l+1}^{n+1}(x)\\end{matrix}\\right)&\\text{=}&\\left(\\begin{matrix}H^{(0)}\\hfill\\null &H^{(1)}\\hfill\\null\n\\\\G^{(0)}\\hfill\\null &G^{(1)}\\hfill\\null \\end{matrix}\\right)^{T}\\left(\\begin{matrix}\\phi _{l}^{n}(x)\\hfill\\null \\\\\\psi\n_{l}^{n}(x)\\hfill\\null \\end{matrix}\\right)\\hfill\\null \\end{matrix}\n\\end{equation}\nIn table \\ref{seq:refTable0} are the filter coefficients for \\textit{k=}4, the only point being that these are\nplain-old-numbers and not anything mysterious.\n\n\\begin{table}[htdp]\n\\caption{Multi-wavelet filter coefficients for Legendre polynomials, $k=4$.}\n\\begin{center}\n\\begin{tabular}{c c c c|c c c c}\n\\multicolumn{4}{c|}{$H^{(0)}$} & \\multicolumn{4}{|c}{$H^{(1)}$} \\\\\n 7.0711e-01 & 0.0000e+00 & 0.0000e+00 & 0.0000e+00 & 7.0711e-01 & 0.0000e+00 & 0.0000e+00 & 0.0000e+00 \\\\\n-6.1237e-01 & 3.5355e-01 & 0.0000e+00 & 0.0000e+00 & 6.1237e-01 & 3.5355e-01 & 0.0000e+00 & 0.0000e+00 \\\\\n 0.0000e+00 &-6.8465e-01 & 1.7678e-01 & 0.0000e+00 & 0.0000e+00 & 6.8465e-01 & 1.7678e-01 & 0.0000e+00 \\\\\n 2.3385e-01 & 4.0505e-01 &-5.2291e-01 & 8.8388e-02 &-2.3385e-01 & 4.0505e-01 & 5.2291e-01 & 8.8388e-02 \\\\\n \\hline\n\\multicolumn{4}{c|}{$G^{(0)}$} & \\multicolumn{4}{|c}{$G^{(1)}$} \\\\\n 0.0000e+00 & 1.5339e-01 & 5.9409e-01 &-3.5147e-01 & 0.0000e+00 &-1.5339e-01 & 5.9409e-01 & 3.5147e-01 \\\\\n 1.5430e-01 & 2.6726e-01 & 1.7252e-01 &-6.1237e-01 &-1.5430e-01 & 2.6726e-01 &-1.7252e-01 &-6.1237e-01 \\\\\n 0.0000e+00 & 8.7867e-02 & 3.4031e-01 & 6.1357e-01 & 0.0000e+00 &-8.7867e-02 & 3.4031e-01 &-6.1357e-01 \\\\\n 2.1565e-01 & 3.7351e-01 & 4.4362e-01 & 3.4233e-01 &-2.1565e-01 & 3.7351e-01 &-4.4362e-01 & 3.4233e-01 \\\\\n\\end{tabular}\n\\end{center}\n\\label{default}\n\\end{table}%\n\n\\subsection{Wavelet transform}\nThe transformation in (10) expands polynomials on level \\textit{n }in terms of polynomials and wavelets on level\n\\textit{n-1}. \\ It may be inserted into the function approximation (8) that is in terms of polynomials at level\n\\textit{n. \\ }This yields an exactly equivalent approximation in terms of polynomials and wavelets on level\n\\textit{n-1}. \\ (I have omitted the multiwavelet index for clarity.).\n\n\\begin{equation}\n\\begin{matrix}f^{n}(x)&\\text{=}&\\sum _{l=0}^{2^{n}-1}{s_{l}^{n}\\phi _{l}^{n}(x)}\\hfill\\null \\\\\\text{}&\\text{=}&\\sum\n_{l=0}^{2^{n-1}-1}{\\left(\\begin{matrix}s_{2l}^{n}\\hfill\\null \\\\s_{2l+1}^{n}\\hfill\\null\n\\end{matrix}\\right)^{T}\\left(\\begin{matrix}\\phi _{2l}^{n}(x)\\hfill\\null \\\\\\phi _{2l+1}^{n}(x)\\hfill\\null\n\\end{matrix}\\right)}\\hfill\\null \\\\\\text{}&\\text{=}&\\sum _{l=0}^{2^{n-1}-1}{\\left(\\left(\\begin{matrix}H^{(0)}\\hfill\\null\n&H^{(1)}\\hfill\\null \\\\G^{(0)}\\hfill\\null &G^{(1)}\\hfill\\null\n\\end{matrix}\\right)\\left(\\begin{matrix}s_{2l}^{n}\\hfill\\null \\\\s_{2l+1}^{n}\\hfill\\null\n\\end{matrix}\\right)\\right)^{T}\\left(\\begin{matrix}\\phi _{l}^{n-1}(x)\\hfill\\null \\\\\\psi _{l}^{n-1}(x)\\hfill\\null\n\\end{matrix}\\right)}\\hfill\\null \\\\\\text{}&\\text{=}&\\sum\n_{l=0}^{2^{n-1}-1}{\\left(\\begin{matrix}s_{l}^{n-1}(x)\\hfill\\null \\\\d_{l}^{n-1}\\hfill\\null\n\\end{matrix}\\right)^{T}\\left(\\begin{matrix}\\phi _{l}^{n-1}(x)\\hfill\\null \\\\\\psi _{l}^{n-1}(x)\\hfill\\null\n\\end{matrix}\\right)}\\hfill\\null \\end{matrix}\n\\end{equation}\nThe sum and difference (scaling function and wavelet) coefficients at level \\textit{n-1} are therefore given by this\ntransformation\n\n\\begin{equation}\n\\left(\\begin{matrix}s_{l}^{n-1}(x)\\\\d_{l}^{n-1}(x)\\end{matrix}\\right)=\\left(\\begin{matrix}H^{(0)}&H^{(1)}\\\\G^{(0)}&G^{(1)}\\end{matrix}\\right)\\left(\\begin{matrix}s_{2l}^{n}\\\\s_{2l+1}^{n}\\end{matrix}\\right)\n\\end{equation}\nThe transformation may be recursively applied to obtain the following representation of a function in the wavelet basis\nc.f. (6) with direct analogy to the telescoping series (4).\n\n\\begin{equation}\\label{seq:refText12}\nf^{n}(x)=\\sum _{i=0}^{k-1}s_{i0}^{0}\\phi _{i0}^{0}(x)+\\sum _{n=0,\\ldots }\\sum _{l=0}^{2^{n}-1}\\sum\n_{i}^{k-1}d_{il}^{n}\\psi _{il}^{n}(x)\n\\end{equation}\nThe wavelet transformation (13) is unitary and is therefore a very stable numerical operation.\n\n\\subsection{Properties of the scaling functions}\n\\subsubsection{Symmetry}\n\\begin{equation}\n\\phi _{i}(x)=(-1)^{i}\\phi _{i}(1-x)\n\\end{equation}\n\\subsubsection{Derivatives}\n\\begin{equation}\n\\frac{1}{2\\sqrt{2i+1}}\\frac{d}{\\mathit{dx}}\\phi _{i}(x)=\\sqrt{2i-1}\\phi\n_{i-1}(x)+\\frac{1}{2\\sqrt{2i-5}}\\frac{d}{\\mathit{dx}}\\phi _{i-2}(x)\n\\end{equation}\n\\subsubsection[Values at end points]{Values at end points}\n\n\\bigskip\n\n\\begin{equation}\n\\begin{matrix}\\hfill \\phi _{i}(0)&\\text{=}&(-1)^{i}\\sqrt{2i+1}\\hfill\\null \\\\\\hfill \\phi\n_{i}(1)&\\text{=}&\\sqrt{2i+1}\\hfill\\null \\\\\\hfill \\frac{d\\phi\n_{i}}{\\mathit{dx}}(0)&\\text{=}&(-1)^{i}i(i+1)\\sqrt{2i+1}\\hfill\\null \\\\\\hfill \\frac{d\\phi\n_{i}}{\\mathit{dx}}(1)&\\text{=}&i(i+1)\\sqrt{2i+1}\\hfill\\null \\end{matrix}\n\\end{equation}\n\\section{User and simulation coordinates}\nInternal to the MADNESS implementation, all computations occur in the unit volume in \\textit{d }dimensions  $[0,1]^{d}$.\n\\ The unit cube is referred to as simulation coordinates. \\ However, the user operates in coordinates that in each\ndimension  $q=0,\\ldots ,d-1$ may have different upper and lower bounds \n$[\\mathrm{{\\mathit{lo}}}_{q},\\mathrm{{\\mathit{hi}}}_{q}]$ that represents a diagonal linear transformation between the\nuser and simulation coordinates.\n\n\n\\bigskip\n\n\\begin{equation}\n\\begin{matrix}\\hfill\nx_{q}^{\\mathrm{{\\mathit{user}}}}(x_{q}^{\\mathrm{{sim}}})&\\text{=}&\\left(\\mathrm{{\\mathit{hi}}}_{q}-\\mathrm{{\\mathit{lo}}}_{q}\\right)x_{q}^{\\mathrm{{sim}}}+\\mathrm{{\\mathit{lo}}}_{q}\\hfill\\null\n\\\\\\hfill\nx_{q}^{\\mathrm{{sim}}}(x_{q}^{\\mathrm{{\\mathit{user}}}})&\\text{=}&\\frac{x_{q}^{\\mathrm{{\\mathit{user}}}}-\\mathrm{{\\mathit{lo}}}_{q}}{\\mathrm{{\\mathit{hi}}}_{q}-\\mathrm{{\\mathit{lo}}}_{q}}\\hfill\\null\n\\end{matrix}\n\\end{equation}\n\n\\bigskip\n\nThis is a convenience motivated by the number of errors due to users neglecting the factors arising from mapping the\nuser space volume onto the unit cube. \\ More general linear and non-linear transformations must presently be handled by\nthe user.\n\nTo clarify further the expected behavior and how/when this mapping of coordinates is performed: All coordinates, values,\nnorms, thresholds, integrals, operators, etc., provided by/to the user are in user coordinates. \\ The advantage of this\nis that the user does not have to worry about mapping the physical simulation space. \\ E.g., if a user computes the\nnorm of a function what is returned is precisely the value\n\n\\begin{equation}\n\\left|f\\right|_{2}^{2}=\\int\n_{\\mathrm{{\\mathit{lo}}}}^{\\mathrm{{\\mathit{hi}}}}\\left|f(x^{\\mathrm{{\\mathit{user}}}})\\right|^{2}\\mathit{dx}^{\\mathrm{{\\mathit{user}}}}\n\\end{equation}\nSimilarly, when a user truncates a function with a norm-wise error  $\\epsilon $ this should be the error in the above\nnorm, and coefficients should be discarded so as to maintain this accuracy independent of the user volume. All sum and\ndifference coefficients, quadrature points and weights, operators, etc. are internally maintained in simulation\ncoordinates. \\ The advantage of this is that the operators can all be consistently formulated just once and we only\nhave to worry about conversions at the \\ user/application interface.\n\n\\subsection[Normalization of scaling functions in the user coordinates]{Normalization of scaling functions in the user\ncoordinates}\nThe scaling functions as written in equation (2) are normalized in simulation coordinates. \\ \\ Normalizing the functions\nin user coordinates requires an additional factor of  $V^{-1/2}$ where \\textit{V }is the user volume (which is just\nhi-lo in 1D).\n\n\\begin{equation}\n\\begin{matrix}\\int _{\\mathrm{{\\mathit{lo}}}}^{\\mathrm{{\\mathit{hi}}}}\\left(V^{-1/2}\\phi\n_{il}^{n}(x^{\\mathrm{{sim}}}(x^{\\mathrm{{\\mathit{user}}}}))\\right)^{2}dx^{\\mathrm{{\\mathit{user}}}}&\\text{=}&V^{-1}\\int\n_{\\mathrm{{\\mathit{lo}}}}^{\\mathrm{{\\mathit{hi}}}}\\phi\n_{il}^{n}(x^{\\mathrm{{sim}}}(x^{\\mathrm{{\\mathit{user}}}}))^{2}dx^{\\mathrm{{\\mathit{user}}}}=1\\end{matrix}\n\\end{equation}\n\\section{Function approximation}\nThe function is approximated as follows \n\n\\begin{equation}\\label{seq:refText19}\nf^{n}(x^{\\mathrm{{\\mathit{user}}}})=V^{-1/2}\\sum _{il}s_{il}^{n}\\phi\n_{il}^{n}(x^{\\mathrm{{sim}}}(x^{\\mathrm{{\\mathit{user}}}}))\n\\end{equation}\nNote that we have expanded the function in terms of basis functions normalized in the user coordinates. \\ This has\nseveral benefits, and in particular eliminates most logic about coordinate conversion factors in truncation thresholds,\nnorms, etc.\n\n\\subsection{Evaluation}\nEvaluation proceeds by mapping the user coordinates into simulation coordinates, recurring down the tree to find the\nappropriate box of coefficients, evaluating the polynomials, contracting with the coefficients, and scaling by \n$V^{-1/2}$.\n\n\\subsection{Projection into the scaling function basis}\nThe user provides a function/functor that given a point in user coordinates returns the value. \\ Gauss-Legendre\nquadrature of the same or higher order as the polynomial is used to evaluate the integral \n\n\\begin{equation}\n\\begin{matrix}s_{il}^{n}&\\text{=}&V^{-1/2}\\int\n_{\\mathrm{{\\mathit{lo}}}}^{\\mathrm{{\\mathit{hi}}}}{f(x^{\\mathrm{{\\mathit{user}}}})\\phi\n_{il}^{n}(x^{\\mathrm{{sim}}}(x^{\\mathrm{{\\mathit{user}}}}))\\mathit{dx}^{\\mathrm{{\\mathit{user}}}}}\\hfill\\null\n\\\\&\\text{=}&V^{1/2}\\int _{0}^{1}{f(x^{\\mathrm{{\\mathit{user}}}}(x^{\\mathrm{{sim}}}))\\phi\n_{il}^{n}(x^{\\mathrm{{sim}}})\\mathit{dx}^{\\mathrm{{\\mathit{sim}}}}}\\hfill\\null \\\\&\\text{=}&2^{dn/2}V^{1/2}\\int\n_{l2^{-n}}^{(l+1)2^{-n}}{f(x^{\\mathrm{{\\mathit{user}}}}(x^{\\mathrm{{sim}}}))\\phi\n_{i}(2^{n}x^{\\mathrm{{sim}}}-l)\\mathit{dx}^{\\mathrm{{\\mathit{sim}}}}}\\hfill\\null \\\\&\\text{=}&2^{-dn/2}V^{1/2}\\int\n_{0}^{1}{f(x^{\\mathrm{{\\mathit{user}}}}(2^{-n}(x+l)))\\phi _{i}(x)\\mathit{dx}}\\hfill\\null \\\\&\\simeq\n&2^{-dn/2}V^{1/2}\\sum _{\\mu =0}^{n_{\\mathrm{{\\mathit{pt}}}}}{\\omega _{\\mu }f(x^{\\mathrm{{\\mathit{user}}}}(2^{-n}(x_{\\mu\n}+l)))\\phi _{i}(x_{\\mu })}\\hfill\\null \\end{matrix}\n\\end{equation}\n $x_{\\mu }$ and  $\\omega _{\\mu }$ are the points and weights for the Gauss-Legendre rule of order \n$n_{\\mathrm{{\\mathit{pt}}}}$ over \\textit{[0, 1]}.\n\nThe above can be regarded as an invertible linear transformation between the scaling function coefficients and the\napproximate function values at the quadrature points ( $\\mu =0,\\ldots ,n_{\\mathrm{{\\mathit{pt}}}}$). \n\n\\begin{equation}\\label{seq:refText21}\n\\begin{matrix}s_{il}^{n}&\\text{=}&2^{-dn/2}V^{1/2}\\sum _{\\mu }f_{\\mu }{\\bar{\\phi }}_{\\mu i}\\\\f_{\\mu\n}&\\text{=}&2^{dn/2}V^{-1/2}\\sum _{i}\\phi _{\\mu i}s_{il}^{n}\\end{matrix}\n\\end{equation}\nwhere \n\n\\begin{equation}\n\\begin{matrix}\\hfill f_{\\mu }&\\text{=}&f(x^{\\mathrm{{\\mathit{user}}}}(2^{-n}(x_{\\mu }+l)))\\hfill\\null \\\\\\hfill \\phi\n_{\\mu i}&\\text{=}&\\phi _{i}(x_{\\mu })\\hfill\\null \\\\\\hfill {\\bar{\\phi }}_{\\mu i}&\\text{=}&\\phi _{i}(x_{\\mu })\\omega\n_{\\mu }\\hfill\\null \\\\\\hfill \\sum _{\\mu }\\phi _{\\mu i}{\\bar{\\phi }}_{\\mu i}&\\text{=}&\\delta _{ij}\\hfill\\null\n\\end{matrix}\n\\end{equation}\nThe last line merely restates the orthonormality of the scaling function basis that in the discrete Gauss-Legendre\nquadrature is exact for the scaling function basis with the choice of the quadrature order \n$n_{\\mathrm{{\\mathit{pt}}}}\\ge k$.\n\n\\subsection{Truncation criteria}\n\\label{ref:sectruncmodes}Discarding small difference coefficients while maintaining precision is central to speed and\ndrives the adaptive refinement. \\ Different truncation criteria are useful in different contexts.\n\n\\subsubsection[Mode 0 {}- the default]{\\rmfamily Mode 0 - the default}\nThis truncation is appropriate for most calculations and in particular those that have functions with deep levels of\nrefinement (such as around nuclei in all-electron electronic structure calculations). \\ Difference coefficients of leaf\nnodes are neglected according to \n\n\\begin{equation}\\label{seq:refText23}\n\\left\\|d_{l}^{n}\\right\\|_{2}=\\sqrt{\\sum _{i}\\left|d_{il}^{n}\\right|^{2}}\\le \\epsilon \n\\end{equation}\n\\subsubsection{Mode 1}\nThis mode is appropriate when seeking to maintain an accurate representation of both the function and its derivative.\n\\ Difference coefficients of leaf nodes are neglected according to \n\n\\begin{equation}\\label{seq:refText24}\n\\left\\|d_{l}^{n}\\right\\|_{2}\\le \\epsilon \\operatorname{min}(1,L2^{-n})\n\\end{equation}\nwhere L is the minimum width of any dimension of the user coordinate volume.\n\nThe form for the threshold is motivated by re-expressing the expansion (20) in terms of the mother scaling function and\nthen differentiating (crudely, neglecting continuity with neighboring cells). \n\n\\begin{equation}\n\\begin{matrix}\\hfill f^{n}(x^{\\mathrm{{\\mathit{user}}}})&\\text{=}&V^{-1/2}2^{n/2}\\sum _{il}s_{il}^{n}\\phi\n_{i}(2^{n}x^{\\mathrm{{sim}}}(x^{\\mathrm{{\\mathit{user}}}})-l)\\hfill\\null \\\\\\hfill\n\\frac{d}{dx^{\\mathrm{{\\mathit{user}}}}}f^{n}(x^{\\mathrm{{\\mathit{user}}}})&\\simeq\n&V^{-1/2}2^{3n/2}(\\mathrm{{\\mathit{hi}}}-\\mathrm{{\\mathit{lo}}})^{-1}\\sum _{il}s_{il}^{n}\\phi\n'_{i}(2^{n}x^{\\mathrm{{sim}}}(x^{\\mathrm{{\\mathit{user}}}})-l)\\hfill\\null \\end{matrix}\n\\end{equation}\nThus, we see that the scale dependent part of the derivative is an extra factor of  $2^{n}$ arising from differentiating\nthe scaling function. \\ We must include the factor hi-lo in order to make the threshold volume independent. \\ Finally,\nwe use the minimum to ensure that the threshold (25) is everywhere at least as tight as (24).\n\n\\subsubsection{Mode 2}\nThis is appropriate only for smooth functions with a nearly uniform level of refinement in the entire volume.\n\\ Difference coefficients are neglected according to \n\n\\begin{equation}\n\\left\\|d_{l}^{n}\\right\\|_{2}\\le \\epsilon 2^{-nd/2}\n\\end{equation}\nThis is the truncation scheme described in ABGV. \\ If this truncation mode discards all difference coefficients at level\n\\textit{n} it preserves a strong bound on the error between the representations at levels \\textit{n} and \\textit{n --\n1}. \n\n\\begin{equation}\n\\left\\|f^{n}-f^{n-1}\\right\\|_{2}^{2}=\\sum _{l=0}^{2^{n}-1}\\left\\|d_{l}^{n}\\right\\|_{2}^{2}\\le \\sum\n_{l=0}^{2^{n}-1}\\epsilon ^{2}2^{-nd}=\\epsilon ^{2}\n\\end{equation}\nHowever, for non-smooth functions beyond two dimensions this conservative threshold can lead to excessive (even\nuncontrolled) refinement and is usually not recommended.\n\n\\subsection{Adaptive refinement}\nAfter projection has been performed in boxes \\textit{2l} and \\textit{2l+1} at level \\textit{n}, the scaling function\ncoefficients may be filtered using \\ to produce the wavelet coefficients in box \\textit{l} at level \\textit{n-1}. \\ If\nthe desired truncation criterion (section \\ref{ref:sectruncmodes}) is not satisfied, the process is repeated in the\nchild boxes \\textit{4l}, \\textit{4l+1}, \\textit{4l+2}, \\textit{4l+3} at level \\textit{n+1}. \\ Otherwise, the computed\ncoefficients are inserted at level \\textit{n}.\n\n\\section[Unary operations]{\\rmfamily Unary operations}\n\\subsection[Function norm]{\\rmfamily Function norm}\nDue to the chosen normalization of the scaling function coefficients in (20) both the scaling function and wavelet bases\nare orthonormal in user-space coordinates, thus \n\n\\begin{equation}\n\\begin{matrix}\\hfill \\left\\|f^{n}\\right\\|_{2}^{2}&\\text{=}&\\left\\|s_{0}^{0}\\right\\|_{2}^{2}+\\sum _{m=0}^{n-1}\\sum\n_{l=0}^{2^{m}-1}\\left\\|d_{l}^{m}\\right\\|_{2}^{2}\\hfill\\null \\\\&\\text{=}&\\sum\n_{l=0}^{2^{n}-1}\\left\\|s_{l}^{n}\\right\\|_{2}^{2}\\hfill\\null \\end{matrix}\n\\end{equation}\n\\subsection[Squaring]{\\rmfamily Squaring}\nThis is a special case of multiplication; please look below.\n\n\\subsection[General unary operation]{\\rmfamily General unary operation}\nIn-place, point-wise application of a user-provided function (q) to a MRA function (f), i.e., q (f (x)). After optional\nauto-refinement, the function f (x) is transformed to the quadrature mesh and the function q (f (x)) computed at each\npoint. \\ \\ The values are then transformed back to the scaling function basis. \\ \\ The criterion for auto-refinement is\npresently the same as used for squaring, but it would be straightforward to make this user-defined.\n\nNeed to add discussion of error analysis that can ultimately be used to drive rigorous auto-refinement.\n\n\\subsection{Differentiation}\nABGV provides a detailed description of the weak formulation of the differentiation operator with inclusion of boundary\nconditions. There is also a Maple worksheet that works this out in gory detail. We presently only provide a central\ndifference with either periodic or zero-value Dirichlet boundary conditions though we can very easily add more general\nforms. With a constant level of refinement differentiation takes this block-tri-diagonal form \n\n\\begin{equation}\nt_{il}=L\\sum _{j}{r_{ij}^{(\\text{+})}s_{jl-1}+r_{ij}^{(0)}s_{jl}+r_{ij}^{(\\text{{}-})}s_{jl+1}}\n\\end{equation}\nwhere \\textit{L} is the size of the dimension being differentiated. The diagonal block of the operator is full rank\nwhereas the off-diagonal blocks are rank one.\n\nThe problems arise from adaptive refinement. We need all three blocks at the lowest common level. The algorithm starts\nfrom leaf nodes in the source tree trying to compute the corresponding node in the output. We probe for nodes to the\nleft and right in the direction of differentiation (and enforcing the boundary conditions). There are three\npossibilities\n\n\n\\begin{itemize}\n\\item Present without coefficients -- i.e., the neighbor is more deeply refined. In this instance we loop through\nchildren of the target (central) node and invoke the differentiation operation on them, passing any coefficients that\nwe have already found (which must include the central node and the other neighbor due to the nature of the adaptive\nrefinement).\n\\item Present with coefficients -- be happy.\n\\item Not present -- i.e., the neighbor is less deeply refined. The search for the neighbor recurs up the tree to find\nthe parent that does have coefficients.\n\\end{itemize}\nOnce all three sets of coefficients have been located we will be at the level corresponding to the most deeply refined\nblock. For the other blocks we may have coefficients corresponding to parents in the tree. Thus, we need to project\nscaling coefficients directly from node  $n,l$ to a child node  $n',l'$ with  $n'\\ge n$ and  $2^{n'-n}l\\le\nl'<2^{n'-n}(l+1)$. Equation (44) tells us how to compute the function value at the quadrature points on the lowest\nlevel and we can project onto the lower level basis using (22). Together, these yield\n\n\\begin{equation}\ns_{il'}^{n'}=2^{d(n-n')/2}\\sum _{\\mu }{{\\bar{\\phi }}_{\\mu i}\\sum _{j}{\\phi _{\\mu j}^{n-n',l,l'}s_{\\mathit{jl}}^{n}}}\n\\end{equation}\nwhich is most efficiently executed with the summations performed in the order written.\n\nRecurring down is also a little tricky. We always have at least the coefficients for the central box with translation\n\\textit{l}. This yields children \\textit{2l} and \\textit{2l+1} which are automatically left/right neighbors of each\nother.\n\n\\subsection{Band-limited, free-particle propagator}\nThe unfiltered real-space kernel of the free-particle propagator for the Schr\\\"odinger equation is \n\n\\begin{equation}\nG_{0}(x,t)=\\frac{1}{\\sqrt{2\\pi it}}e^{-{\\frac{x^{2}}{2it}}}\n\\end{equation}\nFor large  $x$ this becomes highly oscillatory and impractical to apply exactly. However, when applied to a function\nthat is known to be band limited we can neglect components in  $G_{0}$ outside the band limit which causes it to decay.\nFurthermore, combining application of the propagator with application of a filter enables us to knowingly control\nhigh-frequency numerical noise introduced by truncation of the basis (essential for fast computation) and the\nhigh-frequencies inherent in the multiwavelet basis (due both to their polynomial form and discontinuous support).\n\nExplicitly, consider the representation of the propagator in Fourier space \n\n\\begin{equation}\n{\\hat{G}}_{0}(k,t)=e^{-i\\frac{k^{2}t}{2}}\n\\end{equation}\nWe multiply this by a filter  $F(k/c)$ that smoothly switches near  $k=c$ from unity to zero. The best form of this\nfilter is still under investigation, but we presently use a 30\\textsuperscript{th}{}-order Butterworth filter. \n\n\\begin{equation}\nF(k)=\\left(1+k^{30}\\right)^{-1}\n\\end{equation}\nFor  $k\\ll 1$ this deviates from unity by about  $-k^{30}$. This implies that if frequencies up to a band limit \n$c_{\\mathit{target}}$ are desired to be accurate to a precision  $\\epsilon $ after  $N$ applications of the operator,\nthen we should choose the actual band limit in the filter such that \\  $N(c_{\\mathit{target}}/c)^{30}\\le \\epsilon $ or \n$c\\ge c_{\\mathit{target}}(N/\\epsilon )^{1/30}$. For a precision of 10\\textsuperscript{{}-3} in the highest frequency\n(lower frequencies will much more accurate) after 10\\textsuperscript{5} steps we would choose  $c\\ge\n1.85c_{\\mathit{target}}$. Similarly, for  $k\\gg 1$ the filter  $F(k)$ differs from zero by circa  $k^{-30}$ and\ntherefore we must include in the internal numerical approximation of the operator frequencies about 2x greater than \n$c$ (more precisely, 2.15x for a precision 1e-10 and 2.5x for a precision of 1e-12).\n\nSpecifically, we compute the filtered real-space propagator by numerical quadrature of the Fourier expansion of the\nfiltered kernel. The quadrature is performed over  $[-c_{\\mathit{top}},c_{\\mathit{top}}]$ where \n$c_{\\mathit{top}}=2.15\\ast c$. The wave length associated with a frequency  $k$ is  $\\lambda =2\\pi /k$ and therefore\nlimiting to frequencies less than  $c$ implies a smallest grid of  $h=\\pi /c$. This is oversampled by circa 10x to\npermit subsequent valuation using cubic interpolation. Finally, the real space kernel is computed by inverse discrete\nFourier transform and then cubic interpolation.\n\nFast and accurate application of this operator is still being investigated. We can apply it either in real space\ndirectly to the scaling function coefficients or in wavelet space using non-standard form. Presently, the real-space\nform is both faster and more accurate.\n\n\\subsection{Integral convolutions}\nThis is described in gory detail in ABGV and the first multi-resolution qchem paper but eventually all of that should be\nreproduced here. For now, we simply take care of the mapping from the user to simulation coordinates and other stuff\ndiffering from the initial approach.\n\nWe start from a separated representation of the kernel  $K(x)$ in user coordinates that is valid over the volume for \n$x_{\\mathit{lo}}^{\\mathit{user}}\\le |x^{\\mathit{user}}|\\le L\\sqrt{(d)}$ to a \\ relative precision  $\\epsilon\n^{\\mathit{user}}$ (except where the value is exponentially small) \n\n\\begin{equation}\nK(x^{\\mathit{user}})=\\sum _{\\mu =1}^{M}{\\prod _{i=1}^{d}{T_{i}^{(\\mu )}(x_{i}^{\\mathit{user}})}}+O(\\epsilon\n^{\\mathit{user}})\n\\end{equation}\nSince the error in the approximate is relative it is the same in both user and simulation coordinates.\n\nThe most common case is that the kernel is isotropic ( $K(x)=K(|x|)$) and therefore the separated terms do not depend\nupon direction, i.e.,  $T_{i}^{(\\mu )}=T^{(\\mu )}$ (if it is desired to keep the terms real it may be necessary to\ntreat a negative sign separately). In a cubic box the transformation to simulation coordinates is the same in each\ndimension and therefore we only need to compute and store each operator once for each dimension. However, in non-cubic\nboxes the transformation to simulation coordinates is different in each direction making it necessary to compute and\nstore each operator in each direction. Doing this will permit us to treat non-isotropic operators in the same\nframework, the extreme example of which is a convolution that acts only in one dimension. Presently, this is not\nsupported but it is a straightforward modification.\n\nFocusing now on just one term and direction, the central quantity is the transition matrix element that is needed in\nuser coordinates but must be computed in simulation coordinates \n\n\\begin{equation}\n\\begin{matrix}\\left[r_{ll'}^{n}\\right]_{ii'}&=&L^{-1}\\int {\\int\n{T^{\\mathit{user}}(x^{\\mathit{user}}-y^{\\mathit{user}})\\phi _{il}^{n}(x^{sim}(x^{\\mathit{user}}))\\phi\n_{i'l'}^{n}(y^{sim}(y^{\\mathit{user}}))\\mathit{dx}^{\\mathit{user}}}\\mathit{dy}^{\\mathit{user}}}\\\\&=&L\\int {\\int\n{T^{\\mathit{user}}(L(x^{sim}-y^{sim}))\\phi _{il}^{n}(x^{sim})\\phi\n_{i'l'}^{n}(y^{sim})\\mathit{dx}^{\\mathit{sim}}}\\mathit{dy}^{\\mathit{sim}}}\\hfill\\null \\end{matrix}\n\\end{equation}\nwhere  $L$ is the width of the dimension. This enables the identification \n\n\\begin{equation}\nT^{sim}(x^{sim})=LT^{\\mathit{user}}(Lx^{sim})\n\\end{equation}\nInternally, the code computes transition matrix elements for  $T^{sim}$ in simulation coordinates. If the operator is\nrepresented as a sum of Gaussian functions  $c^{\\mathit{user}}\\exp (-\\alpha ^{\\mathit{user}}(x^{\\mathit{user}})^{2})$\nthen the corresponding form in simulation coordinates will be  $c^{sim}=Lc^{\\mathit{user}}$ and  $\\alpha\n^{\\mathit{sim}}=L^{2}\\alpha ^{\\mathit{user}}$.\n\n\\subsection{Application of the non-standard form}\nTwo things complicate the application of the NS-form operator. The first is specific to the separated representation --\nwe only have this for the actual operator ( $T$) not for the NS-form which is  $T^{n+1}-T^{n}$. Thus at each level we\nactually apply to the sum and difference coefficients  $T^{n+1}$ and subtract off the result of applying  $T^{n}$ to\njust the sum coefficients. Note that screening must be performed using the norm of  $T^{n}-T^{n-1}$ since it is sparse.\nBeyond 1D this approach is a negligible computational overhead and the only real concern is possible loss of precision\nsince we are subtracting two large numbers to obtain a small difference. My current opinion is that there is no\neffective loss of precision since reconstructing the result will produce values of similar magnitude. This is I think a\ncorrect argument for the leaf nodes, but the interior nodes might have larger values and hence we could lose relevant\ndigits.\n\nThe second issue is what to do about scaling function coefficients at the leaf nodes. Regarding the operator as a matrix\nbeing applied to a vector of scaling function coefficients, then the operator is exactly applied by operation upon the\nsum and difference coefficients at the next level, therefore there is no need to apply the operator to the leaf nodes\n(this was my initial thinking). However, as pointed out by Beylkin, the operator itself can introduce finer-scale\ndetail which means that we must consider application at the lowest level where the difference coefficients are zero\nsince the operator can introduce difference coefficients at that level.\n\n\\subsection{Screening}\nTo screen effectively we need to estimate the norm of the blocks of the non-standard operator and also each term in its\nseparated expansion. We could estimate the largest eigenvalue by using a power method and this is implemented in the\ncode for verification, however, it is too expensive to use routinely, especially for each term in a large separated\nrepresentation (we would spend more time computing the operator than applying it). Thus, we need a more efficient\nscheme.\n\nEach term in the separated expansion is applied as \n\n\\begin{equation}\\label{seq:refText37}\nR_{x}R_{y}\\cdots -T_{x}T_{y}\\cdots \n\\end{equation}\nwhere \\textit{R} is the full non-standard form of the operator in a given direction which takes on the form \n\n\\begin{equation}\nR=\\left(\\begin{matrix}T&B\\\\C&A\\end{matrix}\\right)\n\\end{equation}\nand \\textit{T} is the block of\\textit{ R }that connects sum-coefficients with sum-coefficients. We could compute the\nFrobenius norm of the operator in (38) simply as  $\\sqrt{\\|R_{x}\\|_{F}^{2}\\|R_{y}\\|_{F}^{2}\\cdots\n-\\|T_{x}\\|_{F}^{2}\\|T_{y}\\|_{F}^{2}\\cdots }$ but unfortunately this loses too much precision. Instead, an excellent\nestimate is provided by \n\n\\begin{equation}\n\\sqrt{\\left(\\prod _{i=1}^{d}{\\|R_{i}\\|_{F}^{2}}\\right)\\left(\\sum\n_{i=1}^{d}{\\frac{\\|R_{i}-T_{i}\\|_{F}^{2}}{\\|R_{i}\\|_{F}^{2}}}\\right)}\n\\end{equation}\nwhich seems in practice to be an effective upper bound that is made tight (within a factor less than two at least for\nthe Coulomb kernel) by replacing the sum with the maximum term in the sum.\n\n\\subsection[Automatic refinement (aka widening the support)]{Automatic refinement (aka widening the support)}\nSame as for multiplication ... need explain why this is good.\n\n\\section[Binary operations]{\\rmfamily Binary operations}\n\\subsection[Inner product of two functions]{\\rmfamily Inner product of two functions}\nThis is conceptually similar to the norm, but since the two functions may have different levels of refinement we can\nonly compute the inner product in the wavelet basis. \\ \n\n\\begin{equation}\n\\int f(x)^{\\text{*}}g(x)dx=\\left.s_{f0}^{0}\\right.^{dagger}.s_{g0}^{0}+\\sum _{m=0}^{n-1}\\sum\n_{l=0}^{2^{m}-1}\\left.d_{fl}^{m}\\right.^{dagger}.d_{gl}^{m}\n\\end{equation}\n\\subsection[Function addition and subtraction]{\\rmfamily Function addition and subtraction}\nThe most general form is the bilinear operation GAXPY (generalized form of SAXPY)  $h(x)=\\alpha f(x)+\\beta g(x)$ that is\nimplemented in both in-place (\\textit{h} the same as \\textit{f}) and out-of-place versions. The operation is\nimplemented in the wavelet basis in which the operation can be applied directly to the coefficients regardless of\ndifferent levels of adaptive refinement (missing coefficients are treated as zero).\n\n\\textit{Need a discussion on screening} -- basically if the functions have the same processor map and this operation is\nfollowed by a truncation before doing anything expensive, explicit screening does not seem too critical. \\ \\ The need\nfor truncation could be reduced by testing on the size of one of the products (e.g., in a Gramm-Schmidt we know that\none of the terms is usually small).\n\n\\subsection{Point-wise multiplication}\nThis is performed starting from the scaling function basis. \\ \\ Superficially, we transform each function to values at\nthe quadrature points, multiply the values, and transform back. \\ \\ However, there are three complicating issues. \\ \n\nFirst, the product cannot be exactly represented in the polynomial basis. \\ The product of two polynomials of order\n\\textit{k-1} produces a polynomial of order \\textit{2k-2}. \\ \\ Beylkin makes a nice analogy to the product of two\nfunctions sampled on a grid -- the product can be exactly formed on a grid with double the resolution. \\ \\ While this\nis not exact for polynomials it does reduce the error by a factor of  $2^{-k}$, where \\textit{k} is the order of the\nwavelet. \\ \\ Therefore, we provide the option to automatically refine and form the product at a lower level. \\ \\ This\nis done by estimating the norm of the part of the product that cannot be exactly represented as follows \n\n\\begin{equation}\n\\begin{matrix}p_{l}^{n}&\\text{=}&\\sqrt{\\sum _{i=0}^{\\left\\lfloor\n(k-1)/2\\right\\rfloor}\\left\\|s_{il}^{n}\\right\\|^{2}}\\hfill\\null \\\\q_{l}^{n}&\\text{=}&\\sqrt{\\sum _{i=\\left\\lfloor\n(k-1)/2\\right\\rfloor+1}^{k-1}\\left\\|s_{il}^{n}\\right\\|^{2}}\\hfill\\null \\\\\\epsilon (\\mathit{fg})_{l}^{n}&\\simeq\n&p(f)_{l}^{n}q(g)_{l}^{n}+q(f)_{l}^{n}p(g)_{l}^{n}+q(f)_{l}^{n}q(g)_{l}^{n}\\end{matrix}\n\\end{equation}\n\n\\bigskip\n\nSecond, the functions may have different levels of adaptive refinement. The two options are to compute the function with\ncoefficients at a coarser-scale directly on the grid required for the finer-scale function, or to refine the function\ndown to same level, which is what we previously choose to do. \\ However, this will leave the tree with scaling function\ncoefficients at multiple levels that must be cleaned up after the operation. \\ \\ Since it essential (for efficient\nparallel computation) to perform multiple operations at a time on a function, having it in an inconsistent state makes\nthings complicated. \\ \\ If all we wanted to do were perform other multiplication operations, there would be no problem;\nhowever this seems to be an unnecessary restriction on the user. \\ \\ It is also faster (2-fold?) to perform the direct\nevaluation so this is what we choose to do. \\ \n\nThird, the above does not use sparsity or smoothness in the functions and does not compute the result to a finite\nprecision. \\ \\ For instance, if two functions do not overlap their product is zero but the above algorithm will compute\nat the finest level of the two functions doing a lot of work to evaluate small numbers that will be discarded upon\ntruncation. \\ \\ Eliminating this overhead is crucial for reduced scaling in electronic structure calculations. \\ \\ At\nsome scale we can write each function (\\textit{f} and \\textit{g}) in a volume in terms of its usual scaling function\napproximation at that level (\\textit{s}) and the correction/differences (\\textit{d}) from \\textit{all }finer scales.\n\\ \\ The error in the product of two such functions is then \n\n\\begin{equation}\\label{seq:refText42}\n\\epsilon (\\mathit{fg})\\simeq\n\\left\\|s_{f}\\right\\|.\\left\\|d_{g}\\right\\|+\\left\\|d_{f}\\right\\|.\\left\\|\\mathrm{{s}}_{f}\\right\\|+\\left\\|d_{f}\\right\\|.\\left\\|d_{g}\\right\\|\n\\end{equation}\nwith a hopefully obvious abuse of notation. Note again that while the scaling function coefficients are as used\neverywhere else in this document, the difference function (\\textit{d}) in (43) is the sum of corrections at \\textit{all\n}finer scales. \\ \\ Thus, by computing the scaling function coefficients at all levels of the tree and summing the norm\nof the differences up the tree we can compute with controlled precision at coarser levels of the tree. \\ \\ The sum of\nthe norm of differences can also be computed by summing the norm of the scaling function coefficients from the finest\nlevel and subtracting the local value.\n\nIf many products are being formed, the overheads (compute and memory) of forming the non-standard form are acceptable,\nbut it is desirable to have a less expensive approach when computing just a few products. \\ \\ The above exploits both\nlocality and smoothness in each function. The main reduction in cost in the electronic structure algorithms will come\nfrom locality (finite domain for each orbital with exponential decay outside) and with that in mind we can bound the\nentire product in some volume using  $\\left\\|\\mathit{fg}\\right\\|\\le \\left\\|f\\right\\|.\\left\\|g\\right\\|$. \\ \\ We can\ncompute the norm of each function in each volume by summing the norm of the scaling function coefficients up the tree,\nwhich is inexpensive but does require some communication and an implied global synchronization. \\ \\ If in some box the\nproduct is predicted to be negligible we can immediately set it to zero, otherwise we must recur down. Since we are not\nexploiting smoothness, if a product must be formed it will be formed on the finest level.\n\nThus, we will eventually have three algorithms for point-wise multiplication. Which ones to do first? \\ \\ We answer this\nquestion by asking, ``what products will the DFT and HF codes be performing?''\n\n\\begin{itemize}\n\\item Square each orbital to make the density.\n\\item Multiply the potential against each orbital.\n\\item HF exchange needs each orbital times every other orbital.\n\\end{itemize}\nThe first critical one is potential times orbital. \\ \\ The potential has global extent but the orbitals are localized\nand we want the cost of each product to be \\textit{O(1)} not \\textit{O(V)} (\\textit{V}, the volume). \\ \\ Similarly, we\nmust reduce the cost of the  $O(N^{2})$ products in HF exchange to \\textit{O(N)}. \\ \\ Therefore, we first did the exact\nalgorithm and will very shortly do one that exploits locality.\n\n\\subsubsection[Evaluating the function at the quadrature points]{\\rmfamily Evaluating the function at the quadrature\npoints}\nIn (22) is described how to transform between function values and scaling coefficients on the same level. \\ \\ However,\nfor multiplication we will need to evaluate the polynomials at a higher level in a box at a finer level. \\ This is not\nmathematically challenging but there are enough indices involved that care is necessary. \\ \\ Let  $(n,l)$ \\ be the\nparent box and  $(n',l')$ be one of its children, and let  $x_{\\mu }$ be a Gauss-Legendre quadrature point in [0,1].\n\\ \\ We want to evaluate \n\n\\begin{equation}\\label{seq:refText43}\n\\begin{matrix}f_{\\mu }&\\text{=}&V^{-1/2}\\sum _{i}{s_{\\mathit{il}}^{n}\\phi _{\\mathit{il}}^{n}\\left(2^{-n'}\\left(x_{\\mu\n}+l'\\right)\\right)}\\hfill\\null \\\\&\\text{=}&V^{-1/2}2^{\\mathit{dn}/2}\\sum _{i}{s_{\\mathit{il}}^{n}\\phi\n_{i}\\left(2^{n-n'}\\left(x_{\\mu }+l'\\right)-l\\right)}\\hfill\\null \\\\&\\text{=}&V^{-1/2}2^{\\mathit{dn}/2}\\sum\n_{i}{s_{\\mathit{il}}^{n}\\phi _{\\mu i}^{n-n',l,l'}}\\hfill\\null \\end{matrix}\n\\end{equation}\nthat has the same form as before but now we must use a different transformation for each dimension due to the dependence\non the child box coordinates.\n\n\\section{Error estimation}\nTo estimate the error in the numerical representation relative to some known analytic form, i.e., \n\n\\begin{equation}\n\\epsilon =\\left\\|f-f^{n}\\right\\|\n\\end{equation}\nwe first ensure we are in the scaling function basis and then in each box with coefficients compute the contribution to \n$\\epsilon $ using a quadrature rule with one more point than that used in the initial function projection. \\ \\ The\nreason for this is that if  $f^{n}$ \\ resulted from the initial projection then it is exactly represented at the\nquadrature points and will appear, incorrectly, to have zero error if sampled there. \\ \\ One more point permits the\nnext two powers in the local polynomial expansion to be sampled and also ensures that all of the new sampling points\ninterleave the original points near the center of the box. \\ \n\n\\section[Data structures]{Data structures}\nThe d-dimension function is represented as a 2\\textsuperscript{d}{}-tree. \\ \\ Nodes in the tree are labeled by an\ninstance of \\texttt{Key{\\textless}d{\\textgreater}} that wraps the tuple \\textit{(n,l)} where \\textit{n} is the level\nand \\textit{l} is a \\textit{d}{}-vector representing the translation. \\ \\ Nodes are represented by instances of\n\\texttt{FunctionNode{\\textless}T,d{\\textgreater}} that presently contains the coefficients and an indicator if this\nnode has children. \\ \\ Nodes without children are sometimes referred to as leaves. \\ \\ Nodes, indexed by keys, are\nstored in a distributed hash table that is an instance of\n\\texttt{WorldContainer{\\textless}Key{\\textless}d{\\textgreater},FunctionNode{\\textless}T,d{\\textgreater}{\\textgreater}}.\n\\ \\ This container uses a two-level hash to first map a key to the processes (referred to as the owner) in which the\ndata resides, and then into a local instance of either a GNU \\texttt{hash \\_map} or a TR1 \\texttt{unordered\\_map}.\n\\ \\ Since it is always possible to compute the key of a parent, child, or neighbor we never actually store (global)\npointers to parents or children. \\ \\ Indeed, a major point of the MADNESS runtime environment is to replace the\ncumbersome partitioned global address space (global pointer = process id + local pointer) with multiple global name\nspaces. \\ \\ Each new container provides a new name space. \\ \\ Using names rather than pointers permits the application\nto be written using domain-specific concepts rather a rigid linear model of memory. Folks familiar with Python will\nimmediately appreciate the value of name spaces.\n\nData common to all instances of a function of a given dimension (\\textit{d}) and data type (\\texttt{T,} e.g., float,\ndouble, float \\_complex, double \\_complex) are gathered together into\n\\texttt{FunctionCommonData{\\textless}T,d{\\textgreater}} of which one instance is generated per wavelet order\n(\\textit{k}). \\ \\ An instance of the common data is shared read-only between all instances of functions of that data\ntype, dimension and wavelet order. \\ \\ Presently there are some mutable scratch arrays in the common data but these\nwill be eliminated when we introduce multi-threading. \\ \\ In addition to reducing the memory footprint of the code,\nsharing the common data greatly speeds the instantiation of new functions which is replicated on every processor.\n\nIn order to facilitate shallow copy/assignment semantics and to make empty functions inexpensive to instantiate, a\nmulti-resolution function, which is an instance of \\texttt{Function{\\textless}T,d{\\textgreater}} contains only a shared\npointer to the actual implementation which is an instance of \\texttt{FunctionImpl{\\textless}T,d{\\textgreater}}.\n\\ \\ Un-initialized functions (obtained from the default constructor) contain a zero pointer. \\ Only a non-default\nconstructor or assignment actually instantiate the implementation. The main function class forwards nearly all methods\nto the underlying implementation. \\ \\ The implementation primarily contains a reference to the common data, the\ndistributed container storing the tree, little bits of other state (e.g., a flag indicating the compression status) and\na bunch of methods.\n\nDefault values for all functions of a given dimension are stored in an instance of\nFunctionDefaults{\\textless}d{\\textgreater}. \\ \\ These may be modified to change the default values for subsequently\ncreated functions. \\ \\ Functions have many options and parameters and thus we need an easy way to specify options and\nselectively override defaults. \\ \\ Since C++ does not provide named arguments (i.e., arguments with defaults that may\nbe specified in any order rather than relying on position to identify an argument) we adopt the named-parameter idiom.\nThe main constructor for \\texttt{Function{\\textless}T,d{\\textgreater}} takes an instance of\n\\texttt{FunctionFactory{\\textless}T,d{\\textgreater} }as its sole argument. \\ \\ The methods of\n\\texttt{FunctionFactory{\\textless}T,d{\\textgreater}} enable setting of options and parameters and each returns a\nreference to the object to permit chaining of methods. \\ \\ A current problem with \\texttt{FunctionDefaults} is that it\nis static data shared between all parallel worlds (MPI sub-communicators). At some point we may need to tie this to the\nworld instance.\n\nPretty much all memory is reference counted using Boost-like shared pointers. An instance of\n\\texttt{SharedPointer{\\textless}T{\\textgreater}}, which wraps a pointer of type \\texttt{T*}, is (almost) always used to\nwrap memory obtained from the C++ new operator. \\ \\ The exceptions are where management of the memory is immediately\ngiven to a low-level interface. \\ \\ Shared-pointers may be safely copied and used with no fear of using a stale\npointer. \\ \\ When the last copy of a shared pointer is destroyed the underlying pointer is freed. \\ \\ With this mode of\nmemory management there is never any need to use the C++ delete operator and most classes do not even need a\ndestructor.\n\nTensors ...\n\nSTOPPED MOST CLEANUP AND WRITING HERE ... more to follow ... sigh\n\n\\subsection{Maintaining consistent state of the 2d-tree}\nThe function implementation provides a method \\texttt{verify\\_tree()} that attempts to check connectivity and\nconsistency of the compression state, presence of coefficients, child flags, etc, as described below.\n\nA node in the tree is labeled by the key/tuple \\textit{(n,l)} and presently stores the coefficients, if any, and a flag\nindicating if the node has children. \\ \\ In 1D, the keys of children are readily computed as \\textit{(n+1,2l)} and\n\\textit{(n+1,2l+1). }In many dimensions it is most convenient to use the \\texttt{KeyChildIterator} class. \\ \\ The\npresence of coefficients is presently determined by looking at the size of the tensor storing the coefficients; size\nzero means no coefficients.\n\nIn the reconstructed form (scaling function basis), a tree has coefficients (a \\textit{k}\\textit{\\textsuperscript{d}}\ntensor) only at the lowest level. \\ \\ All interior nodes will have no coefficients and will have children. \\ \\ All leaf\nnodes will have coefficients and will not have children.\n\nIn the compressed form (wavelet basis), a tree has coefficients (a (\\textit{2k)}\\textit{\\textsuperscript{d}} tensor) at\nall levels. \\ \\ The scaling function block of the coefficients is zero except at level zero. \\ \\ Logically, this tree\nis one level shallower than the reconstructed tree since the scaling function coefficients at the leaves are\nrepresented by the difference coefficients on the next coarsest level. \\ However, to simplify the logic in compress and\nreconstruct and to maintain consistency with the non-standard compressed form (see below), we do not delete the leaf\nnodes from the reconstructed tree. \\ \\ Thus, the compressed tree has the same set of nodes as the reconstructed tree\nwith all interior nodes having coefficients and children, and all leaf nodes having no coefficients and no children. \\ \n\nIn the non-standard compressed form (redundant basis), we keep the scaling function coefficients at all levels and the\nwavelet coefficients for all interior nodes. \\ \\ Thus, the compressed tree has the same set of nodes as for the other\ntwo forms but with all nodes having coefficients (a (\\textit{2k)}\\textit{\\textsuperscript{d}} tensor for interior nodes\nand a \\textit{k}\\textit{\\textsuperscript{d}} tensor for leaf nodes) and with only leaf nodes having no children.\n\nTo keep complexity to a minimum we don't want to introduce special states of the tree or of nodes, thus all operations\nmust by their completion restore the tree to a standard state.\n\nTruncation is applied to a tree in compressed form and discards small coefficients that are logically leaf nodes.\n\\ \\ Logically, because in the stored tree we still have the empty nodes that used to hold the scaling coefficients.\n\\ For a node to be eligible for truncation it must have only empty children. \\ Thus, truncation proceeds as follows.\n\\ \\ We initially recur down the tree and for each node spawn a task that takes as arguments futures indicating if each\nof its children have coefficients. Leaf nodes, by definition, have no children and no coefficients and immediately\nreturn their status. Once a task has all information about the children it can execute. \\ \\ If any children have\ncoefficients a node cannot truncate and can immediately return its status. \\ \\ Otherwise, it must test the size of its\nown coefficients. \\ \\ If it decides to truncate, it must clear its own coefficients, delete all of its children, and\nset its \\texttt{has \\_children} flag to false. \\ \\ Finally, it can return its own status.\n\nAdding (subtracting) two functions is performed in the wavelet basis. \\ \\ If the trees have the same support (level of\nrefinement) we only have to add the coefficients. \\ \\ If the trees differ, then in addition to adding the coefficients\nwe must also maintain the has \\_children flag of the new tree to produce the union of the two input trees. \\ \\ To\npermit functions with different processor maps to be added efficiently, we loop over local data in one function and\nsend them to nodes of the other for addition. \\ \\ Sending a message to a non-existent node causes it to be created.\n\n\\section[Returning new functions {}-- selection of default parameters]{Returning new functions -- selection of default\nparameters}\nWhen returning a new function there is the question of what parameters (thresholds, distribution, etc.) should be used.\n\\ \\ There needs to a convention that is consistent with users' intuition as well as mechanisms for forcing different\noutcomes. \\ We choose to not use \\texttt{FunctionDefaults}. \\ \\ I.e., \\texttt{FunctionDefaults} is only used when the\nuser invokes the \\texttt{Function} constructor to fill unspecified elements of \\texttt{FunctionFactory}.\n\n\\subsection{Unary operations (e.g., scaling, squaring, copying, type conversion)}\nThe result copies all appropriate state from the input.\n\n\\subsection{Binary operations (e.g., addition, multiplication)}\nWriting the binary operation \\ \\ as a C++ method invocation f.op(g) there is a natural asymmetry that for consistency\nwith a unary operation leads to our choice to copy all appropriate state from the leftmost function, i.e., that which\nmethod is being invoked.\n\n\\subsection{Ternary and higher operations}\nThere are no C++ operators of this form and therefore these will always be of the form \\texttt{f.op(g,h)}and we make the\nsame choice as made for binary operations.\n\n\\subsection{C++ operator overloading and order of evaluation}\nThe main issue with the above convention is clarifying how C++ maps statements with overloaded\noperators\\footnote{\\ \\textrm{http://www.difranco.net/cop2334/Outlines/ch18.htm}} into method/function invocations which\nincludes understanding the order of\nevaluation\\footnote{\\ \\textrm{http://msdn2.microsoft.com/en-us/library/yck2zaey(vs.80).aspx}}. \\ \\ Overloading does not\nchange the precedence or associativity of an operator\\footnote{\\ \\textrm{http://www.difranco.net/cop2334/cpp \\_op\n\\_prec.htm}}. \\ \\ \\ \n\nNoting * is of higher precedence than + and both are left-to-right associative,\n\n\\begin{itemize}\n\\item \\texttt{f*g+h} becomes \\texttt{(f*g)+h} becomes \\texttt{(f.mul(g)).add(h)} and thus the result has the same\nparameters as \\texttt{f}.\n\\item \\texttt{h+f*g} becomes \\texttt{h+(f*g)} becomes \\texttt{h.add(f.mul(g))} and thus the result has the same\nparameters as \\texttt{h}.\n\\item \\texttt{f*g*h} has undefined order of evaluation since the two operators have equal precedence, but the compiler\nis not free to assume that multiplication is commutative and hence the result is either \\texttt{f.mul(g.mul(h))} or\n\\texttt{f.mul(g).mul(h)} which will both inherit the parameters of \\texttt{f}.\n\\end{itemize}\nIn summary, the result always has the parameters of the leftmost function in any expression. For greatest clarity,\nintroduce parentheses or invoke the actual methods/functions rather than relying upon operator overloading.\n\n\\subsection{Overriding above behaviors}\nOperations that produce results dependent upon thresholds, etc., must provide additional interfaces that permit\nspecification of all controlling parameters which will be used in the operation and preserved in the result. \\ \\ For\nall other operations, it suffices to make thresholds, etc., settable after the completion of an operation.\n\n\\section{External storage}\nI/O remains a huge problem on massively parallel computers and should almost never be used except for\ncheckpoint/restart. Several constraints must be borne in mind. First, we must avoid creating many files since parallel\nfile systems are easily over-whelmed if a few thousand processes simultaneously try to create a few tens of files each.\nSecond, I/O should be performed in large transactions with a tunable number of readers/writers in order to obtain the\nbest bandwidth. Third, we need random access to data so purely serial solutions are not acceptable. Finally, the\nexternal data representation should ideally be open and readily accessed by other codes.\n\nFor the purposes of I/O, we distinguish two types of objects. First, objects that will be written by a single process\nwith no involvement from other processes. Typically this would be just by the master process and the objects would be\nsmall enough to fit into the memory of a single processor. Second, large objects that will be transferred to/from disk\nin a collective manner with all processes in the world logically participating. Random read and write access must be\nfeasible for both types of objects.\n\n\\section[Viewing and editing this document]{Viewing and editing this document}\nUnder Linux ensure you have the Microsoft true-type fonts installed -- they are free. Under Ubuntu install package\n\\texttt{msttcorefonts}. Without these the default Linux fonts will cause pagination and other problems, at least with\nthe title pages.\n\nOther than resorting to Latex it does not seem possible to put documents under version control and have the changes\nmerged automatically. Subversion recognizes OpenOffice files as being of mime-type octet-stream and thus treats them as\nbinary, meaning that it does not attempt to merge changing. You must use the OpenOffice compare-and-merge facility to\nmanually merge changes yourself.\n\n\n\\bigskip\n\\end{document}\n"
  },
  {
    "path": "doc/Latex/parallel-runtime.tex",
    "content": "% This file was converted to LaTeX by Writer2LaTeX ver. 1.1.7\n% see http://writer2latex.sourceforge.net for more info\n\\documentclass[letterpaper]{article}\n\\usepackage[ascii]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage[english]{babel}\n\\usepackage{amsmath}\n\\usepackage{amssymb,amsfonts,textcomp}\n\\usepackage{color}\n\\usepackage{array}\n\\usepackage{hhline}\n\\usepackage{hyperref}\n\\hypersetup{pdftex, colorlinks=true, linkcolor=blue, citecolor=blue, filecolor=blue, urlcolor=blue, pdftitle=, pdfauthor=Robert Harrison, pdfsubject=, pdfkeywords=}\n% footnotes configuration\n\\makeatletter\n\\renewcommand\\thefootnote{\\arabic{footnote}}\n\\makeatother\n% Outline numbering\n\\setcounter{secnumdepth}{3}\n\\renewcommand\\thesection{\\arabic{section}}\n\\renewcommand\\thesubsection{\\arabic{section}.\\arabic{subsection}}\n\\renewcommand\\thesubsubsection{\\arabic{section}.\\arabic{subsection}.\\arabic{subsubsection}}\n% List styles\n\\newcommand\\liststyleLi{%\n\\renewcommand\\theenumi{\\arabic{enumi}}\n\\renewcommand\\theenumii{\\arabic{enumii}}\n\\renewcommand\\theenumiii{\\arabic{enumiii}}\n\\renewcommand\\theenumiv{\\arabic{enumiv}}\n\\renewcommand\\labelenumi{\\theenumi.}\n\\renewcommand\\labelenumii{\\theenumii.}\n\\renewcommand\\labelenumiii{\\theenumiii.}\n\\renewcommand\\labelenumiv{\\theenumiv.}\n}\n\\newcommand\\liststyleLii{%\n\\renewcommand\\theenumi{\\arabic{enumi}}\n\\renewcommand\\theenumii{\\arabic{enumii}}\n\\renewcommand\\theenumiii{\\arabic{enumiii}}\n\\renewcommand\\theenumiv{\\arabic{enumiv}}\n\\renewcommand\\labelenumi{\\theenumi.}\n\\renewcommand\\labelenumii{\\theenumii.}\n\\renewcommand\\labelenumiii{\\theenumiii.}\n\\renewcommand\\labelenumiv{\\theenumiv.}\n}\n\\newcommand\\liststyleLiii{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLiv{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLv{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLvi{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLvii{%\n\\renewcommand\\labelitemi{{}--}\n\\renewcommand\\labelitemii{{}--}\n\\renewcommand\\labelitemiii{{}--}\n\\renewcommand\\labelitemiv{{}--}\n}\n\\newcommand\\liststyleLviii{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLix{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n\\newcommand\\liststyleLx{%\n\\renewcommand\\labelitemi{${\\bullet}$}\n\\renewcommand\\labelitemii{${\\circ}$}\n\\renewcommand\\labelitemiii{${\\blacksquare}$}\n\\renewcommand\\labelitemiv{${\\bullet}$}\n}\n% Page layout (geometry)\n\\setlength\\voffset{-1in}\n\\setlength\\hoffset{-1in}\n\\setlength\\topmargin{0.7874in}\n\\setlength\\oddsidemargin{0.7874in}\n\\setlength\\textheight{8.825199in}\n\\setlength\\textwidth{6.9251995in}\n\\setlength\\footskip{0.6in}\n\\setlength\\headheight{0cm}\n\\setlength\\headsep{0cm}\n% Footnote rule\n\\setlength{\\skip\\footins}{0.0469in}\n\\renewcommand\\footnoterule{\\vspace*{-0.0071in}\\setlength\\leftskip{0pt}\\setlength\\rightskip{0pt plus 1fil}\\noindent\\textcolor{black}{\\rule{0.25\\columnwidth}{0.0071in}}\\vspace*{0.0398in}}\n% Pages styles\n\\makeatletter\n\\newcommand\\ps@Standard{\n  \\renewcommand\\@oddhead{}\n  \\renewcommand\\@evenhead{}\n  \\renewcommand\\@oddfoot{}\n  \\renewcommand\\@evenfoot{}\n  \\renewcommand\\thepage{\\arabic{page}}\n}\n\\newcommand\\ps@LeftPage{\n  \\renewcommand\\@oddhead{}\n  \\renewcommand\\@evenhead{}\n  \\renewcommand\\@oddfoot{\\thepage{}}\n  \\renewcommand\\@evenfoot{\\@oddfoot}\n  \\renewcommand\\thepage{\\arabic{page}}\n}\n\\newcommand\\ps@Licensepage{\n  \\renewcommand\\@oddhead{}\n  \\renewcommand\\@evenhead{}\n  \\renewcommand\\@oddfoot{}\n  \\renewcommand\\@evenfoot{}\n  \\renewcommand\\thepage{\\arabic{page}}\n}\n\\newcommand\\ps@Firstrightnumberedpage{\n  \\renewcommand\\@oddhead{}\n  \\renewcommand\\@evenhead{}\n  \\renewcommand\\@oddfoot{\\thepage{}}\n  \\renewcommand\\@evenfoot{\\@oddfoot}\n  \\renewcommand\\thepage{\\arabic{page}}\n}\n\\newcommand\\ps@Titlepage{\n  \\renewcommand\\@oddhead{}\n  \\renewcommand\\@evenhead{}\n  \\renewcommand\\@oddfoot{}\n  \\renewcommand\\@evenfoot{}\n  \\renewcommand\\thepage{\\arabic{page}}\n}\n\\makeatother\n\\pagestyle{Standard}\n\\newcounter{Figure}\n\\renewcommand\\theFigure{\\arabic{Figure}}\n\\title{}\n\\author{Robert Harrison}\n\\date{2009-12-14}\n\\begin{document}\n\\clearpage\\setcounter{page}{1}\\pagestyle{Licensepage}\n\\thispagestyle{Titlepage}\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n{\\centering\\bfseries\nMADNESS\n\\par}\n\n\\begin{center}\n\\begin{minipage}{}\n\\liststyleLi\n\\begin{enumerate}\n\\item {\\ttfamily\n\\#define WORLD\\_INSTANTIATE\\_STATIC\\_TEMPLATES}\n\\item {\\ttfamily\n\\#include {\\textless}world/world.h{\\textgreater}}\n\\item \n\\bigskip\n\\item {\\ttfamily\nusing namespace std;}\n\\item {\\ttfamily\nusing namespace madness;}\n\\item \n\\bigskip\n\\item {\\ttfamily\nclass Array : public WorldObject{\\textless}Array{\\textgreater} \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ vector{\\textless}double{\\textgreater} v;}\n\\item {\\ttfamily\npublic:}\n\\item {\\ttfamily\n\\ \\ \\ \\ /// Make block distributed array with size elements}\n\\item {\\ttfamily\n\\ \\ \\ \\ Array(World\\& world, size\\_t size) }\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ : WorldObject{\\textless}Array{\\textgreater}(world), v((size-1)/world.size()+1)}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ process\\_pending();}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\};}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ /// Return the process in which element i resides}\n\\item {\\ttfamily\n\\ \\ \\ \\ ProcessID owner(size\\_t i) const \\{return i/v.size();\\};}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ Future{\\textless}double{\\textgreater} read(size\\_t i) const \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ if (owner(i) == world.rank())}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ return Future{\\textless}double{\\textgreater}(v[i-world.rank()*v.size()]);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ else}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ return send(owner(i), \\&Array::read, i);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\};}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ Void write(size\\_t i, double value) \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ if (owner(i) == world.rank())}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ v[i-world.rank()*v.size()] = value;}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ else}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ send(owner(i), \\&Array::write, i, value);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ return None;}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\};}\n\\item {\\ttfamily\n\\};}\n\\item \n\\bigskip\n\\item {\\ttfamily\nint main(int argc, char** argv) \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ initialize(argc, argv);}\n\\item {\\ttfamily\n\\ \\ \\ \\ madness::World world(MPI::COMM\\_WORLD);}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ Array a(world, 10000), b(world, 10000);}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ // Without regard to locality, initialize a and b}\n\\item {\\ttfamily\n\\ \\ \\ \\ for (int i=world.rank(); i{\\textless}10000; i+=world.size()) \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ a.write(i, 10.0*i);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ b.write(i, \\ 7.0*i);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\}}\n\\item {\\ttfamily\n\\ \\ \\ \\ world.gop.fence();}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ // All processes verify 100 random values from each array}\n\\item {\\ttfamily\n\\ \\ \\ \\ for (int j=0; j{\\textless}100; j++) \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ size\\_t i = world.rand()\\%10000;}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ Future{\\textless}double{\\textgreater} vala = a.read(i);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ Future{\\textless}double{\\textgreater} valb = b.read(i);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ // Could do work here until results are available}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ MADNESS\\_ASSERT(vala.get() == 10.0*i);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ MADNESS\\_ASSERT(valb.get() == \\ 7.0*i);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\}}\n\\item {\\ttfamily\n\\ \\ \\ \\ world.gop.fence();}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ if (world.rank() == 0) print({\\textquotedbl}OK!{\\textquotedbl});}\n\\item {\\ttfamily\n\\ \\ \\ \\ finalize();}\n\\item {\\ttfamily\n\\}}\n\\end{enumerate}\n{\\centering\\itshape\nFigure {\\refstepcounter{Figure}\\theFigure\\label{seq:refFigure0}}: Complete example program illustrating the\nimplementation and use of a crude, block-distributed array upon the functionality of \\texttt{WorldObject}.\n\\par}\n\\end{minipage}\n\\end{center}\n\\begin{center}\n\\begin{minipage}{}\n\\liststyleLii\n\\begin{enumerate}\n\\item {\\ttfamily\n\\#define WORLD\\_INSTANTIATE\\_STATIC\\_TEMPLATES}\n\\item {\\ttfamily\n\\#include {\\textless}world/world.h{\\textgreater}}\n\\item {\\ttfamily\nusing namespace madness;}\n\\item \n\\bigskip\n\\item {\\ttfamily\nclass Foo : public WorldObject{\\textless}Foo{\\textgreater} \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ const int bar;}\n\\item {\\ttfamily\npublic:}\n\\item {\\ttfamily\n\\ \\ \\ \\ Foo(World\\& world, int bar) : WorldObject{\\textless}Foo{\\textgreater}(world), bar(bar)}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ process\\_pending();}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\};}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ int get() const \\{return bar;\\};}\n\\item {\\ttfamily\n\\};}\n\\item \n\\bigskip\n\\item {\\ttfamily\nint main(int argc, char** argv) \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ initialize(argc, argv);}\n\\item {\\ttfamily\n\\ \\ \\ \\ madness::World world(MPI::COMM\\_WORLD);}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ Foo a(world,world.rank()), b(world,world.rank()*10);}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ for (ProcessID p=0; p{\\textless}world.size(); p++) \\{}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ Future{\\textless}int{\\textgreater} futa = a.send(p,\\&Foo::get);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ Future{\\textless}int{\\textgreater} futb = b.send(p,\\&Foo::get);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ // Could work here until the results are available}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ MADNESS\\_ASSERT(futa.get() == p);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ MADNESS\\_ASSERT(futb.get() == p*10);}\n\\item {\\ttfamily\n\\ \\ \\ \\ \\}}\n\\item {\\ttfamily\n\\ \\ \\ \\ world.gop.fence();}\n\\item {\\ttfamily\n\\ \\ \\ \\ if (world.rank() == 0) print({\\textquotedbl}OK!{\\textquotedbl});}\n\\item \n\\bigskip\n\\item {\\ttfamily\n\\ \\ \\ \\ finalize();}\n\\item {\\ttfamily\n\\}}\n\\end{enumerate}\n{\\centering\\itshape\nFigure {\\refstepcounter{Figure}\\theFigure\\label{seq:refFigure1}}: Simple client-server program implemented using\n\\texttt{WorldObject}.\n\\par}\n\\end{minipage}\n\\end{center}\n{\\centering\\bfseries\nParallel Runtime\n\\par}\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n{\\centering\nLast modification: 12/14/09\n\\par}\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\n\n\\bigskip\n\nThis file is part of MADNESS.\n\nCopyright (C) 2007 Oak Ridge National Laboratory\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public\nLicense as published by the Free Software Foundation; either version 2 of the License, or(at your option) any later\nversion.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied\nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free\nSoftware Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\nFor more information please contact:\n\nRobert J. Harrison\n\nOak Ridge National Laboratory\n\nOne Bethel Valley Road\n\nP.O. Box 2008, MS-6367\n\nOak Ridge, TN 37831\n\n\n\\bigskip\n\nemail: harrisonrj@ornl.gov \n\ntel: \\ \\ 865-241-3937\n\nfax: \\ \\ 865-572-0680\n\n\\setcounter{tocdepth}{10}\n\\renewcommand\\contentsname{Table of Contents}\n\\tableofcontents\n\n\\bigskip\n\n\\clearpage\n\\bigskip\n\n\\clearpage\\setcounter{page}{1}\\pagestyle{LeftPage}\n\\thispagestyle{Firstrightnumberedpage}\n\nThis documents provides an introduction to programming with the MADNESS parallel runtime and describes some of the\nimplementation details. The runtime is used for the actual implementation of the MADNESS numerical capabilities and at\nleast some understanding of the runtime is required by applications using the numerical tools. Also, the runtime may be\nused independently of the rest of MADNESS and will be separately distributed at some point in the future.\n\n\\section{Overview}\nThe MADNESS parallel programming environment combines several successful elements from other models and aims to provide\na rich and scalable framework for massively parallel computing while seamlessly integrating with legacy applications\nand libraries. In particular, it is completely compatible with existing MPI and Global Array applications. All code is\nstandard C++ tested for portability with a variety of compilers including the IBM, GNU, Intel, Portland Group, and\nPathscale compilers. It includes\n\n\\liststyleLiii\n\\begin{itemize}\n\\item Distributed sparse containers with one-sided access to items, transparent remote method invocation, an\nowner-computes task model, and optional user control over placement/distribution.\n\\item Distributed objects that can be globally addressed.\n\\item Futures (results of unevaluated expressions) for composition of latency tolerant algorithms and expression of\ndependencies between tasks.\n\\item Globally accessible task queues in each process which \\ can be used individually or collectively to provide a\nsingle global task queue.\n\\item Serialization framework to facilitate transparent interprocess communication.\n\\item Work stealing for dynamic load balancing (coming v. soon).\n\\item Facile management of computations on processor sub-groups.\n\\item Integration with MPI\n\\item Active messages to items in a container, distributed objects, and processes\n\\item Kernel-space threading for use of multi-core processors.\n\\end{itemize}\n\\section{Motivations and attributions}\nThere were several motivations for developing this environment.\n\n\\liststyleLiv\n\\begin{itemize}\n\\item The rapid evolution of machines from hundreds (pre-2000), to millions (post-2008) of processors demonstrates the\nneed to abandon process-centric models of computation and move to paradigms that virtualize, generalize or even\neliminate the concept of process. \\ \n\\item The success of applications using the Charm++ environment to scale rapidly to 30+K processes and the enormous\neffort required to scale most process-centric applications.\n\\item The arrival of multi-core processes and the consequent requirement to express much more concurrency and to adopt\ntechniques for latency hiding motivate the use of light weight work queues to capture much more concurrency and the use\nof futures for latency hiding.\n\\item The complexity of composing irregular applications in partitioned, global-address space (PGAS) models using only\nMPI and/or one-sided memory access (GA, UPC, SHMEM, co-Array) motivates the use of an object-centric active-message or\nremote method invocation (RMI) model so that computation may be moved to the data with the same ease as which data can\nbe moved. \\ This greatly simplifies the task of maintaining and using distributed data structures.\n\\item Interoperability with existing programming models to leverage existing functionality and to provide an\nevolutionary path forward.\n\\item The main early influences for this work were\n\n\\begin{itemize}\n\\item Cilk (Kuszmaul, http://supertech.csail.mit.edu/cilk), \n\\item Charm++ (Kale, http://charm.cs.uiuc.edu),\n\\item ACE (Schmidt, http://www.cs.wustl.edu/\\~{}schmidt/ACE.html),\n\\item STAPL (Rauchwerger and Amato, http://parasol.tamu.edu/groups/rwergergroup/research/stapl), and\n\\item the HPCS language projects and the very talented teams and individuals developing these\n\n\\begin{itemize}\n\\item X10, http://domino.research.ibm.com/comm/research\\_projects.nsf/pages/x10.index.html\n\\item Chapel, http://chapel.cs.washington.edu\n\\item Fortress, http://fortress.sunsource.net\n\\end{itemize}\n\\end{itemize}\n\\end{itemize}\n\\section{Programming environment and capabilities}\nThe entire parallel environment is encapsulated in an instance of the class \\texttt{World} that is instantiated by\nwrapping an MPI communicator. Multiple worlds may exist, overlap, and can be dynamically created and destroyed. Each\nworld has a unique identity and the creation and destruction of a world are a collective operations involving all\nprocesses that participate in the world. To ensure full compatibility with existing MPI programs, the concept of\nplace/location/process/rank is defined to be the same as MPI process.\n\nThe \\texttt{World} class is intended to provide one-stop shopping for the parallel programming environment and, in\nparticular, a uniform and consistent state that is always available. A local pointer to a world object may be passed to\nanother process that is a member of the same world. During (de-)serialization the pointer is automatically translated\nso that in the remote process it correctly points to the local copy of the object. The class has members\n\n\\liststyleLv\n\\begin{itemize}\n\\item \\texttt{mpi} - an instance of \\texttt{WorldMPIInterface} that wraps standard MPI functionality to enable\ninstrumentation, though you can obtain the wrapped MPI communicator and call the standard MPI interface directly.\n\\item \\texttt{am} - an instance of \\texttt{WorldAMInterface} that provides low-level active message services. It is not\nintended for direct application use but rather as the framework upon which new parallel programming tools can be\nimplemented.\n\\item \\texttt{taskq} - an instance of \\texttt{WorldTaskQueue} that provides a light-weight task queue within each\nprocess that is accessible from all other processes in the world.\n\\item \\texttt{gop} -- an instance of WorldGopInterface that provides additional global operations including collective\noperations that are compatible with simultaneous processing of active messages and tasks.\n\\end{itemize}\nWithin a world, distributed objects and containers (currently associative arrays or hash tables, with dense arrays\nplanned) may be constructed.\n\n\\subsection{Distributed or world objects}\nA distributed object has a distinct instance in each process of a world, but all share a common unique identifier. Thus,\njust like for a pointer to the World instance, a local pointer or reference to a distributed object is automatically\ntranslated during (de)serialization when sent to another process. Messages (method invocation) and tasks may be sent\ndirectly to such objects from any other process in the world.\n\nFigure \\ref{seq:refFigure1} contains the complete source for a program that creates two instances (\\texttt{a} and\n\\texttt{b} on line 20) of type \\texttt{Foo} that serve distinct values from each MPI process. \\ These are global\nobjects but no synchronization is required before they may be used since messages to objects that are not yet locally\nconstructed are automatically buffered. \\ Lines 23 and 24 illustrate how messages (method invocation) can be sent to\ncorresponding instances in any other process and how results are returned via a future that will hold the result when\nit finally becomes available. The sample program immediately attempts to read the values (lines 26 and 27) and will\nwait until the value becomes available. Incoming active messages and any queued tasks are processed while waiting. The\nfence at line 29 ensures all data motion is globally complete before terminating the program. The comment on line 25\nindicates the opportunity to do other work before forcing a future; indeed, this is their \\textit{raison\nd'}\\textit{\\^e}\\textit{tre}. \\ They facilitate asynchronous communication/computation and the hiding of both hardware\nand algorithmic latency. Futures may be probed without blocking to determine status and below we will see how to\nregister callbacks in a future to be invoked when it is assigned. \n\nExamining the implementation of \\texttt{Foo} in figure \\ref{seq:refFigure1}, it inherits from\n\\texttt{WorldObject{\\textless}Foo{\\textgreater}} using the curiously recurring template pattern. This is because the\nbase class needs the name of the derived class to forward remote method invocations. The \\texttt{Foo} constructor\ninitializes the base class and after finishing its own initialization (minimal here) invokes\n\\texttt{process\\_pending()} to consume any messages that arrived before it was constructed. It is not possible to\ninvoke this from the base class constructor since the derived class would not yet be fully constructed. Note that the\n\\texttt{get()} method does not need to be modified from the natural sequential version -- the send() template inherited\nfrom \\texttt{WorldObject{\\textless}Foo{\\textgreater}} takes care of wrapping the return value in a future. Appropriate\nreference counting is used behind the scenes to ensure that locally allocated memory persists until the remote\noperation completes (i.e., the result of a remote operation may be safely discarded). Finally, the first line of the\nprogram requests that code for static members of \\texttt{WorldObject{\\textless}Foo{\\textgreater}} be instantiated in\nthe corresponding object file. This is a consequence of staying within standard C++ and not invoking any preprocessor\nto automate this process. In more sophisticated use, the ownership of a dynamically allocated \\texttt{WorldObject} can\nbe passed to the world (using a Boost-like shared pointer) for deferred destruction. At each global synchronization the\nworld examines the reference count of registered objects to determine if any can be freed. Thus, actual destruction of\nsuch an object is deferred until the next global synchronization. In turn, this enables multiple such objects to be\nsafely created and destroyed without any otherwise unnecessary global synchronization. No such sophistication is\nnecessary in this example since we are happy with the introduction of the single global fence.\n\nFigure \\ref{seq:refFigure0} provides the complete implementation and example use of a crude, block-distributed array\nusing the \\texttt{WorldObject} functionality. First looking at the main program, on line 40 two distinct arrays are\ninstantiated. \\ Inside a parallel loop, the elements of the arrays are initialized without using locality at lines 44\nand 45. The fence at line 47 ensures all data motion is complete before attempting to read from the array. This is only\nnecessary with multiple readers or writers since a single process is guaranteed a sequentially consistent view due to\nthe world active-message layer guaranteeing in-order processing of messages. Reading an array element (lines 52 and 53)\nreturns a \\texttt{Future{\\textless}double{\\textgreater}} that will hold the result when it finally becomes available. \n\nTurning to the implementation of the \\texttt{Array} class in Figure \\ref{seq:refFigure0}, reading and writing elements\nis immediate if the element is local (lines 22 and 29), otherwise\n\\texttt{WorldObject{\\textless}Array{\\textgreater}.send() }is used to forward the request to the \\texttt{Array} object\nin the owning process, passing arguments as necessary. Attentive readers will have noticed that the \\texttt{write()}\nmethod returns \\texttt{Void} rather than \\texttt{void}. This is merely to simplify the current implementation that\nwould otherwise require specialization of most templates to handle \\texttt{void} results. Once the interface has\nstabilized this design choice will be reconsidered. Futures of type \\texttt{void} and \\texttt{Void} are minimal stubs\nand cause no communication.\n\nThere are two main restrictions on methods that are invoked remotely. First, the arguments must be values or constant\nreferences and must be serializable (see below). Pointers to \\texttt{World}, or pointers or references to\n\\texttt{WorldObjects} are automatically translated to refer to the appropriate remote object, but any other pointers\nare the responsibility of the application (though their translation via serialization may also be automated). Second,\nthe method itself must not block, e.g., by forcing another future. This restriction can be greatly relaxed, but is\npresently enforced to avoid potential stack overflow and other problems due to deeply-nested invocation of handlers.\n\n{}- - - - - - - - - - - STOPPED HERE ... lots more to do .....\n\n\\subsection{Distributed or world containers}\nDistributed containers are distributed objects specialized to provide the services expected of a container and to pass\nmessages directly to objects in the container. The latter enables non-process centric parallel computation in the sense\nthat all messaging is between objects addressed with user-defined names and with transparent association of names to\nprocesses. BLAH BLAH ...\n\nThe only currently provided containers are associative arrays or maps. \\ The underlying sequential container on each\nprocess is either the GNU \\texttt{hash\\_map} or the TR1 \\texttt{unordered\\_map}. \\ A map generalizes the concept of an\narray (that maps an integer index in a dense range to a value) by mapping an arbitrary key to a value. This is a very\nnatural, general and efficient mechanism for storing sparse data structures. \\ The distribution between processes of\nitems in the container is based upon a function which maps the key to a process. \\ The default mapping is a\npseudo-random uniform mapping based upon a strong hash function, but the user can provide their own (possibly\ndata-dependent) operator to control the distribution. \\ \n\nAlthough it presently the case that all processes agree on the mapping of a key to a process, this does not have to be\nthe case. The implementation is designed to support forwarding of remote requests though this code is not yet enabled\nor tested. The point is that it may be effective to perform local redistributions of data in order to address load or\nmemory problems rather than globally changing the map which must be deferred until a synchronization point.\n\nThe keys and values associated with containers must be serializble by the MADNESS archive mechanism.\n\nPlease refer to world/archive/archive.h and documentation therein for information about this. \\ In addition, the keys\nmust support\n\n\\ {}- testing for equality, either by overloading {\\textbackslash}c == or by \\ specializing {\\textbackslash}c\nstd::equal\\_to{\\textless}key\\_type{\\textgreater}, and\n\n\\ {}- computing a hash value by invoking {\\textbackslash}c madness::hash(key), which can be done either by providing a\nmember function with signature\n\n{\\textbackslash}code\n\n\\ \\ \\ hashT hash() const;\n\n{\\textbackslash}endcode\n\n\\ \\ \\ or by specializing {\\textbackslash}c madness::Hash{\\textless}key\\_type{\\textgreater}.\n\nhashT is presently an unsigned 32-bit integer. \\ MADNESS provides hash operations for all fundamental types, and\nvariable and fixed dimension arrays of the same. \\ Since having a good hash is important, we are using Bob Jenkin's\n{\\textquotedbl}lookup v3{\\textquotedbl} hash\\footnote{\\ http://www.burtleburtle.net/bob/c/lookup3.c}.\n\nHere is an example of a key that might be used in an octtree.\n\n{\\ttfamily\n\\ \\ \\ struct Key \\{}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ typedef unsigned long ulong;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ ulong n, i, j, k;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ hashT hashval;}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ Key() \\{\\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ // Precompute the hash function for speed}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ Key(ulong n, ulong i, ulong j, ulong k)}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ : n(n), i(i), j(j), k(k), hashval(madness::hash(\\&this-{\\textgreater}n,4,0)) \\{\\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ hashT hash() const \\{}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ return hashval;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\};}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ template {\\textless}typename Archive{\\textgreater}}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ void serialize(const Archive\\& ar) \\{}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ ar \\& n \\& i \\& j \\& k \\& hashval;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\}}\n\n\n\\bigskip\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ bool operator==(const Key\\& b) const \\{}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ // Different keys will probably have a different hash}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ return hashval==b.hashval \\&\\& n==b.n \\&\\& i==b.i \\&\\& j==b.j \\&\\& k==b.k;}\n\n{\\ttfamily\n\\ \\ \\ \\ \\ \\ \\ \\};}\n\n{\\ttfamily\n\\ \\ \\ \\};}\n\n\n\\bigskip\n\nTo be added\n\n\\liststyleLvi\n\\begin{itemize}\n\\item discussion of chaining hashes using initval optional argument\n\\item discussion of overriding the distribution across processes\n\\end{itemize}\n\n\\bigskip\n\n\\subsubsection{Tasks, task queues, futures, and dependencies}\nThis is the heart of the matter ...\n\n\\subsubsection{Serialization}\nSerialization ...BLAH BLAH ...\n\n\\section{Recommended programming paradigms}\nBLAH BLAH ..\n\nThe recommended approaches to develop scalable and latency tolerant parallel algorithms are either object- or\ntask-centric decompositions rather than the process-centric approach usually forced upon MPI applications. \\ The\nobject-centric approach uses distributed containers (or distributed objects) to store application data. \\ Computation\nis expressed by sending tasks or messages to objects, using the task queue to automatically manage dependencies\nexpressed via futures. Placement of data and scheduling or placement of computation can be delegated to the container\nand task queue, unless there are specific performance concerns in which case the application can have full knowledge\nand control of these.\n\nItems in a container may be accessed largely as if in a standard STL container, but instead of returning an iterator,\naccessors instead return a Future{\\textless}iterator{\\textgreater}. A future is a container for the result of a\npossibly unevaluated expression. \\ In the case of an accessor, if the requested item is local then the result is\nimmediately available. However, if the item is remote, it may take some time before the data is made available locally.\n\\ You could immediately try to use the future, which would work but with the downside of internally waiting for all of\nthe communication to occur. \\ Much better is to keep on working and only use the future when it is ready.\n\nAside:\n\n\\liststyleLvii\n\\begin{itemize}\n\\item To avoid a potentially unbounded nested invocation of tasks which could overflow the stack and also be the source\nof live/deadlocks, new tasks are not presently started while blocking for communication. This will be relaxed in the\nnear future which will reduce the negative impact of blocking for an unready future as long as there is work to perform\nin the task queue.\n\\item Once fibers or user-space threads are integrated, multiple tasks will always be scheduled and blocking will merely\nschedule the next fiber.\n\\end{itemize}\n\n\\bigskip\n\nBy far the best way to compute with futures is to pass them as arguments to a new task. \\ Once the futures are ready,\nthe task will be automatically scheduled for execution. \\ Tasks that produce a result also return it as a future, so\nthis same mechanism may be used to express dependencies between tasks.\n\nThus, a very natural expression of a parallel algorithm is as a sequence of dependent tasks. \\ For example, in MADNESS\nmany of the algorithms working on distributed, multidimension trees start with just a single task working on the root\nof the tree, with all other processes waiting for something to do. \\ That one task starts recursively (depth or breadth\nfirst) traversing the tree and generating new tasks for each node. \\ These in turn generate more tasks on their\nsub-trees.\n\nThe execution model is sequentially consistent. \\ That is, from the perspective of a single thread of execution,\noperations on the same local/remote object behave as if executed sequentially in the same order as programmed. \\ \\ This\nmeans that performing a read after a write/modify returns the modified value, as expected. Such behavior applies only\nto the view of a single thread -- the execution of multiple threads and active messages from different threads may be\ninterleaved arbitrarily.\n\n\\subsection{Abstraction overhead}\nCreating, executing, and reaping a local, null task with no arguments or results presently takes about 350ns (Centos 4,\n3GHz Core2, Pathscale 3.0 compiler, -Ofast). \\ The time is dominated by \\texttt{new} and and \\texttt{delete} of the\ntask structure, and as such is unlikely to get any faster except by caching and reusing the task structures.\n\\ \\ Creating and then executing a chain of dependent tasks with the result of one task fed as the argument of the next\ntask (i.e., the input argument is an unevaluated future that will be assigned by the next task) requires about 1us per\ntask (3 GHz Core2). \\ \n\nCreating a remote task adds the overhead of interprocess communication which is on the scale of 1-3us (Cray XT). \\ Note\nthat this is not the actual wall-time latency since everything is presently performed using asynchronous messaging and\npolling via MPI. \\ The wall-time latency, which is largely irrelevant to the application if it has expressed enough\nparallelism, is mostly determined by the polling interval which is dynamically adjusted depending upon the amount of\nlocal work available to reduce the overhead from polling. \\ We can improve the runtime software through better\nagregation of messages and use of deeper message queues to reduce the overhead of remote task creation to essentially\nthat of a local task.\n\nThus, circa 1us defines the granularity above which it is worth considering encapsulating work (c.f., Hockney's n1/2).\n\\ However, this is just considering the balance between overhead incurred v.s. useful work performed. \\ The automatic\nscheduling of tasks dependent upon future arguments confers additional benefits, including\n\n\\liststyleLviii\n\\begin{itemize}\n\\item \\ hiding the wall-time latency of remote data access,\n\\item \\ removing from the programmer the burden of correct scheduling of dependent tasks, \n\\item expressing all parallelism at all scales of the algorithm for facile scaling to heavily multi-core architectures\nand \\ massively parallel computers, and\n\\item virtualizing the system resources for maximum future portability and scalability.\n\\end{itemize}\nAvailable memory limits the number of tasks that can be generated before any are consumed. \\ In addition to application\nspecific data, each task consumes circa 64 bytes on a 64-bit computer. \\ Thus, a few hundred thousand outstanding tasks\nper processor are eminently feasible even on the IBM BG/L. \\ Rather than making the application entirely responsible\nfor throttling it's own task production (which it can), if the system exceeds more than a user-settable number of\noutstanding tasks, it starts to run ready tasks before accepting new tasks. \\ The success of this strategy presupposes\nthat there are ready tasks and that these tasks on average produce less than one new task with unsatisfied dependencies\nper task run. \\ Ultimately, similar to the Cilk sequentially-consistent execution model, safe algorithms (in the same\nsense as safe MPI programs) must express tasks so that dependencies can be satisfied without unreasonable expectation\nof buffering.\n\nIn a multiscale approach to parallelism, coarse gain tasks are first enqueued, and these generate finer-grain tasks,\nwhich in turn generate finer and finer grain work. \\ \\ [Expand this discussion and include examples along with work\nstealing discussion]\n\nDiscussion points to add\n\n\\liststyleLix\n\\begin{itemize}\n\\item Why arguments to tasks and AM via DC or taskQ are passed \\ \\ \\ \\ by value or by const-ref (for remote operations\nthis should be clear; for local operations it is to enable tasks to be stealable). \\ Is there a way to circumvent it?\nPointers.\n\\item Virtualization of other resources\n\\item Task stealing\n\\item Controlling distribution in containers\n\\item Caching in containers\n\\item Computing with continuations (user space fibers)\n\\item Priority of hints for tasks\n\\end{itemize}\n\\section[C++ Gotchas]{C++ Gotchas}\n\\subsection{Futures and STL vectors}\nA common misconception is that STL containers initialize their contents by invoking the default constructor of each item\nin the container since we are told that the items must be default constructible. \\ But this is\\textit{ incorrect}.\n\\ The items are initialized by invoking the copy constructor for each element on a \\textit{single }object made with the\ndefault constructor. \\ \\ For futures this is a very bad problem. \\ For instance,\n\n\\ \\ \\ \\texttt{vector{\\textless} Future{\\textless}double{\\textgreater} {\\textgreater} v(3);}\n\nis equivalent to the following with an array of three elements\n\n\\ \\ \\ \\texttt{Future{\\textless}double{\\textgreater} junk;}\n\n{\\ttfamily\n\\ Future{\\textless}double{\\textgreater} v[3] = \\{junk,junk,junk\\};}\n\nSince the Future copy constructor is by necessity shallow, each element of \\texttt{v} ends up referring to the future\nimplementation that underlies \\texttt{junk}. \\ When you assign to an element of \\texttt{v}, you'll also be assigning to\n\\texttt{junk}. \\ But since futures are single assignment variables, you can only do that once. \\ Hence, when you assign\na second element of \\texttt{v} you'll get a runtime exception.\n\nThe fix (other than using arrays) is to initialize STL vectors and other containers from the special element returned by\n\\texttt{Future{\\textless}T{\\textgreater}::default\\_initializer()} that if passed into the copy constructor will cause\nit to behave just like the default constructor. Thus, the following code is what you actually need to use an STL vector\nof futures\n\n\\ \\ \\ \\texttt{vector{\\textless} Future{\\textless}double{\\textgreater} {\\textgreater}\nv(3,Future{\\textless}double{\\textgreater}::default\\_initializer());}\n\nwhich, put politely, is ugly. Thus, we provide the factory function\n\n\\ \\ \\texttt{\\ template {\\textless}typename T{\\textgreater}\\newline\n \\ \\ vector{\\textless} Future{\\textless}T{\\textgreater} {\\textgreater} future\\_vector\\_factory(std::size\\_t n);}\n\nthat enables one to write\n\n\\ \\ \\ vector{\\textless} Future{\\textless}double{\\textgreater} {\\textgreater} v =\nfuture\\_vector\\_factory{\\textless}double{\\textgreater}(3);.\n\n\\section{Multi-threading, the task queue, active messages and SMP parallelism}\nThis design is in flux but the overall objectives are to provide a model and set of abstractions that are compact and\nwell defined so that they may readily understood and reasoned about, yet rich enough to achieve compact and\nhigh-performance expression of most algorithms.\n\nKey design points:\n\n\\liststyleLx\n\\begin{itemize}\n\\item MADNESS can be configured to build either with or without threads. If configured with threads the number of active\nthreads can be adjusted at runtime.\n\\item The only guaranteed source of SMP/multi-threaded concurrency is from the task queue.\n\\item Active messages from a given source are executed sequentially in the order sent -- this is so that they may be\nused to maintain data structures with no additional logic necessary for the application to enforce sequential\nconsistency.\n\\item Active messages from distinct sources may be executed in any order or concurrently. Presently, one thread is\ndevoted to handling all active messages so there is no concurrency at all within the active message queue, but this\nwill change once the active message queue and task queues are unified.\n\\item The main thread of execution may execute concurrently with the active message and task pool threads. Presently,\nthe main thread also acts as the active message thread and in the absence of other work will execute tasks from the\nqueue.\n\\item All World interfaces are thread safe (are there any exceptions?). In particular, WorldContainers and the provided\nfunctionality of WorldObjects are thread safe as is the reference counting in SharedPtr.\n\\item Parallel applications written using only MADNESS World constructs (tasks, containers, futures, and active\nmessages) will not need additional mechanisms for SMP concurrency or synchronization. However, some applications will\nhave additional shared data structures and provided are classes for facile use of threads, mutexes and locking\npointers. At the lowest level are a portable (limited) set of atomic operations on integer data that are presently used\nto compose the SharedPtr and Mutex classes.\n\\end{itemize}\nHow to think about all this?\n\nWhere possible compose your application in terms of tasks with dependencies via futures. This provides the maximum\nconcurrency and as additional task attributes are introduced will enable the most efficient scheduling of work. The\noverhead of making, executing and reaping a task is about 1us, so a task's runtime should be bigger than circa 10us\nunless there is additional latency (algorithmic or communication) that will be hidden by making a task. If tasks are\ntoo long there may be load-balancing problems. Unless it is unduly cumbersome to split the problem into small tasks\nthere is no reason to make tasks larger than circa 1ms (exception to this is pushing/stealing tasks that may have\ncommunication overhead).\n\nWhen to use active messages rather than a task? The main benefits of AM are sequential consistency (from the perspective\nof the sending process) and high priority for their execution. To keep the real AM latency to a minimum (which means\nyou need less concurrency to hide the latency) AM handlers should be lightweight. Presently, MADNESS does no\naggregation of messages but this is something that is clearly needed and would, for instance, reduce the overhead of\ncreating many remote tasks to about that of local task creation.\n\n\\section{Acknowledgments}\n\n\\bigskip\n\nDOE NSF DARPA ORNL NCCS UT\n\n\\section{References}\n\n\\bigskip\n\\end{document}\n"
  },
  {
    "path": "doc/Makefile",
    "content": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line, and also\n# from the environment for the first two.\nSPHINXOPTS    ?=\nSPHINXBUILD   ?= sphinx-build\nSOURCEDIR     = .\nBUILDDIR      = build\n\n# Put it first so that \"make\" without argument is like \"make help\".\nhelp:\n\t@$(SPHINXBUILD) -M help \"$(SOURCEDIR)\" \"$(BUILDDIR)\" $(SPHINXOPTS) $(O)\n\n.PHONY: help Makefile\n\n# Catch-all target: route all unknown targets to Sphinx using the new\n# \"make mode\" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).\n%: Makefile\n\t@$(SPHINXBUILD) -M $@ \"$(SOURCEDIR)\" \"$(BUILDDIR)\" $(SPHINXOPTS) $(O)\n"
  },
  {
    "path": "doc/applications.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file applications.dox\n \\brief General information about MADNESS applications.\n \\addtogroup applications\n\n\\todo Write this section. Perhaps include the sample code (include MADNESS, etc.) and how to compile it.\n\n */\n"
  },
  {
    "path": "doc/conf.py",
    "content": "# Configuration file for the Sphinx documentation builder.\n#\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\n# import os\n# import sys\n# sys.path.insert(0, os.path.abspath('.'))\n\n# import myst_parser\n\n# -- Project information -----------------------------------------------------\n\nproject = 'MADNESS'\ncopyright = '2022, Florian Bischoff'\nauthor = 'Florian Bischoff'\n\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\"myst_parser\",\n\n              ]\n\nsource_suffix = [\".rst\", \".md\"]\nmyst_enable_extensions = [\n    \"amsmath\",\n    \"colon_fence\",\n    \"deflist\",\n    \"dollarmath\",\n    \"fieldlist\",\n    \"html_admonition\",\n    \"html_image\",\n    \"replacements\",\n    \"smartquotes\",\n    \"strikethrough\",\n    \"substitution\",\n    \"tasklist\",\n]\n\n\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = []\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'alabaster'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n"
  },
  {
    "path": "doc/configuration.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file configuration.dox\n  \\brief Notes on installing and configuring MADNESS.\n  \\addtogroup configuration\n\n  This section is superseded by the <a href=\"https://madness.readthedocs.io/en/latest/INSTALL.html\">MADNESS readthedocs</a>.\n\n */\n"
  },
  {
    "path": "doc/contribution/style.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file style.dox\n \\brief Coding style guidelines for MADNESS.\n \\addtogroup style\n\nMADNESS code should be documented using doxygen-style comment blocks. More\ninformation on doxygen can be found at <a href=\"http://www.doxygen.org\">the\ndoxygen website</a>. This module illustrates how to document your files with\ndoxygen. \n\n\\par General guidelines for doxygen\n\nEvery file needs \\c \\\\file and \\c \\\\brief near the top, and usually\n\\c \\\\addtogroup or \\c \\ingroup. If you have put the file in a group\nthen the file-level documentation acts as documentation for that\nmodule or group, otherwise it acts as documentation for the file.\nNote that doxygen is really picky about placement and association of\ncomments so you always have to check what was generated.\n\nLinks to known classes (such as \\c madness::World), functions (such as\n\\c madness::error()), and files (such as madness.h) are made\nautomatically.\n\n\\par Subsection title\n\nUse the \\c \\\\par directive to make subsections with an\noptional heading.  Doxygen's section and subsection directives\nshould not be used for now.\n\n\\par Example files\n\nHere is an example header file that appropriately uses doxygen comment blocks.\n\\code\n/// \\file example_doc.h\n/// \\brief Brief description of this file's contents.\n/// \\ingroup example_group\n\n// Add your code to a group, if desired, using the \\addtogroup command. See doc/mainpage.h for available groups.\n// The @{ and @} commands allow blocks of code to be added to the group.\n/// \\addtogroup possibly_different_example_group\n/// @{\n\n/// Every class should be documented (this is the brief line).\n\n/// This is the full text ... no need to be verbose, but without\n/// documentation your class is nearly useless.\nclass ExampleClass1 {\npublic:\n    int datum; ///< Each member datum needs at least a brief raison d'etre.\n\n    /// Each member function should be documented (this is the brief line).\n\n    /// Full documentation of the member function.\n    ///\n    /// You should document all arguments and return values.\n    /// @param[in] hope Optimism level.\n    /// @param[in] despair Pessimism level.\n    /// @return Cynicism level.\n    int reality(int hope, int despair) const;\n};\n\n/// Brief documentation of a second example class in the group.\n  \n/// Full documentation of the second example class.\nclass ExampleClass2 {\npublic:\n    /// Brief documentation of a member function.\n\n    /// Full documentation of the member function, including parameters\n    /// and return value.\n    /// @param[in] fud The current level of fear, uncertainty, and doubt.\n    /// @param[in,out] bs The current level of ...\n    /// @return Your state of mind.\n    int morose(int fud, int& bs) {};\n\n    void fred(double mary);    // Fred is documented in example_doc.cc\n    // We recommend, however, placing documentation in header files when possible.\n};\n\nint stuff; ///< Global variable in the example group.\n\n/// Global function in the example group.\n\n/// @param[in] a An input argument.\n/// @return The return value.\nint example_func(int a);\n\n// Closing group membership.\n/// @}\n\\endcode\n\nAnd here's the corresponding implementation file.\n\\code\n/// \\file example_doc.cc\n/// \\brief Illustrates how to split documentation between files.\n/// \\ingroup example_group\n\n#include \"example_doc.h\"\n\n/// Brief documentation of a class member declared in the header file.\n\n/// Full documentation of the class member.\n/// @param[in] mary Mary's current bank balance.\nvoid ExampleClass2::fred(double mary) {\n    return;\n}\n\\endcode\n*/\n"
  },
  {
    "path": "doc/contribution.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file contribution.dox\n  \\brief Notes on how to contribute to MADNESS.\n  \\addtogroup contribution\n\n  Join the <a href=\"https://github.com/m-a-d-n-e-s-s/madness\">MADNESS GitHub repository</a>.\n\n\n*/\n"
  },
  {
    "path": "doc/getting_started/gstart_basics.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file gstart_basics.dox\n  \\brief MADNESS basics.\n  \\addtogroup gstart_basics\n\n\nAdditional documentation and instructions exist in several places:\n- <a href=\"https://madness.readthedocs.io/en/latest\">MADNESS readthedocs</a>\n- <a href=\"https://github.com/m-a-d-n-e-s-s/madness\">MADNESS GitHub repository</a>\n\nFor basic computing with MADNESS functions, the only header file that you should need to include is `<mra/mra.h>`. Advanced programs may need a few others. You should include the directory in the include path to avoid possible conflicts with similarly named files from other packages. In the following documentation `trunk` will denote the top-level directory of the MADNESS distribution.\n\n\\par From math to C++ to numerical computation\n\nA perhaps more up to date version of this example is <a href=\"https://madness.readthedocs.io/en/latest/numerical_library.html\">here</a>.\n\nThis section shows you how to use MADNESS and evaluate a simple mathematical expression, notably this one dimensional integral.\n\\f[\n\\int_{0}^{10} \\sin (x) \\mathit{dx} = 1 - \\cos(10) \\doteq 1.8390715\n\\f]\nThe corresponding code is in `trunk/src/examples/sininteg.cc`, and we will go through this first example in gory detail. The main steps will be\n-# translating the function from math to C++ to be called by MADNESS\n-# initializing the MADNESS parallel runtime\n-# initializing the MADNESS numerical environment\n-# generating a numerical representation from the C++ function\n-# computing the integral\n-# printing the result\n-# terminating the MADNESS parallel runtime\n-# compiling your program\n-# running your program\n.\n\n\\par Step 1 -- translating from Math to C++\n\nMADNESS generates a numerical representation of a function (\\f$ f(x) \\f$) by projecting into its internal, orthonormal basis, \\f$\\{\\phi _{li}^{n}(x)\\}\\f$, see \\ref mra for more detail. This involves computing many integrals of the form \n\\f[\ns_{li}^{n} = \\int \\phi _{li}^{n}(x) f(x) \\mathit{dx}\n\\f]\nusing adaptive numerical quadrature. Thus, MADNESS has to be able to evaluate your function at an arbitrary point, and so you must provide it with a C++ implementation of your function using a standard interface. MADNESS passes to your function the coordinates (an array of the appropriate dimension) and you return the value. For simple functions, a C++ function suffices whereas more complicated stuff might require a C++ class (see a subsequent example).\n\nFor this example, we wish to evaluate the function \\f$\\sin(x)\\f$ where \\f$x\\f$ is a 1-D coordinate. The example code looks like\n\\code\n  double myf(const coord_1d& r) {\n    return std::sin(r[0]);\n  }\n\\endcode\nIf your function were in 3-D it would be passed a `coord_3d` that would have 3 elements (0, 1, and 2) that you might interpret as \\f$(x, y, z)\\f$ or \\f$(r, \\theta, \\phi)\\f$ or something else as defined by your problem. A very useful\ncapability of both Maple and Mathematica is to generate C from expressions or functions, though the resulting code often requires a little cleanup. \n\n\\attention \n- If your function contains discontinuities (in value or derivatives), noise, or singularities, special care is needed. This is discussed in more detail below, but the simple rule of thumb is your function should be accurate nearly to machine precision even if you only want to compute to much lower precision with MADNESS.\n\n- MADNESS will call your function from multiple threads in order to use multi-core processors efficiently, so the code for your function should be thread safe. It should not modify static (Fortran keyword `save`) or global (Fortran common blocks or modules) data; reading from such locations is fine. Note that this constraint applies to all code invoked by your function, including math, BLAS, and linear algebra libraries and for some machines/compilers it requires special options be used (the MADNESS makefiles look after this). If you suspect a thread problem, try running with the environment variable `MAD_NUM_THREADS` set to one.\n\n- If you are using the AMD math library ACML, do not set the environmental variable `OMP_NUM_THREADS` (or set it to one).\n.\n\n\n\\par Steps 2, 3 and 7 -- initializing and finalizing the MADNESS environment\n\nMADNESS has its own parallel runtime environment that is fully compatible with the Message Passing Interface (MPI). Just as for MPI, the MADNESS runtime must be initialized at the start and cleaned up at the end. Here is the simplest\nparallel program using MADNESS.\n\\code \n  #include <madness/mra/mra.h>\n  using namespace madness;\n  \n  int main(int argc, char** argv) {\n      initialize(argc, argv);\n      World world(SafeMPI::COMM_WORLD);\n      startup(world, argc, argv);\n    \n      // Do something useful here!\n      \n      finalize();\n      return 0;\n  }\n\\endcode\nThe `World` object in MADNESS is similar to an MPI communicator (each `World` is associated with a communicator) but contains all of the information necessary to provide the rich functionality of the MADNESS runtime. Instead of calling `%MPI::Init()` and `%MPI::Finalize()`, a MADNESS program invokes `madness::initialize()` and `madness::finalize()` (call `madness::initialized()` to check that MADNESS had been initialized). The routine `madness::startup()` initializes the MADNESS numerical environment.\n\n\\par Step 4 -- generating a numerical representation\n\nWe implemented the C++ function above (`myf`) and the domain is specified by the problem as \\f$x\\in [0,10]\\f$. Presently, all functions of a given dimension being used by a program are assumed to have the same, default domain. We will use the default precision (1e-6 in the L2-norm -- most errors in MADNESS use this norm).\n\\code\n  FunctionDefaults<1>::set_cubic_cell(0, 10);\n  \n  real_function_1d f = real_factory_1d(world).f(myf);\n\\endcode\nThe first line sets the domain and the second makes a numerical representation of your function. The slightly unusual form of the constructor for a MADNESS function is called the \"named parameter idiom.\" The first version of MADNESS was written in Python, which provides named parameters that can have default values. To override the default for some parameter only required specifying its name. However, C++ does not provide named parameters and the closest we can get to them is the above idiom. To make a `Function` what you are actually doing is making a `FunctionFactory` associated with a `World`, overriding defaults inside the factory, and then constructing a function from the factory. The default function is zero, so to make a zero 1D function we would just type\n\\code\n  real_function_1d zero = real_factory_1d(world);\n\\endcode\n\nIn the second line, to generate a MADNESS `Function` from your C++ function we override the default with the desired function pointer.\n\n\\par Step 5 -- computing the integral\n\nThe integral of a function over the whole domain is computed with the `trace()`\nfunction, c.f.,\n\\code\n  double integral = f.trace();\n\\endcode\n\n\\attention This is a collective parallel operation. If you are running in parallel, the numerical representation of your function is distributed across multiple processors, so adding up the result requires collective communication (the equivalent of MPI's `All_reduce()`). Therefore, every process associated with the `World` must execute this statement; otherwise your program will hang if it is running in parallel using MPI.\n\n\n\\par Step 6 -- printing the result\n\nIf you only want to run sequentially, just print your data in any of the myriad ways possible using C++. However, if you ever want to run in parallel across multiple nodes using MPI you should from the outset get in the habit of writing the following instead\n\\code\n  if (world.rank() == 0) print(\"The result is \", integral);\n\\endcode\nThe critical ingredient is the if-test that ensures only one process actually does the printing (in this case process zero, but that choice is arbitrary). If you don't do this, your output will be unexpectedly verbose. The templated routine `print()` is just a convenience wrapper around `cout <<` that automatically inserts spaces between elements and a newline at the end.\n\n\\attention We assigned the result of `f.trace()` to a variable because `trace` is a collective, but printing is serial. Anecdotally, at least 90\\% of hanging parallel programs are due to getting this wrong.\n\n\\par The complete program\n\nYour complete program, `trunk/src/apps/sininteg.cc`, looks like this\n\\code\n    #include <madness/mra/mra.h>\n    using namespace madness;\n    \n    double myf(const coord_1d& r) {\n        return std::sin(r[0]);\n    }\n    \n    int main(int argc, char** argv) {\n        initialize(argc, argv);\n        World world(SafeMPI::COMM_WORLD);\n        startup(world,argc,argv);\n        FunctionDefaults<1>::set_cubic_cell(0,10);\n        \n        real_function_1d f = real_factory_1d(world).f(myf);\n        \n        doub  le integral = f.trace();\n        \n        if (world.rank() == 0) print(\"The result is\", integral);\n\n        finalize();\n        return 0;\n    }\n\\endcode\nYes, this is rather verbose for integrating \\f$\\sin(x)\\f$ in 1D, but you should already be able to see that most of it is boiler plate. You could be integrating a much more complicated function in 4-D with only little more personal effort (the computer might have to work a lot harder though).\n\nPrevious: \\ref getting_started; Next: \\ref gstart_comp_run\n*/\n"
  },
  {
    "path": "doc/getting_started/gstart_comp_run.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file gstart_comp_run.dox\n  \\brief Documentation for compiling and running MADNESS programs.\n  \\addtogroup gstart_comp_run\n  \\todo Verify that the code snippets here aren't stale. They're imported from a 2010 document.\n\nPlease refer to the material in the <a href=\"https://github.com/m-a-d-n-e-s-s/madness/tree/master/doc/tutorial\">MADNESS tutorial</a> and <a href=\"https://madness.readthedocs.io/en/latest/INSTALL.html\">MADNESS readthedocs</a>.\n\nPrevious: \\ref gstart_basics; Next: \\ref gstart_functions\n*/\n"
  },
  {
    "path": "doc/getting_started/gstart_env_var.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file gstart_env_var.dox\n  \\brief Getting started with MADNESS: MADNESS environment variables.\n  \\addtogroup gstart_env_var\n\nThis section is superseded by the <a href=\"https://madness.readthedocs.io/en/latest\">MADNESS readthedocs</a>.\n\nPrevious: \\ref gstart_think_madness\n*/\n"
  },
  {
    "path": "doc/getting_started/gstart_functions.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file gstart_functions.dox\n  \\brief Getting started with MADNESS functions.\n  \\addtogroup gstart_functions\n\n\\par Defaults for functions\n\nDefault values for all function and operator attributes are stored in the `FunctionDefaults` class. This is actually a template so that different values can be set for functions with different numbers of dimensions. We saw earlier that\n\\code\nFunctionDefaults<1>::set_cubic_cell(0,10);\n\\endcode\nsets the user's simulation cell as \\f$[0,10]\\f$. Presently, all functions of a given dimension must share the same cell. Other common attributes are\n- `k` -- the wavelet order. A practical rule of thumb is if the default truncation threshold is \\f$10^{-n}\\f$, then the order should be chosen as \\f$k=n+2\\f$. The default is 6.\n- `thresh` -- the truncation threshold. The default is `1e-4`.\n- `bc` -- the boundary conditions. See below for more details. The default is free.\n.\n\n\n\\par Boundary conditions\n\nIn MADNESS, boundary conditions are associated with operators, not functions, and the boundary conditions are imposed on the surface enclosing the entire simulation volume. That is, they are exterior boundary conditions. For derivative operators the following conditions are understood, and can be imposed separately on each surface\n- `BC_ZERO` -- Zero Dirichlet\n- `BC_PERIODIC` -- Periodic (both left and right surfaces must agree on this value)\n- `BC_FREE` -- Free (default)\n- `BC_DIRICHLET` -- General Dirichlet (requires provision of one or more functions)\n- `BC_ZERONEUMANN` -- Zero Neumann\n- `BC_NEUMANN` -- General Neumann (requires provision of one or more functions)\n.\nFor integral operators only periodic and free-space conditions are understood -- `BC_PERIODIC` yields periodic and all other conditions yield free-space.\n\nExample: to make the default boundary conditions in 3D\n\\code\nBoundaryConditions<3> bc(BC_FREE);\n\\endcode\n\nExample: to make boundary conditions in 3D with zero Dirichlet in \\f$x\\f$ and \\f$y\\f$ and periodic in \\f$z\\f$,\n\\code\nBoundaryConditions<3> bc(BC_ZERO);\n\nbc(2,0) = bc(2,1) = BC_PERIODIC;\n\\endcode\n\nExample: to override the default boundary conditions with yours in a variable named `bc` in 3D\n\\code\nFunctionDefaults<3>::set_bc(bc);\n\\endcode\n\n\\par Differentiation, multiplication, inner products\n\nWe now examine operations such as differentiation, multiplication, and inner products. A relevant simple example is `trunk/src/examples/hatom_energy.cc`.\n\n<em>Differentiation</em>\n\nDifferentiation is performed by applying a differential operator to a function. The operator is constructed with desired the boundary conditions and direction for differentiation (directions are indexed starting from zero, so in 3D\n`x=0`, `y=1`, and `z=2`). The operators can be kept for repeated application, or made and discarded after use.\n\nFor example, to make the derivative operator in 3D with respect to the first variable using boundary conditions from `FunctionDefaults`, and to apply it to functions `f`, `g` and `h`:\n\\code\nreal_derivative_3d Dx(world, 0); \nreal_function_3d dfdx = Dx(f); \nreal_function_3d dgdx = Dx(g); \nreal_function_3d dhdx = Dx(h); \n\\endcode\n\n<em>Multiplication, addition, subtraction of functions</em>\n\nMost simple mathematical operations can be composed in MADNESS as they are normally written in standard notation. For instance, if `f`, `g` and `h` are functions the expression\n\\f[\nf(x) = 2g(x) + 3h(x) - 7g(x)h(x) + 99\n\\f]\nis transcribed as\n\\code\nf = 2*g + 3*h - 7*g*h + 99;\n\\endcode\nwhere `*` indicates point-wise multiplication of functions.\n\n\\attention Addition and subtraction of functions are exact operations in the sense that the result can be exactly represented in the MADNESS basis. Multiplication is \\em inexact since the product of two polynomials of order\n\\f$k\\f$ is of order \\f$2k\\f$. The auto-refinement algorithm within MADNESS is still under development -- please refer to the implementation notes for more detail.\n\n<em>Inner products</em>\n\nThe inner product of two functions is defined as \n\\f[\n\\left( f \\left| g \\right. \\right) = \\int f(x)^\\textrm{*} g(x) dx,\n\\f]\nwhere \\f$\\textrm{*}\\f$ indicates complex conjugation and the integral is taken over the entire simulation volume. The above is computed for two MADNESS functions `f` and `g` of the same type using\n\\code\ninner(f, g);\n\\endcode\nIf the input functions are real, the result is real; for complex functions the result is complex.\n\n\n\\par Integral operators\n\nThe Poisson equation\n\\f[\n\\nabla^{2} u = -4\\pi \\rho \n\\f]\nis ubiquitous in scientific and engineering simulations. For the sake of simplicity, we assume free-space boundary conditions (zero at infinity), such that the Green's function is just \\f$1/\\left| r \\right|\\f$. If the right-hand side of the Poisson equation is `rho`, then the Poisson equation can be solved in MADNESS as\n\\code\nreal_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n\nreal_function_3d result = op(rho);\n\\endcode\n\nThis is employed by many codes in the `examples` directory. The call to `CoulombOperator` builds a low-separation rank approximation (see the implementation notes) of the Green's function for the Poisson equation. The approximation is accurate to `1e-6` from a smallest length scale of 0.001 to the entire box size.\n\nIf you have more complicated boundary conditions which require single or double layer terms please refer the example in `trunk/src/examples/interior_dirichlet.cc` for more details.\n\n\n\\par Operations on vectors of functions\n\nThe header file `madness/mra/vmra.h` defines operations on vectors of functions. These are convenient in eliminating error-prone loops over arrays/vectors of functions, and the vector operations are much more efficient since many operations can occur in parallel. The example code `trunk/src/examples/vnucso.cc` and the molecular density functional code make extensive use of the vector API (application programming interface) to solve eigenproblems. Let us discuss this in more detail.\n\nGiven a subspace defined by a vector of \\f$n\\f$ functions, \\f$f_{i}(x),\\; i=0, \\ldots, n-1\\f$ we can diagonalize the operator \\f$\\hat{H}\\f$ in the subspace by constructing the matrix representations of the operator (\\f$\\mathbf{H}\\f$) and metric (\\f$\\mathbf{S}\\f$):\n\\f{eqnarray*}{\n\\mathbf{H}_{ij} & = & \\left< f_i \\left| \\hat{H} \\right| f_j \\right> \\\\\n\\mathbf{S}_{ij} & = & \\left< f_i \\left|         \\right. f_j \\right>,\n\\f}\nand then solving the generalized eigenvalue problem \n\\f[\n\\mathbf{HC}=\\mathbf{SC}E\n\\f]\nto obtain the eigenvalues and coefficients in the subspace. The eigenfunctions  \\f$u_{i}(x)\\f$ are obtained by transforming the original basis \n\\f[\n\\mathbf{u}=\\mathbf{fC} \\qquad \\mathrm{or} \\qquad u_{i}(x) = \\sum _{j} f_{j}(x) \\mathbf{c}_{ji}\n\\f]\n\nGiven an STL \\c vector of 3D functions, `f`, and another `Hf` containing the result of applying the operator \\f$\\hat{H}\\f$ to the vector, the above is compactly translated into MADNESS as\n\\code\nreal_tensor H = matrix_inner(world, f, Hf); \nreal_tensor S = matrix_inner(world, f, f); \nreal_tensor C, E; \n\nsygv(H, S, 1, C, E); \nvector_real_function_3d evec = transform(world, f, C); \n\\endcode\n\nThe `matrix_inner()` routine computes the matrix of inner products (or matrix elements) of two vectors of functions, and the `sygv()` routine (in `linalg/tensor_lapack.h`) is a wrapper around the LAPACK real symmetric and complex Hermitian generalized eigenvalue routines. Finally, the `transform()` routine transforms the basis to compute the eigenfunctions.\n\nPrevious: \\ref gstart_comp_run; Next: \\ref gstart_io\n*/\n"
  },
  {
    "path": "doc/getting_started/gstart_io.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file gstart_io.dox\n  \\brief Getting started with MADNESS I/O.\n  \\addtogroup gstart_io\n\n\\par Moving functions to/from disk\nIt takes at most a couple of lines of code to move a function to/from disk. The example program `trunk/src/examples/functionio.cc` shows how to do this, and the critical lines are\n\\code\nParallelOutputArchive out(world, filename); \nout & f & g & h; \nParallelInputArchive in(world, filename); \nin & f & g & h; \n\\endcode\nHere, `f`, `g`, and `h` are MADNESS functions of any type (they need not have the same type or dimension). \n\nMADNESS has a generic mechanism for (de)serializing objects from directional streams, called archives, that avoids confusion with the STL stream concept. Anything can be written to and read from an archive, though user-defined types usually need a little additional code to enable this (see `trunk/src/madness/world/archive.h` for documentation). Most archives are sequential objects accessible only to a single process and it makes little sense to write a potentially large function that is distributed across the entire parallel computer to such an archive. For that reason, functions must be written to/from a parallel archive that performs efficient parallel I/O.\n\nLarge amounts of data (more than a few gigabytes) will benefit from increasing the number of processors actually doing disk I/O (refer to the relevant parallel archive class for more info).\n\n\n\\par Plotting\n\nMADNESS can presently generate uniform grids in formats suitable for several visualization software packages. The following are explicitly supported:\n- OpenDX (in a `*.dx` file)\n- Paraview (in a VTK file)\n- line plots in a text format suitable for nearly any tool (e.g., \\ gnuplot or xmgrace).\n\n\\note The program `mraplot` can be used to generate plots from functions stored on disk.\n\n<em>OpenDX</em>\n\nOpenDX is an open source visualization software based on IBM's Visualization Data Explorer (<a href=\"http://www.opendx.org/\">www.opendx.org</a>). Please refer to the OpenDX manual for its use. An example configuration file (`vizit.cfg`) and a network file (`vizit.net`) can be found in the `trunk/src/apps/moldft/` directory. Here are some details on creating your own DX files.\n\nGiven any MADNESS function `f`, you can write to disk a uniform grid over the entire simulation volume with\n\\code\nplotdx(f, \"f.dx\");\n\\endcode\n\nAdditional arguments permit us to change the plot volume (default is the entire simulation volume), the number of points (default is 201) and binary/text format (default is binary). This is a collective operation.\n\nVisualizing this with OpenDX is straightforward, but depends on the number of dimensions. The easiest way is to start OpenDX, click \"Import Data ...\", enter your filename, and click \"Visualize Data\". However, you will want to learn how to build your own networks. To display an iso-surface of 3D data, start the visual editor and connect\n\\verbatim\nfile-selector --> import --> isosurface --> image\n\\endverbatim\n\nEnter your name in the file-selector, and you should see the picture. You can adjust the isosurface value in the isosurface control or by connecting it to an interactor. Have fun!\n\n\n<em>VTK format and Paraview</em>\n\nMADNESS can export MADNESS functions to the serial vtkStructuredGrid (.vts) file format, which can be ready by several post-processing visualization packages such as Paraview. To write this data file, you must first define four\nquantities:\n-# a filename (`filename`),\n-# the lower (`plotlo`) bound of Cartesian coordinates in each dimension to plot,\n-# the corresponding upper (`plothi`) bound,\n-# the number of points (`npts`) in each dimension to evaluate.\n.\n\n\\note At this time, MADNESS evaluates the functions at equally spaced points between `plotlo` and `plothi`.\n\n\nAfter the above four quantities have been defined, three functions must be called:\n- `plotvtk_begin`: Writes the VTK boilerplate header information.\n- `plotvtk_data`: Evaluates and writes the MADNESS function at `npts`.\n- `plotvtk_end`: Writes the VTK boilerplate footer information.\n.\n\n\\note Currently, the function evaluation in `plotvtk_data` is done in serial.\n\n\nAn example of code for plotting two two-dimensional functions `u` and `v` in a \\f$[0,1]^{2}\\f$ box with 101 points is as follows:\n\\code\nchar filename[100]; \nsprintf(filename, output.vts); // Defines the filename \nVector<double, 2> plotlo, plothi; // Box dimensions \nVector<long, 2> npts; // Num points in each dim\n\nfor(int i = 0; i < 2; ++i) \n{ \n  plotlo[i] = 0.0; \n  plothi[i] = 1.0; \n  npts[i] = 101; \n} \n\nplotvtk_begin(world, filename, plotlo, plothi, npts); \nplotvtk_data(u, u, world, filename, plotlo, plothi, npts); \nplotvtk_data(v, v, world, filename, plotlo, plothi, npts); \nplotvtk_end<3>(world, filename); \n\\endcode\n\n\\note\n- An arbitrary number of MADNESS files may be written to a single file. Two are shown above for demonstrative purposes; however, `plotvtk_data` may be called multiple times between `plotvtk_begin` and `plotvtk_end` function calls.\n\n- For time-dependent simulations, the above code can be included within the time step loop. The user should then consider appending the filename with the timestep number and create `Ntimestep` files, each containing one increment of time.\n.\n\n\nTo visualize your functions, Paraview has been extensively tested, although other external visualization packages may also be compatible with the `vts` file format. Paraview is an open-source visualization application that is freely\ndownloadable. For information about how to download, install and use Paraview, please consult their webpage at <a href=\"http://www.paraview.org\">http://www.paraview.org</a>.\n\n\n<em>Line plots</em>\n\nWith a single function call, up to three functions can be simultaneously evaluated at points along a line with the values printed to a file suitable for use by any standard 2D graphics or spreadsheet software. For example, to plot one 4D function (`f`) along a line between \\f$(0,0,0,1)\\f$ and \\f$(0,1,0,2)\\f$ with 101 points\n\\code\ncoord_3d lo, hi; \nlo[3]=1.0; hi[1]=1.0; hi[2]=2.0; \nplot_line(\"plot.txt\", 101, lo, hi, f);\n\\endcode\n\nTo plot two functions (`f` and `g`) you would use instead\n\\code\nplot_line(\"plot.txt\", 101, lo, hi, f, g);\n\\endcode\n\nWith gnuplot, you can plot the data as follows\n\\verbatim\ngnuplot -persist -e 'set style data lines; plot \"plot.txt\"'\n\\endverbatim\n\n\nPrevious: \\ref gstart_functions; Next: \\ref gstart_load_balance\n*/\n"
  },
  {
    "path": "doc/getting_started/gstart_load_balance.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file gstart_load_balance.dox\n  \\brief Getting started with MADNESS load and memory balancing.\n  \\addtogroup gstart_load_balance\n\nLoad and memory balancing is a critical issue on the current generation of shared and distributed memory computers. Many terascale and petascale computers have no virtual memory capabilities on the compute nodes, so memory management is very important.\n\nPoor distribution of work (load imbalance) is the largest reason for inefficient parallel execution within MADNESS. Poor data distribution (data imbalance) contributes to load imbalance and also leads to out-of-memory problems due to one or more processes having too much data. Thus, we are interested in a uniform distribution of both work and data. \n\nMany operations in MADNESS are entirely data driven (i.e., computation occurs in the processor that \"owns\" the data) since there is insufficient work to justify moving data between processes (e.g., computing the inner product between functions). However, a few expensive operations can have work shipped to other processors. \n\nThere are presently three load balancing mechanisms within MADNESS:\n- static and driven by the distribution of data, \n- dynamic via random assignment of work, and \n- dynamic via work stealing (now abandoned). \n.\nUntil the work stealing becomes production quality we must exploit the first two forms. The random work assignment is controlled by options in the \\c FunctionDefaults class:\n- `FunctionDefaults::set_apply_randomize(bool)` controls the use of randomization in applying integral (convolution) operators. It is typically beneficial when computing to medium/high precision. \n- `FunctionDefaults::set_project_randomize(bool)` controls the use of randomization in projecting from an analytic form (i.e., C++) into the discontinuous spectral element basis. It is typically beneficial unless there is already a good static data distribution. Since these options are straightforward to enable, this example focuses on static data redistribution. \n.\nThe process map (an instance of \\c WorldDCPmapInterface) controls mapping of data to processors and it is actually quite easy to write your own (e.g., see \\c WorldDCDefaultPmap or \\c LevelPmap) that ensure uniform data distribution. However, you also seek to incorporate estimates of the computational cost into the distribution. The class \\c LBDeuxPmap (deux since it is the second such class) in `trunk/src/madness/mra/lbdeux.h` does this by examining the functions you request and using provided weights to estimate the computational cost.\n\nCommunication costs are proportional to the number of broken links in the tree. Since some operations work in the scaling function basis, some in the multiwavelet basis, and some in non-standard form, there is an element of empiricism in getting best performance from most algorithms. \n\nThe example code in <a href=\"https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/dataloadbal.cc\">`src/examples/dataloadbal.cc`</a> illustrates how the discussions in this section can be applied.\n\n\nPrevious: \\ref gstart_io; Next: \\ref gstart_think_madness\n*/\n"
  },
  {
    "path": "doc/getting_started/gstart_think_madness.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file gstart_think_madness.dox\n  \\brief Getting started with MADNESS: \"thinking\" in MADNESS.\n  \\addtogroup gstart_think_madness\n\nMADNESS is based on multiresolution analysis (MRA) and low-separation rank (LSR) approximations of functions and operators. It can be considered an adaptive spectral element method using a discontinuous and singular multiresolution basis. The representations of differential operators in the wavelet bases are provably similar to adaptive finite difference discretizations. Thus, the process of solving the resulting linear systems has similar behaviors to other adaptive methods. For example, the derivative operator and the Laplacian operator are unbounded operators. Thus the condition number, which often constrains how accurately the linear system can be solved, goes to infinity as the bases or the nets are refined. In order to solve these equations in practice, one has to precondition the system. Effective preconditioners are problem dependent and the theory of their construction is an area of on-going research.\n\nThe integral operator, which is the formal inverse associated with the differential operator, is usually bounded. MRA and LSR have been proven to be suitable techniques for effectively applying some of the physically\nimportant operators and their kernel fast and with ease.\n\nTwo of the most important operators that we illustrate in this manual are the Poisson operator, and the Helmholtz operator (also note that heat/diffusion equation kernel is just a single Gaussian).\n\nHerein, we discuss techniques for \"thinking in MADNESS\", which will allow the best utilization of the numerical tools underlying MADNESS (in most cases).\n\n\\par Solve the integral equation\n\nIn many situations the integral operator associated with the differential operator has an analytic kernel. The simplest examples are convolution operators.\n- The free-space Poisson equation is converted to a convolution\nwith the Poisson (or Coulomb) kernel,\n\\f[\n\\nabla^{2} u = -4\\pi\\rho \\to u=G \\ast \\rho,\n\\f]\nwhere \\f$G(r-r')=\\frac{1}{|r-r'|}\\f$.\n- The Schr&ouml;dinger equation with potential \\f$V\\f$ is converted to a Lippman-Schwinger equation using the bound-state Helmholtz kernel,\n\\f[\n- \\frac{1}{2} \\nabla^{2} \\psi + V\\psi = E \\psi \\to \\psi = -2G \\ast V\\psi,\n\\f]\nwhere \\f$G(r-r')=\\frac{e^{-\\sqrt{-2E|r-r'|}}}{4\\pi |r-r'|} \\f$.\n- Duhamel's principle can be appled to write a time-dependent differential equation with linear operator \\f$\\hat{L}\\f$ and a non-linear operator \\f$N\\f$ as a semi-group equation.\n\\f[\n\\hat{L}u + N(u,t) = \\dot{u} \\to u(t) = e^{\\hat{L} t} u(0) + \\int _{0}^{t} e^{\\hat{L} (t-t')} N(u,t') \\mathit{d}t'.\n\\f]\n\nMost codes, including MADNESS, are bad at solving differential equations to high accuracy -- this is why there is so much emphasis placed on finding a good preconditioner. The problem arises from the spectrum of the differential operator. Consider the Laplacian in 1D acting on a plane wave,\n\\f[\n\\frac{d^{2}}{\\mathit{dx}^{2}}e^{i\\omega x}=-\\omega ^{2}e^{i\\omega x}.\n\\f]\nThe Laplacian greatly amplify high frequencies \\f$\\omega\\f$ (where most of the numerical error lies), whereas physical applications are primarily interested in lower frequencies. The eigenvalues of the corresponding inverse or integral operator have the opposite effect -- high frequencies are suppressed and lower frequencies are emphasized.\n\nThe integral form is potentially better in many ways -- accuracy, speed, robustness, asymptotic behavior, etc. If you really, really, want to solve the differential form, then instead of using the phrase \"integral form\" say \"perfectly preconditioned differential form\" so that you can do the right thing.\n\n\\par Carefully analyze discontinuities, noise, singularities, and asymptotic forms\n\nYour function needs to be evaluated at close to machine precision. The higher the order of the basis (\\f$k\\f$) the greater the necessary accuracy, regardless of what threshold you are trying to compute to. The accuracy and convergence of the Gauss-Legendre quadrature rests on the function being smooth (well approximated by a polynomial) at some level of refinement. Discontinuities in the function value or its derivatives, singularities, and/or numerical noise can all cause excessive refinement as MADNESS tries to deliver the requested precision. It's the Gibbs effect in action. <em>The usual symptoms of this problem are unexpectedly slow execution and/or excessive memory use.</em> Here are some\ntips to work with these effects.\n\nDiscontinuities and singularities need to be consciously managed. Integrable point singularities might sometimes work unmodified (e.g., \\f$1/r\\f$ in 3-D) but can unpredictably fail, e.g., if a quadrature point lands very near to the singularity by accident. If possible, arrange for such points/surfaces to coincide with dyadic points (i.e., an integer multiple of some power of two division of the domain) -- this will give the most accurate representation and exploits the discontinuous spectral basis. If you cannot ensure such placement, you must manually or analytically regularize the function. One would usually employ a parameter to control the length scale of any problem modification and to enable systematic demonstration of convergence. E.g., eliminate the cusp in an exponential with\n\\f[\n\\exp(-r) \\to \\exp (-\\sqrt{r^{2}+\\sigma ^{2}}),\n\\f]\nor replace a step function with \n\\f[\n\\theta(x) \\to \\theta(x, \\lambda) = \\frac{1}{2} (1 + \\tanh\\frac{x}{\\lambda}),\n\\f]\nor the Coulomb potential in 3-D with\n\\f[\n\\frac{1}{r} \\to u(r,c) = \\frac{1}{r} \\mathrm{erf} \\frac{r}{c} + \\frac{1}{c\\sqrt{\\pi}} e^{-\\left( \\frac{r}{c} \\right)^{2}}\n\\f]\nsubject to\n\\f[\n\\int_{0}^{\\infty} \\left(u(r, c) - r^{-1}\\right) r^{2} d\\mathit{r} = 0.\n\\f]\nThe integral indicates that the mean error is zero, independent of \\f$c\\f$.\n\nNumerical noise can be a problem if your function is evaluated using interpolation or some other approximation scheme, or when switching between representations (e.g., between forms suitable for small or large arguments). If you are observing inefficient projection into the basis, ensure that your approximation is everywhere smooth to circa 1 part in \\f$10^{12}\\f$ or better.\n\nMADNESS itself computes to a finite precision, and when computing a point-wise function of a function (i.e., \\f$g(f(x))\\f$, where \\f$f(x)\\f$ is a MADNESS function and \\f$g(s)\\f$ is a user-provided function), the user-provided function must tolerate that approximation within tolerance or noise. A classic example is computing the function\n\\f[\nV(\\rho(x)) = \\frac{C}{\\rho^{1/3}(x)},\n\\f]\nwhere in the original problem one knows that \\f$\\rho (x)>0\\f$ for all \\f$x\\f$ but numerically this positivity not guaranteed. In this case an effective smoothing is\n\\f{eqnarray*}{\nV(\\rho) & \\to & V(S(\\rho)) \\\\\nS(s) & = & \\left\\{ \\begin{array}{ll} s_{0}, & s\\le 0 \\\\ q(s, s_{0}, s_{1}), & 0 < s \\le s_{1} \\\\ s, & s > s_{1} \\end{array} \\right. \\\\\nq(s, s_{0}, s_{1}) & = & s_{0} - (-2s_{1} + 3s_{0}) \\left( \\frac{s}{s_{1}} \\right)^{2} + (2s_{0} - s_{1}) \\left(\\frac{s}{s_{1}}\\right)^{3}.\n\\f}\nThe function \\f$S(s)\\f$ coincides with its argument for \\f$s>s_{1}\\f$ and, for smaller values, smoothly switches to a minimum value of \\f$s_{0}\\f$ with a continuous value and derivative at both end points.\n\nSome computations are intrinsically expensive. For instance, the function \\f$ \\exp(i\\omega r)\\f$ is oscillatory everywhere and the number of required coefficients will increase linearly with the solution volume. In a 3-D box of width \\f$L\\f$, the number of coefficients will be \\f$\\mathcal{O}\\left(\\left(Lk\\omega \\right)^{3}\\right)\\f$ (where \\f$k\\f$ is the multiwavelet or polynomial order). For \\f$L=1000\\f$, \\f$k=12\\f$ and \\f$\\omega=3\\f$, a few hundred TB of data (i.e., too much!) will be generated. Thus, it is worth making a back of the envelope estimate about the expected cost of computation before\ngetting started.\n\nChoice of polynomial order (\\f$k\\f$) depends upon the problem and algorithm.  Smooth functions can be very accurately and efficiently represented using high-order polynomials, so it can be advantageous to use \\f$k=10\\f$ or higher (for some time-dependent problems we have even used \\f$k=30\\f$).  However, functions with fine-scale structure or cusps or discontinuities require adpative refinement so lower order polynomials (e.g., \\f$k=6\\f$) are more efficient.  If you are using integral operators, increasing the polynomial order as you increase the accuracy maintains sparsity in the operator, which is why in `moldft` we use the heuristic that to get an accuracy of \\f$10^{-n}\\f$ we use \\f$k=n+2\\f$.\n\n\nPrevious: \\ref gstart_load_balance; Next: \\ref gstart_env_var\n*/\n"
  },
  {
    "path": "doc/getting_started.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file getting_started.dox\n  \\brief An overview of programming with MADNESS.\n  \\addtogroup getting_started\n\nThis module aims to satisfy the needs of first-time users of the MADNESS numerical programming environment. Programmers interested in using the parallel programming environment should refer to the \\ref parallel_runtime module.\n\nWe know there are lots of things missing and that some things do not work as well as we might hope. However, things will improve faster if you get involved. Minimally, let us know of deficiencies, problems, and feature requests. These can be reported on the <a href=\"\\website\">MADNESS website</a>. The next step is to contribute documentation, examples, bug fixes or even new functionality. We aren't just a community project, we are a community, and you are welcome.\n\n\\par What is MADNESS and what can you do with it?\n\nMADNESS stands for multiresolution adaptive numerical environment for scientific simulation. It is trying to address the following issues\n- raising the level of composition of scientific applications, making it faster/easier to craft robust/correct solutions to new problems,\n- computing using functions and operators instead of just numbers, vectors and matrices,\n- providing fast and accurate solutions for a variety of differential and integral equations in 1 to 6 dimensions\n(and perhaps higher), and\n- facilitating the use of massively parallel computer resources by a wider audience.\n\n\nIn MADNESS, your code is written in terms of functions and operators, using the C++ language, and for this reason it can be thought of as a basis-free method. There is, of course, an underlying representation and approximation using bases and grids, and they adapt and refine automatically to satisfy the requested precision -- but you do not have to think about this until efficiency or memory use become concerns, if ever.\n\nThe numerical operations can be regarded as a finite precision equivalent of the mathematical calculus used to express your equations.\nWithin MADNESS you can apply both differential operators and integral operators. Important and common convolution\noperators with physically relevant Green functions (e.g., Coulomb, bound-state Helmholtz, free-particle quantum\npropagator) are built in. Many physical problems can be restated in integral form with huge benefits in ease and\naccuracy of solution. Finally, MADNESS hopefully excels at obtaining high-accuracy solutions, efficient computation in\nmany dimensions, and use of massively parallel computers.\n\nMADNESS is not good at everything. In particular, if you have complicated boundary conditions, highly oscillatory functions, or only need low precision, then other tools might be more appropriate.\n\nIn the following, we introduce MADNESS using problems of increasing complexity to accomplish standard tasks and to discuss topics that are central to effectively using MADNESS.\n\nNext: \\ref gstart_basics\n*/\n"
  },
  {
    "path": "doc/index.log",
    "content": ""
  },
  {
    "path": "doc/index.rst",
    "content": ".. madness documentation master file, created by\n   sphinx-quickstart on Tue Jul 12 21:54:04 2022.\n   You can adapt this file completely to your liking, but it should at least\n   contain the root `toctree` directive.\n\nWelcome to MADNESS\n==================\n\nMADNESS (**M**\\ ultiresolution **AD**\\ aptive **N**\\ umerical **E**\\ nvironment for **S**\\ cientific **S**\\ imulation) provides a high-level environment for the solution of integral and differential equations in many dimensions using adaptive, fast methods with guaranteed precision based on multi-resolution analysis and novel separated representations. There are three main components to MADNESS. At the lowest level is a new petascale parallel programming environment that increases programmer productivity and code performance/scalability while maintaining backward compatibility with current programming tools such as MPI and Global Arrays. The numerical capabilities built upon the parallel tools provide a high-level environment for composing and solving numerical problems in many (1-6+) dimensions. Finally, built upon the numerical tools are new applications with initial focus upon chemistry, atomic and molecular physics, material science, and nuclear structure.\n\n\n\n.. toctree::\n   :maxdepth: 2\n\n   INSTALL\n   runtime\n   numerical_library\n   quantum\n\n..\n  - :doc:`INSTALL`\n  - :doc:`runtime`\n  - :doc:`numerical_library`\n  - :doc:`quantum`\n\nIndices and tables\n==================\n\n* :ref:`genindex`\n* :ref:`modindex`\n* :ref:`search`\n"
  },
  {
    "path": "doc/libraries/chemistry.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file chemistry.dox\n \\brief Overview over quantum chemistry implementations in the MADNESS framework.\n \\addtogroup chemistry\n\n\\par Background\n\nMADNESS does quantum chemistry\n\n\\par DFT functionals for the user\n\nA molecular wave function may be determined using the ground state density only. \nFor all but the simplest local density approximation functionals we use the density functional library <a href=http://www.tddft.org/programs/octopus/wiki/index.php/Libxc>libxc</a>.\nThe user may request a functional according to the general syntax\n\\code\n xc  FUNC1 weight1 FUNC2 weight2 ..\n\\endcode\nwhere FUNC1 etc are the name of a libxc functional, and the weight describes the admixture coefficient\n\nor use the following predefined functionals (not case sensitive)\n\\code\n xc hf\n xc lda\n xc bp\n xc pbe\n xc pbe0\n xc b3lyp\n\\endcode\n\nAs an example, the PBE0 functional would be expressed in the general syntax as\n\\code\n xc  GGA_X_PBE 0.75 GGA_C_PBE 1.0 HF 0.25\n\\endcode\n\nExpert parameters are RHOTOL, RHOMIN, and GGATOL, which determine at which density value threshold (RHOTOL) the density will be set to RHOMIN inside libxc, and at which density the gga potential will be munged, since it might not be bound.\n\n\n\\par DFT functionals for the developer\n\nA DFT functional is most easily constructed through the use of the madness::XCOperator class in SCFOperators.h\n\\code\n #include \"SCFOperators.h\"\n XCOperator xc_operator(world,&calc,ispin);\n\\endcode\n\nwhere the arguments to the constructor are the world and a pointer to a madness::SCF or madness::Nemo calculation. \nThe constructor will create the necessary density and density gradients (in XCOperator::prep_xc_args() ).\nNote that the ispin argument (0 for alpha, 1 for beta) is only important for the computation of the xc potential, and may be changed later on to avoid re-creation of the density (gradients).\nThe functional information is passed to the constructor through the calculation parameters.\n\nA DFT energy and potential can be constructed as\n\\code\ndouble ex_energy=xc_operator.compute_xc_energy();\nreal_function_3d xc_potential=xc_operator.make_xc_potential();\n\\endcode\n\nDirect application of the XC functional to a vector of orbitals mo may be accomplished as\n\\code \nstd::vector<real_function_3d> vmo = xc_operator(mo);\n\\endcode\n\nIf a response kernel is requested (e.g. in CPHF equations, or in linear response), the kernel itself is numerically unstable. \nTo some extent this instability is circumvented by performing as many operations as possible on a fixed grid, so that only the result of the kernel application is available\n\\code\nreal_function_3d result=xc_operator.apply_xc_kernel(perturbed_density);\n\\endcode\n\n\n\\par Internal implementation details\n\nFor LDA functionals the density is processed as-is, only very small and negative densities  are set to zero (through the RHOTOL and RHOMIN arguments).\n\nFor GGA functionals the reduced density gradients \\f$ \\sigma\\f$ are necessary, which decay very fast and cause numerical instabilites. \nTo avoid these instabilities we express the density gradients as\n\\f[\n\\rho = exp(\\zeta) \\\\\n\\nabla \\rho = \\rho \\nabla \\zeta \\\\\n\\sigma = |\\nabla\\rho|^2 = |\\nabla \\zeta|^2 \\rho^2 = \\chi \\rho^2\n\\f]\nwhich defines the quantities \\f$ \\zeta\\f$ and \\f$ \\chi \\f$.\nThe functional form of \\f$\\zeta\\f$ is a superposition of cones located at the nuclei with asymptotic slope of the HOMO orbital energy, its derivative is numerically more stable than that of the density itself.\nIn this way the density gradients and the density may be munged in a consistent manner.\nIn fact, often the ratio \\f$ \\sigma/\\rho^2 =\\chi\\f$ is used in DFT functionals.\nAll functions are passed to libxc through the madness::XCfunctional interface class. \nA vector of functions named xc_arg is passed to the multiop method, with the various functions being on enumerated vector positions, described in madness::XCfunctional::xc_arg.\n\nResponse kernels for GGA are even more numerically unstable than the XC potential. \nWe use the same log-derivative trick as before, which fixes the long-range noise. \nHowever the intermediate potentials have to be multiplied with the gradients of the (perturbed) density, followed by taking the divergence, which is equivalent to applying the Laplacian to the (perturbed) density. \nNumerical noise is amplified and convergence during the SCF or CPHF iterations might not be achieved.\nFurthermore, the perturbed density is not strictly positive, so its logarithm is not defined.\nWe can pull an unperturbed density out of the perturbed density gradient to regain some stability\n\\f[\n\\sigma_\\mathrm{pt}=\\nabla\\rho\\cdot\\nabla\\rho_\\mathrm{pt} = \\rho\\left(\\nabla\\zeta\\cdot\\nabla\\rho_\\mathrm{pt}\\right)\n\\f]\n\n\nThe code in XCOperator works as follows\n - compute \\f$\\zeta\\f$, density gradients, etc through madness::XCOperator::prep_xc_args and put them on a vector of functions. So far these are spin densities.\n - call xc_potential or xc_kernel_apply\n   - call \\c madness::XCfunctional::make_libxc_args to munge the density and density gradients -- convert spin density to full density if spin-restricted\n   - call libxc functions to compute the functional derivatives of the density functional\n   - multiply intermediate quantities to the functional derivatives\n   - return scalar intermediates, for the exact description see in madness::XCfunctional::vxc and madness::XCfunctional::fxc_apply\n - multiply the semilocal intermediates with the density gradients, take div operator\n\n*/\n"
  },
  {
    "path": "doc/libraries/containers.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file containers.dox\n \\brief Overview of data containers provided by the MADNESS framework.\n \\addtogroup libraries\n\nThe MADNESS framework provides several container classes for convenience. They are described herein.\n*/\n"
  },
  {
    "path": "doc/libraries/parallel_runtime/futures.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file futures.dox\n \\brief Overview of futures.\n \\addtogroup futures\n\n\\todo Badly in need of a general description. There's a lot of jargon in the implementation's documentation -- a future is \\em assigned, etc. -- that should be clarified. Just sayin'. There's some text in a comment (not doxygen) near the beginning of the \\c Future class. Maybe move it here? Hell, I went ahead an copied (cut, really) it here, right here, just for you.\n\\code\n  // This future object can exist in one of three states:\n  //   - f == NULL && value == NULL : Default initialized state\n  //        This state occurs when the future is constructed via\n  //        Future::default_initializer().\n  //   - f != NULL && value == NULL : FutureImpl object will hold the T object\n  //        This state occurs when a future is constructed without a value,\n  //        or from a remote reference.\n  //   - f == NULL $$ value != NULL : T object is held in buffer\n  //        This state occurs when a future is constructed with a value\n  //        or from an input archive.\n\\endcode\n\n\\par Gotchas\n\n\\todo This is taken from some crude remarks that used to be in worldfut.h (now future.h). It needs to be edited/verified before this goes live. It could probably use a better section heading than \"Gotchas\", too...\n\nA common misconception is that STL containers initialize their\ncontents by invoking the default constructor of each item in\nthe container (since we are told that the items must be default\nconstructable). But this is \\em incorrect. The items are initialized\nby invoking the copy constructor for each element on a \\em single\nobject made with the default constructor. For futures this\nis a very bad problem. For instance,\n\\code\n   vector< Future<double> > v(3);\n\\endcode\nis equivalent to the following with an array of three elements\n\\code\n   Future<double> junk;\n   Future<double> v[3] = {junk,junk,junk};\n\\endcode\nSince the Future copy constructor is by necessity shallow, each\nelement of \\c v ends up referring to the future implementation that\nunderlies \\c junk. When you assign to an element of \\c v, you'll also\nbe assigning to junk. But since futures are single assignment\nvariables, you can only do that once. Hence, when you assign a\nsecond element of \\c v you'll get a runtime exception.\n\nThe fix (other than using arrays) is to initialize STL vectors and\nother containers from the special element returned by\n\\c Future<T>::default_initializer(), which if passed into the copy\nconstructor will cause it to behave just like the default constructor.\nThus, the following code is what you actually need to use an STL\nvector of futures\n\\code\n   vector< Future<double> > v(3, Future<double>::default_initializer());\n\\endcode\nwhich is laborious. Instead, we provide the factory function\n\\code\n   template <typename T>\n   vector< Future<T> > future_vector_factory(std::size_t n);\n\\endcode\nwhich enables you to write\n\\code\n   vector< Future<double> > v = future_vector_factory<double>(3);\n\\endcode\n*/\n"
  },
  {
    "path": "doc/libraries/parallel_runtime/mpi.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file mpi.dox\n \\brief Overview of the MPI interface for MADNESS.\n \\addtogroup mpi\n\n\\todo Write a high-level overview of the MPI interface.\n*/\n"
  },
  {
    "path": "doc/libraries/parallel_runtime/serialization.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file serialization.dox\n \\brief Overview of the interface templates for archives (serialization).\n \\addtogroup serialization\n\nThe programmer should not need to include madness/world/archive.h directly. Instead, include the header file for the actual archive (binary file, text/xml file, vector in memory, etc.) that is desired.\n\n\\par Background\n\nThe interface and implementation are deliberately modelled, albeit loosely, upon the boost serialization class (thanks boost!). The major differences are that this archive class does \\em not break cycles and does \\em not automatically store unique copies of data referenced by multiple objects. Also, classes are responsbible for managing their own version information. At the lowest level, the interface to an archive also differs to facilitate vectorization and high-bandwidth data transfer. The implementation employs templates that are almost entirely inlined. This should enable low-overhead use of archives in applications, such as interprocess communication.\n\n\\par How to use an archive?\n\nAn archive is a uni-directional stream of typed data to/from disk, memory, or another process. Whether the stream is for input or for output, you can use the \\c & operator to transfer data to/from the stream. If you really want, you can also use the \\c << or \\c >> for output or input, respectively, but there is no reason to do so. The \\c & operator chains just like \\c << for \\c cout or \\c >> for \\c cin. You may discover in \\c archive.h other interfaces but you should \\em not use them --- use the \\& operator!  The lower level interfaces will probably not, or only inconsistently, incorporate type information, and may even appear to work when they are not.\n\nUnless type checking has not been implemented by an archive for reasons of efficiency (e.g., message passing) a C-string exception will be thrown on a type-mismatch when deserializing. End-of-file, out-of-memory, and others also generate string exceptions.\n\nFundamental types (see below), STL complex, vector, strings, pairs and maps, and tensors (int, long, float, double, float_complex, double_complex) all work without you doing anything, as do fixed-dimension arrays of the same (STL allocators are not presently accomodated). For example,\n\\code\n  bool finished = false;\n  int info[3] = {1, 33, 2};\n  map<int, double> fred;\n  fred[0] = 55.0; fred[1] = 99.0;\n\n  BinaryFstreamOutputArchive ar('restart.dat');\n  ar & fred & info & finished;\n\\endcode\nDeserializing is identical, except that you need to use an input archive, c.f.,\n\\code\n  bool finished;\n  int info[3];\n  map<int, double> fred;\n\n  BinaryFstreamInputArchive ar('restart.dat');\n  ar & fred & info & finished;\n\\endcode\n\nVariable dimension and dynamically allocated arrays do not have their dimension encoded in their type. The best way to (de)serialize them is to wrap them in an \\c archive_array as follows.\n\\code\n  int a[n]; // n is not known at compile time\n  double *p = new double[n];\n  ar & wrap(a,n) & wrap(p,n);\n\\endcode\nThe \\c wrap() function template is a factory function to simplify instantiation of a correctly typed \\c archive_array template. Note that when deserializing, you must have first allocated the array --- the above code can be used for both serializing and deserializing. If you want the memory to be automatically allocated consider using either an STL vector or a madness tensor.\n\nTo transfer the actual value of a pointer to a stream (is this really what you want?) then store an archive_ptr wrapping it. The factory function \\c wrap_ptr() assists in doing this, e.g., here for a function pointer\n\\code\n int foo();\n ar & wrap_ptr(foo);\n\\endcode\n\n\\par User-defined types\n\nUser-defined types require a little more effort. Three cases are distinguished.\n- symmetric load and store\n  - intrusive\n  - non-intrusive\n- non-symmetric load and store\n\nWe will examine each in turn, but we first need to discuss a little about the implementation.\n\nWhen transfering an object \\c obj to/from an archive \\c ar with `ar & obj`, you need to invoke the templated function\n\\code\n  template <class Archive, class T>\n  inline const Archive& operator&(const Archive& ar, T& obj);\n\\endcode\nthat then invokes other templated functions to redirect to input or output streams as appropriate, manage type checking, etc. We would now like to overload the behavior of these functions in order to accomodate your fancy object.  However, function templates cannot be partially specialized.  Following the technique recommended <a href=http://www.gotw.ca/publications/mill17.htm>here</a> (look for moral#2), each of the templated functions directly calls a member of a templated class. Classes, unlike functions, can be partially specialized, so it is easy to control and predict what is happening. Thus, in order to change the behavior of all archives for an object you just have to provide a partial specialization of the appropriate class(es). Do \\em not overload any of the function templates.\n\n<em>Symmetric intrusive method</em>\n\nMany classes can use the same code for serializing and deserializing. If such a class can be modified, the cleanest way of enabling serialization is to add a templated method as follows.\n\\code\n  class A {\n      float a;\n\n  public:\n      A(float a = 0.0) : a(a) {}\n\n      template <class Archive>\n      inline void serialize(const Archive& ar) {\n          ar & a;\n      }\n  };\n\\endcode\n\n<em>Symmetric non-intrusive method</em>\n\nIf a class with symmetric serialization cannot be modified, then you can define an external class template with the following signature in the \\c madness::archive namespace (where \\c Obj is the name of your type).\n\\code\n  namespace madness {\n      namespace archive {\n          template <class Archive>\n          struct ArchiveSerializeImpl<Archive,Obj> {\n              static inline void serialize(const Archive& ar, Obj& obj);\n          };\n      }\n  }\n\\endcode\n\nFor example,\n\\code\n  class B {\n  public:\n      bool b;\n      B(bool b = false)\n          : b(b) {};\n  };\n\n  namespace madness {\n      namespace archive {\n\t        template <class Archive>\n\t        struct ArchiveSerializeImpl<Archive, B> {\n\t            static inline void serialize(const Archive& ar, B& b) {\n                  ar & b.b;\n              };\n\t        };\n      }\n  }\n\\endcode\n\n<em>Non-symmetric non-intrusive</em>\n\nFor classes that do not have symmetric (de)serialization you must define separate partial templates for the functions \\c load and \\c store with these signatures and again in the \\c madness::archive namespace.\n\\code\n  namespace madness {\n      namespace archive {\n\t        template <class Archive>\n\t        struct ArchiveLoadImpl<Archive, Obj> {\n\t           static inline void load(const Archive& ar, Obj& obj);\n\t        };\n\n\t        template <class Archive>\n\t        struct ArchiveStoreImpl<Archive, Obj> {\n\t           static inline void store(const Archive& ar, const Obj& obj);\n\t        };\n      }\n  }\n\\endcode\n\nFirst a simple, but artificial example.\n\\code\n  class C {\n  public:\n      long c;\n      C(long c = 0)\n          : c(c) {};\n  };\n\n  namespace madness {\n      namespace archive {\n          template <class Archive>\n\t        struct ArchiveLoadImpl<Archive, C> {\n\t            static inline void load(const Archive& ar, C& c) {\n                  ar & c.c;\n              }\n          };\n\n\t        template <class Archive>\n\t        struct ArchiveStoreImpl<Archive, C> {\n\t            static inline void store(const Archive& ar, const C& c) {\n                  ar & c.c;\n              }\n\t        };\n      }\n  }\n\\endcode\n\nNow a more complicated example that genuinely requires asymmetric load and store.First, a class definition for a simple linked list.\n\\code\n  class linked_list {\n      int value;\n      linked_list *next;\n\n  public:\n      linked_list(int value = 0)\n          : value(value), next(0) {};\n\n      void append(int value) {\n          if (next)\n              next->append(value);\n          else\n              next = new linked_list(value);\n      };\n\n      void set_value(int val) {\n          value = val;\n      };\n\n      int get_value() const {\n          return value;\n      };\n\n      linked_list* get_next() const {\n          return next;\n      };\n  };\n\\endcode\nAnd this is how you (de)serialize it.\n\\code\n  namespace madness {\n      namespace archive {\n\t        template <class Archive>\n\t        struct ArchiveStoreImpl<Archive, linked_list> {\n\t            static void store(const Archive& ar, const linked_list& c) {\n\t\t              ar & c.get_value() & bool(c.get_next());\n\t\t              if (c.get_next())\n                      ar & *c.get_next();\n\t            }\n\t        };\n\n\t        template <class Archive>\n\t        struct ArchiveLoadImpl<Archive, linked_list> {\n\t            static void load(const Archive& ar, linked_list& c) {\n\t\t              int value;\n                  bool flag;\n\n\t\t              ar & value & flag;\n\t\t              c.set_value(value);\n\t\t              if (flag) {\n\t\t                  c.append(0);\n\t\t                  ar & *c.get_next();\n\t\t              }\n\t            }\n\t        };\n      }\n  }\n\\endcode\n\nGiven the above implementation of a linked list, you can (de)serialize an entire list using a single statement.\n\\code\n  linked_list list(0);\n  for (int i=1; i<=10; ++i)\n      list.append(i);\n\n  BinaryFstreamOutputArchive ar('list.dat');\n  ar & list;\n\\endcode\n\n\\par Non-default constructor\n\nThere are various options for objects that do not have a default constructor. The most appealing and totally non-intrusive approach is to define load/store functions for a pointer to the object. Then in the load method you can deserialize all of the information necessary to invoke the constructor and return a pointer to a new object.\n\nThings that you know are contiguously stored in memory and are painful to serialize with full type safety can be serialized by wrapping opaquely as byte streams using the \\c wrap_opaque() interface. However, this should be regarded as a last resort.\n\n\\par Type checking and registering your own types\n\nTo enable type checking for user-defined types you must register them with the system. There are 64 empty slots for user types beginning at cookie=128.  Type checked archives (currently all except the MPI archive) store a cookie (byte with value 0-255) with each datum. Unknown (user-defined) types all end up with the same cookie indicating unkown --- i.e., no type checking unless you register.\n\nTwo steps are required to register your own types (e.g., here for the types \\c %Foo and \\c Bar)\n-# In a header file, after including madness/world/archive.h, associate your types and pointers to them with cookie values.\n  \\code\n    namespace madness {\n        namespace archive {\n\t          ARCHIVE_REGISTER_TYPE_AND_PTR(Foo,128);\n\t          ARCHIVE_REGISTER_TYPE_AND_PTR(Bar,129);\n        }\n    }\n  \\endcode\n-# In a single source file containing your initialization routine, register the name of your types as follows\n  \\code\n    ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(Foo);\n    ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(Bar);\n  \\endcode\nHave a look at the test in \\c madness/world/test_ar.cc to see things in action.\n  \n\\par Types of archive\n\nPresently provided are\n- madness/world/text_fstream_archive.h --- (text \\c std::fstream) a file in text (XML).\n- madness/world/binary_fstream_archive.h --- (binary \\c std::fstream) a file in binary.\n- madness/world/vector_archive.h --- binary in memory using an \\c std::vector<unsigned_char>.\n- madness/world/buffer_archive.h --- binary in memory buffer (this is rather heavily specialized for internal use, so applications should use a vector instead).\n- madness/world/mpi_archive.h --- binary stream for point-to-point communication using MPI (non-typesafe for efficiency).\n- madness/world/parallel_archive.h --- parallel archive to binary file with multiple readers/writers. This is here mostly to support efficient transfer of large \\c WorldContainer (madness/world/worlddc.h) and MADNESS \\c Function (mra/mra.h) objects, though any serializable object can employ it.\n\nThe buffer and \\c vector archives are bitwise identical to the binary file archive.\n\n\\par Implementing a new archive\n\nMinimally, an archive must derive from either \\c BaseInputArchive or \\c BaseOutputArchive and define for arrays of fundamental types either a \\c load or \\c store method, as appropriate. Additional methods can be provided to manipulate the target stream. Here is a simple, but functional, implementation of a binary file archive.\n\\code\n  #include <fstream>\n  #include <madness/world/archive.h>\n  using namespace std;\n\n  class OutputArchive : public BaseOutputArchive {\n      mutable ofstream os;\n\n  public:\n    OutputArchive(const char* filename)\n        : os(filename, ios_base::binary | ios_base::out | ios_base::trunc)\n    {};\n\n    template <class T>\n    void store(const T* t, long n) const {\n        os.write((const char *) t, n*sizeof(T));\n    }\n  };\n\n  class InputArchive : public BaseInputArchive {\n    mutable ifstream is;\n\n  public:\n    InputArchive(const char* filename)\n        : is(filename, ios_base::binary | ios_base::in)\n    {};\n\n    template <class T>\n    void load(T* t, long n) const {\n        is.read((char *) t, n*sizeof(T));\n    }\n  };\n\\endcode\n*/\n"
  },
  {
    "path": "doc/libraries/parallel_runtime/threading/atomics.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file atomics.dox\n \\brief Documentation: the atomic operations module.\n \\addtogroup atomics\n\n \\todo Description/overview of atomic operations and related concepts for the documentation module.\n*/\n\n"
  },
  {
    "path": "doc/libraries/parallel_runtime/threading/taskq.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file taskq.dox\n \\brief Documentation: the task queue module.\n \\addtogroup taskq\n\n \\todo Description/overview of tasks and related concepts for the documentation module.\n*/\n\n"
  },
  {
    "path": "doc/libraries/parallel_runtime/threading/threads.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file threads.dox\n  \\brief Documentation: The \\ref threads module.\n  \\addtogroup threads\n\n  \\todo Write this section.\n*/\n"
  },
  {
    "path": "doc/libraries/parallel_runtime/threading.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n  \\file threading.dox\n  \\brief Documentation: The \\ref threading module for multi-threaded programming.\n  \\addtogroup threading\n\n  \\todo Write this section.\n*/\n"
  },
  {
    "path": "doc/libraries/parallel_runtime/world.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file world.dox\n \\brief Overview of the \\c World class and its dependents for the documentation.\n \\addtogroup world\n\n \\todo Overview of the \\c World class and concepts for the documentation module.\n*/\n"
  },
  {
    "path": "doc/libraries/parallel_runtime/world_object.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file world_object.dox\n \\brief Documentation: The world_object module.\n \\addtogroup world_object\n\n \\todo An overview of the \\c WorldObject class and the other concepts it works with.\n*/\n\n"
  },
  {
    "path": "doc/libraries/parallel_runtime.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file parallel_runtime.dox\n \\brief Overview of the MADNESS parallel programming environment.\n \\addtogroup parallel_runtime\n\nThe MADNESS parallel programming environment combines several\nsuccessful elements from other models and aims to provide a\nrich and scalable framework for massively parallel computing while\nseamlessly integrating with legacy applications and libraries.\nIt includes\n - Distributed sparse containers with one-sided access to items,\n   transparent remote method invocation, an owner-computes task model,\n   and optional user control over placement/distribution.\n - Distributed objects that can be globally addressed.\n - Futures (results of unevaluated expressions) for composition of latency tolerant\n   algorithms and expression of dependencies between tasks.\n - Globally accessible task queues in each process which\n   can be used individually or collectively to provide a single global\n   task queue.\n - Facile management of computations on processor sub-groups.\n - Integration with MPI.\n - Active messages to items in a container, distributed objects,\n   and processes.\n - Efficient use of multicore processors using pthreads.\n\nThe two main early influences for this work were Cilk (Kuszmaul,\nhttp://supertech.csail.mit.edu/cilk) and Charm++ (Kale,\nhttp://charm.cs.uiuc.edu).  Subsequently, ACE (Schmidt,\nhttp://www.cs.wustl.edu/~schmidt/ACE.html), STAPL (Rauchwerger and\nAmato, http://parasol.tamu.edu/groups/rwergergroup/research/stapl), and\nthe HPCS language projects (X10,\nhttp://domino.research.ibm.com/comm/research_projects.nsf/pages/x10.index.html\n; Chapel, http://chapel.cs.washington.edu ; Fortress, http://fortress.sunsource.net )\nand the amazingly talented teams and individuals developing these.\n\n\\par Introduction to the parallel runtime\n\nThe entire parallel environment is encapsulated in an instance of the\nclass \\c madness::World which is instantiated by wrapping an MPI communicator.\nMultiple worlds may exist, overlap, or be dynamically created and\ndestroyed.  Distributed containers (currently associative arrays or\nhash tables) and distributed objects may be constructed from a world\ninstance.\n\nThe recommended approaches to develop scalable and latency tolerant\nparallel algorithms are either object- or task-centric decompositions\nrather than the process-centric approach usually forced upon MPI\napplications.  The object-centric approach uses distributed containers\n(or distributed objects) to store application data.  Computation is\nexpressed by sending tasks or messages to objects, using the task\nqueue to automatically manage dependencies expressed via futures.\nPlacement of data and scheduling/placement of computation can be\ndelgated to the container and task queue, unless there are specific\nperformance concerns in which case the application can have full\nknowledge and control of these.\n\nItems in a container may be accessed largely as if in a standard STL\ncontainer, but instead of returning an \\c iterator, accessors instead\nreturn a \\c madness::Future \\c iterator. A future is a container for the result of a\npossibly unevaluated expression.  In the case of an accessor, if the\nrequested item is local then the result is immediately\navailable. However, if the item is remote, it may take some time\nbefore the data is made available locally.  You could immediately try\nto use the future, which would work but with the downside of\ninternally waiting for all of the communication to occur.  Much better\nis to keep on working and only use the future when it is ready.\n\nBy far the best way to compute with futures is to pass them as\narguments to a new task.  Once the futures are ready, the task will be\nautomatically scheduled for execution. A task that produces a\nresult also returns it as a future, so this same mechanism may be used\nto express dependencies between tasks.\n\nThus, a very natural expression of a parallel algorithm is as a\nsequence of dependent tasks.  For example, in MADNESS many of the\nalgorithms working on distributed, multidimensional trees start with\njust a single task working on the root of the tree, with all other\nprocesses waiting for something to do.  That one task starts\nrecursively (depth or breadth first) traversing the tree and\ngenerating new tasks for each node.  These in turn generate more tasks\non their sub-trees.\n\nThe \\c World.am member provides inter-process active message functionality, which is\nthe foundation on which everything else is built.  We do not recommend\nthat applications make routine or direct use of inter-process active messages.\nInstead, try to compose applications using messaging\nto/between items in distributed containers and the local\ntask queue(s).\n\nThe \\c World.mpi member is the preferred way to use MPI since it has a growing\namount of instrumentation and debugging capability, though MPI\nroutines may be called directly if necessary.  However, MPI is again a\nlow-level model and we do not encourage its direct use.  It is there\nsince it is the portable standard for communication and to facilitate\nintegration with legacy applications.\n\nThe \\c World.gop member provides global operations that are internally\nnon-blocking, enabling the invoking thread to continue working.\n\nThe execution model is sequentially consistent.  That is,\nfrom the perspective of a single thread of execution, operations\non the same local/remote object behave as if executed sequentially\nin the same order as programmed.   This means that performing\na read after a write/modify returns the modified value, as expected.\nSuch behavior applies only to the view of a single thread ---\nthe execution of multiple threads and active messages from different\nthreads may be interleaved arbitrarily.\n\n\\note More information on madness::World can be found in the \\ref world module.\n\n\\par Distributed Containers (WorldContainer)\n\nThe only currently provided containers are associative arrays or maps\nthat are almost directly equivalent to the STL map or the GNU\nhash_map.  Indeed, the implementation can use either of these for the\nlocal storage, though the GNU hash_map is to be preferred for\nperformance reasons and is the only one discussed here.\n\nA map generalizes the concept of an array (which maps an integer index\nin a dense range to a value) by mapping an arbitrary key to a value.\nThis is a very natural, general and efficient mechanism for storing\nsparse data structures.  The distribution of items in the container\nbetween processes is based upon a function which maps the key\nto a process.  There is a default mapping which is essentially\na pseudo-random uniform mapping, but the user can provide their own\n(possibly data-dependent) operator to control the distribution.\n\nThe keys and values associated with containers must be serializble\nby the MADNESS \\c archive mechanism. Please refer to archive.h and\ndocumentation therein for more information.  In addition, the keys\nmust support both\n - testing for equality, either by overloading \\c == or by\n   specializing \\c std::equal_to<key_type>,\n - computing a hash value. See worldhash.h for details.\n\nHere is an example of a key that might be used in an octtree.\n\\code\nstruct Key {\n   typedef unsigned long ulong;\n   ulong n, i, j, k;\n   hashT hashval;\n\n   Key() {}\n\n   // Precompute the hash function for speed\n   Key(ulong n, ulong i, ulong j, ulong k)\n       : n(n), i(i), j(j), k(k), hashval(0)\n   {\n       madness::hash_combine(hashval, n);\n       madness::hash_combine(hashval, i);\n       madness::hash_combine(hashval, j);\n       madness::hash_combine(hashval, k);\n   }\n\n   hashT hash() const {\n       return hashval;\n   }\n\n   template <typename Archive>\n   void serialize(const Archive& ar) {\n       ar & n & i & j & k & hashval;\n   }\n\n   bool operator==(const Key& b) const {\n       return hashval==b.hashval && n==b.n && i==b.i && j==b.j && k==b.k;\n   }\n};\n\\endcode\n\n\\par Distributed Objects\n\nDistributed objects (madness::WorldObject) provide all of the communication\nand other resources necessary to build new distributed capabilities.\nThe distributed container class (madness::WorldContainer) actually inherits\nmost of its functionality from madness::WorldObject.\n\n */\n"
  },
  {
    "path": "doc/libraries.dox",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file libraries.dox\n \\brief Overview of MADNESS libraries.\n \\addtogroup libraries\n\nMADNESS is built from several libraries, such as the parallel runtime and the\nmultiresolution analysis tools. The files and submodules listed here detail the\nAPI and implementation of these libraries.\n\n\\todo Add additional details to this section, if needed.\n */\n"
  },
  {
    "path": "doc/madness.bib",
    "content": "\n@article{PhysRevA.85.033403,\nauthor = {Vence, Nicholas and Harrison, Robert and Krsti\\'{c}, Predrag},\ndoi = {10.1103/PhysRevA.85.033403},\nfile = {:sandbox/vama/docs/madness/Attosencond electron dynamics MRA Vence PRA 2012.pdf:pdf},\nissn = {1050-2947},\njournal = {Physical Review A},\nmonth = mar,\nnumber = {3},\npages = {033403},\ntitle = {{Attosecond electron dynamics: A multiresolution approach}},\nurl = {http://link.aps.org/doi/10.1103/PhysRevA.85.033403},\nvolume = {85},\nyear = {2012}\n}\n@article{Sekino2008,\nabstract = {We describe the evaluation of response properties using multiresolution multiwavelet (MRMW) basis sets. The algorithm uses direct projection of the perturbed density operator onto the zeroth order density operator on the real space spanned by the MRMW basis set and is applied for evaluating the polarizability of small molecules using Hartree-Fock and Kohn-Sham density functional theory. The computed polarizabilities can be considered to be converged to effectively complete space within the requested precision. The efficiency of the method against the ordinary Gaussian basis computation is discussed.},\nauthor = {Sekino, Hideo and Maeda, Yasuyuki and Yanai, Takeshi and Harrison, Robert J},\ndoi = {10.1063/1.2955730},\nfile = {:sandbox/vama/artis/teoria-docs-quimica/M-A-D-N-E-S-S/basis set limit LR madness JCP 2008.pdf:pdf},\nissn = {1089-7690},\njournal = {The Journal of chemical physics},\nmonth = jul,\nnumber = {3},\npages = {034111},\npmid = {18647020},\ntitle = {{Basis set limit Hartree-Fock and density functional theory response property evaluation by multiresolution multiwavelet basis.}},\nurl = {http://www.ncbi.nlm.nih.gov/pubmed/18647020},\nvolume = {129},\nyear = {2008}\n}\n@article{Sekino2012,\nauthor = {Sekino, Hideo and Yokoi, Yukina and Harrison, Robert J},\ndoi = {10.1088/1742-6596/352/1/012014},\nfile = {:sandbox/vama/docs/madness/A new implementation of dynamic polarizabiliti evaliation using MRMW Sekino 2012.pdf:pdf},\nissn = {1742-6596},\njournal = {Journal of Physics: Conference Series},\nmonth = mar,\npages = {012014},\ntitle = {{A new implementation of dynamic polarizability evaluation using a multi-resolution multi-wavelet basis set}},\nurl = {http://stacks.iop.org/1742-6596/352/i=1/a=012014?key=crossref.2c930e5d52c303caafa925cbdfb6350e},\nvolume = {352},\nyear = {2012}\n}\n@article{Kato2012,\nauthor = {Kato, Tetsuya and Yokoi, Yukina and Sekino, Hideo},\ndoi = {10.1002/qua.24148},\nfile = {:sandbox/vama/docs/madness/polarizability/Basis set limit Computation Dynamic Polarizability ar Near-Resonance Region IJQC Kato 2012.pdf:pdf},\nissn = {00207608},\njournal = {International Journal of Quantum Chemistry},\nmonth = feb,\nnumber = {3},\npages = {286--289},\ntitle = {{Basis set limit computation of dynamic polarizability at near-resonance region}},\nurl = {http://doi.wiley.com/10.1002/qua.24148},\nvolume = {113},\nyear = {2013}\n}\n\n@article{Yanai*2005,\nauthor = {Yanai , Takeshi and Harrison , Robert J. and Handy, Nicholas C.},\ndoi = {10.1080/00268970412331319236},\nfile = {:homes/vama/docs/madness/yanai\\_molphys\\_tddft.pdf:pdf},\nissn = {0026-8976},\njournal = {Molecular Physics},\nmonth = jan,\nnumber = {2-3},\npages = {413--424},\ntitle = {{Multiresolution quantum chemistry in multiwavelet bases: time-dependent density functional theory with asymptotically corrected potentials in local density and generalized gradient approximations}},\nurl = {http://www.tandfonline.com/doi/abs/10.1080/00268970412331319236},\nvolume = {103},\nyear = {2005}\n}\n@article{Fosso-Tande2013,\nauthor = {Fosso-Tande, Jacob and Harrison, Robert J},\ndoi = {10.1016/j.cplett.2013.01.065},\nfile = {:sandbox/vama/docs/madness/Implicit solvation models in a multiresolution multiwavelet basis CPL Tande 2013.pdf:pdf},\nissn = {0009-2614},\njournal = {Chemical Physics Letters},\nmonth = mar,\npages = {179--184},\ntitle = {{Implicit solvation models in a multiresolution multiwavelet basis}},\nurl = {http://dx.doi.org/10.1016/j.cplett.2013.01.065 http://linkinghub.elsevier.com/retrieve/pii/S000926141300170X},\nvolume = {561-562},\nyear = {2013}\n}\n@incollection{Harrison:2003:ICCS:Madness,\nabstract = {Multiresolution analysis in multiwavelet bases is being investigated as an alternative computational framework for molecular electronic structure calculations. The features that make it attractive include an orthonormal basis, fast algorithms with guaranteed precision and sparse representations of many operators (e.g., Green functions). In this paper, we discuss the multiresolution formulation of quantum chemistry including application to density functional theory and developments that make practical computation in three and higher dimensions.},\nannote = {10.1007/3-540-44864-0\\_11},\nauthor = {Harrison, Robert and Fann, George and Yanai, Takeshi and Beylkin, Gregory},\nbooktitle = {Computational Science - \\{ICCS\\} 2003},\ndoi = {10.1007/3-540-44864-0\\_11},\neditor = {Sloot, Peter and Abramson, David and Bogdanov, Alexander and Gorbachev, Yuriy and Dongarra, Jack and Zomaya, Albert},\nfile = {:homes/vama/docs/madness/wavelets/ebook Multiresolution Quantum Chemistry in Multiwavelet Bases LNCS 2003 Harrison.pdf:pdf},\nisbn = {978-3-540-40197-1},\npages = {103-110},\npublisher = {Springer Berlin / Heidelberg},\nseries = {Lecture Notes in Computer Science},\ntitle = {{Multiresolution Quantum Chemistry in Multiwavelet Bases}},\nurl = {http://dx.doi.org/10.1007/3-540-44864-0\\_11},\nvolume = {2660},\nyear = {2003}\n}\n\n\n@article{Fann2007,\nauthor = {Fann, George I and Harrison, Robert J and Beylkin, Gregory and Jia, J and Hartman-Baker, R and Shelton, W A and Sugiki, S},\ndoi = {10.1088/1742-6596/78/1/012018},\nfile = {:sandbox/vama/docs/madness/MADNESS applied to DFT in Chemistry and nuclear physics SciDAC Fann.pdf:pdf},\nissn = {1742-6588},\njournal = {Journal of Physics: Conference Series},\nmonth = jul,\npages = {012018},\ntitle = {{MADNESS applied to density functional theory in chemistry and nuclear physics}},\nurl = {http://stacks.iop.org/1742-6596/78/i=1/a=012018?key=crossref.8db57058ca0d6fd4613e6932ec80df4c},\nvolume = {78},\nyear = {2007}\n}\n@article{Fann2009,\nabstract = {We describe a fast real-analysis based O(N) algorithm based on multiresolution analysis and low separation rank approximation of functions and operators for solving the Schr\\\"{o}dinger and Lippman-Schwinger equations in 3-D with spin-orbit potential to high precision for bound states. Each of the operators and wavefunctions has its own structure of refinement to achieve and guarantee the desired finite precision. To our knowledge, this is the first time such adaptive methods have been used in computational physics, even in 1-D. Accurate solutions for each of the wavefunctions are obtained for a sample test problem. Spin orbit potentials commonly occur in the simulations of semiconductors, quantum chemistry, molecular electronics and nuclear physics. We compare our results with those obtained by direct diagonalization using the Hermite basis and the spline basis with an example from nuclear structure theory.},\nauthor = {Fann, G I and Pei, J and Harrison, R J and Jia, J and Hill, J and Ou, M and Nazarewicz, W and Shelton, W A and Schunck, N},\nfile = {:sandbox/vama/artis/teoria-docs-quimica/M-A-D-N-E-S-S/FAST MRA for DFT in nuclear physics JCC Fann 2009.pdf:pdf},\njournal = {Journal of Physics: Conference Series},\nnumber = {1},\npages = {12080},\ntitle = {{Fast multiresolution methods for density functional theory in nuclear physics}},\nurl = {http://stacks.iop.org/1742-6596/180/i=1/a=012080},\nvolume = {180},\nyear = {2009}\n}\n\n@inproceedings{harrison2011periodic,\n  title={Periodic Density Functional Theory Solver using Multiresolution Analysis with MADNESS},\n  author={Harrison, Robert and Thornton, William},\n  booktitle={APS Meeting Abstracts},\n  volume={1},\n  pages={24005},\n  year={2011}\n}\n@article{pei2012coordinate,\n  title={{Coordinate-Space Hartree-Fock-Bogoliubov Solvers for Super fluid Fermi Systems in Large Boxes}},\n  author={Pei, JC and Fann, George I and Harrison, Robert J and Nazarewicz, W and Hill, J and Galindo, D and Jia, Jun},\n  journal = {Journal of Physics: Conference Series},\n  volume={402},\n  year={2012},\n  organization={IOP Publishing}\n}\n\n@article{pei-stoitsov-fann:2008,\n  title={{Deformed coordinate-space Hartree-Fock-Bogoliubov approach to weakly bound nuclei and large deformations}},\n  author={Pei, JC and Stoitsov, MV and Fann, GI and Nazarewicz, W and Schunck, N and Xu, FR},\n  journal={Physical Review C},\n  volume={78},\n  number={6},\n  pages={064306},\n  year={2008},\n  publisher={APS}\n}\n\n@article{valeev:2012:jcp,\nabstract = {We present an approach to compute accurate correlation energies for atoms and molecules using an adaptive discontinuous spectral-element multiresolution representation for the two-electron wave function. Because of the exponential storage complexity of the spectral-element representation with the number of dimensions, a brute-force computation of two-electron (six-dimensional) wave functions with high precision was not practical. To overcome the key storage bottlenecks we utilized (1) a low-rank tensor approximation (specifically, the singular value decomposition) to compress the wave function, and (2) explicitly correlated R12-type terms in the wave function to regularize the Coulomb electron-electron singularities of the Hamiltonian. All operations necessary to solve the Schr\\\"{o}dinger equation were expressed so that the reconstruction of the full-rank form of the wave function is never necessary. Numerical performance of the method was highlighted by computing the first-order M\\o ller-Plesset wave function of a helium atom. The computed second-order M\\o ller-Plesset energy is precise to \\~{}2 microhartrees, which is at the precision limit of the existing general atomic-orbital-based approaches. Our approach does not assume special geometric symmetries, hence application to molecules is straightforward.},\nauthor = {Bischoff, Florian a and Harrison, Robert J and Valeev, Edward F},\ndoi = {10.1063/1.4747538},\nissn = {1089-7690},\njournal = {The Journal of chemical physics},\nmonth = sep,\nnumber = {10},\npages = {104103},\npmid = {22979846},\ntitle = {{Computing many-body wave functions with guaranteed precision: the first-order M\\o ller-Plesset wave function for the ground state of helium atom.}},\nurl = {http://www.ncbi.nlm.nih.gov/pubmed/22979846},\nvolume = {137},\nyear = {2012}\n}\n\n\n@article{hill2013gaussian,\n  title={Gaussian basis sets for molecular applications},\n  author={Hill, J Grant},\n  journal={International Journal of Quantum Chemistry},\n  volume={113},\n  number={1},\n  pages={21--34},\n  year={2013},\n  publisher={Wiley Online Library}\n}\n@article{peterson2007gaussian,\n  title={Gaussian basis sets exhibiting systematic convergence to the complete basis set limit},\n  author={Peterson, Kirk A},\n  journal={Annual Reports in Computational Chemistry},\n  volume={3},\n  pages={195--206},\n  year={2007},\n  publisher={Elsevier}\n}\n\n@article{Kobus2013,\nauthor = {Kobus, Jacek},\ndoi = {10.1016/j.cpc.2012.09.033},\nfile = {:sandbox/vama/docs/madness/chap-ref/A finite difference Hartree-Fock program for atoms and diatomic molecules CPC Kobus 2013.pdf:pdf},\nissn = {00104655},\njournal = {Computer Physics Communications},\nkeywords = {atomic and diatomic systems,fock method,restricted open-shell hartree,schr\\\"{o}dinger equation of one-electron},\nmonth = mar,\nnumber = {3},\npages = {799--811},\npublisher = {Elsevier B.V.},\ntitle = {{A finite difference Hartree-Fock program for atoms and diatomic molecules}},\nurl = {http://linkinghub.elsevier.com/retrieve/pii/S0010465512003311},\nvolume = {184},\nyear = {2013}\n}\n\n@article{Hu2014,\nauthor = {Hu, Shi-Lin and Zhao, Zeng-Xiu and Shi, Ting-Yun},\ndoi = {10.1002/qua.24582},\nfile = {:sandbox/vama/docs/madness/chap-ref/B-spline one center method for molecular Hartree-Fock Calculations IJQC Hu 2014.pdf:pdf},\nissn = {00207608},\njournal = {International Journal of Quantum Chemistry},\nmonth = apr,\nnumber = {7},\npages = {441--448},\ntitle = {{B-spline one-center method for molecular Hartree-Fock calculations}},\nurl = {http://doi.wiley.com/10.1002/qua.24582},\nvolume = {114},\nyear = {2014}\n}\n\n@article{PAHL2002,\nauthor = {Pahl, Felix A. and Handy, Nicholas C},\ndoi = {10.1080/00268970210133206},\nfile = {:sandbox/vama/docs/madness/chap-ref/Plane waves and radial polynomials a new mixed basis  MPR Pahl 2002.pdf:pdf},\nissn = {0026-8976},\njournal = {Molecular Physics},\nmonth = oct,\nnumber = {20},\npages = {3199--3224},\ntitle = {{Plane waves and radial polynomials: a new mixed basis}},\nurl = {http://www.tandfonline.com/doi/abs/10.1080/00268970210133206},\nvolume = {100},\nyear = {2002}\n}\n\n@article{Mitin2000,\nauthor = {Mitin, Alexander V.},\ndoi = {10.1103/PhysRevA.62.010501},\nfile = {:sandbox/vama/docs/madness/chap-ref/Exact solution of the Hartree-Fock equation for the H2 molecule in the LCAO PRA Mitin 2000.pdf:pdf},\nissn = {1050-2947},\njournal = {Physical Review A},\nmonth = jun,\nnumber = {1},\npages = {010501},\ntitle = {{Exact solution of the Hartree-Fock equation for the H\\_\\{2\\} molecule in the linear-combination-of-atomic-orbitals approximation}},\nurl = {http://link.aps.org/doi/10.1103/PhysRevA.62.010501},\nvolume = {62},\nyear = {2000}\n}\n\n@inbook{Fridman76,\n author = {D. Friedman},\n year = {1976},\n title = {{CONS} should not evaluate its arguments},\n booktitle = {Automata, Languages and Programming},\n pages = {257-284},\n publisher = {Edinburgh University Press, Edinburgh}\n}\n@inbook{Fridman761,\n\n year = {1976},\n title = {{CONS} should not evaluate its arguments},\n editor = {S. Michaelson and R. Milner},\n booktitle = {Automata, Languages and Programming},\n page = {257-284},\n publisher = {Edinburgh University Press, Edinburgh}\n}\n\n@misc{Valeev,\n  title   = {{TiledArray}},\n  author  = {{Valeev, Edward F, et al.}},\n  note    = {https://github.com/ValeevGroup/tiledarray},\n  url     = {https://github.com/ValeevGroup/tiledarray},\n  address = {Virginia Tech, {VT}},\n  year    = {2014},\n}\n\n@article{bischoff2011low,\n  title={Low-order tensor approximations for electronic wave functions: Hartree--Fock method with guaranteed precision},\n  author={Bischoff, Florian A and Valeev, Edward F},\n  journal={The Journal of Chemical Physics},\n  volume={134},\n  pages={104104},\n  year={2011}\n}\n\n@article{bischoff2012computing,\n  title={Computing many-body wave functions with guaranteed precision: The first-order M{\\o}ller-Plesset wave function for the ground state of helium atom},\n  author={Bischoff, Florian A and Harrison, Robert J and Valeev, Edward F},\n  journal={The Journal of Chemical Physics},\n  volume={137},\n  pages={104103},\n  year={2012}\n}\n\n@article{Baker77,\n  author = {H. Baker},\n  year = {1977},\n  title = {The Incremental Garbage Collection of Processes},\n  journal = {Proceedings of the Symposium on Artificial Intelligence Programming Languages, {SIGPLAN} Notices},\n  volume = {12}\n}\n\n@book{koch2001chemist,\n  title = {A chemist's guide to density functional theory},\n  author = {Koch, Wolfram and Holthausen, Max C},\n  volume = {2},\n  year = {2001},\n  publisher = {Wiley-Vch Weinheim}\n}\n\n@misc{MADNESS-web,\n  title   = {{Multiresolution ADaptive NumErical Scientific Simulation (MADNESS)}},\n  author  = {{Robert J. Harrison, et al.}},\n  note    = {https://github.com/m-a-d-n-e-s-s/madness},\n  url     = {https://github.com/m-a-d-n-e-s-s/madness},\n  address = {Stony Brook, {NY}},\n  year    = {2014},\n}\n\n@article{kalos1962monte,\n  title={Monte Carlo calculations of the ground state of three-and four-body nuclei},\n  author={Kalos, MH},\n  journal={Physical Review},\n  volume={128},\n  number={4},\n  pages={1791},\n  year={1962},\n  publisher={APS}\n}\n\n\n@misc{MADNESS1,\n  author  = {{Robert J. Harrison, et al.}},\n  title   = {{Multiresolution ADaptive NumErical Scientific Simulation (MADNESS)}},\n  note    = {http://code.google.com/p/m-a-d-n-e-s-s/},\n  url     = {http://code.google.com/p/m-a-d-n-e-s-s/},\n  address = {Oak Ridge, {TN}},\n  year    = {2010},\n}\n\n@misc{Eigen3,\n  title   = {{Eigen3}},\n  note    = {http://eigen.tuxfamily.org},\n  url     = {http://eigen.tuxfamily.org}\n}\n@misc{Elemental,\n  title   = {{Elemental}},\n  note    = {https://code.google.com/p/elemental/},\n  url     = {https://code.google.com/p/elemental/}\n}\n\n@misc{mtxm-notes,\n  author  = {Robert J. Harrison},\n  title   = {Fast matrix-transpose matrix products on x86 architectures for small square and long rectangular matrices},\n  address = {Oak Ridge, {TN}},\n  howpublished = {},\n  year    = {2007},\n}\n\n@misc{harrison-madness-overview,\n  author = {David E. Bernholdt and Wael R. Elwasif and Robert J. Harrison and Aniruddha G. Shet},\n  title = {The what, why, and how of {MADNESS}},\n  howpublished = {\\url{http://m-a-d-n-e-s-s.googlecode.com/files/MADNESS%20summary-v3.pdf}},\n  year = {2011}\n}\n\n@inproceedings{Thornton:2009:CUG:MADNESS,\n    author = {W. Scott Thornton and Nicholas Vence and Robert Harrison},\n    title = {Introducing the {MADNESS} numerical framework for petascale computing},\n    booktitle = {{CUG} 2009, the {Cray} User Group meeting},\n    pages = {1 --5},\n    year = {2009}\n}\n@article{Vence2012,\nauthor = {Vence, Nicholas and Harrison, Robert and Krsti\\'{c}, Predrag},\ndoi = {10.1103/PhysRevA.85.033403},\nfile = {:sandbox/vama/docs/madness/Attosencond electron dynamics MRA Vence PRA 2012.pdf:pdf},\nissn = {1050-2947},\njournal = {Physical Review A},\nmonth = mar,\nnumber = {3},\npages = {033403},\ntitle = {{Attosecond electron dynamics: A multiresolution approach}},\nurl = {http://link.aps.org/doi/10.1103/PhysRevA.85.033403},\nvolume = {85},\nyear = {2012}\n}\n\n@article{Reuter:2012:CPC:madness-irregular-pdes1,\n  author = {Matthew G. Reuter and Judith C. Hill and Robert J. Harrison},\n  title = {Solving {PDE}s in irregular geometries with multiresolution methods {I}: Embedded {D}irichlet boundary conditions},\n  journal = {Computer Physics Communications},\n  volume = {183},\n  number = {1},\n  pages = {1 - 7},\n  year = {2012},\n  note = {},\n  issn = {0010-4655},\n  doi = {10.1016/j.cpc.2011.07.001},\n  url = {http://www.sciencedirect.com/science/article/pii/S0010465511002396},\n  keywords = {Multiresolution analysis},\n  keywords = {Domain embedding techniques},\n  keywords = {Electrostatics}\n}\n\n@article{Fann:2007:JoPCS:Madness-DFT,\n  author={G. I. Fann and R. J. Harrison and G. Beylkin and J. Jia and R. Hartman-Baker and W. A. Shelton and S. Sugiki},\n  title={{MADNESS} applied to density functional theory in chemistry and nuclear physics},\n  journal={Journal of Physics: Conference Series},\n  volume={78},\n  number={1},\n  pages={012018},\n  url={http://stacks.iop.org/1742-6596/78/i=1/a=012018},\n  year={2007},\n  abstract={We describe some recent mathematical results in constructing computational methods that lead to the development of fast and accurate multiresolution numerical methods for solving quantum chemistry and nuclear physics problems based on Density Functional Theory (DFT). Usi\nng low separation rank representations of functions and operators in conjunction with representations in multiwavelet bases, we developed a multiscale solution method for integral and differential equations and integral transforms. The Poisson equation, the Schrodinger equation, and\n the projector on the divergence free functions provide important examples with a wide range of applications in computational chemistry, nuclear physics, computational electromagnetic and fluid dynamics. We have implemented this approach along with adaptive representations of operat\nors and functions in the multiwavelet basis and low separation rank (LSR) approximation of operators and functions. These methods have been realized and implemented in a software package called Multiresolution Adaptive Numerical Evaluation for Scientific Simulation (MADNESS).}\n}\n\n@article{Harrison:2005:JoPCS:Madness-chemistry,\n  author={Robert J. Harrison and George I. Fann and Zhengting Gan and Takeshi Yanai and Shinichiro Sugiki and Ariana Beste and Gregory Beylkin},\n  title={Multiresolution computational chemistry},\n  journal={Journal of Physics: Conference Series},\n  volume={16},\n  number={1},\n  pages={243},\n  url={http://stacks.iop.org/1742-6596/16/i=1/a=032},\n  year={2005},\n  abstract={Multiresolution techniques in multiwavelet bases, made practical in three and higher dimensions by separated representations, have enabled significant advances in the accuracy and manner of computation of molecular electronic structure. The mathematical and numerical tec\nhniques are described in the article by Fann. This paper summarizes the major accomplishments in computational chemistry which represent the first substantial application of most of these new ideas in three and higher dimensions. These include basis set limit computation with linear\n scaling for Hartree-Fock and Density Functional Theory with a wide variety of functionals including hybrid and asymptotically corrected forms. Current capabilities include energies, analytic derivatives, and excitation energies from linear response theory. Direct solution in 6-D of\n the two-particle wave equation has also been demonstrated. These methods are written using MADNESS which provides a high level of composition using functions and operators with guarantees of speed and precision.}\n}\n\n@article{Fann:2009:JoPCS:Madness-nuclear,\n  author={G. I. Fann and J. Pei and R. J. Harrison and J. Jia and J. Hill and M. Ou and W. Nazarewicz and W. A. Shelton and N. Schunck},\n  title={Fast multiresolution methods for density functional theory in nuclear physics},\n  journal={Journal of Physics: Conference Series},\n  volume={180},\n  number={1},\n  pages={012080},\n  url={http://stacks.iop.org/1742-6596/180/i=1/a=012080},\n  year={2009},\n  abstract={We describe a fast real-analysis based O(N) algorithm based on multiresolution analysis and low separation rank approximation of functions and operators for solving the Schr��dinger and Lippman-Schwinger equations in 3-D with spin-orbit potential to high precision for boun\nd states. Each of the operators and wavefunctions has its own structure of refinement to achieve and guarantee the desired finite precision. To our knowledge, this is the first time such adaptive methods have been used in computational physics, even in 1-D. Accurate solutions for each of the wavefunctions are obtained for a sample test problem. Spin orbit potentials commonly occur in the simulations of semiconductors, quantum chemistry, molecular electronics and nuclear physics. We compare our results with those obtained by direct diagonalization using the Her\nmite basis and the spline basis with an example from nuclear structure theory.}\n}\n\n@article{Fann:2009:JoPCS:Madness-lowrank,\n  author={G. I. Fann and R. J. Harrison and G. Beylkin},\n  title={{MRA} and low-separation rank approximation with applications to quantum electronics structures computations},\n  journal={Journal of Physics: Conference Series},\n  volume={16},\n  number={1},\n  pages={461},\n  url={http://stacks.iop.org/1742-6596/16/i=1/a=062},\n  year={2005},\n  abstract={We describe some recent mathematical results in constructing computational methods that lead to the development of fast and accurate multiresolution numerical methods for solving problems in computational chemistry (the so-called multiresolution quantum chemistry). Using\n low separation rank representations of functions and operators and representations in multiwavelet bases, we developed a multiscale solution method for integral and differential equations and integral transforms. The Poisson equation and the Schrodinger equation, the projector on t\nhe divergence free functions, provide important examples with a wide range of applications in computational chemistry, computational electromagnetic and fluid dynamics. We have implemented these ideas that include adaptive representations of operators and functions in the multiwavel\net basis and low separation rank approximation of operators and functions. These methods have been implemented into a software package called Multiresolution Adaptive Numerical Evaluation for Scientific Simulation (MADNESS).}\n}\n\n@article{Alpert:2002:JCoP:multiwavelet,\n  title = {Adaptive Solution of Partial Differential Equations in Multiwavelet Bases},\n  journal = {Journal of Computational Physics},\n  volume = {182},\n  number = {1},\n  pages = {149 - 190},\n  year = {2002},\n  note = {},\n  issn = {0021-9991},\n  doi = {10.1006/jcph.2002.7160},\n  url = {http://www.sciencedirect.com/science/article/pii/S0021999102971603},\n  author = {B. Alpert and G. Beylkin and D. Gines and L. Vozovoi},\n  abstract = {We construct multiresolution representations of derivative and exponential operators with linear boundary conditions in multiwavelet bases and use them to develop a simple, adaptive scheme for the solution of nonlinear, time-dependent partial differential equations. Th\ne emphasis on hierarchical representations of functions on intervals helps to address issues of both high-order approximation and efficient application of integral operators, and the lack of regularity of multiwavelets does not preclude their use in representing differential operato\nrs. Comparisons with finite difference, finite element, and spectral element methods are presented, as are numerical examples with the heat equation and Burgers' equation.},\n}\n\n@article{Beylkin:2011:ACHA:multiresolution,\n  title = {Multiresolution representation of operators with boundary conditions on simple domains},\n  journal = {Applied and Computational Harmonic Analysis},\n  volume = {},\n  number = {0},\n  pages = { - },\n  year = {2011},\n  note = {},\n  issn = {1063-5203},\n  doi = {10.1016/j.acha.2011.10.001},\n  url = {http://www.sciencedirect.com/science/article/pii/S1063520311001072},\n  author = {Gregory Beylkin and George Fann and Robert J. Harrison and Christopher Kurcz and Lucas Monzon},\n  keywords = {Multiresolution},\n  keywords = {Non-standard form},\n  keywords = {Projector on divergence free functions},\n  keywords = {Poisson Green's function},\n  keywords = {Non-oscillatory Helmholtz Green's function},\n  keywords = {Hilbert transform},\n  keywords = {Periodic boundary conditions},\n  keywords = {Separated representations},\n  abstract = {We develop a multiresolution representation of a class of integral operators satisfying boundary conditions on simple domains in order to construct fast algorithms for their application. We also elucidate some delicate theoretical issues related to the construction of \nperiodic Green's functions for Poisson's equation.  By applying the method of images to the non-standard form of the free space operator, we obtain lattice sums that converge absolutely on all scales, except possibly on the coarsest scale. On the coarsest scale the lattice sums may \nbe only conditionally convergent and, thus, allow for some freedom in their definition. We use the limit of square partial sums as a definition of the limit and obtain a systematic, simple approach to the construction (in any dimension) of periodized operators with sparse non-standa\nrd forms.  We illustrate the results on several examples in dimensions one and three: the Hilbert transform, the projector on divergence free functions, the non-oscillatory Helmholtz Green's function and the Poisson operator. Remarkably, the limit of square partial sums yields a per\niodic Poisson Green's function which is not a convolution.  Using a short sum of decaying Gaussians to approximate periodic Green's functions, we arrive at fast algorithms for their application. We further show that the results obtained for operators with periodic boundary condition\ns extend to operators with Dirichlet, Neumann, or mixed boundary conditions.},\n}\n\n@article{Beylkin:2007:ACHA:singular,\n  title = {Multiresolution separated representations of singular and weakly singular operators},\n  journal = {Applied and Computational Harmonic Analysis},\n  volume = {23},\n  number = {2},\n  pages = {235 - 253},\n  year = {2007},\n  issn = {1063-5203},\n  doi = {10.1016/j.acha.2007.01.001},\n  url = {http://www.sciencedirect.com/science/article/pii/S1063520307000048},\n  author = {Gregory Beylkin and Robert Cramer and George Fann and Robert J. Harrison},\n  keywords = {Separated representation},\n  keywords = {Poisson kernel},\n  keywords = {Projector on the divergence free functions},\n  keywords = {Multiwavelet bases},\n  keywords = {Integral operators},\n  abstract = {For a finite but arbitrary precision, we construct efficient low separation rank representations for the Poisson kernel and for the projector on the divergence free functions in the dimension d = 3 . Our construction requires computing only one-dimensional integrals. W\ne use scaling functions of multiwavelet bases, thus making these representations available for a variety of multiresolution algorithms. Besides having many applications, these two operators serve as examples of weakly singular and singular operators for which our approach is applica\nble. Our approach provides a practical implementation of separated representations of a class of weakly singular and singular operators in dimensions d $\\ge$ 2.},\n}\n\n@incollection{Harrison2003ICCSMadness,\n   author = {Harrison, Robert and Fann, George and Yanai, Takeshi and Beylkin, Gregory},\n   affiliation = {Oak Ridge National Laboratory P.O. Box 2008 MS6367 Oak Ridge TN 37831-6367},\n   title = {Multiresolution Quantum Chemistry in Multiwavelet Bases},\n   booktitle = {Computational Science - {ICCS} 2003},\n   series = {Lecture Notes in Computer Science},\n   editor = {Sloot, Peter and Abramson, David and Bogdanov, Alexander and Gorbachev, Yuriy and Dongarra, Jack and Zomaya, Albert},\n   publisher = {Springer Berlin / Heidelberg},\n   isbn = {978-3-540-40197-1},\n   keyword = {Computer Science},\n   pages = {103-110},\n   volume = {2660},\n   url = {http://dx.doi.org/10.1007/3-540-44864-0_11},\n   note = {10.1007/3-540-44864-0_11},\n   year = {2003}\n}\n@incollection{harrison2003multiresolution,\n  title={Multiresolution quantum chemistry in multiwavelet bases},\n  author={Harrison, Robert J and Fann, George I and Yanai, Takeshi and Beylkin, Gregory},\n  booktitle={Computational Science���ICCS 2003},\n  pages={103--110},\n  year={2003},\n  publisher={Springer}\n}\n\n@ARTICLE{Fann:2004:IBM:singular,\n  author={Fann, G. and Beylkin, G. and Harrison, R. J. and Jordan, K. E.},\n  journal={{IBM} Journal of Research and Development},\n  title={Singular operators in multiwavelet bases},\n  year={2004},\n  month={march},\n  volume={48},\n  number={2},\n  pages={161 -171},\n  abstract={We review some recent results on multiwavelet methods for solving integral and partial differential equations and present an efficient representation of operators using discontinuous multiwavelet bases, including the case for singular integral operators. Numerical calcul\nus using these representations produces fast O(N) methods for multiscale solution of integral equations when combined with low separation rank methods. Using this formulation, we compute the Hilbert transform and solve the Poisson and Schr #x00F6;dinger equations. For a fixed order \nof multiwavelets and for arbitrary but finite-precision computations, the computational complexity is O(N). The computational structures are similar to fast multipole methods but are more generic in yielding fast O(N) algorithm development.},\n  keywords={},\n  doi={10.1147/rd.482.0161},\n  ISSN={0018-8646},\n}\n\n@article{Harrison:2004:JChP:MRQC-basic,\n  author = {Robert J. Harrison and George I. Fann and Takeshi Yanai and Zhengting Gan and Gregory Beylkin},\n  title = {Multiresolution quantum chemistry: Basic theory and initial applications},\n  publisher = {AIP},\n  year = {2004},\n  journal = {The Journal of Chemical Physics},\n  volume = {121},\n  number = {23},\n  pages = {11587-11598},\n  keywords = {density functional theory; atomic structure; molecular electronic states; Helmholtz equations; Poisson equation; Green's function methods; quantum chemistry; water; organic compounds; beryllium; magnesium; calcium; strontium; helium neutral atoms},\n  url = {http://link.aip.org/link/?JCP/121/11587/1},\n  doi = {10.1063/1.1791051}\n}\n\n@article{Yanai:2004:JChP:MRQC-HFX,\n  author = {Takeshi Yanai and George I. Fann and Zhenting Gan and Robert J. Harrison and Gregory Beylkin},\n  title = {Multiresolution quantum chemistry in multiwavelet bases: {H}artree--{F}ock exchange},\n  publisher = {AIP},\n  year = {2004},\n  journal = {The Journal of Chemical Physics},\n  volume = {121},\n  number = {14},\n  pages = {6680-6688},\n  keywords = {quantum chemistry; SCF calculations; HF calculations; molecular electronic states; orbital calculations; water; molecular clusters; integral equations; numerical analysis; chemistry computing; wavelet transforms},\n  url = {http://link.aip.org/link/?JCP/121/6680/1},\n  doi = {10.1063/1.1790931}\n}\n\n@article{Yanai:2004:JChP:MRQC-derivatives,\n  author = {Takeshi Yanai and George I. Fann and Zhengting Gan and Robert J. Harrison and Gregory Beylkin},\n  title = {Multiresolution quantum chemistry in multiwavelet bases: Analytic derivatives for {H}artree--{F}ock and density functional theory},\n  publisher = {AIP},\n  year = {2004},\n  journal = {The Journal of Chemical Physics},\n  volume = {121},\n  number = {7},\n  pages = {2866-2876},\n  keywords = {nitrogen; water; HF calculations; density functional theory; quantum chemistry; quantum theory; molecular configurations},\n  url = {http://link.aip.org/link/?JCP/121/2866/1},\n  doi = {10.1063/1.1768161}\n}\n\n@INPROCEEDINGS{Stock:2011:IPDPS:SIMD,\n  author={Stock, K. and Henretty, T. and Murugandi, I. and Sadayappan, P. and Harrison, R.},\n  booktitle={International Parallel Distributed Processing Symposium ({IPDPS})},\n  title={Model-Driven {SIMD} Code Generation for a Multi-resolution Tensor Kernel},\n  year={2011},\n  month={may},\n  volume={},\n  number={},\n  pages={1058-1067},\n  abstract={In this paper, we describe a model-driven compile-time code generator that transforms a class of tensor contraction expressions into highly optimized short-vector SIMD code. We use as a case study a multi-resolution tensor kernel from the MADNESS quantum chemistry applic\nation. Performance of a C-based implementation is low, and because the dimensions of the tensors are small, performance using vendor optimized BLAS libraries is also sub optimal. We develop a model-driven code generator that determines the optimal loop permutation and placement of v\nector load/store, transpose, and splat operations in the generated code, enabling portable performance on short-vector SIMD architectures. Experimental results on an SSE-based platform demonstrate the efficiency of the vector-code synthesizer.},\n  keywords={C-based implementation;MADNESS quantum chemistry application;model-driven SIMD code generation;model-driven code generator;model-driven compile-time code generator;multiresolution tensor kernel;optimal loop permutation;short-vector SIMD architecture;short-vector SIMD cod\ne;splat operation;tensor contraction expression;vector-code synthesizer;parallel processing;tensors;},\n  doi={10.1109/IPDPS.2011.101},\n  ISSN={1530-2075},\n}\n\n\n@article{nielsen2000multi,\n  title={Multi-threading: A new dimension to massively parallel scientific computation},\n  author={Nielsen, Ida and Janssen, Curtis L},\n  journal={Computer physics communications},\n  volume={128},\n  number={1},\n  pages={238--244},\n  year={2000},\n  publisher={Elsevier}\n}\n@book{goedecker1997wavelets,\n  title={Wavelets and their application for the solution of partial differential equations in physics},\n  author={Goedecker, Stefan},\n  year={1997},\n  publisher={Universit{\\'e}, B{\\^a}timent des sciences physiques, MD Reymond}\n}\n@article{Johnson2001,\nauthor = {Johnson, Bruce R and Mackey, Jeffrey L and Kinsey, James L},\ndoi = {10.1006/jcph.2001.6701},\nfile = {:sandbox/vama/docs/madness/wavelets/Solution of Cartesian and curvilinear Quantum eq Multiwavelets Johnson 2000.pdf:pdf},\nissn = {00219991},\njournal = {Journal of Computational Physics},\nkeywords = {curvilinear,eigenvalue,interval,multiwavelets,quantum},\nmonth = apr,\nnumber = {2},\npages = {356--383},\ntitle = {{Solution of Cartesian and Curvilinear Quantum Equations via Multiwavelets on the Interval}},\nurl = {http://linkinghub.elsevier.com/retrieve/pii/S0021999101967014},\nvolume = {168},\nyear = {2001}\n}\n@article{meyer1991ondelettes,\n  title={Ondelettes sur l'intervalle.},\n  author={Meyer, Yves},\n  journal={Revista Matematica Iberoamericana},\n  volume={7},\n  number={2},\n  pages={115--133},\n  year={1991},\n  publisher={European Mathematical Society}\n}\n@book{meyer1992ondelettes,\n  title={Ondelettes et algorithmes concurrents},\n  author={Meyer, Yves},\n  volume={1435},\n  year={1992},\n  publisher={Editions Hermann}\n}\n@book{meyer1992ondelettes,\n  title={Ondelettes et algorithmes},\n  author={Meyer, Yves},\n  year={1990},\n  publisher={Editions Hermann}\n}\n\n@article{Daubechies1988,\nauthor = {Daubechies, Ingrid},\ndoi = {10.1002/cpa.3160410705},\nfile = {:sandbox/vama/docs/madness/wavelets/Orthonormal bases of compactly supported wavelets CPC Daubechies 1988.pdf:pdf},\nissn = {00103640},\njournal = {Communications on Pure and Applied Mathematics},\nmonth = oct,\nnumber = {7},\npages = {909--996},\ntitle = {{Orthonormal bases of compactly supported wavelets}},\nurl = {http://doi.wiley.com/10.1002/cpa.3160410705},\nvolume = {41},\nyear = {1988}\n}\n\n@article{Beste2006,\nabstract = {Chemists are mainly interested in energy differences. In contrast, most quantum chemical methods yield the total energy which is a large number compared to the difference and has therefore to be computed to a higher relative precision than would be necessary for the difference alone. Hence, it is desirable to compute energy differences directly, thereby avoiding the precision problem. Whenever it is possible to find a parameter which transforms smoothly from an initial to a final state, the energy difference can be obtained by integrating the energy derivative with respect to that parameter (cf. thermodynamic integration or adiabatic connection methods). If the dependence on the parameter is predominantly linear, accurate results can be obtained by single-point integration. In density functional theory and Hartree-Fock, we applied the formalism to ionization potentials, excitation energies, and chemical bond breaking. Example calculations for ionization potentials and excitation energies showed that accurate results could be obtained with a linear estimate. For breaking bonds, we introduce a nongeometrical parameter which gradually turns the interaction between two fragments of a molecule on. The interaction changes the potentials used to determine the orbitals as well as the constraint on the orbitals to be orthogonal.},\nauthor = {Beste, A and Harrison, R J and Yanai, T},\ndoi = {10.1063/1.2244559},\nfile = {:sandbox/vama/docs/anatole/chemicalcomp/papers/Direct computation of general chemical energy diff JCP Beste 2011.pdf:pdf},\nissn = {0021-9606},\njournal = {The Journal of chemical physics},\nmonth = aug,\nnumber = {7},\npages = {074101},\npmid = {16942316},\ntitle = {{Direct computation of general chemical energy differences: Application to ionization potentials, excitation, and bond energies.}},\nurl = {http://www.ncbi.nlm.nih.gov/pubmed/16942316},\nvolume = {125},\nyear = {2006}\n}\n\n@article{Goedecker1996,\nauthor = {Goedecker, S and Teter, M and Hutter, J},\ndoi = {10.1103/PhysRevB.54.1703},\nfile = {:sandbox/vama/docs/anatole/DCAPCP/Separable dual-space Gaussian Pseudopotentials PRB Goedecker 1996.pdf:pdf},\nissn = {0163-1829},\njournal = {Physical Review B},\nmonth = jul,\nnumber = {3},\npages = {1703--1710},\ntitle = {{Separable dual-space Gaussian pseudopotentials}},\nurl = {http://link.aps.org/doi/10.1103/PhysRevB.54.1703},\nvolume = {54},\nyear = {1996}\n}\n@article{Hartwigsen1998,\nauthor = {Hartwigsen, C and Goedecker, S and Hutter, J},\ndoi = {10.1103/PhysRevB.58.3641},\nfile = {:sandbox/vama/docs/bigdft/psp/HGH-PhysRevB.58.3641.pdf:pdf;:sandbox/vama/docs/anatole/DCAPCP/Relativistic separable dual-space Gaussian pseudopotentials from H to Rn Hartwigsen 1998.pdf:pdf},\nissn = {0163-1829},\njournal = {Physical Review B},\nmonth = aug,\nnumber = {7},\npages = {3641--3662},\ntitle = {{Relativistic separable dual-space Gaussian pseudopotentials from H to Rn}},\nurl = {http://link.aps.org/doi/10.1103/PhysRevB.58.3641},\nvolume = {58},\nyear = {1998}\n}\n\n@article{zalesny2011linear,\n  title={Linear-Scaling Techniques in Computational Chemistry and Physics: Methods and Applications},\n  author={Zalesny, Robert and Papadopoulos, Manthos G and Mezey, Paul G and Leszczynski, Jerzy},\n  journal={Challenges and Advances in Computational Chemistry and Physics (13)},\n  year={2011},\n  publisher={Dordrecht: Springer Science+ Business Media BV}\n}\n@article{Goedecker1999,\nauthor = {Goedecker, Stefan},\ndoi = {10.1103/RevModPhys.71.1085},\nfile = {:sandbox/vama/docs/bigdft/Linear Scaling electronic structure methods RevModPhys Goedecker.pdf:pdf},\nissn = {0034-6861},\njournal = {Reviews of Modern Physics},\nmonth = jul,\nnumber = {4},\npages = {1085--1123},\ntitle = {{Linear scaling electronic structure methods}},\nurl = {http://link.aps.org/doi/10.1103/RevModPhys.71.1085},\nvolume = {71},\nyear = {1999}\n}\n@article{Goedecker:Ivanov:1999,\nauthor = {Goedecker, S and Ivanov, OV},\ndoi = {10.1103/PhysRevB.59.7270},\nfile = {:sandbox/vama/docs/madness/wavelets/Frequency localization properties of the density matrix and its resulting hypersparsity in a wavelet  PRB Goedecker 1999.pdf:pdf},\nissn = {0163-1829},\njournal = {Physical Review B},\nmonth = mar,\nnumber = {11},\npages = {7270--7273},\ntitle = {{Frequency localization properties of the density matrix and its resulting hypersparsity in a wavelet representation}},\nurl = {http://link.aps.org/doi/10.1103/PhysRevB.59.7270 http://prb.aps.org/abstract/PRB/v59/i11/p7270\\_1},\nvolume = {59},\nyear = {1999}\n}\n@article{murakami1992three,\nauthor = {Murakami, H and Sonnad, V and Clementi, E},\ndoi = {10.1002/qua.560420418},\nissn = {0020-7608},\njournal = {International Journal of Quantum Chemistry},\nmonth = may,\nnumber = {4},\npages = {785--817},\npublisher = {Wiley Online Library},\ntitle = {{A three-dimensional finite element approach towards molecular SCF computations}},\nurl = {http://doi.wiley.com/10.1002/qua.560420418},\nvolume = {42},\nyear = {1992}\n}\n@article{Bylaska2009,\nauthor = {Bylaska, Eric J. and Holst, Michael and Weare, John H.},\ndoi = {10.1021/ct800350j},\nfile = {:sandbox/vama/artis/teoria-docs-quimica/Finite Element Method/Adaptive FEM for solving exact KS-DFT JCTC 2009 Bylaska.pdf:pdf},\nissn = {1549-9618},\njournal = {Journal of Chemical Theory and Computation},\nmonth = apr,\nnumber = {4},\npages = {937--948},\ntitle = {{Adaptive Finite Element Method for Solving the Exact Kohn-Sham Equation of Density Functional Theory}},\nurl = {http://pubs.acs.org/doi/abs/10.1021/ct800350j},\nvolume = {5},\nyear = {2009}\n}\n\n@article{Stock2012,\nauthor = {Stock, Kevin and Pouchet, Louis-No\\\"{e}l and Sadayappan, P.},\ndoi = {10.1145/2086696.2086729},\nfile = {:sandbox/vama/docs/madness/Using Machine Learning to Imporve Automatic Vectorization - Kevin Stock.pdf:pdf},\nissn = {15443566},\njournal = {ACM Transactions on Architecture and Code Optimization},\nmonth = jan,\nnumber = {4},\npages = {1--23},\ntitle = {{Using machine learning to improve automatic vectorization}},\nurl = {http://dl.acm.org/citation.cfm?doid=2086696.2086729},\nvolume = {8},\nyear = {2012}\n}\n@article{Yanai2004,\nabstract = {An efficient and accurate analytic gradient method is presented for Hartree-Fock and density functional calculations using multiresolution analysis in multiwavelet bases. The derivative is efficiently computed as an inner product between compressed forms of the density and the differentiated nuclear potential through the Hellmann-Feynman theorem. A smoothed nuclear potential is directly differentiated, and the smoothing parameter required for a given accuracy is empirically determined from calculations on six homonuclear diatomic molecules. The derivatives of N2 molecule are shown using multiresolution calculation for various accuracies with comparison to correlation consistent Gaussian-type basis sets. The optimized geometries of several molecules are presented using Hartree-Fock and density functional theory. A highly precise Hartree-Fock optimization for the H2O molecule produced six digits for the geometric parameters.},\nauthor = {Yanai, Takeshi and Fann, George I and Gan, Zhengting and Harrison, Robert J and Beylkin, Gregory},\ndoi = {10.1063/1.1768161},\nfile = {:home/alvaro/mas/artis/teoria-docs-quimica/M-A-D-N-E-S-S/analytic derivatives for HF and LDA madness JCP Yanai 2004.pdf:pdf},\nissn = {0021-9606},\njournal = {The Journal of chemical physics},\nmonth = aug,\nnumber = {7},\npages = {2866--76},\npmid = {15291596},\ntitle = {{Multiresolution quantum chemistry in multiwavelet bases: Analytic derivatives for Hartree-Fock and density functional theory.}},\nurl = {http://www.ncbi.nlm.nih.gov/pubmed/15291596},\nvolume = {121},\nyear = {2004}\n}\n@article{Rappoport2010,\nabstract = {With recent advances in electronic structure methods, first-principles calculations of electronic response properties, such as linear and nonlinear polarizabilities, have become possible for molecules with more than 100 atoms. Basis set incompleteness is typically the main source of error in such calculations since traditional diffuse augmented basis sets are too costly to use or suffer from near linear dependence. To address this problem, we construct the first comprehensive set of property-optimized augmented basis sets for elements H-Rn except lanthanides. The new basis sets build on the Karlsruhe segmented contracted basis sets of split-valence to quadruple-zeta valence quality and add a small number of moderately diffuse basis functions. The exponents are determined variationally by maximization of atomic Hartree-Fock polarizabilities using analytical derivative methods. The performance of the resulting basis sets is assessed using a set of 313 molecular static Hartree-Fock polarizabilities. The mean absolute basis set errors are 3.6\\%, 1.1\\%, and 0.3\\% for property-optimized basis sets of split-valence, triple-zeta, and quadruple-zeta valence quality, respectively. Density functional and second-order M\\o ller-Plesset polarizabilities show similar basis set convergence. We demonstrate the efficiency of our basis sets by computing static polarizabilities of icosahedral fullerenes up to C(720) using hybrid density functional theory.},\nauthor = {Rappoport, Dmitrij and Furche, Filipp},\ndoi = {10.1063/1.3484283},\nfile = {:home/alvaro/docs/madness/chap-ref/gaussianbasisref/Property-optimized Gaussian basis sets for molecular response calculations Rappoport JCP 2010.pdf:pdf},\nissn = {1089-7690},\njournal = {The Journal of chemical physics},\nmonth = oct,\nnumber = {13},\npages = {134105},\npmid = {20942521},\ntitle = {{Property-optimized gaussian basis sets for molecular response calculations.}},\nurl = {http://www.ncbi.nlm.nih.gov/pubmed/20942521},\nvolume = {133},\nyear = {2010}\n}\n@article{Poulson2013,\nauthor = {Poulson, Jack and Marker, Bryan and van de Geijn, Robert A. and Hammond, Jeff R. and Romero, Nichols A. and Geijn, Robert A V A N D E and Hammond, Jeff R. and Romero, Nichols A.},\ndoi = {10.1145/2427023.2427030},\nfile = {:sandbox/vama/docs/jhammond/elemental/Elemental-TOMS-revised.pdf:pdf;:sandbox/vama/docs/software/Elemental-rev2.pdf:pdf},\nissn = {00983500},\njournal = {ACM Transactions on Mathematical Software},\nmonth = feb,\nnumber = {2},\npages = {1--24},\ntitle = {{Elemental: A new framework for distributed memory dense matrix computations}},\nurl = {http://dl.acm.org/citation.cfm?doid=2427023.2427030},\nvolume = {39},\nyear = {2013}\n}\n\n@MISC{eigenweb,\n  author = {Ga\\\"{e}l Guennebaud and Beno\\^{i}t Jacob and others},\n  title = {Eigen v3},\n  howpublished = {http://eigen.tuxfamily.org},\n  year = {2010}\n }\n\n@article{Andrade2007,\nabstract = {The authors present an efficient perturbative method to obtain both static and dynamic polarizabilities and hyperpolarizabilities of complex electronic systems. This approach is based on the solution of a frequency-dependent Sternheimer equation, within the formalism of time-dependent density functional theory, and allows the calculation of the response both in resonance and out of resonance. Furthermore, the excellent scaling with the number of atoms opens the way to the investigation of response properties of very large molecular systems. To demonstrate the capabilities of this method, they implemented it in a real-space (basis-set-free) code and applied it to benchmark molecules, namely, CO, H2O, and para-nitroaniline. Their results are in agreement with experimental and previous theoretical studies and fully validate their approach.},\nauthor = {Andrade, Xavier and Botti, Silvana and Marques, Miguel a L and Rubio, Angel},\ndoi = {10.1063/1.2733666},\nfile = {:sandbox/vama/artis/dynamic properties/Polarizability/TDDFT dynamyc polarizablities Octopus JCP 2007.PDF:PDF},\nissn = {0021-9606},\njournal = {The Journal of chemical physics},\nmonth = may,\nnumber = {18},\npages = {184106},\npmid = {17508791},\ntitle = {{Time-dependent density functional theory scheme for efficient calculations of dynamic (hyper)polarizabilities.}},\nurl = {http://www.ncbi.nlm.nih.gov/pubmed/17508791},\nvolume = {126},\nyear = {2007}\n}\n@article{Senatore1987,\nauthor = {Senatore, G. and Subbaswamy, K.},\ndoi = {10.1103/PhysRevA.35.2440},\nfile = {:sandbox/vama/artis/dynamic properties/Polarizability/Nonlinear response of closed shell atoms in the DFT PRA Senatore 1987.pdf:pdf},\nissn = {0556-2791},\njournal = {Physical Review A},\nmonth = mar,\nnumber = {6},\npages = {2440--2447},\ntitle = {{Nonlinear response of closed-shell atoms in the density-functional formalism}},\nurl = {http://link.aps.org/doi/10.1103/PhysRevA.35.2440},\nvolume = {35},\nyear = {1987}\n}\n@article{alpert1993class,\n  title={A class of bases in L\\^{}2 for the sparse representation of integral operators},\n  author={Alpert, Bradley K},\n  journal={SIAM journal on Mathematical Analysis},\n  volume={24},\n  number={1},\n  pages={246--262},\n  year={1993},\n  publisher={SIAM}\n}\n@article{PSP:2037060,\nauthor = {McWeeny,R.},\ntitle = {Note on the iterative method in nuclear problems},\njournal = {Mathematical Proceedings of the Cambridge Philosophical Society},\nvolume = {45},\nissue = {02},\nmonth = {4},\nyear = {1949},\nissn = {1469-8064},\npages = {315--317},\nnumpages = {3},\ndoi = {10.1017/S0305004100024889}\n}\n@ARTICLE{1950RSPSA.200..542B,\n   author = {{Boys}, S.~F.},\n    title = \"{Electronic Wave Functions. I. A General Method of Calculation for the Stationary States of Any Molecular System}\",\n  journal = {Royal Society of London Proceedings Series A},\n     year = 1950,\n    month = feb,\n   volume = 200,\n    pages = {542-554},\n      doi = {10.1098/rspa.1950.0036},\n   adsurl = {http://adsabs.harvard.edu/abs/1950RSPSA.200..542B},\n  adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n}\n@article{Taylor2013,\nauthor = {Frediani, Luca and Fossgaard, Eirik and Fl\\aa, Tor and Ruud, Kenneth},\ndoi = {10.1080/00268976.2013.810793},\nfile = {:sandbox/vama/docs/madness/Fully adaptive algorithms for multivariable integral equations using  NS and wavelets MP Frediani 2013.pdf:pdf},\nissn = {0026-8976},\njournal = {Molecular Physics},\nmonth = jul,\nnumber = {9-11},\npages = {1143--1160},\ntitle = {{Fully adaptive algorithms for multivariate integral equations using the non-standard form and multiwavelets with applications to the Poisson and bound-state Helmholtz kernels in three dimensions}},\nurl = {http://www.tandfonline.com/doi/abs/10.1080/00268976.2013.810793},\nvolume = {111},\nyear = {2013}\n}\n\n@article{Weijo2009,\nabstract = {The first implementation of a wavelet discretization of the Integral Equation Formalism (IEF) for the Polarizable Continuum Model (PCM) is presented here. The method is based on the application of a general purpose wavelet solver on the cavity boundary to solve the integral equations of the IEF-PCM problem. Wavelet methods provide attractive properties for the solution of the electrostatic problem at the cavity boundary: the system matrix is highly sparse and iterative solution schemes can be applied efficiently; the accuracy of the solver can be increased systematically and arbitrarily; for a given system, discretization error accuracy is achieved at a computational expense that scales linearly with the number of unknowns. The scaling of the computational time with the number of atoms N is formally quadratic but a N(1.5) scaling has been observed in practice. The current bottleneck is the evaluation of the potential integrals at the cavity boundary which scales linearly with the system size. To reduce this overhead, interpolation of the potential integrals on the cavity surface has been successfully used.},\nauthor = {Weijo, Ville and Randrianarivony, Maharavo and Harbrecht, Helmut and Frediani, Luca},\ndoi = {10.1002/jcc.21431},\nfile = {:sandbox/vama/docs/madness/Solvent PCM wavelet Frediani 2009.pdf:pdf},\nissn = {1096-987X},\njournal = {Journal of computational chemistry},\nkeywords = {algorithms,galerkin methods,interpolation,linear complexity,solvent effect,sparse operators,wavelets},\nmonth = may,\nnumber = {7},\npages = {1469--77},\npmid = {19834886},\ntitle = {{Wavelet formulation of the polarizable continuum model.}},\nurl = {http://www.ncbi.nlm.nih.gov/pubmed/19834886},\nvolume = {31},\nyear = {2010}\n}\n\n\n@article{Jorgensen2012JCP,\n   author = \"HÃžyvik, Ida-Marie and Jansik, Branislav and JÃžrgensen, Poul\",\n   title = \"Orbital localization using fourth central moment minimization\",\n   journal = \"The Journal of Chemical Physics\",\n   year = \"2012\",\n   volume = \"137\",\n   number = \"22\", \n   eid = 224114,\n   pages = \"-\",\n   url = \"http://scitation.aip.org/content/aip/journal/jcp/137/22/10.1063/1.4769866\",\n   doi = \"http://dx.doi.org/10.1063/1.4769866\" \n}\n@article{Bischoff2012,\nabstract = {We present an approach to compute accurate correlation energies for atoms and molecules using an adaptive discontinuous spectral-element multiresolution representation for the two-electron wave function. Because of the exponential storage complexity of the spectral-element representation with the number of dimensions, a brute-force computation of two-electron (six-dimensional) wave functions with high precision was not practical. To overcome the key storage bottlenecks we utilized (1) a low-rank tensor approximation (specifically, the singular value decomposition) to compress the wave function, and (2) explicitly correlated R12-type terms in the wave function to regularize the Coulomb electron-electron singularities of the Hamiltonian. All operations necessary to solve the Schr\\\"{o}dinger equation were expressed so that the reconstruction of the full-rank form of the wave function is never necessary. Numerical performance of the method was highlighted by computing the first-order M\\o ller-Plesset wave function of a helium atom. The computed second-order M\\o ller-Plesset energy is precise to \\~{}2 microhartrees, which is at the precision limit of the existing general atomic-orbital-based approaches. Our approach does not assume special geometric symmetries, hence application to molecules is straightforward.},\nauthor = {Bischoff, Florian A and Harrison, Robert J and Valeev, Edward F},\ndoi = {10.1063/1.4747538},\nfile = {:sandbox/vama/docs/madness/MP2 He in Madness JCP Bischoff 2012.pdf:pdf},\nissn = {1089-7690},\njournal = {The Journal of chemical physics},\nmonth = sep,\nnumber = {10},\npages = {104103},\npmid = {22979846},\ntitle = {{Computing many-body wave functions with guaranteed precision: the first-order M\\o ller-Plesset wave function for the ground state of helium atom.}},\nurl = {http://www.ncbi.nlm.nih.gov/pubmed/22979846},\nvolume = {137},\nyear = {2012}\n}\n\n@article{Marques2012,\nauthor = {a.L. Marques, Miguel and Oliveira, Micael J.T. and Burnus, Tobias},\ndoi = {10.1016/j.cpc.2012.05.007},\nfile = {:sandbox/vama/docs/software/Libxc a library CPC Marques 2012.pdf:pdf},\nissn = {00104655},\njournal = {Computer Physics Communications},\nkeywords = {density functional theory},\nmonth = oct,\nnumber = {10},\npages = {2272--2281},\npublisher = {Elsevier B.V.},\ntitle = {{Libxc: A library of exchange and correlation functionals for density functional theory}},\nurl = {http://linkinghub.elsevier.com/retrieve/pii/S0010465512001750},\nvolume = {183},\nyear = {2012}\n}\n@article{Ekstrom2010,\nauthor = {Ekström, Ulf and Visscher, Lucas and Bast, Radovan and Thorvaldsen, Andreas J. and Ruud, Kenneth and Ekstro, Ulf and Visscher, Lucas and Bast, Radovan and Thorvaldsen, Andreas J.},\ndoi = {10.1021/ct100117s},\nfile = {:sandbox/vama/artis/teoria-docs-quimica/grimme/Arbitrary-order DFT automatic diff JCTC 2010 Ekstrom.pdf:pdf},\nissn = {1549-9618},\njournal = {Journal of Chemical Theory and Computation},\nmonth = jul,\nnumber = {7},\npages = {1971--1980},\ntitle = {{Arbitrary-Order Density Functional Response Theory from Automatic Differentiation}},\nurl = {http://pubs.acs.org/doi/abs/10.1021/ct100117s},\nvolume = {6},\nyear = {2010}\n}\n@book{dftrepo,\nauthor = { van Dam, Huub and Sherwood, Paul  },\naddress = {Daresbury, Cheshire, WA4 4AD United Kingdom},\nyear = {2001},\npublisher = {Quantum Chemistry Group, CCLRC Daresbury Laboratory},\ntitle = {{Density Functional Repository}},\nurl = {ftp://ftp.dl.ac.uk/qcg/dft\\_library/contents.html}\n}\n@incollection{pulay2011plane,\n  title={Plane-Wave Based Low-Scaling Electronic Structure Methods for Molecules},\n  author={Pulay, Peter},\n  booktitle={Linear-Scaling Techniques in Computational Chemistry and Physics},\n  pages={1--16},\n  year={2011},\n  publisher={Springer}\n}\n@article{Kutzelnigg1985,\nauthor = {Kutzelnigg, Werner},\ndoi = {10.1007/BF00527669},\nissn = {0040-5744},\njournal = {Theoretica Chimica Acta},\nmonth = dec,\nnumber = {6},\npages = {445--469},\ntitle = {{r 12-Dependent terms in the wave function as closed sums of partial wave amplitudes for large l}},\nurl = {http://link.springer.com/10.1007/BF00527669},\nvolume = {68},\nyear = {1985}\n}\n"
  },
  {
    "path": "doc/mainpage.dox",
    "content": "/// \\file mainpage.dox\n/// \\brief Top-level page for MADNESS documentation.\n\n/// \\defgroup configuration MADNESS installation and configuration\n\n/// \\defgroup contribution Contributing to MADNESS\n\n///    \\defgroup style MADNESS coding style\n///    \\ingroup contribution\n\n/// \\defgroup getting_started Getting started with MADNESS\n\n///    \\defgroup gstart_basics MADNESS basics\n///    \\ingroup getting_started\n\n///    \\defgroup gstart_comp_run Compiling and running MADNESS programs\n///    \\ingroup getting_started\n\n///    \\defgroup gstart_functions MADNESS functions\n///    \\ingroup getting_started\n\n///    \\defgroup gstart_io Input/Output\n///    \\ingroup getting_started\n\n///    \\defgroup gstart_load_balance Load and memory balancing\n///    \\ingroup getting_started\n\n///    \\defgroup gstart_think_madness Thinking in MADNESS\n///    \\ingroup getting_started\n\n///    \\defgroup gstart_env_var MADNESS environment variables\n///    \\ingroup getting_started\n\n/// \\defgroup libraries MADNESS libraries\n\n///    \\defgroup containers Containers\n///    \\ingroup libraries\n\n///    \\defgroup parallel_runtime Parallel programming environment\n///    \\ingroup libraries\n\n///    \\defgroup chemistry Chemistry\n///    \\ingroup libraries\n\n///       \\defgroup world Distributed computing environment (World and its relations)\n///       \\ingroup parallel_runtime\n\n//       \\defgroup rmi Remote method invocation\n//       \\ingroup parallel_runtime\n\n///       \\defgroup mpi Interfaces from World to MPI\n///       \\ingroup parallel_runtime\n\n///       \\defgroup world_object Globally addressable objects (WorldObject)\n///       \\ingroup parallel_runtime\n\n//       \\defgroup worlddc Distributed containers (WorldContainer)\n//       \\ingroup parallel_runtime\n\n///       \\defgroup futures Futures\n///       \\ingroup parallel_runtime\n\n///       \\defgroup serialization Serialization\n///       \\ingroup parallel_runtime\n\n//       \\defgroup hashing Hashing\n//       \\ingroup parallel_runtime\n\n///       \\defgroup threading Multi-threading \n///       \\ingroup parallel_runtime\n\n//          \\defgroup mutexes Mutexes\n//          \\ingroup threading\n\n///          \\defgroup atomics Atomic operations\n///          \\ingroup threading\n\n///          \\defgroup threads Threads\n///          \\ingroup threading\n\n//          \\defgroup threadpool Thread pool\n//          \\ingroup threading\n\n///          \\defgroup taskq Task queue\n///          \\ingroup threading\n\n//          \\defgroup conhash Concurrent hash table\n//          \\ingroup threading\n\n//    \\defgroup mra Multiresolution analysis\n//    \\ingroup libraries\n\n//       \\defgroup funcplot Function plotting routines\n//       \\ingroup mra\n\n//       \\defgroup mrabcext Exterior boundary conditions\n//       \\ingroup mra\n\n//       \\defgroup mrabcint Preliminary support for interior boundary conditions\n//       \\ingroup mra\n\n//    \\defgroup tensor Tensors or multidimension arrays\n//    \\ingroup libraries\n\n//    \\defgroup linalg Linear algebra (interface to LAPACK)\n//    \\ingroup libraries\n\n//    \\defgroup solvers Iterative solvers for linear/non-linear equations and optimizers\n//    \\ingroup libraries\n\n//    \\defgroup misc Miscellany\n//    \\ingroup libraries\n\n// use tempexamples instead of examples to keep a bunch of the examples (that I haven't gone througuh yet)\n/// \\defgroup tempexamples Examples\n\n///   \\defgroup gettingstarted Getting Started\n///   \\ingroup tempexamples\n\n///   \\defgroup miscexamples Miscellaneous\n///   \\ingroup tempexamples\n\n/// \\defgroup applications MADNESS applications\n\n/**\n\n\\mainpage\n\nThese pages serve as the main programmer's reference manual for MADNESS and \nwere automatically generated from the source using Doxygen.\n\nA good place to start is the <a href=\"modules.html\">modules page</a>,\nwhich provides access to documentation for libraries, examples, and \napplications. The examples are intended to meet the needs of those \nstarting to develop new applications.\n\nAdditional technical documentation can be found in the MADNESS \\c doc directory.\n  - The getting started guide introduces use of the numerical functionality.\n  - The implementation notes document the internal numerical workings \n    as a resource for both users and MADNESS developers.\n  - The parallel runtime and API documents document the operation and \n    interface for the parallel programming environment.\n\nThe <a href=\"\\website\">project home</a>\ncontains information on configuring, building, etc.\n\n\\section status Status and supported platforms\n\nMADNESS is roughly in beta release.  Most things work well enough for\nseveral applications to be in production mode, but on the other hand there\nare still lots of \"rough\" spots and the documentation in particular does not\nyet meet our expectations.\n\nCurrently, we intend that MADNESS work correctly and efficiently\non the following platforms\n  - Cray, \n  - IBM BGQ,\n  - Linux workstations with 64-bit multi-core processors, and \n    clusters thereof\n  - Apple Macintosh (Intel processors) with recent versions of OS X.\n\nTo build on any of these you will need a recent software stack.\n\n\\subsection used_by Software used by MADNESS\n\nOur deep gratitude to these other projects whose software we employ\n  - <a href=\"http://sourceforge.net/projects/tinyxml\">TinyXML</a>\n  - <a href=\"http://www.librow.com/articles/article-10/appendix-a-2\">CFFT</a>\n  - <a href=\"http://muparser.sourceforge.net\">muParser</a>\n  - <a href=\"http://www.tddft.org/programs/octopus/wiki/index.php/Libxc\">libxc</a>\n  - <a href=\"http://www.doxygen.org\">Doxygen</a>\n  - <a href=\"http://www.graphviz.org\">Graphviz</a>\n  - <a href=\"http://www.mcs.anl.gov/research/projects/mpich2\">MPICH</a>\n  - <a href=\"http://www.open-mpi.org\">Open-MPI</a>\n  - <a href=\"http://www.netlib.org/lapack\">LAPACK</a>\n  - <a href=\"http://gcc.gnu.org\">GCC</a>\n  - <a href=\"http://code.google.com/p/googletest\">Google test</a>\n  - <a href=\"http://code.google.com/p/google-perftools\">Google performance tools</a>\n  - <a href=\"http://www.tddft.org/programs/octopus/wiki/index.php/Libxc\">Libxc</a>\n\n\\section license License\n\n\\verbatim\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\\endverbatim\n\n\\todo Turn all of the doxygen modules into a PDF users' manual.\n\n*/\n"
  },
  {
    "path": "doc/make.bat",
    "content": "@ECHO OFF\n\npushd %~dp0\n\nREM Command file for Sphinx documentation\n\nif \"%SPHINXBUILD%\" == \"\" (\n\tset SPHINXBUILD=sphinx-build\n)\nset SOURCEDIR=source\nset BUILDDIR=build\n\n%SPHINXBUILD% >NUL 2>NUL\nif errorlevel 9009 (\n\techo.\n\techo.The 'sphinx-build' command was not found. Make sure you have Sphinx\n\techo.installed, then set the SPHINXBUILD environment variable to point\n\techo.to the full path of the 'sphinx-build' executable. Alternatively you\n\techo.may add the Sphinx directory to PATH.\n\techo.\n\techo.If you don't have Sphinx installed, grab it from\n\techo.https://www.sphinx-doc.org/\n\texit /b 1\n)\n\nif \"%1\" == \"\" goto help\n\n%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%\ngoto end\n\n:help\n%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%\n\n:end\npopd\n"
  },
  {
    "path": "doc/numerical_library.md",
    "content": "# Numerical library\n\nMADNESS provides a high-level environment for the solution of integral and differential equations \nin many dimensions using adaptive, fast methods with guaranteed precision based on multi-resolution \nanalysis and novel separated representations. \n\nUseful examples can be found in the `src/examples` directory, where the use of the numerical library can be \npracticed by example.\n * `sininteg.cc`: Create a function and integrate\n * `hatom_energy.cc`: Compute the energy of the hydrogen atom \n * `heat.cc`: apply the Greens function to the heat equation\n * `3dharmonic.cc`: solve the 3D harmonic oscillator\n * `h2.cc`: solve the Hartree-Fock equations for the H2 molecule\n * `nonlinschro.cc`: use the KAIN solver for accelerating the solution of a system of non-linear equations\n * `hedft.cc`: use density functional theory \n \nSome (dated) documentation for the examples and the API is [here](https://m-a-d-n-e-s-s.github.io/madness/api-doc/modules.html).\n\n\n## Example for MADNESS as an external library\nTo use MADNESS as an external library in a code we recommend cmake. Build and install MADNESS to \nan install directory. Set\n\n`export MADNESS_DIR=/path/to/madness/install/directory/`\n\nIn file `CMakeLists.txt`:\n\n````\ncmake_minimum_required(VERSION 3.22)\nproject(yourbinary)\nset(CMAKE_CXX_STANDARD 17)\nfind_package(MADNESS CONFIG REQUIRED)\nadd_executable(yourbinary main.cc)\ntarget_link_libraries(yourbinary madness)\n````\n\nIn file `main.cc`:\n````c\n#include <madness.h>\nusing namespace madness;\nint main(int argc, char* argv[]) {\n    World& world=initialize(argc,argv);\n    startup(world,argc,argv,true);\n    FunctionDefaults<1>::set_cubic_cell(-10,10);\n    FunctionDefaults<1>::set_k(8);\n    FunctionDefaults<1>::set_thresh(1.e-6);\n    try {\n        auto gaussian = [](const Vector<double,1>& r){return std::exp(-r[0]*r[0]);};\n        Function<double,1> f = FunctionFactory<double,1>(world).f(gaussian);\n        double I = f.trace();\n        double value = f(0.7);\n        if (world.rank() == 0) {\n          print(\"trace(exp(-r^2)\",I,\"error\",I-std::sqrt(M_PI));\n          print(\"f(0.7)\",value,\"error\",value-exp(-0.7*0.7));\n        }\n    } catch (...) {\n         std::cout << \"caught an error \" << std::endl;\n    } \n    finalize();\n    return 0;\n}\n}\n````\n\nGoing through the code line by line:\n\n````c\n#include <madness.h>\n````\n\nIncludes the MADNESS library.\n\n````c\nusing namespace madness;\nint main(int argc, char* argv[]) {\n    World& world=initialize(argc,argv)\n````\n \nWorld contains the MPI communicator and must always be set, even if the code will run only \non one node.\n\n````c\n    startup(world,argc,argv,true)\n````\n\nReads all necessary numerical data (e.g. the wavelet twoscale coefficients) and prints out\ncompiler flags.\n\n````c\n    FunctionDefaults<1>::set_cubic_cell(-10,10)\n````\n\nDefines the computation cell/intervall, here in 1 dimension. MADNESS is templated with respect\nto the dimensions.\n\n````\n    FunctionDefaults<1>::set_k(8);\n````\n\nSets the wavelet order to 8. Anything between 2 and 30 will work, the optimal choice depends \non the specific problem, 8 is usually a good guess.\n\n````\n    FunctionDefaults<1>::set_thresh(1.e-7);\n````\n\nSets the precision threshold to $\\epsilon=10^{-6}$ in the $L^2$ norm.\nUnless the function is singular or has other pathological features the threshold will be met. Up to the limits of numerical precision,\nit is possible to tighten the threshold to secure more digits.  There are also different truncation modes.  The default is `mode=0` which is designed to yield accurate function values and norms, whereas `mode=1` aims to also yield accurate derivatives.\n\n````\n    try {\n        auto functor=[](const Vector<double,1>& r){return std::exp(-r[0]*r[0]);}\n````\n\nDefines the function to be represented in MRA. `Vector` is a MADNESS class defining coordinates.\n\n````c\n        Function<double,1> f=FunctionFactory<double,1>(world).f(functor);\n````\n\nProjects the function $e^{-r^2}$ onto the MRA representation. A `FunctionFactory` is used to \ndefine various properties of the `Function`, it requires `world` as input, a function (or functor)\nto compute the value.  Additional optional arguments can be provided using the [named-parameter idiom](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__getting__started.html).\n\n````c\n        double I=f.trace();\n````\nIntegrates the function $\\int_{-10}^{-10} e^{-r^2}\\mathrm dx$.  It is a collective operation.\n````c\n        double value = f(0.7);\n````\nevalues the numerical function at point `x=0.7.  This is executed by a single process but might involve remote communication.  If you wish to evaluate at many points (e.g., a line or a cube, there are more efficient interfaces).\n\n````c\n        if (world.rank() == 0) {\n          print(\"trace(exp(-r^2)\",I,\"error\",I-std::sqrt(M_PI));\n          print(\"f(0.7)\",value,\"error\",value-exp(-0.7*0.7));\n        }\n````\nPrints out the values using the MADNESS Python-like `print` function.   Be sure to add the `if` block to avoid verbose output if \nrun on many MPI ranks. Also make sure that the `trace` or any other collective operation is *not* called inside this\n`if` block.  A collective operation called by only one rank will cause the program to hang.  This is a common error.\n\n````c\n    } catch (...) {\n         std::cout << \"caught an error \" << std::endl;\n    } \n    finalize();\n````\n \nFinalizes the communicator.\nIt is important that all MRA objects (e.g. `Function<double,1>`) are destructed before\n`finalize()` is called, otherwise segmentation faults might occur since the destructor for these objects will erroneously be called at the very end of the program *after* the runtime has been dismantled.\nThus, for simple programs enclose all MRA code after `initialize` in a sub-scope (e.g., using braces or inside a `try/catch` block), or after obtaining `World` pass it (by reference) into another procedure\nthat contains your MRA code.\n\n````c\n    return 0;\n}\n````\n\n"
  },
  {
    "path": "doc/quantum.md",
    "content": "# Quantum chemistry\n\n\n## What you can do\nQuantum chemical capabilities are:\n * SCF: Hartree-Fock and DFT, also in strong magnetic fields: `moldft, nemo, znemo`\n * analytical gradients for SCF: `moldft, nemo, znemo`\n * second nuclear derivatives for SCF (field-free case only), `nemo`\n * CIS, `cis, zcis`\n * response properties, `molresponse`\n * MP2, `cc2`\n * ADC(2), CIS(D), `cc2`\n * CC2 ground and excited states, `cc2`\n * PNO-MP2, `pno`\n * OEP/RKS, `oep`\n\n## What to expect from an MRA calculation\nMRA provides results to your calculation at the complete basis set limit. \n\n\nDue to its adaptive nature MRA has a low scaling with respect to system size, but a relatively high computational prefactor. Calculations on small systems are therefore computationally (much) more expensive than calculations in a (small) Gaussian basis set, while calculations on large systems and/or calculations aiming for high accuracy are (much) cheaper than calculations in a (large) Gaussian basis set.\n\nUse MRA if you want to do\n - large systems using DFT or HF\n - anions or excited states\n - high-accuracy calculations\n - molecular properties esp magnetic properties\n\nDon't use MRA if you want to do\n - exploratory calculations with small basis sets\n - do a quick geometry optimization, as MRA requires tightly converged wave functions to avoid numerical noise on the PES\n  \nDon't be discouraged when you run the Ne atom and it takes 20 seconds to get the total energy, while your favorite LCAO code gives you a similar number in less than a second.\n\nMRA will give you few digits of the correct number, while LCAO will give you all digits of a (systematically) incorrect number.\n\n\n## Quickstart\n\nThe `madqc` program can read commandline options or an input file (by default this is named \"input\").\nA full list of all available calculation parameters can be obtained by writing\n\n`madqc --help`\n \nA number of sample input files can be found at the bottom of this page\nThe quantum chemical calculations can be started by invoking the `madqc` program with the desired workflow, e.g. for a DFT calculation of water\n> `madqc --wf=scf input`\n\nwhere `input` is the name of the input file. The workflow can be changed by using the `--wf` option, e.g. for a CIS calculation.\n\n> `madqc --wf=cis input`\n\nThe `--wf` option can be used to select the desired workflow, e.g. `scf`, `nemo`, `cis`, `cc2`, `pno`, `oep`, etc.\n\n## Calculation parameters\nAll calculations require parameters, specifying the molecule, the quantum chemical model, charge etc.\nIf no parameters are given, default parameters will be used. Only the molecule itself must be specified by the user.\nParameters can be specified through an input file and/or command line options.\n\nSome parameters depend on each other and are set automatically, e.g. certain numerical parameters, or the use of \npoint group symmetry. Parameters set by the user are always respected.\n\nIn the output files of the calculations the complete set of input parameters are printed out, \ntogether with a short description and further information.\n\nYou can see the full list of parameters by typing\n> `madqc --print_parameters`\n\n\n## Input file\nThe input file consists of data groups, starting with the relevant keyword, e.g. \"dft\" and ending with \"end\".\nAll parameters in a data group are given as key/value pairs, where the value can be an integer, a double, a string\neven a vector or pair. \n\nA sample input file looks like\n>dft\\\n>  charge 1          # comment\\\n>  ncf (slater,2.0) # value is a pair of string and double\\\n>end\n> \n> geometry\\\n>   molecule \\\n>    O 0 0 0\\\n>    H 0 1 1\\\n>    H 0 1 -1\\\n>  end \\\n> end\n\nBlank lines are ignored, as is everything after a hashtag. \nThe input file is case-insensitive.\nThe key/value pairs can be separated by blanks or by the equal sign.\nPairs and vectors must be encased in parantheses or brackets, their entries must be separated by commas.\n\nThe program will output the complete list of input options. You can always run \n> `madqc --help` \n\nwhich will output the input parameters and the copy/paste the options verbatim.\nNote the once an option appears in the input file it will be considered user-defined and will override all default or derived values.\n\n## Command line options\nThe data groups in the input file can also be set or augmented through the command line, e.g. the following\nline will pass the same calculation parameters as the input file above.\n\n`madqc --dft=\"charge=1; ncf=(slater,2.0)\"`\n\nDifferent key/value pairs are separated by a semicolon to indicate a newline.\nIf a given parameter is specified both in the input file and the command line, the command line parameters have \npriority over input file parameters.\n\nThe name of the input file can be changed by\n> `madqc --input=customfile`\n\n\n## Numerical parameters: k and L\nNumerical parameters are specified in the dft block, the most important ones that will\nalso be used in subsequent calculations (e.g. mp2) are\n> dft\\\n>   k 5\\\n>   L 20\\\n> end\n\nThe calculation box size L should be large enough to hold all relevant physics. All wavefunctions should have decayed\nto practically zero at the box boundary. Note that excited states or anions can be quite large.\nThe box size is given in atomic units (1 a.u. = 52 pm).\n\nThe polynomial order k will affect the computed numbers, but mostly the performance. Due to MRA adaptive nature a higher k will induce a less refined grid and vice versa. With a changing grid the numbers will change, but the significant ones will stay.\nRemember that MRA will give you few digits of the correct number, while LCAO will give you all digits of an incorrect number.\n\nThe k parameter can be chosen between 2 and 30, for SCF calculations a value of 7 to 9 is advised, for correlated calculations it should be chosen 5 or 6, as these are usually \"sweet spots\" for computational performance.\nIf this parameters is not set it will be determined automatically.\n\n\nGenerally it is advisable to use as few numerical parameters as possible, as they are usually dependent on each other\n\n## Geometry input\nThe geometry of the molecule is given in the geometry data group. \nBy default atomic units are used, but angstrom can be switched on by adding the line\n> geometry\\\n> units angstrom\\\n> ..\\\n> end\n\nThe following example will read an external xyz file, using angstrom by default\n>`geometry`\\\n> `  source_type xyz          # optional `\\\n> `  source_name h2o.xyz`\\\n> `end`\n\nor you can use the command line options using the convenience short option\n> `madqc --wf=nemo --geometry=h2o.xyz`\n\nA small number of geometries are stored in a library, accessible through\n> `madqc --wf=nemo --geometry=\"source_type=library; source_name=h2o\"`\n \nIf no source type is given it will be deduced from the file name, if the source is ambiguous,\ne.g. a structure in the library has the same same as an input file, the code will stop.\n\n## Geometry optimization\nFor the following workflows there are gradients implemented:\n> `nemo`, `moldft`, `znemo`\n\n### Native optimizer\nCodes with gradients can use the built-in geometry optimizer by adding the `gopt` flag \nin the `dft` block, geometry optimization parameters are set in the `geoopt` block.\n> `madqc --wf=nemo --dft=\"k=8; econv=1.e-5; gopt=1\"  --geoopt=\"maxiter=10\" --geometry=\"source_type=library; source_name=h2o\"`\n\n### External optimizers\nExternal optimizers (e.g. [pyberny](https://jan.hermann.name/pyberny/), [geometric](https://geometric.readthedocs.io/) ) \ncan be used through Madness's python wrapper. Details to follow.\n\n> `from madness import madness`\\\n> `m=madcalc(\"/Users/fbischoff/devel/install/madness\")`\\\n> `m.get_result()`\\\n> `print(m.data[0][\"scf_energy\"])`\\\n> `print(m.get_scf_energy())`\\\n> `print(m.data[0][\"scf_k\"])`\n\n\n\n## Other electronic structure options\n### DFT functionals\n\n\nMadness uses [libxc](https://tddft.org/programs/libxc/) for exchange-correlation functionals. \nThe input parameters are located in the `dft` block\n> `xc func`\n\nwhere `func` is a string defining the DFT XC functional. Predefined options are available as\n> `func = hf, bp86, lda, pbe, b3lyp, pbe0`\n\nOther XC functionals can be created individually  as in\n> `xc \"LDA_X 1.0 LDA_C_VWN 1.0\"`\\\n> `xc \"GGA_X_PBE 0.75 GGA_C_PBE 1.0 HF_X 0.25\"`\n\nwhere the number after the functional determines its weight. The two lines define \nLDA and PBE0 functionals, respectively.\n\nFor more details see the [libxc](https://tddft.org/programs/libxc/) webpage.\n\n### PCM solvation model\n\nMadness uses the Polarizable Continuum Model from [PCMSolver](https://pcmsolver.readthedocs.io) \nfor solvation effects. Details to come.\n\n## SCF workflows\nMadness has two SCF workflows, `scf` and `nemo`, that share most of their functionality. \n\nBoth can do\n - HF and DFT calculations\n\nOnly `scf`:\n - UHF calculations\n - being faster than nemo\n - nuclear gradients and optimizations\n\nOnly `nemo`:\n - regularized calculations with nuclear correlation factor\n - references for subsequent OEP calculations\n - preferred for reference calculations for MP2 and CC2\n - analytical second nuclear derivatives\n\n## Convenience short options\n`--optimize` optimize the geometry\\\n`--geometry=file.xyz` find the geometry in the xyz file (note Angstrom units!)\n\n## Example calculations\n### Hartree-Fock calculation of water\nInput file named \"input\"\n\n> geometry  \n>  molecule\n>   O 0 0 0   \n>   H 0 1 1  \n>   H 0 1 -1  \n>  end\n>end\n\nThen run\n>moldft input\n\n### DFT geometry optimization of ammonia\ninput file name \"input\"\n> dft  \n>   xc pbe  \n>   k 7  \n>   econv 1.e-6  \n>   dconv 1.e-5\nend\n\n> end   \n>   \n> geometry   \n> molecule\n> n  -0.000      0.000     -0.516  \n> h  -0.887      1.536      0.172  \n> h  -0.887     -1.536      0.172  \n> h   1.774      0.000      0.172  \n> end\n>end\n\nThen run\n>madqc --optimize input\n\n### CIS calculation of LiH\ninput file name \"input\"\n> dft  \n> k 7  \n> econv 1.e-5  \n> end  \n>   \n> geometry  \n> molecule\n> li  0.0      0.0     -0.529  \n> h   0.0      0.0      2.529  \n> end\n> end\n\nThen run\n> madqc --wf=cis input\n\n### MP2 calculation of BeH2\n\n\n"
  },
  {
    "path": "doc/requirements.txt",
    "content": "sphinx==7.2.6\ntyping-extensions==4.2.0\ndocutils==0.18.1\nmarkupsafe==2.1.1\npyparsing==3.0.8\nalabaster==0.7.12\nmyst_parser==3.0.1\n"
  },
  {
    "path": "doc/runtime.md",
    "content": "# Runtime\n\nThe MADNESS runtime allows for massively parallel and hybrid parallel computation of \nirregular algorithms. The runtime is used by other packages independently of the MADNESS numerical library and applications.\n\nDetailed (but dated) documentation for programmers\n* https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__parallel__runtime.html\n\n"
  },
  {
    "path": "doc/tutorial/API.md",
    "content": "# Chemistry API\n\nThere are several interfaces and methods for writing quantum chemistry codes and we will write a simple HF code as an example.\n\n## SCFOperators\nOperators occuring in SCF methods are implemented in SCFOperators.h. Currently there \nare: \n - ```Kinetic```\n - ```Laplacian```\n - ```Derivative```\n - ```Coulomb```\n - ```Exchange```\n - ```XCOperator``` (using LibXC)\n - ```Nuclear```\n - ```DNuclear``` (derivative of the nuclear potential)\n - ```Lz``` (angular momentum)\n - ```Local``` (any local potential)\n \nAll of the above can be put into a ```Fock``` operator, which is simply a linear combinaton \nof ```SCFOperator```, to simplify notation. Construction follows the scheme\n```c++\nauto T=Kinetic<double,3>(world);\nauto Vnuc=Nuclear<double,3>(world,molecule);\n```\nSCFOperators act on MRA functions or vector of functions, yielding either the a result (vector of) functions, \nor a matrix representation of the operator\n```c++\nstd::vector<Function<double,3>> Vphi=Vnuc(orbitals);\nTensor<double> tmat=T(orbitals,orbitals);\n```\n\n## BSHApply\nSolving the Schroedinger equation in MRA always looks like\n```math\n\\displaylines{\n(T + V)\\psi  = E \\psi \\\\\n\\psi = (T - E)^{-1}V\\psi\n}\n```\nIf there are more than one wave functions (e.g. several orbitals) there might appear\na coupling term \n```math\n\\displaylines{F\\psi_i  = f_{ij} \\psi_j \\\\\n\\psi_i = (T - f_{ii})^{-1}V\\psi_i + \\sum_{j\\neq i}\\psi_j}\n```\nSince this operator occurs very often, and might include further techniques, \nsuch as a level shift if the energy is positive, a class named ```BSHApply``` \nhas been introduced that applies the BSHOperator, includes couping and performs \na level shift, if necessary\n```c++\nauto [residual, eps_update] = bsh_apply(orbitals, fock, Vorbitals);\n```\nNew orbitals are the taken directly from the residual, or by using a convergence accelerator\n```c++\norbitals-=residual;\n```\n\n## KAIN Solver\nSimilar to DIIS, the KAIN solver stabilizes and accelerates the solution of the nonlinear equations.\n\n```c++\nauto functionsolver=NonlinearSolver;\nauto vectorfunctionsolver=nonlinear_vector_solver<double,3>(world, orbitals.size());\n```\nThe new solution is a linear combination of the old solutions and the new update and can be obtained through\n```c++\norbitals=solver.update(orbitals,residual);\n```\n\n## Hartree-Fock example codes\n\n* [Simple HF code for helium in C++](https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/hehf.cc) and associated [documentation](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__examplehehf.html)\n* [Simple molecular HF code using the chemistry API](https://github.com/m-a-d-n-e-s-s/madness/blob/master/doc/tutorial/simple_hf.cpp)\n\n\n"
  },
  {
    "path": "doc/tutorial/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.16)\nproject(madness-tutorial)\n\nfind_package(madness REQUIRED OPTIONAL_COMPONENTS chem)\n\nif (TARGET MADchem)\n  add_executable(simple_hf simple_hf.cpp)\n  target_link_libraries(simple_hf MADchem)\nendif()\n\nadd_executable(test_runtime test_runtime.cpp)\ntarget_link_libraries(test_runtime MADworld)\n"
  },
  {
    "path": "doc/tutorial/README.md",
    "content": "# MADNESS tutorial\n\n## Table of contents\n\n1. Building MADNESS\n   1. [Building from source](#building-from-source)\n       1. [Downloading](#downloading)\n       1. [Building and installing](#building-and-installing)\n   1. [Use from a Docker container](#use-from-a-docker-container)\n1. [Chemistry applications](#chemistry)\n1. [Parallel runtime --- basic concepts and architecture](#Parallel-runtime)\n1. [Numerical API and example application](#Numerical-API)\n1. [Chemical API and example Hartree-Fock program](#Chemical-API)\n1. [Exercises](#Exercises)\n  \n## Building MADNESS\n\nThere are two ways to obtain/build MADNESS:\n- download the MADNESS source code from the Github repo and build, or\n- use a Docker image containing pre-built MADNESS.\n\n### Building from source\n\n#### Downloading\n\nFrom the command line, clone the [MADNESS GitHub repository](https://github.com/m-a-d-n-e-s-s/madness) using one of the below\n* HTTPS\n```\n    git clone https://github.com/m-a-d-n-e-s-s/madness.git\n```\n* SSH (for which you will need to have a GitHub account with SSH key)\n```\n    git clone git@github.com:m-a-d-n-e-s-s/madness.git\n```\nThis will make a new directory `madness` --- if you wish use a different name, append it to the command.\n\nThe head of the master branch usually builds and runs correctly due to the continuous integration.  If you are looking for the version tested for the Tromso June 2023 workshop, after cloning \n```\ncd madness\ncheckout XXXXXXXXXXXXXXXXXXX\n```\n\n#### Building and installing\n\nPlease refer to the [installation instructions](https://madness.readthedocs.io/en/latest/INSTALL.html).\n\nMinimal recipe without MPI and assuming Intel MKL is installed in a standard location\n```\nmkdir build # CANNOT be in the madness source tree\ncd build\ncmake -DENABLE_MPI=OFF -DCMAKE_INSTALL_PREFIX=/home/me/madinstall /path/to/madness/source\nmake applications\nmake install  # optional\n```\n\n#### Modules to load to build on FRAM for the Trømso tutorial\n\n```\n    module purge\n    module load Emacs/27.2-GCCcore-11.2.0\n    module load OpenMPI/4.1.4-GCC-11.3.0\n    module load imkl/2022.2.1\n    module load tbb/2021.5.0-GCCcore-11.3.0\n    module load CMake/3.23.1-GCCcore-11.3.0\n    module load git/2.36.0-GCCcore-11.3.0-nodocs\n    module load Python/3.10.4-GCCcore-11.3.0\n```\nIgnore any warnings or informational messages.\n\n### Use from a Docker container\n\nIt is also possible to use a Docker image with pre-built MADNESS. Although this method is not recommended\nfor optimal use of MADNESS on distributed-memory machines, it is sufficient to run MADNESS applications on\na single multicore machine.\n\nTo get started, make sure your machine has [a Docker engine](https://docs.docker.com/engine/install/). Once the engine is installed (and, on MacOS, running)\nyou can start a container containing the pre-built MADNESS:\n```shell\ndocker run -it --rm rjharrison/ubuntu:22.04 bash\n```\nThis will start a shell within the container and put you in the directory containing the MADNESS source (`source`),\nthe build directory with MADNESS libraries and applications  already configured and built (`build`), and\nthe directory with MADNESS libraries and applications installed (`install`).\nE.g., to run a `moldft` calculation use the installed binary:\n```shell\nMAD_NUM_THREADS=2 ./install/bin/moldft --geometry=he\n```\n\nYou can also run other commands directly, e.g. to run tests execute:\n```shell\ndocker run -it --rm rjharrison/ubuntu:22.04 cmake --build build --target check-madness\n```\nIt is convenient to execute MADNESS applications this way using input files located on the host file system;\nto run `moldft` with input file `my.input` located in the current working directory\ndo\n```shell\ndocker run -it --rm -v `pwd`:/pwd rjharrison/ubuntu:22.04 install/bin/moldft /pwd/my.input\n```\nP.S. Note that unfortunately it is not possible to stop this process using Ctrl+C, see some workarounds [here](https://forums.docker.com/t/docker-run-cannot-be-killed-with-ctrl-c/13108/10).\n\n## Chemistry\n\n* [Please look here](chemistry.md)\n\n## Parallel runtime\n\nPlease refer to slides 166-189 in [MADNESSeverything4.pdf](https://github.com/m-a-d-n-e-s-s/madness/blob/tutorial/doc/MADNESSeverything4.pdf).\n* Since the file is large, it is probably easier to look at your local version using your system PDF viewer\n\nHello world in MADNESS (runtime only --- numerical library is discussed below)\n```\n    #include <madness/world/MADworld.h>\n    using namespace madness;\n\n    int main(int argc, char** argv) {\n        initialize(argc,argv);\n        World world(SafeMPI::COMM_WORLD);\n\n        print(\"Hello from processor\",world.rank());\n\n        finalize();\n        return 0;\n    }\n```\n\nMore detailed (but dated) documentation\n* https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__parallel__runtime.html\n\n\n## Numerical API\n\nPlease refer to the [Numerical Library User Documentation](https://madness.readthedocs.io/en/latest/numerical_library.html) for a worked example.\n\n* Setup up your project files \n  * Make a new directory (`test`) with two new sub-directories `src` and `build`\n    * `mkdir test`\n    * `cd test`\n    * `mkdir src build`\n  * Copy and paste the example cmake code into `src/CMakeLists.txt`\n  * Copy and paste the example C++ into `src/main.cc`\n* Setup your environment so cmake can find MADNES\n  * `export MADNESS_DIR=/path/to/madness/install/directory/`\n* Build the code\n  * `cd build`\n  * `cmake ../src`\n  * `make`\n* Execute\n  * `MAD_NUM_THREADS=2 ./yourbinary`\n  \n[Developer documentation](https://m-a-d-n-e-s-s.github.io/madness/api-doc/) generated by doxygen\n* Needs extensive updating and will (eventually) be mostly superseded by readthedocs\n\nIf you are going to program more extensively in MADNESS, then also worth looking at \n* [Getting started](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__getting__started.html)\n* [Tensor library](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__tensor.html)\n* [Linear algebra](https://m-a-d-n-e-s-s.github.io/madness/api-doc/tensor__lapack_8h.html)\n* [MRA functions](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__gstart__functions.html) and [here](https://m-a-d-n-e-s-s.github.io/madness/api-doc/mra_8h.html)\n  * [Function factory](https://m-a-d-n-e-s-s.github.io/madness/api-doc/classmadness_1_1FunctionFactory.html#details)\n  * [Function defaults](https://m-a-d-n-e-s-s.github.io/madness/api-doc/classmadness_1_1FunctionDefaults.html)\n  * [Operations on vectors of functions](https://m-a-d-n-e-s-s.github.io/madness/api-doc/vmra_8h.html)\n* [Serialization](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__serialization.html) and [here]()\n\n## Chemical API\n\n* [Please look here](API.md)\n\n## Exercises\n\n### Chemistry examples\n* Run some calculations on small molecules of either your choosing or from the [structure library](https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/madness/chem/structure_library).  E.g.,\n```shell\n    MAD_NUM_THREADS=10 moldft --geometry=\"water\" --dft=\"xc lda; maxiter 5\"\n```\n  * Without linking with LIBXC, with `moldft` you can run either LDA or HF calculations.\n  * Play with some of the `moldft` DFT parameters\n    * E.g., the sequence of tolerances used for DFT solution `protocol [1e-4,1e-6,1e-8]` and the error in the energy.\n    * E.g., the interaction between convergence requested for the density (e.g., `dconv 1e-6`), the error in the energy, and the required tolerances (you'll find tighter convergence will need tighter tolerance to get convergence).\n    * E.g., the smoothing of the nuclear potential (e.g., `eprec 1e-4` in the `geometry` block) and its impact on the cost of the calculation, the error in the energy, or the error in an optimized geometry.\n  * Compare results with your favorite other code using a different basis (e.g., Gaussian functions).\n\n### Explore the example codes\n* The source code is [here](https://github.com/m-a-d-n-e-s-s/madness/tree/master/src/examples)\n* The doxygen generated documentation\n  * [Solves the 3D harmonic oscillator](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__example3dharm.html)\n  * [Illustrates general composition of two functions](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__examplebinop.html)\n  * [Data and load balancing](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__loadbaleg.html)\n  * [Poisson's equation in a dielectric medium](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__exampledielectric.html)\n  * [Laplace's equations for dielectric sphere in an external field](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__exampledielectricfield.html)\n  * [Example of function I/O from getting started guide](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__functionioeg.html)\n  * [Compute the dielectric cavity and the electrostatic potential of hydrogen atom in water](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__examplegygi.html)\n  * [Hartree-Fock equations for the hydrogen molecule](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__examplesh2hf.html)\n  * [Energy of the hydrogen atom ground state](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__hatom__energy.html)\n  * [Solves heat equation using the Green's function](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__exampleheat.html)\n  * [Evolve in time 3D heat equation with a linear term](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__heatex2.html)\n  * [Hartree-Fock equations for the helium atom](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__examplehehf.html)\n  * [Solves the two-particle system exactly](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__helium__exact.html)\n  * [Hello world MADNESS style](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__hellowworldmad.html)\n  * [Solves a Navier-Stokes equation](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__examplense.html)\n  * [Solves a 1D nonlinear Schrödinger equation](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__examplenonlinsc.html)\n  * [Demonstrates/tests use of 3D shape functions](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__shape__tester.html)\n  * [First example from getting started guide](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__sininteg.html)\n  * [Spectral propagator in time using semigroup approach](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__spectralprop.html)\n  * [Solves a 1D time-dependent Schrödinger equation using splitting and semi-group approaches with the free-particle propagator](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__exampletdse1d.html)\n \n### Write your own simple test\n \nStarting from the simple `cmake` and C++ file from the [Numerical API](#Numerical-API) section, make a code to solve a simple problem you are interested in\n* E.g., project and do arithmetic on a function of your selection.\n* E.g., plot a function (look at some of the examples and also the [intrductory documentation](https://m-a-d-n-e-s-s.github.io/madness/api-doc/group__gstart__io.html)\n\n### MADNESS detailed presentation\n\nHave a skim through [MADNESSeverything4.pdf](https://github.com/m-a-d-n-e-s-s/madness/blob/tutorial/doc/MADNESSeverything4.pdf).\n* Since the file is large, it is probably easier to look at your local version using your system PDF viewer.\n* It goes through all the key concepts and is hopefully useful for self study.\n\n\n\n\n \n \n"
  },
  {
    "path": "doc/tutorial/TODO.md",
    "content": "# To do list for completing the tutorial\n\n"
  },
  {
    "path": "doc/tutorial/chemistry.md",
    "content": "# Chemistry in MADNESS\n\n* More detailed documention is [here](https://madness.readthedocs.io/en/latest/quantum.html)\n\n## Running a calculation -- quick and dirty\n\nRunning a quantum chemical calculations requires a molecule -- and not much more:\n\n```shell\n  export MAD_NUM_THREADS=10\n  moldft --geometry=h2o.xyz \n```\nThis will run an HF calculation on the molecule specified in the `h2o.xyz`-file.\nA geometry optimization is performed by\n```shell\nmoldft --geometry=h2o.xyz  --optimize\n```\n\nIf you want to run a standard geometry you can load one from the [structure library](https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/madness/chem/structure_library).  E.g., water with default parameters\n```shell\nmoldft --geometry=\"water\"\n```\n\nDFT and other parameters can also be overriden on the command line, using semicolons to represent end of line.  E.g., \n```shell\nmoldft --geometry=\"water\" --dft=\"xc lda; maxiter 5\"\n```\n\n\n## Getting help\n\nAll quantum chemical codes (e.g. `nemo`, `moldft`, etc) have two options\n```shell\nnemo --help\nnemo --print_parameters\n```\n\nThe `--help` option gives a short description of what the program does.\nThe `--print_parameters` option lists all parameters available to that program, together with\nthe current value, a marker if this parameter has been set by the user (`defined`), derived by the\nprogram (`derived`) or left to its default value (`default`), and a brief description of that\nparameter.\nIn some cases there is also a list of the available options in square brackets.\n\nYou can copy/paste the printout directly into your input file.\n\nParameters are case-insensitive.\n\n## The input file -- General structure\n\nInput parameters are passed to the program via the command line or through the input file.\nIf no input file name is given, the default name is `input`.\nIn the input file there are groups of parameters, enclosed by the data group key and the word `end`.\n\nEach program uses its own data group, sometimes several, sometimes shared with other programs.\nFor instance, for a `cis` or an `mp2` calculation a HF reference is needed, so the `dft` data group\nwill also be used by `cis` and `mp2` and `mp2`.\nThe data groups will be listed by calling the program with `--print_parameters`.\n\nExample for an HF calculation using `moldft` or `nemo`:\n\n```\ndft\n  L 20\n  k 8\n  xc hf\nend\n```\n\nExample for an excited state calculations using `cis`:\n\n```\nresponse\n  freeze 1\n  irrep b2\nend\n```\n\nThe input file may also be passed through the command line:\n\n```\ncis --dft=\"L=20; k=8; xc=hf\" --response=\"freeze=1; irrep=b2\"\n```\n\nwill have the same effect as an input file the with two data groups from above.\n\nThere are 2 convenience command line options outside the general data group structure:\n\n```\n --geometry=xxx.xyz\n --optimize\n```\n\nwill use the geometry from the `xyz`-file and optimize the molecule.\n\n### moldft and nemo\n\nThese two codes compute HF and DFT ground state wave functions.\nMany of the parameters defined here will propagate to post-HF calculations, e.g.\nthe box size `L`, the polynomial order `k`, the orbital set (localized or canonical),\nor the nuclear correlation factor (ncf):\n\nLike `moldft`, the `nemo` code solves SCF equations, but uses a nuclear correlation factor (ncf)\nfor regularizing  the nuclear potential.\n\n### CIS and CC2\n\n`cis` and `cc2` use a converged `moldft` or `nemo` reference for computing excited states\nand MP2/CC2 correlation energies, respectively.\n\n### molresponse\n\n`molresponse` computes frquency-dependent molecular response properties and excited-states.  We will focus on the frquency-dependent response here.\n\n\n1. **Prepare Your Environment:** Before you can run a `molresponse` calculation,\n   ensure that you've successfully installed the `molresponse` software and its\n   dependencies. Refer to the official documentation for the installation guide.\n\n2. **Generate Ground State Orbitals:** Before you compute molecular response\n   properties, you need to generate the ground state orbitals. This is typically\n   done with the `moldft` code and results in a `.restartdata` file.\n\n3. **Configure Your Input File:** Create an input file (usually named\n   `response.in`) specifying the parameters of your calculation. Here are the\n   bare minimum parameters you'll need to define:\n\n   - **Perturbation Operator:** Set by the `dipole` parameter. When set to\n     `True`, the dipole operator is used.\n   - **Perturbation Frequency:** Defined by the `omega` parameter.\n   - **Ground-State Restart File:** By default, `molresponse` looks for\n     `../moldft.restartdata`. You can specify a different path using the\n     `archive` parameter.\n\n   For a static response calculation, your `omega` value would be zero. For a\n   frequency-dependent response, you would set `omega` to your desired\n   frequency.\n\n4. **Run Your Calculation:** Execute the `molresponse` program with your input\n   file. The command is usually something like \n   \n   ```cpp\n   molresponse response.in\n   ```\n\n5. **Interpret Your Results:** The output is saved in a `response_base.json`\n   file, which you can analyze to interpret your results.  \n\nThis is a very brief overview. I highly recommend reading the full tutorial [here](../../src/apps/molresponse/molresponse_tutorial.md) to fully understand how to use `molresponse`\neffectively and accurately.\n\n### MADNESS + MPI\nTo run a MADNESS application in parallel with MPI, you can simply run \n\n```shell\nmpirun -n #procs qccode\n```\nwhich will execute the given application with the specified amount of MPI processes. In addition, you will need to set the number of MADNESS threads by exporting the following variable\n```shell\nexport MAD_NUM_THREADS=#threads\n```\nor you can specify the environment variable on the same line as the command.\n\nBy default, this is set to the number of cores available. When using MPI, each process will spawn the specified number of threads plus one additional communication thread **per process**.  Don't use too many threads or the performance will be poor --- it is a good idea to set the number to be lower than the total number of physical cores (*not* hyperthreads) available and leave some capacity to the OS.\n\n#### Example\n\nConsider a compute node with two CPUs with 14 cores each. Then\n```shell\nexport MAD_NUM_THREADS=12\nmpirun -n 2 moldft\n```\nwill result in 26 threads in total, leaving two cores to the OS. In general, if $n$ is the number of MPI processes and $m$ is the number of threads, the total number of threads will be $(m+1) \\cdot n$. \n\n#### Multiple nodes\nIf the calculation is distributed over multiple compute nodes, the number of MPI processes *per node* need to be specified via the `-ppn #procs` option, as well as the *total* number of processes. Using the same example as earlier but with ten compute nodes instead of one, we would get (depending on which MPI you are using)\n\n```shell\nmpirun -n 20 -ppn 2 moldft\n```\n\nMost modern servers have multiple sockets (processor chips) to which memory is directly connected.  Performance can be further enhanced by using one MPI process per socket and pinning the threads associated with each process to separate sockets:\n* This localizes memory references and provides best memory bandwidth.\n* The overheads of inter-socket memory coherency are avoided.\n* Each process will have fewer threads, making the memory allocator and task queue more efficient.\n\nE.g., to run moldft on ten dual-socket compute nodes with \n* two MPI processes on each node,\n* with processes bound to separate sockets, and \n* assuming each socket has 12 physical cores\nwe use 10+1 threads for MADNESS and leave 1 core per socket free for the OS):\n\n* For Intel MPI\n```shell\n    MAD_NUM_THREADS=10 I_MPI_PIN_DOMAIN=socket mpirun -np 20 -ppn 2 moldft\n```\n\nFor OpenMPI\n```shell\n    MAD_NUM_THREADS=10 mpirun --map-by=socket -n 20 -ppn 2 moldft\n```\n"
  },
  {
    "path": "doc/tutorial/simple_hf.cpp",
    "content": "#include <madness.h>\n#include <madchem.h>\n\nusing namespace madness;\n\nint main(int argc, char* argv[]) {\n    World& world=initialize(argc,argv);\n    startup(world,argc,argv,true);\n    FunctionDefaults<3>::set_cubic_cell(-10,10);\n    FunctionDefaults<3>::set_k(8);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_thresh(1.e-5);\n    double lo=1.e-4;\n\n    try {\n        // set up molecule\n        Atom O( 0.0, 0.0, 0.2, 8, 8);\n        Atom H1(0.0, 1.4,-0.8, 1, 1);\n        Atom H2(0.0,-1.4,-0.8, 1, 1);\n        Molecule molecule({O,H1,H2},1.e-6);\n        molecule.print();\n        long nocc=long(molecule.total_nuclear_charge())/2;\n\n        // define Fock operator\n        auto T=Kinetic<double,3>(world);\n        auto J=Coulomb<double,3>(world,lo,FunctionDefaults<3>::get_thresh());\n        auto K=Exchange<double,3>(world,lo,FunctionDefaults<3>::get_thresh());\n        auto V=Nuclear<double,3>(world,molecule);\n\n        // compute hcore guess\n        AtomicBasisSet aobasis(\"sto-3g\");\n        auto aos=SCF::project_ao_basis_only(world,aobasis,molecule);\n        auto hcoremat=T(aos,aos) + V(aos,aos);\n        auto smat=matrix_inner(world,aos,aos);\n        Tensor<double> U,e;\n        sygv(hcoremat,smat,1,U,e);              // solves gen. eigenvalue problem: A x =  e B x\n        auto orbitals=transform(world,aos,U(_,Slice(0,nocc-1)));   // orbitals are lowest nocc AOs after diagonalization\n\n        // set up KAIN solver\n        auto solver=nonlinear_vector_solver<double,3>(world, orbitals.size());\n\n        // solves F |i> = f_{ij} |j>    <=>    (T-f_{ii} ) |i>  = -(J - K + V) |i> + \\sum_{j/neq i> f_{ij} |j>\n        BSHApply<double,3> bsh_apply(world);\n\n        int maxiter=30;\n        for (int iter=0; iter<maxiter; ++iter) {\n            double wall0=wall_time();\n\n            // update Fock operator\n            auto density=2.0*dot(world,orbitals,orbitals);\n            J.potential()=J.compute_potential(density);\n            K.set_bra_and_ket(orbitals,orbitals);\n\n            // compute potentials\n            auto Jphi=J(orbitals);\n            auto Kphi=K(orbitals);\n            auto Vnucphi=V(orbitals);\n            auto Vphi=truncate(Jphi-Kphi+Vnucphi);\n\n            // compute Fock matrix\n            auto tmat=T(orbitals,orbitals);\n            auto jmat=matrix_inner(world,orbitals,Jphi);\n            auto kmat=matrix_inner(world,orbitals,Kphi);\n            auto vmat=matrix_inner(world,orbitals,Vnucphi);\n            auto fock=tmat + jmat -kmat + vmat;\n\n            // apply BSH operator\n            auto [residual,eps_update]=bsh_apply(orbitals,fock,Vphi);\n            double rnorm=norm2(world,residual);\n\n            // update orbitals, orthonormalize\n            orbitals=solver.update(orbitals,residual);\n//            orbitals-=residual;\n            orbitals=truncate(orthonormalize(orbitals));\n\n            // compute energy\n            double energy=molecule.nuclear_repulsion_energy();\n            for (long i=0; i<nocc; ++i) {\n                energy+=2.0* (tmat(i,i) +0.5*jmat(i,i) -0.5* kmat(i,i)+vmat(i,i));\n            }\n            double wall1=wall_time();\n            printf(\"iteration %2d with total energy: %12.8f %3.1e after %4.1fs\\n\",iter, energy, rnorm,wall1-wall0);\n            if (rnorm<1.e-4) break;\n\n        }\n\n    } catch (...) {\n         std::cout << \"caught an error \" << std::endl;\n    }\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "doc/tutorial/test_runtime.cpp",
    "content": "#include <madness/world/worldgop.h>\n#include <cassert>\n\nint task (int i) { return i + 1; }\n\nint main(int argc, char* argv[]) {\n  using namespace madness;\n\n  World &world = initialize(argc, argv);\n  const auto me = world.rank();\n  const auto nproc = world.size();\n\n  if (me == 0) {\n    for (auto t = 0; t != 1000; ++t) {\n      const auto proc = t % nproc;\n      auto f = world.taskq.add(proc, &task, t);\n      assert(f.get() == t+1);\n    }\n  }\n  world.gop.fence();\n\n  finalize();\n  return 0;\n}\n\n"
  },
  {
    "path": "external/boost.cmake",
    "content": "if(ENABLE_BOOST)\n\n    cmake_minimum_required(VERSION 3.15.0)  # for Boost::headers\n    find_package(Boost 1.35 REQUIRED)\n\n  # Set the output variables\n  if(TARGET Boost::headers)\n\t  set(MADNESS_HAS_BOOST 1)\n  endif()\n\nendif()\n\n"
  },
  {
    "path": "external/elemental.cmake",
    "content": "# -*- mode: cmake -*-\n\n######################\n# Find Elemental\n######################\n\nif(ENABLE_ELEMENTAL AND DEFINED ELEMENTAL_TAG)\n\n  include(ExternalProject)\n  include(ConvertIncludesListToCompilerArgs)\n  include(ConvertLibrariesListToCompilerArgs)\n\n  find_package(Git REQUIRED)\n  \n  if(NOT DEFINED ELEMENTAL_URL)\n    set(ELEMENTAL_URL https://github.com/elemental/Elemental.git)\n  endif()\n  message(STATUS \"Will pull Elemental from ${ELEMENTAL_URL}\")\n  \n  # Create a cache entry for Elemental build variables.\n  # Note: This will not overwrite user specified values.\n  set(ELEMENTAL_SOURCE_DIR \"${PROJECT_BINARY_DIR}/external/source/elemental\" CACHE PATH \n        \"Path to the Elemental source directory\")\n  set(ELEMENTAL_BINARY_DIR \"${PROJECT_BINARY_DIR}/external/build/elemental\" CACHE PATH \n        \"Path to the Elemental build directory\")\n  \n  # Set Elemental compile flags\n  append_flags(ELEMENTAL_CFLAGS \"${CMAKE_C_FLAGS}\")\n  append_flags(ELEMENTAL_CXXFLAGS \"${CMAKE_CXX_FLAGS}\")\n  append_flags(ELEMENTAL_LDFLAGS \"${CMAKE_EXE_LINKER_FLAGS}\")\n  \n  if(CMAKE_BUILD_TYPE)\n    string(TOLOWER ELEMENTAL_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")\n    append_flags(ELEMENTAL_CFLAGS \"${CMAKE_C_FLAGS_${ELEMENTAL_BUILD_TYPE}}\")\n    append_flags(ELEMENTAL_CXXFLAGS \"${CMAKE_CXX_FLAGS_${ELEMENTAL_BUILD_TYPE}}\")\n  endif()\n\n  # Use same build type for Elemental. Assume this is newer Elemental.\n  # Older El required decorated build types (PureRelease, HybridDebug, etc.)\n  if (NOT DEFINED ELEMENTAL_CMAKE_BUILD_TYPE)\n    set(ELEMENTAL_CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")\n  endif (NOT DEFINED ELEMENTAL_CMAKE_BUILD_TYPE)\n  if (${ELEMENTAL_CMAKE_BUILD_TYPE} STREQUAL \"Debug\")\n    message(WARNING \"Compiling Elemental with in Debug mode will make many calls non-reentrant! Set ELEMENTAL_CMAKE_BUILD_TYPE=Release to avoid\")\n  endif()\n  \n  # Set the configuration variables used by elemental\n  if((ENABLE_SPINLOCKS OR NOT ENABLE_NEVER_SPIN) AND NOT CMAKE_SYSTEM_NAME MATCHES \"Darwin\")\n    set(ELEMENTAL_HAVE_SPINLOCKS ON)\n  else()\n    set(ELEMENTAL_HAVE_SPINLOCKS OFF)\n  endif()\n\n  # Override BLAS+LAPACK selection by Elemental\n  # unless ELEMENTAL_MATH_LIBS is given by the user, use LAPACK_LIBRARIES as the default value for Elemental's MATH_LIBS\n  if (NOT ELEMENTAL_MATH_LIBS AND NOT (\"${ELEMENTAL_CMAKE_EXTRA_ARGS}\" MATCHES \"-DMATH_LIBS\"))\n    # see lapack.cmake\n    # process LAPACK_LIBRARIES for CMAKE_REQUIRED_LIBRARIES (this is likely only to work with Makefile generator):\n    # 1. get rid of the surrounding quotes\n    string(REGEX REPLACE \"\\\"\" \"\" PROCESSED_LAPACK_LIBRARIES \"${LAPACK_LIBRARIES}\")\n    # 2. convert a space-separated string of libs into a list\n    string(REGEX REPLACE \" \" \";\" PROCESSED_LAPACK_LIBRARIES \"${PROCESSED_LAPACK_LIBRARIES}\")\n    # 3. restore (and protect!) the space in \"-framework X\"\n    string(REGEX REPLACE \"-framework;(.*)\" \"-framework \\\\1\" PROCESSED_LAPACK_LIBRARIES \"${PROCESSED_LAPACK_LIBRARIES}\")\n    # 4. list -> string\n    string(REGEX REPLACE \";\" \"\\ \" PROCESSED_LAPACK_LIBRARIES \"${PROCESSED_LAPACK_LIBRARIES}\")\n    set(ELEMENTAL_MATH_LIBS \"${PROCESSED_LAPACK_LIBRARIES}\")\n  endif()\n\n  #\n  # Obtain Elemental source **only** if needed (that's why not using ExternalProject)\n  #\n  # make directory\n  message(STATUS \"Checking Elemental source directory: ${ELEMENTAL_SOURCE_DIR}\")\n  if(EXISTS \"${ELEMENTAL_SOURCE_DIR}\")\n    message(STATUS \"Checking Elemental source directory: ${ELEMENTAL_SOURCE_DIR} - found\")\n  else(EXISTS \"${ELEMENTAL_SOURCE_DIR}\")\n    # Create the external source directory\n    if(NOT EXISTS ${PROJECT_BINARY_DIR}/external/source)\n      set(error_code 1)\n      execute_process(\n          COMMAND \"${CMAKE_COMMAND}\" -E make_directory \"${PROJECT_BINARY_DIR}/external/source\"\n          RESULT_VARIABLE error_code)\n      if(error_code)\n        message(FATAL_ERROR \"Failed to create the external source directory in build tree.\")\n      endif()\n    endif()\n  endif()\n  # checkout if needed\n  if(NOT EXISTS ${ELEMENTAL_SOURCE_DIR}/.git)\n    message(STATUS \"Pulling Elemental from: ${ELEMENTAL_URL}\")\n    set(error_code 1)\n    set(number_of_tries 0)\n    while(error_code AND number_of_tries LESS 3)\n      execute_process(\n          COMMAND ${GIT_EXECUTABLE}\n                  clone ${ELEMENTAL_URL} elemental\n          WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/external/source\n          OUTPUT_FILE git.log\n          ERROR_FILE git.log\n          RESULT_VARIABLE error_code)\n      math(EXPR number_of_tries \"${number_of_tries} + 1\")\n    endwhile()\n    if(number_of_tries GREATER 1)\n      message(STATUS \"Had to git clone more than once: ${number_of_tries} times.\")\n    endif()\n    if(error_code)\n      message(FATAL_ERROR \"Failed to clone repository: '${ELEMENTAL_URL}'\")\n    endif()\n  endif()\n  # reset to the desired Elemental tag\n  if(EXISTS ${ELEMENTAL_SOURCE_DIR}/.git)\n    set(error_code 1)\n    execute_process(\n      COMMAND \"${GIT_EXECUTABLE}\" fetch\n      COMMAND \"${GIT_EXECUTABLE}\" checkout ${ELEMENTAL_TAG}\n      WORKING_DIRECTORY \"${ELEMENTAL_SOURCE_DIR}\"\n      RESULT_VARIABLE error_code)\n    if(error_code)\n      message(FATAL_ERROR \"Failed to checkout tag: '${ELEMENTAL_TAG}'\")\n    endif()        \n  endif()\n  \n  # Create or clean the build directory\n  if(EXISTS \"${ELEMENTAL_BINARY_DIR}\")\n    set(error_code 1)\n    execute_process(\n        COMMAND \"${CMAKE_COMMAND}\" -E remove -f \"./*\"\n        WORKING_DIRECTORY ${ELEMENTAL_BINARY_DIR}\n        RESULT_VARIABLE error_code)\n    if(error_code)\n      message(FATAL_ERROR \"Failed to delete existing files in the Elemental build directory.\")\n    endif()\n  else()\n    set(error_code 1)\n    execute_process(\n        COMMAND \"${CMAKE_COMMAND}\" -E make_directory \"${ELEMENTAL_BINARY_DIR}\"\n        RESULT_VARIABLE error_code)\n    if(error_code)\n      message(FATAL_ERROR \"Failed to create the Elemental build directory.\")\n    endif()\n  endif()\n\n  # since 0.85 package name is 'El', before that it was 'elemental'\n  # detect the version by searching the main header\n  message(STATUS \"Looking for the top Elemental header\")\n  if(EXISTS ${ELEMENTAL_SOURCE_DIR}/include/El.hpp)\n    message(STATUS \"Looking for the top Elemental header - found El.hpp\")\n    set(HAVE_EL_H ON CACHE INTERNAL \"Have El.hpp\" FORCE)\n    set(ELEMENTAL_PACKAGE_NAME El CACHE INTERNAL \"Elemental package name\" FORCE)\n    set(ELEMENTAL_CONFIG_NAME Elemental CACHE INTERNAL \"Elemental configure file prefix\" FORCE)\n  elseif(EXISTS ${ELEMENTAL_SOURCE_DIR}/include/elemental.hpp)\n    message(STATUS \"Looking for the top Elemental header - found elemental.hpp\")\n    set(HAVE_ELEMENTAL_H ON CACHE INTERNAL \"Have elemental.hpp\" FORCE)\n    set(ELEMENTAL_PACKAGE_NAME elemental CACHE INTERNAL \"Elemental package name (component name is same)\" FORCE)\n    # EFV: fairly sure the assumptions about which components Elemental builds by default are valid for\n    # recent versions only \n    message (FATAL_ERROR \"ELEMENTAL_TAG is too old to handle\")\n  else()\n    message(FATAL_ERROR \"Looking for the top Elemental header - not found\")\n  endif()\n\n  # if CMAKE_POSITION_INDEPENDENT_CODE is defined, pass it to El\n  if (DEFINED CMAKE_POSITION_INDEPENDENT_CODE)\n    list(APPEND ELEMENTAL_CMAKE_EXTRA_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE})\n  endif ()\n\n  # concat all arguments\n  set(ELEMENTAL_ARGS       -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}\n          -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}\n          -DCMAKE_BUILD_TYPE=${ELEMENTAL_CMAKE_BUILD_TYPE}\n          -DMPI_CXX_COMPILER=${MPI_CXX_COMPILER}\n          -DMPI_C_COMPILER=${MPI_C_COMPILER}\n          -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}\n          \"-DC_FLAGS=${ELEMENTAL_CFLAGS}\"\n          -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}\n          \"-DCXX_FLAGS=${ELEMENTAL_CXXFLAGS}\"\n          -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}\n          -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}\n          -DCMAKE_EXE_LINKER_FLAGS=${ELEMENTAL_LDFLAGS}\n          -DMATH_LIBS=${ELEMENTAL_MATH_LIBS}\n          -DHAVE_SPINLOCKS=${ELEMENTAL_HAVE_SPINLOCKS}\n          ${ELEMENTAL_CMAKE_EXTRA_ARGS})\n  message(STATUS \"Elemental CMake arguments: ${ELEMENTAL_ARGS}\")\n\n  set(error_code 1)\n  message (STATUS \"** Configuring Elemental\")\n  execute_process(\n      COMMAND ${CMAKE_COMMAND}\n      ${ELEMENTAL_SOURCE_DIR}\n      -G \"${CMAKE_GENERATOR}\"\n      ${ELEMENTAL_ARGS}\n      WORKING_DIRECTORY \"${ELEMENTAL_BINARY_DIR}\"\n      RESULT_VARIABLE error_code)\n  if(error_code)\n    message(FATAL_ERROR \"The Elemental cmake configuration failed.\")\n  else(error_code)\n    message (STATUS \"** Done configuring Elemental\")\n  endif(error_code)\n\n  file(MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/CMake)\n\n  find_package(${ELEMENTAL_CONFIG_NAME} REQUIRED PATHS ${CMAKE_INSTALL_PREFIX}\n      COMPONENTS REQUIRED ${ELEMENTAL_PACKAGE_NAME} pmrrr ElSuiteSparse)\n  set(ELEMENTAL_FOUND 1)\n\n  # Add update-elemental target that will pull updates to the Elemental source\n  # from the git repository. This is done outside ExternalProject_add to prevent\n  # Elemental from doing a full pull, configure, and build everytime the project\n  # is built.\n  add_custom_target(update-elemental\n    COMMAND ${GIT_EXECUTABLE} pull --rebase origin master\n    COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${ELEMENTAL_BINARY_DIR}/stamp/elemental-configure\n    WORKING_DIRECTORY ${ELEMENTAL_SOURCE_DIR}\n    COMMENT \"Updating source for 'elemental' from ${ELEMENTAL_URL}\"\n    USES_TERMINAL)\n\n  add_custom_target(build-elemental ALL\n      COMMAND ${CMAKE_COMMAND} --build . --target El\n      WORKING_DIRECTORY ${ELEMENTAL_BINARY_DIR}\n      COMMENT \"Building elemental\"\n      USES_TERMINAL)\n\n  # TODO update Elemental installation when fixed upstream (installing El does not install everything it needs)\n  add_custom_target(install-elemental\n      COMMAND ${CMAKE_COMMAND} -P ${ELEMENTAL_BINARY_DIR}/cmake_install.cmake\n      COMMENT \"Installing elemental\"\n      USES_TERMINAL)\n  add_dependencies(install-elemental build-elemental)\n\n  # Add clean-elemental target that will delete files generated by Elemental build.\n  add_custom_target(clean-elemental\n    COMMAND $(MAKE) clean\n    COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${ELEMENTAL_BINARY_DIR}/stamp/elemental-configure\n    WORKING_DIRECTORY ${ELEMENTAL_BINARY_DIR}\n    COMMENT Cleaning build directory for 'elemental'\n    USES_TERMINAL)\n\n  # Since 'install-elemental' target cannot be linked to the 'install' target,\n  # we will do it manually here.\n  install(CODE\n      \"\n      execute_process(\n          COMMAND \\\"${CMAKE_MAKE_PROGRAM}\\\" \\\"install\\\" \n          WORKING_DIRECTORY \\\"${ELEMENTAL_BINARY_DIR}\\\"\n          RESULT_VARIABLE error_code)\n      if(error_code)\n        message(FATAL_ERROR \\\"Failed to install 'elemental'\\\")\n      endif()\n      \"\n      )\n  \n  # Set build dependencies and compiler arguments\n  # WARNING: should only need to satisfy build-elemental to use El, however its cmake config file\n  # is inadequate for using from build tree, hence MUST install even for build tree. Solving here will\n  # take far too much effort. Will file an issue.\n  add_dependencies(${ELEMENTAL_PACKAGE_NAME} install-elemental)\n  \n  # These build variables are not used anyway\n  set(ELEMENTAL_INCLUDE_DIRS\n      \"${ELEMENTAL_BINARY_DIR}/include\"\n     )\n  set(ELEMENTAL_LIBRARIES \n      \"${ELEMENTAL_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${ELEMENTAL_PACKAGE_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}\"\n      \"${ELEMENTAL_BINARY_DIR}/external/pmrrr/${CMAKE_STATIC_LIBRARY_PREFIX}pmrrr${CMAKE_STATIC_LIBRARY_SUFFIX}\"\n      \"${ELEMENTAL_BINARY_DIR}/external/suite_sparse/${CMAKE_STATIC_LIBRARY_PREFIX}ElSuiteSparse${CMAKE_STATIC_LIBRARY_SUFFIX}\"\n      \"${ELEMENTAL_BINARY_DIR}/download/parmetis/build/libparmetis/${CMAKE_STATIC_LIBRARY_PREFIX}parmetis${CMAKE_STATIC_LIBRARY_SUFFIX}\"\n      \"${ELEMENTAL_BINARY_DIR}/download/parmetis/build/metis/libmetis/${CMAKE_STATIC_LIBRARY_PREFIX}parmetis${CMAKE_STATIC_LIBRARY_SUFFIX}\"\n      \"${ELEMENTAL_BINARY_DIR}/download/scalapack/build/lib/${CMAKE_STATIC_LIBRARY_PREFIX}scalapack${CMAKE_STATIC_LIBRARY_SUFFIX}\"\n     )\n\nendif(ENABLE_ELEMENTAL AND DEFINED ELEMENTAL_TAG)\n"
  },
  {
    "path": "external/gperftools.cmake",
    "content": "if(ENABLE_GPERFTOOLS OR ENABLE_TCMALLOC_MINIMAL)\n  \n  if(ENABLE_GPERFTOOLS)\n    find_package(Gperftools COMPONENTS tcmalloc OPTIONAL_COMPONENTS profiler)\n  else()\n    find_package(Gperftools REQUIRED COMPONENTS tcmalloc_minimal)\n  endif()\n\n  # Set the config.h variables\n  if(GPERFTOOLS_FOUND)\n    set(MADNESS_HAS_GOOGLE_PERF 1)\n    if (Gperftools_tcmalloc_FOUND OR Gperftools_tcmalloc_minimal_FOUND OR Gperftools_tcmalloc_and_profiler_FOUND)\n      set(MADNESS_HAS_GOOGLE_PERF_TCMALLOC 1)\n    endif(Gperftools_tcmalloc_FOUND OR Gperftools_tcmalloc_minimal_FOUND OR Gperftools_tcmalloc_and_profiler_FOUND)\n    if (Gperftools_tcmalloc_minimal_FOUND)\n      set(MADNESS_HAS_GOOGLE_PERF_TCMALLOC_MINIMAL 1)\n    endif(Gperftools_tcmalloc_minimal_FOUND)\n    if (Gperftools_profiler_FOUND OR Gperftools_tcmalloc_and_profiler_FOUND)\n      set(MADNESS_HAS_GOOGLE_PERF_PROFILER 1)\n    endif(Gperftools_profiler_FOUND OR Gperftools_tcmalloc_and_profiler_FOUND)\n  endif()\n  if(LIBUNWIND_FOUND)\n    set(MADNESS_HAS_LIBUNWIND 1)\n  endif()\n      \nendif()"
  },
  {
    "path": "external/integratorxx.cmake",
    "content": "if(ENABLE_INTEGRATORXX)\n\n  find_package(IntegratorXX)\n\n  # Set the output variables\n  if(INTEGRATORXX_FOUND)\n    set(MADNESS_HAS_INTEGRATORXX 1)\n  endif()\n      \nendif()\n"
  },
  {
    "path": "external/lapack.cmake",
    "content": "# Find BLAS and LAPACK.\n\nset(lapack_is_optional 0)\nset(missing_lapack_message_level \"FATAL_ERROR\")\n\n# if building just the runtime, included this by mistake, warn and make optional\nif (MADNESS_BUILD_MADWORLD_ONLY)\n  message(WARNING \"MADNESS_BUILD_MADWORLD_ONLY=ON, but included external/lapack.cmake; must be error in CMakeLists.txt\")\n  set(lapack_is_optional 1)\n  set(missing_lapack_message_level \"STATUS\")\nendif (MADNESS_BUILD_MADWORLD_ONLY)\n\ninclude(CheckCFortranFunctionExists)\ninclude(CMakePushCheckState)\ninclude(CheckCXXSourceCompiles)\n\nif(NOT LAPACK_LIBRARIES)\n  set(USER_LAPACK_LIBRARIES FALSE)\n\n  if(ENABLE_MKL)\n    find_package(MKL)\n    \n    if(MKL_FOUND)\n      set(LAPACK_FOUND TRUE)\n      set(LAPACK_LIBRARIES ${MKL_LIBRARIES})\n      set(HAVE_INTEL_MKL 1)\n      set(LAPACK_COMPILE_DEFINITIONS MADNESS_LINALG_USE_LAPACKE)\n      set(LAPACK_INCLUDE_DIRS ${MKL_INCLUDE_DIRS})\n    endif()\n  endif()\n  \n  if(ENABLE_ACML AND NOT LAPACK_FOUND)\n    find_package(ACML)\n    \n    if(ACML_FOUND)\n      set(LAPACK_FOUND TRUE)\n      set(LAPACK_LIBRARIES ${ACML_LIBRARIES})\n      set(HAVE_ACML 1)\n    endif()\n  endif()\n  \n  # Search for system specific BLAS/LAPACK checks\n  if(NOT LAPACK_FOUND AND CMAKE_SYSTEM_NAME MATCHES \"Darwin\")\n    # Accelerate is always present, so no need to search\n    set(LAPACK_LIBRARIES \"-framework Accelerate\")\n    set(LAPACK_FOUND TRUE)\n  endif()\n  \n  # Search for netlib lapack and blas libraries\n  if(NOT LAPACK_FOUND)\n    find_library(LAPACK_lapack_LIBRARY lapack)\n    find_library(LAPACK_blas_LIBRARY blas)\n    \n    if(LAPACK_lapack_LIBRARY AND LAPACK_blas_LIBRARY)\n      set(LAPACK_LIBRARIES ${LAPACK_lapack_LIBRARY} ${LAPACK_blas_LIBRARY})\n      set(LAPACK_FOUND TRUE)\n    endif()\n  endif()  \n\nelse()\n  set(USER_LAPACK_LIBRARIES TRUE)\nendif()\n\ncmake_push_check_state()\n\n# process LAPACK_LIBRARIES for CMAKE_REQUIRED_LIBRARIES (this is likely only to work with Makefile generator):\n# 1. get rid of the surrounding quotes\nstring(REGEX REPLACE \"\\\"\" \"\" PROCESSED_LAPACK_LIBRARIES \"${LAPACK_LIBRARIES}\")\n# 2. convert a space-separated string of libs into a list\nstring(REGEX REPLACE \" \" \";\" PROCESSED_LAPACK_LIBRARIES \"${PROCESSED_LAPACK_LIBRARIES}\")\n# 3. restore (and protect!) the space in \"-framework X\"\nstring(REGEX REPLACE \"-framework;(.*)\" \"-framework\\\\\\\\ \\\\1\" PROCESSED_LAPACK_LIBRARIES \"${PROCESSED_LAPACK_LIBRARIES}\")\n#message(STATUS \"PROCESSED_LAPACK_LIBRARIES=${PROCESSED_LAPACK_LIBRARIES}\")\nset(CMAKE_REQUIRED_LIBRARIES ${PROCESSED_LAPACK_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES}\n        Threads::Threads)\n\n# Verify that we can link against BLAS\ncheck_c_fortran_function_exists(sgemm BLAS_WORKS)\n\nif(BLAS_WORKS)\n  message(STATUS \"A library with BLAS API found.\")\nelse()\n  message(\"${missing_lapack_message_level}\" \"Unable to link against BLAS function. Specify the BLAS library in LAPACK_LIBRARIES.\")\nendif()\n\n# Verify that we can link against LAPACK\ncheck_c_fortran_function_exists(cheev LAPACK_WORKS)\n\nif(LAPACK_WORKS)\n  message(STATUS \"A library with LAPACK API found.\")\nelse()\n  message(\"${missing_lapack_message_level}\" \"Unable to link against LAPACK function. Specify the LAPACK library in LAPACK_LIBRARIES.\")\nendif()\n\nset(LAPACK_FOUND TRUE)\nmessage(STATUS \"Found LAPACK: ${LAPACK_LIBRARIES}\")\n\n# introspect LAPACK_LIBRARIES given by the user\nif (USER_LAPACK_LIBRARIES)\n\n  # check for MKL\n  check_function_exists(mkl_get_version USER_LAPACK_LIBRARIES_IS_MKL)\n  if(USER_LAPACK_LIBRARIES_IS_MKL)\n    message(STATUS \"User-defined LAPACK_LIBRARIES provides an MKL library\")\n    set(HAVE_INTEL_MKL 1)\n    # ensure that MADNESS_LINALG_USE_LAPACKE is defined\n    list(APPEND LAPACK_COMPILE_DEFINITIONS MADNESS_LINALG_USE_LAPACKE)\n    list(REMOVE_DUPLICATES LAPACK_COMPILE_DEFINITIONS)\n\n  else(USER_LAPACK_LIBRARIES_IS_MKL)\n    # check for ACML\n    check_function_exists(acmlversion USER_LAPACK_LIBRARIES_IS_ACML)\n\n    if(USER_LAPACK_LIBRARIES_IS_ACML)\n      message(STATUS \"User-defined LAPACK_LIBRARIES provides an ACML library\")\n      set(HAVE_ACML 1)\n    endif(USER_LAPACK_LIBRARIES_IS_ACML)\n  endif(USER_LAPACK_LIBRARIES_IS_MKL)\n\n  # LAPACK_LIBRARIES might include IMPORTED targets that are not globally available\n  if (LAPACK_LIBRARIES MATCHES OpenMP::OpenMP_C AND NOT TARGET OpenMP::OpenMP_C)\n    find_package(OpenMP REQUIRED COMPONENTS C)\n  endif()\n  if (LAPACK_LIBRARIES MATCHES Threads::Threads AND NOT TARGET Threads::Threads)\n    find_package(Threads REQUIRED)\n  endif()\n\nendif(USER_LAPACK_LIBRARIES)\n\ncmake_pop_check_state()\n\n# Set the fortran mangling scheme.\nif(LAPACK_WORKS STREQUAL \"cheev_\")\n  set(FORTRAN_LINKAGE_LCU 1)\nelseif(LAPACK_WORKS STREQUAL \"cheev\")\n  set(FORTRAN_LINKAGE_LC 1)\nelseif(LAPACK_WORKS STREQUAL \"cheev__\")\n  set(FORTRAN_LINKAGE_LCUU 1)\nelseif(LAPACK_WORKS STREQUAL \"CHEEV\")\n  set(FORTRAN_LINKAGE_UC 1)\nelseif(LAPACK_WORKS STREQUAL \"CHEEV_\")\n  set(FORTRAN_LINKAGE_UCU 1)\nendif()\n\n# unquote LAPACK_COMPILE_OPTIONS, LAPACK_INCLUDE_DIRS, and LAPACK_COMPILE_DEFINITIONS also\nstring(REGEX REPLACE \"\\\"\" \"\" LAPACK_COMPILE_OPTIONS \"${LAPACK_COMPILE_OPTIONS}\")\nstring(REGEX REPLACE \"\\\"\" \"\" LAPACK_INCLUDE_DIRS \"${LAPACK_INCLUDE_DIRS}\")\nstring(REGEX REPLACE \"\\\"\" \"\" LAPACK_COMPILE_DEFINITIONS \"${LAPACK_COMPILE_DEFINITIONS}\")\n\n# epilogue: final sanity checks\nif(USER_LAPACK_LIBRARIES_IS_MKL)\n  cmake_push_check_state()\n  # ensure that can include mkl.h\n  set(CMAKE_REQUIRED_INCLUDES ${LAPACK_INCLUDE_DIRS})\n  foreach(def ${LAPACK_COMPILE_DEFINITIONS})\n    set(CMAKE_REQUIRED_DEFINITIONS \"${CMAKE_REQUIRED_DEFINITIONS};-D${def}\")\n  endforeach()\n  set(CMAKE_REQUIRED_FLAGS ${LAPACK_COMPILE_OPTIONS})\n  check_cxx_source_compiles(\n          \"\n  #include <mkl.h>\n  int main(int argc, char** argv) {\n    return 0;\n  }\n  \"  MADNESS_CAN_INCLUDE_MKL_H)\n  if (NOT MADNESS_CAN_INCLUDE_MKL_H)\n    message(\"${missing_lapack_message_level}\" \"User-provided LAPACK_LIBRARIES provides MKL but cannot include its headers; ensure that corresponding LAPACK_INCLUDE_DIRS, LAPACK_COMPILE_DEFINITIONS, or LAPACK_COMPILE_OPTIONS were provided\")\n  endif()\n\n  cmake_pop_check_state()\nendif(USER_LAPACK_LIBRARIES_IS_MKL)\n\n"
  },
  {
    "path": "external/libunwind.cmake",
    "content": "if(NOT LIBUNWIND_FOUND AND (ENABLE_LIBUNWIND OR ENABLE_TASK_PROFILER))\n\n  find_package(Libunwind)\n    \n  # Set the output variables\n  if(LIBUNWIND_FOUND)\n    set(MADNESS_HAS_LIBUNWIND 1)\n  endif()\n      \nendif()"
  },
  {
    "path": "external/libxc.cmake",
    "content": "if(ENABLE_LIBXC)\n\n  find_package(Libxc CONFIG)\n    \n  # Set the output variables\n  if(TARGET Libxc::xc)\n    set(MADNESS_HAS_LIBXC 1)\n  endif()\n      \nendif()\n"
  },
  {
    "path": "external/mpi.cmake",
    "content": "# Find MPI\n\nif(ENABLE_MPI)\n\n  # find threads first\n  if (NOT TARGET Threads::Threads)\n    message(FATAL_ERROR \"include external/pthread.cmake BEFORE external/mpi.cmake\")\n  endif()\n\n  # Try to find MPI\n  find_package(MPI REQUIRED)\n  cmake_minimum_required(VERSION 3.10) # FindMPI needs to provide MPI_<lang>_HEADER_DIR\n\n  # Set the variables \n  if(MPI_C_FOUND)\n    set(MPI_FOUND         ${MPI_C_FOUND})\n    string(STRIP \"${MPI_C_COMPILE_FLAGS}\" MPI_COMPILE_FLAGS)\n    set(MPI_INCLUDE_PATH  ${MPI_C_INCLUDE_PATH})\n    string(STRIP \"${MPI_C_LINK_FLAGS}\" MPI_LINK_FLAGS)\n    set(MPI_LIBRARIES     ${MPI_C_LIBRARIES})\n    set(MPI_HEADER_DIR    ${MPI_C_HEADER_DIR})\n  elseif(MPI_CXX_FOUND)\n    set(MPI_FOUND         ${MPI_CXX_FOUND})\n    string(STRIP \"${MPI_CXX_COMPILE_FLAGS}\" MPI_COMPILE_FLAGS)\n    set(MPI_INCLUDE_PATH  ${MPI_CXX_INCLUDE_PATH})\n    string(STRIP \"${MPI_CXX_LINK_FLAGS}\" MPI_LINK_FLAGS)\n    set(MPI_LIBRARIES     ${MPI_CXX_LIBRARIES})\n    set(MPI_HEADER_DIR    ${MPI_CXX_HEADER_DIR})\n  else()\n    message(FATAL_ERROR \"No suitable MPI compiler was not found.\")\n  endif()\n  # will hardwire to particular mpi.h to avoid the issues with CPATH defined by Intel MPI envvar script overriding mpi.h in system dirs\n  if (EXISTS \"${MPI_HEADER_DIR}\")\n    get_filename_component(MADNESS_MPI_HEADER \"${MPI_HEADER_DIR}/mpi.h\" ABSOLUTE CACHE)\n  elseif (EXISTS \"${MPI_INCLUDE_PATH}\")\n    get_filename_component(MADNESS_MPI_HEADER \"${MPI_INCLUDE_PATH}/mpi.h\" ABSOLUTE CACHE)\n  else()\n    set(MADNESS_MPI_HEADER \"mpi.h\" CACHE STRING \"Path to the main MPI header\")\n  endif()\n  message(STATUS \"MPI main header: ${MADNESS_MPI_HEADER}\")\n\n  # filter out -pthread from COMPILE and LINK flags, use Threads::Threads instead\n  # this is to avoid issues later consuming madness targets in codes using CUDA\n  # see https://gitlab.kitware.com/cmake/cmake/merge_requests/2512\n  string(REGEX REPLACE \"[ ]?-pthread\" \"\" MPI_COMPILE_FLAGS \"${MPI_COMPILE_FLAGS}\")\n  string(REGEX REPLACE \"[ ]?-pthread\" \"\" MPI_LINK_FLAGS \"${MPI_LINK_FLAGS}\")\n  set(MPI_LIBRARIES ${MPI_LIBRARIES} Threads::Threads)\n\n  # MPIEXEC was deprecated in CMake 3.10\n  if (CMAKE_VERSION VERSION_LESS 3.10.0)\n    set(MPIEXEC_EXECUTABLE ${MPIEXEC})\n  endif()\n\nelse()\n  # Disable MPI via config.h\n  set(STUBOUTMPI 1)\nendif()\n"
  },
  {
    "path": "external/papi.cmake",
    "content": "if(ENABLE_PAPI)\n  \n  find_package(Papi REQUIRED)\n      \n  # Set the output variables\n  set(HAVE_PAPI 1)\n\nendif()\n"
  },
  {
    "path": "external/parsec.cmake",
    "content": "if(ENABLE_PARSEC)\n  include(${PROJECT_SOURCE_DIR}/cmake/modules/FindOrFetchPARSEC.cmake)\n\n  if(TARGET PaRSEC::parsec)\n    set(HAVE_PARSEC 1)\n  else()\n    message(FATAL_ERROR \"PaRSEC found but PaRSEC::parsec target not provided; using legacy PaRSEC build?\")\n  endif()\nendif()\n\n# if target PaRSEC::parsec is an ALIAS to parsec, we are using parsec as a subproject, need to add parsec to export sets for all dependent targets\nmacro(add_subproject_parsec_target_to_export_set _export_set _component)\n\n  if (TARGET PaRSEC::parsec AND TARGET parsec)\n    get_property(_parsecparsec_aliased_target_is_set TARGET PaRSEC::parsec PROPERTY ALIASED_TARGET SET)\n    if (_parsecparsec_aliased_target_is_set)  # PaRSEC::parsec is an ALIAS target ... probably to parsec, but check\n      get_property(_parsecparsec_aliased_target TARGET PaRSEC::parsec PROPERTY ALIASED_TARGET)\n      if (NOT (_parsecparsec_aliased_target STREQUAL parsec) )\n        message(FATAL_ERROR \"TARGET \\\"PaRSEC::parsec\\\" is an alias, but is aliased to target other than \\\"parsec\\\"\")\n      endif()\n\n      install(TARGETS parsec EXPORT \"${_export_set}\"\n          COMPONENT \"${_component}\"\n          LIBRARY DESTINATION \"${MADNESS_INSTALL_LIBDIR}\"\n          ARCHIVE DESTINATION \"${MADNESS_INSTALL_LIBDIR}\"\n          INCLUDES DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}\")\n\n    endif()\n  endif()\n\nendmacro()\n"
  },
  {
    "path": "external/pcm.cmake",
    "content": "if(ENABLE_PCM)\n\n  find_package(PCM COMPONENTS pcm)\n    \n  # Set the output variables\n  if(PCM_FOUND)\n    set(MADNESS_HAS_PCM 1)\n  endif()\n      \nendif()\n"
  },
  {
    "path": "external/pthread.cmake",
    "content": "# Find Threads\nif (NOT TARGET Threads::Threads)\n  set(CMAKE_THREAD_PREFER_PTHREAD TRUE)\n  find_package(Threads REQUIRED)\nendif()\n"
  },
  {
    "path": "external/pybind11.cmake",
    "content": "if(ENABLE_PYTHON)\n\n  find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)\n  find_package(pybind11 2.11 CONFIG)\n\n  if(NOT pybind11_FOUND)\n    message(STATUS \"pybind11 not found via CONFIG, trying FetchContent...\")\n    include(FetchContent)\n    FetchContent_Declare(\n      pybind11\n      GIT_REPOSITORY https://github.com/pybind/pybind11.git\n      GIT_TAG        v2.13.6\n    )\n    FetchContent_MakeAvailable(pybind11)\n  endif()\n\n  if(TARGET pybind11::module)\n    set(MADNESS_HAS_PYTHON 1)\n    message(STATUS \"Python bindings enabled (pybind11 ${pybind11_VERSION})\")\n  else()\n    message(WARNING \"pybind11 targets not available, Python bindings disabled\")\n  endif()\n\nendif()\n"
  },
  {
    "path": "external/tbb.cmake",
    "content": "if (ENABLE_TBB)\n  find_package(TBB 4.3.5)\n\n  if (TBB_FOUND AND TARGET TBB::tbb)\n    set(HAVE_INTEL_TBB 1)\n    message(STATUS \"Found TBB: TBB_CONFIG=${TBB_CONFIG}\")\n  endif ()\n\n  # if user set MADNESS_EXPLOIT_TBB_PRIORITY to ON:\n  # check if task priorities are supported (albeit deprecated) and whether they need macro __TBB_TASK_PRIORITY to be defined\n  if (MADNESS_EXPLOIT_TBB_PRIORITY)\n    cmake_push_check_state()\n    set(CMAKE_REQUIRED_INCLUDES ${TBB_INCLUDE_DIRS})\n    if (TBB_USE_DEBUG AND TBB_LIBRARIES_DEBUG)\n      list(APPEND CMAKE_REQUIRED_DEFINITIONS \"${TBB_COMPILE_FLAGS_DEBUG}\")\n      set(CMAKE_REQUIRED_LIBRARIES ${TBB_LIBRARIES_DEBUG})\n    else ()\n      set(CMAKE_REQUIRED_LIBRARIES ${TBB_LIBRARIES_RELEASE})\n    endif ()\n    set(_tbb_task_priority_compile_check_source \"\n#include <tbb/task.h>\nint main(int argc, char** argv) {\ntbb::task* t;\ntbb::task::enqueue(*t, tbb::priority_high);\n}\n\")\n\n    check_cxx_source_compiles(\"${_tbb_task_priority_compile_check_source}\" MADNESS_CAN_USE_TBB_PRIORITY)\n    if (MADNESS_CAN_USE_TBB_PRIORITY)\n      set(MADNESS_CAN_USE_TBB_PRIORITY TRUE CACHE BOOL \"Whether MADNESS can control TBB task priorities\" FORCE)\n    else (MADNESS_CAN_USE_TBB_PRIORITY)\n      list(APPEND CMAKE_REQUIRED_DEFINITIONS \"-D__TBB_TASK_PRIORITY=1\")\n      check_cxx_source_compiles(\"${_tbb_task_priority_compile_check_source}\" MADNESS_CAN_USE_TBB_PRIORITY_IF_MACROED_ON)\n      if (MADNESS_CAN_USE_TBB_PRIORITY_IF_MACROED_ON)\n        set(MADNESS_CAN_USE_TBB_PRIORITY TRUE CACHE BOOL \"Whether MADNESS can control TBB task priorities\" FORCE)\n        list(APPEND TBB_COMPILE_FLAGS \"-D__TBB_TASK_PRIORITY=1\")\n      endif (MADNESS_CAN_USE_TBB_PRIORITY_IF_MACROED_ON)\n    endif (MADNESS_CAN_USE_TBB_PRIORITY)\n    if (MADNESS_CAN_USE_TBB_PRIORITY)\n      message(STATUS \"TBB task priorities will be enabled\")\n    endif (MADNESS_CAN_USE_TBB_PRIORITY)\n\n    cmake_pop_check_state()\n  endif (MADNESS_EXPLOIT_TBB_PRIORITY)\n\n\nendif ()"
  },
  {
    "path": "external/versions.cmake",
    "content": "set(MADNESS_TRACKED_PARSEC_TAG 064918a398327371789999591c224aff3df8077b)\n"
  },
  {
    "path": "src/CMakeLists.txt",
    "content": "# src\n\nadd_subdirectory(madness)\nif(NOT (MADNESS_BUILD_MADWORLD_ONLY OR MADNESS_BUILD_LIBRARIES_ONLY) AND LAPACK_FOUND)\n\tadd_subdirectory(apps)\n\tadd_subdirectory(examples)\nendif()\nif(MADNESS_HAS_PYTHON)\n\tadd_subdirectory(pymadness)\nendif()\ninstall(FILES madness.h\n    \tDESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}\"\n    \tCOMPONENT madness)\n\ninstall(FILES madchem.h\n\t\tDESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}\"\n\t\tCOMPONENT chem)\n"
  },
  {
    "path": "src/apps/CMakeLists.txt",
    "content": "# src/apps\n\ninclude_directories(${CMAKE_CURRENT_SOURCE_DIR})\n\nadd_subdirectory(plot)\nadd_subdirectory(tdse)\nadd_subdirectory(moldft)\n#add_subdirectory(molresponse)\nadd_subdirectory(molresponse_v2)\nadd_subdirectory(madqc_v2)\nadd_subdirectory(pno)\nadd_subdirectory(nemo)\nadd_subdirectory(cis)\nadd_subdirectory(dirac)\nadd_subdirectory(mp2)\nadd_subdirectory(cc2)\nadd_subdirectory(oep)\nadd_subdirectory(znemo)\nadd_subdirectory(zcis)\n#add_subdirectory(hf)\n#add_subdirectory(interior_bc)\n"
  },
  {
    "path": "src/apps/QCSchema_json.md",
    "content": "# QCSchema Json\n\nIntegration of Madness into QCArchive requires to ability to translate data\ngenerated by Madness into a standard quantum chemistry variable defined in \n`QCSchema`.  Within QCEngine, the madness `harvester.py` code is responible \nfor reading in madness output files and harvesting relevant output data.  \nThis is done using the `regex` python api which pattern matches.  \n\n`json.hpp` is included to allow applications to write json files with\nrelevant Quantum Chemistry data.  The ultimate goal is to be able\nto generate data requested by QCArchive according to the `QCSchema` as\nexplained (QCSchema)['https://molssi-qc-schema.readthedocs.io/en/latest/auto_props.html'].\n\nThis ways we generate `json` output files that can easily be read within \nQCA.  \n\n\n## Calculation Information \n\n`calc_info.json`\n\nA list of fields that involve basic information of the requested computation.\n\n- `calcinfo_nbasis`\tThe number of basis functions for the computation.\tnumber\n    - Not relevant in MADNESS\n- `calcinfo_nmo`\tThe number of molecular orbitals for the computation.\tnumber\n    - MOLDFT nmo_alpha + nmo_beta ... derived\n- `calcinfo_nalpha`\tThe number of alpha electrons in the computation.\tnumber\n    - nalpha\n- `calcinfo_nbeta`\tThe number of beta electrons in the computation.\tnumber\n    - nbeta\n- `calcinfo_natom`\tThe number of atoms in the computation.\tnumber\n    - molecule .size\n- `return_energy`\tThe energy of the requested method, identical to return_value for energy computations.\tnumber\n\n## Self-Consistent Field Information\n\nA list of fields added at the SCF level.  (HF and DFT)\n\n`scf_info.json`\n\n- scf_one_electron_energy\tThe one-electron (core Hamiltonian) energy contribution to the total SCF energy.\tnumber\n- scf_two_electron_energy\tThe two-electron energy contribution to the total SCF energy.\tnumber\n- nuclear_repulsion_energy\tThe nuclear repulsion energy contribution to the total SCF energy.\tnumber\n- scf_vv10_energy\tThe VV10 functional energy contribution to the total SCF energy.\tnumber\n- scf_xc_energy\tThe functional energy contribution to the total SCF energy.\tnumber\n- scf_dispersion_correction_energy\tThe dispersion correction appended to an underlying functional when a DFT-D method is requested.\tnumber\n- scf_dipole_moment\tThe X, Y, and Z dipole components.\tarray[number]\n- scf_total_energy\tThe total electronic energy of the SCF stage of the calculation. This is represented as the sum of the … quantities.\tnumber\n- scf_iterations\n\n## Wavefunction Schema\n\nA list of valid quantum chemistry wavefunction properties tracked byu the schema.  \nMatrices are in column-major order. AO basis functions are ordered according to the CCA standard as implemented in libint.\n\n\n\n\n"
  },
  {
    "path": "src/apps/cc2/CMakeLists.txt",
    "content": "# src/apps/cc2\n\nadd_mad_executable(cc2 cc2.cc \"MADchem\")\nadd_dependencies(applications-madness cc2)\n\n#if (ENABLE_GENTENSOR AND BUILD_TESTING)\n#  add_scripted_tests(../madqc_v2/test_callable.py cc2 \"short;applications\") # runs he with one frozen orbital..\n#endif()\n\ninstall(TARGETS cc2 DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/cc2/cc2.cc",
    "content": "/*\n * cc2.cc\n *\n *  Created on: Aug 10, 2015\n *      Author: kottmanj\n */\n/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n */\n\n#include \"madness/chem/CC2.h\"\n#include \"madness/misc/info.h\"\n\nusing namespace madness;\n\n#ifdef USE_GENTENSOR\n\nint main(int argc, char **argv) {\n\n    World& world=initialize(argc, argv);\n\n    if (world.rank() == 0) {\n        print_header1(\"CC2: Coupled Cluster approximate Doubles\");\n        printf(\"starting at time %.1f\\n\", wall_time());\n    }\n\n    printf_msg_energy_time(\"message %8.4f %3.2fs\",0.0,wall_time());\n\n    startup(world, argc, argv,true);\n    std::cout.precision(6);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    if (world.rank()==0) print(info::print_revision_information());\n\n    // set the tensor type\n    TensorType tt = TT_2D;\n    FunctionDefaults<6>::set_tensor_type(tt);\n//    FunctionDefaults<6>::set_apply_randomize(true);\n\n    commandlineparser parser(argc, argv);\n    if (parser.key_exists(\"help\")) {\n        CC2::help();\n\n    } else if (parser.key_exists(\"print_parameters\")) {\n        CC2::print_parameters();\n\n    } else {\n\n        std::shared_ptr<Nemo> nemo(new Nemo(world, parser));\n        nemo->get_calc()->param.set_derived_value(\"print_level\", 2);\n        nemo->get_calc()->param.set_derived_value(\"k\", 5);\n        nemo->get_calc()->param.set_derived_values(nemo->molecule());\n        CC2 cc2(world, parser, nemo);\n\n        std::shared_ptr<SCF> calc = nemo->get_calc();\n        if (world.rank() == 0) {\n            print(\"\\n\");\n            cc2.parameters.print(\"cc2\",\"end\");\n            print(\"\\n\");\n            calc->param.print(\"dft\",\"end\");\n            print(\"\\n\");\n            cc2.tdhf->get_parameters().print(\"response\",\"end\");\n            print(\"\\n\");\n            nemo->molecule().print();\n        }\n        double hf_energy = nemo->value();\n        try {\n            cc2.solve();\n        } catch (std::exception& e) {\n            print(\"Caught exception: \", e.what());\n        }\n\n        if (world.rank() == 0) printf(\"\\nfinished at time %.1fs\\n\\n\", wall_time());\n        world.gop.fence();\n    }\n    finalize();\n\n    return 0;\n}// end main\n\n#else\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    if(world.rank() == 0) {\n\n        print(\"\\nYou can't run cc2 because you have configured MADNESS \");\n        print(\"without the --enable-gentensor flag\");\n        print(\"You need to reconfigure and recompile\\n\");\n\n    }\n    world.gop.fence();\n    finalize();\n\n    return 0;\n\n}\n#endif\n\n\n\n\n\n"
  },
  {
    "path": "src/apps/cis/CMakeLists.txt",
    "content": "# src/apps/cis\n\nadd_mad_executable(cis cis.cpp \"MADchem\")\nadd_dependencies(applications-madness cis)\n\nif(BUILD_TESTING)\n#  add_scripted_tests(../madqc_v2/test_callable.py cis \"short;applications\")\n#  add_scripted_tests(../madqc_v2/test_energy_he.py cis \"medium;applications\")\n#  add_scripted_tests(../madqc_v2/test_symmetry_h2o.py cis \"long;applications\")\nendif()\n\ninstall(TARGETS cis DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/cis/cis.cpp",
    "content": "/*\n * cis.cpp\n *\n *  Created on: Aug 10, 2015\n *      Author: Jakob S. Kottmann\n */\n\n#include <madness/chem/TDHF.h>\n#include <madness/mra/commandlineparser.h>\n#include <madness/misc/info.h>\n#include <madness/world/worldmem.h>\n\nusing namespace madness;\n\n\nint main(int argc, char **argv) {\n    int error = 0;\n    World& world = initialize(argc, argv);\n    try {\n        if (world.rank() == 0) {\n            print_header1(\"CIS -- compute DFT and Hartree-Fock excited states in CIS/TDA approximation\");\n        }\n\n        //const double time_start = wall_time();\n        std::cout.precision(6);\n\n        startup(world, argc, argv, true);\n        if (world.rank()==0) print(info::print_revision_information());\n\n        printf(\"starting at time %.1f\\n\", wall_time());\n        print_meminfo(world.rank(), \"startup\");\n\n        if (world.rank() == 0) {\n            std::cout << \"\\n\\n\";\n            std::cout << \"-------------------------------------------------------------------------------------\\n\";\n            std::cout << \"SOLVING MRA-CIS as described in \\n\";\n            std::cout << \"J.S. Kottmann, S. Höfener ,F.A. Bischoff\\n\";\n            std::cout\n                    << \"Numerically accurate linear response-properties in the configuration-interaction singles (CIS) approximation \\n\";\n            std::cout << \"Phys. Chem. Chem. Phys., 2015, 17, 31453-31462\\n\";\n            std::cout << \"DOI: 10.1039/C5CP00345H\\n\";\n            std::cout << \"-------------------------------------------------------------------------------------\\n\";\n            std::cout << \"\\n\\n\";\n        }\n\n        commandlineparser parser(argc, argv);\n        parser.print_map();\n\n        if (parser.key_exists(\"help\")) {\n            TDHF::help();\n\n        } else if (parser.key_exists(\"print_parameters\")) {\n            TDHF::print_parameters();\n\n        } else if (parser.key_exists(\"test\")) {\n            print(\"entering test mode\");\n            error = TDHF::test(world, parser);\n\n        } else {\n\n            auto nemo=std::make_shared<Nemo>(world, parser);\n            TDHF tdhf(world, parser, nemo);\n\n            print_header2(\"input section\");\n            if (world.rank() == 0) {\n                tdhf.get_calcparam().print(\"dft\",\"end\");\n                print(\"\");\n                tdhf.get_parameters().print(\"response\",\"end\");\n                tdhf.get_calc()->molecule.print();\n            }\n\n            // solve the CIS equations\n            const double time_scf_start = wall_time();\n            nemo->value();\n            tdhf.prepare_calculation();\n            const double time_scf_end = wall_time();\n            if (world.rank() == 0) printf(\" at time %.1f\\n\", wall_time());\n\n            const double time_cis_start = wall_time();\n            std::vector<CC_vecfunction> roots = tdhf.solve_cis();\n            const double time_cis_end = wall_time();\n            if (world.rank() == 0) printf(\" at time %.1f\\n\", wall_time());\n\n            if (world.rank() == 0) {\n                std::cout << std::setfill(' ');\n                std::cout << \"\\n\\n\\n\";\n                std::cout << \"--------------------------------------------------\\n\";\n                std::cout << \"MRA-CIS ended \\n\";\n                std::cout << \"--------------------------------------------------\\n\";\n                std::cout << std::setw(25) << \"time scf\" << \" = \" << time_scf_end - time_scf_start << \"\\n\";\n                std::cout << std::setw(25) << \"time cis\" << \" = \" << time_cis_end - time_cis_start << \"\\n\";\n                std::cout << \"--------------------------------------------------\\n\";\n            }\n            tdhf.analyze(roots);\n        }\n        world.gop.fence();\n        if (world.rank() == 0) printf(\"finished at time %.1f\\n\", wall_time());\n        print_stats(world);\n    } catch (std::exception& e) {\n        print(\"an exception occurred\");\n        print(e.what());\n    } catch (...) {\n        print(\"an unknown exception occurred\");\n    }\n    finalize();\n    return error;\n}\n\n\n\n"
  },
  {
    "path": "src/apps/cis/input",
    "content": "plot\nend\n\ndft\nno_compute true\nxc hf\nL 30\neconv 1.e-4\ndconv 3.e-4\nk 7\nend\n\nnemo\nncf (none,1.0)\nend\n\nresponse\nfreeze 0\nexcitations 2\nend\n\nmolecule\nhe 0.0 0.0 0.0\nend\n\n~     \n"
  },
  {
    "path": "src/apps/dirac/CMakeLists.txt",
    "content": "# src/apps/dirac\n\nadd_mad_executable(DFdriver \"DFdriver.cc;DF.cc;fcwf.cc\" MADchem)\n\n#target_link_libraries(DFdriver MADchem MADmra)\n\nadd_dependencies(applications-madness DFdriver)\n\ninstall(TARGETS DFdriver DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n\n\n#add_executable(rk rk.cc)\n#target_link_libraries(rk MADchem MADmra -lgmp -lmpfr)\n\n"
  },
  {
    "path": "src/apps/dirac/DF.cc",
    "content": "/*\n *\n *   Written by: bsundahl and jscanderson\n *   Date: A long time ago...\n *\n * TODO:\n *  - Reading input from NWChem needs to be updated for the spin-restricted version of the code\n *  - Try setting truncate mode to 0 just for the final calculation of the energy \n *  - \n *\n */ \n\n#include \"DF.h\"\n//#include \"Plot_VTK.h\"\n#include \"fcwf.h\"\n#include <madness/chem/potentialmanager.h>\n\nusing namespace madness;\n\n//Just a function for f(x,y,z) = x\ndouble myxfunc(const madness::coord_3d& r){\n     return r[0];\n}\n\n//Just a function for f(x,y,z) = y\ndouble myyfunc(const madness::coord_3d& r){\n     return r[1];\n}\n\n// A function that constructs a cost tree, which is a heuristic used for load balancing\ntemplate <typename T, int NDIM>\nstruct lbcost {\n    double leaf_value;\n    double parent_value;\n    lbcost(double leaf_value=1.0, double parent_value=0.0) : leaf_value(leaf_value), parent_value(parent_value) {}\n    double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n        if (key.level() < 1) {\n            return 100.0*(leaf_value+parent_value);\n        }\n        else if (node.is_leaf()) {\n            return leaf_value;\n        }\n        else {\n            return parent_value;\n        }\n    }\n};\n\n// Pulled from SCF.cc, starts a timer\nvoid DF::start_timer(World& world)\n{\n   world.gop.fence();\n   ttt.push_back(wall_time());\n   sss.push_back(cpu_time());\n}\n\n// Used by end_timer\ndouble DF::pop(std::vector<double>& v)\n{\n   double x = v.back();\n   v.pop_back();\n   return x;\n}\n\n// Stops a timer\nTensor<double> DF::end_timer(World& world)\n{\n   Tensor<double> times(2);\n   times[0] = wall_time() - pop(ttt);\n   times[1] = cpu_time() - pop(sss);\n   return times;\n}\n\n//reports back with time spent in calculation so far (current time - the first time in ttt,sss)\nTensor<double> DF::get_times(World& world){\n     Tensor<double> times(2);\n     times[0] = wall_time() - ttt[0];\n     times[1] = cpu_time() - sss[0];\n     return times;\n}\n\n//Changes a real function to a complex function\ntemplate <typename Q, int NDIM>\nstruct function_real2complex_op\n{\n  typedef std::complex<Q> resultT;\n  Tensor<resultT> operator()(const Key<NDIM>& key, const Tensor<Q>& t) const\n  {\n    Tensor<resultT> result(t.ndim(), t.dims());\n    BINARY_OPTIMIZED_ITERATOR(const Q, t, resultT, result, *_p1 = resultT(*_p0,0.0););\n    return result;\n  }\n  template <typename Archive>\n  void serialize(Archive& ar) {}\n};\n\nFunction<std::complex<double>,3> function_real2complex(const Function<double,3>& r)\n{\n  return unary_op_coeffs(r, function_real2complex_op<double,3>());\n}\n\n/// Factory function generating operator for convolution with grad(bsh) in 3D\n/// Returns a 3-vector containing the convolution operator for the\n/// x, y, and z components of grad(bsh)\n//Mostly copied from a function written by W. Scott Thornton\nstatic\ninline\nstd::vector< std::shared_ptr< SeparatedConvolution<double,3> > >\nGradBSHOperator_Joel(World& world,\n                    double mu,\n                    double lo,\n                    double eps,\n                    const BoundaryConditions<3>& bc=FunctionDefaults<3>::get_bc(),\n                    int k=FunctionDefaults<3>::get_k())\n{\n    typedef SeparatedConvolution<double,3> real_convolution_3d;\n    typedef std::shared_ptr<real_convolution_3d> real_convolution_3d_ptr;\n    const double pi = constants::pi;\n    const Tensor<double> width = FunctionDefaults<3>::get_cell_width();\n    double hi = width.normf(); // Diagonal width of cell\n    const bool isperiodicsum = (bc(0,0)==BC_PERIODIC);\n    if (isperiodicsum) hi *= 100; // Extend range for periodic summation\n\n    GFit<double,3> fit=GFit<double,3>::BSHFit(mu,lo,hi,eps,false);\n    Tensor<double> coeff=fit.coeffs();\n    Tensor<double> expnt=fit.exponents();\n\n     // Stuff that Joel added\n     // Go through coeff and expnt and lump together terms with higher exponents than we want to use\n     // --------------------------------------------------------------------------------------------\n\n     // First, select how large of an exponent we're going to keep\n     double max_expnt = 10000.0; //Just taking a stab at this for now\n\n     // Then need to truncate coeff and expnt into new Tensors\n    int rank = coeff.dim(0);\n    double Cdelta = 0.0;\n    //double max_kept;\n    int max_j=0;\n    for(int j = 0; j < rank; j++){\n         if(expnt[j] > max_expnt){\n               Cdelta += coeff[j]*std::pow(constants::pi/expnt[j],1.5);\n         }\n         else{\n\t   //max_kept = expnt[j];\n               max_j = j;\n               break;\n         } \n    }\n     coeff = coeff(Slice(max_j,-1));\n     expnt = expnt(Slice(max_j,-1));\n\n     // Then calculate what the new coefficient needs to be out front\n     coeff[0] = coeff[0] + Cdelta * std::pow(expnt[0]/constants::pi,1.5); \n\n     //reset rank because we use it below\n     rank = coeff.dim(0);\n     //----------------------------------------------------------------------------------------------\n\n    if (bc(0,0) == BC_PERIODIC) {\n        fit.truncate_periodic_expansion(coeff, expnt, width.max(), true);\n    }\n\n    std::vector<real_convolution_3d_ptr> gradG(3);\n\n    for (int dir=0; dir<3; dir++) {\n        std::vector< ConvolutionND<double,3> > ops(rank);\n        for (int mu=0; mu<rank; mu++) {\n            // We cache the normalized operator so the factor is the value we must multiply\n            // by to recover the coeff we want.\n            double c = std::pow(sqrt(expnt(mu)/pi),3); // Normalization coeff\n            ops[mu].setfac(coeff(mu)/c/width[dir]);\n\n            for (int d=0; d<3; d++) {\n                if (d != dir)\n                    ops[mu].setop(d,GaussianConvolution1DCache<double>::get(k, expnt(mu)*width[d]*width[d], 0, LatticeRange(isperiodicsum)));\n            }\n            ops[mu].setop(dir,GaussianConvolution1DCache<double>::get(k, expnt(mu)*width[dir]*width[dir], 1, LatticeRange(isperiodicsum)));\n        }\n        gradG[dir] = real_convolution_3d_ptr(new SeparatedConvolution<double,3>(world, ops));\n    }\n\n    return gradG;\n}\n\n\n//Stolen from SCF.cc to aid in orthonormalization. Used in orthogonalize_inplace.\nTensor<std::complex<double>> Q2(const Tensor<std::complex<double>>& s) {\n    Tensor<std::complex<double>> Q = -0.5*s;\n    for (int i=0; i<s.dim(0); ++i) Q(i,i) += 1.5;\n    return Q;\n}\n\n//generic f(r)=||r|| function for calculation of the radial expectation value\ndouble myr(const coord_3d& r){\n     return std::sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);\n}\n\n//Creates the fermi nuclear potential from the charge distribution. Also calculates the nuclear repulsion energy\nvoid DF::make_fermi_potential(World& world, real_convolution_3d& op, real_function_3d& potential, double& nuclear_repulsion_energy){\n     if(world.rank()==0) print(\"\\n***Making a Fermi Potential***\");\n     \n     //Get list of atom coordinates\n     auto molecule = Init_params.molecule;\n\n     //variables for upcoming loop\n     real_function_3d temp;\n     double tempnorm;\n     potential = madness::real_factory_3d(world);\n\n     //Go through the atoms in the molecule and construct the total charge distribution due to all nuclei\n     const double safety = 0.1;\n     double vtol = madness::FunctionDefaults<3>::get_thresh() * safety;\n     for(auto&& atom : molecule.get_atoms()){\n          madness::FermiNuclearDensityFunctor rho(atom);\n          temp = real_factory_3d(world).functor(rho).thresh(vtol);\n          tempnorm = temp.trace();\n          temp.scale(-1. * atom.atomic_number / tempnorm);\n          potential += temp;\n     }\n\n     //Potential is found by application of the coulomb operator to the charge distribution\n     potential = apply(op,potential);\n\n     //Calculate the nuclear repulsion energy\n     //It doesn't change iteration to iteration, so we want to calculate it once and store the result\n     //We calculate it inside this function because here we already have access to the nuclear charges and coordinates\n     nuclear_repulsion_energy = 0.0;\n     double rr;\n     for(unsigned int m = 0; m < molecule.natom(); m++){\n          auto& atom_m = molecule.get_atom(m);\n          for(unsigned int n = m+1; n < molecule.natom(); n++){\n               auto& atom_n = molecule.get_atom(n);\n               coord_3d dist = atom_m.get_coords() - atom_n.get_coords();\n               rr = std::sqrt(dist[0]*dist[0]+dist[1]*dist[1]+dist[2]*dist[2]);\n               nuclear_repulsion_energy += atom_m.atomic_number * atom_n.atomic_number / rr;\n          }\n     }\n\n}\n\n// Collective constructor\n// Design of this was mostly taken from Bryan Sundahl's response code\nDF::DF(World & world, const char* filename) : DF(world, (world.rank() == 0 ? std::make_shared<std::ifstream>(filename) : nullptr))\n{}\n\n// Constructor that actually does stuff\n// Design of this was mostly taken from Bryan Sundahl's response code\nDF::DF(World & world,std::shared_ptr<std::istream> input) {\n     // Start a timer\n     start_timer(world);\n\n     // Try and open input file\n     if(world.rank() == 0){\n          if (input->fail()) MADNESS_EXCEPTION(\"Dirac Fock failed to open input stream\", 0);\n   \n          // Welcome user \n          print(\"\\n   Preparing to solve the Dirac-Hartree-Fock equations.\\n\"); \n\n          // Read input files\n          DFparams.read(*input);\n\n          // Print out what was read in\n          DFparams.print_params();\n     }\n\n     // Broadcast to all other nodes\n     world.gop.broadcast_serializable(DFparams, 0);\n\n     // Read in archive, but first find out if we're reading an nwchem file or other archive\n     if(DFparams.nwchem){\n          Init_params.readnw(world, DFparams.archive, DFparams.Krestricted);\n     }\n     else{\n          Init_params.read(world, DFparams.archive, DFparams.restart, DFparams.Krestricted);\n     }\n\n     //print initialization parameters and molecule geometry\n     if(world.rank() == 0){\n          Init_params.print_params();\n          print_molecule(world);\n     }   \n\n     // Set some function defaults   \n     FunctionDefaults<3>::set_thresh(DFparams.thresh); //Always use user-specified thresh\n\n     //Truncate mode 0 is preferrable, but currently way too expensive for relativistic calculations, so for now use 1\n     FunctionDefaults<3>::set_truncate_mode(0);   \n\n     //If user requests different k, then project functions\n     if(DFparams.k != Init_params.order){\n\n          //set function default\n          FunctionDefaults<3>::set_k(DFparams.k);\n\n          //Loop over orbitals\n          for(unsigned int i = 0; i < Init_params.num_occupied; i++){\n\n               //Look over 4 components of orbitals\n               for(unsigned int j = 0; j < 4; j++){\n\n                    //project\n                    Init_params.orbitals[i][j] = project(Init_params.orbitals[i][j], FunctionDefaults<3>::get_k(), DFparams.thresh, false);\n               }\n\n               //fence and truncate\n               world.gop.fence();\n               Init_params.orbitals[i].truncate();\n          }\n     }\n\n     //Set local orbitals and energies to those from the archive\n     energies = Init_params.energies;\n     occupieds = Init_params.orbitals;\n     total_energy = Init_params.Init_total_energy;\n     //If nonrelativistic calculation was spinrestricted then we're doing a closed shell calculation \n     //This is a little incorrect, as we're equating two separate concepts, but it works for now.\n     closed_shell = Init_params.closed_shell;\n\n     Tensor<double> times = end_timer(world);\n     if(world.rank()==0) print(\"Preparation complete: \", times[0]);\n\n}\n\n//returns a new Fcwf that is the result of applying the Dirac free-particle hamiltonian on psi\nFcwf apply_T(World& world, Fcwf& psi){\n     double myc = 137.0359895; //speed of light in atomic units\n     std::complex<double> myi(0,1);\n     complex_derivative_3d Dx(world,0);\n     complex_derivative_3d Dy(world,1);\n     complex_derivative_3d Dz(world,2);\n     Fcwf Tpsi(world);\n     \n     //reconstruct psi\n     psi.reconstruct();\n\n     //take derivatives\n     Fcwf psix = apply(world,Dx,psi); \n     Fcwf psiy = apply(world,Dy,psi);\n     Fcwf psiz = apply(world,Dz,psi); \n\n     //compress\n     psix.compress();\n     psiy.compress();\n     psiz.compress();\n     psi.compress();\n\n     //combine to calculate application of T\n     Tpsi[0] = psiz[2] + psix[3] - myi*psiy[3];\n     Tpsi[1] = psix[2] + myi*psiy[2] - psiz[3];\n     Tpsi[2] = (myc*myc)*(psiz[0] + psix[1] - myi*psiy[1] - (2.0*myi)*psi[2]);\n     Tpsi[3] = (myc*myc)*(psix[0] + myi*psiy[0] - psiz[1] - (2.0*myi)*psi[3]);\n\n     return Tpsi * (-myi);\n}\n\n//function to calculate the kinetic + rest energy expectation value using Dirac Hamiltonian c*\\alpha*p+\\Beta*m*c*c\ndouble DF::rele(World& world, Fcwf& psi){\n     Fcwf Tpsi = apply_T(world, psi);\n     std::complex<double> energy  = inner(psi, Tpsi);\n     return energy.real();\n}\n\n//Calculates K*psi for each psi in the orbitals vector and stores them in result\nvoid DF::exchange(World& world, real_convolution_3d& op, std::vector<Fcwf>& Kpsis){\n\n     //start timer\n     start_timer(world);\n\n     //zero out Kpsis\n     for(unsigned int i = 0; i < Init_params.num_occupied; i++){\n          Kpsis[i] = Fcwf(world);\n     }\n\n     //reconstruct\n     for(unsigned int i = 0; i < Init_params.num_occupied; i++){\n          occupieds[i].reconstruct();\n     }\n\n     //Calculate and accumulate exchange contributions\n     unsigned int n = Init_params.num_occupied;\n     double myc = 137.0359895; //speed of light in atomic units\n\n     //Calculates exchange contributions from the orbitals that we have stored\n     //Loop through orbitals phi_i, computing K(phi_i), and while we're at it, use symmetry to start calculating contributions to later orbitals\n     for(unsigned int i = 0; i < n; i++){\n\n          //temp will hold the contributions (results of the coulomb operator application) that we need to finish calculation of K(phi_i)\n          //For the first iteration, we need all n \"contributions,\" so temp has length n, but this will decrease by 1 each iteration\n          std::vector<complex_function_3d> temp(n-i);\n          for(unsigned int j = 0; j < n-i; j++){\n               temp[j] = complex_factory_3d(world);    \n          }\n          compress(world, temp);\n\n          //break up ith through nth orbitals into their components to facilitate use of vmra functions\n          std::vector<complex_function_3d> temp0(n-i);\n          std::vector<complex_function_3d> temp1(n-i);\n          std::vector<complex_function_3d> temp2(n-i);\n          std::vector<complex_function_3d> temp3(n-i);\n          for(unsigned int j = i; j < n; j++){\n               temp0[j-i] = occupieds[j][0];\n               temp1[j-i] = occupieds[j][1];\n               temp2[j-i] = occupieds[j][2];\n               temp3[j-i] = occupieds[j][3];\n          }\n\n          //These gaxpy calls accomplish the (\\phi_j^\\dagger)(\\phi_i) in the numerator \n          gaxpy(world, 1.0, temp, 1.0, occupieds[i][0]*conj(world,temp0));\n          gaxpy(world, 1.0, temp, 1.0, occupieds[i][1]*conj(world,temp1));\n          gaxpy(world, 1.0, temp, 1.0/(myc*myc), occupieds[i][2]*conj(world,temp2));\n          gaxpy(world, 1.0, temp, 1.0/(myc*myc), occupieds[i][3]*conj(world,temp3));\n\n          //truncate before apply phase\n          truncate(world, temp);\n\n          //apply coulomb operator\n          temp = apply(world, op, temp);\n          \n          //truncate again\n          truncate(world,temp);\n\n          //Now multiply by phi_j's and accumulate to K(phi_i)\n          Kpsis[i][0] += sum(world, mul(world, temp, temp0));\n          Kpsis[i][1] += sum(world, mul(world, temp, temp1));\n          Kpsis[i][2] += sum(world, mul(world, temp, temp2));\n          Kpsis[i][3] += sum(world, mul(world, temp, temp3));\n          \n\n          //Everything in temp can be used to accumulate a small part of K(phi_k) for k in [i+1,n] so we avoid calculating the same quantity on future iterations\n          \n          //First, take the complex conjugate of the contributions we have\n          temp = conj(world, temp);\n\n          //multiply by phi_i\n          temp0 = occupieds[i][0]*temp;\n          temp1 = occupieds[i][1]*temp;\n          temp2 = occupieds[i][2]*temp;\n          temp3 = occupieds[i][3]*temp;\n\n          //acummulate\n          for(unsigned int j = i+1; j < n; j++){\n               Kpsis[j][0] += temp0[j-i];\n               Kpsis[j][1] += temp1[j-i];\n               Kpsis[j][2] += temp2[j-i];\n               Kpsis[j][3] += temp3[j-i];\n          }\n         \n     }\n\n     //If our calculation is Kramers-restricted we need exchange contributions from the time-reversed orbitals that we don't explicitly store.\n     //This will look very similar to the above loop (over i), but with rearrangements to the temporary vectors\n     //Later, these can probably be combined into a single loop\n     \n     if(DFparams.Krestricted){\n          int num_contrib=n;\n          if(!closed_shell){\n               num_contrib = n-1;\n          }\n\n          //Loop through orbitals phi_i, computing K(phi_i), and while we're at it, use symmetry to start calculating contributions to later orbitals\n          for(int i = 0; i < num_contrib; i++){\n\n               //temp will hold the contributions (results of the coulomb operator application) that we need to finish calculation of K(phi_i)\n               //For the first iteration, we need all n \"contributions,\" so temp has length n, but this will decrease by 1 each iteration\n               std::vector<complex_function_3d> temp(num_contrib-i);\n               for(int j = 0; j < num_contrib-i; j++){\n                    temp[j] = complex_factory_3d(world);    \n               }\n               compress(world, temp);\n\n               //break up the time-reversals of the ith through nth orbitals into their components to facilitate use of vmra functions\n               std::vector<complex_function_3d> temp0(num_contrib-i);\n               std::vector<complex_function_3d> temp1(num_contrib-i);\n               std::vector<complex_function_3d> temp2(num_contrib-i);\n               std::vector<complex_function_3d> temp3(num_contrib-i);\n               for(int j = i; j < num_contrib; j++){\n                    //the next four lines accomplish the rearrangement needed to get the time reversal rather than the orbital itself, but skip the complex conjugation, which will come later\n                    temp0[j-i] = -1.0*occupieds[j][1];\n                    temp1[j-i] = occupieds[j][0];\n                    temp2[j-i] = -1.0*occupieds[j][3];\n                    temp3[j-i] = occupieds[j][2];\n               }\n\n               //These gaxpy calls accomplish the (\\phi_j^T)(\\phi_i) in the numerator. Conjugation of phi_j is left to later\n               gaxpy(world, 1.0, temp, 1.0, occupieds[i][0]*temp0);\n               gaxpy(world, 1.0, temp, 1.0, occupieds[i][1]*temp1);\n               gaxpy(world, 1.0, temp, 1.0/(myc*myc), occupieds[i][2]*temp2);\n               gaxpy(world, 1.0, temp, 1.0/(myc*myc), occupieds[i][3]*temp3);\n\n               //truncate before apply phase\n               truncate(world, temp);\n\n               //apply coulomb operator\n               temp = apply(world, op, temp);\n               \n               //truncate again\n               truncate(world,temp);\n\n               //Now multiply by phi_j's and accumulate to K(phi_i)\n               //Here is where we put the complex conjugation we've left out. This allows for one conjugation here instead of two conjugations earlier.\n               Kpsis[i][0] += sum(world, mul(world, temp, conj(world,temp0)));\n               Kpsis[i][1] += sum(world, mul(world, temp, conj(world,temp1)));\n               Kpsis[i][2] += sum(world, mul(world, temp, conj(world,temp2)));\n               Kpsis[i][3] += sum(world, mul(world, temp, conj(world,temp3)));\n               \n               //Now for the next part (accumulating the n-i \"symmetric\" contributions), we already have the complex conjugate of temp, so we can go straight to multiplication by the time-reversal of phi_i\n               temp0 = conj(occupieds[i][1])*temp;\n               temp1 = -1.0*conj(occupieds[i][0])*temp;\n               temp2 = conj(occupieds[i][3])*temp;\n               temp3 = -1.0*conj(occupieds[i][2])*temp;\n\n               //accumulate\n               for(int j = i+1; j < num_contrib; j++){\n                    Kpsis[j][0] += temp0[j-i];\n                    Kpsis[j][1] += temp1[j-i];\n                    Kpsis[j][2] += temp2[j-i];\n                    Kpsis[j][3] += temp3[j-i];\n               }\n               \n          }\n\n          //For open shell calculations need to calculate final contributions for the singly-occupied orbital\n          //This will look very similar to the two above loops\n          //Could put this as an addition to the first iteration of the loop above for more concise, though less readable code\n          if(!closed_shell){\n               std::vector<complex_function_3d> temp(n-1);\n               for(unsigned int j = 0; j < n-1; j++){\n                    temp[j] = complex_factory_3d(world);    \n               }\n               compress(world, temp);\n\n               std::vector<complex_function_3d> temp0(n-1);\n               std::vector<complex_function_3d> temp1(n-1);\n               std::vector<complex_function_3d> temp2(n-1);\n               std::vector<complex_function_3d> temp3(n-1);\n               for(unsigned int j = 0; j < n-1; j++){\n                    temp0[j] = -1.0*occupieds[j][1];\n                    temp1[j] = occupieds[j][0];\n                    temp2[j] = -1.0*occupieds[j][3];\n                    temp3[j] = occupieds[j][2];\n               }\n\n               gaxpy(world, 1.0, temp, 1.0, occupieds[n-1][0]*temp0);\n               gaxpy(world, 1.0, temp, 1.0, occupieds[n-1][1]*temp1);\n               gaxpy(world, 1.0, temp, 1.0/(myc*myc), occupieds[n-1][2]*temp2);\n               gaxpy(world, 1.0, temp, 1.0/(myc*myc), occupieds[n-1][3]*temp3);\n\n               truncate(world, temp);\n\n               temp = apply(world, op, temp);\n               \n               truncate(world,temp);\n\n               Kpsis[n-1][0] += sum(world, mul(world, temp, conj(world,temp0)));\n               Kpsis[n-1][1] += sum(world, mul(world, temp, conj(world,temp1)));\n               Kpsis[n-1][2] += sum(world, mul(world, temp, conj(world,temp2)));\n               Kpsis[n-1][3] += sum(world, mul(world, temp, conj(world,temp3)));\n               \n          }\n     }\n\n     //Truncate\n     for(unsigned int i=0; i < n; i++) Kpsis[i].truncate();\n\n     //Report time\n     Tensor<double> times = end_timer(world);\n     if(world.rank()==0) print(\"     \", times[0]);\n}\n\n//Diagonalize occupieds in the Fock space of occupieds. \n//occupieds is transformed in place.\n//This requires Kpsis to be precomputed.\n//Kpsis are transformed in place as well.\nvoid DF::diagonalize(World& world, real_function_3d& myV, real_convolution_3d& op, std::vector<Fcwf>& Kpsis){\n\n\n     if(world.rank()==0) print(\"\\n***Diagonalizing***\");\n     start_timer(world);\n\n     //Create a few integers to help keep track of loops\n     unsigned int n = Init_params.num_occupied; //number of orbitals we have stored\n     unsigned int np = closed_shell ? n : n-1; //number of PAIRS we want in computations\n     unsigned int m = DFparams.Krestricted ? n+np : n; //Size of matrix to use\n\n     //Initialize tensors and vectors to store temporary wavefunctions needed for computation\n     Tensor<std::complex<double>> fock(m, m);\n     Tensor<std::complex<double>> overlap(m, m);\n     Tensor<std::complex<double>> U(m,m);\n     Tensor<double> evals(m);\n     std::vector<Fcwf> temp_orbitals;\n     std::vector<Fcwf> kramers_pairs;\n\n     //Make a permutation matrix for use later (in the Kramers-restricted case)\n     //Fock matrix in the Kramers-restricted case is built with orbitals in the following order: \n     //\n     //stored (doubly occupied) orbitals, \n     //singly-occupied orbital (if open shell), \n     //then kramers pairs of doubly-occupied orbitals\n     //\n     //However, before diagonalization we want the fock matrix as if our orbitals were in order of increasing energy.\n     //This permutation matrix will accomplish the column and row swapping necessary to reorder\n     Tensor<double> P(m,m);\n     if(DFparams.Krestricted){\n          for(unsigned int j=0; j < np; j++){\n               P(j,2*j) = 1;\n               P(n+j,2*j+1) = 1;\n          }\n          if(!closed_shell) P(n-1,m-1) = 1;\n     }\n\n     //Also make the vector of Kramers Pairs for use later (if Kramers-restricted)\n     if(DFparams.Krestricted){\n         for(unsigned int j = 0; j < np; j++){\n               kramers_pairs.push_back(occupieds[j].KramersPair());\n          }\n     }\n     if(world.rank()==0) print(\"     Forming Matrices\");\n     start_timer(world);\n     \n     ////Form the Fock Matrix\n     //\n     //In the Kramers-unrestricted case, the Fock matrix is simply nxn (or mxm, as n=m)\n     //\n     //In the Kramers restricted case, construction of the Fock matrix is a bit more complicated:\n     //\n     //With the orbitals in the order described above, the Fock matrix can be thought of as a 2x2 block matrix.\n     //\n     //The dimensions are (using F to indicate blocks of the Fock matrix):\n     //F_11: n x n\n     //F_12: n x np\n     //F_21: np x n\n     //F_22: np x np\n     //\n     //If the system is closed shell, then n=np.\n     //\n     //To save on computation we explicity calculate F_11 and F_21, and then use these to calculate the remaining blocks\n     //\n     //We do this by first making a vector of F*psi for all psi in the orbitals we have stored\n\n     //calculate potential due to nuclei and mean field\n     if(world.rank() == 0) print(\"          Adding (V+J)psi\");\n     real_function_3d rho = real_factory_3d(world);\n     double fac = (DFparams.Krestricted ? 2.0 : 1.0);\n     for(unsigned int j = 0; j < np; j++){\n          rho += fac*squaremod(occupieds[j]);\n     }\n     if(!closed_shell) rho += squaremod(occupieds[n-1]);\n     real_function_3d potential = myV + apply(op,rho);\n     potential.truncate();\n\n     //add in coulomb parts to neworbitals\n     for(unsigned int j = 0; j < n; j++){\n          temp_orbitals.push_back(occupieds[j]*potential); //add in coulomb term\n     }\n\n     if(world.rank() == 0) print(\"          Subtracting K*psi\");\n     //Move Kpsis to new orbitals, as they are part of the fock operator\n     for(unsigned int j = 0; j < n; j++){\n          temp_orbitals[j] -= Kpsis[j]; //Must be subtracted because exchange function doesn't include the negative.\n     }\n\n     //add in T_psi\n     if(world.rank()==0) print(\"          Adding T*psi\");\n     for(unsigned int j = 0; j < n; j++){\n          temp_orbitals[j] += apply_T(world, occupieds[j]);  //add in \"kinetic\" term\n     }\n\n     //Now that we have F*psi (temp_orbitals), we can get on with integration\n     if(world.rank()==0) print(\"          Integrating to form Fock Matrix\");\n     start_timer(world);\n\n     //Now compute the fock matrix\n     Tensor<std::complex<double>> tempmatrix = matrix_inner(world, occupieds, temp_orbitals);\n     if(DFparams.Krestricted){\n          fock(Slice(0,n-1),Slice(0,n-1)) = copy(tempmatrix);\n          fock(Slice(n,m-1),Slice(n,m-1)) = conj(tempmatrix(Slice(0,np-1),Slice(0,np-1)));\n          tempmatrix = matrix_inner(world,kramers_pairs,temp_orbitals);\n          fock(Slice(n,m-1),Slice(0,n-1)) = copy(tempmatrix);\n          fock(Slice(0,n-1),Slice(n,m-1)) = conj_transpose(tempmatrix);\n     }\n     else{\n          fock = tempmatrix;\n     }\n\n     //permute and symmetrize\n     if(DFparams.Krestricted) fock = inner(transpose(P),inner(fock,P));\n     fock = (1.0/2.0)*(fock + conj_transpose(fock));\n     \n     //End timer for Fock matrix calculation\n     Tensor<double> times = end_timer(world);\n     if(world.rank()==0) print(\"               \", times[0]); \n\n\n     ////and the overlap matrix\n     if(world.rank()==0) print(\"          Integrating to form Overlap Matrix\");\n     start_timer(world);\n     if(DFparams.Krestricted){\n          overlap(Slice(0,n-1),Slice(0,n-1)) = matrix_inner(world,occupieds,occupieds);\n          overlap(Slice(0,n-1),Slice(n,m-1)) = matrix_inner(world,occupieds,kramers_pairs);\n          overlap(Slice(n,m-1),Slice(0,n-1)) = matrix_inner(world,kramers_pairs,occupieds);\n          overlap(Slice(n,m-1),Slice(n,m-1)) = matrix_inner(world,kramers_pairs,kramers_pairs);\n     }\n     else{\n          overlap = matrix_inner(world,occupieds,occupieds);\n     }\n\n     //permute and symmetrize\n     if(DFparams.Krestricted) overlap = inner(transpose(P),inner(overlap,P));\n     overlap = (1.0/2.0)*(overlap + conj_transpose(overlap));\n\n     //End timers for overlap calculation and total matrix formation\n     times = end_timer(world);\n     if(world.rank()==0) print(\"               \", times[0]);\n     times = end_timer(world);\n     if(world.rank()==0) print(\"          \", times[0]);\n\n     //Now call eigensolver\n     if(world.rank()==0) print(\"     Eigensolver\");\n     start_timer(world);\n     sygv(fock, overlap, 1, U, evals);\n     times = end_timer(world);\n     if(world.rank()==0) print(\"          \", times[0]);\n\n     //Before applying the transformation, fix arbitrary rotations introduced by the eigensolver. \n     //This is done in three steps:\n     // 1) Column-swapping in order to obtain a diagonally dominant matrix\n     // 2) Removal of complex phases, so the diagonal is comprised of positive real numbers\n     // 3) Identification of clusters with the same eigenvalue (within some tolerance) and removal of arbitrary\n     //    rotations within the eigenspaces formed by those clusters\n     //\n     //This is largely stolen from SCF.cc, but heavily changed for FCWFs\n     if(world.rank()==0) print(\"     Removing Rotations\");\n     start_timer(world);\n\n     double thresh_degenerate = DFparams.thresh*10.0; //threshold for determining if eigenvalues are equal\n\n     //swap columns for a diagonally dominant matrix\n     bool switched = true;\n     while (switched) {\n          switched = false;\n          for (unsigned int kk = 0; kk < m; kk++) {\n               for (unsigned int j = kk + 1; j < m; j++) {\n                    double sold = std::real(U(kk,kk)*std::conj(U(kk,kk))) + std::real(U(j,j)*std::conj(U(j,j)));\n                    double snew = std::real(U(kk,j)*std::conj(U(kk,j))) + std::real(U(j,kk)*std::conj(U(j,kk)));\n                    if (snew > sold and not ((evals[j] - evals[kk]) > thresh_degenerate * std::fabs(evals[kk])) ) {\n                         if(world.rank()==0){\n                              print(\"          swapping columns \", kk+1, \" and \", j+1);\n                         }\n                         Tensor<std::complex<double>> tmp = copy(U(_, kk));\n                         U(_, kk) = U(_, j);\n                         U(_, j) = tmp;\n                         std::swap(evals[kk], evals[j]);\n                         switched = true;\n                    }\n               }\n          }\n     }\n\n     // Fix phases.\n     for (unsigned int kk = 0; kk < m; ++kk)\n          U(_, kk).scale(std::conj(U(kk,kk))/std::abs(U(kk,kk)));\n\n     //Find clusters of degenerate eigenvalues and rotate eigenvectors to maximize overlap with previous ones\n     unsigned int ilo = 0; // first element of cluster\n     if(world.rank()==0) print(\"          Degeneracy threshold: \",thresh_degenerate);\n\n     while (ilo < m - 1) {\n         unsigned int ihi = ilo;\n         while (fabs(evals[ilo] - evals[ihi + 1]) < thresh_degenerate * std::fabs(evals[ilo])){\n             ++ihi;\n             if (ihi == m - 1) break;\n         }\n         unsigned int nclus = ihi - ilo + 1; //size of the cluster\n         if (nclus > 1) {\n              if(world.rank()==0){\n                    //some printing to tell the user about the clusters found\n                    print(\"          found cluster from \", ilo + 1, \" to \" , ihi + 1);\n                    for(unsigned int kk = ilo; kk <= ihi; kk++){\n                         print(\"               \",evals[kk]);\n                    }\n              }\n\n              //Use the polar decomposition to undo rotations:\n              //For a description of how this works see Matrix Computations by Golub and Van Loan, 4th Ed., Section 6.4.1\n              Tensor<std::complex<double>> q = copy(U(Slice(ilo, ihi), Slice(ilo, ihi)));\n              Tensor<std::complex<double>> VH(nclus,nclus);\n              Tensor<std::complex<double>> W(nclus,nclus);\n              Tensor<double> sigma(nclus);\n\n              svd(q, W, sigma, VH);\n\n              //W*VH is the rotation part of q. Undo it by taking the adjoint and right-multiplying\n              q = conj_transpose(inner(W,VH));\n              U(_, Slice(ilo, ihi)) = inner(U(_, Slice(ilo, ihi)), q);\n              \n         }\n         ilo = ihi + 1;\n     }\n     times = end_timer(world);\n     if(world.rank()==0) print(\"          \", times[0]);\n\n     //Now undo permutations before the transformation phase\n     if(DFparams.Krestricted){\n          U = inner(P,inner(U,transpose(P)));\n          evals = inner(evals,transpose(P));\n     }\n\n     if(world.rank()==0) print(\"     Applying Transformation\");\n     start_timer(world);\n\n     //Apply the transformation to the orbitals by right-multiplying\n     //(if Krestricted) Because we have n orbitals but the matrix has n+np rows, this happens in two stages\n     if(DFparams.Krestricted){\n          tempmatrix = U(Slice(0,n-1),Slice(0,n-1));\n          occupieds = transform(world, occupieds, tempmatrix);\n          tempmatrix = U(Slice(n,m-1),Slice(0,n-1));\n          occupieds += transform(world, kramers_pairs, tempmatrix);\n     }\n     else{\n          occupieds = transform(world,occupieds,U);\n     }\n\n     ////Apply the transformation to the Exchange-applied functions as well\n     if(DFparams.Krestricted){\n          for(unsigned int j = 0; j < np; j++){\n               kramers_pairs[j] = Kpsis[j].KramersPair();\n          }\n          tempmatrix = U(Slice(0,n-1),Slice(0,n-1));\n          Kpsis = transform(world, Kpsis, tempmatrix);\n          tempmatrix = U(Slice(n,m-1),Slice(0,n-1));\n          Kpsis += transform(world, kramers_pairs, tempmatrix);\n     }\n     else{\n          Kpsis = transform(world,Kpsis,U);\n     }\n\n     //truncate\n     for(unsigned int kk = 0; kk < n; kk++){\n           Kpsis[kk].truncate();\n           occupieds[kk].truncate();\n     }\n\n     //Set energies = evals\n     energies = evals(Slice(0,n-1));\n\n     //End timers for this function\n     times = end_timer(world);\n     if(world.rank()==0) print(\"          \", times[0]);\n     times = end_timer(world);\n     if(world.rank()==0) print(\"     \", times[0]);\n\n}\n\n//orthogonalize occupieds in place. This function mimics a similar one from SCF.cc\nvoid DF::orthogonalize_inplace(World& world){\n\n     unsigned int n = occupieds.size();\n     double maxq;\n\n     //normalize beforehand\n     for(unsigned int i = 0; i < n; i++){\n          occupieds[i].normalize();\n     }\n\n     //Basically stolen from SCF.cc. Orthogonalization based on Taylor expansion of (overlap)^(1/2)\n     do{\n          Tensor<std::complex<double>> Q = Q2(matrix_inner(world,occupieds,occupieds));\n          maxq = 0.0;\n          for(unsigned int j=1; j<n; j++){\n               for(unsigned int i=0; i<j; i++){\n                    maxq = std::max(std::abs(Q(j,i)),maxq);\n               }\n          }\n          occupieds = transform(world, occupieds, Q);\n     } while (maxq>0.01);\n\n     //normalize afterward\n     for(unsigned int i = 0; i < n; i++){\n          occupieds[i].normalize();\n     }\n\n}\n\n//Apply's Green's function to Vpsi (a Fcwf). Overwrites Vpsi with new Fcwf\n//Use of this function has largely been replaced by apply_BSH_new, but\n//this one is kept in case one wants to avoid use of the derivative operator.\nvoid apply_BSH(World& world, Fcwf& Vpsi, double& eps, double& small, double& thresh){\n\n     //necessary constants\n     double myc = 137.0359895; //speed of light\n     double c2 = myc*myc; //speed of light squared\n     std::complex<double> myi(0,1); //imaginary number i\n     std::complex<double> ic = myi*myc; //i*c\n    \n     //calculate exponent for equivalent BSH operator\n     double mu = std::sqrt(-(2*eps*c2+eps*eps)/c2);\n\n     world.gop.fence();\n     \n     //pointer to BSH operator\n     std::shared_ptr<real_convolution_3d> op = std::shared_ptr<real_convolution_3d>(BSHOperatorPtr3D(world,mu,small,thresh)); \n\n     //vector of pointers to the gradient of the BSH operator\n     std::vector<std::shared_ptr<SeparatedConvolution<double,3>>> op3 = GradBSHOperator(world, mu, small, thresh); \n\n     //Subsitute the below line for the above one if you want to screen operator coefficients\n     //std::vector<std::shared_ptr<SeparatedConvolution<double,3>>> op3 = GradBSHOperator_Joel(world, mu, 1e-8, thresh); \n\n     //operators are copied and organized into a vector for use of vmra's more efficient functions\n     std::vector<std::shared_ptr<SeparatedConvolution<double,3>>> allops(16);\n     for(unsigned int i = 0; i < 4; i++){\n          allops[i] = op;\n          allops[4+i] = op3[0];\n          allops[8+i] = op3[1];\n          allops[12+i] = op3[2];\n     }\n\n     //create intermediate functions necessary to compute new components\n     std::vector<complex_function_3d> temp(16);\n     for(unsigned int i = 0; i < 4; i++){\n          temp[i] = Vpsi[i];\n          temp[4+i] = Vpsi[i];\n          temp[8+i] = Vpsi[i];\n          temp[12+i] = Vpsi[i];\n     }\n\n     //vector apply accomplishes all 16 necessary operator applications\n     temp = apply(world, allops, temp);\n\n     //All four components of the result fcwf can be written as a linear combination of the functions in temp now\n     //Easy way to do this is to write out a transformation tensor and then call transform\n     Tensor<std::complex<double>> U(16,4);\n     U(0,0) = 2*c2+eps; U(14,0) = -ic; U(7,0) = -ic; U(11,0) = -myc;\n     U(1,1) = 2*c2+eps; U(6,1) = -ic; U(10,1) = myc; U(15,1) = ic;\n     U(12,2) = -ic; U(5,2) = -ic; U(9,2) = -myc; U(2,2) = eps;\n     U(4,3) = -ic; U(8,3) = myc; U(13,3) = ic; U(3,3) = eps;\n     U *= (1.0/c2);\n\n     //Apply transformation tensor to temp (a vector of functions) and store back in Vpsi (a FCWF)\n     temp = transform(world, temp, U);\n     Vpsi[0] = temp[0];\n     Vpsi[1] = temp[1];\n     Vpsi[2] = temp[2];\n     Vpsi[3] = temp[3];\n\n}\n\n//This function applies the Dirac Green's function to Vpsi (a Fcwf), overwriting Vpsi with a new Fcwf.\n//\n//Instead of using the derivative of the Green's function, this version first applies the\n//nonrelativistic Green's function, then applies (H_D + eps) to the result.\n//\n//Analytically this is equivalent to apply_BSH, but faster because the application of\n//the derivative operator is faster than application of an integral operator.\n//\n//Empirically this has resulted in no decrease in accuracy, despite reliance on the \"noisier\" derivative operator\nvoid apply_BSH_new(World& world, Fcwf& Vpsi, double& eps, double& small, double& thresh){\n\n     //necessary constants\n     double myc = 137.0359895; //speed of light\n     double c2 = myc*myc; //speed of light squared\n     std::complex<double> myi(0,1); //imaginary number i\n     //std::complex<double> ic = myi*myc; //i*c\n    \n     //calculate exponent for equivalent BSH operator\n     double mu = std::sqrt(-(2*eps*c2+eps*eps)/c2);\n\n     world.gop.fence();\n\n     //create BSH operator\n     real_convolution_3d op = BSHOperator3D(world, mu,small,thresh); \n\n     //Apply BSH operator to Vpsi\n     Vpsi = apply(world, op, Vpsi);\n\n     //Apply (1/c^2)(H_D + eps) to Vpsi. Using apply_T for convenience, but this requires adding 2c^2Vpsi\n     Vpsi = apply_T(world, Vpsi)*(1.0/c2) + Vpsi * ((eps+2*c2)/c2);\n\n}\n\n// Small function to print geometry of a molecule nicely\n// Straight up stolen from Bryan\nvoid DF::print_molecule(World &world)\n{\n   if(world.rank() == 0)\n   {\n      // Precision is set to 10 coming in, drop it to 5\n      std::cout.precision(5);\n      std::cout << std::fixed;\n\n      // First get atoms\n      const std::vector<Atom> atoms = Init_params.molecule.get_atoms();\n      int num_atoms = atoms.size();\n\n      // Now print\n      print(\"\\n   Geometry Information\");\n      print(\"   --------------------\\n\");\n      print(\"   Units: a.u.\\n\");\n      print(\" Atom            x                 y                 z\");\n      print(\"----------------------------------------------------------------\");\n      for(int j = 0; j < num_atoms; j++)\n      {\n           Vector<double,3> coords = atoms[j].get_coords();\n           std::cout << std::setw(3) << atomic_number_to_symbol(atoms[j].get_atomic_number());\n           std::cout << std::setw(18) << std::right << coords[0] << std::setw(18) << coords[1] << std::setw(18) << coords[2] << endl;\n      }\n      print(\"\");\n\n      // Reset precision\n      std::cout.precision(10);\n      std::cout << std::scientific;\n   }\n}\n\n//Saves everything necessary to restart a DFdriver job.\nvoid DF::saveDF(World& world){\n\n     //get current time\n     Tensor<double> times = get_times(world);\n\n     //start timer\n     start_timer(world);\n\n     //print time of save\n     if(world.rank()==0) print(\"\\n***Saving at time: \",times[0],\" ***\");\n\n     //Create archive and save the following:\n     // 1) Total energy (double)\n     // 2) Krestricted (boolean)\n     // 3) closed_shell (boolean)\n     // 3) number of occupied orbitals (int)\n     // 4) orbital energies (vector of doubles)\n     // 5) box size (double)\n     // 6) wavelet order (int)\n     // 7) molecule (molecule)\n     // 8) occupied orbitals as complex functions\n     try{\n          //create archive\n          archive::ParallelOutputArchive output(world, DFparams.savefile.c_str(), 1);\n\n          //save simulation parameters and calculated properties\n          output & total_energy & DFparams.Krestricted & closed_shell & Init_params.num_occupied & energies & Init_params.L & Init_params.order & Init_params.molecule;\n\n          //Save orbitals\n          //Loop over all occupied orbitals\n          for(unsigned int i = 0; i < Init_params.num_occupied; i++){\n               //Loop over four components\n               for(int j = 0; j < 4; j++){\n                    output & occupieds[i][j];\n               }\n          }\n     }\n     catch(const char* s){\n          if(world.rank()==0) print(\"Failed to save DF restart data with error message:\", s);\n     }\n\n     times = end_timer(world);\n     if(world.rank()==0) print(\"     \", times[0]);\n}\n\n//Creates the (Gaussian) nuclear potential from the molecule object\nvoid DF::make_gaussian_potential(World& world, real_function_3d& potential){\n     if(world.rank()==0) print(\"\\n***Making a Gaussian Potential***\");\n     GaussianNuclearDensityPotentialFunctor Vfunctor(Init_params.molecule);\n     potential = real_factory_3d(world).functor(Vfunctor).truncate_mode(0).truncate_on_project();\n}\n\n//Creates the (Gaussian) nuclear potential from the molecule object. Also calculates the nuclear repulsion energy\nvoid DF::make_gaussian_potential(World& world, real_function_3d& potential, double& nuclear_repulsion_energy){\n     if(world.rank()==0) print(\"\\n***Making a Gaussian Potential***\");\n     auto molecule = Init_params.molecule;\n\n     GaussianNuclearDensityPotentialFunctor Vfunctor(molecule);\n     potential = real_factory_3d(world).functor(Vfunctor).truncate_mode(0).truncate_on_project();\n\n     nuclear_repulsion_energy = 0.0;\n     double rr;\n     for(size_t m = 0; m < molecule.natom(); m++){\n          auto& atom_m = molecule.get_atom(m);\n          for(size_t n = m+1; n < molecule.natom(); n++){\n               auto& atom_n = molecule.get_atom(n);\n               coord_3d dist = atom_m.get_coords() - atom_n.get_coords();\n               rr = std::sqrt(dist[0]*dist[0]+dist[1]*dist[1]+dist[2]*dist[2]);\n               nuclear_repulsion_energy += atom_m.atomic_number * atom_n.atomic_number / rr;\n          }\n     }\n\n}\n\n//Own version of load balancing for DF. Load balance on the functions as well as the nuclear potential\nvoid DF::DF_load_balance(World& world, real_function_3d& Vnuc){\n     if(world.rank()==0) print(\"\\n***Load Balancing***\");\n     start_timer(world);\n     \n     //create Load balance object\n     LoadBalanceDeux<3> lb(world);\n\n     //Add functions that we want to load balance based on\n     lb.add_tree(Vnuc, lbcost<double,3>(12.0,96.0),true);\n     for(unsigned int j = 0; j < Init_params.num_occupied; j++){\n          for(int kk = 0; kk < 4; kk++){\n               lb.add_tree(occupieds[j][kk], lbcost<std::complex<double>,3>(24.0,192.0),true);\n          }\n     }\n\n     //Redistribute\n     FunctionDefaults<3>::redistribute(world, lb.load_balance(2));\n\n     //End timers\n     Tensor<double> times = end_timer(world);\n     if(world.rank()==0) print(\"     \", times[0]);\n     \n}\n\n//Function to output 2*n lineplots. For each orbital we make one \"density\" from the large component\n//and one from the small component, evaluated on a grid with npt points from 0 to endpnt on the x axis\nvoid DF::make_component_lineplots(World& world, const char* filename1, const char* filename2, int npt, double endpnt){\n\n     //vectors to store densities\n     std::vector<real_function_3d> large_densities;\n     std::vector<real_function_3d> small_densities;\n\n     //Push back densities\n     for(unsigned int i=0; i < Init_params.num_occupied; i++){\n          large_densities.push_back(squaremod_large(occupieds[i]));\n          small_densities.push_back(squaremod_small(occupieds[i]));\n     }\n\n     //reconstruct\n     for(unsigned int i=0; i < Init_params.num_occupied; i++){\n          large_densities[i].reconstruct();\n          small_densities[i].reconstruct();\n     }\n\n     //create lineplots\n     double h = endpnt*(1.0/(npt-1));\n     if(world.rank()==0){\n          //open files\n          FILE* file1 = fopen(filename1,\"w\");\n          FILE* file2 = fopen(filename2,\"w\");\n          if(!file1) MADNESS_EXCEPTION(\"DF density lineplots: failed to open the plot file\",0);\n          if(!file2) MADNESS_EXCEPTION(\"DF density lineplots: failed to open the plot file\",0);\n\n          //Loop through occupied orbitals\n          for(unsigned int i=0; i<Init_params.num_occupied; i++){\n               //Loop through desired grid\n               for(int j=0; j<npt; ++j){\n                    //calculate next grid point\n                    coord_3d r({j*h,0.0,0.0});\n\n                    //write grid point x value\n                    fprintf(file1,\"%.14e \", r[0]);\n                    fprintf(file2,\"%.14e \", r[0]);\n\n                    //write function values (of the densities)\n                    plot_line_print_value(file1, large_densities[i].eval(r));\n                    plot_line_print_value(file2, small_densities[i].eval(r));\n\n                    //write newlines\n                    fprintf(file1,\"\\n\");\n                    fprintf(file2,\"\\n\");\n               }\n               //newlines between orbitals\n               fprintf(file1,\"\\n\");\n               fprintf(file2,\"\\n\");\n          }\n          //close files\n          fclose(file1);\n          fclose(file2);\n     }\n     world.gop.fence();\n\n}\n\n//Same as above, but uses a log scale for the horizontal axis\nvoid DF::make_component_logplots(World& world, const char* filename1, const char* filename2, int npt, int startpnt, int endpnt){\n     \n     //vectors to store densities\n     std::vector<real_function_3d> large_densities;\n     std::vector<real_function_3d> small_densities;\n\n     //Push back densities\n     for(unsigned int i=0; i < Init_params.num_occupied; i++){\n          large_densities.push_back(squaremod_large(occupieds[i]));\n          small_densities.push_back(squaremod_small(occupieds[i]));\n     }\n\n     //reconstruct\n     for(unsigned int i=0; i < Init_params.num_occupied; i++){\n          large_densities[i].reconstruct();\n          small_densities[i].reconstruct();\n     }\n\n     //create lineplots\n     double h = (endpnt-startpnt)*(1.0/(npt-1));\n     if(world.rank()==0){\n          //open files\n          FILE* file1 = fopen(filename1,\"w\");\n          FILE* file2 = fopen(filename2,\"w\");\n          if(!file1) MADNESS_EXCEPTION(\"DF density lineplots: failed to open the plot file\",0);\n          if(!file2) MADNESS_EXCEPTION(\"DF density lineplots: failed to open the plot file\",0);\n\n          //Loop through occupied orbitals\n          for(unsigned int i=0; i<Init_params.num_occupied; i++){\n               //Loop through desired grid\n               for(int j=0; j<npt; ++j){\n                    //calculate next grid point\n                    coord_3d r({std::pow(10,startpnt + j*h),0.0,0.0});\n\n                    //write grid point x value\n                    fprintf(file1,\"%.14e \", r[0]);\n                    fprintf(file2,\"%.14e \", r[0]);\n\n                    //write function values (of the densities)\n                    plot_line_print_value(file1, large_densities[i].eval(r));\n                    plot_line_print_value(file2, small_densities[i].eval(r));\n\n                    //write newlines\n                    fprintf(file1,\"\\n\");\n                    fprintf(file2,\"\\n\");\n               }\n               //newlines between orbitals\n               fprintf(file1,\"\\n\");\n               fprintf(file2,\"\\n\");\n          }\n          //close files\n          fclose(file1);\n          fclose(file2);\n     }\n     world.gop.fence();\n\n}\n\n//Another lineplotting function, but write the entire density, instead of one divided into large and small components\nvoid DF::make_density_lineplots(World& world, const char* filename, int npt, double endpnt){\n\n     //vector to store densities\n     std::vector<real_function_3d> densities;\n\n     //Push back densities\n     for(unsigned int i=0; i < Init_params.num_occupied; i++){\n          densities.push_back(squaremod(occupieds[i]));\n     }\n\n     //reconstruct\n     for(unsigned int i=0; i < Init_params.num_occupied; i++){\n          densities[i].reconstruct();\n     }\n\n     //create lineplots\n     double h = endpnt*(1.0/(npt-1));\n     if(world.rank()==0){\n          //open file\n          FILE* file = fopen(filename,\"w\");\n          if(!file) MADNESS_EXCEPTION(\"DF density lineplots: failed to open the plot file\",0);\n          \n          //Loop through occupied orbitals\n          for(unsigned int i=0; i<Init_params.num_occupied; i++){\n               //Loop through desired grid\n               for(int j=0; j<npt; ++j){\n                    //calculate next grid point\n                    coord_3d r({j*h,0.0,0.0});\n\n                    //write grid point x value\n                    fprintf(file,\"%.14e \", r[0]);\n\n                    //write density function value\n                    plot_line_print_value(file, densities[i].eval(r));\n\n                    //newline\n                    fprintf(file,\"\\n\");\n               }\n               //newline between orbitals\n               fprintf(file,\"\\n\");\n          }\n          //close file\n          fclose(file);\n     }\n     world.gop.fence();\n\n}\n\n//One complete iteration of the Dirac-Hartree-Fock solver\nbool DF::iterate(World& world, real_function_3d& V, real_convolution_3d& op, real_function_3d& JandV, std::vector<Fcwf>& Kpsis, XNonlinearSolver<std::vector<Fcwf>, std::complex<double>, Fcwf_vector_allocator>& kainsolver, double& tolerance, int& iteration_number, double& nuclear_repulsion_energy){\n\n     //Get and print the time of this iteration's start, and start a timer\n     Tensor<double> times = get_times(world);\n     if(world.rank()==0) print(\"\\n\\n\\nIteration: \", iteration_number, \" at \",times[0]);\n     if(world.rank()==0) print(\"--------------\");\n     start_timer(world);\n\n     //A vector to hold residuals after BSH application\n     std::vector<Fcwf> Residuals;\n\n     //Norm of a residual. We use these norms one-at-a-time, so no vector is needed\n     double residualnorm;\n\n     //A working FCWF that will have multiple uses\n     Fcwf temp_function(world);\n\n     //Boolean used in while loop.\n     bool iterate_again = false; //Initialize to false = assume iterations will stop\n\n     //First diagonalize the occupied orbitals in the Fock space (of occupied orbitals). Also transforms Kpsis.\n     diagonalize(world, V, op, Kpsis);\n\n     //Diagonalization forces us to recompute density\n     real_function_3d rho = real_factory_3d(world);\n     double fac = (DFparams.Krestricted ? 2 : 1);\n     if(closed_shell){\n          for(unsigned int kk = 0; kk < Init_params.num_occupied; kk++){\n               rho += fac*squaremod(occupieds[kk]);\n          }\n     }\n     else{\n          for(unsigned int kk = 0; kk < Init_params.num_occupied-1; kk++){\n               rho += fac*squaremod(occupieds[kk]);\n          }\n          rho += squaremod(occupieds[Init_params.num_occupied-1]);\n     }\n\n     //Apply coulomb operator to density and combine with V to get total potential\n     JandV = V + apply(op,rho); \n     JandV.truncate();\n\n\n     //Apply Dirac BSH to each psi\n     if(world.rank()==0) print(\"\\n***Applying BSH operator***\");\n     start_timer(world);\n     double maxresidual = -1.0;\n     for(unsigned int j = 0; j < Init_params.num_occupied; j++){\n\n          //construct the function to which we will apply the BSH\n          temp_function = occupieds[j]*JandV;\n          temp_function.scale(-1.0);\n          temp_function += Kpsis[j];\n          temp_function.truncate();\n\n          //temp_function now holds (K-V-J)psi, so apply the BSH\n          apply_BSH_new(world,  temp_function, energies[j], DFparams.small, DFparams.thresh);\n\n          //truncate\n          temp_function.truncate();\n\n          //Now calculate the residual\n          residualnorm = (occupieds[j] - temp_function).norm2();\n\n          //Print residual norm for user to keep track\n          if(world.rank()==0) printf(\"     Orbital: %3i,  Resid: %.10e\\n\",j+1, residualnorm);\n\n          //Keep track of the maximum residual\n          maxresidual = std::max(maxresidual, residualnorm);\n\n          //Store residual function if we're using KAIN. Not necessary if we're not using kain\n          //We don't use KAIN on the first iteration.\n          if(iteration_number != 1 and DFparams.kain){\n               Residuals.push_back(occupieds[j] - temp_function);\n          }\n          else{\n               //if not using KAIN, then the result is the new orbital, with some step restriction\n               residualnorm = (occupieds[j] - temp_function).norm2(); \n               if(residualnorm > DFparams.maxrotn){\n                    double s = DFparams.maxrotn / residualnorm;\n                    if(world.rank()==0) print(\"     restricting step for orbital: \", j+1);\n                    occupieds[j] = temp_function*s + occupieds[j]*(1.0-s);\n               }\n               else{\n                    occupieds[j] = temp_function; \n               }\n          }\n     }\n\n     //Print max residual and the tolerance that we're using\n     if(world.rank()==0) printf(\"                max Resid: %.10e\\n\",maxresidual);\n     if(world.rank()==0) printf(\"                tolerance: %.10e\\n\",tolerance);\n\n     //End timers\n     times = end_timer(world);\n     if(world.rank()==0) print(\"     \", times[0]);\n\n     //If any residual is still larger than the tolerance then we need to iterate again.\n     //Can just enforce this on the max residual\n     if(maxresidual > tolerance) iterate_again = true;\n\n     //Apply the kain solver, if called for\n     if(iteration_number != 1 and DFparams.kain){\n          if(world.rank()==0) print(\"\\n***Applying KAIN Solver***\");\n          start_timer(world);\n\n          //Implement KAIN, but enforce a step restriction to KAIN doesn't take too large of a step\n          Residuals = kainsolver.update(occupieds, Residuals); //Using Residuals for updated orbitals to save storage\n          for(unsigned int i=0; i < Init_params.num_occupied; i++){\n\n               //see how big of a step KAIN took for each orbital\n               residualnorm = (occupieds[i]-Residuals[i]).norm2();\n\n               //Restrict the step taken by KAIN if it's too big\n               //This code is basically stolen from SCF.cc\n               if(residualnorm > DFparams.maxrotn){\n                    double s = DFparams.maxrotn / residualnorm;\n                    if(world.rank()==0) print(\"     restricting step for orbital: \", i+1);\n                    occupieds[i] = Residuals[i]*s + occupieds[i]*(1.0-s);\n               }\n               else{\n                    occupieds[i] = Residuals[i];\n               }\n          }\n\n          //End timers\n          times = end_timer(world);\n          if(world.rank()==0) print(\"     \", times[0]);\n     }\n\n     //truncate after BSH(+KAIN) application\n     for(unsigned int i = 0; i < Init_params.num_occupied; i++) occupieds[i].truncate();\n\n     //orthonormalize\n     if(world.rank()==0) print(\"\\n***Orthonormalizing***\");\n     start_timer(world);\n\n     orthogonalize_inplace(world);\n\n     //truncate here and normalize again\n     for(unsigned int i = 0; i < Init_params.num_occupied; i++){\n           occupieds[i].truncate();\n           occupieds[i].normalize();\n     }\n\n     //End orthonormalization timer\n     times = end_timer(world);\n     if(world.rank()==0) print(\"     \", times[0]);\n\n     //Now calculate new exchange functions. Has timer built in.\n     if(world.rank()==0) print(\"\\n***Recalculating Exchange***\");\n     exchange(world, op, Kpsis);\n\n     //Calculate new J+V term\n     if(world.rank()==0) print(\"\\n***Recalculating Coulomb***\");\n     start_timer(world);\n     \n     //Make density\n     rho = real_factory_3d(world);\n     if(closed_shell){\n          for(unsigned int kk = 0; kk < Init_params.num_occupied; kk++){\n               rho += fac*squaremod(occupieds[kk]);\n          }\n     }\n     else{\n          for(unsigned int kk = 0; kk < Init_params.num_occupied-1; kk++){\n               rho += fac*squaremod(occupieds[kk]);\n          }\n          rho += squaremod(occupieds[Init_params.num_occupied-1]);\n     }\n     \n     //Apply coulomb operator to density and combine with V to get total potential\n     JandV = V + apply(op,rho); \n     JandV.truncate();\n     \n     //End timer for coulombic potential calculation\n     times = end_timer(world);\n     if(world.rank()==0) print(\"     \", times[0]);\n\n     //Calculate and print total energy each iteration, as well as a breakdown of different contributions\n     if(world.rank()==0){\n          print(\"\\n***Printing Current Energies***\");\n     }\n\n     start_timer(world);\n\n     double kinetic_energy = 0.0;\n     double coulomb_energy = 0.0;\n     double exchange_energy = 0.0;\n     double nuclear_attraction_energy = 0.0;\n     double old_total_energy = total_energy;\n     double myc = 137.0359895; //speed of light\n     Tensor<double> nuclear_attraction_tensor;\n     Tensor<double> coulomb_tensor;\n     Tensor<double> exchange_tensor;\n\n     //Potential due to the density only (no nuclear potential)\n     real_function_3d Jop = apply(op,rho);\n\n     //Compute kinetic energy contributions\n     if(closed_shell){\n          for(unsigned int j = 0; j < Init_params.num_occupied; j++){\n               kinetic_energy += fac*rele(world, occupieds[j]);\n          }\n     }\n     else{\n          for(unsigned int j = 0; j < Init_params.num_occupied-1; j++){\n               kinetic_energy += fac*rele(world, occupieds[j]);\n          }\n          kinetic_energy += rele(world, occupieds[Init_params.num_occupied-1]);\n     }\n          \n     //Compute electron-nuclear attraction energy contributions, taking advantage of vmra's inner\n     std::vector<complex_function_3d> occupieds1(Init_params.num_occupied);\n     std::vector<complex_function_3d> occupieds2(Init_params.num_occupied);\n     std::vector<complex_function_3d> occupieds3(Init_params.num_occupied);\n     std::vector<complex_function_3d> occupieds4(Init_params.num_occupied);\n     for(unsigned int i = 0; i < Init_params.num_occupied; i++){\n          occupieds1[i] = occupieds[i][0];\n          occupieds2[i] = occupieds[i][1];\n          occupieds3[i] = occupieds[i][2];\n          occupieds4[i] = occupieds[i][3];\n     }\n     nuclear_attraction_tensor = real(inner(world,occupieds1,mul(world,V,occupieds1)));\n     nuclear_attraction_tensor += real(inner(world,occupieds2,mul(world,V,occupieds2)));\n     nuclear_attraction_tensor += real(inner(world,occupieds3,mul(world,V,occupieds3)))*(1.0/(myc*myc));\n     nuclear_attraction_tensor += real(inner(world,occupieds4,mul(world,V,occupieds4)))*(1.0/(myc*myc));\n     nuclear_attraction_energy = fac*nuclear_attraction_tensor.sum();\n     if(!closed_shell and DFparams.Krestricted) nuclear_attraction_energy -= nuclear_attraction_tensor(Init_params.num_occupied-1);\n     \n     //Compute electron-electron repulsion energy contribution, again using vmra\n     //Regarding use of fac here:\n     //   Normally, this sum runs over all *unique* pairs of orbitals\n     //   Our sum runs over all pairs of orbitals, so we divide by 2.\n     //   In the Kramers-restricted case, we multiply by 2 and this cancels.\n     //   In the Kramers-restricted open-shell case, the doubling doesn't apply to the last orbital, so we subtract the excess\n     coulomb_tensor = real(inner(world,occupieds1,mul(world,Jop,occupieds1)));\n     coulomb_tensor += real(inner(world,occupieds2,mul(world,Jop,occupieds2)));\n     coulomb_tensor += real(inner(world,occupieds3,mul(world,Jop,occupieds3)))*(1.0/(myc*myc));\n     coulomb_tensor += real(inner(world,occupieds4,mul(world,Jop,occupieds4)))*(1.0/(myc*myc));\n     coulomb_energy = coulomb_tensor.sum()*(fac/2.0);\n     if(!closed_shell and DFparams.Krestricted) coulomb_energy -= 0.5*coulomb_tensor(Init_params.num_occupied-1);\n     \n     //Calculate Exchange energy contribution, with some similar logic to the above\n     std::vector<complex_function_3d> Kpsis1(Init_params.num_occupied);\n     std::vector<complex_function_3d> Kpsis2(Init_params.num_occupied);\n     std::vector<complex_function_3d> Kpsis3(Init_params.num_occupied);\n     std::vector<complex_function_3d> Kpsis4(Init_params.num_occupied);\n     for(unsigned int i = 0; i < Init_params.num_occupied; i++){\n          Kpsis1[i] = Kpsis[i][0];\n          Kpsis2[i] = Kpsis[i][1];\n          Kpsis3[i] = Kpsis[i][2];\n          Kpsis4[i] = Kpsis[i][3];\n     }\n     exchange_tensor = real(inner(world,occupieds1,Kpsis1));\n     exchange_tensor += real(inner(world,occupieds2,Kpsis2));\n     exchange_tensor += real(inner(world,occupieds3,Kpsis3))*(1.0/(myc*myc));\n     exchange_tensor += real(inner(world,occupieds4,Kpsis4))*(1.0/(myc*myc));\n     exchange_energy = exchange_tensor.sum()*(fac/2.0);\n     if(!closed_shell and DFparams.Krestricted) exchange_energy -= 0.5*exchange_tensor(Init_params.num_occupied-1);\n\n     //compute total energy using the above computed contributions\n     total_energy = kinetic_energy + coulomb_energy - exchange_energy + nuclear_attraction_energy + nuclear_repulsion_energy;\n\n     //End timers for total energy calculation\n     times = end_timer(world);\n     if(world.rank()==0) print(\"     \", times[0]);\n\n     //Now we calculate other quantities for later printing:\n     // 1) expectation values for r\n     // 2) number of coefficients used to represent each orbital\n     // 3) maximum depth used in representing each orbital\n     // 4) norms of each component of each orbital\n\n     //Need function f(r)=r for the expectation values\n     real_function_3d rfunc = real_factory_3d(world).f(myr);\n\n     //Now loop through occupied orbitals, computing desired quantities (above)\n     std::vector<double> r_expec_vec(Init_params.num_occupied);\n     std::vector<int> numcoeffs_vec(Init_params.num_occupied);\n     std::vector<int> maxdepth_vec(Init_params.num_occupied);\n     std::vector<double> comp1norm(Init_params.num_occupied);\n     std::vector<double> comp2norm(Init_params.num_occupied);\n     std::vector<double> comp3norm(Init_params.num_occupied);\n     std::vector<double> comp4norm(Init_params.num_occupied);\n     for(unsigned int j = 0; j < Init_params.num_occupied; j++){\n\n          //calculate <r>\n          double r_expec = std::real(inner(occupieds[j], occupieds[j]*rfunc));\n\n          //find number of coefficients (sum over all components)\n          int numcoeffs = occupieds[j][0].size() + occupieds[j][1].size() + occupieds[j][2].size() + occupieds[j][3].size();\n\n          //find maximum depth (max over all components)\n          int maxdepth = std::max(occupieds[j][0].max_depth(), occupieds[j][1].max_depth());\n          maxdepth = std::max(int(occupieds[j][2].max_depth()), maxdepth);\n          maxdepth = std::max(int(occupieds[j][3].max_depth()), maxdepth);\n\n          //Store in vectors\n          r_expec_vec[j] = r_expec;\n          numcoeffs_vec[j] = numcoeffs;\n          maxdepth_vec[j] = maxdepth;\n\n          //Compute and store norms of each component. Remember to scale small component by c\n          comp1norm[j] = occupieds[j][0].norm2();\n          comp2norm[j] = occupieds[j][1].norm2();\n          comp3norm[j] = occupieds[j][2].norm2()/myc;\n          comp4norm[j] = occupieds[j][3].norm2()/myc;\n\n     }\n\n     //Print everything\n     if(world.rank()==0){\n          print(\"Orbital                 Energy            <r>     No. coeffs     Max depth        ||1||        ||2||        ||3||        ||4||\");\n          print(\"------------------------------------------------------------------------------------------------------------------------------\");\n          for(unsigned int j = 0; j < Init_params.num_occupied; j++){\n               printf(\"%7i %22.10e %14.5e %14i %13i %12.5e %12.5e %12.5e %12.5e\\n\",j+1,energies[j],r_expec_vec[j],numcoeffs_vec[j],maxdepth_vec[j],comp1norm[j],comp2norm[j],comp3norm[j],comp4norm[j]);\n          }\n     }\n\n     //Print aggregate information\n     if(world.rank()==0){\n          print(\"\\n              Kinetic Energy: \",kinetic_energy);\n          print(\"             Coulomb  Energy: \",coulomb_energy);\n          print(\"             Exchange Energy: \",exchange_energy);\n          print(\"   Nuclear Attraction Energy: \",nuclear_attraction_energy);\n          print(\"    Nuclear Repulsion Energy: \",nuclear_repulsion_energy);\n          print(\"                Total Energy: \",total_energy);\n          print(\"       Total Energy Residual: \", std::fabs(total_energy - old_total_energy));\n     }\n\n     //final truncatation of orbitals now that we've computed properties\n     for(unsigned int j = 0; j < Init_params.num_occupied; j++){\n          occupieds[j].truncate();\n     }\n\n     times = end_timer(world);\n     if(world.rank()==0) print(\"     Iteration time:\", times[0]);\n \n     return iterate_again;\n}\n\n// Solves for the ground state Dirac Hartree Fock orbitals\nvoid DF::solve_occupied(World & world)\n{\n\n     //State what we're doing here\n     if(world.rank()==0){\n          if(DFparams.Krestricted){\n               if(closed_shell) print(\"\\nSolving for \", Init_params.num_occupied, \" doubly-occupied orbitals\\n------------------------------\\n\");\n               else print(\"\\nSolving for \", Init_params.num_occupied-1, \" doubly-occupied, 1 singly-occupied orbitals\\n------------------------------\\n\");\n          }\n          else{\n               print(\"\\nSolving for \", Init_params.num_occupied, \" single-occupied orbitals\\n------------------------------\\n\");\n          }\n     }\n\n     //Will need a coulomb operator\n     real_convolution_3d op = CoulombOperator(world,DFparams.small,DFparams.thresh);\n\n     //allocator is useful to have, but also required for use of KAIN\n     Fcwf_vector_allocator allocator(world,Init_params.num_occupied);\n\n     //initialize kain solver\n     XNonlinearSolver<std::vector<Fcwf>, std::complex<double>, Fcwf_vector_allocator> kainsolver(allocator);\n     kainsolver.set_maxsub(DFparams.maxsub);\n\n     //normalize initial guesses\n     for(unsigned int i = 0; i < Init_params.num_occupied; i++){\n          occupieds[i].normalize();\n     }\n\n     //Form nuclear potential\n     real_function_3d Vnuc;\n     double nuclear_repulsion_energy;\n     if(DFparams.nucleus == 1){\n          make_fermi_potential(world, op, Vnuc, nuclear_repulsion_energy);\n     }\n     else{\n          make_gaussian_potential(world, Vnuc, nuclear_repulsion_energy);\n     }\n\n     //Initial load balance\n     DF_load_balance(world, Vnuc);\n\n     //Initialize vector of Fcwfs to hold exchange applied to the orbitals\n     std::vector<Fcwf> Kpsis = allocator();\n\n     //Calculate initial exchange\n     if(world.rank()==0) print(\"\\n***Calculating Initial Exchange***\");\n     exchange(world, op, Kpsis);\n\n     //Calculate initial J+V term\n     if(world.rank()==0) print(\"\\n***Calculating Initial Coulomb***\");\n     start_timer(world);\n     real_function_3d rho = real_factory_3d(world);\n     double fac = (DFparams.Krestricted ? 2 : 1);\n     if(closed_shell){\n          for(unsigned int kk = 0; kk < Init_params.num_occupied; kk++){\n               rho += fac*squaremod(occupieds[kk]);\n          }\n     }\n     else{\n          for(unsigned int kk = 0; kk < Init_params.num_occupied-1; kk++){\n               rho += fac*squaremod(occupieds[kk]);\n          }\n          rho += squaremod(occupieds[Init_params.num_occupied-1]);\n     }\n     real_function_3d JandV = Vnuc + apply(op,rho); \n     JandV.truncate();\n     Tensor<double> times = end_timer(world);\n     if(world.rank()==0) print(\"     \", times[0]);\n\n     //Set tolerance for residuals\n     double tol = 50.0*DFparams.thresh; \n\n     //Now time to start iterating\n     bool keep_going = true;\n     int iteration_number = 1;\n     while((keep_going and iteration_number <= DFparams.max_iter) or iteration_number <= DFparams.min_iter){\n          keep_going = iterate(world, Vnuc, op, JandV, Kpsis, kainsolver, tol, iteration_number, nuclear_repulsion_energy);\n          \n          //Load balance and save between iterations\n          if(keep_going and iteration_number <= DFparams.lb_iter) DF_load_balance(world, Vnuc);\n          if(DFparams.do_save) saveDF(world);\n\n          //Increment iteration counter\n          iteration_number++;\n     }\n\n     ////Calculation of Effective Electric Field:\n     //if(world.rank()==0) print(\"Effective Electric Field calculation\");\n     //std::complex<double> myi(0,1);\n     //std::complex<double> one(1,0);\n     //real_derivative_3d Dx(world,0);\n     //real_derivative_3d Dy(world,1);\n     //real_derivative_3d Dz(world,2);\n     //double Eeff(0.0);\n     //for(unsigned int j; j < Init_params.num_occupied; j++){\n     //     real_function_3d LL(world);\n     //     for(unsigned int kk; kk < Init_params.num_occupied; kk++){\n     //          if(kk != j){\n     //               LL += squaremod(occupieds[kk]);\n     //          }\n     //     }\n     //     LL = apply(op,LL);\n     //     LL += Vnuc;\n     //     complex_function_3d Lx = one*Dx(LL);\n     //     complex_function_3d Ly = one*Dy(LL);\n     //     complex_function_3d Lz = one*Dz(LL);\n     //     Fcwf temp(world);\n\n     //     temp[0] = Lz*occupieds[j][0] + (Lx - myi*Ly)*occupieds[j][1];\n     //     temp[1] =  (Lx + myi*Ly)*occupieds[j][0] - Lz*occupieds[j][1];\n     //     temp[2] = Lz*occupieds[j][2] + (Lx - myi*Ly)*occupieds[j][3];\n     //     temp[2].scale(-1.0);\n     //     temp[3] = Lz*occupieds[j][3] - (Lx + myi*Ly)*occupieds[j][2];\n\n     //     Eeff += std::real(inner(occupieds[0],temp));\n     //}\n     //if(world.rank()==0) print(\"Eeff = \", Eeff);\n\n\n}\n\nvoid DF::solve(World& world){\n\n     // Start timer\n     start_timer(world);\n\n     //Begin calculation\n     if(world.rank() == 0){\n        print(\"\\n\\n   Dirac Fock Calculation\");\n        print(\"   ------------------------\");\n     }\n    \n     if(not DFparams.no_compute){\n          if(DFparams.job == 0){\n               solve_occupied(world);\n          }\n          else{\n               if(world.rank()==0) print(\"Specify a better job parameter.\");\n          }\n     }\n     else{\n          if(world.rank()==0) print(\"Requested no computation.\");\n     }\n    \n     // Report calculation time\n     // Precision is set to 10 coming in, drop it to 2\n     std::cout.precision(2);\n     std::cout << std::fixed;\n     Tensor<double> times = end_timer(world);\n     if(world.rank() == 0) print(\"\\n   Calculation time:\", times[0],\"\\n\");\n\n     //Make density lineplots\n     if(DFparams.lineplot){\n          start_timer(world);\n          if(world.rank()==0) print(\"***Making lineplots***\");\n          //make_density_lineplots(world, \"density_lineplots\", 100000, 0.005);\n          //make_component_lineplots(world, \"large_component_lineplots\", \"small_component_lineplots\", 100000, 5);\n          make_component_logplots(world, \"large_component_lineplots\", \"small_component_lineplots\", 1000, -6, 1);\n          times = end_timer(world);\n          if(world.rank()==0) print(\"     \", times[0]);\n     }\n     \n}\n\n//Print the number of coefficients being used by each orbital.\n//This has been useful in the past for debugging\nvoid DF::print_sizes(World& world, bool individual=false){\n     if(world.rank()==0) print(\"\\nPrinting orbital sizes:\\n\");\n     int n = Init_params.num_occupied;\n     double a,b1,b2,b3,b4;\n     for(int j=0; j < n; j++){\n          b1 = occupieds[j][0].size();\n          b2 = occupieds[j][1].size();\n          b3 = occupieds[j][2].size();\n          b4 = occupieds[j][3].size();\n          a = b1+b2+b3+b4;\n          if(world.rank()==0){\n               if(individual){\n                    print(\"Orbital; \",j+1,\" size: \",b1,\"+\",b2,\"+\",b3,\"+\",b4,\"=\",a);\n               }\n               else{\n                    print(\"Orbital; \",j+1,\" size: \",a);\n               }\n          }\n     }\n}\n\n//kthxbye\n\n\n\n"
  },
  {
    "path": "src/apps/dirac/DF.h",
    "content": "#ifndef MADNESS_APPS_DF_H_INCLUDED\n#define MADNESS_APPS_DF_H_INCLUDED\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n#include <madness/mra/nonlinsol.h>  // The kain solver\n#include <vector>\n#include <math.h>\n#include <stdio.h>\n#include <iomanip>\n#include <complex>\n#include <cmath>\n#include <string>\n#include <algorithm> \n#include <madness/chem/molecule.h>\n#include \"DFParameters.h\"\n#include \"InitParameters.h\"\n\n\nusing namespace madness;\n\n\n/// Given a molecule and nonrelativistic ground state orbitals, solve the Dirac-Hartree-Fock equations\nclass DF {\n     private:\n          // Member variables\n\n          // DFParameter object to hold all user input variables\n          DFParameters DFparams;\n\n          // InitParametesr object to hold all variables needed from\n          // nonrelativistic ground state calculation. Read from an archive\n          InitParameters Init_params;\n\n          // Timer variables\n          std::vector<double> sss, ttt;\n\n          // Tensor for holding energies\n          Tensor<double> energies;        \n\n          //Vector of DF Fcwf occupied orbitals\n          std::vector<Fcwf> occupieds;\n\n          //Total energy of the system\n          double total_energy;\n\n          //Whether or not the calculation to be done is closed shell\n          bool closed_shell;\n\n     public:\n\n          // Start a timer\n          void start_timer(World & world);\n\n          // Needed to do timers correctly\n          double pop(std::vector<double> & v);\n\n          // Stop a timer\n          Tensor<double> end_timer(World & world);\n\n          //Find current time (relative to job start)\n          Tensor<double> get_times(World& world);\n\n          // Collective constructor uses contents of file \\c filename and broadcasts to all nodes\n          DF(World & world,            // MADNESS world object\n              const char* input_file);  // Input file \n\n          // Collective constructor uses contents of stream \\c input and broadcasts to all nodes\n          DF(World & world,                        // MADNESS world object\n              std::shared_ptr<std::istream> input); // Pointer to input stream\n\n          static void help() {\n              print_header2(\"help page for DIRAC \");\n              print(\"The DIRAC code computes Dirac-Fock energies\");\n          }\n\n          static void print_parameters() {\n              print(\"no parameter help is available for the dirac code\");\n              print(\"\\nYou need a dft-block and a DiracFock-block in an input file named 'input'\");\n          }\n\n\n\n        //Calculates the kinetic+rest energy expectation value of psi\n          double rele(World& world, Fcwf& psi);\n\n          //Applies the exchange operator to all of occupieds\n          void exchange(World& world, real_convolution_3d& op, std::vector<Fcwf>& Kpsis);\n\n          //diagonalizes occupieds in the Fock space. Transforms occupieds and Kpsis.\n          void diagonalize(World& world, real_function_3d& myV,real_convolution_3d& op, std::vector<Fcwf>& Kpsis);\n\n          // Small function to print geometry of a molecule nicely\n          // Straight up stolen from Bryan\n          void print_molecule(World &world);\n\n          //Saves the state of a DF job so that it can be restarted\n          void saveDF(World& world);\n\n          //Creates the gaussian nuclear potential from the molecule object\n          void make_gaussian_potential(World& world, real_function_3d& potential);\n\n          //Creates the gaussian nuclear potential from the molecule object. Also calculates the nuclear repulsion energy\n          void make_gaussian_potential(World& world, real_function_3d& potential, double& nuclear_repulsion_energy);\n\n          //Creates the fermi nuclear potential from the molecule object\n          void make_fermi_potential(World& world, real_convolution_3d& op, real_function_3d& potential);\n\n          //Creates the fermi nuclear potential from the molecule object. Also calculates the nuclear repulsion energy\n          void make_fermi_potential(World& world, real_convolution_3d& op, real_function_3d& potential, double& nuclear_repulsion_energy);\n\n          //Load balancing function\n          void DF_load_balance(World& world, real_function_3d& Vnuc);\n\n          //Does one full SCF iteration\n          bool iterate(World& world, real_function_3d& V, real_convolution_3d& op, real_function_3d& JandV, std::vector<Fcwf>& Kpsis, XNonlinearSolver<std::vector<Fcwf>, std::complex<double>, Fcwf_vector_allocator>& kainsolver, double& tolerance, int& iteration_number, double& nuclear_repulsion_energy);\n                \n\n          //Runs the job specified in the input parameters\n          void solve(World& world);\n\n          //solves the Dirac Fock equation for the occupied orbitals   \n          void solve_occupied(World & world);\n\n          //Lineplot the densities. Currently only along x axis from 0 to L\n          void make_density_lineplots(World& world, const char* filename, int npt, double endpnt);\n\n          //Lineplot the densities of the large and small component separately. only along x axis from 0 to L\n          void make_component_lineplots(World& world, const char* filename1, const char* filename2, int npt, double endpnt);\n\n          //orthogonormalize occupieds, overwriting the ones in memory\n          void orthogonalize_inplace(World& world);\n\n          //Lineplot the densities of the large and small component separately. only along x axis on log scale from 10^-startpnt to 10^endpnt with pts evenly spaced in log space\n          void make_component_logplots(World& world, const char* filename1, const char* filename2, int npt, int startpnt, int endpnt);\n\n          //print the number of coefficients used to represent all occupied orbitals. primarily used when debugging.\n          void print_sizes(World& world, bool individual);\n\n};\n\n\n#endif\n\n//kthxbye\n\n"
  },
  {
    "path": "src/apps/dirac/DFParameters.h",
    "content": "\n/// \\file DFParameters\n/// \\brief Input parameters for a Dirac Fock calculation.\n\n#ifndef MADNESS_APPS_DFPARAMS_H_INCLUDED\n#define MADNESS_APPS_DFPARAMS_H_INCLUDED\n\n#include <madness/chem/molecule.h>\n\nnamespace madness {\n\n     struct DFParameters{\n          // List of input parameters\n          //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n          //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n          //               If you add something here, don't forget to add it to serializable!\n          //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n          //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n          std::string archive;         ///< Name of input archive to read in ground state\n          int job;                     ///< Indicates the type of job to do\n                                       ///<   Values |   Job\n                                       ///<   --------------------------------------------------------------\n                                       ///<     0    |   Dirac Fock on occupied orbitals only (Default)\n                                       ///<   --------------------------------------------------------------\n                                       ///<     Add more values here\n                                       ///<\n          int max_iter;                ///< Maximum number of iterations\n          double small;                ///< Minimum length scale to be resolved\n          double thresh;               ///< Accuracy criterion when truncating\n          int k;                       ///< Number of legendre polynomials in scaling basis\n          bool kain;                   ///< Turns on KAIN nonlinear solver \n          int maxsub;                  ///< Sets maximum subspace size for KAIN\n          double maxrotn;              ///< maximum step allowed by kain\n          bool restart;                ///< Indicates this is a restarted DF job\n          int nucleus;                 ///< Indicates which nucleus model to use (1 for fermi, anything else for Gaussian)\n          bool do_save;                ///< Whether or not to save after each iteration. Defaults to true. Turn off with 'no_save'\n          std::string savefile;        ///< Gives the file to save the archive each iteration Default: DFrestartdata (in working directory)\n          int lb_iter;                 ///< How many iterations to load balance (after the initial load balancing)\n          bool nwchem;                 ///< Indicates archive given is actually an nwchem file for starting the job\n          bool lineplot;               ///< Whether or not to make lineplots at the end of the job\n          bool no_compute;             ///< If true, will skip all computation\n          double bohr_rad;             ///< bohr radius in fm (default: 52917.7211)\n          int min_iter;                ///< minimum number of iterations (default: 2)\n          bool Krestricted;            ///< Calculation should be performed in Kramers-restricted manner (default: false)\n          //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n          //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n          //               If you add something here, don't forget to add it to serializable!\n          //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n          //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n          template<typename Archive>\n          void serialize(Archive& ar){\n               ar & archive & job & max_iter & small & thresh & k & kain & maxsub & maxrotn & restart & nucleus & do_save & savefile & lb_iter & nwchem & lineplot & no_compute & bohr_rad & min_iter & Krestricted;\n          }\n\n          // Default constructor\n          DFParameters()\n          : job(0)\n          , max_iter(20)\n          , small(1e-5)\n          , thresh(1e-6)\n          , k(8)\n          , kain(false)\n          , maxsub(10)\n          , maxrotn(0.25)\n          , restart(false)\n          , nucleus(0)\n          , do_save(true)\n          , savefile(\"DFrestartdata\")\n          , lb_iter(20)\n          , nwchem(false)\n          , lineplot(false)\n          , no_compute(false)\n          , bohr_rad(52917.7211)\n          , min_iter(2)\n          , Krestricted(false)\n          {}\n\n          // Initializes DFParameters using the contents of file \\c filename\n          void read_file(const std::string& filename){\n               std::ifstream f(filename.c_str());\n               read(f);\n          }\n\n          // Initializes DFParameters using the contents of stream \\c f\n          void read(std::istream& f){\n               position_stream(f, \"DiracFock\");\n               std::string s;\n\n               while(f >> s){\n                    if(s == \"end\"){\n                         break;\n                    }\n                    else if (s == \"archive\"){\n                         f >> archive;\n                    }\n                    else if (s == \"job\"){\n                         f >> job;\n                    }\n                    else if (s == \"max_iter\"){\n                         f >> max_iter;\n                    }\n                    else if (s == \"small\"){\n                         f >> small;\n                    }\n                    else if (s == \"thresh\"){\n                         f >> thresh;\n                    }\n                    else if (s == \"k\"){\n                         f >> k;\n                    }\n                    else if (s == \"kain\"){\n                         kain = true;\n                    }\n                    else if (s == \"maxsub\"){\n                         f >> maxsub;\n                    }\n                    else if (s == \"maxrotn\"){\n                         f >> maxrotn;\n                    }\n                    else if (s == \"restart\"){\n                         restart = true;\n                    }\n                    else if (s == \"nucleus\"){\n                         f >> nucleus;\n                    }\n                    else if (s == \"no_save\"){\n                         do_save = false;\n                    }\n                    else if (s == \"savefile\"){\n                         f >> savefile;\n                    }\n                    else if (s == \"lb_iter\"){\n                         f >> lb_iter;\n                    }\n                    else if (s == \"nwchem\"){\n                         nwchem = true;\n                    }\n                    else if (s == \"lineplot\"){\n                         lineplot = true;\n                    }\n                    else if (s == \"no_compute\"){\n                         no_compute = true;\n                    }\n                    else if (s == \"bohr_rad\"){\n                         f >> bohr_rad;\n                    }\n                    else if (s == \"min_iter\"){\n                         f >> min_iter;\n                    }\n                    else if (s == \"Krestricted\"){\n                         Krestricted = true;\n                    }\n                    else{\n                       std::cout << \"Dirac Fock: unrecognized input keyword \" << s << std::endl;\n                       MADNESS_EXCEPTION(\"input error\", 0); \n                    }\n               }\n          } // end read()\n\n          // Prints all information\n          void print_params() const{\n               madness::print(\"\\n   Input Dirac Fock Parameters\");\n               madness::print(\"   -------------------------\");\n               madness::print(\"            Initial Guess File:\", archive);\n               madness::print(\"                           Job:\", job);\n               madness::print(\"          Refinement Threshold:\", thresh);\n               madness::print(\"                             k:\", k);\n               madness::print(\"Smallest Resolved Length Scale:\", small);\n               madness::print(\"                Max Iterations:\", max_iter);\n               madness::print(\"               Use KAIN Solver:\", kain);\n               if(kain) madness::print(\"     KAIN Solver Subspace Size:\", maxsub);\n               madness::print(\"                          Save:\", do_save);\n               madness::print(\"                     save file:\", savefile);\n               if(nucleus == 1){\n                    madness::print(\"                       Nucleus: fermi\");\n               }\n               else{\n                    madness::print(\"                       Nucleus: gaussian\");\n               }\n               madness::print(\"           Kramers restriction:\", Krestricted);\n               madness::print(\"                  Do Lineplots:\", lineplot);\n          }\n     };\n\n}\n#endif\n\n//kthxbye\n"
  },
  {
    "path": "src/apps/dirac/DFdriver.cc",
    "content": "/*\n *\n *   Main source file for the Dirac Fock code\n *\n */\n\n\n#include <madness/misc/info.h>\n#include \"DF.h\"    // All Dirac-Fock functions/objects enter through this\n#include <stdlib.h>\n\n#if defined(HAVE_SYS_TYPES_H) && defined(HAVE_SYS_STAT_H) && defined(HAVE_UNISTD_H)\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <unistd.h>\n// static inline int file_exists(const char * inpname)\n// {\n//      struct stat buffer;\n//      int rc = stat(inpname, &buffer);\n//      return (rc==0);\n// }\n#endif\n\nint main(int argc, char **argv) {\n\n    World& world = initialize(argc, argv);\n    if (world.rank() == 0) print_header1(\"DIRAC -- molecular Dirac-Fock code\");\n\n    // Load info for MADNESS numerical routines\n    startup(world, argc, argv, true);\n    if (world.rank() == 0) print(info::print_revision_information());\n\n    commandlineparser parser(argc, argv);\n    if (parser.key_exists(\"help\")) {\n        DF::help();\n\n    } else if (parser.key_exists(\"print_parameters\")) {\n        DF::print_parameters();\n\n    } else {\n\n        try {\n            // Create the DF object\n            DF my_calc(world, parser.value(\"input\").c_str());\n\n            // Have it iterate to convergence\n            my_calc.solve(world);\n        } catch (const SafeMPI::Exception& e) {\n            print(e);\n            error(\"caught an MPI exception\");\n        }\n        catch (const madness::MadnessException& e) {\n            print(e);\n            error(\"caught a MADNESS exception\");\n        }\n        catch (const madness::TensorException& e) {\n            print(e);\n            error(\"caught a Tensor exception\");\n        }\n        catch (const char *s) {\n            print(s);\n            error(\"caught a string exception\");\n        }\n        catch (const std::string& s) {\n            print(s);\n            error(\"caught a string (class) exception\");\n        }\n        catch (const std::exception& e) {\n            print(e.what());\n            error(\"caught an STL exception\");\n        }\n        catch (...) {\n            error(\"caught unhandled exception\");\n        }\n\n        // Nearly all memory will be freed at this point\n        world.gop.fence();\n        world.gop.fence();\n        print_stats(world);\n    } // world is dead -- ready to finalize\n    finalize();\n    return 0;\n}\n\n"
  },
  {
    "path": "src/apps/dirac/DFinput_sample",
    "content": "DiracFock\narchive /gpfs/projects/rjh/JoelsRestartData/H2Orestartdata\njob 0\nsmall 1e-5\nthresh 1e-6\nk 8\nkain\nmaxsub 5\nno_save\nend\n"
  },
  {
    "path": "src/apps/dirac/DKops.h",
    "content": "#ifndef MADNESS_APPS_MOLDFT_DKOPS_H_INCLUDED\n#define MADNESS_APPS_MOLDFT_DKOPS_H_INCLUDED\n\n\n#include <madness/mra/mra.h>\n#include <madness/constants.h>\n#include <madness/mra/operator.h>\n#include <iostream>\n#include <fstream>\n#include <exception>\n\n//#include \"../../../../mpfrc++-3/mpreal.h\"\n\nusing namespace madness;\n\nstatic const double opthresh = 1e-16;\n\ndouble q(double t){\n     return exp(-t);\n}\n\ndouble w(double t, double eps){\n     double c = 137.0359895;\n     double PI = constants::pi;\n     return 1.0/(c*sqrt(PI))*exp(-1.0/2.0*t-c*c*exp(-t))-(1.0+eps/(c*c))*exp((2.0*eps+(eps*eps)/(c*c))*exp(-t)-t)*(erfc((c+eps/c)*(exp(-t/2.0)))-2.0);\n}\n\ndouble Ebark(double t, double eps){\n     double R = 1e-8;\n     return pow(1.0/(2.0*q(t)), 1.5)*w(t, eps)*exp(-1.0/(4.0*q(t))*R*R);\n}\n\nreal_convolution_3d Ebar(World& world, double eps){\n     Vector<double,3> args = vec(0.0,0.0,0.0);\n\n\n     std::vector<double> cvec;\n     std::vector<double> tvec;\n\n     double fac = pow(2.0*constants::pi,-1.5);\n     double dt = 1.0/8.0;\n     double tval = -10.0;\n     while(tval < 100.0){\n\n          if(Ebark(tval, eps) > opthresh){\n               //if(world.rank()==0) print(\"   Ebark(\",tval,\",\",eps,\" = \",Ebark(tval,eps));\n               cvec.push_back(dt/pow(2.0*q(tval),1.5)*w(tval,eps)*fac);\n               tvec.push_back(1.0/(4.0*q(tval)));\n          }\n          //else{\n               //if(world.rank()==0) print(\"Ebark(\",tval,\",\",eps,\" = \",Ebark(tval,eps));\n\n          //}\n          tval = tval + dt;\n     }\n     \n     Tensor<double> ctensor(cvec.size());\n     Tensor<double> ttensor(tvec.size());\n     for(int i = 0; i < cvec.size(); i++){\n          ctensor[i] = cvec[i];\n          ttensor[i] = tvec[i];\n     }\n\n     int n = cvec.size();\n     //if(world.rank()==0) print(\"Made an Ebar! n = \",n);\n     //if(world.rank()==0) print(\"Made an Ebar! Here's what's inside:\\n\\nc:\\n\",ctensor,\"\\nt:\\n\",ttensor);\n\n     //test ebar?\n     /*\n     if(world.rank()==0) print(\"Testing Ebar. Value should be ~22.680321967196\");\n     double testvalue = 0.0;\n     for(int i = 0; i < cvec.size(); i++){\n          testvalue += ctensor[i]*exp(-1e-2*ttensor[i]);\n     }\n     if(world.rank()==0) print(\"And the result is: \", testvalue);\n     */\n\n     //return real_convolution_3d(world, args, ctensor, ttensor);\n     return real_convolution_3d(world, ctensor, ttensor);\n}\n\n//real_convolution_3d Ebar_fixed(World& world){\n//     //Tensor<double> c(305l), t(305l);\n//     std::vector<double> c(365), t(365);\n//     Vector<double,3> args = vec(0.0,0.0,0.0);\n//     #include \"RelCoeffs/Ebar_coeffs.dat\"\n//     int n = 305;\n//     \n//     for(int i=0; i < n; i++){\n//          if(c[i]*exp(-t[i]*1e-16) < opthresh){\n//               c.erase(c.begin()+i);\n//               t.erase(t.begin()+i);\n//               i--;\n//               n--;\n//          }\n//     }\n//     \n//     //print(\"n = \", n);\n//\n//     Tensor<double> ctens(n), ttens(n);\n//     for(int i = 0; i < n; i++){\n//          ctens[i] = c[i];\n//          ttens[i] = t[i];\n//     }\n//     //if(world.rank()==0) print(\"Made a Ebar (fixed)! n = \", n);\n//     //if(world.rank()==0) print(\"Made a Pbar! Here's what's inside:\\n\\nc:\\n\",ctens,\"\\nt:\\n\",ttens);\n//     //return real_convolution_3d(world, args, ctens, ttens);\n//     return real_convolution_3d(world, ctens, ttens);\n//}\n\nreal_convolution_3d Pbar(World& world){\n     //Tensor<double> c(305l), t(305l);\n     std::vector<double> c;\n     std::vector<double> t;\n     Vector<double,3> args = vec(0.0,0.0,0.0);\n\n     std::ifstream inf(\"/gpfs/home/jscanderson/DKproject/Pbar_t.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open Pbar_t.csv\" << std::endl;\n          exit(1);\n     }\n     std::string strInput;\n     getline(inf, strInput);\n     while(inf){\n          t.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading Pbar_t\");\n\n     inf.open(\"/gpfs/home/jscanderson/DKproject/Pbar_c.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open Pbar_c.csv\" << std::endl;\n          exit(1);\n     }\n     getline(inf, strInput);\n     while(inf){\n          //if(world.rank()==0) print(\"a\", strInput, \"b\");\n          c.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading Pbar_c\");\n     \n\n     int n = c.size();\n     /*\n     for(int i=0; i < n; i++){\n          if(c[i]*exp(-t[i]*1e-30) < opthresh){\n               c.erase(c.begin()+i);\n               t.erase(t.begin()+i);\n               i--;\n               n--;\n          }\n     }\n     */\n     //print(\"n = \", n);\n\n     Tensor<double> ctens(n), ttens(n);\n     for(int i = 0; i < n; i++){\n          ctens[i] = c[i];\n          ttens[i] = t[i];\n     }\n     //if(world.rank()==0) print(\"Made a Pbar! n = \", n);\n     //if(world.rank()==0) print(\"Made a Pbar! Here's what's inside:\\n\\nc:\\n\",ctens,\"\\nt:\\n\",ttens);\n     //return real_convolution_3d(world, args, ctens, ttens);\n     return real_convolution_3d(world, ctens, ttens);\n}\n\nreal_convolution_3d Tbar(World& world){\n     //Tensor<double> c(305l), t(305l);\n     std::vector<double> c;\n     std::vector<double> t;\n     Vector<double,3> args = vec(0.0,0.0,0.0);\n\n     std::ifstream inf(\"/gpfs/home/jscanderson/DKproject/Tbar_t.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open Tbar_t.csv\" << std::endl;\n          exit(1);\n     }\n     std::string strInput;\n     getline(inf, strInput);\n     while(inf){\n          t.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading Tbar_t\");\n\n     inf.open(\"/gpfs/home/jscanderson/DKproject/Tbar_c.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open Tbar_c.csv\" << std::endl;\n          exit(1);\n     }\n     getline(inf, strInput);\n     while(inf){\n          //if(world.rank()==0) print(\"a\", strInput, \"b\");\n          c.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading Tbar_c\");\n     \n\n     int n = c.size();\n     /*\n     for(int i=0; i < n; i++){\n          if(c[i]*exp(-t[i]*1e-30) < opthresh){\n               c.erase(c.begin()+i);\n               t.erase(t.begin()+i);\n               i--;\n               n--;\n          }\n     }\n     */\n     //print(\"n = \", n);\n\n     Tensor<double> ctens(n), ttens(n);\n     for(int i = 0; i < n; i++){\n          ctens[i] = c[i];\n          ttens[i] = t[i];\n     }\n     //if(world.rank()==0) print(\"Made a Tbar! n = \", n);\n     //if(world.rank()==0) print(\"Made a Pbar! Here's what's inside:\\n\\nc:\\n\",ctens,\"\\nt:\\n\",ttens);\n     //return real_convolution_3d(world, args, ctens, ttens);\n     return real_convolution_3d(world, ctens, ttens);\n}\n\n\nreal_convolution_3d A(World& world){\n     //Tensor<double> c(301l), t(301l);\n     std::vector<double> c, t;\n     Vector<double,3> args = vec(0.0,0.0,0.0);\n     \n     std::ifstream inf(\"/gpfs/home/jscanderson/DKproject/A_t.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open A_t.csv\" << std::endl;\n          exit(1);\n     }\n     std::string strInput;\n     getline(inf, strInput);\n     while(inf){\n          t.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading A_t\");\n\n     inf.open(\"/gpfs/home/jscanderson/DKproject/A_c.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open A_c.csv\" << std::endl;\n          exit(1);\n     }\n     getline(inf, strInput);\n     while(inf){\n          c.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading A_c\");\n\n     int n = c.size();\n     /*\n     for(int i=0; i < n; i++){\n          if(c[i]*exp(-t[i]*1e-30) < opthresh){\n               c.erase(c.begin()+i);\n               t.erase(t.begin()+i);\n               i--;\n               n--;\n          }\n     }\n     */\n     double fac = pow(2.0*constants::pi,1.5);\n     Tensor<double> ctens(n), ttens(n);\n     for(int i = 0; i < n; i++){\n          ctens[i] = c[i]*fac;\n          ttens[i] = t[i];\n     }\n     //if(world.rank()==0) print(\"Made an A!, n = \", n);\n     //if(world.rank()==0) print(\"Made an A! Here's what's inside:\\n\\nc:\\n\",ctens,\"\\nt:\\n\",ttens);\n     //return real_convolution_3d(world, args, ctens, ttens);\n     return real_convolution_3d(world, ctens, ttens);\n}\n\n//Same as A(World& world) above but adds 1/sqrt(2) to the largest coefficient\nreal_convolution_3d A2(World& world){\n     //Tensor<double> c(301l), t(301l);\n     std::vector<double> c, t;\n     Vector<double,3> args = vec(0.0,0.0,0.0);\n     \n     std::ifstream inf(\"/gpfs/home/jscanderson/DKproject/A_t.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open A_t.csv\" << std::endl;\n          exit(1);\n     }\n     std::string strInput;\n     getline(inf, strInput);\n     while(inf){\n          t.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading A_t\");\n\n     inf.open(\"/gpfs/home/jscanderson/DKproject/A_c.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open A_c.csv\" << std::endl;\n          exit(1);\n     }\n     getline(inf, strInput);\n     while(inf){\n          c.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading A_c\");\n\n     int n = c.size();\n     /*\n     for(int i=0; i < n; i++){\n          if(c[i]*exp(-t[i]*1e-30) < opthresh){\n               c.erase(c.begin()+i);\n               t.erase(t.begin()+i);\n               i--;\n               n--;\n          }\n     }\n     */\n     double fac = pow(2.0*constants::pi,1.5);\n     Tensor<double> ctens(n), ttens(n);\n     for(int i = 0; i < n; i++){\n          ctens[i] = c[i]*fac;\n          ttens[i] = t[i];\n     }\n     c[n-1] += 1/sqrt(2)*fac*std::pow(t[n-1]*constants::pi,1.5); //largest exponent is at the end, so add 1/sqrt(2) to the coefficient there\n     //if(world.rank()==0) print(\"Made an A!, n = \", n);\n     //if(world.rank()==0) print(\"Made an A! Here's what's inside:\\n\\nc:\\n\",ctens,\"\\nt:\\n\",ttens);\n     //return real_convolution_3d(world, args, ctens, ttens);\n     return real_convolution_3d(world, ctens, ttens);\n}\n\nreal_convolution_3d PbarA(World& world){\n     //Tensor<double> c(441l), t(441l);\n     std::vector<double> c, t;\n     Vector<double,3> args = vec(0.0,0.0,0.0);\n     \n     std::ifstream inf(\"/gpfs/home/jscanderson/DKproject/PbarA_t.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open PbarA_t.csv\" << std::endl;\n          exit(1);\n     }\n     std::string strInput;\n     getline(inf, strInput);\n     while(inf){\n          t.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading PbarA_t\");\n\n     inf.open(\"/gpfs/home/jscanderson/DKproject/PbarA_c.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open PbarA_c.csv\" << std::endl;\n          exit(1);\n     }\n     getline(inf, strInput);\n     while(inf){\n          c.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading PbarA_c\");\n\n     int n = c.size();\n     /*\n     for(int i=0; i < n; i++){\n          if(c[i]*exp(-t[i]*1e-30) < opthresh){\n               c.erase(c.begin()+i);\n               t.erase(t.begin()+i);\n               i--;\n               n--;\n          }\n     }\n     */\n     double fac = pow(2.0*constants::pi,1.5);\n     Tensor<double> ctens(n), ttens(n);\n     for(int i = 0; i < n; i++){\n          ctens[i] = c[i]*fac;\n          ttens[i] = t[i];\n     }\n     //if(world.rank()==0) print(\"Made a PbarA!, n = \", n);\n     //if(world.rank()==0) print(\"Made a PbarA! Here's what's inside:\\n\\nc:\\n\",ctens,\"\\nt:\\n\",ttens);\n     //return real_convolution_3d(world, args, ctens, ttens);\n     return real_convolution_3d(world, ctens, ttens);\n}\n\nstd::vector<real_convolution_3d_ptr> gradPbarA(World& world){\n     const double pi = constants::pi;\n     std::vector<double> c, t;\n     \n     std::ifstream inf(\"/gpfs/home/jscanderson/DKproject/PbarA_t.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open PbarA_t.csv\" << std::endl;\n          exit(1);\n     }\n     std::string strInput;\n     getline(inf, strInput);\n     while(inf){\n          t.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading PbarA_t\");\n\n     inf.open(\"/gpfs/home/jscanderson/DKproject/PbarA_c.csv\");\n     if(!inf){\n          if(world.rank() == 0) std::cerr << \"Unable to open PbarA_c.csv\" << std::endl;\n          exit(1);\n     }\n     getline(inf, strInput);\n     while(inf){\n          c.push_back(std::stod(strInput));\n          getline(inf, strInput);\n     }\n     inf.close();\n     //if(world.rank()==0) print(\"Done Reading PbarA_c\");\n\n     int n = c.size();\n     /*\n     for(int i=0; i < n; i++){\n          if(c[i]*exp(-t[i]*1e-30) < opthresh){\n               c.erase(c.begin()+i);\n               t.erase(t.begin()+i);\n               i--;\n               n--;\n          }\n     }\n     */\n     double fac = pow(2.0*pi,1.5);\n     for(int i = 0; i < n; i++){\n          c[i] = c[i]*fac;\n     }\n\n     const Tensor<double> width = FunctionDefaults<3>::get_cell_width();\n     const int k = FunctionDefaults<3>::get_k();\n     double hi = width.normf(); // Diagonal width of cell\n\n     std::vector<real_convolution_3d_ptr> gradG(3);\n\n     for (int dir=0; dir<3; dir++) {\n          std::vector< ConvolutionND<double,3> > ops(n);\n          for (int mu=0; mu<n; mu++) {\n          // We cache the normalized operator so the factor is the value we must multiply\n          // by to recover the coeff we want.\n          double cc = std::pow(t[mu]/pi,1.5); // Normalization coeff\n          ops[mu].setfac(c[mu]/cc/width[dir]);\n\n               for (int d=0; d<3; d++) {        \n                    if (d != dir) ops[mu].setop(d,GaussianConvolution1DCache<double>::get(k, t[mu]*width[d]*width[d], 0, false));\n               }\n          ops[mu].setop(dir,GaussianConvolution1DCache<double>::get(k, t[mu]*width[dir]*width[dir], 1, false));\n          }\n          gradG[dir] = real_convolution_3d_ptr(new SeparatedConvolution<double,3>(world, ops));\n     }\n\n     return gradG;\n\n}\n\n#endif\n"
  },
  {
    "path": "src/apps/dirac/InitParameters.h",
    "content": "\n/// \\file InitParameters\n/// \\brief Input parameters for a Dirac Fock calculation, read from a specified archive resulting from a nonrelativistic moldft calculation or restarted from a previous Dirac Fock calculation.\n\n\n#ifndef MADNESS_APPS_DFGUESSPARAMS_H_INCLUDED\n#define MADNESS_APPS_DFGUESSPARAMS_H_INCLUDED\n\n#include \"fcwf.h\"\n#include <madness/chem/NWChem.h>\n\nFunction<std::complex<double>,3> function_real2complex(const Function<double,3>& r);\ndouble myxfunc(const madness::coord_3d& r);\ndouble myyfunc(const madness::coord_3d& r);\n\nnamespace madness{\n\n\n     struct InitParameters{\n          // Ground state parameters that are read in from archive\n          std::string inFile;                      ///< Name of input archive to read in\n          double Init_total_energy;                ///< Total energy of the nonrelativistic ground state\n          bool spinrestricted;                     ///< Indicates if input calc. was spin-restricted\n          bool closed_shell;\n          unsigned int num_occupied;               ///< Number of orbitals\n          Tensor<double> energies;                 ///< Energies of input orbitals\n          Tensor<double> occ;                      ///< Occupancy of input orbitals\n          double L;                                ///< Box size of input - Dirac Fock calcluation is in same box\n          int order;                               ///< Order of polynomial used in input\n          Molecule molecule;                       ///< The molecule used in input calculation\n          std::vector<Fcwf> orbitals;              ///< The occupied orbitals \n\n          // Default constructor\n          InitParameters() {}\n\n          // Initializes InitParameters using the contents of file \\c filename\n          void read(World& world, const std::string& filename, bool restart, bool Krestricted){ \n               // Save the filename\n               inFile = filename;\n  \n               //First check to see if we're starting the job from a saved DF calculation rather than a moldft calculation\n               if(restart){\n                    if(world.rank()==0) print(\"\\n Reading initial data from restarted DF calculation\");\n                    archive::ParallelInputArchive input(world, filename.c_str());\n                    input & Init_total_energy;\n                    input & spinrestricted;\n                    input & closed_shell;\n                    input & num_occupied;\n                    input & energies;\n                    input & L;\n                    input & order;\n                    input & molecule;\n\n                    //Code breaks if spinrestricted (state of archive) and Krestricted (requested by user) don't match\n                    //This functionality could probably be added at some point, but it's a bit of work\n                    MADNESS_CHECK(spinrestricted == Krestricted);\n\n                    // Set this so we can read in whats\n                    // written in the archive \n                    FunctionDefaults<3>::set_k(order);\n                    FunctionDefaults<3>::set_cubic_cell(-L, L);\n\n                    //Now we just have to unpack the orbitals\n                    for(unsigned int i=0; i < num_occupied; i++){\n                         Fcwf reader(world);\n                         for(int j=0; j < 4; j++){\n                              input & reader[j];\n                         }\n                         orbitals.push_back(copy(reader));\n                    }\n               }\n               else{ //If we're not reading in from DF, then we're reading in from moldft\n\n                    //some dummy variables for reading/computing\n                    std::vector<int> dummy2;\n                    Tensor<double> temp_energies;\n\n                    //read in what's in the archive. See SCF::save_mos for how these archives are stored\n                    archive::ParallelInputArchive input(world, filename.c_str());\n                    unsigned int version=0;\n                    std::string xc;\n                    std::string localize_method;\n\n                    input & version;\n                    input & Init_total_energy;              // double\n                    input & spinrestricted;      // bool\n                    input & L;                   // double            box size\n                    input & order;               // int               wavelet order\n                    input & molecule;            // Molecule   \n                    input & xc;\n                    input & localize_method;\n\n                    input & num_occupied;        // int\n                    input & temp_energies;       // Tensor<double>    orbital energies\n                    input & occ;                 // Tensor<double>    orbital occupations\n                    input & dummy2;              // std::vector<int>  sets of orbitals(?)\n\n                    //For now assume spin-restricted means closed shell in moldft\n                    closed_shell = spinrestricted;\n\n                    // Check that order is positive and less than 30\n                    if (order < 1 or order > 30){\n                         if(world.rank() == 0) print(\"\\n   ***PLEASE NOTE***\\n   Invalid wavelet order read from archive, setting to 8.\\n   This seems to happen when the default wavelet order is used in moldft.\"); \n                         order = 8;\n                    }\n\n                    // Set this so we can read in whats\n                    // written in the archive \n                    FunctionDefaults<3>::set_k(order);\n                    FunctionDefaults<3>::set_cubic_cell(-L, L);\n                     \n                    //Now read in the orbitals and construct Fcwfs from them. \n                    complex_derivative_3d Dx(world,0);\n                    complex_derivative_3d Dy(world,1);\n                    complex_derivative_3d Dz(world,2);\n                    //double myc = 137.0359895; //speed of light in atomic units\n                    std::complex<double> myi(0,1);\n                    if(spinrestricted){ \n                         //If the calculation was spin-restricted in moldft, then we only have \"spin-up\" orbitals\n\n                         //Initialize some functions for reading in the orbitals\n                         real_function_3d reader;\n                         complex_function_3d complexreader;\n                         Fcwf spinup(world);\n                         Fcwf spindown(world); //used if !Krestricted\n                         real_function_3d xfunc = real_factory_3d(world).f(myxfunc);\n                         real_function_3d yfunc = real_factory_3d(world).f(myyfunc);\n                         \n                         //Handle Kramers-restricted and unrestricted cases differently\n                         if(Krestricted){\n                              //Loop over the occupied orbitals and convert\n                              for(unsigned int i = 0; i < num_occupied; i++){\n                                   //read in orbital\n                                   input & reader;\n\n                                   //change to a complex function\n                                   complexreader = function_real2complex(reader);\n\n                                   //build up the corresponding fcwfs, using kinetic balance to define the small component\n                                   spinup[0] = complexreader;\n                                   spinup[1] = complex_factory_3d(world);\n                                   spinup[2] = (-myi) * Dz(complexreader);\n                                   spinup[2].scale(0.5);\n                                   spinup[3] = (-myi) * (Dx(complexreader) + myi * Dy(complexreader));\n                                   spinup[3].scale(0.5);\n                                   spinup.normalize();\n                                   orbitals.push_back(spinup);\n                              }\n\n                              //Update energies\n                              energies = temp_energies;\n                         }\n                         else{\n                              //Loop over the occupied orbitals and convert\n                              for(unsigned int i = 0; i < num_occupied; i++){\n                                   //read in orbital\n                                   input & reader;\n\n                                   //change to a complex function\n                                   complexreader = function_real2complex(reader);\n\n                                   //build up the corresponding fcwfs, using kinetic balance to define the small component\n                                   spinup[0] = complexreader;\n                                   spinup[1] = complex_factory_3d(world);\n                                   spinup[2] = (-myi) * Dz(complexreader);\n                                   spinup[2].scale(0.5);\n                                   spinup[3] = (-myi) * (Dx(complexreader) + myi * Dy(complexreader));\n                                   spinup[3].scale(0.5);\n                                   spinup.normalize();\n                                   spindown[0] = complex_factory_3d(world);\n                                   spindown[1] = complexreader;\n                                   spindown[2] = (-myi) * (Dx(complexreader) - myi * Dy(complexreader));\n                                   spindown[2].scale(0.5);\n                                   spindown[3] = (myi) * Dz(complexreader);\n                                   spindown[3].scale(0.5);\n                                   spindown.normalize();\n                                   orbitals.push_back(spinup);\n                                   orbitals.push_back(spindown);\n                              }\n\n                              //Double length of energies tensor and fill in as needed.\n                              energies = Tensor<double>(2*num_occupied);\n                              for(unsigned int i = 0; i < num_occupied; i++){\n                                   energies[2*i] = temp_energies[i];\n                                   energies[2*i+1] = temp_energies[i];\n                              }\n                              num_occupied *= 2;\n                         }\n                    }\n                    else{\n\n                         if(world.rank()==0) print(\"number of alpha read in from moldft is:\" ,num_occupied);\n\n                         // Read in alpha ground state orbitals\n                         real_function_3d reader;\n                         complex_function_3d complexreader;\n                         Fcwf fcwfreader(world);\n                         for(unsigned int i = 0; i < num_occupied; i++){\n                              input & reader;\n                              complexreader = function_real2complex(reader);\n                              fcwfreader[0] = complexreader;\n                              fcwfreader[1] = complex_factory_3d(world);\n                              fcwfreader[2] = (-myi) * Dz(complexreader);\n                              fcwfreader[2].scale(0.5);\n                              fcwfreader[3] = (-myi) * (Dx(complexreader) + myi * Dy(complexreader));\n                              fcwfreader[3].scale(0.5);\n                              fcwfreader.normalize();\n                              orbitals.push_back(fcwfreader);\n                         }\n\n                         if(!Krestricted){\n                              // Read in beta quantities\n                              unsigned int num_betas=0;\n                              input & num_betas;\n\n                              Tensor<double> beta_energies;\n                              input & beta_energies;\n\n                              Tensor<double> dummy3;\n                              input & dummy3;\n\n                              std::vector<int> dummy4;\n                              input & dummy4;\n\n                              //read in beta ground state orbitals\n                              for(unsigned int i = 0; i < num_betas; i++){\n                                   input & reader;\n                                   complexreader = function_real2complex(reader);\n                                   fcwfreader[0] = complex_factory_3d(world);\n                                   fcwfreader[1] = complexreader;\n                                   fcwfreader[2] = (-myi) * (Dx(complexreader) - myi * Dy(complexreader));\n                                   fcwfreader[2].scale(0.5);\n                                   fcwfreader[3] = (myi) * Dz(complexreader);\n                                   fcwfreader[3].scale(0.5);\n                                   fcwfreader.normalize();\n                                   orbitals.push_back(fcwfreader);\n                              }\n\n                              //Handle energy tensor and number of occupied orbitals\n                              energies = Tensor<double>(num_occupied + num_betas);\n                              for(unsigned int i = 0; i < num_occupied; i++){\n                                   energies(i) = temp_energies(i);\n                              }\n                              for(unsigned int i = 0; i < num_betas; i++){\n                                   energies(num_occupied + i) = beta_energies(i);\n                              }\n                              num_occupied += num_betas;\n\n                         }\n                         else{\n                              energies = temp_energies;\n                         }\n\n\n\n                    }\n                    \n                    //reorder orbitals and energies in ascending order, if necessary.\n                    double tempdouble;\n                    Fcwf fcwfreader(world);\n                    for(unsigned int i = 0; i < num_occupied; i++){\n                         for(unsigned int j = i+1; j < num_occupied; j++){\n                              if(energies(j) < energies(i)){\n                                   if(world.rank()==0) print(\"swapping orbitals\", i, \" and \", j);\n                                   tempdouble = energies(j);\n                                   energies(j) = energies(i);\n                                   energies(i) = tempdouble;\n                                   fcwfreader = orbitals[j];\n                                   orbitals[j] = orbitals[i];\n                                   orbitals[i] = fcwfreader;\n                              }\n                         }\n                    }\n               }\n          }\n\n          //This function no longer works\n          //TODO: Update this function before using it\n          void readnw(World& world, const std::string& filename, bool Krestricted){\n               //Called to read in initial parameters from an nwchem output file\n               \n               //For now just use default values for L and order\n               order = 6;\n               L = 50.0;\n               FunctionDefaults<3>::set_k(order);\n               FunctionDefaults<3>::set_cubic_cell(-L, L);\n\n               //Need to set this to something...\n               Init_total_energy = 0.0;\n               \n               //Construct interface object from slymer namespace\n               slymer::NWChem_Interface nwchem(filename,std::cout);\n\n               //For parallel runs, silencing all but 1 slymer instance\n               if(world.rank() != 0) {\n                    std::ostream dev_null(nullptr);\n                    nwchem.err = dev_null;\n               }\n\n               //Read in basis set\n               nwchem.read(slymer::Properties::Basis);\n\n               //Read in the molecular orbital coefficients, energies, and occupancies\n               nwchem.read(slymer::Properties::Energies | slymer::Properties::MOs | slymer::Properties::Occupancies);\n\n               //Need to construct a molecule object by ourselves\n               molecule = Molecule();\n               unsigned int anum;\n               double x,y,z,q;\n               for(unsigned int i=0; i < nwchem.atoms.size(); i++){\n                    anum = symbol_to_atomic_number(nwchem.atoms[i].symbol);\n                    q = anum*1.0;\n                    x = nwchem.atoms[i].position[0];\n                    y = nwchem.atoms[i].position[1];\n                    z = nwchem.atoms[i].position[2];\n                    molecule.add_atom(x,y,z,q,anum);\n               }\n\n               //Find out how many orbitals we're dealing with by looking at the occupancies\n               unsigned int numalpha(0), numbeta(0);\n\n               bool have_beta(false);\n               for(unsigned int i = 0; i < nwchem.beta_occupancies.size(); i++){\n                    if(nwchem.beta_occupancies[i] > 0.0) have_beta = true;\n               }\n               \n               if(have_beta){\n                    //we're reading from an unrestricted calculation\n                    //and for now we will assume this is an open shell calculation\n                    for(unsigned int i = 0; i < nwchem.occupancies.size(); i++){\n                         if(nwchem.occupancies[i] == 1.0) numalpha+=1;\n                    }\n                    for(unsigned int i = 0; i < nwchem.beta_occupancies.size(); i++){\n                         if(nwchem.beta_occupancies[i] == 1.0) numbeta+=1;\n                    }\n\n                    //Right now DF can only handle a single unpaired electron\n                    MADNESS_CHECK(numalpha-1 == numbeta);\n               }\n               else{\n                    for(unsigned int i = 0; i < nwchem.occupancies.size(); i++){\n                         if(nwchem.occupancies[i] == 2.0) numalpha += 1;\n                    }\n                    numbeta = numalpha;\n               }\n               closed_shell = !have_beta;\n               \n               //correctly set the number of occupied orbitals for the DF calculation\n               if(Krestricted){\n                    num_occupied = numalpha;\n               }\n               else{\n                    num_occupied = numalpha+numbeta;\n               }\n\n\n               //Let's print everything so we have a visual check on what we're working with (for now)\n               if(world.rank()==0) print(\"\\nalpha occupancies:\\n\",nwchem.occupancies);\n               if(world.rank()==0) print(\"\\nbeta occupancies:\\n\",nwchem.beta_occupancies);\n               if(world.rank()==0) print(\"\\nenergies:\\n\",nwchem.energies);\n               if(world.rank()==0) print(\"\\nbeta energies:\\n\",nwchem.beta_energies);\n               if(world.rank()==0) print(\"num alpha\",numalpha);\n               if(world.rank()==0) print(\"num beta\",numbeta);\n\n\n               //Now that we know how many orbitals we have. initialize and fill energy tensor\n               energies = Tensor<double>(num_occupied);\n               if(Krestricted){\n                    for(unsigned int i=0; i < numalpha; i++){\n                         energies[i] = nwchem.energies[i];\n                    }\n               }\n               else{\n                    if(closed_shell){\n                         for(unsigned int i=0; i < numalpha; i++){\n                              energies[2*i] = nwchem.energies[i];\n                              energies[2*i+1] = nwchem.energies[i];\n                         }\n                    }\n                    else{\n                         for(unsigned int i=0; i < numalpha-1; i++){\n                              energies[2*i] = nwchem.energies[i];\n                              energies[2*i+1] = nwchem.energies[i];\n                         }\n                         energies[2*(numalpha-1)] = nwchem.energies[numalpha-1];\n                    }\n               }\n\n               //Cast the 'basis set' into a Gaussian basis and iterate over it\n               vector_real_function_3d temp1;\n               int ii = 0;\n               for(auto basis : slymer::cast_basis<slymer::GaussianFunction>(nwchem.basis_set)) {\n                    //Get the center of gaussian as its special point\n                    std::vector<coord_3d> centers;\n                    coord_3d r;\n                    r[0] = basis.get().center[0]; r[1] = basis.get().center[1]; r[2] = basis.get().center[2];\n                    centers.push_back(r);\n\n                    //Now make the function\n                    temp1.push_back(FunctionFactory<double,3>(world).functor(std::shared_ptr<FunctionFunctorInterface<double,3>>(new slymer::Gaussian_Functor(basis.get(), centers))));\n                    double norm2 = temp1[ii].norm2();\n                    if(world.rank() == 0) print(\"function\", ii, \"has norm\", norm2);\n                    ii++;\n               }\n\n               //Normalize aos\n               normalize(world, temp1);\n\n               //Transform aos now to get alpha mos\n               vector_real_function_3d temp = transform(world, temp1, nwchem.MOs , true);\n\n               //Convert and store alpha occupied MOs.\n               complex_function_3d complexreader(world);\n               Fcwf spinup(world);\n               Fcwf spindown(world);\n               complex_derivative_3d Dx(world,0);\n               complex_derivative_3d Dy(world,1);\n               complex_derivative_3d Dz(world,2);\n               std::complex<double> myi(0,1);\n               for(unsigned int i = 0; i < numalpha-1; i++){\n                    complexreader = function_real2complex(temp[i]);\n                    spinup[0] = complexreader;\n                    spinup[1] = complex_factory_3d(world);\n                    spinup[2] = (-myi) * Dz(complexreader);\n                    spinup[2].scale(0.5);\n                    spinup[3] = (-myi) * (Dx(complexreader) + myi * Dy(complexreader));\n                    spinup[3].scale(0.5);\n                    spinup.normalize();\n                    orbitals.push_back(spinup);\n                    if(!Krestricted){\n                         spindown[0] = complex_factory_3d(world);\n                         spindown[1] = complexreader;\n                         spindown[2] = (-myi) * (Dx(complexreader) - myi * Dy(complexreader));\n                         spindown[2].scale(0.5);\n                         spindown[3] = (myi) * Dz(complexreader);\n                         spindown[3].scale(0.5);\n                         spindown.normalize();\n                         orbitals.push_back(spindown);\n                    }\n               }\n               complexreader = function_real2complex(temp[numalpha-1]);\n               spinup[0] = complexreader;\n               spinup[1] = complex_factory_3d(world);\n               spinup[2] = (-myi) * Dz(complexreader);\n               spinup[2].scale(0.5);\n               spinup[3] = (-myi) * (Dx(complexreader) + myi * Dy(complexreader));\n               spinup[3].scale(0.5);\n               spinup.normalize();\n               orbitals.push_back(spinup);\n               if(closed_shell and not Krestricted){\n                    spindown[0] = complex_factory_3d(world);\n                    spindown[1] = complexreader;\n                    spindown[2] = (-myi) * (Dx(complexreader) - myi * Dy(complexreader));\n                    spindown[2].scale(0.5);\n                    spindown[3] = (myi) * Dz(complexreader);\n                    spindown[3].scale(0.5);\n                    spindown.normalize();\n                    orbitals.push_back(spindown);\n               }\n\n               //Assure that the numbers line up\n               MADNESS_ASSERT(num_occupied == orbitals.size());\n\n          }\n\n          // Prints all information\n          void print_params() const\n          {\n               madness::print(\"\\n     Input Parameters\");\n               madness::print(\"   -------------------------\");\n               madness::print(\"         Input Archive:\", inFile);\n               madness::print(\"       Spin Restricted:\", spinrestricted);\n               madness::print(\"  No. of occ. orbitals:\", num_occupied);\n               madness::print(\"                     L:\", L);\n               madness::print(\"         Wavelet Order:\", order);\n               madness::print(\"  Initial Total Energy:\", Init_total_energy);\n               madness::print(\"      Orbital Energies:\", energies);\n          }\n     };\n}\n#endif\n\n//kthxbye\n"
  },
  {
    "path": "src/apps/dirac/README",
    "content": "Basic instructions to run the Dirac Hartree-Fock code.\n\nCan start from moldft or a previous DFdriver calculation.  There is nearly working functionality to restart from NWChem (look at readnw() in InitParamters.h) that would have multiple advantages, though note that moldft can be started from NWChem.\n\n1) Be atom starting from moldft\n\nRun moldft with\n---------\ndft\n xc hf\nend\n\ngeometry\n be 0 0 0\nend\n---------\n\nThen run DFdriver with\n---------\nDiracFock\n  archive be.restartdata\n  small 1e-5\n  thresh 1e-6\n  kain\n  maxsub 5\n  no_save\nend\n---------\n\nList of interesting input options (from DFParameters.h)\n\n          std::string archive;         ///< Name of input archive to read in ground state\n          int max_iter;                ///< Maximum number of iterations\n          double small;                ///< Minimum length scale to be resolved\n          double thresh;               ///< Accuracy criterion when truncating\n          int k;                       ///< Number of legendre polynomials in scaling basis\n          bool kain;                   ///< Turns on KAIN nonlinear solver \n          int maxsub;                  ///< Sets maximum subspace size for KAIN\n          double maxrotn;              ///< maximum step allowed by kain\n          bool restart;                ///< Indicates this is a restarted DF job\n          int nucleus;                 ///< Indicates which nucleus model to use (1 for fermi, anything else for Gaussian)\n          bool do_save;                ///< Whether or not to save after each iteration. Defaults to true. Turn off with 'no_save'\n          std::string savefile;        ///< Gives the file to save the archive each iteration Default: DFrestartdata (in working directory)\n          int lb_iter;                 ///< How many iterations to load balance (after the initial load balancing)\n          bool lineplot;               ///< Whether or not to make lineplots at the end of the job\n          bool no_compute;             ///< If true, will skip all computation\n          double bohr_rad;             ///< bohr radius in fm (default: 52917.7211)\n          int min_iter;                ///< minimum number of iterations (default: 2)\n\n(Kramers restricted does not seem to be working --- bug in the exchange piece?)\n\n"
  },
  {
    "path": "src/apps/dirac/fcwf.cc",
    "content": "#include \"fcwf.h\"\n\n//Fcwf (Four component wavefunction) implementation file\n//NOTE: The small component of an Fcwf is scaled by c and then stored\n//This means that when computing properties and some other operations,\n//care must be taken to remove the extra factors of c in the result\n\nusing namespace madness;\n\n//Default constructor can't do much other than state that the fcwf hasn't been initialized \nFcwf::Fcwf(){\n     m_initialized = false;\n}\n\n//Constructor that takes four complex functions and uses them to make the Fcwf\nFcwf::Fcwf(const complex_function_3d& wf1,\n     const complex_function_3d& wf2,\n     const complex_function_3d& wf3,\n     const complex_function_3d& wf4){\n     MADNESS_ASSERT(m_psi.size() == 0);\n     m_psi.push_back(wf1);\n     m_psi.push_back(wf2);\n     m_psi.push_back(wf3);\n     m_psi.push_back(wf4);\n     m_initialized = true;\n}\n\n//This constructor creates a zero Fcwf\nFcwf::Fcwf(World& world){\n     MADNESS_ASSERT(m_psi.size() == 0);\n     for(int i = 0 ; i < 4 ; i ++){\n          m_psi.push_back(complex_factory_3d(world));\n     }\n     m_initialized = true;\n}\n\n//give access to the individual components\ncomplex_function_3d& Fcwf::operator[](const int i){\n     MADNESS_ASSERT(i >= 0 && i <= 3);\n     MADNESS_ASSERT(m_initialized);\n     return m_psi[i];\n}\n\nconst complex_function_3d& Fcwf::operator[](const int i) const {\n     MADNESS_ASSERT(i >= 0 && i <= 3);\n     MADNESS_ASSERT(m_initialized);\n     return m_psi[i];\n}\n\n//Can also initialize from a vector of complex functions\nFcwf::Fcwf(std::vector<complex_function_3d>& phi){\n     MADNESS_ASSERT(m_psi.size() == 0);\n     MADNESS_ASSERT(phi.size() == 4);\n     for(int i = 0 ; i < 4 ; i++){\n          m_psi.push_back(phi[i]);\n     }\n     m_initialized=true;\n}\n\n//learn whether an Fcwf is initialized\nbool Fcwf::getinitialize(){\n     return m_initialized;\n}\n\nbool Fcwf::getinitialize() const {\n     return m_initialized;\n}\n\n//Probably don't need this, but get the size of m_psi, which should only be 0 or 4\nunsigned int Fcwf::size(){\n     MADNESS_ASSERT(m_initialized);\n     return m_psi.size();\n}\n\nunsigned int Fcwf::size() const {\n     MADNESS_ASSERT(m_initialized);\n     return m_psi.size();\n}\n\n//copy constructor defaults to deep copy\n//if this ever changes, you will need to change the copy() function, as it calls this\nFcwf::Fcwf(const Fcwf& phi){\n     MADNESS_ASSERT(m_psi.size() == 0);\n     MADNESS_ASSERT(phi.size() == 4);\n     for(int i = 0 ; i < 4 ; i++){\n          m_psi.push_back(copy(phi[i]));\n     }\n     m_initialized = true;\n}\n\n//Assignment operator defaults to shallow copy\nFcwf Fcwf::operator=(const Fcwf& phi){\n     m_psi = phi.m_psi;\n     m_initialized = phi.m_initialized;\n     return *this;\n}\n\n//subtract two Fcwfs. The Fcwf being subtracted must be initialized\nFcwf Fcwf::operator-(const Fcwf& phi) const {\n     MADNESS_ASSERT(phi.getinitialize());\n     std::vector<complex_function_3d> temp;\n     if(m_initialized){\n          for(int i = 0 ; i < 4 ; i++){\n               temp.push_back(m_psi[i] - phi[i]);\n          }\n     }\n     else {\n          for(int i = 0 ; i < 4 ; i++){\n               temp.push_back(copy(phi[i]));\n               temp[i].scale(-1.0);\n          }\n     }\n     return Fcwf(temp);\n}\n\n//add two Fcwfs. The Fcwf being added must be initialized\nFcwf Fcwf::operator+(const Fcwf& phi){\n     MADNESS_ASSERT(phi.getinitialize());\n     std::vector<complex_function_3d> temp;\n     if(m_initialized){\n          for(int i = 0 ; i < 4 ; i++){\n               temp.push_back(m_psi[i] + phi[i]);\n          }\n     }\n     else {\n          for(int i = 0 ; i < 4 ; i++){\n               temp.push_back(copy(phi[i]));\n          }\n     }\n     return Fcwf(temp);\n}\n\n//multiply an Fcwf by a complex number a\nFcwf Fcwf::operator*(std::complex<double> a) const {\n     MADNESS_ASSERT(m_initialized);\n     std::vector<complex_function_3d> temp(4);\n     for(int i = 0 ; i < 4 ; i++){\n          temp[i] = a*m_psi[i];    \n     }\n     return Fcwf(temp);\n}\n\n//scale an Fcwf in place by a complex number a\nvoid Fcwf::scale(std::complex<double> a){\n     MADNESS_ASSERT(m_initialized);\n     for(int i = 0 ; i < 4 ; i++){\n          m_psi[i].scale(a);\n     }\n}\n\n//in place addition of Fcwfs. Fcwf on right must be initialized\nFcwf Fcwf::operator+=(const Fcwf& phi){\n     MADNESS_ASSERT(phi.getinitialize());\n     if(m_initialized){\n          for(int i = 0 ; i < 4 ; i++){\n               m_psi[i] += phi[i];\n          }\n     }\n     else {\n          for(int i = 0 ; i < 4 ; i++){\n               m_psi.push_back(copy(phi[i]));\n          }\n          m_initialized = true;\n     }\n     return *this;\n}\n\n//in place subtraction of Fcwfs. Fcwf on right must be initialized\nFcwf Fcwf::operator-=(const Fcwf& phi){\n     MADNESS_ASSERT(phi.getinitialize());\n     if(m_initialized){\n          for(int i = 0 ; i < 4 ; i++){\n               m_psi[i] -= phi[i];\n          }\n     }\n     else {\n          for(int i = 0 ; i < 4 ; i++){\n               m_psi.push_back(copy(phi[i]));\n               m_psi[i].scale(-1.0);\n          }\n          m_initialized = true;\n     }\n     return *this;\n}\n\n//Returns the 2-norm of an initialized Fcwf\ndouble Fcwf::norm2(){\n     MADNESS_ASSERT(m_initialized);\n     double c2 = 137.0359895*137.0359895; //speed of light in atomic units\n     std::complex<double> temp(0,0);\n\n     temp += madness::inner(m_psi[0],m_psi[0]);\n     temp += madness::inner(m_psi[1],m_psi[1]);\n\n     //Small component is stored with an additional factor of c, so remove it here\n     temp += madness::inner(m_psi[2],m_psi[2])/c2;\n     temp += madness::inner(m_psi[3],m_psi[3])/c2;\n\n     return std::sqrt(std::real(temp));\n}\n\n//Normalize the input Fcwf\nvoid Fcwf::normalize(){\n     MADNESS_ASSERT(m_initialized);\n     double norm = norm2();\n     MADNESS_ASSERT(norm != 0.0);\n     for(int i = 0 ; i < 4 ; i++){\n          m_psi[i].scale(1.0/norm);\n     }\n}\n\n//multiply an Fcwf by a complex function\nFcwf Fcwf::operator*(madness::complex_function_3d& phi){\n     MADNESS_ASSERT(m_initialized);\n     std::vector<complex_function_3d> temp(4);\n     for(int i = 0 ; i < 4 ; i++){\n          temp[i] = phi*m_psi[i];\n     }\n     return Fcwf(temp);\n}\n\nFcwf Fcwf::operator*(madness::real_function_3d& phi){\n     MADNESS_ASSERT(m_initialized);\n     std::vector<complex_function_3d> temp(4);\n     for(int i = 0 ; i < 4 ; i++){\n          temp[i] = phi*m_psi[i];\n     }\n     return Fcwf(temp);\n}\n\n//truncate\nvoid Fcwf::truncate(){\n     MADNESS_ASSERT(m_initialized);\n     for(int i = 0 ; i < 4 ; i++){\n          m_psi[i].truncate();    \n     }\n}\n\n//Returns the inner product of two Fcwfs\nstd::complex<double> Fcwf::inner(World& world, const Fcwf& phi) const{\n     MADNESS_ASSERT(m_initialized && phi.getinitialize());\n     double c2 = 137.0359895*137.0359895; //speed of light in atomic units\n     std::complex<double> temp(0,0);\n\n     temp += madness::inner(m_psi[0],phi.m_psi[0]);\n     temp += madness::inner(m_psi[1],phi.m_psi[1]);\n\n     //Small component is stored with an extra factor of c, so remove that here\n     temp += madness::inner(m_psi[2],phi.m_psi[2])/c2;\n     temp += madness::inner(m_psi[3],phi.m_psi[3])/c2;\n\n     return temp;\n}\n\n//Apply an integral operator to an Fcwf\nvoid Fcwf::apply(World& world, real_convolution_3d& op){\n     m_psi = madness::apply(world, op, m_psi);\n}\n\n//Apply a derivative operator to an Fcwf\nvoid Fcwf::apply(World& world, complex_derivative_3d& D){\n     m_psi = madness::apply(world, D, m_psi);\n}\n\n//Return result of time-reversal of the input Fcwf\nFcwf Fcwf::KramersPair(){\n     complex_function_3d phi0 = -1.0*conj(m_psi[1]);\n     complex_function_3d phi1 = conj(m_psi[0]);\n     complex_function_3d phi2 = -1.0*conj(m_psi[3]);\n     complex_function_3d phi3 = conj(m_psi[2]);\n     return Fcwf(phi0,phi1,phi2,phi3);\n}\n\n//function for computing the inner product of two Fcwfs\nstd::complex<double> inner(const Fcwf& psi, const Fcwf& phi){\n     MADNESS_ASSERT(psi.getinitialize() && phi.getinitialize());\n     return psi.inner(psi[0].world(), phi);\n}\n\n//function for applying an integral operator fo an Fcwf\nFcwf apply(World& world, real_convolution_3d& op, const Fcwf& psi){\n     Fcwf temp = copy(psi);\n     temp.apply(world, op);\n     return temp;\n}\n\n//function for applying an integral operator fo an Fcwf\nFcwf apply(World& world, complex_derivative_3d& D, const Fcwf& psi){\n     Fcwf temp = copy(psi);\n     temp.apply(world, D);\n     return temp;\n}\n\n//Returns the square modulus of an Fcwf, which is a real function\nreal_function_3d squaremod(Fcwf& psi){\n     MADNESS_ASSERT(psi.getinitialize());\n     double c2 = 137.0359895*137.0359895; //speed of light in atomic units\n     real_function_3d temp = abssq(psi[0]) + abssq(psi[1]) + abssq(psi[2]).scale(1.0/c2) + abssq(psi[3]).scale(1.0/c2);\n     return temp;\n}\n\n//Returns the square modulus of the small component of an Fcwf, which is a real function\nreal_function_3d squaremod_small(Fcwf& psi){\n     MADNESS_ASSERT(psi.getinitialize());\n     double c2 = 137.0359895*137.0359895; //speed of light in atomic units\n     real_function_3d temp = (abssq(psi[2]) + abssq(psi[3])).scale(1.0/c2); //don't forget the factor of c^2\n     return temp;\n}\n\n//Returns the square modulus of the large component of an Fcwf, which is a real function\nreal_function_3d squaremod_large(Fcwf& psi){\n     MADNESS_ASSERT(psi.getinitialize());\n     real_function_3d temp = abssq(psi[0]) + abssq(psi[1]);\n     return temp;\n}\n\n//compute the function inner product between two Fcwfs. Result is a complex function.\ncomplex_function_3d inner_func(World& world, Fcwf& psi, Fcwf& phi){\n     MADNESS_ASSERT(psi.getinitialize() && phi.getinitialize());\n     double c = 137.0359895; //speed of light in atomic units\n     std::vector<complex_function_3d> a(4);\n     std::vector<complex_function_3d> b(4);\n     for(unsigned int i = 0; i < 2; i++){\n          a[i] = psi[i];\n          b[i] = phi[i];\n     }\n     //Small components are stored with an extra factor of c, so remove those here\n     for(unsigned int i = 2; i < 4; i++){\n          a[i] = copy(psi[i]).scale(1.0/c);\n          b[i] = copy(phi[i]).scale(1.0/c);\n     }\n     //vmra function call takes care of the rest\n     complex_function_3d result = sum(world, mul(world, conj(world, a), b)); \n     return result;\n}\n\n//deep copy of an Fcwf\nFcwf copy(Fcwf psi){\n     return Fcwf(psi);\n\n}\n\n//takes the inner product between two vectors of Fcwfs. Result is a complex number\nstd::complex<double> inner(std::vector<Fcwf>& a, std::vector<Fcwf>& b){\n     MADNESS_ASSERT(a.size() == b.size());\n     std::complex<double> result(0,0);\n     for(size_t i = 0; i < a.size(); i++){\n          result += inner(a[i],b[i]);    \n     }\n     return result;\n}\n\n//Multiply a vector of Fcwfs by a scalar\nstd::vector<Fcwf> operator*(const std::vector<Fcwf>& psis, std::complex<double> a){\n     std::vector<Fcwf> result;\n     if(psis.size() != 0){\n          for(size_t i = 0; i < psis.size(); i++){\n               result.push_back(psis[i]*a);\n          }\n     }\n     return result;\n}\n\nstd::vector<Fcwf> operator*(std::complex<double> a, const std::vector<Fcwf>& psis){\n     std::vector<Fcwf> result;\n     if(psis.size() != 0){\n          for(size_t i = 0; i < psis.size(); i++){\n               result.push_back(psis[i]*a);\n          }\n     }\n     return result;\n}\n\n//In-place addition for a vector of Fcwfs\nvoid operator+=(std::vector<Fcwf>& phi, const std::vector<Fcwf>& psi){\n     if(phi.size()==0){\n          phi = psi;\n     }\n     else if(psi.size() != 0){\n          MADNESS_ASSERT(phi.size()==psi.size());\n          for(size_t i=0; i < psi.size(); i++){\n               phi[i]+=psi[i];\n          }\n     }\n}\n\n//Subtraction for two vectors of Fcwfs\nstd::vector<Fcwf> operator-(const std::vector<Fcwf>& phi, const std::vector<Fcwf>& psi){\n     std::vector<Fcwf> result;\n     if(psi.size()==0){\n          result = phi;\n     }\n     else if(phi.size()==0){\n          result = -1.0*psi;\n     }\n     else{\n          MADNESS_ASSERT(phi.size()==psi.size());\n          for(size_t i=0; i < psi.size(); i++){\n               result.push_back(phi[i]-psi[i]);\n          }\n     }\n     return result;\n}\n\n//Constructor for allocator for vector of Fcwfs\nFcwf_vector_allocator::Fcwf_vector_allocator(World& world, unsigned int m_size)\n: world(world)\n, m_size(m_size)\n{}\n\n//Overloading () operator\nstd::vector<Fcwf> Fcwf_vector_allocator::operator()(){\n     std::vector<Fcwf> result;\n     for(unsigned int i=0; i < m_size; i++){\n          result.push_back(Fcwf(world));\n     }\n     return result;\n}\n\n//Copy Constructor for allocator. Necessary for KAIN\nFcwf_vector_allocator Fcwf_vector_allocator::operator=(const Fcwf_vector_allocator& other){\n     Fcwf_vector_allocator tmp(world, other.m_size);\n     return tmp;\n}\n\nvoid Fcwf_vector_allocator::set_size(int size){\n     m_size = size;\n}\n\n//Forms the outer product between two vectors of Fcwfs, where each matrix element is the inner product of the two contributing Fcwfs.\nTensor<std::complex<double>> matrix_inner(World& world, std::vector<Fcwf>& a, std::vector<Fcwf>& b){\n     unsigned int n = a.size();\n     unsigned int m = b.size();\n     //MADNESS_ASSERT(n==m);\n\n     double c2 = 137.0359895*137.0359895; //speed of light in atomic units\n\n     //Reassign the vectors of Fcwfs to vectors of complex functions to facilitate use of vmra functions\n     std::vector<complex_function_3d> a_1(n); //all first components of Fcwfs in input a\n     std::vector<complex_function_3d> a_2(n); //all second components of Fcwfs in input a\n     std::vector<complex_function_3d> a_3(n);\n     std::vector<complex_function_3d> a_4(n);\n     std::vector<complex_function_3d> b_1(m); //all first components of Fcwfs in input b\n     std::vector<complex_function_3d> b_2(m);\n     std::vector<complex_function_3d> b_3(m);\n     std::vector<complex_function_3d> b_4(m);\n\n     for(unsigned int i = 0; i < n; i++){\n          a_1[i] = a[i][0];\n          a_2[i] = a[i][1];\n          a_3[i] = a[i][2];\n          a_4[i] = a[i][3];\n     }\n     for(unsigned int i = 0; i < m; i++){\n          b_1[i] = b[i][0];\n          b_2[i] = b[i][1];\n          b_3[i] = b[i][2];\n          b_4[i] = b[i][3];\n     }\n\n     //create 4 matrices which are the inner products of the components and add them\n     Tensor<std::complex<double>> component1 = matrix_inner(world, a_1, b_1);\n     Tensor<std::complex<double>> component2 = matrix_inner(world, a_2, b_2);\n\n     //don't forget that small components are scaled by c\n     Tensor<std::complex<double>> component3 = (1.0/c2)*matrix_inner(world, a_3, b_3);\n     Tensor<std::complex<double>> component4 = (1.0/c2)*matrix_inner(world, a_4, b_4);\n\n     //add\n     component1=component1+component2+component3+component4;\n\n     //return\n     return component1;\n}\n\n//Transform a (row) vector of Fcwfs by right-multiplying by a transformation matrix U\nstd::vector<Fcwf> transform(World& world, std::vector<Fcwf>& a, Tensor<std::complex<double>> U){\n     unsigned int n = a.size();\n     unsigned int m = U.dim(0);\n     unsigned int k = U.dim(1);\n     MADNESS_ASSERT(n==m); //make sure dimensions align\n\n     //Make vectors of the individual components to facilitate use of vmra\n     std::vector<complex_function_3d> a_1(n);\n     std::vector<complex_function_3d> a_2(n);\n     std::vector<complex_function_3d> a_3(n);\n     std::vector<complex_function_3d> a_4(n);\n     for(unsigned int i = 0; i < n; i++){\n          a_1[i] = a[i][0];\n          a_2[i] = a[i][1];\n          a_3[i] = a[i][2];\n          a_4[i] = a[i][3];\n     }\n\n     //transform the component vectors\n     a_1 = transform(world, a_1, U);\n     a_2 = transform(world, a_2, U);\n     a_3 = transform(world, a_3, U);\n     a_4 = transform(world, a_4, U);\n\n     //Now put the components back into Fcwf form and push back into a vector\n     std::vector<Fcwf> result;\n     Fcwf reader(world); \n     for(unsigned int i = 0; i < k; i++){\n          reader[0] = a_1[i];\n          reader[1] = a_2[i];\n          reader[2] = a_3[i];\n          reader[3] = a_4[i];\n          result.push_back(reader); \n     }\n\n     return result;\n     \n}\n\n//loop through fcwf and reconstruct each function\nvoid Fcwf::reconstruct(){\n     MADNESS_ASSERT(m_initialized); \n     for(unsigned int i = 0; i < 4; i++) m_psi[i].reconstruct();\n}\n\n//loop through fcwf and compress each function\nvoid Fcwf::compress(){\n     MADNESS_ASSERT(m_initialized); \n     for(unsigned int i = 0; i < 4; i++) m_psi[i].compress();\n}\n\n//kthxbye\n"
  },
  {
    "path": "src/apps/dirac/fcwf.h",
    "content": "#ifndef MADNESS_APPS_MOLDFT_FCWF_H_INCLUDED\n#define MADNESS_APPS_MOLDFT_FCWF_H_INCLUDED\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <vector>\n#include <math.h>\n#include <complex>\n\nusing namespace madness;\n\nclass Fcwf{\n     std::vector<complex_function_3d> m_psi;\n     bool m_initialized;\n\npublic:\n     \n     Fcwf();\n\n     Fcwf(const complex_function_3d& wf1,\n          const complex_function_3d& wf2,\n          const complex_function_3d& wf3,\n          const complex_function_3d& wf4);\n\n     Fcwf(World& world);\n\n     complex_function_3d& operator[](const int i);\n\n     const complex_function_3d& operator[](const int i) const ;\n     \n     explicit Fcwf(std::vector<complex_function_3d>& phi);\n\n     bool getinitialize();\n\n     bool getinitialize() const ;\n\n     unsigned int size();\n\n     unsigned int size() const ;\n\n     Fcwf(const Fcwf& phi);\n\n     Fcwf operator=(const Fcwf& phi);\n\n     Fcwf operator-(const Fcwf& phi) const ;\n\n     Fcwf operator+(const Fcwf& phi);\n\n     Fcwf operator*(std::complex<double> a) const ;\n     \n     void scale(std::complex<double> a);\n     \n     Fcwf operator+=(const Fcwf& phi);\n\n     Fcwf operator-=(const Fcwf& phi);\n\n     double norm2();\n\n     void normalize();\n\n     Fcwf operator*(madness::complex_function_3d& phi);\n\n     Fcwf operator*(madness::real_function_3d& phi);\n\n     void truncate();\n\n     std::complex<double>  inner(World& world, const Fcwf& phi) const;\n\n     void apply(World& world, real_convolution_3d& op);\n\n     void apply(World& world, complex_derivative_3d& D);\n     \n     void reconstruct();\n\n     void compress();\n\n     Fcwf KramersPair();\n\n};\n\nstd::complex<double> inner(const Fcwf& psi, const Fcwf& phi);\n\nFcwf apply(World& world, real_convolution_3d& op, const Fcwf& psi);\n\nFcwf apply(World& world, complex_derivative_3d& op, const Fcwf& psi);\n\nreal_function_3d squaremod(Fcwf& psi);\n\nreal_function_3d squaremod_small(Fcwf& psi);\n\nreal_function_3d squaremod_large(Fcwf& psi);\n\ncomplex_function_3d inner_func(World& world, Fcwf& psi, Fcwf& phi);\n\nFcwf copy(Fcwf psi);\n\nstd::complex<double> inner(std::vector<Fcwf>& a, std::vector<Fcwf>& b);\n\nstd::vector<Fcwf> operator*(const std::vector<Fcwf>& psis, std::complex<double> a);\n\nstd::vector<Fcwf> operator*(std::complex<double> a, const std::vector<Fcwf>& psis);\n\nvoid operator+=(std::vector<Fcwf>& phi, const std::vector<Fcwf>& psi);\n\nstd::vector<Fcwf> operator-(const std::vector<Fcwf>& phi, const std::vector<Fcwf>& psi);\n\nTensor<std::complex<double>> matrix_inner(World& world, std::vector<Fcwf>& a, std::vector<Fcwf>& b);\n\nstd::vector<Fcwf> transform(World& world, std::vector<Fcwf>& a, Tensor<std::complex<double>> U);\n\n//allocator class needed for KAIN\nclass Fcwf_vector_allocator {\n     World& world;\n     unsigned int m_size;\n     public:\n          //Constructor\n          Fcwf_vector_allocator(World& world, unsigned int m_size);\n\n          //Overloading () operator\n          std::vector<Fcwf> operator()();\n\n          //Copy Constructor\n          Fcwf_vector_allocator operator=(const Fcwf_vector_allocator& other);\n\n          void set_size(int size);\n};\n\n#endif\n\n//kthxbye\n"
  },
  {
    "path": "src/apps/dirac/relops.cc",
    "content": "#include <cmath>\n#include <iostream>\n#include <vector>\n#include <algorithm>\n#include <math.h> //for erfc\n\n#include \"../../../../mpfrc++-3/mpreal.h\"\n\nstatic const double m = 1.0;\nstatic const double c = 137.0359895;\nstatic const double mc2 = m*c*c;\nstatic const double PI = 3.14159265358979323846264338328;\n\n/// Exponents in Fourier space quadrature over t\ndouble q(double t) {\n    return std::exp(-t)/(m*m*c*c);\n}\n\n// Convert Fourier gaussian exponent a into real space exponent\ndouble Q(double a) {\n    return 0.25/a;\n}\n\n/// Additional factor when transforming gaussian exponent a from fourier to real space\ndouble C(double a) {\n    return 0.125/std::pow(a*PI,1.5);\n}\n\n\n/// This fast summation of an oscillating series is based upon Pade.\n\n/// http://people.mpim-bonn.mpg.de/zagier/files/exp-math-9/fulltext.pdf\n///\n/// For Tbar I think it works for the right reasons for t>0 but for large negative t I think it gets lucky.\n/// C(k) is a function/functor that returns the k'th term in the series for k=0,...,nmax\ntemplate <typename T>\ndouble fastsum_oscillating(const T& C, int nmax) {\n    double d, b, c, s, k;\n\n    d = std::pow(3.0+sqrt(8.0),nmax);\n    d = (d+1.0/d)*0.5;\n    b = -1.0;\n    c = -d;\n    s = 0.0;\n    for (k=0; k<nmax; k++) {\n        c = b-c;\n        s = s+c*C(k);\n        b = (k+nmax)*(k-nmax)*b/((k+0.5)*(k+1.0));\n    }\n    return s/d;\n}\n\n/// Computes term k at quadrature point t in infinte Fourier-space sum defining Tbar\nclass Tbar_omega {\n    const double t;\npublic:\n    Tbar_omega(double t) : t(t) {}\n\n    double operator()(int k) const {\n        return 2.0*std::exp(-std::exp(-t)-0.5*(k+1)*t - std::lgamma(0.5*(k+1)));\n    }\n};\n\n\n/// Computes term k at quadrature point t in infinte Fourier-space sum defining A\nclass A_omega {\n    const double t;\npublic:\n    A_omega(double t) : t(t) {}\n\n    double operator()(int k) const {\n        return 0.25*exp(-exp(-t) - 0.5*(k+1)*t + log(2.0)*(0.5-2*k) + lgamma(1.0+2*k) - 2.0*lgamma(k+1.0) - lgamma(0.5*(k+1))) / ((k+1.0));\n    }\n};\n\n\n/// Computes term k at quadrature point t in infinte Fourier-space sum defining APbar\nclass APbar_omega {\n    const double t;\npublic:\n    APbar_omega(double t) : t(t) {}\n\n    double operator()(int k) const {\n        return sqrt(0.5)*exp( -exp(-t) - log(4.0)*k - 0.5*(k+1)*t + lgamma(1.0+2*k) - 2.0*lgamma(k+1.0) - lgamma(0.5*(k+1))) / (c*m);\n    }\n};\n\n\n/// Computes term k at quadrature point t in infinte Fourier-space sum defining Pbar\n\n/// Use inifinte sum for Pbar even though sum can be eliminated only to keep the same construction as used for A, AP, Tbar etc.\nclass Pbar_omega {\n    const double t;\npublic:\n    Pbar_omega(double t) : t(t) {}\n\n    double operator()(int k) const {\n        return exp(-exp(-t) - 0.5*(k+1)*t - lgamma(0.5*(k+1))) / (c*m);\n    }\n};\n\n\n/// Computes at quadrature point t the infinte Fourier-space sum defining Tbar\ndouble tbar_OMEGA(double t) {\n    if (t < -4.0 || t > 100.0) {\n        return 0.0;\n    }\n    else {\n        double a = fastsum_oscillating(Tbar_omega(t), 35);\n        //return (2.0*c/sqrt(PI)*exp(t-c*c*exp(-t))-2.0*c*c*exp(t/2.0)*erfc(c*exp(-t/2.0)))/pow(2*PI,3.0); //doesn't work\n        double b = 2.0*c/sqrt(PI)*exp(-t/2.0)*exp(-c*c*exp(-t))-2.0*c*c*exp(-t)*erfc(c*exp(-t/2.0));\n        //printf(\"t: %f \\nold: %f \\nnew: %f\\n\\n\",t,a,b);\n        return b;\n    }\n}\n\n\n/// Computes at quadrature point t the infinte Fourier-space sum defining A\ndouble a_OMEGA(double t) {\n    if (t < -4.0 || t > 100.0) {\n        return 0.0;\n    }\n    else {\n        return fastsum_oscillating(A_omega(t), 35);\n    }\n}\n\n/// Computes at quadrature point t the infinte Fourier-space sum defining Pbar\n\n/// Computes at quadrature point t the infinte Fourier-space sum defining Pbar\ndouble pbar_OMEGA(double t) {\n    if (t < -4.0 || t > 100.0) {\n        return 0.0;\n    }\n    else {\n        //return fastsum_oscillating(Pbar_omega(t), 35);\n        double b = 1.0/sqrt(PI)*exp(-t/2.0)*exp(-c*c*exp(-t))-c*exp(-t)*erfc(c*exp(-t/2.0));\n        return b;\n    }\n}\n\n/// Computes at quadrature point t the infinte Fourier-space sum defining APbar\ndouble apbar_OMEGA(double t) {\n    if (t < -4.0 || t > 100.0) {\n        return 0.0;\n    }\n    else {\n        return fastsum_oscillating(APbar_omega(t), 35);\n    }\n}\n\n\n// adjust quadrature points onto common mesh for all operators\nvoid  munge_quadrature_points(int& npt, double& tlo, double& thi, double& h) {\n    //std::cout << \"munge before \" << npt << \" \" << tlo << \" \" << thi << \" \" << h << std::endl;\n    h = floor(64.0*h)/64.0;\n\n    // Round thi/lo up/down to an integral multiple of quadrature\n    // points by using a common origin below that used by any operator\n\n    const double base = -1000.0;\n    tlo = base + floor((tlo-base)/h)*h;\n    thi = base +  ceil((thi-base)/h)*h;\n    npt = ceil(thi-tlo)/h+1;\n    //std::cout << \"munge after  \" << npt << \" \" << tlo << \" \" << thi << \" \" << h << std::endl;\n}\n\ndouble relops_h(const double quadacc) {\n    return -5.0/std::log10(std::min(1e-6,quadacc));\n} \n    \n\nvoid tbar_fit(const double dx, const double thresh, const double quadacc, std::vector<double>& coeffs, std::vector<double>& expnts, double& Cdelta) {\n    const double expnt_max = 1.0/(dx*dx);\n    \n    double h = relops_h(quadacc); //CHANGE THIS TO REFLECT OPERATOR USED IN MAPLE CODE\n    double tlo = -4.0;\n    double thi = 90.0;\n    int npt;\n\n    munge_quadrature_points(npt, tlo, thi, h);\n\n    coeffs.clear();\n    expnts.clear();\n\n    double sum = 0.0;\n    double sum_trunc = 0.0;\n\n    Cdelta = 0.0;\n\n    for (int i=0; i<npt; i++) {\n        double t = i*h+tlo;\n        double qt = q(t);\n        //double coeff = h * C(qt) * tbar_OMEGA(t);  //Robert's\n        //double expnt = Q(qt);                      //Robert's\n        double coeff = h * C(exp(-t)) * tbar_OMEGA(t);        //Joel's\n        double expnt = std::exp(t)/4.0;          //Joel's\n        double norm = std::pow(PI/expnt,1.5);\n\n        sum += coeff*norm;\n\n        if (expnt > expnt_max) {\n            Cdelta += coeff*norm; \n        }\n        else if (coeff > 0.1*thresh) {\n            coeffs.push_back(coeff);\n            expnts.push_back(expnt);\n\n            sum_trunc += coeff*norm;\n            \n            //std::cout << coeff << \" \" << expnt << std::endl;\n        }\n    }\n\n    double trace = 1.0;\n    \n    // std::cout << \"Tbar: \" << npt << \" \" << coeffs.size() << std::endl;\n    // std::cout << \"Tbar: \" << sum << \" \" << std::abs(trace-sum) << std::endl;\n    // std::cout << \"Tbar: \" << sum_trunc << \" \" << std::abs(trace-sum_trunc) << std::endl;\n    // std::cout << \"Tbar: \" << sum_trunc+Cdelta << \" \" << std::abs(trace-sum_trunc-Cdelta)<< std::endl;\n    // std::cout << std::endl;\n}\n\nvoid pbar_fit(const double dx, const double thresh, const double quadacc, std::vector<double>& coeffs, std::vector<double>& expnts, double& Cdelta) {\n    const double expnt_max = 1.0/(dx*dx);\n    \n    double h = relops_h(quadacc);\n    double tlo = -4.0;\n    double thi = 90.0;\n    int npt;\n\n    munge_quadrature_points(npt, tlo, thi, h);\n\n    coeffs.clear();\n    expnts.clear();\n\n    double sum = 0.0;\n    double sum_trunc = 0.0;\n\n    Cdelta = 0.0;\n\n    for (int i=0; i<npt; i++) {\n        double t = i*h+tlo;\n        double qt = q(t);\n        //double coeff = h * C(qt) * pbar_OMEGA(t);\n        //double expnt = Q(qt);\n        double coeff = h * C(exp(-t)) * pbar_OMEGA(t);        //Joel's\n        double expnt = std::exp(t)/4.0;          //Joel's\n        double norm = std::pow(PI/expnt,1.5);\n\n        sum += coeff*norm;\n\n        if (expnt > expnt_max) {\n            Cdelta += coeff*norm;\n        }\n        else if (coeff > 0.1*thresh) {\n            coeffs.push_back(coeff);\n            expnts.push_back(expnt);\n\n            sum_trunc += coeff*norm;\n            \n            //std::cout << coeff << \" \" << expnt << std::endl;\n        }\n    }\n\n    double trace = 0.5/(c*m);\n    \n    // std::cout << \"Pbar: \" << npt << \" \" << coeffs.size() << std::endl;\n    // std::cout << \"Pbar: \" << sum << \" \" << std::abs(trace-sum) << std::endl;\n    // std::cout << \"Pbar: \" << sum_trunc << \" \" << std::abs(trace-sum_trunc) << std::endl;\n    // std::cout << \"Pbar: \" << sum_trunc+Cdelta << \" \" << std::abs(trace-sum_trunc-Cdelta)<< std::endl;\n    // std::cout << std::endl;\n}\n\nvoid apbar_fit(const double dx, const double thresh, const double quadacc, std::vector<double>& coeffs, std::vector<double>& expnts, double& Cdelta) {\n    const double expnt_max = 1.0/(dx*dx);\n    \n    double h = relops_h(quadacc);\n    double tlo = -4.0;\n    double thi = 90.0;\n    int npt;\n\n    munge_quadrature_points(npt, tlo, thi, h);\n\n    coeffs.clear();\n    expnts.clear();\n\n    double sum = 0.0;\n    double sum_trunc = 0.0;\n\n    Cdelta = 0.0;\n\n    for (int i=0; i<npt; i++) {\n        double t = i*h+tlo;\n        double qt = q(t);\n        double coeff = h * C(qt) * apbar_OMEGA(t);\n        double expnt = Q(qt);\n        double norm = std::pow(PI/expnt,1.5);\n\n        sum += coeff*norm;\n\n        if (expnt > expnt_max) {\n            Cdelta += coeff*norm;\n        }\n        else if (coeff > 0.1*thresh) {\n            coeffs.push_back(coeff);\n            expnts.push_back(expnt);\n\n            sum_trunc += coeff*norm;\n            \n            //std::cout << coeff << \" \" << expnt << std::endl;\n        }\n    }\n\n    double trace = 0.5/(c*m);\n    \n    // std::cout << \"Apbar: \" << npt << \" \" << coeffs.size() << std::endl;\n    // std::cout << \"Apbar: \" << sum << \" \" << std::abs(trace-sum) << std::endl;\n    // std::cout << \"Apbar: \" << sum_trunc << \" \" << std::abs(trace-sum_trunc) << std::endl;\n    // std::cout << \"Apbar: \" << sum_trunc+Cdelta << \" \" << std::abs(trace-sum_trunc-Cdelta)<< std::endl;\n    // std::cout << std::endl;\n}\n\n\nvoid a_fit(const double dx, const double thresh, const double quadacc, std::vector<double>& coeffs, std::vector<double>& expnts, double& Cdelta) {\n    const double expnt_max = 1.0/(dx*dx);\n    \n    double h = relops_h(quadacc);\n    double tlo = -4.0;\n    double thi = 90.0;\n    int npt;\n\n    munge_quadrature_points(npt, tlo, thi, h);\n\n    coeffs.clear();\n    expnts.clear();\n\n    double sum = 0.0;\n    double sum_trunc = 0.0;\n\n    Cdelta = 0.0;\n\n    for (int i=0; i<npt; i++) {\n        double t = i*h+tlo;\n        double qt = q(t);\n        double coeff = h * C(qt) * a_OMEGA(t);\n        double expnt = Q(qt);\n        double norm = std::pow(PI/expnt,1.5);\n\n        sum += coeff*norm;\n\n        if (expnt > expnt_max) {\n            Cdelta += coeff*norm;\n        }\n        else if (coeff > 0.1*thresh) {\n            coeffs.push_back(coeff);\n            expnts.push_back(expnt);\n\n            sum_trunc += coeff*norm;\n            \n            //std::cout << coeff << \" \" << expnt << std::endl;\n        }\n    }\n\n    Cdelta += sqrt(0.5);\n\n    double trace = 1.0;\n    // std::cout << \"A: \" << npt << \" \" << coeffs.size() << std::endl;\n    // std::cout << \"A: \" << sum_trunc+Cdelta << \" \" << std::abs(trace-sum_trunc-Cdelta)<< std::endl;\n    // std::cout << std::endl;\n}\n\n\ndouble bshrel_omega(double t, int k, double epsilon) {\n    // return\n    //     std::pow(mc2, -(k+1.0)) *\n    //     std::pow(mc2 + epsilon, (double) k) *\n    //     std::exp(-std::exp(-t) - 0.5*(k+1.0)*t - lgamma(0.5*(k+1)));\n\n    // std::cout << std::endl;\n    // std::cout << t << \" \" << k << \" \" << epsilon << std::endl;\n    // std::cout << std::exp(-t) << std::endl;\n    // std::cout << 0.5*(k+1.0)*t << std::endl;\n    // std::cout << lgamma(0.5*(k+1)) << std::endl;\n    // std::cout << std::endl;\n\n    // Note, cancellation for large k and negative t so must use extended precision\n    if (t>0.0) {\n        // return\n        //     std::pow(1 + epsilon/mc2, (double) k) *\n        //     std::exp(-std::exp(-t) - 0.5*(k+1.0)*t - lgamma(0.5*(k+1))) / mc2;\n        return\n            std::exp(-std::exp(-t) - 0.5*(k+1.0)*t - std::lgamma(0.5*(k+1)) + k*std::log(1.0 + epsilon/mc2)) / mc2;\n    }\n    else {\n        mpfr::mpreal mt=t, mk=k, half=0.5, one=1.0, meps=epsilon, mmc2=mc2;\n        mpfr::mpreal arg = -mpfr::exp(-mt) - half*(mk+one)*mt - mpfr::lngamma(half*(mk+one)) + mk*mpfr::log(1.0 + meps/mmc2);\n        mpfr::mpreal val = mpfr::exp(arg)/mmc2;\n        return double(val);\n    }\n}\n\n\n/*\ndouble bshrel_OMEGA(double t, double epsilon) {\n    const double thresh = 1e-20;\n    const int kk = std::ceil(2*std::exp(-t));\n    double value=0.0;\n\n    int k = kk;\n    while (true) {\n        double term = bshrel_omega(t, k, epsilon);\n        value += term;\n        k++;\n        if (term < thresh) break;\n    }\n\n    k = kk-1;\n    while (true) {\n        if (k<0) break;\n        double term = bshrel_omega(t, k, epsilon);\n        value += term;\n        k--;\n        if (term < thresh) break;\n    }\n\n    return value;\n}\n*/\n\n\ndouble bshrel_OMEGA(double t, double epsilon) {\n     //printf(\"bshrel_OMEGA called with t = %f\\n\",t);\n     double result = 1/(c*sqrt(8*PI))*exp(t-c*c*exp(-t))-1/sqrt(8)*(1+epsilon/(c*c))*exp((2*epsilon+epsilon*epsilon/(c*c))*exp(-t)+t/2.0)*(erfc((c+epsilon/c)*exp(-t/2.0))-2);\n     result = result/pow(2*PI,3.0/2.0);\n     return result;\n}\n\n\nvoid bshrel_fit(double epsilon, const double dx, const double thresh, double quadacc, std::vector<double>& coeffs, std::vector<double>& expnts, double& Cdelta) {\n    const double tlo = -5.0;\n    const double thi = 80.0;\n    //const int npt = 200; // about 4 digits in 2-norm of operator\n    //const int npt = 300; // about 7 digits\n    // const int npt = 400; // about 9 digits // was using this \n    //const int npt = 500; // about 11 digits\n    //const int npt = 600; // about 12 digits\n    //const int npt = 800;\n     const int npt = 350;\n\n    const double h = (thi-tlo)/(npt-1);\n\n    const double expnt_max = 1.0/(dx*dx);\n\n    //std::cout << \"h \" << h << std::endl;\n\n    coeffs.clear();\n    expnts.clear();\n\n    double sum = 0.0;\n\n    double sum_trunc = 0.0;\n\n    Cdelta = 0.0;\n    \n    for (int i=0; i<npt; i++) {\n        double t = i*h+tlo;\n        double qt = q(t);\n        //double coeff = h * C(qt) * bshrel_OMEGA(t,epsilon);\n        double coeff = h * bshrel_OMEGA(t,epsilon);\n        //double expnt = Q(qt);\n        double expnt = std::exp(t)/4.0;\n        double norm = std::pow(PI/expnt,1.5);\n\n        sum += coeff*norm;\n\n        if (expnt > expnt_max) {\n            Cdelta += coeff*norm;\n        }\n        else if (coeff > 0.1*thresh) {\n            coeffs.push_back(coeff);\n            expnts.push_back(expnt);\n\n            sum_trunc += coeff*norm;\n            \n            //std::cout << coeff << \" \" << expnt << std::endl;\n        }\n    }\n\n    //std::cout << sum << \" \" << -1.0/epsilon << \" \" << std::abs((sum+1.0/epsilon)*epsilon) << std::endl;\n    //std::cout << sum_trunc << \" \" << -1.0/epsilon << \" \" << std::abs((sum_trunc+1.0/epsilon)*epsilon) << std::endl;\n    //std::cout << sum_trunc << \" \" << -1.0/epsilon << \" \" << std::abs((sum_trunc+1.0/epsilon)*epsilon) << std::endl;\n}\n\nbool check(double value, double correct, double thresh, const char* msg) {\n    double err = std::abs(value-correct);\n    if (err<=thresh) {\n        std::cout << msg << \" : passed \" << std::endl;\n        return true;\n    }\n    else {\n        std::cout << msg << \" : failed |\" << value << \"-\" << correct << \"| = \" << err << \" > \" << thresh << std::endl;\n        return false;\n    }\n}\n\n// int main() {\n//     mpfr::mpreal::set_default_rnd(GMP_RNDN);\n//     mpfr::mpreal::set_default_prec(256);\n\n// //     // std::cout.precision(16);\n// //     // check(bshrel_omega(0.1,3,-0.01),0.0000176402701584786376862159169871,1e-20,\"omega(.1, 3, -0.1e-1)\");\n// //     // check(bshrel_OMEGA(1.0,-0.01),0.000044133601851009832964,1e-19,\"OMEGA(1.0,-0.01)\");\n// //     // check(bshrel_OMEGA(0.1,-0.01),0.000099327541717740664618,1e-19,\"OMEGA(0.1,-0.01)\");\n// //     // check(bshrel_OMEGA(-1.0,-0.01),0.000289917644952772489991,1e-19,\"OMEGA(-1.0,-0.01)\");\n// //     // check(bshrel_OMEGA(-10.0,-0.01),2.29148640330432807356574,1e-19,\"OMEGA(-10.0,-0.01)\");\n\n//     std::vector<double> coeffs, expnts;\n//     double Cdelta;\n// //     // bshrel_fit(-6500.0,coeffs,expnts,Cdelta);\n// //     // bshrel_fit(-0.1,coeffs,expnts,Cdelta);\n\n//     check(A_omega(0.1)(3),0.00914998206504088871,1e-14,\"Aomega(0.1)(3)\");\n//     check(Pbar_omega(0.1)(3),0.0024173557380369478775,1e-14,\"Pbaromega(0.1)(3)\");\n//     check(APbar_omega(0.1)(3),0.000534165198408167875,1e-14,\"APbaromega(0.1)(3)\");\n//     check(apbar_OMEGA(0.1),0.0006128434915269844710,1e-14,\"apbarOMEGA(0.1)\");\n        \n//     // tbar_fit(1e-6, 1e-6, 1e-6, coeffs,expnts,Cdelta);\n//     // tbar_fit(1e-6, 1e-6, 1e-8, coeffs,expnts,Cdelta);\n//     // tbar_fit(1e-6, 1e-6, 1e-10, coeffs,expnts,Cdelta);\n//     // tbar_fit(1e-6, 1e-6, 1e-12, coeffs,expnts,Cdelta);\n//     // tbar_fit(1e-6, 1e-6, 1e-14, coeffs,expnts,Cdelta);\n//     // tbar_fit(1e-6, 1e-6, 1e-16, coeffs,expnts,Cdelta);\n \n//     // a_fit(1e-6, 1e-6, 1e-6, coeffs,expnts,Cdelta);\n//     // a_fit(1e-6, 1e-6, 1e-8, coeffs,expnts,Cdelta);\n//     // a_fit(1e-6, 1e-6, 1e-10, coeffs,expnts,Cdelta);\n//     // a_fit(1e-6, 1e-6, 1e-12, coeffs,expnts,Cdelta);\n//     // a_fit(1e-6, 1e-6, 1e-14, coeffs,expnts,Cdelta);\n//     // a_fit(1e-6, 1e-6, 1e-16, coeffs,expnts,Cdelta);\n\n//     // pbar_fit(1e-6, 1e-6, 1e-6, coeffs,expnts,Cdelta);\n//     // pbar_fit(1e-6, 1e-6, 1e-8, coeffs,expnts,Cdelta);\n//     // pbar_fit(1e-6, 1e-6, 1e-10, coeffs,expnts,Cdelta);\n//     // pbar_fit(1e-6, 1e-6, 1e-12, coeffs,expnts,Cdelta);\n//     // pbar_fit(1e-6, 1e-6, 1e-14, coeffs,expnts,Cdelta);\n//     // pbar_fit(1e-6, 1e-6, 1e-16, coeffs,expnts,Cdelta);\n \n//     apbar_fit(1e-6, 1e-6, 1e-6, coeffs,expnts,Cdelta);\n//     apbar_fit(1e-6, 1e-6, 1e-8, coeffs,expnts,Cdelta);\n//     apbar_fit(1e-6, 1e-6, 1e-10, coeffs,expnts,Cdelta);\n//     apbar_fit(1e-6, 1e-6, 1e-12, coeffs,expnts,Cdelta);\n//     apbar_fit(1e-6, 1e-6, 1e-14, coeffs,expnts,Cdelta);\n//     apbar_fit(1e-6, 1e-6, 1e-16, coeffs,expnts,Cdelta);\n \n//     return 0;\n// }\n\n"
  },
  {
    "path": "src/apps/dirac/rk.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/world/vector.h>\n#include <madness/mra/nonlinsol.h>\n#include <cstdio>\n#include \"DKops.h\"\n\nvoid apbar_fit(double dx, double thresh, double quadacc, std::vector<double>& coeffs, std::vector<double>& expnts, double& Cdelta);\nvoid pbar_fit(double dx, double thresh, double quadacc, std::vector<double>& coeffs, std::vector<double>& expnts, double& Cdelta);\nvoid a_fit(double dx, double thresh, double quadacc, std::vector<double>& coeffs, std::vector<double>& expnts, double& Cdelta);\nvoid tbar_fit(double dx, double thresh, double quadacc, std::vector<double>& coeffs, std::vector<double>& expnts, double& Cdelta);\nvoid bshrel_fit(double epsilon, double dx, double thresh, double quadacc, std::vector<double>& coeffs, std::vector<double>& expnts, double& Cdelta);\n\nusing namespace madness;\n\n// Needed for rebalancing\ntemplate <typename T, int NDIM>\nstruct lbcost {\n    double leaf_value;\n    double parent_value;\n    lbcost(double leaf_value=1.0, double parent_value=0.0) : leaf_value(leaf_value), parent_value(parent_value) {}\n    double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n        if (key.level() < 1) {\n            return 100.0*(leaf_value+parent_value);\n        }\n        else if (node.is_leaf()) {\n            return leaf_value;\n        }\n        else {\n            return parent_value;\n        }\n    }\n};\n\nstatic double Z = -1; \n\n// Nuclear half-charge radius of H (proton) is 1.3e-5 and the exponent\n// of its finite-size Gaussian approximation is 2.12e9.  So this\n// choice for dx resolves one-two orders of magnitude finer scale.\nstatic const double op_dx=1e-16; \nstatic const double op_quadacc=1e-8; \nstatic const double op_thresh=1e-8;\n    \nstatic const long k = 10;        // wavelet order\nstatic const double thresh = 1e-8; // precision\nstatic const double L = 50.0;   // box size\n\nstatic const bool FINITENUC = false;\n\n// Pick ONE of the following three\nstatic const bool NONREL = false;\nstatic const bool RK = false;\nstatic const bool DK1 = true;\n\nclass FiniteNucleusPotential : public FunctionFunctorInterface<double,3> {\n    const double xi;\n\n    static double expnt(int Z) {\n        const Vector<double,109> xi\n            {2.1248239171e+09,1.1671538870e+09,8.9266848806e+08,7.8788802914e+08,7.1178709563e+08,6.8077502929e+08,6.2865615725e+08,5.8631436655e+08,5.3546911034e+08,5.2105715255e+08,4.8349721509e+08,4.7254270882e+08,4.4335984491e+08,4.3467748823e+08,4.1117553148e+08,4.0407992047e+08,3.8463852873e+08,3.5722217300e+08,3.6228128110e+08,3.5722217300e+08,3.3451324570e+08,3.2263108827e+08,3.1181925878e+08,3.0842641793e+08,2.9881373610e+08,2.9578406371e+08,2.8716667270e+08,2.8996391416e+08,2.7665979354e+08,2.7419021043e+08,2.6267002737e+08,2.5235613399e+08,2.5042024280e+08,2.4130163719e+08,2.4305454351e+08,2.3461213272e+08,2.3301551109e+08,2.2839354730e+08,2.2690621893e+08,2.2544431039e+08,2.2120420724e+08,2.1458511597e+08,2.1458511597e+08,2.0965270287e+08,2.0846586999e+08,2.0500935221e+08,2.0389047621e+08,1.9648639618e+08,1.9548577691e+08,1.9067718154e+08,1.8975246242e+08,1.8193056289e+08,1.8444240538e+08,1.8030529331e+08,1.7950688281e+08,1.7565009043e+08,1.7490463170e+08,1.7416744147e+08,1.7343837120e+08,1.7129844956e+08,1.7060044589e+08,1.6591550422e+08,1.6527352089e+08,1.6215880671e+08,1.6155419421e+08,1.5977529080e+08,1.5977529080e+08,1.5636673634e+08,1.5581702004e+08,1.5314257850e+08,1.5262201512e+08,1.5008710340e+08,1.4959325643e+08,1.4813689532e+08,1.4671710337e+08,1.4442808782e+08,1.4398142103e+08,1.4309883584e+08,1.4223027307e+08,1.4011788914e+08,1.3888925203e+08,1.3768840081e+08,1.3729411599e+08,1.3729411599e+08,1.3690277000e+08,1.3242350205e+08,1.3206733609e+08,1.3101367628e+08,1.3066730974e+08,1.2897067480e+08,1.2930539512e+08,1.2700881714e+08,1.2733038109e+08,1.2512299012e+08,1.2543221826e+08,1.2420711085e+08,1.2420711085e+08,1.2301273547e+08,1.2271879740e+08,1.2127611477e+08,1.2099285491e+08,1.2071131346e+08,1.1987683191e+08,1.2015331850e+08,1.1987683191e+08,1.1960199758e+08,1.1987683191e+08,1.1905722195e+08,1.1878724932e+08};\n\n        if (Z < 1) return 1.0/(op_dx*op_dx); // Use point charge if Z<1\n        else return xi[Z];\n    }\n    \npublic:\n    FiniteNucleusPotential(int Z) : xi(expnt(Z)) {}\n\n    double operator()(const coord_3d& r) const {\n        const double x=r[0], y=r[1], z=r[2];\n        const double R=sqrt(x*x+y*y+z*z);\n        const double arg=R*sqrt(xi);\n        double q = -Z;\n        if (arg<6) q *= std::erf(arg);\n        return q/R;\n    }\n};\n\n/// Given coefficients and exponents make the 3D operator adding delta part to last Gaussian\nreal_convolution_3d make_operator(World& world,\n                                  const std::vector<double>& C,\n                                  const std::vector<double>& T,\n                                  double Cdelta) {\n    Tensor<double> c(C.size()), t(T.size());\n\n    for (unsigned int i=0; i<C.size(); i++) {\n        c[i] = C[i];\n        t[i] = T[i];\n    }\n\n    c[C.size()-1] += Cdelta * pow(t[C.size()-1]/constants::pi,1.5);\n\n    return real_convolution_3d(world, c, t);\n}\n\n/// Factory function generating operator for convolution with grad(operator) in 3D\n\n/// Returns a 3-vector containing the convolution operator for the\n/// x, y, and z components of grad(operator) where the operator\n/// is provided as a sum over Gaussians\nstatic\nstd::vector<real_convolution_3d_ptr>\nmake_grad_operator(World& world,\n\t\t   std::vector<double> C, // TAKES A COPY SINCE WE MODIFY TI\n\t\t   const std::vector<double> T,\n\t\t   const double Cdelta,\n\t\t   int k=FunctionDefaults<3>::get_k())\n{\n  //typedef SeparatedConvolution<double,3> real_convolution_3d;\n  //typedef std::shared_ptr<real_convolution_3d> real_convolution_3d_ptr;\n  const double pi = constants::pi;\n  const Tensor<double> width = FunctionDefaults<3>::get_cell_width();\n  double hi = width.normf(); // Diagonal width of cell\n\n  const int rank = C.size();\n\n  C[rank-1] += Cdelta * pow(T[rank-1]/constants::pi,1.5);\n\n  std::vector<real_convolution_3d_ptr> gradG(3);\n\n  for (int dir=0; dir<3; dir++) {\n    std::vector< ConvolutionND<double,3> > ops(rank);\n    for (int mu=0; mu<rank; mu++) {\n      // We cache the normalized operator so the factor is the value we must multiply\n      // by to recover the coeff we want.\n      double c = std::pow(T[mu]/pi,1.5); // Normalization coeff\n      ops[mu].setfac(C[mu]/c/width[dir]);\n\n      for (int d=0; d<3; d++) {\n\tif (d != dir)\n\t  ops[mu].setop(d,GaussianConvolution1DCache<double>::get(k, T[mu]*width[d]*width[d], 0, false));\n      }\n      ops[mu].setop(dir,GaussianConvolution1DCache<double>::get(k, T[mu]*width[dir]*width[dir], 1, false));\n    }\n    gradG[dir] = real_convolution_3d_ptr(new SeparatedConvolution<double,3>(world, ops));\n  }\n\n  return gradG;\n}\n\n\n/// Makes the relativistic equivalent of the BSH operator\n//real_convolution_3d BSHrel(World& world, double epsilon) {\n//    std::vector<double> C, T;\n//    double Cdelta;\n//    bshrel_fit(epsilon, op_dx, op_thresh, op_quadacc, C, T, Cdelta);\n//    return make_operator(world, C, T, Cdelta);\n//}\n\n/// Makes the Tbar operator (T_rel = E0-mc2 = Tbar T_nonrel = -1/2 Tbar del**2)\n//real_convolution_3d Tbar(World& world) {\n//    std::vector<double> C, T;\n//    double Cdelta;\n//    tbar_fit(op_dx, op_thresh, op_quadacc, C, T, Cdelta);\n//    return make_operator(world, C, T, Cdelta);\n//}\n    \n/// Makes the Pbar operator\n//real_convolution_3d Pbar(World& world) {\n//    std::vector<double> C, T;\n//    double Cdelta;\n//    pbar_fit(op_dx, op_thresh, op_quadacc, C, T, Cdelta);\n//    return make_operator(world, C, T, Cdelta);\n//}\n    \n/// Makes the APbar operator\n//real_convolution_3d APbar(World& world) {\n//    std::vector<double> C, T;\n//    double Cdelta;\n//    apbar_fit(op_dx, op_thresh, op_quadacc, C, T, Cdelta);\n//    return make_operator(world, C, T, Cdelta);\n//}\n    \n/// Makes the gradient of the APbar operator\n//std::vector<real_convolution_3d_ptr> gradAPbar(World& world) {\n//    std::vector<double> C, T;\n//    double Cdelta;\n//    apbar_fit(op_dx, op_thresh, op_quadacc, C, T, Cdelta);\n//    return make_grad_operator(world, C, T, Cdelta);\n//}\n    \n\n/// Makes the A operator (including the 1/sqrt(2) piece)\n//real_convolution_3d A(World& world) {\n//    std::vector<double> C, T;\n//    double Cdelta;\n//    a_fit(op_dx, op_thresh, op_quadacc, C, T, Cdelta);\n//    return make_operator(world, C, T, Cdelta);\n//}\n\n/// Returns the exponent of the wavefunction cusp at the origin for RK\ndouble rk_v(double Z) {\n  if (NONREL) return 0.0;\n  if (DK1) Z *= 0.5;\n\n    static const double c = 137.0359895;\n    double v = -2.0*Z/(constants::pi*c);\n    while (true) {\n        double vnew = -2.0*std::atan(Z/(c*(v+1.0)))/constants::pi;\n        if (std::abs(v-vnew) < 1e-8) break;\n        v = vnew;\n    }\n    return v;\n}\n\nclass Guess : public FunctionFunctorInterface<double,3> {\n    const double Z;\n    const double fac;\n    const double v;\n    std::vector<coord_3d> specialpt;\n\npublic:\n    Guess(double Z)\n        : Z (Z)\n        , fac(sqrt(Z*Z*Z/(8.0*constants::pi)))\n        , v(rk_v(Z))\n        , specialpt(1,coord_3d{0.0,0.0,0.0})\n    {}\n\n    double operator()(const coord_3d& r) const {\n        const double x=r[0], y=r[1], z=r[2];\n        const double R=sqrt(x*x+y*y+z*z+op_dx*op_dx);\n        return fac*exp(-Z*R)*pow(R,-v);\n        //return fac*exp(-Z*R);\n    }\n\n    std::vector<coord_3d> special_points() const final {return specialpt;}\n\n    Level special_level() const final {return 5;}\n};\n\n// static double V(const coord_3d& r) {\n//     const double x=r[0], y=r[1], z=r[2];\n//     return -Z/(sqrt(x*x+y*y+z*z+1e-10));\n// }\n\nreal_function_3d apply_potential(const real_function_3d& Vnuc, const real_function_3d& psi) {\n    World& world = Vnuc.world();\n\n    if (NONREL || RK) {\n        return Vnuc*psi;\n    }\n    else if (DK1) {\n        // A (V + Pp . V pP ) A psi = A V A psi + AP p . V p AP psi\n\n        real_convolution_3d Aop = A(world);\n        real_convolution_3d APbarop = PbarA(world);\n        real_function_3d tempfunc(world);\n        double tempdouble;\n        double fac = pow(2.0*constants::pi,-3.0/2.0);\n        \n        tempfunc = (fac*fac)*Aop((Vnuc*Aop(psi)).truncate());\n        //tempdouble = tempfunc.norm2();\n        //tempdouble = (psi*tempfunc).trace();\n        //if(world.rank()==0) print(\"expec AVApsi: \", tempdouble);\n        real_function_3d Vpsi = tempfunc;\n\n        tempfunc = fac*(1.0/sqrt(2.0))*Aop((Vnuc*psi).truncate());\n        //tempdouble = tempfunc.norm2();\n        //tempdouble = (psi*tempfunc).trace();\n        //if(world.rank()==0) print(\"expec AVpsi: \", tempdouble);\n        Vpsi += tempfunc;\n\n        tempfunc = fac*(1.0/sqrt(2.0))*Vnuc*Aop(psi);\n        //tempdouble = tempfunc.norm2();\n        //tempdouble = (psi*tempfunc).trace();\n        //if(world.rank()==0) print(\"expec VApsi: \", tempdouble);\n        Vpsi += tempfunc;\n\n        tempfunc = (1.0/2.0)*Vnuc*psi;\n        //tempdouble = tempfunc.norm2();\n        //tempdouble = (psi*tempfunc).trace();\n        //if(world.rank()==0) print(\"expec Vpsi: \", tempdouble);\n        Vpsi += tempfunc;\n\n\n\t    //// This works\n         //real_function_3d APbarpsi = APbarop(psi);\n         //for (int axis=0; axis<3; axis++) {\n\t    //   real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n         //   tempfunc = (fac*fac)*APbarop((D(Vnuc*D(APbarpsi))).truncate());\n         //   //tempdouble = tempfunc.norm2();\n         //   //if(world.rank()==0) print(\"expec PApVpPA[\",axis,\"]: \", tempdouble);\n         //   Vpsi -= tempfunc;\n\t    //}\n\t\n\t// This combines derivative and integral operators and seems both faster and more accurate??\n        std::vector<real_convolution_3d_ptr> gradAPbarop = gradPbarA(world);\n        for (int axis=0; axis<3; axis++) {\n\t      real_convolution_3d& op = *(gradAPbarop[axis]);\n\t      tempfunc = (fac*fac)*op((Vnuc*op(psi)).truncate());\n           Vpsi -= tempfunc; //should be minus?\n        }\n\n        return Vpsi.truncate();\n    }\n    else {\n        throw \"confusion\";\n    }\n}\n\ndouble compute_energy(World& world, const real_function_3d& psi, const real_function_3d& V, bool doprint=false) {\n    real_convolution_3d Tbarop = Tbar(world);\n\n    double kinetic_energy = 0.0;\n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n        real_function_3d dpsi = D(psi);\n\n        if (NONREL) {\n            kinetic_energy += 0.5*inner(dpsi,dpsi);\n        }\n        else {\n            kinetic_energy += 0.5*inner(dpsi,apply(Tbarop,dpsi));\n        }\n    }\n\n    double nuclear_attraction_energy = inner(psi, apply_potential(V,psi));\n    double total_energy = kinetic_energy + nuclear_attraction_energy;\n\n    if (world.rank() == 0 && doprint) {\n        if (NONREL) print(\"Non-relativistic\");\n        else if (RK) print(\"RK\");\n        else if (DK1) print(\"DK1\");\n        else throw \"confused\";\n                         \n        print(\"            Kinetic energy \", kinetic_energy);\n        print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n        print(\"              Total energy \", total_energy);\n        print(\"                    Virial \", nuclear_attraction_energy / kinetic_energy);\n    }\n\n    return total_energy;\n}\n\ndouble compute_energy_simple(World& world, const real_function_3d& psi, const real_function_3d& Vpsi, bool doprint=false) {\n    real_convolution_3d Tbarop = Tbar(world);\n\n    double kinetic_energy = 0.0;\n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n        real_function_3d dpsi = D(psi);\n\n        if (NONREL) {\n            kinetic_energy += 0.5*inner(dpsi,dpsi);\n        }\n        else {\n            kinetic_energy += 0.5*inner(dpsi,apply(Tbarop,dpsi));\n        }\n    }\n\n    double nuclear_attraction_energy = inner(psi, Vpsi);\n    double total_energy = kinetic_energy + nuclear_attraction_energy;\n\n    if (world.rank() == 0 && doprint) {\n        if (NONREL) print(\"Non-relativistic\");\n        else if (RK) print(\"RK\");\n        else if (DK1) print(\"DK1\");\n        else throw \"confused\";\n                         \n        print(\"            Kinetic energy \", kinetic_energy);\n        print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n        print(\"              Total energy \", total_energy);\n        print(\"                    Virial \", nuclear_attraction_energy / kinetic_energy);\n    }\n\n    return total_energy;\n}\n\nreal_function_3d apply_laplacian(World& world, const real_function_3d& psi) {\n    real_function_3d delsqpsi(world);\n    \n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n        delsqpsi += D(D(psi));\n    }\n\n    return delsqpsi;\n}\n\nreal_convolution_3d make_bsh_operator(World& world, double eps, double& fac) {\n    if (NONREL) {\n        fac = -2.0;\n        return BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n    }\n    else {\n        fac = -1.0;\n        return Ebar(world, eps);\n    }\n}\n\nreal_function_3d iterate(World& world, const real_function_3d& V, const real_function_3d& psi, double& eps) {\n    /*\n\n      (Tbar T + V) psi = E psi\n\n      (T + Tbar T - T + V) psi = E psi\n\n      (T - E) psi = - (Tbar T - T + V) psi --> but this suffers from numerical noise\n\n      instead\n\n      psi = - (TbarT - E)^-1 V psi\n\n     */\n\n    real_function_3d Vpsi = apply_potential(V,psi);\n    eps = compute_energy_simple(world, psi, Vpsi, false);\n\n    double fac;\n    real_convolution_3d op = make_bsh_operator(world, eps, fac);\n\n    Vpsi.scale(fac).truncate();\n    \n    real_function_3d tmp = apply(op,Vpsi).truncate();\n    double norm = tmp.norm2();\n    real_function_3d r = psi-tmp;\n    // double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n    // eps = eps_new;\n\n    return r;\n}\n\nvoid logplot(double Z, const real_function_3d& psi, double lo=1e-7, double hi=L*0.5) {\n    char fname[256];\n\n    if (NONREL) sprintf(fname, \"nonrel-%3.3d.dat\", int(Z));\n    else if (RK) sprintf(fname, \"rk-%3.3d.dat\", int(Z));\n    else if (DK1) sprintf(fname, \"dk1-%3.3d.dat\", int(Z));\n    else throw \"jdsalkfjalks\";\n\n    std::ofstream file;\n    file.open (fname);\n    file.precision(12);\n    psi.reconstruct();\n    const double fac = pow(10.0,1.0/16.0);\n    double rr = lo;\n    while (rr<hi) {\n        coord_3d r{rr,0.0,0.0};\n        file << rr << \" \" << psi(r) << std::endl;\n        rr *= fac;\n    }\n    file.close();\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    std::cout.precision(16);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_truncate_mode(0); //See what happens to lighter elements with mode 1 (hyp more accuracy for lighter elements, but too long for higher elements)\n    FunctionDefaults<3>::set_truncate_on_project(true);\n    FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n\n    double Zlist[] = {1.0,2.0,3.0,4.0,6.0,8.0,10.0,12.0,16.0,20.0,30.0,40.0,60.0,80.0};\n    //double Zlist[] = {1.0,2.0,4.0,8.0,10.0,16.0,20.0,32.0,40.0,48.0,56.0,60.0,64.0,72.0,76.0,80.0};\n    //double Zlist[] = {60.0,64.0,72.0,76.0,80.0};\n    //double Zlist[] = {20.0,40.0,56.0,60.0,64.0,72.0,76.0,80.0};\n    //double Zlist[] = {100.0};\n    const int NumZs = sizeof(Zlist)/sizeof(Z);\n\n\n    for (unsigned int i=0; i<NumZs; i++) {\n        Z = Zlist[i];\n\n\t   if(world.rank()==0) print(\"!!!!!!!!!!!!!!!!!!!!!!!!!\");\n\t   if(world.rank()==0) print(\"Z =\", Z, \"   v =\", rk_v(Z), \"   NONREL =\", NONREL, \"   RK =\", RK, \"   DK1 =\", DK1, \"   FINITENUC =\", FINITENUC);\n\n        real_function_3d psi  = real_factory_3d(world).functor(real_functor_3d(new Guess(Z)));\n        psi.scale(1.0/psi.norm2());\n        psi.truncate();\n\n        real_function_3d Vnuc;\n\n\n        if (FINITENUC) {\n            Vnuc = real_factory_3d(world).functor(real_functor_3d(new FiniteNucleusPotential(Z))).truncate_mode(0);\n        }\n        else {\n            Vnuc = real_factory_3d(world).functor(real_functor_3d(new FiniteNucleusPotential(-1))).truncate_mode(0);\n        }\n        \n\n\t   double eps;// = compute_energy(world, psi, Vnuc);\n        //if(world.rank()==0) print(\"eps beforehand: \", eps);\n\t\n\t   NonlinearSolver solver(10);\n\t   for (int iter=0; iter<20; iter++) {\n\t      psi.scale(1.0/psi.norm2());\n\t      //double eps = compute_energy(world, psi, Vnuc);\n\t      real_function_3d residual = iterate(world, Vnuc, psi, eps);\n\t     double rnorm = residual.norm2();\n\t     real_function_3d psi_new = solver.update(psi, residual);\n\n          if (rnorm > 0.1) {\n\t        psi = 0.5*psi_new + 0.5*psi;\n          }\n          else {\n\t        psi = psi_new;\n          }\n\n\t     if (world.rank() == 0) {\n             print(\" eps=\",eps,\" err(psi)=\",rnorm);\n\t     }\n\t     //if (iter>3 && rnorm < pow(10,0.5*log10(thresh))) break;\n\t     if (iter>3 && rnorm < thresh*50.0) break;\n          LoadBalanceDeux<3> lb(world);\n          lb.add_tree(Vnuc, lbcost<double,3>(12.0,96.0),true);\n          lb.add_tree(psi, lbcost<double,3>(12.0,96.0),true);\n          FunctionDefaults<3>::redistribute(world,lb.load_balance(2),false);\n\t   }\n\t\n        psi.scale(1.0/psi.norm2());\n\t   compute_energy(world, psi, Vnuc, true);\n\n        logplot(Z,psi);\n    }\n\n    world.gop.fence();\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/interior_bc/CMakeLists.txt",
    "content": "# src/apps/interior_bc\n\nadd_mad_executable(embedded_dirichlet embedded_dirichlet.cc embedded_dirichlet MADmra)\n\n#install(TARGETS embedded_dirichlet\n#    DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/interior_bc/embedded_dirichlet.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/** \\file embedded_dirichlet.cc\n    \\brief Provides test problems for examining the convergence of\n           embedded (Dirichlet) boundary conditions.\n\n    \\note Full details of the mathematics of this routine can be found in\n          M.G. Reuter et al., Comput. Phys. Commun. 183, pp. 1-7 (2012).\n          This code can generate the data in Figures 1, 2, and 4 of that\n          article.\n\n    The auxiliary PDE being solved is\n    \\f[ \\nabla^2 u - p(\\varepsilon) S (u-g) = \\varphi f, \\f]\n    where\n       - \\f$u\\f$ is the solution function\n       - \\f$\\varepsilon\\f$ is the thickness of the boundary layer\n       - \\f$p(\\varepsilon)\\f$ is the penalty prefactor, \\f$2/\\varepsilon\\f$\n         seems to work well.\n       - \\f$S\\f$ is the surface function\n       - \\f$g\\f$ is the Dirichlet condition to be enforced on the surface\n       - \\f$\\varphi\\f$ is the domain mask (1 inside, 0 outside, blurry on the\n         border)\n       - \\f$f\\f$ is the inhomogeneity.\n\n    The available test problems are\n       -# A sphere of radius \\f$R\\f$ with \\f$g = Y_0^0\\f$, homogeneous\n          (ConstantSphere)\n       -# A sphere of radius \\f$R\\f$ with \\f$g = Y_1^0\\f$, homogeneous\n          (CosineSphere)\n       -# A sphere of radius \\f$R\\f$ with \\f$g = Y_2^0\\f$, homogeneous\n          (Y20Sphere)\n       -# A sphere of radius \\f$R\\f$ with \\f$g = Y_0^0\\f$, inhomogeneous\n          \\f$ f = 1 \\f$ (InhomoConstantSphere)\n\n    This program allows testing of various parameters,\n       -# The surface thickness\n       -# The penalty prefactor\n       -# The type of domain masking (LLRV or Gaussian)\n       -# The curvature / shape of the domain\n       .\n    for their effect on convergence of the solution. */\n\n#include <madness/mra/mra.h>\n#include <madness/tensor/gmres.h>\n#include <madness/external/muParser/muParser.h>\n#include \"test_problems.h\"\n\nusing namespace madness;\n\nint main(int argc, char **argv) {\n    double eps, penalty_prefact;\n    int k, prob;\n    double thresh, radius;\n    Mask mask;\n\n    initialize(argc,argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n    // the structure for the problem\n    std::shared_ptr<EmbeddedDirichlet > functor;\n\n    if (world.rank() == 0) {\n        if(argc != 7) {\n            std::cerr << \"Usage error: ./app_name k thresh prob eps penalty\" \\\n                \" mask\" << std::endl;\n            std::cerr << \"    Where prob = 1 for constant sphere,\\n\" \\\n                         \"                 2 for cosine theta sphere,\\n\" \\\n                         \"                 3 for Y20 sphere\\n\" \\\n                         \"                 4 for inhomogeneous const. sphere\" \\\n                         \"\\n\" << std::endl;\n            std::cerr << \"    Where mask = 1 for LLRV, 2 for Gaussian\\n\"\n                << std::endl;\n            std::cerr << \"    Where penalty is the penalty prefactor, \" \\\n                \"specified as a function\\n    of eps, e.g., 2/eps\" << std::endl;\n            error(\"bad number of arguments\");\n        }\n\n        // read in and validate the command-line arguments\n        k = atoi(argv[1]);\n        if(k < 4) error(\"cheapskate\");\n\n        thresh = atof(argv[2]);\n        if(thresh > 1.0e-4) error(\"use some real thresholds...\");\n\n        prob = atoi(argv[3]);\n        if(prob < 1 || prob > 4) error(\"bad problem number\");\n\n        eps = atof(argv[4]);\n        if(eps <= 0.0) error(\"eps must be positive, and hopefully small\");\n\n        mu::Parser parser;\n        try {\n            parser.DefineVar(\"eps\", &eps);\n            parser.SetExpr(std::string(argv[5]));\n            penalty_prefact = parser.Eval();\n        }\n        catch(mu::Parser::exception_type &e) {\n            error(e.GetMsg().c_str());\n        }\n        if(penalty_prefact <= 0.0) error(\"penalty prefactor must be positive\");\n\n        switch(atoi(argv[6])) {\n        case 1:\n            mask = LLRV;\n            break;\n        case 2:\n            mask = Gaussian;\n            break;\n        default:\n            error(\"unknown domain mask type, should be 1 or 2\");\n            break;\n        }\n\n        radius = 1.0;\n    }\n    world.gop.broadcast(prob);\n    world.gop.broadcast(eps);\n    world.gop.broadcast(thresh);\n    world.gop.broadcast(k);\n    world.gop.broadcast(mask);\n    world.gop.broadcast(penalty_prefact);\n    world.gop.broadcast(radius);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_cubic_cell(-2.0, 2.0);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_truncate_on_project(true);\n\n    // do the final problem setup\n    switch(prob) {\n    case 1:\n        functor.reset(new ConstantSphere(k,\n                      thresh, eps, std::string(argv[5]), penalty_prefact,\n                      radius, mask));\n        break;\n    case 2:\n        functor.reset(new CosineSphere(k, thresh,\n                      eps, std::string(argv[5]), penalty_prefact, radius,\n                      mask));\n        break;\n    case 3:\n        functor.reset(new Y20Sphere(k, thresh,\n                      eps, std::string(argv[5]), penalty_prefact, radius,\n                      mask));\n        break;\n    case 4:\n        functor.reset(new InhomoConstantSphere(k,\n                      thresh, eps, std::string(argv[5]), penalty_prefact,\n                      radius, mask));\n        break;\n    default:\n        error(\"shouldn't be here\");\n        break;\n    }\n\n    if(world.rank() == 0) {\n        // print out the arguments\n        functor->printout();\n    }\n\n    // project the surface function\n    real_function_3d surf;\n    functor->fop = SURFACE;\n\n    // do some initial load balancing, if high k or low thresh\n    if(k > 6 || thresh < 1.0e-4) {\n        if(world.rank() == 0) {\n            printf(\"Projecting the surface function (to low order)\\n\");\n            fflush(stdout);\n        }\n\n        surf = real_factory_3d(world).k(6).thresh(1.0e-4).functor(functor);\n\n        if(world.rank() == 0) {\n            printf(\"Performing load balancing\\n\");\n            fflush(stdout);\n        }\n        functor->load_balance(world, surf);\n        surf.clear();\n    }\n\n    // reproject the surface function to the requested threshold & k\n    if(world.rank() == 0) {\n        printf(\"Projecting the surface function to requested order\\n\");\n        fflush(stdout);\n    }\n    surf = real_factory_3d(world).functor(functor);\n\n    // project the domain mask\n    real_function_3d phi;\n    if(world.rank() == 0) {\n        printf(\"Projecting the domain mask\\n\");\n        fflush(stdout);\n    }\n    functor->fop = DOMAIN_MASK;\n    phi = real_factory_3d(world).functor(functor);\n\n    // print out the errors in surface area and volume\n    // these are checks of the diffuse domain approximation\n    double surf_integral, anals;\n    double vol_integral, analv;\n\n    surf_integral = surf.trace();\n    anals = functor->SurfaceIntegral();\n    vol_integral = phi.trace();\n    analv = functor->VolumeIntegral();\n    if(world.rank() == 0) {\n        printf(\"Error in Surface Integral: %.6e\\n\",\n            fabs(surf_integral/penalty_prefact - anals));\n        printf(\"Error in Volume Integral: %.6e\\n\",\n            fabs(vol_integral - analv));\n    }\n\n    // green's function\n    // note that this is really -G...\n    real_convolution_3d G = BSHOperator<3>(world, 0.0, eps*0.1, thresh);\n    //G.broaden();\n\n    // project the r.h.s. function (phi*f - penalty*S*g)\n    // and then convolute with G\n    real_function_3d usol, rhs;\n    if(world.rank() == 0) {\n        printf(\"Projecting the r.h.s. function\\n\");\n        fflush(stdout);\n    }\n\n    functor->fop = DIRICHLET_RHS;\n    usol = real_factory_3d(world).functor(functor);\n    rhs = G(usol);\n    rhs.truncate();\n    usol.clear();\n\n    // load balance using the domain mask, the surface function, and the rhs\n    if(world.rank() == 0){\n        printf(\"Load Balancing\\n\");\n        fflush(stdout);\n    }\n\n    LoadBalanceDeux<3> lb(world);\n    lb.add_tree(phi, DirichletLBCost<3>(1.0, 1.0));\n    lb.add_tree(surf, DirichletLBCost<3>(1.0, 1.0));\n    lb.add_tree(rhs, DirichletLBCost<3>(1.0, 1.0));\n    FunctionDefaults<3>::redistribute(world, lb.load_balance(2.0,\n        false));\n\n    // make an initial guess:\n    // uguess = rhs / penalty_prefact\n    // the rescaling will make operator(uguess) close to rhs in magnitude for\n    //     starting in GMRES\n    DirichletCondIntOp dcio(G, surf);\n    usol = copy(rhs);\n    usol.scale(1.0 / penalty_prefact);\n    usol.compress();\n\n    // make the operators and prepare GMRES\n    FunctionSpace<double, 3> space(world);\n    double resid_thresh = 1.0e-5;\n    double update_thresh = 1.0e-5;\n    int maxiter = 30;\n    GMRES(space, dcio, rhs, usol, maxiter, resid_thresh, update_thresh,\n              true);\n\n    // compare to the exact solution\n    real_function_3d uexact, uerror;\n    double error, ratio, exactval;\n    error = 0.0;\n    ratio = 0.0;\n    exactval = 0.0;\n\n    std::vector<Vector<double, 3> > check_pts;\n\n    functor->fop = EXACT;\n    uexact = real_factory_3d(world).functor(functor);\n    uerror = (usol - uexact)*phi; // only use interior solution\n    error = uerror.norm2();\n\n    if(world.rank() == 0) {\n        printf(\"\\nu interior error: %.10e\\n\", error);\n        fflush(stdout);\n    }\n\n    // check the points prescribed by the problem\n    check_pts = functor->check_pts();\n    for(std::vector<Vector<double, 3> >::iterator iter =\n        check_pts.begin(); iter != check_pts.end(); ++iter) {\n\n        ratio = usol(*iter);\n        exactval = functor->ExactSol(*iter);\n\n        if(world.rank() == 0) {\n            printf(\"u/uexact ratio at (%.2f, %.2f, %.2f): %.10e\\n\",\n                (*iter)[0], (*iter)[1], (*iter)[2], ratio/exactval);\n        }\n    }\n\n    // uncomment these lines for various plots\n    // make a line plot along the positive z axis\n    if(world.rank() == 0)\n        printf(\"\\n\\n\");\n    double zmin = 0.0;\n    double zmax = 2.0;\n    int nz = 201;\n    /*double zmin = 1.0 - 10.0*eps;\n    double zmax = 1.0 + 10.0*eps;\n    int nz = 51;*/\n    coord_3d pt;\n    pt[0] = pt[1] = 0.0;\n    double dz = (zmax - zmin) / (nz - 1);\n    for(int i = 0; i < nz; ++i) {\n        pt[2] = zmin + i * dz;\n        double uval = usol(pt);\n\n        if(world.rank() == 0) {\n            printf(\"%.4e %.4e\\n\", pt[2], uval);\n        }\n    }\n\n    // print out the solution function\n    /*char filename[100];\n    sprintf(filename, \"spheresol.vts\");\n    Vector<double, 3> plotlo, plothi;\n    Vector<long, 3> npts;\n    for(int i = 0; i < 3; ++i) {\n        plotlo[i] = -2.0;\n        plothi[i] = 2.0;\n        npts[i] = 101;\n    }\n    plotvtk_begin(world, filename, plotlo, plothi, npts);\n    plotvtk_data(usol, \"usol\", world, filename, plotlo, plothi, npts);\n    plotvtk_end<3>(world, filename);*/\n\n    finalize();\n\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/interior_bc/test_problems.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n\n/** \\file test_problems.h\n    \\brief Provides test problems for examining the convergence of\n           embedded (Dirichlet) boundary conditions.\n\n    The auxiliary PDE being solved is\n    \\f[ \\nabla^2 u - p(\\varepsilon) S (u-g) = \\varphi f, \\f]\n    where\n       - \\f$u\\f$ is the solution function\n       - \\f$\\varepsilon\\f$ is the thickness of the boundary layer\n       - \\f$p(\\varepsilon)\\f$ is the penalty prefactor, \\f$2/\\varepsilon\\f$\n         seems to work well.\n       - \\f$S\\f$ is the surface function\n       - \\f$g\\f$ is the Dirichlet condition to be enforced on the surface\n       - \\f$\\varphi\\f$ is the domain mask (1 inside, 0 outside, blurry on the\n         border)\n       - \\f$f\\f$ is the inhomogeneity.\n\n    The available test problems are\n       -# A sphere of radius \\f$R\\f$ with \\f$g = Y_0^0\\f$, homogeneous\n          (ConstantSphere)\n       -# A sphere of radius \\f$R\\f$ with \\f$g = Y_1^0\\f$, homogeneous\n          (CosineSphere)\n       -# A sphere of radius \\f$R\\f$ with \\f$g = Y_2^0\\f$, homogeneous\n          (Y20Sphere)\n       -# A sphere of radius \\f$R\\f$ with \\f$g = Y_0^0\\f$, inhomogeneous\n          \\f$ f = 1 \\f$ (InhomoConstantSphere)\n\n    This file sets up the various details of the problems... the main program\n    is found in embedded_dirichlet.cc. */\n\n#ifndef MADNESS_INTERIOR_BC_TEST_PROBLEMS_H__INCLUDED\n#define MADNESS_INTERIOR_BC_TEST_PROBLEMS_H__INCLUDED\n\n#include <madness/mra/mra.h>\n#include <madness/mra/lbdeux.h>\n#include <madness/mra/sdf_shape_3D.h>\n#include <string>\n\nusing namespace madness;\n\nenum Mask { LLRV, Gaussian };\n\nenum FunctorOutput { SURFACE, DIRICHLET_RHS, EXACT, DOMAIN_MASK };\n\n// load balancing structure lifted from dataloadbal.cc\ntemplate <int NDIM>\nstruct DirichletLBCost {\n    double leaf_value;\n    double parent_value;\n    DirichletLBCost(double leaf_value = 1.0, double parent_value = 1.0)\n        : leaf_value(leaf_value), parent_value(parent_value) {}\n\n    double operator() (const Key<NDIM> &key,\n        const FunctionNode<double, NDIM> &node) const {\n\n        if(key.level() <= 1) {\n            return 100.0*(leaf_value+parent_value);\n        }\n        else if(node.is_leaf()) {\n            return leaf_value;\n        }\n        else {\n            return parent_value;\n        }\n    }\n};\n\n/** \\brief Abstract base class for embedded Dirichlet problems. */\nclass EmbeddedDirichlet : public FunctionFunctorInterface<double, 3> {\n    private:\n        EmbeddedDirichlet() {}\n        int initial_level;\n        int k;\n        double thresh;\n        std::string penalty_name;\n\n    protected:\n        DomainMaskInterface *dmi;\n        SignedDFInterface<3> *sdfi;\n        double penalty_prefact, eps;\n        std::string problem_name;\n        std::string problem_specific_info;\n        std::string domain_mask_name;\n\n       // is the problem homogeneous?\n       virtual bool isHomogeneous() const =  0;\n\n    public:\n        /// which function to use when projecting:\n        /// -# the weighted surface (SURFACE)\n        /// -# the rhs of the auxiliary DE (DIRICHLET_RHS)\n        /// -# the exact solution (EXACT)\n        /// -# the domain mask (DOMAIN_MASK)\n        FunctorOutput fop;\n\n        /// \\brief Sets up the data for the problem-inspecific parts.\n        ///\n        /// Also sets the FunctionDefaults for the appropriate dimension.\n        EmbeddedDirichlet(double penalty_prefact, std::string penalty_name,\n            double eps, int k, double thresh, Mask mask)\n            : k(k), thresh(thresh), penalty_name(penalty_name), dmi(nullptr),\n              sdfi(nullptr), penalty_prefact(penalty_prefact), eps(eps),\n              fop(DIRICHLET_RHS) {\n\n            // calculate some nice initial projection level\n            // should be no lower than 6, but may need to be higher for small\n            // eps\n            initial_level = ceil(log(4.0 / eps) / log(2.0) - 4);\n            if(initial_level < 6)\n                initial_level = 6;\n            FunctionDefaults<3>::set_initial_level(initial_level);\n\n            switch(mask) {\n            case LLRV:\n                domain_mask_name = \"LLRV\";\n                dmi = new LLRVDomainMask(eps);\n                break;\n            case Gaussian:\n                domain_mask_name = \"Gaussian\";\n                dmi = new GaussianDomainMask(eps);\n                break;\n            default:\n                error(\"Unknown mask\");\n                break;\n            }\n        }\n\n        virtual ~EmbeddedDirichlet() {\n            if(sdfi != nullptr)\n                delete sdfi;\n            if(dmi != nullptr)\n                delete dmi;\n        }\n\n        /// \\brief Load balances using the provided Function\n        void load_balance(World &world, const Function<double, 3> &f)\n            const {\n\n            LoadBalanceDeux<3> lb(world);\n            lb.add_tree(f, DirichletLBCost<3>(1.0, 1.0));\n            // set this map as the default\n            FunctionDefaults<3>::redistribute(world, lb.load_balance(2.0,\n                false));\n        }\n\n        /// \\brief Do a standard Printout of the problem details\n        void printout() const {\n            printf(\"Solving problem: %s\\nWavelet Order: %d\\nThreshold: %.6e\" \\\n                \"\\nEpsilon: %.6e\\nPenalty Prefactor, %s: %.6e\\nUsing %s \" \\\n                \"domain masking\\n%s\\n\",\n                problem_name.c_str(), k, thresh, eps, penalty_name.c_str(),\n                penalty_prefact, domain_mask_name.c_str(),\n                problem_specific_info.c_str());\n            fflush(stdout);\n        }\n\n        /// \\brief The operator for projecting a MADNESS function.\n        double operator() (const Vector<double, 3> &x) const {\n            switch(fop) {\n            case EXACT:\n                return ExactSol(x);\n                break;\n            case DIRICHLET_RHS:\n                if(isHomogeneous())\n                    return -DirichletCond(x) * dmi->surface(sdfi->sdf(x)) *\n                        penalty_prefact;\n                else\n                    return dmi->mask(sdfi->sdf(x)) * Inhomogeneity(x) -\n                        DirichletCond(x) * dmi->surface(sdfi->sdf(x)) *\n                        penalty_prefact;\n                break;\n            case SURFACE:\n                return dmi->surface(sdfi->sdf(x)) * penalty_prefact;\n                break;\n            case DOMAIN_MASK:\n                return dmi->mask(sdfi->sdf(x));\n                break;\n            default:\n                error(\"shouldn't be here...\");\n                return 0.0;\n                break;\n            }\n        }\n\n        virtual double DirichletCond(const Vector<double, 3> &x) const = 0;\n\n        virtual double ExactSol(const Vector<double, 3> &x) const = 0;\n\n        virtual double Inhomogeneity(const Vector<double, 3> &x) const = 0;\n\n        /// \\brief The surface area of the domain\n        virtual double SurfaceIntegral() const = 0;\n\n        /// \\brief The volume of the domain\n        virtual double VolumeIntegral() const = 0;\n\n        /// \\brief A list of points where we should compare the computed\n        ///        solution to the exact solution\n        virtual std::vector< Vector<double, 3> > check_pts() const {\n            return std::vector< Vector<double, 3> >();\n        }\n};\n\n/** \\brief The constant on a sphere problem */\nclass ConstantSphere : public EmbeddedDirichlet {\n    protected:\n        double radius;\n\n        bool isHomogeneous() const { return true; }\n\n    public:\n        ConstantSphere(int k, double thresh, double eps, std::string penalty_name,\n            double penalty_prefact, double radius, Mask mask)\n            : EmbeddedDirichlet(penalty_prefact, penalty_name, eps, k,\n              thresh, mask), radius(radius) {\n\n            char str[80];\n            sprintf(str, \"Sphere radius: %.6e\\n\", radius);\n            problem_specific_info = str;\n            problem_name = \"Constant Sphere\";\n\n            // set up the domain masks, etc.\n            coord_3d pt(0.0); // origin\n            sdfi = new SDFSphere(radius, pt);\n        }\n\n        double DirichletCond(const Vector<double, 3> &x) const {\n            return 1.0;\n        }\n\n        double ExactSol(const Vector<double, 3> &x) const {\n            double r = sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\n\n            if(r <= radius)\n                return 1.0;\n            else\n                return radius / r;\n        }\n\n        double Inhomogeneity(const Vector<double, 3> &x) const {\n            return 0.0;\n        }\n\n        double SurfaceIntegral() const {\n            return 4.0*constants::pi*radius*radius;\n        }\n\n        double VolumeIntegral() const {\n            return 4.0*constants::pi*radius*radius*radius / 3.0;\n        }\n\n        virtual std::vector< Vector<double, 3> > check_pts() const {\n            std::vector< Vector<double, 3> > vec;\n            Vector<double, 3> pt;\n\n            pt[0] = pt[1] = 0.0;\n            pt[2] = 0.1 * radius;\n            vec.push_back(pt);\n\n            pt[2] = radius;\n            vec.push_back(pt);\n\n            pt[2] = 2.0;\n            vec.push_back(pt);\n\n            return vec;\n        }\n};\n\n/** \\brief The constant on a sphere problem, with inhomogeneity */\nclass InhomoConstantSphere : public EmbeddedDirichlet {\n    protected:\n        double radius;\n\n        bool isHomogeneous() const { return false; }\n\n    public:\n        InhomoConstantSphere(int k, double thresh, double eps, std::string penalty_name,\n            double penalty_prefact, double radius, Mask mask)\n            : EmbeddedDirichlet(penalty_prefact, penalty_name, eps, k,\n              thresh, mask), radius(radius) {\n\n            char str[80];\n            sprintf(str, \"Sphere radius: %.6e\\n\", radius);\n            problem_specific_info = str;\n            problem_name = \"Inhomogeneous Constant Sphere\";\n\n            // set up the domain masks, etc.\n            coord_3d pt(0.0); // origin\n            sdfi = new SDFSphere(radius, pt);\n        }\n\n        double DirichletCond(const Vector<double, 3> &x) const {\n            return 1.0;\n        }\n\n        double ExactSol(const Vector<double, 3> &x) const {\n            double r = sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\n\n            if(r <= radius)\n                return r*r / (radius*radius);\n            else\n                return radius / r;\n        }\n\n        double Inhomogeneity(const Vector<double, 3> &x) const {\n            return 6.0 / (radius*radius);\n        }\n\n        double SurfaceIntegral() const {\n            return 4.0*constants::pi*radius*radius;\n        }\n\n        double VolumeIntegral() const {\n            return 4.0*constants::pi*radius*radius*radius / 3.0;\n        }\n\n        virtual std::vector< Vector<double, 3> > check_pts() const {\n            std::vector< Vector<double, 3> > vec;\n            Vector<double, 3> pt;\n\n            pt[0] = pt[1] = 0.0;\n            pt[2] = 0.1 * radius;\n            vec.push_back(pt);\n\n            pt[2] = radius;\n            vec.push_back(pt);\n\n            pt[2] = 2.0;\n            vec.push_back(pt);\n\n            return vec;\n        }\n};\n\n/** \\brief The cos(theta) on a sphere problem */\nclass CosineSphere : public EmbeddedDirichlet {\n    protected:\n        double radius;\n\n        bool isHomogeneous() const { return true; }\n\n    public:\n        CosineSphere(int k, double thresh, double eps, std::string penalty_name,\n            double penalty_prefact, double radius, Mask mask)\n            : EmbeddedDirichlet(penalty_prefact, penalty_name, eps, k,\n              thresh, mask), radius(radius) {\n\n            char str[80];\n            sprintf(str, \"Sphere radius: %.6e\\n\", radius);\n            problem_specific_info = str;\n            problem_name = \"Cosine Sphere\";\n\n            // set up the domain masks, etc.\n            coord_3d pt(0.0); // origin\n            sdfi = new SDFSphere(radius, pt);\n        }\n\n        double DirichletCond(const Vector<double, 3> &x) const {\n            double r = sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\n\n            if(r < 1.0e-4)\n                return 0.0;\n            else\n                return x[2] / r;\n        }\n\n        double ExactSol(const Vector<double, 3> &x) const {\n            double r = sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\n\n            if(r <= radius)\n                return x[2] / radius;\n            else\n                return x[2] * radius * radius / (r*r*r);\n        }\n\n        double Inhomogeneity(const Vector<double, 3> &x) const {\n            return 0.0;\n        }\n\n        double SurfaceIntegral() const {\n            return 4.0*constants::pi*radius*radius;\n        }\n\n        double VolumeIntegral() const {\n            return 4.0*constants::pi*radius*radius*radius / 3.0;\n        }\n\n        virtual std::vector< Vector<double, 3> > check_pts() const {\n            std::vector< Vector<double, 3> > vec;\n            Vector<double, 3> pt;\n\n            pt[0] = pt[1] = 0.0;\n            pt[2] = 0.1 * radius;\n            vec.push_back(pt);\n\n            pt[2] = radius;\n            vec.push_back(pt);\n\n            pt[2] = 2.0;\n            vec.push_back(pt);\n\n            return vec;\n        }\n};\n\n/** \\brief The Y_2^0 on a sphere problem */\nclass Y20Sphere : public EmbeddedDirichlet {\n    protected:\n        double radius;\n\n        bool isHomogeneous() const { return true; }\n\n    public:\n        Y20Sphere(int k, double thresh, double eps, std::string penalty_name,\n            double penalty_prefact, double radius, Mask mask)\n            : EmbeddedDirichlet(penalty_prefact, penalty_name, eps, k,\n              thresh, mask), radius(radius) {\n\n            char str[80];\n            sprintf(str, \"Sphere radius: %.6e\\n\", radius);\n            problem_specific_info = str;\n            problem_name = \"Y20 Sphere\";\n\n            // set up the domain masks, etc.\n            coord_3d pt(0.0); // origin\n            sdfi = new SDFSphere(radius, pt);\n        }\n\n        double DirichletCond(const Vector<double, 3> &x) const {\n            double r = sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\n\n            if(r < 1.0e-4)\n                return 0.0;\n            else\n                return 3.0* x[2] * x[2] / (r*r) - 1.0;\n        }\n\n        double ExactSol(const Vector<double, 3> &x) const {\n            double r = sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\n\n            if(r <= radius)\n                //return x[2] / radius;\n                return (3.0*x[2]*x[2] - r*r) / (radius * radius);   \n            else\n                return radius*radius*radius / (r*r*r) * (3.0*x[2]*x[2]/(r*r) - 1.0);\n        }\n\n        double Inhomogeneity(const Vector<double, 3> &x) const {\n            return 0.0;\n        }\n\n        double SurfaceIntegral() const {\n            return 4.0*constants::pi*radius*radius;\n        }\n\n        double VolumeIntegral() const {\n            return 4.0*constants::pi*radius*radius*radius / 3.0;\n        }\n\n        virtual std::vector< Vector<double, 3> > check_pts() const {\n            std::vector< Vector<double, 3> > vec;\n            Vector<double, 3> pt;\n\n            pt[0] = pt[1] = 0.0;\n            pt[2] = 0.1 * radius;\n            vec.push_back(pt);\n\n            pt[2] = radius;\n            vec.push_back(pt);\n\n            pt[2] = 2.0;\n            vec.push_back(pt);\n\n            return vec;\n        }\n};\n\n/** \\brief The operator needed for solving for \\f$u\\f$ with GMRES */\nclass DirichletCondIntOp : public Operator<Function<double, 3> > {\n    protected:\n        /// \\brief The Green's function\n        const SeparatedConvolution<double, 3> &G;\n        /// \\brief The surface function (normalized)\n        const Function<double, 3> &b;\n\n        /** \\brief Applies the operator to \\c invec\n\n            \\note \\c G is actually \\f$-G\\f$.\n\n            \\param[in] invec The input vector\n            \\param[out] outvec The action of the operator on \\c invec */\n        void action(const Function<double, 3> &invec,\n                    Function<double, 3> &outvec) const {\n\n                Function<double, 3> f = b*invec;\n                f.broaden();\n                f.broaden();\n                outvec = invec + G(f);\n                f.clear();\n                outvec.scale(-1.0);\n                outvec.truncate();\n        }\n\n    public:\n        DirichletCondIntOp(const SeparatedConvolution<double, 3> &gin,\n            const Function<double, 3> &bin)\n            : G(gin), b(bin) {}\n};\n\n#endif // MADNESS_INTERIOR_BC_TEST_PROBLEMS_H__INCLUDED\n"
  },
  {
    "path": "src/apps/madqc_v2/CMakeLists.txt",
    "content": "# src/apps/moldft\n\nadd_mad_executable(madqc madqc.cpp \"MADchem;MADresponse2\")\nadd_dependencies(applications-madness madqc)\n\nif (BUILD_TESTING)\n    # integration tests\n    add_scripted_tests(test_nemo_energy.py madqc \"medium;applications\")\n    add_scripted_tests(test_nemo_localization.py madqc \"verylong;applications\")\n    add_scripted_tests(test_moldft_energy.py madqc \"medium;applications\")\n    add_scripted_tests(test_moldft_energy_mpi_parallel.py madqc \"short;applications\")\n    add_scripted_tests(test_cc2_callable.py madqc \"short;applications\")\n    add_scripted_tests(test_oep_energy.py madqc \"long;applications\")\n    add_scripted_tests(test_cis_energy_he.py madqc \"medium;applications\")\n    add_scripted_tests(test_cis_symmetry_h2o.py madqc \"verylong;applications\")\n    add_scripted_tests(test_mp2_helium.py madqc \"verylong;applications\")\n    add_scripted_tests(test_lrcc2_helium.py madqc \"verylong;applications\")\n    # add_scripted_tests(test_response.py madqc \"short;applications\")\n    # add_scripted_tests(test_znemo_energy.py madqc \"short;applications\")\nendif(BUILD_TESTING)\n\ninstall(TARGETS madqc DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_cc2_callable.py.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 10000000000.0,\n                \"converged_for_thresh\": 10000000000.0\n            },\n            \"metadata\": {\n                \"elapsed_time\": 3.0641329288482666,\n                \"finished_at\": \"2025-07-16 12:55:34\",\n                \"git_hash\": \"\",\n                \"host\": \"Darwin\",\n                \"mpi_size\": 1,\n                \"nthreads\": 7\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -1.0315388655166012e-10,\n                        -1.0314369322542738e-10,\n                        -1.0314703834723438e-10\n                    ]\n                },\n                \"energy\": 0.0,\n                \"gradient\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -1.0917128312470936e-11,\n                        -1.092306800565268e-11,\n                        -1.0932366123483916e-11\n                    ]\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    1\n                ],\n                \"ndim\": 1,\n                \"size\": 1,\n                \"vals\": [\n                    -0.9224762255817216\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": 0.0\n        },\n        {\n            \"correlation_energy\": 0.0,\n            \"model\": \"mp2\",\n            \"mp2_correlation_energy\": 0.0,\n            \"mp2_total_energy\": 0.0,\n            \"nfreeze\": 1,\n            \"properties\": {\n                \"dipole\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                },\n                \"energy\": 0.0,\n                \"gradient\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                }\n            }\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_cis_energy_he.py.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 10000000000.0,\n                \"converged_for_thresh\": 10000000000.0\n            },\n            \"metadata\": {\n                \"elapsed_time\": 1.891343116760254,\n                \"finished_at\": \"2025-07-15 15:37:32\",\n                \"git_hash\": \"\",\n                \"host\": \"Darwin\",\n                \"mpi_size\": 1,\n                \"nthreads\": 7\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -7.352528055313693e-12,\n                        -7.353584659406807e-12,\n                        -7.341483977148704e-12\n                    ]\n                },\n                \"energy\": 0.0,\n                \"gradient\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -2.6526003615856553e-12,\n                        -2.6597057889432563e-12,\n                        -2.666089571334851e-12\n                    ]\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    1\n                ],\n                \"ndim\": 1,\n                \"size\": 1,\n                \"vals\": [\n                    -0.9223609256130967\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": 0.0\n        },\n        {\n            \"excitations\": [\n                {\n                    \"current_error\": 0.42523104190367156,\n                    \"irrep\": \"a\",\n                    \"omega\": 0.8518042544116026,\n                    \"oscillator_strength_length\": 0.18565741630387425,\n                    \"oscillator_strength_velocity\": 0.14377829951962062\n                },\n                {\n                    \"current_error\": 0.7793123260823384,\n                    \"irrep\": \"a\",\n                    \"omega\": 0.8598465748594178,\n                    \"oscillator_strength_length\": 2.1151040336529158e-21,\n                    \"oscillator_strength_velocity\": 9.599893151560135e-21\n                }\n            ],\n            \"model\": \"cis\",\n            \"nfreeze\": 0\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_cis_symmetry_h2o.py_a2.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 10000000000.0,\n                \"converged_for_thresh\": 1e-05\n            },\n            \"metadata\": {\n                \"elapsed_time\": 1.7835369110107422,\n                \"finished_at\": \"2025-07-15 21:32:35\",\n                \"git_hash\": \"\",\n                \"host\": \"Darwin\",\n                \"mpi_size\": 1,\n                \"nthreads\": 7\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        2.7882627551641334e-13,\n                        -5.574514678820888e-15,\n                        -0.7612311103067814\n                    ]\n                },\n                \"energy\": -76.06798203629984,\n                \"gradient\": {\n                    \"dims\": [\n                        9\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 9,\n                    \"vals\": [\n                        -1.4225065569917206e-11,\n                        -1.1723955140041653e-13,\n                        0.0008191486296431627,\n                        4.662381591913345e-13,\n                        0.002641399686707402,\n                        -0.00138947049409599,\n                        4.666822484011846e-13,\n                        -0.002641399686722057,\n                        -0.0013894704940982106\n                    ]\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    5\n                ],\n                \"ndim\": 1,\n                \"size\": 5,\n                \"vals\": [\n                    -20.560364804240912,\n                    -1.3591645132418102,\n                    -0.7302000748746127,\n                    -0.5839566073114392,\n                    -0.5112105265807045\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": -76.06798203629984\n        },\n        {\n            \"excitations\": [\n                {\n                    \"current_error\": 0.0005954436996390762,\n                    \"irrep\": \"a2\",\n                    \"omega\": 0.38421835666198123,\n                    \"oscillator_strength_length\": 1.1366542677552646e-25,\n                    \"oscillator_strength_velocity\": 4.669598038963084e-27\n                }\n            ],\n            \"model\": \"cis\",\n            \"nfreeze\": 1\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_cis_symmetry_h2o.py_b1.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 0.0001,\n                \"converged_for_thresh\": 1e-05\n            },\n            \"metadata\": {\n                \"elapsed_time\": 47.0487539768219,\n                \"finished_at\": \"2025-07-15 15:46:55\",\n                \"git_hash\": \"\",\n                \"host\": \"Darwin\",\n                \"mpi_size\": 1,\n                \"nthreads\": 7\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        2.2136581284166967e-13,\n                        3.013978772557204e-14,\n                        -0.7612311103140021\n                    ]\n                },\n                \"energy\": -76.06815384149371,\n                \"gradient\": {\n                    \"dims\": [\n                        9\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 9,\n                    \"vals\": [\n                        -1.4154011296341196e-11,\n                        -1.0738077094174514e-12,\n                        0.000861426462419157,\n                        4.748423876321795e-13,\n                        0.0026413967174709896,\n                        -0.0013889751516391602,\n                        4.722333635243103e-13,\n                        -0.0026413967174794273,\n                        -0.0013889751516418247\n                    ]\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    5\n                ],\n                \"ndim\": 1,\n                \"size\": 5,\n                \"vals\": [\n                    -20.560364804240315,\n                    -1.3591645132415697,\n                    -0.7302000748742543,\n                    -0.5839566073111914,\n                    -0.5112105265807261\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": -76.06815384149371\n        },\n        {\n            \"excitations\": [\n                {\n                    \"current_error\": 0.001299072709528596,\n                    \"irrep\": \"b1\",\n                    \"omega\": 0.32341641226209394,\n                    \"oscillator_strength_length\": 0.04860732190197958,\n                    \"oscillator_strength_velocity\": 0.06652912114149519\n                }\n            ],\n            \"model\": \"cis\",\n            \"nfreeze\": 1\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_lrcc2_helium.py.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 0.001,\n                \"converged_for_thresh\": 1e-05\n            },\n            \"metadata\": {\n                \"elapsed_time\": 12.124675989151001,\n                \"finished_at\": \"2025-07-21 16:09:49\",\n                \"git_hash\": \"\",\n                \"host\": \"Linux\",\n                \"mpi_size\": 1,\n                \"nthreads\": 39\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -6.918602865430817e-11,\n                        -6.918312619477032e-11,\n                        -6.918138033047764e-11\n                    ]\n                },\n                \"energy\": -2.8616794997158994,\n                \"gradient\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -1.136819804958833e-11,\n                        -1.1370245023289982e-11,\n                        -1.1372708330625869e-11\n                    ]\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    1\n                ],\n                \"ndim\": 1,\n                \"size\": 1,\n                \"vals\": [\n                    -0.9179516328772064\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": -2.8616794997158994\n        },\n        {\n            \"cc2_correlation_energy\": -0.03753773217275475,\n            \"cc2_total_energy\": -2.899217231888654,\n            \"correlation_energy\": -0.03753773217275475,\n            \"excitations\": [\n                {\n                    \"current_error\": 0.0,\n                    \"irrep\": \"\",\n                    \"omega\": 0.7652718795513992,\n                    \"oscillator_strength_length\": 3.0,\n                    \"oscillator_strength_velocity\": 0.0\n                }\n            ],\n            \"model\": \"cc2\",\n            \"nfreeze\": 0,\n            \"properties\": {\n                \"dipole\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                },\n                \"energy\": 0.0,\n                \"gradient\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                }\n            }\n        },\n        {\n            \"correlation_energy\": -0.037471871876092785,\n            \"model\": \"mp2\",\n            \"mp2_correlation_energy\": -0.037471871876092785,\n            \"mp2_total_energy\": -2.899151371591992,\n            \"nfreeze\": 0,\n            \"properties\": {\n                \"dipole\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                },\n                \"energy\": 0.0,\n                \"gradient\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                }\n            }\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_moldft_energy.py.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 0.001,\n                \"converged_for_thresh\": 0.0001\n            },\n            \"metadata\": {\n                \"elapsed_time\": 5.022059917449951,\n                \"finished_at\": \"2025-07-16 11:21:56\",\n                \"git_hash\": \"\",\n                \"host\": \"Darwin\",\n                \"mpi_size\": 1,\n                \"nthreads\": 7\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                },\n                \"energy\": -2.8616792499018886,\n                \"gradient\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    1\n                ],\n                \"ndim\": 1,\n                \"size\": 1,\n                \"vals\": [\n                    -0.9179861813061136\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": 0.0\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_moldft_energy_mpi_parallel.py.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 10000000000.0,\n                \"converged_for_thresh\": 10000000000.0\n            },\n            \"metadata\": {\n                \"elapsed_time\": 8.859964847564697,\n                \"finished_at\": \"2025-07-16 12:16:36\",\n                \"git_hash\": \"\",\n                \"host\": \"Darwin\",\n                \"mpi_size\": 2,\n                \"nthreads\": 0\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                },\n                \"energy\": -2.861353168642772,\n                \"gradient\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    1\n                ],\n                \"ndim\": 1,\n                \"size\": 1,\n                \"vals\": [\n                    -0.5563816248667196\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": 0.0\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_mp2_helium.py.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 0.001,\n                \"converged_for_thresh\": 1e-05\n            },\n            \"metadata\": {\n                \"elapsed_time\": 12.259512186050415,\n                \"finished_at\": \"2025-07-18 13:15:05\",\n                \"git_hash\": \"\",\n                \"host\": \"Linux\",\n                \"mpi_size\": 1,\n                \"nthreads\": 39\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -6.91670980291661e-11,\n                        -6.918002335792594e-11,\n                        -6.918302947108508e-11\n                    ]\n                },\n                \"energy\": -2.8616794997158976,\n                \"gradient\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -1.137549776597524e-11,\n                        -1.1376143083108303e-11,\n                        -1.137517857685566e-11\n                    ]\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    1\n                ],\n                \"ndim\": 1,\n                \"size\": 1,\n                \"vals\": [\n                    -0.9179516328772281\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": -2.8616794997158976\n        },\n        {\n            \"correlation_energy\": -0.037469976657759405,\n            \"model\": \"mp2\",\n            \"mp2_correlation_energy\": -0.037469976657759405,\n            \"mp2_total_energy\": -2.899149476373657,\n            \"nfreeze\": 0,\n            \"properties\": {\n                \"dipole\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                },\n                \"energy\": 0.0,\n                \"gradient\": {\n                    \"ndim\": -1,\n                    \"size\": 0\n                }\n            }\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_nemo_energy.py.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 0.001,\n                \"converged_for_thresh\": 1e-05\n            },\n            \"metadata\": {\n                \"elapsed_time\": 6.521558046340942,\n                \"finished_at\": \"2025-07-16 18:14:54\",\n                \"git_hash\": \"\",\n                \"host\": \"Darwin\",\n                \"mpi_size\": 1,\n                \"nthreads\": 7\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -4.7901495369589775e-15,\n                        -1.4362385590120364e-14,\n                        -1.1232038152564996e-14\n                    ]\n                },\n                \"energy\": -2.861679847078436,\n                \"gradient\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -7.155387393709134e-14,\n                        -6.661338147750939e-14,\n                        -7.671641100159832e-14\n                    ]\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    1\n                ],\n                \"ndim\": 1,\n                \"size\": 1,\n                \"vals\": [\n                    -0.9179569389813818\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": -2.861679847078436\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_nemo_localization.py.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 0.001,\n                \"converged_for_thresh\": 1e-05\n            },\n            \"metadata\": {\n                \"elapsed_time\": 56.921279191970825,\n                \"finished_at\": \"2025-07-15 22:45:43\",\n                \"git_hash\": \"\",\n                \"host\": \"Darwin\",\n                \"mpi_size\": 1,\n                \"nthreads\": 7\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        1.218178753158016e-07,\n                        -8.58706464685227e-11,\n                        -0.7613248428333097\n                    ]\n                },\n                \"energy\": -76.06815566895293,\n                \"gradient\": {\n                    \"dims\": [\n                        9\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 9,\n                    \"vals\": [\n                        6.695105980725202e-07,\n                        1.616333733522879e-10,\n                        4.2030544853410845e-06,\n                        1.880763264572316e-08,\n                        0.0026628468400216043,\n                        -0.0014033281373644346,\n                        1.909130056820807e-08,\n                        -0.0026628468457334797,\n                        -0.001403328174234053\n                    ]\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    5\n                ],\n                \"ndim\": 1,\n                \"size\": 5,\n                \"vals\": [\n                    -20.555010021402936,\n                    -1.0138242410751501,\n                    -1.0138242373742112,\n                    -0.65089674628347,\n                    -0.51116651973582\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": -76.06815566895293\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/mad_madqc_test_oep_energy.py.calc_info.ref.json",
    "content": "{\n    \"tasks\": [\n        {\n            \"convergence_info\": {\n                \"converged_for_dconv\": 10000000000.0,\n                \"converged_for_thresh\": 10000000000.0\n            },\n            \"metadata\": {\n                \"elapsed_time\": 5.691084861755371,\n                \"finished_at\": \"2025-07-16 13:08:14\",\n                \"git_hash\": \"\",\n                \"host\": \"Darwin\",\n                \"mpi_size\": 1,\n                \"nthreads\": 7\n            },\n            \"model\": \"scf\",\n            \"properties\": {\n                \"dipole\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -1.5672231277469978e-13,\n                        -1.614650230557672e-13,\n                        -1.7217274790969365e-13\n                    ]\n                },\n                \"energy\": 0.0,\n                \"gradient\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        1.2789769243681803e-13,\n                        1.4432899320127035e-13,\n                        1.4344081478157023e-13\n                    ]\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    2\n                ],\n                \"ndim\": 1,\n                \"size\": 2,\n                \"vals\": [\n                    -4.731045641579666,\n                    -0.30985913998280434\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": 0.0\n        },\n        {\n            \"E_kin_HF\": 14.570875815784678,\n            \"E_kin_KS\": 14.912480723647406,\n            \"Econv\": -14.560675033137242,\n            \"Ex_HF\": -2.6667029762744154,\n            \"Ex_conv\": -2.710062982355956,\n            \"Ex_vir\": -3.0614011732628263,\n            \"devir14\": -0.35133819090687046,\n            \"devir17\": 0.288511618737044,\n            \"drho\": 0.1961223808378545,\n            \"model\": \"oaep\",\n            \"properties\": {\n                \"dipole\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        -1.5330683074539425e-13,\n                        -1.6089912746433457e-13,\n                        -1.5503369616374838e-13\n                    ]\n                },\n                \"energy\": -14.560675033137242,\n                \"gradient\": {\n                    \"dims\": [\n                        3\n                    ],\n                    \"ndim\": 1,\n                    \"size\": 3,\n                    \"vals\": [\n                        1.283417816466681e-13,\n                        1.887379141862766e-13,\n                        2.6201263381153694e-13\n                    ]\n                }\n            },\n            \"scf_eigenvalues_a\": {\n                \"dims\": [\n                    2\n                ],\n                \"ndim\": 1,\n                \"size\": 2,\n                \"vals\": [\n                    -4.622066373578523,\n                    -0.32292145055465227\n                ]\n            },\n            \"scf_fock_a\": {\n                \"ndim\": -1,\n                \"size\": 0\n            },\n            \"scf_total_energy\": -14.560675033137242\n        }\n    ]\n}"
  },
  {
    "path": "src/apps/madqc_v2/madqc.cpp",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <fstream>\n#if defined(HAVE_SYS_TYPES_H) && defined(HAVE_SYS_STAT_H) && \\\n    defined(HAVE_UNISTD_H)\n\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n// static inline int file_exists(const char *inpname) {\n//     struct stat buffer;\n//     int rc = stat(inpname, &buffer);\n//     return (rc == 0);\n// }\n\n#endif\n\n#include <madness/misc/info.h>\n#include <madness/world/worldmem.h>\n\n#include <Drivers.hpp>\n#include <MoldftLib.hpp>\n#include <MolresponseLib.hpp>\n#include <CCLib.hpp>\n#include <ParameterManager.hpp>\n#include <madness_exception.h>\n\nusing namespace madness;\n\n/// TODO:\n///  - restart options\n///  - nemo projections\n///  - numerical parameters\n\n\nvoid help(std::string wf) {\n    print(\"Usage: madqc [options] [input_file]\");\n    print(\"\\nOptions:\");\n    print(\"  --help=<workflow>           : show this help message\");\n    print(\"  --print_parameters=<group>  : print all parameters and exit\");\n    print(\"  --workflow=<name>           : specify the workflow to run (default: scf)\");\n    print(\"\\nAvailable workflows: scf, nemo, response, mp2, cc2, cis, oep\");\n    print(\"Available groups: dft, nemo, response, cc2, cis, oep, geometry\");\n    print(\"\");\n    if (wf == \"scf\") {\n        print(\"madqc --wf=scf\");\n        print(\"molecular Hartree-Fock and DFT code\");\n        print(\"\\nexamples: \");\n        print(\"madqc --wf=scf --geometry=h2o.xyz\");\n        print(\"madqc --wf=scf --geometry=he --dft=\\\"k=8\\\",xc=lda\");\n        print(\"madqc --wf=scf --geometry=h2o --dft=\\\"k=8; econv=1.e-4; L=30\\\"\");\n    }\n    else if (wf == \"nemo\") {\n        print(\"madqc --wf=nemo\");\n        print(\"molecular Hartree-Fock and DFT code with regularized orbitals\");\n        print(\"\\nexamples: \");\n        print(\"madqc --wf=nemo --geometry=h2o \");\n    }\n    else if (wf == \"response\") {\n        print(\"madqc --wf=response\");\n        print(\"Response theory for DFT and Hartree-Fock\");\n        print(\"\\nexamples: \");\n    }\n    else if (wf == \"mp2\" or wf == \"cc2\") {\n        print(\"madqc --wf=cc2\");\n        print(\"MP2/CC2 code for correlated wave functions\");\n        print(\"\\nexamples: \");\n        print(\"madqc --wf=cc2 --geometry=h2o --dft=\\\"k=5; econv=1.e-4; L=30\\\" --cc2=\\\"freeze=1\\\"\");\n    }\n    else if (wf == \"cis\") {\n        print(\"madqc --wf=cis\");\n        print(\"CIS code for excited states\");\n    }\n    else if (wf == \"oep\") {\n        print(\"madqc --wf=oep\");\n        print(\"Optimized effective potential code for DFT\");\n    }\n}\n\nvoid print_parameters(World& world, const commandlineparser& parser,\n                      const std::string group) {\n    Params pm;\n    if (group == \"\") {\n        print(\"please specify a data group to print parameters for\");\n        print(\"\\n  --print_parameters=<group>  : print all parameters and exit\");\n        print(\"\\nAvailable data groups: scf, nemo, response, cc2, cis, oep, geometry\");\n    }\n    else if (group == \"dft\") {\n        print(\"Available parameters for data group: dft\");\n        pm.get<CalculationParameters>().print();\n    }\n    else if (group == \"nemo\") {\n        print(\"Available parameters for data group: nemo\");\n        pm.get<Nemo::NemoCalculationParameters>().print();\n    }\n    else if (group == \"response\") {\n        print(\"Available parameters for data group: response\");\n        pm.get<ResponseParameters>().print();\n    }\n    else if (group == \"cc2\") {\n        print(\"Available parameters for data group: cc2\");\n        pm.get<CCParameters>().print();\n    }\n    else if (group == \"cis\") {\n        print(\"Available parameters for data group: cis\");\n        pm.get<TDHFParameters>().print();\n    }\n    else if (group == \"oep\") {\n        print(\"Available parameters for data group: oep\");\n        pm.get<OEP_Parameters>().print();\n    }\n    else if (group == \"geometry\") {\n        Molecule::GeometryParameters geometryparam;\n        geometryparam.print(\"geometry\", \"end\");\n    }\n    else {\n        std::string msg =\n            \"Unknown data group: \" + group +\n            \"\\nAvailable data group are: dft, nemo, response, cc2, cis, oep, geometry\\n\";\n        print(msg);\n    }\n}\n\n\nint main(int argc, char** argv) {\n    World& world = initialize(argc, argv);\n    if (world.rank() == 0) {\n        print_header1(\"MADQC -- Multiresolution Quantum Chemistry Code \");\n    }\n\n    commandlineparser parser(argc, argv);\n\n    if (parser.key_exists(\"help\")) {\n        help(parser.value(\"help\"));\n    }\n    else if (parser.key_exists(\"print_parameters\")) {\n        print_parameters(world, parser, parser.value(\"print_parameters\"));\n    }\n    else {\n        // limit lifetime of world so that finalize() can execute cleanly\n        try {\n            // Load info for MADNESS numerical routines\n            startup(world, argc, argv, true);\n            if (world.rank() == 0) print(info::print_revision_information());\n\n\n            // Create workflow\n            qcapp::Workflow wf(world);\n            std::string user_workflow = \"scf\";\n            if (parser.key_exists(\"workflow\")) user_workflow = parser.value(\"workflow\");\n            else if (parser.key_exists(\"wf\")) user_workflow = parser.value(\"wf\");\n            else if (parser.key_exists(\"w\")) user_workflow = parser.value(\"w\");\n\n            if (world.rank() == 0) {\n                print(\"input file  :\", parser.value(\"input\"));\n                print(\"workflow    :\", user_workflow);\n                print(\"\");\n            }\n\n            // read in all parameters from the input file and the command line\n            // logic and interdependent parameter follow later\n            Params pm(world, parser);\n\n\n            if (user_workflow == \"scf\") {\n                auto reference = std::shared_ptr<Application>(new SCFApplication<moldft_lib, SCF>(world, pm));\n                wf.addDriver(std::make_unique<qcapp::SinglePointDriver>(reference));\n            }\n            else if (user_workflow == \"nemo\") {\n                pm.get<CalculationParameters>().set_derived_value(\"k\", 8);\n                auto reference = std::shared_ptr<Application>(new SCFApplication<moldft_lib, Nemo>(world, pm));\n                wf.addDriver(std::make_unique<qcapp::SinglePointDriver>(reference));\n            }\n            else if (user_workflow == \"response\") {\n                auto reference = std::shared_ptr<Application>(new SCFApplication<moldft_lib, SCF>(world, pm));\n\n                // directory with the ground-state DFT outputs\n                std::filesystem::path gsDir = \"MyCalc/task_0/moldft\";\n\n                wf.addDriver(std::make_unique<qcapp::SinglePointDriver>(reference));\n                wf.addDriver(std::make_unique<qcapp::SinglePointDriver>(\n                    std::make_unique<ResponseApplication<molresponse_lib>>(world, pm, gsDir)));\n            }\n            else if (user_workflow == \"mp2\" or user_workflow == \"cc2\") {\n                // set the tensor type\n                TensorType tt = TT_2D;\n                FunctionDefaults<6>::set_tensor_type(tt);\n\n                // do the parameter logic and print parameters\n                auto& calc_param = pm.get<CalculationParameters>();\n                auto& cc_param = pm.get<CCParameters>();\n                auto& molecule = pm.get<Molecule>();\n\n                calc_param.set_derived_value(\"k\", 5);\n                calc_param.set_derived_value(\"print_level\", 2);\n                calc_param.set_derived_value(\"econv\", cc_param.get<double>(\"thresh_6d\") * 0.01);\n\n                calc_param.set_derived_values(molecule);\n                cc_param.set_derived_values();\n\n                auto reference = std::shared_ptr<SCFApplication<moldft_lib, Nemo>>(\n                    new SCFApplication<moldft_lib, Nemo>(world, pm));\n                wf.addDriver(std::make_unique<qcapp::SinglePointDriver>(reference));\n\n                wf.addDriver(std::make_unique<qcapp::SinglePointDriver>(\n                    std::make_unique<CC2Application<cc_lib, SCFApplication<moldft_lib, Nemo>>>(world, pm, *reference)));\n            }\n            else if (user_workflow == \"cis\") {\n                auto reference = std::shared_ptr<SCFApplication<moldft_lib, Nemo>>(\n                    new SCFApplication<moldft_lib, Nemo>(world, pm));\n\n                wf.addDriver(std::make_unique<qcapp::SinglePointDriver>(reference));\n                wf.addDriver(std::make_unique<qcapp::SinglePointDriver>(\n                    std::make_unique<TDHFApplication<SCFApplication<moldft_lib, Nemo>>>(world, pm, *reference)));\n            }\n            else if (user_workflow == \"oep\") {\n                // add tight convergence criteria\n                CalculationParameters& cparam = pm.get<CalculationParameters>();\n                auto convergence_crit = cparam.get<std::vector<std::string>>(\"convergence_criteria\");\n                if (std::find(convergence_crit.begin(), convergence_crit.end(), \"each_energy\") == convergence_crit.\n                    end()) {\n                    convergence_crit.push_back(\"each_energy\");\n                }\n                cparam.set_derived_value(\"convergence_criteria\", convergence_crit);\n\n                auto reference = std::shared_ptr<Application>(new SCFApplication<moldft_lib, Nemo>(world, pm));\n                auto moldft_app = std::dynamic_pointer_cast<SCFApplication<moldft_lib, Nemo>>(reference);\n                if (!moldft_app) {\n                    MADNESS_EXCEPTION(\"Could not cast reference to SCFApplication<moldft_lib>\", 1);\n                }\n\n                wf.addDriver(std::make_unique<qcapp::SinglePointDriver>(reference));\n                wf.addDriver(std::make_unique<qcapp::SinglePointDriver>(\n                    std::make_unique<OEPApplication<SCFApplication<moldft_lib, Nemo>>>(world, pm, *moldft_app)));\n            }\n            else {\n                static std::string msg = \"Unknown workflow: \" + user_workflow +\n                    \"\\nAvailable workflows are: response, mp2, cc2, cis\";\n                MADNESS_EXCEPTION(msg.c_str(), 1);\n            }\n\n            // Execute both in \"MyCalc\" directory\n            if (world.rank() == 0) {\n                print_header1(\"Calculation parameters\");\n                pm.get<Molecule>().print();\n                wf.print_parameters(world);\n                print(\"\");\n            }\n\n            if (world.rank() == 0) print_header1(\"Starting calculations\");\n            std::string prefix = pm.get<CalculationParameters>().prefix();\n            wf.run(prefix);\n\n            if (true) {\n                qcapp::Workflow opt_wf(world);\n\n                std::function<std::unique_ptr<Application>(Params)> scfFactory =\n                    [&](Params p) {\n                    return std::make_unique<SCFApplication<moldft_lib>>(world, p);\n                };\n\n                opt_wf.addDriver(\n                    std::make_unique<qcapp::OptimizeDriver>(world, scfFactory, pm));\n            }\n        }\n        catch (std::exception& e) {\n            if (world.rank() == 0) {\n                print_header2(\"caught an exception in the main loop\");\n                print(e.what());\n                print_header2(\"ending program run\");\n            }\n        }\n\n\n        // Nearly all memory will be freed at this point\n        world.gop.fence();\n        world.gop.fence();\n        print_stats(world);\n    } // world is dead -- ready to finalize\n    finalize();\n\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/madqc_v2/test_cc2_callable.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nimport argparse\n\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare, cleanup\n\nif __name__ == \"__main__\":\n\n    # get command line arguments\n    parser=argparse.ArgumentParser(description='command line arguments for this test case')\n    # default value will be set by cmake\n    parser.add_argument(\"--reference_directory\",action=\"store\",default=\"@SRCDIR@\",help=\"the directory with the reference file in json format\")\n    args=parser.parse_args()\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE@\")\n    print(\" reference files found in directory:\",args.reference_directory)\n\n    prefix='mad_@BINARY@_@TESTCASE@'\n    outputfile=prefix+'.calc_info.json'\n    referencefile=args.reference_directory+\"/\"+prefix+\".calc_info.ref.json\"\n\n    # run test\n    global_arguments=' --geometry=he --wf=cc2'\n    dft_arguments=' --dft=\"maxiter=1; econv=1.e-4; dconv=1.e-3; prefix='+prefix+'; k=5\"'\n    other_arguments=' --cc2=\"freeze 1\"'\n    cleanup(prefix)  # Clean up previous output files\n    cmd='./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    print(\"executing \\n \",cmd)\n#    p=subprocess.run(cmd,shell=True,capture_output=True, text=True)\n\n    p=subprocess.run(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE , universal_newlines=True)\n    print(\"finished with run\")\n    print(p.stdout)\n    exitcode=p.returncode\n    print(\"exitcode \",exitcode)\n\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",0,\"model\"],1.e-4)\n    cmp.compare([\"tasks\",0,\"properties\",\"energy\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"model\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"nfreeze\"],1.e-2)\n    cmp.compare([\"tasks\",1,\"mp2_correlation_energy\"],1.e-2)\n    print(\"final success: \",cmp.success)\n\n    sys.exit(cmp.exitcode() + exitcode)"
  },
  {
    "path": "src/apps/madqc_v2/test_cis_energy_he.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare, cleanup\n\nif __name__ == \"__main__\":\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE@\")\n    print(\" reference files found in directory: @SRCDIR@\")\n\n    prefix='mad_@BINARY@_@TESTCASE@'\n    outputfile=prefix+'.calc_info.json'\n    referencefile=\"@SRCDIR@/\"+prefix+\".calc_info.ref.json\"\n\n    # run test\n    global_arguments=' --geometry=he --wf=cis'\n    dft_arguments=' --dft=\"k=6; maxiter=1; econv=1.e-4; dconv=1.e-3; prefix='+prefix+'\"'\n    other_arguments=' --tdhf=\"thresh=1.e-3; maxiter=10; guess_maxiter=0; econv=1; dconv=1; guess_excitation_operators=dipole+; guess_excitations=2; nexcitations=2\"'\n    cleanup(prefix)\n    cmd='./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    print(\"executing \\n \",cmd)\n#    output=subprocess.run(cmd,shell=True,capture_output=True, text=True).stdout\n    p=subprocess.run(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE , universal_newlines=True)\n\n    print(\"finished with run\")\n    print(p.stdout)\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"irrep\"],1.0)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"omega\"],1.e-3)\n    cmp.compare([\"tasks\",1,\"excitations\",1,\"irrep\"],1.0)\n    cmp.compare([\"tasks\",1,\"excitations\",1,\"omega\"],1.e-3)\n    print(\"final success: \",cmp.success)\n\n    sys.exit(cmp.exitcode())\n"
  },
  {
    "path": "src/apps/madqc_v2/test_cis_symmetry_h2o.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare, cleanup, skip_on_small_machines\n\nif __name__ == \"__main__\":\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE@\")\n    print(\" reference files found in directory: @SRCDIR@\")\n\n    if (skip_on_small_machines()):\n        print(\"Skipping this verylong test on small machines\")\n        sys.exit(77)\n\n    prefix='mad_@BINARY@_@TESTCASE@'\n    outputfile=prefix+'.calc_info.json'\n    referencefile=\"@SRCDIR@/\"+prefix+\"_b1.calc_info.ref.json\"\n\n    # run test\n    global_arguments=' --geometry=h2o --wf=cis'\n    dft_arguments=' --dft=\"k=8; localize=canon; prefix='+prefix+'\"'\n    other_arguments=' --tdhf=\"freeze=1; thresh=1.e-3; econv=1.e-3; dconv=1.e-2\"'\n    cleanup(prefix)  # Clean up previous output files\n    cmd='./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    print(\"executing \\n \",cmd)\n#    output=subprocess.run(cmd,shell=True,capture_output=True, text=True).stdout\n    p=subprocess.run(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE , universal_newlines=True)\n\n    print(\"finished with run\")\n    print(p.stdout)\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"irrep\"],1.0)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"omega\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"oscillator_strength_length\"],1.e-3)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"oscillator_strength_velocity\"],1.e-3)\n\n    referencefile=\"@SRCDIR@/\"+prefix+\"_a2.calc_info.ref.json\"\n    dft_arguments=' --dft=\"k=8; localize=canon; prefix='+prefix+'; no_compute=1\"'\n    other_arguments=' --tdhf=\"irrep=a2; freeze=1; thresh=1.e-3; econv=1.e-3; dconv=1.e-2; restart=no_restart\"'\n    cmd='./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    print(\"executing \\n \",cmd)\n#    output=subprocess.run(cmd,shell=True,capture_output=True, text=True).stdout\n    p=subprocess.run(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE , universal_newlines=True)\n    print(\"finished with run\")\n    print(p.stdout)\n\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"irrep\"],1.0)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"omega\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"oscillator_strength_length\"],1.e-3)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"oscillator_strength_velocity\"],1.e-3)\n    print(\"final success: \",cmp.success)\n\n\n    sys.exit(cmp.exitcode())\n"
  },
  {
    "path": "src/apps/madqc_v2/test_lrcc2_helium.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nimport argparse\n\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare, cleanup, skip_on_small_machines\n\nif __name__ == \"__main__\":\n\n    # skip test on small machines\n    # sys.exit(77) is used to indicate that the test was skipped, cf AddScriptedTests.cmake\n    if (skip_on_small_machines()):\n        print(\"Skipping this verylong test on small machines\")\n        sys.exit(77)\n\n    # get command line arguments\n    parser=argparse.ArgumentParser(description='command line arguments for this test case')\n    # default value will be set by cmake\n    parser.add_argument(\"--reference_directory\",action=\"store\",default=\"@SRCDIR@\",help=\"the directory with the reference file in json format\")\n    args=parser.parse_args()\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE@\")\n    print(\" reference files found in directory:\",args.reference_directory)\n\n    prefix='mad_@BINARY@_@TESTCASE@'\n    outputfile=prefix+'.calc_info.json'\n    referencefile=args.reference_directory+\"/\"+prefix+\".calc_info.ref.json\"\n\n    # run test\n    global_arguments=' --geometry=he --wf=cc2'\n    dft_arguments=' --dft=\"maxiter=10; econv=1.e-5; dconv=1.e-3; prefix='+prefix+'; k=5\"'\n    other_arguments=' --cc2=\"freeze 0; calc_type=lrcc2; iter_max=2\"'\n    cleanup(prefix)  # Clean up previous output files\n    cmd='./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    print(\"executing \\n \",cmd)\n#    p=subprocess.run(cmd,shell=True,capture_output=True, text=True)\n\n    p=subprocess.run(cmd,shell=True,stdout=None, stderr=subprocess.PIPE , universal_newlines=True)\n    print(\"finished with run\")\n    exitcode=p.returncode\n    print(\"exitcode \",exitcode)\n\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",0,\"model\"],1.e-4)\n    cmp.compare([\"tasks\",0,\"properties\",\"energy\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"model\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"nfreeze\"],1.e-2)\n    cmp.compare([\"tasks\",1,\"cc2_correlation_energy\"],1.e-2)\n    cmp.compare([\"tasks\",1,\"excitations\",0,\"omega\"],1.e-2)  # lrcc2 es\n    cmp.compare([\"tasks\",2,\"mp2_correlation_energy\"],1.e-2)\n    print(\"final success: \",cmp.success)\n\n    sys.exit(cmp.exitcode() + exitcode)"
  },
  {
    "path": "src/apps/madqc_v2/test_moldft_energy.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare, cleanup\n\nif __name__ == \"__main__\":\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE@\")\n    print(\" reference files found in directory: @SRCDIR@\")\n\n    prefix='mad_@BINARY@_@TESTCASE@'\n    outputfile=prefix+'.calc_info.json'\n    referencefile=\"@SRCDIR@/\"+prefix+\".calc_info.ref.json\"\n\n    # run test\n    global_arguments=' --geometry=\"source_name=he; eprec=1.e-6\"'\n    dft_arguments=' --dft=\"maxiter=10; econv=1.e-4; dconv=1.e-3; prefix='+prefix+'\"'\n    other_arguments=''\n    cleanup(prefix)  # Clean up previous output files\n    cmd='./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    print(\"executing \\n \",cmd)\n#    p=subprocess.run(cmd,shell=True,capture_output=True, text=True)\n    p=subprocess.run(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE , universal_newlines=True)\n\n    print(\"finished with run\")\n    print(p.stdout)\n    exitcode=p.returncode\n    print(\"exitcode \",exitcode)\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",0,\"scf_total_energy\"],1.e-4)\n    print(\"final success: \",cmp.success)\n\n    sys.exit(p.returncode + exitcode)"
  },
  {
    "path": "src/apps/madqc_v2/test_moldft_energy_mpi_parallel.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare, cleanup\n\nif __name__ == \"__main__\":\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE@\")\n    print(\" reference files found in directory: @SRCDIR@\")\n\n    prefix='mad_@BINARY@_@TESTCASE@'\n    outputfile=prefix+'.calc_info.json'\n    referencefile=\"@SRCDIR@/\"+prefix+\".calc_info.ref.json\"\n\n    # run test\n    global_arguments=' --geometry=he'\n    dft_arguments=' --dft=\"maxiter=1; econv=1.e-4; dconv=1.e-3; prefix='+prefix+'\"'\n    other_arguments=''\n    cleanup(prefix)  # Clean up previous output files\n    cmd='MAD_NUM_THREADS=1 mpirun -np 2 ./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    print(\"executing \\n \",cmd)\n#    p=subprocess.run(cmd,shell=True,capture_output=True, text=True)\n    p=subprocess.run(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE , universal_newlines=True)\n\n    print(\"finished with run\")\n    print(p.stdout)\n    exitcode=p.returncode\n    print(\"exitcode \",exitcode)\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",0,\"properties\",\"energy\"],1.e-1)\n    cmp.compare([\"tasks\",0,\"metadata\",\"mpi_size\"],1.e-4)\n    print(\"final success: \",cmp.success)\n\n    sys.exit(cmp.exitcode() + exitcode)"
  },
  {
    "path": "src/apps/madqc_v2/test_mp2_helium.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nimport argparse\n\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare, cleanup, skip_on_small_machines\n\nif __name__ == \"__main__\":\n\n    # skip test on small machines\n    if (skip_on_small_machines()):\n        print(\"Skipping this verylong test on small machines\")\n        \"\"\"       sys.exit(77) is used to indicate that the test was skipped, cf AddScriptTest in CMake\"\"\"\n        sys.exit(77)\n\n    # get command line arguments\n    parser=argparse.ArgumentParser(description='command line arguments for this test case')\n    # default value will be set by cmake\n    parser.add_argument(\"--reference_directory\",action=\"store\",default=\"@SRCDIR@\",help=\"the directory with the reference file in json format\")\n    args=parser.parse_args()\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE@\")\n    print(\" reference files found in directory:\",args.reference_directory)\n\n    prefix='mad_@BINARY@_@TESTCASE@'\n    outputfile=prefix+'.calc_info.json'\n    referencefile=args.reference_directory+\"/\"+prefix+\".calc_info.ref.json\"\n\n    # run test\n    global_arguments=' --geometry=he --wf=mp2'\n    dft_arguments=' --dft=\"maxiter=10; econv=1.e-5; dconv=1.e-3; prefix='+prefix+'; k=5\"'\n    other_arguments=' --cc2=\"freeze 0; calc_type=mp2\"'\n    cleanup(prefix)  # Clean up previous output files\n    cmd='./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    print(\"executing \\n \",cmd)\n#    p=subprocess.run(cmd,shell=True,capture_output=True, text=True)\n\n    p=subprocess.run(cmd,shell=True,stdout=None, stderr=None , universal_newlines=True)\n    print(\"finished with run\")\n    exitcode=p.returncode\n    print(\"exitcode \",exitcode)\n\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",0,\"model\"],1.e-4)\n    cmp.compare([\"tasks\",0,\"properties\",\"energy\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"model\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"nfreeze\"],1.e-2)\n    cmp.compare([\"tasks\",1,\"mp2_correlation_energy\"],1.e-2)\n    print(\"final success: \",cmp.success)\n\n    sys.exit(cmp.exitcode() + exitcode)"
  },
  {
    "path": "src/apps/madqc_v2/test_nemo_energy.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare, cleanup\n\nif __name__ == \"__main__\":\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE@\")\n    print(\" reference files found in directory: @SRCDIR@\")\n\n    prefix='mad_@BINARY@_@TESTCASE@'\n    outputfile=prefix+'.calc_info.json'\n    referencefile=\"@SRCDIR@/\"+prefix+\".calc_info.ref.json\"\n\n    # run test\n    global_arguments='--geometry=he --wf=nemo'\n    dft_arguments=' --dft=\"maxiter=10; econv=1.e-5; dconv=1.e-3; prefix='+prefix+'\"'\n    other_arguments=''\n    cmd='./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    cleanup(prefix)\n    print(\"executing \\n \",cmd)\n#    p=subprocess.run(cmd,shell=True,capture_output=True, text=True)\n    p=subprocess.run(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE , universal_newlines=True)\n    print(\"finished with run\")\n    print(p.stdout)\n    exitcode=p.returncode\n    print(\"program ended successfully: \",exitcode==0)\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",0,\"scf_total_energy\"],1.e-4)\n    cmp.compare([\"tasks\",0,\"properties\",\"energy\"],1.e-4)\n    cmp.compare([\"tasks\",0,\"scf_eigenvalues_a\",\"vals\",0],1.e-4)\n    print(\"final success: \",cmp.success)\n\n    sys.exit(cmp.exitcode() + exitcode)\n"
  },
  {
    "path": "src/apps/madqc_v2/test_nemo_localization.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\n\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare, cleanup, skip_on_small_machines\n\ndef localizer_run(localizer):\n\n    if (skip_on_small_machines()):\n        print(\"Skipping this verylong test on small machines\")\n        sys.exit(77)\n\n    prefix='mad_@BINARY@_@TESTCASE@'\n    outputfile=prefix+localizer+'.calc_info.json'\n    referencefile=\"@SRCDIR@/\"+prefix+\".calc_info.ref.json\"\n\n\n    cleanup(prefix)\n    cleanup(prefix+localizer)\n    cmd='./@BINARY@ --geometry=h2o --wf=nemo --dft=\"maxiter=10; econv=1.e-5; k=8; localize='+localizer+'; dconv=1.e-3; prefix='+prefix+localizer+'\"'\n    print(\"executing \\n \",cmd)\n#    output=subprocess.run(cmd,shell=True,capture_output=True, text=True).stdout\n    p=subprocess.run(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE , universal_newlines=True)\n\n    print(\"finished with run1\")\n    print(p.stdout)\n\n\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",0,\"scf_total_energy\"],1.e-4)\n    return cmp.success\n\nif __name__ == \"__main__\":\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE@\")\n    print(\" reference files found in directory: @SRCDIR@\")\n\n\n    success=localizer_run('canon')\n    success=localizer_run('boys') and success\n    success=localizer_run('new') and success\n\n    print(\"final success: \",success)\n    ierr=0\n    if (not success):\n        ierr=1\n    sys.exit(ierr)"
  },
  {
    "path": "src/apps/madqc_v2/test_oep_energy.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nimport argparse\n\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare, cleanup\n\nif __name__ == \"__main__\":\n\n    # get command line arguments\n    parser=argparse.ArgumentParser(description='command line arguments for this test case')\n    # default value will be set by cmake\n    parser.add_argument(\"--reference_directory\",action=\"store\",default=\"@SRCDIR@\",help=\"the directory with the reference file in json format\")\n    args=parser.parse_args()\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE\")\n    print(\" reference files found in directory:\",args.reference_directory)\n\n    prefix='mad_@BINARY@_@TESTCASE@'\n    outputfile=prefix+'.calc_info.json'\n    referencefile=args.reference_directory+\"/\"+prefix+\".calc_info.ref.json\"\n\n    # run test\n    global_arguments=' --geometry=be --wf=oep'\n    dft_arguments=' --dft=\"maxiter=3; econv=1.e-4; dconv=1.e-3; k=7; prefix='+prefix+'\"'\n    other_arguments=' --oep=\"model=oaep; oep_maxiter=3\"'\n\n    # cleanup previous output files\n    cleanup(prefix)\n    cmd='./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    print(\"executing \\n \",cmd)\n#    output=subprocess.run(cmd,shell=True,capture_output=True, text=True).stdout\n    p=subprocess.run(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE , universal_newlines=True)\n\n    print(\"finished with run\")\n    print(p.stdout)\n    exitcode=p.returncode\n    print(\"program ended successfully: \",exitcode==0)\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"tasks\",0,\"scf_total_energy\"],1.e-4)\n    cmp.compare([\"tasks\",0,\"properties\",\"energy\"],1.e-4)\n    cmp.compare([\"tasks\",0,\"scf_eigenvalues_a\",\"vals\",0],1.e-4)\n    cmp.compare([\"tasks\",1,\"scf_total_energy\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"properties\",\"energy\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"scf_eigenvalues_a\",\"vals\",0],1.e-4)\n    cmp.compare([\"tasks\",1,\"model\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"scf_total_energy\"],1.e-4)\n    cmp.compare([\"tasks\",1,\"drho\"],1.e-4)\n    print(\"final success: \",cmp.success)\n\n    sys.exit(cmp.exitcode() + exitcode)"
  },
  {
    "path": "src/apps/moldft/CMakeLists.txt",
    "content": "# src/apps/moldft\n\nadd_mad_executable(moldft moldft.cc MADchem)\nadd_dependencies(applications-madness moldft)\n\n# removed mcpfit since it is likely only of historic interest\n#add_mad_executable(mcpfit mcpfit.cc MADchem)\n#add_mad_executable(preal preal.cc MADchem)\n\nadd_mad_executable(testpg testpg.cc MADchem)\n\nadd_mad_executable(testperiodicdft testperiodicdft.cc MADchem)\n\nif(BUILD_TESTING)\n#  add_scripted_tests(../madqc_v2/test_energy.py moldft \"short;applications\")\n#  add_scripted_tests(../madqc_v2/test_energy_mpi_parallel.py moldft \"short;applications\")\nendif()\n\n\n# removed mcpfit since it is likely only of historic interest\ninstall(TARGETS moldft DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/moldft/calcguess.nw",
    "content": "start\n\n# As the first step in generating the XML guess data,\n# run NWChem on this file to generate data for each atom.\n# Then give the output as standard input to xmlguess.py.\n\n\nbasis\n * library sto-3g\nend\n\ndft\n  odft\n  smear 0.02\n  print \"final vectors\" high\nend\n\ngeometry ; H 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; He 0 0 0; symmetry d2h; end\ndft; mult 1; vectors atomic; end\ntask dft ignore\n\ngeometry ; Li 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Be 0 0 0; symmetry d2h; end\ndft; mult 1; vectors atomic; end\ntask dft ignore\n\ngeometry ; B 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; C 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; N 0 0 0; symmetry d2h; end\ndft; mult 4; vectors atomic; end\ntask dft ignore\n\ngeometry ; O 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; F 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Ne 0 0 0; symmetry d2h; end\ndft; mult 1; vectors atomic; end\ntask dft ignore\n\ngeometry ; Na 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Mg 0 0 0; symmetry d2h; end\ndft; mult 1; vectors atomic; end\ntask dft ignore\n\ngeometry ; Sc 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Ti 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; V 0 0 0; symmetry d2h; end\ndft; mult 4; vectors atomic; end\ntask dft ignore\n\ngeometry ; Cr 0 0 0; symmetry d2h; end\ndft; mult 7; vectors atomic; end\ntask dft ignore\n\ngeometry ; Mn 0 0 0; symmetry d2h; end\ndft; mult 6; vectors atomic; end\ntask dft ignore\n\ngeometry ; Fe 0 0 0; symmetry d2h; end\ndft; mult 5; vectors atomic; end\ntask dft ignore\n\ngeometry ; Co 0 0 0; symmetry d2h; end\ndft; mult 4; vectors atomic; end\ntask dft ignore\n\ngeometry ; Ni 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; Cu 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Zn 0 0 0; symmetry d2h; end\ndft; mult 1; vectors atomic; end\ntask dft ignore\n\ngeometry ; Al 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Si 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; P 0 0 0; symmetry d2h; end\ndft; mult 4; vectors atomic; end\ntask dft ignore\n\ngeometry ; S 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; Cl 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Ar 0 0 0; symmetry d2h; end\ndft; mult 1; vectors atomic; end\ntask dft ignore\n\ngeometry ; K 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Ca 0 0 0; symmetry d2h; end\ndft; mult 1; vectors atomic; end\ntask dft ignore\n\ngeometry ; Y 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Zr 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; Nb 0 0 0; symmetry d2h; end\ndft; mult 4; vectors atomic; end\ntask dft ignore\n\ngeometry ; Mo 0 0 0; symmetry d2h; end\ndft; mult 7; vectors atomic; end\ntask dft ignore\n\ngeometry ; Tc 0 0 0; symmetry d2h; end\ndft; mult 6; vectors atomic; end\ntask dft ignore\n\ngeometry ; Ru 0 0 0; symmetry d2h; end\ndft; mult 5; vectors atomic; end\ntask dft ignore\n\ngeometry ; Rh 0 0 0; symmetry d2h; end\ndft; mult 4; vectors atomic; end\ntask dft ignore\n\ngeometry ; Pd 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; Ag 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Cd 0 0 0; symmetry d2h; end\ndft; mult 1; vectors atomic; end\ntask dft ignore\n\ngeometry ; Ga 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Ge 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; As 0 0 0; symmetry d2h; end\ndft; mult 4; vectors atomic; end\ntask dft ignore\n\ngeometry ; Se 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; Br 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Kr 0 0 0; symmetry d2h; end\ndft; mult 1; vectors atomic; end\ntask dft ignore\n\ngeometry ; Rb 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Sr 0 0 0; symmetry d2h; end\ndft; mult 1; vectors atomic; end\ntask dft ignore\n\ngeometry ; In 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\ngeometry ; Sn 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; Sb 0 0 0; symmetry d2h; end\ndft; mult 4; vectors atomic; end\ntask dft ignore\n\ngeometry ; Te 0 0 0; symmetry d2h; end\ndft; mult 3; vectors atomic; end\ntask dft ignore\n\ngeometry ; I 0 0 0; symmetry d2h; end\ndft; mult 2; vectors atomic; end\ntask dft ignore\n\n\n\n"
  },
  {
    "path": "src/apps/moldft/fci/GNUmakefile",
    "content": "#\n# $Id: GNUmakefile,v 1.2 1999/07/28 00:23:43 d3e129 Exp $\n#\n\n   ARFLAGS = urs\n    RANLIB = ranlib\n\n# SUN SOLARIS\n#       CC = cc\n#   CFLAGS = -O\n#       FC = f77\n#   FFLAGS = -fast -O4 -stackvar -fsimple=2 -depend -dalign\n#     LIBS = \n# INCLUDES = -I.\n#  DEFINES = -DSUN\n# CPPFLAGS = $(INCLUDES) $(DEFINES)\n#    BLAS := dgemm.o idamax.o crayio.o dscal.o daxpy.o dcopy.o ddot.o \n#  LDFLAGS =\n\n# LINUX with g77\n       CC = gcc\n   CFLAGS = -g -O\n       FC = gfortran\n   FFLAGS = -O3 -malign-double -ffast-math -fno-second-underscore\n## -funroll-loops ... introduces bugs in mfind_weight\n##g -Wimplicit -Wunused \n     LIBS = -L.\n INCLUDES = -I.\n  DEFINES = -DLINUX\n CPPFLAGS = $(INCLUDES) $(DEFINES)\n BLAS := linux_cputime.o dgemm.o idamax.o crayio.o dscal.o daxpy.o dcopy.o ddot.o\n  LDFLAGS =\n\n# IBM AIX\n#EXPLICITF = TRUE\n#       FC = xlf\n#   FFLAGS = -O3 -qnosave -qalign=4k \n#     LIBS = -lblas\n# INCLUDES = -I.\n#  DEFINES = -DIBM -DAIX\n# CPPFLAGS = $(INCLUDES) $(DEFINES)\n# FCONVERT = $(CPP) $(CPPFLAGS)  $< | sed '/^\\#/D'  > $*.f\n#     BLAS = \n\n\n############################################\n# Below here should be machine independent #\n############################################\n\n\n OBJ :=  fci_mfndwt.o  fci_ofndoc.o  fci_num.o \\\n         fci_ifill.o   fci_mgraph.o  fci_ofndwt.o  fci_setup.o \\\n         fci_mfndoc.o  fci_ograph.o  \\\n         fci_err.o     fci_tinit.o   fci_cntone.o  fci_spnad.o  \\\n         fci_prspnad.o \\\n         fci_dfill.o   fci_spnfrc.o  screen.o      renorm.o     \\\n         fci_onelcc.o  fci_sigma.o  fci_diags.o \\\n         fci_load.o \\\n         fci_srt1cc.o  yacobi.o      fci_hmod.o   fci_prntri.o \\\n         fci_make_eaj.o fci_prteop.o fci_hsort.o   fci_detwalk.o \\\n         fci_owalk_info.o fci_couple1.o fci_1pdm.o fci_output.o \\\n         fci_2pdm.o    fci_couple2.o  fci_3pdm.o fci_couple3.o \\\n         fci_hami.o    fci_onepdm.o  fci_intchk.o fci_prvec.o \\\n         fci_hv.o      fci_axb.o fci_solve.o fci_davids.o rsg.o $(BLAS)\n\nfci:\tfci.o libfci.a\n\t$(FC) $(LDFLAGS) $(FFLAGS) -o $@ $^ $(LIBS)\n\ntimer:\ttimer.o libfci.a\n\t$(FC) $(LDFLAGS) $(FFLAGS) -o $@ timer.o libblas.a libfci.a $(LIBS)\n\nlibfci.a:\t$(OBJ)\n\t$(AR) $(ARFLAGS) $@ $^\n\t$(RANLIB) $@\n\nclean:\n\t-$(RM) -f core fci *.o libfci.a\n\nrealclean:\tclean\n\t-$(RM) -f *~ \\#*\\# *mon.out *.prof a.out TAGS\n\n$(OBJ):\tfciinfo.fh fciparam.fh\n\nfci_tinit.o:\tfcitime.fh\n\nifdef EXPLICITF\n#\n# Needed on when FC does not preprocess .F files with CPP to get .f files\n#\n.SUFFIXES:\t\n.SUFFIXES:\t.o .s .F .f .c\n\n FCONVERT = (/bin/cp $< /tmp/$$$$.c; \\\n\t\t$(CPP) $(CPPFLAGS) /tmp/$$$$.c | sed '/^$$/d' > $*.f; \\\n\t\t\t/bin/rm -f /tmp/$$$$.c) || exit 1\n\n.F.o:\t\n\t@echo Converting $*.F '->' $*.f\n\t@$(FCONVERT)\n\t$(FC) -c $(FFLAGS) $*.f\n\t@$(RM) $*.f\n\n.F.f:\n\t@echo Converting $*.F '->' $*.f\n\t@$(FCONVERT)\nendif\n# \n\n"
  },
  {
    "path": "src/apps/moldft/fci/bitops.fh",
    "content": "*\n* $Id: bitops.fh,v 1.2 1999/07/28 00:23:38 d3e129 Exp $\n*\n#ifdef LINUXF2C\n#define ieor(a,b) xor(a,b)\n#endif\n"
  },
  {
    "path": "src/apps/moldft/fci/crayio.c",
    "content": "/*\n $Id$\n   Simulate the cray 64 bit word addressable I/O routines and\n   allow for large buffering in core.\n\n\n   CALL WOPEN(UNIT, NAME, BLOCKS, STATS, IERR)\n                    ----\n\n   CALL WCLOSE(UNIT, IERR)\n\n   CALL GETWA(UNIT, RESULT, ADDR, COUNT, IERR)\n\n   CALL PUTWA(UNIT, SOURCE, ADDR, COUNT, IERR)\n\n   Currently the I/O is syncronous and unbuffered */\n\n#include <stdio.h>\n\n#include <sys/time.h>\n#include <sys/types.h>\n#include <sys/file.h>\n#include <fcntl.h>\n\ntypedef int integer;\n\n#ifndef L_XTND\n#define L_XTND SEEK_END\n#endif\n\n#define max_file 99\n\nextern char *malloc();\nextern off_t lseek();\nextern char *strncpy();\n/*extern char *sprintf();*/\n\nstatic int first_call = 1;   /* need to do stuff on the first call */\n\nstatic struct w_file {\n  int fds;                   /* file descriptor */\n  off_t length;              /* file length in bytes */\n  off_t position;            /* current file position in bytes a la lseek */\n  char *path;                /* file name */\n  int stats;                 /* boolean flag to collect statistics */\n  double words_write;        /* total no. of words written */\n  double words_read;         /* total no. of words read */\n  double time_write;         /* total wall time writing */\n  double time_read;          /* total wall time reading */\n  int n_read;                /* no. of read requests */\n  int n_write;               /* no. of write reqeusts */\n  int seek_read;             /* no. of seeks on read */\n  int seek_write;            /* no. of seeks on write */\n} file_array[max_file];\n\nvoid walltm_(double *ai)\n/* return ai with the wall clock time in seconds as a double.\n   it might be accurate to about 0.01s at best */\n{\n  struct timeval tp;\n  struct timezone tzp;\n\n  (void) gettimeofday(&tp,&tzp);\n  *ai = (double) tp.tv_sec + ((double) tp.tv_usec) * 1.0e-6;\n}\n\nstatic int CheckUnit(integer unit)\n{\n  if ( (unit < 0) || (unit >= max_file) )\n    return -1;\n\n  if ( file_array[unit].fds == -1 )\n    return -1;\n\n  return 0;\n}\n\nstatic int CheckAddr(integer addr)\n{\n  if (addr <= 0)\n    return -4;\n  else\n    return 0;\n}\n\nstatic int CheckCount(integer count)\n{\n  if (count < 0)\n    return -4;\n  else\n    return 0;\n}\n\nvoid InitFileStats(struct w_file *file)\n{\n  file->stats = 1;\n  file->words_write = 0.0e0;\n  file->words_read = 0.0e0;\n  file->time_read = 0.0e0;\n  file->time_write = 0.0e0;\n  file->n_read = 0;\n  file->n_write = 0;\n  file->seek_read = 0;\n  file->seek_write = 0;\n}\n\nvoid PrintFileStats(struct w_file *unit, struct w_file *file)\n{\n  double ave_read=0.0e0, ave_write=0.0e0;\n  double rate_read=0.0e0, rate_write=0.0e0;\n\n  (void) fflush(stdout);\n\n  if (file->n_read) {\n    ave_read = file->words_read / (double) file->n_read;\n    if (file->time_read > 0.0e0)\n      rate_read = file->words_read / (1000000.0e0 * file->time_read);\n  }\n\n  if (file->n_write) {\n    ave_write = file->words_write / (double) file->n_write;\n    if (file->time_write > 0.0e0)\n      rate_write = file->words_write / (1000000.0e0 * file->time_write);\n  }\n\n  (void) fflush(stdout);\n  (void) fflush(stderr);\n  (void) fprintf(stdout,\"CRAYIO: Statistics for unit %d, file '%s', length=%d bytes.\\n\",\n\t\t unit, file->path, file->length);\n  (void) fprintf(stdout,\"CRAYIO: oper :  #req.  :  #seek  :   #words  :\");\n  (void) fprintf(stdout,\" #w/#req : time(s) :  MW/s \\n\");\n  (void) fprintf(stdout,\"CRAYIO: read : %7d : %7d : %9d : %7d : %7.1f : %6.3f\\n\",\n\t\t file->n_read, file->seek_read, (long) file->words_read,\n\t\t (long) ave_read, file->time_read, rate_read);\n  (void) fprintf(stdout,\"CRAYIO:write : %7d : %7d : %9d : %7d : %7.1f : %6.3f\\n\",\n\t\t file->n_write, file->seek_write, (long) file->words_write,\n\t\t (long) ave_write, file->time_write, rate_write);\n  (void) fflush(stdout);\n}\n\nvoid InitFileData(struct w_file *file)\n{\n  file->fds = -1;\n  file->length = -1;\n  file->path = (char *) NULL;\n  file->position = (off_t) -1;\n}\n\nvoid FirstCall()\n     /* Initialization on first call to anything */\n{\n  int i;\n\n  for (i=0; i<max_file; ++i) {\n\n    InitFileData(&file_array[i]);\n\n    InitFileStats(&file_array[i]);\n  }\n\n  first_call = 0;\n}\n\nvoid wclose_(integer* unit, integer* ierr)\n{\n  struct w_file *file;\n\n  if (first_call)\n    FirstCall();\n\n  if (*ierr = CheckUnit(*unit))\n    return;\n\n  file = file_array + *unit;\n\n  *ierr = close(file->fds);\n\n  if (file->stats)\n    PrintFileStats(*unit, file);\n\n  InitFileData(file);\n\n  InitFileStats(file);\n}\n\n/* ARGSUSED */\nvoid wopen_(integer* unit, char* name, integer* blocks, integer* stats, integer* ierr, int lennam)\n{\n  struct w_file *file;\n\n  *ierr = (integer) 0;\n\n  if (first_call)\n    FirstCall();\n\n  if ( (*unit < 0) || (*unit >= max_file) ) {\n    *ierr = -1;\n    return;\n  }\n\n  file = file_array + *unit;\n\n  file->stats = *stats;\n\n  if (lennam > 0) {\n    file->path = malloc((unsigned) (lennam + 1));\n    (void) strncpy(file->path,name,lennam);\n    file->path[lennam] = 0;\n    }\n  else {\n    file->path = malloc((unsigned) 8);\n    (void) sprintf(file->path,\"fort.%.2d\",*unit);\n  }\n\n  if (( file->fds = open(file->path, (int)(O_RDWR|O_CREAT), (int) 0660))\n      == -1) {\n    *ierr = -6;\n    return;\n  }\n\n  file->length = lseek(file->fds, (off_t) 0, (int) L_XTND);\n  file->position = lseek(file->fds, (off_t) 0, (int) L_SET);\n\n}\n\nvoid getwa_(integer* unit, double* result, integer* addr, integer* count, integer* ierr)\n{\n  long nbytes;\n  off_t where;\n  double start, end;\n  struct w_file *file;\n\n  if (first_call)\n    FirstCall();\n\n  if (*ierr = CheckUnit(*unit))\n    return;\n\n  if (*ierr = CheckAddr(*addr))\n    return;\n\n  if (*ierr = CheckCount(*count))\n    return;\n\n  file = file_array + *unit;\n\n  nbytes = *count * 8;\n  where = (*addr - 1) * 8;\n  if ( (where+nbytes) > file->length ) {\n    *ierr = -5;\n    return;\n  }\n\n  if (file->stats)\n    walltm_(&start);\n\n  if (where != file->position) {\n    ++(file->seek_read);\n    if ( (file->position = lseek(file->fds, where, L_SET)) == (off_t) -1) {\n      *ierr = -4;\n      return;\n    }\n  }\n\n  if ((long) read(file->fds, (char *) result, (int) nbytes) != nbytes) {\n    *ierr = -6;\n    return;\n  }\n\n  file->position += nbytes;\n\n  if (file->stats) {\n    walltm_(&end);\n    ++(file->n_read);\n    file->words_read += (double) *count;\n    file->time_read +=  end - start;\n  }\n\n  *ierr = 0;\n}\n\nvoid putwa_(integer* unit, double* source, integer* addr, integer* count, integer* ierr)\n{\n  long nbytes;\n  off_t where;\n  double start, end;\n  struct w_file *file;\n\n  if (first_call)\n    FirstCall();\n\n  if ( *ierr = CheckUnit(*unit))\n    return;\n\n  if (*ierr = CheckAddr(*addr))\n    return;\n\n  if (*ierr = CheckCount(*count))\n    return;\n\n  file = file_array + *unit;\n\n  nbytes = *count * 8;\n  where = (*addr - 1) * 8;\n\n  if (file->stats)\n    walltm_(&start);\n\n  if (where != file->position) {\n    ++(file->seek_write);\n    if ( (file->position = lseek(file->fds, where, L_SET)) == (off_t) -1) {\n      *ierr = -4;\n      return;\n    }\n  }\n\n  if ((long) write(file->fds, (char *) source, (int) nbytes) != nbytes) {\n    *ierr = -6;\n    return;\n  }\n\n  where += nbytes;\n  file->position += nbytes;\n  if (file->length < where)\n    file->length = where;\n\n\n  if (file->stats) {\n    walltm_(&end);\n    ++(file->n_write);\n    file->words_write += (double) *count;\n    file->time_write +=  end - start;\n  }\n\n  *ierr = 0;\n}\n\n"
  },
  {
    "path": "src/apps/moldft/fci/daxpy.F",
    "content": "*\n* $Id: daxpy.F,v 1.2 1999/07/28 00:23:38 d3e129 Exp $\n*\n      subroutine daxpy(n,da,dx,incx,dy,incy)\nc     \nc     constant times a vector plus a vector.\nc     uses unrolled loops for increments equal to one.\nc     jack dongarra, linpack, 3/11/78.\nc     \n      double precision dx(1),dy(1),da\n      integer i,incx,incy,m,mp1,n\nc     \n      if(n.le.0)return\n      if (da .eq. 0.0d0) return\n      if(incx.eq.1.and.incy.eq.1)go to 20\nc     \nc     code for unequal increments or equal increments\nc     not equal to 1\nc     \n      ix = 1\n      iy = 1\n      if(incx.lt.0)ix = (-n+1)*incx + 1\n      if(incy.lt.0)iy = (-n+1)*incy + 1\n      do 10 i = 1,n\n         dy(iy) = dy(iy) + da*dx(ix)\n         ix = ix + incx\n         iy = iy + incy\n 10   continue\n      return\nc     \nc     code for both increments equal to 1\nc     \nc     \nc     clean-up loop\nc     \n 20   m = mod(n,4)\n      if( m .eq. 0 ) go to 40\n      do 30 i = 1,m\n         dy(i) = dy(i) + da*dx(i)\n 30   continue\n      if( n .lt. 4 ) return\n 40   mp1 = m + 1\n      do 50 i = mp1,n,4\n         dy(i) = dy(i) + da*dx(i)\n         dy(i + 1) = dy(i + 1) + da*dx(i + 1)\n         dy(i + 2) = dy(i + 2) + da*dx(i + 2)\n         dy(i + 3) = dy(i + 3) + da*dx(i + 3)\n 50   continue\n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/dcopy.F",
    "content": "*\n* $Id: dcopy.F,v 1.2 1999/07/28 00:23:38 d3e129 Exp $\n*\n      subroutine  dcopy(n,dx,incx,dy,incy)\nc\nc     copies a vector, x, to a vector, y.\nc     uses unrolled loops for increments equal to one.\nc     jack dongarra, linpack, 3/11/78.\nc\n      double precision dx(1),dy(1)\n      integer i,incx,incy,ix,iy,m,mp1,n\nc\n      if(n.le.0)return\n      if(incx.eq.1.and.incy.eq.1)go to 20\nc\nc        code for unequal increments or equal increments\nc          not equal to 1\nc\n      ix = 1\n      iy = 1\n      if(incx.lt.0)ix = (-n+1)*incx + 1\n      if(incy.lt.0)iy = (-n+1)*incy + 1\n      do 10 i = 1,n\n        dy(iy) = dx(ix)\n        ix = ix + incx\n        iy = iy + incy\n   10 continue\n      return\nc\nc        code for both increments equal to 1\nc\nc\nc        clean-up loop\nc\n   20 m = mod(n,7)\n      if( m .eq. 0 ) go to 40\n      do 30 i = 1,m\n        dy(i) = dx(i)\n   30 continue\n      if( n .lt. 7 ) return\n   40 mp1 = m + 1\n      do 50 i = mp1,n,7\n        dy(i) = dx(i)\n        dy(i + 1) = dx(i + 1)\n        dy(i + 2) = dx(i + 2)\n        dy(i + 3) = dx(i + 3)\n        dy(i + 4) = dx(i + 4)\n        dy(i + 5) = dx(i + 5)\n        dy(i + 6) = dx(i + 6)\n   50 continue\n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/ddot.F",
    "content": "*\n* $Id: ddot.F,v 1.2 1999/07/28 00:23:38 d3e129 Exp $\n*\n      double precision function ddot(n,dx,incx,dy,incy)\nc\nc     forms the dot product of two vectors.\nc     uses unrolled loops for increments equal to one.\nc     jack dongarra, linpack, 3/11/78.\nc\n      double precision dx(1),dy(1),dtemp\n      integer i,incx,incy,ix,iy,m,mp1,n\nc\n      ddot = 0.0d0\n      dtemp = 0.0d0\n      if(n.le.0)return\n      if(incx.eq.1.and.incy.eq.1)go to 20\nc\nc        code for unequal increments or equal increments\nc          not equal to 1\nc\n      ix = 1\n      iy = 1\n      if(incx.lt.0)ix = (-n+1)*incx + 1\n      if(incy.lt.0)iy = (-n+1)*incy + 1\n      do 10 i = 1,n\n        dtemp = dtemp + dx(ix)*dy(iy)\n        ix = ix + incx\n        iy = iy + incy\n   10 continue\n      ddot = dtemp\n      return\nc\nc        code for both increments equal to 1\nc\nc\nc        clean-up loop\nc\n   20 m = mod(n,5)\n      if( m .eq. 0 ) go to 40\n      do 30 i = 1,m\n        dtemp = dtemp + dx(i)*dy(i)\n   30 continue\n      if( n .lt. 5 ) go to 60\n   40 mp1 = m + 1\n      do 50 i = mp1,n,5\n        dtemp = dtemp + dx(i)*dy(i) + dx(i + 1)*dy(i + 1) +\n     *   dx(i + 2)*dy(i + 2) + dx(i + 3)*dy(i + 3) + dx(i + 4)*dy(i + 4)\n   50 continue\n   60 ddot = dtemp\n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/dgemm.F",
    "content": "*\n* $Id: dgemm.F,v 1.2 1999/07/28 00:23:38 d3e129 Exp $\n*\n      SUBROUTINE DGEMM (TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,\n     $     BETA,C,LDC)\n*     .. Scalar Arguments ..\nC     $Id: dgemm.F,v 1.2 1999/07/28 00:23:38 d3e129 Exp $\n      CHARACTER*1        TRANSA,TRANSB\n      INTEGER            M,N,K,LDA,LDB,LDC\n      DOUBLE PRECISION   ALPHA,BETA\n*     .. Array Arguments ..\n      DOUBLE PRECISION   A(LDA,*),B(LDB,*),C(LDC,*)\n*     \n*     !!!!!!!!!!!!!!!!!!!!!!!\n*     This version of DGEMM has been hacked by RJH to use blocking\n*     (loop unrolling removed)\n*     The original version is in dgemm.orig.f\n*     !!!!!!!!!!!!!!!!!!!!!!!\n*     ..\n*     \n*     Purpose\n*     =======\n*     \n*     DGEMM  performs one of the matrix-matrix operations\n*     \n*     C := alpha*op(A)*op(B) + beta*C,\n*     \n*     where  op(X) is one of\n*     \n*     op(X) = X   or   op(X) = X',\n*     \n*     alpha and beta are scalars,and A,B and C are matrices,with op(A)\n*     an m by k matrix, op(B)  a  k by n matrix and  C an m by n matrix.\n*     \n*     Parameters\n*     ==========\n*     \n*     TRANSA - CHARACTER*1.\n*     On entry,TRANSA specifies the form of op(A) to be used in\n*     the matrix multiplication as follows:\n*     \n*     TRANSA = 'N' or 'n', op(A) = A.\n*     \n*     TRANSA = 'T' or 't', op(A) = A'.\n*     \n*     TRANSA = 'C' or 'c', op(A) = A'.\n*     \n*     Unchanged on exit.\n*     \n*     TRANSB - CHARACTER*1.\n*     On entry,TRANSB specifies the form of op(B) to be used in\n*     the matrix multiplication as follows:\n*     \n*     TRANSB = 'N' or 'n', op(B) = B.\n*     \n*     TRANSB = 'T' or 't', op(B) = B'.\n*     \n*     TRANSB = 'C' or 'c', op(B) = B'.\n*     \n*     Unchanged on exit.\n*     \n*     M      - INTEGER.\n*     On entry, M  specifies  the number  of rows  of the  matrix\n*     op(A)  and of the  matrix  C.  M  must  be at least  zero.\n*     Unchanged on exit.\n*     \n*     N      - INTEGER.\n*     On entry, N  specifies the number  of columns of the matrix\n*     op(B) and the number of columns of the matrix C. N must be\n*     at least zero.\n*     Unchanged on exit.\n*     \n*     K      - INTEGER.\n*     On entry, K  specifies  the number of columns of the matrix\n*     op(A) and the number of rows of the matrix op(B). K must\n*     be at least  zero.\n*     Unchanged on exit.\n*     \n*     ALPHA  - DOUBLE PRECISION.\n*     On entry,ALPHA specifies the scalar alpha.\n*     Unchanged on exit.\n*     \n*     A      - DOUBLE PRECISION array of DIMENSION (LDA,ka),where ka is\n*     k  when  TRANSA = 'N' or 'n', and is  m  otherwise.\n*     Before entry with  TRANSA = 'N' or 'n', the leading  m by k\n*     part of the array  A  must contain the matrix  A, otherwise\n*     the leading  k by m  part of the array  A  must contain  the\n*     matrix A.\n*     Unchanged on exit.\n*     \n*     LDA    - INTEGER.\n*     On entry,LDA specifies the first dimension of A as declared\n*     in the calling (sub) program. When  TRANSA = 'N' or 'n' then\n*     LDA must be at least  max(1,m),otherwise  LDA must be at\n*     least  max(1,k).\n*     Unchanged on exit.\n*     \n*     B      - DOUBLE PRECISION array of DIMENSION (LDB,kb),where kb is\n*     n  when  TRANSB = 'N' or 'n', and is  k  otherwise.\n*     Before entry with  TRANSB = 'N' or 'n', the leading  k by n\n*     part of the array  B  must contain the matrix  B, otherwise\n*     the leading  n by k  part of the array  B  must contain  the\n*     matrix B.\n*     Unchanged on exit.\n*     \n*     LDB    - INTEGER.\n*     On entry,LDB specifies the first dimension of B as declared\n*     in the calling (sub) program. When  TRANSB = 'N' or 'n' then\n*     LDB must be at least  max(1,k),otherwise  LDB must be at\n*     least  max(1,n).\n*     Unchanged on exit.\n*     \n*     BETA   - DOUBLE PRECISION.\n*     On entry, BETA  specifies the scalar  beta.  When  BETA  is\n*     supplied as zero then C need not be set on input.\n*     Unchanged on exit.\n*     \n*     C      - DOUBLE PRECISION array of DIMENSION (LDC,n).\n*     Before entry,the leading  m by n  part of the array  C must\n*     contain the matrix  C, except when  beta  is zero,in which\n*     case C need not be set on entry.\n*     On exit,the array  C  is overwritten by the  m by n  matrix\n*     (alpha*op(A)*op(B) + beta*C).\n*     \n*     LDC    - INTEGER.\n*     On entry,LDC specifies the first dimension of C as declared\n*     in  the  calling  (sub)  program.   LDC  must  be  at  least\n*     max(1,m).\n*     Unchanged on exit.\n*     \n*     \n*     Level 3 Blas routine.\n*     \n*     -- Written on 8-February-1989.\n*     Jack Dongarra,Argonne National Laboratory.\n*     Iain Duff,AERE Harwell.\n*     Jeremy Du Croz,Numerical Algorithms Group Ltd.\n*     Sven Hammarling,Numerical Algorithms Group Ltd.\n*     \n*     \n*     .. External Functions ..\n      LOGICAL            LSAME\n      EXTERNAL           LSAME\n*     .. External Subroutines ..\n*      EXTERNAL           XERBLA\n*     .. Intrinsic Functions ..\n      INTRINSIC          MAX\n*     .. Local Scalars ..\n      LOGICAL            NOTA,NOTB\n      INTEGER            I,INFO,J,L,NCOLA,NROWA,NROWB\n      DOUBLE PRECISION   TEMP\n*     .. Parameters ..\n      DOUBLE PRECISION   ONE         ,ZERO\n      PARAMETER        (ONE = 1.0D+0,ZERO = 0.0D+0)\nc\n      double precision work(0:1023) ! RJH To handle TT case\n      double precision ddot\n      external ddot\n*     ..\n*     .. Executable Statements ..\n*     \n*     Set  NOTA  and  NOTB  as  true if  A  and  B  respectively are not\n*     transposed and set  NROWA,NCOLA and  NROWB  as the number of rows\n*     and  columns of  A  and the  number of  rows  of  B  respectively.\n*     \n      NOTA  = LSAME(TRANSA,'N')\n      NOTB  = LSAME(TRANSB,'N')\n      IF(NOTA)THEN\n         NROWA = M\n         NCOLA = K\n      ELSE\n         NROWA = K\n         NCOLA = M\n      END IF\n      IF(NOTB)THEN\n         NROWB = K\n      ELSE\n         NROWB = N\n      END IF\n*     \n*     Test the input parameters.\n*     \n      INFO = 0\n      IF(     (.NOT.NOTA                ).AND.\n     $     (.NOT.LSAME(TRANSA,'C')).AND.\n     $     (.NOT.LSAME(TRANSA,'T'))     )THEN\n         INFO = 1\n      ELSE IF((.NOT.NOTB                ).AND.\n     $        (.NOT.LSAME(TRANSB,'C')).AND.\n     $        (.NOT.LSAME(TRANSB,'T'))     )THEN\n         INFO = 2\n      ELSE IF(M  .LT.0              )THEN\n         INFO = 3\n      ELSE IF(N  .LT.0              )THEN\n         INFO = 4\n      ELSE IF(K  .LT.0              )THEN\n         INFO = 5\n      ELSE IF(LDA.LT.MAX(1,NROWA))THEN\n         INFO = 8\n      ELSE IF(LDB.LT.MAX(1,NROWB))THEN\n         INFO = 10\n      ELSE IF(LDC.LT.MAX(1,M    ))THEN\n         INFO = 13\n      END IF\n      IF(INFO.NE.0)THEN\n*         CALL XERBLA('DGEMM ',INFO)\n         call fci_err('dgemm: ', info)\n         RETURN\n      END IF\n*     \n*     Quick return if possible.\n*     \n      IF((M.EQ.0).OR.(N.EQ.0).OR.\n     $     (((ALPHA.EQ.ZERO).OR.(K.EQ.0)).AND.(BETA.EQ.ONE)))\n     $     RETURN\n*     \n*     And if  alpha.eq.zero.\n*     \n      IF(ALPHA.EQ.ZERO)THEN\n         IF(BETA.EQ.ZERO)THEN\n            DO 20,J = 1,N\n               DO 10,I = 1,M\n                  C(I,J) = ZERO\n 10            CONTINUE\n 20         CONTINUE\n         ELSE\n            DO 40,J = 1,N\n               DO 30,I = 1,M\n                  C(I,J) = BETA*C(I,J)\n 30            CONTINUE\n 40         CONTINUE\n         END IF\n         RETURN\n      END IF\n*     \n*     Start the operations.\n*     \nc     \nc     rjh ... determine blocking parameters from the cachesize\nc     .       and allowing inner loop to be 3x longer for \nc     .       better vectorization\nc\n*      icachesize = 131072*0.5   ! 1/2 MB cache in doubles\n      icachesize = 131072*0.25  ! 1/4 MB cache in doubles\n*      icachesize = 2048         ! 16KB cache in doubles\nc\n      jchunk = sqrt(icachesize/7.0d0)\n      if (nota) then\n         lchunk = jchunk\n         ichunk = jchunk*3      ! For max vector length\n      else\n         if (notb) then\n            lchunk = jchunk*3   ! For max vectors length\n            ichunk = jchunk\n         else\n            jchunk = min(1024,jchunk)\n            lchunk = jchunk\n            ichunk = 3*jchunk   ! To minimize cache thrash loading B\n         endif\n      endif\nc\n*      write(6,111) ichunk, jchunk, lchunk\n* 111  format(' ijlchunk ', 3i6)\nc\n\nc\n      do jlo = 1,n,jchunk         ! blocking by rjh\n         jhi = min(jlo+jchunk-1,n)\n         do ilo = 1,m,ichunk\n            ihi = min(ilo+ichunk-1,m)\n            do j = jlo,jhi\n               IF(BETA.EQ.ZERO)THEN\n                  DO I = ilo,ihi\n                     C(I,J) = ZERO\n                  enddo\n               ELSE IF(BETA.NE.ONE)THEN\n                  DO I = ilo,ihi\n                     C(I,J) = BETA*C(I,J)\n                  enddo\n               END IF\n            enddo\n            do llo = 1,k,lchunk\n               lhi = min(llo+lchunk-1,k)\nc     \n               IF(NOTB)THEN\n                  IF(NOTA)THEN\n*     \n*     Form  C := alpha*A*B + beta*C.\n*     \n                     DO 90,J = jlo,jhi\n                        DO 80,L = llo,lhi\n                           IF(B(L,J).NE.ZERO)THEN\n                              TEMP = ALPHA*B(L,J)\n#ifdef LINUX\n                              call daxpy(ihi-ilo+1,temp,\n     $                             a(ilo,l),1,c(ilo,j),1)\n#else\n                              do i = ilo, ihi\n                                 C(I  ,J) = C(I  ,J) + TEMP*A(I  ,L)\n                              enddo\n#endif\n                           END IF\n 80                     CONTINUE\n 90                  CONTINUE\n                  ELSE\n*     \n*     Form  C := alpha*A'*B + beta*C\n*     \n                     DO 120,J = jlo,jhi\n                        DO 110,I = ilo,ihi\n#ifdef LINUX\n                           temp = ddot(lhi-llo+1,a(llo,i),1,b(llo,j),1)\n#else\n                           TEMP = ZERO\n                           DO L = llo,lhi\n                              TEMP = TEMP + A(L,I)*B(L,J)\n                           enddo\n#endif\n                           C(I,J) = ALPHA*TEMP + C(I,J)\n 110                    CONTINUE\n 120                 CONTINUE\n                  END IF\n               ELSE\n                  IF(NOTA)THEN\n*     \n*     Form  C := alpha*A*B' + beta*C\n*     \n                     DO 170,J = jlo,jhi\n                        DO 160,L = llo,lhi\n                           IF(B(J,L).NE.ZERO)THEN\n                              TEMP = ALPHA*B(J,L)\n                              DO I = ilo,ihi\n                                 C(I,J) = C(I,J) + TEMP*A(I,L)\n                              enddo\n                           END IF\n 160                    CONTINUE\n 170                 CONTINUE\n                  ELSE\n*     \n*     Form  C := alpha*A'*B' + beta*C\n*     \n                     DO 200,J = jlo,jhi\n                        do l = llo,lhi\n                           work(l-llo) = b(j,l)\n                        enddo\n                        DO 190,I = ilo,ihi\n                           TEMP = ZERO\n                           DO L = llo,lhi\n*                              TEMP = TEMP + A(L,I)*B(J,L)\n                              TEMP = TEMP + A(L,I)*work(l-llo)\n                           enddo\n                           C(I,J) = ALPHA*TEMP + C(I,J)\n 190                    CONTINUE\n 200                 CONTINUE\n                  END IF\n               END IF\n            enddo\n         enddo\n      enddo\n*     \n      RETURN\n*     \n*     End of DGEMM .\n*     \n      END\n      LOGICAL          FUNCTION LSAME( CA, CB )\n*\n* $Id: dgemm.F,v 1.2 1999/07/28 00:23:38 d3e129 Exp $\n*\n*\n*  -- LAPACK auxiliary routine (version 2.0) --\n*     Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,\n*     Courant Institute, Argonne National Lab, and Rice University\n*     January 31, 1994\n*\n*     .. Scalar Arguments ..\n      CHARACTER          CA, CB\n*     ..\n*\n*  Purpose\n*  =======\n*\n*  LSAME returns .TRUE. if CA is the same letter as CB regardless of\n*  case.\n*\n*  Arguments\n*  =========\n*\n*  CA      (input) CHARACTER*1\n*  CB      (input) CHARACTER*1\n*          CA and CB specify the single characters to be compared.\n*\n* =====================================================================\n*\n*     .. Intrinsic Functions ..\n      INTRINSIC          ICHAR\n*     ..\n*     .. Local Scalars ..\n      INTEGER            INTA, INTB, ZCODE\n*     ..\n*     .. Executable Statements ..\n*\n*     Test if the characters are equal\n*\n      LSAME = CA.EQ.CB\n      IF( LSAME )\n     $   RETURN\n*\n*     Now test for equivalence if both characters are alphabetic.\n*\n      ZCODE = ICHAR( 'Z' )\n*\n*     Use 'Z' rather than 'A' so that ASCII can be detected on Prime\n*     machines, on which ICHAR returns a value with bit 8 set.\n*     ICHAR('A') on Prime machines returns 193 which is the same as\n*     ICHAR('A') on an EBCDIC machine.\n*\n      INTA = ICHAR( CA )\n      INTB = ICHAR( CB )\n*\n      IF( ZCODE.EQ.90 .OR. ZCODE.EQ.122 ) THEN\n*\n*        ASCII is assumed - ZCODE is the ASCII code of either lower or\n*        upper case 'Z'.\n*\n         IF( INTA.GE.97 .AND. INTA.LE.122 ) INTA = INTA - 32\n         IF( INTB.GE.97 .AND. INTB.LE.122 ) INTB = INTB - 32\n*\n      ELSE IF( ZCODE.EQ.233 .OR. ZCODE.EQ.169 ) THEN\n*\n*        EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or\n*        upper case 'Z'.\n*\n         IF( INTA.GE.129 .AND. INTA.LE.137 .OR.\n     $       INTA.GE.145 .AND. INTA.LE.153 .OR.\n     $       INTA.GE.162 .AND. INTA.LE.169 ) INTA = INTA + 64\n         IF( INTB.GE.129 .AND. INTB.LE.137 .OR.\n     $       INTB.GE.145 .AND. INTB.LE.153 .OR.\n     $       INTB.GE.162 .AND. INTB.LE.169 ) INTB = INTB + 64\n*\n      ELSE IF( ZCODE.EQ.218 .OR. ZCODE.EQ.250 ) THEN\n*\n*        ASCII is assumed, on Prime machines - ZCODE is the ASCII code\n*        plus 128 of either lower or upper case 'Z'.\n*\n         IF( INTA.GE.225 .AND. INTA.LE.250 ) INTA = INTA - 32\n         IF( INTB.GE.225 .AND. INTB.LE.250 ) INTB = INTB - 32\n      END IF\n      LSAME = INTA.EQ.INTB\n*\n*     RETURN\n*\n*     End of LSAME\n*\n      END\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/GNUmakefile",
    "content": "\nSOURCE   = matrixelements.tex \\\n           mspingraph.eps  orbitalgraph.eps spingraph.eps \\\n           orbitalarcs.eps spinarcs.eps\n\nmatrixelements.ps:\t$(SOURCE)\n\tlatex matrixelements.tex\n\tlatex matrixelements.tex\n\tlatex matrixelements.tex\n\tdvips -D 300 -N0 -o matrixelements.ps matrixelements.dvi\t\n\nclean:\n\t/bin/rm -f *toc *aux *log *dvi matrixelements.ps *~ core\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/bibstuff.tex",
    "content": "\n% \\journal{label}{authors}{journal}{volume}{year}{page}\n\n% \\book{label}{authors}{title}{publisher}{year}\n\n% chem phys lett format\n\n\\newcommand{\\book}[5]{\\bibitem{#1} {\\sc #2,} {\\em `#3,'}\\/ (#4, #5).}\n\n\\newcommand{\\journal}[6]{\\bibitem{#1} {\\sc #2,} {\\em #3}\\/ {\\bf #4} (#5) #6.}\n\n% theor chim acta format\n\n%\\newcommand{\\book}[5]{\\bibitem{#1} #2 (#5) #3, #4}\n%\\newcommand{\\journal}[6]{\\bibitem{#1} #2 (#5) #3 #4:#6}\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/commands.tex",
    "content": "\\newcommand{\\abinitio}{\\mbox{\\em ab initio\\/}}\n\\newcommand{\\Abinitio}{\\mbox{\\em Ab initio\\/}}\n\\newcommand{\\AbInitio}{\\mbox{\\em Ab Initio\\/}}\n\n\\newcommand{\\Eh}{\\mbox{$E_{h}$}}\n\\newcommand{\\au}{\\mbox{au.}}\n\\newcommand{\\MBs}{\\mbox{~Mbytes/s}}\n\\newcommand{\\Mflops}{\\mbox{~MFLOP/s}}\n\\newcommand{\\Gflops}{\\mbox{~GFLOP/s}}\n\n\n% Stuff for slides\n\n\\newcommand{\\rline}{\\noindent\\rule{\\textwidth}{1mm}} \n\n\\newcommand{\\hpccg}{\n  \\vfill \n  \\Red{\\rline}\\\\\n  \\NavyBlue{\\large High Performance Computational Chemistry, EMSL}\\\\[0.1in]\n  \\Black{{\\footnotesize \\hfill Robert J. Harrison, \\today, page \\thepage}}}\n\n\\newcommand{\\slidehead}{\n  \\background{White}\n  \\textNavyBlue\n  \\Red{\\rline}\\\\[0.25in]}\n  \n\n\\newcommand{\\slidefoot}{\\hpccg}\n\n\\newcommand{\\slidebegin}[1]{\\slidehead \\LARGE \\begin{centering} \\Black{#1} \\\\[0.25in] \\end{centering} \\begin{list}{\\labelitemi}{\\setlength{\\leftmargin}{0in}}}\n\n\\newcommand{\\slideend}{\\end{list}\\slidefoot\\newpage}\n\n\\newcommand{\\slidelistbegin}{\\textEmerald \\Large \\begin{list}{\\labelitemii}{}}\n\n\\newcommand{\\slidelistend}{\\end{list} \\LARGE \\textNavyBlue}\n\n\\newcommand{\\doublespace}{\\renewcommand{\\baselinestretch}{1.8}\\LARGE\\normalsize}\n\\newcommand{\\singlespace}{\\renewcommand{\\baselinestretch}{1.0}\\LARGE\\normalsize}\n\n\\newcommand{\\pderiv}[2]{\\frac{\\partial #1}{\\partial #2}}\n\\newcommand{\\ptwoderiv}[3]{\\frac{\\partial^2 #1}{\\partial #2 \\partial #3}}\n\n\\newcommand{\\support}{\nThis work was supported by the U.S. Department of Energy, Office of\nBasic Energy Sciences, Division of Chemical Sciences, under contract\nW-31-109-ENG-38.}\n\n\\newcommand{\\license}{\nThe submitted manuscript has been authored by a contractor of the U.S.\nGovernment under contract No. W-31-109-ENG-38. Accordingly, the U.S.\nGovernment retains a non-exclusive, royalty-free license to publish or\nreproduce the published form of this contribution, or allow others to\ndo so, for U.S. Government purposes.}\n\n\\newcommand{\\blicense}{\\fbox{\\parbox{1.5in}{\\tiny \\sloppy\nThe submitted manuscript has been authored by a contractor of the U.S.\nGovernment under contract No. W-31-109-ENG-38. Accordingly, the U.S.\nGovernment retains a non-exclusive, royalty-free license to publish or\nreproduce the published form of this contribution, or allow others to\ndo so, for U.S. Government purposes.}}}\n\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/matrixelements.ps",
    "content": "%!PS-Adobe-2.0\n%%Creator: dvips(k) 5.96.1 Copyright 2007 Radical Eye Software\n%%Title: matrixelements.dvi\n%%CreationDate: Mon Jun 23 11:28:03 2008\n%%Pages: 37\n%%PageOrder: Ascend\n%%BoundingBox: 0 0 596 842\n%%DocumentFonts: CMR17 CMR12 CMBX12 CMTT12 CMMI12 CMMI8 CMR8 CMSY10\n%%+ CMEX10 CMMI6 CMTI12 CMSY8 CMR6 CMCSC10\n%%DocumentPaperSizes: a4\n%%EndComments\n%DVIPSWebPage: (www.radicaleye.com)\n%DVIPSCommandLine: dvips -D 300 -N0 -o matrixelements.ps\n%+ matrixelements.dvi\n%DVIPSParameters: dpi=300\n%DVIPSSource:  TeX output 2008.06.23:1128\n%%BeginProcSet: tex.pro 0 0\n%!\n/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S\nN}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72\nmul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0\n0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{\nlandplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize\nmul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[\nmatrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round\nexch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{\nstatusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]\nN/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin\n/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array\n/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2\narray copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N\ndf-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A\ndefinefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get\n}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}\nB/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr\n1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S\n/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy\nsetcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask\nrestore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn\n/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put\n}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{\nbop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A\nmul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{\nSI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{\nuserdict/start-hook known{start-hook}if pop/VResolution X/Resolution X\n1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4\nindex cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N\n/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{\n/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)\n(LaserWriter 16/600)]{A length product length le{A length product exch 0\nexch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse\nend{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask\ngrestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}\nimagemask grestore}}ifelse B/QV{gsave newpath transform round exch round\nexch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto\nfill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p\ndelta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}\nB/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{\np -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S\nrmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end\n\n%%EndProcSet\n%%BeginProcSet: texps.pro 0 0\n%!\nTeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2\nindex/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll\nexec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0\nne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{\npop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get\ndiv def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type\n/nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end\ndefinefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup\nsin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll\nmul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[\nexch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if}\nforall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def\nend\n\n%%EndProcSet\n%%BeginProcSet: special.pro 0 0\n%!\nTeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N\n/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N\n/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N\n/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{\n/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho\nX}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B\n/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{\n/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known\n{userdict/md get type/dicttype eq{userdict begin md length 10 add md\nmaxlength ge{/md md dup length 20 add dict copy def}if end md begin\n/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S\natan/pa X newpath clippath mark{transform{itransform moveto}}{transform{\nitransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll\ntransform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll\ncurveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf\npop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}\nif}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1\n-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3\nget ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip\nyflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub\nneg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{\nnoflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop\n90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get\nneg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr\n1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr\n2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4\n-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S\nTR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{\nResolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale\n}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState\nsave N userdict maxlength dict begin/magscale true def normalscale\ncurrentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts\n/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x\npsf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx\npsf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub\nTR/showpage{}N/erasepage{}N/setpagedevice{pop}N/copypage{}N/p 3 def\n@MacSetUp}N/doclip{psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll\nnewpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto\nclosepath clip newpath moveto}N/endTexFig{end psf$SavedState restore}N\n/@beginspecial{SDict begin/SpecialSave save N gsave normalscale\ncurrentpoint TR @SpecialDefaults count/ocount X/dcount countdictstack N}\nN/@setspecial{CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs\nneg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate\nrwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse\nscale llx neg lly neg TR}{rhiSeen{rhi ury lly sub div dup scale llx neg\nlly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx\nury lineto llx ury lineto closepath clip}if/showpage{}N/erasepage{}N\n/setpagedevice{pop}N/copypage{}N newpath}N/@endspecial{count ocount sub{\npop}repeat countdictstack dcount sub{end}repeat grestore SpecialSave\nrestore end}N/@defspecial{SDict begin}N/@fedspecial{end}B/li{lineto}B\n/rl{rlineto}B/rc{rcurveto}B/np{/SaveX currentpoint/SaveY X N 1\nsetlinecap newpath}N/st{stroke SaveX SaveY moveto}N/fil{fill SaveX SaveY\nmoveto}N/ellipse{/endangle X/startangle X/yrad X/xrad X/savematrix\nmatrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc\nsavematrix setmatrix}N end\n\n%%EndProcSet\n%%BeginFont: CMCSC10\n%!PS-AdobeFont-1.1: CMCSC10 1.0\n%%CreationDate: 1991 Aug 18 17:46:49\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.0) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMCSC10) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle 0 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMCSC10 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 44 /comma put\ndup 45 /hyphen put\ndup 46 /period put\ndup 65 /A put\ndup 67 /C put\ndup 68 /D put\ndup 69 /E put\ndup 70 /F put\ndup 72 /H put\ndup 73 /I put\ndup 74 /J put\ndup 75 /K put\ndup 76 /L put\ndup 77 /M put\ndup 78 /N put\ndup 80 /P put\ndup 82 /R put\ndup 83 /S put\ndup 84 /T put\ndup 86 /V put\ndup 87 /W put\ndup 90 /Z put\ndup 97 /a put\ndup 98 /b put\ndup 99 /c put\ndup 100 /d put\ndup 101 /e put\ndup 102 /f put\ndup 103 /g put\ndup 104 /h put\ndup 105 /i put\ndup 107 /k put\ndup 108 /l put\ndup 109 /m put\ndup 110 /n put\ndup 111 /o put\ndup 114 /r put\ndup 115 /s put\ndup 116 /t put\ndup 117 /u put\ndup 118 /v put\ndup 119 /w put\ndup 120 /x put\ndup 121 /y put\ndup 122 /z put\nreadonly def\n/FontBBox{14 -250 1077 750}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE\n3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B\n532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470\nB72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B\n986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE\nD919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A30EB76029337\n900ECFB1390CA5C0C3A04528044F266BA17BE487C79B94FAC6D6484684C5BFEA\n87BCCC77D40AD11552035E95E3007126418ED49B68468B38A14E88E68A267B98\n076F1C9769A5AFBC285E5B158EAC9F926F1D6C0B8F1D57D9C31D25AE27123518\n9D2CD92E5689E0213089BD268DA5E47525CB8EABAA4B78A15AEA34705889AB3A\nFFB8953B5B3482E52BFA0940630ADF8C0AC2177D907324299EE980E850F203CD\nB627962F43D5A678C44243CDE97853BDC6AB45FD5C09AD274DAF89929F583CC9\nCCC24BDFC68B92111055ABA5F26D2DC67C70906F71C2957701D65AE746A60C30\n40E6CB24B97FCDAD0487AE38A201FBF0E41BABD2181981A71940F1E707F91E5D\nC8CA50CB16D8702D188E56D014D92F76CE0B52ABDB9110E32438D2BBF3E6A40B\n7B005F10BB437812CAC6ED2996F7606DC962C4FDE207FF322782C343DF44CEC5\nFF06A55C630C20E9AE1B0D1C5673753C43BA0767D65D1B451CC6380D8BB3C4DC\n81E8FD8AA79BE993218686F29D3CD925566DD587F541A0DA1B1CC3BCEA2E6C7D\n5E1016F6917A871F1BBAD96AF9E867735017119A381FCF33EB2D3E1E7093FD90\nCDB0CED4818CFD9E201A03430CEC713620BE0D3254158931FB657C6AD4B2482A\n0E7D070D7497892E9E942DF58E88CAF0C8221BF36BF7C435BF2C683A4A2EF4CB\nE85820A8AD3486155A40143011BA9D76297F46DEF69ECA4596D6E4CAABF84091\n22A96A4BC78A8DD072FEB759A68A44BE1164638B6D952147EE3C628F9A022060\n1D1941E73310943FA782532ABCCC88593FD63E7E2CECF6665C04DB48D641ABD3\nAE1BB468638681E96394B9E7BED1D13E534B897DB90EA6EC706BAAE06BE2FEFF\n1DFA5258113E9B4CD2D36655973864574E0E8D6291E48A8C62203F679B7ED838\n6F7CBD523C2943ECA994CACE6679ADD23290C50FA5ACCD01D64928BEB3E5BEA9\nEA34FA7954E150FC5181D3F39C33C41830738DBF2EA15CCE7C351E5756027452\n52C075FDF1433110A802BC8E704AC1E1F40CFF6AA9647580BA3C77123551AAE5\n4A4FBED43C6BD5ACE4F7DD4C981D7A373961F97A4652C49DAF6BA47C3ADAF835\n927CB970F91B0950EE6421AA6AECAF3A2B99587D1FC42183DD1DD8B807317A69\n323974D6D0B915179D3F0F8409F61D850E084E73D21CE513018BFF907FA74110\n6D2333087E98DC3D7FE27268CF81967EC6B6522B2684C9A7AE424E357F4B908E\n648F2B3747B3DD3C78C14A3823870EA55144BC294425ACB5FEF16C93463231D8\n082887991C25A62D9259F73CFCD3E871F5A80CDD12C012E7ECA1915911B06F75\n245D0013D8A5CD4406A2AEAF9518D29BD2E169DD80BE401FF798C85467A6DEAF\n3D425652EFBDF6F3F4FB5CE1B92A9EF5E4B71A0A3797A28A7FC90739F3EFE450\n2C7B814DE6C6B09A20898F939325A3B19ADB60341734D36A7920A8D668E1036F\nBB4778E1B46DA0DD85314041DD2E764C981AD6BCF572E2C998A15B4063829787\nBF7AC28C45D4BE503D993B0EFE74E3127304A263EF953482428028A7C8B6D1BC\n86A4D681258819D330D980F57031C9673D392F1484885DAC5C15336E774D8566\n2D1CF7969CF7CF0835FEB6634F21678511BDE91C9CDA6A775F4D4E425018BDDB\n52C8A86086BC7386A88F272784FE7F9F015CADF0D9E2528B051222481B67639C\n674D7C83DA393AB926A3A5A1A6060DFAC114A904361496F49D8D016D5AD497D5\n17402EA8773789902D5F52448D44D8BCA163AE0BF8CBF3911F75FC71FAE5058E\nCCCDAEFE200E26218E8F56A280251BE5A8EF75CA9B4AF6F0B3C29E88BF81DCD5\nE9DB6CBE802B2D3E207ECE3481AF74649F6131A0C41BA9D36D3A0694859BD2D5\nE254994BD218479FEF91E1B60C02CA2E0F234336F6E4E287C5D64D6EE37F9926\nB8E2233C320146696D3C456C687BADB063CA39E709EC1FA6A0098F2E64AC4F0E\n473AE3AB217ABE26DDBF01228AE4E9F06FEE6D34FB851928E36E149260B8F46F\nB4B2B3D343EDDB5F313AB03980C430976F9C4A10F119325BD4E8AF7B24D48FDB\n574406DFDA12255D19519B22FB9BCADDD06F1E63A3E7151AFE1C19390BCC5166\nB3D4384FEDA0961C63AA81C40F3D10658AACA5467B5CA7F87410CEEF22C39AD8\n043FFD27B2BE0E55AC4F0262AAA8DE77D3518CB7A69F3E1A1A6F2DE2A0856233\n8283B8E0F4D6F1C82950E3DDA9402320BDD9D5DAC6920DCCD167143606E1A795\nC43138457E1CB037FE95BD42A75B26D1B9BCDBD30D694A3EF0B5AB9788C18F05\nC7B675C4B062676BC1340603F69303FD4C2CD90099759C9581C38D6F51BA0159\n2C694CF275FCB325B50E7B6389C9F13CBD9D569F8A4CCB0DBCC5CAB01088A720\nEE437FD7EF526F40CC78456C138454FA8D496DEABD504428EE21ECFBA0AC8F55\nEF1FE8FCCFD6818D45EED0440F329C4D3048CEB1281CE5134B3FF231274C3D67\nDA2F8277E4158744262D0A6B4C2D766FB5910285CCCE1EDD00FA7B53D72C505A\n36BE2DF77B1FF582ADB47BCB4FC8A64414D0D89E614109C433BBCCA8F9921D7A\nC094810620F84B58E1DB4917C4D17972B577A18F22153A8F4846DF7545BB340A\nB075D3A31B22EF5FD023467D17E80D71E86ED67349FA312BD411FBBB0DBF446C\nA8CF6816CD27384F11A3BB20E637A8D442561B50E37AF8CF57A5DDF4BF07E9F2\nE75A944731CAEFA630F1E3A3E94105026E80BB691901C8678977BE955A79B2EF\nD6B62DFF2F979CBBED89ED31DBD68DDEFB9B5B7B19AFA5C3EB65EBA3F04C88DE\nA62DD08E03D9A7668C6A322C0B922BA66DF27BB00FBE50C1C1C0651F3BCDFE59\n7A2BD2DB462D8E24DFB4CD5A0F901876FCAC6C869E0C2E8C896FB0E0259DC245\n832244987B9527034F77AA93B7EC338F788DC36DB5D21C2DCAF074AAB1FE1143\nEEC83B6DE9C34DBE3E90527D270BF0F1CECDB87D2CD6E4A4CE4627E9C0369148\n68A1D53B85DB9323AA1D0F56381E591AB206DCD1DAAD8616C032C900D38D2708\nA2A8C0196048511634A0D2B5169618B42B2B4A9C3C521A938F54A62115EF111A\nC24EC691F37CA0FEC1E82338174D73B88EC872554C66BBAC8ABF2EA95174FB95\nBE1C0114E3D5798C31A4FFEDD55021A82ED719315B2BC1BB91152D302138C70B\n67CC9FD2444CE50B210695123893AB976B089B09B14F4B43370C4F9B307DECDE\n0341A353275BAED329B8D5353340F47FD9425AF012D27101DD7072EC644FA280\nA5A547E4393BEC33471A1C25C1BB53CCFD041D6018BC0A0BB506928A2BC26471\nA70AC21B6260C7CE771C3A8D5A31266967848D7F4B72F72074653A376E7E9A22\n963C9F96964B4911C9F76546A5DFC3B0173DDA6E314C64627000C92808FA4C02\nAA2B232E0423E61B926F8025D6EC810BB1A4C4CE5A44AAF405B36898F7ACA70A\nC646F0B6C4F8B28872D823ACB99117AE4C09465F46538BC11095CF7DC745A842\n58A24FD50CDB81A63ADC4CDDAFD2115546FDC8226B55A1262DD97E895B31093C\nC4240E32084BAC57ACCB462FACD66EBF54B9174CB22461C4155E29BEFB5215B8\n537E2F5A6839ED3074C74172A9CD6AB1EEE75A76A08B7CAD69D48CA1107AF4B8\n410B19B1DA8454C59F6B0B3EB64FAD7153CA4E93FCA08673BACC8743B7549694\n3883DD36F75BDAD3C3965C345F1C28208C2A7566B565C20E7740E6C6D5F27803\nD4A8098FA206285A51FB2F00BC656FF270E7E723BEFCE4E2CA4373968588CBC1\n13D55EB10DC0AE9CEC6CD6264CAEEFB9F238B04E165E5D2C91652D7385F7420C\n24B749D1BE9E69EEC6124E8220F29B0908AD09280B8D78739FE81D63C9B28998\n02543ABE6B826E41E24D620A033D7FB62C3714FEB976FF1ED49658655D65C734\n5536D4C2DC84224E3DC4E882F2DEF6DEE48F816E74335BC84B1A8AF6DAA8E799\n4CC4585FA545F1928CF94733B411AEDDC4A6F27DC7C288FD26AF85B071B2B019\n2FDFE5266175085BB538A6E0DCA4148C6E274C3B98E8A795A9BA039A230F077B\n606D8A75FCBA9EF436AA3B8E02BE47249E3361E8B0C88AE29F4DE9EEBCB44A7F\n771BD09F8FB41B4611D3682F90C8E0675552E6DD587E52FD78F85AEC04E653F7\n6A1BCEC5DE4ECF0E381B514CDD889AF4500A04793A175C1D6D67AE92D1B3FDB0\nFBF4055503A68BDD33CB33E83F952D9E57ACA1067D6BEBDEE8C302CC45F7C131\nF523CA173D2E3EE474BE02A8CBAE7AD6B4E988101CF37D22E3C706C554572AEC\n50842C90787756ED1CDAE2BE9F41ABE8C7C69F3FE93D4386ECF3268D2624E530\nA63A0CCE226B736FC9AC81D82C08868397AF700633EEDCFC0BA7576B7CAC410C\n48672E78744435774BD2FD841BA295885CDE0341E91957B0708CD87A095DE31B\nDBF6879B3CA010E79EBDC36B079486B9220254CB3C87017E4B04E84BC1F30A2B\n094F1370DB0A860491FD85401E45D54BAB4D5E8050936494C0AF692CA0CDA13A\n113DCE31A056EBB071F044BBED376AA51FFB8A31DBB40B45F7993A2636C6FE2B\n5CA3B42A3F2833899AB0ACEA73B7993A5FF01E81DCF0781FD4FCFC37D8E6D103\nD117CDB337FF8595596E1A629F5E26B137E0C3EB59754EE2DCAA03E100151EA7\n54FCC62665B9A2D416659B3A05D939E8E6A8ADC5A8C7B6E77FE112F0FD941FDD\n4CB513A46B17F7E05063A231497F0C56611368501EC3AE7D386BADD8B9605214\nD3F75C798F34F234532BAB3F98712CD68062A0232DD2088224613502D3CF9947\nBFC855BFAA3150E7A0C69F6827BAAC3480D516D2D3415612405F5BFE2D4817B3\nE0D95610806EB76F9CF3D840B64E21DA77554B3501C23DC4C3ED6810DEB05386\nC1FBB5A52E7C5A136D6E91CCA9BB4A363AB5FB611FE38D451D2250327B2DC8A5\nC97C5327ECD70B9C547326F3EBE3D0E2428787619099DBF1213C9C16290C3D76\n7A537920B179A304714FA11A49AAA8CE7A27833E882C2B46130F54CB58266ECA\nF79660AC61151B88A23148A764781225239303D6ED6FF48F7240440145E7201B\n8A1A4FB3B1D99CE0E2C4DA6CCE27C281B9C64DF458D932A2562D17D226BFA676\n99D70A2871A813D985FB7785B838E0F745B2904B745C73C7DBEA47D86DE75F46\nB6B65622B63E476C933AF48E3C6377DC436BD54C595B446465318964305815CD\nB910BDD82BECD1B7CBB486FC75BA47FAC59935D70B713223BF9E39B691910937\nEFFD4D0347BD056DC1BDB2D359B4EAC1F47773448BAC22B9CD4E983C758F4526\n4D15E9C26890885D92882435604AE8C5F48B1745C46BDB0E6F9BAB849F669FCA\n96AB2C4008CFBA3A0B7F17BA582EFF70A34031864161762E286A383AD1D6853F\nF29DC57E768A5EC0798487F3CE0270631FA5A0BD2FD9F78D47203F5CE65BC5EF\nA5D01E84E1D4D20D0FA9C1D0BE0237BE9AC843C7EF9FDA3946C271814B68204C\n3173E5553D0919793A0A386DE212333F5D4C051FB1E1833B60B84958CDAB3628\nA9582FF1A23286B80893D8BCA09D86BB06444CB74994A622C522208B84DEC018\nDF181C42875E9AA0A477D46534DE1901B8626B87CF78A88AB0A071C273362CB2\n8D22B305E44338E220D991B5BF3C441F01F9BBF67A84C63B7D432779E95F2B16\nB5CD4AF8FE9DAD4B392C0427D0BDDF4E5C097798271DE14A2D32F1F74E341E4F\n6C2182C88CAEE41849BF623AD9656244B1E29C83123EF49242A1A83F27FC6BA8\nE068306C27237D2AA2471B60D5F253B4310B8A30DB93CA53348B513DFC2AEE11\n483BD7F9A640CECD617F21845DEFCE54802A62A913E676D85650FB1E441519F9\n38641E582A37E5C4916819CAC1DFBFEEEEA2F3F2670A0293CE7881A20B994664\n297B515B2B3B9CDFA4E5BFB2D6E8CAF76D305B77271BE5EE394BCBF52A3512DC\n4D253778BC602CBF7CB555515C4400EF051C2EE8781CD6CFB94E0AF62602DDF8\nD4DBBEBE29417454D57F5B6EFEA95E044E0C094D75B35F0DE418C9E8580248C1\nB1CC534DF2322C7659F22ECCAC6BDA52E451713837F98B5BFAD0AF0B9291141C\nFA95387CE3B07D6BA0FB2B6FB05DFFA08544A88EDF20587FF975B1C289A0D5C8\nA2570FA70C19CD7B28BD86C32CB51B3A54251DC2770CF3A57FD6B35CE569844C\n5B7B0DB73040D94C111CA5FF63732CAD2CD5E2CD579015BD931AEE66484B4DA4\nF1F18D62BEF1384AB5AAD2A6405568121BDA93FA5B5A11661E9520E5E9FEDB7C\n8D6DE4AE6030A18140C52E73DFCE44C4DB369A0C2F8D34ADED009D74EA3A5745\nA8D57E6A428AF7BAF916AB72702A6C1FE9A24250EAC801DC3B0FE333C7650A07\nFF66FC2466D7ADD45E21F0BDC77C59936942F783C733D99ED2F818F0A0A917F3\nAEB87B0D3C85EE8300B909A47618033C788F3D47F082C90ED4991CA0C67403FE\n987E98BD259828E083C10CCB576A940EA0A69292A98E9F1D402BD8F7E4B8B9CC\n8C051215D81796C37311A8A8D4922E473E8030561A2D32A750CA8827A26D3652\n0CA003FFCB956D1165C73C801B15EC93DCB5461B1C6C8DED7099551B527B4AB6\nD8E5CB4ADBDB9FAC5E65FCF496AF21B8DDE61B7507CAAFAAD3416F16069E1793\nAA505E70112FE54695554A20B6D0DAA60EF341987F932A43F61CBF8D839FCCA2\n0D172BFF18BACCC781EDE3217D8DD099371662435FEB038AB5DC4D709975E31A\n50CAD1C5210BCD6752340118D91C78B10AD87546A372A4FD3A69B65BE5810E34\nE8B2D7C5A8FD5D1FE3B914BE6B7C4265D5B84C9EC340431A3A2AD5D2000296FD\n62127B73F8C385B532BC3EEF40476966DAB1CB0553C2BCB7AE3A170ACB32DA71\nA0C55578B95668722F4EB574C8DEC8ACFED6EF1056ABDC64010223E10183D81D\nF4280CB96C9841B07BD7D310B8671E16BC7BABA18104957BFD80E6C15070FA09\n490C5DD04E120B65BEC1E7D8A4F2B498E6D5AF8C63669D1377BD9A1D207057F7\nADFAAC4C0AA498309BBCBCC4E1B0F7C37ACCD47B20C1DFA4CBD104FE322C9287\n994FFB3ED1C28B8CE85074F6E4B7BCFF252A6A92CC97F4E5F5FBB194550C7BA8\n2CD10217754BB97A50A08CB1F603D522CA7DA2E1ABD55EEA0EA34A88A8CDC239\n3296B250F8C2DEDFA08C16F04CD04C45258D8738DE1F55941E5684A1F1922236\n9F1863B84B86C75AAC75FA9C5DB854B7C9881F1DA1370ECAF9D6323A493B50ED\nDF8C3440D03C88C4C49044961814182DB7D87CAE1EA12A98620A87D9150F1286\nCBF39F850DCBACA2038A6C4DA045495EC91B368B7E977181AB84E25A8005BEF5\n89CC9E65234E4222A6203862DE2A4FBE996716BD881CC1F6DA35DF1BD41D0D90\nB8AF29091201BC003703E901113503D4AD80699A9F5C204976FD8C60F482F3D8\nB7C503E4EC2BBE31B178AC425FF3C76E547CF414EE52E147A7FCBEDD6806BEF6\n0ED99F8C31B33D3E4247FE8E3EF44725F5FD73FA5402CE9342FF35FD18B11CBA\n20FA59814AA61EC839DFC7857FCDD10635E436D53CF5E476DA75E4F9EA28C57C\nE9E44439938175C01AA412146643C97F87FC510F57103DEF15DAFC4460E0519D\n934DB51CA93D37A841BB6C207C2302C5DE646AE8D2EB8620084659A872BA8FB1\n54D6DB74DC9D1E7B05105D3DF15A06B4189759DD275F02AA46CBA9D50EA8BD3D\nD272FE649CA5F879D1607A91675EC80EF2CFC9F3170706BF2D1B3E508D0366AA\nAAA969871E2778D25428D1CC76F6472DF01A56AACEFFC01334E6366D7DBF145D\n86F99138BA9D78CE84345329DBFD6C38FF14864011D1208AFA26E338D7E2F82F\n7F688151FFE8ACDD89B4422A20D2FD2193DFF061CA01EBFEE3C058324F7C54EA\n70E961090099AD37CAF4D253ABC801F49EECA705421BD5D7DE9E5DF71B2AE380\nB1578E614218F866F22585630BBB66991D1708BD17F30298F7AB072A98602323\nAC636A4993A8A78C2D2D216EF0510DF827EFB97306C3627C65A52C3F37382AA2\nD6442A21003D59703F3A3658D5FEAFB62A5BB4007C03765A8E836E5CCEA19F50\n65A00731E59FA543F8282D8599363E9517D3D2BB57FBD2EF36599D59D63E0E28\n5CCE47B78D741366399BFAB9FA89BB5B12F78FE242A04B3D55ABECE2DCF6FF1D\nFE367C116ED2742DE84EB1BC7734EE6552BAAFC02878A232DFA231B0EE44A5E3\nC7EECD6F90D83441A91C8F1CB9EB3FAB5939A05CE581FABE0DF46B6397689989\n3555996D4452208A3B1F338E05BF09C5DCE273C4A7D5DB736BC7973C6F42FF22\n3FED0B3998E3D01BE1C13A88AF022897588914CFD63919B798B05E92C51EF76A\nACEE1B948DD82776722D5368618673B81674314EB88454DA51ABA3AFC969C1C6\n8B1E7DAD472BEC2F21F5446F161DF2FA8E6FCEEC4BD9FD2FC1D289A2A291C082\n3B1424131E6E4D82A023BCE75489C0BF72BDE03DE0C72476294E1C2620E3B17F\n53A55837EC59FABE3A352C40543DB920C41C7923C48D1176F4DDA68CE49089E1\n478BE6BE2C40328CEDF3CAC452F463049E2B601A4D08521CA497311D194AB00E\n5EE88E99223D75D61DDB32A232BE20AC4116619C3EE23FBD0770605EC205AF96\n78870185B69237B742A53F8CEB0835D46021F03917540B08A5AAA68454C6909A\nB8FF48362B2AB756F8C5C3602A21DCAD127E4EA1B812B1D9C9FFC0CF8A922551\nDA8569C3671746AFAC667360CAD63D7B48305702F9D1ABFDB7D3D0F37B088349\nBA3C31AD9C1031A506BA62C7ACDD73A8B012F590C7FA7E9E42E6815642E66355\n984CEA7ABAD8EA36A2D6C73CA0CBFB2D855B8A700835FCE62A4E314F8FEDE79C\n8D2D26323A3E331BA707C1BE1E079CCC5EA5A19436E1165CA7F034AF029062D7\n5341AC15F607F1A5D31016D3F2070CAB4D03CA299DCF051D44A0BDCD73BA97C0\nBAA159DB1399B88A9A4271FF70283B80AC9109DE8D8B0A29843DA78E3888ACDE\n48BBA25C2CE2EC885F29F9A3C41A814BA791627535536EDF34FF437E51E96219\n47EBBCDCD5584B98A5DD97938D8BC09F51623211872721341EAC84E8B38B9EE4\n6A5F3DF4EE23D09A2424A3407B6038398CD8DFF846A44F0B9C978B6EF34B46ED\n42E613020FB1E0D26940CB8387718E53DD408FF68A4E1581B0B5B71CE1D6B149\nE78064ABD6AFFA43A0A9B4FF06EA9ADBE46E5E41CCA54BFD247AA78642E6F99E\n38977EB06DD413DEF4BD7C25A1619BE7D19402CDFC9F35D28A799BE748AD021C\n513649B6D20AC840BA6D1C35B62C213B7E66BB4609FEB663499E7D5AA35919E2\n535D9B37208CDC2D65A7237A99E47EB213FB54BA9C33B0404468150F36E9CB0A\n776E6AAB38CB59805CB80C53DACB18CFCECED311118BD41EE3B3954D9776CA0B\n9CDCAEABEA1BC81C38C1134B4D7D9DA2BC395C0C36AE27D61C8D91A2E3613B75\n102CC4B5552E84192F241E94C7CA76DC92CC801AB552C2426F6B906288BEF34C\n420B3216A388EB22D2F4051F6C87797FA8ED5AD415129B14C3F8D4DDAF2A02A5\nA58A931F67192C736A684DCD76D55AB4CE7AEF76B71A4227BB8156ECC8525085\nA4CBE29A788B973C4F84B92A2ED85537D3086ACD782A9616AF906DF18DE22599\n2093FF4D76171A158C7F8B463D422ED44E2A7068468483FBAE965E6575F83472\n512D56A173BF8065F43B4ED9B02656166FA87A6680A5786C61041EA11A50C3C9\n679797952009820B30D23A4BA93D34E18FE8A2FEA886405642404B323533B300\n90104A0782CBF134265958D1F84BBFC248856DF264562A37DBF0C17C8A35AA24\n83F585668C940630273A51D3FB044C14FDB84B86985D82BD5853CD86E32A3919\n755C71CC2A086641DCF762D0DD8D74520827B81C08FA89A3DC2DE55FE3D15ECA\n27E6C80B4E242CA8D95D5FC75455251EADF0613F462D1C6CC92AFC3A2A773352\n6B35E4D44D1D0EAAB07E618697B7E9E8C7AE26A4784FE77E20B361B65E96DB0A\n7309CE7CFE6FA3585E6EB92B6F9E245F3D2E6D7A0AA8A72EA6E071B3F9ECDDAB\n22AC6B27B42F90760DAADACB269ACBE327E905C51893B38B19D7467BB5C381C6\n10CD46D324189DF0A2F5C3B0C62824C7CF83115D879643FFD2073C940F11ECCD\n4D5A6A2899CC9ED9EFCF52B360B0C87CAF03E1FBC351497C837600631393E14B\n25B851BA47FEA7E6F4ECB08184A7C78CE614FB97C0FB85C2E8E361ECE9C99AE7\nCE82B9F92BE3C94B18BCC6A9D394B90B7C226F8A518863972688BC4D5C2B81C8\nA0C22AC85B399F086608256077E139F21D7F9A80BA30F83283CEFAA4A84D74ED\nDB4629EE8ED7C2DA2A1A3A25FBAE33A2592E55167C0E5B4945C94EAC1AA46650\n4F7A574313620B10423D0101529E7596DBB44B1C8C41D13C3E1A53A80E3D62B7\nDCA87F4BDD4B2091A1CF362C73F402D61B44A8E1F407A5EDB023A60BE3451637\nFEBBC2F20B84BE47FBFF738DAEAEB46D209DB095B882F4C395AE340C35473EDF\n67965EE937135E2D5C942A1354E23F1BB4B9CDBC3FE4CF2B59571656726CF2A4\n0179388F77F7CF4B5E869050DCC1B8135E684B44BB9A222C62ABC08974FD8646\nB311254094176ABF4A236B3E40605041FA4FBC579EC906ED79E0F6F86BE0C56C\n4267DD55DC9F967C17A4A3837E91D02701883AB19FCCE9643485C7A125EBE555\nDB1234C32B8C03617B72F2CAB84A86A56134D78D56B0661279BCF13C29BEA9FD\n07FC0626E95AA4A117C17501B459A66AD2E6AAD71992609FA86A9D4E0C024A43\n9A7FCE34CEE2557EB3F7A08F00FFC1D8856F7B7B87C6A2565AC07A06C2B030DE\n58818608D75D518BDD318DAC0FBF4A2A4FDA3662C58C6A67AB417ED0E22653D1\nC916ACBDEC703FEE08202E8FBDED96F72F2BF2F7D440B3328062DB59E52CF94E\n494D290A21369A5B62256A4846F1E87A953FE9B369AB27DC19E2CB705C5E2607\nFEC6B048C25B66187149CD6C5AB13A01F42CE1236DB07D63C7572211E6E5FCA3\nF26A881013AD4F3F23EB5ADE92FBAC16418CCA6811BB007B0ECDEB80DF4DDDA3\n8B02F425AD09BD8F4EA3A3B3F44DF62041831A0C522072780BEE174EBCD70819\n4AAD738DE3822C317DBD30DABF91BE723A5B6D0F684D31A4B9408016CF794278\n0186BE1AE14EDA2994C712AE442C07BCE68BB57E033D6EF4B24943ABE0100C2A\nAF572642FC5A1640D61D6EE48FC11C5D768107C0194B22DFF1F0476CA11513BC\n577198B178F245DDE0893D39A1572344F5227E6D13DFF30FD8A72569E4F9A6B3\n9014FB8B28E64E17B1E9BA1BB076258421A4EEC47D6DBDE802196A2D73D0FB0E\n056799773B4B050F6FFC3EFD65\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMR6\n%!PS-AdobeFont-1.1: CMR6 1.0\n%%CreationDate: 1991 Aug 20 16:39:02\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.0) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMR6) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle 0 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMR6 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 49 /one put\ndup 50 /two put\nreadonly def\n/FontBBox{-20 -250 1193 750}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891\n016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171\n9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F\nD2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758\n469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8\n2BDBF16FBC7512FAA308A093FE5CF4E9D2405B169CD5365D6ECED5D768D66D6C\n68618B8C482B341F8CA38E9BB9BAFCFAAD9C2F3FD033B62690986ED43D9C9361\n3645B82392D5CAE11A7CB49D7E2E82DCD485CBA17D1AFFF95F4224CF7ECEE45C\nBFB7C8C77C22A01C345078D28D3ECBF804CDC2FE5025FA0D05CCC5EFC0C4F87E\nCBED13DDDF8F34E404F471C6DD2E43331D73E89BBC71E7BF889F6293793FEF5A\nC9DD3792F032E37A364C70914843F7AA314413D022AE3238730B420A7E9D0CF5\nD0E24F501451F9CDECE10AF7E14FF15C4F12F3FCA47DD9CD3C7AEA8D1551017D\n23131C09ED104C052054520268A4FA3C6338BA6CF14C3DE3BAF2EA35296EE3D8\nD6496277E11DFF6076FE64C8A8C3419FA774473D63223FFA41CBAE609C3D976B\n93DFB4079ADC7C4EF07303F93808DDA9F651F61BCCF79555059A44CBAF84A711\n6D98083CEF58230D54AD486C74C4A257FC703ACF918219D0A597A5F680B606E4\nEF94ADF8BF91A5096A806DB64EC96636A98397D22A74932EB7346A9C4B5EE953\nCB3C80AA634BFC28AA938C704BDA8DC4D13551CCFE2B2784BE8BF54502EBA9AF\nD49B79237B9C56310550BC30E9108BB06EAC755D6AA4E688EFE2A0AAB17F20FE\n00CD0BFF1B9CB6BDA0FA3A29A3117388B6686657A150CE6421FD5D420F4F7FB5\nB0DAA1BA19D638676E9CF159AC7325EF17B9F74E082BEF75E10A31C7011C0FFA\n99B797CE549B5C45238DD0FADD6B99D233AC69282DF0D91EA2DBD08CE0083904\nA6D968D5AE3BD159D01BDFF42D16111BC0A517C66B43972080D9DD4F3B9AE7FB\n11B035CE715C1218B2D779761D8D7E9DEBE277531BD58F313EBD27E33BEF9DC5\n50C7821A8BBC3B9FDF899D7EAA0B94493B97AFEAC503EB5ED7A7AB67C3039A0F\nBF0BA4B455D035FF3126F33A4DF59FF96752CF58DC0863924F6042B14DC2DEE4\n099CAA764A8EFFEB78F7FFD276F0928BA32624C3A69ACEB8777A461298B201D3\n4DA271476B8AC8966668D4E28A6FBA952F6D295AA80CC09B0CFD6BE840703B07\n7ED93999EB5630C2C7CD9BA683ED457D1341C3AA702B5FA8593A51E8E9165FF6\n1385693E19161FF1ADC1FE0BE16FD3AFCDC3916A309FCE6B3F2B362C9F958A16\n821E1EB2DD899522DD3155C0B7A7F0876E4DA32FD30D8289266D9F05E77F1F1C\nD3BFD2D4D6C8B6FDE0E8957BDBBEC54458C70B96F4CD77E734EE0CF620684024\nEB05DF0536FAFF10FC6F6050AB338D44EA9C38150D3779A550C505C06D417A71\n62D41C2D23843E0A2A73F72D4B5286E3CB7B8695B2434479776A59CB3BC6D352\n677CCABF4133E20F12D91CFD8978C09FB81DF801707194AB8FABA9A6599C20FA\nB36DB0A166490D20BB0BD53581A8715B099754E6FA0F7D2892F5573380DDFF1E\nF9C3DA9F74BDBEBBDFA5715AE23264F967BC7841CE58E5EE2764555978D904F6\nE8DEF6ED66C478848FC35A9827ACEA1D7CE85C8626C162FF296869DE\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMBX12\n%!PS-AdobeFont-1.1: CMBX12 1.0\n%%CreationDate: 1991 Aug 20 16:34:54\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.0) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMBX12) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Bold) readonly def\n/ItalicAngle 0 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMBX12 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 14 /ffi put\ndup 44 /comma put\ndup 45 /hyphen put\ndup 46 /period put\ndup 48 /zero put\ndup 49 /one put\ndup 50 /two put\ndup 51 /three put\ndup 52 /four put\ndup 53 /five put\ndup 54 /six put\ndup 55 /seven put\ndup 56 /eight put\ndup 57 /nine put\ndup 65 /A put\ndup 67 /C put\ndup 68 /D put\ndup 70 /F put\ndup 71 /G put\ndup 73 /I put\ndup 77 /M put\ndup 79 /O put\ndup 80 /P put\ndup 82 /R put\ndup 83 /S put\ndup 84 /T put\ndup 97 /a put\ndup 98 /b put\ndup 99 /c put\ndup 100 /d put\ndup 101 /e put\ndup 102 /f put\ndup 103 /g put\ndup 104 /h put\ndup 105 /i put\ndup 107 /k put\ndup 108 /l put\ndup 109 /m put\ndup 110 /n put\ndup 111 /o put\ndup 112 /p put\ndup 113 /q put\ndup 114 /r put\ndup 115 /s put\ndup 116 /t put\ndup 117 /u put\ndup 118 /v put\ndup 119 /w put\ndup 120 /x put\ndup 121 /y put\ndup 124 /emdash put\nreadonly def\n/FontBBox{-53 -251 1139 750}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891\n016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171\n9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F\nD2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758\n469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8\n2BDBF16FBC7512FAA308A093FE5F0364CD5660F74BEE96790DE35AFA90CCF712\nB1805DA88AE375A04D99598EADFC625BDC1F9C315B6CF28C9BD427F32C745C99\nAEBE70DAAED49EA45AF94F081934AA47894A370D698ABABDA4215500B190AF26\n7FCFB7DDA2BC68605A4EF61ECCA3D61C684B47FFB5887A3BEDE0B4D30E8EBABF\n20980C23312618EB0EAF289B2924FF4A334B85D98FD68545FDADB47F991E7390\nB10EE86A46A5AF8866C010225024D5E5862D49DEB5D8ECCB95D94283C50A363D\n68A49071445610F03CE3600945118A6BC0B3AA4593104E727261C68C4A47F809\nD77E4CF27B3681F6B6F3AC498E45361BF9E01FAF5527F5E3CC790D3084674B3E\n26296F3E03321B5C555D2458578A89E72D3166A3C5D740B3ABB127CF420C316D\nF957873DA04CF0DB25A73574A4DE2E4F2D5D4E8E0B430654CF7F341A1BDB3E26\n77C194764EAD58C585F49EF10843FE020F9FDFD9008D660DE50B9BD7A2A87299\nBC319E66D781101BB956E30643A19B93C8967E1AE4719F300BFE5866F0D6DA5E\nC55E171A24D3B707EFA325D47F473764E99BC8B1108D815CF2ACADFA6C4663E8\n30855D673CE98AB78F5F829F7FA226AB57F07B3E7D4E7CE30ED3B7EB0D3035C5\n148DA8D9FA34483414FDA8E3DC9E6C479E3EEE9A11A0547FC9085FA4631AD19C\nE936E0598E3197207FA7BB6E55CFD5EF72AEC12D9A9675241C7A71316B2E148D\nE2A1732B3627109EA446CB320EBBE2E78281CDF0890E2E72B6711335857F1E23\n337C75E729701E93D5BEC0630CDC7F4E957233EC09F917E5CA703C7E93841598\n0E73843FC6619DE017C8473A6D1B2BE5142DEBA285B98FA1CC5E64D2ADB981E6\n472971848451A245DDF6AA3B8225E9AC8E4630B0FF32D679EC27ACAD85C6394E\nA6F71023B660EE883D8B676837E9EBA4E42BA8F365433A900F1DC3A9F0E88A26\n331E4A51928EF3C90E1D7D90BDE7A402CA9A72A5B21FBA5B5FD09811D25FB644\nE3ED5807BD7622427C6718F69BB05E9BA8BD5A5D6CB04476DE6AA2723D28730D\n14664A5783CB17068165F5A3FB93CD97C68AADC8B213C59BFD0A6477FF3B2CD4\n0BD12A065DE0285D9EDAAE292EFF3458CA33A9328428B6D3640B006FCE95C016\n07716E88D87D39315AE9231187F737B3E868D4960AA923C8AC4B592A20DD30DA\n17BD2E9AC456CDB5B5BC02FB9C9765686BF6852AC263CEFD6531804F9B366BC7\n24D438A2B06A70E8F42D2558ED89C26948BC5C0329ACEBACF159845DB6C816EA\n754D23377412A1AB0A6E6362C8CA54D746D15C11CF1FC79DD222B9568AF85E23\nDC844A6FF83E07E4F843C682A19932790A8B12662FEADFA2C35E4B898C2E507E\n5A00C4D6307BCAEB58B002F611350ED16D63003355C422946F189EECFF926B0E\n2829A593D0CA5E66D6AA4CA6B46713A21CDF3A56D3B7EC5427020DCE8D863CFB\nAFACD6120CEF57D090B24FE0F6E1B02ADE7EBF8780A0185B85D17D9CA44735F0\n319985DC5E0CF6767B608318A62D05287D6194C3E0F6B079409900CD024BE4E9\nC3617E131EC0915C738899093A370CBA45A1222166C447CCEB92D2EE4E433E12\nB510B1E095D857B1C3CDE221D60852B14A431EB454BADDE82B06589E2CA494A8\nF4B67CA399B29ACC7C38F97C527AB88CD95BD1C45D47D1C174E7F0B8EB3716F2\n259E8396D24880F8B79D13F480796F8697721D00F0A2FE453E3C1AE0DF8A2ADA\n64B713C8691FDA7CFCAD1DFA29D77917BF5013C17F0242490DDFC2F0BEC3FEE6\nBCE4F33548D6C66542A24C906C3CB0EF2C34665E4EBFFFD28B128677D14B3BED\nF595A748013A4AB5D4C18B1BC1DE3FB318862A213ED419A207D8A9F3781ED3FA\n0946093A949D65E8E21164594114C08C0173CE84ADE4794A7B051D4F4CEE6EF5\nC3D0C9F4E1DCCA100A5A9FB11C9FDC82C6A4244B443535088DD0401A56CACBF2\n1D390388715136D160E060CA8E56A2FA2BCE73E984BDBEB4FB1CA6884DA9632B\n65E33DD9992134A5890DF73E70EE27F59A4797300EFD9F77F9C772701109F59E\n63608EC46DA5045A67FEED4E0D0DC5ACBAAFF2E672090D04F42742701EDF7D5A\n54B0C5951756E3020F44D8BFA02BA5FB09BD790CC13BB9A0B9792B2412D746CC\n84F4F98BA36FAC7A4D19A049679DBF7DE15F35582B191A87EB2594C63B62C8F4\nDA239819D801BF5A3ADF27AA88E67F1F52CBE093B67394A00E28E8F5E412D573\n9B86FBF5273613D9E537C2EFED83A81D65C7536033F76F8D01FA964364C8B298\n6606F1F58A1B1A6D7AB237E5FFDE2B4AE5624E031C3F8F7E84754026D374A787\nA200765E9B78D1D30FE57E5C1A0D203C1ACB6FA16752CE46473E151ADA86A5AD\nEDFD2E17F63742FA30CB5888A16BB3CB46F8908B6F07C3B112AB4D3F475B463A\n5B5EA253C3F37E84A0BC306A1B59FBF5E6211E98FBEF805EFC23DA4994043C31\n91EBC79A4C6241F699F27ED10F3AEEB0AA41AB0EF8A1DD234CFDD64E10047B21\n5D6AA351EBA9269805E0F838B59136693ECA6435E5CECCF05809F94DA896EB41\n5C8AE35C38AA9E87D3E547F878146E67EB3127111A3B56391B2F2B53700848DE\n794FDB52943A424B4540CE4A8BCE7B9C8616D3A03D9D8E2DA46609BE9D109244\n3B30E512B8326E86C6699FEE4FC8905AB1A26064A07B533D68F1E5027F7FFE1D\nEC5DC6E6BF50A969110998D7B3E6BAE1295427CC447D1AA0D492658EB0525CFE\n83786706E39BEC2EF2638A778412DA8989BE90256DBAA88326696D1775491DD3\n6FFCF26946F45D7AC183664C28C23C0F48DC0E3C9835239A28F6F51C6F3F02F8\nE1C1B0258FE81D9BEAA8884ECE5018575145E262F144AF8FA41A08A4F62B909C\n8CFA0346B06CB96275CE030C5B3954009E100D9F33564CD82D7A5622E2984676\n3079EF990DA97E0DA4F4C2C42593359CEAF618D3631F7CEE0CFEFABB20FE09F9\n1544D7B842E3147D83B5FDDF587E6A15C2607651F4AFC38CFAC034052C1C4890\n28B7676840E03ACCA42B08E5C579B212ECD25D28854414BDA30EF6ED9A9DB3DD\n5B47961239E69FB9B83F5E41B5E40F696E9628D6AA580A0DD6EB045DC73BCEF9\nFE3952A0D26930D87570A627A4525B66C19C7C8DD79E7C6DEC1EA1759852BB01\n9999C5BCCE0BF2DBC0E4CDCD6959A25154BFCDFFE45364A4CECAB93372F09587\n9051ECB42E4F0ED5154A2599488DF0A269F6A40C7B5D82BB67B728E53382F3D4\n039E24AE5772EBBF88A9DD405CB6301BDAD76678BD4C0BC0314B97F8C26322B1\n9D931B7243BEC651417B37D0906A78C60A1AEFBF9A1D753B98652650BC0BDB1D\n9CA0D37DB0C3F4E90A37B79AF3EFD384E3932E8FCC39D09AA5CA14F27F608B88\nF651A345A05DE4C13B3B83121A2C4DAD3A5FB073CB22E06474A5BEA09DB8FE54\n282E32E41F2C1ECAEBD60529ADF23C882C9E809CACF6E7A74DD4072A2CC134C4\nDC49DF3F6F3EAD2919A4E610483B4CEEB3B222970D4FEC7A7D3A8960577CBB62\n6EA4EF68EBC55A4A1B330B7D20F5BC8553C3F3D4BBC66B4AB50D3B5498CBAF11\n9209A65906066FFF529B8C4497C709AA36BD079BA2F785DABF48FB04053CF500\nBC6C01EE2FF09416203A319F51F0C8740F00CE171029C7F864294ABE5D01A5E6\n31D896F0A2FBC10EDCF767CF8C2BD7087C43CB3604DE8008E4782A58F1686320\n554A912EE9D0E50D74F7AC4AC52B2EDC2DE01DF14F5C8F51A41B86181FED82B6\n78857603CC1B1C2486C0EFB1D7ABAF625E0B2665C7749397514EF5024FAD6E1A\n26D38315E85127996D33558573C0B3DC1DF280441B8187291798859A2106CA27\n051212C98721F6700B04D9CD06AE95B8F93974B3BD0162EE702D61D1A1DE9361\n5CF18349F41F4DAA6A77A61C1E2DDEA3AF8FC7A961C7ECCDCD858884A18158F5\n0167E007ABEB7E7A8319C7AF6CE0C5548715E57A18A4FF33F3F784877EFD4A7C\n40337A1F792D1E3A53CB160E1682377824A55837D84EABF6FD23B2003FC3F622\n098CEB4B6D21A7273ACAD77B34BF0BCBCBC2B397EE8FBD2F1BBA444A738A5E7F\n675A58DA9D42EF86D09B57FB55ECF86EFDB8921B74634C01BF6014DABEBFCCCA\n6A1F8CB48F72CD68C7716BFF59216083C47B1E656EF736FA42B891FE37341CA3\n01EE8B9BBF4729325E6AF56B14551C771CFEEDAC335FD7495B17D09D5CAA716C\nA6E905EDB359F4DA36666E9C499A58A1796FD50650F76A1CE39202285ED841BD\n6A8CDD87F1F1B54898500737E2E5B21E47A7AA55395D1F59854E3D395A65E1C3\nE55CBCBA5E8B5FC8714E32834B0E460C3C5FCA0E72DC18FECF8F2952FBD80122\nCAFDD2E014A07325FEBFDAE9D5E363F9FA337DB9160F22DC6A9340DEA2E080DA\nB35EBE6D59D5FD4FCEA515FB663A6BE31DD3BE8B3B17E79BD7D465E1EDF8685B\nEF56D4291F60F099BEED22C48EE0B1767FAC7F2DE81D6F2A21D7C6AD01BB101D\n877A85CE2FF828A6D41F6EC45C01526314A2DEF78402BB31016C7A8F709738B9\nBA78AFB2CBAB148D372492370B83730827D0C7F91361C13E9338074742942071\n36AEE5E508D1293ACEF698EBBF8C994B0F4B6D582D8DE6173D25788E8D7EBD52\n3AA6944687741C73C31B24B1380F66B8325E226F8A53542969457CF36178C09F\nB7B96AE75F996A3F65620DD3C9AA0015CFDBAA846726A24FF09FE42482CC185C\n936E2EF8756EA92A40A177C8445A96F0DA2630CD26A4ED4CCC0C3A6A9F67EE43\n7419ACC768CA704DD18FEDEE8E2889FD9FEB5FF6A513F7C380B84E16D7937DCC\nF193D6B888AE59A1D55F376B75A1E5FA1A3EE98A7B00D51270789BDF2468F386\n866E100F7A51052C1195306B00B2FC27C4676ABA69093A58923CEB1B0F9B8DCE\n33FC5FA0244DE111BCA3EB3AFDB98B8774EC9E4903E615B7FD1BD780C6BC9EDD\n49A6934618CFA94B2D8C7D83CE17486DF6483021D4FF5D1E751D059AAF9A54CF\n76351F85E3771730641963BF1CC675A1CFC01B784EEDA438A96ED385725A0968\n2F5B9BC97CDD32DAD9D1797E4B04B03D64488AF58F4ADB1AD6898F0B03A848EF\n7FA78EA1D8FAC501FC96AAD0B064963D41485C95999BF54D3D32B878DB7A52CB\nFDDC5D8462A1673E9F078145E956E4CC46CC96B809842FAA3394AC8569A07493\n3EFFA919D1C2776670174AA4474082C41CB72AFD6DCE093A38779D2231DF27B2\nC3EECD2391B74101FDEA921A2F93F104E64CC97F3A8ED7CCB9FB0203B61E2BE5\n6CA8B5BBFEBD31FF789FCFCD33FF3F749B759039FAD0C3A74197AEA4621ABFA7\n3443FE8EF0F7F3245ECACF3381DBBAB49A88F97EF81AB354B8A83D553E6A79BE\n8A348FE65A5F4DDF3CBC87CB848F5F702D41FD5A05871E3F6BAAEEF26C43E1BE\nFCB67965CB2858B2A45317C1413171D84C6B84E0FE6F80BCA95D45E146507300\n1DC2CFF1301D4FC0C3B0D6BC21E6FC5B19A301185605950C8647BDF936F93D87\n9E9FAA35B6E7AC045382519DBA5B4B102204EB7FEE9E12A6033AC586313E1CB4\n405F88531140C7DABA47FE2C8EC173BAC933E131785D0283125C8D0E02752090\n735FD02E98DA15E787D76792D06D2D590DFB33D5B879BFA622B0D2B35B729E95\n02D9965A8B31B64D7C34C76A2DF77A9699080F4AEC9EE19AE7E7DAA83099DDCE\nC3670BBF110F335FFE5E546FB1A62AAB81BCE29E7AD7E67766A67D8C0A07FD37\nF3975706623E002B5DA7A2E69ED0B95E799DDDB51E794D1175AB822B28128BD5\n6C9601E1EC820F2FD48EB6D834FE30FEB1A575C13007CBD12984605AAD189CF2\nA3318CF4920D9277C63D159B4E5171A21FC090AAA2FDCC2FF16F39AAAF64A85C\nD60835DDA3554ED1929EAA59181B709A5D98D13891081F6EF67BDBB2F54B2C9B\nB57095A4F4C9115B4E50F82FD313222E714CA0C9B07F5BD4083970B82EE4494E\n9811FD6C141B75F9E006A86E5C17D081CC9E66C1E18AE38B22955401E535AFC9\nA8C3D9F78F0B232D8AAB8C68A2EA1DFEC2D77862E7A415E0A2C2BEE4D7141D23\n41B9D319A9820472ECC8751401461B7400508A7E584F82A327DB8826B5D346FF\n9F724322C957505DE5D0E9AEE39FC71FBFE0696DB4035BDDF5FB32DEC591DB3E\n7ECFEFBB21948BFEBB25DBF84B9CFEF62BFD47BE82D5E31A3D105A466599704C\n41A2F8FC0171E73DD00AFB66F3D08C2EE8B36FD22191304E54159F30226C4E46\n94E7C1916033BFD54CD01ED58E9DD9DB38818BA612639EA733663DDADFFACDD7\nE455D0CF0F26CE40F673F59DF7EFD77111D2CF0C695F90B78E0DFED6B4DDFEFC\n444652C4DCE2F081505B93E3E55C43A5ACFA56A9E4C0C53B0D84A326A47F9EEF\nCF39CCA485EF9383F3ECA408C879EBA19C83CEC2E9E682D29B000489C50B75C7\n430E9D77FA16530BE07C94DE72DF8851CCA8B58E76859843C0692670C0B3C374\n2854870AC35B8257066DB214BBC83451FCF41A9C1C0F5284E9A0070C2C0628CF\n50398A7233BF3095340D26AFF324C332E83E27278A770C8B449A72A830FAF8DA\n103516CC7507EC5825A9150550E4EE8E205B0B983212906A31747B9DDFD1DF40\nB1007D68A962F6766FC429A20C512ADE36A1D35F681E7FE6CF6CD3C6BFFFF6DC\nFC653AE62C90907ECA147225961486C2633EBADF7C0159FFD3C5DFA35D3C9846\n1B9DFEDFEE68052FBFE2083067A834C48F17837167CF07EFBA29ACD2F8495B1A\nF1723FF3F06145372EB508B99589E014E5A4CD5EB31B59F4057A22216CBF7CD5\n34374E3EC205E1D80427B8BB40CCE361D08CB20FD316CB7E36FAABEE22655212\n0FE278053ADACA9BA43AE2C4593480C115FEA247159B514B071365B25C6AFE73\nAA364144A3E42ABDA5408F39B760A0D41812FE5328F73BDA8D55C454D31A8C24\nCF65699243CD82ADCA6D75F47432E40229E38F57CC02FD2C8B496EC9C767B6F0\nC2ED52701E57162EDC016B65B8F7BB49E3E6C064A19238661CB46B61BD18BF27\nEF71CE2AB71374A6B47AD3CE482C78EC3EFB69D16A37287A5449213C7EE6074B\n19EEDEA831958E8C1648F34E6A3DB706AA144340F97C5C6B979AC9F1359C4467\n3C415B0AB2028D8893133D1B1E7AD68AC2A4F6408071FD936F02038F342B2C65\n4761FAA3A99F89D00936CC3A9F6CE57F75636EE59CB1AC16F1EAFA5A0E8E35C9\n57F376F5C98B364B1385EEF31D124634192FF5EBC8E95BC8046502195D241C3D\n3487DAD9015C6F836902CE37907E2A0F55CC1A520B090DD10B17C30D5746A4A4\n17201DB82EEF52FC273D97DB715BC92E973BEBB0A55B30E47078C6E80F78285A\n6BB72F644BDBCC162DBDF9B602F6916DA6BB8B139F054A213126AC43D67C25D7\nB08855F3CCAA5FE1D1651F7816A40BE670FA2411416275457FB219BE0D0D9169\n5D90868F11BBE0BA6F49D1214FBF11FD46C527CB0504A9A182203397ACA4F708\n5A4EF83B9302571C0F398EA94CF7F003F0E53ABDDE6C75355F55E1D77E48F11E\n723782EFCE64BE63A048F1196FF600A2A55D0D3727ED599E0D1A3865E3616328\nBC3A6C2DCB58ED522A4322DBB58AE34C5E8C39FC3BFE97ADD99482B487945BF2\nE14565080D51CA5C0D6BBF7106FA6B5735F046A8EF8CEF2DC4F743AF99F73DF2\nA470CD6A1A11CDE52E53B37F2CF0C8EC3AF681857E1BF7AC1D95137DB1730073\n26A5B6E79C7924B88C73FF7E599F53415DAE0D3DF38A8B01F9742D6B84D30AFD\nDD0D91BACFD48289A6B3AA6BB073F4E505795D5494407604AF7E7FDEC99A35E3\n0A72B04C293C7A2851DDF2089BA5FAC1B7000D3246A2D4591EE114D3399B699D\n98CDCAB4A62052B085F0DF6AC50544E7273A45223018C455B444DD75A37A7DEE\n00A8AAC653916F96F7A6017E418D4B6B4212D47082EC9C83C88B6FEDFD154762\nB02ABDBF6402E1F7AAE6FC7DC9B4F0396AF8BE6B4B40CD8FA7B4E4A0E53EE127\n5F9FE9290DE11002E325A1B5DBE1DEF7B68D6C6D753C52C37D94C8F7AA8F46F3\n295A612081DEF273EF288F5682C0A00F0E4E521D34092B8CAF274157A805B6CA\n6E6741FACEBAA736860C6A7C6ED26BBB11BE24F1DF70D09BAFF29EFF0284E7C4\nF8BF3D3C6FF5C9A510B2C5A9C59BA8C1DACFBDA662671AA78DAE295B2093BC6E\nBD225A4DBBAB2ECF7475BAA14451DEB99C4C49675FC1636841F6076DE46420CB\nBF09BE12A9B45FF28BE6CBF83127980F2AAE8456CC6431DB0E47FED186561D0B\n892DFC1D443C979110B835B6DC746E75CF78C2614A67C68268AFA4A9EF09B547\n65F472BD3B8C0747806B443B5077310B3E388EEA7F70BE14A3EE744EB930E398\n897E76AC5A63D09E1B43D09A158B0C15696B25742F25F7D059529357AB058E5D\n1BCB19F9799B33855B9E5834B5EC8C160A98737682AE60F3C24BEAC4F8364769\n33CF7041E7ED2AC72AB2BA08386847C3C5EB7D562663339C4B755654F7A2AFBD\nE1428DA0A317F42F98B4F46E16D67BA16E3C46F95B169A3F4A5EB99D58926BAA\n836FFE68325BE28CE146BE9A6289001C7DA44A0575108A835B2B04D4CAC317CC\nE0D71883992A68E16633717B151E0ABC25366AD888E6E7277C22F4981FB4F695\n7F353C0E446D6318B9DC18A88BC9376BAC5222E3B94594EB33BC73AC7DA29EFB\n81AA8501377FBF24191A1123C658B69ADE5D7905BF1265B6FE1A1136D11BA262\nF52D87E0EDF43EF2BD32045B3011839F7809F8A00558E106CB6D0CBD023CB03A\n1073A2421112D45791F91CA0E7AFB76D40E1C7750B783261AD178F788B6EA31E\n42A16605E96EB9C9C675839903F6C34BD253A8F1391656387D42054047B831F6\n8EA9BF16B3B4B56C62C1A56D5D4B4FFDE85C592926A611366F5C6CEB7DA2D4EC\n647D717A06F6CAB8EEBCDDBB335E0FD46E26A567D1E156E0D0429260696A64AD\nFE9DFBAA0C343B583829E76713E4C1FA68E6573FB06992294879E66EC33B32CB\n26B1E76C73A38C4606585D2CB5D1C85F5DAE13BE22F6EC5E3974077506DA242E\nC52627DC28C53A527EBECFD98671164E2F0C72C0233E3C98F813C9CE4BC47CB5\n3D1A97E8A8E7B8360FC99809E2231D20C48DCB7AE0830893BA2F9F4906F64E66\nEA18997E4E29EF33D513EC892A3F7CF70E8D6B473D385E934BB6747ABBF8FF22\nB5EF68204FE62003C0EE36DE562A4F09E6EF3A1DB08D6F799E7C2BA2EFDC5EB2\n2505E1348E063A7242AD991D1E6CAA4B832BD73C6FCF79F2F5484C4D0BA05E5B\n55CE5EBA712F1B3170BAAC9A048C773E2BDBA77B2C2B0BC284D1795C84F86FCD\nF3234E3427F1D0900E743F9BE6BE46C4E7BF7D7F4A08AD6DBE1468F22A657D9D\n53D781F9D0C1662A1A9330051E47047523DBC6A6B791639977535622E81CBAE0\nDE8A034C847CB56F89D55CCFDAC555E6E4AE5E375BEC55E948EAF9E2E18777D4\n0C107FF142AEEB503387737DAC3081461E06BA7EEA9275BC7D4434131C76386D\nB3AB3E8CBF6BC51EE188BA1E3C0EEBFE9C67CB72968B59BB20E921C46BFF6D48\n644F6A90FF3EF39D9A8A9713E22271B129690052F6DEF763D3415935113405B4\n99721583A47A729A856FEC382046C6B1803002B88D69DF67A13D5B75B147C150\n7AED4F37BA7ECE52ABCB94A04ED8238F9854A196322E098CE8491EC2AB580AF5\nD87BA182D74FADF0A20B009B5D538090E8E106E6E65A53733960F912A5F1F22B\nEC0201F0BF807E399B68F7355C9670A2232A1900AD0551801D337CFEF3466E7E\n8EE083A87A7BA174DF6D03229C6F834C1E8448D0B071BCF7BD3CA6F98B32107D\n371C1833B06F290E4A30F7BE00FC731383FCFB7847834E2174E49E76CFA655C9\nEBFA4EDCBA9729A7FC368642A1D952ADC2C835DDAAABFE0806BA89B21D69484C\n8132E222E66BC7025EE604F971985242DF6E2D429A2FB3B9F33A9DC8D3A291C5\n05E876832159E504D6EF595794058B6C57D358FFDA3BA42055A459B73DF464D6\n682FEACFE22B47DAD513888A46D93DF1B26AB1B05161EF6EB9F57E2141F30409\n025429D17B63E5434E9DB6A8CB07EC3A6A89CF4AE92F17B96377F5259962F14B\nF3C3F07162FBA6A173984DB6AF9E5A9701EDF798875A4BE563E81B3B571A9F79\nB0903F60A7984A5C31AF00BEC0D9DC898E7AC0E89B2F2885FDF4C6C863347AD5\n866777454C74DB3EA4D25083F9E0B61A48E8A9732AB7C836D2E8BD8311044307\n4015C4E2C53CFA97D4B859C4FC2E17C2F387C3D17E3A0A14BBBA6453B40B8A01\nB0CCCFCE73D6C9ABDE3D7AD8AE04943D96EEB361606CA7B2EE556C1A44E03487\n6982CE24C713F033FDAD8B02F0261FD7A5667E0C39519E65B13F13A0EDD6EFD6\n2F64B0F20A178CB594137CCBA6E5A64B61F484D4667387E8DFA5A054DDD71724\n9F15130F093C17C119F101563AC73747321EFB684FAFCE637FB190C2F3C541E6\n6A59D3821C1370FA6FB9E8B47E0682FA0B67B47821FDE560A1AECB90CE429B92\nE53DE6633E604FEE822D691648329DE2F97CF8D79636142F501A5E8516B43B64\n3209ECB9623B787C7C7BFC37A2708E12685EB0D4027A690E27374FBA7DB245AD\n57281B94E34A15B1B560052BFF1C80435D0A67FF03F1626964A18B5F3A12B613\nAE9552C5122C184F51D5264EF0C93CABADF07BF6841E13D4903EE10E4CD82456\nAB6AA166B75146210657FB9C7A4DF6FD49D49DD284C8C75BFE92BD05B957F2B5\nC8A1011679E77CA203BFFF661F343D955745580ADF0C32E5B87E2F37A87725BC\n0CCFD357914BB1D92BCD8C623F827ABBB6964B768C363C43A2A18D96870B8063\n3B7EB178BBF4B4BC194C786D74C9FC658D7DC0EFAB7209A18BF31142B6902710\nC6176558748D2D4E40E7DB50A65DC3DA739E343789E4B902B8AC1AC3904D33FF\n3996B7154DD9A8BBEED26FF88F3BFF96A3FE411D29982AAD28F0B8B0CC63F8D2\n03B1E7A9EE74079592D55F20DC577DD2843843E8BFB826CF156833F49C46BE1E\nCB91B384E9FF511C04A05FCC5AF277EE44FCBEFCCA920D3CEC3DF29F07E902C5\n886F8123C665EDE431C39AB3BC0F37DCF92128680CB660C7892133DE90727B3D\nB8FD8C1A09F51DB018380990BD2A9DD40D75005E52E58911CE8B5CA0FE16578D\n21C83AD7751E6D6EF5989D717EA16CE8F45A28742C69127A6A35CCC6EC5AC548\n6272AC62594E1A58A1E32D47C1B56EDBD0BA702B818DC10CEEFB1FF799664B1D\n4AD789C5D018D118D81449FBD1D41B4CCDDB0886EE2AF4EDF973154088FDAE1D\n8551405005F82909A66C3FBDCF18ED0592D29398168361D8EE4FB1536B024674\nF49CB38E898C78CA2DBE4104F382920AEF8FF5ED41E6F3C76CCA1126511D3B4F\nBEFAC4933C7AE426935CE876345D4C845A5D18AFF7FDD7264668B9D002FFD267\n7921A6E6668782760DB92FE02879633BC9CFEE2470DBBDF28FE67D158BDB16DA\nCA45AF03195F49435E9727288E77561C536FBAFB65D18A0A94A1A3F665BB4647\nA83369B19B0065825FCEABD5F7E4D3CDD245F465A6D5DB705DABA6BB39F8D06F\nA97D148E563B80D6FEA66DE1454BE583221CC2FAAD3701B6D60A91501409114F\nAAB281E4A8CACEA6253E9B579F1AB4382D03B33E060017FEF9B94BF02C09359E\n9F014E60E8D2366556794CA7369E8E03D345A8BD02E2A590A04DC0362EE09A43\n191A7FA6F4BBE538D60179CACAD197EB1DEFD24B6E44197505C69D25AEF5D9F9\n9654BB274901FCDF7AE3AB0AC1FEF37DFB0A1A1E48F14BAA467BF6BE740C2037\n0AE97E38ED13BF7A2B8121F1D861B423626D5DB3A347EE98260CEF6D2F09E1A4\nD31BDEEC9794A2FFE1642001B64AC93D616895517A6964BFD0E5A9D258DB3E8D\n681BB7F375679ED5DEFC8990CFEDF910E19A240AD78ABD84B37981FACA61FA4D\nE54F112D75C3000F5451E3E82F4D096EAFBB979059718348AD2F5F50525F250C\n512703A9B69CE8FD61E48871B8471785C48DD85CA7E5E6FFA50274CEB9022B40\n4E53B2FCCF9B405260D9DE5D591B99824358D4AB93431873114727B1143928A5\nC6F065816E\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMSY8\n%!PS-AdobeFont-1.1: CMSY8 1.0\n%%CreationDate: 1991 Aug 15 07:22:10\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.0) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMSY8) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle -14.035 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMSY8 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 0 /minus put\ndup 121 /dagger put\nreadonly def\n/FontBBox{-30 -955 1185 779}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964\n7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4\nA213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85\nE21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A\n221A37D9A807DD01161779DDE7D5FC1B2109839E5B52DFBB2A7C1B5D8E7E8AA0\n5B10EA43D6A8ED61AF5B23D49920D8F79DAB6A59062134D84AC0100187A6CD1F\n80F5DDD9D222ACB1C23326A7656A635C4A241CCD32CBFDF8363206B8AA36E107\n1477F5496111E055C7491002AFF272E46ECC46422F0380D093284870022523FB\nDA1716CC4F2E2CCAD5F173FCBE6EDDB874AD255CD5E5C0F86214393FCB5F5C20\n9C3C2BB5886E36FC3CCC21483C3AC193485A46E9D22BD7201894E4D45ADD9BF1\nCC5CF6A5010B5654AC0BE0DA903DB563B13840BA3015F72E51E3BC80156388BA\nF83C7D393392BCBC227771CDCB976E93302530FA3F4BEF341997D4302A48384A\nCEFFC1559462EA5F60DC05245E8499D8E61397B2C094CEED1AF26EE15A837209\nECE64FEF41ABE8DDA7BE1F351CF14E07BA8FD40CEFBFC3CE7B9D4912D6FE752D\n9CF163084E688DDCC4A1D689C866D2906D6812DC8998AC5E57A9DBAC20B30DA5\n7AB62F5B35AFB49E5DA5193A1784FAA6DE0ACAA3647A5FDA25BEE73CCEF09F52\n2C6C3A99CC5BB6D720C3FA7091056D976D81544EDFE85185501236F4E4E6A984\nF4DB905F71DC920FD23E39696292A1D190A7CE47C69854FC5970B7AAE65AA244\n821E1BB4946D39EBEFAB221A87376868F2DA0B66AE67F4B0009F3093C9E7BC27\n7D2C1E24D5D490C055CCD9AFD9AE9F79995BC17DF0071583B4767C2544A581C2\n6D1F73ED68D332809AE0F0F224835A9418462FA2A6E1E9C49AFBEE223EAD93F3\n3228E92A6478986F7D255B61B42C50EFB4C53E227940404F668E2272B3CF292E\nE5369F1DA2E2BF8A26B4927D62FE121FF92D4D232F3E5DD4120CC8652662C6B5\n25DA8AC81F3A8BB51E422531465A6BB512E24CC1D431175943DD708B3E3AFA9E\nBD543CF5B3F2FCDF06F9D0E8B46739B6AAE0BA2ECEB55E2A61B8DD6E53B90FA0\n428F4BB31A09442BAFB8E1\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMTI12\n%!PS-AdobeFont-1.1: CMTI12 1.0\n%%CreationDate: 1991 Aug 18 21:06:53\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.0) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMTI12) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle -14.04 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMTI12 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 39 /quoteright put\ndup 44 /comma put\ndup 45 /hyphen put\ndup 46 /period put\ndup 58 /colon put\ndup 65 /A put\ndup 67 /C put\ndup 71 /G put\ndup 73 /I put\ndup 74 /J put\ndup 76 /L put\ndup 77 /M put\ndup 80 /P put\ndup 81 /Q put\ndup 82 /R put\ndup 83 /S put\ndup 84 /T put\ndup 96 /quoteleft put\ndup 97 /a put\ndup 98 /b put\ndup 99 /c put\ndup 100 /d put\ndup 101 /e put\ndup 102 /f put\ndup 103 /g put\ndup 104 /h put\ndup 105 /i put\ndup 108 /l put\ndup 109 /m put\ndup 110 /n put\ndup 111 /o put\ndup 112 /p put\ndup 114 /r put\ndup 115 /s put\ndup 116 /t put\ndup 117 /u put\ndup 118 /v put\ndup 121 /y put\nreadonly def\n/FontBBox{-36 -251 1103 750}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE\n3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B\n532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470\nB72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B\n986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE\nD919C2DDD26BDC0D99398B9F4D03D6A8F05B47AF95EF28A9C561DBDC98C47CF5\n525003F3DBE5BF07B2E83E66B7F97DDD7CE0EEB75A78BD9227BF359D002B6ADB\n8AC57A33FED4EF021A7085B1E2B933DE602F0FF71467ECD501744AE338AF29A0\n26F7D368AC6F25CCB882DB7B7343566192BD687E1349225982823027D3B66703\n3B0DB7A7E680A682B98023D39C7FAE81A5D5B867A0A66C8AA0DBC83B1596A84F\n0436AC6A7900B767BDCCE0060A4811003C79FDCC71D73F7F2D0A6675E93AD21A\n56B4CD8EF75EED3DE8C0A18BEBF7B9D1BE72504872D56EDB272F1E97FC726CB6\n68C85C713059DA19F6C2E0F3E12710A59B6FC4699AE883DE8C8615B7292AC25C\nD5714B6CFB14EF0EF11EB13009BEBA4F345A5D3D6D9926ABC2BAD7DB1328651E\n437BFB3C46DA7B62219660FC368CF3D3704DAD3AB461C28F711665BF484BF61C\n052093D231CA65618EA463D63E406ECE858D180A6C0589B2FEDC321371C28E77\nDE974D655DF5FF7D41ED01FE717D928A885F6FA6CFE4D2C0807F8E7F937916E0\n96EDD1A3BA67802B1F4A49100E75613BA0356D9DCBBAD4DAB3C59E70A47058F5\n2163D1730F0EE4D1F87C3A4AE723A23CFD7986FC4FBD399347E9F5946354E013\nD860FC446AFF0B0744F5DA27CC777C96ADB388D1E835DDCBE123FB517679B9B7\nEE5A3DDDCD392415AF58CE22EA55B7F47031138C6F27798B40F7E18FDD315912\nBE99F33ADE0FDD538A8A3E5DE58AF68A54732AE69F188F3F7E0458D848205648\nCBE820C287ADC2394520F03BBB97DB893F6A12154B1B7F8626D35CE6B70F8524\nCB128DE87821A0E32F1E825F6C50AE8B4BE37FAA3183BA4D678E896CC7E61CC9\nD0226FC38B9CAE0939D19149D987979B96A86EB69A105807AB426639292FF5FB\nEFF0817FCFD5E5102CDA9C6365596A5B86983B107FAA66B0D78B31A28200DEA2\n09DDC063E381211581344C51140D77B5D03202FD30149084427C6227F68A5118\n3A05751EAEF19F1F886CBE718B94CEC0F0ABBD4ED9D3F6D940EB90E5B02AF3E1\nFAB14DCBAD0EF8ED03F4B4B0162A558241D1B8D69385953C39BC0B909367C700\n87D6EACC5162CB3771F8494838BCBA9015F84379D70069A4AB0D09534E0010F9\n497FFB74A87D13288E7A8B74A698752EAAE3AA375071BE14C6AC189D2C43F20E\nD376CD28316D9EB1B420648E5CC7CE931D89934A526189756AD679C6E2F9D3DA\nC57265B3931D2D41C5EC017C94B6704948EAE79A4C3DBD07E135B0E484397F5F\n51992FBE6C0C8D61AA0AB79011CF3A75317A75E72A6583E24612D40038234113\n5D3502109CA8C46EC6862BAEF575A1217002FAE9BCD24B43064CE11D1BEE30B5\n594B9A087B5C91085D1027ECDAC3BB6BB2710C176044843E85C2839A6CE09A2F\n4D4C0C7CC061BD009492851A0A7FC8E68197E3114A122ED6BD77960E12C0D5C2\nDF4DAA5FB76E30CBF5B325437EDC20401219976C9F1C7CE0E7B3AABDBE4AD726\nAD29390190B26A9EF32B66E911F6C7E13E1F69883EB9558751514C3B1265EAB1\nE2487E6B67581069C1D341AC60109C709AF0108C0B55F7B14E8E8B84707205C9\n0422E6808555F747FF35AF94F2C99DCFD6BC905E9C12497C125E2B7C34774841\n84889A792A479D64CA7B07CE7E2DF12ECFDF73704B177A62714DBFE59E1C3234\nBE91CA4507BC5012CEBD49EFDB8BCCA930D7F40A53CE914F42737AA56B53513A\n98FCDDFE50DAD6490B3507352F1738782D7AF6E21FB573F95AC4B8382266DBE8\n57CA59571D46C8DF01A35EE5D4D36D7DF537B84215F29077B9C632BC8C77C82E\nFB80578567953C4FCDD1E6B465092ACDBBCA672A40F914F5E5F0231F9EA8C63A\nF77FEB980861503FE7AC49164E78DAAD7BEBB75D5A8F5DB54DA580FD3400B973\nFD35E2A495405D9812525D73214F7DF7F3E4ED1726E2976581DA67433B1D850B\n0A788E6C52C44FF09907525F280C5A2B5FA5ABB9DD5BE0A45FA1CF55B9156FC0\nDC30E662FAACF4DFD100C24D9B8D275BF2BF2B487C483949F3F473C51BB08C2C\n6BABBFC7E9717C5694623C015B67AD9130E74C15A992CFEEFBBB76E1E9339C07\n54EC50747EC803070B2A7B9ED2472AED47BBF92058E2AF1E5655F2F867A22969\nA91149C31D95DDFEF20F3073CDAE8BC7A1CA7BEC1F0E38C457D6383499EB247C\n0922259F02FE50A7DA1240D67B08F9666141F833266CF529712149A60BB1BCFF\nCFF67D061C598C313CB82CBF3024CBC82660222FD1BB0B49AEB9189A5F3408A9\n14CF34E3A2A8AFD95C1FBE5230A3D4FFD27E48C4285B868CEB342F38B5CAE096\nEE81409039DE0D598E287C8E367DCFA64E3203FE4D9C3E2D20434D6F27629846\nB386D3D4F5202E11E2ED4192B4C33F8B3C520B59F68AE726174BA2EC72955AB0\n3104796E59A655AC781FE01994881DDD9E5F6EF0120DB897B966B14B258D3445\n3221B135624B0489AA6C6FB681C182B1E994624D0F186F7EBAF494175A5BB6AD\nEC9BBE90F6D00A900BED382BBB64E23DEF50BDADFA312AFF1B9DDA469F680CE9\n024E1559C85597197DDEEE6E4B6797E9BFE8CFC6E4A29FC396F1CEB8CFD80FC8\n3AD2CD83AF949547697F6A74405BD85589297ADE213EF00BA99F9F06E73F4B5B\n27C13C40EE766B68671707A02CA3B85FD8FBE976CC0575439F6D23C61F546A74\n2531573E3895EB4B99813F36FBF05E305CC489B2FAAFC8FF46B38ED3DB411388\nF87CDE91BAEF01FBC35FCAA3F13D0CB8857F72C7B1BDF233B9191F98A9BEC4F3\n4FD2525247E2604C6F2F76427C0CB52E79F9B05AED84917DA019945A18F45BD7\nE5FB59B25692B304019DE89FCD05483535A739268479758CA335C10F9E0C1DA6\nD108CCE707172AD8A18B0A353E7F88C3B6AA2496204B1414CD765D5AACF16671\n0A986BE35D431D7ECB508900649E6004238FA46DD2ED3D403A264F1B4F632BD8\n37B5D22555F26DCC2FBFFCC902DACB9450016555FE2DF45114F7F05743C2114D\nBEC834C6BFDA4185C11FE6C71758ED3423353322230623D984490673EC45DE45\nC0E5437F3D091E16417050A3D2233385C6FB365D93E32B22D4A1B9EF438DBEBB\n63D512DB341BAD5E5DCF47DB1B84321F6B242FBAF756B7CFF7C698067799D36E\nFBCEB1CFC28359204C27717EAFB5956C2606F25E0B94A46B8EA12B66ED63D7E1\n6FB1F7BCF273A9FCE427EB6A95B4F9D157E36BEA3957F1CBFBD8627A591ADC39\n205B4688EC98CA3623294D320483A5A17FE8AEFC58474245C71C6EE9C5A6B25D\n5DF62DFCFC82BB1B013837648275DBB229DA978DC1AB3C3B1EE3BB0A3AFFA1E5\nB9188E30086A31EA994686C07E69D29ACB19CF031F33D32D3CFCE591D1E85D31\n48A3E10BBBECEF77E0E33C3402175DE94753A606156E28302713621E6283240F\nB895EA68AE90B5A8B7431E599ABC788479DFBBC9E4B869EAAEB067E8FA35DBF8\n963A90F9475C73718F573C4B86041CEC1465A742650F1A9B76697BDA70192223\n1255AA1476570E2A1651203F10EA1138D27547F872FCC1BCFCD7455D0095DF86\n7DE4B48CD35B5D55F755C550575ED8291CCE6F8BC64A05E33338DA3D14A7EDFC\nE5EB6E70A37D9732656299AA2D092D216D635AED030453DC9B696F1A8A602265\n56CD9554EBF5A5239CC359EE3FB00354E41BE72031D84E2CEC7C299F8CE7D097\nF8487FDDEB2FE507ED459E6EDA294FCA6BF820572FEA02B6758A2BB1E37A56F4\n78466B84A43B78D6673E07CA5975BA0C44F16965C7424C2AA6A6CCCC23F4B8CD\n3DCDAD8FFCA3E667E8D12172CFF0CB929B50712F57928297DBD1C10B6DF3E45E\nCD8AD0AD091A905CCEFBF08B2A29364286157C9A0AFA5DD844E2E6804A1143BB\n062D3A999E81C09997535D79B4A4ADFE3CA1EE54901CF6316F238626DE2315A0\nE6276B078E1F2FFA4DA16AAADB3932B8CA03C94B3E2DB435681A270A02D55E01\nAA8DFB0CC7BDB493DA8BFCA36742605A15DEF608954148930D24CCEFC80C9E73\n4A974B8D17615CD59F6990166F24C0C5FCDE24604BB4B29834968A48C3BB45BB\n5BD069C54CE4D32E5AD9759E604F6B32684792B34FFB23B3BE017B6982A8E5AB\n4FC53B0DB13FB763EA1E23F3BF88CFEE312041E0B331CCDA678F284514F8863C\n2B56CC486B7463143BDAD87020AA8BC180960925217580BDF6BF00DFF1A424D8\nF819E0445ABA29DB95DD57EA3E5A9562B670DB7F7491B49F664C7AA3A6FD488D\n917BD8FF6A47FC3012B08C5487CF10FC0CBF0F6CE184150E051F3A087296FDF5\nBEFD2E8F7DAEA2AB2B787F671EF62DA7BC44395013921BF242B74C0C7A54321A\nDB0695F590B6EA8555CFA0CE7834780C06FE613B01CC1C994ADD5EBEE0AE84AF\nA67C3E73ADAFCC508590F19E85EBAAAE52FAA3A5B307E4A2160BF2A4DD7CBD5A\n36CD4CE6B26FF164FCC9D48EBD984D3E83E563830E987BE576B5984826F1D921\nE3E39FF13E29B990FCCCDFABE0DE87A3D4B3519766D94C8B72E7B6BD493AAFF3\nD0EA636FF7C602A3DA32DB119D524436081331388D0A14F12E6E1747FA29B765\nC851902EDBEDAC68CC2DABCD2D0CE8467A7FDFD45A45DF269E7031779E6DA69F\nF7A8627891DF4AA6089BE355F36BD81B8A6CF26DC1451F7B26EB55F3E11D080D\n43A4E1C2CF400E6BC9075F6A0C5849503ADB60EEF4E1124DDC59F00099C01C64\nEBCD09BCEF9197635856CFD3B102CECF8E97FBFBBF52100135B0FE3A119CAB18\n57DB362393F8C3D79778B0A1D1BBE9CB2322A036E7AEFD3390FA33D03CC4679B\n908B96E43CD82FA80EA86E6B6624FFE553F78A7DCF2D0D51AD9820C0B1670D89\n69784222E3E1A98930F782FA1CE46CFD6C39D4542E8783B486A374F582CE2CF7\n9AC784C09AB1610C5D08CE57DB2AF9844F0B5621A14876C58BA278BA8445A4F0\n65166060D57C75B23FEF7401EF5B67469A8682A835699BA583E1EBEEFF823580\n58B1CD4FE320DBCFFD7D7B79E49114F6380EC1B63F2A0E46BCDFF45F73FA48DD\nF5A32C864DD67A6B916B71A85B278641A51398ECA2B5FBDBE189CCE44FCDC217\nDFD231E7CE89AFEDD7F85D9729BAFB1C8544AB7FFE75D291A8FCA86B3E9BFABD\nDA16A119E2955515455D08EA19D549DB983C97CBAC0F4686B3E15DA35A2972D9\n069CE634B50081C80BD28E432212FDE0ACC11ADDC3E8D11685205B322A0F6AB0\nE005498961275DECE7D24777F44C1B443D131386784A5F498A438CA2A924CB47\n0D9C587833DA5AA9CB70A30921B75D96F8D92097BF432ABACB90A27838C062FA\n0B728511B2454C3B825C93A8C3CD80824777E3EC0551AF74551B9348DFD78675\nCF6E2AADC5093E46D50CAF3EC215B1271BA6A1850F6F278D555C632D5A65C0F1\nB232791E73F8AD461BA82F9442C1A00BE73796131897D267464B15C26511754E\n90F5D2FEF7A1C41953085C98057D0E72DBF77C765716155A28FE414F1CB10947\nFB0D85C0DE17180A523CBD2B3505F8455575AE2A1207CC99CAFEB1FC980FE387\n24285FAD354F00112329F159A8F1A5D87ACF28EE77DF7C05284B163926FB960E\n85008E15E32DB960924FB328A7529A0AD28CDBC06ACB59F24419A8D6EB901CA9\nC12B959DF9E16CA5CBDC96DA88C4D199DAD3C89C5A2DB4F5D12C34011EC17AB7\nE52596D7F81357843735C26A83651EC95AB1969A06F666ECEDC242E8B91BF7C2\n911BC370681092A283D1406844FF7B58E1EECAE91898AF3B58D8FB66A15FE10F\n82BC6A1E28BD62FF993A16A0DBD64BE0EA94C155D0904F2118519793556BA773\nA51FBFB20B35E54FB9911884C558AB2FE6B79FDF8600071ED6885C02954F67AF\nFECEF98B9D09850C8253CBBA4C645502CD53B16916DD9A7352A440A18E0EEC5A\n3F8746422370F5D7DFB89DD4C947947D32D698679B9A61778344DED6488E0AD0\nEF8056EA63B9DCAEA2F06C0B6073E4E23D65C6A4D278A583EDEA88034C2E34A9\n8BE618C4EA556EEFFE49AC4958616E32A649322056FE531C561A9874DBA9A790\n762B047AF049A4139E6B334311C9C2A269F6C5CBAE24C954F1EF920D58651D72\n24218A7DDDE820FF6C133B08C1E22F6384C72235861521DAA7D78228A7085978\nC4D1170B34B2863405B4D07B1A6ECAC3980EB6A3AE24A62B92B660E6D1B3B096\n825F2C30A774C3A82921C15E32C14FF6E39C4E5C2AA6B3C82CFA9412D2349E47\nFD54B21022A0E4A302F43550B09CB1D18E66C60F450E5E7780D1957E452A5218\n41B468FDAF843CFA8CE3D20A538AF6E71E558730B16B04D73F007C43CAC63FAE\nF592A300AA943A041967EE5BC83E7F4597E2EDED5A37B83244F19CD4B85C39B9\nFEA9E48FD2E16DE4845A867F2E55AE6BBC51A844503C02EC95EE331922B8E897\n9BC4EBD4984F2DBCC9C44E80037E9BDEAD122147A75B3DDEC89CD3B6A520938F\n5499147C8385E5BC1E7FF3B78386BD26D1FFB1A19248E8A61FAD2DBDEB1BC540\nD88A04AD6E109E229360A3FF1A030C2B0F9756BDE885151D18283408FA2A8AB4\nE7040ACFA6B6C0D28944E94329AABF25561E1374C8431A82D48F1CAAC156FB50\n212B30AEBF7A32A44CCAFED25E73EFA03C38F332CA92CFCB68E1A03C57AEF43F\n8391CB4CD220DC9697D05C87BFEF96589781BBFBE2C3D0F74E448E9976486D38\nB8179B316F26D8A651FD2978A423A3187DF5F99A06E38F20DC908588872A2EB4\n201CAA029B0706721A1CEA3AD93D9CD3F4A96240C0B964B399B888742F00EECF\n73C61D43912B32417F179A8BDA59C644BC0F068A0A274B9F1549D62F8CB49EBA\n350B1FC1B0E2ADDB47030E49B5AAF4C6555C6279D2213BD68F833BF81D71B886\nEDF6FD4FBD119124BBF72798C0A21DAD79E45496E4C43876D5A1195FAF203292\n5F4316863A614D5975000410880F6F922869634609B5237592935644879E53C4\n647CBDDE27C02BC5164F39BDBD46ED8C57350EECDDF7B59EDC23D3D5081757CA\n19F99D73345DF7338235BA67A0B455E7D71B39023389EEF0A87954F947327C26\n4AF28C17E1B9B08E5F9B921730E626B80D80A92FBAF8A2E942C399B6A4B54C95\n5EE94387DE741D20473A91620943F2FD770AF6095253D839601ABB80C62983F5\n16143EDACB73F33DD7E90F399B5595D5B355BC9710A9EFF7475F1D2203DFE39B\nD0BD6EBC5C0EC4F08F3F726A4E66C239A55A0DB7ED38F018F26EFE123814AA18\n7879976EC910CD1FF1E32C6DAF4C721EAB1119EB9E62B88E0A2169D59E26C8FB\nC512C9A9B8FAEC28EC3AF6DEFFD72D5F5F059D81565FAAB85FB3050186ACD058\nE5D400982BBC25BAA1C30F473CCC67E9C643241A5176908D6ED6CEA983E1EDF4\nC91B2025528F8FE6CDF7DE3A1C9391EED37626BE188B2BB22DA63EEEB3E50E2D\n4756118B39756F68CFDEC43452E043915E92A1D84D684C1E16B347B795690C34\n5ABDF07D74099BCD0677A3E8BEBBD604938020AC5D2E9FA113F7D2B72D8133AE\nF748116F2C8AEF15B07C38D133320F7FA6F6A86055965A81ED7A497E35E23637\nB85F7CCC0CD44AB012AF18D0D6F0242C914809CCDDE19EDE2E319C18ECBB6320\n14754C9E6D9346A0C895963E2FD204BE2496A45FB692010738A3ED031D07F16A\n55F694F9D80E3F1E16E0BA4C64C5F19FAA0092683B361B4D5EBD74DDE8C7A690\nE18CCD4A7E2FA2AA328E2A306BF98A54E44F8CBF743772ED105F408FB26A535C\n84AC14E9A63766FE90971CB56BD69AC4F788FC46C461CDA64EFCF027F4A62FF4\n3E796F03957F78762E68B2362BA3A2B86722B7EBA4530899CCFAF69438236188\nA1F175D1BAB9B818922C9D51F8B463030B4D1C71E7775E546F41C5ECB8849732\nDB7132E162E75779514DB10C3DEF36EB1CB6B5B517260EB0ADAF24B170F1B8D3\n670FB81C79CD1302C439B2A171A943D6B701714EF204B7CBAE811F7AC84F395F\n0BF73C9C8A3341EA3B3AC184FDF899E1AA310E4D6B769483469F3B9BB15A2CA1\n7D24BAFC45549E40CC163ACE934D67D69A34E48EF9F2666B994E8C1BEFB786F7\n11B093270C803BE6EDA1A5219D29197FC1196009C4D755D1D801100A27E560BE\n398EC71F387D07A2E2576265E99A2E572BF5E7ABC9B42D517EE5AF7906136C59\n6EAF0622E4B0A42CE2307CF45BBFDDFC3C7308589CA128A0CFD8EAA51D3E3F64\n82B3F13661719C013CDE76C49296D133883CD83698EDD77AC0C72C42791378A2\nD87E719ABF7A2087E45ADDD8F008F3F74CF7A09EB4077EE7115D2777260EE0FE\n68CF5ECFA03312854D457E2D69D00E585B68F738EB6D6076F62AD1D541E7722B\nE391745B2A7101BD2EA139D795D31A9A9A92FB7B39722ABFE156F69329F3B5A9\n456610717CBB3D18D377A62B94999CC7C36922E8E1443D0EB869814A47948717\n71CE7A58B09A83DFF4BB9F1DCB12BBEB457450C176B488CD665467AC0E4EF73E\n26022AEE0235F4186583299A9FDD57AD9D30D7561D55C9CE2152876DAAD74547\n08D6462208FD201BDC5140651A0B1144457625F2E6C7F2F7A4683690F8CA24E4\n273BB7D4DD8ACE232578F27811F70DCBFF5CD485F7356AA5EB9046D450D4739C\n0D0EA6AC3B40DE2AD6C02BFCB032679EE63A7D8B6F6546BB601CFB25F50E197C\n65F70FA5123E82D34DF329B6659B2E685C54DCB18C2806858DCC5865ECE17B58\nDD3226AC1D74A53BA110C54EE5B2B43627C60F5344CF38207C0B4FA4C34D19C5\n164E40F2BE1E68A4CC7DF984C9A28C4BC8D9ED1FBF009F754A53095B047101AF\n81C08055BE7813F779785BB69352DAF33FB62E638A73B7669014E592E6EF0B0A\n73FD78D8B4723219D1637CAA7B4C258982FBC0B06D86F0E22F2E06AD5FBCEC7A\n61E1D1B17E47BA33AABAAFE66BE846CAD7AB171AAA28B1E29FCFB8D2CB23359A\nBB70382ED5AB236C068F9EFD4EBAA36C4A4CBA41C589C9B03683C09F060E32B0\n4643108789782BA3E5D637BCA15FDDEC5FC3C72C529D54DA84E7AE06510D6F44\n80EB91F0F50C5D1F0B8C24AD8BE839BF7A729892B1B2FD668061575BB7352612\n5BA8181BAD49E81472D5DF533072A46E5435B1D97793355E7B68A072BBBF78A0\n20FD012266B4883E27800157CF6F85B3984FDF60F82A21258096074AAAB81E2A\nC78B7CCE7A0E7A13A72626376E99E1118278FEAC826B3AA248723EF46B9131D9\nDA51F115D3A9278B93192FD7387351F138762748ECD021AB41B2687ACCED1EC0\n23ACDA325F4DE5C7418A29B73740A1E7DF5C6AFBE4C501B21231E36F1A1028B6\n3CFA24501D329B5588D0C94D3D37C0E4CB8F2937089235A5650511B0B7E54811\nF5B85C818C1F0AD7AA52E9CBA097B2B3E842CF4E73D2BF9EC4EE04E8AFE4624E\nC1D6055049D9F3FC1E0D95BFD5FFF85EADF31CB490F03C281D25C57B61433773\n54758A2FCB390313BADD3BB2526AA6278CF8DFD7A545A41924A607B6ECE59634\nA08EAF5A4166BE85F9B8F9B8F8BFCA751EEDD58E450FDAF1C5C520AAF032C491\n33EF54AB3E3CD5AFFC6B1415CC10D09F6A6BAAF9AA7358D74A88B73945A36B29\n51DD3AF12CBD4CCEF60460DBB482EFD78B6B070ED47D0300BFBBA21917FA079E\n26B6372C01CDFC5EE605491CA87E7F97B57BE5A9A3C07B61EE42E56A715413E2\n2C86988A0238035FC0112E8FE34AD9C593ECCB8EB803D3A5F8ED1919E7A7EF62\n86EE4491921397F0DCCCFE963A666C47331EEE889B8C18F69BEC65F88CEE04D4\n5C0BF236FFF375772EAB2E5FBD7DD29E0C715577E1CB28C558861C7E884ADFDC\n28DFDCA531CC19CC88BCC16DC30ACB51BC0270680F6AA48510F92615D5AC45AD\n4E5A78D0663B78212DA7B44DC9F9A4C190C372D7A2ECBE9C374206288286A88C\nF64AD6FBC8714D7E3D4A634CC7842ADF97BD2E7B7347249B52DD8177A0FE51C0\n7733DD16D288A706CCEF226AD57D86893555D4D34E7C670068CF290804317778\n6D6F44E74F0069C67DDD89A8403CCBC4AD2F96C65F76C7BAA6CBAB5D25A4A149\nD7483919AE41E6068519BC46633C710A780CB1EB3F611530BB72DF9F8C18B532\n2E67F4132746EEA44F308CB1412AEA9A741A39593487754840CC1F3ABB98B75E\nC46F4DDA11645CD6B64EA90557C98D503B28E73942C0FA580C9F31311E27A730\n5FF1ABF3F8B9F4D80481C1886077B70827B89553FD5C1D31D1CDEA8EDE4A4561\n34FA8BAE5E7D4E2B9F2BF0E36CA524626F7F917B1BE3FDD347C553370A03B5A3\n9F3FE8B5C60D1E5701C7BA4D23BE4D460722048C9692CEC155E88480D1251D53\n19B12342C7D1B26848F7CF1AF82C6858019524B11F9764DE9F415F5A2AEAFBB8\nA80099459BD6EA513B0EC0075104ACE7F8DDF0FE07E12025158443279D2156FF\n628B034916DB2285CA9DBEB1488ADA5DE7AF026AC31DEAB4CB1AE4E38AB7E54F\nC849CD34F153FE899815035D545F2D8C5076B7038E21E86C97E62BE0DB56173A\nF1099A5ECBE66DEF3DE591399EC50E606C3E5E78DFB15B31B2BA6654D3A1A59D\n4E9479AB84B5F0534B2B6ED9390DEEF689C3A934CC564B99F1B921682E2B237F\nCFAEFFBD8492A1051D63F92031FCE0B96090B9FDF0B8FE74052FEC70A4075F00\nD890058713DD835A65DBF99638C7C75CACF2E20E377CDDA27DF4837A4FD364BD\n5729765056A4BC\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMMI6\n%!PS-AdobeFont-1.1: CMMI6 1.100\n%%CreationDate: 1996 Jul 23 07:53:52\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.100) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMMI6) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle -14.04 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMMI6 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 11 /alpha put\ndup 106 /j put\ndup 108 /l put\nreadonly def\n/FontBBox{11 -250 1241 750}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE\n3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B\n532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470\nB72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B\n986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE\nD919C2DDD26BDC0D99398B9F4D03D6A8F05B47AF95EF28A9C561DBDC98C47CF5\n5250011D19E9366EB6FD153D3A100CAA6212E3D5D93990737F8D326D347B7EDC\n4391C9DF440285B8FC159D0E98D4258FC57892DDF0342CA1080743A076089583\n6AD6FB2DC4C13F077F17789476E48402796E685107AF60A63FB0DE0266D55CF1\n8D0AD65B9342CB686E564758C96164FFA711B11C1CE8C726F3C7BB1044BBD283\n9AA4675747DF61E130A55E297CA5F0182A3F12F9085AF2F503481071724077A9\n387E27879A9649AD5F186F33500FAC8F7FA26634BDCE1221EC0ED0E359E5EA5E\n6166526FEB90C30D30099FBDC1BC2F9B62EFEEC48345160804AA98F8D0AA54B7\nA480E715426651865C8E444EDB798C7E11040AF6E5A7ED1888653C6DBF5E6169\n70BCD9C063B63B561EF165BF3AF11F8E519F37C6FDA2827685739DE2C48B5ADE\nEE84F067D704D4511DBFA49E166D543CFD9ECD7417055D8A827F51E087CD2927\nBAFC7E6CFBD70B0FE969F890A11149D3D44D422C3370495DA9951AEE7253A49F\n3A9444C8CD9158D84117299F7F2332FEB0F94E6ED8BC7AA789A3219BC2F227D3\n3B5BC75FB53B55D72AF4A6A7BB613FA235B11BB37D059FD87127CEF73D5B3FBF\n9F91ABAD78BD9240BD9525EBA78095EA0BDB25D1A19E876F292882EAD5619D46\nD20317A345D931F4FF4EAE6216C27044CBA525E3B917CEA25A04C120466C4B93\nFC720E6BA832A06CCA0A3916CEF0968D49085AEBD243C41A448289A6F05CE3F5\n79148DC112A3CC7E8FF810B8C1A09E05F496C0F1EBA334E42E05C376C98F5F69\nC06C71BFC0A2F3AC9951CFBB143C66FB84F9C4ED27DF70869352D61BD5E11508\n0797B87C774354F518712BED10630585E99E1C29B15CEDDB47F43A7F288A7FF4\n618DA0A916E69A201C6F66125019D56BCA15C5660E05901A32FB2608C2EF7252\nB5129C629F622A0C7DE1362FE71148504DA6E8459BF94954CCEDB403AFD8C291\n3F653552F2F474AADB6E28ACBABF73CFE5903DE2DFBB1136A61EA23724C359A8\nCC74D0B29D851CA9F036DCEDC539BA32F494D04DBF5A2771640AD8BC1E083D40\nFE72AAA08BB1A3ECBE81B7A708DE99A4BDD6D055100A6624D66184CC2EBA25C8\n5A16CFDB9963B86ECD01BC2BD1BA604B0D30E68D3300CCA753000BF8B2708B19\nD05E9763A4C7DE03F1451954CC89BA2C9E11D9202BD01299503128F051320172\n8CB8D5DA21E9DDDE18A8EAA431BE8BE7C461527077439BA284419FBA1BE1C9FA\n117408940F958F8E35264B3DB238CE58624A1DF506266B6B1C6920E8A3D942C0\n091ABFC5443DCDC6919076E967FE3656161EAD1D96B78D3B7DED0C548CF434D8\n04B9E33FF5CAF2D5BA59DAA1AAEE53A7D48C22BB3C55068CCBA8EB0C496A493A\n49B215F2C481B568D04313F108E4CB52587524D143354CD9D48FCEC85D56769D\nE6FF3A02BFE43CBCF2BFE788F215BA00F6ACB83877B78204843E4C68D48B3A1A\nE05093C80A63DED2F1A4CB87438DE1BF89DAA981EBCEE46B3745123D2EBDC31A\nFCD480EC0556F1D06C97422CD520E6D5B0BDDA3D458AA2EE299CE202C772396F\n00B5FA68BE6C8AFD9779BF430AACDDD7557547D6D8DDE5B5AB6ED3E25B8652F8\nCB38987565F8124D3421A03AF6D297E9F052FB4DC47FB1802FBF4BE0A74FA55E\nE3F8B4D48DF705FC995A19C8D6A793BD25876850B5A7511DED408EAFC271A034\n841F017166C276E53E0132C2BDB5E4D8C863B506114C7A38E158CFD48E32F5CC\n6B280F56261407F3EC898DB9D5610923FAA217B7F760A580CF1DCF64ED5083C0\n062065781F528ACA74A54E5A8689D2\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMEX10\n%!PS-AdobeFont-1.1: CMEX10 1.00\n%%CreationDate: 1992 Jul 23 21:22:48\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.00) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMEX10) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle 0 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMEX10 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 16 /parenleftBig put\ndup 17 /parenrightBig put\ndup 32 /parenleftBigg put\ndup 33 /parenrightBigg put\ndup 88 /summationdisplay put\ndup 104 /bracketleftBig put\ndup 105 /bracketrightBig put\ndup 122 /bracehtipdownleft put\ndup 123 /bracehtipdownright put\ndup 124 /bracehtipupleft put\ndup 125 /bracehtipupright put\nreadonly def\n/FontBBox{-24 -2960 1454 772}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891\n016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171\n9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F\nD2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758\n469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8\n2BDBF16FBC7512FAA308A093FE5CF5B8CAC6A7BEB5D02276E511FFAF2AE11910\nDE076F24311D94D07CACC323F360887F1EA11BDDA7927FF3325986FDB0ABDFC8\n8E4B40E7988921D551EC0867EBCA44C05657F0DC913E7B3004A5F3E1337B6987\nFEBC45F989C8DC6DC0AD577E903F05D0D54208A0AE7F28C734F130C133B48422\nBED48639A2B74E4C08F2E710E24A99F347E0F4394CE64EACB549576E89044E52\nEABE595BC964156D9D8C2BAB0F49664E951D7C1A3D1789C47F03C7051A63D5E8\nDF04FAAC47351E82CAE0794AA9692C6452688A74A7A6A7AD09B8A9783C235EC1\nEA2156261B8FB331827145DE315B6EC1B3D8B67B3323F761EAF4C223BB214C4C\n6B062D1B281F5041D068319F4911058376D8EFBA59884BA3318C5BC95684F281\nE0591BC0D1B2A4592A137FF301610019B8AC46AE6E48BC091E888E4487688350\nE9AD5074EE4848271CE4ACC38D8CBC8F3DB32813DDD5B341AF9A6601281ABA38\n4A978B98483A63FCC458D0E3BCE6FD830E7E09B0DB987A6B63B74638FC9F21A5\n8C68479E1A85225670D79CDDE5AC0B77F5A994CA700B5F0FF1F97FC63EFDE023\n8135F04A9D20C31998B12AE06676C362141AAAA395CDEF0A49E0141D335965F2\nFB4198499799CECCC8AA5D255264784CD30A3E8295888EFBC2060ADDD7BAC45A\nEEEECDFF7A47A88E69D84C9E572616C1AC69A34B5F0D0DE8EE4EDF9F4ADE0387\n680924D8D5B73EF04EAD7F45977CA8AD73D4DD45DE1966A3B8251C0386164C35\n5880DD2609C80E96D1AB861C9259748E98F6711D4E241A269ED51FF328344664\n3AF9F18DCE671611DB2F5D3EA77EE734D2BED623F973E6840B8DAD1E2C3C2666\nDD4DD1C1CBB1ACCDE9DBAEDA5FE0BED42D4517BDB3FA340A29777AA8D4FBA6AD\nCFCF808A0BF0B2919689DC2B8F8B79C42CB90F4FEE82065B5304E71F474713F3\nB85EDCF0ECA3B6A0F82CAD37B95FB01E62F29748DE33EB4BEAC44E3CEE0C143A\n0BAAAC7A30C89FA38E4A6150A43991F3B2980A6C8BF67ED06E38213EB4493FF2\n79DDCF4D6BB74D41FAC1ABA50C02F2012E3C61522B43F36840EE8B4DF5792D4C\nEB684CD06FA9829EEC34F1EDE38E2036045D243B8DB3B61C0CBB2DB20E1A2B15\nBB1877FCC65C4E14C6921D04776834A734FC6A85A4A72752B891EDB9C23A51A4\n380B0D02080645F09F1F35163374FE6AD58AAE93DFFF8B821B98FD00752ACE23\n8C6DB0FAD05153A7D35136E417E44D96075C24A829B2C786B71723F62C5AC223\n5DAFE6078E02EA95049D0E2C1199723D0BFC23E81D671458832D19420476ED4E\n8ADD76B11834E0F681EB86EE60FC593BA7A70A841853DC5B1CCD3AEEE1C24934\nA763724D80E606E6EEED1C87739CB93AB637F5338E44BCA588EE757396F2E6C2\nF113DA6EFC34525BBF7329288451DF4D55402061EB43B296F76CD385FB4FD278\nDAAE74043A9E85413240497EC0FF38E1778F5BE99C5AA3724DAFD50629655FE7\nED9F1A3C23E4380EE6D7AD9F92A7723098842EF835F5E3F118D96230116D542B\n09BA203E6F0811641A4625D960EA70D2AED2F86D7F86E656D5E111028061C88E\n58DB06CF98B3D4BFBBB4AB8AF43221E7FFCD15D74FCCB31424CB8C7A5587E670\n23CB80F2D651E604FB2075978FB470EB245FD904ABF04B017C6A2FDDD1E7A318\n51D1A6E22AFDC4DDED22C24AB09F069825788F42B5DAF21C67B6AC7DA73B3ED7\n59FDD909CC41BF16860E77A9662BA33623F53867344622ED422CEFE2F97797B9\nBDF2D0523F684C80DCBD0D6C8E812D3BC431E47030C1004257DD0CA6F59CB231\nBCE64E51EB7CB28F2DF8096A35C669269005D64777C5ECEEC7B7175B5C62C601\nD1E8A96C7C20748025F428F3A22B60C275122111832FCD3A82028DBB2BCF070E\nE47BEBE784DC8F1014CB34E8E6E1C6F9982F2A27060EE8FF9E7D5069A7C4F3B6\n48B67EC1FDC7DC2D5167D7D75D403BFF4F591C2127C83EFBF5D54EE4BF3745EC\n040E7217FDDBEDAC7EFBD996E2840B6F058E1AA458F4B285DE3E69B6FA0BB1EF\nF69624A3E92A6150817E6632D30B89F91B20D1FF5A021F48120AC01A80859CC5\n9130819117BB7B4E50B05FB5BDBF88BEF98C77ED3E475BD59A97D054881DBC1E\nF2856A233A02C605CD7D61325375DCB5F5A02BBCA658FB1BE05BAD2A1FE830F9\n55859CF11FEC0B0CC05152A6C5A44234E543E5081D59F70C1A7A221E536CE62C\n2F136977A51D42A9C20DC7457316CCDB1BE00ADF1F248C4BE52CCD600B6FA269\n062030AD9534F3EA92B3451634E12C260B517DFAD487186B12EFC576864246DE\nC6953B270B1A33CC785941C70AE6902AE65CA298084A181E90D75A8C1126329A\n7A4F0A3C92C48CD50FCCD797618569DB0B09B0A0E4E519B9A1B308E065C0E74C\nA54CAB1B25443F865007AE7E618F2FB400A5110D50C2B03402B1D310CCCA56D7\n618A7BB1322B22B9EBBB1AF534C7FCB412537AAC0FBAC2B7C2479B3147BE0438\nB3050E461102D2AA740D670B2A1CD82F9017819BCDE0D184ADEA704986A3A97F\nCBA2940409C12AD7BC6A5D68F35033F1C5E226DC6A1BCEB650D40E0997313576\nDE90BD36B260E8229D869787D517AE5DBF4B192A533FB0061F18B30C29ADE4BD\n75E75003736B0F653088AC59BA3D9AE7BE9ACB27EC61BD9F786F44D62BFC137C\n4AECABC7AEC0FFE497FFF9D770EF74A50A5F6D06C4797988BAF1CF3A7AC67401\n88EF4051B293F353DC2A8C3671124E0BF8B359E2E16B4AE6E7780CF35F09A6CD\nB9400F06BA27531C38405F0555D40DA11D30C1CCE1172F2D4201C13065502BFF\nF784C29E711FDE9202D79E98C074868A087EF9005BE2CD8D0A62725142428E12\nC9B63FC8C4314BA29311302AD6E670E3679E7B4A4E6C122757F83F84ECAE28F8\nAEA176C1AAB86E4545F57113035A0879831928F8CF90F08C74EE50F93C3BEA36\n6D3E4E24F67A6099B94E4797C30641CE7942042B4F532E7518C548801C544945\n6BE45FAEB3E68506AA3033760A06B58E85A9514B1BF8F12F1A0894D5152683D4\n8D29B7EED8FEBB0090D1D980B3993532BAF3D55BD15B40E8E0B2FB265CE006FB\n49ADED7861CBC44F70F00C7B85619C9848F07EF108CF0127C852859CA5E515C4\nC9F0FDB1D777C3FEC579C460E7B886E6C58244453DD85E37EDDDBB0AC2099BD5\nAE5CB3587F50B477780221223535E1BEAE9E\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMSY10\n%!PS-AdobeFont-1.1: CMSY10 1.0\n%%CreationDate: 1991 Aug 15 07:20:57\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.0) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMSY10) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle -14.035 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMSY10 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 0 /minus put\ndup 1 /periodcentered put\ndup 3 /asteriskmath put\ndup 6 /plusminus put\ndup 15 /bullet put\ndup 20 /lessequal put\ndup 21 /greaterequal put\ndup 33 /arrowright put\ndup 65 /A put\ndup 102 /braceleft put\ndup 103 /braceright put\ndup 106 /bar put\ndup 112 /radical put\nreadonly def\n/FontBBox{-29 -960 1116 775}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964\n7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4\nA213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85\nE21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A\n221A37D9A807DD01161779DDE7D31FF2B87F97C73D63EECDDA4C49501773468A\n27D1663E0B62F461F6E40A5D6676D1D12B51E641C1D4E8E2771864FC104F8CBF\n5B78EC1D88228725F1C453A678F58A7E1B7BD7CA700717D288EB8DA1F57C4F09\n0ABF1D42C5DDD0C384C7E22F8F8047BE1D4C1CC8E33368FB1AC82B4E96146730\nDE3302B2E6B819CB6AE455B1AF3187FFE8071AA57EF8A6616B9CB7941D44EC7A\n71A7BB3DF755178D7D2E4BB69859EFA4BBC30BD6BB1531133FD4D9438FF99F09\n4ECC068A324D75B5F696B8688EEB2F17E5ED34CCD6D047A4E3806D000C199D7C\n515DB70A8D4F6146FE068DC1E5DE8BC57034F27CF0B9E4BF1164D21A8A3D9366\n48317F1579A4E4772661250F737F41ADCF2ABEE72716CBDEC756B66AD35FDFB6\nE37BDDACA68370E604401BE303246CF0F7A46394A52B5E9D34B1E181AE500C2A\nF3CF1A8DD52495B2BE7A1691A75E7199240341A3C9C27D8308719E04FD5DCA3A\n22BD4072C8B52A0C67EECC30DA959DD3F758B52AE0CCF4ACDF9BF5E8BA78DD8D\nEC8ECBF8B66575438ADCC9B3368DFB970DEAFA14358AECDD8AD3B2620C29BC1D\nF39D4DAEC9A3E3A4EEFB0441228E7652610287A7B5E08E14E7250E92A12E4E0A\n69C31B5F88E2AEA8C5BFCE84E4E9402B2687B15EE9A2648F7DB9C1FE5AF2B674\n07514ACC57991A11B2C671D13A1C14097DA2C13B0C5996E0E278709FA37118D5\n812D0B2DF8B9B6BB749F1852360B57E0EE474264C258D5F310A329B3F67FC7D4\nAEB254E1E63BB32448752F3ADA9E8E25EAF443CA78D354144B36FF2C4EB848A6\nC78878FE938661CC6C815FF185C413A3C0A5767FD823D93D3E6E388EB7179E2A\nA311CF6481ACFB6CE703E70C1C859CA1E21D1704CAF45761652190DC197D4D48\n6706D29231E19F51A2424EB79B2F5C80B44E8E69F2686A26D1B8A29AE4A229D8\n822581F21657E98BE4D3B0FA98A5BA47AFA0FF8AA19458F2D558B13855B848E8\nBA6E1EAA0C8D143EDECE37533CB98BE3A7F03DF5F28F7F106EEC7ADDA5D57E2E\n468640B8C8B21E77BA5F06DB59B43AE95B89E3212446E76F1F6B375A8F5D22BB\nEEBF195AC1B44B25ED8F8CCE963B48BCB14F1DE031458400AB3FF589A9BE89DB\n75821949F0738625A99958D77F8E854F2968346BFFF589B3BBAE8EF5FAE83526\n8D57AC1EF9E548C01E4F1EA69F39174E52FBDD38E4EC49EA53EB191129761153\nF842513A00A9B09E7D649A636C774B842AA66EF9BD44931BC484D1B5B2D4D1E6\nA4AA71A8E5966DB73BB5218FACF7D4ED4A16A06D85F21FACD007D862380D828F\nA062ACD4482248841208C24CD9112684B6A6302E941F228CEC0A237703293A69\n91EB28624FD3984BBD30181AB7C2B499391CC922A2D80E36B339A8C8A39D89E6\nF0B153CAB0024CD3A941B81C0F8ECF2AD6397CC3D38890315D42A176F0B213DF\nADA27B0A7DCC22ED85585A26F7FB776A568B95B8D57834BB0439B66DDA3AAD9F\n61461593064820D8CC0D5A8CAAFDEA9A0F11B323034303D5E861B34AC535B00D\n4F3446D0113E1818C0E52EA5666B62DD8735A96C8F64E7864E21FA24481544EE\n235C16F0464103FCF50D3BD4707BD6AD93E526BF83B40F09BBDF8011A46FBDF6\nD3616060F21CB373B570950E6421B0FAC7312877AB94ADA2A609C1D953F958B8\nCEAC5FFD1AEEDC00F19ABE95E38BB353B216C6A7E34C5161A9FA785577985AC8\n717BF49A35B174F155C547D4FDE490A30D0AF6B20569D18DCAB3E27A4C7BCE69\nC0D06DCD3B4B8042550EBB26E3CCDF5564E73AAE312FBA1CC1204B53DE4F758C\n407F1A45F76B650F2841341174E7961987F5F5E28E76B8E07140CDE107FD3595\nDBBE23268DC126F82DFF76A7E614646F1AC8EB381CED07F8F37E88D4597885F0\n1A3628B0AB6465AEC2967924F4A2399D1EC8991A2ADCFD231F8EE06D42AC783F\n3B6D6E11DFD42791461D4F14FA3FC4AC42460955BD87531ECFD22B57B7BB8B40\nFFB10F1FE1CC9C625FF0396079CFD27C9A1F976AFDD6108A0A84A159F3175DFD\n57B93D5D7691272D2D4854145F78D949C5EE84533AA8C10F941C3E37090FD3BD\nE283A15B81594189D8C7316BF2DBF2481166701ACA8D169F7301C5FE6838DE80\n91D867FAEFEB13882515A1031F1BDC7729CC8672F98188E2475AE2F48226E8A6\nC7E8E406A06617E75C25EB62196D61E327E565ADCDAA15DDCC58319BA9E8DE11\n703690A01D0E8EF60BC9E5324C8EFDEE02C7BC6643C537AABB635A197DB9BCF7\n4575E0B29FE895759AE7CA9BB0BF2594469B20FBA3127AE900BC85BCC13EB70C\nE15F3E3E04AFFF4E2DDB91BB80AD4D40D6B0505C35EF9A4C397AA5B266A69E33\n3A2E654170300FB85B62F1272608777BCE590F46875A052F4D21BF03F25519A6\n77B34ECD051315B4916C20712BAFBA4E5CE5E63E0AC99BA5012DFFF0CBD83852\n040C37C012FABFDFC62949E5B78980A04AE3752E3243C7288735F027A7EEE08C\n1C0174D765BFE3554EFB7DC5ABA7956CC617DFCE44F15848E276CDEADD450ABF\nA0F6972BE9F05554D7C6716B82072B5D6644E6B799303A0FCB9A848E4DBD8938\nF4208B219FBD7A2B3945D170EC98357FFF5F9975D5EB8440BAEC829114E66C48\nA0F5FD7D1BE2E936E42E69688490F6CEF117B571DE22E9159BD46CFE580AF02C\nB9679F45C3BB2903A56BB2FE4F24E2A203085A49D5C92FF7AAA385175C6E35E3\n03A661A237BA5B578C5C7E98A9EFDB846B87BAA61FC8DB946BC91F82ECEFC711\n79D7C9DCEE6B84BC8A0DB8C7DE4A0EDCB511831A24BD3917BF7444F686437D09\n704C97733A7A59D48F744B02AAB6A7CAF93C03A208FC375B22BAF6FFBA43AAA4\n104F64E23A8248AFC3A6FDD6A89708685DBCE0783C01C73787A9FAF9A41C9C5E\n67D6E664AB38D3FB3885CE8890151AFC9CF9EF163B5F4F2C170185F54774F5D8\nDABBD8DD3AE4C7C9A99B34D03AF5A3E7252DD6F02282C1CB8516B679921084B4\n2FF521021BE7E5D21664ADECEECF1707842C24465067C9EC3ED0E3A9C9513E4D\n1417E8C38F1E818F39B46A893A7736DB282E8154BE2EFFA6E903751F5312A4D3\nDCC57C56AC6C297D5BFA7BAF46904ECA6BED\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMR8\n%!PS-AdobeFont-1.1: CMR8 1.0\n%%CreationDate: 1991 Aug 20 16:39:40\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.0) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMR8) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle 0 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMR8 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 40 /parenleft put\ndup 41 /parenright put\ndup 43 /plus put\ndup 48 /zero put\ndup 49 /one put\ndup 50 /two put\ndup 51 /three put\ndup 52 /four put\ndup 53 /five put\ndup 54 /six put\ndup 61 /equal put\nreadonly def\n/FontBBox{-36 -250 1070 750}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891\n016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171\n9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F\nD2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758\n469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8\n2BDBF16FBC7512FAA308A093FE5CF4E9D2405B169CD5365D6ECED5D768D66D6C\n68618B8C482B341F8CA38E9BB9BAFCFAAD9C2F3FD033B62690986ED43D9C9361\n3645B82392D5CAE11A7CB49D7E2E82DCD485CBA1772CE422BB1D7283AD675B65\n48A7EA0069A883EC1DAA3E1F9ECE7586D6CF0A128CD557C7E5D7AA3EA97EBAD3\n9619D1BFCF4A6D64768741EDEA0A5B0EFBBF347CDCBE2E03D756967A16B613DB\n0FC45FA2A3312E0C46A5FD0466AB097C58FFEEC40601B8395E52775D0AFCD7DB\n8AB317333110531E5C44A4CB4B5ACD571A1A60960B15E450948A5EEA14DD330F\nEA209265DB8E1A1FC80DCD3860323FD26C113B041A88C88A21655878680A4466\nFA10403D24BB97152A49B842C180E4D258C9D48F21D057782D90623116830BA3\n9902B3C5F2F2DD01433B0D7099C07DBDE268D0FFED5169BCD03D48B2F058AD62\nD8678C626DC7A3F352152C99BA963EF95F8AD11DB8B0D351210A17E4C2C55AD8\n9EB64172935D3C20A398F3EEEEC31551966A7438EF3FEE422C6D4E05337620D5\nACC7B52BED984BFAAD36EF9D20748B05D07BE4414A63975125D272FAD83F76E6\n10FFF8363014BE526D580873C5A42B70FA911EC7B86905F13AFE55EB0273F582\n83158793B8CC296B8DE1DCCF1250FD57CB0E035C7EDA3B0092ED940D37A05493\n2EC54E09B984FCA4AB7D2EA182BCF1263AA244B07EC0EA901C077A059F709F30\n4384CB5FA748F2054FAD9A7A43D4EA427918BD414F766531136B60C3477C6632\nBEFE3897B58C19276A301926C2AEF2756B367319772C9B201C49B4D935A8267B\n041D6F1783B6AEA4DAC4F5B3507D7032AA640AAB12E343A4E9BDCF419C04A721\n3888B25AF4E293AACED9A6BDC78E61DA1C424C6503CC1885F762BADE1E60F381\n8ABB3D45547347BCA2454D6E5C6640841E2124FE1FB662C98CE18EB82274DD5F\n36B1788A5A23AC3A8E7A63AE0E29B83F8215270E28652C2A8CECCCB932B515DA\nF6800513426169F40E447D8605591CA5214DBA71880CC6C54400F8A61A924513\n3885D87B44303F567A9324A40C633254B5F1C6685DBC6BF169730F1DF8DD5022\n3406E2634BD476FED3A09F8E2C3EDC316312D173B98F41A0273EA2D3A7C76849\n7A8EA236DFB36C4F99657A3A8975D7C2DE669FFA11AB043684A25FDC37B5AB71\n1B977F162C4FCB6580F4519673A581E88B4C386FD8CF524348E03DF008D3F531\nFB25032387DCA8AF5C0C46AF365DF5A492D3E3740711CA5A39A7AB6390CE1953\n171F58AF76E37F900BDC979CEE1D8CB1DE4E20E95D4D991B5CA4C7C24CE1E689\n52E4B4A5163156E8A949962BF7A6A7EE4B40963A8E0F90C11F1CC5A5F1500E9D\nD562FFA15725CD36E1A6E671512054ADAB4D88C780561928C040AA9AC9765646\n79762EADD541D9759F6D2620D4ECF3260442D6AAD6C0F14E74C6F08CE98EDA83\n1222DB03EC45F96AE1E9952AF790867A697D0012408071E080276B264748C893\n967795C977D721B18693B0F8D323D614767F211D3AAE74D7F46B757127533A4D\n10E92CAD1F42C7EAA3F7CEC1160E390B98FD7E149B91489E0052D61A999CAD03\nF7DCE89194F5F358CB1FFD970ADFCB4BDD55C44EE30BC8E67E57526EE6A5CFBD\n7CB5D0D23786B723F3EB1874134DFE031CF7FEBFAEA8512E5A5C861DCD4ACDD7\n1037E20D982D33527A298440CEBB2D60A7A195A4A992B580F04A50655910B66E\n489698D51209515D5F2C96795ECB1A6C43372B737E817D60EF3E0405D22FC6F8\n9CB51ED09F81E85ABC81E3DF7993813B6E194E4C3EB81886F60FFA66EDB97359\n2CA854D165E4EDCC4EFEF68C653CAABD69092F185775E10F09AC45A344431930\nEC8BA573A39C46F5F7488595A658EC58E5ECA2DD3D3720E0F6DF82904D0C235A\nFBD9506D11040E4741557D9E15DCF3D6E6829E660C8B29078FA56649509BF4ED\nAF3AAC991BBA02407D1007288170DBBFFFA570B70B03355EABF1A2717250B3B7\n8730EBE47B90A1FFE5966AB5110A116E4CAA15BD6DE50BECE24AB724DF1769B4\n827EFB04F1036048D5C49EE0EE58F2B4E7DC0A18C7F228891B8F8B7CC940AB19\n4A2EB64AE4D3DEC2CB7EEB785D18B18FC552035983E49C23CA5EFD5865AE6487\nD40F017DED9F2BE48D5D6DC36DD5020B16FC1E41CF3A4FC586626AF02B228209\n3275081F7237EB2D76DF8CDED9AA7BC5A301A64A497896A090B2AA384736F420\nBB8B21B04DCF47187CD4FAAD743AC21D2A44EBFF0ADD1DE041A7773DF4D8CD02\n6BBCD4A2FAEC5CF70DC61EDC5EC8EEDE1DA52640D957EDF1E4E681F02C9E3199\nD92DDB37B5E4F1A444739E4000ACBA9FCC167BC2D7C2B6482372B2ACE19E8B9C\n139EB49EAEDD232DA4278A8FE65B1F22F345475683D95CF62270D89BA11E06F9\n46E4BDD5F9BBF31FE0E618BFB9F25F734B674277B963D994E68A676D8554527A\nA743A1D0EF22704132D080236ED3733FCF00CA45AB744DFDCC116E7B5DAB216A\nBD1F62A83F7F10DDCED52954477ADFEEB65A7C8B81EA9F930FE76928D4C53469\n86FA147EC1874BB9914EEE004CF862A585E59E860DB093B065ED1A9312E3392A\n43CFAEA2EC58CFBF0505AB7C9B82E249B012A130491A48B3C6683801B9784CAE\n929907EDF0CEED5CE3F1EC0E29C40243DF0D55B839D9656174201630BD82D8B9\nFBEFB895CE35938DE4D4A5A8ADC6F08056176A4135D12A1BD92E0965456D9979\nC7E03D3FE775358126E497CBED95B39E531E9DE2DB6B9210465D63AFEF88BDB7\n51B2A9FE4CD57C9DA23B15C5FA6EE8658081ACA3235FCC29BC1A4261AF9A2EC7\n1BBF2C2293D71157C118E9B62961D1244EDEC6B86120074BCA8FC9D90FD527FB\n2EA69FBA8563F9D29A7303B9D55591479AD38C1E3A1E4DEDDBB72B09C778673F\n48D4BA4259679119EF351C62436874070F49DCCBFA22019655AFC4EBBBCFEC64\nEB84357F457B9ABCA59F14C9A80B2EB8D5C034CA2AE569AC613716C293BD1B31\n34089CE09F980A8E516715A9286366FACEAEB2E75FB11323E82D7766A3E37EAA\n5AA06DAE4C1FC8464CDA371DC358229444A89923081AFBF1AC5F9FFD373E98A2\n60BF7180B200B8E9AEDFC6B2852243757CBFAC327B5D31E5CB75A537534F0EA1\n86F93420E77ACE17617504AB4CE8430291364ED73B7E8B1108F1816BBBFDFDE0\n55F6C438B0A38D149B2E83235ADCB035A93E189A27CD47D942323E97A2978B56\n394158F1286611574D833028781B3F9DACC40AF506117A2B5D81116688CBA705\n283F6EEB26924315D0A0FD60821D24F7897B4A04739FFA0043BA6F460FCB9DA5\n5BC406C2687CE2294126C74F9F791ACE02993CF5C9CD981944680490FEAB734F\n1752259F3375E558D42B0042D184FC2213FF6ABA6AEB8F3BE34A2E976970F8A0\nFA67D237C715747834D8B6D650A6C01EFF591105BA6A54957B96\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMMI8\n%!PS-AdobeFont-1.1: CMMI8 1.100\n%%CreationDate: 1996 Jul 23 07:53:54\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.100) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMMI8) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle -14.04 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMMI8 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 11 /alpha put\ndup 21 /lambda put\ndup 22 /mu put\ndup 23 /nu put\ndup 27 /sigma put\ndup 58 /period put\ndup 59 /comma put\ndup 73 /I put\ndup 77 /M put\ndup 80 /P put\ndup 81 /Q put\ndup 97 /a put\ndup 98 /b put\ndup 99 /c put\ndup 100 /d put\ndup 105 /i put\ndup 106 /j put\ndup 108 /l put\ndup 109 /m put\ndup 110 /n put\ndup 112 /p put\ndup 113 /q put\ndup 114 /r put\ndup 115 /s put\ndup 116 /t put\ndup 117 /u put\ndup 120 /x put\ndup 122 /z put\nreadonly def\n/FontBBox{-24 -250 1110 750}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE\n3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B\n532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470\nB72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B\n986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE\nD919C2DDD26BDC0D99398B9F4D03D6A8F05B47AF95EF28A9C561DBDC98C47CF5\n5250011D19E9366EB6FD153D3A100CAA6212E3D5D93990737F8D326D347B7EDC\n4391C9DF440285B8FC159D0E98D4258FC57892DDF753642CD526A96ACEDA4120\n788F22B1D09F149794E66DD1AC2C2B3BC6FEC59D626F427CD5AE9C54C7F78F62\nC36F49B3C2E5E62AFB56DCEE87445A12A942C14AE618D1FE1B11A9CF9FAA1F32\n617B598CE5058715EF3051E228F72F651040AD99A741F247C68007E68C84E9D1\nD0BF99AA5D777D88A7D3CED2EA67F4AE61E8BC0495E7DA382E82DDB2B009DD63\n532C74E3BE5EC555A014BCBB6AB31B8286D7712E0E926F8696830672B8214E9B\n5D0740C16ADF0AFD47C4938F373575C6CA91E46D88DE24E682DEC44B57EA8AF8\n4E57D45646073250D82C4B50CBBB0B369932618301F3D4186277103B53B3C9E6\nDB42D6B30115F67B9D078220D5752644930643BDF9FACF684EBE13E39B65055E\nB1BD054C324962025EC79E1D155936FE32D9F2224353F2A46C3558EF216F6BB2\nA304BAF752BEEC36C4440B556AEFECF454BA7CBBA7537BCB10EBC21047333A89\n8936419D857CD9F59EBA20B0A3D9BA4A0D3395336B4CDA4BA6451B6E4D1370FA\nD9BDABB7F271BC1C6C48D9DF1E5A6FAE788F5609DE3C48D47A67097C547D9817\nAD3A7CCE2B771843D69F860DA4059A71494281C0AD8D4BAB3F67BB6739723C04\nAE05F9E35B2B2CB9C7874C114F57A185C8563C0DCCA93F8096384D71A2994748\nA3C7C8B8AF54961A8838AD279441D9A5EB6C1FE26C98BD025F353124DA68A827\nAE2AF8D25CA48031C242AA433EEEBB8ABA4B96821786C38BACB5F58C3D5DA011\n85B385124C328656E2B13AB98D17831106911D5C5BF7D7FD432763164546B5EB\n3570BCAAE80BC668FA0510F6E3BFCB75E4480DE86AEA1A174807A01F91893892\nF9321A0BFC18E50AE47D92FF46A3D21E4981C81DE37B8306485CF54D198F4896\n09F86990F4F6384959C45695552A4AC396F40F8F3009D7AADC7B7ACCBA858142\nE467602DA40FA9A713EE047D680ECD21EC90EB952B0DF385036A21AAE9F9753A\nAD6784BBC881C207A454615537123EE1A7BB4B37FD3ABE0BE320F7924F293BDF\n46D60E640ABD94B756FF9E670B198B7321A07D71591ABF0E646823D559D07EF5\n8E7DA1DB7E2C996794B832425C1316B4B084AE474CFECA2B0DD589B2BB3E73A7\n5DFFF4D892E009A0E708463D8B55FC7A28AD7943F5732B9DD5D5F667BDD8EB0E\n5234BBBDD805A688C1238961A1874C6B3D14B683B7E218D7EE683D48B3AD3AA2\n6FD5E179B30891BBDE4BDE74B89FA17F99E6E6555945DE35E09950E6CE862CB6\nBA88BA282AD09FD4FBAA47AFA3A3D198012133087E98C6F80DABA15BA6BADBBF\n089C5F4CA85C546D44CB27E90CB9C79698C0F41BFF80CF93176A15B7FFD543C2\nBEDE5A7EFB27D843C09BCB881D99D7D19EC43A2B2CC59BF67746C0A190DDC16B\n921BA90F7B69AB2A896B796ECB3E50846987554EFA56307B76B40AAE53A87A47\n611CDCF6358B830E1FC1D95C4EFD773F9A28F02406E595B389402314DE2B8DD2\n6B4B20FC50E12DF087A98949AA87F002A016DE5FFBB2B802F84094B22229D508\nB078A9E26376947BDA6BE8411077A404709CC04ADA1A5254022BBEE5538F7AB7\n00C12ED7B2AC3F5E3874D9EB7DDD4EC58F47A4950DA40219D544DA4F97051894\n36EE5E35F0B2CC170CA80FEB6191F3E182863C989FD4DB1E6179FE1877A2CBEC\n866371782E707021329C49BB4355F2057D5F96803920D8FA3CD63C240BB70C2D\n0B5EF54417017C07A2181D3B1195115FDB6F22F02D35165DE1310F22191D849C\nECB46792979DB6413A1E8EF6C3083975453BA8E01CA992AD57671BC4B94BB2B1\n8AE57F704341796E1F020C672EB464208FE45243B7F51ABCE89886AB084A96E3\n47DDDAF38A5A6C6E8F2404D2FDCB4FCA2D9EF263F9BF79C70961C85C8D16C0C3\nFBD49E4A79DEE0CD9302801DE8309479B872810082FFF4FEC586D1A048E6522A\n2A670E6815D2F8F2781600D15AE99711A0737ED9CB0901A8119669E986D27C6D\n87A6F69D51E2FD1AE02D61D95338E4BA123DE3AA7F7323501B3BEE7A131C2B81\n2D058BB7AAC892EE59E475AF7F5D2421476C1B53A9A6A69E9524B5C1C1F09BE6\n12F4618373CC887A3AD250E4EDDA56AA0569FA9FFD2CAFF09A851741A4F2D822\n8306F8333B37801B39DC3258F796F77D1515331A292D659C9FFD2A71C42A0A62\nDB5FE4D12B2E8EC46DAAE6DD28A2876699E37AD21CACB2DE26719367137F7DE2\n846FB88390E6F5E08E614455D6D9A578813C3197240AD78AF2831AE831B83447\n35E650E16E3EA71318F4B183D2ECA82DA0D20784637CFC088E34D0AF0379357A\nEE979CF7D9EB0D6540A88E18894B68873C9BF934026A574A163110F9CBA14C8C\nC15634C354FAFFB279BA586A4FC158B262EBB1F14BF5F5E58C9FD4F9C867DC5C\n3A6CA726DA9E87CA367C5A5E26406C1B6736F3731A08D8B775850F7FD90DCE5A\n51B331963223AF6F1FF9B0E13C4CEC64040B62DE5433A4CFD1D6D352ADEE1CDC\nEE2CBA1E4C16BB6F3CD07E11D81B99400608DF9F07F372B31B9369E754C0692E\nBA084E8D1255776BB9C5503B812DF70E00641EB9B09221D36F84D23580A1E948\n6C3A72CC006708F7294C639B520866C0FDCE4CB1C474A576E735FA85FDD4B377\n7FAF28C51F5BB3A14592E18E794406F2D547F5DF4B1B1DD59C45CF3164CC30B5\n40668C2D3D589757F22CCE333B566EF1C0C802639A206ACA9E2865191FAF171C\n8B66896CB87475BAB01377EA5CC0D4FC2CB7EF31085C8C3AA9526C8F0DB4B47A\n2C763264A6991766784372A15A72BD15956A5FDB3F26FC30D40AADBF3328EFF8\nD8ABE9373EAD9BF6D7D2268D61B41179907883021BC9D8055B9EF1440361616D\nF0A7DBAB77EB242C1EB73A1D3C1A3F9207DDDD813C3C99DE15F64DD9335454E3\n74BC46E7BDD5DC5A4FC1189D177EEB7A9ADB31FED29D29B5D0FE00A197AD358D\nD7F528355ABB634CC3B00655A84D3F85486A4CF13E0A7701B935669F1DB7CD86\n25163C5B5392BFC8B1D84768200CFB6EBA7EF48D9BE7DE4FD9D52AF3F42D914E\n45246E508ADF013BC778726F9C8385E58185E14AEC6A824EC0274DDC05405F26\nE4DF03CB0454EC55C1FC808E1486F3D8435397A9BA183E9C25B7B7A9826309E2\n7CF4628BFC143932F7605487328A2ED1D5CDD3AEE261D57E132AC79D4D787C4E\n4C11A18D1A1154188A2FCC6EED3C6FB45DFC4E87C41E6B6BFE407CE5F87AF773\nE3B3F61EA1A89B300ED3E4EE85E25B9C324C0B3B18DB470AAFE2BC7F23180613\n2A5654F2F3F1B86F5191787AAEEC6622C6BAD4D0848BF471DF9E2946EB483B0C\n9A1096E00A04373B017338475DD692F03F2E03A43EA643E06A16490905B17FBB\n66078ACEBB0CBBD0E3EF6F49DDF78DEAD7C698CDD273DB28C7D051953379D769\n36B8393FCAC4834C0A76955CD00D56E34A7D0FBF4788ADBBDC2951B2DA7DA00F\n33B96A7DA7A7653935D507776D5AFC122E78DECAF64177FF8486265F4D225650\n23E1A54FA0761639E650772205E00784EE78552F1096F9789B2ABDFFCB8A5C0B\n123EE770278E845E95FDA777648500492EE3B2ABFA8AF896EE05D2CFCCE0A1B9\n60DD7C66BF2E1072510599C6A0FBE6EE98D03E31CB0AC90CF18F6DE29CB106B7\n9DEA8958E7BEA68AA578D6EC6AA60AAF4BA92BDD0C46511ED468209057D80D18\n09D888024998EF91AF5EC40A4E974B64A887B228EB347DC8D44DD9C25E28724D\n1C34ABB34B890FEA7E85C37D9A4450D17C9AA77A4E5D6BE437CD902FFD57C2B6\nCAE87953CDC45049AC1E479DCC0D66460A9B5ADCA7337C3EAF7FD1FD96270FBF\n10844B9A9C3535CB7B2875507FB90AA358CA3A026ACA859C3408749D3A3916FF\nC3006655FBEBB36CA138610CCAD1DB18E9906CF9030971FB4F6784A3936159EA\n4C6304DC2439D2C726917CAC0A29A204D1EA60A56E865383A8425B2932875D6A\n82C4B88380006B5924C22A22C1F0003EB5CC9408450BC614CF3CDB05EF3157A3\nF4304322214F85808DBD46634B2E0D834692094B7995403D4022243F268EAF62\n72045A50D34F7C24771503A8299F1D2992C494F8926FB7402574883E76275BDC\nBF5AFC92B03E6CBC8A9550AD69BDCF9B9E5D6FA2B58B24896A715BB799603FAD\n63FDDD031F379BBBB6637014C4196F3326E64C5C6264E714697876A459D9B46E\n55664F6009692D9EA697103DC147544AD51C121AE8747598A3FC0F273D0BE5EA\n1FD7B5933B1E6A3370C8346FD67AAE7D2259584269416C17DC2504C118EE2011\nE0088091CA6EA926C1135CF80BEEFFE9C1EB8173DCEA2A68C100DD54ABD7D72F\n1BCFEBFC8FE5BFE0B8BBFE775B4A2337A7213FBAFD90D0F9FB9A8CAD6F8153CB\nE499BC5BD24D60E1E9D8B9CD89A309D15871A364F8358B61D585D2E537C71FB6\n2CF449A9150B04AD996740E004DFE97B7B4BC2A285355B8FF3E73FB4D26C4038\nE9599B8BB9B98A524CAF49BB6EA56B7F00B395E062C4AF369DE40359C889A8E7\n3B6AD4793D9DF648833ACF0D4E1A35D61AB286235F1D0ED0C651ECAF74BAD7FF\nC659A3F7A5B75F5E031FDC6DADCD7C4180A8A620F9AF4EF9696449209B5ABA9D\n221EBB323A2611E65E682386F263C2FC8E19D1D99C1EC2EA68CD85DF3EDA8C75\n1E24541591E71477501DC9454D474C9C5538DE228AE0707650E480712344D9DB\n0E839C7C53356E776478D762908F872D8C7FA02ACC6FB5598121D19A40A7A843\n0409EEBA1A5EAB1E3D004030417FA9531AA04FF2FBF92857055652040B362A70\n0252DE4C93B0ED331CAAB07EB840747C14CAD4BAF3D0A6086CFB6D085D27724E\n3CB90F837F0FF9C240729D1B1E6572F551FA3AE2D2037DAFCDCC7721962FBAF6\n175FFC6C65ECAD77CCD6EBD0DF6DDAC64FC929BAC426FFBDA169C70A76CE54AA\nD0F2784ABB9271B319864C0F8659B9EDEC3518E46B60FDEF5A4312CB65EF8923\nAD9806D1AD3521BC18DB819BABA2EC3D14CADAF86EF81FE841F21903819BC236\n2C7B41FE0238ACB49B23C09384807CE212998FF344FD3CF430EFED74C9821B38\nDED7141F9843963EBCA56869E0115151672E17822EE677674D47DC1FE57A52B9\n20E2570BCD5573AC4F553B60F6226FA69C9AFA96E2FDF232FAC4D53C915E271C\n2ABB85BD9A496753D7DE50BDB7EF5FC4CD0FD6CA9442FCBA0A97A426A1F37F3E\n5D73010F40D7E9A021F1C12D268B83142DECF6E682F8F3E081C6F30CA511F16C\n13DD3A20BC99DFF4CE47B61B268EDEEBB0A79B5599C7AB1C1DF87A035ECF9575\n84F7C60758773A1563F95781F99E8405C337F27FF349D560BAD8C46199A6714A\n35718B03372802F8EC7B342409F648EB03B31A69847BEC91F383272555241306\nAF481ADB7E74456E0C91EACF7BFCD0A900666A20F5770F8AEC30146547DF0E69\nB07AFBD10EC884E2FB6BF4F3E3D4D87B60C049E3D3F470DA78B58871484D18C0\n6B2841940EF1BA7751B0A9DB5B023C701B5A894C2E3AA1ED679A9430227D19E8\n01A59433EBB5DA86BC996ECD92E18707B85C7F8BF47E69871FC6141C371A0EFB\n1C9A43E0CB4964D4CBA254593C3D7BBFDD752669CE8DB28132D2C53438CE0EAB\nD18827D11812666B2C4B77C7C4A6CA0156EF24572DD63FB7DE3D4084839676A1\n0553C14637C9F6CE641FEFBA0ED4D0FECD9EB00547DC2609791C379FA03E629B\nAFB368B0DCEF6B0B7EB9B26ECF2D83E3FD4C4E45014C8E4EBEDF358DBE4A1FB3\n4097ECB49D63780C8143A26A44EF8E653F2AA187049821E2326AB588135C7F81\n050D89A98BC602419D040D18D9356001C6B182BA44D3C9C1980DF1742DAA8791\nC996BD2A217744CCAA519507F2A18F1CEA90ED95EC58BEE715D6F11ACEFCDD65\nAB486639E7457CF71EDBA42B5E0B9CF48B7084F031F73F933BFBD2ADF2A000AF\n3E1553430DEDEF597664E4C8483ECCA191CFC2937A751B2A8B9D40C70346A300\n6DB239A3A6B9F4AD2843D69D3A17AF74C31276B321B798B33289E1C8DBA576D2\n9398DBDDC51E80239C7EB410351AE69FC44A806D028254956FF1FF4D20E48807\n349E14181D1EF163A31C55B8B2009F93BFE0A4219B6D8DEB1E4E3F92F145096B\n8B0F1C455919617983A18ECFD991C2ADC307EEABF7A49D9A3E4C61B49376CE63\n39713C50F1C6F9333068F4A22F7E7B92CE670247FC2D7CB3CC1503DC8AF8709B\nDA7C613D83F636A7138521DF8C520606BAF7E00CCAFD9FD8ED31EA6839CE8D2E\n4B48BF5FD7C208086CBFB51BB26E7CAFB23FFCE3E2D4643EF5D78C08603995A0\nB143A446B7E0EA2728E0A05A47039CBF3F09D4E4FC3C41796A6BACF272A57661\n67655833007D0022BFDCA1D0505043A4A6C785C8DA81107DFE2DA322C35E6E53\n3697247DE725E98CCAD41F6CB2A7BBE05DDBDFB5975C34A3D7398A4B2B3AE2EA\n6249B8508F3A3EA96FF56E50CD9B7B5B4FDB8818B92773C2E72BD8BFB1E47FF7\n6FD2B4B75FF7B54570CC5D26969A98D333D460D5D251C486F1AD1169CAB55D27\n3217FAE53C24E1C7C52F0052800F255FD6D8146ECBCB4A3F4B2FA9A25805BB3B\nB0ECCC87DEB4D315460BAA6990559BEFC63C64F65B1C4DC45350E50F9F66A43B\n710E8B20502C98801D0EF0141E24B6C13504815E9547B03C064AF5A815CF68DC\nCE52B16CCDADA65F32AE02D0BF410DD255C919DBF61D79FF44EDA9FA1A2EA610\nBC5B01DD2FAA8B8CB75EDBAB3E7B8B84617845D54E0612F330568FE9637DF364\n1D453829977B02FAC36600BF15209CB47448E32A687CE75223B05440C53D8959\nB9BB84FA65E337A8B23C2ADF605EB5B8CB0D6339592BDC2EE387DF38E4E1161A\nC4875462BD867DDA49041C88A68050EA80E0C236D0CAE8633A3D9F00E8D9C730\nA6E4365D60D817A21EF537DE53677957277A3B3F28B5E86E4222E9181C6B1D63\n982022B8862219138120802F72A9893E80F3B9DFA30769BF0605C0FDDA9AA983\n445D923306199EC57FC6DBE0E86613D401D8525D139A7710C920D0FBC5AD3CB2\nF2DB4AA4AAF1D20DCB87EE57679EB24BB7751A5DB1380E7B8A8B4D7DBA1BF9CC\nF3391AE975997E53A6818BF7DB1A37BB75E78692B537A06FEF0ED5E54A3579F4\n0B40D0CAB071E957E5D26CB110D0EB766C0DD7CF75C664975477F0EF3277A42E\nE86AC17D2D6481A201295EE6AC2176A4B4170C6B8B2CD3A3DA41ABC0F8FB57E2\nD3CB94887FEE6A2D07A332C50C17891909E6BFE9EC316100EFB0D0B6D77C1268\n2B84AF13921424C78A346409102C9D2C33160D4B5AC5E49599CB28DD9CB83804\n466E5D7EFD1DF90FE66E0B6A877A67CCEDFE7FB7BF86FB086334016EDFE7E69A\n757647D462A8D919BC3DFFC3D8A1094C716F838391C6D2AC9F29499AB7DC7196\n5052F112DA4EF8FBD5A5AFCB393636DFD4768C6BE3F070838EEC3AEA6E6F3F9B\nF2B66FA9990CF9328CB130ADACA0834E3DAA5999DAD949700A248589C642E7BD\n0495493626C3296B28EDC6603DC57747C50A050417EB01AFED8FFDFBD9BC00D0\nD73EFB916E9379A4F8BD101D214BB5E468B4920EAA6B146FD86849FBB97FB35E\n1867F1192A057A2642DB6F3EE6CB49216E64C03FE27B8432BD50ECA54C45D028\n281250A7AF0F31AF1D3C5E84BF84FEA3B7A0E0E01D452DEFF18665EAE17DCAF1\nCEE234ABFA5D8FA7271243257A370D8DFE04CFBDF4BAE745C4B91B9CB4B8AB07\n488B71B0CBE90492D98BB1669FDFF73462DA81BA1578E8027BF834A044A02089\n3BEC6487B2DD7AC1E57C798DEB5E5D0A83162D3014B904969990051EEF02FC0D\nC9A3DCB1F8CD3B8EC61CED5E1A9A5BF68F1F44FAD97AE0D92C9744C0E07A781B\nF5256C6815C91144848011DB7A236FC089205AC91A47619CFEEFCB674C330F9C\nA70DEA2CE98C6F089FE2484F04EABC5DCF39E2EA8739BCEABCD59B315D1BFEF6\nF181C162B34FCA9BB5CB1284853A3BB8ABA0F0145F5CDA1C76851472A75B8314\n05175F4E71A06B4B3D8FFE48B1C55312419D057787BE90F4A634444D7E6C9D6D\n2E016D54EAD29C05FFD37EDB27639358E5385A61C128911CD6EFA98CA8D7ED72\n5775AB7B49F3039D337047DDC988013BF0423428B55222128587F495812818A2\n0F152CF4FD91EA7F0B46A523F6EFA700673055F7065E1D52670397CD0C6EE103\nCA7F86D3FD72E19435EA1177411490B7EF1B83CD45906021BB66B0C2DD0E20F5\n40AC16B1410005B4FD0D3E3EFD8D762E13FFE7C50ED64108291290BBF8333DA8\nB4DB790B81E8B6587C30C95AC74487C8DCDA6E912E801DCBF7D879DF4F2E0C45\nF87A6B9FC3A68301E9F3B84C292A9D3A5E8A9B0D5C485275B0D5C903F683C969\nF6FA75BCB3D4E720D06D70558D3D6AC1CD16210210D9B1F1D0D4150E06CF5DCF\nDEAE96BBF48F234C248A65155EE1EE6F1257B818EA655E285272037D57F85F57\n6F908DD22B357E10ADC4BE48DCCD8D8EF18232EBA674846C69CB087269A53809\n605373CFC49A4EC7EC5B11D909E28A67B0E09D0044588F74BDE03D8521D47A5D\n34E5DFCAC011C33F38847281163EF499A03821FA37901E81C9E62C6D4107830F\nF3744DC2931F210ACEFB8E1243198332E7CF9F6AA654AA41418ECA352E06E35F\n98B96D856D428DC4BFD7CB6A5942561918B9CAA0403E8CA5246620021A031EBC\n3C8A5F9DDBBF200F2AF2E07B697BCE5D45D71CEA914A4CDFDE4D2A1ED02791B3\n565443834ABF18C8EF5E67D1F52EE2F8037FF58EBF9E6F8A5935403675CE7C05\n806EE7926E4E22A222D2\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMMI12\n%!PS-AdobeFont-1.1: CMMI12 1.100\n%%CreationDate: 1996 Jul 27 08:57:55\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.100) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMMI12) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle -14.04 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMMI12 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 11 /alpha put\ndup 12 /beta put\ndup 18 /theta put\ndup 21 /lambda put\ndup 22 /mu put\ndup 23 /nu put\ndup 27 /sigma put\ndup 30 /phi put\ndup 33 /omega put\ndup 39 /phi1 put\ndup 58 /period put\ndup 59 /comma put\ndup 60 /less put\ndup 61 /slash put\ndup 62 /greater put\ndup 65 /A put\ndup 67 /C put\ndup 68 /D put\ndup 69 /E put\ndup 70 /F put\ndup 73 /I put\ndup 74 /J put\ndup 75 /K put\ndup 77 /M put\ndup 78 /N put\ndup 79 /O put\ndup 80 /P put\ndup 81 /Q put\ndup 83 /S put\ndup 84 /T put\ndup 85 /U put\ndup 89 /Y put\ndup 90 /Z put\ndup 97 /a put\ndup 98 /b put\ndup 99 /c put\ndup 100 /d put\ndup 102 /f put\ndup 104 /h put\ndup 105 /i put\ndup 106 /j put\ndup 107 /k put\ndup 108 /l put\ndup 109 /m put\ndup 110 /n put\ndup 113 /q put\ndup 114 /r put\ndup 115 /s put\ndup 119 /w put\ndup 122 /z put\nreadonly def\n/FontBBox{-30 -250 1026 750}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE\n3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B\n532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470\nB72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B\n986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE\nD919C2DDD26BDC0D99398B9F4D03D6A8F05B47AF95EF28A9C561DBDC98C47CF5\n5250011D19E9366EB6FD153D3A100CAA6212E3D5D93990737F8D326D347B7EDC\n4391C9DF440285B8FC159D0E98D4258FC57892DCC57F7903449E07914FBE9E67\n3C15C2153C061EB541F66C11E7EE77D5D77C0B11E1AC55101DA976CCACAB6993\nEED1406FBB7FF30EAC9E90B90B2AF4EC7C273CA32F11A5C1426FF641B4A2FB2F\n4E68635C93DB835737567FAF8471CBC05078DCD4E40E25A2F4E5AF46C234CF59\n2A1CE8F39E1BA1B2A594355637E474167EAD4D97D51AF0A899B44387E1FD933A\n323AFDA6BA740534A510B4705C0A15647AFBF3E53A82BF320DD96753639BE49C\n2F79A1988863EF977B800C9DB5B42039C23EB86953713F730E03EA22FF7BB2C1\nD97D33FD77B1BDCC2A60B12CF7805CFC90C5B914C0F30A673DF9587F93E47CEA\n5932DD1930560C4F0D97547BCD805D6D854455B13A4D7382A22F562D7C55041F\n0FD294BDAA1834820F894265A667E5C97D95FF152531EF97258F56374502865D\nA1E7C0C5FB7C6FB7D3C43FEB3431095A59FBF6F61CEC6D6DEE09F4EB0FD70D77\n2A8B0A4984C6120293F6B947944BE23259F6EB64303D627353163B6505FC8A60\n00681F7A3968B6CBB49E0420A691258F5E7B07B417157803FCBE9B9FB1F80FD8\nCA0BDD85D3C2CF3A6DDC67A646197635C1D6B948934FDCC5B7D8E3F720EC19A8\nC6B0C72DE2067F7779D9DA069D7D8DC36EB91BD741439D5D76D25240405D1C76\n077A53626EC60CB508E015D44444FE86003E4533BD709E08E283462DDB1DA9A7\n4CDEE023CF7433FE154DB5B42D99A546A9C622AD68095910B676FCA8DE190C84\n2FF16BC1E15B0F0740A078BD25BC132B31F00E04540D3786C468C3FF6E918395\n439A0A3BD9150BFE353797819F198C0617C2A85DB7429BC242A5981F57A04FED\nEFEF1CB13CB55F4253C6BA6325676553C9502D3B53A05692D66CEB5F625E9C53\nBF525AB40761A8B873A7339DEE670AD4769B9E763F69F5F53EC8155AB8D6C978\nDC702A7278890312F6E32B536B96F771850BE79F5E02487256894F682FD1B0C9\nF8C7885DEDC862708B911D99E516837EFEF9B9024A1CDA37184E620C8C9F2834\nC6AC70503BFBF3F5EDD55204D209C86A77879D34C36E59DE98409CF73E770ABD\n31B1A9641F630005FA8402278C70D65C67915662B647E711B6DF6F6D0CB307BA\nF51F2CD2C957DA46212A8EB47677299697480D55F741AB2779ADE503EFBE1DA2\n772892E691EE8576E76EFB0EC7FA4A9154690E3F2ED8BD1AF09AC4E8A0BD65C6\n811F546EEFFE498C6353DBB65EDA98ED92729AD8205FF0F97C1192976B4797AB\n3620FE665809102BA71088A0070482EBA48259A09C4C04E9F90BCD8E5E60BECE\nD3A270530780EEA08AEC4786551B7514AFDF162F29E38E430E37B4681B2FFF55\n821DA4B42857AD100CDB4F956FC06001C3EF17044AE263A05A625E1AEF50D37E\nB50DB3BDC0B3885D7B5814214BF678AF1DE890B028A25215951D6A3E572DA1E7\nCF8A67B158F34E426E865DC8BAA0362B0DFA26DF487B9A31C84959454BA332AE\n0EC4103772B8B1F7A7873BC52E01FC260CE9AA27853D7BA7E884BB9CCD893978\n033B9E0B4780B82528810BC0BF2E27A0174B3CA762D525DE3A1029658AAF8D10\nBD22F8C86E456626E499AC0280394A39244AB036577C11358DB2D4F72B5263B6\nCD4EB0C76133C8726472EB129AA699D04482E88282CDF8F5273613B6726BE32E\nC58053EBFF6D7948583BAAE5983F867505121895B8EEA1493030E61D657AEA68\n676161C95E7893EC20AC1ECF1D1B51CAAB0D55DC39D1D4ADBC4D9FD60DCC60DD\nF688D62F0E569C09C3F41D5F11A66FDD2DB39FABB0834694ADC569E8652BD662\n24277698189B7F461C93939266BA36F7826481C83DD53F5DF39AA81C0B0A1F77\nF2D9C969143B5AB534462FA528524540DFC975F7685D9CE55F40E46C71ABA8D7\n4106F94FC66AD33FF8D90D0C94A026FA05DBE6AE155048B1CE0A2BA91CB7EF5F\n6946D72F1C6BBDBBEF12EE04879CDC6C3EA4D21237EE300D63595A1699134692\n83A2482832117D1579C0AD2156ADFEACC2071B84DBF90F19DCB4DBB6F5942FB9\nA80975A229FE7EAACD8F2E1C48F777DCDCECCAA19C889C453666088B5E0FFB33\n50A302A78C6E520E135989E18A1593D73933D3B9660F4A92028CD69AB6F54D1F\n0BA0DFDB945BFD0EC1B9754DF7CA869417BB6BF5BE0FD8F6B21C31907596BBF0\n98C931B12134619AAF1009640D046FA2ADBAF57CFCE5FC4778B6061E682EA17A\nB4CC3FD87F1A1F19AFCC1CDBC3A688FC40D3721C47F2013D8BA04265B980BDD9\n7E9A1309467F713224D393F5BA116FE3CD5FEA5CAB365D56803C456F791E4986\nCD6FED4DB38D1EADBA6D762A94FA57891865E3BAD4293E9AA7D968D1DACDFB62\n546BEF636277C82F35DF97A5055CC9234BEB849973B6F66866A690B408AC570B\nC0C9D09E6563E9FED740D41A6C854309632AC2FE26BD23BFC89CEA715241FFD7\nA3C481554D3BD39D0EA8055579F7D47375FB766BE77586A4CACDF2C8BA5A3427\nF44D828146E4C7B1E2BD5DAA55ECB8D3E03C163A8180F36B0027B74BB43810E3\n5C8C3278A92333ADA0378CCE45F5B07303DD639BE829C961A0B1D41E83A58D4E\nA921D21790F30F7DFA2B190C2E78890F3097E240E0E0421E4BA2D6F90FE2A5A3\nC8629EE89534BA6BB73F5283AA4CD704B7B65850C76A23FBAC6AD4722C2185C9\n0251A8ACB0B67FDEBBF79C763117F7F99669D7C9F8BE189B22BD6648EAA57561\nCDF8763CD37ED471728084F900C5D81785262C24F5257A3314D6CD8808BE6F24\nF06629F3EDD6AD52954B7643ED26994BD614320DA5D2C3C29DC72E9E52A8D292\n7E47CCC8BAE12E7FB017E9C02C46D76C5F0BA3A592B2395FBCD27567E727CF08\n61C93DD1955F0C0B60423C732F36869B0BE73580FAFCA8A08C5E31ADEB1508C1\nF80B51A49E7BB45695CBC90AAD7F7CB3AA31E63F8BAFCC58493FFF6E3C979CFD\n92B5034724F74E31EE38B99453CF40233B80449613C4A072084F9727C073476B\n0E2EBAC958CB8732AA280174F49E2235785BB4E91A2FA1863F53ABECF239AE8F\n346CECDDAD9E303F2EF1B7C65A74A208156F035E09B355084E894B7B959C00CE\n86AB96ECE3ED3E3C76B3D00576A5F73F4A1FDB1CABC8208850E585747A293760\n48436DC9F2E2E1C3C1C990E41DF66B5BE8BAB00752491F738ABD0579AC5FA4F8\n9DCE0ABF688D83F100F462D64DB1D5D279E5B41FD4FBCC82EC7A51E76640C781\n508D4EFC8DC7E1A5E84A26DA4A680B9310A922A34A7A458C215E5E702B4CC7EC\n2DC8CA4307D5964365DC1DBFA8E82D538C33676EA854A6CF6D8537C314795EC3\n409440731454777F92AD094B7BF1FCA5A07BCABE1E2351F30FA3F9B1F7F058F8\nE0CE0DF5189FC50485538EC3B4EE9EBB3AA0D918D052E7BB698C615C1CFB21AB\n17E8051E47011B6532B9FB207F722687A273D2B1ACB30E31983C146A64545CAB\n1396A55C4D15B2486FF96AB21F8AF61F74FA79912035E664EA38C724FA358C51\n54F2D9E2EC0AAF58FCBF92E78F272ABF983E4E791CD19E56A74EAA4EBE7DADF2\n6C82DE94253FEBAF53255C0EE031BD91D761DDFB77F16C4168F814105FDC75F2\n01C6FF72ED956A6F20633A85BFF70F2215E983740D6BEF25C95103D585ADD2AF\n623D091E6A60D4ED6859EECC16097B3D98A99DAD047CADF06A09AB5E72553974\n500DCBA328B55215303663E140BE5819651E66D7743E5DAB9957099B9C664A0A\n0EF6DF0596F24BF4227F1D59ED4089CB7FC9B6EFA1751F20CF2DBC1ED0428D31\n167A71AEAE34CD2BC7237702D7DF9F1C8D880725D9FF20F121C2FEEC1DC2CD80\nDFCB0F9C1986B85F4D64423FBD62696B6C8D2B61AF69936C2101AD23DB4A056C\n0BC6F98629F4E2A43A5B4D7F49FE62522327A49194106FB887B1DEE4319848F3\n83966269844132FB2AC1EFCC59933FE80FFC2C37BE7A57CCC1638588E0B5A2D7\n330BDCE5FEA48CE1A98909CD861701B236C75FC160954A3CE86B4A799AB15A37\nB71E3F6F102B61F78045E971258766E03495BC8975867CCBEAEAFC25506841AD\n52B6E655D90E904ABC30BD7E8DB88D16337CB632F903F3674DBF991254EB9B4C\n62B3BDF127D8EAE3CE0EB3D619BF556829FFAE8D7615E5596C45CFE69B24AD4B\nD3192E285DC289FC474F42735ECEFB36AF86A131167A77225D7D7C8ECD518774\n2665DCA8A941573DD265A2119DFF42A9724AA260EAF64AF9F2B916AB12EB57D6\nAD7F2F5BEDC8B7B200468A45B4F9363824C0BC848E4A7D101C21E71116B6EBB2\n2E19722075D083D04D3090DF5884B7CD16E6A72C81845D9464D9C80BCEB142EA\n36334C6A5C5B188CB5B3AC839C316FC7EC8AF46204055F43D4618C697C7AD8D0\nFC128EF50A54A158625BE6D3FBB78C2F635B19641392BD901C51A04B153CABCC\n4141B165939F59DC7C03D3E184B6E4F9C8D096A68EFABEDCE5B9DF8A09708A13\n2B570A048462B216626DADA452294B5ACBF8006FE08A1C1BA21D1E8F9479AB12\n52B3111AE97A60A6BE5BBA9CF2C9FF97BA1B68276F040411AA7ADB37A345D1B5\nE40290CBD74D8428F9B403E096FA40F51227E2E8FF213EA52EFF3D6DCAD19DB6\n68741F18983EE7B89489FA1211E5390ECE8A1BEF8029D40FFC3E351C3560602C\n0FCA9F0EABB86B9028E817E4A6613A93028996FD68CEA6B60DFAF415C38CD4C7\n0F3C7FC2F680E05A69C529B392344B60A4FF9893E332C71D81D16694B6D51D9B\n432D5F9BA647D15E2D69FF94F2DC164418A8C3BEA86045BDD11EE82DFCE64B06\n58DB6C9F3CB4C373F215E0F832BF4AA9B0DE138F8423B3046219EEFBC1C82A92\n41C0DA08E433497290C3A7FDA402F6890332064D761363B98DD3A65513E83225\n0C3AE28C5867121B57106CB1C60292536D71FCEEDE33566B179D5A7ECA67E8BD\nFA2E0F717D998DEB0A8541105148E0A04F397CF4DF7124C985832065D236B4E4\nDC6FDBF302757B1AF857708CC28C527E9553D7DC72B7467F926A100BA5D48D20\nA8B63A26FA17DCB650E19850F84F9BD9B5A9B5480D4376BCEFB8A5DCC3E0C511\nDF0679F3632FB12ADC4703281B0E611147B8EB508B279E862380D0ABAD211A5F\nFD6AFA8267B5D6CE550BB7AA2EA19BE1269953C3EC0E9B8EAD64B26D32F5242F\nA3DCD5CDD34D0A1BF05DF5B0E717FE903CDBBE7FF87FB783991F6A362873C1C2\n66E94818B6966A5050D97E9758EB7DF1977407D353447B86C1ABA0CFDF023CDB\n6177B41D9E34933178235DB18625E24831C847422C79B4E4F022C6BC569CCB3F\n381C43CB16BFB2A5CEB92AC495828E4C64D49ACD916C7ED525EF3617D24D9262\n712709A528103E4F13A0963DE736E72D9BB4069BB993A295BD31AFFA381CA925\n2DABD861FBFDE7F1CB6E38D7096632B8B74923D13085FC7BACFC8482AF54FD2A\nD6E8AEF947018FB8546E5DDAD2E7301FC9A6BDD70D6B9BE68B2078FD915F823F\n276B056090289110C4259789AB3FC8C9BA324C2A14132FFF7BC4CED8E8C97B4F\n5109ACDA13495A8C832E067D843365A61EAE11CC88529F1074DBBAEBC8C9DC85\n7D092BEAEAE77603EF90E09D3A9D5280873E60D8EB2F706BE63D03F6FEB74997\n571863FE1DFD20BA1712D9D1BEA9EA0674D28076050341601528F2D9BB56769C\n60BF705E7D99EE909E1FBDD9257A2D131E7663B4675AAA41A5C25DEA84B60252\nD609E453ADCE5A42719A635947F887886A92E21E88807AFF0F3779EC42908AEC\nB32314FD8574BB96F7C7DA568A2B09C35AAB8B15C4FE9285AA19F69B4B6C3D89\nCA10BB26084B22562B2E2E11A66497C19405FBE3EBE9BE9A4BDF53B53795978E\n3A2BB2F4B08E2C48993B68B144739FE2999A2899F51509DA6A83DB0DB94E6C7E\n86B14FA90B548479A56BCCF8B1659B50C400B34E5407A976464CB41CA3ACBBC3\n4D879D22839A4E1D10535DABBDE5F14BDF4738322A30420498AFDB324A3FADF0\n3FC34A0601B66DF2D31B2182055E431EF33F9164540E10A6516F625F5A6EBD83\nDA7073F5226EB44458B7A0D51A9500E94C0A461CEFC1FEEB3B5858C9EF73AFC3\nED10F24B73BE1AEB60363F53D3E2674ECDD61FA4FE5E98923E78BAEA28A615FA\n46D45FBE38AB52507616C1876898FAB634C583A1A045DCE16C2F479A0902CD6E\n43925F72A7307FC3DEF57E1DBD26721A752EEA6E0D65F2D732C3BDC5A192616D\n85B28F0347604F6847E1BFF3D6F4D26AC0914ED07DC72EC2DBD8A7A7066B8949\n55B3AA6543C543B2871C83855FB2457A77765EC3973DE2128C03F3A391835B43\n9B7627C1A59EE4F81D4B164668B7B45402FC53E944A3BBA6DDC1447ADC9759FF\nE8CCE303720CE60C01DC375BB8F550FB30B0DB28CDC7A9134134AABAB6D2E5C5\n7CDF07BEDC91E0F076B2D8F689101EF46687E968F475B79A53AC02617EECD865\nF202E47CFB359E513D2C14C68FF76F2525C33199DAD8788AE84EEC4692685D64\n3BA96A5A95AC3C7841EABF4DD8E530A3B0518CAE73656F375B873D52F5B6A9C8\n92769CE95AFF2792F7C18267CADCFA55341179747CF57B7ECBE3D1101C024FF8\n4A57B093CAEC967904A520AA9FC9411F3AC9DE9A6757F897B2EAA41572E46159\n9827280780BC11B035E96C8212C4FBE911519F83683EE4F5D8CCC27FE397EB84\nCB3E0C518ECCFA9FB5B51DD4D0D88F0AEFFF44240A8BC7C0E1BE38962641401E\n58961576EFB8537FE3AB4EF88486D24BC5F452B421EDC1999CEEDA5A573A537C\n3F19EEB67B4D8B2F44A655ADF5EDEED5C0EA4534C893E668ADA7F2FFECF6190A\n05EBDA91A732D6DBCBF6EB097F614AEF3B65BF6C3D8393BF658EDC7848D4FD99\nCEEA44D675706DFA5AABB9EE3FF5FBF1F944A354A4B2FD33DAA1B77A9381A700\nBB3872B3BE81180DF834A25D8C34EAF36A393378B2A482E04E1BAA3DCF76FA79\n8F35C9B25730F86E7FE449190D6C8124A316FA37182A67AC391862C4F5182CAD\nF8169056A9A53AA1277F2EF953B5D3105D20D001029A05F6C66AF226692E0246\n82F0A3DD89FABF52FFB195DE2F93B5164C19ADE07304E84C05239BA32A0F6471\nEEA00E69FB401EE352E08CDFB078C4F194C22C63E5C802F070F831F5F906D9C3\n777B30BD856E51E3E4EF9E9A1899D530337122D2D1C901A0BD228C9CDFAE49F7\n9E987145A63418781FF3CD8B7751E875AE06394505A631F9E0476BA9F0CB48B8\n4EA169ECE3568DD4E5FC6C68B227BB7D21AC0DC533475842EC72AF9AB64E13A4\n4DC6C99CFFA407F3D9EAB7DF5DC65C7378497AFA210F7A50163E22D70B16BC53\nD4E7CAD8FD245192B6573A164E13485EC960093DA6A57D6A7933AFBBCBD477EA\n9E48A9B240CD9D0B127A9802B71D5EF1C347C331EE1828D8EB12AF41FE2AD564\n2FAE1BA1E479CCA93387007643ADE5B12CEE2F6DBE7EF2693A22ED4DD2953A43\nC49E825E7568C5082584AA4B1AAD483DFC7ECF46CC4E6C6577FDD4AD0D61D4BB\nF9E079760C69D3C5049E719634CD7B13BC8DE4A4679291D992BD3AF2443C8A0C\n6035C07A7007E8F6448DA8781EE2420A9C7BB8FC2119A4D927E508950254B031\nE3C98721062EC7CDAFE35A59AF61321E749E10D940B698E859260B82844BB7E4\nC19D45FC2704ECA4D37B6AB025E138E573FF18CA460A75CD01D654E8C9C6F0E0\n3DFC1C099FD3458C4C81BEC646E8E014BEE9F3A64757C879B21324FF19A76AD2\n7AA89277E43787BFF8087B315C7CBDBA9B176C9F63A14BED38C7CEC460846AA8\n31F8D98BF9C72B0F195E8F949A2438F7E0E9C8AB27FB9F26C20807D3654F0CD2\n03758A137EF764D9ECB24A69B71992E2E19D04F89FA84A849C6CA52C2EE67A14\n31A469FF08761C4DEE488143FC6208E606F94E0197C0B152F9486DEA848F40D3\nC93748CDC202763F776AB148520DA3911A1B013236F5C7B6AF16C5A8BCE9D27C\n2475FC5ACD7C5F44C17741006314A20E0C6084872F1C70C2E71BFA72A81D0B1F\n442684BC17BF3B2042AFC53BABE874E31C8279ACC1484BE3683767029D0176F8\n984B545D19D1D62EF93C6CE41AF2C46619116D8C28268891729BF571EC22F938\nD13F018AA10F316358286C62F230E79ED5BE017B390B1435A0B6340756169CCF\nD846DD081D3928275195235BD01BE570574DC5C3495B396D9F34409EB6BEFB84\n0B93E0AC234273472F7DE94E88ACAB6251F049D292A698F5CA022535FCBF4354\n650E1CFFC7D131DC4A6A6702D6A2AF80E76DB6FD339D751013CFA15B59ACE899\nCEEDF23A98C22AFC575412B7AE2A3BC0F5A23A349C6A085D8F98050EDD29602E\n73E32CE4DA1969E54059B9BDEAF08BF1A494DBFC2DF13FEC9A6DC25585C3CE73\n12619AB181F51EE840A57D2039DFA5AFE2F153439B40CC85101836D3FD80E419\n3E2B0B4ACC2113AFB23343A2948D5BA36CD0C3A845D48873DC7A0233F4288FFC\nF07470C2EB8A2F861084059F03DBB391368208770EE037FEA3C64834C69C099F\nE148860820D70A53E629DEB8AEC5A2CD4162281A2EC2F340D866C6FBF6F8DB40\nC394FB2F4F446EAE634411F96529A356565E7770593E566919855A140FFA96D4\nCB9BAA9B39F36267AE96B770B899301559A454665AABE2D981DA5CF55CA04CF8\n1A6A6FC3520831122B2953E4B3327E1688D5D25FBBE840A7303269BD54927B29\nF0091C7D15A11D9ED70739D83428D3F3AB03010E20E842F88E42559640E116FE\n7C4FB148C8645BB2A49B8699C53407E5559DC0DCB274CA822E6FB350B1E585E7\nAC39A69CA3E26E7FBA2DF3130E581A853C46AA9F77F1DE35007A4773683BA1AC\n8A33FD55FBC551872690335C075325E19110AAD02D628B95BE0CE7888618C8D8\n130D23774BAC52298F9FE3D0FA02435F272B77F797CBB6311C95B2F0F86625A8\n7529EE56E03CBD4266A87FD5CC9A4B3839DAD4C0C45F4D37F742933AB87182A1\nD67CF30C36F9974773987BB86A7360BAD4C559F4012EE55A8F84EFB52A4E039A\nDEA7F0EAF466A1E0C3D7B85FE5BAF7307997AD369E6CE2B0B0904C76910C256B\nD495F4961AEFEEA7DAFB577C0F3A2291CE1ADC8F95A3AC04DB4F97FBCEDAEFAF\n6EB2F5A3CD5B3CDA7E8C7ECF8169EE33802FE0E9CB4457262DCAC108509C33FA\nCC29811AD1AACC78A0688CDBDAE69ED8666400F3BD6665B4883821B8B1D9B9C6\n5298B1883A9997A37E4C89012CBDEBBF2CD84FC04538D5EE39EE0DBEDA8726F3\n4A24061768FC9CE7900C54FD8EF1E0A1F821524E827A8679D7E47C4E17BD495F\n3A37ECF22CBA5327E1FAEB01FB28DC4908DD7A21C7DE55A8CDACC3A954718E33\n7EBDFD76EA3B2DDCA4261981DF4293A8B85DC8BEABB1813E7CC1D2EE815B0F8D\n835C1266D045A2F0E9285BB6F4E81BA41DAD9E3F8628890079663D1C7B43120E\n85DDF03863A564C895B1A870A15A20E78A2AC3FCD666839A949AD9BD6E13E850\nA886324045AC85E11AD90EC2CB04668761940B446E7EC2FE879AFE1BB2DD67A6\nA7CE892BEAE31D3EEC1B093B11265F54AFA7C5010ED6BDA96FAE1EA0982F07C4\n869CB2375DE76AE4EF6E295234B71E68CECCA0312E332AC1FFB161C82B87930B\n78D30D9028DD5F0662FB8DC856FF26A133F02AABC734747F8DABEA169BE04299\n3DCF0B96CE904280A3F35C136C4C2372AFDCE72CFDCC7FB74E480BA87E87ED2D\n94D5375C798B8BD039BBC3B9E64682B281EE4FC32054248CB63E5377842E4622\n4E220E98A4B923574E2A3A57B76EE8979D17A3DF2AE1CA1A9216A6C0624F08E2\nE3BA319DEFD4945B4E42F83B35F33BB15A2C5AB26C1E69EBFDA487F84FAF6AE8\n5A5C370C64B2D17C901695985E8010303FE7EBA939910EFE53538795825087B3\nB29DB2B99FDAAD52C85BB88267AB548CBCE2531450269A3682E1C708C4C9735F\n8B5F37CBED508C98A2523409EA4EC23B7129DFD17BD84772135E14AA95FF33A1\n9065BF41ED2CF7E8C7C18904B576992EB816D582200402E91143C51DD081A087\n2E81D6CA6D78B313276DC0C0FD167257E4B9E3E1333D666E5F12BA6AC603AF44\n46AC2A537DEB47D8178AA88AB3309411E6BBFBEB6E3720F38B2580F393CD2044\n115C83B42BAE34F00C1378E118DD09687B1DDE8E89796466D5228C9E015A9698\nDFABF337E2D868F6A1FA19A5DA862DD1C184922E2CD9E193394A1E6BA25610DE\n7DA3C18865FE03A550E45DA2A7B4BFFBB1664AA1D34C059B5B5743E222A6CA16\nA2BEEBE0FC0521218B60B72A248B392D1FF1430BA9C20B95F27CFA7963B0F562\n7B6AFC15D75AA2C6DB1DF065A34F8595C2BC29E2783D0A646262A3FC9B790ECB\n68D1403FB100F4CA6D3A8C49004A0B775A189F98AE0DE0FAA69C9C30D57A8352\n75077EFBD79072AFACAFE1D7A06A3A7E345733E48B6ECFC3AD696ABCC4A3B498\n6BA4A1C620443504DBEB5865E9D1F00A8508E96A0E2263573C809CE636BEE09E\n0AFC79AAB1B06173DEB9C2BBF4B65A05A81B0D6A35A52F7C0B4275ED99A08E11\n00F32E02A578F7F35D2D115343D6AB3BC64C0856F56B9917DB1DFA5C9005A665\nEA650B001A53E1ACB42EE7BF67613BD318BF675AFDC7403681702635E9E6DA18\n77510C904408757E82C02BC8647E7D2DFF5881F577EEC6B21654F0BC003FCE1A\n1AEF75D0F761868E85016DD6BB9519BB750E0E9E1D7FEAAE11115F68CF90D1A3\nC6BAD845BF49A8622E589065C7B3625650B2E6E4DF8A6D64B5B3FEF2014E8BA7\n2C684C6B666F3761387F25F02B10FAAA1B36F911FA90097AEEB6857C776760D1\n210D63A5480C3838A5C1CF5D8DDFDD77CFF25F44E49A42ADE0B9B0F85DD2718D\n49AB7EACE51AB62F40DE15646A94EF3C43713D0A83B83A5E5FB282BF53BB8F39\nF55E0F53259114CF1525A1D221ECFF2FBD74E0E244B85A0F642559E4C245AE0F\nE1A26E7910327A27EF77A1F3B6EEDAA272C7F8178B1AC5D7EC4C5CF401BDFEF5\nD66A33A5DD537652A4E2C7F8E104664C3298B1185E9E717D2D44629237F9155B\n742D19A59C4E5C674D72DE10DC29A31B278B17C5CF2AD7B1E5C4BDFEACF95544\n54A3D1DA2A94D2F0297E35736E596E5EAE8ED591D5124555D156FB6ECB8B80A2\n46AD9C92FD9A88E4318E9208CB77430B8937F1192965FBD7F4BE2E0E8788A37E\n3B3E8D1A3A045FF464A40DD24BCE88AECAB67618CDA524DB2AD71BBBCB06FC8C\n01F48B901380127CACAB5364B86E4B3DE2C94CE277C7D2BE5E243092E45D6642\n17094F6656373E353C6163F853C8B0EB5A4C26600DA2C4EEBE36AEB72EEF1123\nD814129601714B90A8B36A6CEC964A09C7E38BC0C77031C75481DFFBB066A3A4\n7B34368909E3165788F6EB442FA3BF39B73F0051577D6B04DE1480033D3904B8\n56416A76D15B107B1EAB2D64428869802E288C945CF5420E57D9B3EBD3901232\n214048ECF6CF98C2085E9F3617D3DB3BE5F823DA8FD20CFA4FD3507711311A70\n4E022D801085665989A93EA92B6127500F31E025715D465316259A23DA611C49\n516573D4E595D078C3932BB9ADB00D687751F82152E04E9DD409EBF0C5F30ED8\nCEA25B42725350E2C7E5776CBC4288EB1CD8C65E2DC2DEDB579B33D05FF43AD0\nBB575748663F2D3F9CCD180D7C582010B3F0FBE55F8FDD38CDD776C5D667325A\nDEAB57CB7A65740E39C2194590CF1658AAD56A325BC16B6E5293D1E7B077009B\n866BAD1F6D99FDA28D65360417F18562610D92F8D59421C32CC9CDC76E2775F9\n6EA08CF3637193135604875EB96C63C3F8BFD4B268C2A21532A436E636164940\n6F3617C9B9F43C0A4F171F9AD52C8ACF10F4474D8595788BB2BFD460567ED007\nF46FFEBE2D1B1333B9276EAF4F113B46A523DE2868C3B9779B52B9016204D9AF\nE584D3745F057A297D42698A42B14DD0E20343E58DE003671414F3984B2A78D4\nAC81D50DF9BA9A94A05B93041BDA4E1E5B3C7555B63BE9A957EE079330A776C7\n042B58E72C06813DDAB4B8F368F4E7A2AED92028D7360C221CF3D15B207ABE4C\n3719FC19DE84FF4CC18A2279C49A3B71F5EBABAD1A1143660DAAE9D9C25A884D\nA6AAD3063A59D7BFFBE36CEF8DD177CC18A19748392D1D88DAFC5C5C249B7A2B\n6FD35691695CBC9C0E4EA2C6B71DF9B907C6BC0A12F58D25CA0DF701CCA61ECB\nB15938402E664F1AD0BCD23FE87561F054523928882FF34E3C66687711A07B00\nF4E5C508EECA12E3F032335AA4876E58E035CABAE34A86A5F2113A7DF2466C07\n7959F8AD9E7FE2C1969A86DDD93082DA02A56AFA18F918E508812B36C8C48E8C\n704905ED700DCBE0CCE85B446C615F18293B42CE903C9F21F12147C5ADE67739\n0E7760F783C948A3CDBCDDF45EBFFD6BF6893235A4F3ECC469368946FD91A14C\nD6DB5679FCF09F5DBDC60B2F1D8000264F58235D7B71A3BD126F14655ECFF22E\nB5EB5B2A35EB3975E899DEA46A63DC61F0B07DB4F03CBB0C4CCE1303CBB00E7A\nBD93D61009C9E20619247F16D9A7B8F96D80E7AA6F99E2F2BF16A3CF7C6784D0\nC7EC91293B6924794A1A73A26A9903E5A8AA3B48B727C98241A5FF4F6E8D514B\n3B973A745180A676864FDA616DD19BB54EA229903F0B1559CA604ACBEC5ADCEC\nA92832969BDA4FDB0A3CB0009ACC7348BD4469CB98B38044E65D16FD24EC6B46\n558211859D45F3309FEA2F4EB5D1F8424427EE5AF82F180AE077F92F33A0F307\nB1A948E62BDD3DBA340059021B311095CD5F01520AF83C250C211DA72B5D78E2\n4EE203105FC1293E993A913635ACA8CFAF36E2DD5BE0E4A18A75189B3C548ADB\n1752F445B7497B03FA5AFCB3E4D1F364AA64BEF344447E588505CCDAD4A09528\n7180211F1F8878ACB9681695D249399972FD13F4A66518BB84CEAB93B9306DC1\n88BA951B8B857721B1FB5598886068772C924FDC26CDD635E21DA0CB04DC4AC8\n7DCD07352E2BA87A07C6307363D895E5FF5B7A08E854BE192C5FE41A287CDD7F\nFA4789F391952833DBFDFC6DA592A41DBD1A99CDE8E159DA6DE6692990B01CCD\n2ACE33C66A1CCF18A93987D8C7077FDE37F55521E5799487F99642DA0D062CAB\n53E0767738285198B1EAEAD08EF0ECD909610B39F6FC5C9F516B404352308128\nE78D5B2D130D8EA724C9B723A79722E1409507DE209433F5F788BBDCD1DC57B4\n6C93BE63F87F25FE0CFA709CE3AD0907B6E4A3F24613999D32FA1F7240A8E3AE\nE8D00DCA45F6C7044609279AA11C72EEEF0605EBF97C02523223193C5B3B67EF\nD6569C8BA0CEFDC4CE3B4E196615A3AAC748793EDBB053002B7C660A9AD8A1BB\nF337197FF04A4119121B28E7EBAFF3B7EB07BFFEB84A8B5C6705E57BE1699BC1\nCA6C4CA9618630FA8BC45C313CE2CA7934EFEF4284DEE9265D9B10140AEE9389\n4F928DCCD5FC53DE9CAB98CB4A688EC1C756CBFE905EA5DBC97F6ADEAEFEAE30\n0E19233B2B990975682F7EE76B65282280C24D6CA50C86A8437BC9A733E68878\n982561456057B396A8B63E0CA40A727BF9242322A00752802EE50DE3BD3AA8FC\n5468CE42CEC3EE06FA16602E5CAFCF6B652068EC5FE3E40188EDC2FE0992FC18\n4CBFCC66071B90C344EBFFF0D129074E13955C3C74724EEE8F5D8D7F47148119\n7672DA93A293EC3C3112B10A8789054F90D8B2BB60D4D1A43B5478B31799DADA\n6C0AFE75E111641814D6C4A229527809575E0408218D73AEC2C4028A80CB95C3\n55618235E0DB8E1833449C6D563288B39B7FC2E2400B835830B97715C56DE538\nA734B0F4A92545DC9346A4298B2BA8605D743E9814D109F2DEC05A47BB1FEB31\n64033692720F2577A6F31A0B6306B6DC385FA4AD52B3047EE928CE389CE4E20F\n27759DF80798B5700CF14A0629DC800E0F1F5CA7857B4CCD9B79E3DCECACC493\n88B5F5668F22420CA77470CA06FA931B992A345BE605648E886CA10303340C8E\n53C67930B50B6A8B96760841B7658CFEB1703B28AEA5936C4A497DFADCC38F3C\n28BC4CCFCDE254712C084B961F355343C09DD0B4BAC525A2B5191E3D44E80E10\nB5DF3AA0C00279735B41C8BE21EF245CBD1B2639B4F860E469F6AE30FCA7B959\nD8338D545F09A075AD5A0AA45F3061FB9A90A9A96CACB9498BA769475FCE5EFF\nB6BB02ECD51D5C80C60A9E430E4312AA33BAD872D6EA7FE57AFA772F08577807\nC28A230CBD3469997A1B614A76254170A801A6996BB6B55324877BBA76F64F98\n9B375F54E3A23D408B87A664088EDB13A88C6DF3FD1E7B5066A7B6DB92FA6B2B\n199E77EF2EEC461E461CF1549FD1BDA208FD0D8EA280FD7E294D7B949F641500\n3E36B8EAD72EEA9B54E4B12F84D5D8DA44F15FD07A72CD590822028F1B6EE466\nE434B8F87A877F96954DA6181D20E3130E8C01DA5FCD866E488B55DB4E446C85\n22DA8B7F4C07CD282FA3BD62E250F4940D49C69A4DACB2E45FE994FD1EDEA993\nBAEB33414EB1837051ACCDA6F95127A6AB5A75ADAF5C35F5845B8D818A1CAD0E\n8F4A65B3F2A92A1E5A8E1193A7DDC62B982A90B19E12C1D15758E46C64613668\n19C685F71D243650A529E83566FE7632677397775EA0B882805D478F53E7C469\n6B1D66252E1DABAD22E42C57CDFE994ED828F0D150F40F3D21F9E0B0CE5C8F01\n1DF1082AF2DF9ADA895F3C0B919DB4E7CE4A820CC4375B4474291309884B1D9E\nD1D0016D5623A6706BAB24FC6B055F1FEE7B711FF0B6E2ECFBAB87DDE9F2A043\n2ED52DBB7423DF7340E28DAABB9A72CCC1A3D8BF4184C7C2A0DBF5EC0EA83137\nEA14C89DC4D6ABD2D820ED809F24A3E3372A5BD7A496FEF2B41AA0D8F037D955\nB3FC6FE61EA75E91D2970ACE359BD8179C351F5C9B07A01FCE7F4D26F9957E94\nABBFF55140669AE58E7B804938B7CEEA59E9E31BBA2A8893F15E1BF9D3DF26DC\nA98D975E1D28D5C07B7B0AE118C967CC5FAD6259EA2CB0B99B82D69AC3769EB1\nCB9F0958B5410C0018D0A90BE714EAB4539B4C17E799820FB5A2E9BE9F0593B9\n10107FC9297E7B09F1DA3D592EB0733E22E46CC323E397A4E0CFDBBC115DFDA3\n5E78E3792ED1BA7ADD2129DCA4E505CE591FDA25C1B5328B1AFA87085A75F242\n480414C05CB0CCDE066DBA018128361B47EFFA44B25343CB41EFA62ECCDA4761\n963F45A0DADDABBD827FB0A4F66AB86639D63BF7E506A8BCC0C04B4C8A482EA1\n2A0D1B28BC11E4733B1ACD981088410F51589B40904099642B632C294D4FB935\nB313C329FAB22782EC1544238C6F9CBFB3E8F12E925C663FB6B5D075C2137810\n34AA91A781C53E6BFE6EFF688461983AB8CC140EC7F843F30BC8ECF30CA9310A\n02AC3D7A5D8C1DB1AB37328DD459E109D48C45AD4F29136786716B57BDA3506E\n0C327227EC7BD2AA70380F889A3FE55D88BC04ED7BBC0E13A6868B2366CD3EE6\nFB407C25CACA5055BAA34555B1B938CDB9AA24262F36994F3803E274A6149A92\n151E334B296C3EBD6CDDDD8F3398FF66056D6D487FB9F6051C394F3AEF984ED8\n2CBBEDE03C4FAFF34DB83A9EEE8D6AB435C7B057CC0D6788BF189D883CE86438\n993207D409B9B7716727A213D862ED46AA05123913517C92D77CEF81BA8B1C40\nD007B3DAEA7D07DD38BDECADFDF4214511B943147E5F2C041593EF33D30F9CC9\n65C2BA801AD81CF18AC30E623E45B0F4B6327CC2CF4BCE8AC9A108554F1D1328\n7A5447E559FC159BA0FEF4D3AAC65B27246D67848B21F0174A008D9A6702AF7B\n3CF5C33D5764A183DD9A5DC84E571ACBDBC0E03BEBDEBB211261D8770142A77A\n12978074B3852AA350411C063A5F5B5F873BF75177D9DA0B90FE2E22E25C089A\nC7400F279A4DCFD063BFA667C7B3454B9CEE8CBBDAB986CD1F2117231FFAB686\n8432FBD8736B04E3330080A28E2FC037F1D349358F34B2C6E2392FDB3B44E285\n4556D82EDA2FAE7DA9E42736FFC36AE02FBE5005FA66E30E79FB3EFFCF1C7E8C\n8F8759C3EDDC083D65397A592971B37E0DE923B6551F374A6FC116A3E96D20BD\nD06289C06AE0945C88B915F9B15ED5F8CE9E9C598B60AAFEF836D61FECD3E43C\nB044823430D5943AB5BCAEDA4B82DDF83E7E1EB5BC0608F876CB19849C35188A\nFD497C0F281FFF600BD9DBED83C6C368966797946F218BB5AB8437B641B88F94\n368B9005C405BF525ACCE2E802D78466FDFC1A3A7EA223A0A1F63FFE83A537FB\nC456320E16D7A6457E352E77AC1A5FAA0783F66E0D3C4BAE3C0D9CBAF4ADC74A\n663C7F645D9A8F79D1F5E6916E6B551DCF373562EC14D7094544A6B6D420B075\n85D2C7349575FB37F631E0EC9C186B797C9E5AA6BE8A557227734EBCC259616C\n64C7FD5E58174D122555E76F8196DB0C1FB2F61F1168BA587E58B57E876416CE\nD05508EA3523C742DEF1F0EC36CE57F5F97C42027F0217B064E8B762952894D6\n25\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMTT12\n%!PS-AdobeFont-1.1: CMTT12 1.0\n%%CreationDate: 1991 Aug 20 16:45:46\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.0) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMTT12) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle 0 def\n/isFixedPitch true def\nend readonly def\n/FontName /CMTT12 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 33 /exclam put\ndup 36 /dollar put\ndup 38 /ampersand put\ndup 40 /parenleft put\ndup 41 /parenright put\ndup 42 /asterisk put\ndup 43 /plus put\ndup 44 /comma put\ndup 45 /hyphen put\ndup 46 /period put\ndup 47 /slash put\ndup 48 /zero put\ndup 49 /one put\ndup 50 /two put\ndup 51 /three put\ndup 53 /five put\ndup 55 /seven put\ndup 56 /eight put\ndup 60 /less put\ndup 61 /equal put\ndup 62 /greater put\ndup 65 /A put\ndup 67 /C put\ndup 68 /D put\ndup 69 /E put\ndup 70 /F put\ndup 71 /G put\ndup 72 /H put\ndup 73 /I put\ndup 74 /J put\ndup 75 /K put\ndup 77 /M put\ndup 78 /N put\ndup 79 /O put\ndup 80 /P put\ndup 82 /R put\ndup 83 /S put\ndup 84 /T put\ndup 85 /U put\ndup 86 /V put\ndup 87 /W put\ndup 91 /bracketleft put\ndup 92 /backslash put\ndup 93 /bracketright put\ndup 95 /underscore put\ndup 97 /a put\ndup 98 /b put\ndup 99 /c put\ndup 100 /d put\ndup 101 /e put\ndup 102 /f put\ndup 103 /g put\ndup 104 /h put\ndup 105 /i put\ndup 106 /j put\ndup 107 /k put\ndup 108 /l put\ndup 109 /m put\ndup 110 /n put\ndup 111 /o put\ndup 112 /p put\ndup 113 /q put\ndup 114 /r put\ndup 115 /s put\ndup 116 /t put\ndup 117 /u put\ndup 118 /v put\ndup 119 /w put\ndup 120 /x put\ndup 121 /y put\ndup 122 /z put\ndup 123 /braceleft put\ndup 124 /bar put\ndup 125 /braceright put\nreadonly def\n/FontBBox{-1 -234 524 695}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891\n016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171\n9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F\nD2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758\n469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8\n2BDBF16FBC7512FAA308A093FE5F0364CD5660FE13FF01BC20148F9C480BCD0E\nC81D5BFC66F04993DD73F0BE0AB13F53B1BA79FE5F618A4F672B16C06BE3251E\n3BCB599BFA0E6041FBD558475370D693A959259A2699BA6E97CF40435B8E8A4B\n426343E145DF14E59028D4E0941AB537E34024E6CDE0EA9AF8038A3260A0358D\nD5B1DB53582F0DAB7ADE29CF8DBA0992D5A94672DFF91573F38D9BFD1A57E161\nE52DA1B41433C82261E47F79997DF603935D2A187A95F7A25D148FB3C2B6AA32\n6B982C32C6B25867871ED7B38E150031A3DE568C8D3731A779EAAF09AC5CE6C5\nA129C4147E56882B8068DF37C97C761694F1316AF93E33FF7E0B2F1F252735CE\n0D9F7BCE136B06EE967ABE0C8DF24DCBBF99874702ED252B677F407CB39678CC\n85DDFC2F45C552BA967E4158165ED16FECC4E32AC4D3B3EB8046DCDD37C92FDF\nF1F3710BB8EF5CA358ABACA33C7E5ACAD6BF5DC58BDFC3CF09BA2A38291D45A4\nC15FF1916FE2EC47FDC80911EB9C61F5D355BEDFC9DB17588547763AC5F0B1CC\n12D2FFB32E0803D37E3281DA9CE36C5433655526ACFB3A301C56FAB09DF07B5D\n048B47687348DEB96F3F9C53CE56DDD312B93D3918CD92AF53FB9461864D11B8\n0138918D0B1270C54873C4012CDE6F886DB11BCEA04B023EBB43E0D0A06BE725\n741D08B9DB688731A6C8F9F0B1FDFA20C46ABF1BE836FCA0757242BE4780A41B\nC19304DEC802CBAFBD0D116B1F98C01BF41ACD72DA8C56F8A03756E1850CF32D\nF657FFF4377B43F208A3F33191F9F6F36FBB0CDA3514D68ACD8DCB2FE67AB377\nC6BD16D11FFFD61E05B8B311EBE8D05013ECF1D03F574982E3581A188E337498\n3B68080D69F7D88F2863362577B6566B9526D1E05DCAEE47F7E336489F4CF445\nE5F4E1DD5EF2B795F184EC5B427C77D49CF637A3A83F71C9AA164F7E7523CFFE\n350C518CB17D7DE9BA99636EFA6AFEE4AB04EE89C4A9659131BF82E2F1881484\nF324ADB0B8D0598BAE540FD341953ABA576608E1A72224915DD491F4E7CB92B6\n50E5DF4CA5E52A3EE555F3BABD024F4E3E6891291837B803E9149C46A33E2E4C\nDEAC0754ED8208FC9AB92743C4640ADCEAA0BDEB1FE775DCC44D8DFC73C108DB\n1AFF469196A09AE2C1ADE9DE9A74CA221F937525039D50B377A0ABE8D7C7B3BD\n9E75495CDBE93F519AC2F4EA932BD7BA2D6B24ABEB341A461D842648A39C7886\n223D02D964B721D22FFCC80A777D2AC8BA2C5549803C43BC79A5A1879F6A3E47\n7916C6EF96802AAECB2C48892997F844D255767EF54FA0FD3801BEE448E818D0\n42B5E7541F6444201033B6262D4CAE00BC7F6EF74D77AAF7542F1177E0E59B2A\n7C7E8ABE45A919330447E2D3F69B0C9C573A4EA5A89CE91E66B9891DE195F1DA\n3511E3975AA2E88637E2E29D3C0E399B3F05CFECADF9D8B595D6AC35AB1FD720\n2BDDD57C91A8044EA06689D3DBF0E316C556736A2C63D8528ED1F1CFDDB06A11\n102CD4FA03571DF8D6B065A2ADB198620B5CA45428DBEC92CD896D5BD2502F81\nB2F0BCCC4F4F05BEBCA89FAF237B4033C755E6A5E887C7B1AB9F3CDD9107B38D\nD3A53BE369DF2508F9A18E6A60447FA345402F49F3BD9C45939B3112DAC360F0\n92F5F25C901EFAC5B64031C9BD727419EC397F26B9C90C43F29F874D56B4764A\n492DF3F9BFCE1030DA98CC56059744C55C31C95AC923CADC456484930386B501\n1E2770D27134D2794957DAC05C7B0861F5A15BA59F187CF863C5CB155153C7E5\nC41998EECD1C9A051E79D50155DD4255CF63604117637CD9CCE6E2C2EE5B442C\n9B8CEA7AA6A28D3B0398E3BCCFBE54A7A94CA34B50BA433FAE4D1ADFC792FE08\n9B47E2F4167597A488883D0D894D9969A9A7C5B4696E047E72FE4F7C42D3D11B\n861CC7C69CD49DBFEE12E7E7E53DEA50AD1EF199F1B63B2C316104D5DF90DA09\nB9ADF9B10357CF177F6A5A7ACF6BB6755B7638F231BA9DE251385B42F32F9DEE\n6628FC9CC3D234D0ACBC9BEAB93A0ECE8D406E90DB973C155DF0EB1729ACC6FF\nFE92A5A105E4D912F5A6E34341C42770DE44E9D043279F8E909BA3162009D865\n4B3AF880506BB8F6906494EED9A1749DB71B53E282F169A7B48911DC188D89E0\nD40A8C04F8C306AEAF7134854E22559A606CB009EC2771A145BD812C3457FECB\nC46CF5A5802AB65DD3B5DFAB443B519D9F1F992229A12175BB81AC3316FC15FD\nF367163273599126D82C8BE3E1BC69A2780E179CBCDC9ED8969847A84F673845\nC23046AEAD68C33AE89382FEBE491136FA9F5D522D67C39E64122685D0D11A21\n625995368CC769773A61FBE9A1AAC71B01654B77E3D6E9415D67F7772F062B38\n8BA7BBC59B51D32341C92E260B9B533BA21CAF80FB13280F2C4BA0AB62B333F4\n0640CC1B9111444E8F6F5499A7FFBA38B1123BF634F4FC96628710697647E1D5\n44292337537167827C9FAA8D8FA54495971BA0A2BD3862922D15163D81A0C3CE\n8A903C3E7C4FE778B07D8A1F41BF014336EAE1337390BFB61B51215C5665E695\n543E244C5F31E306F9BDABEB7F6776C00A96E142EFD78B4D5609DFC7DA2887A5\n571D0261C90C219653C3568F508B170F599ACB4F3A746216273D97E236A427F7\n8058A691D97418CA68D1115EB9FA28BEC89209792B106E6E54FCA25D42ABA5B7\nAF441D39682AFF5B3F1098B42E86F0BF83DFDFFE3B133A1A69F7681AAC085BFC\nE2B13585E064E143BB41E5DE3644386668BD7AE8809A30A5E8D205A6FBD8241E\n3CB356BFAE07AE0821F784BF181809EC59187921859E840FE56688D96F96A2EB\nDDF07C1757AE644E06E3C436B2D39D62EAF40CB71ED1411F4A68A99190678BE1\n66B2066AAC1ABEEEAAF5270FCD7662BC98612F6D6D0EFD840EEF6B9CEC28179E\nEB7B3ED529E4479D7AE45E9179C5140E3825A9FAD9A3B517DF37D6B04AF4E85A\n7A1DE438F70305DD0C85A73BC02119E128AF43DC5C1867F275CEE4C86694C6EE\nA45D2B72991D4FE7E0C54E39EE096B858F9393DAFEE8F470577482C569CBE808\n142618ED54CB987A6DBE03B37523B2D8D80F50BD7E1A16CEB7121E297B6AA835\nA40CEA06F19CD07CAC42CDBF7892D85B04103EC8E10242E40AB14E2F0F09A490\nCE9594FCE565937104AA7B49C130FD6C1CC1E648174C5F808F1A02EF6B307105\n5088EEDE84535DCBB4758ACEE27BEC52EE6273834EECDA8C06EE90BEAB23D235\n5BA2F8400A7141B8779397605AC555FFBFE90AE78EB8789C116F9714757AFBE0\n5F2128743BD8668BEE323A1539823410880C209EF13B7BD661B2F31C560C5916\nF28F86DE0B71B0A934C6906BC84B75F73F313B954E92411233CD52766A537E44\n7355B4C56172F3548C80F599F3599FD98364D0484BAFE57E4EEBF86028D81CED\n67CBDE43CDB26D1B510109B5610A9F02913073BFD04DB9313EE0530D11A23BC2\n27B332C104EBA0277C9DD9DF85099126D5AC58669A501F212C76F2D29FAECCBE\nDA996423E2C899B3322F983C148AF46F83021DC04011B5BAD8F2AFC1031331DF\nBDD901CC21FE12543B6E670033FD06CF48C7FF743FCE10E0ADF2BEA2C08B122C\n6C433E184F33D8D5F5A7250715CFE3BE0BAABB1C70813817AEA54BBE9BEC87B7\n8A436EED69D3AA601E5ACA19D6FBBD3F6C2D6118CF047B29226D25F2CEC17C60\n2E1F20CC33FF612FC037A9C1E689918FCC3D28A0B9CDF6B8D8CC4C8AA3C9E203\n1457219FDFFFB592DA48CE1386D3ED5A78265FD4C9BA0EE6C77FFE978D0DFEA0\n5B0452A7EF3DDB850AC54F16CAD4302F3D8F86F2A89F1010A2335CB527B27100\nEEAF8FB81C2D586F8E3922A59761A3F63921B620A642889708FC4018C8CC79A9\nF308F900039DA39B59BABF22A86EE08B8FADA26EE5BFF2A848C2DD23CABF458E\nE73F8B0A6B448D1652FD6C6190C1B4A60339F7846AE6A322809BFD7CC2B40046\n06255C5EF07C04BCC5702369DFA0CF0B8971BB99A2C3AE14005663FE553CD7DE\n1655B56EDB2EA3AB11DC9E3727892208E9A08A101D52FB899371822B17374FC4\n43E31A817B4FB17FF1835F35A4E795C0DFA516834831BC3027A769CF09CF5E31\nBF7113D29610DFF9DAC10ACFBB5D084534C55B5F106D746BB681922108B1E051\n418C0FA1A477E12FAFBB03E0639C32751B2B2175359F5A70B6DCE15995F6FDA2\n124E329955A4261D707F4213137883263ED5735BA522D9041A2AF3F37EE3FED3\n3C4C95027E5C721DBFE726C88970EBABBFBDDC4803B06EC20B159A1A1B4B7644\n7D86B14EB54D61E48B88C08CEEAD97F9EB25AA9570EEFBE5F54BFE22C2575904\nEE644B3CBBC574166F908F476B590681CF9C84FD323CAC694FC973F7E006F7B9\n2947DA9AE6DBE80EAF0CA6B25D66FCF3AD066FCB330E62A0FFB17CCAF343B664\n182BE4F9DDE46929135A98945B94FB3460F785C1BC4D6C99F5FB69F17A080F3B\n868220BA1C16E2E5369885D0623D665733C94E0E1E2CB6A7639ED5BA1BA2BE5A\n252E8EA4835783AD53175B54D86B9AC1059BB57A7E68BCE7AB5C3E97028A999E\nE5C39EDA9A4F484D201ACBD1D64EAC4775BF5B4DB95B31C45B84E4FF402F1319\n7CF8946B00A808E59258449E609B55C2AE6378CBBBDD3537B3C0B8701E24BD67\n123DA8BD0616180509E52CA6DEACF503DDD01D42C41C3AD0C31977D6A29501D5\n8DAA95B40046B65C41D752D72B923119093CEA0BB4D6FFF72A2A2C4677A096C3\nB6AFE40358783244747A222A9BFFB6B34042327F7519A1F5C4D78B08F650A7A9\nBB86585404A2043A9F415B69E5F5CD8286969A331749BDF5BF789FDEC9D487E2\n340B927B4FD76F7BCA2874A4893B976A60B84C02858A06AB94ACEF74E17D1164\n33C011DA7729C6473244BCC530E59D00385D70373E760EEE924FB9BE5B94BFCD\n7FD002A537C3421B8EA3A5DDF215370B394A5A21EC91F911FB1F040742EEDA5E\n522B443174C0B073B7275700E333232C5CB9CB4FA33C83DF5D8FC26345B23BB2\n95E4DD8EE4437D1E07B9EA84DE82CC4D5617D65A17C2393CB1B6A54F6AC232E9\n9F4D1B0B1F390D891BFD1D6140EEA0E61D144C5F6B435729446E24167BF31100\n292FF6E42596F0856F24D48D38800E54D9BC9F574D2E2CE667DC5F86B19FC6A3\n0B74592624CE6BCC47E91379D2C9826CD1D4511083225C0FCBA03DB724236DC4\nC949A92333B7AB88C4041A45CE6CD624E1C5BE6D2A3F7CBF180D1751F09856A8\n7306D22D69ECC4358CE97A0C0573022EA3A1BFC78C50B3AE3BC8DB272775DE01\n7C1D997103848D18E878B269EB4429994E45A87805DD723CEE615A413AC02F32\nAA421F27FB6272E8134289F0B26BB048BDE36349BE1E53A38863B337D798EC9F\n03BB65E421613B56D7C39DCA2CDBCE36CBB15656FEC23E27EA73F57DB9E56300\nA95D84580A8E8B8BB8F2615A693182AD0555E5AA19485FE5B333C365F373BD6A\n5A49E0B68D884E2456829B5FD8D8E437538AA5AA2929F971A1876D8DFC130C90\nCEAAEE1826AAECC54D662D47C6F4FC4103D656F6959E62B55EBBC1B1C4EBBECC\nFF76330EE3BF9FEA33AAE0B56872855F6ADBED443549C39634E093F12F131695\n45604C86DB799808F3F84FD98747165FBBB53FD00B433DB09E643D79C4AFED06\nA58804D19015A8C49CD55B184D3A9C0300D814331C9BF3A5C23001A415DC72F5\nF7D5B490D44E07BF5589AA8A0666821B4581F775D2CF9F6C723FCEF0C85044A9\n9EE8CC6A4C4B4440A6C1B6A78DF320838CA16F7589E298002F20FF1709377946\n5691A2ABB6F68A864A85D0BE77BD2A8F0B57B49F85EE3BB8C6AADD06C6104D11\n43081885ADD18D8933CEFFD155697E14BAD81377D6C43047AE5FDB8F280410A3\n9FBE02DC14BBDD24E12EF4F418CDBC2A26B3DB87557157CF1C8CDF86E8992C2D\nB0A0918CE965D44500A1711D300AFFDEB88BE537B836364574D3D39E557F1055\nFDDF089C36DB7D9BAD192F6D9F684302F338CB8E609640F9A6A2B414DE7FD669\nE42230DDB8424F3D18D9234C6E26C9EED527D99D4F2C31BC8664869099EB2EDD\n4F4B9C4995B46754B2922D0F7B2E69CB62FB7CF3B8DD7DABB4FAF6E1BC4792C7\nA501013E755F76D4150BF9E96916B2B2B8A28510D19413EFD6E4922E00A6AC9D\nD9A2E0004D3C8846D5204E223F7411765C54135E283CDD2861F79170286CAC49\n07439751964769342690BDCB3CEBF788B34F53EAB2A89A390F17373350F0E38D\n07BB5FF05521760BB6C99552FDC2191928BA918644E60AB8B18F0893334A42EE\nA491F58F1E25D137B63FDABEBEC361C0E1F0E94320471D130C1CEC3F3A26499C\n6F2770746EF162520AC8EF92F776B377343B8B4FD54D19B8702B9AADDE8A15B8\n3132A05024B4BA9C0EA98EFC541E549725FD2A50FE30998AC2CC8EF3D8EF786F\n1185CA07AA0D3D9406F98A891713FF4DE598E6BF03437E291E01802EDB1C2AE5\n07CF3852F68BDBB6C50CF3D2F4EEAA2BE64FA8F2327CD7B98E1CA28274BE88F6\nB4AEECC2113770C179CF72B31A13B77E52632E353E94494848866660242F51EF\nA353569B83ABF3DE1249C33F6C1B7560B1667551D42A5465EAA075DE8E21338D\nF1557E90A81A259EA5129BAF1DC7625153346CB97281E2F8775799F6BA4D19B2\nD52CB5F5ACD8AD1F4C92034AFD3B6EDF6FB40096CFB03A4CA3A69886AE28EE52\n4EE1FF38A513A28B62A53A5347320B92AD29022C365AFB390322FDE2D3673B43\n64EE6734A3675F7B9C63AB9071BEF383349D3D41D8204877092236CF6D187BC6\nAEBC0B6EFEDFCD9C58C3674022337D8F932C11A2704A28C94AD8A0F38E34CC07\n4477FD165273CE356044E0702C8B7B202868706A5DE968E0FF92D14B8567EA99\n66F09E3092E4A8257F9AC351183DEEA430D838847F4551CE797D93E558F6FF63\n3742B0ED9F60945A050DC391DF9B5292A18534B5BEF3AEDF90DA61A20205C723\n6343315BC140FE0BB21D63C051095D2D189650F309A54C19A347F934396B05B7\n273B4B5D65972042676925A772163A04505E83502650A295AF578BFBC52AC68D\n7F6CC44294A1B825F0C010F5AABD6CE65E3A8A73E35834A82B8652EA2E3E6494\n0E570FB68390B6C0150728BC0C17011E9EE56CB5A034F8CF945F9893F78589A8\nB34C9B681063A069E8990BEB927A80448A6CA2CE674687FB1C8826F9DBC0100E\nD0714E6C6F6F0D13F413B62A598EB7CCFF802D3D3E058D426A770C78F4B509DD\nA6F89A80659C8E89399BECD1E8913593D005226CF0E54629EC831842A8652E7E\n75948866BE06A849E3B65A83A730FE18AD8D09152E133F080BB33E7E31EA2EB5\nCC72F481A1064186FE542AEB4B80D56EDBD95CC27053FBB06EC666277A334DB3\nEFC9472F261C73D137ECAB4FF53921524514B6A8E5B42838D7CFF680DD588ACA\n7685B5E333ECE73BB60C953BF7C99B81208C781BE4F61D91E8577287858A877E\nDDCD52414D4D0670E527D38431425298E9CA962E363B0453C9A419E4C04DEABE\n6F798FE6D46E490E40F5FCEDF2F0284376CE2BBB0F1DDC30BC075ABA79C5D4F0\n3586973F747E524117D9B862152051E0D41666A5A690F298719E59592426EC12\n9ED32151329850EF18FB1C4A9A1423125BAAD5DF6A16625E2AA5E77E86B09240\n7FEA7D227042D7990E183B21D8863C06FE025A72C8D4691FB4E84610894ED517\nE3BB64F4247E1C2BB25F5D7FCED475372BDD73DFD24610B2EBAD8373C62FD7AC\nAE2ACE044A23DA55137C63CC891D1DCEC394D6C5DF2582E6DF7F1C5EA4792E80\n34AB874E1581BE2DE14471E1A21B215483B632808B58451DFB4B2BD97496A7EC\n7540DCE83D41F6B22E65DA60A9BEEA1BF34CE4077B6A5D8250B3DBBB76BDFBA6\nBDD0E11FDCB86940B6224A7E52DF796B4200128F538BBF9CE970497284B4B95C\n55E180C324CD359115347C0865C07D142B9BAEA28FDCA5316B2E72BDEFE73C1D\nB1E76F9F749B3FEA15A3FB9441D4B82D3CCA650F059723DDDE226A115CCF8D5B\n58FA9CE5F2D0196F9375D700CF1CDBF9B1D2AEAABEF0995AD222B029BA7078FD\n580F9E1870AA46A24CD73D4B2C17661FC72810EEC943323FD54D7AC8AF6AECAF\n3A21B73EC55C3D2F4C9BD2E66343430FE768EF9EFD2C744058EE373351313387\nC48768BFBDFB5AC3A1A4F5E30A0B4450BAB1ECB3571C33DDAD908C97D43D96B1\n881E4C0F3B10735C1E7A93E06953EFC0F3F45D37C323E5130566ACD3D9D38AD4\n7F1824A59CB01C197D18DF5EBA4929DFB55770EEEBB819A13BEE953421F2B743\nD52A49CB5A756DFD80C22879AA4D76D93BB0D68E10FD9D1AEEF64845B4F3D500\nD2B9E3FE48516312A3353C5B0A168DE0AEE1D89D410647EEA208824C193DEEDB\n3251E954C89FFD00D5149840A64AB2D00F3A842E62F5D102860A24972F0FE7B0\n1EC286031C83E9CD3D67C07FCF4B6C6BBD3B049C043E651C18CA0D34D06BE1A7\n79E2C90CB21A79DD9E71406254F0E21EB38C20A55D34AAA69A825418432C76BD\n3D51D426D82A24D6AD0124FF1EAF6FFA27D707F7C3A46001A9DADC82CDB6D7CC\n5F775422E36A894121424BFA2E735B9CADCEF94BE846F77DBBBC7B8E56BA53E7\n2C3D40A07C19743D018955B5950F86F2ACFD31F2507F443FF01FCC6C8B2A1168\n365A9132D606C41F3A31D614C6208E785A5F468976655B6C683C00A96AD8A5C5\n4F6E2D4D2F5D538CA2043309FED003E10025082934B6BFB23C026127D3A8EF79\n9F1EF0B149E3A1BD780851BF6A28134410A948BC8891473D890FB5425EA07C8D\n9CEC60EE58B9CB91066FB10112F3EC8EB1A00B8715D06DEF05DD6C4257E3B16F\nDC930395874B2D367FABF54A1392DD8DCECB0BC865AE213C7C9617FF550015AD\n5B01366D3ED9C1AEA03950053B5EED16D90558EFE29E72A082CDA83C0F15E21C\n1F248D8933296135AFBF9B7CC00910F82A31AF958B0E2FFAC54534B5BF118675\n0374FED23EA80E7A31D123B1F149C6E1A0FC280B16D9ADB3C9F07DEE2C3453A1\nEDDB3431CB8A61A7F9F1D7F773816E80F5E4AE34DF000D71B978888A6615BD03\n3676DF12C88173C3F4ADCB2BB8ED59068BD45F333A6BD4F7F7F809C9E6111C49\nE462C78FAB5C9AA32ADA7619839843C593D349729871847C19CCBFEB5F3B1AB8\nA45076C9B9A249A80A313EFD3373A9D5927B1141EFC0277153EB4B8D62121588\n7CA1E44553E0C20C2A922401168490121025ECBBEF49237C5D1B3D3633E15EFB\n69063DAB1B52B6DE7DBB028D83AF6A12A81628BDB8485E4AEDF92EE24AD649F9\nB2672501F2F5FA5B39546D40000139D9FB9EE8858FA0685EBC1570BB8675EC4D\n2C77C4F1EF4EA448DA3FE639725B41A955852289EF72EF71CFD2F001DD8D2A58\n34CCB28DA8C6AC45F8CAFED7F99E8F7D29219F218487B8870886866B367B96D8\n5135A38B4F1CDF5127A4FF8D976A926C3800EF47D73D4349245812A62B526FC2\nC0188434BD168F2EF872450C27DB994D55A1181513FDA80B6749D76CB9F3C51A\nF06B9351B5E52B20C4791ABD39EB3AA00C13CBB7E529FF0857155FFB12F3AFC2\nE39C0398100DAB750E41DB7F1852A17514BAC0ED122653BDEA9E1A2E72E0927C\n1841FF5F8156A6FE319C753AA2CF8D823244EDCF9F0B25B693776EEADAE1D2C0\n1C76BE64BEC81C27E157BED2831128E20EB6F07645BDB8F8B3BA5C337A07C253\nFF12DBB04C32ACAD73F2027DB7686708E3B1CEB4C1CB5C13DABB6E8FBBA02E41\n5B654AE4C315E5D6C1BE27EB4171DC812067B292C0998B7C501148B903D7768F\n92DDF7C53226586AEEAABD06E240B4665293377B791B050C868B6E8FCDA62591\n491E7A4E67DB45C5DD7E875B7531853758D422A33A31412A526D2C2366CF03C3\n33B1A53168D8DBDC489885985F7CC5AAAC5541C9AA0C4B784647BD1BEA6C9F3C\nB3A0F26DB7E0B030623ECF92FF2C64C4F405B93255BE56AD12928878EE4D32EE\n16608F71E3760908F62E81FD324D2051B85932E51C9035E15A0290254EA1D4BE\nD9755F2B003C8DE2D4EE19BB63A2363710F6FF22DB0E6B870B06A326D936B040\n4AB8917DE1EF33978BEA55E03CE2A69EF02B153BF151E0C8E229B6B4705277A7\n2F0E26758054771A88C41C5CC82134B6405B6EFBD4B2F01FE28665388EEF7CA8\nAB482D12592A5067B120FC3B3EB168E38C5A614532AFDFB9ED4B8B0EA36C7503\nCC7A70700047081FFD91E698A3F2331AF3B02173795C5B874AEF0E035A544420\n59994C5A686FEC9067B8C2334BFB0651FB56B87B42B0A02038DE9107694ECFFC\n0BA2E9961F5A7997B5544BD2385E0F57F963546B4C4CFFC8DA40D09C3B8A94AD\nD1CD5123D01989A436DE223398AF6BB26D0CFF69CD3ABADCDC52DFC8B58F2C98\nD1D4F00B36CA481E238A9EB22D40454107764A6F2F219BDF4F2366951134044B\nB038899481F13B36B16A0B38C0FA892C6B3634CBBED089BAF150DB1ED160829E\n8282F05C3BCC828AF70E4A5D85502B9511EE3582A6F2C6EF9B3A3FDC8DB23D9F\n56718602CBA86DED89E3848A2B8F0121784CF6F62ADE3FF6F12E1D771503D5C0\n95951D661530CD7601D301321C02579D00B2294041FFB35249A051F221F11D2D\n5A8E3265A0F4D65F7A841B735CF7E7D6B1E796542EFEA9B4C3989CACA7A82FA7\n7E09FEA47279EE05D728A5608ABA868DC1351C36FD7ED584B0F217691ABB97F5\n30A4D05C2DAD06753F8B7C9B58C543355AED4111CB10A43F857DB27718013C89\n499CF7FB66CB650558E5EF51D25DFFBCEE294C8A89882B429A592EC210E44F6D\n243CAFF9A087460E7E908DA998B7C2C174BB00BE89104C7432664678F65B0739\n2399BE7FE3D2193282BDF772BECCD93B1A8100AC3C91E69ECF4A4087FBF71DDB\n217B747A655D89872F25DEFC56F18C4F7E7571FB67E9E224C1456F10637ED71E\n0A16BCB71FD31F3C20260DF0F061B84BA7EAB804D09113465D7189A6EC61216F\nD6C35BF2C2DF31549A7BFA35A5102B06D26FECAA1C98D81CE6923E5CFB434673\n8568DE5B7562ABA42996D2F32FEBF0E53E67DABACBC4F81D5337C819B9EDB878\nF444D1D1D6C4094451A92D4747619F16BD6BF9D65491FAD9E58BF71BE6194040\nDB6694AEC7427D10953941944B6D99CD0AA5D516842451112E806EC9E720BB18\n0B371BAB7B4D641F0D4B814C1D4B467457129E3DF4D2AAAA7A951FC4F19B0764\n10D20BFA30953352F8547414ABCC71D98E4453A4C8CC0712930526748C65DDE9\n9C42AFDD633BB0284D076FBB183D54BC7212046640C4AF478C8C7406C0C18134\n3CB6F50AFCAB549E89BBA22FE5D10CCCA08F6B4C20749642EF8C632E66E2EE72\nED207E9E373303774540AD8D30196B64D097B0695B1161C5609744D6ED381277\n34671EE350DE70583BF4D9C71999CB5531190DDD66B2F8F20441CEDC49A8CB92\n04C57A6454D213B38618C52A7BC9D2A64CE66572BC821B7678526AE7CB06193E\n027ED6466FE5015A8DEED88B9D9FA134DD966BF9D8740E98FF5E1D3DAD91F2F0\nE9D58ED311AB25ADBE7008D5D12CE894C447611C3915703D09C36EE5C92AF7D5\nE11D6D1583BE4A2DAB0BC8664D846B4911F0426DA95E46333D174A531E40C40F\n869893BD3CE2F883DDF1A2775AF8FECB6505DC9338D9F7F18066CF809404C9D7\nFD14D8508BBA0E049A6094D08D6F9444F1C9E209EBBA7395A33C89E29ADB71EF\n7826D01AA8EC7E43E0D6C4F2BAEE29BA45831F7CC067ADCDADC4292035C008B5\n8FA2EED4742ACCDDE77512AAD5184523C6E3CE54DEB0C81FF82863AAF831548E\n9CD5857C0EC762E92EDC793D7B372ECC83828DA44FC38C205374FF00C6A9F550\n969230BF250AAA8DC7F50CF420283B28121E01386E5CB653A908DAB989246D77\n90BFB61B1EF79C45435CACBECF2087E6529661FADEB6C73C021FC6B7EEC0BDFC\nB91C8F1E7081F131290A9D3AE085B3FA03EA22BD28EF415158E52A551DFBD855\nF7CDA43CC06AC4B3AEB52A176081C1C7305056895EEB3737AF3AC899D04EDEDB\n3949879C330A86F67A7D25515DC0CE19C6B7002E6CAE494E79984362FBE83061\n19D1E4D38B0538F35F6C79827E1E791215DA2C325991198962035C954D77E413\n852939FA0C7B4233D2751218361BCF71D3BAD2CDA4AAD2E1FE90A7857CD715D3\n0F78A6AD4739007F27959846AD87FD4AD784795211096B7756F3CA53A32645E6\n8CC0922A4A0E7B4FAA4F5BEF94FD3855124DB86683F6F7AFC23E0C4DACBC89AB\nCD0950770241CDEC1144C57106B45A76E2A74336991B226C7B72934E2A684A0C\nAE47F41F678FD634D264FA2A4A9B64488EDD245CDAC654CDD29CE2E9742DCB7F\n575A09A9B01F03858DCA9297C77A783C1053E4C11F2F5E723EBB0D4B2D1C450C\n64C39F79717E8A0CDED4C815DEC46ABA76A78EEB325C26CE2481CBB618C0D512\n379FD3F13BF5DF07A9CF0E1B90A3CCC5B1AE96FE98B69793AC6345A59271C77A\nD934EADA9BA6F1277ECC304F2A9A3BCBAD6FB58BEE623470067EDD7342C7C07E\nAB17C015F7B4DF3423586DCE2F06250D9D71FF03356D2004E949B2312C3216C5\n33980389787594C80DDC5D07E548C7FBDEEEA4056CCB10BDE2DD8B71056403FE\nA4B156F13138F47F12B2AD3AFBB857734979507CA1BE5CDCD0D7B065E7BAED12\n3F010A2FDB1643039EFC029909B70A6259516E205BB3544671597E2193AFB9A7\n638B114A4B1EA6694B2B864E260D7F61BC0D11AEBCEA1164B991A1DD86197F90\nCB84FE3C47704EFD0D0305D36A9553E9F074A6890F0A3049EAB6F4EBE74B578B\nF62C22EDA19A92639545D8CCD34FA6656DA71A7E29DF0AC5E54DD4957BD2CDEA\nB80B2BC3218E9488799E4713451A4414EDBDC16C1DC5BBC11578C025FF057D94\nFB51CD5886FA30AB61E5F148CE7B2827435BA7786EDD3EE596440CFE53732139\n2852084F2BF7126C4EBD633B149E72065D555C9C374ECB5E7773EF28649408CB\n7BF5EE7F844CF3D673E3BEB37F27EA15B89FFDEC436F70F227672E5C2C3BA69B\nA53F8F2DC82FEDF611E91B0270F32929152EACD0A1FD02DA5EC5E526AD508724\nDE988AF8A427547BA1EE018CFB18171FA5836C029C1341C7616D946EA3570B02\n61974475879BCC1CA5658A46B4AB39BDBCFEA375B6D240EE70F51331147F93A3\n185CA2BDDA074760FC2FC276730A89D6256E84E8B853040C2018567E042DEE48\nBC36A03B19F72B9DD498AABA4FDF596F83034049A80F5E7A2805ED1E348589EF\nC1FFE7CB7D12C97DE483FCB4B7911790711FC10F8105AF7B919BCDBDCF72378F\nC0389032E69D1CC85124AEF7B8F5C0590408A932F46540FA1DED2DFAD09972F4\n46B69F5E16813336E7BFB7C9747BB85847737CE31115069721E8A1FCEBE36837\nAD52A020BA2B9B96B4F55A0C660A65748A0F646BB3E92904BF15556403AEFC77\n30EA084DCC66B3C182655F6A6EED5E1A2B62DE174B416B6E0BD3E5953CBE9D20\n2363A5330E2E8369A6FCEF6D9CE62E029DCCE1796C1EF48F6F5A28D27C03A6F6\n2F50B7F616BEFFE96BC511DD29864317F1D459C1705EA3FB5037DE3B3E5E6981\nDD028C7868F7CADB0359371E4D80E61580E4F51AFDB076B7628242E08C15E1A0\nB03F251F939C91E5B91FF2A77EC0743DD9ED3861D07B090BC9A15B50C7DDE7B5\nBE0DE944865639323720BBBD4AC5817945FC5F8450A3CA24D90CFF77B525600B\nD7E51561BD98E345A664C24BF5EE412360CFDA591384433F6AE676AA39F3B9BC\n5080D7A40C27ECF7ED9DB7DB07A75ED217954AE7F62C00CBA95BDF92CC9FAE98\n76DD90FE320C08B227872BF92D71825D15E82F8413ACCB6BAE7D9A0B02E3D288\n2D62AFD20FECD4CB5EF5589350ADB0C27E903415FE1B7B8A79FBB56BBBFBD41E\nA088AF8F8E2ABBCA5E0A2676CA728E802A8AE93B5471209856F32FED33961A97\n9E2F2F781CB56367DDA644F11C352EED734E20308194F0A02044D8BA0C2AA713\nF7154DCEFA7BBB82BB915B79769B49233052DBC2D56897FD10D6523FD739184A\n1CB00649293A949E826B5CC20C7CF8210A450A95A78B34A1409DCC085E7A992D\n99140D8A7754E5B1A81568EF6B215A8E4563C15512062EB5C0D983A247709167\nE5C239BF4D0F610911E07E71BE02928F63A52A78522CFF4E25E0F332B6045C64\nE671ECF882B8C28959C78C58113F9394C311C1FD313DF08F0F01705A8F315DAB\n3C2BC8C1FAC1B403E84BA129A8ADE6256DEBBC407FA73736885DBADBA70E1D29\n85E89ADC08B36849A220A15BC1166DFD57B91F1F42902DC5BC7C3367363B1A5D\n4E2AAF3A4C3649C53E208AC659722A25F3091C6C106DB72BC600AEC66F669CD5\nA738E2E52B36F9F9C79A2D68E80FB79E81F216F78347C03864DE4C866E0C675B\n93A16DAFD54B6557097F0E01DC5B332A34395868A90CE3892793C4E787D8EF0C\nA4DF59A468E451BC263DCEE2F5909FFA8F2111136A01CB9C772D00E1096920C0\n56065B58790AE6C399E8CAEC4F266B3D6317791D75C58675DB72CA6FA463931F\n0D57F2D44E387CEB46448D4944809E58C97F1B500199BFFB0A93272A0764ABF2\n4215BC01AFD64EB4806161D31F808495B6473B7B6C371F53AE1B01266EDEF78E\nB113DA8B28F97A9AA34BDF302F29AFC634EC40BF6185096C4674CA937D2B35C0\nA58340DCD18FED48355E514E3D91FC6B201D228EF19FC86A5BCF9C4D46E894B4\n94F652EAD7D70265838714DB981134997B0DB2AA2E3A351045F6C8CB9F87F043\nDE3DBC0E3DB372D6D83F0032D6CF6C2E130C59CB31B731A8F46351CE800E70A1\nEAA3D1F0952D82F1386B3155A0903E2A44CA30E894BC54564399DF459A48E6E5\nADE152369ED7C55C2844EFFEC3F315965F2BA3DBFD9DC5E0ADA4EA268A20A202\n121A9AEE342FE93FAD255B4ECA59BFE010D703C422FF3F8C6B44112D7B135A96\n6D14440F57AA65087E42867663BD0825E6857B19820592E4708F6E31E3C9E012\nF400B5C1A5D19B7023B76028B9F93FBDBAE439EEA26303B40566EA9B0A6FBA74\n78F1D5586DB8484D5DE7B89718276158CAD7B27A7773D385EB42E24BA15918EA\n46D127A675F3E85FAD3C052AC6D187DE83F9A447974BDE318B00C666A19AAD9B\n4AC0F451D8B4D780AB891FD65E7B71E809210F0136283E161ADCD58F5B226B9F\nD31E5DA81A77F23F2E492AECD21D33DC4FBDE2A195EC1679109C394BE276723A\n7EDD0E725B4F58142C782B21DF868E709DE81D6BA1F4C3EED397FA983E310694\n57B03A812DD35B82B23B88514225410E29471A983ED8D6356E559E328BA0E3F6\n7EBD2629E2A7BCDCBE5E98024630AB03EA9DC7DDEAD1D2A1FFCE72ABA0EEC3CC\n8E0007DA39699E60F4D6A89E3C57C6E84822D3DC8BBF214B59447FEFBCD51408\nD69C1E1EB0B6AD2D492B0E9FA03775CA0321942E825420C349C7280A052A1C9E\nE99BE3400E0F5D33E2EE2C67338ED3A91E2553AE32E02794C707F85F397FB112\n1288EEDC46EB63F27FF28AB587490CE20DC8C674CAF15E2C6EF2454866A7EA09\nB05DB3CC0F768A7BCFD792CCAC56E162AFAAE31205B5665251747CE6C7D96AB4\n3B56C3A43098065AFBA2F1582E35972BF130E59544CF94259FF621914045699A\n67793134E02DAF5097F1E3D955ADAF096FCB8F973DF109927BF6C202A4F26591\n90D1C09CB7DDAA56D8E96D4E1E160BAD8539439FC0105E9DB18A35F3FD6194B7\nF022901AAA5445AD3B7B58C965A7219BCF6E8EB035391855AA76EB35EAA7A89E\nBCA2CF75315C1D13B527B246FFF842EB3CB32D7F3735FD530DAA7B303FE19E2F\nED06966D924304D6C19D4D56435D973BB12D4333698565FCD6F757B19CE3CFB3\n1184F2FA70B2D5C66CB3489C86942D1CB8EFF4CAAE71CDCDD2A00E8958722F75\nA0D42B83D64F97149D2A798D56D583B9FBCFA05E4F08D72883E1796F99716531\n4C88B8D1F5EA7620969C7BB7290710F64DEA95150F07612CB4CCE0FDAF8547E2\n0D3E701B22EBD944165B3088A472F92C7D8CA6D0D4FD687FA3D5760BCCE1B20A\n0F890F73E8B8B7426C8880F7DD169282823E8AA80027796B3BBE1CA0DECEFE18\n15A6EF653D46C3C51C5D900AF9C47860D229DBC3B9160F407718F741E7BFD150\n318F81DB6A0995253B6D4CB9939F296491847AC1EE7576623F1DEED9C29FD27E\n978BF7D2CE438BED9852C50BD33232564410401BB38E3382543804C848DCECEE\n4AD72BE5DEAF36682C81DBE8D7AEBB04394C52835AD06EBF3C02470134278547\n2D97AB805B01D7D7255FCFEEE455569435E6A19304DEA207676BDB7F06B80FF7\n3DCF76E1138C26A74475CBA1B106D9288BAEEE113703753AB10E9D9E04AB9845\n354DFCA1758EF2BAB3671384CA923C5C0747BBE8685F3EE0AE29A76C351B5F52\n300F70C252F723EA7176B4927C04DFC25D5FC33D9544CDE26B2FB858093A3C9D\n239E3D43241F757A3E7D80CBF7B15C11654AC0\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMR12\n%!PS-AdobeFont-1.1: CMR12 1.0\n%%CreationDate: 1991 Aug 20 16:38:05\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.0) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMR12) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle 0 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMR12 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 1 /Delta put\ndup 2 /Theta put\ndup 8 /Phi put\ndup 11 /ff put\ndup 12 /fi put\ndup 14 /ffi put\ndup 33 /exclam put\ndup 34 /quotedblright put\ndup 37 /percent put\ndup 39 /quoteright put\ndup 40 /parenleft put\ndup 41 /parenright put\ndup 42 /asterisk put\ndup 43 /plus put\ndup 44 /comma put\ndup 45 /hyphen put\ndup 46 /period put\ndup 47 /slash put\ndup 48 /zero put\ndup 49 /one put\ndup 50 /two put\ndup 51 /three put\ndup 52 /four put\ndup 53 /five put\ndup 54 /six put\ndup 55 /seven put\ndup 56 /eight put\ndup 57 /nine put\ndup 58 /colon put\ndup 61 /equal put\ndup 63 /question put\ndup 65 /A put\ndup 66 /B put\ndup 67 /C put\ndup 68 /D put\ndup 69 /E put\ndup 70 /F put\ndup 71 /G put\ndup 72 /H put\ndup 73 /I put\ndup 74 /J put\ndup 75 /K put\ndup 76 /L put\ndup 77 /M put\ndup 78 /N put\ndup 79 /O put\ndup 80 /P put\ndup 82 /R put\ndup 83 /S put\ndup 84 /T put\ndup 85 /U put\ndup 87 /W put\ndup 89 /Y put\ndup 90 /Z put\ndup 91 /bracketleft put\ndup 92 /quotedblleft put\ndup 93 /bracketright put\ndup 94 /circumflex put\ndup 96 /quoteleft put\ndup 97 /a put\ndup 98 /b put\ndup 99 /c put\ndup 100 /d put\ndup 101 /e put\ndup 102 /f put\ndup 103 /g put\ndup 104 /h put\ndup 105 /i put\ndup 106 /j put\ndup 107 /k put\ndup 108 /l put\ndup 109 /m put\ndup 110 /n put\ndup 111 /o put\ndup 112 /p put\ndup 113 /q put\ndup 114 /r put\ndup 115 /s put\ndup 116 /t put\ndup 117 /u put\ndup 118 /v put\ndup 119 /w put\ndup 120 /x put\ndup 121 /y put\ndup 122 /z put\ndup 123 /endash put\ndup 124 /emdash put\nreadonly def\n/FontBBox{-34 -251 988 750}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891\n016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171\n9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F\nD2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758\n469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8\n2BDBF16FBC7512FAA308A093FE5CF4E9D2405B169CD5365D6ECED5D768D66D6C\n68618B8C482B341F8CA38E9BB9BAFCFAAD9C2F3FD033B62690986ED43D9C9361\n3645B82392D5CAE11A7CB49D7E2E82DCD485CBA04C77322EB2E6A79D73DC194E\n59C120A2DABB9BF72E2CF256DD6EB54EECBA588101ABD933B57CE8A3A0D16B28\n51D7494F73096DF53BDC66BBF896B587DF9643317D5F610CD9088F9849126F23\nDDE030F7B277DD99055C8B119CAE9C99158AC4E150CDFC2C66ED92EBB4CC092A\nAA078CE16247A1335AD332DAA950D20395A7384C33FF72EAA31A5B89766E635F\n45C4C068AD7EE867398F0381B07CB94D29FF097D59FF9961D195A948E3D87C31\n821E9295A56D21875B41988F7A16A1587050C3C71B4E4355BB37F255D6B237CE\n96F25467F70FA19E0F85785FF49068949CCC79F2F8AE57D5F79BB9C5CF5EED5D\n9857B9967D9B96CDCF73D5D65FF75AFABB66734018BAE264597220C89FD17379\n26764A9302D078B4EB0E29178C878FD61007EEA2DDB119AE88C57ECFEF4B71E4\n140A34951DDC3568A84CC92371A789021A103A1A347050FDA6ECF7903F67D213\n1D0C7C474A9053866E9C88E65E6932BA87A73686EAB0019389F84D159809C498\n1E7A30ED942EB211B00DBFF5BCC720F4E276C3339B31B6EABBB078430E6A09BB\n377D3061A20B1EB98796B8607EECBC699445EAA866C38E03ED7D4F3EDBCA1926\n2AF6A41F67AFCFBF3630C943FA111E4CCD988A7363F7C2B75EAF5830B049460E\n0D2B337988F150B9182E989E7750C51BA83DF37685483F86D1F47478883F3F6A\n4B7F768DA5AA89E8F163029ADD4A9209DE8A4F285766C06EA859639B92CCCDCA\nF59B1C2BB8D588CA754D1257BFF76B53984DF4937093AAEF79009D32A29A4C16\nFB610C7D6713482C48D7F9E8410C0F00AD6E67021056B6035534E79F05D14EF2\n4E8D8BB7E0851D7E745E9AFA5513C893594B54713B61B872897CC58C99F89E97\n047E817E1CB3441CECC1701D5E06AE758B8271EDFA5DA02CF82621EABB0D4979\nD8283CFB99800B921D60D479B130073EF8D212637ED3AD6EF7DC065BA884AB1D\nB1E19544E9875F7A418E9E665DA6F0A14D5F97DE5FBE84C3F79D049DFF64CB11\n3071C0830D361CAD23F3749E973087B0C999C534290E68B654B468FF8E758C4F\nA7425EEA211BCD322DAFB09B344B1A2A666EE186DB29CD6C142C28A3D1DEEE78\n07FBA416530BEAD17208D3D4C584D655A5282C6A34A670EB55A1DAF08ECD7DE2\nB0E6DE49C6E95504FD95F06956D4B0B31324DACAE875C0F1FDFD93CEBD6B9739\n6F3789A33FBEEA8966F9191D5179A0FAC8E9F00D2FBF8F00D3A5AB4A28E41965\nD517D096819A3C96BF4D19DD90F3BBB81EB414ECF106718ACB08F7DBAC79BC11\nD5D04E959978D80A65AB788CBA124E20110421B1CAA56B62A4510DBE8966605D\n3E7BB8B1465D4F8D69D209966D3963F4DBDF00872340BE0895E3098628C8B557\n752ACAACF788C72F91398B94FB7322E0935DC43501A6A70BC1BC16B5B61D74D3\n976963007B1B74F48C517586EB0F6368AD18E121B7C489626918EEDC6C8F5819\n55B2635B6F09CCB060973B03119D9BC1A2B947A7DABF15F3D6E36DBE68C9BE7D\n283BA2BA10F04BF085F00F0ED149F3C5FCF359158B579098EBB44BEFB1B5EE1E\n29A45F88905B55825E64B3922F7C686A450945959227635AC516DE0A246B5FC0\n401B8035D89499D3B69A15A314A377DE2CB4C79C88D1DF8AC1874FA6A7CCF4FB\n602612E456F822009AB12981A05BCF71BA2694B7DAAE44AD07DA72AAD21D346B\n702D4AD56402F4ED0E9CD6711AC70AE3176CDE71132654CD243F26D3447DF445\nEDDB1D99A0F7727168BEF8DDA286DEB3ACC5D9B32321C23FB526997261276168\n60AF8AEC2F03CA33A8A9D28B35B537AB476967D4B7223770D2ABACD0E59DFBBC\nEF3E7CA754240CC64D412EBF1F5E7F00DF3FF89AE36FC6CAA9A9B5A4E29B4201\nBBA2F76612A0F3841501DBC4D06850974B9C5AD3385E7A06C93154A376D25126\n3588CE46A814CF51057C8D8E0B834D2D330719F4BFB2CBF04502E2FF2CF075A3\n02FC9997B038CD90A9064FB0B82295A9F2C1BD9FE4C47A922464128FFB252389\n33BB0D68860719A38BCBE4527B8D6E41C27DABC74125D01E9EC11AC44851053B\n5375FBA548C620C42E64550EBD320B5B8EDF2B4718B72ADEEB88509BA56601A3\nA4127377DF87C3B657B67DE2D2862ACCCE9FF0F12D78165097D8382F4EF84C52\n4680E5AF672AA5E6A8608315DF7C930F2A0976A387958185A62FE21B3612AA3A\nCFD1BFDED02D802E3C28B657D1433E6565ACFDA04A1353BCEBA59B3516B0FC64\n6F2B1089732D79897BA25A228EEF948AA3DD46DBB6F87F692DDBF2DF9D000B13\n63D3FF424D451729C63BE3647305B3F2BA5292A33E0DDF66AD4F63275C9E3756\nA90E280FD6E697033FB3FAF13CC2A38FE4A3020248F7B0223E24B0416F2C6D87\n4D9BC2A46F8C7161EE4AC9BC199168C1466B8F0E5B2748088B26E7746DC61B49\nEF52D0B0CFBE78581EAC3283A821991DC9AE6403A360323D9D1B8D8301F74F56\n6E85992062C46C6DA7F44DE5044320E1FADF9676901281B1C6E728A69C2F2A99\n77ACEE74BC1A558A974C3464B4677883AB7FA83605E870303D1D6DB2C87D7AAC\nC7CA107556D7BECCBCD68ACFAA88FE2C2CB16F858FEDBAEBDCDDCB4F41AD03EE\nBF0E3F1CAB084F0F1A2DB227351212FCD26CE48FF6BE632D6B0054BE8D1EC130\n0BA9DF332017E749D1966657D5FDD5BF38113BD4BB939D9D3F9788498F2B217D\nCAB2EBC68BA862D99EC762032AECE8D5BE3CA8D374292CF5597AF8DBE47B1DBA\nA210C9ED086E0178FBD5E23009C92E3889A95FF4421CAEA1F7A941AA6A321122\nA92D558C499ED7E3397581E7C39D3F0BEAC01FDBE0295BC42654460268F646A9\n6B629B9ED6230C4C12C9DCC9613F07B9D8CCA532D78926714766D56F5F8E269F\n7D8B2D9487D9A58A269477BB1FEA9F22F9309254AB4099B182BF5A70AC113EBC\nA52E174AEC171FFCD3B79127F955DC6A8C7822333B1DFDA9B41C5807D8F29E7F\nB8C9F3CE34E0FB85C4AA4D37413FCBC5F3C6718602CBA87EE751705007FB1D45\n6F87F1E3EF183CE293DCE8E76DF06F579B47F65C56256EFFCBBDB8F70BB0211A\n505D9C5BBA83163808159EEFA1A254DF2804F605E8D71DAD7F320A49D369BE58\n961C2A71D7C05160BD51BEBAAC360621FCF016680C2B02CF29CC67E4FE55DC1B\nDD2075CC6B005D461783BBB4357A6D20D4950B18B1604C07CDCBC8977B04AD82\n98681EA74238C97BF8152E13310FAE4DA0901C8FCCBD8AA44B9ACA59717ADB56\nD066BBB43DBAFD633208E92FDBBA0400468687BF53B3EB9A1A328B239270AE2A\n726B2D92EF1EEA6916D2F34B9D992984B70F5E2DF03105E7857E881EEE9A9D90\n7E6BDFD75258A2135010EF8936DD68AD2D83E7FF9D10CC5C048C6586F9D6C712\nD1FCBFACC05141CC6F0B138CE11C5F7AEED24EBBF9EDB34365A371C9371C9813\n9A912E53F49EF0B2EEBF26A444912081178400A22CB8129B8BD3E86E50CEDB95\n08715A773BD1CF2B3E9F3F03106FBA44F17A876A27A72B47F0A9DC61CE42B85F\n671B3B52E3045F3189F4C42800C94CDC08EA4BDA72BB14255AF47AE2B8C61BAD\n487F09D3C9A6600D0E5EF41FF0F6CF0BC9FB87F606F263EC98C1DD8464C0F2B0\n2283AD9059318DD750F18B41EDFDB22932A4B39BC89D8330C1D4E4387BC596AB\n22A3A8DA049492D9E4A1B0F4C2C60AFC71949F7A48EA20F3875244D26D244D21\n090800DDFBE325042AE16E0F170001BCFAAF1CCC71D86F63017C566F54F927F0\nD22C8CEB92F17F324F1A3DB3A191DC28244D97813AB25088C93F9431A7A1CEA2\nFE31BFBEFAD9A1D2D113912FB4ECBBFF22048F1AC1612F5A745580B2AAAD151E\n9439750DA731FE493D0A0AD7DA71116CE65713F46A9D67D445D450018007FF3D\n7EC0CC0268C9EB8A63D88FF80EE4C173E17F03845C5EB8BD32FED7B00BF3C2A4\n6754CD66BD6DA0587AB347BC660F40FF4B5EDEFB62DD85EE7207E6BD3B4E4A43\nFFC3382F88D990F36F2999457644A0A8569598BDD39CCF613341965C6411CF21\n527877ECD55CC2AECB4ACCC39510168AA38C2CD8F82A16EBA5ED81783F377178\nD171028D63DBEF0B7DA43606A0BFF2355DAC1BB252A47AC70A7174206048398B\n75A1BCCB77E18F0CF31215CF77B5D2097360DB1A7E0BAE2E830071477C1BF648\n179A226EED3A50370CE1F7E9C2D67AB9E644D1C900CC2E6FD89E679571D5FE7F\n54B8ED9FA2B5B0B568425084BB5B5813F04AA80ECD4D4F9EAA662E8A5E3C0802\n38262C1229C3E5EF8F131EA7669DE358D46B122A305FEFFC7BF5318262B879B7\nAD289AE76CB235FD92064A1DE8111FA4B63EC41B7A24E56CBEFA433B35A8A466\n447D2EDA2ACBEC7DBDDB88074511502591AEC4F283754345BCB726B7C00D8B59\n1B4830692AEC7E6D34CFF89C153AF2C1450932C341F7B34601709DBE256F0B5B\n323E19060EF7BB3454E3D28ACE69131B2A43E00B33FB42E00EE17F5C94D48021\n461C257187C788405751EE22EEB26F06A2F9A2B89DFACAD5F5A8153F63F02115\nA7BDD8DF3C61F5057F8C08B81254C7A193F3A7DFE73AABD1EF98190644C5F627\nCB11A37CC26C31DE61F5012DE09E5260BB3C0C98EABA19E397A2875A4640B0B1\n9CDF51F48AF4AECC115A76F2DFF46EB8704DA209A666608117A79400E78480CD\nF0C2CAD733D1B5037B5E775CBBC28BD0ED544EA7E706FA84A6308ADB97843E6E\n54DDD680C98EAF0A3378F641FE41C6E39054BF298CB5ED34B46FE72981475D6E\n27FD9E7323AE9433E76086B51B90737559C8984DCA60D0D5A49811C58B7C8268\nF3E4B956858F54D805891F40006F4368EC4BBC418ADB035EACA6661570240828\nFCF2EA935212604396628482D0748D17B3F971B3BBE67DC7907F42785266F184\n463C103ED175D5EAAAF0948AB7362F9BEE8339EF3DBFD4D739CFD5EB6179E2CC\n7602B001804EAC3184CFE0C045F2F54074048ED3A232C7D46067D09F1E3F409B\n6A0F7F0966E30CE1BCAD9925011FA967096D039139F9F10730DA84ED894945ED\nF4801CDA47DA6558E3038F0E7D922DED4E582495C63FE4043D6EA4ED4A28F000\n144FBDD621AAD90C9E6F955302CFFEC58AE429D360A29A419F6445F3B15ABA65\nBEE925F985651E238EDFBB46BCDD35A428456F691651327C7FB39646DE5F213D\n68113557E1AF67552FE8C2B633E1CF41B5E67B005FD27186B1BB53D8076474E2\nC16FDE84DCDF235DE8EFA5F29DF62A54D95AD8A9C43BAAFD61266D4B9D9A84CD\n16A68B16C26D57238D139D827FD6F49E7AAA223CCED956E4FC8762FE725A33D7\n5FEAAB5E0D3D02596317D82A72099207ADF79740A8F225C6B479E4E4852E8D05\nCC6769867ABCBE13814C46EB2D16769F28C31F51B16AE433BD64D96E0D54E3AA\n56DF4444D0BBD32AD8B1E26A8F42D451DC7571DDBB977E6268402EB468B137DD\nC664BE4C1530DF989EC6F07471F3DD90332F65F27F97C506EAA7F730DA98ECFA\n491AC0AE0ADB8702DCF584C3334165A2681D29405C6107B6CBA9C57E38D4E609\n756890D251374F16C409ED8D3EF63FEED56FD14AB278E56602844E9A5E5C6E03\n0EB9BC322853D5E2BDFB5DAD13321475205CEC216F118BEE95B0BE54377D7F09\nC5D5B3ECE211C14E7D37635C52E0FF38039385C4A601A4386AB03355CF148D2E\n27705E9801AECD34135B9BF688DCCFDDB7B606B0E74844571ABA3017F8F7D80E\n89E6617915AF8AB17DBF25713BD387076F46F5E1B1D73847D194997E908FD40E\n167C2E5B3712CF8283849334B6C0B4EBBB96481468435B8C55EBFA1A54655F58\n4E906BA491F877EAACD4133D9575C89841546D912A999CCB3CC35338AF198CBF\nDCFF31C347B47EE99BD892CE7EECCD92277D7930C7C1619120C921C333F26839\n4F4C89A7AB99A5D0C2C1AF871B152C2A74CF38B5C7B4CE669A444EC917A45B67\nAF33392923AC2594EE040DA3816E9B4B7216AD28076FF70F8E7E1CED87817548\nB4F8439928994261CCCD73CF5A0ECB789D6CB3C5A8F4AFAD03D4C10C5D043E88\nDA3EBA4DCD3AD11C2C1C665441E0158E97512FEB9CAA2DAC070B5443FA0B46C0\nCDAFFC29DA9CEA8F57287FE9FD159060D8FBD678EEE4D3B80DCB854BED03A1E7\n67834184EF0AECD60B96945144C3C1587DF0C51F320383E338E565F27EB5C59C\nD516FAEE1B23C13342EC079A14A03BDED741C7EF5ABAA7F5AF0CE7549C40E4E9\n12CFFDF1D048CD8D3F4D422D96FF8436850EE96DC5D9E606C2878515D7C6C14D\nD0385D57AD32BAB21DA8394BB95956BFC617FF56BF7D5898689008AAA5D24B04\n01466902D609875E9DF354E12DB5859592944B64202F0D93CB182FFC438021A4\n976BC771C6513C99CEB4647694E80843C10E3987C4A731DE7519916A76ABA498\n9D04F75BE66B1816B417ECC22ADA6B8631F42BC537338E9A6046A0A118F854CE\nAA55B004E981B8495222BC5C422AA917C4489E626122ECA91F2A40C7AB7EBE7B\n6CD9FB6798298B1F6D01C054206AFC7286FA9B6A7D633C4B08E4D0FF6A1F8AF7\n34DFE4209AE5D227E462E9019AD741547B5CFED007289C9D61E2214D7E5EB345\n7097140CB2C07C686985D7FA3D724749F07092A32A486692F7E00973ED5E72A9\n4A13B30D31A9D30D89DD2BDB720FC55C51A2C3F1B8A83AE82064A2649F5E5896\n3FA526B00E31D9A73C535C47169B92333356611A6C0DE38B857B29C8D8104B2A\n0094106F0FBC2050B0C2A60403EA236CB1A089228E6DC4FABD62371C66F1C8C8\n7A79BE9B3E9E6B9D1A074427B035E52FB962B7BF8AF78C3464B37075D3CDED57\n477D7E867C04A485A1AD366FC917F620AE949DDFAFF3751D0C2DEFB7E1745BE3\n6671CD291D6BEC53247A7D2AC595D92762C7DAA2F2A2DB2AE03ED7BD0A7E07F0\n4E4C7549BA6BF645C5F22D8B6787BCE412F97D0281A7AAE7FAE60C6D31D82032\nE61DE0B18F76E5F844C5AE9235E23AB0D033D8398605F979EB5DE1406B62CB9A\nB68ADB014726C7670352A72FB2460E01D825006F373025B00965580CDD378CF1\n0C79852908CD9DC0F3B3F77EB5B63A38C756F46736109BAF3D59E2E8BB5AD587\n5E0D737B019F05B3C0FE3D599175A46BC5533E9460AA0C472034645FF2C0C6F3\n5F6733230D4E3308A1C3FAF46E110078CBBA11D79E18F562160F3F2A83F7E499\n06972CA205135738E3CCC9B0D6BDC4C3E74BC47A816D33F761F33BCA75F3E1FD\n8190D0AF8A38006E727988128993A79FABE83638D93DBA863253B3F519E721DA\nDAEF4FEEB9CE02596FCDA95B645CEE39E95DA36E98F797B829848B4292BBC09A\n735A9DE6A218586C8AE58DD4EE9AECEC7ABB1CA9E4232EFCF64F721C5D911B03\n88CBFFCC8EC2552B172892574190AF3D69BD4B942D1E9AB77035B0A75A345F61\nD486DE71F1F90EFEB8D94C2ECA540F2A82CA18FE5FC30759029B2A9CB923DA5C\n9600C184E4CF4CE96A0BBAA7CE05DC4D29D342AEB16194DA5B2AA5097DCF436D\nAB2BBFDCD1A441F7F7E2B53CDD34DBDECB2768BC5BA7B0F46794932FDF196023\nD2830263D60035ADA08862277586CA38E11FB4B51DA7B1049AEB5ABD4275CF1C\n1D9EB56132112DF75D1C0307FA38E0D5EEB32BEABF2F6768CBCB90E0C9D64119\nBC8D878C27DD6E122B7D6C62645FD325254D1B6E44CA3297D8837677B71B42DB\nC66CE8A18CF0E606BB76D2C0F6AF2899C53EE4A2B03566526EA6E8ACD9124D2D\n2754F67119ECE628E96FF8A77F85FAC9CCFD2AB8B670E7668B0C80F29FDAAC8E\n0FA512A93BA4BE052C806BAD6EA2CE294571D2BB7DD86C9E8D38E3A69B92FD70\n009CFE1FA04066F3FC1395C9FDF513B4C4E2C5E9D35354215A27F5F650E72E2A\nD2EB7526B34B8F527829EB61A0F4FA77B94BC3DFFE7E2D6AB5C295E747A75FA6\n2BB302D3E20BBCA511F111A6698D8366090E46E0CBD91E24E5C30C8D862560B9\n0D7A783B2DFA6E96E78420C9D872088D7CE8EB6A72954AC5F696444BC45867E5\n176D4AF48A5C066E4A2C9D354EDC174B26B7197B829DB6B52FA5D2054E6FC3C9\nE9D8C32FDBAC3B996D4EE552C3102118CF97C2DA49C640C03F0DDDBE36110C35\nF95CC5EC462A99CA4FA5AEF6A0B8E6A8475974D8E20A93C046221D12947314B4\n4E345F98B8B0113BC534C49C46F3FFECF5CBDA585D589DB26DC7073ECAD47861\nA96DD25EEEFA2F9025DDE23F13588DAC2943EE0DFD791BE58CE97663CCB8A891\n37497CB201264BAD52C6137718F45ED96026A164B24C6393FF465F733B0EA10B\n1C53662EEC5C92ED8710AA2C46EE148591C4BC3C7F4C9140DD813AFE3C94858F\n1A11B182C745C5A4FC2FFBDC3C2C887F63AAFCDA3FAB0B6D8BBAB5C4DFBDB558\n305465788B731FB299C360D0824B5DD36D3AF28D4C9007F1E9791FC32BDB1392\n9A68694725884D620B530D2D9BCAC34D9E5D35673F890E584E9A37D6EFFF9928\nDA62637DE07BE4CE45432F4D824D441F2DD60C08BCD1EF9B49A99288749DD811\n4A4233232E3EDBB404CAB3DBDC19FA33991DD2B7DDAF2A19AD07F179E0D1ED75\n07D2C16092554BB26A4ECDB42D646CFED08330A84077AD4244BD1C4FD7F1A046\nDAA075D42C79BEAADD2C60CDA4EBAF1312B4109D1021EF0635AF987E178FFE30\n824658990569E63B04885B7E9388F8AC5F64BDBD896C038472A9133CF3C71B39\n12E0A948458C05298929844038802D36B0C3B769F65048242F3C8B0D1E20E7E8\nD736D93FA5941FF4849523D5A25DBE7985D70743F7E36565099850A67C0D21CA\n4CEB500B329F23D2535AA13D3820288A64B86E23F7057EF68BB3906CFD70C1F7\n13BA17A0F96B3A7B96C7D4C94FEC65A9FC9CD8CBE1FD0A0AB1F28E40317C462E\n02568335049D814DF467A0BDCCDEAB8B7D450E24494814148977E1AF3FC9648A\n47E74D5237303B84A655A6569F670D4DB6B95FEB27B03B1B9B9EBA7E4BF51E89\n899BE2BA0D1C8F018E72A719498213B032FC3B8E6F09330CB4671463DB2EF13C\nF7596FB72DB19D58E70086BB754780FF0AF2EE6CDD907E28323DBBC5EBB4493E\n5965DCF303D30FC1473F5CF3543FA08BA6D132A9A51EBF74B22DA684DFB9F971\n1DE452542C6CA9DF3B86475520634631BF080AD497B5496819FB535DCB4E352F\n387DE59F0D0DDAFEAE7C0C58C2C7CE2867A0C7D506BB94B568304C1BEAE2E877\nC75F582697E7B536F247FCED5459AB7E8EAE5AF352A9B676DA68BE360881C21C\nE09E6DEFBE3D637BC8C84C1F9F09A81CAF8034667CA7EE0B781B6995A81FC111\n7312B38A18E495AF8FD88DF2D7EAD159DD4985A29EF341D434DBDBB5E1E63356\nA839E5F0E6422D6C8BEFFC1C006C18338C20358ED44CC08035ED066A75BD4E8A\nDD2CD3A4386BAC12CC44115E10F3A30ED47BE4E8E3C4CFD2A1EE159F18F315E5\nC55C72AE3987A131A2B184434AD51E5C9C9C5D0B6ADA976D4B988BDEA9DF6CB4\nA053FB8BF8707C94E1713799A8E984CC71A16431B9662CD6E96CF2B23424BE66\nBC61987C265E7CE8A78EE136FA638C1866B1E859A035FF6049A36FCF1DE5831D\n24FC824E46BD3B4ABA86D255A12CECCF27F4391795E897D9A6D0EE8A615C399D\n9FD8C408474331C8A8E5D9F5B242AB8F0C84F6BFF56BFC808F83F313E8046F82\n908EA601D54CE3A2C01458E11AA6E9B2F587E593A2ABC9C814D0CE387C5B4F62\nB8F72733B7F3C08EC6D39A330CF7B1F8B26F987AF8B57ACA65AB5AEA64CF641D\n6437E5EDBB5DFEA0136CCA09C0847951284A4ED34BDD6F1DAF7E47004639372D\nEAF5D064B075198607D79F9FCAE4A44C1A7E7251DA1ECA5249E20CF4521EA203\nE674AB41FAB02FABF3FD61C0EF46AB08FCA1B17E07991C6078ABD3D44DC541CA\n314E88AD7194A25AE4829281C7DE0156D618A7C93237116100BB9685D819E290\nF1FF915481963CD1BF838E01FB2CD85753AC8C91F4093B2763228DC9E88810D6\n4E2480AF96AD87D3D46140C606FC2F4BCB0EAFFD4B5E8E261A17097CE157BC5A\n6A722163875D8073741F2530E8B4678A9B873487C6D4D468EC0F5C41703AF92C\n016DF725F2F80C98947BBD86C7DD025E5CD34F95E74F537C4D5F309F5F81A8B6\n43AC20147CEC1A1F67CFE4B0A2B7A7BE4D1341EB52A7EE1E1B96D3B2A839A4DF\n0ABDD996FD4223473B6CFFAE3E98B62607A9F24361A820ECBC089975CC1F83B6\n7001F99BB8910D30BB8E7901A7541C4D3690C557F0D682EDAB402AEF42B7C7DE\nB8E9452F59289D6EF62C606D364844F306C92F86C6F8C22A5EDD9FFEDCD3B162\n6C5737185B3E5AC71E52BF633079F3BF49E58ACF131388C32351FC5E9A653385\n487C007387C6F3EDAC872BC1855D75D4B337D93CDFAEC65340E3EBA61D368FF0\nDAB1B4E7FAB1F792C957F7DF279D91628AC6C93CD72141A2FC1F06E613FC614C\n730EDDFF54867BB0F24B84796EDC2AB774C9C356B22B989C385772B350A57FBC\nD5DAA2B6FC79251E9E5901E3C28B3169B1EBD334D12E9C9A084A9AEB74BFB2AE\n1E2F455CFC927219FFED426FD03FFEA7777BA2771BE28396838589D9222D8627\n328276C0AA5813856D34C48677DFB0FD4CF3DC27F6FE2A13AEF0CB466E903FFF\nD6D2226D1918F0A915A2850E0F97E3E9DA21B4BE3F8A907F3E947DD5F04E6B91\n1DEF5F8F4660785E2A7721B9EB2B874B0E6CABBA16286699E4C8E0AB36FC2F73\nA692F62B35C07E9214C7749B1F653DB6D595C6CAB89101D2876B1983A15A9C41\n08F2601128C7706809C51DD0AAE2FD413235BD6173FAC498C4FD6393A0B8FCC6\n185ADB11413B47F2C72313700EB1998A3DB9EB41DBBA342199FACDCE1B51F883\n3A9BB810FC05618736D54DF6FABCC7CB8E882A8AF242E3505A60999345AD4A12\n5C0E9D753A3492F1EFF765C7517DAC8FE505FBE280D80E07CAA6948AD2C20DE2\nC25139C0CC8CFCFCD3327A284925A6D2B7349DE101BB5B948BF492381158F3B2\n8D68346585869EDFFB7C6428AA9C3E22CD0D7D3C138D2EF79550C04E4D6FE051\n59FC1DFB884F0DC9F79DD2DDAF611B2E75BA5860C2EE06C0B40EE353ADD64A70\nC4F67764C2F248B04E609A39B8B522D3D4DB5F6A9BB5B566A393E71BF1BEB0EF\nA0C492F288EC2A088B2B6656BD6F0C77E221F822D15D757E9B4387CE30AB1FF9\n50F61CD0E75805DFC907638843DCF109FD68BB8D2CFA5CF9A0B7422B5B1E4155\n9974FF6FA4B166298A29729B450D625934457BB004E3B5854B8ECC88AEE8D119\n403D6087F52F209227070004D13098DB85DC01BDC40B3B8E70135A588A23F632\n1F2AEF9C5C0C94414BAA82BB679E7A693E96301296E434BF059AC0274666D417\nD7AAC5884303FEFC2C6C16BCFB6A70247670CFE747CA68C647236243C7203359\nFD2A6F065DB08986AE2B8874725A8A4F80ABF12AAA39968D77B58B44B86898BD\n51309438FFA389253AA380066E5AB25BDC12B258A879B28EAEFF595F08120A4B\n5AC2FCDA819745FA36D270D6D8F85F6565759F73670E625CA1C15320CB083768\n17C1C2AA63E23EBF2DC1752AE7004440D8788BD27F5BB802695DBB11645B94D8\n99438BC08C81E365AA69DB1F425CF6268A3641D9F646DF5E40C83DE006B46AAB\n4CEF9072BE103D414D16C95E126BB6A26BC850FB819B885F17F3CAEC768C1988\nB1480ADFAF8BCB85636273576A6ED0A835B639543DF294900BBA7B930007DC48\n5523312EC53EB776D345C07F5B60B7CAAA20C7C9C490DC6E11FF824CCA61AB9F\n548EF13B18A9CA8D1A282093B31B6D7D8A39A6093A12E8FD49014AAB441CCFBA\nEC40C506DBBB57AC9829AAA8E3C4F7A0E16F4B40B6B7E2CF37D562FAB3821013\n7AFBE9C92856328ADFEA47D41A884D4400217E562DC57447A8570195693B147B\n3D695A193EF5B38DE2CD3306707611944074B97230E6B5D1A0A08C853C2D5EB2\n25B423A91A482199385EE58B0106CF5767D9BA15815C1017A91E3837746D15C2\nB71465D984F7873E7393E32914ED67948B4EC838F7E9BCBE6395DB43317EB439\nF215C91646AD7F4C99284BA30C15AC2C3EEDD82310F40631206F63D32668200B\n27D2173C010E4B7163B045F21D6CC18419B0000E02C3B4125267D946F707F1E9\n72DEE289953BC686B114CFFD2151D8D906EF1DB36DE4961D2129A6BB5D3B695D\n95A1AAB83751038C544F235A12673B04967F949642B38F511B76A1F94721611F\n81CEED967F596C3A801EC99594E79B673A20DDF065DB3AD89398E62B9317BAC8\nDEB4395A6F40B1AAC8E76755B9D54FF14AF6402B437C2E6970D3F36F1F8C714E\nA9433D7A64CD6F4406262F04ED4CC9A59E3EE0D4ED2B4E56FD68F45298F967E4\n1FC4D232AE57B8A8A809EBE0A7686461E8872B8C897EAD6B19242E453722A21B\nBA1A41544B4732DC73A7DA1955DE6B1AF5FD67CA477D335B755C7BBD241F28AB\nB5C8AC62A0148E1965B5EC6C60E9448FDCB35BDB4872C0D31D7AC262B51BFBCC\n1CC58797E3D9D826F159B849186B83AB9ADCCE38D2256949033C34BB4620A659\n83D48DD69956ADAFD1C854F4D51ABA9FEF95EDC674129F90EFCD67597D9B574A\nA7C2F021030A85ACF5E734ECC79B15DB156AD401CEC6AE80BC8329E1F98D6416\n0AB00998CE0A147CE1BD45A39395C4F6ADBFBAEB8D1A42A9171F6A733CAFB920\nD6905C42F7CFD22000177DB712145E9841539293E9A60DEB4A464E80D0E4663D\n943EDFD809DA124934A95663176232A199C3E04AB9E755CDD1B784BC9C391899\n7CB737F64A0859F6B60F2A8EFB412213DC14D5E0029D665B6CB9C62A33FE368C\nFC0ED0EBD48AE2728EAEFC217A1A67C79FB3B7F5FCEB008F454DE5602218463B\n452F253F2E4B75101B0412A5E31CCED772A578F7891B458FC6E8895E20AA2CA2\nA1FFEAED28B54AFF260FAC124732CF7E9F7CFF4CF3125F83CBDC7CBD68B775C6\nF73AD29E9B147DDBD82F7468BF06D3712AFE53864D4C9EEF270C5FE1577582B2\n5D57A6182D57BB393D2D25C35DF742289E4CBF3A378CDAF6A955CD3A99F1D692\n24E62AE9B6E32A7D43E96F502243BC94297C8AC73281F65B255E3331B0BD02FD\n6E25F8850C918DF9C034FA737CAD8C80BFA9E1FA0855218683BBB85BD38A82CB\n5BD9671C3B15961AA6616D1003E6A8C927CBA64FBA208FFC0369699F2965CCD5\n5745C7D31C47DE9AF67A418436BE6A1AA9D5EA43437F53893A9A31E0401DFC3F\nF0BECC56342A44CFF020D166881FB2A6112E519488C4591757F3BAE2310C3A73\n58FFE2CA306D46AEB834BE65B2CF8B620EBA7959BCB10DB190E822785EE9D8B1\nE452CF7C1720A0CCED448986368D00C2AE5194358B8E372FCBE4EFB883B484FF\nDF28A6BB6F346C21DF7A6E6A7D791E4C1B764E101F529F26E2211F5E4C485CF6\n81B30E671EDDD20F56C530E56262AD3100E80540D17C273BAC0A84598AFB3EDC\n47EAC26CF2071D6B67CD98524BB920AAF7BFEC8D6296FF1A9084F06AC4FBDA37\nBB1578D7049ADD412FC310185BC36A026F2816152030DDFD11DED52183119F34\nA461766F8393C973A306906EB3E9E418AB1274501E853BCF0BCDD86068C7D853\n86463248502BA3C543D7DD7BA339B2B8E5C1A78781C5866467502F173B364584\n1CA781F9F867F6723B0C8A0D17CDEFED6EAE0D9CB854B6A538FA33310439CE3A\n73F131620BE365637CA0989BC4ED24A8AAF3ECB52D2503D8EA50F383D062CDA3\nDE7B750252A7492A0F1AD92DC4E52F675E40D1EC9C40FC65DB1325E5874965DF\nCB9C37011F95D226DC6839D0A5FDA92C23EA401521F7C81A46BC6CC95E1CA4EC\n89B81E31A72C8663D5660927A8F1AC1359424413B70426DD394BAF1B7CA51442\nE17100D8C2783557FA60C57B901F49C55C8FBF229ED33EAA42D35FABE1EB0940\n2FDD867C4A8C3F4916119D866C315087FC81D63F04F7C4C14C46577299D482BC\nA9A6A15CA88124971FBA2BCEB72F408795C5377F519DD5979C7E1158509DB6A4\n90CE9594E406FD6F1E0E9D90961C550734F36C8D74C67C87DE10D2896237079B\n730CACD8CA5F418802B9300ACDB669D10EDAE255F09CC727A1F8A10CB95595CF\n6F56C1C713E0D6C4DA47047DDE3B33D43AECB21B96024E2E4A58B6CB8A5AE44D\n0ECF387E4E7E801C7C928360889805D9152548E71F5BED255C75AB7BB6E2F464\nD58BD5196942D615266546F4ECE4E82E19C5EC80AD4EFCE1D90E9A54B2313E95\n5B28C98003BAAB090E0874B45CF2AD91EDD39BE621F88D5D57EF4102A73DC46B\n43A35536BD29B94E900C86D9A917A5AD5BF881D8ECCF0E84B11574EBA9592A72\nB85C9DFEF66454A7D6B156DDAF1C3B75075FB9213F15867B7CCBC2178AFE411B\n503AC17867AA4294600A9E2B2A3BE2DF92045221E5361D9E914614EB110D53F0\n41FD1EBC1EC1799148C806958EBE4356AD0C56C5C3F050F3F0492FCF4E0CA47C\n41EA745B5044EF00E7B68688CA7D982C4D5F75F414FD947F70C0ED4A8302C756\nA759D211B2B55D74009C10178033FA3AD4E9F6AFB9A1CD8A2B7346BB448730D5\nE666C870B0CA21C3922FAE7E4EBFEE222B4BF4AAB7E2E3EE7902F621B834D0F8\n610AF27C6AC3F3BED49AB50149101ABFB4C6F214A2D22C6D57F919D75F3EB365\n7507C6FD533D0C9DEF038EEE85AF87F2B435EC54CA94520900C735B4EFAE6EA8\n6695396C92E6C89CBE7D5D9F8E167163447AAB8C06304A4389215DC788BB626C\n21FC7809E2590FF6B6610B04E3A0323953E377287D28DEB1B7DBE678B49B1618\n8E71EF3308B2093B8881C664D4F653C52371B0342555D4727ACA21803EB63E31\n14650D55542DC76DD3D21F50272287AE0F3BA3DE6D1D5A14B42C5B8DF91AFD68\n25D39A04950FBA0E3BD08AB9CEA85519EC2CF5A4E80EDB2C5CD7AE4DA3A0C2F1\n8C97AB477CF623EF37E09D0A31BBD3822B6481B33694AF1DE167E763E6AA290F\n7678ADD81F6478F4318F2726BA980712893B571733A50F42B82ED84753713510\nE1C7A71A7EE4111DEEB173CC80AF366F1376BE4130391C414A402BE5CEF81612\nC26632E8C4448FEF16DC943788E35221CDB435B222C49F64E906B710A9DEA60C\n87953DB29CEECAEB6A914366F2F3A90ABBD27C8E0D749C8734BCF0A226CE65D3\nF975BF11D4684D7ACF37F844FE92D605AF4F8E48485C3BB76C16BE4A16A21F6C\nF711CE712F3151583187F44870FCFA124AB51CF9EA203067641996CA52CCD419\nE2A3FE08A8E4FC31D5B9AC70CDC4A2DA74DC52A73B3C2CB9F8C1AC9096CED9E8\nEA8EC4510DADE27577F401EE249546DF51DCFF64AD5F236BAD1634CD96E4C9FE\n4762193B9382CD79E7CD50BEE28EDD2D262E1FAC18E77AD208E35D02DDD9C43D\n1AA6A65C89242B1F9BD7357F405E2CA2FA83C2FDD724410A7DD33BBE646BFB4C\n8BEDF3FA3204CDF75FFC5B361086F8726A4BBFD6805C154EA903D857BCE1F9E7\n31DE9F2B3160BDC931EB0616A6F7BE2A73C8EFE717BAF3AA65A8E745F7FFEE03\n2741E4EC0A3ED117B72AE7D8D12A9BBFBE1754C6916F1B78562BC1871B7975D5\nE7C501CEA8B09C8C7222CC97C253A25720A3FB9F198A87D95A8E6A2A7285E8E8\n8307DCA1B8439A3F3439398329202AC96AB9FC204732202A228DD17E83B21BB1\nC2DBE19E75ABD22446246B0CE40A9334C24C58AC1FB6734A1913058BFCEA576E\nA9D10E41BFC2E5F48604708796D8816E80A2D662B33801CF4EBBA0A04F1C96D0\nBB6054FD041F9F401E42A37258D7B3DF269620F8A7BB874FC5608F5C61130B22\n00406A245CE49B09F4041F1A3E3BF402BF65EDDB24A80B236F152B967FEF06FA\n3D18B30F4A6C371641483D5516A291E33634B84F961925DEE3553DE20E328C4A\n04BBFF0312015D714D216CDE41E3BBF622DEEFAF0793205A10D0EF9D10502669\nC6EFA9C6241ACDDC992F94538967B022E049A7FBCB2F3D0671A3FB4B22990CD6\n177BFE330F3514C6879BC437B2C46BB7A0BB6197C066199EDA21A4550F9F75FD\n7B31F6328ACEC15997B5FB90F1861612230F355F30E512D0C8FC22EE9068DF18\n09F8E21E9DC935A4FA1AD1B6CE442936EA7F38AAC19DF808A564C9D30B84945F\nB68346966993182FF3D2E0F61B4B7A0517AF32EEC1DA64B5D85DAC7B41A0760B\n35FB6E4ED1DB35990B32B5DAE4751DFD993508CEE3072DA552BD187EA9B5B784\nC84C4339946CC034D5C7CF38FBD0DD42B77D0780F2D5F411978A3CEFFB33342C\n31F42716194F45F729DBE463C4828FC6E4899E6B657ED07D805E474497B2A838\nAEAB105990124E95BC32E04AB631F117F13394068C726C4C06829947E66CF69A\n5684157B23190487C30CCB88F2FCBD4937C6746C30AA4FB9F4383FFBF2A1D851\nE720D438FF9CCA9E968FF20B2FFA2ED24A2018A5AB0C44CF2AB9922086669203\n9102BC9012138F0DAF419DFC571E5348AE3444C063B1DE616796105CCDF6110A\n42B6C1D09B570D246E1A8667A6D05BECA76EC56B1A8C627F0A2709B414BEE0DD\n62062E6A6D77269D857A350E9A63EA0CE8042D5E20BA4815A2F29D0E4F91686A\nB107797BCA109FD0EF50BDB8A06B4E925B2EBF03E4895CBFA691B94F17E1D35A\n1A9A7174E883B4F22EFC69DF1A2FAECB97707BCDD2507F592D4D9837435B625D\n57C474770674ABF54D5BA37142F19403B696ECF30ACDE7736F4BB480512500C4\nB4D3D30F7748C572CB41621153E34514EF8C5DEFB60AAFD3D1E01784A765E7DC\n9AAF821EB298927E7691DC87E68139C97B53D8CD65931D8470F67D1C13AB38B1\nEC4C95DC6962B83DCA85F059D46105DE23A30D9CDCC02D9B7E9E14155EF7D652\n3D356EC6F98E8DA42BF21B5C6D29C1C49331926AAF944F767BCD57487A615420\nA8B08076EEC1C44AF0A31A4E67464C8AEF789F1BA1A8EB1B0FB70114918F39B8\nC86D67C0C09F7F93554AEFA8F4AC93D5F9F2E55D5F56F257AAB3C5A476BF08F2\n1F2101ACBAEDEA6706FE1887098D933E789D3AB5761C85CABADCC49630F81924\n3063353281F73B93DA743D7CC650984F80103F46FBA9B79937EA32A5D265F131\n376347AEEEB56AA70D519216DDC5C31B350B6459F030F735E0EC602FAF1FC6C1\nCAD49237339F1ED388B03AD905D78D7E0BF7888B50F3A3E92DF14F10E3F5670C\nF2099A220E2AEAFFCFBE59B8EC8D6ACA3D92E6B2275028F88F8D4D2169C9A93C\nA56A99D3B8F245628D59D9BC797DAAA15C99E20E44578C222795F4722A9F264C\n175AEB30FBC0FBC7A6AFE9B06B6EEB9F125B710F4FE82D08FC7DBE2001DE80A7\n19C862639D33C064EA481C5DB267E6AA9F894A81F308FD6AB0500318A759CDEE\n040269554BFF1A72ED162CA7FF8E2DF5BC3CFB735C21978143EE3D276C4C7342\n51F10265669801ACD3FFB1C0455BAA38D9739599DBDE2A2C96D578C90B564D29\n830B1A36468B20AA413E9F58E5A3D5A528E630405DDC0D364E0698C0AFD2491B\nDE0E5949D8443D7055C5AAC71EC12C84E34D76896E99E42FBACCDF85C5765F8E\n1694E686A6C6222EBE58DBDD3F7582006FD0990064CC147D5D533DF4CB218AAB\nB8EAAB982355482D6C869C48F66A8BBB4A458CEB65CB8E8A3B4F47D0A6F24DFE\n178A3BFB05DBDAE81F5CFCC3C8CACC5332DE354340CC3FD8C5C6D15E56BCCBF2\nFF4F589089CC1BCC802410DA86BEB2D27D849DAFDCA8541524A14BCC7CF5F4E4\nD9F0DD0CDE92E53601D079C6E3CE65BA3FABA1E954F9D179DB75268FC9791762\n223C43F43461C3084A348476BF00A1FD73DE2E994D1F851BF487686E512D7927\nBE114D20009572DB801B72A01E202FD7249939B176DE96F3AE046B10359966FE\nF6D2A0EC35A5142EF3CE18AD76E8C41B199ADA76AA7B200DE5F48DDC57E76937\n3FA7D5910F09C7347A1EA88103C0749DE8069A53C81A773703762FA2C5481BC0\n0286F6B0E0005F876BA733F8E2122028A32E326277B7DE82EC1C6AEF295AA9F2\nEB7C19232A463092F02E3DBFC51DE89E5D78C4CCC8D0A930EEB86E6A0431467E\n0203D31656594404C266BF2D4A9E1D52E574EF0A28C5FDDABF81B91C4A40105C\nE728E7B5CAFEFB04CA6E93D2D75F9E1EE30F02ABD3F43AE8C63794FC428D759F\nF12914F746797F7AB95D492AB6B6716C6B4D9105CF47DC18FFDC74F95CCBE843\n6C4E656AEB806F44C3082D18822809266C7A284127EAC3FF8E7539AC771B5B93\nD476BA5CAC6D92A554770A03AE8F79223D5EDDD8765AE04A37435C64A486886E\n25CBC1E580B894E43BD6D9137E74FF78011773B0569C6A80A545601CFD419068\nDDB7CF4CA76A40CF63FBAE326E81165B872F28C4D284A91EBF87F7128AEE0D40\n213C0F07264EA026274492FF55D36B309D4719009D9E4154E836C08A5FFD7846\n97B2E64E9FF1A34236CBD4531081E4C4BA43AE45E8FF899F0DAB46750B31A011\n7B3D0A27DE53F6FA6C919086E809AA2AEDB88D1803C6BCFA403BF484D144B312\n5E35B9EC1368218ED147ABF151B237633A07168536FB02EEC3B0B311BC1181BB\nBC2DA7A56FCBEC6621542F5B1FF45129119658163DBC1A4305870135857435FD\nA4113B37C7A7184E6FCF7849A256B418F5E002179770ED7D373D14BF748D28AB\n438B2933BCB657E966EDEDD9207BD471E357DCF2EE9780BA17DB33E69A044F44\nB6AEAD38496D5F6D4EEA050A5F118F90DD08163A2B9FBE8297E33269DBA71D79\n49B99A6ED96098D4EE31EF36E08925CFDDA52C581C5DD359DED37086AD43F87F\n37C7B1A4A0A85920A19A7020AE14C696F7244F06D4DE9BA3411922807DA02AFD\nFB6CFB9F268A52156360233131235098F408F0695443984BC023F203F571D488\nAB1B12A63995EDB382BD50DF08B700026A21D39369F886DB2E181A38C0324209\n2541CD8EB7F1434D40B2C5C5349BABC073D3BC0E63B662FBA6EC9B14BEF7D4DD\nD57A1D81933A508D922833FB9805EE06C870FFBF91416B54107B0AE57A6E51E1\n8DEC591A5916387CF8D6D257BDCAEBE95BDFBCC07CA55D51C130BF3B78112925\nF8E420059C9E37CBC788FA30EED096EEFFF2E9B935895B1E08C8DF42F4EC5EA2\nAC9FC015D81B807098E1A95CDE60C7F56184F7FB352A4F25461925A68710F961\nF41B84D8F166D1CEE65BAD0BCCF508B4326D829A1D06F31E2BA3290A34319F2B\n91BB5BDCD57D10B86340B786AA31CFC3C2E71798BD1590199E8B9320026EB62D\nE45A36DBB43FD0B3DBC3C39B6CAC9EE7A3FCB5AB8067C0BD116C3094F022215E\nE4735991A75C63A04A50990DB5094CCFD8CF32629BE9DE6E068A250DA9A3C907\n8A07D76FB2B90E364E6E47A4DD4542123EA5F8D0F146B8A3D88B1D5D3C4DB1FE\n767093D18C2B154B59C234DF35DF433E351E06903E0D1845D9685927B831F68E\nA9AA671BE7FDEB9496663A59ED9A61B232D7949F0CAEA4376C39498913D02EDA\n9BC9E3CD5788AB1B64E536DE52088B9F4FDF415CC8AF13D8B1AE12D2B220EE59\nA620D447462F8113D1A77D540C3488B36EA0004C87CCAF46D2259296EAB59969\n7C76CFC67BB636AEA26E989C26FD8434981BD743643541EF0F47E1FDFE748CDC\n72EDB1B44345A080AD4FB3ADC6EB3DC9A24403EE94A2490B53C491A2A48FE562\n86E7C6AB113B6B039EBA2C53B60645C8517261B61324DE3428C3533C4EC0EEBC\n5F048B38F01944361AA911DE9BA85A72DBE9BC5C48CECF793FE4DD6A3745261F\nF0B4F6B2D364C9978A7981ED2E331F394ADDD0C7913A04F40C0999C9B419740C\n335FE3402D942C9D93B82E786DFC02BE2BD3DFC11F6FAF312CCE6AAFB9D77A85\n3FB0C20F315AF283E94E3DE9FD748DCB716EFBD53F7CA78E98A78A6D34444B1A\n135D0384095ADE7C028BAD167A846F0D6E19CBB7AB55CFD9933E3DD5E0A08FCE\n3EB7CBA62C8CBFF9AACE6D4310130E91F5AB9F177BACCC136F588452E83A953B\nB1BA42022FEF109499AA5D61C54081FB32ED1F984A77DCAB2D6594DEE362567E\nD41416024CDABE0A4323DEAB4E4F7CDA755CCEA4EB1C27E62F2E93EF78FE6B62\n60A8311EC4FF98621B0BB08F898E1F50968874FFF3C203981677DC7373E47D21\n1F834C361029FF918854BEA72E37BA193AF19715AD39F4F299FCAD75F44881B1\nFC020410B62EBFAFA41D1AE1335FCC531B1A83F6F61E\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \n%%BeginFont: CMR17\n%!PS-AdobeFont-1.1: CMR17 1.0\n%%CreationDate: 1991 Aug 20 16:38:24\n% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.\n11 dict begin\n/FontInfo 7 dict dup begin\n/version (1.0) readonly def\n/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def\n/FullName (CMR17) readonly def\n/FamilyName (Computer Modern) readonly def\n/Weight (Medium) readonly def\n/ItalicAngle 0 def\n/isFixedPitch false def\nend readonly def\n/FontName /CMR17 def\n/PaintType 0 def\n/FontType 1 def\n/FontMatrix [0.001 0 0 0.001 0 0] readonly def\n/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\ndup 12 /fi put\ndup 14 /ffi put\ndup 45 /hyphen put\ndup 46 /period put\ndup 72 /H put\ndup 78 /N put\ndup 97 /a put\ndup 99 /c put\ndup 100 /d put\ndup 101 /e put\ndup 102 /f put\ndup 103 /g put\ndup 104 /h put\ndup 105 /i put\ndup 108 /l put\ndup 109 /m put\ndup 110 /n put\ndup 111 /o put\ndup 112 /p put\ndup 114 /r put\ndup 115 /s put\ndup 116 /t put\ndup 117 /u put\ndup 118 /v put\ndup 120 /x put\nreadonly def\n/FontBBox{-33 -250 945 749}readonly def\ncurrentdict end\ncurrentfile eexec\nD9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891\n016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171\n9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F\nD2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758\n469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8\n2BDBF16FBC7512FAA308A093FE5F075EA0A10A15B0ED05D5039DA41B32B16E95\nA3CE9725A429B35BAD796912FC328E3A28F96FCADA20A598E247755E7E7FF801\nBDB00E9B9B086BDBE6EDCF841A3EAFC6F5284FED3C634085BA4EE0FC6A026E96\n96D55575481B007BF93CA452EE3F71D83FAAB3D9DEDD2A8F96C5840EAE5BE5DC\n9322E81DFF5E250DEB386E12A49FC9FBF9B4C25C3283F3CEA74B8278A1B09DA7\nE9AE4FBAAF23EDF5A3E07D39385D521547C3AAAB8EB70549756EBA8EF445AF4A\n497CA924ACCC3DD5456F8E2C7E36946A5BF14E2E959895F7C94F49137256BE46\n4A238684D52792234869EAE1A6D8ADF4E138B79472D2A90A6CA99E2394CC20CD\n3841733046175B20CEBE372327BF13428EED6A3E2FDF84C2DBA4B0AD584EE9DF\nB51828D3B8F385846158C29C9AC3496CB9692DD10219697B2ED4D425C3957FD8\nC4600D76E045C561216EF05D38177243C314877A69A1C22E3BEC611A2EE5A216\n9B7C264CF6D1839DBBD78A40610F2C0D7C2FE09FFA9822FF55035AD52546970F\n83EED2D30EABB1F303091EBC11A5379B12BB3F405E371519A53EA9D66174ED25\nA2E55463EC71A97BE4C04B39E68112956117C8252DB6FB14AB64534B4BCD568B\n246DB833982B38CDE7268BBF74B6B0C18091E1B1F87D32D66F4DD023D1F10D2A\n7736A960F72AC01F733A11023832CD68FB6288A5977743F781214D8FA9C0C3F7\n80001321D4397771F728FD9EE57CFE7D9192B887EC883EB1505068261DC40089\n7B7D2820F06515CD74513521F6397FEAB3AD3572D9A8269430E407E357422461\n1785FC2782047F4C0339D79B16862D939F3A37F78E4E2174E4FBF132539CB760\n207999FF86F6A3EBE48EB0A1CA635450FDEEF79EB16D853F3BF4B7AE5DF6AB7E\n8F0B7B8FADECE9C0E48E51C895DD009E3B3E3C28B42945FA2CDE1E3939713D97\n40D99D6CCD74AB469878914F22FF8C6BB53FEC98CA86799C105EA4B21794B654\nF12715066D86314C5E107B5FF9657D9077DA7784099C210729C1DAC959CDBF4F\n928120110FB949BA8B25E80D64CFE601F60B89CB9BE65A3898950886F1FB8337\n2FCE405368BAA640CC882DCE1483968F420D01EF598A9A7847222384AADBF75E\nAE9C448E7F057CC0E6D6CCEF3904287BA0AC73B8707AA41E0066832DA210F4A4\n5C54186E5CB80403BE2E07C3E8AD3257F4790DCDA0B0D6DF391B6C007B7E87D1\nF3F659C26CF2414659BB1BB33E246350771330900A9DB419B141E80A03FE856C\n120DAA46021555EB8135B3440E5060EEE616972EAD2342C958DFF53AFD9DBD7D\nD4857E33C4AF5CC8B22C92E4406343E93090D9F244B1C806213DE9728AC91501\nF18DEB5D98A85181DF0BB0F920755F409DB0027F54A2A0EE6EAD7DDA5980EE99\nBD1FB33AC9680CC5B2518BDC44CAEB89D054D7DED7148A932EF3EA6E6117E9B3\nECC96A0A96FF1A12BFD87374CC643678A53AC0546BC656FA5668E334074BE2DD\nAF626B8575B0280EF98EF7A69262843ABBDB2415813B7384D0724B19EEDF863A\nCE9E48AE156D4417E3CB821E874C70475AAAC1041B7AA35A8F312EAB6D39ED11\n9D5ACA54A6B417871AA25EBE2FFB6E140852C6DDA6D9F4FE9861CBC04F150ECC\nFF25A221281ED3FADFBC2C701C5AA284F746962999D7A69D87E0F04822C5745B\n2D319C42EF3B64833FE17CECA65A51E147ABA4D0FFCE8E92DA7087081B2B0927\n50E447EFF145DD673853555F96C8C8A970F474F895BB2E5A0B7F28872646E751\nE49FE747E3A60A097171B61020F6FC94BC2719D33AA3C0F733D777D8944FE97D\n8FF4569F156B774DCE2A68E2E45A99C5D35A65C24F3B3E22EEB5DB32D0E503AF\n222763CA5257CC1D6414D295074B66C47ED17B188BB16DE413063809B8423E56\n299B46D92514D50CEF79934D4237E6A14022048302CE21524AF8BBF4EADBFBD8\n09060F6745F69BD8F47ECB6118047A59BBF085BEDC68470080F28E57CF8F5CBC\nE110D6D19F9F46E0D44EDEEE9BD848DC9E371F8404A4BB203410F4B00A162461\n46004381914B4FEDC716F00B26C622A7B457A6864A19DE96D8EBA5B51FC9061C\nA47CCCCF67541CA210579AE473F7936CFF361E65D5D924B1E5FEA35345E36472\n941A9D404ED98AFCE85638B3079915E360055B6667BF9325967A12149F16D5E7\n8B36197FAC788603182929F3A847F4974AD9EC387DE4267204A141E2849A3AD8\nD88EDBF7008D82C8CBCA58D9F9976957F8D2D86C1C586DECE2E285FADFE5763B\nF4EE24784B2E0675E924E294B0F2625994C43DE427207499EFBE35B9C538CB8E\n1BBF54B13F6D020D2FCF848461FFBF50254A34E30392BD6F684AA478A9B670BA\n23A94F513F6E35919EAF1FED13B4E15EA78012DA7480F6C5A2CAD8729DBA390E\n209070EF7653719AC5735CBDF9F7BEECDC71F4A14D7A867DF2B2FC5AF76E0A47\n30608A73F6AE1AB3B0228C343327C49B26B540C77CE6BF23F84C9BE5DEA9BDA5\n560D71F78EB5445574A8516ACE65403A88DDC638BFE8F4EB91DA5844547B0AC3\n872731F4239E7FF4409A2B7B6B736C607C54C2C151BDAE0C2A3CCEB9381964EA\nEDB24C099F437D550E1465597AE73B39B26887DA44E9F11D964DA28BA558C95D\n8F2E35FC297C3C81D30E457DFE7ADEA3F1B99750984DFDB659C40AAA5E8C5ED0\n094904B46006905D8254D6E11846B9464670B194101E01326FCD68E821B154F7\n65B872973DEB00358F806320E99253CD445C31EF7F7E54AF0730A99A428F23F2\nE5BAEF26587783D57C0EC5D1651233554A483630E88194281E06D3EB2ABAA905\n51EAF02C5AD1A406EF44961BE20400BD9231482BE27A4B0FC93096678A32A856\n447D291E04858C14DCD61E129974A85368928BA18AAF442A7DAD36661B00EC0B\nD09DF3C992B2E6434595CF56174F9A9F6548474823F2C50547E8663EDCE882F1\n0AE71CB94F12052870C2130502B55C040CA854E259EBBF952A842D2CCFE0C080\n806F26899E3B02CEFBD4BB26A2E5E9AB2BE58C12CF3BF787892862947A76F1BE\nDF95C210DFA12F2DEB026D69EF991476AFE445762937205F08006AED54CA3C92\nFCDD80046EE45B9B2F7CD10B818981BF514948056F0DF7E609C87C906E0E196E\n3B21EDAD6C4512F4FDD032BA7C9038CDA99C8FDB30C048F8B7D114F6012B976D\nB33E10154E61404791E23B40A480A5E84F6FF4D626575B8B7AB77638894E7C07\n615E4D1712286A7A3B4CB45F3142FC4447A18B0CB29F6CA301E7DDFD0E9C4A07\nD2E4FF99D5FC43B83AA656F2D904B4F5FED5CFF6FF5BABC209E09A6F62B71C87\n4BA791DA8CFA33B3428BDCB2CFD5E3624803ECB867B85700A2D20A4E476E2333\n1389D19133F80761AEF6D01459F78A4BE4514817C3478F34799EB2DAC194CD91\nAC443829A58719FE1B07A906C7C0CB9C0434CC00EF9B6F23634D74A2DB89BDEC\n581C2B5EEE5A3822DC43C6A47791D566EBE3139B8D41089D2DAE0AD0DFF4191A\nB560DCD05F496D843CD1EF16635D5F942CB35B384836F0E416ACBAE24B81E73E\n04215AA56702FA93000C5C43E4A19F16066CCEF4BC431B6F5717B3F4DB664D16\n7C1253DB7A52F36A42C993807AEA39CBDEFFE0B2633E505C6726239AA6E0F5C1\n6E1042B9A31DCBB7CEFBC38B3CCA6C10DF37CF3FA1069F665FF013522929A609\n727B3E3E6ED63A61A5ED35233FB7549B05A3BDF4918F421AB6D49F4DF2E32525\n1830B565C63987B76507DE5AFCD805E3378A0ADCBBE90E82233B71544CCBA207\nE434EAB3DBA00A6DD7248F54829734B4B0997DABF377775308033620A82B89A3\nB5947A0C161A8AE8163482C3F062EC316165D2C10A84409732459FBF91AFC889\n4748F20CE89E86B288A53F721C2D532D4D7D38153EC50F3B070A9A31E4BC8AEE\n1760E98DF2F97175DC7675C837D6FCC4949DA033D09216ABD3DBD7D702AF8EC6\nDC5676B82118E9D8F5189D8C13EC10CCE157D663EE7497A871DD7E1B0DAF89B1\nC23B49F3AB9F38192963BD32DF3060E67BA03C8503987CDE5D989E8D6BE426CF\n42256849D5E482452398EFCDA52705CF1B18F0E94CB88DD541C4F5170F994F81\n24C67B7EFDE0167CD4FE5BF968A2A721CF424862A81F5DD039552F4DAC54D97F\n099288E070EEAFCB97D1C8991C5183BAB3075704E200EB475E2CF15031E88E3E\nCAAED106380BB21B13D44FBB46A8C6349F750585741760512195921964B88697\n427A288040726522052E2B8AD54EED83C19E60C32F4FA99980C983A41773EC56\nC5AA0E21352944BAB9FB19973313CCE7415B82E84BFE9CD95A17CEB2EB8A1A05\n6E32883FC7A0EA16D5F4EEB9A5676972DCAFE3BE9F6120645E0E1BFDE5FCCE89\nAAD14007077F48484076D1E0E237255C1CA3B1AEFD56F864854009CFB7B9B595\n7E2CE8F3C5FED78D7C2B0191D99FD9409AB829F1E887A3D679F1BCBA4BA0DC17\nDEF5B9F292F2F62C8FEA325609BA1B2D0744140ACBB2B9690BB4226AAE2C7C76\n278CBEDA8DB1528456B998567EFD613360459F7A8C3A1EF670AAF34752081D9F\n915DD7A87B22BAC8C23874D231615E70E6C188BC880C34F5638F99395AE8B71A\nE1E0A3326C7317C9AF24152FA2A92CA09856C63B517C81B607667413820EBB39\n6C52B23BDBD21477A4E7EB8C4E9B9F2D9157818CB4B4B8114B299E41CA1770B0\n8FDB78B3B3E3B6F367D14377283AB5200F428D2248A0E49B339ACB84D5F37763\nA664FCDB221FA66D44397BA4264AA27214C4B26645CAEAE821AEA4C0358D0F5A\nC65D602BB1914C4AB47B7CD2B047F2557F29EE86F987FB3D3EDEBE0E523CBF57\n2437A8FE8D57C958C3E7F5EAE4B1E410DCB5214D89BD35AEF87551B6E2A46F56\n786496E4D6209F93D6F99995964B15C7B58685BAD5AB86669D2C9A5F8A0FEC84\n3A315992212F3B990FEE42DEB8E2819F520A4DA818A8649BB6D905F276D86315\n0759B8A7FC670BB54C59840125AF1347CA7104B1EB746254B598C7CA76DC9E4E\n1E34873386608443CF18A1E0BC0DCAF37D2504AD353E9CB5A04DBC50099383B2\n84E01E0A9B2DD89B6218EDA818062983B8D7EC600D9E49576D83C5DA6A545091\n033FD3969AC430CBF25E32E0E70C690CCC2B8496E335822441B67AFB71438130\n4F8DA253E6BF0E4F10E159312DF459675019ADB7B2DC23DB234032BBE0179B11\n68B71618A541FA1B736579ED68FE326F5299D68472600E80FB2681CBAD39EB5C\n19689F083AF3FF01C58791685351D766F9F098E5F9E76DE5D005A7E5D8E84900\n170B97BF12C21CEDFA003941B98FB48A1396725E97D3C0D3A8B66E2171C4639A\n8B70904099BAE20B114E726401A7B141074B6C4AB3B1A046588E33BD9C2091C3\n78048FB2B1A16898EE11AD5CA93724597812708C6F63D662BEFE74DAE0237E46\n33E5D36021BF739E7CFA79F11FB5CB5395B581473560880F15E4973DB7773422\nA08B7B875AE0CD0304C85298335073D1BDE8BACF5D84E5E2DA186B4437BACFB4\n419931ED3650181E970376FEBD19593402851C5CF56B71479B7E86B8A194CC49\n8F65ADD838BFEFE3E2E5A6C386222DBB6DA554E2A90B21FCAE2CB84F8B321FE9\n6FC6865CDF1BBCB14C69D95A21CC86060024D8D702DEDF98BDB6E616B2F8DCE1\nAA480228FEDB73AB5BC0DB14F4A6DB3C58679B79681EA0DBE8E01799FE4A322A\nD7FF23DC09CC02AF4DBDB55A92A62B9F600432B6D05E18BEEFD57180CDCC62CC\nE20FFB16CA55073383DCDD7FCF819596ACFC88AA95895364F0F42A78AAD58A96\n9CD08497EA26986268B499B5E674ED417C651EFC642E9B5831181C5A2C503E0E\n6B6DC71196302BD62A5C145C92EAFA09509FF15F6D4C4BA8F59E697A7D7532D6\nE03F145E11913E2BC81909BB214706FEE32EB53CF50681A7365CBC43AF57A88B\n9CBE6D853F2C3A4D2AFA07FDC99975F111780F90B11BD3032ED9F74FDA5D2149\nB853C3E6F85D1CB4D5DD754D76A52AC3A3DFDE65D9010725C15B2560E5652D16\n542E2458C54B04A1211E00CC84CF24DECD80B2E6EE63310C614EDC8BE7E16D4C\n8C7CBAE692613A673AAB603F90183FECBE5893B1AED49F9492503EE121DDBF1E\n03D8C82C109DEFFC1B52376FD8E7D42CC943B15931360BF94DB7A9482077C42E\nEF7FF2B97D8F33A942728CBDEA6E8EE14AF18A5C48F6638707CE4B659CF4C1F2\n69D145103191E362485FD87C5F51C204BEFB157AB4F6053DD38E7B0A60127211\nE26233BB6A745C99F9A0BDA7FD5E0FF2655275F0B8B9D1E2370917230797A311\nD985FF1A969ED0222F10771887C50A6CA606D0CEE3D5D6C0383077ECA5BB62D8\n6C91A55EFB44D409E042E1FE0F5E883A2C799FC7F3C5E57E32E9AFA926712DDC\n95DF20F5B3B55BA2A9CF76D32CFD3E89B08E7FC08381F5E62CC38EC3837BB066\nD76655B3A70F38AC53E16A0E63C61D81A4E198158A47980B4529848A6CC73269\nE01B980DFEC7C1557D179F5998FA11DB7567C0A5D6331521AF20CD7135600DD8\nC58D436A18F5C2F5F2F1868BEE31F13039C7F4DC6310B1A38BBFEA0069E46498\n9910543AD67B4CDB701DCA0AC8981681BAD9BF8E0B945C3E75FBA4DBFECBA014\n76216284DACC8ABDBC0E59BB493EF02ACFC05FA429D35AE9EEE8BF4A063841AE\nBDD73F5B58A7B30ECFF2D9E2EC40098C3DF9DE23AB843149399285C6E0EF0448\n6810E9823E8122A297C5828FF6585C189C06544797DFA2533BD478574F8D3F56\n0833C3DBE17556C0C1E3D0173D0A449420EA9135125FD3E11533C5754802F54F\nED37A2365F03717F1A1F2B183DAFFA\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000\ncleartomark\n%%EndFont \nTeXDict begin 39158280 55380996 1000 300 300 (matrixelements.dvi)\n@start /Fa 133[25 31 31 42 31 31 29 23 30 2[32 31 37\n26 32 1[15 31 32 27 28 31 29 29 31 6[33 2[55 41 1[39\n30 40 1[37 1[41 49 34 42 28 20 41 1[35 37 41 39 1[41\n18[16 19 16 44[{}45 49.8132 /CMCSC10 rf /Fb 205[15 15\n49[{}2 24.9066 /CMR6 rf /Fc 135[35 49 35 37 26 27 27\n35 37 34 37 56 19 35 1[19 37 34 21 31 37 30 37 33 12[47\n37 2[46 51 1[64 3[25 2[42 2[49 10[34 34 1[34 34 34 34\n34 34 1[19 22 19 29[56 14[{}43 59.7758 /CMBX12 rf /Fd\n134[16 120[27{}2 33.2088 /CMSY8 rf /Fe 134[24 2[22 26\n16 20 21 1[25 25 27 40 12 2[15 25 22 15 22 25 22 22 25\n15 11[35 27 36 37 33 2[44 31 1[26 19 1[38 3[35 1[36 6[15\n11[15 17 15 4[15 39[{}38 49.8132 /CMTI12 rf /Ff 147[10\n1[13 94[20 11[{}3 24.9066 /CMMI6 rf /Fg 130[19 19 19\n19 16[20 20 15[60 54[33 33 14[25 25 16[{}11 41.511 /CMEX10\nrf /Fh 143[42 5[14 2[25 25 36[40 31[50 11[39 39 4[25\n8[39 2[25 1[14 39{}13 49.8132 /CMSY10 rf /Fi 194[27 6[18\n18 18 18 18 18 18 4[27 1[14 14 40[{}11 33.2088 /CMR8\nrf /Fj 133[16 1[20 2[20 13 16 16 16 18 1[21 31 11 1[14\n12 4[18 15 15 19 15[28 22 2[34 3[15 13[10 10 30[20 3[17\n21 21 9[23 11[{}28 33.2088 /CMMI8 rf /Fk 133[23 2[35\n3[23 22 22 2[29 43 15 25 20 17 28 1[24 1[25 21 21 26\n6[33 28 3[33 29 30 1[39 31 37 39 47 1[41 27 22 2[32 36\n40 35 1[37 2[38 24 38 14 14 18[32 5[30 2[29 2[28 3[24\n29 28 2[23 5[28 31 11[{}50 49.8132 /CMMI12 rf /Fl 130[26\n26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26\n26 26 26 26 26 26 26 26 26 26 1[26 1[26 26 26 3[26 26\n26 26 26 26 1[26 26 26 26 1[26 26 26 26 26 26 26 26 26\n1[26 2[26 26 26 3[26 26 1[26 1[26 26 26 26 26 26 26 26\n26 26 26 26 1[26 1[26 2[26 33[{}74 49.8132 /CMTT12 rf\n/Fm 131[56 2[30 30 1[30 31 22 22 23 1[31 28 31 47 16\n2[16 31 28 17 26 31 25 31 27 13[31 42 1[38 2[53 3[21\n1[44 35 1[43 40 1[42 7[28 28 28 28 28 28 28 28 28 28\n1[16 46[{}43 49.8132 /CMBX12 rf /Fn 131[81 2[43 43 1[43\n45 31 32 33 1[45 40 45 67 22 2[22 45 40 25 37 45 36 45\n39 13[45 60 1[55 2[77 3[30 1[63 51 1[62 58 1[61 7[40\n40 40 40 40 40 40 40 40 40 2[27 45[{}43 71.731 /CMBX12\nrf /Fo 131[49 24 22 26 26 35 26 27 19 19 19 26 27 24\n27 41 14 26 15 14 27 24 15 22 27 22 27 24 14 1[24 14\n24 14 30 37 1[50 1[37 35 27 36 1[33 38 37 45 30 38 1[18\n37 38 32 33 37 35 35 37 1[23 1[38 2[14 24 24 24 24 24\n24 24 24 24 24 24 14 16 14 38 24 19 19 14 1[41 2[24 14\n18[41 1[27 28 2[35 5[38 41 1[{}86 49.8132 /CMR12 rf /Fp\n139[23 23 23 2[29 33 4[16 3[26 2[33 29 14[43 7[30 1[44\n25[16 46[{}13 59.7758 /CMR12 rf /Fq 135[42 1[42 44 30\n31 30 1[44 39 44 66 21 2[21 44 39 24 35 44 35 1[39 18[60\n5[60 25[21 26 30[64 1[43 12[{}25 86.0938 /CMR17 rf end\n%%EndProlog\n%%BeginSetup\n%%Feature: *Resolution 300dpi\nTeXDict begin\n%%BeginPaperSize: a4\n/setpagedevice where\n{ pop << /PageSize [595 842] >> setpagedevice }\n{ /a4 where { pop a4 } if }\nifelse\n%%EndPaperSize\n end\n%%EndSetup\n%%Page: 1 1\nTeXDict begin 1 0 bop 164 517 a Fq(Notes)26 b(on)h(the)f(ev)l(aluation)\ni(of)e(coupling-co)r(e\\016ci)q(en)n(ts)291 621 y(and)g(Hamiltonia)q(n)j\n(matrix-elemen)n(ts)g(using)338 724 y(determinan)n(ts)f(and)f\n(con\\014guration)i(state)806 828 y(functions.)732 976\ny Fp(Rob)r(ert)18 b(J.)i(Harrison)961 2607 y Fo(1)p eop\nend\n%%Page: 2 2\nTeXDict begin 2 1 bop 164 315 a Fn(Con)n(ten)n(ts)164\n425 y Fm(1)45 b(In)n(tro)r(duction)1209 b(4)164 534 y(2)45\nb(Determinan)n(t)18 b(bases)1060 b(4)164 643 y(3)45 b(Graphical)19\nb(represen)n(tation)e(of)i(primitiv)n(e)d(spin)j(functions)243\nb(7)164 752 y(4)45 b(Graphical)19 b(represen)n(tation)e(of)i(CSF)g\n(bases)573 b(9)164 861 y(5)45 b(Graphical)19 b(represen)n(tation)e(of)i\n(orbital)f(o)r(ccupations)329 b(12)164 970 y(6)45 b(Indexing)18\nb(the)g(CI)h(v)n(ector)929 b(15)164 1079 y(7)45 b(More)18\nb(details)g(on)h(the)f(graphical)g(represen)n(tations)373\nb(15)237 1139 y Fo(7.1)50 b(Primitiv)o(e)14 b(spin)i(graphs)23\nb(.)i(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h\n(.)f(.)h(.)f(.)h(.)f(.)44 b(15)237 1199 y(7.2)50 b(Orbital)16\nb(graphs)g(.)25 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h\n(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(17)237 1259 y(7.3)50 b(Constructing)17 b(the)f(w)o(eigh)o(ts)g(and)h\n(w)o(alking)f(the)g(graphs)47 b(.)25 b(.)f(.)h(.)f(.)h(.)f(.)44\nb(18)164 1368 y Fm(8)h(Matrix)18 b(elemen)n(ts)f(of)i(orbital)f\n(replacemen)n(t)f(op)r(erators)278 b(19)237 1429 y Fo(8.1)50\nb(Computing)17 b(matrix)f(elemen)o(ts)36 b(.)24 b(.)h(.)f(.)h(.)f(.)h\n(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(21)164 1537 y Fm(9)h(Densit)n(y)18 b(matrix)f(op)r(erators)870\nb(23)164 1646 y(10)17 b(Application)h(Program)h(In)n(terface)f(|)h(API)\n544 b(24)237 1707 y Fo(10.1)26 b(Setting-up)17 b(and)g(solving)f(a)g\n(full-CI)35 b(.)24 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)\nf(.)h(.)f(.)44 b(25)349 1767 y(10.1.1)32 b Fl(fci)p 586\n1767 16 2 v 18 w(setup)22 b Fo(.)j(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h\n(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(25)349 1827 y(10.1.2)32 b Fl(fci)p 586 1827 V 18 w(solve)22\nb Fo(.)j(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)\nf(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(25)349 1887 y(10.1.3)32\nb Fl(fci)p 586 1887 V 18 w(readvecto)o(rs)21 b Fo(.)k(.)f(.)g(.)h(.)f\n(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(26)237 1947 y(10.2)26 b(Inquiring)16 b(ab)q(out)h(o)q(ccupations)g\n(and)g(dimensions)34 b(.)25 b(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(26)349 2008 y(10.2.1)32 b Fl(fci)p 586 2008 V 18 w(ofind)p\n734 2008 V 16 w(occ)44 b Fo(.)24 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f\n(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(26)349\n2068 y(10.2.2)32 b Fl(fci)p 586 2068 V 18 w(ofind)p 734\n2068 V 16 w(weight)43 b Fo(.)24 b(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f\n(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(27)349 2128\ny(10.2.3)32 b Fl(fci)p 586 2128 V 18 w(mfind)p 734 2128\nV 16 w(occ)44 b Fo(.)24 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f\n(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(27)349 2188\ny(10.2.4)32 b Fl(fci)p 586 2188 V 18 w(mfind)p 734 2188\nV 16 w(weight)43 b Fo(.)24 b(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)\nf(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(27)349 2248 y(10.2.5)32\nb Fl(fci)p 586 2248 V 18 w(num)p 682 2248 V 17 w(dets)e\nFo(.)25 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g\n(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(28)349 2309 y(10.2.6)32\nb Fl(fci)p 586 2309 V 18 w(num)p 682 2309 V 17 w(csf)18\nb Fo(.)24 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f\n(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(28)349 2369 y(10.2.7)32\nb Fl(fci)p 586 2369 V 18 w(num)p 682 2369 V 17 w(owalks)17\nb Fo(.)24 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h\n(.)f(.)h(.)f(.)h(.)f(.)44 b(28)349 2429 y(10.2.8)32 b\nFl(fci)p 586 2429 V 18 w(ndets)22 b Fo(.)j(.)f(.)h(.)f(.)h(.)f(.)g(.)h\n(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(28)961 2607 y(2)p eop end\n%%Page: 3 3\nTeXDict begin 3 2 bop 349 315 a Fo(10.2.9)32 b Fl(fci)p\n586 315 16 2 v 18 w(ncsf)48 b Fo(.)25 b(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f\n(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(29)349 376 y(10.2.10)8 b Fl(fci)p 586 376 V 18 w(max)p\n682 376 V 17 w(num)p 777 376 V 17 w(dets)k Fo(.)25 b(.)f(.)g(.)h(.)f(.)\nh(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(29)349 436 y(10.2.11)8 b Fl(fci)p 586 436 V 18 w(owalk)p\n734 436 V 16 w(info)18 b Fo(.)24 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f\n(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(29)349\n496 y(10.2.12)8 b Fl(fci)p 586 496 V 18 w(det)p 682 496\nV 17 w(to)p 751 496 V 18 w(walk)37 b Fo(.)25 b(.)f(.)g(.)h(.)f(.)h(.)f\n(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(30)237 556 y(10.3)26 b(T)l(ransforming)17 b(b)q(et)o(w)o(een)e(CSF)g\n(and)i(determinats,)d(and)j(spin)e(adaption)28 b(30)349\n616 y(10.3.1)k Fl(fci)p 586 616 V 18 w(spin)p 708 616\nV 17 w(adapt)17 b Fo(.)24 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f\n(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(30)349 677\ny(10.3.2)32 b Fl(fci)p 586 677 V 18 w(spin)p 708 677\nV 17 w(adapt)p 855 677 V 16 w(nvec)12 b Fo(.)24 b(.)h(.)f(.)h(.)f(.)h\n(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(31)349 737 y(10.3.3)32 b Fl(fci)p 586 737 V 18 w(spin)p\n708 737 V 17 w(force)17 b Fo(.)24 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f\n(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(31)237\n797 y(10.4)26 b(Coupling)17 b(co)q(e\\016cien)o(ts)40\nb(.)25 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)\nh(.)f(.)h(.)f(.)h(.)f(.)44 b(32)349 857 y(10.4.1)32 b\nFl(fci)p 586 857 V 18 w(couple1)47 b Fo(.)25 b(.)f(.)h(.)f(.)g(.)h(.)f\n(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(32)349 917 y(10.4.2)32 b Fl(fci)p 586 917 V 18 w(couple2)47\nb Fo(.)25 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g\n(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(32)349 978 y(10.4.3)32\nb Fl(fci)p 586 978 V 18 w(couple3)47 b Fo(.)25 b(.)f(.)h(.)f(.)g(.)h(.)\nf(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(33)237 1038 y(10.5)26 b(Miscellaneous)34 b(.)25 b(.)f(.)h(.)f(.)h(.)f\n(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)\nf(.)h(.)f(.)44 b(34)349 1098 y(10.5.1)32 b Fl(fci)p 586\n1098 V 18 w(onepdm)j Fo(.)24 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h\n(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(34)349 1158 y(10.5.2)32 b Fl(fci)p 586 1158 V 18 w(hv)23\nb Fo(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)\nf(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(34)349 1218\ny(10.5.3)32 b Fl(fci)p 586 1218 V 18 w(hami)48 b Fo(.)25\nb(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g\n(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(35)349 1279 y(10.5.4)32\nb Fl(fci)p 586 1279 V 18 w(diags)22 b Fo(.)j(.)f(.)h(.)f(.)h(.)f(.)g(.)\nh(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(35)349 1339 y(10.5.5)32 b Fl(fci)p 586 1339 V 18 w(prspnad)47\nb Fo(.)25 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g\n(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(36)349 1399 y(10.5.6)32\nb Fl(fci)p 586 1399 V 18 w(tprint)j Fo(.)24 b(.)h(.)f(.)h(.)f(.)g(.)h\n(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44\nb(36)349 1459 y(10.5.7)32 b Fl(fci)p 586 1459 V 18 w(err)k\nFo(.)24 b(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f\n(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)44 b(36)164 1568\ny Fm(References)1299 b(36)961 2607 y Fo(3)p eop end\n%%Page: 4 4\nTeXDict begin 4 3 bop 164 315 a Fn(1)81 b(In)n(tro)r(duction)164\n425 y Fo(F)l(or)15 b(the)h(purp)q(ose)g(of)f(ev)m(aluating)h(matrix)e\n(elemen)o(ts)g(o)o(v)o(er)g(a)i(wide)f(v)m(ariet)o(y)f(of)i(densit)o(y)\n164 485 y(op)q(erators,)g(while)e(grouping)h(all)f(p)q(ossible)h(spin)g\n(functions)f(for)h(a)g(giv)o(en)f(orbital)g(o)q(ccu-)164\n545 y(pation)i(and)g(also)g(ha)o(ving)g(the)f(abilit)o(y)f(to)i(use)g\n(either)e(CSF)i(or)g(determinan)o(ts,)f(I)g(ha)o(v)o(e)164\n606 y(adapted)j(a)h(full-CI)e(program)h(that)g(I)g(wrote)g(while)f(at)h\n(Argonne)g(National)g(Lab)q(ora-)164 666 y(tory)g(in)h(1986/7.)30\nb(It)18 b(has)h(required)e(some)h(mo)q(di\\014cation)h(for)g(the)f\n(presen)o(t)g(purp)q(oses)164 726 y(and)g(additional)f(c)o(hanges)g\n(are)g(necessary)l(,)g(ho)o(w)o(ev)o(er,)e(its)i(in)o(ternal)f\n(structure)h(is)g(v)o(ery)164 786 y(simple)e(and)i(it)f(should)g(b)q(e)\nh(easy)f(to)h(extend,)e(fast)h(and)h(correct!)237 846\ny(These)11 b(notes)h(serv)o(e)e(to)h(describ)q(e)f(the)h(theory)g(b)q\n(ehind)g(the)g(co)q(de)g(and)h(the)f(coupling-)164 907\ny(co)q(e\\016cien)o(t)k(generation)i(and)h(spin)f(adaption)g(used)g(in)g\n(the)g(program.)24 b(The)16 b(metho)q(d-)164 967 y(ology)23\nb(is)g(standard)g(and)h(dra)o(ws)f(v)o(ery)e(hea)o(vily)g(up)q(on)j(P)o\n(auncz)e([1,)h(2],)g(Handy)g([3],)164 1027 y(Kno)o(wles)14\nb([4])f(and)i(esp)q(ecially)d(Duc)o(h)i([5,)f(6)q(,)g(7)q(,)g(8,)h(9].)\n20 b(Graphs)15 b(pro)o(vide)f(a)g(v)o(ery)f(simple,)164\n1087 y(visually)j(accessible)f(and)i(computationally)g(useful)f\n(represen)o(tation)g(of)h(man)o(y)f(t)o(yp)q(es)164 1147\ny(of)h(bases,)g(esp)q(cially)f(of)h(\\\\complete-bases\")g(suc)o(h)g(as)g\n(full-CI,)f(CISD,)g(or)h(all)g(p)q(ossible)164 1207 y(spin)12\nb(functions)g(for)h(a)f(giv)o(en)f(op)q(en-shell)h(o)q(ccupation.)21\nb(The)12 b(graphical)g(unitary)g(group)164 1268 y(approac)o(h)k([10)q\n(,)f(11)q(,)g(12)q(])g(p)q(erhaps)i(\\014rst)f(demonstrated)g(the)g\n(utilit)o(y)d(of)k(this)e(approac)o(h)164 1328 y(and)i(it)f(w)o(as)i\n(applied)e(in)g(the)h(symmetric)d(group)k(approac)o(h)f(b)o(y)g(Duc)o\n(h)f(et)g(al)h([9].)22 b(The)164 1388 y(program)c(in)o(ternally)d(uses)\nj(graphical)f(represen)o(tations)g(only)g(for)g(the)g(lexical)f(order-)\n164 1448 y(ing)f(of)h(orbital)f(and)g(spin)h(o)q(ccupations.)21\nb(It)15 b(do)q(es)h(not)g(use)f(a)g(graphical)h(approac)o(h)g(for)164\n1508 y(the)e(ev)m(aluation)g(of)g(matrix)g(elemen)o(ts.)k(There)c(is)g\n(no)g(adv)m(an)o(tage)h(to)g(this)f(for)g(F)o(CI)f(and)164\n1569 y(the)g(mo)q(dern)h(thinking)f(seems)g(to)g(b)q(e)h(that)g\n(graphical)f(approac)o(hes)i(of)e(the)h(1970's)g(and)164\n1629 y(1980's)g(are)f(unecessarily)f(complex)g(\\(c.f.,)g(the)h(marv)o\n(ellous)f(analysis)h(of)g(the)g(MRSDCI)164 1689 y(algorithm)j(b)o(y)g\n(Saunders)h(and)g(v)m(an)f(Len)o(the)g([13)q(]\\).)237\n1749 y(I)k(don't)g(think)g(that)h(I)e(ha)o(v)o(e)h(done)g(an)o(ything)g\n(new)h(here.)32 b(The)20 b(notes)h(are)f(v)o(ery)164\n1809 y(basic)j(so)h(that)f(the)g(program)h(is)e(usable)i(ev)o(en)d(b)o\n(y)i(someone)g(unfamiliar)f(with)h(CI)164 1870 y(metho)q(dology)l(,)16\nb(or)h(a)g(graduate)g(studen)o(t.)164 2036 y Fn(2)81\nb(Determinan)n(t)27 b(bases)164 2145 y Fo(F)l(or)18 b(the)g(presen)o(t)\nf(purp)q(ose)i(w)o(e)e(shall)h(assume)g(that)h(all)e(molecular)g\n(orbitals)h(\\()p Fk(\\036)p Fo(\\))g(are)164 2206 y(real,)c(orthonormal,)\ni(and)f(that)h(spin)f(orbitals)g(\\()p Fk(')p Fo(\\))f(are)h(constructed)\ng(as)h(a)f(pro)q(duct)h(of)164 2266 y(the)g(spatial)g(and)h(spin)f\n(comp)q(onen)o(ts.)22 b(F)l(or)16 b(instance,)286 2368\ny Fk(')318 2375 y Fj(i)332 2368 y Fo(\\()p Fk(r)p 351\n2375 24 2 v 374 2378 a Fi(1)394 2368 y Fo(\\))e(=)g Fk(\\036)508\n2375 y Fj(i)522 2368 y Fo(\\()p Fk(r)p 541 2375 V 564\n2378 a Fi(1)584 2368 y Fo(\\))p Fk(\\033)631 2375 y Fj(i)644\n2368 y Fo(\\(1\\),)i Fk(\\033)764 2375 y Fj(i)792 2368 y\nFo(=)e Fk(\\013)i Fo(or)h Fk(\\014)742 b Fo(\\(1\\))961 2607\ny(4)p eop end\n%%Page: 5 5\nTeXDict begin 5 4 bop 164 315 a Fo(A)19 b(determinan)o(tal)f\n(electronic)g(w)o(a)o(v)o(efunction)g(\\(\\010\\))h(is)g(simply)g(an)g(an)\no(tisymmetrized)164 376 y(pro)q(duct)e(of)f(spin)h(orbitals:)290\n477 y(\\010)42 b(=)g Fh(j)o Fk(')492 484 y Fi(1)512 477\ny Fo(\\()p Fk(r)p 531 484 24 2 v 554 488 a Fi(1)574 477\ny Fo(\\))p Fk(')625 484 y Fi(2)645 477 y Fo(\\()p Fk(r)p\n664 484 V 687 488 a Fi(2)707 477 y Fo(\\))8 b Fh(\\001)g(\\001)g(\\001)h\nFk(')833 484 y Fj(n)856 477 y Fo(\\()p Fk(r)p 875 484\nV 898 488 a Fj(n)922 477 y Fo(\\))p Fh(j)766 b Fo(\\(2\\))367\n550 y(=)42 b Fh(A)13 b Fk(')532 557 y Fi(1)552 550 y\nFo(\\()p Fk(r)p 571 557 V 594 560 a Fi(1)614 550 y Fo(\\))p\nFk(')665 557 y Fi(2)685 550 y Fo(\\()p Fk(r)p 704 557\nV 727 560 a Fi(2)747 550 y Fo(\\))8 b Fh(\\001)g(\\001)g(\\001)g\nFk(')872 557 y Fj(n)896 550 y Fo(\\()p Fk(r)p 915 557\nV 938 560 a Fj(n)962 550 y Fo(\\))740 b(\\(3\\))286 645\ny Fh(A)41 b Fo(=)482 611 y(1)p 452 633 85 2 v 452 642\na Fh(p)p 493 642 43 2 v 493 684 a Fk(n)p Fo(!)549 603\ny Fg(X)565 695 y Fj(P)609 645 y Fo(\\()p Fh(\\000)p Fo(1\\))710\n624 y Fj(P)739 645 y Fk(P)q(:)936 b Fo(\\(4\\))164 780\ny Fh(A)12 b Fo(is)h(the)f(an)o(tisymmetrizer)f(and)i(the)f(sum)h(in)f\n(its)h(de\\014nition)f(ranges)i(o)o(v)o(er)d(all)i(p)q(ossible)164\n840 y Fk(n)p Fo(!)e(p)q(erm)o(utations)g(of)g(the)g Fk(n)h\nFo(electrons.)18 b(When)12 b(w)o(e)e(start)i(ev)m(aluating)f(matrix)g\n(elemen)o(ts)164 900 y(it)23 b(will)g(b)q(e)h(imp)q(ortan)o(t)f(to)h\n(note)g(that)g(the)g(p)q(erm)o(utations)f(act)h(on)g(the)g(electronic)\n164 960 y(co)q(ordinates)17 b(\\(space)f(and)h(spin\\))f(and)h(not)g(on)g\n(the)f(lab)q(els)g(of)g(the)g(orbitals.)237 1020 y(A)g(determinan)o(t)f\n(is)h(fully)f(sp)q(eci\\014ed)h(b)o(y)237 1122 y Fh(\\017)24\nb Fo(the)16 b(o)q(ccupation)h(of)f(eac)o(h)g(spin)g(orbital,)g(and)237\n1224 y Fh(\\017)24 b Fo(an)17 b(order)f(in)g(whic)o(h)f(the)h(spin)h\n(orbitals)f(are)g(o)q(ccupied.)164 1326 y(Clearly)k(c)o(hanging)h(the)f\n(order)g(of)h(the)g(spin)f(orbitals)h(can)g(c)o(hange)f(the)g(sign)h\n(of)g(the)164 1386 y(determinan)o(t,)15 b(and)h(th)o(us)h(consistency)e\n(is)h(crucially)f(imp)q(ortan)o(t.)237 1446 y(One)j(v)o(ery)e(common)i\n(ordering,)g(esp)q(ecially)e(for)i(full-CI)f(programs)i([3],)e(is)h(to)\ng(o)q(c-)164 1506 y(cup)o(y)i(all)g(alpha)i(spin)f(orbitals)g(b)q\n(efore)g(all)f(b)q(eta)i(spin)e(orbitals,)i(and)g(sub)q(order)f(b)o(y)\n164 1566 y(spatial)16 b(orbital)h(index)e(within)h(eac)o(h)f(group.)286\n1668 y Fk(\\036)315 1675 y Fi(1)334 1668 y Fo(\\()p Fk(r)p\n353 1675 24 2 v 377 1678 a Fi(1)397 1668 y Fo(\\))p Fk(\\013)p\nFo(\\(1\\))8 b Fh(\\001)g(\\001)g(\\001)h Fk(\\036)613 1675\ny Fj(n)634 1679 y Ff(\\013)658 1668 y Fo(\\()p Fk(r)p 677\n1675 V 701 1678 a Fj(n)722 1682 y Ff(\\013)746 1668 y\nFo(\\))p Fk(\\013)p Fo(\\()p Fk(n)844 1675 y Fj(\\013)869\n1668 y Fo(\\))286 1700 y Fg(|)p 305 1700 264 5 v 264 w({z)p\n607 1700 V 264 w(})435 1754 y Fo(Alpha)16 b(orbitals)897\n1668 y Fk(\\036)926 1675 y Fj(n)947 1679 y Ff(\\013)969\n1675 y Fi(+1)1016 1668 y Fo(\\()p Fk(r)p 1035 1675 24\n2 v 1058 1678 a Fj(n)1079 1682 y Ff(\\013)1102 1678 y\nFi(+1)1149 1668 y Fo(\\))p Fk(\\014)s Fo(\\()p Fk(n)1247\n1675 y Fj(\\013)1282 1668 y Fo(+)11 b(1\\))d Fh(\\001)g(\\001)g(\\001)h\nFk(\\036)1478 1675 y Fj(n)1502 1668 y Fo(\\()p Fk(r)p 1521\n1675 V 1544 1678 a Fj(n)1568 1668 y Fo(\\))p Fk(\\014)1615\n1675 y Fj(n)1638 1668 y Fo(\\()p Fk(n)p Fo(\\))897 1700\ny Fg(|)p 916 1700 367 5 v 367 w({z)p 1321 1700 V 367\nw(})1163 1754 y Fo(Beta)15 b(orbitals)1721 1668 y(\\(5\\))164\n1848 y(The)20 b(alpha)g(or)g(b)q(eta)g(o)q(ccupations)h(are)f(often)f\n(referred)g(to)h(as)g(strings.)32 b(This)20 b(sepa-)164\n1908 y(rate)d(treatmen)o(t)f(of)h(eac)o(h)f(spin)h(leads)g(to)g(a)g\n(natural)h(ordering)f(of)g(the)f(determinan)o(ts,)164\n1968 y(and)22 b(mak)o(es)g(the)f(ev)m(aluation)i(of)f(matrix)f(elemen)o\n(ts)f(in)i(a)g(determinan)o(t)f(basis)h(v)o(ery)164 2029\ny(straigh)o(tforw)o(ard.)g(Ho)o(w)o(ev)o(er,)13 b(it)h(is)h(is)g(not)h\n(con)o(v)o(enien)o(t)d(for)i(applications)g(whic)o(h)f(need)164\n2089 y(to)h(manipulate)g(all)g(functions)g(with)g(a)g(giv)o(en)g(o)q\n(ccupation)h(of)f(spatial)g(orbtials)h(\\(since)164 2149\ny(these)f(determinan)o(ts)e(will)h(b)q(e)h(scattered)g(throughout)h\n(the)f(CI)g(v)o(ector\\))f(and)h(should)h(a)164 2209 y(fully)c\n(spin-adpated)i(implemen)o(tation)e(b)q(e)h(required)f(v)o(ery)g\n(little)g(co)q(de)i(can)f(b)q(e)h(reused.)237 2269 y(The)23\nb(graphical)f(represen)o(tations)g(used)g(b)q(elo)o(w)h(unite)f\n(determinan)o(t)f(and)i(spin-)164 2330 y(adapted)g(approac)o(hes,)i\n(and)e(also)g(preserv)o(e)e(the)i(simplicit)o(y)d(of)i(the)h(ev)m\n(aluation)g(of)164 2390 y(matrix)16 b(elemen)o(ts)f(o)o(v)o(er)h\n(determinan)o(ts)f(while)h(pro)o(viding)g(the)h(option)g(of)g(using)g\n(fully)164 2450 y(spin-adpated)g(bases.)22 b(F)l(or)16\nb(these)g(reasons,)h(let)f(us)g(c)o(ho)q(ose)h(an)g(order)f(with)961\n2607 y(5)p eop end\n%%Page: 6 6\nTeXDict begin 6 5 bop 237 315 a Fh(\\017)24 b Fo(all)13\nb(doubly)g(o)q(ccupied)f(orbitals)i(\\014rst)f(\\(i.e.,)f(on)h(the)g\n(left\\))g(ordered)g(b)o(y)f(increasing)286 376 y(orbital)j(index,)f\n(and)i(within)e(eac)o(h)h(pair)g(ha)o(v)o(e)f(the)h(alpha)h\n(spin-orbital)f(precede)286 436 y(the)h(b)q(eta)h(spin-orbital,)f(and)\n237 536 y Fh(\\017)24 b Fo(all)16 b(singly)f(o)q(ccupied)h(orbitals)h\n(next,)e(ordered)h(b)o(y)g(increasing)g(orbital)g(index.)286\n644 y Fk(\\036)315 651 y Fi(1)334 644 y Fo(\\()p Fk(r)p\n353 651 24 2 v 377 654 a Fi(1)397 644 y Fo(\\))p Fk(\\013)p\nFo(\\(1\\))p Fk(\\036)538 651 y Fi(1)558 644 y Fo(\\()p Fk(r)p\n577 651 V 600 654 a Fi(2)620 644 y Fo(\\))p Fk(\\014)s\nFo(\\(2\\))8 b Fh(\\001)g(\\001)g(\\001)g Fk(\\036)835 651\ny Fj(d)855 644 y Fo(\\()p Fk(r)p 874 651 V 897 654 a Fi(2)p\nFj(d)935 644 y Fo(\\))p Fk(\\014)s Fo(\\(2)p Fk(d)p Fo(\\))286\n673 y Fg(|)p 305 673 356 5 v 356 w({z)p 699 673 V 356\nw(})506 727 y Fo(doubly)16 b(o)q(ccupied)1081 644 y Fk(\\036)1110\n651 y Fj(d)p Fi(+1)1175 644 y Fo(\\()p Fk(r)p 1194 651\n24 2 v 1217 654 a Fi(2)p Fj(d)p Fi(+1)1300 644 y Fo(\\))p\nFk(\\033)1347 651 y Fj(d)p Fi(+1)1412 644 y Fo(\\(2)p Fk(d)c\nFo(+)f(1\\))d Fh(\\001)g(\\001)g(\\001)h Fk(\\036)1688 651\ny Fj(d)p Fi(+)p Fj(s)1752 644 y Fo(\\()p Fk(r)p 1771 651\nV 1794 654 a Fj(n)1818 644 y Fo(\\))p Fk(\\033)1865 651\ny Fj(n)1888 644 y Fo(\\(2)p Fk(d)i Fo(+)g Fk(s)p Fo(\\))1081\n675 y Fg(|)p 1100 675 452 5 v 452 w({z)p 1590 675 V 452\nw(})1407 729 y Fo(singly)16 b(o)q(ccupied)2058 644 y(\\(6\\))164\n832 y(with)22 b Fk(d)g Fo(doubly-o)q(ccupied)f(orbitals,)i(and)g\nFk(s)e Fo(singly-o)q(ccupied)g(\\(or)i(op)q(en-shell\\))e(or-)164\n892 y(bitals.)45 b(It)24 b(is)g(more)h(con)o(v)o(enien)o(t)d(if)i(w)o\n(e)g(group)h(the)f(spatial)h(and)g(spin)f(functions)164\n952 y(separately)l(,)286 1049 y(\\010)42 b(=)f Fh(A)22\nb Fo([\\()p Fk(\\036)566 1056 y Fi(1)585 1049 y Fo(\\()p\nFk(r)p 604 1056 24 2 v 627 1059 a Fi(1)647 1049 y Fo(\\))p\nFk(\\036)695 1056 y Fi(1)715 1049 y Fo(\\()p Fk(r)p 734\n1056 V 757 1059 a Fi(2)777 1049 y Fo(\\))8 b Fh(\\001)g(\\001)g(\\001)g\nFk(\\036)899 1056 y Fj(d)919 1049 y Fo(\\()p Fk(r)p 938\n1056 V 962 1059 a Fi(2)p Fj(d)1000 1049 y Fo(\\))p Fk(\\036)1048\n1056 y Fj(d)p Fi(+1)1113 1049 y Fo(\\()p Fk(r)p 1132 1056\nV 1155 1059 a Fi(2)p Fj(d)p Fi(+1)1238 1049 y Fo(\\))g\nFh(\\001)g(\\001)g(\\001)h Fk(\\036)1361 1056 y Fj(d)p Fi(+)p\nFj(s)1425 1049 y Fo(\\()p Fk(r)p 1444 1056 V 1467 1059\na Fj(n)1490 1049 y Fo(\\)\\))193 b(\\(7\\))447 1122 y(\\()p\nFk(\\013)p Fo(\\(1\\))p Fk(\\014)s Fo(\\(2\\))8 b Fh(\\001)g(\\001)g(\\001)h\nFk(\\014)s Fo(\\(2)p Fk(d)p Fo(\\))p Fk(\\033)873 1129 y\nFj(d)p Fi(+1)938 1122 y Fo(\\(2)p Fk(d)j Fo(+)f(1\\))d\nFh(\\001)g(\\001)g(\\001)h Fk(\\033)1213 1129 y Fj(n)1236\n1122 y Fo(\\(2)p Fk(d)j Fo(+)f Fk(s)p Fo(\\)\\)])281 b(\\(8\\))164\n1218 y(This)17 b(mak)o(es)g(it)g(clear)g(that)g(the)g\nFe(spin)i(function)h(dep)n(ends)f(only)f(up)n(on)h(the)g(op)n(en)f\n(shel)r(l)164 1279 y(orbitals)p Fo(.)28 b(This)19 b(is)f(b)q(ecause)h\n(eac)o(h)f(doubly)g(o)q(ccupied)g(orbital)h(alw)o(a)o(ys)f(has)h(an)g\n(alpha)164 1339 y(and)g(a)f(b)q(eta)h(spin)f(function)g(in)g(the)g(sp)q\n(eci\\014ed)f(order)i(and)f(th)o(us)h(a)f(doubly)g(o)q(ccupied)164\n1399 y(orbital)13 b(ma)o(y)g(b)q(e)g(placed)g(an)o(ywhere)g(since)f\n(the)h(t)o(w)o(o)g(functions)h(will)e(alw)o(a)o(ys)h(b)q(e)g(mo)o(v)o\n(ed)164 1459 y(together)19 b(\\(i.e,)f(it)h(will)f(b)q(e)h(an)h(ev)o(en)\ne(p)q(erm)o(utation\\))g(and)i(therefore)f(the)f(sign)i(of)f(the)164\n1519 y(determinan)o(t)i(will)g(b)q(e)i(unc)o(hanged.)39\nb(It)22 b(is)g(only)g(ev)o(er)f(necessary)h(to)h(consider)f(the)164\n1579 y(closed-shell)15 b(orbitals)h(explicitly)d(when)i(computing)h\n(matrix)f(elemen)o(ts)f(that)i(in)o(v)o(olv)o(e)164 1640\ny(these)e(indices,)g(and)i(then)e(it)h(su\\016ces)f(to)h(consider)g(an)o\n(y)g(closed-shell)e(pairs)j(as)f(simply)164 1700 y(b)q(eing)j(t)o(w)o\n(o)f(more)h(op)q(en)g(shells)f(whic)o(h)g(happ)q(en)h(to)g(b)q(e)g(n)o\n(um)o(b)q(ered)f(b)q(efore)h(the)f(`true')164 1760 y(op)q(en)g(shells.)\n237 1820 y(It)g(is)g(also)h(clear)f(that)h(the)f(spatial)h(functions)f\n(\\(in)g(the)g(\\014rst)h(set)f(of)h(paren)o(theses\\))164\n1880 y(and)h(the)f(spin)g(functions)h(ma)o(y)e(b)q(e)i(managed)g\n(separately)l(.)27 b(I)18 b(will)f(adopt)j(upp)q(ercase)164\n1941 y(Roman)c(letters)f(for)h(spatial)f(orbital)h(o)q(ccupation)g\n(patterns)g(\\()p Fh(j)p Fk(I)9 b(>)p Fo(\\))16 b(and)g(the)f(system-)164\n2001 y(atic)g(construction)h(of)g(these)f(is)h(discussed)f(b)q(elo)o(w)\nh(in)f(Section)g(5.)22 b(The)15 b Fk(\\026)p Fo('th)h(determi-)164\n2061 y(nan)o(tal)g(or)g(primitiv)o(e)d(spin)j(function)f(for)h\nFk(s)g Fo(electrons)e(and)j Fk(S)1314 2068 y Fj(z)1347\n2061 y Fo(=)d Fk(m)i Fo(will)e(b)q(e)i(denoted)164 2121\ny(b)o(y)f Fk(\\022)255 2103 y Fi(\\()p Fj(s)p Fi(\\))254\n2134 y Fj(m;\\026)334 2121 y Fo(\\(in)h(the)g(program)g(the)g(routines)g\n(that)g(deal)g(with)g(primitiv)o(e)d(spin)j(functions)164\n2181 y(often)j(b)q(egin)f(with)h(the)f(letter)g(`m')f(b)q(ecause)i(of)g\n(the)f(iden)o(ti\\014cation)f(of)i Fk(S)1553 2188 y Fj(z)1591\n2181 y Fo(=)f Fk(m)p Fo(\\).)27 b(If)164 2242 y(the)16\nb(Hamiltonian)f(is)h(spin-free)f(w)o(e)g(only)h(need)g(to)g(use)g\n(functions)g(with)g(one)g(v)m(alue)g(of)164 2302 y Fk(S)194\n2309 y Fj(z)230 2302 y Fo(and)h(the)f(c)o(hoice)f Fk(S)584\n2309 y Fj(z)618 2302 y Fo(=)e Fk(S)20 b Fo(minimizes)13\nb(the)j(dimension)g(of)h(the)f(expansion)g(space.)237\n2362 y(Ho)o(w)j(man)o(y)f(of)h(these)f(primitiv)o(e)f(spin)h(functions)\nh(functions)g(are)g(there?)28 b(There)164 2422 y(are)21\nb(\\()274 2403 y Fi(1)p 274 2411 18 2 v 274 2439 a(2)296\n2422 y Fk(s)14 b Fo(+)g Fk(m)p Fo(\\))21 b(alpha)g(spin)g(electrons)f\n(and)h(\\()1044 2403 y Fi(1)p 1044 2411 V 1044 2439 a(2)1067\n2422 y Fk(s)14 b Fh(\\000)f Fk(m)p Fo(\\))21 b(b)q(eta)g(spin)g\n(electrons)f(to)h(b)q(e)164 2482 y(distributed)h(in)g(all)h(p)q\n(ossible)g(w)o(a)o(ys)f(amoung)i Fk(s)f Fo(orbitals.)41\nb(Th)o(us,)24 b(the)f(n)o(um)o(b)q(er)f(of)961 2607 y(6)p\neop end\n%%Page: 7 7\nTeXDict begin 7 6 bop 164 315 a Fo(primitiv)o(e)14 b(spin)j(functions)g\n(\\(determinan)o(ts\\))f(with)h Fk(s)g Fo(op)q(en)g(shells)g(with)f(giv)o\n(en)g(quan-)164 376 y(tum)g(n)o(um)o(b)q(er)f Fk(S)474\n383 y Fj(z)508 376 y Fo(=)f Fk(m)i Fo(is)286 497 y Fk(d)p\nFo(\\()p Fk(s;)8 b(m)p Fo(\\))14 b(=)694 463 y Fk(s)p Fo(!)p\n507 485 411 2 v 507 531 a(\\()531 512 y Fi(1)p 531 520\n18 2 v 531 549 a(2)554 531 y Fk(s)d Fo(+)g Fk(m)p Fo(\\)!\\()737\n512 y Fi(1)p 737 520 V 737 549 a(2)759 531 y Fk(s)g Fh(\\000)g\nFk(m)p Fo(\\)!)1721 497 y(\\(9\\))164 632 y(By)23 b(a)h(similar)f(argumen)\no(t,)i(the)f(dimension)f(of)h(a)g(determinan)o(t)f(full-CI)g\n(\\(ignoring)164 692 y(spatial)16 b(symmetry\\))f(with)h\nFk(n)h Fo(electrons)e(in)h(M)g(orbitals)g(and)h Fk(S)1347\n699 y Fj(z)1381 692 y Fo(=)d Fk(m)i Fo(is)286 825 y Fk(D)q\nFo(\\()p Fk(M)r(;)8 b(n;)g(m)p Fo(\\))15 b(=)596 752 y\nFg( )704 794 y Fk(M)655 835 y Fi(1)p 655 843 V 655 872\na(2)678 854 y Fk(n)c Fo(+)g Fk(m)830 752 y Fg(!)d( )979\n794 y Fk(M)930 835 y Fi(1)p 930 843 V 930 872 a(2)953\n854 y Fk(n)j Fh(\\000)g Fk(m)1106 752 y Fg(!)1696 825\ny Fo(\\(10\\))237 955 y(Our)k(determinan)o(t,)f(corresp)q(onding)i(to)g\n(the)f(I'th)g(orbital)g(o)q(ccupation)h(whic)o(h)e(has)164\n1015 y Fk(s)e Fo(op)q(en)g(shells,)g(and)g(the)f Fk(\\026)p\nFo('th)h(primitiv)o(e)d(spin)j(function)g(for)g(the)f\nFk(s)h Fo(unpaired)g(electrons)164 1075 y(coupled)k(with)g\nFk(S)484 1082 y Fj(z)518 1075 y Fo(=)d Fk(m)j Fo(is)g(then)g(\\014nally)\ng(written)g(as)286 1177 y Fh(j)p Fk(I)t(\\026)6 b(>)40\nb Fo(=)i Fh(A)14 b(j)p Fk(I)8 b(>)14 b Fo(\\001)p Fk(\\022)734\n1156 y Fi(\\()p Fj(s)p Fi(\\))733 1189 y Fj(m;\\026)797\n1177 y Fk(;)885 b Fo(\\(11\\))315 1249 y Fh(j)p Fk(I)9\nb(>)41 b Fo(=)h Fk(\\036)548 1256 y Fi(1)568 1249 y Fo(\\()p\nFk(r)p 587 1256 24 2 v 610 1260 a Fi(1)630 1249 y Fo(\\))p\nFk(\\036)678 1256 y Fi(1)697 1249 y Fo(\\()p Fk(r)p 716\n1256 V 739 1260 a Fi(2)759 1249 y Fo(\\))8 b Fh(\\001)g(\\001)g(\\001)h\nFk(\\036)882 1256 y Fj(d)902 1249 y Fo(\\()p Fk(r)p 921\n1256 V 944 1260 a Fi(2)p Fj(d)p Fd(\\000)p Fi(1)1027 1249\ny Fk(\\036)1056 1256 y Fj(d)1076 1249 y Fo(\\()p Fk(r)p\n1095 1256 V 1119 1260 a Fi(2)p Fj(d)1156 1249 y Fo(\\))p\nFk(\\036)1204 1256 y Fj(d)p Fi(+1)1270 1249 y Fo(\\()p\nFk(r)p 1289 1256 V 1312 1260 a Fi(2)p Fj(d)p Fi(+1)1395\n1249 y Fo(\\))f Fh(\\001)g(\\001)g(\\001)h Fk(\\036)1518 1256\ny Fj(d)p Fi(+)p Fj(s)1581 1249 y Fo(\\()p Fk(r)p 1600\n1256 V 1624 1260 a Fj(n)1647 1249 y Fo(\\))30 b(\\(12\\))357\n1322 y(\\001)41 b(=)h Fk(\\013)p Fo(\\(1\\))p Fk(\\014)s Fo(\\(2\\))8\nb Fh(\\001)g(\\001)g(\\001)h Fk(\\013)p Fo(\\(2)p Fk(d)p Fo(\\))p\nFk(\\014)s Fo(\\(2)p Fk(d)p Fo(\\))680 b(\\(13\\))311 1395\ny Fk(\\022)335 1374 y Fi(\\()p Fj(s)p Fi(\\))334 1407 y\nFj(m;\\026)439 1395 y Fo(=)42 b Fk(\\033)547 1402 y Fj(d)p\nFi(+1)612 1395 y Fo(\\(2)p Fk(d)12 b Fo(+)f(1\\))d Fh(\\001)g(\\001)g(\\001)\nh Fk(\\033)887 1402 y Fj(n)910 1395 y Fo(\\(2)p Fk(d)j\nFo(+)f Fk(s)p Fo(\\))615 b(\\(14\\))164 1496 y(where)16\nb(all)h(of)g(the)f(closed-shell)g(spin)h(functions)g(ha)o(v)o(e)f(b)q\n(een)h(group)q(ed)h(in)o(to)e(\\001)h(whic)o(h)164 1557\ny(nev)o(er)e(really)g(needs)h(to)h(b)q(e)f(considered.)164\n1723 y Fn(3)81 b(Graphical)31 b(represen)n(tation)e(of)h(primitiv)n(e)g\n(spin)285 1814 y(functions)164 1924 y Fo(In)18 b(this)h(section)f(w)o\n(e)g(consider)g(ho)o(w)h(the)g(primitiv)o(e)d(spin)i(functions)h(are)f\n(n)o(um)o(b)q(ered.)164 1984 y(W)l(e)j(wish)g(to)g(\\014nd)g(an)h\n(ordering)f(for)g(all)f(p)q(ossible)h(primitiv)o(e)e(spin)i(functions)g\n(for)g Fk(s)164 2044 y Fo(unpaired)c(electrons)f(with)h\nFk(S)714 2051 y Fj(z)749 2044 y Fo(=)e Fk(m)p Fo(.)23\nb(A)16 b(graphical)h(represen)o(tation)g(is)g(v)o(ery)e(helpful.)164\n2104 y(In)c(Figure)g(1)g(the)g(coupling)g(of)h(the)f(Z-comp)q(onen)o(t)\ng(spin)g(of)h(eac)o(h)f(op)q(en-shell)g(electron)f(is)164\n2165 y(represen)o(ted)i(with)g(a)h(line.)19 b(An)13 b(up)o(w)o(ard)g\n(line)f(indicates)g(alpha)h(spin)g(and)g(a)g(do)o(wn)o(w)o(ard)164\n2225 y(line)i(indicates)h(b)q(eta)g(spin.)21 b(There)16\nb(are)h(only)f(t)o(w)o(o)g(p)q(ossible)g(c)o(hoices)f(of)i(spin,)f(and)\ng(w)o(e)164 2285 y(arrange)j(for)g(the)f(graph)h(to)g(b)q(egin)g(at)g\n(the)f(origin)g(and)h(end)f(at)h(the)f(desired)g Fk(S)1666\n2292 y Fj(z)1704 2285 y Fo(and)164 2345 y(n)o(um)o(b)q(er)d(of)h\n(electrons)f(\\(in)g(this)g(case)h Fk(S)901 2352 y Fj(z)935\n2345 y Fo(=)d(0)j(and)h(8)f(electrons\\).)k(Th)o(us,)15\nb(the)h(n)o(um)o(b)q(er)164 2405 y(of)h(w)o(alks)g(from)f(left)g(to)h\n(righ)o(t)g(\\(or)g(vice)e(v)o(ersa\\))i(on)g(this)f(graph)i(is)f(equal)f\n(to)h(the)g(total)164 2466 y(n)o(um)o(b)q(er)e(of)i(determinan)o(ts.)\n961 2607 y(7)p eop end\n%%Page: 8 8\nTeXDict begin 8 7 bop 242 684 a\n 23089397 19931873 0 -19931873 23089397 0 startTexFig\n\n 270 rotate\n 242 684 a\n%%BeginDocument: mspingraph.eps\n%!PS-Adobe-2.0 EPSF\n%%Title: /tmp/xfig-fig009186\n%%Creator: fig2dev\n%%CreationDate: Tue Nov 26 18:17:07 1996\n%%For: d3g681@hpcc1 (Robert J Harrison)\n%%BoundingBox: 0 0 303 351\n%%Pages: 0\n%%EndComments\n/$F2psDict 200 dict def \n$F2psDict begin\n$F2psDict /mtrx matrix put\n/l {lineto} bind def\n/m {moveto} bind def\n/s {stroke} bind def\n/n {newpath} bind def\n/gs {gsave} bind def\n/gr {grestore} bind def\n/clp {closepath} bind def\n/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul\n4 -2 roll mul setrgbcolor} bind def\n/col-1 {} def\n/col0 {0 0 0 setrgbcolor} bind def\n/col1 {0 0 1 setrgbcolor} bind def\n/col2 {0 1 0 setrgbcolor} bind def\n/col3 {0 1 1 setrgbcolor} bind def\n/col4 {1 0 0 setrgbcolor} bind def\n/col5 {1 0 1 setrgbcolor} bind def\n/col6 {1 1 0 setrgbcolor} bind def\n/col7 {1 1 1 setrgbcolor} bind def\n\tend\n/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def\n/$F2psEnd {$F2psEnteredState restore end} def\n%%EndProlog\n\n$F2psBegin\n0 setlinecap 0 setlinejoin\n-8.0 -7.0 translate 90 rotate 0.900 -0.900 scale\n0.500 setlinewidth\n% Polyline\nn 62 182 m 382 182 l gs col-1 s gr\n% Polyline\nn 62 182 m 222 22 l gs col-1 s gr\n% Polyline\nn 142 182 m 262 62 l gs col-1 s gr\n% Polyline\nn 222 22 m 382 182 l gs col-1 s gr\n% Polyline\nn 222 182 m 302 102 l gs col-1 s gr\n% Polyline\nn 302 182 m 342 142 l gs col-1 s gr\n% Polyline\nn 182 62 m 302 182 l gs col-1 s gr\n% Polyline\nn 142 102 m 222 182 l gs col-1 s gr\n% Polyline\nn 102 142 m 142 182 l gs col-1 s gr\n% Polyline\nn 382 182 m 222 342 l gs col-1 s gr\n% Polyline\nn 302 182 m 182 302 l gs col-1 s gr\n% Polyline\nn 222 342 m 62 182 l gs col-1 s gr\n% Polyline\nn 222 182 m 142 262 l gs col-1 s gr\n% Polyline\nn 142 182 m 102 222 l gs col-1 s gr\n% Polyline\nn 262 302 m 142 182 l gs col-1 s gr\n% Polyline\nn 302 262 m 222 182 l gs col-1 s gr\n% Polyline\nn 342 222 m 302 182 l gs col-1 s gr\n% Polyline\nn 62 23 m 62 343 l gs col-1 s gr\n/Times-Roman findfont 12.00 scalefont setfont\n101 215 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n42 22 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n42 102 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n42 182 m \ngs 1 -1 scale (0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n102 137 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n142 97 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n182 57 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n222 17 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 14.00 scalefont setfont\n397 188 m \ngs 1 -1 scale (Ns) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n59 196 m \ngs 1 -1 scale (0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n99 196 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n139 196 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n179 196 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n259 196 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n299 196 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n339 196 m \ngs 1 -1 scale (7) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n379 196 m \ngs 1 -1 scale (8) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n217 196 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n7 183 m \ngs 1 -1 scale (Sz) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n33 266 m \ngs 1 -1 scale (-1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n36 345 m \ngs 1 -1 scale (-2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n140 255 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n182 296 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n220 334 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n141 175 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n181 134 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n180 217 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n221 256 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n221 175 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n221 94 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n260 54 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n257 135 m \ngs 1 -1 scale (10) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n257 214 m \ngs 1 -1 scale (10) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n260 295 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n300 254 m \ngs 1 -1 scale (15) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n298 94 m \ngs 1 -1 scale (15) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n297 174 m \ngs 1 -1 scale (20) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n339 133 m \ngs 1 -1 scale (35) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n338 214 m \ngs 1 -1 scale (35) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n377 173 m \ngs 1 -1 scale (70) col-1 show gr\n$F2psEnd\n\n%%EndDocument\n\n endTexFig\n 164 2048 a Fo(Figure)21 b(1:)31 b(Graph)22 b(of)g(the)f(primitiv)o(e)e\n(spin)i(functions)g(for)h(8)f(op)q(en-shell)h(electrons)164\n2108 y(coupled)16 b(to)g Fk(S)432 2115 y Fj(z)466 2108\ny Fo(=)e(0.)961 2607 y(8)p eop end\n%%Page: 9 9\nTeXDict begin 9 8 bop 237 315 a Fo(Ho)o(w)12 b(man)o(y)f(w)o(alks)h\n(are)g(there?)19 b(Eac)o(h)12 b(no)q(de)h(on)f(the)f(graph)i(in)f\n(Figure)f(1)h(is)g(lab)q(elled)164 376 y(with)h(its)g(w)o(eigh)o(t)g\n(whic)o(h)f(is)i(the)f(n)o(um)o(b)q(er)f(of)i(p)q(ossible)f(w)o(a)o(ys)\nh(of)f(arriving)g(at)h(that)g(no)q(de.)164 436 y(The)20\nb(w)o(eigh)o(t)f(of)i(a)f(no)q(de)h(is)f(the)g(sum)g(of)g(the)g(w)o\n(eigh)o(ts)f(of)i(the)e(\\(one)i(or)f(t)o(w)o(o\\))g(no)q(des)164\n496 y(that)d(connect)e(to)i(it,)e(and)i(the)f(w)o(eigh)o(t)g(of)g(the)g\n(\\014rst)h(no)q(de)g(is)f(one.)237 556 y(A)21 b(w)o(alk)g(on)h(the)f\n(graph)i(is)e(commonly)g(represen)o(ted)f(with)h(a)h(plus)g(sign)f(\\()p\nFl(+)p Fo(\\))h(or)164 616 y(n)o(um)o(b)q(er)h(1)h(for)f(up)o(w)o(ard)h\n(mo)o(v)o(es)f(\\(alpha)h(o)q(ccupation\\))g(and)g(a)g(min)o(us)f(sign)g\n(\\()p Fl(-)p Fo(\\))h(or)164 677 y(n)o(um)o(b)q(er)16\nb(2)i(for)f(do)o(wn)o(w)o(ard)h(mo)o(v)o(es)e(\\(b)q(eta)h(o)q\n(ccupation\\).)24 b(T)l(o)18 b(n)o(um)o(b)q(er)e(eac)o(h)h(w)o(alk)f(on)\n164 737 y(the)c(graph)i(w)o(e)e(m)o(ust)g(adopt)h(some)g(ordering)f\n(and)i(w)o(e)e(use)g(the)g(standard)i(lexical)d(order)164\n797 y(whic)o(h)i(places)h(all)g(functions)g(coming)g(from)g(no)q(de)h\n(\\()p Fk(s)7 b Fh(\\000)g Fo(1)p Fk(;)h(S)1283 804 y Fj(z)1309\n797 y Fo(+)1359 777 y Fi(1)p 1359 785 18 2 v 1359 814\na(2)1381 797 y Fo(\\))14 b(b)q(efore)g(those)h(from)164\n857 y(\\()p Fk(s)9 b Fh(\\000)f Fo(1)p Fk(;)g(S)338 864\ny Fj(z)367 857 y Fh(\\000)419 838 y Fi(1)p 419 846 V 419\n874 a(2)442 857 y Fo(\\).)21 b(Th)o(us,)15 b(if)f(when)i(w)o(alking)e\n(the)h(graph)h(from)f(righ)o(t)g(to)g(left)f(w)o(e)h(alw)o(a)o(ys)164\n917 y(sta)o(y)20 b(as)g(high)g(as)g(p)q(ossible)g(w)o(e)g(shall)f\n(generate)h(the)g(lo)o(w)o(est)f(n)o(um)o(b)q(ered)g(w)o(alk.)31\nb(The)164 978 y(lexical)14 b(ordering)j(for)f(all)g(w)o(alks)g(in)g\n(Figure)g(1)g(is)g(giv)o(en)g(in)g(T)l(able)g(1.)237\n1038 y(Since)k(w)o(e)g(ha)o(v)o(e)f(all)h(p)q(ossible)h(w)o(alks)f(on)h\n(the)f(graph,)i(then)f(switc)o(hing)f(an)o(y)g(t)o(w)o(o)164\n1098 y(orbitals)c(will)g(just)g(generate)g(another)h(w)o(alk)f(on)g\n(the)g(graph.)164 1264 y Fn(4)81 b(Graphical)28 b(represen)n(tation)f\n(of)g(CSF)g(bases)164 1374 y Fo(In)o(ternally)c(the)h(program)h(uses)f\n(determinan)o(ts,)h(but)g(pro)o(vides)f(the)g(capabilit)o(y)f(of)164\n1434 y(transforming)i(to)g(the)f(Y)l(amanouc)o(hi-Kotani)g([16)q(])g\n(genealogical)g(spin)g(basis)h(with)164 1494 y(con)o(v)o(en)o(tional)20\nb(lexical)f(ordering)j(and)g(n)o(um)o(b)q(ering)f(of)g(electrons)g\n(\\(see)g(P)o(auncz)g([1]\\).)164 1554 y(This)d(is)g(the)f(same)h(as)h\n(the)e(standard)j(Y)l(oung)e(orthogonal)i(represen)o(tation)d(whic)o(h)\ng(is)164 1615 y(also)g(equiv)m(alen)o(t)d(to)j(the)f(Gelfand-Tsetlin)g\n(basis)h(of)f(the)g(unitary)g(group)h(approac)o(h.)237\n1675 y(The)23 b(branc)o(hing)g(diagram)h(\\(Figure)f(2\\))g(depicts)g\n(the)f(construction)i(of)f(a)h(spin-)164 1735 y(adapted)17\nb(basis)g(b)o(y)e(the)h(coupling)h(of)f(electronic)f(spins.)237\n1795 y(The)i(spin-adpated)h(basis)g(is)f(formed)g(b)o(y)f(using)i\n(standard)g(angular)g(momen)o(tum)164 1855 y(coupling)j(metho)q(ds.)35\nb(Electrons)21 b(are)f(again)i(added)f(one)g(at)g(a)h(time,)e(but)h(no)\no(w)g(the)164 1916 y(total)16 b(angular)g(momen)o(tma)f(are)g(coupled,)\ng(rather)g(than)h(just)g(the)f Fk(S)1447 1923 y Fj(z)1482\n1916 y Fo(comp)q(onen)o(t.)21 b(If)164 1976 y(some)c(in)o(termediate)e\n(no)q(de)j(has)g(spin)f Fk(S)s Fo(,)g(then)g(adding)g(an)h(alpha)g\n(spin)f(or)g(b)q(eta)h(spin)164 2036 y(electron)h(will)h(result)g(in)g\nFk(S)d Fh(\\006)754 2016 y Fi(1)p 754 2024 V 754 2053\na(2)777 2036 y Fo(,)k(but)f(w)o(e)g(also)h(ha)o(v)o(e)f(the)g\n(constrain)o(t)h(that)f Fk(S)k Fh(\\025)d Fo(0.)164 2096\ny(Th)o(us,)k(all)e(w)o(alks)g(on)g(the)g(spin-adpated)i(graph)f(m)o\n(ust)f(b)q(e)g(ab)q(o)o(v)o(e)g(the)g(horizon)o(tal)164\n2156 y(axis,)c(in)f(con)o(trast)h(to)h(the)e(graph)i(for)f(primitiv)o\n(e)d(spin)j(functions)g(\\()p Fh(\\000)p Fk(S)i Fh(\\024)d\nFk(S)1623 2163 y Fj(z)1661 2156 y Fh(\\024)f Fk(S)s Fo(\\).)164\n2217 y(It)23 b(can)h(again)h(b)q(e)f(seen)f(that)h(w)o(alks)g(on)g(the)\nf(graph)i(represen)o(t)e(all)g(p)q(ossible)h(spin)164\n2277 y(functions)f(and)h(consideration)g(of)f(the)g(spin-coupling)g\n(sho)o(ws)i(that)e(the)g(resulting)164 2337 y(basis)17\nb(is)f(orthonormal.)237 2397 y(Ho)o(w)f(man)o(y)f(spin)h(adapted)h\n(functions)e(are)h(there?)21 b(The)15 b(determinan)o(ts)f(for)h(giv)o\n(en)164 2457 y Fk(s)h Fo(and)h Fk(S)328 2464 y Fj(z)364\n2457 y Fo(will)e(form)h(a)h(complete)e(basis)i(for)f\nFk(S)h Fo(=)d Fk(S)1141 2464 y Fj(z)1161 2457 y Fk(;)8\nb(S)1213 2464 y Fj(z)1244 2457 y Fo(+)j(1)p Fk(;)d(:)g(:)g(:)o\nFo(,)16 b(and)h(th)o(us)961 2607 y(9)p eop end\n%%Page: 10 10\nTeXDict begin 10 9 bop 189 619 a Fo(Index)186 b(W)l(alk)p\n766 637 2 61 v 187 w(Index)h(W)l(alk)p 1370 637 V 187\nw(Index)f(W)l(alk)p 164 639 1810 2 v 189 681 a(1)145\nb Fl(+)25 b(+)g(+)h(+)f(-)g(-)g(-)h(-)p 766 699 2 61\nv 49 w Fo(25)121 b Fl(-)25 b(-)h(+)f(+)g(+)h(-)f(+)g(-)p\n1370 699 V 50 w Fo(49)121 b Fl(+)25 b(-)g(-)g(+)h(-)f(+)g(-)g(+)189\n741 y Fo(2)145 b Fl(+)25 b(+)g(+)h(-)f(+)g(-)g(-)h(-)p\n766 759 V 49 w Fo(26)121 b Fl(+)25 b(+)h(-)f(-)g(-)h(+)f(+)g(-)p\n1370 759 V 50 w Fo(50)121 b Fl(-)25 b(+)g(-)g(+)h(-)f(+)g(-)g(+)189\n801 y Fo(3)145 b Fl(+)25 b(+)g(-)h(+)f(+)g(-)g(-)h(-)p\n766 819 V 49 w Fo(27)121 b Fl(+)25 b(-)h(+)f(-)g(-)h(+)f(+)g(-)p\n1370 819 V 50 w Fo(51)121 b Fl(-)25 b(-)g(+)g(+)h(-)f(+)g(-)g(+)189\n862 y Fo(4)145 b Fl(+)25 b(-)g(+)h(+)f(+)g(-)g(-)h(-)p\n766 880 V 49 w Fo(28)121 b Fl(-)25 b(+)h(+)f(-)g(-)h(+)f(+)g(-)p\n1370 880 V 50 w Fo(52)121 b Fl(+)25 b(-)g(-)g(-)h(+)f(+)g(-)g(+)189\n922 y Fo(5)145 b Fl(-)25 b(+)g(+)h(+)f(+)g(-)g(-)h(-)p\n766 940 V 49 w Fo(29)121 b Fl(+)25 b(-)h(-)f(+)g(-)h(+)f(+)g(-)p\n1370 940 V 50 w Fo(53)121 b Fl(-)25 b(+)g(-)g(-)h(+)f(+)g(-)g(+)189\n982 y Fo(6)145 b Fl(+)25 b(+)g(+)h(-)f(-)g(+)g(-)h(-)p\n766 1000 V 49 w Fo(30)121 b Fl(-)25 b(+)h(-)f(+)g(-)h(+)f(+)g(-)p\n1370 1000 V 50 w Fo(54)121 b Fl(-)25 b(-)g(+)g(-)h(+)f(+)g(-)g(+)189\n1042 y Fo(7)145 b Fl(+)25 b(+)g(-)h(+)f(-)g(+)g(-)h(-)p\n766 1060 V 49 w Fo(31)121 b Fl(-)25 b(-)h(+)f(+)g(-)h(+)f(+)g(-)p\n1370 1060 V 50 w Fo(55)121 b Fl(-)25 b(-)g(-)g(+)h(+)f(+)g(-)g(+)189\n1102 y Fo(8)145 b Fl(+)25 b(-)g(+)h(+)f(-)g(+)g(-)h(-)p\n766 1120 V 49 w Fo(32)121 b Fl(+)25 b(-)h(-)f(-)g(+)h(+)f(+)g(-)p\n1370 1120 V 50 w Fo(56)121 b Fl(+)25 b(+)g(-)g(-)h(-)f(-)g(+)g(+)189\n1163 y Fo(9)145 b Fl(-)25 b(+)g(+)h(+)f(-)g(+)g(-)h(-)p\n766 1181 V 49 w Fo(33)121 b Fl(-)25 b(+)h(-)f(-)g(+)h(+)f(+)g(-)p\n1370 1181 V 50 w Fo(57)121 b Fl(+)25 b(-)g(+)g(-)h(-)f(-)g(+)g(+)189\n1223 y Fo(10)121 b Fl(+)25 b(+)g(-)h(-)f(+)g(+)g(-)h(-)p\n766 1241 V 49 w Fo(34)121 b Fl(-)25 b(-)h(+)f(-)g(+)h(+)f(+)g(-)p\n1370 1241 V 50 w Fo(58)121 b Fl(-)25 b(+)g(+)g(-)h(-)f(-)g(+)g(+)189\n1283 y Fo(11)121 b Fl(+)25 b(-)g(+)h(-)f(+)g(+)g(-)h(-)p\n766 1301 V 49 w Fo(35)121 b Fl(-)25 b(-)h(-)f(+)g(+)h(+)f(+)g(-)p\n1370 1301 V 50 w Fo(59)121 b Fl(+)25 b(-)g(-)g(+)h(-)f(-)g(+)g(+)189\n1343 y Fo(12)121 b Fl(-)25 b(+)g(+)h(-)f(+)g(+)g(-)h(-)p\n766 1361 V 49 w Fo(36)121 b Fl(+)25 b(+)h(+)f(-)g(-)h(-)f(-)g(+)p\n1370 1361 V 50 w Fo(60)121 b Fl(-)25 b(+)g(-)g(+)h(-)f(-)g(+)g(+)189\n1403 y Fo(13)121 b Fl(+)25 b(-)g(-)h(+)f(+)g(+)g(-)h(-)p\n766 1421 V 49 w Fo(37)121 b Fl(+)25 b(+)h(-)f(+)g(-)h(-)f(-)g(+)p\n1370 1421 V 50 w Fo(61)121 b Fl(-)25 b(-)g(+)g(+)h(-)f(-)g(+)g(+)189\n1464 y Fo(14)121 b Fl(-)25 b(+)g(-)h(+)f(+)g(+)g(-)h(-)p\n766 1482 V 49 w Fo(38)121 b Fl(+)25 b(-)h(+)f(+)g(-)h(-)f(-)g(+)p\n1370 1482 V 50 w Fo(62)121 b Fl(+)25 b(-)g(-)g(-)h(+)f(-)g(+)g(+)189\n1524 y Fo(15)121 b Fl(-)25 b(-)g(+)h(+)f(+)g(+)g(-)h(-)p\n766 1542 V 49 w Fo(39)121 b Fl(-)25 b(+)h(+)f(+)g(-)h(-)f(-)g(+)p\n1370 1542 V 50 w Fo(63)121 b Fl(-)25 b(+)g(-)g(-)h(+)f(-)g(+)g(+)189\n1584 y Fo(16)121 b Fl(+)25 b(+)g(+)h(-)f(-)g(-)g(+)h(-)p\n766 1602 V 49 w Fo(40)121 b Fl(+)25 b(+)h(-)f(-)g(+)h(-)f(-)g(+)p\n1370 1602 V 50 w Fo(64)121 b Fl(-)25 b(-)g(+)g(-)h(+)f(-)g(+)g(+)189\n1644 y Fo(17)121 b Fl(+)25 b(+)g(-)h(+)f(-)g(-)g(+)h(-)p\n766 1662 V 49 w Fo(41)121 b Fl(+)25 b(-)h(+)f(-)g(+)h(-)f(-)g(+)p\n1370 1662 V 50 w Fo(65)121 b Fl(-)25 b(-)g(-)g(+)h(+)f(-)g(+)g(+)189\n1704 y Fo(18)121 b Fl(+)25 b(-)g(+)h(+)f(-)g(-)g(+)h(-)p\n766 1722 V 49 w Fo(42)121 b Fl(-)25 b(+)h(+)f(-)g(+)h(-)f(-)g(+)p\n1370 1722 V 50 w Fo(66)121 b Fl(+)25 b(-)g(-)g(-)h(-)f(+)g(+)g(+)189\n1764 y Fo(19)121 b Fl(-)25 b(+)g(+)h(+)f(-)g(-)g(+)h(-)p\n766 1783 V 49 w Fo(43)121 b Fl(+)25 b(-)h(-)f(+)g(+)h(-)f(-)g(+)p\n1370 1783 V 50 w Fo(67)121 b Fl(-)25 b(+)g(-)g(-)h(-)f(+)g(+)g(+)189\n1825 y Fo(20)121 b Fl(+)25 b(+)g(-)h(-)f(+)g(-)g(+)h(-)p\n766 1843 V 49 w Fo(44)121 b Fl(-)25 b(+)h(-)f(+)g(+)h(-)f(-)g(+)p\n1370 1843 V 50 w Fo(68)121 b Fl(-)25 b(-)g(+)g(-)h(-)f(+)g(+)g(+)189\n1885 y Fo(21)121 b Fl(+)25 b(-)g(+)h(-)f(+)g(-)g(+)h(-)p\n766 1903 V 49 w Fo(45)121 b Fl(-)25 b(-)h(+)f(+)g(+)h(-)f(-)g(+)p\n1370 1903 V 50 w Fo(69)121 b Fl(-)25 b(-)g(-)g(+)h(-)f(+)g(+)g(+)189\n1945 y Fo(22)121 b Fl(-)25 b(+)g(+)h(-)f(+)g(-)g(+)h(-)p\n766 1963 V 49 w Fo(46)121 b Fl(+)25 b(+)h(-)f(-)g(-)h(+)f(-)g(+)p\n1370 1963 V 50 w Fo(70)121 b Fl(-)25 b(-)g(-)g(-)h(+)f(+)g(+)g(+)189\n2005 y Fo(23)121 b Fl(+)25 b(-)g(-)h(+)f(+)g(-)g(+)h(-)p\n766 2023 V 49 w Fo(47)121 b Fl(+)25 b(-)h(+)f(-)g(-)h(+)f(-)g(+)p\n1370 2023 V 189 2065 a Fo(24)121 b Fl(-)25 b(+)g(-)h(+)f(+)g(-)g(+)h(-)\np 766 2084 V 49 w Fo(48)121 b Fl(-)25 b(+)h(+)f(-)g(-)h(+)f(-)g(+)p\n1370 2084 V 164 2085 1810 2 v 185 2165 a Fo(T)l(able)16\nb(1:)21 b(Lexical)16 b(ordering)g(of)h(w)o(alks)f(on)g(the)g(prim)o\n(tiv)o(e)e(spin)i(graph)i(in)e(Figure)f(1.)949 2607 y(10)p\neop end\n%%Page: 11 11\nTeXDict begin 11 10 bop 290 320 a\n 21576417 13287915 0 -13287915 21576417 0 startTexFig\n\n 270 rotate\n 290 320 a\n%%BeginDocument: spingraph.eps\n%!PS-Adobe-2.0 EPSF\n%%Title: /tmp/xfig-fig007924\n%%Creator: fig2dev\n%%CreationDate: Mon Nov 25 00:15:14 1996\n%%For: d3g681@hpcc1 (Robert J Harrison)\n%%BoundingBox: 0 0 202 328\n%%Pages: 0\n%%EndComments\n/$F2psDict 200 dict def \n$F2psDict begin\n$F2psDict /mtrx matrix put\n/l {lineto} bind def\n/m {moveto} bind def\n/s {stroke} bind def\n/n {newpath} bind def\n/gs {gsave} bind def\n/gr {grestore} bind def\n/clp {closepath} bind def\n/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul\n4 -2 roll mul setrgbcolor} bind def\n/col-1 {} def\n/col0 {0 0 0 setrgbcolor} bind def\n/col1 {0 0 1 setrgbcolor} bind def\n/col2 {0 1 0 setrgbcolor} bind def\n/col3 {0 1 1 setrgbcolor} bind def\n/col4 {1 0 0 setrgbcolor} bind def\n/col5 {1 0 1 setrgbcolor} bind def\n/col6 {1 1 0 setrgbcolor} bind def\n/col7 {1 1 1 setrgbcolor} bind def\n\tend\n/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def\n/$F2psEnd {$F2psEnteredState restore end} def\n%%EndProlog\n\n$F2psBegin\n0 setlinecap 0 setlinejoin\n-9.0 -9.0 translate 90 rotate 0.900 -0.900 scale\n0.500 setlinewidth\n% Polyline\nn 54 184 m 54 24 l gs col-1 s gr\n% Polyline\nn 54 184 m 374 184 l gs col-1 s gr\n% Polyline\nn 54 184 m 214 24 l gs col-1 s gr\n% Polyline\nn 134 184 m 254 64 l gs col-1 s gr\n% Polyline\nn 214 24 m 374 184 l gs col-1 s gr\n% Polyline\nn 214 184 m 294 104 l gs col-1 s gr\n% Polyline\nn 294 184 m 334 144 l gs col-1 s gr\n% Polyline\nn 174 64 m 294 184 l gs col-1 s gr\n% Polyline\nn 134 104 m 214 184 l gs col-1 s gr\n% Polyline\nn 94 144 m 134 184 l gs col-1 s gr\n/Times-Roman findfont 12.00 scalefont setfont\n54 204 m \ngs 1 -1 scale (0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n94 204 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 204 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n174 204 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n214 204 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n254 204 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n294 204 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n34 24 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n34 104 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n34 184 m \ngs 1 -1 scale (0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 174 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n174 134 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n214 179 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n214 99 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n249 139 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n334 204 m \ngs 1 -1 scale (7) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n374 204 m \ngs 1 -1 scale (8) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n94 139 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 99 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n174 59 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n214 19 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n294 174 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n254 54 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n294 99 m \ngs 1 -1 scale (9) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n369 174 m \ngs 1 -1 scale (14) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n329 139 m \ngs 1 -1 scale (14) col-1 show gr\n/Times-Roman findfont 14.00 scalefont setfont\n159 234 m \ngs 1 -1 scale (Number of electrons) col-1 show gr\n/Times-Roman findfont 14.00 scalefont setfont\n9 104 m \ngs 1 -1 scale (S) col-1 show gr\n$F2psEnd\n\n%%EndDocument\n\n endTexFig\n 164 1263 a Fo(Figure)10 b(2:)19 b(Branc)o(hing-diagram)11\nb(or)h(spin-coupling)f(graph)g(for)h(8)f(op)q(en-shell)g(electrons)164\n1323 y(coupled)16 b(to)g(a)h(singlet.)286 1461 y Fk(d)p\nFo(\\()p Fk(s;)8 b(S)s Fo(\\))14 b(=)g Fk(f)5 b Fo(\\()p\nFk(s;)j(S)s Fo(\\))j(+)g Fk(f)5 b Fo(\\()p Fk(s;)j(S)14\nb Fo(+)d(1\\))g(+)g Fh(\\001)d(\\001)g(\\001)j Fo(+)g Fk(f)5\nb Fo(\\()p Fk(s;)j(S)1228 1468 y Fj(max)1300 1461 y Fo(\\))377\nb(\\(15\\))237 1521 y(Therefore,)12 b(the)g(n)o(um)o(b)q(er)f(of)i\n(spin-adpated)g(functions)f(for)g Fk(s)h Fo(op)q(en-shell)f(electrons)\n164 1581 y(coupled)k(to)g(spin)h Fk(S)i Fo(is)286 1675\ny Fk(f)5 b Fo(\\()p Fk(s;)j(S)s Fo(\\))41 b(=)h Fk(d)p\nFo(\\()p Fk(s;)8 b(S)s Fo(\\))j Fh(\\000)g Fk(d)p Fo(\\()p\nFk(s;)d(S)14 b Fo(+)d(1\\))717 b(\\(16\\))472 1775 y(=)42\nb Fk(d)p Fo(\\()p Fk(s;)8 b(S)s Fo(\\))741 1742 y(\\(2)p\nFk(S)14 b Fo(+)d(1\\))p 698 1764 266 2 v 698 1810 a(\\()722\n1790 y Fi(1)p 722 1798 18 2 v 722 1827 a(2)744 1810 y\nFk(s)g Fo(+)g Fk(S)j Fo(+)d(1\\))1696 1775 y(\\(17\\))472\n1918 y(=)552 1845 y Fg( )624 1888 y Fk(s)g Fo(+)g(1)610\n1928 y Fi(1)p 610 1936 V 610 1965 a(2)633 1948 y Fk(s)g\nFh(\\000)g Fk(S)771 1845 y Fg(!)817 1884 y Fo(\\(2)p Fk(S)j\nFo(+)d(1\\))p 817 1907 180 2 v 834 1952 a(\\()p Fk(s)g\nFo(+)g(1\\))1696 1918 y(\\(18\\))237 2041 y(The)18 b(same)f(argumen)o(t)h\n(ma)o(y)e(b)q(e)i(in)o(v)o(ok)o(ed)e(to)i(demonstrate)f(that)h(the)g\n(dimension)164 2101 y(of)f(a)f(spin-adpated)h(full-CI)f(for)g\nFk(n)h Fo(electrons)e(in)h Fk(M)22 b Fo(orbitals)16 b(for)h(total)f\n(spin)g Fk(S)s Fo(,)g(is)286 2195 y Fk(F)7 b Fo(\\()p\nFk(M)r(;)h(n;)g(S)s Fo(\\))41 b(=)h Fk(D)q Fo(\\()p Fk(M)r(;)8\nb(n;)g(S)s Fo(\\))k Fh(\\000)f Fk(D)q Fo(\\()p Fk(M)r(;)d(n;)g(S)15\nb Fo(+)c(1\\))442 b(\\(19\\))559 2295 y(=)42 b Fk(D)q Fo(\\()p\nFk(M)r(;)8 b(n;)g(S)s Fo(\\))1030 2261 y(\\()p Fk(M)17\nb Fo(+)11 b(1\\)\\(2)p Fk(S)j Fo(+)d(1\\))p 878 2284 658\n2 v 878 2330 a(\\()902 2310 y Fi(1)p 902 2318 18 2 v 902\n2347 a(2)925 2330 y Fk(n)g Fo(+)g Fk(S)j Fo(+)d(1\\)\\()p\nFk(M)17 b Fh(\\000)1288 2310 y Fi(1)p 1288 2318 V 1288\n2347 a(2)1311 2330 y Fk(n)11 b Fo(+)g Fk(S)j Fo(+)d(1\\))1696\n2295 y(\\(20\\))237 2422 y(The)16 b(F)o(CI)e(program)j(pro)o(vides)e\n(routines)g(\\(see)g(Section)g(10.3.1\\))i(to)e(transform)i(b)q(e-)164\n2482 y(t)o(w)o(een)12 b(the)h(determinan)o(t)g(and)h(CSF)f(spin)g\n(bases)h(for)g(a)g(giv)o(en)e(op)q(en-shell)i(o)q(ccupation.)949\n2607 y(11)p eop end\n%%Page: 12 12\nTeXDict begin 12 11 bop 164 315 a Fo(This)14 b(follo)o(ws)h(the)f\n(approac)o(h)h(of)f(Duc)o(h)h([6)o(])f(but)h(is)f(readily)f\n(constructed)i(from)f(the)g(de-)164 376 y(tailed)e(descriptions)h(of)g\n(the)g(coupling)g(in)g(the)g(b)q(o)q(oks)i(of)e(P)o(auncz)g(\\(e.g.,)g\n(see)f(from)h(page)164 436 y(96)k(of)g([2)o(]\\).)164\n602 y Fn(5)81 b(Graphical)21 b(represen)n(tation)f(of)g(orbital)h(o)r\n(ccupa-)285 694 y(tions)164 803 y Fo(Orbital)d(o)q(ccupations)h(ma)o(y)\nf(b)q(e)h(0,)g(1,)g(or)g(2)g(\\(empt)o(y)l(,)f(singly-,)g(or)h(doubly-o)\nq(ccupied\\))164 863 y(and)f(are)f(represen)o(ted)f(b)o(y)h(w)o(alks)g\n(on)h(a)g(3-w)o(a)o(y)f(graph)i([9,)e(8].)24 b(Since)16\nb(w)o(e)h(are)h(doing)g(a)164 923 y(full-CI)e(w)o(e)h(need)g(all)g(p)q\n(ossible)g(w)o(alks.)24 b(Figure)17 b(3)g(is)h(an)f(orbital)g(graph)i\n(for)e(a)h(full-CI)164 984 y(with)g(8-electrons)f(in)h(8-orbitals)g\n(without)g(use)g(of)g(spatial)g(symmetry)l(.)25 b(Again,)17\nb(eac)o(h)164 1044 y(no)q(de)g(can)g(b)q(e)g(assigned)h(a)f(w)o(eigh)o\n(t)f(whic)o(h)g(is)g(the)h(sum)g(of)g(the)f(w)o(eigh)o(ts)g(of)i(the)e\n(no)q(des)164 1104 y(that)j(connect)e(to)i(it)e(from)h(ab)q(o)o(v)o(e.)\n27 b(The)18 b(w)o(eigh)o(t)g(of)g(the)g(head)h(\\(top)f(no)q(de\\))h(is)f\n(1)g(and)164 1164 y(the)e(w)o(eigh)o(t)f(of)i(the)f(tail)g(\\(b)q(ottom)\nh(no)q(de\\))g(is)f(the)g(n)o(um)o(b)q(er)f(of)i(w)o(alks.)237\n1224 y(The)g(lexical)d(ordering)j(of)g(orbital)f(w)o(alks)g(is)h(suc)o\n(h)f(that)h(in)f(tra)o(v)o(ersing)g(the)g(graph)164 1285\ny(from)g(b)q(ottom)h(to)f(top)g(w)o(alks)g(the)g(righ)o(tmost)f(arcs)i\n(ha)o(v)o(e)e(lo)o(w)o(est)g(lexical)f(w)o(eigh)o(t)h(\\(the)164\n1345 y(\\014rst)i(and)h(last)f(t)o(w)o(en)o(t)o(y)f(four)h(w)o(alks)g\n(on)h(the)f(graph)h(in)f(Figure)f(5)i(are)f(giv)o(en)f(in)h(T)l(able)\n164 1405 y(2\\).)237 1465 y(Spatial)k(symmetry)f(is)h(in)g(the)g(co)q\n(de)g(in)g(a)h(rudimen)o(tary)l(,)f(but)g(useful,)h(fashion.)164\n1525 y(The)g(w)o(alks)g(are)h(ordered)f(as)h(if)e(there)h(is)g(no)h\n(symmetry)e(\\(c.f.,)h(T)l(able)g(2\\))g(and)h(the)164\n1586 y(symmetry)g(of)h(eac)o(h)g(w)o(alk)f(is)h(simply)f(computed)h(as)\ng(the)g(direct)f(pro)q(duct)i(of)f(the)164 1646 y(symmetry)13\nb(of)i(the)g(singly-o)q(ccupied)f(orbitals)g(\\(directly)f(a)o(v)m\n(ailable)h(from)h(the)f(routine)164 1706 y Fl(fci_owalk_)o(inf)o(o\\()o\n(\\))p Fo(,)d(Section)j(10.2.11\\).)21 b(Only)14 b(w)o(alks/o)q\n(ccupations)h(of)g(the)f(desired)164 1766 y(symmetry)j(are)i(included)f\n(in)g(the)g(CI)h(v)o(ector)f(\\(Section)g(6\\).)29 b(This)18\nb(facilitates)g(use)h(of)164 1826 y(symmetry)12 b(to)i(reduce)f(the)g\n(storage)i(required)e(for)g(the)h(CI)f(v)o(ector,)g(and)h(also)h(the)e\n(com-)164 1887 y(putation)j(of)g(matrix)f(elemen)o(ts)f(for)i(p)q\n(erturbation)g(metho)q(ds.)22 b(It)15 b(also)i(mak)o(es)e(it)g(easy)164\n1947 y(to)h(use)g(the)g(routines)g(in)g(instances)g(when)g(y)o(ou)g(w)o\n(an)o(t)g(to)g(sum)g(o)o(v)o(er)f(all)h(in)o(termediate)164\n2007 y(states)21 b(regardless)g(of)f(symmetry)l(.)33\nb(Ho)o(w)o(ev)o(er,)19 b(the)h(w)o(alks)h(of)g(a)f(sp)q(eci\\014c)g\n(symmetry)164 2067 y(are)d(not)h(group)q(ed)g(together)f(and)h\n(symmetry)d(is)i(not)h(presen)o(tly)d(used)i(to)h(reduce)e(the)164\n2127 y(exp)q(ense)g(of)g(the)g(CI)g(eigen)o(v)m(alue)f(problem.)237\n2187 y(An)j(alternativ)o(e)f(approac)o(h,)i(whic)o(h)f(I'v)o(e)e(used)j\n(in)f(other)g(programs,)h(is)f(to)h(mo)q(d-)164 2248\ny(ify)i(the)h(orbital)h(graph)g(b)o(y)f(splitting)f(eac)o(h)h(no)q(de)h\n(so)g(that)g(there)e(is)h(one)h(for)f(eac)o(h)164 2308\ny(irreducible)17 b(represen)o(tation.)27 b(The)19 b(symmetry)e(of)i(an)\ng(orbital)g(m)o(ust)f(b)q(e)h(tak)o(en)f(in)o(to)164\n2368 y(accoun)o(t)e(when)f(singly)g(o)q(ccup)o(ying)h(it)f(so)h(that)g\n(the)g(no)q(de)g(of)g(the)f(correct)g(o)q(ccupation)164\n2428 y(and)j(symmetry)e(is)h(connected)f(to)i(on)g(the)f(next)f(lev)o\n(el.)22 b(This)c(w)o(as,)f(I)g(think,)f(\\014rst)i(in-)949\n2607 y(12)p eop end\n%%Page: 13 13\nTeXDict begin 13 12 bop 215 514 a\n 23944560 25457541 0 -25457541 23944560 0 startTexFig\n\n 270 rotate\n 215 514 a\n%%BeginDocument: orbitalgraph.eps\n%!PS-Adobe-2.0 EPSF\n%%Title: /tmp/xfig-fig009186\n%%Creator: fig2dev\n%%CreationDate: Wed Nov 27 16:23:34 1996\n%%For: d3g681@hpcc1 (Robert J Harrison)\n%%BoundingBox: 0 0 387 364\n%%Pages: 0\n%%EndComments\n/$F2psDict 200 dict def \n$F2psDict begin\n$F2psDict /mtrx matrix put\n/l {lineto} bind def\n/m {moveto} bind def\n/s {stroke} bind def\n/n {newpath} bind def\n/gs {gsave} bind def\n/gr {grestore} bind def\n/clp {closepath} bind def\n/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul\n4 -2 roll mul setrgbcolor} bind def\n/col-1 {} def\n/col0 {0 0 0 setrgbcolor} bind def\n/col1 {0 0 1 setrgbcolor} bind def\n/col2 {0 1 0 setrgbcolor} bind def\n/col3 {0 1 1 setrgbcolor} bind def\n/col4 {1 0 0 setrgbcolor} bind def\n/col5 {1 0 1 setrgbcolor} bind def\n/col6 {1 1 0 setrgbcolor} bind def\n/col7 {1 1 1 setrgbcolor} bind def\n\tend\n/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def\n/$F2psEnd {$F2psEnteredState restore end} def\n%%EndProlog\n\n$F2psBegin\n0 setlinecap 0 setlinejoin\n-9.0 -22.0 translate 90 rotate 0.900 -0.900 scale\n0.500 setlinewidth\n% Polyline\nn 79 79 m 399 239 l gs col-1 s gr\n% Polyline\nn 79 159 m 399 319 l gs col-1 s gr\n% Polyline\nn 79 79 m 119 119 l  359 239 l  399 279 l gs col-1 s gr\n% Polyline\nn 79 119 m 119 159 l  359 279 l  399 319 l gs col-1 s gr\n% Polyline\nn 79 159 m 119 199 l  359 319 l  399 359 l gs col-1 s gr\n% Polyline\nn 119 79 m 119 199 l  119 199 l gs col-1 s gr\n% Polyline\nn 159 79 m 159 239 l gs col-1 s gr\n% Polyline\nn 199 119 m 199 239 l gs col-1 s gr\n% Polyline\nn 239 119 m 239 279 l gs col-1 s gr\n% Polyline\nn 279 159 m 279 279 l gs col-1 s gr\n% Polyline\nn 319 159 m 319 319 l gs col-1 s gr\n% Polyline\nn 359 199 m 359 319 l gs col-1 s gr\n% Polyline\nn 119 79 m 359 319 l gs col-1 s gr\n% Polyline\nn 119 159 m 239 279 l  239 279 l gs col-1 s gr\n% Polyline\nn 119 199 m 159 239 l  159 239 l gs col-1 s gr\n% Polyline\nn 159 79 m 359 279 l gs col-1 s gr\n% Polyline\nn 239 119 m 359 239 l gs col-1 s gr\n% Polyline\nn 319 159 m 359 199 l gs col-1 s gr\n% Polyline\nn 119 119 m 319 319 l gs col-1 s gr\n% Polyline\nn 79 119 m 399 279 l gs col-1 s gr\n% Polyline\nn 79 39 m 399 199 l  399 359 l  79 199 l \n 79 39 l  119 79 l  359 199 l  399 239 l gs col-1 s gr\n/Times-Roman findfont 12.00 scalefont setfont\n84 79 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n124 79 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n164 79 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n124 119 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n164 119 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 119 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n124 159 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n124 199 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n84 159 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n84 39 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n239 119 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n324 159 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 159 m \ngs 1 -1 scale (7) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n244 159 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n164 199 m \ngs 1 -1 scale (10) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 199 m \ngs 1 -1 scale (16) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n244 199 m \ngs 1 -1 scale (19) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 199 m \ngs 1 -1 scale (16) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n164 239 m \ngs 1 -1 scale (15) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 239 m \ngs 1 -1 scale (30) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n244 239 m \ngs 1 -1 scale (45) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 239 m \ngs 1 -1 scale (51) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n324 239 m \ngs 1 -1 scale (45) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n364 239 m \ngs 1 -1 scale (30) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n404 239 m \ngs 1 -1 scale (15) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n244 279 m \ngs 1 -1 scale (90) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 279 m \ngs 1 -1 scale (126) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n324 279 m \ngs 1 -1 scale (141) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n364 279 m \ngs 1 -1 scale (126) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n404 279 m \ngs 1 -1 scale (90) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n324 319 m \ngs 1 -1 scale (357) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n364 319 m \ngs 1 -1 scale (393) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n404 319 m \ngs 1 -1 scale (357) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n404 359 m \ngs 1 -1 scale (1107) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n84 119 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n164 159 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 159 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n84 199 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n324 199 m \ngs 1 -1 scale (10) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n364 199 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n404 199 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n24 19 m \ngs 1 -1 scale (Level) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 39 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 79 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 119 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 159 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 199 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 239 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 279 m \ngs 1 -1 scale (7) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 319 m \ngs 1 -1 scale (8) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n79 399 m \ngs 1 -1 scale (0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n119 399 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n159 399 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n199 399 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n239 399 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n279 399 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n319 399 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n359 399 m \ngs 1 -1 scale (7) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n399 399 m \ngs 1 -1 scale (8) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n199 439 m \ngs 1 -1 scale (Number of Electrons) col-1 show gr\n$F2psEnd\n\n%%EndDocument\n\n endTexFig\n 164 2228 a Fo(Figure)21 b(3:)31 b(Orbital)20 b(o)q(ccupation)i(graph)g\n(for)f(a)h(full-CI)e(with)h(8)h(electrons)e(in)h(eigh)o(t)164\n2288 y(orbitals.)949 2607 y(13)p eop end\n%%Page: 14 14\nTeXDict begin 14 13 bop 471 587 a Fo(Index)148 b(W)l(alk)p\n973 605 2 61 v 149 w(Index)h(W)l(alk)p 446 607 1056 2\nv 471 649 a(1)c(2)16 b(2)h(2)g(2)f(0)h(0)f(0)h(0)p 973\n667 2 61 v 50 w(1084)73 b(0)17 b(0)g(2)f(0)h(1)g(1)f(2)h(2)471\n709 y(2)145 b(2)16 b(2)h(2)g(1)f(1)h(0)f(0)h(0)p 973\n727 V 50 w(1085)73 b(1)17 b(0)g(0)f(1)h(1)g(1)f(2)h(2)471\n769 y(3)145 b(2)16 b(2)h(1)g(2)f(1)h(0)f(0)h(0)p 973\n787 V 50 w(1086)73 b(0)17 b(1)g(0)f(1)h(1)g(1)f(2)h(2)471\n829 y(4)145 b(2)16 b(1)h(2)g(2)f(1)h(0)f(0)h(0)p 973\n848 V 50 w(1087)73 b(0)17 b(0)g(1)f(1)h(1)g(1)f(2)h(2)471\n890 y(5)145 b(1)16 b(2)h(2)g(2)f(1)h(0)f(0)h(0)p 973\n908 V 50 w(1088)73 b(0)17 b(0)g(0)f(2)h(1)g(1)f(2)h(2)471\n950 y(6)145 b(2)16 b(2)h(2)g(0)f(2)h(0)f(0)h(0)p 973\n968 V 50 w(1089)73 b(1)17 b(0)g(0)f(0)h(2)g(1)f(2)h(2)471\n1010 y(7)145 b(2)16 b(2)h(1)g(1)f(2)h(0)f(0)h(0)p 973\n1028 V 50 w(1090)73 b(0)17 b(1)g(0)f(0)h(2)g(1)f(2)h(2)471\n1070 y(8)145 b(2)16 b(1)h(2)g(1)f(2)h(0)f(0)h(0)p 973\n1088 V 50 w(1091)73 b(0)17 b(0)g(1)f(0)h(2)g(1)f(2)h(2)471\n1130 y(9)145 b(1)16 b(2)h(2)g(1)f(2)h(0)f(0)h(0)p 973\n1148 V 50 w(1092)73 b(0)17 b(0)g(0)f(1)h(2)g(1)f(2)h(2)471\n1191 y(10)121 b(2)16 b(2)h(0)g(2)f(2)h(0)f(0)h(0)p 973\n1209 V 50 w(1093)73 b(2)17 b(0)g(0)f(0)h(0)g(2)f(2)h(2)471\n1251 y(11)121 b(2)16 b(1)h(1)g(2)f(2)h(0)f(0)h(0)p 973\n1269 V 50 w(1094)73 b(1)17 b(1)g(0)f(0)h(0)g(2)f(2)h(2)471\n1311 y(12)121 b(1)16 b(2)h(1)g(2)f(2)h(0)f(0)h(0)p 973\n1329 V 50 w(1095)73 b(0)17 b(2)g(0)f(0)h(0)g(2)f(2)h(2)471\n1371 y(13)121 b(2)16 b(0)h(2)g(2)f(2)h(0)f(0)h(0)p 973\n1389 V 50 w(1096)73 b(1)17 b(0)g(1)f(0)h(0)g(2)f(2)h(2)471\n1431 y(14)121 b(1)16 b(1)h(2)g(2)f(2)h(0)f(0)h(0)p 973\n1449 V 50 w(1097)73 b(0)17 b(1)g(1)f(0)h(0)g(2)f(2)h(2)471\n1492 y(15)121 b(0)16 b(2)h(2)g(2)f(2)h(0)f(0)h(0)p 973\n1510 V 50 w(1098)73 b(0)17 b(0)g(2)f(0)h(0)g(2)f(2)h(2)471\n1552 y(16)121 b(2)16 b(2)h(2)g(1)f(0)h(1)f(0)h(0)p 973\n1570 V 50 w(1099)73 b(1)17 b(0)g(0)f(1)h(0)g(2)f(2)h(2)471\n1612 y(17)121 b(2)16 b(2)h(1)g(2)f(0)h(1)f(0)h(0)p 973\n1630 V 50 w(1100)73 b(0)17 b(1)g(0)f(1)h(0)g(2)f(2)h(2)471\n1672 y(18)121 b(2)16 b(1)h(2)g(2)f(0)h(1)f(0)h(0)p 973\n1690 V 50 w(1101)73 b(0)17 b(0)g(1)f(1)h(0)g(2)f(2)h(2)471\n1732 y(19)121 b(1)16 b(2)h(2)g(2)f(0)h(1)f(0)h(0)p 973\n1750 V 50 w(1102)73 b(0)17 b(0)g(0)f(2)h(0)g(2)f(2)h(2)471\n1793 y(20)121 b(2)16 b(2)h(2)g(0)f(1)h(1)f(0)h(0)p 973\n1811 V 50 w(1103)73 b(1)17 b(0)g(0)f(0)h(1)g(2)f(2)h(2)471\n1853 y(21)121 b(2)16 b(2)h(1)g(1)f(1)h(1)f(0)h(0)p 973\n1871 V 50 w(1104)73 b(0)17 b(1)g(0)f(0)h(1)g(2)f(2)h(2)471\n1913 y(22)121 b(2)16 b(1)h(2)g(1)f(1)h(1)f(0)h(0)p 973\n1931 V 50 w(1105)73 b(0)17 b(0)g(1)f(0)h(1)g(2)f(2)h(2)471\n1973 y(23)121 b(1)16 b(2)h(2)g(1)f(1)h(1)f(0)h(0)p 973\n1991 V 50 w(1106)73 b(0)17 b(0)g(0)f(1)h(1)g(2)f(2)h(2)471\n2033 y(24)121 b(2)16 b(2)h(0)g(2)f(1)h(1)f(0)h(0)p 973\n2051 V 50 w(1107)73 b(0)17 b(0)g(0)f(0)h(2)g(2)f(2)h(2)p\n446 2053 1056 2 v 164 2133 a(T)l(able)24 b(2:)37 b(The)24\nb(\\014rst)h(and)f(last)h(t)o(w)o(en)o(t)o(y-four)e(lexically)e(ordered)\nj(w)o(alks)g(on)h(an)f(8-)164 2193 y(electron)15 b(8-orbital)i(full-CI)\ne(orbital)i(o)q(ccupation)g(graph.)949 2607 y(14)p eop\nend\n%%Page: 15 15\nTeXDict begin 15 14 bop 164 315 a Fo(tro)q(duced)15 b(b)o(y)f(Sha)o\n(vitt)g([11,)h(12])g(in)f(the)g(4-w)o(a)o(y)h(graph)h(\\(or)f(distinct)f\n(ro)o(w)g(table,)h(DR)l(T\\))164 376 y(of)i(the)f(graphical)g(unitary)g\n(group)h(approac)o(h)g(\\(GUGA\\).)164 542 y Fn(6)81 b(Indexing)27\nb(the)g(CI)g(v)n(ector)164 652 y Fo(The)14 b(CI)g(v)o(ector)g(lo)q(oks)\nh(lik)o(e)d(a)j(t)o(w)o(o-dimensional)f(arra)o(y)l(,)g\nFk(C)1252 659 y Fj(\\027)r(I)1306 652 y Fo(with)g(the)g(outermost)h(in-)\n164 712 y(dex)h(running)g(o)o(v)o(er)g(orbital)g(o)q(ccupations)h(\\()p\nFk(I)t Fo(\\))e(in)h(lexical)f(order,)g(and)i(the)f(innermost)164\n772 y(index)j(\\()p Fk(\\027)s Fo(\\))g(o)o(v)o(er)g(p)q(ossible)g(spin)g\n(functions)h(for)g(that)f(orbital)h(o)q(ccupation,)g(again)g(in)164\n832 y(lexical)15 b(order.)25 b(Since)17 b(the)g(n)o(um)o(b)q(er)f(of)i\n(spin)f(functions)h(v)m(aries)f(with)g(the)g(n)o(um)o(b)q(er)g(of)164\n892 y(singly)j(o)q(ccupied)g(orbitals)h(in)f Fk(I)t Fo(,)g(the)g(CI)h\n(v)o(ector)e(is)h(stored)h(as)g(a)g(one-dimensional)164\n953 y(v)o(ector)h(with)h(an)g(index)f(v)o(ector)g(of)h(dimension)f(the)\nh(n)o(um)o(b)q(er)f(of)h(orbital)g(w)o(alks)g(to)164\n1013 y(p)q(oin)o(t)e(to)h(the)f(b)q(eginning)h(of)g(the)f(co)q\n(e\\016cien)o(ts)f(for)h(a)h(giv)o(en)e(w)o(alk)h Fk(I)k\nFo(\\(see)c(the)g(rou-)164 1073 y(tine)16 b Fl(fci_owalk_)o(inf)o(o\\(\\))\no Fo(,)e(Section)i(10.2.11\\).)24 b(Note)17 b(that)g(only)g(co)q\n(e\\016cien)o(ts)e(of)i(the)164 1133 y(correct)j(symmetry)g(are)g\n(stored)i(and)f(therefore)f(the)h(index)f(in)o(to)g(the)h(CI)f(v)o\n(ector)g(is)164 1193 y(only)14 b(meaningful)g(for)g(these)g(orbital)g\n(w)o(alks)g(and)h(care)f(m)o(ust)g(b)q(e)h(tak)o(en)e(to)i(ensure)f\n(the)164 1253 y(correct)i(symmetry)e(b)q(efore)j(trying)f(to)g(use)h\n(an)f(index)g(in)o(to)g(the)g(CI)g(v)o(ector.)237 1314\ny(An)f(in)o(teresting)f(v)m(ariation)h(w)o(ould)g(b)q(e)h(to)f(group)h\n(together)f(within)g(the)g(CI)g(v)o(ector)164 1374 y(all)23\nb(orbital)f(o)q(ccupations)i(with)f(the)g(same)g(n)o(um)o(b)q(er)f(of)i\n(singly-o)q(ccupied)e(orbitals.)164 1434 y(Within)15\nb(eac)o(h)f(group)i(the)f(n)o(um)o(b)q(er)g(of)g(spin)g(functions)h(is)\nf(no)o(w)g(the)g(same)g(and)h(the)f(CI)164 1494 y(v)o(ector)g(ma)o(y)h\n(b)q(e)g(treated)g(as)h(a)g(t)o(w)o(o-dimensional)f(arra)o(y)l(.)164\n1661 y Fn(7)81 b(More)33 b(details)i(on)f(the)g(graphical)h(represen)n\n(ta-)285 1752 y(tions)164 1876 y Fc(7.1)66 b(Primitiv)n(e)23\nb(spin)f(graphs)164 1968 y Fo(Primitiv)o(e)d(spin)i(graphs)h(are)f\n(sligh)o(tly)f(easier)h(since)f(they)h(ha)o(v)o(e)f(at)h(most)h(t)o(w)o\n(o)f(arcs)164 2029 y(from)14 b(an)o(y)h(no)q(de.)21 b(No)q(des)15\nb(are)f(lab)q(elled)g(b)o(y)g(the)g(n)o(um)o(b)q(er)g(of)h(singly)f(o)q\n(ccupied)g(orbitals)164 2089 y(\\()p Fk(s)p Fo(\\))h(and)g(the)f(in)o\n(termediate)f Fk(S)727 2096 y Fj(z)761 2089 y Fo(=)g\nFk(m)p Fo(.)21 b(The)15 b(w)o(eigh)o(t)e(of)i(a)h(no)q(de)f\nFk(d)p Fo(\\()p Fk(s;)8 b(m)p Fo(\\))13 b(=)h Fk(d)1592\n2071 y Fj(s)1592 2101 y(m)1641 2089 y Fo(is)g(then)286\n2190 y Fk(d)311 2170 y Fj(s)311 2203 y(m)358 2190 y Fo(=)g\nFk(d)435 2170 y Fj(s)p Fd(\\000)p Fi(1)435 2210 y Fj(m)p\nFd(\\000)498 2196 y Fb(1)p 499 2202 16 2 v 499 2223 a(2)532\n2190 y Fo(+)d Fk(d)606 2170 y Fj(s)p Fd(\\000)p Fi(1)606\n2210 y Fj(m)p Fi(+)669 2196 y Fb(1)p 670 2202 V 670 2223\na(2)709 2190 y Fo(with)16 b Fk(d)845 2170 y Fi(0)845\n2203 y(0)879 2190 y Fo(=)e(1)741 b(\\(21\\))164 2303 y(in)11\nb(whic)o(h)g(no)q(des)h(with)g(no)g(connecting)f(arcs)h(ha)o(v)o(e)e\n(zero)i(w)o(eigh)o(t.)19 b(The)11 b(lexical)f(ordering)164\n2363 y(of)18 b(w)o(alks)g(on)h(a)f(graph)h(is)f(established)f(b)o(y)h\n(assigning)h(a)f(w)o(eigh)o(t)g(to)g(eac)o(h)g(arc)g(on)g(the)949\n2607 y(15)p eop end\n%%Page: 16 16\nTeXDict begin 16 15 bop 164 315 a Fo(graph.)22 b(The)16\nb(arcs)h(w)o(eigh)o(ts)f(are)g(lab)q(elled)f(as)i(follo)o(ws)286\n432 y Fk(Y)325 412 y Fj(s)p Fd(\\000)314 445 y Fj(m)412\n432 y Fo(connects)42 b(\\()p Fk(s;)8 b(m)p Fo(\\))13 b\nFh(!)h Fo(\\()p Fk(s)d Fo(+)g(1)p Fk(;)d(m)j Fh(\\000)1095\n399 y Fo(1)p 1095 421 25 2 v 1095 467 a(2)1125 432 y(\\))552\nb(\\(22\\))286 549 y Fk(Y)325 528 y Fj(s)p Fi(+)314 561\ny Fj(m)412 549 y Fo(connects)42 b(\\()p Fk(s;)8 b(m)p\nFo(\\))13 b Fh(!)h Fo(\\()p Fk(s)d Fo(+)g(1)p Fk(;)d(m)j\nFo(+)1095 515 y(1)p 1095 537 V 1095 583 a(2)1124 549\ny(\\))553 b(\\(23\\))686 730 y\n 9077882 11117117 0 -11117117 9077882 0 startTexFig\n\n 270 rotate\n 686 730 a\n%%BeginDocument: spinarcs.eps\n%!PS-Adobe-2.0 EPSF\n%%Title: /tmp/xfig-fig009186\n%%Creator: fig2dev\n%%CreationDate: Wed Nov 27 18:04:50 1996\n%%For: d3g681@hpcc1 (Robert J Harrison)\n%%BoundingBox: 0 0 169 138\n%%Pages: 0\n%%EndComments\n/$F2psDict 200 dict def \n$F2psDict begin\n$F2psDict /mtrx matrix put\n/l {lineto} bind def\n/m {moveto} bind def\n/s {stroke} bind def\n/n {newpath} bind def\n/gs {gsave} bind def\n/gr {grestore} bind def\n/clp {closepath} bind def\n/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul\n4 -2 roll mul setrgbcolor} bind def\n/col-1 {} def\n/col0 {0 0 0 setrgbcolor} bind def\n/col1 {0 0 1 setrgbcolor} bind def\n/col2 {0 1 0 setrgbcolor} bind def\n/col3 {0 1 1 setrgbcolor} bind def\n/col4 {1 0 0 setrgbcolor} bind def\n/col5 {1 0 1 setrgbcolor} bind def\n/col6 {1 1 0 setrgbcolor} bind def\n/col7 {1 1 1 setrgbcolor} bind def\n\tend\n/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def\n/$F2psEnd {$F2psEnteredState restore end} def\n%%EndProlog\n\n$F2psBegin\n0 setlinecap 0 setlinejoin\n-20.0 -40.0 translate 90 rotate 0.900 -0.900 scale\n0.500 setlinewidth\n% Polyline\nn 79 39 m 159 119 l  79 199 l gs col-1 s gr\n/Times-Roman findfont 12.00 scalefont setfont\n169 124 m \ngs 1 -1 scale (\\(s,m\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n44 34 m \ngs 1 -1 scale (\\(s-1,m+1/2\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n44 209 m \ngs 1 -1 scale (\\(s-1,m-1/2\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n124 74 m \ngs 1 -1 scale (Y) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n129 169 m \ngs 1 -1 scale (Y) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n139 164 m \ngs 1 -1 scale (\\(s-1\\)+) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n139 179 m \ngs 1 -1 scale (m-1/2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 69 m \ngs 1 -1 scale (\\(s-1\\)-) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 84 m \ngs 1 -1 scale (m+1/2) col-1 show gr\n$F2psEnd\n\n%%EndDocument\n\n endTexFig\n 164 1536 a Fo(Figure)19 b(4:)28 b(The)20 b(t)o(w)o(o)f(arcs)h(coming)f\n(in)o(to)g(no)q(de)h(\\()p Fk(s;)8 b(m)p Fo(\\))19 b(on)h(a)g(prim)o(tiv)\no(e)d(spin)i(graph,)164 1596 y(and)e(their)e(arc)i(w)o(eigh)o(ts.)237\n1703 y(The)g(w)o(eigh)o(t)f(\\()p Fk(w)547 1710 y Fj(\\033)570\n1703 y Fo(\\))h(or)h(lexical)d(index)h(of)h(a)g(w)o(alk)g(\\()p\nFh(f)p Fk(\\033)1234 1710 y Fj(j)1266 1703 y Fo(:)e Fk(j)j\nFo(=)d(1)p Fk(;)8 b(s)p Fh(g)p Fo(,)16 b(c.f.,)g(T)l(able)h(1\\))164\n1763 y(is)f(just)286 1849 y Fk(w)321 1856 y Fj(\\033)358\n1849 y Fo(=)e(1)d(+)517 1795 y Fj(s)495 1807 y Fg(X)494\n1899 y Fj(j)r Fi(=1)564 1849 y Fk(Y)603 1828 y Fj(s)619\n1833 y Ff(j)636 1828 y Fj(\\033)656 1833 y Ff(j)592 1861\ny Fj(m)623 1866 y Ff(j)1696 1849 y Fo(\\(24\\))237 1948\ny(where)18 b Fk(s)403 1955 y Fj(j)439 1948 y Fo(and)h\nFk(m)579 1955 y Fj(j)615 1948 y Fo(are)f(the)g(in)o(termediate)e(v)m\n(alues)i(of)g(the)g(n)o(um)o(b)q(er)f(of)i(electrons)164\n2008 y(and)e Fk(S)289 2015 y Fj(z)325 2008 y Fo(at)g(no)q(des)g(along)g\n(the)f(w)o(alk.)237 2068 y(An)d(arc)g(is)g(assigned)h(a)g(w)o(eigh)o(t)\ne(equal)h(to)g(the)g(n)o(um)o(b)q(er)f(of)i(w)o(alks)f(from)g(the)g\n(curren)o(t)164 2129 y(no)q(de)21 b(that)f(ha)o(v)o(e)g(lo)o(w)o(er)f\n(index.)33 b(The)20 b(standard)h(lexical)e(ordering)h(corresp)q(onds)i\n(to)164 2189 y(w)o(alking)15 b(from)h(righ)o(t)g(to)g(left)f(with)g\n(the)h(up)o(w)o(ard)g(arc)g(\\(righ)o(t)f(to)i(left!\\))j(b)q(eing)c(of)g\n(lo)o(w)o(er)164 2249 y(index.)36 b(Th)o(us,)23 b(considering)e(the)g\n(t)o(w)o(o)h(arcs)f(going)i(from)e(righ)o(t)g(to)h(left)f(from)g(no)q\n(de)164 2309 y(\\()p Fk(s;)8 b(m)p Fo(\\))20 b(\\(see)h(Figure)f(4\\))h\n(the)g(lexical)e(ordering)i(is)f(accomplished)g(b)o(y)h(the)f(follo)o\n(wing)164 2369 y(assignmen)o(ts)286 2467 y Fk(Y)325 2441\ny Fi(\\()p Fj(s)p Fd(\\000)p Fi(1\\))p Fd(\\000)314 2486\ny Fj(m)p Fi(+)377 2472 y Fb(1)p 378 2478 16 2 v 378 2499\na(2)485 2467 y Fo(=)41 b(0)949 2607 y(16)p eop end\n%%Page: 17 17\nTeXDict begin 17 16 bop 358 325 a Fk(Y)398 305 y Fj(s)p\nFi(+)386 338 y Fj(m)485 325 y Fo(=)41 b Fk(d)589 295\ny Fj(m)p Fi(+)652 282 y Fb(1)p 653 288 16 2 v 653 308\na(2)589 336 y Fj(s)p Fd(\\000)p Fi(1)1696 325 y Fo(\\(25\\))164\n419 y(F)l(or)19 b(computational)h(con)o(v)o(enience,)d(an)i(arc)h(that)\nf(do)q(es)h(not)g(exist)e(is)h(assigned)h(zero)164 479\ny(w)o(eigh)o(t.)g(There)14 b(is)h(no)g(need)f(for)h(a)g(prim)o(tiv)o(e)\nd(\\(or)j(spin-adapted\\))g(spin)g(graph)h(to)f(ha)o(v)o(e)164\n539 y(separate)g(no)q(de)h(and)g(arc)f(w)o(eigh)o(t)f(tables,)h(ho)o(w)\no(ev)o(er,)f(the)h(curren)o(t)f(co)q(de)h(do)q(es)h(do)f(this.)164\n599 y(They)h(are)g(small)g(so)h(the)f(additional)g(memory)f(is)h(not)h\n(an)g(issue.)164 742 y Fc(7.2)66 b(Orbital)22 b(graphs)164\n835 y Fo(No)q(des)e(on)g(an)h(orbital)e(graph)i(are)f(lab)q(elled)e(b)o\n(y)i(the)f(lev)o(el)f(\\()p Fk(l)q Fo(\\),)i(whic)o(h)f(corresp)q(onds)\n164 895 y(the)d(orbital)h(b)q(eing)g(o)q(ccupied)f(b)o(y)g(arcs)h\n(going)g(do)o(wn,)g(and)g(the)g(n)o(um)o(b)q(er)f(of)h(electrons)164\n955 y Fk(n)p Fo(.)30 b(When)19 b(spatial)g(symmetry)f(is)h(in)o(tro)q\n(duced)g(there)g(will)f(b)q(e)h(an)h(additional)f(index)164\n1015 y(for)g(eac)o(h)f(irreducible)e(represen)o(tation.)28\nb(The)19 b(w)o(eigh)o(t)f(\\()p Fk(k)1247 997 y Fj(l)1245\n1027 y(n)1286 1015 y Fo(=)g Fk(k)r Fo(\\()p Fk(l)q(;)8\nb(n)p Fo(\\)\\))18 b(of)h(eac)o(h)f(no)q(de)164 1075 y(is)e(simply)286\n1168 y Fk(k)313 1148 y Fj(l)311 1181 y(n)349 1168 y Fo(=)d\nFk(k)427 1148 y Fj(l)p Fd(\\000)p Fi(1)425 1181 y Fj(n)p\nFd(\\000)p Fi(2)505 1168 y Fo(+)e Fk(k)581 1148 y Fj(l)p\nFd(\\000)p Fi(1)579 1181 y Fj(n)p Fd(\\000)p Fi(1)659 1168\ny Fo(+)g Fk(k)735 1148 y Fj(l)p Fd(\\000)p Fi(1)733 1181\ny Fj(n)1696 1168 y Fo(\\(26\\))164 1262 y(where)16 b(it)g(is)g(assumed)g\n(that)h(no)q(des)g(with)f(no)h(connecting)f(arcs)g(ha)o(v)o(e)g(zero)g\n(w)o(eigh)o(t.)448 1378 y\n 16577003 9341009 0 -9341009 16577003 0 startTexFig\n\n 270 rotate\n 448 1378 a\n%%BeginDocument: orbitalarcs.eps\n%!PS-Adobe-2.0 EPSF\n%%Title: /tmp/xfig-fig009186\n%%Creator: fig2dev\n%%CreationDate: Wed Nov 27 18:40:01 1996\n%%For: d3g681@hpcc1 (Robert J Harrison)\n%%BoundingBox: 0 0 142 252\n%%Pages: 0\n%%EndComments\n/$F2psDict 200 dict def \n$F2psDict begin\n$F2psDict /mtrx matrix put\n/l {lineto} bind def\n/m {moveto} bind def\n/s {stroke} bind def\n/n {newpath} bind def\n/gs {gsave} bind def\n/gr {grestore} bind def\n/clp {closepath} bind def\n/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul\n4 -2 roll mul setrgbcolor} bind def\n/col-1 {} def\n/col0 {0 0 0 setrgbcolor} bind def\n/col1 {0 0 1 setrgbcolor} bind def\n/col2 {0 1 0 setrgbcolor} bind def\n/col3 {0 1 1 setrgbcolor} bind def\n/col4 {1 0 0 setrgbcolor} bind def\n/col5 {1 0 1 setrgbcolor} bind def\n/col6 {1 1 0 setrgbcolor} bind def\n/col7 {1 1 1 setrgbcolor} bind def\n\tend\n/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def\n/$F2psEnd {$F2psEnteredState restore end} def\n%%EndProlog\n\n$F2psBegin\n0 setlinecap 0 setlinejoin\n-11.0 -9.0 translate 90 rotate 0.900 -0.900 scale\n/Times-Roman findfont 12.00 scalefont setfont\n119 69 m \ngs 1 -1 scale (Z) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n129 64 m \ngs 1 -1 scale (\\(l-1\\)2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 79 m \ngs 1 -1 scale (n-2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n194 69 m \ngs 1 -1 scale (Z) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 64 m \ngs 1 -1 scale (\\(l-1\\)1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 79 m \ngs 1 -1 scale (n-1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n274 69 m \ngs 1 -1 scale (Z) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 64 m \ngs 1 -1 scale (\\(l-1\\)0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 79 m \ngs 1 -1 scale (n) col-1 show gr\n0.500 setlinewidth\n% Polyline\nn 29 29 m 269 149 l  269 149 l gs col-1 s gr\n% Polyline\nn 269 149 m 149 29 l gs col-1 s gr\n% Polyline\nn 269 149 m 269 29 l gs col-1 s gr\n/Times-Roman findfont 12.00 scalefont setfont\n264 169 m \ngs 1 -1 scale (\\(l,n\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n9 24 m \ngs 1 -1 scale (\\(l-1,n-2\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n254 24 m \ngs 1 -1 scale (\\(l-1,n\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n129 24 m \ngs 1 -1 scale (\\(l-1,n-1\\)) col-1 show gr\n$F2psEnd\n\n%%EndDocument\n\n endTexFig\n 164 2071 a Fo(Figure)j(5:)27 b(The)20 b(three)e(arcs,)i(and)g(their)e\n(w)o(eigh)o(ts,)h(coming)g(in)o(to)g(no)q(de)h(\\()p Fk(l)q(;)8\nb(n)p Fo(\\))19 b(on)g(an)164 2131 y(orbital)d(o)q(ccupation)h(graph.)\n237 2244 y(The)f(three)g(p)q(ossible)g(arcs)h(descending)f(from)g(a)h\n(no)q(de)g(are)f(\\(see)g(Figure)f(5\\))286 2337 y Fk(Z)323\n2317 y Fj(l;)p Fi(0)319 2349 y Fj(n)405 2337 y Fo(connects)41\nb(\\()p Fk(l)q(;)8 b(n)p Fo(\\))14 b Fh(!)f Fo(\\()p Fk(l)f\nFo(+)f(1)p Fk(;)d(n)p Fo(\\))697 b(\\(27\\))286 2410 y Fk(Z)323\n2389 y Fj(l;)p Fi(1)319 2422 y Fj(n)405 2410 y Fo(connects)41\nb(\\()p Fk(l)q(;)8 b(n)p Fo(\\))14 b Fh(!)f Fo(\\()p Fk(l)f\nFo(+)f(1)p Fk(;)d(n)j Fo(+)g(1\\))613 b(\\(28\\))286 2482\ny Fk(Z)323 2462 y Fj(l;)p Fi(2)319 2495 y Fj(n)405 2482\ny Fo(connects)41 b(\\()p Fk(l)q(;)8 b(n)p Fo(\\))14 b Fh(!)f\nFo(\\()p Fk(l)f Fo(+)f(1)p Fk(;)d(n)j Fo(+)g(2\\))613 b(\\(29\\))949\n2607 y(17)p eop end\n%%Page: 18 18\nTeXDict begin 18 17 bop 164 315 a Fo(and)24 b(again)g(the)e(w)o(eigh)o\n(t)h(\\()p Fk(w)709 322 y Fj(z)728 315 y Fo(\\))g(of)h(an)f(orbital)g(w)o\n(alk)g(\\()p Fh(f)p Fk(z)k Fo(:)e Fk(z)1348 322 y Fj(l)1361\n315 y Fk(;)8 b(l)26 b Fo(=)f(1)p Fk(;)8 b(M)d Fh(g)p\nFo(,)25 b(for)f Fk(M)164 376 y Fo(orbitals,)16 b Fk(z)377\n383 y Fj(l)403 376 y Fo(=)e(0)p Fk(;)8 b Fo(1)p Fk(;)g\nFo(2\\))17 b(or)g(o)q(ccupation)g(pattern,)f(is)g(simply)286\n473 y Fk(w)321 480 y Fj(z)354 473 y Fo(=)e(1)e(+)502\n419 y Fj(M)491 432 y Fg(X)493 524 y Fj(l)p Fi(=1)559\n473 y Fk(Z)596 453 y Fj(l;z)633 459 y Ff(l)592 485 y\nFj(n)613 491 y Ff(l)1696 473 y Fo(\\(30\\))237 567 y(where)h\nFk(n)404 574 y Fj(l)429 567 y Fo(is)g(the)f(in)o(termediate)f(n)o(um)o\n(b)q(er)h(of)h(electrons)f(at)h(eac)o(h)g(no)q(de)g(in)f(the)h(w)o\n(alk.)164 627 y(Note)g(that)h(in)f(the)h(full-CI)e(program)j(the)e\n(arcs)h Fk(Z)1078 609 y Fj(l;j)1074 639 y(n)1117 627\ny Fk(;)8 b(j)16 b Fo(=)e(0)p Fk(;)8 b Fo(1)p Fk(;)g Fo(2)14\nb(are)g(actually)f(indexed)164 687 y(with)j Fk(j)h Fo(=)d(1)p\nFk(;)8 b Fo(2)p Fk(;)g Fo(3)17 b(for)f(historical)g(reasons.)237\n747 y(The)h(lexical)d(ordering)j(of)g(orbital)f(w)o(alks)g(is)h(suc)o\n(h)f(that)h(in)f(tra)o(v)o(ersing)g(the)g(graph)164 807\ny(from)g(b)q(ottom)h(to)f(top)g(w)o(alks)g(the)g(righ)o(tmost)f(arcs)i\n(ha)o(v)o(e)e(lo)o(w)o(est)g(lexical)f(w)o(eigh)o(t)h(\\(the)164\n868 y(\\014rst)i(and)h(last)f(t)o(w)o(en)o(t)o(y)f(four)h(w)o(alks)g(on)\nh(the)f(graph)h(in)f(Figure)f(5)i(are)f(giv)o(en)f(in)h(T)l(able)164\n928 y(2\\).)k(Th)o(us,)15 b(the)g(w)o(eigh)o(t)f(of)h(an)g(up)o(w)o(ard)\ng(b)q(ound)h(arc)f(should)h(b)q(e)f(equal)f(to)h(the)g(n)o(um)o(b)q(er)\n164 988 y(of)g(p)q(ossible)g(w)o(alks)f(that)h(tra)o(v)o(erse)f(other)g\n(arcs)h(from)g(the)f(same)g(no)q(de)i(that)f(are)f(to)h(the)164\n1048 y(righ)o(t)i(of)i(the)e(arc)h(of)g(in)o(terest.)25\nb(Considering)18 b(again)g(the)g(three)f(arcs)h(going)h(up)f(from)164\n1108 y(no)q(de)f(\\()p Fk(l)q(;)8 b(n)p Fo(\\))16 b(\\(Figure)f(5\\))286\n1194 y Fk(Z)323 1170 y Fj(l)p Fd(\\000)p Fi(1)p Fj(;j)319\n1205 y(n)p Fd(\\000)p Fj(j)421 1194 y Fo(=)f Fk(Z)510\n1170 y Fj(l)p Fd(\\000)p Fi(1)p Fj(;j)r Fd(\\000)p Fi(1)506\n1205 y Fj(n)p Fd(\\000)p Fj(j)r Fi(+1)650 1194 y Fo(+)d\nFk(k)726 1173 y Fj(l)p Fd(\\000)p Fi(1)724 1206 y Fj(n)p\nFd(\\000)p Fj(j)r Fi(+1)853 1194 y Fo(with)16 b Fk(Z)1001\n1173 y Fj(l)p Fd(\\000)p Fi(1)p Fj(;)p Fi(0)997 1206 y\nFj(n)1100 1194 y Fo(=)e(0)520 b(\\(31\\))164 1285 y(where)16\nb Fk(k)332 1265 y Fj(l)p Fd(\\000)p Fi(1)330 1297 y Fj(n)p\nFd(\\000)p Fj(j)r Fi(+1)458 1285 y Fo(\\(Equation)h(26\\))g(is)f(the)f(n)o\n(um)o(b)q(er)h(of)g(w)o(alks)g(coming)g(do)o(wn)g(from)g(no)q(de)164\n1346 y(\\()p Fk(l)8 b Fh(\\000)g Fo(1)p Fk(;)g(n)g Fh(\\000)g\nFk(j)j Fo(+)d(1\\).)21 b(Again,)14 b(for)h(computational)g(con)o(v)o\n(enience,)e(arcs)i(and)g(no)q(des)g(that)164 1406 y(do)i(not)f(exist)g\n(are)g(assigned)h(zero)f(w)o(eigh)o(t.)237 1466 y(Aside:)23\nb(Multiple)16 b(tails)h(can)h(b)q(e)g(accomo)q(dated)g(on)g(the)g(same)\nf(graph)i(b)o(y)e(setting)164 1526 y(the)f(w)o(eigh)o(t)f(of)i\nFk(Z)495 1508 y Fj(M)r(;)p Fi(0)491 1538 y Fj(n)576 1526\ny Fo(to)g(b)q(e)f(the)g(sum)g(of)h(the)f(w)o(eigh)o(ts)g(of)g(other)h\n(tails)f(to)g(the)g(righ)o(t.)164 1668 y Fc(7.3)66 b(Constructing)22\nb(the)h(w)n(eigh)n(ts)e(and)i(w)n(alking)f(the)g(graphs)164\n1760 y Fo(The)17 b(no)q(de)h(w)o(eigh)o(ts)e(are)h(readily)f(formed)h\n(b)o(y)g(tra)o(v)o(ersing)f(the)h(graphs)h(from)f(head)h(to)164\n1820 y(tail)f(\\(left)g(to)i(righ)o(t)e(for)h(the)g(spin)g(graphs,)h\n(top)f(to)g(b)q(ottom)h(for)f(the)g(orbital)g(graphs\\))164\n1880 y(using)f(the)f(recursiv)o(e)e(form)o(ulae)i(for)g(the)g(no)q(de)h\n(w)o(eigh)o(ts)f(\\(Equations)h(26)g(and)f(21\\).)237 1941\ny(The)d(arc)g(w)o(eigh)o(ts)g(are)g(then)g(determined)f(b)o(y)g(tra)o\n(v)o(ersing)h(the)g(graphs)h(from)f(tail)g(to)164 2001\ny(head)j(\\(righ)o(t)f(to)i(left)d(for)j(the)e(spin)h(graphs,)g(b)q\n(ottom)h(to)f(top)g(for)h(the)e(orbital)h(graphs\\))164\n2061 y(using)h(the)f(recursiv)o(e)e(form)o(ulae)i(for)g(the)g(arc)g(w)o\n(eigh)o(ts)g(\\(Equations)h(25)g(and)g(31\\).)237 2121\ny(Giv)o(en)c(a)h(w)o(alk)g(on)g(a)g(graph)h(\\(i.e.,)d(either)h(a)h\n(spin)g(or)g(orbital)g(o)q(ccupation)h(pattern\\))164\n2181 y(the)20 b(lexical)e(w)o(eigh)o(t)i(is)g(readily)f(computed)h\n(from)g(the)g(arc)g(w)o(eigh)o(ts)f(\\(Equations)i(24)164\n2242 y(and)e(30\\).)29 b(This)18 b(requires)g Fk(O)q Fo(\\()p\nFk(N)5 b Fo(\\))19 b(arra)o(y)g(references)e(and)i(in)o(teger)e\n(additions)i(\\(where)164 2302 y Fk(N)h Fo(is)15 b(the)f(n)o(um)o(b)q\n(er)g(of)h(op)q(en)g(shells)f(or)i(the)e(n)o(um)o(b)q(er)g(of)h\n(orbitals)g(for)g(spin)g(and)g(orbital)164 2362 y(graphs)i(resp)q\n(ectiv)o(ely\\).)237 2422 y(Determining)10 b(the)g(o)q(cccupation)i\n(from)e(the)h(lexical)e(w)o(eigh)o(t)h(is)h(only)f(sligh)o(tly)g\n(harder.)164 2482 y(Starting)17 b(from)f(the)g(tail)f(of)i(the)f(graph)\nh(w)o(e)f(accum)o(ulate)f(the)h(w)o(eigh)o(t)g(of)g(a)h(trial)e(w)o\n(alk)949 2607 y(18)p eop end\n%%Page: 19 19\nTeXDict begin 19 18 bop 164 315 a Fo(\\(initialized)15\nb(to)j(1\\),)f(and)h(at)g(eac)o(h)f(no)q(de)h(w)o(e)f(tak)o(e)f(the)h\n(highest)h(w)o(eigh)o(t)e(arc)i(\\(i.e.,)d(the)164 376\ny(lo)o(w)o(est)g(spin)g(arc,)g(or)h(the)f(leftmost)g(orbital)g(arc\\))g\n(that)h(is)f(consisten)o(t)g(with)h(the)f(incre-)164\n436 y(men)o(ted)j(w)o(alk)i(w)o(eigh)o(t)f(b)q(eing)g(less)h(than)g(or)\ng(equal)f(to)h(the)g(w)o(eigh)o(t)f(of)h(the)f(w)o(alk)g(w)o(e)164\n496 y(are)e(seeking.)k(This)c(pro)q(cess)g(requires)e\nFk(O)q Fo(\\()p Fk(N)5 b Fo(\\))18 b(comparisons)f(as)g(w)o(ell)e(as)i\nFk(O)q Fo(\\()p Fk(N)5 b Fo(\\))18 b(arra)o(y)164 556 y(lo)q(ok-ups)f\n(and)g(in)o(teger)e(additions.)164 723 y Fn(8)81 b(Matrix)22\nb(elemen)n(ts)g(of)g(orbital)h(replacemen)n(t)f(op-)285\n814 y(erators)164 923 y Fo(In)i(the)h(determinan)o(t)e(basis)i(it)f(is)\ng(easy)h(to)g(compute)f(matrix)g(elemen)o(ts)f(of)i(spin-)164\n984 y(dep)q(enden)o(t)16 b(op)q(erators,)h(ho)o(w)o(ev)o(er,)d(I)i\n(presen)o(tly)f(restrict)g(atten)o(tion)g(to)i(spin-adapted)164\n1044 y(op)q(erators)i(\\(e.g.,)e Fk(E)541 1051 y Fj(ij)571\n1044 y Fo(\\))h(whic)o(h)f(act)g(as)i(spatial)e(orbital)h(replacemen)o\n(t)e(op)q(erators.)27 b(By)164 1104 y(doing)17 b(this)g(the)f\n(formalism)g(for)h(ev)m(aluating)g(matrix)f(elemen)o(ts)f(o)o(v)o(er)h\n(b)q(oth)h(CSF)g(and)164 1164 y(determinan)o(ts)g(is)h(exactly)f(the)h\n(same)g(\\(I)g(think)g(it)f(can)i(b)q(e)f(made)g(the)g(same)g(ev)o(en)f\n(in)164 1224 y(the)f(case)g(of)h(spin-dep)q(enden)o(t)f(op)q(erators)h\n(but)g(only)f(with)g(an)h(extended)e(notation\\).)224\n1339 y(1.)24 b(Note)10 b(that)i(an)f(orbital)g(replacemen)o(t)e(op)q\n(erator)j(comm)o(utes)e(with)h(p)q(erm)o(utations)286\n1399 y(that)17 b(act)f(on)h(the)f(electrons)f(|)h(the)g(lab)q(els)g\n(are)h(indep)q(enden)o(t.)224 1500 y(2.)24 b(Let)389\n1488 y(^)378 1500 y Fk(Q)c Fo(b)q(e)h(an)g(orbital)f(replacemen)o(t)f\n(op)q(erator)j(and)f(let)f Fh(j)p Fk(K)c(>)21 b Fo(and)g\nFh(j)p Fk(I)16 b(>)21 b Fo(b)q(e)286 1561 y(orbital)16\nb(con\\014gurations)i(in)e(standard)h(order)f(\\(Section)g(2\\))h(suc)o(h)\nf(that)441 1683 y Fh(j)p Fk(K)9 b(>)42 b Fo(=)f Fk(Q)p\nFh(j)p Fk(K)762 1663 y Fj(Q)797 1683 y Fk(>)p Fo(=)14\nb Fk(Q)936 1671 y Fo(^)926 1683 y Fk(Q)o Fh(j)p Fk(I)9\nb(>)k Fo(,)j(or)563 b(\\(32\\))419 1743 y(^)408 1756 y\nFk(Q)13 b Fh(j)p Fk(I)c(>)42 b Fo(=)f Fk(Q)703 1735 y\nFd(\\000)p Fi(1)750 1756 y Fh(j)p Fk(K)9 b(>)844 b Fo(\\(33\\))286\n1878 y(where)18 b Fh(j)p Fk(K)488 1860 y Fj(Q)526 1878\ny Fk(>)g Fo(is)g(an)g(orbital)g(con\\014guration)h(in)f\nFe(non-standar)n(d)g Fo(order)h(that)f(is)286 1938 y(pro)q(duced)g(b)o\n(y)f(the)g(action)h(of)870 1926 y(^)859 1938 y Fk(Q)f\nFo(on)h Fh(j)p Fk(I)11 b(>)p Fo(.)25 b Fk(Q)17 b Fo(is)g(the)g\n(electronic)f(p)q(erm)o(utation)286 1999 y(that)j(returns)f\nFh(j)p Fk(K)623 1981 y Fj(Q)661 1999 y Fk(>)g Fo(to)h(standard)g(o)q\n(ccupation)g(order.)27 b(This)19 b(is)f(the)g(line-up)286\n2059 y(p)q(erm)o(utation)e(\\(or)h(the)f(in)o(v)o(erse)e(of)j(it)e(dep)q\n(ending)i(on)g(y)o(our)f(p)q(ersp)q(ectiv)o(e\\).)224\n2161 y(3.)24 b(Recall)15 b(that)i(a)f(determinan)o(t)f(or)i(CSF)f(is)g\n(written)408 2283 y Fh(j)p Fk(I)t(\\025)6 b(>)p Fo(=)13\nb Fh(A)g(j)p Fk(I)c(>)14 b Fo(\\002)759 2290 y Fj(\\025)1696\n2283 y Fo(\\(34\\))949 2607 y(19)p eop end\n%%Page: 20 20\nTeXDict begin 20 19 bop 224 315 a Fo(4.)24 b(Also)16\nb(recall)f(these)h(prop)q(erties)g(of)h(the)f(an)o(tisymmetrizer)443\n437 y Fh(A)41 b Fo(=)638 403 y(1)p 609 425 85 2 v 609\n434 a Fh(p)p 650 434 43 2 v 650 477 a Fk(n)p Fo(!)706\n395 y Fg(X)722 487 y Fj(P)766 437 y Fo(\\()p Fh(\\000)p\nFo(1\\))867 416 y Fj(P)896 437 y Fk(P)769 b Fo(\\(35\\))524\n552 y(=)42 b Fh(A)644 531 y Fd(y)1696 552 y Fo(\\(36\\))423\n630 y Fh(A)463 609 y Fi(2)524 630 y Fo(=)604 585 y Fh(p)p\n645 585 V 645 630 a Fk(n)p Fo(!)p Fh(A)968 b Fo(\\(37\\))408\n702 y Fk(P)7 b(A)41 b Fo(=)h Fk(AP)20 b Fo(=)14 b(\\()p\nFh(\\000)p Fo(1\\))845 682 y Fj(P)874 702 y Fk(A)785 b\nFo(\\(38\\))224 822 y(5.)24 b(The)16 b(action)g(of)599\n809 y(^)588 822 y Fk(Q)g Fo(on)h(a)f(determinan)o(t)f(or)i(CSF)f(is)g\n(then)h(formed)e(as)i(follo)o(ws)419 912 y(^)408 924\ny Fk(Q)o Fh(j)p Fk(I)t(\\025)6 b(>)41 b Fo(=)690 912 y(^)679\n924 y Fk(Q)13 b Fh(A)h(j)p Fk(I)8 b(>)14 b Fo(\\002)919\n931 y Fj(\\025)942 924 y Fo(,)i(de\\014ned)g(b)o(y)f(34)695\nb(\\(39\\))599 997 y(=)42 b Fh(A)743 984 y Fo(^)732 997\ny Fk(Q)14 b Fh(j)p Fk(I)8 b(>)14 b Fo(\\002)919 1004 y\nFj(\\025)942 997 y Fo(,)i(from)g(indep)q(endence)f(of)i(orbital)f(and)h\n(electronic)d(lab)q(els)-87 b(\\(40\\))599 1076 y(=)42\nb Fh(A)741 1028 y Fg(\\020)777 1063 y Fo(^)765 1076 y\nFk(Q)14 b Fh(j)p Fk(I)9 b(>)901 1028 y Fg(\\021)934 1076\ny Fo(\\002)972 1083 y Fj(\\025)994 1076 y Fo(,)16 b(since)g(only)g(I)f\n(con)o(tains)i(orbital)f(lab)q(els)196 b(\\(41\\))599 1167\ny(=)42 b Fh(A)741 1119 y Fg(\\020)765 1167 y Fk(Q)804\n1146 y Fd(\\000)p Fi(1)865 1167 y Fh(j)p Fk(K)9 b(>)967\n1119 y Fg(\\021)1000 1167 y Fo(\\002)1038 1174 y Fj(\\025)1061\n1167 y Fo(,)16 b(using)g(33)684 b(\\(42\\))599 1258 y(=)679\n1210 y Fg(h)698 1258 y Fh(A)14 b Fo(\\()p Fh(\\000)p Fo(1\\))853\n1238 y Fj(Q)883 1258 y Fk(Q)922 1210 y Fg(i)7 b(\\020)974\n1258 y Fk(Q)1013 1238 y Fd(\\000)p Fi(1)1074 1258 y Fh(j)p\nFk(K)i(>)1176 1210 y Fg(\\021)1209 1258 y Fo(\\002)1247\n1265 y Fj(\\025)1270 1258 y Fo(,)16 b(using)g(38)475 b(\\(43\\))599\n1343 y(=)42 b Fh(A)13 b Fo(\\()p Fh(\\000)p Fo(1\\))833\n1323 y Fj(Q)863 1343 y Fh(j)p Fk(K)d(>)j Fo(\\()p Fk(Q)h\nFo(\\002)1089 1350 y Fj(\\025)1111 1343 y Fo(\\))820 b(\\(44\\))599\n1447 y(=)42 b Fh(A)13 b(j)p Fk(K)d(>)848 1374 y Fg( )881\n1447 y Fo(\\()p Fh(\\000)p Fo(1\\))982 1426 y Fj(Q)1021\n1405 y Fg(X)1040 1493 y Fj(\\026)1089 1447 y Fo(\\002)1127\n1454 y Fj(\\026)1150 1447 y Fk(U)1183 1454 y Fj(\\026\\025)1227\n1447 y Fo(\\()p Fk(Q)p Fo(\\))1304 1374 y Fg(!)1950 1447\ny Fo(\\(45\\))599 1565 y(=)42 b(\\()p Fh(\\000)p Fo(1\\))780\n1545 y Fj(Q)818 1524 y Fg(X)837 1611 y Fj(\\026)886 1565\ny Fh(j)p Fk(K)t(\\026)6 b(>)14 b(U)1065 1572 y Fj(\\026\\025)1109\n1565 y Fo(\\()p Fk(Q)p Fo(\\))764 b(\\(46\\))286 1705 y(where)20\nb Fk(U)464 1712 y Fj(\\026\\025)508 1705 y Fo(\\()p Fk(Q)p\nFo(\\))g(is)h(an)g(elemen)o(t)d(of)j(the)f(represen)o(tation)g(matrix)g\n(of)h(the)g(p)q(er-)286 1765 y(m)o(utation)d Fk(Q)h Fo(in)f(the)g\n(spin-function)h(basis.)29 b(The)19 b(phase-factor)g(ma)o(y)g(also)g(b)\nq(e)286 1825 y(included)j(in)h Fk(U)29 b Fo(in)22 b(whic)o(h)h(case)g\n(it)g(is)g(referred)f(to)i(as)g(the)f(con)o(tra-gradien)o(t)286\n1886 y(represen)o(tation.)224 1982 y(6.)h(Using)16 b(the)g(ab)q(o)o(v)o\n(e)g(results)f(w)o(e)h(can)g(readily)f(obtain)i(the)f(v)m(alue)f(for)i\n(the)f(matrix)286 2042 y(elemen)o(t)408 2144 y Fk(<)6\nb(K)t(\\027)s Fh(j)549 2131 y Fo(^)538 2144 y Fk(Q)o Fh(j)p\nFk(I)t(\\025)g(>)41 b Fo(=)g(\\()p Fh(\\000)p Fo(1\\))909\n2123 y Fj(Q)947 2102 y Fg(X)967 2189 y Fj(\\026)1021 2144\ny Fk(<)6 b(K)t(\\027)s Fh(j)p Fk(K)t(\\026)g(>)14 b(U)1316\n2151 y Fj(\\026\\025)1360 2144 y Fo(\\()p Fk(Q)p Fo(\\))259\nb(\\(47\\))729 2260 y(=)41 b(\\()p Fh(\\000)p Fo(1\\))909\n2239 y Fj(Q)939 2260 y Fk(U)972 2267 y Fj(\\027)r(\\025)1014\n2260 y Fo(\\()p Fk(Q)p Fo(\\))605 b(\\(48\\))286 2362 y(In)16\nb(Equation)h(47)g(only)f(one)h(term)e(surviv)o(es)g(b)q(ecause)i(of)g\n(the)f(orthogonalit)o(y)h(of)286 2422 y(the)e(spatial)h(orbitals)g(and)\nh(the)e(c)o(hosen)h(spin)g(function)f(bases)i(\\(b)q(oth)g(primitiv)o(e)\n286 2482 y(and)g(spin)f(adapted\\).)949 2607 y(20)p eop\nend\n%%Page: 21 21\nTeXDict begin 21 20 bop 237 315 a Fo(What)17 b(line-up)e(p)q(erm)o\n(utations)i(\\()p Fk(Q)p Fo(\\))f(are)g(of)g(in)o(terest?)21\nb(Consider)1483 303 y(^)1471 315 y Fk(Q)14 b Fo(=)g Fk(E)1612\n322 y Fj(ij)1658 315 y Fo(where)164 376 y(orbital)22\nb Fk(j)k Fo(is)d(singly)f(o)q(ccupied)g(in)g Fh(j)p Fk(I)e(>)i\nFo(\\()p Fk(n)1010 358 y Fj(I)1010 388 y(j)1055 376 y\nFo(=)j(0\\))e(and)g(orbital)f Fk(i)h Fo(is)f(uno)q(ccupied)164\n436 y(\\()p Fk(n)212 418 y Fj(I)212 448 y(i)246 436 y\nFo(=)14 b(0\\).)21 b(This)16 b(simply)e(replaces)h(orbital)h(lab)q(el)f\nFk(j)j Fo(with)e Fk(i)p Fo(.)21 b(Let)p 1387 398 17 2\nv 15 w Fk(i)16 b Fo(and)p 1514 398 23 2 v 16 w Fk(j)i\nFo(b)q(e)e(the)g(cor-)164 496 y(rect)f(standard)i(p)q(osition)g(of)f\n(orbitals)g Fk(i)f Fo(and)i Fk(j)i Fo(resp)q(ectiv)o(ely)13\nb(amoung)k(the)f(singly)f(o)q(c-)164 556 y(cupied)e(orbitals)g(\\(whic)o\n(h)g(should)h(b)q(e)f(o)q(ccupied)h(in)f(increasing)g(order\\).)20\nb(F)l(urthermore,)164 616 y(let)f(us)i(assume)f(that)h\nFk(i)f(<)g(j)s Fo(.)33 b(Then,)21 b(the)e(p)q(erm)o(utation)h(of)h(the)\nf(\\(singly)f(o)q(ccupied\\))164 677 y(electronic)g(co)q(ordinates)k\n(that)e(restores)h(the)f(correct)f(ordering)i(of)f(the)g(o)q(ccupation)\n164 737 y(is)f(the)f(cyclic)f(p)q(erm)o(utation)i(\\()p\n744 699 17 2 v Fk(i)8 b(:)g(:)g(:)p 834 699 23 2 v 7\nw(j)s Fo(\\).)33 b(The)19 b(situation)i(for)f Fk(j)j Fo(doubly)d(o)q\n(ccupied,)g(or)164 797 y Fk(i)e Fo(singly)g(o)q(ccupied)g(is)g\n(similar,)g(but)h(w)o(e)f(defer)f(discussion)i(of)g(this)f(since)g\n(additional)164 857 y(simpli\\014cations)d(are)i(p)q(ossible.)237\n917 y(A)i(detailed)f(example)g(ma)o(y)h(help.)30 b(Considering)20\nb(just)f(the)g(singly)g(o)q(ccupied)g(or-)164 978 y(bitals)d(and)h\n(with)286 1079 y Fh(j)p Fk(I)9 b(>)p Fo(=)k Fk(\\036)449\n1086 y Fi(1)469 1079 y Fo(\\(1\\))p Fk(\\036)560 1086 y\nFi(3)580 1079 y Fo(\\(2\\))p Fk(\\036)671 1086 y Fi(4)691\n1079 y Fo(\\(3\\))p Fk(\\036)782 1086 y Fi(5)802 1079 y\nFo(\\(4\\))p Fk(\\036)893 1086 y Fi(6)913 1079 y Fo(\\(5\\))721\nb(\\(49\\))164 1181 y(then,)16 b(w)o(e)f(see)h(that)286\n1283 y Fk(E)322 1290 y Fi(25)359 1283 y Fh(j)p Fk(I)9\nb(>)42 b Fo(=)f Fk(\\036)592 1290 y Fi(1)612 1283 y Fo(\\(1\\))p\nFk(\\036)703 1290 y Fi(3)723 1283 y Fo(\\(2\\))p Fk(\\036)814\n1290 y Fi(4)833 1283 y Fo(\\(3\\))p Fk(\\036)924 1290 y\nFi(2)944 1283 y Fo(\\(4\\))p Fk(\\036)1035 1290 y Fi(6)1055\n1283 y Fo(\\(6\\))579 b(\\(50\\))484 1355 y(=)41 b Fk(\\036)592\n1362 y Fi(1)612 1355 y Fo(\\(1\\))p Fk(\\036)703 1362 y\nFi(2)723 1355 y Fo(\\(4\\))p Fk(\\036)814 1362 y Fi(3)833\n1355 y Fo(\\(2\\))p Fk(\\036)924 1362 y Fi(4)944 1355 y\nFo(\\(3\\))p Fk(\\036)1035 1362 y Fi(6)1055 1355 y Fo(\\(5\\))579\nb(\\(51\\))164 1457 y(\\(whic)o(h)13 b(is)g(denoted)g Fk(K)592\n1439 y Fj(Q)635 1457 y Fo(in)g(Equation)h(32\\).)21 b(But)13\nb(the)g(standard)h(order)g(of)f(o)q(ccupation)164 1517\ny(should)k(b)q(e)286 1619 y Fh(j)p Fk(K)9 b(>)p Fo(=)14\nb Fk(\\036)469 1626 y Fi(1)489 1619 y Fo(\\(1\\))p Fk(\\036)580\n1626 y Fi(2)600 1619 y Fo(\\(2\\))p Fk(\\036)691 1626 y\nFi(3)710 1619 y Fo(\\(3\\))p Fk(\\036)801 1626 y Fi(4)821\n1619 y Fo(\\(4\\))p Fk(\\036)912 1626 y Fi(6)932 1619 y\nFo(\\(5\\))702 b(\\(52\\))164 1721 y(and)22 b(the)g(p)q(erm)o(utation)f(of)\nh(the)f Fe(ele)n(ctr)n(onic)i Fo(lab)q(els)e(that)h(accomplishes)f\n(this)h(is)f(the)164 1781 y(cyclic)c(p)q(erm)o(utation)h(\\(234\\))h(=)f\n(\\(23\\)\\(34\\).)30 b(This)19 b(maps)g(electron)f(2)h(in)o(to)f(electron)\ng(3,)164 1841 y(electron)d(3)i(in)o(to)f(electron)f(4,)h(and)h\n(electron)e(4)i(bac)o(k)f(in)o(to)g(electron)f(2.)286\n1943 y(\\(234\\))8 b([)q Fk(\\036)448 1950 y Fi(1)467 1943\ny Fo(\\(1\\))p Fk(\\036)558 1950 y Fi(2)578 1943 y Fo(\\(4\\))p\nFk(\\036)669 1950 y Fi(3)689 1943 y Fo(\\(2\\))p Fk(\\036)780\n1950 y Fi(4)800 1943 y Fo(\\(3\\))p Fk(\\036)891 1950 y\nFi(6)911 1943 y Fo(\\(5\\)])14 b(=)g Fk(\\036)1082 1950\ny Fi(1)1101 1943 y Fo(\\(1\\))p Fk(\\036)1192 1950 y Fi(2)1212\n1943 y Fo(\\(2\\))p Fk(\\036)1303 1950 y Fi(3)1323 1943\ny Fo(\\(3\\))p Fk(\\036)1414 1950 y Fi(4)1434 1943 y Fo(\\(4\\))p\nFk(\\036)1525 1950 y Fi(6)1545 1943 y Fo(\\(5\\))89 b(\\(53\\))164\n2044 y(The)16 b(correct)g(p)q(osition)g(of)h(orbital)f(5)h(amoung)g\n(the)f(singly)g(o)q(ccupied)f(orbitals)i(in)e Fk(I)20\nb Fo(is)p 164 2067 V 164 2105 a Fk(j)d Fo(=)d(4)i(and)h(that)g(of)f\n(orbital)g(2)h(is)p 796 2067 17 2 v 16 w Fk(i)d Fo(=)f(2.)164\n2249 y Fc(8.1)66 b(Computing)22 b(matrix)h(elemen)n(ts)164\n2341 y Fo(In)c(the)h(primitiv)o(e)d(spin)j(or)g(determinan)o(t)f\n(basis,)i(there)e(will)f(b)q(e)i(just)g(one)g(non-zero)164\n2402 y(elemen)o(t)12 b(in)i(eac)o(h)f(ro)o(w)h(or)h(column)e(of)i(the)e\n(represen)o(tation)h(matrix)f(\\()p Fk(U)1481 2409 y Fj(\\026\\025)1525\n2402 y Fo(\\()p Fk(Q)p Fo(\\)\\))h(for)g(an)o(y)164 2462\ny(p)q(erm)o(utation,)f(whereas)h(the)f(represen)o(tation)g(matrices)g\n(for)g(spin)h(adpated)g(bases)g(will)949 2607 y(21)p\neop end\n%%Page: 22 22\nTeXDict begin 22 21 bop 164 315 a Fo(b)q(e)20 b(rather)f(dense.)31\nb(This)20 b(fact)f(ma)o(y)g(b)q(e)h(exploited)e(\\(Duc)o(h)h([6]\\))g(b)o\n(y)g(just)h(storing,)g(in)164 376 y(what)14 b(Duc)o(h)e(named)h\n(Primitiv)o(e)e(Spin)i(F)l(unction)f(T)l(ransformation)j(T)l(ables,)e\n(the)g(index)164 436 y(to)g(whic)o(h)f(eac)o(h)f(primitiv)o(e)f(spin)j\n(function)f(transforms)h(under)g(the)f(action)g(of)h(all)f(cyclic)164\n496 y(p)q(erm)o(utations)k(and)h(the)f(corresp)q(onding)h(phase)g\n(factor.)237 556 y(F)l(or)e(small)g(F)o(CI)f(calculations)h(this)g(is)g\n(v)o(ery)e(e\\013ectiv)o(e)h(and)h(it)g(is)g(what)h(w)o(as)f(imple-)164\n616 y(men)o(ted)c(in)h(the)h(original)f(co)q(de.)20 b(Ho)o(w)o(ev)o\n(er,)11 b(larger)h(calculations)h(ha)o(v)o(e)e(to)q(o)j(m)o(uc)o(h)d\n(data)164 677 y(to)j(hold)g(since)g(the)f(n)o(um)o(b)q(er)h(of)g(en)o\n(tries)f(is)g(5)6 b Fh(\\003)g Fo(\\()p Fk(s)g Fo(+)g(1\\))1151\n659 y Fi(2)1174 677 y Fk(d)1199 659 y Fj(s)1199 689 y(m)1246\n677 y Fo(whic)o(h)13 b(b)q(ecomes)h(v)o(ery)f(large)164\n737 y(for)i(more)g(than)g(10)h(or)f(12)h(activ)o(e)d(orbitals)i(\\(the)g\n(factor)g(of)g(5)h(arises)f(from)g(the)f(v)m(arious)164\n797 y(o)q(ccupation)22 b(cases\\).)38 b(Duc)o(h)22 b(recommended)e(v)m\n(arious)j(alternativ)o(es,)e(but)h(follo)o(wing)164 857\ny(Kno)o(wles)f(and)g(W)l(erner)g([4],)g(and)h(in)f(the)g(spirit)f(of)h\n(the)g Fk(N)f Fh(\\000)14 b Fo(2)21 b(particle)f(subspace)164\n917 y(pro)s(jection)c(of)g(Zarrabian)h(et)f(al)g([14)q(,)f(15)q(],)g(w)\no(e)h(can)h(use)f(the)g(follo)o(wing)g(factorization)286\n1014 y Fk(E)322 1021 y Fj(ij)366 1014 y Fo(=)e Fk(E)454\n1021 y Fj(ia)487 1014 y Fk(E)523 1021 y Fj(aj)1696 1014\ny Fo(\\(54\\))164 1111 y(where)i Fk(a)f Fo(is)h(a)g(\\014cticious)g\n(orbital)f(of)i(index)e(higher)h(than)g(an)o(y)g(other)g(orbital.)21\nb(This)16 b(is)164 1172 y(equiv)m(alen)o(t)f(to)h(factorizing)g(the)g\n(cyclic)e(p)q(erm)o(utation)i(as)286 1269 y(\\()p 305\n1231 17 2 v Fk(i)8 b(:)g(:)g(:)p 395 1231 23 2 v 7 w(j)s\nFo(\\))14 b(=)g(\\()p 522 1231 17 2 v Fk(i)8 b(:)g(:)g(:)f(s)p\nFo(\\)\\()p Fk(s)h(:)g(:)g(:)p 770 1231 23 2 v 8 w(j)s\nFo(\\))16 b(for)h Fk(i)c(<)h(j)691 b Fo(\\(55\\))164 1366\ny(where,)18 b(again,)g Fk(s)g Fo(is)g(the)g(n)o(um)o(b)q(er)f(of)h(op)q\n(en)h(shell)e(electrons.)25 b(It)18 b(is)g(also)g(akin)g(to)g(the)164\n1426 y(action)d(of)h(an)g(annihilation)f(op)q(erator)h(but)f(rather)h\n(than)f(k)o(eeping)g(trac)o(k)f(of)i(the)f Fk(s)9 b Fh(\\000)g\nFo(1)164 1486 y(electron)19 b(states)h(w)o(e)f(just)h(put)g(the)g\n(electron)e(in)o(to)i(a)g(\\014ctitious)f(orbital.)32\nb(With)19 b(this)164 1546 y(factorization)c(there)f(are)h(only)g(t)o(w)\no(o)g(o)q(ccupation)g(cases)g(to)h(consider)e(\\(with)h(a)g(total)h(of)\n164 1606 y(three)f(en)o(tries\\))f(since)h Fk(a)g Fo(is)g(alw)o(a)o(ys)h\n(empt)o(y)e(and)i(there)f(is)h(a)f(total)h(of)g(only)f(3\\()p\nFk(s)10 b Fo(+)g(1\\))p Fk(d)1749 1588 y Fj(s)1749 1619\ny(m)164 1667 y Fo(en)o(tries)15 b(to)h(b)q(e)g(stored)h(whic)o(h)e(is)h\n(tractable)g(for)g(v)o(ery)f(large)h(n)o(um)o(b)q(ers)f(of)h(op)q(en)h\n(shells.)237 1727 y(The)11 b(co)q(de)g(constructs)g(just)g(the)g\n(transformations)h(asso)q(ciated)g(with)e Fk(<)c(K)t(\\026)p\nFh(j)p Fk(E)s(aj)s Fh(j)p Fk(J)f(\\027)j(>)164 1787 y\nFo(for)16 b Fk(n)267 1794 y Fj(j)300 1787 y Fo(=)d(1)p\nFk(;)8 b Fo(2.)22 b(This)17 b(is)f(done)g(as)h(follo)o(ws,)f(initially)\ne(for)j Fk(n)1252 1794 y Fj(j)1284 1787 y Fo(=)d(1.)224\n1884 y(1.)24 b(Lo)q(op)17 b(thru)f(primitiv)o(e)c(spin)k(functions)f\nFk(\\027)k Fo(for)d Fk(s)f Fo(op)q(en)h(shell)e(electrons)h(and)h(ob-)\n286 1944 y(tain)c(the)g(corresp)q(onding)h(o)q(ccupation)g(pattern)f\n(\\(b)o(y)g(calling)f Fl(fci_find_m)o(occ)o Fo(\\).)224\n2044 y(2.)24 b(Lo)q(op)17 b(thru)f Fk(j)h Fo(=)c(1)p\nFk(;)8 b(s)16 b Fo(corresp)q(onding)h(to)f(the)f(cycles)f(\\()p\nFk(s)8 b(:)g(:)g(:)g(j)s Fo(\\))15 b(for)h Fk(j)h Fo(=)d(1)p\nFk(;)8 b(s)15 b Fo(and)286 2105 y(apply)h(it)g(to)g(the)g(o)q\n(ccputation)h(pattern.)224 2205 y(3.)24 b(Determine)d(the)i(lexical)e\n(index)h(of)h(the)f(generated)h(o)q(ccupation)g(\\(b)o(y)g(calling)286\n2265 y Fl(fci_find_m)o(wei)o(gh)o(t)p Fo(\\).)18 b(Store)d(this)g(m)o\n(ultiplied)e(b)o(y)i(the)g(parit)o(y)g(of)g(the)g(p)q(erm)o(u-)286\n2325 y(tation)i(in)e Fk(T)7 b Fo(\\()p Fk(\\027;)h(j;)g\nFo(1\\).)237 2422 y(F)l(or)13 b Fk(n)350 2429 y Fj(j)382\n2422 y Fo(=)h(2)f(the)g(situation)g(is)f(only)h(sligh)o(tly)e(more)i\n(complex)e(since)h(w)o(e)h(will)e(obtain)164 2482 y(t)o(w)o(o)16\nb Fk(s)11 b Fo(+)g(2)17 b(electron)e(o)q(ccupations)i(from)f(breaking)h\n(the)f(alpha{b)q(eta)h(pair.)949 2607 y(22)p eop end\n%%Page: 23 23\nTeXDict begin 23 22 bop 224 315 a Fo(1.)24 b(Lo)q(op)16\nb(thru)e(primitiv)o(e)e(spin)i(functions)g Fk(\\027)k\nFo(for)c Fk(s)h Fo(op)q(en)g(shell)e(electrons,)g(and)i(ob-)286\n376 y(tain)d(the)g(corresp)q(onding)h(o)q(ccupation)g(pattern)f(\\(b)o\n(y)g(calling)f Fl(fci_find_m)o(occ)o Fo(\\).)224 477 y(2.)24\nb(Lo)q(op)16 b(thru)e Fk(j)j Fo(=)c(1)p Fk(;)8 b(s)f\nFo(+)g(1)14 b(corresp)q(onding)h(to)g(the)f(p)q(osition)g(amoung)i(the)\nd(singly)286 538 y(o)q(ccupied)j(orbitals)g(of)h(the)f(new)g(orbital.)\n224 639 y(3.)24 b(First)18 b(excite)f(the)i(alpha)g(spin)g(electron)e\n(b)o(y)h(constructing)h(an)g Fk(s)13 b Fo(+)g(2)19 b(electron)286\n699 y(spin)f(function)g(b)o(y)g(app)q(ending)h(\\\\)p Fl(+)p\nFo(\")g(to)f(the)g Fk(s)g Fo(electron)g(spin)g(function)g\nFk(\\027)j Fo(and)286 760 y(inserting)13 b(a)h(\\\\)p Fl(-)p\nFo(\")h(immediately)c(b)q(efore)j(p)q(osition)g Fk(j)s\nFo(.)21 b(Determine)12 b(the)i(new)f Fk(s)6 b Fo(+)g(2)286\n820 y(lexical)18 b(w)o(alk)i(index)f(and)i(store)f(it)g(times)f(the)h\n(phase)g(of)h(the)f(p)q(erm)o(utatation)286 880 y(\\(the)c(parit)o(y)f\n(of)i(\\()p Fk(j)11 b(:)d(:)g(:)g Fo(1\\)\\()p Fk(s)j Fo(+)g(2)d\nFk(:)g(:)g(:)g Fo(1\\))17 b(is)f(\\()p Fh(\\000)p Fo(1\\))1157\n862 y Fj(s)p Fi(+)p Fj(j)1219 880 y Fo(\\))g(in)g Fk(T)1347\n856 y Fj(s;)p Fi(2)1340 891 y Fj(\\027;j)1393 880 y Fo(.)224\n982 y(4.)24 b(Next)c(excite)f(the)h(b)q(eta)h(spin)g(electron)f(b)o(y)g\n(constructing)h(an)g Fk(s)14 b Fo(+)g(2)21 b(electron)286\n1042 y(spin)d(function)g(b)o(y)g(app)q(ending)h(\\\\)p\nFl(-)p Fo(\")g(to)f(the)g Fk(s)g Fo(electron)g(spin)g(function)g\nFk(\\027)j Fo(and)286 1102 y(inserting)13 b(a)h(\\\\)p Fl(+)p\nFo(\")h(immediately)c(b)q(efore)j(p)q(osition)g Fk(j)s\nFo(.)21 b(Determine)12 b(the)i(new)f Fk(s)6 b Fo(+)g(2)286\n1162 y(electron)11 b(w)o(alk)i(index)e(and)j(store)e(it)g(with)h(the)f\n(negativ)o(e)g(of)h(the)f(previous)h(parit)o(y)286 1222\ny(\\(since)k(w)o(e)h(sw)o(app)q(ed)h(the)f(\\014rst)h(t)o(w)o(o)f\n(electrons)g(and)h(the)f(actual)g(p)q(erm)o(utation)286\n1283 y(is)e(\\()p Fk(j)11 b(:)d(:)g(:)g Fo(1\\)\\()p Fk(s)j\nFo(+)g(2)d Fk(:)g(:)g(:)g Fo(1\\)\\(12\\)\\))18 b(in)e Fk(T)953\n1259 y Fj(s;)p Fi(3)946 1294 y Fj(\\027;j)998 1283 y Fo(.)237\n1384 y(Finally)l(,)f(some)h(logic)g(is)g(eliminated)e(from)j(the)f\n(inner)f(lo)q(op)j(if)d(instead)i(of)f(storing)164 1445\ny(the)23 b(phase)g(directly)e(in)i(the)g(table)f(as)i(recommended)e(b)o\n(y)g(Duc)o(h)h([6],)h(w)o(e)e(store)h(it)164 1505 y(separately)l(.)g\n(This)17 b(do)q(es)g(not)h(require)d(a)i(lot)g(of)g(memory)f(since)h\n(it)f(is)h(indep)q(enden)o(t)f(of)164 1565 y(the)g(spin)g(function)g\n(index.)164 1731 y Fn(9)81 b(Densit)n(y)26 b(matrix)i(op)r(erators)164\n1841 y Fo(Arbitrary-rank)20 b(densit)o(y)f(matrix)h(op)q(erators)i(are)\ne(v)o(ery)f(readily)h(constructed)g(from)164 1901 y(the)c\nFk(E)284 1908 y Fj(ai)333 1901 y Fo(op)q(erators)i([4])e(since)286\n2003 y Fk(E)322 2010 y Fj(pq)q(;r)q(s;tu;:::)498 2003\ny Fo(=)e Fk(E)586 2010 y Fj(pa)624 2003 y Fk(E)660 2010\ny Fj(r)q(b)694 2003 y Fk(E)730 2010 y Fj(tc)769 2003\ny Fk(:)8 b(:)g(:)g(E)871 2010 y Fj(cu)908 2003 y Fk(E)944\n2010 y Fj(bs)978 2003 y Fk(E)1014 2010 y Fj(aq)1696 2003\ny Fo(\\(56\\))164 2104 y(where)18 b(the)f(\\014ctitious)h(orbitals)g(are)g\n(regarded)g(as)g(b)q(eing)g(ordered)g Fh(\\001)8 b(\\001)g(\\001)17\nb Fk(>)g(c)f(>)h(b)f(>)h(a)p Fo(.)164 2165 y(This)j(lo)q(oks)g(v)o(ery)\ne(m)o(uc)o(h)g(lik)o(e)g(the)h(standard)i(normal)e(ordered)g(form)h(of)\ng(the)f(op)q(era-)164 2225 y(tor)f(in)g(terms)f(of)h\n(annihilation/creation)g(op)q(erators.)27 b(In)18 b(applying)g(this)f\n(expression)164 2285 y(in)h(practice)e(the)i(follo)o(wing)g\n(factorization)g(has)g(sev)o(eral)f(imp)q(ortan)o(t)h(prop)q(erties)g\n(in)g(a)164 2345 y(determinan)o(t)d(basis)i(\\(with)f(implied)e\n(summation)j(o)o(v)o(er)e(the)h(rep)q(eated)g(indices\\))286\n2447 y Fk(<)6 b(J)f(\\027)s Fh(j)p Fk(E)439 2454 y Fj(pq)q(;r)q\n(s;tu;:::)600 2447 y Fh(j)p Fk(I)t(!)i(>)p Fo(=)p Fk(<)f(J)f(\\027)s\nFh(j)p Fk(E)906 2454 y Fj(pa)944 2447 y Fk(E)980 2454\ny Fj(r)q(b)1014 2447 y Fk(E)1050 2454 y Fj(tc)1088 2447\ny Fk(:)j(:)g(:)g Fh(j)p Fk(N)d(\\026)h(><)g(N)f(\\026)p\nFh(j)j Fk(:)g(:)g(:)g(E)1526 2454 y Fj(cu)1564 2447 y\nFk(E)1600 2454 y Fj(bs)1633 2447 y Fk(E)1669 2454 y Fj(aq)1707\n2447 y Fh(j)p Fk(I)t(!)f(>)14 b Fo(\\(57\\))949 2607 y(23)p\neop end\n%%Page: 24 24\nTeXDict begin 24 23 bop 224 315 a Fo(1.)24 b(If)f(the)g(op)q(erators)i\nFk(E)692 322 y Fj(aq)753 315 y Fo(etc.)42 b(act)24 b(only)f(on)h(op)q\n(en-shell)f(electrons)g(then)g(the)286 376 y(n)o(um)o(b)q(er)15\nb(of)i(op)q(en-shell)f(electrons)f(is)h(unc)o(hanged,)g(and)h(the)f\n(mapping)h(from)f Fk(!)286 436 y Fo(to)h Fk(\\026)f Fo(is)g(one-to-one)i\n(and)e(dense)h(\\(a)f(p)q(erm)o(utation\\).)224 536 y(2.)24\nb(If)13 b(the)g(op)q(erators)i Fk(E)662 543 y Fj(aq)714\n536 y Fo(etc.)20 b(break)13 b(a)h(spin)g(pair)f(then)h(the)f(n)o(um)o\n(b)q(er)g(of)h(electrons)286 596 y(is)i(increased)f(b)o(y)g(t)o(w)o(o)h\n(and)g(the)g(mapping)g(from)f Fk(!)j Fo(to)f Fk(\\026)f\nFo(is)f(one-to-t)o(w)o(o.)22 b(There)286 656 y(is)h(some)h(sparsit)o(y)\nf(\\(less)h(than)g(50\\045)g(for)g(singlets\\))f(in)g(the)h(increased)f\n(space)286 716 y(since)d(some)g(spin)h(couplings)f(cannot)i(b)q(e)e\n(generated)h(from)f(the)h(brok)o(en)f(spin)286 776 y(pair.)27\nb(F)l(or)19 b(instance,)f(examination)g(of)g(Figure)g(1)h(sho)o(ws)g\n(that)g(six)f(op)q(en-shell)286 837 y(electrons)e(giv)o(e)f(rise)h(to)h\n(20)h(determinan)o(ts,)d(whic)o(h)h(if)g(a)h(closed-shell)e(spin)i\n(pair)286 897 y(is)e(brok)o(en,)f(can)h(only)g(giv)o(e)f(rise)g(to)h\n(40)h(determinan)o(ts.)k(Ho)o(w)o(ev)o(er,)13 b(there)h(are)h(70)286\n957 y(determinan)o(ts)g(for)i(8)f(op)q(en)h(shells.)237\n1064 y(The)e(coupling)f(co)q(e\\016cien)o(t)f(generation)h(routines)h\n(then)f(w)o(ork)g(in)g(a)h(v)o(ery)e(straigh)o(t-)164\n1124 y(forw)o(ard)j(fashion,)g(w)o(orking)f(from)g(the)g(outside)g(to)h\n(the)f(middle,)f(and)i(then)f(m)o(ultiply-)164 1184 y(ing)g(the)g(t)o\n(w)o(o)g(halv)o(es)f(together.)21 b(Eac)o(h)15 b(application)g(of)h(an)\nf(op)q(erator)i(\\()p Fk(E)1517 1191 y Fj(aq)1554 1184\ny Fo(\\))e(results)g(in)164 1244 y(a)i(mapping)g(from)f(the)g(spin)h\n(functions)f(in)g(the)h(input)f(\\(k)o(et\\))f(to)i(those)g(in)f(the)g\n(output)164 1305 y(\\(bra\\))j(indices)e(and)i(some)f(asso)q(ciated)i\n(phases.)28 b(These)18 b(are)h(sp)q(eci\\014ed)e(b)o(y)h(the)g(o)q(ccu-)\n164 1365 y(pation)e(of)h(the)e(orbital)h(that)h(is)e(ha)o(ving)h(an)h\n(electron)e(remo)o(v)o(ed)f(\\()p Fk(q)j Fo(in)f(this)g(instance\\),)164\n1425 y(and)e(b)o(y)f(the)g(p)q(osition)g(of)h(this)f(orbital)g(in)g\n(the)g(standard)i(ordering)e(of)g(singly)g(o)q(ccupied)164\n1485 y(orbitals)g(\\(if)g(this)g(is)g(orbital)g Fk(q)i\nFo(its)e(p)q(osition)h(amoung)g(the)f(singly)g(o)q(ccupied)g(is)g\n(referred)164 1545 y(to)20 b(as)p 291 1519 24 2 v 21\nw Fk(q)h Fo(or)f Fl(qbar)p Fo(\\).)31 b(So)20 b(some)g(b)q(o)q(ok)h(k)o\n(eeping)e(is)h(necessary)g(to)g(k)o(eep)f(trac)o(k)g(of)h(this)164\n1605 y(information.)33 b(The)21 b(routines)f(are)h(hea)o(vily)d(commen)\no(ted)h(and)i(co)q(ded)g(in)f(a)h(st)o(ylized)164 1666\ny(fashion)c(so)g(they)f(should)g(b)q(e)h(self-explanatory)l(.)164\n1831 y Fn(10)81 b(Application)29 b(Program)f(In)n(terface)e(|)h(API)164\n1941 y Fo(The)17 b(follo)o(wing)h(routines)f(will)g(b)q(e)g(augmen)o\n(ted)g(so)i(that)e(they)g(pro)o(vide)g(access)h(to)f(all)164\n2001 y(of)f(the)g(necessary)g(information)g(to)h(compute)e(matrix)h\n(elemen)o(ts,)e(manipulate)h(w)o(alks)164 2061 y(on)k(the)f(orbital)g\n(and)g(spin)h(graphs,)g(and)g(con)o(v)o(ert)e(b)q(et)o(w)o(een)g\n(determinan)o(t)g(and)i(CSF)164 2121 y(bases.)237 2181\ny(Ob)o(viously)l(,)i(an)h(application)g(that)f(needs)h(F)o(CI)e\n(information)i(in)f(its)g(innermost)164 2242 y(lo)q(op)i(ma)o(y)e(need)\nh(to)g(access)g(that)h(information)f(directly)e(from)i(the)g(F)o(CI)f\n(common)164 2302 y(blo)q(c)o(ks)c(for)h(reason)g(of)g(e\\016ciency)l(.)\n23 b(Ho)o(w)o(ev)o(er,)16 b(since)h(the)g(common)h(blo)q(c)o(ks)f(will)\nf(need)164 2362 y(to)h(c)o(hange)f(in)h(order)f(to)h(accomo)q(date)h\n(orbital)e(symmetry)f(and)i(mo)q(di\\014cation)g(of)g(the)164\n2422 y(algorithm)h(to)h(compute)f(the)h(coupling)f(co)q(e\\016cien)o\n(ts,)f(it)h(is)g(strongly)h(recommended)164 2482 y(that)e(the)f(API)f\n(b)q(e)i(used)f(\\(or)h(extended\\))e(wherev)o(er)g(p)q(ossible.)949\n2607 y(24)p eop end\n%%Page: 25 25\nTeXDict begin 25 24 bop 164 315 a Fc(10.1)66 b(Setting-up)23\nb(and)g(solving)f(a)g(full-CI)164 408 y Fm(10.1.1)55\nb Fl(fci)p 444 408 16 2 v 18 w(setup)215 500 y(subroutine)22\nb(fci_setup\\(m)o(ul)o(tip)o(lic)o(it)o(y,)g(nactive,)h(nelectrons)o(,)\n190 560 y(&)127 b(orbsyms,)23 b(symstate,)190 621 y(&)127\nb(norbitalcon)o(fig)o(,)23 b(ndetermin)o(an)o(ts,)f(nconfigura)o(tio)o\n(ns,)190 681 y(&)127 b(norbconfign)o(osy)o(m\\))215 741\ny(integer)23 b(multiplicit)o(y)151 b(!)25 b([input])e(Spin)h\n(multiplicit)o(y)215 801 y(integer)f(nactive)280 b(!)25\nb([input])e(No.)i(of)f(active)g(orbitals)215 861 y(integer)f\n(nelectrons)202 b(!)25 b([input])e(No.)i(of)f(active)g(electrons)215\n922 y(integer)f(orbsyms\\(nac)o(tiv)o(e\\))48 b(!)25 b([input])e\n(Symmetry)g(of)i(orbitals)d(\\(1...8\\))215 982 y(integer)h(symstate)254\nb(!)25 b([input])e(Desired)g(symmetry)g(of)i(state)215\n1042 y(integer)e(norbitalcon)o(fig)99 b(!)25 b([output])e(No.)h(of)h\n(orb.)f(conf.)g(WITH)g(symmetry)215 1102 y(integer)f(ndeterminan)o(ts)\n125 b(!)25 b([output])e(No.)h(of)h(determinan)o(ts)d(in)j(FCI)215\n1162 y(integer)e(nconfigurat)o(ion)o(s)74 b(!)25 b([output])e(No.)h(of)\nh(configurat)o(ion)o(s)e(in)h(FCI)215 1222 y(integer)f(norbconfign)o\n(osy)o(m)74 b(!)25 b([output])e(No.)h(of)h(orb.)f(conf.)g(WITHOUT)f\n(symmetry)164 1337 y Fo(This)14 b(routine)f(m)o(ust)h(b)q(e)g(called)e\n(b)q(efore)i(an)o(ythine)f(else)g(to)h(initialize)d(the)j(in)o(ternal)f\n(F)o(CI)164 1397 y(data)h(structures.)20 b(The)13 b(determinan)o(t)f\n(CI)h(v)o(ector)f(using)i(symmetry)d(will)h(b)q(e)i(of)f(length)164\n1457 y Fl(ndetermina)o(nts)f Fo(\\(equiv)m(alen)o(t)j(to)i\nFl(nconfigur)o(ati)o(ons)12 b Fo(CSF\\).)164 1587 y Fm(10.1.2)55\nb Fl(fci)p 444 1587 V 18 w(solve)241 1679 y(subroutine)22\nb(fci_solven)o(ew)o(\\(nr)o(oot)o(,)g(thresh,)i(maxvec,)f(ecore,)g(h,)i\n(g,)215 1739 y(&)128 b(work,)24 b(lenwrk,)f(roots,)g(evecfilenam)o(e,)f\n(diagfilenam)o(e\\))241 1800 y(integer)h(nroot)331 b(!)26\nb([input])d(No.)h(of)h(roots)f(to)h(find)241 1860 y(double)e(precision)\ng(thresh)74 b(!)26 b([input])d(Threshold)f(for)j(residual)d(norm)241\n1920 y(integer)h(maxvec)305 b(!)26 b([input])d(Davidson)f(subspace)h\n(dim)i(PER)f(ROOT)241 1980 y(double)f(precision)g(ecore)100\nb(!)26 b([input])d(Nuclear)g(repulsion)o(+fr)o(oze)o(n)f(core)241\n2040 y(double)h(precision)g(h\\(nacttr\\))f(!)j([input])e(h\\(ij\\))h(=)h\n(h_{ij})241 2101 y(double)e(precision)g(g\\(nacttr,)o(nac)o(tt)o(r\\))f\n(!)k([input])d(g\\(ij,kl\\))f(=)k(\\(ij|kl\\))241 2161 y(integer)d(lenwrk)\n305 b(!)26 b([input])d(Size)h(of)h(work)f(space)241 2221\ny(double)f(precision)g(work\\(lenw)o(rk\\))f(!)j([scratch])d(Work)j\n(space)241 2281 y(double)e(precision)g(roots\\(nro)o(ot\\))f(!)j\n([output])e(Returns)g(the)h(eigenvalues)241 2341 y(character*)o(\\(*)o\n(\\))f(evecfilen)o(ame)48 b(!)25 b([input])e(Name)h(of)h(file)f(for)h\n(eigen)e(vectors)241 2402 y(character*)o(\\(*)o(\\))g(diagfilen)o(ame)48\nb(!)25 b([input])e(Name)h(of)h(file)f(for)h(diagonals)949\n2607 y Fo(25)p eop end\n%%Page: 26 26\nTeXDict begin 26 25 bop 237 315 a Fo(Solv)o(e)15 b(the)g(CI)g(to)h(the)\ng(requested)e(accuracy)l(.)21 b(Curren)o(tly)14 b(uses)i(determinan)o\n(ts)f(but)164 376 y(is)f(readily)g(extended)f(to)i(also)g(accomo)q\n(date)g(CSF.)g(The)f(eigen)o(v)m(alues)g(are)g(returned)g(in)164\n436 y Fl(roots)p Fo(.)k(The)c(eigen)o(v)o(ectors)d(are)j(returned)f(in)\nf(\\014le)h Fl(evecfilena)o(me)p Fo(,)d(and)k(the)f(diagonal)164\n496 y(elemen)o(ts)d(of)i(the)g(Hamiltonian)f(are)h(returned)g(in)f\nFl(diagfilenam)o(e)p Fo(.)17 b(The)12 b(eigen)o(v)o(ectors)164\n556 y(and)21 b(diagonal)f(elemen)o(ts)f(ma)o(y)g(b)q(e)h(read)g(using)h\n(the)e(routine)h Fl(fci_readve)o(cto)o(rs\\()o(\\))164\n616 y Fo(\\(Section)c(10.1.3\\).)237 677 y(The)11 b(input)g(in)o(tegrals)\nf(are)h(stored)g(as)g Fl(h\\(ij\\))p Fo(=)p Fk(h)1115 684\ny Fj(ij)1155 677 y Fo(and)g Fl(g\\(ij,kl\\)=$)o(\\(ij)o(|kl)o(\\)$,)22\nb(with)i($i)h(\\\\geq)f(j$,)164 737 y($k)h(\\\\geq)f(l$,)h(\\\\verb)p\nFo(ij+=)p Fk(i)p Fo(\\()p Fk(i)8 b Fh(\\000)j Fo(1\\))p\nFk(=)p Fo(2,)18 b(and)g Fl(kl)p Fo(=)p Fk(k)r Fo(\\()p\nFk(k)13 b Fh(\\000)f Fo(1\\))p Fk(=)p Fo(2)g(+)g Fk(l)q\nFo(.)24 b(Ha)o(v)o(e)15 b(a)j(lo)q(ok)g(at)164 797 y\nFl(fci_load.F)11 b Fo(to)j(see)g(ho)o(w)g(an)h(ASCI)q(I)f(list)f(of)i\n(in)o(tegrals)f(are)g(read)g(in)g(an)h(inserted)e(in)o(to)164\n857 y(these)j(arra)o(ys)g(in)g(the)g(test)g(program.)237\n917 y(The)i(minim)o(um)e(amoun)o(t)i(of)g(w)o(orkspace)g(required)f(\\()\np Fl(lenwrk)p Fo(\\)is)f(indep)q(enden)o(t)h(of)164 978\ny(the)d(n)o(um)o(b)q(er)f(of)i(ro)q(ots,)h(and)e(m)o(ust)g(exceed)f(2*)\np Fl(ndeterminant)o(s)p Fo(.)18 b(The)c(more)g(memory)164\n1038 y(the)i(b)q(etter,)f(but)i(2*)p Fl(ndeterminant)o(s)p\nFo(+500000)e(will)h(probably)g(alw)o(a)o(ys)g(b)q(e)h(enough.)237\n1098 y(Also,)g(there)f(is)h(curren)o(tly)e(no)j(p)q(ossibilit)o(y)e(of)\nh(restart,)g(and)h(the)f(lo)o(w)o(est)f(diagonal)164\n1158 y(guess)h(is)f(alw)o(a)o(ys)g(used.)164 1288 y Fm(10.1.3)55\nb Fl(fci)p 444 1288 16 2 v 18 w(readvecto)o(rs)215 1380\ny(subroutine)22 b(fci_readeve)o(ct)o(ors)o(\\(nd)o(et)o(s,)g(nvec,)i(v,)\nh(filename\\))215 1440 y(integer)e(ndets)332 b(!)25 b([input])e(Vector)g\n(length)215 1500 y(integer)g(nvec)332 b(!)25 b([input])e(No.)215\n1561 y(double)h(precision)e(v\\(ndets,nv)o(ec\\))215 1621\ny(character*\\()o(*\\))g(filename)237 1732 y Fo(The)17\nb(F)o(CI)g(pac)o(k)m(age)h(uses)f(w)o(ord-addressable)i(random)e\n(access)h(\\014les)f(that)g(cannot)164 1792 y(b)q(e)22\nb(accessed)g(using)h(standard)g(F)l(ortran)g(I/O)f(op)q(erations.)40\nb(This)22 b(routine)g(enables)164 1853 y(the)c(eigen-v)o(ectors)g(and)h\n(diagonal)h(elemen)o(ts)c(to)j(b)q(e)g(read)g(from)f(disk)h(b)o(y)f(sp)\nq(ecifying)164 1913 y(the)h(appropriate)h(\\014lename)f(after)g\nFl(fci_solve\\(\\))d Fo(has)k(sucessfully)f(completed.)29\nb(T)l(o)164 1973 y(read)14 b(the)h(eigen)o(v)o(ectors,)d(sp)q(ecify)i\nFl(nvec)f Fo(as)i Fl(nroot)p Fo(.)j(T)l(o)d(read)g(the)f(diagonal)h\n(elemen)o(ts,)164 2033 y(sp)q(ecify)g Fl(nvec)g Fo(as)i(one.)164\n2177 y Fc(10.2)66 b(Inquiring)23 b(ab)r(out)g(o)r(ccupations)e(and)i\n(dimensions)164 2270 y Fm(10.2.1)55 b Fl(fci)p 444 2270\nV 18 w(ofind)p 592 2270 V 16 w(occ)241 2362 y(subroutine)22\nb(fci_ofind_)o(oc)o(c\\(i)o(wal)o(k,)o(ioc)o(c\\))164 2422\ny(c)164 2482 y(c)51 b(find)24 b(the)h(orbital)e(occupatio)o(n)g(of)h\n(walk)h(with)f(lexical)f(index)h(iwalk)949 2607 y Fo(26)p\neop end\n%%Page: 27 27\nTeXDict begin 27 26 bop 164 315 a Fl(c)241 376 y(integer)23\nb(iwalk)331 b(!)26 b([input])241 436 y(integer)d(nel)383\nb(!)26 b([input])241 496 y(integer)d(iocc\\(*\\))279 b(!)26\nb([output])164 626 y Fm(10.2.2)55 b Fl(fci)p 444 626\n16 2 v 18 w(ofind)p 592 626 V 16 w(weight)241 718 y(subroutine)22\nb(fci_ofind_)o(we)o(igh)o(t\\(i)o(wa)o(lk,)o(ioc)o(c\\))241\n779 y(implicit)h(none)164 839 y(c)164 899 y(c)51 b(find)24\nb(the)h(lexical)e(index)g(of)i(a)h(path)e(on)h(the)f(orbital)f(graph)\n164 959 y(c)241 1019 y(integer)g(iwalk)331 b(!)26 b([output])241\n1079 y(integer)d(iocc\\(*\\))279 b(!)26 b([input])164 1209\ny Fm(10.2.3)55 b Fl(fci)p 444 1209 V 18 w(mfind)p 592\n1209 V 16 w(occ)241 1302 y(subroutine)22 b(fci_mfind_)o(oc)o(c\\(i)o\n(wal)o(k,)o(ioc)o(c,n)o(s\\))164 1362 y(c)164 1422 y(c)51\nb(given)24 b(the)g(lexical)f(index)h(of)h(a)g(path)f(on)h(a)h\n(primitive)c(spin)i(graph)164 1482 y(c)51 b(for)24 b(ns)h(electrons)e\n(and)h(multi=2sz+)o(1,)e(return)i(the)g(spin)h(occupatio)o(n)164\n1542 y(c)241 1603 y(integer)e(iwalk)331 b(!)26 b([input])241\n1663 y(integer)d(iocc\\(*\\))279 b(!)26 b([output])241\n1723 y(integer)d(ns)409 b(!)26 b([input])164 1853 y Fm(10.2.4)55\nb Fl(fci)p 444 1853 V 18 w(mfind)p 592 1853 V 16 w(weight)241\n1945 y(subroutine)22 b(fci_mfind_)o(we)o(igh)o(t\\(i)o(wa)o(lk,)o(ioc)o\n(c,n)o(s\\))241 2006 y(implicit)h(none)164 2066 y(c)164\n2126 y(c)51 b(find)24 b(the)h(lexical)e(index)g(of)i(a)h(path)e(on)h(a)\ng(primitive)d(spin)i(graph)164 2186 y(c)51 b(for)24 b(ns)h(electrons)e\n(and)h(multi=2sz+)o(1,)e(given)i(the)h(spin)f(occupation)164\n2246 y(c)241 2306 y(integer)f(iwalk)331 b(!)26 b([output])241\n2367 y(integer)d(iocc\\(*\\))279 b(!)26 b([input])241 2427\ny(integer)d(ns)409 b(!)26 b([input])949 2607 y Fo(27)p\neop end\n%%Page: 28 28\nTeXDict begin 28 27 bop 164 315 a Fm(10.2.5)55 b Fl(fci)p\n444 315 16 2 v 18 w(num)p 540 315 V 17 w(dets)241 408\ny(integer)23 b(function)g(fci_num_d)o(ets)o(\\(n)o(s\\))164\n468 y(c)164 528 y(c)51 b(return)23 b(the)i(number)e(of)i(determinan)o\n(ts)d(for)j(ns)g(open)f(shell)g(electrons)164 588 y(c)51\nb(assuming)23 b(that)h(ns)h(is)g(a)g(valid)f(no.)g(of)h(open)f(shell)g\n(electrons)e(for)164 649 y(c)51 b(the)24 b(given)g(FCI)h(space)f(and)g\n(spin)g(multiplicit)o(y)164 709 y(c)241 769 y(integer)f(ns)409\nb(!)26 b([input])164 899 y Fm(10.2.6)55 b Fl(fci)p 444\n899 V 18 w(num)p 540 899 V 17 w(csf)241 991 y(integer)23\nb(function)g(fci_num_d)o(ets)o(\\(n)o(s\\))164 1051 y(c)164\n1112 y(c)51 b(return)23 b(the)i(number)e(of)i(configurat)o(ion)o(s)e\n(for)h(ns)h(open)f(shell)g(electrons)164 1172 y(c)51\nb(assuming)23 b(that)h(ns)h(is)g(a)g(valid)f(no.)g(of)h(open)f(shell)g\n(electrons)e(for)164 1232 y(c)51 b(the)24 b(given)g(FCI)h(space)f(and)g\n(spin)g(multiplicit)o(y)164 1292 y(c)241 1352 y(integer)f(ns)409\nb(!)26 b([input])164 1482 y Fm(10.2.7)55 b Fl(fci)p 444\n1482 V 18 w(num)p 540 1482 V 17 w(owalks)215 1575 y(integer)23\nb(function)g(fci_num_ow)o(alk)o(s\\()o(\\))164 1635 y(c)164\n1695 y(c)i(Returns)e(the)i(number)e(of)i(orbital)e(occupation)f(walks)i\n(in)h(the)f(FCI)164 1755 y(c)h(ignoring)e(symmetry.)164\n1815 y(c)164 1945 y Fm(10.2.8)55 b Fl(fci)p 444 1945\nV 18 w(ndets)215 2038 y(integer)23 b(function)g(fci_ndets\\()o(\\))164\n2098 y(c)164 2158 y(c)i(Returns)e(the)i(total)f(number)f(of)i\n(determinan)o(ts)d(in)j(the)g(FCI)164 2218 y(c)g(\\(with)f(use)h(of)f\n(symmetry\\))164 2278 y(c)949 2607 y Fo(28)p eop end\n%%Page: 29 29\nTeXDict begin 29 28 bop 164 315 a Fm(10.2.9)55 b Fl(fci)p\n444 315 16 2 v 18 w(ncsf)215 408 y(integer)23 b(function)g\n(fci_ncsf\\(\\))164 468 y(c)164 528 y(c)i(Returns)e(the)i(total)f(number)\nf(of)i(spin-adapt)o(ed)d(configurati)o(on)o(s)h(in)i(the)f(FCI)164\n588 y(c)h(\\(with)f(use)h(of)f(symmetry\\))164 649 y(c)164\n779 y Fm(10.2.10)55 b Fl(fci)p 472 779 V 18 w(max)p 568\n779 V 17 w(num)p 663 779 V 17 w(dets)215 871 y(integer)23\nb(function)g(fci_max_nu)o(m_d)o(et)o(s\\(\\))164 931 y(c)164\n991 y(c)i(Returns)e(the)i(maximum)e(number)g(of)i(determinant)o(s)d\n(associated)164 1051 y(c)j(with)f(any)h(orbital)e(configurat)o(ion)f\n(in)j(the)f(full)g(CI.)164 1112 y(c)164 1172 y(c)h([Note)f(that)g\n(occupations)e(K)j(that)f(arise)g(as)h(a)g(result)f(of)164\n1232 y(c)h(.factorizat)o(io)o(ns)d(such)j(as)f(<I|Eij|J>=<)o(I|E)o(ia|)\no(K>)o(<K|)o(Eaj)o(|J>)164 1292 y(c)h(.where)f(a)h(is)g(a)g(ficitious)d\n(orbital,)h(may)i(have)f(more)g(open)g(shells.)164 1352\ny(c)h(.However,)e(these)g(are)i(only)f(relevant)f(in)i(the)f(internals)\nf(of)h(the)164 1413 y(c)h(.coupling)e(coefficie)o(nt)f(generation)g\n(routines])164 1542 y Fm(10.2.11)55 b Fl(fci)p 472 1542\nV 18 w(owalk)p 620 1542 V 16 w(info)215 1635 y(subroutine)22\nb(fci_owalk_i)o(nf)o(o\\(o)o(wal)o(k,)g(iocc,)i(ns,)g(ioff,)g(numdet,)f\n(sym\\))164 1695 y(c)164 1755 y(c)i(Given)f(the)h(index)e(of)i(an)g\n(orbital)e(walk)h(return)g(the)g(occupation,)e(the)164\n1815 y(c)j(offset)f(in)h(the)f(CI)h(determinan)o(t)e(vector,)g(the)h\n(number)g(of)h(open)f(shells,)164 1876 y(c)h(the)g(correspon)o(din)o(g)\ne(number)g(of)i(determinan)o(ts,)d(and)i(the)h(symmetry)e(of)164\n1936 y(c)i(the)g(occupatio)o(n.)164 1996 y(c)164 2056\ny(c)g(The)g(CI)g(coefficie)o(nts)d(for)i(this)h(orbital)e(occupatio)o\n(n)g(are)h(addressed)164 2116 y(c)h(as)g(C\\(ioff+i\\))d(i=1,...,num)o\n(det)o(.)164 2177 y(c)164 2237 y(c)j(This)f(routine)f(bundles)h(the)g\n(function)f(of)i(several)e(other)h(routines)164 2297\ny(c)h(as)g(a)g(convenience)o(.)164 2357 y(c)215 2417\ny(integer)e(owalk)204 b(!)25 b([input])48 b(Index)24\nb(of)h(orbital)e(occupation)215 2478 y(integer)g(iocc\\(*\\))152\nb(!)25 b([output])d(The)j(orbital)e(occupation)f(pattern)949\n2607 y Fo(29)p eop end\n%%Page: 30 30\nTeXDict begin 30 29 bop 215 315 a Fl(integer)23 b(ns)282\nb(!)25 b([output])d(No.)j(of)g(open)f(shells)215 376\ny(integer)f(ioff)230 b(!)25 b([output])d(Offset)i(into)g(CI)h(vector)\n215 436 y(integer)e(numdet)178 b(!)25 b([output])d(No.)j(of)g\n(determinan)o(ts)d(for)j(this)f(ns)215 496 y(integer)f(sym)256\nb(!)25 b([output])d(Symmetry)h(0...7)164 626 y Fm(10.2.12)55\nb Fl(fci)p 472 626 16 2 v 18 w(det)p 568 626 V 17 w(to)p\n637 626 V 18 w(walk)241 718 y(subroutine)22 b(fci_det_to)o(_w)o(alk)o\n(\\(id)o(et)o(,)h(owalk,)g(mwalk\\))164 779 y(c)164 839\ny(c)51 b(Given)24 b(the)g(index)g(of)h(a)g(determinan)o(t,)d(idet,)i\n(return)g(the)164 899 y(c)51 b(correspond)o(in)o(g)23\nb(lexical)g(weights)g(of)i(orbital)e(and)h(primitive)164\n959 y(c)51 b(spin)24 b(functions.)48 b(Without)23 b(having)g(an)i\n(index)f(vector)f(the)164 1019 y(c)51 b(length)23 b(of)i(the)g(CI)g\n(expansion)d(the)i(only)h(way)f(to)h(do)g(this)164 1079\ny(c)51 b(is)25 b(with)f(a)h(binary)f(search,)f(so)i(this)f(operation)e\n(costs)164 1140 y(c)51 b(about)24 b(log2\\(ndet)o(s\\).)164\n1200 y(c)241 1260 y(integer)f(idet)101 b(!)25 b([input])e(Index)h(into)\ng(determinant)e(CI)j(vector)241 1320 y(integer)e(owalk)75\nb(!)25 b([output])e(Correspond)o(ing)f(orbital)h(index)241\n1380 y(integer)g(mwalk)75 b(!)25 b([output])e(Correspond)o(ing)f\n(primitive)g(spin)i(function)f(index)164 1525 y Fc(10.3)66\nb(T)-6 b(ransforming)17 b(b)r(et)n(w)n(een)g(CSF)h(and)g(determinats,)f\n(and)351 1600 y(spin)22 b(adaption)164 1692 y Fm(10.3.1)55\nb Fl(fci)p 444 1692 V 18 w(spin)p 566 1692 V 17 w(adapt)241\n1784 y(subroutine)22 b(fci_spin_a)o(da)o(pt\\()o(ns,)g(direction,)g\n(det,)i(csf\\))164 1844 y(c)164 1905 y(c)51 b(Given)24\nb(a)h(set)f(of)h(coefficient)o(s)e(of)h(either)g(determinan)o(ts)e(or)j\n(CSF)164 1965 y(c)51 b(correspond)o(in)o(g)23 b(to)i(a)g(single)e\n(orbital)g(occupation)f(with)j(ns)f(open)h(shells,)164\n2025 y(c)51 b(then)24 b(do)h(the)f(following)164 2085\ny(c)164 2145 y(c)51 b(if)25 b(\\(directio)o(n)e(==)i(1\\))164\n2206 y(c)51 b(...)24 b(project)f(from)i(determina)o(nts)d(to)j(CSF)f\n(with)g(multiplicit)o(y)f(multi)g(\\(fci_setup\\))164 2266\ny(c)51 b(...)24 b(if)h(there)f(is)h(spin)f(contaminat)o(ion)e(norm)i\n(will)g(not)h(be)g(conserved)164 2326 y(c)51 b(else)24\nb(if)h(\\(direction)d(==)j(2\\))164 2386 y(c)51 b(...)24\nb(project)f(from)i(CSF)f(with)g(multiplicit)o(y)f(multi)g(to)i\n(determinant)o(s)164 2446 y(c)51 b(...)24 b(norm)h(should)e(be)i\n(conserved)949 2607 y Fo(30)p eop end\n%%Page: 31 31\nTeXDict begin 31 30 bop 164 315 a Fl(c)51 b(else)164\n376 y(c)g(...)24 b(invalid)f(value)h(for)h(direction)164\n436 y(c)51 b(endif)164 496 y(c)241 556 y(integer)23 b(ns)409\nb(!)26 b([input])d(No.)h(of)h(open)f(shells)241 616 y(integer)f\n(direction)227 b(!)26 b([input])d(1=det)g(to)i(csf,)g(2=csf)e(to)i(det)\n241 677 y(double)e(precision)g(det\\(*\\))74 b(!)26 b([in/out])c\n(coefficient)o(s)h(of)h(determinant)o(s)241 737 y(double)f(precision)g\n(csf\\(*\\))74 b(!)26 b([in/out])c(coefficient)o(s)h(of)h(csf)237\n838 y Fo(The)i(follo)o(wing)f(related)h(routine)f Fl(fci_spin_ad)o(ap)o\n(t_n)o(vec)o(\\(\\))d Fo(can)k(transform)164 898 y(m)o(ultiple)20\nb(v)o(ectors)h(\\(with)h(the)f(same)h(n)o(um)o(b)q(er)f(of)h(op)q(en)h\n(shells\\))e(at)h(once,)h(whic)o(h)e(is)164 958 y(m)o(uc)o(h)15\nb(more)h(e\\016cien)o(t.)164 1086 y Fm(10.3.2)55 b Fl(fci)p\n444 1086 16 2 v 18 w(spin)p 566 1086 V 17 w(adapt)p 713\n1086 V 16 w(nvec)215 1178 y(subroutine)22 b(fci_spin_ad)o(ap)o(t_n)o\n(vec)190 1239 y(&)127 b(\\(ns,)25 b(direction)o(,)e(det,)h(ldd,)g(csf,)g\n(ldc,)g(nvec\\))164 1299 y(c)164 1359 y(c)h(Given)f(NVEC)g(sets)g(of)h\n(coefficient)o(s)d(of)j(either)f(determinan)o(ts)e(or)j(CSF)164\n1419 y(c)g(correspondi)o(ng)d(to)j(a)g(single)f(orbital)f(occupatio)o\n(n)g(with)h(ns)h(open)f(shells,)164 1479 y(c)h(then)f(do)h(the)g\n(following)164 1540 y(c)164 1600 y(c)g(if)g(\\(direction)d(==)j(1\\))164\n1660 y(c)g(...)g(project)e(from)h(determinan)o(ts)e(to)j(CSF)g(with)f\n(multiplici)o(ty)e(multi)i(\\(fci_init\\))164 1720 y(c)h(...)g(if)g\n(there)e(is)i(spin)g(contamina)o(ti)o(on)d(norm)j(will)f(not)g(be)h\n(conserved)164 1780 y(c)g(else)f(if)h(\\(direction)d(==)j(2\\))164\n1841 y(c)g(...)g(project)e(from)h(CSF)h(with)f(multiplic)o(ity)e(multi)\ni(to)h(determina)o(nts)164 1901 y(c)g(...)g(norm)f(should)f(be)i\n(conserved)164 1961 y(c)g(else)164 2021 y(c)g(...)g(invalid)e(value)h\n(for)g(direction)164 2081 y(c)h(endif)164 2141 y(c)164\n2270 y Fm(10.3.3)55 b Fl(fci)p 444 2270 V 18 w(spin)p\n566 2270 V 17 w(force)241 2362 y(subroutine)22 b(fci_spin_f)o(or)o\n(ce\\()o(c\\))164 2422 y(c)164 2482 y(c)51 b(Force)24 b(determina)o(nt)e\n(CI)j(vector)f(to)g(be)h(spin)g(adapted)e(by)i(projectin)o(g)949\n2607 y Fo(31)p eop end\n%%Page: 32 32\nTeXDict begin 32 31 bop 164 315 a Fl(c)51 b(to)25 b(and)f(from)g(the)h\n(CSF)g(space.)49 b(Also,)23 b(renormalize)o(s.)164 376\ny(c)241 436 y(double)g(precision)g(c\\(ndets\\))f(!)k([in/out])c\n(Determinant)g(CI)j(vector)164 580 y Fc(10.4)66 b(Coupling)21\nb(co)r(e\\016cien)n(ts)164 673 y Fm(10.4.1)55 b Fl(fci)p\n444 673 16 2 v 18 w(couple1)241 765 y(subroutine)22 b(fci_couple)o(1\\()\no(vec)o(,)h(nvec,)g(p,)i(iocc,)f(idim,)215 825 y(&)128\nb(numq,)24 b(qlist,)f(epq\\))164 885 y(c)164 946 y(c)51\nb(Compute)23 b(<V|Epq|Iw>)f(for)i(given)g(CI)h(vectors)e(V,)i(fixed)164\n1006 y(c)51 b(orbital)23 b(p,)i(fixed)f(orbital)f(occupancy)f(I)j\n(\\(iocc\\),)e(and)i(all)f(orbitals)f(q)164 1066 y(c)51\nb(and)24 b(primitive)f(spin)h(functions)e(w.)164 1126\ny(c)164 1186 y(c)51 b(numq)24 b(returns)f(the)i(number)e(of)i(orbitals)\ne(q)i(giving)e(a)j(nonzero)d(interacti)o(on)164 1247\ny(c)164 1307 y(c)51 b(qlist\\(1...)o(nu)o(mq\\))22 b(contains)h(the)h\n(values)g(of)h(q)164 1367 y(c)164 1427 y(c)51 b(epq\\(1...id)o(im)o(,1.)\no(..n)o(vec)o(,1)o(...)o(num)o(q\\))22 b(contains)h(the)h(coupling)f\n(coeffcient)o(s)164 1487 y(c)241 1547 y(integer)g(nvec)357\nb(!)26 b([input])d(No.)h(of)h(vectors)e(on)i(the)g(left)f(hand)g(side)\n241 1608 y(double)f(precision)g(vec\\(ndets)o(,nv)o(ec)o(\\))g(!)i\n([input])e(The)i(CI)g(vectors)241 1668 y(integer)e(p)435\nb(!)26 b([input])d(Fixed)g(label)h(on)h(Epq)241 1728\ny(integer)e(iocc\\(nacti)o(v\\))150 b(!)26 b([input])d(Orbital)g\n(occupatio)o(n)g(of)i(I)241 1788 y(integer)e(idim)357\nb(!)26 b([input])d(No.)h(of)h(spin)f(functions)f(for)h(I)241\n1848 y(integer)f(numq)357 b(!)26 b([output])c(Returns)h(the)i(number)e\n(of)i(q)241 1909 y(integer)e(qlist\\(*\\))253 b(!)26 b([output])c\n(Returns)h(the)i(list)f(of)h(interactin)o(g)e(q)241 1969\ny(double)g(precision)g(epq\\(idim,)o(nve)o(c,)o(*\\))f(!)k([output])c\n(epq\\(w,i,q\\))g(=)k(<Vi|Epq|I)o(w>)164 2099 y Fm(10.4.2)55\nb Fl(fci)p 444 2099 V 18 w(couple2)241 2191 y(subroutine)22\nb(fci_couple)o(2\\()o(vec)o(,)h(nvec,)g(p,)i(r,)g(iocc,)f(idim,)215\n2251 y(&)128 b(numqs,)23 b(qslist,)h(epqrs\\))164 2311\ny(c)164 2372 y(c)51 b(Compute)23 b(<V|Epq,rs|)o(Iw>)f(for)i(given)g(CI)\nh(vectors)e(V,)i(fixed)f(orbitals)164 2432 y(c)51 b(p)25\nb(and)g(r,)g(fixed)e(orbital)g(occupancy)g(I)i(\\(iocc\\),)e(and)i(all)f\n(orbitals)f(q)i(and)g(s,)949 2607 y Fo(32)p eop end\n%%Page: 33 33\nTeXDict begin 33 32 bop 164 315 a Fl(c)51 b(and)24 b(primitive)f(spin)h\n(functions)e(w.)164 376 y(c)164 436 y(c)51 b(The)24 b(constraint)e\n(\\(pq\\))j(>=)f(\\(rs\\))h(is)f(applied,)f(so)i(we)g(loop)f(over)g(all)h\n(q)g(but)164 496 y(c)51 b(restrict)23 b(the)h(s)h(loop.)50\nb(If)25 b(couple2)e(is)i(called)e(with)h(p>=r)g(then)h(all)f(unique)164\n556 y(c)51 b(coeffs)23 b(are)i(generated.)164 616 y(c)164\n677 y(c)51 b(numqs)24 b(returns)f(the)h(number)g(of)h(orbitals)d(q,)j\n(s)g(giving)f(a)h(nonzero)e(interaction)164 737 y(c)164\n797 y(c)51 b(qslist\\(1,)22 b(1...numqs\\))g(contains)h(the)h(values)g\n(of)h(q)164 857 y(c)51 b(qslist\\(2,)22 b(1...numqs\\))g(contains)h(the)h\n(values)g(of)h(s)164 917 y(c)164 978 y(c)51 b(epqrs\\(1...)o(id)o(im,)o\n(1..)o(.nv)o(ec)o(,1.)o(..n)o(um)o(qs\\))22 b(contains)h(the)h(coupling)\nf(coeffcient)o(s)164 1038 y(c)241 1098 y(integer)g(nvec)357\nb(!)26 b([input])d(No.)h(of)h(vectors)e(on)i(the)g(left)f(hand)g(side)\n241 1158 y(double)f(precision)g(vec\\(ndets)o(,nv)o(ec)o(\\))g(!)i\n([input])e(The)i(CI)g(vectors)241 1218 y(integer)e(p,)i(r)358\nb(!)26 b([input])d(Fixed)g(labels)h(on)h(Epq,rs)241 1279\ny(integer)e(iocc\\(nacti)o(v\\))150 b(!)26 b([input])d(Orbital)g\n(occupatio)o(n)g(of)i(I)241 1339 y(integer)e(idim)357\nb(!)26 b([input])d(No.)h(of)h(spin)f(functions)f(for)h(I)241\n1399 y(integer)f(numqs)331 b(!)26 b([output])c(Returns)h(the)i(number)e\n(of)i(q,)g(s)241 1459 y(integer)e(qslist\\(2,*)o(\\))176\nb(!)26 b([output])c(Returns)h(the)i(list)f(of)h(interactin)o(g)e(q,s)\n241 1519 y(double)g(precision)g(epqrs\\(idi)o(m,n)o(ve)o(c,*)o(\\))g(!)i\n([output])e(epq\\(w,i,q)o(\\))g(=)i(<Vi|Epqrs|)o(Iw)o(>)164\n1649 y Fm(10.4.3)55 b Fl(fci)p 444 1649 16 2 v 18 w(couple3)241\n1742 y(subroutine)22 b(fci_couple)o(3\\()o(vec)o(,)h(nvec,)g(p,)i(q,)g\n(r,)g(t,)g(iocc,)f(idim,)215 1802 y(&)128 b(numsu,)23\nb(sulist,)h(epqrstu\\))164 1862 y(c)164 1922 y(c)51 b(Compute)23\nb(<V|Epq,rs,)o(tu|)o(Iw)o(>)g(for)h(given)g(CI)h(vectors)e(V,)i(fixed)f\n(orbitals)164 1982 y(c)51 b(p,q,r,t)23 b(and)h(fixed)g(orbital)f\n(occupancy)g(I)i(\\(iocc\\),)e(and)i(all)f(orbitals)f(s,u)164\n2043 y(c)51 b(and)24 b(primitive)f(spin)h(functions)e(w.)164\n2103 y(c)164 2163 y(c)51 b(Constrain)22 b(the)j(loops)f(over)g(s)h(and)\nf(u)i(so)f(that)f(\\(pq\\)>=\\(rs\\))o(>=)o(\\(tu)o(\\).)48\nb(If)25 b(the)164 2223 y(c)51 b(calling)23 b(program)g(externally)f\n(constrains)g(p>=r>=t)h(\\(all)h(q\\))h(then)f(all)164\n2283 y(c)51 b(unique)23 b(coupling)g(coefficien)o(ts)f(will)i(be)h\n(generated.)164 2343 y(c)164 2404 y(c)51 b(numsu)24 b(returns)f(the)h\n(number)g(of)h(orbitals)d(s,u)j(giving)e(a)j(nonzero)d(interacti)o(on)\n164 2464 y(c)949 2607 y Fo(33)p eop end\n%%Page: 34 34\nTeXDict begin 34 33 bop 164 315 a Fl(c)51 b(sulist\\(1,)22\nb(1...numsu\\))g(contains)h(the)h(values)g(of)h(s)164\n376 y(c)51 b(sulist\\(2,)22 b(1...numsu\\))g(contains)h(the)h(values)g\n(of)h(u)164 436 y(c)164 496 y(c)51 b(epqrstu\\(1.)o(..)o(idi)o(m,1)o\n(...)o(nv)o(ec,)o(1..)o(.n)o(ums)o(u\\))22 b(contains)h(the)i(coupling)d\n(coeffcients)164 556 y(c)241 616 y(integer)h(nvec)357\nb(!)26 b([input])d(No.)h(of)h(vectors)e(on)i(the)g(left)f(hand)g(side)\n241 677 y(double)f(precision)g(vec\\(ndets)o(,nv)o(ec)o(\\))g(!)i\n([input])e(The)i(CI)g(vectors)241 737 y(integer)e(p,)i(q,)g(r,)g(t)204\nb(!)26 b([input])d(Fixed)g(labels)h(on)h(Epq,rs,tu)241\n797 y(integer)e(iocc\\(nacti)o(v\\))150 b(!)26 b([input])d(Orbital)g\n(occupatio)o(n)g(of)i(I)241 857 y(integer)e(idim)357\nb(!)26 b([input])d(No.)h(of)h(spin)f(functions)f(for)h(I)241\n917 y(integer)f(numsu)331 b(!)26 b([output])c(Returns)h(the)i(number)e\n(of)i(s,u)241 978 y(integer)e(sulist\\(2,*)o(\\))176 b(!)26\nb([output])c(Returns)h(the)i(list)f(of)h(interactin)o(g)e(s,u)241\n1038 y(double)g(precision)g(epqrstu\\(i)o(dim)o(,n)o(vec)o(,*\\))f(!)j\n([output])e(<Vi|Epqrst)o(u|)o(Iw>)164 1182 y Fc(10.5)66\nb(Miscellaneous)164 1274 y Fm(10.5.1)55 b Fl(fci)p 444\n1274 16 2 v 18 w(onepdm)241 1367 y(subroutine)22 b(fci_onepdm)o(\\(v)o\n(ec,)g(nvec,)i(onepdm\\))164 1427 y(c)164 1487 y(c)51\nb(Compute)23 b(the)h(1-particle)e(density)h(matrices)164\n1547 y(c)164 1607 y(c)51 b(onepdm\\(p,q)o(,i)o(vec)o(\\))23\nb(returns)g(<V\\(ivec\\)|)o(Epq)o(|V\\()o(iv)o(ec\\))o(>)164\n1668 y(c)241 1728 y(integer)g(nvec)357 b(!)26 b([input])d(No.)h(of)h\n(vectors)241 1788 y(double)e(precision)g(vec\\(ndets)o(,)g(nvec\\))g(!)j\n([input])d(The)h(CI)h(vectors)241 1848 y(double)e(precision)g\n(onepdm\\(na)o(cti)o(v,)o(nac)o(tiv)o(,nv)o(ec)o(\\))g(!)i([output])e(1)i\n(PDMs)237 1960 y Fo(The)15 b(program)g(c)o(hec)o(ks)e(the)h(1-PDMs)h\n(for)g(symmetry)e(and)i(the)f(correct)g(trace)g(and)164\n2020 y(will)h(ab)q(ort)j(if)d(an)i(error)f(is)g(detected.)237\n2080 y(The)f(t)o(w)o(o-particle)f(densit)o(y)g(matrix)g(can)h(also)h(b)\nq(e)f(generated)g(with)g(a)g(small)f(mo)q(d-)164 2140\ny(i\\014cation)i(to)h(this)f(routine.)164 2270 y Fm(10.5.2)55\nb Fl(fci)p 444 2270 V 18 w(hv)215 2362 y(subroutine)22\nb(fci_hv\\(ecor)o(e,)g(h,)j(g,)g(work,)f(lenwrk,)f(v,)i(s\\))164\n2422 y(c)164 2482 y(c)g(Compute)e(the)i(Hamiltonia)o(n)d(matrix-vect)o\n(or)g(product)h(s)j(=)f(Hv)949 2607 y Fo(34)p eop end\n%%Page: 35 35\nTeXDict begin 35 34 bop 164 315 a Fl(c)215 376 y(double)24\nb(precision)e(ecore)101 b(!)25 b([input])e(Frozen-cor)o(e+n)o(ucl)o(ea)\no(r)g(replusion)f(energy)215 436 y(double)i(precision)e(h\\(nacttr\\))g\n(!)k([input])d(Effective)f(1-e)j(integrals)d(Core+T+V)215\n496 y(double)i(precision)e(g\\(nacttr,n)o(act)o(tr)o(\\))h(!)i([input])e\n(Two-electr)o(on)f(integrals)215 556 y(integer)h(lenwrk)306\nb(!)25 b([input])e(Size)h(of)h(workspace)215 616 y(double)f(precision)e\n(work\\(lenwr)o(k\\))g(!)j([scratch])e(Workspace)f(-)j(the)g(more)f(the)h\n(better)215 677 y(double)f(precision)e(v\\(ndets\\))h(!)i([input])e(CI)i\n(vector)215 737 y(double)f(precision)e(s\\(ndets\\))h(!)i([output])e(s)i\n(=)g(H*v)237 838 y Fo(The)16 b(Da)o(vidson)h(diagonalizer)f(calls)g\n(this)g(routine)g(so)h(it)e(should)i(b)q(e)g(reliable.)164\n966 y Fm(10.5.3)55 b Fl(fci)p 444 966 16 2 v 18 w(hami)241\n1058 y(subroutine)22 b(fci_hami\\(h)o(am)o(il,)g(ecore,)h(h,)i(g,)g\n(work,)f(lenwork\\))164 1118 y(c)164 1178 y(c)51 b(Simple)23\nb(wrapper)g(routine)g(to)i(build)f(the)h(full)f(triangular)e(Hamiltoni)\no(an)164 1239 y(c)51 b(in)25 b(the)f(determinant)e(basis)i(from)g(the)g\n(one-)h(and)f(two-electr)o(on)e(integrals)164 1299 y(c)241\n1359 y(double)h(precision)g(hamil\\(*\\))f(!)k([output])c(Returns)h\n(triangle)g(of)i(Hamiltonia)o(n)241 1419 y(double)e(precision)g(ecore)\n100 b(!)26 b([input])d(Frozen)g(core)h(+)i(nuclear)d(replulsio)o(n)241\n1479 y(double)g(precision)g(h\\(nacttr\\))f(!)j([input])e(Triangle)g(of)i\n(1-e)f(integrals)241 1540 y(double)f(precision)g(g\\(nacttr,)o(nac)o(tt)\no(r\\))f(!)k([input])d(2-e)h(integrals)241 1600 y(integer)f(lenwork)279\nb(!)26 b([input])241 1660 y(double)d(precision)g(work\\(lenw)o(ork)o(\\))\nf(!)k([scratch])164 1788 y Fm(10.5.4)55 b Fl(fci)p 444\n1788 V 18 w(diags)215 1880 y(subroutine)22 b(fci_diags\\(h)o(d,)o(eco)o\n(re,)o(h,)o(g,i)o(one)o(l,n)o(on)o(emx)o(,kp)o(t,m)o(kp)o(t\\))164\n1941 y(c)164 2001 y(c)128 b(construct)22 b(the)j(diagonals)d(of)j(the)f\n(hamiltonian)164 2061 y(c)215 2121 y(double)g(precision)e(hd\\(ndets\\))g\n(!)k([output])c(The)j(diagonals)215 2181 y(double)f(precision)e(ecore)\n101 b(!)25 b([input])e(Nuclear)g(repulsion)f(+)k(frozen)d(core)215\n2242 y(double)h(precision)e(h\\(nacttr\\))g(!)k([input])d(1-e)h\n(integrals)215 2302 y(double)g(precision)e(g\\(nacttr,n)o(act)o(tr)o(\\))\nh(!)i([input])e(2-e)i(integrals)215 2362 y(integer)e(nonemx)306\nb(!)25 b([input])e(dimension)f(of)j(ionel)215 2422 y(integer)e\n(ionel\\(5,non)o(emx)o(\\))74 b(!)25 b([scratch])d(workspace)h(for)h\n(coupling)f(coeff)215 2482 y(integer)g(kpt\\(nonemx\\))176\nb(!)25 b([scratch])d(workspace)949 2607 y Fo(35)p eop\nend\n%%Page: 36 36\nTeXDict begin 36 35 bop 215 315 a Fl(integer)23 b(mkpt\\(ndetmx)o(+1\\))\n99 b(!)25 b([scratch])d(workspace)164 430 y Fo(This)d(is)f(an)i(in)o\n(ternal)d(in)o(terface)h(to)h(compute)f(the)h(diagonal)g(elemen)o(ts)e\n(on)i(demand.)164 490 y(It)h(w)o(ould)h(b)q(e)g(easy)f(to)h(pro)o(vide)\nf(an)h(easy)g(to)g(use)g(wrapp)q(er)g(for)g(this)g(\\(see)f(usage)h(in)\n164 550 y Fl(fci_solve.)o(F)p Fo(\\))12 b(but)k(since)e\nFl(fci_solve)e Fo(\\(Section)j(10.1.2\\))g(already)g(writes)g(the)g\n(diag-)164 610 y(onals)i(to)g(disk)e(there)h(is)g(not)h(m)o(uc)o(h)e(p)\nq(oin)o(t)h(in)g(using)h(this)f(routine)g(elsewhere.)164\n740 y Fm(10.5.5)55 b Fl(fci)p 444 740 16 2 v 18 w(prspnad)215\n832 y(subroutine)22 b(fci_prspnad)o(\\(n)o(s\\))215 893\ny(integer)h(ns)410 b(!)25 b([input])164 953 y(c)164 1013\ny(c)128 b(Print)24 b(the)g(spin-adapt)o(ion)e(coefficent)o(s)h(for)h\n(ns)h(open)f(shells)164 1073 y(c)164 1203 y Fm(10.5.6)55\nb Fl(fci)p 444 1203 V 18 w(tprint)215 1295 y(subroutine)22\nb(fci_tprint\\()o(\\))237 1410 y Fo(This)15 b(routine)f(prin)o(ts)h\n(timing)f(information)g(to)h(F)o(OR)l(TRAN)e(unit)i(6.)21\nb(If)14 b(a)h(routine)164 1470 y(is)d(called)g(more)h(that)g(10)613\n1452 y Fi(5)646 1470 y Fo(times)f(then)g(to)h(a)o(v)o(oid)g(to)q(o)g(m)\no(uc)o(h)f(system)g(call)g(o)o(v)o(erhead)g(the)164 1530\ny(timing)i(is)h(automatically)g(disabled)f(and)i(the)f(time)f(rep)q\n(orted)h(as)h(zero.)21 b(The)15 b(n)o(um)o(b)q(er)164\n1590 y(of)i(calls)e(is)h(still)f(accum)o(ulated.)164\n1720 y Fm(10.5.7)55 b Fl(fci)p 444 1720 V 18 w(err)215\n1812 y(subroutine)22 b(fci_err\\(str)o(in)o(g,)g(code\\))215\n1873 y(character*\\()o(*\\))g(string)100 b(!)26 b([input])215\n1933 y(integer)d(code)306 b(!)26 b([input])237 2047 y\nFo(All)15 b(errors)i(in)f(the)h(full-CI)e(co)q(de)i(are)g(rep)q(orted)f\n(through)i(this)e(routine.)22 b(Put)17 b(an)o(y)164 2107\ny(additional)f(error)h(handling)f(in)o(to)g(this)g(routine.)164\n2274 y Fn(References)188 2383 y Fo([1])24 b Fa(R.)i(P)l(a)o(uncz,)d\nFe(`Spin)h(functions:)36 b(Construction)25 b(and)e(use,')31\nb Fo(\\(Plen)o(um,)23 b(New)264 2443 y(Y)l(ork,)16 b(1979\\).)949\n2607 y(36)p eop end\n%%Page: 37 37\nTeXDict begin 37 36 bop 188 315 a Fo([2])24 b Fa(R.)i(P)l(a)o(uncz,)e\nFe(`The)g(Symmetric)g(Gr)n(oup)f(in)h(Quantum)h(Chemistry,')30\nb Fo(\\(CR)o(C)264 376 y(Press,)16 b(Inc.,)f(Bo)q(ca)i(Raton,)f\n(Florida,)g(USA,)f(1995\\).)188 477 y([3])24 b Fa(P.)14\nb(Saxe,)g(D.J.)h(F)o(o)o(x,)f(H.F.)g(Schaefer)f(I)q(I)q(I)i(and)f(N.C.)\nf(Hand)o(y,)e Fe(J.)i(Chem.)264 538 y(Phys.)j Fm(74)g\nFo(\\(1982\\))i(5584.)188 639 y([4])24 b Fa(P.J.)i(Kno)o(wles)d(and)i\n(H-J.)g(Werner,)e Fe(Chem.)g(Phys.)g(L)n(ett.)f Fm(145)g\nFo(\\(1988\\))264 699 y(514.)188 801 y([5])i Fa(W.)19 b(Duch,)d\nFe(Int.)i(J.)f(Quant.)h(Chem.)e Fm(27)h Fo(\\(1985\\))g(59.)188\n903 y([6])24 b Fa(W.)19 b(Duch,)d Fe(Int.)i(J.)f(Quant.)h(Chem.)e\nFm(30)h Fo(\\(1986\\))g(799.)188 1005 y([7])24 b Fa(W.)19\nb(Duch,)d Fe(Chem.)h(Phys.)g(L)n(ett.)f Fm(124)h Fo(\\(1986\\))h(442.)188\n1106 y([8])24 b Fa(W.)19 b(Duch,)d Fe(Intern.)i(J.)f(Quant.)h(Chem)j\nFm(S24)16 b Fo(\\(1990\\))i(683.)188 1208 y([9])24 b Fa(W.)19\nb(Duch)g(and)f(J.)h(Kar)l(w)o(o)o(wski,)13 b Fe(Comp.)k(Phys.)g(R)n\n(ep.)f Fm(2)g Fo(\\(1985\\))i(92.)164 1310 y([10])24 b\nFa(J.)19 b(P)l(aldus,)c Fe(Phys.)h(R)n(ev.)i(A)e Fm(14)g\nFo(\\(1976\\))i(1620.)164 1411 y([11])24 b Fa(I.)19 b(Sha)l(vitt,)d\nFe(Int.)i(J.)f(Quant.)h(Chem.)f(Symp.)f Fm(11)h Fo(\\(1977\\))h(131.)164\n1513 y([12])24 b Fa(I.)19 b(Sha)l(vitt,)d Fe(Int.)i(J.)f(Quant.)h\n(Chem.)f(Symp.)f Fm(12)h Fo(\\(1978\\))h(5.)164 1615 y([13])24\nb Fa(V.R.)18 b(Sa)o(unders)g(and)g(J.H.)g(v)l(an)f(Lenthe,)f\nFe(Mol.)h(Phys.)f Fm(48)g Fo(\\(1983\\))i(923.)164 1716\ny([14])24 b Fa(S.)18 b(Zarrabian,)e(C.R.)h(Sarma)g(and)g(J.)g(P)l\n(aldus,)c Fe(Chem.)k(Phys.)e(L)n(ett.)g Fm(155)264 1777\ny Fo(\\(1989\\))j(183.)164 1878 y([15])24 b Fa(R.J.)g(Harrison)e(and)h\n(S.)h(Zarrabian,)d Fe(Chem.)g(Phys.)h(L)n(ett.)e Fm(158)h\nFo(\\(1989\\))264 1939 y(393.)164 2040 y([16])j Fa(M.)18\nb(K)o(ot)m(ani,)e(A.)i(Amemiy)m(a,)e(E.)i(Ishigur)o(o)e(and)h(T.)h\n(Kimura,)c Fe(`T)l(ables)k(of)264 2100 y(Mole)n(cular)g(Inte)n(gr)n\n(als,')k Fo(\\(Maruzen,)16 b(Co.,)g(T)l(oky)o(o,)g(1955\\).)949\n2607 y(37)p eop end\n%%Trailer\n\nuserdict /end-hook known{end-hook}if\n%%EOF\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/matrixelements.tex",
    "content": "\\documentstyle [psfig,12pt,fleqn]{article}\n\n\\input{commands}\n\\input{bibstuff}\n\n\\newcommand{\\RN}[1]{\\underline{r}_{#1}}\n\\newcommand{\\nCr}[2]{\\left(\\begin{array}{c} #1 \\\\ #2 \\end{array}\\right)}\n\\newcommand{\\half}{\\frac{1}{2}}\n\n\\title{Notes on the evaluation of coupling-coefficients and Hamiltonian matrix-elements using determinants and configuration state functions.}\n\n\\author{Robert J. Harrison}\n\n\\date{}\n\n\\begin{document}\n\\maketitle\n\n\\clearpage\n\n\\tableofcontents\n\n\\clearpage\n\n\\section{Introduction}\n\nFor the purpose of evaluating matrix elements over a wide variety of\ndensity operators, while grouping all possible spin functions for a\ngiven orbital occupation and also having the ability to use either CSF\nor determinants, I have adapted a full-CI program that I wrote while at\nArgonne National Laboratory in 1986/7.  It has required some\nmodification for the present purposes and additional changes are\nnecessary, however, its internal structure is very simple and it\nshould be easy to extend, fast and correct!\n\nThese notes serve to describe the theory behind the code and the\ncoupling-coefficient generation and spin adaption used in the program.\nThe methodology is standard and draws very heavily upon Pauncz\n\\cite{pauncz,paunczsym}, Handy \\cite{handyfci}, Knowles\n\\cite{knowleseai} and especially Duch\n\\cite{duchug,duchspinad,duchcouple,duchfci,duchsga}.  Graphs provide a\nvery simple, visually accessible and computationally useful\nrepresentation of many types of bases, espcially of ``complete-bases''\nsuch as full-CI, CISD, or all possible spin functions for a given\nopen-shell occupation.  The graphical unitary group approach\n\\cite{paldusguga,shavittguga,shavittguga2} perhaps first demonstrated\nthe utility of this approach and it was applied in the symmetric group\napproach by Duch et al \\cite{duchsga}.  The program internally uses\ngraphical representations only for the lexical ordering of orbital and\nspin occupations.  It does not use a graphical approach for the\nevaluation of matrix elements.  There is no advantage to this for FCI\nand the modern thinking seems to be that graphical approaches of the\n1970's and 1980's are unecessarily complex (c.f., the marvellous\nanalysis of the MRSDCI algorithm by Saunders and van Lenthe\n\\cite{saunders}).\n\nI don't think that I have done anything new here.  The notes are very\nbasic so that the program is usable even by someone unfamiliar with CI\nmethodology, or a graduate student.\n\n\\section{Determinant bases}\n\n For the present purpose we shall assume that all molecular orbitals\n($\\phi$) are real, orthonormal, and that spin orbitals ($\\varphi$) are\nconstructed as a product of the spatial and spin components.  For\ninstance,\n\\begin{equation}\n \\varphi_{i}(\\RN{1}) = \\phi_i(\\RN{1}) \\sigma_i(1)\n\\mbox{, $\\sigma_i = \\alpha$ or $\\beta$}\n\\end{equation}\nA determinantal electronic wavefunction ($\\Phi$) is simply an\nantisymmetrized product of spin orbitals:\n\\begin{eqnarray}\n  \\Phi & = & \\left| \\varphi_{1}(\\RN{1}) \\varphi_{2}(\\RN{2}) \\cdots\n\\varphi_{n}(\\RN{n}) \\right | \\\\\n       & = & {\\cal A} \\; \\varphi_{1}(\\RN{1}) \\varphi_{2}(\\RN{2}) \\cdots\n\\varphi_{n}(\\RN{n}) \\\\\n{\\cal A} & = & \\frac{1}{\\sqrt{n!}} \\sum_{P} (-1)^P P.\n\\end{eqnarray}\n${\\cal A}$ is the antisymmetrizer and the sum in its definition ranges\nover all possible $n!$ permutations of the $n$ electrons.  When we\nstart evaluating matrix elements it will be important to note that the\npermutations act on the electronic coordinates (space and spin) and\nnot on the labels of the orbitals.  \n\nA determinant is fully specified by\n\\begin{itemize}\n\\item the occupation of each spin orbital, and\n\\item an order in which the spin orbitals are occupied.\n\\end{itemize}\nClearly changing the order of the spin orbitals can change the sign of\nthe determinant, and thus consistency is crucially important. \n\nOne very common ordering, especially for full-CI programs\n\\cite{handyfci}, is to occupy all alpha spin orbitals before all beta spin\norbitals, and suborder by spatial orbital index within each group.\n\\begin{equation}\n\\underbrace{\\phi_{1}(\\RN{1})\\alpha(1) \\cdots\n\\phi_{n_{\\alpha}}(\\RN{n_{\\alpha}})\\alpha(n_{\\alpha})}_{\\mbox{Alpha orbitals}}\n\\underbrace{\\phi_{n_{\\alpha}+1}(\\RN{n_{\\alpha}+1})\\beta(n_{\\alpha}+1) \\cdots \n\\phi_{n}(\\RN{n})\\beta_{n}(n)}_{\\mbox{Beta orbitals}}\n\\end{equation}\nThe alpha or beta occupations are often referred to as strings.  This\nseparate treatment of each spin leads to a natural ordering of the\ndeterminants, and makes the evaluation of matrix elements in a\ndeterminant basis very straightforward.  However, it is is not\nconvenient for applications which need to manipulate all functions\nwith a given occupation of spatial orbtials (since these determinants\nwill be scattered throughout the CI vector) and should a fully\nspin-adpated implementation be required very little code can be\nreused.  \n\n\\label{standardorder}\n\nThe graphical representations used below unite determinant and\nspin-adapted approaches, and also preserve the simplicity of the\nevaluation of matrix elements over determinants while providing the\noption of using fully spin-adpated bases.  For these reasons, let us\nchoose an order with\n\\begin{itemize}\n\\item all doubly occupied orbitals first (i.e., on the left) ordered\nby increasing orbital index, and within each pair have the alpha\nspin-orbital precede the beta spin-orbital, and\n\\item all singly occupied orbitals next, ordered by increasing orbital\nindex.\n\\end{itemize}\n\\begin{equation}\n\\underbrace{\\phi_{1}(\\RN{1})\\alpha(1)\\phi_{1}(\\RN{2})\\beta(2) \\cdots\n\\phi_{d}(\\RN{2d})\\beta(2d)}_{\\mbox{doubly occupied}}\n\\underbrace{\\phi_{d+1}(\\RN{2d+1})\\sigma_{d+1}(2d+1) \\cdots \n\\phi_{d+s}(\\RN{n})\\sigma_{n}(2d+s)}_{\\mbox{singly occupied}}\n\\end{equation}\nwith $d$ doubly-occupied orbitals, and $s$ singly-occupied (or\nopen-shell) orbitals.  \nIt is more convenient if we group the spatial and spin\nfunctions separately,\n\\begin{eqnarray}\n\\Phi & = & {\\cal A} \\; \\left[\n\\left(\\phi_{1}(\\RN{1})\\phi_{1}(\\RN{2}) \\cdots \\phi_{d}(\\RN{2d})\n\\phi_{d+1}(\\RN{2d+1}) \\cdots \\phi_{d+s}(\\RN{n}) \\right)\\right. \\\\\n & & \\left.\\left(\\alpha(1)\\beta(2) \\cdots \\beta(2d) \\sigma_{d+1}(2d+1) \\cdots \n\\sigma_{n}(2d+s)\\right)\\right]\n\\end{eqnarray}\nThis makes it clear that the {\\em spin function depends only upon the\nopen shell orbitals}.  This is because each doubly occupied orbital\nalways has an alpha and a beta spin function in the specified order\nand thus a doubly occupied orbital may be placed anywhere since the\ntwo functions will always be moved together (i.e, it will be an even\npermutation) and therefore the sign of the determinant will be\nunchanged.  It is only ever necessary to consider the closed-shell\norbitals explicitly when computing matrix elements that involve these\nindices, and then it suffices to consider any closed-shell pairs as\nsimply being two more open shells which happen to be numbered before\nthe `true' open shells.\n\nIt is also clear that the spatial functions (in the first set of\nparentheses) and the spin functions may be managed separately.  I will\nadopt uppercase Roman letters for spatial orbital occupation patterns\n($|I\\! >$) and the systematic construction of these is discussed below\nin Section \\ref{orbitalgraph}.  The $\\mu$'th determinantal or\nprimitive spin function for $s$ electrons and $S_z = m$ will be\ndenoted by $\\theta^{(s)}_{m,\\mu}$ (in the program the routines that\ndeal with primitive spin functions often begin with the letter `m'\nbecause of the identification of $S_z = m$).  If the Hamiltonian is\nspin-free we only need to use functions with one value of $S_z$ and\nthe choice $S_z=S$ minimizes the dimension of the expansion space.\n\nHow many of these primitive spin functions functions are there?  There\nare $(\\half s + m)$ alpha spin electrons and $(\\half s -\nm)$ beta spin electrons to be distributed in all possible ways amoung\n$s$ orbitals.  Thus, the number of primitive spin functions\n(determinants) with $s$ open shells with given quantum number\n$S_z=m$ is\n\\begin{equation}\nd(s,m) = \\frac{s!}{(\\half s + m)! (\\half s - m)!}\n\\end{equation}\nBy a similar argument, the dimension of a determinant full-CI\n(ignoring spatial symmetry) with $n$ electrons in M orbitals and\n$S_z=m$ is\n\\begin{equation}\nD(M,n,m) = \\nCr{M}{\\half n + m}\\nCr{M}{\\half n - m}\n\\end{equation}\n\nOur determinant, corresponding to the I'th orbital occupation which\nhas $s$ open shells, and the $\\mu$'th primitive spin function for\nthe $s$ unpaired electrons coupled with $S_z=m$ is then finally\nwritten as\n\\begin{eqnarray}\n  |I\\mu\\! > & = & {\\cal A} \\; |I\\! > \\Delta \\theta^{(s)}_{m,\\mu} , \\\\\n  |I\\! > & = & \\phi_{1}(\\RN{1})\\phi_{1}(\\RN{2}) \\cdots \\phi_{d}(\\RN{2d-1}\\phi_{d}(\\RN{2d})\n\\phi_{d+1}(\\RN{2d+1}) \\cdots \\phi_{d+s}(\\RN{n}) \\\\\n  \\Delta & = &\\alpha(1)\\beta(2) \\cdots \\alpha(2d) \\beta(2d) \\\\\n  \\theta^{(s)}_{m,\\mu} & = & \\sigma_{d+1}(2d+1) \\cdots\n\\sigma_{n}(2d+s)\n\\end{eqnarray}\nwhere all of the closed-shell spin functions have been grouped into\n$\\Delta$ which never really needs to be considered.\n\n\\section{Graphical representation of primitive spin functions}\n\nIn this section we consider how the primitive spin functions are\nnumbered.  We wish to find an ordering for all possible primitive spin\nfunctions for $s$ unpaired electrons with $S_z = m$.  A graphical\nrepresentation is very helpful.  In Figure \\ref{mgraph} the coupling\nof the Z-component spin of each open-shell electron is represented\nwith a line.  An upward line indicates alpha spin and a downward line\nindicates beta spin.  There are only two possible choices of spin, and\nwe arrange for the graph to begin at the origin and end at the desired\n$S_z$ and number of electrons (in this case $S_z = 0$ and 8\nelectrons).  Thus, the number of walks from left to right (or vice\nversa) on this graph is equal to the total number of determinants.\n\n\\begin{figure}[htbp]\n\n\\center\n\n\\centerline{\\psfig{figure=mspingraph.eps,angle=270}}\n\\caption{\\label{mgraph} Graph of the primitive spin functions for 8\nopen-shell electrons coupled to $S_z=0$.}\n\\end{figure}\n\nHow many walks are there?  Each node on the graph in Figure\n\\ref{mgraph} is labelled with its weight which is the number of\npossible ways of arriving at that node.  The weight of a node is the\nsum of the weights of the (one or two) nodes that connect to it, and\nthe weight of the first node is one.  \n\nA walk on the graph is commonly represented with a plus sign\n(\\verb=+=) or number 1 for upward moves (alpha occupation) and a minus\nsign (\\verb=-=) or number 2 for downward moves (beta occupation).  To\nnumber each walk on the graph we must adopt some ordering and we use\nthe standard lexical order which places all functions coming from node\n$(s-1,S_z+\\half )$ before those from $(s-1,S_z-\\half )$.\nThus, if when walking the graph from right to left we always stay as\nhigh as possible we shall generate the lowest numbered walk.  The\nlexical ordering for all walks in Figure \\ref{mgraph} is given in\nTable \\ref{mwalks}.\n\n\\begin{table}[htbp]\n\n\\center\n\n\\begin{tabular}{lc|lc|lc}\n Index & Walk & Index & Walk & Index & Walk \\\\ \\hline\n 1 &  \\verb=+ + + + - - - -= & 25  &  \\verb=- - + + + - + -= & 49 &\n\\verb=+ - - + - + - += \\\\\n 2 &  \\verb=+ + + - + - - -= & 26  &  \\verb=+ + - - - + + -=    & 50 &\n\\verb=- + - + - + - += \\\\\n 3 &  \\verb=+ + - + + - - -= & 27  &  \\verb=+ - + - - + + -=    & 51 &\n\\verb=- - + + - + - += \\\\\n 4 &  \\verb=+ - + + + - - -= & 28  &  \\verb=- + + - - + + -=    & 52 &\n\\verb=+ - - - + + - += \\\\\n 5 &  \\verb=- + + + + - - -= & 29  &  \\verb=+ - - + - + + -=    & 53 &\n\\verb=- + - - + + - += \\\\\n 6 &  \\verb=+ + + - - + - -= & 30  &  \\verb=- + - + - + + -=    & 54 &\n\\verb=- - + - + + - += \\\\\n 7 &  \\verb=+ + - + - + - -= & 31  &  \\verb=- - + + - + + -=    & 55 &\n\\verb=- - - + + + - += \\\\\n 8 &  \\verb=+ - + + - + - -= & 32  &  \\verb=+ - - - + + + -=    & 56 &\n\\verb=+ + - - - - + += \\\\\n 9 &  \\verb=- + + + - + - -= & 33  &  \\verb=- + - - + + + -=    & 57 &\n\\verb=+ - + - - - + += \\\\\n10 &  \\verb=+ + - - + + - -= & 34  &  \\verb=- - + - + + + -=    & 58 &\n\\verb=- + + - - - + += \\\\\n11 &  \\verb=+ - + - + + - -= & 35  &  \\verb=- - - + + + + -=    & 59 &\n\\verb=+ - - + - - + += \\\\\n12 &  \\verb=- + + - + + - -= & 36  &  \\verb=+ + + - - - - +=    & 60 &\n\\verb=- + - + - - + += \\\\\n13 &  \\verb=+ - - + + + - -= & 37  &  \\verb=+ + - + - - - +=    & 61 &\n\\verb=- - + + - - + += \\\\\n14 &  \\verb=- + - + + + - -= & 38  &  \\verb=+ - + + - - - +=    & 62 &\n\\verb=+ - - - + - + += \\\\\n15 &  \\verb=- - + + + + - -= & 39  &  \\verb=- + + + - - - +=    & 63 &\n\\verb=- + - - + - + += \\\\\n16 &  \\verb=+ + + - - - + -= & 40  &  \\verb=+ + - - + - - +=    & 64 &\n\\verb=- - + - + - + += \\\\\n17 &  \\verb=+ + - + - - + -= & 41  &  \\verb=+ - + - + - - +=    & 65 &\n\\verb=- - - + + - + += \\\\\n18 &  \\verb=+ - + + - - + -= & 42  &  \\verb=- + + - + - - +=    & 66 &\n\\verb=+ - - - - + + += \\\\\n19 &  \\verb=- + + + - - + -= & 43  &  \\verb=+ - - + + - - +=    & 67 &\n\\verb=- + - - - + + += \\\\\n20 &  \\verb=+ + - - + - + -= & 44  &  \\verb=- + - + + - - +=    & 68 &\n\\verb=- - + - - + + += \\\\\n21 &  \\verb=+ - + - + - + -= & 45  &  \\verb=- - + + + - - +=    & 69 &\n\\verb=- - - + - + + += \\\\\n22 &  \\verb=- + + - + - + -= & 46  &  \\verb=+ + - - - + - +=    & 70 &\n\\verb=- - - - + + + += \\\\\n23 & \\verb=+ - - + + - + -= & 47 & \\verb=+ - + - - + - += & \\\\\n24 & \\verb=- + - + + - + -= & 48 & \\verb=- + + - - + - += & \\\\ \\hline\n\\end{tabular}\n\n\\caption{\\label{mwalks} Lexical ordering of walks on the primtive spin\ngraph in Figure 1.}\n\\end{table}\n\nSince we have all possible walks on the graph, then switching any two\norbitals will just generate another walk on the graph.\n\n\\section{Graphical representation of CSF bases}\n\nInternally the program uses determinants, but provides the capability\nof transforming to the Yamanouchi-Kotani \\cite{kotani} genealogical\nspin basis with conventional lexical ordering and numbering of\nelectrons (see Pauncz \\cite{pauncz}).  This is the same as the\nstandard Young orthogonal representation which is also equivalent to\nthe Gelfand-Tsetlin basis of the unitary group approach.\n\nThe branching diagram (Figure \\ref{sgraph}) depicts the construction\nof a spin-adapted basis by the coupling of electronic spins.\n\n\\begin{figure}[htbp]\n\n\\center\n\n\\centerline{\\psfig{figure=spingraph.eps,angle=270}}\n\\caption{\\label{sgraph} Branching-diagram or spin-coupling graph for 8\nopen-shell electrons coupled to a singlet.}\n\\end{figure}\n\n The spin-adpated basis is formed by using standard angular momentum\ncoupling methods.  Electrons are again added one at a time, but now\nthe total angular momentma are coupled, rather than just the $S_z$\ncomponent.  If some intermediate node has spin $S$, then adding an\nalpha spin or beta spin electron will result in $S\\pm\\half $, but\nwe also have the constraint that $S \\geq 0$.  Thus, all walks on the\nspin-adpated graph must be above the horizontal axis, in contrast to\nthe graph for primitive spin functions ($-S \\leq S_z \\leq S$). It can\nagain be seen that walks on the graph represent all possible spin\nfunctions and consideration of the spin-coupling shows that the\nresulting basis is orthonormal.\n\nHow many spin adapted functions are there?  The determinants for given\n$s$ and $S_z$ will form a complete basis for $S=S_z, S_z+1,\\ldots$, and\nthus\n\\begin{equation}\nd(s,S) = f(s,S) + f(s,S+1) + \\cdots + f(s,S_{max})\n\\end{equation}\nTherefore, the number of spin-adpated functions for $s$ open-shell\nelectrons coupled to spin $S$ is\n\\begin{eqnarray}\nf(s,S) & = & d(s,S) - d(s,S+1) \\\\\n         & = & d(s,S) \\frac{(2S + 1)}{(\\half s + S + 1)} \\\\\n         & = & \\nCr{s+1}{\\half s - S}\\frac{(2S + 1)}{(s+1)}\n\\end{eqnarray}\n\nThe same argument may be invoked to demonstrate that the dimension\nof a spin-adpated full-CI for $n$ electrons in $M$ orbitals for total\nspin $S$, is\n\\begin{eqnarray}\n F(M,n,S) & = & D(M,n,S) - D(M,n,S+1) \\\\\n          & = & D(M,n,S) \\frac{(M+1)(2S+1)}{(\\half n + S + 1)(M-\\half n +S+1)}\n\\end{eqnarray}\n\nThe FCI program provides routines (see Section \\ref{spinad1}) to\ntransform between the determinant and CSF spin bases for a given\nopen-shell occupation.  This follows the approach of Duch\n\\cite{duchspinad} but is readily constructed from the detailed\ndescriptions of the coupling in the books of Pauncz (e.g., see from\npage 96 of \\cite{paunczsym}).\n\n\\section{Graphical representation of orbital occupations}\n\\label{orbitalgraph}\n\nOrbital occupations may be 0, 1, or 2 (empty, singly-, or\ndoubly-occupied) and are represented by walks on a 3-way graph\n\\cite{duchsga,duchfci}.  Since we are doing a full-CI we need all\npossible walks.  Figure \\ref{ograph} is an orbital graph for a full-CI\nwith 8-electrons in 8-orbitals without use of spatial symmetry.\nAgain, each node can be assigned a weight which is the sum of the\nweights of the nodes that connect to it from above.  The weight of the\nhead (top node) is 1 and the weight of the tail (bottom node) is the\nnumber of walks.\n\n\nThe lexical ordering of orbital walks is such that in traversing the\ngraph from bottom to top walks the rightmost arcs have lowest lexical\nweight (the first and last twenty four walks on the graph in Figure\n\\ref{orbitalgraph} are given in Table \\ref{owalks}).\n\n\\begin{figure}[htbp]\n\n\\center\n\n\\centerline{\\psfig{figure=orbitalgraph.eps,angle=270}}\n\\caption{\\label{ograph} Orbital occupation graph for a full-CI with 8\nelectrons in eight orbitals.}\n\\end{figure}\n\n\\begin{table}[htbp]\n\n\\center\n\n\\begin{tabular}{lc|lc}\n  Index  & Walk  & Index & Walk \\\\ \\hline\n   1 & 2 2 2 2 0 0 0 0   &1084 & 0 0 2 0 1 1 2 2 \\\\\n   2 & 2 2 2 1 1 0 0 0   &1085 & 1 0 0 1 1 1 2 2 \\\\\n   3 & 2 2 1 2 1 0 0 0   &1086 & 0 1 0 1 1 1 2 2 \\\\\n   4 & 2 1 2 2 1 0 0 0   &1087 & 0 0 1 1 1 1 2 2 \\\\\n   5 & 1 2 2 2 1 0 0 0   &1088 & 0 0 0 2 1 1 2 2 \\\\\n   6 & 2 2 2 0 2 0 0 0   &1089 & 1 0 0 0 2 1 2 2 \\\\\n   7 & 2 2 1 1 2 0 0 0   &1090 & 0 1 0 0 2 1 2 2 \\\\\n   8 & 2 1 2 1 2 0 0 0   &1091 & 0 0 1 0 2 1 2 2 \\\\\n   9 & 1 2 2 1 2 0 0 0   &1092 & 0 0 0 1 2 1 2 2 \\\\\n  10 & 2 2 0 2 2 0 0 0   &1093 & 2 0 0 0 0 2 2 2 \\\\\n  11 & 2 1 1 2 2 0 0 0   &1094 & 1 1 0 0 0 2 2 2 \\\\\n  12 & 1 2 1 2 2 0 0 0   &1095 & 0 2 0 0 0 2 2 2 \\\\\n  13 & 2 0 2 2 2 0 0 0   &1096 & 1 0 1 0 0 2 2 2 \\\\\n  14 & 1 1 2 2 2 0 0 0   &1097 & 0 1 1 0 0 2 2 2 \\\\\n  15 & 0 2 2 2 2 0 0 0   &1098 & 0 0 2 0 0 2 2 2 \\\\\n  16 & 2 2 2 1 0 1 0 0   &1099 & 1 0 0 1 0 2 2 2 \\\\\n  17 & 2 2 1 2 0 1 0 0   &1100 & 0 1 0 1 0 2 2 2 \\\\\n  18 & 2 1 2 2 0 1 0 0   &1101 & 0 0 1 1 0 2 2 2 \\\\\n  19 & 1 2 2 2 0 1 0 0   &1102 & 0 0 0 2 0 2 2 2 \\\\\n  20 & 2 2 2 0 1 1 0 0   &1103 & 1 0 0 0 1 2 2 2 \\\\\n  21 & 2 2 1 1 1 1 0 0   &1104 & 0 1 0 0 1 2 2 2 \\\\\n  22 & 2 1 2 1 1 1 0 0   &1105 & 0 0 1 0 1 2 2 2 \\\\\n  23 & 1 2 2 1 1 1 0 0   &1106 & 0 0 0 1 1 2 2 2 \\\\\n  24 & 2 2 0 2 1 1 0 0   &1107 & 0 0 0 0 2 2 2 2 \\\\ \\hline\n\\end{tabular}\n\n\\caption{\\label{owalks} The first and last twenty-four lexically\nordered walks on an 8-electron 8-orbital full-CI orbital occupation graph.}\n\\end{table}\n\nSpatial symmetry is in the code in a rudimentary, but useful, fashion.\nThe walks are ordered as if there is no symmetry (c.f., Table\n\\ref{owalks}) and the symmetry of each walk is simply computed as the\ndirect product of the symmetry of the singly-occupied orbitals\n(directly available from the routine \\verb+fci_owalk_info()+, Section\n\\ref{sec:fciowalkinfo}).  Only walks/occupations of the desired\nsymmetry are included in the CI vector (Section \\ref{sec:ciindex}).\nThis facilitates use of symmetry to reduce the storage required for\nthe CI vector, and also the computation of matrix elements for\nperturbation methods.  It also makes it easy to use the routines in\ninstances when you want to sum over all intermediate states regardless\nof symmetry.  However, the walks of a specific symmetry are not\ngrouped together and symmetry is not presently used to reduce the\nexpense of the CI eigenvalue problem.\n\nAn alternative approach, which I've used in other programs,\nis to modify the orbital graph by splitting each node so\nthat there is one for each irreducible representation.  The symmetry\nof an orbital must be taken into account when singly occupying it so\nthat the node of the correct occupation and symmetry is connected to\non the next level.  This was, I think, first introduced by Shavitt\n\\cite{shavittguga,shavittguga2} in the 4-way graph (or distinct row\ntable, DRT) of the graphical unitary group approach (GUGA).\n\n\\section{Indexing the CI vector}\n\\label{sec:ciindex}\n\nThe CI vector looks like a two-dimensional array, $C_{\\nu I}$ with the\noutermost index running over orbital occupations ($I$) in lexical\norder, and the innermost index ($\\nu$) over possible spin functions\nfor that orbital occupation, again in lexical order.  Since the number\nof spin functions varies with the number of singly occupied orbitals\nin $I$, the CI vector is stored as a one-dimensional vector with an\nindex vector of dimension the number of orbital walks to point to the\nbeginning of the coefficients for a given walk $I$ (see the routine\n\\verb+fci_owalk_info()+, Section \\ref{sec:fciowalkinfo}).  Note that\nonly coefficients of the correct symmetry are stored and therefore the\nindex into the CI vector is only meaningful for these orbital walks\nand care must be taken to ensure the correct symmetry before trying to\nuse an index into the CI vector.\n\nAn interesting variation would be to group together within the CI\nvector all orbital occupations with the same number of singly-occupied\norbitals.  Within each group the number of spin functions is now the\nsame and the CI vector may be treated as a two-dimensional array.\n\n\\section{More details on the graphical representations}\n\n\\subsection{Primitive spin graphs}\n\nPrimitive spin graphs are slightly easier since they have at most two\narcs from any node.  Nodes are labelled by the number of singly\noccupied orbitals ($s$) and the intermediate $S_z=m$.  The weight of a\nnode $d(s,m)=d^s_m$ is then\n\\begin{equation}\n d^s_m = d^{s-1}_{m-\\half} + d^{s-1}_{m+\\half} \\mbox{\\ with\\ } d^0_0 =\n1 \\label{spinnodeweight}\n\\end{equation}\nin which nodes with no connecting arcs have zero weight.\nThe lexical ordering of walks on a graph is established by assigning a\nweight to each arc on the graph.  The arcs weights are labelled as\nfollows\n\\begin{eqnarray}\n Y^{s-}_m & \\mbox{connects} & (s,m) \\rightarrow (s+1,m-\\half ) \\\\\n Y^{s+}_m & \\mbox{connects} & (s,m) \\rightarrow (s+1,m+\\half )\n\\end{eqnarray}\n\n\\begin{figure}[htbp]\n\n\\center\n\n\\centerline{\\psfig{figure=spinarcs.eps,angle=270}}\n\\caption{\\label{spinarcs} The two arcs coming into node $(s,m)$ on a\nprimtive spin graph, and their arc weights.}\n\\end{figure}\n  \n The weight ($w_{\\sigma}$) or lexical index of a walk\n($\\{\\sigma_j:j=1,s\\}$, c.f., Table \\ref{mwalks}) is just\n\\begin{equation}\n w_{\\sigma} = 1 + \\sum_{j=1}^{s} Y_{m_j}^{s_j \\sigma_j} \\label{spinwalkweight}\n\\end{equation}\nwhere $s_j$ and $m_j$ are the intermediate values of the number of\nelectrons and $S_z$ at nodes along the walk. \n\nAn arc is assigned a weight equal to the number of walks from\nthe current node that have lower index.  The standard lexical ordering\ncorresponds to walking from right to left with the upward arc (right\nto left!) being of lower index.  Thus, considering the two arcs going\nfrom right to left from node $(s,m)$ \n(see Figure \\ref{spinarcs}) the lexical ordering is\naccomplished by the following assignments\n\\begin{eqnarray}\n  Y^{(s-1)-}_{m+\\half} & = & 0 \\nonumber \\\\ \n  Y^{s+}_m & = & d_{s-1}^{m+\\half}  \\label{spinarcweights}\n\\end{eqnarray}\nFor computational convenience, an arc that does not exist is assigned\nzero weight.  There is no need for a primtive (or spin-adapted) spin\ngraph to have separate node and arc weight tables, however, the\ncurrent code does do this.  They are small so the additional memory is\nnot an issue.\n\n\\subsection{Orbital graphs}\n\nNodes on an orbital graph are labelled by the level ($l$), which\ncorresponds the orbital being occupied by arcs going down, and the\nnumber of electrons $n$.  When spatial symmetry is introduced there\nwill be an additional index for each irreducible representation.  The\nweight ($k^l_n = k(l,n)$) of each node is simply\n\\begin{equation}\n  k^l_n = k^{l-1}_{n-2} + k^{l-1}_{n-1} + k^{l-1}_n \\label{orbnodeweight}\n\\end{equation}\nwhere it is assumed that nodes with no connecting arcs have zero weight.\n\n\\begin{figure}[htbp]\n\n\\center\n\n\\centerline{\\psfig{figure=orbitalarcs.eps,angle=270}}\n\\caption{\\label{orbitalarcs} The three arcs, and their weights,\ncoming into node $(l,n)$ on an orbital occupation graph.}\n\\end{figure}\n\nThe three possible arcs descending from a node are (see Figure\n\\ref{orbitalarcs})\n\\begin{eqnarray}\n Z^{l,0}_{n} & \\mbox{connects} & (l,n) \\rightarrow (l+1,n) \\\\\n Z^{l,1}_{n} & \\mbox{connects} & (l,n) \\rightarrow (l+1,n+1) \\\\\n Z^{l,2}_{n} & \\mbox{connects} & (l,n) \\rightarrow (l+1,n+2)\n\\end{eqnarray}\nand again the weight ($w_z$) of an orbital walk ($\\{z: z_l,l=1,M\\}$, for\n$M$ orbitals, $z_l=0,1,2$) or occupation pattern, is simply\n\\begin{equation}\n  w_z = 1 + \\sum_{l=1}^{M} Z^{l,z_l}_{n_l} \\label{orbwalkweight}\n\\end{equation}\nwhere $n_l$ is the intermediate number of electrons at each node in\nthe walk.  Note that in the full-CI program the arcs $Z^{l,j}_n,\nj=0,1,2$ are actually indexed with $j=1,2,3$ for historical reasons.\n\nThe lexical ordering of orbital walks is such that in traversing the\ngraph from bottom to top walks the rightmost arcs have lowest lexical\nweight (the first and last twenty four walks on the graph in Figure\n\\ref{orbitalgraph} are given in Table \\ref{owalks}).\nThus, the weight of an upward bound arc should be equal to the number\nof possible walks that traverse other arcs from the same node that are\nto the right of the arc of interest.  Considering again the three arcs\ngoing up from node $(l,n)$ (Figure \\ref{orbitalarcs}) \n\\begin{equation}\n  Z^{l-1,j}_{n-j} = Z^{l-1,j-1}_{n-j+1} + k^{l-1}_{n-j+1} \\mbox{\\ with\\ }\n  Z^{l-1,0}_n = 0 \\label{orbarcweights}\n\\end{equation}\nwhere $k^{l-1}_{n-j+1}$ (Equation \\ref{orbnodeweight}) is the number of\nwalks coming down from node $(l-1,n-j+1)$.  Again, for computational\nconvenience, arcs and nodes that do not exist are assigned zero\nweight. \n\nAside: Multiple tails can be accomodated on the same graph by setting\nthe weight of $Z^{M,0}_n$ to be the sum of the weights of other tails\nto the right.\n\n\\subsection{Constructing the weights and walking the graphs}\n\nThe node weights are readily formed by traversing the graphs from head\nto tail (left to right for the spin graphs, top to bottom for the\norbital graphs) using the recursive formulae for the node weights\n(Equations \\ref{orbnodeweight} and \\ref{spinnodeweight}). \n\nThe arc weights are then determined by traversing the graphs from tail\nto head (right to left for the spin graphs, bottom to top for the\norbital graphs) using the recursive formulae for the arc weights\n(Equations \\ref{spinarcweights} and \\ref{orbarcweights}).\n\nGiven a walk on a graph (i.e., either a spin or orbital occupation\npattern) the lexical weight is readily computed from the arc weights\n(Equations \\ref{spinwalkweight} and \\ref{orbwalkweight}). This\nrequires $O(N)$ array references and integer additions (where $N$ is\nthe number of open shells or the number of orbitals for spin and\norbital graphs respectively).\n\nDetermining the occcupation from the lexical weight is only slightly\nharder.  Starting from the tail of the graph we accumulate the weight\nof a trial walk (initialized to 1), and at each node we take the\nhighest weight arc (i.e., the lowest spin arc, or the leftmost orbital\narc) that is consistent with the incremented walk weight being less\nthan or equal to the weight of the walk we are seeking.  This process\nrequires $O(N)$ comparisons as well as $O(N)$ array look-ups and\ninteger additions.\n\n\\section{Matrix elements of orbital replacement operators}\n\nIn the determinant basis it is easy to compute matrix elements of\nspin-dependent operators, however, I presently restrict attention to\nspin-adapted operators (e.g., $E_{ij}$) which act as spatial orbital\nreplacement operators.  By doing this the formalism for evaluating\nmatrix elements over both CSF and determinants is exactly the same (I\nthink it can be made the same even in the case of spin-dependent\noperators but only with an extended notation).\n\n\\begin{enumerate}\n\\item Note that an orbital replacement operator commutes with\npermutations that act on the electrons --- the labels are independent.\n\n\\item Let $\\hat{Q}$ be an orbital replacement operator and let $|K\\! >$\nand $|I\\! >$ be orbital configurations in standard order (Section\n\\ref{standardorder}) such that\n\\begin{eqnarray}\n  |K\\! > & = & Q |K^Q\\! > =  Q \\hat{Q} |I\\! > \\mbox{, or}\n\\label{qik1} \\\\\n  \\hat{Q} \\; |I \\! > & = & Q^{-1} |K \\! > \\label{qik}\n\\end{eqnarray}\nwhere $|K^Q\\! >$ is an orbital configuration in {\\em non-standard}\norder that is produced by the action of $\\hat{Q}$ on $|I\\! >$.  $Q$ is\nthe electronic permutation that returns $|K^Q\\! >$ to standard\noccupation order.  This is the line-up permutation (or the inverse of\nit depending on your perspective).\n\n\\item Recall that a determinant or CSF is written \n\\begin{equation}\n|I \\lambda\\! > = {\\cal A} \\; |I\\! > \\Theta_{\\lambda} \\label{csfdefn}\n\\end{equation}\n\n\\item Also recall these properties of the antisymmetrizer\n\\begin{eqnarray}\n {\\cal A} & = & \\frac{1}{\\sqrt{n!}} \\sum_P (-1)^P P \\\\\n          & = & {\\cal A}^{\\dagger} \\\\\n {\\cal A}^2 & = & \\sqrt{n!} {\\cal A} \\\\\n     PA & = & AP = (-1)^P A \\label{paap}\n\\end{eqnarray}\n\n\\item The action of $\\hat{Q}$ on a determinant or CSF is then formed\nas follows\n\\begin{eqnarray}\n  \\hat{Q} |I \\lambda\\! > \n  & = & \\hat{Q} \\; {\\cal A} \\; |I\\! > \\Theta_{\\lambda} \\mbox{, defined\nby \\ref{csfdefn}} \\\\\n  & = & {\\cal A} \\; \\hat{Q} \\; |I\\! > \\Theta_{\\lambda} \\mbox{, from\nindependence of orbital and electronic labels} \\\\\n  & = & {\\cal A} \\; \\left( \\hat{Q} \\; |I\\! > \\right) \\Theta_{\\lambda}\n\\mbox{, since only I contains orbital labels} \\\\\n  & = & {\\cal A} \\; \\left( Q^{-1} \\; |K\\! > \\right) \\Theta_{\\lambda} \n\\mbox{, using \\ref{qik}} \\\\\n  & = & \\left[ {\\cal A} \\; (-1)^Q Q \\right]  \\left( Q^{-1} \\; |K\\! >\n\\right) \\Theta_{\\lambda} \\mbox{, using \\ref{paap}} \\\\\n  & = & {\\cal A} \\; (- 1)^Q |K\\! > \\left( Q \\; \\Theta_{\\lambda} \\right) \n \\\\\n  & = & {\\cal A} \\; |K\\! > \\left(  (- 1)^Q  \\sum_{\\mu} \\Theta_{\\mu}\nU_{\\mu \\lambda}(Q) \\right)  \\\\\n  & = & (-1)^Q \\sum_{\\mu} |K \\mu\\! > U_{\\mu \\lambda}(Q)\n\\end{eqnarray}\nwhere $U_{\\mu \\lambda}(Q)$ is an element of the representation matrix\nof the permutation $Q$ in the spin-function basis.  The phase-factor\nmay also be included in $U$ in which case it is referred to as the\ncontra-gradient representation.\n\n\\item Using the above results we can readily obtain the value for the\nmatrix element\n\\begin{eqnarray}\n <\\! K\\nu | \\hat{Q} | I \\lambda\\! > & = & (-1)^Q \\sum_{\\mu}\n  <\\! K \\nu | K \\mu \\! > U_{\\mu \\lambda}(Q) \\label{lineupeqn} \\\\\n  & = & (-1)^Q U_{\\nu \\lambda}(Q) \n\\end{eqnarray}\nIn Equation \\ref{lineupeqn} only one term survives because of the\northogonality of the spatial orbitals and the chosen spin function\nbases (both primitive and spin adapted).\n\\end{enumerate}\n\nWhat line-up permutations ($Q$) are of interest?  Consider $\\hat{Q} =\nE_{ij}$ where orbital $j$ is singly occupied in $|I\\! >$ ($n_j^I = 0$)\nand orbital $i$ is unoccupied ($n_i^I=0$).  This simply replaces\norbital label $j$ with $i$.  Let $\\overline{i}$ and $\\overline{j}$ be\nthe correct standard position of orbitals $i$ and $j$ respectively\namoung the singly occupied orbitals (which should be occupied in\nincreasing order).  Furthermore, let us assume that $i < j$.  Then,\nthe permutation of the (singly occupied) electronic coordinates that\nrestores the correct ordering of the occupation is the cyclic\npermutation $(\\overline{i} \\ldots \\overline{j})$.  The situation for\n$j$ doubly occupied, or $i$ singly occupied is similar, but we defer\ndiscussion of this since additional simplifications are possible.\n\nA detailed example may help. Considering just the singly occupied\norbitals and with\n\\begin{equation}\n |I \\! > = \\phi_1(1) \\phi_3(2) \\phi_4(3) \\phi_5(4) \\phi_6(5)\n\\end{equation}\nthen, we see that \n\\begin{eqnarray}\n  E_{25} |I \\! >  & = & \\phi_1(1) \\phi_3(2) \\phi_4(3) \\phi_2(4)\n\\phi_6(6) \\\\\n & = & \\phi_1(1) \\phi_2(4) \\phi_3(2) \\phi_4(3) \\phi_6(5) \n\\end{eqnarray}\n(which is denoted $K^Q$ in Equation \\ref{qik1}).  But the standard\norder of occupation should be\n\\begin{equation}\n  |K \\! >  =  \\phi_1(1) \\phi_2(2) \\phi_3(3) \\phi_4(4) \\phi_6(5)\n\\end{equation}\nand the permutation of the {\\em electronic} labels that accomplishes\nthis is the cyclic permutation $(2 3 4) = (2 3)(3 4)$.  This maps\nelectron 2 into electron 3, electron 3 into electron 4, and electron 4\nback into electron 2.\n\\begin{equation}\n  (2 3 4) \\left[ \\phi_1(1) \\phi_2(4) \\phi_3(2) \\phi_4(3) \\phi_6(5) \n\\right] = \\phi_1(1) \\phi_2(2) \\phi_3(3) \\phi_4(4) \\phi_6(5)\n\\end{equation}\nThe correct position of orbital 5 amoung the singly occupied orbitals\nin $I$ is $\\overline{j}=4$ and that of orbital 2 is $\\overline{i}=2$.\n\n\\subsection{Computing matrix elements}\n\nIn the primitive spin or determinant basis, there will be just one\nnon-zero element in each row or column of the representation matrix\n($U_{\\mu \\lambda}(Q)$) for any permutation, whereas the representation\nmatrices for spin adpated bases will be rather dense.  This fact may\nbe exploited (Duch \\cite{duchspinad}) by just storing, in what Duch\nnamed Primitive Spin Function Transformation Tables, the index to which\neach primitive spin function transforms under the action of all cyclic\npermutations and the corresponding phase factor.\n\nFor small FCI calculations this is very effective and it is what was\nimplemented in the original code. However, larger calculations have\ntoo much data to hold since the number of entries is $5*(s+1)^2d^s_m$\nwhich becomes very large for more than 10 or 12 active orbitals (the\nfactor of 5 arises from the various occupation cases).  Duch\nrecommended various alternatives, but following Knowles and Werner\n\\cite{knowleseai}, and in the spirit of the $N-2$ particle subspace\nprojection of Zarrabian et al \\cite{zarrabian,harrison}, we can use the\nfollowing factorization\n\\begin{equation}\n E_{ij} = E_{ia}E_{aj}\n\\end{equation}\nwhere $a$ is a ficticious orbital of index higher than any other\norbital.  This is equivalent to factorizing the cyclic permutation as \n\\begin{equation}\n(\\overline{i} \\ldots \\overline{j}) = (\\overline{i} \\ldots s)(s \\ldots\n\\overline{j}) \\mbox{\\ for\\ } i < j\n\\end{equation}\nwhere, again, $s$ is the number of open shell electrons.  It is also\nakin to the action of an annihilation operator but rather than keeping\ntrack of the $s-1$ electron states we just put the electron into a\nfictitious orbital.  With this factorization there are only two\noccupation cases to consider (with a total of three entries) since $a$\nis always empty and there is a total of only $3(s+1)d^s_m$ entries to\nbe stored which is tractable for very large numbers of open shells.\n\nThe code constructs just the transformations associated with $<\\!\nK\\mu|Eaj|J\\nu\\! >$ for $n_j=1,2$.  This is done as follows, initially\nfor $n_j = 1$.\n\\begin{enumerate}\n\\item Loop thru primitive spin functions $\\nu$ for $s$ open shell\nelectrons and obtain the corresponding occupation pattern (by calling\n\\verb+fci_find_mocc+).\n\n\\item Loop thru $j=1,s$ corresponding to the cycles $(s \\ldots j)$ for\n$j=1,s$ and apply it to the occputation pattern.\n\n\\item Determine the lexical index of the generated occupation (by\ncalling \\verb+fci_find_mweight+).  Store this multiplied by the parity\nof the permutation in $T(\\nu,j,1)$.\n\\end{enumerate}\n\nFor $n_j=2$ the situation is only slightly more complex since we will\nobtain two $s+2$ electron occupations from breaking the alpha--beta pair.\n\\begin{enumerate}\n\\item Loop thru primitive spin functions $\\nu$ for $s$ open shell\nelectrons, and obtain the corresponding occupation pattern (by calling\n\\verb+fci_find_mocc+).\n\n\\item Loop thru $j=1,s+1$ corresponding to the position amoung the\nsingly occupied orbitals of the new orbital.\n\n\\item First excite the alpha spin electron by constructing an $s+2$\nelectron spin function by appending ``\\verb=+='' to the $s$ electron\nspin function $\\nu$ and inserting a ``\\verb=-='' immediately before\nposition $j$.  Determine the new $s+2$ lexical walk index and store\nit times the phase of the permutatation (the parity of $(j \\ldots\n1)(s+2 \\ldots 1)$ is $(-1)^{s+j}$) in $T^{s,2}_{\\nu,j}$.\n\n\\item Next excite the beta spin electron by constructing an $s+2$\nelectron spin function by appending ``\\verb=-='' to the $s$ electron\nspin function $\\nu$ and inserting a ``\\verb=+='' immediately before\nposition $j$.  Determine the new $s+2$ electron walk index and store\nit with the negative of the previous parity (since we swapped the\nfirst two electrons and the actual permutation is $(j \\ldots\n1)(s+2 \\ldots 1)(1 2)$) in $T^{s,3}_{\\nu,j}$.\n\\end{enumerate}\n\nFinally, some logic is eliminated from the inner loop if instead of\nstoring the phase directly in the table as recommended by Duch\n\\cite{duchspinad}, we store it separately.  This does not require a\nlot of memory since it is independent of the spin function index.  \n\n\\section{Density matrix operators}\n\nArbitrary-rank density matrix operators are very readily constructed\nfrom the $E_{ai}$ operators \\cite{knowleseai} since\n\\begin{equation}\n E_{pq,rs,tu,\\ldots} =\nE_{pa}E_{rb}E_{tc}\\ldots E_{cu}E_{bs}E_{aq}\n\\end{equation}\nwhere the fictitious orbitals are regarded as being ordered\n$\\cdots>c>b>a$.  This looks very much like the standard normal ordered\nform of the operator in terms of annihilation/creation operators.  In\napplying this expression in practice the following factorization has\nseveral important properties in a determinant basis (with implied\nsummation over the repeated indices)\n\\begin{equation}\n < \\! J\\nu |E_{pq,rs,tu,\\ldots}| I \\omega \\! > = \n < \\! J\\nu |E_{pa}E_{rb}E_{tc}\\ldots |N\\mu \\! >\n < \\! N\\mu |\\ldots E_{cu}E_{bs}E_{aq}|I\\omega \\! > \\\\\n\\end{equation}\n\\begin{enumerate}\n\\item If the operators $E_{aq}$ etc. act only on open-shell electrons\nthen the number of open-shell electrons is unchanged, and the mapping\nfrom $\\omega$ to $\\mu$ is  one-to-one and dense (a permutation).\n\\item If the operators $E_{aq}$ etc. break a spin pair then the number\nof electrons is increased by two and the mapping from $\\omega$ to\n$\\mu$ is one-to-two.  There is some sparsity (less than 50\\% for\nsinglets) in the increased space since some spin couplings cannot be\ngenerated from the broken spin pair. For instance, examination of\nFigure \\ref{mgraph} shows that six open-shell electrons give rise to\n20 determinants, which if a closed-shell spin pair is broken, can only\ngive rise to 40 determinants.  However, there are 70 determinants for\n8 open shells.\n\\end{enumerate}\n\nThe coupling coefficient generation routines then work in a very\nstraightforward fashion, working from the outside to the middle, and\nthen multiplying the two halves together.  Each application of an\noperator ($E_{aq}$) results in a mapping from the spin functions in\nthe input (ket) to those in the output (bra) indices and some\nassociated phases.  These are specified by the occupation of the\norbital that is having an electron removed ($q$ in this instance), and\nby the position of this orbital in the standard ordering of singly\noccupied orbitals (if this is orbital $q$ its position amoung the\nsingly occupied is referred to as $\\overline{q}$ or \\verb+qbar+).  So\nsome book keeping is necessary to keep track of this information.  The\nroutines are heavily commented and coded in a stylized fashion so they\nshould be self-explanatory.\n\n\\section{Application Program Interface --- API}\n\nThe following routines will be augmented so that they provide access\nto all of the necessary information to compute matrix elements,\nmanipulate walks on the orbital and spin graphs, and convert between\ndeterminant and CSF bases. \n\nObviously, an application that needs FCI information in its innermost\nloop may need to access that information directly from the FCI common\nblocks for reason of efficiency.  However, since the common blocks\nwill need to change in order to accomodate orbital symmetry and\nmodification of the algorithm to compute the coupling coefficients, it\nis strongly recommended that the API be used (or extended) wherever\npossible.\n\n\\subsection{Setting-up and solving a full-CI}\n\n\\subsubsection{{\\tt fci\\_setup}}\n\n\\begin{verbatim}\n  subroutine fci_setup(multiplicity, nactive, nelectrons,\n &     orbsyms, symstate,\n &     norbitalconfig, ndeterminants, nconfigurations,\n &     norbconfignosym)\n  integer multiplicity      ! [input] Spin multiplicity\n  integer nactive           ! [input] No. of active orbitals\n  integer nelectrons        ! [input] No. of active electrons\n  integer orbsyms(nactive)  ! [input] Symmetry of orbitals (1...8)\n  integer symstate          ! [input] Desired symmetry of state\n  integer norbitalconfig    ! [output] No. of orb. conf. WITH symmetry\n  integer ndeterminants     ! [output] No. of determinants in FCI\n  integer nconfigurations   ! [output] No. of configurations in FCI\n  integer norbconfignosym   ! [output] No. of orb. conf. WITHOUT symmetry\n\\end{verbatim}\nThis routine must be called before anythine else to initialize the\ninternal FCI data structures.  The determinant CI vector using\nsymmetry will be of length \\verb+ndeterminants+ (equivalent to\n\\verb+nconfigurations+ CSF).\n\n\\subsubsection{{\\tt fci\\_solve}}\n\\label{sec:fcisolve}\n\\begin{verbatim}\n   subroutine fci_solvenew(nroot, thresh, maxvec, ecore, h, g, \n  &     work, lenwrk, roots, evecfilename, diagfilename)\n   integer nroot             ! [input] No. of roots to find\n   double precision thresh   ! [input] Threshold for residual norm\n   integer maxvec            ! [input] Davidson subspace dim PER ROOT\n   double precision ecore    ! [input] Nuclear repulsion+frozen core\n   double precision h(nacttr) ! [input] h(ij) = h_{ij}\n   double precision g(nacttr,nacttr) ! [input] g(ij,kl) = (ij|kl)\n   integer lenwrk            ! [input] Size of work space\n   double precision work(lenwrk) ! [scratch] Work space\n   double precision roots(nroot) ! [output] Returns the eigenvalues\n   character*(*) evecfilename  ! [input] Name of file for eigen vectors\n   character*(*) diagfilename  ! [input] Name of file for diagonals\n\\end{verbatim}\n\nSolve the CI to the requested accuracy.  Currently uses determinants\nbut is readily extended to also accomodate CSF.  The eigenvalues are\nreturned in \\verb+roots+.  The eigenvectors are returned in file\n\\verb+evecfilename+, and the diagonal elements of the Hamiltonian are\nreturned in \\verb+diagfilename+.  The eigenvectors and diagonal\nelements may be read using the routine \\verb+fci_readvectors()+\n(Section \\ref{sec:fcireadvectors}).\n\nThe input integrals are stored as\n\\verb+h(ij)+=$h_{ij}$ and \\verb+g(ij,kl)=$(ij|kl)$, with $i \\geq j$,\n$k \\geq l$, \\verb+ij+=$i(i-1)/2$, and \\verb+kl+=$k(k-1)/2+l$.  Have a\nlook at \\verb+fci_load.F+ to see how an ASCII list of integrals are\nread in an inserted into these arrays in the test program.\n\nThe minimum amount of workspace required (\\verb+lenwrk+)is independent\nof the number of roots, and must exceed 2*\\verb+ndeterminants+.  The\nmore memory the better, but 2*\\verb+ndeterminants++500000 will\nprobably always be enough.\n\nAlso, there is currently no possibility of restart, and the lowest\ndiagonal guess is always used.\n\n\\subsubsection{{\\tt fci\\_readvectors}}\n\\label{sec:fcireadvectors}\n\\begin{verbatim}\n  subroutine fci_readevectors(ndets, nvec, v, filename)\n  integer ndets             ! [input] Vector length\n  integer nvec             ! [input] No. \n  double precision v(ndets,nvec)\n  character*(*) filename\n\\end{verbatim}\n\nThe FCI package uses word-addressable random access files that cannot\nbe accessed using standard Fortran I/O operations.  This routine\nenables the eigen-vectors and diagonal elements to be read from disk\nby specifying the appropriate filename after \\verb+fci_solve()+ has\nsucessfully completed.  To read the eigenvectors, specify \\verb+nvec+\nas \\verb+nroot+.  To read the diagonal elements, specify \\verb+nvec+\nas one.\n\n\\subsection{Inquiring about occupations and dimensions}\n\n\\subsubsection{{\\tt fci\\_ofind\\_occ}}\n\\begin{verbatim}\n   subroutine fci_ofind_occ(iwalk,iocc)\nc  \nc  find the orbital occupation of walk with lexical index iwalk\nc     \n   integer iwalk             ! [input]\n   integer nel               ! [input]\n   integer iocc(*)           ! [output]\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_ofind\\_weight}}\n\\begin{verbatim}\n   subroutine fci_ofind_weight(iwalk,iocc)\n   implicit none\nc     \nc  find the lexical index of a path on the orbital graph\nc     \n   integer iwalk             ! [output]\n   integer iocc(*)           ! [input]\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_mfind\\_occ}}\n\\begin{verbatim}\n   subroutine fci_mfind_occ(iwalk,iocc,ns)\nc     \nc  given the lexical index of a path on a primitive spin graph\nc  for ns electrons and multi=2sz+1, return the spin occupation\nc     \n   integer iwalk             ! [input]\n   integer iocc(*)           ! [output]\n   integer ns                ! [input]\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_mfind\\_weight}}\n\n\\begin{verbatim}\n   subroutine fci_mfind_weight(iwalk,iocc,ns)\n   implicit none\nc     \nc  find the lexical index of a path on a primitive spin graph\nc  for ns electrons and multi=2sz+1, given the spin occupation\nc     \n   integer iwalk             ! [output]\n   integer iocc(*)           ! [input]\n   integer ns                ! [input]\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_num\\_dets}}\n\\label{sec:fcinumdets}\n\\begin{verbatim}\n   integer function fci_num_dets(ns)\nc\nc  return the number of determinants for ns open shell electrons\nc  assuming that ns is a valid no. of open shell electrons for\nc  the given FCI space and spin multiplicity\nc\n   integer ns                ! [input]\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_num\\_csf}}\n\\begin{verbatim}\n   integer function fci_num_dets(ns)\nc\nc  return the number of configurations for ns open shell electrons\nc  assuming that ns is a valid no. of open shell electrons for\nc  the given FCI space and spin multiplicity\nc\n   integer ns                ! [input]\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_num\\_owalks}}\n\\begin{verbatim}\n  integer function fci_num_owalks()\nc\nc Returns the number of orbital occupation walks in the FCI\nc ignoring symmetry.\nc\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_ndets}}\n\\begin{verbatim}\n  integer function fci_ndets()\nc\nc Returns the total number of determinants in the FCI\nc (with use of symmetry)\nc\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_ncsf}}\n\\begin{verbatim}\n  integer function fci_ncsf()\nc\nc Returns the total number of spin-adapted configurations in the FCI\nc (with use of symmetry)\nc\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_max\\_num\\_dets}}\n\\begin{verbatim}\n  integer function fci_max_num_dets()\nc\nc Returns the maximum number of determinants associated\nc with any orbital configuration in the full CI.\nc\nc [Note that occupations K that arise as a result of\nc .factorizations such as <I|Eij|J>=<I|Eia|K><K|Eaj|J>\nc .where a is a ficitious orbital, may have more open shells.  \nc .However, these are only relevant in the internals of the \nc .coupling coefficient generation routines]\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_owalk\\_info}}\n\\label{sec:fciowalkinfo}\n\\begin{verbatim}\n  subroutine fci_owalk_info(owalk, iocc, ns, ioff, numdet, sym)\nc     \nc Given the index of an orbital walk return the occupation, the \nc offset in the CI determinant vector, the number of open shells,\nc the corresponding number of determinants, and the symmetry of \nc the occupation.  \nc  \nc The CI coefficients for this orbital occupation are addressed\nc as C(ioff+i) i=1,...,numdet.\nc     \nc This routine bundles the function of several other routines\nc as a convenience.\nc     \n  integer owalk        ! [input]  Index of orbital occupation\n  integer iocc(*)      ! [output] The orbital occupation pattern\n  integer ns           ! [output] No. of open shells\n  integer ioff         ! [output] Offset into CI vector\n  integer numdet       ! [output] No. of determinants for this ns\n  integer sym          ! [output] Symmetry 0...7\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_det\\_to\\_walk}}\n\\begin{verbatim}\n   subroutine fci_det_to_walk(idet, owalk, mwalk)\nc\nc  Given the index of a determinant, idet, return the\nc  corresponding lexical weights of orbital and primitive\nc  spin functions.  Without having an index vector the\nc  length of the CI expansion the only way to do this\nc  is with a binary search, so this operation costs \nc  about log2(ndets).\nc\n   integer idet    ! [input] Index into determinant CI vector\n   integer owalk   ! [output] Corresponding orbital index\n   integer mwalk   ! [output] Corresponding primitive spin function index\n\\end{verbatim}\n\n\\subsection{Transforming between CSF and determinats, and spin adaption}\n\n\\subsubsection{{\\tt fci\\_spin\\_adapt}}\n\\label{spinad1}\n\\begin{verbatim}\n   subroutine fci_spin_adapt(ns, direction, det, csf)\nc     \nc  Given a set of coefficients of either determinants or CSF\nc  corresponding to a single orbital occupation with ns open shells,\nc  then do the following\nc     \nc  if (direction == 1)\nc  ... project from determinants to CSF with multiplicity multi (fci_setup)\nc  ... if there is spin contamination norm will not be conserved\nc  else if (direction == 2)\nc  ... project from CSF with multiplicity multi to determinants\nc  ... norm should be conserved\nc  else\nc  ... invalid value for direction\nc  endif\nc     \n   integer ns                ! [input] No. of open shells\n   integer direction         ! [input] 1=det to csf, 2=csf to det\n   double precision det(*)   ! [in/out] coefficients of determinants\n   double precision csf(*)   ! [in/out] coefficients of csf\n\\end{verbatim}\n\nThe following related routine \\verb+fci_spin_adapt_nvec()+ can\ntransform multiple vectors (with the same number of open shells) at\nonce, which is much more efficient.\n\n\\subsubsection{{\\tt fci\\_spin\\_adapt\\_nvec}}\n\\begin{verbatim}\n  subroutine fci_spin_adapt_nvec\n &     (ns, direction, det, ldd, csf, ldc, nvec)\nc     \nc Given NVEC sets of coefficients of either determinants or CSF\nc corresponding to a single orbital occupation with ns open shells,\nc then do the following\nc   \nc if (direction == 1)\nc ... project from determinants to CSF with multiplicity multi (fci_init)\nc ... if there is spin contamination norm will not be conserved\nc else if (direction == 2)\nc ... project from CSF with multiplicity multi to determinants\nc ... norm should be conserved\nc else\nc ... invalid value for direction\nc endif\nc     \n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_spin\\_force}}\n\\begin{verbatim}\n   subroutine fci_spin_force(c)\nc  \nc  Force determinant CI vector to be spin adapted by projecting\nc  to and from the CSF space.  Also, renormalizes.\nc     \n   double precision c(ndets) ! [in/out] Determinant CI vector\n\\end{verbatim}\n\n\\subsection{Coupling coefficients}\n\n\\subsubsection{{\\tt fci\\_couple1}}\n\n\\begin{verbatim}\n   subroutine fci_couple1(vec, nvec, p, iocc, idim, \n  &     numq, qlist, epq)\nc  \nc  Compute <V|Epq|Iw> for given CI vectors V, fixed \nc  orbital p, fixed orbital occupancy I (iocc), and all orbitals q\nc  and primitive spin functions w.\nc  \nc  numq returns the number of orbitals q giving a nonzero interaction\nc  \nc  qlist(1...numq) contains the values of q\nc  \nc  epq(1...idim,1...nvec,1...numq) contains the coupling coeffcients\nc  \n   integer nvec              ! [input] No. of vectors on the left hand side\n   double precision vec(ndets,nvec) ! [input] The CI vectors\n   integer p                 ! [input] Fixed label on Epq\n   integer iocc(nactiv)      ! [input] Orbital occupation of I\n   integer idim              ! [input] No. of spin functions for I\n   integer numq              ! [output] Returns the number of q\n   integer qlist(*)          ! [output] Returns the list of interacting q\n   double precision epq(idim,nvec,*) ! [output] epq(w,i,q) = <Vi|Epq|Iw>\n\\end{verbatim}\n% & \n\n\\subsubsection{{\\tt fci\\_couple2}}\n\\begin{verbatim}\n   subroutine fci_couple2(vec, nvec, p, r, iocc, idim, \n  &     numqs, qslist, epqrs)\nc  \nc  Compute <V|Epq,rs|Iw> for given CI vectors V, fixed orbitals\nc  p and r, fixed orbital occupancy I (iocc), and all orbitals q and s,\nc  and primitive spin functions w.\nc\nc  The constraint (pq) >= (rs) is applied, so we loop over all q but\nc  restrict the s loop.  If couple2 is called with p>=r then all unique\nc  coeffs are generated.\nc\nc  numqs returns the number of orbitals q, s giving a nonzero interaction\nc  \nc  qslist(1, 1...numqs) contains the values of q\nc  qslist(2, 1...numqs) contains the values of s\nc  \nc  epqrs(1...idim,1...nvec,1...numqs) contains the coupling coeffcients\nc  \n   integer nvec              ! [input] No. of vectors on the left hand side\n   double precision vec(ndets,nvec) ! [input] The CI vectors\n   integer p, r              ! [input] Fixed labels on Epq,rs\n   integer iocc(nactiv)      ! [input] Orbital occupation of I\n   integer idim              ! [input] No. of spin functions for I\n   integer numqs             ! [output] Returns the number of q, s\n   integer qslist(2,*)       ! [output] Returns the list of interacting q,s\n   double precision epqrs(idim,nvec,*) ! [output] epq(w,i,q) = <Vi|Epqrs|Iw>\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_couple3}}\n\\begin{verbatim}\n   subroutine fci_couple3(vec, nvec, p, q, r, t, iocc, idim, \n  &     numsu, sulist, epqrstu)\nc  \nc  Compute <V|Epq,rs,tu|Iw> for given CI vectors V, fixed orbitals\nc  p,q,r,t and fixed orbital occupancy I (iocc), and all orbitals s,u\nc  and primitive spin functions w.\nc\nc  Constrain the loops over s and u so that (pq)>=(rs)>=(tu).  If the\nc  calling program externally constrains p>=r>=t (all q) then all\nc  unique coupling coefficients will be generated.\nc  \nc  numsu returns the number of orbitals s,u giving a nonzero interaction\nc  \nc  sulist(1, 1...numsu) contains the values of s\nc  sulist(2, 1...numsu) contains the values of u\nc  \nc  epqrstu(1...idim,1...nvec,1...numsu) contains the coupling coeffcients\nc  \n   integer nvec              ! [input] No. of vectors on the left hand side\n   double precision vec(ndets,nvec) ! [input] The CI vectors\n   integer p, q, r, t        ! [input] Fixed labels on Epq,rs,tu\n   integer iocc(nactiv)      ! [input] Orbital occupation of I\n   integer idim              ! [input] No. of spin functions for I\n   integer numsu             ! [output] Returns the number of s,u\n   integer sulist(2,*)       ! [output] Returns the list of interacting s,u\n   double precision epqrstu(idim,nvec,*) ! [output] <Vi|Epqrstu|Iw>\n\\end{verbatim}\n\n\n\\subsection{Miscellaneous}\n\n\\subsubsection{{\\tt fci\\_onepdm}}\n\\begin{verbatim}\n   subroutine fci_onepdm(vec, nvec, onepdm)\nc  \nc  Compute the 1-particle density matrices\nc  \nc  onepdm(p,q,ivec) returns <V(ivec)|Epq|V(ivec)>\nc  \n   integer nvec              ! [input] No. of vectors\n   double precision vec(ndets, nvec) ! [input] The CI vectors\n   double precision onepdm(nactiv,nactiv,nvec) ! [output] 1 PDMs\n\\end{verbatim}\n\nThe program checks the 1-PDMs for symmetry and the correct trace and\nwill abort if an error is detected.\n\nThe two-particle density matrix can also be generated with a small\nmodification to this routine.\n\n\\subsubsection{{\\tt fci\\_hv}}\n\\begin{verbatim}\n  subroutine fci_hv(ecore, h, g, work, lenwrk, v, s)\nc\nc Compute the Hamiltonian matrix-vector product s = Hv \nc\n  double precision ecore    ! [input] Frozen-core+nuclear replusion energy\n  double precision h(nacttr) ! [input] Effective 1-e integrals Core+T+V\n  double precision g(nacttr,nacttr) ! [input] Two-electron integrals\n  integer lenwrk            ! [input] Size of workspace\n  double precision work(lenwrk) ! [scratch] Workspace - the more the better\n  double precision v(ndets) ! [input] CI vector\n  double precision s(ndets) ! [output] s = H*v\n\\end{verbatim}\n\nThe Davidson diagonalizer calls this routine so it should be reliable.\n\n\\subsubsection{{\\tt fci\\_hami}}\n\\begin{verbatim}\n   subroutine fci_hami(hamil, ecore, h, g, work, lenwork)\nc\nc  Simple wrapper routine to build the full triangular Hamiltonian\nc  in the determinant basis from the one- and two-electron integrals\nc\n   double precision hamil(*) ! [output] Returns triangle of Hamiltonian\n   double precision ecore    ! [input] Frozen core + nuclear replulsion\n   double precision h(nacttr) ! [input] Triangle of 1-e integrals\n   double precision g(nacttr,nacttr) ! [input] 2-e integrals\n   integer lenwork           ! [input]\n   double precision work(lenwork) ! [scratch]\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_diags}}\n\\begin{verbatim}\n  subroutine fci_diags(hd,ecore,h,g,ionel,nonemx,kpt,mkpt)\nc     \nc     construct the diagonals of the hamiltonian \nc     \n  double precision hd(ndets) ! [output] The diagonals\n  double precision ecore    ! [input] Nuclear repulsion + frozen core\n  double precision h(nacttr) ! [input] 1-e integrals\n  double precision g(nacttr,nacttr) ! [input] 2-e integrals\n  integer nonemx            ! [input] dimension of ionel\n  integer ionel(5,nonemx)   ! [scratch] workspace for coupling coeff\n  integer kpt(nonemx)       ! [scratch] workspace\n  integer mkpt(ndetmx+1)    ! [scratch] workspace\n\\end{verbatim}\nThis is an internal interface to compute the diagonal elements on\ndemand.  It would be easy to provide an easy to use wrapper for this\n(see usage in \\verb+fci_solve.F+) but since \\verb+fci_solve+ (Section\n\\ref{sec:fcisolve}) already writes the diagonals to disk there is\nnot much point in using this routine elsewhere.\n\n\\subsubsection{{\\tt fci\\_prspnad}}\n\\begin{verbatim}\n  subroutine fci_prspnad(ns)\n  integer ns                ! [input]\nc\nc     Print the spin-adaption coefficents for ns open shells\nc\n\\end{verbatim}\n\n\\subsubsection{{\\tt fci\\_tprint}}\n\n\\begin{verbatim}\n  subroutine fci_tprint()\n\\end{verbatim}\n\nThis routine prints timing information to FORTRAN unit 6.  If a\nroutine is called more that $10^5$ times then to avoid too much system\ncall overhead the timing is automatically disabled and the time\nreported as zero.  The number of calls is still accumulated.\n\n\\subsubsection{{\\tt fci\\_err}}\n\\begin{verbatim}\n  subroutine fci_err(string, code)\n  character*(*) string    ! [input]\n  integer code            ! [input]\n\\end{verbatim}\n\nAll errors in the full-CI code are reported through this routine.\nPut any additional error handling into this routine.\n\n\\begin{thebibliography}{99}\n\n\\addcontentsline{toc}{section}{References}\n\n% \\journal{label}{authors}{journal}{volume}{year}{page}\n\n% \\book{label}{authors}{title}{publisher}{year}\n\n\\book{pauncz}{R. Pauncz}{Spin functions: Construction and use}{Plenum,\nNew York}{1979}\n\n\\book{paunczsym}{R. Pauncz}{The Symmetric Group in Quantum\nChemistry}{CRC Press, Inc., Boca Raton, Florida, USA}{1995}\n\n\\journal{handyfci}{P. Saxe, D.J. Fox, H.F. Schaefer III and\nN.C. Handy}{J. Chem. Phys.}{74}{1982}{5584}\n\n\\journal{knowleseai}{P.J. Knowles and H-J. Werner}{Chem. Phys. Lett.}{145}{1988}{514}\n\n\\journal{duchug}{W. Duch}{Int. J. Quant. Chem.}{27}{1985}{59}\n\n\\journal{duchspinad}{W. Duch}{Int. J. Quant. Chem.}{30}{1986}{799}\n\n\\journal{duchcouple}{W. Duch}{Chem. Phys. Lett.}{124}{1986}{442}\n\n\\journal{duchfci}{W. Duch}{Intern. J. Quant. Chem}{S24}{1990}{683}\n\n\\journal{duchsga}{W. Duch and\nJ. Karwowski}{Comp. Phys. Rep.}{2}{1985}{92}\n\n\\journal{paldusguga}{J. Paldus}{Phys. Rev. A}{14}{1976}{1620}\n\n\\journal{shavittguga}{I. Shavitt}{Int. J. Quant. Chem. Symp.}{11}{1977}{131}\n\n\\journal{shavittguga2}{I. Shavitt}{Int. J. Quant. Chem. Symp.}{12}{1978}{5}\n\n\\journal{saunders}{V.R. Saunders and J.H. van Lenthe}{Mol. Phys.}{48}{1983}{923}\n\n\\journal{zarrabian}{S. Zarrabian, C.R. Sarma and J. Paldus}{Chem. Phys. Lett.}{155}{1989}{183}\n\n\\journal{harrison}{R.J. Harrison and S. Zarrabian}{Chem. Phys. Lett.}{158}{1989}{393}\n\n\\book{kotani}{M. Kotani, A. Amemiya, E. Ishiguro and T. Kimura}{Tables\nof Molecular Integrals}{Maruzen, Co., Tokyo}{1955}\n\n\\end{thebibliography}\n\n\\end{document}\n\n\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/matrixelements.toc",
    "content": "\\contentsline {section}{\\numberline {1}Introduction}{4}\n\\contentsline {section}{\\numberline {2}Determinant bases}{4}\n\\contentsline {section}{\\numberline {3}Graphical representation of primitive spin functions}{7}\n\\contentsline {section}{\\numberline {4}Graphical representation of CSF bases}{9}\n\\contentsline {section}{\\numberline {5}Graphical representation of orbital occupations}{12}\n\\contentsline {section}{\\numberline {6}Indexing the CI vector}{15}\n\\contentsline {section}{\\numberline {7}More details on the graphical representations}{15}\n\\contentsline {subsection}{\\numberline {7.1}Primitive spin graphs}{15}\n\\contentsline {subsection}{\\numberline {7.2}Orbital graphs}{17}\n\\contentsline {subsection}{\\numberline {7.3}Constructing the weights and walking the graphs}{18}\n\\contentsline {section}{\\numberline {8}Matrix elements of orbital replacement operators}{19}\n\\contentsline {subsection}{\\numberline {8.1}Computing matrix elements}{21}\n\\contentsline {section}{\\numberline {9}Density matrix operators}{23}\n\\contentsline {section}{\\numberline {10}Application Program Interface --- API}{24}\n\\contentsline {subsection}{\\numberline {10.1}Setting-up and solving a full-CI}{25}\n\\contentsline {subsubsection}{\\numberline {10.1.1}{\\tt fci\\_setup}}{25}\n\\contentsline {subsubsection}{\\numberline {10.1.2}{\\tt fci\\_solve}}{25}\n\\contentsline {subsubsection}{\\numberline {10.1.3}{\\tt fci\\_readvectors}}{26}\n\\contentsline {subsection}{\\numberline {10.2}Inquiring about occupations and dimensions}{26}\n\\contentsline {subsubsection}{\\numberline {10.2.1}{\\tt fci\\_ofind\\_occ}}{26}\n\\contentsline {subsubsection}{\\numberline {10.2.2}{\\tt fci\\_ofind\\_weight}}{27}\n\\contentsline {subsubsection}{\\numberline {10.2.3}{\\tt fci\\_mfind\\_occ}}{27}\n\\contentsline {subsubsection}{\\numberline {10.2.4}{\\tt fci\\_mfind\\_weight}}{27}\n\\contentsline {subsubsection}{\\numberline {10.2.5}{\\tt fci\\_num\\_dets}}{28}\n\\contentsline {subsubsection}{\\numberline {10.2.6}{\\tt fci\\_num\\_csf}}{28}\n\\contentsline {subsubsection}{\\numberline {10.2.7}{\\tt fci\\_num\\_owalks}}{28}\n\\contentsline {subsubsection}{\\numberline {10.2.8}{\\tt fci\\_ndets}}{28}\n\\contentsline {subsubsection}{\\numberline {10.2.9}{\\tt fci\\_ncsf}}{29}\n\\contentsline {subsubsection}{\\numberline {10.2.10}{\\tt fci\\_max\\_num\\_dets}}{29}\n\\contentsline {subsubsection}{\\numberline {10.2.11}{\\tt fci\\_owalk\\_info}}{29}\n\\contentsline {subsubsection}{\\numberline {10.2.12}{\\tt fci\\_det\\_to\\_walk}}{30}\n\\contentsline {subsection}{\\numberline {10.3}Transforming between CSF and determinats, and spin adaption}{30}\n\\contentsline {subsubsection}{\\numberline {10.3.1}{\\tt fci\\_spin\\_adapt}}{30}\n\\contentsline {subsubsection}{\\numberline {10.3.2}{\\tt fci\\_spin\\_adapt\\_nvec}}{31}\n\\contentsline {subsubsection}{\\numberline {10.3.3}{\\tt fci\\_spin\\_force}}{31}\n\\contentsline {subsection}{\\numberline {10.4}Coupling coefficients}{32}\n\\contentsline {subsubsection}{\\numberline {10.4.1}{\\tt fci\\_couple1}}{32}\n\\contentsline {subsubsection}{\\numberline {10.4.2}{\\tt fci\\_couple2}}{32}\n\\contentsline {subsubsection}{\\numberline {10.4.3}{\\tt fci\\_couple3}}{33}\n\\contentsline {subsection}{\\numberline {10.5}Miscellaneous}{34}\n\\contentsline {subsubsection}{\\numberline {10.5.1}{\\tt fci\\_onepdm}}{34}\n\\contentsline {subsubsection}{\\numberline {10.5.2}{\\tt fci\\_hv}}{34}\n\\contentsline {subsubsection}{\\numberline {10.5.3}{\\tt fci\\_hami}}{35}\n\\contentsline {subsubsection}{\\numberline {10.5.4}{\\tt fci\\_diags}}{35}\n\\contentsline {subsubsection}{\\numberline {10.5.5}{\\tt fci\\_prspnad}}{36}\n\\contentsline {subsubsection}{\\numberline {10.5.6}{\\tt fci\\_tprint}}{36}\n\\contentsline {subsubsection}{\\numberline {10.5.7}{\\tt fci\\_err}}{36}\n\\contentsline {section}{References}{36}\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/mspingraph.eps",
    "content": "%!PS-Adobe-2.0 EPSF\n%%Title: /tmp/xfig-fig009186\n%%Creator: fig2dev\n%%CreationDate: Tue Nov 26 18:17:07 1996\n%%For: d3g681@hpcc1 (Robert J Harrison)\n%%BoundingBox: 0 0 303 351\n%%Pages: 0\n%%EndComments\n/$F2psDict 200 dict def \n$F2psDict begin\n$F2psDict /mtrx matrix put\n/l {lineto} bind def\n/m {moveto} bind def\n/s {stroke} bind def\n/n {newpath} bind def\n/gs {gsave} bind def\n/gr {grestore} bind def\n/clp {closepath} bind def\n/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul\n4 -2 roll mul setrgbcolor} bind def\n/col-1 {} def\n/col0 {0 0 0 setrgbcolor} bind def\n/col1 {0 0 1 setrgbcolor} bind def\n/col2 {0 1 0 setrgbcolor} bind def\n/col3 {0 1 1 setrgbcolor} bind def\n/col4 {1 0 0 setrgbcolor} bind def\n/col5 {1 0 1 setrgbcolor} bind def\n/col6 {1 1 0 setrgbcolor} bind def\n/col7 {1 1 1 setrgbcolor} bind def\n\tend\n/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def\n/$F2psEnd {$F2psEnteredState restore end} def\n%%EndProlog\n\n$F2psBegin\n0 setlinecap 0 setlinejoin\n-8.0 -7.0 translate 90 rotate 0.900 -0.900 scale\n0.500 setlinewidth\n% Polyline\nn 62 182 m 382 182 l gs col-1 s gr\n% Polyline\nn 62 182 m 222 22 l gs col-1 s gr\n% Polyline\nn 142 182 m 262 62 l gs col-1 s gr\n% Polyline\nn 222 22 m 382 182 l gs col-1 s gr\n% Polyline\nn 222 182 m 302 102 l gs col-1 s gr\n% Polyline\nn 302 182 m 342 142 l gs col-1 s gr\n% Polyline\nn 182 62 m 302 182 l gs col-1 s gr\n% Polyline\nn 142 102 m 222 182 l gs col-1 s gr\n% Polyline\nn 102 142 m 142 182 l gs col-1 s gr\n% Polyline\nn 382 182 m 222 342 l gs col-1 s gr\n% Polyline\nn 302 182 m 182 302 l gs col-1 s gr\n% Polyline\nn 222 342 m 62 182 l gs col-1 s gr\n% Polyline\nn 222 182 m 142 262 l gs col-1 s gr\n% Polyline\nn 142 182 m 102 222 l gs col-1 s gr\n% Polyline\nn 262 302 m 142 182 l gs col-1 s gr\n% Polyline\nn 302 262 m 222 182 l gs col-1 s gr\n% Polyline\nn 342 222 m 302 182 l gs col-1 s gr\n% Polyline\nn 62 23 m 62 343 l gs col-1 s gr\n/Times-Roman findfont 12.00 scalefont setfont\n101 215 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n42 22 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n42 102 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n42 182 m \ngs 1 -1 scale (0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n102 137 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n142 97 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n182 57 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n222 17 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 14.00 scalefont setfont\n397 188 m \ngs 1 -1 scale (Ns) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n59 196 m \ngs 1 -1 scale (0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n99 196 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n139 196 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n179 196 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n259 196 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n299 196 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n339 196 m \ngs 1 -1 scale (7) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n379 196 m \ngs 1 -1 scale (8) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n217 196 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n7 183 m \ngs 1 -1 scale (Sz) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n33 266 m \ngs 1 -1 scale (-1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n36 345 m \ngs 1 -1 scale (-2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n140 255 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n182 296 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n220 334 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n141 175 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n181 134 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n180 217 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n221 256 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n221 175 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n221 94 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n260 54 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n257 135 m \ngs 1 -1 scale (10) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n257 214 m \ngs 1 -1 scale (10) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n260 295 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n300 254 m \ngs 1 -1 scale (15) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n298 94 m \ngs 1 -1 scale (15) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n297 174 m \ngs 1 -1 scale (20) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n339 133 m \ngs 1 -1 scale (35) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n338 214 m \ngs 1 -1 scale (35) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n377 173 m \ngs 1 -1 scale (70) col-1 show gr\n$F2psEnd\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/mspingraph.fig",
    "content": "#FIG 2.1\n80 2\n6 7 8 414 345\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 62 182 382 182 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 62 182 222 22 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 142 182 262 62 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 222 22 382 182 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 222 182 302 102 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 302 182 342 142 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 182 62 302 182 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 142 102 222 182 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 102 142 142 182 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 382 182 222 342 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 302 182 182 302 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 222 342 62 182 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 222 182 142 262 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 142 182 102 222 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 262 302 142 182 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 302 262 222 182 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 342 222 302 182 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 62 23 62 343 9999 9999\n4 0 0 12 0 -1 0 0.00000 4 9 6 101 215 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 42 22 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 42 102 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 42 182 0\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 102 137 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 142 97 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 182 57 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 222 17 1\u0001\n4 0 0 14 0 -1 0 0.00000 4 10 17 397 188 Ns\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 59 196 0\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 99 196 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 139 196 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 179 196 3\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 259 196 5\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 299 196 6\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 339 196 7\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 379 196 8\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 217 196 4\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 13 7 183 Sz\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 13 33 266 -1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 13 36 345 -2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 140 255 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 182 296 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 220 334 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 141 175 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 181 134 3\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 180 217 3\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 221 256 4\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 221 175 6\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 221 94 4\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 260 54 5\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 257 135 10\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 257 214 10\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 260 295 5\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 300 254 15\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 298 94 15\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 297 174 20\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 339 133 35\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 338 214 35\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 377 173 70\u0001\n-6\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/orbitalarcs.eps",
    "content": "%!PS-Adobe-2.0 EPSF\n%%Title: /tmp/xfig-fig009186\n%%Creator: fig2dev\n%%CreationDate: Wed Nov 27 18:40:01 1996\n%%For: d3g681@hpcc1 (Robert J Harrison)\n%%BoundingBox: 0 0 142 252\n%%Pages: 0\n%%EndComments\n/$F2psDict 200 dict def \n$F2psDict begin\n$F2psDict /mtrx matrix put\n/l {lineto} bind def\n/m {moveto} bind def\n/s {stroke} bind def\n/n {newpath} bind def\n/gs {gsave} bind def\n/gr {grestore} bind def\n/clp {closepath} bind def\n/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul\n4 -2 roll mul setrgbcolor} bind def\n/col-1 {} def\n/col0 {0 0 0 setrgbcolor} bind def\n/col1 {0 0 1 setrgbcolor} bind def\n/col2 {0 1 0 setrgbcolor} bind def\n/col3 {0 1 1 setrgbcolor} bind def\n/col4 {1 0 0 setrgbcolor} bind def\n/col5 {1 0 1 setrgbcolor} bind def\n/col6 {1 1 0 setrgbcolor} bind def\n/col7 {1 1 1 setrgbcolor} bind def\n\tend\n/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def\n/$F2psEnd {$F2psEnteredState restore end} def\n%%EndProlog\n\n$F2psBegin\n0 setlinecap 0 setlinejoin\n-11.0 -9.0 translate 90 rotate 0.900 -0.900 scale\n/Times-Roman findfont 12.00 scalefont setfont\n119 69 m \ngs 1 -1 scale (Z) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n129 64 m \ngs 1 -1 scale (\\(l-1\\)2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 79 m \ngs 1 -1 scale (n-2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n194 69 m \ngs 1 -1 scale (Z) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 64 m \ngs 1 -1 scale (\\(l-1\\)1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 79 m \ngs 1 -1 scale (n-1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n274 69 m \ngs 1 -1 scale (Z) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 64 m \ngs 1 -1 scale (\\(l-1\\)0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 79 m \ngs 1 -1 scale (n) col-1 show gr\n0.500 setlinewidth\n% Polyline\nn 29 29 m 269 149 l  269 149 l gs col-1 s gr\n% Polyline\nn 269 149 m 149 29 l gs col-1 s gr\n% Polyline\nn 269 149 m 269 29 l gs col-1 s gr\n/Times-Roman findfont 12.00 scalefont setfont\n264 169 m \ngs 1 -1 scale (\\(l,n\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n9 24 m \ngs 1 -1 scale (\\(l-1,n-2\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n254 24 m \ngs 1 -1 scale (\\(l-1,n\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n129 24 m \ngs 1 -1 scale (\\(l-1,n-1\\)) col-1 show gr\n$F2psEnd\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/orbitalarcs.fig",
    "content": "#FIG 2.1\n80 2\n6 119 49 164 79\n4 0 0 12 0 -1 0 0.00000 4 9 8 119 69 Z\u0001\n4 0 0 12 0 -1 0 0.00000 4 12 32 129 64 (l-1)2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 19 134 79 n-2\u0001\n-6\n6 194 49 239 79\n4 0 0 12 0 -1 0 0.00000 4 9 8 194 69 Z\u0001\n4 0 0 12 0 -1 0 0.00000 4 12 32 204 64 (l-1)1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 19 204 79 n-1\u0001\n-6\n6 274 49 319 79\n4 0 0 12 0 -1 0 0.00000 4 9 8 274 69 Z\u0001\n4 0 0 12 0 -1 0 0.00000 4 12 32 284 64 (l-1)0\u0001\n4 0 0 12 0 -1 0 0.00000 4 6 6 284 79 n\u0001\n-6\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 29 29 269 149 269 149 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 269 149 149 29 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 269 149 269 29 9999 9999\n4 0 0 12 0 -1 0 0.00000 4 12 22 264 169 (l,n)\u0001\n4 0 0 12 0 -1 0 0.00000 4 12 48 9 24 (l-1,n-2)\u0001\n4 0 0 12 0 -1 0 0.00000 4 12 35 254 24 (l-1,n)\u0001\n4 0 0 12 0 -1 0 0.00000 4 12 48 129 24 (l-1,n-1)\u0001\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/orbitalgraph.eps",
    "content": "%!PS-Adobe-2.0 EPSF\n%%Title: /tmp/xfig-fig009186\n%%Creator: fig2dev\n%%CreationDate: Wed Nov 27 16:23:34 1996\n%%For: d3g681@hpcc1 (Robert J Harrison)\n%%BoundingBox: 0 0 387 364\n%%Pages: 0\n%%EndComments\n/$F2psDict 200 dict def \n$F2psDict begin\n$F2psDict /mtrx matrix put\n/l {lineto} bind def\n/m {moveto} bind def\n/s {stroke} bind def\n/n {newpath} bind def\n/gs {gsave} bind def\n/gr {grestore} bind def\n/clp {closepath} bind def\n/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul\n4 -2 roll mul setrgbcolor} bind def\n/col-1 {} def\n/col0 {0 0 0 setrgbcolor} bind def\n/col1 {0 0 1 setrgbcolor} bind def\n/col2 {0 1 0 setrgbcolor} bind def\n/col3 {0 1 1 setrgbcolor} bind def\n/col4 {1 0 0 setrgbcolor} bind def\n/col5 {1 0 1 setrgbcolor} bind def\n/col6 {1 1 0 setrgbcolor} bind def\n/col7 {1 1 1 setrgbcolor} bind def\n\tend\n/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def\n/$F2psEnd {$F2psEnteredState restore end} def\n%%EndProlog\n\n$F2psBegin\n0 setlinecap 0 setlinejoin\n-9.0 -22.0 translate 90 rotate 0.900 -0.900 scale\n0.500 setlinewidth\n% Polyline\nn 79 79 m 399 239 l gs col-1 s gr\n% Polyline\nn 79 159 m 399 319 l gs col-1 s gr\n% Polyline\nn 79 79 m 119 119 l  359 239 l  399 279 l gs col-1 s gr\n% Polyline\nn 79 119 m 119 159 l  359 279 l  399 319 l gs col-1 s gr\n% Polyline\nn 79 159 m 119 199 l  359 319 l  399 359 l gs col-1 s gr\n% Polyline\nn 119 79 m 119 199 l  119 199 l gs col-1 s gr\n% Polyline\nn 159 79 m 159 239 l gs col-1 s gr\n% Polyline\nn 199 119 m 199 239 l gs col-1 s gr\n% Polyline\nn 239 119 m 239 279 l gs col-1 s gr\n% Polyline\nn 279 159 m 279 279 l gs col-1 s gr\n% Polyline\nn 319 159 m 319 319 l gs col-1 s gr\n% Polyline\nn 359 199 m 359 319 l gs col-1 s gr\n% Polyline\nn 119 79 m 359 319 l gs col-1 s gr\n% Polyline\nn 119 159 m 239 279 l  239 279 l gs col-1 s gr\n% Polyline\nn 119 199 m 159 239 l  159 239 l gs col-1 s gr\n% Polyline\nn 159 79 m 359 279 l gs col-1 s gr\n% Polyline\nn 239 119 m 359 239 l gs col-1 s gr\n% Polyline\nn 319 159 m 359 199 l gs col-1 s gr\n% Polyline\nn 119 119 m 319 319 l gs col-1 s gr\n% Polyline\nn 79 119 m 399 279 l gs col-1 s gr\n% Polyline\nn 79 39 m 399 199 l  399 359 l  79 199 l \n 79 39 l  119 79 l  359 199 l  399 239 l gs col-1 s gr\n/Times-Roman findfont 12.00 scalefont setfont\n84 79 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n124 79 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n164 79 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n124 119 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n164 119 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 119 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n124 159 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n124 199 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n84 159 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n84 39 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n239 119 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n324 159 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 159 m \ngs 1 -1 scale (7) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n244 159 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n164 199 m \ngs 1 -1 scale (10) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 199 m \ngs 1 -1 scale (16) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n244 199 m \ngs 1 -1 scale (19) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 199 m \ngs 1 -1 scale (16) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n164 239 m \ngs 1 -1 scale (15) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n204 239 m \ngs 1 -1 scale (30) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n244 239 m \ngs 1 -1 scale (45) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 239 m \ngs 1 -1 scale (51) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n324 239 m \ngs 1 -1 scale (45) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n364 239 m \ngs 1 -1 scale (30) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n404 239 m \ngs 1 -1 scale (15) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n244 279 m \ngs 1 -1 scale (90) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 279 m \ngs 1 -1 scale (126) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n324 279 m \ngs 1 -1 scale (141) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n364 279 m \ngs 1 -1 scale (126) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n404 279 m \ngs 1 -1 scale (90) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n324 319 m \ngs 1 -1 scale (357) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n364 319 m \ngs 1 -1 scale (393) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n404 319 m \ngs 1 -1 scale (357) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n404 359 m \ngs 1 -1 scale (1107) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n84 119 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n164 159 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n284 159 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n84 199 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n324 199 m \ngs 1 -1 scale (10) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n364 199 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n404 199 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n24 19 m \ngs 1 -1 scale (Level) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 39 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 79 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 119 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 159 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 199 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 239 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 279 m \ngs 1 -1 scale (7) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n39 319 m \ngs 1 -1 scale (8) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n79 399 m \ngs 1 -1 scale (0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n119 399 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n159 399 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n199 399 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n239 399 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n279 399 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n319 399 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n359 399 m \ngs 1 -1 scale (7) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n399 399 m \ngs 1 -1 scale (8) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n199 439 m \ngs 1 -1 scale (Number of Electrons) col-1 show gr\n$F2psEnd\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/orbitalgraph.fig",
    "content": "#FIG 2.1\n80 2\n6 -1 -1 439 439\n6 79 29 429 359\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 79 79 399 239 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 79 159 399 319 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 79 79 119 119 359 239 399 279 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 79 119 119 159 359 279 399 319 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 79 159 119 199 359 319 399 359 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 119 79 119 199 119 199 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 159 79 159 239 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 199 119 199 239 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 239 119 239 279 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 279 159 279 279 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 319 159 319 319 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 359 199 359 319 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 119 79 359 319 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 119 159 239 279 239 279 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 119 199 159 239 159 239 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 159 79 359 279 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 239 119 359 239 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 319 159 359 199 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 119 119 319 319 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 79 119 399 279 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 79 39 399 199 399 359 79 199 79 39 119 79 359 199 399 239 9999 9999\n4 0 0 12 0 -1 0 0.00000 4 9 6 84 79 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 124 79 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 164 79 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 124 119 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 164 119 3\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 204 119 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 124 159 3\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 124 199 4\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 84 159 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 84 39 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 239 119 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 324 159 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 204 159 7\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 244 159 6\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 164 199 10\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 204 199 16\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 244 199 19\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 284 199 16\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 164 239 15\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 204 239 30\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 244 239 45\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 284 239 51\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 324 239 45\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 364 239 30\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 404 239 15\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 244 279 90\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 18 284 279 126\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 18 324 279 141\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 18 364 279 126\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 404 279 90\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 18 324 319 357\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 18 364 319 393\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 18 404 319 357\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 24 404 359 1107\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 84 119 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 164 159 6\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 284 159 3\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 84 199 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 324 199 10\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 364 199 4\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 404 199 1\u0001\n-6\n4 0 0 12 0 -1 0 0.00000 4 9 28 24 19 Level\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 39 39 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 39 79 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 39 119 3\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 39 159 4\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 39 199 5\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 39 239 6\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 39 279 7\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 39 319 8\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 79 399 0\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 119 399 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 159 399 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 199 399 3\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 239 399 4\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 279 399 5\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 319 399 6\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 359 399 7\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 399 399 8\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 105 199 439 Number of Electrons\u0001\n-6\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/psfig.sty",
    "content": "% Psfig/TeX \n\\def\\PsfigVersion{1.9}\n% dvips version\n%\n% All psfig/tex software, documentation, and related files\n% in this distribution of psfig/tex are \n% Copyright 1987, 1988, 1991 Trevor J. Darrell\n%\n% Permission is granted for use and non-profit distribution of psfig/tex \n% providing that this notice is clearly maintained. The right to\n% distribute any portion of psfig/tex for profit or as part of any commercial\n% product is specifically reserved for the author(s) of that portion.\n%\n% *** Feel free to make local modifications of psfig as you wish,\n% *** but DO NOT post any changed or modified versions of ``psfig''\n% *** directly to the net. Send them to me and I'll try to incorporate\n% *** them into future versions. If you want to take the psfig code \n% *** and make a new program (subject to the copyright above), distribute it, \n% *** (and maintain it) that's fine, just don't call it psfig.\n%\n% Bugs and improvements to trevor@media.mit.edu.\n%\n% Thanks to Greg Hager (GDH) and Ned Batchelder for their contributions\n% to the original version of this project.\n%\n% Modified by J. Daniel Smith on 9 October 1990 to accept the\n% %%BoundingBox: comment with or without a space after the colon.  Stole\n% file reading code from Tom Rokicki's EPSF.TEX file (see below).\n%\n% More modifications by J. Daniel Smith on 29 March 1991 to allow the\n% the included PostScript figure to be rotated.  The amount of\n% rotation is specified by the \"angle=\" parameter of the \\psfig command.\n%\n% Modified by Robert Russell on June 25, 1991 to allow users to specify\n% .ps filenames which don't yet exist, provided they explicitly provide\n% boundingbox information via the \\psfig command. Note: This will only work\n% if the \"file=\" parameter follows all four \"bb???=\" parameters in the\n% command. This is due to the order in which psfig interprets these params.\n%\n%  3 Jul 1991\tJDS\tcheck if file already read in once\n%  4 Sep 1991\tJDS\tfixed incorrect computation of rotated\n%\t\t\tbounding box\n% 25 Sep 1991\tGVR\texpanded synopsis of \\psfig\n% 14 Oct 1991\tJDS\t\\fbox code from LaTeX so \\psdraft works with TeX\n%\t\t\tchanged \\typeout to \\ps@typeout\n% 17 Oct 1991\tJDS\tadded \\psscalefirst and \\psrotatefirst\n%\n\n% From: gvr@cs.brown.edu (George V. Reilly)\n%\n% \\psdraft\tdraws an outline box, but doesn't include the figure\n%\t\tin the DVI file.  Useful for previewing.\n%\n% \\psfull\tincludes the figure in the DVI file (default).\n%\n% \\psscalefirst width= or height= specifies the size of the figure\n% \t\tbefore rotation.\n% \\psrotatefirst (default) width= or height= specifies the size of the\n% \t\t figure after rotation.  Asymetric figures will\n% \t\t appear to shrink.\n%\n% \\psfigurepath#1\tsets the path to search for the figure\n%\n% \\psfig\n% usage: \\psfig{file=, figure=, height=, width=,\n%\t\t\tbbllx=, bblly=, bburx=, bbury=,\n%\t\t\trheight=, rwidth=, clip=, angle=, silent=}\n%\n%\t\"file\" is the filename.  If no path name is specified and the\n%\t\tfile is not found in the current directory,\n%\t\tit will be looked for in directory \\psfigurepath.\n%\t\"figure\" is a synonym for \"file\".\n%\tBy default, the width and height of the figure are taken from\n%\t\tthe BoundingBox of the figure.\n%\tIf \"width\" is specified, the figure is scaled so that it has\n%\t\tthe specified width.  Its height changes proportionately.\n%\tIf \"height\" is specified, the figure is scaled so that it has\n%\t\tthe specified height.  Its width changes proportionately.\n%\tIf both \"width\" and \"height\" are specified, the figure is scaled\n%\t\tanamorphically.\n%\t\"bbllx\", \"bblly\", \"bburx\", and \"bbury\" control the PostScript\n%\t\tBoundingBox.  If these four values are specified\n%               *before* the \"file\" option, the PSFIG will not try to\n%               open the PostScript file.\n%\t\"rheight\" and \"rwidth\" are the reserved height and width\n%\t\tof the figure, i.e., how big TeX actually thinks\n%\t\tthe figure is.  They default to \"width\" and \"height\".\n%\tThe \"clip\" option ensures that no portion of the figure will\n%\t\tappear outside its BoundingBox.  \"clip=\" is a switch and\n%\t\ttakes no value, but the `=' must be present.\n%\tThe \"angle\" option specifies the angle of rotation (degrees, ccw).\n%\tThe \"silent\" option makes \\psfig work silently.\n%\n\n% check to see if macros already loaded in (maybe some other file says\n% \"\\input psfig\") ...\n\\ifx\\undefined\\psfig\\else\\endinput\\fi\n\n%\n% from a suggestion by eijkhout@csrd.uiuc.edu to allow\n% loading as a style file. Changed to avoid problems\n% with amstex per suggestion by jbence@math.ucla.edu\n\n\\let\\LaTeXAtSign=\\@\n\\let\\@=\\relax\n\\edef\\psfigRestoreAt{\\catcode`\\@=\\number\\catcode`@\\relax}\n%\\edef\\psfigRestoreAt{\\catcode`@=\\number\\catcode`@\\relax}\n\\catcode`\\@=11\\relax\n\\newwrite\\@unused\n\\def\\ps@typeout#1{{\\let\\protect\\string\\immediate\\write\\@unused{#1}}}\n%\\ps@typeout{psfig/tex \\PsfigVersion}\n\n%% Here's how you define your figure path.  Should be set up with null\n%% default and a user useable definition.\n\n\\def\\figurepath{./}\n\\def\\psfigurepath#1{\\edef\\figurepath{#1}}\n\n%\n% @psdo control structure -- similar to Latex @for.\n% I redefined these with different names so that psfig can\n% be used with TeX as well as LaTeX, and so that it will not \n% be vunerable to future changes in LaTeX's internal\n% control structure,\n%\n\\def\\@nnil{\\@nil}\n\\def\\@empty{}\n\\def\\@psdonoop#1\\@@#2#3{}\n\\def\\@psdo#1:=#2\\do#3{\\edef\\@psdotmp{#2}\\ifx\\@psdotmp\\@empty \\else\n    \\expandafter\\@psdoloop#2,\\@nil,\\@nil\\@@#1{#3}\\fi}\n\\def\\@psdoloop#1,#2,#3\\@@#4#5{\\def#4{#1}\\ifx #4\\@nnil \\else\n       #5\\def#4{#2}\\ifx #4\\@nnil \\else#5\\@ipsdoloop #3\\@@#4{#5}\\fi\\fi}\n\\def\\@ipsdoloop#1,#2\\@@#3#4{\\def#3{#1}\\ifx #3\\@nnil \n       \\let\\@nextwhile=\\@psdonoop \\else\n      #4\\relax\\let\\@nextwhile=\\@ipsdoloop\\fi\\@nextwhile#2\\@@#3{#4}}\n\\def\\@tpsdo#1:=#2\\do#3{\\xdef\\@psdotmp{#2}\\ifx\\@psdotmp\\@empty \\else\n    \\@tpsdoloop#2\\@nil\\@nil\\@@#1{#3}\\fi}\n\\def\\@tpsdoloop#1#2\\@@#3#4{\\def#3{#1}\\ifx #3\\@nnil \n       \\let\\@nextwhile=\\@psdonoop \\else\n      #4\\relax\\let\\@nextwhile=\\@tpsdoloop\\fi\\@nextwhile#2\\@@#3{#4}}\n% \n% \\fbox is defined in latex.tex; so if \\fbox is undefined, assume that\n% we are not in LaTeX.\n% Perhaps this could be done better???\n\\ifx\\undefined\\fbox\n% \\fbox code from modified slightly from LaTeX\n\\newdimen\\fboxrule\n\\newdimen\\fboxsep\n\\newdimen\\ps@tempdima\n\\newbox\\ps@tempboxa\n\\fboxsep = 3pt\n\\fboxrule = .4pt\n\\long\\def\\fbox#1{\\leavevmode\\setbox\\ps@tempboxa\\hbox{#1}\\ps@tempdima\\fboxrule\n    \\advance\\ps@tempdima \\fboxsep \\advance\\ps@tempdima \\dp\\ps@tempboxa\n   \\hbox{\\lower \\ps@tempdima\\hbox\n  {\\vbox{\\hrule height \\fboxrule\n          \\hbox{\\vrule width \\fboxrule \\hskip\\fboxsep\n          \\vbox{\\vskip\\fboxsep \\box\\ps@tempboxa\\vskip\\fboxsep}\\hskip \n                 \\fboxsep\\vrule width \\fboxrule}\n                 \\hrule height \\fboxrule}}}}\n\\fi\n%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n% file reading stuff from epsf.tex\n%   EPSF.TEX macro file:\n%   Written by Tomas Rokicki of Radical Eye Software, 29 Mar 1989.\n%   Revised by Don Knuth, 3 Jan 1990.\n%   Revised by Tomas Rokicki to accept bounding boxes with no\n%      space after the colon, 18 Jul 1990.\n%   Portions modified/removed for use in PSFIG package by\n%      J. Daniel Smith, 9 October 1990.\n%\n\\newread\\ps@stream\n\\newif\\ifnot@eof       % continue looking for the bounding box?\n\\newif\\if@noisy        % report what you're making?\n\\newif\\if@atend        % %%BoundingBox: has (at end) specification\n\\newif\\if@psfile       % does this look like a PostScript file?\n%\n% PostScript files should start with `%!'\n%\n{\\catcode`\\%=12\\global\\gdef\\epsf@start{%!}}\n\\def\\epsf@PS{PS}\n%\n\\def\\epsf@getbb#1{%\n%\n%   The first thing we need to do is to open the\n%   PostScript file, if possible.\n%\n\\openin\\ps@stream=#1\n\\ifeof\\ps@stream\\ps@typeout{Error, File #1 not found}\\else\n%\n%   Okay, we got it. Now we'll scan lines until we find one that doesn't\n%   start with %. We're looking for the bounding box comment.\n%\n   {\\not@eoftrue \\chardef\\other=12\n    \\def\\do##1{\\catcode`##1=\\other}\\dospecials \\catcode`\\ =10\n    \\loop\n       \\if@psfile\n\t  \\read\\ps@stream to \\epsf@fileline\n       \\else{\n\t  \\obeyspaces\n          \\read\\ps@stream to \\epsf@tmp\\global\\let\\epsf@fileline\\epsf@tmp}\n       \\fi\n       \\ifeof\\ps@stream\\not@eoffalse\\else\n%\n%   Check the first line for `%!'.  Issue a warning message if its not\n%   there, since the file might not be a PostScript file.\n%\n       \\if@psfile\\else\n       \\expandafter\\epsf@test\\epsf@fileline:. \\\\%\n       \\fi\n%\n%   We check to see if the first character is a % sign;\n%   if so, we look further and stop only if the line begins with\n%   `%%BoundingBox:' and the `(atend)' specification was not found.\n%   That is, the only way to stop is when the end of file is reached,\n%   or a `%%BoundingBox: llx lly urx ury' line is found.\n%\n          \\expandafter\\epsf@aux\\epsf@fileline:. \\\\%\n       \\fi\n   \\ifnot@eof\\repeat\n   }\\closein\\ps@stream\\fi}%\n%\n% This tests if the file we are reading looks like a PostScript file.\n%\n\\long\\def\\epsf@test#1#2#3:#4\\\\{\\def\\epsf@testit{#1#2}\n\t\t\t\\ifx\\epsf@testit\\epsf@start\\else\n\\ps@typeout{Warning! File does not start with `\\epsf@start'.  It may not be a PostScript file.}\n\t\t\t\\fi\n\t\t\t\\@psfiletrue} % don't test after 1st line\n%\n%   We still need to define the tricky \\epsf@aux macro. This requires\n%   a couple of magic constants for comparison purposes.\n%\n{\\catcode`\\%=12\\global\\let\\epsf@percent=%\\global\\def\\epsf@bblit{%BoundingBox}}\n%\n%\n%   So we're ready to check for `%BoundingBox:' and to grab the\n%   values if they are found.  We continue searching if `(at end)'\n%   was found after the `%BoundingBox:'.\n%\n\\long\\def\\epsf@aux#1#2:#3\\\\{\\ifx#1\\epsf@percent\n   \\def\\epsf@testit{#2}\\ifx\\epsf@testit\\epsf@bblit\n\t\\@atendfalse\n        \\epsf@atend #3 . \\\\%\n\t\\if@atend\t\n\t   \\if@verbose{\n\t\t\\ps@typeout{psfig: found `(atend)'; continuing search}\n\t   }\\fi\n        \\else\n        \\epsf@grab #3 . . . \\\\%\n        \\not@eoffalse\n        \\global\\no@bbfalse\n        \\fi\n   \\fi\\fi}%\n%\n%   Here we grab the values and stuff them in the appropriate definitions.\n%\n\\def\\epsf@grab #1 #2 #3 #4 #5\\\\{%\n   \\global\\def\\epsf@llx{#1}\\ifx\\epsf@llx\\empty\n      \\epsf@grab #2 #3 #4 #5 .\\\\\\else\n   \\global\\def\\epsf@lly{#2}%\n   \\global\\def\\epsf@urx{#3}\\global\\def\\epsf@ury{#4}\\fi}%\n%\n% Determine if the stuff following the %%BoundingBox is `(atend)'\n% J. Daniel Smith.  Copied from \\epsf@grab above.\n%\n\\def\\epsf@atendlit{(atend)} \n\\def\\epsf@atend #1 #2 #3\\\\{%\n   \\def\\epsf@tmp{#1}\\ifx\\epsf@tmp\\empty\n      \\epsf@atend #2 #3 .\\\\\\else\n   \\ifx\\epsf@tmp\\epsf@atendlit\\@atendtrue\\fi\\fi}\n\n\n% End of file reading stuff from epsf.tex\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n% trigonometry stuff from \"trig.tex\"\n\\chardef\\psletter = 11 % won't conflict with \\begin{letter} now...\n\\chardef\\other = 12\n\n\\newif \\ifdebug %%% turn me on to see TeX hard at work ...\n\\newif\\ifc@mpute %%% don't need to compute some values\n\\c@mputetrue % but assume that we do\n\n\\let\\then = \\relax\n\\def\\r@dian{pt }\n\\let\\r@dians = \\r@dian\n\\let\\dimensionless@nit = \\r@dian\n\\let\\dimensionless@nits = \\dimensionless@nit\n\\def\\internal@nit{sp }\n\\let\\internal@nits = \\internal@nit\n\\newif\\ifstillc@nverging\n\\def \\Mess@ge #1{\\ifdebug \\then \\message {#1} \\fi}\n\n{ %%% Things that need abnormal catcodes %%%\n\t\\catcode `\\@ = \\psletter\n\t\\gdef \\nodimen {\\expandafter \\n@dimen \\the \\dimen}\n\t\\gdef \\term #1 #2 #3%\n\t       {\\edef \\t@ {\\the #1}%%% freeze parameter 1 (count, by value)\n\t\t\\edef \\t@@ {\\expandafter \\n@dimen \\the #2\\r@dian}%\n\t\t\t\t   %%% freeze parameter 2 (dimen, by value)\n\t\t\\t@rm {\\t@} {\\t@@} {#3}%\n\t       }\n\t\\gdef \\t@rm #1 #2 #3%\n\t       {{%\n\t\t\\count 0 = 0\n\t\t\\dimen 0 = 1 \\dimensionless@nit\n\t\t\\dimen 2 = #2\\relax\n\t\t\\Mess@ge {Calculating term #1 of \\nodimen 2}%\n\t\t\\loop\n\t\t\\ifnum\t\\count 0 < #1\n\t\t\\then\t\\advance \\count 0 by 1\n\t\t\t\\Mess@ge {Iteration \\the \\count 0 \\space}%\n\t\t\t\\Multiply \\dimen 0 by {\\dimen 2}%\n\t\t\t\\Mess@ge {After multiplication, term = \\nodimen 0}%\n\t\t\t\\Divide \\dimen 0 by {\\count 0}%\n\t\t\t\\Mess@ge {After division, term = \\nodimen 0}%\n\t\t\\repeat\n\t\t\\Mess@ge {Final value for term #1 of \n\t\t\t\t\\nodimen 2 \\space is \\nodimen 0}%\n\t\t\\xdef \\Term {#3 = \\nodimen 0 \\r@dians}%\n\t\t\\aftergroup \\Term\n\t       }}\n\t\\catcode `\\p = \\other\n\t\\catcode `\\t = \\other\n\t\\gdef \\n@dimen #1pt{#1} %%% throw away the ``pt''\n}\n\n\\def \\Divide #1by #2{\\divide #1 by #2} %%% just a synonym\n\n\\def \\Multiply #1by #2%%% allows division of a dimen by a dimen\n       {{%%% should really freeze parameter 2 (dimen, passed by value)\n\t\\count 0 = #1\\relax\n\t\\count 2 = #2\\relax\n\t\\count 4 = 65536\n\t\\Mess@ge {Before scaling, count 0 = \\the \\count 0 \\space and\n\t\t\tcount 2 = \\the \\count 2}%\n\t\\ifnum\t\\count 0 > 32767 %%% do our best to avoid overflow\n\t\\then\t\\divide \\count 0 by 4\n\t\t\\divide \\count 4 by 4\n\t\\else\t\\ifnum\t\\count 0 < -32767\n\t\t\\then\t\\divide \\count 0 by 4\n\t\t\t\\divide \\count 4 by 4\n\t\t\\else\n\t\t\\fi\n\t\\fi\n\t\\ifnum\t\\count 2 > 32767 %%% while retaining reasonable accuracy\n\t\\then\t\\divide \\count 2 by 4\n\t\t\\divide \\count 4 by 4\n\t\\else\t\\ifnum\t\\count 2 < -32767\n\t\t\\then\t\\divide \\count 2 by 4\n\t\t\t\\divide \\count 4 by 4\n\t\t\\else\n\t\t\\fi\n\t\\fi\n\t\\multiply \\count 0 by \\count 2\n\t\\divide \\count 0 by \\count 4\n\t\\xdef \\product {#1 = \\the \\count 0 \\internal@nits}%\n\t\\aftergroup \\product\n       }}\n\n\\def\\r@duce{\\ifdim\\dimen0 > 90\\r@dian \\then   % sin(x+90) = sin(180-x)\n\t\t\\multiply\\dimen0 by -1\n\t\t\\advance\\dimen0 by 180\\r@dian\n\t\t\\r@duce\n\t    \\else \\ifdim\\dimen0 < -90\\r@dian \\then  % sin(-x) = sin(360+x)\n\t\t\\advance\\dimen0 by 360\\r@dian\n\t\t\\r@duce\n\t\t\\fi\n\t    \\fi}\n\n\\def\\Sine#1%\n       {{%\n\t\\dimen 0 = #1 \\r@dian\n\t\\r@duce\n\t\\ifdim\\dimen0 = -90\\r@dian \\then\n\t   \\dimen4 = -1\\r@dian\n\t   \\c@mputefalse\n\t\\fi\n\t\\ifdim\\dimen0 = 90\\r@dian \\then\n\t   \\dimen4 = 1\\r@dian\n\t   \\c@mputefalse\n\t\\fi\n\t\\ifdim\\dimen0 = 0\\r@dian \\then\n\t   \\dimen4 = 0\\r@dian\n\t   \\c@mputefalse\n\t\\fi\n%\n\t\\ifc@mpute \\then\n        \t% convert degrees to radians\n\t\t\\divide\\dimen0 by 180\n\t\t\\dimen0=3.141592654\\dimen0\n%\n\t\t\\dimen 2 = 3.1415926535897963\\r@dian %%% a well-known constant\n\t\t\\divide\\dimen 2 by 2 %%% we only deal with -pi/2 : pi/2\n\t\t\\Mess@ge {Sin: calculating Sin of \\nodimen 0}%\n\t\t\\count 0 = 1 %%% see power-series expansion for sine\n\t\t\\dimen 2 = 1 \\r@dian %%% ditto\n\t\t\\dimen 4 = 0 \\r@dian %%% ditto\n\t\t\\loop\n\t\t\t\\ifnum\t\\dimen 2 = 0 %%% then we've done\n\t\t\t\\then\t\\stillc@nvergingfalse \n\t\t\t\\else\t\\stillc@nvergingtrue\n\t\t\t\\fi\n\t\t\t\\ifstillc@nverging %%% then calculate next term\n\t\t\t\\then\t\\term {\\count 0} {\\dimen 0} {\\dimen 2}%\n\t\t\t\t\\advance \\count 0 by 2\n\t\t\t\t\\count 2 = \\count 0\n\t\t\t\t\\divide \\count 2 by 2\n\t\t\t\t\\ifodd\t\\count 2 %%% signs alternate\n\t\t\t\t\\then\t\\advance \\dimen 4 by \\dimen 2\n\t\t\t\t\\else\t\\advance \\dimen 4 by -\\dimen 2\n\t\t\t\t\\fi\n\t\t\\repeat\n\t\\fi\t\t\n\t\t\t\\xdef \\sine {\\nodimen 4}%\n       }}\n\n% Now the Cosine can be calculated easily by calling \\Sine\n\\def\\Cosine#1{\\ifx\\sine\\UnDefined\\edef\\Savesine{\\relax}\\else\n\t\t             \\edef\\Savesine{\\sine}\\fi\n\t{\\dimen0=#1\\r@dian\\advance\\dimen0 by 90\\r@dian\n\t \\Sine{\\nodimen 0}\n\t \\xdef\\cosine{\\sine}\n\t \\xdef\\sine{\\Savesine}}}\t      \n% end of trig stuff\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n\\def\\psdraft{\n\t\\def\\@psdraft{0}\n\t%\\ps@typeout{draft level now is \\@psdraft \\space . }\n}\n\\def\\psfull{\n\t\\def\\@psdraft{100}\n\t%\\ps@typeout{draft level now is \\@psdraft \\space . }\n}\n\n\\psfull\n\n\\newif\\if@scalefirst\n\\def\\psscalefirst{\\@scalefirsttrue}\n\\def\\psrotatefirst{\\@scalefirstfalse}\n\\psrotatefirst\n\n\\newif\\if@draftbox\n\\def\\psnodraftbox{\n\t\\@draftboxfalse\n}\n\\def\\psdraftbox{\n\t\\@draftboxtrue\n}\n\\@draftboxtrue\n\n\\newif\\if@prologfile\n\\newif\\if@postlogfile\n\\def\\pssilent{\n\t\\@noisyfalse\n}\n\\def\\psnoisy{\n\t\\@noisytrue\n}\n\\psnoisy\n%%% These are for the option list.\n%%% A specification of the form a = b maps to calling \\@p@@sa{b}\n\\newif\\if@bbllx\n\\newif\\if@bblly\n\\newif\\if@bburx\n\\newif\\if@bbury\n\\newif\\if@height\n\\newif\\if@width\n\\newif\\if@rheight\n\\newif\\if@rwidth\n\\newif\\if@angle\n\\newif\\if@clip\n\\newif\\if@verbose\n\\def\\@p@@sclip#1{\\@cliptrue}\n\n\n\\newif\\if@decmpr\n\n%%% GDH 7/26/87 -- changed so that it first looks in the local directory,\n%%% then in a specified global directory for the ps file.\n%%% RPR 6/25/91 -- changed so that it defaults to user-supplied name if\n%%% boundingbox info is specified, assuming graphic will be created by\n%%% print time.\n%%% TJD 10/19/91 -- added bbfile vs. file distinction, and @decmpr flag\n\n\\def\\@p@@sfigure#1{\\def\\@p@sfile{null}\\def\\@p@sbbfile{null}\n\t        \\openin1=#1.bb\n\t\t\\ifeof1\\closein1\n\t        \t\\openin1=\\figurepath#1.bb\n\t\t\t\\ifeof1\\closein1\n\t\t\t        \\openin1=#1\n\t\t\t\t\\ifeof1\\closein1%\n\t\t\t\t       \\openin1=\\figurepath#1\n\t\t\t\t\t\\ifeof1\n\t\t\t\t\t   \\ps@typeout{Error, File #1 not found}\n\t\t\t\t\t\t\\if@bbllx\\if@bblly\n\t\t\t\t   \t\t\\if@bburx\\if@bbury\n\t\t\t      \t\t\t\t\\def\\@p@sfile{#1}%\n\t\t\t      \t\t\t\t\\def\\@p@sbbfile{#1}%\n\t\t\t\t\t\t\t\\@decmprfalse\n\t\t\t\t  \t   \t\\fi\\fi\\fi\\fi\n\t\t\t\t\t\\else\\closein1\n\t\t\t\t    \t\t\\def\\@p@sfile{\\figurepath#1}%\n\t\t\t\t    \t\t\\def\\@p@sbbfile{\\figurepath#1}%\n\t\t\t\t\t\t\\@decmprfalse\n\t                       \t\t\\fi%\n\t\t\t \t\\else\\closein1%\n\t\t\t\t\t\\def\\@p@sfile{#1}\n\t\t\t\t\t\\def\\@p@sbbfile{#1}\n\t\t\t\t\t\\@decmprfalse\n\t\t\t \t\\fi\n\t\t\t\\else\n\t\t\t\t\\def\\@p@sfile{\\figurepath#1}\n\t\t\t\t\\def\\@p@sbbfile{\\figurepath#1.bb}\n\t\t\t\t\\@decmprtrue\n\t\t\t\\fi\n\t\t\\else\n\t\t\t\\def\\@p@sfile{#1}\n\t\t\t\\def\\@p@sbbfile{#1.bb}\n\t\t\t\\@decmprtrue\n\t\t\\fi}\n\n\\def\\@p@@sfile#1{\\@p@@sfigure{#1}}\n\n\\def\\@p@@sbbllx#1{\n\t\t%\\ps@typeout{bbllx is #1}\n\t\t\\@bbllxtrue\n\t\t\\dimen100=#1\n\t\t\\edef\\@p@sbbllx{\\number\\dimen100}\n}\n\\def\\@p@@sbblly#1{\n\t\t%\\ps@typeout{bblly is #1}\n\t\t\\@bbllytrue\n\t\t\\dimen100=#1\n\t\t\\edef\\@p@sbblly{\\number\\dimen100}\n}\n\\def\\@p@@sbburx#1{\n\t\t%\\ps@typeout{bburx is #1}\n\t\t\\@bburxtrue\n\t\t\\dimen100=#1\n\t\t\\edef\\@p@sbburx{\\number\\dimen100}\n}\n\\def\\@p@@sbbury#1{\n\t\t%\\ps@typeout{bbury is #1}\n\t\t\\@bburytrue\n\t\t\\dimen100=#1\n\t\t\\edef\\@p@sbbury{\\number\\dimen100}\n}\n\\def\\@p@@sheight#1{\n\t\t\\@heighttrue\n\t\t\\dimen100=#1\n   \t\t\\edef\\@p@sheight{\\number\\dimen100}\n\t\t%\\ps@typeout{Height is \\@p@sheight}\n}\n\\def\\@p@@swidth#1{\n\t\t%\\ps@typeout{Width is #1}\n\t\t\\@widthtrue\n\t\t\\dimen100=#1\n\t\t\\edef\\@p@swidth{\\number\\dimen100}\n}\n\\def\\@p@@srheight#1{\n\t\t%\\ps@typeout{Reserved height is #1}\n\t\t\\@rheighttrue\n\t\t\\dimen100=#1\n\t\t\\edef\\@p@srheight{\\number\\dimen100}\n}\n\\def\\@p@@srwidth#1{\n\t\t%\\ps@typeout{Reserved width is #1}\n\t\t\\@rwidthtrue\n\t\t\\dimen100=#1\n\t\t\\edef\\@p@srwidth{\\number\\dimen100}\n}\n\\def\\@p@@sangle#1{\n\t\t%\\ps@typeout{Rotation is #1}\n\t\t\\@angletrue\n%\t\t\\dimen100=#1\n\t\t\\edef\\@p@sangle{#1} %\\number\\dimen100}\n}\n\\def\\@p@@ssilent#1{ \n\t\t\\@verbosefalse\n}\n\\def\\@p@@sprolog#1{\\@prologfiletrue\\def\\@prologfileval{#1}}\n\\def\\@p@@spostlog#1{\\@postlogfiletrue\\def\\@postlogfileval{#1}}\n\\def\\@cs@name#1{\\csname #1\\endcsname}\n\\def\\@setparms#1=#2,{\\@cs@name{@p@@s#1}{#2}}\n%\n% initialize the defaults (size the size of the figure)\n%\n\\def\\ps@init@parms{\n\t\t\\@bbllxfalse \\@bbllyfalse\n\t\t\\@bburxfalse \\@bburyfalse\n\t\t\\@heightfalse \\@widthfalse\n\t\t\\@rheightfalse \\@rwidthfalse\n\t\t\\def\\@p@sbbllx{}\\def\\@p@sbblly{}\n\t\t\\def\\@p@sbburx{}\\def\\@p@sbbury{}\n\t\t\\def\\@p@sheight{}\\def\\@p@swidth{}\n\t\t\\def\\@p@srheight{}\\def\\@p@srwidth{}\n\t\t\\def\\@p@sangle{0}\n\t\t\\def\\@p@sfile{} \\def\\@p@sbbfile{}\n\t\t\\def\\@p@scost{10}\n\t\t\\def\\@sc{}\n\t\t\\@prologfilefalse\n\t\t\\@postlogfilefalse\n\t\t\\@clipfalse\n\t\t\\if@noisy\n\t\t\t\\@verbosetrue\n\t\t\\else\n\t\t\t\\@verbosefalse\n\t\t\\fi\n}\n%\n% Go through the options setting things up.\n%\n\\def\\parse@ps@parms#1{\n\t \t\\@psdo\\@psfiga:=#1\\do\n\t\t   {\\expandafter\\@setparms\\@psfiga,}}\n%\n% Compute bb height and width\n%\n\\newif\\ifno@bb\n\\def\\bb@missing{\n\t\\if@verbose{\n\t\t\\ps@typeout{psfig: searching \\@p@sbbfile \\space  for bounding box}\n\t}\\fi\n\t\\no@bbtrue\n\t\\epsf@getbb{\\@p@sbbfile}\n        \\ifno@bb \\else \\bb@cull\\epsf@llx\\epsf@lly\\epsf@urx\\epsf@ury\\fi\n}\t\n\\def\\bb@cull#1#2#3#4{\n\t\\dimen100=#1 bp\\edef\\@p@sbbllx{\\number\\dimen100}\n\t\\dimen100=#2 bp\\edef\\@p@sbblly{\\number\\dimen100}\n\t\\dimen100=#3 bp\\edef\\@p@sbburx{\\number\\dimen100}\n\t\\dimen100=#4 bp\\edef\\@p@sbbury{\\number\\dimen100}\n\t\\no@bbfalse\n}\n% rotate point (#1,#2) about (0,0).\n% The sine and cosine of the angle are already stored in \\sine and\n% \\cosine.  The result is placed in (\\p@intvaluex, \\p@intvaluey).\n\\newdimen\\p@intvaluex\n\\newdimen\\p@intvaluey\n\\def\\rotate@#1#2{{\\dimen0=#1 sp\\dimen1=#2 sp\n%            \tcalculate x' = x \\cos\\theta - y \\sin\\theta\n\t\t  \\global\\p@intvaluex=\\cosine\\dimen0\n\t\t  \\dimen3=\\sine\\dimen1\n\t\t  \\global\\advance\\p@intvaluex by -\\dimen3\n% \t\tcalculate y' = x \\sin\\theta + y \\cos\\theta\n\t\t  \\global\\p@intvaluey=\\sine\\dimen0\n\t\t  \\dimen3=\\cosine\\dimen1\n\t\t  \\global\\advance\\p@intvaluey by \\dimen3\n\t\t  }}\n\\def\\compute@bb{\n\t\t\\no@bbfalse\n\t\t\\if@bbllx \\else \\no@bbtrue \\fi\n\t\t\\if@bblly \\else \\no@bbtrue \\fi\n\t\t\\if@bburx \\else \\no@bbtrue \\fi\n\t\t\\if@bbury \\else \\no@bbtrue \\fi\n\t\t\\ifno@bb \\bb@missing \\fi\n\t\t\\ifno@bb \\ps@typeout{FATAL ERROR: no bb supplied or found}\n\t\t\t\\no-bb-error\n\t\t\\fi\n\t\t%\n%\\ps@typeout{BB: \\@p@sbbllx, \\@p@sbblly, \\@p@sbburx, \\@p@sbbury} \n%\n% store height/width of original (unrotated) bounding box\n\t\t\\count203=\\@p@sbburx\n\t\t\\count204=\\@p@sbbury\n\t\t\\advance\\count203 by -\\@p@sbbllx\n\t\t\\advance\\count204 by -\\@p@sbblly\n\t\t\\edef\\ps@bbw{\\number\\count203}\n\t\t\\edef\\ps@bbh{\\number\\count204}\n\t\t%\\ps@typeout{ psbbh = \\ps@bbh, psbbw = \\ps@bbw }\n\t\t\\if@angle \n\t\t\t\\Sine{\\@p@sangle}\\Cosine{\\@p@sangle}\n\t        \t{\\dimen100=\\maxdimen\\xdef\\r@p@sbbllx{\\number\\dimen100}\n\t\t\t\t\t    \\xdef\\r@p@sbblly{\\number\\dimen100}\n\t\t\t                    \\xdef\\r@p@sbburx{-\\number\\dimen100}\n\t\t\t\t\t    \\xdef\\r@p@sbbury{-\\number\\dimen100}}\n%\n% Need to rotate all four points and take the X-Y extremes of the new\n% points as the new bounding box.\n                        \\def\\minmaxtest{\n\t\t\t   \\ifnum\\number\\p@intvaluex<\\r@p@sbbllx\n\t\t\t      \\xdef\\r@p@sbbllx{\\number\\p@intvaluex}\\fi\n\t\t\t   \\ifnum\\number\\p@intvaluex>\\r@p@sbburx\n\t\t\t      \\xdef\\r@p@sbburx{\\number\\p@intvaluex}\\fi\n\t\t\t   \\ifnum\\number\\p@intvaluey<\\r@p@sbblly\n\t\t\t      \\xdef\\r@p@sbblly{\\number\\p@intvaluey}\\fi\n\t\t\t   \\ifnum\\number\\p@intvaluey>\\r@p@sbbury\n\t\t\t      \\xdef\\r@p@sbbury{\\number\\p@intvaluey}\\fi\n\t\t\t   }\n%\t\t\tlower left\n\t\t\t\\rotate@{\\@p@sbbllx}{\\@p@sbblly}\n\t\t\t\\minmaxtest\n%\t\t\tupper left\n\t\t\t\\rotate@{\\@p@sbbllx}{\\@p@sbbury}\n\t\t\t\\minmaxtest\n%\t\t\tlower right\n\t\t\t\\rotate@{\\@p@sbburx}{\\@p@sbblly}\n\t\t\t\\minmaxtest\n%\t\t\tupper right\n\t\t\t\\rotate@{\\@p@sbburx}{\\@p@sbbury}\n\t\t\t\\minmaxtest\n\t\t\t\\edef\\@p@sbbllx{\\r@p@sbbllx}\\edef\\@p@sbblly{\\r@p@sbblly}\n\t\t\t\\edef\\@p@sbburx{\\r@p@sbburx}\\edef\\@p@sbbury{\\r@p@sbbury}\n%\\ps@typeout{rotated BB: \\r@p@sbbllx, \\r@p@sbblly, \\r@p@sbburx, \\r@p@sbbury}\n\t\t\\fi\n\t\t\\count203=\\@p@sbburx\n\t\t\\count204=\\@p@sbbury\n\t\t\\advance\\count203 by -\\@p@sbbllx\n\t\t\\advance\\count204 by -\\@p@sbblly\n\t\t\\edef\\@bbw{\\number\\count203}\n\t\t\\edef\\@bbh{\\number\\count204}\n\t\t%\\ps@typeout{ bbh = \\@bbh, bbw = \\@bbw }\n}\n%\n% \\in@hundreds performs #1 * (#2 / #3) correct to the hundreds,\n%\tthen leaves the result in @result\n%\n\\def\\in@hundreds#1#2#3{\\count240=#2 \\count241=#3\n\t\t     \\count100=\\count240\t% 100 is first digit #2/#3\n\t\t     \\divide\\count100 by \\count241\n\t\t     \\count101=\\count100\n\t\t     \\multiply\\count101 by \\count241\n\t\t     \\advance\\count240 by -\\count101\n\t\t     \\multiply\\count240 by 10\n\t\t     \\count101=\\count240\t%101 is second digit of #2/#3\n\t\t     \\divide\\count101 by \\count241\n\t\t     \\count102=\\count101\n\t\t     \\multiply\\count102 by \\count241\n\t\t     \\advance\\count240 by -\\count102\n\t\t     \\multiply\\count240 by 10\n\t\t     \\count102=\\count240\t% 102 is the third digit\n\t\t     \\divide\\count102 by \\count241\n\t\t     \\count200=#1\\count205=0\n\t\t     \\count201=\\count200\n\t\t\t\\multiply\\count201 by \\count100\n\t\t \t\\advance\\count205 by \\count201\n\t\t     \\count201=\\count200\n\t\t\t\\divide\\count201 by 10\n\t\t\t\\multiply\\count201 by \\count101\n\t\t\t\\advance\\count205 by \\count201\n\t\t\t%\n\t\t     \\count201=\\count200\n\t\t\t\\divide\\count201 by 100\n\t\t\t\\multiply\\count201 by \\count102\n\t\t\t\\advance\\count205 by \\count201\n\t\t\t%\n\t\t     \\edef\\@result{\\number\\count205}\n}\n\\def\\compute@wfromh{\n\t\t% computing : width = height * (bbw / bbh)\n\t\t\\in@hundreds{\\@p@sheight}{\\@bbw}{\\@bbh}\n\t\t%\\ps@typeout{ \\@p@sheight * \\@bbw / \\@bbh, = \\@result }\n\t\t\\edef\\@p@swidth{\\@result}\n\t\t%\\ps@typeout{w from h: width is \\@p@swidth}\n}\n\\def\\compute@hfromw{\n\t\t% computing : height = width * (bbh / bbw)\n\t        \\in@hundreds{\\@p@swidth}{\\@bbh}{\\@bbw}\n\t\t%\\ps@typeout{ \\@p@swidth * \\@bbh / \\@bbw = \\@result }\n\t\t\\edef\\@p@sheight{\\@result}\n\t\t%\\ps@typeout{h from w : height is \\@p@sheight}\n}\n\\def\\compute@handw{\n\t\t\\if@height \n\t\t\t\\if@width\n\t\t\t\\else\n\t\t\t\t\\compute@wfromh\n\t\t\t\\fi\n\t\t\\else \n\t\t\t\\if@width\n\t\t\t\t\\compute@hfromw\n\t\t\t\\else\n\t\t\t\t\\edef\\@p@sheight{\\@bbh}\n\t\t\t\t\\edef\\@p@swidth{\\@bbw}\n\t\t\t\\fi\n\t\t\\fi\n}\n\\def\\compute@resv{\n\t\t\\if@rheight \\else \\edef\\@p@srheight{\\@p@sheight} \\fi\n\t\t\\if@rwidth \\else \\edef\\@p@srwidth{\\@p@swidth} \\fi\n\t\t%\\ps@typeout{rheight = \\@p@srheight, rwidth = \\@p@srwidth}\n}\n%\t\t\n% Compute any missing values\n\\def\\compute@sizes{\n\t\\compute@bb\n\t\\if@scalefirst\\if@angle\n% at this point the bounding box has been adjsuted correctly for\n% rotation.  PSFIG does all of its scaling using \\@bbh and \\@bbw.  If\n% a width= or height= was specified along with \\psscalefirst, then the\n% width=/height= value needs to be adjusted to match the new (rotated)\n% bounding box size (specifed in \\@bbw and \\@bbh).\n%    \\ps@bbw       width=\n%    -------  =  ---------- \n%    \\@bbw       new width=\n% so `new width=' = (width= * \\@bbw) / \\ps@bbw; where \\ps@bbw is the\n% width of the original (unrotated) bounding box.\n\t\\if@width\n\t   \\in@hundreds{\\@p@swidth}{\\@bbw}{\\ps@bbw}\n\t   \\edef\\@p@swidth{\\@result}\n\t\\fi\n\t\\if@height\n\t   \\in@hundreds{\\@p@sheight}{\\@bbh}{\\ps@bbh}\n\t   \\edef\\@p@sheight{\\@result}\n\t\\fi\n\t\\fi\\fi\n\t\\compute@handw\n\t\\compute@resv}\n\n%\n% \\psfig\n% usage : \\psfig{file=, height=, width=, bbllx=, bblly=, bburx=, bbury=,\n%\t\t\trheight=, rwidth=, clip=}\n%\n% \"clip=\" is a switch and takes no value, but the `=' must be present.\n\\def\\psfig#1{\\vbox {\n\t% do a zero width hard space so that a single\n\t% \\psfig in a centering enviornment will behave nicely\n\t%{\\setbox0=\\hbox{\\ }\\ \\hskip-\\wd0}\n\t%\n\t\\ps@init@parms\n\t\\parse@ps@parms{#1}\n\t\\compute@sizes\n\t%\n\t\\ifnum\\@p@scost<\\@psdraft{\n\t\t%\n\t\t\\special{ps::[begin] \t\\@p@swidth \\space \\@p@sheight \\space\n\t\t\t\t\\@p@sbbllx \\space \\@p@sbblly \\space\n\t\t\t\t\\@p@sbburx \\space \\@p@sbbury \\space\n\t\t\t\tstartTexFig \\space }\n\t\t\\if@angle\n\t\t\t\\special {ps:: \\@p@sangle \\space rotate \\space} \n\t\t\\fi\n\t\t\\if@clip{\n\t\t\t\\if@verbose{\n\t\t\t\t\\ps@typeout{(clip)}\n\t\t\t}\\fi\n\t\t\t\\special{ps:: doclip \\space }\n\t\t}\\fi\n\t\t\\if@prologfile\n\t\t    \\special{ps: plotfile \\@prologfileval \\space } \\fi\n\t\t\\if@decmpr{\n\t\t\t\\if@verbose{\n\t\t\t\t\\ps@typeout{psfig: including \\@p@sfile.Z \\space }\n\t\t\t}\\fi\n\t\t\t\\special{ps: plotfile \"`zcat \\@p@sfile.Z\" \\space }\n\t\t}\\else{\n\t\t\t\\if@verbose{\n\t\t\t\t\\ps@typeout{psfig: including \\@p@sfile \\space }\n\t\t\t}\\fi\n\t\t\t\\special{ps: plotfile \\@p@sfile \\space }\n\t\t}\\fi\n\t\t\\if@postlogfile\n\t\t    \\special{ps: plotfile \\@postlogfileval \\space } \\fi\n\t\t\\special{ps::[end] endTexFig \\space }\n\t\t% Create the vbox to reserve the space for the figure.\n\t\t\\vbox to \\@p@srheight sp{\n\t\t% 1/92 TJD Changed from \"true sp\" to \"sp\" for magnification.\n\t\t\t\\hbox to \\@p@srwidth sp{\n\t\t\t\t\\hss\n\t\t\t}\n\t\t\\vss\n\t\t}\n\t}\\else{\n\t\t% draft figure, just reserve the space and print the\n\t\t% path name.\n\t\t\\if@draftbox{\t\t\n\t\t\t% Verbose draft: print file name in box\n\t\t\t\\hbox{\\frame{\\vbox to \\@p@srheight sp{\n\t\t\t\\vss\n\t\t\t\\hbox to \\@p@srwidth sp{ \\hss \\@p@sfile \\hss }\n\t\t\t\\vss\n\t\t\t}}}\n\t\t}\\else{\n\t\t\t% Non-verbose draft\n\t\t\t\\vbox to \\@p@srheight sp{\n\t\t\t\\vss\n\t\t\t\\hbox to \\@p@srwidth sp{\\hss}\n\t\t\t\\vss\n\t\t\t}\n\t\t}\\fi\t\n\n\n\n\t}\\fi\n}}\n\\psfigRestoreAt\n\\let\\@=\\LaTeXAtSign\n\n\n\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/spinarcs.eps",
    "content": "%!PS-Adobe-2.0 EPSF\n%%Title: /tmp/xfig-fig009186\n%%Creator: fig2dev\n%%CreationDate: Wed Nov 27 18:04:50 1996\n%%For: d3g681@hpcc1 (Robert J Harrison)\n%%BoundingBox: 0 0 169 138\n%%Pages: 0\n%%EndComments\n/$F2psDict 200 dict def \n$F2psDict begin\n$F2psDict /mtrx matrix put\n/l {lineto} bind def\n/m {moveto} bind def\n/s {stroke} bind def\n/n {newpath} bind def\n/gs {gsave} bind def\n/gr {grestore} bind def\n/clp {closepath} bind def\n/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul\n4 -2 roll mul setrgbcolor} bind def\n/col-1 {} def\n/col0 {0 0 0 setrgbcolor} bind def\n/col1 {0 0 1 setrgbcolor} bind def\n/col2 {0 1 0 setrgbcolor} bind def\n/col3 {0 1 1 setrgbcolor} bind def\n/col4 {1 0 0 setrgbcolor} bind def\n/col5 {1 0 1 setrgbcolor} bind def\n/col6 {1 1 0 setrgbcolor} bind def\n/col7 {1 1 1 setrgbcolor} bind def\n\tend\n/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def\n/$F2psEnd {$F2psEnteredState restore end} def\n%%EndProlog\n\n$F2psBegin\n0 setlinecap 0 setlinejoin\n-20.0 -40.0 translate 90 rotate 0.900 -0.900 scale\n0.500 setlinewidth\n% Polyline\nn 79 39 m 159 119 l  79 199 l gs col-1 s gr\n/Times-Roman findfont 12.00 scalefont setfont\n169 124 m \ngs 1 -1 scale (\\(s,m\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n44 34 m \ngs 1 -1 scale (\\(s-1,m+1/2\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n44 209 m \ngs 1 -1 scale (\\(s-1,m-1/2\\)) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n124 74 m \ngs 1 -1 scale (Y) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n129 169 m \ngs 1 -1 scale (Y) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n139 164 m \ngs 1 -1 scale (\\(s-1\\)+) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n139 179 m \ngs 1 -1 scale (m-1/2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 69 m \ngs 1 -1 scale (\\(s-1\\)-) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 84 m \ngs 1 -1 scale (m+1/2) col-1 show gr\n$F2psEnd\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/spinarcs.fig",
    "content": "#FIG 2.1\n80 2\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 79 39 159 119 79 199 9999 9999\n4 0 0 12 0 -1 0 0.00000 4 12 28 169 124 (s,m)\u0001\n4 0 0 12 0 -1 0 0.00000 4 12 63 44 34 (s-1,m+1/2)\u0001\n4 0 0 12 0 -1 0 0.00000 4 12 63 44 209 (s-1,m-1/2)\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 9 124 74 Y\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 9 129 169 Y\u0001\n4 0 0 12 0 -1 0 0.00000 4 12 36 139 164 (s-1)+\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 31 139 179 m-1/2\u0001\n4 0 0 12 0 -1 0 0.00000 4 12 36 134 69 (s-1)-\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 31 134 84 m+1/2\u0001\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/spingraph.eps",
    "content": "%!PS-Adobe-2.0 EPSF\n%%Title: /tmp/xfig-fig007924\n%%Creator: fig2dev\n%%CreationDate: Mon Nov 25 00:15:14 1996\n%%For: d3g681@hpcc1 (Robert J Harrison)\n%%BoundingBox: 0 0 202 328\n%%Pages: 0\n%%EndComments\n/$F2psDict 200 dict def \n$F2psDict begin\n$F2psDict /mtrx matrix put\n/l {lineto} bind def\n/m {moveto} bind def\n/s {stroke} bind def\n/n {newpath} bind def\n/gs {gsave} bind def\n/gr {grestore} bind def\n/clp {closepath} bind def\n/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul\n4 -2 roll mul setrgbcolor} bind def\n/col-1 {} def\n/col0 {0 0 0 setrgbcolor} bind def\n/col1 {0 0 1 setrgbcolor} bind def\n/col2 {0 1 0 setrgbcolor} bind def\n/col3 {0 1 1 setrgbcolor} bind def\n/col4 {1 0 0 setrgbcolor} bind def\n/col5 {1 0 1 setrgbcolor} bind def\n/col6 {1 1 0 setrgbcolor} bind def\n/col7 {1 1 1 setrgbcolor} bind def\n\tend\n/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def\n/$F2psEnd {$F2psEnteredState restore end} def\n%%EndProlog\n\n$F2psBegin\n0 setlinecap 0 setlinejoin\n-9.0 -9.0 translate 90 rotate 0.900 -0.900 scale\n0.500 setlinewidth\n% Polyline\nn 54 184 m 54 24 l gs col-1 s gr\n% Polyline\nn 54 184 m 374 184 l gs col-1 s gr\n% Polyline\nn 54 184 m 214 24 l gs col-1 s gr\n% Polyline\nn 134 184 m 254 64 l gs col-1 s gr\n% Polyline\nn 214 24 m 374 184 l gs col-1 s gr\n% Polyline\nn 214 184 m 294 104 l gs col-1 s gr\n% Polyline\nn 294 184 m 334 144 l gs col-1 s gr\n% Polyline\nn 174 64 m 294 184 l gs col-1 s gr\n% Polyline\nn 134 104 m 214 184 l gs col-1 s gr\n% Polyline\nn 94 144 m 134 184 l gs col-1 s gr\n/Times-Roman findfont 12.00 scalefont setfont\n54 204 m \ngs 1 -1 scale (0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n94 204 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 204 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n174 204 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n214 204 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n254 204 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n294 204 m \ngs 1 -1 scale (6) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n34 24 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n34 104 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n34 184 m \ngs 1 -1 scale (0) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 174 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n174 134 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n214 179 m \ngs 1 -1 scale (2) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n214 99 m \ngs 1 -1 scale (3) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n249 139 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n334 204 m \ngs 1 -1 scale (7) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n374 204 m \ngs 1 -1 scale (8) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n94 139 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n134 99 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n174 59 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n214 19 m \ngs 1 -1 scale (1) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n294 174 m \ngs 1 -1 scale (5) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n254 54 m \ngs 1 -1 scale (4) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n294 99 m \ngs 1 -1 scale (9) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n369 174 m \ngs 1 -1 scale (14) col-1 show gr\n/Times-Roman findfont 12.00 scalefont setfont\n329 139 m \ngs 1 -1 scale (14) col-1 show gr\n/Times-Roman findfont 14.00 scalefont setfont\n159 234 m \ngs 1 -1 scale (Number of electrons) col-1 show gr\n/Times-Roman findfont 14.00 scalefont setfont\n9 104 m \ngs 1 -1 scale (S) col-1 show gr\n$F2psEnd\n"
  },
  {
    "path": "src/apps/moldft/fci/doc/spingraph.fig",
    "content": "#FIG 2.1\n80 2\n6 9 9 384 234\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 54 184 54 24 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 54 184 374 184 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 54 184 214 24 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 134 184 254 64 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 214 24 374 184 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 214 184 294 104 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 294 184 334 144 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 174 64 294 184 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 134 104 214 184 9999 9999\n2 1 0 1 -1 0 0 0 0.000 -1 0 0\n\t 94 144 134 184 9999 9999\n4 0 0 12 0 -1 0 0.00000 4 9 6 54 204 0\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 94 204 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 134 204 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 174 204 3\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 214 204 4\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 254 204 5\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 294 204 6\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 34 24 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 34 104 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 34 184 0\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 134 174 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 174 134 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 214 179 2\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 214 99 3\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 249 139 5\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 334 204 7\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 374 204 8\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 94 139 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 134 99 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 174 59 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 214 19 1\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 294 174 5\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 254 54 4\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 6 294 99 9\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 369 174 14\u0001\n4 0 0 12 0 -1 0 0.00000 4 9 12 329 139 14\u0001\n4 0 0 14 0 -1 0 0.00000 4 10 118 159 234 Number of electrons\u0001\n4 0 0 14 0 -1 0 0.00000 4 10 8 9 104 S\u0001\n-6\n"
  },
  {
    "path": "src/apps/moldft/fci/dscal.F",
    "content": "*\n* $Id: dscal.F,v 1.2 1999/07/28 00:23:38 d3e129 Exp $\n*\n      subroutine  dscal(n,da,dx,incx)\nc\nc     scales a vector by a constant.\nc     uses unrolled loops for increment equal to one.\nc     jack dongarra, linpack, 3/11/78.\nc\n      double precision da,dx(1)\n      integer i,incx,m,mp1,n,nincx\nc\n      if(n.le.0)return\n      if(incx.eq.1)go to 20\nc\nc        code for increment not equal to 1\nc\n      nincx = n*incx\n      do 10 i = 1,nincx,incx\n        dx(i) = da*dx(i)\n   10 continue\n      return\nc\nc        code for increment equal to 1\nc\nc\nc        clean-up loop\nc\n   20 m = mod(n,5)\n      if( m .eq. 0 ) go to 40\n      do 30 i = 1,m\n        dx(i) = da*dx(i)\n   30 continue\n      if( n .lt. 5 ) return\n   40 mp1 = m + 1\n      do 50 i = mp1,n,5\n        dx(i) = da*dx(i)\n        dx(i + 1) = da*dx(i + 1)\n        dx(i + 2) = da*dx(i + 2)\n        dx(i + 3) = da*dx(i + 3)\n        dx(i + 4) = da*dx(i + 4)\n   50 continue\n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci.F",
    "content": "*\n* $Id: fci.F,v 1.2 1999/07/28 00:23:38 d3e129 Exp $\n*\n      program fci\n      implicit none\n      integer nactiv, nelec, multi\n      integer nwalko, ndets, ncsf, nroot\n      integer maxact, maxtri, maxroot, maxhami\n      parameter (maxact=14, maxroot=3, maxhami=441)\n      parameter (maxtri = maxact*(maxact+1)/2)\n      double precision ecore, h(maxtri), g(maxtri*maxtri)\n      double precision thresh, prthresh, weight(maxroot)\n      integer lenwrk, iwork, iv, lwork, iroot, orbsyms(maxact),\n     $     symstate, nwalkosym\n      parameter (lenwrk = 16000000)\n      double precision work(lenwrk)\nc\n      character*9 evecfilename, diagfilename\nc\n      double precision hami(maxhami*(maxhami+1)/2), evals(maxhami)\n      integer pivot(maxhami), i\nc\n      double precision onepdm(maxact*maxact*maxroot*maxroot)\n      double precision twopdm(maxact*maxact*maxact*maxact*\n     $     maxroot*maxroot)\n      double precision roots(maxroot)\n      data weight/maxroot*1.0D0/\n      data evecfilename, diagfilename /'evecs.dat', 'diags.dat'/\nc\nc     Simple test driver program for the FCI \nc\nc     The first line of the input is\nc     ..   nactive, nelectrons, multiplicity, symmetry, nroot, thresh, prtol\nc\nc     The second is the list of orbital symmetries\nc\nc     All subsequent lines are read as\nc     ..   g, i, j, k, l \nc\nc     if (k>0) then \nc     ..   g is (ij|kl)\nc     else if (i>0) then\nc     ..   g is hij (including frozen core contribution)\nc     else\nc     ..   g is the nuclear repulsion + frozen core energy\nc     endif\nc     \n      read (5,*) nactiv,nelec,multi, symstate, nroot, thresh, prthresh\n      read(5,'(20i2)') (orbsyms(i),i=1,nactiv)\n      if (nroot .gt. maxroot) nroot = maxroot ! Dimension of roots and 1pdm\nc\nc initialise tables and common blocks for ci and onelcc\nc\n      call fci_setup(multi, nactiv, nelec, \n     $     orbsyms, symstate, nwalkosym, ndets, ncsf, nwalko)\nc\n      write(6,1) nactiv,nelec,multi,symstate,nwalkosym,ndets,ncsf,\n     $     (orbsyms(i),i=1,nactiv)\n1     format(/11x,'small full configuration interaction program'/\n     &        11x,'--------------------------------------------'//\n     &       ' no. of active orbitals .......... ',i8/\n     &       ' no. of active electrons ......... ',i8/\n     &       ' spin multiplicity ............... ',i8/\n     &       ' state symmetry .................. ',i8/\n     &       ' no. of orbital configurations ... ',i8/\n     &       ' no. of determinants in full ci .. ',i8/\n     &       ' no. of configurations in full ci  ',i8/\n     &       ' orbital symmetries .............. ',20i2)\n      write(6,*)\nc\nc     Read the integrals from the test ascii input file\nc\n      call fci_load(h, g, ecore)\nc\nc$$$      iv    = 1\nc$$$      iwork = iv + nroot*ndets\nc$$$      call dfill(0.0d0, work(iv), 1, ndets*nroot)\nc$$$      lwork = lenwrk - nroot*ndets\nc$$$c\nc$$$c     With a zero input vector it will use a default guess\nc$$$c\nc$$$      call fci_solve(nroot, thresh, 32, ecore, h, g, \nc$$$     $     work(iwork), lwork, roots, work(iv))\nc\n      call fci_solve(nroot, thresh, 32, ecore, h, g, \n     $     work, lenwrk, roots, evecfilename, diagfilename)\nc\nc     Eigenvectors now on disk, eigenvalues in array roots()\nc\nc     Allocate memory to hold all of the vectors, read them in\nc     and analyze them.\nc\n      iv    = 1\n      iwork = iv + nroot*ndets\n      lwork = lenwrk - nroot*ndets\nc\n      call fci_readevectors(ndets, nroot, work(iv), evecfilename)\nc\n      do iroot = 1, nroot\n         write(6,*)\n         write(6,*) ' Eigenvector number ', iroot\n         call fci_print_vector(work(iv+(iroot-1)*ndets), \n     $        prthresh, nwalko, nactiv, symstate-1)\n      enddo\nc\n      call fci_onepdm(work(iv), nroot, weight, onepdm)\n      call fci_1pdm(work(iv), nroot, onepdm)\n      call fci_2pdm(work(iv), nroot, twopdm, onepdm, \n     $     ecore, h, g)\n*      call fci_3pdm(work(iv), nroot, work(iwork), twopdm)\nc\nc     For a small FCI make the full Hamiltonian and diagonalize it\nc\n      if (ndets .le. maxhami) then\n         call fci_hami(hami, ecore, h, g, work, lenwrk)\n         if (lenwrk.lt.maxhami*(maxhami+2)) \n     $        call fci_err('more memory for hami ', lenwrk)\n         call yacobi(hami, work, ndets, evals, pivot, 1)\n         write(6,*)\n         write(6,*) ' Eigenvalues of the determinant Hamiltionian '\n         write(6,1101) (i,evals(i),i=1,ndets)\n 1101    format(1x,i5,2x,f20.8)\n         write(6,*)\n         write(6,*) ' Eigenvectors of the determinant Hamiltonian '\n         do i = 1, min(10,ndets)\n            write(6,*)\n            write(6,*) ' Eigenvector number ', i, evals(i)\n            write(6,*)\n            call fci_print_vector(work(1+(i-1)*ndets), prthresh,\n     $           nwalko, nactiv, symstate-1)\n            write(6,*)\n         enddo\n      endif\nc\n      call fci_tprint()\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_1pdm.F",
    "content": "*\n* $Id: fci_1pdm.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine fci_1pdm(vec, nvec, onepdm)\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     Compute the 1-particle density matrices connecting the nvec \nc     CI vectors.  This routine aids in testing the fci_couple1 routine.\nc\nc     onepdm(p,q,ivec,jvec) returns <V(ivec)|Epq|V(jvec)>\nc\n      integer nvec              ! [input] No. of vectors\n      double precision vec(ndets, nvec) ! [input] The CI vectors\n      double precision onepdm(nactiv,nactiv,nvec,nvec) ! [output] 1 PDMs\nc\n      integer nvecmx           ! Maximum value of nvec\n      parameter (nvecmx=3) \n      double precision epq(ndetmx*nvecmx*nactmx)\n      integer numq, qlist(nactmx)\n      integer iwalk, idim, iocc(nactmx), nsi, ioff, p, q, qq\n      integer ivec, jvec, ivq, w, sym\n      double precision sum\nc\nc     Workspace for diagonalization of 1-pdm for debugging\nc\n      double precision pdm(nactmx*nactmx), evecs(nactmx,nactmx),\n     $     evals(nactmx), iwork(nactmx)\nc\n      if (nvec.gt.nvecmx) call fci_err('fci_1pdm: nvecmx? ', nvec)\nc\n      call dfill(0.0d0, onepdm, 1, nactiv*nactiv*nvec*nvec)\nc\nc     Loop thru orbital walks I and get information\nc\n      do 10 iwalk = 1, nwalko\n         call fci_owalk_info(iwalk, iocc, nsi, ioff, idim, sym)\n         if (sym .ne. statesym) goto 10\nc\nc     Loop thru orbitals p\nc\n         do p = 1, nactiv\nc\nc     Form  <V|Epq|Iw> for all q\nc\n            call fci_couple1(vec, nvec, p, iocc, idim, \n     $           numq, qlist, epq)\nc\nc     Multiply with the CI vectors and add into the matrices\nc\n            do qq = 1, numq\n               q = qlist(qq)\n               do ivec = 1, nvec\n                  ivq = idim*(ivec-1 + nvec*(qq-1)) ! epq(idim,nvec,nactiv)\n                  do jvec = 1, nvec\n                     sum = 0.0d0\n                     do w = 1, idim\n                        sum = sum + epq(ivq+w)*vec(ioff+w,jvec)\n                     enddo\n                     onepdm(p,q,ivec,jvec) = onepdm(p,q,ivec,jvec) + sum\n                  enddo\n               enddo\n            enddo\n         enddo\n 10      continue               ! iwalk loop\nc\nc     Done.  \nc\nc     For debugging check the <ivec|Epq|jvec> = <jvec|Eqp|ivec>\nc\n      do ivec = 1, nvec\n         do jvec = 1, nvec\n            write(6,*) ' PDM ', ivec, jvec\n            call fci_output(onepdm(1,1,ivec,jvec),1,nactiv,\n     $           1,nactiv,nactiv,nactiv,1)\n            do p = 1, nactiv\n               do q = 1, nactiv\n                  if (abs(onepdm(p,q,ivec,jvec)-onepdm(q,p,jvec,ivec))\n     $                 .gt. 1d-10) call fci_err\n     $                 ('fci_1pdm: not symmetric ', 0)\n               enddo\n            enddo\n            write(6,*) ' 1pdm ', ivec,jvec,' has correct symmetry'\n         enddo\n      enddo\nc\nc     For debugging check that sum(p) <ivec|Epp|ivec> = nelec\nc\n      do ivec = 1, nvec\n         sum = 0.0d0\n         do p = 1, nactiv\n            sum = sum + onepdm(p,p,ivec,ivec)\n         enddo\n         write(6,*) ' 1pdm ', ivec,ivec,' has trace', sum\n         if (abs(sum-dfloat(nelec)).gt.1d-10) call fci_err\n     $        ('fci_1pdm: incorrect trace ', ivec)\n      enddo\nc\nc     For debugging diagonalize <ivec|Epp|ivec> and ensure it\nc     it is positive definite with all eigenvalues < 2\nc\n      do ivec = 1, nvec\n         do p = 1, nactiv\n            do q = 1, p\n               pdm(p*(p-1)/2+q) = onepdm(p,q,ivec,ivec)\n            enddo\n         enddo\n         call yacobi(pdm,evecs,nactiv,evals,iwork,2)\n         write(6,*) ' Natural orbital occupations for ', ivec\n         call fci_output(evals,1,nactiv,1,1,nactiv,1,1)\n         write(6,*) ' Natural orbitals for ', ivec\n         call fci_output(evecs,1,nactiv,1,nactiv,nactiv,nactiv,1)\n         do p = 1, nactiv\n            if (evals(p).lt.-1d-10 .or. (evals(p)-2.0d0).gt.1d-10)\n     $           call fci_err('fci_1pdm: invalid 1pdm eigenvalue',p)\n         enddo\n      enddo\nc\n      end\n\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_2pdm.F",
    "content": "*\n* $Id: fci_2pdm.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine fci_2pdm(vec, nvec, twopdm, onepdm, ecore, h, g)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     Compute the 2-particle density matrices connecting the nvec \nc     CI vectors.  This routine aids in testing the fci_couple2 routine.\nc     It is more efficient to compute the actual 2-pdm with another\nc     factorization <Epq,rs> = <EpaErb|Kx><Kx|EbsEaq> (or variations\nc     thereof).\nc     \nc     The 1-pdm and integrals are passed in here solely to test \nc     the 2-pdm trace and energies\nc     \nc     twopdm(p,q,r,s,ivec,jvec) returns <V(ivec)|Epq,rs|V(jvec)>\nc     \n      integer nvec              ! [input] No. of vectors\n      double precision vec(ndets, nvec) ! [input] The CI vectors\n      double precision twopdm(nactiv,nactiv,nactiv,nactiv,nvec,nvec) ! [output]\n      double precision onepdm(nactiv,nactiv,nvec,nvec)\n      double precision ecore\n      double precision h(nacttr)\n      double precision g(nacttr,nacttr)\nc     \n      integer nvecmx            ! Maximum value of nvec\n      parameter (nvecmx=3) \n      double precision epqrs(ndetmx*nvecmx*nactmx*nactmx) ! Workspace\n      integer numqs, qslist(2,nactmx*nactmx)\n      integer iwalk, idim, iocc(nactmx), nsi, ioff, p, q, r, s, qs\n      integer ivec, jvec, ivqs, w, shi, sym\n      double precision sum, diff, test, count\nc     \n      integer ind\n      ind(p,q) = max(p,q)*(max(p,q)-1)/2 + min(p,q)\nc     \n      test = 1d-4\n      count = 0.0d0\nc     \n      if (nvec.gt.nvecmx) call fci_err('fci_2pdm: nvecmx? ', nvec)\nc     \n      call dfill(0.0d0,twopdm,1,nactiv*nactiv*nactiv*nactiv*nvec*nvec)\nc     \nc     Loop thru orbital walks I and get information\nc     \n      do 10 iwalk = 1, nwalko\n         call fci_owalk_info(iwalk, iocc, nsi, ioff, idim, sym)\n         if (sym .ne. statesym) goto 10\n*     write(6,*) ' iwalk ', iwalk\nc     \nc     Loop thru orbitals p and r\nc     \n         do p = 1, nactiv\n            do r = 1, p\nc     \nc     Form  <V|Epq,rs|Iw> for all q,s\nc     \n               call fci_couple2(vec, nvec, p, r, iocc, idim, \n     $              numqs, qslist, epqrs)\n               count = count + numqs*idim*nvec\nc     \nc     Multiply with the CI vectors and add into the matrices\nc     \n               do qs = 1, numqs\n                  q = qslist(1,qs)\n                  s = qslist(2,qs)\n                  do ivec = 1, nvec\n                     ivqs = idim*(ivec-1 + nvec*(qs-1))\n                     do jvec = 1, nvec\n                        sum = 0.0d0\n                        do w = 1, idim\n                           sum = sum + epqrs(ivqs+w)*vec(ioff+w,jvec)\n                        enddo\n                        twopdm(p,q,r,s,ivec,jvec) = \n     $                       twopdm(p,q,r,s,ivec,jvec) + sum\n                     enddo\n                  enddo\n               enddo\n            enddo\n         enddo\n 10   continue                  ! iwalk loop\nc     \nc     Symmetrize (pq) <-> (rs)\nc     \n      do ivec = 1, nvec\n         do jvec = 1, nvec\n            do p = 1, nactiv\n               do r = 1, p\n                  do q = 1, nactiv\n                     shi = nactiv\n                     if (p .eq. r) shi = q\n                     do s = 1, shi\n                        twopdm(r,s,p,q,ivec,jvec) = \n     $                       twopdm(p,q,r,s,ivec,jvec)\n                     enddo\n                  enddo\n               enddo\n            enddo\n         enddo\n      enddo\nc     \n      write(6,31) count\n 31   format(/' No. of non-zero two-body coupling coeffs ', 1p, d9.2/)\nc     \nc     Done.  \nc     \nc     For debugging check : \nc     <ivec|Epq,rs|jvec> = <jvec|Eqp,sr|ivec>\nc     <ivec|Epq,rs|jvec> = <ivec|Ers,pq|jvec> ... now that we use this\nc     symmetry in the computation this test is nearly useless.\nc     \n      do ivec = 1, nvec\n         do jvec = 1, nvec\nc$$$  write(6,*) ' TWOPDM ', ivec, jvec\nc$$$  do p = 1, nactiv\nc$$$  do q = 1, nactiv\nc$$$  do r = 1, nactiv\nc$$$  do s = 1, nactiv\nc$$$  write(6,112) p,q,r,s,twopdm(p,q,r,s,ivec,jvec)\nc$$$  112                    format(4i5,2x,f10.6)\nc$$$  enddo\nc$$$  enddo\nc$$$  enddo\nc$$$  enddo\n            do p = 1, nactiv\n               do q = 1, nactiv\n                  do r = 1, nactiv\n                     do s = 1, nactiv\nc     \n                        diff = twopdm(p,q,r,s,ivec,jvec) - \n     $                       twopdm(q,p,s,r,jvec,ivec)\n                        if (abs(diff) .gt. test) call fci_err\n     $                       ('fci_2pdm: symmetry 1 fails',\n     $                       1000*p+100*q+10*r+s)\nc     \n                        diff = twopdm(p,q,r,s,ivec,jvec) - \n     $                       twopdm(r,s,p,q,ivec,jvec)\n                        if (abs(diff) .gt. test) call fci_err\n     $                       ('fci_2pdm: symmetry 2 fails',\n     $                       1000*p+100*q+10*r+s)\n                     enddo\n                  enddo\n               enddo\n            enddo\n            write(6,*) ' 2pdm ', ivec,jvec,' has correct symmetry'\n         enddo\n      enddo\nc     \nc     For debugging check that sum(s) Fpq,ss = (nelec-1)*Ppq\nc     \n      do ivec = 1, nvec\n         do jvec = 1, nvec\n            do p = 1, nactiv\n               do q = 1, nactiv\n                  sum = 0.0d0\n                  do s = 1, nactiv\n                     sum = sum + twopdm(p,q,s,s,ivec,jvec)\n                  enddo\n                  sum = sum / dfloat(nelec-1)\n                  if (abs(sum-onepdm(p,q,ivec,jvec)) .gt. test) \n     $                 call fci_err('2pdm - trace is incorrect', 0)\n               enddo\n            enddo\n            write(6,*) ' 2pdm ', ivec, jvec, ' has correct trace'\n         enddo\n      enddo\nc     \nc     Compute the expectation value of the Hamiltonian from\nc     the density matrices.\nc     \n      do ivec = 1, nvec\n         do jvec = 1, nvec\n            sum = 0.0d0\n            do p = 1, nactiv\n               do q = 1, nactiv\n                  sum = sum + onepdm(p,q,ivec,jvec)*h(ind(p,q))\nc     \n                  do r = 1, nactiv\n                     do s = 1,nactiv\n                        sum = sum + 0.5d0*twopdm(p,q,r,s,ivec,jvec)*\n     $                       g(ind(p,q),ind(r,s))\n                     enddo\n                  enddo\n               enddo\n            enddo\n            if (ivec.eq.jvec) sum = sum + ecore\n            write(6,77) ivec, jvec, sum\n 77         format(' H(',i2,',',i2,') = ', f20.8)\n         enddo\n      enddo\nc     \n      end\n\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_3pdm.F",
    "content": "*\n* $Id: fci_3pdm.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine fci_3pdm(vec, nvec, work, twopdm)\n      implicit none\n#include \"fciinfo.fh\"\nc     \n      integer nvec              ! [input] No. of vectors\n      double precision vec(ndets, nvec) ! [input] The CI vectors\n      double precision work(nactiv,nactiv,nactiv,nactiv,nvec,nvec)\n      double precision twopdm(nactiv,nactiv,nactiv,nactiv,nvec,nvec) ! [output]\n      integer nvecmx            ! Maximum value of nvec\n      parameter (nvecmx=3) \n      double precision epqrstu(ndetmx*nvecmx*nactmx*nactmx) ! Workspace\n      integer numsu, sulist(2,nactmx*nactmx)\n      integer iwalk, idim, iocc(nactmx), nsi, ioff, p, q, r, s, t, u, su\n      integer pq, rs, tu, sym\n      integer ivec, jvec, ivsu, w, uhi\n      double precision sum, diff, test, count\nc     \nc     Test code for the 3-pdm coupling coeff generation ... there are\nc     much more efficient ways to compute the actual density matrix.\nc     \n      integer indsq\n      indsq(p,q) = (p-1)*nactiv + q\nc     \n      test = 1d-4\n      count = 0.0d0\nc     \n      if (nvec.gt.nvecmx) call fci_err('fci_2pdm: nvecmx? ', nvec)\nc     \nc     Generate all of the coupling coefficients test the code\nc     but only accumulate the sum(p) Epp,rs,tu for comparison\nc     with the two-pdm\nc\n      call dfill(0.0d0, work, 1, (nactiv**4)*(nvec**2))\n      count = 0.0d0\n      do p = 1, nactiv\n         do q = 1, nactiv\n            pq = indsq(p,q)\n            do 10 iwalk = 1, nwalko\n               call fci_owalk_info(iwalk, iocc, nsi, ioff, idim, sym)\n               if (sym.ne.statesym .or. iocc(q).eq.1) goto 10\n               do r = 1, p\n                  do t = 1, r\n                     call fci_couple3(vec, nvec, p, q, r, t, \n     $                    iocc, idim, numsu, sulist, epqrstu)\n                     count = count + numsu*idim*nvec\nc     \n                     do su = 1, numsu\n                        s = sulist(1,su)\n                        u = sulist(2,su)\n                        rs = indsq(r,s)\n                        tu = indsq(t,u)\n                        do ivec = 1, nvec\n                           ivsu = idim*(ivec-1 + nvec*(su-1))\n                           do jvec = 1, nvec\n                              sum = 0.0d0\n                              do w = 1, idim\n                                 sum = sum + epqrstu(ivsu+w)*\n     $                                vec(ioff+w,jvec)\n                              enddo\nc\n                              if (p.eq.q) \n     $                             work(r,s,t,u,ivec,jvec) = \n     $                                work(r,s,t,u,ivec,jvec) + sum\n                              if (pq.ne.rs .and. r.eq.s)\n     $                             work(p,q,t,u,ivec,jvec) = \n     $                             work(p,q,t,u,ivec,jvec) + sum\n                              if (pq.ne.tu .and. rs.ne.tu .and. t.eq.u) \n     $                             work(r,s,p,q,ivec,jvec) = \n     $                             work(r,s,p,q,ivec,jvec) + sum\n                           enddo\n                        enddo\n                     enddo\n                  enddo\n               enddo\n 10         continue            ! iwalk loop\n         enddo\n      enddo\nc\nc     Must still symmetrize off-diagonal over rs,tu\nc\n      do ivec = 1, nvec\n         do jvec = 1, nvec\n            do r = 1, nactiv\n               do s = 1, nactiv\n                  do t = 1, r\n                     uhi = nactiv\n                     if (t.eq.r) uhi = s - 1 ! Off diagonal only\n                     do u = 1, uhi\n                        sum = work(r,s,t,u,ivec,jvec) + \n     $                       work(t,u,r,s,ivec,jvec)\n                        work(r,s,t,u,ivec,jvec) = sum\n                        work(t,u,r,s,ivec,jvec) = sum\n                     enddo\n                  enddo\n               enddo\n            enddo\n         enddo\n      enddo\nc     \n      write(6,1) count\n 1    format(/' No. of 3-particle coupling coeffs = ', 1p,d9.2)\nc     \nc     Test the PQ trace\nc     \n      do ivec = 1, nvec\n         do jvec = 1, nvec\n            do u = 1, nactiv\n               do t = 1, nactiv\n                  do s = 1, nactiv\n                     do r = 1, nactiv\n                        diff = twopdm(r,s,t,u,ivec,jvec) - \n     $                       work(r,s,t,u,ivec,jvec)/dfloat(nelec-2)\n                        if (abs(diff) .gt. test) call fci_err\n     $                       ('3pdm: bad trace ',1000*r+100*s+10*t+u)\n                     enddo\n                  enddo\n               enddo\n            enddo\n            write(6,*) ' 3-pdm ', ivec, jvec, ' has good pq trace'\n         enddo\n      enddo\nc     \n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_axb.F",
    "content": "*\n* $Id: fci_axb.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine fci_axb(ni, nj, nk, a, b, c)\n      implicit none\nc\n      integer ni, nj, nk\n      double precision c(ni, nj), a(ni, nk), b(nk, nj)\nc\nc     c(i,j) = sum(k) a(i,k)*b(k,j)\nc\n      integer ilo, ihi, jlo, jhi, klo, khi\n      integer i, j, k, ndoi\n      integer ichunk, jchunk, kchunk\n      parameter (ichunk=192, jchunk=32, kchunk=32) ! IBM 755CX\n*      parameter (ichunk=100, jchunk=8, kchunk=8)\nc\n      do jlo = 1,nj,jchunk\n         jhi = min(nj,jlo+jchunk-1)\n         do ilo = 1,ni,ichunk\n            ihi = min(ni,ilo+ichunk-1)\n            ndoi = ihi - ilo + 1\n            do j = jlo, jhi\n               do i = ilo, ihi\n                  c(i,j) = 0.0d0\n               enddo\n            enddo\n            do klo = 1,nk,kchunk\n               khi = min(nk,klo+kchunk-1)\nc\n               do j = jlo, jhi\n                  do k = klo, khi\n                     if (b(k,j) .ne. 0.0d0) then\n#ifdef LINUX\n                        call daxpy(ndoi,b(k,j),a(ilo,k),1,c(ilo,j),1)\n#else\n                        do i = ilo, ihi\n                           c(i,j) = c(i,j) + a(i,k)*b(k,j)\n                        enddo\n#endif\n                     endif\n                  enddo\n               enddo\nc$$$c OK\nc$$$               do k = klo, khi\nc$$$                  do j = jlo, jhi\nc$$$                     if (b(k,j) .ne. 0.0d0) then\nc$$$                        do i = ilo, ihi\nc$$$                           c(i,j) = c(i,j) + a(i,k)*b(k,j)\nc$$$                        enddo\nc$$$                     endif\nc$$$                  enddo\nc$$$               enddo\nc\n            enddo\n         enddo\n      enddo\nc\n      end\n\n         \n"
  },
  {
    "path": "src/apps/moldft/fci/fci_cntone.F",
    "content": "*\n* $Id: fci_cntone.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine fci_cntone(nonelt,nonemx)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     1) count all non-zero one-electron coupling coefficents -> nonelt\nc     2) find the maximum involving any given orbital configuration -> nonemx\nc\nc     This new version just estimates the information.\nc     nonemx is about 2x too big, nonelt is about 50% too big\nc     \n      integer nonelt            ! [output]\n      integer nonemx            ! [output]\nc\n      integer kocc(nactmx),indbar(nactmx)\n      logical oprint\nc\n      integer ns, k, nspt, mkdim, ntest,kwalk, kdet, nd\nc\n      oprint =.false.\n      nonelt = 0\n      nonemx = 0\n      \n      call fci_tstart(11,.false.)\nc     find occupancy, compute no. of open shells and indbar vector\n      do 5 kwalk = 1,nwalko\n         call fci_ofind_occ(kwalk,kocc)\n         kdet = indexo(kwalk)\n         ns = 0\n         nd = 0\n         do 10 k = 1,nactiv\n            if (kocc(k).eq.2) ns = ns + 1\n            if (kocc(k).eq.3) nd = nd + 1\n            indbar(k) = ns\n 10      continue\n         nspt = ns/2 + 1\n         mkdim = mnsdet(ns)\n         if (mkdim.eq.0) goto 5\n         ntest = nd*(1+2*(nactiv+1-ns-nd)) + ns*(nactiv+1)\n         ntest = ntest*mkdim\n         if (nonemx .lt. ntest) nonemx = ntest\n         nonelt = nonelt + ntest\n 5    continue\n      call fci_tfinish(11,.false.)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_couple1.F",
    "content": "*\n* $Id: fci_couple1.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine fci_couple1(vec, nvec, p, iocc, idim, \n     $     numq, qlist, epq)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     Compute <V|Epq|Iw> for given CI vectors V, fixed \nc     orbital p, fixed orbital occupancy I (iocc), and all orbitals q\nc     and primitive spin functions w.\nc     \nc     numq returns the number of orbitals q giving a nonzero interaction\nc     \nc     qlist(1...numq) contains the values of q\nc     \nc     epq(1...idim,1...nvec,1...numq) contains the coupling coeffcients\nc     \n      integer nvec              ! [input] No. of vectors on the left hand side\n      double precision vec(ndets,nvec) ! [input] The CI vectors\n      integer p                 ! [input] Fixed label on Epq\n      integer iocc(nactiv)      ! [input] Orbital occupation of I\n      integer idim              ! [input] No. of spin functions for I\n      integer numq              ! [output] Returns the number of q\n      integer qlist(*)          ! [output] Returns the list of interacting q\n      double precision epq(idim,nvec,*) ! [output] epq(w,i,q) = <Vi|Epq|Iw>\nc     \nc     <V|Epq|Iw> = sum(Jv) V(Jv) <Jv|Epq|Iw> \nc     .          = sum(Jv) V(Jv) sum(u) <Jv|Epa|Ku><Ku|Eaq|Iw>\nc     .          = sum(Jv) V(Jv) sum(u) <Ku|Eap|Jv><Ku|Eaq|Iw>\nc     \nc     The strategy is then to\nc     \nc     1) Loop over q occupied in I \nc     2) Form <Ku|Eaq|Iw>\nc     3) Determine K\nc     4) Determine occupations in J \nc     5) Form <Ku|Eap|Jv>\nc     6) For each vector V <V|Epq|Iw> = sum(u) <Ku|Eap|Jv><Ku|Eaq|Iw>\nc     .  noting that v = v(u).  If result is non-zero then add it in.\nc     \n      integer indbar(nactmx)    ! Position amoung singly occupied for I/K\n      integer jperm(ndetmx), iperm(ndetmx) ! Permutations of spin functions\n      double precision jval(ndetmx), ival(ndetmx) ! Phase factors\nc     \n      integer nsi, nsj, nsk     ! No. of unpaired spins in I, J, and K\n      integer jdim, kdim        ! No. of determinants for J and K\n      integer np, nq            ! Occuption of p in J and q in I\n      integer jwalk             ! Lexical index of J\n      integer jdet              ! Offset of J in CI vector\n      integer symi              ! Symmetry of I\n      integer symq              ! Required symmetry for q\n      integer q, w, u, v, pbar, qbar, deltaq, idummy, i, qlo, qhi, ivec\n      double precision sum, value\n#include \"bitops.fh\"      \nc     \n      call fci_tstart(1,.false.)\n      numq = 1\nc     \nc     Find I occupancy, compute no. of open shells and I indbar vector\nc     \n      nsi = 0\n      symi = 0\n      do i = 1,nactiv\n         if (iocc(i).eq.2) then\n            nsi = nsi + 1\n            symi = ieor(symi,orbsym(i))\n         endif\n         indbar(i) = nsi\n      enddo\n      if (idim .ne. mnsdet(nsi)) call fci_err\n     $     ('fci_couple1: mismatch for idim ', idim)\nc\n      symq = ieor(ieor(symi,orbsym(p)),statesym)\nc     \nc     Loop thru occupied q.  Note that if p is doubly occupied in\nc     I then the only non-zero value is for q=p\nc     \n      if (iocc(p) .eq. 3) then\n         qlo = p\n         qhi = p\n      else\n         qlo = 1\n         qhi = nactiv\n      endif\nc     \n      do q = qlo, qhi\n         nq = iocc(q)-1\n         if (nq.gt.0 .and. orbsym(q).eq.symq) then\n            iocc(q) = iocc(q) - 1 ! iocc now refers to K\nc\n            np = iocc(p)        ! Since iocc refers to K and we want J\n            if (np .lt. 3) then\n               iocc(p) = iocc(p) + 1 ! iocc now refers to J\nc\nc     Form <Ku|Eaq|Iw>\nc     \n               qbar = indbar(q)\n               nsk  = nsi\n               deltaq = -1\n               if (nq .eq. 2) then\n                  nsk = nsk + 2\n                  qbar = qbar + 1\n                  deltaq = 1\n               endif\n               kdim = mnsdet(nsk)\n               call fci_apply_eaj(qbar, nq, idim, kdim, \n     $              eajdata(eajptr(nsi)), eajphase(1,1,nsi), .true.,\n     $              idummy, idummy, iperm, ival)\nc     \nc     Determine info about J orbital occupation\nc     \n               call fci_ofind_weight(jwalk,iocc)\n               pbar = indbar(p)\n               if (np .eq. 1) pbar = pbar + 1 ! Since indbar refers to K\n               if (p .ge. q) pbar = pbar + deltaq\n               nsj = nsk\n               if (np .eq. 2) nsj = nsj - 2 \n               jdim = mnsdet(nsj)\nc     \nc     Form <Ku|Eap|Jv>\nc     \n               call fci_apply_eaj(pbar, np, jdim, kdim, \n     $              eajdata(eajptr(nsj)), eajphase(1,1,nsj), .true.,\n     $              idummy, idummy, jperm, jval)\nc     \nc     Now use <Jv|Epq|Iw> = <Ku|Eap|Jv>*<Ku|Eaq|Iw>\nc     \nc     noting w(u)=iperm(u), v(u)=jperm(u), <Ku|Eap|Jv>=jval(u) and\nc     .      <Ku|Eaq|Iw>=ival(u)\nc     \n               do ivec = 1, nvec\n                  do w = 1, idim\n                     epq(w,ivec,numq) = 0.0d0\n                  enddo\n               enddo\nc     \n               jdet = indexo(jwalk)\n               sum = 0.0d0\n               do ivec = 1, nvec\n                  do u = 1, kdim\n                     v = jperm(u)\n                     w = iperm(u)\n                     value = vec(jdet+v,ivec)*jval(u)*ival(u)\n                     epq(w,ivec,numq) = epq(w,ivec,numq) + value\n                     sum = sum + value*value\n                  enddo\n               enddo\n               if (abs(sum) .gt. 0.0d0) then\n                  qlist(numq) = q\n                  numq = numq + 1\n               endif\nc\n               iocc(p) = iocc(p) - 1 ! iocc now refers to K\n            endif\nc     \n            iocc(q) = iocc(q) + 1 ! iocc now refers to I\n         endif\n      enddo\nc     \n      numq = numq - 1\nc     \n      call fci_tfinish(1,.false.)\nc\n      end\n      \n"
  },
  {
    "path": "src/apps/moldft/fci/fci_couple2.F",
    "content": "*\n* $Id: fci_couple2.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine fci_couple2(vec, nvec, p, r, iocc, idim, \n     $     numqs, qslist, epqrs)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     Compute <V|Epq,rs|Iw> for given CI vectors V, fixed orbitals\nc     p and r, fixed orbital occupancy I (iocc), and all orbitals q and s,\nc     and primitive spin functions w.\nc\nc     The constraint (pq) >= (rs) is applied, so we loop over all q but\nc     restrict the s loop.  If couple2 is called with p>=r then all unique\nc     coeffs are generated.\nc\nc     numqs returns the number of orbitals q, s giving a nonzero interaction\nc     \nc     qslist(1, 1...numqs) contains the values of q\nc     qslist(2, 1...numqs) contains the values of s\nc     \nc     epqrs(1...idim,1...nvec,1...numqs) contains the coupling coeffcients\nc     \n      integer nvec              ! [input] No. of vectors on the left hand side\n      double precision vec(ndets,nvec) ! [input] The CI vectors\n      integer p, r              ! [input] Fixed labels on Epq,rs\n      integer iocc(nactiv)      ! [input] Orbital occupation of I\n      integer idim              ! [input] No. of spin functions for I\n      integer numqs             ! [output] Returns the number of q, s\n      integer qslist(2,*)       ! [output] Returns the list of interacting q,s\n      double precision epqrs(idim,nvec,*) ! [output] epq(w,i,q) = <Vi|Epqrs|Iw>\nc     \nc     <V|Epq,rs|Iw> = sum(Jv) V(Jv) <Jv|EpaErbEbsEaq|Iw> \nc     .  = sum(Jx) V(Jv) <Jv|EpaErb|Mx><Mx|EbsEaq|Iw>\nc     .  = sum(Jx) V(Jv) (<Jv|Epa|Ny><Ny|Erb|Mx>)(<Mx|Ebs|Ku><Ku|Eaq|Iw>)\nc     .  = sum(Jx) V(Jv) (<Ny|Eap|Jv><Mx|Ebr|Ny>)(<Mx|Ebs|Ku><Ku|Eaq|Iw>)\nc\nc     Where we have v(x), y(x), u(x), w(x)\nc\nc     where a and b are fictitious orbitals with b > a\nc     \nc     The strategy is then to\nc     \nc     1) Loop over q occupied in I \nc     2) Form <Ku|Eaq|Iw>\nc     3) Determine occupations in K\nc     4) Loop over s occupied in K\nc     5) Determine occupations in M\nc     6) Form <Mx|Ebs|Ku><Ku|Eaq|Iw>\nc     7) Determine occupations in N\nc     8) Determine occupations in J \nc     9) Form <Ny|Eap|Jv>\nc     10) Form <Ny|Eap|Jv><Mx|Ebr|Ny>\nc     11) For each vector V complete the final summation over x\nc     .   noting that we have v(x) and w(x).  If the result is non-zero\nc     .   then add it in.\nc\nc     Defer as much computation as possible until we have satisfied\nc     all possible occupation and sparsity tests.\nc     \n      integer indbar(nactmx)    ! Position amoung singly occupied I/K/M/N/J\n      integer kperm(ndetmx), jperm(ndetmx), \n     $     nperm(ndetmx), iperm(ndetmx) ! Permutations of spin functions\n      double precision kval(ndetmx), nval(ndetmx),\n     $     jval(ndetmx), ival(ndetmx) ! Accumulated phase factors\nc     \n      integer nsi, nsj, nsk, nsm, nsn ! No. of unpaired spins in I/J/K/M/N\n      integer jdim, kdim, mdim, ndim ! No. of determinants for J/K/M/N\n      integer np                ! Occuption of p in J\n      integer nq                ! Occupation of q in I\n      integer ns                ! Occupation of s in K\n      integer nr                ! Occupation of r in N\n      integer jwalk             ! Lexical index of J\n      integer jdet              ! Offset of J in CI vector\n      integer sympr             ! Sym product  state*I*p*r\n      integer syms              ! Required symmetry of s\n      integer q, s, w, x, v, pbar, qbar, rbar, sbar, shi,\n     $     deltaq, deltar, deltas, idummy, i, ivec\n      double precision sum, dummy\n      logical omade_ival        ! Used to defer computation\n      double precision thresh\n      parameter (thresh = 1d-12) ! Should be SQUARE of desired accuracy\n#include \"bitops.fh\"      \nc     \n      call fci_tstart(2,.false.)\n      numqs = 1\nc     \nc     Find I occupancy, compute no. of open shells and I indbar vector\nc     \n      nsi  = 0\n      sympr = ieor(statesym,ieor(orbsym(p),orbsym(r)))\n      do i = 1,nactiv\n         if (iocc(i).eq.2) then\n            nsi = nsi + 1\n            sympr = ieor(sympr,orbsym(i))\n         endif\n         indbar(i) = nsi\n      enddo\n      if (idim .ne. mnsdet(nsi)) call fci_err\n     $     ('fci_couple2: mismatch for idim ', idim)\nc     \nc     Loop thru occupied q.\nc     \n      do q = 1, nactiv\n         nq = iocc(q)-1\n         if (nq .gt. 0) then\n            iocc(q) = iocc(q) - 1 ! iocc now refers to K\nc\nc     Get info about q and K\nc     \n            qbar = indbar(q)\n            nsk  = nsi\n            deltaq = -1\n            if (nq .eq. 2) then\n               deltaq = 1\n               nsk = nsk + 2\n               qbar = qbar + 1\n            endif\n            kdim = mnsdet(nsk)\nc\nc     Defer forming <Ku|Eaq|Iw> until we know it will be used\nc\n            omade_ival = .false.\nc     \nc     Loop thru s occupied in K with condition (pq) <= (rs)\nc\n            syms = ieor(orbsym(q),sympr)\n            shi = nactiv\n            if (p .eq. r) shi = q\n            do s = 1, shi\n               ns = iocc(s)-1   ! Occupation of s in K\n               if (ns.gt.0 .and. orbsym(s).eq.syms) then\n                  iocc(s) = iocc(s) - 1 ! iocc now refers to M\nc\n                  nr = iocc(r)  ! Since iocc refers to M and we want N\n                  if (nr .lt. 3) then\n                     iocc(r) = iocc(r) + 1 ! iocc now refers to N\nc     \n                     np = iocc(p) ! Since iocc refers to N and we want J\n                     if (np .lt. 3) then\n                        iocc(p) = iocc(p) + 1 ! iocc now refers to J\nc\n                        nsm  = nsk\n                        if (ns .eq. 2) nsm = nsm + 2\nc\n                        nsn = nsm\n                        if (nr .eq. 2) nsn = nsn - 2\nc\n                        nsj = nsn\n                        if (np .eq. 2) nsj = nsj - 2 \nc     \nc     Determine the index of J in the CI vector and apply sparsity test\nc\n                        jdim = mnsdet(nsj)\n                        call fci_ofind_weight(jwalk,iocc)\n                        jdet = indexo(jwalk)\nc\n                        sum = 0.0d0\n                        do ivec = 1, nvec\n                           do v = 1, jdim\n                              sum = sum + \n     $                             vec(jdet+v,ivec)*vec(jdet+v,ivec)\n                           enddo\n                        enddo\n                        if (sum .gt. thresh) then\nc\nc     More detailed info about s and M\nc\n                           deltas = -1\n                           sbar = indbar(s)\n                           if (ns .eq. 2) then\n                              sbar = sbar + 1\n                              deltas = 1\n                           endif\n                           mdim = mnsdet(nsm)\n                           if (s .ge. q) sbar = sbar + deltaq\nc\nc     More detailed info about r and N\nc\n                           deltar = 1\n                           rbar = indbar(r)\n                           if (nr .eq. 2) then\n                              deltar = -1\n                              rbar = rbar + 1\n                           endif\n                           ndim = mnsdet(nsn)\n                           rbar = rbar + deltar\n                           if (r .ge. q) rbar = rbar + deltaq\n                           if (r .ge. s) rbar = rbar + deltas\nc\nc     More detailed info about p and J\nc\n                           pbar = indbar(p)\n                           if (np .eq. 1) pbar = pbar + 1 ! Indbar refers to N\n                           if (p .ge. q) pbar = pbar + deltaq\n                           if (p .ge. s) pbar = pbar + deltas\n                           if (p .ge. r) pbar = pbar + deltar\nc\nc     If not already done form <Ku|Eaq|Iw>\nc\n                           if (.not. omade_ival) then\n                              call fci_apply_eaj(qbar, nq, idim, kdim, \n     $                             eajdata(eajptr(nsi)), \n     $                             eajphase(1,1,nsi), .true.,\n     $                             idummy, dummy, iperm, ival)\n                              omade_ival = .true.\n                           endif\nc     \nc     Form <Mx|EbsEaq|Iw> = <Mx|Ebs|Ku><Ku|Eaq|Iw>\nc     \n                           call fci_apply_eaj(sbar, ns, kdim, mdim, \n     $                          eajdata(eajptr(nsk)), eajphase(1,1,nsk),\n     $                          .false., iperm, ival, kperm, kval)\nc     \nc     Form <Ny|Eap|Jv>\nc     \n                           call fci_apply_eaj(pbar, np, jdim, ndim, \n     $                          eajdata(eajptr(nsj)), eajphase(1,1,nsj),\n     $                          .true., idummy, dummy, jperm, jval)\nc     \nc     Form <Jv|EpaErb|Mx> = <Ny|Eap|Jv><Mx|Ebr|Ny>\nc     \n                           call fci_apply_eaj(rbar, nr, ndim, mdim, \n     $                          eajdata(eajptr(nsn)), eajphase(1,1,nsn),\n     $                          .false., jperm, jval, nperm, nval)\nc     \nc     Now use <V|Epq,rs|Iw> = sum(x) V(Jv) <Mx|EapEbr|Ny><Mx|EbsEaq|Iw>\nc     .\nc     .   noting that we have v(x) and w(x)\n                           \nc     \n                           do ivec = 1, nvec\n                              do w = 1, idim\n                                 epqrs(w,ivec,numqs) = 0.0d0\n                              enddo\n                           enddo\nc     \n                           do ivec = 1, nvec\n                              do x = 1, mdim\n                                 v = nperm(x)\n                                 w = kperm(x)\n                                 epqrs(w,ivec,numqs) = \n     $                                epqrs(w,ivec,numqs) + \n     $                                vec(jdet+v,ivec)*nval(x)*kval(x)\n                              enddo\n                           enddo\n                           qslist(1,numqs) = q\n                           qslist(2,numqs) = s\n                           numqs = numqs + 1\n                        endif   ! sum.gt.thresh\nc\n                        iocc(p) = iocc(p) - 1 ! iocc now refers to N\n                     endif      ! np.lt.3\nc\n                     iocc(r) = iocc(r) - 1 ! iocc now refers to M\n                  endif         ! nr.lt.3\nc\n                  iocc(s) = iocc(s) + 1 ! iocc now refers to K\n               endif            ! ns.gt.0\n            enddo               ! do s\nc     \n            iocc(q) = iocc(q) + 1 ! iocc now refers to I\n         endif                  ! nq.gt.0\n      enddo                     ! do q\nc     \n      numqs = numqs - 1\nc     \n      call fci_tfinish(2,.false.)\nc\n      end\n      \n"
  },
  {
    "path": "src/apps/moldft/fci/fci_couple3.F",
    "content": "*\n* $Id: fci_couple3.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine fci_couple3(vec, nvec, p, q, r, t, iocc, idim, \n     $     numsu, sulist, epqrstu)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     Compute <V|Epq,rs,tu|Iw> for given CI vectors V, fixed orbitals\nc     p,q,r,t and fixed orbital occupancy I (iocc), and all orbitals s,u\nc     and primitive spin functions w.\nc\nc     Constrain the loops over s and u so that (pq)>=(rs)>=(tu).  If the\nc     calling program externally constrains p>=r>=t (all q) then all\nc     unique coupling coefficients will be generated.\nc     \nc     numsu returns the number of orbitals s,u giving a nonzero interaction\nc     \nc     sulist(1, 1...numsu) contains the values of s\nc     sulist(2, 1...numsu) contains the values of u\nc     \nc     epqrstu(1...idim,1...nvec,1...numsu) contains the coupling coeffcients\nc     \n      integer nvec              ! [input] No. of vectors on the left hand side\n      double precision vec(ndets,nvec) ! [input] The CI vectors\n      integer p, q, r, t        ! [input] Fixed labels on Epq,rs,tu\n      integer iocc(nactiv)      ! [input] Orbital occupation of I\n      integer idim              ! [input] No. of spin functions for I\n      integer numsu             ! [output] Returns the number of s,u\n      integer sulist(2,*)       ! [output] Returns the list of interacting s,u\n      double precision epqrstu(idim,nvec,*) ! [output] <Vi|Epqrstu|Iw>\nc     \nc     <V|Epq,rs,tu|Iw> = sum(Jv) V(Jv) <Jv|EpaErbEtcEcuEbsEaq|Iw> \nc     .  = sum(Jz) V(Jv) <Jv|EpaErbEtc|Oz><Oz|EcuEbsEaq|Iw>\nc     .  = sum(Jz) V(Jv) (<Jv|Epa|Ny><Ny|Erb|Hg><Hg|Etc|Oz>)*\nc     .                  (<Oz|Ecu|Mx><Mx|Ebs|Kf><Kf|Eaq|Iw>)\nc     .  = sum(Jz) V(Jv) (<Ny|Eap|Jv><Hg|Ebr|Ny><Oz|Ect|Hg>)*\nc     .                  (<Oz|Ecu|Mx><Mx|Ebs|Kf><Kf|Eaq|Iw>)\nc     \nc     where a,b,c are fictitious orbitals with c > b > a\nc     and we have v(z), y(z), f(z), w(z), x(z), g(z)\nc     \nc     .      -q   -s   -u   +t   +r   +p\nc     .    I -> K -> M -> O -> H -> N -> J\nc     \nc     Defer as much computation as possible until we have satisfied\nc     all possible occupation and sparsity tests.\nc     \n      integer indbar(nactmx)    ! Posn amoung sing. occ. I/K/M/O/H/N/J\n      integer kperm(ndetmx), mperm(ndetmx),hperm(ndetmx),\n     $     nperm(ndetmx), iperm(ndetmx) ! Permutations of spin functions\n      double precision kval(ndetmx), nval(ndetmx), mval(ndetmx),\n     $     hval(ndetmx), ival(ndetmx) ! Accumulated phase factors\n*     integer jperm(ndetmx)          ! Not used by optimized code\n*     double precision jval(ndetmx)  ! Not used by optimized code\nc     \n      integer nsi, nsj, nsk, nsm, nsn, nsh, nso ! No. of sing. occ in I/...\n      integer jdim, kdim, mdim, ndim, odim, hdim ! No. of dets for J/...\n      integer np                ! Occuption of p in J\n      integer nq                ! Occupation of q in I\n      integer ns                ! Occupation of s in K\n      integer nr                ! Occupation of r in N\n      integer nt                ! Occupation of t in H\n      integer nu                ! Occupation of u in M\n      integer jwalk             ! Lexical index of J\n      integer jdet              ! Offset of J in CI vector\n      integer sympqrt           ! Sym product state*I*p*q*r*t\n      integer symu              ! Required symmetry for u\n      integer u, s, w, z, v, pbar, qbar, rbar, sbar, tbar, ubar,\n     $     deltat, deltau, deltaq, deltar, deltas, idummy, i, ivec\n      integer shi, uhi\n      double precision sum, dummy\n      logical omade_kval        ! Used to defer computation of kperm/kval\n      logical omade_ival        ! Used to defer computaiton of iperm/ival\n      double precision thresh\n      parameter (thresh = 1d-12) ! Should be SQUARE of desired accuracy\n#include \"bitops.fh\"      \nc     \nc     Check to see if q is really occupied, compute no. of open shells\nc     and I indbar vector\nc     \n      nq = iocc(q)-1\n      if (nq .le. 0) then\n         numsu = 0\n         return\n      endif\nc\n      call fci_tstart(3,.false.)\nc     \n      nsi = 0\n      sympqrt = ieor(ieor(orbsym(p),orbsym(r)),statesym)\n      sympqrt = ieor(ieor(sympqrt,orbsym(q)),orbsym(t))\n      do i = 1,nactiv\n         if (iocc(i).eq.2) then \n            nsi = nsi + 1\n            sympqrt = ieor(sympqrt,orbsym(i))\n         endif\n         indbar(i) = nsi\n      enddo\n      if (idim .ne. mnsdet(nsi)) call fci_err\n     $     ('fci_couple3: mismatch for idim ', idim)\nc     \n      numsu = 1\nc     \n      iocc(q) = iocc(q) - 1     ! iocc now refers to K\nc\nc     More detailed info about q and K\nc\n      qbar = indbar(q)\n      nsk  = nsi\n      deltaq = -1\n      if (nq .eq. 2) then\n         deltaq = 1\n         nsk = nsk + 2\n         qbar = qbar + 1\n      endif\n      kdim = mnsdet(nsk)\nc\nc    Defer computation of <Ku|Eaq|Iw> until there is a non-zero term\nc     \n      omade_ival = .false.\nc     \nc     Loop thru s occupied in K\nc     \n      shi = nactiv\n      if (p .eq. r) shi = q\n      do s = 1, shi\n         ns = iocc(s)-1         ! Occupation of s in K\n         if (ns .gt. 0) then\n            iocc(s) = iocc(s) - 1 ! iocc now refers to M\nc     \n            nsm  = nsk\n            if (ns .eq. 2) nsm = nsm + 2\nc     \nc     Defer computation of <Mx|EbsEaq|Iw> = <Mx|Ebs|Ku><Ku|Eaq|Iw>\nc     until we are sure we will need it\nc     \n            omade_kval = .false.\nc     \nc     Loop thru u occupied in M\nc     \n            uhi = nactiv\n            if (t .eq. r) uhi = s\n            symu = ieor(sympqrt,orbsym(s))\n            do u = 1, uhi\n               nu = iocc(u)-1   ! Occupation of u in M\n               if (nu.gt.0 .and. orbsym(u).eq.symu) then\n                  iocc(u) = iocc(u) - 1 ! iocc now refers to O\nc     \n                  nt = iocc(t)  ! Since iocc refers to O and we want H\n                  if (nt .lt. 3) then\n                     iocc(t) = iocc(t) + 1 ! iocc now refers to H\nc     \n                     nr = iocc(r) ! Since iocc refers to H and we want N\n                     if (nr .lt. 3) then\n                        iocc(r) = iocc(r) + 1 ! iocc now refers to N\nc     \n                        np = iocc(p) ! Since iocc refers to N and we want J\n                        if (np .lt. 3) then\n                           iocc(p) = iocc(p) + 1 ! iocc now refers to J\nc     \n                           nso = nsm\n                           if (nu .eq. 2) nso = nso + 2\nc     \n                           nsh = nso\n                           if (nt .eq. 2) nsh = nsh - 2\nc     \n                           nsn = nsh\n                           if (nr .eq. 2) nsn = nsn - 2\nc     \n                           nsj = nsn\n                           if (np .eq. 2) nsj = nsj - 2 \nc     \nc     Determine the index of J in the CI vector and apply sparsity test\nc     \n                           jdim = mnsdet(nsj)\n*                           call fci_ofind_weight(jwalk,iocc)\n*     manually inlined version of fci_ofind_weight\n*\n                           z = 1\n                           jwalk = 1\n                           do i = 1,nactiv\n                              jwalk = jwalk + karcwt(iocc(i),z,i)\n                              z = karc(iocc(i),z,i)\n                           enddo\n*\n                           jdet = indexo(jwalk)\nc     \n                           sum = 0.0d0\n                           do ivec = 1, nvec\n                              do v = 1, jdim\n                                 sum = sum + \n     $                                vec(jdet+v,ivec)*vec(jdet+v,ivec)\n                              enddo\n                           enddo\n                           if (sum .gt. thresh) then\nc\nc     Make <Ku|Eaq|Iw> if have not already done so\nc\n                              if (.not. omade_ival) then\n                                 call fci_apply_eaj(qbar, nq, idim,kdim, \n     $                                eajdata(eajptr(nsi)), \n     $                                eajphase(1,1,nsi), .true.,\n     $                                idummy, dummy, iperm, ival)\n                                 do i = q, nactiv ! Adjust indbar to K\n                                    indbar(i) = indbar(i) + deltaq\n                                 enddo\n                                 omade_ival = .true.\n                              endif\nc\nc     If not already done form <Mx|EbsEaq|Iw> = <Mx|Ebs|Ku><Ku|Eaq|Iw>\nc\n                              if (.not. omade_kval) then\n                                 sbar = indbar(s)\n                                 deltas = -1\n                                 if (ns .eq. 2) then\n                                    sbar = sbar + 1\n                                    deltas = 1\n                                 endif\n                                 do i = s, nactiv ! Adjust indbar to M\n                                    indbar(i) = indbar(i) + deltas\n                                 enddo\n                                 mdim = mnsdet(nsm)\n                                 call fci_apply_eaj(sbar, ns,kdim,mdim, \n     $                                eajdata(eajptr(nsk)),\n     $                                eajphase(1,1,nsk),\n     $                                .false., iperm, ival, kperm, kval)\n                                 omade_kval = .true.\n                              endif\nc     \nc     More detailed info about u and O\nc     \n                              deltau = -1\n                              ubar = indbar(u)\n                              if (nu .eq. 2) then\n                                 ubar = ubar + 1\n                                 deltau = 1\n                              endif\n                              odim = mnsdet(nso)\nc     \nc     More detailed info about t and H\nc     \n                              deltat = 1\n                              tbar = indbar(t)\n                              if (nt .eq. 2) then\n                                 deltat = -1\n                                 tbar = tbar + 1\n                              endif\n                              hdim = mnsdet(nsh)\n                              tbar = tbar + deltat\n                              if (t .ge. u) tbar = tbar + deltau\nc     \nc     More detailed info about r and N\nc     \n                              deltar = 1\n                              rbar = indbar(r)\n                              if (nr .eq. 2) then\n                                 deltar = -1\n                                 rbar = rbar + 1\n                              endif\n                              ndim = mnsdet(nsn)\n                              rbar = rbar + deltar\n                              if (r .ge. u) rbar = rbar + deltau\n                              if (r .ge. t) rbar = rbar + deltat\nc     \nc     More detailed info about p and J\nc     \n                              pbar = indbar(p)\n                              if (np .eq. 1) pbar = pbar + 1\n                              if (p .ge. r) pbar = pbar + deltar\n                              if (p .ge. u) pbar = pbar + deltau\n                              if (p .ge. t) pbar = pbar + deltat\nc     \nc     Form <Oz|Ecu|Mx><Mx|Ebs|Kf><Kf|Eaq|Iw>\nc     \n                              call fci_apply_eaj(ubar, nu, mdim, odim, \n     $                             eajdata(eajptr(nsm)), \n     $                             eajphase(1,1,nsm),\n     $                             .false., kperm, kval, mperm, mval)\nc\n                              call fci_apply_eaj3(\n     $                             pbar, np, eajdata(eajptr(nsj)), \n     $                             eajphase(1,1,nsj),\n     $                             rbar, nr, eajdata(eajptr(nsn)), \n     $                             eajphase(1,1,nsn),\n     $                             tbar, nt, eajdata(eajptr(nsh)), \n     $                             eajphase(1,1,nsh),\n     $                             jdim, ndim, hdim, odim,\n     $                             nperm, nval, hperm, hval)\nc$$$\nc$$$c     \nc$$$c     Form <Ny|Eap|Jv>\nc$$$c     \nc$$$                              call fci_apply_eaj(pbar, np, jdim, ndim, \nc$$$     $                             eajdata(eajptr(nsj)), \nc$$$     $                             eajphase(1,1,nsj),\nc$$$     $                             .true., idummy, dummy, jperm, jval)\nc$$$c     \nc$$$c     Form <Jv|EpaErb|Hg> = <Ny|Eap|Jv><Hg|Ebr|Ny>\nc$$$c     \nc$$$                              call fci_apply_eaj(rbar, nr, ndim, hdim, \nc$$$     $                             eajdata(eajptr(nsn)), \nc$$$     $                             eajphase(1,1,nsn),\nc$$$     $                             .false., jperm, jval, nperm, nval)\nc$$$c     \nc$$$c     Form <Ny|Eap|Jv><Hg|Ebr|Ny><Oz|Ect|Hg>\nc$$$c     \nc$$$                              call fci_apply_eaj(tbar, nt, hdim, odim, \nc$$$     $                             eajdata(eajptr(nsh)), \nc$$$     $                             eajphase(1,1,nsh),\nc$$$     $                             .false., nperm, nval, hperm, hval)\nc     \nc     Now sum(Jz) V(Jv) <Jv|EpaErbEtc|Oz><Oz|EcuEbsEaq|Iw>\nc     .\nc     .   noting that we have v(z) and w(z)\nc     \n                              do ivec = 1, nvec\n                                 do w = 1, idim\n                                    epqrstu(w,ivec,numsu) = 0.0d0\n                                 enddo\n                              enddo\nc     \n                              do ivec = 1, nvec\n                                 do z = 1, odim\n                                    v = hperm(z)\n                                    w = mperm(z)\n                                    epqrstu(w,ivec,numsu) = \n     $                                   epqrstu(w,ivec,numsu) + \n     $                                   vec(jdet+v,ivec)*\n     $                                   hval(z)*mval(z)\n                                 enddo\n                              enddo\n                              sulist(1,numsu) = s\n                              sulist(2,numsu) = u\n                              numsu = numsu + 1\n                           endif ! sum.gt.thresh\nc     \n                           iocc(p) = iocc(p) - 1 ! iocc now refers to N\n                        endif   ! np.lt.3\nc     \n                        iocc(r) = iocc(r) - 1 ! iocc now refers to H\n                     endif      ! nr.lt.3\nc     \n                     iocc(t) = iocc(t) - 1 ! iocc now refers to O\n                  endif         ! nt.lt.3\nc     \n                  iocc(u) = iocc(u) + 1 ! iocc now refers to M\n               endif            ! nu.gt.0\n            enddo               ! do u\nc     \n            if (omade_kval) then\n               do i = s, nactiv ! Adjust indbar to refer to K\n                  indbar(i) = indbar(i) - deltas\n               enddo\n            endif\n            iocc(s) = iocc(s) + 1 ! iocc now refers to K\n         endif                  ! ns.gt.0\n      enddo                     ! do s\nc     \n      iocc(q) = iocc(q) + 1     ! iocc now refers to I\nc\n      numsu = numsu - 1\nc\n      call fci_tfinish(3,.false.)\nc     \n      end\n      \n"
  },
  {
    "path": "src/apps/moldft/fci/fci_davids.F",
    "content": "*\n* $Id: fci_davids.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      logical function fci_davids(n, nroot, maxiter, maxsub, tol,\n     $     work, lenwrk, evecfile, diagfile, eval, ecore, h, g)\n      implicit none\nc\n      integer n                 ! [input] Matrix dimension\n      integer nroot             ! [input] No. of eigen vectors sought\n      integer maxiter           ! [input] Maximum no. of iterations\n      integer maxsub            ! [input] Maximum dimension of iterative subspace\n      double precision tol      ! [input] Required norm of residual\n      integer lenwrk            ! [input] Length of scratch space\n      double precision work(lenwrk) ! [scratch] Work space\n      integer evecfile          ! [input] Handle for eigenvector file\n      integer diagfile          ! [input] Handle for file with diagonals\n      double precision eval(nroot) ! [output] Eigenvalues\n      double precision ecore, h(*), g(*) ! [input] Integrals for fci_hv\nc\nc     Solve eigenvalue problem using multi-root block Davidson with\nc     eigenvectors on disk in direct access files.\nc\nc     On input fileevec should contain nroot orthonormal guess vectors.\nc     On output it will contain the eigenvectors.\nc\n      integer workfile          ! Handle for workspace file\n      double precision test_tol, denom\n      logical converged\n      integer maxdim\n      parameter (maxdim = 100)   ! Maximum size of iterative subspace\n      integer buflen            ! Buffer size for IO on scratch file\n      double precision aa(maxdim,maxdim), ss(maxdim,maxdim), \n     $     yy(maxdim,maxdim), ee(maxdim), fv1(maxdim), fv2(maxdim),\n     $     rnorm(maxdim)\n      double precision xnorm, ab\n      integer i, nsub, info, cur_root, iroot, ivec\n      integer icbuf, isbuf, irbuf, itop, ic, is, iw, lenw\n      integer ierr, iter\n      double precision ddot, fci_time\n      external ddot, fci_time\n      logical odebug\n      data odebug /.false./\nc\n      if (maxsub .gt. maxdim) call fci_err\n     $     ('fci_davids: maxsub > maxdim', maxdim)\n      if (maxsub .lt. nroot+2) call fci_err\n     $     ('fci_davids: subspace too small', maxsub)\nc\nc     Scratchfile is organized as v1,H*v1,v2,H*v2,...\nc\nc     These buffers are used to process the scratch file and compute\nc     the reduced space matrices in one pass through the file\nc     \n      buflen = min(4096,n)\n      icbuf = 1\n      isbuf = icbuf + maxsub*buflen\n      irbuf = isbuf + maxsub*buflen\n      itop  = irbuf + buflen\n      if (itop .gt. lenwrk) call fci_err\n     $     ('fci_davids: need more work', itop)\nc\n      workfile = 3\n      call wopen(workfile, 'workfile', 0, 1, ierr)\n      if (ierr .ne. 0) call fci_err\n     $     ('fci_davidsnew: failed to open workfile', 0)\nc\nc     Form initial matrix-vector products\nc     \n      ic = 1\n      is = ic + n\n      iw = is + n\n      lenw = lenwrk - iw\n      if (lenw .le. 0) call fci_err('fci_davids: need more work', is)\n      do i = 1, nroot\n         call getwa(evecfile, work(ic), (i-1)*n + 1, n, ierr)\n         if (ierr.ne.0) call fci_err('fci_davids: IO error (a)',ierr)\n         xnorm = 1.0d0/sqrt(ddot(n,work(ic),1,work(ic),1)) ! Normalize it\n         call dscal(n, xnorm, work(ic), 1)\nc\n         call fci_hv(ecore, h, g, work(iw), lenw, work(ic), work(is))\nc\n         call putwa(workfile, work(ic), 2*(i-1)*n + 1, n, ierr)\n         if (ierr.ne.0) call fci_err('fci_davids: IO error (b)',ierr)\n         call putwa(workfile, work(is), 2*(i-1)*n+n+1, n, ierr)\n         if (ierr.ne.0) call fci_err('fci_davids: IO error (c)',ierr)\n      enddo\nc\n      write(6,1) \n 1    format(\n     $     7x, ' iter nsub  cur root   eigenvalue      residual',\n     $     '    time'/\n     $     7x, ' ---- ---- ---- ---- --------------- -----------',\n     $     ' -------')\nc     \n      test_tol = 0.5d0\n      cur_root  = 1             ! Current vector being updated\n      nsub = nroot              ! No. of vectors within subspace\n      do iter = 1, maxiter\nc     \nc     Now have nsub vectors and products in workfile.\nc     \n 555     call fci_davids_redmat(workfile, n, nsub, buflen, \n     $        work(icbuf), work(isbuf), aa, ss, maxdim)\nc     \n         if (odebug) then\n            write(6,*) ' fci_davids: Reduced space H matrix'\n            call fci_output(aa, 1, nsub, 1, nsub, maxdim, nsub, 1)\n            write(6,*) ' fci_davids: Reduced space S matrix'\n            call fci_output(ss, 1, nsub, 1, nsub, maxdim, nsub, 1)\n         endif\nc     \nc     Solve the reduced space equations (Ay = Sye)\nc     \n         call rsg(maxdim, nsub, aa, ss, ee, 1, yy, fv1, fv2, info)\n         if (info .ne. 0) call fci_err('fci_davids: rsg failed', info)\n         if (odebug) then\n            write(6,*) ' fci_davids: Reduced space eigenvectors'\n            call fci_output(yy, 1, nsub, 1, nsub, maxdim, nsub, 1)\n            write(6,*) ' fci_davids: Reduced space eigenvalues'\n            call fci_output(ee, 1, nsub, 1, 1, nsub, 1, 1)\n         endif\n         call dcopy(nroot, ee, 1, eval, 1)\nc\nc     Resum if we must ... not optimal right now\nc\n         if (nsub .eq. maxsub) then \n            write(6,*) '   Resumming '\n            call fci_davids_resum(workfile, \n     $           n, nsub, nroot, buflen, work(icbuf), work(isbuf), \n     $           work(irbuf), yy, maxdim)\n            nsub = nroot\n            goto 555            ! Regenerate reduced space matrices\n         endif\nc\nc     Form the residuals in evecfile and their norms in rnorm\nc\n         call fci_davids_residual(evecfile, workfile, \n     $        n, nsub, nroot, buflen, work(icbuf), work(isbuf), \n     $        work(irbuf), ee, yy, maxdim, rnorm)\nc     \nc     Print\nc     \n         do iroot = 1, nroot\n            write(6,3) iter, nsub, cur_root, iroot, eval(iroot),\n     $           rnorm(iroot), fci_time()\n 3          format(6x,4i5,2x,f15.8,f12.8,f8.1)\n         enddo\n*         call util_flush(6)\nc     \nc     Determine the next vector to update\nc     \n 20      converged = .true.\n         cur_root = 0           ! Comment this out to cycle\n         do iroot = 1, nroot\n            cur_root = mod(cur_root,nroot) + 1\n            if (rnorm(iroot) .gt. test_tol) then\n               converged = .false.\n               goto 10\n            endif\n         enddo\nc         \n 10      if (converged) then\n            if (test_tol .le. tol) then\n               goto 1000\n            else\n               test_tol = max(test_tol * 0.01d0, tol)\n               goto 20\n            endif\n         endif\nc     \n         if (iter.eq.maxiter) then\n            write(6,*) ' fci_davids: exceeded max iters ... ',\n     $           'aborting solve'\n            goto 1000\n         endif\nc     \nc     Read diagonals into work(is) and form update for current root in work(ic)\nc     \n         call getwa(diagfile, work(is), 1, n, ierr)\n         if (ierr.ne.0) call fci_err('fci_davids: IO error (diag)',ierr)\n         call getwa(evecfile, work(ic), (cur_root-1)*n+1, n, ierr)\n         if (ierr.ne.0) call fci_err('fci_davids: IO error (d)',ierr)\n         do i = 1, n\n            if (ierr.ne.0) call fci_err('fci_davids: IO error (e)',ierr)\n            denom = eval(cur_root) - work(is+i-1)\n            if (abs(denom).lt.0.1d0) denom = sign(0.1d0,denom)\n            work(ic+i-1) = work(ic+i-1) / denom\n         enddo\nc\nc     Approximately orthogonalize it to the previous vectors (assumed\nc     normalized), force symmetries and then normalize it\nc\n         do ivec = 1, nsub\n            call getwa(workfile, work(is), 2*(ivec-1)*n+1, n, ierr)\n            ab = ddot(n, work(ic), 1, work(is), 1)\n            call daxpy(n, -ab, work(ic), 1, work(is), 1)\n         enddo\nc\n         xnorm = 1.0d0/sqrt(ddot(n,work(ic),1,work(ic),1)) ! Normalize it\n         call dscal(n, xnorm, work(ic), 1)\nc\n         call fci_spin_force(work(ic))\nc\nc     Form new product and shove vectors them into the work file\nc     \n         call fci_hv(ecore, h, g, work(iw), lenw, work(ic), work(is))\n*         write(6,*) ' NEW VECTOR '\n*         call fci_output(work(ic),1,n,1,1,n,1,1)\n*         write(6,*) ' NEW H*V '\n*         call fci_output(work(is),1,n,1,1,n,1,1)\nc\n         nsub = nsub + 1\nc\n         call putwa(workfile, work(ic), 2*(nsub-1)*n+1, n, ierr)\n         if (ierr.ne.0) call fci_err('fci_davids: IO error (f)',ierr)\n         call putwa(workfile, work(is), 2*(nsub-1)*n+n+1, n, ierr)\n         if (ierr.ne.0) call fci_err('fci_davids: IO error (g)',ierr)\nc     \n      enddo\nc     \nc     Should never actually fall out of the bottom\nc     \n      call fci_err('fci_davids: fell out of loop bottom?', 0)\nc     \n 1000 continue\nc     \nc     Resum current solution into the output file\nc     \n      call fci_davids_resum(workfile, \n     $     n, nsub, nroot, buflen, work(icbuf), work(isbuf), \n     $     work(irbuf), yy, maxdim)\nc\n      do ivec = 1, nroot\n         call getwa(workfile, work, 2*(ivec-1)*n+1, n, ierr)\n         if (ierr.ne.0) call fci_err\n     $        ('fci_davids: failed getting final vector', ierr)\n         call putwa(evecfile, work, (ivec-1)*n+1, n, ierr)\n         if (ierr.ne.0) call fci_err\n     $        ('fci_davids: failed putting final vector', ierr)\n      enddo\nc         \n      call dcopy(nroot, ee, 1, eval, 1)\nc\n      call wclose(workfile, ierr)\nc     \n      end\n      subroutine fci_davids_redmat(workfile, n, nvec, buflen, \n     $     cbuf, sbuf, aa, ss, maxdim)\n      implicit none\nc\n      integer workfile          ! [input] Handle to workfile\n      integer n                 ! [input] Vector length\n      integer nvec              ! [input] No. of vectors in the file\n      integer buflen            ! [input] IO buffer length\n      double precision cbuf(buflen,nvec) ! [scratch] C buffer\n      double precision sbuf(buflen,nvec) ! [scratch] S=HC buffer\n      integer maxdim            ! [input] Dimension of matrices\n      double precision aa(maxdim,maxdim) ! [output] Reduced H matrix\n      double precision ss(maxdim,maxdim) ! [output] Reduced S matrix\nc\nc     Compute the Hamiltonian and Overlap matrices over the Davidson\nc     subspace vectors and their products stored in the work file.\nc\nc     Scratchfile is organized as v1,H*v1,v2,H*v2,...\nc\n      integer ilo, ihi, ndo, ivec, jvec, ioff, ierr\n      double precision ddot\n      external ddot\nc\n      call dfill(0.0d0,aa,1,maxdim*maxdim)\n      call dfill(0.0d0,ss,1,maxdim*maxdim)\nc\nc     Loop thru blocks of the vectors\nc\n*      write(6,*) ' NVEC,N ', nvec, n\nc\n      do ilo = 1, n, buflen\n         ihi = min(ilo+buflen-1,n)\n         ndo = ihi - ilo + 1\nc\nc     Read blocks in\nc\n         do ivec = 1, nvec\n            ioff = ilo + 2*(ivec-1)*n\n            call getwa(workfile,cbuf(1,ivec), ioff, ndo, ierr)\n            if (ierr.ne.0) call fci_err('fci_davids: IO error (h)',ierr)\n*            write(6,*) ' workfile v ', ivec, ilo\n*            call fci_output(cbuf(1,ivec),1,ndo,1,1,ndo,1,1)\n            ioff = ioff + n\n            call getwa(workfile,sbuf(1,ivec), ioff, ndo, ierr)\n*            write(6,*) ' workfile s ', ivec, ilo\n*            call fci_output(sbuf(1,ivec),1,ndo,1,1,ndo,1,1)\n         enddo\nc\nc     Accumlate the products\nc\n         call dgemm('t','n',nvec,nvec,ndo,1.0d0,cbuf,buflen,\n     $        sbuf,buflen,1.0d0,aa,maxdim)\n         call dgemm('t','n',nvec,nvec,ndo,1.0d0,cbuf,buflen,\n     $        cbuf,buflen,1.0d0,ss,maxdim)\n*         do ivec = 1, nvec\n*            do jvec = 1, nvec\n*               aa(ivec,jvec) = aa(ivec,jvec) + \n*     $              ddot(ndo, cbuf(1,ivec), 1, sbuf(1,jvec), 1)\n*               ss(ivec,jvec) = ss(ivec,jvec) + \n*     $              ddot(ndo, cbuf(1,ivec), 1, cbuf(1,jvec), 1)\n*            enddo\n*         enddo\n      enddo\nc\n      end\n      subroutine fci_davids_residual(residfile, workfile, \n     $     n, nvec, nroot, buflen, cbuf, sbuf, rbuf,\n     $     ee, yy, maxdim, rnorm)\n      implicit none\nc\n      integer residfile         ! [input] Handle to file for residuals\n      integer workfile          ! [input] Handle to work file\n      integer n                 ! [input] Vector length\n      integer nvec              ! [input] No. of vectors in the file\n      integer nroot             ! [input] No. of roots \n      integer buflen            ! [input] IO buffer length\n      double precision cbuf(buflen,nvec) ! [scratch] C buffer\n      double precision sbuf(buflen,nvec) ! [scratch] S=HC buffer\n      double precision rbuf(buflen) ! [scratch] To form residual\n      integer maxdim            ! [input] Dimension of matrices\n      double precision ee(maxdim) ! [input] Eigenvalues\n      double precision yy(maxdim,nroot) ! [input] Reduced space eigenvectors\n      double precision rnorm(nroot) ! [output] Residuals for each root\nc\nc     Compute the residual vectors for each root storing it in\nc     residfile and also return the residual norms\nc\nc     r = (H - E)c = s - Ec = sum(i) (si - Eci)*yi\nc\n      integer ilo, ihi, ndo, iroot, ivec, jvec, ioff, i, ierr\nc\n      call dfill(0.0d0,rnorm,1,nroot)\nc\nc     Loop thru blocks of the vectors\nc\n      do ilo = 1, n, buflen\n         ihi = min(ilo+buflen-1,n)\n         ndo = ihi - ilo + 1\nc\nc     Read blocks in\nc\n         do ivec = 1, nvec\n            ioff = ilo + 2*(ivec-1)*n\n            call getwa(workfile,cbuf(1,ivec), ioff, ndo, ierr)\n            if (ierr.ne.0) call fci_err('fci_davids: IO error (i)',ierr)\n            ioff = ioff + n\n            call getwa(workfile,sbuf(1,ivec), ioff, ndo, ierr)\n         enddo\nc\nc     Form the residuals \nc\n         do iroot = 1, nroot\n            call dfill(0.0d0,rbuf,1,ndo)\n            do jvec = 1, nvec\n               do i = 1, ndo\n                  rbuf(i) = rbuf(i) + \n     $                 (sbuf(i,jvec) - ee(iroot)*cbuf(i,jvec)) * \n     $                 yy(jvec,iroot)\n               enddo\n            enddo\n            do i = 1, ndo\n               rnorm(iroot) = rnorm(iroot) + rbuf(i)*rbuf(i)\n            enddo\n            ioff = ilo + (iroot-1)*n\n            call putwa(residfile,rbuf, ioff, ndo, ierr)\n            if (ierr.ne.0) call fci_err('fci_davids: IO error (j)',ierr)\n         enddo\n      enddo\nc\n      do iroot = 1, nroot\n         rnorm(iroot) = sqrt(rnorm(iroot))\n      enddo\nc\n*      write(6,*) ' RNORM '\n*      call fci_output(rnorm,1,nroot,1,1,nroot,1,1)\nc\n      end\n      subroutine fci_davids_resum(workfile, \n     $     n, nvec, nroot, buflen, cbuf, sbuf, rbuf,\n     $     yy, maxdim)\n      implicit none\nc\n      integer workfile          ! [input] Handle to work file\n      integer n                 ! [input] Vector length\n      integer nvec              ! [input] No. of vectors in the file\n      integer nroot             ! [input] No. of roots \n      integer buflen            ! [input] IO buffer length\n      double precision cbuf(buflen,nvec) ! [scratch] C buffer\n      double precision sbuf(buflen,nvec) ! [scratch] S=HC buffer\n      double precision rbuf(buflen) ! [scratch] To form residual\n      integer maxdim            ! [input] Dimension of matrices\n      double precision yy(maxdim,nroot) ! [input] Reduced space eigenvectors\nc\nc     Resum the nvec vectors and products on the workfile down \nc     to nroot vectors\nc\n      integer ilo, ihi, ndo, iroot, ivec, jvec, ioff, i, ierr\nc\nc     Loop thru blocks of the vectors\nc\n      do ilo = 1, n, buflen\n         ihi = min(ilo+buflen-1,n)\n         ndo = ihi - ilo + 1\nc\nc     Read blocks in\nc\n         do ivec = 1, nvec\n            ioff = ilo + 2*(ivec-1)*n\n            call getwa(workfile,cbuf(1,ivec), ioff, ndo, ierr)\n            if (ierr.ne.0) call fci_err('fci_davids: IO error (k)',ierr)\n            ioff = ioff + n\n            call getwa(workfile,sbuf(1,ivec), ioff, ndo, ierr)\n         enddo\nc\n         do iroot = 1, nroot\nc\nc     Resum CI vector\nc\n            call dfill(0.0d0,rbuf,1,ndo)\n            do jvec = 1, nvec\n               do i = 1, ndo\n                  rbuf(i) = rbuf(i) + cbuf(i,jvec) * yy(jvec,iroot)\n               enddo\n            enddo\n            ioff = ilo + 2*(iroot-1)*n\n            call putwa(workfile,rbuf, ioff, ndo, ierr)\n            if (ierr.ne.0) call fci_err('fci_davids: IO error (l)',ierr)\nc\nc     Resum product vector\nc\n            call dfill(0.0d0,rbuf,1,ndo)\n            do jvec = 1, nvec\n               do i = 1, ndo\n                  rbuf(i) = rbuf(i) + sbuf(i,jvec) * yy(jvec,iroot)\n               enddo\n            enddo\n            ioff = ilo + 2*(iroot-1)*n + n\n            call putwa(workfile,rbuf, ioff, ndo, ierr)\n            if (ierr.ne.0) call fci_err('fci_davids: IO error (m)',ierr)\n         enddo\n      enddo\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_detwalk.F",
    "content": "*\n* $Id: fci_detwalk.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine fci_det_to_walk(idet, owalk, mwalk)\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     Given the index of a determinant, idet, return the\nc     corresponding lexical weights of orbital and primitive\nc     spin functions.  Without having an index vector the\nc     length of the CI expansion the only way to do this\nc     is with a binary search, so this operation costs \nc     about log2(ndets).\nc\n      integer idet    ! [input] Index into determinant CI vector\n      integer owalk   ! [output] Corresponding orbital walk\n      integer mwalk   ! [output] Corresponding primitive spin function walk\nc\n      integer left, right, middle\nc\n      left = 1\n      right = nwalko\nc\n 10   middle = (left+right)/2\n      if (indexo(middle) .ge. idet) then\n         right = middle\n      else \n         left = middle\n      endif\n      if ((right-left) .gt. 1) goto 10\nc\n      if (indexo(right) .lt. idet) then\n         owalk = right\n      else\n         owalk = left\n      endif\nc\nc     Adjust for walks of incorrect symmetry\nc\n 20   if (indexo(owalk).eq.indexo(owalk+1)) then\n         owalk = owalk + 1\n         goto 20\n      endif\nc\n      mwalk = idet - indexo(owalk)\nc\n      if (mwalk.le.0 .or. mwalk.gt.(indexo(owalk+1)-indexo(owalk)))\n     $     call fci_err('fci_det_to_walk: bad mwalk ', mwalk)\nc\n      end\n\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_dfill.F",
    "content": "*\n* $Id: fci_dfill.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine dfill(val,x,iskip,n)\n      implicit none\n      double precision val, x(*)\n      integer iskip, n, ipt, i\nc      \n      ipt=1\n      do 10 i=1,n\n          x(ipt)=val\n10        ipt=ipt+iskip\n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_diags.F",
    "content": "*\n* $Id: fci_diags.F,v 1.2 1999/07/28 00:23:39 d3e129 Exp $\n*\n      subroutine fci_diags(hd,ecore,h,g,ionel,nonemx,kpt,mkpt)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     construct the diagonals of the hamiltonian \nc     \n      double precision hd(ndets) ! [output] The diagonals\n      double precision ecore    ! [input] Nuclear repulsion + frozen core\n      double precision h(nacttr) ! [input] 1-e integrals\n      double precision g(nacttr,nacttr) ! [input] 2-e integrals\n      integer nonemx            ! [input] dimension of ionel\n      integer ionel(5,nonemx)   ! [scratch] workspace for coupling coeff\n      integer kpt(nonemx)       ! [scratch] workspace\n      integer mkpt(ndetmx+1)    ! [scratch] workspace\nc\n      integer kwalk, kelbas, keltop, jprev, kkel,\n     $     kel, k, l, kl, jdet, iello, ielhi, iel, idet, i, j, ij,\n     $     nonel, iiel\n      integer kocc(nactmx), kdim, kbase, ksym, kns, kdet\n      double precision ekl, eijkl\nc     \nc     loop thru intermediate walks, compute all non-zero 1 e- coeffs\nc     and also provide index into the coeffs based on intermediate\nc     determinant\nc     \n      call fci_tstart(5,.false.)\n      call dfill(ecore,hd,1,ndets)\n      do 10 kwalk = 1,nwalko\n         call fci_owalk_info(kwalk,kocc,kns,kbase,kdim,ksym)\n         call fci_onelcc(kocc,kbase,kdim,ksym,ionel,nonel,nonemx)\n         if (nonel.gt.0) then\n            call fci_srt1cc(ionel,nonel,kbase,kdim,kpt,mkpt)\nc     loop thru non-zero <k|ekl|j>\n            do 20 kdet = 1,kdim\n               kelbas = mkpt(kdet) + 1\n               keltop = mkpt(kdet+1)\n               jprev = -1\n               do 30 kkel = kelbas,keltop\n                  kel = kpt(kkel)\n                  k = max(ionel(1,kel),ionel(2,kel))\n                  l = min(ionel(1,kel),ionel(2,kel))\n                  kl = k*(k-1)/2 + l\n                  jdet = ionel(4,kel)\n                  ekl = ionel(5,kel)\nc     do the one electron term\n                  if (ksym .eq. statesym) then\n                     if (jdet .eq. kdet+kbase) then\n                        hd(jdet) = hd(jdet) +  ekl * h(kl)\n                     endif\n                  endif\n                  ekl = ekl * 0.5d0\n                  if (jdet.ne.jprev) then\nc     look for last element with this jdet and kdet ... will be nearby\n                     jprev = jdet\n                     iello = kkel\n                     ielhi = kkel\n                     do 40 iiel = kkel+1,keltop\n                        if (ionel(4,kpt(iiel)).ne.jdet) goto 50\n                        ielhi = ielhi+1\n 40                  continue\n                  endif\nc     loop thru non-zero <i|eij|k> for idet=jdet\n 50               do 60 iiel = iello,ielhi\n                     iel = kpt(iiel)\n                     idet = ionel(4,iel)\n                     i = max(ionel(1,iel),ionel(2,iel))\n                     j = min(ionel(1,iel),ionel(2,iel))\n                     ij = i*(i-1)/2 + j\n                     eijkl = ionel(5,iel) * ekl\n                     hd(jdet) = hd(jdet) + eijkl*g(ij,kl)\n 60               continue\n 30            continue\n 20         continue\n         endif\n 10   continue\n*      write(6,*) ' diagonals from diags '\n*      write(6,1) hd\n* 1    format(1x,6f12.6)\nc     \n      call fci_tfinish(5,.false.)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_err.F",
    "content": "*\n* $Id: fci_err.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine fci_err(string, code)\n      implicit none\n      character*(*) string\n      integer code\nc\n      write(6,1) string, code\n 1    format(/\n     $     ' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'/\n     $     1x, a, 1x, i8/\n     $     ' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'/\n     $     )\nc\n      stop 99\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_hami.F",
    "content": "*\n* $Id: fci_hami.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine fci_hami(hamil, ecore, h, g, work, lenwork)\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     Simple wrapper routine to build the full triangular Hamiltonian\nc     from the unmodified one- and two-electron integrals\nc\n      double precision hamil(*) ! [output] Returns Hamiltonian\n      double precision ecore    ! [input] Frozen core + nuclear replulsion\n      double precision h(nacttr) ! [input] Triangle of unmodified 1-e integrals\n      double precision g(nacttr,nacttr) ! [input] 2-e integrals\n      integer lenwork           ! [input]\n      double precision work(lenwork) ! [scratch]\nc\n      integer ih, io, need, nonelt, nonemx, ik, im, i\nc\n      call fci_cntone(nonelt, nonemx)\n      ih = 1\n      io = ih + nacttr\n      ik = io + (nonemx*5 + 1) / nav\n      im = ik + (nonemx + 1) / nav\n      need = im + ndetmx\n      if (need .gt. lenwork) call fci_err('hami: need ', need)\nc\nc     Modify the 1-e integrals\nc\n      call fci_hmod(h, g, work(ih))\nc\n      call dfill(0.0d0, hamil, 1, ndets*(ndets+1)/2)\n      call fci_hamil2(hamil,work(ih),g,work(io),nonemx, \n     $     work(ik),work(im))\nc\n      do i = 1, ndets\n         hamil(i*(i+1)/2) = hamil(i*(i+1)/2) + ecore\n      enddo\nc\n      end\n      subroutine fci_hamil2(hamil,h,g,ionel,nonemx,kpt,mkpt)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     construct the entire hamiltonian over determinants\nc     \n      integer nonemx\n      double precision hamil(*),h(nacttr),g(nacttr,nacttr)\n      integer ionel(5,nonemx),kpt(nonemx),mkpt(*)\nc     \nc     loop thru intermediate walks, compute all non-zero 1 e- coeffs\nc     and also provide index into the coeffs based on intermediate\nc     determinant\nc     \n      integer kwalk, nonel, kdet, kelbas, keltop,\n     $     jprev, kkel, kel, k, l, kl, jdet, jjdet, ieltop, iel, iiel,\n     $     idet, ijdet, i, j, ij\n      integer kocc(nactmx), kns, kbase, kdim, ksym\n      double precision ekl, eijkl\n\n      call fci_tstart(13,.false.)\n      call dfill(0.0d0,hamil,1,ndets*(ndets+1)/2)\n      do 10 kwalk = 1,nwalko\n         call fci_owalk_info(kwalk,kocc,kns,kbase,kdim,ksym)\n         call fci_onelcc(kocc,kbase,kdim,ksym,ionel,nonel,nonemx)\n         if (nonel.gt.0) then\n            call fci_srt1cc(ionel,nonel,kbase,kdim,kpt,mkpt)\nc     loop thru non-zero <k|ekl|j>\n            do 20 kdet = 1,kdim\n               kelbas = mkpt(kdet) + 1\n               keltop = mkpt(kdet+1)\n               jprev = -1\n               do 30 kkel = kelbas,keltop\n                  kel = kpt(kkel)\n                  k = max(ionel(1,kel),ionel(2,kel))\n                  l = min(ionel(1,kel),ionel(2,kel))\n                  kl = k*(k-1)/2 + l\n                  jdet = ionel(4,kel)\n                  jjdet = jdet*(jdet-1)/2\n                  ekl = float(ionel(5,kel))\nc     do the one electron term\n                  if (ksym .eq. statesym) then\n                     if (jdet .ge. kdet+kbase) then\n                        hamil(jjdet+kdet+kbase) = \n     $                       hamil(jjdet+kdet+kbase) + ekl*h(kl)\n                     endif\n                  endif\n                  ekl = ekl * 0.5d0\n                  if (jdet.ne.jprev) then\nc     look for last element with this jdet and kdet ... will be nearby\n                     jprev = jdet\n                     ieltop = kkel\n                     do 40 iiel = kkel+1,keltop\n                        if (ionel(4,kpt(iiel)).ne.jdet) goto 50\n                        ieltop = ieltop+1\n 40                  continue\n                  endif\nc     loop thru non-zero <i|eij|k> for idet<=jdet\n 50               do 60 iiel = kelbas,ieltop\n                     iel = kpt(iiel)\n                     idet = ionel(4,iel)\n                     ijdet = jjdet + idet\n                     i = max(ionel(1,iel),ionel(2,iel))\n                     j = min(ionel(1,iel),ionel(2,iel))\n                     ij = i*(i-1)/2 + j\n                     eijkl = dfloat(ionel(5,iel)) * ekl\n                     hamil(ijdet) = hamil(ijdet) + eijkl*g(ij,kl)\n 60               continue\n 30            continue\n 20         continue\n         endif\n 10   continue\nc     \n      call fci_tfinish(13,.false.)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_hmod.F",
    "content": "*\n* $Id: fci_hmod.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine fci_hmod(h, g, hmod)\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     hmod = h - 1/2 sum(k) (ik|kj) to accomodate use of\nc     Eij,kl = EijEkl - delta(j,k)Eil\nc\n      double precision h(nacttr) ! [input] 1e Hamiltonian\n      double precision g(nacttr,nacttr) ! [input] 2-e integrals\n      double precision hmod(nacttr) ! [output] Modified integrals\nc     \n      integer i,j,k,ij,ind\n      ind(i,j) = max(i,j)*(max(i,j)-1)/2 + min(i,j)\nc\n      do i = 1, nactiv\n         do j = 1, i\n            ij = ind(i,j)\n            hmod(ij) = h(ij)\n            do k = 1, nactiv\n               hmod(ij) = hmod(ij) - 0.5d0*g(ind(i,k),ind(k,j))\n            enddo\n         enddo\n      enddo\nc\n*      write(6,*) ' HMOD '\n*      call fci_prntri(hmod,nactiv)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_hsort.F",
    "content": "*\n* $Id: fci_hsort.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine fci_hsort(A, ionel, n)\n      implicit none\n      integer n\n      integer A(n), temp, ionel(5,*)\n      integer i, hsize\nc     \nc     RJH modified to sort on ionel(4,A(*))\nc\nc    build heap\nc\n      do i = n/2, 1, -1\n         call fci_heapify(A, ionel, n, i)\n      enddo\nc     \nc    main part of sort algorithm\nc\n      hsize = n\n      do i    = n, 2, -1\nc     \nc    swap element i and 1\nc\n         temp = A(1)\n         A(1) = A(i)\n         A(i) = temp\nc     \nc    maintain heap property from element 1 down\nc\n         hsize= hsize - 1\n         call fci_heapify(A, ionel, hsize, 1)\nc     \n      enddo\n      end \n      \nc     \nc     establish heap property for a tree branch rooted at elem \nc     \n      subroutine fci_heapify(A, ionel, n, elem)\n      implicit none\n      integer n, elem \n      integer A(n), ionel(5,*)\n      integer left, right, largest, i, temp\nc     \n      i = elem\nc     \nc     Main Loop\nc     \n 100  continue \n      left  = 2*i\n      right = 2*i + 1\n      if (left. gt. n .and. right .gt. n) return !we traversed entire branch\nc     \nc     check heap property among element i and its children\nc     \n      if (left .le. n .and. ionel(4,A(left)) .gt. ionel(4,A(i))) then\n         largest = left\n      else\n         largest = i\n      endif\n      if (right .le. n .and. \n     $     ionel(4,A(right)) .gt. ionel(4,A(largest))) largest = right\nc     \n      if (largest .ne. i) then\nc     \nc     swap array elements if largest is not i\nc     \n         temp = A(i)\n         A(i) = A(largest)\n         A(largest) = temp\nc     \nc     traverse down the tree\nc     \n         i = largest \n         goto 100\n      endif\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_hv.F",
    "content": "*\n* $Id: fci_hv.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine fci_hv(ecore, h, g, work, lenwrk, v, s)\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     Compute the Hamiltonian matrix-vector product s = Hv \nc\n      double precision ecore    ! [input] Frozen-core+nuclear replusion energy\n      double precision h(nacttr) ! [input] Effective 1-e integrals Core+T+V\n      double precision g(nacttr,nacttr) ! [input] Two-electron integrals\n      integer lenwrk            ! [input] Size of workspace\n      double precision work(lenwrk) ! [scratch] Workspace - the more the better\n      double precision v(ndets) ! [input] CI vector\n      double precision s(ndets) ! [output] s = H*v\nc\n      integer nonelt, nonemx, kdimmx, kblmax, i1dim, numav\n      integer ihmod, ionel, idkl, ibij, itop, ns\n      double precision avgdim   ! Average no. of dets per orbital occ\n      double precision avgone   ! Average no. of coupling coeff per orbital occ\nc\nc     Figure out max number of coupling coeffs and intermediate states\nc     \n      call fci_cntone(nonelt, nonemx)\n      if (nelec .le. nactiv) then ! Max number of open shell in this calc\n         ns = nelec\n      else\n         ns = 2*nactiv - nelec\n      endif\n      kdimmx = mnsdet(ns) ! Max no. of dets for an intermediate state\nc\nc     Allocate memory.  Attempt to hold numav average size intermediate\nc     orbital occupations per pass, noting must be able to hold at least kdimmx\nc\n      avgdim = dble(ndets)/dble(nwalkosym)\n      avgone = dble(nonelt)/dble(nwalko)\nc\n      numav = min(nwalko, 256)\nc\n 10   kblmax = max(kdimmx, nint(numav*avgdim)) ! Max dets per block\n      i1dim  = max(nonemx, nint(numav*avgone))\nc\n      ihmod = 1                 ! Modified h ... h + 1/2 sum(k) (ik|kj)\n      ionel = ihmod + nacttr    ! 1-e coupling coefficients\n      idkl  = ionel + (5*i1dim)/nav + 1 ! Intermediate matrix D\n      ibij  = idkl  + nacttr*kblmax ! Intermediate matrix B\n      itop  = ibij  + nacttr*kblmax ! Total usage\n      if (itop .gt. lenwrk) then\n         if (numav .le. 1)call fci_err('fci_hv: alloc error',itop)\n         numav = numav / 2\n         goto 10\n      endif\nc\nc     Modify the input 1-e integrals \nc\n      call fci_hmod(h,g,work(ihmod))\nc\nc     Form the product\nc\n      call fci_sigma(v,s,ecore,work(ihmod),g,work(ionel),\n     &     i1dim,nonemx,work(idkl),work(ibij),kblmax)\nc\n      end\n\n\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_ifill.F",
    "content": "*\n* $Id: fci_ifill.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine ifill(ival,ix,iskip,n)\n      implicit none\n      integer ival, ix(*), iskip, n, ipt, i\n      ipt=1\n      do 10 i=1,n\n          ix(ipt)=ival\n10        ipt=ipt+iskip\n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_intchk.F",
    "content": "*\n* $Id: fci_intchk.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine fci_intchk(h, g)\n      implicit none\n#include \"fciinfo.fh\"\n      double precision h(nacttr) ! [input/output]\n      double precision g(nacttr,nacttr) ! [input/output]\nc\nc     Ensure that the integrals have the correct symmetry\nc     and force small integrals that should be zero to a hard zero.\nc\nc     This is just an interim routine until we have full symmetry packing\nc\n      integer i, j, k, l, ij, kl, symij, symkl\n#include \"bitops.fh\"\nc\n      do i = 1, nactiv\n         do j = 1, i\n            ij = iky(i)+j\n            symij = ieor(orbsym(i),orbsym(j))\n            if (symij .ne. 0) then\n               if (abs(h(ij)) .gt. 1d-6) then \n                  write(6,*) ' h ', i, j, h(ij)\n                  call fci_err('fci_intchk:should be zero',ij)\n               endif\n               h(ij) = 0.0d0\n            endif\n            do k = 1, nactiv\n               do l = 1, k\n                  kl = iky(k)+l\n                  symkl = ieor(orbsym(k),orbsym(l))\n                  if (ieor(symij,symkl).ne.0) then\n                     if (abs(g(ij,kl)) .gt. 1d-6) then \n                        write(6,*) ' g ', i, j, k, l, g(ij,kl)\n                        call fci_err('fci_intchk:should be zero',0)\n                     endif\n                     g(ij,kl) = 0.0d0\n                  endif\n               enddo\n            enddo\n         enddo\n      enddo\nc\nc     While we are it it check the ij -- kl symmetry\nc\n      do ij = 1, (nactiv*(nactiv+1))/2\n         do kl = 1, ij-1\n            if (abs(g(ij,kl)-g(kl,ij)) .gt. 1d-10) \n     $           call fci_err('fci_intchk: g is not symmetric',0)\n            g(ij,kl) = 0.5d0*(g(ij,kl)+g(kl,ij))\n            g(kl,ij) = g(ij,kl)\n         enddo\n      enddo\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_load.F",
    "content": "*\n* $Id: fci_load.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine fci_load(h,g,ecore)\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     Read the 1e/2e integrals from a simple ASCII list ... this\nc     for debug only from testcase integrals.\nc\n      double precision h(nacttr) ! [output]\n      double precision g(nacttr,nacttr) ! [output]\n      double precision ecore    ! [output]\nc\n      integer i, j, k, l, ij, kl, ind\n      double precision gg\nc      \n      ind(i,j) = max(i,j)*(max(i,j)-1)/2 + min(i,j)\nc\n      call dfill(0.0d0,g,1,nacttr*nacttr)\n      call dfill(0.0d0,h,1,nacttr)\nc\n      ecore = 0.0d0\nc\n10    read (5,*,end=20) gg,i,j,k,l\n      if (i.gt.nactiv .or. j.gt.nactiv .or. k.gt.nactiv .or.\n     $     l.gt.nactiv) goto 10\n      if (k.gt.0) then\n        ij = ind(i,j)\n        kl = ind(k,l)\n        g(ij,kl) = gg\n        g(kl,ij) = gg\n      else if (i.gt.0) then\n         if (abs(gg) .lt. 1d-6) gg = 0.0d0\n        ij = ind(i,j)\n        h(ij) = gg\n      else\n        ecore = gg\n      endif\n      goto 10\nc\n20    continue\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_make_eaj.F",
    "content": "*\n* $Id: fci_make_eaj.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine fci_make_all_eaj\n      implicit none\n#include \"fciinfo.fh\"\nc\n      integer ns, ioff, len, mdim\nc\n      call fci_tstart(6,.false.)\n      ioff = 1\n      do ns = multi-1,nsmax,2\n         mdim = mnsdet(ns)\n         len = 3*(ns+1)*mdim\n         if (ioff+len-1 .gt. eajmax) \n     $        call fci_err('eijmax too small', ioff+len-1)\n         call fci_make_eaj(ns,mdim,eajdata(ioff),eajphase(1,1,ns))\n         eajptr(ns) = ioff\n         ioff = ioff + len\n      enddo\n      call fci_tfinish(6,.false.)\nc\n      end\n      subroutine fci_make_eaj(ns,mdim,eaj,eajphase)\n      implicit none\n#include \"fciparam.fh\"\n      integer ns                ! [input]\n      integer mdim              ! [input]\n      integer eaj(mdim,3,ns+1)  ! [output]\n      double precision eajphase(3,*) ! [output]\nc\nc     Form the transformation of primtive spin functions under\nc     the action of Eaj, i.e., compute the matrix elements\nc     <Ku|Eaj|Iv>.  The three cases are explained below.\nc     Only the action of the permutation on the spin function is\nc     accounted for.  The phase information is stored in eajphase\nc\n      integer j, v, u, i\n      integer vocc(nsmax), uocc(nsmax)\nc\nc     Type 1: n_j(I) = 1   <Ku|Eaj|Iv>\nc\n      do v = 1, mdim\n         call fci_mfind_occ(v,vocc,ns)\n         do j = 1, ns\nc\nc     |u> = (s...j) |v>\nc\n            do i = 1,j-1\n               uocc(i) = vocc(i)\n            enddo\n            do i = j,ns-1\n               uocc(i) = vocc(i+1)\n            enddo\n            uocc(ns) = vocc(j)\nc\n            call fci_mfind_weight(u,uocc,ns)\nc\n            eaj(v,1,j) = u\n            eajphase(1,j) = dfloat(mod(ns-j+1,2)*2-1)\n         enddo\n      enddo\nc\n      if (ns+2 .gt. nsmax) return\nc\nc     Types 2 & 3: n_j(I) = 2 <Ku|Eaj|Iv>\nc\n      do v = 1, mdim\n         call fci_mfind_occ(v,vocc,ns)\n         do j = 1, ns+1\nc\nc     Type 2:   |u> = (j...1)(s+2...1) |+-v>  (alpha->a, beta->j)\nc     .             = (j...1)|-v+> * -1^(s+1)\nc\n            do i = 1,j-1\n               uocc(i) = vocc(i)\n            enddo\n            uocc(j) = 2         ! 2 = - step\n            do i = j+1,ns+1\n               uocc(i) = vocc(i-1)\n            enddo\n            uocc(ns+2) = 1      ! 1 = + step\nc\n            call fci_mfind_weight(u,uocc,ns+2)\n            eaj(v,2,j) = u\n            eajphase(2,j) = dfloat(mod(ns+j+1,2)*2-1)\nc\nc     Type 3:   |u> = (j...1)(s+2...1)(12) |+-v>  (beta->a, alpha->j)\nc     .             = (j...1)|+v-> * -1^(s)\nc\n            uocc(j) = 1\n            uocc(ns+2) = 2\n            call fci_mfind_weight(u,uocc,ns+2)\n            eaj(v,3,j) = u\n            eajphase(3,j) = -eajphase(2,j)\n         enddo\n      enddo\nc\n      end\n      subroutine fci_apply_eaj(jbar, nj, jdim, kdim, eaj, eajphase,\n     $     ounitj, jperm, jval, kperm, kval)\n      implicit none\nc     \nc     Apply the operator Eaj to a vector.  The input vectors (jperm, jval)\nc     are permuted by the action of the operator and the phase information\nc     is accumulated resulting in the output vectors (kperm, kval).\nc     The input vectors are NOT modified.\nc     \nc     I.e, given X(w) form  Y(v) = <Kv|Eaj|Jw> * X(w) where X=jval and\nc     Y=kval, and accumulating the action of the permutation in kperm\nc     by kperm(v)=jperm(w).\nc     \nc     eaj should be passed in as eajdata(eajptr(ns))     [fciinfo.fh]\nc     eahphase should be passed in as eajphase(1,1,ns)   [fciinfo.fh]\nc     \nc     if (ounitj) then\nc     .  the program assumes that jperm(j)=j and jval(j)=1.0d0\nc     .  and does NOT reference jperm or jval\nc     else\nc     .  the program operates on jperm/jval as described above\nc     endif\nc     \n      integer jbar              ! [input] Posn of j in SOCC orbs in J (1...ns)\n      integer nj                ! [input] Occupancy of j in J\n      integer jdim              ! [input] No. of determinants for ns(J)\n      integer kdim              ! [input] No. of determinants for ns(K)\n      integer eaj(jdim,3,*)     ! [input] Eaj transformation matrix for ns(J)\n      double precision eajphase(3,*) ! [input] Eaj phase information\n      logical ounitj            ! [input] If true jperm/jval are assumed unit\n      integer jperm(jdim)       ! [input] Input permutation\n      double precision jval(jdim) ! [input] Input values X(w)\n      integer kperm(kdim)       ! [output] Output permutation kperm(v)=jperm(w)\n      double precision kval(kdim) ! [output] Output values <Kv|Eaj|Jw> * X(w)\nc     \n      integer i, case, type, w, v\n      double precision phase\nc     \n      if (nj .eq. 2) then\n         do i = 1, kdim\n            kval(i)  = 0.0d0\n            kperm(i) = 1        ! Valid value so that don't need to test on zero\n         enddo\n      endif\nc     \n      do case = 1, nj\n         type = case + nj - 1\n         phase = eajphase(type,jbar)\n*         write(6,*) ' DOING type ', type, phase\nc     \n         if (ounitj) then\n            do w = 1, jdim\n               v = eaj(w,type,jbar)\n               kperm(v) = w\n               kval(v)  = phase\n*               write(6,*) ' w, v, phase ', w, v, phase\n            enddo\n         else\n            do w = 1, jdim\n               v = eaj(w,type,jbar)\n               kperm(v) = jperm(w)\n               kval(v)  = jval(w)*phase\n            enddo\n         endif\n      enddo\nc     \n      end\n      subroutine fci_apply_eaj3(\n     $     pbar, np, eap, eapphase,\n     $     rbar, nr, ebr, ebrphase,\n     $     tbar, nt, ect, ectphase,\n     $     jdim, ndim, hdim, odim,\n     $     perm, val, hperm, hval)\n      implicit none\nc     \nc     This bundles 3-calls to eaj into one to reduce subroutine call\nc     overhead inside the 3-particle coupling coeff generation routine.\nc\nc     . -p   -r   -t\nc     J -> N -> H -> O\nc\nc     or\nc\nc     <Ny|Eap|Jv><Hg|Ebr|Ny><Oz|Ect|Hg>\nc\nc     or\nc\nc     identity -> jperm/jval -> nperm/nval -> hperm/hval\nc\nc     See eaj for more details on the algorithm and parameters\nc     \n      integer pbar, rbar, tbar  ! [input] \n      integer np, nr, nt        ! [input] \n      integer jdim, ndim, hdim, odim ! [input]\n      integer eap(jdim,3,*), ebr(ndim,3,*), ect(hdim,3,*) ! [input]\n      double precision eapphase(3,*), ebrphase(3,*), ectphase(3,*) ! [input]\n      integer perm(*)           ! [scratch] at least hdim\n      double precision val(*)   ! [scratch] at least hdim\n      integer hperm(odim)       ! [output]\n      double precision hval(odim) ! [output]\nc     \n      integer i, case, type, w, v\n      double precision phase\nc   \nc     <N|Eap|J>\nc\n      if (np .eq. 2) then\n         do i = 1, ndim\n            hval(i)  = 0.0d0\n            hperm(i) = 1        ! Valid value so that don't need to test on zero\n         enddo\n      endif\n      do case = 1, np\n         type = case + np - 1\n         phase = eapphase(type,pbar)\n         do w = 1, jdim\n            v = eap(w,type,pbar)\n            hperm(v) = w\n            hval(v)  = phase\n         enddo\n      enddo\nc\nc     <H|Ebr|N>\nc\n      if (nr .eq. 2) then\n         do i = 1, hdim\n            val(i) = 0.0d0\n            perm(i) = 1\n         enddo\n      endif\n      do case = 1, nr\n         type = case + nr - 1\n         phase = ebrphase(type,rbar)\n         do w = 1, ndim\n            v = ebr(w,type,rbar)\n            perm(v) = hperm(w)\n            val(v)  = hval(w)*phase\n         enddo\n      enddo\nc\nc     <O|Ect|H>\nc\n      if (nt .eq. 2) then\n         do i = 1, odim\n            hval(i) = 0.0d0\n            hperm(i) = 1\n         enddo\n      endif\n      do case = 1, nt\n         type = case + nt - 1\n         phase = ectphase(type,tbar)\n         do w = 1, hdim\n            v = ect(w,type,tbar)\n            hperm(v) = perm(w)\n            hval(v)  = val(w)*phase\n         enddo\n      enddo\nc     \n      end\n      \n"
  },
  {
    "path": "src/apps/moldft/fci/fci_mfndoc.F",
    "content": "*\n* $Id: fci_mfndoc.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine fci_mfind_occ(iwalk,iocc,ns)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     given the lexical index of a path on a primitive spin graph\nc     for ns electrons and multi=2sz+1, return the spin occupation\nc     \n      integer iwalk             ! [input]\n      integer iocc(*)           ! [output]\n      integer ns                ! [input]\nc\n      integer iwgt, irow, nspt, is, k, krow, itest\nc     \n      iwgt = iwalk-1\n      irow = multi+(ns-multi+1)/2\n      nspt = ns/2 + 1\n      do 10 is = ns+1,2,-1\n         do 20 k=1,2\n            krow = irow-(2-k)\n            if(marc(k,krow,is-1,nspt).ne.0) then\n               itest=iwgt-marcwt(k,krow,is-1,nspt)\n               if(itest.ge.0) then\n                  iwgt = itest\n                  irow = krow\n                  iocc(is-1) = k\n                  goto 10\n               endif\n            endif\n 20      continue\n         call fci_err('no arc found in mfind_occ',is)\n 10   continue\n      if(iwgt.ne.0) call fci_err('invalid head in mfind_occ',iwgt)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_mfndwt.F",
    "content": "*\n* $Id: fci_mfndwt.F,v 1.2 1999/07/28 00:23:40 d3e129 Exp $\n*\n      subroutine fci_mfind_weight(iwalk,iocc,ns)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     find the lexical index of a path on a primitive spin graph\nc     for ns electrons and multi=2sz+1, given the spin occupation\nc     \n      integer iwalk             ! [output]\n      integer iocc(*)           ! [input]\n      integer ns                ! [input]\nc\n      integer iwgt, irow, nspt, is\nc\n      iwgt = 1\n      irow = 1\n      nspt = ns/2 + 1\n      do 10 is = 1,ns\n         iwgt = iwgt + marcwt(iocc(is),irow,is,nspt)\n         irow = marc(iocc(is),irow,is,nspt)\n         if(irow.eq.0) call fci_err('invalid arc in mfind_weight',iwgt)\n 10   continue\n      if(irow.ne.multi+(ns-multi+1)/2)\n     &     call fci_err('invalid tail in mfind_weight',irow)\n      iwalk=iwgt\nc     \n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_mgraph.F",
    "content": "*\n* $Id: fci_mgraph.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      subroutine fci_mgraph\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     generate determinant spin graphs for up to nsmax electrons\nc     with multi = 2sz+1. storage of graphs is inefficient but\nc     easy to use ... they are small anyway!\nc     \n      logical oprint\n      integer nsoc, is, irow, k, nspt, krow, i, mdead, iwsum\nc      \n      oprint = .false.\nc     \n      if(multi.lt.1 .or. multi.gt.(2*nsmax+1)) \n     $     call fci_err('multi error',multi)\n      call ifill(0,marc,1,2*nsmax1*nsmax1*nsmax2)\n      call ifill(0,marcwt,1,2*nsmax1*nsmax1*nsmax2)\n      call ifill(0,mwt,1,nsmax1*nsmax1*nsmax2)\n      call ifill(0,mnsdet,1,nsmax)\n      call ifill(0,mnscsf,1,nsmax)\nc     \nc     loop over no. of unpaired electrons and generate arrays\nc     \n      do 10 nsoc = multi-1,nsmax,2\n         nspt = nsoc/2+1\nc     fill in arc and wt ignoring sz\n         mwt(1,1,nspt)=1\n         do 20 is = 1,nsoc\n            do 30 irow = 1,is\n               do 40 k = 1,2\n                  krow = irow + (2-k)\n                  marc(k,irow,is,nspt) = krow\n                  mwt(krow,is+1,nspt)=mwt(krow,is+1,nspt) +\n     &                 mwt(irow,is  ,nspt)\n 40            continue\n 30         continue\n 20      continue\nc     eliminate unwanted arcs/rows\n         do 50 irow = 1,nsoc+1\n            if(irow.ne.multi+(nsoc-multi+1)/2) mwt(irow,nsoc+1,nspt)=0\n 50      continue\nc     \nc     set no. of dets and csf for no. of open shells. assume that sz = s\nc     \n         mnsdet(nsoc) = mwt(multi+(nsoc-multi+1)/2,nsoc+1,nspt)\n         ncsf = multi\n         do 52 i=(nsoc+1+multi)/2+1,nsoc+1\n            ncsf = ncsf * i\n 52      continue\n         do 53 i=1,(nsoc-multi+1)/2\n            ncsf = ncsf / i\n 53      continue\n         mnscsf(nsoc) = ncsf/(nsoc+1)\n         do 60 is = nsoc,1,-1\n            do 70 irow = 1,is\n               mdead = 0\n               do 80 k=1,2\n                  krow = irow + (2-k)\n                  if(mwt(krow,is+1,nspt).eq.0) then\n                     marc(k,irow,is,nspt)=0\n                     mdead = mdead+1\n                  endif\n 80            continue\n               if(mdead.eq.2) mwt(irow,is,nspt)=0\n 70         continue\n 60      continue\nc     generate arc weight array\n         do 90 is = nsoc+1,2,-1\n            do 100 irow = 1,is\n               if(mwt(irow,is,nspt).gt.0) then\n                  iwsum = 0\n                  do 110 k = 2,1,-1\n                     krow = irow-(2-k)\n                     if(krow.gt.0) then\n                        if(marc(k,krow,is-1,nspt).gt.0) then\n                           marcwt(k,krow,is-1,nspt)=iwsum\n                           iwsum = iwsum + mwt(krow,is-1,nspt)\n                        endif\n                     endif\n 110              continue\n               endif\n 100        continue\n 90      continue\n         if (oprint) then\n            write(6,*)\n            write(6,*) ' mwt,marc,marcwt arrays for nsoc = ',nsoc\n            write(6,*) ' no. of determinants = ',mnsdet(nsoc)\n            write(6,*) ' no. of configurations = ',mnscsf(nsoc)\n            write(6,1101) (irow,irow=1,nsoc+1)\n 1101       format('           ',11(5x,i2,5x)/\n     &           '           ',11(2x,'----------',2x)/)\n            do 120 is=1,nsoc+1\n               write(6,1201) is,(mwt(irow,is,nspt),irow=1,is)\n               write(6,1202) ((marc(k,irow,is,nspt),k=1,2),irow=1,is)\n               write(6,1202) ((marcwt(k,irow,is,nspt),k=1,2),irow=1,is)\n 120        continue\n 1201       format(' level ',i3/'           ',11(5x,i2,5x))\n 1202       format('           ',11(2x,i3,2x,i3,2x))\n         endif\nc     \n 10   continue\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_num.F",
    "content": "*\n* $Id: fci_num.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      integer function fci_num_dets(ns)\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     return the number of determinants for ns open shell electrons\nc     assuming that ns is a valid no. of open shell electrons for\nc     the given FCI space and spin multiplicity\nc\n      integer ns                ! [input]\nc\n      fci_num_dets = mnsdet(ns)\nc\n      end\n      integer function fci_num_csf(ns)\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     return the number of configurations for ns open shell electrons\nc     assuming that ns is a valid no. of open shell electrons for\nc     the given FCI space and spin multiplicity\nc\n      integer ns                ! [input]\nc\n      fci_num_csf = mnscsf(ns)\nc\n      end\n      integer function fci_num_owalks()\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     Returns the number of orbital occupation walks in the FCI.\nc     May need to be extended to accomodate symmetry.\nc\n      fci_num_owalks = nwalko\nc\n      end\n      integer function fci_ndets()\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     Returns the total number of determinants in the FCI\nc     (with use of symmetry)\nc\n      fci_ndets = ndets\nc\n      end\n      integer function fci_ncsf()\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     Returns the total number of configurations in the FCI\nc     (with use of symmetry)\nc\n      fci_ncsf = ncsf\nc\n      end\n      integer function fci_max_num_dets()\n      implicit none\n#include \"fciinfo.fh\"\nc\nc     Returns the maximum number of determinants associated\nc     with any orbital configuration in the full CI.\nc\nc     [Note that occupations K that arise as a result of\nc     .factorizations such as <I|Eij|J>=<I|Eia|K><K|Eaj|J>\nc     .where a is a ficitious orbital, may have more open shells.  \nc     .However, these are only relevant in the internals of the \nc     .coupling coefficient generation routines]\nc\n      integer ns\nc\n      if (nelec.le.nactiv) then\n         ns = nelec\n      else\n         ns = (2*nactiv-nelec)\n      endif\nc\n      if (ns.le.multi .or. ns.gt.nsmax) call fci_err\n     $     ('fci_max_num_dets: I am confused!',0)\nc\n      fci_max_num_dets = mnsdet(ns)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_ofndoc.F",
    "content": "*\n* $Id: fci_ofndoc.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      subroutine fci_ofind_occ(iwalk,iocc)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     find orbital occupation of walk with lexical index iwalk\nc     \n      integer iwalk             ! [input]\n      integer iocc(*)           ! [output]\nc\n      integer iwgt, irow, iorb, k, krow, itest\nc     \n      iwgt = iwalk-1\n      irow = nelec+1\n      do 10 iorb = nactiv+1,2,-1\n         do 20 k=3,1,-1\n            krow = irow-(k-1)\n            if(krow.gt.0) then\n               if(karc(k,krow,iorb-1).ne.0) then\n                  itest=iwgt-karcwt(k,krow,iorb-1)\n                  if(itest.ge.0) then\n                     iwgt = itest\n                     irow = krow\n                     iocc(iorb-1) = k\n                     goto 10\n                  endif\n               endif\n            endif\n 20      continue\n         call fci_err('no arc found in ofind_occ',iorb)\n 10   continue\n      if(iwgt.ne.0) call fci_err('invalid head in ofind_occ',iwgt)\nc     \n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_ofndwt.F",
    "content": "*\n* $Id: fci_ofndwt.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      subroutine fci_ofind_weight(iwalk,iocc)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     find the lexical index of a path on orbital graph\nc     for nelec electrons and nactiv orbitals\nc     \n      integer iwalk             ! [output]\n      integer iocc(*)           ! [input]\nc\n      integer iwgt, irow, iorb\nc     \n      iwgt = 1\n      irow = 1\n      do 10 iorb = 1,nactiv\n         iwgt = iwgt + karcwt(iocc(iorb),irow,iorb)\n         irow = karc(iocc(iorb),irow,iorb)\n*        if(irow.le.0) call fci_err('invalid arc in ofind_weight',iwgt)\n 10   continue\n      if(irow.ne.nelec+1)\n     &     call fci_err('invalid tail in ofind_weight',irow)\n      iwalk=iwgt\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_ograph.F",
    "content": "*\n* $Id: fci_ograph.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      subroutine fci_ograph\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     generate orbital configuration graphs for nelec electron systems\nc     \n      integer iorb, irow, k, krow, kdead, isum, ir,\n     $     iwalk, iocc(nactmx), numwalko\n      logical oprint\nc     \n      oprint = .false.\nc     \n      call ifill(0,karc,1,3*(nelmax+1)*(nactmx+1))\n      call ifill(0,karcwt,1,3*(nelmax+1)*(nactmx+1))\n      call ifill(0,kwt,1,(nelmax+1)*(nactmx+1))\nc     \nc     \nc     generate graph including some incorrect tails\nc     \n      kwt(1,1) = 1\n      do 10 iorb = 1,nactiv\n         do 20 irow = 1,min(2*(iorb-1),nelec)+1\n            if (kwt(irow,iorb).gt.0) then\n               do 30 k=1,3\n                  krow = irow + (k-1)\n                  if (krow.le.nelec+1) then\n                     karc(k,irow,iorb) = krow\n                     kwt(krow,iorb+1) = kwt(krow,iorb+1) +\n     &                    kwt(irow,iorb)\n                  endif\n 30            continue\n            endif\n 20      continue\n 10   continue\n      nwalko = kwt(nelec+1,nactiv+1)\nc     \nc     remove incorrect tails\nc     \n      do 40 irow = 1,nelec\n         kwt(irow,nactiv+1) = 0\n 40   continue\n      do 50 iorb = nactiv,1,-1\n         do 60 irow = 1,min(2*(iorb-1),nelec)+1\n            kdead = 0\n            do 70 k = 1,3\n               krow = irow + (k-1)\n               if (krow.gt.nelec+1) then\n                  kdead = kdead + 1\n               else\n                  if (kwt(krow,iorb+1).eq.0) then\n                     karc(k,irow,iorb) = 0\n                     kdead = kdead + 1\n                  endif\n               endif\n 70         continue\n            if (kdead.eq.3) kwt(irow,iorb) = 0\n 60      continue\n 50   continue\nc     \nc     generate arc weight array\nc     \n      do 80 iorb = nactiv+1,2,-1\n         do 90 irow = 1,min(2*(iorb-1),nelec)+1\n            if(kwt(irow,iorb).gt.0) then\n               isum = 0\n               do 100 k = 1,3\n                  krow = irow - (k-1)\n                  if (krow.gt.0) then\n                     if (karc(k,krow,iorb-1).gt.0) then\n                        karcwt(k,krow,iorb-1) = isum\n                        isum = isum + kwt(krow,iorb-1)\n                     endif\n                  endif\n 100           continue\n            endif\n 90      continue\n 80   continue\nc     \n      if (oprint) then\n         write(6,3) nelec,nactiv,nwalko\n 3       format(1x,' orbital configuration graph '//\n     &        ' no. of electrons ',i6/\n     &        ' no. of orbitals  ',i6/\n     &        ' no. of walks     ',i6/)\n         do 110 iorb = 1,nactiv+1\n            ir = min(2*(iorb-1),nelec) + 1\n            write(6,1) iorb,(kwt(irow,iorb),irow=1,ir)\n 1          format(1x,i4,8(5x,i4,5x):/5x,8(5x,i4,5x))\n            write(6,2) ((karc(k,irow,iorb),k=1,3),irow=1,ir)\n 2          format(5x,8(1x,3i4,1x):/5x,8(1x,3i4,1x))\n            write(6,2) ((karcwt(k,irow,iorb),k=1,3),irow=1,ir)\n            write(6,*)\n 110     continue\nc     \n         do iwalk = 1, numwalko\n            call fci_ofind_occ(iwalk, iocc)\n            write(6,222) iwalk, (iocc(k),k=1,nactiv)\n 222        format(1x,i8,2x,20i2)\n         enddo\n      endif\nc     \n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_onelcc.F",
    "content": "*\n* $Id: fci_onelcc.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      subroutine fci_onelcc(iocc,idet,idim,isym,\n     $     ionel,nonel,nonemx)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     compute all non-zero one-electron coupling coefficents\nc     g(i,j;I,J) = <I|Eij|J> for all orbitals ij and for all\nc     determinants generated from orbital configuration iwalk\nc     \nc     ionel(1,*) = i\nc     ionel(2,*) = j\nc     ionel(3,*) = ideterminant\nc     ionel(4,*) = jdeterminant\nc     ionel(5,*) = value (only -1,+1,2 are valid)\nc     \nc     <Iv|Eij|Jw> = <Iv|Eia|Ku><Ku|Eaj|Jw>\nc     .           = <Ku|Eai|Iv><Ku|Eaj|Jw>\nc\nc     Orbital configuration I may be of any symmetry (specified \nc     only by its occupation etc.) but J is constrained to be\nc     of the same symmetry as the CI state.\nc     \n      integer iocc(nactiv),idet,idim,isym ! [input] Info about I\n      integer nonemx            ! [input] last dimension of ionel\n      integer ionel(5,nonemx)   ! [output] returns coupling coeff info\n      integer nonel             ! [output] no. of coeff returned\nc     \n      integer indbar(nactmx)\n      integer jperm(ndetmx), iperm(ndetmx)\n      double precision jval(ndetmx), ival(ndetmx)\nc     \n      integer nsi, nsj, nsk, jdet, jwalk, ni, nj,\n     $     jdim, kdim, i, j, u, v, ibar, jbar, deltai, value,\n     $     idummy, ii, jsym\n      logical oprint\n#include \"bitops.fh\"\nc     \n      oprint = .false.\n      nonel = 0\nc     \nc     Form I indbar vector\nc     \n      if (oprint) then\n         write(6,*) ' iocc ', (iocc(i),i=1,nactiv)\n         write(6,*) ' isym ', isym, statesym\n      endif\nc\n      nsi = 0\n      do i = 1,nactiv\n         if (iocc(i).eq.2) nsi = nsi + 1\n         indbar(i) = nsi\n      enddo\n      if (idim .ne. mnsdet(nsi)) call fci_err('fci_onelcc: nsi?',nsi)\nc     \nc     Loop thru i\nc     \n      do i = 1, nactiv\n         ni = iocc(i)-1\n         if (ni .gt. 0) then\n            if (oprint) write(6,*) ' i = ', i, ' ni = ', ni\nc     \nc     Handle Eii special case for efficiency\nc     \n            if (isym .eq. statesym) then\n               call fci_ofind_weight(jwalk,iocc) ! idet may not be absolute\n               jdet = indexo(jwalk)\n               do v = 1,idim\n                  nonel = nonel + 1\n                  ionel(1,nonel) = i\n                  ionel(2,nonel) = i\n                  ionel(3,nonel) = v + idet\n                  ionel(4,nonel) = v + jdet\n                  ionel(5,nonel) = ni\n               enddo\n            endif\nc     \nc     Form <Ku|Eai|Iv>\nc     \n            ibar = indbar(i)\n            nsk  = nsi\n            if (ni .eq. 2) then\n               nsk = nsk + 2\n               ibar = ibar + 1\n            endif\n            kdim = mnsdet(nsk)\n            call fci_apply_eaj(ibar, ni, idim, kdim, \n     $           eajdata(eajptr(nsi)), eajphase(1,1,nsi), .true.,\n     $           idummy, idummy, iperm, ival)\nc\nc\n            if (oprint) write(6,17) i, (iperm(u),ival(u),u=1,kdim)\n 17         format(i5,20(i3,f5.1,2x))\nc     \nc     Remove the electron in i from occupation vectors\nc     \n            if(oprint)write(6,88) ' I ', (iocc(u),indbar(u),u=1,nactiv)\n 88         format(a,2x,20(i2,'(',i2,')',2x))\n            iocc(i) = iocc(i) - 1\n            deltai = -1\n            if (ni .eq. 2) deltai = 1\n            do ii = i,nactiv\n               indbar(ii) = indbar(ii) + deltai\n            enddo\n            if(oprint)write(6,88) ' K ', (iocc(u),indbar(u),u=1,nactiv)\nc\n            jsym = ieor(ieor(isym,orbsym(i)),statesym) ! Sym. of orbital j\nc     \nc     indbar and iocc now refer to the occupation of K\nc     \nc     Now loop thru j!=i, and not doubly occupied in K, and form <Ku|Eaj|Jw>\nc     \n            do j = 1, nactiv\n               nj = iocc(j)     ! Since iocc refers to K and we want J\n               if ((nj .lt. 3) .and. (i .ne. j) .and. \n     $              (orbsym(j).eq.jsym)) then\n                  if(oprint)write(6,*) ' j = ', j, ' nj = ', nj\nc     \nc     Determine index of J orbital occupation\nc     \n                  iocc(j) = iocc(j) + 1\n                  if(oprint)write(6,11) i, j, (iocc(v),v=1,nactiv)\n 11               format(2i5,5x,20i3)\n                  call fci_ofind_weight(jwalk,iocc)\n                  iocc(j) = iocc(j) - 1\nc     \n                  jbar = indbar(j)\n                  if (nj .eq. 1) jbar = jbar + 1 ! Since indbar refers to K\n                  nsj = nsk\n                  if (nj .eq. 2) nsj = nsj - 2 \n                  jdim = mnsdet(nsj)\n                  if (oprint) write(6,*) \n     $                 ' jbar ', jbar, ' nsj ', nsj, ' nsk ', nsk\n                  call fci_apply_eaj(jbar, nj, jdim, kdim, \n     $                 eajdata(eajptr(nsj)), eajphase(1,1,nsj), .true.,\n     $                 idummy, idummy, jperm, jval)\n                  if(oprint) write(6,17) j, (jperm(u),jval(u),u=1,kdim)\nc     \nc     Now use <Iv|Eij|Jw> = <Ku|Eai|Iv>*<Ku|Eaj|Jv>\nc     \n                  jdet = indexo(jwalk)\n                  do u = 1, kdim\n                     value = nint(ival(u)*jval(u))\n                     if (value .ne. 0) then\n                        nonel = nonel + 1\n                        ionel(1,nonel) = i\n                        ionel(2,nonel) = j\n                        ionel(3,nonel) = iperm(u)+idet\n                        ionel(4,nonel) = jperm(u)+jdet\n                        ionel(5,nonel) = value\n                     endif\n                  enddo\n               endif\n            enddo\nc     \nc     Restore the electron in i to the occupation vectors\nc     \n            iocc(i) = iocc(i) + 1\n            do ii = i,nactiv\n               indbar(ii) = indbar(ii) - deltai\n            enddo\nc     \nc     indbar and iocc now again refer to iocc\nc     \n         endif\n      enddo\nc\n      if (oprint) call fci_prteop(ionel,nonel)\nc\n*      stop 1\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_onepdm.F",
    "content": "*\n* $Id: fci_onepdm.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      subroutine fci_onepdm(vec, nvec, weight, onepdm)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     Compute the AVERAGE 1-particle density matrix for the input\nc     determinant CI vectors and weights.  Force the weights to\nc     add up to unity.\nc     \nc     onepdm(p,q) returns sum(ivec) weight(ivec) <V(ivec)|Epq|V(ivec)>\nc     \n      integer nvec              ! [input] No. of vectors\n      double precision vec(ndets, nvec) ! [input] The CI vectors\n      double precision weight(nvec) ! [input] The weights\n      double precision onepdm(nactiv,nactiv) ! [output] 1 PDM\nc     \n      integer nvecmx            ! Maximum value of nvec\n      parameter (nvecmx=10) \n      double precision epq(ndetmx*nvecmx*nactmx) ! Should dynamically allocate\n      integer numq, qlist(nactmx)\n      integer iwalk, idim, iocc(nactmx), nsi, ioff, p, q, qq\n      integer ivec, ivq, w, sym\n      double precision sum\nc     \n      if (nvec.gt.nvecmx) call fci_err('fci_onepdm: nvecmx? ', nvec)\nc\nc     Normalize the weights\nc\n      sum = 0.0d0\n      do ivec = 1, nvec\n         sum = sum + weight(ivec)\n      enddo\n      if (sum .eq. 0.0d0) call fci_err('fci_onepdm: zero weight sum',0)\n      do ivec = 1, nvec\n         weight(ivec) = weight(ivec) / sum\n      enddo\n      write(6,11) (weight(ivec),ivec = 1, nvec)\n 11   format(/' Weights for averaging density matrix ', 20f10.6)\n      write(6,*)\nc     \n      call dfill(0.0d0, onepdm, 1, nactiv*nactiv)\nc     \nc     Loop thru orbital walks I and get information\nc     \n      do 10 iwalk = 1, nwalko\n         call fci_owalk_info(iwalk, iocc, nsi, ioff, idim, sym)\n         if (sym .ne. statesym) goto 10\nc     \nc     Loop thru orbitals p\nc     \n         do p = 1, nactiv\nc     \nc     Form  <V|Epq|Iw> for all q\nc     \n            call fci_couple1(vec, nvec, p, iocc, idim, \n     $           numq, qlist, epq)\nc     \nc     Multiply with the CI vectors and add into the matrices\nc     \n            do qq = 1, numq\n               q = qlist(qq)\n               do ivec = 1, nvec\n                  ivq = idim*(ivec-1 + nvec*(qq-1)) ! epq(idim,nvec,nactiv)\n                  sum = 0.0d0\n                  do w = 1, idim\n                     sum = sum + epq(ivq+w)*vec(ioff+w,ivec)\n                  enddo\n                  onepdm(p,q) = onepdm(p,q) + sum*weight(ivec)\n               enddo\n            enddo\n         enddo\n 10   continue                  ! iwalk loop\nc     \nc     Done.  Check the symmetry and then force exact symmetry.\nc     \n      do p = 1, nactiv\n         do q = 1, nactiv\n            if (abs(onepdm(p,q)-onepdm(q,p)) .gt. 1d-10) then\n               write(6,*) ivec, p, q, onepdm(p,q), onepdm(q,p)\n               call fci_err('fci_onepdm: not symmetric ', 100*p+q)\n            endif\n            sum = (onepdm(p,q)+onepdm(q,p))*0.5d0\n            onepdm(p,q) = sum\n            onepdm(q,p) = sum\n         enddo\n      enddo\nc     \nc     Check the trace\nc     \n      sum = 0.0d0\n      do p = 1, nactiv\n         sum = sum + onepdm(p,p)\n      enddo\n      if (abs(sum-dfloat(nelec)).gt.1d-10) call fci_err\n     $     ('fci_onepdm: incorrect trace ', ivec)\nc\n      write(6,*) ' Average one particle density matrix '\n      write(6,*)\n      call fci_output(onepdm(1,1),1,nactiv,1,nactiv,nactiv,\n     $     nactiv,1)\n      write(6,*)\nc     \n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_output.F",
    "content": "*\n* $Id: fci_output.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      subroutine fci_output (z,rowlow,rowhi,collow,colhi,rowdim,coldim,\n     $     nctl)\nc.......................................................................\nc output prints a real*8 matrix in formatted form with numbered rows\nc and columns.  the input is as follows;\nc        matrix(*,*).........matrix to be output\nc        rowlow..............row number at which output is to begin\nc        rowhi...............row number at which output is to end\nc        collow..............column number at which output is to begin\nc        colhi...............column number at which output is to end\nc        rowdim..............row dimension of matrix(*,*)\nc        coldim..............column dimension of matrix(*,*)\nc        nctl................carriage control flag; 1 for single space\nc                                                   2 for double space\nc                                                   3 for triple space\nc the parameters that follow matrix are all of type integer*4.  the\nc program is set up to handle 5 columns/page with a 1p5d24.15 format for\nc the columns.  if a different number of columns is required, change\nc formats 1000 and 2000, and initialize kcol with the new number of\nc columns.\nc author;  nelson h.f. beebe, quantum theory project, university of\nc          florida, gainesville\nc.......................................................................\nC$Id: fci_output.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n      implicit none\n      integer rowlow,rowhi,collow,colhi,rowdim,coldim,begin,kcol\n      integer nctl, i, j, last, k\n      double precision z(rowdim,coldim), zero\n      character*8 asa(3), column, ctl, blank\n      data column/'column'   /,asa/' ','00000000'  ,\n     1     '--------'  /,blank/' '/\n      data kcol/8/\n      data zero/0.d00/\n      do 11 i=rowlow,rowhi\n         do 10 j=collow,colhi\n            if (z(i,j).ne.zero) go to 15\n 10      continue\n 11   continue\n      write (6,3000)\n 3000 format (/' zero matrix'/)\n      go to 3\n 15   continue\n      ctl = blank\n      if ((nctl.le.3).and.(nctl.gt.0)) ctl = asa(nctl)\n      if (rowhi.lt.rowlow) go to 3\n      if (colhi.lt.collow) go to 3\n      last = min(colhi,collow+kcol-1)\n      do 2 begin = collow,colhi,kcol\n*         write (6,1000) (column,i,i = begin,last)\n         write (6,1000) (i,i = begin,last)\n         do 1 k = rowlow,rowhi\n            do 4 i=begin,last\n               if (z(k,i).ne.zero) go to 5\n 4          continue\n            go to 1\n 5          write (6,2000) ctl,k,(z(k,i), i = begin,last)\n 1       continue\n         last = min(last+kcol,colhi)\n 2    continue\n 3    return\n* kcol = 4\n* 1000 format (/1h ,16x,3(a6,i3,2x),(a6,i3))\n* 2000 format (a1,3hrow,i4,2x,4f17.11)\n* kcol = 8\n*\n* if U like having rows and columns labelled with row and col\n* use these\n*\n* 1000 format (/1h ,11x,7(a3,i3,3x),(a3,i3))\n* 2000 format (a1,'row',i4,1x,8f9.4)\nc\n 1000 format (/1h ,8x,7('   ',i3,3x),('   ',i3))\n 2000 format (a1,i4,1x,8f9.4)\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_owalk_info.F",
    "content": "*\n* $Id: fci_owalk_info.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      subroutine fci_owalk_info(owalk, iocc, ns, ioff, numdet, sym)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     Given the index of an orbital walk return the occupation, the \nc     offset in the CI determinant vector, the number of open shells\nc     and the corresponding number of determinants, and the \nc     symmetry of the occupation.  \nc     \nc     The CI coefficients for this orbital occupation are addressed\nc     as C(ioff+i) i=1,...,numdet.\nc     \nc     This routine bundles the function of several other routines\nc     as a convenience.\nc     \n      integer owalk             ! [input]  Index of orbital occupation\n      integer iocc(*)           ! [output] The orbital occupation pattern\n      integer ns                ! [output] No. of open shells\n      integer ioff              ! [output] Offset into CI vector\n      integer numdet            ! [output] No. of determinants for this ns\n      integer sym               ! [output] Symmetry 0...7\nc     \n      integer i\n#include \"bitops.fh\"\nc     \n      if (owalk.lt.1 .or. owalk.gt.nwalko) call fci_err\n     $     ('fci_owalk_info: bad owalk ', owalk)\nc     \n      call fci_ofind_occ(owalk, iocc)\n      ns = 0\n      sym = 0\n      do i = 1, nactiv\n         if (iocc(i) .eq. 2) then \n            ns = ns + 1\n            sym = ieor(sym,orbsym(i))\n         endif\n      enddo\n      numdet = mnsdet(ns)\n      if (sym .eq. statesym) then\n         ioff = indexo(owalk)\n      else\n         ioff = -999999999\n      endif\nc     \n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_prntri.F",
    "content": "*\n* $Id: fci_prntri.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      subroutine fci_prntri(a,m)\n      implicit real*8 (a-h,o-z)\nc     \nc     print lower triangular matrix\nc     \n      character*8 line\n      dimension a(*)\n      data line /'--------'/,ncolum/6/\n    1 format(2x,1x,6(7x,i5))\n    2 format(2x,4x,6(4x,a8))\n    3 format(2x,i2,2x,6f12.6)\n    4 format(/)\n      iout=6\n      ii=0\n      jj=0\n 200  ii=ii+1\n      jj=jj+1\n      kk=ncolum*jj\n      nn=kk*(kk+1)/2\n      mm=m\n      if(m.gt.kk) mm=kk\n      write(iout,1) (i,i=ii,mm)\n      write(iout,2) (line,i=ii,mm)\n      do 101 i=ii,m\n         i1=ii+i*(i-1)/2\n         i2=i*(i+1)/2\n         if(i2.gt.nn) i2=i1+ncolum-1\n         write(iout,3) i,(a(j),j=i1,i2)\n 101  continue\n      if(m.le.kk) go to 201\n      write(iout,4)\n      ii=kk\n      go to 200\n 201  return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_prspnad.F",
    "content": "*\n* $Id: fci_prspnad.F,v 1.2 1999/07/28 00:23:41 d3e129 Exp $\n*\n      subroutine fci_prspnad(ns)\n      implicit none\n#include \"fciinfo.fh\"\n      integer ns                ! [input]\nc\nc     Print the spin-adaption coefficents for ns open shells\nc\n      double precision det(ndetmx), csf(ncsfmx)\n      integer icsf, idet, mdet, mcsf\nc\n      mdet = mnsdet(ns)\n      mcsf = mnscsf(ns)\n      write(6,1) ns\n 1    format(/'  Spin-adaption matrix for', i3, ' open-shells '/\n     $     '(determinants down columns, CSF across rows)')\n      write(6,2) (icsf, icsf=1,mcsf)\n 2    format(1x,1000(4x,i4:))\n      do idet = 1, mdet\n         call dfill(0.0d0, det, 1, mdet)\n         det(idet) = 1.0d0\n         call fci_spin_adapt(ns, 1, det, csf)\n         write(6,3) (csf(icsf), icsf=1,mcsf)\n 3       format(1x,1000f8.4)\n      enddo\n      write(6,*)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_prteop.F",
    "content": "*\n* $Id: fci_prteop.F,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\n      subroutine fci_prteop(ionel,nonel)\n      implicit integer(a-z)\n      integer ionel(5,*)\nc\n      write(6,1)\n1     format(/' one electron coupling coefficients (i j K J value)'/)\n      write(6,2) ((ionel(i,j),i=1,5),j=1,nonel)\n2     format(3(2i3,2i6,i3,4x))\n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_prvec.F",
    "content": "      subroutine fci_print_vector(c, thresh, nwalko, nactive, statesym)\n      implicit none\n#include \"fciparam.fh\"\nc      \nc     Print large components of the CI vector out\nc\n      double precision c(*)   ! [input] The determinant CI vector\n      double precision thresh ! [input] Print coeffs > thresh\n      integer nwalko          ! [input] No. of orbital occupations\n      integer nactive         ! [input] No. of active orbitals\n      integer statesym        ! [input] Symmetry of the CI state (0...7)\nc\n      integer iwalk, mwalk, ns, ioff, numdet, i, testo, testm, sym\n      integer iocc(nactmx), mocc(nsmax)\n      character*80 fmt\n      character*2 spin(2)\n      data spin/'+ ','- '/\nc\n      write(6,1)\n 1    format(/\n     $     '    Index     Owalk Mwalk      Coeff       Orbital and',\n     $     ' Spin occupation'/\n     $     ' --------    ------ -----    ---------     -----------',\n     $     '----------------')\n      do iwalk = 1, nwalko\n         call fci_owalk_info(iwalk, iocc, ns, ioff, numdet,sym)\n         if (sym .eq. statesym) then\n            write(fmt,12) nactive, max(ns,1)\n 12         format('(1x,i8,4x,i6,2x,i4,4x,f9.6,4x,',i2,\n     $           'i2,4x,',i2,'a2)')\n            do mwalk = 1, numdet\n               if (abs(c(ioff+mwalk)).gt.thresh) then\n                  call fci_mfind_occ(mwalk, mocc, ns)\n                  write(6,fmt) ioff+mwalk,iwalk,mwalk,\n     $                 c(ioff+mwalk),\n     $                 (iocc(i)-1,i=1,nactive),\n     $                 (spin(mocc(i)),i=1,ns)\nc     \nc     This just to check that the det_to_walk routine is working\nc     \n                  call fci_det_to_walk(ioff+mwalk, testo, testm)\n                  if (testo.ne.iwalk .or. testm.ne.mwalk)\n     $                 call fci_err('fci_det_to_walk failed',0)\n               endif\n            enddo\n         endif\n      enddo\nc\n      write(6,*)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_setup.F",
    "content": "*\n* $Id: fci_setup.F,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\n      subroutine fci_setup(multiplicity, nactive, nelectrons,\n     $     orbsyms, symstate,\n     $     norbitalconfig, ndeterminants, nconfigurations,\n     $     norbconfignosym)\n      implicit none\n#include \"fciinfo.fh\"\n      integer multiplicity      ! [input] Spin multiplicity\n      integer nactive           ! [input] No. of active orbitals\n      integer nelectrons        ! [input] No. of active electrons\n      integer orbsyms(nactive)  ! [input] Symmetry of orbitals (1...8)\n      integer symstate          ! [input] Desired symmetry of state\n      integer norbitalconfig    ! [output] No. of orb. conf. WITH symmetry\n      integer ndeterminants     ! [output] No. of determinants in FCI\n      integer nconfigurations   ! [output] No. of configurations in FCI\n      integer norbconfignosym   ! [output] No. of orb. conf. WITHOUT symmetry\nc     \nc     initialise tables and common blocks for fullci of\nc     nelectrons electrons in nactive orbitals and multiplicity=2s+1.\nc\nc     norbitalconfig, ndeteterminants and ncconfiguration return the \nc     no. of orbital configurations, the no. of determinants in the ci,\nc     and the no. of csf in the ci respectively\nc\nc     symmetry information is accepted and enforced but is not currently\nc     used to reduce computation or memory usage ... coming soon!\nc     \n      integer iocc(nactmx)\n      integer i, iwalk, ns, junk, idim, isym\n      logical oprint\nc\n      call fci_tinit()\nc\n      oprint = .false.\n      call fci_tstart(7,oprint)\nc\nc     Put arguments into common and then initialize everthing else\nc\n      nactiv = nactive\n      nelec  = nelectrons\n      multi  = multiplicity\n      statesym = symstate - 1\n      do i = 1, nactiv\n         orbsym(i) = orbsyms(i)-1\n         if (orbsym(i).lt.0 .or. orbsym(i).gt.7) call fci_err\n     $        ('fci_setup: orbital symmetry is bad ', orbsyms(i))\n      enddo\nc\n      if (statesym.lt.0 .or. statesym.gt.7) call fci_err\n     $     ('fci_setup: state symmetry is bad',symstate)\n      if (nelec.lt.1 .or. nelec.gt.nelmax) call fci_err(\n     & ' invalid no. of electrons in full ci space ',nelec)\n      if (nactiv.lt.1 .or. nactiv.gt.nactmx) call fci_err(\n     & ' invalid no. of orbitals in full ci space ',nactiv)\n      if (multi.lt.1 .or. multi.gt.nelec+1) call fci_err(\n     & ' invalid spin multiplicity in full ci space ',multi)\nc\n      nacttr = nactiv*(nactiv+1)/2\nc     \n      do i = 1,nactiv\n         iky(i) = ((i-1)*i)/2\n      enddo\nc\nc     make the spin graphs\nc\n      call fci_mgraph\nc     \nc     now the orbital graph for nelec and nelec-1 electrons\nc\n      call fci_ograph\nc\n      if (nwalko.lt.1 .or. nwalko.gt.nwkomx) call fci_err(\n     &     ' invalid no. of n e- orbital configurations ',nwalko)\nc\nc     count the determinants and csf, make indexo vector\nc\n      if (oprint) write(6,*) ' orbital configurations '\n      ncsf = 0\n      ndets = 0\n      nwalkosym = 0\nc\n      do 10 iwalk = 1,nwalko\n         call fci_owalk_info(iwalk,iocc,ns,junk,idim,isym)\n         if (isym .eq. statesym) then\n            if (oprint) write(6,1) iwalk,mnsdet(ns),mnscsf(ns),\n     &           (iocc(i)-1,i=1,nactiv)\n 1          format(1x,i6,4x,2i4,4x,10i2)\n            indexo(iwalk) = ndets\n            ndets = ndets + mnsdet(ns)\n            ncsf = ncsf + mnscsf(ns)\n            nwalkosym = nwalkosym + 1\n         else\n            indexo(iwalk) = ndets ! Must do this for detwalk\n         endif\n 10   continue\n      indexo(nwalko+1) = ndets\n      if (oprint) then\n         write(6,2) (indexo(i),i=1,nwalko+1)\n 2       format(/' index from orbital configurations to ci vector'//\n     &        100(1x,13i6/))\n      endif\nc     \nc     Make the Eaj information\nc\n      call fci_make_all_eaj()\nc     \n      call fci_tfinish(7,.false.)\nc\n      norbitalconfig  = nwalkosym\n      ndeterminants   = ndets\n      nconfigurations = ncsf\n      norbconfignosym = nwalko\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_sigma.F",
    "content": "*\n* $Id: fci_sigma.F,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\n      subroutine fci_sigma(c,s,ecore,h,g,ionel,i1dim,nonemx,\n     $     dkl,bij,kblmax)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     s = hamiltonian * c (MUST PRESENTLY BE IN DETERMINANTS)\nc     \n      double precision c(ndets) ! [input] CI vector\n      double precision s(ndets) ! [output] H*c\n      double precision ecore    ! [input] Nuclear repulsion+frozen core\n      double precision h(nacttr)! [input] Modified 1-e integrals\n      double precision g(nacttr,nacttr) ! [input] 2-e integrals\n      double precision dkl(*), bij(*) ! [scratch] Workspace\n      integer i1dim             ! [input] last dimension of ionel\n      integer nonemx            ! [input] Max # coupling coeff from onelcc\n      integer ionel(5,i1dim)    ! [scratch] workspace to hold coupling coeff\n      integer kblmax            ! [input] max size of any intermdediate state\nc      \n      integer kblock, koff, num1cc, kwalk, kdim, kel,\n     $     k, l, kl, kaddr, jdet, idet, nonel\n      integer kocc(nactmx), kbase, ksym, kns\n      double precision ddot\n      integer idamax\n      external ddot, idamax\nc\n      call fci_tstart(8,.false.)\n      call dfill(0.0d0,s,1,ndets)\n      call dscal(nacttr,2.0d0,h,1)\nc     loop thru intermediate states ... process when have all can hold\n      kblock = 0\n      num1cc = 0\n      kwalk  = 1\nc\n 10   if (kwalk.gt.nwalko) goto 20\n      call fci_owalk_info(kwalk,kocc,kns,kbase,kdim,ksym)\n      if (kblock+kdim.le.kblmax .and. num1cc+nonemx.le.i1dim) then\n         koff = kblock\n         call fci_onelcc(kocc,koff,kdim,ksym,\n     $        ionel(1,num1cc+1),nonel,nonemx)\nc\nc     Do the 1-e bit while we know the symmetry of K and real kbase\nc\n         if (ksym .eq. statesym) then\n            do kel = num1cc+1,num1cc+nonel\n               k = max(ionel(1,kel),ionel(2,kel))\n               l = min(ionel(1,kel),ionel(2,kel))\n               kl = iky(k) + l\n               idet = ionel(3,kel) + kbase - koff\n               jdet = ionel(4,kel)\n               s(idet) = s(idet) + h(kl)*c(jdet)*ionel(5,kel)\n            enddo\n         endif\nc\n         num1cc = num1cc + nonel\n         kwalk = kwalk + 1\n         kblock = kblock + kdim\n         goto 10\n      endif\nc\n 20   continue\nc\n      if (kblock .gt. 0) then\nc     vector compute required addresses\n         do 30 kel = 1,num1cc\n            k = max(ionel(1,kel),ionel(2,kel))\n            l = min(ionel(1,kel),ionel(2,kel))\n            kl = iky(k) + l\n            ionel(1,kel) = ionel(3,kel) + (kl - 1)*kblock\n 30      continue\nc     make dkl\n         call dfill(0.0d0,dkl,1,nacttr*kblock)\n         do 40 kel = 1,num1cc\n            kaddr = ionel(1,kel)\n            jdet = ionel(4,kel)\n            dkl(kaddr) = dkl(kaddr) + ionel(5,kel) * c(jdet)\n 40      continue\nc     make bij\n         call dgemm('n','n',kblock,nacttr,nacttr,1.0d0,dkl,kblock,\n     $        g,nacttr,0.0d0,bij,kblock)\n*         call fci_axb(kblock,nacttr,nacttr,dkl,g,bij)\nc     add in 2-e sigma component \n         do 50 kel = 1,num1cc\n            kaddr = ionel(1,kel)\n            idet = ionel(4,kel)\n            s(idet) = s(idet) + ionel(5,kel) * bij(kaddr) \n 50      continue\n      else if (kwalk.le.nwalko) then\n         write(6,*) ' kblock, kdim, kblmax, num1cc, nonemx, i1dim ',\n     $        kblock, kdim, kblmax, num1cc, nonemx, i1dim \n         call fci_err('fci_sigma: kblock is zero ', kblock)\n      endif\nc     goto next kwalk if any left\n      kblock = 0\n      num1cc = 0\n      if (kwalk.le.nwalko) goto 10\nc     \n      call dscal(ndets,0.5d0,s,1)\n      call dscal(nacttr,0.5d0,h,1)\n      call daxpy(ndets, ecore, c, 1, s, 1)\nc\n      call fci_tfinish(8,.false.)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_solve.F",
    "content": "*\n* $Id: fci_solve.F,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\n      subroutine fci_solve(nroot, thresh, maxvec, ecore, h, g, \n     $     work, lenwrk, roots, evecfilename, diagfilename)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     Solve the CI to the requested accuracy.  Right now just uses\nc     determinants but is readily extended to also accomodate CSF.\nc     \nc     The eigenvalues are returned in roots.  The eigenvectors are\nc     returned in file evecfilename.\nc\nc     The minimum amount of memory required is independent of the\nc     number of roots, and is slightly larger than 2*ndeterminants.\nc     The more memory the better, but 2*ndeterminants+500000 will\nc     probably always be enough.\nc     \n      integer nroot             ! [input] No. of roots to find\n      double precision thresh   ! [input] Threshold for residual norm\n      integer maxvec            ! [input] Davidson subspace dim PER ROOT\n      double precision ecore    ! [input] Nuclear repulsion+frozen core\n      double precision h(nacttr) ! [input] h(ij) = h_{ij}\n      double precision g(nacttr,nacttr) ! [input] g(ij,kl) = (ij|kl)\n      integer lenwrk            ! [input] Size of work space\n      double precision work(lenwrk) ! [scratch] Work space\n      double precision roots(nroot) ! [output] Returns the eigenvalues\n      character*(*) evecfilename ! [input] Name of file for eigen vectors\n      character*(*) diagfilename ! [input] Name of file for diagonals\nc     \n      integer maxv              ! Local copy of maxvec so we can reduce it\n      logical oprint\n      integer itermx            ! Maximum number of iterations\n      integer iv, ihd, itop2,  ionel, kpt, mkpt, ihmod\n      integer ierr, nonelt, nonemx\nc\n      logical fci_davids\n      external fci_davids\nc\n      integer evecfile, diagfile\nc\n      data itermx / 200/\nc     \n      oprint = .true.\n      call fci_tstart(9,oprint)\nc\n      call fci_intchk(h, g)\nc\nc     Open files\nc\n      evecfile = 1\n      diagfile = 2\n      call wopen(evecfile, evecfilename, 0, 0, ierr)\n      if (ierr .ne. 0) call fci_err\n     $     ('fci_davids: failed to open evecfile', ierr)\n      call wopen(diagfile, diagfilename, 0, 0, ierr)\n      if (ierr .ne. 0) call fci_err\n     $     ('fci_davids: failed to open diagfile', ierr)\nc\nc     Allocate temporary work space for initial guess and diags\nc\n      call fci_cntone(nonelt, nonemx)\n      ihd = 1\n      ihmod = ihd + ndets             ! h + 1/2 sum(k) (ik|kj)\n      ionel = ihmod + nacttr\n      kpt   = ihmod + (nonemx*5)/nav + 1 ! For computing diagonals\n      mkpt  = kpt + nonemx/nav + 1 ! For computing diagonals\n      itop2 = mkpt + ndetmx/nav + 1\n      if (itop2 .gt. lenwrk+1) call fci_err\n     $     ('fci_davids: insufficient memory for diagonals',itop2)\nc\nc     Modify the input 1-e integrals \nc\n      call fci_hmod(h,g,work(ihmod))\nc     \nc     make the diagonals of the hamiltonian\nc     \n      call fci_diags(work(ihd),ecore,work(ihmod),g,work(ionel),\n     $     nonemx,work(kpt), work(mkpt))\nc\n      call putwa(diagfile, work(ihd), 1, ndets, ierr)\n      if (ierr.ne.0) call fci_err\n     $     ('fci_davids: failed to write diagonals',ierr)\nc\nc     Form initial guess from the lowest energy orbital occupations\nc     of the correct symmetry\nc\n      iv = ihd + ndets\n      itop2 = iv + ndets\n      if (itop2 .gt. lenwrk+1) call fci_err\n     $     ('fci_davids: insufficient memory for guess',itop2)\n      call fci_guess(evecfile, work(iv), work(ihd), nroot)\nc\nc     No memory is in use now.\nc\n      maxv = maxvec\n      maxv = min(maxv,itermx,ncsf+1) ! Logic for small problems\nc\n      if (.not. fci_davids(ndets, nroot, itermx, maxv, thresh,\n     $     work, lenwrk, evecfile, diagfile, roots, ecore, h, g))\n     $     call fci_err('fci_davids failed', 0)\nc     \n      call wclose(evecfile,ierr)\n      call wclose(diagfile,ierr)\nc\n      call fci_tfinish(9,oprint)\nc     \n      end\n      subroutine fci_guess(evecfile, vec, diags, nroot)\n      implicit none\n#include \"fciinfo.fh\"\n      integer evecfile          ! [input] Handle to vector file\n      integer nroot             ! [input]\n      double precision vec(ndets) ! [scratch]\n      double precision diags(ndets) ! [input] Diagonal energies\nc\nc     Form an initial guess for nroot CI vectors of the correct symmetry.\nc\nc     Loop thru orbital configurations and determine the nroot\nc     lowest energy orbital occupations.  Set the lowest energy \nc     determinant of each orbital occupation to 1 and then\nc     spin project to get nroot orthogonal vectors of the correct\nc     symmetry.\nc\n      integer iroot, iwalk, idone(50), jroot, sym, i, ilowest\n      integer iocc(nactmx), ns, ioff, idim, iwalklo, ierr\n      double precision elowest\n#include \"bitops.fh\"\nc\n      if (nroot .gt. 50) call fci_err('fci_guess: nroot too big',nroot)\nc\n      write(6,*)\n      do iroot = 1, nroot\n         ilowest = -1\n         elowest = 9999999.0d0\n         do 10 iwalk = 1, nwalko\n            do jroot = 1, iroot-1\n               if (idone(jroot).eq.iwalk) goto 10\n            enddo\n            call fci_owalk_info(iwalk, iocc, ns, ioff, idim, sym)\n            if (sym .eq. statesym) then\n               do i = 1, idim\n                  if (diags(i+ioff).lt.elowest) then\n                     ilowest = i+ioff\n                     iwalklo = iwalk\n                     elowest = diags(ilowest)\n                  endif\n               enddo\n            endif\n 10      continue\n         if (ilowest .le. 0) call fci_err\n     $        ('fci_guess: insufficient independent states',nroot)\n         call dfill(0.0d0, vec, 1, ndets)\nc\n         write(6,11) iroot, ilowest, elowest\n 11      format(' Guess for root ', i2, ' is determinant ', \n     $        i8, ' energy ', f12.6)\n         vec(ilowest) = 1.0d0\n         call fci_spin_force(vec)\n         call putwa(evecfile, vec, (iroot-1)*ndets + 1, ndets, ierr)\n         if (ierr.ne.0) call fci_err\n     $        ('fci_guess: failed writing vector ', ierr)\n         idone(iroot) = iwalklo\n      enddo\n      write(6,*)\nc\n      end\n      subroutine fci_readevectors(ndets, nvec, v, filename)\n      implicit none\n      integer ndets             ! [input] Vector length\n      integer nvec             ! [input] No. \n      double precision v(ndets,nvec)\n      character*(*) filename\nc\n      integer ierr, file\nc\n      file = 1\n      call wopen(file, filename, 0, 0, ierr)\n      if (ierr .ne. 0) call fci_err\n     $     ('fci_readvectors: failed to open file', ierr)\n      call getwa(file, v, 1, nvec*ndets, ierr)\n      if (ierr .ne. 0) call fci_err\n     $     ('fci_readvectors: failed to read file', ierr)\n      call wclose(file,ierr)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_spnad.F",
    "content": "*\n* $Id: fci_spnad.F,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\n      subroutine fci_spin_adapt_nvec\n     $     (ns, direction, det, ldd, csf, ldc, nvec)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     Given NVEC sets of coefficients of either determinants or CSF\nc     corresponding to a single orbital occupation with ns open shells,\nc     then do the following\nc     \nc     if (direction == 1)\nc     ... project from determinants to CSF with multiplicity multi (fci_init)\nc     ... if there is spin contamination norm will not be conserved\nc     else if (direction == 2)\nc     ... project from CSF with multiplicity multi to determinants\nc     ... norm should be conserved\nc     else\nc     ... invalid value for direction\nc     endif\nc     \n      integer ns                ! [input] No. of open shells\n      integer direction         ! [input] 1=det to csf, 2=csf to det\n      integer ldd, ldc          ! [input] Leading dimensions\n      integer nvec              ! [input] No. of sets of coefficients\n      double precision det(ldd,nvec) ! [in/out] coefficients of determinants\n      double precision csf(ldc,nvec) ! [in/out] coefficients of csf\nc     \n      integer iocc(nsmax)       ! CSF walk\n      integer mocc(nsmax)       ! determinant walk\n      double precision csum(nsmax) ! CSF intermediate spin values\n      double precision dsum     ! determinant intermediate Sz values\nc\n      integer mdet, mcsf, iwalk, icsf, is, mwalk, ivec\n      double precision sum, rnum, rden, rs, rm, coeff\nc     \n      mdet = mnsdet(ns)\n      mcsf = mnscsf(ns)\nc\n      if (direction .eq. 1) then\n         call dfill(0.0d0, csf, 1, mcsf)\n      else\n         call dfill(0.0d0, det, 1, mdet)\n      endif\nc     \nc     Loop thru CSF by looping thru walks on the determinant graph.  \nc     Any that only have positive intermediate spin values can be used \nc     as a CSF walk and they will occur in the correct lexical order. \nc     \n      iwalk = 0\n      do 30 icsf=1,mdet\n         call fci_mfind_occ(icsf,iocc,ns)\n         sum = 0.0d0\n         do 20 is = 1,ns\n            sum = sum + 1.5d0 - dfloat(iocc(is))\n            if (sum .lt. -0.0001d0) goto 30 ! Not a valid CSF\n            csum(is) = sum\n 20      continue\n         iwalk = iwalk + 1      ! Lexical index of this CSF\nc     \n         do 40 mwalk = 1,mdet\n            call fci_mfind_occ(mwalk,mocc,ns)\n            rnum = 1.0d0\n            rden = 1.0d0\n            dsum = 0.0d0\n            do 50 is = 1,ns\n               dsum = dsum + 1.5d0 - dfloat(mocc(is))\nc\n               rs = csum(is)\n               rm = dsum\n               if (iocc(is).eq.1) then\n                  if (mocc(is).eq.1) then\n                     rnum = rnum*(rs+rm) ! s=+ m=+\n                     rden = rden*2.0d0*rs\n                  else\n                     rnum = rnum*(rs-rm) ! s=+ m=-\n                     rden = rden*2.0d0*rs\n                  endif\n               else\n                  if (mocc(is).eq.1) then\n                     rnum = -rnum*(rs-rm+1) ! s=- m=+\n                     rden = rden*(2.0d0*rs+2.0d0)\n                  else\n                     rnum = rnum*(rs+rm+1.0d0) ! s=- m=-\n                     rden = rden*(2.0d0*rs+2.0d0)\n                  endif\n               endif\n               if (rnum .eq. 0.0d0) goto 40\n 50         continue\nc     \nc     Coefficient of determinant mwalk in CSF iwalk\nc     \n            coeff = sign(sqrt(abs(rnum/rden)),rnum)\nc     \n            if (direction .eq. 1) then\n               do ivec = 1, nvec\n                  csf(iwalk,ivec) = csf(iwalk,ivec) + \n     $                 coeff*det(mwalk,ivec)\n               enddo\n            else\n               do ivec = 1, nvec\n                  det(mwalk,ivec) = det(mwalk,ivec) + \n     $                 coeff*csf(iwalk,ivec)\n               enddo\n            endif\nc\n 40      continue\n 30   continue\n      if (iwalk .ne. mcsf) call fci_err('spnad: bad #csf ', iwalk)\nc     \n      end\n      subroutine fci_spin_adapt(ns, direction, det, csf)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     Given a set of coefficients of either determinants or CSF\nc     corresponding to a single orbital occupation with ns open shells,\nc     then do the following\nc     \nc     if (direction == 1)\nc     ... project from determinants to CSF with multiplicity multi (fci_init)\nc     ... if there is spin contamination norm will not be conserved\nc     else if (direction == 2)\nc     ... project from CSF with multiplicity multi to determinants\nc     ... norm should be conserved\nc     else\nc     ... invalid value for direction\nc     endif\nc     \n      integer ns                ! [input] No. of open shells\n      integer direction         ! [input] 1=det to csf, 2=csf to det\n      double precision det(*)   ! [in/out] coefficients of determinants\n      double precision csf(*)   ! [in/out] coefficients of csf\nc     \n      integer iocc(nsmax)       ! CSF walk\n      integer mocc(nsmax)       ! determinant walk\n      double precision csum(nsmax) ! CSF intermediate spin values\n      double precision dsum     ! determinant intermediate Sz values\nc\n      integer mdet, mcsf, iwalk, icsf, is, mwalk\n      double precision sum, rnum, rden, rs, rm, coeff\nc     \n      mdet = mnsdet(ns)\n      mcsf = mnscsf(ns)\nc\n      if (direction .eq. 1) then\n         call dfill(0.0d0, csf, 1, mcsf)\n      else\n         call dfill(0.0d0, det, 1, mdet)\n      endif\nc     \nc     Loop thru CSF by looping thru walks on the determinant graph.  \nc     Any that only have positive intermediate spin values can be used \nc     as a CSF walk and they will occur in the correct lexical order. \nc     \n      iwalk = 0\n      do 30 icsf=1,mdet\n         call fci_mfind_occ(icsf,iocc,ns)\n         sum = 0.0d0\n         do 20 is = 1,ns\n            sum = sum + 1.5d0 - dfloat(iocc(is))\n            if (sum .lt. -0.0001d0) goto 30 ! Not a valid CSF\n            csum(is) = sum\n 20      continue\n         iwalk = iwalk + 1      ! Lexical index of this CSF\nc     \n         do 40 mwalk = 1,mdet\n            call fci_mfind_occ(mwalk,mocc,ns)\n            rnum = 1.0d0\n            rden = 1.0d0\n            dsum = 0.0d0\n            do 50 is = 1,ns\n               dsum = dsum + 1.5d0 - dfloat(mocc(is))\nc\n               rs = csum(is)\n               rm = dsum\n               if (iocc(is).eq.1) then\n                  if (mocc(is).eq.1) then\n                     rnum = rnum*(rs+rm) ! s=+ m=+\n                     rden = rden*2.0d0*rs\n                  else\n                     rnum = rnum*(rs-rm) ! s=+ m=-\n                     rden = rden*2.0d0*rs\n                  endif\n               else\n                  if (mocc(is).eq.1) then\n                     rnum = -rnum*(rs-rm+1) ! s=- m=+\n                     rden = rden*(2.0d0*rs+2.0d0)\n                  else\n                     rnum = rnum*(rs+rm+1.0d0) ! s=- m=-\n                     rden = rden*(2.0d0*rs+2.0d0)\n                  endif\n               endif\n               if (rnum .eq. 0.0d0) goto 40\n 50         continue\nc     \nc     Coefficient of determinant mwalk in CSF iwalk\nc     \n            coeff = sign(sqrt(abs(rnum/rden)),rnum)\nc     \n            if (direction .eq. 1) then\n               csf(iwalk) = csf(iwalk) + coeff*det(mwalk)\n            else\n               det(mwalk) = det(mwalk) + coeff*csf(iwalk)\n            endif\nc\n 40      continue\n 30   continue\n      if (iwalk .ne. mcsf) call fci_err('spnad: bad #csf ', iwalk)\nc     \n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_spnfrc.F",
    "content": "*\n* $Id: fci_spnfrc.F,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\n      subroutine fci_spin_force(c)\n      implicit none\n#include \"fciinfo.fh\"\n      double precision c(ndets) ! [in/out] Determinant CI vector\nc     \nc     Force determinant CI vector (using symmetry) to be spin adapted\nc     by projecting to and from the CSF space.  When done, renormalize.\nc     \n      double precision work(ncsfmx), dci\n      integer iocc(nactmx), iwalk, idim, ns, ioff, sym\nc     \n      call fci_tstart(10,.false.)\n      do iwalk = 1,nwalko\n         call fci_owalk_info(iwalk, iocc, ns, ioff, idim, sym)\n         if (sym.eq.statesym .and. idim.gt.1) then\n            call fci_spin_adapt(ns, 1, c(ioff+1), work)\n            call fci_spin_adapt(ns, 2, c(ioff+1), work)\n         endif\n      enddo\nc     \n      call renorm(ndets, c, dci)\n      if (dci.lt. 1.0d-4) call fci_err(' spnfrc dci small ',ndets)\nc     \n      call fci_tfinish(10,.false.)\nc     \n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_srt1cc.F",
    "content": "*\n* $Id: fci_srt1cc.F,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\n      subroutine fci_srt1cc(ionel,nonel,kbase,kdim,kpt,mkpt)\n      implicit none\n#include \"fciinfo.fh\"\nc     \nc     generate an index vector into the one electron coupling coefficients\nc     according to the bra determinant and also subsorted by ket determinant\nc     \nc     ionel ... one electron coupling coefficients from onelcc\nc     kdim ... no. of k (bra) determinants\nc     kpt ... index vector to be\nc     mkpt ... pointer into index vector indexed by k\nc     \n      integer nonel, kbase, kdim\n      integer ionel(5,nonel),kpt(nonel),mkpt(kdim+1)\nc\n      integer iel, k, ksum, mmkpt, jdim, koff\n*      integer ji, jj, jel, iiel, jjel  ! used in slow, but correct, sort\nc     \nc     first generate index according to k\nc     \n      call ifill(0,mkpt,1,kdim+1)\n      do 10 iel = 1,nonel\n         k = ionel(3,iel) - kbase\n         mkpt(k) = mkpt(k) + 1\n 10   continue\n      ksum = 0\n      do 20 k = 1,kdim\n         mmkpt = mkpt(k)\n         mkpt(k) = ksum\n         ksum = ksum + mmkpt\n 20   continue\n      if (ksum.ne.nonel) call fci_err(' screwed ksum',ksum)\n      do 30 iel = 1,nonel\n         k = ionel(3,iel) - kbase\n         mkpt(k) = mkpt(k) + 1\n         kpt(mkpt(k)) = iel\n 30   continue\n      if (mkpt(kdim).ne.nonel) call fci_err(' screwed mkpt ',mkpt(kdim))\n      do 40 k = kdim + 1,2,-1\n         mkpt(k) = mkpt(k-1)\n 40   continue\n      mkpt(1) = 0\nc     \nc     now naively sort according to j for given k\nc     might have to get clever here for large cases\nc     \n      do 50 k = 1,kdim\n         jdim = mkpt(k+1)-mkpt(k)\n         koff = mkpt(k)\nc\n         call fci_hsort(kpt(koff+1), ionel, jdim)\nc$$$\nc$$$         do 60 iiel = 1,jdim\nc$$$            iel = kpt(iiel+koff)\nc$$$            ji = ionel(4,iel)\nc$$$            do 70 jjel = iiel+1,jdim\nc$$$               jel = kpt(jjel+koff)\nc$$$               jj = ionel(4,jel)\nc$$$               if (jj.lt.ji) then\nc$$$                  kpt(iiel+koff) = jel\nc$$$                  kpt(jjel+koff) = iel\nc$$$                  iel = jel\nc$$$                  ji = jj\nc$$$               endif\nc$$$ 70         continue\nc$$$ 60      continue\n 50   continue\nc     \n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fci_tinit.F",
    "content": "*\n* $Id: fci_tinit.F,v 1.3 1999/07/28 00:23:42 d3e129 Exp $\n*\n      subroutine fci_tinit\n      implicit none\n#include \"fcitime.fh\"      \nc\n      integer i\nc\n      do i = 1, maxroutine\n         names(i) = ' '\n         times(i) = 0.0d0\n      enddo\nc\n      names(1)  = 'couple1'\n      names(2)  = 'couple2'\n      names(3)  = 'couple3'\n      names(4)  = 'davidson'\n      names(5)  = 'diags'\n      names(6)  = 'make_eaj '\n      names(7)  = 'setup'\n      names(8)  = 'sigma'\n      names(9)  = 'solve'\n      names(10) = 'spnfrc'\n      names(11) = 'cntone'\n      names(12) = 'hami1'\n      names(13) = 'hami2'\n      names(14) = 'symfrc'\nc\n      end\n      subroutine fci_tstart(i,oprint)\n      implicit none\n#include \"fcitime.fh\"      \n      integer i\n      logical oprint\n      integer fci_strlen\n      external fci_strlen\nc\n      if (i.le.0  .or.  i.gt.maxroutine) call fci_err('tstart?',i)\n      ncalls(i) = ncalls(i) + 1\n      if (ncalls(i) .lt. maxcalls) then   ! Avoid too many system calls\n        started(i) = fci_time()\n      else\n        started(i) = 0.0d0\n      endif\nc     \n      if (oprint) write(6,1) names(i)(1:fci_strlen(names(i))), \n     $     ncalls(i), started(i)\n 1    format('  Started ',a,': call number',f10.0,' at', f9.1,'s')\nc\n      end\n      subroutine fci_tfinish(i,oprint)\n      implicit none\n#include \"fcitime.fh\"      \n      integer i\n      logical oprint\n      double precision now\n      integer fci_strlen\n      external fci_strlen\nc\n      if (i.le.0  .or.  i.gt.maxroutine) call fci_err('tfinish?',i)\nc\n      if (ncalls(i) .lt. maxcalls) then  ! Avoid too many system calls\n        now = fci_time()\n        times(i) = times(i) + now - started(i)\n      else\n        now = 0.0d0\n      endif\nc\n      if (oprint) write(6,1) names(i)(1:fci_strlen(names(i))), \n     $     ncalls(i), now, now-started(i),\n     $     times(i)\n 1    format(' Finished ',a,': call number',f10.0,' at', f9.1,'s',\n     $     ' used ',f9.1,'s', ' total ',f9.2, 's')\nc\n      end\n      subroutine fci_tprint()\n      implicit none\n#include \"fcitime.fh\"      \n      integer i\n      double precision used, now, totalcalls\nc\n      write(6,1) \n 1    format(/'  FCI timing information '/\n     $        '  ----------------------'/\n     $     1x, ' name                    ncalls       time'/\n     $     1x, ' --------------------  ----------  ----------')\n      totalcalls = 0\n      do i = 1, maxroutine\n         if (ncalls(i) .gt. 0) then\n            if (ncalls(i) .gt. maxcalls) times(i) = 0.0d0  ! Did not measure it\n            write(6,2) names(i), ncalls(i), times(i)\n 2          format(2x,a20,2x,f10.0,2x,f9.1)\n            if (times(i).gt.0.0d0) totalcalls = totalcalls + 2*ncalls(i)\n         endif\n      enddo\nc\nc     Determine the overhead due to timing\nc\n      used = -fci_time()\n      do i = 1, maxcalls\n         now = fci_time()\n         if (used+now .gt. 2) goto 10\n      enddo\n 10   used = (used+now)/dfloat(i)\n      write(6,3) used, totalcalls, used*totalcalls\n 3    format(/1p,'  Timing overhead=',d8.1,'/call, #calls=',\n     $     d8.1, ', total ovehead=',d8.1/)\nc\n      end\n      double precision function fci_time()\n      implicit none\nc\nc     return the CPU time in seconds from the first call to this routine\nc\nc     MACHINE DEPENDENT\nc\n      double precision firsttime\n      logical firstcall\n#ifdef AIX\n      integer mclock\n      data firstcall /.true./, firsttime/0.0d0/\nc\n      if (firstcall) then\n         firsttime = dfloat(mclock())*0.01d0\n         firstcall = .false.\n      endif\n      fci_time = dfloat(mclock())*0.01d0 - firsttime\n#elif defined(LINUX)\n      double precision linux_cputime\n      external linux_cputime\n      data firstcall /.true./, firsttime/0.0d0/\n      if (firstcall) then\n         firsttime = linux_cputime()\n         firstcall = .false.\n      endif\nc\n      fci_time = linux_cputime() - firsttime\n#else\n      real*4 tarray(2)\n      real*4 etime\n      external etime\n      data firstcall /.true./, firsttime/0.0d0/\nc\n      if (firstcall) then\n         firsttime = etime(tarray)\n         firstcall = .false.\n      endif\nc\n      fci_time = etime(tarray) - firsttime\n#endif\nc\n      end\n      integer function fci_strlen(a)\n      implicit none\n      character*(*) a\n      integer i\n      intrinsic len\nc\n      do i = len(a),1,-1\n         if (a(i:i) .ne. ' ') goto 10\n      enddo\nc\n 10   fci_strlen = i\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/fciinfo.fh",
    "content": "*\n* $Id: fciinfo.fh,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\n#include \"fciparam.fh\"\nc\nc     COMMON /FCIINFO/\nc\nc     nactiv = no. of orbitals in the full-CI space\nc     nacttr = nactiv*(nactiv+1)/2\nc     nelec  = no. of electrons in the full-CI space\nc     multi  = multiplicity.  Will work with S=Sz space of determinants\nc     iky(i) = i*(i-1)/2\nc     nwalko = no. of nelec orbital configurations or walks WITHOUT symmetry\nc     nwalkosym = no. of nelec orbital configurations or walks WITH symmetry\nc     ndets  = no. of determinants in the FCI WITH symmetry\nc     ncsf   = no. of CSF in the FCI WITH symmetry\nc     orbsym(i) = symmetry of orbital i (irreps numbered 0,1,...,7)\nc     statesym  = symmetry of the FCI state of interest\nc     \n      integer nactiv, nacttr, nelec, multi, iky, nwalko, ndets, ncsf\n      integer nwalkosym, orbsym, statesym\n      common /fciinfo/ nactiv, nacttr, nelec, multi, iky(nactmx),\n     $     nwalko, nwalkosym, ndets, ncsf, orbsym(nactmx), statesym\nc\nc     COMMON /FCIMGRAPH/\nc\nc     mwt    = weight of nodes in primitive spin function graph\nc     marc   = connecting arcs in ...\nc     marcwt = weight of arcs  in ...\nc     mnsdet(ns) = no. of determinants for given # of open shells\nc     mnscsf(ns) = no. of CSD for given # of open shells\nc\nc     This is ridiculously redundant!\nc     \n      integer mwt, marc, marcwt, mnsdet, mnscsf\n      common /fcimgraph/ \n     $     mwt(nsmax1,nsmax1,nsmax2),\n     $     marc(2,nsmax1,nsmax1,nsmax2),\n     $     marcwt(2,nsmax1,nsmax1,nsmax2),\n     $     mnsdet(0:nsmax), mnscsf(0:nsmax)\nc\nc     COMMON /FCIEAJ/\nc\nc     This common holds the transformation data for the operators Eaj.\nc\nc     eajptr(ns)        = pointer into itrpseaj of the the transformation\nc                         table for ns electrons\nc     eajdata(pointer)  = T(v,type,j), v=1:ndets(s), type=1:3, j=1:s+1\nc     \nc     eajphase(type,j,ns) = Parity of permutation (+/- 1.0d0)\nc\n      integer eajptr, eajdata\n      double precision eajphase\n      common /fcieaj/ eajphase(3,nsmax+1,0:nsmax), eajptr(0:nsmax), \n     $     eajdata(eajmax)\nc\nc     COMMON /FCIOGRAPH/\nc\nc     karc   = orbital graph arcs\nc     karcwt = weight of arc\nc     kwt    = weight of nodes\nc\nc     Again, lots of redundancy here\nc\n      integer karc, karcwt, kwt\n      common /fciograph/\n     $     karc(3, nelmax+1, nactmx+1),\n     $     karcwt(3, nelmax+1, nactmx+1),\n     $     kwt(nelmax+1, nactmx+1)\nc\nc     COMMON /FCIMAP/\nc\nc     indexo = index from orbital config to CI vector \nc     ... indexo(1)=0, and indexo(nwalko+1)=ndets\nc\nc     This gets big and should be dynamically allocated.\nc\n      integer indexo\n      common /fcimap/ indexo(nwkomx+1)\nc\n*      integer ieor\n*      external ieor\n"
  },
  {
    "path": "src/apps/moldft/fci/fciparam.fh",
    "content": "*\n* $Id: fciparam.fh,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\nc\nc     PARAMETERS\nc\nc     nav    = no. of integers per double precision word (MACHINE DEPENDENT)\nc     nactmx = maximum number of orbitals in the FCI space\nc     nelmax = maximum number of electrons in the FCI space (orbital graph)\nc     nsmax  = maximum number of open shell electrons in the FCI space\nc     nsmax1 = nsmax+1\nc     nsmax2 = nsmax/2+1\nc     nwkomx = max number of orbital configurations for nelec\nc     ndetmx = no. of determinants for nsmax open shells\nc     ncsfmx = no. of CSF for nsmax open shells\nc     eajmax = length of array to hold Eaj for all possible ns.  It must\nc     .        be of dimension sum(ns=0,nsmax) 3*(ns+1)*ndets(ns)\nc\n      integer nav, nactmx, nelmax, nsmax, nsmax1, nsmax2,\n     $     nwkomx, ndetmx, ncsfmx, eajmax\n      parameter (nav = 2)\n      parameter (nactmx = 20)\n      parameter (nelmax = 2*nactmx)  ! Not sure what to use here\n      parameter (nwkomx = 616227) ! 14e in 14 orbitals -> 2.5 MB for indexo\nc\n      parameter (nsmax  = 14)   ! 14 requires about 1.6 MB for eaj\n      parameter (nsmax1 = nsmax+1)\n      parameter (nsmax2 = nsmax/2+1)\n      parameter (ndetmx = 3432)  ! # dets for 14 open shells (singlet)\n      parameter (ncsfmx = 1001)  ! # CSF  for 14 open shells (triplet/quintet)\n      parameter (eajmax = 3*(\n     $     1*1 + 3*2 + 5*6 + 7*20 + 9*70 + 11*252 + 13*924 + 15*3432))\nc\n"
  },
  {
    "path": "src/apps/moldft/fci/fcitime.fh",
    "content": "*\n* $Id: fcitime.fh,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\nc\nc     Common for performance stats inside the FCI\nc\n      integer maxroutine\n      parameter (maxroutine = 14)\nc\nc     If a routine is called more than maxcalls times timing is disabled\nc     to avoid large system time overhead.  Set for IBM and LINUX where\nc     MCLOCK/CLOCK have only 1us overhead.\nc\n      integer maxcalls\n      parameter (maxcalls = 10000000)\nc\n      double precision ncalls(maxroutine) ! No. of calls to this routine\n      double precision times(maxroutine) ! Time in this routine + descendents\n      double precision started(maxroutine)  ! Time this routine started\n      character*20 names(maxroutine) ! Name of routine\nc\n      common/fcitime/times, started, ncalls\n      common/fcictime/names\nc\n      double precision fci_time\n      external fci_time\n"
  },
  {
    "path": "src/apps/moldft/fci/idamax.F",
    "content": "*\n* $Id: idamax.F,v 1.2 1999/07/28 00:23:42 d3e129 Exp $\n*\n      integer function idamax(n,dx,incx)\nc\nc     finds the index of element having max. absolute value.\nc     jack dongarra, linpack, 3/11/78.\nc\n      double precision dx(1),dmax\n      integer i,incx,ix,n\nc\n      idamax = 0\n      if( n .lt. 1 ) return\n      idamax = 1\n      if(n.eq.1)return\n      if(incx.eq.1)go to 20\nc\nc        code for increment not equal to 1\nc\n      ix = 1\n      dmax = dabs(dx(1))\n      ix = ix + incx\n      do 10 i = 2,n\n         if(dabs(dx(ix)).le.dmax) go to 5\n         idamax = i\n         dmax = dabs(dx(ix))\n    5    ix = ix + incx\n   10 continue\n      return\nc\nc        code for increment equal to 1\nc\n   20 dmax = dabs(dx(1))\n      do 30 i = 2,n\n         if(dabs(dx(i)).le.dmax) go to 30\n         idamax = i\n         dmax = dabs(dx(i))\n   30 continue\n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/ieor.c",
    "content": "/*\n $Id$\n*/\n\nint ieor_(int *i, int *j)\n{\n  return *i ^ *j;\n}\n"
  },
  {
    "path": "src/apps/moldft/fci/linux_cputime.c",
    "content": "/*\n $Id$\n*/\n\n#include <time.h>\n\ndouble linux_cputime_(void)\n{\n  unsigned long thetime = clock();\n  double value = ((double) thetime) / ((double) CLOCKS_PER_SEC);\n\n  /* printf(\"t = %ld, value = %f\\n\", thetime, value); */\n\n  return value;\n}\n"
  },
  {
    "path": "src/apps/moldft/fci/output",
    "content": "\n           small full configuration interaction program\n           --------------------------------------------\n\n no. of active orbitals ..........       14\n no. of active electrons .........       10\n spin multiplicity ...............        1\n state symmetry ..................        1\n no. of orbital configurations ...    76670\n no. of determinants in full ci ..  1002708\n no. of configurations in full ci    256473\n orbital symmetries ..............  1 1 4 1 3 1 3 4 1 3 1 3 1 1\n \n  Started solve: call number        1. at      1.6s\n \n Guess for root  1 is determinant        1 energy   -76.009318\n Guess for root  2 is determinant      134 energy   -75.081428\n \n        iter nsub  cur root   eigenvalue      residual    time\n        ---- ---- ---- ---- --------------- ----------- -------\n          1    2    1    1     -76.00932028  1.36143605  1506.2\n          1    2    1    2     -74.94046022  1.40438330  1506.2\n          2    3    1    1     -76.14133208  0.51634150  2074.3\n          2    3    1    2     -74.94413380  1.40943455  2074.3\n          3    4    1    1     -76.15613191  0.12308400  2641.1\n          3    4    1    2     -74.94414243  1.41048833  2641.1\n          4    5    2    1     -76.15615706  0.12282312  3209.4\n          4    5    2    2     -75.09974301  1.63936614  3209.4\n          5    6    2    1     -76.15616041  0.12291861  3779.2\n          5    6    2    2     -75.45956398  1.01974583  3779.2\n          6    7    2    1     -76.15616071  0.12292412  4351.8\n          6    7    2    2     -75.62209011  0.63430815  4351.8\n          7    8    2    1     -76.15616613  0.12271276  4926.8\n          7    8    2    2     -75.70921452  0.56276867  4926.8\n          8    9    2    1     -76.15616760  0.12278732  5503.4\n          8    9    2    2     -75.74727988  0.31845709  5503.4\n          9   10    1    1     -76.15765813  0.05757760  6082.5\n          9   10    1    2     -75.74729683  0.31879390  6082.5\n         10   11    1    1     -76.15784607  0.01679245  6664.4\n         10   11    1    2     -75.74730193  0.31844685  6664.4\n         11   12    1    1     -76.15786796  0.00726154  7249.8\n         11   12    1    2     -75.74731605  0.31830863  7249.8\n         12   13    1    1     -76.15787152  0.00267575  7840.8\n         12   13    1    2     -75.74732661  0.31874488  7840.8\n         13   14    2    1     -76.15787152  0.00267630  8435.4\n         13   14    2    2     -75.75725099  0.15838209  8435.4\n         14   15    2    1     -76.15787152  0.00267298  9035.7\n         14   15    2    2     -75.75914127  0.06295450  9035.7\n         15   16    2    1     -76.15787152  0.00268134  9617.1\n         15   16    2    2     -75.75942040  0.02349537  9617.1\n         16   17    2    1     -76.15787155  0.00269707 10203.4\n         16   17    2    2     -75.75947062  0.01216403 10203.4\n         17   18    2    1     -76.15787157  0.00268139 10791.1\n         17   18    2    2     -75.75948413  0.00631302 10791.1\n         18   19    2    1     -76.15787161  0.00262157 11388.0\n         18   19    2    2     -75.75948772  0.00335473 11388.0\n         19   20    1    1     -76.15787205  0.00093758 11990.1\n         19   20    1    2     -75.75948774  0.00333798 11990.1\n         20   21    2    1     -76.15787205  0.00093428 12599.1\n         20   21    2    2     -75.75948865  0.00155587 12599.1\n         21   22    2    1     -76.15787205  0.00093482 13206.4\n         21   22    2    2     -75.75948887  0.00083430 13206.4\nCRAYIO: Statistics for unit 3, file 'workfile', length=352953216 bytes.\nCRAYIO: oper :  #req.  :  #seek  :   #words  : #w/#req : time(s) :  MW/s \nCRAYIO: read :  257972 :  257972 : 1287477072 :    4990 :  2361.0 :  0.545\nCRAYIO:write :    1024 :    1000 :  48129984 :   47001 :    63.7 :  0.755\n Finished solve: call number        1. at  13219.1s used   13217.5s total  13217.47s\n \n  Eigenvector number   1\n\n    Index     Owalk Mwalk      Coeff       Orbital and Spin occupation\n --------    ------ -----    ---------     ---------------------------\n        1         1     1     0.975413     2 2 2 2 2 0 0 0 0 0 0 0 0 0\n        8         7     1    -0.034013     2 2 2 2 0 2 0 0 0 0 0 0 0 0\n        9        12     1    -0.067428     2 2 2 0 2 2 0 0 0 0 0 0 0 0\n       14        16     1    -0.017260     2 2 0 2 2 2 0 0 0 0 0 0 0 0\n       21        28     1     0.017830     2 2 2 1 1 1 1 0 0 0 0 0 0 0    + + - - \n       22        28     2     0.032450     2 2 2 1 1 1 1 0 0 0 0 0 0 0    + - + - \n       23        28     3    -0.050252     2 2 2 1 1 1 1 0 0 0 0 0 0 0    - + + - \n       24        28     4    -0.050252     2 2 2 1 1 1 1 0 0 0 0 0 0 0    + - - + \n       25        28     5     0.032450     2 2 2 1 1 1 1 0 0 0 0 0 0 0    - + - + \n       26        28     6     0.017830     2 2 2 1 1 1 1 0 0 0 0 0 0 0    - - + + \n       65        72     1    -0.070375     2 2 2 2 0 0 2 0 0 0 0 0 0 0\n       66        77     1    -0.020997     2 2 2 0 2 0 2 0 0 0 0 0 0 0\n       72        84     1    -0.023069     2 0 2 2 2 0 2 0 0 0 0 0 0 0\n      106       117     1     0.010149     2 2 2 0 0 2 2 0 0 0 0 0 0 0\n      134       164     1     0.010966     2 2 1 2 2 0 0 1 0 0 0 0 0 0    + - \n      135       164     2    -0.010966     2 2 1 2 2 0 0 1 0 0 0 0 0 0    - + \n      136       173     1     0.024933     2 2 1 1 2 1 0 1 0 0 0 0 0 0    + + - - \n      137       173     2    -0.036224     2 2 1 1 2 1 0 1 0 0 0 0 0 0    + - + - \n      138       173     3     0.011288     2 2 1 1 2 1 0 1 0 0 0 0 0 0    - + + - \n      139       173     4     0.011288     2 2 1 1 2 1 0 1 0 0 0 0 0 0    + - - + \n      140       173     5    -0.036224     2 2 1 1 2 1 0 1 0 0 0 0 0 0    - + - + \n      141       173     6     0.024933     2 2 1 1 2 1 0 1 0 0 0 0 0 0    - - + + \n      180       214     1     0.026203     2 2 1 2 1 0 1 1 0 0 0 0 0 0    + + - - \n      181       214     2    -0.036751     2 2 1 2 1 0 1 1 0 0 0 0 0 0    + - + - \n      182       214     3     0.010542     2 2 1 2 1 0 1 1 0 0 0 0 0 0    - + + - \n      183       214     4     0.010542     2 2 1 2 1 0 1 1 0 0 0 0 0 0    + - - + \n      184       214     5    -0.036751     2 2 1 2 1 0 1 1 0 0 0 0 0 0    - + - + \n      185       214     6     0.026203     2 2 1 2 1 0 1 1 0 0 0 0 0 0    - - + + \n      478       437     1    -0.056716     2 2 0 2 2 0 0 2 0 0 0 0 0 0\n      479       440     1    -0.010657     2 0 2 2 2 0 0 2 0 0 0 0 0 0\n      864       838     2     0.013853     2 1 2 2 1 0 1 0 1 0 0 0 0 0    + - + - \n      867       838     5     0.013853     2 1 2 2 1 0 1 0 1 0 0 0 0 0    - + - + \n     1192      1061     2    -0.017975     2 1 1 2 2 0 0 1 1 0 0 0 0 0    + - + - \n     1195      1061     5    -0.017975     2 1 1 2 2 0 0 1 1 0 0 0 0 0    - + - + \n     2800      1813     1    -0.012978     2 0 2 2 2 0 0 0 2 0 0 0 0 0\n    16079      8959     1    -0.014372     2 2 2 2 0 1 0 0 0 0 1 0 0 0    + - \n    16080      8959     2     0.014372     2 2 2 2 0 1 0 0 0 0 1 0 0 0    - + \n    16084      8966     2    -0.012141     2 1 2 1 2 1 0 0 0 0 1 0 0 0    + - + - \n    16087      8966     5    -0.012141     2 1 2 1 2 1 0 0 0 0 1 0 0 0    - + - + \n    16137      9005     1     0.011904     2 2 2 1 1 0 1 0 0 0 1 0 0 0    + + - - \n    16142      9005     6     0.011904     2 2 2 1 1 0 1 0 0 0 1 0 0 0    - - + + \n    16143      9007     1     0.013232     2 1 2 2 1 0 1 0 0 0 1 0 0 0    + + - - \n    16144      9007     2    -0.016046     2 1 2 2 1 0 1 0 0 0 1 0 0 0    + - + - \n    16147      9007     5    -0.016046     2 1 2 2 1 0 1 0 0 0 1 0 0 0    - + - + \n    16148      9007     6     0.013232     2 1 2 2 1 0 1 0 0 0 1 0 0 0    - - + + \n    16467      9226     3    -0.011736     2 2 1 1 2 0 0 1 0 0 1 0 0 0    - + + - \n    16468      9226     4    -0.011736     2 2 1 1 2 0 0 1 0 0 1 0 0 0    + - - + \n    16472      9230     2     0.015247     2 1 1 2 2 0 0 1 0 0 1 0 0 0    + - + - \n    16475      9230     5     0.015247     2 1 1 2 2 0 0 1 0 0 1 0 0 0    - + - + \n    18091      9982     1     0.010710     2 0 2 2 2 0 0 0 1 0 1 0 0 0    + - \n    18092      9982     2    -0.010710     2 0 2 2 2 0 0 0 1 0 1 0 0 0    - + \n    42729     17304     1    -0.013302     2 2 2 2 0 0 0 0 0 0 2 0 0 0\n    42730     17309     1    -0.013041     2 2 2 0 2 0 0 0 0 0 2 0 0 0\n    53879     24075     1    -0.010936     2 2 2 1 1 1 0 0 0 0 0 1 0 0    + + - - \n    53884     24075     6    -0.010936     2 2 2 1 1 1 0 0 0 0 0 1 0 0    - - + + \n    54267     24337     3    -0.010630     2 2 1 2 1 0 0 1 0 0 0 1 0 0    - + + - \n    54268     24337     4    -0.010630     2 2 1 2 1 0 0 1 0 0 0 1 0 0    + - - + \n    80534     32420     2     0.010713     2 2 2 1 1 0 0 0 0 0 1 1 0 0    + - + - \n    80535     32420     3    -0.010436     2 2 2 1 1 0 0 0 0 0 1 1 0 0    - + + - \n    80536     32420     4    -0.010436     2 2 2 1 1 0 0 0 0 0 1 1 0 0    + - - + \n    80537     32420     5     0.010713     2 2 2 1 1 0 0 0 0 0 1 1 0 0    - + - + \n   130029     43924     1    -0.016985     2 2 2 2 0 0 0 0 0 0 0 2 0 0\n   157420     58291     2     0.014485     2 1 2 1 2 1 0 0 0 0 0 0 1 0    + - + - \n   157423     58291     5     0.014485     2 1 2 1 2 1 0 0 0 0 0 0 1 0    - + - + \n   157480     58332     2     0.018264     2 1 2 2 1 0 1 0 0 0 0 0 1 0    + - + - \n   157483     58332     5     0.018264     2 1 2 2 1 0 1 0 0 0 0 0 1 0    - + - + \n   157807     58555     1     0.012597     2 1 1 2 2 0 0 1 0 0 0 0 1 0    + + - - \n   157808     58555     2    -0.021986     2 1 1 2 2 0 0 1 0 0 0 0 1 0    + - + - \n   157811     58555     5    -0.021986     2 1 1 2 2 0 0 1 0 0 0 0 1 0    - + - + \n   157812     58555     6     0.012597     2 1 1 2 2 0 0 1 0 0 0 0 1 0    - - + + \n   159427     59307     1    -0.013295     2 0 2 2 2 0 0 0 1 0 0 0 1 0    + - \n   159428     59307     2     0.013295     2 0 2 2 2 0 0 0 1 0 0 0 1 0    - + \n   184083     66641     1     0.011455     2 0 2 2 2 0 0 0 0 0 1 0 1 0    + - \n   184084     66641     2    -0.011455     2 0 2 2 2 0 0 0 0 0 1 0 1 0    - + \n   353007    101540     1    -0.012761     2 2 0 2 2 0 0 0 0 0 0 0 2 0\n   353008    101543     1    -0.016148     2 0 2 2 2 0 0 0 0 0 0 0 2 0\n \n \n  Eigenvector number   2\n\n    Index     Owalk Mwalk      Coeff       Orbital and Spin occupation\n --------    ------ -----    ---------     ---------------------------\n        2         3     1    -0.385640     2 2 2 1 2 1 0 0 0 0 0 0 0 0    + - \n        3         3     2     0.385640     2 2 2 1 2 1 0 0 0 0 0 0 0 0    - + \n        4         5     1    -0.314201     2 1 2 2 2 1 0 0 0 0 0 0 0 0    + - \n        5         5     2     0.314201     2 1 2 2 2 1 0 0 0 0 0 0 0 0    - + \n        8         7     1     0.023713     2 2 2 2 0 2 0 0 0 0 0 0 0 0\n        9        12     1    -0.060177     2 2 2 0 2 2 0 0 0 0 0 0 0 0\n       10        14     1     0.036103     2 1 2 1 2 2 0 0 0 0 0 0 0 0    + - \n       11        14     2    -0.036103     2 1 2 1 2 2 0 0 0 0 0 0 0 0    - + \n       15        19     1    -0.035108     2 0 2 2 2 2 0 0 0 0 0 0 0 0\n       19        22     1     0.051015     2 2 2 2 1 0 1 0 0 0 0 0 0 0    + - \n       20        22     2    -0.051015     2 2 2 2 1 0 1 0 0 0 0 0 0 0    - + \n       22        28     2     0.024520     2 2 2 1 1 1 1 0 0 0 0 0 0 0    + - + - \n       23        28     3    -0.031275     2 2 2 1 1 1 1 0 0 0 0 0 0 0    - + + - \n       24        28     4    -0.031275     2 2 2 1 1 1 1 0 0 0 0 0 0 0    + - - + \n       25        28     5     0.024520     2 2 2 1 1 1 1 0 0 0 0 0 0 0    - + - + \n       27        30     1     0.016415     2 1 2 2 1 1 1 0 0 0 0 0 0 0    + + - - \n       28        30     2     0.028290     2 1 2 2 1 1 1 0 0 0 0 0 0 0    + - + - \n       29        30     3    -0.044724     2 1 2 2 1 1 1 0 0 0 0 0 0 0    - + + - \n       30        30     4    -0.044724     2 1 2 2 1 1 1 0 0 0 0 0 0 0    + - - + \n       31        30     5     0.028290     2 1 2 2 1 1 1 0 0 0 0 0 0 0    - + - + \n       32        30     6     0.016415     2 1 2 2 1 1 1 0 0 0 0 0 0 0    - - + + \n       39        46     1     0.023481     2 2 2 0 1 2 1 0 0 0 0 0 0 0    + - \n       40        46     2    -0.023481     2 2 2 0 1 2 1 0 0 0 0 0 0 0    - + \n       41        48     1     0.010056     2 1 2 1 1 2 1 0 0 0 0 0 0 0    + + - - \n       42        48     2    -0.013177     2 1 2 1 1 2 1 0 0 0 0 0 0 0    + - + - \n       45        48     5    -0.013177     2 1 2 1 1 2 1 0 0 0 0 0 0 0    - + - + \n       46        48     6     0.010056     2 1 2 1 1 2 1 0 0 0 0 0 0 0    - - + + \n       66        77     1    -0.038954     2 2 2 0 2 0 2 0 0 0 0 0 0 0\n       67        79     1     0.024097     2 1 2 1 2 0 2 0 0 0 0 0 0 0    + - \n       68        79     2    -0.024097     2 1 2 1 2 0 2 0 0 0 0 0 0 0    - + \n       76        87     1     0.023205     2 2 2 1 0 1 2 0 0 0 0 0 0 0    + - \n       77        87     2    -0.023205     2 2 2 1 0 1 2 0 0 0 0 0 0 0    - + \n       78        89     1     0.021149     2 1 2 2 0 1 2 0 0 0 0 0 0 0    + - \n       79        89     2    -0.021149     2 1 2 2 0 1 2 0 0 0 0 0 0 0    - + \n      134       164     1    -0.037781     2 2 1 2 2 0 0 1 0 0 0 0 0 0    + - \n      135       164     2     0.037781     2 2 1 2 2 0 0 1 0 0 0 0 0 0    - + \n      144       177     3     0.012378     2 1 1 2 2 1 0 1 0 0 0 0 0 0    - + + - \n      145       177     4     0.012378     2 1 1 2 2 1 0 1 0 0 0 0 0 0    + - - + \n      156       196     1    -0.021889     2 2 1 0 2 2 0 1 0 0 0 0 0 0    + - \n      157       196     2     0.021889     2 2 1 0 2 2 0 1 0 0 0 0 0 0    - + \n      158       200     1    -0.012050     2 1 1 1 2 2 0 1 0 0 0 0 0 0    + + - - \n      163       200     6    -0.012050     2 1 1 1 2 2 0 1 0 0 0 0 0 0    - - + + \n      190       232     5    -0.010768     2 2 1 1 1 1 1 1 0 0 0 0 0 0    + + - - + - \n      193       232     8     0.011781     2 2 1 1 1 1 1 1 0 0 0 0 0 0    + - - + + - \n      198       232    13    -0.011781     2 2 1 1 1 1 1 1 0 0 0 0 0 0    - + + - - + \n      201       232    16     0.010768     2 2 1 1 1 1 1 1 0 0 0 0 0 0    - - + + - + \n      210       236     5     0.010853     2 1 1 2 1 1 1 1 0 0 0 0 0 0    + + - - + - \n      214       236     9    -0.011178     2 1 1 2 1 1 1 1 0 0 0 0 0 0    - + - + + - \n      217       236    12     0.011178     2 1 1 2 1 1 1 1 0 0 0 0 0 0    + - + - - + \n      221       236    16    -0.010853     2 1 1 2 1 1 1 1 0 0 0 0 0 0    - - + + - + \n      493       460     1     0.019000     2 2 0 1 2 1 0 2 0 0 0 0 0 0    + - \n      494       460     2    -0.019000     2 2 0 1 2 1 0 2 0 0 0 0 0 0    - + \n      505       466     1     0.017270     2 1 0 2 2 1 0 2 0 0 0 0 0 0    + - \n      506       466     2    -0.017270     2 1 0 2 2 1 0 2 0 0 0 0 0 0    - + \n      793       786     1     0.347895     2 2 2 1 2 0 0 0 1 0 0 0 0 0    + - \n      794       786     2    -0.347895     2 2 2 1 2 0 0 0 1 0 0 0 0 0    - + \n      795       788     1     0.280880     2 1 2 2 2 0 0 0 1 0 0 0 0 0    + - \n      796       788     2    -0.280880     2 1 2 2 2 0 0 0 1 0 0 0 0 0    - + \n      799       790     1    -0.013993     2 2 2 2 0 1 0 0 1 0 0 0 0 0    + - \n      800       790     2     0.013993     2 2 2 2 0 1 0 0 1 0 0 0 0 0    - + \n      801       795     1     0.050088     2 2 2 0 2 1 0 0 1 0 0 0 0 0    + - \n      802       795     2    -0.050088     2 2 2 0 2 1 0 0 1 0 0 0 0 0    - + \n      803       797     1     0.015581     2 1 2 1 2 1 0 0 1 0 0 0 0 0    + + - - \n      804       797     2    -0.027314     2 1 2 1 2 1 0 0 1 0 0 0 0 0    + - + - \n      805       797     3     0.011730     2 1 2 1 2 1 0 0 1 0 0 0 0 0    - + + - \n      806       797     4     0.011730     2 1 2 1 2 1 0 0 1 0 0 0 0 0    + - - + \n      807       797     5    -0.027314     2 1 2 1 2 1 0 0 1 0 0 0 0 0    - + - + \n      808       797     6     0.015581     2 1 2 1 2 1 0 0 1 0 0 0 0 0    - - + + \n      833       820     1    -0.011757     2 1 2 0 2 2 0 0 1 0 0 0 0 0    + - \n      834       820     2     0.011757     2 1 2 0 2 2 0 0 1 0 0 0 0 0    - + \n      857       836     1     0.020031     2 2 2 1 1 0 1 0 1 0 0 0 0 0    + + - - \n      858       836     2    -0.031859     2 2 2 1 1 0 1 0 1 0 0 0 0 0    + - + - \n      859       836     3     0.011812     2 2 2 1 1 0 1 0 1 0 0 0 0 0    - + + - \n      860       836     4     0.011812     2 2 2 1 1 0 1 0 1 0 0 0 0 0    + - - + \n      861       836     5    -0.031859     2 2 2 1 1 0 1 0 1 0 0 0 0 0    - + - + \n      862       836     6     0.020031     2 2 2 1 1 0 1 0 1 0 0 0 0 0    - - + + \n      863       838     1     0.023546     2 1 2 2 1 0 1 0 1 0 0 0 0 0    + + - - \n      864       838     2    -0.043191     2 1 2 2 1 0 1 0 1 0 0 0 0 0    + - + - \n      865       838     3     0.019630     2 1 2 2 1 0 1 0 1 0 0 0 0 0    - + + - \n      866       838     4     0.019630     2 1 2 2 1 0 1 0 1 0 0 0 0 0    + - - + \n      867       838     5    -0.043191     2 1 2 2 1 0 1 0 1 0 0 0 0 0    - + - + \n      868       838     6     0.023546     2 1 2 2 1 0 1 0 1 0 0 0 0 0    - - + + \n      875       854     1     0.011303     2 2 2 0 1 1 1 0 1 0 0 0 0 0    + + - - \n      880       854     6     0.011303     2 2 2 0 1 1 1 0 1 0 0 0 0 0    - - + + \n     1033       925     1    -0.023393     2 2 2 1 0 0 2 0 1 0 0 0 0 0    + - \n     1034       925     2     0.023393     2 2 2 1 0 0 2 0 1 0 0 0 0 0    - + \n     1035       927     1    -0.018117     2 1 2 2 0 0 2 0 1 0 0 0 0 0    + - \n     1036       927     2     0.018117     2 1 2 2 0 0 2 0 1 0 0 0 0 0    - + \n     1185      1057     1     0.018157     2 2 1 1 2 0 0 1 1 0 0 0 0 0    + + - - \n     1187      1057     3    -0.023888     2 2 1 1 2 0 0 1 1 0 0 0 0 0    - + + - \n     1188      1057     4    -0.023888     2 2 1 1 2 0 0 1 1 0 0 0 0 0    + - - + \n     1190      1057     6     0.018157     2 2 1 1 2 0 0 1 1 0 0 0 0 0    - - + + \n     1191      1061     1    -0.014504     2 1 1 2 2 0 0 1 1 0 0 0 0 0    + + - - \n     1192      1061     2     0.024263     2 1 1 2 2 0 0 1 1 0 0 0 0 0    + - + - \n     1195      1061     5     0.024263     2 1 1 2 2 0 0 1 1 0 0 0 0 0    - + - + \n     1196      1061     6    -0.014504     2 1 1 2 2 0 0 1 1 0 0 0 0 0    - - + + \n     1362      1146     2     0.011871     2 2 1 1 1 0 1 1 1 0 0 0 0 0    + + - + - - \n     1367      1146     7     0.012239     2 2 1 1 1 0 1 1 1 0 0 0 0 0    - + + - + - \n     1374      1146    14    -0.012239     2 2 1 1 1 0 1 1 1 0 0 0 0 0    + - - + - + \n     1379      1146    19    -0.011871     2 2 1 1 1 0 1 1 1 0 0 0 0 0    - - + - + + \n     2195      1425     1    -0.017752     2 2 0 1 2 0 0 2 1 0 0 0 0 0    + - \n     2196      1425     2     0.017752     2 2 0 1 2 0 0 2 1 0 0 0 0 0    - + \n     2207      1431     1    -0.014614     2 1 0 2 2 0 0 2 1 0 0 0 0 0    + - \n     2208      1431     2     0.014614     2 1 0 2 2 0 0 2 1 0 0 0 0 0    - + \n     2795      1808     1    -0.013616     2 1 2 1 2 0 0 0 2 0 0 0 0 0    + - \n     2796      1808     2     0.013616     2 1 2 1 2 0 0 0 2 0 0 0 0 0    - + \n     2800      1813     1     0.027597     2 0 2 2 2 0 0 0 2 0 0 0 0 0\n     4077      2908     1     0.016555     2 2 2 2 1 0 0 0 0 1 0 0 0 0    + - \n     4078      2908     2    -0.016555     2 2 2 2 1 0 0 0 0 1 0 0 0 0    - + \n     4080      2914     2     0.013436     2 2 2 1 1 1 0 0 0 1 0 0 0 0    + - + - \n     4081      2914     3    -0.011685     2 2 2 1 1 1 0 0 0 1 0 0 0 0    - + + - \n     4082      2914     4    -0.011685     2 2 2 1 1 1 0 0 0 1 0 0 0 0    + - - + \n     4083      2914     5     0.013436     2 2 2 1 1 1 0 0 0 1 0 0 0 0    - + - + \n     4087      2916     3    -0.013715     2 1 2 2 1 1 0 0 0 1 0 0 0 0    - + + - \n     4088      2916     4    -0.013715     2 1 2 2 1 1 0 0 0 1 0 0 0 0    + - - + \n     4125      2963     1    -0.017603     2 2 2 0 2 0 1 0 0 1 0 0 0 0    + - \n     4126      2963     2     0.017603     2 2 2 0 2 0 1 0 0 1 0 0 0 0    - + \n     4128      2965     2     0.011773     2 1 2 1 2 0 1 0 0 1 0 0 0 0    + - + - \n     4131      2965     5     0.011773     2 1 2 1 2 0 1 0 0 1 0 0 0 0    - + - + \n    16073      8955     1     0.072453     2 2 2 1 2 0 0 0 0 0 1 0 0 0    + - \n    16074      8955     2    -0.072453     2 2 2 1 2 0 0 0 0 0 1 0 0 0    - + \n    16075      8957     1     0.047508     2 1 2 2 2 0 0 0 0 0 1 0 0 0    + - \n    16076      8957     2    -0.047508     2 1 2 2 2 0 0 0 0 0 1 0 0 0    - + \n    16081      8964     1     0.014252     2 2 2 0 2 1 0 0 0 0 1 0 0 0    + - \n    16082      8964     2    -0.014252     2 2 2 0 2 1 0 0 0 0 1 0 0 0    - + \n    16084      8966     2    -0.013601     2 1 2 1 2 1 0 0 0 0 1 0 0 0    + - + - \n    16087      8966     5    -0.013601     2 1 2 1 2 1 0 0 0 0 1 0 0 0    - + - + \n    16097      8971     1     0.016404     2 0 2 2 2 1 0 0 0 0 1 0 0 0    + - \n    16098      8971     2    -0.016404     2 0 2 2 2 1 0 0 0 0 1 0 0 0    - + \n    16137      9005     1     0.015180     2 2 2 1 1 0 1 0 0 0 1 0 0 0    + + - - \n    16142      9005     6     0.015180     2 2 2 1 1 0 1 0 0 0 1 0 0 0    - - + + \n    16143      9007     1     0.011801     2 1 2 2 1 0 1 0 0 0 1 0 0 0    + + - - \n    16148      9007     6     0.011801     2 1 2 2 1 0 1 0 0 0 1 0 0 0    - - + + \n    18075      9975     1    -0.015000     2 2 2 0 2 0 0 0 1 0 1 0 0 0    + - \n    18076      9975     2     0.015000     2 2 2 0 2 0 0 0 1 0 1 0 0 0    - + \n    18078      9977     2     0.012617     2 1 2 1 2 0 0 0 1 0 1 0 0 0    + - + - \n    18079      9977     3    -0.010819     2 1 2 1 2 0 0 0 1 0 1 0 0 0    - + + - \n    18080      9977     4    -0.010819     2 1 2 1 2 0 0 0 1 0 1 0 0 0    + - - + \n    18081      9977     5     0.012617     2 1 2 1 2 0 0 0 1 0 1 0 0 0    - + - + \n    18091      9982     1    -0.013426     2 0 2 2 2 0 0 0 1 0 1 0 0 0    + - \n    18092      9982     2     0.013426     2 0 2 2 2 0 0 0 1 0 1 0 0 0    - + \n    42730     17309     1    -0.010928     2 2 2 0 2 0 0 0 0 0 2 0 0 0\n    53885     24077     1     0.011448     2 1 2 2 1 1 0 0 0 0 0 1 0 0    + + - - \n    53887     24077     3    -0.010149     2 1 2 2 1 1 0 0 0 0 0 1 0 0    - + + - \n    53888     24077     4    -0.010149     2 1 2 2 1 1 0 0 0 0 0 1 0 0    + - - + \n    53890     24077     6     0.011448     2 1 2 2 1 1 0 0 0 0 0 1 0 0    - - + + \n    55839     25086     3    -0.011788     2 2 2 1 1 0 0 0 1 0 0 1 0 0    - + + - \n    55840     25086     4    -0.011788     2 2 2 1 1 0 0 0 1 0 0 1 0 0    + - - + \n   157409     58280     1    -0.028131     2 2 2 1 2 0 0 0 0 0 0 0 1 0    + - \n   157410     58280     2     0.028131     2 2 2 1 2 0 0 0 0 0 0 0 1 0    - + \n   157411     58282     1    -0.014620     2 1 2 2 2 0 0 0 0 0 0 0 1 0    + - \n   157412     58282     2     0.014620     2 1 2 2 2 0 0 0 0 0 0 0 1 0    - + \n   157417     58289     1    -0.018463     2 2 2 0 2 1 0 0 0 0 0 0 1 0    + - \n   157418     58289     2     0.018463     2 2 2 0 2 1 0 0 0 0 0 0 1 0    - + \n   157420     58291     2     0.014488     2 1 2 1 2 1 0 0 0 0 0 0 1 0    + - + - \n   157423     58291     5     0.014488     2 1 2 1 2 1 0 0 0 0 0 0 1 0    - + - + \n   157433     58296     1    -0.010593     2 0 2 2 2 1 0 0 0 0 0 0 1 0    + - \n   157434     58296     2     0.010593     2 0 2 2 2 1 0 0 0 0 0 0 1 0    - + \n   157449     58314     1     0.010741     2 1 2 0 2 2 0 0 0 0 0 0 1 0    + - \n   157450     58314     2    -0.010741     2 1 2 0 2 2 0 0 0 0 0 0 1 0    - + \n   157474     58330     2     0.010860     2 2 2 1 1 0 1 0 0 0 0 0 1 0    + - + - \n   157477     58330     5     0.010860     2 2 2 1 1 0 1 0 0 0 0 0 1 0    - + - + \n   159414     59302     2    -0.012934     2 1 2 1 2 0 0 0 1 0 0 0 1 0    + - + - \n   159417     59302     5    -0.012934     2 1 2 1 2 0 0 0 1 0 0 0 1 0    - + - + \n   159427     59307     1     0.014083     2 0 2 2 2 0 0 0 1 0 0 0 1 0    + - \n   159428     59307     2    -0.014083     2 0 2 2 2 0 0 0 1 0 0 0 1 0    - + \n \n\n Weights for averaging density matrix   0.500000  0.500000\n \n  Average one particle density matrix \n \n\n              1        2        3        4        5        6        7        8\n    1    1.9997   0.0018   0.0000   0.0020   0.0000   0.0003   0.0000   0.0000\n    2    0.0018   1.7886   0.0000  -0.2462   0.0000   0.0250   0.0000   0.0000\n    3    0.0000   0.0000   1.9769   0.0000   0.0000   0.0000   0.0000  -0.0237\n    4    0.0020  -0.2462   0.0000   1.6746   0.0000   0.0642   0.0000   0.0000\n    5    0.0000   0.0000   0.0000   0.0000   1.9569   0.0000   0.0669   0.0000\n    6    0.0003   0.0250   0.0000   0.0642   0.0000   0.2921   0.0000   0.0000\n    7    0.0000   0.0000   0.0000   0.0000   0.0669   0.0000   0.0399   0.0000\n    8    0.0000   0.0000  -0.0237   0.0000   0.0000   0.0000   0.0000   0.0219\n    9    0.0009  -0.0079   0.0000  -0.0192   0.0000  -0.2383   0.0000   0.0000\n   10    0.0000   0.0000   0.0000   0.0000   0.0176   0.0000   0.0038   0.0000\n   11   -0.0003  -0.0170   0.0000  -0.0134   0.0000  -0.0486   0.0000   0.0000\n   12    0.0000   0.0000   0.0000   0.0000   0.0069   0.0000  -0.0018   0.0000\n   13    0.0004   0.0196   0.0000   0.0120   0.0000   0.0200   0.0000   0.0000\n   14    0.0000   0.0004   0.0000   0.0000   0.0000   0.0002   0.0000   0.0000\n\n              9       10       11       12       13       14      \n    1    0.0009   0.0000  -0.0003   0.0000   0.0004   0.0000\n    2   -0.0079   0.0000  -0.0170   0.0000   0.0196   0.0004\n    4   -0.0192   0.0000  -0.0134   0.0000   0.0120   0.0000\n    5    0.0000   0.0176   0.0000   0.0069   0.0000   0.0000\n    6   -0.2383   0.0000  -0.0486   0.0000   0.0200   0.0002\n    7    0.0000   0.0038   0.0000  -0.0018   0.0000   0.0000\n    9    0.2215   0.0000   0.0392   0.0000  -0.0142  -0.0002\n   10    0.0000   0.0026   0.0000   0.0005   0.0000   0.0000\n   11    0.0392   0.0000   0.0146   0.0000  -0.0070  -0.0001\n   12    0.0000   0.0005   0.0000   0.0030   0.0000   0.0000\n   13   -0.0142   0.0000  -0.0070   0.0000   0.0075   0.0002\n   14   -0.0002   0.0000  -0.0001   0.0000   0.0002   0.0002\n \n  PDM   1  1\n\n              1        2        3        4        5        6        7        8\n    1    1.9997   0.0002   0.0000   0.0000   0.0000  -0.0002   0.0000   0.0000\n    2    0.0002   1.9861   0.0000  -0.0042   0.0000   0.0011   0.0000   0.0000\n    3    0.0000   0.0000   1.9777   0.0000   0.0000   0.0000   0.0000   0.0177\n    4    0.0000  -0.0042   0.0000   1.9705   0.0000   0.0016   0.0000   0.0000\n    5    0.0000   0.0000   0.0000   0.0000   1.9665   0.0000   0.0013   0.0000\n    6   -0.0002   0.0011   0.0000   0.0016   0.0000   0.0285   0.0000   0.0000\n    7    0.0000   0.0000   0.0000   0.0000   0.0013   0.0000   0.0291   0.0000\n    8    0.0000   0.0000   0.0177   0.0000   0.0000   0.0000   0.0000   0.0211\n    9    0.0002  -0.0108   0.0000  -0.0074   0.0000   0.0012   0.0000   0.0000\n   10    0.0000   0.0000   0.0000   0.0000  -0.0014   0.0000  -0.0001   0.0000\n   11   -0.0002   0.0059   0.0000   0.0048   0.0000  -0.0016   0.0000   0.0000\n   12    0.0000   0.0000   0.0000   0.0000   0.0025   0.0000  -0.0009   0.0000\n   13    0.0003  -0.0005   0.0000   0.0001   0.0000   0.0008   0.0000   0.0000\n   14   -0.0001   0.0004   0.0000   0.0000   0.0000  -0.0001   0.0000   0.0000\n\n              9       10       11       12       13       14      \n    1    0.0002   0.0000  -0.0002   0.0000   0.0003  -0.0001\n    2   -0.0108   0.0000   0.0059   0.0000  -0.0005   0.0004\n    4   -0.0074   0.0000   0.0048   0.0000   0.0001   0.0000\n    5    0.0000  -0.0014   0.0000   0.0025   0.0000   0.0000\n    6    0.0012   0.0000  -0.0016   0.0000   0.0008  -0.0001\n    7    0.0000  -0.0001   0.0000  -0.0009   0.0000   0.0000\n    9    0.0049   0.0000  -0.0046   0.0000   0.0045   0.0001\n   10    0.0000   0.0008   0.0000   0.0007   0.0000   0.0000\n   11   -0.0046   0.0000   0.0063   0.0000  -0.0036  -0.0001\n   12    0.0000   0.0007   0.0000   0.0027   0.0000   0.0000\n   13    0.0045   0.0000  -0.0036   0.0000   0.0059   0.0002\n   14    0.0001   0.0000  -0.0001   0.0000   0.0002   0.0002\n  1pdm   1  1 has correct symmetry\n  PDM   1  2\n\n              1        2        3        4        5        6        7        8\n    1    0.0000  -0.0001   0.0000   0.0002   0.0000   0.0054   0.0000   0.0000\n    2   -0.0002   0.0060   0.0000  -0.0123   0.0000  -0.6272   0.0000   0.0000\n    3    0.0000   0.0000   0.0025   0.0000   0.0000   0.0000   0.0000  -0.0697\n    4   -0.0002   0.0045   0.0000  -0.0142   0.0000  -0.7725   0.0000   0.0000\n    5    0.0000   0.0000   0.0000   0.0000  -0.0019   0.0000   0.0945   0.0000\n    6   -0.0007   0.0016   0.0000   0.0312   0.0000   0.0122   0.0000   0.0000\n    7    0.0000   0.0000   0.0000   0.0000   0.0304   0.0000   0.0071   0.0000\n    8    0.0000   0.0000  -0.0213   0.0000   0.0000   0.0000   0.0000  -0.0020\n    9   -0.0005   0.0022   0.0000  -0.0120   0.0000   0.0118   0.0000   0.0000\n   10    0.0000   0.0000   0.0000   0.0000   0.0050   0.0000   0.0022   0.0000\n   11    0.0004  -0.0062   0.0000   0.0053   0.0000  -0.0116   0.0000   0.0000\n   12    0.0000   0.0000   0.0000   0.0000  -0.0030   0.0000   0.0027   0.0000\n   13   -0.0003   0.0045   0.0000  -0.0061   0.0000   0.0061   0.0000   0.0000\n   14    0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000\n\n              9       10       11       12       13       14      \n    1   -0.0046   0.0000  -0.0008   0.0000   0.0001   0.0000\n    2    0.5614   0.0000   0.0972   0.0000  -0.0318  -0.0005\n    4    0.6953   0.0000   0.1463   0.0000  -0.0564  -0.0007\n    5    0.0000   0.0332   0.0000  -0.0059   0.0000   0.0000\n    6   -0.0149   0.0000  -0.0041   0.0000   0.0050   0.0001\n    7    0.0000   0.0023   0.0000  -0.0006   0.0000   0.0000\n    9   -0.0146   0.0000  -0.0021   0.0000   0.0014   0.0000\n   10    0.0000   0.0009   0.0000  -0.0003   0.0000   0.0000\n   11    0.0145   0.0000   0.0029   0.0000  -0.0019   0.0000\n   12    0.0000   0.0010   0.0000  -0.0003   0.0000   0.0000\n   13   -0.0087   0.0000  -0.0010   0.0000   0.0013   0.0000\n   14    0.0000   0.0000   0.0000   0.0000   0.0000   0.0000\n  1pdm   1  2 has correct symmetry\n  PDM   2  1\n\n              1        2        3        4        5        6        7        8\n    1    0.0000  -0.0002   0.0000  -0.0002   0.0000  -0.0007   0.0000   0.0000\n    2   -0.0001   0.0060   0.0000   0.0045   0.0000   0.0016   0.0000   0.0000\n    3    0.0000   0.0000   0.0025   0.0000   0.0000   0.0000   0.0000  -0.0213\n    4    0.0002  -0.0123   0.0000  -0.0142   0.0000   0.0312   0.0000   0.0000\n    5    0.0000   0.0000   0.0000   0.0000  -0.0019   0.0000   0.0304   0.0000\n    6    0.0054  -0.6272   0.0000  -0.7725   0.0000   0.0122   0.0000   0.0000\n    7    0.0000   0.0000   0.0000   0.0000   0.0945   0.0000   0.0071   0.0000\n    8    0.0000   0.0000  -0.0697   0.0000   0.0000   0.0000   0.0000  -0.0020\n    9   -0.0046   0.5614   0.0000   0.6953   0.0000  -0.0149   0.0000   0.0000\n   10    0.0000   0.0000   0.0000   0.0000   0.0332   0.0000   0.0023   0.0000\n   11   -0.0008   0.0972   0.0000   0.1463   0.0000  -0.0041   0.0000   0.0000\n   12    0.0000   0.0000   0.0000   0.0000  -0.0059   0.0000  -0.0006   0.0000\n   13    0.0001  -0.0318   0.0000  -0.0564   0.0000   0.0050   0.0000   0.0000\n   14    0.0000  -0.0005   0.0000  -0.0007   0.0000   0.0001   0.0000   0.0000\n\n              9       10       11       12       13       14      \n    1   -0.0005   0.0000   0.0004   0.0000  -0.0003   0.0000\n    2    0.0022   0.0000  -0.0062   0.0000   0.0045   0.0000\n    4   -0.0120   0.0000   0.0053   0.0000  -0.0061   0.0000\n    5    0.0000   0.0050   0.0000  -0.0030   0.0000   0.0000\n    6    0.0118   0.0000  -0.0116   0.0000   0.0061   0.0000\n    7    0.0000   0.0022   0.0000   0.0027   0.0000   0.0000\n    9   -0.0146   0.0000   0.0145   0.0000  -0.0087   0.0000\n   10    0.0000   0.0009   0.0000   0.0010   0.0000   0.0000\n   11   -0.0021   0.0000   0.0029   0.0000  -0.0010   0.0000\n   12    0.0000  -0.0003   0.0000  -0.0003   0.0000   0.0000\n   13    0.0014   0.0000  -0.0019   0.0000   0.0013   0.0000\n   14    0.0000   0.0000   0.0000   0.0000   0.0000   0.0000\n  1pdm   2  1 has correct symmetry\n  PDM   2  2\n\n              1        2        3        4        5        6        7        8\n    1    1.9997   0.0034   0.0000   0.0040   0.0000   0.0008   0.0000   0.0000\n    2    0.0034   1.5911   0.0000  -0.4881   0.0000   0.0488   0.0000   0.0000\n    3    0.0000   0.0000   1.9761   0.0000   0.0000   0.0000   0.0000  -0.0651\n    4    0.0040  -0.4881   0.0000   1.3787   0.0000   0.1268   0.0000   0.0000\n    5    0.0000   0.0000   0.0000   0.0000   1.9473   0.0000   0.1325   0.0000\n    6    0.0008   0.0488   0.0000   0.1268   0.0000   0.5557   0.0000   0.0000\n    7    0.0000   0.0000   0.0000   0.0000   0.1325   0.0000   0.0506   0.0000\n    8    0.0000   0.0000  -0.0651   0.0000   0.0000   0.0000   0.0000   0.0227\n    9    0.0017  -0.0050   0.0000  -0.0310   0.0000  -0.4777   0.0000   0.0000\n   10    0.0000   0.0000   0.0000   0.0000   0.0367   0.0000   0.0077   0.0000\n   11   -0.0005  -0.0399   0.0000  -0.0316   0.0000  -0.0957   0.0000   0.0000\n   12    0.0000   0.0000   0.0000   0.0000   0.0113   0.0000  -0.0027   0.0000\n   13    0.0004   0.0396   0.0000   0.0239   0.0000   0.0393   0.0000   0.0000\n   14    0.0000   0.0003   0.0000   0.0000   0.0000   0.0004   0.0000   0.0000\n\n              9       10       11       12       13       14      \n    1    0.0017   0.0000  -0.0005   0.0000   0.0004   0.0000\n    2   -0.0050   0.0000  -0.0399   0.0000   0.0396   0.0003\n    4   -0.0310   0.0000  -0.0316   0.0000   0.0239   0.0000\n    5    0.0000   0.0367   0.0000   0.0113   0.0000   0.0000\n    6   -0.4777   0.0000  -0.0957   0.0000   0.0393   0.0004\n    7    0.0000   0.0077   0.0000  -0.0027   0.0000   0.0000\n    9    0.4382   0.0000   0.0829   0.0000  -0.0328  -0.0004\n   10    0.0000   0.0043   0.0000   0.0003   0.0000   0.0000\n   11    0.0829   0.0000   0.0230   0.0000  -0.0103  -0.0002\n   12    0.0000   0.0003   0.0000   0.0033   0.0000   0.0000\n   13   -0.0328   0.0000  -0.0103   0.0000   0.0091   0.0002\n   14   -0.0004   0.0000  -0.0002   0.0000   0.0002   0.0002\n  1pdm   2  2 has correct symmetry\n  1pdm   1  1 has trace    9.9999999999996\n  1pdm   2  2 has trace    9.9999999999997\n  Natural orbital occupations for   1\n\n              1      \n    1    1.9997\n    2    1.9872\n    3    1.9778\n    4    1.9695\n    5    1.9665\n    6    0.0292\n    7    0.0288\n    8    0.0209\n    9    0.0138\n   10    0.0029\n   11    0.0024\n   12    0.0006\n   13    0.0004\n   14    0.0002\n  Natural orbitals for   1\n\n              1        2        3        4        5        6        7        8\n    1    0.9999   0.0128   0.0000   0.0002   0.0000   0.0000   0.0001   0.0000\n    2    0.0123  -0.9705   0.0000   0.2408   0.0000   0.0000   0.0002   0.0000\n    3    0.0000   0.0000   1.0000   0.0000   0.0000   0.0000   0.0000  -0.0090\n    4   -0.0033   0.2408   0.0000   0.9706   0.0000   0.0000  -0.0003   0.0000\n    5    0.0000   0.0000   0.0000   0.0000   1.0000  -0.0006   0.0000   0.0000\n    6   -0.0001  -0.0004   0.0000   0.0009   0.0000   0.0000   0.9903   0.0000\n    7    0.0000   0.0000   0.0000   0.0000   0.0007   0.9994   0.0000   0.0000\n    8    0.0000   0.0000   0.0090   0.0000   0.0000   0.0000   0.0000   1.0000\n    9    0.0000   0.0044   0.0000  -0.0050   0.0000   0.0000   0.0787   0.0000\n   10    0.0000   0.0000   0.0000   0.0000  -0.0007  -0.0044   0.0000   0.0000\n   11   -0.0001  -0.0023   0.0000   0.0031   0.0000   0.0000  -0.0953   0.0000\n   12    0.0000   0.0000   0.0000   0.0000   0.0013  -0.0333   0.0000   0.0000\n   13    0.0002   0.0003   0.0000   0.0000   0.0000   0.0000   0.0631   0.0000\n   14    0.0000  -0.0002   0.0000   0.0000   0.0000   0.0000  -0.0011   0.0000\n\n              9       10       11       12       13       14      \n    1    0.0002   0.0000   0.0000   0.0000   0.0000   0.0000\n    2   -0.0050   0.0000   0.0018   0.0000   0.0033   0.0004\n    4   -0.0037   0.0000   0.0017   0.0000   0.0022   0.0004\n    5    0.0000  -0.0010   0.0000   0.0011   0.0000   0.0000\n    6    0.1370   0.0000  -0.0214   0.0000  -0.0027   0.0021\n    7    0.0000   0.0330   0.0000  -0.0061   0.0000   0.0000\n    9   -0.5600   0.0000  -0.0345   0.0000   0.8127   0.1362\n   10    0.0000   0.3074   0.0000   0.9516   0.0000   0.0000\n   11    0.5838   0.0000  -0.7132   0.0000   0.3715   0.0576\n   12    0.0000   0.9510   0.0000  -0.3074   0.0000   0.0000\n   13   -0.5715   0.0000  -0.6993   0.0000  -0.4131  -0.0987\n   14   -0.0143   0.0000  -0.0235   0.0000  -0.1756   0.9841\n  Natural orbital occupations for   2\n\n              1      \n    1    1.9997\n    2    1.9864\n    3    1.9782\n    4    1.9573\n    5    1.1162\n    6    0.8721\n    7    0.0424\n    8    0.0205\n    9    0.0114\n   10    0.0067\n   11    0.0034\n   12    0.0028\n   13    0.0024\n   14    0.0002\n  Natural orbitals for   2\n\n              1        2        3        4        5        6        7        8\n    1    0.9999   0.0090   0.0000   0.0000   0.0039   0.0037   0.0000   0.0000\n    2    0.0103  -0.7749   0.0000   0.0000  -0.4636  -0.4260   0.0000   0.0000\n    3    0.0000   0.0000   0.9994   0.0000   0.0000   0.0000   0.0000   0.0332\n    4   -0.0015   0.6306   0.0000   0.0000  -0.5249  -0.5678   0.0000   0.0000\n    5    0.0000   0.0000   0.0000   0.9974   0.0000   0.0000  -0.0705   0.0000\n    6    0.0005   0.0361   0.0000   0.0000  -0.5523   0.4878   0.0000   0.0000\n    7    0.0000   0.0000   0.0000   0.0694   0.0000   0.0000   0.9850   0.0000\n    8    0.0000   0.0000  -0.0332   0.0000   0.0000   0.0000   0.0000   0.9994\n    9    0.0009  -0.0210   0.0000   0.0000   0.4334  -0.5041   0.0000   0.0000\n   10    0.0000   0.0000   0.0000   0.0190   0.0000   0.0000   0.1303   0.0000\n   11   -0.0004   0.0030   0.0000   0.0000   0.1139  -0.0631   0.0000   0.0000\n   12    0.0000   0.0000   0.0000   0.0057   0.0000   0.0000  -0.0880   0.0000\n   13    0.0004  -0.0069   0.0000   0.0000  -0.0614   0.0068   0.0000   0.0000\n   14    0.0000  -0.0001   0.0000   0.0000  -0.0005   0.0003   0.0000   0.0000\n\n              9       10       11       12       13       14      \n    1    0.0006   0.0004   0.0000   0.0000   0.0000   0.0000\n    2    0.0228   0.0506   0.0000  -0.0035   0.0000  -0.0008\n    4    0.0463   0.0478   0.0000  -0.0029   0.0000  -0.0006\n    5    0.0000   0.0000  -0.0153   0.0000   0.0016   0.0000\n    6   -0.6667  -0.0973   0.0000   0.0423   0.0000  -0.0028\n    7    0.0000   0.0000  -0.0319   0.0000  -0.1545   0.0000\n    9   -0.6890  -0.2865   0.0000  -0.0278   0.0000  -0.0015\n   10    0.0000   0.0000   0.7088   0.0000   0.6930   0.0000\n   11   -0.1988   0.6953   0.0000   0.6782   0.0000  -0.0006\n   12    0.0000   0.0000   0.7045   0.0000  -0.7042   0.0000\n   13    0.1963  -0.6478   0.0000   0.7327   0.0000   0.0335\n   14    0.0095  -0.0215   0.0000   0.0241   0.0000  -0.9994\n\n No. of non-zero two-body coupling coeffs  1.16D+09\n\n  2pdm   1  1 has correct symmetry\n  2pdm   1  2 has correct symmetry\n  2pdm   2  1 has correct symmetry\n  2pdm   2  2 has correct symmetry\n  2pdm   1  1 has correct trace\n  2pdm   1  2 has correct trace\n  2pdm   2  1 has correct trace\n  2pdm   2  2 has correct trace\n H( 1, 1) =         -76.15787202\n H( 1, 2) =           0.00000001\n H( 2, 1) =           0.00000001\n H( 2, 2) =         -75.75948873\n\n No. of 3-particle coupling coeffs =  2.95D+10\n  3-pdm   1  1 has good pq trace\n  3-pdm   1  2 has good pq trace\n  3-pdm   2  1 has good pq trace\n  3-pdm   2  2 has good pq trace\n\n  FCI timing information \n  ----------------------\n  name                    ncalls       time\n  --------------------  ----------  ----------\n  couple1                 2146760.      108.4\n  couple2                 8050350.      929.5\n  couple3               305076800.        0.0\n  diags                         1.      265.4\n  make_eaj                      1.        0.1\n  setup                         1.        1.5\n  sigma                        22.    12191.4\n  solve                         1.    13217.5\n  spnfrc                        2.      107.7\n  cntone                       23.       30.2\n\n  Timing overhead= 2.1D-05/call, #calls= 2.0D+07, total ovehead= 4.2D+02\n\n Note: Nonstandard floating-point mode enabled \n See the Numerical Computation Guide, ieee_sun(3M) \n"
  },
  {
    "path": "src/apps/moldft/fci/renorm.F",
    "content": "*\n* $Id: renorm.F,v 1.2 1999/07/28 00:23:43 d3e129 Exp $\n*\n      subroutine renorm(n,x,xnorm)\n      implicit none\n      double precision x(*), xnorm, s\n      integer n, i\nc     \n      if (n.gt.0) then\n         s = 0.0d0\n         do 10 i = 1,n\n            s = s + x(i)*x(i)\n 10      continue\n         if (s.ne.0.0d0) then\n            xnorm = sqrt(s)\n            s = 1.0d0/xnorm\n            do 20 i = 1,n\n               x(i) = x(i) * s\n 20         continue\n         else\n            write(6,*) ' null vector in renorm',n\n            xnorm = 0.0d0\n         endif\n      else\n         xnorm = 0.0d0\n      endif\nc     \n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/rsg.f",
    "content": "      subroutine rsg(nm,n,a,b,w,matz,z,fv1,fv2,ierr)\nc\nC$Id: rsg.f,v 1.1 1997/08/25 21:29:53 d3g681 Exp $\n      integer n,nm,ierr,matz\n      double precision a(nm,n),b(nm,n),w(n),z(nm,n),fv1(n),fv2(n)\nc\nc     this subroutine calls the recommended sequence of\nc     subroutines from the eigensystem subroutine package (eispack)\nc     to find the eigenvalues and eigenvectors (if desired)\nc     for the real symmetric generalized eigenproblem  ax = (lambda)bx.\nc\nc     on input\nc\nc        nm  must be set to the row dimension of the two-dimensional\nc        array parameters as declared in the calling program\nc        dimension statement.\nc\nc        n  is the order of the matrices  a  and  b.\nc\nc        a  contains a real symmetric matrix.\nc\nc        b  contains a positive definite real symmetric matrix.\nc\nc        matz  is an integer variable set equal to zero if\nc        only eigenvalues are desired.  otherwise it is set to\nc        any non-zero integer for both eigenvalues and eigenvectors.\nc\nc     on output\nc\nc        w  contains the eigenvalues in ascending order.\nc\nc        z  contains the eigenvectors if matz is not zero.\nc\nc        ierr  is an integer output variable set equal to an error\nc           completion code described in the documentation for tqlrat\nc           and tql2.  the normal completion code is zero.\nc\nc        fv1  and  fv2  are temporary storage arrays.\nc\nc     questions and comments should be directed to burton s. garbow,\nc     mathematics and computer science div, argonne national laboratory\nc\nc     this version dated august 1983.\nc\nc     ------------------------------------------------------------------\nc\n      if (n .le. nm) go to 10\n      ierr = 10 * n\n      go to 50\nc\n   10 call  rrreduc(nm,n,a,b,fv2,ierr)\n      if (ierr .ne. 0) go to 50\n      if (matz .ne. 0) go to 20\nc     .......... find eigenvalues only ..........\n      call  tttred1(nm,n,a,w,fv1,fv2)\n      call  tttqlrat(n,w,fv2,ierr)\n      go to 50\nc     .......... find both eigenvalues and eigenvectors ..........\n   20 call  tttred2(nm,n,a,w,fv1,z)\n      call  tttql2(nm,n,w,fv1,z,ierr)\n      if (ierr .ne. 0) go to 50\n      call  rrrebak(nm,n,b,fv2,n,z)\n   50 return\n      end\n      subroutine tttql2(nm,n,d,e,z,ierr)\nc\n      integer i,j,k,l,m,n,ii,l1,l2,nm,mml,ierr\n      double precision d(n),e(n),z(nm,n)\n      double precision c,c2,c3,dl1,el1,f,g,h,p,r,s,s2,tst1,tst2,pythag\nc\nc     this subroutine is a translation of the algol procedure tttql2,\nc     num. math. 11, 293-306(1968) by bowdler, martin, reinsch, and\nc     wilkinson.\nc     handbook for auto. comp., vol.ii-linear algebra, 227-240(1971).\nc\nc     this subroutine finds the eigenvalues and eigenvectors\nc     of a symmetric tridiagonal matrix by the ql method.\nc     the eigenvectors of a full symmetric matrix can also\nc     be found if  tttred2  has been used to rrreduce this\nc     full matrix to tridiagonal form.\nc\nc     on input\nc\nc        nm must be set to the row dimension of two-dimensional\nc          array parameters as declared in the calling program\nc          dimension statement.\nc\nc        n is the order of the matrix.\nc\nc        d contains the diagonal elements of the input matrix.\nc\nc        e contains the subdiagonal elements of the input matrix\nc          in its last n-1 positions.  e(1) is arbitrary.\nc\nc        z contains the transformation matrix produced in the\nc          rrreduction by  tttred2, if performed.  if the eigenvectors\nc          of the tridiagonal matrix are desired, z must contain\nc          the identity matrix.\nc\nc      on output\nc\nc        d contains the eigenvalues in ascending order.  if an\nc          error exit is made, the eigenvalues are correct but\nc          unordered for indices 1,2,...,ierr-1.\nc\nc        e has been destroyed.\nc\nc        z contains orthonormal eigenvectors of the symmetric\nc          tridiagonal (or full) matrix.  if an error exit is made,\nc          z contains the eigenvectors associated with the stored\nc          eigenvalues.\nc\nc        ierr is set to\nc          zero       for normal return,\nc          j          if the j-th eigenvalue has not been\nc                     determined after 30 iterations.\nc\nc     calls pythag for  dsqrt(a*a + b*b) .\nc\nc     questions and comments should be directed to burton s. garbow,\nc     mathematics and computer science div, argonne national laboratory\nc\nc     this version dated august 1983.\nc\nc     ------------------------------------------------------------------\nc\n      ierr = 0\n      if (n .eq. 1) go to 1001\nc\n      do 100 i = 2, n\n  100 e(i-1) = e(i)\nc\n      f = 0.0d0\n      tst1 = 0.0d0\n      e(n) = 0.0d0\nc\n      do 240 l = 1, n\n         j = 0\n         h = dabs(d(l)) + dabs(e(l))\n         if (tst1 .lt. h) tst1 = h\nc     .......... look for small sub-diagonal element ..........\n         do 110 m = l, n\n            tst2 = tst1 + dabs(e(m))\n            if (tst2 .eq. tst1) go to 120\nc     .......... e(n) is always zero, so there is no exit\nc                through the bottom of the loop ..........\n  110    continue\nc\n  120    if (m .eq. l) go to 220\n  130    if (j .eq. 30) go to 1000\n         j = j + 1\nc     .......... form shift ..........\n         l1 = l + 1\n         l2 = l1 + 1\n         g = d(l)\n         p = (d(l1) - g) / (2.0d0 * e(l))\n         r = pythag(p,1.0d0)\n         d(l) = e(l) / (p + dsign(r,p))\n         d(l1) = e(l) * (p + dsign(r,p))\n         dl1 = d(l1)\n         h = g - d(l)\n         if (l2 .gt. n) go to 145\nc\n         do 140 i = l2, n\n  140    d(i) = d(i) - h\nc\n  145    f = f + h\nc     .......... ql transformation ..........\n         p = d(m)\n         c = 1.0d0\n         c2 = c\n         el1 = e(l1)\n         s = 0.0d0\n         mml = m - l\nc     .......... for i=m-1 step -1 until l do -- ..........\n         do 200 ii = 1, mml\n            c3 = c2\n            c2 = c\n            s2 = s\n            i = m - ii\n            g = c * e(i)\n            h = c * p\n            r = pythag(p,e(i))\n            e(i+1) = s * r\n            s = e(i) / r\n            c = p / r\n            p = c * d(i) - s * g\n            d(i+1) = h + s * (c * g + s * d(i))\nc     .......... form vector ..........\n            do 180 k = 1, n\n               h = z(k,i+1)\n               z(k,i+1) = s * z(k,i) + c * h\n               z(k,i) = c * z(k,i) - s * h\n  180       continue\nc\n  200    continue\nc\n         p = -s * s2 * c3 * el1 * e(l) / dl1\n         e(l) = s * p\n         d(l) = c * p\n         tst2 = tst1 + dabs(e(l))\n         if (tst2 .gt. tst1) go to 130\n  220    d(l) = d(l) + f\n  240 continue\nc     .......... order eigenvalues and eigenvectors ..........\n      do 300 ii = 2, n\n         i = ii - 1\n         k = i\n         p = d(i)\nc\n         do 260 j = ii, n\n            if (d(j) .ge. p) go to 260\n            k = j\n            p = d(j)\n  260    continue\nc\n         if (k .eq. i) go to 300\n         d(k) = d(i)\n         d(i) = p\nc\n         do 280 j = 1, n\n            p = z(j,i)\n            z(j,i) = z(j,k)\n            z(j,k) = p\n  280    continue\nc\n  300 continue\nc\n      go to 1001\nc     .......... set error -- no convergence to an\nc                eigenvalue after 30 iterations ..........\n 1000 ierr = l\n 1001 return\n      end\n      subroutine tttqlrat(n,d,e2,ierr)\nc\n      integer i,j,l,m,n,ii,l1,mml,ierr\n      double precision d(n),e2(n)\n      double precision b,c,f,g,h,p,r,s,t,epslon,pythag\nc\nc     this subroutine is a translation of the algol procedure tttqlrat,\nc     algorithm 464, comm. acm 16, 689(1973) by reinsch.\nc\nc     this subroutine finds the eigenvalues of a symmetric\nc     tridiagonal matrix by the rational ql method.\nc\nc     on input\nc\nc        n is the order of the matrix.\nc\nc        d contains the diagonal elements of the input matrix.\nc\nc        e2 contains the squares of the subdiagonal elements of the\nc          input matrix in its last n-1 positions.  e2(1) is arbitrary.\nc\nc      on output\nc\nc        d contains the eigenvalues in ascending order.  if an\nc          error exit is made, the eigenvalues are correct and\nc          ordered for indices 1,2,...ierr-1, but may not be\nc          the smallest eigenvalues.\nc\nc        e2 has been destroyed.\nc\nc        ierr is set to\nc          zero       for normal return,\nc          j          if the j-th eigenvalue has not been\nc                     determined after 30 iterations.\nc\nc     calls pythag for  dsqrt(a*a + b*b) .\nc\nc     questions and comments should be directed to burton s. garbow,\nc     mathematics and computer science div, argonne national laboratory\nc\nc     this version dated august 1987.\nc     modified by c. moler to fix underflow/overflow difficulties,\nc     especially on the vax and other machines where epslon(1.0d0)**2\nc     nearly underflows.  see the loop involving statement 102 and\nc     the two statements just before statement 200.\nc\nc     ------------------------------------------------------------------\nc\n      ierr = 0\n      if (n .eq. 1) go to 1001\nc\n      do 100 i = 2, n\n  100 e2(i-1) = e2(i)\nc\n      f = 0.0d0\n      t = 0.0d0\n      e2(n) = 0.0d0\nc\n      do 290 l = 1, n\n         j = 0\n         h = dabs(d(l)) + dsqrt(e2(l))\n         if (t .gt. h) go to 105\n         t = h\n         b = epslon(t)\n         c = b * b\n         if (c .ne. 0.0d0) go to 105\nc        spliting tolerance underflowed.  look for larger value.\n         do 102 i = l, n\n            h = dabs(d(i)) + dsqrt(e2(i))\n            if (h .gt. t) t = h\n  102    continue\n         b = epslon(t)\n         c = b * b\nc     .......... look for small squared sub-diagonal element ..........\n  105    do 110 m = l, n\n            if (e2(m) .le. c) go to 120\nc     .......... e2(n) is always zero, so there is no exit\nc                through the bottom of the loop ..........\n  110    continue\nc\n  120    if (m .eq. l) go to 210\n  130    if (j .eq. 30) go to 1000\n         j = j + 1\nc     .......... form shift ..........\n         l1 = l + 1\n         s = dsqrt(e2(l))\n         g = d(l)\n         p = (d(l1) - g) / (2.0d0 * s)\n         r = pythag(p,1.0d0)\n         d(l) = s / (p + dsign(r,p))\n         h = g - d(l)\nc\n         do 140 i = l1, n\n  140    d(i) = d(i) - h\nc\n         f = f + h\nc     .......... rational ql transformation ..........\n         g = d(m)\n         if (g .eq. 0.0d0) g = b\n         h = g\n         s = 0.0d0\n         mml = m - l\nc     .......... for i=m-1 step -1 until l do -- ..........\n         do 200 ii = 1, mml\n            i = m - ii\n            p = g * h\n            r = p + e2(i)\n            e2(i+1) = s * r\n            s = e2(i) / r\n            d(i+1) = h + s * (h + d(i))\n            g = d(i) - e2(i) / g\nc           avoid division by zero on next pass\n            if (g .eq. 0.0d0) g = epslon(d(i))\n            h = g * (p / r)\n  200    continue\nc\n         e2(l) = s * g\n         d(l) = h\nc     .......... guard against underflow in convergence test ..........\n         if (h .eq. 0.0d0) go to 210\n         if (dabs(e2(l)) .le. dabs(c/h)) go to 210\n         e2(l) = h * e2(l)\n         if (e2(l) .ne. 0.0d0) go to 130\n  210    p = d(l) + f\nc     .......... order eigenvalues ..........\n         if (l .eq. 1) go to 250\nc     .......... for i=l step -1 until 2 do -- ..........\n         do 230 ii = 2, l\n            i = l + 2 - ii\n            if (p .ge. d(i-1)) go to 270\n            d(i) = d(i-1)\n  230    continue\nc\n  250    i = 1\n  270    d(i) = p\n  290 continue\nc\n      go to 1001\nc     .......... set error -- no convergence to an\nc                eigenvalue after 30 iterations ..........\n 1000 ierr = l\n 1001 return\n      end\n      subroutine tttred1(nm,n,a,d,e,e2)\nc\n      integer i,j,k,l,n,ii,nm,jp1\n      double precision a(nm,n),d(n),e(n),e2(n)\n      double precision f,g,h,scale\nc\nc     this subroutine is a translation of the algol procedure tttred1,\nc     num. math. 11, 181-195(1968) by martin, reinsch, and wilkinson.\nc     handbook for auto. comp., vol.ii-linear algebra, 212-226(1971).\nc\nc     this subroutine rrreduces a real symmetric matrix\nc     to a symmetric tridiagonal matrix using\nc     orthogonal similarity transformations.\nc\nc     on input\nc\nc        nm must be set to the row dimension of two-dimensional\nc          array parameters as declared in the calling program\nc          dimension statement.\nc\nc        n is the order of the matrix.\nc\nc        a contains the real symmetric input matrix.  only the\nc          lower triangle of the matrix need be supplied.\nc\nc     on output\nc\nc        a contains information about the orthogonal trans-\nc          formations used in the rrreduction in its strict lower\nc          triangle.  the full upper triangle of a is unaltered.\nc\nc        d contains the diagonal elements of the tridiagonal matrix.\nc\nc        e contains the subdiagonal elements of the tridiagonal\nc          matrix in its last n-1 positions.  e(1) is set to zero.\nc\nc        e2 contains the squares of the corresponding elements of e.\nc          e2 may coincide with e if the squares are not needed.\nc\nc     questions and comments should be directed to burton s. garbow,\nc     mathematics and computer science div, argonne national laboratory\nc\nc     this version dated august 1983.\nc\nc     ------------------------------------------------------------------\nc\n      do 100 i = 1, n\n         d(i) = a(n,i)\n         a(n,i) = a(i,i)\n  100 continue\nc     .......... for i=n step -1 until 1 do -- ..........\n      do 300 ii = 1, n\n         i = n + 1 - ii\n         l = i - 1\n         h = 0.0d0\n         scale = 0.0d0\n         if (l .lt. 1) go to 130\nc     .......... scale row (algol tol then not needed) ..........\n         do 120 k = 1, l\n  120    scale = scale + dabs(d(k))\nc\n         if (scale .ne. 0.0d0) go to 140\nc\n         do 125 j = 1, l\n            d(j) = a(l,j)\n            a(l,j) = a(i,j)\n            a(i,j) = 0.0d0\n  125    continue\nc\n  130    e(i) = 0.0d0\n         e2(i) = 0.0d0\n         go to 300\nc\n  140    do 150 k = 1, l\n            d(k) = d(k) / scale\n            h = h + d(k) * d(k)\n  150    continue\nc\n         e2(i) = scale * scale * h\n         f = d(l)\n         g = -dsign(dsqrt(h),f)\n         e(i) = scale * g\n         h = h - f * g\n         d(l) = f - g\n         if (l .eq. 1) go to 285\nc     .......... form a*u ..........\n         do 170 j = 1, l\n  170    e(j) = 0.0d0\nc\n         do 240 j = 1, l\n            f = d(j)\n            g = e(j) + a(j,j) * f\n            jp1 = j + 1\n            if (l .lt. jp1) go to 220\nc\n            do 200 k = jp1, l\n               g = g + a(k,j) * d(k)\n               e(k) = e(k) + a(k,j) * f\n  200       continue\nc\n  220       e(j) = g\n  240    continue\nc     .......... form p ..........\n         f = 0.0d0\nc\n         do 245 j = 1, l\n            e(j) = e(j) / h\n            f = f + e(j) * d(j)\n  245    continue\nc\n         h = f / (h + h)\nc     .......... form q ..........\n         do 250 j = 1, l\n  250    e(j) = e(j) - h * d(j)\nc     .......... form rrreduced a ..........\n         do 280 j = 1, l\n            f = d(j)\n            g = e(j)\nc\n            do 260 k = j, l\n  260       a(k,j) = a(k,j) - f * e(k) - g * d(k)\nc\n  280    continue\nc\n  285    do 290 j = 1, l\n            f = d(j)\n            d(j) = a(l,j)\n            a(l,j) = a(i,j)\n            a(i,j) = f * scale\n  290    continue\nc\n  300 continue\nc\n      return\n      end\n      subroutine tttred2(nm,n,a,d,e,z)\nc\n      integer i,j,k,l,n,ii,nm,jp1\n      double precision a(nm,n),d(n),e(n),z(nm,n)\n      double precision f,g,h,hh,scale\nc\nc     this subroutine is a translation of the algol procedure tttred2,\nc     num. math. 11, 181-195(1968) by martin, reinsch, and wilkinson.\nc     handbook for auto. comp., vol.ii-linear algebra, 212-226(1971).\nc\nc     this subroutine rrreduces a real symmetric matrix to a\nc     symmetric tridiagonal matrix using and accumulating\nc     orthogonal similarity transformations.\nc\nc     on input\nc\nc        nm must be set to the row dimension of two-dimensional\nc          array parameters as declared in the calling program\nc          dimension statement.\nc\nc        n is the order of the matrix.\nc\nc        a contains the real symmetric input matrix.  only the\nc          lower triangle of the matrix need be supplied.\nc\nc     on output\nc\nc        d contains the diagonal elements of the tridiagonal matrix.\nc\nc        e contains the subdiagonal elements of the tridiagonal\nc          matrix in its last n-1 positions.  e(1) is set to zero.\nc\nc        z contains the orthogonal transformation matrix\nc          produced in the rrreduction.\nc\nc        a and z may coincide.  if distinct, a is unaltered.\nc\nc     questions and comments should be directed to burton s. garbow,\nc     mathematics and computer science div, argonne national laboratory\nc\nc     this version dated august 1983.\nc\nc     ------------------------------------------------------------------\nc\n      do 100 i = 1, n\nc\n         do 80 j = i, n\n   80    z(j,i) = a(j,i)\nc\n         d(i) = a(n,i)\n  100 continue\nc\n      if (n .eq. 1) go to 510\nc     .......... for i=n step -1 until 2 do -- ..........\n      do 300 ii = 2, n\n         i = n + 2 - ii\n         l = i - 1\n         h = 0.0d0\n         scale = 0.0d0\n         if (l .lt. 2) go to 130\nc     .......... scale row (algol tol then not needed) ..........\n         do 120 k = 1, l\n  120    scale = scale + dabs(d(k))\nc\n         if (scale .ne. 0.0d0) go to 140\n  130    e(i) = d(l)\nc\n         do 135 j = 1, l\n            d(j) = z(l,j)\n            z(i,j) = 0.0d0\n            z(j,i) = 0.0d0\n  135    continue\nc\n         go to 290\nc\n  140    do 150 k = 1, l\n            d(k) = d(k) / scale\n            h = h + d(k) * d(k)\n  150    continue\nc\n         f = d(l)\n         g = -dsign(dsqrt(h),f)\n         e(i) = scale * g\n         h = h - f * g\n         d(l) = f - g\nc     .......... form a*u ..........\n         do 170 j = 1, l\n  170    e(j) = 0.0d0\nc\n         do 240 j = 1, l\n            f = d(j)\n            z(j,i) = f\n            g = e(j) + z(j,j) * f\n            jp1 = j + 1\n            if (l .lt. jp1) go to 220\nc\n            do 200 k = jp1, l\n               g = g + z(k,j) * d(k)\n               e(k) = e(k) + z(k,j) * f\n  200       continue\nc\n  220       e(j) = g\n  240    continue\nc     .......... form p ..........\n         f = 0.0d0\nc\n         do 245 j = 1, l\n            e(j) = e(j) / h\n            f = f + e(j) * d(j)\n  245    continue\nc\n         hh = f / (h + h)\nc     .......... form q ..........\n         do 250 j = 1, l\n  250    e(j) = e(j) - hh * d(j)\nc     .......... form rrreduced a ..........\n         do 280 j = 1, l\n            f = d(j)\n            g = e(j)\nc\n            do 260 k = j, l\n  260       z(k,j) = z(k,j) - f * e(k) - g * d(k)\nc\n            d(j) = z(l,j)\n            z(i,j) = 0.0d0\n  280    continue\nc\n  290    d(i) = h\n  300 continue\nc     .......... accumulation of transformation matrices ..........\n      do 500 i = 2, n\n         l = i - 1\n         z(n,l) = z(l,l)\n         z(l,l) = 1.0d0\n         h = d(i)\n         if (h .eq. 0.0d0) go to 380\nc\n         do 330 k = 1, l\n  330    d(k) = z(k,i) / h\nc\n         do 360 j = 1, l\n            g = 0.0d0\nc\n            do 340 k = 1, l\n  340       g = g + z(k,i) * z(k,j)\nc\n            do 360 k = 1, l\n               z(k,j) = z(k,j) - g * d(k)\n  360    continue\nc\n  380    do 400 k = 1, l\n  400    z(k,i) = 0.0d0\nc\n  500 continue\nc\n  510 do 520 i = 1, n\n         d(i) = z(n,i)\n         z(n,i) = 0.0d0\n  520 continue\nc\n      z(n,n) = 1.0d0\n      e(1) = 0.0d0\n      return\n      end\n      double precision function epslon (x)\n      double precision x\nc\nc     estimate unit roundoff in quantities of size x.\nc\n      double precision a,b,c,eps\nc\nc     this program should function properly on all systems\nc     satisfying the following two assumptions,\nc        1.  the base used in representing floating point\nc            numbers is not a power of three.\nc        2.  the quantity  a  in statement 10 is represented to \nc            the accuracy used in floating point variables\nc            that are stored in memory.\nc     the statement number 10 and the go to 10 are intended to\nc     force optimizing compilers to generate code satisfying \nc     assumption 2.\nc     under these assumptions, it should be true that,\nc            a  is not exactly equal to four-thirds,\nc            b  has a zero for its last bit or digit,\nc            c  is not exactly equal to one,\nc            eps  measures the separation of 1.0 from\nc                 the next larger floating point number.\nc     the developers of eispack would appreciate being informed\nc     about any systems where these assumptions do not hold.\nc\nc     this version dated 4/6/83.\nc\n      a = 4.0d0/3.0d0\n   10 b = a - 1.0d0\n      c = b + b + b\n      eps = dabs(c-1.0d0)\n      if (eps .eq. 0.0d0) go to 10\n      epslon = eps*dabs(x)\n      return\n      end\n      double precision function pythag(a,b)\n      double precision a,b\nc\nc     finds dsqrt(a**2+b**2) without overflow or destructive underflow\nc\n      double precision p,r,s,t,u\n      p = dmax1(dabs(a),dabs(b))\n      if (p .eq. 0.0d0) go to 20\n      r = (dmin1(dabs(a),dabs(b))/p)**2\n   10 continue\n         t = 4.0d0 + r\n         if (t .eq. 4.0d0) go to 20\n         s = r/t\n         u = 1.0d0 + 2.0d0*s\n         p = u*p\n         r = (s/u)**2 * r\n      go to 10\n   20 pythag = p\n      return\n      end\n      subroutine rrrebak(nm,n,b,dl,m,z)\nc\n      integer i,j,k,m,n,i1,ii,nm\n      double precision b(nm,n),dl(n),z(nm,m)\n      double precision x\nc\nc     this subroutine is a translation of the algol procedure rrrebaka,\nc     num. math. 11, 99-110(1968) by martin and wilkinson.\nc     handbook for auto. comp., vol.ii-linear algebra, 303-314(1971).\nc\nc     this subroutine forms the eigenvectors of a generalized\nc     symmetric eigensystem by back transforming those of the\nc     derived symmetric matrix determined by  rrreduc.\nc\nc     on input\nc\nc        nm must be set to the row dimension of two-dimensional\nc          array parameters as declared in the calling program\nc          dimension statement.\nc\nc        n is the order of the matrix system.\nc\nc        b contains information about the similarity transformation\nc          (cholesky decomposition) used in the rrreduction by  rrreduc\nc          in its strict lower triangle.\nc\nc        dl contains further information about the transformation.\nc\nc        m is the number of eigenvectors to be back transformed.\nc\nc        z contains the eigenvectors to be back transformed\nc          in its first m columns.\nc\nc     on output\nc\nc        z contains the transformed eigenvectors\nc          in its first m columns.\nc\nc     questions and comments should be directed to burton s. garbow,\nc     mathematics and computer science div, argonne national laboratory\nc\nc     this version dated august 1983.\nc\nc     ------------------------------------------------------------------\nc\n      if (m .eq. 0) go to 200\nc\n      do 100 j = 1, m\nc     .......... for i=n step -1 until 1 do -- ..........\n         do 100 ii = 1, n\n            i = n + 1 - ii\n            i1 = i + 1\n            x = z(i,j)\n            if (i .eq. n) go to 80\nc\n            do 60 k = i1, n\n   60       x = x - b(k,i) * z(k,j)\nc\n   80       z(i,j) = x / dl(i)\n  100 continue\nc\n  200 return\n      end\n      subroutine rrreduc(nm,n,a,b,dl,ierr)\nc\n      integer i,j,k,n,i1,j1,nm,nn,ierr\n      double precision a(nm,n),b(nm,n),dl(n)\n      double precision x,y\nc\nc     this subroutine is a translation of the algol procedure rrreduc1,\nc     num. math. 11, 99-110(1968) by martin and wilkinson.\nc     handbook for auto. comp., vol.ii-linear algebra, 303-314(1971).\nc\nc     this subroutine rrreduces the generalized symmetric eigenproblem\nc     ax=(lambda)bx, where b is positive definite, to the standard\nc     symmetric eigenproblem using the cholesky factorization of b.\nc\nc     on input\nc\nc        nm must be set to the row dimension of two-dimensional\nc          array parameters as declared in the calling program\nc          dimension statement.\nc\nc        n is the order of the matrices a and b.  if the cholesky\nc          factor l of b is already available, n should be prefixed\nc          with a minus sign.\nc\nc        a and b contain the real symmetric input matrices.  only the\nc          full upper triangles of the matrices need be supplied.  if\nc          n is negative, the strict lower triangle of b contains,\nc          instead, the strict lower triangle of its cholesky factor l.\nc\nc        dl contains, if n is negative, the diagonal elements of l.\nc\nc     on output\nc\nc        a contains in its full lower triangle the full lower triangle\nc          of the symmetric matrix derived from the rrreduction to the\nc          standard form.  the strict upper triangle of a is unaltered.\nc\nc        b contains in its strict lower triangle the strict lower\nc          triangle of its cholesky factor l.  the full upper\nc          triangle of b is unaltered.\nc\nc        dl contains the diagonal elements of l.\nc\nc        ierr is set to\nc          zero       for normal return,\nc          7*n+1      if b is not positive definite.\nc\nc     questions and comments should be directed to burton s. garbow,\nc     mathematics and computer science div, argonne national laboratory\nc\nc     this version dated august 1983.\nc\nc     ------------------------------------------------------------------\nc\n      ierr = 0\n      nn = iabs(n)\n      if (n .lt. 0) go to 100\nc     .......... form l in the arrays b and dl ..........\n      do 80 i = 1, n\n         i1 = i - 1\nc\n         do 80 j = i, n\n            x = b(i,j)\n            if (i .eq. 1) go to 40\nc\n            do 20 k = 1, i1\n   20       x = x - b(i,k) * b(j,k)\nc\n   40       if (j .ne. i) go to 60\n            if (x .le. 0.0d0) go to 1000\n            y = dsqrt(x)\n            dl(i) = y\n            go to 80\n   60       b(j,i) = x / y\n   80 continue\nc     .......... form the transpose of the upper triangle of inv(l)*a\nc                in the lower triangle of the array a ..........\n  100 do 200 i = 1, nn\n         i1 = i - 1\n         y = dl(i)\nc\n         do 200 j = i, nn\n            x = a(i,j)\n            if (i .eq. 1) go to 180\nc\n            do 160 k = 1, i1\n  160       x = x - b(i,k) * a(j,k)\nc\n  180       a(j,i) = x / y\n  200 continue\nc     .......... pre-multiply by inv(l) and overwrite ..........\n      do 300 j = 1, nn\n         j1 = j - 1\nc\n         do 300 i = j, nn\n            x = a(i,j)\n            if (i .eq. j) go to 240\n            i1 = i - 1\nc\n            do 220 k = j, i1\n  220       x = x - a(k,j) * b(i,k)\nc\n  240       if (j .eq. 1) go to 280\nc\n            do 260 k = 1, j1\n  260       x = x - a(j,k) * b(i,k)\nc\n  280       a(i,j) = x / dl(i)\n  300 continue\nc\n      go to 1001\nc     .......... set error -- b is not positive definite ..........\n 1000 ierr = 7 * n + 1\n 1001 return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/screen.F",
    "content": "*\n* $Id: screen.F,v 1.2 1999/07/28 00:23:43 d3e129 Exp $\n*\n      subroutine screen(thresh,x,ix,n)\n      implicit none\n      double precision thresh, x(*)\n      integer ix, n, i, itop\nc     \nc     zero elements of x whose absolute value is less than thresh\nc     \n      if (ix.eq.1) then\n         do 10 i = 1,n\n            if (abs(x(i)).lt.thresh) x(i) = 0.0d0\n 10      continue\n      else\n         itop = (n-1)*ix + 1\n         do 20 i = 1,itop,ix\n            if (abs(x(i)).lt.thresh) x(i) = 0.0d0\n 20      continue\n      endif\nc     \n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fci/timer.f",
    "content": "*\n* $Id: timer.f,v 1.2 1999/07/28 00:23:43 d3e129 Exp $\n*\n      implicit none\n      integer maxn\n      parameter (maxn = 100000)\n      double precision a(maxn), b(maxn), c(maxn), s\nc\n      integer i, j, n, nloop, loop\n      double precision linux_cputime, start, usedf, usedb, ratef, rateb\n      external linux_cputime\nc\n      do i = 1, n\n         a(i) = 2.0d0\n         b(i) = 1.0d0\n         c(i) = 3.0d0\n      enddo\nc\n      n = 1\n      s = 4.5d0\nc\n 10   nloop = 10000000/n + 1\n      start = linux_cputime()\n      do loop = 1, nloop\n         do i = 1, n\n            a(i) = a(i) + s*b(i)\n         enddo\n      enddo\n      usedf = linux_cputime() - start\n      ratef = 1d-6 * n * nloop / usedf\n      start = linux_cputime()\n      do loop = 1, nloop\n         call daxpy(n, s, b, 1, a, 1)\n      enddo\n      usedb = linux_cputime() - start\n      rateb = 1d-6 * n * nloop / usedb\n      write(6,1) n, usedf, ratef, usedb, rateb\n 1    format(1x,i8,2f10.3,2x,2f10.3)\n      n = n * 2\n      if (n .lt. maxn) goto 10\nc\n      end\n\n\n"
  },
  {
    "path": "src/apps/moldft/fci/yacobi.F",
    "content": "*\n* $Id: yacobi.F,v 1.2 1999/07/28 00:23:43 d3e129 Exp $\n*\n      subroutine yacobi (a,u,n,big,jb,iord)\n      implicit real*8(a-h,o-z)\n      dimension a(1),u(1),big(1),jb(1)\n      data zero/0.0d0/\nc\nc     rjh ... added iord=1 (increasing evals) iord=2 (decreasing)\nc\nc 32 bit precision\nc      data eps/1.0e-7/\nc 64 bit precision\n      data eps/1.0d-12/\n      data one/1.0d0/\n      l(i)=(i*(i-1))/2\nc\n      u(1)=one\n      if (n.eq.1) go to 999\n      j=0\n      k=0\n      n2=n*n\n      do 10 i=1,n2\n   10 u(i)=zero\n      do 30 i=1,n\n      j=j+i\n      jj=k+i\n      k=k+n\n      u(jj)=one\nc     section to locate biggest off-diagonal element in row i\n      im1=i-1\n      if (im1.eq.0) go to 30\n      big(i)=zero\n      do 20 jj=1,im1\n      ij=l(i)+jj\n      b=abs(a(ij))\n      if (b.le.big(i)) go to 20\n      big(i)=b\n      jb(i)=jj\n   20 continue\n   30 continue\nc     locate rotation pivot\n   31 continue\n      ibig=2\n      do 35 i=2,n\n      if (big(i).gt.big(ibig)) ibig=i\n   35 continue\n      biggst=big(ibig)\n      jbig=jb(ibig)\n      if (biggst.le.eps) go to 999\nc     begin rotation\n      ii=l(ibig)+ibig\n      ij=l(ibig)+jbig\n      jj=l(jbig)+jbig\n      ab=a(ii)-a(jj)\n      aa=a(ij)+a(ij)\n      d=sqrt(ab*ab+aa*aa)\n      if (ab.lt.zero) d=-d\n      t=aa/(ab+d)\n      tsq=t*t\n      csq=one/(one+tsq)\n      c=sqrt(csq)\n      s=c*t\n      ab=aa*t\n      d=(a(ii)+ab+tsq*a(jj))*csq\n      a(jj)=(a(jj)-ab+tsq*a(ii))*csq\n      a(ii)=d\n      a(ij)=zero\n      iii=4\n      kix=(ibig-1)*n\n      kjx=(jbig-1)*n\n      do 60 i=1,n\n      ki=kix+i\n      kj=kjx+i\n      d=c*u(ki)+s*u(kj)\n      u(kj)=c*u(kj)-s*u(ki)\n      u(ki)=d\n      if (i-jbig) 45,54,46\n   45 kj=l(jbig)+i\n      ki=l(ibig)+i\n      go to 50\n   46 kj=l(i)+jbig\n      if (i-ibig)47,55,48\n   47 ki=l(ibig)+i\n      iii=2\n      if (jb(i).eq.jbig) iii=3\n      go to 50\n   48 ki=l(i)+ibig\n      iii=1\n      if (jb(i).eq.ibig.or.jb(i).eq.jbig) iii=3\n   50 d=c*a(ki)+s*a(kj)\n      a(kj)=c*a(kj)-s*a(ki)\n      a(ki)=d\n      go to (51,52,55,60),iii\n   51 b=abs(a(ki))\n      if (b.le.big(i)) go to 52\n      big(i)=b\n      jb(i)=ibig\n   52 b=abs(a(kj))\n      if (b.le.big(i)) go to 60\n      big(i)=b\n      jb(i)=jbig\n      go to 60\n   54 if (i.eq.1) go to 60\n   55 im1=i-1\n      big(i)=zero\n      do 58 j=1,im1\n      ij=l(i)+j\n      b=abs(a(ij))\n      if (b.le.big(i)) go to 58\n      big(i)=b\n      jb(i)=j\n   58 continue\n   60 continue\nc     end of rotation\n      go to 31\n  999 continue\nc lock eigenvectors so that first coefficient is always\nc positive.\n      ij=1\n      do 501 i=1,n\n      if (u(ij).ge.zero) go to 503\n      do 502 j=1,n\n      u(ij+j-1)=-u(ij+j-1)\n  502 continue\n  503 ij=ij+n\n  501 continue\nc put eigen values in big and order them\n      ii = 0\n      do 1231 i = 1,n\n          ii = ii+i\n          big(i) = a(ii)\n1231  continue\n      call order(n,big,u,iord)\n      return\n      end\n      subroutine order(n,e,v,iord)\n      implicit real*8(a-h,o-z)\n      dimension e(n),v(n,n)\n      logical oswap\nc\nc order eigenvalues and vectors in increasing order.\nc\n      do 10 j=1,n\n          do 20 i=j+1,n\n             if (iord .eq. 1) then\n                oswap = e(i).lt.e(j)\n             else\n                oswap = e(j).lt.e(i)\n             endif\n              if(oswap) then\n                t=e(i)\n                e(i)=e(j)\n                e(j)=t\n                do 30 k=1,n\n                    t=v(k,i)\n                    v(k,i)=v(k,j)\n30                  v(k,j)=t\n              endif\n20        continue\n10    continue\n      return\n      end\n"
  },
  {
    "path": "src/apps/moldft/fitinput",
    "content": "atom Mg\r\n"
  },
  {
    "path": "src/apps/moldft/gth.xml",
    "content": "<?xml version=\"1.0\" ?>\n<name>\n GTH\n </name>\n<atom symbol=\"Ag\" lmax=\"2\">\n<local Zeff=\"1\" radius=\"0.65000000\" C1=\"-2.37606096\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"1.01270456\" h00=\"0.89793134\" h11=\"-0.74832297\" h22=\"0.02978730\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"1.23584202\" h00=\"0.13008068\" h11=\"-0.27749548\" h22=\"0.00000000\" k00=\"0.01969167\" k11=\"-0.00682116\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.01615913\" h00=\"-0.03884235\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00945505\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Al\" lmax=\"1\">\n<local Zeff=\"3\" radius=\"0.45000000\" C1=\"-8.49135116\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.46010427\" h00=\"5.08833953\" h11=\"2.67969975\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.53674439\" h00=\"2.19343827\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00615404\" k11=\"0.00394694\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ar\" lmax=\"1\">\n<local Zeff=\"8\" radius=\"0.40000000\" C1=\"-7.10000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.31738081\" h00=\"10.24948699\" h11=\"5.60251627\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.35161921\" h00=\"4.97880101\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01639467\" k11=\"0.02917087\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"As\" lmax=\"2\">\n<local Zeff=\"5\" radius=\"0.52000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.45640025\" h00=\"4.56076106\" h11=\"1.69238876\" h22=\"-1.37380421\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.55056168\" h00=\"1.81224664\" h11=\"-0.64672658\" h22=\"0.00000000\" k00=\"0.05246616\" k11=\"0.02056179\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.68528272\" h00=\"0.31237276\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00427335\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"At\" lmax=\"2\">\n<local Zeff=\"7\" radius=\"0.58000000\" C1=\"13.52041116\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.62782694\" h00=\"0.94555652\" h11=\"-0.96590285\" h22=\"-0.19042856\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.70982320\" h00=\"0.52707805\" h11=\"-0.31882073\" h22=\"0.00000000\" k00=\"0.48077365\" k11=\"-0.03495387\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.83836499\" h00=\"0.46894787\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.03754438\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Au\" lmax=\"1\">\n<local Zeff=\"1\" radius=\"0.65000000\" C1=\"-1.96371223\" C2=\"-1.69812291\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.91930757\" h00=\"1.53959915\" h11=\"-0.46877861\" h22=\"-0.79203890\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"1.14035080\" h00=\"0.47122943\" h11=\"-0.49753827\" h22=\"-0.20975780\" k00=\"0.03934865\" k11=\"0.13296969\" k22=\"-0.15342717\"/>\n</atom>\n<atom symbol=\"Ba\" lmax=\"2\">\n<local Zeff=\"2\" radius=\"1.20000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"1.01618684\" h00=\"0.92259259\" h11=\"0.76349489\" h22=\"-0.33346493\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"1.24987991\" h00=\"0.44716820\" h11=\"0.15108073\" h22=\"0.00000000\" k00=\"-0.04101721\" k11=\"0.08879970\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.93715823\" h00=\"-0.71893382\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00532055\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Be\" lmax=\"1\">\n<local Zeff=\"2\" radius=\"0.73900865\" C1=\"-2.59295078\" C2=\"0.35483893\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.52879656\" h00=\"3.06166591\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.65815348\" h00=\"0.09246196\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00012877\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Bi\" lmax=\"2\">\n<local Zeff=\"5\" radius=\"0.60500000\" C1=\"6.67943714\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.67885795\" h00=\"1.37763378\" h11=\"-0.51369691\" h22=\"-0.47102813\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.79867267\" h00=\"0.65557809\" h11=\"-0.40293219\" h22=\"0.00000000\" k00=\"0.30531353\" k11=\"-0.02313366\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.93468255\" h00=\"0.37847579\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02921737\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Br\" lmax=\"2\">\n<local Zeff=\"7\" radius=\"0.50000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.42820734\" h00=\"5.39883713\" h11=\"1.82029205\" h22=\"-1.32397392\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.45532308\" h00=\"3.10882269\" h11=\"-0.63220188\" h22=\"0.00000000\" k00=\"0.07400663\" k11=\"0.06878684\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.55784727\" h00=\"0.55590294\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00714446\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"B\" lmax=\"1\">\n<local Zeff=\"3\" radius=\"0.43392956\" C1=\"-5.57864173\" C2=\"0.80425145\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.37384326\" h00=\"6.23392822\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.36039317\" h00=\"0.00000000\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00087786\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ca\" lmax=\"2\">\n<local Zeff=\"2\" radius=\"0.80000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.66973721\" h00=\"1.64501442\" h11=\"1.52349082\" h22=\"0.29599634\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.94647402\" h00=\"0.58547893\" h11=\"0.12632878\" h22=\"0.00000000\" k00=\"-0.00336201\" k11=\"0.01277891\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.52654998\" h00=\"-3.03232095\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00081449\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Cd\" lmax=\"2\">\n<local Zeff=\"2\" radius=\"0.62500000\" C1=\"-1.79683799\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.82846467\" h00=\"1.48529241\" h11=\"-0.42475283\" h22=\"-0.40798627\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.97287254\" h00=\"0.46920843\" h11=\"-0.44811107\" h22=\"0.00000000\" k00=\"0.03771366\" k11=\"-0.00200856\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.24094900\" h00=\"0.06541164\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00310866\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ce\" lmax=\"3\">\n<local Zeff=\"12\" radius=\"0.53500000\" C1=\"18.84746984\" C2=\"-0.76563607\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.52179048\" h00=\"1.32161643\" h11=\"-1.70044394\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.47032440\" h00=\"0.97264077\" h11=\"-1.45133651\" h22=\"0.00000000\" k00=\"0.46370953\" k11=\"0.09025691\" k22=\"0.01256583\"/>\n<nonlocal l=\"2\" radius=\"0.70359268\" h00=\"0.07424079\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01326523\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.30671668\" h00=\"-17.21478997\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00756841\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Cl\" lmax=\"1\">\n<local Zeff=\"7\" radius=\"0.41000000\" C1=\"-6.86475431\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.33820832\" h00=\"9.06223968\" h11=\"5.06568240\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.37613709\" h00=\"4.46587640\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01002014\" k11=\"0.02578435\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Co\" lmax=\"2\">\n<local Zeff=\"9\" radius=\"0.58000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.44045735\" h00=\"3.33497825\" h11=\"2.87315017\" h22=\"3.09102805\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.61004847\" h00=\"1.63400481\" h11=\"0.35608316\" h22=\"0.00000000\" k00=\"-0.01752129\" k11=\"0.05876575\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.29166058\" h00=\"-10.35880017\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00713682\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Cr\" lmax=\"2\">\n<local Zeff=\"6\" radius=\"0.66000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.49857767\" h00=\"2.40075556\" h11=\"2.07233658\" h22=\"2.95217934\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.71976824\" h00=\"1.14555658\" h11=\"0.27823604\" h22=\"0.00000000\" k00=\"-0.01317649\" k11=\"0.03562545\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.35434060\" h00=\"-6.61587832\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00351409\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Cs\" lmax=\"2\">\n<local Zeff=\"1\" radius=\"1.20000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"1.22473727\" h00=\"0.61152657\" h11=\"0.23983005\" h22=\"-0.29402418\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"1.28047759\" h00=\"0.24489277\" h11=\"0.22727863\" h22=\"0.00000000\" k00=\"-0.10762747\" k11=\"0.13813185\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.10752212\" h00=\"-0.54216260\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00325918\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Cu\" lmax=\"2\">\n<local Zeff=\"1\" radius=\"0.58000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.84328288\" h00=\"0.97578662\" h11=\"-0.82206962\" h22=\"-0.13323707\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"1.08954266\" h00=\"0.02457986\" h11=\"-0.24900093\" h22=\"0.00000000\" k00=\"0.01079247\" k11=\"-0.00673399\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.29160225\" h00=\"-0.06529209\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"-0.00073000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"C\" lmax=\"1\">\n<local Zeff=\"4\" radius=\"0.34883045\" C1=\"-8.51377110\" C2=\"1.22843203\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.30455321\" h00=\"9.52284179\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.23267730\" h00=\"0.00000000\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00410365\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Dy\" lmax=\"3\">\n<local Zeff=\"20\" radius=\"0.51166666\" C1=\"16.99433138\" C2=\"-0.95529792\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.44059045\" h00=\"1.94031950\" h11=\"-3.55979777\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.43464206\" h00=\"0.01431536\" h11=\"-2.04623793\" h22=\"0.00000000\" k00=\"-0.12437116\" k11=\"1.32740399\" k22=\"-1.09214158\"/>\n<nonlocal l=\"2\" radius=\"0.46722880\" h00=\"-0.66892417\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.05828571\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.26167045\" h00=\"-23.92235817\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01793827\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Er\" lmax=\"3\">\n<local Zeff=\"22\" radius=\"0.50583333\" C1=\"17.10529281\" C2=\"-1.43095318\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.41994801\" h00=\"2.14450257\" h11=\"-3.98420323\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.41445530\" h00=\"0.05408736\" h11=\"-2.29447680\" h22=\"0.00000000\" k00=\"1.25513474\" k11=\"-0.89196004\" k22=\"0.74971696\"/>\n<nonlocal l=\"2\" radius=\"0.41838497\" h00=\"-0.99900632\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.09186175\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.24912591\" h00=\"-26.69680936\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02178337\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Eu\" lmax=\"3\">\n<local Zeff=\"17\" radius=\"0.52041668\" C1=\"17.37351625\" C2=\"-0.64846778\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.46904261\" h00=\"1.76363790\" h11=\"-2.91693172\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.44590722\" h00=\"0.51804594\" h11=\"-2.13518554\" h22=\"0.00000000\" k00=\"0.25225840\" k11=\"0.58432399\" k22=\"-0.48058621\"/>\n<nonlocal l=\"2\" radius=\"0.49003840\" h00=\"-0.42611996\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.05102753\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.27840129\" h00=\"-20.94652763\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01326718\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Fe\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.61000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.45448200\" h00=\"3.01664046\" h11=\"2.58303836\" h22=\"3.25763534\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.63890282\" h00=\"1.49964199\" h11=\"0.32687369\" h22=\"0.00000000\" k00=\"-0.01490858\" k11=\"0.04979310\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.30873177\" h00=\"-9.14535371\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00572210\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"F\" lmax=\"1\">\n<local Zeff=\"7\" radius=\"0.21852465\" C1=\"-21.30736112\" C2=\"3.07286942\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.19556721\" h00=\"23.58494211\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.17426832\" h00=\"0.00000000\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01510589\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ga\" lmax=\"2\">\n<local Zeff=\"3\" radius=\"0.56000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.61079074\" h00=\"2.36932516\" h11=\"-0.24901512\" h22=\"-0.55179624\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.70459583\" h00=\"0.74630529\" h11=\"-0.51313234\" h22=\"0.00000000\" k00=\"0.02960710\" k11=\"-0.00087320\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.98257967\" h00=\"0.07543656\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00148617\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Gd\" lmax=\"3\">\n<local Zeff=\"18\" radius=\"0.51750004\" C1=\"17.51255640\" C2=\"-0.71953420\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.46201372\" h00=\"1.55185591\" h11=\"-3.06870256\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.45695327\" h00=\"-0.05834713\" h11=\"-1.69771095\" h22=\"0.00000000\" k00=\"0.53553977\" k11=\"0.02202404\" k22=\"-0.05430110\"/>\n<nonlocal l=\"2\" radius=\"0.48236813\" h00=\"-0.56260077\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.05312761\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.27338980\" h00=\"-21.92349011\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01466612\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ge\" lmax=\"2\">\n<local Zeff=\"4\" radius=\"0.54000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.49374254\" h00=\"3.82689099\" h11=\"1.10023129\" h22=\"-1.34421765\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.60106438\" h00=\"1.36251781\" h11=\"-0.62736987\" h22=\"0.00000000\" k00=\"0.04398121\" k11=\"0.00980152\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.78836851\" h00=\"0.19120485\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00291785\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"He\" lmax=\"-1\">\n<local Zeff=\"2\" radius=\"0.20000000\" C1=\"-9.11202340\" C2=\"1.69836797\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Hf\" lmax=\"2\">\n<local Zeff=\"12\" radius=\"0.56000000\" C1=\"5.13480056\" C2=\"0.52919062\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.42281035\" h00=\"2.56444209\" h11=\"-6.01373234\" h22=\"1.10975964\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.47268130\" h00=\"-1.02527490\" h11=\"-1.87254839\" h22=\"0.00000000\" k00=\"0.60750427\" k11=\"-0.33163669\" k22=\"-0.12102083\"/>\n<nonlocal l=\"2\" radius=\"0.42638752\" h00=\"1.45936326\" h11=\"-5.28276448\" h22=\"0.00000000\" k00=\"0.22211861\" k11=\"-0.12128275\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Hg\" lmax=\"2\">\n<local Zeff=\"2\" radius=\"0.64000000\" C1=\"-3.29632880\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.81210780\" h00=\"1.76504143\" h11=\"-0.46612737\" h22=\"-0.79994085\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"1.05371378\" h00=\"0.47405588\" h11=\"-0.53181582\" h22=\"0.00000000\" k00=\"0.09232980\" k11=\"-0.00111786\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.10000000\" h00=\"0.12063831\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02093075\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ho\" lmax=\"3\">\n<local Zeff=\"21\" radius=\"0.50875002\" C1=\"16.78157003\" C2=\"-1.17351448\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.43221176\" h00=\"2.05279689\" h11=\"-3.67453429\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.42013792\" h00=\"0.25329464\" h11=\"-2.35528878\" h22=\"0.00000000\" k00=\"0.89594677\" k11=\"-0.27514887\" k22=\"0.20572910\"/>\n<nonlocal l=\"2\" radius=\"0.44713057\" h00=\"-0.74286267\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.06948258\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.25499226\" h00=\"-25.19721081\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01983007\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"H\" lmax=\"-1\">\n<local Zeff=\"1\" radius=\"0.20000000\" C1=\"-4.18023680\" C2=\"0.72507482\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n</atom>\n<atom symbol=\"In\" lmax=\"2\">\n<local Zeff=\"3\" radius=\"0.61000000\" C1=\"2.86577676\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.77060197\" h00=\"1.25619360\" h11=\"-0.39725499\" h22=\"-0.27832906\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.85813160\" h00=\"0.49445864\" h11=\"-0.38078878\" h22=\"0.00000000\" k00=\"0.06636653\" k11=\"-0.00556265\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.08869090\" h00=\"0.12920778\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00444800\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ir\" lmax=\"2\">\n<local Zeff=\"9\" radius=\"0.64100000\" C1=\"10.72001591\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.50996044\" h00=\"2.44599887\" h11=\"2.81103736\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.68497052\" h00=\"0.46179182\" h11=\"1.30472563\" h22=\"0.00000000\" k00=\"-0.56534735\" k11=\"0.85962018\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.47174528\" h00=\"-4.54548411\" h11=\"-1.63542847\" h22=\"0.00000000\" k00=\"0.12719880\" k11=\"-0.15194970\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"I\" lmax=\"2\">\n<local Zeff=\"7\" radius=\"0.56000000\" C1=\"14.66182521\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.55283008\" h00=\"1.33805374\" h11=\"-0.83485108\" h22=\"-0.46743768\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.56225147\" h00=\"0.67449617\" h11=\"-0.57778676\" h22=\"0.00000000\" k00=\"0.21396743\" k11=\"0.09331314\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.79432495\" h00=\"0.22434543\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01018039\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Kr\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.50000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.41075893\" h00=\"5.91119429\" h11=\"1.96737236\" h22=\"-1.45806869\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.43025641\" h00=\"3.52435692\" h11=\"-0.69119763\" h22=\"0.00000000\" k00=\"0.08701098\" k11=\"0.08600750\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.51712005\" h00=\"0.62922850\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00926681\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"K\" lmax=\"2\">\n<local Zeff=\"1\" radius=\"0.95000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.95536395\" h00=\"0.91461200\" h11=\"0.28755094\" h22=\"-0.30022386\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"1.08641063\" h00=\"0.31546177\" h11=\"0.06819410\" h22=\"0.00000000\" k00=\"-0.00434261\" k11=\"0.01026146\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.72060608\" h00=\"-1.52951361\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00035395\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"La\" lmax=\"3\">\n<local Zeff=\"11\" radius=\"0.53500000\" C1=\"19.90930823\" C2=\"-1.47483023\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.55177542\" h00=\"1.29327192\" h11=\"-1.12181937\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.47630806\" h00=\"1.17252682\" h11=\"-0.82880986\" h22=\"0.02985728\" k00=\"0.52462281\" k11=\"-0.03090129\" k22=\"0.14207685\"/>\n<nonlocal l=\"2\" radius=\"0.62667220\" h00=\"0.32837704\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02089998\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.29931017\" h00=\"-18.26943896\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00719271\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Li\" lmax=\"1\">\n<local Zeff=\"1\" radius=\"0.78755305\" C1=\"-1.89261247\" C2=\"0.28605968\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.66637518\" h00=\"1.85881111\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"1.07930561\" h00=\"-0.00589504\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00001876\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Lu\" lmax=\"3\">\n<local Zeff=\"25\" radius=\"0.49700000\" C1=\"17.03705292\" C2=\"-1.66161023\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.39120615\" h00=\"2.18467779\" h11=\"-5.43234610\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.39389567\" h00=\"-0.71981878\" h11=\"-2.72379890\" h22=\"0.00000000\" k00=\"0.15245040\" k11=\"1.39541622\" k22=\"-1.23874407\"/>\n<nonlocal l=\"2\" radius=\"0.43651827\" h00=\"-1.17324513\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.07213023\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.23262926\" h00=\"-31.85226177\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02800562\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Mg\" lmax=\"1\">\n<local Zeff=\"2\" radius=\"0.65181169\" C1=\"-2.86429746\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.55647814\" h00=\"2.97095712\" h11=\"1.32994091\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.67756881\" h00=\"1.04988101\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00515157\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Mn\" lmax=\"2\">\n<local Zeff=\"7\" radius=\"0.64000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.48124608\" h00=\"2.79903057\" h11=\"2.48610107\" h22=\"2.56562982\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.66930432\" h00=\"1.36877564\" h11=\"0.31676337\" h22=\"0.00000000\" k00=\"-0.01368526\" k11=\"0.04293805\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.32776314\" h00=\"-7.99541784\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00453641\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Mo\" lmax=\"2\">\n<local Zeff=\"6\" radius=\"0.69900000\" C1=\"7.99586821\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.67812595\" h00=\"1.28960728\" h11=\"0.99811301\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.80077140\" h00=\"0.30141226\" h11=\"0.74161451\" h22=\"0.00000000\" k00=\"-0.10412389\" k11=\"0.15390632\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.45338393\" h00=\"-2.80970771\" h11=\"-6.82094635\" h22=\"0.00000000\" k00=\"0.06897223\" k11=\"-0.07559069\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Na\" lmax=\"1\">\n<local Zeff=\"1\" radius=\"0.88550938\" C1=\"-1.23886713\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.66110390\" h00=\"1.84727135\" h11=\"0.58200362\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.85711928\" h00=\"0.47113258\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00262341\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Nb\" lmax=\"2\">\n<local Zeff=\"5\" radius=\"0.72400000\" C1=\"4.02105754\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.69970828\" h00=\"1.53265135\" h11=\"1.42826399\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.84667164\" h00=\"0.60967518\" h11=\"0.59678759\" h22=\"0.00000000\" k00=\"-0.08081558\" k11=\"0.12524320\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.51607226\" h00=\"-2.69682993\" h11=\"-1.69496657\" h22=\"0.00000000\" k00=\"0.02565344\" k11=\"-0.03154090\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Nd\" lmax=\"3\">\n<local Zeff=\"14\" radius=\"0.52916670\" C1=\"17.81503043\" C2=\"-0.59479767\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.50299986\" h00=\"1.52910988\" h11=\"-2.15373194\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.46701290\" h00=\"0.72155346\" h11=\"-1.64749920\" h22=\"0.00000000\" k00=\"-0.21439589\" k11=\"1.10044645\" k22=\"-0.83266969\"/>\n<nonlocal l=\"2\" radius=\"0.32528958\" h00=\"-0.54324017\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.61141305\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.29474281\" h00=\"-18.52022760\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00959761\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ne\" lmax=\"1\">\n<local Zeff=\"8\" radius=\"0.19000000\" C1=\"-27.69285182\" C2=\"4.00590585\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.17948804\" h00=\"28.50609828\" h11=\"-1.07624528\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.21491271\" h00=\"-0.00008991\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01033644\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ni\" lmax=\"2\">\n<local Zeff=\"10\" radius=\"0.56000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.42539870\" h00=\"3.61965071\" h11=\"3.08896496\" h22=\"3.05859831\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.58408076\" h00=\"1.74222007\" h11=\"0.38634067\" h22=\"0.00000000\" k00=\"-0.02038398\" k11=\"0.06877038\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.27811348\" h00=\"-11.60842823\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00870832\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"N\" lmax=\"1\">\n<local Zeff=\"5\" radius=\"0.28917923\" C1=\"-12.23481988\" C2=\"1.76640728\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.25660487\" h00=\"13.55224272\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.27013369\" h00=\"0.00000000\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00313068\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Os\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.66700000\" C1=\"9.44045936\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.51030708\" h00=\"2.40236688\" h11=\"3.04670577\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.71755329\" h00=\"0.49952321\" h11=\"1.05328427\" h22=\"0.00000000\" k00=\"-0.43074635\" k11=\"0.70175157\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.48758605\" h00=\"-4.14203471\" h11=\"-1.66610013\" h22=\"0.00000000\" k00=\"0.11694065\" k11=\"-0.13976139\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"O\" lmax=\"1\">\n<local Zeff=\"6\" radius=\"0.24762086\" C1=\"-16.58031797\" C2=\"2.39570092\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.22178614\" h00=\"18.26691718\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.25682890\" h00=\"0.00000000\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00447578\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Pb\" lmax=\"2\">\n<local Zeff=\"4\" radius=\"0.61750000\" C1=\"0.75314257\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.70525860\" h00=\"1.97992741\" h11=\"-0.16495996\" h22=\"-0.80606040\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.84664106\" h00=\"0.86442030\" h11=\"-0.54096885\" h22=\"0.00000000\" k00=\"0.20771072\" k11=\"0.01294813\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.97193857\" h00=\"0.37496708\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02925557\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Pd\" lmax=\"2\">\n<local Zeff=\"10\" radius=\"0.59600000\" C1=\"5.20966476\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.58220422\" h00=\"2.41107608\" h11=\"2.31892024\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.68878713\" h00=\"1.22725330\" h11=\"0.75802053\" h22=\"0.00000000\" k00=\"-0.13690890\" k11=\"0.22080482\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.44283523\" h00=\"-4.37713124\" h11=\"0.41327105\" h22=\"0.00000000\" k00=\"0.03379697\" k11=\"-0.04779814\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Pm\" lmax=\"3\">\n<local Zeff=\"15\" radius=\"0.52625000\" C1=\"18.25172292\" C2=\"-0.49210744\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.48987856\" h00=\"1.30897757\" h11=\"-2.50775088\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.47226016\" h00=\"0.16051238\" h11=\"-1.56530527\" h22=\"0.00000000\" k00=\"-0.33995543\" k11=\"1.35901707\" k22=\"-1.14588259\"/>\n<nonlocal l=\"2\" radius=\"0.47370914\" h00=\"-0.42995241\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.06404352\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.29152653\" h00=\"-19.30505668\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01061852\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Po\" lmax=\"2\">\n<local Zeff=\"6\" radius=\"0.59250000\" C1=\"10.41173070\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.64794961\" h00=\"1.14420296\" h11=\"-0.73585149\" h22=\"-0.33938616\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.74894708\" h00=\"0.59456184\" h11=\"-0.35359482\" h22=\"0.00000000\" k00=\"0.39635435\" k11=\"-0.03146213\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.88046840\" h00=\"0.43323228\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.03388641\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Pr\" lmax=\"3\">\n<local Zeff=\"13\" radius=\"0.53208333\" C1=\"18.42473909\" C2=\"-0.65766893\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.52684996\" h00=\"1.01262106\" h11=\"-1.71798165\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.45889736\" h00=\"1.11706004\" h11=\"-1.85210872\" h22=\"0.00000000\" k00=\"0.31427984\" k11=\"0.35098185\" k22=\"-0.16525431\"/>\n<nonlocal l=\"2\" radius=\"0.74760989\" h00=\"0.01757109\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01090482\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.30077296\" h00=\"-17.89711891\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00854696\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Pt\" lmax=\"2\">\n<local Zeff=\"10\" radius=\"0.61600000\" C1=\"11.02741707\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.52013211\" h00=\"2.44743006\" h11=\"2.64035978\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.65897566\" h00=\"0.40845297\" h11=\"1.64771604\" h22=\"0.00000000\" k00=\"-0.76329581\" k11=\"1.06588325\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.45124318\" h00=\"-4.55229454\" h11=\"-2.10239568\" h22=\"0.00000000\" k00=\"0.14691239\" k11=\"-0.16930645\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"P\" lmax=\"1\">\n<local Zeff=\"5\" radius=\"0.43000000\" C1=\"-6.65421981\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.38980284\" h00=\"6.84213556\" h11=\"3.85669332\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.44079585\" h00=\"3.28260592\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00254425\" k11=\"0.01789537\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Rb\" lmax=\"2\">\n<local Zeff=\"1\" radius=\"1.09620685\" C1=\"0.84733274\" C2=\"-0.74812032\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.95569909\" h00=\"0.88746022\" h11=\"0.90308815\" h22=\"-0.00675003\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"1.15668058\" h00=\"0.46173448\" h11=\"0.33611273\" h22=\"0.00000000\" k00=\"-0.04344330\" k11=\"0.05787561\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.66432256\" h00=\"-1.36293829\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00370757\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Re\" lmax=\"2\">\n<local Zeff=\"7\" radius=\"0.69300000\" C1=\"8.18081618\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.50981621\" h00=\"2.26937936\" h11=\"3.52852934\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.74583906\" h00=\"0.49669329\" h11=\"0.92582911\" h22=\"0.00000000\" k00=\"-0.37058909\" k11=\"0.61676466\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.50095420\" h00=\"-3.68962967\" h11=\"-1.89460099\" h22=\"0.00000000\" k00=\"0.11155664\" k11=\"-0.13159543\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Rh\" lmax=\"2\">\n<local Zeff=\"9\" radius=\"0.62142857\" C1=\"5.39796233\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.59807881\" h00=\"2.24211131\" h11=\"2.15159669\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.70958567\" h00=\"1.15527830\" h11=\"0.70484635\" h22=\"0.00000000\" k00=\"-0.11435695\" k11=\"0.19392318\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.36920687\" h00=\"-1.05305819\" h11=\"-10.92395969\" h22=\"0.00000000\" k00=\"0.13503645\" k11=\"-0.12775008\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Rn\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.57000000\" C1=\"14.62918461\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.61518195\" h00=\"0.98183224\" h11=\"-1.03896274\" h22=\"-0.12045584\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.67669721\" h00=\"0.61227859\" h11=\"-0.34412231\" h22=\"0.00000000\" k00=\"0.54989620\" k11=\"-0.02376028\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.78833715\" h00=\"0.55774596\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.04548755\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ru\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.64721429\" C1=\"8.68772333\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.62565612\" h00=\"1.63786602\" h11=\"1.32933477\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.74642487\" h00=\"0.63901157\" h11=\"0.65037612\" h22=\"0.00000000\" k00=\"-0.09545431\" k11=\"0.16425697\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.44035802\" h00=\"-4.88336495\" h11=\"-3.06374629\" h22=\"0.00000000\" k00=\"0.04665238\" k11=\"-0.06180814\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Sb\" lmax=\"2\">\n<local Zeff=\"5\" radius=\"0.59000000\" C1=\"6.68022783\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.59768356\" h00=\"1.95147672\" h11=\"0.03753727\" h22=\"-0.78663058\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.67212205\" h00=\"0.97031285\" h11=\"-0.46673132\" h22=\"0.00000000\" k00=\"0.13922153\" k11=\"0.02351298\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.85655729\" h00=\"0.30010262\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00943232\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Sc\" lmax=\"2\">\n<local Zeff=\"3\" radius=\"0.75000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.59707941\" h00=\"1.83576833\" h11=\"1.73430939\" h22=\"1.41848330\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.84799438\" h00=\"0.78412669\" h11=\"0.24673297\" h22=\"0.00000000\" k00=\"-0.00846271\" k11=\"0.02091287\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.45465318\" h00=\"-3.85924078\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00142986\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Se\" lmax=\"2\">\n<local Zeff=\"6\" radius=\"0.51000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.43253108\" h00=\"5.14513084\" h11=\"2.05200900\" h22=\"-1.36920317\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.47247252\" h00=\"2.85880607\" h11=\"-0.59067050\" h22=\"0.00000000\" k00=\"0.06219585\" k11=\"0.06490734\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.61342013\" h00=\"0.43482888\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00578395\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Si\" lmax=\"1\">\n<local Zeff=\"4\" radius=\"0.44000000\" C1=\"-7.33610297\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.42273813\" h00=\"5.90692831\" h11=\"3.25819622\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.48427842\" h00=\"2.72701346\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00037280\" k11=\"0.01443697\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Sm\" lmax=\"3\">\n<local Zeff=\"16\" radius=\"0.52333337\" C1=\"17.20679172\" C2=\"-0.53280292\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.47967676\" h00=\"1.72363519\" h11=\"-2.65936731\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.49059775\" h00=\"-0.08240311\" h11=\"-1.11100858\" h22=\"0.00000000\" k00=\"-0.24029994\" k11=\"1.20086678\" k22=\"-1.05404138\"/>\n<nonlocal l=\"2\" radius=\"0.47084026\" h00=\"-0.41063034\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.06335216\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.28404049\" h00=\"-19.98429201\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01192432\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Sn\" lmax=\"2\">\n<local Zeff=\"4\" radius=\"0.60500000\" C1=\"4.61091234\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.66354369\" h00=\"1.64879146\" h11=\"-0.14197384\" h22=\"-0.57654563\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.74586492\" h00=\"0.76935544\" h11=\"-0.44507028\" h22=\"0.00000000\" k00=\"0.10393057\" k11=\"0.00505735\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.94445897\" h00=\"0.22511508\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00706571\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Sr\" lmax=\"2\">\n<local Zeff=\"2\" radius=\"1.01000000\" C1=\"0.68474888\" C2=\"-0.06212465\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.83756431\" h00=\"1.20039504\" h11=\"0.92667525\" h22=\"-0.31585755\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"1.17417825\" h00=\"0.43998339\" h11=\"0.01826685\" h22=\"0.00000000\" k00=\"0.00402188\" k11=\"0.02220714\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.74317548\" h00=\"-1.38699026\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00284555\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"S\" lmax=\"1\">\n<local Zeff=\"6\" radius=\"0.42000000\" C1=\"-6.55449184\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.36175665\" h00=\"7.90530250\" h11=\"4.47169830\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.40528502\" h00=\"3.86657900\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00537161\" k11=\"0.02206245\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ta\" lmax=\"2\">\n<local Zeff=\"5\" radius=\"0.74400000\" C1=\"3.62311645\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.58180113\" h00=\"2.00533833\" h11=\"3.02703613\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.77064628\" h00=\"0.51856664\" h11=\"1.18537841\" h22=\"0.00000000\" k00=\"-0.48563525\" k11=\"0.69514785\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.53436996\" h00=\"-2.20220040\" h11=\"-1.66667495\" h22=\"0.00000000\" k00=\"0.08671559\" k11=\"-0.09463501\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Tb\" lmax=\"3\">\n<local Zeff=\"19\" radius=\"0.51458335\" C1=\"17.60361623\" C2=\"-0.82808004\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.44869439\" h00=\"1.71848088\" h11=\"-3.43523929\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.42422013\" h00=\"0.56239978\" h11=\"-2.78182671\" h22=\"0.00000000\" k00=\"-0.00872499\" k11=\"1.14400661\" k22=\"-0.86042467\"/>\n<nonlocal l=\"2\" radius=\"0.48280866\" h00=\"-0.62580219\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.05175355\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.26825995\" h00=\"-22.91169709\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01619671\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Tc\" lmax=\"2\">\n<local Zeff=\"7\" radius=\"0.67300000\" C1=\"13.31538067\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.67761188\" h00=\"0.81921767\" h11=\"0.34845968\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.78427538\" h00=\"0.02867266\" h11=\"0.65836292\" h22=\"0.00000000\" k00=\"-0.08075975\" k11=\"0.14066787\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.51988975\" h00=\"-5.98422427\" h11=\"0.72182246\" h22=\"0.00000000\" k00=\"0.02602474\" k11=\"-0.04177619\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Te\" lmax=\"2\">\n<local Zeff=\"6\" radius=\"0.57500000\" C1=\"9.38708481\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.55645602\" h00=\"2.04689031\" h11=\"-0.02933260\" h22=\"-0.88111927\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.61526187\" h00=\"1.03347754\" h11=\"-0.48117240\" h22=\"0.00000000\" k00=\"0.17299713\" k11=\"0.05064130\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.80510072\" h00=\"0.31741073\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01080862\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ti\" lmax=\"2\">\n<local Zeff=\"4\" radius=\"0.72000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.52841076\" h00=\"1.86661330\" h11=\"1.44023325\" h22=\"3.65817177\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.79114554\" h00=\"0.96791577\" h11=\"0.26068669\" h22=\"0.00000000\" k00=\"-0.00933253\" k11=\"0.02529075\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.40871178\" h00=\"-4.82645635\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00200953\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Tl\" lmax=\"2\">\n<local Zeff=\"3\" radius=\"0.63000000\" C1=\"-1.23584552\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.75400547\" h00=\"1.87576571\" h11=\"-0.30367964\" h22=\"-0.78133689\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.90374170\" h00=\"0.75966830\" h11=\"-0.58672051\" h22=\"0.00000000\" k00=\"0.16864149\" k11=\"0.00445921\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.06351212\" h00=\"0.24761396\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02294091\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Tm\" lmax=\"3\">\n<local Zeff=\"23\" radius=\"0.50291669\" C1=\"17.24729254\" C2=\"-1.62769708\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.41337286\" h00=\"1.94719583\" h11=\"-4.12155644\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.40992301\" h00=\"-0.09449281\" h11=\"-2.22408718\" h22=\"0.00000000\" k00=\"2.04536983\" k11=\"-2.34723738\" k22=\"1.90273579\"/>\n<nonlocal l=\"2\" radius=\"0.39287009\" h00=\"-1.35330770\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.11929895\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.24391696\" h00=\"-28.10415875\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02383347\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"V\" lmax=\"2\">\n<local Zeff=\"5\" radius=\"0.69000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.51470421\" h00=\"2.20866978\" h11=\"1.89676307\" h22=\"3.07637723\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.74350381\" h00=\"1.11575121\" h11=\"0.28664887\" h22=\"0.00000000\" k00=\"-0.01097329\" k11=\"0.03081565\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.37488959\" h00=\"-5.84163317\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00271707\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"W\" lmax=\"2\">\n<local Zeff=\"6\" radius=\"0.71900000\" C1=\"4.05844991\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.58246289\" h00=\"2.16116556\" h11=\"2.74149991\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.74230741\" h00=\"0.60097339\" h11=\"1.29994284\" h22=\"0.00000000\" k00=\"-0.50979956\" k11=\"0.75173934\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.53495887\" h00=\"-2.51706347\" h11=\"-0.78913661\" h22=\"0.00000000\" k00=\"0.07577234\" k11=\"-0.08619292\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Xe\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.56000000\" C1=\"12.73427972\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.50737118\" h00=\"2.23645069\" h11=\"-0.40355073\" h22=\"-1.13250655\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.54102371\" h00=\"1.13004299\" h11=\"-0.75276413\" h22=\"0.00000000\" k00=\"0.23660318\" k11=\"0.10847345\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.72982111\" h00=\"0.28013078\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01336223\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Yb\" lmax=\"3\">\n<local Zeff=\"24\" radius=\"0.50000000\" C1=\"17.35714421\" C2=\"-1.77391642\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.40230918\" h00=\"2.12077095\" h11=\"-4.80298999\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.41435774\" h00=\"-0.92321216\" h11=\"-1.67853959\" h22=\"0.00000000\" k00=\"-0.34946961\" k11=\"2.07429479\" k22=\"-1.81429663\"/>\n<nonlocal l=\"2\" radius=\"0.44402468\" h00=\"-0.88996733\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.07007567\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.23829829\" h00=\"-29.93285367\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02571848\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Y\" lmax=\"2\">\n<local Zeff=\"3\" radius=\"0.90000000\" C1=\"-0.34389132\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.78245699\" h00=\"1.52065466\" h11=\"1.48436836\" h22=\"-0.18901334\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.94986375\" h00=\"0.78095000\" h11=\"0.36873894\" h22=\"0.00000000\" k00=\"-0.04333632\" k11=\"0.07998905\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.65385060\" h00=\"-1.25692979\" h11=\"-0.07536797\" h22=\"0.00000000\" k00=\"0.00919822\" k11=\"-0.01165653\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Zn\" lmax=\"2\">\n<local Zeff=\"2\" radius=\"0.57000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.64071219\" h00=\"2.08855724\" h11=\"-0.21827024\" h22=\"-0.94131659\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.96760483\" h00=\"0.16354600\" h11=\"-0.22708635\" h22=\"0.00000000\" k00=\"0.01213948\" k11=\"-0.00487568\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.33035200\" h00=\"0.01048578\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00022546\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Zr\" lmax=\"2\">\n<local Zeff=\"4\" radius=\"0.75000000\" C1=\"-0.78261098\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.64999821\" h00=\"1.73987747\" h11=\"2.38820846\" h22=\"1.20534876\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.87440769\" h00=\"1.01829381\" h11=\"0.52822332\" h22=\"0.00000000\" k00=\"-0.05748649\" k11=\"0.10449452\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.63066761\" h00=\"-1.17391057\" h11=\"0.21217861\" h22=\"0.00000000\" k00=\"0.00938027\" k11=\"-0.01197300\" k22=\"0.00000000\"/>\n</atom>\n"
  },
  {
    "path": "src/apps/moldft/gth_pbe.xml",
    "content": "<?xml version=\"1.0\" ?>\n<name>\n GTH\n </name>\n<atom symbol=\"Ag\" lmax=\"2\">\n<local Zeff=\"11\" radius=\"0.57000000\" C1=\"0.03341912\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.52704461\" h00=\"9.58204535\" h11=\"8.43071259\" h22=\"2.04333882\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.62911218\" h00=\"3.87401904\" h11=\"2.06129925\" h22=\"0.00000000\" k00=\"0.25749375\" k11=\"0.48677875\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.40538186\" h00=\"-2.72495276\" h11=\"0.49159781\" h22=\"0.00000000\" k00=\"-0.04679548\" k11=\"-0.09845003\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Al\" lmax=\"1\">\n<local Zeff=\"3\" radius=\"0.45000000\" C1=\"-7.55476126\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.48743529\" h00=\"6.95993832\" h11=\"2.43847659\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.56218949\" h00=\"1.86529857\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01323750\" k11=\"0.01496851\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ar\" lmax=\"1\">\n<local Zeff=\"8\" radius=\"0.40000000\" C1=\"-7.10000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.31881468\" h00=\"17.25203807\" h11=\"7.21083447\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.35337019\" h00=\"4.97421551\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.05709588\" k11=\"0.04647447\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"As\" lmax=\"2\">\n<local Zeff=\"5\" radius=\"0.52000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.45554957\" h00=\"5.52067327\" h11=\"-1.77119320\" h22=\"-2.17457180\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.55460557\" h00=\"1.02179156\" h11=\"-0.74448925\" h22=\"0.00000000\" k00=\"0.07884496\" k11=\"0.03914703\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.70368872\" h00=\"0.31479504\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00335570\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"At\" lmax=\"2\">\n<local Zeff=\"7\" radius=\"0.58000000\" C1=\"14.21716853\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.66580683\" h00=\"-0.37891203\" h11=\"-0.39996168\" h22=\"0.57147130\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.65241195\" h00=\"0.26704745\" h11=\"-0.38599845\" h22=\"0.00000000\" k00=\"0.66100264\" k11=\"0.14102275\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.85406059\" h00=\"0.45259467\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.03023997\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Au\" lmax=\"2\">\n<local Zeff=\"11\" radius=\"0.59000000\" C1=\"10.51717881\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.54384733\" h00=\"5.78681103\" h11=\"2.90561495\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.60917298\" h00=\"4.28404873\" h11=\"4.81720962\" h22=\"0.00000000\" k00=\"1.21911104\" k11=\"2.81827264\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.43730922\" h00=\"-7.40328124\" h11=\"-3.41323811\" h22=\"0.00000000\" k00=\"-0.12113041\" k11=\"-0.29760507\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Au-sc\" lmax=\"2\">\n<local Zeff=\"19\" radius=\"0.49000000\" C1=\"8.36945885\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.29008402\" h00=\"-5.98869002\" h11=\"-58.38556050\" h22=\"-31.10199477\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.36150576\" h00=\"-5.87695332\" h11=\"-0.72513863\" h22=\"4.92291022\" k00=\"0.18370022\" k11=\"-6.48265855\" k22=\"-3.39068639\"/>\n<nonlocal l=\"2\" radius=\"0.34037313\" h00=\"-8.80458432\" h11=\"-10.76282032\" h22=\"0.00000000\" k00=\"0.15609346\" k11=\"-0.06874145\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ba\" lmax=\"3\">\n<local Zeff=\"10\" radius=\"0.54000000\" C1=\"24.52678070\" C2=\"-2.46867001\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.49206839\" h00=\"0.09515093\" h11=\"-1.50958357\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.39148930\" h00=\"0.80018261\" h11=\"1.91306979\" h22=\"0.00000000\" k00=\"1.38677712\" k11=\"3.55539820\" k22=\"0.92706460\"/>\n<nonlocal l=\"2\" radius=\"0.67217348\" h00=\"0.38853100\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01663250\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.30049773\" h00=\"-19.65379452\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00607912\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Be\" lmax=\"-1\">\n<local Zeff=\"4\" radius=\"0.32500000\" C1=\"-24.06746684\" C2=\"17.27902186\" C3=\"-3.33910629\" C4=\"0.16554912\"/>\n</atom>\n<atom symbol=\"Bi\" lmax=\"2\">\n<local Zeff=\"5\" radius=\"0.60500000\" C1=\"7.94575692\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.58223216\" h00=\"0.64373527\" h11=\"-5.24479711\" h22=\"-2.95235275\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.76639400\" h00=\"0.21253292\" h11=\"-0.44942585\" h22=\"0.00000000\" k00=\"0.33910609\" k11=\"0.02494923\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.96565479\" h00=\"0.34729822\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02035678\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Br\" lmax=\"2\">\n<local Zeff=\"7\" radius=\"0.50000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.43803892\" h00=\"6.07855632\" h11=\"-2.44090020\" h22=\"-2.53792841\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.45313561\" h00=\"2.45930381\" h11=\"-0.61852985\" h22=\"0.00000000\" k00=\"0.17300601\" k11=\"0.11781131\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.56771383\" h00=\"0.55926645\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00654644\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"B\" lmax=\"1\">\n<local Zeff=\"3\" radius=\"0.41899145\" C1=\"-5.85946171\" C2=\"0.90375643\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.37132046\" h00=\"6.29728018\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.36456308\" h00=\"0.00000000\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00085498\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ca\" lmax=\"2\">\n<local Zeff=\"10\" radius=\"0.39000000\" C1=\"-4.16707222\" C2=\"-1.58379781\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.28935572\" h00=\"20.53187635\" h11=\"9.20451387\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.32788206\" h00=\"5.80560513\" h11=\"0.50730782\" h22=\"0.00000000\" k00=\"0.15992263\" k11=\"0.23626331\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.67961713\" h00=\"0.05806826\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00046474\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Cd\" lmax=\"2\">\n<local Zeff=\"12\" radius=\"0.55000000\" C1=\"3.63395858\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.49127900\" h00=\"10.11138228\" h11=\"11.33558598\" h22=\"3.69828191\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.59970999\" h00=\"4.00148729\" h11=\"2.22910288\" h22=\"0.00000000\" k00=\"0.28931079\" k11=\"0.53888253\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.37787256\" h00=\"-6.13703223\" h11=\"-1.74133209\" h22=\"0.00000000\" k00=\"-0.06128372\" k11=\"-0.12938854\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Cl\" lmax=\"1\">\n<local Zeff=\"7\" radius=\"0.41000000\" C1=\"-6.39208181\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.33953864\" h00=\"15.21898983\" h11=\"6.37044208\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.37847416\" h00=\"4.33877527\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.04528923\" k11=\"0.03854719\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Co\" lmax=\"2\">\n<local Zeff=\"17\" radius=\"0.35500000\" C1=\"4.82819736\" C2=\"0.36814301\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.27680076\" h00=\"-0.58449582\" h11=\"-11.98855242\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.26815783\" h00=\"-6.85195349\" h11=\"-6.72082376\" h22=\"0.00000000\" k00=\"0.03467390\" k11=\"-0.16014479\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.22258414\" h00=\"-12.33315019\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01143107\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Cr\" lmax=\"2\">\n<local Zeff=\"14\" radius=\"0.37000000\" C1=\"5.69965764\" C2=\"-0.69548599\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.31393442\" h00=\"2.86995474\" h11=\"-6.42199570\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.24086624\" h00=\"-4.47620867\" h11=\"-8.67464650\" h22=\"0.00000000\" k00=\"0.19042071\" k11=\"0.05708687\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.22028633\" h00=\"-11.19711641\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00894423\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Cs\" lmax=\"3\">\n<local Zeff=\"9\" radius=\"0.54000000\" C1=\"33.31331676\" C2=\"-2.92121670\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.46189568\" h00=\"-3.32292700\" h11=\"-3.17023488\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.36635860\" h00=\"-4.95076405\" h11=\"-0.99436259\" h22=\"0.00000000\" k00=\"1.47901467\" k11=\"6.89583701\" k22=\"1.20482534\"/>\n<nonlocal l=\"2\" radius=\"0.76150193\" h00=\"0.19840723\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01060475\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.59701503\" h00=\"-1.55056693\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00322244\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Cu\" lmax=\"2\">\n<local Zeff=\"11\" radius=\"0.53000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.43135505\" h00=\"9.69380507\" h11=\"11.50177396\" h22=\"3.96752127\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.56139155\" h00=\"2.54547330\" h11=\"0.92839352\" h22=\"0.00000000\" k00=\"0.09147262\" k11=\"0.13305111\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.26455485\" h00=\"-12.82861406\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01046090\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"C\" lmax=\"1\">\n<local Zeff=\"4\" radius=\"0.33847124\" C1=\"-8.80367398\" C2=\"1.33921085\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.30257575\" h00=\"9.62248665\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.29150694\" h00=\"0.00000000\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00207319\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Fe\" lmax=\"2\">\n<local Zeff=\"16\" radius=\"0.36000000\" C1=\"6.75678916\" C2=\"-0.22883251\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.27826303\" h00=\"0.62950570\" h11=\"-10.21581002\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.25138338\" h00=\"-7.93213293\" h11=\"-9.10730654\" h22=\"0.00000000\" k00=\"0.09786820\" k11=\"-0.09548555\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.22285578\" h00=\"-12.38579937\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01036288\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"F\" lmax=\"1\">\n<local Zeff=\"7\" radius=\"0.21492959\" C1=\"-21.57302836\" C2=\"3.19977615\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.19468402\" h00=\"23.74354045\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.18615608\" h00=\"0.00000000\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01261401\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ga\" lmax=\"2\">\n<local Zeff=\"3\" radius=\"0.56000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.56586645\" h00=\"2.21575051\" h11=\"-2.57004845\" h22=\"-1.55882652\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.64671613\" h00=\"0.31122394\" h11=\"-0.72580366\" h22=\"0.00000000\" k00=\"0.04378597\" k11=\"0.01375235\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.99942484\" h00=\"0.08951951\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00090534\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ga-sc\" lmax=\"2\">\n<local Zeff=\"13\" radius=\"0.49000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.41677723\" h00=\"10.47568975\" h11=\"7.77017809\" h22=\"1.78441545\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.56962652\" h00=\"1.77798534\" h11=\"-0.23174439\" h22=\"0.00000000\" k00=\"0.07922219\" k11=\"0.06244715\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.23812650\" h00=\"-16.24868022\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01545711\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ge\" lmax=\"2\">\n<local Zeff=\"4\" radius=\"0.54000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.42186518\" h00=\"7.51024121\" h11=\"-1.59588819\" h22=\"-2.96746735\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.56752887\" h00=\"0.91385969\" h11=\"-0.64707163\" h22=\"0.00000000\" k00=\"0.07515712\" k11=\"0.04053983\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.81391394\" h00=\"0.19717731\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00209896\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"He\" lmax=\"-1\">\n<local Zeff=\"2\" radius=\"0.20000000\" C1=\"-9.12214383\" C2=\"1.70270770\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Hf\" lmax=\"2\">\n<local Zeff=\"12\" radius=\"0.56000000\" C1=\"15.52236567\" C2=\"-2.43356678\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.31182849\" h00=\"-10.91013059\" h11=\"-59.67292892\" h22=\"-30.66209376\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.36196660\" h00=\"-9.65170049\" h11=\"-10.91315264\" h22=\"0.00000000\" k00=\"0.25433226\" k11=\"-9.16410141\" k22=\"-5.80046050\"/>\n<nonlocal l=\"2\" radius=\"0.41579070\" h00=\"-2.74891464\" h11=\"-0.54578072\" h22=\"0.00000000\" k00=\"0.07470137\" k11=\"-0.01792510\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Hg\" lmax=\"2\">\n<local Zeff=\"12\" radius=\"0.57000000\" C1=\"8.46784734\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.52978669\" h00=\"7.37124306\" h11=\"3.83418126\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.63516596\" h00=\"3.55116141\" h11=\"2.03857383\" h22=\"0.00000000\" k00=\"0.97627823\" k11=\"2.45527872\" k22=\"0.93325792\"/>\n<nonlocal l=\"2\" radius=\"0.40798543\" h00=\"-8.61398015\" h11=\"-5.67804069\" h22=\"0.00000000\" k00=\"-0.09794385\" k11=\"-0.29710284\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"H\" lmax=\"-1\">\n<local Zeff=\"1\" radius=\"0.20000000\" C1=\"-4.17890044\" C2=\"0.72446331\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n</atom>\n<atom symbol=\"In\" lmax=\"2\">\n<local Zeff=\"3\" radius=\"0.61000000\" C1=\"5.08622849\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.68888318\" h00=\"0.56228376\" h11=\"-2.07195476\" h22=\"-0.98562993\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.76370974\" h00=\"0.10892299\" h11=\"-0.50082970\" h22=\"0.00000000\" k00=\"0.10576704\" k11=\"0.02038617\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.14391192\" h00=\"0.11683948\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00226126\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"In-sc\" lmax=\"2\">\n<local Zeff=\"13\" radius=\"0.53000000\" C1=\"3.32478546\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.47949521\" h00=\"11.11716024\" h11=\"10.93727471\" h22=\"3.08815074\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.56993285\" h00=\"4.70061419\" h11=\"2.62326557\" h22=\"0.00000000\" k00=\"0.34177179\" k11=\"0.64129631\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.37706890\" h00=\"-4.00228785\" h11=\"0.95261614\" h22=\"0.00000000\" k00=\"-0.07755078\" k11=\"-0.15112443\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ir\" lmax=\"2\">\n<local Zeff=\"9\" radius=\"0.64100000\" C1=\"14.58181397\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.51010474\" h00=\"3.71524999\" h11=\"1.63005794\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.68489160\" h00=\"1.91910152\" h11=\"2.24360769\" h22=\"0.00000000\" k00=\"0.67464477\" k11=\"1.34671763\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.47173508\" h00=\"-8.85603130\" h11=\"-3.59472915\" h22=\"0.00000000\" k00=\"-0.15231734\" k11=\"-0.32450753\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ir-sc\" lmax=\"2\">\n<local Zeff=\"17\" radius=\"0.51000000\" C1=\"13.41080576\" C2=\"-2.34194822\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.38726411\" h00=\"-2.51628491\" h11=\"6.24173509\" h22=\"9.58101430\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.34608307\" h00=\"-6.52615069\" h11=\"-8.70040455\" h22=\"0.00000000\" k00=\"0.31484605\" k11=\"-9.23888776\" k22=\"-5.45134725\"/>\n<nonlocal l=\"2\" radius=\"0.37881290\" h00=\"-0.85595250\" h11=\"1.33272289\" h22=\"0.00000000\" k00=\"0.10055806\" k11=\"-0.00382722\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"I\" lmax=\"2\">\n<local Zeff=\"7\" radius=\"0.56000000\" C1=\"8.20710157\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.53192813\" h00=\"2.30814581\" h11=\"-2.85610882\" h22=\"-1.96568498\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.58918244\" h00=\"0.90648219\" h11=\"-0.50295032\" h22=\"0.00000000\" k00=\"0.27569304\" k11=\"0.12578393\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.73972147\" h00=\"0.47919458\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01290065\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Kr\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.50000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.42165717\" h00=\"6.46530358\" h11=\"-3.13938870\" h22=\"-3.07941607\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.43374437\" h00=\"2.60116535\" h11=\"-0.83429715\" h22=\"0.00000000\" k00=\"0.19991623\" k11=\"0.13022759\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.52469073\" h00=\"0.63559472\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00829734\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"K\" lmax=\"1\">\n<local Zeff=\"9\" radius=\"0.40000000\" C1=\"-3.36355184\" C2=\"-1.08652975\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.30531772\" h00=\"17.85062321\" h11=\"7.25880826\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.31648432\" h00=\"7.33378021\" h11=\"2.91182945\" h22=\"0.00000000\" k00=\"0.08936707\" k11=\"0.08265956\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"La\" lmax=\"3\">\n<local Zeff=\"11\" radius=\"0.53500000\" C1=\"20.68980469\" C2=\"-1.70327035\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.56144723\" h00=\"-0.02823977\" h11=\"-1.39246430\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.47517309\" h00=\"0.26802268\" h11=\"-0.79664160\" h22=\"0.00000000\" k00=\"0.64154939\" k11=\"0.51857409\" k22=\"0.14207685\"/>\n<nonlocal l=\"2\" radius=\"0.62908399\" h00=\"0.38022718\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02046237\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"3\" radius=\"0.29911708\" h00=\"-18.44354886\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00738047\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Li\" lmax=\"-1\">\n<local Zeff=\"3\" radius=\"0.40000000\" C1=\"-14.08115455\" C2=\"9.62621962\" C3=\"-1.78361605\" C4=\"0.08515207\"/>\n</atom>\n<atom symbol=\"Mg\" lmax=\"1\">\n<local Zeff=\"2\" radius=\"0.57696017\" C1=\"-2.69040744\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.59392350\" h00=\"3.50321099\" h11=\"0.92534825\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.70715728\" h00=\"0.83115848\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00414275\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Mg-sc\" lmax=\"1\">\n<local Zeff=\"10\" radius=\"0.19275787\" C1=\"-20.57539077\" C2=\"3.04016732\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.14140682\" h00=\"41.04729209\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.10293187\" h00=\"-9.98562566\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.10308305\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Mn\" lmax=\"2\">\n<local Zeff=\"15\" radius=\"0.36500000\" C1=\"6.09304649\" C2=\"-0.44646948\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.29568592\" h00=\"1.88711984\" h11=\"-8.20664074\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.24561261\" h00=\"-6.57002452\" h11=\"-9.44603874\" h22=\"0.00000000\" k00=\"0.18314922\" k11=\"0.05529931\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.22252279\" h00=\"-11.61205092\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00951135\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Mo\" lmax=\"2\">\n<local Zeff=\"14\" radius=\"0.43000000\" C1=\"28.60936832\" C2=\"-4.72180336\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.34521579\" h00=\"0.14630305\" h11=\"-3.56573312\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.41688762\" h00=\"-0.19078495\" h11=\"0.86226156\" h22=\"0.00000000\" k00=\"0.10103602\" k11=\"-0.18650767\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.42050785\" h00=\"1.21681419\" h11=\"3.04616234\" h22=\"0.00000000\" k00=\"0.00136004\" k11=\"-0.02578317\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Na\" lmax=\"1\">\n<local Zeff=\"9\" radius=\"0.23652322\" C1=\"0.29510499\" C2=\"-0.91388488\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.14356046\" h00=\"34.60149228\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.12993224\" h00=\"-14.27746168\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.05324287\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Nb\" lmax=\"2\">\n<local Zeff=\"13\" radius=\"0.46000000\" C1=\"26.27526252\" C2=\"-4.57803146\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.35116942\" h00=\"-1.04371870\" h11=\"-4.23175592\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.40546040\" h00=\"-0.66246647\" h11=\"1.07415738\" h22=\"0.00000000\" k00=\"0.18261561\" k11=\"-0.05326929\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.42212155\" h00=\"1.49409323\" h11=\"3.88929925\" h22=\"0.00000000\" k00=\"0.00621330\" k11=\"-0.01734639\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ne\" lmax=\"1\">\n<local Zeff=\"8\" radius=\"0.19000000\" C1=\"-27.12015973\" C2=\"4.36044962\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.17605938\" h00=\"28.17737082\" h11=\"-1.07624528\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.19547452\" h00=\"-0.23629360\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01296979\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ni\" lmax=\"2\">\n<local Zeff=\"18\" radius=\"0.35000000\" C1=\"2.10216598\" C2=\"0.64848387\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.26129530\" h00=\"0.62265847\" h11=\"-12.87150729\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.22425346\" h00=\"-11.14270822\" h11=\"-14.70686134\" h22=\"0.00000000\" k00=\"0.13310966\" k11=\"-0.17947154\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.21534825\" h00=\"-12.62814550\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01349066\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"N\" lmax=\"1\">\n<local Zeff=\"5\" radius=\"0.28379051\" C1=\"-12.41522559\" C2=\"1.86809592\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.25540500\" h00=\"13.63026257\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.24549453\" h00=\"0.00000000\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00414750\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Os\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.66700000\" C1=\"13.07904899\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.49576015\" h00=\"4.35033878\" h11=\"1.93236403\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.70116140\" h00=\"1.81669550\" h11=\"2.36425382\" h22=\"0.00000000\" k00=\"0.65252379\" k11=\"1.37488239\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.47117333\" h00=\"-10.99598697\" h11=\"-6.77975387\" h22=\"0.00000000\" k00=\"-0.12910182\" k11=\"-0.30318133\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Os-sc\" lmax=\"2\">\n<local Zeff=\"16\" radius=\"0.52000000\" C1=\"13.46303008\" C2=\"-2.24116983\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.39012207\" h00=\"-3.27416829\" h11=\"2.82653464\" h22=\"7.40038577\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.34945025\" h00=\"-6.89928214\" h11=\"-8.90881017\" h22=\"0.00000000\" k00=\"0.54785930\" k11=\"-7.17756040\" k22=\"-4.30518011\"/>\n<nonlocal l=\"2\" radius=\"0.39284207\" h00=\"-0.94268282\" h11=\"1.22638558\" h22=\"0.00000000\" k00=\"0.08081206\" k11=\"-0.01844305\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"O\" lmax=\"1\">\n<local Zeff=\"6\" radius=\"0.24455430\" C1=\"-16.66721480\" C2=\"2.48731132\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.22095592\" h00=\"18.33745811\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.21133247\" h00=\"0.00000000\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00755927\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Pb\" lmax=\"2\">\n<local Zeff=\"4\" radius=\"0.61750000\" C1=\"4.67238428\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.62235881\" h00=\"0.87991768\" h11=\"-5.01469016\" h22=\"-2.93320421\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.81200202\" h00=\"0.15345679\" h11=\"-0.56663958\" h22=\"0.00000000\" k00=\"0.27466972\" k11=\"0.02728312\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.02501525\" h00=\"0.30170206\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01870296\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Pd\" lmax=\"2\">\n<local Zeff=\"10\" radius=\"0.59600000\" C1=\"5.29987401\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.59194990\" h00=\"5.30819456\" h11=\"2.66252027\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.66628526\" h00=\"2.73458446\" h11=\"1.73574237\" h22=\"0.00000000\" k00=\"0.20640805\" k11=\"0.42343942\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.43851839\" h00=\"-3.71978832\" h11=\"0.91549223\" h22=\"0.00000000\" k00=\"-0.06113102\" k11=\"-0.11365198\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Pd-sc\" lmax=\"2\">\n<local Zeff=\"18\" radius=\"0.41000000\" C1=\"26.78365917\" C2=\"-4.93130594\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.33797077\" h00=\"-0.71872875\" h11=\"-5.66083840\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.41519591\" h00=\"-0.04624449\" h11=\"1.27545040\" h22=\"0.00000000\" k00=\"-0.44546453\" k11=\"-1.04191011\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.44027049\" h00=\"1.63916358\" h11=\"3.50791241\" h22=\"0.00000000\" k00=\"-0.03119207\" k11=\"-0.07031576\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Po\" lmax=\"2\">\n<local Zeff=\"6\" radius=\"0.59250000\" C1=\"8.13432566\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.80422357\" h00=\"0.32633408\" h11=\"0.72287456\" h22=\"1.08227094\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.81703652\" h00=\"0.15801481\" h11=\"-0.44406387\" h22=\"0.00000000\" k00=\"0.23215645\" k11=\"-0.02971692\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.89014943\" h00=\"0.46253238\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02706723\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Pt\" lmax=\"2\">\n<local Zeff=\"10\" radius=\"0.61600000\" C1=\"11.31363525\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.55090426\" h00=\"4.73349110\" h11=\"2.30390096\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.67413781\" h00=\"2.53479850\" h11=\"2.10383553\" h22=\"0.00000000\" k00=\"0.68131890\" k11=\"1.34576135\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.45739243\" h00=\"-7.26401101\" h11=\"-2.90125318\" h22=\"0.00000000\" k00=\"-0.13179902\" k11=\"-0.29864437\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Pt-sc\" lmax=\"2\">\n<local Zeff=\"18\" radius=\"0.50000000\" C1=\"8.81432324\" C2=\"-0.29250943\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.29800221\" h00=\"-5.96838498\" h11=\"-53.68763413\" h22=\"-28.26043301\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.36017182\" h00=\"-6.66865904\" h11=\"-7.20766072\" h22=\"1.28980604\" k00=\"0.35156689\" k11=\"-6.25743244\" k22=\"-3.46565992\"/>\n<nonlocal l=\"2\" radius=\"0.34053206\" h00=\"-8.58990455\" h11=\"-10.67007542\" h22=\"0.00000000\" k00=\"0.18032724\" k11=\"-0.03312040\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"P\" lmax=\"1\">\n<local Zeff=\"5\" radius=\"0.43000000\" C1=\"-5.87594327\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.39637742\" h00=\"11.00886207\" h11=\"4.48021042\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.44829838\" h00=\"3.05606416\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.02606888\" k11=\"0.02506591\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Rb\" lmax=\"2\">\n<local Zeff=\"9\" radius=\"0.49000000\" C1=\"5.66908644\" C2=\"-0.81162703\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.28180292\" h00=\"21.39073240\" h11=\"10.42951394\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.28570828\" h00=\"12.25634859\" h11=\"14.43350807\" h22=\"0.00000000\" k00=\"1.41180234\" k11=\"3.09355639\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.54179651\" h00=\"0.34566626\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00696032\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Re\" lmax=\"2\">\n<local Zeff=\"7\" radius=\"0.69300000\" C1=\"11.96194160\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.46331539\" h00=\"6.08700876\" h11=\"2.82905901\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.70964824\" h00=\"1.81506156\" h11=\"2.78543463\" h22=\"0.00000000\" k00=\"0.69313998\" k11=\"1.55350293\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.47606454\" h00=\"-12.39371002\" h11=\"-9.07828707\" h22=\"0.00000000\" k00=\"-0.11238482\" k11=\"-0.28964148\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Re-sc\" lmax=\"2\">\n<local Zeff=\"15\" radius=\"0.53000000\" C1=\"13.46263143\" C2=\"-2.23492240\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.39380077\" h00=\"-3.71748055\" h11=\"0.57237640\" h22=\"5.85292506\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.35253332\" h00=\"-7.05340425\" h11=\"-8.95310922\" h22=\"0.00000000\" k00=\"0.48781828\" k11=\"-7.43361600\" k22=\"-4.50207359\"/>\n<nonlocal l=\"2\" radius=\"0.40186765\" h00=\"-0.90002359\" h11=\"1.30303749\" h22=\"0.00000000\" k00=\"0.07649146\" k11=\"-0.01473637\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Rh\" lmax=\"2\">\n<local Zeff=\"9\" radius=\"0.61900948\" C1=\"4.70454397\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.61332681\" h00=\"4.99320515\" h11=\"2.49133773\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.69365000\" h00=\"2.53237506\" h11=\"1.51553449\" h22=\"0.00000000\" k00=\"0.18034883\" k11=\"0.34619385\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.37003772\" h00=\"-16.88260377\" h11=\"-16.68888922\" h22=\"0.00000000\" k00=\"-0.03265865\" k11=\"-0.12417454\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Rh-sc\" lmax=\"2\">\n<local Zeff=\"17\" radius=\"0.42000000\" C1=\"26.20679340\" C2=\"-4.93738335\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.34544622\" h00=\"-0.45248232\" h11=\"-5.02558885\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.37838014\" h00=\"-0.94111242\" h11=\"0.00674351\" h22=\"0.00000000\" k00=\"0.18648086\" k11=\"-0.17412304\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.43374725\" h00=\"1.57423622\" h11=\"3.41548166\" h22=\"0.00000000\" k00=\"-0.02161325\" k11=\"-0.05753100\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Rn\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.57000000\" C1=\"16.20061781\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.63480802\" h00=\"-0.58199405\" h11=\"-0.55313531\" h22=\"0.60946004\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.64710877\" h00=\"0.16927880\" h11=\"-0.36108613\" h22=\"0.00000000\" k00=\"0.64375030\" k11=\"0.06990310\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.80634271\" h00=\"0.51103874\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.03732898\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ru\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.61211332\" C1=\"5.04489332\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.64215040\" h00=\"4.62556355\" h11=\"2.32811359\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.67936654\" h00=\"3.23395238\" h11=\"2.86457842\" h22=\"0.00000000\" k00=\"0.24365860\" k11=\"0.52351826\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.38059720\" h00=\"-15.53165455\" h11=\"-15.39878349\" h22=\"0.00000000\" k00=\"-0.02436658\" k11=\"-0.10498229\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ru-sc\" lmax=\"2\">\n<local Zeff=\"16\" radius=\"0.43000000\" C1=\"26.83239104\" C2=\"-5.05049720\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.34135508\" h00=\"-0.55504091\" h11=\"-4.79667650\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.42827085\" h00=\"0.10677508\" h11=\"1.51164335\" h22=\"0.00000000\" k00=\"-0.15600415\" k11=\"-0.57561565\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.43814779\" h00=\"1.50921742\" h11=\"3.33711002\" h22=\"0.00000000\" k00=\"-0.01536873\" k11=\"-0.04766818\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Sb\" lmax=\"2\">\n<local Zeff=\"5\" radius=\"0.59000000\" C1=\"7.92852084\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.55613636\" h00=\"1.43047790\" h11=\"-3.13013340\" h22=\"-1.89206570\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.62275507\" h00=\"0.56147233\" h11=\"-0.36069773\" h22=\"0.00000000\" k00=\"0.23747176\" k11=\"0.12905847\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.88948576\" h00=\"0.27086864\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00696671\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Sc\" lmax=\"2\">\n<local Zeff=\"11\" radius=\"0.38500000\" C1=\"8.21490030\" C2=\"-0.55705910\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.36361108\" h00=\"2.64653339\" h11=\"-3.90020259\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.24389778\" h00=\"-2.63482265\" h11=\"-9.45642421\" h22=\"0.00000000\" k00=\"0.20196646\" k11=\"0.06861858\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.25320575\" h00=\"-8.16594769\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00480094\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Se\" lmax=\"2\">\n<local Zeff=\"6\" radius=\"0.51000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.43246005\" h00=\"6.51810990\" h11=\"-1.65797833\" h22=\"-2.45133498\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.47049162\" h00=\"2.28126223\" h11=\"-0.43227055\" h22=\"0.00000000\" k00=\"0.15386757\" k11=\"0.11250945\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.62560034\" h00=\"0.43979948\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00489231\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Si\" lmax=\"1\">\n<local Zeff=\"4\" radius=\"0.44000000\" C1=\"-6.26928833\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.43563383\" h00=\"8.95174150\" h11=\"3.49378060\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.49794218\" h00=\"2.43127673\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01877687\" k11=\"0.01940188\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Sn\" lmax=\"2\">\n<local Zeff=\"4\" radius=\"0.60500000\" C1=\"6.26678230\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.56643732\" h00=\"1.57118124\" h11=\"-3.81477013\" h22=\"-2.41536347\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.64184959\" h00=\"0.52689769\" h11=\"-0.47714107\" h22=\"0.00000000\" k00=\"0.22160101\" k11=\"0.13255986\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.99087302\" h00=\"0.19876639\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00451584\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Sr\" lmax=\"2\">\n<local Zeff=\"10\" radius=\"0.48000000\" C1=\"6.81095035\" C2=\"-1.19610979\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.27588581\" h00=\"21.28971943\" h11=\"10.19760926\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.28174086\" h00=\"11.70905135\" h11=\"12.97488200\" h22=\"0.00000000\" k00=\"1.34629459\" k11=\"2.80622473\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.52108911\" h00=\"0.36053906\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00779193\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"S\" lmax=\"1\">\n<local Zeff=\"6\" radius=\"0.42000000\" C1=\"-5.98626038\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.36482035\" h00=\"13.14354448\" h11=\"5.47617957\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.40948048\" h00=\"3.70089057\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.03492359\" k11=\"0.03148290\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ta\" lmax=\"2\">\n<local Zeff=\"5\" radius=\"0.74400000\" C1=\"9.83934257\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.45239666\" h00=\"6.12338066\" h11=\"2.80004218\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.75164390\" h00=\"1.64970103\" h11=\"2.97556377\" h22=\"0.00000000\" k00=\"0.67406021\" k11=\"1.52078112\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.50114181\" h00=\"-12.42334477\" h11=\"-10.22174735\" h22=\"0.00000000\" k00=\"-0.08463039\" k11=\"-0.24787056\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ta-sc\" lmax=\"2\">\n<local Zeff=\"13\" radius=\"0.55000000\" C1=\"13.38520167\" C2=\"-2.25392008\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.40088312\" h00=\"-4.43670899\" h11=\"-2.34114813\" h22=\"3.84385229\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.35654936\" h00=\"-7.62442808\" h11=\"-9.67747047\" h22=\"0.00000000\" k00=\"1.12324816\" k11=\"-2.42277460\" k22=\"-1.64365843\"/>\n<nonlocal l=\"2\" radius=\"0.41822925\" h00=\"-1.11356085\" h11=\"0.99253183\" h22=\"0.00000000\" k00=\"0.07060129\" k11=\"-0.00993484\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Tc\" lmax=\"2\">\n<local Zeff=\"15\" radius=\"0.43000000\" C1=\"27.30199947\" C2=\"-4.64715709\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.34617499\" h00=\"-0.37921852\" h11=\"-4.31265188\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.42346840\" h00=\"-0.24151639\" h11=\"0.97278149\" h22=\"0.00000000\" k00=\"0.00672609\" k11=\"-0.32900056\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.43186468\" h00=\"1.21878473\" h11=\"3.03204182\" h22=\"0.00000000\" k00=\"-0.00760164\" k11=\"-0.03716584\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Te\" lmax=\"2\">\n<local Zeff=\"6\" radius=\"0.57500000\" C1=\"8.71364868\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.57492240\" h00=\"1.40181273\" h11=\"-2.05457624\" h22=\"-0.99663078\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.58989076\" h00=\"0.76478865\" h11=\"-0.38334568\" h22=\"0.00000000\" k00=\"0.28709255\" k11=\"0.16347435\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.81338925\" h00=\"0.34485820\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00929869\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Ti\" lmax=\"2\">\n<local Zeff=\"12\" radius=\"0.38000000\" C1=\"8.71144218\" C2=\"-0.70028677\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.33777078\" h00=\"2.57526386\" h11=\"-4.76760461\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.24253135\" h00=\"-4.63054123\" h11=\"-10.49616087\" h22=\"0.00000000\" k00=\"0.20121752\" k11=\"0.07203791\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.24331694\" h00=\"-9.40665268\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00584456\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Tl\" lmax=\"2\">\n<local Zeff=\"3\" radius=\"0.63000000\" C1=\"1.45272083\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.78076788\" h00=\"0.37973043\" h11=\"-2.30683834\" h22=\"-0.93978457\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.89705009\" h00=\"-0.02423596\" h11=\"-0.68905269\" h22=\"0.00000000\" k00=\"0.18274699\" k11=\"0.01090389\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"1.09379194\" h00=\"0.22764152\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01256903\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Tl-sc\" lmax=\"2\">\n<local Zeff=\"13\" radius=\"0.55000000\" C1=\"12.29058515\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.51280306\" h00=\"7.19017017\" h11=\"3.69613096\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.57711505\" h00=\"4.76094580\" h11=\"4.34633671\" h22=\"0.00000000\" k00=\"1.35297827\" k11=\"3.84162025\" k22=\"1.14478780\"/>\n<nonlocal l=\"2\" radius=\"0.39323001\" h00=\"-11.01268700\" h11=\"-7.28140093\" h22=\"0.00000000\" k00=\"-0.11559254\" k11=\"-0.34777664\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"V\" lmax=\"2\">\n<local Zeff=\"13\" radius=\"0.37500000\" C1=\"7.47470354\" C2=\"-0.37026363\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.32779544\" h00=\"1.94087762\" h11=\"-6.10083728\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.24476590\" h00=\"-5.97816705\" h11=\"-11.07329118\" h22=\"0.00000000\" k00=\"0.19032152\" k11=\"0.07035481\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.24173879\" h00=\"-9.49989110\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.00648186\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"W\" lmax=\"2\">\n<local Zeff=\"6\" radius=\"0.71900000\" C1=\"10.69989013\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.46755372\" h00=\"5.80350289\" h11=\"2.67317516\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.72666463\" h00=\"1.78871915\" h11=\"3.02212073\" h22=\"0.00000000\" k00=\"0.70941707\" k11=\"1.61253765\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.49929065\" h00=\"-10.59832562\" h11=\"-7.31122365\" h22=\"0.00000000\" k00=\"-0.10122950\" k11=\"-0.25075088\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"W-sc\" lmax=\"2\">\n<local Zeff=\"14\" radius=\"0.54000000\" C1=\"13.41481123\" C2=\"-2.21345603\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.39702790\" h00=\"-4.14121089\" h11=\"-1.31924404\" h22=\"4.57665561\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.35353069\" h00=\"-7.45623626\" h11=\"-9.59863401\" h22=\"0.00000000\" k00=\"1.42485618\" k11=\"-0.33202370\" k22=\"-0.39267845\"/>\n<nonlocal l=\"2\" radius=\"0.41210703\" h00=\"-0.95466075\" h11=\"1.21037026\" h22=\"0.00000000\" k00=\"0.07015958\" k11=\"-0.01495438\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Xe\" lmax=\"2\">\n<local Zeff=\"8\" radius=\"0.56000000\" C1=\"8.03636262\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.53049420\" h00=\"2.23202148\" h11=\"-3.17371348\" h22=\"-2.04631245\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.58177483\" h00=\"0.79698181\" h11=\"-0.69955590\" h22=\"0.00000000\" k00=\"0.27633099\" k11=\"0.10785815\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.68554509\" h00=\"0.56018900\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01674755\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Y\" lmax=\"2\">\n<local Zeff=\"11\" radius=\"0.47500000\" C1=\"12.16776904\" C2=\"-2.32855103\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.24674070\" h00=\"23.45027195\" h11=\"10.74799029\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.29656397\" h00=\"5.97863401\" h11=\"6.92459348\" h22=\"0.00000000\" k00=\"1.23578364\" k11=\"2.82372260\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.45045569\" h00=\"1.18749048\" h11=\"1.49523499\" h22=\"0.00000000\" k00=\"0.01304100\" k11=\"0.00012063\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Zn\" lmax=\"2\">\n<local Zeff=\"12\" radius=\"0.51000000\" C1=\"0.00000000\" C2=\"0.00000000\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.40031644\" h00=\"11.53004133\" h11=\"16.46577518\" h22=\"6.44550918\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.54318233\" h00=\"2.59719512\" h11=\"0.70314117\" h22=\"0.00000000\" k00=\"0.10017431\" k11=\"0.12652456\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.25095885\" h00=\"-14.46695795\" h11=\"0.00000000\" h22=\"0.00000000\" k00=\"0.01272732\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n</atom>\n<atom symbol=\"Zr\" lmax=\"2\">\n<local Zeff=\"12\" radius=\"0.47000000\" C1=\"7.79605677\" C2=\"-1.89321030\" C3=\"0.00000000\" C4=\"0.00000000\"/>\n<nonlocal l=\"0\" radius=\"0.25982885\" h00=\"23.38087417\" h11=\"11.06632609\" h22=\"0.00000000\" k00=\"0.00000000\" k11=\"0.00000000\" k22=\"0.00000000\"/>\n<nonlocal l=\"1\" radius=\"0.28896899\" h00=\"8.59276581\" h11=\"6.36257589\" h22=\"0.00000000\" k00=\"1.00490626\" k11=\"1.67557293\" k22=\"0.00000000\"/>\n<nonlocal l=\"2\" radius=\"0.58124504\" h00=\"0.02781064\" h11=\"-0.31393184\" h22=\"0.00000000\" k00=\"-0.00255322\" k11=\"-0.01224184\" k22=\"0.00000000\"/>\n</atom>\n"
  },
  {
    "path": "src/apps/moldft/input",
    "content": "dft\n  xc LDA\n  maxsub 5\nend\n  #xc GGA_X_PBE .75 GGA_C_PBE 1. HF_X .25\n\n# water*1\ngeometry\n  O  0.0    0.0 0.0\n  H  1.4375 0.0 1.15\n  H -1.4375 0.0 1.15\nend\n\n# water dimer\ngeometry\n  units angstrom\n  O -0.04537298   1.27083455    0.00000000\n  H  0.11541692   1.82777013    0.77758805\n  H  0.11541692   1.82777013   -0.77758805\n  O -0.10561006  -0.47346262    0.00000000\n  H -0.09896558  -1.45781563    0.00000000\n  H  0.84226145  -1.68923759    0.00000000\nend\n\n\n\n# water*5\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n\n\n\n# water*213\ngeometry\n  units angstrom\n  O   -9.564 5.657 1.611\n  H   -8.967 5.042 2.126\n  H   -9.118 6.546 1.508\n  O   7.655 -9.405 -6.932\n  H   7.028 -9.701 -7.653\n  H   7.671 -8.406 -6.893\n  O   2.377 7.497 -3.832\n  H   2.957 6.974 -4.457\n  H   2.434 8.470 -4.059\n  O   -8.388 8.317 1.547\n  H   -7.546 8.010 1.104\n  H   -8.191 9.109 2.125\n  O   8.817 1.831 7.613\n  H   9.333 1.039 7.287\n  H   9.315 2.669 7.389\n  O   4.829 -4.894 -8.756\n  H   4.134 -4.580 -9.403\n  H   4.477 -4.815 -7.824\n  O   -2.591 -0.898 -4.405\n  H   -1.704 -0.542 -4.109\n  H   -2.513 -1.255 -5.336\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   1.451 3.499 2.870\n  H   1.210 4.168 3.573\n  H   1.914 3.961 2.113\n  O   -2.256 5.958 8.393\n  H   -1.997 6.468 9.214\n  H   -1.471 5.433 8.065\n  O   -4.756 0.823 8.564\n  H   -5.126 -0.107 8.583\n  H   -4.725 1.150 7.619\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   8.630 6.074 -4.351\n  H   8.102 6.484 -3.608\n  H   9.551 6.464 -4.361\n  O   6.787 4.926 2.613\n  H   7.726 5.043 2.289\n  H   6.421 5.811 2.902\n  O   8.929 -2.526 -4.937\n  H   8.779 -2.602 -3.951\n  H   8.086 -2.220 -5.379\n  O   -4.066 4.005 3.885\n  H   -3.995 4.957 4.183\n  H   -3.156 3.656 3.661\n  O   -8.271 -7.802 2.803\n  H   -7.536 -7.201 3.120\n  H   -8.680 -8.269 3.587\n  O   3.690 2.403 3.993\n  H   4.451 3.015 4.210\n  H   2.853 2.938 3.877\n  O   -5.022 0.649 -4.243\n  H   -4.273 -0.004 -4.353\n  H   -4.660 1.516 -3.898\n  O   -1.900 3.708 -7.094\n  H   -2.721 4.275 -7.030\n  H   -1.341 3.837 -6.275\n  O   7.200 -3.179 7.917\n  H   6.208 -3.233 7.801\n  H   7.439 -3.415 8.859\n  O   7.878 -6.324 -2.513\n  H   7.752 -6.736 -1.610\n  H   8.196 -7.021 -3.156\n  O   8.176 -6.559 -7.069\n  H   7.647 -5.733 -7.262\n  H   8.425 -7.004 -7.929\n  O   -1.962 -2.092 7.241\n  H   -1.271 -2.150 6.519\n  H   -2.191 -1.132 7.406\n  O   -5.658 0.190 3.826\n  H   -6.561 0.552 3.590\n  H   -5.729 -0.792 4.003\n  O   5.003 -2.167 2.276\n  H   5.065 -1.570 3.076\n  H   4.079 -2.121 1.897\n  O   9.263 -2.788 5.762\n  H   8.980 -2.922 4.812\n  H   9.202 -3.657 6.254\n  O   0.971 8.024 -1.417\n  H   1.694 7.819 -2.078\n  H   1.200 8.863 -0.923\n  O   2.740 -5.205 -0.011\n  H   2.359 -4.286 0.096\n  H   2.592 -5.521 -0.948\n  O   7.721 2.515 5.255\n  H   7.920 1.866 5.989\n  H   6.971 3.115 5.534\n  O   5.750 7.146 3.481\n  H   4.788 7.294 3.250\n  H   6.087 7.920 4.018\n  O   2.009 -8.898 -7.919\n  H   1.412 -8.721 -8.702\n  H   2.671 -8.154 -7.830\n  O   -8.152 4.383 -2.618\n  H   -7.819 3.556 -3.071\n  H   -7.829 5.189 -3.114\n  O   5.092 -0.656 -8.134\n  H   5.524 0.080 -8.655\n  H   4.118 -0.456 -8.019\n  O   1.593 -8.076 -0.089\n  H   1.175 -8.479 0.726\n  H   2.497 -7.716 0.143\n  O   -1.040 -5.189 -4.625\n  H   -0.456 -5.402 -5.409\n  H   -1.364 -6.038 -4.209\n  O   3.101 6.996 1.942\n  H   3.131 5.997 1.961\n  H   2.165 7.299 1.760\n  O   8.020 0.899 2.975\n  H   7.650 1.251 2.115\n  H   7.768 1.513 3.723\n  O   -3.064 -3.450 -4.998\n  H   -2.319 -4.108 -4.887\n  H   -2.886 -2.645 -4.432\n  O   5.551 4.270 5.300\n  H   4.695 4.701 5.588\n  H   5.896 4.729 4.481\n  O   -4.485 8.675 2.394\n  H   -3.636 8.610 1.870\n  H   -5.215 8.193 1.908\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   7.260 5.621 8.730\n  H   6.444 5.051 8.630\n  H   7.652 5.485 9.641\n  O   -4.250 2.926 -3.199\n  H   -3.744 3.772 -3.366\n  H   -4.529 2.888 -2.239\n  O   2.088 -2.599 -5.399\n  H   1.534 -2.826 -6.201\n  H   1.842 -3.205 -4.642\n  O   4.846 -1.699 7.968\n  H   4.949 -1.460 8.933\n  H   5.593 -1.292 7.442\n  O   -7.602 7.912 5.278\n  H   -7.852 7.213 5.949\n  H   -8.331 8.595 5.221\n  O   -7.933 1.521 3.421\n  H   -8.812 1.071 3.261\n  H   -8.050 2.249 4.097\n  O   1.258 8.356 4.085\n  H   0.797 7.935 3.303\n  H   1.890 9.061 3.760\n  O   -6.413 -1.265 8.476\n  H   -7.005 -0.891 9.190\n  H   -6.641 -2.227 8.324\n  O   0.089 3.928 -5.479\n  H   0.674 4.692 -5.749\n  H   0.099 3.835 -4.483\n  O   -7.176 4.229 7.879\n  H   -6.193 4.390 7.971\n  H   -7.384 3.966 6.936\n  O   -4.393 1.699 5.817\n  H   -4.900 1.329 5.038\n  H   -4.513 2.691 5.852\n  O   -5.179 -2.392 -0.345\n  H   -4.607 -2.632 0.440\n  H   -4.606 -2.005 -1.068\n  O   6.483 -8.887 5.150\n  H   6.042 -8.148 4.641\n  H   5.882 -9.187 5.891\n  O   5.067 7.316 0.249\n  H   5.259 6.361 0.022\n  H   4.222 7.368 0.782\n  O   0.595 4.467 -8.345\n  H   -0.284 4.068 -8.085\n  H   0.944 5.026 -7.592\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -0.184 -5.996 3.292\n  H   0.634 -5.834 3.843\n  H   -0.166 -6.929 2.933\n  O   4.204 -4.197 -5.876\n  H   3.601 -3.415 -5.719\n  H   4.933 -4.199 -5.192\n  O   -0.816 -5.669 8.301\n  H   -1.275 -5.111 8.993\n  H   -1.369 -5.689 7.468\n  O   -2.593 -8.452 5.546\n  H   -2.151 -9.349 5.537\n  H   -3.575 -8.565 5.701\n  O   6.744 2.879 -1.799\n  H   6.709 2.499 -2.723\n  H   7.445 3.592 -1.757\n  O   6.678 1.311 9.267\n  H   7.150 1.018 10.099\n  H   7.331 1.351 8.510\n  O   -1.799 -1.423 -6.793\n  H   -2.095 -0.572 -7.227\n  H   -0.887 -1.667 -7.123\n  O   5.147 3.677 9.007\n  H   4.578 3.717 9.829\n  H   5.546 2.763 8.923\n  O   -4.690 -4.583 9.143\n  H   -4.161 -4.327 8.333\n  H   -4.468 -3.963 9.896\n  O   -1.562 1.556 -3.743\n  H   -0.872 2.240 -3.503\n  H   -2.461 1.867 -3.431\n  O   0.893 -5.948 -6.780\n  H   1.779 -6.403 -6.692\n  H   0.268 -6.533 -7.297\n  O   8.209 -5.281 0.671\n  H   8.107 -4.554 -0.008\n  H   8.981 -5.865 0.421\n  O   -5.028 2.883 -8.319\n  H   -4.750 2.197 -8.992\n  H   -5.619 2.456 -7.633\n  O   2.161 -0.896 4.600\n  H   3.160 -0.935 4.567\n  H   1.841 -0.115 4.063\n  O   0.107 1.468 -6.868\n  H   -0.101 2.302 -6.356\n  H   -0.572 1.343 -7.592\n  O   -8.934 6.366 7.309\n  H   -9.851 6.199 7.672\n  H   -8.325 5.623 7.586\n  O   0.219 7.296 1.815\n  H   -0.497 7.981 1.682\n  H   -0.094 6.413 1.464\n  O   -6.810 4.999 -0.222\n  H   -6.547 4.090 0.102\n  H   -7.216 4.924 -1.133\n  O   -2.260 8.292 0.709\n  H   -2.309 8.665 -0.217\n  H   -2.399 7.302 0.677\n  O   -6.220 -4.150 6.077\n  H   -5.228 -4.025 6.098\n  H   -6.567 -4.220 7.012\n  O   -6.699 -0.093 -0.118\n  H   -7.620 -0.447 0.044\n  H   -6.029 -0.693 0.319\n  O   -2.020 -5.788 -0.763\n  H   -1.639 -4.864 -0.801\n  H   -2.820 -5.794 -0.163\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   3.139 -8.517 3.576\n  H   2.717 -7.695 3.958\n  H   3.625 -8.283 2.734\n  O   3.544 0.925 -1.230\n  H   4.454 0.792 -1.623\n  H   3.590 0.812 -0.237\n  O   -5.557 2.427 -0.659\n  H   -6.083 1.596 -0.841\n  H   -5.458 2.550 0.328\n  O   -8.310 -4.400 -7.767\n  H   -9.211 -4.389 -7.334\n  H   -7.703 -3.765 -7.290\n  O   -5.728 2.979 1.921\n  H   -5.008 3.330 2.519\n  H   -6.318 2.358 2.438\n  O   -8.543 -7.037 0.239\n  H   -8.175 -7.281 1.137\n  H   -8.829 -7.866 -0.241\n  O   -6.553 -4.656 0.861\n  H   -7.471 -4.671 1.257\n  H   -6.309 -3.717 0.618\n  O   7.167 -4.065 -7.723\n  H   7.046 -3.333 -7.052\n  H   6.285 -4.287 -8.137\n  O   2.752 4.918 7.960\n  H   3.595 4.382 7.904\n  H   2.313 4.755 8.844\n  O   2.718 4.262 0.458\n  H   3.685 4.442 0.273\n  H   2.550 3.276 0.419\n  O   5.836 -6.870 8.200\n  H   5.755 -6.297 9.016\n  H   6.762 -7.245 8.147\n  O   6.373 -5.511 3.795\n  H   5.969 -5.397 2.887\n  H   7.282 -5.093 3.810\n  O   4.068 1.601 1.434\n  H   5.026 1.810 1.239\n  H   3.871 1.805 2.394\n  O   5.833 -0.679 -0.244\n  H   5.908 -1.110 0.656\n  H   5.768 -1.386 -0.948\n  O   -0.227 4.984 5.241\n  H   -0.206 4.365 6.026\n  H   -0.565 5.880 5.531\n  O   2.645 7.735 8.196\n  H   2.798 7.860 9.176\n  H   2.543 6.760 7.996\n  O   4.081 6.645 -7.409\n  H   4.700 6.151 -6.799\n  H   4.600 7.316 -7.940\n  O   0.185 -2.868 5.188\n  H   0.595 -3.776 5.275\n  H   0.903 -2.173 5.222\n  O   1.482 -5.346 5.311\n  H   1.044 -5.849 6.056\n  H   2.463 -5.273 5.489\n  O   8.670 1.210 -7.468\n  H   9.499 0.678 -7.640\n  H   8.797 1.768 -6.647\n  O   -6.982 -6.493 -1.881\n  H   -6.853 -5.502 -1.837\n  H   -7.396 -6.813 -1.028\n  O   -6.585 -8.381 7.660\n  H   -7.077 -8.731 8.458\n  H   -7.196 -7.803 7.119\n  O   1.567 -0.094 7.082\n  H   1.675 -0.270 6.104\n  H   1.702 -0.945 7.591\n  O   -6.733 -3.792 -2.231\n  H   -6.154 -3.985 -3.023\n  H   -6.211 -3.273 -1.555\n  O   7.446 8.892 0.595\n  H   8.250 8.605 1.115\n  H   6.745 8.181 0.645\n  O   -2.241 1.065 -8.099\n  H   -2.838 1.811 -7.804\n  H   -1.927 1.238 -9.033\n  O   1.184 -8.406 -4.271\n  H   0.289 -8.227 -3.862\n  H   1.816 -7.671 -4.024\n  O   -1.759 -5.986 5.639\n  H   -1.238 -5.812 4.803\n  H   -2.042 -6.945 5.662\n  O   -2.006 5.584 0.364\n  H   -1.395 5.940 -0.343\n  H   -1.706 4.668 0.634\n  O   -4.223 -3.032 -7.462\n  H   -4.510 -2.086 -7.314\n  H   -3.597 -3.309 -6.734\n  O   4.802 -7.949 -4.709\n  H   5.395 -8.750 -4.799\n  H   5.086 -7.412 -3.915\n  O   -0.809 -7.960 1.390\n  H   -1.522 -8.595 1.092\n  H   -0.870 -7.116 0.857\n  O   -7.590 -0.268 -7.752\n  H   -7.225 0.516 -7.250\n  H   -7.399 -1.108 -7.243\n  O   5.950 -4.502 -3.135\n  H   6.883 -4.774 -2.897\n  H   5.299 -5.061 -2.622\n  O   -3.940 -5.480 1.339\n  H   -3.935 -6.239 1.991\n  H   -4.884 -5.249 1.103\n  O   0.269 8.569 -6.235\n  H   0.645 8.836 -7.123\n  H   0.516 9.254 -5.549\n  O   1.479 6.047 -6.364\n  H   0.992 6.875 -6.088\n  H   2.446 6.260 -6.505\n  O   7.903 4.699 -6.735\n  H   8.682 4.611 -7.357\n  H   8.208 5.101 -5.872\n  O   -1.278 -7.179 -7.880\n  H   -1.350 -6.915 -8.842\n  H   -2.020 -7.809 -7.651\n  O   -5.989 7.555 0.510\n  H   -6.325 6.623 0.371\n  H   -6.104 8.080 -0.333\n  O   -5.920 -9.108 -5.406\n  H   -6.278 -8.283 -5.844\n  H   -6.481 -9.894 -5.667\n  O   -8.255 3.588 5.170\n  H   -8.051 4.194 4.402\n  H   -9.246 3.476 5.253\n  O   -0.077 3.440 -2.750\n  H   0.503 2.709 -2.390\n  H   -0.034 4.231 -2.140\n  O   -3.562 -0.141 2.104\n  H   -3.670 -1.112 1.889\n  H   -4.304 0.150 2.708\n  O   -5.187 9.268 5.755\n  H   -5.784 8.756 5.136\n  H   -5.728 9.632 6.513\n  O   2.145 -6.344 -2.231\n  H   3.120 -6.559 -2.291\n  H   1.719 -6.921 -1.534\n  O   7.474 7.684 -2.165\n  H   7.070 7.863 -3.062\n  H   6.762 7.377 -1.533\n  O   3.486 -6.707 -6.725\n  H   3.931 -7.296 -6.051\n  H   3.591 -5.750 -6.453\n  O   -5.241 -7.039 -8.907\n  H   -5.124 -6.118 -9.281\n  H   -5.564 -7.653 -9.628\n  O   -7.822 9.280 -8.840\n  H   -7.568 8.317 -8.926\n  H   -7.822 9.541 -7.875\n  O   3.117 5.630 4.947\n  H   2.437 5.438 5.655\n  H   2.900 6.500 4.504\n  O   0.663 8.780 6.798\n  H   0.704 8.731 5.800\n  H   1.403 8.233 7.190\n  O   2.865 1.448 -3.822\n  H   2.102 0.810 -3.928\n  H   3.231 1.378 -2.894\n  O   -2.134 0.325 6.016\n  H   -2.949 0.903 5.987\n  H   -1.804 0.168 5.085\n  O   -4.626 5.171 7.284\n  H   -3.706 5.357 7.629\n  H   -4.874 5.861 6.605\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   -3.555 -8.725 -7.129\n  H   -3.968 -8.139 -7.826\n  H   -4.210 -8.876 -6.389\n  O   2.245 -0.070 -7.994\n  H   2.050 -0.872 -8.559\n  H   1.385 0.356 -7.712\n  O   -3.771 6.541 4.451\n  H   -3.120 6.986 5.066\n  H   -4.025 7.173 3.719\n  O   -3.083 5.492 -3.884\n  H   -2.244 6.034 -3.822\n  H   -3.646 5.655 -3.073\n  O   6.549 -1.629 -6.134\n  H   6.179 -1.178 -6.947\n  H   5.996 -1.385 -5.337\n  O   -6.423 -2.669 3.744\n  H   -7.133 -2.666 3.040\n  H   -6.827 -2.922 4.624\n  O   -8.573 3.739 -8.349\n  H   -8.965 2.825 -8.246\n  H   -8.187 3.834 -9.267\n  O   5.518 5.429 -5.599\n  H   5.103 4.520 -5.550\n  H   6.371 5.378 -6.119\n  O   -7.405 6.830 -3.649\n  H   -7.506 7.564 -2.978\n  H   -6.465 6.817 -3.991\n  O   -8.962 2.663 -5.129\n  H   -8.732 2.029 -4.390\n  H   -9.296 3.522 -4.740\n  O   -1.711 7.703 6.156\n  H   -0.858 8.157 6.413\n  H   -2.199 7.417 6.982\n  O   0.536 5.441 -0.945\n  H   1.398 5.073 -0.598\n  H   0.599 6.437 -1.008\n  O   -0.412 4.121 7.686\n  H   -0.671 3.161 7.796\n  H   0.304 4.351 8.345\n  O   -0.932 -3.524 2.530\n  H   -0.441 -2.916 3.154\n  H   -0.772 -4.475 2.796\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   6.483 -7.292 -0.018\n  H   6.951 -6.599 0.531\n  H   6.934 -8.176 0.108\n  O   5.087 -4.778 1.625\n  H   5.098 -3.800 1.833\n  H   4.441 -4.954 0.882\n  O   9.306 -1.472 -0.457\n  H   9.298 -2.333 -0.966\n  H   8.763 -0.789 -0.947\n  O   4.558 2.619 -5.781\n  H   3.910 2.456 -5.038\n  H   4.121 2.410 -6.657\n  O   -1.128 -7.398 -2.954\n  H   -1.640 -8.210 -2.673\n  H   -1.178 -6.707 -2.233\n  O   -4.850 6.232 -5.686\n  H   -4.011 6.277 -5.143\n  H   -4.619 6.249 -6.659\n  O   -8.125 -6.086 6.778\n  H   -8.063 -5.804 5.820\n  H   -8.011 -5.288 7.369\n  O   -8.154 -0.363 6.519\n  H   -7.404 -0.669 7.106\n  H   -8.474 -1.128 5.960\n  O   2.889 2.658 -8.186\n  H   2.770 1.706 -8.467\n  H   1.994 3.097 -8.110\n  O   6.997 -0.718 6.306\n  H   7.672 -0.198 5.782\n  H   7.437 -1.517 6.715\n  O   -7.918 1.301 -3.143\n  H   -6.959 1.023 -3.197\n  H   -8.435 0.620 -2.624\n  O   -7.548 5.986 -6.781\n  H   -7.721 5.271 -7.459\n  H   -6.676 5.808 -6.325\n  O   -8.516 8.614 -6.067\n  H   -8.368 7.680 -6.393\n  H   -9.484 8.849 -6.159\n  O   3.500 -3.912 7.720\n  H   4.049 -3.076 7.711\n  H   3.854 -4.550 7.036\n  O   7.958 -1.838 3.365\n  H   7.996 -0.854 3.190\n  H   7.035 -2.174 3.179\n  O   -1.490 8.030 -8.316\n  H   -0.899 7.729 -7.567\n  H   -2.111 8.741 -7.986\n  O   -4.191 -7.483 3.353\n  H   -3.364 -7.577 3.908\n  H   -4.449 -8.377 2.987\n  O   -4.227 5.725 -1.282\n  H   -5.034 5.348 -0.826\n  H   -3.445 5.688 -0.661\n  O   4.106 -0.877 -4.871\n  H   3.327 -1.490 -4.999\n  H   3.782 0.067 -4.813\n  O   6.833 1.952 -4.327\n  H   6.068 2.142 -4.943\n  H   7.682 1.906 -4.855\n  O   -4.111 -2.648 2.417\n  H   -3.284 -3.052 2.810\n  H   -4.914 -2.999 2.898\n  O   -6.546 -6.100 4.045\n  H   -6.395 -5.153 4.329\n  H   -5.665 -6.541 3.872\n  O   -7.147 -2.401 -6.115\n  H   -6.641 -3.072 -5.572\n  H   -8.083 -2.330 -5.769\n  O   6.723 1.948 0.853\n  H   6.382 1.169 0.328\n  H   7.362 2.475 0.292\n  O   -0.571 1.311 8.043\n  H   0.313 0.914 8.291\n  H   -0.891 0.901 7.188\n  O   -8.493 -2.561 1.927\n  H   -9.246 -2.330 2.543\n  H   -8.752 -2.340 0.986\n  O   -4.933 -8.273 -2.851\n  H   -5.473 -7.489 -2.545\n  H   -5.248 -8.562 -3.755\n  O   4.912 -0.265 4.360\n  H   4.609 0.665 4.149\n  H   5.640 -0.230 5.046\n  O   5.352 4.701 -0.048\n  H   5.850 4.342 0.742\n  H   5.660 4.234 -0.877\n  O   7.940 0.152 -2.111\n  H   7.570 0.886 -2.681\n  H   7.221 -0.517 -1.921\n  O   4.863 9.076 7.408\n  H   4.637 9.977 7.780\n  H   4.140 8.427 7.646\n  O   5.888 -1.800 -2.940\n  H   5.229 -1.345 -3.540\n  H   5.794 -2.791 -3.031\n  O   -6.970 -6.626 -6.793\n  H   -6.318 -6.635 -7.552\n  H   -7.752 -6.051 -7.032\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\n  O   -4.166 5.479 -8.203\n  H   -4.602 4.592 -8.356\n  H   -3.737 5.791 -9.050\n  O   0.994 -7.837 8.540\n  H   0.579 -6.938 8.400\n  H   0.676 -8.466 7.830\n  O   -1.040 7.276 -4.144\n  H   -0.192 7.211 -3.617\n  H   -0.851 7.711 -5.025\n  O   -3.497 -4.223 6.794\n  H   -2.862 -3.458 6.906\n  H   -3.107 -4.889 6.157\n  O   8.413 4.473 -0.589\n  H   8.692 4.954 0.242\n  H   9.168 4.474 -1.245\n  O   0.891 -0.095 -4.585\n  H   1.370 -0.796 -5.115\n  H   0.214 0.358 -5.166\n  O   -7.160 5.526 3.647\n  H   -7.450 6.336 4.157\n  H   -6.268 5.696 3.229\n  O   -6.738 8.745 -1.738\n  H   -6.224 9.430 -2.254\n  H   -7.631 9.118 -1.487\n  O   9.148 -5.184 3.446\n  H   8.915 -5.100 2.477\n  H   9.561 -6.080 3.612\n  O   4.118 8.839 -1.791\n  H   4.506 8.434 -0.963\n  H   4.100 8.155 -2.520\n  O   -1.675 3.224 3.349\n  H   -1.164 3.751 4.028\n  H   -1.596 3.666 2.455\n  O   4.080 -7.695 1.256\n  H   4.959 -8.005 0.894\n  H   4.099 -6.702 1.373\n  O   0.180 -3.354 -7.226\n  H   -0.436 -3.427 -8.011\n  H   0.492 -4.267 -6.963\n  O   4.731 -7.308 -1.953\n  H   4.528 -8.286 -2.008\n  H   5.347 -7.138 -1.183\n  O   4.713 -5.705 5.949\n  H   5.264 -5.537 5.132\n  H   5.295 -6.077 6.673\n  O   6.594 8.038 -4.794\n  H   7.012 8.311 -5.661\n  H   6.127 7.161 -4.911\n  O   9.272 -8.787 5.058\n  H   8.314 -9.072 5.084\n  H   9.383 -7.945 5.587\n  O   -1.868 -3.701 -8.968\n  H   -2.407 -3.382 -8.188\n  H   -2.050 -3.118 -9.760\n  O   1.262 -3.954 -3.289\n  H   0.410 -4.196 -3.754\n  H   1.684 -4.780 -2.914\n  O   -7.233 -4.055 8.541\n  H   -7.794 -4.229 9.350\n  H   -6.287 -4.321 8.728\n  O   -6.482 1.649 -6.374\n  H   -5.847 1.368 -5.654\n  H   -7.076 2.376 -6.030\n  O   -2.746 9.171 -2.040\n  H   -3.551 9.761 -2.100\n  H   -2.785 8.479 -2.762\n  O   1.522 -2.362 9.024\n  H   0.867 -2.777 9.656\n  H   2.059 -3.080 8.580\n  O   8.635 -7.791 9.015\n  H   9.359 -8.390 9.358\n  H   8.937 -7.355 8.167\n  O   -5.387 -4.448 -4.788\n  H   -5.604 -5.131 -5.485\n  H   -4.530 -3.989 -5.025\n  O   9.424 -9.013 -1.553\n  H   8.730 -9.715 -1.393\n  H   9.319 -8.645 -2.478\nend\n\n\n# water*144\ngeometry\n  units angstrom\n  O   -9.359 -1.472 -0.457\n  H   -9.366 -2.333 -0.966\n  H   -9.901 -0.789 -0.947\n  O   2.377 7.497 -3.832\n  H   2.957 6.974 -4.457\n  H   2.434 8.470 -4.059\n  O   -2.591 -0.898 -4.405\n  H   -1.704 -0.542 -4.109\n  H   -2.513 -1.255 -5.336\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   1.451 3.499 2.870\n  H   1.210 4.168 3.573\n  H   1.914 3.961 2.113\n  O   -4.756 0.823 8.564\n  H   -5.126 -0.107 8.583\n  H   -4.725 1.150 7.619\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   6.787 4.926 2.613\n  H   7.726 5.043 2.289\n  H   6.421 5.811 2.902\n  O   -4.066 4.005 3.885\n  H   -3.995 4.957 4.183\n  H   -3.156 3.656 3.661\n  O   3.690 2.403 3.993\n  H   4.451 3.015 4.210\n  H   2.853 2.938 3.877\n  O   -5.022 0.649 -4.243\n  H   -4.273 -0.004 -4.353\n  H   -4.660 1.516 -3.898\n  O   -1.900 3.708 -7.094\n  H   -2.721 4.275 -7.030\n  H   -1.341 3.837 -6.275\n  O   -1.962 -2.092 7.241\n  H   -1.271 -2.150 6.519\n  H   -2.191 -1.132 7.406\n  O   -5.658 0.190 3.826\n  H   -6.561 0.552 3.590\n  H   -5.729 -0.792 4.003\n  O   5.003 -2.167 2.276\n  H   5.065 -1.570 3.076\n  H   4.079 -2.121 1.897\n  O   0.971 8.024 -1.417\n  H   1.694 7.819 -2.078\n  H   1.200 8.863 -0.923\n  O   2.740 -5.205 -0.011\n  H   2.359 -4.286 0.096\n  H   2.592 -5.521 -0.948\n  O   7.721 2.515 5.255\n  H   7.920 1.866 5.989\n  H   6.971 3.115 5.534\n  O   5.750 7.146 3.481\n  H   4.788 7.294 3.250\n  H   6.087 7.920 4.018\n  O   -8.152 4.383 -2.618\n  H   -7.819 3.556 -3.071\n  H   -7.829 5.189 -3.114\n  O   5.092 -0.656 -8.134\n  H   5.524 0.080 -8.655\n  H   4.118 -0.456 -8.019\n  O   1.593 -8.076 -0.089\n  H   1.175 -8.479 0.726\n  H   2.497 -7.716 0.143\n  O   -1.040 -5.189 -4.625\n  H   -0.456 -5.402 -5.409\n  H   -1.364 -6.038 -4.209\n  O   3.101 6.996 1.942\n  H   3.131 5.997 1.961\n  H   2.165 7.299 1.760\n  O   8.020 0.899 2.975\n  H   7.650 1.251 2.115\n  H   7.768 1.513 3.723\n  O   -3.064 -3.450 -4.998\n  H   -2.319 -4.108 -4.887\n  H   -2.886 -2.645 -4.432\n  O   5.551 4.270 5.300\n  H   4.695 4.701 5.588\n  H   5.896 4.729 4.481\n  O   -4.485 8.675 2.394\n  H   -3.636 8.610 1.870\n  H   -5.215 8.193 1.908\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   -4.250 2.926 -3.199\n  H   -3.744 3.772 -3.366\n  H   -4.529 2.888 -2.239\n  O   2.088 -2.599 -5.399\n  H   1.534 -2.826 -6.201\n  H   1.842 -3.205 -4.642\n  O   4.846 -1.699 7.968\n  H   4.949 -1.460 8.933\n  H   5.593 -1.292 7.442\n  O   -7.933 1.521 3.421\n  H   -8.812 1.071 3.261\n  H   -8.050 2.249 4.097\n  O   1.258 8.356 4.085\n  H   0.797 7.935 3.303\n  H   1.890 9.061 3.760\n  O   0.089 3.928 -5.479\n  H   0.674 4.692 -5.749\n  H   0.099 3.835 -4.483\n  O   -4.393 1.699 5.817\n  H   -4.900 1.329 5.038\n  H   -4.513 2.691 5.852\n  O   -5.179 -2.392 -0.345\n  H   -4.607 -2.632 0.440\n  H   -4.606 -2.005 -1.068\n  O   5.067 7.316 0.249\n  H   5.259 6.361 0.022\n  H   4.222 7.368 0.782\n  O   0.595 4.467 -8.345\n  H   -0.284 4.068 -8.085\n  H   0.944 5.026 -7.592\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -0.184 -5.996 3.292\n  H   0.634 -5.834 3.843\n  H   -0.166 -6.929 2.933\n  O   4.204 -4.197 -5.876\n  H   3.601 -3.415 -5.719\n  H   4.933 -4.199 -5.192\n  O   -0.816 -5.669 8.301\n  H   -1.275 -5.111 8.993\n  H   -1.369 -5.689 7.468\n  O   6.744 2.879 -1.799\n  H   6.709 2.499 -2.723\n  H   7.445 3.592 -1.757\n  O   -1.799 -1.423 -6.793\n  H   -2.095 -0.572 -7.227\n  H   -0.887 -1.667 -7.123\n  O   -1.562 1.556 -3.743\n  H   -0.872 2.240 -3.503\n  H   -2.461 1.867 -3.431\n  O   0.893 -5.948 -6.780\n  H   1.779 -6.403 -6.692\n  H   0.268 -6.533 -7.297\n  O   8.209 -5.281 0.671\n  H   8.107 -4.554 -0.008\n  H   8.981 -5.865 0.421\n  O   2.161 -0.896 4.600\n  H   3.160 -0.935 4.567\n  H   1.841 -0.115 4.063\n  O   0.107 1.468 -6.868\n  H   -0.101 2.302 -6.356\n  H   -0.572 1.343 -7.592\n  O   0.219 7.296 1.815\n  H   -0.497 7.981 1.682\n  H   -0.094 6.413 1.464\n  O   -6.810 4.999 -0.222\n  H   -6.547 4.090 0.102\n  H   -7.216 4.924 -1.133\n  O   -2.260 8.292 0.709\n  H   -2.309 8.665 -0.217\n  H   -2.399 7.302 0.677\n  O   -6.220 -4.150 6.077\n  H   -5.228 -4.025 6.098\n  H   -6.567 -4.220 7.012\n  O   -6.699 -0.093 -0.118\n  H   -7.620 -0.447 0.044\n  H   -6.029 -0.693 0.319\n  O   -2.020 -5.788 -0.763\n  H   -1.639 -4.864 -0.801\n  H   -2.820 -5.794 -0.163\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   3.139 -8.517 3.576\n  H   2.717 -7.695 3.958\n  H   3.625 -8.283 2.734\n  O   3.544 0.925 -1.230\n  H   4.454 0.792 -1.623\n  H   3.590 0.812 -0.237\n  O   -5.557 2.427 -0.659\n  H   -6.083 1.596 -0.841\n  H   -5.458 2.550 0.328\n  O   -5.728 2.979 1.921\n  H   -5.008 3.330 2.519\n  H   -6.318 2.358 2.438\n  O   -6.553 -4.656 0.861\n  H   -7.471 -4.671 1.257\n  H   -6.309 -3.717 0.618\n  O   2.752 4.918 7.960\n  H   3.595 4.382 7.904\n  H   2.313 4.755 8.844\n  O   2.718 4.262 0.458\n  H   3.685 4.442 0.273\n  H   2.550 3.276 0.419\n  O   6.373 -5.511 3.795\n  H   5.969 -5.397 2.887\n  H   7.282 -5.093 3.810\n  O   4.068 1.601 1.434\n  H   5.026 1.810 1.239\n  H   3.871 1.805 2.394\n  O   5.833 -0.679 -0.244\n  H   5.908 -1.110 0.656\n  H   5.768 -1.386 -0.948\n  O   -0.227 4.984 5.241\n  H   -0.206 4.365 6.026\n  H   -0.565 5.880 5.531\n  O   0.185 -2.868 5.188\n  H   0.595 -3.776 5.275\n  H   0.903 -2.173 5.222\n  O   1.482 -5.346 5.311\n  H   1.044 -5.849 6.056\n  H   2.463 -5.273 5.489\n  O   -6.982 -6.493 -1.881\n  H   -6.853 -5.502 -1.837\n  H   -7.396 -6.813 -1.028\n  O   1.567 -0.094 7.082\n  H   1.675 -0.270 6.104\n  H   1.702 -0.945 7.591\n  O   -6.733 -3.792 -2.231\n  H   -6.154 -3.985 -3.023\n  H   -6.211 -3.273 -1.555\n  O   -2.241 1.065 -8.099\n  H   -2.838 1.811 -7.804\n  H   -1.927 1.238 -9.033\n  O   1.184 -8.406 -4.271\n  H   0.289 -8.227 -3.862\n  H   1.816 -7.671 -4.024\n  O   -1.759 -5.986 5.639\n  H   -1.238 -5.812 4.803\n  H   -2.042 -6.945 5.662\n  O   -2.006 5.584 0.364\n  H   -1.395 5.940 -0.343\n  H   -1.706 4.668 0.634\n  O   -4.223 -3.032 -7.462\n  H   -4.510 -2.086 -7.314\n  H   -3.597 -3.309 -6.734\n  O   -0.809 -7.960 1.390\n  H   -1.522 -8.595 1.092\n  H   -0.870 -7.116 0.857\n  O   5.950 -4.502 -3.135\n  H   6.883 -4.774 -2.897\n  H   5.299 -5.061 -2.622\n  O   -3.940 -5.480 1.339\n  H   -3.935 -6.239 1.991\n  H   -4.884 -5.249 1.103\n  O   1.479 6.047 -6.364\n  H   0.992 6.875 -6.088\n  H   2.446 6.260 -6.505\n  O   -5.989 7.555 0.510\n  H   -6.325 6.623 0.371\n  H   -6.104 8.080 -0.333\n  O   -0.077 3.440 -2.750\n  H   0.503 2.709 -2.390\n  H   -0.034 4.231 -2.140\n  O   -3.562 -0.141 2.104\n  H   -3.670 -1.112 1.889\n  H   -4.304 0.150 2.708\n  O   2.145 -6.344 -2.231\n  H   3.120 -6.559 -2.291\n  H   1.719 -6.921 -1.534\n  O   3.486 -6.707 -6.725\n  H   3.931 -7.296 -6.051\n  H   3.591 -5.750 -6.453\n  O   3.117 5.630 4.947\n  H   2.437 5.438 5.655\n  H   2.900 6.500 4.504\n  O   2.865 1.448 -3.822\n  H   2.102 0.810 -3.928\n  H   3.231 1.378 -2.894\n  O   -2.134 0.325 6.016\n  H   -2.949 0.903 5.987\n  H   -1.804 0.168 5.085\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   2.245 -0.070 -7.994\n  H   2.050 -0.872 -8.559\n  H   1.385 0.356 -7.712\n  O   -3.771 6.541 4.451\n  H   -3.120 6.986 5.066\n  H   -4.025 7.173 3.719\n  O   -3.083 5.492 -3.884\n  H   -2.244 6.034 -3.822\n  H   -3.646 5.655 -3.073\n  O   6.549 -1.629 -6.134\n  H   6.179 -1.178 -6.947\n  H   5.996 -1.385 -5.337\n  O   -6.423 -2.669 3.744\n  H   -7.133 -2.666 3.040\n  H   -6.827 -2.922 4.624\n  O   5.518 5.429 -5.599\n  H   5.103 4.520 -5.550\n  H   6.371 5.378 -6.119\n  O   0.536 5.441 -0.945\n  H   1.398 5.073 -0.598\n  H   0.599 6.437 -1.008\n  O   -0.412 4.121 7.686\n  H   -0.671 3.161 7.796\n  H   0.304 4.351 8.345\n  O   -0.932 -3.524 2.530\n  H   -0.441 -2.916 3.154\n  H   -0.772 -4.475 2.796\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   5.087 -4.778 1.625\n  H   5.098 -3.800 1.833\n  H   4.441 -4.954 0.882\n  O   9.306 -1.472 -0.457\n  H   9.298 -2.333 -0.966\n  H   8.763 -0.789 -0.947\n  O   4.558 2.619 -5.781\n  H   3.910 2.456 -5.038\n  H   4.121 2.410 -6.657\n  O   -1.128 -7.398 -2.954\n  H   -1.640 -8.210 -2.673\n  H   -1.178 -6.707 -2.233\n  O   -4.850 6.232 -5.686\n  H   -4.011 6.277 -5.143\n  H   -4.619 6.249 -6.659\n  O   2.889 2.658 -8.186\n  H   2.770 1.706 -8.467\n  H   1.994 3.097 -8.110\n  O   6.997 -0.718 6.306\n  H   7.672 -0.198 5.782\n  H   7.437 -1.517 6.715\n  O   -7.918 1.301 -3.143\n  H   -6.959 1.023 -3.197\n  H   -8.435 0.620 -2.624\n  O   3.500 -3.912 7.720\n  H   4.049 -3.076 7.711\n  H   3.854 -4.550 7.036\n  O   7.958 -1.838 3.365\n  H   7.996 -0.854 3.190\n  H   7.035 -2.174 3.179\n  O   -4.191 -7.483 3.353\n  H   -3.364 -7.577 3.908\n  H   -4.449 -8.377 2.987\n  O   -4.227 5.725 -1.282\n  H   -5.034 5.348 -0.826\n  H   -3.445 5.688 -0.661\n  O   4.106 -0.877 -4.871\n  H   3.327 -1.490 -4.999\n  H   3.782 0.067 -4.813\n  O   6.833 1.952 -4.327\n  H   6.068 2.142 -4.943\n  H   7.682 1.906 -4.855\n  O   -4.111 -2.648 2.417\n  H   -3.284 -3.052 2.810\n  H   -4.914 -2.999 2.898\n  O   -6.546 -6.100 4.045\n  H   -6.395 -5.153 4.329\n  H   -5.665 -6.541 3.872\n  O   -7.147 -2.401 -6.115\n  H   -6.641 -3.072 -5.572\n  H   -8.083 -2.330 -5.769\n  O   6.723 1.948 0.853\n  H   6.382 1.169 0.328\n  H   7.362 2.475 0.292\n  O   -0.571 1.311 8.043\n  H   0.313 0.914 8.291\n  H   -0.891 0.901 7.188\n  O   -8.493 -2.561 1.927\n  H   -9.246 -2.330 2.543\n  H   -8.752 -2.340 0.986\n  O   4.912 -0.265 4.360\n  H   4.609 0.665 4.149\n  H   5.640 -0.230 5.046\n  O   5.352 4.701 -0.048\n  H   5.850 4.342 0.742\n  H   5.660 4.234 -0.877\n  O   7.940 0.152 -2.111\n  H   7.570 0.886 -2.681\n  H   7.221 -0.517 -1.921\n  O   5.888 -1.800 -2.940\n  H   5.229 -1.345 -3.540\n  H   5.794 -2.791 -3.031\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\n  O   -1.040 7.276 -4.144\n  H   -0.192 7.211 -3.617\n  H   -0.851 7.711 -5.025\n  O   -3.497 -4.223 6.794\n  H   -2.862 -3.458 6.906\n  H   -3.107 -4.889 6.157\n  O   8.413 4.473 -0.589\n  H   8.692 4.954 0.242\n  H   9.168 4.474 -1.245\n  O   0.891 -0.095 -4.585\n  H   1.370 -0.796 -5.115\n  H   0.214 0.358 -5.166\n  O   -7.160 5.526 3.647\n  H   -7.450 6.336 4.157\n  H   -6.268 5.696 3.229\n  O   4.118 8.839 -1.791\n  H   4.506 8.434 -0.963\n  H   4.100 8.155 -2.520\n  O   -1.675 3.224 3.349\n  H   -1.164 3.751 4.028\n  H   -1.596 3.666 2.455\n  O   4.080 -7.695 1.256\n  H   4.959 -8.005 0.894\n  H   4.099 -6.702 1.373\n  O   0.180 -3.354 -7.226\n  H   -0.436 -3.427 -8.011\n  H   0.492 -4.267 -6.963\n  O   4.731 -7.308 -1.953\n  H   4.528 -8.286 -2.008\n  H   5.347 -7.138 -1.183\n  O   4.713 -5.705 5.949\n  H   5.264 -5.537 5.132\n  H   5.295 -6.077 6.673\n  O   -1.868 -3.701 -8.968\n  H   -2.407 -3.382 -8.188\n  H   -2.050 -3.118 -9.760\n  O   1.262 -3.954 -3.289\n  H   0.410 -4.196 -3.754\n  H   1.684 -4.780 -2.914\n  O   -6.482 1.649 -6.374\n  H   -5.847 1.368 -5.654\n  H   -7.076 2.376 -6.030\n  O   -2.746 9.171 -2.040\n  H   -3.551 9.761 -2.100\n  H   -2.785 8.479 -2.762\n  O   1.522 -2.362 9.024\n  H   0.867 -2.777 9.656\n  H   2.059 -3.080 8.580\n  O   -5.387 -4.448 -4.788\n  H   -5.604 -5.131 -5.485\n  H   -4.530 -3.989 -5.025\nend\n\n\n\n\n\n\n\n\n\n# water*70\ngeometry\n  units angstrom\n  O   -2.591 -0.898 -4.405\n  H   -1.704 -0.542 -4.109\n  H   -2.513 -1.255 -5.336\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   1.451 3.499 2.870\n  H   1.210 4.168 3.573\n  H   1.914 3.961 2.113\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   -4.066 4.005 3.885\n  H   -3.995 4.957 4.183\n  H   -3.156 3.656 3.661\n  O   3.690 2.403 3.993\n  H   4.451 3.015 4.210\n  H   2.853 2.938 3.877\n  O   -5.022 0.649 -4.243\n  H   -4.273 -0.004 -4.353\n  H   -4.660 1.516 -3.898\n  O   -1.962 -2.092 7.241\n  H   -1.271 -2.150 6.519\n  H   -2.191 -1.132 7.406\n  O   -5.658 0.190 3.826\n  H   -6.561 0.552 3.590\n  H   -5.729 -0.792 4.003\n  O   5.003 -2.167 2.276\n  H   5.065 -1.570 3.076\n  H   4.079 -2.121 1.897\n  O   2.740 -5.205 -0.011\n  H   2.359 -4.286 0.096\n  H   2.592 -5.521 -0.948\n  O   -1.040 -5.189 -4.625\n  H   -0.456 -5.402 -5.409\n  H   -1.364 -6.038 -4.209\n  O   3.101 6.996 1.942\n  H   3.131 5.997 1.961\n  H   2.165 7.299 1.760\n  O   -3.064 -3.450 -4.998\n  H   -2.319 -4.108 -4.887\n  H   -2.886 -2.645 -4.432\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   -4.250 2.926 -3.199\n  H   -3.744 3.772 -3.366\n  H   -4.529 2.888 -2.239\n  O   2.088 -2.599 -5.399\n  H   1.534 -2.826 -6.201\n  H   1.842 -3.205 -4.642\n  O   0.089 3.928 -5.479\n  H   0.674 4.692 -5.749\n  H   0.099 3.835 -4.483\n  O   -4.393 1.699 5.817\n  H   -4.900 1.329 5.038\n  H   -4.513 2.691 5.852\n  O   -5.179 -2.392 -0.345\n  H   -4.607 -2.632 0.440\n  H   -4.606 -2.005 -1.068\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -0.184 -5.996 3.292\n  H   0.634 -5.834 3.843\n  H   -0.166 -6.929 2.933\n  O   6.744 2.879 -1.799\n  H   6.709 2.499 -2.723\n  H   7.445 3.592 -1.757\n  O   -1.799 -1.423 -6.793\n  H   -2.095 -0.572 -7.227\n  H   -0.887 -1.667 -7.123\n  O   -1.562 1.556 -3.743\n  H   -0.872 2.240 -3.503\n  H   -2.461 1.867 -3.431\n  O   2.161 -0.896 4.600\n  H   3.160 -0.935 4.567\n  H   1.841 -0.115 4.063\n  O   0.107 1.468 -6.868\n  H   -0.101 2.302 -6.356\n  H   -0.572 1.343 -7.592\n  O   0.219 7.296 1.815\n  H   -0.497 7.981 1.682\n  H   -0.094 6.413 1.464\n  O   -6.699 -0.093 -0.118\n  H   -7.620 -0.447 0.044\n  H   -6.029 -0.693 0.319\n  O   -2.020 -5.788 -0.763\n  H   -1.639 -4.864 -0.801\n  H   -2.820 -5.794 -0.163\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   3.544 0.925 -1.230\n  H   4.454 0.792 -1.623\n  H   3.590 0.812 -0.237\n  O   -5.557 2.427 -0.659\n  H   -6.083 1.596 -0.841\n  H   -5.458 2.550 0.328\n  O   -5.728 2.979 1.921\n  H   -5.008 3.330 2.519\n  H   -6.318 2.358 2.438\n  O   2.718 4.262 0.458\n  H   3.685 4.442 0.273\n  H   2.550 3.276 0.419\n  O   4.068 1.601 1.434\n  H   5.026 1.810 1.239\n  H   3.871 1.805 2.394\n  O   5.833 -0.679 -0.244\n  H   5.908 -1.110 0.656\n  H   5.768 -1.386 -0.948\n  O   -0.227 4.984 5.241\n  H   -0.206 4.365 6.026\n  H   -0.565 5.880 5.531\n  O   0.185 -2.868 5.188\n  H   0.595 -3.776 5.275\n  H   0.903 -2.173 5.222\n  O   1.567 -0.094 7.082\n  H   1.675 -0.270 6.104\n  H   1.702 -0.945 7.591\n  O   -6.733 -3.792 -2.231\n  H   -6.154 -3.985 -3.023\n  H   -6.211 -3.273 -1.555\n  O   -2.006 5.584 0.364\n  H   -1.395 5.940 -0.343\n  H   -1.706 4.668 0.634\n  O   -3.940 -5.480 1.339\n  H   -3.935 -6.239 1.991\n  H   -4.884 -5.249 1.103\n  O   -0.077 3.440 -2.750\n  H   0.503 2.709 -2.390\n  H   -0.034 4.231 -2.140\n  O   -3.562 -0.141 2.104\n  H   -3.670 -1.112 1.889\n  H   -4.304 0.150 2.708\n  O   2.145 -6.344 -2.231\n  H   3.120 -6.559 -2.291\n  H   1.719 -6.921 -1.534\n  O   2.865 1.448 -3.822\n  H   2.102 0.810 -3.928\n  H   3.231 1.378 -2.894\n  O   -2.134 0.325 6.016\n  H   -2.949 0.903 5.987\n  H   -1.804 0.168 5.085\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   -3.083 5.492 -3.884\n  H   -2.244 6.034 -3.822\n  H   -3.646 5.655 -3.073\n  O   0.536 5.441 -0.945\n  H   1.398 5.073 -0.598\n  H   0.599 6.437 -1.008\n  O   -0.932 -3.524 2.530\n  H   -0.441 -2.916 3.154\n  H   -0.772 -4.475 2.796\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   5.087 -4.778 1.625\n  H   5.098 -3.800 1.833\n  H   4.441 -4.954 0.882\n  O   4.558 2.619 -5.781\n  H   3.910 2.456 -5.038\n  H   4.121 2.410 -6.657\n  O   -1.128 -7.398 -2.954\n  H   -1.640 -8.210 -2.673\n  H   -1.178 -6.707 -2.233\n  O   -4.227 5.725 -1.282\n  H   -5.034 5.348 -0.826\n  H   -3.445 5.688 -0.661\n  O   4.106 -0.877 -4.871\n  H   3.327 -1.490 -4.999\n  H   3.782 0.067 -4.813\n  O   -4.111 -2.648 2.417\n  H   -3.284 -3.052 2.810\n  H   -4.914 -2.999 2.898\n  O   6.723 1.948 0.853\n  H   6.382 1.169 0.328\n  H   7.362 2.475 0.292\n  O   -0.571 1.311 8.043\n  H   0.313 0.914 8.291\n  H   -0.891 0.901 7.188\n  O   4.912 -0.265 4.360\n  H   4.609 0.665 4.149\n  H   5.640 -0.230 5.046\n  O   5.352 4.701 -0.048\n  H   5.850 4.342 0.742\n  H   5.660 4.234 -0.877\n  O   7.940 0.152 -2.111\n  H   7.570 0.886 -2.681\n  H   7.221 -0.517 -1.921\n  O   5.888 -1.800 -2.940\n  H   5.229 -1.345 -3.540\n  H   5.794 -2.791 -3.031\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\n  O   0.891 -0.095 -4.585\n  H   1.370 -0.796 -5.115\n  H   0.214 0.358 -5.166\n  O   -1.675 3.224 3.349\n  H   -1.164 3.751 4.028\n  H   -1.596 3.666 2.455\n  O   1.262 -3.954 -3.289\n  H   0.410 -4.196 -3.754\n  H   1.684 -4.780 -2.914\nend\n\n\n\n\n# water*17\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -1.562 1.556 -3.743\n  H   -0.872 2.240 -3.503\n  H   -2.461 1.867 -3.431\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   3.544 0.925 -1.230\n  H   4.454 0.792 -1.623\n  H   3.590 0.812 -0.237\n  O   2.718 4.262 0.458\n  H   3.685 4.442 0.273\n  H   2.550 3.276 0.419\n  O   4.068 1.601 1.434\n  H   5.026 1.810 1.239\n  H   3.871 1.805 2.394\n  O   -0.077 3.440 -2.750\n  H   0.503 2.709 -2.390\n  H   -0.034 4.231 -2.140\n  O   -3.562 -0.141 2.104\n  H   -3.670 -1.112 1.889\n  H   -4.304 0.150 2.708\n  O   2.865 1.448 -3.822\n  H   2.102 0.810 -3.928\n  H   3.231 1.378 -2.894\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   -0.932 -3.524 2.530\n  H   -0.441 -2.916 3.154\n  H   -0.772 -4.475 2.796\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n\n\n# water*9\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n\n\n\n\ngeometry\n  Be 0 0 0\n  Be 0 0 5\n  Be 0 0 10\n  Be 0 0 15\n  Be 0 0 20\nend\n\n\n\ngeometry units angstrom\n  C       0.00000000    -6.57066292     0.73848372\n  C       0.00000000    -6.60225812    -0.65456736\n  C       0.00000000    -5.43007368    -1.40076891\n  C       0.00000000    -5.36330799     1.42585428\n  C       0.00000000    -4.22967955    -0.71079219\n  C       0.00000000    -4.19990875     0.67670900\n  C       0.00000000    -2.80646371    -1.15976897\n  C       0.00000000    -2.75378679     1.05397939\n  N       0.00000000    -1.94216336     0.02203868\n  N       0.00000000    -2.46973319    -2.40807441\n  C       0.00000000    -1.13722934    -2.84316810\n  C       0.00000000    -0.70829944    -4.17971422\n  C       0.00000000     0.70829944    -4.17971422\n  C       0.00000000    -1.42548100    -5.42108270\n  C       0.00000000     1.42548100    -5.42108270\n  C       0.00000000    -0.72166760    -6.57094565\n  C       0.00000000     0.72166760    -6.57094565\n  C       0.00000000     1.13722934    -2.84316810\n  N       0.00000000     0.00000000    -2.05529773\n  N       0.00000000     2.46973319    -2.40807441\n  C       0.00000000     2.80646371    -1.15976897\n  C       0.00000000     4.22967955    -0.71079219\n  C       0.00000000     4.19990875     0.67670900\n  C       0.00000000     5.43007368    -1.40076891\n  C       0.00000000     5.36330799     1.42585428\n  C       0.00000000     6.60225812    -0.65456736\n  C       0.00000000     6.57066292     0.73848372\n  C       0.00000000     2.75378679     1.05397939\n  N       0.00000000     1.94216336     0.02203868\n  N       0.00000000     2.41651496     2.44066365\n  C       0.00000000     1.17102097     2.79221677\n  C       0.00000000     0.69578802     4.21229953\n  C       0.00000000     1.41225139     5.39603157\n  C       0.00000000    -0.69578802     4.21229953\n  C       0.00000000     0.69615018     6.58758069\n  C       0.00000000    -0.69615018     6.58758069\n  C       0.00000000    -1.41225139     5.39603157\n  C       0.00000000    -1.17102097     2.79221677\n  N       0.00000000     0.00000000     2.01190406\n  N       0.00000000    -2.41651496     2.44066365\n  H       0.00000000    -7.50221102     1.29023128\n  H       0.00000000    -7.55905069    -1.16215824\n  H       0.00000000    -5.45391076    -2.48342941\n  H       0.00000000    -5.33214541     2.50849953\n  H       0.00000000    -2.50817646    -5.41401885\n  H       0.00000000     2.50817646    -5.41401885\n  H       0.00000000    -1.23255280    -7.52549328\n  H       0.00000000     1.23255280    -7.52549328\n  H       0.00000000     0.00000000    -1.03062531\n  H       0.00000000     5.45391076    -2.48342941\n  H       0.00000000     5.33214541     2.50849953\n  H       0.00000000     7.55905069    -1.16215824\n  H       0.00000000     7.50221102     1.29023128\n  H       0.00000000     2.49546971     5.38908289\n  H       0.00000000     1.22750464     7.53136911\n  H       0.00000000    -1.22750464     7.53136911\n  H       0.00000000    -2.49546971     5.38908289\n  H       0.00000000     0.00000000     0.99326200\nend\n\n\n#GGA_XC_HCTH_120\n\ngeometry\n  ne 0 0 0\nend\n\ngeometry\n  Zn 0 0 0\nend\n\n#Jacob toluene\ngeometry\n C       0.016176   0.361483   2.280364\n C      -0.002845  -2.282501   2.284741\n C      -0.013637  -3.615233   0.000000\n C      -0.002845  -2.282501  -2.284741\n C       0.016176   0.361483  -2.280364\n C       0.019549   1.723708   0.000000\n C      -0.018082   4.583929   0.000000\n H       0.031955   1.382457   4.062369\n H      -0.001328  -3.298665   4.067518\n H      -0.022277  -5.666514   0.000000\n H      -0.001328  -3.298665  -4.067518\n H       0.031955   1.382457  -4.062369\n H      -1.962607   5.312185   0.000000\n H       0.924974   5.353492   1.674256\n H       0.924974   5.353492  -1.674256\nend\n\n\n\n\n\n\n\n\n\ngeometry\n  units atomic\n  eprec 1e-7\n  li 0 0 0\n  h  0 0 3.015\nend\n\n\n#  nopen 1\n#  charge 1\n\n\n\n\n\n\n\n\n\ngeometry \n  units angstrom\n  eprec 1e-5\n  si 0 0 0\n  o  0 0 1.497\nend\n\n#Jacob toluene\ngeometry\n C       0.016176   0.361483   2.280364\n C      -0.002845  -2.282501   2.284741\n C      -0.013637  -3.615233   0.000000\n C      -0.002845  -2.282501  -2.284741\n C       0.016176   0.361483  -2.280364\n C       0.019549   1.723708   0.000000\n C      -0.018082   4.583929   0.000000\n H       0.031955   1.382457   4.062369\n H      -0.001328  -3.298665   4.067518\n H      -0.022277  -5.666514   0.000000\n H      -0.001328  -3.298665  -4.067518\n H       0.031955   1.382457  -4.062369\n H      -1.962607   5.312185   0.000000\n H       0.924974   5.353492   1.674256\n H       0.924974   5.353492  -1.674256\nend\n\n# nh3 planar  HF -56.21761126\ngeometry\n  units angstrom\n    n    0.00000000     0.00000000    -0.10626291\n    h    0.00000000    -0.85288345    -0.59826899\n    h    0.00000000     0.85288345    -0.59826899\n    h    0.00000000     0.00000000     0.87853682\nend\n\n# nh3 pyramidal  HF -56.22520427\ngeometry\n  units angstrom\n    n     0.00000000     0.00000000     0.01177161\n    h     0.65833757     0.65833757    -0.35033403\n    h     0.24096828    -0.89930585    -0.35033403\n    h    -0.89930585     0.24096828    -0.35033403\nend\n\n\n\n\n\n# cytosine dimer for Sekino\ngeometry\n  units angstrom\n  H   2.12463854     1.70188069    -1.38610952\n  H   -3.23295934     1.69342623     0.47641891\n  H   -2.26445415     1.69668213     1.95185410\n  H   -2.05589366     1.69863264    -1.76964073\n  H    0.22467961     1.70095283    -2.82770064\n  H   -2.12463909    -1.69837138     1.38610899\n  H    3.23296127    -1.70569692    -0.47641706\n  H    2.26445518    -1.70319282    -1.95185311\n  H    2.05589391    -1.70018333     1.76964096\n  H   -0.22468003    -1.69826352     2.82770023\n  C   1.15231868     1.70044276     0.43750993\n  C  -1.16469474     1.69969004     0.25963531\n  C  -1.14698144     1.69859730    -1.16654510\n  C   0.08134323     1.70007399    -1.74393572\n  C  -1.15231874    -1.70005345    -0.43750999\n  C   1.16469480    -1.70002072    -0.25963526\n  C   1.14698177    -1.70068799     1.16654541\n  C  -0.08134333    -1.69942468     1.74393562\n  N   1.18722048     1.70101377    -0.98184363\n  N  -0.07878303     1.70014261     0.99488020\n  N  -2.32904107     1.70092840     0.93594615\n  N  -1.18722079    -1.69906446     0.98184334\n  N   0.07878303    -1.70013330    -0.99488020\n  N   2.32904070    -1.69861909    -0.93594650\n  O   2.20383984     1.70004181     1.05300682\n  O  -2.20383970    -1.70097249    -1.05300668  \nend\n\n\n\n\n\n\n\n\n\n\ngeometry\n  units angstrom\n  eprec 1e-4\n  N 0 0 0\n  N 0 0 1\nend\n\n\n\ngeometry\n  I 0 0 0\nend\n\n\n\n\n\n\n\ngeometry\n  Na 0 0 0\nend\n\n\n\n\n\n\n# (LiF)*32 cube\ngeometry\nF         15.21608       15.21608       11.41206\nF         15.21608       15.21608        3.80402\nF         15.21608       19.02010        7.60804\nF         15.21608       22.82412       11.41206\nF         19.02010       15.21608        7.60804\nF         19.02010       19.02010       11.41206\nF         22.82412       15.21608       11.41206\nF         15.21608       19.02010        0.00000\nF         15.21608       22.82412        3.80402\nF         15.21608       26.62814        7.60804\nF         19.02010       15.21608        0.00000\nF         19.02010       19.02010        3.80402\nF         19.02010       22.82412        7.60804\nF         19.02010       26.62814       11.41206\nF         22.82412       15.21608        3.80402\nF         22.82412       19.02010        7.60804\nF         22.82412       22.82412       11.41206\nF         26.62814       15.21608        7.60804\nF         26.62814       19.02010       11.41206\nF         15.21608       26.62814        0.00000\nF         19.02010       22.82412        0.00000\nF         19.02010       26.62814        3.80402\nF         22.82412       19.02010        0.00000\nF         22.82412       22.82412        3.80402\nF         22.82412       26.62814        7.60804\nF         26.62814       15.21608        0.00000\nF         26.62814       19.02010        3.80402\nF         26.62814       22.82412        7.60804\nF         26.62814       26.62814       11.41206\nF         22.82412       26.62814        0.00000\nF         26.62814       22.82412        0.00000\nF         26.62814       26.62814        3.80402\nLi        15.21608       15.21608        7.60804\nLi        15.21608       19.02010       11.41206\nLi        19.02010       15.21608       11.41206\nLi        15.21608       15.21608        0.00000\nLi        15.21608       19.02010        3.80402\nLi        15.21608       22.82412        7.60804\nLi        15.21608       26.62814       11.41206\nLi        19.02010       15.21608        3.80402\nLi        19.02010       19.02010        7.60804\nLi        19.02010       22.82412       11.41206\nLi        22.82412       15.21608        7.60804\nLi        22.82412       19.02010       11.41206\nLi        26.62814       15.21608       11.41206\nLi        15.21608       22.82412        0.00000\nLi        15.21608       26.62814        3.80402\nLi        19.02010       19.02010        0.00000\nLi        19.02010       22.82412        3.80402\nLi        19.02010       26.62814        7.60804\nLi        22.82412       15.21608        0.00000\nLi        22.82412       19.02010        3.80402\nLi        22.82412       22.82412        7.60804\nLi        22.82412       26.62814       11.41206\nLi        26.62814       15.21608        3.80402\nLi        26.62814       19.02010        7.60804\nLi        26.62814       22.82412       11.41206\nLi        19.02010       26.62814        0.00000\nLi        22.82412       22.82412        0.00000\nLi        22.82412       26.62814        3.80402\nLi        26.62814       19.02010        0.00000\nLi        26.62814       22.82412        3.80402\nLi        26.62814       26.62814        7.60804\nLi        26.62814       26.62814        0.00000\nend\n\n#(LiF)256 cube\ngeometry\nF    0.000000     0.000000    26.628140\nF    0.000000     0.000000    19.020100\nF    0.000000     3.804020    22.824120\nF    0.000000     7.608040    26.628140\nF    3.804020     0.000000    22.824120\nF    3.804020     3.804020    26.628140\nF    7.608040     0.000000    26.628140\nF    0.000000     0.000000    11.412060\nF    0.000000     3.804020    15.216080\nF    0.000000     7.608040    19.020100\nF    0.000000    11.412060    22.824120\nF    0.000000    15.216080    26.628140\nF    3.804020     0.000000    15.216080\nF    3.804020     3.804020    19.020100\nF    3.804020     7.608040    22.824120\nF    3.804020    11.412060    26.628140\nF    7.608040     0.000000    19.020100\nF    7.608040     3.804020    22.824120\nF    7.608040     7.608040    26.628140\nF   11.412060     0.000000    22.824120\nF   11.412060     3.804020    26.628140\nF   15.216080     0.000000    26.628140\nF    0.000000     0.000000     3.804020\nF    0.000000     3.804020     7.608040\nF    0.000000     7.608040    11.412060\nF    0.000000    11.412060    15.216080\nF    0.000000    15.216080    19.020100\nF    0.000000    19.020100    22.824120\nF    0.000000    22.824120    26.628140\nF    3.804020     0.000000     7.608040\nF    3.804020     3.804020    11.412060\nF    3.804020     7.608040    15.216080\nF    3.804020    11.412060    19.020100\nF    3.804020    15.216080    22.824120\nF    3.804020    19.020100    26.628140\nF    7.608040     0.000000    11.412060\nF    7.608040     3.804020    15.216080\nF    7.608040     7.608040    19.020100\nF    7.608040    11.412060    22.824120\nF    7.608040    15.216080    26.628140\nF   11.412060     0.000000    15.216080\nF   11.412060     3.804020    19.020100\nF   11.412060     7.608040    22.824120\nF   11.412060    11.412060    26.628140\nF   15.216080     0.000000    19.020100\nF   15.216080     3.804020    22.824120\nF   15.216080     7.608040    26.628140\nF   19.020100     0.000000    22.824120\nF   19.020100     3.804020    26.628140\nF   22.824120     0.000000    26.628140\nF    0.000000     3.804020     0.000000\nF    0.000000     7.608040     3.804020\nF    0.000000    11.412060     7.608040\nF    0.000000    15.216080    11.412060\nF    0.000000    19.020100    15.216080\nF    0.000000    22.824120    19.020100\nF    0.000000    26.628140    22.824120\nF    3.804020     0.000000     0.000000\nF    3.804020     3.804020     3.804020\nF    3.804020     7.608040     7.608040\nF    3.804020    11.412060    11.412060\nF    3.804020    15.216080    15.216080\nF    3.804020    19.020100    19.020100\nF    3.804020    22.824120    22.824120\nF    3.804020    26.628140    26.628140\nF    7.608040     0.000000     3.804020\nF    7.608040     3.804020     7.608040\nF    7.608040     7.608040    11.412060\nF    7.608040    11.412060    15.216080\nF    7.608040    15.216080    19.020100\nF    7.608040    19.020100    22.824120\nF    7.608040    22.824120    26.628140\nF   11.412060     0.000000     7.608040\nF   11.412060     3.804020    11.412060\nF   11.412060     7.608040    15.216080\nF   11.412060    11.412060    19.020100\nF   11.412060    15.216080    22.824120\nF   11.412060    19.020100    26.628140\nF   15.216080     0.000000    11.412060\nF   15.216080     3.804020    15.216080\nF   15.216080     7.608040    19.020100\nF   15.216080    11.412060    22.824120\nF   15.216080    15.216080    26.628140\nF   19.020100     0.000000    15.216080\nF   19.020100     3.804020    19.020100\nF   19.020100     7.608040    22.824120\nF   19.020100    11.412060    26.628140\nF   22.824120     0.000000    19.020100\nF   22.824120     3.804020    22.824120\nF   22.824120     7.608040    26.628140\nF   26.628140     0.000000    22.824120\nF   26.628140     3.804020    26.628140\nF    0.000000    11.412060     0.000000\nF    0.000000    15.216080     3.804020\nF    0.000000    19.020100     7.608040\nF    0.000000    22.824120    11.412060\nF    0.000000    26.628140    15.216080\nF    3.804020     7.608040     0.000000\nF    3.804020    11.412060     3.804020\nF    3.804020    15.216080     7.608040\n F    3.804020    19.020100    11.412060\n F    3.804020    22.824120    15.216080\n F    3.804020    26.628140    19.020100\n F    7.608040     3.804020     0.000000\n F    7.608040     7.608040     3.804020\n F    7.608040    11.412060     7.608040\n F    7.608040    15.216080    11.412060\n F    7.608040    19.020100    15.216080\n F    7.608040    22.824120    19.020100\n F    7.608040    26.628140    22.824120\n F   11.412060     0.000000     0.000000\n F   11.412060     3.804020     3.804020\n F   11.412060     7.608040     7.608040\n F   11.412060    11.412060    11.412060\n F   11.412060    15.216080    15.216080\n F   11.412060    19.020100    19.020100\n F   11.412060    22.824120    22.824120\n F   11.412060    26.628140    26.628140\n F   15.216080     0.000000     3.804020\n F   15.216080     3.804020     7.608040\n F   15.216080     7.608040    11.412060\n F   15.216080    11.412060    15.216080\n F   15.216080    15.216080    19.020100\n F   15.216080    19.020100    22.824120\n F   15.216080    22.824120    26.628140\n F   19.020100     0.000000     7.608040\n F   19.020100     3.804020    11.412060\n F   19.020100     7.608040    15.216080\n F   19.020100    11.412060    19.020100\n F   19.020100    15.216080    22.824120\n F   19.020100    19.020100    26.628140\n F   22.824120     0.000000    11.412060\n F   22.824120     3.804020    15.216080\n F   22.824120     7.608040    19.020100\n F   22.824120    11.412060    22.824120\n F   22.824120    15.216080    26.628140\n F   26.628140     0.000000    15.216080\n F   26.628140     3.804020    19.020100\n F   26.628140     7.608040    22.824120\n F   26.628140    11.412060    26.628140\n F    0.000000    19.020100     0.000000\n F    0.000000    22.824120     3.804020\n F    0.000000    26.628140     7.608040\n F    3.804020    15.216080     0.000000\n F    3.804020    19.020100     3.804020\n F    3.804020    22.824120     7.608040\n F    3.804020    26.628140    11.412060\n F    7.608040    11.412060     0.000000\n F    7.608040    15.216080     3.804020\n F    7.608040    19.020100     7.608040\n F    7.608040    22.824120    11.412060\n F    7.608040    26.628140    15.216080\n F   11.412060     7.608040     0.000000\n F   11.412060    11.412060     3.804020\n F   11.412060    15.216080     7.608040\n F   11.412060    19.020100    11.412060\n F   11.412060    22.824120    15.216080\n F   11.412060    26.628140    19.020100\n F   15.216080     3.804020     0.000000\n F   15.216080     7.608040     3.804020\n F   15.216080    11.412060     7.608040\n F   15.216080    15.216080    11.412060\n F   15.216080    19.020100    15.216080\n F   15.216080    22.824120    19.020100\n F   15.216080    26.628140    22.824120\n F   19.020100     0.000000     0.000000\n F   19.020100     3.804020     3.804020\n F   19.020100     7.608040     7.608040\n F   19.020100    11.412060    11.412060\n F   19.020100    15.216080    15.216080\n F   19.020100    19.020100    19.020100\n F   19.020100    22.824120    22.824120\n F   19.020100    26.628140    26.628140\n F   22.824120     0.000000     3.804020\n F   22.824120     3.804020     7.608040\n F   22.824120     7.608040    11.412060\n F   22.824120    11.412060    15.216080\n F   22.824120    15.216080    19.020100\n F   22.824120    19.020100    22.824120\n F   22.824120    22.824120    26.628140\n F   26.628140     0.000000     7.608040\n F   26.628140     3.804020    11.412060\n F   26.628140     7.608040    15.216080\n F   26.628140    11.412060    19.020100\n F   26.628140    15.216080    22.824120\n F   26.628140    19.020100    26.628140\n F    0.000000    26.628140     0.000000\n F    3.804020    22.824120     0.000000\n F    3.804020    26.628140     3.804020\n F    7.608040    19.020100     0.000000\n F    7.608040    22.824120     3.804020\n F    7.608040    26.628140     7.608040\n F   11.412060    15.216080     0.000000\n F   11.412060    19.020100     3.804020\n F   11.412060    22.824120     7.608040\n F   11.412060    26.628140    11.412060\n F   15.216080    11.412060     0.000000\n F   15.216080    15.216080     3.804020\n F   15.216080    19.020100     7.608040\n F   15.216080    22.824120    11.412060\n F   15.216080    26.628140    15.216080\n F   19.020100     7.608040     0.000000\n F   19.020100    11.412060     3.804020\n F   19.020100    15.216080     7.608040\n F   19.020100    19.020100    11.412060\n F   19.020100    22.824120    15.216080\n F   19.020100    26.628140    19.020100\n F   22.824120     3.804020     0.000000\n F   22.824120     7.608040     3.804020\n F   22.824120    11.412060     7.608040\n F   22.824120    15.216080    11.412060\n F   22.824120    19.020100    15.216080\n F   22.824120    22.824120    19.020100\n F   22.824120    26.628140    22.824120\n F   26.628140     0.000000     0.000000\n F   26.628140     3.804020     3.804020\n F   26.628140     7.608040     7.608040\n F   26.628140    11.412060    11.412060\n F   26.628140    15.216080    15.216080\n F   26.628140    19.020100    19.020100\n F   26.628140    22.824120    22.824120\n F   26.628140    26.628140    26.628140\n F    7.608040    26.628140     0.000000\n F   11.412060    22.824120     0.000000\n F   11.412060    26.628140     3.804020\n F   15.216080    19.020100     0.000000\n F   15.216080    22.824120     3.804020\n F   15.216080    26.628140     7.608040\n F   19.020100    15.216080     0.000000\n F   19.020100    19.020100     3.804020\n F   19.020100    22.824120     7.608040\n F   19.020100    26.628140    11.412060\n F   22.824120    11.412060     0.000000\n F   22.824120    15.216080     3.804020\n F   22.824120    19.020100     7.608040\n F   22.824120    22.824120    11.412060\n F   22.824120    26.628140    15.216080\n F   26.628140     7.608040     0.000000\n F   26.628140    11.412060     3.804020\n F   26.628140    15.216080     7.608040\n F   26.628140    19.020100    11.412060\n F   26.628140    22.824120    15.216080\n F   26.628140    26.628140    19.020100\n F   15.216080    26.628140     0.000000\n F   19.020100    22.824120     0.000000\n F   19.020100    26.628140     3.804020\n F   22.824120    19.020100     0.000000\n F   22.824120    22.824120     3.804020\n F   22.824120    26.628140     7.608040\n F   26.628140    15.216080     0.000000\n F   26.628140    19.020100     3.804020\n F   26.628140    22.824120     7.608040\n F   26.628140    26.628140    11.412060\n F   22.824120    26.628140     0.000000\n F   26.628140    22.824120     0.000000\n F   26.628140    26.628140     3.804020\nLi    0.000000     0.000000    22.824120\nLi    0.000000     3.804020    26.628140\nLi    3.804020     0.000000    26.628140\nLi    0.000000     0.000000    15.216080\nLi    0.000000     3.804020    19.020100\nLi    0.000000     7.608040    22.824120\nLi    0.000000    11.412060    26.628140\nLi    3.804020     0.000000    19.020100\nLi    3.804020     3.804020    22.824120\nLi    3.804020     7.608040    26.628140\nLi    7.608040     0.000000    22.824120\nLi    7.608040     3.804020    26.628140\nLi   11.412060     0.000000    26.628140\nLi    0.000000     0.000000     7.608040\nLi    0.000000     3.804020    11.412060\nLi    0.000000     7.608040    15.216080\nLi    0.000000    11.412060    19.020100\nLi    0.000000    15.216080    22.824120\nLi    0.000000    19.020100    26.628140\nLi    3.804020     0.000000    11.412060\nLi    3.804020     3.804020    15.216080\nLi    3.804020     7.608040    19.020100\nLi    3.804020    11.412060    22.824120\nLi    3.804020    15.216080    26.628140\nLi    7.608040     0.000000    15.216080\nLi    7.608040     3.804020    19.020100\nLi    7.608040     7.608040    22.824120\nLi    7.608040    11.412060    26.628140\nLi   11.412060     0.000000    19.020100\nLi   11.412060     3.804020    22.824120\nLi   11.412060     7.608040    26.628140\nLi   15.216080     0.000000    22.824120\nLi   15.216080     3.804020    26.628140\nLi   19.020100     0.000000    26.628140\nLi    0.000000     0.000000     0.000000\nLi    0.000000     3.804020     3.804020\nLi    0.000000     7.608040     7.608040\nLi    0.000000    11.412060    11.412060\nLi    0.000000    15.216080    15.216080\nLi    0.000000    19.020100    19.020100\nLi    0.000000    22.824120    22.824120\nLi    0.000000    26.628140    26.628140\nLi    3.804020     0.000000     3.804020\nLi    3.804020     3.804020     7.608040\nLi    3.804020     7.608040    11.412060\nLi    3.804020    11.412060    15.216080\nLi    3.804020    15.216080    19.020100\nLi    3.804020    19.020100    22.824120\nLi    3.804020    22.824120    26.628140\nLi    7.608040     0.000000     7.608040\nLi    7.608040     3.804020    11.412060\nLi    7.608040     7.608040    15.216080\nLi    7.608040    11.412060    19.020100\nLi    7.608040    15.216080    22.824120\nLi    7.608040    19.020100    26.628140\nLi   11.412060     0.000000    11.412060\nLi   11.412060     3.804020    15.216080\nLi   11.412060     7.608040    19.020100\nLi   11.412060    11.412060    22.824120\nLi   11.412060    15.216080    26.628140\nLi   15.216080     0.000000    15.216080\nLi   15.216080     3.804020    19.020100\nLi   15.216080     7.608040    22.824120\nLi   15.216080    11.412060    26.628140\nLi   19.020100     0.000000    19.020100\nLi   19.020100     3.804020    22.824120\nLi   19.020100     7.608040    26.628140\nLi   22.824120     0.000000    22.824120\nLi   22.824120     3.804020    26.628140\nLi   26.628140     0.000000    26.628140\nLi    0.000000     7.608040     0.000000\nLi    0.000000    11.412060     3.804020\nLi    0.000000    15.216080     7.608040\nLi    0.000000    19.020100    11.412060\nLi    0.000000    22.824120    15.216080\nLi    0.000000    26.628140    19.020100\nLi    3.804020     3.804020     0.000000\nLi    3.804020     7.608040     3.804020\nLi    3.804020    11.412060     7.608040\nLi    3.804020    15.216080    11.412060\nLi    3.804020    19.020100    15.216080\nLi    3.804020    22.824120    19.020100\nLi    3.804020    26.628140    22.824120\nLi    7.608040     0.000000     0.000000\nLi    7.608040     3.804020     3.804020\nLi    7.608040     7.608040     7.608040\nLi    7.608040    11.412060    11.412060\nLi    7.608040    15.216080    15.216080\nLi    7.608040    19.020100    19.020100\nLi    7.608040    22.824120    22.824120\nLi    7.608040    26.628140    26.628140\nLi   11.412060     0.000000     3.804020\nLi   11.412060     3.804020     7.608040\nLi   11.412060     7.608040    11.412060\nLi   11.412060    11.412060    15.216080\nLi   11.412060    15.216080    19.020100\nLi   11.412060    19.020100    22.824120\nLi   11.412060    22.824120    26.628140\nLi   15.216080     0.000000     7.608040\nLi   15.216080     3.804020    11.412060\nLi   15.216080     7.608040    15.216080\nLi   15.216080    11.412060    19.020100\nLi   15.216080    15.216080    22.824120\nLi   15.216080    19.020100    26.628140\nLi   19.020100     0.000000    11.412060\nLi   19.020100     3.804020    15.216080\nLi   19.020100     7.608040    19.020100\nLi   19.020100    11.412060    22.824120\nLi   19.020100    15.216080    26.628140\nLi   22.824120     0.000000    15.216080\nLi   22.824120     3.804020    19.020100\nLi   22.824120     7.608040    22.824120\nLi   22.824120    11.412060    26.628140\nLi   26.628140     0.000000    19.020100\nLi   26.628140     3.804020    22.824120\nLi   26.628140     7.608040    26.628140\nLi    0.000000    15.216080     0.000000\nLi    0.000000    19.020100     3.804020\nLi    0.000000    22.824120     7.608040\nLi    0.000000    26.628140    11.412060\nLi    3.804020    11.412060     0.000000\nLi    3.804020    15.216080     3.804020\nLi    3.804020    19.020100     7.608040\nLi    3.804020    22.824120    11.412060\nLi    3.804020    26.628140    15.216080\nLi    7.608040     7.608040     0.000000\nLi    7.608040    11.412060     3.804020\nLi    7.608040    15.216080     7.608040\nLi    7.608040    19.020100    11.412060\nLi    7.608040    22.824120    15.216080\nLi    7.608040    26.628140    19.020100\nLi   11.412060     3.804020     0.000000\nLi   11.412060     7.608040     3.804020\nLi   11.412060    11.412060     7.608040\nLi   11.412060    15.216080    11.412060\nLi   11.412060    19.020100    15.216080\nLi   11.412060    22.824120    19.020100\nLi   11.412060    26.628140    22.824120\nLi   15.216080     0.000000     0.000000\nLi   15.216080     3.804020     3.804020\nLi   15.216080     7.608040     7.608040\nLi   15.216080    11.412060    11.412060\nLi   15.216080    15.216080    15.216080\nLi   15.216080    19.020100    19.020100\nLi   15.216080    22.824120    22.824120\nLi   15.216080    26.628140    26.628140\nLi   19.020100     0.000000     3.804020\nLi   19.020100     3.804020     7.608040\nLi   19.020100     7.608040    11.412060\nLi   19.020100    11.412060    15.216080\nLi   19.020100    15.216080    19.020100\nLi   19.020100    19.020100    22.824120\nLi   19.020100    22.824120    26.628140\nLi   22.824120     0.000000     7.608040\nLi   22.824120     3.804020    11.412060\nLi   22.824120     7.608040    15.216080\nLi   22.824120    11.412060    19.020100\nLi   22.824120    15.216080    22.824120\nLi   22.824120    19.020100    26.628140\nLi   26.628140     0.000000    11.412060\nLi   26.628140     3.804020    15.216080\nLi   26.628140     7.608040    19.020100\nLi   26.628140    11.412060    22.824120\nLi   26.628140    15.216080    26.628140\nLi    0.000000    22.824120     0.000000\nLi    0.000000    26.628140     3.804020\nLi    3.804020    19.020100     0.000000\nLi    3.804020    22.824120     3.804020\nLi    3.804020    26.628140     7.608040\nLi    7.608040    15.216080     0.000000\nLi    7.608040    19.020100     3.804020\nLi    7.608040    22.824120     7.608040\nLi    7.608040    26.628140    11.412060\nLi   11.412060    11.412060     0.000000\nLi   11.412060    15.216080     3.804020\nLi   11.412060    19.020100     7.608040\nLi   11.412060    22.824120    11.412060\nLi   11.412060    26.628140    15.216080\nLi   15.216080     7.608040     0.000000\nLi   15.216080    11.412060     3.804020\nLi   15.216080    15.216080     7.608040\nLi   15.216080    19.020100    11.412060\nLi   15.216080    22.824120    15.216080\nLi   15.216080    26.628140    19.020100\nLi   19.020100     3.804020     0.000000\nLi   19.020100     7.608040     3.804020\nLi   19.020100    11.412060     7.608040\nLi   19.020100    15.216080    11.412060\nLi   19.020100    19.020100    15.216080\nLi   19.020100    22.824120    19.020100\nLi   19.020100    26.628140    22.824120\nLi   22.824120     0.000000     0.000000\nLi   22.824120     3.804020     3.804020\nLi   22.824120     7.608040     7.608040\nLi   22.824120    11.412060    11.412060\nLi   22.824120    15.216080    15.216080\nLi   22.824120    19.020100    19.020100\nLi   22.824120    22.824120    22.824120\nLi   22.824120    26.628140    26.628140\nLi   26.628140     0.000000     3.804020\nLi   26.628140     3.804020     7.608040\nLi   26.628140     7.608040    11.412060\nLi   26.628140    11.412060    15.216080\nLi   26.628140    15.216080    19.020100\nLi   26.628140    19.020100    22.824120\nLi   26.628140    22.824120    26.628140\nLi    3.804020    26.628140     0.000000\nLi    7.608040    22.824120     0.000000\nLi    7.608040    26.628140     3.804020\nLi   11.412060    19.020100     0.000000\nLi   11.412060    22.824120     3.804020\nLi   11.412060    26.628140     7.608040\nLi   15.216080    15.216080     0.000000\nLi   15.216080    19.020100     3.804020\nLi   15.216080    22.824120     7.608040\nLi   15.216080    26.628140    11.412060\nLi   19.020100    11.412060     0.000000\nLi   19.020100    15.216080     3.804020\nLi   19.020100    19.020100     7.608040\nLi   19.020100    22.824120    11.412060\nLi   19.020100    26.628140    15.216080\nLi   22.824120     7.608040     0.000000\nLi   22.824120    11.412060     3.804020\nLi   22.824120    15.216080     7.608040\nLi   22.824120    19.020100    11.412060\nLi   22.824120    22.824120    15.216080\nLi   22.824120    26.628140    19.020100\nLi   26.628140     3.804020     0.000000\nLi   26.628140     7.608040     3.804020\nLi   26.628140    11.412060     7.608040\nLi   26.628140    15.216080    11.412060\nLi   26.628140    19.020100    15.216080\nLi   26.628140    22.824120    19.020100\nLi   26.628140    26.628140    22.824120\nLi   11.412060    26.628140     0.000000\nLi   15.216080    22.824120     0.000000\nLi   15.216080    26.628140     3.804020\nLi   19.020100    19.020100     0.000000\nLi   19.020100    22.824120     3.804020\nLi   19.020100    26.628140     7.608040\nLi   22.824120    15.216080     0.000000\nLi   22.824120    19.020100     3.804020\nLi   22.824120    22.824120     7.608040\nLi   22.824120    26.628140    11.412060\nLi   26.628140    11.412060     0.000000\nLi   26.628140    15.216080     3.804020\nLi   26.628140    19.020100     7.608040\nLi   26.628140    22.824120    11.412060\nLi   26.628140    26.628140    15.216080\nLi   19.020100    26.628140     0.000000\nLi   22.824120    22.824120     0.000000\nLi   22.824120    26.628140     3.804020\nLi   26.628140    19.020100     0.000000\nLi   26.628140    22.824120     3.804020\nLi   26.628140    26.628140     7.608040\nLi   26.628140    26.628140     0.000000\nend\n\n\n\n\ngeometry\n  eprec 1e-6\n  Li 0 0 0\n  Li 0 0 3\nend\n\n\n\n# Lithium atom\ngeometry\n  eprec 1e-6\n  Li 0 0 0\nend\n\n\ngeometry\n  Ne 0 0 0\nend\n\n\ngeometry\n  Be 0 0 0\n  Be 0 0 5\n  Be 0 0 10\n  Be 0 0 15\n  Be 0 0 20\nend\n\n\n\ngeometry\n  h 0 0 0\n  f 0 0 1.0\nend\n\n\n\n\n\n\n\n# water dimer\ngeometry\n  units angstrom\n  O -0.04537298   1.27083455    0.00000000\n  H  0.11541692   1.82777013    0.77758805\n  H  0.11541692   1.82777013   -0.77758805\n  O -0.10561006  -0.47346262    0.00000000\n  H -0.09896558  -1.45781563    0.00000000\n  H  0.84226145  -1.68923759    0.00000000\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ngeometry\n  li 0 0 0\n  f  0 0 2.5\nend\n\ngeometry\n  units angstrom\n  eprec 1e-5\n  N 0 0 0\n  N 0 0 1\nend\n\n\n\n\n\ngeometry\n  units atomic\n  he 0 0 0\n  he 4 0 0\n  he 0 4 0\n  he 0 0 4\n  he 4 4 0\n  he 4 0 4\n  he 0 4 4\n  he 4 4 4\nend\n\n\ngeometry\n  units angstrom\n  h 0 0 0\n  f 0 0 1.2\nend\n\n\n\n\n\n\n# D6h benzene at 6-31g* SCF =m\ngeometry\n  C  0.00000000    2.61951159     0.00000000\n  C  0.00000000   -2.61951159     0.00000000\n  C  2.26854281    1.30974042     0.00000000\n  C -2.26854281    1.30974042     0.00000000\n  C  2.26854281   -1.30974042     0.00000000\n  C -2.26854281   -1.30974042     0.00000000\n  H  0.00000000    4.65209154     0.00000000\n  H  0.00000000   -4.65209154     0.00000000\n  H  4.02886772    2.32598919     0.00000000\n  H -4.02886772    2.32598919     0.00000000\n  H  4.02886772   -2.32598919     0.00000000\n  H -4.02886772   -2.32598919     0.00000000\nend\n\n\n\ngeometry\n  units atomic\n  he 0 0 0\n  he 4 0 0\n  he 0 4 0\n  he 0 0 4\n  he 4 4 0\n  he 4 0 4\n  he 0 4 4\n  he 4 4 4\nend\n\n\n# water*5\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# D6h benzene at 6-31g* SCF =m\ngeometry\n  C  0.00000000    2.61951159     0.00000000\n  C  0.00000000   -2.61951159     0.00000000\n  C  2.26854281    1.30974042     0.00000000\n  C -2.26854281    1.30974042     0.00000000\n  C  2.26854281   -1.30974042     0.00000000\n  C -2.26854281   -1.30974042     0.00000000\n  H  0.00000000    4.65209154     0.00000000\n  H  0.00000000   -4.65209154     0.00000000\n  H  4.02886772    2.32598919     0.00000000\n  H -4.02886772    2.32598919     0.00000000\n  H  4.02886772   -2.32598919     0.00000000\n  H -4.02886772   -2.32598919     0.00000000\nend\n\n\n\n\n\n# D6h benzene at 6-31g* SCF =m\ngeometry\n  C  0.00000000    2.61951159     0.00000000\n  C  0.00000000   -2.61951159     0.00000000\n  C  2.26854281    1.30974042     0.00000000\n  C -2.26854281    1.30974042     0.00000000\n  C  2.26854281   -1.30974042     0.00000000\n  C -2.26854281   -1.30974042     0.00000000\n  H  0.00000000    4.65209154     0.00000000\n  H  0.00000000   -4.65209154     0.00000000\n  H  4.02886772    2.32598919     0.00000000\n  H -4.02886772    2.32598919     0.00000000\n  H  4.02886772   -2.32598919     0.00000000\n  H -4.02886772   -2.32598919     0.00000000\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# water*5\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n\n\n\n\n\n\n\n# water*70\ngeometry\n  units angstrom\n  O   -2.591 -0.898 -4.405\n  H   -1.704 -0.542 -4.109\n  H   -2.513 -1.255 -5.336\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   1.451 3.499 2.870\n  H   1.210 4.168 3.573\n  H   1.914 3.961 2.113\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   -4.066 4.005 3.885\n  H   -3.995 4.957 4.183\n  H   -3.156 3.656 3.661\n  O   3.690 2.403 3.993\n  H   4.451 3.015 4.210\n  H   2.853 2.938 3.877\n  O   -5.022 0.649 -4.243\n  H   -4.273 -0.004 -4.353\n  H   -4.660 1.516 -3.898\n  O   -1.962 -2.092 7.241\n  H   -1.271 -2.150 6.519\n  H   -2.191 -1.132 7.406\n  O   -5.658 0.190 3.826\n  H   -6.561 0.552 3.590\n  H   -5.729 -0.792 4.003\n  O   5.003 -2.167 2.276\n  H   5.065 -1.570 3.076\n  H   4.079 -2.121 1.897\n  O   2.740 -5.205 -0.011\n  H   2.359 -4.286 0.096\n  H   2.592 -5.521 -0.948\n  O   -1.040 -5.189 -4.625\n  H   -0.456 -5.402 -5.409\n  H   -1.364 -6.038 -4.209\n  O   3.101 6.996 1.942\n  H   3.131 5.997 1.961\n  H   2.165 7.299 1.760\n  O   -3.064 -3.450 -4.998\n  H   -2.319 -4.108 -4.887\n  H   -2.886 -2.645 -4.432\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   -4.250 2.926 -3.199\n  H   -3.744 3.772 -3.366\n  H   -4.529 2.888 -2.239\n  O   2.088 -2.599 -5.399\n  H   1.534 -2.826 -6.201\n  H   1.842 -3.205 -4.642\n  O   0.089 3.928 -5.479\n  H   0.674 4.692 -5.749\n  H   0.099 3.835 -4.483\n  O   -4.393 1.699 5.817\n  H   -4.900 1.329 5.038\n  H   -4.513 2.691 5.852\n  O   -5.179 -2.392 -0.345\n  H   -4.607 -2.632 0.440\n  H   -4.606 -2.005 -1.068\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -0.184 -5.996 3.292\n  H   0.634 -5.834 3.843\n  H   -0.166 -6.929 2.933\n  O   6.744 2.879 -1.799\n  H   6.709 2.499 -2.723\n  H   7.445 3.592 -1.757\n  O   -1.799 -1.423 -6.793\n  H   -2.095 -0.572 -7.227\n  H   -0.887 -1.667 -7.123\n  O   -1.562 1.556 -3.743\n  H   -0.872 2.240 -3.503\n  H   -2.461 1.867 -3.431\n  O   2.161 -0.896 4.600\n  H   3.160 -0.935 4.567\n  H   1.841 -0.115 4.063\n  O   0.107 1.468 -6.868\n  H   -0.101 2.302 -6.356\n  H   -0.572 1.343 -7.592\n  O   0.219 7.296 1.815\n  H   -0.497 7.981 1.682\n  H   -0.094 6.413 1.464\n  O   -6.699 -0.093 -0.118\n  H   -7.620 -0.447 0.044\n  H   -6.029 -0.693 0.319\n  O   -2.020 -5.788 -0.763\n  H   -1.639 -4.864 -0.801\n  H   -2.820 -5.794 -0.163\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   3.544 0.925 -1.230\n  H   4.454 0.792 -1.623\n  H   3.590 0.812 -0.237\n  O   -5.557 2.427 -0.659\n  H   -6.083 1.596 -0.841\n  H   -5.458 2.550 0.328\n  O   -5.728 2.979 1.921\n  H   -5.008 3.330 2.519\n  H   -6.318 2.358 2.438\n  O   2.718 4.262 0.458\n  H   3.685 4.442 0.273\n  H   2.550 3.276 0.419\n  O   4.068 1.601 1.434\n  H   5.026 1.810 1.239\n  H   3.871 1.805 2.394\n  O   5.833 -0.679 -0.244\n  H   5.908 -1.110 0.656\n  H   5.768 -1.386 -0.948\n  O   -0.227 4.984 5.241\n  H   -0.206 4.365 6.026\n  H   -0.565 5.880 5.531\n  O   0.185 -2.868 5.188\n  H   0.595 -3.776 5.275\n  H   0.903 -2.173 5.222\n  O   1.567 -0.094 7.082\n  H   1.675 -0.270 6.104\n  H   1.702 -0.945 7.591\n  O   -6.733 -3.792 -2.231\n  H   -6.154 -3.985 -3.023\n  H   -6.211 -3.273 -1.555\n  O   -2.006 5.584 0.364\n  H   -1.395 5.940 -0.343\n  H   -1.706 4.668 0.634\n  O   -3.940 -5.480 1.339\n  H   -3.935 -6.239 1.991\n  H   -4.884 -5.249 1.103\n  O   -0.077 3.440 -2.750\n  H   0.503 2.709 -2.390\n  H   -0.034 4.231 -2.140\n  O   -3.562 -0.141 2.104\n  H   -3.670 -1.112 1.889\n  H   -4.304 0.150 2.708\n  O   2.145 -6.344 -2.231\n  H   3.120 -6.559 -2.291\n  H   1.719 -6.921 -1.534\n  O   2.865 1.448 -3.822\n  H   2.102 0.810 -3.928\n  H   3.231 1.378 -2.894\n  O   -2.134 0.325 6.016\n  H   -2.949 0.903 5.987\n  H   -1.804 0.168 5.085\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   -3.083 5.492 -3.884\n  H   -2.244 6.034 -3.822\n  H   -3.646 5.655 -3.073\n  O   0.536 5.441 -0.945\n  H   1.398 5.073 -0.598\n  H   0.599 6.437 -1.008\n  O   -0.932 -3.524 2.530\n  H   -0.441 -2.916 3.154\n  H   -0.772 -4.475 2.796\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   5.087 -4.778 1.625\n  H   5.098 -3.800 1.833\n  H   4.441 -4.954 0.882\n  O   4.558 2.619 -5.781\n  H   3.910 2.456 -5.038\n  H   4.121 2.410 -6.657\n  O   -1.128 -7.398 -2.954\n  H   -1.640 -8.210 -2.673\n  H   -1.178 -6.707 -2.233\n  O   -4.227 5.725 -1.282\n  H   -5.034 5.348 -0.826\n  H   -3.445 5.688 -0.661\n  O   4.106 -0.877 -4.871\n  H   3.327 -1.490 -4.999\n  H   3.782 0.067 -4.813\n  O   -4.111 -2.648 2.417\n  H   -3.284 -3.052 2.810\n  H   -4.914 -2.999 2.898\n  O   6.723 1.948 0.853\n  H   6.382 1.169 0.328\n  H   7.362 2.475 0.292\n  O   -0.571 1.311 8.043\n  H   0.313 0.914 8.291\n  H   -0.891 0.901 7.188\n  O   4.912 -0.265 4.360\n  H   4.609 0.665 4.149\n  H   5.640 -0.230 5.046\n  O   5.352 4.701 -0.048\n  H   5.850 4.342 0.742\n  H   5.660 4.234 -0.877\n  O   7.940 0.152 -2.111\n  H   7.570 0.886 -2.681\n  H   7.221 -0.517 -1.921\n  O   5.888 -1.800 -2.940\n  H   5.229 -1.345 -3.540\n  H   5.794 -2.791 -3.031\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\n  O   0.891 -0.095 -4.585\n  H   1.370 -0.796 -5.115\n  H   0.214 0.358 -5.166\n  O   -1.675 3.224 3.349\n  H   -1.164 3.751 4.028\n  H   -1.596 3.666 2.455\n  O   1.262 -3.954 -3.289\n  H   0.410 -4.196 -3.754\n  H   1.684 -4.780 -2.914\nend\n\n\n"
  },
  {
    "path": "src/apps/moldft/lda.f",
    "content": "      subroutine x_rks_s(r,f,dfdra)\n      implicit none\nc\nc     This subroutine evaluates the spin polarised exchange functional\nc     in the Local Density Approximation [1], and the corresponding\nc     potential. Often this functional is referred to as the Dirac \nc     functional [2] or Slater functional.\nc\nc     [1] F. Bloch, Zeitschrift fuer Physik, Vol. 57 (1929) 545.\nc\nc     [2] P.A.M. Dirac, Proceedings of the Cambridge Philosophical\nc         Society, Vol. 26 (1930) 376.\nc\nc     Parameters:\nc\nc     r     the total electron density\nc     f     On return the functional value\nc     dfdra On return the derivative of f with respect to alpha electron\nc           density\nc\nc\nc     Ax = -3/4*(6/pi)**(1/3)\nc     Bx = -(6/pi)**(1/3)\nc     C  = (1/2)**(1/3)\n      real*8 Ax, Bx, C\n      parameter(Ax    = -0.930525736349100025002010218071667d0)\n      parameter(Bx    = -1.24070098179880003333601362409556d0)\n      parameter(C     =  0.793700525984099737375852819636154d0)\nc\n      real*8 third\n      parameter(third =  0.333333333333333333333333333333333d0)\nc\n      real*8 r\n      real*8 f, dfdra\nc\n      real*8 ra13\nc\n      ra13  = C*r**third\n      f     = Ax*r*ra13\n      dfdra = Bx*ra13 \nc\n      end\nc-----------------------------------------------------------------------\n      subroutine x_uks_s(ra,rb,f,dfdra,dfdrb)\n      implicit none\nc\nc     This subroutine evaluates the spin polarised exchange functional\nc     in the Local Density Approximation [1], and the corresponding\nc     potential. Often this functional is referred to as the Dirac \nc     functional [2] or Slater functional.\nc\nc     [1] F. Bloch, Zeitschrift fuer Physik, Vol. 57 (1929) 545.\nc\nc     [2] P.A.M. Dirac, Proceedings of the Cambridge Philosophical\nc         Society, Vol. 26 (1930) 376.\nc\nc     Parameters:\nc\nc     ra    the alpha electron density\nc     rb    the beta  electron density\nc     f     On return the functional value\nc     dfdra On return the derivative of f with respect to ra\nc     dfdrb On return the derivative of f with respect to rb\nc\nc\nc     Ax = -3/4*(6/pi)**(1/3)\nc     Bx = -(6/pi)**(1/3)\n      real*8 Ax, Bx\n      parameter(Ax    = -0.930525736349100025002010218071667d0)\n      parameter(Bx    = -1.24070098179880003333601362409556d0)\nc\n      real*8 third\n      parameter(third =  0.333333333333333333333333333333333d0)\nc\n      real*8 ra, rb\n      real*8 f, dfdra, dfdrb\nc\n      real*8 ra13, rb13\nc\n      ra13  = ra**third\n      rb13  = rb**third\n      f     = Ax*(ra*ra13+rb*rb13) \n      dfdra = Bx*ra13 \n      dfdrb = Bx*rb13 \nc\n      end\n      subroutine c_rks_vwn5(r,f,dfdra)\n      implicit none\nc\nc     This subroutine evaluates the Vosko, Wilk and Nusair correlation\nc     functional number 5 [1] for the closed shell case, with the \nc     parametrisation as given in table 5.\nc\nc     The original code was obtained from Dr. Phillip Young,\nc     with corrections from Dr. Paul Sherwood.\nc\nc     [1] S.H. Vosko, L. Wilk, and M. Nusair\nc         \"Accurate spin-dependent electron liquid correlation energies\nc          for local spin density calculations: a critical analysis\",\nc         Can.J.Phys, Vol. 58 (1980) 1200-1211.\nc\nc     Parameters:\nc\nc     r      the total electron density\nc     f      On return the functional value\nc     dfdra  On return the derivative of f with respect to the alpha\nc            electron density\nc\n      real*8 r\n      real*8 f, dfdra\nc\n      real*8 t4,t5,t6,t7\n      real*8 a2,b2,c2,d2\n      real*8 P1,P2,P3,P4\n      real*8 alpha_rho13\n      real*8 srho,srho13\n      real*8 iv,iv2,inv,i1,i2,i3\n      real*8 pp1,pp2\nc\n      real*8 n13, n43, n16, one, two, four\n      parameter(n13 = 0.333333333333333333333333333333d0)\n      parameter(n43 = 1.333333333333333333333333333333d0)\n      parameter(n16 = 0.166666666666666666666666666666d0)\n      parameter(one = 1.0d0)\n      parameter(two = 2.0d0)\n      parameter(four= 4.0d0)\nC \nC VWN interpolation parameters\nC\nC paramagnetic\n      a2 =  0.0621814d0 \n      b2 =  3.72744d0\n      c2 = 12.9352d0    \n      d2 = -0.10498d0\nC\nC t4 = (1/(4/3)*pi)**(1/3)\n      t4=0.620350490899399531d0\nC\nC t5 = 0.5/(2**(1/3)-1)\n      t5 = 1.92366105093153617d0\nC\nC t6 = 2/(3*(2**(1/3)-1))\n      t6 = 2.56488140124204822d0\nC\nC t7 = 2.25*(2**(1/3)-1)\n      t7 = 0.584822362263464735d0\nC\nC Paramagnetic interpolation constants\nC \n      P1 = 6.15199081975907980d0\n      P2 = a2 *0.5d0\n      P3 = 0.193804554230887489d-02 *0.5d0\n      P4 = 0.775665897562260176d-01 *0.5d0\nC\nC closed shell case\n      srho        = r\n      srho13      = srho**n13\n      alpha_rho13 = (0.5d0**n13)*srho\n      iv2         = T4/srho13\n      iv          = sqrt(iv2)\nC\nC paramagnetic\n      inv = 1.0d0/(iv2+b2*iv+c2)\n      i1  = log(iv2*inv)\n      i2  = log((iv-d2)*(iv-d2)*inv)\nc corrected b1->b2 ps Apr98\n      i3  = atan(P1/(2.0d0*iv+b2))\n      pp1 = P2*i1 + P3*i2 + P4*i3\n      pp2 = a2*(1.0d0/iv-iv*inv*(1.0d0+b2/(iv-d2))) \nC\n      f     = pp1*srho\n      dfdra = pp1 - n16*iv*pp2\nc\n      end\nc-----------------------------------------------------------------------\n      subroutine c_uks_vwn5(ra,rb,f,dfdra,dfdrb)\n      implicit none\nc\nc     This subroutine evaluates the Vosko, Wilk and Nusair correlation\nc     functional number 5 [1], with the parametrisation as given in\nc     table 5.\nc\nc     The original code was obtained from Dr. Phillip Young,\nc     with corrections from Dr. Paul Sherwood.\nc\nc     [1] S.H. Vosko, L. Wilk, and M. Nusair\nc         \"Accurate spin-dependent electron liquid correlation energies\nc          for local spin density calculations: a critical analysis\",\nc         Can.J.Phys, Vol. 58 (1980) 1200-1211.\nc\nc     Parameters:\nc\nc     ra     the alpha-electron density\nc     rb     the beta-electron density\nc     f      On return the functional value\nc     dfdra  On return the derivative of f with respect to ra\nc     dfdrb  On return the derivative of f with respect to rb\nc\n      real*8 ra, rb\n      real*8 f, dfdra, dfdrb\nc\n      real*8 t1,t2,t4,t5,t6,t7\n      real*8 a1,b1,c1,d1\n      real*8 a2,b2,c2,d2\n      real*8 a3,b3,c3,d3\n      real*8 S1,S2,S3,S4\n      real*8 P1,P2,P3,P4\n      real*8 F1,F2,F3,F4\n      real*8 inter1,inter2\n      real*8 alpha_rho13,beta_rho13\n      real*8 srho,srho13\n      real*8 iv,iv2,inv,i1,i2,i3\n      real*8 vwn1,vwn2\n      real*8 ss1,ss2,pp1,pp2,ff1,ff2\n      real*8 zeta,zeta3,zeta4\n      real*8 tau,dtau,v\nc\n      real*8 n13, n43, n16, one, two, four, tn13, tn43\nc     tn13 = 2**(1/3)\nc     tn43 = 2**(4/3)\n      parameter(n13 = 0.333333333333333333333333333333d0)\n      parameter(n43 = 1.333333333333333333333333333333d0)\n      parameter(n16 = 0.166666666666666666666666666667d0)\n      parameter(tn13= 1.25992104989487316476721060727823d0)\n      parameter(tn43= 2.51984209978974632953442121455646d0)\n      parameter(one = 1.0d0)\n      parameter(two = 2.0d0)\n      parameter(four= 4.0d0)\nC \nC VWN interpolation parameters\nC\nC spin stiffness\n      a1 = -0.337737278807791058d-01\n      b1 =  1.13107d0\n      c1 = 13.0045d0\n      d1 = -0.00475840d0\nC paramagnetic\n      a2 =  0.0621814d0 \n      b2 =  3.72744d0\n      c2 = 12.9352d0    \n      d2 = -0.10498d0\nC ferromagnetic\nc try cadpac/nwchem value (.5*a2)\n      a3 = 0.0310907d0\n      b3 =  7.06042d0\n      c3 = 18.0578d0\n      d3 = -0.32500d0\nC\nC t4 = (1/(4/3)*pi)**(1/3)\n      t4=0.620350490899399531d0\nC\nC t5 = 0.5/(2**(1/3)-1)\n      t5 = 1.92366105093153617d0\nC\nC t6 = 2/(3*(2**(1/3)-1))\n      t6 = 2.56488140124204822d0\nC\nC t7 = 2.25*(2**(1/3)-1)\n      t7 = 0.584822362263464735d0\nC\nC Spin stiffness interpolation constants\nC\n      S1 = 7.12310891781811772d0\n      S2 = a1 *0.5d0\n      S3 = -0.139834647015288626d-04 *0.5d0\n      S4 = -0.107301836977671539d-01 *0.5d0\nC\nC Paramagnetic interpolation constants\nC \n      P1 = 6.15199081975907980d0\n      P2 = a2 *0.5d0\n      P3 = 0.193804554230887489d-02 *0.5d0\n      P4 = 0.775665897562260176d-01 *0.5d0\nC\nC Ferromagnetic interpolation constants\nC\n      F1 = 4.73092690956011364d0\n      F2 = a3 *0.5d0\nc\nc      F3 = -0.244185082989490298d-02 *0.5d0\nc      F4 = -0.570212323620622186d-01 *0.5d0\nc\nc  try nwchem values\nc\n      F3 = 0.224786709554261133d-02 \n      F4 = 0.524913931697809227d-01 \nC\nC Interpolation intervals\nC \n      inter1 =  1.0d0-1.0d-10\n      inter2 = -1.0d0+1.0d-10\nC\nC open shell case\n      alpha_rho13 = ra**n13\n      beta_rho13  = rb**n13\n      srho        = ra+rb\n      srho13      = srho**n13\n      iv2         = T4/srho13\n      iv          = sqrt(iv2)\nC\nC spin-stiffness\n      inv = 1.0d0/(iv2+b1*iv+c1)\n      i1  = log(iv2*inv)\n      i2  = log((iv-d1)*(iv-d1)*inv)\n      i3  = atan(S1/(2.0d0*iv+b1))\n      ss1 = S2*i1 + S3*i2 + S4*i3\n      ss2 = a1*(1.0d0/iv-iv*inv*(1.0d0+b1/(iv-d1)))\nC\nC paramagnetic\n      inv = 1.0d0/(iv2+b2*iv+c2)\n      i1  = log(iv2*inv)\n      i2  = log((iv-d2)*(iv-d2)*inv)\nc corrected b1->b2 ps Apr98\n      i3  = atan(P1/(2.0d0*iv+b2))\n      pp1 = P2*i1 + P3*i2 + P4*i3\n      pp2 = a2*(1.0d0/iv-iv*inv*(1.0d0+b2/(iv-d2))) \nC\nC ferromagnetic\n      inv = 1.0d0/(iv2+b3*iv+c3)\n      i1  = log(iv2*inv)\n      i2  = log((iv-d3)*(iv-d3)*inv)\n      i3  = atan(F1/(2.0d0*iv+b3))\n      ff1 = F2*i1 + F3*i2 + F4*i3\n      ff2 = a3*(1.0d0/iv-iv*inv*(1.0d0+b3/(iv-d3)))\nC\nC polarisation function\nc\n      zeta  = (ra-rb)/srho\n      zeta3 = zeta*zeta*zeta\n      zeta4 = zeta3*zeta\n      if(zeta.gt.inter1) then\n         vwn1 = (tn43-two)*t5\n         vwn2 = (tn13)*t6\n      elseif(zeta.lt.inter2) then\n         vwn1 = (tn43-two)*t5\n         vwn2 = -(tn13)*t6\n      else\n         vwn1 = ((one+zeta)**n43+(one-zeta)**n43-two)*t5\n         vwn2 = ((one+zeta)**n13-(one-zeta)**n13)*t6\n      endif\n      ss1  = ss1*t7\n      ss2  = ss2*t7 \n      tau  = ff1-pp1-ss1\n      dtau = ff2-pp2-ss2\nc\n      v = pp1+vwn1*(ss1+tau*zeta4)\n      f = v*srho\nc\n      t1 = v - n16*iv*(pp2+vwn1*(ss2+dtau*zeta4))\n      t2 = vwn2*(ss1+tau*zeta4)+vwn1*four*tau*zeta3\n      dfdra = t1+t2*(one-zeta)\n      dfdrb = t1-t2*(one+zeta)\nc\n      end\n"
  },
  {
    "path": "src/apps/moldft/mad_moldft_test_energy.py.calc_info.ref.json",
    "content": "{\n    \"calcinfo_nalpha\": 1,\n    \"calcinfo_natom\": 1,\n    \"calcinfo_nbeta\": 1,\n    \"calcinfo_nmo\": 2,\n    \"k\": 8,\n    \"parameters\": {\n        \"charge\": 0.0,\n        \"conv_only_dens\": false,\n        \"dconv\": 0.001,\n        \"derivatives\": false,\n        \"dipole\": false,\n        \"econv\": 0.0001,\n        \"ginitial_hessian\": false,\n        \"gmaxiter\": 20,\n        \"gopt\": false,\n        \"gprec\": 0.0001,\n        \"gtest\": false,\n        \"gtol\": 0.0001,\n        \"gval\": 1e-05,\n        \"k\": -1,\n        \"l\": 50.0,\n        \"lo\": 0.013396,\n        \"loadbalparts\": 2,\n        \"maxiter\": 1,\n        \"maxrotn\": 0.25,\n        \"maxsub\": 10,\n        \"nalpha\": 1,\n        \"nbeta\": 1,\n        \"nio\": 1,\n        \"nmo_alpha\": 1,\n        \"nmo_beta\": 1,\n        \"no_compute\": false,\n        \"nopen\": 0,\n        \"npt_plot\": 101,\n        \"nv_factor\": 1,\n        \"nvalpha\": 0,\n        \"nvbeta\": 0,\n        \"orbitalshift\": 0.0,\n        \"plotcoul\": false,\n        \"plotdens\": false,\n        \"plothi\": -1,\n        \"plotlo\": 0,\n        \"print_level\": 3,\n        \"psp_calc\": false,\n        \"pure_ae\": true,\n        \"restart\": false,\n        \"restartao\": false,\n        \"save\": true,\n        \"smear\": 0.0,\n        \"spin_restricted\": true,\n        \"vnucextra\": 2\n    },\n    \"return_energy\": -2.861353410011521,\n    \"scf_e_data\": {\n        \"e_coulomb\": [\n            2.018645448166965,\n            2.04048235799564\n        ],\n        \"e_kinetic\": [\n            2.7628170728201096,\n            2.8227846011865667\n        ],\n        \"e_local\": [\n            0.0,\n            0.0\n        ],\n        \"e_nrep\": [\n            0.0,\n            0.0\n        ],\n        \"e_nuclear\": [\n            -6.626451864301439,\n            -6.704379191630678\n        ],\n        \"e_pcm\": [\n            0.0,\n            0.0\n        ],\n        \"e_tot\": [\n            -2.8543126357346864,\n            -2.861353410011521\n        ],\n        \"e_xc\": [\n            -1.0093232924203221,\n            -1.0202411775630498\n        ],\n        \"iterations\": 2\n    },\n    \"scf_eigenvalues_a\": {\n        \"dims\": [\n            1\n        ],\n        \"size\": 1,\n        \"vals\": [\n            -0.5563790539362039\n        ]\n    },\n    \"time\": \"2023-01-13 23:48:06\",\n    \"wall_time\": 1.9541189670562744\n}"
  },
  {
    "path": "src/apps/moldft/mad_moldft_test_energy_mpi_parallel.py.calc_info.ref.json",
    "content": "{\n    \"calcinfo_nalpha\": 1,\n    \"calcinfo_natom\": 1,\n    \"calcinfo_nbeta\": 1,\n    \"calcinfo_nmo\": 2,\n    \"k\": 8,\n    \"parameters\": {\n        \"charge\": 0.0,\n        \"conv_only_dens\": false,\n        \"dconv\": 0.001,\n        \"derivatives\": false,\n        \"dipole\": false,\n        \"econv\": 0.0001,\n        \"ginitial_hessian\": false,\n        \"gmaxiter\": 20,\n        \"gopt\": false,\n        \"gprec\": 0.0001,\n        \"gtest\": false,\n        \"gtol\": 0.0001,\n        \"gval\": 1e-05,\n        \"k\": -1,\n        \"l\": 50.0,\n        \"lo\": 0.013396,\n        \"loadbalparts\": 2,\n        \"maxiter\": 1,\n        \"maxrotn\": 0.25,\n        \"maxsub\": 10,\n        \"nalpha\": 1,\n        \"nbeta\": 1,\n        \"nio\": 1,\n        \"nmo_alpha\": 1,\n        \"nmo_beta\": 1,\n        \"no_compute\": false,\n        \"nopen\": 0,\n        \"npt_plot\": 101,\n        \"nv_factor\": 1,\n        \"nvalpha\": 0,\n        \"nvbeta\": 0,\n        \"orbitalshift\": 0.0,\n        \"plotcoul\": false,\n        \"plotdens\": false,\n        \"plothi\": -1,\n        \"plotlo\": 0,\n        \"print_level\": 3,\n        \"psp_calc\": false,\n        \"pure_ae\": true,\n        \"restart\": false,\n        \"restartao\": false,\n        \"save\": true,\n        \"smear\": 0.0,\n        \"spin_restricted\": true,\n        \"vnucextra\": 2\n    },\n    \"return_energy\": -2.861353410011521,\n    \"scf_e_data\": {\n        \"e_coulomb\": [\n            2.018645448166965,\n            2.04048235799564\n        ],\n        \"e_kinetic\": [\n            2.7628170728201096,\n            2.8227846011865667\n        ],\n        \"e_local\": [\n            0.0,\n            0.0\n        ],\n        \"e_nrep\": [\n            0.0,\n            0.0\n        ],\n        \"e_nuclear\": [\n            -6.626451864301439,\n            -6.704379191630678\n        ],\n        \"e_pcm\": [\n            0.0,\n            0.0\n        ],\n        \"e_tot\": [\n            -2.8543126357346864,\n            -2.861353410011521\n        ],\n        \"e_xc\": [\n            -1.0093232924203221,\n            -1.0202411775630498\n        ],\n        \"iterations\": 2\n    },\n    \"scf_eigenvalues_a\": {\n        \"dims\": [\n            1\n        ],\n        \"size\": 1,\n        \"vals\": [\n            -0.5563790539362039\n        ]\n    },\n    \"time\": \"2023-01-13 23:48:06\",\n    \"wall_time\": 1.9541189670562744\n}"
  },
  {
    "path": "src/apps/moldft/mcpfit.cc",
    "content": "/*\r\n  This file is part of MADNESS.\r\n\r\n  Copyright (C) 2007,2011 Oak Ridge National Laboratory\r\n\r\n  This program is free software; you can redistribute it and/or modify\r\n  it under the terms of the GNU General Public License as published by\r\n  the Free Software Foundation; either version 2 of the License, or\r\n  (at your option) any later version.\r\n\r\n  This program is distributed in the hope that it will be useful,\r\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n  GNU General Public License for more details.\r\n\r\n  You should have received a copy of the GNU General Public License\r\n  along with this program; if not, write to the Free Software\r\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r\n\r\n  For more information please contact:\r\n\r\n  Robert J. Harrison\r\n  Oak Ridge National Laboratory\r\n  One Bethel Valley Road\r\n  P.O. Box 2008, MS-6367\r\n\r\n  email: harrisonrj@ornl.gov\r\n  tel:   865-241-3937\r\n  fax:   865-572-0680\r\n\r\n\r\n  $Id$\r\n*/\r\n\r\n/// \\file mcpfit.cc\r\n/// \\brief fitting parameters of Model Core Potential\r\n\r\n#include <madness/mra/mra.h>\r\n#include <madness/tensor/solvers.h>\r\n#include<madness/chem/corepotential.h>\r\n#include <iostream>\r\n#include <iomanip>\r\n#include <set>\r\n#include <cstdio>\r\nusing namespace madness;\r\n\r\ntypedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmapT;\r\ntypedef Vector<double,3> coordT;\r\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\r\ntypedef Function<double,3> functionT;\r\ntypedef vector<functionT> vecfuncT;\r\ntypedef Tensor<double> tensorT;\r\ntypedef FunctionFactory<double,3> factoryT;\r\ntypedef SeparatedConvolution<double,3> operatorT;\r\ntypedef std::shared_ptr<operatorT> poperatorT;\r\n\r\nstatic double ttt, sss;\r\nvoid START_TIMER(World& world) {\r\n    world.gop.fence(); ttt=wall_time(); sss=cpu_time();\r\n}\r\n\r\nvoid END_TIMER(World& world, const char* msg) {\r\n    ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt);\r\n}\r\n\r\n\r\ninline double mask1(double x) {\r\n    /* Iterated first beta function to switch smoothly\r\n       from 0->1 in [0,1].  n iterations produce 2*n-1\r\n       zero derivatives at the end points. Order of polyn\r\n       is 3^n.\r\n\r\n       Currently use one iteration so that first deriv.\r\n       is zero at interior boundary and is exactly representable\r\n       by low order multiwavelet without refinement */\r\n\r\n    x = (x*x*(3.-2.*x));\r\n    return x;\r\n}\r\n\r\ndouble mask3(const coordT& ruser) {\r\n    coordT rsim;\r\n    user_to_sim(ruser, rsim);\r\n    double x= rsim[0], y=rsim[1], z=rsim[2];\r\n    double lo = 0.0625, hi = 1.0-lo, result = 1.0;\r\n    double rlo = 1.0/lo;\r\n\r\n    if (x<lo)\r\n        result *= mask1(x*rlo);\r\n    else if (x>hi)\r\n        result *= mask1((1.0-x)*rlo);\r\n    if (y<lo)\r\n        result *= mask1(y*rlo);\r\n    else if (y>hi)\r\n        result *= mask1((1.0-y)*rlo);\r\n    if (z<lo)\r\n        result *= mask1(z*rlo);\r\n    else if (z>hi)\r\n        result *= mask1((1.0-z)*rlo);\r\n\r\n    return result;\r\n}\r\n\r\n/// Given overlap matrix, return rotation with 3rd order error to orthonormalize the vectors\r\ntensorT Q3(const tensorT& s) {\r\n    tensorT Q = inner(s,s);\r\n    Q.gaxpy(0.2,s,-2.0/3.0);\r\n    for (int i=0; i<s.dim(0); i++) Q(i,i) += 1.0;\r\n    return Q.scale(15.0/8.0);\r\n}\r\n\r\n/*\r\nstatic double dot_product (const tensorT & t1, const tensorT & t2) {\r\n    double s = 0.0;\r\n    for (int i=0; i<t1.dim(0); i++) {\r\n        s += t1[i] * t2[i];\r\n    }\r\n    return s;\r\n}\r\n */\r\n\r\nstatic tensorT vec2tensor (const vector<double> & v) {\r\n    size_t s = v.size();\r\n    tensorT t(static_cast<long>(s));\r\n    for (unsigned int i=0; i<s; i++) {\r\n        t[i] = v[i];\r\n    }\r\n    return t;\r\n}\r\n\r\nstatic vector<double> tensor2vec (const tensorT & t) {\r\n    size_t s = t.size();\r\n    vector<double> v(s);\r\n    for (unsigned int i=0; i<s; i++) {\r\n        v[i] = t[i];\r\n    }\r\n    return v;\r\n}\r\n\r\nvoid print (const tensorT & t) {\r\n    std::cout << std::scientific << std::setprecision(12);\r\n    std::cout << \"[*]\" << std::endl;\r\n    for (unsigned int i=0; i<t.dim(0); ++i) {\r\n        printf(\"%02d: %.12e\\n\", i, t[i]);\r\n    }\r\n}\r\n\r\nclass CorePotentialFunctor : public FunctionFunctorInterface<double,3> {\r\nprivate:\r\n    const CorePotential& pot;\r\npublic:\r\n    CorePotentialFunctor(const CorePotential& pot) : pot(pot) {}\r\n    double operator()(const coordT& x) const {\r\n        double r = sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\r\n        return pot.eval(r);\r\n    }\r\n};\r\n\r\ninline static double radius_function (double rsq) {\r\n    //return sqrt(rsq); // r\r\n    return rsq; // r^2\r\n}\r\n\r\nclass RadiusFunctor : public FunctionFunctorInterface<double,3> {\r\npublic:\r\n    RadiusFunctor () {}\r\n    double operator() (const coordT& x) const {\r\n        return radius_function(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\r\n    }\r\n};\r\n\r\nclass RadiusSquareFunctor : public FunctionFunctorInterface<double,3> {\r\npublic:\r\n    RadiusSquareFunctor () {}\r\n    double operator() (const coordT& x) const {\r\n        return x[0]*x[0] + x[1]*x[1] + x[2]*x[2];\r\n    }\r\n};\r\n\r\nclass GaussianFunctor : public FunctionFunctorInterface<double,3> {\r\n    double alpha;\r\npublic:\r\n    GaussianFunctor (double alpha) : alpha(alpha) {}\r\n    double operator() (const coordT& x) const {\r\n        double rsq = x[0]*x[0] + x[1]*x[1] + x[2]*x[2];\r\n        return exp(-alpha*rsq);\r\n    }\r\n};\r\n\r\nclass PotentialBasisFunctor : public FunctionFunctorInterface<double,3> {\r\n    int n;\r\n    double alpha, rcut;\r\n    /// \\todo Check `rn`. Should it be a member or is it only used locally?\r\n    //double rn;\r\npublic:\r\n    PotentialBasisFunctor (int n, double alpha, double rcut) : n(n), alpha(alpha), rcut(rcut) {}\r\n    double operator() (const coordT& x) const {\r\n        double rsq = x[0]*x[0] + x[1]*x[1] + x[2]*x[2];\r\n        double r = sqrt(rsq);\r\n        double sp = smoothed_potential(r*rcut)*rcut;\r\n        double rn = 1.0;\r\n        switch (n) {\r\n            case 0: rn = sp*sp; break;\r\n            case 1: rn = sp; break;\r\n            case 2: rn = 1.0; break;\r\n            case 3: rn = r; break;\r\n            case 4: rn = r*r; break;\r\n            default: rn = pow(r, n - 2);\r\n        }\r\n        return rn * exp(-alpha*rsq);\r\n    }\r\n};\r\n\r\nclass NcOverR : public FunctionFunctorInterface<double,3> {\r\n    int Nc;\r\n    double c;\r\npublic:\r\n    NcOverR (int Nc, double c) : Nc(Nc), c(c) {}\r\n    double operator() (const coordT& x) const {\r\n        return Nc * smoothed_potential(sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]) / c) / c;\r\n    }\r\n};\r\n\r\nclass CoreOrbitalFunctor : public FunctionFunctorInterface<double,3> {\r\n    CorePotentialManager & cpm;\r\n    unsigned int atn;\r\n    unsigned int core;\r\n    int m;\r\npublic:\r\n    CoreOrbitalFunctor (CorePotentialManager & cpm, unsigned int atn, unsigned int core, int m)\r\n        : cpm(cpm), atn(atn), core(core), m(m) {}\r\n    double operator() (const coordT& x) const {\r\n        double xx = x[0];\r\n        double yy = x[1];\r\n        double zz = x[2];\r\n        double rsq = xx*xx + yy*yy + zz*zz;\r\n        return cpm.core_eval(atn, core, m, rsq, xx, yy, zz);\r\n    }\r\n};\r\n\r\nstruct CalculationParameters {\r\n    double dconv;   ///< conversion criteria\r\n    double L;       ///< box size\r\n    int maxiter;    ///< max number of iteration\r\n    std::string symbol;  ///< symbol of target atom\r\n    double lo;      ///< smallest length scale we need to resolve\r\n    double thresh;  ///< truncation threshold\r\n    double eprec;   ///< precision of smoothing parameter\r\n    double delta;   ///< step size to calc numerical derivative of residual\r\n    int nio;        ///< number of I/O node\r\n    bool nonlinear; ///< if true do non linear optimization\r\n    bool plot;      ///< if true plot vmo or umo\r\n\r\n    CalculationParameters()\r\n        : dconv(1e-6)\r\n        , L(50.0)\r\n        , maxiter(50)\r\n        , symbol(\"Li\")\r\n        , lo(1e-10)\r\n        , thresh(1e-6)\r\n        , eprec(1e-4)\r\n        , delta(0.1)\r\n        , nio(1)\r\n        , nonlinear(false)\r\n        , plot(false)\r\n        {}\r\n\r\n    void print_info () {\r\n        print(\" ** Parameter settings ** \");\r\n        print(\"            target atom\", symbol);\r\n        print(\"               box size\", L);\r\n        print(\"              lo of mra\", lo);\r\n        print(\"          thresh of mra\", thresh);\r\n        print(\"                  dconv\", dconv);\r\n        print(\"               max iter\", maxiter);\r\n        print(\"eprec for smoothed pot.\", eprec);\r\n        print(\"   delta for derivative\", delta);\r\n        print(\"      number of io node\", nio);\r\n        print(\"non linear optimization\", nonlinear);\r\n        print(\"                   plot\", plot);\r\n    }\r\n\r\n    void read_file (const std::string filename) {\r\n        std::ifstream f(filename.c_str());\r\n        std::string s;\r\n        while (f >> s) {\r\n            if (s == \"atom\") {\r\n                f >> symbol;\r\n            }\r\n            else if (s == \"conv\") {\r\n                f >> dconv;\r\n            }\r\n            else if (s == \"maxiter\") {\r\n                f >> maxiter;\r\n            }\r\n            else if (s == \"L\") {\r\n                f >> L;\r\n            }\r\n            else if (s == \"thresh\") {\r\n                f >> thresh;\r\n            }\r\n            else if (s == \"delta\") {\r\n                f >> delta;\r\n            }\r\n            else if (s == \"nio\") {\r\n                f >> nio;\r\n            }\r\n            else if (s == \"nonlinear\") {\r\n                nonlinear = true;\r\n            }\r\n            else if (s == \"plot\") {\r\n                plot = true;\r\n            }\r\n            else {\r\n                throw \"Unknown input parameter:\" + s;\r\n            }\r\n        }\r\n        print_info();\r\n    }\r\n\r\n    template <typename Archive>\r\n    void serialize(Archive& ar) {\r\n        ar & dconv & L & maxiter & symbol & lo & thresh & eprec & delta & nio;\r\n    }\r\n};\r\n\r\nstruct Calculation {\r\n    CalculationParameters param;\r\n    CorePotentialManager corepot;\r\n    bool spin_restricted;\r\n    tensorT aeps, beps;\r\n    tensorT aocc, bocc;\r\n    vector<int> aset, bset;\r\n    vecfuncT amo, bmo;\r\n    vecfuncT vamo, vbmo;\r\n    poperatorT coulop;\r\n    unsigned int atn;               ///< atomic number of target atom\r\n    unsigned int ncore;             ///< number of core orbitals\r\n    unsigned int nalpha, nbeta;     ///< number of valence orbitals alpha/beta\r\n    double vtol;                    ///< multiplication tolerance\r\n    functionT mask;\r\n\r\n    Calculation (World & world)\r\n    {\r\n        if (world.rank() == 0) {\r\n            param.read_file(\"fitinput\");\r\n            std::set<unsigned int> atomset;\r\n            atn = symbol_to_atomic_number(param.symbol);\r\n            atomset.insert(atn);\r\n            corepot.read_file(\"mcp\", atomset, param.eprec);\r\n            MADNESS_ASSERT(corepot.is_defined(atn));\r\n        }\r\n        world.gop.broadcast_serializable(param, 0);\r\n        world.gop.broadcast_serializable(corepot, 0);\r\n        FunctionDefaults<3>::set_cubic_cell(-param.L, param.L);\r\n        atn = symbol_to_atomic_number(param.symbol);\r\n        ncore = corepot.n_core_orb(atn);\r\n        set_protocol(world, param.thresh);\r\n        load_mos(world, param.symbol);\r\n        print_info();\r\n        vamo = make_reference(world, amo, aocc);\r\n        if (!spin_restricted && nbeta)\r\n            vbmo = make_reference(world, bmo, bocc);\r\n\r\n        // erase core vector\r\n        vecfuncT val_amo = vecfuncT(amo.begin()+ncore, amo.end());\r\n        amo = val_amo;\r\n        val_amo.clear();\r\n        if (!spin_restricted && nbeta) {\r\n            vecfuncT val_bmo = vecfuncT(bmo.begin()+ncore, bmo.end());\r\n            bmo = val_bmo;\r\n            val_bmo.clear();\r\n        }\r\n        print(\"norm2 of references\");\r\n        print(norm2(world, vamo));\r\n        if (!spin_restricted && nbeta)\r\n            print(norm2(world, vbmo));\r\n    }\r\n\r\n    void print_info () {\r\n        print(\"   atomic number :\", atn);\r\n        print(\"  number of core :\", ncore);\r\n        print(\"   nalpha, nbeta :\", nalpha, nbeta);\r\n        print(\" spin_restricted :\", spin_restricted);\r\n        print(\"            aeps :\", aeps);\r\n        print(\"            aocc :\", aocc);\r\n        if (!spin_restricted && nbeta) {\r\n            print(\"            beps :\", beps);\r\n            print(\"            bocc :\", bocc);\r\n        }\r\n    }\r\n\r\n    void set_protocol (World & world, double thresh)\r\n    {\r\n        int k;\r\n        if(thresh >= 1e-2)\r\n            k = 4;\r\n        else if(thresh >= 1e-4)\r\n            k = 6;\r\n        else if(thresh >= 1e-6)\r\n            k = 8;\r\n        else if(thresh >= 1e-8)\r\n            k = 10;\r\n        else\r\n            k = 12;\r\n\r\n        FunctionDefaults<3>::set_k(k);\r\n        FunctionDefaults<3>::set_thresh(thresh);\r\n        FunctionDefaults<3>::set_refine(true);\r\n        FunctionDefaults<3>::set_initial_level(2);\r\n        FunctionDefaults<3>::set_truncate_mode(1);\r\n        FunctionDefaults<3>::set_autorefine(false);\r\n        FunctionDefaults<3>::set_apply_randomize(false);\r\n        FunctionDefaults<3>::set_project_randomize(false);\r\n        GaussianConvolution1DCache<double>::map.clear();\r\n        double safety = 0.1;\r\n        vtol = FunctionDefaults<3>::get_thresh() * safety;\r\n        coulop = poperatorT(CoulombOperatorPtr(world, param.lo, thresh));\r\n        mask = functionT(factoryT(world).f(mask3).initial_level(4).norefine());\r\n        if(world.rank() == 0){\r\n            print(\"\\nSolving with thresh\", thresh, \"    k\", FunctionDefaults<3>::get_k(), \"   conv\", std::max(thresh, param.dconv), \"\\n\");\r\n        }\r\n    }\r\n\r\n    void load_mos (World& world, std::string atom)\r\n    {\r\n        const double thresh = FunctionDefaults<3>::get_thresh();\r\n        const int k = FunctionDefaults<3>::get_k();\r\n        unsigned int nmo = 0u;\r\n        amo.clear(); bmo.clear();\r\n\r\n        std::string refdir = \"references/\";\r\n        std::string filename = refdir + atom;\r\n        try {\r\n            archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, filename.c_str());\r\n            /*\r\n               File format:\r\n\r\n               bool spinrestricted --> if true only alpha orbitals are present\r\n\r\n               unsigned int nmo_alpha;\r\n               Tensor<double> aeps;\r\n               Tensor<double> aocc;\r\n               vector<int> aset;\r\n               for i from 0 to nalpha-1:\r\n               .   Function<double,3> amo[i]\r\n\r\n               repeat for beta if !spinrestricted\r\n\r\n*/\r\n\r\n            // LOTS OF LOGIC MISSING HERE TO CHANGE OCCUPATION NO., SET,\r\n            // EPS, SWAP, ... sigh\r\n\r\n            ar & spin_restricted;\r\n\r\n            ar & nmo;\r\n            nalpha = nmo - ncore;\r\n            nbeta = 0;\r\n            const double trantol = vtol / std::min(30.0, double(nalpha));\r\n            ar & aeps & aocc & aset;\r\n            amo.resize(nmo);\r\n            for (unsigned int i=0; i<amo.size(); i++) ar & amo[i];\r\n\r\n            if (amo[0].k() != k) {\r\n                reconstruct(world,amo);\r\n                for(unsigned int i = 0;i < amo.size();i++) amo[i] = madness::project(amo[i], k, thresh, false);\r\n                world.gop.fence();\r\n            }\r\n            normalize(world, amo);\r\n            amo = transform(world, amo, Q3(matrix_inner(world, amo, amo)), trantol, true);\r\n            truncate(world, amo);\r\n            normalize(world, amo);\r\n\r\n            if (!spin_restricted) {\r\n                ar & nmo;\r\n                nbeta = nmo - ncore;\r\n                ar & beps & bocc & bset;\r\n\r\n                bmo.resize(nmo);\r\n                for (unsigned int i=0; i<bmo.size(); i++) ar & bmo[i];\r\n\r\n                if (bmo[0].k() != k) {\r\n                    reconstruct(world,bmo);\r\n                    for(unsigned int i = 0;i < bmo.size();i++) bmo[i] = madness::project(bmo[i], k, thresh, false);\r\n                    world.gop.fence();\r\n                }\r\n\r\n                normalize(world, bmo);\r\n                bmo = transform(world, bmo, Q3(matrix_inner(world, bmo, bmo)), trantol, true);\r\n                truncate(world, bmo);\r\n                normalize(world, bmo);\r\n            }\r\n        }\r\n        catch (const madness::MadnessException & e) {\r\n            print(e);\r\n            std::string err_msg(\"The `mcpfit' requires \");\r\n            err_msg += filename;\r\n            err_msg += \".00000 (and additional numbers of nio) to make reference potential.\\n\";\r\n            err_msg += \"It can be produced by atom SCF using moldft.\";\r\n            error(err_msg.c_str());\r\n            throw e;\r\n        }\r\n\r\n    }\r\n\r\n    vecfuncT make_reference (World & world, vecfuncT & mo, tensorT & occ)\r\n    {\r\n        int nv = mo.size() - ncore;\r\n        vecfuncT vmo = zero_functions_compressed<double,3>(world, nv);\r\n        reconstruct(world, amo);\r\n        norm_tree(world, amo);\r\n        if (!spin_restricted && bmo.size()) {\r\n            reconstruct(world, bmo);\r\n            norm_tree(world, bmo);\r\n        }\r\n\r\n        // coulomb potential\r\n        START_TIMER(world);\r\n        vecfuncT psi_c(amo.begin(), amo.begin()+ncore);\r\n        vecfuncT vsq = square(world, psi_c);\r\n        compress(world, vsq);\r\n        functionT rho_c = factoryT(world);\r\n        rho_c.compress();\r\n        for (unsigned int i=0; i<vsq.size(); i++) {\r\n            if (occ[i])\r\n                rho_c.gaxpy(1.0, vsq[i], aocc[i], false);\r\n        }\r\n        world.gop.fence();\r\n        vsq.clear();\r\n        if (!spin_restricted && bmo.size()) {\r\n            psi_c = vecfuncT(bmo.begin(), bmo.begin()+ncore);\r\n            vsq = square(world, psi_c);\r\n            compress(world, vsq);\r\n            for (unsigned int i=0; i<vsq.size(); i++) {\r\n                if (occ[i])\r\n                    rho_c.gaxpy(1.0, vsq[i], bocc[i], false);\r\n            }\r\n            world.gop.fence();\r\n            vsq.clear();\r\n        }\r\n        else {\r\n            rho_c *= 2.0;\r\n        }\r\n        rho_c.truncate();\r\n        functionT coul = apply(*coulop, rho_c);\r\n\r\n        // coulomb - Nc/r (long range term)\r\n        functionT nc_over_r = factoryT(world).functor(functorT(new NcOverR(2*ncore, smoothing_parameter(2*ncore, param.eprec)))).thresh(vtol).initial_level(4);\r\n        nc_over_r.reconstruct();\r\n        coul -= nc_over_r;\r\n        nc_over_r.clear();\r\n\r\n        vecfuncT valencemo(mo.begin()+ncore, mo.end());\r\n        gaxpy(world, 1.0, vmo, 1.0, mul_sparse(world, coul, valencemo, vtol));\r\n        truncate(world, vmo);\r\n        END_TIMER(world, \"coulomb pot.\");\r\n\r\n        // exchange potential\r\n        START_TIMER(world);\r\n        psi_c = vecfuncT(mo.begin(), mo.begin()+ncore);\r\n        vecfuncT psif;\r\n        for (unsigned int c=0; c<ncore; c++) {\r\n            for (unsigned int i=ncore; i<mo.size(); i++) {\r\n                psif.push_back(mul_sparse(mo[i], mo[c], vtol, false));\r\n            }\r\n        }\r\n        world.gop.fence();\r\n        truncate(world, psif, vtol);\r\n        psif = apply(world, *coulop, psif);\r\n        truncate(world, psif, vtol);\r\n        reconstruct(world, psif);\r\n        norm_tree(world, psif);\r\n        for (unsigned int c=0; c<ncore; c++) {\r\n            for (unsigned int i=ncore; i<mo.size(); i++) {\r\n                functionT psipsif = mul_sparse(psif[c*nv+i-ncore], mo[c], vtol, false);\r\n                world.gop.fence();\r\n                psipsif.compress();\r\n                vmo[i-ncore].gaxpy(1.0, psipsif, -1.0, false);\r\n            }\r\n        }\r\n        truncate(world, vmo);\r\n        END_TIMER(world, \"exchange pot.\");\r\n\r\n        // shift operator\r\n        START_TIMER(world);\r\n        unsigned int nshell = ncore;\r\n        for (unsigned int c = 0; c < nshell; ++c) {\r\n            unsigned int l = corepot.get_core_l(atn, c);\r\n            unsigned int max_m = (l+1)*(l+2)/2;\r\n            nshell -= max_m - 1;\r\n            double bc = corepot.get_core_bc(atn, c);\r\n            for (unsigned int m = 0; m < max_m; ++m) {\r\n                functionT core = factoryT(world).functor(functorT(new CoreOrbitalFunctor(corepot, atn, c, m)));\r\n                tensorT overlap = inner(world, core, mo);\r\n                print(\"for m=\", m, \" core orbital of \", c, \"'th shell\");\r\n                print(\"  <core|mo> = \", overlap);\r\n                overlap *= bc;\r\n                for (unsigned int i = ncore; i < mo.size(); ++i) {\r\n                    vmo[i-ncore] -= overlap[i] * core;\r\n                }\r\n            }\r\n        }\r\n        truncate(world, vmo);\r\n        END_TIMER(world, \"shift operator\");\r\n\r\n        return vmo;\r\n    }\r\n\r\n    functionT project_potential_basis (World & world, CorePotential & cp, int i)\r\n    {\r\n        int level = 4;\r\n        if (cp.alpha[i] > 100) level += 2;\r\n        //functionT u1 = factoryT(world).functor(functorT(new PotentialBasisFunctor(cp.n[i], cp.alpha[i], cp.rcut))).initial_level(level).truncate_on_project().autorefine();\r\n        functionT u1;\r\n        double norm = 0.0;\r\n        //print(\"  norm2 of potential basis\", i, \":\", u1.norm2());\r\n        while (norm < 1e-3) {\r\n            //u1.clear();\r\n            //world.gop.fence();\r\n            u1 = functionT(factoryT(world).functor(functorT(new PotentialBasisFunctor(cp.n[i], cp.alpha[i], cp.rcut))).initial_level(++level).truncate_on_project().noautorefine());\r\n            print(\"  norm2 of potential basis\", i, \":\", u1.norm2());\r\n            norm = u1.norm2();\r\n        }\r\n        u1.truncate();\r\n\r\n        return u1;\r\n    }\r\n\r\n    vecfuncT make_Upsi (World & world, CorePotential & cp, vecfuncT & mo)\r\n    {\r\n        START_TIMER(world);\r\n        functionT umcp = factoryT(world).functor(functorT(new CorePotentialFunctor(cp))).thresh(FunctionDefaults<3>::get_thresh()).initial_level(5);\r\n        umcp.truncate();\r\n        umcp.reconstruct();\r\n        vecfuncT umo = mul_sparse(world, umcp, mo, vtol);\r\n        umcp.clear();\r\n        truncate(world, umo);\r\n        world.gop.fence();\r\n        END_TIMER(world, \"make Upsi\");\r\n        return umo;\r\n    }\r\n\r\n    void plot_z (const char* filename, const functionT & f)\r\n    {\r\n        const int npt = 2049;\r\n        Vector<double,3> lo(vector<double>(3,0.0)), hi(vector<double>(3,0.0));\r\n        hi[2] = 5.0;\r\n        f.reconstruct();\r\n        plot_line(filename, npt, lo, hi, f);\r\n    }\r\n\r\n    void plot_p (const char* filename, const vecfuncT& f)\r\n    {\r\n        const int npt = 2049;\r\n        Vector<double,3> lo(vector<double>(3,0.0)), hi(vector<double>(3,0.0));\r\n        hi[2] = 5.0;\r\n        Vector<double,3> h = (hi - lo)*(1.0/(npt-1));\r\n\r\n        double sum = 0.0;\r\n        for (int i=0; i<3; i++) sum += h[i]*h[i];\r\n        sum = sqrt(sum);\r\n\r\n        World& world = f[0].world();\r\n        reconstruct(world, f);\r\n        if (world.rank() == 0) {\r\n            FILE* file = fopen(filename,\"w\");\r\n            for (int i=0; i<npt; i++) {\r\n                coordT r = lo + h*double(i);\r\n                fprintf(file, \"%.14e \", i*sum);\r\n                plot_line_print_value(file, f[0].eval(r));\r\n                double f0 = f[0].eval(r);\r\n                double f1 = f[1].eval(r);\r\n                double f2 = f[2].eval(r);\r\n                double v = f0*f0+f1*f1+f2*f2;\r\n                fprintf(file, \" %.14e\", v);\r\n                fprintf(file, \"\\n\");\r\n            }\r\n            fclose(file);\r\n        }\r\n        world.gop.fence();\r\n    }\r\n\r\n    CorePotential calc_optimal_coeffs (World & world, CorePotential & cp)\r\n    {\r\n        long nparam = cp.alpha.size() - 1;\r\n        vecfuncT pbs(nparam);\r\n        functionT rf = factoryT(world).functor(functorT(new RadiusFunctor()));\r\n        rf.reconstruct();\r\n\r\n        print(\"alpha: \", cp.alpha);\r\n        print(\"n: \", cp.n);\r\n        for (unsigned int i=1; i<cp.alpha.size(); i++) {\r\n            printf(\"making pb for alpha[%d]=%e\\n\", i, cp.alpha[i]);\r\n            pbs[i-1] = project_potential_basis(world, cp, i);\r\n            pbs[i-1].reconstruct();\r\n            pbs[i-1] = rf * pbs[i-1];\r\n            pbs[i-1].truncate();\r\n        }\r\n\r\n        tensorT S(nparam, nparam);\r\n        tensorT b(nparam);\r\n        print(\"making S, b\");\r\n        print(\"nparam=\", nparam, \"nalpha,nbeta=\", nalpha, nbeta);\r\n        for (unsigned int j=0; j<nalpha; j++) {\r\n            print(\"for alpha elec\", j);\r\n            vecfuncT pb_amo = mul_sparse(world, amo[j], pbs, vtol);\r\n            truncate(world, pb_amo);\r\n            S += matrix_inner(world, pb_amo, pb_amo);\r\n            b += inner(world, rf*vamo[j], pb_amo);\r\n            pb_amo.clear();\r\n            world.gop.fence();\r\n        }\r\n        if (!spin_restricted && nbeta) {\r\n            for (unsigned int j=0; j<nbeta; j++) {\r\n                print(\"for beta elec\", j);\r\n                vecfuncT pb_bmo = mul_sparse(world, bmo[j], pbs, vtol);\r\n                truncate(world, pb_bmo);\r\n                S += matrix_inner(world, pb_bmo, pb_bmo);\r\n                b += inner(world, rf*vbmo[j], pb_bmo);\r\n                pb_bmo.clear();\r\n                world.gop.fence();\r\n            }\r\n        }\r\n        print(\"S,b=\\n\", S, b);\r\n\r\n        tensorT c, s, sumsq;\r\n        long rank;\r\n        if (world.rank() == 0) gelss(S, b, -1, c, s, rank, sumsq); // solve linear equation\r\n        world.gop.broadcast_serializable(c, 0);\r\n        world.gop.broadcast_serializable(s, 0);\r\n        world.gop.broadcast_serializable(sumsq, 0);\r\n        world.gop.broadcast_serializable(rank, 0);\r\n        print(\"s,sumsq=\", s, sumsq);\r\n        print(\"rank=\", rank);\r\n        print(\"result potential:\");\r\n        printf(\"        %d    %d    %.6e    %.12e\\n\", cp.l[0], cp.n[0], cp.alpha[0], cp.A[0]);\r\n        for (unsigned int i=0; i<cp.alpha.size()-1; ++i) {\r\n            printf(\"        %d    %d    %.6e    %.12e\\n\", cp.l[i+1], cp.n[i+1], cp.alpha[i+1], c[i]);\r\n        }\r\n\r\n        CorePotential result = cp;\r\n        vector<double> A = tensor2vec(c);\r\n        A.insert(A.begin(), cp.A[0]);\r\n        result.A = A;\r\n\r\n        return result;\r\n    }\r\n\r\n    double compute_residuals (World & world, CorePotential & cp, vecfuncT & mo, vecfuncT & vmo)\r\n    {\r\n        //CorePotential cp_opt = calc_optimal_coeffs(world, cp);\r\n        //cp = cp_opt;\r\n        vecfuncT umo = make_Upsi(world, cp, mo);\r\n        for (unsigned int i=0; i<vmo.size(); i++) {\r\n            print(\"norm(vmo)\", vmo[i].norm2());\r\n            print(\"norm(umo)\", umo[i].norm2());\r\n            //double normratio = vmo[i].norm2() / umo[i].norm2();\r\n            //umo[i] *= normratio;\r\n        }\r\n        vecfuncT rv = sub(world, vmo, umo);\r\n        truncate(world, rv);\r\n        functionT rf = factoryT(world).functor(functorT(new RadiusFunctor()));\r\n        vecfuncT err = mul_sparse(world, rf, rv, vtol);\r\n        if (param.plot) {\r\n            static unsigned int num=0;\r\n            for (unsigned int i=0; i<rv.size(); i++) {\r\n                char fn[256];\r\n                sprintf(fn, \"umo%02d.txt\", num);\r\n                plot_z(fn, umo[i]);\r\n                sprintf(fn, \"vmo%02d.txt\", num);\r\n                plot_z(fn, vmo[i]);\r\n                sprintf(fn, \"vmo-umo%02d.txt\", num);\r\n                plot_z(fn, rv[i]);\r\n                sprintf(fn, \"rvmo-rumo%02d.txt\", num);\r\n                plot_z(fn, err[i]);\r\n                num++;\r\n            }\r\n        }\r\n        umo.clear();\r\n        rv.clear();\r\n        world.gop.fence();\r\n        //tensorT rnorm = vec2tensor(norm2s(world, err)); // sqrt of norm2's\r\n        tensorT rnorm(static_cast<long>(err.size()));\r\n        for (unsigned int i=0; i<err.size(); i++) rnorm[i] = err[i].norm2();\r\n        print(\"residual norm:\", rnorm);\r\n\r\n        double r = 0.0;\r\n        for (int i=0; i<rnorm.dim(0); i++) {\r\n            r += rnorm[i];\r\n        }\r\n        return r / rnorm.dim(0);\r\n    }\r\n\r\n    tensorT calc_deriv (World & world, CorePotential & cp, double r)\r\n    {\r\n        size_t nparam = cp.alpha.size();\r\n        tensorT deps(static_cast<long>(nparam));\r\n        for (unsigned int i=1; i<nparam; i++) {\r\n            double a = cp.alpha[i];\r\n            double da = a * param.delta;\r\n            CorePotential cp_mod = cp;\r\n            cp_mod.alpha[i] = a+da;\r\n            cp_mod = calc_optimal_coeffs(world, cp_mod);\r\n            double rmod = compute_residuals(world, cp_mod, amo, vamo);\r\n            if (!spin_restricted && nbeta) rmod += compute_residuals(world, cp_mod, bmo, vbmo);\r\n            deps(i) = (rmod - r) / da;\r\n        }\r\n\r\n        return deps;\r\n    }\r\n\r\n    CorePotential update (World & world, CorePotential & cp, tensorT & deriv, double & r)\r\n    {\r\n        const double tau = 0.5;\r\n\r\n        CorePotential cp_mod = cp;\r\n        double normd = deriv.normf();\r\n        double step = tau / normd;\r\n        if (step > 1) step = 1;\r\n        double rmod;\r\n        while (1) {\r\n            //double rule_value = r - step * normd; // armijo\r\n            double rule_value = r; // simple descent rule\r\n            if (false && rule_value < 0) {\r\n                step *= tau;\r\n                continue;\r\n            }\r\n            if (step < param.dconv) throw \"searching vector failed\";\r\n            printf(\"step = %15e, Rule value =%15e\\n\", step, rule_value);\r\n            vector<double> amod = tensor2vec(vec2tensor(cp.alpha) - step * deriv);\r\n            cp_mod.alpha = amod;\r\n            rmod = compute_residuals(world, cp_mod, amo, vamo);\r\n            if (!spin_restricted && nbeta) rmod += compute_residuals(world, cp_mod, bmo, vbmo);\r\n            printf(\"r(amod) = %15e\\n\\n\", rmod);\r\n\r\n            // wolfe curvature constraint\r\n            //tensorT d2 = calc_deriv(world, cp_mod, rmod);\r\n            //double lhs = dot_product(d2, -deriv);\r\n            //double rhs = -normd;\r\n            //print(\"deriv\");\r\n            //print(d2);\r\n            //printf(\"lhs:%10e, rhs:%10e\\n\\n\", lhs, rhs);\r\n            printf(\"rmod:%10e, rule:%10e\\n\", rmod, rule_value);\r\n\r\n            if (rmod < rule_value) break; // found\r\n            //if (rmod < rule_value && lhs > rhs) break; // found\r\n\r\n            step *= tau;\r\n        }\r\n\r\n        r = rmod;\r\n\r\n        return cp_mod;\r\n    }\r\n};\r\n\r\nstruct CoreFittingTarget : public OptimizationTargetInterface {\r\n    World & world;\r\n    Calculation & calc;\r\n    CorePotential & cp;\r\n    mutable double xsq;\r\n    mutable double r;\r\n    mutable tensorT lastx;\r\n\r\n    CoreFittingTarget (World & world, Calculation & calc, CorePotential & cp)\r\n        : world(world), calc(calc), cp(cp), xsq(0.0), r(100.0)\r\n    {}\r\n\r\n    bool provides_gradient() const {return true;}\r\n\r\n    double value (const tensorT & x) {\r\n        double xsq = x.sumsq();\r\n        if (fabs(xsq - this->xsq) < 1e-10) {\r\n            print(\"target: using current value (delta xsq =\", xsq - this->xsq, \")\");\r\n            return this->r;\r\n        }\r\n        this->xsq = xsq;\r\n        lastx = copy(x);\r\n        print(\"target: calc for alpha = \", x);\r\n        CorePotential cp_mod = cp;\r\n        cp_mod.alpha = tensor2vec(x);\r\n        cp_mod = calc.calc_optimal_coeffs(world, cp_mod);\r\n        double r = calc.compute_residuals(world, cp_mod, calc.amo, calc.vamo);\r\n        if (!calc.spin_restricted && calc.nbeta) r += calc.compute_residuals(world, cp_mod, calc.bmo, calc.vbmo);\r\n        world.gop.fence();\r\n        print(\"target: value for \", x, \" = \", r);\r\n        this->r = r;\r\n        return r;\r\n    }\r\n\r\n    tensorT gradient(const tensorT& x) {\r\n        CorePotential cp_mod = cp;\r\n        cp_mod.alpha = tensor2vec(x);\r\n        double r = value(x);\r\n        tensorT g = calc.calc_deriv(world, cp_mod, r);\r\n        world.gop.fence();\r\n        print(\"target: gradient for \", x, \" = \", g);\r\n        return g;\r\n    }\r\n};\r\n\r\nclass MySteepestDescent : public OptimizerInterface {\r\n    std::shared_ptr<OptimizationTargetInterface> target;\r\n    const double tol;\r\n    double f;\r\n    double gnorm;\r\n\r\n    public:\r\n    MySteepestDescent(const std::shared_ptr<OptimizationTargetInterface>& target,\r\n            double tol = 1e-6,\r\n            double value_precision = 1e-12,\r\n            double gradient_precision = 1e-12)\r\n        : target(target)\r\n          , tol(tol)\r\n          , gnorm(tol*1e16)\r\n    {\r\n        if (!target->provides_gradient()) throw \"Steepest descent requires the gradient\";\r\n    }\r\n\r\n    bool check_positive (tensorT & x)\r\n    {\r\n        for (TensorIterator<double> e = x.unary_iterator(); e != x.end(); ++e) {\r\n            if (*e < 0.0) return false;\r\n        }\r\n\r\n        return true;\r\n    }\r\n\r\n    bool optimize(Tensor<double>& x)\r\n    {\r\n        double step = 10.0;\r\n        double fnew;\r\n        Tensor<double> g;\r\n        target->value_and_gradient(x,f,g);\r\n        gnorm = g.normf();\r\n        for (int i=0; i<100; i++) {\r\n            while (1) {\r\n                Tensor<double> gnew;\r\n                x.gaxpy(1.0, g, -step);\r\n                if (check_positive(x)) {\r\n                    target->value_and_gradient(x,fnew,gnew);\r\n                    if (fnew < f) {\r\n                        f = fnew;\r\n                        g = gnew;\r\n                        break;\r\n                    }\r\n                }\r\n                x.gaxpy(1.0, g, step);\r\n                step *= 0.5;\r\n                print(\"reducing step size\", f, fnew, \"(\", f - fnew, \")\", step);\r\n            }\r\n            Tensor<double> g = target->gradient(x);\r\n            gnorm = g.normf();\r\n            print(\"iteration\",i,\"value\",f,\"gradient\",gnorm);\r\n            if (converged()) break;\r\n        }\r\n        return converged();\r\n    }\r\n\r\n    bool converged() const\r\n    {\r\n        return gnorm < tol;\r\n    }\r\n\r\n    double gradient_norm() const\r\n    {\r\n        return gnorm;\r\n    }\r\n\r\n    double value() const\r\n    {\r\n        return f;\r\n    }\r\n\r\n    virtual ~MySteepestDescent(){}\r\n};\r\n\r\nint main (int argc, char **argv) {\r\n    initialize(argc, argv);\r\n\r\n    {\r\n        World world(SafeMPI::COMM_WORLD);\r\n\r\n        try {\r\n            startup(world, argc, argv);\r\n            Calculation calc(world);\r\n            CorePotential cp = calc.corepot.get_potential(calc.atn);\r\n\r\n            //double r1 = calc.compute_residuals(world, cp, calc.amo, calc.vamo);\r\n            //if (!calc.spin_restricted) r1 += calc.compute_residuals(world, cp, calc.bmo, calc.vbmo);\r\n            //print(\"r1=\", r1);\r\n\r\n            if (!calc.param.nonlinear) {\r\n                print(\"=== start linear optimization\");\r\n                cp = calc.calc_optimal_coeffs(world, cp);\r\n                print(\"=== linear optimal coeffs prepared\");\r\n                double r2 = calc.compute_residuals(world, cp, calc.amo, calc.vamo);\r\n                if (!calc.spin_restricted && calc.nbeta) r2 += calc.compute_residuals(world, cp, calc.bmo, calc.vbmo);\r\n                //print(\"r1=\", r1);\r\n                print(\"r2=\", r2);\r\n            }\r\n            else {\r\n                print(\"=== start non linear optimization\");\r\n                //double tol = 1e-4; // tolerance\r\n                //double prec = calc.param.eprec; // precision\r\n                //double gprec = calc.param.eprec; // gradient precision\r\n                std::shared_ptr<CoreFittingTarget> target_p(new CoreFittingTarget(world, calc, cp));\r\n                //QuasiNewton optimizer(target_p, tol, prec, gprec);\r\n                MySteepestDescent optimizer(target_p);\r\n                tensorT x = vec2tensor(cp.alpha);\r\n                optimizer.optimize(x);\r\n                print(\"last x = \", target_p->lastx);\r\n                cp.alpha = tensor2vec(target_p->lastx);\r\n                double r = calc.compute_residuals(world, cp, calc.amo, calc.vamo);\r\n                if (!calc.spin_restricted && calc.nbeta) r += calc.compute_residuals(world, cp, calc.bmo, calc.vbmo);\r\n                print(\"last r=\", r);\r\n            }\r\n        }\r\n        catch (const SafeMPI::Exception& e) {\r\n            print(e);\r\n            error(\"caught an MPI exception\");\r\n        }\r\n        catch (const madness::MadnessException& e) {\r\n            print(e);\r\n            error(\"caught a MADNESS exception\");\r\n        }\r\n        catch (const madness::TensorException& e) {\r\n            print(e);\r\n            error(\"caught a Tensor exception\");\r\n        }\r\n        catch (const char* s) {\r\n            print(s);\r\n            error(\"caught a string exception\");\r\n        }\r\n        catch (const std::string& s) {\r\n            print(s);\r\n            error(\"caught a string (class) exception\");\r\n        }\r\n        catch (std::bad_alloc & b) {\r\n            error(\"operator new failed\");\r\n        }\r\n        catch (const std::exception& e) {\r\n            print(e.what());\r\n            error(\"caught an STL exception\");\r\n        }\r\n        catch (...) {\r\n            error(\"caught unhandled exception\");\r\n        }\r\n\r\n        // Nearly all memory will be freed at this point\r\n        world.gop.fence();\r\n        world.gop.fence();\r\n        print_stats(world);\r\n    }\r\n\r\n    finalize();\r\n\r\n    return 0;\r\n}\r\n\r\n"
  },
  {
    "path": "src/apps/moldft/moldft.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file moldft.cc\n/// \\brief Molecular HF and DFT code\n/// \\defgroup moldft The molecular density functional and Hartree-Fock code\n\n#include<madness/chem/SCF.h>\n#include\"madness/mra/commandlineparser.h\"\n#include<madness/chem/molopt.h>\n#include <madness/world/worldmem.h>\n#include <madness/misc/info.h>\n\n\n#if defined(HAVE_SYS_TYPES_H) && defined(HAVE_SYS_STAT_H) && defined(HAVE_UNISTD_H)\n\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <unistd.h>\n\n// static inline int file_exists(const char *inpname) {\n//     struct stat buffer;\n//     int rc = stat(inpname, &buffer);\n//     return (rc == 0);\n// }\n\n#endif\n\nusing namespace madness;\n\n\nstatic double ttt, sss;\n\nstatic void START_TIMER(World &world) {\n    world.gop.fence();\n    ttt = wall_time();\n    sss = cpu_time();\n}\n\nstatic void END_TIMER(World &world, const char *msg) {\n    ttt = wall_time() - ttt;\n    sss = cpu_time() - sss;\n    if (world.rank() == 0) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt);\n}\n\nint main(int argc, char **argv) {\n\n    World &world = initialize(argc, argv);\n    if (world.rank() == 0) {\n        print_header1(\"MOLDFT -- molecular DFT and Hartree-Fock code\");\n    }\n\n    { // limit lifetime of world so that finalize() can execute cleanly\n        START_TIMER(world);\n        try {\n            // Load info for MADNESS numerical routines\n            startup(world, argc, argv, true);\n            if (world.rank() == 0) print(info::print_revision_information());\n\n            commandlineparser parser(argc, argv);\n\n            if (parser.key_exists(\"help\")) {\n                SCF::help();\n\n            } else if (parser.key_exists(\"print_parameters\")) {\n                SCF::print_parameters();\n\n            } else {\n                if (world.rank() == 0) print(\"input filename: \", parser.value(\"input\"));\n\n\n                print_meminfo(world.rank(), \"startup\");\n                FunctionDefaults<3>::set_pmap(pmapT(new LevelPmap<Key<3> >(world)));\n\n                std::cout.precision(6);\n                SCF calc(world, parser);\n\n                // Warm and fuzzy for the user\n                if (world.rank() == 0) {\n                    print(\"\\n\\n\");\n                    print(\" MADNESS Hartree-Fock and Density Functional Theory Program\");\n                    print(\" ----------------------------------------------------------\\n\");\n                    print(\"\\n\");\n                    calc.molecule.print();\n                    print(\"\\n\");\n                    calc.param.print(\"dft\");\n                }\n                END_TIMER(world, \"initialize\");\n                // Come up with an initial OK data map\n                if (world.size() > 1) {\n                    calc.set_protocol<3>(world, 1e-4);\n                    calc.make_nuclear_potential(world);\n                    calc.initial_load_bal(world);\n                }\n//vama\n                calc.set_protocol<3>(world, calc.param.protocol()[0]);\n\n\n                if (calc.param.gopt()) {\n                    // print(\"\\n\\n Geometry Optimization                      \");\n                    // print(\" ----------------------------------------------------------\\n\");\n                    // calc.param.gprint(world);\n\n                    // Tensor<double> geomcoord = calc.molecule.get_all_coords().flat();\n                    // QuasiNewton geom(std::shared_ptr<OptimizationTargetInterface>(new MolecularEnergy(world, calc)),\n                    //                  calc.param.gmaxiter,\n                    //                  calc.param.gtol,  //tol\n                    //                  calc.param.gval,  //value prec\n                    //                  calc.param.gprec); // grad prec\n                    // geom.set_update(calc.param.algopt);\n                    // geom.set_test(calc.param.gtest);\n                    // long ncoord = calc.molecule.natom()*3;\n                    // Tensor<double> h(ncoord,ncoord);\n                    // for (int i=0; i<ncoord; ++i) h(i,i) = 0.5;\n                    // geom.set_hessian(h);\n                    // geom.optimize(geomcoord);\n\n                    MolOpt opt(calc.param.gmaxiter(),\n                               0.1,\n                               calc.param.gval(),\n                               calc.param.gtol(),\n                               1e-3, //XTOL\n                               1e-5, //EPREC\n                               calc.param.gprec(),\n                               (world.rank() == 0) ? 1 : 0, //print_level\n                               calc.param.algopt());\n\n                    MolecularEnergy target(world, calc);\n                    opt.optimize(calc.molecule, target);\n                } else {\n                    MolecularEnergy E(world, calc);\n                    double energy = E.value(calc.molecule.get_all_coords().flat()); // ugh!\n                    if ((world.rank() == 0) and (calc.param.print_level() > 0)) {\n                        printf(\"final energy=%16.8f \\n\", energy);\n                        E.output_calc_info_schema();\n                    }\n\n\n                    functionT rho = calc.make_density(world, calc.aocc, calc.amo);\n                    functionT brho = rho;\n                    if (calc.param.nbeta() != 0 && !calc.param.spin_restricted())\n                        brho = calc.make_density(world, calc.bocc, calc.bmo);\n                    rho.gaxpy(1.0, brho, 1.0);\n\n                    if (calc.param.derivatives()){\n                        auto gradient=calc.derivatives(world, rho);\n                        calc.e_data.add_gradient(gradient);\n                    }\n                    // automatically print dipole moment and output scf info\n                    std::map<std::string, double> results;\n                    results[\"scf_energy\"] = calc.current_energy;\n                    auto dipole_t = calc.dipole(world, rho);\n                    if (world.rank() == 0) calc.output_scf_info_schema(results, dipole_t);\n                }\n\n                //        if (calc.param.twoint) {\n                //Tensor<double> g = calc.twoint(world,calc.amo);\n                //cout << g;\n                // }\n\n                calc.do_plots(world);\n\n            }\n        }\n        catch (const SafeMPI::Exception &e) {\n            print(e);\n            error(\"caught an MPI exception\");\n        }\n        catch (const madness::MadnessException &e) {\n            print(e);\n            error(\"caught a MADNESS exception\");\n        }\n        catch (const madness::TensorException &e) {\n            print(e);\n            error(\"caught a Tensor exception\");\n        }\n        catch (const char *s) {\n            print(s);\n            error(\"caught a string exception\");\n        }\n        catch (const std::string &s) {\n            print(s);\n            error(\"caught a string (class) exception\");\n        }\n        catch (const std::exception &e) {\n            print(e.what());\n            error(\"caught an STL exception\");\n        }\n        catch (...) {\n            error(\"caught unhandled exception\");\n        }\n\n        // Nearly all memory will be freed at this point\n        world.gop.fence();\n        world.gop.fence();\n        print_stats(world);\n    } // world is dead -- ready to finalize\n    finalize();\n\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/moldft/moldx.py",
    "content": "import math, sys\n\n# Element info taken mostly from Rasmol but the effective covalent\n# radii are from NWChem with those probably coming from Hondo.\n\ncpk = {0: \"light grey\",\n       1: \"sky blue\",\n       2: \"red\",\n       3: \"yellow\",\n       4: \"white\",\n       5: \"pink\",\n       6: \"gold\",\n       7: \"blue\",\n       8: \"orange\",\n       9: \"dark grey\",\n       10: \"brown\",\n       11: \"purple\",\n       12: \"deep pink\",\n       13: \"green\",\n       14: \"fire brick\",\n       15: \"mid green\"}\n\n# Colors from X11/rgb.txt\ncolors = {\n    \"light grey\": (211,211,211),\n    \"sky blue\": (135,206,235),\n    \"red\": (255,0,0),\n    \"yellow\": (255,255,0),\n    \"white\": (255,255,255),\n    \"pink\": (255,105,180),\n    \"gold\": (255,215,0),\n    \"blue\": (0,0,255),\n    \"orange\": (255,165,0),\n    \"dark grey\": (169,169,169),\n    \"brown\": (165,42,42),\n    \"purple\": (160,32,240),\n    \"deep pink\": (205,16,118),\n    \"green\": (0,255,0),\n    \"fire brick\": (178,34,34),\n    \"mid green\": (60,179,113)}\n\nfor color in colors.keys():\n    r,g,b = colors[color]\n    colors[color]=r/255.0,g/255.0,b/255.0\n    \nclass Element:\n    def __init__(self,symbol,covrad,vdwrad,col,name,atno):\n        self.symbol = symbol\n        self.covrad = covrad\n        self.vdwrad = vdwrad\n        self.col    = colors[cpk[col]]\n        self.name   = name\n        self.atno   = atno\n\n    def __str__(self):\n        return \"%3d %2s %16s %.1f %.1f (%.2f %.2f %.2f) \" % (\n            self.atno,self.symbol,self.name,self.covrad,self.vdwrad,\n            self.col[0],self.col[1],self.col[2])\n\nelements = range(104)\nelements[  0] = Element('Bq' ,0.00, 0.0,  0, \"Dummy\"    ,  0 )\nelements[  1] = Element('H' ,0.30, 2.75,  4, \"HYDROGEN\"    ,  1 )\nelements[  2] = Element('He',1.22, 5.50,  5, \"HELIUM\"      ,  2 )\nelements[  3] = Element('Li',1.23, 3.05, 14, \"LITHIUM\"     ,  3 )\nelements[  4] = Element('Be',0.89, 1.57, 12, \"BERYLLIUM\"   ,  4 )\nelements[  5] = Element('B' ,0.88, 3.87, 13, \"BORON\"       ,  5 )\nelements[  6] = Element('C' ,0.77, 3.87,  9, \"CARBON\"      ,  6 ) # was color 0\nelements[  7] = Element('N' ,0.70, 3.50,  1, \"NITROGEN\"    ,  7 )\nelements[  8] = Element('O' ,0.66, 3.37,  2, \"OXYGEN\"      ,  8 )\nelements[  9] = Element('F' ,0.58, 3.25,  6, \"FLUORINE\"    ,  9 )\nelements[ 10] = Element('Ne',1.60, 5.05, 12, \"NEON\"        , 10 )\nelements[ 11] = Element('Na',1.66, 5.50,  7, \"SODIUM\"      , 11 )\nelements[ 12] = Element('Mg',1.36, 3.75, 15, \"MAGNESIUM\"   , 12 )\nelements[ 13] = Element('Al',1.25, 3.75,  9, \"ALUMINIUM\"   , 13 )\nelements[ 14] = Element('Si',1.17, 5.50,  6, \"SILICON\"     , 14 )\nelements[ 15] = Element('P' ,1.10, 4.70,  8, \"PHOSPHORUS\"  , 15 )\nelements[ 16] = Element('S' ,1.04, 4.52,  3, \"SULPHUR\"     , 16 )\nelements[ 17] = Element('Cl',0.99, 4.37, 13, \"CHLORINE\"    , 17 )\nelements[ 18] = Element('Ar',1.91, 6.92, 12, \"ARGON\"       , 18 )\nelements[ 19] = Element('K' ,2.03, 5.97, 12, \"POTASSIUM\"   , 19 )\nelements[ 20] = Element('Ca',1.74, 4.87,  9, \"CALCIUM\"     , 20 )\nelements[ 21] = Element('Sc',1.44, 3.30, 12, \"SCANDIUM\"    , 21 )\nelements[ 22] = Element('Ti',1.32, 4.87,  9, \"TITANIUM\"    , 22 )\nelements[ 23] = Element('V' ,1.22, 2.65, 12, \"VANADIUM\"    , 23 )\nelements[ 24] = Element('Cr',1.19, 2.82,  9, \"CHROMIUM\"    , 24 )\nelements[ 25] = Element('Mn',1.17, 2.97,  9, \"MANGANESE\"   , 25 )\nelements[ 26] = Element('Fe',1.165,4.87,  8, \"IRON\"        , 26 )\nelements[ 27] = Element('Co',1.16, 2.82, 12, \"COBALT\"      , 27 )\nelements[ 28] = Element('Ni',1.15, 3.10, 10, \"NICKEL\"      , 28 )\nelements[ 29] = Element('Cu',1.17, 2.87, 10, \"COPPER\"      , 29 )\nelements[ 30] = Element('Zn',1.25, 2.87, 10, \"ZINC\"        , 30 )\nelements[ 31] = Element('Ga',1.25, 3.87, 12, \"GALLIUM\"     , 31 )\nelements[ 32] = Element('Ge',1.22, 9.99, 12, \"GERMANIUM\"   , 32 )\nelements[ 33] = Element('As',1.21, 2.07, 12, \"ARSENIC\"     , 33 )\nelements[ 34] = Element('Se',1.17, 2.25, 12, \"SELENIUM\"    , 34 )\nelements[ 35] = Element('Br',1.14, 4.37, 10, \"BROMINE\"     , 35 )\nelements[ 36] = Element('Kr',1.98, 4.75, 12, \"KRYPTON\"     , 36 )\nelements[ 37] = Element('Rb',2.22, 6.62, 12, \"RUBIDIUM\"    , 37 )\nelements[ 38] = Element('Sr',1.92, 5.05, 12, \"STRONTIUM\"   , 38 )\nelements[ 39] = Element('Y' ,1.62, 4.02, 12, \"YTTRIUM\"     , 39 )\nelements[ 40] = Element('Zr',1.45, 3.55, 12, \"ZIRCONIUM\"   , 40 )\nelements[ 41] = Element('Nb',1.34, 3.32, 12, \"NIOBIUM\"     , 41 )\nelements[ 42] = Element('Mo',1.29, 4.37, 12, \"MOLYBDENUM\"  , 42 )\nelements[ 43] = Element('Tc',1.27, 4.50, 12, \"TECHNETIUM\"  , 43 )\nelements[ 44] = Element('Ru',1.24, 3.00, 12, \"RUTHENIUM\"   , 44 )\nelements[ 45] = Element('Rh',1.25, 3.05, 12, \"RHODIUM\"     , 45 )\nelements[ 46] = Element('Pd',1.28, 3.60, 12, \"PALLADIUM\"   , 46 )\nelements[ 47] = Element('Ag',1.34, 3.87,  9, \"SILVER\"      , 47 )\nelements[ 48] = Element('Cd',1.41, 4.37, 12, \"CADMIUM\"     , 48 )\nelements[ 49] = Element('In',1.50, 3.62, 12, \"INDIUM\"      , 49 )\nelements[ 50] = Element('Sn',1.40, 4.17, 12, \"TIN\"         , 50 )\nelements[ 51] = Element('Sb',1.41, 2.80, 12, \"ANTIMONY\"    , 51 )\nelements[ 52] = Element('Te',1.37, 3.15, 12, \"TELLURIUM\"   , 52 )\nelements[ 53] = Element('I' ,1.33, 4.37, 11, \"IODINE\"      , 53 )\nelements[ 54] = Element('Xe',2.09, 5.25, 12, \"XENON\"       , 54 )\nelements[ 55] = Element('Cs',2.35, 7.52, 12, \"CAESIUM\"     , 55 )\nelements[ 56] = Element('Ba',1.98, 6.02,  8, \"BARIUM\"      , 56 )\nelements[ 57] = Element('La',1.69, 4.57, 12, \"LANTHANUM\"   , 57 )\nelements[ 58] = Element('Ce',1.65, 4.65, 12, \"CERIUM\"      , 58 )\nelements[ 59] = Element('Pr',1.65, 4.05, 12, \"PRASEODYMIUM\", 59 )\nelements[ 60] = Element('Nd',1.64, 4.47, 12, \"NEODYMIUM\"   , 60 )\nelements[ 61] = Element('Pm',1.65, 4.40, 12, \"PROMETHIUM\"  , 61 )\nelements[ 62] = Element('Sm',1.66, 4.35, 12, \"SAMARIUM\"    , 62 )\nelements[ 63] = Element('Eu',1.65, 4.90, 12, \"EUROPIUM\"    , 63 )\nelements[ 64] = Element('Gd',1.61, 4.22, 12, \"GADOLINIUM\"  , 64 )\nelements[ 65] = Element('Tb',1.59, 4.15, 12, \"TERBIUM\"     , 65 )\nelements[ 66] = Element('Dy',1.59, 4.07, 12, \"DYSPROSIUM\"  , 66 )\nelements[ 67] = Element('Ho',1.58, 4.02, 12, \"HOLMIUM\"     , 67 )\nelements[ 68] = Element('Er',1.57, 3.97, 12, \"ERBIUM\"      , 68 )\nelements[ 69] = Element('Tm',1.56, 3.92, 12, \"THULIUM\"     , 69 )\nelements[ 70] = Element('Yb',1.56, 3.85, 12, \"YTTERBIUM\"   , 70 )\nelements[ 71] = Element('Lu',1.56, 3.82, 12, \"LUTETIUM\"    , 71 )\nelements[ 72] = Element('Hf',1.44, 3.50, 12, \"HAFNIUM\"     , 72 )\nelements[ 73] = Element('Ta',1.34, 3.05, 12, \"TANTALUM\"    , 73 )\nelements[ 74] = Element('W' ,1.30, 3.15, 12, \"TUNGSTEN\"    , 74 )\nelements[ 75] = Element('Re',1.28, 3.25, 12, \"RHENIUM\"     , 75 )\nelements[ 76] = Element('Os',1.26, 3.95, 12, \"OSMIUM\"      , 76 )\nelements[ 77] = Element('Ir',1.26, 3.05, 12, \"IRIDIUM\"     , 77 )\nelements[ 78] = Element('Pt',1.29, 3.87, 12, \"PLATINUM\"    , 78 )\nelements[ 79] = Element('Au',1.34, 3.62,  6, \"GOLD\"        , 79 )\nelements[ 80] = Element('Hg',1.44, 4.95, 12, \"MERCURY\"     , 80 )\nelements[ 81] = Element('Tl',1.55, 4.27, 12, \"THALLIUM\"    , 81 )\nelements[ 82] = Element('Pb',1.54, 5.40, 12, \"LEAD\"        , 82 )\nelements[ 83] = Element('Bi',1.52, 4.32, 12, \"BISMUTH\"     , 83 )\nelements[ 84] = Element('Po',1.53, 3.02, 12, \"POLONIUM\"    , 84 )\nelements[ 85] = Element('At',1.50, 2.80, 12, \"ASTATINE\"    , 85 )\nelements[ 86] = Element('Rn',2.20, 5.75, 12, \"RADON\"       , 86 )\nelements[ 87] = Element('Fr',3.24, 8.10, 12, \"FRANCIUM\"    , 87 )\nelements[ 88] = Element('Ra',2.68, 6.42, 12, \"RADIUM\"      , 88 )\nelements[ 89] = Element('Ac',2.25, 5.30, 12, \"ACTINIUM\"    , 89 )\nelements[ 90] = Element('Th',2.16, 4.60, 12, \"THORIUM\"     , 90 )\nelements[ 91] = Element('Pa',1.93, 4.00, 12, \"PROTACTINIUM\", 91 )\nelements[ 92] = Element('U' ,3.00, 4.37, 12, \"URANIUM\"     , 92 )\nelements[ 93] = Element('Np',1.57, 4.27, 12, \"NEPTUNIUM\"   , 93 )\nelements[ 94] = Element('Pu',1.81, 4.17, 12, \"PLUTONIUM\"   , 94 )\nelements[ 95] = Element('Am',2.21, 4.15, 12, \"AMERICIUM\"   , 95 )\nelements[ 96] = Element('Cm',1.43, 4.12, 12, \"CURIUM\"      , 96 )\nelements[ 97] = Element('Bk',1.42, 4.10, 12, \"BERKELIUM\"   , 97 )\nelements[ 98] = Element('Cf',1.40, 4.07, 12, \"CALIFORNIUM\" , 98 )\nelements[ 99] = Element('Es',1.39, 4.05, 12, \"EINSTEINIUM\" , 99 )\nelements[100] = Element('Fm',1.38, 4.02, 12, \"FERMIUM\"     ,100 )\nelements[101] = Element('Md',1.37, 4.00, 12, \"MENDELEVIUM\" ,101 )\nelements[102] = Element('No',1.36, 3.97, 12, \"NOBELIUM\"    ,102 )\nelements[103] = Element('Lr',1.34, 3.95, 12, \"LAWRENCIUM\"  ,103 )\n\ndefault_radii = range(104)\ndefault_colors = range(104)\nfor i in range(1,len(elements)):\n    default_radii[i]  = elements[i].covrad\n    default_colors[i] = elements[i].col\n    \ndef scale_coords(coords, fac):\n    natom = len(coords)\n    for atom in range(natom):\n        for i in range(3):\n            coords[atom][i] = coords[atom][i]*fac\n\ndef dist(i,j):\n    return math.sqrt((i[0]-j[0])**2+\n                     (i[1]-j[1])**2+\n                     (i[2]-j[2])**2)\n\ndef make_bonds(coords, z, radii):\n    bonds = []\n    for i in range(len(coords)):\n        for j in range(i):\n            rij = dist(coords[i],coords[j])\n            if rij < 1.1*(radii[z[i]]+radii[z[j]]):\n                #print \"bond\",i,j,rij\n                bonds.append([i,j])\n    return bonds\n\ndef moldx(coords,z,bonds=None,units=\"angstrom\",fname=\"mol.dx\",\n          radii=default_radii,colors=default_colors,\n          scale=None,shift=None):\n    '''\n\n    Make an Opendx format file with a stick representation of the\n    molecule.  Additional representations will be easy to add.\n\n    coords = coords[natom][3] input coords (unchanged on output)\n\n    z = z[natom] input atomic number of each atom (unchanged on output)\n\n    bonds = optional list of precomputed connections.  If None, these\n    .       are computed from the covalent radii.\n\n    units = the input units.  If the input units are atomic, they will be\n    .       converted to angstrom.  The output units are always angstrom\n    .       unless additional scaling is specified.\n\n    fname = the name of the output file\n\n    radii = covalent radii for forming bonds.  Defaults will be used\n    .       if not speficied.\n\n    colors = colors for the atoms (3-vector float in [0,1]).  Defaults\n    .        will be used if not specified.\n\n    scale = if scale (scalar float) is specified, the *output*\n    .       coordinates are scaled by that factor.\n\n    shift = if shift (3-vector float) is specified, the *output*\n    .       coordinates are shifted *after* scaling\n    .       (e.g., x*scale+shift[0])\n\n    '''\n\n    au_to_angs = 0.529177249\n    if len(z) != len(coords): raise ValueError\n\n    if not bonds:\n        # Need angstroms for making bonds\n        if units in [\"au\",\"a.u.\",\"atomic\",\"bohr\"]:\n            scale_coords(coords,au_to_angs)\n\n        bonds = make_bonds(coords,z,radii)\n\n        if units in [\"au\",\"a.u.\",\"atomic\",\"bohr\"]:\n            scale_coords(coords,1.0/au_to_angs)\n\n    # We have the atomic coordinates, numbers, radii, and\n    # connectivity.  The opendx stick representation is formed\n    # by splitting the bonds at the midpoint (weighted by\n    # the ratio of the radii) with appropriate coloring.\n\n    if not units in [\"au\",\"a.u.\",\"atomic\",\"bohr\"]:\n        # Need atomic units for the output\n        scale_coords(coords,1.0/au_to_angs)\n\n    pos = []\n    col = []\n    con = []\n    \n    for i,j in bonds:\n        npos = len(pos)\n        rij = dist(coords[i],coords[j])\n        si = radii[z[i]]/(radii[z[i]]+radii[z[j]])\n        sj = 1.0-si\n        mid = [coords[i][0]*sj+coords[j][0]*si,\n               coords[i][1]*sj+coords[j][1]*si,\n               coords[i][2]*sj+coords[j][2]*si]\n        \n        pos.append(coords[i]); col.append(colors[z[i]])\n        pos.append(mid); col.append(colors[z[i]])\n\n        pos.append(mid); col.append(colors[z[j]])\n        pos.append(coords[j]); col.append(colors[z[j]])\n\n        con.append([npos,npos+1])\n        con.append([npos+2,npos+3])\n\n    f = open(fname,'w+')\n\n    f.write(\"object 1 class array type float rank 1 shape 3 items %d data follows\\n\" % len(pos))\n    for x,y,z in pos:\n        if scale: x, y, z = x*scale, y*scale, z*scale\n        if shift: x, y, z = x+shift[0], y+shift[1], z+shift[2]\n        f.write(\"%f %f %f\\n\" % (x,y,z))\n    f.write('attribute \"dep\" string \"positions\"\\n')\n\n    f.write(\"object 2 class array type int rank 1 shape 2 items %d data follows\\n\" % len(con))\n    for i,j in con: f.write(\"%d %d \\n\" % (i,j))\n    f.write('attribute \"element type\" string \"lines\"\\n')\n    f.write('attribute \"ref\" string \"positions\"\\n')\n    f.write('attribute \"dep\" string \"connections\"\\n')\n\n    f.write(\"object 3 class array type float rank 0 items %d data follows\\n\" % len(pos))\n    for p in pos: f.write(\"0 \")\n    f.write(\"\\n\")\n    f.write('attribute \"dep\" string \"positions\"\\n')\n\n    f.write(\"object 4 class array type float rank 1 shape 3 items %d data follows\\n\" % len(col))\n    for r,g,b in col: f.write(\"%f %f %f\\n\" % (r,g,b))\n    f.write('attribute \"dep\" string \"positions\"\\n')\n\n    f.write('object \"irregular positions irregular connections\" class field\\n')\n    f.write('component \"positions\" value 1\\n')\n    f.write('component \"connections\" value 2\\n')\n    f.write('component \"data\" value 3\\n')\n    f.write('component \"colors\" value 4\\n')\n    f.write('attribute \"name\" string \"irregular positions irregular connections\"\\n')\n    f.write('end\\n')\n\n    f.close()\n\n    # Undo-Force a.u. while making the bonds (cannot do until after\n    # writing file since pos contains references to these values).\n    if not units in [\"au\",\"a.u.\",\"atomic\",\"bohr\"]:\n        scale_coords(coords,au_to_angs)\n    \n\ndef symtoatn(sym):\n    sym = sym.lower()\n    for el in elements:\n        if el.symbol.lower() == sym:\n            return el.atno\n    raise \"Uh?\"\n\nif __name__ == \"__main__\":\n    # Read first molecule from the madness output file\n    f = sys.stdin\n    while 1:\n        line = f.readline().split()\n        if len(line) and line[0] == 'geometry':\n            coords = []\n            z = []\n            units = 'au'\n            while 1:\n                line = f.readline().split()\n                if len(line) == 0: continue\n                if line[0] == 'end':\n                    break\n                elif line[0] == 'units':\n                    units = line[1]\n                elif not (line[0] == 'units' or line[0] == 'eprec'):\n                    z.append(symtoatn(line[0]))\n                    coords.append([float(line[1]), float(line[2]), float(line[3])])\n            moldx(coords, z, units=units, fname='molecule.dx')\n            sys.exit(0)\n\n    \n"
  },
  {
    "path": "src/apps/moldft/nwtoxml.py",
    "content": "import sys\n\nbasis_name = \"6-31G\"\n\nprint '<?xml version=\"1.0\" ?>'\nprint '<name>'\nprint \"  \", basis_name\nprint '</name>'\n\nwhile 1:\n    line = sys.stdin.readline()\n    if not line: break\n\n    if line[0:5] == \"basis\":\n        symbol = line.split()[1].split(\"_\")[0][1:]\n        print '<basis symbol=\"%s\">' % symbol\n\n        line = sys.stdin.readline().split()\n        while 1:\n            if line[0] == \"end\":\n                break\n            shelltype = line[1]\n            coeff = []\n            pcoeff = []\n            expnt = []\n            while 1:\n                line = sys.stdin.readline().split()\n                e,c,p = 0.0,0.0,0.0\n                try:\n                    e,c = float(line[0]), float(line[1])\n                    if shelltype == 'SP': p = float(line[2])\n                    expnt.append(e)\n                    coeff.append(c)\n                    pcoeff.append(p)\n                except:\n                    break\n            nprim = len(expnt)\n            if shelltype == \"SP\": shelltype = \"L\"\n            print '  <shell type=\"%s\" nprim=\"%d\">' % (shelltype, nprim)\n            print '    <exponents>'\n            for e in expnt: print \"      %.8f\" % e\n            print '    </exponents>'\n            if shelltype == 'L':\n                print '    <scoefficients>'\n                for e in coeff: print \"      %.8f\" % e\n                print '    </scoefficients>'\n                print '    <pcoefficients>'\n                for e in pcoeff: print \"      %.8f\" % e\n                print '    </pcoefficients>'\n            else:\n                print '    <coefficients>'\n                for e in coeff: print \"      %.8f\" % e\n                print '    </coefficients>'\n\n            print '  </shell>'\n\n        print '</basis>'\n\n"
  },
  {
    "path": "src/apps/moldft/parsemad.py",
    "content": "import sys\nimport collections\nimport csv\n\ndef parsemad(filename):\n    f = open(filename,'r')\n\n    energies = []\n    conviters = []\n    timers = collections.defaultdict(float)\n    nnodes = -1\n    nthreads = -1\n    time = -1\n    iter = -1\n    energy = -1\n    nucrep = -1\n    nalpha = nbeta = -1\n    norbalpha = norbbeta = -1\n    spin_restricted = ''\n    aevals = []\n    bevals = []\n    dipole = -1\n    grad = []\n\n    while 1:\n        line = f.readline()\n        if line=='': break\n        data = line.strip().split()\n\n        if data == []:\n            pass\n        elif data[0] == 'number' and data[1] == 'of' and data[2] == 'electrons':\n            nalpha = int(data[3])\n            nbeta = int(data[4])\n        elif data[0] == 'number' and data[1] == 'of' and data[2] == 'orbitals':\n            norbalpha = int(data[3])\n            norbbeta = int(data[4])\n        elif data[0] == 'Total' and data[1] == 'Dipole' and data[2] == 'Moment:':\n            dipole = float(data[3])\n        elif data[0] == 'spin' and data[1] == 'restricted':\n            spin_restricted = (data[2] == 'true')\n        elif data[0] == 'Iteration':\n            iter = int(data[1])\n        elif data[0] == 'Converged!':\n            conviters.append(iter)\n            energies.append(energy)\n        elif line[0:22] == '                total ':\n            energy = float(data[1])\n        elif data[0] == 'nuclear-repulsion':\n            nucrep = float(data[1])\n        elif data[0] == 'alpha' and data[1] == 'eigenvalues':\n            data = map(float,f.readline()[3:].strip().split())\n            aevals = data\n        elif data[0] == 'beta' and data[1] == 'eigenvalues':\n            data = map(float,f.readline()[3:].strip().split())\n            bevals = data\n        elif data[0] == '#nodes':\n            nnodes = int(data[1])\n        elif data[0] == '#total' and data[1] == 'threads':\n            nthreads = int(data[2])\n        elif line[0:24] == '         Total wall time':\n            time = float(data[3][0:-2])\n        elif data[0] == 'timer:':\n            t = float(data[-1][0:-1])\n            what = data[1]\n            for s in data[2:-2]:\n                what = what + ' ' + s\n            timers[what] += t\n        elif line[0:19] == ' Derivatives (a.u.)':\n            grad = []\n            f.readline(); # skip -----\n            f.readline(); # skip blank\n            f.readline(); # skip headers\n            f.readline(); # skip -----\n            while 1:\n                line = f.readline()\n                data = line.strip().split()\n                if len(data) != 7: break\n                grad.append(map(float,[data[4], data[5], data[6]]))\n\n    # print \"na, nb\", nalpha, nbeta\n    # print \"norba, norbb\", norbalpha, norbbeta\n    # print \"spin restricted\", spin_restricted\n    # print \"nucrep\", nucrep\n    # print \"energies\", energies\n    # print \"iterations\", conviters\n    # print \"nodes\", nnodes\n    # print \"threads\", nthreads\n    # print \"wall time\", time\n    # print \"dipole\", dipole\n    # print \"gradients\", grad\n    # print \"alpha evals\", aevals\n    # if not spin_restricted:\n    #     print \" beta evals\", bevals\n    # print timers\n\n    results = {}\n    results[\"nalpha\"] = nalpha\n    results[\"nbeta\"] = nbeta\n    results[\"norba\"] = norbalpha\n    results[\"norbb\"] = norbbeta\n    results[\"spin restricted\"] = spin_restricted\n    results[\"nucrep\"] = nucrep\n    results[\"energies\"] = energies\n    results[\"iterations\"] = conviters\n    results[\"nodes\"] = nnodes\n    results[\"threads\"] = nthreads\n    results[\"wall time\"] = time\n    results[\"dipole\"] = dipole\n    results[\"gradients\"] = grad\n    results[\"alpha evals\"] = aevals\n    if not spin_restricted:\n        results[\" beta evals\"] = bevals\n    results[\"timers\"] = timers\n\n    return results\n\nresults = {}\nfor filename in sys.argv[1:]:\n   results[filename] = parsemad(filename)\n\noutf = open('out.csv', 'w')\nout = csv.writer(outf)\nF0 = results.keys()[0]\nfor tag in results[F0]['timers']:\n    for filename in results.keys():\n        nt = results[filename]['threads']\n        TBB = (filename[0] == \"T\")\n        tt = \"Old\"\n        if TBB:\n            nt = nt - 1\n            tt = \"TBB\"\n        out.writerow([tt,tag,nt,results[filename]['timers'][tag]])\n\nfor filename in results.keys():\n    nt = results[filename]['threads']\n    TBB = (filename[0] == \"T\")\n    tt = \"Old\"\n    if TBB:\n        nt = nt - 1\n        tt = \"TBB\"\n    out.writerow([tt,'total',nt,results[filename]['wall time']])\n    \n\n   \n"
  },
  {
    "path": "src/apps/moldft/pointgroup.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MAD_POINTGROUP_H\n#define MAD_POINTGROUP_H\n\n/// \\file pointgroup.h\n/// \\brief Implements basic functionality for Abelian point groups (D2h and subgroups)\n\n#include <madness/tensor/tensor.h>\n#include <madness/world/vector.h>\n#include <string>\n#include <ostream>\n#include <sstream>\n#include <iomanip>\n#include <algorithm>\n\nclass PointGroup;\nstd::ostream& operator<<(std::ostream& s, const PointGroup& g);\n\nclass PointGroup {\n    std::string name;           ///< group name\n    int order;                  ///< group order\n    std::string irs[8];         ///< Names of the irreps\n    std::string ops[8];         ///< Names of the operators\n    int c[8][8];                ///< Character table\n\npublic:\n    typedef madness::Vector<double,3> coordT;\n\n    /// Constructs point group by name (D2h and subgroups only)\n    PointGroup(const std::string name) {\n        this->name = name;\n        if (name == \"C1\") {\n            order = 1;\n            irs[0] = \"a\";\n            ops[0] = \"e\";\n            c[0][0] = 1;\n        }\n        else if (name == \"C2\") {\n            order = 2;\n            irs[0] = \"a\"; irs[1] = \"b\";\n            ops[0] = \"e\"; ops[1] = \"c2z\";\n            c[0][0] = 1;  c[0][1] = 1;\n            c[1][0] = 1;  c[1][1] =-1;\n        }\n        else if (name == \"Ci\") {\n            order = 2;\n            irs[0] = \"ag\"; irs[1] = \"au\";\n            ops[0] = \"e\"; ops[1] = \"i\";\n            c[0][0] = 1;  c[0][1] = 1;\n            c[1][0] = 1;  c[1][1] =-1;\n        }\n        else if (name == \"Cs\") {\n            order = 2;\n            irs[0] = \"a\"; irs[1] = \"a'\";\n            ops[0] = \"e\"; ops[1] = \"sxy\";\n            c[0][0] = 1;  c[0][1] = 1;\n            c[1][0] = 1;  c[1][1] =-1;\n        }\n        else if (name == \"C2h\") {\n            order = 4;\n            irs[0] = \"ag\"; irs[1] = \"au\"; irs[2] = \"bg\"; irs[3] = \"bu\";\n            ops[0] = \"e\";  ops[1] = \"c2z\";ops[2] = \"sxy\";ops[3] = \"i\";\n            c[0][0] = 1; c[0][1] = 1; c[0][2] = 1; c[0][3] = 1;\n            c[1][0] = 1; c[1][1] = 1; c[1][2] =-1; c[1][3] =-1;\n            c[2][0] = 1; c[2][1] =-1; c[2][2] =-1; c[2][3] = 1;\n            c[3][0] = 1; c[3][1] =-1; c[3][2] = 1; c[3][3] =-1;\n        }\n        else if (name == \"C2v\") {\n            order = 4;\n            irs[0] = \"a1\"; irs[1] = \"a2\"; irs[2] = \"b1\"; irs[3] = \"b2\";\n            ops[0] = \"e\";  ops[1] = \"c2z\";ops[2] = \"sxz\";ops[3] = \"syz\";\n            c[0][0] = 1; c[0][1] = 1; c[0][2] = 1; c[0][3] = 1;\n            c[1][0] = 1; c[1][1] = 1; c[1][2] =-1; c[1][3] =-1;\n            c[2][0] = 1; c[2][1] =-1; c[2][2] = 1; c[2][3] =-1;\n            c[3][0] = 1; c[3][1] =-1; c[3][2] =-1; c[3][3] = 1;\n        }\n        else if (name == \"D2\") {\n            order = 4;\n            irs[0] = \"a1\"; irs[1] = \"b1\"; irs[2] = \"b2\"; irs[3] = \"b3\";\n            ops[0] = \"e\";  ops[1] = \"c2z\";ops[2] = \"c2y\";ops[3] = \"c2x\";\n            c[0][0] = 1; c[0][1] = 1; c[0][2] = 1; c[0][3] = 1;\n            c[1][0] = 1; c[1][1] = 1; c[1][2] =-1; c[1][3] =-1;\n            c[2][0] = 1; c[2][1] =-1; c[2][2] = 1; c[2][3] =-1;\n            c[3][0] = 1; c[3][1] =-1; c[3][2] =-1; c[3][3] = 1;\n        }\n        else if (name == \"D2h\") {\n            order = 8;\n            irs[0] = \"ag\"; irs[1] = \"au\"; irs[2] = \"b1g\"; irs[3] = \"b1u\";\n            irs[4] = \"b2g\";irs[5] = \"b2u\";irs[6] = \"b3g\"; irs[7] = \"b3u\";\n            ops[0] = \"e\";  ops[1] = \"c2z\";ops[2] = \"c2y\"; ops[3] = \"c2x\";\n            ops[4] = \"i\";  ops[5] = \"sxy\";ops[6] = \"sxz\"; ops[7] = \"syz\";\n            c[0][0] = 1;   c[0][1] = 1;   c[0][2] = 1;   c[0][3] = 1;   c[0][4] = 1;   c[0][5] = 1;   c[0][6] = 1;   c[0][7] = 1;\n            c[1][0] = 1;   c[1][1] = 1;   c[1][2] = 1;   c[1][3] = 1;   c[1][4] =-1;   c[1][5] =-1;   c[1][6] =-1;   c[1][7] =-1;\n            c[2][0] = 1;   c[2][1] = 1;   c[2][2] =-1;   c[2][3] =-1;   c[2][4] = 1;   c[2][5] = 1;   c[2][6] =-1;   c[2][7] =-1;\n            c[3][0] = 1;   c[3][1] = 1;   c[3][2] =-1;   c[3][3] =-1;   c[3][4] =-1;   c[3][5] =-1;   c[3][6] = 1;   c[3][7] = 1;\n            c[4][0] = 1;   c[4][1] =-1;   c[4][2] = 1;   c[4][3] =-1;   c[4][4] = 1;   c[4][5] =-1;   c[4][6] = 1;   c[4][7] =-1;\n            c[5][0] = 1;   c[5][1] =-1;   c[5][2] = 1;   c[5][3] =-1;   c[5][4] =-1;   c[5][5] = 1;   c[5][6] =-1;   c[5][7] = 1;\n            c[6][0] = 1;   c[6][1] =-1;   c[6][2] =-1;   c[6][3] = 1;   c[6][4] = 1;   c[6][5] =-1;   c[6][6] =-1;   c[6][7] = 1;\n            c[7][0] = 1;   c[7][1] =-1;   c[7][2] =-1;   c[7][3] = 1;   c[7][4] =-1;   c[7][5] = 1;   c[7][6] = 1;   c[7][7] =-1;\n        }\n        else {\n            throw \"PointGroup: unknown group\";\n        }\n    }\n\n    /// Copy constructor\n    PointGroup(const PointGroup& other) {\n        *this = other;\n    }\n\n    /// Assignment\n    PointGroup& operator=(const PointGroup& other) {\n        if (this != &other) {\n            name = other.name;\n            order = other.order;\n            for (int ir=0; ir<order; ++ir) {\n                irs[ir] = other.irs[ir];\n                ops[ir] = other.ops[ir];\n                for (int op=0; op<order; ++op) {\n                    c[ir][op] = other.c[ir][op];\n                }\n            }\n        }\n        return *this;\n    }\n\n    /// Destructor\n    virtual ~PointGroup() {}\n\n    /// Returns irreducible representation corresponding to product\n    int irmul(int ir1, int ir2) const {\n        return ir1 ^ ir2;\n    }\n\n    /// Applies group operator number op (0,1,...,order-1) to point\n    coordT apply(int op, const coordT& r) const {\n        return apply(ops[op], r);\n    }\n\n    /// Applies named operator (e, c2z, c2y, c2x, sxy, sxz, syz, i) to point\n    static coordT apply(const std::string& op, const coordT& r)  {\n        const double x=r[0], y=r[1], z=r[2];\n        coordT q;\n        if (op == \"e\") {\n            q[0]=x;  q[1]=y;  q[2]=z;\n        }\n        else if (op == \"c2z\") {\n            q[0]=-x; q[1]=-y; q[2]=z;\n        }\n        else if (op == \"c2y\") {\n            q[0]=-x; q[1]=y;  q[2]=-z;\n        }\n        else if (op == \"c2x\") {\n            q[0]=x;  q[1]=-y; q[2]=-z;\n        }\n        else if (op == \"sxy\") {\n            q[0]=x;  q[1]=y;  q[2]=-z;\n        }\n        else if (op == \"sxz\") {\n            q[0]=x;  q[1]=-y; q[2]=z;\n        }\n        else if (op == \"syz\") {\n            q[0]=-x; q[1]=y;  q[2]=z;\n        }\n        else if (op == \"i\") {\n            q[0]=-x; q[1]=-y; q[2]=-z;\n        }\n        else {\n            throw \"PointGroup: apply_op_by_name: unknown operator name\";\n        }\n        return q;\n    }\n\n    /// Returns the irrep of the Cartesian axis (0, 1, 2 = x, y, z)\n    int cart_ir(int axis) const {\n        coordT r(0.0);\n        r[axis] = 1.0;\n        for (int ir=0; ir<order; ++ir) {\n            double sum = 0.0;\n            for (int op=0; op<order; ++op) {\n                sum += apply(op,r)[axis] * c[ir][op];\n            }\n            sum /= order;\n            if (sum > 0.9) {\n                return ir;\n            }\n        }\n        throw \"PointGroup: cart_ir: problem identifying axis\";\n    }\n\n    /// Returns irreducible cell\n\n    /// The irreducible cell is defined by considering the cube\n    /// -1<x<1, -1<y<1, -1<z<1.  Use symmetry operations to map\n    /// negative coordinates onto positive coordinates if possible.\n    /// This leads to the unique cell for D2h being the cube 0<x<1,\n    /// 0<y<1, 0<z<1.\n    ///\n    /// If a coordinate in the cell is positive, it means that the\n    /// irreducible cell has positive values of that coordinate.\n    coordT ircell() const {\n        double xmin=1.0, ymin=1.0, zmin=1.0;\n        // Loop thru corners of the cube\n        for (int x=-1; x<=1; x+=2) {\n            for (int y=-1; y<=1; y+=2) {\n                for (int z=-1; z<=1; z+=2) {\n                    // Find the most positive corner it can be mapped into\n                    double rx=x, ry=y, rz=z;\n                    for (int op=0; op<order; ++op) {\n                        coordT r;\n                        r[0] = rx; r[1] = ry; r[2] = rz;\n                        coordT q = apply(op,r);\n                        double xx = q[0], yy=q[1], zz = q[2];\n                        if ((xx>rx) || (xx==rx && yy>ry) || (xx==rx && yy==ry && zz>rz)) {\n                            rx=xx; ry=yy; rz=zz;\n                        }\n                    }\n                    xmin = std::min(xmin,rx); ymin = std::min(ymin,ry); zmin = std::min(zmin,rz);\n                }\n            }\n        }\n\n        coordT r;\n        r[0] = xmin; r[1] = ymin; r[2] = zmin;\n        return r;\n    }\n\n    static bool test() {\n        std::cout << PointGroup(\"C1\");\n        std::cout << PointGroup(\"C2\");\n        std::cout << PointGroup(\"Ci\");\n        std::cout << PointGroup(\"Cs\");\n        std::cout << PointGroup(\"C2h\");\n        std::cout << PointGroup(\"C2v\");\n        std::cout << PointGroup(\"D2\");\n        std::cout << PointGroup(\"D2h\");\n        return true;\n    }\n\n    const std::string& get_name() const {\n        return name;\n    }\n\n    int get_order() const {\n        return order;\n    }\n\n    const std::string& get_ir_name(int ir) const {\n        return irs[ir];\n    }\n\n    const std::string& get_op_name(int op) const {\n        return ops[op];\n    }\n\n    int ctable(int ir, int op) const {\n        return c[ir][op];\n    }\n};\n\nstd::ostream& operator<<(std::ostream& s, const PointGroup& g) {\n    int order = g.get_order();\n    s << \"\\n\";\n    s << \"Group \" << g.get_name() << \" - irreducible cell \" << g.ircell() << \"\\n\";\n    s << \"---------\\n\";\n    s << \"        \";\n    for (int op=0; op<order; ++op)\n        s << \" \" << std::setw(3) << g.get_op_name(op);\n    s << \"\\n\";\n    s << \"        \";\n    for (int op=0; op<order; ++op)\n        s << \" ---\";\n\n    s << \"\\n\";\n\n    int irx = g.cart_ir(0);\n    int iry = g.cart_ir(1);\n    int irz = g.cart_ir(2);\n\n    for (int ir=0; ir<order; ++ir) {\n        s << \"  \" << std::left << std::setw(3) << g.get_ir_name(ir) << std::right << \"  \";\n        for (int op=0; op<order; ++op) {\n            s << \" \" << std::setw(3) << g.ctable(ir, op);\n        }\n        if (ir == irx) s << \"   x\";\n        if (ir == iry) s << \"   y\";\n        if (ir == irz) s << \"   z\";\n        s << \"\\n\";\n    }\n    s << \"\\n\";\n    return s;\n}\n\n#endif\n"
  },
  {
    "path": "src/apps/moldft/preal.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/tensor/solvers.h>\n#include <madness/external/tinyxml/tinyxml.h>\n#include <madness/world/worldmem.h>\n\nusing namespace madness;\n\n#include<madness/chem/molecule.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/chem/xcfunctional.h>\n\n#include<madness/chem/gth_pseudopotential.h>\n#include \"wst_functional.h\"\n\nstatic const double twopi = 2.0*constants::pi;\n\ntypedef std::shared_ptr<real_convolution_3d> poperatorT;\n\nstatic std::vector<int> at_to_bf, at_nbf;\n\nextern void drot(long n, double* MADNESS_RESTRICT a, double* MADNESS_RESTRICT b, double s, double c, long inc);\n\nvoid drot3(long n, double* MADNESS_RESTRICT a, double* MADNESS_RESTRICT b, double s, double c, long inc) {\n    if (inc == 1) {\n        n*=3;\n        for (long i=0; i<n; i+=3) {\n            double aa0 = a[i  ]*c - b[i  ]*s;\n            double bb0 = b[i  ]*c + a[i  ]*s;\n            double aa1 = a[i+1]*c - b[i+1]*s;\n            double bb1 = b[i+1]*c + a[i+1]*s;\n            double aa2 = a[i+2]*c - b[i+2]*s;\n            double bb2 = b[i+2]*c + a[i+2]*s;\n            a[i  ] = aa0;\n            b[i  ] = bb0;\n            a[i+1] = aa1;\n            b[i+1] = bb1;\n            a[i+2] = aa2;\n            b[i+2] = bb2;\n        }\n    }\n    else {\n        inc*=3;\n        n*=inc;\n        for (long i=0; i<n; i+=inc) {\n            double aa0 = a[i  ]*c - b[i  ]*s;\n            double bb0 = b[i  ]*c + a[i  ]*s;\n            double aa1 = a[i+1]*c - b[i+1]*s;\n            double bb1 = b[i+1]*c + a[i+1]*s;\n            double aa2 = a[i+2]*c - b[i+2]*s;\n            double bb2 = b[i+2]*c + a[i+2]*s;\n            a[i  ] = aa0;\n            b[i  ] = bb0;\n            a[i+1] = aa1;\n            b[i+1] = bb1;\n            a[i+2] = aa2;\n            b[i+2] = bb2;\n        }\n    }\n}\n\n// Functor for the initial guess atomic density\nclass MolecularGuessDensityFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    const Molecule& molecule;\n    const AtomicBasisSet& aobasis;\npublic:\n    MolecularGuessDensityFunctor(const Molecule& molecule, const AtomicBasisSet& aobasis)\n        : molecule(molecule), aobasis(aobasis) {}\n\n    double operator()(const coord_3d& x) const {\n        return aobasis.eval_guess_density(molecule, x[0], x[1], x[2]);\n    }\n};\n\n// Templated functor for the atomic Gaussian basis functions\ntemplate <typename Q>\nclass AtomicBasisFunctor : public FunctionFunctorInterface<Q,3> {\nprivate:\n    const AtomicBasisFunction aofunc;\n\npublic:\n    AtomicBasisFunctor(const AtomicBasisFunction& aofunc)\n        : aofunc(aofunc)\n    {}\n\n    Q operator()(const coord_3d& x) const {\n        return aofunc(x[0], x[1], x[2]);\n    }\n\n    std::vector<coord_3d> special_points() const final {\n        return std::vector<coord_3d>(1,aofunc.get_coords_vec());\n    }\n\n    Level special_level() const final {\n      return 8;\n    }\n};\n\n// Functor for the nuclear potential\nclass MolecularPotentialFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    const Molecule& molecule;\npublic:\n    MolecularPotentialFunctor(const Molecule& molecule)\n        : molecule(molecule) {}\n\n    double operator()(const coord_3d& x) const {\n        return molecule.nuclear_attraction_potential(x[0], x[1], x[2]);\n    }\n\n    std::vector<coord_3d> special_points() const {return molecule.get_all_coords_vec();}\n};\n\n/// A MADNESS functor to compute either x, y, or z\nclass DipoleFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    const int axis;\npublic:\n    DipoleFunctor(int axis) : axis(axis) {}\n    double operator()(const coord_3d& x) const {\n        return x[axis];\n    }\n};\n\nstruct BoysLocalization {\n\n    std::vector<int> aset;\n\n    BoysLocalization() {}\n\n    BoysLocalization(unsigned int norbs) {\n        aset = std::vector<int>(norbs, 0);\n    }\n\n    void set_size(unsigned int norbs) {\n        aset = std::vector<int>(norbs, 0);\n    }\n\n    inline double DIP(const real_tensor& dip, int i, int j, int k, int l)\n    {\n        return dip(i, j, 0) * dip(k, l, 0) + dip(i, j, 1) * dip(k, l, 1) + dip(i, j, 2) * dip(k, l, 2);\n    }\n\n    real_tensor operator ()(World& world, \n                            const vector_real_function_3d& mo, \n                            const double thresh = 1e-9, \n                            const double thetamax = 0.5, \n                            const bool randomize = true)\n    {\n        //START_TIMER(world);\n        const bool doprint = false;\n        long nmo = mo.size();\n        real_tensor dip(nmo, nmo, 3);\n        double safety = 1e-1;\n        double vtol = thresh*safety;\n        for(int axis = 0;axis < 3;++axis){\n            real_function_3d fdip = real_factory_3d(world).functor(real_functor_3d(new DipoleFunctor(axis))).initial_level(4);\n            dip(_, _, axis) = matrix_inner(world, mo, mul_sparse(world, fdip, mo, vtol), true);\n        }\n        real_tensor U(nmo, nmo);\n        if(world.rank() == 0){\n            for(long i = 0;i < nmo;++i)\n                U(i, i) = 1.0;\n\n            double tol = thetamax;\n            long ndone = 0;\n            bool converged = false;\n            for(long iter = 0;iter < 300;++iter){\n                double sum = 0.0;\n                for(long i = 0;i < nmo;++i){\n                    sum += DIP(dip, i, i, i, i);\n                }\n                long ndone_iter = 0;\n                double maxtheta = 0.0;\n                if(doprint)\n                    printf(\"iteration %ld sum=%.4f ndone=%ld tol=%.2e\\n\", iter, sum, ndone, tol);\n\n                for(long i = 0;i < nmo;++i){\n                    for(long j = 0;j < i;++j){\n                        if (aset[i] == aset[j]) {\n                            double g = DIP(dip, i, j, j, j) - DIP(dip, i, j, i, i);\n                            double h = 4.0 * DIP(dip, i, j, i, j) + 2.0 * DIP(dip, i, i, j, j) - DIP(dip, i, i, i, i) - DIP(dip, j, j, j, j);\n                            double sij = DIP(dip, i, j, i, j);\n                            bool doit = false;\n                            if(h >= 0.0){\n                                doit = true;\n                                if(doprint)\n                                    print(\"             forcing negative h\", i, j, h);\n\n                                h = -1.0;\n                            }\n                            double theta = -g / h;\n                            maxtheta = std::max<double>(std::abs(theta), maxtheta);\n                            if(fabs(theta) > thetamax){\n                                doit = true;\n                                if(doprint)\n                                    print(\"             restricting\", i, j);\n\n                                if(g < 0)\n                                    theta = -thetamax;\n\n                                else\n                                    theta = thetamax * 0.8;\n\n                            }\n                            bool randomized = false;\n                            if(randomize && iter == 0 && sij > 0.01 && fabs(theta) < 0.01){\n                                randomized = true;\n                                if(doprint)\n                                    print(\"             randomizing\", i, j);\n\n                                theta += (RandomValue<double>() - 0.5);\n                            }\n                            if(fabs(theta) >= tol || randomized || doit){\n                                ++ndone_iter;\n                                if(doprint)\n                                    print(\"     rotating\", i, j, theta);\n\n                                double c = cos(theta);\n                                double s = sin(theta);\n                                drot3(nmo, &dip(i, 0, 0), &dip(j, 0, 0), s, c, 1);\n                                drot3(nmo, &dip(0, i, 0), &dip(0, j, 0), s, c, nmo);\n                                drot(nmo, &U(i, 0), &U(j, 0), s, c, 1);\n                            }\n                        }\n                    }\n                }\n\n                ndone += ndone_iter;\n                if(ndone_iter == 0 && tol == thresh){\n                    if(doprint)\n                        print(\"Boys localization converged in\", ndone,\"steps\");\n\n                    converged = true;\n                    break;\n                }\n                tol = std::max(0.1 * maxtheta, thresh);\n            }\n\n            if(!converged){\n                print(\"warning: boys localization did not fully converge: \", ndone);\n            }\n            U = transpose(U);\n\n\t    bool switched = true;\n\t    while (switched) {\n\t      switched = false;\n\t      for (int i=0; i<nmo; i++) {\n\t\tfor (int j=i+1; j<nmo; j++) {\n\t\t  if (aset[i] == aset[j]) {\n\t\t    double sold = U(i,i)*U(i,i) + U(j,j)*U(j,j);\n\t\t    double snew = U(i,j)*U(i,j) + U(j,i)*U(j,i);\n\t\t    if (snew > sold) {\n\t\t      real_tensor tmp = copy(U(_,i));\n\t\t      U(_,i) = U(_,j);\n\t\t      U(_,j) = tmp;\n\t\t      switched = true;\n\t\t    }\n\t\t  }\n\t\t}\n\t      }\n\t    }\n\n        // Fix phases.\n        for (long i=0; i<nmo; ++i) {\n            if (U(i,i) < 0.0) U(_,i).scale(-1.0);\n        }\n\n        }\n\n        world.gop.broadcast(U.ptr(), U.size(), 0);\n        //END_TIMER(world, \"Boys localize\");\n        return U;\n    }\n};\n\n// Main mini MolDFT class\nclass MiniDFT {\nprivate:\n    Molecule molecule;\n    AtomicBasisSet aobasis;\n    BoysLocalization boys;\n    XCfunctional xc;\n    \n\npublic:\n    MiniDFT(double              thresh,\n            int                 kwavelet,\n            int                 truncate_mode,\n            double              boxsize,\n            const Molecule&     molecule) : molecule(molecule) {\n        FunctionDefaults<3>::set_thresh(thresh);\n        FunctionDefaults<3>::set_k(kwavelet);\n        FunctionDefaults<3>::set_cubic_cell(-boxsize,boxsize);\n        FunctionDefaults<3>::set_truncate_mode(truncate_mode);\n\n\tstd::string xc_data;\n\t//xc_data=\"lda\";\n        xc_data = \"GGA_X_PBE 1.0 GGA_C_PBE 1.0\";\n\t//xc_data=\"GGA_X_PBE 1.\";\n\t//xc_data=\"GGA_C_PBE 1.\";\n\t//xc_data=\"GGA_X_B88 1.\";\n\txc.initialize(xc_data, false, world);\n    }\n\n    // Make the atomic basis functions\n    vector_real_function_3d makeao(World& world, const Molecule& molecule) {\n        aobasis.atoms_to_bfn(molecule, at_to_bf, at_nbf);\n        vector_real_function_3d ao(aobasis.nbf(molecule));\n        for(int i = 0; i<aobasis.nbf(molecule); ++i) {\n            real_functor_3d aofunc(new AtomicBasisFunctor<double>(aobasis.get_atomic_basis_function(molecule, i)));\n            ao[i] = real_factory_3d(world).functor(aofunc).truncate_on_project().nofence().truncate_mode(0);\n            AtomicBasisFunction atbf = aobasis.get_atomic_basis_function(molecule, i);\n        }\n        world.gop.fence();\n        truncate(world, ao);\n        normalize(world, ao);\n        print_meminfo(world.rank(), \"makeao\");\n    \n        return ao;\n    }\n   \n    // Kinetic energy matrix (for the Fock matrix) \n    real_tensor kinetic_energy_matrix(World& world, const vector_real_function_3d& v)\n    {\n        std::vector< std::shared_ptr<real_derivative_3d> > gradop = gradient_operator<double,3>(world);\n        reconstruct(world, v);\n        auto n = v.size();\n        real_tensor r(n, n);\n        for(int axis = 0;axis < 3;++axis){\n            vector_real_function_3d dv = apply(world, *(gradop[axis]), v);\n            r += matrix_inner(world, dv, dv, true);\n            dv.clear();\n        }\n        return r.scale(0.5);\n    }\n   \n    // Apply a (local) potential to the orbitals \n    vector_real_function_3d apply_potential(World& world, const real_function_3d& potential, const vector_real_function_3d& psi)\n    {\n        return mul_sparse(world,potential,psi,FunctionDefaults<3>::get_thresh()*0.01);\n    }\n   \n    // Construct simple LDA exchange-correlation potential \n    real_function_3d make_lda_potential(World& world, const real_function_3d &rho)\n    {\n        auto vlda = copy(rho);\n        vlda.reconstruct();\n        vlda.unaryop(xc_lda_potential());\n        return vlda;\n    }\n   \n    // Solve free-space Poisson's equation for a given charge density \n    real_function_3d make_coulomb_potential(World& world, const real_function_3d& rho)\n    {\n        auto thresh = FunctionDefaults<3>::get_thresh();\n        auto op = CoulombOperator(world, 1e-10, thresh);\n        return op(rho);\n    }\n   \n    // BSH operators \n    vector<poperatorT> make_bsh_operators(World& world, const real_tensor& evals, double shift)\n    {\n        auto thresh = FunctionDefaults<3>::get_thresh();\n        auto nmo = evals.dim(0);\n        vector<poperatorT> ops(nmo);\n        for(int i = 0;i < nmo; ++i){\n            auto eps = evals(i) + shift;\n            ops[i] = poperatorT(BSHOperatorPtr3D(world, sqrt(-2.0 * eps),  1e-10, thresh));\n        }\n        return ops;\n    }\n   \n    // orthogonalize orbitals using Gram-Schmidt \n    template<typename Q>\n    void orthogonalize(World& world, std::vector<Function<Q,3> >& psi) {\n        compress(world, psi);\n        for (unsigned int i = 0; i < psi.size(); i++) {\n            Function<Q,3>& psi_i = psi[i];\n            psi_i.scale(1.0/psi_i.norm2());\n            for (unsigned int j = 0; j < i; j++) {\n                Function<Q,3>& psi_j = psi[j];\n                Q s = inner(psi_j,psi_i);\n                psi_i.gaxpy(1.0,psi_j,-s); // |i> = |i> - |j><j|i>\n                psi_i.scale(1.0/psi_i.norm2());\n            }\n        }\n    }\n    \n    \n    // DESTROYS VPSI\n    vector_real_function_3d update(World&                            world,\n                                   const vector_real_function_3d&    psi,\n                                   vector_real_function_3d&          vpsi,\n                                   const real_tensor&                e,\n                                   int                               iter,\n                                   double&                           ravg)\n    {\n        // psi = - 2 G(E+shift) * (V+shift) psi\n        int nmo = psi.size();\n    \n        // determine shift to make homo <=-0.1\n        auto shift = 0.0;\n        if (e(nmo-1) > -0.1) {\n            shift = -0.1 - e(nmo-1);\n            gaxpy(world, 1.0, vpsi, shift, psi);\n            print(\"shifting vpsi by \", shift);\n        }\n    \n        // Do the BSH thing\n        scale(world, vpsi, -2.0);\n        truncate(world, vpsi);\n        vector<poperatorT> ops = make_bsh_operators(world, e, shift);\n        vector_real_function_3d new_psi = apply(world, ops, vpsi);\n    \n        // Step restriction\n        auto damp = 0.2;\n        //if (iter < 10) damp = 0.95;\n        //else if (iter < 20) damp = 0.85;\n        //else damp = 0.75;\n        //print(\"  shift\", shift, \"damp\", damp, \"\\n\");\n    \n        printf(\"      eigenvalue    residual\\n\");\n        ravg = 0.0;\n        for (int i=0; i<nmo; i++) {\n            double rnorm = (psi[i]-new_psi[i]).norm2();\n            ravg += rnorm/(double)nmo;\n            printf(\"%4d  %15.10f  %18.6e\\n\", i, e[i], rnorm);\n            new_psi[i] = damp*psi[i] + (1.0-damp)*new_psi[i];\n        }\n    \n        truncate(world,new_psi);\n        normalize(world, new_psi);\n        orthogonalize<double>(world, new_psi);\n        truncate(world,new_psi);\n        normalize(world, new_psi);\n        return new_psi;\n    }\n   \n    // Construct charge density from the orbitals \n    real_function_3d make_density(World& world, const vector_real_function_3d& v) {\n    \n       auto vsq = square(world, v);\n       compress(world, vsq);\n       real_function_3d rho = real_factory_3d(world);\n       rho.compress();\n       for(unsigned int i = 0;i < vsq.size();++i){\n         rho.gaxpy(1.0, vsq[i], 2.0, false);\n    \n       }\n       world.gop.fence();\n       vsq.clear();\n       return rho;\n    }\n\n    // main routine of class\n    void doit(World& world) {\n    \n        aobasis.read_file(\"6-31g\");\n\n        bool do_psp = true;\n\n        auto kwavelet = FunctionDefaults<3>::get_k();\n        auto thresh = FunctionDefaults<3>::get_thresh();\n        if (world.rank() == 0) printf(\"wavelet order: %d\\n\", kwavelet); \n        if (world.rank() == 0) printf(\"thresh: %15.4e\\n\", thresh); \n\n        // Nuclear potential (don't need if using pseudopotential)\n        //real_function_3d vnuc = real_factory_3d(world).functor(real_functor_3d(\n        //  new NuclearDensityFunctor(molecule))).truncate_mode(0).truncate_on_project();\n        auto safety = 0.1;\n        auto vtol = FunctionDefaults<3>::get_thresh() * safety;\n\n        real_function_3d vnuc;\n        if (! do_psp){\n          vnuc = real_factory_3d(world).functor(real_functor_3d(\n            new MolecularPotentialFunctor(molecule))).thresh(vtol).truncate_on_project();\n          vnuc.reconstruct();\n          print(\"total nuclear charge\", vnuc.trace());\n        }\n        //vnuc = -1.0*make_coulomb_potential(world, vnuc);\n    \n        // Create pseudopotential\n        GTHPseudopotential<double> ppotential(world, molecule);\n        if (do_psp){\n          ppotential.make_pseudo_potential(world);\n        }\n    \n        // Guess density\n        real_function_3d rho = real_factory_3d(world).functor(real_functor_3d(\n          new MolecularGuessDensityFunctor(molecule,aobasis))).truncate_on_project();\n        double nel = rho.trace();\n        if(world.rank() == 0)\n            print(\"guess dens trace\", nel);\n        int nmo = int(molecule.total_nuclear_charge() + 0.1)/2;\n        rho.scale((2.0*nmo)/nel); \n    \n        // Make AO basis functions\n        auto psi = makeao(world, molecule);\n        auto norms = norm2s(world, psi);\n    \n        double ravg = 10000.0;\n        for (int iter=0; iter<100 && ravg > 1e-6; iter++) {\n\n            bool doboys = false;\n            if (doboys) {\n                if (iter==1) {\n                    boys.set_size(psi.size());\n                }            \n                if (iter > 0) {\n                    real_tensor U = boys(world, psi);\n                    print(U);\n                }\n            }\n \n            print(\"\\n\\n  Iteration\",iter,\"\\n\");\n            auto rtr = rho.trace();\n            print(\"rho trace:  \", rtr);\n\n            WSTFunctional wstf;\n            real_function_3d rho_half = 0.5 * rho;\n            std::pair<real_function_3d, double> pair_xc = wstf.apply_xc(world,xc,rho_half);\n            real_function_3d vxc = pair_xc.first;\n            real_function_3d vxc2 = make_lda_potential(world,rho);\n            double exc = pair_xc.second;\n\n            vector_real_function_3d vpsi;\n            if (!do_psp){\n              real_function_3d v = vnuc + make_coulomb_potential(world,rho) + vxc;\n              vpsi = apply_potential(world, v, psi);\n            }\n            else{\n              double enl=0.0;\n              tensorT occ = tensorT(nmo);\n              for(int i = 0;i < nmo;++i)\n                  occ[i] = 1.0;\n              auto v = make_coulomb_potential(world,rho) + vxc + ppotential.vlocalp;\n              vpsi = ppotential.apply_potential(world, v, psi, occ, enl);\n            }\n\n            bool doplots = false;\n            /*if (doplots) {\n                char rho_name[25]; sprintf(rho_name, \"rho_%d.dat\", iter);\n                char vxc_name[25]; sprintf(vxc_name, \"vxc_%d.dat\", iter);\n                char vxc2_name[25]; sprintf(vxc2_name, \"vxc2_%d.dat\", iter);\n                char v_name[25]; sprintf(v_name, \"v_%d.dat\", iter);\n                int ppnts = 5001; \n                plot_line(rho_name, ppnts, {0.0,0.0,-50.0}, {0.0,0.0,50.0}, rho); \n                plot_line(vxc_name, ppnts, {0.0,0.0,-50.0}, {0.0,0.0,50.0}, vxc); \n                plot_line(vxc2_name, ppnts, {0.0,0.0,-50.0}, {0.0,0.0,50.0}, vxc2); \n                plot_line(v_name, ppnts, {0.0,0.0,-50.0}, {0.0,0.0,50.0}, v); \n            }*/\n   \n            auto ke_mat = kinetic_energy_matrix(world, psi);\n            auto pe_mat = matrix_inner(world, psi, vpsi, true);\n            auto ov_mat = matrix_inner(world, psi, psi, true);\n    \n            auto fock = ke_mat + pe_mat;\n            fock = 0.5*(fock + transpose(fock));\n    \n            real_tensor c;\n            tensor_real e;\n            sygv(fock, ov_mat, 1, c, e);\n            double rfactor = 1e-3;\n            for (int i = 0; i < fock.dim(0); i++)\n            {\n              auto thresh = FunctionDefaults<3>::get_thresh();\n              for (int j = 0; j < fock.dim(1); j++)\n              {\n                if (std::abs(ov_mat(i,j)) < thresh*rfactor) ov_mat(i,j) = 0.0;\n                if (std::abs(ke_mat(i,j)) < thresh*rfactor) ke_mat(i,j) = 0.0;\n                if (std::abs(pe_mat(i,j)) < thresh*rfactor) pe_mat(i,j) = 0.0;\n                if (std::abs(fock(i,j)) < thresh*0.1) fock(i,j) = 0.0;\n              }\n            }\n            if (world.rank() == 0) {\n              print(\"Kinetic (real part)\"); \n              print(ke_mat);\n              print(\"Potential (real part)\"); \n              print(pe_mat);\n              print(\"Fock (real part)\"); \n              print(fock);\n              print(\"eigenvalues\"); print(e);\n            }\n    \n            if (iter == 0) {\n                c = copy(c(_,Slice(0,nmo-1))); // truncate to occupied states\n                e = e(Slice(0,nmo-1));\n            }\n    \n            auto trantol = vtol / std::min(30.0, double(psi.size()));\n            psi = transform(world, psi, c, trantol, true);\n            vpsi = transform(world, vpsi, c, trantol, true);\n    \n            psi = update(world, psi, vpsi, e, iter, ravg);\n            truncate(world, psi);\n    \n            auto rthresh = 50.0*thresh;\n            if (ravg < rthresh) {\n              print(\"reprojecting ...\");\n              kwavelet += 2;\n              thresh /= 100.0;\n              FunctionDefaults<3>::set_k(kwavelet);\n              FunctionDefaults<3>::set_thresh(thresh);\n              if (!do_psp){\n                vnuc = madness::project(vnuc, kwavelet, thresh, true);}\n              else{\n                ppotential.reproject(kwavelet, thresh);}\n              for (int i = 0; i < nmo; i++) psi[i] = madness::project(psi[i], kwavelet, thresh, true);  \n            }\n    \n            //int md = psi[3].max_depth();\n            //print(\"max depth:  \", md);\n    \n            rho = make_density(world, psi);\n        }\n    }\n\n};\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    std::cout.precision(9);\n\n    Molecule molecule;\n\n    //print(\"Env: MADNESS_HAS_LIBXC =      \", MADNESS_HAS_LIBXC);\n\n    // Hydrogen atom\n    // Also for hydrogen need to make changes to nmo (set to 1)\n    // and make_density (multiply by 1.0 instead of 2.0)\n    //molecule.add_atom(0.0, 0.0, 0.0, 1.0, 1); \n    \n    // Hydrogen molecule \n    //molecule.add_atom(0.0, 0.0, 0.72372451, 1.0, 1); \n    //molecule.add_atom(0.0, 0.0, -0.72372451, 1.0, 1); \n    \n    // Helium atom\n    //molecule.add_atom(0.0, 0.0, 0.0, 2.0, 2); \n    //molecule.add_atom(0.0, 0.0, 5.0, 2.0, 2); \n    \n    // Neon atom\n    //molecule.add_atom(0, 0, 0, 8.0, 10);\n    \n    // Argon atom\n    //molecule.add_atom(0, 0, 0, 8.0, 18);\n    \n    // Calcium atom\n    //molecule.add_atom(0, 0, 0, 2.0, 20);\n\n    // Silicon atom\n    //molecule.add_atom(0, 0, 0, 4.0, 14);\n    \n    // Carbon atom\n    //molecule.add_atom(0, 0, 0, 4.0, 6);\n    \n    // Oxygen atom\n    //molecule.add_atom(0.0, 0.0, 2.286, 6.0, 8); \n    \n    // Beryllium atom (at arbitrary location)\n    //molecule.add_atom(1.23943, -0.3422, 5, 2.0, 4);\n    \n    // Water (doesn't work)\n    //molecule.add_atom( 1.4375, 0, 1.15, 1.0, 1);\n    //molecule.add_atom(-1.4375, 0, 1.15, 1.0, 1);\n    //molecule.add_atom(0, 0, 0, 8.0, 8);\n   \n    // H2 \n    molecule.add_atom(0.0, 0.0,  0.7  , 1.0, 1); \n    molecule.add_atom(0.0, 0.0, -0.7  , 1.0, 1); \n\n    // CO2 (doesn't work)\n    //molecule.add_atom(0.0, 0.0, 0.0, 4.0, 6);\n    //molecule.add_atom(0.0, 0.0, 2.24064, 6.0, 8);\n    //molecule.add_atom(0.0, 0.0, -2.24064, 6.0, 8);\n    \n    // O2 (doesn't work)\n    //molecule.add_atom(0.0, 0.0, 0.0  , 8.0, 8); \n    //molecule.add_atom(0.0, 0.0, 2.286, 8.0, 8); \n    \n    molecule.orient();\n    molecule.set_eprec(1e-5);\n    \n    molecule.print();\n   \n    // MRA parameters\n    double thresh = 1e-4;\n    int kwavelet = 6;\n    int truncate_mode = 0; \n    double L = 50.0;\n\n    MiniDFT dft(thresh, kwavelet, truncate_mode, L, molecule);\n    dft.doit(world);\n    return 0;\n}\n\n"
  },
  {
    "path": "src/apps/moldft/subspace.h",
    "content": "#ifndef SUBSPACE_H\n#define SUBSPACE_H\n\n  /*!\n   \\ingroup periodic_solver\n\n   \\brief The Subspace class is a container class holding previous orbitals\n   and residuals.\n   \\par\n   The Solver class uses the Krylov Accelerated Inexact Newton Solver (KAIN)\n   accelerate the convergence a given calculation. The KAIN solver needs to\n   store a subspace of previous orbitals and residuals.\n  */\n\n  //***************************************************************************\n  class Subspace\n  {\n    // Typedef's\n    typedef std::pair<vector_complex_function_3d,vector_complex_function_3d> pairvecT;\n    typedef std::vector<pairvecT> subspaceT;\n\n    //*************************************************************************\n    tensor_complex _Q;\n    //*************************************************************************\n\n    //*************************************************************************\n    subspaceT _subspace;\n    //*************************************************************************\n\n    //*************************************************************************\n    bool _spinpol;\n    //*************************************************************************\n\n    //*************************************************************************\n    int _maxsub;\n    //*************************************************************************\n\n  public:\n\n    //*************************************************************************\n    Subspace(bool spinpol=false, int maxsub=4)\n      : _spinpol(spinpol), _maxsub(maxsub)\n    {\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void update_subspace(World& world,\n                         vector_complex_function_3d& awfs_new,\n                         vector_complex_function_3d& bwfs_new,\n                         const vector_complex_function_3d& awfs_old,\n                         const vector_complex_function_3d& bwfs_old,\n                         const vector_complex_function_3d& rm)\n    {\n      // concatenate up and down spins\n      vector_complex_function_3d vm = awfs_old;\n      if (_spinpol)\n      {\n        vm.insert(vm.end(), bwfs_old.begin(), bwfs_old.end());\n      }\n\n      // Update subspace and matrix Q\n      compress(world, vm, false);\n      compress(world, rm, false);\n      world.gop.fence();\n      _subspace.push_back(pairvecT(vm,rm));\n\n      int m = _subspace.size();\n      tensor_complex ms(m);\n      tensor_complex sm(m);\n      for (int s=0; s<m; s++)\n      {\n          const vector_complex_function_3d& vs = _subspace[s].first;\n          const vector_complex_function_3d& rs = _subspace[s].second;\n          for (unsigned int i=0; i<vm.size(); i++)\n          {\n              ms[s] += vm[i].inner_local(rs[i]);\n              sm[s] += vs[i].inner_local(rm[i]);\n          }\n      }\n      world.gop.sum(ms.ptr(),m);\n      world.gop.sum(sm.ptr(),m);\n\n      tensor_complex newQ(m,m);\n      if (m > 1) newQ(Slice(0,-2),Slice(0,-2)) = _Q;\n      newQ(m-1,_) = ms;\n      newQ(_,m-1) = sm;\n\n      _Q = newQ;\n      if (world.rank() == 0) print(_Q);\n\n      // Solve the subspace equations\n      tensor_complex c;\n      if (world.rank() == 0) {\n          double rcond = 1e-12;\n          while (1) {\n              c = KAIN(_Q,rcond);\n              if (abs(c[m-1]) < 3.0) {\n                  break;\n              }\n              else if (rcond < 0.01) {\n                  if (world.rank() == 0)\n                    print(\"Increasing subspace singular value threshold \", c[m-1], rcond);\n                  rcond *= 100;\n              }\n              else {\n                  if (world.rank() == 0)\n                    print(\"Forcing full step due to subspace malfunction\");\n                  c = 0.0;\n                  c[m-1] = 1.0;\n                  break;\n              }\n          }\n      }\n\n      world.gop.broadcast_serializable(c, 0);\n      if (world.rank() == 0) {\n          print(\"Subspace solution\", c);\n      }\n\n      // Form linear combination for new solution\n      vector_complex_function_3d phisa_new = zero_functions_compressed<double_complex,3>(world, awfs_old.size());\n      vector_complex_function_3d phisb_new = zero_functions_compressed<double_complex,3>(world, bwfs_old.size());\n      std::complex<double> one = std::complex<double>(1.0,0.0);\n      for (unsigned int m=0; m<_subspace.size(); m++) {\n          const vector_complex_function_3d& vm = _subspace[m].first;\n          const vector_complex_function_3d& rm = _subspace[m].second;\n          const vector_complex_function_3d  vma(vm.begin(),vm.begin()+awfs_old.size());\n          const vector_complex_function_3d  rma(rm.begin(),rm.begin()+awfs_old.size());\n          const vector_complex_function_3d  vmb(vm.end()-bwfs_old.size(), vm.end());\n          const vector_complex_function_3d  rmb(rm.end()-bwfs_old.size(), rm.end());\n\n          gaxpy(world, one, phisa_new, c(m), vma, false);\n          gaxpy(world, one, phisa_new,-c(m), rma, false);\n          gaxpy(world, one, phisb_new, c(m), vmb, false);\n          gaxpy(world, one, phisb_new,-c(m), rmb, false);\n      }\n      world.gop.fence();\n\n      if (_maxsub <= 1) {\n          // Clear subspace if it is not being used\n          _subspace.clear();\n      }\n      else if (_subspace.size() == size_t(_maxsub)) {\n          // Truncate subspace in preparation for next iteration\n          _subspace.erase(_subspace.begin());\n          _Q = _Q(Slice(1,-1),Slice(1,-1));\n      }\n      awfs_new = phisa_new;\n      bwfs_new = phisb_new;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void update_subspace(World& world,\n                         vector_complex_function_3d& awfs_new,\n                         const vector_complex_function_3d& awfs_old,\n                         const vector_complex_function_3d& rm)\n    {\n      // concatenate up and down spins\n      vector_complex_function_3d vm = awfs_old;\n\n      // Update subspace and matrix Q\n      compress(world, vm, false);\n      compress(world, rm, false);\n      world.gop.fence();\n      _subspace.push_back(pairvecT(vm,rm));\n\n      int m = _subspace.size();\n      tensor_complex ms(m);\n      tensor_complex sm(m);\n      for (int s=0; s<m; s++)\n      {\n          const vector_complex_function_3d& vs = _subspace[s].first;\n          const vector_complex_function_3d& rs = _subspace[s].second;\n          for (unsigned int i=0; i<vm.size(); i++)\n          {\n              ms[s] += vm[i].inner_local(rs[i]);\n              sm[s] += vs[i].inner_local(rm[i]);\n          }\n      }\n      world.gop.sum(ms.ptr(),m);\n      world.gop.sum(sm.ptr(),m);\n\n      tensor_complex newQ(m,m);\n      if (m > 1) newQ(Slice(0,-2),Slice(0,-2)) = _Q;\n      newQ(m-1,_) = ms;\n      newQ(_,m-1) = sm;\n\n      _Q = newQ;\n      if (world.rank() == 0) print(_Q);\n\n      // Solve the subspace equations\n      tensor_complex c;\n      if (world.rank() == 0) {\n          double rcond = 1e-12;\n          while (1) {\n              c = KAIN(_Q,rcond);\n              if (abs(c[m-1]) < 3.0) {\n                  break;\n              }\n              else if (rcond < 0.01) {\n                  if (world.rank() == 0)\n                    print(\"Increasing subspace singular value threshold \", c[m-1], rcond);\n                  rcond *= 100;\n              }\n              else {\n                  if (world.rank() == 0)\n                    print(\"Forcing full step due to subspace malfunction\");\n                  c = 0.0;\n                  c[m-1] = 1.0;\n                  break;\n              }\n          }\n      }\n\n      world.gop.broadcast_serializable(c, 0);\n      if (world.rank() == 0) {\n          print(\"Subspace solution\", c);\n      }\n\n      // Form linear combination for new solution\n      vector_complex_function_3d phisa_new = zero_functions_compressed<double_complex,3>(world, awfs_old.size());\n      std::complex<double> one = std::complex<double>(1.0,0.0);\n      for (unsigned int m=0; m<_subspace.size(); m++) {\n          const vector_complex_function_3d& vm = _subspace[m].first;\n          const vector_complex_function_3d& rm = _subspace[m].second;\n          const vector_complex_function_3d  vma(vm.begin(),vm.begin()+awfs_old.size());\n          const vector_complex_function_3d  rma(rm.begin(),rm.begin()+awfs_old.size());\n\n          gaxpy(world, one, phisa_new, c(m), vma, false);\n          gaxpy(world, one, phisa_new,-c(m), rma, false);\n      }\n      world.gop.fence();\n\n      if (_maxsub <= 1) {\n          // Clear subspace if it is not being used\n          _subspace.clear();\n      }\n      else if (_subspace.size() == size_t(_maxsub)) {\n          // Truncate subspace in preparation for next iteration\n          _subspace.erase(_subspace.begin());\n          _Q = _Q(Slice(1,-1),Slice(1,-1));\n      }\n      awfs_new = phisa_new;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void reproject()\n    {\n      //  //if (world.rank() == 0)\n      //    //printf(\"\\n\\nreprojecting subspace to wavelet order: %d and thresh: %.5e\\n\\n\",\n      //    //FunctionDefaults<3>::get_k(), FunctionDefaults<3>::get_thresh());\n      //\n      //  unsigned int m = _subspace.size();\n      //  for (unsigned int s = 0; s < m; s++)\n      //  {\n      //      vector_complex_function_3d& vs = _subspace[s].first;\n      //      vector_complex_function_3d& rs = _subspace[s].second;\n      //      reconstruct(world, vs);\n      //      reconstruct(world, rs);\n      //      unsigned int vm = vs.size();\n      //      for (unsigned int i = 0; i < vm; i++)\n      //      {\n      //        vs[i] = madness::project(vs[i], FunctionDefaults<3>::get_k(),\n      //          FunctionDefaults<3>::get_thresh(), false);\n      //        rs[i] = madness::project(rs[i], FunctionDefaults<3>::get_k(),\n      //          FunctionDefaults<3>::get_thresh(), false);\n      //      }\n      //      world.gop.fence();\n      //      truncate(world, vs);\n      //      truncate(world, rs);\n      //      normalize(world, vs);\n      //  }\n      //  world.gop.fence();\n\n    }\n    //*************************************************************************\n\n  };\n\n//  template <typename T, int NDIM>\n//  struct lbcost {\n//      double leaf_value;\n//      double parent_value;\n//      lbcost(double leaf_value=1.0, double parent_value=0.0) : leaf_value(leaf_value), parent_value(parent_value) {}\n//      double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n//          if (key.level() <= 1) {\n//              return 100.0*(leaf_value+parent_value);\n//          }\n//          else if (node.is_leaf()) {\n//              return leaf_value;\n//          }\n//          else {\n//              return parent_value;\n//          }\n//      }\n//  };\n\n  //***************************************************************************\n\n  /*! \\ingroup periodic_solver\n      \\brief The main class of the periodic DFT solver\n      \\f[\n      z = frac{x}{1 - y^2}\n      \\f]\n  */\n\n#endif\n"
  },
  {
    "path": "src/apps/moldft/testcosine.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/tensor/solvers.h>\nusing namespace madness;\n\nstatic const double_complex I(0,1);\nstatic const double pi = constants::pi;\nstatic const double twopi = 2.0*constants::pi;\n\nstatic const double L = 5.0; // Unit cell size in au for neon\nstatic const double alpha = 2.5;\n\nstatic const double thresh = 1e-2;\nstatic const double kwavelet = 4;\nstatic const int truncate_mode = 0;\n\nstatic const double kx=0.5*twopi/L, ky=0.5*twopi/L, kz=0.5*twopi/L;\n//static const double kx=0, ky=0, kz=0;\n\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef SeparatedConvolution<double_complex,3> coperatorT;\ntypedef std::shared_ptr<operatorT> poperatorT;\n\ntemplate <typename Q>\nclass ExpFunctor: public FunctionFunctorInterface<Q,3> {\nprivate:\n    Q qx;\n    Q qy;\n    Q qz;\npublic:\n    ExpFunctor(Q qx, Q qy, Q qz) : qx(qx), qy(qy), qz(qz) {}\n    Q operator()(const coord_3d& x) const {\n      return std::exp(qx*x[0] + qy*x[1] + qz*x[2]);\n    }\n};\n\ntemplate <typename Q>\nclass ExpFunctor3d: public FunctionFunctorInterface<Q,3> {\nprivate:\n    Q q0;\n    Q q1;\n    Q q2;\npublic:\n    ExpFunctor3d(Q q0, Q q1, Q q2) : q0(q0), q1(q1), q2(q2) {}\n    Q operator()(const coord_3d& x) const {\n      return std::exp(q0*x[0])*std::exp(q1*x[1])*std::exp(q2*x[2]);\n    }\n};\n\nclass PWFunctor: public FunctionFunctorInterface<double_complex,3> {\nprivate:\n   std::vector<coord_3d> gvecs; \n   real_tensor coeffs;\n   double_complex factor;\n\npublic:\n    PWFunctor(const std::vector<coord_3d>& gvecs, const real_tensor& coeffs, const double& L)\n     : gvecs(gvecs), coeffs(coeffs), factor(double_complex(0.0,2*pi/L)) {};\n    double_complex operator()(const coord_3d& x) const {\n      double_complex s = 0.0;\n      int ngvecs = gvecs.size();\n      for (int ig = 0; ig < ngvecs; ig++) {\n        coord_3d gv = gvecs[ig];\n        s += coeffs(ig)*std::exp(factor*(gv[0]*x[0]+gv[1]*x[1]+gv[2]*x[2]));\n      }\n      MADNESS_CHECK(false);\n      return s;\n    }\n};\n\nclass CosPotentialFunctor : public FunctionFunctorInterface<double,3> {\npublic:\n  double operator()(const coord_3d& x) const {\n    return -alpha*(cos(2*pi*x[0]/L)*cos(2*pi*x[1]/L)*cos(2*pi*x[2]/L) + 1.0);\n  }\n};\n\nstd::vector<coord_3d> get_coeffs_pw(double maxKlen) {\n    std::vector<coord_3d> coeffs;\n    int maxI = 10;\n    for (int ii0 = -maxI; ii0 <= maxI; ii0++) {\n      for (int ii1 = -maxI; ii1 <= maxI; ii1++) {\n        for (int ii2 = -maxI; ii2 <= maxI; ii2++) {\n          double kvecLen = std::sqrt((double)(ii0*ii0 + ii1*ii1 + ii2*ii2))*2*pi/L;\n          if (kvecLen < maxKlen) {\n              coeffs.push_back({(double)ii0, (double)ii1, (double)ii2});\n          }\n        }\n      }\n    }\n    sort(coeffs.begin(), coeffs.end(), [](const coord_3d& a, const coord_3d& b) -> bool {\n      return a.normf() < b.normf();\n    });\n    return coeffs;\n}\n\nreal_tensor make_pw_matrix(const std::vector<coord_3d>& gvecs) {\n  int ngvecs = gvecs.size();\n  real_tensor Hcos(ngvecs,ngvecs);\n  std::vector<coord_3d> qvecs(8);\n  qvecs[0] = { 1.0, 1.0, 1.0};\n  qvecs[1] = { 1.0, 1.0,-1.0};\n  qvecs[2] = { 1.0,-1.0, 1.0};\n  qvecs[3] = { 1.0,-1.0,-1.0};\n  qvecs[4] = {-1.0, 1.0, 1.0};\n  qvecs[5] = {-1.0, 1.0,-1.0};\n  qvecs[6] = {-1.0,-1.0, 1.0};\n  qvecs[7] = {-1.0,-1.0,-1.0};\n  for (int ig1 = 0; ig1 < ngvecs; ig1++) {\n    double s = (2*pi/L)*gvecs[ig1].normf();\n    Hcos(ig1,ig1) = 0.5*s*s;\n    Hcos(ig1,ig1) += -alpha;\n    //print(\"ig1: \", ig1, \"    s: \", s, \"    0.5*s*s: \", 0.5*s*s, \"Hcos: \", Hcos(ig1,ig1));\n    for (int ig2 = 0; ig2 < ngvecs; ig2++) {\n      for (int iq = 0; iq < 8; iq++) {\n        coord_3d gvec = gvecs[ig2]-gvecs[ig1]+qvecs[iq]; \n        if (abs(gvec.normf()) < 1e-8)\n          Hcos(ig1,ig2) += -0.125*alpha; \n      }\n    }\n  }\n  return Hcos;\n}\n\nvector_complex_function_3d make_basis(World& world, double maxKlen) {\n    vector_complex_function_3d orbs;\n    int maxI = 8;\n    for (int ii0 = -maxI; ii0 <= maxI; ii0++) {\n      for (int ii1 = -maxI; ii1 <= maxI; ii1++) {\n        for (int ii2 = -maxI; ii2 <= maxI; ii2++) {\n          double kvecLen = std::sqrt((double)(ii0*ii0 + ii1*ii1 + ii2*ii2))*2*pi/L;\n          if (kvecLen < maxKlen) {\n            complex_function_3d orb = complex_factory_3d(world).functor(complex_functor_3d(\n              new ExpFunctor<double_complex>(I*(double)ii0*twopi/L, I*(double)ii1*twopi/L, I*(double)ii2*twopi/L))).truncate_on_project();\n            orbs.push_back(orb);\n          }\n        }\n      }\n    }\n    normalize(world,orbs);\n    return orbs;\n}\n\ntensor_complex make_kinetic_matrix(World& world, const vector_complex_function_3d& v) {\n    complex_derivative_3d Dx(world, 0);\n    complex_derivative_3d Dy(world, 1);\n    complex_derivative_3d Dz(world, 2);\n\n    vector_complex_function_3d dvx = apply(world, Dx, v);\n    vector_complex_function_3d dvy = apply(world, Dy, v);\n    vector_complex_function_3d dvz = apply(world, Dz, v);\n\n    // -1/2 (del + ik)^2 = -1/2 del^2 - i k.del + 1/2 k^2\n    // -1/2 <p|del^2|q> = +1/2 <del p | del q>\n\n    tensor_complex f1 = 0.5*(matrix_inner(world, dvx, dvx, true) +\n                             matrix_inner(world, dvy, dvy, true) +\n                             matrix_inner(world, dvz, dvz, true));\n\n    tensor_complex f2 =\n        (-I*kx)*matrix_inner(world, v, dvx, true) +\n        (-I*ky)*matrix_inner(world, v, dvy, true) +\n        (-I*kz)*matrix_inner(world, v, dvz, true);\n\n    tensor_complex f3 = (0.5 * (kx*kx + ky*ky + kz*kz)) * matrix_inner(world, v, v, true);\n\n    return f1 + f2 + f3;\n}\n\nvector_complex_function_3d apply_potential(const real_function_3d& potential, const vector_complex_function_3d& psi)\n{\n    vector_complex_function_3d vpsi;\n    for (unsigned int i=0; i<psi.size(); i++)\n        vpsi.push_back(potential*psi[i]);\n    return vpsi;\n}\n\n\nvoid orthogonalize(World& world, vector_complex_function_3d& psi) {\n    compress(world, psi);\n    for (unsigned int i = 0; i<psi.size(); i++) {\n        complex_function_3d& psi_i = psi[i];\n        psi_i.scale(1.0/psi_i.norm2());\n        for (unsigned int j = 0; j<i; j++) {\n            complex_function_3d& psi_j = psi[j];\n            double_complex s = inner(psi_j,psi_i);\n            psi_i.gaxpy(1.0,psi_j,-s); // |i> = |i> - |j><j|i>\n            psi_i.scale(1.0/psi_i.norm2());\n        }\n    }\n}\n\n// function to apply BSH with twisted PBC\n// kx, ky, kz -- some k value in the 1BZ (e.g. 0.5*2.0*pi/L where L is the lattice constant)\n// energy     -- bound state energy (should be negative)\n// L          -- lattice constant\ncomplex_function_3d apply_periodic_bsh(World& world, const complex_function_3d& f, \n                                       const double& kx, const double& ky, const double& kz,\n                                       const double& energy, const double& L) {\n  complex_function_3d phase_p = complex_factory_3d(world).functor(complex_functor_3d(\n    new ExpFunctor3d<double_complex>(I*kx,I*ky,I*kz))).truncate_mode(0).truncate_on_project();\n  complex_function_3d phase_m = complex_factory_3d(world).functor(complex_functor_3d(\n    new ExpFunctor3d<double_complex>(-I*kx,-I*ky,-I*kz))).truncate_mode(0).truncate_on_project();\n  SeparatedConvolution<double_complex,3> op = \n    PeriodicBSHOperator3D(world, {-kx*L, -ky*L, -kz*L}, sqrt(-2.0*(energy)),  1e-4, FunctionDefaults<3>::get_thresh());\n  complex_function_3d g = phase_m*apply(op, phase_p*f);\n  return g;\n}\n\n// DESTROYS VPSI\nvector_complex_function_3d update(World& world,\n                                  const vector_complex_function_3d& psi,\n                                  vector_complex_function_3d& vpsi,\n                                  const tensor_real& e,\n                                  int iter)\n{\n    // psi = - 2 G(E+shift) * (V+shift) psi\n    int nmo = psi.size();\n\n    // Append additional terms for periodic case to the potential\n    // -ik.del + 1/2 k^2\n    double ksq = kx*kx + ky*ky + kz*kz;\n    coord_3d k {kx, ky, kz};\n\n    // determine shift to make homo <=-0.1\n    double shift = 0.0;\n    if (e(nmo-1) > -0.1) {\n        shift = -0.1 - e(nmo-1);\n        gaxpy(world, 1.0, vpsi, shift, psi);\n    }\n\n    // Do the BSH thing\n    scale(world, vpsi, -2.0);\n    truncate(world, vpsi);\n    \n    vector_complex_function_3d new_psi(nmo);\n    for (int iorb = 0; iorb < nmo; iorb++) {\n        new_psi[iorb] = apply_periodic_bsh(world, vpsi[iorb], kx, ky, kz, e[iorb]+shift, L);\n    }\n\n\n    // Step restriction\n    double damp;\n    if (iter < 10) damp = 0.95;\n    else if (iter < 20) damp = 0.85;\n    else damp = 0.75;\n    damp = 0.25;\n    if (world.rank() == 0) print(\"  shift\", shift, \"damp\", damp, \"\\n\");\n\n    if (world.rank() == 0) printf(\"      eigenvalue    residual\\n\");\n    for (int i=0; i<nmo; i++) {\n        double rnorm = (psi[i]-new_psi[i]).norm2();\n        if (world.rank() == 0) printf(\"%4d  %10.6f  %10.1e\\n\", i, e[i], rnorm);\n        new_psi[i] = damp*psi[i] + (1.0-damp)*new_psi[i];\n    }\n    truncate(world,new_psi);\n    normalize(world, new_psi);\n    orthogonalize(world, new_psi);\n    truncate(world,new_psi);\n    normalize(world, new_psi);\n    return new_psi;\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    std::cout.precision(6);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_k(kwavelet);\n    FunctionDefaults<3>::set_bc(BoundaryConditions<3>(BC_PERIODIC));\n    FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<3>::set_truncate_mode(truncate_mode);\n\n    // Nuclear potential\n    real_function_3d v = real_factory_3d(world).functor(real_functor_3d(new CosPotentialFunctor())).truncate_mode(0).truncate_on_project();\n    v.truncate();\n\n    // Make basis\n    int nmo = 7;\n    vector_complex_function_3d psi = make_basis(world, 7.0);\n    print(\"initial size :\", psi.size());\n    print(\"reprojecting\");\n    for (int iter=0; iter<100; iter++) {\n        if (world.rank() == 0) print(\"\\n\\n  Iteration\",iter,\"\\n\");\n        vector_complex_function_3d vpsi = apply_potential(v, psi);\n\n        tensor_complex ke_mat = make_kinetic_matrix(world, psi);\n        tensor_complex pe_mat = matrix_inner(world, psi, vpsi, true);\n        tensor_complex ov_mat = matrix_inner(world, psi, psi, true);\n\n        //print(\"KE\"); print(real(ke_mat));\n        //print(\"PE\"); print(real(pe_mat));\n        //print(\"H\"); print(real(ke_mat+pe_mat));\n        //print(\"OV\"); print(ov_mat);\n\n        tensor_complex fock = ke_mat + pe_mat;\n        // eliminate small off-diagonal elements and lift diagonal\n        // degeneracies to reduce random mixing\n        for (unsigned int i=0; i<psi.size(); i++) {\n            fock(i,i) += i*thresh*1e-2;\n            for (unsigned int j=0; j<i; j++) {\n                if (std::abs(fock(i,j)) < thresh*1e-1 || std::abs(ov_mat(i,j)) < thresh*1e-1) {\n                    fock(i,j) = fock(j,i) = 0.0;\n                    ov_mat(i,j) = ov_mat(j,i) = 0.0;\n                }\n            }\n        }\n\n        tensor_complex c;\n        tensor_real e;\n        sygv(fock, ov_mat, 1, c, e);\n        //print(\"eigenvectors\"); print(c);\n        //print(\"eigenvalues\"); print(e);\n\n        if (iter == 0) {\n            c = copy(c(_,Slice(0,nmo-1))); // truncate to occupied states\n            e = e(Slice(0,nmo-1));\n        }\n\n        psi = transform(world, psi, c);\n        vpsi = transform(world, vpsi, c);\n\n        if (iter == 0) {\n          print(\"reprojecting ..\");\n            v = madness::project(v, kwavelet+2, thresh*1e-2, true); \n          for (int i = 0; i < nmo; i++) {\n            FunctionDefaults<3>::set_k(kwavelet+2);\n            FunctionDefaults<3>::set_thresh(thresh*1e-2);\n            psi[i] = madness::project(psi[i], kwavelet+2, thresh*1e-2, true); \n            vpsi[i] = madness::project(vpsi[i], kwavelet+2, thresh*1e-2, true); \n          }\n          print(\"done reprojecting ..\");\n        } else if (iter == 10) {\n          print(\"reprojecting ..\");\n            v = madness::project(v, kwavelet+4, thresh*1e-4, true); \n          for (int i = 0; i < nmo; i++) {\n            FunctionDefaults<3>::set_k(kwavelet+4);\n            FunctionDefaults<3>::set_thresh(thresh*1e-4);\n            psi[i] = madness::project(psi[i], kwavelet+4, thresh*1e-4, true); \n            vpsi[i] = madness::project(vpsi[i], kwavelet+4, thresh*1e-4, true); \n          }\n          print(\"done reprojecting ..\");\n        } else if (iter == 20) {\n          print(\"reprojecting ..\");\n            v = madness::project(v, kwavelet+6, thresh*1e-6, true); \n          for (int i = 0; i < nmo; i++) {\n            FunctionDefaults<3>::set_k(kwavelet+6);\n            FunctionDefaults<3>::set_thresh(thresh*1e-6);\n            psi[i] = madness::project(psi[i], kwavelet+6, thresh*1e-6, true); \n            vpsi[i] = madness::project(vpsi[i], kwavelet+6, thresh*1e-6, true); \n          }\n          print(\"done reprojecting ..\");\n        }\n\n        psi = update(world, psi, vpsi, e, iter);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/moldft/testmolbas.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#include <moldft/molecularbasis.h>\n\nusing namespace madness;\n\nint main() {\n    AtomicBasisSet g(\"sto-3g\");\n\n    g.print_all();\n\n    g.print(Molecule(\"input\"));\n\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/moldft/testperiodicdft.cc",
    "content": "/*\n  free space evals (k=6,tol=1e-4) from moldft\n  -3.0306e+01 -1.3228e+00 -4.9800e-01 -4.9800e-01 -4.9800e-01\n\n  computed by testperiodic with gamma point L=30.0\n  -3.0304e+01 -1.3213e+00 -4.9782e-01 -4.9782e-01 -4.9782e-01\n\n */\n\n\n#include <madness/mra/mra.h>\n#include <madness/tensor/solvers.h>\n#include<madness/chem/molecule.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/chem/potentialmanager.h>\n#include<madness/chem/xcfunctional.h>\n\nusing namespace madness;\n\n#include \"subspace.h\"\n\nstatic const double_complex I(0,1);\nstatic const double twopi = 2.0*constants::pi;\n\n//static const double L = 5.0; // Unit cell size in au for neon\n//static const double L = 8.37; // Unit cell size in au for neon\n//static const double L = 7.65; // Unit cell size in au for LiF\n//static const double L = 3.8; // Unit cell size in au for LiF\n//static const double L = 8.0;\n//static const double L = 10.26085381075144364474; // Unit cell size in au for Si\n// static const double L = 10.3235; // Unit cell size in au for CaF2\nstatic const double L = 10.6591; // Unit cell size in au for NaCl\n\nstatic const int maxR = 3; // periodic sums from -R to +R inclusive\nstatic const double thresh = 1e-5;\nstatic const double kwavelet = 14;\nstatic const int truncate_mode = 0;\n\nstatic Molecule molecule;\nstatic AtomicBasisSet aobasis;\nstatic Subspace* subspace;\n\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef SeparatedConvolution<double_complex,3> coperatorT;\ntypedef std::shared_ptr<operatorT> poperatorT;\ntypedef std::shared_ptr<coperatorT> pcoperatorT;\ntypedef std::pair<vector_complex_function_3d,vector_complex_function_3d> vcpairT;\n\nstatic double ttt, sss;\nstatic void START_TIMER(World& world) {\n    world.gop.fence(); ttt=wall_time(); sss=cpu_time();\n}\n\nstatic void END_TIMER(World& world, const char* msg) {\n    ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt);\n}\n\nclass SplitterFunctor: public FunctionFunctorInterface<double,3> {\npublic:\n    double operator()(const coord_3d& r) const {\n        return 2.0*r[2]*r[2] + r[0]*r[0];\n    }\n};\n\ntemplate <typename Q>\nclass ExpFunctor: public FunctionFunctorInterface<Q,3> {\nprivate:\n    Q qx;\n    Q qy;\n    Q qz;\npublic:\n    ExpFunctor(Q qx, Q qy, Q qz) : qx(qx), qy(qy), qz(qz) {}\n    Q operator()(const coord_3d& x) const {\n      return std::exp(qx*x[0] + qy*x[1] + qz*x[2]);\n    }\n};\n\ntemplate <typename Q>\nclass ExpFunctor3d: public FunctionFunctorInterface<Q,3> {\nprivate:\n    Q q0;\n    Q q1;\n    Q q2;\npublic:\n    ExpFunctor3d(Q q0, Q q1, Q q2) : q0(q0), q1(q1), q2(q2) {}\n    Q operator()(const coord_3d& x) const {\n      return std::exp(q0*x[0])*std::exp(q1*x[1])*std::exp(q2*x[2]);\n    }\n};\n\nclass MolecularGuessDensityFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    const Molecule& molecule;\n    const AtomicBasisSet& aobasis;\n    const int maxR = 2;\npublic:\n    MolecularGuessDensityFunctor(const Molecule& molecule, const AtomicBasisSet& aobasis)\n        : molecule(molecule), aobasis(aobasis) {}\n\n    double operator()(const coord_3d& x) const {\n        double sum = 0.0;\n        for (int i=-maxR; i<=+maxR; i++) {\n            for (int j=-maxR; j<=+maxR; j++) {\n                for (int k=-maxR; k<=+maxR; k++) {\n                    sum += aobasis.eval_guess_density(molecule, x[0]+i*L, x[1]+j*L, x[2]+k*L);\n                }\n            }\n        }\n        return sum;\n    }\n};\n\nclass AtomicBasisFunctor : public FunctionFunctorInterface<double_complex,3> {\nprivate:\n    const AtomicBasisFunction aofunc;\n    double kx, ky, kz;\n    std::vector<coord_3d> specialpt;\npublic:\n    AtomicBasisFunctor(const AtomicBasisFunction& aofunc, double kx, double ky, double kz)\n        : aofunc(aofunc), kx(kx), ky(ky), kz(kz)\n    {\n    \tdouble x, y, z;\n        aofunc.get_coords(x,y,z);\n        coord_3d r;\n        r[0]=x; r[1]=y; r[2]=z;\n        specialpt=std::vector<coord_3d>(1,r);\n    }\n\n    double_complex operator()(const coord_3d& x) const {\n        double_complex sum = 0.0;\n        for (int i=-maxR; i<=+maxR; i++) {\n            double xx = x[0]+i*L;\n            double rsq = xx*xx;\n            if (rsq < aofunc.rangesq()) {\n                for (int j=-maxR; j<=+maxR; j++) {\n                    double yy = x[1]+j*L;\n                    rsq += yy*yy;\n                    if (rsq < aofunc.rangesq()) {\n                        for (int k=-maxR; k<=+maxR; k++) {\n                            double zz = x[2]+k*L;\n                            rsq += zz*zz;\n                            if (rsq < aofunc.rangesq()) {\n                                sum += exp(-I*(kx*xx+ky*yy+kz*zz))*aofunc(xx, yy, zz);\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        return sum;\n    }\n\n    std::vector<coord_3d> special_points() const {return specialpt;}\n};\n\nclass AtomicOrbitalFunctor: public FunctionFunctorInterface<double,3> {\nprivate:\n    const AtomicBasisFunction aofunc;\n    double R;\n    int offx, offy, offz;\n    std::vector<coord_3d> specialpt;\n    double rangesq;\npublic:\n    AtomicOrbitalFunctor(const AtomicBasisFunction& aofunc, double R, int offx, int offy, int offz)\n        : aofunc(aofunc), R(R), offx(offx), offy(offy), offz(offz)\n    {\n        double x, y, z;\n        aofunc.get_coords(x,y,z);\n        coord_3d r;\n        r[0]=x+offx*R; r[1]=y+offy*R; r[2]=z+offz*R;\n        specialpt=std::vector<coord_3d>(1,r);\n        rangesq = 3.0*aofunc.rangesq();\n    }\n\n    double operator()(const coord_3d& x) const {\n        return aofunc(x[0] + offx*R, x[1] + offy*R, x[2] + offz*R);\n    }\n\n    std::vector<coord_3d> special_points() const {return specialpt;}\n};\n\nclass KPeriodicBSHOperator {\nprivate:\n    double kx, ky, kz;\n    double L;\n    complex_function_3d phase_p;\n    complex_function_3d phase_m;\n\npublic:\n    KPeriodicBSHOperator(World& world, const double& kx, const double& ky, const double& kz, const double& L)\n     : kx(kx), ky(ky), kz(kz), L(L) {\n        phase_p = complex_factory_3d(world).functor(complex_functor_3d(\n          new ExpFunctor3d<double_complex>(I*kx,I*ky,I*kz))).truncate_mode(0).truncate_on_project();\n        phase_m = complex_factory_3d(world).functor(complex_functor_3d(\n          new ExpFunctor3d<double_complex>(-I*kx,-I*ky,-I*kz))).truncate_mode(0).truncate_on_project();\n    }\n\n    KPeriodicBSHOperator(World& world, const Vector<double,3>& kpt, const double& L)\n     : kx(kpt[0]), ky(kpt[1]), kz(kpt[2]), L(L) {\n        phase_p = complex_factory_3d(world).functor(complex_functor_3d(\n          new ExpFunctor3d<double_complex>(I*kx,I*ky,I*kz))).truncate_mode(0).truncate_on_project();\n        phase_m = complex_factory_3d(world).functor(complex_functor_3d(\n          new ExpFunctor3d<double_complex>(-I*kx,-I*ky,-I*kz))).truncate_mode(0).truncate_on_project();\n    }\n\n    vector_complex_function_3d apply(World& world, const vector_complex_function_3d& v, const tensor_real& evals, double shift = 0.0) {\n        START_TIMER(world);\n        int nmo = evals.dim(0);\n        vector<pcoperatorT> ops(nmo);\n        for(int i = 0;i < nmo; ++i){\n            double eps = evals(i) + shift;\n            ops[i] = pcoperatorT(PeriodicBSHOperatorPtr3D(world, vec(-kx*L, -ky*L, -kz*L), sqrt(-2.0*eps),  1e-4, FunctionDefaults<3>::get_thresh()));\n        }\n        vector_complex_function_3d t1 = mul(world,phase_p,v);\n        truncate(world,t1);\n        vector_complex_function_3d t2 = ::apply(world,ops,t1);\n        vector_complex_function_3d t3 = mul(world,phase_m,t2);\n        return t3;\n        END_TIMER(world, \"apply periodic bsh\");\n        throw \"control reaches end of non-void function\";\n        return t2; // T2 is random choice ... WHAT SHOULD IT REALLY BE??????????????????????????????\n    }\n};\n\nvector_complex_function_3d makeao_slow(World& world, const std::vector<Vector<double,3> >& kpoints) {\n    int nkpt = kpoints.size();\n    int nbf = aobasis.nbf(molecule);\n    vector_complex_function_3d ao(nkpt*nbf);\n    for (int ik = 0; ik < nkpt; ++ik) {\n        Vector<double,3> kvec = kpoints[ik];\n        double kx = kvec[0]; double ky = kvec[1]; double kz = kvec[2];\n        for(int i = 0; i<aobasis.nbf(molecule); ++i) {\n            aobasis.get_atomic_basis_function(molecule, i).print_me(std::cout);\n            complex_functor_3d aofunc(\n               new AtomicBasisFunctor(\n               aobasis.get_atomic_basis_function(molecule, i), kx, ky, kz));\n            ao[ik*nbf+i] = complex_factory_3d(world).functor(aofunc).truncate_on_project().nofence().truncate_mode(0);\n        }\n    }\n    world.gop.fence();\n    normalize(world,ao);\n    truncate(world,ao);\n    return ao;\n}\n\nvector_complex_function_3d makeao(World& world, const std::vector<Vector<double,3> >& kpts, double R) {\n    START_TIMER(world);\n    int nkpt = kpts.size();\n    int nbf = aobasis.nbf(molecule);\n    double t1 = 1./std::sqrt((double)nbf);\n    vector_complex_function_3d aos = zero_functions_compressed<double_complex,3>(world, nkpt*nbf);\n    if (world.rank() == 0) print(\"nbf:  \", nbf);\n    for (int ibf = 0; ibf < nbf; ibf++) {\n        if (world.rank() == 0) print(\"\\n\\nibf: \", ibf);\n        for (int i = -maxR; i <= maxR; i++) {\n            for (int j = -maxR; j <= maxR; j++) {\n                for (int k = -maxR; k <= maxR; k++) {\n                    //AtomicBasisFunction abf = aobasis.get_atomic_basis_function(molecule, ibf); \n                    //if ((i*i+j*j+k*k)*L*L < 3.0*abf.rangesq()) {\n                    if (true) {\n                        real_functor_3d aofunc(\n                           new AtomicOrbitalFunctor(\n                           aobasis.get_atomic_basis_function(molecule, ibf), L, i, j, k));\n                        real_function_3d ao = real_factory_3d(world).functor(aofunc).truncate_on_project().truncate_mode(0);\n                        ao.compress();\n                        for (int ik = 0; ik < nkpt; ik++) {\n                            Vector<double,3> kpt = kpts[ik];\n                            complex_function_3d t2 = t1*std::exp(double_complex(0.0,(i*kpt[0]+j*kpt[1]+k*kpt[2])*R))*ao;\n                            aos[ik*nbf+ibf].gaxpy(1.0,t2,1.0);\n                        }\n                    }\n                }\n            }\n        }\n    }\n    for (int ik = 0; ik < nkpt; ik++) {\n        Vector<double,3> kpt = kpts[ik];\n        complex_function_3d phase_m = complex_factory_3d(world).functor(complex_functor_3d(\n          new ExpFunctor3d<double_complex>(-I*kpt[0],-I*kpt[1],-I*kpt[2]))).truncate_mode(0).truncate_on_project();\n        for (int ibf = 0; ibf < nbf; ibf++) {\n            aos[ik*nbf+ibf] = aos[ik*nbf+ibf]*phase_m;\n        }\n    }\n    END_TIMER(world, \"makeao\");\n    return aos;\n}\n\n//vector_complex_function_3d makeao(World& world, const std::vector<Vector<double,3> >& kpts, double R) {\n//    START_TIMER(world);\n//    int nkpt = kpts.size();\n//    int nbf = aobasis.nbf(molecule);\n//    double t1 = 1./std::sqrt((double)nbf);\n//    vector_complex_function_3d ao = zero_functions_compressed<double_complex,3>(world, std:pow(2*maxR+1, 3)*nbf);\n//    vector_complex_function_3d aos = zero_functions_compressed<double_complex,3>(world, nkpt*nbf);\n//    print(\"nbf:  \", nbf);\n//    for (int ibf = 0; ibf < nbf; ibf++) {\n//        print(\"\\n\\nibf: \", ibf);\n//        for (int i = -maxR; i <= maxR; i++) {\n//            for (int j = -maxR; j <= maxR; j++) {\n//                for (int k = -maxR; k <= maxR; k++) {\n//                    AtomicBasisFunction abf = aobasis.get_atomic_basis_function(molecule, ibf); \n//                    //if ((i*i+j*j+k*k)*L*L < 3.0*abf.rangesq()) {\n//                    if (true) {\n//                        real_functor_3d aofunc(\n//                           new AtomicOrbitalFunctor(\n//                           aobasis.get_atomic_basis_function(molecule, ibf), L, i, j, k));\n//                        ao[i = real_factory_3d(world).functor(aofunc).truncate_on_project().truncate_mode(0);\n//                    }\n//                }\n//            }\n//        }\n//    }\n//    for (int ik = 0; ik < nkpt; ik++) {\n//        Vector<double,3> kpt = kpts[ik];\n//        complex_function_3d t2 = t1*std::exp(double_complex(0.0,(i*kpt[0]+j*kpt[1]+k*kpt[2])*R))*ao;\n//        aos[ik*nbf+ibf].gaxpy(1.0,t2,1.0);\n//    }\n//    for (int ik = 0; ik < nkpt; ik++) {\n//        Vector<double,3> kpt = kpts[ik];\n//        complex_function_3d phase_m = complex_factory_3d(world).functor(complex_functor_3d(\n//          new ExpFunctor3d<double_complex>(-I*kpt[0],-I*kpt[1],-I*kpt[2]))).truncate_mode(0).truncate_on_project();\n//        for (int ibf = 0; ibf < nbf; ibf++) {\n//            aos[ik*nbf+ibf] = aos[ik*nbf+ibf]*phase_m;\n//        }\n//    }\n//    END_TIMER(world, \"makeao\");\n//    return aos;\n//}\n\ntensor_complex make_kinetic_matrix(World& world, const vector_complex_function_3d& v, const Vector<double,3>& kpt) {\n    START_TIMER(world);\n    double kx = kpt[0]; double ky = kpt[1]; double kz = kpt[2];\n    complex_derivative_3d Dx(world, 0);\n    complex_derivative_3d Dy(world, 1);\n    complex_derivative_3d Dz(world, 2);\n\n    auto dvx = apply(world, Dx, v);\n    auto dvy = apply(world, Dy, v);\n    auto dvz = apply(world, Dz, v);\n\n    // -1/2 (del + ik)^2 = -1/2 del^2 - i k.del + 1/2 k^2\n    // -1/2 <p|del^2|q> = +1/2 <del p | del q>\n\n    auto f1 = 0.5 * (matrix_inner(world, dvx, dvx, false) +\n                     matrix_inner(world, dvy, dvy, false) +\n                     matrix_inner(world, dvz, dvz, false));\n\n    auto f2 =\n        (-I*kx)*matrix_inner(world, v, dvx, false) +\n        (-I*ky)*matrix_inner(world, v, dvy, false) +\n        (-I*kz)*matrix_inner(world, v, dvz, false);\n\n    auto f3 = (0.5 * (kx*kx + ky*ky + kz*kz)) * matrix_inner(world, v, v, true);\n    END_TIMER(world, \"kinetic energy\");\n\n    return f1 + f2 + f3;\n}\n\nvector_complex_function_3d apply_potential(World& world, const real_function_3d& potential, const vector_complex_function_3d& psi)\n{\n    START_TIMER(world);\n    auto vpsi = mul(world, potential, psi, false);\n    world.gop.fence();\n    END_TIMER(world, \"apply potential\");\n    return vpsi;\n}\n\nvector_complex_function_3d orth(World& world, const vector_complex_function_3d& v, double thresh = 1.e-10) {\n    auto vsize = v.size();\n    auto ov_mat = matrix_inner(world, v, v, true);\n    for (unsigned int i=0; i<v.size(); i++) {\n        for (unsigned int j=0; j<i; j++) {\n            if (std::abs(ov_mat(i,j)) < thresh*1e-1) {\n                ov_mat(i,j) = ov_mat(j,i) = 0.0;\n            }\n        }\n    }\n    tensor_complex U;\n    tensor_real D;\n    syev(ov_mat, U, D);\n    print(\"D: \");\n    print(D);\n    auto indx = -1;\n    for (unsigned int i = 0; i < vsize && indx < 0; i++) {\n      if (std::abs(D(i)) > thresh) {\n        indx = i;\n      }\n    }\n    U = copy(U(_,Slice(indx,vsize-1)));\n    auto R = transform(world, v, U);\n    normalize(world, R, true);\n    ov_mat = matrix_inner(world, R, R, true);\n    print(\"new overlap: \");\n    print(ov_mat);\n    return R;\n}\n\nstd::pair<vector_complex_function_3d, tensor_real> diag_and_transform(World& world, \n                                                                      const Vector<double,3> kpt, \n                                                                      const real_function_3d& v, \n                                                                      const vector_complex_function_3d& psik, \n                                                                      int nmo = 0) {\n    auto vpsik = apply_potential(world, v, psik); \n    auto ke_mat = make_kinetic_matrix(world, psik, kpt);\n    auto pe_mat = matrix_inner(world, psik, vpsik, true);\n    auto ov_mat = matrix_inner(world, psik, psik, true);\n    \n    tensor_complex fock = ke_mat + pe_mat;\n    // eliminate small off-diagonal elements and lift diagonal\n    // degeneracies to reduce random mixing\n    for (unsigned int i=0; i<psik.size(); i++) {\n        fock(i,i) += i*thresh*1e-2;\n        for (unsigned int j=0; j<i; j++) {\n            if (std::abs(fock(i,j)) < thresh*1e-1 || std::abs(ov_mat(i,j)) < thresh*1e-1) {\n                fock(i,j) = fock(j,i) = 0.0;\n                ov_mat(i,j) = ov_mat(j,i) = 0.0;\n            }\n        }\n    }\n\n    // print(\"H:\\n\"); print(fock);\n    // print(\"S:\\n\"); print(ov_mat);\n    tensor_complex c;\n    tensor_real e;\n    sygv(fock, ov_mat, 1, c, e);\n\n    if (nmo > 0) {\n        c = copy(c(_,Slice(0,nmo-1))); // truncate to occupied states\n        e = e(Slice(0,nmo-1));\n    }\n\n    auto new_psik = transform(world, psik, c);\n    return std::pair<vector_complex_function_3d, tensor_real>(new_psik, e);\n}\n \nreal_function_3d make_lda_potential(World& world, const real_function_3d &rho)\n{\n    START_TIMER(world);\n    auto vlda = copy(rho);\n    vlda.reconstruct();\n    vlda.unaryop(xc_lda_potential());\n    END_TIMER(world, \"lda potential\");\n    return vlda;\n}\n\nreal_function_3d make_coulomb_potential(World& world, const real_function_3d& rho)\n{\n    START_TIMER(world);\n    real_convolution_3d op = CoulombOperator(world, 1e-4, thresh);\n    END_TIMER(world, \"hartree potential\");\n    return op(rho);\n}\n\nvector<poperatorT> make_bsh_operators(World & world, const tensor_real& evals, double shift)\n{\n    int nmo = evals.dim(0);\n    vector<poperatorT> ops(nmo);\n    for(int i = 0;i < nmo; ++i){\n        double eps = evals(i) + shift;\n        ops[i] = poperatorT(BSHOperatorPtr3D(world, sqrt(-2.0 * eps),  1e-4, thresh));\n    }\n    return ops;\n}\n\nvoid orthogonalize(World& world, vector_complex_function_3d& psi) {\n    START_TIMER(world);\n    compress(world, psi);\n    for (unsigned int i = 0; i<psi.size(); i++) {\n        complex_function_3d& psi_i = psi[i];\n        psi_i.scale(1.0/psi_i.norm2());\n        for (unsigned int j = 0; j<i; j++) {\n            complex_function_3d& psi_j = psi[j];\n            double_complex s = inner(psi_j,psi_i);\n            psi_i.gaxpy(1.0,psi_j,-s); // |i> = |i> - |j><j|i>\n            psi_i.scale(1.0/psi_i.norm2());\n        }\n    }\n    END_TIMER(world, \"orthogonalize\");\n}\n\n// function to apply BSH with twisted PBC\n// kx, ky, kz -- some k value in the 1BZ (e.g. 0.5*2.0*pi/L where L is the lattice constant)\n// energy     -- bound state energy (should be negative)\n// L          -- lattice constant\n//\n// Obviously this is slow\ncomplex_function_3d apply_periodic_bsh(World& world, const complex_function_3d& f, \n                                       const double& kx, const double& ky, const double& kz,\n                                       const double& energy, const double& L) {\n  complex_function_3d phase_p = complex_factory_3d(world).functor(complex_functor_3d(\n    new ExpFunctor3d<double_complex>(I*kx,I*ky,I*kz))).truncate_mode(0).truncate_on_project();\n  complex_function_3d phase_m = complex_factory_3d(world).functor(complex_functor_3d(\n    new ExpFunctor3d<double_complex>(-I*kx,-I*ky,-I*kz))).truncate_mode(0).truncate_on_project();\n  auto op = PeriodicBSHOperator3D(world, vec(-kx*L, -ky*L, -kz*L), sqrt(-2.0*(energy)),  1e-4, FunctionDefaults<3>::get_thresh());\n  complex_function_3d g = phase_m*madness::apply(op, phase_p*f);\n  return g;\n}\n\n// function to apply BSH with twisted PBC\ncomplex_function_3d apply_periodic_bsh(World& world, const complex_function_3d& f, \n                                       const Vector<double,3>& kpt, \n                                       const double& energy, \n                                       const double& L) {\n    return apply_periodic_bsh(world,f,kpt[0],kpt[1],kpt[2],energy,L);\n}\n\n// DESTROYS VPSI\nvcpairT update(World& world,\n               int ik,\n               const vector_complex_function_3d& psi,\n               vector_complex_function_3d& vpsi,\n               const Vector<double,3>& kpt,\n               const real_function_3d& v,\n               const tensor_real& e)\n{\n    int nmo = psi.size();\n    double kx = kpt[0]; double ky = kpt[1]; double kz = kpt[2];\n\n    // determine shift to make homo <=-0.1\n    double shift = 0.0;\n    if (e(nmo-1) > -0.1) {\n        shift = -0.1 - e(nmo-1);\n        gaxpy(world, 1.0, vpsi, shift, psi);\n    }\n\n    // Do the BSH thing\n    scale(world, vpsi, -2.0);\n    //truncate(world, vpsi);\n    \n    //vector_complex_function_3d new_psi(nmo);\n    //for (int iorb = 0; iorb < nmo; iorb++) {\n    //  new_psi[iorb] = apply_periodic_bsh(world, vpsi[iorb], kx, ky, kz, e[iorb]+shift, L);\n    //}\n   \n    KPeriodicBSHOperator kop(world, kx, ky, kz, L);\n    vector_complex_function_3d new_psi = kop.apply(world, vpsi, e, shift);\n    vector_complex_function_3d rm = sub(world, psi, new_psi);\n    truncate(world,rm);\n\n    if (world.rank() == 0) printf(\"kpoint:  %10.5f    %10.5f    %10.5f\\n\",kpt[0],kpt[1],kpt[2]);\n    if (world.rank() == 0) printf(\"      eigenvalue    residual\\n\");\n    for (int i=0; i<nmo; i++) {\n        double rnorm = rm[i].norm2();\n        if (world.rank() == 0) printf(\"%4d  %10.6f  %10.1e\\n\", i, e[i], rnorm);\n    }\n    return vcpairT(new_psi,rm);\n}\n\nreal_function_3d make_density(World& world, const vector_complex_function_3d& v, double weight) {\n    START_TIMER(world);\n    real_function_3d rho(world);\n    for (unsigned int i=0; i<v.size(); i++) {\n        rho = rho + weight*abssq(v[i]);\n    }\n    rho.scale(2.0); // total closed-shell density\n    rho.truncate();\n    END_TIMER(world, \"make density\");\n    return rho;\n}\n\n// Return all orbitals for all kpoints\n// Modifies the density rho\nvector_complex_function_3d initial_guess(World& world, const real_function_3d& vnuc, real_function_3d& rho, const std::vector<Vector<double,3> >& kpoints, int nst) {\n    auto psi0 = makeao(world, kpoints, L);\n    auto v = vnuc + make_coulomb_potential(world,rho) + make_lda_potential(world,rho);\n    auto vpsi = apply_potential(world, v, psi0);\n\n    int nkpt = kpoints.size();\n    int nsize = psi0.size();\n    int nst_initial = nsize/nkpt;\n    MADNESS_CHECK(nst <= nst_initial);\n    if (world.rank() == 0) print(\"nsize: \", nsize);\n    if (world.rank() == 0) print(\"nst_initial: \", nst_initial);\n    vector_complex_function_3d psi;\n    for (int ik = 0; ik < nkpt; ++ik) {\n        vector_complex_function_3d psik(psi0.begin()+ik*nst_initial, psi0.begin()+(ik+1)*nst_initial);\n        vector_complex_function_3d vpsik(vpsi.begin()+ik*nst_initial, vpsi.begin()+(ik+1)*nst_initial);\n\n        auto ke_mat = make_kinetic_matrix(world, psik, kpoints[ik]);\n        auto pe_mat = matrix_inner(world, psik, vpsik, true);\n        auto ov_mat = matrix_inner(world, psik, psik, true);\n    \n        auto fock = ke_mat + pe_mat;\n        // eliminate small off-diagonal elements and lift diagonal\n        // degeneracies to reduce random mixing\n        for (unsigned int i=0; i<psik.size(); i++) {\n            fock(i,i) += i*thresh*1e-2;\n            for (unsigned int j=0; j<i; j++) {\n                if (std::abs(fock(i,j)) < thresh*1e-1 && std::abs(ov_mat(i,j)) < thresh*1e-1) {\n                    fock(i,j) = fock(j,i) = 0.0;\n                    ov_mat(i,j) = ov_mat(j,i) = 0.0;\n                }\n            }\n        }\n\n        tensor_complex c;\n        tensor_real e;\n        fock = 0.5*(fock + transpose(fock));\n        ov_mat = 0.5*(ov_mat + transpose(ov_mat));\n\n        // print(\"Initial Fock: \"); print(real(fock));\n        // print(\"Initial Overlap: \"); print(real(ov_mat));\n        sygv(fock, ov_mat, 1, c, e);\n\n        if (world.rank() == 0) print(\"initial_guess() ik = \", ik);\n        if (world.rank() == 0) print(e);\n    \n        psik = transform(world, psik, c);\n        vpsik = transform(world, vpsik, c);\n        for (int ist = 0; ist < nst; ist++) {\n            if (world.rank() == 0) print(\"pushing back ist = \", ist);\n            psi.push_back(psik[ist]);    \n        }\n    }\n\n    // compute new density\n    double weights = 1.0/(double)kpoints.size();\n    rho = make_density(world,psi,weights);\n    return psi;\n}\n\ntensor_complex matrix_exponential(const tensor_complex& A) {\n    const double tol = 1e-13;\n    MADNESS_CHECK(A.dim(0) == A.dim(1));\n\n    // Scale A by a power of 2 until it is \"small\"\n    double anorm = A.normf();\n    int n = 0;\n    double scale = 1.0;\n    while (anorm*scale > 0.1)\n    {\n        n++;\n        scale *= 0.5;\n    }\n    tensor_complex B = scale*A;    // B = A*2^-n\n\n    // Compute exp(B) using Taylor series\n    tensor_complex expB = tensor_complex(2, B.dims());\n    for (int i = 0; i < expB.dim(0); i++) expB(i,i) = double_complex(1.0,0.0);\n\n    int k = 1;\n    tensor_complex term = B;\n    while (term.normf() > tol)\n    {\n        expB += term;\n        term = inner(term,B);\n        k++;\n        term.scale(1.0/k);\n    }\n\n    // Repeatedly square to recover exp(A)\n    while (n--)\n    {\n        expB = inner(expB,expB);\n    }\n\n    return expB;\n}\n\nvoid fixphases(World& world, tensor_real& e, tensor_complex& U) {\n    int nmo = U.dim(0);\n    long imax;\n    for (long j = 0; j < nmo; j++)\n    {\n        // Get index of largest value in column\n        U(_,j).absmax(&imax);\n        double_complex ang = arg(U(imax,j));\n        double_complex phase = std::exp(-ang*I);\n        // Loop through the rest of the column and divide by the phase\n        for (long i = 0; i < nmo; i++)\n        {\n            U(i,j) *= phase;\n        }\n    }\n\n    // Within blocks with the same occupation number attempt to\n    // keep orbitals in the same order (to avoid confusing the\n    // non-linear solver).  Have to run the reordering multiple\n    // times to handle multiple degeneracies.\n    int maxpass = 15;\n    for (int pass = 0; pass < maxpass; pass++)\n    {\n        long j;\n        for (long i = 0; i < nmo; i++)\n        {\n            U(_, i).absmax(&j);\n            if (i != j)\n            {\n              tensor_complex tmp = copy(U(_, i));\n              U(_, i) = U(_, j);\n              U(_, j) = tmp;\n              //swap(e[i], e[j]);\n              double ti = e[i];\n              double tj = e[j];\n              e[i] = tj; e[j] = ti;\n            }\n        }\n    }\n\n    // Rotations between effectively degenerate states confound\n    // the non-linear equation solver ... undo these rotations\n    long ilo = 0; // first element of cluster\n    while (ilo < nmo-1) {\n        long ihi = ilo;\n        while (fabs(e[ilo]-e[ihi+1]) < thresh*700.0*std::max(fabs(e[ilo]),1.0)) {\n            ihi++;\n            if (ihi == nmo-1) break;\n        }\n        long nclus = ihi - ilo + 1;\n        if (nclus > 1) {\n            if (world.rank() == 0) print(\"   found cluster\", ilo, ihi, e[ilo]);\n            tensor_complex q = copy(U(Slice(ilo,ihi),Slice(ilo,ihi)));\n            //print(q);\n            // Special code just for nclus=2\n            // double c = 0.5*(q(0,0) + q(1,1));\n            // double s = 0.5*(q(0,1) - q(1,0));\n            // double r = sqrt(c*c + s*s);\n            // c /= r;\n            // s /= r;\n            // q(0,0) = q(1,1) = c;\n            // q(0,1) = -s;\n            // q(1,0) = s;\n\n            // Iteratively construct unitary rotation by\n            // exponentiating the antisymmetric part of the matrix\n            // ... is quadratically convergent so just do 3\n            // iterations\n            tensor_complex rot = matrix_exponential(-0.5*(q - conj_transpose(q)));\n            q = inner(q,rot);\n            tensor_complex rot2 = matrix_exponential(-0.5*(q - conj_transpose(q)));\n            q = inner(q,rot2);\n            tensor_complex rot3 = matrix_exponential(-0.5*(q - conj_transpose(q)));\n            q = inner(rot,inner(rot2,rot3));\n            U(_,Slice(ilo,ihi)) = inner(U(_,Slice(ilo,ihi)),q);\n        }\n        ilo = ihi+1;\n    }\n\n}\nvoid fixphases(World& world, tensor_real& e, tensor_complex& U, vector_complex_function_3d& psik) {\n    int nmo = U.dim(0);\n    long imax;\n    for (long j = 0; j < nmo; j++)\n    {\n        // Get index of largest value in column\n        U(_,j).absmax(&imax);\n        double_complex ang = arg(U(imax,j));\n        double_complex phase = std::exp(-ang*I);\n        // Loop through the rest of the column and divide by the phase\n        for (long i = 0; i < nmo; i++)\n        {\n            U(i,j) *= phase;\n        }\n    }\n\n    //// Within blocks with the same occupation number attempt to\n    //// keep orbitals in the same order (to avoid confusing the\n    //// non-linear solver).  Have to run the reordering multiple\n    //// times to handle multiple degeneracies.\n    //int maxpass = 5;\n    //for (int pass = 0; pass < maxpass; pass++)\n    //{\n    //    long j;\n    //    for (long i = 0; i < nmo; i++)\n    //    {\n    //        U(_, i).absmax(&j);\n    //        if (i != j)\n    //        {\n    //          tensor_complex tmp = copy(U(_, i));\n    //          U(_, i) = U(_, j);\n    //          U(_, j) = tmp;\n    //          //swap(e[i], e[j]);\n    //          double ti = e[i];\n    //          double tj = e[j];\n    //          e[i] = tj; e[j] = ti;\n    //        }\n    //    }\n    //}\n\n    // Rotations between effectively degenerate states confound\n    // the non-linear equation solver ... undo these rotations\n    long ilo = 0; // first element of cluster\n    while (ilo < nmo-1) {\n        long ihi = ilo;\n        while (fabs(e[ilo]-e[ihi+1]) < thresh*10.0*std::max(fabs(e[ilo]),1.0)) {\n            ihi++;\n            if (ihi == nmo-1) break;\n        }\n        long nclus = ihi - ilo + 1;\n//        if (nclus > 1) {\n//            //if (world.rank() == 0) print(\"   found cluster\", ilo, ihi);\n//            tensor_complex q = copy(U(Slice(ilo,ihi),Slice(ilo,ihi)));\n//            //print(q);\n//            // Special code just for nclus=2\n//            // double c = 0.5*(q(0,0) + q(1,1));\n//            // double s = 0.5*(q(0,1) - q(1,0));\n//            // double r = sqrt(c*c + s*s);\n//            // c /= r;\n//            // s /= r;\n//            // q(0,0) = q(1,1) = c;\n//            // q(0,1) = -s;\n//            // q(1,0) = s;\n//\n//            // Iteratively construct unitary rotation by\n//            // exponentiating the antisymmetric part of the matrix\n//            // ... is quadratically convergent so just do 3\n//            // iterations\n//            tensor_complex rot = matrix_exponential(-0.5*(q - conj_transpose(q)));\n//            q = inner(q,rot);\n//            tensor_complex rot2 = matrix_exponential(-0.5*(q - conj_transpose(q)));\n//            q = inner(q,rot2);\n//            tensor_complex rot3 = matrix_exponential(-0.5*(q - conj_transpose(q)));\n//            q = inner(rot,inner(rot2,rot3));\n//            U(_,Slice(ilo,ihi)) = inner(U(_,Slice(ilo,ihi)),q);\n//        }\n        if (nclus > 1) {\n            real_function_3d splitter = real_factory_3d(world).functor(real_functor_3d(\n              new SplitterFunctor())).truncate_mode(0).truncate_on_project();\n            vector_complex_function_3d psik_cluster(psik.begin()+ilo, psik.begin()+ihi+1);\n            vector_complex_function_3d sfuncs = mul(world,splitter,psik_cluster);\n            tensor_complex Mcluster = matrix_inner(world,psik_cluster,sfuncs);\n            tensor_real eigs; tensor_complex uvecs;\n            syev(Mcluster, uvecs, eigs);\n            if (world.rank() == 0) {\n                print(\"Found cluster of size: \", nclus, \"with energy = \", e[ilo]);\n                // print(\"cluster matrix:\"); print(Mcluster);\n                // print(\"cluster eigs:\"); print(eigs);\n                // print(\"cluster eigenvectors:\"); print(uvecs);\n            }\n            psik_cluster = transform(world, psik_cluster, uvecs);\n            for (int ist = 0; ist < nclus; ist++) {\n                psik[ilo+ist] = psik_cluster[ist];\n            }\n        }\n        ilo = ihi+1;\n    }\n\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    std::cout.precision(6);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_k(kwavelet);\n    FunctionDefaults<3>::set_bc(BoundaryConditions<3>(BC_PERIODIC));\n    FunctionDefaults<3>::set_cubic_cell(0,L);\n    FunctionDefaults<3>::set_truncate_mode(truncate_mode);\n\n    // kpoint list\n    //int nkpt = 4;\n    //std::vector<Vector<double,3> > kpoints(nkpt);\n    //kpoints[0] = vec(0.0*twopi/L, 0.0*twopi/L, 0.0*twopi/L); \n    //kpoints[1] = vec(0.0*twopi/L, 0.0*twopi/L, 0.5*twopi/L); \n    //kpoints[2] = vec(0.0*twopi/L, 0.5*twopi/L, 0.0*twopi/L); \n    //kpoints[3] = vec(0.0*twopi/L, 0.5*twopi/L, 0.5*twopi/L); \n    //double weight = 1.0/(double)nkpt;\n    \n    int nkpt = 8;\n    std::vector<Vector<double,3> > kpoints(nkpt);\n    kpoints[0] = vec(0.0*twopi/L, 0.0*twopi/L, 0.0*twopi/L); \n    kpoints[1] = vec(0.0*twopi/L, 0.0*twopi/L, 0.5*twopi/L); \n    kpoints[2] = vec(0.0*twopi/L, 0.5*twopi/L, 0.0*twopi/L); \n    kpoints[3] = vec(0.0*twopi/L, 0.5*twopi/L, 0.5*twopi/L); \n    kpoints[4] = vec(0.5*twopi/L, 0.0*twopi/L, 0.0*twopi/L); \n    kpoints[5] = vec(0.5*twopi/L, 0.0*twopi/L, 0.5*twopi/L); \n    kpoints[6] = vec(0.5*twopi/L, 0.5*twopi/L, 0.0*twopi/L); \n    kpoints[7] = vec(0.5*twopi/L, 0.5*twopi/L, 0.5*twopi/L); \n    double weight = 1.0/(double)nkpt;\n\n    //int nkpt = 2;\n    //std::vector<Vector<double,3> > kpoints(nkpt);\n    //kpoints[0] = vec(0.0*twopi/L, 0.0*twopi/L, 0.0*twopi/L); \n    //kpoints[1] = vec(0.0*twopi/L, 0.0*twopi/L, 0.5*twopi/L); \n    //double weight = 1.0/(double)nkpt;\n    \n    //int nkpt = 1;\n    //std::vector<Vector<double,3> > kpoints(nkpt);\n    ////kpoints[0] = vec(0.0*twopi/L, 0.0*twopi/L, 0.0*twopi/L); \n    //kpoints[0] = vec(0.5*twopi/L, 0.5*twopi/L, 0.5*twopi/L); \n    //double weight = 1.0/(double)nkpt;\n    \n    // initialize subspace\n    subspace = new Subspace[nkpt];\n\n    // // FCC unit cell for ne\n    molecule.add_atom(  0,  0,  0, 10.0, 10);\n     molecule.add_atom(L/2,L/2,  0, 10.0, 10);\n     molecule.add_atom(L/2,  0,L/2, 10.0, 10);\n     molecule.add_atom(  0,L/2,L/2, 10.0, 10);\n\n    // Cubic cell for LiF\n    // molecule.add_atom(  0,  0,  0, 9.0, 9);\n    // molecule.add_atom(L/2,L/2,  0, 9.0, 9);\n    // molecule.add_atom(L/2,  0,L/2, 9.0, 9);\n    // molecule.add_atom(  0,L/2,L/2, 9.0, 9);\n    // molecule.add_atom(L/2,  0,  0, 3.0, 3);\n    // molecule.add_atom(  0,L/2,  0, 3.0, 3);\n    // molecule.add_atom(  0,  0,L/2, 3.0, 3);\n    // molecule.add_atom(L/2,L/2,L/2, 3.0, 3);\n\n    // Cubic cell for CaF2\n    // molecule.add_atom(0.00*L, 0.00*L, 0.00*L, 20.0, 20);\n    // molecule.add_atom(0.50*L, 0.50*L, 0.00*L, 20.0, 20);\n    // molecule.add_atom(0.50*L, 0.00*L, 0.50*L, 20.0, 20);\n    // molecule.add_atom(0.00*L, 0.50*L, 0.50*L, 20.0, 20);\n    // molecule.add_atom(0.25*L, 0.25*L, 0.25*L, 9.0, 9); \n    // molecule.add_atom(0.75*L, 0.75*L, 0.75*L, 9.0, 9);\n    // molecule.add_atom(0.75*L, 0.75*L, 0.25*L, 9.0, 9);\n    // molecule.add_atom(0.25*L, 0.25*L, 0.75*L, 9.0, 9);\n    // molecule.add_atom(0.75*L, 0.25*L, 0.75*L, 9.0, 9);\n    // molecule.add_atom(0.25*L, 0.75*L, 0.25*L, 9.0, 9);\n    // molecule.add_atom(0.25*L, 0.75*L, 0.75*L, 9.0, 9);\n    // molecule.add_atom(0.75*L, 0.25*L, 0.25*L, 9.0, 9);    \n\n    // Cubic cell for NaCl\n//    molecule.add_atom(0.0*L, 0.0*L, 0.0*L, 11.0, 11);\n//    molecule.add_atom(0.0*L, 0.5*L, 0.5*L, 11.0, 11);\n//    molecule.add_atom(0.5*L, 0.0*L, 0.5*L, 11.0, 11);\n//    molecule.add_atom(0.5*L, 0.5*L, 0.0*L, 11.0, 11);\n//    molecule.add_atom(0.5*L, 0.5*L, 0.5*L, 17.0, 17);\n//    molecule.add_atom(0.5*L, 0.0*L, 0.0*L, 17.0, 17);\n//    molecule.add_atom(0.0*L, 0.5*L, 0.0*L, 17.0, 17);\n//    molecule.add_atom(0.0*L, 0.0*L, 0.5*L, 17.0, 17);\n\n    // Cubic cell for Si\n    //molecule.add_atom(  0,     0,     0,     14.0, 14);\n    //molecule.add_atom(  L/2,   L/2,   0,     14.0, 14);\n    //molecule.add_atom(  L/2,   0,     L/2,   14.0, 14);\n    //molecule.add_atom(  0,     L/2,   L/2,   14.0, 14);\n    //molecule.add_atom(  L/4,   L/4,   L/4,   14.0, 14);\n    //molecule.add_atom(  3*L/4, 3*L/4, L/4,   14.0, 14);\n    //molecule.add_atom(  3*L/4, L/4,   3*L/4, 14.0, 14);\n    //molecule.add_atom(  L/4,   3*L/4, 3*L/4, 14.0, 14);\n\n    molecule.update_rcut_with_eprec(1e-3);\n\n    // Load basis\n    aobasis.read_file(\"sto-3g\");\n\n    // Nuclear potential\n    real_function_3d vnuc = real_factory_3d(world).functor(real_functor_3d(new NuclearDensityFunctor(molecule))).truncate_mode(0).truncate_on_project();\n    double nuclear_charge=vnuc.trace();\n    if (world.rank() == 0) print(\"total nuclear charge\", nuclear_charge);\n    vnuc = -1.0*make_coulomb_potential(world, vnuc);\n    vnuc.truncate();\n    int nst = int(molecule.total_nuclear_charge() + 0.1)/2;\n\n    // Guess density\n    real_function_3d rho = real_factory_3d(world).functor(real_functor_3d(new MolecularGuessDensityFunctor(molecule,aobasis))).truncate_on_project();\n    rho.truncate();\n    double rhot = rho.trace();\n    if (world.rank() == 0) print(\"total guess charge\", rhot);\n    rho.scale(molecule.total_nuclear_charge()/rhot);\n    \n    // Make AO basis functions\n    auto psi = initial_guess(world, vnuc, rho, kpoints, nst);\n\n    for (int iter=0; iter<100; iter++) {\n        if (world.rank() == 0) print(\"\\n\\n  Iteration\",iter,\"\\n\");\n        auto v = vnuc + make_coulomb_potential(world,rho) + make_lda_potential(world,rho);\n        truncate(world, psi);\n        auto vpsi = apply_potential(world, v, psi);\n\n        vector_complex_function_3d new_psi(nst*nkpt);\n        vector_complex_function_3d rm(nst*nkpt);\n        for (int ik = 0; ik < nkpt; ++ik) {\n            vector_complex_function_3d psik(psi.begin()+ik*nst, psi.begin()+(ik+1)*nst);\n            vector_complex_function_3d vpsik(vpsi.begin()+ik*nst, vpsi.begin()+(ik+1)*nst);\n\n            auto ke_mat = make_kinetic_matrix(world, psik, kpoints[ik]);\n            auto pe_mat = matrix_inner(world, psik, vpsik, true);\n            auto ov_mat = matrix_inner(world, psik, psik, true);\n    \n            auto fock = ke_mat + pe_mat;\n            // eliminate small off-diagonal elements and lift diagonal\n            // degeneracies to reduce random mixing\n            for (unsigned int i=0; i<psik.size(); i++) {\n                fock(i,i) += i*thresh*1e-2;\n                for (unsigned int j=0; j<i; j++) {\n                    if (std::abs(fock(i,j)) < thresh*1e-1 || std::abs(ov_mat(i,j)) < thresh*1e-1) {\n                        fock(i,j) = fock(j,i) = 0.0;\n                        ov_mat(i,j) = ov_mat(j,i) = 0.0;\n                    }\n                }\n            }\n\n            tensor_complex c;\n            tensor_real e;\n            sygv(fock, ov_mat, 1, c, e);\n            if (world.rank() == 0) print(\"main() ik = \", ik);\n            if (world.rank() == 0) print(e);\n  \n            // if (world.rank() == 0) print(\"fock: \"); \n            // if (world.rank() == 0) print(fock);\n            // if (world.rank() == 0) print(\"overlap: \"); \n            // if (world.rank() == 0) print(ov_mat);\n            // if (world.rank() == 0) print(\"eigenvectors: \"); \n            // if (world.rank() == 0) print(real(c));\n            // if (world.rank() == 0) print(imag(c));\n            fixphases(world, e, c); \n\n            psik = transform(world, psik, c);\n            vpsik = transform(world, vpsik, c);\n            vcpairT pair_update = update(world, ik, psik, vpsik, kpoints[ik], v, e);\n            vector_complex_function_3d new_psik = pair_update.first; \n            vector_complex_function_3d rmk = pair_update.second;\n\n            //subspace[ik].update_subspace(world, new_psik, psik, rmk);\n            auto damp = 0.3;\n            gaxpy(world,damp,psik,(1.0-damp),new_psik);\n\n            //orthogonalize(world,psik);\n            //truncate(world,psik);\n\n            truncate(world,psik);\n            orthogonalize(world,psik);\n\n            for (int ist = 0; ist < nst; ist++) {\n                psi[ik*nst+ist] = psik[ist];\n            }\n        }\n\n        if (world.rank() == 0) print(nkpt,nst,psi.size());\n        MADNESS_CHECK(nkpt*nst == (int) psi.size());\n\n        if (iter == 20) {\n          if (world.rank() == 0) print(\"reprojecting ..\");\n            vnuc = madness::project(vnuc, kwavelet+2, thresh*1e-2, true); \n            rho = madness::project(rho, kwavelet+2, thresh*1e-2, true); \n          for (unsigned int i = 0; i < psi.size(); i++) {\n            FunctionDefaults<3>::set_k(kwavelet+2);\n            FunctionDefaults<3>::set_thresh(thresh*1e-2);\n            psi[i] = madness::project(psi[i], kwavelet+2, thresh*1e-2, true); \n          }\n          if (world.rank() == 0) print(\"done reprojecting ..\");\n        }\n        if (iter == 30) {\n          if (world.rank() == 0) print(\"reprojecting ..\");\n            vnuc = madness::project(vnuc, kwavelet+4, thresh*1e-4, true); \n            rho = madness::project(rho, kwavelet+4, thresh*1e-4, true); \n          for (unsigned int i = 0; i < psi.size(); i++) {\n            FunctionDefaults<3>::set_k(kwavelet+4);\n            FunctionDefaults<3>::set_thresh(thresh*1e-4);\n            psi[i] = madness::project(psi[i], kwavelet+4, thresh*1e-4, true); \n          }\n          if (world.rank() == 0) print(\"done reprojecting ..\");\n        }\n        if (iter == 50) {\n          if (world.rank() == 0) print(\"reprojecting ..\");\n            vnuc = madness::project(vnuc, kwavelet+6, thresh*1e-6, true); \n            rho = madness::project(rho, kwavelet+6, thresh*1e-6, true); \n          for (unsigned int i = 0; i < psi.size(); i++) {\n            FunctionDefaults<3>::set_k(kwavelet+6);\n            FunctionDefaults<3>::set_thresh(thresh*1e-6);\n            psi[i] = madness::project(psi[i], kwavelet+6, thresh*1e-6, true); \n          }\n          if (world.rank() == 0) print(\"done reprojecting ..\");\n        }\n\n\n        auto rho_new = make_density(world, psi, weight);\n        double rdiff = (rho-rho_new).norm2();\n        double s = 0.3;\n        rho = s*rho + (1.0-s)*rho_new;\n        if (world.rank() == 0) printf(\"electron density difference:  %15.8e\\n\\n\", rdiff);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/moldft/testpg.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n#include <moldft/pointgroup.h>\n\nusing namespace madness;\n\nint main(int argc, char** argv) {\n    madness::initialize(argc, argv);\n\n    madness::World world(SafeMPI::COMM_WORLD);\n    world.gop.fence();\n\n    PointGroup::test();\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/moldft/tests/be_lda.in",
    "content": "# reference value from http://physics.nist.gov/PhysRefData/DFTdata/Tables/ptable.html\n\n# Correct energy to 6d.p. -14.447209\n\ndft\n  xc lda\nend\n\ngeometry\n  eprec 1e-7\n  be 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/c6h6_lda.in",
    "content": "# result is -230.201005 to about 5dp\n# canonical (343s) and localized (pm, 253s) coverge in same #iters to same result\n\ndft\n  xc lda\nend\n\n# D6h benzene at 6-31g* SCF =m\ngeometry\n  C  0.00000000    2.61951159     0.00000000\n  C  0.00000000   -2.61951159     0.00000000\n  C  2.26854281    1.30974042     0.00000000\n  C -2.26854281    1.30974042     0.00000000\n  C  2.26854281   -1.30974042     0.00000000\n  C -2.26854281   -1.30974042     0.00000000\n  H  0.00000000    4.65209154     0.00000000\n  H  0.00000000   -4.65209154     0.00000000\n  H  4.02886772    2.32598919     0.00000000\n  H -4.02886772    2.32598919     0.00000000\n  H  4.02886772   -2.32598919     0.00000000\n  H -4.02886772   -2.32598919     0.00000000\nend\n"
  },
  {
    "path": "src/apps/moldft/tests/ca_lda.in",
    "content": "# reference value from http://physics.nist.gov/PhysRefData/DFTdata/Tables/ptable.html\n\n# Correct energy to 6d.p. -675.742283\n# Should reproduce to at least 5dp\n\ndft\n  xc lda\n  canon\nend\n\ngeometry\n  eprec 1e-7\n  ca 0 0 0\nend\n"
  },
  {
    "path": "src/apps/moldft/tests/h2o_1_lda.in",
    "content": "# Exact is -75.913345\n# Should reproduce to about 1e-5\n\ndft\n  xc lda\nend\n\ngeometry\n  O  0.0    0.0 0.0\n  H  1.4375 0.0 1.15\n  H -1.4375 0.0 1.15\nend\n"
  },
  {
    "path": "src/apps/moldft/tests/h2o_2_lda.in",
    "content": "# Exact is -151.615331\n# Should reproduce to about 1e-5\n\ndft\n  xc lda\n  convonlydens\nend\n\ngeometry\n  units angstrom\n  O -0.04537298   1.27083455    0.00000000\n  H  0.11541692   1.82777013    0.77758805\n  H  0.11541692   1.82777013   -0.77758805\n  O -0.10561006  -0.47346262    0.00000000\n  H -0.09896558  -1.45781563    0.00000000\n  H  0.84226145  -1.68923759    0.00000000\nend\n"
  },
  {
    "path": "src/apps/moldft/tests/h2o_5_lda.in",
    "content": "\n# Energy is -379.58975249 probably accurate to about 1e-4\n\ndft\n  xc lda\n  convonlydens\nend\n\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n"
  },
  {
    "path": "src/apps/moldft/tests/h2o_9_lda.in",
    "content": "# Exact is -683.29182228\n# Should reproduce to about 1e-5\n\n\ndft\n  xc lda\n  convonlydens\nend\n\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616 \n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n"
  },
  {
    "path": "src/apps/moldft/tests/h2o_hf.in",
    "content": "# Any run should reproduce converged energy to at least 5 d.p. \n\n# Correct energy to 8dp -76.06818006\n# (but need smaller eprec and dconv to get this)\n\ndft\n  xc hf\nend\n\ngeometry\n   eprec 1e-6\n   units au\n   o 0 0 0\n   h 0  1.421178283 -1.064386617\n   h 0 -1.421178283 -1.064386617\nend\n"
  },
  {
    "path": "src/apps/moldft/tests/h_hf.in",
    "content": "# Correct energy -0.5\n# Should agree to at least 7 dp\n\ndft\n  xc hf\n  nopen 1\nend\n\ngeometry\n  eprec 1e-7\n  h 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/h_lsda.in",
    "content": "# reference value from http://physics.nist.gov/PhysRefData/DFTdata/Tables/ptable.html\n\n# Correct energy to 6d.p. -0.478671\n# Should agree to all figures\n\ndft\n  xc lda\n  nopen 1\nend\n\ngeometry\n  eprec 1e-7\n  h 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/he_hf.in",
    "content": "# reference value from thakkar\n\n# Correct energy to ?d.p. -2.861679995\n# Should agree to at least 8 dp\n\ndft\n  xc hf\nend\n\ngeometry\n  eprec 1e-7\n  he 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/he_lda.in",
    "content": "# reference value from http://physics.nist.gov/PhysRefData/DFTdata/Tables/ptable.html\n\n# Correct energy to 6d.p. -2.834836\n# Should agree to all figures\n\ndft\n  xc lda\nend\n\ngeometry\n  eprec 1e-7\n  he 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/he_xpbe.in",
    "content": "dft\n  xc \"GGA_X_PBE 1.\"\n  restricted \n  maxsub 5\n  protocol 1e-6\nend\n\ngeometry\n eprec 1e-5\n He 0.0 0.0 0.\nend\n\n\n\n"
  },
  {
    "path": "src/apps/moldft/tests/k_hf.in",
    "content": "# reference values from thakkar -599.1647847 (about 4 dp)\n# Madness should agree to 4 dp and be lower\n\ndft\n  xc hf\n  nopen 1\n  canon\nend\n\ngeometry\n  eprec 1e-6\n  k 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/li_hf.in",
    "content": "# reference values from thakkar\n\n# Correct energy to 4d.p. (?) -7.432726928\n# Should agree to at least 4 dp and madness should be lower\n\ndft\n  xc hf\n  nopen 1\nend\n\ngeometry\n  eprec 1e-7\n  li 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/li_lsda.in",
    "content": "# reference value from http://physics.nist.gov/PhysRefData/DFTdata/Tables/ptable.html\n\n# Correct energy to 6d.p. -7.343957\n# Should agree to at least 5 dp\n\ndft\n  xc lda\n  nopen 1\nend\n\ngeometry\n  eprec 1e-7\n  li 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/mg_lda.in",
    "content": "# reference value from http://physics.nist.gov/PhysRefData/DFTdata/Tables/ptable.html\n\n# Correct energy to 6d.p. -199.139406\n# Should reproduce to at least 5dp\n\ndft\n  xc lda\n  canon\nend\n\ngeometry\n  eprec 1e-7\n  mg 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/n2_hf.in",
    "content": "# Any run should reproduce converged energy to at least 5 d.p. \n\n# Correct energy to at least 6 d.p. is -108.9964232\n# Should reproduce all digits.\n\ndft\n  xc hf\n  protocol 1e-4 1e-6 1e-8\n  convonlydens\n  dconv 1e-5\n  canon\nend\n\ngeometry\n   eprec 1e-7\n   units au\n   n 0 0 0\n   n 0 0 2\nend\n"
  },
  {
    "path": "src/apps/moldft/tests/n_lsda.in",
    "content": "# reference value from http://physics.nist.gov/PhysRefData/DFTdata/Tables/ptable.html\n\n# Correct energy to 6d.p. -54.136799\n# Should agree to at least 5 dp\n\ndft\n  xc lda\n  nopen 3\nend\n\ngeometry\n  eprec 1e-7\n  n 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/na_hf.in",
    "content": "# reference values from thakkar -161.8589113 (about 4 dp)\n# Madness should agree to 4 dp and be lower\n\ndft\n  xc hf\n  nopen 1\n  canon\nend\n\ngeometry\n  eprec 1e-6\n  na 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/ne_lda.in",
    "content": "# reference value from http://physics.nist.gov/PhysRefData/DFTdata/Tables/ptable.html\n\n# Correct energy to 6d.p. -128.233481\n# Should agree to at least 5 dp\n\ndft\n  xc lda\n  canon\nend\n\ngeometry\n  eprec 1e-7\n  ne 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/nh3_planar_hf.in",
    "content": "# nh3 planar  HF -56.21761126 (6dp ?)\n# should agree to at least 5dp\n\ndft\n  xc hf\nend\n\ngeometry\n  units angstrom\n    n    0.00000000     0.00000000    -0.10626291\n    h    0.00000000    -0.85288345    -0.59826899\n    h    0.00000000     0.85288345    -0.59826899\n    h    0.00000000     0.00000000     0.87853682\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/nh3_pyramidal_hf.in",
    "content": "# nh3 pyramidal  HF -56.22520427 (about 6dp)\n# should agree to at least 5dp\n\ndft\n  xc hf\nend\n\ngeometry\n  units angstrom\n    n     0.00000000     0.00000000     0.01177161\n    h     0.65833757     0.65833757    -0.35033403\n    h     0.24096828    -0.89930585    -0.35033403\n    h    -0.89930585     0.24096828    -0.35033403\nend\n"
  },
  {
    "path": "src/apps/moldft/tests/rb_hf.in",
    "content": "# reference values from thakkar -2938.357450 (about 3 dp)\n# Madness should agree to 3-4 dp and be lower\n\ndft\n  xc hf\n  nopen 1\n  canon\n  aobasis sto-3g\nend\n\ngeometry\n  eprec 1e-6\n  rb 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/tests/sr_lda.in",
    "content": "# reference value from http://physics.nist.gov/PhysRefData/DFTdata/Tables/ptable.html\n\n# Correct energy to 6d.p. (?) -3129.453161\n# Should reproduce to at least 2e-5\n\ndft\n  xc lda\n  aobasis sto-3g\n  canon\n  convonlydens\nend\n\ngeometry\n  eprec 1e-6\n  sr 0 0 0\nend\n\n"
  },
  {
    "path": "src/apps/moldft/vizit.cfg",
    "content": "//\n// time: Thu Oct 22 07:19:36 2009\n//\n// version: 3.2.0 (format), 4.4.4 (DX)\n//\n// Message Window:\n// window: position = (0.0086,0.0312), size = 0.4781x0.2087, screen = 0\n//\n// panel[0]: position = (0.0109,0.1750), size = 0.2930x0.5088, startup = 1, devstyle = 1, screen = 0\n// title: value = Control Panel\n//\n// workspace: width = 187, height = 62\n// layout: snap = 0, width = 50, height = 50, align = NN\n//\n// panel[1]: position = (0.1477,0.2512), size = 0.2930x0.5625, startup = 1, devstyle = 1, screen = 0\n// title: value = Control Panel\n//\n// workspace: width = 135, height = 58\n// layout: snap = 0, width = 50, height = 50, align = NN\n//\n// interactor FileSelector[1]: num_components = 1, value = \"/home/rjh/workspace/madness/src/apps/moldft/coulomb.dx\"\n// instance: panel = 0, x = 5, y = 5, style = FileSelector, vertical = 1, size = 182x57\n//\n// interactor Value[1]: num_components = 1, value = 0.3\n// instance: panel = 1, x = 5, y = 5, style = Text, vertical = 1, size = 130x53\n//\n// node Image[1]:\n// depth: value = 24\n// window: position = (0.0531,0.0850), size = 0.8398x0.8313, screen = 0\n// input[1]: defaulting = 0, value = \"Image_1\"\n// input[4]: defaulting = 0, value = 1\n// input[5]: defaulting = 0, value = [-0.359201 -1.19209e-07 -0.201956]\n// input[6]: defaulting = 0, value = [10.9858 4.45037 -5.37649]\n// input[7]: defaulting = 0, value = 7.09512\n// input[8]: defaulting = 0, value = 1061\n// input[9]: defaulting = 0, value = 0.588\n// input[10]: defaulting = 0, value = [0.48035 -0.245487 0.842021]\n// input[11]: defaulting = 1, value = 29.9999\n// input[12]: defaulting = 0, value = 0\n// input[14]: defaulting = 0, value = 1\n// input[15]: defaulting = 1, value = \"none\"\n// input[16]: defaulting = 1, value = \"none\"\n// input[17]: defaulting = 1, value = 1\n// input[18]: defaulting = 1, value = 1\n// input[19]: defaulting = 0, value = 0\n// input[29]: defaulting = 1, value = 0\n// input[41]: defaulting = 0, value = \"rotate\"\n// internal caching: 1\n"
  },
  {
    "path": "src/apps/moldft/vizit.net",
    "content": "//\n// time: Thu Oct 22 07:19:36 2009\n//\n// version: 3.2.0 (format), 4.4.4 (DX)\n//\n//\n// MODULE main\n// workspace: width = 607, height = 596\n// layout: snap = 0, width = 50, height = 50, align = NN\n//\nmacro main(\n) -> (\n) {\n    // \n    // node Import[1]: x = 49, y = 83, inputs = 6, label = Import\n    // input[1]: defaulting = 0, visible = 1, type = 32, value = \"molecule.dx\"\n    // input[2]: defaulting = 1, visible = 1, type = 32, value = NULL\n    //\nmain_Import_1_out_1 = \n    Import(\n    main_Import_1_in_1,\n    main_Import_1_in_2,\n    main_Import_1_in_3,\n    main_Import_1_in_4,\n    main_Import_1_in_5,\n    main_Import_1_in_6\n    ) [instance: 1, cache: 1];\n    // \n    // node Tube[1]: x = 72, y = 219, inputs = 4, label = Tube\n    //\nmain_Tube_1_out_1 = \n    Tube(\n    main_Import_1_out_1,\n    main_Tube_1_in_2,\n    main_Tube_1_in_3,\n    main_Tube_1_in_4\n    ) [instance: 1, cache: 1];\n    // \n    // node FileSelector[1]: x = 322, y = 30, inputs = 0, label = FileSelector\n    // output[1]: visible = 1, type = 32, value = \"/home/rjh/workspace/madness/src/apps/moldft/coulomb.dx\"\n    // output[2]: visible = 1, type = 32, value = \"coulomb.dx\"\n    //\n    // \n    // node Import[2]: x = 335, y = 135, inputs = 6, label = Import\n    //\nmain_Import_2_out_1[cache: 0] = \n    Import(\n    main_FileSelector_1_out_1,\n    main_Import_2_in_2,\n    main_Import_2_in_3,\n    main_Import_2_in_4,\n    main_Import_2_in_5,\n    main_Import_2_in_6\n    ) [instance: 2, cache: 1];\n    // \n    // node Value[1]: x = 490, y = 151, inputs = 0, label = Value\n    // output[1]: visible = 1, type = 29, value = 0.3\n    //\n    // \n    // node Isosurface[2]: x = 241, y = 258, inputs = 6, label = Isosurface\n    //\nmain_Isosurface_2_out_1 = \n    Isosurface(\n    main_Import_2_out_1,\n    main_Value_1_out_1,\n    main_Isosurface_2_in_3,\n    main_Isosurface_2_in_4,\n    main_Isosurface_2_in_5,\n    main_Isosurface_2_in_6\n    ) [instance: 2, cache: 1];\n    // \n    // node Color[2]: x = 286, y = 373, inputs = 5, label = Color\n    // input[2]: defaulting = 0, visible = 1, type = 32, value = \"red\"\n    // input[3]: defaulting = 0, visible = 1, type = 5, value = 0.5\n    //\nmain_Color_2_out_1 = \n    Color(\n    main_Isosurface_2_out_1,\n    main_Color_2_in_2,\n    main_Color_2_in_3,\n    main_Color_2_in_4,\n    main_Color_2_in_5\n    ) [instance: 2, cache: 1];\n    // \n    // node Compute[1]: x = 538, y = 265, inputs = 3, label = Compute\n    // input[1]: defaulting = 0, visible = 0, type = 32, value = \"-$0\"\n    // expression: value = -a\n    // name[2]: value = a\n    // name[3]: value = b\n    //\nmain_Compute_1_out_1 = \n    Compute(\n    main_Compute_1_in_1,\n    main_Value_1_out_1,\n    main_Compute_1_in_3\n    ) [instance: 1, cache: 1];\n    // \n    // node Isosurface[1]: x = 368, y = 289, inputs = 6, label = Isosurface\n    //\nmain_Isosurface_1_out_1 = \n    Isosurface(\n    main_Import_2_out_1,\n    main_Compute_1_out_1,\n    main_Isosurface_1_in_3,\n    main_Isosurface_1_in_4,\n    main_Isosurface_1_in_5,\n    main_Isosurface_1_in_6\n    ) [instance: 1, cache: 1];\n    // \n    // node Color[1]: x = 388, y = 386, inputs = 5, label = Color\n    // input[2]: defaulting = 0, visible = 1, type = 32, value = \"blue\"\n    // input[3]: defaulting = 0, visible = 1, type = 5, value = 0.5\n    //\nmain_Color_1_out_1 = \n    Color(\n    main_Isosurface_1_out_1,\n    main_Color_1_in_2,\n    main_Color_1_in_3,\n    main_Color_1_in_4,\n    main_Color_1_in_5\n    ) [instance: 1, cache: 1];\n    // \n    // node Collect[1]: x = 243, y = 472, inputs = 3, label = Collect\n    //\nmain_Collect_1_out_1 = \n    Collect(\n    main_Tube_1_out_1,\n    main_Color_2_out_1,\n    main_Color_1_out_1\n    ) [instance: 1, cache: 1];\n    // \n    // node Image[1]: x = 152, y = 534, inputs = 49, label = Image\n    // input[1]: defaulting = 0, visible = 0, type = 32, value = \"Image_1\"\n    // input[4]: defaulting = 0, visible = 0, type = 1, value = 1\n    // input[5]: defaulting = 0, visible = 0, type = 8, value = [-0.359201 -1.19209e-07 -0.201956]\n    // input[6]: defaulting = 0, visible = 0, type = 8, value = [10.9858 4.45037 -5.37649]\n    // input[7]: defaulting = 0, visible = 0, type = 5, value = 7.09512\n    // input[8]: defaulting = 0, visible = 0, type = 1, value = 1061\n    // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.588\n    // input[10]: defaulting = 0, visible = 0, type = 8, value = [0.48035 -0.245487 0.842021]\n    // input[11]: defaulting = 1, visible = 0, type = 5, value = 29.9999\n    // input[12]: defaulting = 0, visible = 0, type = 1, value = 0\n    // input[14]: defaulting = 0, visible = 0, type = 1, value = 1\n    // input[15]: defaulting = 1, visible = 0, type = 32, value = \"none\"\n    // input[16]: defaulting = 1, visible = 0, type = 32, value = \"none\"\n    // input[17]: defaulting = 1, visible = 0, type = 1, value = 1\n    // input[18]: defaulting = 1, visible = 0, type = 1, value = 1\n    // input[19]: defaulting = 0, visible = 0, type = 1, value = 0\n    // input[29]: defaulting = 1, visible = 0, type = 3, value = 0\n    // input[41]: defaulting = 0, visible = 0, type = 32, value = \"rotate\"\n    // depth: value = 24\n    // window: position = (0.0531,0.0850), size = 0.8398x0.8313, screen = 0\n    // internal caching: 1\n    //\nmain_Image_1_out_1,\nmain_Image_1_out_2,\nmain_Image_1_out_3 = \n    Image(\n    main_Image_1_in_1,\n    main_Collect_1_out_1,\n    main_Image_1_in_3,\n    main_Image_1_in_4,\n    main_Image_1_in_5,\n    main_Image_1_in_6,\n    main_Image_1_in_7,\n    main_Image_1_in_8,\n    main_Image_1_in_9,\n    main_Image_1_in_10,\n    main_Image_1_in_11,\n    main_Image_1_in_12,\n    main_Image_1_in_13,\n    main_Image_1_in_14,\n    main_Image_1_in_15,\n    main_Image_1_in_16,\n    main_Image_1_in_17,\n    main_Image_1_in_18,\n    main_Image_1_in_19,\n    main_Image_1_in_20,\n    main_Image_1_in_21,\n    main_Image_1_in_22,\n    main_Image_1_in_23,\n    main_Image_1_in_24,\n    main_Image_1_in_25,\n    main_Image_1_in_26,\n    main_Image_1_in_27,\n    main_Image_1_in_28,\n    main_Image_1_in_29,\n    main_Image_1_in_30,\n    main_Image_1_in_31,\n    main_Image_1_in_32,\n    main_Image_1_in_33,\n    main_Image_1_in_34,\n    main_Image_1_in_35,\n    main_Image_1_in_36,\n    main_Image_1_in_37,\n    main_Image_1_in_38,\n    main_Image_1_in_39,\n    main_Image_1_in_40,\n    main_Image_1_in_41,\n    main_Image_1_in_42,\n    main_Image_1_in_43,\n    main_Image_1_in_44,\n    main_Image_1_in_45,\n    main_Image_1_in_46,\n    main_Image_1_in_47,\n    main_Image_1_in_48,\n    main_Image_1_in_49\n    ) [instance: 1, cache: 1];\n// network: end of macro body\nCacheScene(main_Image_1_in_1, main_Image_1_out_1, main_Image_1_out_2);\n}\nmain_Import_1_in_1 = \"molecule.dx\";\nmain_Import_1_in_2 = NULL;\nmain_Import_1_in_3 = NULL;\nmain_Import_1_in_4 = NULL;\nmain_Import_1_in_5 = NULL;\nmain_Import_1_in_6 = NULL;\nmain_Import_1_out_1 = NULL;\nmain_Tube_1_in_2 = NULL;\nmain_Tube_1_in_3 = NULL;\nmain_Tube_1_in_4 = NULL;\nmain_Tube_1_out_1 = NULL;\nmain_FileSelector_1_out_1 = \"/home/rjh/workspace/madness/src/apps/moldft/coulomb.dx\";\nmain_Import_2_in_2 = NULL;\nmain_Import_2_in_3 = NULL;\nmain_Import_2_in_4 = NULL;\nmain_Import_2_in_5 = NULL;\nmain_Import_2_in_6 = NULL;\nmain_Import_2_out_1 = NULL;\nmain_Value_1_out_1 = 0.3;\nmain_Isosurface_2_in_3 = NULL;\nmain_Isosurface_2_in_4 = NULL;\nmain_Isosurface_2_in_5 = NULL;\nmain_Isosurface_2_in_6 = NULL;\nmain_Isosurface_2_out_1 = NULL;\nmain_Color_2_in_2 = \"red\";\nmain_Color_2_in_3 = 0.5;\nmain_Color_2_in_4 = NULL;\nmain_Color_2_in_5 = NULL;\nmain_Color_2_out_1 = NULL;\nmain_Compute_1_in_1 = \"-$0\";\nmain_Compute_1_in_3 = NULL;\nmain_Compute_1_out_1 = NULL;\nmain_Isosurface_1_in_3 = NULL;\nmain_Isosurface_1_in_4 = NULL;\nmain_Isosurface_1_in_5 = NULL;\nmain_Isosurface_1_in_6 = NULL;\nmain_Isosurface_1_out_1 = NULL;\nmain_Color_1_in_2 = \"blue\";\nmain_Color_1_in_3 = 0.5;\nmain_Color_1_in_4 = NULL;\nmain_Color_1_in_5 = NULL;\nmain_Color_1_out_1 = NULL;\nmain_Collect_1_out_1 = NULL;\nmacro Image(\n        id,\n        object,\n        where,\n        useVector,\n        to,\n        from,\n        width,\n        resolution,\n        aspect,\n        up,\n        viewAngle,\n        perspective,\n        options,\n        buttonState = 1,\n        buttonUpApprox = \"none\",\n        buttonDownApprox = \"none\",\n        buttonUpDensity = 1,\n        buttonDownDensity = 1,\n        renderMode = 0,\n        defaultCamera,\n        reset,\n        backgroundColor,\n        throttle,\n        RECenable = 0,\n        RECfile,\n        RECformat,\n        RECresolution,\n        RECaspect,\n        AAenable = 0,\n        AAlabels,\n        AAticks,\n        AAcorners,\n        AAframe,\n        AAadjust,\n        AAcursor,\n        AAgrid,\n        AAcolors,\n        AAannotation,\n        AAlabelscale,\n        AAfont,\n        interactionMode,\n        title,\n        AAxTickLocs,\n        AAyTickLocs,\n        AAzTickLocs,\n        AAxTickLabels,\n        AAyTickLabels,\n        AAzTickLabels,\n        webOptions) -> (\n        object,\n        camera,\n        where)\n{\n    ImageMessage(\n        id,\n        backgroundColor,\n        throttle,\n        RECenable,\n        RECfile,\n        RECformat,\n        RECresolution,\n        RECaspect,\n        AAenable,\n        AAlabels,\n        AAticks,\n        AAcorners,\n        AAframe,\n        AAadjust,\n        AAcursor,\n        AAgrid,\n        AAcolors,\n        AAannotation,\n        AAlabelscale,\n        AAfont,\n        AAxTickLocs,\n        AAyTickLocs,\n        AAzTickLocs,\n        AAxTickLabels,\n        AAyTickLabels,\n        AAzTickLabels,\n        interactionMode,\n        title,\n        renderMode,\n        buttonUpApprox,\n        buttonDownApprox,\n        buttonUpDensity,\n        buttonDownDensity) [instance: 1, cache: 1];\n    autoCamera =\n        AutoCamera(\n            object,\n            \"front\",\n            object,\n            resolution,\n            aspect,\n            [0,1,0],\n            perspective,\n            viewAngle,\n            backgroundColor) [instance: 1, cache: 1];\n    realCamera =\n        Camera(\n            to,\n            from,\n            width,\n            resolution,\n            aspect,\n            up,\n            perspective,\n            viewAngle,\n            backgroundColor) [instance: 1, cache: 1];\n    coloredDefaultCamera = \n\t UpdateCamera(defaultCamera,\n            background=backgroundColor) [instance: 1, cache: 1];\n    nullDefaultCamera =\n        Inquire(defaultCamera,\n            \"is null + 1\") [instance: 1, cache: 1];\n    resetCamera =\n        Switch(\n            nullDefaultCamera,\n            coloredDefaultCamera,\n            autoCamera) [instance: 1, cache: 1];\n    resetNull = \n        Inquire(\n            reset,\n            \"is null + 1\") [instance: 2, cache: 1];\n    reset =\n        Switch(\n            resetNull,\n            reset,\n            0) [instance: 2, cache: 1];\n    whichCamera =\n        Compute(\n            \"($0 != 0 || $1 == 0) ? 1 : 2\",\n            reset,\n            useVector) [instance: 1, cache: 1];\n    camera = Switch(\n            whichCamera,\n            resetCamera,\n            realCamera) [instance: 3, cache: 1];\n    AAobject =\n        AutoAxes(\n            object,\n            camera,\n            AAlabels,\n            AAticks,\n            AAcorners,\n            AAframe,\n            AAadjust,\n            AAcursor,\n            AAgrid,\n            AAcolors,\n            AAannotation,\n            AAlabelscale,\n            AAfont,\n            AAxTickLocs,\n            AAyTickLocs,\n            AAzTickLocs,\n            AAxTickLabels,\n            AAyTickLabels,\n            AAzTickLabels) [instance: 1, cache: 1];\n    switchAAenable = Compute(\"$0+1\",\n\t     AAenable) [instance: 2, cache: 1];\n    object = Switch(\n\t     switchAAenable,\n\t     object,\n\t     AAobject) [instance:4, cache: 1];\n    SWapproximation_options =\n        Switch(\n            buttonState,\n            buttonUpApprox,\n            buttonDownApprox) [instance: 5, cache: 1];\n    SWdensity_options =\n        Switch(\n            buttonState,\n            buttonUpDensity,\n            buttonDownDensity) [instance: 6, cache: 1];\n    HWapproximation_options =\n        Format(\n            \"%s,%s\",\n            buttonDownApprox,\n            buttonUpApprox) [instance: 1, cache: 1];\n    HWdensity_options =\n        Format(\n            \"%d,%d\",\n            buttonDownDensity,\n            buttonUpDensity) [instance: 2, cache: 1];\n    switchRenderMode = Compute(\n\t     \"$0+1\",\n\t     renderMode) [instance: 3, cache: 1];\n    approximation_options = Switch(\n\t     switchRenderMode,\n            SWapproximation_options,\n\t     HWapproximation_options) [instance: 7, cache: 1];\n    density_options = Switch(\n\t     switchRenderMode,\n            SWdensity_options,\n            HWdensity_options) [instance: 8, cache: 1];\n    renderModeString = Switch(\n            switchRenderMode,\n            \"software\",\n            \"hardware\")[instance: 9, cache: 1];\n    object_tag = Inquire(\n            object,\n            \"object tag\")[instance: 3, cache: 1];\n    annoted_object =\n        Options(\n            object,\n            \"send boxes\",\n            0,\n            \"cache\",\n            1,\n            \"object tag\",\n            object_tag,\n            \"ddcamera\",\n            whichCamera,\n            \"rendering approximation\",\n            approximation_options,\n            \"render every\",\n            density_options,\n            \"button state\",\n            buttonState,\n            \"rendering mode\",\n            renderModeString) [instance: 1, cache: 1];\n    RECresNull =\n        Inquire(\n            RECresolution,\n            \"is null + 1\") [instance: 4, cache: 1];\n    ImageResolution =\n        Inquire(\n            camera,\n            \"camera resolution\") [instance: 5, cache: 1];\n    RECresolution =\n        Switch(\n            RECresNull,\n            RECresolution,\n            ImageResolution) [instance: 10, cache: 1];\n    RECaspectNull =\n        Inquire(\n            RECaspect,\n            \"is null + 1\") [instance: 6, cache: 1];\n    ImageAspect =\n        Inquire(\n            camera,\n            \"camera aspect\") [instance: 7, cache: 1];\n    RECaspect =\n        Switch(\n            RECaspectNull,\n            RECaspect,\n            ImageAspect) [instance: 11, cache: 1];\n    switchRECenable = Compute(\n          \"$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4\",\n            RECenable,\n            switchRenderMode,\n            RECresolution,\n            ImageResolution,\n            RECaspect,\n\t     ImageAspect) [instance: 4, cache: 1];\n    NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object);\n    Display(\n        NoRECobject,\n        camera,\n        where,\n        throttle) [instance: 1, cache: 1];\n    image =\n        Render(\n            RECNoRerenderObject,\n            camera) [instance: 1, cache: 1];\n    Display(\n        image,\n        NULL,\n        where,\n        throttle) [instance: 2, cache: 1];\n    WriteImage(\n        image,\n        RECfile,\n        RECformat) [instance: 1, cache: 1];\n    rec_where = Display(\n        RECNoRerHW,\n        camera,\n        where,\n        throttle) [instance: 1, cache: 0];\n    rec_image = ReadImageWindow(\n        rec_where) [instance: 1, cache: 1];\n    WriteImage(\n        rec_image,\n        RECfile,\n        RECformat) [instance: 1, cache: 1];\n    RECupdateCamera =\n\tUpdateCamera(\n\t    camera,\n\t    resolution=RECresolution,\n\t    aspect=RECaspect) [instance: 2, cache: 1];\n    Display(\n        RECRerenderObject,\n        camera,\n        where,\n        throttle) [instance: 1, cache: 1];\n    RECRerenderObject =\n\tScaleScreen(\n\t    RECRerenderObject,\n\t    NULL,\n\t    RECresolution,\n\t    camera) [instance: 1, cache: 1];\n    image =\n        Render(\n            RECRerenderObject,\n            RECupdateCamera) [instance: 2, cache: 1];\n    WriteImage(\n        image,\n        RECfile,\n        RECformat) [instance: 2, cache: 1];\n}\nmain_Image_1_in_1 = \"Image_1\";\nmain_Image_1_in_3 = \"X24,,\";\nmain_Image_1_in_4 = 1;\nmain_Image_1_in_5 = [-0.359201 -1.19209e-07 -0.201956];\nmain_Image_1_in_6 = [10.9858 4.45037 -5.37649];\nmain_Image_1_in_7 = 7.09512;\nmain_Image_1_in_8 = 1061;\nmain_Image_1_in_9 = 0.588;\nmain_Image_1_in_10 = [0.48035 -0.245487 0.842021];\nmain_Image_1_in_11 = NULL;\nmain_Image_1_in_12 = 0;\nmain_Image_1_in_13 = NULL;\nmain_Image_1_in_14 = 1;\nmain_Image_1_in_15 = NULL;\nmain_Image_1_in_16 = NULL;\nmain_Image_1_in_17 = NULL;\nmain_Image_1_in_18 = NULL;\nmain_Image_1_in_19 = 0;\nmain_Image_1_in_20 = NULL;\nmain_Image_1_in_21 = NULL;\nmain_Image_1_in_22 = NULL;\nmain_Image_1_in_23 = NULL;\nmain_Image_1_in_25 = NULL;\nmain_Image_1_in_26 = NULL;\nmain_Image_1_in_27 = NULL;\nmain_Image_1_in_28 = NULL;\nmain_Image_1_in_29 = NULL;\nmain_Image_1_in_30 = NULL;\nmain_Image_1_in_31 = NULL;\nmain_Image_1_in_32 = NULL;\nmain_Image_1_in_33 = NULL;\nmain_Image_1_in_34 = NULL;\nmain_Image_1_in_35 = NULL;\nmain_Image_1_in_36 = NULL;\nmain_Image_1_in_37 = NULL;\nmain_Image_1_in_38 = NULL;\nmain_Image_1_in_39 = NULL;\nmain_Image_1_in_40 = NULL;\nmain_Image_1_in_41 = \"rotate\";\nmain_Image_1_in_42 = NULL;\nmain_Image_1_in_43 = NULL;\nmain_Image_1_in_44 = NULL;\nmain_Image_1_in_45 = NULL;\nmain_Image_1_in_46 = NULL;\nmain_Image_1_in_47 = NULL;\nmain_Image_1_in_48 = NULL;\nmain_Image_1_in_49 = NULL;\nExecutive(\"product version 4 4 4\");\n$sync\nmain();\n"
  },
  {
    "path": "src/apps/moldft/wst_functional.h",
    "content": "#include <madness/mra/mra.h>\n#include<madness/chem/xcfunctional.h>\n\nclass WSTFunctional\n{\n  public:\n\n  real_function_3d make_dft_potential(World& world, const XCfunctional& xc, const vector_real_function_3d& vf, int ispin, int what)\n  {\n    return multiop_values<double, xc_potential, 3>(xc_potential(xc, ispin, what), vf);\n  }\n  \n  double make_dft_energy(World& world, const XCfunctional& xc, const vector_real_function_3d& vf, int ispin)\n  {\n    real_function_3d vlda = multiop_values<double, xc_functional, 3>(xc_functional(xc, ispin), vf);\n    return vlda.trace();\n  }\n\n  std::pair<real_function_3d, double> apply_xc(World& world, const XCfunctional& xc, real_function_3d& rho)\n  {\n    vector_real_function_3d delrho;\n    vector_real_function_3d vf;\n\n    rho.reconstruct();\n    vf.push_back(rho);\n    if (xc.is_gga()) \n    {\n      for(int axis = 0; axis < 3; ++axis)\n      {\n        Derivative<double,3> D = free_space_derivative<double,3>(world, axis);\n        delrho.push_back(D(rho));\n      }\n      real_function_3d saa = delrho[0]*delrho[0]+delrho[1]*delrho[1]+delrho[2]*delrho[2];\n      vf.push_back(saa); // sigma_aa\n      if (vf.size()) \n      {\n        reconstruct(world, vf);\n//        rho.refine_to_common_level(vf); // Ugly but temporary (I hope!)\n        refine_to_common_level(world,vf); // Ugly but temporary (I hope!)\n      }\n    }\n    double exc = make_dft_energy(world, xc, vf, 0);\n    real_function_3d vxc =  make_dft_potential(world, xc, vf, 0, 0);\n\n    if (xc.is_gga()) \n    {\n      real_function_3d vsigaa = make_dft_potential(world, xc, vf, 0, 1).truncate();\n      for (int axis=0; axis<1; axis++)\n      {\n        Derivative<double,3> D = free_space_derivative<double,3>(world, axis);\n        real_function_3d  gradn = D(rho);\n        real_function_3d  ddel = vsigaa*gradn;\n        ddel.scale(2.0);\n\n        real_function_3d vxc2=D(ddel).truncate();\n        vxc = vxc - vxc2;\n      }\n    } \n    return std::pair<real_function_3d, double>(vxc, exc);\n  }\n};\n\n"
  },
  {
    "path": "src/apps/moldft/xmlguess.py",
    "content": "import sys, string\n\ndata = sys.stdin\nbasis = \"STO-3G\"\n\ndef find_string(s):\n    n = len(s)\n    while 1:\n        line = data.readline()\n        if not line:\n            sys.exit(0)\n\n        if line[0:n] == s:\n            return line\n\ndef read_geometry():\n    find_string(\"            XYZ format geometry\")\n\n    data.readline()\n    data.readline()\n    data.readline()\n    atom = data.readline().split()[0]\n    return atom\n\ndef read_numao():\n    line = find_string(\"          AO basis - number of functions:\").split()\n    n = int(line[6])\n    return n\n\ndef read_energy():\n    find_string(\"     <<<<<<              called scfcvg\")\n    line = find_string(\"         Total DFT energy =\").split()\n    energy = float(line[4])\n    return energy\n\ndef read_occn(n, ab):\n    occ = [0]*n\n    eps = [0]*n\n    test = \"                    DFT Final %s Molecular Orbital Analysis\" % ab\n    if ab == \"Beta\":\n        test = \" \" + test\n    find_string(test)\n    \n    for i in range(n):\n        line = find_string(\" Vector \").split()\n        occ[i] = float(string.replace(line[2].split(\"=\")[1],\"D\",\"e\"))\n        e = line[4]\n        if e[0] == \"S\":\n            e = line[3].split(\"=\")[1]\n        eps[i] = float(string.replace(e,\"D\",\"e\"))\n        \n    return (occ,eps)\n\ndef matrix(n,m):\n    V = [0]*n\n    for i in range(n):\n        V[i] = [0]*m\n    return V\n\ndef read_matrix(n,m):\n    V = matrix(n,m)\n    for jlo in range(0,m,6):\n        jhi = min(m,jlo+6)\n        data.readline() # blank\n        data.readline() # numbers\n        data.readline() # underscore\n        for i in range(n):\n            line = data.readline().split()\n            for jj in range(jhi-jlo):\n                j = jlo + jj\n                V[i][j] = float(line[1+jj])\n    return V\n\ndef read_orbitals(n):\n    find_string(\" global array:\")\n    V = read_matrix(n,n)\n    return V\n\ndef make_density(n, aocc, amo, bocc, bmo):\n    D = matrix(n,n)\n    for i in range(n):\n        for j in range(n):\n            sum = 0.0\n            for k in range(n):\n                sum = sum + aocc[k]*amo[i][k]*amo[j][k] + bocc[k]*bmo[i][k]*bmo[j][k]\n            D[i][j] = sum\n    return D\n\ndef print_matrix(n, m, a):\n    for i in range(n):\n        for j in range(m):\n            print \"%12.5f\" % a[i][j],\n        print \"\"\n\ndef print_vector(n, a):\n    for i in range(n):\n        print \"%12.5f\" % a[i],\n    print \"\"\n\nwhile 1:\n    atom = read_geometry()\n    n =  read_numao()\n    e = read_energy()\n\n    aocc, aeps = read_occn(n, 'Alpha')\n    bocc, beps = read_occn(n, 'Beta')\n\n    amo = read_orbitals(n)\n    bmo = read_orbitals(n)\n\n    density = make_density(n, aocc, amo, bocc, bmo)\n\n    print \"<atomicguess symbol=\\\"%s\\\" basis=\\\"%s\\\">\" % (atom,basis)\n    print \"   <guessdensitymatrix>\"\n    print_matrix(n, n, density)\n    print \"   </guessdensitymatrix>\"\n    print \"   <alphaocc>\"\n    print_vector(n, aocc)\n    print \"   </alphaocc>\"\n    print \"   <betaocc>\"\n    print_vector(n, bocc)\n    print \"   </betaocc>\"\n    print \"   <alphaeps>\"\n    print_vector(n, aeps)\n    print \"   </alphaeps>\"\n    print \"   <betaeps>\"\n    print_vector(n, beps)\n    print \"   </betaeps>\"\n    print \"   <alphavectors>\"\n    print_matrix(n, n, amo)\n    print \"   </alphavectors>\"\n    print \"   <betavectors>\"\n    print_matrix(n, n, bmo)\n    print \"   </betavectors>\"\n    print \"</atomicguess>\"\n    \n\n\n\n    \n\n"
  },
  {
    "path": "src/apps/molresponse/CMakeLists.txt",
    "content": "# src/apps/molresponse\n\nif(CMAKE_CXX_STANDARD GREATER_EQUAL 17)\n    # C++ standard is 17 or higher\n    # Add your code or configurations here\nelse()\n    # C++ standard is below 17\n    # Handle the case where the required standard is not met\nendif()\n\n\nset(MOLRESPONSE_SOURCES\n        ResponseBase.cpp\n        ExcitedResponse.cpp\n        FrequencyResponse.cpp\n        property.cc\n        global_functions.cc\n        timer.cc\n        Plot_VTK.cc\n        basic_operators.cc\n        response_parameters.cpp\n        x_space.cc\n        )\nset(MOLRESPONSE_HEADERS\n        ResponseBase.hpp\n        ExcitedResponse.hpp\n        FrequencyResponse.hpp\n        response_macrotask.hpp\n        property.h\n        x_space.h\n        global_functions.h\n        timer.h\n        Plot_VTK.h\n        basic_operators.h\n        response_parameters.h\n        )\n# Create the MADchem library\nadd_mad_library(response MOLRESPONSE_SOURCES MOLRESPONSE_HEADERS \"chem\" \"madness/chem/molresponse/\")\nset(targetname MADresponse)\nadd_dependencies(applications-madness molresponse)\n\nadd_mad_executable(molresponse \"molresponse.cc\" \"MADresponse;MADchem\")\n\ninstall(TARGETS molresponse DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n\n\nset(R_BASE_SOURCES\n        ResponseBase.cpp\n        ExcitedResponse.cpp\n        FrequencyResponse.cpp\n        property.cc\n        global_functions.cc\n        timer.cc\n        basic_operators.cc\n        Plot_VTK.cc\n        response_parameters.cpp\n        x_space.cc\n        )\n\nset(R_BASE_HEADERS\n        ResponseBase.hpp\n        ExcitedResponse.hpp\n        FrequencyResponse.hpp\n        response_macrotask.hpp\n        property.h\n        global_functions.h\n        x_space.h\n        timer.h\n        basic_operators.h\n        Plot_VTK.h\n        response_parameters.h\n        )\n# Create the MADchem library\nadd_mad_library(response_base R_BASE_SOURCES R_BASE_HEADERS \"chem\" \"molresponse/\")\n\nset(targetname MADresponse_base)\n\nset(RALL_SOURCES\n        ResponseBase.cpp\n        ExcitedResponse.cpp\n        FrequencyResponse.cpp\n        property.cc\n        global_functions.cc\n        timer.cc\n        Plot_VTK.cc\n        basic_operators.cc\n        response_parameters.cpp\n        x_space.cc\n        )\n\nset(RALL_HEADERS\n        ResponseBase.hpp\n        ExcitedResponse.hpp\n        FrequencyResponse.hpp\n        response_macrotask.hpp\n        property.h\n        global_functions.h\n        timer.h\n        basic_operators.h\n        Plot_VTK.h\n        response_parameters.h\n        x_space.h\n        )\nadd_mad_library(all_response RALL_SOURCES RALL_HEADERS \"chem\" \"molresponse/\")\nset(targetname MADall_response)\n"
  },
  {
    "path": "src/apps/molresponse/ExcitedResponse.cpp",
    "content": "//\n// Created by adrianhurtado on 1/28/22.\n//\n\n#include \"ExcitedResponse.hpp\"\n\nvoid ExcitedResponse::initialize(World &world)\n{\n\n    X_space trial(world, 2 * r_params.num_states(), r_params.num_orbitals());\n    // make the trial functions\n    if (world.rank() == 0)\n        print(\"\\n   Creating trial functions.\\n\");\n    if (r_params.random())\n    {\n        trial = make_random_trial(world, 2 * r_params.num_states());\n    }\n    else if (r_params.nwchem())\n    {\n        // Virtual orbitals from NWChem\n        trial = make_nwchem_trial(world, 2 * r_params.num_states());\n    }\n    else if (r_params.guess_xyz())\n    {\n        trial = create_trial_functions2(world);\n        // Use a symmetry adapted operator on ground state functions\n    }\n    else\n    {\n        auto temp_trial = create_virtual_ao_guess(world);\n        if (temp_trial.num_states() >= 2 * r_params.num_states())\n        {\n            std::copy(temp_trial.x.begin(), temp_trial.x.begin() + 2 * r_params.num_states(),\n                      trial.x.begin());\n        }\n        else if (temp_trial.num_states() >= r_params.num_states())\n        {\n            trial = X_space(world, temp_trial.num_states(), r_params.num_orbitals());\n            std::copy(temp_trial.x.begin(), temp_trial.x.begin() + temp_trial.num_states(),\n                      trial.x.begin());\n        }\n        else\n        {\n            MADNESS_EXCEPTION(\"guess virtual ao did not produce enough states for calculation\", 1);\n        }\n    }\n\n    if (world.size() > 1)\n    {\n        // Start a timer\n        if (r_params.num_orbitals() >= 1)\n            molresponse::start_timer(world);\n        if (world.rank() == 0)\n            print(\"\"); // Makes it more legible\n\n        LoadBalanceDeux<3> lb(world);\n        for (size_t j = 0; j < r_params.num_states(); j++)\n        {\n            for (size_t k = 0; k < r_params.num_orbitals(); k++)\n            {\n                lb.add_tree(trial.x[j][k], lbcost<double, 3>(1.0, 8.0), true);\n            }\n        }\n        for (size_t j = 0; j < r_params.num_orbitals(); j++)\n        {\n            lb.add_tree(ground_orbitals[j], lbcost<double, 3>(1.0, 8.0), true);\n        }\n        FunctionDefaults<3>::redistribute(world, lb.load_balance(2));\n\n        if (r_params.num_orbitals() >= 1)\n            molresponse::end_timer(world, \"Load balancing:\");\n    }\n\n    // Project out ground state from guesses\n    QProjector<double, 3> projector(ground_orbitals);\n    for (unsigned int i = 0; i < trial.x.size(); i++) trial.x[i] = projector(trial.x[i]);\n\n    // Ensure orthogonal guesses\n    for (size_t i = 0; i < 2; i++)\n    {\n        molresponse::start_timer(world);\n        // Orthog\n        trial.x = gram_schmidt(world, trial.x);\n        molresponse::end_timer(world, \"orthog\");\n\n        molresponse::start_timer(world);\n        // Normalize\n        normalize(world, trial.x);\n        molresponse::end_timer(world, \"normalize\");\n    }\n\n    // Diagonalize guess\n    if (world.rank() == 0)\n        print(\"\\n   Iterating trial functions for an improved initial \"\n              \"guess.\\n\");\n    iterate_trial(world, trial);\n    // Sort\n    sort(world, omega, trial.x);\n    // Basic output\n    if (r_params.num_orbitals() >= 1 and world.rank() == 0)\n    {\n        print(\"\\n   Final initial guess excitation energies:\");\n        print(omega);\n    }\n    // Chi = X_space(world, r_params.num_states(), r_params.num_orbitals());\n    // Select lowest energy functions from guess\n    Chi.x = select_functions(world, trial.x, omega, r_params.num_states(), r_params.num_orbitals());\n    Chi.y = response_space(world, r_params.num_states(), r_params.num_orbitals());\n    // save the guesses at the very least\n    world.gop.fence();\n    save(world, \"guess_restart\");\n\n    trial.clear();\n    // Initial guess for y are zero functions\n}\n/// an N-dimensional real-valued Gaussian function\n\n/// the function looks like\n/// \\[\n/// f(r) = x^i y^j .. z^k exp(-alpha r^2)\n/// \\]\ntemplate <std::size_t NDIM>\nclass GaussianGuess : public FunctionFunctorInterface<double, NDIM>\n{\n    typedef Vector<double, NDIM> coordT;\n\npublic:\n    /// ctor\n\n    /// @param[in]  origin  the origin of the Gauss function\n    /// @param[in]  alpha   the exponent exp(-alpha r^2)\n    /// @param[in]  ijk     the monomial x^i y^j z^k exp(-alpha r^2) (for NDIM)\n    GaussianGuess(const coordT &origin, const double alpha,\n                  const std::vector<int> ijk = std::vector<int>(NDIM))\n        : origin(origin), exponent(alpha), ijk(ijk) {}\n\n    coordT origin;\n    double exponent;      ///< exponent of the guess\n    std::vector<int> ijk; ///< cartesian exponents\n\n    double operator()(const coordT &xyz) const\n    {\n        double arg = 0.0, prefac = 1.0;\n        for (std::size_t i = 0; i < NDIM; ++i)\n        {\n            arg += (xyz[i] - origin[i]) * (xyz[i] - origin[i]);\n            prefac *= pow(xyz[i], ijk[i]);\n        }\n        const double e = exponent * arg;\n        return prefac * exp(-e);\n    }\n};\n\nX_space ExcitedResponse::make_random_trial(World &world, size_t m) const\n{\n    // Basic output\n    if (world.rank() == 0)\n        print(\"   Using a random guess for initial response functions.\\n\");\n    size_t n = r_params.num_orbitals();\n    // Create empty container and add in randomness\n    X_space f(world, m, n);\n    f.x = add_randomness(world, f.x, 1e3); // noise all over the world\n    f.x = mask * f.x;                      // make sure you mask after you add noise to the world\n\n    // Create and apply a centered gaussian on each atom so that the\n    // randomness is localized around the atoms\n    real_function_3d gaus = real_factory_3d(world);\n    for (auto atom : molecule.get_atoms())\n    {\n        real_function_3d x = real_factory_3d(world).functor(real_functor_3d(\n            new GaussianGuess<3>(atom.get_coords(), 0.01, std::vector<int>{0, 0, 0})));\n        gaus = gaus + x;\n    }\n    f = f * gaus;\n\n    // Project out groundstate from guesses\n    QProjector<double, 3> projector(ground_orbitals);\n    for (unsigned int i = 0; i < f.num_states(); i++) f.x[i] = projector(f.x[i]);\n\n    // Normalize\n    normalize(world, f.x);\n\n    return f;\n}\n\n// Creates an initial guess function from nwchem output files\nX_space ExcitedResponse::make_nwchem_trial(World &world, size_t m) const\n{\n    // Basic output\n    if (world.rank() == 0)\n        print(\"   Creating an initial guess from NWChem file\", r_params.nwchem_dir());\n\n    // Create empty containers\n    response_space f;\n\n    // Create the nwchem reader\n    slymer::NWChem_Interface nwchem(r_params.nwchem_dir(), std::cout);\n\n    // For parallel runs, silencing all but 1 slymer instance\n    if (world.rank() != 0)\n    {\n        std::ostream dev_null(nullptr);\n        nwchem.err = dev_null;\n    }\n\n    // Read in basis set\n    nwchem.read(slymer::Properties::Basis);\n\n    // Read in the molecular orbital coefficients, energies,\n    // and occupancies\n    nwchem.read(slymer::Properties::MOs | slymer::Properties::Energies |\n                slymer::Properties::Occupancies);\n\n    // Create the nwchem orbitals as madness functions\n    std::vector<real_function_3d> temp1;\n    for (auto basis : slymer::cast_basis<slymer::GaussianFunction>(nwchem.basis_set))\n    {\n        // Get the center of gaussian as its special point\n        std::vector<coord_3d> centers;\n        coord_3d r;\n        r[0] = basis.get().center[0];\n        r[1] = basis.get().center[1];\n        r[2] = basis.get().center[2];\n        centers.push_back(r);\n\n        // Now make the function\n        temp1.push_back(FunctionFactory<double, 3>(world).functor(\n            std::shared_ptr<FunctionFunctorInterface<double, 3>>(\n                new slymer::Gaussian_Functor(basis.get(), centers))));\n\n        // Let user know something is going on\n        if (temp1.size() % 10 == 0 and world.rank() == 0)\n            print(\"Created\", temp1.size(), \"functions.\");\n    }\n    if (world.rank() == 0)\n        print(\"Finished creating\", temp1.size(), \"functions.\");\n\n    // Normalize ao's\n    madness::normalize(world, temp1);\n\n    // Transform ao's now\n    std::vector<real_function_3d> temp =\n        madness::transform(world, temp1, nwchem.MOs, FunctionDefaults<3>::get_thresh(), true);\n\n    // Now save the unoccupied orbitals\n    std::vector<real_function_3d> temp2;\n    size_t num_virt = 0;\n    for (size_t i = 0; i < temp1.size(); i++)\n    {\n        if (nwchem.occupancies[i] == 0)\n        {\n            temp2.push_back(temp[i]);\n            num_virt++;\n        }\n    }\n    // Create as many vectors of functions as we can from these nwchem\n    // virtual orbitals putting 1 virtual orbital from nwchem per vector\n    for (size_t i = 0; i < std::max(m, num_virt); i++)\n    {\n        // Create the vector to add the new function to\n        std::vector<real_function_3d> v1 =\n            zero_functions_compressed<double, 3>(world, ground_orbitals.size());\n\n        // Put the \"new\" function into the vector\n        v1[i % v1.size()] = temp2[i];\n\n        // Add vector to return container\n        f.push_back(v1);\n\n        // See if we've made enough functions\n        if (f.size() >= m)\n            break;\n    }\n    if (world.rank() == 0)\n        print(\"Created\", f.size(), \"guess functions from provided NWChem data.\");\n\n    // If not enough functions have been made, start adding symmetry adapted\n    // functions\n    size_t n = f.size();\n\n    // If still not enough functions have been made, add in random guesses\n    if (n < m)\n    {\n        // Tell user the bad news\n        if (world.rank() == 0)\n            print(\"\\n   Only\", n,\n                  \"guess functions were provided by augmenting NWChem \"\n                  \"functions.\\n   \"\n                  \"Augmenting with random functions.\");\n\n        // Create the random guess\n        Molecule mol = molecule;\n        X_space rand = make_random_trial(world, m - n);\n\n        // Add to vector of functions\n        for (unsigned int i = 0; i < rand.num_states(); i++)\n            f.push_back(rand.x[i]);\n    }\n\n    // Project out groundstate from guesses\n    QProjector<double, 3> projector(ground_orbitals);\n    for (unsigned int i = 0; i < f.size(); i++) f[i] = projector(f[i]);\n\n    // Truncate and normalize\n    f.truncate_rf();\n    normalize(world, f);\n\n    X_space trial(world, f.size(), n);\n    trial.x = f;\n\n    return trial;\n}\n\n// Returns initial guess functions as\n// ground MO * solid harmonics\nX_space ExcitedResponse::create_trial_functions(World &world, size_t k) const\n{\n    // Get size\n    print(\"In create trial functions\");\n    auto n = r_params.num_orbitals();\n\n    // Create solid harmonics such that num. solids * num. orbitals > k.\n    // The total number of solid harmonics that exist up to level n is\n    // (n+1)^2 (because we count from zero)\n    // Always do at least 8 (through the d orbital angular momentum functions,\n    // minus )\n    std::map<std::vector<int>, real_function_3d> solids =\n        solid_harmonics(world, std::max(2.0, ceil(sqrt(k / n) - 1)));\n\n    // Useful info.\n    if (world.rank() == 0)\n        print(\"   Created\", solids.size(), \"solid harmonics.\\n\");\n\n    // Container to return\n    response_space trials_X;\n\n    // Counter for number of trials created\n    size_t count = 0;\n\n    // for every\n\n    // Multiply each solid harmonic onto a ground state orbital\n    for (size_t i = 0; i < n; i++)\n    {\n        // For each solid harmonic\n        for (const auto &key : solids)\n        {\n            // Temp zero functions\n            // // n temp zero functions\n            std::vector<real_function_3d> temp =\n                zero_functions_compressed<double, 3>(world, static_cast<int>(n));\n\n            // Create one non-zero function and add to trials\n            print(\"index \", n - count % n - 1);\n            temp[count % n] = key.second * ground_orbitals[n - count % n - 1];\n            trials_X.push_back(temp);\n            count++;\n        }\n\n        // Stop when we first get beyond k components\n        if (count >= k)\n            break;\n    }\n\n    // Debugging output\n    if (r_params.print_level() >= 2)\n    {\n        if (world.rank() == 0)\n            print(\"   Norms of guess functions:\");\n        print_norms(world, trials_X);\n    }\n\n    // Truncate\n    madness::truncate(world, trials_X, madness::FunctionDefaults<3>::get_thresh(), true);\n\n    X_space trials(world, count, n);\n    trials.x = trials_X.copy();\n    trials_X.clear();\n\n    // Done\n    return trials;\n}\n\n// Returns initial guess functions as\n// ground MO * <x,y,z>\nX_space ExcitedResponse::create_trial_functions2(World &world) const\n{\n    // Get size\n    size_t n = ground_orbitals.size();\n    size_t directions = 3;\n    // (n+1)^2 (because we count from zero)\n\n    // make a vector of xyz functions {x,y,z}\n    auto xyz = make_xyz_functions(world);\n    // create 3 x n orbital functions\n    std::vector<vector<real_function_3d>> functions;\n\n    //\n\n    for (const auto &d : xyz)\n    {\n        vector_real_function_3d temp;\n        for (const auto &orb : ground_orbitals)\n        {\n            temp.push_back(d * orb);\n        }\n        functions.push_back(temp);\n    }\n\n    // Container to return\n    size_t count = 0;\n\n    X_space trials(world, 3 * n * n, n);\n    for (size_t i = 0; i < n; i++)\n    {\n        for (size_t d = 0; d < directions; d++)\n        {\n            for (size_t o = 0; o < n; o++)\n            {\n                //        trials[i + j + o][o] = functions[i][j];\n                trials.x[count][o] = copy(functions.at(d).at(o));\n                count++;\n            }\n        }\n    }\n    // The above generates response function as follows\n    // all functions start off as zeros\n    // 1  [x1 0 0 ]\n    // 2  [0 x1 0 ]\n    // 3  [0 0 x1 ]\n    // 4  [y1 0 0 ]\n    // 5  [0 y1 0 ]\n    // 6  [0 0 y1 ]\n    // 7  [z1 0 0 ]\n    // 8  [0 z1 0 ]\n    // 9  [0 0 z1 ]\n    // 10 [x2 0 0 ]\n    // 11 [0 x2 0 ]\n    // 12 [0 0 x2 ]\n    // 13 [y2 0 0 ]\n    // 14 [0 y2 0 ]\n    // 15 [0 0 y2 ]\n    // 16 [z2 0 0 ]\n    // 17 [0 z2 0 ]\n    // 18 [0 0 z2 ]\n    // 19 [x3 0 0 ]\n    // 20 [0 x3 0 ]\n    // 21 [0 0 x3 ]\n    // 22 [y3 0 0 ]\n    // 23 [0 y3 0 ]\n    // 24 [0 0 y3 ]\n    // 25 [z3 0 0 ]\n    // 26 [0 z3 0 ]\n    // 27 [0 0 z3 ]\n    // for each orbital for each direction\n    // Counter for number of trials created\n    // Multiply each solid harmonic onto a ground state orbital\n    //  for each orbital we\n\n    // For each solid harmonic\n    // Temp zero functions\n\n    // Debugging output\n    if (r_params.print_level() >= 2)\n    {\n        if (world.rank() == 0)\n            print(\"   Norms of guess functions:\");\n        print_norms(world, trials.x);\n    }\n\n    // Truncate\n    madness::truncate(world, trials.x);\n\n    // Done\n    return trials;\n}\n\n// Simplified iterate scheme for guesses\nvoid ExcitedResponse::iterate_trial(World &world, X_space &guesses)\n{\n    // Variables needed to iterate\n    size_t iteration = 0;// Iteration counter\n    QProjector<double, 3> projector(ground_orbitals);// Projector to project out ground state\n    size_t m = r_params.num_states();                // Number of excited states\n    size_t n = r_params.num_orbitals();              // Number of ground state orbitals\n    Tensor<double> x_shifts;                         // Holds the shifted energy values\n    response_space bsh_resp(world, m, n);            // Holds wave function corrections\n    response_space V;                                // Holds V^0 applied to response functions\n    response_space shifted_V;// Holds the shifted V^0 applied to response functions\n    Tensor<double> S;        // Overlap matrix of response components for x states\n    real_function_3d v_xc;   // For TDDFT\n\n    // Useful to have\n    response_space zeros(world, m, n);\n\n    // Now to iterate\n    while (iteration < r_params.guess_max_iter())\n    {\n        // Start a timer for this iteration\n        molresponse::start_timer(world);\n        //\n        size_t N0 = guesses.x.size();\n        size_t Ni = N0;\n\n        // Basic output\n        if (r_params.print_level() >= 1)\n        {\n            if (world.rank() == 0)\n                printf(\"\\n   Guess Iteration %d at time %.1fs\\n\", static_cast<int>(iteration),\n                       wall_time());\n            if (world.rank() == 0)\n                print(\" -------------------------------------\");\n        }\n\n        // Load balance\n        // Only balancing on x-components. Smart?\n        if (world.size() > 1 && ((iteration < 2) or (iteration % 5 == 0)) and\n\n            iteration != 0)\n        {\n            // Start a timer\n            if (r_params.print_level() >= 1)\n                molresponse::start_timer(world);\n            if (world.rank() == 0)\n                print(\"\"); // Makes it more legible\n\n            LoadBalanceDeux<3> lb(world);\n            for (size_t j = 0; j < n; j++)\n            {\n                for (size_t k = 0; k < r_params.num_states(); k++)\n                {\n                    lb.add_tree(guesses.x[k][j], lbcost<double, 3>(1.0, 8.0), true);\n                }\n            }\n            FunctionDefaults<3>::redistribute(world, lb.load_balance(2));\n\n            if (r_params.print_level() >= 1)\n                molresponse::end_timer(world, \"Load balancing:\");\n        }\n\n        // compute rho_omega\n        auto rho_omega = transition_densityTDA(world, ground_orbitals, guesses.x);\n        // Project out ground state\n        for (size_t i = 0; i < Ni; i++)\n            guesses.x[i] = projector(guesses.x[i]);\n\n        // Truncate before doing expensive things\n        guesses.x.truncate_rf();\n\n        // Normalize after projection\n        if (r_params.tda())\n            normalize(world, guesses.x);\n\n        // (TODO why not normalize if not tda)\n        // compute y = false\n        auto xc = make_xc_operator(world);\n        auto [temp_Lambda_X, temp_V0X, temp_gamma] =\n            compute_response_potentials(world, guesses, xc, \"tda\");\n\n        // Debugging output\n        auto [new_omega, rotated_chi, rotated_lambda, rotated_v_x, rotated_gamma_x] =\n            rotate_excited_space(world, guesses, temp_Lambda_X, temp_V0X, temp_gamma);\n\n        omega = copy(new_omega);\n\n        // Ensure right number of omegas\n        if (size_t(omega.dim(0)) != Ni)\n        {\n            auto Ni_d = Ni - omega.dim(0);\n            if (world.rank() == 0)\n            {\n                print(\"\\n   Adding\", Ni_d,\n                      \"eigenvalue(s) (counters subspace size \"\n                      \"reduction in \"\n                      \"diagonalizatoin).\");\n            }\n            Tensor<double> temp(Ni);\n            temp(Slice(0, omega.dim(0) - 1)) = omega;\n            for (size_t i = omega.dim(0); i < Ni; i++)\n                temp[i] = 2.5 * i;\n            omega = copy(temp);\n        }\n\n        // Basic output\n        if (r_params.print_level() >= 1 and world.rank() == 0)\n        {\n            print(\"\\n   Excitation Energies:\");\n            print(\"gi=\", iteration, \" roots: \", omega);\n        }\n\n        // Only do BSH if not the last iteration\n        if (iteration + 1 < r_params.guess_max_iter())\n        {\n            //  Calculates shifts needed for potential / energies\n            //  If none needed, the zero tensor is returned\n            x_shifts = create_shift(world, ground_energies, omega, \"x\");\n\n            if (r_params.print_level() >= 1)\n            {\n                molresponse::start_timer(world);\n            }\n            X_space E0X(world, rotated_chi.num_states(), rotated_chi.num_orbitals());\n            if (r_params.localize() != \"canon\")\n            {\n                E0X = rotated_chi.copy();\n                E0X.x = E0X.x * ham_no_diag;\n            }\n            world.gop.fence();\n\n            if (r_params.print_level() >= 1)\n            {\n                molresponse::end_timer(world, \"E0mDX\", \"E0mDX\", iter_timing);\n            }\n            X_space theta_X = X_space(world, rotated_chi.num_states(), rotated_chi.num_orbitals());\n\n            theta_X = rotated_v_x - E0X + rotated_gamma_x;\n\n            theta_X.x = apply_shift(world, x_shifts, theta_X.x, guesses.x);\n            theta_X.x = theta_X.x * -2;\n            theta_X.x.truncate_rf();\n\n            print(\"BARRIER before create BSH\");\n            world.mpi.Barrier();\n            // Construct BSH operators\n            auto bsh_x_operators =\n                create_bsh_operators(world, x_shifts, ground_energies, omega, r_params.lo(),\n                                     FunctionDefaults<3>::get_thresh());\n\n            print(\"BARRIER before apply BSH\");\n            world.mpi.Barrier();\n            // Apply BSH and get updated components\n            if (r_params.print_level() >= 1)\n                molresponse::start_timer(world);\n            bsh_resp = apply(world, bsh_x_operators, theta_X.x);\n            if (r_params.print_level() >= 1)\n                molresponse::end_timer(world, \"Apply BSH:\");\n\n            // Project out ground state\n            // for (size_t i = 0; i < Ni; i++) bsh_resp[i] = projector(bsh_resp[i]);\n\n            for (auto &bsh_i : bsh_resp.x)\n            {\n                bsh_i = projector(bsh_i);\n            }\n            // Save new components\n            guesses.x = bsh_resp;\n            // Apply mask\n            for (size_t i = 0; i < Ni; i++)\n                guesses.x[i] = mask * guesses.x[i];\n        }\n\n        // Ensure orthogonal guesses\n        for (size_t i = 0; i < 2; i++)\n        {\n            molresponse::start_timer(world);\n            // Orthog\n            guesses.x = gram_schmidt(world, guesses.x);\n            molresponse::end_timer(world, \"orthog\");\n\n            molresponse::start_timer(world);\n            // Normalize\n            normalize(world, guesses.x);\n            molresponse::end_timer(world, \"normalize\");\n        }\n\n        // Update counter\n        iteration += 1;\n        // Done with the iteration.. truncate\n        guesses.x.truncate_rf();\n\n        // Basic output\n        if (r_params.print_level() >= 1)\n        { //\n            molresponse::end_timer(world, \" This iteration:\");\n        }\n    }\n} // Done with iterate gues\n// Simplified iterate scheme for guesses\n\n/**\n * @brief Diagonalize AX=SX frequencies\n *\n * @param world\n * @param S\n * @param old_S\n * @param old_A\n * @param x_response\n * @param old_x_response\n * @param ElectronResponses\n * @param OldElectronResponses\n * @param frequencies\n * @param iteration\n * @param m\n */\n\nvoid ExcitedResponse::deflateGuesses(World &world, X_space &Chi, X_space &Lambda_X,\n                                     Tensor<double> &S, Tensor<double> &frequencies,\n                                     size_t &iteration, size_t &m) const\n{\n    // XX =Omega XAX\n    S = response_space_inner(Chi.x, Chi.x);\n    Tensor<double> XAX = response_space_inner(Chi.x, Lambda_X.x);\n\n    // Debugging output\n    if (r_params.print_level() >= 2 and world.rank() == 0)\n    {\n        print(\" Guess  Overlap matrix:\");\n        print(S);\n        print(\" Guess  XAX matrix:\");\n        print(XAX);\n    }\n    // Just to be sure dimensions work out, clear frequencies\n    frequencies.clear();\n    diagonalizeFockMatrix(world, Chi, Lambda_X, frequencies, XAX, S,\n                          FunctionDefaults<3>::get_thresh());\n}\n\nvoid ExcitedResponse::deflateTDA(World &world, X_space &Chi, X_space &old_Chi, X_space &Lambda_X,\n                                 X_space &old_Lambda_X, Tensor<double> &S, Tensor<double> old_S,\n                                 Tensor<double> old_A, Tensor<double> &omega, size_t &iteration,\n                                 size_t &m)\n{\n    S = response_space_inner(Chi.x, Chi.x);\n    Tensor<double> XAX = response_space_inner(Chi.x, Lambda_X.x);\n\n    // Debugging output\n    if (r_params.print_level() >= 2 and world.rank() == 0)\n    {\n        print(\"   Overlap matrix:\");\n        print(S);\n    }\n\n    // Augment S_x, A_x, x_gamma, x_response, V_x_response and x_gamma\n    // if using a larger subspace and not iteration zero (TODO ---Gotta\n    // look at this and make sure it uses my new functions molresponse )\n    // by default r_params.larger_subspace() = 0 therefore never uses this\n    if (iteration < r_params.larger_subspace() and iteration > 0)\n    {\n        print(\"Using augmented subspace\");\n        augment(world, Chi, old_Chi, Lambda_X, old_Lambda_X, S, XAX, old_S, old_A,\n                r_params.print_level());\n    }\n\n    // Solve Ax = Sxw\n    // Just to be sure dimensions work out, clear omega\n    omega.clear();\n    diagonalizeFockMatrix(world, Chi, Lambda_X, omega, XAX, S, FunctionDefaults<3>::get_thresh());\n\n    // If larger subspace, need to \"un-augment\" everything\n    if (iteration < r_params.larger_subspace())\n    {\n        print(\"Unaugmenting subspace\");\n        unaugment(world, Chi, old_Chi, Lambda_X, old_Lambda_X, omega, S, XAX, old_S, old_A,\n                  r_params.num_states(), iteration, r_params.print_level());\n    }\n}\n\nvoid ExcitedResponse::deflateFull(World &world, X_space &Chi, X_space &old_Chi, X_space &Lambda_X,\n                                  X_space &old_Lambda_X, Tensor<double> &S, Tensor<double> old_S,\n                                  Tensor<double> old_A, Tensor<double> &omega, size_t &iteration,\n                                  size_t &m)\n{\n    // Debugging output\n    Tensor<double> A;\n\n    if (iteration < r_params.larger_subspace() and iteration > 0)\n    {\n        print(\"Entering Augment Full\");\n        augment_full(world, Chi, old_Chi, Lambda_X, old_Lambda_X, S, A, old_S, old_A,\n                     r_params.print_level());\n        // computes Augments A and S\n    }\n    else\n    {\n        S = response_space_inner(Chi.x, Chi.x) - response_space_inner(Chi.y, Chi.y);\n        if (world.rank() == 0 && (r_params.print_level() >= 10))\n        {\n            print(\"\\n   Overlap Matrix:\");\n            print(S);\n            X_space Chi_copy = Chi.copy();\n            Chi_copy.truncate();\n            Lambda_X.truncate();\n            A = inner(Chi_copy, Lambda_X);\n            A = 0.5 * (A + transpose(A));\n        }\n\n        if (world.rank() == 0 && (r_params.print_level() >= 10))\n        {\n            print(\"\\n   Lambda Matrix:\");\n            print(A);\n        }\n    }\n\n    omega.clear();\n\n    Tensor<double> U = diagonalizeFullResponseMatrix(world, Chi, Lambda_X, omega, S, A,\n                                                     FunctionDefaults<3>::get_thresh(),\n                                                     r_params.print_level());\n\n    if (iteration < r_params.larger_subspace() and iteration > 0)\n    {\n        print(\"Entering Unaugment Full\");\n        unaugment_full(world, Chi, old_Chi, Lambda_X, old_Lambda_X, omega, S, A, old_S, old_A,\n                       r_params.num_states(), iteration, r_params.print_level());\n    }\n    else\n    {\n        old_Chi = Chi.copy();\n        old_Lambda_X = Lambda_X.copy();\n    }\n}\n\nstd::tuple<Tensor<double>, X_space, X_space, X_space, X_space>\nExcitedResponse::rotate_excited_space(World &world, X_space &chi, X_space &lchi, X_space &v_chi,\n                                      X_space &gamma_chi)\n{\n    // Debugging output\n    Tensor<double> A;\n    X_space chi_copy = chi.copy();\n    X_space l_copy = lchi.copy();\n\n    Tensor<double> S = response_space_inner(chi_copy.x, chi_copy.x) -\n                       response_space_inner(chi_copy.y, chi_copy.y);\n\n    if (world.rank() == 0)\n    {\n        auto sm = S - transpose(S);\n        print(sm.max());\n    }\n    S = 0.5 * (S + transpose(S));\n\n    if (world.rank() == 0 && (r_params.print_level() >= 10))\n    {\n        print(\"\\n   Overlap Matrix:\");\n        print(S);\n    }\n    //\n    A = inner(chi_copy, l_copy);\n    if (world.rank() == 0)\n    {\n        auto am = A - transpose(A);\n        print(\"largest non-symmetric :\", am.max());\n    }\n    A = 0.5 * (A + transpose(A));\n    if (world.rank() == 0 && (r_params.print_level() >= 10))\n    {\n        print(\"\\n   Lambda Matrix:\");\n        print(A);\n    }\n\n    auto [new_omega, U] = excited_eig(world, S, A, FunctionDefaults<3>::get_thresh());\n\n    if (world.rank() == 0 and r_params.print_level() >= 2)\n    {\n        print(\"   Eigenvector coefficients from diagonalization:\");\n        print(U);\n        print(new_omega);\n    }\n    auto [rotated_chi, rotated_l_chi, rotated_v_chi, rotated_gamma_chi] =\n        rotate_excited_vectors(world, U, chi, lchi, v_chi, gamma_chi);\n\n    return {new_omega, rotated_chi, rotated_l_chi, rotated_v_chi, rotated_gamma_chi};\n}\n\nstd::tuple<Tensor<double>, Tensor<double>, Tensor<double>>\nExcitedResponse::reduce_subspace(World &world, Tensor<double> &S, Tensor<double> &A,\n                                 const double thresh_degenerate)\n{\n\n    // Get size\n    size_t m = S.dim(0);\n    // Run an SVD on the overlap matrix and ignore values\n    // less than thresh_degenerate\n    Tensor<double> r_vecs, s_vals, l_vecs;\n    Tensor<double> S_copy = copy(S);\n    // Step 1 find the svd of S\n    svd(S_copy, l_vecs, s_vals, r_vecs);\n\n    // Debugging output\n    if (r_params.print_level() >= 2 and world.rank() == 0)\n    {\n        print(\"\\n   Singular values of overlap matrix:\");\n        print(s_vals);\n        print(\"   Left singular vectors of overlap matrix:\");\n        print(l_vecs);\n    }\n\n    // Step 2 find the number of singular values below threshold\n    size_t num_zero = 0;\n    for (int64_t i = 0; i < s_vals.dim(0); i++)\n    {\n        if (s_vals(i) < 10 * thresh_degenerate)\n        {\n            if (world.rank() == 0 and num_zero == 0)\n                print(\"\");\n            if (world.rank() == 0)\n                printf(\"   Detected singular value (%.8f) below threshold (%.8f). \"\n                       \"Reducing subspace size.\\n\",\n                       s_vals(i), 10 * thresh_degenerate);\n            num_zero++;\n        }\n        if (world.rank() == 0 and i == s_vals.dim(0) - 1 and num_zero > 0)\n            print(\"\");\n    }\n\n    // in the overlap matrix\n    size_t size_l = s_vals.dim(0);     // number of singular values\n    size_t size_s = size_l - num_zero; // smaller subspace size\n\n    Tensor<double> l_vecs_s(size_l, size_s);\n\n    Tensor<double> copyA = copy(A); // we copy xAx\n    // Transform into this smaller space if necessary\n    if (num_zero > 0)\n    {\n        print(\"num_zero = \", num_zero);\n        // Cut out the singular values that are small\n        // (singular values come out in descending order)\n        // S(m-sl,m-sl)\n        S = Tensor<double>(size_s, size_s); // create size of new size\n\n        // copy the singular values into the diagonal of smaller space\n        for (size_t i = 0; i < size_s; i++)\n        {\n            S(i, i) = s_vals(i);\n        }\n\n        // Copy the active vectors to a smaller container\n        // left vectors [m,m-sl]\n        l_vecs_s = copy(l_vecs(_, Slice(0, size_s - 1)));\n\n        // Debugging output\n        if (r_params.print_level() >= 2 and world.rank() == 0)\n        {\n            print(\"   Reduced size left singular vectors of overlap matrix:\");\n            print(l_vecs_s);\n        }\n\n        // Transform\n        // Work(m,m-sl)\n        Tensor<double> work(size_l, size_s);\n        // dimi,dimj,dimk,c,a,b\n        mxm(size_l, size_s, size_l, work.ptr(), A.ptr(), l_vecs_s.ptr());\n        // A*left\n        copyA = Tensor<double>(size_s, size_s);\n        Tensor<double> l_vecs_t = transpose(l_vecs);\n        // s s l, copyA=lvect_t*A*left\n        mxm(size_s, size_s, size_l, copyA.ptr(), l_vecs_t.ptr(), work.ptr());\n\n        // Debugging output\n        if (r_params.print_level() >= 2 and world.rank() == 0)\n        {\n            print(\"   Reduced response matrix:\");\n            print(copyA);\n            print(\"   Reduced overlap matrix:\");\n            print(S);\n        }\n    }\n\n    return {l_vecs, S, copyA};\n}\n\nstd::pair<Tensor<double>, Tensor<double>>\nExcitedResponse::excited_eig(World &world, Tensor<double> &S, Tensor<double> &A,\n                             const double thresh_degenerate)\n{\n    // Start timer\n    if (r_params.print_level() >= 1)\n        molresponse::start_timer(world);\n    auto size_l = S.dim(0);\n    /*\n    auto [l_vecs, copyS, copyA] = reduce_subspace(world, S, A, thresh_degenerate);\n     */\n\n    auto copyA = copy(A);\n    auto copyS = copy(S);\n\n    auto size_s = copyS.dim(0);\n    auto num_zero = size_l - size_s;\n    print(\"size_l: \", size_l);\n    print(\"size_s: \", size_s);\n    print(\"NUMZERO: \", num_zero);\n    if (r_params.print_level() >= 1)\n    {\n        molresponse::end_timer(world, \"reduce subspace\", \"subspace_reduce\", iter_timing);\n    }\n    if (r_params.print_level() >= 1)\n        molresponse::start_timer(world);\n    // Diagonalize (NOT A SYMMETRIC DIAGONALIZATION!!!!)\n    // Potentially complex eigenvalues come out of this\n    Tensor<double> omega(size_s);\n    Tensor<double> U(size_s, size_s);\n    sygvp(world, copyA, copyS, 1, U, omega);\n    // sygvp(world, fock, overlap, 1, c, e); from SCF.cc\n\n    // not zero enough\n    /*\n    double max_imag = abs(imag(omega)).max();\n    if (world.rank() == 0 and r_params.print_level() >= 2)\n        print(\"\\n   Max imaginary component of eigenvalues:\", max_imag, \"\\n\");\n    if (max_imag > r_params.dconv()) {\n        MADNESS_EXCEPTION(\"max imaginary component of eigenvalues > dconv\", 0);\n    }\n     */\n    Tensor<double> new_omega = real(omega);\n    // Easier to just resize here\n    auto m = new_omega.dim(0);\n    bool switched = true;\n    while (switched)\n    {\n        switched = false;\n        for (size_t i = 0; i < m; i++)\n        {\n            for (size_t j = i + 1; j < m; j++)\n            {\n                double sold = U(i, i) * U(i, i) + U(j, j) * U(j, j);\n                double snew = U(i, j) * U(i, j) + U(j, i) * U(j, i);\n                if (snew > sold)\n                {\n                    Tensor<double> tmp = copy(U(_, i));\n                    U(_, i) = U(_, j);\n                    U(_, j) = tmp;\n                    std::swap(new_omega[i], new_omega[j]);\n                    switched = true;\n                }\n            }\n        }\n    }\n\n    // Fix phases.\n    for (size_t i = 0; i < m; ++i)\n        if (U(i, i) < 0.0)\n            U(_, i).scale(-1.0);\n\n    // Rotations between effectively degenerate components confound\n    // the non-linear equation solver ... undo these rotations\n    size_t ilo = 0; // first element of cluster\n    while (ilo < m - 1)\n    {\n        size_t ihi = ilo;\n        while (fabs(new_omega[ilo] - new_omega[ihi + 1]) <\n               thresh_degenerate * 10.0 * std::max(fabs(new_omega[ilo]), 1.0))\n        {\n            ++ihi;\n            if (ihi == m - 1)\n                break;\n        }\n        int64_t nclus = ihi - ilo + 1;\n        if (nclus > 1)\n        {\n            Tensor<double> q = copy(U(Slice(ilo, ihi), Slice(ilo, ihi)));\n\n            // Polar Decomposition\n            Tensor<double> VH(nclus, nclus);\n            Tensor<double> W(nclus, nclus);\n            Tensor<double> sigma(nclus);\n\n            svd(q, W, sigma, VH);\n            q = transpose(inner(W, VH)); // Should be conj. tranpose if complex\n            U(_, Slice(ilo, ihi)) = inner(U(_, Slice(ilo, ihi)), q);\n        }\n        ilo = ihi + 1;\n    }\n\n    // If we transformed into the smaller subspace, time to transform back\n    /*\n    if (num_zero > 0) {\n        // Temp. storage\n        Tensor<double> temp_U(size_l, size_l);\n        Tensor<double> temp_U2(size_l, size_l);\n        Tensor<double> U2(size_l, size_l);\n\n        // Copy U back to larger size\n        temp_U(Slice(0, size_s - 1), Slice(0, size_s - 1)) = copy(U);\n        for (size_t i = size_s; i < size_l; i++) temp_U(i, i) = 1.0;\n\n\n        // Transform U back\n        mxm(size_l, size_l, size_l, U2.ptr(), l_vecs.ptr(), temp_U.ptr());\n        Tensor<double> l_vecs_t = transpose(l_vecs);\n        mxm(size_l, size_l, size_l, temp_U2.ptr(), U2.ptr(), l_vecs_t.ptr());\n\n        U = copy(temp_U2);\n        if (world.rank() == 0 && r_params.print_level() >= 1) {\n            print(\"Increasing subspace size and returning U\");\n            print(U);\n        }\n    }\n     */\n\n    // Sort into ascending order\n    Tensor<int> selected = sort_eigenvalues(world, new_omega, U);\n\n    // End timer\n    if (r_params.print_level() >= 1)\n    {\n        molresponse::end_timer(world, \"diagonalize response matrix\", \"diagonalize_response_matrix\",\n                               iter_timing);\n    }\n\n    return {new_omega, U};\n}\n\nvoid ExcitedResponse::augment(World &world, X_space &Chi, X_space &old_Chi, X_space &Lambda_X,\n                              X_space &last_Lambda_X, Tensor<double> &S, Tensor<double> &A,\n                              Tensor<double> &old_S, Tensor<double> &old_A, size_t print_level)\n{\n    // Basic output\n    if (print_level >= 1)\n        molresponse::start_timer(world);\n\n    // Get sizes\n    size_t m = Chi.x.size();\n    // Create work space, will overwrite S and A in the end\n    Tensor<double> temp_S(2 * m, 2 * m);\n    Tensor<double> temp_A(2 * m, 2 * m);\n    /**\n     * @brief Need to create off diagonal blocks of A\n     *  A=\n     *  [xAx      xAx_old ]\n     *  [xoldAx  xoldAxold]\n     *\n     */\n    // Calculate correct inner products of upper off diagonal\n\n    Tensor<double> off = response_space_inner(Chi.x, last_Lambda_X.x);\n    temp_A(Slice(0, m - 1), Slice(m, 2 * m - 1)) = copy(off); // top right\n    // Now for lower off diagonal\n    off = response_space_inner(old_Chi.x, Lambda_X.x);\n    temp_A(Slice(m, 2 * m - 1), Slice(0, m - 1)) = copy(off);       // bottom left\n    temp_A(Slice(0, m - 1), Slice(0, m - 1)) = copy(A);             // xAx top left\n    temp_A(Slice(m, 2 * m - 1), Slice(m, 2 * m - 1)) = copy(old_A); // xoldAxold bottom right\n    // Debugging output\n    if (print_level >= 2 and world.rank() == 0)\n    {\n        print(\"   Before symmeterizing A:\");\n        print(temp_A);\n    }\n    // Save temp_A as A_x\n    // Need to symmeterize A as well (?)\n    A = 0.5 * (temp_A + transpose(temp_A));\n    /**\n     * @brief Creating S\n     * S= [<x|x>    <x|xold>   ]\n     *    [<xold|x> <xold|xold>]\n     */\n    // Now create upper off diagonal block of S\n    off = expectation(world, Chi.x, old_Chi.x);\n    // Use slicing to put in correct spot\n    temp_S(Slice(0, m - 1), Slice(m, 2 * m - 1)) = copy(off); // top right <x|xold>\n    // Now the lower off diagonal block\n    // (Go ahead and cheat and use the transpose...)\n    off = transpose(off); // just transpose <xold|x>\n    // Use slicing to put in correct spot\n    temp_S(Slice(m, 2 * m - 1), Slice(0, m - 1)) = copy(off); // bottom right <xold|x>\n    // Put together the rest of S\n    temp_S(Slice(0, m - 1), Slice(0, m - 1)) = copy(S);             // top left <x|x>\n    temp_S(Slice(m, 2 * m - 1), Slice(m, 2 * m - 1)) = copy(old_S); //<xold|xold>\n    // Save temp_S as S_x\n    S = copy(temp_S);\n    // Add in old vectors to current vectors for the appropriate ones\n    // Augment the vectors step\n    for (size_t i = 0; i < m; i++)\n    {\n        Chi.x.push_back(old_Chi.x[i]);\n        Lambda_X.x.push_back(last_Lambda_X.x[i]);\n    }\n\n    // End the timer\n    if (print_level >= 1)\n        molresponse::end_timer(world, \"Aug. resp. matrix:\");\n\n    // Debugging output\n    if (print_level >= 2 and world.rank() == 0)\n    {\n        print(\"\\n   Augmented response matrix:\");\n        print(A);\n    }\n\n    // Debugging output\n    if (print_level >= 2 and world.rank() == 0)\n    {\n        print(\"   Augmented overlap matrix:\");\n        print(S);\n    }\n\n    // SUPER debugging\n    if (print_level >= 3)\n    {\n        if (world.rank() == 0)\n            print(\"   Calculating condition number of aug. response matrix\");\n    }\n}\n\n// If using a larger subspace to diagonalize in, this will put everything in\n// the right spot\nvoid ExcitedResponse::augment_full(World &world, X_space &Chi, X_space &old_Chi, X_space &Lambda_X,\n                                   X_space &last_Lambda_X, Tensor<double> &S, Tensor<double> &A,\n                                   Tensor<double> &old_S, Tensor<double> &old_A,\n                                   size_t print_level)\n{\n    // Basic output\n    if (print_level >= 1)\n        molresponse::start_timer(world);\n\n    size_t m = Chi.num_states();\n    for (size_t i = 0; i < m; i++)\n    {\n        Chi.push_back(copy(world, old_Chi.x[i]), copy(world, old_Chi.y[i]));\n        Lambda_X.push_back(copy(world, last_Lambda_X.x[i]), copy(world, last_Lambda_X.y[i]));\n    }\n    Tensor<double> temp_A = inner(Chi, Lambda_X);\n    A = 0.5 * (temp_A + transpose(temp_A));\n    S = response_space_inner(Chi.x, Chi.x) - response_space_inner(Chi.y, Chi.y);\n\n    // End the timer\n    if (print_level >= 1)\n        molresponse::end_timer(world, \"Aug. resp. matrix:\");\n\n    // Debugging output\n    if (print_level >= 2 and world.rank() == 0)\n    {\n        print(\"\\n   Augmented response matrix:\");\n        print(A);\n    }\n\n    // Debugging output\n    if (print_level >= 2 and world.rank() == 0)\n    {\n        print(\"   Augmented overlap matrix:\");\n        print(S);\n    }\n\n    // SUPER debugging\n    if (print_level >= 3)\n    {\n        if (world.rank() == 0)\n            print(\"   Calculating condition number of aug. response matrix\");\n    }\n}\n// If using a larger subspace to diagonalize in, after diagonalization this\n// will put everything in the right spot\n\nvoid ExcitedResponse::unaugment(World &world, X_space &Chi, X_space &old_Chi, X_space &Lambda_X,\n                                X_space &last_Lambda_X, Tensor<double> &omega, Tensor<double> &S_x,\n                                Tensor<double> &A_x, Tensor<double> &old_S, Tensor<double> &old_A,\n                                size_t num_states, size_t iter, size_t print_level)\n{\n    // Basic output\n    if (print_level >= 1)\n        molresponse::start_timer(world);\n\n    // Note: the eigenvalues and vectors were sorted after diagonalization\n    // and hence all the functions are sorted in ascending order of energy\n\n    // Quick copy of m lowest eigenvalues\n    omega = omega(Slice(0, num_states - 1));\n    // Pop off the \"m\" vectors off the back end of appropriate vectors\n    // (only after first iteration)\n    if (iter > 0)\n    {\n        for (size_t i = 0; i < num_states; i++)\n        {\n            Chi.x.pop_back();\n            Lambda_X.x.pop_back();\n        }\n    }\n    old_Chi.x = Chi.x.copy();\n    last_Lambda_X.x = Lambda_X.x.copy();\n\n    old_S = response_space_inner(Chi.x, Chi.x);\n    old_A = Tensor<double>(num_states, num_states);\n    for (size_t i = 0; i < num_states; i++)\n        old_A(i, i) = omega(i);\n    // End the timer\n    if (print_level >= 1)\n        molresponse::end_timer(world, \"Unaug. resp. mat.:\");\n}\n// If using a larger subspace to diagonalize in, after diagonalization this\n// will put everything in the right spot\n\nvoid ExcitedResponse::unaugment_full(World &world, X_space &Chi, X_space &old_Chi,\n                                     X_space &Lambda_X, X_space &last_Lambda_X,\n                                     Tensor<double> &omega, Tensor<double> &S_x,\n                                     Tensor<double> &A_x, Tensor<double> &old_S,\n                                     Tensor<double> &old_A, size_t num_states, size_t iter,\n                                     size_t print_level)\n{\n    // Basic output\n    if (print_level >= 1)\n        molresponse::start_timer(world);\n\n    // Note: the eigenvalues and vectors were sorted after diagonalization\n    // and hence all the functions are sorted in ascending order of energy\n\n    // Quick copy of m lowest eigenvalues\n    omega = omega(Slice(0, num_states - 1));\n\n    // Pop off the \"m\" vectors off the back end of appropriate vectors\n    // (only after first iteration)\n    print(\"Entering Loop to pop_back Chi and LambdaX\");\n    if (iter > 0)\n    {\n        for (size_t i = 0; i < num_states; i++)\n        {\n            print(\"pop back Chi and LambdaX\");\n            Chi.pop_back();\n            Lambda_X.pop_back();\n        }\n    }\n\n    old_Chi = Chi.copy();\n    last_Lambda_X = Lambda_X.copy();\n\n    old_S = response_space_inner(Chi.x, Chi.x) - response_space_inner(Chi.y, Chi.y);\n    old_A = Tensor<double>(num_states, num_states);\n    for (size_t i = 0; i < num_states; i++)\n        old_A(i, i) = omega(i);\n    // End the timer\n    if (print_level >= 1)\n        molresponse::end_timer(world, \"Unaug. resp. mat.:\");\n}\n// Diagonalize the full response matrix, taking care of degenerate\n// components Why diagonalization and then transform the x_fe vectors\n\nstd::tuple<X_space, X_space, X_space, X_space>\nExcitedResponse::rotate_excited_vectors(World &world, const Tensor<double> &U, const X_space &chi,\n                                        const X_space &l_chi, const X_space &v0_chi,\n                                        const X_space &gamma_chi)\n{\n    // compute the unitary transformation matrix U that diagonalizes\n    // the response matrix\n\n    // Start timer\n    if (r_params.print_level() >= 1)\n        molresponse::start_timer(world);\n\n    auto rotated_chi = transform(world, chi, U);\n    auto rotated_l_chi = transform(world, l_chi, U);\n    auto rotated_v_chi = transform(world, v0_chi, U);\n    auto rotated_gamma_chi = transform(world, gamma_chi, U);\n\n    if (r_params.print_level() >= 10)\n    {\n        Tensor<double> S;\n        S = response_space_inner(rotated_chi.x, rotated_chi.x) -\n            response_space_inner(rotated_chi.y, rotated_chi.y);\n        if (world.rank() == 0)\n        {\n            print(\"\\n  After apply transform Overlap Matrix:\");\n            print(S);\n        }\n    }\n\n    // Transform the vectors of functions\n    // Truncate happens in here\n    // we do transform here\n    // End timer\n    if (r_params.print_level() >= 1)\n        molresponse::end_timer(world, \"Transform orbs.:\");\n\n    return {rotated_chi, rotated_l_chi, rotated_v_chi, rotated_gamma_chi};\n}\n\nTensor<double> ExcitedResponse::diagonalizeFullResponseMatrix(\n    World &world, X_space &Chi, X_space &Lambda_X, Tensor<double> &omega, Tensor<double> &S,\n    Tensor<double> &A, const double thresh, size_t print_level)\n{\n    // compute the unitary transformation matrix U that diagonalizes\n    // the response matrix\n    Tensor<double> U = GetFullResponseTransformation(world, S, A, omega, thresh);\n\n    // Sort into ascending order\n    // Tensor<int> selected = sort_eigenvalues(world, omega, U);\n\n    // Start timer\n    if (r_params.print_level() >= 1)\n        molresponse::start_timer(world);\n\n    Chi.x = transform(world, Chi.x, U);\n    Chi.y = transform(world, Chi.y, U);\n    Tensor<double> Sxa, Sya, Sa;\n\n    Sxa = response_space_inner(Chi.x, Chi.x);\n    Sya = response_space_inner(Chi.y, Chi.y);\n    Sa = Sxa - Sya;\n\n    if (world.rank() == 0 and r_params.print_level() >= 10)\n    {\n        print(\"\\n  After apply transform Overlap Matrix:\");\n        print(Sxa);\n        print(Sya);\n        print(Sa);\n    }\n\n    Lambda_X.x = transform(world, Lambda_X.x, U);\n    Lambda_X.y = transform(world, Lambda_X.y, U);\n    // Transform the vectors of functions\n    // Truncate happens in here\n    // we do transform here\n    // End timer\n    if (r_params.print_level() >= 1)\n        molresponse::end_timer(world, \"Transform orbs.:\");\n\n    // Normalize x and y\n    normalize(world, Chi);\n\n    // Debugging output\n    if (world.rank() == 0 and print_level >= 2)\n    {\n        print(\"   Eigenvector coefficients from diagonalization:\");\n        print(U);\n    }\n\n    // Return the selected functions\n    return U;\n}\n\n// Similar to what robert did above in \"get_fock_transformation\"\nTensor<double> ExcitedResponse::GetFullResponseTransformation(World &world, Tensor<double> &S,\n                                                              Tensor<double> &A,\n                                                              Tensor<double> &evals,\n                                                              const double thresh_degenerate)\n{\n    // Start timer\n    if (r_params.print_level() >= 1)\n        molresponse::start_timer(world);\n\n    // Get size\n    size_t m = S.dim(0);\n\n    // Run an SVD on the overlap matrix and ignore values\n    // less than thresh_degenerate\n    Tensor<double> r_vecs, s_vals, l_vecs;\n    Tensor<double> S_copy = copy(S);\n    /**\n     * @brief SVD on overlap matrix S\n     * S=UsVT\n     * S, U, s , VT\n     *\n     */\n    svd(S_copy, l_vecs, s_vals, r_vecs);\n\n    // Debugging output\n    if (r_params.print_level() >= 2 and world.rank() == 0)\n    {\n        print(\"\\n   Singular values of overlap matrix:\");\n        print(s_vals);\n        print(\"   Left singular vectors of overlap matrix:\");\n        print(l_vecs);\n    }\n\n    // Check how many singular values are less than 10*thresh_degen\n    size_t num_zero = 0;\n    for (int64_t i = 0; i < s_vals.dim(0); i++)\n    {\n        if (s_vals(i) < 10 * thresh_degenerate)\n        {\n            if (world.rank() == 0 and num_zero == 0)\n                print(\"\");\n            if (world.rank() == 0)\n                printf(\"   Detected singular value (%.8f) below threshold (%.8f). \"\n                       \"Reducing subspace size.\\n\",\n                       s_vals(i), 10 * thresh_degenerate);\n            num_zero++;\n        }\n        if (world.rank() == 0 and i == s_vals.dim(0) - 1 and num_zero > 0)\n            print(\"\");\n    }\n\n    // Going to use these a lot here, so just calculate them\n    size_t size_l = s_vals.dim(0);     // number of singular values\n    size_t size_s = size_l - num_zero; // smaller subspace size\n    /**\n     * @brief l_vecs_s(m,1)\n     *\n     * @return Tensor<double>\n     */\n    Tensor<double> l_vecs_s(size_l,\n                            num_zero); // number of sv by number smaller than thress\n    Tensor<double> copyA = copy(A);    // we copy xAx\n\n    // Transform into this smaller space if necessary\n    if (num_zero > 0)\n    {\n        print(\"num_zero = \", num_zero);\n        // Cut out the singular values that are small\n        // (singular values come out in descending order)\n\n        // S(m-sl,m-sl)\n        S = Tensor<double>(size_s, size_s); // create size of new size\n        for (size_t i = 0; i < size_s; i++)\n            S(i, i) = s_vals(i);\n        // Copy the active vectors to a smaller container\n        // left vectors [m,m-sl]\n        l_vecs_s = copy(l_vecs(_, Slice(0, size_s - 1)));\n\n        // Debugging output\n        if (r_params.print_level() >= 2 and world.rank() == 0)\n        {\n            print(\"   Reduced size left singular vectors of overlap matrix:\");\n            print(l_vecs_s);\n        }\n\n        // Transform\n        // Work(m,m-sl)\n        Tensor<double> work(size_l, size_s);\n        /*\nc(i,j) = c(i,j) + sum(k) a(i,k)*b(k,j)\n\nwhere it is assumed that the last index in each array is has unit\nstride and the dimensions are as provided.\n\n4-way unrolled k loop ... empirically fastest on PIII\ncompared to 2/3 way unrolling (though not by much).\n*/\n        // dimi,dimj,dimk,c,a,b\n        mxm(size_l, size_s, size_l, work.ptr(), A.ptr(), l_vecs_s.ptr());\n        // A*left\n        copyA = Tensor<double>(size_s, size_s);\n        Tensor<double> l_vecs_t = transpose(l_vecs);\n        // s s l, copyA=lvect_t*A*left\n        mxm(size_s, size_s, size_l, copyA.ptr(), l_vecs_t.ptr(), work.ptr());\n\n        // Debugging output\n        if (r_params.print_level() >= 2 and world.rank() == 0)\n        {\n            print(\"   Reduced response matrix:\");\n            print(copyA);\n            print(\"   Reduced overlap matrix:\");\n            print(S);\n        }\n    }\n    // Diagonalize (NOT A SYMMETRIC DIAGONALIZATION!!!!)\n    // Potentially complex eigenvalues come out of this\n    Tensor<std::complex<double>> omega(size_s);\n    Tensor<double> U(size_s, size_s);\n    ggevp(world, copyA, S, U, omega);\n\n    // Eigenvectors come out oddly packaged if there are\n    // complex eigenvalues.\n    // Currently only supporting real valued eigenvalues\n    // so throw an error if any imaginary components are\n    // not zero enough\n    double max_imag = abs(imag(omega)).max();\n    if (world.rank() == 0 and r_params.print_level() >= 2)\n        print(\"\\n   Max imaginary component of eigenvalues:\", max_imag, \"\\n\");\n    if (max_imag > r_params.dconv())\n    {\n        MADNESS_EXCEPTION(\"max imaginary component of eigenvalues > dconv\", 0);\n    }\n    evals = real(omega);\n\n    // Easier to just resize here\n    m = evals.dim(0);\n\n    bool switched = true;\n    while (switched)\n    {\n        switched = false;\n        for (size_t i = 0; i < m; i++)\n        {\n            for (size_t j = i + 1; j < m; j++)\n            {\n                double sold = U(i, i) * U(i, i) + U(j, j) * U(j, j);\n                double snew = U(i, j) * U(i, j) + U(j, i) * U(j, i);\n                if (snew > sold)\n                {\n                    Tensor<double> tmp = copy(U(_, i));\n                    U(_, i) = U(_, j);\n                    U(_, j) = tmp;\n                    std::swap(evals[i], evals[j]);\n                    switched = true;\n                }\n            }\n        }\n    }\n\n    // Fix phases.\n    for (size_t i = 0; i < m; ++i)\n        if (U(i, i) < 0.0)\n            U(_, i).scale(-1.0);\n\n    // Rotations between effectively degenerate components confound\n    // the non-linear equation solver ... undo these rotations\n    size_t ilo = 0; // first element of cluster\n    while (ilo < m - 1)\n    {\n        size_t ihi = ilo;\n        while (fabs(evals[ilo] - evals[ihi + 1]) <\n               thresh_degenerate * 10.0 * std::max(fabs(evals[ilo]), 1.0))\n        {\n            ++ihi;\n            if (ihi == m - 1)\n                break;\n        }\n        int64_t nclus = ihi - ilo + 1;\n        if (nclus > 1)\n        {\n            Tensor<double> q = copy(U(Slice(ilo, ihi), Slice(ilo, ihi)));\n\n            // Polar Decomposition\n            Tensor<double> VH(nclus, nclus);\n            Tensor<double> W(nclus, nclus);\n            Tensor<double> sigma(nclus);\n\n            svd(q, W, sigma, VH);\n            q = transpose(inner(W, VH)); // Should be conj. tranpose if complex\n            U(_, Slice(ilo, ihi)) = inner(U(_, Slice(ilo, ihi)), q);\n        }\n        ilo = ihi + 1;\n    }\n\n    // If we transformed into the smaller subspace, time to transform back\n    if (num_zero > 0)\n    {\n        // Temp. storage\n        Tensor<double> temp_U(size_l, size_l);\n        Tensor<double> U2(size_l, size_l);\n\n        // Copy U back to larger size\n        temp_U(Slice(0, size_s - 1), Slice(0, size_s - 1)) = copy(U);\n        for (size_t i = size_s; i < size_l; i++)\n            temp_U(i, i) = 1.0;\n\n        // Transform U back\n        mxm(size_l, size_l, size_l, U2.ptr(), l_vecs.ptr(), temp_U.ptr());\n        U = copy(U2);\n    }\n\n    // Sort into ascending order\n    Tensor<int> selected = sort_eigenvalues(world, evals, U);\n\n    // End timer\n    if (r_params.print_level() >= 1)\n        molresponse::end_timer(world, \"Diag. resp. mat.\");\n\n    return U;\n}\n\nTensor<double> ExcitedResponse::diagonalizeFockMatrix(World &world, X_space &Chi, X_space &Lambda_X,\n                                                      Tensor<double> &evals, Tensor<double> &A,\n                                                      Tensor<double> &S,\n                                                      const double thresh) const\n{\n    // compute the unitary transformation matrix U that diagonalizes\n    // the fock matrix\n    Tensor<double> U = get_fock_transformation(world, S, A, evals, thresh);\n\n    // Sort into ascending order\n    Tensor<int> selected = sort_eigenvalues(world, evals, U);\n\n    // Debugging output\n    if (r_params.print_level() >= 2 and world.rank() == 0)\n    {\n        print(\"   U:\");\n        print(U);\n    }\n\n    // Start timer\n    if (r_params.print_level() >= 1)\n        molresponse::start_timer(world);\n\n    // transform the orbitals and the potential\n    // Truncate happens inside here\n    Chi.x = transform(world, Chi.x, U);\n    Lambda_X.x = transform(world, Lambda_X.x, U);\n\n    // End timer\n    if (r_params.print_level() >= 1)\n        molresponse::end_timer(world, \"Transform orbs.:\");\n\n    // Normalize x\n    normalize(world, Chi.x);\n\n    // Debugging output\n    if (r_params.print_level() >= 2 and world.rank() == 0)\n    {\n        print(\"   Eigenvector coefficients from diagonalization:\");\n        print(U);\n    }\n\n    return U;\n}\n\nTensor<double> ExcitedResponse::get_fock_transformation(World &world, Tensor<double> &overlap,\n                                                        Tensor<double> &fock, Tensor<double> &evals,\n                                                        const double thresh_degenerate) const\n{\n    // Run an SVD on the overlap matrix and ignore values\n    // less than thresh_degenerate\n    Tensor<double> r_vecs;\n    Tensor<double> s_vals;\n    Tensor<double> l_vecs;\n    Tensor<double> overlap_copy = copy(overlap);\n    svd(overlap_copy, l_vecs, s_vals, r_vecs);\n\n    // Debugging output\n    if (r_params.print_level() >= 2 and world.rank() == 0)\n    {\n        print(\"\\n   Singular values of overlap matrix:\");\n        print(s_vals);\n        print(\"   Left singular vectors of overlap matrix:\");\n        print(l_vecs);\n    }\n\n    // Check how many singular values are less than 10*thresh_degen\n    size_t num_sv = 0;\n    for (int64_t i = 0; i < s_vals.dim(0); i++)\n    {\n        if (s_vals(i) < 10 * thresh_degenerate)\n        {\n            if (world.rank() == 0 and num_sv == 0)\n                print(\"\");\n            if (world.rank() == 0)\n                printf(\"   Detected singular value (%.8f) below threshold (%.8f). \"\n                       \"Reducing subspace size.\\n\",\n                       s_vals(i), 10 * thresh_degenerate);\n            num_sv++;\n        }\n        if (world.rank() == 0 and i == s_vals.dim(0) - 1 and num_sv > 0)\n            print(\"\");\n    }\n\n    // Going to use these a lot here, so just calculate them\n    size_t size_l = s_vals.dim(0);\n    size_t size_s = size_l - num_sv;\n    Tensor<double> l_vecs_s(size_l, num_sv);\n\n    // Transform into this smaller space if necessary\n    if (num_sv > 0)\n    {\n        // Cut out the singular values that are small\n        // (singular values come out in descending order)\n        overlap = Tensor<double>(size_s, size_s);\n        for (size_t i = 0; i < size_s; i++)\n            overlap(i, i) = s_vals(i);\n\n        // Copy the active vectors to a smaller container\n        l_vecs_s = copy(l_vecs(_, Slice(0, size_s - 1)));\n\n        // Debugging output\n        if (r_params.print_level() >= 2 and world.rank() == 0)\n        {\n            print(\"   Reduced size left singular vectors of overlap matrix:\");\n            print(l_vecs_s);\n        }\n\n        // Transform\n        Tensor<double> work(size_l, size_s);\n        mxm(size_l, size_s, size_l, work.ptr(), fock.ptr(), l_vecs_s.ptr());\n        fock = Tensor<double>(size_s, size_s);\n        Tensor<double> l_vecs_t = transpose(l_vecs);\n        mxm(size_s, size_s, size_l, fock.ptr(), l_vecs_t.ptr(), work.ptr());\n    }\n\n    // Diagonalize using lapack\n    Tensor<double> U;\n    sygv(fock, overlap, 1, U, evals);\n\n    int64_t nmo = fock.dim(0); // NOLINT\n\n    bool switched = true;\n    while (switched)\n    {\n        switched = false;\n        for (int64_t i = 0; i < nmo; i++)\n        {\n            for (int64_t j = i + 1; j < nmo; j++)\n            {\n                double sold = U(i, i) * U(i, i) + U(j, j) * U(j, j);\n                double snew = U(i, j) * U(i, j) + U(j, i) * U(j, i);\n                if (snew > sold)\n                {\n                    Tensor<double> tmp = copy(U(_, i));\n                    U(_, i) = U(_, j);\n                    U(_, j) = tmp;\n                    std::swap(evals[i], evals[j]);\n                    switched = true;\n                }\n            }\n        }\n    }\n\n    // Fix phases.\n    for (int64_t i = 0; i < nmo; ++i) // NOLINT\n        if (U(i, i) < 0.0)\n            U(_, i).scale(-1.0);\n\n    // Rotations between effectively degenerate components confound\n    // the non-linear equation solver ... undo these rotations\n    int64_t ilo = 0; // first element of cluster NOLINT\n    while (ilo < nmo - 1)\n    {\n        int64_t ihi = ilo; // NOLINT\n        while (fabs(evals[ilo] - evals[ihi + 1]) <\n               thresh_degenerate * 100.0 * std::max(fabs(evals[ilo]), 1.0))\n        {\n            ++ihi;\n            if (ihi == nmo - 1)\n                break;\n        }\n        int64_t nclus = ihi - ilo + 1; // NOLINT\n        if (nclus > 1)\n        {\n            Tensor<double> q = copy(U(Slice(ilo, ihi), Slice(ilo, ihi)));\n\n            // Polar Decomposition\n            Tensor<double> VH(nclus, nclus);\n            Tensor<double> W(nclus, nclus);\n            Tensor<double> sigma(nclus);\n\n            svd(q, W, sigma, VH);\n            q = transpose(inner(W, VH)); // Should be conj. tranpose if complex\n            U(_, Slice(ilo, ihi)) = inner(U(_, Slice(ilo, ihi)), q);\n        }\n        ilo = ihi + 1;\n    }\n\n    fock = 0;\n    for (unsigned int i = 0; i < nmo; ++i)\n        fock(i, i) = evals(i);\n\n    // If we transformed into the smaller subspace, time to transform back\n    if (num_sv > 0)\n    {\n        // Temp. storage\n        Tensor<double> temp_U(size_l, size_l);\n        Tensor<double> U2(size_l, size_l);\n\n        // Copy U back to larger size\n        temp_U(Slice(0, size_s - 1), Slice(0, size_s - 1)) = copy(U);\n        for (size_t i = size_s; i < size_l; i++)\n            temp_U(i, i) = 1.0;\n\n        // Transform back\n        mxm(size_l, size_l, size_l, U2.ptr(), l_vecs.ptr(), temp_U.ptr());\n\n        U = copy(U2);\n    }\n\n    return U;\n}\n\nTensor<int> ExcitedResponse::sort_eigenvalues(World &world, Tensor<double> &vals,\n                                              Tensor<double> &vecs) const\n{\n    // Get relevant sizes\n    size_t k = vals.size();\n\n    // Tensor to hold selection order\n    Tensor<int> selected(k);\n\n    // Copy everything...\n    std::vector<double> vals_copy;\n    for (size_t i = 0; i < k; i++)\n        vals_copy.push_back(vals[i]);\n    Tensor<double> vals_copy2 = copy(vals);\n    Tensor<double> vecs_copy = copy(vecs);\n\n    // Now sort vals_copy\n    std::sort(vals_copy.begin(), vals_copy.end());\n\n    // Now sort the rest of the things, using the sorted energy list\n    // to find the correct indices\n    for (size_t i = 0; i < k; i++)\n    {\n        // Find matching index in sorted vals_copy\n        size_t j = 0;\n        while (fabs(vals_copy[i] - vals_copy2[j]) > 1e-8 && j < k)\n            j++;\n\n        // Add in to list which one we're taking\n        selected(i) = j;\n\n        // Put corresponding things in the correct place\n        vals(i) = vals_copy[i];\n        vecs(_, i) = vecs_copy(_, j);\n\n        // Change the value of vals_copy2[j] to help deal with duplicates?\n        vals_copy2[j] = 10000.0;\n    }\n\n    // Done\n    return selected;\n}\n\nTensor<double> ExcitedResponse::create_shift(World &world, const Tensor<double> &ground,\n                                             const Tensor<double> &omega, std::string xy) const\n{\n    // Start a timer\n    if (r_params.print_level() >= 1)\n        molresponse::start_timer(world);\n\n    // Get sizes\n    size_t m = omega.size();\n    size_t n = ground.size();\n\n    // Container to hold shift\n    Tensor<double> result(m, n);\n\n    // Run over excited components\n    for (size_t k = 0; k < m; k++)\n    {\n        // Run over ground components\n        for (size_t p = 0; p < n; p++)\n        {\n            if (ground(p) + omega(k) > 0)\n            {\n                // Calculate the shift needed to get energy to -0.05,\n                // which was arbitrary (same as moldft)\n                result(k, p) = -(ground(p) + omega(k) + 0.05);\n\n                // Basic output\n                if (r_params.print_level() >= 3)\n                {\n                    if (world.rank() == 0)\n                        printf(\"   Shift needed for transition from ground orbital %d to \"\n                               \"response %s state %d\\n\",\n                               static_cast<int>(p), xy.c_str(), static_cast<int>(k));\n                    if (world.rank() == 0)\n                        print(\"   Ground energy =\", ground(p));\n                    if (world.rank() == 0)\n                        print(\"   Excited energy =\", omega(k));\n                    if (world.rank() == 0)\n                        print(\"   Shifting by\", result(k, p));\n                    if (world.rank() == 0)\n                        print(\"\");\n                }\n            }\n        }\n    }\n\n    // End timer\n    if (r_params.print_level() >= 1)\n        molresponse::end_timer(world, \"Create shift:\");\n\n    // Done\n    return result;\n}\n\nresponse_space ExcitedResponse::apply_shift(World &world, const Tensor<double> &shifts,\n                                            const response_space &V, const response_space &f)\n{\n    // Start timer\n    if (r_params.print_level() >= 1)\n        molresponse::start_timer(world);\n\n    // Sizes inferred from V\n    size_t n = V[0].size();\n    size_t m = V.size();\n\n    // Container to return\n    response_space shifted_V(world, m, n);\n\n    // Run over occupied\n    for (size_t k = 0; k < m; k++)\n    {\n        // Run over virtual\n        for (size_t p = 0; p < n; p++)\n        {\n            shifted_V[k][p] = V[k][p] + shifts(k, p) * f[k][p];\n        }\n    }\n\n    shifted_V.truncate_rf();\n\n    // End timer\n    if (r_params.print_level() >= 1)\n        molresponse::end_timer(world, \"Apply shift:\");\n\n    // Done\n    return shifted_V;\n}\n\nstd::vector<std::vector<std::shared_ptr<real_convolution_3d>>>\nExcitedResponse::create_bsh_operators(World &world, const Tensor<double> &shift,\n                                      const Tensor<double> &ground, const Tensor<double> &omega,\n                                      const double lo, const double thresh) const\n{\n    // Start timer\n    if (r_params.print_level() >= 1)\n        molresponse::start_timer(world);\n\n    // Sizes inferred from ground and omega\n    size_t n = ground.size();\n    size_t m = omega.size();\n\n    // Make the vector\n    std::vector<std::vector<std::shared_ptr<real_convolution_3d>>> operators;\n\n    // Make a BSH operator for each response function\n    // Run over excited components\n    for (size_t k = 0; k < m; k++)\n    {\n        // Container for intermediary\n        std::vector<std::shared_ptr<real_convolution_3d>> temp(n);\n\n        // Run over occupied components\n        for (size_t p = 0; p < n; p++)\n        {\n            double mu = sqrt(-2.0 * (ground(p) + omega(k) + shift(k, p)));\n            print(\"res state \", k, \" orb \", p, \" bsh exponent mu :\", mu);\n            temp[p] = std::shared_ptr<SeparatedConvolution<double, 3>>(\n                BSHOperatorPtr3D(world, mu, lo, thresh));\n        }\n\n        // Add intermediary to return container\n        operators.push_back(temp);\n    }\n\n    // End timer\n    if (r_params.print_level() >= 1)\n        molresponse::end_timer(world, \"Creating BSH ops:\");\n\n    // Done\n    return operators;\n}\n\nvoid ExcitedResponse::excited_to_json(json &j_mol_in, size_t iter, const Tensor<double> &omega)\n{\n    json j = {};\n\n    j[\"iter\"] = iter;\n\n    j[\"omega\"] = tensor_to_json(omega);\n\n    auto index = j_mol_in[\"protocol_data\"].size() - 1;\n    j_mol_in[\"protocol_data\"][index][\"property_data\"].push_back(j);\n}\n\nvoid ExcitedResponse::iterate(World &world)\n{\n    size_t iter;\n    QProjector<double, 3> projector(ground_orbitals);\n    size_t m = r_params.num_states();   // Number of excited states\n    size_t n = r_params.num_orbitals(); // Number of ground state orbitals\n\n    const double conv_den = std::max(100 * FunctionDefaults<3>::get_thresh(), r_params.dconv());\n    const double relative_max_target =\n        std::max(50 * FunctionDefaults<3>::get_thresh(), .5 * r_params.dconv());\n\n    auto thresh = FunctionDefaults<3>::get_thresh();\n    auto max_rotation = .5;\n    if (thresh >= 1e-2)\n    {\n        max_rotation = 2;\n    }\n    else if (thresh >= 1e-4)\n    {\n        max_rotation = .25;\n    }\n    else if (thresh >= 1e-6)\n    {\n        max_rotation = .1;\n    }\n    else if (thresh >= 1e-8)\n    {\n        max_rotation = .05;\n    }\n\n    // m residuals for x and y\n    Tensor<double> bsh_residualsX(m);\n    Tensor<double> density_residuals(m);\n    Tensor<double> bsh_residualsY(m);\n\n    Tensor<double> xij_norms(m, 2 * n);\n    Tensor<double> xij_res_norms(m, 2 * n);\n    // saved response densities\n    vecfuncT rho_omega_old(m);\n    // initialize DFT XC functional operator\n    XCOperator<double, 3> xc = make_xc_operator(world);\n\n    // create X space residuals\n    X_space residuals(world, m, n);\n    X_space old_Chi(world, m, n);\n    X_space old_Lambda_X(world, m, n);\n\n    // vector of Xvectors\n    response_matrix x_vectors;\n    response_matrix x_residuals;\n    x_vectors = to_response_matrix(Chi);\n    x_residuals = to_response_matrix(residuals);\n    // If DFT, initialize the XCOperator<double,3>\n\n    response_solver kain_x_space;\n    for (size_t b = 0; b < m; b++)\n    {\n        kain_x_space.emplace_back(response_matrix_allocator(world, n));\n    }\n    if (r_params.kain())\n    {\n        for (auto &kain_space_b : kain_x_space)\n        {\n            kain_space_b.set_maxsub(static_cast<int>(10));\n        }\n    }\n\n    response_space bsh_x_resp(world, m, n); // Holds wave function corrections\n    response_space bsh_y_resp(world, m, n); // Holds wave function corrections\n\n    Tensor<double> old_energy(m);       // Holds previous iteration's energy\n    Tensor<double> energy_residuals(m); // Holds energy residuals\n    // Holds the norms of y function residuals (for convergence)\n    Tensor<double> x_norms(m);\n    Tensor<double> y_norms(m);\n\n    response_space x_differences(world, m, n);\n    response_space y_differences(world, m, n);\n\n    Tensor<double> x_shifts; // Holds the shifted energy values\n    Tensor<double> y_shifts; // Holds the shifted energy values\n\n    Tensor<double> S;      // Overlap matrix of response components for x states\n    real_function_3d v_xc; // For TDDFT\n    Tensor<double> old_A;\n    Tensor<double> A;\n    Tensor<double> old_S;\n\n    vector_real_function_3d rho_omega = make_density(world, Chi);\n\n    // Create the X space\n    all_done = false; // Converged flag\n    // Now to iterate\n    for (iter = 0; iter < r_params.maxiter(); ++iter)\n    {\n\n        iter_timing.clear();\n        // Start a timer for this iteration\n        // Basic output\n        if (r_params.print_level() >= 1)\n        {\n            molresponse::start_timer(world);\n            if (world.rank() == 0)\n                printf(\"\\n   Iteration %d at time %.1fs\\n\", static_cast<int>(iter), wall_time());\n            if (world.rank() == 0)\n                print(\" -------------------------------\");\n        }\n\n        print(\"Excited State Frequencies \");\n        print(omega);\n\n        // Normalize after projection\n\n        if (iter < 2 || (iter % 10) == 0)\n        {\n            load_balance_chi(world);\n        }\n\n        if (iter > 0)\n        {\n            // Only checking on X components even for full as y are so small\n            if (density_residuals.max() > 2)\n            {\n                break;\n            }\n\n            if (density_residuals.max() > 2)\n            {\n                break;\n            }\n            double d_residual = density_residuals.max();\n            // Test convergence and set to true\n            auto chi_norms = Chi.norm2s();\n            auto rho_norms = norm2s_T(world, rho_omega);\n            auto relative_bsh = copy(bsh_residualsX);\n\n            std::transform(bsh_residualsX.ptr(), bsh_residualsX.ptr() + bsh_residualsX.size(),\n                           chi_norms.ptr(), relative_bsh.ptr(),\n                           [](auto bsh, auto norm_chi)\n                           { return bsh / norm_chi; });\n\n            auto max_bsh = bsh_residualsX.absmax();\n            auto relative_max_bsh = relative_bsh.absmax();\n\n            function_data_to_json(j_molresponse, iter, chi_norms, bsh_residualsX, rho_norms,\n                                  density_residuals);\n\n            excited_to_json(j_molresponse, iter, omega);\n\n            if (r_params.print_level() >= 1)\n            {\n\n                if (world.rank() == 0)\n                {\n                    print(\"thresh: \", FunctionDefaults<3>::get_thresh());\n                    print(\"k: \", FunctionDefaults<3>::get_k());\n                    print(\"Chi Norms at start of iteration: \", iter);\n                    print(\"xij norms\\n: \", xij_norms);\n                    print(\"xij residual norms\\n: \", xij_res_norms);\n                    print(\"Chi_X: \", chi_norms);\n                    print(\"bsh_residuals : \", bsh_residualsX);\n                    print(\"relative_bsh : \", relative_bsh);\n                    print(\"r_params.dconv(): \", r_params.dconv());\n                    print(\"max rotation: \", max_rotation);\n                    print(\"d_residual_max : \", d_residual);\n                    print(\"d_residual_max target : \", conv_den);\n                    print(\"bsh_residual_max : \", max_bsh);\n                    print(\"relative_bsh_residual_max : \", relative_max_bsh);\n                    print(\"relative_bsh_residual_max target : \", relative_max_target);\n                }\n            }\n            if ((d_residual < conv_den) and ((relative_max_bsh < relative_max_target) or\n                                             r_params.get<bool>(\"conv_only_dens\")))\n            {\n                all_done = true;\n            }\n\n            if (all_done || iter == r_params.maxiter() - 1)\n            {\n                // if converged print converged\n                if (world.rank() == 0 && all_done and (r_params.print_level() > 1))\n                {\n                    print(\"\\nConverged!\\n\");\n                }\n\n                if (r_params.save())\n                {\n                    molresponse::start_timer(world);\n                    save(world, r_params.save_file());\n                    if (r_params.print_level() >= 1)\n                        molresponse::end_timer(world, \"Save:\");\n                }\n                // Basic output\n                if (r_params.print_level() >= 1)\n                    molresponse::end_timer(world, \" This iteration:\");\n                // plot orbitals\n                if (r_params.plot_all_orbitals())\n                {\n                    // plotResponseOrbitals(world, iter, Chi.x, Chi.y, r_params, ground_calc);\n                }\n                auto rho0 = make_ground_density(world);\n                //                if (r_params.plot()) {\n                //                    do_vtk_plots(world, 200, r_params.L(), molecule, rho0, rho_omega,\n                //                                 ground_orbitals, Chi);\n                //                }\n                break;\n            }\n        }\n\n        // We first rotate chi by diagonalizing AX=omegaBX\n        // This provides new omegas\n        // We then apply bsh on the rotated vector and compute the residual\n        // The residual is then used to update KAIN\n        // Followed by step restriction\n        // residual is computed as new_chi-old_chi where both have been previously rotated.\n        auto [new_omega, old_chi, new_chi, new_res] =\n            update_response(world, Chi, xc, projector, kain_x_space, x_vectors, x_residuals,\n                            iter, max_rotation, Tensor<double>(), residuals);\n\n        residuals = new_res.residual.copy();\n\n        if (r_params.print_level() >= 1)\n        {\n            molresponse::start_timer(world);\n        }\n        rho_omega_old = make_density(world, old_chi);\n        if (r_params.print_level() >= 1)\n        {\n            molresponse::end_timer(world, \"make_density_old\", \"make_density_old\", iter_timing);\n        }\n        if (r_params.print_level() >= 1)\n        {\n            molresponse::start_timer(world);\n        }\n        rho_omega = make_density(world, new_chi);\n        if (r_params.print_level() >= 1)\n        {\n            molresponse::end_timer(world, \"make_density_new\", \"make_density_new\", iter_timing);\n        }\n\n        if (r_params.print_level() >= 1)\n        {\n            molresponse::start_timer(world);\n        }\n        bsh_residualsX = copy(new_res.residual_norms);\n        bsh_residualsY = copy(new_res.residual_norms);\n        omega = copy(new_omega);\n        Chi = new_chi.copy();\n        if (r_params.print_level() >= 1)\n        {\n            molresponse::end_timer(world, \"copy_response_data\", \"copy_response_data\", iter_timing);\n        }\n\n        xij_res_norms = new_res.residual.component_norm2s();\n        xij_norms = Chi.component_norm2s();\n\n        density_residuals = norm2s_T(world, (rho_omega - rho_omega_old));\n        /*\n        for (size_t i = 0; i < Chi.num_states(); i++) {\n            if (maxrotn[i] < r_params.maxrotn()) {\n                maxrotn[i] = r_params.maxrotn();\n                print(\"less than maxrotn....set to maxrotn\");\n            }\n        }\n         */\n\n        if (world.rank() == 0 and (r_params.print_level() > 2))\n        {\n            print(\"Density residuals\");\n            print(\"dres\", density_residuals);\n            print(\"BSH  residuals\");\n            print(\"xres\", bsh_residualsX);\n            print(\"yres\", bsh_residualsY);\n            print(\"maxrotn\", max_rotation);\n        }\n\n        // Basic output\n        if (r_params.print_level() >= 1)\n        {\n            molresponse::end_timer(world, \"Iteration Timing\", \"iter_total\", iter_timing);\n        }\n        time_data.add_data(iter_timing);\n    }\n\n    if (world.rank() == 0)\n        print(\"\\n\");\n    if (world.rank() == 0)\n        print(\"   Finished Excited State Calculation \");\n    if (world.rank() == 0)\n        print(\"   ------------------------\");\n    if (world.rank() == 0)\n        print(\"\\n\");\n\n    // Did we converge?\n    if (iter == r_params.maxiter() && not all_done)\n    {\n        if (world.rank() == 0)\n            print(\"   Failed to converge. Reason:\");\n        if (world.rank() == 0)\n            print(\"\\n  ***  Ran out of iterations  ***\\n\");\n        if (world.rank() == 0)\n            print(\"    Running analysis on current values.\\n\");\n    }\n\n    /*\n    if (!r_params.tda()) {\n        sort(world, omega, Chi);\n    } else {\n        sort(world, omega, Chi.X);\n    }\n     */\n\n    // Print final things\n    if (world.rank() == 0)\n    {\n        print(\" Final excitation energies:\");\n        print(omega);\n        print(\" Final energy residuals X:\");\n        print(bsh_residualsX);\n        print(\" Final energy residuals y:\");\n        print(bsh_residualsY);\n        print(\" Final density residuals:\");\n        print(density_residuals);\n    }\n\n    /*\n    analysis(world, Chi);\n    print(\"--------------------------------------------------------\");\n    for (size_t i = 0; i < m; i++) {\n        std::string x_state = \"x_\" + std::to_string(i) + \"_\";\n        analyze_vectors(world, Chi.X[i], x_state);\n        print(\"--------------------------------------------------------\");\n    }\n    if (not r_params.tda()) {\n        for (size_t i = 0; i < m; i++) {\n            std::string y_state = \"y_\" + std::to_string(i) + \"_\";\n            analyze_vectors(world, Chi.y[i], y_state);\n            print(\"--------------------------------------------------------\");\n        }\n    }\n     */\n}\n\nauto ExcitedResponse::update_response(World &world, X_space &Chi, XCOperator<double, 3> &xc,\n                                      QProjector<double, 3> &projector,\n                                      response_solver &kain_x_space, response_matrix &Xvector,\n                                      response_matrix &Xresidual, size_t iter,\n                                      const double &maxrotn, const Tensor<double> old_residuals,\n                                      const X_space &xres_old)\n    -> std::tuple<Tensor<double>, X_space, X_space, residuals>\n{\n    size_t m = Chi.num_states();\n    bool compute_y = not r_params.tda();\n\n    Tensor<double> x_shifts(m);\n    Tensor<double> y_shifts(m);\n    print(\"Entering Compute Lambda\");\n\n    /*\n    if (compute_y) {\n        gram_schmidt(world, Chi.X, Chi.y);\n        normalize(world, Chi);\n    } else {\n        gram_schmidt(world, Chi.X);\n        normalize(world, Chi.X);\n    }\n     */\n    //\n    // X_space Lambda_X = compute_lambda_X(world, Chi, xc, r_params.calc_type());\n\n    auto [temp_Lambda_X, temp_V0X, temp_gamma] =\n        compute_response_potentials(world, Chi, xc, r_params.calc_type());\n\n    auto [new_omega, rotated_chi, rotated_lambda, rotated_v_x, rotated_gamma_x] =\n        rotate_excited_space(world, Chi, temp_Lambda_X, temp_V0X, temp_gamma);\n\n    print(\"omega_n before transform\");\n    print(omega);\n    print(\"omega_n after transform\");\n    print(new_omega);\n    // Analysis gets messed up if BSH is last thing applied\n    // so exit early if last iteration\n\n    // X_space theta_X = compute_theta_X(world, rotated_chi, xc, r_params.calc_type());\n    if (r_params.print_level() >= 1)\n    {\n        molresponse::start_timer(world);\n    }\n    X_space rotated_EOX(world, rotated_chi.num_states(), rotated_chi.num_orbitals());\n    if (r_params.localize() != \"canon\")\n    {\n        rotated_EOX = rotated_chi.copy();\n        rotated_EOX.x = rotated_EOX.x * ham_no_diag;\n        if (compute_y)\n        {\n            rotated_EOX.y = rotated_EOX.y * ham_no_diag;\n        }\n        if (r_params.print_level() >= 10)\n        {\n            print(\"<X|(E0-diag(E0)|X>\");\n            print(inner(rotated_chi, rotated_EOX));\n        }\n    }\n    world.gop.fence();\n    if (r_params.print_level() >= 1)\n    {\n        molresponse::end_timer(world, \"E0mDX\", \"E0mDX\", iter_timing);\n    }\n\n    X_space theta_X = X_space(world, rotated_chi.num_states(), rotated_chi.num_orbitals());\n\n    if (r_params.print_level() >= 1)\n    {\n        molresponse::start_timer(world);\n    }\n    theta_X = rotated_v_x - rotated_EOX + rotated_gamma_x;\n    if (r_params.print_level() >= 1)\n    {\n        molresponse::end_timer(world, \"compute_ThetaX_add\", \"compute_ThetaX_add\", iter_timing);\n    }\n    print(\"BSH update iter = \", iter);\n    X_space new_chi = bsh_update_excited(world, new_omega, theta_X, projector);\n    // res = Chi - new_chi;\n    auto [new_res, bsh] = update_residual(world, rotated_chi, new_chi, r_params.calc_type(),\n                                          old_residuals, xres_old);\n    // kain if iteration >0 or first run where there should not be a problem\n    // computed new_chi and res\n    if (r_params.kain() && (iter > 0) && true)\n    {\n        new_chi = kain_x_space_update(world, rotated_chi, new_res, kain_x_space);\n    }\n    if (false)\n    {\n        x_space_step_restriction(world, rotated_chi, new_chi, compute_y, maxrotn);\n    }\n\n    if (compute_y)\n        normalize(world, new_chi);\n    else\n        normalize(world, new_chi.x);\n\n    new_chi.x.truncate_rf();\n    if (compute_y)\n        new_chi.y.truncate_rf();\n\n    return {new_omega, rotated_chi, new_chi, {new_res, bsh}};\n}\n\nauto ExcitedResponse::bsh_update_excited(World &world, const Tensor<double> &omega,\n                                         X_space &theta_X, QProjector<double, 3> &projector)\n    -> X_space\n{\n    size_t m = theta_X.num_states();\n    size_t n = theta_X.num_orbitals();\n    bool compute_y = !r_params.tda();\n    Tensor<double> x_shifts(m);\n    Tensor<double> y_shifts(m);\n    print(\"omega before shifts\");\n    Tensor<double> omega_plus = omega;\n    print(omega);\n    x_shifts = create_shift(world, ground_energies, omega_plus, \"x\");\n    // Compute Theta X\n    // Apply the shifts\n    theta_X.x = apply_shift(world, x_shifts, theta_X.x, Chi.x);\n    theta_X.x = theta_X.x * -2;\n    theta_X.x.truncate_rf();\n\n    if (compute_y)\n    {\n        //   theta_X.y = apply_shift(world, y_shifts, theta_X.y, Chi.y);\n        theta_X.y = theta_X.y * -2;\n        theta_X.y.truncate_rf();\n    }\n    // Construct BSH operators\n    std::vector<std::vector<std::shared_ptr<real_convolution_3d>>> bsh_x_ops =\n        create_bsh_operators(world, x_shifts, ground_energies, omega_plus, r_params.lo(),\n                             FunctionDefaults<3>::get_thresh());\n\n    std::vector<std::vector<std::shared_ptr<real_convolution_3d>>> bsh_y_ops;\n    if (compute_y)\n    {\n        Tensor<double> omega_minus = -omega;\n        bsh_y_ops = create_bsh_operators(world, y_shifts, ground_energies, omega_minus,\n                                         r_params.lo(), FunctionDefaults<3>::get_thresh());\n    }\n    X_space bsh_X(world, m, n);\n    // Apply BSH and get updated response components\n    bsh_X.x = apply(world, bsh_x_ops, theta_X.x);\n    if (compute_y)\n        bsh_X.y = apply(world, bsh_y_ops, theta_X.y);\n\n    // Project out ground state\n    for (size_t i = 0; i < m; i++)\n        bsh_X.x[i] = projector(bsh_X.x[i]);\n    if (compute_y)\n    {\n        for (size_t i = 0; i < m; i++)\n            bsh_X.y[i] = projector(bsh_X.y[i]);\n    }\n\n    // Only update non-converged components\n    /*\n    for (size_t i = 0; i < m; i++) {\n        bsh_X.X[i] = bsh_X.X[i];\n        bsh_X.X[i] = mask * bsh_X.X[i];\n        if (compute_y) {\n            bsh_X.y[i] = bsh_X.y[i];\n            bsh_X.y[i] = mask * bsh_X.y[i];\n        }\n    }\n     */\n\n    if (compute_y)\n        normalize(world, bsh_X);\n    else\n    {\n        normalize(world, bsh_X.x);\n    }\n    // Ensure orthogonal rguesses\n\n    // bsh_X.truncate();\n\n    return bsh_X;\n}\n\nvoid ExcitedResponse::analysis(World &world, const X_space &chi)\n{\n    // Sizes get used a lot here, so lets get a local copy\n    size_t n = chi.x[0].size();\n    size_t m = chi.x.size();\n\n    // Per response function, want to print the contributions from each\n    // ground state So print the norm of each function?\n    Tensor<double> x_norms(m, n);\n    Tensor<double> y_norms(m, n);\n\n    // Calculate the inner products\n    for (long i = 0; i < m; i++)\n    {\n        for (long j = 0; j < n; j++)\n        {\n            x_norms(i, j) = chi.x[i][j].norm2();\n\n            if (not r_params.tda())\n                y_norms(i, j) = chi.y[i][j].norm2();\n        }\n    }\n\n    // 'sort' these inner products within in each row\n    Tensor<double> cpy = copy(x_norms);\n    Tensor<int> x_order(m, n);\n    Tensor<int> y_order(m, n);\n    for (long i = 0; i < m; i++)\n    {\n        for (long j = 0; j < n; j++)\n        {\n            double x = cpy(i, _).max();\n            size_t z = 0;\n            while (x != cpy(i, z))\n                z++;\n            cpy(i, z) = -100.0;\n            x_order(i, j) = z;\n\n            // Also sort y if full response\n            if (not r_params.tda())\n            {\n                y_order(i, j) = z;\n            }\n        }\n    }\n\n    // Need these to calculate dipole/quadrapole\n    real_function_3d x = real_factory_3d(world).functor(\n        real_functor_3d(new MomentFunctor(std::vector<int>{1, 0, 0})));\n    real_function_3d y = real_factory_3d(world).functor(\n        real_functor_3d(new MomentFunctor(std::vector<int>{0, 1, 0})));\n    real_function_3d z = real_factory_3d(world).functor(\n        real_functor_3d(new MomentFunctor(std::vector<int>{0, 0, 1})));\n\n    // Calculate transition dipole moments for each response function\n    Tensor<double> dipoles(m, 3);\n\n    // Run over each excited state\n    for (size_t i = 0; i < m; i++)\n    {\n        // Add in contribution from each ground state\n        for (size_t j = 0; j < n; j++)\n        {\n            dipoles(i, 0) += inner(ground_orbitals[j], x * chi.x[i][j]);\n            dipoles(i, 1) += inner(ground_orbitals[j], y * chi.x[i][j]);\n            dipoles(i, 2) += inner(ground_orbitals[j], z * chi.x[i][j]);\n\n            if (not r_params.tda())\n            {\n                dipoles(i, 0) += inner(ground_orbitals[j], x * chi.y[i][j]);\n                dipoles(i, 1) += inner(ground_orbitals[j], y * chi.y[i][j]);\n                dipoles(i, 2) += inner(ground_orbitals[j], z * chi.y[i][j]);\n            }\n        }\n\n        // Normalization (negative?)\n        dipoles(i, 0) *= -sqrt(2.0);\n        dipoles(i, 1) *= -sqrt(2.0);\n        dipoles(i, 2) *= -sqrt(2.0);\n    }\n\n    // Calculate oscillator strength\n    Tensor<double> oscillator(m);\n    for (size_t i = 0; i < m; i++)\n    {\n        oscillator(i) = 2.0 / 3.0 *\n                        (dipoles(i, 0) * dipoles(i, 0) + dipoles(i, 1) * dipoles(i, 1) +\n                         dipoles(i, 2) * dipoles(i, 2)) *\n                        omega(i);\n    }\n\n    // Calculate transition quadrapole moments\n    Tensor<double> quadrupoles(m, 3, 3);\n\n    // Run over each excited state\n    for (long i = 0; i < m; i++)\n    {\n        // Add in contribution from each ground state\n        for (long j = 0; j < n; j++)\n        {\n            quadrupoles(i, 0, 0) += inner(ground_orbitals[j], x * x * chi.x[i][j]);\n            quadrupoles(i, 0, 1) += inner(ground_orbitals[j], x * y * chi.x[i][j]);\n            quadrupoles(i, 0, 2) += inner(ground_orbitals[j], x * z * chi.x[i][j]);\n            quadrupoles(i, 1, 0) += inner(ground_orbitals[j], y * x * chi.x[i][j]);\n            quadrupoles(i, 1, 1) += inner(ground_orbitals[j], y * y * chi.x[i][j]);\n            quadrupoles(i, 1, 2) += inner(ground_orbitals[j], y * z * chi.x[i][j]);\n            quadrupoles(i, 2, 0) += inner(ground_orbitals[j], z * x * chi.x[i][j]);\n            quadrupoles(i, 2, 1) += inner(ground_orbitals[j], z * y * chi.x[i][j]);\n            quadrupoles(i, 2, 2) += inner(ground_orbitals[j], z * z * chi.x[i][j]);\n\n            if (not r_params.tda())\n            {\n                quadrupoles(i, 0, 0) += inner(ground_orbitals[j], x * x * chi.y[i][j]);\n                quadrupoles(i, 0, 1) += inner(ground_orbitals[j], x * y * chi.y[i][j]);\n                quadrupoles(i, 0, 2) += inner(ground_orbitals[j], x * z * chi.y[i][j]);\n                quadrupoles(i, 1, 0) += inner(ground_orbitals[j], y * x * chi.y[i][j]);\n                quadrupoles(i, 1, 1) += inner(ground_orbitals[j], y * y * chi.y[i][j]);\n                quadrupoles(i, 1, 2) += inner(ground_orbitals[j], y * z * chi.y[i][j]);\n                quadrupoles(i, 2, 0) += inner(ground_orbitals[j], z * x * chi.y[i][j]);\n                quadrupoles(i, 2, 1) += inner(ground_orbitals[j], z * y * chi.y[i][j]);\n                quadrupoles(i, 2, 2) += inner(ground_orbitals[j], z * z * chi.y[i][j]);\n            }\n        }\n        // Normalization\n        quadrupoles(i, 0, 0) *= sqrt(2.0);\n        quadrupoles(i, 0, 1) *= sqrt(2.0);\n        quadrupoles(i, 0, 2) *= sqrt(2.0);\n        quadrupoles(i, 1, 0) *= sqrt(2.0);\n        quadrupoles(i, 1, 1) *= sqrt(2.0);\n        quadrupoles(i, 1, 2) *= sqrt(2.0);\n        quadrupoles(i, 2, 0) *= sqrt(2.0);\n        quadrupoles(i, 2, 1) *= sqrt(2.0);\n        quadrupoles(i, 2, 2) *= sqrt(2.0);\n    }\n\n    // Now print?\n    if (world.rank() == 0)\n    {\n        for (long i = 0; i < m; i++)\n        {\n            printf(\"   Response Function %d\\t\\t%7.8f a.u.\", static_cast<int>(i), omega(i));\n            print(\"\\n   --------------------------------------------\");\n            printf(\"   Response Function %d\\t\\t%7.8f eV\", static_cast<int>(i), omega(i) * 27.2114);\n            print(\"\\n   --------------------------------------------\");\n\n            print(\"\\n   Transition Dipole Moments\");\n            printf(\"   X: %7.8f   y: %7.8f   Z: %7.8f\\n\", dipoles(i, 0), dipoles(i, 1),\n                   dipoles(i, 2));\n\n            printf(\"\\n   Dipole Oscillator Strength: %7.8f\\n\", oscillator(i));\n\n            print(\"\\n   Transition Quadrupole Moments\");\n            printf(\"   %16s %16s %16s\\n\", \"X\", \"y\", \"Z\");\n            printf(\"   X %16.8f %16.8f %16.8f\\n\", quadrupoles(i, 0, 0), quadrupoles(i, 0, 1),\n                   quadrupoles(i, 0, 2));\n            printf(\"   y %16.8f %16.8f %16.8f\\n\", quadrupoles(i, 1, 0), quadrupoles(i, 1, 1),\n                   quadrupoles(i, 1, 2));\n            printf(\"   Z %16.8f %16.8f %16.8f\\n\", quadrupoles(i, 2, 0), quadrupoles(i, 2, 1),\n                   quadrupoles(i, 2, 2));\n\n            // Print contributions\n            // Only print the top 5?\n            if (r_params.tda())\n            {\n                print(\"\\n   Dominant Contributions:\");\n                for (long j = 0; j < std::min(size_t(5), n); j++)\n                {\n                    printf(\"   Occupied %d   %7.8f\\n\", x_order(i, j), x_norms(i, x_order(i, j)));\n                }\n\n                print(\"\\n\");\n            }\n            else\n            {\n                print(\"\\n   Dominant Contributions:\");\n                print(\"                  x          y\");\n                for (long j = 0; j < std::min(size_t(5), n); j++)\n                {\n                    printf(\"   Occupied %d   %7.8f %7.8f\\n\", x_order(i, j),\n                           x_norms(i, x_order(i, j)), y_norms(i, y_order(i, j)));\n                }\n\n                print(\"\\n\");\n            }\n        }\n    }\n}\n// Save the current response calculation\n\nvoid ExcitedResponse::save(World &world, const std::string &name)\n{\n\n    // Archive to write everything to\n    archive::ParallelOutputArchive ar(world, name.c_str(), 1);\n    // Just going to enforce 1 io server\n\n    // Saving, in this order;\n    //  string           ground-state archive name (garch_name)\n    //  bool             TDA flag\n    // size_t                number of ground state orbitals (n)\n    // size_t                number of excited state orbitals (m)\n    //  Tensor<double>   energies of m x-components\n    //  for i from 0 to m-1\n    //     for j from 0 to n-1\n    //        Function<double,3> x_response[i][j]\n    //  (If TDA flag == True)\n    //  (Tensor<double>  energies of m y-components    )\n    //  (for i from 0 to m-1                       )\n    //  (   for j from 0 to n-1                    )\n    //  (      Function<double,3> y_response[i][j] )\n    ar & r_params.archive();\n    ar & r_params.tda();\n    ar & r_params.num_orbitals();\n    ar & r_params.num_states();\n    ar & omega;\n\n    for (size_t i = 0; i < r_params.num_states(); i++)\n        for (size_t j = 0; j < r_params.num_orbitals(); j++)\n            ar & Chi.x[i][j];\n    if (not r_params.tda())\n    {\n        for (size_t i = 0; i < r_params.num_states(); i++)\n            for (size_t j = 0; j < r_params.num_orbitals(); j++)\n                ar & Chi.y[i][j];\n    }\n}\n\n// Load a response calculation\nvoid ExcitedResponse::load(World &world, const std::string &name)\n{\n    // The archive to read from\n    archive::ParallelInputArchive ar(world, name.c_str());\n\n    // Reading in, in this order;\n    //  string           ground-state archive name (garch_name)\n    //  bool             TDA flag\n    // size_t                number of ground state orbitals (n)\n    // size_t                number of excited state orbitals (m)\n    //  Tensor<double>   energies of m x-components\n    //  for i from 0 to m-1\n    //     for j from 0 to n-1\n    //        Function<double,3> x_response[i][j]\n    //  (If TDA flag == True)\n    //  (Tensor<double>  energies of m y-components    )\n    //  (for i from 0 to m-1                       )\n    //  (   for j from 0 to n-1                    )\n    //  (      Function<double,3> y_response[i][j] )\n\n    ar & r_params.archive();\n    ar & r_params.tda();\n    ar & r_params.num_orbitals();\n    ar & r_params.num_states();\n    ar & omega;\n\n    Chi = X_space(world, r_params.num_states(), r_params.num_orbitals());\n\n    for (size_t i = 0; i < r_params.num_states(); i++)\n        for (size_t j = 0; j < r_params.num_orbitals(); j++)\n            ar & Chi.x[i][j];\n    world.gop.fence();\n\n    if (not r_params.tda())\n    {\n        for (size_t i = 0; i < r_params.num_states(); i++)\n            for (size_t j = 0; j < r_params.num_orbitals(); j++)\n                ar & Chi.y[i][j];\n        world.gop.fence();\n    }\n}\n\n/**\n * Create Virtual Space Excited State Guess from atomic orbitals\n * @param world\n * @return\n */\nX_space ExcitedResponse::create_virtual_ao_guess(World &world) const\n{\n\n    auto phi_0 = copy(world, ground_orbitals);\n    auto ao_basis_set = AtomicBasisSet{\"aug-cc-pvdz\"};\n    if (world.rank() == 0)\n    {\n        ao_basis_set.print(molecule);\n    }\n\n    vecfuncT ao_vec = vecfuncT(ao_basis_set.nbf(molecule));\n\n    for (int i = 0; i < ao_basis_set.nbf(molecule); ++i)\n    {\n        functorT aofunc(new madchem::AtomicBasisFunctor(\n            ao_basis_set.get_atomic_basis_function(molecule, i)));\n        ao_vec[i] = factoryT(world).functor(aofunc);\n    }\n    world.gop.fence();\n\n    QProjector<double, 3> projector(phi_0);\n\n    // project ground_state from each atomic orbital basis\n    std::transform(ao_vec.begin(), ao_vec.end(), ao_vec.begin(),\n                   [&](auto &f)\n                   { return projector(f); });\n    auto overlap_S = matrix_inner(world, ao_vec, ao_vec);\n    Tensor<double> U, sigma, VT;\n    // S=U*sigma*VT\n    svd(overlap_S, U, sigma, VT);\n\n    auto first_small = std::find_if(sigma.ptr(), sigma.ptr() + sigma.size(),\n                                    [](auto num)\n                                    { return num < .05; });\n\n    auto idx_small = std::distance(sigma.ptr(), first_small);\n    auto xao = transform(world, ao_vec, U);\n    xao.erase(xao.begin() + idx_small, xao.end());\n    // remove small singular vectors here\n\n    auto overlap_SU = matrix_inner(world, xao, xao);\n\n    // copy pao to xao response space vector\n\n    auto xc = make_xc_operator(world);\n    // now compute the fock potential\n    // kinetic energy\n    auto F = [&](vector_real_function_3d x)\n    {\n        size_t num_orbs = x.size();\n        real_derivative_3d Dx(world, 0);\n        real_derivative_3d Dy(world, 1);\n        real_derivative_3d Dz(world, 2);\n        vector_real_function_3d dvx = apply(world, Dx, x);\n        vector_real_function_3d dvy = apply(world, Dy, x);\n        vector_real_function_3d dvz = apply(world, Dz, x);\n        // Apply again for 2nd derivatives\n        vector_real_function_3d dvx2 = apply(world, Dx, dvx);\n        vector_real_function_3d dvy2 = apply(world, Dy, dvy);\n        vector_real_function_3d dvz2 = apply(world, Dz, dvz);\n\n        auto T = (dvx2 + dvy2 + dvz2) * (-0.5);\n        real_function_3d v_nuc, v_j0, v_k0, v_xc;\n        v_nuc = copy(potential_manager->vnuclear());\n        v_nuc.truncate();\n        auto N_elec = phi_0.size();\n        v_nuc.scale((N_elec + 0.25) / N_elec);\n        // J^0 x^alpha\n        v_j0 = apply(*shared_coulomb_operator, ground_density);\n        v_j0.scale(2.0);\n\n        if (xcf.hf_exchange_coefficient() != 1.0)\n        {\n            v_xc = xc.make_xc_potential();\n        }\n        else\n        {\n            // make a zero function\n            v_xc = Function<double, 3>(\n                FunctionFactory<double, 3>(world).fence(false).initial_level(1));\n        }\n\n        auto hf_exchange_X = zero_functions<double, 3>(world, num_orbs);\n        // hf exchange\n        std::transform(x.begin(), x.end(), hf_exchange_X.begin(), [&](auto &xi)\n                       {\n            auto f = Function<double, 3>(FunctionFactory<double, 3>(world));\n            std::accumulate(phi_0.begin(), phi_0.end(), f, [&](auto phi0, auto total) {\n                auto sum = apply(*shared_coulomb_operator, xi * phi0) * phi0;\n                return total + sum;\n            });\n            return f; });\n        vector_real_function_3d V0 = zero_functions<double, 3>(world, num_orbs);\n        real_function_3d v0 = v_j0 + v_nuc + v_xc;\n        V0 = v0 * x;\n        V0 += (-1 * hf_exchange_X * xcf.hf_exchange_coefficient());\n\n        return T + V0;\n    };\n\n    auto phi_a = copy(world, xao);\n    Tensor<double> e_a;\n    for (int i = 0; i < 1; i++)\n    {\n        auto Fx = F(phi_a);\n        auto xFx = matrix_inner(world, phi_a, Fx);\n        auto [e, C] = syev(xFx);\n        print(\"eigs  : \\n\", e);\n        phi_a = transform(world, phi_a, C);\n        projector(phi_a);\n        e_a = e;\n    }\n\n    auto e_homo = ground_energies[phi_0.size() - 1];\n\n    if (world.rank() == 0)\n    {\n        print(\"ground_orb energies  : \\n\", ground_energies);\n        print(\"homo energy  : \\n\", e_homo);\n        print(\"virtual orbital energies  : \\n\", e_a);\n    }\n\n    e_a = e_a.flat();\n    auto is_positive = [&](auto num)\n    { return num > e_homo; };\n    // This seems dumb but i'm removing the negative vectors\n    auto first_positive = std::find_if(e_a.ptr(), e_a.ptr() + e_a.size(), is_positive);\n    auto num_negative = std::distance(e_a.ptr(), first_positive);\n    auto virtual_phi = vector_real_function_3d(phi_a.size() - num_negative);\n    Tensor<double> virtual_e(e_a.size() - num_negative);\n\n    std::copy(first_positive, e_a.ptr() + e_a.size(), virtual_e.ptr());\n    std::copy(phi_a.begin() + num_negative, phi_a.end(), virtual_phi.begin());\n\n    phi_a = virtual_phi;\n    e_a = virtual_e;\n\n    auto t = phi_a.size() * r_params.num_orbitals();\n    auto no = r_params.num_orbitals();\n\n    X_space x_guess(world, t, no);\n\n    int k = 0;\n    // for each orbital\n    // for each ground orbital j\n    // add the virtual orbital in location j\n    // therefore there should be a total of num_virt*num_ground_orbitals\n    std::for_each(phi_a.begin(), phi_a.end(), [&](const auto virt)\n                  {\n        for (int j = 0; j < no; j++) { x_guess.x[k++][j] = copy(virt); } });\n    world.gop.fence();\n    return x_guess;\n}\n\n/**\n * Create Virtual Space Excited State Guess from atomic orbitals\n * @param world\n * @return\n */\nX_space ExcitedResponse::create_response_guess(World &world) const\n{\n\n    print(\"thresh : \", FunctionDefaults<3>::get_thresh());\n    print(\"k : \", FunctionDefaults<3>::get_k());\n    auto phi_0 = copy(world, ground_orbitals);\n    print(\"Ground Orbital norms: \", norm2s_T(world, phi_0));\n    auto ao_basis_set = AtomicBasisSet{\"6-31g\"};\n    ao_basis_set.print(molecule);\n\n    vecfuncT ao_vec = vecfuncT(ao_basis_set.nbf(molecule));\n\n    for (int i = 0; i < ao_basis_set.nbf(molecule); ++i)\n    {\n        functorT aofunc(new madchem::AtomicBasisFunctor(\n            ao_basis_set.get_atomic_basis_function(molecule, i)));\n        ao_vec[i] = factoryT(world).functor(aofunc);\n    }\n    world.gop.fence();\n    print(\"number of ao_basis_functions: \", ao_vec.size());\n\n    madness::print(\"norm of ao basis functions: \", norm2s_T(world, ao_vec));\n\n    QProjector<double, 3> projector(phi_0);\n\n    // project ground_state from each atomic orbital basis\n    std::transform(ao_vec.begin(), ao_vec.end(), ao_vec.begin(),\n                   [&](auto &f)\n                   { return projector(f); });\n    print(\"overlap between phi0: \", matrix_inner(world, phi_0, ao_vec));\n    madness::print(\"norm of ao basis after projection: \", norm2s_T(world, ao_vec));\n    print(\"number of ao_basis_functions: \", ao_vec.size());\n    auto overlap_S = matrix_inner(world, ao_vec, ao_vec);\n    print(\"Overlap S : \\n\", overlap_S);\n    Tensor<double> U, sigma, VT;\n    // S=U*sigma*VT\n    svd(overlap_S, U, sigma, VT);\n    print(\"singular values of overlap: \\n\", sigma);\n    print(\"left singular vectors of overlap:\\n\", U);\n    print(\"right singular vectors of overlap:\\n\", VT);\n    auto xao = transform(world, ao_vec, U);\n    auto overlap_SU = matrix_inner(world, xao, xao);\n    print(\"Overlap S after transform : \\n\", overlap_SU);\n\n    // copy pao to xao response space vector\n\n    auto xc = make_xc_operator(world);\n    // now compute the fock potential\n    // kinetic energy\n    auto F = [&](vector_real_function_3d x)\n    {\n        size_t num_orbs = x.size();\n        real_derivative_3d Dx(world, 0);\n        real_derivative_3d Dy(world, 1);\n        real_derivative_3d Dz(world, 2);\n        vector_real_function_3d dvx = apply(world, Dx, x);\n        vector_real_function_3d dvy = apply(world, Dy, x);\n        vector_real_function_3d dvz = apply(world, Dz, x);\n        // Apply again for 2nd derivatives\n        vector_real_function_3d dvx2 = apply(world, Dx, dvx);\n        vector_real_function_3d dvy2 = apply(world, Dy, dvy);\n        vector_real_function_3d dvz2 = apply(world, Dz, dvz);\n\n        auto T = (dvx2 + dvy2 + dvz2) * (-0.5);\n        real_function_3d v_nuc, v_j0, v_k0, v_xc;\n        v_nuc = potential_manager->vnuclear();\n        v_nuc.truncate();\n        // J^0 x^alpha\n        v_j0 = apply(*shared_coulomb_operator, ground_density);\n        v_j0.scale(2.0);\n\n        if (xcf.hf_exchange_coefficient() != 1.0)\n        {\n            v_xc = xc.make_xc_potential();\n        }\n        else\n        {\n            // make a zero function\n            v_xc = Function<double, 3>(\n                FunctionFactory<double, 3>(world).fence(false).initial_level(1));\n        }\n\n        auto hf_exchange_X = zero_functions<double, 3>(world, num_orbs);\n        // hf exchange\n        std::transform(x.begin(), x.end(), hf_exchange_X.begin(), [&](auto &xi)\n                       {\n            auto f = Function<double, 3>(FunctionFactory<double, 3>(world));\n            std::accumulate(phi_0.begin(), phi_0.end(), f, [&](auto phi0, auto total) {\n                auto sum = apply(*shared_coulomb_operator, xi * phi0) * phi0;\n                return total + sum;\n            });\n            return f; });\n        vector_real_function_3d V0 = zero_functions<double, 3>(world, num_orbs);\n        real_function_3d v0 = v_j0 + v_nuc + v_xc;\n        V0 = v0 * x;\n        V0 += (-1 * hf_exchange_X * xcf.hf_exchange_coefficient());\n\n        return T + V0;\n    };\n\n    auto phi_a = copy(world, xao);\n    Tensor<double> e_a;\n    for (int i = 0; i < 1; i++)\n    {\n        auto Fx = F(phi_a);\n        auto xFx = matrix_inner(world, phi_a, Fx);\n        auto [e, C] = syev(xFx);\n        print(\"eigs  : \\n\", e);\n        phi_a = transform(world, phi_a, C);\n        projector(phi_a);\n        e_a = e;\n    }\n\n    print(\"ground_orb energies  : \\n\", ground_energies);\n    print(\"virtual orbital energies  : \\n\", e_a);\n    print(\"norm of virtual \", norm2s_T(world, phi_a));\n    e_a = e_a.flat();\n    auto homo_e = ground_energies[phi_0.size() - 1];\n    print(\"homo_e  :\", homo_e);\n    auto is_positive = [&](auto num)\n    { return num > homo_e; };\n    // This seems dumb but i'm removing the negative vectors\n    auto first_positive = std::find_if(e_a.ptr(), e_a.ptr() + e_a.size(), is_positive);\n    auto num_negative = std::distance(e_a.ptr(), first_positive);\n    print(\"num_negative :\", num_negative);\n    auto virtual_phi = vector_real_function_3d(phi_a.size() - num_negative);\n    Tensor<double> virtual_e(e_a.size() - num_negative);\n    std::copy(first_positive, e_a.ptr() + e_a.size(), virtual_e.ptr());\n    std::copy(phi_a.begin() + num_negative, phi_a.end(), virtual_phi.begin());\n    phi_a = virtual_phi;\n    e_a = virtual_e;\n    auto SOA = matrix_inner(world, phi_0, phi_a);\n    print(\"Do I remove the vectors that are not completely 0 I hope it's zero\\n\", SOA);\n    print(\"Sanity CHECK I hope it's diagonal\\n\", matrix_inner(world, phi_a, F(phi_a)));\n    // create a vector of pairs\n    std::vector<std::pair<int, int>> ia_indicies;\n    print(\"forming response space pairs\");\n    print(\"( i , a )\");\n    for (int i = 0; i < phi_0.size(); i++)\n    {\n        for (int a = 0; a < phi_a.size(); a++)\n        {\n            ia_indicies.emplace_back(std::pair<int, int>{i, a});\n        }\n    }\n    int kk = 0;\n    Tensor<double> A(ia_indicies.size(), ia_indicies.size());\n    for (const auto ia : ia_indicies)\n    {\n        std::cout << \"( \" << ia.first << \" , \" << ia.second << \" )\" << std::endl;\n        A(kk, kk) = (e_a[ia.second] - ground_energies[ia.first]);\n        kk++;\n    }\n    print(\"( ij , ab )\");\n    int ii = 0;\n    int jj = 0;\n    // create pairs ia, ii,ab\n    auto two_int = [&](World &world, const vector_real_function_3d &phi0,\n                       const vector_real_function_3d &phia)\n    {\n        // The easy case make n*m matrix\n        auto tol = FunctionDefaults<3>::get_thresh();\n        reconstruct(world, phi0);\n        reconstruct(world, phia);\n\n        vector_real_function_3d pairs_ij;\n        vector_real_function_3d pairs_ia;\n        vector_real_function_3d pairs_ab;\n\n        for (auto &phi_ii : phi0)\n        {\n            for (auto &phi_aa : phia)\n            {\n                pairs_ia.push_back(mul_sparse(phi_ii, phi_aa, tol, false));\n            }\n        }\n        world.gop.fence();\n        truncate(world, pairs_ia);\n        vecfuncT Vpairs_ia = apply(world, *shared_coulomb_operator, pairs_ia);\n        auto A_ia_jb = matrix_inner(world, pairs_ia, Vpairs_ia);\n        for (auto &phi_ii : phi0)\n        {\n            for (auto &phi_jj : phi0)\n            {\n                pairs_ij.push_back(mul_sparse(phi_ii, phi_ii, tol, false));\n            }\n        }\n        for (auto &phi_aa : phia)\n        {\n            for (auto &phi_bb : phia)\n            {\n                pairs_ab.push_back(mul_sparse(phi_aa, phi_aa, tol, false));\n            }\n        }\n        world.gop.fence();\n        truncate(world, pairs_ij);\n        truncate(world, pairs_ab);\n        vecfuncT Vpairs_ij = apply(world, *shared_coulomb_operator, pairs_ab);\n        auto A_ij_ab = matrix_inner(world, pairs_ia, Vpairs_ij);\n        // reshape A_ij_ab  n^2 x m^2\n        auto a_len = phi_a.size() * phi_0.size();\n        Tensor<double> A(a_len, a_len);\n        print(A);\n        int kk = 0;\n        //[i,j]= will have a phia by phia block.  each row gets rearranged into ij\n        for (int ii = 0; ii < phi0.size(); ii++)\n        {\n            for (int jj = 0; jj < phi0.size(); jj++)\n            {\n                auto ii_ab = A_ij_ab(kk++, _);\n                print(ii_ab);\n                auto b_i = ii * phia.size();\n                auto b_ip1 = (ii * phia.size() + phia.size()) - 1;\n                auto b_j = jj * phia.size();\n                auto b_jp1 = (jj * phia.size() + phia.size()) - 1;\n                print(\"( \", b_i, \" , \", b_ip1, \" ) \");\n                print(\"( \", b_j, \" , \", b_jp1, \" ) \");\n                print(Slice(b_i, b_ip1));\n                // ii_ab = ii_ab.reshape(phi_a.size(), phi_a.size());\n                A(Slice(b_i, b_ip1, 1), Slice(b_j, b_jp1, 1)) =\n                    ii_ab.reshape(phi_a.size(), phi_a.size());\n                // ii_ab = ii_ab.reshape(phi_a.size(), phi_a.size());\n                //  I think there is a bug in tensor where reshape doesn't automatically change dim\n                //\n                print(\"after add\\n\", A);\n            }\n        }\n        return A_ia_jb - A;\n    };\n    auto Atwo = two_int(world, phi_0, phi_a);\n    A = A + Atwo;\n    print(A);\n    auto [omega, X] = syev(A);\n\n    print(omega);\n    print(X);\n\n    auto t = xao.size() * r_params.num_orbitals();\n    auto no = r_params.num_orbitals();\n\n    X_space x_guess(world, t, no);\n\n    for (int i = 0; i < t; i++)\n    {\n        auto xt = copy(X(_, i));\n        auto mt = xt.reshape(xao.size(), no);\n        x_guess.x[i] = transform(world, phi_a, mt);\n        // new size is xt column size\n    }\n    return x_guess;\n}\n\nX_space ExcitedTester::test_ao_guess(World &world, ExcitedResponse &calc)\n{\n\n    print(\"thresh : \", FunctionDefaults<3>::get_thresh());\n    print(\"k : \", FunctionDefaults<3>::get_k());\n\n    auto phi_0 = copy(world, calc.ground_orbitals);\n    print(\"Ground Orbital norms: \", norm2s_T(world, phi_0));\n    auto ao_basis_set = AtomicBasisSet{\"6-31g\"};\n    auto molecule = calc.molecule;\n    ao_basis_set.print(molecule);\n\n    vecfuncT ao_vec = vecfuncT(ao_basis_set.nbf(molecule));\n\n    for (int i = 0; i < ao_basis_set.nbf(molecule); ++i)\n    {\n        functorT aofunc(new madchem::AtomicBasisFunctor(\n            ao_basis_set.get_atomic_basis_function(calc.molecule, i)));\n        ao_vec[i] = factoryT(world).functor(aofunc);\n    }\n    world.gop.fence();\n    print(\"number of ao_basis_functions: \", ao_vec.size());\n\n    madness::print(\"norm of ao basis functions: \", norm2s_T(world, ao_vec));\n\n    QProjector<double, 3> projector(phi_0);\n\n    // project ground_state from each atomic orbital basis\n    std::transform(ao_vec.begin(), ao_vec.end(), ao_vec.begin(),\n                   [&](auto &f)\n                   { return projector(f); });\n\n    print(\"overlap between phi0: \", matrix_inner(world, phi_0, ao_vec));\n    madness::print(\"norm of ao basis after projection: \", norm2s_T(world, ao_vec));\n    print(\"number of ao_basis_functions: \", ao_vec.size());\n\n    auto overlap_S = matrix_inner(world, ao_vec, ao_vec);\n    print(\"Overlap S : \\n\", overlap_S);\n\n    Tensor<double> U, sigma, VT;\n    // S=U*sigma*VT\n    svd(overlap_S, U, sigma, VT);\n\n    print(\"singular values of overlap: \\n\", sigma);\n    print(\"left singular vectors of overlap:\\n\", U);\n    print(\"right singular vectors of overlap:\\n\", VT);\n    auto xao = transform(world, ao_vec, U);\n    auto overlap_SU = matrix_inner(world, xao, xao);\n    print(\"Overlap S after transform : \\n\", overlap_SU);\n\n    // copy pao to xao response space vector\n\n    auto xc = calc.make_xc_operator(world);\n    // now compute the fock potential\n\n    // kinetic energy\n    auto F = [&](vector_real_function_3d x)\n    {\n        size_t num_orbs = x.size();\n\n        real_derivative_3d Dx(world, 0);\n        real_derivative_3d Dy(world, 1);\n        real_derivative_3d Dz(world, 2);\n\n        vector_real_function_3d dvx = apply(world, Dx, x);\n        vector_real_function_3d dvy = apply(world, Dy, x);\n        vector_real_function_3d dvz = apply(world, Dz, x);\n        // Apply again for 2nd derivatives\n        vector_real_function_3d dvx2 = apply(world, Dx, dvx);\n        vector_real_function_3d dvy2 = apply(world, Dy, dvy);\n        vector_real_function_3d dvz2 = apply(world, Dz, dvz);\n\n        auto T = (dvx2 + dvy2 + dvz2) * (-0.5);\n        real_function_3d v_nuc, v_j0, v_k0, v_xc;\n        v_nuc = calc.potential_manager->vnuclear();\n        v_nuc.truncate();\n        // J^0 x^alpha\n        v_j0 = apply(*calc.shared_coulomb_operator, calc.ground_density);\n        v_j0.scale(2.0);\n\n        if (calc.xcf.hf_exchange_coefficient() != 1.0)\n        {\n            v_xc = xc.make_xc_potential();\n        }\n        else\n        {\n            // make a zero function\n            v_xc = Function<double, 3>(\n                FunctionFactory<double, 3>(world).fence(false).initial_level(1));\n        }\n\n        auto hf_exchange_X = zero_functions<double, 3>(world, num_orbs);\n        // hf exchange\n        std::transform(x.begin(), x.end(), hf_exchange_X.begin(), [&](auto &xi)\n                       {\n            auto f = Function<double, 3>(FunctionFactory<double, 3>(world));\n            std::accumulate(phi_0.begin(), phi_0.end(), f, [&](auto phi0, auto total) {\n                auto sum = apply(*calc.shared_coulomb_operator, xi * phi0) * phi0;\n                return total + sum;\n            });\n            return f; });\n        vector_real_function_3d V0 = zero_functions<double, 3>(world, num_orbs);\n        real_function_3d v0 = v_j0 + v_nuc + v_xc;\n        V0 = v0 * x;\n        V0 += (-1 * hf_exchange_X * calc.xcf.hf_exchange_coefficient());\n\n        return T + V0;\n    };\n\n    auto phi_a = copy(world, xao);\n    Tensor<double> e_a;\n    for (int i = 0; i < 1; i++)\n    {\n        auto Fx = F(phi_a);\n        auto xFx = matrix_inner(world, phi_a, Fx);\n        auto [e, C] = syev(xFx);\n        print(\"eigs  : \\n\", e);\n        phi_a = transform(world, phi_a, C);\n        projector(phi_a);\n        e_a = e;\n    }\n\n    print(\"ground_orb energies  : \\n\", calc.ground_energies);\n    print(\"virtual orbital energies  : \\n\", e_a);\n    print(\"norm of virtual \", norm2s_T(world, phi_a));\n    e_a = e_a.flat();\n    auto is_positive = [](auto num)\n    { return num > 0; };\n    // This seems dumb but i'm removing the negative vectors\n    auto first_positive = std::find_if(e_a.ptr(), e_a.ptr() + e_a.size(), is_positive);\n    auto num_negative = std::distance(e_a.ptr(), first_positive);\n    auto virtual_phi = vector_real_function_3d(phi_a.size() - num_negative);\n    Tensor<double> virtual_e(e_a.size() - num_negative);\n    std::copy(first_positive, e_a.ptr() + e_a.size(), virtual_e.ptr());\n    std::copy(phi_a.begin() + num_negative, phi_a.end(), virtual_phi.begin());\n    phi_a = virtual_phi;\n    e_a = virtual_e;\n    auto SOA = matrix_inner(world, phi_0, phi_a);\n    print(\"Do I remove the vectors that are not completely 0 I hope it's zero\\n\", SOA);\n    print(\"Sanity CHECK I hope it's diagonal\\n\", matrix_inner(world, phi_a, F(phi_a)));\n    // create a vector of pairs\n    std::vector<std::pair<int, int>> ia_indicies;\n    print(\"forming response space pairs\");\n    print(\"( i , a )\");\n    for (int i = 0; i < phi_0.size(); i++)\n    {\n        for (int a = 0; a < phi_a.size(); a++)\n        {\n            ia_indicies.emplace_back(std::pair<int, int>{i, a});\n        }\n    }\n    int kk = 0;\n    Tensor<double> A(ia_indicies.size(), ia_indicies.size());\n    for (const auto ia : ia_indicies)\n    {\n        std::cout << \"( \" << ia.first << \" , \" << ia.second << \" )\" << std::endl;\n        A(kk, kk) = (e_a[ia.second] - calc.ground_energies[ia.first]);\n        kk++;\n    }\n    print(\"( ij , ab )\");\n    int ii = 0;\n    int jj = 0;\n    // create pairs ia, ii,ab\n    auto two_int = [&](World &world, const vector_real_function_3d &phi0,\n                       const vector_real_function_3d &phia)\n    {\n        // The easy case make n*m matrix\n        auto tol = FunctionDefaults<3>::get_thresh();\n        reconstruct(world, phi0);\n        reconstruct(world, phia);\n\n        vector_real_function_3d pairs_ij;\n        vector_real_function_3d pairs_ia;\n        vector_real_function_3d pairs_ab;\n\n        for (auto &phi_ii : phi0)\n        {\n            for (auto &phi_aa : phia)\n            {\n                pairs_ia.push_back(mul_sparse(phi_ii, phi_aa, tol, false));\n            }\n        }\n        world.gop.fence();\n        truncate(world, pairs_ia);\n        vecfuncT Vpairs_ia = apply(world, *calc.shared_coulomb_operator, pairs_ia);\n        auto A_ia_jb = matrix_inner(world, pairs_ia, Vpairs_ia);\n        for (auto &phi_ii : phi0)\n        {\n            for (auto &phi_jj : phi0)\n            {\n                pairs_ij.push_back(mul_sparse(phi_ii, phi_ii, tol, false));\n            }\n        }\n        for (auto &phi_aa : phia)\n        {\n            for (auto &phi_bb : phia)\n            {\n                pairs_ab.push_back(mul_sparse(phi_aa, phi_aa, tol, false));\n            }\n        }\n        world.gop.fence();\n        truncate(world, pairs_ij);\n        truncate(world, pairs_ab);\n        vecfuncT Vpairs_ij = apply(world, *calc.shared_coulomb_operator, pairs_ab);\n        auto A_ij_ab = matrix_inner(world, pairs_ia, Vpairs_ij);\n        // reshape A_ij_ab  n^2 x m^2\n        auto a_len = phi_a.size() * phi_0.size();\n        Tensor<double> A(a_len, a_len);\n        print(A);\n        int kk = 0;\n        //[i,j]= will have a phia by phia block.  each row gets rearranged into ij\n        for (int ii = 0; ii < phi0.size(); ii++)\n        {\n            for (int jj = 0; jj < phi0.size(); jj++)\n            {\n                auto ii_ab = A_ij_ab(kk++, _);\n                print(ii_ab);\n                auto b_i = ii * phia.size();\n                auto b_ip1 = (ii * phia.size() + phia.size()) - 1;\n                auto b_j = jj * phia.size();\n                auto b_jp1 = (jj * phia.size() + phia.size()) - 1;\n                print(\"( \", b_i, \" , \", b_ip1, \" ) \");\n                print(\"( \", b_j, \" , \", b_jp1, \" ) \");\n                print(Slice(b_i, b_ip1));\n                // ii_ab = ii_ab.reshape(phi_a.size(), phi_a.size());\n                A(Slice(b_i, b_ip1, 1), Slice(b_j, b_jp1, 1)) =\n                    ii_ab.reshape(phi_a.size(), phi_a.size());\n                // ii_ab = ii_ab.reshape(phi_a.size(), phi_a.size());\n                //  I think there is a bug in tensor where reshape doesn't automatically change dim\n                //\n                print(\"after add\\n\", A);\n            }\n        }\n        return A_ia_jb - A;\n    };\n    auto Atwo = two_int(world, phi_0, phi_a);\n    A = A + Atwo;\n    print(A);\n    auto [omega, X] = syev(A);\n\n    print(omega);\n    print(X);\n\n    auto t = xao.size() * calc.r_params.num_orbitals();\n    auto no = calc.r_params.num_orbitals();\n\n    X_space x_guess(world, t, no);\n\n    for (int i = 0; i < t; i++)\n    {\n        auto xt = copy(X(_, i));\n        auto mt = xt.reshape(xao.size(), no);\n        x_guess.x[i] = transform(world, phi_a, mt);\n        // new size is xt column size\n    }\n\n    return x_guess;\n}\n"
  },
  {
    "path": "src/apps/molresponse/ExcitedResponse.hpp",
    "content": "//\n// Created by adrianhurtado on 1/28/22.\n//\n\n#ifndef MADNESS_EXCITEDRESPONSE_HPP\n#define MADNESS_EXCITEDRESPONSE_HPP\n#include \"ResponseBase.hpp\"\n\nstruct ExcitedSpace {\n\n    X_space chi;\n    X_space l_chi;\n};\n\n\nclass ExcitedResponse : public ResponseBase {\n\npublic:\n    ExcitedResponse(World& world, const CalcParams& params) : ResponseBase(world, params) {}\n    void initialize(World& world) override;\n    void iterate_trial(World& world, X_space& trial);\n    friend class ExcitedTester;\n\nprivate:\n    Tensor<double> omega;\n    void iterate(World& world) override;\n\n    X_space make_random_trial(World& world, size_t m) const;\n    X_space make_nwchem_trial(World& world, size_t m) const;\n\n    X_space create_trial_functions2(World& world) const;\n    X_space create_trial_functions(World& world, size_t k) const;\n    X_space create_virtual_ao_guess(World& world) const;\n\n\n    void deflateTDA(World& world, X_space& Chi, X_space& old_Chi, X_space& Lambda_X,\n                    X_space& old_Lambda_X, Tensor<double>& S, Tensor<double> old_S,\n                    Tensor<double> old_A, Tensor<double>& omega, size_t& iteration, size_t& m);\n    void deflateFull(World& world, X_space& Chi, X_space& old_Chi, X_space& Lambda_X,\n                     X_space& old_Lambda_X, Tensor<double>& S, Tensor<double> old_S,\n                     Tensor<double> old_A, Tensor<double>& omega, size_t& iteration, size_t& m);\n    void augment(World& world, X_space& Chi, X_space& old_Chi, X_space& Lambda_X,\n                 X_space& last_Lambda_X, Tensor<double>& S, Tensor<double>& A,\n                 Tensor<double>& old_S, Tensor<double>& old_A, size_t print_level);\n    void augment_full(World& world, X_space& Chi, X_space& old_Chi, X_space& Lambda_X,\n                      X_space& last_Lambda_X, Tensor<double>& S, Tensor<double>& A,\n                      Tensor<double>& old_S, Tensor<double>& old_A, size_t print_level);\n    void unaugment(World& world, X_space& Chi, X_space& old_Chi, X_space& Lambda_X,\n                   X_space& last_Lambda_X, Tensor<double>& omega, Tensor<double>& S_x,\n                   Tensor<double>& A_x, Tensor<double>& old_S, Tensor<double>& old_A,\n                   size_t num_states, size_t iter, size_t print_level);\n    void unaugment_full(World& world, X_space& Chi, X_space& old_Chi, X_space& Lambda_X,\n                        X_space& last_Lambda_X, Tensor<double>& omega, Tensor<double>& S_x,\n                        Tensor<double>& A_x, Tensor<double>& old_S, Tensor<double>& old_A,\n                        size_t num_states, size_t iter, size_t print_level);\n    Tensor<double> diagonalizeFullResponseMatrix(World& world, X_space& Chi, X_space& Lambda_X,\n                                                 Tensor<double>& omega, Tensor<double>& S,\n                                                 Tensor<double>& A, const double thresh,\n                                                 size_t print_level);\n    Tensor<double> GetFullResponseTransformation(World& world, Tensor<double>& S, Tensor<double>& A,\n                                                 Tensor<double>& evals,\n                                                 const double thresh_degenerate);\n    void deflateGuesses(World& world, X_space& Chi, X_space& Lambda_X, Tensor<double>& S,\n                        Tensor<double>& frequencies, size_t& iteration, size_t& m) const;\n\n    Tensor<double> diagonalizeFockMatrix(World& world, X_space& Chi, X_space& Lambda_X,\n                                         Tensor<double>& evals, Tensor<double>& A,\n                                         Tensor<double>& S, const double thresh) const;\n    /// compute the unitary transformation that diagonalizes the fock matrix\n\n    /// @param[in]  world   the world\n    /// @param[in]  overlap the overlap matrix of the orbitals\n    /// @param[inout]       fock    the fock matrix; diagonal upon exit\n    /// @param[out] evals   the orbital energies\n    /// @param[in]  thresh_degenerate       threshold for orbitals being\n    /// degenerate\n    /// @return             the unitary matrix U: U^T F U = evals\n    Tensor<double> get_fock_transformation(World& world, Tensor<double>& overlap,\n                                           Tensor<double>& fock, Tensor<double>& evals,\n                                           const double thresh_degenerate) const;\n\n    // Sorts the given Tensor of energies\n    Tensor<int> sort_eigenvalues(World& world, Tensor<double>& vals, Tensor<double>& vecs) const;\n    // Construct the Hamiltonian\n    // Returns the shift needed to make sure that\n    // -2.0 * (ground_state_energy + excited_state_energy)\n    // is negative. Please note: The same shift needs to\n    // be applied to the potential.\n    Tensor<double> create_shift(World& world, const Tensor<double>& ground,\n                                const Tensor<double>& omega, std::string xy) const;\n\n\n    // Returns the given shift applied to the given potential\n    response_space apply_shift(World& world, const Tensor<double>& shifts, const response_space& V,\n                               const response_space& f);\n\n\n    // Function to make a vector of BSH operators using ground and excited\n    // state energies\n    std::vector<std::vector<std::shared_ptr<real_convolution_3d>>> create_bsh_operators(\n            World& world, const Tensor<double>& shift, const Tensor<double>& ground,\n            const Tensor<double>& omega, const double lo, const double thresh) const;\n\n    static void excited_to_json(json& j_mol_in, size_t iter, const Tensor<double>& omega);\n\n    /**\n * @brief Computes the BSH Update for an excited state calculation.  Passes in\n * omega and computes the necessary shifts in the potential, computes BSH\n * operators and applys BSH operator\n *\n * \\f$ \\chi^m=-2\\hat{G} * \\Theta\\chi \\f$\n *\n * @param world\n * @param theta_X\n * @param projector\n * @param converged\n * @return X_space\n */\n    X_space bsh_update_excited(World& world, const Tensor<double>& omega, X_space& theta_X,\n                               QProjector<double, 3>& projector);\n    void analysis(World& world, const X_space& chi);\n    void save(World& world, const std::string& name) override;\n    void load(World& world, const std::string& name) override;\n\n    std::pair<Tensor<double>, Tensor<double>> excited_eig(World& world, Tensor<double>& S,\n                                                          Tensor<double>& A,\n                                                          const double thresh_degenerate);\n\n    std::tuple<X_space, X_space, X_space, X_space> rotate_excited_vectors(\n            World& world, const Tensor<double>& U, const X_space& chi, const X_space& l_chi,\n            const X_space& v0_chi, const X_space& gamma_chi);\n    std::tuple<Tensor<double>, X_space, X_space, X_space, X_space> rotate_excited_space(\n            World& world, X_space& chi, X_space& lchi, X_space& v_chi, X_space& gamma_chi);\n    std::tuple<Tensor<double>, X_space, X_space, residuals>\n    update_response(World &world, X_space &Chi, XCOperator<double, 3> &xc,\n                    QProjector<double, 3> &projector, response_solver &kain_x_space,\n                    response_matrix &Xvector, response_matrix &Xresidual, size_t iter,\n                    const double &maxrotn, const Tensor<double> old_residuals,\n                    const X_space &xres_old);\n    X_space create_response_guess(World& world) const;\n    std::tuple<Tensor<double>, Tensor<double>, Tensor<double>> reduce_subspace(\n            World& world, Tensor<double>& S, Tensor<double>& A, const double thresh_degenerate);\n};\n\nclass ExcitedTester {\nprivate:\npublic:\n    ExcitedTester(World& world, ExcitedResponse& calc, double thresh) {\n        print(\"Setting Function Defaults\");\n        calc.set_protocol(world, thresh);\n        calc.check_k(world, thresh, FunctionDefaults<3>::get_k());\n    }\n    X_space test_ao_guess(World& world, ExcitedResponse& calc);\n};\n\n\n#endif//MADNESS_EXCITEDRESPONSE_HPP\n"
  },
  {
    "path": "src/apps/molresponse/FrequencyResponse.cpp",
    "content": "//\n// Created by adrianhurtado on 2/3/22.\n//\n\n#include \"FrequencyResponse.hpp\"\n#include \"SCF.h\"\n#include \"funcdefaults.h\"\n#include \"functypedefs.h\"\n#include \"response_macrotask.hpp\"\n#include \"timer.h\"\n#include \"x_space.h\"\n#include <filesystem>\n\nnamespace fs = std::filesystem;\n\nvoid FrequencyResponse::initialize(World &world) { Chi = PQ.copy(); }\n\nvoid FrequencyResponse::iterate(World &world) {\n  size_t iter;\n  // Variables needed to iterate\n  madness::QProjector<double, 3> projector(ground_orbitals);\n  size_t n = r_params.num_orbitals(); // num orbitals\n  size_t m = r_params.num_states();   // num response states\n\n  real_function_3d v_xc;\n\n  const double dconv =\n      std::max(FunctionDefaults<3>::get_thresh(), r_params.dconv());\n  auto thresh = FunctionDefaults<3>::get_thresh();\n  auto density_target =\n      dconv * static_cast<double>(std::max(size_t(5.0), molecule.natom()));\n  const double x_residual_target = density_target * 10.0;\n  Tensor<double> x_residual((int(m)));\n  Tensor<double> delta_density((int(m)));\n\n  bool static_res = (omega == 0.0);\n  bool compute_y = not static_res;\n  int r_vector_size;\n  all_done = false;\n  r_vector_size = (compute_y) ? static_cast<int>(2 * n) : static_cast<int>(n);\n\n  vecfuncT rho_omega_old(m);\n  // initialize DFT XC functional operator\n  XCOperator<double, 3> xc = make_xc_operator(world);\n  // create X space residuals\n  X_space residuals = X_space::zero_functions(world, m, n);\n  // create a std vector of XNONLinearsolvers\n  response_solver kain_x_space;\n  for (size_t b = 0; b < m; b++) {\n    kain_x_space.emplace_back(response_matrix_allocator(world, r_vector_size),\n                              false);\n  }\n  if (r_params.kain()) {\n    for (auto &kain_space_b : kain_x_space) {\n      kain_space_b.set_maxsub(static_cast<int>(r_params.maxsub()));\n    }\n  }\n  double x_shifts = 0.0;\n  double y_shifts = 0.0;\n  // if less negative orbital energy + frequency is positive or greater than 0\n  if ((ground_energies[long(n) - 1] + omega) >= 0.0) {\n    // Calculate minimum shift needed such that \\eps + \\omega + shift < 0\n    print(\"*** we are shifting just so you know!!!\");\n    x_shifts = -.05 - (omega + ground_energies[long(n) - 1]);\n  }\n\n  std::pair<std::vector<poperatorT>, std::vector<poperatorT>> bsh_ops;\n  std::vector<poperatorT> bsh_y_ops;\n\n  bsh_ops.first = make_bsh_operators_response(world, x_shifts, omega);\n  if (compute_y) {\n    bsh_ops.second = make_bsh_operators_response(world, y_shifts, -omega);\n  }\n\n  auto max_rotation =\n      .5 * x_residual_target + x_residual_target; // r_params.maxrotn();\n  PQ = generator(world, *this);\n  world.gop.fence();\n  PQ.truncate();\n\n  vector<bool> converged(Chi.num_states(), false);\n  Chi.reset_active();\n  PQ.reset_active();\n  // make density for the first time\n  // Hang's here so maybe just a fence will fix it.  Perhaps it has to do\n  // with the fact that I am using the ground_orbitals above to generate PQ\n  // Then we follow with a dot(x[b],ph0) to generate the density\n  // From what I've seen the code hangs in the reconstruction step.  Similar\n  world.gop.fence();\n  auto rho_omega = response_context.compute_density(\n      world, Chi, ground_orbitals, vector_real_function_3d(Chi.num_states()),\n      false);\n\n  if (r_params.print_level() >= 20) {\n    print_inner(world, \"pq\", PQ, PQ);\n  }\n\n  for (iter = 0; iter < r_params.maxiter(); ++iter) {\n    // if (world.rank() == 0) { print(\"At the start of iterate x\", checkx); }\n    iter_timing.clear();\n\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n      if (world.rank() == 0)\n        printf(\"\\n   Iteration %d at time %.1fs\\n\", static_cast<int>(iter),\n               wall_time());\n      if (world.rank() == 0)\n        print(\"-------------------------------------------\");\n    }\n    if (iter < 2 || (iter % 5) == 0) {\n      load_balance_chi(world);\n    }\n    if (iter > 0) {\n      if (delta_density.max() > 20 && iter > 5) {\n        if (world.rank() == 0) {\n          print(\"d-residual > 20...break\");\n        }\n        break;\n      }\n\n      auto chi_norms = (compute_y) ? Chi.norm2s() : Chi.x.norm2();\n      if (world.rank() == 0) {\n        print(\"chi_norms: In the beginning \", chi_norms);\n      }\n\n      auto rho_norms = madness::norm2s_T(world, rho_omega);\n\n      // Todo add chi norm and chi_x\n      if (world.rank() == 0) {\n        function_data_to_json(j_molresponse, iter, chi_norms, x_residual,\n                              rho_norms, delta_density);\n        frequency_to_json(j_molresponse, iter, polar);\n      }\n      if (r_params.print_level() >= 1) {\n        if (world.rank() == 0) {\n          print(\"r_params.dconv(): \", r_params.dconv());\n          print(\"thresh: \", FunctionDefaults<3>::get_thresh());\n          print(\"k: \", FunctionDefaults<3>::get_k());\n          print(\"Chi Norms at start of iteration: \", iter);\n          print(\"||X||: \", chi_norms);\n          print(\"||f(x)-x||: \", x_residual);\n          print(\"<< XI | XJ >>(omega): \\n\", polar);\n          print(\"targets : ||x||\", x_residual_target, \"    ||delta_rho||\",\n                density_target);\n        }\n      }\n      auto check_convergence = [&](auto &ri, auto &di) {\n        if (world.rank() == 0) {\n          print(\"              \", ri, \"    \", di);\n        }\n        return ((ri < x_residual_target) && (di < density_target));\n      };\n\n      for (const auto &b : Chi.active) {\n        converged[b] = check_convergence(x_residual[static_cast<int>(b)],\n                                         delta_density[static_cast<int>(b)]);\n      }\n      int b = 0;\n      int pq = 0;\n      auto remove_converged = [&]() {\n        Chi.reset_active();\n        Chi.active.remove_if([&](auto x) { return converged[b++]; });\n      };\n      remove_converged();\n      PQ.set_active(Chi.active);\n      Chi.set_active(Chi.active);\n\n      if (world.rank() == 0) {\n        print(\"converged\", converged);\n        print(\"active\", Chi.active);\n      }\n      b = 0;\n      all_done = std::all_of(converged.begin(), converged.end(),\n                             [](const auto &ci) { return ci; });\n      if (all_done || iter == r_params.maxiter()) {\n        // if converged print converged\n        if (world.rank() == 0 && all_done and (r_params.print_level() > 1)) {\n          print(\"\\nConverged!\\n\");\n        }\n        if (r_params.save()) {\n          molresponse::start_timer(world);\n          save(world, r_params.save_file());\n          if (r_params.print_level() >= 1)\n            molresponse::end_timer(world, \"Save:\");\n        }\n\n        break;\n      }\n    }\n    auto rho_omega_norm = norm2s_T(world, rho_omega);\n    auto [new_chi, new_res, new_rho] = update_response(\n        world, Chi, xc, bsh_ops, projector, x_shifts, omega, kain_x_space, iter,\n        max_rotation, rho_omega, x_residual, residuals);\n\n    auto old_rho = copy(world, rho_omega);\n    rho_omega = copy(world, new_rho);\n\n    for (const auto &b : Chi.active) {\n      auto drho_b = rho_omega[b] - old_rho[b];\n      auto drho_b_norm = drho_b.norm2();\n      world.gop.fence();\n      delta_density[static_cast<int>(b)] = drho_b_norm;\n    }\n    world.gop.fence();\n\n    auto old_density_residual = copy(delta_density);\n\n    if (compute_y) {\n      Chi = new_chi.copy();\n    } else {\n      Chi.x = new_chi.x.copy();\n      // Chi.y = new_chi.x.copy();\n    }\n\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n    x_residual = copy(new_res.residual_norms);\n    if (r_params.print_level() >= 1) {\n      molresponse::end_timer(world, \"copy_response_data\", \"copy_response_data\",\n                             iter_timing);\n    }\n\n    auto dnorm = norm2s_T(world, rho_omega);\n\n    polar = ((compute_y) ? -2 : -4) * response_context.inner(Chi, PQ);\n    if (r_params.print_level() >= 1) {\n      molresponse::end_timer(world, \"Iteration Timing\", \"iter_total\",\n                             iter_timing);\n    }\n    time_data.add_data(iter_timing);\n  }\n\n  function_data.add_convergence_targets(FunctionDefaults<3>::get_thresh(),\n                                        density_target, x_residual_target);\n\n  Chi.reset_active();\n  if (world.rank() == 0)\n    print(\"\\n\");\n  if (world.rank() == 0)\n    print(\"   Finished Response Calculation \");\n  if (world.rank() == 0)\n    print(\"   ------------------------\");\n  if (world.rank() == 0)\n    print(\"\\n\");\n\n  // Did we converge?\n  if (iter == r_params.maxiter() && not all_done) {\n    Chi.reset_active();\n    if (world.rank() == 0)\n      print(\"   Failed to converge. Reason:\");\n    if (world.rank() == 0)\n      print(\"\\n  ***  Ran out of iterations  ***\\n\");\n  }\n\n  if (world.rank() == 0) {\n    print(\" Final energy residuals X:\");\n    print(x_residual);\n    print(\" Final density change:\");\n    print(delta_density);\n  }\n  // compute_and_print_polarizability(world, Chi, PQ, \"Converged\");\n}\n\nauto FrequencyResponse::update_response(\n    World &world, X_space &chi, XCOperator<double, 3> &xc,\n    std::pair<std::vector<poperatorT>, std::vector<poperatorT>> &bsh_ops,\n    QProjector<double, 3> &projector, double &x_shifts, double &omega_n,\n    response_solver &kain_x_space, size_t iteration, const double &max_rotation,\n    const vector_real_function_3d &rho_old, const Tensor<double> &old_residuals,\n    const X_space &xres_old)\n    -> std::tuple<X_space, residuals, vector_real_function_3d> {\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  std::string calc_type = (omega_n != 0.0) ? \"full\" : \"static\";\n\n  auto x = X_space(world, chi.num_states(), chi.num_orbitals());\n  if (calc_type == \"static\") {\n    x.x = chi.x.copy();\n  } else {\n    x = chi.copy();\n  }\n  x.set_active(chi.active);\n\n  if (r_params.print_level() >= 20) {\n    auto chi_norm = chi.norm2s();\n    if (world.rank() == 0) {\n      print(\"chi_norm before bsh update: \", chi_norm);\n    }\n  }\n  X_space theta_X = compute_theta_X(world, x, rho_old, xc, calc_type);\n  X_space new_chi =\n      bsh_update_response(world, theta_X, bsh_ops, projector, x_shifts);\n\n  auto [new_res, bsh_norms] = update_residual(\n      world, chi, new_chi, r_params.calc_type(), old_residuals, xres_old);\n  if (iteration >= 0) { // & (iteration % 3 == 0)) {\n    new_chi = kain_x_space_update(world, chi, new_res, kain_x_space);\n  }\n\n  bool compute_y = r_params.calc_type() == \"full\";\n  if (iteration >= r_params.maxsub() + 2 && r_params.step_restrict()) {\n    x_space_step_restriction(world, chi, new_chi, compute_y, max_rotation);\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"update response\", \"update\", iter_timing);\n  }\n\n  auto new_rho = response_context.compute_density(\n      world, new_chi, ground_orbitals, rho_old, true);\n\n  return {new_chi, {new_res, bsh_norms}, new_rho};\n}\n\nauto FrequencyResponse::bsh_update_response(\n    World &world, X_space &theta_X,\n    std::pair<std::vector<poperatorT>, std::vector<poperatorT>> &bsh_ops,\n    QProjector<double, 3> &projector, double &x_shift) -> X_space {\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  size_t m = theta_X.x.size();\n  size_t n = theta_X.x.size_orbitals();\n  bool compute_y = omega != 0.0;\n\n  if (compute_y) {\n    theta_X += theta_X * x_shift;\n    theta_X += PQ;\n    theta_X = -2 * theta_X;\n    theta_X.truncate();\n  } else {\n    theta_X.x += theta_X.x * x_shift;\n    theta_X.x += PQ.x;\n    theta_X.x = theta_X.x * -2;\n    theta_X.x.truncate_rf();\n  }\n  // apply bsh\n  X_space bsh_X = X_space::zero_functions(world, m, n);\n\n  bsh_X.set_active(theta_X.active);\n  bsh_X.x = apply(world, bsh_ops.first, theta_X.x);\n  if (compute_y) {\n    bsh_X.y = apply(world, bsh_ops.second, theta_X.y);\n  }\n\n  if (compute_y) {\n    auto bsh = bsh_X.to_vector();\n    bsh_X.from_vector(truncate(projector(bsh)));\n  } else {\n    auto bsh = bsh_X.x.to_vector();\n    bsh_X.x.from_vector(truncate(projector(bsh)));\n  }\n\n  /*auto apply = ResponseApplyBSH();*/\n  /*MacroTask apply_task(world, apply);*/\n  /*if (compute_y) {*/\n  /*  auto vec_theta_X = theta_X.to_vector();*/\n  /*  auto bsh_xy =*/\n  /*      apply_task(vec_theta_X, ground_energies, omega, x_shift, false);*/\n  /*  bsh_X.from_vector(truncate(projector(bsh_xy)));*/\n  /*} else {*/\n  /*  auto vec_theta_X = theta_X.x.to_vector();*/\n  /*  auto bsh_x = apply_task(vec_theta_X, ground_energies, omega, x_shift,\n   * true);*/\n  /*  bsh_X.x.from_vector(truncate(projector(bsh_x)));*/\n  /*}*/\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"bsh_update\", \"bsh_update\", iter_timing);\n  }\n  return bsh_X;\n}\n\nvoid FrequencyResponse::frequency_to_json(json &j_mol_in, size_t iter,\n                                          const Tensor<double> &polar_ij) {\n  json j = {};\n  j[\"iter\"] = iter;\n  j[\"polar\"] = tensor_to_json(polar_ij);\n  auto index = j_mol_in[\"protocol_data\"].size() - 1;\n  j_mol_in[\"protocol_data\"][index][\"property_data\"].push_back(j);\n}\n\nvoid FrequencyResponse::save(World &world, const std::string &name) {\n  // Archive to write everything to\n  archive::ParallelOutputArchive ar(world, name.c_str(), 1);\n\n  ar & r_params.archive();\n  ar & r_params.tda();\n  ar & r_params.num_orbitals();\n  ar & r_params.num_states();\n\n  for (size_t i = 0; i < r_params.num_states(); i++)\n    for (size_t j = 0; j < r_params.num_orbitals(); j++)\n      ar & Chi.x[i][j];\n  for (size_t i = 0; i < r_params.num_states(); i++)\n    for (size_t j = 0; j < r_params.num_orbitals(); j++)\n      ar & Chi.y[i][j];\n}\n\n// Load a response calculation\nvoid FrequencyResponse::load(World &world, const std::string &name) {\n  if (world.rank() == 0) {\n    print(\"FrequencyResponse::load() -state\");\n  }\n  // The archive to read from\n  archive::ParallelInputArchive ar(world, name.c_str());\n  ar & r_params.archive();\n  ar & r_params.tda();\n  ar & r_params.num_orbitals();\n  ar & r_params.num_states();\n  Chi = X_space(world, r_params.num_states(), r_params.num_orbitals());\n  for (size_t i = 0; i < r_params.num_states(); i++)\n    for (size_t j = 0; j < r_params.num_orbitals(); j++)\n      ar & Chi.x[i][j];\n  world.gop.fence();\n  for (size_t i = 0; i < r_params.num_states(); i++)\n    for (size_t j = 0; j < r_params.num_orbitals(); j++)\n      ar & Chi.y[i][j];\n  world.gop.fence();\n}\n\nauto nuclear_generator(World &world, ResponseBase &calc) -> X_space {\n  auto [gc, molecule, r_params] = calc.get_parameter();\n  X_space PQ(world, r_params.num_states(), r_params.num_orbitals());\n  auto num_operators = size_t(molecule.natom() * 3);\n  auto nuclear_vector = vecfuncT(num_operators);\n\n  for (long atom = 0; atom < molecule.natom(); ++atom) {\n    for (long axis = 0; axis < 3; ++axis) {\n      functorT func(new madchem::MolecularDerivativeFunctor(\n          molecule, static_cast<int>(atom), static_cast<int>(axis)));\n      nuclear_vector.at(atom * 3 + axis) = functionT(factoryT(world)\n                                                         .functor(func)\n                                                         .nofence()\n                                                         .truncate_on_project()\n                                                         .truncate_mode(0));\n    }\n  }\n  PQ.x = vector_to_PQ(world, nuclear_vector, calc.get_orbitals());\n  PQ.y = PQ.x;\n  return PQ;\n}\n\nauto dipole_generator(World &world, ResponseBase &calc) -> X_space {\n  auto [gc, molecule, r_params] = calc.get_parameter();\n  X_space PQ(world, r_params.num_states(), r_params.num_orbitals());\n  vector_real_function_3d dipole_vectors(3);\n  size_t i = 0;\n  for (auto &d : dipole_vectors) {\n    std::vector<int> f(3, 0);\n    f[i++] = 1;\n    d = real_factory_3d(world).functor(real_functor_3d(new MomentFunctor(f)));\n  }\n  // truncate(world, dipole_vectors, true);\n  world.gop.fence();\n  PQ.x = vector_to_PQ(world, dipole_vectors, calc.get_orbitals());\n  PQ.y = PQ.x.copy();\n  return PQ;\n}\n\nauto vector_to_PQ(World &world, const vector_real_function_3d &rhs_operators,\n                  const vector_real_function_3d &ground_orbitals)\n    -> response_space {\n  response_space rhs(world, rhs_operators.size(), ground_orbitals.size());\n  auto project_orbitals = copy(world, ground_orbitals);\n  auto mul_orbitals = copy(world, ground_orbitals);\n\n  compress(world, project_orbitals, false);\n  reconstruct(world, mul_orbitals, false);\n  reconstruct(world, rhs_operators, false);\n  world.gop.fence();\n\n  QProjector<double, 3> Qhat(project_orbitals);\n  int b = 0;\n  for (const functionT &pi : rhs_operators) {\n    auto op_phi = mul(world, pi, mul_orbitals, true);\n    compress(world, op_phi, true);\n    rhs[b] = Qhat(op_phi);\n\n    auto rhs_b_norms = norm2s_T(world, rhs[b]);\n    if (world.rank() == 0) {\n      print(\"rhs_b_norms: b \", b, rhs_b_norms);\n    }\n\n    b++;\n  }\n  return rhs;\n}\n\nvoid QuadraticResponse::load(World &world, const std::string &name) {}\nvoid QuadraticResponse::save(World &world, const std::string &name) {}\n\nvoid QuadraticResponse::iterate(World &world) {}\nvoid QuadraticResponse::initialize(World &world) {}\n\n// To compute 2nd order we need rhs of xx,yy,zz and yz only.\nauto QuadraticResponse::setup_XBC(World &world, const double &omega_b,\n                                  const double &omega_c)\n    -> std::pair<X_space, X_space> {\n\n  this->index_B = {0, 0, 0, 1, 1, 1, 2, 2, 2};\n  this->index_C = {0, 1, 2, 0, 1, 2, 0, 1, 2};\n\n  auto B = x_data[1].first.copy();\n  auto C = x_data[2].first.copy();\n\n  auto num_states = index_B.size();\n  auto num_orbitals = B.num_orbitals();\n\n  auto new_B = X_space(world, num_states, num_orbitals);\n  auto new_C = X_space(world, num_states, num_orbitals);\n\n  for (int i = 0; i < num_states; i++) {\n    new_B.x[i] = copy(world, B.x[index_B[i]]);\n    new_B.y[i] = copy(world, B.y[index_B[i]]);\n\n    new_C.x[i] = copy(world, C.x[index_C[i]]);\n    new_C.y[i] = copy(world, C.y[index_C[i]]);\n  }\n  this->bc_directions.clear();\n  for (int i = 0; i < num_states; i++) {\n    auto bc_direction_i = std::string(xyz[index_B[i]] + xyz[index_C[i]]);\n    this->bc_directions.push_back(bc_direction_i);\n  }\n  if (world.rank() == 0) {\n    print(\"bc_directions: \", bc_directions);\n  }\n\n  return {new_B, new_C};\n}\n\nresponse_xy_pair QuadraticResponse::compute_vbc(\n    World &world, const response_density &B, const response_xy_pair &C,\n    const response_density &zeta_BC, const vector_real_function_3d &phi0,\n    const real_function_3d &vb) {\n  madness::QProjector<double, 3> Q(phi0);\n  auto thresh = FunctionDefaults<3>::get_thresh();\n\n  auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {\n    const double lo = 1.e-10;\n    auto &world = ket[0].world();\n    Exchange<double, 3> k{world, lo};\n    k.set_bra_and_ket(bra, ket);\n\n    std::string algorithm_ = r_params.hfexalg();\n\n    if (algorithm_ == \"multiworld\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient);\n    } else if (algorithm_ == \"multiworld_row\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient_row);\n    } else if (algorithm_ == \"largemem\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::large_memory);\n    } else if (algorithm_ == \"smallmem\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::small_memory);\n    }\n\n    return k;\n  };\n  // A and B are the response pairs that make up response density\n  // \\gamma_{a} = |xa><phi| + |phi><ya|\n  // This function constructs the J and K operators with A and B and applies on\n  // x\n  auto compute_g = [&](const response_lr_pair &A, const response_lr_pair &B,\n                       const response_xy_pair &phi) {\n    auto x_phi = mul(world, A.left, A.right, true);\n    auto y_phi = mul(world, B.left, B.right, true);\n    world.gop.fence();\n    auto rho = sum(world, x_phi, true);\n    world.gop.fence();\n    rho += sum(world, y_phi, true);\n    world.gop.fence();\n    auto temp_J = apply(*shared_coulomb_operator, rho);\n    response_xy_pair J = {mul(world, temp_J, phi.x, true),\n                          mul(world, temp_J, phi.y, true)};\n    world.gop.fence();\n\n    auto ka = K(A.left, A.right)(phi.x); // what happens to k after this?\n    world.gop.fence();\n    auto kb = K(B.left, B.right)(phi.x);\n    world.gop.fence();\n    auto ka_conj = K(A.right, A.left)(phi.y);\n    world.gop.fence();\n    auto kb_conj = K(B.right, B.left)(phi.y);\n    world.gop.fence();\n    // ideally it runs and the Exchange operator is freed\n\n    response_xy_pair K = {gaxpy_oop(1.0, ka, 1.0, kb, true),\n                          gaxpy_oop(1.0, ka_conj, 1.0, kb_conj, true)};\n    world.gop.fence();\n\n    response_xy_pair results{gaxpy_oop(2.0, J.x, -1.0, K.x, true),\n                             gaxpy_oop(2.0, J.y, -1.0, K.y, true)};\n    world.gop.fence();\n    return results;\n  };\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto gzeta = compute_g(zeta_BC.x, zeta_BC.y, {phi0, phi0});\n  gzeta.x = -1.0 * Q(gzeta.x);\n  gzeta.y = -1.0 * Q(gzeta.y);\n\n  auto gBC = compute_g(B.x, B.y, {C.x, C.y});\n  auto gBphi = compute_g(B.x, B.y, {phi0, phi0});\n  response_xy_pair vbx = {mul(world, vb, C.x, true), mul(world, vb, C.y, true)};\n  world.gop.fence();\n  response_xy_pair FBX = {-1.0 * Q(gBC.x + vbx.x), -1.0 * Q(gBC.y + vbx.y)};\n  auto vb_phi0 = mul(world, vb, phi0, true);\n  response_xy_pair FBphi0 = {gBphi.x + vb_phi0, gBphi.y + vb_phi0};\n\n  auto fbx = matrix_inner(world, phi0, FBphi0.x);\n  auto fby = matrix_inner(world, phi0, FBphi0.y);\n\n  response_xy_pair FB = {transform(world, C.x, fbx, true),\n                         transform(world, C.y, fby, true)};\n\n  response_xy_pair results{truncate(gzeta.x + FBX.x + FB.x, thresh, true),\n                           truncate(gzeta.y + FBX.y + FB.y, thresh, true)};\n  return results;\n\n  // auto norm_gzx = norm2(world, gzeta.x);\n  // auto norm_gzy = norm2(world, gzeta.y);\n\n  // if (world.rank() == 0) {\n  //   print(\"------------------------------------\");\n  //   print(\"norm_g_zeta_bcx: 1x \", norm_gzx);\n  //   print(\"norm_g_zeta_bcy: 1x\", norm_gzy);\n  // }\n\n  // auto norm_gBCx = norm2(world, gBC.x);\n  // auto norm_gBCy = norm2(world, gBC.y);\n\n  // if (world.rank() == 0) {\n  //   print(\"norm_g_bxc_x: 2x \", norm_gBCx);\n  //   print(\"norm_g_bxc_y: 2y\", norm_gBCy);\n  // }\n\n  // auto norm_gBphix = norm2(world, gBphi.x);\n  // auto norm_gBphiy = norm2(world, gBphi.y);\n\n  // if (world.rank() == 0) {\n  //   print(\"norm_g1bphi 3x: \", norm_gBphix);\n  //   print(\"norm_g1bphi 3y: \", norm_gBphiy);\n  // }\n\n  // auto norm_vbcx = norm2(world, vbx.x);\n  // auto norm_vbcy = norm2(world, vbx.y);\n\n  // if (world.rank() == 0) {\n  //   print(\"norm_vbcx: 4x \", norm_vbcx);\n  //   print(\"norm_vbcy: 4y\", norm_vbcy);\n  // }\n\n  // auto norm_FBCx = norm2(world, FBX.x);\n  // auto norm_FBCy = norm2(world, FBX.y);\n\n  // if (world.rank() == 0) {\n  //   print(\"norm_Fbxc_x: 5x \", norm_FBCx);\n  //   print(\"norm_Fbxc_y: 5y\", norm_FBCy);\n  // }\n\n  // auto norm_vbphi0 = norm2(world, vb_phi0);\n\n  // if (world.rank() == 0) {\n  //   print(\"norm_vbphi0: 6x \", norm_vbphi0);\n  //   print(\"norm_vbphi0: 6y \", norm_vbphi0);\n  // }\n\n  // auto norm_FBphi0x = norm2(world, FB.x);\n  // auto norm_FBphi0y = norm2(world, FB.y);\n\n  // if (world.rank() == 0) {\n  //   print(\"norm_FBphi0x: 7x \", norm_FBphi0x);\n  //   print(\"norm_FBphi0y: 7y \", norm_FBphi0y);\n  //   print(\"-------------------------------------------\");\n  // }\n}\n//\n//\n// <C;A,B> = <V(BC);X(A)> + <zeta(bc)_x| v(a) | zeta_(bc)_y> + < zeta(cb)_x|\n// v(a) | zeta_(cb)_y >\n//\n//\n// vc = x x x x y y y z z z\n//\nstd::pair<Tensor<double>, std::vector<std::string>>\nQuadraticResponse::compute_beta_tensor(World &world, const X_space &BC_left,\n                                       const X_space &BC_right,\n                                       const X_space &CB_left,\n                                       const X_space &CB_right,\n                                       const X_space &XA, const X_space &VBC) {\n  auto create_dipole = [&]() {\n    vector_real_function_3d dipole_vectors(3);\n    size_t i = 0;\n    // creates a vector of x y z dipole functions\n    for (auto &d : dipole_vectors) {\n      std::vector<int> f(3, 0);\n      f[i++] = 1;\n      d = real_factory_3d(world).functor(real_functor_3d(new MomentFunctor(f)));\n    }\n    return dipole_vectors;\n  };\n  auto dipole_vectors = create_dipole(); // x y z\n  truncate(dipole_vectors, FunctionDefaults<3>::get_thresh(), true);\n  int num_elements = static_cast<int>(XA.num_states() * BC_left.num_states());\n  std::vector<std::string> beta_indices(num_elements);\n  Tensor<double> beta(num_elements);\n\n  int i = 0;\n  for (int a = 0; a < XA.num_states(); a++) {\n    for (int bc = 0; bc < BC_left.num_states(); bc++) {\n\n      auto one =\n          dot(world, BC_left.x[bc], BC_right.x[bc] * dipole_vectors[a], true);\n      auto two =\n          dot(world, BC_left.y[bc], BC_right.y[bc] * dipole_vectors[a], true);\n      auto three =\n          dot(world, CB_left.x[bc], CB_right.x[bc] * dipole_vectors[a], true);\n      auto four =\n          dot(world, CB_left.y[bc], CB_right.y[bc] * dipole_vectors[a], true);\n      auto five = dot(world, XA.x[a], VBC.x[bc], true);\n      auto six = dot(world, XA.y[a], VBC.y[bc], true);\n\n      auto one_trace = one.trace();\n      auto two_trace = two.trace();\n      auto three_trace = three.trace();\n      auto four_trace = four.trace();\n      auto five_trace = five.trace();\n      auto six_trace = six.trace();\n\n      beta[i] = one_trace + two_trace + three_trace + four_trace + five_trace +\n                six_trace;\n\n      beta_indices[i] = xyz[a] + bc_directions[bc];\n      i++;\n    }\n  }\n\n  return {-2.0 * beta, beta_indices};\n}\n\nstd::pair<Tensor<double>, std::vector<std::string>>\nQuadraticResponse::compute_beta_tensor_v2(World &world, const X_space &B,\n                                          const X_space &C,\n                                          const response_space &phiBC,\n                                          const response_space &phiCB,\n                                          const X_space &XA,\n                                          const X_space &VBC) {\n  auto create_dipole = [&]() {\n    vector_real_function_3d dipole_vectors(3);\n    size_t i = 0;\n    // creates a vector of x y z dipole functions\n    for (auto &d : dipole_vectors) {\n      std::vector<int> f(3, 0);\n      f[i++] = 1;\n      d = real_factory_3d(world).functor(real_functor_3d(new MomentFunctor(f)));\n    }\n    return dipole_vectors;\n  };\n\n  auto dipole_vectors = create_dipole(); // x y z\n  truncate(dipole_vectors, FunctionDefaults<3>::get_thresh(), true);\n\n  int num_elements = static_cast<int>(XA.num_states() * phiBC.num_states);\n  std::vector<std::string> beta_indices(num_elements);\n  Tensor<double> beta(num_elements);\n\n  int i = 0;\n  for (int a = 0; a < XA.num_states(); a++) {\n    int bc = 0;\n    for (const auto &[b, c] : this->BC_index_pairs) {\n\n      auto one = dot(world, B.x[b], C.y[c] * dipole_vectors[a]);\n      auto three = dot(world, C.x[c], B.y[b] * dipole_vectors[a]);\n      auto two = dot(world, phiBC.x[bc], ground_orbitals * dipole_vectors[a]);\n      auto four = dot(world, phiCB.x[bc], ground_orbitals * dipole_vectors[a]);\n      auto five = dot(world, XA.x[a], VBC.x[bc], true);\n      auto six = dot(world, XA.y[a], VBC.y[bc], true);\n\n      auto one_trace = one.trace();\n      auto two_trace = two.trace();\n      auto three_trace = three.trace();\n      auto four_trace = four.trace();\n      auto five_trace = five.trace();\n      auto six_trace = six.trace();\n\n      beta[i] = one_trace + two_trace + three_trace + four_trace + five_trace +\n                six_trace;\n\n      beta_indices[i] = xyz[a] + (xyz[b] + xyz[c]);\n      i++;\n      bc++;\n    }\n  }\n\n  return {-2.0 * beta, beta_indices};\n}\n\nstd::pair<Tensor<double>, std::vector<std::string>>\nQuadraticResponse::compute_beta_v2(World &world, const double &omega_b,\n                                   const double &omega_c) {\n  // step 0: construct all response vectors\n  auto XA = -1.0 * x_data[0].first.copy();\n  auto B = x_data[1].first.copy();\n  auto C = x_data[2].first.copy();\n\n  auto vec_a = copyToVector(XA);\n  auto vec_b = copyToVector(B);\n  auto vec_c = copyToVector(C);\n\n  vector_real_function_3d dipole_vectors(3);\n  size_t k = 0;\n  // creates a vector of x y z dipole functions\n  for (auto &d : dipole_vectors) {\n    std::vector<int> f(3, 0);\n    f[k++] = 1;\n    d = real_factory_3d(world).functor(real_functor_3d(new MomentFunctor(f)));\n  }\n  truncate(world, dipole_vectors, FunctionDefaults<3>::get_thresh(), true);\n  bool save = false;\n  bool load = false;\n  bool compute = true;\n  path vbc_archive = \"vbc_archive\";\n\n  if (compute) {\n    this->VBC = compute_second_order_perturbation_terms_v3(\n        world, B, C, ground_orbitals, dipole_vectors);\n    if (save) {\n      save_x_space(world, vbc_archive.stem().string(), this->VBC);\n    }\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  world.gop.fence();\n  auto compute_beta = [&]() {\n    auto vA = response_space(world, 3, B.num_orbitals());\n    auto vAphi = response_space(world, 3, B.num_orbitals());\n    auto CB = response_space(world, 9, B.num_orbitals());\n    auto BC = response_space(world, 9, B.num_orbitals());\n    {\n\n      for (int i = 0; i < 3; i++) {\n        vAphi.x[i] = mul(world, dipole_vectors[i], ground_orbitals, true);\n        for (int j = 0; j < B.num_orbitals(); j++) {\n          vA.x[i][j] = dipole_vectors[i];\n        }\n      }\n\n      int i = 0;\n      for (auto [b, c] : BC_index_pairs) {\n        CB.x[i] = mul(world, C.y[c], B.x[b], true);\n        BC.x[i] = mul(world, B.y[b], C.x[c], true);\n        i++;\n      }\n    }\n    world.gop.fence();\n    auto beta_xa_vbc = inner(XA, VBC);\n    auto beta_abc = response_space_inner(vA, BC);\n    auto beta_acb = response_space_inner(vA, CB);\n\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n\n    std::vector<int> bidx;\n    std::vector<int> cidx;\n\n    int bc = 0;\n    for (const auto [b, c] : BC_index_pairs) {\n      bidx.push_back(b);\n      cidx.push_back(c);\n    }\n\n    auto make_zeta_bc = [&](const vector_real_function_3d &by,\n                            const vector_real_function_3d &cx,\n                            const vector_real_function_3d &ground_orbitals) {\n      auto matrix_bc = matrix_inner(world, by, cx);\n      return -1.0 * transform(world, ground_orbitals, matrix_bc, true);\n    };\n\n    //  auto ztask = ComputeZetaBC(static_cast<int>(ground_orbitals.size()));\n\n    auto phiBC =\n        response_space(world, BC_index_pairs.size(), ground_orbitals.size());\n    auto phiCB =\n        response_space(world, BC_index_pairs.size(), ground_orbitals.size());\n\n    for (int i = 0; i < BC_index_pairs.size(); i++) {\n      auto [b, c] = BC_index_pairs[i];\n      phiBC.x[i] = make_zeta_bc(B.y[b], C.x[c], ground_orbitals);\n      phiCB.x[i] = make_zeta_bc(C.y[c], B.x[b], ground_orbitals);\n    }\n\n    if (r_params.print_level() >= 1) {\n      molresponse::end_timer(world, \"Zeta(BC) and Zeta(CB)\");\n    }\n\n    auto beta_va_phibc = response_space_inner(vAphi, phiBC);\n    auto beta_va_phicb = response_space_inner(vAphi, phiCB);\n    world.gop.fence();\n\n    if (world.rank() == 0) {\n      print(\"beta_xa_vbc: \", beta_xa_vbc);\n      print(\"beta_abc: \", beta_abc);\n      print(\"beta_acb: \", beta_acb);\n      print(\"beta_va_phibc: \", beta_va_phibc);\n      print(\"beta_va_phicb: \", beta_va_phicb);\n    }\n\n    auto beta_tensor = -2.0 * (beta_xa_vbc + beta_va_phibc + beta_va_phicb +\n                               beta_abc + beta_acb);\n    if (world.rank() == 0) {\n      print(\"beta_tensor: \", beta_tensor);\n    }\n    return beta_tensor;\n  };\n\n  auto beta_tensor = compute_beta();\n\n  bool debug_beta = false;\n  /*if (debug_beta) {*/\n  /**/\n  /*  if (r_params.print_level() >= 1) {*/\n  /*    molresponse::end_timer(world, \"compute_beta_tensor\");*/\n  /*  }*/\n  /*  if (r_params.print_level() >= 1) {*/\n  /*    molresponse::start_timer(world);*/\n  /*  }*/\n  /**/\n  /*  auto vec_vbc = copyToVector(VBC);*/\n  /*  ComputeBetaTask btask;*/\n  /*  MacroTask beta_task(world, btask);*/\n  /*  vector<int> index_a;*/\n  /*  vector<int> index_bc;*/\n  /*  vector<int> index_b;*/\n  /*  vector<int> index_c;*/\n  /*  std::vector<std::string> beta_indices;*/\n  /**/\n  /*  Tensor<double> beta_tensor_2 = Tensor<double>(27);*/\n  /*  for (int a = 0; a < XA.num_states(); a++) {*/\n  /*    int bc = 0;*/\n  /*    for (const auto &[b, c] : this->BC_index_pairs) {*/\n  /*      index_a.push_back(a);*/\n  /*      index_b.push_back(b);*/\n  /*      index_c.push_back(c);*/\n  /*      beta_indices.push_back(xyz[a] + xyz[b] + xyz[c]);*/\n  /*      index_bc.push_back(bc++);*/\n  /*    }*/\n  /*  }*/\n  /**/\n  /*  auto vec_phiBC = copyToVector(phiBC);*/\n  /*  auto vec_phiCB = copyToVector(phiCB);*/\n  /*  auto vbc = copyToVector(VBC);*/\n  /**/\n  /*  auto beta =*/\n  /*      beta_task(index_bc, index_a, index_b, index_c, vec_a, vec_b, vec_c,*/\n  /*                vec_phiBC, vec_phiCB, ground_orbitals, dipole_vectors,\n   * vbc);*/\n  /**/\n  /*  Tensor<double> bt(static_cast<long>(beta.size()));*/\n  /*  for (long i = 0; i < beta.size(); i++) {*/\n  /*    bt[i] = beta[i]->get();*/\n  /*  }*/\n  /**/\n  /*  if (r_params.print_level() >= 1) {*/\n  /*    molresponse::end_timer(world, \"compute_beta_tensor_original\");*/\n  /*    if (world.rank() == 0) {*/\n  /*      print(\"beta: \", bt);*/\n  /*    }*/\n  /*  }*/\n  /*}*/\n\n  std::vector<std::string> beta_indices;\n  for (int a = 0; a < XA.num_states(); a++) {\n    for (const auto &[b, c] : this->BC_index_pairs) {\n      beta_indices.push_back(xyz[a] + xyz[b] + xyz[c]);\n    }\n  }\n\n  return {beta_tensor, beta_indices};\n}\n\nTensor<double> QuadraticResponse::compute_beta(World &world) {\n\n  // construct an X_space containing phi0 copies\n\n  // bsh_X = oop_apply(bsh_X, apply_projector);\n  QProjector<double, 3> projector(ground_orbitals);\n  auto apply_projector = [&](auto &xi) { return projector(xi); };\n\n  auto perturbation_A = generator(world, *this);\n  auto XA = -1.0 * x_data[0].first.copy();\n\n  // first step to compute beta is to construct the X_space representations of\n  // the virt/virt and occ/occ blocks of gamma\n\n  auto [XB, XC] = setup_XBC(world, 0.0, 0.0);\n  X_space phi0 = X_space(world, XB.num_states(), XC.num_orbitals());\n  for (auto i = 0; i < phi0.num_states(); i++) {\n    phi0.x[i] = copy(world, ground_orbitals);\n    phi0.y[i] = copy(world, ground_orbitals);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto [zeta_bc_left, zeta_bc_right, zeta_cb_left, zeta_cb_right] =\n      compute_zeta_response_vectors(world, XB, XC);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"Zeta(BC) and Zeta(CB)\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto VBC = compute_second_order_perturbation_terms(\n      world, XB, XC, zeta_bc_left, zeta_bc_right, zeta_cb_left, zeta_cb_right,\n      phi0);\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"V(BC) and V(CB)\");\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto beta = compute_beta_tensor(world, zeta_bc_left, zeta_bc_right,\n                                  zeta_cb_left, zeta_cb_right, XA, VBC);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"compute_beta_tensor\");\n  }\n  return beta.first;\n}\n\nstd::pair<X_space, X_space>\nQuadraticResponse::compute_first_order_fock_matrix_terms_v2(\n    World &world, const X_space &B, const X_space &C, const X_space &g1b,\n    const X_space &g1c, const X_space &VB, const X_space &VC,\n    const X_space &phi0) const {\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto f1b = g1b + VB;\n  auto f1c = g1c + VC;\n\n  auto FBC = X_space(world, VB.num_states(), VB.num_orbitals());\n  auto FCB = X_space(world, VB.num_states(), VB.num_orbitals());\n  // Here contains the y components\n  for (auto i = 0; i < VB.num_states(); i++) {\n\n    auto fbx = matrix_inner(world, phi0.x[i], f1b.x[i]);\n    auto fbx_dagger = matrix_inner(world, phi0.y[i], f1b.y[i]);\n    auto fcx = matrix_inner(world, phi0.x[i], f1c.x[i]);\n    auto fc_dagger = matrix_inner(world, phi0.y[i], f1c.y[i]);\n\n    FBC.x[i] = copy(world, transform(world, C.x[i], fbx, true), true);\n    FBC.y[i] = copy(world, transform(world, C.y[i], fbx_dagger, true), true);\n    FCB.x[i] = copy(world, transform(world, B.x[i], fcx, true), true);\n    FCB.y[i] = copy(world, transform(world, B.y[i], fc_dagger, true), true);\n  }\n\n  FBC.truncate();\n  FCB.truncate();\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"Fock transformation terms\");\n  }\n  return {FBC, FCB};\n}\n// computes <phi0|Fa|phi0> * XB\n// where Fa=g1[xa]+va\nstd::pair<X_space, X_space>\nQuadraticResponse::compute_first_order_fock_matrix_terms(\n    World &world, const X_space &B, const X_space &phi0,\n    const X_space &C) const {\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto g1a = compute_g1_term(world, B, phi0, phi0);\n  auto g1b = compute_g1_term(world, C, phi0, phi0);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"VBC: first_order_terms: compute g1 terms\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto [VB, VC] = dipole_perturbation(world, phi0, phi0);\n\n  auto f1a = g1a + VB;\n  auto f1b = g1b + VC;\n\n  auto FAXB = X_space(world, B.num_states(), B.num_orbitals());\n  auto FBXA = X_space(world, B.num_states(), B.num_orbitals());\n  // Here contains the y components\n  for (auto i = 0; i < B.num_states(); i++) {\n\n    auto fax = matrix_inner(world, phi0.x[i], f1a.x[i]);\n    auto fax_dagger = matrix_inner(world, phi0.y[i], f1a.y[i]);\n    auto fbx = matrix_inner(world, phi0.x[i], f1b.x[i]);\n    auto fb_dagger = matrix_inner(world, phi0.y[i], f1b.y[i]);\n\n    FAXB.x[i] = copy(world, transform(world, C.x[i], fax, true), true);\n    FAXB.y[i] = copy(world, transform(world, C.y[i], fax_dagger, true), true);\n    FBXA.x[i] = copy(world, transform(world, B.x[i], fbx, true), true);\n    FBXA.y[i] = copy(world, transform(world, B.y[i], fb_dagger, true), true);\n  }\n\n  FAXB.truncate();\n  FBXA.truncate();\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"VBC: first_order_terms: compute FBC terms\");\n  }\n  world.gop.fence();\n\n  return {FAXB, FBXA};\n}\nstd::tuple<X_space, X_space, X_space, X_space, X_space, X_space>\nQuadraticResponse::compute_beta_coulomb(World &world, const X_space &B,\n                                        const X_space &C,\n                                        const X_space &zeta_bc_left,\n                                        const X_space &zeta_bc_right,\n                                        const X_space &zeta_cb_left,\n                                        const X_space &zeta_cb_right,\n                                        const X_space &phi0) {\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto zeta_bc = compute_coulomb_term(world, zeta_bc_left, zeta_bc_right, phi0);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"j: zeta_bc\");\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto zeta_cb = compute_coulomb_term(world, zeta_cb_left, zeta_cb_right, phi0);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"j: zeta_cb\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto bxc = compute_coulomb_term(world, B, phi0, C);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"j: bphi0c\");\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto cxb = compute_coulomb_term(world, C, phi0, B);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"j: cphi0B\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto bphi0 = compute_coulomb_term(world, B, phi0, phi0);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"j: bphi0_phi0\");\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto cphi0 = compute_coulomb_term(world, C, phi0, phi0);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"j: cphi0_phi0\");\n  }\n\n  world.gop.fence();\n\n  return {zeta_bc, zeta_cb, bxc, cxb, bphi0, cphi0};\n}\nstd::tuple<X_space, X_space, X_space, X_space, X_space, X_space>\nQuadraticResponse::compute_beta_exchange(World &world, const X_space &B,\n                                         const X_space &C,\n                                         const X_space &zeta_bc_left,\n                                         const X_space &zeta_bc_right,\n                                         const X_space &zeta_cb_left,\n                                         const X_space &zeta_cb_right,\n                                         const X_space &phi0) {\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto zeta_bc =\n      compute_exchange_term(world, zeta_bc_left, zeta_bc_right, phi0);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"k: zeta_bc\");\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto zeta_cb =\n      compute_exchange_term(world, zeta_cb_left, zeta_cb_right, phi0);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"k: zeta_cb\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto bxc = compute_exchange_term(world, B, phi0, C);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"k: bphi0c\");\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto cxb = compute_exchange_term(world, C, phi0, B);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"k: cphi0B\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto bphi0 = compute_exchange_term(world, B, phi0, phi0);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"k: bphi0_phi0\");\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto cphi0 = compute_exchange_term(world, C, phi0, phi0);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"k: cphi0_phi0\");\n  }\n\n  world.gop.fence();\n  return {zeta_bc, zeta_cb, bxc, cxb, bphi0, cphi0};\n}\n\nX_space QuadraticResponse::compute_second_order_perturbation_terms_v2(\n    World &world, const X_space &B, const X_space &C,\n    const X_space &zeta_bc_left, const X_space &zeta_bc_right,\n    const X_space &zeta_cb_left, const X_space &zeta_cb_right,\n    const X_space &phi0) {\n\n  auto [j_zeta_bc, j_zeta_cb, j_bxc, j_cxb, j_bphi0, j_cphi0] =\n      compute_beta_coulomb(world, B, C, zeta_bc_left, zeta_bc_right,\n                           zeta_cb_left, zeta_cb_right, phi0);\n  auto [k_zeta_bc, k_zeta_cb, k_bxc, k_cxb, k_bphi0, k_cphi0] =\n      compute_beta_exchange(world, B, C, zeta_bc_left, zeta_bc_right,\n                            zeta_cb_left, zeta_cb_right, phi0);\n\n  // The first term to compute is -Q g1[K^BC], -Q g1[K^BC_conjugate]\n  QProjector<double, 3> projector(ground_orbitals);\n  auto apply_projector = [&](auto &xi) { return projector(xi); };\n  // sum k and j terms\n  //\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto g_zeta_bc = 2.0 * j_zeta_bc - k_zeta_bc;\n  auto g_zeta_cb = 2.0 * j_zeta_cb - k_zeta_cb;\n\n  g_zeta_bc = -1.0 * oop_apply(g_zeta_bc, apply_projector, true);\n  g_zeta_cb = -1.0 * oop_apply(g_zeta_cb, apply_projector, true);\n\n  auto norms_g_zeta_bc_x = g_zeta_bc.x.norm2();\n  auto norms_g_zeta_bc_y = g_zeta_bc.y.norm2();\n  auto norms_g_zeta_cb_x = g_zeta_cb.x.norm2();\n  auto norms_g_zeta_cb_y = g_zeta_cb.y.norm2();\n\n  auto g_bxc = 2.0 * j_bxc - k_bxc;\n  auto g_cxb = 2.0 * j_cxb - k_cxb;\n\n  auto norm_gbxc_x = g_bxc.x.norm2();\n  auto norm_gbxc_y = g_bxc.y.norm2();\n  auto norm_gcxb_x = g_cxb.x.norm2();\n  auto norm_gcxb_y = g_cxb.y.norm2();\n\n  auto g1b = 2.0 * j_bphi0 - k_bphi0;\n  auto g1c = 2.0 * j_cphi0 - k_cphi0;\n\n  auto norms_g1b_x = g1b.x.norm2();\n  auto norms_g1b_y = g1b.y.norm2();\n  auto norms_g1c_x = g1c.x.norm2();\n  auto norms_g1c_y = g1c.y.norm2();\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"summing k and j terms\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  auto [v_bxc, v_cxb] = dipole_perturbation(world, B, C);\n\n  auto norms_v_bxc_x = v_bxc.x.norm2();\n  auto norms_v_bxc_y = v_bxc.y.norm2();\n  auto norms_v_cxb_x = v_cxb.x.norm2();\n  auto norms_v_cxb_y = v_cxb.y.norm2();\n\n  auto f_bxc = v_bxc + g_bxc;\n  auto f_cxb = v_cxb + g_cxb;\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  f_bxc = -1.0 * oop_apply(f_bxc, apply_projector, true);\n  f_cxb = -1.0 * oop_apply(f_cxb, apply_projector, true);\n  g_zeta_bc.truncate();\n  g_zeta_cb.truncate();\n  f_bxc.truncate();\n  f_cxb.truncate();\n\n  auto norm_fbxc_x = f_bxc.x.norm2();\n  auto norm_fbxc_y = f_bxc.y.norm2();\n  auto norm_fcxb_x = f_cxb.x.norm2();\n  auto norm_fcxb_y = f_cxb.y.norm2();\n\n  world.gop.fence();\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"projecting terms\");\n  }\n\n  auto [VBphi0, VCphi0] = dipole_perturbation(world, phi0, phi0);\n\n  auto norms_v_bphi0x = VBphi0.x.norm2();\n  auto norms_v_bphi0y = VBphi0.y.norm2();\n  auto norms_v_cphi0x = VCphi0.x.norm2();\n  auto norms_v_cphi0y = VCphi0.y.norm2();\n\n  auto [FBC, FCB] = compute_first_order_fock_matrix_terms_v2(\n      world, B, C, g1b, g1c, VBphi0, VCphi0, phi0);\n\n  auto norms_fbc_x = FBC.x.norm2();\n  auto norms_fbc_y = FBC.y.norm2();\n  auto norms_fcb_x = FCB.x.norm2();\n  auto norms_fcb_y = FCB.y.norm2();\n  if (world.rank() == 0) {\n    print(\"------------------------------------\");\n    print(\"norms_g_zeta_bc 1ax: \", norms_g_zeta_bc_x);\n    print(\"norms_g_zeta_bc 1ay: \", norms_g_zeta_bc_y);\n    print(\"norms_g_bxc 2ax: \", norm_gbxc_x);\n    print(\"norms_g_bxc 2ay: \", norm_gbxc_y);\n    print(\"norms_g1b 3ax: \", norms_g1b_x);\n    print(\"norms_g1b 3ay: \", norms_g1b_y);\n    print(\"norms_v_bxc 4ax: \", norms_v_bxc_x);\n    print(\"norms_v_bxc 4ay: \", norms_v_bxc_y);\n    print(\"norm_fbxc 5ax: \", norm_fbxc_x);\n    print(\"norm_fbxc 5ay: \", norm_fbxc_y);\n    print(\"norms_v_bphi0 6ax: \", norms_v_bphi0x);\n    print(\"norms_v_bphi0 6ay: \", norms_v_bphi0y);\n    print(\"norms_fbc 7ax: \", norms_fbc_x);\n    print(\"norms_fbc 7ay: \", norms_fbc_y);\n    print(\"------------------------------------\");\n    print(\"norms_g_zeta_cb 1bx: \", norms_g_zeta_cb_x);\n    print(\"norms_g_zeta_cb 1by: \", norms_g_zeta_cb_y);\n    print(\"norms_g_cxb 2bx: \", norm_gcxb_x);\n    print(\"norms_g_cxb 2by: \", norm_gcxb_y);\n    print(\"norms_g1c 3bx: \", norms_g1c_x);\n    print(\"norms_g1c 3by: \", norms_g1c_y);\n    print(\"norms_v_cxb 4bx: \", norms_v_cxb_x);\n    print(\"norms_v_cxb 4by: \", norms_v_cxb_y);\n    print(\"norm_fcxb 5bx: \", norm_fcxb_x);\n    print(\"norm_fcxb 5by: \", norm_fcxb_y);\n    print(\"norms_v_cphi0 6bx: \", norms_v_cphi0x);\n    print(\"norms_v_cphi0 6by: \", norms_v_cphi0y);\n    print(\"norms_fcb 7bx: \", norms_fcb_x);\n    print(\"norms_fcb 7by: \", norms_fcb_y);\n    print(\"------------------------------------\");\n  }\n\n  auto VBC = g_zeta_bc + g_zeta_cb + f_bxc + f_cxb + FBC + FCB;\n  VBC.truncate();\n  return VBC;\n  // the next term we need to compute are the first order fock matrix terms\n}\n\nX_space QuadraticResponse::compute_second_order_perturbation_terms_v3(\n    World &world, const X_space &B, const X_space &C,\n    const vector_real_function_3d &phi0,\n    const vector_real_function_3d &dipole_vectors) {\n\n  // auto VBC_compare = this->VBC;\n\n  VBC = X_space(world, BC_index_pairs.size(), B.num_orbitals());\n  auto VBC_debug = X_space(world, BC_index_pairs.size(), B.num_orbitals());\n  auto num_states = BC_index_pairs.size();\n\n  bool debug = false;\n  bool compute_debug = false;\n  if (debug) {\n\n    path vbc_archive = \"vbc_archive\";\n\n    if (fs::exists(vbc_archive.replace_extension(\".00000\"))) {\n      if (world.rank() == 0) {\n        print(\"Loading VBC from archive\");\n      }\n      VBC_debug = load_x_space(world, vbc_archive.stem().string());\n      compute_debug = false;\n    } else {\n      if (world.rank() == 0) {\n        print(\"Computing VBC\");\n      }\n    }\n  }\n  auto vec_b = copyToVector(B);\n  auto vec_c = copyToVector(C);\n  /*if (compute_debug) {*/\n  /*  std::vector<int> bidx;*/\n  /*  std::vector<int> cidx;*/\n  /*  std::vector<int> ii;*/\n  /*  int i = 1;*/\n  /*  for (const auto [b, c] : BC_index_pairs) {*/\n  /*    ii.push_back(i);*/\n  /*    bidx.push_back(b);*/\n  /*    cidx.push_back(c);*/\n  /*  }*/\n  /*  auto stride = phi0.size() * 2;*/\n  /*  if (r_params.print_level() >= 1) {*/\n  /*    molresponse::start_timer(world);*/\n  /*  }*/\n  /**/\n  /*  VBC_task2 t(static_cast<int>(stride));*/\n  /*  MacroTask task_vbc(world, t);*/\n  /*  task_vbc.set_name(\"VBC\");*/\n  /*  if (r_params.print_level() >= 1) {*/\n  /*    std::string message = \"VBC[all]\";*/\n  /*    molresponse::end_timer(world, message.c_str());*/\n  /*  }*/\n  /*}*/\n  /*if (debug && compute_debug) {*/\n  /*  save_x_space(world, \"vbc_archive\", VBC_debug);*/\n  /*}*/\n\n  std::vector<int> bb_idx;\n  std::vector<int> cc_idx;\n  std::vector<int> orb_indx;\n  std::vector<int> state_index;\n\n  auto num_orbs_per_state = B.num_orbitals() * 2;\n\n  int orb_num = 0;\n  int state_num = 0;\n  for (const auto [b, c] : BC_index_pairs) {\n    for (int i = 0; i < num_orbs_per_state; i++) {\n      bb_idx.push_back(b);\n      cc_idx.push_back(c);\n      orb_indx.push_back(orb_num++);\n      state_index.push_back(state_num);\n    }\n    state_num++;\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  // VBC_task_i t2;\n  vector_real_function_3d vbc_one;\n  vector_real_function_3d vbc_two_a;\n  vector_real_function_3d vbc_two_b;\n  vector_real_function_3d vbc_three;\n  {\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n    VBC_task_one_i t1;\n    MacroTask task_one(world, t1);\n    vbc_one = task_one(bb_idx, cc_idx, vec_b, vec_c, phi0);\n    if (r_params.print_level() >= 1) {\n      std::string message = \"VBC_one\";\n      molresponse::end_timer(world, message.c_str());\n    }\n  }\n  {\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n    VBC_task_two_i t2a;\n    MacroTask task_two_a(world, t2a);\n    // The new vbc task onew will pass same data as task one and construct zeta\n    // within the task\n    vbc_two_a = task_two_a(bb_idx, cc_idx, vec_b, vec_c, phi0);\n    if (r_params.print_level() >= 1) {\n      std::string message = \"VBC_two_a\";\n      molresponse::end_timer(world, message.c_str());\n    }\n  }\n\n  {\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n    VBC_task_two_i t2b;\n\n    MacroTask task_two_b(world, t2b);\n    vbc_two_b = task_two_b(cc_idx, bb_idx, vec_c, vec_b, phi0);\n    if (r_params.print_level() >= 1) {\n      std::string message = \"VBC_two_b\";\n      molresponse::end_timer(world, message.c_str());\n    }\n  }\n  {\n\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n    VBC_task_three_i t3;\n    MacroTask task_three(world, t3);\n    vbc_three = task_three(bb_idx, cc_idx, vec_b, vec_c, phi0, dipole_vectors);\n    if (r_params.print_level() >= 1) {\n      std::string message = \"VBC_three\";\n      molresponse::end_timer(world, message.c_str());\n    }\n  }\n\n  auto vbc_i = vbc_one + vbc_two_a + vbc_two_b + vbc_three;\n  truncate(world, vbc_i);\n  copyToXspace(vbc_i, VBC);\n  if (r_params.print_level() >= 1) {\n    std::string message = \"VBC[all]_i\";\n    molresponse::end_timer(world, message.c_str());\n  }\n\n  if (debug) {\n\n    int i = 0;\n    if (world.rank() == 0) {\n      print(\"VBC norms for each x and y state\");\n    }\n    for (const auto [b, c] : BC_index_pairs) {\n\n      auto vbx_norm = norm2s(world, VBC.x[i]);\n      auto vby_norm = norm2s(world, VBC.y[i]);\n\n      auto compare_norm = norm2s(world, VBC_debug.x[i]);\n      auto compare_norm_y = norm2s(world, VBC_debug.y[i]);\n\n      auto rxi = VBC.x[i] - VBC_debug.x[i];\n      auto ryi = VBC.y[i] - VBC_debug.y[i];\n\n      auto rxi_norm = norm2(world, rxi);\n      auto ryi_norm = norm2(world, ryi);\n\n      if (world.rank() == 0) {\n        print(\"VBC.x[ \", b, \",\", c, \"]:\\nvbc:  \", vbx_norm,\n              \"\\ndebug: \", compare_norm, \"\\nres:  \", rxi_norm);\n\n        print(\"VBC.y[ \", b, \",\", c, \"]:\\nvbc:  \", vby_norm,\n              \"\\ndebug: \", compare_norm_y, \"\\nres:  \", ryi_norm);\n      }\n      i++;\n    }\n  }\n  if (debug) {\n    return VBC_debug;\n  } else {\n    return VBC;\n  }\n}\n\nX_space QuadraticResponse::compute_second_order_perturbation_terms(\n    World &world, const X_space &B, const X_space &C, const X_space &zeta_bc_x,\n    const X_space &zeta_bc_y, const X_space &zeta_cb_x,\n    const X_space &zeta_cb_y, const X_space &phi0) {\n  // The first term to compute is -Q g1[K^BC], -Q g1[K^BC_conjugate]\n  QProjector<double, 3> projector(ground_orbitals);\n  auto apply_projector = [&](auto &xi) { return projector(xi); };\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  // We have 2 terms to compute because we need to compute the contributions\n  // of BC and CB terms\n  auto g1_zbc =\n      -1.0 * oop_apply(compute_g1_term(world, zeta_bc_x, zeta_bc_y, phi0),\n                       apply_projector);\n  auto g1_zcb =\n      -1.0 * oop_apply(compute_g1_term(world, zeta_cb_x, zeta_cb_y, phi0),\n                       apply_projector);\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"g1[zeta_bc] and g1[zeta_cb]\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  // the next term we need to compute are the first order fock matrix terms\n  // -Q FB*XC\n  auto g1bxc =\n      -1.0 * oop_apply(compute_g1_term(world, B, phi0, C), apply_projector);\n  // -Q FC*XB\n  auto g1cxb =\n      -1.0 * oop_apply(compute_g1_term(world, C, phi0, B), apply_projector);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"g1[B]C and g1[C]B\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  // -Q ( FB ) * ( XC )\n  auto [vbxc, vcxb] = dipole_perturbation(world, C, B);\n\n  vbxc = -1.0 * oop_apply(vbxc, apply_projector, false);\n  vcxb = -1.0 * oop_apply(vcxb, apply_projector, false);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"V(B)C and VA(C)B\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto [zFBzC, zFCzB] =\n      compute_first_order_fock_matrix_terms(world, B, phi0, C);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"FB[i,j]*C and FC[i,j]*B\");\n  }\n\n  auto one = g1_zbc + g1_zcb;\n  auto one_norms = one.norm2s();\n\n  auto two = g1bxc + g1cxb + vbxc + vcxb;\n  auto two_norms = two.norm2s();\n\n  auto three = zFBzC + zFCzB;\n  auto three_norms = three.norm2s();\n  if (world.rank() == 0) {\n    print(\"one: \", one_norms);\n    print(\"two: \", two_norms);\n    print(\"three: \", three_norms);\n  }\n\n  return g1_zbc + g1_zcb + g1bxc + g1cxb + zFBzC + zFCzB + vbxc + vcxb;\n\n  // the next term we need to compute are the first order fock matrix terms\n}\nstd::pair<response_space, response_space>\nQuadraticResponse::compute_phiBC_terms(World &world, const X_space &B,\n                                       const X_space &C) {\n\n  response_space phiBC(world, BC_index_pairs.size(), B.num_orbitals());\n  response_space phiCB(world, BC_index_pairs.size(), B.num_orbitals());\n  // Here contains the y components\n  // construct tilde_phi_dagger(bc) and tilde_phi_dagger(cb)\n  // where tilde_phi_dagger(bc)_i = \\sum_j <y_i(b) | x_j(c)> * phi0_j\n\n  int i = 0;\n  for (const auto [b, c] : BC_index_pairs) {\n\n    auto matrix_bycx = matrix_inner(world, B.y[b], C.x[c]);\n    phiBC[i] = -1.0 * transform(world, ground_orbitals, matrix_bycx, true);\n    auto matrix_cybx =\n        matrix_inner(world, C.y[b], B.x[c]); // This looks like a bug\n    phiCB[i] = -1.0 * transform(world, ground_orbitals, matrix_cybx, true);\n    i++;\n  }\n  return {phiBC, phiCB};\n}\n\n/**\n * @ brief computes the occ/occ and virt/virt blocks of second order gamma\n * which leads to 4 space objects ABX,ABY,BAX, and BAY where ABX contains A.X\n * and phitildeab and ABY contains B.Y and phi0\n *\n *\n * @param world\n * @param B\n * @param C\n * @return\n */\n\nstd::tuple<X_space, X_space, X_space, X_space>\nQuadraticResponse::compute_zeta_response_vectors(World &world, const X_space &B,\n                                                 const X_space &C) {\n\n  // zeta_bc_x=[x(b),tilde_phi_dagger(bc)]\n  // zeta_bc_y=[y_dagger(c),phi_0]\n  // zeta_cb_x=[x(c),tilde_phi_dagger(cb)]\n  // zeta_cb_y=[y_dagger(b),phi_0]\n\n  X_space zeta_bc_left = X_space(world, B.num_states(), C.num_orbitals());\n  X_space zeta_bc_right = X_space(world, B.num_states(), C.num_orbitals());\n\n  X_space zeta_cb_left = X_space(world, C.num_states(), B.num_orbitals());\n  X_space zeta_cb_right = X_space(world, C.num_states(), B.num_orbitals());\n\n  // Here are all the x components\n  for (auto i = 0; i < B.num_states(); i++) {\n    zeta_bc_left.x[i] = copy(world, B.x[i], false);\n    zeta_cb_left.x[i] = copy(world, C.x[i], false);\n\n    zeta_bc_right.x[i] = copy(world, C.y[i], false);\n    zeta_cb_right.x[i] = copy(world, B.y[i], false);\n\n    zeta_cb_right.y[i] = copy(world, ground_orbitals, false);\n    zeta_bc_right.y[i] = copy(world, ground_orbitals, false);\n  }\n  world.gop.fence();\n\n  // Here contains the y components\n  // construct tilde_phi_dagger(bc) and tilde_phi_dagger(cb)\n  // where tilde_phi_dagger(bc)_i = \\sum_j <y_i(b) | x_j(c)> * phi0_j\n  for (auto i = 0; i < B.num_states(); i++) {\n\n    auto matrix_bycx = matrix_inner(world, B.y[i], C.x[i]);\n    auto tilde_phi_bc =\n        -1.0 * transform(world, ground_orbitals, 1.0 * matrix_bycx, true);\n    zeta_bc_left.y[i] = copy(world, tilde_phi_bc, true);\n\n    auto matrix_cybx = matrix_inner(world, C.y[i], B.x[i]);\n    auto tilde_phi_cb =\n        -1.0 * transform(world, ground_orbitals, 1.0 * matrix_cybx, true);\n    zeta_cb_left.y[i] = copy(world, tilde_phi_cb, true);\n\n    // print the norms of each vector\n  }\n\n  zeta_bc_left.truncate();\n  zeta_bc_right.truncate();\n  zeta_cb_left.truncate();\n  zeta_cb_right.truncate();\n\n  return {zeta_bc_left, zeta_bc_right, zeta_cb_left, zeta_cb_right};\n}\n\nauto QuadraticResponse::dipole_perturbation(World &world, const X_space &left,\n                                            const X_space &right) const\n    -> std::pair<X_space, X_space> {\n\n  auto num_states = left.num_states();\n  MADNESS_ASSERT(num_states == right.num_states());\n\n  auto VB = X_space(world, left.num_states(), right.num_orbitals());\n  auto VC = X_space(world, left.num_states(), right.num_orbitals());\n\n  vector_real_function_3d dipole_vectors(3);\n  size_t i = 0;\n  // creates a vector of x y z dipole functions\n  for (auto &d : dipole_vectors) {\n    std::vector<int> f(3, 0);\n    f[i++] = 1;\n    d = real_factory_3d(world).functor(real_functor_3d(new MomentFunctor(f)));\n  }\n  truncate(world, dipole_vectors, FunctionDefaults<3>::get_thresh(), true);\n\n  for (int i = 0; i < num_states; i++) {\n\n    VB.x[i] = mul(world, dipole_vectors[index_B[i]], right.x[i], true);\n    VB.y[i] = mul(world, dipole_vectors[index_B[i]], right.y[i], true);\n\n    VC.x[i] = mul(world, dipole_vectors[index_C[i]], left.x[i], true);\n    VC.y[i] = mul(world, dipole_vectors[index_C[i]], left.y[i], true);\n  }\n  world.gop.fence();\n\n  VB.truncate();\n  VC.truncate();\n\n  return {VB, VC};\n}\n\n// compute the g1 term\n// we have 3 x_space which hold x and y components of the density matrix.\n//\nX_space QuadraticResponse::compute_g1_term(World &world, const X_space &left,\n                                           const X_space &right,\n                                           const X_space &apply) const {\n\n  auto JBC = compute_coulomb_term(world, left, right, apply);\n  auto KBC = compute_exchange_term(world, left, right, apply);\n\n  return 2 * JBC - KBC;\n}\n// compute rhoBC and apply to D\nX_space QuadraticResponse::compute_coulomb_term(World &world, const X_space &B,\n                                                const X_space &C,\n                                                const X_space &x_apply) const {\n\n  X_space J = X_space::zero_functions(world, B.num_states(), B.num_orbitals());\n  vector_real_function_3d rhoX(B.num_states());\n\n  vector_real_function_3d x_phi, y_phi;\n\n  // create the density for each state in B\n  // B.x[j] and B.y[j] are vectors fo functions\n  for (const auto &j : B.active) {\n    x_phi = mul(world, B.x[j], C.x[j], true);\n    y_phi = mul(world, B.y[j], C.y[j], true);\n\n    rhoX[j] = sum(world, x_phi, true);\n    rhoX[j] += sum(world, y_phi, true);\n  }\n  auto temp_J = apply(world, *shared_coulomb_operator, rhoX);\n\n  for (const auto &j : B.active) {\n    J.x[j] = mul(world, temp_J[j], x_apply.x[j], true);\n    J.y[j] = mul(world, temp_J[j], x_apply.y[j], true);\n  }\n\n  // truncate(world, rhoX);\n  J.truncate();\n\n  return J;\n}\n\nX_space QuadraticResponse::compute_exchange_term(World &world, const X_space &B,\n                                                 const X_space &C,\n                                                 const X_space &x_apply) const {\n\n  auto make_operator = [&](const vecfuncT &ket, const vecfuncT &bra) {\n    const double lo = 1.e-10;\n    auto &world = ket[0].world();\n    Exchange<double, 3> k{world, lo};\n    k.set_bra_and_ket(bra, ket);\n\n    std::string algorithm_ = r_params.hfexalg();\n\n    if (algorithm_ == \"multiworld\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient);\n    } else if (algorithm_ == \"multiworld_row\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient_row);\n    } else if (algorithm_ == \"largemem\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::large_memory);\n    } else if (algorithm_ == \"smallmem\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::small_memory);\n    }\n\n    return k;\n  };\n\n  // if the frequecy of A is 0 we run the static case\n  // else we run the dynamic case\n  auto K = X_space::zero_functions(world, B.num_states(), B.num_orbitals());\n\n  vector_real_function_3d xb;\n  vector_real_function_3d yb;\n  // compute_x\n  for (int k = 0; k < B.num_states(); k++) {\n\n    auto K1 = make_operator(B.x[k], C.x[k]);\n    auto k1 = K1(x_apply.x[k]);\n    auto K2 = make_operator(C.y[k], B.y[k]);\n    auto k2 = K2(x_apply.x[k]);\n    K.x[k] = gaxpy_oop(1.0, k1, 1.0, k2, true);\n  }\n  // compute_y\n  for (int k = 0; k < B.num_states(); k++) {\n    auto K1_conjugate = make_operator(B.y[k], C.y[k]);\n    auto k1_c = K1_conjugate(x_apply.y[k]);\n    auto K2_conjugate = make_operator(C.x[k], B.x[k]);\n    auto k2_c = K2_conjugate(x_apply.y[k]);\n    K.y[k] = gaxpy_oop(1.0, k1_c, 1.0, k2_c, true);\n  }\n\n  K.truncate();\n\n  return K;\n}\n\n//\nvoid PODResponse::compute_pod_modes(World &world) {\n  //\n  // 1. Convert the x_data into a response matrix\n  // 2. Compute the SVD of the response matrix\n  // 3. Compute the POD modes\n\n  // num calculations\n  auto num_states = x_data.size() * 3;\n  auto m = x_data.size();\n  auto n = x_data[0].first.num_orbitals();\n\n  auto all_chi = X_space(world, num_states, n);\n  if (world.rank() == 0)\n    print(\"m: \", m);\n  if (world.rank() == 0)\n    print(\"n: \", n);\n\n  for (auto i = 0; i < m; i++) {\n\n    // first step is to copy x_data_i into response_matrix_i\n    auto x_data_i = x_data[i].first;\n    for (auto j = 0; j < 3; j++) {\n      auto index = i * 3 + j;\n      if (world.rank() == 0)\n        print(\"index: \", index);\n      all_chi.x[index] = copy(world, x_data_i.x[j]);\n      all_chi.y[index] = copy(world, x_data_i.y[j]);\n    }\n  }\n\n  auto A = inner(all_chi, all_chi);\n\n  // eigen values and eigen vectors\n\n  // literally the same thing as the svd...\n  Tensor<double> e(static_cast<long>(num_states), 1);\n  Tensor<double> u(static_cast<long>(num_states),\n                   static_cast<long>(num_states));\n  syev(A, u, e);\n  // A = U * diag(s) * VT    for A real\n  // A = U * diag(s) * VH    for A complex\n  Tensor<double> VT(static_cast<long>(num_states),\n                    static_cast<long>(num_states));\n  Tensor<double> U(static_cast<long>(num_states),\n                   static_cast<long>(num_states));\n  Tensor<double> sigma(static_cast<long>(num_states));\n  svd(A, U, sigma, VT);\n  // create a json printing out the singular values\n  json j = {};\n  j[\"sigma\"] = tensor_to_json(sigma);\n  j[\"VT\"] = tensor_to_json(VT);\n  j[\"U\"] = tensor_to_json(U);\n  j[\"A\"] = tensor_to_json(A);\n  j[\"eigenvectors\"] = tensor_to_json(u);\n  j[\"eigenvalues\"] = tensor_to_json(e);\n\n  if (world.rank() == 0)\n    print(\"sigma: \", sigma);\n  if (world.rank() == 0)\n    print(\"VT: \", VT);\n  if (world.rank() == 0)\n    print(\"U: \", U);\n  if (world.rank() == 0)\n    print(\"A: \", A);\n\n  // compute the POD modes\n\n  if (world.rank() == 0) {\n    std::ofstream o(\"pod.json\");\n    o << std::setw(4) << j << std::endl;\n  }\n}\nvoid PODResponse::compute_pod_modes_2(World &world) {\n  //\n  // 1. Convert the x_data into a response matrix\n  // 2. Compute the SVD of the response matrix\n  // 3. Compute the POD modes\n  // In this strategy we will unpack all x and y response functions into a\n  // single vector.\n\n  // num calculations\n  auto num_states = x_data.size() * 3;\n  auto m = x_data.size();\n  auto n = x_data[0].first.num_orbitals();\n  auto total_orbitals = num_states * n * 2; // 2 for x and y\n\n  if (world.rank() == 0)\n    print(\"m: \", m);\n  if (world.rank() == 0)\n    print(\"n: \", n);\n\n  auto all_chi = X_space(world, num_states, n);\n  if (world.rank() == 0)\n    print(\"m: \", m);\n  if (world.rank() == 0)\n    print(\"n: \", n);\n\n  // Create one large x_space with each state\n  for (auto i = 0; i < m; i++) {\n    auto x_data_i = x_data[i].first;\n    for (auto j = 0; j < 3; j++) {\n      auto index = i * 3 + j;\n      all_chi.x[index] = copy(world, x_data_i.x[j]);\n      all_chi.y[index] = copy(world, x_data_i.y[j]);\n    }\n  }\n\n  // Turn into response matrix\n  auto all_x = to_response_matrix(all_chi);\n  vector_real_function_3d all_response_functions(total_orbitals);\n  // unpack all_x into a single vector\n  auto index = 0;\n  for (const auto &all_x_i : all_x) {\n    for (const auto &all_x_ij : all_x_i) {\n      all_response_functions[index++] = madness::copy(all_x_ij, false);\n    }\n  }\n  world.gop.fence();\n\n  // Compute the 2 pt correlation matrix between response functions  //\n  // contains both x and y components\n  auto A =\n      matrix_inner(world, all_response_functions, all_response_functions, true);\n\n  // auto A = inner(all_chi, all_chi);\n\n  // eigen values and eigen vectors\n\n  // literally the same thing as the svd...\n  Tensor<double> e(static_cast<long>(num_states), 1);\n  Tensor<double> u(static_cast<long>(num_states),\n                   static_cast<long>(num_states));\n  syev(A, u, e);\n\n  Tensor<double> UU(static_cast<long>(total_orbitals),\n                    static_cast<long>(total_orbitals));\n  Tensor<double> EE(static_cast<long>(total_orbitals), 1);\n\n  for (auto i = 0; i < total_orbitals; i++) {\n    auto index_i = total_orbitals - i - 1;\n    for (auto j = 0; j < total_orbitals; j++) {\n      UU(i, j) = u(static_cast<long>(index_i), j);\n    }\n    EE(i, 0) = e(static_cast<long>(index_i), 0);\n  }\n  // A = U * diag(s) * VT    for A real\n  // A = U * diag(s) * VH    for A complex\n  Tensor<double> VT(static_cast<long>(num_states),\n                    static_cast<long>(num_states));\n  Tensor<double> U(static_cast<long>(num_states),\n                   static_cast<long>(num_states));\n  Tensor<double> sigma(static_cast<long>(num_states));\n  svd(A, U, sigma, VT);\n  // create a json printing out the singular values\n  if (world.rank() == 0)\n    print(\"Eigenvlaues: \\n\", EE);\n\n  auto pod_modes = transform(world, all_response_functions, UU, false);\n  world.gop.fence();\n\n  double pod_threshold = 1e-6;\n  // find index of first sigma less than threshold\n  auto pod_index = 0;\n  for (auto i = 0; i < sigma.size(); i++) {\n    if (sigma[i] < pod_threshold) {\n      pod_index = i;\n      break;\n    }\n  }\n  if (world.rank() == 0)\n    print(\"pod_index: \", pod_index);\n  // select the last pod_index modes\n  auto num_modes = pod_index + 1;\n  auto pod_modes_selected = vector_real_function_3d(num_modes);\n\n  for (auto i = 0; i < num_modes; i++) {\n    pod_modes_selected[i] = copy(pod_modes[i], false) * (1 / EE[i]);\n  }\n  // normalize the pod modes\n  normalize(world, pod_modes_selected, true);\n  // auto etas = orthonormalize(pod_modes_selected);\n  auto etas = pod_modes_selected;\n  world.gop.fence();\n\n  // now compute the orbital energies of the pod modes\n  auto kinetic_energy = vector<double>(num_modes);\n\n  vecfuncT detax = apply(world, *(gradop[0]), etas, false);\n  vecfuncT detay = apply(world, *(gradop[1]), etas, false);\n  vecfuncT detaz = apply(world, *(gradop[2]), etas, false);\n  world.gop.fence();\n\n  auto dx2 = mul(world, detax, detax, false);\n  auto dy2 = mul(world, detay, detay, false);\n  auto dz2 = mul(world, detaz, detay, false);\n  world.gop.fence();\n  for (auto i = 0; i < num_modes; i++) {\n    kinetic_energy[i] = 0.5 * inner(detax[i], detax[i]) +\n                        0.5 * inner(detay[i], detay[i]) +\n                        0.5 * inner(detaz[i], detaz[i]);\n  }\n  world.gop.fence();\n  // print the kinetic energy of each mode\n  if (world.rank() == 0)\n    print(\"kinetic energy: \\n\", kinetic_energy);\n\n  // now get the nuclear energy for the system\n  auto nuclear_energy = vector<double>(num_modes);\n  auto vnuc = this->potential_manager->vnuclear();\n  auto vk = vnuc * square(world, etas);\n  for (auto i = 0; i < num_modes; i++) {\n    nuclear_energy[i] = inner(etas[i], vk[i]);\n  }\n  // print the nuclear energy of each mode\n  if (world.rank() == 0)\n    print(\"nuclear energy: \\n\", nuclear_energy);\n  auto ground_orbitals = this->get_orbitals();\n  // compute ground density\n  auto ground_density = 2.0 * sum(world, square(world, ground_orbitals), true);\n  auto coulomb_j = apply(*shared_coulomb_operator, ground_density);\n  auto coulomb_energy = vector<double>(num_modes);\n  auto jk = coulomb_j * square(world, etas);\n  for (auto i = 0; i < num_modes; i++) {\n    coulomb_energy[i] = inner(etas[i], jk[i]);\n  }\n  // print the coulomb energy of each mode\n  if (world.rank() == 0)\n    print(\"coulomb energy: \\n\", coulomb_energy);\n\n  // exchange\n  auto exchange_energy = vector<double>(num_modes);\n  for (int a = 0; a < num_modes; a++) {\n    auto phi_aj = copy(world, ground_orbitals, true);\n    phi_aj = mul(world, etas[a], phi_aj, true);\n    auto exchange_j = apply(world, *shared_coulomb_operator, phi_aj);\n    auto exchange_jk = sum(world, exchange_j, true);\n\n    exchange_energy[a] = -2 * inner(etas[a], exchange_jk);\n  }\n  // print the exchange energy of each mode\n  if (world.rank() == 0)\n    print(\"exchange energy: \\n\", exchange_energy);\n\n  // compute the total energy of each mode\n  auto total_energy = vector<double>(num_modes);\n  for (auto i = 0; i < num_modes; i++) {\n    total_energy[i] = kinetic_energy[i] + nuclear_energy[i] +\n                      coulomb_energy[i] + exchange_energy[i];\n  }\n  // print the total energy of each mode\n  if (world.rank() == 0)\n    print(\"total energy: \\n\", total_energy);\n  // Now sort the modes by total energy and only grab the positive modes\n\n  std::vector<int> indices(etas.size());\n  std::iota(indices.begin(), indices.end(),\n            0); // Fill indices with 0, 1, ..., n\n\n  std::sort(indices.begin(), indices.end(),\n            [&](int i, int j) { return total_energy[i] > total_energy[j]; });\n  auto sorted_modes = vector_real_function_3d(num_modes);\n  auto sorted_energies = vector<double>(num_modes);\n\n  for (auto i = 0; i < num_modes; i++) {\n    sorted_modes[i] = copy(etas[indices[i]], false);\n    sorted_energies[i] = total_energy[indices[i]];\n  }\n  world.gop.fence();\n  // Take only the positive\n  auto pos_modes = vector_real_function_3d();\n  auto pos_energies = vector<double>();\n  for (auto i = 0; i < num_modes; i++) {\n    // if the sorted energy is positive push back\n    if (sorted_energies[i] > 0) {\n      pos_modes.push_back(copy(sorted_modes[i], false));\n      pos_energies.push_back(sorted_energies[i]);\n    }\n  }\n  world.gop.fence();\n  auto num_pos_modes = pos_modes.size();\n  if (world.rank() == 0)\n    print(\"num_pos_modes: \", num_pos_modes);\n  // print the positive energies\n  if (world.rank() == 0)\n    print(\"pos_energies: \\n\", pos_energies);\n\n  // now remove the positive modes\n\n  json j = {};\n  j[\"sigma\"] = tensor_to_json(sigma);\n  j[\"VT\"] = tensor_to_json(VT);\n  j[\"U\"] = tensor_to_json(U);\n  j[\"A\"] = tensor_to_json(A);\n  j[\"eigenvectors\"] = tensor_to_json(UU);\n  j[\"eigenvalues\"] = tensor_to_json(EE);\n  j[\"kinetic_energy\"] = kinetic_energy;\n  j[\"nuclear_energy\"] = nuclear_energy;\n  j[\"coulomb_energy\"] = coulomb_energy;\n  j[\"exchange_energy\"] = exchange_energy;\n  j[\"total_energy\"] = pos_energies;\n\n  if (world.rank() == 0) {\n    std::ofstream o(\"pod.json\");\n    o << std::setw(4) << j << std::endl;\n  }\n\n  world.gop.fence();\n}\nvoid PODResponse::load(World &world, const std::string &name) {}\nvoid PODResponse::save(World &world, const std::string &name) {}\n\nvoid PODResponse::iterate(World &world) {}\nvoid PODResponse::initialize(World &world) {}\n"
  },
  {
    "path": "src/apps/molresponse/FrequencyResponse.hpp",
    "content": "//\n// Created by adrianhurtado on 2/3/22.\n//\n\n#ifndef MADNESS_FREQUENCYRESPONSE_HPP\n#define MADNESS_FREQUENCYRESPONSE_HPP\n#include \"ResponseBase.hpp\"\n#include \"functypedefs.h\"\n\nusing path = std::filesystem::path;\n\nclass FrequencyResponse;\n\nstruct response_lr_pair {\n  vector_real_function_3d left;\n  vector_real_function_3d right;\n};\n\nstruct response_density {\n  response_lr_pair x;\n  response_lr_pair y;\n};\n\nstruct response_xy_pair {\n  vector_real_function_3d x;\n  vector_real_function_3d y;\n};\n\nusing RHS_Generator = std::function<X_space(World &, ResponseBase &)>;\n\nresponse_space vector_to_PQ(World &world,\n                            const vector_real_function_3d &rhs_operators,\n                            const vector_real_function_3d &ground_orbitals);\nX_space nuclear_generator(World &world, ResponseBase &calc);\nX_space dipole_generator(World &world, ResponseBase &calc);\n// using RHS_Generator = std::function<X_space(World&, FrequencyResponse&)>;\n\n// Create a quadratic response class\n\nclass QuadraticResponse : public ResponseBase {\n\n  // A quadratic response class needs X_space vectors and one ground state.\n  // It will compute the 3rd order response property at the 3 given frequencies\n  // Beta(omegaA;omegaB,OmegaC)=tr(xA,vBC)+tr(muA,pBC)+tr(muA,qBC)\n  // Where xA, xB, xC are the response functions at the frequencies omegaA,\n  // omegaB, omegaC And 2nd order right hand side perturbation vector vBC(xB,xC)\n  // and pBC and qBC are the homogeneous components of the 2nd order density\n  // matrix response made entirely from first order vectors xB, xC\n\npublic:\n  QuadraticResponse(World &world, const CalcParams &params,\n                    RHS_Generator rhs_generator)\n      : ResponseBase(world, params), generator(std::move(rhs_generator)) {\n    FunctionDefaults<3>::set_cubic_cell(-r_params.L(), r_params.L());\n    FunctionDefaults<3>::set_truncate_mode(1);\n    // set thresh to the last value in the protocol\n    auto thresh = r_params.protocol().back();\n\n    int k;\n    // Allow for imprecise conversion of threshold\n    if (thresh >= 0.9e-2)\n      k = 4;\n    else if (thresh >= 0.9e-4)\n      k = 6;\n    else if (thresh >= 0.9e-6)\n      k = 8;\n    else if (thresh >= 0.9e-8)\n      k = 10;\n    else\n      k = 12;\n\n    // k defaults to make sense with thresh, override by providing k in\n    // input file\n    if (r_params.k() == -1) {\n      FunctionDefaults<3>::set_k(k);\n    } else {\n      FunctionDefaults<3>::set_k(r_params.k());\n    }\n\n    // Set Function Defaults\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_initial_level(2);\n\n    FunctionDefaults<3>::set_autorefine(false);\n    FunctionDefaults<3>::set_apply_randomize(false);\n    FunctionDefaults<3>::set_project_randomize(false);\n    GaussianConvolution1DCache<double>::map.clear();\n\n    double safety = 0.1;\n    vtol = FunctionDefaults<3>::get_thresh() * safety;\n    shared_coulomb_operator =\n        poperatorT(CoulombOperatorPtr(world, r_params.lo(), thresh));\n    gradop = gradient_operator<double, 3>(world);\n    potential_manager = std::make_shared<PotentialManager>(molecule, \"a\");\n    potential_manager->make_nuclear_potential(world);\n    // GaussianConvolution1DCache<double>::map.clear();//(TODO:molresponse-What\n    // Create the masking function\n    mask = real_function_3d(\n        real_factory_3d(world).f(mask3).initial_level(4).norefine());\n\n    ground_density = make_ground_density(world);\n    ground_density.truncate(FunctionDefaults<3>::get_thresh());\n    // Basic print\n    if (world.rank() == 0) {\n      print(\"\\nSolving NDIM=\", 3, \" with thresh\", thresh, \"    k\",\n            FunctionDefaults<3>::get_k(), \"  dconv\",\n            std::max(thresh, r_params.dconv()), \"\\n\");\n    }\n    if (world.rank() == 0) {\n      print(\"Successfully set protocol\");\n    }\n\n    // ground state orbitals change\n    bool redo = false;\n    // Verify ground state orbitals have correct k\n    if (FunctionDefaults<3>::get_k() != ground_orbitals[0].k()) {\n      // Re-read orbitals from the archive (assuming\n      // the archive has orbitals stored at a higher\n      if (world.rank() == 0) {\n        print(\"check k: ground orbitals\");\n      }\n      // k value than what was previously computed\n      ground_calc.read(world);\n      if (world.rank() == 0) {\n        print(\"check k: read ground orbitals\");\n      }\n      // k value than what was previously computed\n      reconstruct(world, ground_orbitals);\n      if (world.rank() == 0) {\n        print(\"check k: reconstruct ground orbitals\");\n      }\n      // Reset correct k (its set in g_params.read)\n      FunctionDefaults<3>::set_k(k);\n      // Project each ground state to correct k\n      for (auto &orbital : ground_orbitals) {\n        orbital = project(orbital, FunctionDefaults<3>::get_k(), thresh, false);\n      }\n      world.gop.fence();\n      if (world.rank() == 0) {\n        print(\"check k: project ground orbitals\");\n      }\n      // Clean up a bit\n      truncate(world, ground_orbitals);\n      if (world.rank() == 0) {\n        print(\"check k: truncate ground orbitals\");\n      }\n      // Now that ground orbitals have correct k lets make the ground density\n      // again\n      ground_density = make_ground_density(world);\n      ground_density.truncate(FunctionDefaults<3>::get_thresh());\n      if (world.rank() == 0) {\n        print(\"check k: make ground density\");\n      }\n      // Ground state orbitals changed, clear old hamiltonian\n      redo = true;\n    }\n    // Recalculate ground state hamiltonian here\n    if (redo or !hamiltonian.has_data()) {\n      if (world.rank() == 0) {\n        print(\"check k: re-do hamiltonian\");\n      }\n      auto [HAM, HAM_NO_DIAG] = ComputeHamiltonianPair(world);\n      if (world.rank() == 0) {\n        print(\"check k: output hamiltonian\");\n      }\n      // TODO this doesn't seem right...\n      hamiltonian = HAM;\n      ham_no_diag = HAM_NO_DIAG;\n    }\n\n    // If we stored the potential, check that too\n    if (r_params.store_potential()) {\n      if (FunctionDefaults<3>::get_k() != stored_potential[0][0].k()) {\n        // Project the potential into correct k\n        for (auto &potential_vector : stored_potential) {\n          reconstruct(world, potential_vector);\n          for (auto &vi : potential_vector) {\n            vi = project(vi, FunctionDefaults<3>::get_k(), thresh, false);\n          }\n          world.gop.fence();\n        }\n      }\n      if (FunctionDefaults<3>::get_k() != stored_v_coul.k())\n        stored_v_coul =\n            project(stored_v_coul, FunctionDefaults<3>::get_k(), thresh, false);\n      if (FunctionDefaults<3>::get_k() != stored_v_nuc.k())\n        stored_v_nuc =\n            project(stored_v_nuc, FunctionDefaults<3>::get_k(), thresh, false);\n    }\n    // project the mask\n    if (FunctionDefaults<3>::get_k() != mask.k()) {\n      mask = project(mask, FunctionDefaults<3>::get_k(), thresh, false);\n      if (world.rank() == 0) {\n        print(\"check k: project mask\");\n      }\n    }\n    if (world.rank() == 0) {\n      print(\"check k: project Chi\");\n    }\n    // Make sure everything is done before leaving\n    world.gop.fence();\n  }\n\n  void set_x_data(World &world, const std::array<double, 3> &freqABC,\n                  const std::array<path, 3> &restart_files) {\n    this->frequencies = freqABC;\n    if (freqABC.size() != 3) {\n      throw std::runtime_error(\"Quadratic response requires 3 freqABC\");\n    }\n\n    for (size_t i = 0; i < freqABC.size(); i++) {\n      auto omega = freqABC[i];\n\n      if (omega == 0.0) {\n        frequency_contexts[i].set_strategy(\n            std::make_unique<static_inner_product>(),\n            std::make_unique<J1StrategyStable>(),\n            std::make_unique<K1StrategyStatic>(),\n            std::make_unique<VXC1StrategyStandard>(),\n            std::make_unique<StaticDensityStrategy>(),\n            std::make_unique<LoadFrequencyXSpace>(), r_params);\n      } else {\n        frequency_contexts[i].set_strategy(\n            std::make_unique<full_inner_product>(),\n            std::make_unique<J1StrategyStable>(),\n            std::make_unique<K1StrategyFull>(),\n            std::make_unique<VXC1StrategyStandard>(),\n            std::make_unique<FullDensityStrategy>(),\n            std::make_unique<LoadFrequencyXSpace>(), r_params);\n      }\n\n      x_data[i] = frequency_contexts[i].load_x_space(world, restart_files[i],\n                                                     r_params, omega);\n      ::check_k(world, x_data[i].first, FunctionDefaults<3>::get_thresh(),\n                r_params.k());\n    }\n  };\n\n  void initialize(World &world) override;\n\n  void load(World &world, const std::string &name) override;\n\n  void save(World &world, const std::string &name) override;\n  void iterate(World &world) override;\n\n  Tensor<double> compute_beta(World &world);\n  std::pair<Tensor<double>, std::vector<std::string>>\n  compute_beta_v2(World &world, const double &omega_b, const double &omega_c);\n\nprivate:\n  std::vector<int> index_A;\n  std::vector<int> index_B;\n  std::vector<int> index_C;\n\n  X_space VBC;\n\n  std::vector<std::pair<int, int>> BC_index_pairs = {\n      {0, 0}, {0, 1}, {0, 2}, {1, 0}, {1, 1}, {1, 2}, {2, 0}, {2, 1}, {2, 2}};\n\n  std::vector<std::string> bc_directions;\n  std::vector<std::string> a_directions{\"X\", \"Y\", \"Z\"};\n  bool indicies_set;\n\n  std::map<int, std::string> xyz = {{0, \"X\"}, {1, \"Y\"}, {2, \"Z\"}};\n\n  std::array<Context, 3> frequency_contexts;\n  std::array<double, 3> frequencies;\n  std::array<XData, 3> x_data;\n  std::pair<X_space, X_space> setup_XBC(World &world, const double &omega_b,\n                                        const double &omega_c);\n  RHS_Generator generator;\n  std::pair<X_space, X_space> dipole_perturbation(World &world,\n                                                  const X_space &left,\n                                                  const X_space &right) const;\n  X_space compute_g1_term(World &world, const X_space &left,\n                          const X_space &right, const X_space &apply) const;\n  X_space compute_coulomb_term(World &world, const X_space &B, const X_space &C,\n                               const X_space &x_apply) const;\n  X_space compute_exchange_term(World &world, const X_space &B,\n                                const X_space &C, const X_space &x_apply) const;\n  std::tuple<X_space, X_space, X_space, X_space>\n  compute_zeta_response_vectors(World &world, const X_space &B,\n                                const X_space &C);\n\n  std::pair<response_space, response_space>\n  compute_phiBC_terms(World &world, const X_space &B, const X_space &C);\n  std::pair<X_space, X_space>\n  compute_first_order_fock_matrix_terms(World &world, const X_space &B,\n                                        const X_space &phi0,\n                                        const X_space &C) const;\n  std::pair<X_space, X_space> compute_first_order_fock_matrix_terms_v2(\n      World &world, const X_space &B, const X_space &C, const X_space &g1b,\n      const X_space &g1c, const X_space &VB, const X_space &VC,\n      const X_space &phi0) const;\n  std::pair<Tensor<double>, std::vector<std::string>>\n  compute_beta_tensor(World &world, const X_space &BC_left,\n                      const X_space &BC_right, const X_space &CB_left,\n                      const X_space &CB_right, const X_space &XA,\n                      const X_space &VBC);\n\n  std::pair<Tensor<double>, std::vector<std::string>>\n  compute_beta_tensor_v2(World &world, const X_space &B, const X_space &C,\n                         const response_space &phiBC,\n                         const response_space &phiCB, const X_space &XA,\n                         const X_space &VBC);\n\n  response_xy_pair compute_vbc(World &world, const response_density &B,\n                               const response_xy_pair &C,\n                               const response_density &zeta_BC,\n                               const vector_real_function_3d &phi0,\n                               const real_function_3d &vb);\n  X_space compute_second_order_perturbation_terms(\n      World &world, const X_space &B, const X_space &C,\n      const X_space &zeta_bc_x, const X_space &zeta_bc_y,\n      const X_space &zeta_cb_x, const X_space &zeta_cb_y, const X_space &phi0);\n  X_space compute_second_order_perturbation_terms_v2(\n      World &world, const X_space &B, const X_space &C,\n      const X_space &zeta_bc_left, const X_space &zeta_bc_right,\n      const X_space &zeta_cb_left, const X_space &zeta_cb_right,\n      const X_space &phi0);\n  X_space compute_second_order_perturbation_terms_v3(\n      World &world, const X_space &B, const X_space &C,\n      const vector_real_function_3d &phi0,\n      const vector_real_function_3d &dipole_vectors);\n  std::tuple<X_space, X_space, X_space, X_space, X_space, X_space>\n  compute_beta_exchange(World &world, const X_space &B, const X_space &C,\n                        const X_space &zeta_bc_left,\n                        const X_space &zeta_bc_right,\n                        const X_space &zeta_cb_left,\n                        const X_space &zeta_cb_right, const X_space &phi0);\n  std::tuple<X_space, X_space, X_space, X_space, X_space, X_space>\n  compute_beta_coulomb(World &world, const X_space &B, const X_space &C,\n                       const X_space &zeta_bc_left,\n                       const X_space &zeta_bc_right,\n                       const X_space &zeta_cb_left,\n                       const X_space &zeta_cb_right, const X_space &phi0);\n};\n\n// Create a quadratic response class\n\nclass PODResponse : public ResponseBase {\n\n  // A quadratic response class needs X_space vectors and one ground state.\n  // It will compute the 3rd order response property at the 3 given frequencies\n  // Beta(omegaA;omegaB,OmegaC)=tr(xA,vBC)+tr(muA,pBC)+tr(muA,qBC)\n  // Where xA, xB, xC are the response functions at the frequencies omegaA,\n  // omegaB, omegaC And 2nd order right hand side perturbation vector vBC(xB,xC)\n  // and pBC and qBC are the homogeneous components of the 2nd order density\n  // matrix response made entirely from first order vectors xB, xC vBC(xB,xC) =\n  // Q*(\npublic:\n  PODResponse(World &world, const CalcParams &params,\n              RHS_Generator rhs_generator)\n      : ResponseBase(world, params), generator(std::move(rhs_generator)) {\n    FunctionDefaults<3>::set_cubic_cell(-r_params.L(), r_params.L());\n    FunctionDefaults<3>::set_truncate_mode(1);\n    auto thresh = r_params.protocol()[0];\n\n    int k;\n    // Allow for imprecise conversion of threshold\n    if (thresh >= 0.9e-2)\n      k = 4;\n    else if (thresh >= 0.9e-4)\n      k = 6;\n    else if (thresh >= 0.9e-6)\n      k = 8;\n    else if (thresh >= 0.9e-8)\n      k = 10;\n    else\n      k = 12;\n\n    // k defaults to make sense with thresh, override by providing k in\n    // input file\n    if (r_params.k() == -1) {\n      FunctionDefaults<3>::set_k(k);\n    } else {\n      FunctionDefaults<3>::set_k(r_params.k());\n    }\n\n    // Set Function Defaults\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_initial_level(2);\n\n    FunctionDefaults<3>::set_autorefine(false);\n    FunctionDefaults<3>::set_apply_randomize(false);\n    FunctionDefaults<3>::set_project_randomize(false);\n    GaussianConvolution1DCache<double>::map.clear();\n\n    double safety = 0.1;\n    vtol = FunctionDefaults<3>::get_thresh() * safety;\n    shared_coulomb_operator =\n        poperatorT(CoulombOperatorPtr(world, r_params.lo(), thresh));\n    gradop = gradient_operator<double, 3>(world);\n    potential_manager = std::make_shared<PotentialManager>(molecule, \"a\");\n    potential_manager->make_nuclear_potential(world);\n    // GaussianConvolution1DCache<double>::map.clear();//(TODO:molresponse-What\n    // Create the masking function\n    mask = real_function_3d(\n        real_factory_3d(world).f(mask3).initial_level(4).norefine());\n\n    ground_density = make_ground_density(world);\n    ground_density.truncate(FunctionDefaults<3>::get_thresh());\n    // Basic print\n    if (world.rank() == 0) {\n      print(\"\\nSolving NDIM=\", 3, \" with thresh\", thresh, \"    k\",\n            FunctionDefaults<3>::get_k(), \"  dconv\",\n            std::max(thresh, r_params.dconv()), \"\\n\");\n    }\n    if (world.rank() == 0) {\n      print(\"Successfully set protocol\");\n    }\n\n    // ground state orbitals change\n    bool redo = false;\n    // Verify ground state orbitals have correct k\n    if (FunctionDefaults<3>::get_k() != ground_orbitals[0].k()) {\n      // Re-read orbitals from the archive (assuming\n      // the archive has orbitals stored at a higher\n      if (world.rank() == 0) {\n        print(\"check k: ground orbitals\");\n      }\n      // k value than what was previously computed\n      ground_calc.read(world);\n      if (world.rank() == 0) {\n        print(\"check k: read ground orbitals\");\n      }\n      // k value than what was previously computed\n      reconstruct(world, ground_orbitals);\n      if (world.rank() == 0) {\n        print(\"check k: reconstruct ground orbitals\");\n      }\n      // Reset correct k (its set in g_params.read)\n      FunctionDefaults<3>::set_k(k);\n      // Project each ground state to correct k\n      for (auto &orbital : ground_orbitals) {\n        orbital = project(orbital, FunctionDefaults<3>::get_k(), thresh, false);\n      }\n      world.gop.fence();\n      if (world.rank() == 0) {\n        print(\"check k: project ground orbitals\");\n      }\n      // Clean up a bit\n      truncate(world, ground_orbitals);\n      if (world.rank() == 0) {\n        print(\"check k: truncate ground orbitals\");\n      }\n      // Now that ground orbitals have correct k lets make the ground density\n      // again\n      ground_density = make_ground_density(world);\n      ground_density.truncate(FunctionDefaults<3>::get_thresh());\n      if (world.rank() == 0) {\n        print(\"check k: make ground density\");\n      }\n      // Ground state orbitals changed, clear old hamiltonian\n      redo = true;\n    }\n    // Recalculate ground state hamiltonian here\n    if (redo or !hamiltonian.has_data()) {\n      if (world.rank() == 0) {\n        print(\"check k: re-do hamiltonian\");\n      }\n      auto [HAM, HAM_NO_DIAG] = ComputeHamiltonianPair(world);\n      if (world.rank() == 0) {\n        print(\"check k: output hamiltonian\");\n      }\n      // TODO this doesn't seem right...\n      hamiltonian = HAM;\n      ham_no_diag = HAM_NO_DIAG;\n    }\n\n    // If we stored the potential, check that too\n    if (r_params.store_potential()) {\n      if (FunctionDefaults<3>::get_k() != stored_potential[0][0].k()) {\n        // Project the potential into correct k\n        for (auto &potential_vector : stored_potential) {\n          reconstruct(world, potential_vector);\n          for (auto &vi : potential_vector) {\n            vi = project(vi, FunctionDefaults<3>::get_k(), thresh, false);\n          }\n          world.gop.fence();\n        }\n      }\n      if (FunctionDefaults<3>::get_k() != stored_v_coul.k())\n        stored_v_coul =\n            project(stored_v_coul, FunctionDefaults<3>::get_k(), thresh, false);\n      if (FunctionDefaults<3>::get_k() != stored_v_nuc.k())\n        stored_v_nuc =\n            project(stored_v_nuc, FunctionDefaults<3>::get_k(), thresh, false);\n    }\n    // project the mask\n    if (FunctionDefaults<3>::get_k() != mask.k()) {\n      mask = project(mask, FunctionDefaults<3>::get_k(), thresh, false);\n      if (world.rank() == 0) {\n        print(\"check k: project mask\");\n      }\n    }\n    if (world.rank() == 0) {\n      print(\"check k: project Chi\");\n    }\n    // Make sure everything is done before leaving\n    world.gop.fence();\n  }\n\n  void set_x_data(World &world, const std::vector<double> &freqABC,\n                  const std::vector<path> &restart_files) {\n    this->frequencies = freqABC;\n\n    frequency_contexts.resize(freqABC.size());\n    x_data.resize(freqABC.size());\n    for (size_t i = 0; i < freqABC.size(); i++) {\n      auto omega = freqABC[i];\n\n      if (omega == 0.0) {\n        frequency_contexts[i].set_strategy(\n            std::make_unique<static_inner_product>(),\n            std::make_unique<J1StrategyStable>(),\n            std::make_unique<K1StrategyStatic>(),\n            std::make_unique<VXC1StrategyStandard>(),\n            std::make_unique<StaticDensityStrategy>(),\n            std::make_unique<LoadFrequencyXSpace>(), r_params);\n      } else {\n        frequency_contexts[i].set_strategy(\n            std::make_unique<full_inner_product>(),\n            std::make_unique<J1StrategyStable>(),\n            std::make_unique<K1StrategyFull>(),\n            std::make_unique<VXC1StrategyStandard>(),\n            std::make_unique<FullDensityStrategy>(),\n            std::make_unique<LoadFrequencyXSpace>(), r_params);\n      }\n\n      // print omega before load_x_space\n      print(\"omega: \", omega);\n      print(\"restart_files[i]: \", restart_files[i]);\n\n      x_data[i] = frequency_contexts[i].load_x_space(\n          world, restart_files[i].string(), r_params, omega);\n      ::check_k(world, x_data[i].first, FunctionDefaults<3>::get_thresh(),\n                r_params.k());\n    }\n  };\n\n  void initialize(World &world) override;\n\n  void load(World &world, const std::string &name) override;\n\n  void save(World &world, const std::string &name) override;\n  void iterate(World &world) override;\n\n  void compute_pod_modes(World &world);\n  void compute_pod_modes_2(World &world);\n\nprivate:\n  std::vector<Context> frequency_contexts;\n  std::vector<double> frequencies;\n  std::vector<XData> x_data;\n  RHS_Generator generator;\n};\n\nclass FrequencyResponse : public ResponseBase {\n\npublic:\n  FrequencyResponse(World &world, const CalcParams &params, RHS_Generator rhs)\n      : ResponseBase(world, params), omega{params.response_parameters.omega()},\n        generator{std::move(rhs)}, PQ{} {\n    if (omega == 0.0) {\n      response_context.set_strategy(std::make_unique<static_inner_product>(),\n                                    std::make_unique<J1StrategyStable>(),\n                                    std::make_unique<K1StrategyStatic>(),\n                                    std::make_unique<VXC1StrategyStandard>(),\n                                    std::make_unique<StaticDensityStrategy>(),\n                                    std::make_unique<LoadFrequencyXSpace>(),\n                                    r_params);\n    } else {\n      response_context.set_strategy(std::make_unique<full_inner_product>(),\n                                    std::make_unique<J1StrategyStable>(),\n                                    std::make_unique<K1StrategyFull>(),\n                                    std::make_unique<VXC1StrategyStandard>(),\n                                    std::make_unique<FullDensityStrategy>(),\n                                    std::make_unique<LoadFrequencyXSpace>(),\n                                    r_params);\n    }\n    PQ = generator(world, *this);\n  }\n  void initialize(World &world) override;\n\n  void load(World &world, const std::string &name) override;\n\n  void check_k(World &world, double thresh, int k) override {\n    ResponseBase::check_k(world, thresh, k);\n    ::check_k(world, PQ, thresh, k);\n  }\n\n  X_space PQ;\n\n  RHS_Generator generator;\n\n  std::pair<double, Tensor<double>> get_response_data() {\n    return {omega, polar};\n  };\n\nprivate:\n  double omega;\n  Tensor<double> polar;\n  void iterate(World &world) override;\n  X_space bsh_update_response(\n      World &world, X_space &theta_X,\n      std::pair<vector<poperatorT>, vector<poperatorT>> &bsh_ops,\n      QProjector<double, 3> &projector, double &x_shifts);\n  static void frequency_to_json(json &j_mol_in, size_t iter,\n                                const Tensor<double> &polar_ij);\n  void save(World &world, const std::string &name) override;\n  std::tuple<X_space, residuals, vector_real_function_3d> update_response(\n      World &world, X_space &chi, XCOperator<double, 3> &xc,\n      std::pair<std::vector<poperatorT>, std::vector<poperatorT>> &bsh_ops,\n      QProjector<double, 3> &projector, double &x_shifts, double &omega_n,\n      response_solver &kain_x_space, size_t iteration,\n      const double &max_rotation, const vector_real_function_3d &rho_old,\n      const Tensor<double> &old_residuals, const X_space &xres_old);\n};\n\n#endif // MADNESS_FREQUENCYRESPONSE_HPP\n"
  },
  {
    "path": "src/apps/molresponse/Plot_VTK.cc",
    "content": "/* My function to save a vtk file that visit can use\n *\n *   Input params:\n *\n *       npt_plot  -  number of points in each direction for plot\n *       L         -  box size\n *       plotlo    -  lowest orbital number to plot\n *       plothi    -  highest orbital number to plot\n *       molecule  -  molecule object, for creating the .xyz file\n *       densities -  vector of densities to be ploted\n *       name      -  name you would like for orbital plots\n */\n\n#include \"Plot_VTK.h\"\n#include <madness/mra/mra.h>\n#include <string>\n#include <vector>\n\n#if defined(__has_include)\n#if __has_include(<filesystem>)\n#define MADCHEM_HAS_STD_FILESYSTEM\n// <filesystem> is not reliably usable on Linux with gcc < 9\n#if defined(__GNUC__)\n#if __GNUC__ >= 7 && __GNUC__ < 9\n#undef MADCHEM_HAS_STD_FILESYSTEM\n#endif\n#endif\n#if defined(MADCHEM_HAS_STD_FILESYSTEM)\n\n#include <filesystem>\nnamespace madness {\nvoid write_molecules_to_file(const Molecule& molecule, const std::string& geo_file, const double& scale) {\n\n  FILE* f = nullptr;\n  f = fopen(geo_file.c_str(), \"w\");\n  // Write the header\n  fprintf(f, \"%zu\", molecule.natom());\n  fprintf(f, \"\\n\\n\");\n  // Get the data\n  auto coords = molecule.get_all_coords_vec();\n\n  // Write the data\n  size_t Natoms = molecule.natom();\n  for (size_t i = 0; i < Natoms; i++) {\n    auto coords_i = coords[i];\n    auto x = coords_i[0] / scale;\n    auto y = coords_i[1] / scale;\n    auto z = coords_i[2] / scale;\n    std::fprintf(f, \"%5s   %16.12f %16.12f %16.12f\\n\", atomic_number_to_symbol(molecule.get_atomic_number(i)).c_str(),\n                 x, y, z);\n  }\n\n  // Clean up\n  fclose(f);\n}\n\nvoid do_response_orbital_vtk_plots(World& world, int npt_plot, double L, const Molecule& molecule,\n                                   const vector_real_function_3d& ground_orbs, const response_matrix& responseMatrix) {\n  // Stuff needed to plot\n  //\n  double box_size = L / 2;\n  Vector<double, 3> box_lo{-box_size, -box_size, -box_size};\n  Vector<double, 3> box_hi{box_size, box_size, box_size};\n\n  std::string vtk_dir = \"vtk_plots\";\n  std::filesystem::create_directories(vtk_dir);\n\n  std::string geo_file;\n\n  Vector<long, 3> points{npt_plot, npt_plot, npt_plot};\n  // Plot the whole box?\n\n  // Write an .xyz file with current geometry (to deal with molecular\n  // reorientations that might occur)\n  FILE* f = nullptr;\n  geo_file = vtk_dir + \"/geometry.xyz\";\n  write_molecules_to_file(molecule, geo_file);\n\n  std::string response_file;\n  // Needed to plot the full electron density\n  real_function_3d rho = real_factory_3d(world);\n\n  int orb_num = 0;\n\n  auto orbital_file = vtk_dir + \"/\" + \"orbitals.vts\";\n  plotvtk_begin<3>(world, orbital_file.c_str(), box_lo, box_hi, points, true);\n\n  std::for_each(ground_orbs.begin(), ground_orbs.end(), [&](const auto& phi0_i) {\n    auto orb_name = \"/phi0_\" + std::to_string(orb_num);\n    plotvtk_data<double, 3>(phi0_i, orb_name.c_str(), world, orbital_file.c_str(), box_lo, box_hi, points, true, false);\n    orb_num++;\n  });\n\n  auto state_number = 0;\n  std::for_each(responseMatrix.begin(), responseMatrix.end(), [&](const auto& xy) {\n    auto num_orbitals = xy.size() / 2;\n    // plot the x first\n    auto orb_num = 0;\n    std::for_each(xy.begin(), xy.begin() + num_orbitals, [&](const auto& xi) {\n      auto field_name = \"x_orbital_\" + std::to_string(state_number) + \"_\" + std::to_string(orb_num);\n      plotvtk_data<double, 3>(xi, field_name.c_str(), world, orbital_file.c_str(), box_lo, box_hi, points, true, false);\n      orb_num++;\n    });\n    orb_num = 0;\n    std::for_each(xy.begin() + num_orbitals, xy.end(), [&](const auto& yi) {\n      auto field_name = \"y_orbital_\" + std::to_string(state_number) + \"_\" + std::to_string(orb_num);\n      plotvtk_data<double, 3>(yi, field_name.c_str(), world, orbital_file.c_str(), box_lo, box_hi, points, true, false);\n      orb_num++;\n    });\n    state_number++;\n  });\n  plotvtk_end<3>(world, orbital_file.c_str(), true);\n}\nvoid do_response_density_vtk_plots(World& world, int npt_plot, double L, const Molecule& molecule,\n                                   const real_function_3d& ground_density,\n                                   const vector_real_function_3d& response_density) {\n  // Stuff needed to plot\n  //\n  double box_size = L / 2;\n  Vector<double, 3> box_lo{-box_size, -box_size, -box_size};\n  Vector<double, 3> box_hi{box_size, box_size, box_size};\n\n  std::string vtk_dir = \"vtk_plots\";\n  std::filesystem::create_directories(vtk_dir);\n\n  std::string geo_file;\n  const char* filename;\n\n  Vector<long, 3> points{npt_plot, npt_plot, npt_plot};\n\n  std::string response_file;\n  //***********************************ground density plot\n  auto density_file = vtk_dir + \"/\" + \"rho0.vts\";\n  filename = density_file.c_str();\n  plotvtk_begin<3>(world, filename, box_lo, box_hi, points, true);\n  plotvtk_data<double, 3>(ground_density, \"ground_density\", world, filename, box_lo, box_hi, points, true, false);\n  plotvtk_end<3>(world, filename, true);\n\n  //***********************************ground density plot\n  int state_number = 0;\n  std::for_each(response_density.begin(), response_density.end(), [&](const auto& rho_i) {\n    auto density_file = vtk_dir + \"/\" + \"response_rho_\" + std::to_string(state_number) + \".vts\";\n    filename = density_file.c_str();\n    auto field_name = \"r_density_\" + std::to_string(state_number);\n    plotvtk_begin<3>(world, filename, box_lo, box_hi, points, true);\n    plotvtk_data<double, 3>(rho_i, field_name.c_str(), world, filename, box_lo, box_hi, points, true, false);\n    plotvtk_end<3>(world, filename, true);\n    state_number++;\n  });\n}\nvoid do_response_density_vtk_plots_new(World& world, int npt_plot, double L, const Molecule& molecule,\n                                       const real_function_3d& ground_density,\n                                       const vector_real_function_3d& response_density,\n                                       const std::string& density_name) {\n  double box_size = L;\n  Vector<double, 3> box_lo{-box_size, -box_size, -box_size};\n  Vector<double, 3> box_hi{box_size, box_size, box_size};\n\n  std::string vtk_dir = \"../vtk_plots\";\n  std::filesystem::create_directories(vtk_dir);\n\n  FILE* f = nullptr;\n  std::string geo_file;\n  geo_file = vtk_dir + \"/geometry.xyz\";\n  double scale = 1.0;\n  write_molecules_to_file(molecule, geo_file, scale);\n\n  const char* filename;\n\n  Vector<long, 3> points{npt_plot, npt_plot, npt_plot};\n\n  std::string response_file;\n  //***********************************ground density plot\n  auto density_file = vtk_dir + \"/\" + density_name + \".vts\";\n  filename = density_file.c_str();\n  plotvtk_begin<3>(world, filename, box_lo, box_hi, points, true);\n  plotvtk_data<double, 3>(ground_density, \"ground\", world, filename, box_lo, box_hi, points, true, false);\n  //***********************************ground density plot\n  int state_number = 0;\n  std::for_each(response_density.begin(), response_density.end(), [&](const auto& rho_i) {\n    auto field_name = \"response_\" + std::to_string(state_number);\n    plotvtk_data<double, 3>(rho_i, field_name.c_str(), world, filename, box_lo, box_hi, points, true, false);\n    state_number++;\n  });\n  plotvtk_end<3>(world, filename, true);\n}\nvoid do_vtk_plots(World& world, int npt_plot, double L, int lowest_orbital, int highest_orbital,\n                  const Molecule& molecule, std::vector<real_function_3d> densities, const std::string& name) {\n  // Stuff needed to plot\n  //\n  Vector<double, 3> box_lo{-L, -L, -L};\n  Vector<double, 3> box_hi{L, L, L};\n\n  std::string vtk_dir = \"vtk_plots\";\n  std::filesystem::create_directories(vtk_dir);\n\n  std::string geo_file;\n  const char* filename;\n\n  Vector<long, 3> points{npt_plot, npt_plot, npt_plot};\n  // Plot the whole box?\n\n  // Write an .xyz file with current geometry (to deal with molecular\n  // reorientations that might occur)\n  FILE* f = nullptr;\n\n  std::string response_file;\n  // Needed to plot the full electron density\n  real_function_3d rho = real_factory_3d(world);\n\n  // Plot each orbital requested\n  for (int i = lowest_orbital; i < highest_orbital; i++) {\n    // Add to total\n    rho += densities[i];\n\n    // Create filename in such a way that visit associates them together\n    response_file = vtk_dir + \"/\" + name + std::to_string(i) + \".vts\";\n    filename = response_file.c_str();\n\n    // VTK plotting stuff\n    plotvtk_begin<3>(world, filename, box_lo, box_hi, points, true);\n\n    // function\n    // field anem\n    // world\n    // file name\n    // plot lo\n    // plot hi\n    // npts\n    // binary\n    // plot refile\n    plotvtk_data<double, 3>(densities[i], \"density\", world, filename, box_lo, box_hi, points, true, false);\n    plotvtk_end<3>(world, filename, true);\n  }\n  std::string b;\n\n  // Plot the full density\n  b = vtk_dir + \"/\" + \"total-electrondensity.vts\";\n  filename = b.c_str();\n  plotvtk_begin<3>(world, filename, box_lo, box_hi, points, true);\n  plotvtk_data<double, 3>(rho, \"total-electrondensity\", world, filename, box_lo, box_hi, points, true, false);\n  plotvtk_end<3>(world, filename, true);\n}\nvoid do_vtk_plots(World& world, int npt_plot, double L, Molecule molecule, real_function_3d& rho_0,\n                  std::vector<real_function_3d>& rho_omega, std::vector<real_function_3d>& ground_orbitals,\n                  X_space& Chi) {\n  std::string vtk_dir = \"vtk_plots\";\n  std::filesystem::create_directories(vtk_dir);\n  std::string geo_file;\n  const char* filename;\n  Vector<long, 3> points{npt_plot, npt_plot, npt_plot};\n  // Plot the whole box?\n  Vector<double, 3> box_lo{-L, -L, -L};\n  Vector<double, 3> box_hi{L, L, L};\n  // Write an .xyz file with current geometry (to deal with molecular\n  // reorientations that might occur)\n  FILE* f = 0;\n  geo_file = vtk_dir + \"/geometry.xyz\";\n\n  f = fopen(geo_file.c_str(), \"w\");\n  // Write the header\n  fprintf(f, \"%zu\", molecule.natom());\n  fprintf(f, \"\\n\\n\");\n  // Get the data\n  std::vector<Vector<double, 3>> coords = molecule.get_all_coords_vec();\n  // Write the data\n  size_t Natoms = molecule.natom();\n  for (size_t i = 0; i < Natoms; i++) {\n    std::fprintf(f, \"%5s   %16.12f %16.12f %16.12f\\n\", atomic_number_to_symbol(molecule.get_atomic_number(i)).c_str(),\n                 coords[i][0], coords[i][1], coords[i][2]);\n  }\n  // Clean up\n  fclose(f);\n  std::string rho0_file = \"rho_0.vts\";\n  filename = rho0_file.c_str();\n\n  plotvtk_begin<3>(world, filename, box_lo, box_hi, points, true);\n  plotvtk_data<double, 3>(rho_0, \"ground_density\", world, filename, box_lo, box_hi, points, true, false);\n  plotvtk_end<3>(world, filename, true);\n  // ground orbitals\n  std::string g_orb_file = \"phi_\";\n  std::string fname;\n  for (size_t i = 0; i < Chi.num_orbitals(); ++i) {\n    fname = vtk_dir + \"/\" + g_orb_file + std::to_string(i) + \".vts\";\n    filename = fname.c_str();\n    // VTK plotting stuff\n    plotvtk_begin<3>(world, filename, box_lo, box_hi, points, true);\n    plotvtk_data<double, 3>(ground_orbitals[i], \"ground_orbital\", world, filename, box_lo, box_hi, points, true, false);\n    plotvtk_end<3>(world, filename, true);\n  }\n\n  std::string x_orb_file = \"x_\";\n  for (size_t i = 0; i < Chi.num_states(); ++i) {\n    for (size_t j = 0; j < Chi.num_orbitals(); ++j) {\n      fname = vtk_dir + \"/\" + x_orb_file + std::to_string(i) + \"_\" + std::to_string(j) + \".vts\";\n      filename = fname.c_str();\n      // VTK plotting stuff\n      plotvtk_begin<3>(world, filename, box_lo, box_hi, points, true);\n      plotvtk_data<double, 3>(Chi.x[i][j], \"x_orbitals\", world, filename, box_lo, box_hi, points, true, false);\n      plotvtk_end<3>(world, filename, true);\n    }\n  }\n  std::string y_orb_file = \"y_\";\n  for (size_t i = 0; i < Chi.num_states(); ++i) {\n    for (size_t j = 0; j < Chi.num_orbitals(); ++j) {\n      fname = vtk_dir + \"/\" + y_orb_file + std::to_string(i) + \"_\" + std::to_string(j) + \".vts\";\n      filename = fname.c_str();\n      // VTK plotting stuff\n      plotvtk_begin<3>(world, filename, box_lo, box_hi, points, true);\n      plotvtk_data<double, 3>(Chi.y[i][j], \"y_orbitals\", world, filename, box_lo, box_hi, points, true, false);\n      plotvtk_end<3>(world, filename, true);\n    }\n  }\n\n  std::string rho_1_file = \"rho_1_\";\n  for (size_t i = 0; i < Chi.num_states(); ++i) {\n    fname = vtk_dir + \"/\" + rho_1_file + std::to_string(i) + \".vts\";\n    filename = fname.c_str();\n    // VTK plotting stuff\n    plotvtk_begin<3>(world, filename, box_lo, box_hi, points, true);\n    plotvtk_data<double, 3>(rho_omega[i], \"transition_density\", world, filename, box_lo, box_hi, points, true, false);\n    plotvtk_end<3>(world, filename, true);\n  }\n\n  //\n  //\n  //\n  //\n  //\n}\n\n}  // namespace madness\n\n#endif\n#endif\n#endif\n\n#include \"../chem/molecule.h\"\n"
  },
  {
    "path": "src/apps/molresponse/Plot_VTK.h",
    "content": "/* My function to save a vtk file that visit can use\n *\n *   Input params:\n *\n *       npt_plot  -  number of points in each direction for plot\n *       L         -  box size\n *       plotlo    -  lowest orbital number to plot\n *       plothi    -  highest orbital number to plot\n *       molecule  -  molecule object, for creating the .xyz file\n *       densities -  vector of densities to be ploted\n *       name      -  name you would like for orbital plots\n */\n\n#ifndef SRC_APPS_molresponse_PLOT_VTK_H_\n#define SRC_APPS_molresponse_PLOT_VTK_H_\n\n#include <madness/mra/mra.h>\n\n#include <cstdint>\n#include <string>\n#include <vector>\n\n#include \"../chem/molecule.h\"\n#include \"x_space.h\"\n\n#if defined(__has_include)\n#if __has_include(<filesystem>)\n#define MADCHEM_HAS_STD_FILESYSTEM\n// <filesystem> is not reliably usable on Linux with gcc < 9\n#if defined(__GNUC__)\n#if __GNUC__ >= 7 && __GNUC__ < 9\n#undef MADCHEM_HAS_STD_FILESYSTEM\n#endif\n#endif\n\n#if defined(MADCHEM_HAS_STD_FILESYSTEM)\n\n#include <filesystem>\nnamespace madness {\n\nvoid write_molecules_to_file(const Molecule& molecule, const std::string& geo_file, const double& scale = 1.0);\nvoid do_response_orbital_vtk_plots(World& world, int npt_plot, double L, const Molecule& molecule,\n                                   const vector_real_function_3d& ground_orbs, const response_matrix& responseMatrix);\nvoid do_response_density_vtk_plots(World& world, int npt_plot, double L, const Molecule& molecule,\n                                   const real_function_3d& ground_density,\n                                   const vector_real_function_3d& response_density);\n\nvoid do_response_density_vtk_plots_new(World& world, int npt_plot, double L, const Molecule& molecule,\n                                       const real_function_3d& ground_density,\n                                       const vector_real_function_3d& response_density, const std::string& name);\nvoid do_vtk_plots(World& world, int npt_plot, double L, int lowest_orbital, int highest_orbital,\n                  const Molecule& molecule, std::vector<real_function_3d> densities, const std::string& name);\n\nvoid do_vtk_plots(World& world, int npt_plot, double L, Molecule molecule, real_function_3d& rho_0,\n                  std::vector<real_function_3d>& rho_omega, std::vector<real_function_3d>& ground_orbitals,\n                  X_space& Chi);\n\n}  // namespace madness\n#endif\n#endif\n#endif\n#endif  // SRC_APPS_molresponse_PLOT_VTK_H_\n"
  },
  {
    "path": "src/apps/molresponse/ResponseBase.cpp",
    "content": "//\n// Created by adrianhurtado on 1/24/22.\n//\n\n#include \"ResponseBase.hpp\"\n\n// Initializes calculation object for both excited state and frequency dependent\n// Copies both the response and ground state\n/// Constructs the Base Response\n/// \\param world\n/// \\param params\nResponseBase::ResponseBase(World &world, const CalcParams &params)\n    : r_params(params.response_parameters), molecule(params.molecule),\n      ground_calc(params.ground_calculation),\n      ground_orbitals(ground_calc.orbitals()),\n      ground_energies(ground_calc.get_energies()),\n      Chi(world, r_params.num_states(), r_params.num_orbitals()) {\n\n  // Broadcast to all the other nodes\n  world.gop.broadcast_serializable(r_params, 0);\n  world.gop.broadcast_serializable(ground_energies, 0);\n  world.gop.broadcast_serializable(molecule, 0);\n  xcf.initialize(r_params.xc(), !r_params.spinrestricted(), world,\n                 r_params.print_level() >= 3);\n  r_params.to_json(j_molresponse);\n\n  FunctionDefaults<3>::set_cubic_cell(-r_params.L(), r_params.L());\n  FunctionDefaults<3>::set_truncate_mode(1);\n}\n\n/// Checks the polynomial of each function in the ResponseBase\n/// First checks the ground state orbitals.  If the orbitals\n/// have incorrect k we read from the archive project and truncate\n/// We follow by computing the hamiltonian with new orbitals\n/// \\param world\n/// \\param thresh\n/// \\param k\nvoid ResponseBase::check_k(World &world, double thresh, int k) {\n  // Boolean to redo ground hamiltonian calculation if\n  // ground state orbitals change\n  bool redo = false;\n  // Verify ground state orbitals have correct k\n  if (FunctionDefaults<3>::get_k() != ground_orbitals[0].k()) {\n    // Re-read orbitals from the archive (assuming\n    // the archive has orbitals stored at a higher\n    if (world.rank() == 0) {\n      print(\"check k: ground orbitals\");\n    }\n    // k value than what was previously computed\n    ground_calc.read(world);\n    if (world.rank() == 0) {\n      print(\"check k: read ground orbitals\");\n    }\n    // k value than what was previously computed\n    reconstruct(world, ground_orbitals);\n    if (world.rank() == 0) {\n      print(\"check k: reconstruct ground orbitals\");\n    }\n    // Reset correct k (its set in g_params.read)\n    FunctionDefaults<3>::set_k(k);\n    // Project each ground state to correct k\n    for (auto &orbital : ground_orbitals) {\n      orbital = project(orbital, FunctionDefaults<3>::get_k(), thresh, false);\n    }\n    world.gop.fence();\n    if (world.rank() == 0) {\n      print(\"check k: project ground orbitals\");\n    }\n    // Clean up a bit\n    truncate(world, ground_orbitals);\n    if (world.rank() == 0) {\n      print(\"check k: truncate ground orbitals\");\n    }\n    // Now that ground orbitals have correct k lets make the ground density\n    // again\n    ground_density = make_ground_density(world);\n    ground_density.truncate(FunctionDefaults<3>::get_thresh());\n    if (world.rank() == 0) {\n      print(\"check k: make ground density\");\n    }\n    // Ground state orbitals changed, clear old hamiltonian\n    redo = true;\n  }\n  // Recalculate ground state hamiltonian here\n  if (redo or !hamiltonian.has_data()) {\n    if (world.rank() == 0) {\n      print(\"check k: re-do hamiltonian\");\n    }\n\n    auto [HAM, HAM_NO_DIAG] = ComputeHamiltonianPair(world);\n    if (world.rank() == 0) {\n      print(\"check k: output hamiltonian\");\n    }\n    // TODO this doesn't seem right...\n    hamiltonian = HAM;\n    ham_no_diag = HAM_NO_DIAG;\n  }\n\n  // If we stored the potential, check that too\n  if (r_params.store_potential()) {\n    if (FunctionDefaults<3>::get_k() != stored_potential[0][0].k()) {\n      // Project the potential into correct k\n      for (auto &potential_vector : stored_potential) {\n        reconstruct(world, potential_vector);\n        for (auto &vi : potential_vector) {\n          vi = project(vi, FunctionDefaults<3>::get_k(), thresh, false);\n        }\n        world.gop.fence();\n      }\n    }\n    if (FunctionDefaults<3>::get_k() != stored_v_coul.k())\n      stored_v_coul =\n          project(stored_v_coul, FunctionDefaults<3>::get_k(), thresh, false);\n    if (FunctionDefaults<3>::get_k() != stored_v_nuc.k())\n      stored_v_nuc =\n          project(stored_v_nuc, FunctionDefaults<3>::get_k(), thresh, false);\n  }\n  // project the mask\n  if (FunctionDefaults<3>::get_k() != mask.k()) {\n    mask = project(mask, FunctionDefaults<3>::get_k(), thresh, false);\n    if (world.rank() == 0) {\n      print(\"check k: project mask\");\n    }\n  }\n  ::check_k(world, Chi, thresh, k);\n  if (world.rank() == 0) {\n    print(\"check k: project Chi\");\n  }\n\n  // Make sure everything is done before leaving\n  world.gop.fence();\n}\n\n/// @brief Computes the Hamiltonian from the ground state  orbitals\n///  A side effect of this function is that the stored potentials\n///  stored_v_coul and stored V nuc get modified\n//   Returns both the hamiltonian and the hamiltonian without diagonal\n//\n//\n/// \\param world\n/// \\return\nauto ResponseBase::ComputeHamiltonianPair(World &world) const\n    -> std::pair<Tensor<double>, Tensor<double>> {\n  // Basic output\n  if (r_params.print_level() >= 1)\n    molresponse::start_timer(world);\n  auto phi = copy(world, ground_orbitals, true);\n  bool debugging = true;\n  if (debugging) {\n\n\n    auto overlap = matrix_inner(world, phi, phi);\n    if (world.rank() == 0) {\n      print(\"check k: overlap\");\n      print(overlap);\n    }\n  }\n  // Get sizes\n  //\n  auto num_orbitals = phi.size();\n  // Debugging\n  // Make the derivative operators in each direction\n  real_derivative_3d Dx(world, 0);\n  real_derivative_3d Dy(world, 1);\n  real_derivative_3d Dz(world, 2);\n\n  // Apply derivatives once, and take inner products\n  // according to this formula (faster / less noise):\n  //  < f | \\nabla^2 | f > = - < \\nabla f | \\nabla f >\n  reconstruct(world, phi);\n  std::vector<real_function_3d> fx = apply(world, Dx, phi);\n  std::vector<real_function_3d> fy = apply(world, Dy, phi);\n  std::vector<real_function_3d> fz = apply(world, Dz, phi);\n  compress(world, fx, true);\n  compress(world, fy, true);\n  compress(world, fz, true);\n  compress(world, phi, true);\n  world.gop.fence();\n\n  // Construct T according to above formula\n  // Note: No negative as the formula above\n  // has one as well, so they cancel\n  Tensor<double> T =\n      1.0 / 2.0 *\n      (matrix_inner(world, fx, fx) + matrix_inner(world, fy, fy) +\n       matrix_inner(world, fz, fz));\n  if (world.rank() == 0) {\n    print(\"check k: compute T\");\n    print(T);\n  }\n  real_function_3d v_nuc = potential_manager->vnuclear();\n  v_nuc.truncate();\n  real_function_3d v_coul = 2.0 * Coulomb(world);\n  // Clear old stored potentials  Made this mutable\n  stored_v_coul.clear();\n  stored_v_nuc.clear();\n  // If storing potentials, save them here\n  if (r_params.store_potential()) {\n    stored_v_nuc = copy(v_nuc);\n    stored_v_coul = copy(v_coul);\n  }\n  // v_nuc comes out negative from potential manager, so add it\n  real_function_3d v_local = v_coul + v_nuc;\n  stored_potential.clear();\n  // step one construct the HF exchange operator\n  XCOperator<double, 3> xcop = make_xc_operator(world);\n\n  double exc = 0.0;\n  double enl = 0.0;\n  auto phi0 = copy(world, ground_orbitals);\n  auto c_xc = xcf.hf_exchange_coefficient();\n  auto Vpsi = zero_functions<double, 3>(world, phi0.size());\n  if (xcf.hf_exchange_coefficient() > 0.0) {\n\n    molresponse::start_timer(world);\n    const double lo = 1.e-10;\n    Exchange<double, 3> k{world, lo};\n    if (r_params.hfexalg() == \"multiworld\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient);\n    } else if (r_params.hfexalg() == \"multiworld_row\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient_row);\n    } else if (r_params.hfexalg() == \"largemem\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::large_memory);\n    } else if (r_params.hfexalg() == \"smallmem\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::small_memory);\n    }\n    k.set_bra_and_ket(phi0, phi0);\n    // k.set_symmetric(true).set_printlevel(r_params.print_level());\n    auto kphi = k(phi);\n    auto excv = inner(world, kphi, phi0);\n    double exchf = 0.0;\n    for (size_t i = 0; i < phi.size(); ++i) {\n      exchf -= 0.5 * excv[static_cast<long>(i)];\n    }\n    if (!xcf.is_spin_polarized())\n      exchf *= 2.0;\n    Vpsi = -xcf.hf_exchange_coefficient() * kphi;\n    kphi.clear();\n    molresponse::end_timer(world, \"HF exchange\");\n    exc += exchf * xcf.hf_exchange_coefficient();\n  }\n  // compute the local DFT potential for the MOs\n  if (xcf.is_dft() && (xcf.hf_exchange_coefficient() != 1.0)) {\n    molresponse::start_timer(world);\n    auto xcoperator = make_xc_operator(world);\n    exc = xcoperator.compute_xc_energy();\n    v_local += xcoperator.make_xc_potential();\n    molresponse::end_timer(world, \"DFT potential\");\n  }\n  v_local.truncate();\n  gaxpy(world, 1.0, Vpsi, 1.0, mul_sparse(world, v_local, phi0, vtol));\n  truncate(world, Vpsi);\n  if (r_params.store_potential()) {\n    stored_potential.clear();\n    for (int i = 0; i < r_params.num_states(); i++) {\n      stored_potential.push_back(Vpsi);\n    }\n  }\n\n  auto phi_V_phi = matrix_inner(world, phi0, Vpsi);\n\n  if (world.rank() == 0) {\n    print(\"check k: compute phi_V_phi\");\n    print(phi_V_phi);\n  }\n\n  // Now create the new_hamiltonian\n  auto new_hamiltonian = T + phi_V_phi;\n\n  if (world.rank() == 0) {\n    print(\"check k: output hamiltonian\");\n    print(new_hamiltonian);\n  }\n\n  for (int64_t i = 0; i < new_hamiltonian.dim(0); i++) {\n    for (int64_t j = i + 1; j < new_hamiltonian.dim(1); j++) {\n      new_hamiltonian(j, i) = new_hamiltonian(i, j);\n    }\n  }\n  double traceOfHamiltonian(0);\n  for (int64_t i = 0; i < new_hamiltonian.dim(0); i++) {\n    traceOfHamiltonian += new_hamiltonian(i, i);\n  }\n  // Copy new_hamiltonian and zero the diagonal\n  auto new_hamiltonian_no_diag = copy(new_hamiltonian);\n  for (size_t i = 0; i < num_orbitals; i++)\n    new_hamiltonian_no_diag(long(i), long(i)) = 0.0;\n\n  // End timer\n  if (r_params.print_level() >= 1)\n    molresponse::end_timer(world, \"   Create grnd ham:\");\n\n  phi0.clear();\n  fx.clear();\n  fy.clear();\n  fz.clear();\n  v_local.clear();\n  v_nuc.clear();\n  v_coul.clear();\n  phi.clear();\n\n  return {new_hamiltonian, new_hamiltonian_no_diag};\n}\n\nauto ResponseBase::make_ground_density(World &world) const -> functionT {\n\n  auto vsq = square(world, ground_orbitals);\n  compress(world, vsq);\n  functionT rho = factoryT(world);\n  rho.compress();\n  for (const auto &vsq_i : vsq) {\n    rho.gaxpy(1.0, vsq_i, 1.0, false);\n  }\n  // for (const auto &phi_squared: vsq) rho.gaxpy(2.0, phi_squared, 1.0, false);\n  world.gop.fence();\n  vsq.clear();\n  return rho;\n}\n\n// @brief Calculates ground state coulomb potential function\n//\n//  The coulomb potential of the ground state is\n//  \\f$ f=\\int \\sum \\frac{\\phi_i(r)\\phi(r)}{|r-r'|}dr\n//\n/// \\param world\n/// \\return\nauto ResponseBase::Coulomb(World &world) const -> real_function_3d {\n  return apply(*shared_coulomb_operator, ground_density).truncate();\n}\n\n// TODO  Create apply_operator<T>(f)  generalized function in place of coulomb\n\nauto ResponseBase::make_xc_operator(World &world) const\n    -> XCOperator<double, 3> {\n  return {world, r_params.xc(), false, ground_density, ground_density};\n}\n\nauto ResponseBase::update_density(World &world, const X_space &chi,\n                                  const vecfuncT &old_density) const\n    -> vecfuncT {\n  auto density = copy(world, old_density);\n  auto calc_type = r_params.calc_type();\n  auto thresh = FunctionDefaults<3>::get_thresh();\n\n  if (calc_type == \"full\") {\n    functionT rhox = factoryT(world);\n    functionT rhoy = factoryT(world);\n    for (const auto &b : chi.active) {\n\n      auto x_phi = mul(world, chi.x[b], ground_orbitals, false);\n      auto y_phi = mul(world, chi.y[b], ground_orbitals, false);\n      world.gop.fence();\n      density[b] = sum(world, x_phi) + sum(world, y_phi);\n    }\n  } else if (calc_type == \"static\") {\n    for (const auto &b : chi.active) {\n      auto x_phi = mul(world, chi.x[b], ground_orbitals, false);\n      world.gop.fence();\n      density[b] = 2 * sum(world, x_phi);\n    }\n  } else {\n    density = transition_densityTDA(world, ground_orbitals, chi.x);\n  }\n  truncate(world, density, thresh);\n  return density;\n}\n\nauto ResponseBase::make_density(World &world,\n                                const X_space &chi) const -> vecfuncT {\n  auto density = vector_real_function_3d(chi.num_states());\n  auto calc_type = r_params.calc_type();\n  auto thresh = FunctionDefaults<3>::get_thresh();\n  if (calc_type == \"full\") {\n\n    for (const auto &b : chi.active) {\n      auto x_phi = mul(world, chi.x[b], ground_orbitals, false);\n      auto y_phi = mul(world, chi.y[b], ground_orbitals, false);\n      world.gop.fence();\n      density[b] = sum(world, x_phi) + sum(world, y_phi);\n    }\n  } else if (calc_type == \"static\") {\n    int b = 0;\n    for (auto &rho_b : density) {\n      auto xb = chi.x[b];\n      auto x_phi = mul(world, xb, ground_orbitals, false);\n      world.gop.fence();\n      rho_b = 2 * sum(world, x_phi);\n      b++;\n    }\n  } else {\n    density = transition_densityTDA(world, ground_orbitals, chi.x);\n  }\n  truncate(world, density, thresh);\n  return density;\n}\n\nvoid ResponseBase::load_balance_chi(World &world) {\n  molresponse::start_timer(world);\n  if (world.size() == 1)\n    return;\n\n  LoadBalanceDeux<3> lb(world);\n  real_function_3d v_nuclear;\n  v_nuclear = potential_manager->vnuclear();\n\n  lb.add_tree(v_nuclear, lbcost<double, 3>(1.0, 8.0), false);\n\n  if (r_params.omega() != 0) {\n\n    auto chi_vec = Chi.to_vector();\n    for (auto &b : chi_vec) {\n      lb.add_tree(b, lbcost<double, 3>(1.0, 8.0), false);\n    }\n  } else {\n    auto chi_vec = Chi.x.to_vector();\n    for (auto &b : chi_vec) {\n      lb.add_tree(b, lbcost<double, 3>(1.0, 8.0), false);\n    }\n  }\n  world.gop.fence();\n\n  FunctionDefaults<3>::redistribute(\n      world,\n      lb.load_balance(r_params.loadbalparts())); // 6.0 needs retuning after\n  molresponse::end_timer(world, \"Load balancing\");\n}\n\nauto ResponseBase::make_bsh_operators_response(World &world, double &shift,\n                                               const double omega) const\n    -> std::vector<poperatorT> {\n  if (r_params.print_level() >= 1)\n    molresponse::start_timer(world);\n\n  double tol = FunctionDefaults<3>::get_thresh();\n  // Sizes inferred from ground and omega\n  size_t num_orbitals = ground_energies.size(); // number of orbitals\n  std::vector<poperatorT> ops(num_orbitals);\n  // Run over occupied components\n  int p = 0;\n  std::for_each(ops.begin(), ops.end(), [&](auto &operator_p) {\n    double mu = sqrt(-2.0 * (ground_energies(p++) + omega + shift));\n    operator_p = poperatorT(BSHOperatorPtr3D(world, mu, r_params.lo(), tol));\n  });\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"make bsh operators response\");\n  }\n  return ops;\n  // End timer\n}\n\nauto ResponseBase::compute_gamma(World &world, const gamma_orbitals &density,\n                                 const XCOperator<double, 3> &xc) const\n    -> X_space {\n  std::shared_ptr<WorldDCPmapInterface<Key<3>>> old_pmap =\n      FunctionDefaults<3>::get_pmap();\n  auto c_xc = xcf.hf_exchange_coefficient();\n\n  auto [chi_alpha, phi0, rho1] =\n      orbital_load_balance(world, density, r_params.loadbalparts());\n  QProjector<double, 3> projector(phi0);\n\n  X_space W = X_space::zero_functions(world, chi_alpha.num_states(),\n                                      chi_alpha.num_orbitals());\n\n  auto apply_projector = [&](auto &xi) { return projector(xi); };\n  // apply the exchange kernel to rho if necessary\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_make_density\");\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto J = response_context.compute_j1(world, chi_alpha, rho1, {phi0, phi0},\n                                       shared_coulomb_operator);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"J[omega]\", \"J[omega]\", iter_timing);\n  }\n  // Create Coulomb potential on ground_orbitals\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto K =\n      response_context.compute_k1(world, chi_alpha, {phi0, phi0}, {phi0, phi0});\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"K[omega]\", \"K[omega]\", iter_timing);\n  }\n  if (r_params.print_level() >= 20) {\n    print_inner(world, \"old xKx\", chi_alpha, K);\n  }\n  molresponse::start_timer(world);\n  X_space gamma = X_space::zero_functions(world, chi_alpha.num_states(),\n                                          chi_alpha.num_orbitals());\n  gamma = 2 * J - c_xc * K;\n\n  if (c_xc != 1.0) {\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n    W = response_context.compute_VXC1(world, chi_alpha, rho1, {phi0, phi0}, xc);\n    if (r_params.print_level() >= 1) {\n      molresponse::end_timer(world, \"XC[omega]\", \"XC[omega]\", iter_timing);\n    }\n\n    gamma += (1.0 - c_xc) * W;\n  }\n  // gamma.truncate();\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma add\", \"gamma_truncate_add\",\n                           iter_timing);\n  }\n  // project out ground state\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  gamma = oop_apply(gamma, apply_projector);\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_project\", \"gamma_project\",\n                           iter_timing);\n  }\n  if (r_params.print_level() >= 20) {\n    molresponse::start_timer(world);\n    print_inner(world, \"xJx\", chi_alpha, J);\n    print_inner(world, \"xKx\", chi_alpha, K);\n    print_inner(world, \"xWx\", chi_alpha, W);\n    print_inner(world, \"xGammax\", chi_alpha, gamma);\n    molresponse::end_timer(world, \"Print Expectation Creating Gamma:\");\n  }\n\n  molresponse::start_timer(world);\n  J.clear();\n  K.clear();\n  W.clear();\n  chi_alpha.clear();\n  phi0.clear();\n  molresponse::end_timer(world, \"Clear functions and set old pmap\");\n  if (world.size() > 1) {\n    FunctionDefaults<3>::set_pmap(old_pmap); // ! DON'T FORGET !\n  }\n  return gamma;\n  // Get sizes\n}\n\nauto ResponseBase::compute_theta_X(\n    World &world, const X_space &chi, const vector_real_function_3d &rho1,\n    const XCOperator<double, 3> &xc,\n    const std::string &calc_type) const -> X_space {\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  bool compute_Y = calc_type == \"full\";\n  X_space Theta_X =\n      X_space::zero_functions(world, chi.num_states(), chi.num_orbitals());\n  Theta_X.set_active(chi.active);\n  if (r_params.print_level() >= 20) {\n    print_inner(world, \"chichi\", chi, chi);\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  X_space V0X = compute_V0X(world, chi, xc, compute_Y);\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"compute_V0X\", \"compute_V0X\", iter_timing);\n  }\n  if (r_params.print_level() >= 20) {\n    print_inner(world, \"xV0x\", chi, V0X);\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  X_space E0X(world, chi.num_states(), chi.num_orbitals());\n  E0X.set_active(chi.active);\n\n  if (r_params.localize() != \"canon\") {\n    if (compute_Y) {\n      chi.compress();\n      E0X = chi * ham_no_diag;\n    } else {\n      chi.x.compress_rf();\n      E0X.x = chi.x * ham_no_diag;\n    }\n    if (r_params.print_level() >= 20) {\n      print_inner(world, \"xE0x\", chi, E0X);\n    }\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"compute_E0X\", \"compute_E0X\", iter_timing);\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto gamma =\n      X_space::zero_functions(world, chi.num_states(), chi.num_orbitals());\n  if (calc_type != \"tda\") {\n\n    std::vector<int> state_index;\n    std::vector<int> ii;\n    auto orbs_per_state =\n        (compute_Y) ? 2 * chi.num_orbitals() : chi.num_orbitals();\n\n    int i = 0;\n    int si = 0;\n    for (auto &b : chi.active) {\n      for (int j = 0; j < orbs_per_state; j++) {\n        state_index.push_back(si);\n        ii.push_back(i++);\n      }\n      si++;\n    }\n\n    ResponseComputeGammaX t;\n    MacroTask gamma_task(world, t);\n\n    gamma.set_active(chi.active);\n    if (compute_Y) {\n      auto vec_chi = chi.to_vector();\n      auto gamma_vec =\n          gamma_task(ii, state_index, vec_chi, ground_orbitals, false);\n      gamma.from_vector(gamma_vec);\n    } else {\n      auto vec_chi = chi.x.to_vector();\n      auto gamma_vec =\n          gamma_task(ii, state_index, vec_chi, ground_orbitals, true);\n      auto gnorm = norm2s_T(world, gamma_vec);\n      // if (world.rank() == 0)\n      // {\n      //   print(\"gamma_vec norm: \", gnorm);\n      // }\n      gamma.x.from_vector(gamma_vec);\n      // gamma.y = gamma.x;\n    }\n\n    // gamma = compute_gamma(world, {chi, ground_orbitals, rho1}, xc);\n  } else {\n    gamma = compute_gamma_tda(world, {chi, ground_orbitals, rho1}, xc);\n  }\n\n  if (r_params.print_level() >= 20) {\n    print_inner(world, \"gammaX\", chi, gamma);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gammaX\", \"gammaX\", iter_timing);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  if (compute_Y) {\n    Theta_X.from_vector(V0X.to_vector() - E0X.to_vector() + gamma.to_vector());\n    // Theta_X = (V0X - E0X) + gamma;\n  } else {\n    // Theta_X.x = (V0X.x - E0X.x) + gamma.x;\n    Theta_X.x.from_vector(V0X.x.to_vector() - E0X.x.to_vector() +\n                          gamma.x.to_vector());\n  }\n  if (r_params.print_level() >= 20) {\n    print_inner(world, \"xThetax\", Theta_X, Theta_X);\n  }\n\n  world.gop.fence();\n  //    Theta_X.truncate();\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"compute_ThetaX_add\", \"compute_ThetaX_add\",\n                           iter_timing);\n  }\n  if (r_params.print_level() >= 20) {\n    print_inner(world, \"xThetax\", chi, Theta_X);\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"compute_ThetaX\", \"compute_ThetaX\",\n                           iter_timing);\n  }\n\n  return Theta_X;\n}\n\nauto ResponseBase::compute_gamma_full(\n    World &world, const gamma_orbitals &density,\n    const XCOperator<double, 3> &xc) const -> X_space {\n  std::shared_ptr<WorldDCPmapInterface<Key<3>>> old_pmap =\n      FunctionDefaults<3>::get_pmap();\n\n  auto [chi_alpha, phi0, rho1] =\n      orbital_load_balance(world, density, r_params.loadbalparts());\n\n  QProjector<double, 3> projector(phi0);\n  size_t num_states = chi_alpha.num_states();\n  size_t num_orbitals = chi_alpha.num_orbitals();\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  // x functions\n  // here I create the orbital products for elctron interaction terms\n  vecfuncT phi_phi;\n  vecfuncT x_phi;\n  vecfuncT y_phi;\n\n  X_space W = X_space::zero_functions(world, num_states, num_orbitals);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_zero_functions\",\n                           \"gamma_zero_functions\", iter_timing);\n  }\n  auto apply_projector = [&](auto &xi) { return projector(xi); };\n  // apply the exchange kernel to rho if necessary\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  auto rho_b = make_density(world, chi_alpha);\n  auto J = response_context.compute_j1(world, chi_alpha, rho_b, {phi0, phi0},\n                                       shared_coulomb_operator);\n\n  world.gop.fence();\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"J[omega]\", \"J[omega]\", iter_timing);\n  }\n  // Create Coulomb potential on ground_orbitals\n  if (xcf.hf_exchange_coefficient() != 1.0) {\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n    W = response_context.compute_VXC1(world, chi_alpha, rho_b, {phi0, phi0},\n                                      xc);\n    if (r_params.print_level() >= 1) {\n      molresponse::end_timer(world, \"XC[omega]\", \"XC[omega]\", iter_timing);\n    }\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto K =\n      response_context.compute_k1(world, chi_alpha, {phi0, phi0}, {phi0, phi0});\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"K[omega]\", \"K[omega]\", iter_timing);\n  }\n  if (r_params.print_level() >= 20) {\n    print_inner(world, \"old xKx\", chi_alpha, K);\n  }\n  molresponse::start_timer(world);\n  X_space gamma(world, num_states, num_orbitals);\n  auto c_xc = xcf.hf_exchange_coefficient();\n  gamma = 2 * J - c_xc * K;\n\n  if (xcf.hf_exchange_coefficient() != 1.0) {\n    gamma += (1.0 - c_xc) * W;\n    if (world.rank() == 0) {\n      print(\"gamma: += W\");\n    }\n  }\n  // gamma.truncate();\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma add\", \"gamma_truncate_add\",\n                           iter_timing);\n  }\n  // project out ground state\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  gamma = oop_apply(gamma, apply_projector);\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_project\", \"gamma_project\",\n                           iter_timing);\n  }\n  if (r_params.print_level() >= 20) {\n    molresponse::start_timer(world);\n    print_inner(world, \"xJx\", chi_alpha, J);\n    print_inner(world, \"xKx\", chi_alpha, K);\n    print_inner(world, \"xWx\", chi_alpha, W);\n    print_inner(world, \"xGammax\", chi_alpha, gamma);\n    molresponse::end_timer(world, \"Print Expectation Creating Gamma:\");\n  }\n\n  molresponse::start_timer(world);\n  J.clear();\n  K.clear();\n  W.clear();\n  chi_alpha.clear();\n  phi0.clear();\n  molresponse::end_timer(world, \"Clear functions and set old pmap\");\n  if (world.size() > 1) {\n    FunctionDefaults<3>::set_pmap(old_pmap); // ! DON'T FORGET !\n  }\n  return gamma;\n  // Get sizes\n}\n\nauto ResponseBase::compute_gamma_static(\n    World &world, const gamma_orbitals &gammaOrbitals,\n    const XCOperator<double, 3> &xc) const -> X_space {\n\n  auto old_pmap = FunctionDefaults<3>::get_pmap();\n  auto [xy, phi0, rho1] =\n      orbital_load_balance(world, gammaOrbitals, r_params.loadbalparts());\n  QProjector<double, 3> projector(phi0);\n  size_t num_states = xy.num_states();\n  size_t num_orbitals = xy.num_orbitals();\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  X_space gamma(world, num_states, num_orbitals);\n  // here I create the orbital products for elctron interaction terms\n  vecfuncT phi_phi;\n  vecfuncT x_phi;\n  functionT temp_J;\n  X_space W = X_space::zero_functions(world, num_states, num_orbitals);\n  X_space J(world, num_states, num_orbitals);\n  X_space K = X_space::zero_functions(world, num_states, num_orbitals);\n  X_space KX = X_space::zero_functions(world, num_states, num_orbitals);\n  X_space KY = X_space::zero_functions(world, num_states, num_orbitals);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_zero_functions\",\n                           \"gamma_zero_functions\", iter_timing);\n  }\n  // apply the exchange kernel to rho if necessary\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto rho = make_density(world, xy);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"compute density J[omega]\");\n  }\n  int b = 0;\n  for (const auto &rho_b : rho) {\n    auto temp_J = apply(*shared_coulomb_operator, rho_b);\n    J.x[b++] = mul(world, temp_J, phi0);\n  }\n  std::transform(J.x.begin(), J.x.end(), J.x.begin(),\n                 [&](auto &jxi) { return projector(jxi); });\n  J.y = J.x.copy();\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"J[omega]\", \"J[omega]\", iter_timing);\n  }\n  if (xcf.hf_exchange_coefficient() != 1.0) {\n    auto compute_wx = [&, &phi0 = phi0](auto rho_alpha) {\n      auto xc_rho = xc.apply_xc_kernel(rho_alpha);\n      return mul(world, xc_rho, phi0);\n    };\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n    std::transform(rho.begin(), rho.end(), W.x.begin(), compute_wx);\n    std::transform(W.x.begin(), W.x.end(), W.x.begin(),\n                   [&](auto &wxi) { return projector(wxi); });\n    W.y = W.x.copy();\n    if (r_params.print_level() >= 1) {\n      molresponse::end_timer(world, \"XC[omega]\", \"XC[omega]\", iter_timing);\n    }\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  K = response_exchange(phi0, xy, false);\n  std::transform(K.x.begin(), K.x.end(), K.x.begin(),\n                 [&](auto &kxi) { return projector(kxi); });\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"K[omega]\", \"K[omega]\", iter_timing);\n  }\n  if (r_params.print_level() >= 20) {\n    print_inner(world, \"new static KX\", xy, K);\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  gamma = 2 * J - K * xcf.hf_exchange_coefficient() + W;\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_truncate_add\", \"gamma_truncate_add\",\n                           iter_timing);\n  }\n  // project out ground state\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  // for (size_t i = 0; i < num_states; i++) { gamma.X[i] =\n  // projector(gamma.X[i]); }\n  std::transform(gamma.x.begin(), gamma.x.end(), gamma.x.begin(),\n                 [&](auto &gxi) { return projector(gxi); });\n  gamma.y = gamma.x.copy();\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_project\", \"gamma_project\",\n                           iter_timing);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  J.clear();\n  K.clear();\n  W.clear();\n  xy.clear();\n  phi0.clear();\n\n  if (world.size() > 1) {\n    FunctionDefaults<3>::set_pmap(old_pmap); // ! DON'T FORGET !\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_clear_functions\",\n                           \"gamma_clear_functions\", iter_timing);\n  }\n  // Done\n  return gamma;\n  // Get sizes\n}\n\nauto ResponseBase::compute_gamma_tda(\n    World &world, const gamma_orbitals &density,\n    const XCOperator<double, 3> &xc) const -> X_space {\n  auto [d_alpha, phi0, rho1] =\n      orbital_load_balance(world, density, r_params.loadbalparts());\n  std::shared_ptr<WorldDCPmapInterface<Key<3>>> oldpmap =\n      FunctionDefaults<3>::get_pmap();\n  size_t num_states = d_alpha.num_states();\n  size_t num_orbitals = d_alpha.num_orbitals();\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  X_space gamma(world, num_states, num_orbitals);\n  // x functions\n  vector_real_function_3d phi_phi;\n  real_function_3d temp_J;\n  response_space J(world, num_states, num_orbitals);\n  response_space k1_x(world, num_states, num_orbitals);\n  response_space W(world, num_states, num_orbitals);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_zero_functions\",\n                           \"gamma_zero_functions\", iter_timing);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  auto rho = transition_densityTDA(world, phi0, d_alpha.x);\n\n  auto compute_jx = [&, &phi0 = phi0](auto rho_alpha) {\n    auto temp_J = apply(*shared_coulomb_operator, rho_alpha);\n    temp_J.truncate();\n    return mul(world, temp_J, phi0);\n  };\n\n  std::transform(rho.begin(), rho.end(), J.begin(), compute_jx);\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"J[omega]\", \"J[omega]\", iter_timing);\n  }\n\n  // Create Coulomb potential on ground_orbitals\n  if (xcf.hf_exchange_coefficient() != 1.0) {\n    auto compute_wx = [&, &phi0 = phi0](auto rho_alpha) {\n      auto xc_rho = xc.apply_xc_kernel(rho_alpha);\n      return mul(world, xc_rho, phi0);\n    };\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n    // for every transition density apply the exchange kernel and multiply the\n    // vector of orbitals\n    std::transform(rho.begin(), rho.end(), W.begin(), compute_wx);\n    W = W.copy();\n\n    if (r_params.print_level() >= 1) {\n      molresponse::end_timer(world, \"XC[omega]\", \"XC[omega]\", iter_timing);\n    }\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  for (size_t b = 0; b < num_states; b++) {\n    vecfuncT x;\n    x = d_alpha.x[b];\n    k1_x[b] = newK(x, phi0, phi0);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"K[omega]\", \"K[omega]\", iter_timing);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  k1_x.truncate_rf();\n  J.truncate_rf();\n  W.truncate_rf();\n\n  gamma.x = (J * 2) - k1_x * xcf.hf_exchange_coefficient() + W;\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_truncate_add\", \"gamma_truncate_add\",\n                           iter_timing);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  QProjector<double, 3> projector(ground_orbitals);\n  for (size_t i = 0; i < num_states; i++) {\n    gamma.x[i] = projector(gamma.x[i]);\n    truncate(world, gamma.x[i]);\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_project\", \"gamma_project\",\n                           iter_timing);\n  }\n\n  if (r_params.print_level() >= 20) {\n    print(\"------------------------ Gamma Functions Norms  \"\n          \"------------------\");\n    print(\"Gamma X norms\");\n    print(gamma.x.norm2());\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  J.clear();\n  k1_x.clear();\n  W.clear();\n\n  d_alpha.clear();\n  phi0.clear();\n\n  if (world.size() > 1) {\n    FunctionDefaults<3>::set_pmap(oldpmap); // ! DON'T FORGET !\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"gamma_clear_functions\",\n                           \"gamma_clear_functions\", iter_timing);\n  }\n  // Done\n  world.gop.fence();\n  return gamma;\n}\n\nauto ResponseBase::compute_lambda_X(\n    World &world, const X_space &chi, XCOperator<double, 3> &xc,\n    const std::string &calc_type) const -> X_space {\n  // compute\n  bool compute_Y = calc_type == \"full\";\n\n  X_space Lambda_X; // = X_space(world, chi.num_states(), chi.num_orbitals());\n\n  X_space F0X = compute_F0X(world, chi, xc, compute_Y);\n  X_space Chi_truncated = chi.copy();\n  Chi_truncated.truncate();\n\n  X_space E0X = Chi_truncated.copy();\n  E0X.truncate();\n  E0X.x = E0X.x * hamiltonian;\n\n  if (compute_Y) {\n    E0X.y = E0X.y * hamiltonian;\n  }\n  if (r_params.print_level() >= 20) {\n    auto e0_mx = inner(Chi_truncated, E0X);\n    if (world.rank() == 0) {\n      print(\"<X|E0|X>\");\n      print(e0_mx);\n    }\n  }\n  // put it all together\n  X_space gamma;\n  // compute\n  if (calc_type == \"full\") {\n    gamma = compute_gamma_full(\n        world, {chi, ground_orbitals, vector_real_function_3d{}}, xc);\n  } else if (calc_type == \"static\") {\n    gamma = compute_gamma_static(\n        world, {chi, ground_orbitals, vector_real_function_3d{}}, xc);\n  } else {\n    gamma = compute_gamma_tda(\n        world, {chi, ground_orbitals, vector_real_function_3d{}}, xc);\n  }\n  if (r_params.print_level() >= 20) {\n    auto gamma_mx = inner(Chi_truncated, gamma);\n    if (world.rank() == 0) {\n      print(\"<X|gamma|X>\");\n      print(gamma_mx);\n    }\n  }\n\n  Lambda_X = (F0X - E0X) + gamma;\n  Lambda_X.truncate();\n  if (r_params.print_level() >= 20) {\n    auto lambda_mx = inner(Chi_truncated, Lambda_X);\n    if (world.rank() == 0) {\n      print(\"<X|lambda|X>\");\n      print(lambda_mx);\n    }\n  }\n\n  return Lambda_X;\n}\n\nauto ResponseBase::compute_response_potentials(World &world, const X_space &chi,\n                                               XCOperator<double, 3> &xc,\n                                               const std::string &calc_type)\n    const -> std::tuple<X_space, X_space, X_space> {\n  // compute\n  bool compute_Y = calc_type == \"full\";\n\n  // first compute kinetic energy piece\n\n  size_t m = chi.num_states();\n  size_t n = chi.num_orbitals();\n  X_space chi_copy = chi.copy();\n\n  molresponse::start_timer(world);\n  X_space T0X = X_space(world, m, n);\n  T0X.x = T(world, chi_copy.x);\n  if (compute_Y) {\n    T0X.y = T(world, chi_copy.y);\n  }\n  if (r_params.print_level() >= 20) {\n    print(\"inner <X|T0|X>\");\n    print(inner(chi_copy, T0X));\n  }\n  molresponse::end_timer(world, \"TX\", \"TX\", iter_timing);\n\n  molresponse::start_timer(world);\n  X_space E0X = chi_copy.copy();\n  E0X.x = E0X.x * hamiltonian;\n  if (compute_Y) {\n    E0X.y = E0X.y * hamiltonian;\n  }\n  molresponse::end_timer(world, \"E0X\", \"E0X\", iter_timing);\n\n  X_space V0X = compute_V0X(world, chi_copy, xc, compute_Y);\n\n  // put it all together\n  X_space gamma;\n  // compute\n  if (calc_type == \"full\") {\n    gamma = compute_gamma_full(\n        world, {chi, ground_orbitals, vector_real_function_3d{}}, xc);\n  } else if (calc_type == \"static\") {\n    gamma = compute_gamma_static(\n        world, {chi, ground_orbitals, vector_real_function_3d{}}, xc);\n  } else {\n    gamma = compute_gamma_tda(\n        world, {chi, ground_orbitals, vector_real_function_3d{}}, xc);\n  }\n\n  X_space Lambda_X(\n      world, m,\n      n); // = X_space(world, chi.num_states(), chi.num_orbitals());\n\n  Lambda_X = (T0X + V0X - E0X) + gamma;\n\n  return {Lambda_X, V0X, gamma};\n}\n\n// Returns the ground state potential applied to functions f\n// (V0 f) V0=(Vnuc+J0-K0+W0)\n// J0=J[ground_density]\n// K0=K[ground_density]f\n// EXC0=W[ground_density]\nauto ResponseBase::compute_V0X(World &world, const X_space &X,\n                               const XCOperator<double, 3> &xc,\n                               bool compute_Y) const -> X_space {\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  size_t m = X.num_states();\n  size_t n = X.num_orbitals();\n  X_space V0 = X_space::zero_functions(world, m, n);\n  V0.set_active(X.active);\n\n  real_function_3d v_nuc, v_j0, v_k0, v_xc;\n  if (not r_params.store_potential()) {\n    v_nuc = potential_manager->vnuclear();\n    v_nuc.truncate(FunctionDefaults<3>::get_thresh(), true);\n    // v_nuc.truncate();\n  } else { // Already pre-computed\n    v_nuc = stored_v_nuc;\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"V0_nuc\", \"V0_nuc\", iter_timing);\n  }\n  // Coulomb Potential J0*f\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  if (not r_params.store_potential()) {\n    // J^0 x^alpha\n    v_j0 = apply(*shared_coulomb_operator, ground_density, true);\n    v_j0.scale(2.0, true);\n    v_j0.truncate(FunctionDefaults<3>::get_thresh(), true);\n  } else { // Already pre-computed\n    v_j0 = stored_v_coul;\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"J[0]\", \"J[0]\", iter_timing);\n  }\n\n  if (xcf.hf_exchange_coefficient() != 1.0) {\n    if (r_params.print_level() >= 1) {\n      molresponse::start_timer(world);\n    }\n    v_xc = xc.make_xc_potential();\n    if (r_params.print_level() >= 1) {\n      molresponse::end_timer(world, \"XC[0]\", \"XC[0]\", iter_timing);\n    }\n  } else {\n    // make a zero function\n    v_xc = Function<double, 3>(\n        FunctionFactory<double, 3>(world).fence(false).initial_level(1));\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  // K0 = ground_exchange(ground_orbitals, X, compute_Y, r_params);\n  std::vector<int> state_index;\n  std::vector<int> ii;\n  auto orbs_per_state = (compute_Y) ? 2 * X.num_orbitals() : X.num_orbitals();\n\n  int i = 0;\n  int si = 0;\n  for (auto &b : X.active) {\n    for (int j = 0; j < orbs_per_state; j++) {\n      state_index.push_back(si);\n      ii.push_back(i++);\n    }\n    si++;\n  }\n\n  auto gamma0 =\n      X_space::zero_functions(world, X.num_states(), X.num_orbitals());\n  gamma0.set_active(X.active);\n\n  ResponseComputeGroundExchange t;\n  MacroTask gamma_task(world, t);\n\n  if (compute_Y) {\n    auto vec_chi = X.to_vector();\n    auto gamma_vec =\n        gamma_task(ii, state_index, vec_chi, ground_orbitals, false);\n    gamma0.from_vector(gamma_vec);\n  } else {\n    auto vec_chi = X.x.to_vector();\n    auto gamma_vec =\n        gamma_task(ii, state_index, vec_chi, ground_orbitals, true);\n\n    gamma0.x.from_vector(gamma_vec);\n\n    if (r_params.print_level() >= 20) {\n      print_inner(world, \"gamma0\", gamma0, gamma0);\n    }\n\n    // gamma0.y = gamma0.x;\n  }\n\n  if (r_params.print_level() >= 20) {\n    print_inner(world, \"gamma0\", X, gamma0);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"K[0]\", \"K[0]\", iter_timing);\n  }\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  auto c_xc = xcf.hf_exchange_coefficient();\n  real_function_3d v0 = v_j0 + v_nuc + (1 - c_xc) * v_xc;\n  double safety = 0.1;\n  double v_tol = safety * FunctionDefaults<3>::get_thresh();\n\n  if (compute_Y) {\n\n    auto v0vec = X.to_vector() * v0;\n    auto gamma0vec = gamma0.to_vector();\n\n    compress(world, gamma0vec, true);\n    compress(world, v0vec, true);\n    world.gop.fence();\n    v0vec = v0vec - c_xc * gamma0vec;\n    truncate(world, v0vec, v_tol);\n    V0.from_vector(v0vec);\n\n    /*V0 = X * v0;*/\n    /*V0 = V0 - c_xc * gamma0;*/\n    /*V0.truncate(v_tol);*/\n  } else {\n\n    auto v0vec = X.x.to_vector() * v0;\n    auto gamma0vec = gamma0.x.to_vector();\n    compress(world, gamma0vec, true);\n    compress(world, v0vec, true);\n    world.gop.fence();\n    v0vec = v0vec - c_xc * gamma0vec;\n    truncate(world, v0vec, v_tol);\n    V0.x.from_vector(v0vec);\n\n    /**/\n    /*V0.x = v0 * X.x;*/\n    /*V0.x = V0.x - c_xc * gamma0.x;*/\n    /*V0.x.truncate_rf(vtol);*/\n    // V0.y = V0.x;\n  }\n  if (r_params.print_level() >= 20) {\n\n    print_inner(world, \"xV0x\", X, V0);\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"V0_add\", \"V0_add\", iter_timing);\n  }\n  return V0;\n}\n\nauto ResponseBase::compute_TX(World &world, const X_space &x,\n                              bool compute_Y) const -> X_space {\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  X_space T0X = X_space(world, x.num_states(), x.num_orbitals());\n\n  real_derivative_3d Dx(world, 0);\n  real_derivative_3d Dy(world, 1);\n  real_derivative_3d Dz(world, 2);\n\n  if (compute_Y) {\n    auto t_xx = create_response_matrix(x.num_states(), x.num_orbitals());\n    auto xx = to_response_matrix(x);\n    int b = 0;\n    for (const auto &xi : xx) {\n      vecfuncT dvx = apply(world, Dx, xi, false);\n      vecfuncT dvy = apply(world, Dy, xi, false);\n      vecfuncT dvz = apply(world, Dz, xi, false);\n      world.gop.fence();\n      compress(world, dvx, false);\n      compress(world, dvy, false);\n      compress(world, dvz, false);\n      world.gop.fence();\n      vecfuncT dvx2 = apply(world, Dx, dvx, false);\n      vecfuncT dvy2 = apply(world, Dy, dvy, false);\n      vecfuncT dvz2 = apply(world, Dz, dvz, false);\n      world.gop.fence();\n      t_xx[b++] = (dvx2 + dvy2 + dvz2) * (-0.5);\n    }\n    T0X = to_X_space(t_xx);\n  } else {\n    int b = 0;\n    for (const auto &xi : x.x) {\n      vecfuncT dvx = apply(world, Dx, xi, false);\n      vecfuncT dvy = apply(world, Dy, xi, false);\n      vecfuncT dvz = apply(world, Dz, xi, false);\n      world.gop.fence();\n      compress(world, dvx, false);\n      compress(world, dvy, false);\n      compress(world, dvz, false);\n      world.gop.fence();\n      vecfuncT dvx2 = apply(world, Dx, dvx, false);\n      vecfuncT dvy2 = apply(world, Dy, dvy, false);\n      vecfuncT dvz2 = apply(world, Dz, dvz, false);\n      world.gop.fence();\n      T0X.x[b++] = (dvx2 + dvy2 + dvz2) * (-0.5);\n    }\n    T0X.y = T0X.x.copy();\n  }\n  return T0X;\n}\n\n// Returns the ground state fock operator applied to functions f\nauto ResponseBase::compute_F0X(World &world, const X_space &X,\n                               const XCOperator<double, 3> &xc,\n                               bool compute_Y) const -> X_space {\n  // Debugging output\n\n  molresponse::start_timer(world);\n  size_t m = X.num_states();\n  size_t n = X.num_orbitals();\n\n  X_space chi_copy = X.copy();\n  // chi_copy.truncate();\n  X_space F0X = X_space(world, m, n);\n  X_space T0X = X_space(world, m, n);\n  T0X.x = T(world, chi_copy.x);\n  if (compute_Y) {\n    T0X.y = T(world, chi_copy.y);\n  } else {\n    T0X.y = T0X.x.copy();\n  }\n  if (r_params.print_level() >= 20) {\n    auto tx_m = inner(chi_copy, T0X);\n    if (world.rank() == 0) {\n      print(\"_________________compute F0X _______________________\");\n      print(\"inner <X|T0|X>\");\n      print(tx_m);\n    }\n  }\n\n  X_space V0X = compute_V0X(world, chi_copy, xc, compute_Y);\n  if (r_params.print_level() >= 20) {\n    auto vxm = inner(chi_copy, V0X);\n    if (world.rank() == 0) {\n      print(\"_________________compute F0X _______________________\");\n      print(\"inner <X|V0|X>\");\n      print(vxm);\n    }\n  }\n  F0X = T0X + V0X;\n  if (r_params.print_level() >= 20) {\n    auto fxm = inner(chi_copy, F0X);\n    if (world.rank() == 0) {\n      print(\"_________________compute F0X _______________________\");\n      print(\"inner <X|F0|X>\");\n      print(fxm);\n    }\n  }\n\n  molresponse::end_timer(world, \"F0X:\");\n  // Done\n  return F0X;\n}\n\nauto ResponseBase::update_residual(World &world, const X_space &chi,\n                                   const X_space &g_chi,\n                                   const std::string &calc_type,\n                                   const Tensor<double> &old_residuals,\n                                   const X_space &xres_old) -> residuals {\n\n  auto vector_stats = [&world](const std::vector<double> &v, double &rms,\n                               double &maxabsval) {\n    PROFILE_MEMBER_FUNC(SCF);\n    rms = 0.0;\n    maxabsval = v[0];\n    for (const auto &vi : v) {\n      rms += vi * vi;\n      maxabsval = std::max<double>(maxabsval, std::abs(vi));\n    }\n    rms = sqrt(rms / static_cast<double>(v.size()));\n    if (world.rank() == 0) {\n\n      print(\"vector_stats: rms: \", rms, \" maxabsval: \", maxabsval);\n    }\n  };\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  size_t m = chi.x.size();\n  size_t n = chi.x.size_orbitals();\n  bool compute_y = r_params.omega() != 0.0;\n  //\tcompute residual\n  Tensor<double> residual_norms = copy(old_residuals);\n  X_space res(world, m, n);\n  res.set_active(chi.active);\n  if (compute_y) {\n    res = chi - g_chi;\n    res.truncate();\n    auto rx = to_response_matrix(res);\n    auto gx = to_response_matrix(g_chi);\n    for (const auto &b : chi.active) {\n\n      auto rnorm = norm2s(world, rx[b]);\n      double rms, maxval;\n      vector_stats(rnorm, rms, maxval);\n      residual_norms(static_cast<long>(b)) = maxval;\n    } // / norm2(world, gx[b]); }\n  } else {\n    res.x = chi.x - g_chi.x;\n    res.x.truncate_rf();\n    for (const auto &b : chi.active) {\n\n      auto rnorm = norm2s(world, res.x[b]);\n      double rms, maxval;\n      vector_stats(rnorm, rms, maxval);\n      residual_norms(static_cast<long>(b)) = maxval;\n    } // / norm2(world, g_chi.x[b]); }\n  }\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"compute_bsh_residual\",\n                           \"compute_bsh_residual\", iter_timing);\n  }\n  // Next calculate 2-norm of these vectors of differences\n  return {res, residual_norms};\n}\n\nauto ResponseBase::kain_rf_space_update(\n    World &world, const X_space &chi, const X_space &residual_chi,\n    response_function_solver &kain_x_space) -> X_space\n\n{\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  long m = static_cast<long>(chi.num_states());\n  long n = static_cast<long>(chi.num_orbitals());\n\n  auto kain_update = chi.copy();\n  kain_update.set_active(chi.active);\n  bool compute_y = r_params.omega() != 0.0;\n  if (compute_y) {\n    auto chi_vec = chi.to_vector();\n    auto res_vec = residual_chi.to_vector();\n    int vec_index = 0;\n    auto temp_vec = vector_real_function_3d();\n    for (const auto &active_i : chi.active) {\n      for (long i = 0; i < n * 2; i++) {\n        auto kain_index = 2 * active_i * n + i;\n        // if (world.rank() == 0)\n        // {\n        //   print(\"kain_index, vec_index \", kain_index, vec_index);\n        // }\n        temp_vec.push_back(kain_x_space[kain_index].update(chi_vec[vec_index],\n                                                           res_vec[vec_index]));\n        vec_index++;\n      }\n    }\n    truncate(world, temp_vec);\n    world.gop.fence();\n    kain_update.from_vector(temp_vec);\n  } else {\n    auto chi_vec = chi.x.to_vector();\n    auto res_vec = residual_chi.x.to_vector();\n\n    int vec_index = 0;\n    auto temp_vec = vector_real_function_3d();\n    for (const auto &active_i : chi.active) {\n      for (long i = 0; i < n; i++) {\n        auto kain_index = active_i * n + i;\n        // if (world.rank() == 0)\n        // {\n        //   print(\"kain_index, vec_index \", kain_index, vec_index);\n        // }\n        temp_vec.push_back(kain_x_space[kain_index].update(chi_vec[vec_index],\n                                                           res_vec[vec_index]));\n        vec_index++;\n      }\n    }\n    world.gop.fence();\n    truncate(world, temp_vec);\n    // truncate(world, temp_vec);\n    kain_update.x.from_vector(temp_vec);\n  }\n\n  return kain_update;\n\n  // print the norms of chi and chi + update\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"kain_x_update\", \"kain_x_update\",\n                           iter_timing);\n  }\n}\n\nauto ResponseBase::kain_x_space_update(\n    World &world, const X_space &chi, const X_space &residual_chi,\n    response_solver &kain_x_space) -> X_space {\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n  long m = static_cast<long>(chi.num_states());\n  long n = static_cast<long>(chi.num_orbitals());\n\n  X_space kain_update = chi.copy();\n  // kain_update.set_active(chi.active);\n\n  bool compute_y = r_params.omega() != 0.0;\n  if (compute_y) {\n    auto x_vectors = to_response_matrix(chi);\n    auto x_residuals = to_response_matrix(residual_chi);\n    // compute the norm of the residuals\n\n    for (const auto &i : Chi.active) {\n      auto temp = kain_x_space[i].update(x_vectors[i], x_residuals[i]);\n      truncate(world, temp);\n      std::copy(temp.begin(), temp.begin() + n, kain_update.x[i].begin());\n      std::copy(temp.begin() + n, temp.end(), kain_update.y[i].begin());\n    };\n  } else {\n    // first compute the residuals\n    for (const auto &i : Chi.active) {\n      kain_update.x[i] = kain_x_space[i].update(chi.x[i], residual_chi.x[i]);\n      // truncate the update\n      truncate(world, kain_update.x[i]);\n    }\n  }\n\n  // print the norms of chi and chi + update\n\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"kain_x_update\", \"kain_x_update\",\n                           iter_timing);\n  }\n  return kain_update;\n}\n\nvoid ResponseBase::x_space_step_restriction(World &world,\n                                            const X_space &old_Chi,\n                                            X_space &temp, bool restrict_y,\n                                            const double &max_bsh_rotation) {\n  size_t m = old_Chi.num_states();\n  size_t n = old_Chi.num_orbitals();\n\n  bool compute_y = r_params.omega() != 0.0;\n\n  if (r_params.print_level() >= 1) {\n    molresponse::start_timer(world);\n  }\n\n  if (compute_y) {\n\n    auto temp_vecs = to_response_matrix(temp);\n    auto old_vecs = to_response_matrix(old_Chi);\n\n    for (const auto ai : old_Chi.active) {\n\n      auto norm_diff_ai = norm2(world, sub(world, old_vecs[ai], temp_vecs[ai]));\n\n      if (norm_diff_ai > max_bsh_rotation) {\n        double s = max_bsh_rotation / norm_diff_ai;\n        if (world.rank() == 0) {\n          printf(\" %d:%f\", ai, s);\n        }\n        temp_vecs[ai] = gaxpy_oop(s, old_vecs[ai], 1.0 - s, temp_vecs[ai]);\n      }\n    }\n  } else {\n    for (const auto ai : old_Chi.active) {\n\n      auto norm_diff_ai = norm2(world, sub(world, old_Chi.x[ai], temp.x[ai]));\n\n      if (norm_diff_ai > max_bsh_rotation) {\n        double s = max_bsh_rotation / norm_diff_ai;\n        if (world.rank() == 0) {\n          printf(\" %d:%f\", ai, s);\n        }\n        temp.x[ai] = gaxpy_oop(s, temp.x[ai], 1.0 - s, old_Chi.x[ai]);\n      }\n    }\n  }\n\n  // if (world.rank() == 0)\n  // {\n  //   print(\"----------------End Step Restriction -----------------\");\n  // }\n  if (r_params.print_level() >= 1) {\n    molresponse::end_timer(world, \"x_space_restriction\", \"x_space_restriction\",\n                           iter_timing);\n  }\n}\n\n/// Push back empty json onto \"protocol_data\" field\n/// Writes protocol to that new field\n/// Sets up the iteration data json with an empty {}\n/// TODO This can work for any madness iteration therefore maybe I should move\n/// it \\param j \\param proto\nvoid protocol_to_json(json &j, const double proto) {\n  j[\"protocol_data\"].push_back({});\n  auto proto_index = j[\"protocol_data\"].size() - 1;\n  j[\"protocol_data\"][proto_index][\"proto\"] = proto;\n  j[\"protocol_data\"][proto_index][\"k\"] = FunctionDefaults<3>::get_k();\n  j[\"protocol_data\"][proto_index][\"iter_data\"] = {};\n}\n\nvoid ResponseBase::function_data_to_json(json &j_mol_in, size_t iter,\n                                         const Tensor<double> &x_norms,\n                                         const Tensor<double> &x_abs_norms,\n                                         const Tensor<double> &rho_norms,\n                                         const Tensor<double> &rho_abs_norms) {\n  json j = {};\n\n  j[\"iter\"] = iter;\n\n  j[\"x_norms\"] = tensor_to_json(x_norms);\n  j[\"x_abs_error\"] = tensor_to_json(x_abs_norms);\n\n  j[\"rho_norms\"] = tensor_to_json(rho_norms);\n  j[\"rho_abs_error\"] = tensor_to_json(rho_abs_norms);\n\n  auto index = j_mol_in[\"protocol_data\"].size() - 1;\n  j_mol_in[\"protocol_data\"][index][\"iter_data\"].push_back(j);\n}\n\nvoid ResponseBase::write_vtk(World &world, int num_points, const double &L,\n                             const std::string &name) {\n  // Get start time\n  molresponse::start_timer(world);\n\n  // Plotting input orbitals\n  // protocol\n  double iter_thresh = r_params.protocol().back();\n  set_protocol(world, iter_thresh);\n  load(world, r_params.restart_file());\n  this->initialize(world);\n  check_k(world, iter_thresh, FunctionDefaults<3>::get_k());\n  // response\n  auto x_norms = Chi.norm2s();\n  if (world.rank() == 0) {\n    print(\"x_norms\");\n    print(x_norms);\n  }\n  auto response_densities = make_density(world, Chi);\n\n#if defined(__has_include)\n#if __has_include(<filesystem>)\n#define MADCHEM_HAS_STD_FILESYSTEM\n// <filesystem> is not reliably usable on Linux with gcc < 9\n#if defined(__GNUC__)\n#if __GNUC__ >= 7 && __GNUC__ < 9\n#undef MADCHEM_HAS_STD_FILESYSTEM\n#endif\n#endif\n#if defined(MADCHEM_HAS_STD_FILESYSTEM)\n  auto r_matrix = to_response_matrix(Chi);\n  // do_response_orbital_vtk_plots(world, r_params.plot_pts(), r_params.L(),\n  // molecule, ground_orbitals, r_matrix);\n  do_response_density_vtk_plots_new(world, num_points, L, molecule,\n                                    ground_density, response_densities, name);\n#endif\n#endif\n#endif\n\n  // Plot the response function if desired\n}\n\nvoid ResponseBase::solve(World &world) {\n  // Get start time\n  molresponse::start_timer(world);\n\n  // Plotting input orbitals\n  // if (r_params.plot_initial()) { PlotGroundDensityVTK(world, *this); }\n  const auto protocol = r_params.protocol();\n  if (world.rank() == 0) {\n    print(\"Response State Calculation for the following protocols\");\n    print(\"Protocol: \", protocol);\n  }\n  bool first_protocol = true;\n  for (const auto &iter_thresh : protocol) {\n    // We set the protocol and function defaults here for the given threshold of\n    set_protocol(world, iter_thresh);\n    if (first_protocol) {\n      if (r_params.restart()) {\n        if (world.rank() == 0) {\n          print(\"   Restarting from file:\", r_params.restart_file());\n        }\n        load(world, r_params.restart_file());\n        first_protocol = false;\n      } else {\n        this->initialize(world);\n      }\n      check_k(world, iter_thresh, FunctionDefaults<3>::get_k());\n      first_protocol = false;\n    } else {\n      check_k(world, iter_thresh, FunctionDefaults<3>::get_k());\n      if (world.rank() == 0) {\n        print(\"Successfully check K not first initialization \");\n      }\n    }\n    protocol_to_json(j_molresponse, iter_thresh);\n    // Now actually ready to iterate...\n    this->iterate(world);\n  }\n\n  converged_to_json(j_molresponse);\n}\n\nvoid check_k(World &world, X_space &Chi,\n             double thresh = FunctionDefaults<3>::get_thresh(),\n             int k = FunctionDefaults<3>::get_k()) {\n  if (0 != Chi.x.size()) {\n    if (FunctionDefaults<3>::get_k() != Chi.x[0].at(0).k()) {\n      // Project all x components into correct k\n\n      auto vec_chi = Chi.to_vector();\n      for (auto &x : vec_chi) {\n        x = project(x, k, thresh, false);\n      }\n      world.gop.fence();\n      truncate(world, vec_chi);\n\n      Chi.from_vector(vec_chi);\n    }\n  }\n}\n\n///  @brief Adds random noise to functions in response space\n///\n///\n///\n/// \\param world\n/// \\param f\n/// \\param magnitude\n/// \\return\nauto add_randomness(World &world, const response_space &f,\n                    double magnitude) -> response_space {\n  // Copy input functions\n  response_space f_copy = f.copy();\n\n  // Lambda function to add in noise\n  auto noise = [](const Key<3> &key, Tensor<double> &x) mutable {\n    Tensor<double> y(x.size());\n    y.fillrandom();\n    // y.scale(magnitude);\n    y.scale(1e3);\n    x = x + y;\n    // x(0,0,0) += y(0,0,0)-0.5;\n  };\n  // TODO\n  // Go through each function in f_copy and add in random noise\n\n  for (auto &fi : f_copy) {\n    for (auto &fij : fi) {\n      fij.unaryop(noise);\n    }\n  }\n  // Done\n  return f_copy;\n}\n\n/***\n * @brief normalize a single response space\n *\n * \\note a single response space consists of only x or y states\n *\n *\n * @param world\n * @param f\n */\nvoid normalize(World &world, response_space &f) {\n  // Run over rows\n  for (auto &fi : f) {\n    double norm = inner(fi, fi);\n    norm = sqrt(norm);\n    // Doing this to deal with zero functions.\n    // Maybe not smrt.\n    if (norm == 0)\n      continue;\n    // And scale\n    fi = fi * (1.0 / norm);\n  }\n}\n\nvoid normalize(World &world, X_space &Chi) {\n  // Run over rows\n\n  for (size_t i = 0; i < Chi.num_states(); i++) {\n    // Get the normalization constant\n    // (Sum included inside inner)\n    double norm_x = inner(Chi.x[i], Chi.x[i]);\n    double norm_y = inner(Chi.y[i], Chi.y[i]);\n    double norm = sqrt(norm_x - norm_y);\n    // Doing this to deal with zero functions.\n    // Maybe not smrt.\n    if (norm == 0)\n      continue;\n    Chi.x[i] = Chi.x[i] * (1.0 / norm);\n    Chi.y[i] = Chi.y[i] * (1.0 / norm);\n  }\n}\n\nauto solid_harmonics(World &world,\n                     int n) -> std::map<std::vector<int>, real_function_3d> {\n  // Container to return\n  std::map<std::vector<int>, real_function_3d> result;\n\n  // Create the basic x, y, z, constant and zero\n  real_function_3d x = real_factory_3d(world).functor(\n      real_functor_3d(new MomentFunctor(std::vector<int>{1, 0, 0})));\n  real_function_3d y = real_factory_3d(world).functor(\n      real_functor_3d(new MomentFunctor(std::vector<int>{0, 1, 0})));\n  real_function_3d z = real_factory_3d(world).functor(\n      real_functor_3d(new MomentFunctor(std::vector<int>{0, 0, 1})));\n  real_function_3d c = real_factory_3d(world).functor(\n      real_functor_3d(new MomentFunctor(std::vector<int>{0, 0, 0})));\n  real_function_3d zero = real_factory_3d(world);\n\n  // Add in first few, since they're simple\n  // Assuming n >= 1\n  result[std::vector<int>{0, 0}] = copy(c);\n  result[std::vector<int>{0, -1}] = zero;\n  result[std::vector<int>{0, 1}] = zero;\n  result[std::vector<int>{-1, 0}] = zero;\n\n  // Generate the solid harmonics recursively from here\n  for (int l = 0; l < n; l++) {\n    // Calculate ends of this row first\n    result[std::vector<int>{l + 1, l + 1}] =\n        sqrt(pow(2, kronecker(l, 0) * (2 * l) / (2 * l + 1))) *\n        (x * result[std::vector<int>{l, l}] -\n         (1 - kronecker(l, 0) * y * result[std::vector<int>{l, -l}]));\n    result[std::vector<int>{l + 1, -l - 1}] =\n        sqrt(pow(2, kronecker(l, 0) * (2 * l) / (2 * l + 1))) *\n        (y * result[std::vector<int>{l, l}] +\n         (1 - kronecker(l, 0) * x * result[std::vector<int>{l, -l}]));\n\n    // Formula below calls for some functions that don't exist.\n    // Need zeroes where that would occur\n    result[std::vector<int>{l + 1, l + 2}] = zero;\n    result[std::vector<int>{l + 1, -l - 2}] = zero;\n\n    // Run over quantum number m\n    for (int m = -l; m < l + 1; m++) {\n      // Calculate remaining terms\n      result[std::vector<int>{l + 1, m}] =\n          1.0 / std::sqrt((l + m + 1) * (l - m + 1)) *\n          ((2 * l + 1) * z * result[std::vector<int>{l, m}] -\n           sqrt((l + m) * (l - m)) * (x * x + y * y + z * z) *\n               result[std::vector<int>{l - 1, m}]);\n    }\n  }\n\n  // Get rid of any zero functions we added\n  for (auto it = result.begin(); it != result.end();) {\n    if (it->second.norm2() == 0)\n      it = result.erase(it);\n    else\n      ++it;\n  }\n\n  // Also get rid of the constant\n  result.erase(std::vector<int>{0, 0});\n\n  // Done\n  return result;\n}\n\nvector_real_function_3d\ntransition_density(World &world, const vector_real_function_3d &orbitals,\n                   const response_space &x, const response_space &y) {\n  // Get sizes\n  // Check sizes and then run the algorithm\n  // size_t m = x.size();\n  // auto xx = x.copy();\n  //  auto yy = y.copy();\n  // auto phi0 = copy(world, orbitals);\n  // world.gop.fence();\n\n  // xx.truncate_rf();\n  //  yy.truncate_rf();\n  // truncate(world, phi0);\n  std::vector<real_function_3d> densities =\n      zero_functions<double, 3>(world, x.size(), true);\n\n  // Return container\n  auto compute_density = [&world, &orbitals](const auto &x_alpha,\n                                             const auto &y_alpha) {\n    /*\n        for (const auto &xij: x_alpha) {\n            print(\"xij !!\", xij.max_depth(), \" \", (void *)\n       xij.get_impl().get());\n        }\n         */\n    auto dx = dot(world, x_alpha, orbitals, true);\n    /*\n        for (const auto &yij: y_alpha) {\n            print(\"yij !!\", yij.max_depth(), \" \", (void *)\n       yij.get_impl().get());\n        }*/\n    auto dy = dot(world, orbitals, y_alpha, true);\n    return dx + dy;\n  };\n\n  /*\n    for (const auto &phi_i: orbitals) {\n        print(\"phi_i !!\", phi_i.max_depth(), \" \", (void *)\n    phi_i.get_impl().get());\n    }\n     */\n  std::transform(x.begin(), x.end(), y.begin(), densities.begin(),\n                 compute_density);\n  world.gop.fence();\n  // truncate(world, densities, FunctionDefaults<3>::get_thresh(), true);\n  return densities;\n}\n\n/***\n * @brief returns orbitals and response functions with new p map\n *\n * @param world\n * @param psi0\n * @param X\n * @param load_balance\n * @return\n */\nauto ResponseBase::orbital_load_balance(\n    World &world, const gamma_orbitals &gammaOrbitals,\n    const double load_balance) -> gamma_orbitals {\n  auto X = std::get<0>(gammaOrbitals);\n  auto psi0 = std::get<1>(gammaOrbitals);\n  auto rho1 = std::get<2>(gammaOrbitals);\n\n  size_t m = X.num_states();\n  size_t n = X.num_orbitals();\n\n  if (world.size() > 1) {\n    molresponse::start_timer(world);\n    LoadBalanceDeux<3> lb(world);\n\n    for (const auto &phi0_i : psi0) {\n      lb.add_tree(phi0_i, lbcost<double, 3>(1.0, 8.0), false);\n    }\n\n    for (const auto &rho1_i : rho1) {\n      lb.add_tree(rho1_i, lbcost<double, 3>(1.0, 8.0), false);\n    }\n    for (const auto &xi : X.x) {\n      for (const auto &xij : xi) {\n        lb.add_tree(xij, lbcost<double, 3>(1.0, 8.0), false);\n      }\n    }\n    for (const auto &yi : X.y) {\n      for (const auto &yij : yi) {\n        lb.add_tree(yij, lbcost<double, 3>(1.0, 8.0), false);\n      }\n    }\n    world.gop.fence();\n    // newpamap is the new pmap just based on the orbitals\n    auto new_process_map = lb.load_balance(load_balance);\n    // default process map\n    // We set the new_process_map\n    FunctionDefaults<3>::set_pmap(new_process_map); // set default to be new\n\n    world.gop.fence();\n    // copy orbitals using new pmap\n    auto X_copy = X.copy(new_process_map, true);\n    auto psi0_copy = copy(world, psi0, new_process_map, true);\n    auto rho1_copy = copy(world, rho1, new_process_map, true);\n\n    molresponse::end_timer(world, \"Gamma Orbital Load Balance\");\n    return {X_copy, psi0_copy, rho1_copy};\n  } else {\n    // return a copy with the same process map since we only have one world\n    return {X.copy(), copy(world, psi0), copy(world, rho1)};\n  }\n}\n\nvoid ResponseBase::analyze_vectors(World &world, const vecfuncT &x,\n                                   const std::string &response_state) {\n  molresponse::start_timer(world);\n  AtomicBasisSet sto3g(\"sto-3g\");\n  vecfuncT ao = project_ao_basis(world, sto3g);\n\n  tensorT C = matrix_inner(world, ao, x);\n  int nmo1 = x.size();\n  tensorT rsq, dip(3, nmo1);\n  {\n    functionT frsq = factoryT(world).f(rsquared).initial_level(4);\n    // <x r^2 x>\n    //<x[i] | r^2 | x[i]>\n    rsq = inner(world, x, mul_sparse(world, frsq, x, vtol));\n    for (int axis = 0; axis < 3; ++axis) {\n      // x y z\n      functionT fdip = factoryT(world)\n                           .functor(functorT(new madness::DipoleFunctor(axis)))\n                           .initial_level(4);\n      dip(axis, _) = inner(world, x, mul_sparse(world, fdip, x, vtol));\n      //<x r^2 x> - <x|x|x>^2-<x|y|x>^2-<x|z|x>^2\n      for (int i = 0; i < nmo1; ++i)\n        rsq(i) -= dip(axis, i) * dip(axis, i);\n    }\n  }\n  molresponse::end_timer(world, \"Analyze vectors\");\n\n  long nmo = x.size();\n  size_t ncoeff = 0;\n  for (long i = 0; i < nmo; ++i) {\n    size_t ncoeffi = x[i].size();\n    ncoeff += ncoeffi;\n    if (world.rank() == 0 and (r_params.print_level() > 1)) {\n      print(response_state + \" orbital : \", i);\n\n      printf(\"ncoeff=%.2e:\", (double)ncoeffi);\n\n      printf(\"center=(%.2f,%.2f,%.2f) : radius=%.2f\\n\", dip(0, i), dip(1, i),\n             dip(2, i), sqrt(rsq(i)));\n      sto3g.print_anal(molecule, C(i, _));\n      printf(\"total number of coefficients = %.8e\\n\\n\", double(ncoeff));\n    }\n  }\n}\n\nauto ResponseBase::project_ao_basis_only(World &world,\n                                         const AtomicBasisSet &aobasis,\n                                         const Molecule &mol) -> vecfuncT {\n  vecfuncT ao = vecfuncT(aobasis.nbf(mol));\n  for (int i = 0; i < aobasis.nbf(mol); ++i) {\n    functorT aofunc(new madchem::AtomicBasisFunctor(\n        aobasis.get_atomic_basis_function(mol, i)));\n    ao[i] = factoryT(world)\n                .functor(aofunc)\n                .truncate_on_project()\n                .nofence()\n                .truncate_mode(1);\n  }\n  world.gop.fence();\n  truncate(world, ao);\n  madness::normalize(world, ao);\n  return ao;\n}\n\nauto ResponseBase::project_ao_basis(World &world,\n                                    const AtomicBasisSet &aobasis) -> vecfuncT {\n  // Make at_to_bf, at_nbf ... map from atom to first bf on atom, and nbf/atom\n  std::vector<int> at_to_bf, at_nbf;\n  aobasis.atoms_to_bfn(molecule, at_to_bf, at_nbf);\n\n  return project_ao_basis_only(world, aobasis, molecule);\n}\n\nvoid ResponseBase::output_json() {\n  function_data.to_json(j_molresponse);\n\n  time_data.to_json(j_molresponse);\n  auto print_time = std::chrono::system_clock::now();\n  auto in_time_t = std::chrono::system_clock::to_time_t(print_time);\n  std::stringstream ss;\n  ss << std::put_time(std::localtime(&in_time_t), \"%y-%m-%d %X\");\n  print(ss.str());\n\n  nlohmann::json calc_precision = {};\n  calc_precision[\"dconv\"] = r_params.dconv();\n  calc_precision[\"thresh\"] = FunctionDefaults<3>::get_thresh();\n  calc_precision[\"k\"] = FunctionDefaults<3>::get_k();\n  j_molresponse[\"precision\"] = calc_precision;\n  nlohmann::json timing = {};\n  timing[\"datetime\"] = ss.str();\n  timing[\"wall_time\"] = wall_time();\n  timing[\"cpu_time\"] = cpu_time();\n  j_molresponse[\"time_data\"] = timing;\n  std::ofstream ofs(\"response_base.json\");\n  ofs << std::setw(4) << j_molresponse;\n}\n\nMolecule ResponseBase::get_molecule() const { return molecule; }\n\nvoid ResponseBase::converged_to_json(json &j) { j[\"converged\"] = all_done; }\n\nauto transition_densityTDA(World &world,\n                           const vector_real_function_3d &orbitals,\n                           const response_space &x) -> vector_real_function_3d {\n  // Get sizes\n  size_t m = x.size();\n\n  auto xx = x;\n  auto phi0 = copy(world, orbitals);\n\n  xx.truncate_rf();\n  truncate(world, phi0);\n\n  std::vector<real_function_3d> densities = zero_functions<double, 3>(world, m);\n\n  // dot xi with phi0\n  auto f = [&world, &phi0](auto xi) { return dot(world, xi, phi0); };\n\n  // for each vector is response space x dot and\n  std::transform(x.begin(), x.end(), densities.begin(), f);\n\n  truncate(world, densities);\n  world.gop.fence();\n  return densities;\n}\n\n// Transforms the given matrix of functions according to the give\n// transformation matrix. Used to update orbitals / potential\nresponse_space transform(World &world, const response_space &f,\n                         const Tensor<double> &U) {\n  // Return container\n  response_space result;\n\n  // Go element by element\n  for (unsigned int i = 0; i < f.size(); i++) {\n    // Temp for the result of one row\n    std::vector<real_function_3d> temp =\n        zero_functions_compressed<double, 3>(world, f[0].size());\n\n    for (unsigned int j = 0; j < f.size(); j++) {\n      gaxpy(world, 1.0, temp, U(j, i), f[j]);\n    }\n\n    // Add to temp to result\n    result.push_back(temp);\n  }\n\n  result.truncate_rf();\n\n  // Done\n  return result;\n}\n\nauto transform(World &world, const X_space &x,\n               const Tensor<double> &U) -> X_space {\n  // Return container\n  X_space result(world, x.num_states(), x.num_orbitals());\n\n  result.x = transform(world, x.x, U);\n  result.y = transform(world, x.y, U);\n  // Done\n  return result;\n}\n\nauto expectation(World &world, const response_space &A,\n                 const response_space &B) -> Tensor<double> {\n  // Get sizes\n  MADNESS_ASSERT(!A[0].empty());\n  MADNESS_ASSERT(A[0].size() == B[0].size());\n\n  size_t dim_1 = A.size();\n  size_t dim_2 = A[0].size();\n  // Need to take transpose of each input ResponseFunction\n  response_space A_t(world, dim_2, dim_1);\n  response_space B_t(world, dim_2, dim_1);\n  for (size_t i = 0; i < dim_1; i++) {\n    for (size_t j = 0; j < dim_2; j++) {\n      A_t[j][i] = A[i][j];\n      B_t[j][i] = B[i][j];\n    }\n  }\n  // Container for result\n  Tensor<double> result(dim_1, dim_1);\n  /**\n   * @brief\n   * [x1 x2 x3]T[x1 x2 x3]\n   *\n   */\n  // Run over dimension two\n  // each vector in orbital has dim_1 response functoins associated\n  for (size_t p = 0; p < dim_2; p++) {\n    result += matrix_inner(world, A_t[p], B_t[p]);\n  }\n\n  // Done\n  return result;\n}\n\nvoid print_norms(World &world, const response_space &f) {\n  print(f[0].size());\n  Tensor<double> norms(f.size() * f[0].size());\n  // Calc the norms\n  long i = 0;\n  for (const auto &fi : f) {\n\n    for (const auto &fij : fi) {\n      norms(i++) = fij.norm2();\n    }\n  }\n  norms = norms.reshape(f.size(), f[0].size());\n  // Print em in a smart way\n  if (world.rank() == 0)\n    print(norms);\n}\n\nresponse_space select_functions(World &world, response_space f,\n                                Tensor<double> &energies, size_t k,\n                                size_t print_level) {\n  // Container for result\n  response_space answer;\n\n  // Debugging output\n  if (print_level >= 1) {\n    if (world.rank() == 0)\n      print(\"\\n   Selecting the\", k, \"lowest excitation energy components.\\n\");\n  }\n\n  // Get rid of extra functions and save\n  // the first k\n  while (f.size() > k)\n    f.pop_back();\n  answer = f;\n  answer.truncate_rf();\n\n  // Get rid of extra energies and save\n  // the first k\n  energies = energies(Slice(0, k - 1));\n\n  // Basic output\n  if (print_level >= 1) {\n    if (world.rank() == 0)\n      print(\"   The selected components have excitation energies:\");\n    if (world.rank() == 0)\n      print(energies);\n  }\n\n  // Done\n  return answer;\n}\n\nvoid sort(World &world, Tensor<double> &vals, response_space &f) {\n  // Get relevant sizes\n  size_t k = vals.size();\n\n  // Copy everything...\n  response_space f_copy(f);\n  Tensor<double> vals_copy = copy(vals);\n  Tensor<double> vals_copy2 = copy(vals);\n\n  // Now sort vals_copy\n  std::sort(vals_copy.ptr(), vals_copy.ptr() + vals_copy.size());\n\n  // Now sort the rest of the things, using the sorted energy list\n  // to find the correct indices\n  for (size_t i = 0; i < k; i++) {\n    // Find matching index in sorted vals_copy\n    size_t j = 0;\n    while (fabs(vals_copy(i) - vals_copy2(j)) > 1e-8 && j < k)\n      j++;\n\n    // Put corresponding function, difference function, value residual and\n    // value in the correct place\n    f[i] = f_copy[j];\n    vals(i) = vals_copy(i);\n\n    // Change the value of vals_copy2[j] to help deal with duplicates?\n    vals_copy2(j) = 10000.0;\n  }\n}\n\n// Sorts the given tensor of eigenvalues and\n// response functions\nvoid sort(World &world, Tensor<double> &vals, X_space &f) {\n  // Get relevant sizes\n  size_t k = vals.size();\n\n  // Copy everything...\n  X_space f_copy(f);\n  Tensor<double> vals_copy = copy(vals);\n  Tensor<double> vals_copy2 = copy(vals);\n\n  // Now sort vals_copy\n  std::sort(vals_copy.ptr(), vals_copy.ptr() + vals_copy.size());\n\n  // Now sort the rest of the things, using the sorted energy list\n  // to find the correct indices\n  for (size_t i = 0; i < k; i++) {\n    // Find matching index in sorted vals_copy\n    size_t j = 0;\n    while (fabs(vals_copy(i) - vals_copy2(j)) > 1e-8 && j < k)\n      j++;\n\n    // Put corresponding function, difference function, value residual and\n    // value in the correct place\n    f.x[i] = f_copy.x[j];\n    f.y[i] = f_copy.y[j];\n\n    vals(i) = vals_copy(i);\n\n    // Change the value of vals_copy2[j] to help deal with duplicates?\n    vals_copy2(j) = 10000.0;\n  }\n}\n\nauto gram_schmidt(World &world, const response_space &f) -> response_space {\n  // Sizes inferred\n  size_t m = f.size();\n\n  // Return container\n  response_space result = f.copy();\n\n  // Orthogonalize\n  for (size_t j = 0; j < m; j++) {\n    // Need to normalize the row\n    double norm = norm2(world, result[j]);\n\n    // Now scale each entry\n    scale(world, result[j], 1.0 / norm);\n\n    // Project out from the rest of the vectors\n    for (size_t k = j + 1; k < m; k++) {\n      // Temp function to hold the sum\n      // of inner products\n      // vmra.h function, line 627\n      double temp = inner(result[j], result[k]);\n\n      // Now subtract\n      gaxpy(world, 1.0, result[k], -temp, result[j]);\n    }\n  }\n  result.truncate_rf();\n\n  // Done\n  return result;\n}\n\nauto make_xyz_functions(World &world) -> vector_real_function_3d {\n  // Container to return\n\n  // Create the basic x, y, z, constant and zero\n  real_function_3d x = real_factory_3d(world).functor(\n      real_functor_3d(new MomentFunctor(std::vector<int>{1, 0, 0})));\n  real_function_3d y = real_factory_3d(world).functor(\n      real_functor_3d(new MomentFunctor(std::vector<int>{0, 1, 0})));\n  real_function_3d z = real_factory_3d(world).functor(\n      real_functor_3d(new MomentFunctor(std::vector<int>{0, 0, 1})));\n\n  std::vector<real_function_3d> funcs = {x, y, z};\n  return funcs;\n}\n\n// Here i should print some information about the calculation we are\n// about to do\nresponse_timing::response_timing() : iter(0) {\n  wall_time_data.insert({\"iter_total\", std::vector<double>(0)});\n  wall_time_data.insert({\"update\", std::vector<double>(0)});\n  wall_time_data.insert({\"compute_V0X\", std::vector<double>(0)});\n  wall_time_data.insert({\"compute_E0X\", std::vector<double>(0)});\n  wall_time_data.insert({\"compute_ThetaX_add\", std::vector<double>(0)});\n  wall_time_data.insert({\"compute_ThetaX\", std::vector<double>(0)});\n  wall_time_data.insert({\"gamma_compute\", std::vector<double>(0)});\n  wall_time_data.insert({\"gamma_zero_functions\", std::vector<double>(0)});\n  wall_time_data.insert({\"gamma_truncate_add\", std::vector<double>(0)});\n  wall_time_data.insert({\"gamma_project\", std::vector<double>(0)});\n  wall_time_data.insert({\"gamma_clear_functions\", std::vector<double>(0)});\n  wall_time_data.insert({\"J[omega]\", std::vector<double>(0)});\n  wall_time_data.insert({\"XC[omega]\", std::vector<double>(0)});\n  wall_time_data.insert({\"K[omega]\", std::vector<double>(0)});\n  wall_time_data.insert({\"bsh_update\", std::vector<double>(0)});\n  wall_time_data.insert({\"compute_bsh_residual\", std::vector<double>(0)});\n  wall_time_data.insert({\"kain_x_update\", std::vector<double>(0)});\n  wall_time_data.insert({\"x_space_restriction\", std::vector<double>(0)});\n  wall_time_data.insert({\"V0_nuc\", std::vector<double>(0)});\n  wall_time_data.insert({\"J[0]\", std::vector<double>(0)});\n  wall_time_data.insert({\"XC[0]\", std::vector<double>(0)});\n  wall_time_data.insert({\"K[0]\", std::vector<double>(0)});\n  wall_time_data.insert({\"V0_add\", std::vector<double>(0)});\n  wall_time_data.insert({\"make_density_old\", std::vector<double>(0)});\n  wall_time_data.insert({\"make_density_new\", std::vector<double>(0)});\n  wall_time_data.insert({\"copy_response_data\", std::vector<double>(0)});\n  wall_time_data.insert({\"TX\", std::vector<double>(0)});\n  wall_time_data.insert({\"E0X\", std::vector<double>(0)});\n  wall_time_data.insert({\"E0mDX\", std::vector<double>(0)});\n  wall_time_data.insert({\"subspace_reduce\", std::vector<double>(0)});\n  wall_time_data.insert(\n      {\"diagonalize_response_matrix\", std::vector<double>(0)});\n\n  cpu_time_data.insert({\"iter_total\", std::vector<double>(0)});\n  cpu_time_data.insert({\"update\", std::vector<double>(0)});\n  cpu_time_data.insert({\"compute_V0X\", std::vector<double>(0)});\n  cpu_time_data.insert({\"compute_E0X\", std::vector<double>(0)});\n  cpu_time_data.insert({\"compute_ThetaX_add\", std::vector<double>(0)});\n  cpu_time_data.insert({\"compute_ThetaX\", std::vector<double>(0)});\n  cpu_time_data.insert({\"gamma_compute\", std::vector<double>(0)});\n  cpu_time_data.insert({\"gamma_zero_functions\", std::vector<double>(0)});\n  cpu_time_data.insert({\"gamma_truncate_add\", std::vector<double>(0)});\n  cpu_time_data.insert({\"gamma_project\", std::vector<double>(0)});\n  cpu_time_data.insert({\"gamma_clear_functions\", std::vector<double>(0)});\n  cpu_time_data.insert({\"J[omega]\", std::vector<double>(0)});\n  cpu_time_data.insert({\"XC[omega]\", std::vector<double>(0)});\n  cpu_time_data.insert({\"K[omega]\", std::vector<double>(0)});\n  cpu_time_data.insert({\"bsh_update\", std::vector<double>(0)});\n  cpu_time_data.insert({\"compute_bsh_residual\", std::vector<double>(0)});\n  cpu_time_data.insert({\"kain_x_update\", std::vector<double>(0)});\n  cpu_time_data.insert({\"x_space_restriction\", std::vector<double>(0)});\n  cpu_time_data.insert({\"V0_nuc\", std::vector<double>(0)});\n  cpu_time_data.insert({\"J[0]\", std::vector<double>(0)});\n  cpu_time_data.insert({\"XC[0]\", std::vector<double>(0)});\n  cpu_time_data.insert({\"K[0]\", std::vector<double>(0)});\n  cpu_time_data.insert({\"V0_add\", std::vector<double>(0)});\n  cpu_time_data.insert({\"make_density_old\", std::vector<double>(0)});\n  cpu_time_data.insert({\"make_density_new\", std::vector<double>(0)});\n  cpu_time_data.insert({\"copy_response_data\", std::vector<double>(0)});\n  cpu_time_data.insert({\"TX\", std::vector<double>(0)});\n  cpu_time_data.insert({\"E0X\", std::vector<double>(0)});\n  cpu_time_data.insert({\"E0mDX\", std::vector<double>(0)});\n  cpu_time_data.insert({\"subspace_reduce\", std::vector<double>(0)});\n  cpu_time_data.insert({\"diagonalize_response_matrix\", std::vector<double>(0)});\n}\n\nvoid response_timing::print_data() {\n  for (const auto &[key, value] : wall_time_data) {\n    print(key, \" : \", value);\n  }\n  for (const auto &[key, value] : cpu_time_data) {\n    print(key, \" : \", value);\n  }\n}\n\n/**\n * add the pair of s wall_time and cpu_time to the time_data and wall_data maps\n *\n * values.first=wall_time\n * values.second=cpu_time\n * @param values\n */\nvoid response_timing::add_data(\n    std::map<std::string, std::pair<double, double>> values) {\n  //   print(\"ADDING DATA\");\n  iter++;\n  std::for_each(\n      wall_time_data.begin(), wall_time_data.end(), [&values](auto &v) {\n        // print(v.first, \" : \", values[v.first]);\n        v.second.push_back(\n            values[v.first]\n                .first); // .first to get first value of pair wall_time\n      });\n\n  std::for_each(cpu_time_data.begin(), cpu_time_data.end(), [&values](auto &v) {\n    // print(v.first, \" : \", values[v.first]);\n    v.second.push_back(\n        values[v.first].second); // .first to get first value of pair wall_time\n  });\n}\n\nvoid response_timing::to_json(json &j) {\n  //::print(\"FREQUENCY TIME DATA TO JSON\");\n\n  j[\"time_data\"] = json();\n  j[\"time_data\"][\"iterations\"] = iter;\n  j[\"time_data\"][\"wall_time\"] = json();\n  for (const auto &e : wall_time_data) {\n    j[\"time_data\"][\"wall_time\"][e.first] = e.second;\n  }\n  j[\"time_data\"][\"cpu_time\"] = json();\n  for (const auto &e : cpu_time_data) {\n    j[\"time_data\"][\"cpu_time\"][e.first] = e.second;\n  }\n}\n\nvoid response_data::add_convergence_targets(double p_thresh,\n                                            double p_density_target,\n                                            double p_bsh_target) {\n  this->thresh.push_back(p_thresh);\n  this->density_target.push_back(p_density_target);\n  this->bsh_target.push_back(p_bsh_target);\n}\n\nvoid response_data::to_json(json &j) {\n  //::print(\"FREQUENCY TIME DATA TO JSON\");\n\n  j[\"response_data\"] = json();\n  j[\"response_data\"][\"iterations\"] = iter;\n  j[\"response_data\"][\"thresh\"] = thresh;\n  j[\"response_data\"][\"density_target\"] = density_target;\n  j[\"response_data\"][\"bsh_target\"] = bsh_target;\n\n  j[\"response_data\"][\"data\"] = json();\n}\n\nvoid inner_to_json(World &world, const std::string &name,\n                   const Tensor<double> &m_val,\n                   std::map<std::string, Tensor<double>> &data) {\n  data[name] = m_val;\n}\nvoid K1Strategy::set_algorithm(const std::string &algo) {}\n\nvoid ResponseBase::print_inner(World &world, const std::string &name,\n                               const X_space &left,\n                               const X_space &right) const {\n  auto m_val = response_context.inner(left, right);\n  // auto m_val = inner(left, right);\n  world.gop.fence();\n  if (world.rank() == 0) {\n    print(name);\n    print(m_val);\n  }\n}\n"
  },
  {
    "path": "src/apps/molresponse/ResponseBase.hpp",
    "content": "//\n// Created by adrianhurtado on 1/24/22.\n//\n\n#ifndef MADNESS_RESPONSEBASE_HPP\n#define MADNESS_RESPONSEBASE_HPP\n\n#include <functional>\n#include <numeric>\n#include <utility>\n#include <vector>\n\n#include \"global_functions.h\"\n#include \"madness/chem/SCF.h\"\n#include \"madness/mra/functypedefs.h\"\n#include \"madness/mra/mra.h\"\n#include \"madness/mra/nonlinsol.h\"\n#include \"madness/tensor/tensor.h\"\n#include \"madness/tensor/tensor_json.hpp\"\n#include \"response_macrotask.hpp\"\n#include \"timer.h\"\n#include \"x_space.h\"\n\nusing namespace madness;\n\n// I need to creat a load X_space function strategy which will be used by the\n// FrequencyResponse class and the ExcitedResponse class. This will allow me to\n// load the X_space in the FrequencyResponse class and the Quadratic response\n// class.  This way I can use the same X_space for both classes. and load\n// depending on the type of response I am doing.\n\ntypedef std::pair<X_space, Tensor<double>> XData;\ntypedef std::pair<vector_real_function_3d, vector_real_function_3d>\n    double_response_vector;\n\nclass LoadXSpaceStrategy {\npublic:\n  virtual ~LoadXSpaceStrategy() = default;\n  virtual XData load_x_space(World &world, const std::string &filename,\n                             const ResponseParameters &r_params,\n                             double omega_state) const = 0;\n};\nclass LoadFrequencyXSpace : public LoadXSpaceStrategy {\npublic:\n  XData load_x_space(World &world, const std::string &filename,\n                     const ResponseParameters &r_params,\n                     double omega_state) const override {\n    if (world.rank() == 0) {\n      print(\"FrequencyResponse::load() -state\");\n      print(\"Loading X_space from file: \", filename);\n      print(\"Number of states: \", r_params.num_states());\n      print(\"Number of orbitals: \", r_params.num_orbitals());\n      print(\"Loading omega : \", omega_state);\n    }\n    //\n\n    X_space chi_new(world, r_params.num_states(), r_params.num_orbitals());\n\n    // The archive to read from\n    archive::ParallelInputArchive ar(world, filename.c_str());\n    ar & r_params.archive();\n    ar & r_params.tda();\n    ar & r_params.num_orbitals();\n    ar & r_params.num_states();\n    for (size_t i = 0; i < r_params.num_states(); i++)\n      for (size_t j = 0; j < r_params.num_orbitals(); j++)\n        ar & chi_new.x[i][j];\n    world.gop.fence();\n    if (omega_state == 0.0) {\n      for (size_t i = 0; i < r_params.num_states(); i++)\n        for (size_t j = 0; j < r_params.num_orbitals(); j++)\n          chi_new.y[i][j] = chi_new.x[i][j];\n    } else {\n      for (size_t i = 0; i < r_params.num_states(); i++)\n        for (size_t j = 0; j < r_params.num_orbitals(); j++)\n          ar & chi_new.y[i][j];\n    }\n    world.gop.fence();\n\n    return {chi_new, Tensor<double>()};\n  }\n};\nclass LoadExcitedXSpace : public LoadXSpaceStrategy {\npublic:\n  XData load_x_space(World &world, const std::string &filename,\n                     const ResponseParameters &r_params,\n                     double omega_state) const override {\n\n    Tensor<double> omega;\n    auto new_chi =\n        X_space(world, r_params.num_states(), r_params.num_orbitals());\n    // The archive to read from\n    archive::ParallelInputArchive ar(world, filename.c_str());\n\n    // Reading in, in this order;\n    //  string           ground-state archive name (garch_name)\n    //  bool             TDA flag\n    // size_t                number of ground state orbitals (n)\n    // size_t                number of excited state orbitals (m)\n    //  Tensor<double>   energies of m x-components\n    //  for i from 0 to m-1\n    //     for j from 0 to n-1\n    //        Function<double,3> x_response[i][j]\n    //  (If TDA flag == True)\n    //  (Tensor<double>  energies of m y-components    )\n    //  (for i from 0 to m-1                       )\n    //  (   for j from 0 to n-1                    )\n    //  (      Function<double,3> y_response[i][j] )\n\n    ar & r_params.archive();\n    ar & r_params.tda();\n    ar & r_params.num_orbitals();\n    ar & r_params.num_states();\n    ar & omega;\n\n    for (size_t i = 0; i < r_params.num_states(); i++)\n      for (size_t j = 0; j < r_params.num_orbitals(); j++)\n        ar & new_chi.x[i][j];\n    world.gop.fence();\n\n    if (not r_params.tda()) {\n      for (size_t i = 0; i < r_params.num_states(); i++)\n        for (size_t j = 0; j < r_params.num_orbitals(); j++)\n          ar & new_chi.y[i][j];\n      world.gop.fence();\n    }\n    return {new_chi, omega};\n  }\n};\n\nclass ComputeDensityStrategy {\npublic:\n  virtual ~ComputeDensityStrategy() = default;\n  virtual vector_real_function_3d\n  compute_density(World &world, const X_space &x,\n                  const vector_real_function_3d &phi0,\n                  const vector_real_function_3d &rho1, bool update) const = 0;\n};\n\nclass StaticDensityStrategy : public ComputeDensityStrategy {\npublic:\n  vector_real_function_3d compute_density(World &world, const X_space &x,\n                                          const vector_real_function_3d &phi0,\n                                          const vector_real_function_3d &rho1,\n                                          bool update) const override {\n\n    vector_real_function_3d rho_new;\n    int n = static_cast<int>(x.num_states());\n    int num_orbitals = static_cast<int>(x.num_orbitals());\n    //\n    auto make_density = [&](const vector_real_function_3d &x,\n                            const vector_real_function_3d &phi0) {\n      functionT rho = factoryT(world);\n      rho.compress();\n\n      vector_real_function_3d products(num_orbitals);\n      for (int i = 0; i < num_orbitals; i++) {\n        products[i] = x[i] * phi0[i % num_orbitals];\n      }\n      compress(world, products, false);\n      world.gop.fence();\n      for (int i = 0; i < num_orbitals; i++) {\n        rho.gaxpy(1.0, products[i], 1.0, false);\n      }\n      world.gop.fence();\n      products.clear();\n      return rho;\n    };\n\n    if (update) {\n      rho_new = copy(world, rho1);\n    } else {\n      rho_new = zero_functions<double, 3>(world, x.num_states());\n    }\n\n    x.reconstruct();\n    reconstruct(world, phi0, false);\n    world.gop.fence();\n    for (const auto &b : x.active) {\n      rho_new[b] = 2.0 * make_density(x.x[b], phi0);\n    }\n    world.gop.fence();\n    truncate(world, rho_new);\n    return rho_new;\n  }\n};\nclass FullDensityStrategy : public ComputeDensityStrategy {\npublic:\n  vector_real_function_3d compute_density(World &world, const X_space &x,\n                                          const vector_real_function_3d &phi0,\n                                          const vector_real_function_3d &rho1,\n                                          bool update) const override {\n    vector_real_function_3d rho_new;\n\n    // compres\n    int n = static_cast<int>(x.num_states());\n    int num_orbitals = static_cast<int>(x.num_orbitals());\n    int num_xy = 2 * num_orbitals;\n    auto x_vec = to_response_matrix(x);\n\n    //\n    auto make_density = [&](vector_real_function_3d &x, auto &phi0) {\n      functionT rho = factoryT(world);\n      rho.compress();\n\n      vector_real_function_3d products(num_xy);\n      for (int i = 0; i < num_xy; i++) {\n        products[i] = x[i] * phi0[i % num_orbitals];\n      }\n      compress(world, products, false);\n      world.gop.fence();\n      for (int i = 0; i < num_xy; i++) {\n        rho.gaxpy(1.0, products[i], 1.0, false);\n      }\n      world.gop.fence();\n      products.clear();\n      return rho;\n    };\n\n    if (update) {\n      rho_new = copy(world, rho1);\n    } else {\n      rho_new = zero_functions<double, 3>(world, x.num_states());\n    }\n    vector_real_function_3d x_phi, y_phi;\n    for (const auto &b : x.active) {\n      rho_new[b] = make_density(x_vec[b], phi0);\n    }\n    truncate(world, rho_new);\n\n    return rho_new;\n  }\n};\n\nclass VXC1Strategy {\npublic:\n  virtual ~VXC1Strategy() = default;\n  virtual X_space compute_VXC1(\n      World &world, const X_space &x, const vector_real_function_3d &rho1,\n      const std::pair<vector_real_function_3d, vector_real_function_3d> &phi0,\n      const XCOperator<double, 3> &xc) const = 0;\n};\n\nclass VXC1StrategyStandard : public VXC1Strategy {\n\npublic:\n  X_space compute_VXC1(\n      World &world, const X_space &x, const vector_real_function_3d &rho1,\n      const std::pair<vector_real_function_3d, vector_real_function_3d> &phi0,\n      const XCOperator<double, 3> &xc) const override {\n\n    X_space W =\n        X_space::zero_functions(world, x.num_states(), x.num_orbitals());\n\n    auto compute_wx_x = [&, &phi0 = phi0](auto rho_alpha) {\n      auto xc_rho = xc.apply_xc_kernel(rho_alpha);\n      return mul(world, xc_rho, phi0.first);\n    };\n    auto compute_wx_y = [&, &phi0 = phi0](auto rho_alpha) {\n      auto xc_rho = xc.apply_xc_kernel(rho_alpha);\n      return mul(world, xc_rho, phi0.second);\n    };\n    std::transform(rho1.begin(), rho1.end(), W.x.begin(), compute_wx_x);\n    std::transform(rho1.begin(), rho1.end(), W.y.begin(), compute_wx_y);\n    return W;\n  }\n};\n\nclass J1Strategy {\npublic:\n  virtual ~J1Strategy() = default;\n  virtual X_space compute_J1(\n      World &world, const X_space &x, const vector_real_function_3d &rho1,\n      const std::pair<vector_real_function_3d, vector_real_function_3d> &phi0,\n      const poperatorT &coulomb_ops) const = 0;\n};\n\nclass J1StrategyFull : public J1Strategy {\npublic:\n  X_space compute_J1(\n      World &world, const X_space &x, const vector_real_function_3d &rho1,\n      const std::pair<vector_real_function_3d, vector_real_function_3d> &phi0,\n      const poperatorT &coulomb_ops) const override {\n\n    X_space J =\n        X_space::zero_functions(world, x.num_states(), x.num_orbitals());\n    vector_real_function_3d temp_J(3);\n    for (const auto &b : x.active) {\n      temp_J[b] = apply(*coulomb_ops, rho1[b]);\n      J.x[b] = mul(world, temp_J[b], phi0.first, false);\n    }\n    J.y = J.x.copy();\n    return J;\n  }\n};\n\nclass J1StrategyStable : public J1Strategy {\npublic:\n  X_space compute_J1(\n      World &world, const X_space &x, const vector_real_function_3d &rho1,\n      const std::pair<vector_real_function_3d, vector_real_function_3d> &phi0,\n      const poperatorT &coulomb_ops) const override {\n\n    X_space J =\n        X_space::zero_functions(world, x.num_states(), x.num_orbitals());\n    // if (world.rank() == 0) { print(\"J1StrategyStable\"); }\n    vector_real_function_3d temp_J(3);\n    for (const auto &b : x.active) {\n      temp_J[b] = apply(*coulomb_ops, rho1[b]);\n      if (false) {\n        auto norm = temp_J[b].norm2();\n        if (world.rank() == 0)\n          print(\"norm of temp_J:\", norm);\n      }\n      J.x[b] = mul(world, temp_J[b], phi0.first, false);\n      J.y[b] = mul(world, temp_J[b], phi0.second, false);\n    }\n    world.gop.fence();\n    return J;\n  }\n};\n\nclass K1Strategy {\npublic:\n  virtual ~K1Strategy() = default;\n  virtual X_space compute_K1(\n      World &world, const X_space &x,\n      const std::pair<vector_real_function_3d, vector_real_function_3d> &phi_0X,\n      const std::pair<vector_real_function_3d, vector_real_function_3d>\n          &rhs_vec) const = 0;\n  std::string algorithm_;\n\n  [[nodiscard]] auto make_k(const vecfuncT &ket, const vecfuncT &bra) const {\n    auto &world = ket[0].world();\n    const double lo = 1.e-10;\n    Exchange<double, 3> k{world, lo};\n    k.set_bra_and_ket(bra, ket);\n    if (algorithm_ == \"multiworld\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient);\n    } else if (algorithm_ == \"multiworld_row\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient_row);\n    } else if (algorithm_ == \"largemem\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::large_memory);\n    } else if (algorithm_ == \"smallmem\") {\n      k.set_algorithm(Exchange<double, 3>::Algorithm::small_memory);\n    }\n    return k;\n  };\n  virtual void set_algorithm(const std::string &algo) = 0;\n};\n\nclass K1StrategyFull : public K1Strategy {\npublic:\n  X_space compute_K1(\n      World &world, const X_space &x,\n      const std::pair<vector_real_function_3d, vector_real_function_3d> &phi_0X,\n      const std::pair<vector_real_function_3d, vector_real_function_3d>\n          &rhs_vec) const override {\n\n    auto K = X_space::zero_functions(world, x.num_states(), x.num_orbitals());\n\n    vector_real_function_3d k1x, k1y, k2x, k2y;\n    vector_real_function_3d xb;\n    vector_real_function_3d yb;\n\n    auto k1x_temp = create_response_matrix(x.num_states(), x.num_orbitals());\n    auto k1y_temp = create_response_matrix(x.num_states(), x.num_orbitals());\n    auto k2x_temp = create_response_matrix(x.num_states(), x.num_orbitals());\n    auto k2y_temp = create_response_matrix(x.num_states(), x.num_orbitals());\n\n    for (const auto &b : x.active) {\n      auto K1X = make_k(x.x[b], phi_0X.first);\n      auto K1Y = make_k(phi_0X.first, x.y[b]);\n\n      auto K2X = make_k(x.y[b], phi_0X.first);\n      auto K2Y = make_k(phi_0X.second, x.x[b]);\n      world.gop.fence();\n\n      k1x_temp[b] = K1X(rhs_vec.first);\n      k1y_temp[b] = K1Y(rhs_vec.first);\n      k2x_temp[b] = K2X(rhs_vec.second);\n      k2y_temp[b] = K2Y(rhs_vec.second);\n      world.gop.fence();\n      K.x[b] = gaxpy_oop(1.0, k1x_temp[b], 1.0, k1y_temp[b], false);\n      K.y[b] = gaxpy_oop(1.0, k2x_temp[b], 1.0, k2y_temp[b], false);\n    }\n    world.gop.fence();\n    return K;\n  }\n  void set_algorithm(const std::string &algo) override { algorithm_ = algo; }\n};\n\nclass K1StrategyStatic : public K1Strategy {\npublic:\n  X_space compute_K1(\n      World &world, const X_space &x,\n      const std::pair<vector_real_function_3d, vector_real_function_3d> &phi_0X,\n      const std::pair<vector_real_function_3d, vector_real_function_3d>\n          &rhs_vec) const override {\n    X_space K =\n        X_space::zero_functions(world, x.num_states(), x.num_orbitals());\n    vector_real_function_3d k1x, k1y, k2x, k2y;\n    const double lo = 1e-10;\n\n    auto k1_temp = create_response_matrix(x.num_states(), x.num_orbitals());\n    auto k2_temp = create_response_matrix(x.num_states(), x.num_orbitals());\n\n    for (const auto &b : x.active) {\n      auto K1Xs = make_k(x.x[b], phi_0X.first);\n      auto K1Ys = make_k(phi_0X.first, x.x[b]);\n      k1_temp[b] = K1Xs(rhs_vec.first);\n      k2_temp[b] = K1Ys(rhs_vec.first);\n      K.x[b] = gaxpy_oop(1.0, k1_temp[b], 1.0, k2_temp[b], false);\n    }\n    world.gop.fence();\n    return K;\n  }\n  void set_algorithm(const std::string &algo) override { algorithm_ = algo; }\n};\n\nclass inner_strategy {\n\npublic:\n  virtual ~inner_strategy() = default;\n  [[nodiscard]] virtual Tensor<double>\n  compute_inner(const X_space &x, const X_space &y) const = 0;\n};\n\nclass Context {\n\nprivate:\n  std::unique_ptr<inner_strategy> inner_strategy_;\n  std::unique_ptr<J1Strategy> j1_strategy_;\n  std::unique_ptr<K1Strategy> k1_strategy_;\n  std::unique_ptr<VXC1Strategy> vxc1_strategy_;\n  std::unique_ptr<ComputeDensityStrategy> density_strategy_;\n  std::unique_ptr<LoadXSpaceStrategy> load_x_space_strategy_;\n\npublic:\n  explicit Context(\n      std::unique_ptr<inner_strategy> &&innerStrategy = {},\n      std::unique_ptr<J1Strategy> &&j1Strategy = {},\n      std::unique_ptr<K1Strategy> &&k1Strategy = {},\n      std::unique_ptr<VXC1Strategy> &&vxc1trategy = {},\n      std::unique_ptr<ComputeDensityStrategy> &&densityStrategy = {},\n      std::unique_ptr<LoadXSpaceStrategy> &&loadXSpaceStrategy = {})\n      : inner_strategy_(std::move(innerStrategy)),\n        j1_strategy_(std::move(j1Strategy)),\n        k1_strategy_(std::move(k1Strategy)),\n        vxc1_strategy_(std::move(vxc1trategy)),\n        density_strategy_(std::move(densityStrategy)),\n        load_x_space_strategy_(std::move(loadXSpaceStrategy)) {}\n  void set_strategy(std::unique_ptr<inner_strategy> &&strategy,\n                    std::unique_ptr<J1Strategy> &&j1Strategy,\n                    std::unique_ptr<K1Strategy> &&K1Strategy,\n                    std::unique_ptr<VXC1Strategy> &&vxc1Strategy,\n                    std::unique_ptr<ComputeDensityStrategy> &&densityStrategy,\n                    std::unique_ptr<LoadXSpaceStrategy> &&loadXSpaceStrategy,\n                    const ResponseParameters &r_params) {\n    inner_strategy_ = std::move(strategy);\n    j1_strategy_ = std::move(j1Strategy);\n    k1_strategy_ = std::move(K1Strategy);\n    vxc1_strategy_ = std::move(vxc1Strategy);\n    density_strategy_ = std::move(densityStrategy);\n    load_x_space_strategy_ = std::move(loadXSpaceStrategy);\n\n    k1_strategy_->set_algorithm(r_params.hfexalg());\n  }\n\n  [[nodiscard]] Tensor<double> inner(const X_space &x, const X_space &y) const {\n    if (inner_strategy_) {\n      return inner_strategy_->compute_inner(x, y);\n    } else {\n      throw madness::MadnessException(\"Inner product Strategy isn't set\",\n                                      \"Need to set a strategy\", 2, 455, \"inner\",\n                                      \"ResponseBase.hpp\");\n    }\n  }\n\n  X_space compute_j1(World &world, const X_space &x,\n                     const vector_real_function_3d &rho1,\n                     const double_response_vector &phi0,\n                     const poperatorT &coulomb_ops) const {\n    if (j1_strategy_) {\n      return j1_strategy_->compute_J1(world, x, rho1, phi0, coulomb_ops);\n    } else {\n      throw madness::MadnessException(\"Compute J1 Strategy isn't set\",\n                                      \"Need to set a strategy\", 2, 455, \"inner\",\n                                      \"ResponseBase.hpp\");\n    }\n  }\n\n  X_space compute_k1(World &world, const X_space &x,\n                     const double_response_vector &phi0X,\n                     const double_response_vector &phi0) const {\n    if (k1_strategy_) {\n      return k1_strategy_->compute_K1(world, x, phi0X, phi0);\n    } else {\n      throw madness::MadnessException(\"Compute K1 Strategy isn't set\",\n                                      \"Need to set a strategy\", 2, 455, \"inner\",\n                                      \"ResponseBase.hpp\");\n    }\n  }\n  X_space compute_VXC1(World &world, const X_space &x,\n                       const vector_real_function_3d &rho1,\n                       const double_response_vector &phi0,\n                       const XCOperator<double, 3> &xc) const {\n    if (vxc1_strategy_) {\n      return vxc1_strategy_->compute_VXC1(world, x, rho1, phi0, xc);\n    } else {\n      throw madness::MadnessException(\"Compute VXC1 Strategy isn't set\",\n                                      \"Need to set a strategy\", 2, 455, \"inner\",\n                                      \"ResponseBase.hpp\");\n    }\n  }\n\n  vector_real_function_3d compute_density(World &world, const X_space &x,\n                                          const vector_real_function_3d &phi0,\n                                          const vector_real_function_3d &rho1,\n                                          bool update) const {\n    if (density_strategy_) {\n      return density_strategy_->compute_density(world, x, phi0, rho1, update);\n    } else {\n      throw madness::MadnessException(\"Compute Density Strategy isn't set\",\n                                      \"Need to set a strategy\", 2, 455, \"inner\",\n                                      \"ResponseBase.hpp\");\n    }\n  }\n  XData load_x_space(World &world, const std::string &filename,\n                     const ResponseParameters &r_params,\n                     double omega_state) const {\n    if (load_x_space_strategy_) {\n      return load_x_space_strategy_->load_x_space(world, filename, r_params,\n                                                  omega_state);\n    } else {\n      throw madness::MadnessException(\"Load X Space Strategy isn't set\",\n                                      \"Need to set a strategy\", 2, 455, \"inner\",\n                                      \"ResponseBase.hpp\");\n    }\n  }\n};\n\nclass full_inner_product : public inner_strategy {\npublic:\n  [[nodiscard]] Tensor<double> compute_inner(const X_space &x,\n                                             const X_space &y) const override {\n    return inner(x, y);\n  }\n};\n\nclass static_inner_product : public inner_strategy {\npublic:\n  [[nodiscard]] Tensor<double> compute_inner(const X_space &x,\n                                             const X_space &y) const override {\n    return response_space_inner(x.x, y.x);\n  }\n};\ntypedef std::vector<XNonlinearSolver<vector_real_function_3d, double,\n                                     response_matrix_allocator>>\n    response_solver;\ntypedef std::vector<\n    XNonlinearSolver<real_function_3d, double, response_function_allocator>>\n    response_function_solver;\n\nclass response_timing {\n  std::map<std::string, std::vector<double>> wall_time_data;\n  std::map<std::string, std::vector<double>> cpu_time_data;\n  int iter;\n\npublic:\n  response_timing();\n\n  void to_json(json &j);\n\n  void print_data();\n\n  void add_data(std::map<std::string, std::pair<double, double>> values);\n};\nclass response_data {\n  int iter;\n  std::vector<double> thresh;\n  std::vector<double> density_target;\n  std::vector<double> bsh_target;\n\npublic:\n  void to_json(json &j);\n\n  void add_data(std::map<std::string, Tensor<double>> values);\n  void add_convergence_targets(double p_thresh, double p_density_target,\n                               double p_bsh_target);\n};\n\nclass ResponseTester;\n\nstruct residuals {\n  X_space residual;\n  Tensor<double> residual_norms;\n};\n\nusing gamma_orbitals =\n    std::tuple<X_space, vector_real_function_3d, vector_real_function_3d>;\n\nclass ResponseBase {\npublic:\n  friend ResponseTester;\n\n  ResponseBase(World &world, const CalcParams &params);\n\n  void solve(World &world);\n\n  virtual void initialize(World &world) = 0;\n\n  virtual void iterate(World &world) = 0;\n\n  // virtual void iterate();\n  auto get_parameter() const -> CalcParams {\n    return {ground_calc, molecule, r_params};\n  }\n\n  Molecule get_molecule() const;\n  auto get_orbitals() const -> vector_real_function_3d {\n    return ground_orbitals;\n  }\n\n  auto get_chi() const -> X_space { return Chi.copy(); };\n\n  void output_json();\n\n  json j_molresponse{};\n  response_timing time_data;\n  response_data function_data;\n  mutable std::map<std::string, std::pair<double, double>> iter_timing;\n\n  Context response_context;\n\n  static void help() {\n    print_header2(\"help page for MOLRESPONSE \");\n    print(\"The molresponse code computes linear response properties and \"\n          \"excited states\");\n    print(\"\\nYou can print all available calculation parameters by \"\n          \"running\\n\");\n    print(\"molresponse --print_parameters\\n\");\n    print(\"You can perform a simple calculation by running\\n\");\n    print(\"moldft --geometry=h2o.xyz\");\n    print(\"molresponse\");\n    print(\"\\nprovided you have an xyz file in your directory as well as a \"\n          \"file named 'response.in'.\");\n    print(\"with minimal input\\n\");\n    print(\"response \");\n    print(\"  archive mad.restartdata \");\n    print(\"  excited_state 1 \");\n    print(\"end \");\n  }\n\n  static void print_parameters() {\n    ResponseParameters rparam;\n    print(\"A molresponse calculation requires a converged moldft \"\n          \"calculations with the \");\n    print(\"corresponding parameters.\");\n    print(\"\\nDefault parameters for the response part of the molresponse \"\n          \"program are\");\n    rparam.print(\"response\", \"end\");\n    print(\"\\n\\nthe molecular geometry must be specified in a separate \"\n          \"block:\");\n    Molecule::print_parameters();\n  }\n\n  void write_vtk(World &world, int num_points, const double &L,\n                 const std::string &filename);\n\nprotected:\n  // Given molecule returns the nuclear potential of the molecule\n  ResponseParameters r_params;\n  Molecule molecule;\n  GroundStateCalculation ground_calc;\n  bool all_done = false;\n\n  XCfunctional xcf;\n  real_function_3d mask;\n\n  std::shared_ptr<PotentialManager> potential_manager;\n  // shared pointers to Operators\n  poperatorT shared_coulomb_operator; // shared pointer to seperated convolution\n                                      // operator\n  std::vector<std::shared_ptr<real_derivative_3d>> gradop;\n  // Stored functions\n  mutable real_function_3d\n      stored_v_nuc; // Stored nuclear potential from ground state\n  mutable real_function_3d\n      stored_v_coul; // Stored coulomb potential from ground state\n\n  // Ground state orbitals and energies\n  vector_real_function_3d ground_orbitals{};\n  Tensor<double> ground_energies;\n\n  // Information that is inferred from input file\n  // Ground state orbitals being used in calculation\n  Tensor<double> hamiltonian;\n  Tensor<double> ham_no_diag;\n  // Tensors for holding energies\n  // residuals, and shifts\n\n  Tensor<double> e_residuals; // Residuals of energies\n\n  // Mask function to handle boundary conditions\n\n  functionT ground_density; // ground state density\n\n  mutable response_space\n      stored_potential; // The ground state potential, stored only\n  // if store_potential is true (default is\n\n  double vtol{};\n\n  X_space Chi;\n  /// Sets the Function protocol dependent on the truncation threshold.\n  /// Sets the polynomial order of basis functions k\n  /// Then creates shared coulomb operator, gradient operator, ground density\n  /// AS well as the ground state density\n  /// \\param world\n  /// \\param thresh\n  void set_protocol(World &world, double thresh) {\n    int k;\n    // Allow for imprecise conversion of threshold\n    if (thresh >= 0.9e-2)\n      k = 4;\n    else if (thresh >= 0.9e-4)\n      k = 6;\n    else if (thresh >= 0.9e-6)\n      k = 8;\n    else if (thresh >= 0.9e-8)\n      k = 10;\n    else\n      k = 12;\n\n    // k defaults to make sense with thresh, override by providing k in\n    // input file\n    if (r_params.k() == -1) {\n      FunctionDefaults<3>::set_k(k);\n    } else {\n      FunctionDefaults<3>::set_k(r_params.k());\n    }\n\n    // Set Function Defaults\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_initial_level(2);\n    FunctionDefaults<3>::set_autorefine(false);\n    FunctionDefaults<3>::set_apply_randomize(false);\n    FunctionDefaults<3>::set_project_randomize(false);\n    GaussianConvolution1DCache<double>::map.clear();\n\n    double safety = 0.1;\n    vtol = FunctionDefaults<3>::get_thresh() * safety;\n    shared_coulomb_operator =\n        poperatorT(CoulombOperatorPtr(world, r_params.lo(), thresh));\n    gradop = gradient_operator<double, 3>(world);\n    potential_manager = std::make_shared<PotentialManager>(molecule, \"a\");\n    potential_manager->make_nuclear_potential(world);\n    // Create the masking function\n    mask = real_function_3d(\n        real_factory_3d(world).f(mask3).initial_level(4).norefine());\n\n    ground_density = make_ground_density(world);\n    ground_density.truncate(FunctionDefaults<3>::get_thresh());\n    // Basic print\n    if (world.rank() == 0) {\n      print(\"\\nSolving NDIM=\", 3, \" with thresh\", thresh, \"    k\",\n            FunctionDefaults<3>::get_k(), \"  dconv\",\n            std::max(thresh, r_params.dconv()), \"\\n\");\n    }\n  }\n\n  virtual void check_k(World &world, double thresh, int k);\n\n  auto make_ground_density(World &world) const -> functionT;\n\n  auto ComputeHamiltonianPair(World &world) const\n      -> std::pair<Tensor<double>, Tensor<double>>;\n\n  auto Coulomb(World &world) const -> real_function_3d;\n\n  auto make_xc_operator(World &world) const -> XCOperator<double, 3>;\n\n  void save_x_space(World &world, const std::string &name, const X_space &X) {\n    // Archive to write everything to\n    archive::ParallelOutputArchive ar(world, name.c_str(), 1);\n\n    ar & X.num_orbitals();\n    ar & X.num_states();\n\n    for (size_t i = 0; i < X.num_states(); i++)\n      for (size_t j = 0; j < X.num_orbitals(); j++)\n        ar & X.x[i][j];\n    for (size_t i = 0; i < X.num_states(); i++)\n      for (size_t j = 0; j < X.num_orbitals(); j++)\n        ar & X.y[i][j];\n  }\n\n  // Load a response calculation\n  X_space load_x_space(World &world, const std::string &name) {\n    archive::ParallelInputArchive ar(world, name.c_str());\n    size_t num_orbitals;\n    size_t num_states;\n\n    ar & num_orbitals;\n    ar & num_states;\n    auto result = X_space(world, num_states, num_orbitals);\n    for (size_t i = 0; i < num_states; i++)\n      for (size_t j = 0; j < num_orbitals; j++)\n        ar & result.x[i][j];\n    world.gop.fence();\n    for (size_t i = 0; i < num_states; i++)\n      for (size_t j = 0; j < num_orbitals; j++)\n        ar & result.y[i][j];\n    world.gop.fence();\n    return result;\n  }\n\n  virtual void save(World &world, const std::string &name) = 0;\n\n  virtual void load(World &world, const std::string &name) = 0;\n\n  auto make_density(World &world, const X_space &chi) const -> vecfuncT;\n\n  void load_balance_chi(World &world);\n\n  auto\n  make_bsh_operators_response(World &world, double &shift,\n                              const double omega) const -> vector<poperatorT>;\n\n  auto kain_x_space_update(World &world, const X_space &chi,\n                           const X_space &residual_chi,\n                           response_solver &kain_x_space) -> X_space;\n\n  void x_space_step_restriction(World &world, const X_space &old_Chi,\n                                X_space &temp, bool restrict_y,\n                                const double &max_bsh_rotation);\n\n  //    void plotResponseOrbitals(World &world, size_t iteration,\n  //                              const response_space &x_response,\n  //                              const response_space &y_response,\n  //                              const ResponseParameters &responseParameters,\n  //                              const GroundStateCalculation &g_params);\n\n  static auto orbital_load_balance(World &world, const gamma_orbitals &,\n                                   double load_balance) -> gamma_orbitals;\n\n  auto compute_gamma_tda(World &world, const gamma_orbitals &density,\n                         const XCOperator<double, 3> &xc) const -> X_space;\n\n  auto compute_gamma_static(World &world, const gamma_orbitals &,\n                            const XCOperator<double, 3> &xc) const -> X_space;\n\n  auto compute_gamma_full(World &world, const gamma_orbitals &,\n                          const XCOperator<double, 3> &xc) const -> X_space;\n  auto compute_gamma(World &world, const gamma_orbitals &,\n                     const XCOperator<double, 3> &xc) const -> X_space;\n\n  auto compute_V0X(World &world, const X_space &X,\n                   const XCOperator<double, 3> &xc,\n                   bool compute_Y) const -> X_space;\n\n  auto compute_lambda_X(World &world, const X_space &chi,\n                        XCOperator<double, 3> &xc,\n                        const std::string &calc_type) const -> X_space;\n\n  auto compute_theta_X(World &world, const X_space &chi,\n                       const vector_real_function_3d &rho1,\n                       const XCOperator<double, 3> &xc,\n                       const std::string &calc_type) const -> X_space;\n\n  auto compute_F0X(World &world, const X_space &X,\n                   const XCOperator<double, 3> &xc,\n                   bool compute_Y) const -> X_space;\n\n  void analyze_vectors(World &world, const vecfuncT &x,\n                       const std::string &response_state);\n\n  auto project_ao_basis(World &world,\n                        const AtomicBasisSet &aobasis) -> vecfuncT;\n\n  static auto project_ao_basis_only(World &world, const AtomicBasisSet &aobasis,\n                                    const Molecule &mol) -> vecfuncT;\n\n  void converged_to_json(json &j);\n\n  auto update_residual(World &world, const X_space &chi, const X_space &g_chi,\n                       const std::string &calc_type,\n                       const Tensor<double> &old_residuals,\n                       const X_space &xres_old) -> residuals;\n\n  auto kain_rf_space_update(World &world, const X_space &chi,\n                            const X_space &residual_chi,\n                            response_function_solver &kain_x_space) -> X_space;\n\n  auto compute_response_potentials(World &world, const X_space &chi,\n                                   XCOperator<double, 3> &xc,\n                                   const std::string &calc_type) const\n      -> std::tuple<X_space, X_space, X_space>;\n\n  // compute exchange |i><i|J|p>\n  auto exchangeHF(const vecfuncT &ket, const vecfuncT &bra,\n                  const vecfuncT &vf) const -> vecfuncT {\n    World &world = ket[0].world();\n    auto n = bra.size();\n    auto nf = ket.size();\n    double tol = FunctionDefaults<3>::get_thresh(); /// Important this is\n    double mul_tol = 0.0;\n    const double lo = r_params.lo();\n\n    std::shared_ptr<real_convolution_3d> poisson;\n    /// consistent with Coulomb\n    vecfuncT Kf = zero_functions_compressed<double, 3>(world, nf, true);\n\n    reconstruct(world, bra);\n    reconstruct(world, ket);\n    reconstruct(world, vf);\n\n    // i-j sym\n    for (int i = 0; i < n; ++i) {\n      // for each |i> <i|phi>\n      vecfuncT psi_f =\n          mul_sparse(world, bra[i], vf, mul_tol, true); /// was vtol\n      truncate(world, psi_f, tol, true);\n      // apply to vector of products <i|phi>..<i|1> <i|2>...<i|N>\n      psi_f = apply(world, *shared_coulomb_operator, psi_f);\n      truncate(world, psi_f, tol, true);\n      // multiply by ket i  <i|phi>|i>: <i|1>|i> <i|2>|i> <i|2>|i>\n      psi_f = mul_sparse(world, ket[i], psi_f, mul_tol, true); /// was vtol\n      /// Generalized A*X+y for vectors of functions ---- a[i] = alpha*a[i] +\n      // 1*Kf+occ[i]*psi_f\n      gaxpy(world, double(1.0), Kf, double(1.0), psi_f);\n    }\n    truncate(world, Kf, tol, true);\n    return Kf;\n  }\n\n  void print_inner(World &world, const std::string &name, const X_space &left,\n                   const X_space &right) const;\n\n  void function_data_to_json(json &j_mol_in, size_t iter,\n                             const Tensor<double> &x_norms,\n                             const Tensor<double> &x_abs_norms,\n                             const Tensor<double> &rho_norms,\n                             const Tensor<double> &rho_res_norms);\n  X_space compute_TX(World &world, const X_space &X, bool compute_Y) const;\n  vecfuncT update_density(World &world, const X_space &chi,\n                          const vecfuncT &old_density) const;\n};\n\n// Some helper functions\n///////////////////////////////////////////////////////////////////////////////////////////////////\n\n/// Check k given response parameters\n/// \\param world\n/// \\param Chi\n/// \\param thresh\n/// \\param k\nvoid check_k(World &world, X_space &Chi, double thresh, int k);\n\nauto add_randomness(World &world, const response_space &f,\n                    double magnitude) -> response_space;\n\nvoid normalize(World &world, response_space &f);\n\nvoid normalize(World &world, X_space &Chi);\n\nstatic auto kronecker(size_t l, size_t n) -> double {\n  if (l == n)\n    return 1.0;\n  return 0.0;\n}\n\nauto solid_harmonics(World &world,\n                     int n) -> std::map<std::vector<int>, real_function_3d>;\n\n/***\n * @brief Prints the norms of the functions of a response space\n *\n *\n *\n * @param world\n * @param f\n */\nvoid print_norms(World &world, const response_space &f);\n\n// Returns a list of solid harmonics such that:\n// solid_harm.size() * num_ground_orbs > 2 * num. resp. components\nauto make_xyz_functions(World &world) -> vector_real_function_3d;\n\n// Selects from a list of functions and energies the k functions with the\n// lowest energy\nauto select_functions(World &world, response_space f, Tensor<double> &energies,\n                      size_t k, size_t print_level) -> response_space;\n\n// Sorts the given tensor of eigenvalues and\n// response functions\nvoid sort(World &world, Tensor<double> &vals, response_space &f);\n\nvoid sort(World &world, Tensor<double> &vals, X_space &f);\n\n// Specialized for response calculations that returns orthonormalized\n// functions\nauto gram_schmidt(World &world, const response_space &f) -> response_space;\n\n/// Computes the transition density between set of two response functions x and\n/// y. Uses std::transform to iterate between x and y vectors \\param world\n/// \\param orbitals\n/// \\param x\n/// \\param y\n/// \\return\nauto transition_density(World &world, const vector_real_function_3d &orbitals,\n                        const response_space &x,\n                        const response_space &y) -> vector_real_function_3d;\n\nauto transition_densityTDA(World &world,\n                           const vector_real_function_3d &orbitals,\n                           const response_space &x) -> vector_real_function_3d;\n\nauto transform(World &world, const response_space &f,\n               const Tensor<double> &U) -> response_space;\n\nauto transform(World &world, const X_space &x,\n               const Tensor<double> &U) -> X_space;\n\n// result(i,j) = inner(a[i],b[j]).sum()\nauto expectation(World &world, const response_space &A,\n                 const response_space &B) -> Tensor<double>;\n\nvoid inner_to_json(World &world, const std::string &name,\n                   const Tensor<double> &m_val,\n                   std::map<std::string, Tensor<double>> &data);\nclass ResponseTester {\n\npublic:\n  static void load_calc(World &world, ResponseBase *p, double thresh) {\n    p->set_protocol(world, thresh);\n    p->load(world, p->r_params.restart_file());\n    p->check_k(world, thresh, FunctionDefaults<3>::get_k());\n  }\n\n  static X_space compute_gamma_full(World &world, ResponseBase *p,\n                                    double thresh) {\n    XCOperator<double, 3> xc = p->make_xc_operator(world);\n    return X_space{};\n  }\n\n  X_space compute_lambda_X(World &world, ResponseBase *p, double thresh) {\n    XCOperator<double, 3> xc = p->make_xc_operator(world);\n    X_space gamma =\n        p->compute_lambda_X(world, p->Chi, xc, p->r_params.calc_type());\n    return gamma;\n  }\n\n  std::pair<X_space, X_space> compute_VFOX(World &world, ResponseBase *p,\n                                           bool compute_y) {\n    XCOperator<double, 3> xc = p->make_xc_operator(world);\n    X_space V = p->compute_V0X(world, p->Chi, xc, compute_y);\n    X_space F = p->compute_F0X(world, p->Chi, xc, compute_y);\n    return {V, F};\n  }\n};\n\n#endif // MADNESS_RESPONSEBASE_HPP\n"
  },
  {
    "path": "src/apps/molresponse/ResponseExceptions.hpp",
    "content": "//\n// Created by adrianhurtado on 1/21/22.\n//\n\n#ifndef MADNESS_RESPONSEEXCEPTIONS_HPP\n#define MADNESS_RESPONSEEXCEPTIONS_HPP\n#include \"madness_exception.h\"\n/// Capturing the line/function/filename info is best done with the\n/// macros listed below.\n/// \\param[in] m The error message.\n/// \\param[in] a String describing the exception.\n/// \\param[in] v Value associated with the exception.\n/// \\param[in] l Line number where the exception occurred.\n/// \\param[in] fn Function where the exception occurred.\n/// \\param[in] f File where the exception occurred.\nusing MadException = madness::MadnessException;\n\nclass Input_Error : public MadException {\npublic:\n    explicit Input_Error()\n        : MadException(\"input file not found\", nullptr, 25, __LINE__, __FUNCTION__, __FILE__) {}\n};\nclass Response_Input_Error : public MadException {\npublic:\n    explicit Response_Input_Error()\n        : MadException(\"Response input not correct\", nullptr, 25, __LINE__, __FUNCTION__,\n                       __FILE__) {}\n};\n\nclass Response_Convergence_Error : public MadException {\npublic:\n    explicit Response_Convergence_Error()\n        : MadException(\"Previous frequency response calculation did not converge \", nullptr, 25,\n                       __LINE__, __FUNCTION__, __FILE__) {}\n};\n\nclass Quad_Response_Error : public MadException {\npublic:\n    explicit Quad_Response_Error()\n            : MadException(\"Previous frequency response calculation did not converge \", nullptr, 25,\n                           __LINE__, __FUNCTION__, __FILE__) {}\n};\n\n#endif// MADNESS_RESPONSEEXCEPTIONS_HPP\n"
  },
  {
    "path": "src/apps/molresponse/basic_operators.cc",
    "content": "/*\n * Copyright 2021 Adrian Hurtado\n * Some basic operators for ResponseFunction objects\n */\n#include \"basic_operators.h\"\n\nnamespace madness {\n\n// Returns a shallow copy of the transpose of a vector of vector of functions\nresponse_space transpose(response_space &f) {\n  MADNESS_ASSERT(f.size() > 0);\n  MADNESS_ASSERT(f[0].size() > 0);\n\n  // Get sizes\n  size_t m = f.size();\n  size_t n = f[0].size();\n\n  // Return container\n  response_space g(f[0][0].world(), m, n);\n\n  // Now do shallow copies\n  for (size_t i = 0; i < m; i++)\n    for (size_t j = 0; j < n; j++)\n      g[j][i] = f[i][j];\n\n  // Done\n  return g;\n}\n\n// Truncate a vector of vector of functions\nvoid truncate(World &world, response_space &v, double tol, bool fence) {\n  MADNESS_ASSERT(v.size() > 0);\n  MADNESS_ASSERT(v[0].size() > 0);\n\n  for (unsigned int i = 0; i < v.size(); i++) {\n    truncate(world, v[i], tol, fence);\n  }\n}\n\n// Apply a vector of vector of operators to a vector of vector of functions\n// g[i][j] = op[i][j](f[i][j])\nresponse_space\napply(World &world,\n      std::vector<std::vector<std::shared_ptr<real_convolution_3d>>> &op,\n      response_space &f) {\n  MADNESS_ASSERT(f.size() > 0);\n  MADNESS_ASSERT(f.size() == op.size());\n  MADNESS_ASSERT(f[0].size() == op[0].size());\n\n  response_space result(f[0][0].world(), f.size(), f[0].size());\n\n  for (const auto &i : f.active) {\n    // Using vmra.h function, line 889\n    result[i] = apply(world, op[i], f[i]);\n  }\n\n  return result;\n}\n// Apply a vector of operators to a set of response states\n//\nresponse_space apply(World &world,\n                     std::vector<std::shared_ptr<real_convolution_3d>> &op,\n                     response_space &f) {\n  MADNESS_ASSERT(f.size() > 0);\n  MADNESS_ASSERT(f[0].size() == op.size());\n  // response_space result = f.copy();\n  response_space result =\n      response_space(f[f.active.front()][0].world(), f.size(), f[0].size());\n  result.active = f.active;\n  for (const auto &i : f.active) {\n    result.x[i] = apply(world, op, f[i]);\n  }\n  world.gop.fence();\n\n  return result;\n}\n\n// Apply the derivative operator to a vector of vector of functions\nresponse_space apply(World &world, real_derivative_3d &op, response_space &f) {\n  MADNESS_ASSERT(f.size() > 0);\n\n  response_space result =\n      response_space(f[f.active.front()][0].world(), f.size(), f[0].size());\n  result.active = f.active;\n  for (const auto &i : f.active) {\n    result.x[i] = apply(world, op, f[i]);\n  }\n  world.gop.fence();\n\n  return result;\n}\n} // namespace madness\n\n// Deuces\n"
  },
  {
    "path": "src/apps/molresponse/basic_operators.h",
    "content": "/*\n * Some basic operators for ResponseFunction objects\n */\n#ifndef SRC_APPS_molresponse_TDHF_BASIC_OPERATORS2_H_\n#define SRC_APPS_molresponse_TDHF_BASIC_OPERATORS2_H_\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include \"response_functions.h\"\n\n#include <algorithm>\n#include <memory>\n#include <vector>\n\nnamespace madness {\n// Returns a shallow copy of the transpose of a vector of vector of functions\nresponse_space transpose(response_space& f);\n\n// Multiplication of a vector of vectors by a matrix,\n//  *  g[i][k] = \\sum_{j} a[i][j] * b(j,k)\n// !  NOTE: NO BOUNDS CHECKING ON THE TENSOR b!!!!\nresponse_space scale_2d(World& world, const response_space& a, const Tensor<double>& b);\n\n// Multiplication of a vector of vectors by a scalar g[i][j] = a[i][j] * b\nresponse_space scale(response_space a, double b);\n\n// Truncate a vector of vector of functions\nvoid truncate(World& world, response_space& v, double tol = FunctionDefaults<3>::get_thresh(), bool fence = true);\n\n// Apply a vector of vector of operators to a vector of vector of functions\n// g[i][j] = op[i][j](f[i][j])\nresponse_space apply(World& world,\n                     std::vector<std::vector<std::shared_ptr<real_convolution_3d>>>& op,\n                     response_space& f);\n// frequecy case\nresponse_space apply(World& world, std::vector<std::shared_ptr<real_convolution_3d>>& op, response_space& f);\n\n// Apply the derivative operator to a vector of vector of functions\nresponse_space apply(World& world, real_derivative_3d& op, response_space& f);\n}  // namespace madness\n\n#endif  // SRC_APPS_molresponse_TDHF_BASIC_OPERATORS2_H_\n"
  },
  {
    "path": "src/apps/molresponse/calc_runner.cc",
    "content": "// Copyright 2021 Adrian Hurtado\n#include <madness/chem/SCF.h>\n#include <math.h>\n\n#include <cstdint>\n#include <filesystem>\n#include <map>\n#include <memory>\n#include <string>\n#include <utility>\n\n#include \"Plot_VTK.h\"\n#include \"TDDFT.h\"\n#include \"madness/chem/NWChem.h\"// For nwchem interface\n#include \"madness/chem/SCFOperators.h\"\n#include \"madness/chem/molecule.h\"\n#include \"madness/chem/potentialmanager.h\"\n#include \"madness/chem/projector.h\"// For easy calculation of (1 - \\hat{\\rho}^0)\n#include \"madness/mra/funcdefaults.h\"\n#include \"molresponse/basic_operators.h\"\n#include \"molresponse/density.h\"\n#include \"molresponse/global_functions.h\"\n#include \"molresponse/load_balance.h\"\n#include \"molresponse/property.h\"\n#include \"molresponse/response_functions.h\"\n#include \"molresponse/timer.h\"\n#include \"molresponse/x_space.h\"\n\n\ntemplate<std::size_t NDIM>\nvoid TDDFT::set_protocol(World& world, double thresh) {\n    size_t k;\n    // Allow for imprecise conversion of threshold\n    if (thresh >= 0.9e-2) k = 4;\n    else if (thresh >= 0.9e-4)\n        k = 6;\n    else if (thresh >= 0.9e-6)\n        k = 8;\n    else if (thresh >= 0.9e-8)\n        k = 10;\n    else\n        k = 12;\n\n    // k defaults to make sense with thresh, override by providing k in\n    // input file\n    if (r_params.k() == -1) {\n        FunctionDefaults<NDIM>::set_k(k);\n    } else {\n        FunctionDefaults<NDIM>::set_k(r_params.k());\n    }\n\n    // MolDFT sets all these, so copying\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(2);\n\n    FunctionDefaults<NDIM>::set_autorefine(false);\n    FunctionDefaults<NDIM>::set_apply_randomize(false);\n    FunctionDefaults<NDIM>::set_project_randomize(false);\n    GaussianConvolution1DCache<double>::map.clear();\n    double safety = 0.1;\n    vtol = FunctionDefaults<NDIM>::get_thresh() * safety;\n    coulop = poperatorT(CoulombOperatorPtr(world, r_params.lo(), thresh));\n    gradop = gradient_operator<double, 3>(world);\n    potential_manager = std::make_shared<PotentialManager>(molecule, \"a\");\n    potential_manager->make_nuclear_potential(world);\n    // GaussianConvolution1DCache<double>::map.clear();//(TODO:molresponse-What\n    // is this? Do i need it?)\n    rho0 = make_ground_density(world, ground_orbitals);\n\n    // Create the masking function\n    mask = real_function_3d(real_factory_3d(world).f(mask3).initial_level(4).norefine());\n    // dconv defaults to thresh*100, overrirde by providing dconv in input\n    // file\n    if (r_params.dconv_set() == false) {\n        r_params.set_derived_value<double>(\"dconv\", thresh * 100);\n    }\n\n    // Basic print\n    if (world.rank() == 0) {\n        print(\"\\nSolving NDIM=\", NDIM, \" with thresh\", thresh, \"    k\",\n              FunctionDefaults<NDIM>::get_k(), \"  dconv\", std::max(thresh, r_params.dconv()), \"\\n\");\n    }\n}\n\nvoid TDDFT::check_k(World& world, double thresh, size_t k) {\n    // Boolean to redo ground hamiltonian calculation if\n    // ground state orbitals change\n    bool redo = false;\n\n    // Verify ground state orbitals have correct k\n    if (FunctionDefaults<3>::get_k() != ground_orbitals[0].k()) {\n        // Re-read orbitals from the archive (assuming\n        // the archive has orbitals stored at a higher\n        // k value than what was previously computed\n        // with)\n        g_params.read(world);\n        reconstruct(world, ground_orbitals);\n\n        // Reset correct k (its set in g_params.read)\n        FunctionDefaults<3>::set_k(k);\n\n        // Project each ground state to correct k\n        for (unsigned int i = 0; i < ground_orbitals.size(); i++)\n            ground_orbitals[i] =\n                    project(ground_orbitals[i], FunctionDefaults<3>::get_k(), thresh, false);\n        world.gop.fence();\n\n        // Clean up a bit\n        truncate(world, ground_orbitals);\n        rho0 = make_ground_density(world, ground_orbitals);\n\n        // Ground state orbitals changed, clear old hamiltonian\n        redo = true;\n    }\n\n    // Recalculate ground state hamiltonian here\n    if (redo or !hamiltonian.has_data()) {\n        hamiltonian = CreateGroundHamiltonian(world, ground_orbitals, r_params.print_level());\n    }\n\n    // If we stored the potential, check that too\n    if (r_params.store_potential()) {\n        if (FunctionDefaults<3>::get_k() != stored_potential[0][0].k()) {\n            // Project the potential into correct k\n            for (unsigned int i = 0; i < stored_potential.size(); i++) {\n                reconstruct(world, stored_potential[i]);\n                for (unsigned int j = 0; j < stored_potential[0].size(); j++)\n                    stored_potential[i][j] = project(stored_potential[i][j],\n                                                     FunctionDefaults<3>::get_k(), thresh, false);\n                world.gop.fence();\n            }\n        }\n        if (FunctionDefaults<3>::get_k() != stored_v_coul.k())\n            stored_v_coul = project(stored_v_coul, FunctionDefaults<3>::get_k(), thresh, false);\n        if (FunctionDefaults<3>::get_k() != stored_v_nuc.k())\n            stored_v_nuc = project(stored_v_nuc, FunctionDefaults<3>::get_k(), thresh, false);\n    }\n\n    // Verify response functions have correct k\n    if (Chi.X.size() != 0) {\n        if (FunctionDefaults<3>::get_k() != Chi.X[0].at(0).k()) {\n            for (auto& xi: Chi.X) {\n                reconstruct(world, xi);\n                for (auto& xij: xi) {\n                    xij = project(xij, FunctionDefaults<3>::get_k(), thresh, false);\n                }\n                world.gop.fence();\n            }\n        }\n    }\n    if (Chi.Y.size() != 0) {\n        if (FunctionDefaults<3>::get_k() != Chi.Y[0].at(0).k()) {\n            for (auto& yi: Chi.Y) {\n                reconstruct(world, yi);\n                for (auto& yij: yi) {\n                    yij = project(yij, FunctionDefaults<3>::get_k(), thresh, false);\n                }\n                world.gop.fence();\n            }\n            Chi.truncate();\n        }\n    }\n\n    // Don't forget the mask function as well\n    if (FunctionDefaults<3>::get_k() != mask.k()) {\n        mask = project(mask, FunctionDefaults<3>::get_k(), thresh, false);\n    }\n    // Don't forget right hand side\n\n    // Verify response functions have correct k\n    if (PQ.X.size() != 0) {\n        if (FunctionDefaults<3>::get_k() != PQ.X[0][0].k()) {\n            // Project all x components into correct k\n            for (auto& pi: PQ.X) {\n                reconstruct(world, pi);\n                for (auto& pij: pi) {\n                    pij = project(pij, FunctionDefaults<3>::get_k(), thresh, false);\n                }\n                world.gop.fence();\n            }\n            PQ.X.truncate_rf();\n        }\n    }\n    if (PQ.Y.size() != 0) {\n        if (FunctionDefaults<3>::get_k() != PQ.Y[0][0].k()) {\n            for (auto& qi: PQ.Y) {\n                reconstruct(world, qi);\n                for (auto& qij: qi) {\n                    qij = project(qij, FunctionDefaults<3>::get_k(), thresh, false);\n                }\n                world.gop.fence();\n            }\n        }\n        PQ.Y.truncate_rf();\n    }\n    world.gop.fence();\n}\n// Make sure everything is done before leaving\n\n// Creates random guess functions semi-intelligently(?)\nX_space TDDFT::create_random_guess(\n        World& world,\n        size_t m,                              // m response states\n        size_t n,                              // n ground states\n        std::vector<real_function_3d>& grounds,// guess should have size n\n        Molecule& molecule) {\n    // Basic output\n    if (world.rank() == 0) print(\"   Using a random guess for initial response functions.\\n\");\n\n    // Create empty container and add in randomness\n    X_space f(world, m, n);\n    f.X = add_randomness(world, f.X, 1e3);// noise all over the world\n\n    // Create and apply a centered gaussian on each atom so that the\n    // randomness is localized around the atoms\n    real_function_3d gaus = real_factory_3d(world);\n    for (auto atom: molecule.get_atoms()) {\n        real_function_3d x = real_factory_3d(world).functor(real_functor_3d(\n                new GaussianGuess<3>(atom.get_coords(), 0.01, std::vector<int>{0, 0, 0})));\n        gaus = gaus + x;\n    }\n    f = f * gaus;\n\n    // Project out groundstate from guesses\n    QProjector<double, 3> projector(world, grounds);\n    for (unsigned int i = 0; i < f.num_states(); i++) f.X[i] = projector(f.X[i]);\n\n    // Normalize\n    normalize(world, f.X);\n\n    return f;\n}\n\n// Creates random guess functions semi-intelligently(?)\nstd::vector<real_function_3d> TDDFT::create_random_guess(World& world, size_t m,\n                                                         std::vector<real_function_3d>& grounds,\n                                                         Molecule& molecule) {\n    // Basic output\n    if (world.rank() == 0) print(\"   Using a random guess for initial response functions.\");\n\n    // Create empty container and add in randomness\n    std::vector<real_function_3d> f = zero_functions_compressed<double, 3>(world, m);\n    // create vector of m functions:w\n\n    // Create and apply a centered gaussian on each atom so that the\n    // randomness is localized around the atoms\n    real_function_3d gaus = real_factory_3d(world);\n    for (auto atom: molecule.get_atoms()) {\n        real_function_3d x = real_factory_3d(world).functor(real_functor_3d(\n                new GaussianGuess<3>(atom.get_coords(), 0.01, std::vector<int>{0, 0, 0})));\n        gaus = gaus + x;\n    }\n\n    // Lambda function to add in noise\n    auto lambda = [](const Key<3>& key, Tensor<double>& x) mutable {\n        Tensor<double> y(x.size());\n        y.fillrandom();\n        y.scale(1e3);\n        x = x + y;\n    };\n\n    // Go through each function in f_copy and add in random noise\n    for (unsigned int i = 0; i < f.size(); i++) {\n        // Add in random noise using rng and a the defined lambda function\n        f[i].unaryop(lambda);\n\n        // Apply mask to get boundary condition right\n        f[i] = mask * f[i] * gaus;\n    }\n\n    // Project out groundstate from guesses\n    QProjector<double, 3> projector(world, grounds);\n    for (unsigned int i = 0; i < f.size(); i++) f[i] = projector(f[i]);\n\n    // Normalize\n    for (unsigned int i = 0; i < f.size(); i++) {\n        double norm = f[i].norm2();\n        f[i].scale(1.0 / norm);\n    }\n\n    return f;\n}\n\n// Creates an initial guess function from nwchem output files\nX_space TDDFT::create_nwchem_guess(World& world, size_t m) {\n    // Basic output\n    if (world.rank() == 0)\n        print(\"   Creating an initial guess from NWChem file\", r_params.nwchem_dir());\n\n    // Create empty containers\n    response_space f;\n\n    // Create the nwchem reader\n    slymer::NWChem_Interface nwchem(r_params.nwchem_dir(), std::cout);\n\n    // For parallel runs, silencing all but 1 slymer instance\n    if (world.rank() != 0) {\n        std::ostream dev_null(nullptr);\n        nwchem.err = dev_null;\n    }\n\n    // Read in basis set\n    nwchem.read(slymer::Properties::Basis);\n\n    // Read in the molecular orbital coefficients, energies,\n    // and occupancies\n    nwchem.read(slymer::Properties::MOs | slymer::Properties::Energies |\n                slymer::Properties::Occupancies);\n\n    // Create the nwchem orbitals as madness functions\n    std::vector<real_function_3d> temp1;\n    for (auto basis: slymer::cast_basis<slymer::GaussianFunction>(nwchem.basis_set)) {\n        // Get the center of gaussian as its special point\n        std::vector<coord_3d> centers;\n        coord_3d r;\n        r[0] = basis.get().center[0];\n        r[1] = basis.get().center[1];\n        r[2] = basis.get().center[2];\n        centers.push_back(r);\n\n        // Now make the function\n        temp1.push_back(FunctionFactory<double, 3>(world).functor(\n                std::shared_ptr<FunctionFunctorInterface<double, 3>>(\n                        new slymer::Gaussian_Functor(basis.get(), centers))));\n\n        // Let user know something is going on\n        if (temp1.size() % 10 == 0 and world.rank() == 0)\n            print(\"Created\", temp1.size(), \"functions.\");\n    }\n    if (world.rank() == 0) print(\"Finished creating\", temp1.size(), \"functions.\");\n\n    // Normalize ao's\n    madness::normalize(world, temp1);\n\n    // Transform ao's now\n    std::vector<real_function_3d> temp =\n            madness::transform(world, temp1, nwchem.MOs, FunctionDefaults<3>::get_thresh(), true);\n\n    // Now save the unoccupied orbitals\n    std::vector<real_function_3d> temp2;\n    size_t num_virt = 0;\n    for (size_t i = 0; i < temp1.size(); i++) {\n        if (nwchem.occupancies[i] == 0) {\n            temp2.push_back(temp[i]);\n            num_virt++;\n        }\n    }\n\n    // Create as many vectors of functions as we can from these nwchem\n    // virtual orbitals putting 1 virtual orbital from nwchem per vector\n    for (size_t i = 0; i < std::max(m, num_virt); i++) {\n        // Create the vector to add the new function to\n        std::vector<real_function_3d> v1 =\n                zero_functions_compressed<double, 3>(world, g_params.orbitals().size());\n\n        // Put the \"new\" function into the vector\n        v1[i % v1.size()] = temp2[i];\n\n        // Add vector to return container\n        f.push_back(v1);\n\n        // See if we've made enough functions\n        if (f.size() >= m) break;\n    }\n    if (world.rank() == 0) print(\"Created\", f.size(), \"guess functions from provided NWChem data.\");\n\n    // If not enough functions have been made, start adding symmetry adapted\n    // functions\n    size_t n = f.size();\n\n    // If still not enough functions have been made, add in random guesses\n    if (n < m) {\n        // Tell user the bad news\n        if (world.rank() == 0)\n            print(\"\\n   Only\", n,\n                  \"guess functions were provided by augmenting NWChem \"\n                  \"functions.\\n   \"\n                  \"Augmenting with random functions.\");\n\n        // Create the random guess\n        Molecule mol = g_params.molecule();\n        X_space rand = create_random_guess(world, m - n, n, ground_orbitals, mol);\n\n        // Add to vector of functions\n        for (unsigned int i = 0; i < rand.num_states(); i++) f.push_back(rand.X[i]);\n    }\n\n    // Project out groundstate from guesses\n    QProjector<double, 3> projector(world, ground_orbitals);\n    for (unsigned int i = 0; i < f.size(); i++) f[i] = projector(f[i]);\n\n    // Truncate and normalize\n    f.truncate_rf();\n    normalize(world, f);\n\n    X_space trial(world, f.size(), n);\n    trial.X = f;\n\n    return trial;\n}\n\n\n// Main function, makes sure everything happens in correcct order\n// Solves for response components\nvoid TDDFT::solve_excited_states(World& world) {\n    // Get start time\n    molresponse::start_timer(world);\n\n    // Plotting input orbitals\n    if (r_params.plot_initial()) {\n        if (world.rank() == 0) print(\"\\n   Plotting ground state densities.\\n\");\n        if (r_params.plot_l() > 0.0)\n            do_vtk_plots(world, r_params.plot_pts(), r_params.plot_l(), 0, r_params.num_orbitals(),\n                         molecule, square(world, ground_orbitals), \"ground\");\n        else\n            do_vtk_plots(world, r_params.plot_pts(), r_params.L() / 2.0, 0, r_params.num_orbitals(),\n                         molecule, square(world, ground_orbitals), \"ground\");\n    }\n    // Warm and fuzzy\n    if (world.rank() == 0) {\n        print(\"\\n\\n     Excited State Calculation\");\n        print(\"   ------------------------\");\n    }\n    // Here print the relevant parameters\n    // Ready to iterate!\n    for (unsigned int proto = 0; proto < r_params.protocol().size(); proto++) {\n        // Set defaults inside here\n        set_protocol<3>(world, r_params.protocol()[proto]);\n        j_molresponse[\"protocol_data\"].push_back({});\n        j_molresponse[\"protocol_data\"][proto][\"proto\"] = r_params.protocol()[proto];\n        j_molresponse[\"protocol_data\"][proto][\"iter_data\"] = {};\n\n        // Do something to ensure all functions have same k value\n        check_k(world, r_params.protocol()[proto], FunctionDefaults<3>::get_k());\n\n        if (proto == 0) {\n            if (r_params.restart()) {\n                if (world.rank() == 0) {\n                    print(\"   Restarting from file:\", r_params.restart_file());\n                }\n                load(world, r_params.restart_file());\n                check_k(world, r_params.protocol()[proto], FunctionDefaults<3>::get_k());\n            } else {\n                X_space trial(world, 2 * r_params.num_states(), r_params.num_orbitals());\n                // Create trial functions by...\n                // (Always creating (at least) twice the amount requested for\n                // initial diagonalization)\n                if (world.rank() == 0) print(\"\\n   Creating trial functions.\\n\");\n                if (r_params.random()) {\n                    // Random guess\n                    trial = create_random_guess(world, 2 * r_params.num_states(),\n                                                r_params.num_orbitals(), ground_orbitals, molecule);\n                } else if (r_params.nwchem()) {\n                    // Virtual orbitals from NWChem\n                    trial = create_nwchem_guess(world, 2 * r_params.num_states());\n                } else if (r_params.guess_xyz()) {\n                    // Use a symmetry adapted operator on ground state functions\n                    trial = create_trial_functions2(world, ground_orbitals,\n                                                    r_params.num_orbitals());\n                } else {\n                    trial = create_trial_functions(world, 3 * r_params.num_states(),\n                                                   ground_orbitals, r_params.num_orbitals());\n                }\n\n                // Load balance\n                // Only balancing on x-components. Smart?\n                if (world.size() > 1) {\n                    // Start a timer\n                    if (r_params.num_orbitals() >= 1) molresponse::start_timer(world);\n                    if (world.rank() == 0) print(\"\");// Makes it more legible\n\n                    LoadBalanceDeux<3> lb(world);\n                    for (size_t j = 0; j < r_params.num_states(); j++) {\n                        for (size_t k = 0; k < r_params.num_orbitals(); k++) {\n                            lb.add_tree(trial.X[j][k], lbcost<double, 3>(1.0, 8.0), true);\n                        }\n                    }\n                    for (size_t j = 0; j < r_params.num_orbitals(); j++) {\n                        lb.add_tree(ground_orbitals[j], lbcost<double, 3>(1.0, 8.0), true);\n                    }\n                    FunctionDefaults<3>::redistribute(world, lb.load_balance(2));\n\n                    if (r_params.num_orbitals() >= 1)\n                        molresponse::end_timer(world, \"Load balancing:\");\n                }\n\n                // Project out groundstate from guesses\n                QProjector<double, 3> projector(world, ground_orbitals);\n                for (unsigned int i = 0; i < trial.X.size(); i++)\n                    trial.X[i] = projector(trial.X[i]);\n\n                // Ensure orthogonal guesses\n                for (size_t i = 0; i < 2; i++) {\n                    molresponse::start_timer(world);\n                    // Orthog\n                    trial.X = gram_schmidt(world, trial.X);\n                    molresponse::end_timer(world, \"orthog\");\n\n                    molresponse::start_timer(world);\n                    // Normalize\n                    normalize(world, trial.X);\n                    molresponse::end_timer(world, \"normalize\");\n                }\n\n                // Diagonalize guess\n                if (world.rank() == 0)\n                    print(\"\\n   Iterating trial functions for an improved initial \"\n                          \"guess.\\n\");\n                iterate_guess(world, trial);\n                // Sort\n                sort(world, omega, trial.X);\n                // Basic output\n                if (r_params.num_orbitals() >= 1 and world.rank() == 0) {\n                    print(\"\\n   Final initial guess excitation energies:\");\n                    print(omega);\n                }\n                // Chi = X_space(world, r_params.num_states(), r_params.num_orbitals());\n                // Select lowest energy functions from guess\n                Chi.X = select_functions(world, trial.X, omega, r_params.num_states(),\n                                         r_params.num_orbitals());\n                Chi.Y = response_space(world, r_params.num_states(), r_params.num_orbitals());\n                save(world, r_params.restart_file());\n                trial.clear();\n                // Initial guess for y are zero functions\n            }\n        }\n\n        // Now actually ready to iterate...\n        iterate_excited(world, Chi);\n        if (r_params.save()) save(world, r_params.save_file());\n    }\n\n    // Plot the response function if desired\n    if (r_params.plot()) {\n        // Need to get densities first\n        std::vector<real_function_3d> densities =\n                transition_density(world, ground_orbitals, Chi.X, Chi.Y);\n\n        // For the instance where we don't plot all the orbitals\n        std::vector<real_function_3d> plot_densities;\n        for (size_t i: r_params.plot_data()) { plot_densities.push_back(densities[i]); }\n\n        // Now plot\n        if (world.rank() == 0) print(\"\\n   Plotting response state densities.\\n\");\n        if (r_params.plot_l() > 0.0)\n            do_vtk_plots(world, r_params.plot_pts(), r_params.plot_l(), 0,\n                         r_params.plot_data().size(), molecule, plot_densities, \"response-state\");\n        else\n            do_vtk_plots(world, r_params.plot_pts(), r_params.L(), 0, r_params.plot_data().size(),\n                         molecule, plot_densities, \"response-state\");\n    }\n\n    // Print total time\n    // Precision is set to 10 coming in, drop it to 2\n    std::cout.precision(2);\n    std::cout << std::fixed;\n\n    // Get start time\n    molresponse::end_timer(world, \"total:\");\n}\n\nvoid TDDFT::solve_response_states(World& world) {\n    molresponse::start_timer(world);\n\n    if (r_params.plot_initial()) {\n        if (world.rank() == 0) print(\"\\n   Plotting ground state densities.\\n\");\n        if (r_params.plot_l() > 0.0)\n            do_vtk_plots(world, r_params.plot_pts(), r_params.plot_l(), 0, r_params.num_orbitals(),\n                         molecule, square(world, ground_orbitals), \"ground\");\n        else\n            do_vtk_plots(world, r_params.plot_pts(), r_params.L() / 2.0, 0, r_params.num_orbitals(),\n                         molecule, square(world, ground_orbitals), \"ground\");\n    }\n    // Warm and fuzzy\n    if (world.rank() == 0) {\n        print(\"\\n\\n    Response Calculation\");\n        print(\"   ------------------------\");\n    }\n    auto protocols = r_params.protocol();\n    print(protocols);\n    for (unsigned int proto = 0; proto < protocols.size(); proto++) {\n        // Set defaults inside here\n        // default value of\n        auto thresh = protocols[proto];\n        print(thresh);\n        set_protocol<3>(world, thresh);\n\n        check_k(world, thresh, FunctionDefaults<3>::get_k());\n        // Do something to ensure all functions have same k value\n        j_molresponse[\"protocol_data\"].push_back({});\n        j_molresponse[\"protocol_data\"][proto][\"proto\"] = thresh;//r_params.protocol()[proto];\n        j_molresponse[\"protocol_data\"][proto][\"iter_data\"] = {};\n\n        if (r_params.dipole()) {\n            if (world.rank() == 0) print(\"creating dipole property operator\");\n            p = DipoleVector(world);\n        } else if (r_params.nuclear()) {\n            Molecule molecule = g_params.molecule();\n            if (world.rank() == 0) print(\"creating nuclear property operator\");\n            p = NuclearVector(world, molecule);\n        }\n        if (proto == 0) {\n            if (r_params.restart()) {\n                if (world.rank() == 0)\n                    print(\"   Initial guess from file:\", r_params.restart_file());\n                load(world, r_params.restart_file());\n                check_k(world, thresh, FunctionDefaults<3>::get_k());\n\n                if (r_params.dipole()) {\n                    // set states\n                    PQ.X = PropertyRHS(world, p);\n                    PQ.Y = PQ.X.copy();\n                    print(\"P: \", PQ.X.norm2());\n                    print(\"Q: \", PQ.Y.norm2());\n\n                    // set RHS_Vector\n                } else if (r_params.nuclear()) {\n                    PQ.X = PropertyRHS(world, p);\n                    PQ.Y = PQ.X.copy();\n\n                } else if (r_params.order2()) {\n                    //\n                } else if (r_params.order3()) {\n                    //\n                } else {\n                    MADNESS_EXCEPTION(\"not a valid response state \", 0);\n                }\n            } else {// Dipole guesses\n\n                if (r_params.dipole()) {\n                    PQ.X = PropertyRHS(world, p);\n                    PQ.Y = PQ.X.copy();\n                    // set states\n                    //\n                    print(\"okay this is not a good idea if it comes up more than once\");\n                    // set RHS_Vector\n                } else if (r_params.nuclear()) {\n                    PQ.X = PropertyRHS(world, p);\n                    PQ.Y = PQ.X.copy();\n                } else if (r_params.order2()) {\n                    //\n                } else if (r_params.order3()) {\n                    //\n                } else {\n                    MADNESS_EXCEPTION(\"not a valid response state \", 0);\n                }\n            }\n        }\n        //\n        // Here i should print some information about the calculation we are\n        // about to do\n        print(\"Pre iteration Information\");\n        print(\"Number of Response States: \", r_params.num_states());\n        print(\"Number of Ground States: \", r_params.num_orbitals());\n        print(\"k = \", FunctionDefaults<3>::get_k());\n        print(\"protocol threshold = \", FunctionDefaults<3>::get_k());\n\n        print(\"Property rhs func k = \", PQ.X[0][0].k());\n        print(\"Property func k thresh= \", PQ.X[0][0].thresh());\n\n        print(\"Property rhs func Q k = \", PQ.Y[0][0].k());\n        print(\"Property func Q k thresh = \", PQ.Y[0][0].thresh());\n\n        print(\"Property rhs func P norms\", PQ.X.norm2());\n        print(\"Property rhs func Q norms\", PQ.Y.norm2());\n\n        if (proto > 0) { r_params.set_derived_value<bool>(\"first_run\", false); }\n        // Now actually ready to iterate...\n        // iterate_freq(world);\n        iterate_freq2(world);\n        // IterateFrequencyResponse(world, P, Q);\n    }// end for --finished reponse density\n\n    // Plot the response function if desired\n    if (r_params.plot()) {\n        // Need to get densities first\n        std::vector<real_function_3d> densities =\n                transition_density(world, ground_orbitals, Chi.X, Chi.Y);\n\n        // For the instance where we don't plot all the orbitals\n        std::vector<real_function_3d> plot_densities;\n        for (size_t i: r_params.plot_data()) { plot_densities.push_back(densities[i]); }\n\n        // Now plot\n        if (world.rank() == 0) print(\"\\n   Plotting response state densities.\\n\");\n        if (r_params.plot_l() > 0.0)\n            do_vtk_plots(world, r_params.plot_pts(), r_params.plot_l(), 0,\n                         r_params.plot_data().size(), molecule, plot_densities, \"response-state\");\n        else\n            do_vtk_plots(world, r_params.plot_pts(), r_params.L(), 0, r_params.plot_data().size(),\n                         molecule, plot_densities, \"response-state\");\n    }\n\n    // Print total time\n    // Precision is set to 10 coming in, drop it to 2\n    // Have response function, now calculate polarizability for this axis\n    // polarizability(world, polar_tensor);\n    // PrintPolarizabilityAnalysis(world, polar_tensor, omega);\n\n    // Print total time\n    // Precision is set to 10 coming in, drop it to 2\n    std::cout.precision(2);\n    std::cout << std::fixed;\n\n    // Get start time\n    molresponse::end_timer(world, \"total:\");\n}// end compute frequency response\n"
  },
  {
    "path": "src/apps/molresponse/details.md",
    "content": "## Overview of `molresponse`\n\n`molresponse` is a multiresolution solver designed to compute response properties and excited states of molecular systems.  Solver computes response states starting with a `moldft` calculation, which provides the ground state of the system\n\n## Computing Frequency-Dependent Response with `FrequencyResponse` class\n\nIn `molresponse`, the computation of frequency-dependent response properties is achieved by solving the coupled response equations in integral form:\n\n$$\\boldsymbol{X}=\\boldsymbol{G(\\omega_a)}\\star[\\boldsymbol{VX}+\\boldsymbol{P}]$$\n\nHere's a breakdown of the variables involved:\n\n- $\\boldsymbol{X}$: The response vector containing the transition functions.\n- $\\boldsymbol{G(\\omega_a)}$: The Green's function.\n- $\\boldsymbol{V}$: The potential.\n- $\\boldsymbol{P}$: The perturbation operator (e.g., dipole, nuclear, second-order).\n- $\\omega_a$: The frequency of the perturbation.\n\nTherefore, response calculation is parameterized by:\n\n1. The ground state calculation with molecular geometry, ground state orbitals, and orbital energies.\n2. The perturbation operator.\n3. The frequency of the perturbation.\n\nThe solver iteratively computes the response vector, starting from an initial $\\boldsymbol{X}$, until convergence is reached. Convergence is determined by the bsh residuals of the response vectors and the change in the response density, both falling below defined thresholds.\nWith convergence, the response vectors are used to computed the frequency-dependent response properties.\n\n### Understanding the `X_space` class\n\nThe `X_Space` class is a fundamental component in molresponse as it encapsulates all response vectors computed in a response calculation. The solver is capable of solvin multiple perturbations at the same time.\n\n```cpp\n    struct X_space {\n        size_t n_states;  // Num. of resp. states\n        size_t n_orbitals;// Num. of ground states\n        response_space x, y;// x and y transition functions    };\n```\n\n- `n_states`: This represents the number of response states. The actual number is defined by the type of perturbation used.\n\n- `n_orbitals`: This refers to the number of ground state orbitals present in the system.\n\n- `response_space x, y`: These are structures that hold the x and y transition functions, respectively. These functions are central to how the system responds to external perturbations.\n\n___\n\n## Solving for **X**\n\nTo find X, we iterate the X_Space object through the FrequencyResponse class.\n\nBelow is the constructor for the FrequencyResponse class. It takes the frequency and the RHS_Generator (representing the perturbation operator) as inputs:\n\n```cpp\n FrequencyResponse calc(World &world, const CalcParams &params, double frequency,RHS_Generator rhs);\n```\n\nKey parameters:\n\n- 'const CalcParams &params': Encapsulates the parameters for the calculation. This include molecular geometry and ground state orbitals.\n- 'double frequency': The frequency of the perturbation.\n- 'RHS_Generator rhs': The perturbation operator.\n\n---\n\n## Choosing the Perturbation  `RHS_Generator`\n\nCurrently, `molresponse` supports two options for the Right Hand Side (RHS) vector generation:\n\n```cpp\nX_space dipole_generator(World &world, FrequencyResponse &calc);\nX_space nuclear_generator(World &world, FrequencyResponse &calc);\n```\n\n**Option 1: Dipole Generator**\n\n- The `dipole_generator` creates the RHS vector for the dipole operator.\n- It generates the x, y, and z components of the dipole operator.\n- Consequently, the dimension of `X_space` becomes `3 x num_orbitals`.\n- To use it, set the `dipole` flag to `True` in the input file\n\n**Option 2: Nuclear Generator**\n\n- The `nuclear_generator` generates the RHS vector for the nuclear derivative operators.\n- It is still under development and hasn't been thoroughly tested, so use with caution.\n"
  },
  {
    "path": "src/apps/molresponse/global_functions.cc",
    "content": "#include \"global_functions.h\"\n\n#include <ResponseBase.hpp>\n#include <memory>\n\n#include \"madness/chem/SCFOperators.h\"\n#include \"response_parameters.h\"\n\nstatic auto set_poisson(World &world, const double lo, const double econv = FunctionDefaults<3>::get_thresh())\n{\n    return std::shared_ptr<real_convolution_3d>(CoulombOperatorPtr(world, lo, econv));\n}\n\nauto initialize_calc_params(World &world, const std::string &input_file) -> CalcParams\n{\n    ResponseParameters r_params{};\n    commandlineparser parser;\n    parser.set_keyval(\"input\", input_file);\n    r_params.read_input_and_commandline_options(world, parser, \"response\");\n    GroundStateCalculation ground_calculation{world, r_params.archive()};\n    Molecule molecule = ground_calculation.molecule();\n    r_params.set_ground_state_calculation_data(ground_calculation);\n    r_params.set_derived_values(world, molecule);\n    world.gop.fence();\n    return {ground_calculation, molecule, r_params};\n}\n// TODO some operator definitions that I will need to move to a separate file\nauto T(World &world, response_space &f) -> response_space\n{\n    response_space T; // Fock = (T + V) * orbitals\n    real_derivative_3d Dx(world, 0);\n    real_derivative_3d Dy(world, 1);\n    real_derivative_3d Dz(world, 2);\n    // Apply derivatives to orbitals\n    f.reconstruct_rf();\n    response_space dvx = apply(world, Dx, f);\n    response_space dvy = apply(world, Dy, f);\n    response_space dvz = apply(world, Dz, f);\n    // Apply again for 2nd derivatives\n    response_space dvx2 = apply(world, Dx, dvx);\n    response_space dvy2 = apply(world, Dy, dvy);\n    response_space dvz2 = apply(world, Dz, dvz);\n    T = (dvx2 + dvy2 + dvz2) * (-0.5);\n    return T;\n}\n\n// compute exchange |i><i|J|p>\n/**\n * Computes ground density exchange on response vectors\n *  This algorithm places all functions in a single vector,\n *  computes exchange and returns the result into a response\n *  matrix\n *\n * @param v1\n * @param v2\n * @param f\n * @return\n */\nauto ground_exchange(const vecfuncT &phi0, const X_space &x, const bool compute_y) -> X_space\n{\n    World &world = phi0[0].world();\n    molresponse::start_timer(world);\n    auto num_states = x.num_states();\n    auto num_orbitals = x.num_orbitals();\n    X_space K0 = X_space::zero_functions(world, x.num_states(), x.num_orbitals());\n    long n{};\n    response_matrix xx;\n    // place all x and y functions into a single response vector\n    if (compute_y)\n    {\n        n = 2;\n        xx = to_response_matrix(x);\n        // place all x\n    }\n    else\n    {\n        n = 1;\n        xx = x.x.x;\n        // if not compute y we are only working with the x functions\n    }\n    auto n_exchange = n * num_states * num_orbitals * num_orbitals;\n    // should have num_states * num_orbitals * n  if compute y  n=2 else n=1\n    vecfuncT x_vector(n_exchange);\n    long b_index = 0;\n    long p_index = 0;\n    long p = 0;\n    for (long b = 0; b < num_states; b++)\n    {\n        b_index = b * num_orbitals * num_orbitals * n;\n        p = 0;\n        // for each function in a response vector copy num orbital times\n        std::for_each(xx[b].begin(), xx[b].end(), [&](const auto &xb_p)\n                      {\n            p_index = p * num_orbitals;\n            for (long j = 0; j < num_orbitals; j++) { x_vector.at(b_index + p_index + j) = copy(xb_p, false); }\n            p++; });\n    }\n    vecfuncT phi1(n_exchange);\n    vecfuncT phi2(n_exchange);\n    int orb_i = 0;\n    // copy ground-state orbitals into a single long vector\n    std::for_each(phi1.begin(), phi1.end(), [&](auto &phi_i)\n                  { phi_i = copy(phi0[orb_i++ % num_orbitals]); });\n    world.gop.fence();\n    phi2 = madness::copy(world, phi1);\n    world.gop.fence();\n    molresponse::end_timer(world, \"ground exchange copy\");\n    auto K = molresponseExchange(world, phi1, phi2, x_vector, n, num_states, num_orbitals);\n    if (world.rank() == 0)\n    {\n        print(\"made it out of molresponseExchange\");\n    }\n    return K;\n}\n// compute full response exchange |i><i|J|p>\n/**\n * Computes ground density exchange on response vectors\n *  This algorithm places all functions in a single vector,\n *  computes exchange and returns the result into a response\n *  matrix\n *\n * @param v1\n * @param v2\n * @param f\n * @return\n */\nauto response_exchange(const vecfuncT &phi0, const X_space &x, const bool compute_y) -> X_space\n{\n    World &world = phi0[0].world();\n    molresponse::start_timer(world);\n    auto num_states = x.num_states();\n    auto num_orbitals = x.num_orbitals();\n    X_space K1 = X_space(world, num_states, num_orbitals);\n    X_space K2 = X_space(world, num_states, num_orbitals);\n    X_space K = X_space(world, num_states, num_orbitals);\n\n    long n = compute_y ? 2 : 1;\n    auto n_exchange = n * num_states * num_orbitals * num_orbitals;\n    vecfuncT phi_right(n_exchange);\n    long b_index = 0;\n    long p_index = 0;\n    long p = 0;\n    // 111 222 333 111 222 333 111 222 333 111 222 333\n    for (long b = 0; b < num_states; b++)\n    {\n        b_index = n * b * num_orbitals * num_orbitals;\n        p = 0;\n        std::for_each(phi0.begin(), phi0.end(), [&](const auto &phi_p)\n                      {\n            p_index = num_orbitals * p;\n            for (long j = 0; j < num_orbitals; j++) { phi_right.at(b_index + p_index + j) = copy(phi_p, false); }\n            p++; });\n        if (compute_y)\n        {\n            p = 0;\n            std::for_each(phi0.begin(), phi0.end(), [&](const auto &phi_p)\n                          {\n                p_index = num_orbitals * p;\n                for (long j = 0; j < num_orbitals; j++) { phi_right.at(num_orbitals * num_orbitals + b_index + p_index + j) = copy(phi_p, false); }\n                p++; });\n        }\n    }\n    world.gop.fence();\n\n    vecfuncT x_vector(n_exchange);\n    vecfuncT x_vector_conjugate(n_exchange);\n    for (long b = 0; b < num_states; b++)\n    { // for each state copy the vector n times\n        b_index = b * num_orbitals * num_orbitals * n;\n        for (long j = 0; j < num_orbitals; j++)\n        {\n            p_index = j * num_orbitals;\n            std::transform(x.x[b].begin(), x.x[b].end(), x_vector.begin() + b_index + p_index, [&](const auto &xbi)\n                           { return copy(xbi, false); });\n\n            std::transform(x.y[b].begin(), x.y[b].end(), x_vector_conjugate.begin() + b_index + p_index, [&](const auto &xbi)\n                           { return copy(xbi, false); });\n        }\n        if (compute_y)\n        {\n            long y_shift = num_orbitals * num_orbitals;\n            for (long j = 0; j < num_orbitals; j++)\n            {\n                p_index = j * num_orbitals;\n                std::transform(x.y[b].begin(), x.y[b].end(), x_vector.begin() + b_index + p_index + y_shift, [&](const auto &ybi)\n                               { return copy(ybi, false); });\n                std::transform(x.x[b].begin(), x.x[b].end(), x_vector_conjugate.begin() + b_index + p_index + y_shift,\n                               [&](const auto &ybi)\n                               { return copy(ybi, false); });\n            }\n        }\n    }\n    world.gop.fence();\n\n    vecfuncT phi_left(n_exchange);\n    for (long b = 0; b < num_states; b++)\n    {\n        b_index = b * num_orbitals * num_orbitals * n;\n        for (long p = 0; p < n * num_orbitals; p++)\n        {\n            p_index = p * num_orbitals;\n            for (int i = 0; i < num_orbitals; i++)\n            {\n                phi_left[b_index + p_index + i] = copy(phi0[i], false);\n            }\n        }\n    }\n    world.gop.fence();\n    molresponse::end_timer(world, \"response exchange copy\");\n\n    molresponse::start_timer(world);\n    K1 = molresponseExchange(world, x_vector, phi_left, phi_right, n, num_states, num_orbitals);\n    world.gop.fence();\n    K2 = molresponseExchange(world, phi_left, x_vector_conjugate, phi_right, n, num_states, num_orbitals);\n    world.gop.fence();\n    /*\n    auto xk1 = inner(x, K1);\n    if (world.rank() == 0) { print(\"new xk1\\n\", xk1); }\n    auto xk2 = inner(x, K2);\n    if (world.rank() == 0) { print(\"new xk2\\n\", xk2); }\n     */\n    K = K1 + K2;\n    world.gop.fence();\n    molresponse::end_timer(world, \"response exchange K1+K2 \");\n    return K;\n}\n// compute exchange |i><i|J|p>\nauto newK(const vecfuncT &ket, const vecfuncT &bra, const vecfuncT &vf) -> vecfuncT\n{\n    World &world = ket[0].world();\n    const double lo = 1.e-10;\n\n    Exchange<double, 3> op{world, lo};\n    op.set_bra_and_ket(bra, ket);\n    op.set_algorithm(op.multiworld_efficient);\n    auto vk = op(vf);\n    return vk;\n}\n// sum_i |i><i|J|p> for each p\nauto molresponseExchange(World &world, const vecfuncT &ket_i, const vecfuncT &bra_i, const vecfuncT &fp, const int &n, const int &num_states,\n                         const int &num_orbitals) -> X_space\n{\n    molresponse::start_timer(world);\n    reconstruct(world, ket_i, false);\n    reconstruct(world, bra_i, false);\n    reconstruct(world, fp, false);\n    if (world.rank() == 0)\n    {\n        print(\"exchange reconstruct tree\");\n    }\n    world.gop.fence();\n    /*\n    norm_tree(world, ket_i, false);\n    norm_tree(world, bra_i, false);\n    norm_tree(world, fp, false);\n     */\n    if (world.rank() == 0)\n    {\n        print(\"exchange norm tree\");\n    }\n    const double lo = 1.0e-10;\n    auto tol = FunctionDefaults<3>::get_thresh();\n    auto poisson = set_poisson(world, lo);\n    world.gop.fence();\n    if (world.rank() == 0)\n    {\n        print(\"create poisson v23\");\n    }\n    auto v23 = mul(world, bra_i, fp, true);\n    // mul(world, bra_i, fp, true);\n    if (world.rank() == 0)\n    {\n        print(\"multiply v23\");\n    }\n    truncate(world, v23, tol, true);\n    // truncate\n    if (world.rank() == 0)\n    {\n        print(\"truncate v23\");\n    }\n    v23 = apply(world, *poisson, v23);\n    if (world.rank() == 0)\n    {\n        print(\"apply v23\");\n    }\n    truncate(world, v23, tol, true);\n    if (world.rank() == 0)\n    {\n        print(\"truncate after apply v23\");\n    }\n    auto v123 = mul(world, ket_i, v23, true);\n    if (world.rank() == 0)\n    {\n        print(\"multiply  apply v123\");\n    }\n    const long n_exchange{num_states * n * num_orbitals};\n    auto exchange_vector = vecfuncT(n_exchange);\n    long b = 0;\n    long b_shift = 0;\n    compress(world, v123);\n    for (auto &kij : exchange_vector)\n    {\n        b_shift = b * num_orbitals;\n        auto phi_phiX_i = vecfuncT(num_orbitals);\n        // this right here is a sketch of how sums with iterators could work\n        kij = FunctionFactory<double, 3>(world).compressed();\n        std::for_each(v123.begin() + b_shift, v123.begin() + b_shift + num_orbitals, [&](const auto &v123_i)\n                      { kij.gaxpy(1.0, v123_i, 1.0, false); });\n        b++;\n    }\n    world.gop.fence();\n    if (world.rank() == 0)\n        print(\"exchange sum\");\n    truncate(world, exchange_vector, tol, true);\n    molresponse::end_timer(world, \"exchange apply\");\n\n    molresponse::start_timer(world);\n    auto exchange_matrix = create_response_matrix(num_states, n * num_orbitals);\n    b = 0;\n    for (auto &xi : exchange_matrix)\n    {\n        for (auto &xij : xi)\n        {\n            xij = copy(exchange_vector[b++]);\n        }\n    }\n    X_space K0 = X_space::zero_functions(world, num_states, num_orbitals);\n    if (n == 2)\n    {\n        K0 = to_X_space(exchange_matrix);\n    }\n    else\n    {\n        K0.x = exchange_matrix;\n    }\n    world.gop.fence();\n    molresponse::end_timer(world, \"ground exchange reorganize\");\n    return K0;\n}\nauto make_k(const vecfuncT &ket, const vecfuncT &bra, const ResponseParameters &r_params)\n{\n    const double lo = 1.e-10;\n    auto &world = ket[0].world();\n    Exchange<double, 3> k{world, lo};\n    k.set_bra_and_ket(bra, ket);\n    if (r_params.hfexalg() == \"multiworld\")\n    {\n        k.set_algorithm(madness::Exchange<double, 3>::multiworld_efficient);\n    }\n    else if (r_params.hfexalg() == \"multiworld_row\")\n    {\n        k.set_algorithm(madness::Exchange<double, 3>::multiworld_efficient_row);\n    }\n    else if (r_params.hfexalg() == \"smallmem\")\n    {\n        k.set_algorithm(madness::Exchange<double, 3>::small_memory);\n    }\n    else if (r_params.hfexalg() == \"largemem\")\n    {\n        k.set_algorithm(madness::Exchange<double, 3>::large_memory);\n    };\n    return k;\n}\n/**\n * Computes ground density exchange on response vectors\n *  This algorithm places all functions in a single vector,\n *  computes exchange and returns the result into a response\n *  matrix\n *\n * @param v1\n * @param v2\n * @param f\n * @return\n */\nauto response_exchange(const vecfuncT &phi0, const X_space &chi, const bool &compute_y, const ResponseParameters &r_params) -> X_space\n{\n    World &world = phi0[0].world();\n    molresponse::start_timer(world);\n    auto num_states = chi.num_states();\n    auto num_orbitals = chi.num_orbitals();\n    auto K = X_space::zero_functions(world, num_states, num_orbitals);\n    vector_real_function_3d k1x, k1y, k2x, k2y;\n\n    if (compute_y)\n    {\n        for (const auto &b : chi.active)\n        {\n            auto x = chi.x[b];\n            auto y = chi.y[b];\n            auto K1X = make_k(x, phi0, r_params);\n            auto K2X = make_k(y, phi0, r_params);\n            auto K1Y = make_k(phi0, y, r_params);\n            auto K2Y = make_k(phi0, x, r_params);\n            k1x = K1X(phi0);\n            k1y = K1Y(phi0);\n            k2x = K2X(phi0);\n            k2y = K2Y(phi0);\n            world.gop.fence();\n            K.x[b] = gaxpy_oop(1.0, k1x, 1.0, k1y, false);\n            K.y[b] = gaxpy_oop(1.0, k2x, 1.0, k2y, false);\n            world.gop.fence();\n        }\n    }\n    else\n    {\n        for (const auto &b : chi.active)\n        {\n            auto x = chi.x[b];\n            auto y = chi.x[b];\n            auto K1X = make_k(x, phi0, r_params);\n            auto K1Y = make_k(phi0, y, r_params);\n            k1x = K1X(phi0);\n            k1y = K1Y(phi0);\n            K.x[b] = gaxpy_oop(1.0, k1x, 1.0, k1y, true);\n        }\n    }\n    return K;\n}\n\n// sum_i |i><i|J|p> for each p\n/**\n * Computes ground density exchange on response vectors\n *  This algorithm places all functions in a single vector,\n *  computes exchange and returns the result into a response\n *  matrix\n *\n * @param v1\n * @param v2\n * @param f\n * @return\n */\nauto ground_exchange(const vecfuncT &phi0, const X_space &chi, const bool &compute_y, const ResponseParameters &r_params) -> X_space\n{\n    World &world = phi0[0].world();\n    molresponse::start_timer(world);\n\n    auto num_states = chi.num_states();\n    auto num_orbitals = chi.num_orbitals();\n\n    auto K0 = X_space::zero_functions(world, num_states, num_orbitals);\n    K0.set_active(chi.active);\n    // the question is copying pointers mpi safe\n    world.gop.fence();\n    auto k0 = make_k(phi0, phi0, r_params);\n    if (compute_y)\n    {\n        for (const auto &i : chi.active)\n        {\n            K0.x[i] = k0(chi.x[i]);\n            K0.y[i] = k0(chi.y[i]);\n        }\n    }\n    else\n    {\n        for (const auto &i : chi.active)\n        {\n            K0.x[i] = k0(chi.x[i]);\n        }\n        K0.y = K0.x.copy();\n    }\n    K0.truncate();\n    return K0;\n};\n"
  },
  {
    "path": "src/apps/molresponse/global_functions.h",
    "content": "#ifndef SRC_APPS_molresponse_GLOBAL_FUNCTIONS_H_\n#define SRC_APPS_molresponse_GLOBAL_FUNCTIONS_H_\n\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"response_parameters.h\"\n\n\n\n\n\nstruct CalcParams {\n    GroundStateCalculation ground_calculation;\n    Molecule molecule;\n    ResponseParameters response_parameters;\n};\nvoid print_molecule(World &world, const GroundStateCalculation &g_params);\nclass plotCoords {\npublic:\n    coord_3d lo, hi;\n\n    plotCoords() {\n        lo[0] = 0.0;\n        lo[1] = 0.0;\n        lo[2] = 0.0;\n        hi[0] = 0.0;\n        hi[1] = 0.0;\n        hi[2] = 0.0;\n    }\n    plotCoords(size_t direction, double Lp) {\n        lo[0] = 0.0;\n        lo[1] = 0.0;\n        lo[2] = 0.0;\n\n        hi[0] = 0.0;\n        hi[1] = 0.0;\n        hi[2] = 0.0;\n\n        lo[direction] = -Lp;\n        hi[direction] = Lp;\n    }\n};\nplotCoords SetPlotCoord(size_t i, double Lp);\n\nCalcParams initialize_calc_params(World &world, const std::string &input_file);\n// kinetic energy operator on response vector\nresponse_space T(World &world, response_space &f);\n\nauto make_k(const vecfuncT &ket, const vecfuncT &bra, const ResponseParameters &r_params);\nauto ground_exchange(const vecfuncT &phi0, const X_space &x, bool compute_y) -> X_space;\nauto ground_exchange(const vecfuncT &phi0, const X_space &chi, const bool &compute_y, const ResponseParameters &r_params) -> X_space;\nauto response_exchange(const vecfuncT &phi0, const X_space &x, bool compute_y) -> X_space;\nvecfuncT K(vecfuncT &ket, vecfuncT &bra, vecfuncT &vf);\nauto molresponseExchange(World &world, const vecfuncT &ket_i, const vecfuncT &bra_i,\n                         const vecfuncT &fp, const int &n, const int &num_states,\n                         const int &num_orbitals) -> X_space;\nauto response_exchange_multiworld(const vecfuncT &phi0, const X_space &chi, const bool &compute_y)\n        -> X_space;\nvecfuncT newK(const vecfuncT &ket, const vecfuncT &bra, const vecfuncT &vf);\n// compute exchange |i><i|J|p>\nstatic double rsquared(const coord_3d &r) { return r[0] * r[0] + r[1] * r[1] + r[2] * r[2]; }\n/// Mask function to switch from 0 to 1 smoothly at boundary\n#endif// SRC_APPS_molresponse_GLOBAL_FUNCTIONS_H_\n"
  },
  {
    "path": "src/apps/molresponse/ground_parameters.h",
    "content": "\n/// \\file GroundStateCalculation\n/// \\brief Input parameters for a response calculation, read from a specified\n/// archive.\n\n#ifndef MADNESS_APPS_GROUNDPARAMS_H_INCLUDED\n#define MADNESS_APPS_GROUNDPARAMS_H_INCLUDED\n\n#include <utility>\n\n#include \"../chem/molecule.h\"\n#include \"Plot_VTK.h\"\n#include \"basic_operators.h\"\n#include \"madness/chem/NWChem.h\"  // For nwchem interface\n#include \"madness/chem/SCFOperators.h\"\n#include \"madness/chem/pointgroupsymmetry.h\"\n#include \"madness/chem/potentialmanager.h\"\n#include \"madness/chem/projector.h\"  // For easy calculation of (1 - \\hat{\\rho}^0)\n#include \"madness/mra/funcdefaults.h\"\n#include \"madness/mra/functypedefs.h\"\n#include \"madness/tensor/tensor.h\"\n\nusing namespace madness;\n\nclass GroundStateCalculation {\n    // Ground state parameters that are read in from archive\n    std::string inFile{\"../moldft.restartdata\"};///< Name of input archive to read in ground state\n    bool spinrestricted{true};///< Indicates if ground state calc. was open or closed shell\n    unsigned int num_orbitals{};///< Number of orbitals in ground state\n    Tensor<double> energies{};  ///< Energy of ground state orbitals\n    Tensor<double> occ{};       ///< Occupancy of ground state orbitals\n    double L{};                 ///< Box size of ground state - response calcluation is in same box\n    int k{};                    ///< Order of polynomial used in ground state\n    Molecule molecule_in{};     ///< The molecule used in ground state calculation\n    std::vector<real_function_3d> g_orbitals{};///< The ground state orbitals\n    std::string xc{};                          ///< Name of xc functional used in ground state\n    std::string localize_method{};             ///< Name of localization method used in ground state\n    double converged_for_thresh{}; ///< Convergence threshold used in ground state calculation\n\n  // Default constructor\n public:\n  explicit GroundStateCalculation(World& world) { read(world); }\n\n  explicit GroundStateCalculation(World& world, std::string input_file)\n      : inFile{std::move(input_file)} {\n    read(world);\n  }\n\n  GroundStateCalculation(const GroundStateCalculation& other) = default;\n\n  bool is_spinrestricted() const { return spinrestricted; }\n\n  unsigned int n_orbitals() const { return num_orbitals; }\n\n  Tensor<double> get_energies() const { return energies; }\n\n  Tensor<double> get_occ() const { return occ; }\n\n  Molecule molecule() const { return molecule_in; }\n\n  double get_L() const { return L; }\n\n  int get_k() const { return k; }\n\n  vector_real_function_3d& orbitals() { return g_orbitals; }\n\n  std::string get_xc() const { return xc; }\n  std::string get_localize_method() const { return localize_method; }\n\n  std::string get_archive() const { return xc; }\n\n  // Initializes ResponseParameters using the contents of file \\c filename\n  void read(World& world) {\n    // Save the filename\n\n    unsigned int dummyversion;\n    double dummy1;\n    std::vector<int> dummy2;\n    archive::ParallelInputArchive input(world, inFile.c_str());\n    input & dummyversion;\n    input & dummy1;           // double\n    input & spinrestricted;   // bool\n    input & L;                // double            box size\n    input & k;                // int               wavelet order\n    input & molecule_in;      // Molecule\n    input & xc;               // std:string        xc functional\n    input & localize_method;  // std:string        localize  method\n    if (dummyversion > 3) {\n      input & converged_for_thresh;\n    }\n    input & num_orbitals;  // int\n    input & energies;      // Tensor<double>    orbital energies\n    input & occ;           // Tensor<double>    orbital occupations\n    input & dummy2;        // std::vector<int>  sets of orbitals(?)\n\n    // Check that order is positive and less than 30\n    if (k < 1 or k > 30) {\n      if (world.rank() == 0)\n        print(\n            \"\\n   ***PLEASE NOTE***\\n   Invalid wavelet order read from \"\n            \"archive, setting to 8.\\n   This seems to happen when the default \"\n            \"wavelet order is used in moldft.\");\n      k = 8;\n    }\n    // Set this so we can read in whats\n    // written in the archive\n    FunctionDefaults<3>::set_k(k);\n    // Possible to call this function multiple times now\n    // Do this to ensure everything works.\n    world.gop.fence();\n    g_orbitals.clear();\n    world.gop.fence();\n    // Read in ground state orbitals\n    for (unsigned int i = 0; i < num_orbitals; i++) {\n      real_function_3d reader;\n      input & reader;\n      g_orbitals.push_back(reader);\n    }\n    world.gop.fence();\n    //projector_irrep c2v(\"c2v\");\n    //g_orbitals = c2v(g_orbitals);\n    // Clean up\n    truncate(world, g_orbitals);\n  }\n\n  // Prints all information\n  void print_params() const {\n    madness::print(\"\\n     Ground State Parameters\");\n    madness::print(\"     -----------------------\");\n    madness::print(\"    Ground State Archive:\", inFile);\n    madness::print(\" Ground State Functional:\", xc);\n    madness::print(\" Localize Method  Functional:\", localize_method);\n    madness::print(\"         Spin Restricted:\", spinrestricted);\n    madness::print(\"      Number of orbitals:\", num_orbitals);\n    madness::print(\"                       L:\", L);\n    madness::print(\"           Wavelet Order:\", k);\n    madness::print(\"        Orbital Energies:\", energies);\n  }\n};\n\n#endif\n"
  },
  {
    "path": "src/apps/molresponse/molresponse.cc",
    "content": "/*\nstatic json g_inner_contributions = json::object();\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file molresponse.cc\n/// \\brief Molecular Response DFT code\n/// \\defgroup molresponse The molecular density funcitonal response code\n#include <madness/chem/SCF.h>\n#include <madness/world/worldmem.h>\n\n#include \"ExcitedResponse.hpp\"\n#include \"FrequencyResponse.hpp\"\n// #include \"ResponseExceptions.hpp\"\n\n#if defined(HAVE_SYS_TYPES_H) && defined(HAVE_SYS_STAT_H) && defined(HAVE_UNISTD_H)\n\n#include <sys/stat.h>\n\nstatic inline int file_exists(const char *inpname) {\n    struct stat buffer {};\n    size_t rc = stat(inpname, &buffer);\n    return (rc == 0);\n}\n\n#endif\n\nusing namespace madness;\n\nint main(int argc, char **argv) {\n    World &world = madness::initialize(argc, argv);\n    startup(world, argc, argv, true);\n    if (world.rank() == 0) {\n        print_header1(\"MOLRESPONSE -- MADNESS Time-Dependent Density Functional \"\n                      \"Theory Excited-State Program \");\n    }\n\n    //    sleep(10);\n    int result = 0;\n    std::cout.precision(6);\n    std::string filename = \"response.in\";\n\n    commandlineparser parser(argc, argv);\n\n    if (parser.key_exists(\"help\")) {\n        FrequencyResponse::help();\n    } else if (parser.key_exists(\"print_parameters\")) {\n        FrequencyResponse::print_parameters();\n    } else {\n\n        molresponse::start_timer(world);\n        // try catch would start here\n        try {\n            auto calc_params = initialize_calc_params(world, filename);\n            if (calc_params.response_parameters.excited_state()) {\n\n                ExcitedResponse calc(world, calc_params);\n                if (world.rank() == 0) {\n                    print(\"\\n\\n\");\n                    print(\" MADNESS Time-Dependent Density Functional Theory Excited-State \"\n                          \"Program\");\n                    print(\" ----------------------------------------------------------\\n\");\n                    print(\"\\n\");\n                    calc_params.molecule.print();\n                    print(\"\\n\");\n                    calc_params.response_parameters.print(\"response\");\n                    // put the response parameters in a j_molrespone json object\n                }\n                calc_params.response_parameters.to_json(calc.j_molresponse);\n                // set protocol to the first\n                calc.solve(world);\n                calc.output_json();\n            } else if (calc_params.response_parameters.first_order()) {\n                RHS_Generator rhsGenerator;\n                if (calc_params.response_parameters.dipole()) {\n                    rhsGenerator = dipole_generator;\n                } else if (calc_params.response_parameters.nuclear()) {\n                    rhsGenerator = nuclear_generator;\n                }\n                auto omega = calc_params.response_parameters.omega();\n                FrequencyResponse calc(world, calc_params, omega, rhsGenerator);\n                // Warm and fuzzy for the user\n                if (world.rank() == 0) {\n                    print(\"\\n\\n\");\n                    print(\" MADNESS Time-Dependent Density Functional Theory Frequency \"\n                          \"Response \"\n                          \"Program\");\n                    print(\" ----------------------------------------------------------\\n\");\n                    print(\"\\n\");\n                    calc_params.molecule.print();\n                    print(\"\\n\");\n                    calc_params.response_parameters.print(\"response\");\n                }\n                calc_params.response_parameters.to_json(calc.j_molresponse);\n                // set protocol to the first\n                calc.solve(world);\n                calc.output_json();\n            } else {\n                if (world.rank() == 0) { print(\"Response not implemented\"); }\n            }\n\n        } catch (const SafeMPI::Exception &e) { print(e); } catch (const madness::MadnessException &e) {\n            std::cout << e << std::endl;\n        } catch (const madness::TensorException &e) { print(e); } catch (const char *s) {\n            print(s);\n        } catch (const std::string &s) { print(s); } catch (const std::exception &e) {\n            print(e.what());\n        } catch (...) { error(\"caught unhandled exception\"); }\n    }\n\n    finalize();\n    return result;\n}\n"
  },
  {
    "path": "src/apps/molresponse/molresponse_tutorial.md",
    "content": "\n# `molresponse` Tutorial\n\nIn the following example we show the basic usage of the `molresponse` application.\nWe will compute the frequency-dependent response of a Be atom.  To compute response \nproperties with `molresponse` we first need to compute the ground-state solution with `moldft`.\nWe will assume that you have already computed the ground-state solution and have the restart files\n\n## Prerequisites: Preparing for the `molresponse` Calculation\n\n1. **MADNESS Environment**: Make sure that MADNESS is properly installed and set up in your environment.\n\n2. **Restart Files**: This tutorial assumes that you already have `moldft` restart files. These files contain the molecular orbitals and are required to start the `molresponse` calculation.\n\n    If you don't have these files yet, you can generate them by running a `moldft` calculation with the appropriate input parameters for your system.\n\n3. **Directory Structure**:  Below is an example of running a series of response calculations for Be atom.\nin a range of frequencies.  The directory structure is as follows:\n\n    ```makrkdown\n    Be/\n    ├── dipole_hf_0-000000\n    │   ├── response_base.json\n    │   ├── response.in\n    │   └── restart_dipole_hf_0-000000.00000\n    ├── dipole_hf_0-011116\n    ├── dipole_hf_0-022233\n    ├── dipole_hf_0-033349\n    ├── dipole_hf_0-044465\n    ├── dipole_hf_0-055582\n    ├── dipole_hf_0-066698\n    ├── moldft.energies.dat\n    ├── moldft.calc_info.json\n    ├── moldft.in\n    ├── moldft.restartaodata\n    └── moldft.restartdata.00000\n    ```\n\n### molrespones input and output\n\nIn the base directory you have input and output files associated to the `moldft` calculation.\nIn this example, `dipole_hf_0*` directories contain the input and output files for the `molresponse` calculations.\nFor the ground-state, `molresponse` reads in the `moldft` restart files.\nTo define the response specific calculation parameters, we use the `response.in` file.\n\nBelow is an example input file running a dipole response calculation\nat zero frequency.\n\n```input\nresponse\n         print_level  20         # defined   0: no output; 1: final energy; 2: iterations; 3: timings; 10: debug\n                plot  false      # defined   turn on plotting of final orbitals. Output format is .vts\n   plot_all_orbitals  true       # defined   Turn on 2D plotting of response orbitals\n             maxiter  25         # defined   maximum number of iterations\n               dconv  1.0000e-04 # defined   recommended values: 1.e-4 < dconv < 1.e-8\n            protocol  [1.0000e-04, 1.0000e-06] # defined   calculation protocol\n             restart  false      # defined   Flag to restart scf loop from file\n                kain  true       # defined   Turn on Krylov Accelarated Inexact Newton Solver\n              maxsub  5          # defined   size of iterative subspace ... set to 0 or 1 to disable\n                  xc  hf         # defined   XC input line\n                save  true       # defined   if true save orbitals to disk\n           save_file  restart_dipole_hf_0-000000 # defined   File name to save orbitals for restart\n         first_order  true       # defined   Flag to turn on first order response calc\n              dipole  true       # defined   Flag to turn on frequency dependent property calc\n               omega  0.0000e+00 # defined   Incident energy for dynamic response\nend\n```\nAbove you can read all the basic parameters for the `molresponse` calculation.\nThe key response specific parameters are:\n\n- dipole: Flag to turn on frequency dependent property calculation\n- omega: Incident energy for dynamic response\n- xc: XC input line\n\nIn this example we have specified a restart_file in the `save_file` parameter.  This will save the restart file in the `dipole_hf_0-000000` directory.  This is useful if you want to restart the response calculation from the static solution.  We will do this in the next example.\n\n\n\n### Computing Dynamic Response: Restarting from Static Solution\n\nIn this example, we compute the frequency-dependent response, starting from a precomputed static solution. This approach can often be more efficient than starting from scratch.\n\nTo achieve this, we:\n\n1. Set the `restart` parameter to `true`.\n2. Specify the static solution restart file in the `restart_file` parameter.\n3. Update the `omega` parameter for the dynamic response frequency.\n\nHere's the revised input file for the `FrequencyResponse` calculation:\n\n```input\nresponse\n         print_level  1          # 0: no output; 1: final energy; 2: iterations; 3: timings; 10: debug\n   plot_all_orbitals  true       # Turn on 2D plotting of response orbitals\n             maxiter  25         # Maximum number of iterations\n               dconv  1.0000e-04 # Recommended values: 1.e-4 < dconv < 1.e-8\n            protocol  [1.0000e-04, 1.0000e-06] # Calculation protocol\n             restart  true       # Flag to restart calculation from file\n        restart_file  ../dipole_hf_0-000000/restart_dipole_hf_0-000000 # File to read ground parameters from\n                kain  true       # Turn on Krylov Accelerated Inexact Newton Solver\n              maxsub  5          # Size of iterative subspace ... set to 0 or 1 to disable\n                  xc  hf         # XC input line\n                save  true       # If true, save orbitals to disk\n           save_file  restart_dipole_hf_0-011116 # File name to save orbitals for restart\n         first_order  true       # Flag to turn on first order response calculation\n              dipole  true       # Sets RHS to dipole operator 3 x num_orbitals\n               omega  1.1116e-02 # Incident energy for dynamic response\nend\n```\n\nThis configuration computes the frequency-dependent response at 0.011116 a.u. frequency, starting from the static solution saved in the `../dipole_hf_0-000000/restart_dipole_hf_0-000000` file.\n\n\n---\n\n### Nuclear Response\n\nTo run a nuclear response calculation instead of adding a `dipole` parameter, add a `nuclear` parameter.  This will compute the response of the system to a nuclear perturbation.\n\n### Next steps\n\nFor more details checkout the [molresponse documentation](/src/apps/molresponse/details.md).\n\n"
  },
  {
    "path": "src/apps/molresponse/property.cc",
    "content": "#include \"molresponse/property.h\"\n#include <madness/chem/SCF.h>\n\n#include <molresponse/response_functions.h>\n\n#include <algorithm>\n#include <vector>\n\nusing namespace madchem;\n\n\nPropertyBase::PropertyBase() : num_operators(0), operator_vector() {}\n\nDipoleVector::DipoleVector(World &world) : PropertyBase() {\n  num_operators = 3;\n  operator_vector = vecfuncT(num_operators);\n  for (size_t i = 0; i < 3; i++) {\n    std::vector<int> f(3, 0);\n    f[i] = 1;\n    operator_vector.at(i) = real_factory_3d(world).functor(real_functor_3d(new MomentFunctor(f)));\n    // prsize_t k L truncation\n    print(\"norm of dipole function \", operator_vector[i].norm2());\n  }\n\n  truncate(world, operator_vector, true);\n\n  for (size_t i = 0; i < 3; i++) {\n    print(\"norm of dipole function after truncate \", operator_vector[i].norm2());\n  }\n};\n\nNuclearVector::NuclearVector(World &world, Molecule &molecule) : PropertyBase() {\n  num_operators = size_t(molecule.natom() * 3);\n  operator_vector = vecfuncT(num_operators);\n\n  vecfuncT dv(molecule.natom() * 3);  // default constructor for vector?\n\n  print(\"Creating Nuclear Derivative Operator\");\n  for (size_t atom = 0; atom < molecule.natom(); ++atom) {\n    for (size_t axis = 0; axis < 3; ++axis) {\n      // question here....MolecularDerivativeFunctor takes derivative with\n      // respect to axis atom and axis\n      functorT func(new MolecularDerivativeFunctor(molecule, atom, axis));\n      // here we save\n      operator_vector.at(atom * 3 + axis) =\n          functionT (factoryT (world).functor(func).nofence().truncate_on_project().truncate_mode(0));\n      // prsize_t k L truncation\n      print(\"norm of derivative function \", operator_vector[atom * 3 + axis].norm2());\n    }\n  }\n\n  truncate(world, operator_vector, true);\n\n  for (size_t atom = 0; atom < molecule.natom(); ++atom) {\n    for (size_t axis = 0; axis < 3; ++axis) {\n      print(\"norm of derivative function after truncate \", operator_vector[atom * 3 + axis].norm2());\n    }\n  }\n}\n"
  },
  {
    "path": "src/apps/molresponse/property.h",
    "content": "#ifndef SRC_APPS_molresponse_PROPERTY_H_\n#define SRC_APPS_molresponse_PROPERTY_H_\n\n#include <molresponse/response_functions.h>\n\n#include <algorithm>\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"../../madness/mra/funcplot.h\"\n#include \"../chem/SCFOperators.h\"\n#include \"../chem/molecule.h\"\n#include <madness/chem/SCF.h>\n#include <madness/mra/function_interface.h>\n#include <madness/mra/functypedefs.h>\n\n// Type definitions\nusing namespace madness;\n\n// A property class...creates a object with operator vector and property name\n// Used to compute properties or compute rhs vectors\nclass PropertyBase {\npublic:\n  size_t num_operators; // number of operators in vectors\n  vector_real_function_3d operator_vector;\n\n  // default constructor\n  PropertyBase();\n};\n\nclass DipoleVector : public PropertyBase {\npublic:\n  DipoleVector(World &world);\n};\n\nclass NuclearVector : public PropertyBase {\npublic:\n  NuclearVector(World &world, Molecule &molecule);\n};\n\n#endif // SRC_APPS_molresponse_PROPERTY_H_\n"
  },
  {
    "path": "src/apps/molresponse/response_functions.h",
    "content": "/* Copyright 2021 Adrian Hurtado\n *   Small class to hold response functions and to interact with KAIN solver.\n */\n\n#ifndef SRC_APPS_MOLRESPONSE_RESPONSE_FUNCTIONS_H_\n#define SRC_APPS_MOLRESPONSE_RESPONSE_FUNCTIONS_H_\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\n#include <algorithm>\n#include <cstdint>\n#include <memory>\n#include <vector>\n\n// real_function_3d == Function<double,3>\nnamespace madness\n{\n\n  typedef std::vector<vector_real_function_3d> response_matrix;\n\n  /* *\n   * @brief response matrix holds response vectors for response state\n   *\n   */\n  struct response_space\n  {\n    // Member variables\n    /**\n     * @brief vector of vector of real 3d functions\n     *\n     */\n\n  public:\n    size_t num_states;   // Num. of resp. states\n    size_t num_orbitals; // Num. of ground states\n    response_matrix x;\n    std::list<size_t> active;\n\n    // Member functions\n  public:\n    /**\n     * @brief default Construct a new response space object\n     * num_states(0)\n     * num_orbitals(0)\n     * x() default constructor of std::vector\n     */\n    response_space() : num_states(0), num_orbitals(0), x(), active(0) {}\n\n    void reset_active()\n    {\n      active.resize(num_states);\n      size_t i{0};\n      for (auto &ai : active)\n      {\n        ai = i++;\n      }\n    }\n\n    // Copy constructor\n    /**\n     * @brief copy construct a new response space object\n     * we are using copying defined by std:vector\n     * we copy madness functions therefore we are copying pointers to function\n     * implementations\n     * @param y\n     */\n    response_space(const response_space &y)\n        : num_states(y.size()), num_orbitals(y.size_orbitals()), x(y.x),\n          active(y.active) {}\n\n    // assignment\n    // Copy assignment should copy the members of y and leave y Unchanged\n    // The problem is what happens when we copy two functions\n    response_space &operator=(const response_space &y)\n    {\n      //\n      if (this != &y)\n      { // is it the same object?\n        this->num_states = y.size();\n        this->num_orbitals = y.size_orbitals();\n        this->x = y.x;\n        this->active = y.active;\n        if (x.size() != num_states)\n        {\n          x.resize(num_states);\n        }\n      }\n      return *this; //\n    }\n\n    response_space &operator=(const response_matrix &y)\n    {\n      //\n      this->num_states = y.size();\n      this->num_orbitals = y[0].size();\n      this->x = y;\n      return *this; //\n    }\n    // Initialize functions to zero\n    // m = number of response states\n    // n = number of ground state orbitals\n\n    // Zero Constructor constructs m vectors\n    /**\n     * @brief Construct a new response space with zero functions\n     *\n     * @param world\n     * @param num_states\n     * @param num_orbitals\n     */\n    response_space(World &world, size_t num_states, size_t num_orbitals)\n        : num_states(num_states), num_orbitals(num_orbitals),\n          x(response_matrix(num_states)), active(num_states)\n    {\n      for (auto &state : x)\n      {\n        state = vector_real_function_3d(num_orbitals);\n      }\n      reset_active();\n      // world.gop.fence();\n    }\n    // Conversion from respones_matrix\n    /**\n     * @brief Construct a new response space object from vector of functions\n     *\n     * @param x\n     */\n    explicit response_space(const response_matrix &x)\n        : num_states(x.size()), num_orbitals(x[0].size()), x(x),\n          active(num_states)\n    {\n      reset_active();\n    }\n\n    // Determines if two ResponseFunctions are the same size\n    friend bool same_size(const response_space &a, const response_space &b)\n    {\n      return ((a.size() == b.size()) && (a.size_orbitals() == b.size_orbitals()));\n    }\n    // Returns a deep copy\n    [[nodiscard]] response_space copy() const\n    {\n      World &world = x[0][0].world();\n      response_space result(*this);\n      // copy each state\n      for (size_t i = 0; i < num_states; i++)\n      {\n        result.x[i] = madness::copy(world, x[i], false);\n      }\n      world.gop.fence();\n      return result;\n    }\n    [[nodiscard]] response_space\n    copy(const std::shared_ptr<WorldDCPmapInterface<Key<3>>> &pmap,\n         bool fence = false) const\n    {\n      auto &world = x[0][0].world();\n      response_space result(*this);\n      std::transform(x.begin(), x.end(), result.x.begin(), [&](const auto &xi)\n                     { return madness::copy(world, xi, pmap, fence); });\n      world.gop.fence();\n      return result;\n    }\n\n    vector_real_function_3d &operator[](size_t i) { return x.at(i); }\n    const vector_real_function_3d &operator[](size_t i) const { return x.at(i); }\n\n    friend auto inplace_unary_apply(\n        response_space &A,\n        const std::function<void(vector_real_function_3d &)> &func)\n    {\n      auto &world = A.x[A.active.front()][0].world();\n      for (auto &i : A.active)\n      {\n        func(A.x[i]);\n      }\n      world.gop.fence();\n    }\n\n    friend auto oop_unary_apply(const response_space &A,\n                                const std::function<vector_real_function_3d(\n                                    const vector_real_function_3d &)> &func)\n        -> response_space\n    {\n      auto result = A.copy();\n      auto &world = result.x[A.active.front()][0].world();\n      result.active = A.active;\n      for (auto &i : result.active)\n      {\n        result.x[i] = func(A.x[i]);\n      }\n      world.gop.fence();\n      return result;\n    }\n\n    friend auto\n    binary_apply(const response_space &A, const response_space &B,\n                 const std::function<vector_real_function_3d(\n                     vector_real_function_3d, vector_real_function_3d)> &func)\n        -> response_space\n    {\n      MADNESS_ASSERT(same_size(A, B));\n\n      response_space result = A.copy(); // create zero_functions\n      auto &world = result.x[A.active.front()][0].world();\n\n      for (const auto &i : result.active)\n      {\n        auto ax = result.x[i];\n        auto bx = B.x[i];\n        result.x[i] = func(ax, bx);\n      }\n      world.gop.fence();\n      return result;\n    }\n\n    template <class T>\n    friend auto binary_inplace(response_space &A, const response_space &B,\n                               const T &func)\n    {\n      MADNESS_ASSERT(same_size(A, B));\n      auto &world = A.x[A.active.front()][0].world();\n      for (const auto &i : A.active)\n      {\n        auto ax = A.x[i];\n        auto bx = B.x[i];\n        func(ax, bx);\n      }\n      world.gop.fence();\n\n      return A;\n    }\n\n    response_space operator+(const response_space &rhs_y) const\n    {\n\n      MADNESS_ASSERT(size() > 0);\n      MADNESS_ASSERT(same_size(*this, rhs_y)); // assert that same size\n      World &world = x[rhs_y.active.front()][0].world();\n      auto result = response_space(world, size(), size_orbitals());\n      result.active = rhs_y.active;\n\n      result.from_vector(this->to_vector() + rhs_y.to_vector());\n      return result;\n\n      // auto result =\n      //     binary_apply(*this, rhs_y, [&](auto xi, auto vi)\n      //                  { return gaxpy_oop(1.0, xi, 1.0, vi, false); });\n      // return result;\n    }\n\n    response_space operator-(const response_space &rhs_y) const\n    {\n      MADNESS_ASSERT(size() > 0);\n      MADNESS_ASSERT(same_size(*this, rhs_y)); // assert that same size\n      //World &world = x[rhs_y.active.front()][0].world();\n      auto result = this->copy();\n      result.active = rhs_y.active;\n\n      result.from_vector(result.to_vector() - rhs_y.to_vector());\n      return result;\n\n      // auto result =\n      //     binary_apply(*this, rhs_y, [&](auto xi, auto vi)\n      //                  { return gaxpy_oop(1.0, xi, -1.0, vi, false); });\n      //return result;\n    }\n\n    friend response_space operator*(const response_space &y, double a)\n    {\n      // World &world = y.x.at(0).at(0).world();\n      World &world = y.x[y.active.front()][0].world();\n\n      // auto result = response_space(world, y.size(), y.size_orbitals());\n      auto result =\n          response_space::zero_functions(world, y.size(), y.size_orbitals());\n      result.active = y.active;\n      result.from_vector(y.to_vector() * a);\n      return result;\n\n      // auto result = y.copy();\n      //      auto multiply_scalar = [&](vector_real_function_3d &vi)\n      //      {\n      //madness::scale(world, vi, a, false);\n      //};\n      //inplace_unary_apply(result, multiply_scalar);\n      //return result;\n    }\n\n    friend response_space operator*(double a, response_space &y)\n    {\n      // World &world = y.x.at(0).at(0).world();\n      World &world = y.x[y.active.front()][0].world();\n\n      // auto result = response_space(world, y.size(), y.size_orbitals());\n      auto result =\n          response_space::zero_functions(world, y.size(), y.size_orbitals());\n      result.active = y.active;\n      result.from_vector(y.to_vector() * a);\n      return result;\n\n      // auto multiply_scalar = [&](vector_real_function_3d &vi)\n      // { madness::scale(world, vi, a, false); };\n      // auto result = y.copy();\n      // inplace_unary_apply(result, multiply_scalar);\n      // return result;\n    }\n\n    response_space &operator*=(double a)\n    {\n      // World &world = this->x[0][0].world();\n        //World &world = x[active.front()][0].world();\n\n      this->from_vector(this->to_vector() * a);\n      // auto multiply_scalar = [&](vector_real_function_3d &vi)\n      // { madness::scale(world, vi, a, false); };\n      // inplace_unary_apply(*this, multiply_scalar);\n      return *this;\n    }\n\n    // Scaling all internal functions by an external function\n    // g[i][j] = x[i][j] * f\n    friend response_space operator*(const response_space &a,\n                                    const Function<double, 3> &f)\n    {\n      // World &world = a.x.at(0).at(0).world();\n      World &world = a[a.active.front()][0].world();\n\n      auto result =\n          response_space::zero_functions(world, a.size(), a.size_orbitals());\n      result.active = a.active;\n      result.from_vector(a.to_vector() * f);\n      return result;\n\n      // auto multiply_scalar_function = [&](const vector_real_function_3d &vi)\n      // {\n      //   return mul(world, f, vi, false);\n      // };\n      // return oop_unary_apply(a, multiply_scalar_function);\n    }\n\n    // Scaling all internal functions by an external function\n    // g[i][j] = x[i][j] * f\n    friend response_space operator*(const Function<double, 3> &f,\n                                    const response_space &a)\n    {\n\n      return a * f;\n    }\n\n    response_space operator*(const Function<double, 3> &f)\n    {\n      // World &world = x[0][0].world();\n      World &world = x[active.front()][0].world();\n\n      // auto result = response_space(world, size(), size_orbitals());\n      auto result =\n          response_space::zero_functions(world, size(), size_orbitals());\n      result.active = active;\n      result.from_vector(this->to_vector() * f);\n\n      return result;\n\n      // auto multiply_scalar_function = [&](const vector_real_function_3d &vi)\n      // {\n      //   return mul(world, f, vi, false);\n      // };\n\n      // return oop_unary_apply(*this, multiply_scalar_function);\n    }\n\n    friend response_space operator*(const response_space &a,\n                                    const Tensor<double> &b)\n    {\n      MADNESS_ASSERT(a.size() > 0);\n      MADNESS_ASSERT(!a[0].empty());\n      World &world = a[0][0].world();\n      auto response_transform = [&](const vector_real_function_3d &vi)\n      {\n        return transform(world, vi, b, true);\n      };\n      return oop_unary_apply(a, response_transform);\n    }\n\n    // KAIN must have this\n    response_space &operator+=(const response_space &b)\n    {\n      MADNESS_ASSERT(same_size(*this, b));\n      // auto &world = b[b.active.front()][0].world();\n      this->active = b.active;\n\n      this->from_vector(this->to_vector() + b.to_vector());\n      return *this;\n\n      // auto a_plus_equal_b = [&](vector_real_function_3d &a,\n      //                           const vector_real_function_3d &g)\n      // {\n      //   gaxpy(world, 1.0, a, 1.0, g, false);\n      // };\n      // binary_inplace(*this, b, a_plus_equal_b);\n      // return *this;\n\n      // return *this;\n    }\n\n    // Mimicking std::vector with these 4\n    void push_back(const vector_real_function_3d &f)\n    {\n      x.push_back(f);\n      num_states++;\n      // print(\"im calling response_space push back\");\n\n      // Be smart with g_states\n      if (num_orbitals > 0)\n        MADNESS_ASSERT(num_orbitals == f.size());\n      else\n      { // g_states == 0 (empty vector)\n        num_orbitals = f.size();\n      }\n    }\n\n    void pop_back()\n    {\n      MADNESS_ASSERT(num_states >= 1);\n      x.pop_back();\n      num_states--;\n\n      // Be smart with g_states\n      if (num_states == 0)\n      { // removed last item\n        num_orbitals = 0;\n      }\n    }\n\n    void clear()\n    {\n      x.clear();\n      num_states = 0;\n      num_orbitals = 0;\n    }\n\n    auto begin() { return x.begin(); }\n\n    auto end() { return x.end(); }\n\n    const auto begin() const { return x.begin(); }\n\n    [[nodiscard]] const auto end() const { return x.end(); }\n\n    size_t size() const { return num_states; }\n\n    size_t size_orbitals() const { return num_orbitals; }\n\n    // Mimicing standard madness calls with these 3\n    void zero()\n    {\n      auto &world = x[0][0].world();\n      for (size_t i = 0; i < num_states; i++)\n      {\n        x[i] = ::madness::zero_functions<double, 3>(world, num_orbitals, false);\n      }\n    }\n\n    void compress_rf() const\n    {\n      // for (size_t k = 0; k < num_states; k++) { compress(x[0][0].world(), x[k],\n      // true); } auto &world = x[0][0].world();\n      auto &world = x[active.front()][0].world();\n      // compress only active states\n      //\n      auto xvec = to_vector();\n      compress(world, xvec, true);\n    }\n\n    void reconstruct_rf()\n    {\n      // for (size_t k = 0; k < num_states; k++) { reconstruct(x[0][0].world(),\n      // x[k], true); } auto &world = x[0][0].world();\n      auto &world = x[active.front()][0].world();\n      // reconstruct only active states\n      for (auto &i : active)\n      {\n        reconstruct(world, x[i], false);\n      }\n      world.gop.fence();\n    }\n\n    void truncate_rf() { truncate_rf(FunctionDefaults<3>::get_thresh()); }\n\n    void truncate_rf(double tol)\n    {\n      auto &world = x[active.front()][0].world();\n      // truncate only active states\n      for (auto &i : active)\n      {\n        truncate(world, x[i], tol, false);\n      }\n      world.gop.fence();\n      /*\n      for (size_t k = 0; k < num_states; k++) { truncate(x[0][0].world(), x[k],\n      tol, true); }\n       */\n    }\n\n    // Returns norms of each state\n    Tensor<double> norm2()\n    {\n      auto &world = x[0][0].world();\n      Tensor<double> answer(num_states);\n      for (size_t i = 0; i < num_states; i++)\n      {\n        answer(i) = madness::norm2(world, x[i]);\n      }\n\n      world.gop.fence();\n\n      return answer;\n    }\n\n    // Scales each state (read: entire row) by corresponding vector element\n    //     new[i] = old[i] * mat[i]\n    void scale(Tensor<double> &mat)\n    {\n      for (size_t i = 0; i < num_states; i++)\n        madness::scale(x[0][0].world(), x[i], mat[i], false);\n      // x[i] = x[i] * mat[i];\n    }\n\n    friend bool operator==(const response_space &a, const response_space &y)\n    {\n      if (!same_size(a, y))\n        return false;\n      for (size_t b = 0; b < a.size(); ++b)\n      {\n        for (size_t k = 0; b < a.size_orbitals(); ++k)\n        {\n          if ((a[b][k] - y[b][k]).norm2() >\n              FunctionDefaults<3>::get_thresh()) // this may be strict\n            return false;\n        }\n      }\n      return true;\n    }\n\n    static response_space zero_functions(World &world, size_t num_states,\n                                         size_t num_orbitals)\n    {\n      response_space result(world, num_states, num_orbitals);\n\n      for (size_t i = 0; i < num_states; i++)\n      {\n        result.x[i] =\n            ::madness::zero_functions<double, 3>(world, num_orbitals, false);\n      }\n      return result;\n    }\n\n    friend Tensor<double> response_space_inner(const response_space &a,\n                                               const response_space &b)\n    {\n      MADNESS_ASSERT(a.size() > 0);\n      MADNESS_ASSERT(!a[0].empty());\n      MADNESS_ASSERT(a[0].size() == b[0].size());\n\n      a.compress_rf();\n      b.compress_rf();\n\n      World &world = a[0][0].world();\n\n      auto dim_a1 = a.size();\n      auto num_orbitals = a.size_orbitals();\n      auto dim_b1 = b.size();\n      // Need to take transpose of each input ResponseFunction\n      response_space aT(world, num_orbitals, dim_a1);\n      response_space bT(world, num_orbitals, dim_b1);\n      for (size_t j = 0; j < num_orbitals; j++)\n      {\n        for (size_t i = 0; i < dim_a1; i++)\n        {\n          aT[j][i] = a[i][j];\n        }\n        for (size_t i = 0; i < dim_b1; i++)\n        {\n          bT[j][i] = b[i][j];\n        }\n      }\n      // Container for result\n      Tensor<double> result(dim_a1, dim_b1);\n      for (size_t p = 0; p < num_orbitals; p++)\n      {\n        result += matrix_inner(world, aT[p], bT[p]);\n        world.gop.fence();\n      }\n      return result;\n    }\n\n    [[nodiscard]] auto to_vector() const -> vector_real_function_3d\n    {\n\n      int n = static_cast<int>(active.size());\n      int m = static_cast<int>(num_orbitals);\n\n      vector_real_function_3d rf(n * m);\n\n      int i = 0;\n      for (const auto &ai : active)\n      {\n        for (int j = 0; j < m; j++)\n        {\n          auto xindex = (i * m) + j;\n          rf[xindex] = x[ai][j];\n        }\n        i++;\n      }\n      return rf;\n    }\n\n    auto from_vector(const vector_real_function_3d &rf) -> void\n    {\n\n      int m = static_cast<int>(num_orbitals);\n\n      int i = 0;\n      for (const auto &ai : active)\n      {\n        for (int j = 0; j < m; j++)\n        {\n          auto xindex = (i * m) + j;\n\n          x[ai][j] = rf[xindex];\n        }\n        i++;\n      }\n    }\n  };\n\n  // Final piece for KAIN\n  inline double inner(response_space &a, response_space &b)\n  {\n    MADNESS_ASSERT(a.size() > 0);\n    MADNESS_ASSERT(!a[0].empty());\n    MADNESS_ASSERT(a[0].size() == b[0].size());\n\n    double value = 0.0;\n\n    for (unsigned int i = 0; i < a.size(); i++)\n    {\n      // vmra.h function\n      value += inner(a[i], b[i]);\n    }\n\n    return value;\n  }\n\n  auto transposeResponseMatrix(const response_matrix &x) -> response_matrix;\n  // Final piece for KAIN\n\n} // End namespace madness\n#endif // SRC_APPS_MOLRESPONSE_RESPONSE_FUNCTIONS_H_\n\n// Deuces\n"
  },
  {
    "path": "src/apps/molresponse/response_macrotask.hpp",
    "content": "\n#ifndef MADNESS_APPS_MOLRESPONSE_RESPONSE_MACROTASK_HPP\n#define MADNESS_APPS_MOLRESPONSE_RESPONSE_MACROTASK_HPP\n\n// #include \"functypedefs.h\"\n// #include \"functypedefs.h\"\n#include \"SCF.h\"\n#include \"functypedefs.h\"\n#include \"vmra.h\"\n#include \"x_space.h\"\n#include <madness.h>\n#include <madness/chem/SCFOperators.h>\n#include <madness/chem/projector.h>\n#include <madness/mra/macrotaskpartitioner.h>\n#include <madness/mra/macrotaskq.h>\n#include <madness/world/cloud.h>\n#include <tuple>\n\nnamespace madness {\n\n// Set the default algorithm for the exchange operator to small memory\n// global variable\n\n/*class VBC_task2 : public MacroTaskOperationBase {*/\n/**/\n/*  class Partitioner : public MacroTaskPartitioner {*/\n/*  public:*/\n/*    explicit Partitioner(long stride) {*/\n/*      max_batch_size = 1;*/\n/*      result_stride = stride;*/\n/*      policy = \"strided\";*/\n/*    }*/\n/*  };*/\n/**/\n/*public:*/\n/*  long stride;*/\n/*  explicit VBC_task2(long stride) : stride(stride) {*/\n/*    partitioner.reset(new Partitioner(stride));*/\n/*  }*/\n/*  // index b, index c, response B, response C, zetaBC, zetaCB, phi0,*/\n/*  // perturbation*/\n/*  typedef std::tuple<*/\n/*      const std::vector<int> &, const std::vector<int> &,*/\n/*      const std::vector<int> &, const vector_real_function_3d &,*/\n/*      const vector_real_function_3d &, const vector_real_function_3d &,*/\n/*      const vector_real_function_3d &, const vector_real_function_3d &,*/\n/*      const vector_real_function_3d &>*/\n/*      argtupleT;*/\n/**/\n/*  using resultT = vector_real_function_3d;*/\n/**/\n/*  resultT allocator(World &world, const argtupleT &args) const {*/\n/**/\n/*    auto num_states = static_cast<int>(std::get<1>(args).size());*/\n/*    auto num_orbitals = static_cast<int>(std::get<7>(args).size());*/\n/*    auto num_functions = 2 * num_states * num_orbitals;*/\n/*    print(\"allocator: \", num_states, num_orbitals, num_functions);*/\n/**/\n/*    return zero_functions_compressed<double, 3>(world, num_functions);*/\n/*  };*/\n/**/\n/*  resultT*/\n/*  operator()(const std::vector<int> &dummy_i, const std::vector<int> &b,*/\n/*             const std::vector<int> &c, const vector_real_function_3d &B,*/\n/*             const vector_real_function_3d &C,*/\n/*             const vector_real_function_3d &zeta_BC,*/\n/*             const vector_real_function_3d &zeta_CB,*/\n/*             const vector_real_function_3d &phi0,*/\n/*             const vector_real_function_3d &dipole_perturbations) const {*/\n/**/\n/*    World &world = phi0[0].world();*/\n/*    madness::QProjector<double, 3> Q(phi0);*/\n/*    auto thresh = FunctionDefaults<3>::get_thresh();*/\n/**/\n/*    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {*/\n/*      const double lo = 1.e-10;*/\n/*      auto &world = ket[0].world();*/\n/*      Exchange<double, 3> k{world, lo};*/\n/*      k.set_bra_and_ket(bra, ket);*/\n/**/\n/*      std::string algorithm_ = \"multiworld_row\";*/\n/*      if (algorithm_ == \"multiworld\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient);*/\n/*      } else if (algorithm_ == \"multiworld_row\") {*/\n/*        k.set_algorithm(*/\n/*            Exchange<double, 3>::Algorithm::multiworld_efficient_row);*/\n/*      } else if (algorithm_ == \"largemem\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::large_memory);*/\n/*      } else if (algorithm_ == \"smallmem\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::small_memory);*/\n/*      }*/\n/**/\n/*      return k;*/\n/*    };*/\n/*    // A and B are the response pairs that make up response density*/\n/*    // \\gamma_{a} = |xa><phi| + |phi><ya|*/\n/*    // This function constructs the J and K operators with A and B and applies*/\n/*    // on x*/\n/*    auto compute_g = [&](const vector_real_function_3d &Aleft,*/\n/*                         const vector_real_function_3d &Aright,*/\n/*                         const vector_real_function_3d &Bleft,*/\n/*                         const vector_real_function_3d &Bright,*/\n/*                         const vector_real_function_3d &phix,*/\n/*                         const vector_real_function_3d &phiy) {*/\n/*      auto x_phi = mul(world, Aleft, Aright, true);*/\n/*      auto y_phi = mul(world, Bleft, Bright, true);*/\n/*      world.gop.fence();*/\n/*      auto rho = sum(world, x_phi, true);*/\n/*      world.gop.fence();*/\n/*      rho += sum(world, y_phi, true);*/\n/*      world.gop.fence();*/\n/*      auto lo = 1.e-10;*/\n/*      real_convolution_3d op =*/\n/*          CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());*/\n/*      auto temp_J = apply(op, rho);*/\n/**/\n/*      auto Jx = mul(world, temp_J, phix, false);*/\n/*      auto Jy = mul(world, temp_J, phiy, false);*/\n/**/\n/*      auto ka = K(Aleft, Aright)(phix); // what happens to k after this?*/\n/*      auto kb = K(Bleft, Bright)(phix);*/\n/*      auto ka_conj = K(Aright, Aleft)(phiy);*/\n/*      auto kb_conj = K(Bright, Bleft)(phiy);*/\n/*      world.gop.fence();*/\n/*      // ideally it runs and the Exchange operator is freed*/\n/**/\n/*      auto Kx = gaxpy_oop(1.0, ka, 1.0, kb, true);*/\n/*      auto Ky = gaxpy_oop(1.0, ka_conj, 1.0, kb_conj, true);*/\n/*      world.gop.fence();*/\n/**/\n/*      auto result_x = gaxpy_oop(2.0, Jx, -1.0, Kx, true);*/\n/*      auto result_y = gaxpy_oop(2.0, Jy, -1.0, Ky, true);*/\n/**/\n/*      return std::make_pair(result_x, result_y);*/\n/*    };*/\n/*    auto compute_vbc_i = [&](const vector_real_function_3d &bx,*/\n/*                             const vector_real_function_3d &by,*/\n/*                             const vector_real_function_3d &cx,*/\n/*                             const vector_real_function_3d &cy,*/\n/*                             const vector_real_function_3d &zeta_bc,*/\n/*                             const vector_real_function_3d &phi,*/\n/*                             const real_function_3d &v) {*/\n/*      // left right pairs ka and kb and apply apply*/\n/*      auto [gzeta_x, gzeta_y] = compute_g(bx, cy, phi0, zeta_bc, phi0, phi0);*/\n/*      gzeta_x = -1.0 * Q(gzeta_x);*/\n/*      gzeta_y = -1.0 * Q(gzeta_y);*/\n/**/\n/*      auto [gbc_x, gbc_y] = compute_g(bx, phi0, phi0, by, cx, cy);*/\n/*      auto [gbc_phi_x, gbc_phi_y] = compute_g(bx, phi0, phi0, by, phi0, phi0);*/\n/**/\n/*      auto vcx = mul(world, v, cx, true);*/\n/*      auto vcy = mul(world, v, cy, true);*/\n/**/\n/*      auto fbx = -1.0 * Q(gbc_x + vcx);*/\n/*      auto fby = -1.0 * Q(gbc_y + vcy);*/\n/**/\n/*      auto vb_phi = mul(world, v, phi, true);*/\n/**/\n/*      auto fb_phi_x = gbc_phi_x + vb_phi;*/\n/*      auto fb_phi_y = gbc_phi_y + vb_phi;*/\n/**/\n/*      auto m_fbx = matrix_inner(world, phi, fb_phi_x);*/\n/*      auto m_fby = matrix_inner(world, phi, fb_phi_y);*/\n/**/\n/*      auto fphi_x = transform(world, cx, m_fbx, true);*/\n/*      auto fphi_y = transform(world, cy, m_fby, true);*/\n/**/\n/*      auto result_x = truncate(gzeta_x + fbx + fphi_x, thresh, true);*/\n/*      auto result_y = truncate(gzeta_y + fby + fphi_y, thresh, true);*/\n/**/\n/*      return std::make_pair(result_x, result_y);*/\n/*    };*/\n/**/\n/*    int num_orbitals = static_cast<int>(phi0.size());*/\n/*    int num_states = static_cast<int>(b.size());*/\n/**/\n/*    auto bc_indexer = x_space_indexer(num_orbitals);*/\n/*    auto zeta_indexer = response_space_index(num_orbitals);*/\n/*    auto compute_result = [&](const int &i) {*/\n/*      auto results =*/\n/*          zero_functions_compressed<double, 3>(world, 2 * num_orbitals);*/\n/**/\n/*      auto bi = b[i];*/\n/*      auto ci = c[i];*/\n/*      const auto &bx = bc_indexer.get_x_state(bi, B);*/\n/*      const auto &by = bc_indexer.get_y_state(bi, B);*/\n/*      const auto &cx = bc_indexer.get_x_state(ci, C);*/\n/*      const auto &cy = bc_indexer.get_y_state(ci, C);*/\n/**/\n/*      const auto &zeta_bc = zeta_indexer.get_x_state(i, zeta_BC);*/\n/*      const auto &zeta_cb = zeta_indexer.get_x_state(i, zeta_CB);*/\n/**/\n/*      const auto &vb = dipole_perturbations[bi];*/\n/*      const auto &vc = dipole_perturbations[ci];*/\n/**/\n/*      auto [bcx, bcy] = compute_vbc_i(bx, by, cx, cy, zeta_bc, phi0, vb);*/\n/*      auto [cbx, cby] = compute_vbc_i(cx, cy, bx, by, zeta_cb, phi0, vc);*/\n/**/\n/*      auto result_x = gaxpy_oop(1.0, bcx, 1.0, cbx, true);*/\n/*      auto result_y = gaxpy_oop(1.0, bcy, 1.0, cby, true);*/\n/**/\n/*      for (int j = 0; j < num_orbitals; j++) {*/\n/**/\n/*        auto index_x = j;*/\n/*        auto norm_x = result_x[j].norm2();*/\n/*        print(\"i,j = (\", i, j, \") index_x: \", index_x, \" norm_x: \", norm_x);*/\n/*        results[index_x] = result_x[j];*/\n/*      }*/\n/**/\n/*      for (int j = 0; j < num_orbitals; j++) {*/\n/**/\n/*        auto index_y = j + num_orbitals;*/\n/*        auto norm_y = result_y[j].norm2();*/\n/*        print(\"i,j = (\", i, j, \") index_y: \", index_y, \" norm_y: \", norm_y);*/\n/*        results[index_y] = result_y[j];*/\n/*      }*/\n/**/\n/*      return results;*/\n/*    };*/\n/*    const int ij = static_cast<int>(batch.result.begin);*/\n/*    return compute_result(ij);*/\n/*  }*/\n/*};*/\n/**/\n/*class VBC_task_one : public MacroTaskOperationBase {*/\n/**/\n/*  class Partitioner : public MacroTaskPartitioner {*/\n/*  public:*/\n/*    explicit Partitioner(long stride) {*/\n/*      max_batch_size = 1;*/\n/*      result_stride = stride;*/\n/*      policy = \"strided\";*/\n/*    }*/\n/*  };*/\n/**/\n/*public:*/\n/*  long stride;*/\n/*  explicit VBC_task_one(long stride) : stride(stride) {*/\n/*    partitioner.reset(new Partitioner(stride));*/\n/*  }*/\n/*  // index b, index c, response B, response C, phi0,*/\n/*  typedef std::tuple<const std::vector<int> &, const std::vector<int> &,*/\n/*                     const std::vector<int> &, const vector_real_function_3d &,*/\n/*                     const vector_real_function_3d &,*/\n/*                     const vector_real_function_3d &>*/\n/*      argtupleT;*/\n/**/\n/*  using resultT = vector_real_function_3d;*/\n/**/\n/*  resultT allocator(World &world, const argtupleT &args) const {*/\n/*    auto num_states = static_cast<int>(std::get<1>(args).size());*/\n/*    auto num_orbitals = static_cast<int>(std::get<5>(args).size());*/\n/*    auto num_functions = 2 * num_states * num_orbitals;*/\n/*    print(\"allocator: \", num_states, num_orbitals, num_functions);*/\n/**/\n/*    return zero_functions_compressed<double, 3>(world, num_functions);*/\n/*  };*/\n/**/\n/*  resultT operator()(const std::vector<int> &dummy_i, const std::vector<int> &b,*/\n/*                     const std::vector<int> &c,*/\n/*                     const vector_real_function_3d &B,*/\n/*                     const vector_real_function_3d &C,*/\n/*                     const vector_real_function_3d &phi0) const {*/\n/**/\n/*    World &world = phi0[0].world();*/\n/*    madness::QProjector<double, 3> Q(phi0);*/\n/*    auto thresh = FunctionDefaults<3>::get_thresh();*/\n/**/\n/*    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {*/\n/*      const double lo = 1.e-10;*/\n/*      auto &world = ket[0].world();*/\n/*      Exchange<double, 3> k{world, lo};*/\n/*      k.set_bra_and_ket(bra, ket);*/\n/**/\n/*      std::string algorithm_ = \"multiworld_row\";*/\n/*      if (algorithm_ == \"multiworld\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient);*/\n/*      } else if (algorithm_ == \"multiworld_row\") {*/\n/*        k.set_algorithm(*/\n/*            Exchange<double, 3>::Algorithm::multiworld_efficient_row);*/\n/*      } else if (algorithm_ == \"largemem\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::large_memory);*/\n/*      } else if (algorithm_ == \"smallmem\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::small_memory);*/\n/*      }*/\n/**/\n/*      return k;*/\n/*    };*/\n/*    // A and B are the response pairs that make up response density*/\n/*    // \\gamma_{a} = |xa><phi| + |phi><ya|*/\n/*    // This function constructs the J and K operators with A and B and applies*/\n/*    // on x*/\n/*    auto compute_g = [&](const vector_real_function_3d &Aleft,*/\n/*                         const vector_real_function_3d &Aright,*/\n/*                         const vector_real_function_3d &phi) {*/\n/*      auto x_phi = mul(world, Aleft, Aright, true);*/\n/*      auto rho = sum(world, x_phi, true);*/\n/*      auto lo = 1.e-10;*/\n/*      real_convolution_3d op =*/\n/*          CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());*/\n/*      auto temp_J = apply(op, rho);*/\n/**/\n/*      auto J = mul(world, temp_J, phi, true);*/\n/*      auto Kx = K(Aleft, Aright)(phi); // what happens to k after this?*/\n/*      auto Ky = K(Aright, Aleft)(phi);*/\n/*      world.gop.fence();*/\n/*      auto result_x = gaxpy_oop(2.0, J, -1.0, Kx, true);*/\n/*      auto result_y = gaxpy_oop(2.0, J, -1.0, Ky, true);*/\n/**/\n/*      return std::make_pair(result_x, result_y);*/\n/*    };*/\n/*    auto compute_vbc_i = [&](const vector_real_function_3d &bx,*/\n/*                             const vector_real_function_3d &cy,*/\n/*                             const vector_real_function_3d &phi) {*/\n/*      // left right pairs ka and kb and apply apply*/\n/*      auto [gzeta_x, gzeta_y] = compute_g(bx, cy, phi0);*/\n/*      gzeta_x = -1.0 * Q(gzeta_x);*/\n/*      gzeta_y = -1.0 * Q(gzeta_y);*/\n/*      return std::make_pair(gzeta_x, gzeta_y);*/\n/*    };*/\n/**/\n/*    int num_orbitals = static_cast<int>(phi0.size());*/\n/*    int num_states = static_cast<int>(b.size());*/\n/**/\n/*    auto bc_indexer = x_space_indexer(num_orbitals);*/\n/*    auto zeta_indexer = response_space_index(num_orbitals);*/\n/*    auto compute_result = [&](const int &i) {*/\n/*      auto results =*/\n/*          zero_functions_compressed<double, 3>(world, 2 * num_orbitals);*/\n/**/\n/*      auto bi = b[i];*/\n/*      auto ci = c[i];*/\n/*      const auto &bx = bc_indexer.get_x_state(bi, B);*/\n/*      const auto &by = bc_indexer.get_y_state(bi, B);*/\n/**/\n/*      const auto &cx = bc_indexer.get_x_state(ci, C);*/\n/*      const auto &cy = bc_indexer.get_y_state(ci, C);*/\n/**/\n/*      auto [bcx, bcy] = compute_vbc_i(bx, cy, phi0);*/\n/*      auto [cbx, cby] = compute_vbc_i(cx, by, phi0);*/\n/**/\n/*      auto result_x = gaxpy_oop(1.0, bcx, 1.0, cbx, true);*/\n/*      auto result_y = gaxpy_oop(1.0, bcy, 1.0, cby, true);*/\n/**/\n/*      for (int j = 0; j < num_orbitals; j++) {*/\n/**/\n/*        auto index_x = j;*/\n/*        auto norm_x = result_x[j].norm2();*/\n/*        print(\"i,j = (\", i, j, \") index_x: \", index_x, \" norm_x: \", norm_x);*/\n/*        results[index_x] = result_x[j];*/\n/*      }*/\n/**/\n/*      for (int j = 0; j < num_orbitals; j++) {*/\n/**/\n/*        auto index_y = j + num_orbitals;*/\n/*        auto norm_y = result_y[j].norm2();*/\n/*        print(\"i,j = (\", i, j, \") index_y: \", index_y, \" norm_y: \", norm_y);*/\n/*        results[index_y] = result_y[j];*/\n/*      }*/\n/**/\n/*      return results;*/\n/*    };*/\n/*    const int ij = static_cast<int>(batch.result.begin);*/\n/*    return compute_result(ij);*/\n/*  }*/\n/*};*/\n/**/\n/*class VBC_task_two : public MacroTaskOperationBase {*/\n/**/\n/*  class Partitioner : public MacroTaskPartitioner {*/\n/*  public:*/\n/*    explicit Partitioner(long stride) {*/\n/*      max_batch_size = 1;*/\n/*      result_stride = stride;*/\n/*      policy = \"strided\";*/\n/*    }*/\n/*  };*/\n/**/\n/*public:*/\n/*  long stride;*/\n/*  explicit VBC_task_two(long stride) : stride(stride) {*/\n/*    partitioner.reset(new Partitioner(stride));*/\n/*  }*/\n/*  typedef std::tuple<const std::vector<int> &, const vector_real_function_3d &,*/\n/*                     const vector_real_function_3d &>*/\n/*      argtupleT;*/\n/**/\n/*  using resultT = vector_real_function_3d;*/\n/**/\n/*  resultT allocator(World &world, const argtupleT &args) const {*/\n/**/\n/*    auto num_states = static_cast<int>(std::get<1>(args).size());*/\n/*    auto num_orbitals = static_cast<int>(std::get<2>(args).size());*/\n/*    auto num_functions = 2 * num_states * num_orbitals;*/\n/*    print(\"allocator: \", num_states, num_orbitals, num_functions);*/\n/**/\n/*    return zero_functions_compressed<double, 3>(world, num_functions);*/\n/*  };*/\n/**/\n/*  resultT operator()(const std::vector<int> &dummy_i,*/\n/*                     const vector_real_function_3d &zeta_BC,*/\n/*                     const vector_real_function_3d &phi0) const {*/\n/**/\n/*    World &world = phi0[0].world();*/\n/*    madness::QProjector<double, 3> Q(phi0);*/\n/*    auto thresh = FunctionDefaults<3>::get_thresh();*/\n/**/\n/*    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {*/\n/*      const double lo = 1.e-10;*/\n/*      auto &world = ket[0].world();*/\n/*      Exchange<double, 3> k{world, lo};*/\n/*      k.set_bra_and_ket(bra, ket);*/\n/**/\n/*      std::string algorithm_ = \"multiworld_row\";*/\n/*      if (algorithm_ == \"multiworld\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient);*/\n/*      } else if (algorithm_ == \"multiworld_row\") {*/\n/*        k.set_algorithm(*/\n/*            Exchange<double, 3>::Algorithm::multiworld_efficient_row);*/\n/*      } else if (algorithm_ == \"largemem\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::large_memory);*/\n/*      } else if (algorithm_ == \"smallmem\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::small_memory);*/\n/*      }*/\n/**/\n/*      return k;*/\n/*    };*/\n/*    // A and B are the response pairs that make up response density*/\n/*    // \\gamma_{a} = |xa><phi| + |phi><ya|*/\n/*    // This function constructs the J and K operators with A and B and applies*/\n/*    // on x*/\n/*    auto compute_g = [&](const vector_real_function_3d &Aleft,*/\n/*                         const vector_real_function_3d &Aright,*/\n/*                         const vector_real_function_3d &phi) {*/\n/*      auto x_phi = mul(world, Aleft, Aright, true);*/\n/*      auto rho = sum(world, x_phi, true);*/\n/*      auto lo = 1.e-10;*/\n/*      real_convolution_3d op =*/\n/*          CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());*/\n/*      auto temp_J = apply(op, rho);*/\n/**/\n/*      auto J = mul(world, temp_J, phi, true);*/\n/*      auto Kx = K(Aleft, Aright)(phi); // what happens to k after this?*/\n/*      auto Ky = K(Aright, Aleft)(phi);*/\n/*      world.gop.fence();*/\n/*      auto result_x = gaxpy_oop(2.0, J, -1.0, Kx, true);*/\n/*      auto result_y = gaxpy_oop(2.0, J, -1.0, Ky, true);*/\n/**/\n/*      return std::make_pair(result_x, result_y);*/\n/*    };*/\n/**/\n/*    auto compute_vbc_i = [&](const vector_real_function_3d &zeta_bc,*/\n/*                             const vector_real_function_3d &phi) {*/\n/*      // left right pairs ka and kb and apply apply*/\n/*      auto [gzeta_x, gzeta_y] = compute_g(zeta_bc, phi, phi);*/\n/*      gzeta_x = -1.0 * Q(gzeta_x);*/\n/*      gzeta_y = -1.0 * Q(gzeta_y);*/\n/*      return std::make_pair(gzeta_x, gzeta_y);*/\n/*    };*/\n/**/\n/*    int num_orbitals = static_cast<int>(phi0.size());*/\n/*    auto zeta_indexer = response_space_index(num_orbitals);*/\n/**/\n/*    auto compute_result = [&](const int &i) {*/\n/*      auto results =*/\n/*          zero_functions_compressed<double, 3>(world, 2 * num_orbitals);*/\n/**/\n/*      const auto &zeta_bc = zeta_indexer.get_x_state(i, zeta_BC);*/\n/*      auto [result_x, result_y] = compute_vbc_i(zeta_BC, phi0);*/\n/*      for (int j = 0; j < num_orbitals; j++) {*/\n/*        auto index_x = j;*/\n/*        auto norm_x = result_x[j].norm2();*/\n/*        print(\"i,j = (\", i, j, \") index_x: \", index_x, \" norm_x: \", norm_x);*/\n/*        results[index_x] = result_x[j];*/\n/*      }*/\n/*      for (int j = 0; j < num_orbitals; j++) {*/\n/**/\n/*        auto index_y = j + num_orbitals;*/\n/*        auto norm_y = result_y[j].norm2();*/\n/*        print(\"i,j = (\", i, j, \") index_y: \", index_y, \" norm_y: \", norm_y);*/\n/*        results[index_y] = result_y[j];*/\n/*      }*/\n/**/\n/*      return results;*/\n/*    };*/\n/*    const int ij = static_cast<int>(batch.result.begin);*/\n/*    return compute_result(ij);*/\n/*  }*/\n/*};*/\n/**/\n/*class VBC_task_three : public MacroTaskOperationBase {*/\n/**/\n/*  class Partitioner : public MacroTaskPartitioner {*/\n/*  public:*/\n/*    explicit Partitioner(long stride) {*/\n/*      max_batch_size = 1;*/\n/*      result_stride = stride;*/\n/*      policy = \"strided\";*/\n/*    }*/\n/*  };*/\n/**/\n/*public:*/\n/*  long stride;*/\n/*  explicit VBC_task_three(long stride) : stride(stride) {*/\n/*    partitioner.reset(new Partitioner(stride));*/\n/*  }*/\n/*  // index b, index c, response B, response C, zetaBC, zetaCB, phi0,*/\n/*  // perturbation*/\n/*  typedef std::tuple<const std::vector<int> &, const std::vector<int> &,*/\n/*                     const std::vector<int> &, const vector_real_function_3d &,*/\n/*                     const vector_real_function_3d &,*/\n/*                     const vector_real_function_3d &,*/\n/*                     const vector_real_function_3d &>*/\n/*      argtupleT;*/\n/**/\n/*  using resultT = vector_real_function_3d;*/\n/**/\n/*  resultT allocator(World &world, const argtupleT &args) const {*/\n/**/\n/*    auto num_states = static_cast<int>(std::get<1>(args).size());*/\n/*    auto num_orbitals = static_cast<int>(std::get<5>(args).size());*/\n/*    auto num_functions = 2 * num_states * num_orbitals;*/\n/*    print(\"allocator: \", num_states, num_orbitals, num_functions);*/\n/**/\n/*    return zero_functions_compressed<double, 3>(world, num_functions);*/\n/*  };*/\n/**/\n/*  resultT*/\n/*  operator()(const std::vector<int> &dummy_i, const std::vector<int> &b,*/\n/*             const std::vector<int> &c, const vector_real_function_3d &B,*/\n/*             const vector_real_function_3d &C,*/\n/*             const vector_real_function_3d &phi0,*/\n/*             const vector_real_function_3d &dipole_perturbations) const {*/\n/**/\n/*    World &world = phi0[0].world();*/\n/*    madness::QProjector<double, 3> Q(phi0);*/\n/*    auto thresh = FunctionDefaults<3>::get_thresh();*/\n/**/\n/*    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {*/\n/*      const double lo = 1.e-10;*/\n/*      auto &world = ket[0].world();*/\n/*      Exchange<double, 3> k{world, lo};*/\n/*      k.set_bra_and_ket(bra, ket);*/\n/**/\n/*      std::string algorithm_ = \"multiworld_row\";*/\n/*      if (algorithm_ == \"multiworld\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::multiworld_efficient);*/\n/*      } else if (algorithm_ == \"multiworld_row\") {*/\n/*        k.set_algorithm(*/\n/*            Exchange<double, 3>::Algorithm::multiworld_efficient_row);*/\n/*      } else if (algorithm_ == \"largemem\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::large_memory);*/\n/*      } else if (algorithm_ == \"smallmem\") {*/\n/*        k.set_algorithm(Exchange<double, 3>::Algorithm::small_memory);*/\n/*      }*/\n/**/\n/*      return k;*/\n/*    };*/\n/*    // A and B are the response pairs that make up response density*/\n/*    // \\gamma_{a} = |xa><phi| + |phi><ya|*/\n/*    // This function constructs the J and K operators with A and B and applies*/\n/*    // on x*/\n/*    auto compute_g = [&](const vector_real_function_3d &Bx,*/\n/*                         const vector_real_function_3d &By,*/\n/*                         const vector_real_function_3d &Cx,*/\n/*                         const vector_real_function_3d &Cy,*/\n/*                         const vector_real_function_3d &phi) {*/\n/*      auto x_phi = mul(world, Bx, phi, true);*/\n/*      auto y_phi = mul(world, phi, By, true);*/\n/*      world.gop.fence();*/\n/*      auto rho = sum(world, x_phi, true);*/\n/*      world.gop.fence();*/\n/*      rho += sum(world, y_phi, true);*/\n/*      world.gop.fence();*/\n/*      auto lo = 1.e-10;*/\n/*      real_convolution_3d op =*/\n/*          CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());*/\n/*      auto temp_JB = apply(op, rho);*/\n/**/\n/*      // Two types here, apply on Cx and apply on phi*/\n/**/\n/*      auto JBCx = mul(world, temp_JB, Cx, false);*/\n/*      auto JBCy = mul(world, temp_JB, Cy, false);*/\n/*      auto JBphi = mul(world, temp_JB, phi, false);*/\n/**/\n/*      auto Kapply_x_Bx = K(Bx, phi);*/\n/*      auto Kapply_x_By = K(phi, By);*/\n/*      auto Kapply_y_By = K(By, phi);*/\n/*      auto Kapply_y_Bx = K(phi, Bx);*/\n/**/\n/*      auto Kbxcx = Kapply_x_Bx(Cx);*/\n/*      auto Kbycx = Kapply_x_By(Cx);*/\n/*      auto Kbycy = Kapply_y_By(Cy);*/\n/*      auto Kbxcy = Kapply_y_Bx(Cy);*/\n/**/\n/*      auto Kbxphi = Kapply_x_Bx(phi);*/\n/*      auto Kbyphi = Kapply_x_By(phi);*/\n/*      auto Kbxphi_conj = Kapply_y_Bx(phi);*/\n/*      auto Kbyphi_conj = Kapply_y_By(phi);*/\n/**/\n/*      auto kbcx = gaxpy_oop(1.0, Kbxcx, 1.0, Kbycx, false);*/\n/*      auto bxcy = gaxpy_oop(1.0, Kbxcy, 1.0, Kbycy, false);*/\n/*      auto Kbphi = gaxpy_oop(1.0, Kbxphi, 1.0, Kbyphi, false);*/\n/*      auto Kbphi_conj = gaxpy_oop(1.0, Kbxphi_conj, 1.0, Kbyphi_conj, false);*/\n/**/\n/*      world.gop.fence();*/\n/*      auto result_x = gaxpy_oop(2.0, JBCx, -1.0, kbcx, false);*/\n/*      auto result_y = gaxpy_oop(2.0, JBCy, -1.0, bxcy, false);*/\n/*      auto result_phi_x = gaxpy_oop(2.0, JBphi, -1.0, Kbphi, false);*/\n/*      auto result_phi_y = gaxpy_oop(2.0, JBphi, -1.0, Kbphi_conj, false);*/\n/*      world.gop.fence();*/\n/**/\n/*      return std::make_tuple(result_x, result_y, result_phi_x, result_phi_y);*/\n/*    };*/\n/*    auto compute_vbc_i = [&](const vector_real_function_3d &bx,*/\n/*                             const vector_real_function_3d &by,*/\n/*                             const vector_real_function_3d &cx,*/\n/*                             const vector_real_function_3d &cy,*/\n/*                             const vector_real_function_3d &phi,*/\n/*                             const real_function_3d &v) {*/\n/*      // left right pairs ka and kb and apply apply*/\n/**/\n/*      auto [gbc_x, gbc_y, gbc_phi_x, gbc_phi_y] =*/\n/*          compute_g(bx, by, cx, cy, phi);*/\n/**/\n/*      auto vcx = mul(world, v, cx, true);*/\n/*      auto vcy = mul(world, v, cy, true);*/\n/**/\n/*      auto fbx = -1.0 * Q(gbc_x + vcx);*/\n/*      auto fby = -1.0 * Q(gbc_y + vcy);*/\n/**/\n/*      auto vb_phi = mul(world, v, phi, true);*/\n/**/\n/*      auto fb_phi_x = gbc_phi_x + vb_phi;*/\n/*      auto fb_phi_y = gbc_phi_y + vb_phi;*/\n/**/\n/*      auto m_fbx = matrix_inner(world, phi, fb_phi_x);*/\n/*      auto m_fby = matrix_inner(world, phi, fb_phi_y);*/\n/**/\n/*      auto fphi_x = transform(world, cx, m_fbx, true);*/\n/*      auto fphi_y = transform(world, cy, m_fby, true);*/\n/**/\n/*      auto result_x = fbx + fphi_x;*/\n/*      auto result_y = fby + fphi_y;*/\n/**/\n/*      return std::make_pair(result_x, result_y);*/\n/*    };*/\n/**/\n/*    int num_orbitals = static_cast<int>(phi0.size());*/\n/*    int num_states = static_cast<int>(b.size());*/\n/**/\n/*    auto bc_indexer = x_space_indexer(num_orbitals);*/\n/*    auto compute_result = [&](const int &i) {*/\n/*      auto results =*/\n/*          zero_functions_compressed<double, 3>(world, 2 * num_orbitals);*/\n/**/\n/*      auto bi = b[i];*/\n/*      auto ci = c[i];*/\n/*      const auto &bx = bc_indexer.get_x_state(bi, B);*/\n/*      const auto &by = bc_indexer.get_y_state(bi, B);*/\n/*      const auto &cx = bc_indexer.get_x_state(ci, C);*/\n/*      const auto &cy = bc_indexer.get_y_state(ci, C);*/\n/**/\n/*      const auto &vb = dipole_perturbations[bi];*/\n/*      const auto &vc = dipole_perturbations[ci];*/\n/**/\n/*      auto [bcx, bcy] = compute_vbc_i(bx, by, cx, cy, phi0, vb);*/\n/*      auto [cbx, cby] = compute_vbc_i(cx, cy, bx, by, phi0, vc);*/\n/**/\n/*      auto result_x = gaxpy_oop(1.0, bcx, 1.0, cbx, true);*/\n/*      auto result_y = gaxpy_oop(1.0, bcy, 1.0, cby, true);*/\n/**/\n/*      for (int j = 0; j < num_orbitals; j++) {*/\n/**/\n/*        auto index_x = j;*/\n/*        auto norm_x = result_x[j].norm2();*/\n/*        print(\"i,j = (\", i, j, \") index_x: \", index_x, \" norm_x: \", norm_x);*/\n/*        results[index_x] = result_x[j];*/\n/*      }*/\n/**/\n/*      for (int j = 0; j < num_orbitals; j++) {*/\n/**/\n/*        auto index_y = j + num_orbitals;*/\n/*        auto norm_y = result_y[j].norm2();*/\n/*        print(\"i,j = (\", i, j, \") index_y: \", index_y, \" norm_y: \", norm_y);*/\n/*        results[index_y] = result_y[j];*/\n/*      }*/\n/**/\n/*      return results;*/\n/*    };*/\n/*    const int ij = static_cast<int>(batch.result.begin);*/\n/*    return compute_result(ij);*/\n/*  }*/\n/*};*/\n/**/\nclass VBC_task_one_i : public MacroTaskOperationBase {\n\n  class Partitioner : public MacroTaskPartitioner {\n  public:\n    Partitioner() {\n      max_batch_size = 1;\n      //  result_stride = stride;\n      //  policy = \"strided\";\n    }\n  };\n\npublic:\n  VBC_task_one_i() { partitioner.reset(new Partitioner()); }\n  // index b, index c, response B, response C, zetaBC, zetaCB, phi0,\n  // perturbation\n  typedef std::tuple<const std::vector<int> &, const std::vector<int> &,\n                     const vector_real_function_3d &,\n                     const vector_real_function_3d &,\n                     const vector_real_function_3d &>\n      argtupleT;\n\n  using resultT = vector_real_function_3d;\n\n  resultT allocator(World &world, const argtupleT &args) const {\n    auto num_functions = static_cast<int>(std::get<0>(args).size());\n    return zero_functions_compressed<double, 3>(world, num_functions);\n  };\n\n  resultT operator()(const std::vector<int> &b, const std::vector<int> &c,\n                     const vector_real_function_3d &B,\n                     const vector_real_function_3d &C,\n                     const vector_real_function_3d &phi0) const {\n\n    World &world = phi0[0].world();\n    madness::QProjector<double, 3> Q(phi0);\n    // auto thresh = FunctionDefaults<3>::get_thresh();\n\n    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {\n      const double lo = 1.e-10;\n      auto &world = ket[0].world();\n      Exchange<double, 3> k{world, lo};\n      k.set_bra_and_ket(bra, ket);\n      std::string algorithm_ = \"multiworld_row\";\n      if (algorithm_ == \"multiworld\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient);\n      } else if (algorithm_ == \"multiworld_row\") {\n        k.set_algorithm(\n            Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient_row);\n      } else if (algorithm_ == \"largemem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::large_memory);\n      } else if (algorithm_ == \"smallmem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::small_memory);\n      }\n\n      return k;\n    };\n    // In this example we only apply once to either x or y orbital.  If x we\n    // just reverse left and right in the call\n    auto compute_g_i = [&](const vector_real_function_3d &Aleft,\n                           const vector_real_function_3d &Aright,\n                           const real_function_3d &phi) {\n      auto x_phi = mul(world, Aleft, Aright, true);\n      world.gop.fence();\n      auto rho = sum(world, x_phi, true);\n      auto lo = 1.e-10;\n      real_convolution_3d op =\n          CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());\n      auto temp_J = apply(op, rho);\n      auto Jx = temp_J * phi;\n      auto kx = K(Aleft, Aright)(phi);\n      auto result_x = gaxpy_oop(2.0, Jx.compress(), -1.0, kx.compress(), true);\n\n      return result_x;\n    };\n    auto compute_vbc_i = [&](const vector_real_function_3d &bx,\n                             const vector_real_function_3d &cy,\n                             const vector_real_function_3d &phi, int j) {\n      auto gzeta_x = compute_g_i(bx, cy, phi0[j]);\n      gzeta_x = -1.0 * Q(gzeta_x);\n      return gzeta_x;\n    };\n    int num_orbitals = static_cast<int>(phi0.size());\n    auto bc_indexer = x_space_indexer(num_orbitals);\n    auto compute_result = [&](const int &i) {\n      resultT result = zero_functions_compressed<double, 3>(world, 1);\n      auto bi = b[i];\n      auto ci = c[i];\n      auto response_orbital_index = i % (num_orbitals * 2);\n      bool type_x = true;\n      if (response_orbital_index < num_orbitals) {\n        type_x = true;\n      } else {\n        type_x = false;\n        response_orbital_index -= num_orbitals;\n      }\n      const auto &bx = bc_indexer.get_x_state(bi, B);\n      const auto &by = bc_indexer.get_y_state(bi, B);\n      const auto &cx = bc_indexer.get_x_state(ci, C);\n      const auto &cy = bc_indexer.get_y_state(ci, C);\n\n      real_function_3d one, two;\n      if (type_x) {\n        one = compute_vbc_i(bx, cy, phi0, response_orbital_index);\n        two = compute_vbc_i(cx, by, phi0, response_orbital_index);\n      } else {\n        one = compute_vbc_i(cy, bx, phi0, response_orbital_index);\n        two = compute_vbc_i(by, cx, phi0, response_orbital_index);\n      }\n      result[0] = gaxpy_oop(1.0, one, 1.0, two, true);\n      return result;\n    };\n    const long ij = batch.result.begin;\n    return compute_result(ij);\n  }\n};\nclass VBC_task_two_i_copy : public MacroTaskOperationBase {\n\n  class Partitioner : public MacroTaskPartitioner {\n  public:\n    Partitioner() {\n      max_batch_size = 1;\n      //  result_stride = stride;\n      //  policy = \"strided\";\n    }\n  };\n\npublic:\n  VBC_task_two_i_copy() { partitioner.reset(new Partitioner()); }\n  // index b, index c, response B, response C, zetaBC, zetaCB, phi0,\n  // perturbation\n  typedef std::tuple<const std::vector<int> &, const vector_real_function_3d &,\n                     const vector_real_function_3d &>\n      argtupleT;\n\n  using resultT = vector_real_function_3d;\n\n  resultT allocator(World &world, const argtupleT &args) const {\n\n    // In this example the first index is index of all orbitals we are working\n    // with\n    auto num_functions = static_cast<int>(std::get<0>(args).size());\n    // auto num_orbitals = static_cast<int>(std::get<7>(args).size());\n    // auto num_functions = 2 * num_states * num_orbitals;\n    // print(\"allocator: \", num_states, num_orbitals, num_functions);\n\n    return zero_functions_compressed<double, 3>(world, num_functions);\n  };\n\n  resultT operator()(const std::vector<int> &state_index,\n                     const vector_real_function_3d &zeta_BC,\n                     const vector_real_function_3d &phi0) const {\n\n    World &world = phi0[0].world();\n    madness::QProjector<double, 3> Q(phi0);\n    // auto thresh = FunctionDefaults<3>::get_thresh();\n\n    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {\n      const double lo = 1.e-10;\n      auto &world = ket[0].world();\n      Exchange<double, 3> k{world, lo};\n      k.set_bra_and_ket(bra, ket);\n\n      std::string algorithm_ = \"multiworld_row\";\n      if (algorithm_ == \"multiworld\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient);\n      } else if (algorithm_ == \"multiworld_row\") {\n        k.set_algorithm(\n            Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient_row);\n      } else if (algorithm_ == \"largemem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::large_memory);\n      } else if (algorithm_ == \"smallmem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::small_memory);\n      }\n\n      return k;\n    };\n    // In this example we only apply once to either x or y orbital.  If x we\n    // just reverse left and right in the call\n    auto compute_g_i = [&](const vector_real_function_3d &Aleft,\n                           const vector_real_function_3d &Aright,\n                           const real_function_3d &phi) {\n      auto x_phi = mul(world, Aleft, Aright, true);\n      world.gop.fence();\n      auto rho = sum(world, x_phi, true);\n      auto lo = 1.e-10;\n      real_convolution_3d op =\n          CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());\n      auto temp_J = apply(op, rho);\n      auto Jx = temp_J * phi;\n      auto kx = K(Aleft, Aright)(phi);\n      auto result_x = gaxpy_oop(2.0, Jx.compress(), -1.0, kx.compress(), true);\n\n      return result_x;\n    };\n\n    auto compute_vbc_i = [&](const vector_real_function_3d &phi_bc,\n                             const vector_real_function_3d &phi,\n                             const real_function_3d phi_apply) {\n      // left right pairs ka and kb and apply apply\n      // TODO: There maybe an optimization that can tell whether we can skip\n      // this orbital or not\n      auto gzeta_x = compute_g_i(phi_bc, phi, phi_apply);\n      gzeta_x = -1.0 * Q(gzeta_x);\n      return gzeta_x;\n    };\n    int num_orbitals = static_cast<int>(phi0.size());\n    auto zeta_indexer = response_space_index(num_orbitals);\n    auto compute_result = [&](const int &i) {\n      resultT result = zero_functions_compressed<double, 3>(world, 1);\n      auto si = state_index[i];\n      auto response_orbital_index = i % (num_orbitals * 2);\n      bool type_x = true;\n      if (response_orbital_index < num_orbitals) {\n        type_x = true;\n      } else {\n        type_x = false;\n        response_orbital_index -= num_orbitals;\n      }\n      const auto &zeta_bc = zeta_indexer.get_x_state(si, zeta_BC);\n      real_function_3d one, two;\n      if (type_x) {\n        one = compute_vbc_i(zeta_bc, phi0, phi0[response_orbital_index]);\n      } else {\n        one = compute_vbc_i(phi0, zeta_bc, phi0[response_orbital_index]);\n      }\n      result[0] = one;\n\n      return result;\n    };\n    const long ij = batch.result.begin;\n    return compute_result(ij);\n  }\n};\n\nclass VBC_task_two_i : public MacroTaskOperationBase {\n\n  class Partitioner : public MacroTaskPartitioner {\n  public:\n    Partitioner() {\n      max_batch_size = 1;\n      //  result_stride = stride;\n      //  policy = \"strided\";\n    }\n  };\n\npublic:\n  VBC_task_two_i() { partitioner.reset(new Partitioner()); }\n  // index b, index c, response B, response C, zetaBC, zetaCB, phi0,\n  // perturbation\n\n  typedef std::tuple<const std::vector<int> &, const std::vector<int> &,\n                     const vector_real_function_3d &,\n                     const vector_real_function_3d &,\n                     const vector_real_function_3d &>\n      argtupleT;\n\n  using resultT = vector_real_function_3d;\n\n  resultT allocator(World &world, const argtupleT &args) const {\n    auto num_functions = static_cast<int>(std::get<0>(args).size());\n    return zero_functions_compressed<double, 3>(world, num_functions);\n  };\n\n  resultT operator()(const std::vector<int> &b, const std::vector<int> &c,\n                     const vector_real_function_3d &B,\n                     const vector_real_function_3d &C,\n                     const vector_real_function_3d &phi0) const {\n\n    World &world = phi0[0].world();\n    madness::QProjector<double, 3> Q(phi0);\n    // auto thresh = FunctionDefaults<3>::get_thresh();\n\n    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {\n      const double lo = 1.e-10;\n      auto &world = ket[0].world();\n      Exchange<double, 3> k{world, lo};\n      k.set_bra_and_ket(bra, ket);\n      std::string algorithm_ = \"multiworld_row\";\n      if (algorithm_ == \"multiworld\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient);\n      } else if (algorithm_ == \"multiworld_row\") {\n        k.set_algorithm(\n            Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient_row);\n      } else if (algorithm_ == \"largemem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::large_memory);\n      } else if (algorithm_ == \"smallmem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::small_memory);\n      }\n\n      return k;\n    };\n    // In this example we only apply once to either x or y orbital.  If x we\n    // just reverse left and right in the call\n    auto compute_g_i = [&](const vector_real_function_3d &Aleft,\n                           const vector_real_function_3d &Aright,\n                           const real_function_3d &phi) {\n      auto x_phi = mul(world, Aleft, Aright, true);\n      world.gop.fence();\n      auto rho = sum(world, x_phi, true);\n      auto lo = 1.e-10;\n      real_convolution_3d op =\n          CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());\n      auto temp_J = apply(op, rho);\n      auto Jx = temp_J * phi;\n      auto kx = K(Aleft, Aright)(phi);\n      auto result_x = gaxpy_oop(2.0, Jx.compress(), -1.0, kx.compress(), true);\n\n      return result_x;\n    };\n\n    int num_orbitals = static_cast<int>(phi0.size());\n    auto bc_indexer = x_space_indexer(num_orbitals);\n    auto compute_result = [&](const int &i) {\n      resultT result = zero_functions_compressed<double, 3>(world, 1);\n      auto bi = b[i];\n      auto ci = c[i];\n      auto response_orbital_index = i % (num_orbitals * 2);\n      bool type_x = true;\n      if (response_orbital_index < num_orbitals) {\n        type_x = true;\n      } else {\n        type_x = false;\n        response_orbital_index -= num_orbitals;\n      }\n      const auto &by = bc_indexer.get_y_state(bi, B);\n      const auto &cx = bc_indexer.get_x_state(ci, C);\n\n      auto make_zeta_bc = [&](const vector_real_function_3d &by,\n                              const vector_real_function_3d &cx,\n                              const vector_real_function_3d &ground_orbitals) {\n        auto matrix_bc = matrix_inner(world, by, cx);\n        return -1.0 * transform(world, ground_orbitals, matrix_bc, true);\n      };\n\n      //  auto ztask = ComputeZetaBC(static_cast<int>(ground_orbitals.size()));\n\n      vector_real_function_3d zeta_BC;\n      zeta_BC = make_zeta_bc(by, cx, phi0);\n      real_function_3d gzeta_x;\n\n      if (type_x) {\n        gzeta_x = compute_g_i(phi0, zeta_BC, phi0[response_orbital_index]);\n      } else {\n        gzeta_x = compute_g_i(zeta_BC, phi0, phi0[response_orbital_index]);\n      }\n      gzeta_x = -1.0 * Q(gzeta_x);\n      result[0] = gzeta_x;\n      return result;\n    };\n    const long ij = batch.result.begin;\n    return compute_result(ij);\n  }\n};\n\nclass VBC_task_three_i : public MacroTaskOperationBase {\n\n  class Partitioner : public MacroTaskPartitioner {\n  public:\n    Partitioner() {\n      max_batch_size = 1;\n      //  result_stride = stride;\n      //  policy = \"strided\";\n    }\n  };\n\npublic:\n  VBC_task_three_i() { partitioner.reset(new Partitioner()); }\n  // index b, index c, response B, response C, zetaBC, zetaCB, phi0,\n  // perturbation\n  typedef std::tuple<\n      const std::vector<int> &, const std::vector<int> &,\n      const vector_real_function_3d &, const vector_real_function_3d &,\n      const vector_real_function_3d &, const vector_real_function_3d &>\n      argtupleT;\n\n  using resultT = vector_real_function_3d;\n\n  resultT allocator(World &world, const argtupleT &args) const {\n\n    // In this example the first index is index of all orbitals we are working\n    // with\n    auto num_functions = static_cast<int>(std::get<0>(args).size());\n    // auto num_orbitals = static_cast<int>(std::get<7>(args).size());\n    // auto num_functions = 2 * num_states * num_orbitals;\n    // print(\"allocator: \", num_states, num_orbitals, num_functions);\n\n    return zero_functions_compressed<double, 3>(world, num_functions);\n  };\n\n  resultT\n  operator()(const std::vector<int> &b, const std::vector<int> &c,\n             const vector_real_function_3d &B, const vector_real_function_3d &C,\n             const vector_real_function_3d &phi0,\n             const vector_real_function_3d &dipole_perturbations) const {\n\n    World &world = phi0[0].world();\n    madness::QProjector<double, 3> Q(phi0);\n    // auto thresh = FunctionDefaults<3>::get_thresh();\n\n    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {\n      const double lo = 1.e-10;\n      auto &world = ket[0].world();\n      Exchange<double, 3> k{world, lo};\n      k.set_bra_and_ket(bra, ket);\n\n      std::string algorithm_ = \"multiworld_row\";\n      if (algorithm_ == \"multiworld\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient);\n      } else if (algorithm_ == \"multiworld_row\") {\n        k.set_algorithm(\n            Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient_row);\n      } else if (algorithm_ == \"largemem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::large_memory);\n      } else if (algorithm_ == \"smallmem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::small_memory);\n      }\n\n      return k;\n    };\n    // In this example we only apply once to either x or y orbital.  If x we\n    // just reverse left and right in the call\n    auto compute_g_i = [&](const vector_real_function_3d &Bleft,\n                           const vector_real_function_3d &Bright,\n                           const vector_real_function_3d &phi,\n                           const real_function_3d &cx_ii,\n                           const real_function_3d &phi_i) {\n      auto x_phi = mul(world, Bleft, phi, true);\n      auto y_phi = mul(world, phi, Bright, true);\n      world.gop.fence();\n      auto rho = sum(world, x_phi, true);\n      rho += sum(world, y_phi, true);\n      auto lo = 1.e-10;\n      real_convolution_3d op =\n          CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());\n      auto temp_J = apply(op, rho);\n\n      auto Jxc = temp_J * cx_ii;\n      auto Jx_phi = temp_J * phi_i;\n      // mul(temp_J, phix, true);\n\n      auto kone = K(Bleft, phi);\n      auto ktwo = K(phi, Bright);\n\n      auto kone_c = kone(cx_ii);\n      auto ktwo_c = ktwo(cx_ii);\n\n      auto kone_phi = kone(phi_i);\n      auto ktwo_phi = ktwo(phi_i);\n\n      auto Kcx = kone_c + ktwo_c;\n      auto Kphi = kone_phi + ktwo_phi;\n\n      auto result_cx =\n          gaxpy_oop(2.0, Jxc.compress(), -1.0, Kcx.compress(), true);\n      auto result_phi =\n          gaxpy_oop(2.0, Jx_phi.compress(), -1.0, Kphi.compress(), true);\n\n      return std::make_pair(result_cx, result_phi);\n    };\n\n    auto compute_vbc_i = [&](const vector_real_function_3d &bx,\n                             const vector_real_function_3d &by,\n                             const vector_real_function_3d &c,\n                             const vector_real_function_3d &phi,\n                             const real_function_3d &v, int j) {\n      auto [gbc_x, gbc_phi_x] = compute_g_i(bx, by, phi, c[j], phi[j]);\n      auto vcx = v * c[j];\n      auto fbx = -1.0 * Q(gbc_x + vcx);\n      // This is the tricky bit, Here we need to compute the vector of functions\n      // and multiply by phi[i] and take the trace of each to get a 1D tensor to\n      // multiple by cx auto vb_phi = mul(world, v, phi, true);\n      auto vb_phi = v * phi[j];\n      auto fb_phi_x = mul(world, gbc_phi_x + vb_phi, phi);\n      // this phi*(gbc + vb)_p is a vector of functions\n\n      Tensor<double> m_fbi_row = Tensor<double>(fb_phi_x.size());\n      for (size_t i = 0; i < fb_phi_x.size(); i++) {\n        m_fbi_row[i] = fb_phi_x[i].trace();\n      }\n      auto num_orbitals = static_cast<int>(phi0.size());\n      m_fbi_row.reshape({num_orbitals, 1});\n      auto fphi_x = transform(world, c, m_fbi_row, true);\n\n      auto result_x = fbx + fphi_x[0];\n      return result_x;\n    };\n    int num_orbitals = static_cast<int>(phi0.size());\n    auto bc_indexer = x_space_indexer(num_orbitals);\n    // auto zeta_indexer = response_space_index(num_orbitals);\n\n    auto compute_result = [&](const int &i) {\n      resultT result = zero_functions_compressed<double, 3>(world, 1);\n      auto bi = b[i];\n      auto ci = c[i];\n      auto response_orbital_index = i % (num_orbitals * 2);\n      bool type_x = true;\n      if (response_orbital_index < num_orbitals) {\n        type_x = true;\n      } else {\n        type_x = false;\n        response_orbital_index -= num_orbitals;\n      }\n\n      const auto &bx = bc_indexer.get_x_state(bi, B);\n      const auto &by = bc_indexer.get_y_state(bi, B);\n      const auto &cx = bc_indexer.get_x_state(ci, C);\n      const auto &cy = bc_indexer.get_y_state(ci, C);\n      const auto &vb = dipole_perturbations[bi];\n      const auto &vc = dipole_perturbations[ci];\n      real_function_3d one, two;\n      if (type_x) {\n        one = compute_vbc_i(bx, by, cx, phi0, vb, response_orbital_index);\n        two = compute_vbc_i(cx, cy, bx, phi0, vc, response_orbital_index);\n      } else {\n        one = compute_vbc_i(by, bx, cy, phi0, vb, response_orbital_index);\n        two = compute_vbc_i(cy, cx, by, phi0, vc, response_orbital_index);\n      }\n      result[0] = gaxpy_oop(1.0, one, 1.0, two, true);\n      return result;\n    };\n    const long ij = batch.result.begin;\n    return compute_result(ij);\n  }\n};\n\nclass VBC_task_i : public MacroTaskOperationBase {\n\n  class Partitioner : public MacroTaskPartitioner {\n  public:\n    Partitioner() {\n      max_batch_size = 1;\n      //  result_stride = stride;\n      //  policy = \"strided\";\n    }\n  };\n\npublic:\n  VBC_task_i() { partitioner.reset(new Partitioner()); }\n  // index b, index c, response B, response C, zetaBC, zetaCB, phi0,\n  // perturbation\n  typedef std::tuple<\n      const std::vector<int> &, const std::vector<int> &,\n      const std::vector<int> &, const std::vector<int> &,\n      const vector_real_function_3d &, const vector_real_function_3d &,\n      const vector_real_function_3d &, const vector_real_function_3d &,\n      const vector_real_function_3d &, const vector_real_function_3d &>\n      argtupleT;\n\n  using resultT = vector_real_function_3d;\n\n  resultT allocator(World &world, const argtupleT &args) const {\n\n    // In this example the first index is index of all orbitals we are working\n    // with\n    auto num_functions = static_cast<int>(std::get<0>(args).size());\n    // auto num_orbitals = static_cast<int>(std::get<7>(args).size());\n    // auto num_functions = 2 * num_states * num_orbitals;\n    // print(\"allocator: \", num_states, num_orbitals, num_functions);\n\n    return zero_functions_compressed<double, 3>(world, num_functions);\n  };\n\n  resultT\n  operator()(const std::vector<int> &orb_index,\n             const std::vector<int> &state_index, const std::vector<int> &b,\n             const std::vector<int> &c, const vector_real_function_3d &B,\n             const vector_real_function_3d &C,\n             const vector_real_function_3d &zeta_BC,\n             const vector_real_function_3d &zeta_CB,\n             const vector_real_function_3d &phi0,\n             const vector_real_function_3d &dipole_perturbations) const {\n\n    World &world = phi0[0].world();\n    madness::QProjector<double, 3> Q(phi0);\n    // auto thresh = FunctionDefaults<3>::get_thresh();\n\n    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {\n      const double lo = 1.e-10;\n      auto &world = ket[0].world();\n      Exchange<double, 3> k{world, lo};\n      k.set_bra_and_ket(bra, ket);\n\n      std::string algorithm_ = \"multiworld_row\";\n      if (algorithm_ == \"multiworld\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient);\n      } else if (algorithm_ == \"multiworld_row\") {\n        k.set_algorithm(\n            Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient_row);\n      } else if (algorithm_ == \"largemem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::large_memory);\n      } else if (algorithm_ == \"smallmem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::small_memory);\n      }\n\n      return k;\n    };\n    // In this example we only apply once to either x or y orbital.  If x we\n    // just reverse left and right in the call\n    auto compute_g_i = [&](const vector_real_function_3d &Aleft,\n                           const vector_real_function_3d &Aright,\n                           const vector_real_function_3d &Bleft,\n                           const vector_real_function_3d &Bright,\n                           const real_function_3d &phix) {\n      auto x_phi = mul(world, Aleft, Aright, true);\n      auto y_phi = mul(world, Bleft, Bright, true);\n      world.gop.fence();\n      auto rho = sum(world, x_phi, true);\n      rho += sum(world, y_phi, true);\n      auto lo = 1.e-10;\n      real_convolution_3d op =\n          CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());\n      auto temp_J = apply(op, rho);\n\n      auto Jx = temp_J * phix;\n      // mul(temp_J, phix, true);\n\n      auto ka = K(Aleft, Aright)(phix); // what happens to k after this?\n      auto kb = K(Bleft, Bright)(phix);\n\n      // ideally it runs and the Exchange operator is freed\n      auto Kx = ka + kb; // gaxpy_oop(1.0, ka, 1.0, kb, true);\n      auto result_x = gaxpy_oop(2.0, Jx.compress(), -1.0, Kx.compress(), true);\n\n      return result_x;\n    };\n\n    auto compute_vbc_i = [&](const vector_real_function_3d &bx,\n                             const vector_real_function_3d &by,\n                             const vector_real_function_3d &cx,\n                             const vector_real_function_3d &cy,\n                             const vector_real_function_3d &bx_zeta,\n                             const vector_real_function_3d &cy_zeta,\n                             const vector_real_function_3d &phi_bc,\n                             const vector_real_function_3d &zeta_bc,\n                             const vector_real_function_3d &phi,\n                             const real_function_3d &v, int j) {\n      // left right pairs ka and kb and apply apply\n      // TODO: There maybe an optimization that can tell whether we can skip\n      // this orbital or not\n\n      auto gzeta_x = compute_g_i(bx_zeta, cy_zeta, phi_bc, zeta_bc, phi0[j]);\n      gzeta_x = -1.0 * Q(gzeta_x);\n      auto gbc_x = compute_g_i(bx, phi0, phi0, by, cx[j]);\n\n      auto vcx = v * cx[j];\n\n      auto fbx = -1.0 * Q(gbc_x + vcx);\n\n      // This is the tricky bit, Here we need to compute the vector of functions\n      // and multiply by phi[i] and take the trace of each to get a 1D tensor to\n      // multiple by cx auto vb_phi = mul(world, v, phi, true);\n      auto vb_phi = v * phi[j];\n      auto gbc_phi_x = compute_g_i(bx, phi0, phi0, by, phi0[j]);\n      auto fb_phi_x = mul(world, gbc_phi_x + vb_phi, phi);\n      // this phi*(gbc + vb)_p is a vector of functions\n      Tensor<double> m_fbi_row = Tensor<double>(fb_phi_x.size());\n      for (size_t i = 0; i < fb_phi_x.size(); i++) {\n        m_fbi_row[i] = fb_phi_x[i].trace();\n      }\n\n      auto num_orbitals = static_cast<int>(phi0.size());\n      m_fbi_row.reshape({num_orbitals, 1});\n\n      auto fphi_x = transform(world, cx, m_fbi_row, true);\n\n      auto result_x = gzeta_x + fbx + fphi_x[0];\n      return result_x.truncate();\n    };\n    int num_orbitals = static_cast<int>(phi0.size());\n    auto bc_indexer = x_space_indexer(num_orbitals);\n    auto zeta_indexer = response_space_index(num_orbitals);\n    auto compute_result = [&](const int &i) {\n      resultT result = zero_functions_compressed<double, 3>(world, 1);\n      // Now I should assume that each b and c will have all of the\n      // corresponding [00000,00000,0000,11111,11111,11111,] or I find a way to\n      // intelligently map i to bi and ci\n      auto bi = b[i];\n      auto ci = c[i];\n      auto si = state_index[i];\n\n      auto response_orbital_index = i % (num_orbitals * 2);\n      bool type_x = true;\n      if (response_orbital_index < num_orbitals) {\n        type_x = true;\n      } else {\n        type_x = false;\n        response_orbital_index -= num_orbitals;\n      }\n\n      const auto &bx = bc_indexer.get_x_state(bi, B);\n      const auto &by = bc_indexer.get_y_state(bi, B);\n      const auto &cx = bc_indexer.get_x_state(ci, C);\n      const auto &cy = bc_indexer.get_y_state(ci, C);\n\n      const auto &zeta_bc = zeta_indexer.get_x_state(si, zeta_BC);\n      const auto &zeta_cb = zeta_indexer.get_x_state(si, zeta_CB);\n\n      const auto &vb = dipole_perturbations[bi];\n      const auto &vc = dipole_perturbations[ci];\n      real_function_3d one, two;\n      if (type_x) {\n        one = compute_vbc_i(bx, by, cx, cy, bx, cy, phi0, zeta_bc, phi0, vb,\n                            response_orbital_index);\n        two = compute_vbc_i(cx, cy, bx, by, cx, by, phi0, zeta_cb, phi0, vc,\n                            response_orbital_index);\n      } else {\n        one = compute_vbc_i(by, bx, cy, cx, cy, bx, zeta_bc, phi0, phi0, vb,\n                            response_orbital_index);\n        two = compute_vbc_i(cy, cx, by, bx, by, cx, zeta_cb, phi0, phi0, vc,\n                            response_orbital_index);\n      }\n\n      result[0] = gaxpy_oop(1.0, one, 1.0, two, true);\n      auto norm_r = result[0].norm2();\n\n      print(\"VBC_task_i: \", i, \"bi: \", bi, \"ci: \", ci, \"si: \", si,\n            \"response_orbital_index: \", response_orbital_index,\n            \"type_x: \", type_x, \" norm: \", norm_r);\n\n      return result;\n    };\n    const long ij = batch.result.begin;\n    return compute_result(ij);\n  }\n};\n\n// class ComputeBetaTask : public MacroTaskOperationBase {\n\n//   int dummy_variable = 24;\n\n//   class Partitioner : public MacroTaskPartitioner {\n//   public:\n//     Partitioner() {\n//       max_batch_size = 1;\n//       //  result_stride = stride;\n//       //  policy = \"strided\";\n//     }\n//   };\n\n// public:\n//   ComputeBetaTask() { partitioner.reset(new Partitioner()); }\n\n//   // beta_abc = -2 * <bx|cy * va> + <cx|by * va> + <zeta_bc|phi0 * va> +\n//   // <zeta_cb|phi0 * va> + <ax|vbcx> + <ay|vbcy> beta[i], a, b, c, A, B, C,\n//   // zeta_BC, zeta_CB, phi0, dipole_perturbations, vbc\n//   typedef std::tuple<const std::vector<int> &,        // i\n//                      const std::vector<int> &,        // a\n//                      const std::vector<int> &,        // b\n//                      const std::vector<int> &,        // c\n//                      const vector_real_function_3d &, // A\n//                      const vector_real_function_3d &, // B\n//                      const vector_real_function_3d &, // C\n//                      const vector_real_function_3d &, // zeta_BC\n//                      const vector_real_function_3d &, // zeta_CB\n//                      const vector_real_function_3d &, // phi0\n//                      const vector_real_function_3d &, // dipole_perturbations\n//                      const vector_real_function_3d &  // vbc\n//                      >\n//       argtupleT;\n\n//   typedef std::vector<std::shared_ptr<ScalarResult<double>>> resultT;\n\n//   resultT allocator(World &world, const argtupleT &args) const {\n//     std::size_t n = std::get<0>(args).size();\n//     return scalar_result_shared_ptr_vector<double>(world, n);\n//   };\n\n//   resultT operator()(const std::vector<int> &i, const std::vector<int> &a,\n//                      const std::vector<int> &b, const std::vector<int> &c,\n//                      const vector_real_function_3d &A,\n//                      const vector_real_function_3d &B,\n//                      const vector_real_function_3d &C,\n//                      const vector_real_function_3d &zeta_BC,\n//                      const vector_real_function_3d &zeta_CB,\n//                      const vector_real_function_3d &phi0,\n//                      const vector_real_function_3d &dipole_perturbations,\n//                      const vector_real_function_3d &vbc) const\n\n//   {\n\n//     World &world = B[0].world();\n//     auto result = scalar_result_shared_ptr_vector<double>(world, 1);\n\n//     auto compute_beta_i = [&](const vector_real_function_3d &ax,\n//                               const vector_real_function_3d &ay,\n//                               const vector_real_function_3d &bx,\n//                               const vector_real_function_3d &by,\n//                               const vector_real_function_3d &cx,\n//                               const vector_real_function_3d &cy,\n//                               const vector_real_function_3d &zeta_bc,\n//                               const vector_real_function_3d &zeta_cb,\n//                               const vector_real_function_3d &phi0,\n//                               const real_function_3d &va,\n//                               const vector_real_function_3d &vbcx,\n//                               const vector_real_function_3d &vbcy) {\n//       auto one = dot(world, bx, cy * va);\n//       auto three = dot(world, cx, by * va);\n\n//       auto two = dot(world, zeta_bc, phi0 * va);\n//       auto four = dot(world, zeta_cb, phi0 * va);\n\n//       auto five = dot(world, ax, vbcx, true);\n//       auto six = dot(world, ay, vbcy, true);\n\n//       auto one_trace = one.trace();\n//       auto two_trace = two.trace();\n//       auto three_trace = three.trace();\n//       auto four_trace = four.trace();\n//       auto five_trace = five.trace();\n//       auto six_trace = six.trace();\n\n//       auto beta = one_trace + two_trace + three_trace + four_trace +\n//                   five_trace + six_trace;\n//       *result[0] = -2.0 * beta;\n//       return result;\n//     };\n\n//     std::cout << \"compute_beta: \" << dummy_variable << std::endl;\n\n//     const long m = batch.result.begin;\n\n//     auto ak = a[m];\n//     auto bk = b[m];\n//     auto ck = c[m];\n//     auto ik = i[m];\n\n//     auto num_orbitals = static_cast<int>(phi0.size());\n\n//     x_space_indexer x_space_indexer(num_orbitals);\n//     response_space_index response_space_index(num_orbitals);\n//     auto ax = x_space_indexer.get_x_state(ak, A);\n//     auto ay = x_space_indexer.get_y_state(ak, A);\n//     auto bx = x_space_indexer.get_x_state(bk, B);\n//     auto by = x_space_indexer.get_y_state(bk, B);\n//     auto cx = x_space_indexer.get_x_state(ck, C);\n//     auto cy = x_space_indexer.get_y_state(ck, C);\n//     auto zeta_bc = response_space_index.get_x_state(ik, zeta_BC);\n//     auto zeta_cb = response_space_index.get_x_state(ik, zeta_CB);\n//     auto va = dipole_perturbations[ak];\n//     auto vbcx = x_space_indexer.get_x_state(ik, vbc);\n//     auto vbcy = x_space_indexer.get_y_state(ik, vbc);\n\n//     return compute_beta_i(ax, ay, bx, by, cx, cy, zeta_bc, zeta_cb, phi0, va,\n//                           vbcx, vbcy);\n//   }\n// };\n/*class ComputeZetaBC : public MacroTaskOperationBase {*/\n/**/\n/*private:*/\n/*  vector_real_function_3d phi0;*/\n/*  int num_orbitals;*/\n/**/\n/*  class Partitioner : public MacroTaskPartitioner {*/\n/*  public:*/\n/*    Partitioner(int stride) {*/\n/*      max_batch_size = 1;*/\n/*      result_stride = stride;*/\n/*      policy = \"strided\";*/\n/*    }*/\n/*  };*/\n/**/\n/*public:*/\n/*  ComputeZetaBC(int num_orbitals) : num_orbitals(num_orbitals) {*/\n/*    partitioner.reset(new Partitioner(num_orbitals));*/\n/*  }*/\n/*  // index b, index c, response B, response C, zetaBC, zetaCB, phi0,*/\n/*  // perturbation*/\n/*  typedef std::tuple<const std::vector<int> &, const std::vector<int> &,*/\n/*                     const vector_real_function_3d &,*/\n/*                     const vector_real_function_3d &,*/\n/*                     const vector_real_function_3d &>*/\n/*      argtupleT;*/\n/**/\n/*  using resultT = vector_real_function_3d;*/\n/**/\n/*  resultT allocator(World &world, const argtupleT &args) const {*/\n/**/\n/*    auto num_states = static_cast<int>(std::get<0>(args).size() * num_orbitals);*/\n/*    auto num_orbitals = static_cast<int>(std::get<4>(args).size());*/\n/*    auto num_functions = num_states * num_orbitals;*/\n/**/\n/*    return zero_functions_compressed<double, 3>(world, num_functions);*/\n/*  };*/\n/**/\n/*  resultT operator()(const std::vector<int> &b, const std::vector<int> &c,*/\n/*                     const vector_real_function_3d &B,*/\n/*                     const vector_real_function_3d &C,*/\n/*                     const vector_real_function_3d &phi0) const {*/\n/**/\n/*    World &world = phi0[0].world();*/\n/*    auto bc_indexer = x_space_indexer(num_orbitals);*/\n/**/\n/*    const long i = batch.result.begin;*/\n/**/\n/*    auto bi = b[i];*/\n/*    auto ci = c[i];*/\n/**/\n/*    const auto &by = bc_indexer.get_y_state(bi, B);*/\n/*    const auto &cx = bc_indexer.get_x_state(ci, C);*/\n/**/\n/*    auto mbc = matrix_inner(world, by, cx);*/\n/*    return -1.0 * transform(world, phi0, mbc, true);*/\n/*  }*/\n/*};*/\n\nclass ResponseComputeGammaX : public MacroTaskOperationBase {\n\n  class Partitioner : public MacroTaskPartitioner {\n  public:\n    Partitioner() {\n      max_batch_size = 1;\n      //  result_stride = stride;\n      //  policy = \"strided\";\n    }\n  };\n\npublic:\n  ResponseComputeGammaX() { partitioner.reset(new Partitioner()); }\n  // index b,response B, phi0,\n  // perturbation\n  typedef std::tuple<const std::vector<int> &,        // orb_index\n                     const std::vector<int> &,        // state_index\n                     const vector_real_function_3d &, // B\n                     const vector_real_function_3d &, // phi0\n                     const bool &>\n      argtupleT;\n\n  using resultT = vector_real_function_3d;\n\n  resultT allocator(World &world, const argtupleT &args) const {\n\n    // In this example the first index is index of all orbitals we are working\n    // with\n    auto num_functions = static_cast<int>(std::get<0>(args).size());\n    return zero_functions_compressed<double, 3>(world, num_functions);\n  };\n\n  resultT operator()(const std::vector<int> &orb_index,\n                     const std::vector<int> &state_index,\n                     const vector_real_function_3d &B,\n                     const vector_real_function_3d &phi0,\n                     const bool &static_frequency) const {\n\n    World &world = phi0[0].world();\n    madness::QProjector<double, 3> Q(phi0);\n    // auto thresh = FunctionDefaults<3>::get_thresh();\n\n    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {\n      const double lo = 1.e-10;\n      auto &world = ket[0].world();\n      Exchange<double, 3> k{world, lo};\n      k.set_bra_and_ket(bra, ket);\n\n      std::string algorithm_ = \"multiworld_row\";\n      if (algorithm_ == \"multiworld\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient);\n      } else if (algorithm_ == \"multiworld_row\") {\n        k.set_algorithm(\n            Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient_row);\n      } else if (algorithm_ == \"largemem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::large_memory);\n      } else if (algorithm_ == \"smallmem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::small_memory);\n      }\n\n      return k;\n    };\n    // In this example we only apply once to either x or y orbital.  If x we\n    // just reverse left and right in the call\n    auto compute_g1_i = [&](const vector_real_function_3d &Aleft,\n                            const vector_real_function_3d &Aright,\n                            const vector_real_function_3d &Bleft,\n                            const vector_real_function_3d &Bright,\n                            const real_function_3d &phix) {\n      auto x_phi = mul(world, Aleft, Aright, true);\n      auto y_phi = mul(world, Bleft, Bright, true);\n      world.gop.fence();\n      auto rho = sum(world, x_phi, true);\n      rho += sum(world, y_phi, true);\n      auto lo = 1.e-10;\n      real_convolution_3d op =\n          CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());\n      auto temp_J = apply(op, rho);\n      auto Jx = temp_J * phix;\n      auto ka = K(Aleft, Aright)(phix); // what happens to k after this?\n      auto kb = K(Bleft, Bright)(phix);\n      auto Kx = ka + kb; // gaxpy_oop(1.0, ka, 1.0, kb, true);\n      auto result_x = gaxpy_oop(2.0, Jx.compress(), -1.0, Kx.compress(), true);\n\n      return result_x;\n    };\n\n    int num_orbitals = static_cast<int>(phi0.size());\n    auto compute_result = [&](const int &i) {\n      resultT result = zero_functions_compressed<double, 3>(world, 1);\n      // Now I should assume that each b and c will have all of the\n      // corresponding [00000,00000,0000,11111,11111,11111,] or I find a way to\n      // intelligently map i to bi and ci\n      auto si = state_index[i];\n\n      real_function_3d g;\n      if (static_frequency) {\n        // If static then we pass a response function and only work with x\n        auto indexer = response_space_index(num_orbitals);\n        const auto &bx = indexer.get_x_state(si, B);\n        auto response_orbital_index = i % (num_orbitals);\n        // else we do g1\n        g = compute_g1_i(bx, phi0, phi0, bx, phi0[response_orbital_index]);\n      } else {\n\n        auto indexer = x_space_indexer(num_orbitals);\n        const auto &bx = indexer.get_x_state(si, B);\n        const auto &by = indexer.get_y_state(si, B);\n        auto response_orbital_index = i % (num_orbitals * 2);\n\n        bool type_x = true;\n        if (response_orbital_index < num_orbitals) {\n          type_x = true;\n        } else {\n          type_x = false;\n          response_orbital_index -= num_orbitals;\n        }\n\n        if (type_x) {\n          g = compute_g1_i(bx, phi0, phi0, by, phi0[response_orbital_index]);\n        } else {\n          g = compute_g1_i(by, phi0, phi0, bx, phi0[response_orbital_index]);\n        }\n      }\n      g = Q(g);\n      result[0] = g;\n\n      return result;\n    };\n    const int ij = static_cast<int>(batch.result.begin);\n    return compute_result(ij);\n  }\n};\n\nclass ResponseComputeGroundExchange : public MacroTaskOperationBase {\n\n  class Partitioner : public MacroTaskPartitioner {\n  public:\n    Partitioner() {\n      max_batch_size = 1;\n      //  result_stride = stride;\n      //  policy = \"strided\";\n    }\n  };\n\npublic:\n  ResponseComputeGroundExchange() { partitioner.reset(new Partitioner()); }\n  // index b,response B, phi0,\n  // perturbation\n  typedef std::tuple<const std::vector<int> &,        // orb_index\n                     const std::vector<int> &,        // state_index\n                     const vector_real_function_3d &, // B\n                     const vector_real_function_3d &, // phi0\n                     const bool &>\n      argtupleT;\n\n  using resultT = vector_real_function_3d;\n\n  resultT allocator(World &world, const argtupleT &args) const {\n\n    // In this example the first index is index of all orbitals we are working\n    // with\n    auto num_functions = static_cast<int>(std::get<0>(args).size());\n    return zero_functions_compressed<double, 3>(world, num_functions);\n  };\n\n  resultT operator()(const std::vector<int> &orb_index,\n                     const std::vector<int> &state_index,\n                     const vector_real_function_3d &B,\n                     const vector_real_function_3d &phi0,\n                     const bool &static_frequency) const {\n\n    World &world = phi0[0].world();\n    madness::QProjector<double, 3> Q(phi0);\n    // auto thresh = FunctionDefaults<3>::get_thresh();\n\n    auto K = [&](const vecfuncT &ket, const vecfuncT &bra) {\n      const double lo = 1.e-10;\n      auto &world = ket[0].world();\n      Exchange<double, 3> k{world, lo};\n      k.set_bra_and_ket(bra, ket);\n\n      std::string algorithm_ = \"multiworld_row\";\n      if (algorithm_ == \"multiworld\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient);\n      } else if (algorithm_ == \"multiworld_row\") {\n        k.set_algorithm(\n            Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient_row);\n      } else if (algorithm_ == \"largemem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::large_memory);\n      } else if (algorithm_ == \"smallmem\") {\n        k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::small_memory);\n      }\n\n      return k;\n    };\n    auto compute_g0_i = [&](const vector_real_function_3d &Aleft,\n                            const vector_real_function_3d &Aright,\n                            const real_function_3d &x) {\n      auto Kx = K(Aleft, Aright)(x); // what happens to k after this?\n      // ideally it runs and the Exchange operator is freed\n\n      return Kx;\n    };\n    // In this example we only apply once to either x or y orbital.  If x we\n    // just reverse left and right in the call\n\n    int num_orbitals = static_cast<int>(phi0.size());\n    auto compute_result = [&](const int &i) {\n      resultT result = zero_functions_compressed<double, 3>(world, 1);\n      // Now I should assume that each b and c will have all of the\n      // corresponding [00000,00000,0000,11111,11111,11111,] or I find a way to\n      // intelligently map i to bi and ci\n      auto si = state_index[i];\n\n      real_function_3d g;\n      if (static_frequency) {\n        // If static then we pass a response function and only work with x\n        auto indexer = response_space_index(num_orbitals);\n        const auto &bx = indexer.get_x_state(si, B);\n        auto response_orbital_index = i % (num_orbitals);\n        // if it's zero then we do g0\n        g = compute_g0_i(phi0, phi0, bx[response_orbital_index]);\n      } else {\n\n        auto indexer = x_space_indexer(num_orbitals);\n        const auto &bx = indexer.get_x_state(si, B);\n        const auto &by = indexer.get_y_state(si, B);\n        auto response_orbital_index = i % (num_orbitals * 2);\n\n        bool type_x = true;\n        if (response_orbital_index < num_orbitals) {\n          type_x = true;\n        } else {\n          type_x = false;\n          response_orbital_index -= num_orbitals;\n        }\n\n        if (type_x) {\n          g = compute_g0_i(phi0, phi0, bx[response_orbital_index]);\n        } else {\n          g = compute_g0_i(phi0, phi0, by[response_orbital_index]);\n        }\n      }\n      //        g = Q(g);\n      result[0] = g;\n\n      return result;\n    };\n    const int ij = static_cast<int>(batch.result.begin);\n    return compute_result(ij);\n  }\n};\n\nclass ResponseApplyBSH : public MacroTaskOperationBase {\n\n  class Partitioner : public MacroTaskPartitioner {\n  public:\n    Partitioner() {\n      max_batch_size = 1;\n      //  result_stride = stride;\n      //  policy = \"strided\";\n    }\n  };\n\npublic:\n  ResponseApplyBSH() { partitioner.reset(new Partitioner()); }\n\n  typedef SeparatedConvolution<double, 3> operatorT;\n  typedef std::shared_ptr<operatorT> poperatorT;\n  // index b,response B, phi0,\n  // perturbation\n  typedef std::tuple<const vector_real_function_3d &, const Tensor<double> &,\n                     const double &, const double &, const bool &>\n      argtupleT;\n\n  using resultT = vector_real_function_3d;\n\n  resultT allocator(World &world, const argtupleT &args) const {\n\n    // In this example the first index is index of all orbitals we are working\n    // with\n    auto num_functions = static_cast<int>(std::get<0>(args).size());\n    return zero_functions_compressed<double, 3>(world, num_functions);\n  };\n\n  resultT operator()(const vector_real_function_3d &x,\n                     const Tensor<double> &ground_energies, const double omega,\n                     const double e_shift, const bool static_frequency) const {\n\n    World &world = x[0].world();\n    auto tol = FunctionDefaults<3>::get_thresh();\n    auto num_orbitals = ground_energies.size();\n    double lo = 1.e-10;\n\n    auto make_op = [&](const int i, auto omega, auto e_shift) {\n      auto mu =\n          sqrt(-2.0 * (ground_energies(i % num_orbitals) + omega + e_shift));\n      auto bsh = BSHOperatorPtr3D(world, mu, lo, tol);\n      return bsh;\n    };\n\n    const int ij = static_cast<int>(batch.result.begin);\n    resultT result = zero_functions_compressed<double, 3>(world, 1);\n    if (static_frequency) {\n      auto bsh = make_op(ij, omega, e_shift);\n      result[0] = apply(*bsh, x[ij]);\n    } else {\n\n      auto response_orbital_index = ij % (num_orbitals * 2);\n\n      if (response_orbital_index >= num_orbitals) {\n        auto bsh = make_op(ij, -omega, 0);\n        result[0] = apply(*bsh, x[ij]);\n      } else {\n        auto bsh = make_op(ij, omega, e_shift);\n        result[0] = apply(*bsh, x[ij]);\n      }\n    }\n\n    return result;\n  }\n};\n\n} // namespace madness\n#endif\n"
  },
  {
    "path": "src/apps/molresponse/response_parameters.cpp",
    "content": "//\n// Created by adrianhurtado on 1/18/22.\n//\n#include \"response_parameters.h\"\n\nusing json = nlohmann::json;\n\nvoid madness::from_json(const json& j, ResponseParameters& p) {\n  p.from_json(j);\n  print(\"--------JSON-Parameters------------\\n\", p.print_to_string());\n}\nbool madness::operator==(const ResponseParameters& p1, const ResponseParameters& p2) { return p1.to_json() == p2.to_json(); }\nbool madness::operator!=(const ResponseParameters& p1, const ResponseParameters& p2) { return !(p1 == p2); }\n"
  },
  {
    "path": "src/apps/molresponse/response_parameters.h",
    "content": "// Copyright 2021 Adrian Hurtado\n\n/// \\file ResponseParameters\n/// \\brief Input parameters for a response calculation.\n\n#ifndef SRC_APPS_MOLRESPONSE_RESPONSE_PARAMETERS_H_\n#define SRC_APPS_MOLRESPONSE_RESPONSE_PARAMETERS_H_\n\n#include <madness/chem/molecule.h>\n#include <madness/chem/xcfunctional.h>\n#include <madness/mra/mra.h>\n#include <madness/world/parallel_archive.h>\n#include <molresponse/ground_parameters.h>\n\n#include <string>\n#include <vector>\n\n#include \"madness/mra/QCCalculationParametersBase.h\"\n\nusing perturbations = std::vector<std::string>;\n\nnamespace madness {\n\nstruct ResponseParameters : public QCCalculationParametersBase {\n  static constexpr char const *tag = \"response\";\n  ResponseParameters(const ResponseParameters &other) = default;\n  ResponseParameters(World &world, const commandlineparser &parser) : ResponseParameters() {\n    read_input_and_commandline_options(world, parser, \"response\");\n    // convenience option -- needs to be moved to the MolecularOptimizer class\n  }\n  ResponseParameters() {\n    initialize<std::string>(\"prefix\", \"response\", \"prefixes your output/restart/json/plot/etc files\");\n    initialize<std::string>(\"fock_json_file\", \"moldft.fock.json\", \"data file for fock matrix\");\n    initialize<std::string>(\"archive\", \"../moldft.restartdata\", \"file to read ground parameters from\");\n    initialize<bool>(\"nwchem\", false, \"Using nwchem files for intelligent starting guess\");\n    initialize<std::string>(\"nwchem_dir\", \"none\", \"Root name of nwchem files for intelligent starting guess\");\n    initialize<size_t>(\"states\", 1, \"Number of excited states requested\");\n    initialize<int>(\"print_level\", 3, \"0: no output; 1: final energy; 2: iterations; 3: timings; 10: debug\");\n    initialize<bool>(\"tda\", false, \"turn on Tam-Danchof approximation (excitations energy\");\n    initialize<bool>(\"first_run\", true, \"Are we on the default guess\");\n    initialize<bool>(\"plot\", false, \"turn on plotting of final orbitals. Output format is .vts\");\n    initialize<bool>(\"plot_range\", false, \"controls which orbitals will be plotted\");\n    initialize<std::vector<int>>(\"plot_data\", std::vector<int>{0}, \"Orbitals to plot\");\n    initialize<std::vector<double>>(\"plot_cell\", std::vector<double>(), \"lo-hi plot cell (default is all space)\");\n    initialize<double>(\"plot_l\", -1.0, \"Controls the plotting box size\");\n    initialize<size_t>(\"plot_pts\", 200, \"Controls number of points in plots\");\n    initialize<bool>(\"plot_all_orbitals\", false, \"Turn on 2D plotting of response orbitals \");\n    initialize<size_t>(\"maxiter\", 5, \"maximum number of iterations\");\n    initialize<double>(\"dconv\", 1.e-4, \"recommended values: 1.e-4 < dconv < 1.e-8\");\n    initialize<bool>(\"conv_only_dens\", false, \"if true remove bsh_residual from convergence criteria (deprecated)\");\n    initialize<bool>(\"dconv_set\", false, \"Convergence flage for the orbtial density\");\n    initialize<bool>(\"guess_xyz\", true, \"ExcitedState intial guess functions ground MO * <x,y,z>\");\n    initialize<double>(\"lo\", 1.e-10, \"smallest length scale we need to resolve\");\n    initialize<std::vector<double>>(\"protocol\", {1.e-4, 1.e-6}, \"Defines convergence and truncation protocol\");\n    initialize<size_t>(\"larger_subspace\", 0,\n                       \"Number of iterations to diagonalize in a subspace \"\n                       \"consisting of old and new vectors\");\n    initialize<int>(\"k\", -1, \"polynomial order\");\n    initialize<std::string>(\"deriv\", \"abgv\", \"derivative method\", {\"abgv\", \"bspline\", \"ble\"});\n    initialize<std::string>(\"dft_deriv\", \"abgv\", \"derivative method for gga potentials\", {\"abgv\", \"bspline\", \"ble\"});\n    initialize<bool>(\"random\", true, \"Use random guess for initial response functions\");\n    initialize<bool>(\"store_potential\", true, \"Store the potential instead of computing each iteration\");\n    initialize<bool>(\"e_range\", false, \"Use an energy range to excite from\");\n    initialize<double>(\"e_range_lo\", 0, \"Energy range (lower end) for orbitals to excite from\");\n    initialize<double>(\"e_range_hi\", 1, \"Energy range (upper end) for orbitals to excite from\");\n    initialize<bool>(\"plot_initial\", false, \"Flag to plot the ground state orbitals read in from archivie\");\n    initialize<bool>(\"restart\", false, \"Flag to restart scf loop from file\");\n    initialize<std::string>(\"restart_file\", \"none\", \"file to read ground parameters from\");\n    initialize<bool>(\"kain\", false, \"Turn on Krylov Accelarated Inexact Newton Solver\");\n    initialize<double>(\"maxrotn\", .50, \"Max orbital rotation per iteration\");\n    initialize<double>(\"maxbsh\", 10, \"Max bsh residual\");\n    initialize<size_t>(\"maxsub\", 5, \"size of iterative subspace ... set to 0 or 1 to disable\");\n    initialize<std::string>(\"xc\", \"hf\", \"XC input line\");\n    initialize<std::string>(\"hfexalg\", \"multiworld\",\n                            \"hf exchange algorithm: choose from multiworld \"\n                            \"(default), multiworld_row, smallmem, largemem\");\n    initialize<bool>(\"step_restrict\", true, \"Toggles step restriction\");\n    initialize<bool>(\"save\", false, \"if true save orbitals to disk\");\n    initialize<std::string>(\"save_file\", \"none\", \"File name to save orbitals for restart\");\n    initialize<bool>(\"save_density\", false, \"Flag to save density at each iteration\");\n    initialize<int>(\"vnucextra\", 2, \"load balance parameter for nuclear pot\");\n    initialize<int>(\"loadbalparts\", 2, \"??\");\n    initialize<std::string>(\"save_density_file\", \"none\", \"File name to save density for restart\");\n    initialize<bool>(\"load_density\", false, \"Flag to load density for restart\");\n    initialize<std::string>(\"load_density_file\", \"none\", \"File name to load density for restart\");\n    initialize<size_t>(\"guess_max_iter\", 5, \"maximum number of guess iterations\");\n    initialize<std::string>(\"calc_type\", \"full\", \"full,static,tda\");\n    initialize<bool>(\"excited_state\", false, \"Flag to turn on excited state calc\");\n    initialize<bool>(\"first_order\", false, \"Flag to turn on first order response calc\");\n    initialize<bool>(\"second_order\", false, \"Flag to turn on first order response calc\");\n    initialize<std::string>(\"perturbation\", \"dipole\", \"dipole,nuclear\");\n    initialize<std::vector<std::string>>(\"perturbations\", {\"dipole\"}, \"perturbations to calculate\");\n    initialize<bool>(\"dipole\", false, \"Sets RHS to dipole operator 3 x num_orbitals\");\n    initialize<bool>(\"quadratic\", false, \"Compute quadratic response\");\n    initialize<std::vector<double>>(\"freq_range\", {0.0}, \"Frequency range for quadratic response\");\n    initialize<bool>(\"nuclear\", false, \"Sets RHS to nuclear derivative 3 x num_atoms x num_orbitals\");\n    initialize<double>(\"omega\", 0.0, \"Incident energy for dynamic response\");\n    initialize<double>(\"l\", 20, \"user coordinates box size\");\n    initialize<size_t>(\"num_orbitals\", 0, \"number of ground state orbtials\");\n    initialize<bool>(\"spinrestricted\", true, \"is spinrestricted calculation\");\n    initialize<std::string>(\"localize\", \"canon\", \"localization method\", {\"pm\", \"boys\", \"new\", \"canon\"});\n  }\n\n public:\n  using QCCalculationParametersBase::read_input_and_commandline_options;\n\n  [[nodiscard]] std::string prefix() const { return get<std::string>(\"prefix\"); }\n  [[nodiscard]] std::string fock_json_file() const { return get<std::string>(\"fock_json_file\"); }\n  [[nodiscard]] std::string perturbation() const { return get<std::string>(\"perturbation\"); }\n  [[nodiscard]] std::vector<std::string> perturbations() const { return get<std::vector<std::string>>(\"perturbations\"); }\n  [[nodiscard]] std::string localize() const { return get<std::string>(\"localize\"); }\n  [[nodiscard]] std::string archive() const { return get<std::string>(\"archive\"); }\n  [[nodiscard]] std::string calc_type() const { return get<std::string>(\"calc_type\"); }\n  [[nodiscard]] std::string nwchem_dir() const { return get<std::string>(\"nwchem_dir\"); }\n  [[nodiscard]] bool nwchem() const { return get<bool>(\"nwchem\"); }\n  [[nodiscard]] size_t num_states() const { return get<size_t>(\"states\"); }\n  [[nodiscard]] size_t num_orbitals() const { return get<size_t>(\"num_orbitals\"); }\n  [[nodiscard]] int print_level() const { return get<int>(\"print_level\"); }\n  [[nodiscard]] bool tda() const { return get<bool>(\"tda\"); }\n  [[nodiscard]] bool plot() const { return get<bool>(\"plot\"); }\n  [[nodiscard]] bool step_restrict() const { return get<bool>(\"step_restrict\"); }\n  [[nodiscard]] double plot_l() const { return get<double>(\"plot_l\"); }\n  [[nodiscard]] size_t plot_pts() const { return get<size_t>(\"plot_pts\"); }\n  [[nodiscard]] bool plot_all_orbitals() const { return get<bool>(\"plot_all_orbitals\"); }\n  [[nodiscard]] size_t maxiter() const { return get<size_t>(\"maxiter\"); }\n  [[nodiscard]] double dconv() const { return get<double>(\"dconv\"); }\n  [[nodiscard]] bool guess_xyz() const { return get<bool>(\"guess_xyz\"); }\n  [[nodiscard]] double lo() const { return get<double>(\"lo\"); }\n  [[nodiscard]] std::vector<double> protocol() const { return get<std::vector<double>>(\"protocol\"); }\n  [[nodiscard]] size_t larger_subspace() const { return get<size_t>(\"larger_subspace\"); }\n  [[nodiscard]] int k() const { return get<int>(\"k\"); }\n  [[nodiscard]] bool random() const { return get<bool>(\"random\"); }\n  [[nodiscard]] bool store_potential() const { return get<bool>(\"store_potential\"); }\n  [[nodiscard]] vector<double> freq_range() const { return get<vector<double>>(\"freq_range\"); }\n  [[nodiscard]] bool quadratic() const { return get<bool>(\"quadratic\"); }\n  [[nodiscard]] bool plot_initial() const { return get<bool>(\"plot_initial\"); }\n  [[nodiscard]] bool restart() const { return get<bool>(\"restart\"); }\n  [[nodiscard]] std::string restart_file() const { return get<std::string>(\"restart_file\"); }\n  [[nodiscard]] bool kain() const { return get<bool>(\"kain\"); }\n  [[nodiscard]] size_t maxsub() const { return get<size_t>(\"maxsub\"); }\n  [[nodiscard]] std::string deriv() const { return get<std::string>(\"deriv\"); }\n  [[nodiscard]] std::string dft_deriv() const { return get<std::string>(\"dft_deriv\"); }\n  [[nodiscard]] std::string xc() const { return get<std::string>(\"xc\"); }\n  [[nodiscard]] std::string hfexalg() const { return get<std::string>(\"hfexalg\"); }\n  [[nodiscard]] double maxrotn() const { return get<double>(\"maxrotn\"); }\n  [[nodiscard]] bool save() const { return get<bool>(\"save\"); }\n  [[nodiscard]] std::string save_file() const { return get<std::string>(\"save_file\"); }\n  [[nodiscard]] size_t guess_max_iter() const { return get<size_t>(\"guess_max_iter\"); }\n  [[nodiscard]] bool property() const { return get<bool>(\"property\"); }\n  [[nodiscard]] int loadbalparts() const { return get<int>(\"loadbalparts\"); }\n  [[nodiscard]] bool excited_state() const { return get<bool>(\"excited_state\"); }\n  [[nodiscard]] bool first_order() const { return get<bool>(\"first_order\"); }\n  [[nodiscard]] bool second_order() const { return get<bool>(\"second_order\"); }\n  [[nodiscard]] bool third_order() const { return get<bool>(\"third_order\"); }\n  [[nodiscard]] bool dipole() const { return get<bool>(\"dipole\"); }\n  [[nodiscard]] bool nuclear() const { return get<bool>(\"nuclear\"); }\n  [[nodiscard]] std::string d2_types() const { return get<std::string>(\"d2_types\"); }\n  [[nodiscard]] double omega() const { return get<double>(\"omega\"); }\n  [[nodiscard]] double L() const { return get<double>(\"l\"); }\n  [[nodiscard]] bool spinrestricted() const { return get<bool>(\"spinrestricted\"); }\n  void set_ground_state_calculation_data(const GroundStateCalculation &g_params) {\n    set_derived_value<size_t>(\"num_orbitals\", g_params.n_orbitals());\n    set_derived_value<bool>(\"spinrestricted\", g_params.is_spinrestricted());\n    set_derived_value<double>(\"l\", g_params.get_L());\n    set_derived_value<double>(\"lo\", g_params.molecule().smallest_length_scale());\n    set_derived_value<std::string>(\"xc\", g_params.get_xc());\n    set_derived_value<std::string>(\"localize\", g_params.get_localize_method());\n  }\n\n  void set_derived_values(World &world, const Molecule &molecule) {\n    // read the parameters from file and brodcast\n    // tag\n    vector<std::string> calculation_type;\n    vector<bool> calc_flags;\n    if (excited_state()) {\n      if (tda()) {\n        set_derived_value<std::string>(\"calc_type\", \"tda\");\n      } else {\n        set_derived_value<std::string>(\"calc_type\", \"full\");\n      }\n    } else if (dipole()) {\n      set_derived_value<std::string>(\"perturbation\", \"dipole\");\n      set_derived_value<size_t>(\"states\", 3);\n    } else if (nuclear()) {\n      set_derived_value<std::string>(\"perturbation\", \"nuclear\");\n      set_derived_value<size_t>(\"states\", 3 * molecule.natom());\n    }\n  }\n\n  // convenience getters\n  [[nodiscard]] double econv() const { return get<double>(\"econv\"); }\n  [[nodiscard]] bool first_run() const { return get<bool>(\"first_run\"); }\n  [[nodiscard]] std::string local() const { return get<std::string>(\"local\"); }\n};\n\nvoid from_json(const nlohmann::json &, ResponseParameters &p);\n\nbool operator==(const ResponseParameters &p1, const ResponseParameters &p2);\n\nbool operator!=(const ResponseParameters &p1, const ResponseParameters &p2);\n\n// convenience getters\nvoid to_json(nlohmann::json &j);\n};  // namespace madness\n\n// namespace madness\n\n#endif  // SRC_APPS_MOLRESPONSE_RESPONSE_PARAMETERS_H_\n"
  },
  {
    "path": "src/apps/molresponse/timer.cc",
    "content": "\n// Copyright 2021 Adrian Hurtado\n\n#include \"molresponse/timer.h\"\n\n#include <vector>\n\n#include \"madness/mra/mra.h\"\n// Needed for timers\nnamespace molresponse {\n    double pop(std::vector<double> &v) {\n        double x = v.back();\n        v.pop_back();\n        return x;\n    }\n    // Pulled from SCF.cc, starts a timer\n    void start_timer(madness::World &world) {\n        world.gop.fence();\n        ttt.push_back(madness::wall_time());\n        sss.push_back(madness::cpu_time());\n    }\n    // Stops a timer\n    void end_timer(madness::World &world, const char *msg) {\n        world.gop.fence();\n        MADNESS_CHECK(!ttt.empty());\n\n        double wall = madness::wall_time() - pop(ttt);\n        double cpu = madness::cpu_time() - pop(sss);\n\n\n        if (world.rank() == 0) printf(\"   timer: %20.20s %8.2fs %8.2fs\\n\", msg, cpu, wall);\n    }\n    void end_timer(madness::World &world, const char *msg, const std::string &key,\n                   std::map<std::string, std::pair<double, double>> &time) {\n        world.gop.fence();\n        double wall = madness::wall_time() - pop(ttt);\n        double cpu = madness::cpu_time() - pop(sss);\n\n        std::pair<double, double> timings;\n        // first is wall\n        // second is cpu\n        timings.first = wall;\n        timings.second = cpu;\n\n        time[key] = timings;\n\n\n        if (world.rank() == 0) printf(\"   timer: %20.20s %8.2fs %8.2fs\\n\", msg, cpu, wall);\n    }\n}// namespace molresponse\n"
  },
  {
    "path": "src/apps/molresponse/timer.h",
    "content": "// Copyright 2021 Adrian Hurtado\n#ifndef SRC_APPS_MOLRESPONSE_TIMER_H_\n#define SRC_APPS_MOLRESPONSE_TIMER_H_\n\n#include <vector>\n\n#include \"madness/mra/mra.h\"\n// Needed for timers\nnamespace molresponse {\ndouble pop(std::vector<double>& v);\n// Pulled from SCF.cc, starts a timer\nstatic std::vector<double> ttt, sss;\nvoid start_timer(madness::World& world);\n\n// Stops a timer\nvoid end_timer(madness::World& world, const char* msg);\n\nvoid end_timer(madness::World& world, const char* msg, const std::string& key,\n               std::map<std::string, std::pair<double, double>>& time);\n\n}  // namespace molresponse\n\n#endif  // SRC_APPS_MOLRESPONSE_TIMER_H_\n"
  },
  {
    "path": "src/apps/molresponse/x_space.cc",
    "content": "// Copyright 2021 Adrian Hurtado\n\n#include \"x_space.h\"\n\n#include \"response_functions.h\"\n\nnamespace madness\n{\n    /**\n     * @phi -> [phi conjugate(phi)]\n     *\n     * @param vec\n     * @return vector_real_function_3d\n     */\n    auto to_response_vector(const vector_real_function_3d &vec)\n        -> vector_real_function_3d\n    {\n        auto &world = vec[0].world();\n        // copy the vector\n        auto response_vector = vector_real_function_3d(2 * vec.size());\n        auto n = vec.size();\n\n        int i = 0;\n        for (auto &r0i : response_vector)\n        {\n            r0i = vec[i++ % n];\n        }\n        auto copy_vec = copy(world, response_vector);\n        world.gop.fence();\n        return copy_vec;\n    }\n\n    /**\n     * @brief Create a response matrix object\n     *\n     * @param num_states\n     * @param num_orbitals\n     * @return response_matrix\n     */\n    auto create_response_matrix(const size_t &num_states,\n                                const size_t &num_orbitals) -> response_matrix\n    {\n\n        auto matrix = response_matrix(num_states);\n        std::for_each(matrix.begin(), matrix.end(), [&](auto &xi)\n                      { xi = vector_real_function_3d(num_orbitals); });\n        return matrix;\n    }\n\n    /**\n     * @ Converts Xspace object to response_matrix object\n     *\n     * @param x\n     * @return response_matrix\n     */\n    auto to_response_matrix(const X_space &x) -> response_matrix\n    {\n        auto mX = response_matrix(x.num_states());\n        auto num_orbitals = x.num_orbitals();\n        int b = 0;\n        std::for_each(mX.begin(), mX.end(), [&](vector_real_function_3d &mi)\n                      {\n            mi = vector_real_function_3d(2 * num_orbitals);\n            std::copy(x.x[b].begin(), x.x[b].end(), mi.begin());// shallow copy\n            std::copy(x.y[b].begin(), x.y[b].end(),\n                      mi.begin() + num_orbitals);// shallow copy\n            b++; });\n        return mX;\n    }\n\n    auto to_conjugate_response_matrix(const X_space &x) -> response_matrix\n    {\n        World &world = x.x[0][0].world();\n        auto mX = response_matrix(x.num_states());\n        int b = 0;\n        auto num_orbitals = x.num_orbitals();\n        std::for_each(mX.begin(), mX.end(), [&](auto &mi)\n                      {\n            mi = vector_real_function_3d(2 * num_orbitals);\n            std::copy(x.y[b].begin(), x.y[b].end(), mi.begin());// shallow copy\n            std::copy(x.x[b].begin(), x.x[b].end(),\n                      mi.begin() + num_orbitals);// shallow copy\n            b++; });\n        return mX;\n    }\n\n    /**\n     * @brief Flattens all response functions into a single vector of functions\n     * @param x\n     * @return\n     */\n    auto to_flattened_vector(const X_space &x) -> vector_real_function_3d\n    {\n\n        World &world = x.x[0][0].world();\n        auto num_orbitals = 2 * x.num_orbitals();\n        auto vij = vector_real_function_3d(x.num_states() * num_orbitals);\n        auto mx = to_response_matrix(x);\n        int b = 0;\n        for (const auto &mi : mx)\n        {\n            std::copy(mi.begin(), mi.end(), vij.begin() + b * num_orbitals);\n            b++;\n        }\n        return vij;\n    }\n\n    auto to_X_space(const response_matrix &x) -> X_space\n    {\n\n        World &world = x[0][0].world();\n        auto num_states = x.size();\n        auto num_orbitals = size_t(x[0].size() / 2);\n        auto x_space = X_space(world, num_states, num_orbitals);\n        int b = 0;\n        for (const auto &x_vec : x)\n        {\n            std::copy(x_vec.begin(), x_vec.begin() + num_orbitals,\n                      x_space.x[b].begin());\n            std::copy(x_vec.begin() + num_orbitals, x_vec.end(),\n                      x_space.y[b].begin());\n            b++;\n        };\n        return x_space;\n    }\n\n    /**\n     * @brief response_matrix [x,y] -> Xspace X.x=y X.y=conjugate(x)\n     *\n     * @param x\n     * @return X_space\n     */\n    auto to_conjugate_X_space(const response_matrix &x) -> X_space\n    {\n\n        World &world = x[0][0].world();\n\n        auto num_states = x.size();\n        auto num_orbitals = size_t(x[0].size() / 2);\n        auto x_space = X_space(world, num_states, num_orbitals);\n\n        int b = 0;\n        std::for_each(x.begin(), x.end(), [&](auto x_vec)\n                      {\n            std::transform(x_vec.begin(), x_vec.begin() + num_orbitals,\n                           x_space.y[b].begin(),\n                           [&](const auto &xi) { return copy(xi, false); });\n            std::transform(x_vec.begin() + num_orbitals, x_vec.end(),\n                           x_space.x[b].begin(),\n                           [&](const auto &xi) { return copy(xi, false); });\n            b++; });\n        world.gop.fence();\n\n        return x_space;\n    }\n\n    auto transposeResponseMatrix(const response_matrix &x) -> response_matrix\n    {\n\n        auto XT = response_matrix(x[0].size());\n\n        auto b = 0;\n        for (auto &xi : XT)\n        {\n            auto j = 0;\n            xi = vector_real_function_3d(x.size());\n            for (auto &xji : xi)\n            {\n                xji = x[j++][b];\n            }\n            b++;\n        }\n        return XT;\n    }\n\n    /**\n     * @brief Computes the matrix elements between two response spaces\n     *\n     * cij=inner(ai,bj)\n     *\n     * @param A\n     * @param B\n     * @return Tensor<double>\n     */\n    auto inner(const X_space &A, const X_space &B) -> Tensor<double>\n    {\n        MADNESS_ASSERT(size_states(A) > 0);\n        MADNESS_ASSERT(size_orbitals(A) > 0);\n        MADNESS_ASSERT(A.num_orbitals() == B.num_orbitals());\n\n        // return response_space_inner(A.x, B.x) + response_space_inner(A.y, B.y);\n\n        auto a = to_response_matrix(A);\n        auto b = to_response_matrix(B);\n        World &world = a[0][0].world();\n        world.gop.fence();\n\n        auto a_transpose = transposeResponseMatrix(a);\n        auto b_transpose = transposeResponseMatrix(b);\n\n        world.gop.fence();\n        Tensor<double> result(A.num_states(), B.num_states());\n        int p = 0;\n        std::for_each(a_transpose.begin(), a_transpose.end(),\n                      [&](const auto &ati)\n                      {\n                          result += matrix_inner(world, ati, b_transpose[p++]);\n                          world.gop.fence();\n                      });\n        return result;\n    }\n    vector_real_function_3d copyToVector(const X_space &chi)\n    {\n\n        int n = static_cast<int>(chi.num_states());\n        int m = static_cast<int>(chi.num_orbitals());\n\n        vector_real_function_3d rf(2 * n * m);\n\n        for (int i = 0; i < n; i++)\n        {\n            for (int j = 0; j < m; j++)\n            {\n                auto xindex = (2 * i * m) + j;\n                auto yindex = (2 * i * m) + j + m;\n                rf[xindex] = chi.x[i][j];\n                rf[yindex] = chi.y[i][j];\n            }\n        }\n        return rf;\n    }\n\n    void copyToXspace(const vector_real_function_3d &rf, X_space &chi)\n    {\n\n        int n = static_cast<int>(chi.num_states());\n        int m = static_cast<int>(chi.num_orbitals());\n        for (int i = 0; i < n; i++)\n        {\n            for (int j = 0; j < m; j++)\n            {\n                auto xindex = (2 * i * m) + j;\n                auto yindex = (2 * i * m) + j + m;\n                chi.x[i][j] = rf[xindex];\n                chi.y[i][j] = rf[yindex];\n            }\n        }\n    }\n\n    // In this implmentation we need to represent each x_space as a contigous block\n    // of functions.\n    vector_real_function_3d copyToVector(const response_space &chi)\n    {\n\n        int n = static_cast<int>(chi.num_states);\n        int m = static_cast<int>(chi.num_orbitals);\n\n        vector_real_function_3d rf(n * m);\n\n        for (int i = 0; i < n; i++)\n        {\n            for (int j = 0; j < m; j++)\n            {\n                auto xindex = (i * m) + j;\n                rf[xindex] = chi.x[i][j];\n            }\n        }\n        return rf;\n    }\n\n    void copyToResponseSpace(const vector_real_function_3d &rf,\n                             response_space &chi)\n    {\n\n        int n = static_cast<int>(chi.num_states);\n        int m = static_cast<int>(chi.num_orbitals);\n        for (int i = 0; i < n; i++)\n        {\n            for (int j = 0; j < m; j++)\n            {\n                auto xindex = (i * m) + j;\n                chi.x[i][j] = rf[xindex];\n            }\n        }\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/apps/molresponse/x_space.h",
    "content": "// Copyright 2021 Adrian Hurtado\n#ifndef SRC_APPS_MOLRESPONSE_X_SPACE_H_\n#define SRC_APPS_MOLRESPONSE_X_SPACE_H_\n\n#include <madness/mra/mra.h>\n#include <madness/tensor/tensor.h>\n\n#include <algorithm>\n#include <cstdint>\n#include <memory>\n#include <numeric>\n#include <vector>\n\n#include \"functypedefs.h\"\n#include \"molresponse/response_functions.h\"\n\nnamespace madness {\n\ntypedef std::vector<vector_real_function_3d> response_matrix;\n\nstruct X_space;\n\nauto to_response_vector(const vector_real_function_3d &vec)\n    -> vector_real_function_3d;\nauto create_response_matrix(const size_t &num_state,\n                            const size_t &num_orbitals) -> response_matrix;\nauto to_response_matrix(const X_space &x) -> response_matrix;\nauto to_conjugate_response_matrix(const X_space &x) -> response_matrix;\nauto to_flattened_vector(const X_space &x) -> vector_real_function_3d;\nauto to_X_space(const response_matrix &x) -> X_space;\nauto to_conjugate_X_space(const response_matrix &x) -> X_space;\n\nstruct X_space {\nprivate:\n  size_t n_states;   // Num. of resp. states\n  size_t n_orbitals; // Num. of ground states\n\npublic:\n  response_space x, y;\n  std::list<size_t> active;\n\npublic:\n  [[nodiscard]] size_t num_states() const { return n_states; }\n  [[nodiscard]] size_t num_orbitals() const { return n_orbitals; }\n  // default constructor\n  X_space() : n_states(0), n_orbitals(0), x(), y(), active(0) {}\n  // Copy constructor\n  void reset_active() {\n    active.resize(n_states);\n    x.active.resize(n_states);\n    y.active.resize(n_states);\n    size_t i{0};\n    for (auto &ai : active) {\n      ai = i++;\n    }\n    i = 0;\n    for (auto &ai : x.active) {\n      ai = i++;\n    }\n    i = 0;\n    for (auto &ai : y.active) {\n      ai = i++;\n    }\n  }\n  void set_active(const std::list<size_t> &new_active) {\n    active = new_active;\n    x.active = new_active;\n    y.active = new_active;\n  }\n  X_space(const X_space &A)\n      : n_states(size_states(A)), n_orbitals(size_orbitals(A)), x(A.x), y(A.y),\n        active(A.active) {}\n  [[nodiscard]] X_space copy() const {\n    auto &world = x[0][0].world();\n    auto new_x = X_space(*this); // copy\n    for (const auto &i : new_x.active) {\n      new_x.x[i] = madness::copy(world, x[i], false);\n      new_x.y[i] = madness::copy(world, y[i], false);\n    }\n    world.gop.fence();\n\n    return new_x;\n  }\n  /// Create a new copy of the function with different distribution and optional\n  /// fence\n\n  /// Works in either basis.  Different distributions imply\n  /// asynchronous communication and the optional fence is\n  /// collective.\n  [[nodiscard]] auto\n  copy(const std::shared_ptr<WorldDCPmapInterface<Key<3>>> &p_map,\n       bool fence = false) const -> X_space {\n    auto &world = x[0][0].world();\n    auto new_x = X_space(*this); // copy\n    for (size_t i = 0; i < new_x.num_states(); i++) {\n      new_x.x[i] = madness::copy(world, x[i], p_map, false);\n      new_x.y[i] = madness::copy(world, y[i], p_map, false);\n    }\n    world.gop.fence();\n    return new_x;\n  }\n  // assignment\n  auto operator=(const X_space &B) -> X_space & {\n    if (this != &B) { // is it the same object?\n\n      this->n_states = B.num_states();\n      this->n_orbitals = B.num_orbitals();\n      this->x = B.x;\n      this->y = B.y;\n      this->active = B.active;\n    }\n    return *this; // NO SHALLOW COPIES\n  }\n  X_space(World &world, size_t n_states, size_t n_orbitals)\n      : n_states(n_states), n_orbitals(n_orbitals),\n        x(world, n_states, n_orbitals), y(world, n_states, n_orbitals),\n        active(n_states) {\n    reset_active();\n  }\n  void clear() {\n    x.clear();\n    y.clear();\n    active.clear();\n  }\n  void push_back(const vector_real_function_3d &vx,\n                 const vector_real_function_3d &vy) {\n    if (n_orbitals > 0) {\n      MADNESS_ASSERT(n_orbitals == vx.size());\n      MADNESS_ASSERT(n_orbitals == vy.size());\n      MADNESS_ASSERT(vx.size() == vy.size());\n    } else { // g_states == 0 (empty vector)\n      n_orbitals = vx.size();\n    }\n    MADNESS_ASSERT(vx.size() == num_orbitals());\n    MADNESS_ASSERT(vy.size() == num_orbitals());\n    active.push_back(active.back() + 1);\n    n_states++;\n    x.push_back(vx);\n    y.push_back(vy);\n    // Be smart with g_states\n  }\n  void pop_back() {\n    x.pop_back();\n    y.pop_back();\n    active.pop_back();\n    n_states--;\n    if (n_states == 0) {\n      n_orbitals = 0;\n    }\n  }\n\n  friend auto inplace_apply(\n      X_space &A,\n      const std::function<void(vector_real_function_3d &)> &func) -> void {\n    auto &world = A.x[0][0].world();\n    for (auto &i : A.active) {\n      func(A.x[i]);\n      func(A.y[i]);\n    }\n    world.gop.fence();\n  }\n\n  /**\n   * @brief Apply a function to the X_space\n   * @param A\n   * @param func\n   * @return\n   */\n  friend auto oop_apply(const X_space &A,\n                        const std::function<vector_real_function_3d(\n                            const vector_real_function_3d &)> &func,\n                        bool fence = true) -> X_space {\n    auto &world = A.x[0][0].world();\n    auto result =\n        X_space::zero_functions(world, A.num_states(), A.num_orbitals());\n    result.set_active(A.active);\n    //    if (world.rank() == 0) { print(\"oop_apply\"); }\n    for (auto &i : result.active) {\n      //       if (world.rank() == 0) { print(\"oop_apply\", i); }\n      result.x[i] = func(A.x[i]);\n      result.y[i] = func(A.y[i]);\n    }\n    if (fence)\n      world.gop.fence();\n    return result;\n  }\n\n  template <typename T>\n  friend auto binary_apply(const X_space &A, const X_space &B,\n                           T &func) -> X_space {\n    MADNESS_ASSERT(same_size(A, B));\n\n    auto &world = A.x[0][0].world();\n    X_space result =\n        X_space::zero_functions(world, A.num_states(), A.num_orbitals());\n    result.set_active(A.active);\n\n    for (const auto &i : result.active) {\n      auto ax = A.x[i];\n      auto bx = B.x[i];\n\n      auto ay = A.y[i];\n      auto by = B.y[i];\n\n      result.x[i] = func(ax, bx);\n      result.y[i] = func(ay, by);\n    }\n    world.gop.fence();\n    return result;\n  }\n\n  template <class T>\n  friend auto binary_inplace(X_space &A, const X_space &B, const T &func) {\n    MADNESS_ASSERT(same_size(A, B));\n    auto &world = A.x[0][0].world();\n    for (const auto &i : A.active) {\n      auto ax = A.x[i];\n      auto ay = A.y[i];\n\n      auto bx = B.x[i];\n      auto by = B.y[i];\n\n      func(ax, bx);\n      func(ay, by);\n    }\n    world.gop.fence();\n\n    return A;\n  }\n\n  static X_space zero_functions(World &world, size_t n_states,\n                                size_t n_orbitals) {\n    auto zeros = X_space(world, n_states, n_orbitals);\n    for (size_t i = 0; i < zeros.num_states(); i++) {\n      zeros.x[i] =\n          ::madness::zero_functions<double, 3>(world, n_orbitals, true);\n      zeros.y[i] =\n          ::madness::zero_functions<double, 3>(world, n_orbitals, true);\n    }\n    world.gop.fence();\n    return zeros;\n  }\n\n  auto operator+=(const X_space &B) -> X_space & {\n    MADNESS_ASSERT(same_size(*this, B));\n    // auto &world = this->x[B.active.front()][0].world();\n    this->active = B.active;\n    this->from_vector(this->to_vector() + B.to_vector());\n\n    // auto add_inplace = [&](auto &a, const auto &b)\n    // {\n    //   gaxpy(world, 1.0, a, 1.0, b, true);\n    // };\n    // binary_inplace(*this, B, add_inplace);\n    return *this;\n  }\n\n  friend auto operator+(const X_space &A, const X_space &B) -> X_space {\n    MADNESS_ASSERT(same_size(A, B));\n\n    auto result = X_space(A.x[A.active.front()][0].world(), A.num_states(),\n                          A.num_orbitals());\n    result.set_active(A.active);\n    result.from_vector(A.to_vector() + B.to_vector());\n    return result;\n  }\n\n  friend X_space operator-(const X_space &A, const X_space &B) {\n    MADNESS_ASSERT(same_size(A, B));\n\n    auto result = X_space(A.x[A.active.front()][0].world(), A.num_states(),\n                          A.num_orbitals());\n    result.set_active(A.active);\n    result.from_vector(A.to_vector() - B.to_vector());\n    return result;\n\n    auto sub_ab = [&](const auto &a, const auto &b) {\n      return gaxpy_oop(1.0, a, -1.0, b, true);\n    };\n    return binary_apply(A, B, sub_ab);\n  }\n\n  friend X_space operator*(const X_space &A, const double &b) {\n    World &world = A.x[A.active.front()][0].world();\n\n    auto result = X_space(world, A.num_states(), A.num_orbitals());\n    result.set_active(A.active);\n    result.from_vector(A.to_vector() * b);\n    return result;\n\n    //auto scale_a = [&](vector_real_function_3d &vec_ai) {\n    //  scale(world, vec_ai, b, true);\n    //};\n    //inplace_apply(result, scale_a);\n    //return result;\n  }\n  friend X_space operator*(const double &b, const X_space &A) {\n    World &world = A.x[A.active.front()][0].world();\n    auto result = X_space(world, A.num_states(), A.num_orbitals());\n    result.set_active(A.active);\n    result.from_vector(A.to_vector() * b);\n    return result;\n\n    auto scale_a = [&](vector_real_function_3d &vec_ai) {\n      scale(world, vec_ai, b, true);\n    };\n    inplace_apply(result, scale_a);\n    return result;\n  }\n  friend X_space operator*(const X_space &B, const X_space &A) {\n    World &world = A.x[A.active.front()][0].world();\n    auto result = X_space(A.x[0][0].world(), A.num_states(), A.num_orbitals());\n    result.set_active(A.active);\n    vector_real_function_3d result_vec =\n        mul(world, A.to_vector(), B.to_vector());\n    result.from_vector(result_vec);\n    return result;\n\n    //auto mul_ab = [&](vector_real_function_3d &vec_ai,\n    //                  vector_real_function_3d &vec_bi) {\n    //  return mul(world, vec_ai, vec_bi, false);\n    //};\n    //return binary_apply(A, B, mul_ab);\n  }\n\n  friend X_space operator*(const X_space &A, const Function<double, 3> &f) {\n    World &world = A.x[A.active.front()][0].world();\n\n    auto result = X_space(A.x[0][0].world(), A.num_states(), A.num_orbitals());\n    result.set_active(A.active);\n    result.from_vector(A.to_vector() * f);\n    return result;\n\n    auto mul_f = [&](const vector_real_function_3d &vec_ai) {\n      return mul(world, f, vec_ai, false);\n    };\n    return oop_apply(A, mul_f);\n  }\n  friend auto operator*(const Function<double, 3> &f,\n                        const X_space &A) -> X_space {\n    // World &world = A.x[A.active.front()][0].world();\n    auto result = X_space(A.x[0][0].world(), A.num_states(), A.num_orbitals());\n    result.set_active(A.active);\n    result.from_vector(f * A.to_vector());\n    return result;\n\n    //auto mul_f = [&](const vector_real_function_3d &vec_ai) {\n    //  return mul(world, f, vec_ai, false);\n    //};\n    //return oop_apply(A, mul_f);\n  }\n\n  friend auto operator*(const X_space &A, const Tensor<double> &b) -> X_space {\n    MADNESS_ASSERT(size_states(A) > 0);\n    MADNESS_ASSERT(size_orbitals(A) > 0);\n\n    World &world = A.x[0][0].world();\n    auto transform_ai = [&](auto &ai) { return transform(world, ai, b, true); };\n    return oop_apply(A, transform_ai);\n  }\n  /***\n   *\n   * @param A\n   * @param B\n   * @return\n   */\n  friend auto inner(const X_space &A, const X_space &B) -> Tensor<double>;\n\n  void truncate() {\n      \n    // auto &world = this->x[x.active.front()][0].world();\n    this->from_vector(madness::truncate(\n        this->to_vector(), FunctionDefaults<3>::get_thresh(), true));\n  }\n\n  void compress() const {\n\n    auto x = to_vector();\n    auto &world = this->x[active.front()][0].world();\n    madness::compress(world, x, true);\n  }\n  void reconstruct() const {\n\n    auto x = to_vector();\n    auto &world = this->x[active.front()][0].world();\n    madness::reconstruct(world, x, true);\n  }\n\n  void truncate(double thresh) {\n\n    // auto &world = this->x[x.active.front()][0].world();\n    this->from_vector(madness::truncate(this->to_vector(), thresh, true));\n  }\n\n  auto norm2s() const -> Tensor<double> {\n    World &world = x[0][0].world();\n    Tensor<double> norms(num_states());\n\n    auto x = to_response_matrix(*this);\n    int b = 0;\n    for (const auto &xb : x) {\n      norms[b++] = norm2(world, xb);\n    }\n    world.gop.fence();\n    return norms;\n  }\n\n  [[nodiscard]] auto component_norm2s() const -> Tensor<double> {\n    World &world = x[0][0].world();\n    auto rx = to_flattened_vector(*this);\n    auto norms = norm2s_T(world, rx);\n    return norms.reshape(n_states, 2 * n_orbitals);\n  }\n\n  friend auto size_states(const X_space &x) -> size_t { return x.n_states; }\n  friend auto size_orbitals(const X_space &x) -> size_t { return x.n_orbitals; }\n  friend auto same_size(const X_space &A, const X_space &B) -> bool {\n    return ((size_states(A) == size_states(B) &&\n             size_orbitals(A) == size_orbitals(B)));\n  }\n\n  [[nodiscard]] auto to_vector() const -> vector_real_function_3d {\n\n    int n = static_cast<int>(active.size());\n    int m = static_cast<int>(num_orbitals());\n\n    vector_real_function_3d rf(2 * n * m);\n\n    int i = 0;\n    for (const auto &ai : active) {\n      for (int j = 0; j < m; j++) {\n        auto xindex = (2 * i * m) + j;\n        auto yindex = (2 * i * m) + j + m;\n        rf[xindex] = x[ai][j];\n        rf[yindex] = y[ai][j];\n      }\n      i++;\n    }\n    return rf;\n  }\n\n  auto from_vector(const vector_real_function_3d &rf) -> void {\n\n    int m = static_cast<int>(num_orbitals());\n\n    int i = 0;\n    for (const auto &ai : active) {\n      for (int j = 0; j < m; j++) {\n        auto xindex = (2 * i * m) + j;\n        auto yindex = (2 * i * m) + j + m;\n\n        x[ai][j] = rf[xindex];\n        y[ai][j] = rf[yindex];\n      }\n      i++;\n    }\n  }\n};\n\n// but the solver needs the functions initialized to zero for which we also need\n// the world object.\n\nstruct X_vector : public X_space {\n  X_vector(World &world, size_t n_orbtials) {\n    this->X_space::zero_functions(world, size_t(1), n_orbtials);\n  }\n\n  X_vector(X_space A, size_t b)\n      : X_space(A.x[0][0].world(), size_t(1), A.num_orbitals()) {\n    x[0] = A.x[b];\n    y[0] = A.y[b];\n  }\n  friend X_vector operator-(const X_vector &A, const X_vector &B) {\n    MADNESS_ASSERT(same_size(A, B));\n\n    World &world = A.x[0][0].world();\n    X_vector result(world, size_orbitals(A)); // create zero_functions\n    result.x = A.x - B.x;\n    result.y = A.y - B.y;\n    return result;\n  }\n  friend X_vector operator*(const X_vector &A, const double &c) {\n    World &world = A.x[0][0].world();\n    X_vector result(world, size_orbitals(A)); // create zero_functions\n    result.x = A.x * c;\n    result.y = A.y * c;\n    return result;\n  }\n  X_vector copy() const {\n    X_vector copyX(x[0][0].world(), x.num_orbitals);\n    copyX.x = x.copy();\n    copyX.y = y.copy();\n    return copyX;\n  }\n  auto operator+=(const X_vector &B) -> X_vector & {\n    MADNESS_ASSERT(same_size(*this, B));\n    this->x += B.x;\n    this->y += B.y;\n    return *this;\n  }\n  inline friend auto inner(X_vector &A, X_vector &B) -> double {\n    MADNESS_ASSERT(size_states(A) == 1);\n    MADNESS_ASSERT(size_orbitals(A) > 0);\n    MADNESS_ASSERT(same_size(A, B));\n\n    Tensor<double> G(1, 1);\n    Tensor<double> G1(1, 1);\n    Tensor<double> G2(1, 1);\n\n    World &world = A.x[0][0].world();\n\n    auto ax = madness::copy(world, A.x[0]);\n    auto ay = madness::copy(world, A.y[0]);\n\n    auto bx = madness::copy(world, B.x[0]);\n    auto by = madness::copy(world, B.y[0]);\n\n    for (auto &ayi : ay) {\n      ax.push_back(madness::copy(ayi));\n    }\n    for (auto &byi : by) {\n      bx.push_back(madness::copy(byi));\n    };\n\n    double result = inner(ax, bx);\n\n    return result;\n  }\n};\n// function object with allocator()()\nstruct response_matrix_allocator {\n  World &world;\n  const size_t n_orbtials;\n  response_matrix_allocator(World &world, size_t n_orbtials)\n      : world(world), n_orbtials(n_orbtials) {}\n  // overloading the default constructor () operator\n  vector_real_function_3d operator()() {\n    // print(\"allocator called with \", int(n_orbtials), \" orbitals\");\n    //  returning constructor of x_vector\n    return zero_functions<double, 3>(world, n_orbtials);\n  }\n  // Copy constructor\n\n  response_matrix_allocator operator=(const response_matrix_allocator &other) {\n    return response_matrix_allocator(world, other.n_orbtials);\n  }\n};\n\nstruct response_function_allocator {\n  World &world;\n  response_function_allocator(World &world) : world(world) {}\n  // overloading the default constructor () operator\n  real_function_3d operator()() {\n    return real_function_3d(real_factory_3d(world).fence(true));\n  }\n  response_function_allocator\n  operator=(const response_function_allocator &other) {\n    return response_function_allocator(world);\n  }\n};\n\nvector_real_function_3d copyToVector(const X_space &chi);\n\nvoid copyToXspace(const vector_real_function_3d &rf, X_space &chi);\n// In this implmentation we need to represent each x_space as a contigous block\n// of functions.\nvector_real_function_3d copyToVector(const response_space &chi);\n\nvoid copyToResponseSpace(const vector_real_function_3d &rf,\n                         response_space &chi);\n\nclass x_space_indexer {\n  int num_orbitals;\n\npublic:\n  x_space_indexer(int num_orbitals) : num_orbitals(num_orbitals) {}\n\n  [[nodiscard]] vector_real_function_3d\n  get_x_state(int i, const vector_real_function_3d &rf) const {\n\n    vector_real_function_3d subset(num_orbitals);\n    auto index = 2 * num_orbitals * i;\n\n    for (int j = 0; j < num_orbitals; j++) {\n      subset[j] = rf[index + j];\n    }\n    return subset;\n  }\n  [[nodiscard]] vector_real_function_3d\n  get_y_state(int i, const vector_real_function_3d &rf) const {\n\n    vector_real_function_3d subset(num_orbitals);\n    auto index = 2 * num_orbitals * i + num_orbitals;\n    for (int j = 0; j < num_orbitals; j++) {\n      subset[j] = rf[index + j];\n    }\n    return subset;\n  }\n};\n\nclass response_space_index {\n  int num_orbitals;\n\npublic:\n  response_space_index(int num_orbitals) : num_orbitals(num_orbitals) {}\n\n  [[nodiscard]] vector_real_function_3d\n  get_x_state(int i, const vector_real_function_3d &rf) const {\n\n    vector_real_function_3d subset(num_orbitals);\n    auto index = num_orbitals * i;\n\n    for (int j = 0; j < num_orbitals; j++) {\n      subset[j] = rf[index + j];\n    }\n    return subset;\n  }\n};\n} // namespace madness\n\n#endif // SRC_APPS_MOLRESPONSE_X_SPACE_H_\n"
  },
  {
    "path": "src/apps/molresponse_v2/CMakeLists.txt",
    "content": "# src/apps/molresponse_v2/CMakeLists.txt\n\nif(CMAKE_CXX_STANDARD GREATER_EQUAL 17)\n    message(STATUS \"Using C++17 or higher standard\")\nelse()\n    message(FATAL_ERROR \"C++17 or higher is required.\")\nendif()\n\nset(MOLRESPONSE_SOURCES2\n    ResponseManager.cpp\n    GroundStateData.cpp\n    ResponseSolver.cpp\n)\n\nset(MOLRESPONSE_HEADERS2\n    GroundStateData.hpp\n    MolecularProperty.hpp\n    ResponseManager.hpp\n    ResponseState.hpp\n    ResponseIO.hpp\n    ResponseMetaData.hpp\n    FrequencyLoop.hpp\n    PropertyManager.hpp\n    ResponseSolver.hpp\n    ResponseSolverUtils.hpp\n    ResponseInitializer.hpp\n    ResponseDebugLogger.hpp\n    ResponseDebugLoggerMacros.hpp\n    broadcast_json.hpp\n#    ResponseParameters.hpp\n)\n\n# Create the MADresponse2 library\nadd_mad_library(response2 MOLRESPONSE_SOURCES2 MOLRESPONSE_HEADERS2 \"chem\" \"madness/chem/molresponse2/\")\nset(targetname MADresponse2)\n#add_dependencies(applications-madness test_preliminaries)\nadd_dependencies(applications-madness test_parameter_manager)\nadd_dependencies(applications-madness molresponse2)\n#add_mad_executable(test_preliminaries \"test_preliminaries.cpp\" \"MADresponse2;MADchem\")\nadd_mad_executable(test_parameter_manager \"test_parameter_manager.cpp\" \"MADresponse2;MADchem\")\nadd_mad_executable(molresponse2 \"molresponse2.cpp\" \"MADresponse2;MADchem\")\n\n# Add install targets for executables\ninstall(TARGETS molresponse2 test_parameter_manager DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n\n"
  },
  {
    "path": "src/apps/molresponse_v2/FrequencyLoop.hpp",
    "content": "#pragma once\n#include <madness/world/world.h>\n\n#include \"GroundStateData.hpp\"\n#include \"ResponseDebugLogger.hpp\"\n#include \"ResponseDebugLoggerMacros.hpp\"\n#include \"ResponseIO.hpp\"\n#include \"ResponseInitializer.hpp\"\n#include \"ResponseManager.hpp\"\n#include \"ResponseMetaData.hpp\"\n#include \"ResponseSolver.hpp\"\n#include \"ResponseSolverUtils.hpp\"\n#include \"ResponseState.hpp\"\n#define NOT_IMPLEMENTED_THROW \\\n  throw std::runtime_error(\"This solver is not yet implemented.\");\n\ntemplate <typename ResponseType>\ninline bool iterate(World &world, const ResponseManager &rm,\n                    const GroundStateData &gs,\n                    const LinearResponseDescriptor &state,\n                    ResponseType &response, ResponseDebugLogger &logger,\n                    size_t max_iter, double conv_thresh) {\n  using Policy = ResponseSolverPolicy<ResponseType>;\n\n  auto &rvec = response;\n  auto &all_x = rvec.flat;\n\n  // const auto thresh = FunctionDefaults<3>::get_thresh();\n  const double dconv =\n      std::max(FunctionDefaults<3>::get_thresh() * 10, conv_thresh);\n  auto density_target =\n      dconv * static_cast<double>(std::max(size_t(5.0), gs.molecule.natom()));\n  const auto x_residual_target = density_target * 10.0;\n\n  auto vp = perturbation_vector(world, gs, state);\n\n  auto &phi0 = gs.orbitals;\n  const auto &orbital_energies = gs.getEnergies();\n\n  // First difference, Make bsh operators is different for each solver\n  auto bsh_ops = Policy::make_bsh_operators(\n      world, rm, state.current_frequency(), orbital_energies,\n      static_cast<int>(gs.orbitals.size()), logger);\n\n  response_solver solver(\n      response_vector_allocator(world, static_cast<int>(all_x.size())),\n      /*do_printing*/ false);\n\n  auto drho = Policy::compute_density(world, rvec, phi0);\n  functionT drho_old;\n\n  for (size_t iter = 0; iter < max_iter; ++iter) {\n    logger.begin_iteration(iter);\n    drho_old = copy(drho);\n    // Inner product of response state\n    DEBUG_LOG_VALUE(world, &logger, \"<x|x>\",\n                    ResponseSolverUtils::inner(world, rvec.flat, rvec.flat));\n    // 1. Coupled-response equations\n    vector_real_function_3d x_new;\n    DEBUG_TIMED_BLOCK(world, &logger, \"compute_rsh\", {\n      x_new = Policy::CoupledResponseEquations(world, gs, rvec, vp, bsh_ops, rm,\n                                               logger);\n    });\n    // 2. Form residual r = x_new - x\n    auto residuals = x_new - all_x;\n    vector_real_function_3d kain_x;\n    DEBUG_TIMED_BLOCK(world, &logger, \"KAIN step\",\n                      { kain_x = solver.update(all_x, residuals); });\n\n    // 3. Compute norm of difference;\n    double res_norm = norm2(world, sub(world, all_x, x_new));\n    DEBUG_LOG_VALUE(world, &logger, \"res_norm\", res_norm);\n    // 4. Do step restriction\n    if (res_norm > rm.params().maxrotn()) {\n      DEBUG_TIMED_BLOCK(world, &logger, \"step_restriction\", {\n        ResponseSolverUtils::do_step_restriction(world, all_x, kain_x, res_norm,\n                                                 \"a\", rm.params().maxrotn());\n      });\n    }\n    // 5. Update response vector\n    rvec.flat = copy(world, kain_x);\n    rvec.sync();\n    // 6. Compute updated response density\n    drho = Policy::compute_density(world, rvec, phi0);\n    double drho_change = (drho - drho_old).norm2();\n    DEBUG_LOG_VALUE(world, &logger, \"drho_change\", drho_change);\n    auto alpha =\n        Policy::alpha_factor * ResponseSolverUtils::inner(world, rvec.flat, vp);\n    DEBUG_LOG_VALUE(world, &logger, \"alpha\", alpha);\n    // 7. Convergence check\n    if (world.rank() == 0) {\n      ResponseSolverUtils::print_iteration_line(iter, res_norm, drho_change,\n                                                alpha, density_target,\n                                                x_residual_target);\n    }\n    if (drho_change < density_target && res_norm < x_residual_target) {\n      if (world.rank() == 0) print(\"✓ Converged in\", iter, \"iterations.\");\n      logger.end_iteration();\n      rvec.sync();\n      logger.finalize_state();\n      return true;\n    }\n    logger.end_iteration();\n  }\n  if (world.rank() == 0)\n    print(\"⚠️  Reached max iterations without convergence.\");\n  logger.end_iteration();\n\n  if (world.rank() == 0) {\n    madness::print(\"📊 Iteration summary for\", state.description());\n    logger.print_timing_table(state.description());\n    logger.print_values_table(state.description());\n  }\n  logger.finalize_state();\n  return false;\n};\n\ninline bool solve_response_vector(\n    World &world, const ResponseManager &rm, const GroundStateData &gs,\n    const LinearResponseDescriptor &state,\n    ResponseVector &response_variant,  // the std::variant<…>\n    ResponseDebugLogger &logger, size_t max_iter = 10,\n    double conv_thresh = 1e-4) {\n  return std::visit(\n      overloaded{[&](StaticRestrictedResponse &r) {\n                   return iterate(world, rm, gs, state, r, logger, max_iter,\n                                  conv_thresh);\n                 },\n                 [&](DynamicRestrictedResponse &r) {\n                   return iterate(world, rm, gs, state, r, logger, max_iter,\n                                  conv_thresh);\n                 },\n                 [&](StaticUnrestrictedResponse &r) {\n                   throw std::runtime_error(\n                       \"Static unrestricted response not implemented yet\");\n                   return false;\n                   /*return iterate(world, rm, gs, state, r, logger, max_iter,*/\n                   /*               conv_thresh);*/\n                 },\n                 [&](DynamicUnrestrictedResponse &r) {\n                   throw std::runtime_error(\n                       \"Dynamic unrestricted response not implemented yet\");\n                   return false;\n                   /*iterate(world, rm, gs, state, r, logger, max_iter,*/\n                   /*                          conv_thresh);*/\n                 }},\n      response_variant);\n}\n\ninline void promote_response_vector(World &world,\n                                    const ResponseVector &promote_from,\n                                    ResponseVector &promote_to) {\n  if (std::holds_alternative<StaticRestrictedResponse>(promote_from)) {\n    if (world.rank() == 0)\n      madness::print(\"🔁 Promoting static restricted → dynamic restricted\");\n    const auto &prev_resp = std::get<StaticRestrictedResponse>(promote_from);\n\n    DynamicRestrictedResponse current_resp;\n    current_resp.x_alpha = copy(world, prev_resp.x_alpha);\n    current_resp.y_alpha = copy(world, prev_resp.x_alpha);\n    current_resp.flatten();\n    promote_to = current_resp;\n\n  } else if (std::holds_alternative<StaticUnrestrictedResponse>(promote_from)) {\n    if (world.rank() == 0)\n      madness::print(\"🔁 Promoting static unrestricted → dynamic unrestricted\");\n    const auto &prev_resp = std::get<StaticUnrestrictedResponse>(promote_from);\n\n    DynamicUnrestrictedResponse current_resp;\n    current_resp.x_alpha = copy(world, prev_resp.x_alpha);\n    current_resp.x_beta = copy(world, prev_resp.x_beta);\n    current_resp.y_alpha = copy(world, prev_resp.x_alpha);\n    current_resp.y_beta = copy(world, prev_resp.x_beta);\n    current_resp.flatten();\n    promote_to = current_resp;\n\n  } else if (std::holds_alternative<DynamicRestrictedResponse>(promote_from)) {\n    if (world.rank() == 0)\n      madness::print(\"📥 Copying dynamic restricted response\");\n    const auto &prev_resp = std::get<DynamicRestrictedResponse>(promote_from);\n\n    DynamicRestrictedResponse current_resp;\n    current_resp.x_alpha = copy(world, prev_resp.x_alpha);\n    current_resp.y_alpha = copy(world, prev_resp.y_alpha);\n    current_resp.flatten();\n    promote_to = current_resp;\n\n  } else if (std::holds_alternative<DynamicUnrestrictedResponse>(\n                 promote_from)) {\n    if (world.rank() == 0)\n      madness::print(\"📥 Copying dynamic unrestricted response\");\n    const auto &prev_resp = std::get<DynamicUnrestrictedResponse>(promote_from);\n\n    DynamicUnrestrictedResponse current_resp;\n    current_resp.x_alpha = copy(world, prev_resp.x_alpha);\n    current_resp.x_beta = copy(world, prev_resp.x_beta);\n    current_resp.y_alpha = copy(world, prev_resp.y_alpha);\n    current_resp.y_beta = copy(world, prev_resp.y_beta);\n    current_resp.flatten();\n    promote_to = current_resp;\n  } else {\n    throw std::runtime_error(\n        \"Unknown response variant in promote_response_vector\");\n  }\n}\n\ninline void computeFrequencyLoop(World &world, const ResponseManager &rm,\n                                 LinearResponseDescriptor &state,\n                                 const GroundStateData &ground_state,\n                                 ResponseMetadata &metadata,\n                                 ResponseDebugLogger &logger) {\n  // const auto &frequencies = state.frequencies;\n\n  auto state_id = state.perturbationDescription();\n  double protocol = state.current_threshold();\n  size_t thresh_index = state.current_thresh_index;\n\n  bool at_final_protocol = state.at_final_threshold();\n  bool is_unrestricted = !ground_state.isSpinRestricted();\n  auto num_orbitals = static_cast<int>(ground_state.getNumOrbitals());\n\n  ResponseVector previous_response =\n      make_response_vector(num_orbitals, state.is_static(), is_unrestricted);\n  bool have_previous_freq_response = false;\n  auto pertDesc = state.perturbationDescription();\n\n  // Frequency loop\n  for (size_t i = state.current_frequency_index; i < state.frequencies.size();\n       i++) {\n    state.set_frequency_index(i);\n    bool is_static = state.is_static();\n    double freq = state.current_frequency();\n    auto freq_index = state.current_frequency_index;\n    bool is_saved =\n        metadata.is_saved(pertDesc, protocol, freq);  // Check if already saved\n    bool should_solve =\n        !is_saved ||\n        (at_final_protocol && !metadata.is_converged(pertDesc, protocol, freq));\n    if (!should_solve) {\n      if (world.rank() == 0) {\n        print(\"⚠️  Skipping frequency\", freq, \"at protocol\", protocol,\n              \"for state:\", pertDesc);\n      }\n      continue;\n    }\n    world.gop.fence();\n    ResponseVector guess =\n        make_response_vector(num_orbitals, is_static, is_unrestricted);\n\n    /*if (world.rank() == 0) {*/\n    /*  madness::print(\"🔄 Attempting to load response vector for\",\n     * state.description());*/\n    /*}*/\n    // At this point, I know that I'm either not saved or not at the final\n    if (is_saved && load_response_vector(world, num_orbitals, state, guess,\n                                         thresh_index, freq_index)) {\n      if (world.rank() == 0) {\n        madness::print(\"📂 Loaded response vector from disk.\");\n      }\n    } else if (thresh_index > 0 &&\n               load_response_vector(world, num_orbitals, state, guess,\n                                    thresh_index - 1, freq_index)) {\n      if (world.rank() == 0) {\n        madness::print(\"📂 Loaded response vector from previous protocol.\");\n      }\n    } else if (!is_static) {\n      // Now i try to load the previous frequency response\n      // if it's in memory, I can use it\n      if (have_previous_freq_response) {\n        if (world.rank() == 0) {\n          madness::print(\"📂 Promoting previous in-memory response as guess.\");\n        }\n      } else {\n        load_response_vector(world, num_orbitals, state, previous_response,\n                             thresh_index, freq_index - 1);\n      }\n\n      world.gop.fence();\n      promote_response_vector(world, previous_response, guess);\n    } else {\n      // Static case: just initialize\n      guess = initialize_guess_vector(world, ground_state, state);\n      if (world.rank() == 0) {\n        madness::print(\"📂 Initialized guess vector.\");\n      }\n    }\n\n    // Run the solver with logging\n    logger.start_state(state);\n\n    auto max_iter = rm.params().maxiter();\n    auto conv_thresh = rm.params().dconv();\n\n    bool converged = solve_response_vector(\n        world, rm, ground_state, state, guess, logger, max_iter, conv_thresh);\n    logger.finalize_state();\n\n    world.gop.fence();\n\n    // Always save results (even if not fully converged)\n    save_response_vector(world, state, guess);\n    metadata.mark_saved(state_id, protocol, freq);\n    metadata.mark_converged(state_id, protocol, freq, converged);\n\n    if (world.rank() == 0) {\n      madness::print(\"💾 Saved response vector at protocol:\", protocol,\n                     state.description());\n    }\n\n    previous_response = guess;\n    have_previous_freq_response = true;\n  }\n\n  // reset current frequency index\n  state.set_frequency_index(0);\n  // If all frequencies done at this protocol, update status\n  state.is_converged =\n      state.at_final_threshold() && metadata.final_converged(state_id);\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/GroundStateData.cpp",
    "content": "#include \"GroundStateData.hpp\"\n\nusing namespace madness;\n\nGroundStateData::GroundStateData(World &world, std::string archiveFile,\n                                 Molecule mol)\n    : molecule(std::move(mol)), spinrestricted(false), num_orbitals(0), L(0.0),\n      k(0), xc(), localize_method(), converged_for_thresh(0.0), original_k(0),\n      archive_File(std::move(archiveFile)) {\n\n  if (world.rank() == 0) {\n    print(\"Constructing GroundStateData for molecule: \");\n    molecule.print();\n  }\n  load(world);\n}\n\nvoid GroundStateData::load(World &world) {\n  archive::ParallelInputArchive input(world, archive_File.c_str());\n\n  unsigned int version;\n  double dummy_energy;\n  std::vector<int> dummy_sets;\n\n  input & version;\n  input & dummy_energy;\n  input & spinrestricted;\n  input & L;\n  input & k;\n  input & molecule;\n  input & xc;\n  input & localize_method;\n\n  if (version > 3) {\n    input & converged_for_thresh;\n  }\n\n  input & num_orbitals;\n  input & energies;\n  input & occ;\n  input & dummy_sets;\n\n  if (k < 1 || k > 30) {\n    if (world.rank() == 0)\n      madness::print(\n          \"Invalid wavelet order read from archive, setting to default k=8.\");\n    k = 8;\n  }\n\n  // save the current k\n  int current_k = FunctionDefaults<3>::get_k();\n\n  // change Default k to the one read from the archive so that read orbitals\n  // is done correctly\n  FunctionDefaults<3>::set_k(k);\n\n  world.gop.fence();\n  orbitals.clear();\n  world.gop.fence();\n\n  for (unsigned int i = 0; i < num_orbitals; ++i) {\n    real_function_3d orbital;\n    input & orbital;\n    orbitals.push_back(orbital);\n  }\n\n  world.gop.fence();\n  truncate(world, orbitals);\n\n  original_k = k;\n  FunctionDefaults<3>::set_truncate_mode(1);\n  // Set the default k back to the original value\n  FunctionDefaults<3>::set_k(current_k);\n}\n\nvoid GroundStateData::print_info() const {\n  madness::print(\"\\nGround State Orbital Information:\");\n  madness::print(\"------------------------\");\n  madness::print(\"XC Functional:\", xc);\n  madness::print(\"Localization Method:\", localize_method);\n  madness::print(\"Spin Restricted:\", spinrestricted);\n  madness::print(\"Number of Orbitals:\", num_orbitals);\n  madness::print(\"Box Size L:\", L);\n  madness::print(\"Wavelet Order k:\", k);\n  madness::print(\"Converged for Threshold:\", converged_for_thresh);\n  madness::print(\"Orbital Energies:\", energies);\n}\n\nvoid GroundStateData::prepareOrbitals(World &world, int current_k,\n                                      double thresh) {\n\n  // Check if the current orbitals' polynomial order is higher (projectable)\n  if (original_k < current_k) {\n    if (world.rank() == 0) {\n      print(\"Cannot project orbitals: current k (\", k,\n            \") is lower than requested k (\", current_k, \").\");\n    }\n    MADNESS_EXCEPTION(\"Orbital polynomial order too low for projection.\", k);\n  }\n  bool needs_reload = false;\n\n  // Check if orbitals need reloading due to polynomial order mismatch or\n  // convergence threshold\n  if (k != current_k || converged_for_thresh > thresh) {\n    if (world.rank() == 0) {\n      print(\"Reloading orbitals: current k (\", k,\n            \") is different from requested k (\", current_k, \").\");\n    }\n    needs_reload = true;\n  }\n\n  if (needs_reload) {\n    load(world);\n    reconstruct(world, orbitals);\n\n    for (auto &orbital : orbitals) {\n      orbital = project(orbital, current_k, thresh, true);\n    }\n    truncate(world, orbitals, thresh);\n\n    // Update orbital metadata\n    k = current_k;\n    converged_for_thresh = thresh;\n  } else {\n    truncate(world, orbitals, thresh);\n  }\n  if (world.rank() == 0) {\n    print_info();\n  }\n  Qhat = QProjector<double, 3>(orbitals);\n}\n// TODO: Need to add functionality for spin restricted\nTensor<double>\nGroundStateData::tryLoadHamiltonianFromJson(World &world, const json &fock_json,\n                                            double thresh, int k) {\n  std::pair<Tensor<double>, Tensor<double>> fock_data;\n  auto protocol = std::string(\"thresh: \") + std::to_string(thresh) +\n                  std::string(\" k: \") + std::to_string(k);\n  // Check if the protocol exists in the JSON\n  if (fock_json.find(protocol) == fock_json.end()) {\n    std::cerr << \"Protocol not found in JSON: \" << protocol << std::endl;\n    return {};\n  } else {\n    fock_data.first = tensor_from_json<double>(fock_json[protocol][\"focka\"]);\n    if (!spinrestricted) {\n      fock_data.second = tensor_from_json<double>(fock_json[protocol][\"fockb\"]);\n    }\n    return fock_data.first;\n  }\n}\n\n// TODO: Need to add functionality for spin restricted\n// TODO: use fock_a and fock_b\nvoid GroundStateData::computePreliminaries(World &world,\n                                           const operatorT &coulop, double vtol,\n                                           const std::string &fock_json_file) {\n\n  auto thresh = FunctionDefaults<3>::get_thresh();\n  auto k = FunctionDefaults<3>::get_k();\n  density_ = computeDensity(world);\n\n  potential_manager_ = std::make_shared<PotentialManager>(molecule, \"a\");\n  potential_manager_->make_nuclear_potential(world);\n  world.gop.fence();\n  world.gop.fence();\n  xcf_.initialize(xc, spinrestricted, world, true);\n\n  auto V_nuc = computeNuclearPotential(vtol);\n  auto V_coul = computeCoulombPotential(coulop, vtol);\n  V_local = V_nuc + V_coul;\n  if (xcf_.is_dft() && (xcf_.hf_exchange_coefficient() != 1.0)) {\n    auto V_xc = computeXCPotential(world);\n    V_local += V_xc;\n  }\n\n  V_nuc.clear();\n  V_coul.clear();\n\n  bool json_exists = std::filesystem::exists(fock_json_file);\n  bool loaded_from_file = false;\n\n  if (json_exists) {\n    auto fock_json = broadcast_json_file(world, fock_json_file);\n    world.gop.fence();\n    Hamiltonian = tryLoadHamiltonianFromJson(world, fock_json, thresh, k);\n  }\n  loaded_from_file = Hamiltonian.has_data();\n\n  if (!loaded_from_file) {\n    auto T = computeKineticEnergy(world);\n    vector_real_function_3d V_hf_phi =\n        zero_functions<double, 3>(world, orbitals.size());\n    if (xcf_.hf_exchange_coefficient() > 0.0) {\n      V_hf_phi = computeHFExchangeEnergy(world);\n    }\n\n    auto V_local_phi = mul_sparse(world, V_local, orbitals, vtol);\n    auto V_phi = gaxpy_oop(1.0, V_local_phi, 1.0, V_hf_phi);\n    truncate(world, V_phi);\n    auto phi_V_phi = matrix_inner(world, orbitals, V_phi);\n\n    Hamiltonian = T + phi_V_phi;\n  }\n  auto new_hamiltonian_no_diag = copy(Hamiltonian);\n  for (size_t i = 0; i < orbitals.size(); i++)\n    new_hamiltonian_no_diag(long(i), long(i)) = 0.0;\n  Hamiltonian_no_diag = new_hamiltonian_no_diag;\n}\n\nreal_function_3d GroundStateData::computeDensity(World &world) const {\n  auto phi_squared = square(world, orbitals);\n  compress(world, phi_squared);\n  real_function_3d rho = sum(world, phi_squared);\n  rho.truncate();\n  phi_squared.clear();\n  return rho;\n}\n\nreal_function_3d GroundStateData::computeNuclearPotential(double vtol) const {\n  auto v_nuc = potential_manager_->vnuclear();\n  v_nuc.truncate(vtol);\n  return v_nuc;\n}\n\n[[nodiscard]] real_function_3d\nGroundStateData::computeCoulombPotential(const operatorT &coulop,\n                                         double vtol) const {\n  auto v_coul = 2.0 * apply(coulop, density_, true);\n  v_coul.truncate(vtol);\n  return v_coul;\n}\n\nreal_function_3d GroundStateData::computeXCPotential(World &world) const {\n  XCOperator<double, 3> xc_operator{world, xc, spinrestricted, density_,\n                                    density_};\n  auto v_xc = xc_operator.make_xc_potential();\n  return v_xc;\n}\n\nvector_real_function_3d\nGroundStateData::computeHFExchangeEnergy(World &world) const {\n  const double lo = 1.e-10;\n  Exchange<double, 3> k{world, lo};\n\n  auto phi = copy(world, orbitals, true);\n  k.set_algorithm(Exchange<double, 3>::ExchangeAlgorithm::multiworld_efficient_row);\n  k.set_bra_and_ket(phi, phi);\n  // k.set_symmetric(true).set_printlevel(r_params.print_level());\n  auto kphi = k(phi);\n  auto Vpsi = -xcf_.hf_exchange_coefficient() * kphi;\n\n  return Vpsi;\n}\nTensor<double> GroundStateData::computeKineticEnergy(World &world) const {\n  auto phi = copy(world, orbitals, true);\n  reconstruct(world, phi);\n\n  real_derivative_3d Dx(world, 0);\n  real_derivative_3d Dy(world, 1);\n  real_derivative_3d Dz(world, 2);\n\n  auto fx = apply(world, Dx, phi);\n  auto fy = apply(world, Dy, phi);\n  auto fz = apply(world, Dz, phi);\n\n  compress(world, fx, true);\n  compress(world, fy, true);\n  compress(world, fz, true);\n  compress(world, phi, true);\n  world.gop.fence();\n\n  Tensor<double> T =\n      0.5 * (matrix_inner(world, fx, fx) + matrix_inner(world, fy, fy) +\n             matrix_inner(world, fz, fz));\n\n  phi.clear();\n  fx.clear();\n  fy.clear();\n  fz.clear();\n\n  return T;\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/GroundStateData.hpp",
    "content": "#ifndef GROUNDSTATEDATA_HPP\n#define GROUNDSTATEDATA_HPP\n\n#include \"potentialmanager.h\"\n#include <madness/chem/SCF.h>\n#include \"broadcast_json.hpp\"\n#include <madness/chem/molecule.h>\n#include <madness/mra/funcdefaults.h>\n#include <madness/mra/vmra.h>\n#include <madness/tensor/tensor.h>\n#include <madness/world/world.h>\n#include <madness/chem/projector.h>\n#include <vector>\n\nusing namespace madness;\n\nclass GroundStateData {\n\npublic:\n  Molecule molecule;\n\nprivate:\n  bool spinrestricted;\n  unsigned int num_orbitals{};\n  double L;\n  int k;\n  std::string xc;\n  std::string localize_method;\n  double converged_for_thresh;\n  int original_k;\n  std::string archive_File;\n  Tensor<double> energies;\n  Tensor<double> occ;\n\npublic:\n  std::vector<real_function_3d> orbitals;\n  QProjector<double, 3> Qhat;\n  bool fock_loaded_from_file = false;\n  [[nodiscard]] bool isFockLoadedFromFile() const {\n    return fock_loaded_from_file;\n  }\n\n  [[nodiscard]] const std::vector<real_function_3d> &getOrbitals() const {\n    return orbitals;\n  }\n  [[nodiscard]] const Tensor<double> &getEnergies() const { return energies; }\n  [[nodiscard]] const Tensor<double> &getOcc() const { return occ; }\n  [[nodiscard]] long getNumOrbitals() const { return num_orbitals; }\n  [[nodiscard]] double getL() const { return L; }\n  [[nodiscard]] int getK() const { return k; }\n  [[nodiscard]] bool isSpinRestricted() const { return spinrestricted; }\n  [[nodiscard]] const Molecule &getMolecule() const { return molecule; }\n  // The following\n  XCfunctional xcf_;\n  std::shared_ptr<PotentialManager> potential_manager_;\n  // The following variables are used for the response calculation\n  real_function_3d density_;\n  real_function_3d V_local;\n  Tensor<double> Hamiltonian;\n  Tensor<double> Hamiltonian_no_diag;\n\n  explicit GroundStateData(World &world, std::string archiveFile, Molecule mol);\n  void load(World &world);\n  void prepareOrbitals(World &world, int current_k, double thresh);\n  void print_info() const;\n  // These functions are used to compute the preliminaries\n  real_function_3d computeDensity(World &world) const;\n  [[nodiscard]] real_function_3d computeNuclearPotential(double vtol) const;\n  [[nodiscard]] real_function_3d\n  computeCoulombPotential(const operatorT &coulop, double vtol) const;\n  void computePreliminaries(World &world, const operatorT &coulop, double vtol,\n                            const std::string &fock_json_file);\n  [[nodiscard]] real_function_3d computeXCPotential(World &world) const;\n  [[nodiscard]] Tensor<double> computeKineticEnergy(World &world) const;\n  [[nodiscard]] vector_real_function_3d\n  computeHFExchangeEnergy(World &world) const;\n  Tensor<double> tryLoadHamiltonianFromJson(World &world, const json &fock_json,\n                                            double thresh, int k);\n};\n\n#endif // GROUNDSTATEDATA_HPP\n"
  },
  {
    "path": "src/apps/molresponse_v2/InnerContributions.hpp",
    "content": "\n#pragma once\n#include <madness/external/nlohmann_json/json.hpp>\n\nusing json = nlohmann::json;\n\ninline json &global_inner_contributions() {\n  static json g_inner_contributions = json::object();\n  return g_inner_contributions;\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/MolecularProperty.hpp",
    "content": "#pragma once\n#include \"ResponseState.hpp\"\n#include <string>\n#include <vector>\n\n// Enumerate clearly your supported molecular properties\nenum class MolecularPropertyType { Polarizability, Raman, Hyperpolarizability };\n\n// A molecular property request explicitly specifies frequencies and possibly\n// directions\nstruct MolecularProperty {\n  MolecularPropertyType type;\n  std::vector<double> frequencies; // Frequencies explicitly required\n  std::vector<char> directions;    // Directions explicitly required (optional)\n\n  MolecularProperty(MolecularPropertyType t, std::vector<double> freqs,\n                    std::vector<char> dirs = {'x', 'y', 'z'})\n      : type(t), frequencies(freqs), directions(dirs) {}\n};\n\n\n\n\n// Helper to convert enum to string\nstd::string property_type_to_string(MolecularPropertyType type) {\n  switch (type) {\n    case MolecularPropertyType::Polarizability:\n      return \"Polarizability\";\n    case MolecularPropertyType::Raman:\n      return \"Raman\";\n    case MolecularPropertyType::Hyperpolarizability:\n      return \"Hyperpolarizability\";\n    default:\n      return \"Unknown\";\n  }\n}\n\n// Function to print requested properties\nvoid print_requested_properties(const std::vector<MolecularProperty> &properties) {\n  std::cout << \"\\n📋 Requested Molecular Properties:\\n\";\n  for (const auto &prop : properties) {\n    std::cout << \"- \" << property_type_to_string(prop.type) << \":\\n\";\n    for (double freq : prop.frequencies) {\n      for (char dir : prop.directions) {\n        std::cout << \"  • Direction: \" << dir << \", Frequency: \"\n                  << std::scientific << std::setprecision(3) << freq << \"\\n\";\n      }\n    }\n  }\n}\n\n"
  },
  {
    "path": "src/apps/molresponse_v2/Perturbation.hpp",
    "content": "#pragma once\n#include <string>\n#include <variant>\n\ntemplate <class... Ts> struct overloaded : Ts... {\n  using Ts::operator()...;\n};\ntemplate <class... Ts> overloaded(Ts...) -> overloaded<Ts...>;\n\nenum class PerturbationType {\n  Dipole,\n  NuclearDisplacement,\n  Magnetic,\n};\n\nstruct DipolePerturbation {\n  char direction; // X, Y, or Z\n};\n\nstruct NuclearDisplacementPerturbation {\n  int atom_index;\n  char direction; // X, Y, or Z\n};\n\nstruct MagneticPerturbation {\n  char direction; // X, Y, or Z\n};\n\nusing Perturbation =\n    std::variant<DipolePerturbation, NuclearDisplacementPerturbation,\n                 MagneticPerturbation>;\n\n// helper to stringify any single perturbation:\ninline std::string describe_perturbation(const Perturbation &p) {\n\n  auto describe = overloaded{\n      [](const DipolePerturbation &d) {\n        return std::string(\"Dipole_\") + d.direction;\n      },\n      [](const NuclearDisplacementPerturbation &n) {\n        return \"NucA_\" + std::to_string(n.atom_index) +\n               std::string(1, n.direction);\n      },\n      [](const MagneticPerturbation &m) {\n        return \"Mag_\" + std::string(1, m.direction);\n      },\n  };\n  return std::visit(describe, p);\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/PropertyManager.hpp",
    "content": "#pragma once\n#include <madness/tensor/tensor.h>\n#include <madness/world/world.h>\n\n#include <chrono>\n#include <filesystem>\n#include <fstream>\n#include <iomanip>\n#include <limits>\n#include <madness/external/nlohmann_json/json.hpp>\n#include <madness/tensor/tensor_json.hpp>\n#include <string>\n\n#include \"InnerContributions.hpp\"\n#include \"MolecularProperty.hpp\"\n#include \"ResponseIO.hpp\"\n#include \"../../madness/chem/ResponseParameters.hpp\"\n#include \"ResponseSolverUtils.hpp\"\n#include \"ResponseVector.hpp\"\n#include \"VBCMacrotask.hpp\"\n#include \"broadcast_json.hpp\"\n#include \"functypedefs.h\"\n\nusing json = nlohmann::json;\n\ninline std::string iso_timestamp() {\n  using namespace std::chrono;\n  auto now = system_clock::now();\n  auto itt = system_clock::to_time_t(now);\n  std::ostringstream ss;\n  ss << std::put_time(std::gmtime(&itt), \"%Y%m%dT%H%M%SZ\");\n  return ss.str();\n}\n\ninline madness::Tensor<double> compute_response_inner_product_tensor(\n    madness::World &world, const std::vector<vector_real_function_3d> &A_vecs,\n    const std::vector<vector_real_function_3d> &B_vecs,\n    bool save_contributions = false, const std::string &entry_name = \"\") {\n  const size_t nA = A_vecs.size();\n  const size_t nB = B_vecs.size();\n  if (nA == 0 || nB == 0)\n    throw std::runtime_error(\"Input vectors must not be empty.\");\n\n  const size_t num_rf = A_vecs[0].size();\n  madness::Tensor<double> result(nA, nB);\n\n  // if they asked us to save\n  json this_entry;\n  if (save_contributions) {\n    this_entry[\"num_response_functions\"] = num_rf;\n    this_entry[\"contributions\"] = json::object();\n    this_entry[\"timestamp\"] = iso_timestamp();\n  }\n\n  // accumulate\n  for (size_t k = 0; k < num_rf; ++k) {\n    vector_real_function_3d Ak(nA), Bk(nB);\n    for (size_t i = 0; i < nA; ++i) Ak[i] = A_vecs[i][k];\n    for (size_t j = 0; j < nB; ++j) Bk[j] = B_vecs[j][k];\n\n    world.gop.fence();\n\n    auto M_k = matrix_inner(world, Ak, Bk);\n    result += M_k;\n\n    if (save_contributions) {\n      // serialize M_k\n      this_entry[\"contributions\"][std::to_string(k)] =\n          madness::tensor_to_json<double>(M_k);\n    }\n  }\n\n  if (save_contributions) {\n    // choose a key to store under; if user gave one, use it, else timestamp\n    auto &g = global_inner_contributions();\n\n    std::string key = entry_name.empty()\n                          ? this_entry[\"timestamp\"].get<std::string>()\n                          : entry_name;\n    g[key] = std::move(this_entry);\n  }\n\n  return result;\n}\n\n/*madness::Tensor<double> compute_response_inner_product_tensor(*/\n/*    World &world, const std::vector<vector_real_function_3d> &A_vecs,*/\n/*    const std::vector<vector_real_function_3d> &B_vecs) {*/\n/*  const size_t nA = A_vecs.size();*/\n/*  const size_t nB = B_vecs.size();*/\n/**/\n/*  if (nA == 0 || nB == 0)*/\n/*    throw std::runtime_error(\"Input vectors must not be empty.\");*/\n/**/\n/*  const size_t num_rf =*/\n/*      A_vecs[0].size(); // assuming all vectors have the same response size*/\n/*  madness::Tensor<double> result(nA, nB);*/\n/**/\n/*  for (size_t k = 0; k < num_rf; ++k) {*/\n/*    vector_real_function_3d Ak(nA), Bk(nB);*/\n/*    for (size_t i = 0; i < nA; ++i)*/\n/*      Ak[i] = A_vecs[i][k];*/\n/*    for (size_t j = 0; j < nB; ++j)*/\n/*      Bk[j] = B_vecs[j][k];*/\n/**/\n/*    result += matrix_inner(world, Ak, Bk);*/\n/*  }*/\n/**/\n/*  return result;*/\n/*}*/\n\nstruct PropRow {\n  std::string property;\n  std::string\n      component;  // x,y,z, xx,xy,xz,yy,yz,zz, xxx, xxy, xxz, yyy, yyz, zzz\n  double freq1;\n  std::optional<double> freq2;\n  std::optional<double> value;\n};\n\nstruct PropKey {\n  std::string property;\n  std::string component;\n  double freq1;\n  std::optional<double> freq2;\n\n  bool operator<(PropKey const &other) const noexcept {\n    if (property != other.property) return property < other.property;\n    if (component != other.component) return component < other.component;\n    if (freq1 != other.freq1) return freq1 < other.freq1;\n    // for freq2\n    if (!freq2 && other.freq2) return true;\n    if (freq2 && !other.freq2) return false;\n    if (freq2 && other.freq2) return *freq2 < *other.freq2;\n    return false;\n  }\n};\n// enable Json to PropRow\ninline void to_json(json &j, PropRow const &r) {\n  j = json::object();\n  j[\"property\"] = r.property;\n  j[\"component\"] = r.component;\n  j[\"freqB\"] = r.freq1;\n  if (r.freq2) {\n    j[\"freqC\"] = *r.freq2;\n  }\n  if (r.value) {\n    j[\"value\"] = *r.value;\n  }\n}\n\ninline void from_json(json const &j, PropRow &r) {\n  r.property = j.at(\"property\").get<std::string>();\n  r.component = j.at(\"component\").get<std::string>();\n  r.freq1 = j.at(\"freqB\").get<double>();\n  if (j.contains(\"freqC\")) {\n    r.freq2 = j.at(\"freqC\").get<double>();\n  }\n  if (j.contains(\"value\")) {\n    r.value = j.at(\"value\").get<double>();\n  }\n}\n\nclass PropertyManager {\n public:\n  explicit PropertyManager(World &world, const std::string &filename)\n      : filename_(filename) {\n    if (fs::exists(filename_)) {\n      // load JSON\n      json j = broadcast_json_file(world, filename_);\n      if (j.is_array()) {\n        for (auto const &r : j) {\n          PropRow row = r.get<PropRow>();\n          PropKey key = {row.property, row.component, row.freq1, row.freq2};\n          rows_[key] = std::move(row);\n          // flat‐format: just parse rows\n        }\n      } else {\n        // old nested format: convert to rows_\n        parse_old_format(j);\n      }\n    }\n  }\n\n  /// Return the flat rows as a JSON array\n  json to_json() const {\n    json a = json::array();\n    for (const auto &[key, row] : rows_) {\n      a.push_back(row);\n    }\n    return a;\n  }\n\n  /// Overwrite file with flat JSON array\n  void save() const {\n    std::ofstream out(filename_);\n    out << std::setw(12) << to_json() << \"\\n\";\n  }\n\n  // Presence checks\n  [[nodiscard]] bool has_alpha(double omega, std::string comp) const {\n    PropKey k{\"polarizability\", comp, omega, std::nullopt};\n    auto it = rows_.find(k);\n    return it != rows_.end() && it->second.value.has_value();\n    return rows_.count(k) != 0;\n  }\n  [[nodiscard]] bool has_beta(double w1, double w2, std::string comp) const {\n    PropKey k{\"hyperpolarizability\", comp, w1, w2};\n    auto it = rows_.find(k);\n    return it != rows_.end() && it->second.value.has_value();\n  }\n\n  // Insert or overwrite α entries\n  void set_alpha(double omega, const madness::Tensor<double> &tensor,\n                 const std::string &dirs) {\n    size_t N = dirs.size();\n    for (size_t i = 0; i < N; ++i) {\n      for (size_t j = 0; j < N; ++j) {\n        std::string comp = std::string{dirs[i]} + dirs[j];\n        PropKey k{\"polarizability\", comp, omega, std::nullopt};\n        PropRow r{\n            .property = k.property,\n            .component = k.component,\n            .freq1 = k.freq1,\n            .freq2 = std::nullopt,\n            .value = tensor(i, j),\n        };\n        rows_[k] = std::move(r);\n      }\n    }\n  }\n\n  // Insert or overwrite β entries\n  void set_beta(double w1, double w2, const std::string &comp, double value) {\n    PropKey k{\"hyperpolarizability\", comp, w1, w2};\n    PropRow r{\n        .property = k.property,\n        .component = k.component,\n        .freq1 = k.freq1,\n        .freq2 = k.freq2,\n        .value = value,\n    };\n    rows_[k] = std::move(r);\n  }\n\n  // 3) Append new α rows\n\n  /// Print all PropRow entries in a fixed‐width table\n  void print_table() const {\n    if (rows_.empty()) {\n      std::cout << \"No property rows to display.\\n\";\n      return;\n    }\n    // 1) Header\n    std::cout << \"\\n📊 Property Results\\n\";\n    std::cout << std::left << std::setw(18) << \"Property\" << std::setw(8)\n              << \"Comp\" << std::setw(8) << \"ω1\" << std::setw(8) << \"ω2\"\n              << std::setw(12) << \"Value\" << \"\\n\";\n\n    // 2) Divider line\n    std::cout << std::string(18 + 8 + 8 + 8 + 12, '_') << \"\\n\";\n\n    // 3) Rows\n    for (auto const &[k, r] : rows_) {\n      // format ω1 and ω2\n      std::ostringstream o1, o2;\n      o1 << std::fixed << std::setprecision(3) << r.freq1;\n      if (r.freq2) {\n        o2 << std::fixed << std::setprecision(3) << *r.freq2;\n      } else {\n        o2 << \"-\";\n      }\n\n      std::cout << std::left << std::setw(22) << r.property << std::setw(8)\n                << r.component << std::setw(8) << o1.str() << std::setw(8)\n                << o2.str() << std::setw(12) << std::fixed\n                << std::setprecision(6) << *r.value << \"\\n\";\n    }\n  }\n\n private:\n  std::string filename_;\n  std::map<PropKey, PropRow> rows_;\n  static std::string freq_str(double freq) {\n    std::ostringstream ss;\n    ss << std::scientific << std::setprecision(3) << freq;\n    return ss.str();\n  }\n\n  // Helper: convert old nested JSON into flat rows_\n  void parse_old_format(json const &old) {\n    // --- polarizability ---\n    if (old.contains(\"polarizability\")) {\n      for (auto const &[freq_s, obj] : old[\"polarizability\"].items()) {\n        double omega = std::stod(freq_s);\n        std::string dirs = obj.value(\"directions\", std::string{});\n        auto tens = tensor_from_json<double>(obj);\n        set_alpha(omega, tens, dirs);\n      }\n    }\n    // --- hyperpolarizability ---\n    if (old.contains(\"hyperpolarizability\")) {\n      for (auto const &[w1_s, sub] : old[\"hyperpolarizability\"].items()) {\n        if (w1_s == \"directions\") continue;\n        double w1 = std::stod(w1_s);\n        for (auto const &[w2_s, entry] : sub.items()) {\n          double w2 = std::stod(w2_s);\n          for (auto const &[bc, tens_json] : entry.items()) {\n            auto tens = tensor_from_json<double>(tens_json);\n            // flatten each component A in the resulting vector/tensor\n            // assume tens is 1×N or N×1:\n            for (int k = 0; k < tens.size(); ++k) {\n              std::string comp =\n                  std::string{tens_json.value(\"directions\", \"\")[k]} + bc;\n              double val = (tens.dim(0) == 1 ? tens(0, k) : tens(k, 0));\n              set_beta(w1, w2, comp, val);\n            }\n          }\n        }\n      }\n    }\n  }\n};\n\n/*void initialize_property_structure(PropertyManager &pm,*/\n/*                                   const ResponseParameters &rp) {*/\n/*  auto props = rp.requested_properties();*/\n/*  auto dipole_dirs = rp.dipole_directions();*/\n/*  auto nuclear_dirs = rp.nuclear_directions();*/\n/*  auto nuclear_atom_indices = rp.nuclear_atom_indices();*/\n/*  auto dipole_freqs = rp.dipole_frequencies();*/\n/*  auto nuclear_freqs = rp.nuclear_frequencies();*/\n/**/\n/*  for (const auto &prop : props) {*/\n/*    if (prop == \"polarizability\") {*/\n/*      auto num_dirs = dipole_dirs.size();*/\n/**/\n/*      std::string directions_string;*/\n/*      for (char dir : dipole_dirs) {*/\n/*        directions_string += dir;*/\n/*      }*/\n/**/\n/*      for (double omega : dipole_freqs) {*/\n/*        if (!pm.has_alpha(omega, directions_string)) {*/\n/*          madness::Tensor<double> empty_tensor(num_dirs,*/\n/*                                               num_dirs);  // 3x3 alpha*/\n/*          pm.set_alpha(omega, empty_tensor, directions_string);*/\n/*        }*/\n/*      }*/\n/*    } else if (prop == \"hyperpolarizability\") {*/\n/*      const auto directions_string =*/\n/*          std::string(dipole_dirs.begin(), dipole_dirs.end());*/\n/**/\n/*      for (size_t b = 0; b < dipole_freqs.size(); ++b) {*/\n/*        for (size_t c = b; c < dipole_freqs.size(); ++c) {*/\n/*          double omega1 = dipole_freqs[b];*/\n/*          double omega2 = dipole_freqs[c];*/\n/*          for (char B : dipole_dirs) {*/\n/*            for (char C : dipole_dirs) {*/\n/*              std::string bc = std::string() + B + C;*/\n/*              for (char A : dipole_dirs) {*/\n/*                std::string abc = std::string() + A + B + C;*/\n/*                if (!pm.has_beta(omega1, omega2, abc)) {*/\n/*                  pm.set_beta(omega1, omega2, abc,*/\n/*                              std::numeric_limits<double>::quiet_NaN());*/\n/*                }*/\n/*              }*/\n/*            }*/\n/*          }*/\n/*        }*/\n/*      }*/\n/*    }*/\n/*  }*/\n/**/\n/*  pm.save();*/\n/*}*/\n\n/**\n * @brief Computes the polarizability tensor (α) for a given set of\n * frequencies and directions.\n *\n * @param world The MADNESS world object.\n * @param state_map A map of response states computed from perturbations.\n * @param gs The ground state data.\n * @param frequencies A vector of frequencies for which to compute α.\n * @param directions A string of characters representing the directions\n * for the perturbations.\n * @param pm The property manager to store the computed α tensor.\n */\nvoid compute_alpha(World &world,\n                   std::map<std::string, LinearResponseDescriptor> &state_map,\n                   const GroundStateData &gs,\n                   const std::vector<double> &frequencies,\n                   const std::string &directions, PropertyManager &pm) {\n  const size_t num_directions = directions.size();\n  const size_t num_orbitals = gs.getNumOrbitals();\n  const size_t num_frequencies = frequencies.size();\n  // const bool is_restricted = gs.isSpinRestricted();\n\n  if (world.rank() == 0) {\n    print(\"▶️ Computing α tensor for\", num_directions, \"directions and\",\n          num_frequencies, \"frequencies.\");\n  }\n\n  std::vector<vector_real_function_3d> perturbations;\n  std::vector<ResponseVector> load_vector(num_directions);\n\n  std::vector<std::string> direction_keys;\n  for (const char &dir : directions) {\n    direction_keys.push_back(std::string(\"Dipole_\") + std::string(1, dir));\n  }\n  if (world.rank() == 0) {\n    print(\"Direction keys:\", direction_keys);\n  }\n\n  for (const auto &dir : direction_keys) {\n    if (state_map.find(dir) == state_map.end()) {\n      throw std::runtime_error(\"State not found in state_map: \" + dir);\n    } else {\n      perturbations.push_back(perturbation_vector(\n          world, gs, state_map.at(dir)));  // Get the perturbation vector\n    }\n  }\n\n  for (size_t f = 0; f < num_frequencies; ++f) {\n    double omega = frequencies[f];\n    if (pm.has_alpha(omega, directions)) {\n      if (world.rank() == 0)\n        print(\"✅ Skipping already computed α at ω =\", omega);\n      continue;\n    }\n\n    double alpha_factor = (omega == 0.0) ? -4.0 : -2.0;\n    if (world.rank() == 0) {\n      print(\"🛠️  Computing α at ω =\", omega, \"for directions:\", directions,\n            \" alpha factor = \", alpha_factor);\n    }\n\n    std::vector<vector_real_function_3d> response_vecs(num_directions);\n    std::vector<vector_real_function_3d> perturb_vecs(num_directions);\n\n    for (size_t j = 0; j < num_directions; ++j) {\n      auto &active_state = state_map.at(direction_keys[j]);\n      active_state.set_frequency_index(f);\n      load_response_vector(world, num_orbitals, active_state, load_vector[j],\n                           active_state.thresholds.size() - 1, f);\n      response_vecs[j] = get_flat(load_vector[j]);\n      perturb_vecs[j] = perturbations[j];\n\n      if (omega != 0.0) {\n        // Duplicate for dynamic response\n        perturb_vecs[j].insert(perturb_vecs[j].end(), perturb_vecs[j].begin(),\n                               perturb_vecs[j].end());\n      }\n    }\n\n    // Compute α using the utility\n    madness::Tensor<double> alpha = compute_response_inner_product_tensor(\n        world, response_vecs, perturb_vecs, true,\n        \"alpha_contribs_\" + std::to_string(f));\n\n    alpha *= alpha_factor;\n    if (world.rank() == 0) {\n      print(\"α tensor size:\", alpha.size(), \"x\", alpha.size());\n      print(\"α= \", alpha);\n    }\n\n    pm.set_alpha(omega, alpha, directions);\n  }\n  pm.save();\n}\n\nvoid compute_beta(\n    World &world, const GroundStateData &gs, const PerturbationType a_type,\n    const std::vector<Perturbation> &perturbation_A,\n    const std::pair<PerturbationType, PerturbationType> &bc_types,\n    const std::vector<std::pair<Perturbation, Perturbation>> &BC_pairs,\n    const std::pair<std::vector<double>, std::vector<double>> &frequencies,\n    PropertyManager &pm) {\n  const bool is_spin_restricted = gs.isSpinRestricted();\n  const int num_orbitals = static_cast<int>(gs.getNumOrbitals());\n  // const double thresh = FunctionDefaults<3>::get_thresh();\n\n  // 1) Build a SimpleVBCComputer once\n  auto vbc_computer = SimpleVBCComputer(world, gs);\n\n  // 2) Loop over all freq\n  for (auto &freq_b : frequencies.first) {\n    for (auto &freq_c : frequencies.second) {\n      // Get all BC pairs possible out of Perturbation\n      for (auto [B, C] : BC_pairs) {\n        VBCResponseState vbc_state(\n            bc_types.first, bc_types.second, B, C, freq_b, freq_c,\n            FunctionDefaults<3>::get_thresh(), is_spin_restricted);\n        auto bc = vbc_state.perturbationDescription();\n        auto pertB = std::get<DipolePerturbation>(B);  // get the B perturbation\n        auto pertC = std::get<DipolePerturbation>(C);  // get the C perturbation\n\n        std::vector<std::string> abc_string;\n        for (auto a : perturbation_A) {\n          auto pertA = std::get<DipolePerturbation>(a);\n          auto dir = pertA.direction;\n          auto comp = std::string(1, dir) + pertB.direction +\n                      pertC.direction;  // get the perturbation direction\n          abc_string.push_back(comp);\n        }\n\n        bool skip = true;\n        // skip if all abc are already computed\n        for (auto &abc : abc_string) {\n          if (!pm.has_beta(freq_b, freq_c, abc)) {\n            skip = false;\n            break;\n          }\n        }\n        if (skip) {\n          if (world.rank() == 0)\n            print(\"✅ Skipping already computed β at ωB =\", freq_b,\n                  \"ωC =\", freq_c, \"for directions:\", abc_string);\n          continue;\n        }\n\n        auto vbc_vec = vbc_computer.compute_and_save(vbc_state);\n        auto vbc_flat = get_flat(vbc_vec);\n\n        auto omega_A = vbc_state.current_frequency();\n        std::vector<ResponseVector> a_vecs(perturbation_A.size());\n        std::vector<vector_real_function_3d> xa_vecs(\n            perturbation_A.size());  // for the A perturbations\n        //\n\n        std::vector<real_function_3d> opAs(perturbation_A.size());\n        for (size_t a = 0; a < perturbation_A.size(); ++a) {\n          auto pertA = perturbation_A[a];\n          auto state_A = LinearResponseDescriptor(\n              pertA, a_type, {omega_A}, {FunctionDefaults<3>::get_thresh()},\n              is_spin_restricted);\n          opAs[a] = raw_perturbation_operator(world, gs, state_A);\n          load_response_vector(world, num_orbitals, state_A, a_vecs[a], 0, 0);\n          auto flat = get_flat(a_vecs[a]);\n          if (omega_A == 0.0) {\n            flat.insert(flat.end(), flat.begin(),\n                        flat.end());  // replicate for static\n          }\n          xa_vecs[a] = -1.0 * flat;\n        }\n\n        madness::Tensor<double> beta_tensor =\n            compute_response_inner_product_tensor(world, xa_vecs, {vbc_flat},\n                                                  true, \"beta_contribs\" + bc);\n\n        // We only need one copy of xb_phi0\n        DynamicRestrictedResponse xb_phi0(num_orbitals);\n        DynamicRestrictedResponse xc_phi0(num_orbitals);\n        DynamicRestrictedResponse y_zeta_bc(num_orbitals);\n        DynamicRestrictedResponse y_zeta_cb(num_orbitals);\n\n        auto [xb, xc] =\n            vbc_computer.get_BC_vecs(vbc_state);  // get the B and C states\n\n        xb_phi0.x_alpha = std::get<DynamicRestrictedResponse>(xb).x_alpha;\n        xb_phi0.y_alpha = gs.orbitals;\n        xc_phi0.x_alpha = std::get<DynamicRestrictedResponse>(xc).x_alpha;\n        xc_phi0.y_alpha = gs.orbitals;\n        y_zeta_bc.x_alpha = std::get<DynamicRestrictedResponse>(xc).y_alpha;\n        y_zeta_cb.x_alpha = std::get<DynamicRestrictedResponse>(xb).y_alpha;\n        y_zeta_bc.y_alpha = SimpleVBCComputer::make_zeta_bc(\n            world, std::get<DynamicRestrictedResponse>(xb).y_alpha,\n            std::get<DynamicRestrictedResponse>(xc).x_alpha, gs.orbitals);\n        y_zeta_cb.y_alpha = SimpleVBCComputer::make_zeta_bc(\n            world, std::get<DynamicRestrictedResponse>(xc).y_alpha,\n            std::get<DynamicRestrictedResponse>(xb).x_alpha, gs.orbitals);\n\n        xb_phi0.flatten();\n        xc_phi0.flatten();\n        y_zeta_bc.flatten();\n        y_zeta_cb.flatten();\n\n        std::vector<vector_real_function_3d> ra_y_zeta_bc(\n            perturbation_A.size());\n        std::vector<vector_real_function_3d> ra_y_zeta_cb(\n            perturbation_A.size());\n        for (size_t a = 0; a < perturbation_A.size(); ++a) {\n          ra_y_zeta_bc[a] = copy(world, get_flat(y_zeta_bc)) * opAs[a];\n          ra_y_zeta_cb[a] = copy(world, get_flat(y_zeta_cb)) * opAs[a];\n        }\n        std::vector<vector_real_function_3d> xb_phi0_vec(1);\n        std::vector<vector_real_function_3d> xc_phi0_vec(1);\n        xb_phi0_vec[0] = get_flat(xb_phi0);\n        xc_phi0_vec[0] = get_flat(xc_phi0);\n\n        auto file_name = \"responses/\" + vbc_state.perturbationDescription() +\n                         \"_beta_zeta_bc_0.json\";\n        madness::Tensor<double> beta_2 = compute_response_inner_product_tensor(\n            world, ra_y_zeta_bc, xb_phi0_vec, true, \"beta_zeta_bc_1\");\n\n        file_name = \"responses/\" + vbc_state.perturbationDescription() +\n                    \"_beta_zeta_bc_1.json\";\n        madness::Tensor<double> beta_3 = compute_response_inner_product_tensor(\n            world, ra_y_zeta_cb, xc_phi0_vec, true, file_name);\n        if (world.rank() == 0) {\n          print(\"beta_3 tensor size:\", beta_3.size(), \"x\", beta_3.size());\n          print(\"beta_3= \\n \", beta_3);\n        }\n\n        beta_tensor += beta_2;\n        beta_tensor += beta_3;\n\n        beta_tensor *= -2.0;  // factor of -2 for beta\n        if (world.rank() == 0) {\n          print(vbc_state.perturbationDescription());\n          print(\"β tensor size:\", beta_tensor.size(), \"x\", beta_tensor.size());\n          print(\"β= \\n\", beta_tensor);\n        }\n\n        int aa = 0;\n\n        for (auto comp : abc_string) {\n          pm.set_beta(freq_b, freq_c, comp,\n                      beta_tensor(aa, 0));  // set the β value\n          aa++;\n        }\n        // get perturbation direction\n      }\n    }\n  }\n  pm.save();\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Compute the (frequency-dependent) hyperpolarizability β(ωA;ωB,ωC)\n//  ωB and ωC each run over the same list of input frequencies.\n//  directions = subset of {'x','y','z'} to include.\n// ─────────────────────────────────────────────────────────────────────────────\nvoid compute_hyperpolarizability(\n    World &world, const GroundStateData &gs,\n    const std::vector<double> &frequencies,  // ωB and ωC\n    const std::string &directions,           // which Cartesian dirs\n    PropertyManager &pm) {\n  // 1) Build A-list (dipole along each dir)\n  std::vector<Perturbation> A_pert;\n  A_pert.reserve(directions.size());\n  for (char d : directions) A_pert.emplace_back(DipolePerturbation{d});\n\n  // 2) Build all BC pairs of two dipoles\n  std::pair<PerturbationType, PerturbationType> bc_types = {\n      PerturbationType::Dipole, PerturbationType::Dipole};\n  std::vector<std::pair<Perturbation, Perturbation>> BC_pairs;\n  for (char b : directions)\n    for (char c : directions)\n      BC_pairs.emplace_back(DipolePerturbation{b}, DipolePerturbation{c});\n\n  auto freq_pair = std::make_pair(frequencies, frequencies);\n\n  // 3) Dispatch\n  compute_beta(world, gs,\n               PerturbationType::Dipole,  // A-type\n               A_pert,\n               bc_types,  // B and C types\n               BC_pairs,\n               freq_pair,  // ωB and ωC = same list of freqs\n               pm);\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Compute the Raman response (∂α/∂Q) via β(Dipole; Dipole, NuclearDisp).\n//  frequencies: the optical frequencies for both Dipole and Raman.\n//  dip_dirs: which dipole directions to include.\n// ─────────────────────────────────────────────────────────────────────────────\nvoid compute_Raman(\n    World &world, const GroundStateData &gs,\n    const std::pair<std::vector<double>, std::vector<double>> &BC_frequencies,\n    const std::string &dip_dirs,  // e.g. {'x','y','z'}\n    const std::string &nuc_dirs,  // e.g. {'x','y','z'}\n    PropertyManager &pm) {\n  // 1) A-list is still the dipole directions\n  std::vector<Perturbation> A_pert;\n  A_pert.reserve(dip_dirs.size());\n  for (char d : dip_dirs) A_pert.emplace_back(DipolePerturbation{d});\n\n  // 2) Enumerate all nuclear displacements (per atom, per axis)\n  std::vector<Perturbation> nucs;\n  nucs.reserve(3 * gs.molecule.natom());\n  for (size_t atom = 0; atom < gs.molecule.natom(); ++atom) {\n    for (char dir : {'x', 'y', 'z'})\n      nucs.emplace_back(NuclearDisplacementPerturbation{static_cast<int>(atom), dir});\n  }\n\n  std::pair<PerturbationType, PerturbationType> bc_types = {\n      PerturbationType::Dipole, PerturbationType::NuclearDisplacement};\n\n  // 3) Build BC pairs = (Dipole, NuclearDisp)\n  std::vector<std::pair<Perturbation, Perturbation>> BC_pairs;\n  BC_pairs.reserve(dip_dirs.size() * nucs.size());\n  for (char b : dip_dirs) {\n    for (auto &n : nucs) {\n      BC_pairs.emplace_back(DipolePerturbation{b},\n                            std::get<NuclearDisplacementPerturbation>(n));\n    }\n  }\n\n  // 4) Dispatch\n  compute_beta(world, gs,\n               PerturbationType::Dipole,  // the “A”-perturbation is always\n               A_pert, bc_types, BC_pairs,\n               BC_frequencies,  // ωB and ωC = same list of freqs\n               pm);\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseDebugLogger.hpp",
    "content": "#pragma once\n#include <fstream>\n#include <iomanip>\n#include <madness/external/nlohmann_json/json.hpp>\n\n#include \"ResponseState.hpp\"\n\nnamespace fs = std::filesystem;\nusing json = nlohmann::json;\n\n//==============================================================================\n// ResponseDebugLogger\n//   - accumulates debug timing/value data across runs\n//   - preserves earlier entries for the same state.description()\n//==============================================================================\nclass ResponseDebugLogger {\n public:\n  // constructor: pass the filename you want to write to (e.g.\n  // \"responses/response_log.json\")\n  explicit ResponseDebugLogger(const std::string &filename,\n                               bool enabled = false)\n      : enabled_(enabled), filename_(filename) {\n    // if an existing log file is there, load it\n    if (fs::exists(filename_)) {\n      std::ifstream in(filename_);\n      in >> log_data_;\n    }\n  }\n\n  [[nodiscard]] json to_json() const { return log_data_; }\n\n  [[nodiscard]] bool enabled() const { return enabled_; }\n  void set_enabled(bool on) { enabled_ = on; }\n\n  // must call at the start of each new state\n  void start_state(const LinearResponseDescriptor &state) {\n    if (!enabled_) return;\n\n    current_key_ = state.description();\n    // if we've previously logged this state, start from its existing entry,\n    // otherwise create a fresh template\n    if (log_data_.contains(current_key_)) {\n      current_entry_ = log_data_[current_key_];\n    } else {\n      current_entry_ = {{\"description\", current_key_},\n                        {\"iteration_values\", json::array()},\n                        {\"iteration_timings\", json::array()}};\n    }\n  }\n\n  // call at the start of each new iterate() call\n  void begin_iteration(size_t iter_index) {\n    if (!enabled_) return;\n    current_iter_values_ = {{\"iter\", iter_index}, {\"steps\", json::object()}};\n    current_iter_timing_ = {{\"iter\", iter_index}, {\"steps\", json::object()}};\n  }\n\n  // log a numeric value under a step name\n  template <typename T>\n  void log_value(const std::string &step_name, const T &value) {\n    if (!enabled_) return;\n    current_iter_values_[\"steps\"][step_name][\"value\"] = value;\n  }\n\n  // log wall + cpu times under a step name\n  void log_timing(const std::string &step_name, double wall_time,\n                  double cpu_time) {\n    if (!enabled_) return;\n    auto &S = current_iter_timing_[\"steps\"][step_name];\n    S[\"wall_time\"] = wall_time;\n    S[\"cpu_time\"] = cpu_time;\n  }\n\n  // convenience for both in one shot\n  template <typename T>\n  void log_value_and_time(const std::string &step_name, const T &value,\n                          double wall_time, double cpu_time) {\n    log_value(step_name, value);\n    log_timing(step_name, wall_time, cpu_time);\n  }\n\n  // call at the end of each iteration\n  void end_iteration() {\n    if (!enabled_) return;\n    current_entry_[\"iteration_values\"].push_back(current_iter_values_);\n    current_entry_[\"iteration_timings\"].push_back(current_iter_timing_);\n  }\n\n  // call once per state, after the final iteration\n  void finalize_state() {\n    if (!enabled_) return;\n    log_data_[current_key_] = std::move(current_entry_);\n  }\n\n  // write the entire accumulated JSON to disk\n  void write_to_disk() const {\n    if (!enabled_) return;\n    // ensure directory exists\n    // fs::create_directories(fs::path(filename_).parent_path());\n    std::ofstream out(filename_);\n    out << std::setw(2) << log_data_ << \"\\n\";\n  }\n\n  // ——— pretty‐printers ——————————————————————————————————————————————\n\n  void print_timing_table(const std::string &description) const {\n    if (!enabled_ || !log_data_.contains(description)) return;\n    const auto &iter_data = log_data_.at(description)[\"iteration_timings\"];\n\n    // gather all step names\n    std::set<std::string> step_names;\n    for (auto &iter : iter_data) {\n      for (auto &p : iter[\"steps\"].items()) step_names.insert(p.key());\n    }\n\n    // map each to a 5-char header\n    std::map<std::string, std::string> short_key;\n    for (auto &name : step_names) {\n      short_key[name] = name.substr(0, 5);\n    }\n\n    constexpr int W = 10;\n    std::cout << \"\\n⏱️ Timing for \" << description << \"\\n\";\n    std::cout << std::setw(6) << \"Iter\";\n    for (auto &n : step_names) std::cout << std::setw(W) << short_key[n];\n    std::cout << \"\\n\" << std::string(6 + W * step_names.size(), '-') << \"\\n\";\n\n    for (auto &iter : iter_data) {\n      std::cout << std::setw(6) << iter[\"iter\"].get<int>();\n      for (auto &n : step_names) {\n        if (iter[\"steps\"].contains(n)) {\n          double w = iter[\"steps\"][n][\"wall_time\"].get<double>();\n          std::cout << std::setw(W) << std::fixed << std::setprecision(4) << w;\n        } else {\n          std::cout << std::setw(W) << \"N/A\";\n        }\n      }\n      std::cout << \"\\n\";\n    }\n  }\n\n  void print_values_table(const std::string &description) const {\n    if (!enabled_ || !log_data_.contains(description)) return;\n    const auto &iter_data = log_data_.at(description)[\"iteration_values\"];\n\n    // gather step names\n    std::set<std::string> step_names;\n    for (auto &iter : iter_data) {\n      for (auto &p : iter[\"steps\"].items()) step_names.insert(p.key());\n    }\n\n    constexpr int W = 16;\n    std::cout << \"\\n📋 Values for \" << description << \"\\n\";\n    std::cout << std::setw(6) << \"Iter\";\n    for (auto &n : step_names) std::cout << std::setw(W) << n;\n    std::cout << \"\\n\" << std::string(6 + W * step_names.size(), '-') << \"\\n\";\n\n    for (auto &iter : iter_data) {\n      std::cout << std::setw(6) << iter[\"iter\"].get<int>();\n      for (auto &n : step_names) {\n        if (iter[\"steps\"].contains(n)) {\n          double v = iter[\"steps\"][n][\"value\"].get<double>();\n          std::cout << std::setw(W) << std::scientific << std::setprecision(5)\n                    << v;\n        } else {\n          std::cout << std::setw(W) << \"N/A\";\n        }\n      }\n      std::cout << \"\\n\";\n    }\n  }\n\n private:\n  bool enabled_;\n  std::string filename_;\n  json log_data_;\n\n  // per‐state temporary\n  std::string current_key_;\n  json current_entry_;\n  json current_iter_values_;\n  json current_iter_timing_;\n};\n\nclass TimedValueLogger {\n public:\n  TimedValueLogger(madness::World &world, const std::string &key,\n                   ResponseDebugLogger *logger = nullptr)\n      : world_(world), key_(key), logger_(logger) {\n    world_.gop.fence();\n    start_wall_ = madness::wall_time();\n    start_cpu_ = madness::cpu_time();\n  }\n\n  void log() {\n    double wall = madness::wall_time() - start_wall_;\n    double cpu = madness::cpu_time() - start_cpu_;\n\n    if (logger_ && world_.rank() == 0) {\n      logger_->log_timing(key_, wall, cpu);\n    }\n\n    if (world_.rank() == 0) {\n      std::cout << std::left << std::setw(30) << \"⏱️ [\" + key_ + \"]\"\n                << std::right << \" | Wall: \" << std::setw(7)\n                << std::setprecision(3) << wall << \"s | CPU: \" << std::setw(7)\n                << std::setprecision(3) << cpu << \"s |\" << std::endl;\n    }\n  }\n\n  template <typename T>\n  void log(const T &value) {\n    double wall = madness::wall_time() - start_wall_;\n    double cpu = madness::cpu_time() - start_cpu_;\n\n    if (logger_ && world_.rank() == 0) {\n      logger_->log_value_and_time(key_, value, wall, cpu);\n    }\n\n    if (world_.rank() == 0) {\n      std::cout << std::left << std::setw(30) << \"⏱️ [\" + key_ + \"]\"\n                << std::right << \" | Wall: \" << std::setw(7)\n                << std::setprecision(3) << wall << \"s | CPU: \" << std::setw(7)\n                << std::setprecision(3) << cpu << \"s | Value: \" << std::setw(10)\n                << std::setprecision(7) << std::fixed << value << \" |\"\n                << std::endl;\n    }\n  }\n  template <typename T>\n  void log(const std::vector<T> &values) {\n    double wall = madness::wall_time() - start_wall_;\n    double cpu = madness::cpu_time() - start_cpu_;\n\n    if (logger_ && world_.rank() == 0) {\n      for (size_t i = 0; i < values.size(); ++i) {\n        std::string key_i = key_ + \"[\" + std::to_string(i) + \"]\";\n        logger_->log_value_and_time(key_i, values[i], wall, cpu);\n      }\n    }\n\n    if (world_.rank() == 0) {\n      std::cout << std::left << std::setw(20) << (\"⏱️ [\" + key_ + \"]\")\n                << \" | Values: \";\n      for (const auto &v : values) {\n        std::cout << std::right << std::setw(10) << std::setprecision(6)\n                  << std::fixed << v << \" \";\n      }\n      std::cout << \"| Wall: \" << std::setw(7) << std::setprecision(3) << wall\n                << \"s | CPU: \" << std::setw(7) << std::setprecision(3) << cpu\n                << \"s |\\n\";\n    }\n  }\n\n  template <typename T>\n  void log_value(const T &value) {\n    if (logger_ && world_.rank() == 0) {\n      logger_->log_value(key_, value);\n    }\n  }\n\n private:\n  madness::World &world_;\n  std::string key_;\n  ResponseDebugLogger *logger_;\n  double start_wall_, start_cpu_;\n};\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseDebugLoggerMacros.hpp",
    "content": "#pragma once\n#include \"ResponseDebugLogger.hpp\"\n\n#define DEBUG_LOG_VALUE(world, logger, key, expression)    \\\n  do {                                                     \\\n    TimedValueLogger __timed_logger__(world, key, logger); \\\n    auto __timed_val__ = (expression);                     \\\n    __timed_logger__.log(__timed_val__);              \\\n  } while (0)\n\n#define DEBUG_TIMED_BLOCK(world, logger, key, block)       \\\n  do {                                                     \\\n    TimedValueLogger __timed_logger__(world, key, logger); \\\n    block __timed_logger__.log();                          \\\n  } while (0)\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseIO.hpp",
    "content": "#pragma once\n#include <filesystem>\n#include <iostream>\n#include <madness/external/nlohmann_json/json.hpp>\n\n#include \"ResponseState.hpp\"\n#include \"ResponseVector.hpp\"\n\nusing json = nlohmann::json;\nnamespace fs = std::filesystem;\n\ntemplate <typename Desc>\nvoid save_response_vector(World &world, const Desc &desc,\n                          const ResponseVector &response) {\n  auto filename = desc.response_filename();\n  if (world.rank() == 0) {\n    std::cout << \"✅ Saving response vector to: \" << filename << std::endl;\n  }\n  auto ar = archive::ParallelOutputArchive(world, filename.c_str());\n  auto current_k = FunctionDefaults<3>::get_k();\n  ar & current_k;\n\n  std::visit(\n      [&](const auto &vec) {\n        int i = 0;\n\n        for (const auto &f : vec.flat) {\n          if (world.rank() == 0) {\n            print(\"Saving response vector \", i++);\n          }\n          ar & f;\n        }\n      },\n      response);\n}\n\ntemplate <typename Desc>\ninline bool load_response_vector(World &world, const int &num_orbitals,\n                                 const Desc &desc,\n                                 ResponseVector &load_response,\n                                 size_t thresh_index = 0,\n                                 size_t freq_index = 0) {\n  auto filename = desc.response_filename(thresh_index, freq_index);\n  if (!fs::exists(filename + \".00000\")) {\n    if (world.rank() == 0) {\n      std::cerr << \"❌ Response file not found: \" << filename << std::endl;\n    }\n    return false;\n  }\n  if (world.rank() == 0) {\n    std::cout << \"Loading response vector from: \" << filename << std::endl;\n  }\n\n  load_response = desc.make_vector(num_orbitals, freq_index);\n\n  archive::ParallelInputArchive ar(world, filename.c_str());\n  auto current_k = FunctionDefaults<3>::get_k();\n  int loaded_k;\n\n  ar & loaded_k;\n  FunctionDefaults<3>::set_k(loaded_k);\n\n  std::visit(\n      [&](auto &v) {\n        int i = 0;\n        for (auto &f : v.flat) {\n          if (world.rank() == 0) {\n            print(\"Loading response vector \", i++);\n          }\n          ar & f;\n        }\n        v.sync();\n      },\n      load_response);\n  FunctionDefaults<3>::set_k(current_k);\n  std::visit(\n      [&](auto &v) {\n        auto &flat_vec = v.flat;\n\n        if (current_k != loaded_k) {\n          if (world.rank() == 0) {\n            print(\"Reconstructing response vector with k=\", current_k);\n          }\n          reconstruct(world, flat_vec);\n          for (auto &v : flat_vec) {\n            v = project(v, current_k, FunctionDefaults<3>::get_thresh(), true);\n          }\n\n          truncate(world, flat_vec, FunctionDefaults<3>::get_thresh());\n        } else {\n          truncate(world, flat_vec, FunctionDefaults<3>::get_thresh());\n        }\n        v.sync();\n      },\n      load_response);\n\n  return true;\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseInitializer.hpp",
    "content": "\n#pragma once\n#include \"GroundStateData.hpp\"\n#include \"ResponseState.hpp\"\n#include \"ResponseVector.hpp\"\n\ninline ResponseVector initialize_guess_vector(\n    World &world, const GroundStateData &gs,\n    const LinearResponseDescriptor &state) {\n  size_t num_orbitals = gs.getNumOrbitals();\n  bool is_static = state.is_static();\n  bool is_unrestricted = !gs.isSpinRestricted();\n\n  vector_real_function_3d Vp = perturbation_vector(world, gs, state);\n\n  if (is_static && !is_unrestricted) {\n    StaticRestrictedResponse response(num_orbitals);\n    for (size_t i = 0; i < num_orbitals; ++i) response.x_alpha[i] = Vp[i];\n    response.flatten();\n    return response;\n\n  } else if (!is_static && !is_unrestricted) {\n    DynamicRestrictedResponse response(num_orbitals);\n    for (size_t i = 0; i < num_orbitals; ++i) {\n      response.x_alpha[i] = Vp[i];\n      response.y_alpha[i] = Vp[i];\n    }\n    response.flatten();\n    // y_alpha starts at 0 (already initialized that way)\n    return response;\n\n  } else if (is_static && is_unrestricted) {\n    StaticUnrestrictedResponse response(num_orbitals);\n    for (size_t i = 0; i < num_orbitals; ++i) {\n      response.x_alpha[i] = Vp[i];\n      response.x_beta[i] = Vp[i];\n    }\n    response.flatten();\n    return response;\n\n  } else if (!is_static && is_unrestricted) {\n    DynamicUnrestrictedResponse response(num_orbitals);\n    for (size_t i = 0; i < num_orbitals; ++i) {\n      response.x_alpha[i] = Vp[i];\n      response.x_beta[i] = Vp[i];\n    }\n    response.flatten();\n    // y_alpha/y_beta remain 0\n    return response;\n  }\n\n  throw std::runtime_error(\"Unknown response vector configuration.\");\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseManager.cpp",
    "content": "#include \"ResponseManager.hpp\"\n\n#include <madness/chem/SCF.h>\n\n#include \"CalculationParameters.h\"\n#include \"madness/world/world.h\"\n\nusing namespace madness;\n\nResponseManager::ResponseManager(World &world, const CalculationParameters &params) : calc_params(params), vtol(0.0) {}\n\n// Initially loaded at maximum polynomial order (settings_.k)\n\nvoid ResponseManager::setProtocol(World &world, double L, double thresh, int override_k) {\n  int k;\n  if (thresh >= 0.9e-2)\n    k = 4;\n  else if (thresh >= 0.9e-4)\n    k = 6;\n  else if (thresh >= 0.9e-6)\n    k = 8;\n  else if (thresh >= 0.9e-8)\n    k = 10;\n  else\n    k = 12;\n\n  if (override_k == -1) {\n    FunctionDefaults<3>::set_k(k);\n    //        \tparam.k=k;\n  } else {\n    FunctionDefaults<3>::set_k(calc_params.k());\n  }\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_refine(true);\n  FunctionDefaults<3>::set_initial_level(2);\n  FunctionDefaults<3>::set_autorefine(false);\n  FunctionDefaults<3>::set_apply_randomize(false);\n  FunctionDefaults<3>::set_project_randomize(false);\n  FunctionDefaults<3>::set_cubic_cell(-L, L);\n  GaussianConvolution1DCache<double>::map.clear();\n  double safety = 0.1;\n  vtol = FunctionDefaults<3>::get_thresh() * safety;\n  coulop = poperatorT(CoulombOperatorPtr(world, calc_params.lo(), 0.001 * thresh));\n  gradop = gradient_operator<double, 3>(world);\n\n  if (world.rank() == 0) {\n    print(\"\\nMRA Protocol Set: thresh =\", thresh, \", k =\", k, \"\\n\");\n  }\n  world.gop.fence();\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseManager.hpp",
    "content": "#ifndef RESPONSEMANAGER_HPP\n#define RESPONSEMANAGER_HPP\n#include <CalculationParameters.h>\n#include <madness/chem/SCF.h>\n\n#include \"ResponseState.hpp\"\n\nusing namespace madness;\n\nclass ResponseManager {\n public:\n  ResponseManager(World &world, const CalculationParameters &r_params);\n\n  void setProtocol(World &world, double L, double thresh, int override_k = -1);\n\n  // Getters\n  [[nodiscard]] double getVtol() const { return vtol; }\n  [[nodiscard]] poperatorT getCoulombOp() const { return coulop; }\n  [[nodiscard]] std::vector<std::shared_ptr<real_derivative_3d>> getGradOp() const { return gradop; }\n  // Compute and store a response state\n  void computeState(const AbstractResponseDescriptor &state);\n  // Check if a response state is already converged\n  [[nodiscard]] bool isConverged(const AbstractResponseDescriptor &state) const;\n\n  [[nodiscard]] CalculationParameters params() const { return calc_params; }\n\n private:\n  CalculationParameters calc_params;\n  double vtol;\n  poperatorT coulop;\n  std::vector<std::shared_ptr<real_derivative_3d>> gradop;\n};\n\n#endif  // RESPONSEMANAGER_HPP\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseMetaData.hpp",
    "content": "#pragma once\n#include <filesystem>\n#include <fstream>\n#include <iomanip>\n#include <madness/external/nlohmann_json/json.hpp>\n#include <map>\n#include <sstream>\n#include <string>\n\n#include \"ResponseState.hpp\"\n\nusing json = nlohmann::json;\nnamespace fs = std::filesystem;\n\nclass ResponseMetadata {\n public:\n  explicit ResponseMetadata(World &world, const std::string &filepath)\n      : path_(filepath) {\n    if (fs::exists(path_)) {\n      std::string json_string;\n      std::ifstream in(path_);\n      if (in.is_open()) {\n        std::stringstream buffer;\n        buffer << in.rdbuf();\n        json_string = buffer.str();\n        in.close();\n      } else {\n        std::cerr << \"Error opening file: \" << path_ << std::endl;\n      }\n      world.gop.fence();\n      world.gop.broadcast_serializable(json_string, 0);\n\n      data_ = json::parse(json_string);\n      world.gop.fence();\n    } else {\n      data_[\"states\"] = json::object();\n    }\n  }\n\n  void initialize_states(const std::vector<LinearResponseDescriptor> &states) {\n    for (const auto &state : states) {\n      const std::string id = describe_perturbation(state.perturbation);\n\n      const auto &frequencies = state.frequencies;\n      const auto &protocols = state.thresholds;\n\n      auto &state_entry = data_[\"states\"][id];\n\n      for (const auto &protocol : protocols) {\n        std::string pstr = protocol_to_string(protocol);\n\n        // Initialize protocol if missing\n        if (!state_entry[\"protocols\"].contains(pstr)) {\n          for (const auto &freq : frequencies) {\n            std::string fstr = frequency_to_string(freq);\n            state_entry[\"protocols\"][pstr][\"saved\"][fstr] = false;\n            state_entry[\"protocols\"][pstr][\"converged\"][fstr] = false;\n          }\n        }\n      }\n\n      // Final convergence flag (if not present)\n      if (!state_entry.contains(\"final_converged\")) {\n        state_entry[\"final_converged\"] = false;\n      }\n    }\n    write();\n  }\n\n  void print_summary() const {\n    for (const auto &[id, entry] : data_[\"states\"].items()) {\n      std::cout << \"State: \" << id << \"\\n\";\n      for (const auto &[protocol, proto_data] : entry[\"protocols\"].items()) {\n        std::cout << \"  Protocol: \" << protocol << \"\\n\";\n        for (const auto &[freq, saved] : proto_data[\"saved\"].items()) {\n          std::cout << \"    freq=\" << freq << \" saved=\" << saved\n                    << \" conv=\" << proto_data[\"converged\"][freq] << \"\\n\";\n        }\n      }\n      std::cout << \"  ✅ Final converged: \" << entry[\"final_converged\"] << \"\\n\";\n    }\n  }\n\n  [[nodiscard]] bool is_saved(const std::string &state_id, double protocol,\n                              double freq) const {\n    return get_flag(state_id, protocol, freq, \"saved\");\n  }\n\n  [[nodiscard]] bool is_converged(const std::string &state_id, double protocol,\n                                  double freq) const {\n    return get_flag(state_id, protocol, freq, \"converged\");\n  }\n\n  void mark_saved(const std::string &state_id, double protocol, double freq) {\n    set_flag(state_id, protocol, freq, \"saved\", true);\n    write();\n  }\n\n  void mark_converged(const std::string &state_id, double protocol, double freq,\n                      bool converged) {\n    set_flag(state_id, protocol, freq, \"converged\", converged);\n    write();\n  }\n\n  void mark_final_converged(const std::string &state_id, bool flag = true) {\n    data_[\"states\"][state_id][\"final_converged\"] = flag;\n    write();\n  }\n\n  void mark_final_saved(const std::string &state_id, bool flag = true) {\n    data_[\"states\"][state_id][\"final_saved\"] = flag;\n    write();\n  }\n\n  [[nodiscard]] bool final_converged(const std::string &state_id) const {\n    return data_[\"states\"][state_id].value(\"final_converged\", false);\n  }\n\n  [[nodiscard]] bool final_saved(const std::string &state_id) const {\n    return data_[\"states\"][state_id].value(\"final_saved\", false);\n  }\n\n  void write() const {\n    std::ofstream out(path_);\n    out << std::setw(2) << data_ << \"\\n\";\n  }\n  json to_json() const { return data_; }\n\n private:\n  std::string path_;\n  json data_;\n\n  static std::string to_string(double val) {\n    std::ostringstream oss;\n    oss << std::scientific << val;\n    return oss.str();\n  }\n\n  [[nodiscard]] bool get_flag(const std::string &state_id, double protocol,\n                              double freq, const std::string &key) const {\n    std::string p_str = to_string(protocol);\n    std::string f_str = to_string(freq);\n\n    if (!data_[\"states\"].contains(state_id)) return false;\n    if (!data_[\"states\"][state_id][\"protocols\"].contains(p_str)) return false;\n    if (!data_[\"states\"][state_id][\"protocols\"][p_str][key].contains(f_str))\n      return false;\n\n    return data_[\"states\"][state_id][\"protocols\"][p_str][key][f_str]\n        .get<bool>();\n  }\n\n  void set_flag(const std::string &state_id, double protocol, double freq,\n                const std::string &key, bool value) {\n    std::string p_str = to_string(protocol);\n    std::string f_str = to_string(freq);\n\n    data_[\"states\"][state_id][\"protocols\"][p_str][key][f_str] = value;\n    write();\n  }\n  static std::string frequency_to_string(double frequency) {\n    std::ostringstream ss;\n    ss << std::scientific << frequency;\n    return ss.str();\n  }\n\n  static std::string protocol_to_string(double protocol) {\n    std::ostringstream ss;\n    ss << std::scientific << protocol;\n    return ss.str();\n  }\n};\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseSolver.cpp",
    "content": "#include \"ResponseSolver.hpp\"\n#include \"../molresponse/response_macrotask.hpp\"\n#include \"ResponseDebugLogger.hpp\"\n#include \"ResponseDebugLoggerMacros.hpp\"\n#include \"ResponseManager.hpp\"\n#include \"ResponseSolverUtils.hpp\"\n#include \"ResponseVector.hpp\"\n#include \"functypedefs.h\"\n#include \"projector.h\"\n\nstd::vector<poperatorT>\nResponseSolverPolicy<StaticRestrictedResponse>::make_bsh_operators(\n    World &world, const ResponseManager &rm, const double freq,\n    const Tensor<double> &orbital_energies, const int n,\n    ResponseDebugLogger &logger) {\n\n  auto bsh_x = std::vector<poperatorT>(n);\n  double x_shifts = 0.0;\n  if ((orbital_energies[long(n) - 1] + freq) >= 0.0) {\n    x_shifts = -.05 - (freq + orbital_energies[long(n) - 1]);\n  }\n  bsh_x = ResponseSolverUtils::make_bsh_operators_response(\n      world, x_shifts, freq, orbital_energies, rm.params().lo());\n  return bsh_x;\n}\n\n// Make BSH operators\nstd::vector<poperatorT>\nResponseSolverPolicy<DynamicRestrictedResponse>::make_bsh_operators(\n    World &world, const ResponseManager &rm, const double freq,\n    const Tensor<double> &orbital_energies, const int n,\n    ResponseDebugLogger &logger) {\n\n  auto bsh_x = std::vector<poperatorT>(2 * n);\n  double x_shifts = 0.0;\n  if ((orbital_energies[long(n) - 1] + freq) >= 0.0) {\n    x_shifts = -.05 - (freq + orbital_energies[long(n) - 1]);\n  }\n  bsh_x = ResponseSolverUtils::make_bsh_operators_response(\n      world, x_shifts, freq, orbital_energies, rm.params().lo());\n  auto bsh_y = ResponseSolverUtils::make_bsh_operators_response(\n      world, 0.0, -freq, orbital_energies, rm.params().lo());\n\n  bsh_x.insert(bsh_x.end(), bsh_y.begin(), bsh_y.end());\n  return bsh_x;\n}\n\nvector_real_function_3d\nResponseSolverPolicy<StaticRestrictedResponse>::CoupledResponseEquations(\n    World &world, const GroundStateData &gs,\n    const StaticRestrictedResponse &vecs, const vector_real_function_3d &vp,\n    const std::vector<poperatorT> &bsh_x, const ResponseManager &rm,\n    ResponseDebugLogger &logger) {\n\n  auto &x = vecs.x_alpha;\n  auto &all_x = vecs.flat;\n\n  auto num_orbitals = gs.orbitals.size();\n\n  std::vector<int> state_index;\n  std::vector<int> ii;\n\n  int i = 0;\n  int si = 0;\n  for (size_t j = 0; j < num_orbitals; j++) {\n    state_index.push_back(si);\n    ii.push_back(i++);\n  }\n\n  ResponseComputeGroundExchange t0;\n  MacroTask g0_task(world, t0);\n  ResponseComputeGammaX tresponse;\n  MacroTask gx_task(world, tresponse);\n\n  auto c_xc = gs.xcf_.hf_exchange_coefficient();\n  vector_real_function_3d k0;\n  vector_real_function_3d gx;\n\n  DEBUG_TIMED_BLOCK(world, &logger, \"g0_task\", {\n    k0 = g0_task(ii, state_index, all_x, gs.orbitals, true);\n  });\n  DEBUG_TIMED_BLOCK(world, &logger, \"gx_task\", {\n    gx = gx_task(ii, state_index, all_x, gs.orbitals, true);\n  });\n\n  auto v_local = gs.V_local * x;\n  auto v0x = v_local - c_xc * k0;\n  auto epsilonx = transform(world, x, gs.Hamiltonian_no_diag, true);\n\n  auto thetax = -2.0 * (v0x - epsilonx + gx + vp);\n  truncate(world, thetax);\n  auto rsh = apply(world, bsh_x, thetax);\n  rsh = gs.Qhat(rsh); // project out the ground state density from the response\n  return rsh;\n}\n\nvector_real_function_3d\nResponseSolverPolicy<DynamicRestrictedResponse>::CoupledResponseEquations(\n    World &world, const GroundStateData &gs,\n    const DynamicRestrictedResponse &vecs, const vector_real_function_3d &vp,\n    const std::vector<poperatorT> &bsh_x, const ResponseManager &rm,\n    ResponseDebugLogger &logger) {\n\n  auto &x = vecs.x_alpha;\n  auto &y = vecs.y_alpha;\n  auto &all_x = vecs.flat;\n\n  auto num_orbitals = gs.orbitals.size();\n\n  std::vector<int> state_index;\n  std::vector<int> ii;\n\n  int i = 0;\n  for (size_t j = 0; j < 2 * num_orbitals; j++) {\n    state_index.push_back(0);\n    ii.push_back(i++);\n  }\n\n  ResponseComputeGroundExchange t0;\n  MacroTask g0_task(world, t0);\n  ResponseComputeGammaX tresponse;\n  MacroTask gx_task(world, tresponse);\n\n  vector_real_function_3d k0;\n  vector_real_function_3d gx;\n\n  DEBUG_TIMED_BLOCK(world, &logger, \"g0_task\", {\n    k0 = g0_task(ii, state_index, all_x, gs.orbitals, false);\n  });\n  DEBUG_TIMED_BLOCK(world, &logger, \"gx_task\", {\n    gx = gx_task(ii, state_index, all_x, gs.orbitals, false);\n  });\n\n  auto c_xc = gs.xcf_.hf_exchange_coefficient();\n  auto v_local = gs.V_local * all_x;\n  auto v0x = v_local - c_xc * k0;\n  auto epsilonx = transform(world, x, gs.Hamiltonian_no_diag, true);\n  auto epsilony = transform(world, y, gs.Hamiltonian_no_diag, true);\n  epsilonx.insert(epsilonx.end(), epsilony.begin(), epsilony.end());\n  auto thetax = -2.0 * (v0x - epsilonx + gx + vp);\n  truncate(world, thetax);\n  auto rsh = apply(world, bsh_x, thetax);\n  truncate(world, thetax);\n  rsh = gs.Qhat(rsh);\n  return rsh;\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseSolver.hpp",
    "content": "#pragma once\n#include \"GroundStateData.hpp\"\n#include \"ResponseDebugLogger.hpp\"\n#include \"ResponseManager.hpp\"\n#include \"ResponseVector.hpp\"\n#include <madness/mra/nonlinsol.h>\n\nstruct response_vector_allocator {\n  World &world;\n  const size_t n_orbtials;\n  response_vector_allocator(World &world, size_t n_orbtials)\n      : world(world), n_orbtials(n_orbtials) {}\n  vector_real_function_3d operator()() {\n    return zero_functions<double, 3>(world, static_cast<int>(n_orbtials));\n  }\n};\n\nusing response_solver = XNonlinearSolver<vector_real_function_3d, double,\n                                         response_vector_allocator>;\n\ntemplate <typename ResponseType>\nclass ResponseSolverPolicy; // forward declaration\n\n// Primary template left undefined; we’ll specialize it:\ntemplate <typename ResponseType> class ResponseSolverPolicy {\n  // nothing here\n};\n\ntemplate <> class ResponseSolverPolicy<StaticRestrictedResponse> {\npublic:\n  static constexpr double alpha_factor = -4.0;\n\n  static real_function_3d compute_density(World &world,\n                                          const StaticRestrictedResponse &rvec,\n                                          const vector_real_function_3d &phi0) {\n    auto &x = rvec.x_alpha;\n    auto xphi = mul(world, x, phi0, true);\n    return 2.0 * sum(world, xphi, true);\n  }\n\n  static vector_real_function_3d CoupledResponseEquations(\n      World &world, const GroundStateData &gs,\n      const StaticRestrictedResponse &vecs, const vector_real_function_3d &vp,\n      const std::vector<poperatorT> &bsh_x, const ResponseManager &rm,\n      ResponseDebugLogger &logger);\n\n  // Helper functions\n  static std::vector<poperatorT>\n  make_bsh_operators(World &world, const ResponseManager &rm, double freq,\n                     const Tensor<double> &orbital_energies, int n,\n                     ResponseDebugLogger &logger);\n};\ntemplate <> class ResponseSolverPolicy<DynamicRestrictedResponse> {\npublic:\n  static constexpr double alpha_factor = -2.0;\n  static std::vector<poperatorT>\n  make_bsh_operators(World &world, const ResponseManager &rm, double freq,\n                     const Tensor<double> &orbital_energies, int n,\n                     ResponseDebugLogger &logger);\n  static real_function_3d compute_density(World &world,\n                                          const DynamicRestrictedResponse &rvec,\n                                          const vector_real_function_3d &phi0) {\n    auto phi_phi = phi0;\n    phi_phi.insert(phi_phi.end(), phi0.begin(), phi0.end());\n    auto &x = rvec.flat;\n\n    auto xphi = mul(world, x, phi_phi, true);\n    return 2.0 * sum(world, xphi, true);\n  }\n\n  static vector_real_function_3d CoupledResponseEquations(\n      World &world, const GroundStateData &gs,\n      const DynamicRestrictedResponse &vecs, const vector_real_function_3d &vp,\n      const std::vector<poperatorT> &bsh_x, const ResponseManager &rm,\n      ResponseDebugLogger &logger);\n};\n\ntemplate <> class ResponseSolverPolicy<StaticUnrestrictedResponse> {\npublic:\n  static constexpr double alpha_factor = -2.0;\n  static std::vector<poperatorT>\n  make_bsh_operators(World &world, const ResponseManager &rm, double freq,\n                     const Tensor<double> &orbital_energies, int n,\n                     ResponseDebugLogger &logger);\n  static real_function_3d\n  compute_density(World &world, const StaticUnrestrictedResponse &rvec,\n                  const vector_real_function_3d &phi0) {\n    auto phi_phi = phi0;\n    phi_phi.insert(phi_phi.end(), phi0.begin(), phi0.end());\n    auto &x = rvec.flat;\n\n    auto xphi = mul(world, x, phi_phi, true);\n    return 2.0 * sum(world, xphi, true);\n  }\n  static vector_real_function_3d CoupledResponseEquations(\n      World &world, const GroundStateData &gs, const ResponseVector &vecs,\n      const vector_real_function_3d &vp, const std::vector<poperatorT> &bsh_x,\n      const ResponseManager &rm, ResponseDebugLogger &logger);\n};\n\ntemplate <> class ResponseSolverPolicy<DynamicUnrestrictedResponse> {\npublic:\n  static constexpr double alpha_factor = -2.0;\n  static std::vector<poperatorT>\n  make_bsh_operators(World &world, const ResponseManager &rm, double freq,\n                     const Tensor<double> &orbital_energies, int n,\n                     ResponseDebugLogger &logger);\n  static real_function_3d\n  compute_density(World &world, const DynamicUnrestrictedResponse &rvec,\n                  const vector_real_function_3d &phi0) {\n    auto phi_phi = phi0;\n    phi_phi.insert(phi_phi.end(), phi0.begin(), phi0.end());\n    auto &x = rvec.flat;\n\n    auto xphi = mul(world, x, phi_phi, true);\n    return 2.0 * sum(world, xphi, true);\n  }\n  static vector_real_function_3d CoupledResponseEquations(\n      World &world, const GroundStateData &gs, const ResponseVector &vecs,\n      const vector_real_function_3d &vp, const std::vector<poperatorT> &bsh_x,\n      const ResponseManager &rm, ResponseDebugLogger &logger);\n};\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseSolverUtils.hpp",
    "content": "#pragma once\n#include <madness/chem/SCF.h>\n#include <madness/mra/nonlinsol.h>\n\n#include <madness/external/nlohmann_json/json.hpp>\n\nusing json = nlohmann::json;\n\nnamespace ResponseSolverUtils {\n\nusing namespace madness;\n\ninline void print_iteration_line(int iter, double residual, double deltaE, double xVp, double density_target, double x_residual_target) {\n  // 1) Print header once\n  static bool printed_header = false;\n  if (!printed_header) {\n    std::cout << std::setw(6) << \"Iter\" << \" │ \" << std::setw(12) << \"Residual\" << \" │ \" << std::setw(12) << \"Δρ\" << \" │ \" << std::setw(12) << \"<x|Vp>\" << \" │ \"\n              << \"Targets\\n\";\n    std::cout << std::string(6, '-') << \"─┼─\" << std::string(12, '-') << \"─┼─\" << std::string(12, '-') << \"─┼─\" << std::string(12, '-') << \"─┼─\"\n              << std::string(19, '-') << \"\\n\";\n    // printed_header = true;\n  }\n\n  // 2) Compose the target string\n  std::ostringstream tgt;\n  tgt << \"||x||≤\" << std::scientific << std::setprecision(3) << x_residual_target << \",||Δρ||≤\" << std::scientific << std::setprecision(3) << density_target;\n\n  // 3) Print the iteration line\n  std::cout << std::setw(6) << iter << \" │ \" << std::setw(12) << std::scientific << std::setprecision(3) << residual << \" │ \" << std::setw(12)\n            << std::scientific << std::setprecision(3) << deltaE << \" │ \" << std::setw(12) << std::scientific << std::setprecision(3) << xVp << \" │ \"\n            << tgt.str() << \"\\n\";\n}\n\ninline std::vector<poperatorT> make_bsh_operators_response(World &world, const double shift, const double omega, const Tensor<double> &ground_energies,\n                                                           const double &lo) {\n  double tol = FunctionDefaults<3>::get_thresh();\n  // Sizes inferred from ground and omega\n  size_t num_orbitals = ground_energies.size();  // number of orbitals\n  std::vector<poperatorT> ops(num_orbitals);\n  // Run over occupied components\n  int p = 0;\n  std::for_each(ops.begin(), ops.end(), [&](auto &operator_p) {\n    double mu = sqrt(-2.0 * (ground_energies(p++) + omega + shift));\n    operator_p = poperatorT(BSHOperatorPtr3D(world, mu, lo, tol));\n  });\n  return ops;\n  // End timer\n}\n\ninline double inner(World &world, const vector_real_function_3d &x, const vector_real_function_3d &y) {\n  double result = 0.0;\n  for (size_t i = 0; i < x.size(); ++i) {\n    result += x[i].inner(y[i]);\n  }\n  return result;\n}\n\ninline void do_step_restriction(World &world, const vecfuncT &x, vecfuncT &x_new, const double &anorm, const std::string &spin, const double &maxrotn) {\n  // int nres = 0;\n  if (anorm > maxrotn) {\n    if (world.rank() == 0) print(\"Doing step restriction, norm of change: \", anorm);\n    double s = maxrotn / anorm;\n    gaxpy(s, x_new, 1.0 - s, x, true);\n  }\n\n  world.gop.fence();\n  if (world.rank() == 0) print(\"Norm of vector changes\", spin, \": \", anorm);\n}\n}  // namespace ResponseSolverUtils\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseState.cpp",
    "content": ""
  },
  {
    "path": "src/apps/molresponse_v2/ResponseState.hpp",
    "content": "#ifndef RESPONSE_STATE_HPP\n#define RESPONSE_STATE_HPP\n#include <SCF.h>\n#include <madness/chem/projector.h>\n#include <madness/mra/mra.h>\n\n#include <madness/external/nlohmann_json/json.hpp>\n#include <sstream>\n#include <string>\n#include <vector>\n\n#include \"GroundStateData.hpp\"\n#include \"Perturbation.hpp\"\n#include \"ResponseVector.hpp\"\n#include \"molecular_functors.h\"\n#include \"vmra.h\"\n\nusing json = nlohmann::json;\nnamespace fs = std::filesystem;\n\nstruct AbstractResponseDescriptor {\n  [[nodiscard]] virtual bool is_spin_restricted() const = 0;\n  [[nodiscard]] virtual bool is_static() const = 0;\n  [[nodiscard]] virtual std::string response_filename() const = 0;\n  [[nodiscard]] virtual std::string response_filename(\n      const size_t &thresh_index, const size_t &freq_index) const = 0;\n  virtual ~AbstractResponseDescriptor() = default;\n};\n\nstruct LinearResponseDescriptor : public AbstractResponseDescriptor {\n  PerturbationType type;\n  Perturbation perturbation;\n\n  bool spin_restricted = false;  // Is the system open shell?\n\n  std::vector<double> frequencies;\n  std::map<double, size_t> frequency_map;  // Frequency to index map\n  std::vector<double> thresholds;          // Accuracy levels to loop over\n  //\n  size_t current_frequency_index = 0;\n  size_t current_thresh_index = 0;  // Track which threshold we're working on\n  bool is_converged = false;\n  LinearResponseDescriptor() = default;\n\n  LinearResponseDescriptor(Perturbation pert, PerturbationType ptype,\n                           const std::vector<double> &freq,\n                           const std::vector<double> &thresh,\n                           bool spin_restricted)\n      : type(ptype),\n        perturbation(pert),\n        spin_restricted(spin_restricted),\n        frequencies(freq),\n        thresholds(thresh),\n        current_frequency_index(0),\n        current_thresh_index(0),\n        is_converged(false) {\n    for (size_t i = 0; i < frequencies.size(); ++i) {\n      frequency_map[frequencies[i]] = i;\n    }\n  }\n\n  [[nodiscard]] double current_threshold() const {\n    return thresholds[current_thresh_index];\n  }\n  [[nodiscard]] double current_frequency() const {\n    return frequencies[current_frequency_index];\n  }\n  [[nodiscard]] bool at_final_frequency() const {\n    return current_frequency_index + 1 == frequencies.size();\n  }\n  [[nodiscard]] bool at_final_threshold() const {\n    return current_thresh_index + 1 == thresholds.size();\n  }\n\n  void set_frequency_index(size_t index) {\n    if (index < frequencies.size()) {\n      current_frequency_index = index;\n    } else {\n      throw std::out_of_range(\"Frequency index out of range\");\n    }\n  }\n\n  void advance_threshold() {\n    if (!at_final_threshold()) {\n      ++current_thresh_index;\n      is_converged = false;  // reset convergence at new protocol\n    }\n  }\n  void advance_frequency() {\n    if (!at_final_frequency()) {\n      ++current_frequency_index;\n    }\n  }\n  [[nodiscard]] bool is_static() const override {\n    return std::abs(current_frequency()) < 1e-8;\n  }\n  [[nodiscard]] bool is_static(size_t freq_index) const {\n    return std::abs(frequencies[freq_index]) < 1e-8;\n  }\n  [[nodiscard]] bool is_spin_restricted() const override {\n    return spin_restricted;\n  }\n\n  // helper that builds the core \"<perturbation>_p<thresh>_f<freq>\"\n  [[nodiscard]] std::string make_key(double thresh, double freq) const {\n    std::ostringstream oss;\n    // describe_perturbation gives \"alpha\", \"beta\", etc.\n    double f = std::clamp(freq, 0.0, 100.0);\n\n    oss << describe_perturbation(perturbation)\n        // force exactly 3 decimal places:\n        << \"_f\" << std::fixed << std::setprecision(3)\n        << f\n        // then threshold in scientific (1 digit mantissa)\n        << \"_p\" << std::scientific << std::setprecision(2) << thresh;\n\n    return oss.str();\n  }\n\n  [[nodiscard]] std::string make_key(size_t ti, size_t fi) const {\n    return make_key(thresholds[ti], frequencies[fi]);\n  }\n\n  [[nodiscard]] std::string response_filename() const override {\n    return response_filename(current_thresh_index, current_frequency_index);\n  }\n  [[nodiscard]] std::string response_filename(\n      const size_t &thresh_index, const size_t &freq_index) const override {\n    return make_key(thresh_index, freq_index);\n    ;\n  }\n  [[nodiscard]] std::string perturbationDescription() const {\n    return describe_perturbation(perturbation);\n  }\n  [[nodiscard]] std::string description() const {\n    return make_key(current_threshold(), current_frequency());\n  }\n  // Create the right‐shaped ResponseVector for orbitals at frequency index\n  // `fi`.\n  //\n  //   - if  freq[fi]==0 → “static”  else → “dynamic”\n  //   - unrestricted = !spin_restricted\n  //\n  [[nodiscard]] ResponseVector make_vector(int num_orbitals, size_t fi) const {\n    bool stat = is_static(fi);\n    bool urstr = !spin_restricted;\n    return make_response_vector(num_orbitals, stat, urstr);\n  }\n};\n\nstruct SecondOrderResponseDescriptor : public AbstractResponseDescriptor {\n  std::pair<PerturbationType, PerturbationType> ptypes_;\n  std::pair<Perturbation, Perturbation> perturbations_;\n  std::pair<double, double> frequencies_;\n\n  double thresh;\n  bool spin_restricted_ = false;  // Is the system open shell?\n\n  SecondOrderResponseDescriptor(PerturbationType t1, PerturbationType t2,\n                                Perturbation p1, Perturbation p2, double f1,\n                                double f2, double thresh, bool spin_restricted)\n      : ptypes_(t1, t2),\n        perturbations_(p1, p2),\n        frequencies_(f1, f2),\n        thresh(thresh),\n        spin_restricted_(spin_restricted) {}\n\n  [[nodiscard]] LinearResponseDescriptor B_state() const {\n    return LinearResponseDescriptor(perturbations_.first, ptypes_.first,\n                                    {frequencies_.first}, {thresh},\n                                    spin_restricted_);\n  }\n  [[nodiscard]] LinearResponseDescriptor C_state() const {\n    return LinearResponseDescriptor(perturbations_.second, ptypes_.second,\n                                    {frequencies_.second}, {thresh},\n                                    spin_restricted_);\n  }\n\n  [[nodiscard]] std::pair<LinearResponseDescriptor, LinearResponseDescriptor>\n  get_states() const {\n    return {B_state(), C_state()};\n  }\n\n  [[nodiscard]] double current_threshold() const { return thresh; }\n\n  [[nodiscard]] double current_frequency() const {\n    return frequencies_.first + frequencies_.second;\n  }\n\n  [[nodiscard]] virtual const char *prefix() const = 0;\n\n  [[nodiscard]] std::string perturbationDescription() const {\n    return describe_perturbation(perturbations_.first) + \"_\" +\n           describe_perturbation(perturbations_.second);\n  }\n\n  [[nodiscard]] bool is_spin_restricted() const override {\n    return spin_restricted_;\n  }\n\n  [[nodiscard]] bool is_static() const override {\n    return false;\n    // Second order response is always dynamic (x an y response\n    // functions)\n  }\n  // Build the core \"<prefix><pert1>_<pert2>_f<f1>_<f2>_p<thresh>\"\n  [[nodiscard]] std::string make_key(double f1, double f2,\n                                     double thresh) const {\n    std::ostringstream oss;\n\n    // clamp both frequencies\n    f1 = std::clamp(f1, 0.0, 100.0);\n    f2 = std::clamp(f2, 0.0, 100.0);\n\n    oss\n        // your existing prefix (e.g. \"sr_\" or \"dyn_\")\n        << prefix()\n        // two perturbations joined by \"_\"\n        << describe_perturbation(perturbations_.first) << \"_\"\n        << describe_perturbation(perturbations_.second)\n        // f1 with fixed + 3 decimals\n        << \"_f\" << std::fixed << std::setprecision(3)\n        << f1\n        // underscore + f2 in the same format\n        << \"_\" << std::fixed << std::setprecision(3)\n        << f2\n        // threshold in scientific (1 digit mantissa)\n        << \"_p\" << std::scientific << std::setprecision(1) << thresh;\n\n    return oss.str();\n  }\n\n  [[nodiscard]] std::string response_filename() const override {\n    return make_key(frequencies_.first, frequencies_.second, thresh) +\n           \".response\";\n  }\n  [[nodiscard]] std::string response_filename(\n      const size_t &thresh_index, const size_t &freq_index) const override {\n    return response_filename();\n  }\n\n  [[nodiscard]] ResponseVector make_vector(int num_orbitals, size_t fi) const {\n    bool stat = is_static();\n    bool urstr = !spin_restricted_;\n    return make_response_vector(num_orbitals, stat, urstr);\n  }\n};\n\n//-----------------------------------------------------------------------------\n// Now two trivial subclasses for VBC vs. XBC\n//-----------------------------------------------------------------------------\n\nstruct VBCResponseState : public SecondOrderResponseDescriptor {\n  using SecondOrderResponseDescriptor::SecondOrderResponseDescriptor;\n  [[nodiscard]] const char *prefix() const override { return \"VBC\"; }\n};\n\nstruct XBCResponseState : public SecondOrderResponseDescriptor {\n  using SecondOrderResponseDescriptor::SecondOrderResponseDescriptor;\n  [[nodiscard]] const char *prefix() const override { return \"XBC\"; }\n};\n\n// -----------------------------------------------------------------------------\n// 1) Raw operator in real space, before applying to orbitals:\n//\n//    e.g. for a dipole:  V(r) = x, y or z moment\n// -----------------------------------------------------------------------------\ninline real_function_3d raw_perturbation_operator(\n    World &world, const GroundStateData &gs,\n    const LinearResponseDescriptor &state) {\n  using P = PerturbationType;\n  switch (state.type) {\n    case P::Dipole: {\n      auto d = std::get<DipolePerturbation>(state.perturbation);\n      // build the moment functor f = (1,0,0) or (0,1,0) or (0,0,1)\n      std::map<char, int> dipole_map = {{'x', 0}, {'y', 1}, {'z', 2}};\n      std::vector<int> dir(3, 0);\n      dir[dipole_map.at(d.direction)] = 1;\n      real_function_3d f = real_factory_3d(world).functor(\n          real_functor_3d{new MomentFunctor(dir)});\n      f.truncate(FunctionDefaults<3>::get_thresh());\n      return f;\n    }\n    case P::NuclearDisplacement: {\n      auto n = std::get<NuclearDisplacementPerturbation>(state.perturbation);\n      // you’d have whatever MomentDisplacementFunctor exists:\n      real_function_3d f = real_factory_3d(world).functor(\n          real_functor_3d{new madchem::MolecularDerivativeFunctor(\n              gs.molecule, n.atom_index, n.direction)});\n      f.truncate(FunctionDefaults<3>::get_thresh());\n      return f;\n    }\n    case P::Magnetic: {\n      // Not implemented yet...\n      //\n      //\n      throw std::runtime_error(\"Magnetic perturbation not implemented yet\");\n    }\n  }\n  throw std::runtime_error(\"Unknown perturbation type\");\n}\n\n// -----------------------------------------------------------------------------\n// 2) Apply it to the ground‐state orbitals to get your Vp basis functions.\n//    (You already have this in ResponseState::perturbation_vector.)\n// -----------------------------------------------------------------------------\ninline vector_real_function_3d project_perturbation_onto_orbitals(\n    World &world, const GroundStateData &gs, const real_function_3d &raw_op) {\n  auto vp = mul(world, raw_op, gs.orbitals, /*fence=*/true);\n  vp = gs.Qhat(vp);\n  truncate(world, vp, FunctionDefaults<3>::get_thresh(), /*fence=*/true);\n  return vp;\n}\n\n// Linear (first-order) response\ninline madness::vector_real_function_3d perturbation_vector(\n    madness::World &world, GroundStateData const &gs,\n    LinearResponseDescriptor const &state) {\n  auto raw_op = raw_perturbation_operator(world, gs, state);\n  auto Vp = project_perturbation_onto_orbitals(world, gs, raw_op);\n  if (!state.is_static()) {\n    // duplicate for dynamic response\n    Vp.insert(Vp.end(), Vp.begin(), Vp.end());\n  }\n  return Vp;\n}\n\n// Second-order (VBC) response\ninline madness::vector_real_function_3d perturbation_vector(\n    madness::World &world, GroundStateData const &gs,\n    XBCResponseState const &sos) {\n  // build (or reuse) the VBCComputer for this ground state\n  // you’ll need to pass it the same directions & frequency list\n  // that you used to set up your ResponseStates originally:\n  /*static thread_local VBCComputer2 vbc(*/\n  /**/\n  /*// find the indices of sos.frequencies in that computer’s list:*/\n  /*size_t bi = vbc.frequency_index(sos.frequencies.first);*/\n  /*size_t ci = vbc.frequency_index(sos.frequencies.second);*/\n  /*// and the BC-pair index from its perturbation characters:*/\n  /*size_t bc = vbc.BC_pair_index(sos.perturbations.first.direction,*/\n  /*                              sos.perturbations.second.direction);*/\n  /**/\n  /*// will load from disk if already there, otherwise compute & save:*/\n  /*return get_flat(vbc.compute_and_save(bc, bi, ci));*/\n  return {};\n}\n\n#endif  // RESPONSE_STATE_HPP\n"
  },
  {
    "path": "src/apps/molresponse_v2/ResponseVector.hpp",
    "content": "#pragma once\n#include <madness/mra/vmra.h>\n#include <madness/world/world.h>\n#include <variant> // C++ 17\n\nusing namespace madness;\n\nstruct StaticRestrictedResponse;\nstruct DynamicRestrictedResponse;\nstruct StaticUnrestrictedResponse;\nstruct DynamicUnrestrictedResponse;\n\n\nusing ResponseVector =\n    std::variant<StaticRestrictedResponse, DynamicRestrictedResponse,\n                 StaticUnrestrictedResponse, DynamicUnrestrictedResponse>;\n/** \n * @brief Holds all response functions describing\n * a response state, one, two, or four vectors of real functions.\n *\n * Static/Restricted shell:    x_alpha only\n * Dynamic/Restricted shell:   x_alpha and y_alpha\n * Static/Unrestricted shell:  x_alpha and x_beta\n * Dynamic/Unrestricted shell: x_alpha, y_alpha, x_beta and y_beta\n *\n * Each type has an allocator depending on the number of orbitals for the system.\n *\n * If you want to access all the response functions, use the `flat` vector.\n *\n * If you want to access individual vectors, use the `x_alpha`, `y_alpha`,\n *\n * std::get<StaticRestrictedResponse>(response).x_alpha\n * std::get<DynamicRestrictedResponse>(response).y_alpha\n *  \n *  \n *\n *\n *\n *\n * \n */\n\n// Definition of StaticRestrictedResponse.\nstruct StaticRestrictedResponse {\n  vector_real_function_3d x_alpha;\n  vector_real_function_3d flat;\n\n  StaticRestrictedResponse() = default;\n  explicit StaticRestrictedResponse(const size_t &num_orbitals)\n      : x_alpha(num_orbitals) {\n\n    flatten();\n  }\n\n  void sync() {\n    for (size_t i = 0; i < x_alpha.size(); ++i) {\n      x_alpha[i] = flat[i];\n    }\n  }\n\n  void flatten() { flat = x_alpha; }\n\n};\nstruct DynamicRestrictedResponse {\n  vector_real_function_3d x_alpha;\n  vector_real_function_3d y_alpha;\n  vector_real_function_3d flat;\n  DynamicRestrictedResponse() = default;\n  explicit DynamicRestrictedResponse(const size_t &num_orbitals)\n      : x_alpha(num_orbitals), y_alpha(num_orbitals) {\n\n    flatten();\n  }\n  // x_alpha + y_alpha in a single vector\n  void sync() {\n\n    for (size_t i = 0; i < x_alpha.size(); ++i) {\n      x_alpha[i] = flat[i];\n      y_alpha[i] = flat[i + x_alpha.size()];\n    }\n  }\n  void flatten() {\n    flat = x_alpha;\n    flat.insert(flat.end(), y_alpha.begin(), y_alpha.end());\n  }\n};\n\nstruct StaticUnrestrictedResponse {\n  vector_real_function_3d x_alpha;\n  vector_real_function_3d x_beta;\n  vector_real_function_3d flat;\n  StaticUnrestrictedResponse() = default;\n  explicit StaticUnrestrictedResponse(const size_t &num_orbitals)\n      : x_alpha(num_orbitals), x_beta(num_orbitals) {\n    flatten();\n  }\n  void sync() {\n    for (size_t i = 0; i < x_alpha.size(); ++i) {\n      x_alpha[i] = flat[i];\n      x_beta[i] = flat[i + x_alpha.size()];\n    }\n  }\n  void flatten() {\n    flat = x_alpha;\n    flat.insert(flat.end(), x_beta.begin(), x_beta.end());\n  }\n  // x_alpha + x_beta in a single vector\n};\nstruct DynamicUnrestrictedResponse {\n  vector_real_function_3d x_alpha;\n  vector_real_function_3d y_alpha;\n  vector_real_function_3d x_beta;\n  vector_real_function_3d y_beta;\n  vector_real_function_3d flat;\n  DynamicUnrestrictedResponse() = default;\n\n  explicit DynamicUnrestrictedResponse(const size_t &num_orbitals)\n      : x_alpha(num_orbitals), y_alpha(num_orbitals), x_beta(num_orbitals),\n        y_beta(num_orbitals) {\n    flatten();\n    // flat.insert(flat.end(), y_beta.begin(), y_beta.end());\n  }\n  void flatten() {\n    flat = x_alpha;\n    flat.insert(flat.end(), y_alpha.begin(), y_alpha.end());\n    flat.insert(flat.end(), x_beta.begin(), x_beta.end());\n    flat.insert(flat.end(), y_beta.begin(), y_beta.end());\n  }\n  void sync() {\n    for (size_t i = 0; i < x_alpha.size(); ++i) {\n      x_alpha[i] = flat[i];\n      y_alpha[i] = flat[i + x_alpha.size()];\n      x_beta[i] = flat[i + 2 * x_alpha.size()];\n      y_beta[i] = flat[i + 3 * x_alpha.size()];\n    }\n  }\n  // x_alpha + y_alpha + x_beta + y_beta in a single vector\n};\n\n\n/**\n * @brief Create a ResponseVector based on the number of orbitals and\n * response type.\n *\n * @param num_orbitals The number of orbitals.\n * @param is_static Whether the response is static.\n * @param is_unrestricted Whether the response is unrestricted.\n * @return ResponseVector The created ResponseVector.\n */\ninline ResponseVector make_response_vector(size_t num_orbitals, bool is_static,\n                                           bool is_unrestricted) {\n  if (!is_unrestricted && is_static) {\n    return StaticRestrictedResponse(num_orbitals);\n  } else if (!is_unrestricted && !is_static) {\n    return DynamicRestrictedResponse(num_orbitals);\n  } else if (is_unrestricted && is_static) {\n    return StaticUnrestrictedResponse(num_orbitals);\n  } else { // unrestricted && dynamic\n    return DynamicUnrestrictedResponse(num_orbitals);\n  }\n}\n\n/**\n * @brief Get the flat vector from a ResponseVector.\n *\n * @param vec The ResponseVector to extract the flat vector from.\n * @return const vector_real_function_3d& The flat vector.\n */\ninline const vector_real_function_3d &get_flat(const ResponseVector &vec) {\n  return std::visit(\n      [](const auto &v) -> const vector_real_function_3d & { return v.flat; },\n      vec);\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/StateGenerator.hpp",
    "content": "#pragma once\n#include <molecule.h>\n\n#include <set>\n#include <string>\n\n#include \"MolecularProperty.hpp\"\n#include \"../../madness/chem/ResponseParameters.hpp\"\n#include \"ResponseState.hpp\"\n\nusing namespace madness;\n\nstruct GeneratedStateData {\n  std::vector<LinearResponseDescriptor> states;\n  std::map<std::string, LinearResponseDescriptor> state_map;\n\n  static void print_generated_state_map(\n      const std::map<std::string, LinearResponseDescriptor> &state_map) {\n    std::cout << \"📋 Generated Response States:\\n\";\n    std::cout << std::setw(5) << \"#\" << \"  \" << std::setw(40) << std::left\n              << \"State Description\" << std::setw(20) << \"Type\" << std::setw(10)\n              << \"Num Freqs\" << \"\\n\";\n\n    std::cout << std::string(90, '-') << \"\\n\";\n\n    size_t count = 0;\n    for (const auto &[key, state] : state_map) {\n      std::string type = (state.type == PerturbationType::Dipole) ? \"Dipole\"\n                         : (state.type == PerturbationType::NuclearDisplacement)\n                             ? \"Nuclear\"\n                             : \"Other\";\n\n      std::cout << std::setw(5) << count++ << \"  \" << std::setw(40) << std::left\n                << key << std::setw(20) << type << std::setw(10)\n                << state.frequencies.size() << \"\\n\";\n    }\n  }\n};\n\nclass StateGenerator {\n public:\n  StateGenerator(const Molecule &mol, const std::vector<double> &thresholds,\n                 bool spinrestricted,\n                 const ResponseParameters &response_parameters)\n      : molecule_(mol),\n        thresholds_(thresholds),\n        spin_restricted_(spinrestricted),\n        rp(response_parameters) {\n    requested_properties_ = response_parameters.requested_properties();\n  }\n\n  [[nodiscard]] GeneratedStateData generateStates() const {\n    struct Entry {\n      PerturbationType type;\n      Perturbation pert;\n      std::set<double> freqs;\n    };\n    std::map<std::string, Entry> table;\n\n    // helper to insert/merge one perturbation+freqs into table\n    auto addPerturbation = [&](PerturbationType t, const Perturbation &p,\n                               const std::vector<double> &f) {\n      // build a throwaway ResponseState so we get the exact key\n      LinearResponseDescriptor tmp{p, t, f, thresholds_, spin_restricted_};\n      std::string key = describe_perturbation(p);\n      auto &e = table[key];\n      // on first visit fill in type+pert\n      if (e.freqs.empty()) {\n        e.type = t;\n        e.pert = p;\n      }\n      // merge in all f into the set\n      e.freqs.insert(f.begin(), f.end());\n    };\n\n    auto dipole_dirs = rp.dipole_directions();\n    auto dipole_freqs = rp.dipole_frequencies();\n    auto nuclear_atom_indices = rp.nuclear_atom_indices();\n    auto nuclear_directions = rp.nuclear_directions();\n    auto freqs = rp.dipole_frequencies();\n    auto nuclear_freqs = rp.nuclear_frequencies();\n    // auto num_freqs = freqs.size();\n    // auto num_nuclear_freqs = nuclear_freqs.size();\n\n    for (const auto &prop : requested_properties_) {\n      auto myfreqs = dipole_freqs;\n      if (prop == \"hyperpolarizability\") {\n        auto num_freqs = freqs.size();\n        auto freqs = rp.dipole_frequencies();\n\n        for (size_t b = 0; b < num_freqs; ++b)\n          for (size_t c = b; c < num_freqs; ++c)\n            myfreqs.push_back(freqs[b] + freqs[c]);\n        std::sort(myfreqs.begin(), myfreqs.end());\n        myfreqs.erase(std::unique(myfreqs.begin(), myfreqs.end()),\n                      myfreqs.end());\n      }\n\n      if (prop == \"polarizability\") {\n        for (char d : dipole_dirs) {\n          addPerturbation(PerturbationType::Dipole, DipolePerturbation{d},\n                          myfreqs);\n        }\n      } else if (prop == \"raman\") {\n        for (char d : dipole_dirs) {\n          addPerturbation(PerturbationType::Dipole, DipolePerturbation{d},\n                          nuclear_freqs);\n        }\n        auto nuclear_atom_indices = rp.nuclear_atom_indices();\n        // 2) finally, flatten into GeneratedStateData\n        GeneratedStateData out;\n        for (auto const &[key, e] : table) {\n          std::vector<double> freqs(e.freqs.begin(), e.freqs.end());\n          LinearResponseDescriptor st{e.pert, e.type, freqs, thresholds_,\n                                      spin_restricted_};\n          out.states.push_back(st);\n          out.state_map[key] = st;\n        }\n        return out;\n        auto nuclear_directions = rp.nuclear_directions();\n        for (size_t i = 0; i < nuclear_atom_indices.size(); ++i) {\n          addPerturbation(PerturbationType::NuclearDisplacement,\n                          NuclearDisplacementPerturbation{\n                              nuclear_atom_indices[i], nuclear_directions[i]},\n                          nuclear_freqs);\n        }\n      } else if (prop == \"hyperpolarizability\") {\n        for (char d : dipole_dirs) {\n          addPerturbation(PerturbationType::Dipole, DipolePerturbation{d},\n                          myfreqs);\n        }\n      }\n    }\n    // 2) finally, flatten into GeneratedStateData\n    GeneratedStateData out;\n    for (auto const &[key, e] : table) {\n      std::vector<double> freqs(e.freqs.begin(), e.freqs.end());\n      LinearResponseDescriptor st{e.pert, e.type, freqs, thresholds_,\n                                  spin_restricted_};\n      out.states.push_back(st);\n      out.state_map[key] = st;\n    }\n    return out;\n  }\n\n private:\n  const Molecule &molecule_;\n  std::vector<std::string> requested_properties_;\n  std::vector<double> thresholds_;\n  bool spin_restricted_;\n  const ResponseParameters &rp;\n};\n\nenum class PropertyTensorType { Alpha, Beta };\n\nstruct PropertyComponentPlan {\n  PropertyTensorType type;\n  std::string description;  // e.g., \"alpha_xx\", \"beta_xyz\"\n\n  std::vector<std::string>\n      required_perturbation_ids;          // \"dipole_x\", \"dipole_y\", etc.\n  std::vector<double> input_frequencies;  // ω or [ω₁, ω₂]\n  double output_frequency = 0.0;\n\n  std::vector<std::string> output_component_ids;  // e.g., {\"X_x\", \"X_y\"}\n\n  // For future compute step\n  // std::function<void(...args)> compute_function;\n};\n"
  },
  {
    "path": "src/apps/molresponse_v2/VBCMacrotask.hpp",
    "content": "#pragma once\n#include \"FrequencyLoop.hpp\"\n#include \"GroundStateData.hpp\"\n#include \"ResponseIO.hpp\"\n#include \"ResponseState.hpp\"\n#include \"ResponseVector.hpp\"\n#include \"SCF.h\"\n#include \"funcdefaults.h\"\n#include \"functypedefs.h\"\n#include <madness/mra/macrotaskq.h>\n#include <madness/world/cloud.h>\n\nnamespace madness {\n\nclass SimpleVBCComputer {\npublic:\n  SimpleVBCComputer(World &world, const GroundStateData &gs)\n      : world_(world), gs_(gs), num_orbitals_(gs.getNumOrbitals()),\n        spin_restricted_(gs.isSpinRestricted()) {}\n\n  std::pair<ResponseVector, ResponseVector>\n  get_BC_vecs(const VBCResponseState &vbc_state) {\n    auto [stateB, stateC] = vbc_state.get_states();\n    // 2) Load their response vectors:\n    ResponseVector Bv, Cv;\n    load_response_vector(world_, num_orbitals_, stateB, Bv, /*th*/ 0, /*f*/ 0);\n    load_response_vector(world_, num_orbitals_, stateC, Cv, /*th*/ 0, /*f*/ 0);\n\n    // 3) Promote to dynamic (x/y) if needed:\n    auto Bdyn = make_response_vector(num_orbitals_, /*is_static=*/false,\n                                     spin_restricted_);\n    auto Cdyn = make_response_vector(num_orbitals_, /*is_static=*/false,\n                                     spin_restricted_);\n    promote_response_vector(world_, Bv, Bdyn);\n    promote_response_vector(world_, Cv, Cdyn);\n\n    return std::make_pair(Bdyn, Cdyn);\n  }\n\n  static vector_real_function_3d\n  make_zeta_bc(World &world, const vector_real_function_3d &by,\n               const vector_real_function_3d &cx,\n               const vector_real_function_3d &phi0) {\n    auto mat = matrix_inner(world, by, cx);\n    return -1.0 * transform(world, phi0, mat, true);\n  }\n\n  static auto K(const vector_real_function_3d &bra,\n                const vector_real_function_3d &ket) {\n    auto &world = bra[0].world();\n    Exchange<double, 3> k{world, 1.e-10};\n    k.set_bra_and_ket(bra, ket);\n    return k;\n  }\n\n  static auto compute_g(World &world, const vector_real_function_3d &Aleft,\n                        const vector_real_function_3d &Aright,\n                        const vector_real_function_3d &Bleft,\n                        const vector_real_function_3d &Bright,\n                        const vector_real_function_3d &phix,\n                        const vector_real_function_3d &phiy) {\n    auto x_phi = mul(world, Aleft, Aright, true);\n    auto y_phi = mul(world, Bleft, Bright, true);\n    world.gop.fence();\n    auto rho = sum(world, x_phi, true);\n    world.gop.fence();\n    rho += sum(world, y_phi, true);\n    world.gop.fence();\n    auto lo = 1.e-10;\n    real_convolution_3d op =\n        CoulombOperator(world, lo, FunctionDefaults<3>::get_thresh());\n    auto temp_J = apply(op, rho);\n\n    auto Jx = mul(world, temp_J, phix, false);\n    auto Jy = mul(world, temp_J, phiy, false);\n\n    auto ka = K(Aleft, Aright)(phix); // what happens to k after this?\n    auto kb = K(Bleft, Bright)(phix);\n    auto ka_conj = K(Aright, Aleft)(phiy);\n    auto kb_conj = K(Bright, Bleft)(phiy);\n    world.gop.fence();\n    // ideally it runs and the Exchange operator is freed\n\n    auto Kx = gaxpy_oop(1.0, ka, 1.0, kb, true);\n    auto Ky = gaxpy_oop(1.0, ka_conj, 1.0, kb_conj, true);\n    world.gop.fence();\n\n    auto result_x = gaxpy_oop(2.0, Jx, -1.0, Kx, true);\n    auto result_y = gaxpy_oop(2.0, Jy, -1.0, Ky, true);\n\n    return std::make_pair(result_x, result_y);\n  };\n  // This function constructs the J and K operators with A and B and applies\n  static auto compute_vbc_i(World &world, const vector_real_function_3d &bx,\n                            const vector_real_function_3d &by,\n                            const vector_real_function_3d &cx,\n                            const vector_real_function_3d &cy,\n                            const vector_real_function_3d &zeta_bc,\n                            const vector_real_function_3d &phi0,\n                            const real_function_3d &v) {\n    // left right pairs ka and kb and apply apply\n    madness::QProjector<double, 3> Q(phi0);\n    auto [gzeta_x, gzeta_y] =\n        compute_g(world, bx, cy, phi0, zeta_bc, phi0, phi0);\n    gzeta_x = -1.0 * Q(gzeta_x);\n    gzeta_y = -1.0 * Q(gzeta_y);\n\n    auto [gbc_x, gbc_y] = compute_g(world, bx, phi0, phi0, by, cx, cy);\n    auto [gbc_phi_x, gbc_phi_y] =\n        compute_g(world, bx, phi0, phi0, by, phi0, phi0);\n\n    auto vcx = mul(world, v, cx, true);\n    auto vcy = mul(world, v, cy, true);\n\n    auto fbx = -1.0 * Q(gbc_x + vcx);\n    auto fby = -1.0 * Q(gbc_y + vcy);\n\n    auto vb_phi = mul(world, v, phi0, true);\n\n    auto fb_phi_x = gbc_phi_x + vb_phi;\n    auto fb_phi_y = gbc_phi_y + vb_phi;\n\n    auto m_fbx = matrix_inner(world, phi0, fb_phi_x);\n    auto m_fby = matrix_inner(world, phi0, fb_phi_y);\n\n    auto fphi_x = transform(world, cx, m_fbx, true);\n    auto fphi_y = transform(world, cy, m_fby, true);\n\n    auto result_x = truncate(gzeta_x + fbx + fphi_x,\n                             FunctionDefaults<3>::get_thresh(), true);\n    auto result_y = truncate(gzeta_y + fby + fphi_y,\n                             FunctionDefaults<3>::get_thresh(), true);\n\n    return std::make_pair(result_x, result_y);\n  };\n  ResponseVector compute_vbc_response(World &world, const GroundStateData &gs,\n                                      const ResponseVector &B,\n                                      const ResponseVector &C,\n                                      const vector_real_function_3d &VB,\n                                      const vector_real_function_3d &VC,\n                                      const real_function_3d &VB_op,\n                                      const real_function_3d &VC_op) {\n    const auto &bx = std::get<DynamicRestrictedResponse>(B).x_alpha;\n    const auto &by = std::get<DynamicRestrictedResponse>(B).y_alpha;\n    const auto &cx = std::get<DynamicRestrictedResponse>(C).x_alpha;\n    const auto &cy = std::get<DynamicRestrictedResponse>(C).y_alpha;\n\n    auto zeta_bc = make_zeta_bc(world, by, cx, gs.orbitals);\n    auto zeta_cb = make_zeta_bc(world, cy, bx, gs.orbitals);\n\n    auto [bcx, bcy] =\n        compute_vbc_i(world, bx, by, cx, cy, zeta_bc, gs.orbitals, VB_op);\n    auto [cbx, cby] =\n        compute_vbc_i(world, cx, cy, bx, by, zeta_cb, gs.orbitals, VC_op);\n\n    auto result_vec = DynamicRestrictedResponse(num_orbitals_);\n\n    result_vec.x_alpha = gaxpy_oop(1.0, bcx, 1.0, cbx, true);\n    result_vec.y_alpha = gaxpy_oop(1.0, bcy, 1.0, cby, true);\n    result_vec.flatten();\n\n    return result_vec;\n  }\n\n  /// Given a fully–described VBCResponseState, load or compute its vector.\n  ResponseVector compute_and_save(const VBCResponseState &vbc_state) {\n    auto filename = vbc_state.response_filename();\n    // (MADness will append “.00000” etc.)\n    if (fs::exists(filename + \".00000\")) {\n      ResponseVector loaded;\n      if (world_.rank() == 0)\n        print(\"📂 Loading existing VBC from\", filename);\n      load_response_vector(world_, num_orbitals_, vbc_state, loaded);\n      return loaded;\n    }\n\n    auto [xB, xC] = get_BC_vecs(vbc_state);\n    auto [stateB, stateC] = vbc_state.get_states();\n\n    // 2) Load their response vectors:\n    auto VB = perturbation_vector(world_, gs_, stateB);\n    auto VC = perturbation_vector(world_, gs_, stateC);\n    VB.insert(VB.end(), VB.begin(), VB.end());\n    VC.insert(VC.end(), VC.begin(), VC.end());\n    auto vb = raw_perturbation_operator(world_, gs_, stateB);\n    auto vc = raw_perturbation_operator(world_, gs_, stateC);\n\n    auto result = compute_vbc_response(world_, gs_, xB, xC, VB, VC, vb, vc);\n\n    // 5) Save to disk and return:\n    save_response_vector(world_, vbc_state, result);\n    if (world_.rank() == 0)\n      print(\"💾 Wrote VBC to\", filename);\n    return result;\n  }\n\nprivate:\n  World &world_;\n  const GroundStateData &gs_;\n  int num_orbitals_;\n  bool spin_restricted_;\n};\n\n} // namespace madness\n"
  },
  {
    "path": "src/apps/molresponse_v2/broadcast_json.hpp",
    "content": "#pragma once\n\n#include \"madness/external/nlohmann_json/json.hpp\"\n#include <fstream>\n#include <madness/world/world.h>\n#include <sstream>\n\nusing json = nlohmann::json;\nusing madness::World;\n\ninline json broadcast_json_file(World &world, const std::string &filepath) {\n  std::string json_str;\n\n  if (world.rank() == 0) {\n    std::ifstream ifs(filepath);\n    if (!ifs.is_open()) {\n      std::cerr << \"❌ Error opening file: \" << filepath << std::endl;\n      throw std::runtime_error(\"Failed to open JSON file\");\n    }\n    std::stringstream buffer;\n    buffer << ifs.rdbuf();\n    json_str = buffer.str();\n    ifs.close();\n  }\n\n  world.gop.fence();\n  world.gop.broadcast_serializable(json_str, 0);\n  world.gop.fence();\n\n  return json::parse(json_str);\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/molresponse2.cpp",
    "content": "#include <iostream>\n\n#include <madness/chem/oep.h>\n#include <madness/chem/TDHF.h>\n#include \"FrequencyLoop.hpp\"  // Make sure this is included\n#include \"GroundStateData.hpp\"\n#include <madness/chem/ParameterManager.hpp>\n#include \"PropertyManager.hpp\"\n#include \"ResponseDebugLogger.hpp\"\n#include \"ResponseManager.hpp\"\n#include \"ResponseMetaData.hpp\"\n#include \"StateGenerator.hpp\"\n#include <madness/mra/funcdefaults.h>\n\nusing namespace madness;\n\nint main(int argc, char **argv) {\n  // Initialize MADNESS world (passes MPI args, etc.)\n  World &world = initialize(argc, argv);\n  {\n    startup(world, argc, argv, true);\n\n    if (argc != 2) {\n      if (world.rank() == 0) std::cerr << \"Usage: molresponse2 [input_file.json]\\n\";\n      finalize();\n      return 1;\n    }\n    // Load input parameters explicitly from JSON file\n    // Define a concrete aliased ParameterManager type\n    using MyParamMgr = ParameterManager<CalculationParameters, ResponseParameters, OptimizationParameters, Molecule>;\n    commandlineparser parser(argc, argv);\n    // std::string input_file = argv[1];\n    // Construct the manager, reading .inp or JSON as needed\n    MyParamMgr pm(world, parser);\n\n    const auto &tmpl = pm.getAllInputJson();\n    if (world.rank() == 0) {\n      std::cout << \"Input JSON: \" << parser.value(\"input\") << \"\\n\" << std::setw(2) << tmpl.dump(2) << std::endl;\n    }\n\n    auto rp = pm.get<ResponseParameters>();\n    std::string fock_json_file = rp.fock_json_file();\n    const auto &molecule = pm.get<Molecule>();\n    const auto &params = pm.get<CalculationParameters>();\n    auto protocol = params.protocol();\n    rp.set_user_defined_value<std::string>(\"archive\", \"moldft.restartdata\");\n    auto ground_state_archive = rp.archive();\n    if (world.rank() == 0) {\n      std::cout << \"Ground state archive: \" << ground_state_archive << std::endl;\n    }\n    // Initialize the ResponseManager with ground-state archive\n    auto ground_state = GroundStateData(world, ground_state_archive, molecule);\n    ResponseManager rm = ResponseManager(world, params);\n    StateGenerator state_generator(molecule, params.protocol(), ground_state.isSpinRestricted(), rp);\n    auto generated_states = state_generator.generateStates();\n\n    if (world.rank() == 0) {\n      GeneratedStateData::print_generated_state_map(generated_states.state_map);\n    }\n    world.gop.fence();\n    // bool all_states_converged = false;\n    std::string response_metadata_file = \"responses/response_metadata.json\";\n    ResponseMetadata metadata(world, response_metadata_file);\n    metadata.initialize_states(generated_states.states);\n    if (world.rank() == 0) {\n      metadata.print_summary();\n    }\n    world.gop.fence();\n    ResponseDebugLogger debug_logger(\"responses/response_log.json\", true);\n    // Extract all unique thresholds needed for this round\n    for (double thresh : protocol) {\n      rm.setProtocol(world, ground_state.getL(), thresh);\n      ground_state.prepareOrbitals(world, FunctionDefaults<3>::get_k(), thresh);\n      ground_state.computePreliminaries(world, *rm.getCoulombOp(), rm.getVtol(), fock_json_file);\n      if (world.rank() == 0) {\n        print(\"hamiltonian:\\n\", ground_state.Hamiltonian);\n      }\n      for (auto &state : generated_states.states) {\n        if (state.is_converged || state.current_threshold() != thresh) continue;\n\n        computeFrequencyLoop(world, rm, state, ground_state, metadata, debug_logger);\n\n        if (debug_logger.enabled()) {\n          debug_logger.write_to_disk();\n        }\n        // Check if we reached final protocol or should advance\n        if (state.at_final_threshold()) {\n          state.is_converged = true;\n          if (world.rank() == 0) {\n            madness::print(\"✓ Final convergence reached for\", state.description());\n          }\n        } else {\n          state.advance_threshold();\n          // all_states_converged = false;\n          if (world.rank() == 0) {\n            madness::print(\"→ Converged at thresh\", thresh, \"→ advancing to next protocol for\", state.description());\n          }\n        }\n      }\n    }\n\n   // compute requested properties\n    PropertyManager properties(world, \"properties.json\");\n    std::string dip_dirs = rp.dipole_directions();\n    std::string nuc_dirs = rp.nuclear_directions();\n\n    for (auto const& prop : rp.requested_properties()) {\n      if (prop == \"polarizability\") {\n        if (world.rank() == 0)\n          madness::print(\"▶️ Computing polarizability α...\");\n        compute_alpha(world, generated_states.state_map, ground_state,\n                      rp.dipole_frequencies(), rp.dipole_directions(),\n                      properties);\n        properties.save();\n\n      } else if (prop == \"hyperpolarizability\") {\n        if (world.rank() == 0)\n          madness::print(\"▶️ Computing hyperpolarizability β...\");\n\n        compute_hyperpolarizability(world, ground_state, rp.dipole_frequencies(),\n                                    dip_dirs, properties);\n        properties.save();\n\n      } else if (prop == \"raman\") {\n        auto nuclear_dirs = rp.nuclear_directions();\n        auto dipole_dirs = rp.dipole_directions();\n        if (world.rank() == 0) madness::print(\"▶️ Computing Raman response...\");\n        // compute_Raman(world, ground, rp.dipole_frequencies(), dipole_dirs,\n        // properties);\n        properties.save();\n      }\n      if (world.rank() == 0) {\n        properties.print_table();\n      }\n    }\n\n    // global inner-product contributions\n    auto contribs = global_inner_contributions();\n    if (world.rank() == 0 && !contribs.empty()) {\n      std::ofstream out(\"all_inner_contributions.json\");\n      out << std::setw(2) << contribs << std::endl;\n      madness::print(\"📂 Wrote all inner‐product contributions\");\n    }\n    // Currently just logging the progress explicitly\n    world.gop.fence();\n    world.gop.fence();\n    print_stats(world);\n  }\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/test_parameter_manager.cpp",
    "content": "#include <QCCalculationParametersBase.h>\n#include <madness/mra/mra.h>\n#include <molecule.h>\n#include <TDHF.h>\n\n#include <iostream>\n#include <string>\n\n// #include \"ParameterManager.hpp\"\n#include <madness/chem/ParameterManager.hpp>\n\n// Define a concrete aliased ParameterManager type\nusing MyParamMgr = ParameterManager<CalculationParameters, ResponseParameters, OptimizationParameters, Molecule>;\n\nint main(int argc, char **argv) {\n  World &world = initialize(argc, argv);\n  {\n    startup(world, argc, argv, true);\n    if (argc != 2) {\n      if (world.rank() == 0) std::cerr << \"Usage: molresponse2 [input_file.json]\\n\";\n      finalize();\n      return 1;\n    }\n    commandlineparser parser(argc, argv);\n\n    if (argc != 2) {\n      std::cerr << \"Usage: \" << argv[0] << \" <input_file>\\n\";\n      return 1;\n    }\n    std::string input_file = argv[1];\n\n    // Construct the manager, reading .inp or JSON as needed\n    MyParamMgr pm(world, parser);\n\n    // Print out all groups\n    if (world.rank() == 0) {\n      pm.print_all();\n    }\n\n    // Dump merged JSON to stdout\n    auto &all_json = pm.getAllInputJson();\n    if (world.rank() == 0) {\n      std::cout << \"Merged JSON:\\n\";\n      std::cout << all_json.dump(4) << std::endl;\n    }\n    finalize();\n  }\n\n  return 0;\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/test_preliminaries.cpp",
    "content": "#include \"../madqc/parameter_manager.hpp\"\n#include \"GroundStateData.hpp\"\n#include \"ResponseManager.hpp\"\n#include \"madness/world/world.h\"\n#include <cassert>\n#include <cmath>\n#include <iostream>\n#include <string>\n#include <tensor_json.hpp>\n\nusing namespace madness;\n\nstd::pair<Tensor<double>, Tensor<double>>\nget_fock_from_json(const json &fock_json, double thresh, int k,\n                   bool spinrestricted) {\n  // fock_a and fock_b if spinrestricted\n  std::pair<Tensor<double>, Tensor<double>> fock_data;\n  // write the fock matrix to a file\n  auto protocol = std::string(\"thresh: \") +\n                  std::to_string(FunctionDefaults<3>::get_thresh());\n  protocol +=\n      std::string(\" k: \") + std::to_string(FunctionDefaults<3>::get_k());\n\n  // Check if the protocol exists in the JSON\n  if (fock_json.find(protocol) == fock_json.end()) {\n    std::cerr << \"Protocol not found in JSON: \" << protocol << std::endl;\n    return fock_data;\n  } else {\n\n    fock_data.first = tensor_from_json<double>(fock_json[protocol][\"focka\"]);\n    if (!spinrestricted) {\n      fock_data.second = tensor_from_json<double>(fock_json[protocol][\"fockb\"]);\n    }\n    return fock_data;\n  }\n}\n\n// Utility function to compare values within tolerance\nbool approximately_equal(double computed, double reference, double tol = 1e-6) {\n  return std::abs(computed - reference) <= tol;\n}\n\n// Compare two tensors element-wise with a tolerance threshold\nbool tensor_approx_equal(World &world, const Tensor<double> &computed,\n                         const Tensor<double> &reference, double tol = 1e-6,\n                         bool verbose = true) {\n\n  // dims are pointers to array of longs\n\n  auto check_dims = [](const long *a, const long *b, long size) {\n    for (int i = 0; i < size; ++i) {\n      if (a[i] != b[i]) {\n        return false;\n      }\n    }\n    return true;\n  };\n\n  auto computed_dims = computed.dims();\n  auto reference_dims = reference.dims();\n  if (!check_dims(computed_dims, reference_dims, computed.ndim())) {\n    if (verbose and world.rank() == 0)\n      std::cerr << \"Tensor dimension mismatch: computed = \" << computed.dims()\n                << \", reference = \" << reference.dims() << \"\\n\";\n    return false;\n  }\n\n  auto flat_computed = computed.flat();\n  auto flat_reference = reference.flat();\n\n  for (int i = 0; i < flat_computed.size(); ++i) {\n    double c_val = flat_computed[i];\n    double r_val = flat_reference[i];\n    if (std::abs(c_val - r_val) > tol) {\n      if (verbose) {\n        if (world.rank() == 0) {\n          std::cerr << \"Tensor mismatch at index \" << i\n                    << \": computed = \" << c_val << \", reference = \" << r_val\n                    << \", diff = \" << std::abs(c_val - r_val)\n                    << \" > tol = \" << tol << \"\\n\";\n        }\n      }\n      return false;\n    }\n  }\n\n  return true;\n}\n\nint main(int argc, char **argv) {\n  World &world = initialize(argc, argv);\n  {\n\n    startup(world, argc, argv, true);\n    if (world.rank() == 0)\n      print(info::print_revision_information());\n\n    if (argc != 3) {\n      if (world.rank() == 0)\n        std::cerr\n            << \"Usage: test_preliminaries [input_file.json] [reference.txt]\\n\";\n      finalize();\n      return 1;\n    }\n\n    const std::string input_filename = argv[1];\n    const std::string reference_filename = argv[2];\n    commandlineparser parser(argc, argv);\n    ParameterManager params;\n    path input_file(argv[1]);\n    params = ParameterManager(world, input_file);\n    // Extract relevant parameters\n    const std::string ground_state_archive = \"moldft.restartdata\";\n    const std::string ground_state_fock_archive = \"moldft.fock.json\";\n    // Read moldft.fock.json\n    json fock_archive;\n\n    std::ifstream fock_file(ground_state_fock_archive);\n    if (!fock_file.is_open()) {\n      if (world.rank() == 0)\n        std::cerr << \"Error opening file: \" << ground_state_fock_archive\n                  << std::endl;\n      finalize();\n      return 1;\n    } else {\n      fock_file >> fock_archive;\n      fock_file.close();\n    }\n\n    // Initialize the ResponseManager with ground-state archive\n    auto ground_state =\n        GroundStateData(world, ground_state_archive, params.get_molecule());\n    ResponseManager rm =\n        ResponseManager(world, params.get_molresponse_params());\n\n    auto protocol = params.get_moldft_params().protocol();\n    FunctionDefaults<3>::set_pmap(pmapT(new LevelPmap<Key<3>>(world)));\n\n    std::pair<Tensor<double>, Tensor<double>> fock_data;\n\n    for (auto thresh : protocol) {\n      rm.setProtocol(world, ground_state.getL(), thresh);\n      if (world.rank() == 0) {\n        FunctionDefaults<3>::print();\n      }\n      auto k = FunctionDefaults<3>::get_k();\n      fock_data = get_fock_from_json(fock_archive, thresh, k,\n                                     ground_state.isSpinRestricted());\n\n      ground_state.prepareOrbitals(world, k, thresh);\n      ground_state.computePreliminaries(\n          world, *rm.getCoulombOp(), rm.getVtol(),\n          params.get_molresponse_params().fock_json_file());\n\n      if (world.rank() == 0) {\n        print(ground_state.Hamiltonian);\n      }\n\n      // Compare the computed Hamiltonian with the reference data\n      double test_thresh = thresh * .001;\n      bool approx_equal = tensor_approx_equal(\n          world, ground_state.Hamiltonian, fock_data.first, test_thresh, true);\n      while (!approx_equal) {\n        test_thresh *= 10;\n        approx_equal = tensor_approx_equal(world, ground_state.Hamiltonian,\n                                           fock_data.first, test_thresh, true);\n      }\n      if (world.rank() == 0) {\n        if (approx_equal) {\n          print(\"Hamiltonian matches reference data within tolerance.\");\n          print(\"Threshold used for comparison: \", test_thresh);\n\n        } else {\n          std::cerr << \"Hamiltonian does not match reference data.\\n\";\n          std::cerr << \"Threshold used for comparison: \" << test_thresh << \"\\n\";\n        }\n      }\n    }\n\n    // auto prelims = response_manager.currentPreliminaries();\n    world.gop.fence();\n    world.gop.fence();\n    print_stats(world);\n  }\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/apps/molresponse_v2/usage.rst",
    "content": "# molresponse Usage Guide\n\n.. toctree:: \\:maxdepth: 2\n\n## Introduction\n\n`molresponse` is a command\\u2011line application for computing molecular response properties (e.g. polarizability, hyperpolarizability, Raman) using multiresolution analysis (MRA). It reads a structured input file (INI or JSON), sets up the ground-state calculation, and generates response states based on user-defined perturbations or high-level property requests.\n\n## Usage\n\n.. code-block:: console\n\n```\nmolresponse <input_file>\n```\n\nWhere `<input_file>` can be:\n\n* A plain-text INI-style file\n* A JSON file with pre-defined keys\n\n## Examples\n\n---\n\nMinimal polarizability calculation (INI):\n\n.. code-block:: ini\n\n```\n[task]\nmodel      = moldft\nactions    = energy, response\n\n[response]\nrequested_properties = polarizability\ndipole               = true\ndipole.directions    = xyz\ndipole.frequencies   = 0.0\n```\n\nJSON equivalent:\n\n.. code-block:: json\n\n```\n{\n  \"task\": {\n    \"model\": \"moldft\",\n    \"actions\": [\"energy\",\"response\"]\n  },\n  \"response\": {\n    \"requested_properties\": [\"polarizability\"],\n    \"dipole\": true,\n    \"dipole\": {\n      \"directions\": [\"x\",\"y\",\"z\"],\n      \"frequencies\": [0.0]\n    }\n  }\n}\n```\n\nMADQC application example (plain-text INI):\n\nThis first `task` block is only used by the MADQC driver, which orchestrates\ncalls to lower-level MADNESS applications (DFT, response, geometry, etc.).\n\n.. code-block:: ini\n\n```\ntask\n    model moldft\n    driver energy\nend\n\ndft\n    dconv    1e-04\n    l        200.0\n    maxiter  30\n    protocol [0.0001,1e-06]\nend\n\nmolecule\n    eprec      1e-06\n    field      [0.0,0.0,0.0]\n    no_orient  true\n    psp_calc   false\n    pure_ae    true\n    symtol     -0.01\n    O  0  0      0.221665\n    H  0  1.4309 -0.88666\n    H  0 -1.4309 -0.88666\nend\n\nresponse\n    quadratic           true\n    dipole.directions   xyz\n    dipole.frequencies  [0.0, 0.0198666875]\n    kain                true\n    step_restriction    false\n    maxiter             15\nend\n```\n\nParameter Reference\n\n.. glossary::\n\ntask Top-level block specifying the electronic-structure method (`model`) and which tasks (`actions`) to run (e.g. `energy`, `response`, `optimize`).\n\nnumeric Solver-level parameters controlling convergence thresholds, grid tolerances, SCF settings, and maximum iterations.\n\ngeometry Molecule geometry options (source\\_type, source\\_name, units, symtol, etc.).\n\nresponse Controls response-state generation:\n\n```\n  - **requested_properties** (*string list*)\n    High\\u2011level alias: `polarizability`, `hyperpolarizability`, `raman`.\n  - **dipole** (*bool*)\n  - **dipole.directions** (*string* or *char list*)\n  - **dipole.frequencies** (*float list*)\n  - **nuclear** (*bool*)\n  - **nuclear.directions** (*string* or *char list*)\n  - **nuclear.frequencies** (*float list*)\n  - **nuclear.atom_indices** (*int list*)\n  - **quadratic** (*bool*): treat dipole kicks as quadratic perturbations.\n```\n\noptimize Geometry optimization parameters (maxiter, algopt, value\\_precision, etc.).\n\n## Derived Parameters & Validation\n\n* If `requested_properties` is omitted, the code will derive it from `dipole`, `nuclear`, and `quadratic` flags:\n\n  * *linear* + *dipole* \\u2192 `polarizability`\n  * *quadratic*         \\u2192 `polarizability` & `hyperpolarizability`\n  * *quadratic* + *dipole* + *nuclear* \\u2192 `raman`\n\n* When `requested_properties` is explicitly set, you **must** supply matching perturbation details:\n\n  * For `polarizability` or `hyperpolarizability`: `dipole.directions` & `dipole.frequencies`\n  * For `raman`: both `dipole.*` and `nuclear.*` blocks\n\n## Output\n\n* **Restart data:** writes response-state vectors to disk\n* **JSON summary:** merged input+derived settings printed to stdout or `<prefix>.json`\n* **Logs:** based on `print_level` parameter\n\n## See also\n\n* \\:doc:`/api/response` for the C++ API of response- and state-generation classes\n* \\:doc:`/tutorials/raman` for a step-by-step Raman example\n"
  },
  {
    "path": "src/apps/mp2/CMakeLists.txt",
    "content": "# src/apps/mp2\n\nadd_mad_executable(mp2 mp2.cc \"MADchem\")\nadd_dependencies(applications-madness mp2)\n\ninstall(TARGETS mp2 DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/mp2/mp2.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file mp2.cc\n  \\brief Solves molecular MP2 equations\n  \\defgroup Solves molecular MP2 equations\n  \\ingroup examples\n*/\n\n\n#include \"madness/chem/mp2.h\"\n#include \"madness/misc/info.h\"\n\nusing namespace madness;\n\n#ifdef USE_GENTENSOR\n\nint main(int argc, char** argv) {\n    World& world=initialize(argc, argv,false);\n    if (world.rank() == 0) {\n        print_header1(\"MP2 -- second order correlation energies\");\n        printf(\"starting at time %.1f\\n\", wall_time());\n    }\n\n    startup(world,argc,argv,true);\n    std::cout.precision(6);\n    if (world.rank()==0) print(info::print_revision_information());\n\n\n    commandlineparser parser(argc,argv);\n    if (parser.key_exists(\"help\")) {\n        MP2::help();\n\n    } else if (parser.key_exists(\"print_parameters\")) {\n        MP2::print_parameters();\n\n    } else {\n\n        TensorType tt = TT_2D;\n        if (parser.key_exists(\"TT\")) {\n            if (parser.value(\"TT\") == \"TT_2D\") tt = TT_2D;\n            if (parser.value(\"TT\") == \"TT_TENSORTRAIN\") tt = TT_TENSORTRAIN;\n        }\n\n        FunctionDefaults<6>::set_tensor_type(tt);\n        FunctionDefaults<6>::set_apply_randomize(true);\n\n        try {\n            MP2 mp2(world, parser);\n\n            if (world.rank() == 0) printf(\"\\nstarting at time %.1fs\\n\", wall_time());\n\n\t\t\tconst double hf_energy=mp2.get_hf().value();\n\t\t\tconst double mp2_energy=mp2.value();\n//            const double mp2_energy=0.0;\n\t\t\tif(world.rank() == 0) {\n\t\t\t\tprintf(\"final hf/mp2/total energy %12.8f %12.8f %12.8f\\n\",\n\t\t\t\t\t\thf_energy,mp2_energy,hf_energy+mp2_energy);\n\t\t\t}\n        } catch (std::exception& e) {\n\n            if (world.rank() == 0) {\n                print(\"\\ncaught an exception: \\n\", e.what());\n            }\n        }\n    }\n\n    if(world.rank() == 0) printf(\"\\nfinished at time %.1fs\\n\\n\", wall_time());\n    world.gop.fence();\n    finalize();\n\n    return 0;\n}\n\n#else\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    if(world.rank() == 0) {\n\n    \tprint(\"\\nYou can't run mp2 because you have configured MADNESS \");\n    \tprint(\"without the --enable-gentensor flag\");\n    \tprint(\"You need to reconfigure and recompile\\n\");\n\n    }\n    world.gop.fence();\n    finalize();\n\n    return 0;\n\n}\n#endif\n"
  },
  {
    "path": "src/apps/nemo/CMakeLists.txt",
    "content": "# src/apps/moldft\n\nadd_mad_executable(nemo nemo.cc \"MADchem\")\nadd_dependencies(applications-madness nemo)\n\n#if(BUILD_TESTING)\n#  add_scripted_tests(../madqc_v2/test_localization.py nemo \"long;applications\")\n#endif()\n\ninstall(TARGETS nemo DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/nemo/madtestboys.calc_info.ref.json",
    "content": "{\n    \"calcinfo_nalpha\": 5,\n    \"calcinfo_natom\": 3,\n    \"calcinfo_nbeta\": 5,\n    \"calcinfo_nmo\": 10,\n    \"k\": 8,\n    \"parameters\": {\n        \"charge\": 0.0,\n        \"conv_only_dens\": false,\n        \"dconv\": 0.001,\n        \"derivatives\": false,\n        \"dipole\": false,\n        \"econv\": 3e-05,\n        \"ginitial_hessian\": false,\n        \"gmaxiter\": 20,\n        \"gopt\": false,\n        \"gprec\": 0.0001,\n        \"gtest\": false,\n        \"gtol\": 0.0001,\n        \"gval\": 1e-05,\n        \"k\": 8,\n        \"l\": 51.427,\n        \"lo\": 0.001329,\n        \"loadbalparts\": 2,\n        \"maxiter\": 10,\n        \"maxrotn\": 0.25,\n        \"maxsub\": 10,\n        \"nalpha\": 5,\n        \"nbeta\": 5,\n        \"nio\": 1,\n        \"nmo_alpha\": 5,\n        \"nmo_beta\": 5,\n        \"no_compute\": false,\n        \"nopen\": 0,\n        \"npt_plot\": 101,\n        \"nv_factor\": 1,\n        \"nvalpha\": 0,\n        \"nvbeta\": 0,\n        \"orbitalshift\": 0.0,\n        \"plotcoul\": false,\n        \"plotdens\": false,\n        \"plothi\": -1,\n        \"plotlo\": 0,\n        \"print_level\": 3,\n        \"psp_calc\": false,\n        \"pure_ae\": true,\n        \"restart\": false,\n        \"restartao\": false,\n        \"save\": true,\n        \"smear\": 0.0,\n        \"spin_restricted\": true,\n        \"vnucextra\": 2\n    },\n    \"return_energy\": -76.06811421364738,\n    \"scf_e_data\": {\n        \"e_coulomb\": [],\n        \"e_kinetic\": [],\n        \"e_local\": [],\n        \"e_nrep\": [],\n        \"e_nuclear\": [],\n        \"e_pcm\": [],\n        \"e_tot\": [],\n        \"e_xc\": [],\n        \"iterations\": 0\n    },\n    \"scf_eigenvalues_a\": {\n        \"dims\": [\n            5\n        ],\n        \"size\": 5,\n        \"vals\": [\n            -20.42914360751624,\n            -0.9328625128954031,\n            -0.9328626031474729,\n            -0.7250463973947698,\n            -0.7250475832515377\n        ]\n    },\n    \"time\": \"2023-01-13 23:38:40\",\n    \"wall_time\": 36.969685792922974\n}"
  },
  {
    "path": "src/apps/nemo/madtestcanon.calc_info.ref.json",
    "content": "{\n    \"calcinfo_nalpha\": 5,\n    \"calcinfo_natom\": 3,\n    \"calcinfo_nbeta\": 5,\n    \"calcinfo_nmo\": 10,\n    \"k\": 8,\n    \"parameters\": {\n        \"charge\": 0.0,\n        \"conv_only_dens\": false,\n        \"dconv\": 0.001,\n        \"derivatives\": false,\n        \"dipole\": false,\n        \"econv\": 3e-05,\n        \"ginitial_hessian\": false,\n        \"gmaxiter\": 20,\n        \"gopt\": false,\n        \"gprec\": 0.0001,\n        \"gtest\": false,\n        \"gtol\": 0.0001,\n        \"gval\": 1e-05,\n        \"k\": 8,\n        \"l\": 51.427,\n        \"lo\": 0.001329,\n        \"loadbalparts\": 2,\n        \"maxiter\": 10,\n        \"maxrotn\": 0.25,\n        \"maxsub\": 10,\n        \"nalpha\": 5,\n        \"nbeta\": 5,\n        \"nio\": 1,\n        \"nmo_alpha\": 5,\n        \"nmo_beta\": 5,\n        \"no_compute\": false,\n        \"nopen\": 0,\n        \"npt_plot\": 101,\n        \"nv_factor\": 1,\n        \"nvalpha\": 0,\n        \"nvbeta\": 0,\n        \"orbitalshift\": 0.0,\n        \"plotcoul\": false,\n        \"plotdens\": false,\n        \"plothi\": -1,\n        \"plotlo\": 0,\n        \"print_level\": 3,\n        \"psp_calc\": false,\n        \"pure_ae\": true,\n        \"restart\": false,\n        \"restartao\": false,\n        \"save\": true,\n        \"smear\": 0.0,\n        \"spin_restricted\": true,\n        \"vnucextra\": 2\n    },\n    \"return_energy\": -76.06814005437352,\n    \"scf_e_data\": {\n        \"e_coulomb\": [],\n        \"e_kinetic\": [],\n        \"e_local\": [],\n        \"e_nrep\": [],\n        \"e_nuclear\": [],\n        \"e_pcm\": [],\n        \"e_tot\": [],\n        \"e_xc\": [],\n        \"iterations\": 0\n    },\n    \"scf_eigenvalues_a\": {\n        \"dims\": [\n            5\n        ],\n        \"size\": 5,\n        \"vals\": [\n            -20.560378267443163,\n            -1.3591598586766904,\n            -0.7301960973271303,\n            -0.583960354369421,\n            -0.5112020665001267\n        ]\n    },\n    \"time\": \"2023-01-13 23:11:39\",\n    \"wall_time\": 36.42744588851929\n}"
  },
  {
    "path": "src/apps/nemo/madtestnew.calc_info.ref.json",
    "content": "{\n    \"calcinfo_nalpha\": 5,\n    \"calcinfo_natom\": 3,\n    \"calcinfo_nbeta\": 5,\n    \"calcinfo_nmo\": 10,\n    \"k\": 8,\n    \"parameters\": {\n        \"charge\": 0.0,\n        \"conv_only_dens\": false,\n        \"dconv\": 0.001,\n        \"derivatives\": false,\n        \"dipole\": false,\n        \"econv\": 3e-05,\n        \"ginitial_hessian\": false,\n        \"gmaxiter\": 20,\n        \"gopt\": false,\n        \"gprec\": 0.0001,\n        \"gtest\": false,\n        \"gtol\": 0.0001,\n        \"gval\": 1e-05,\n        \"k\": 8,\n        \"l\": 51.427,\n        \"lo\": 0.001329,\n        \"loadbalparts\": 2,\n        \"maxiter\": 10,\n        \"maxrotn\": 0.25,\n        \"maxsub\": 10,\n        \"nalpha\": 5,\n        \"nbeta\": 5,\n        \"nio\": 1,\n        \"nmo_alpha\": 5,\n        \"nmo_beta\": 5,\n        \"no_compute\": false,\n        \"nopen\": 0,\n        \"npt_plot\": 101,\n        \"nv_factor\": 1,\n        \"nvalpha\": 0,\n        \"nvbeta\": 0,\n        \"orbitalshift\": 0.0,\n        \"plotcoul\": false,\n        \"plotdens\": false,\n        \"plothi\": -1,\n        \"plotlo\": 0,\n        \"print_level\": 3,\n        \"psp_calc\": false,\n        \"pure_ae\": true,\n        \"restart\": false,\n        \"restartao\": false,\n        \"save\": true,\n        \"smear\": 0.0,\n        \"spin_restricted\": true,\n        \"vnucextra\": 2\n    },\n    \"return_energy\": -76.06812003941299,\n    \"scf_e_data\": {\n        \"e_coulomb\": [],\n        \"e_kinetic\": [],\n        \"e_local\": [],\n        \"e_nrep\": [],\n        \"e_nuclear\": [],\n        \"e_pcm\": [],\n        \"e_tot\": [],\n        \"e_xc\": [],\n        \"iterations\": 0\n    },\n    \"scf_eigenvalues_a\": {\n        \"dims\": [\n            5\n        ],\n        \"size\": 5,\n        \"vals\": [\n            -20.555091938356124,\n            -1.0138119526770761,\n            -1.0138119491001942,\n            -0.6509448389458057,\n            -0.5112164209299839\n        ]\n    },\n    \"time\": \"2023-01-13 23:42:17\",\n    \"wall_time\": 36.584208965301514\n}"
  },
  {
    "path": "src/apps/nemo/nemo.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n\n/*!\n  \\file examples/nemo.cc\n  \\brief solve the HF equations using numerical exponential MOs\n\n  The source is\n  <a href=http://code.google.com/p/m-a-d-n-e-s-s/source/browse/local\n  /trunk/src/apps/examples/nemo.cc>here</a>.\n\n*/\n\n#include <madness/chem/SCFOperators.h>\n#include <madness/chem/molecular_optimizer.h>\n#include <madness/chem/nemo.h>\n#include <madness/chem/projector.h>\n#include <madness/misc/info.h>\n\nusing namespace madness;\n\n\nint main(int argc, char** argv) {\n\n    World& world=initialize(argc, argv,false);\n    if (world.rank() == 0) {\n        print_header1(\"NEMO -- Hartree-Fock using numerical exponential molecular orbitals\");\n    \tprintf(\"starting at time %.1f\\n\", wall_time());\n    }\n\n    startup(world,argc,argv,true);\n    std::cout.precision(6);\n    if (world.rank()==0) print(info::print_revision_information());\n\n\n    commandlineparser parser(argc,argv);\n    if (parser.key_exists(\"help\")) {\n        Nemo::help();\n\n    } else if (parser.key_exists(\"print_parameters\")) {\n        Nemo::print_parameters();\n\n    } else {\n\n        try {\n\n            std::shared_ptr<Nemo> nemo(new Nemo(world, parser));\n\n            print_header2(\"input section\");\n            if (world.rank() == 0) {\n                nemo->get_calc_param().print(\"dft\", \"end\");\n                nemo->molecule().print();\n            }\n\n            // optimize the geometry if requested\n            if (nemo->get_calc_param().gopt()) {\n                print_header2(\"Geometry Optimization\");\n                MolecularOptimizer geom(world, parser, nemo);\n                geom.parameters.print(\"geoopt\", \"end\");\n\n                // compute the energy to get converged orbitals\n                print_header2(\"computing initial wave function\");\n                nemo->value();\n\n                // reduce print level\n                nemo->get_calc()->param.set_derived_value(\"print_level\",2);\n                nemo->get_calc()->param.set_derived_value(\"print_level\",2);\n                nemo->get_calc()->set_print_timings(false);\n\n                // compute initial hessian\n                if (nemo->get_calc_param().ginitial_hessian()) {\n                    Tensor<double> hess = nemo->hessian(nemo->get_calc()->molecule.get_all_coords());\n                    geom.set_hessian(hess);\n                }\n\n                print_header2(\"Starting geometry optimization\");\n                Tensor<double> geomcoord = nemo->get_calc()->molecule.get_all_coords().flat();\n                geom.optimize(geomcoord);\n            }\n\n\n            double energy=nemo->value();\n            if (world.rank() == 0) {\n                printf(\"final energy   %12.8f\\n\", energy);\n                printf(\"finished at time %.1f\\n\", wall_time());\n            }\n\n            // compute the hessian\n            if (nemo->get_nemo_param().hessian()) nemo->hessian(nemo->get_calc()->molecule.get_all_coords());\n\n\n        } catch (const SafeMPI::Exception& e) {\n            print(e);\n            error(\"caught an MPI exception\");\n        } catch (const madness::MadnessException& e) {\n            print(e);\n            error(\"caught a MADNESS exception\");\n        } catch (const madness::TensorException& e) {\n            print(e);\n            error(\"caught a Tensor exception\");\n        } catch (const char *s) {\n            print(s);\n            error(\"caught a string exception\");\n        } catch (const std::string& s) {\n            print(s);\n            error(\"caught a string (class) exception\");\n        } catch (const std::exception& e) {\n            print(e.what());\n            error(\"caught an STL exception\");\n        } catch (...) {\n            error(\"caught unhandled exception\");\n        }\n    }\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/oep/CMakeLists.txt",
    "content": "# src/apps/moldft\n\nadd_mad_executable(oep oep.cc \"MADchem\")\nadd_dependencies(applications-madness oep)\n\n#if(BUILD_TESTING)\n#  add_scripted_tests(../madqc_v2/test_energy.py oep \"medium;applications\")\n#endif()\n\ninstall(TARGETS oep DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/oep/madtest1.oep_calc_info.ref.json",
    "content": "{\n    \"driver\": \"energy\",\n    \"model\": \"oaep\",\n    \"return_energy\": -14.560947429075917,\n    \"scf_eigenvalues_a\": {\n        \"dims\": [\n            2\n        ],\n        \"size\": 2,\n        \"vals\": [\n            -4.621452195055882,\n            -0.3231970029561877\n        ]\n    },\n    \"time\": \"2023-01-19 23:04:05\",\n    \"wall_time\": 15.210686922073364\n}"
  },
  {
    "path": "src/apps/oep/oep.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/*!\n  \\file examples/oep.cc\n  \\brief optimized effective potentials for DFT\n*/\n\n\n#include <madness/chem/oep.h>\n#include <madness/misc/info.h>\n\nusing namespace madness;\n\n/// Create a specific test input for the Be atom\nvoid write_test_input() {\n\n\tstd::string filename = \"test_input\";\n\n\tstd::ofstream of(filename);\n\tof << \"\\ngeometry\\n\";\n\tof << \"  Be 0.0 0.0 0.0\\n\";\n\tof << \"end\\n\\n\\n\";\n\n    of << \"dft\\n\";\n    of << \"  local canon\\n\";\n    of << \"  xc hf\\n\";\n    of << \"  maxiter 100\\n\";\n    of << \"  econv 1.0e-6\\n\";\n    of << \"  dconv 3.0e-4\\n\";\n    of << \"  L 20\\n\";\n    of << \"  k 9\\n\";\n    of << \"  no_orient 1\\n\";\n    of << \"  ncf slater 2.0\\n\";\n    of << \"end\\n\\n\\n\";\n\n    of << \"oep\\n\";\n    of << \"  model [mrks]\\n\";\n    of << \"  maxiter 2\\n\";\n    of << \"  density_threshold_high 1.0e-4\\n\";\n    of << \"  density_threshold_low 1.0e-7\\n\";\n    of << \"end\\n\\n\\n\";\n\n    of << \"plot\\n\";\n    of << \"  line x3\\n\";\n    of << \"  plane x1 x3\\n\";\n    of << \"  zoom 1\\n\";\n    of << \"  npoints 100\\n\";\n    of << \"end\\n\\n\";\n\n    of.close();\n\n}\n\n\nint main(int argc, char** argv) {\n\n\n    World& world=initialize(argc, argv,false);\n    if (world.rank() == 0) {\n        print_header1(\"OEP -- optimized effective potentials for DFT\");\n    }\n\n    startup(world,argc,argv,true);\n    std::cout.precision(6);\n    if (world.rank()==0) print(info::print_revision_information());\n\n\n    commandlineparser parser(argc,argv);\n    if (parser.key_exists(\"help\")) {\n        OEP::help();\n\n    } else if (parser.key_exists(\"print_parameters\")) {\n        OEP::print_parameters();\n\n    } else {\n        // to allow to test the program\n        bool test = parser.key_exists(\"test\");\n        bool analyze = parser.key_exists(\"analyze\");\n\n        // create test input file if program is tested\n        if (test) {\n            write_test_input();\n            parser.set_keyval(\"input\", \"test_input\");\n        }\n\n        // do approximate OEP calculation or test the program\n        // std::shared_ptr<OEP> oep(new OEP(world, parser));\n        CalculationParameters cparam(world,parser);\n        // add tight convergence criteria\n        std::vector<std::string> convergence_crit=cparam.get<std::vector<std::string> >(\"convergence_criteria\");\n        if (std::find(convergence_crit.begin(),convergence_crit.end(),\"each_energy\")==convergence_crit.end()) {\n            convergence_crit.push_back(\"each_energy\");\n        }\n        cparam.set_derived_value(\"convergence_criteria\",convergence_crit);\n        Molecule molecule(world,parser);\n        Nemo::NemoCalculationParameters nemo_param(world,parser);\n        std::shared_ptr<Nemo> reference(new Nemo(world, cparam, nemo_param, molecule));\n        OEP_Parameters oep_param(world,parser);\n        std::shared_ptr<OEP> oep(new OEP(world, oep_param, reference));\n        oep->print_parameters({\"reference\", \"oep\", \"oep_calc\"});\n        if (test) oep->selftest();\n        else if (analyze) oep->analyze();\n        else {\n            reference->value();\n            oep->value();\n        }\n    }\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/periodic_old/CMakeLists.txt",
    "content": "# src/apps/hf\n\nset(HARTREEFOCK_HEADERS \n    dft.h eigsolver.h poperator.h util.h lda.h electronicstructureparams.h)\nset(HARTREEFOCK_SOURCES eigsolver.cc dft.cc)\n\n# Create HartreeFock library\nadd_library(HartreeFock \n    ${HARTREEFOCK_SOURCES} ${HARTREEFOCK_HEADERS})\ntarget_link_libraries(HartreeFock PUBLIC MADchem)\n\n# Create executables\n\nadd_mad_executable(test_hf test_hf.cc HartreeFock)\n\nadd_mad_executable(test_he test_he.cc HartreeFock)\n\nadd_mad_executable(test_be test_be.cc HartreeFock)\n\nadd_mad_executable(test_hydro test_hydro.cc HartreeFock)\n\nadd_mad_executable(test_lattice test_lattice.cc HartreeFock)\n\nadd_mad_executable(test_coulomb test_coulomb.cc HartreeFock)\n\nadd_mad_executable(test_comm test_comm.cc HartreeFock)\n\nadd_mad_executable(testconv testconv.cc HartreeFock)\n\nadd_mad_executable(test_xc test_xc.cc HartreeFock)\n\nadd_mad_executable(esolver solver_driver.cc mentity.cc HartreeFock)\n"
  },
  {
    "path": "src/apps/periodic_old/complexfun.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*\n * complexfun.h\n *\n *  Created on: Jan 28, 2009\n *      Author: eh7\n */\n\n#ifndef COMPLEXFUN_H_\n#define COMPLEXFUN_H_\n\n#include <madness/mra/mra.h>\n\nnamespace madness {\n\n//***************************************************************************\ndouble abs(double x) {return fabs(x);}\n//***************************************************************************\n\n//***************************************************************************\ndouble real(double x) {return x;}\n//***************************************************************************\n\n//***************************************************************************\ndouble imag(double x) {return 0.0;}\n//***************************************************************************\n\n////***************************************************************************\n//double conj(double x) {return 0.0;}\n////***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q>\nTensor< std::complex<Q> > tensor_real2complex(const Tensor<Q>& r)\n{\n  Tensor< std::complex<Q> > c(r.ndim(), r.dims());\n  BINARY_OPTIMIZED_ITERATOR(const Q, r, std::complex<Q>, c, *_p1 = std::complex<Q>(*_p0,0.0););\n  return c;\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q>\nTensor<Q> tensor_xreal(const Tensor< std::complex<Q> >& c)\n{\n  Tensor<Q> r(c.ndim(), c.dims());\n  BINARY_OPTIMIZED_ITERATOR(Q, r, const std::complex<Q>, c, *_p0 = real(*_p1););\n  return r;\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q>\nTensor<Q> tensor_ximag(const Tensor< std::complex<Q> >& c)\n{\n  Tensor<Q> r(c.ndim(), c.dims());\n  BINARY_OPTIMIZED_ITERATOR(Q, r, const std::complex<Q>, c, *_p0 = imag(*_p1););\n  return r;\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q>\nTensor<Q> tensor_abs(const Tensor< std::complex<Q> >& c)\n{\n  Tensor<Q> r(c.ndim(), c.dims());\n  BINARY_OPTIMIZED_ITERATOR(Q, r, const std::complex<Q>, c, *_p0 = abs(*_p1););\n  return r;\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q, int NDIM>\nstruct abs_square_op\n{\n  typedef typename TensorTypeData<Q>::scalar_type resultT;\n  Tensor<resultT> operator()(const Key<NDIM>& key, const Tensor<Q>& t) const\n  {\n    Tensor<resultT> result(t.ndim(), t.dims());\n    BINARY_OPTIMIZED_ITERATOR(const Q, t, resultT, result, resultT d = abs(*_p0); *_p1 = d*d);\n    return result;\n  }\n  template <typename Archive>\n  void serialize(Archive& ar) {}\n};\n//***************************************************************************\n\n//***************************************************************************\ntemplate<typename Q, int NDIM>\nFunction<typename TensorTypeData<Q>::scalar_type,NDIM> abs_square(const Function<Q,NDIM>& func)\n{\n  return unary_op(func, abs_square_op<Q,NDIM>());\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q, int NDIM>\nstruct real_op\n{\n  typedef typename TensorTypeData<Q>::scalar_type resultT;\n  Tensor<resultT> operator()(const Key<NDIM>& key, const Tensor<Q>& t) const\n  {\n    Tensor<resultT> result(t.ndim(), t.dims());\n    BINARY_OPTIMIZED_ITERATOR(const Q, t, resultT, result, *_p1 = real(*_p0););\n    return result;\n  }\n  template <typename Archive>\n  void serialize(Archive& ar) {}\n};\n//***************************************************************************\n\n//***************************************************************************\ntemplate<typename Q, int NDIM>\nFunction<typename TensorTypeData<Q>::scalar_type,NDIM> real(const Function<Q,NDIM>& func)\n{\n  return unary_op_coeffs(func, real_op<Q,NDIM>());\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q, int NDIM>\nstruct imag_op\n{\n  typedef typename TensorTypeData<Q>::scalar_type resultT;\n  Tensor<resultT> operator()(const Key<NDIM>& key, const Tensor<Q>& t) const\n  {\n    Tensor<resultT> result(t.ndim(), t.dims());\n    BINARY_OPTIMIZED_ITERATOR(const Q, t, resultT, result, *_p1 = imag(*_p0););\n    return result;\n  }\n  template <typename Archive>\n  void serialize(Archive& ar) {}\n};\n//***************************************************************************\n\n//***************************************************************************\ntemplate<typename Q, int NDIM>\nFunction<typename TensorTypeData<Q>::scalar_type,NDIM> imag(const Function<Q,NDIM>& func)\n{\n  return unary_op_coeffs(func, imag_op<Q,NDIM>());\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q, int NDIM>\nstruct abs_op\n{\n  typedef typename TensorTypeData<Q>::scalar_type resultT;\n  Tensor<resultT> operator()(const Key<NDIM>& key, const Tensor<Q>& t) const\n  {\n    Tensor<resultT> result(t.ndim(), t.dims());\n    BINARY_OPTIMIZED_ITERATOR(const Q, t, resultT, result, *_p1 = abs(*_p0););\n    return result;\n  }\n  template <typename Archive>\n  void serialize(Archive& ar) {}\n};\n//***************************************************************************\n\n//***************************************************************************\ntemplate<typename Q, int NDIM>\nFunction<typename TensorTypeData<Q>::scalar_type,NDIM> abs(const Function<Q,NDIM>& func)\n{\n  return unary_op_coeffs(func, abs_op<Q,NDIM>());\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q, int NDIM>\nstruct conj_op\n{\n  typedef Q resultT;\n  Tensor<resultT> operator()(const Key<NDIM>& key, const Tensor<Q>& t) const\n  {\n    Tensor<resultT> result(t.ndim(), t.dims());\n    BINARY_OPTIMIZED_ITERATOR(const Q, t, resultT, result, *_p1 = conj(*_p0););\n    return result;\n  }\n  template <typename Archive>\n  void serialize(Archive& ar) {}\n};\n//***************************************************************************\n\n////***************************************************************************\n//template<typename Q, int NDIM>\n//Function<Q,NDIM> conj(const Function<Q,NDIM>& func)\n//{\n//  return unary_op_coeffs(func, conj_op<Q,NDIM>());\n//}\n////***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q, int NDIM>\nstruct function_real2complex_op\n{\n  typedef std::complex<Q> resultT;\n  Tensor<resultT> operator()(const Key<NDIM>& key, const Tensor<Q>& t) const\n  {\n    Tensor<resultT> result(t.ndim(), t.dims());\n    BINARY_OPTIMIZED_ITERATOR(const Q, t, resultT, result, *_p1 = resultT(*_p0,0.0););\n    return result;\n  }\n  template <typename Archive>\n  void serialize(Archive& ar) {}\n};\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename Q, int NDIM>\nFunction<std::complex<Q>,NDIM> function_real2complex(const Function<Q,NDIM>& r)\n{\n  return unary_op_coeffs(r, function_real2complex_op<Q,NDIM>());\n}\n//***************************************************************************\n\n\n////***************************************************************************\n//template <typename Q, int NDIM>\n//bool is_real(const Function<std::complex<Q>,NDIM>& f)\n//{\n//  Function<Q,NDIM> fim = imag(f);\n//  return (fim.norm2() < 1e-8) ? true : false;\n//}\n////***************************************************************************\n//\n////***************************************************************************\n//template <typename Q, int NDIM>\n//bool is_imag(const Function<std::complex<Q>,NDIM>& f)\n//{\n//  Function<Q,NDIM> fre = real(f);\n//  return (fre.norm2() < 1e-8) ? true : false;\n//}\n////***************************************************************************\n\n}\n#endif /* COMPLEXFUN_H_ */\n"
  },
  {
    "path": "src/apps/periodic_old/dft.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include \"dft.h\"\n#include \"util.h\"\n//#include <moldft/xc/f2c.h>\n#include <vector>\n#include \"poperator.h\"\n#include \"libxc.h\"\n\ntypedef madness::Vector<double,3> coordT;\n\nnamespace madness\n{\n  //***************************************************************************\n  template <typename T, int NDIM>\n  DFTNuclearChargeDensityOp<T,NDIM>::DFTNuclearChargeDensityOp(World& world, funcT rhon,\n      double coeff, double thresh, bool periodic) : EigSolverOp<T,NDIM>(world, coeff, thresh)\n  {\n    // Message for the matrix element output\n    this->messageME(\"NuclearChargeDensityOp\");\n    _rhon = rhon;\n    SeparatedConvolution<T,NDIM>* cop;\n    if (periodic)\n    {\n      Tensor<double> L = FunctionDefaults<NDIM>::get_cell_width();\n      cop = PeriodicCoulombOpPtr<T,NDIM>(world, FunctionDefaults<NDIM>::get_k(),\n          1e-8, thresh * 0.1, L);\n    }\n    else\n    {\n      cop =\n        CoulombOperatorPtr<T,NDIM>(world,\n            FunctionDefaults<NDIM>::get_k(), 1e-8, thresh * 0.1);\n    }\n    // Apply operator to get potential\n    _Vnuc = apply(*cop, rhon);\n    delete cop;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  DFTNuclearPotentialOp<T,NDIM>::DFTNuclearPotentialOp(World& world, funcT V,\n      double coeff, double thresh) : EigSolverOp<T,NDIM>(world, coeff, thresh)\n  {\n    // Message for the matrix element output\n    this->messageME(\"NuclearPotentialOp\");\n    _V = copy(V);\n  }\n  //***************************************************************************\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  DFTCoulombOp<T,NDIM>::DFTCoulombOp(World& world, double coeff,\n      double thresh) : EigSolverOp<T,NDIM>(world, coeff, thresh)\n  {\n    // Message for the matrix element output\n    this->messageME(\"CoulombOp\");\n    // For now, no spin polarized\n    _spinpol = false;\n    // Create Coulomb operator\n    _cop = CoulombOperatorPtr<T,NDIM>(world, FunctionDefaults<NDIM>::get_k(),\n        1e-4, thresh);\n    // Initialize potential\n    _Vc = FunctionFactory<T,NDIM>(world);\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  DFTCoulombPeriodicOp<T,NDIM>::DFTCoulombPeriodicOp(World& world, funcT rhon, double coeff,\n      double thresh) : EigSolverOp<T,NDIM>(world, coeff, thresh)\n  {\n    // Nuclear charge density\n    _rhon = rhon;\n    // Message for the matrix element output\n    this->messageME(\"PeriodicCoulombOp\");\n    // For now, no spin polarized\n    _spinpol = false;\n    // Create Coulomb operator\n    Tensor<double> L = FunctionDefaults<NDIM>::get_cell_width();\n    _cop = PeriodicCoulombOpPtr<T,NDIM>(world, FunctionDefaults<NDIM>::get_k(),\n        1e-8, thresh * 0.1, L);\n  }\n  //*************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void DFTCoulombOp<T,NDIM>::prepare_op(Function<double,NDIM> rho)\n  {\n    _Vc = apply(*_cop, rho);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void DFTCoulombPeriodicOp<T,NDIM>::prepare_op(Function<double,NDIM> rho)\n  {\n    _Vc = apply(*_cop, rho + _rhon);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  Function<T,NDIM> DFTNuclearChargeDensityOp<T,NDIM>::op_r(const funcT& rho, const funcT& psi)\n  {\n    funcT rfunc = _Vnuc * psi;\n    return rfunc;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  Function<T,NDIM> DFTNuclearPotentialOp<T,NDIM>::op_r(const funcT& rho, const funcT& psi)\n  {\n    funcT rfunc = _V * psi;\n    return rfunc;\n  }\n  //***************************************************************************\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  Function<T,NDIM> DFTCoulombOp<T,NDIM>::op_r(const funcT& rho, const funcT& psi)\n  {\n    funcT rfunc = _Vc * psi;\n    return  rfunc;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  Function<T,NDIM> DFTCoulombPeriodicOp<T,NDIM>::op_r(const funcT& rho, const funcT& psi)\n  {\n    funcT rfunc = _Vc * psi;\n    return  rfunc;\n  }\n  //*************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  XCFunctionalLDA<T,NDIM>::XCFunctionalLDA(World& world, double coeff, double thresh)\n    : EigSolverOp<T,NDIM>(world, coeff, thresh)\n  {\n    // Message for the matrix element output\n    this->messageME(\"XCFunctionalLDA\");\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  Function<T,NDIM> XCFunctionalLDA<T,NDIM>::op_r(const funcT& rho, const funcT& psi)\n  {\n    Function<T,NDIM> V_rho = copy(rho);\n    V_rho.scale(0.5);\n    V_rho.unaryop(&::libxc_ldaop);\n    funcT rfunc = V_rho * psi;\n    return rfunc;\n  }\n  //***************************************************************************\n}\n\nnamespace madness\n{\n  //***************************************************************************\n  template <typename T, int NDIM>\n  DFT<T,NDIM>::DFT(World& world, funcT vnucrhon, std::vector<funcT> phis,\n      std::vector<double> eigs, ElectronicStructureParams params)\n  : _world(world), _vnucrhon(vnucrhon), _params(params)\n  {\n\n    if (world.rank() == 0 && !params.periodic) printf(\"DFT constructor (non-peridic) ...\\n\\n\");\n    if (world.rank() == 0 && params.periodic) printf(\"DFT constructor (periodic) ...\\n\\n\");\n\n    // Create ops list\n    std::vector<EigSolverOp<T,NDIM>*> ops;\n    // Add nuclear potential to ops list\n//    ops.push_back(new DFTNuclearPotentialOp<T,NDIM>(world, V, 1.0, thresh));\n    if (params.periodic)\n    {\n      ops.push_back(new DFTCoulombPeriodicOp<T,NDIM>(world, vnucrhon, 1.0, params.thresh));\n    }\n    else\n    {\n      if (params.ispotential)\n      {\n        ops.push_back(new DFTNuclearPotentialOp<T,NDIM>(world, vnucrhon, 1.0, params.thresh));\n      }\n      else\n      {\n        ops.push_back(new DFTNuclearChargeDensityOp<T,NDIM>(world, vnucrhon, 1.0, params.thresh, false));\n      }\n      ops.push_back(new DFTCoulombOp<T,NDIM>(world, 1.0, params.thresh));\n    }\n    _xcfunc = new XCFunctionalLDA<T,NDIM>(world, 1.0, params.thresh);\n    ops.push_back(_xcfunc);\n\n    // Create solver\n    if (params.periodic)\n    {\n      std::vector<kvecT> kpoints;\n      kvecT gammap(0.0);\n      kpoints.push_back(gammap);\n      _solver = new EigSolver<T,NDIM>(world, phis, eigs, ops, kpoints, params);\n    }\n    else\n    {\n      _solver = new EigSolver<T,NDIM>(world, phis, eigs, ops, params);\n    }\n    _solver->addObserver(this);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  DFT<T,NDIM>::~DFT()\n  {\n    delete _solver;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void DFT<T,NDIM>::solve(int maxits)\n  {\n    _solver->multi_solve(maxits);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  double DFT<T,NDIM>::calculate_ke_sp(funcT psi, bool periodic)\n  {\n    // Do calculation\n    double kenergy = 0.0;\n    for (int axis = 0; axis < 3; axis++)\n    {\n      funcT dpsi = diff(psi, axis);\n      kenergy += 0.5 * inner(dpsi, dpsi);\n    }\n    return kenergy;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  double DFT<T,NDIM>::calculate_tot_ke_sp(const std::vector<funcT>& phis, bool spinpol,\n      bool periodic)\n  {\n    double tot_ke = 0.0;\n    for (unsigned int pi = 0; pi < phis.size(); pi++)\n    {\n      // Get psi from collection\n      const funcT psi = phis[pi];\n      // Calculate kinetic energy contribution from psi\n      tot_ke += calculate_ke_sp(psi);\n    }\n    if (!spinpol) tot_ke *= 2.0;\n    return tot_ke;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  double DFT<T,NDIM>::calculate_tot_pe_sp(const World& world, const Function<double,NDIM>& rho,\n      const Function<double,NDIM>& vnucrhon, bool spinpol, const double thresh, bool periodic,\n      bool ispotential)\n  {\n    funcT vnuc = copy(vnucrhon);\n    if (!ispotential)\n    {\n      // Create Coulomb operator\n      SeparatedConvolution<T,NDIM>* op = 0;\n      if (periodic)\n      {\n        Tensor<double> L = FunctionDefaults<NDIM>::get_cell_width();\n        op = CoulombOperatorPtr<T,NDIM>(const_cast<World&>(world),\n            FunctionDefaults<NDIM>::get_k(), 1e-8, thresh * 0.1);\n      }\n      else\n      {\n        op = CoulombOperatorPtr<T,NDIM>(const_cast<World&>(world),\n            FunctionDefaults<NDIM>::get_k(), 1e-8, thresh * 0.1);\n      }\n      // Apply Coulomb operator and trace with the density\n      vnuc = apply(*op, vnucrhon);\n      delete op;\n    }\n    double tot_pe = inner(vnuc, rho);\n    return tot_pe;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  double DFT<T,NDIM>::calculate_tot_coulomb_energy(const World& world, const Function<double, NDIM>& rho,\n      bool spinpol, const double thresh, bool periodic)\n  {\n    // Create Coulomb operator\n    SeparatedConvolution<T,NDIM>* op;\n    if (periodic)\n    {\n      Tensor<double> L = FunctionDefaults<NDIM>::get_cell_width();\n      op = PeriodicCoulombOpPtr<T,NDIM>(const_cast<World&>(world),\n        FunctionDefaults<NDIM>::get_k(), 1e-4, thresh, L);\n    }\n    else\n    {\n      op = CoulombOperatorPtr<T,NDIM>(const_cast<World&>(world),\n        FunctionDefaults<NDIM>::get_k(), 1e-4, thresh);\n    }\n    // Apply Coulomb operator and trace with the density\n    funcT Vc = apply(*op, rho);\n\n    double tot_ce = 0.5 * Vc.inner(rho);\n    delete op;\n    return tot_ce;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  double DFT<T,NDIM>::calculate_tot_xc_energy(const Function<double, NDIM>& rho)\n  {\n    funcT enefunc = copy(rho);\n    enefunc.scale(0.5);\n    enefunc.unaryop(&::ldaeop);\n    return enefunc.trace();\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void DFT<T,NDIM>::iterateOutput(const std::vector<funcT>& phis,\n      const std::vector<double>& eigs, const Function<double, NDIM>& rho,\n      const int& iter, bool periodic)\n  {\n    if (iter%3 == 0)\n    {\n      if (world().rank() == 0) printf(\"Calculating energies ...\\n\");\n      if (world().rank() == 0) printf(\"Calculating KE ...\\n\");\n      double ke = DFT::calculate_tot_ke_sp(phis, false, periodic);\n//      if (world().rank() == 0) printf(\"Calculating PE and CE...\\n\");\n      double pe = DFT::calculate_tot_pe_sp(_world, rho, _vnucrhon, _params.spinpol, _params.thresh, _params.periodic, _params.ispotential);\n      if (world().rank() == 0) printf(\"Calculating CE ...\\n\");\n      double ce = DFT::calculate_tot_coulomb_energy(_world, rho, _params.spinpol, _params.thresh, _params.periodic);\n      if (world().rank() == 0) printf(\"Calculating EE ...\\n\");\n      double xce = DFT::calculate_tot_xc_energy(rho);\n      if (world().rank() == 0) printf(\"Calculating NE ...\\n\");\n      double ne = 0.0;\n      if (world().rank() == 0) printf(\"Kinetic energy:\\t\\t\\t\\t %.8f\\n\", ke);\n      if (world().rank() == 0) printf(\"Potential energy:\\t\\t\\t %.8f\\n\", pe);\n      if (world().rank() == 0) printf(\"Coulomb energy:\\t\\t\\t\\t %.8f\\n\", ce);\n      if (world().rank() == 0) printf(\"XC energy:\\t\\t\\t\\t %.8f\\n\", xce);\n      if (world().rank() == 0) printf(\"Total energy:\\t\\t\\t\\t %.8f\\n\", ke + pe + ce + xce + ne);\n      if (world().rank() == 0) printf(\"gs ene\\t\\t\\t\\t\\t%.4f\\n\", eigs[0]);\n      if (world().rank() == 0) printf(\"1st es ene\\t\\t\\t\\t%.4f\\n\", eigs[1]);\n      T mtxe = matrix_element(phis[0], phis[0]);\n      if (world().rank() == 0) printf(\"\\nKS matrix element:\\t\\t\\t%.8f\\n\\n\", mtxe);\n      print_matrix_elements(phis[0], phis[0]);\n    }\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n//  template class DFT<double, 1>;\n//  template class DFT<double, 2>;\n  template class DFT<double, 3>;\n\n\n//  template class DFT< std::complex<double>, 3>;\n  //***************************************************************************\n}\n"
  },
  {
    "path": "src/apps/periodic_old/dft.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#ifndef DFT_H_\n#define DFT_H_\n\n#include <madness/mra/mra.h>\n#include <madness/world/MADworld.h>\n#include <vector>\n\n#include \"eigsolver.h\"\n#include \"electronicstructureparams.h\"\n\nclass ElectronicStructureAppParams;\n\nnamespace madness\n{\n\n////*****************************************************************************\n//void xc_rks_generic_lda(Tensor<double> rho_alpha,           ///< Alpha-spin density at each grid point\n//                        Tensor<double> f,                   ///< Value of functional at each grid point\n//                        Tensor<double> df_drho);            ///< Derivative of functional w.r.t. rho_alpha\n////*****************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class DFTNuclearPotentialOp : public EigSolverOp<T,NDIM>\n  {\n  public:\n    typedef Function<T,NDIM> funcT;\n    //*************************************************************************\n    // Constructor\n    DFTNuclearPotentialOp(World& world, funcT V, double coeff, double thresh);\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there an orbitally-dependent term?\n    virtual bool is_od() {return false;}\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there a density-dependent term?\n    virtual bool is_rd() {return true;}\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual funcT op_r(const funcT& rho, const funcT& psi);\n    //*************************************************************************\n\n  private:\n    //*************************************************************************\n    funcT _V;\n    //*************************************************************************\n  };\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class DFTCoulombOp : public EigSolverOp<T,NDIM>\n  {\n    // Typedef's\n    typedef Function<T,NDIM> funcT;\n  public:\n    //*************************************************************************\n    // Constructor\n    DFTCoulombOp(World& world, double coeff, double thresh);\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there an orbitally-dependent term?\n    virtual bool is_od() {return false;}\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there a density-dependent term?\n    virtual bool is_rd() {return true;}\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual funcT op_r(const funcT& rho, const funcT& psi);\n    //*************************************************************************\n\n    //*************************************************************************\n    // Build the potential from a density if a density-dependent operator.\n    virtual void prepare_op(Function<double,NDIM> rho);\n    //*************************************************************************\n\n    //*************************************************************************\n    SeparatedConvolution<T,NDIM>* _cop;\n    //*************************************************************************\n\n  private:\n    //*************************************************************************\n    funcT _Vc;\n    //*************************************************************************\n\n    //*************************************************************************\n    bool _spinpol;\n    //*************************************************************************\n  };\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class DFTCoulombPeriodicOp : public EigSolverOp<T,NDIM>\n  {\n    // Typedef's\n    typedef Function<T,NDIM> funcT;\n  public:\n    //*************************************************************************\n    // Constructor\n    DFTCoulombPeriodicOp(World& world, funcT rhon, double coeff, double thresh);\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there an orbitally-dependent term?\n    virtual bool is_od() {return false;}\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there a density-dependent term?\n    virtual bool is_rd() {return true;}\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual funcT op_r(const funcT& rho, const funcT& psi);\n    //*************************************************************************\n\n    //*************************************************************************\n    // Build the potential from a density if a density-dependent operator.\n    virtual void prepare_op(Function<double,NDIM> rho);\n    //*************************************************************************\n\n    //*************************************************************************\n    SeparatedConvolution<T,NDIM>* _cop;\n    //*************************************************************************\n\n  private:\n    //*************************************************************************\n    funcT _Vc;\n    //*************************************************************************\n\n    //*************************************************************************\n    bool _spinpol;\n    //*************************************************************************\n\n    //*************************************************************************\n    funcT _rhon;\n    //*************************************************************************\n\n  };\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class XCFunctionalLDA : public EigSolverOp<T,NDIM>\n  {\n    // Typedef's\n    typedef Function<T,NDIM> funcT;\n  public:\n    //*************************************************************************\n    // Constructor\n    XCFunctionalLDA(World& world, double coeff, double thresh);\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there an orbitally-dependent term?\n    virtual bool is_od() {return false;}\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there a density-dependent term?\n    virtual bool is_rd() {return true;}\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual funcT op_r(const funcT& rho, const funcT& psi);\n    //*************************************************************************\n  };\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class DFTNuclearChargeDensityOp : public EigSolverOp<T,NDIM>\n  {\n  public:\n    typedef Function<T,NDIM> funcT;\n    //*************************************************************************\n    // Constructor\n    DFTNuclearChargeDensityOp(World& world, funcT rhon, double coeff,\n        double thresh, bool periodic);\n    //*************************************************************************\n\n    //*************************************************************************\n    ~DFTNuclearChargeDensityOp()\n    {\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there an orbitally-dependent term?\n    virtual bool is_od() {return false;}\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there a density-dependent term?\n    virtual bool is_rd() {return true;}\n    //*************************************************************************\n\n    //*************************************************************************\n    void prepare_op(Function<double,NDIM> rho) {}\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual funcT op_r(const funcT& rho, const funcT& psi);\n    //*************************************************************************\n\n  private:\n    //*************************************************************************\n    funcT _rhon;\n    //*************************************************************************\n\n    //*************************************************************************\n    funcT _Vnuc;\n    //*************************************************************************\n  };\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class DFT : public IEigSolverObserver<T,NDIM>\n  {\n    // Typedef's\n    typedef Function<T,NDIM> funcT;\n    typedef Vector<double,NDIM> kvecT;\n  public:\n    //*************************************************************************\n    // Constructor\n    DFT(World& world, funcT vnucrhon, std::vector<funcT> phis,\n      std::vector<double> eigs, ElectronicStructureParams params);\n    //*************************************************************************\n\n  \t//*************************************************************************\n    DFT();\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual ~DFT();\n    //*************************************************************************\n\n    //*************************************************************************\n     void solve(int maxits);\n     //*************************************************************************\n\n     //***************************************************************************\n     static double calculate_ke_sp(funcT psi, bool periodic = false);\n     //***************************************************************************\n\n     //***************************************************************************\n     static double calculate_tot_ke_sp(const std::vector<funcT>& phis,\n         bool spinpol, bool periodic = false);\n     //***************************************************************************\n\n     //***************************************************************************\n     static double calculate_tot_pe_sp(const World& world,\n         const Function<double,NDIM>& rho, const Function<double,NDIM>& vnucrhon,\n         bool spinpol, const double thresh, bool periodic, bool ispotential);\n     //***************************************************************************\n\n     //***************************************************************************\n     static double calculate_tot_coulomb_energy(const World& world,\n         const Function<double,NDIM>& rho, bool spinpol, const double thresh,\n         bool periodic = false);\n     //***************************************************************************\n\n     //***************************************************************************\n     static double calculate_tot_xc_energy(const Function<double,NDIM>& rho);\n     //***************************************************************************\n\n     //*************************************************************************\n     T matrix_element(const funcT& phii, const funcT& phij)\n     {\n       return _solver->matrix_element(phii, phij);\n     }\n     //*************************************************************************\n\n     //*************************************************************************\n     void print_matrix_elements(const funcT& phii, const funcT& phij)\n     {\n       _solver->print_matrix_elements(phii, phij);\n     }\n     //*************************************************************************\n\n     //*************************************************************************\n     virtual void iterateOutput(const std::vector<funcT>& phis,\n         const std::vector<double>& eigs, const Function<double,NDIM>& rho,\n         const int& iter, bool periodic = false);\n     //*************************************************************************\n\n     //*************************************************************************\n     double get_eig(int indx)\n     {\n       return _solver->get_eig(indx);\n     }\n     //*************************************************************************\n\n     //*************************************************************************\n     funcT get_phi(int indx)\n     {\n       return _solver->get_phi(indx);\n     }\n     //*************************************************************************\n\n     //*************************************************************************\n     const std::vector<double>& eigs()\n     {\n       return _solver->eigs();\n     }\n     //*************************************************************************\n\n     //*************************************************************************\n     const std::vector<funcT>& phis()\n     {\n       return _solver->phis();\n     }\n     //*************************************************************************\n\n  private:\n\n      //*************************************************************************\n      // Eigenvalue solver\n      EigSolver<T,NDIM>* _solver;\n      //*************************************************************************\n\n      //*************************************************************************\n      World& _world;\n      //*************************************************************************\n\n      //*************************************************************************\n      // This variable could either be a nuclear potiential or a nuclear charge\n      // density depending on the \"ispotential\" variable in the\n      // ElectronicStructureParams class.\n      Function<double,NDIM> _vnucrhon;\n      //*************************************************************************\n\n      //*************************************************************************\n      // Exchange-correlation functional. Needed to compute the energy Exc[rho]\n      // Gets deleted my the EigSolver class during the EigSolver destructor\n      EigSolverOp<T,NDIM>* _xcfunc;\n      //*************************************************************************\n\n      //*************************************************************************\n      ElectronicStructureParams _params;\n      //*************************************************************************\n\n      //*************************************************************************\n      World& world() {return _world;}\n      //*************************************************************************\n\n  };\n  //***************************************************************************\n\n}\n#endif /*DFT_H_*/\n"
  },
  {
    "path": "src/apps/periodic_old/eigsolver.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include \"eigsolver.h\"\n#include \"util.h\"\n#include \"poperator.h\"\n#include \"outputwriter.h\"\n#include <madness/mra/operator.h>\n\n//#define DEBUG_STREAM *(OutputWriter::instance()->debug_stream())\n//#define LOG_STREAM *(OutputWriter::instance()->log_stream())\n//#define EIGV_STREAM *(OutputWriter::instance()->eigv_stream())\n\n#define DEBUG_STREAM cout\n#define LOG_STREAM cout\n#define EIGV_STREAM cout\n\nusing std::cout;\nusing std::endl;\n\nnamespace madness\n{\n  //***************************************************************************\n  template <typename T, int NDIM>\n  EigSolver<T,NDIM>::EigSolver(World& world, std::vector<funcT> phis,\n      std::vector<double> eigs, std::vector< EigSolverOp<T,NDIM>* > ops,\n      std::vector<kvecT> kpoints, ElectronicStructureParams params)\n  : _phis(phis), _eigs(eigs), _ops(ops), _kpoints(kpoints),\n    _world(world), _params(params)\n  {\n    // fill the occupation numbers\n    int size = eigs.size();\n    for (int i = 0; i < size; i++) _occs.push_back(2.0);\n    _rho = EigSolver::compute_rho(phis, _occs, world);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  EigSolver<T,NDIM>::EigSolver(World& world, std::vector<funcT> phis,\n      std::vector<double> eigs, std::vector< EigSolverOp<T,NDIM>* > ops,\n      ElectronicStructureParams params)\n  : _phis(phis), _eigs(eigs), _ops(ops), _world(world), _params(params)\n  {\n    if (params.periodic)\n    {\n      kvecT gammap(0.0); _kpoints.push_back(gammap);\n    }\n    // fill the occupation numbers\n    int size = eigs.size();\n    for (int i = 0; i < size; i++)  _occs.push_back(2.0);\n    _rho = EigSolver::compute_rho(phis, _occs, world);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  EigSolver<T,NDIM>::~EigSolver()\n  {\n    // Eigsolver is responsible for deleting the ops\n    for (typename std::vector< EigSolverOp<T,NDIM>* >::iterator it = _ops.begin(); it != _ops.end();\n      it++) delete (*it);\n    _ops.clear();\n    // Clear eigenvectors\n    _phis.clear();\n    // Clear eigenvalues\n    _eigs.clear();\n    // Clear observers\n//    for (typename std::vector< IEigSolverObserver<T,NDIM>* >::iterator it = _obs.begin();\n//      it != _obs.end(); it++) delete (*it);\n    _obs.clear();\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  Function<T, NDIM> EigSolver<T,NDIM>::compute_rho(typename std::vector<funcT> phis,\n      std::vector<double> occs, const World& world)\n  {\n    // Electron density\n    funcT rho = FunctionFactory<double,NDIM>(const_cast<World&>(world));\n    // Loop over all wavefunctions to compute density\n    for (unsigned int j = 0; j < phis.size(); j++)\n    {\n      // Get phi(j) from iterator\n      const funcT& phij = phis[j];\n      // Compute the j-th density\n      funcT prod = square(phij);\n      rho += occs[j]*prod;\n    }\n    rho.truncate();\n    return rho;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void EigSolver<T,NDIM>::prepare_ops()\n  {\n    // Loop through all of the density-dependent ops and prepare them, i.e.\n    // build the rho-dependent potentials.\n    for (unsigned int oi = 0; oi < _ops.size(); oi++)\n    {\n      EigSolverOp<T,NDIM>* op = _ops[oi];\n      // Prepare density-dependent operator\n      if (op->is_rd()) op->prepare_op(_rho);\n    }\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  T EigSolver<T,NDIM>::matrix_element(const funcT& phii, const funcT& phij)\n  {\n    double value = 0.0;\n    // Kinetic energy operator\n    for (int axis = 0; axis < NDIM; axis++)\n    {\n      funcT dpsi_j = diff(phij, axis);\n      funcT dpsi_i = diff(phii, axis);\n      value += 0.5 * inner(dpsi_i, dpsi_j);\n    }\n    // Loop through all ops\n    for (unsigned int oi = 0; oi < _ops.size(); oi++)\n    {\n      EigSolverOp<T,NDIM>* op = _ops[oi];\n      // Operate with density-dependent operator\n      if (op->is_rd()) value += op->coeff() * phii.inner(op->op_r(_rho, phij));\n      // Operate with orbital-dependent operator\n      if (op->is_od()) value += op->coeff() * phii.inner(op->op_o(_phis, phij));\n    }\n    return value;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void EigSolver<T,NDIM>::update_occupation()\n  {\n//    // Find max/min eigenvalues\n//    double emax = -1.0e12;\n//    double emin = 1.0e12;\n//    for (int i = 0; i < _eigs.size(); i++)\n//    {\n//      emax = (_eigs[i] > emax) ? _eigs[i] : emax;\n//      emin = (_eigs[i] < emin) ? _eigs[i] : emin;\n//    }\n//\n//    int maxits = 100;\n//    // This is hardcoded to 2.0 (non-spinpolarized case) for now.\n//    double occmax = 2.0;\n//    // Fermi energy\n//    double efermi = 0.0;\n//    // Use bisection method to find the fermi energy and update occupation numbers\n//    bool bstop = false;\n//    for (int it = 0; (it < maxits)&&(!bstop); it++)\n//    {\n//      // Proposed fermi energy\n//      double efermi = 0.5 * (emax + emin);\n//      // Accumulated charge\n//      double charge = 0.0;\n//      // Some smoothing parameter\n//      double t1 = 0.1;\n//      // Loop over all orbitals and count the charge\n//      for (int i = 0; i < _phis.size(); i++)\n//      {\n//        double x = (efermi-_eigs[i]) * t1;\n//        // need to add some smearing function here\n//        _occs[i] = occmax;\n//        //charge += _kpoints[i].weight() * _occs[i];\n//      }\n//      if (fabs(emax-emin) < 1e-5)\n//        bstop = true;\n//      else if (charge < _ncharge)\n//        emin = efermi;\n//      else\n//        emax = efermi;\n//    }\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void EigSolver<T,NDIM>::make_bsh_operators()\n  {\n    // Clear BSH vector\n    _bops.clear();\n    // Get defaults\n    int k = FunctionDefaults<NDIM>::get_k();\n    double tol = FunctionDefaults<NDIM>::get_thresh();\n    // Loop through eigenvalues, adding a BSH operator to _bops\n    // for each eigenvalue\n    int sz = _phis.size();\n    for (int i = 0; i < sz; i++)\n    {\n        double eps = _eigs[i];\n        if (eps > 0)\n        {\n            if (_world.rank() == 0)\n            {\n                DEBUG_STREAM << \"bsh: warning: positive eigenvalue\" << i << eps << endl;\n            }\n            eps = -0.1;\n        }\n        _bops.push_back(poperatorT(BSHOperatorPtr3D<double,NDIM>(_world, sqrt(-2.0*eps), k, 1e-4, tol)));\n    }\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void EigSolver<T,NDIM>::print_matrix_elements(const funcT& phii, const funcT& phij)\n  {\n    T value = 0.0;\n    prepare_ops();\n    // Kinetic energy operator\n    for (int axis = 0; axis < 3; axis++)\n    {\n      funcT dpsi_j = diff(phij, axis);\n      funcT dpsi_i = diff(phii, axis);\n      value += 0.5 * inner(dpsi_i, dpsi_j);\n    }\n    if (_world.rank() == 0)\n    {\n      DEBUG_STREAM << \"***** Evaluation of matrix elements *****\" << endl;\n      DEBUG_STREAM << \"KineticEnergyOp:\\t\\t\\t\" << value << endl;\n    }\n\n    // Loop through all ops\n    for (unsigned int oi = 0; oi < _ops.size(); oi++)\n    {\n      value = 0.0;\n      EigSolverOp<T,NDIM>* op = _ops[oi];\n      // Operate with density-dependent operator\n      if (op->is_rd()) value += op->coeff() * phii.inner(op->op_r(_rho, phij));\n      // Operate with orbital-dependent operator\n      if (op->is_od()) value += op->coeff() * phii.inner(op->op_o(_phis, phij));\n      if (_world.rank() == 0)\n      {\n        DEBUG_STREAM << op->messsageME() << \":\\t\\t\\t\" << value << endl;\n      }\n    }\n    if (_world.rank() == 0) printf(\"\\n\\n\");\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void EigSolver<T,NDIM>::solve(int maxits)\n  {\n\tstd::cout.setf(std::ios::fixed,std::ios::floatfield);\n\tstd::cout.precision(8);\n  double thresh = FunctionDefaults<NDIM>::get_thresh();\n\tfor (int it = 0; it < maxits; it++)\n    {\n      // Since, the density has already been computed (it's fresh outta the\n      // oven), go ahead and build all of the density-dependent potentials that\n      // we can.\n      prepare_ops();\n      if (_world.rank() == 0) DEBUG_STREAM << \"Iteration #\" << it\n        << endl << endl;\n      for (unsigned int pi = 0; pi < _phis.size(); pi++)\n      {\n        // Get psi from collection\n        funcT psi = _phis[pi];\n        funcT pfunc = FunctionFactory<T,NDIM>(_world);\n        // Loop through all ops\n        if (_world.rank() == 0) DEBUG_STREAM << \"Looping through the ops ...\"\n          << endl << endl;\n        for (unsigned int oi = 0; oi < _ops.size(); oi++)\n        {\n          EigSolverOp<T,NDIM>* op = _ops[oi];\n          // Operate with density-dependent operator\n          if (op->is_rd()) pfunc += op->coeff() * op->op_r(_rho, psi);\n          // Operate with orbital-dependent operator\n          if (op->is_od()) pfunc += op->coeff() * op->op_o(_phis, psi);\n        }\n        if (_world.rank() == 0) DEBUG_STREAM << \"Creating BSH operator ...\"\n          << endl << endl;\n        SeparatedConvolution<T,NDIM>* op = 0;\n        if (_params.periodic)\n        {\n          // Subtract the k dot nabla part\n          kvecT k = _kpoints[pi];\n          pfunc -= k[0] * diff(psi, 0);\n          pfunc -= k[1] * diff(psi, 1);\n          pfunc -= k[2] * diff(psi, 2);\n          pfunc.scale(-2.0).truncate();\n          Tensor<double> L = FunctionDefaults<NDIM>::get_cell_width();\n          op = PeriodicBSHOpPtr<T,NDIM>(_world, sqrt(-2.0*_eigs[pi]),\n              FunctionDefaults<NDIM>::get_k(), 1e-4, thresh, L);\n        }\n        else\n        {\n          pfunc.scale(-2.0).truncate();\n          op = BSHOperatorPtr3D<T>(_world, sqrt(-2.0*_eigs[pi]),\n                                   FunctionDefaults<NDIM>::get_k(), 1e-4, thresh);\n        }\n        // Apply the Green's function operator (stubbed)\n        if (_world.rank() == 0) DEBUG_STREAM << \"Applying BSH operator ...\"\n          << endl << endl;\n        pfunc.truncate();\n        funcT tmp = apply(*op, pfunc);\n        tmp.truncate();\n        // delete op\n        delete op;\n        // (Not sure whether we have to do this mask thing or not!)\n        // WSTHORNTON DEBUG\n        double ttnorm = tmp.norm2();\n        if (_world.rank() == 0) DEBUG_STREAM << \"pi = \" << pi\n          << \"\\tttnorm = \" << ttnorm << endl << endl;\n        if (_world.rank() == 0) DEBUG_STREAM << \"Gram-Schmidt ...\"\n          << endl << endl;\n        for (unsigned int pj = 0; pj < pi; ++pj)\n        {\n//          // Make sure that pi != pj\n//          MADNESS_ASSERT(pi != pj);\n          // Project out the lower states\n          // Get other wavefunction\n          funcT psij = _phis[pj];\n          double overlap = inner(tmp, psij);\n          tmp -= overlap*psij;\n        }\n        // WSTHORNTON DEBUG\n        double tttnorm = tmp.norm2();\n        if (_world.rank() == 0) DEBUG_STREAM << \"pi = \" << pi << \"ttnorm = \"\n          << tttnorm << endl;\n        // Update e\n        if (_world.rank() == 0) DEBUG_STREAM << \"Updating e ...\"\n          << endl << endl;\n        funcT r = tmp - psi;\n        double tnorm = tmp.norm2();\n        double eps_old = _eigs[pi];\n        double ecorrection = -0.5*inner(pfunc, r) / (tnorm*tnorm);\n        double eps_new = eps_old + ecorrection;\n        double rnorm = r.norm2();\n        if (_world.rank() == 0) DEBUG_STREAM << \"pi = \" << pi\n          << \"rnorm = \" << rnorm << endl << endl;\n        if (_world.rank() == 0) EIGV_STREAM <<  \"pi = \" << pi\n          << \" enew = \" << eps_new << \" eps_old = \" << eps_old << endl;\n        // Sometimes eps_new can go positive, THIS WILL CAUSE THE ALGORITHM TO CRASH. So,\n        // I bounce the new eigenvalue back into the negative side of the real axis. I\n        // keep doing this until it's good or I've already done it 10 times.\n        // WSTHORNTON DEBUG\n//        double rnorm = r.norm2();\n//        if (_world.rank() == 0) printf(\"pi = %d\\trnorm = %.5f\\ttnorm = %.5f\\n\\n\", pi, rnorm, tnorm);\n        int counter = 0;\n        while (eps_new >= 0.0 && counter < 10)\n        {\n          // Split the difference between the new and old estimates of the\n          // pi-th eigenvalue.\n          eps_new = eps_old + 0.5*(eps_new - eps_old);\n          counter++;\n        }\n        // Still no go, forget about it. (1$ to Donnie Brasco)\n        if (eps_new >= 0.0)\n        {\n          LOG_STREAM << \"FAILURE OF WST: exiting!!\\n\" << endl;\n          _exit(0);\n        }\n        // Update the eigenvalue estimates and wavefunctions.\n        tmp.truncate();\n        _eigs[pi] = eps_new;\n        _phis[pi] = tmp.scale(1.0/tmp.norm2());\n      }\n      // Update rho\n//      if (_world.rank() == 0) printf(\"Computing new density for it == #%d\\n\\n\", it);\n      _rho = EigSolver::compute_rho(_phis, _occs, _world);\n      // Trace of rho\n      double rhotrace = _rho.trace();\n      // Output to observables\n      for (typename std::vector<IEigSolverObserver<T,NDIM>*>::iterator itr = _obs.begin(); itr\n        != _obs.end(); ++itr)\n      {\n        (*itr)->iterateOutput(_phis, _eigs, _rho, it, _params.periodic);\n      }\n    }\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void EigSolver<T,NDIM>::multi_solve(int maxits)\n  {\n    for (int it = 0; it < maxits; it++)\n    {\n      // Since, the density has already been computed (it's fresh outta the\n      // oven), go ahead and build all of the density-dependent potentials that\n      // we can.\n      prepare_ops();\n      if (_world.rank() == 0) printf(\"Iteration #%d\\n\\n\", it);\n      // Create empty functions for calculations\n      std::vector<funcT> pfuncs(_phis.size());\n      for (unsigned int pi = 0; pi < _phis.size(); pi++)\n        pfuncs[pi] = FunctionFactory<T, NDIM>(_world);\n      // Loop through all ops to work on a vector of functions\n      if (_world.rank() == 0) printf(\"Looping through the ops ...\\n\\n\");\n      for (unsigned int oi = 0; oi < _ops.size(); oi++)\n      {\n        EigSolverOp<T,NDIM>* op = _ops[oi];\n        // Operate with density-dependent operator\n        if (op->is_rd()) gaxpy(_world, 1.0, pfuncs, op->coeff(), op->multi_op_r(_rho, _phis));\n        // Operate with orbital-dependent operator\n        if (op->is_od()) gaxpy(_world, 1.0, pfuncs, op->coeff(), op->multi_op_o(_phis));\n      }\n      // Make BSH operators\n      if (_world.rank() == 0) printf(\"Creating BSH operator ...\\n\\n\");\n      make_bsh_operators();\n      // Apply the Green's function operator (stubbed)\n      if (_world.rank() == 0) printf(\"Applying BSH operator ...\\n\\n\");\n      std::vector<double> sfactor(pfuncs.size());\n      for (unsigned int si = 0; si < sfactor.size(); si++) sfactor[si] = -2.0;\n      scale(_world, pfuncs, sfactor);\n      std::vector<funcT> tmp = apply(_world, _bops, pfuncs);\n      // WSTHORNTON DEBUG\n      for (unsigned int ti = 0; ti < tmp.size(); ti++)\n      {\n        double ttnorm = tmp[ti].norm2();\n        if (_world.rank() == 0) printf(\"ti = %d\\tttnorm = %.5f\\n\\n\", ti, ttnorm);\n      }\n      // Do Gram-Schmidt\n      if (_world.rank() == 0) printf(\"Gram-Schmidt ...\\n\\n\");\n      for (unsigned int ti = 0; ti < tmp.size(); ++ti)\n      {\n        // Project out the lower states\n        for (unsigned int pj = 0; pj < ti; ++pj)\n        {\n          double overlap = inner(tmp[ti], _phis[pj]);\n          tmp[ti] -= overlap*_phis[pj];\n        }\n      }\n      _world.gop.fence();\n      // WSTHORNTON DEBUG\n      for (unsigned int ti = 0; ti < tmp.size(); ti++)\n      {\n        double ttnorm = tmp[ti].norm2();\n        if (_world.rank() == 0) printf(\"ti = %d\\tttnorm = %.5f\\n\\n\", ti, ttnorm);\n      }\n      // Update e\n      if (_world.rank() == 0) printf(\"Updating e ...\\n\\n\");\n      for (unsigned int ei = 0; ei < _eigs.size(); ei++)\n      {\n        funcT r = tmp[ei] - _phis[ei];\n        double tnorm = tmp[ei].norm2();\n        double rnorm = r.norm2();\n        if (_world.rank() == 0) printf(\"ei = %d\\trnorm = %.5f\\ttnorm = %.5f\\n\\n\", ei, rnorm, tnorm);\n        // Compute correction to the eigenvalues\n        double ecorrection = -0.5*inner(pfuncs[ei], r) / (tnorm*tnorm);\n        double eps_old = _eigs[ei];\n        double eps_new = eps_old + ecorrection;\n        // Sometimes eps_new can go positive, THIS WILL CAUSE THE ALGORITHM TO CRASH. So,\n        // I bounce the new eigenvalue back into the negative side of the real axis. I\n        // keep doing this until it's good or I've already done it 10 times.\n        int counter = 10;\n        while (eps_new >= 0.0 && counter < 20)\n        {\n          // Split the difference between the new and old estimates of the\n          // pi-th eigenvalue.\n//          if (_world.rank() == 0) EIGV_STREAM  << \"ei = %d\\teps_new = %.5f\\teps_old = %.5f\\n\\n\"\n//            << ei << eps_new, eps_old);\n          eps_new = eps_old + 0.5*(eps_new - eps_old);\n          counter++;\n        }\n        // Still no go, forget about it. (1$ to Donnie Brasco)\n        if (eps_new >= 0.0)\n        {\n          if (_world.rank() == 0) printf(\"FAILURE OF WST: exiting!!\\n\\n\");\n          _exit(0);\n        }\n        // Set new eigenvalue\n        _eigs[ei] = eps_new;\n        if (_world.rank() == 0) printf(\"ei = %d\\teps = %.5f\\n\\n\", ei, eps_new);\n      }\n      // Update the eigenvalue estimates and wavefunctions.\n      truncate(_world, tmp);\n      for (unsigned int ti = 0; ti < tmp.size(); ti++)\n      {\n        _phis[ti] = tmp[ti].scale(1.0/tmp[ti].norm2());\n      }\n      // Update rho\n      if (_world.rank() == 0) printf(\"Computing new density for it == #%d\\n\\n\", it);\n      _rho = EigSolver::compute_rho(_phis, _occs, _world);\n      // Output to observables\n      for (typename std::vector<IEigSolverObserver<T,NDIM>*>::iterator itr = _obs.begin(); itr\n        != _obs.end(); ++itr)\n      {\n        (*itr)->iterateOutput(_phis, _eigs, _rho, it, _params.periodic);\n      }\n    }\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template class EigSolver<double,1>;\n  template class EigSolver<double,2>;\n  template class EigSolver<double,3>;\n  //***************************************************************************\n}\n\n\n"
  },
  {
    "path": "src/apps/periodic_old/eigsolver.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef EIGSOLVER_H_\n#define EIGSOLVER_H_\n#include <madness/mra/mra.h>\n#include <madness/world/MADworld.h>\n#include <vector>\n#include \"electronicstructureparams.h\"\n\nnamespace madness\n{\n//***************************************************************************\n/// This is the interface the an observer wishing to receive output must\n/// implement. This call back gives the current eigenfunctions, eigenvalues,\n/// and the density.\n/// This is a test LaTeX formula\n/// The Pythagorean theorem is\n/// \\f[\n/// c^2 = a^2 + b^2\n/// \\f]\ntemplate <typename T, int NDIM>\nclass IEigSolverObserver\n{\n  typedef Function<T,NDIM> funcT;\npublic:\n  virtual void iterateOutput(const std::vector<funcT>& phis,\n      const std::vector<double>& eigs, const Function<double, NDIM>& rho, const int& iter, bool periodic) = 0;\n\n  virtual ~IEigSolverObserver() {};\n};\n//***************************************************************************\n\nclass KPoint\n{\npublic:\n  KPoint(double kx, double ky, double kz, double weight)\n  {\n    _kx = kx; _ky = ky; _kz = kz;\n    _weight = weight;\n  }\n\n  //*************************************************************************\n  double kx() {return _kx;}\n  double ky() {return _ky;}\n  double kz() {return _kz;}\n  //*************************************************************************\n\n  //*************************************************************************\n  double weight() {return _weight;}\n  //*************************************************************************\n\nprivate:\n  //*************************************************************************\n  // the actual k-point\n  double _kx;\n  double _ky;\n  double _kz;\n  //*************************************************************************\n\n  //*************************************************************************\n  // weight\n  double _weight;\n  //*************************************************************************\n\n};\n\n//***************************************************************************\ntemplate <typename T, int NDIM>\nclass EigSolverOp\n{\n  // Typedef's\n  typedef Function<T,NDIM> funcT;\npublic:\n  //*************************************************************************\n  // Constructor\n  EigSolverOp(World& world, double coeff, double thresh)\n    :  _world(world), _coeff(coeff), _thresh(thresh) {}\n  //*************************************************************************\n\n  //*************************************************************************\n  // Destructor\n  virtual ~EigSolverOp() {}\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Is there an orbitally-dependent term?\n  virtual bool is_od() = 0;\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Is there a density-dependent term?\n  virtual bool is_rd() = 0;\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Build the potential from a density if a density-dependent operator.\n  virtual void prepare_op(funcT rho) {}\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Orbital-dependent portion of operator\n  virtual funcT op_o(const std::vector<funcT>& phis, const funcT& psi)\n  {\n    funcT func = FunctionFactory<T,NDIM>(_world);\n    return func;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Density-dependent portion of operator\n  virtual funcT op_r(const funcT& rho, const funcT& psi)\n  {\n    funcT func = FunctionFactory<T,NDIM>(_world);\n    return func;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Orbital-dependent portion of operator\n  virtual std::vector<funcT> multi_op_o(const std::vector<funcT>& phis)\n  {\n    // Collection of empty functions\n    std::vector<funcT> newphis(phis.size(), FunctionFactory<T,NDIM>(_world));\n    for (unsigned int pi = 0; pi < phis.size(); pi++)\n    {\n      newphis[pi] = op_o(phis, phis[pi]);\n    }\n    _world.gop.fence();\n    return newphis;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Density-dependent portion of operator\n  virtual std::vector<funcT> multi_op_r(const funcT& rho, const std::vector<funcT>& phis)\n  {\n    std::vector<funcT> newphis(phis.size(), FunctionFactory<T,NDIM>(_world));\n    for (unsigned int pi = 0; pi < phis.size(); pi++)\n    {\n      newphis[pi] = op_r(rho, phis[pi]);\n    }\n    _world.gop.fence();\n    return newphis;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  double coeff() {return _coeff;}\n  //*************************************************************************\n\n  //*************************************************************************\n  std::string messsageME()\n  {\n    return _messageME;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  World& _world;\n  //*************************************************************************\n\nprotected:\n  //*************************************************************************\n  double thresh() {return _thresh;}\n  //*************************************************************************\n\n  //*************************************************************************\n  void messageME(std::string messageME)\n  {\n    _messageME = messageME;\n  }\n  //*************************************************************************\n\nprivate:\n  //*************************************************************************\n  double _coeff;\n  //*************************************************************************\n\n  //*************************************************************************\n  double _thresh;\n  //*************************************************************************\n\n  //*************************************************************************\n  std::string _messageME;\n  //*************************************************************************\n\n};\n//***************************************************************************\n\n//***************************************************************************\n/// The EigSolver class is the class that is the workhorse of both the Hartree\n/// Fock and the DFT algorithms. This class relies on the wrapper class to\n/// give it a list of operators to implement as its potential. This should\n/// allow for much more reuse.\ntemplate <typename T, int NDIM>\nclass EigSolver\n{\npublic:\n  //*************************************************************************\n  // Typedef's\n  typedef Function<T,NDIM> funcT;\n//  typedef KPoint<NDIM> kvecT;\n  typedef Vector<double,NDIM> kvecT;\n  typedef SeparatedConvolution<double,NDIM> operatorT;\n  typedef std::shared_ptr<operatorT> poperatorT;\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Constructor for periodic system\n  EigSolver(World& world, std::vector<funcT> phis, std::vector<double> eigs,\n      std::vector<EigSolverOp<T,NDIM>*> ops, std::vector<kvecT> kpoints,\n      ElectronicStructureParams params);\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Constructor for non-periodic system\n  EigSolver(World& world, std::vector<funcT> phis, std::vector<double> eigs,\n      std::vector<EigSolverOp<T,NDIM>*> ops, ElectronicStructureParams params);\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Destructor\n  virtual ~EigSolver();\n  //*************************************************************************\n\n  //*************************************************************************\n  /// This solver has not been optimized for usage in parallel. This solver\n  /// processes each eigenfunction in a serial fashion.\n  void solve(int maxits);\n  //*************************************************************************\n\n  //*************************************************************************\n  /// This solver has been optimized for usage in parallel. This solver\n  /// processes each eigenfunction in a parallel fashion.\n  void multi_solve(int maxits);\n  //*************************************************************************\n\n  //*************************************************************************\n  double get_eig(int indx)\n  {\n    return _eigs[indx];\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  funcT get_phi(int indx)\n  {\n    return _phis[indx];\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  const std::vector<funcT>& phis()\n  {\n    return _phis;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  const std::vector<double>& eigs()\n  {\n    return _eigs;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  void addObserver(IEigSolverObserver<T,NDIM>* obs)\n  {\n    _obs.push_back(obs);\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Computes a matrix element given the left and right functions.\n  T matrix_element(const funcT& phii, const funcT& phij);\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Prints a matrix element given the left and right functions.\n  void print_matrix_elements(const funcT& phii, const funcT& phij);\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Preprocesses the operators for doing an iteration of \"eigensolving\".\n  void prepare_ops();\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Makes the BSH Green's functions for the parallel solver (multi_solve()).\n  void make_bsh_operators();\n  //*************************************************************************\n\n  //*************************************************************************\n  void update_occupation();\n  //*************************************************************************\n\n  //*************************************************************************\n  /// Computes the electronic density\n  static funcT compute_rho(std::vector<funcT> phis, std::vector<double> occs,\n      const World& world);\n  //*************************************************************************\n\nprivate:\n  //*************************************************************************\n  /// List of the functions\n  std::vector<funcT> _phis;\n  //*************************************************************************\n\n  //*************************************************************************\n  /// List of the eigenvalues\n  std::vector<double> _eigs;\n  //*************************************************************************\n\n  //*************************************************************************\n  /// List of the ops\n  std::vector< EigSolverOp<T,NDIM>* > _ops;\n  //*************************************************************************\n\n  //*************************************************************************\n  /// List of the ops\n  std::vector<kvecT> _kpoints;\n  //*************************************************************************\n\n  //*************************************************************************\n  World& _world;\n  //*************************************************************************\n\n  //*************************************************************************\n  // List of the obs\n  std::vector<IEigSolverObserver<T,NDIM>*> _obs;\n  //*************************************************************************\n\n  // Electronic charge density\n  //*************************************************************************\n  Function<double,NDIM> _rho;\n  //*************************************************************************\n\n  //*************************************************************************\n  // List of the ops\n  std::vector<poperatorT> _bops;\n  //*************************************************************************\n\n  //*************************************************************************\n  // List of the occupation numbers\n  std::vector<double> _occs;\n  //*************************************************************************\n\n  //*************************************************************************\n  ElectronicStructureParams _params;\n  //*************************************************************************\n\n};\n//***************************************************************************\n\n}\n\n#endif /*EIGSOLVER_H_*/\n\n"
  },
  {
    "path": "src/apps/periodic_old/electronicstructureapp.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n/*\n * electronicstructureapp.h\n *\n *  Created on: Nov 5, 2008\n *      Author: eh7\n */\n\n#ifndef ELECTRONICSTRUCTUREAPP_H_\n#define ELECTRONICSTRUCTUREAPP_H_\n\n#include <madness/mra/mra.h>\n#include <madness/misc/ran.h>\n#include \"electronicstructureparams.h\"\n//#include \"poperator.h\"\n#include \"libxc.h\"\n#include \"complexfun.h\"\n#include \"esolver.h\"\n\nclass LevelPmap : public WorldDCPmapInterface< Key<3> > {\nprivate:\n    const int nproc;\npublic:\n    LevelPmap() : nproc(0) {};\n\n    LevelPmap(World& world) : nproc(world.nproc()) {}\n\n    /// Find the owner of a given key\n    ProcessID owner(const Key<3>& key) const {\n        Level n = key.level();\n        if (n == 0) return 0;\n        hashT hash;\n        if (n <= 3 || (n&0x1)) hash = key.hash();\n        else hash = key.parent().hash();\n        //hashT hash = key.hash();\n        return hash%nproc;\n    }\n};\n\nclass MolecularPotentialFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    const MolecularEntity& _mentity;\npublic:\n    MolecularPotentialFunctor(const MolecularEntity& mentity)\n        : _mentity(mentity)\n    {}\n\n    double operator()(const coordT& x) const\n    {\n      return _mentity.nuclear_attraction_potential(x[0], x[1], x[2]);\n    }\n};\n\nclass MolecularNuclearChargeDensityFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    const MolecularEntity& _mentity;\n    const double R;\n    const bool periodic;\n    const std::vector<coordT> _specialpts;\npublic:\n    MolecularNuclearChargeDensityFunctor(const MolecularEntity& mentity, const double& R,\n        const bool& periodic, const std::vector<coordT>& specialpts)\n      : _mentity(mentity), R(R), periodic(periodic), _specialpts(specialpts) {\n    }\n\n    virtual std::vector<coordT> special_points() const\n    {\n      return _specialpts;\n    }\n\n    virtual Level special_level()\n    {\n      return 10;\n    }\n\n    double operator()(const coordT& x) const\n    {\n        //double big = 0.5*R + 6.0*_mentity.smallest_length_scale();\n        double big = 2*R + 6.0*_mentity.smallest_length_scale();\n        // Only one contribution at any point due to the short\n        // range of the nuclear charge density\n        //printf(\"big: %10.8f\\n\\n\", big);\n        double value = 0.0;\n        if (periodic)\n        {\n            for (int xr = -1; xr <= 1; xr += 1)\n            {\n                double xx = x[0] + xr*R;\n                //printf(\"x[0]: %10.8f     xx: %10.8f\\n\", x[0], xx);\n                if (xx < big && xx > -big)\n                {\n                    for (int yr = -1; yr <= 1; yr += 1)\n                    {\n                        double yy = x[1] + yr*R;\n                        //printf(\"y[0]: %10.8f     yy: %10.8f\\n\", x[1], yy);\n                        if (yy < big && yy > -big)\n                        {\n                            for (int zr = -1; zr <= 1; zr += 1)\n                            {\n                                double zz = x[2] + zr*R;\n                                //printf(\"z[0]: %10.8f     zz: %10.8f\\n\", x[2], zz);\n                                if (zz < big && zz > -big)\n                                {\n                                    double t1 = _mentity.nuclear_charge_density(xx, yy, zz);\n                                    value += t1;\n                                    //printf(\"t1: %10.8f     value: %10.8f\\n\", t1, value);\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        else\n        {\n            value = _mentity.nuclear_charge_density(x[0], x[1], x[2]);\n        }\n        return value;\n    }\n};\n\n#define NTRANS 8\n\nclass AtomicBasisFunctor : public FunctionFunctorInterface<std::complex<double>,3> {\nprivate:\n  const AtomicBasisFunction aofunc;\n  const double R;\n  const double rangesq;\n  const bool periodic;\n  const KPoint kpt;\n  coordT r;\n  std::vector<coordT> _specialpts;\n//  const int NTRANS = 2;\n  Vector<std::complex<double>,2*NTRANS+1> tx;\n  Vector<std::complex<double>,2*NTRANS+1> ty;\n  Vector<std::complex<double>,2*NTRANS+1> tz;\npublic:\n  AtomicBasisFunctor(const AtomicBasisFunction& aofunc, double R, \n                     bool periodic, const KPoint kpt)\n      : aofunc(aofunc), R(R), rangesq(aofunc.rangesq()*5), periodic(periodic), kpt(kpt)\n  {\n    double x, y, z;\n    aofunc.get_coords(x,y,z);\n    \n    r[0]=x; r[1]=y; r[2]=z;\n    _specialpts=std::vector<coordT>(1,r);\n\n    for (int ir = -NTRANS; ir <= NTRANS; ir += 1)\n    {\n      tx[ir+NTRANS] = exp(std::complex<double>(0.0, kpt.k[0]*ir * R));\n      ty[ir+NTRANS] = exp(std::complex<double>(0.0, kpt.k[1]*ir * R));\n      tz[ir+NTRANS] = exp(std::complex<double>(0.0, kpt.k[2]*ir * R));\n    }\n}\n\n  virtual std::vector<coordT> special_points() const\n  {\n    return _specialpts;\n  }\n\n  std::complex<double> operator()(const coordT& x) const\n  {\n    std::complex<double> value = 0.0;\n    if (periodic) {\n        for (int xx=-NTRANS; xx<=NTRANS; xx++)  {\n            const double xxR = xx*R + x[0] -r[0];\n            const double xxRsq = xxR*xxR;\n            if (xxRsq < rangesq) {\n                for (int yy=-NTRANS; yy<=NTRANS; yy++) {\n                    const double yyR = yy*R + x[1] - r[1];\n                    const double yyRsq = xxRsq + yyR*yyR;\n                    if (yyRsq < rangesq) {\n                        for (int zz=-NTRANS; zz<=NTRANS; zz++)  {\n                            double ao = aofunc(xx*R+x[0], yy*R+x[1], zz*R+x[2]);\n                            if (fabs(ao) > 1e-8) {\n                                std::complex<double> t1 = tx[xx+NTRANS]*ty[yy+NTRANS]*tz[zz+NTRANS];\n                                double kx0 = kpt.k[0] * x[0];\n                                double kx1 = kpt.k[1] * x[1];\n                                double kx2 = kpt.k[2] * x[2];\n                                std::complex<double> t2 = exp(std::complex<double>(0.0, -kx0 - kx1 - kx2));\n//                                value += t1 * t2 * ao;\n//                                value += t1 * ao;\n                                value += ao;\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n    else  {\n      value = aofunc(x[0], x[1], x[2]);\n    }\n    return value;\n  }\n};\n\n//std::complex<double> operator()(const coordT& x) const\n//{\n//  std::complex<double> value = 0.0;\n//  if (periodic) {\n//      for (int xx=-NTRANS; xx<=NTRANS; xx++)  {\n//          const double xxR = x[0] - r[0] - xx*R;\n//          const double xxRsq = xxR*xxR;\n//          if (xxRsq < rangesq) {\n//              for (int yy=-NTRANS; yy<=NTRANS; yy++) {\n//                  const double yyR = x[1] - r[1] - yy*R;\n//                  const double yyRsq = xxRsq + yyR*yyR;\n//                  if (yyRsq < rangesq) {\n//                      for (int zz=-NTRANS; zz<=NTRANS; zz++)  {\n//                          const double zzR = x[2] - r[2] - zz*R;\n//                          const double zzRsq = yyRsq + zzR*zzR;\n//                          if (zzRsq < rangesq) {\n//                              double ao = aofunc(x[0]-xx*R, x[1]-yy*R, x[2]-zz*R);\n//                              if (fabs(ao) > 1e-8) {\n//                                  std::complex<double> t1 = tx[xx+NTRANS]*ty[yy+NTRANS]*tz[zz+NTRANS];\n//                                  double kx0 = kpt.k[0] * x[0];\n//                                  double kx1 = kpt.k[1] * x[1];\n//                                  double kx2 = kpt.k[2] * x[2];\n//                                  std::complex<double> t2 = exp(std::complex<double>(0.0, -kx0 - kx1 - kx2));\n//                                  value += t1 * t2 * ao;\n//    //                                value += t1 * ao;\n//                              }\n//                          }\n//                      }\n//                  }\n//              }\n//          }\n//      }\n//  }\n//  else  {\n//    value = aofunc(x[0], x[1], x[2]);\n//  }\n//  return value;\n//}\n//};\n\ndouble rsquared(const coordT& r) {\n    return r[0]*r[0] + r[1]*r[1] + r[2]*r[2];\n}\n\n\n#endif /* ELECTRONICSTRUCTUREAPP_H_ */\n"
  },
  {
    "path": "src/apps/periodic_old/electronicstructureparams.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#ifndef ELECTRONICSTRUCTUREPARAMS_H_\n#define ELECTRONICSTRUCTUREPARAMS_H_\n\n#include <madness/mra/mra.h>\n#include <madness/mra/vmra.h>\n#include <madness/misc/ran.h>\n#include <madness/misc/misc.h>\n#include \"mentity.h\"\n#include \"molecularbasis.h\"\n\nnamespace madness {\n\nstruct ElectronicStructureParams\n{\n  // Size of the cubic box (this needs to change)\n  double L;\n  // Number of electrons\n  int nelec;\n  // 1 - LDA; 2 - Hartree-Fock\n  int functional;\n  // Low value in the BSH / Coulomb fit\n  double lo;\n  // Spin-polarized\n  bool spinpol;\n  // Periodic system\n  bool periodic;\n  // Maximum number of interations\n  int maxits;\n  // Is source function a nuclear potential or a nuclear charge density?\n  bool ispotential;\n  // Thresh\n  double thresh;\n  // Order of wavelets\n  int waveorder;\n  // Max thresh\n  double maxthresh;\n  // Max order of wavelets\n  int maxwaveorder;\n  // Number of empty states\n  int nempty;\n  // Smearing parameter\n  double smear;\n  // Total number of bands\n  int nbands;\n  // Size of k-mesh (hardcoded for 3-d)\n  int ngridk0, ngridk1, ngridk2;\n  // Maximum occupation\n  double maxocc;\n  // Read k-points?\n  bool kpoints;\n  // Fractional coordinates?\n  bool fractional;\n  // Maximum size of subspace\n  unsigned int maxsub;\n  // maxrotn\n  double maxrotn;\n  // Solve for canonical orbitals?\n  bool canon;\n  // Don't use solver = 0; full KAIN = 1; k-point KAIN = 2 \n  int solver;\n  // k-mesh offset\n  double koffset0, koffset1, koffset2;\n  // initial basis set\n  std::string basis;\n  // number of IO nodes\n  int nio;\n  // restart calculation; no restart = 0; restart fully = 1;\n  // restart using only density = 2;\n  int restart;\n  // total amount of electronic charge\n  double ncharge;\n  // width for smearing\n  double swidth;\n  // print matrices\n  bool print_matrices;\n  // plot orbitals\n  bool plotorbs;\n  // convergence criterion for residual\n  double rcriterion;\n  // do we want our crystal centered?\n  bool centered;\n  // damping factor for step restriction\n  double sd;\n  \n  template <typename Archive>\n  void serialize(Archive& ar) {\n      ar & L & nelec & functional & lo & spinpol &\n        periodic & maxits & ispotential & thresh &\n        waveorder & maxthresh & maxwaveorder & nempty &\n        smear & nbands & ngridk0 & ngridk1 & ngridk2 &\n        maxocc & kpoints & fractional & maxsub & \n        maxrotn & canon & solver & koffset0 & koffset1 & \n        koffset2 & basis & nio & restart & ncharge & \n        swidth & print_matrices & plotorbs & rcriterion &\n        centered & sd;\n  }\n\n  ElectronicStructureParams()\n  {\n    L = 10.0;\n    nelec = 1;\n    functional = 1;\n    lo = 1e-4;\n    smear = 0.001;\n    spinpol = false;\n    periodic = false;\n    ispotential = false;\n    maxits = 100;\n    thresh = 1e-6;\n    waveorder = 8;\n    maxthresh = 1e-6;\n    maxwaveorder = 8;\n    nempty = 2;\n    ngridk0 = 1; ngridk1 = 1; ngridk2 = 1;\n    maxocc = 2.0;\n    nbands = nelec/maxocc + nempty;\n    kpoints = false;\n    fractional = false;\n    maxsub = 1;\n    maxrotn = 0.5;\n    canon = true;\n    solver = 1;\n    koffset0 = 0.0;\n    koffset1 = 0.0;\n    koffset2 = 0.0;\n    basis = \"sto-3g\";\n    nio = 1;\n    restart = 0;\n    ncharge = 0;\n    swidth = 0.001;\n    print_matrices = true;\n    plotorbs = false;\n    rcriterion = 1e-4;\n    centered = true;\n    sd = 0.4;\n  }\n\n  void read_file(const std::string& filename)\n  {\n    std::ifstream f(filename.c_str());\n    position_stream(f, \"dft\");\n    std::string s;\n    bool bnelec = false;\n    while (f >> s)\n    {\n      if (s == \"end\")\n      {\n        break;\n      }\n      else if (s == \"nelec\")\n      {\n        f >> nelec;\n        bnelec = true;\n      }\n      else if (s == \"solver\")\n      {\n        f >> solver;\n      }\n      else if (s == \"L\")\n      {\n        f >> L;\n      }\n      else if (s == \"functional\")\n      {\n        f >> functional;\n      }\n      else if (s == \"basis\")\n      {\n        f >> basis;\n      }\n      else if (s == \"lo\")\n      {\n        f >> lo;\n      }\n      else if (s == \"swidth\")\n      {\n        f >> swidth;\n      }\n      else if (s == \"nio\")\n      {\n        f >> nio;\n      }\n      else if (s == \"restart\") {\n        restart = true;\n      }\n      else if (s == \"norestart\") {\n        restart = false;\n      }\n      else if (s == \"spinpol\") {\n        spinpol = true;\n      }\n      else if (s == \"nospinpol\") {\n        spinpol = false;\n      }\n      else if (s == \"canon\") {\n        canon = true;\n      }\n      else if (s == \"nocanon\") {\n        canon = false;\n      }\n      else if (s == \"periodic\") {\n        periodic = true;\n      }\n      else if (s == \"noperiodic\") {\n        periodic = false;\n      }\n      else if (s == \"usepotential\") {\n        ispotential = true;\n      }\n      else if (s == \"nousepotential\") {\n        ispotential = false;\n      }\n      else if (s == \"maxits\")\n      {\n        f >> maxits;\n      }\n      else if (s == \"maxsub\")\n      {\n        f >> maxsub;\n      }\n      else if (s == \"maxrotn\")\n      {\n        f >> maxrotn;\n      }\n      else if (s == \"damping\")\n      {\n        f >> sd;\n      }\n      else if (s == \"thresh\")\n      {\n        f >> maxthresh;\n        thresh = maxthresh;\n      }\n      else if (s == \"waveorder\")\n      {\n        f >> maxwaveorder;\n        waveorder = maxwaveorder;\n      }\n      else if (s == \"nempty\")\n      {\n        f >> nempty;\n      }\n      else if (s == \"kpoints\")\n      {\n        std::string tempstr;\n        f >> tempstr;\n        if (tempstr == \"true\")\n        {\n          kpoints = true;\n        }\n        else if (tempstr == \"false\")\n        {\n          kpoints = false;\n        }\n        else\n        {\n          MADNESS_EXCEPTION(\"input error -- kpoints\", 0);\n        }\n      }\n      else if (s == \"fractional\") {\n        fractional = true;\n      }\n      else if (s == \"nofractional\") {\n        fractional = false;\n      }\n      else if (s == \"ngridk\")\n      {\n        f >> ngridk0; f >> ngridk1; f >> ngridk2;\n      }\n      else if (s == \"koffset\")\n      {\n        f >> koffset0; f >> koffset1; f >> koffset2;\n      }\n      else if (s == \"print_matrices\") {\n          print_matrices = true;\n      }\n      else if (s == \"noprint_matrices\") {\n          print_matrices = false;\n      }\n      else if (s == \"center\") {\n          centered = true;\n      }\n      else if (s == \"nocenter\") {\n          centered = false;\n      }\n      else if (s == \"plotorbs\") {\n          plotorbs = true;\n      }\n      else if (s == \"noplotorbs\") {\n          plotorbs = false;\n      }\n      else if (s == \"rcriterion\")\n      {\n        f >> rcriterion;\n      }\n      else\n      {\n        std::cout << \"esolver: unrecognized input keyword \" << s << std::endl;\n        MADNESS_EXCEPTION(\"input error\", 0);\n      }\n    }\n    // No spin polarization\n    //if (spinpol = true) MADNESS_EXCEPTION(\"spinpol not implemented\", 0);\n    // nelec is required\n    //if (!bnelec) MADNESS_EXCEPTION(\"nelec required\", 0);\n//    // maximum occupation\n//    maxocc = (spinpol) ? 1.0 : 2.0;\n//    // compute total number of bands\n//    nbands = nelec/maxocc + nempty;\n    // kpoints only for periodic\n    if (kpoints && !periodic)\n      MADNESS_EXCEPTION(\"input error -- k-points only valid with periodic calculation\", 0);\n  }\n\n  void set_molecular_info(const MolecularEntity& mentity, const AtomicBasisSet& aobasis) {\n      lo = mentity.smallest_length_scale();\n  }\n};\n\n}\n#endif /* ELECTRONICSTRUCTUREPARAMS_H_ */\n"
  },
  {
    "path": "src/apps/periodic_old/esolver.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*\n * File:   esolver.h\n * Author: wsttiger\n *\n * Created on April 17, 2009, 12:12 PM\n */\n\n#ifndef _ESOLVER_H\n#define\t_ESOLVER_H\n\ntypedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmapT;\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<std::complex<double>,3> > functorT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > rfunctorT;\ntypedef Function<std::complex<double>,3> functionT;\ntypedef Function<std::complex<double>,3> cfunctionT;\ntypedef Function<double,3> rfunctionT;\ntypedef std::vector<functionT> vecfuncT;\ntypedef std::vector<rfunctionT> rvecfuncT;\ntypedef std::vector<cfunctionT> cvecfuncT;\ntypedef Tensor< std::complex<double> > ctensorT;\ntypedef Tensor<double> rtensorT;\ntypedef FunctionFactory<std::complex<double>,3> factoryT;\ntypedef FunctionFactory<double,3> rfactoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef std::shared_ptr<operatorT> poperatorT;\n\nvoid print_cube(World& world, const Function<double,3>& f, int npts)\n{\n  f.reconstruct();\n  if (world.rank() == 0)  printf(\"\\n\");\n  Tensor<double> csize = FunctionDefaults<3>::get_cell_width();\n\n  for (int i = 0; i < npts; i++)\n  {\n    for (int j = 0; j < npts; j++)\n    {\n      for (int k = 0; k < npts; k++)\n      {\n        double x = (i+0.5) * (csize[0]/npts) - csize[0]/2;\n        double y = (j+0.5) * (csize[1]/npts) - csize[1]/2;\n        double z = (k+0.5) * (csize[2]/npts) - csize[2]/2;\n        coordT p(0.0);\n        p[0] = x; p[1] = y; p[2] = z;\n        if (world.rank() == 0)\n          printf(\"%10.2f%10.2f%10.2f%15.8f\\n\", x, y, z, f(p));\n      }\n    }\n  }\n}\n\nvoid print_cube(World& world, const Function<double,3>& f1, const Function<double,3>& f2, int npts)\n{\n  f1.reconstruct();\n  f2.reconstruct();\n  if (world.rank() == 0)  printf(\"\\n\");\n  Tensor<double> csize = FunctionDefaults<3>::get_cell_width();\n\n  for (int i = 0; i < npts; i++)\n  {\n    for (int j = 0; j < npts; j++)\n    {\n      for (int k = 0; k < npts; k++)\n      {\n        double x = (i+0.5) * (csize[0]/npts) - csize[0]/2;\n        double y = (j+0.5) * (csize[1]/npts) - csize[1]/2;\n        double z = (k+0.5) * (csize[2]/npts) - csize[2]/2;\n        coordT p(0.0);\n        p[0] = x; p[1] = y; p[2] = z;\n        if (world.rank() == 0)\n          printf(\"%10.2f%10.2f%10.2f%15.8f%15.8f\\n\", x, y, z, f1(p), f2(p));\n      }\n    }\n  }\n}\n\nvoid print_cube(World& world, const Function<double,3>& f1, const Function<double,3>& f2,\n    const Function<double,3>& f3, int npts)\n{\n  f1.reconstruct();\n  f2.reconstruct();\n  f3.reconstruct();\n  if (world.rank() == 0)  printf(\"\\n\");\n  Tensor<double> csize = FunctionDefaults<3>::get_cell_width();\n\n  for (int i = 0; i < npts; i++)\n  {\n    for (int j = 0; j < npts; j++)\n    {\n      for (int k = 0; k < npts; k++)\n      {\n        double x = (i+0.5) * (csize[0]/npts) - csize[0]/2;\n        double y = (j+0.5) * (csize[1]/npts) - csize[1]/2;\n        double z = (k+0.5) * (csize[2]/npts) - csize[2]/2;\n        coordT p(0.0);\n        p[0] = x; p[1] = y; p[2] = z;\n        if (world.rank() == 0)\n          printf(\"%10.2f%10.2f%10.2f%15.8f%15.8f%15.8f\\n\", x, y, z, f1(p), f2(p), f3(p));\n      }\n    }\n  }\n}\n\nstruct KPoint\n{\n  coordT k;\n  double weight;\n  // the first wavefunction for this k-point has index begin\n  // the last wavefunction for this k-point has index end-1\n  unsigned int begin;\n  unsigned int end;\n\n  KPoint()\n  {\n    k[0] = 0.0; k[1] = 0.0; k[2] = 0.0;\n    weight = 0.0;\n    begin = -1;\n    end = -1;\n  }\n\n  KPoint(const coordT& k, const double& weight, const int& begin,\n         const int& end)\n   : k(k), weight(weight), begin(begin), end(end) {}\n\n  KPoint(const coordT& k, const double& weight)\n   : k(k), weight(weight), begin(-1), end(-1) {}\n\n  KPoint(const double& k0, const double& k1, const double& k2, const double& weight)\n   : weight(weight), begin(-1), end(-1)\n  {\n    k[0] = k0; k[1] = k1; k[2] = k2;\n  }\n\n  bool is_orb_in_kpoint(unsigned int idx)\n  {\n    return ((idx >= begin) && (idx < end)) ? true : false;\n  }\n\n  template <typename Archive>\n  void serialize(Archive& ar) {\n      ar & k & weight & begin & end;\n  }\n\n};\n\nstd::istream& operator >> (std::istream& is, KPoint& kpt)\n{\n  for (unsigned int i = 0; i < kpt.k.size(); i++)\n    is >> kpt.k[i];\n  is >> kpt.weight;\n  is >> kpt.begin;\n  is >> kpt.end;\n\n  return is;\n}\n\n  //***************************************************************************\n  bool is_equal(double val1, double val2, double eps)\n  {\n    double d = fabs(val1-val2);\n    return (fabs(d) <= eps) ? true : false;\n  }\n  //***************************************************************************\n\n//  //***************************************************************************\n//  template <typename Q, int NDIM>\n//  Function<Q,NDIM> pdiff(const Function<Q,NDIM>& f, int axis, bool fence = true)\n//  {\n//    Function<Q,NDIM>& g = const_cast< Function<Q,NDIM>& >(f);\n//    // Check for periodic boundary conditions\n//    Tensor<int> oldbc = g.get_bc();\n//    Tensor<int> bc(NDIM,2);\n//    bc(___) = 1;\n//    g.set_bc(bc);\n//    // Do calculation\n//    Function<Q,NDIM> rf = diff(g,axis,fence);\n//    // Restore previous boundary conditions\n//    g.set_bc(oldbc);\n//    return rf;\n//  }\n//  //***************************************************************************\n\n  //***************************************************************************\n  template <typename Q, int NDIM>\n  ctensorT kinetic_energy_matrix_slow(World& world,\n                                 const std::vector< Function<std::complex<Q>,NDIM> >& v,\n                                 const bool periodic,\n                                 const KPoint k = KPoint(coordT(0.0), 0.0))\n  {\n    reconstruct(world, v);\n    int n = v.size();\n    ctensorT c(n, n);\n    const std::complex<double> I = std::complex<double>(0.0, 1.0);\n    double k0 = k.k[0];\n    double k1 = k.k[1];\n    double k2 = k.k[2];\n    double ksquared = k0*k0 + k1*k1 + k2*k2;\n    if (periodic)\n    {\n      complex_derivative_3d Dx(world,0);\n      complex_derivative_3d Dy(world,1);\n      complex_derivative_3d Dz(world,2);\n      for (int i = 0; i < n; i++)\n      {\n        for (int j = 0; j <= i; j++)\n        {\n//          functionT dv2_j = pdiff(pdiff(v[j], 0), 0) +\n//                            pdiff(pdiff(v[j], 1), 1) +\n//                            pdiff(pdiff(v[j], 2), 2);\n//          functionT dv_j = std::complex<Q>(0.0, 2.0*k0) * pdiff(v[j], 0) +\n//                           std::complex<Q>(0.0, 2.0*k1) * pdiff(v[j], 1) +\n//                           std::complex<Q>(0.0, 2.0*k2) * pdiff(v[j], 2);\n          functionT dv2_j = Dx(Dx(v[j])) + Dy(Dy(v[j])) + Dz(Dz(v[j]));\n          functionT dv_j = std::complex<Q>(0.0, 2.0*k0) * Dx(v[j]) +\n                           std::complex<Q>(0.0, 2.0*k1) * Dy(v[j]) +\n                           std::complex<Q>(0.0, 2.0*k2) * Dz(v[j]);\n          functionT tmp = (ksquared*v[j]) - dv_j - dv2_j;\n          c(i, j) = inner(v[i], tmp);\n          c(j, i) = conj(c(i, j));\n        }\n      }\n    }\n    else\n    {\n      std::vector< std::shared_ptr < Derivative< std::complex<Q>,NDIM> > > gradop =\n          gradient_operator<std::complex<Q>,NDIM>(world);\n      for (int axis = 0; axis < 3; axis++)\n      {\n        vecfuncT dv = apply(world, *(gradop[axis]), v);\n        c += matrix_inner(world, dv, dv, true);\n        dv.clear(); // Allow function memory to be freed\n      }\n    }\n    return c.scale(0.5);\n  }\n\n\n  //***************************************************************************\n  template <typename Q, int NDIM>\n  ctensorT kinetic_energy_matrix(World& world,\n                                 const std::vector< Function<std::complex<Q>,NDIM> >& v,\n                                 const bool periodic,\n                                 const KPoint k = KPoint(coordT(0.0), 0.0))\n  {\n    const std::complex<double>   I = std::complex<double>(0.0, 1.0);\n    const std::complex<double> one = std::complex<double>(1.0, 0.0);\n\n    int n = v.size();\n    ctensorT c(n, n);\n    std::vector< std::shared_ptr < Derivative< std::complex<Q>,NDIM> > > gradop =\n        gradient_operator<std::complex<Q>,NDIM>(world);\n    for (int axis = 0; axis < 3; axis++)  {\n        reconstruct(world, v);\n        vecfuncT dv = apply(world, *(gradop[axis]), v);\n        if (periodic) {\n            compress(world,v);\n            compress(world,dv);\n            for (int i=0; i<n; i++) dv[i].gaxpy(one, v[i], I*k.k[axis], false);\n            world.gop.fence();\n        }\n        c += matrix_inner(world, dv, dv, true);\n        dv.clear(); // Allow function memory to be freed\n    }\n    return c.scale(0.5);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename Q, int NDIM>\n  ctensorT kinetic_energy_matrix2(World& world,\n                                 const std::vector< Function<std::complex<Q>,NDIM> >& v)\n  {\n    const std::complex<double>   I = std::complex<double>(0.0, 1.0);\n    const std::complex<double> one = std::complex<double>(1.0, 0.0);\n\n    int n = v.size();\n    ctensorT c(n, n);\n    std::vector< std::shared_ptr < Derivative< std::complex<Q>,NDIM> > > gradop =\n        gradient_operator<std::complex<Q>,NDIM>(world);\n    for (int axis = 0; axis < 3; axis++)  {\n        reconstruct(world, v);\n        vecfuncT dv = apply(world, *(gradop[axis]), v);\n        c += matrix_inner(world, dv, dv, true);\n        dv.clear(); // Allow function memory to be freed\n    }\n    return c.scale(0.5);\n  }\n  //***************************************************************************\n\n//  //***************************************************************************\n//  template <typename Q, int NDIM>\n//  ctensorT kinetic_energy_matrix(World& world,\n//                                 const std::vector< Function<Q,NDIM> >& v,\n//                                 const bool periodic,\n//                                 const KPoint k = KPoint(coordT(0.0), 0.0))\n//  {\n//    reconstruct(world, v);\n//    int n = v.size();\n//    ctensorT c(n, n);\n//    const std::complex<double> I = std::complex<double>(0.0, 1.0);\n//    double k0 = k.k[0];\n//    double k1 = k.k[1];\n//    double k2 = k.k[2];\n//    if (periodic)\n//    {\n//      for (int i = 0; i < n; i++)\n//      {\n//        functionT dv_i_0 = function_real2complex(pdiff(v[i], 0)) + I * k0 * v[i];\n//        functionT dv_i_1 = function_real2complex(pdiff(v[i], 1)) + I * k1 * v[i];\n//        functionT dv_i_2 = function_real2complex(pdiff(v[i], 2)) + I * k2 * v[i];\n//        for (int j = 0; j <= i; j++)\n//        {\n//          functionT dv_j_0 = function_real2complex(pdiff(v[j], 0)) - I * k0 * v[j];\n//          functionT dv_j_1 = function_real2complex(pdiff(v[j], 1)) - I * k1 * v[j];\n//          functionT dv_j_2 = function_real2complex(pdiff(v[j], 2)) - I * k2 * v[j];\n//          c(i, j) = inner(dv_i_0, dv_j_0) + inner(dv_i_1, dv_j_1) + inner(dv_i_2, dv_j_2);\n//          c(j, i) = conj(c(i, j));\n//        }\n//      }\n//    }\n//    else\n//    {\n//      rtensorT r(n, n);\n//      for (int axis = 0; axis < 3; axis++)\n//      {\n//        rvecfuncT dv = diff(world, v, axis);\n//        r += matrix_inner(world, dv, dv, true);\n//        dv.clear(); // Allow function memory to be freed\n//      }\n//      c = ctensorT(r);\n//    }\n//    return c.scale(0.5);\n//  }\n//  //***************************************************************************\n\n\n\n\n#endif\t/* _ESOLVER_H */\n\n"
  },
  {
    "path": "src/apps/periodic_old/ewald.cc",
    "content": "\n#include <madness/mra/mra.h>\n#include \"mentity.h\"\n\nusing namespace madness;\n\nstatic double L = 6.5;\n\ntypedef Vector<double,3> coordT;\ntypedef Function<double,3> rfunctionT;\ntypedef FunctionFactory<double,3> rfactoryT;\ntypedef std::vector<rfunctionT> rvecfuncT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > rfunctorT;\n\n//*************************************************************************\ndouble compute_volume()\n{\n  return L*L*L;\n}\n//*************************************************************************\n\n//***************************************************************************\nstruct vectorLengthFunctor : public std::binary_function<Vector<double,3>, Vector<double,3>, bool>\n{\n    bool operator()( Vector<double,3> lhs, Vector<double,3> rhs)\n    {\n      double llen = sqrt(lhs[0]*lhs[0] + lhs[1]*lhs[1] + lhs[2]*lhs[2]);\n      double rlen = sqrt(rhs[0]*rhs[0] + rhs[1]*rhs[1] + rhs[2]*rhs[2]);\n      return (llen < rlen);\n    }\n};\n//***************************************************************************\n\n//*************************************************************************\nclass GaussianFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n  double coeff;\n  double expnt;\n  std::vector<coordT> specialpts;\n\npublic:\n  GaussianFunctor(double coeff, double expnt)\n        : coeff(coeff), expnt(expnt)\n  {\n    specialpts.push_back({0.0,0.0,0.0});\n  }\n\n    virtual std::vector<coordT> special_points() const\n    {\n      return specialpts;\n    }\n\n    virtual Level special_level()\n    {\n      return 10;\n    }\n\n    double operator()(const coord_3d& r) const {\n        double x = r[0]; double y = r[1]; double z = r[2];\n        //return coeff*std::exp(-expnt*(x*x + y*y + z*z));\n        return coeff*std::exp(-expnt*x*x)*std::exp(-expnt*y*y)*std::exp(-expnt*z*z);\n    }\n};\n//*************************************************************************\nvoid gen_ce(double mu, double xlo, double eps, Tensor<double>& c, Tensor<double>& e)\n{\n  double T = 25.0;\n\n  double slo = 0.0;\n  if (mu > 1e-12)\n  {\n    slo = -0.5*std::log(4*T/mu/mu);\n    double xhi = 1.0;\n    slo = std::log10(eps/xhi)-1.0;\n  }\n  double shi = 0.5*std::log(T/xlo/xlo);\n  slo = -28.63102;\n  double h = 1.0/(0.2-0.47*std::log10(eps));\n  unsigned int npt = std::floor(std::abs((shi-slo)/h));\n  h = (shi-slo)/(npt+1);\n  c = Tensor<double>((int)npt);\n  e = Tensor<double>((int)npt);\n\n  for (unsigned int i = 0; i < npt; i++)\n  {\n    double s = slo + h*(i+1);\n    c[i] = (2*h/std::sqrt(constants::pi)) * (std::exp(0.25*mu*mu*std::exp(-2.0*s)))*std::exp(s);\n    e[i] = std::exp(2.0*s);\n  }\n\n  print(\"npt:  \", npt, \"  slo:  \", slo, \"  shi:  \", shi);\n  for (unsigned int i = 0; i < c.dim(0); i++)\n  {\n    print(\"i:  \", i, \"  c:  \", c[i], \"  e:  \", e[i]);\n  }\n}\n//*************************************************************************\n\n//*************************************************************************\n\n//*************************************************************************\nstd::vector< Vector<double,3> > generate_R_vectors(World& world, double maxRlen = 50.0)\n{\n  const double t1 = L;\n\n  std::vector< Vector<double,3> > rvecs;\n  std::vector< Vector<double,3> > rvecs2;\n  double maxRlen20 = 1.2*maxRlen;\n\n  int rlo = -500;\n  int rhi = 501;\n  for (int ir1 = rlo; ir1 < rhi; ir1++)\n  {\n    for (int ir2 = rlo; ir2 < rhi; ir2++)\n    {\n      for (int ir3 = rlo; ir3 < rhi; ir3++)\n      {\n        double rlen = t1*std::sqrt(ir1*ir1 + ir2*ir2 + ir3*ir3);\n        if (rlen <= maxRlen)\n        {\n          Vector<double,3> rvec {t1*ir1, t1*ir2, t1*ir3};\n          rvecs.push_back(rvec);\n        }\n        else if (rlen < maxRlen20)\n        {\n          Vector<double,3> rvec {t1*ir1, t1*ir2, t1*ir3};\n          rvecs2.push_back(rvec);\n        }\n      }\n    }\n  }\n  std::sort(rvecs.begin(), rvecs.end(), vectorLengthFunctor());\n  std::sort(rvecs2.begin(), rvecs2.end(), vectorLengthFunctor());\n\n//      if (_world.rank() == 0) printf(\"Size of vectors:  %d\\n\", rvecs.size());\n//      if (_world.rank() == 0)\n//        printf(\"\\nR-vectors:\\n\");\n\n//  for (unsigned int ir = 0; ir < rvecs.size(); ir++)\n//  {\n//    Vector<double,3> rvec = rvecs[ir];\n//    double rlen = std::sqrt(rvec[0]*rvec[0] + rvec[1]*rvec[1] + rvec[2]*rvec[2]);\n//\n//        if (world.rank() == 0)\n//          printf(\"%10.5f %10.5f %10.5f   %10.5f\\n\",rvec[0],rvec[1],rvec[2],rlen);\n//  }\n\n  // Get size info\n  unsigned int rsize = rvecs.size();\n  Vector<double,3> rvec = rvecs[rsize-1];\n  double maxRlen2 = std::sqrt(rvec[0]*rvec[0] + rvec[1]*rvec[1] + rvec[2]*rvec[2]);\n  unsigned int rsize2 = rvecs2.size();\n  if (world.rank() == 0) print(\"rsize:  \", rsize, \"rsize2:  \", rsize2);\n  Vector<double,3> rvec2 = rvecs2[0];\n  double maxRlen20_2 = std::sqrt(rvec2[0]*rvec2[0] + rvec2[1]*rvec2[1] + rvec2[2]*rvec2[2]);\n\n  if (world.rank() == 0)\n    print(\"R-max length requested:  \", maxRlen, \"    R-max length:  \", maxRlen2,\n        \"    R-max length (120%):  \", maxRlen20_2);\n\n  return rvecs;\n}\n//*************************************************************************\n\n//*************************************************************************\n// generate G-vectors for a SCC in terms of the real space lattice vectors\nstd::vector< Vector<double,3> > generate_G_vectors(World& world, double maxGlen = 15.0)\n{\n  const double TWO_PI = 2*constants::pi;\n  const double t1 = TWO_PI/L;\n\n  std::vector< Vector<double,3> > gvecs;\n\n  int glo = -500;\n  int ghi = 501;\n  for (int ig1 = glo; ig1 < ghi; ig1++)\n  {\n    for (int ig2 = glo; ig2 < ghi; ig2++)\n    {\n      for (int ig3 = glo; ig3 < ghi; ig3++)\n      {\n        double glen = t1*std::sqrt(ig1*ig1 + ig2*ig2 + ig3*ig3);\n        if (glen <= maxGlen)\n        {\n          Vector<double,3> gvec {t1*ig1, t1*ig2, t1*ig3};\n          gvecs.push_back(gvec);\n        }\n      }\n    }\n  }\n  std::sort(gvecs.begin(), gvecs.end(), vectorLengthFunctor());\n//      if (_world.rank() == 0)\n//        printf(\"\\nG-vectors:\\n\");\n  for (unsigned int ig = 0; ig < gvecs.size(); ig++)\n  {\n    Vector<double,3> gvec = gvecs[ig];\n    double glen = std::sqrt(gvec[0]*gvec[0] + gvec[1]*gvec[1] + gvec[2]*gvec[2]);\n//        if (_world.rank() == 0)\n//          printf(\"%10.5f %10.5f %10.5f   %10.5f\\n\",gvec[0],gvec[1],gvec[2],glen);\n  }\n\n  unsigned int gsize = gvecs.size();\n  Vector<double,3> gvec = gvecs[gsize-1];\n  double maxGlen2 = std::sqrt(gvec[0]*gvec[0] + gvec[1]*gvec[1] + gvec[2]*gvec[2]);\n  if (world.rank() == 0) print(\"G-max length requested:  \", maxGlen, \"    G-max length:  \", maxGlen2);\n  return gvecs;\n\n}\n//*************************************************************************\n\n//*************************************************************************\nclass OnesFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n  double val;\n\npublic:\n  OnesFunctor(double val=1.0) : val(val) {}\n\n  virtual double operator()(const coordT& r) const\n  {\n    return val;\n  }\n};\n//*************************************************************************\n\n\n//*************************************************************************\nclass EwaldNuclearPotentialFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n  std::vector< Vector<double,3> > rvecs;\n  std::vector< Vector<double,3> > gvecs;\n  std::vector<double_complex> gsfactor;\n  double alpha;\n  MolecularEntity* mentity;\n\npublic:\n  EwaldNuclearPotentialFunctor(World& world, MolecularEntity* mentity, double alpha)\n   : alpha(alpha), mentity(mentity)\n  {\n    if (world.rank() == 0) print(\"EwaldNuclearPotentialFunctor [started]\");\n\n    double gthresh = 1e-6;\n    double gmax = 550.0;\n    double gmin = 0.01;\n    bool gstop = false;\n    double gval2 = 0.5*(gmax+gmin);\n    for (unsigned int i = 0; i < 500 && !gstop; i++)\n    {\n      gval2 = 0.5*(gmax+gmin);\n      double t1 = std::exp(-gval2/4/alpha/alpha)/gval2;\n      if (((t1 > 0.9e-10) && (t1 < 1.1e-10)) || (gmax-gmin/2) < gthresh) gstop = true;\n      if (!gstop)\n      {\n        if (t1 > 1e-10)\n        {\n          gmin = gval2;\n        }\n        else\n        {\n          gmax = gval2;\n        }\n      }\n      if (world.rank() == 0) print(\"i: \", i, \"  gval: \", std::sqrt(gval2), \"  t1: \", t1);\n    }\n\n    double rthresh = 1e-6;\n    double rmax = 550.0;\n    double rmin = 0.01;\n    bool rstop = false;\n    double rval = 0.5*(rmax+rmin);\n    for (unsigned int i = 0; i < 500 && !rstop; i++)\n    {\n      rval = 0.5*(rmax+rmin);\n      double t1 = erfc(alpha*rval)/rval;\n      if (((t1 > 0.9e-10) && (t1 < 1.1e-10)) || (rmax-rmin/2) < rthresh) rstop = true;\n      if (!rstop)\n      {\n        if (t1 > 1e-10)\n        {\n          rmin = rval;\n        }\n        else\n        {\n          rmax = rval;\n        }\n      }\n      if (world.rank() == 0) print(\"i: \", i, \"  rval: \", rval, \"  t1: \", t1);\n    }\n\n    const double TWOPI = 2.0*constants::pi;\n    rvecs = generate_R_vectors(world,std::max(rval,10*L));\n    gvecs = generate_G_vectors(world,std::max(std::sqrt(gval2),10*TWOPI/L));\n    if (world.rank() == 0) print(\"gvecs size: \", gvecs.size());\n    if (world.rank() == 0) print(\"rvecs size: \", rvecs.size());\n    unsigned int natoms = mentity->natom();\n    unsigned int NG = 7;\n    gsfactor.push_back(0.0);\n    for (unsigned int ig = 1; ig < gvecs.size(); ig++)\n//    for (unsigned int ig = 1; ig < NG; ig++)\n    {\n      // Get G-vector from list\n      Vector<double,3> gvec = gvecs[ig];\n      double G2 = gvec[0]*gvec[0] + gvec[1]*gvec[1] + gvec[2]*gvec[2];\n      double_complex rhon = double_complex(0.0,0.0);\n//      if (world.rank() == 0)\n//        print(\"ig:  \", ig, gvec[0], gvec[1], gvec[2]);\n//      if (world.rank() == 0)\n//        print(\"================================================\");\n      for (unsigned int ia = 0; ia < natoms; ia++)\n      {\n        Atom iatom = mentity->get_atom(ia);\n        Vector<double,3> tvec {1*(-iatom.x),\n                               1*(-iatom.y),\n                               1*(-iatom.z)};\n        double_complex t1 = std::exp(double_complex(0.0,gvec[0]*tvec[0] +\n                                     gvec[1]*tvec[1] + gvec[2]*tvec[2]));\n        rhon += iatom.q*t1;\n//        if (world.rank() == 0)\n//          print(\"ia:  \", ia, tvec[0], tvec[1], tvec[2]);\n//        if (world.rank() == 0)\n//          print(\"t1:  \", t1);\n      }\n//      if (world.rank() == 0) print(\"rhon:  \", rhon, \"\\n\");\n      double_complex t2 = rhon*std::exp(-G2/4.0/alpha/alpha)/G2;\n      double_complex t3 = (std::abs(t2) > 1e-8) ? t2 : 0.0;\n      gsfactor.push_back(t3);\n//      if (world.rank() == 0)\n//        print(\"ig:  \", ig, \"  G2:  \", G2, \"  gsfactor:  \", t3);\n    }\n\n    if (world.rank() == 0) print(\"EwaldNuclearPotentialFunctor [end]\");\n  }\n\n  double_complex do_G_sum_v1(const coordT& r) const\n  {\n    // number of atoms in unit cell\n    unsigned int natoms = mentity->natom();\n    // other parameters\n    const double TWOPI = 2*constants::pi;\n    double v = compute_volume();\n\n    // RECIPROCAL SPACE SUM\n    double charge = mentity->total_nuclear_charge();\n    double_complex s1 = -charge/alpha/alpha/4.0;\n    // skip G=0\n    for (unsigned int ig = 1; ig < gvecs.size(); ig++)\n    {\n      Vector<double,3> gvec = gvecs[ig];\n      double_complex t1 = std::exp(double_complex(0.0,gvec[0]*r[0]+gvec[1]*r[1]+gvec[2]*r[2]));\n      s1 += gsfactor[ig]*t1;\n    }\n    s1 *= 2.0*TWOPI/v;\n    return s1;\n  }\n\n  double_complex do_G_sum_v2(const coordT& r) const\n  {\n    // number of atoms in unit cell\n    unsigned int natoms = mentity->natom();\n    // other parameters\n    const double TWOPI = 2*constants::pi;\n    double v = compute_volume();\n\n    // RECIPROCAL SPACE SUM\n    unsigned int NG = 7;\n    double charge = mentity->total_nuclear_charge();\n    double_complex s1 = -charge/alpha/alpha/4.0;\n    for (unsigned int ia = 0; ia < natoms; ia++)\n    {\n      // skip G=0\n      for (unsigned int ig = 1; ig < gvecs.size(); ig++)\n//      for (unsigned int ig = 1; ig < NG; ig++)\n      {\n        Vector<double,3> gvec = gvecs[ig];\n        double G2 = gvec[0]*gvec[0] + gvec[1]*gvec[1] + gvec[2]*gvec[2];\n        Atom iatom = mentity->get_atom(ia);\n        Vector<double,3> rr {r[0]-iatom.x,r[1]-iatom.y,r[2]-iatom.z};\n        double_complex t1 = std::exp(double_complex(0.0,gvec[0]*rr[0]+gvec[1]*rr[1]+gvec[2]*rr[2]));\n        s1 += iatom.q*t1*std::exp(-G2/4.0/alpha/alpha)/G2;\n//        print(\"ig: \", ig, \"  g: \", gvec[0], gvec[1], gvec[2]);\n//        print(\"t1: \", t1, \"  factor: \", std::exp(-G2/4.0/alpha/alpha)/G2);\n//        print(\"\");\n      }\n    }\n    MADNESS_ASSERT(std::imag(s1) < 1e-10);\n    s1 *= 2.0*TWOPI/v;\n    return s1;\n  }\n\n  double_complex do_R_sum_v1(const coordT& r) const\n  {\n    // number of atoms in unit cell\n    unsigned int natoms = mentity->natom();\n    // other parameters\n    const double TWOPI = 2*constants::pi;\n    double v = compute_volume();\n\n    // REAL SPACE SUM\n    double_complex s2 = 0.0;\n    for (unsigned int ia = 0; ia < natoms; ia++)\n    {\n      Atom iatom = mentity->get_atom(ia);\n      for (unsigned int ir = 0; ir < rvecs.size(); ir++)\n      {\n        Vector<double,3> rvec = rvecs[ir];\n        Vector<double,3> tvec {r[0]-iatom.x-rvec[0],\n                               r[1]-iatom.y-rvec[1],\n                               r[2]-iatom.z-rvec[2]};\n        double t2 = std::sqrt(tvec[0]*tvec[0] +\n            tvec[1]*tvec[1] + tvec[2]*tvec[2]);\n        s2 += iatom.q*(1-erf(alpha*t2))/t2;\n//        print(\"ia: \", ia, \"  x: \", iatom.x, \"  y: \", iatom.y, \"  z: \", iatom.z);\n      }\n    }\n    return s2;\n  }\n\n//  double_complex do_const_sum(const coordT& r) const\n//  {\n//    // number of atoms in unit cell\n//    unsigned int natoms = mentity->natom();\n//    // other parameters\n//    const double TWOPI = 2*constants::pi;\n//    double v = compute_volume();\n//\n//    double_complex s3 = 0.0;\n//    double sqrtpi = std::sqrt(constants::pi);\n//    for (unsigned int ia = 0; ia < natoms; ia++)\n//    {\n//      Atom iatom = mentity->get_atom(ia);\n//      double_complex rr = std::abs(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);\n//      s3 += 2.0*iatom.q*alpha*rr/sqrtpi;\n//    }\n//    return s3;\n//  }\n\n  double operator()(const coordT& r) const\n  {\n    double_complex s1 = do_G_sum_v1(r);\n    double_complex s2 = do_R_sum_v1(r);\n//    print(\"s1: \", std::real(s1), \"  s2: \", std::real(s2));\n    return -std::real(s1+s2);\n  }\n\n//  double operator()(const coordT& r) const\n//  {\n//    // number of atoms in unit cell\n//    unsigned int natoms = mentity->natom();\n//    // other parameters\n//    const double TWOPI = 2*constants::pi;\n//    double v = compute_volume();\n//\n//    // RECIPROCAL SPACE SUM\n//    double charge = mentity->total_nuclear_charge();\n//    double_complex s1 = -charge/alpha/alpha/4.0;\n//    // skip G=0\n//    for (unsigned int ig = 1; ig < gvecs.size(); ig++)\n//    {\n//      Vector<double,3> gvec = gvecs[ig];\n//      double_complex t1 = std::exp(double_complex(0.0,gvec[0]*r[0]+gvec[1]*r[1]+gvec[2]*r[2]));\n//      s1 += gsfactor[ig]*t1;\n//    }\n//    s1 *= 2.0*TWOPI/v;\n//\n//    // REAL SPACE SUM\n//    double_complex s2 = 0.0;\n//    for (unsigned int ia = 0; ia < mentity->natom(); ia++)\n//    {\n//      Atom iatom = mentity->get_atom(ia);\n//      Vector<double,3> tvec {iatom.x, iatom.y, iatom.z};\n//      for (unsigned int ir = 0; ir < rvecs.size(); ir++)\n//      {\n//        Vector<double,3> rvec = rvecs[ir];\n//        Vector<double,3> tvec2 {r[0]-tvec[0]-rvec[0],\n//                                r[1]-tvec[1]-rvec[1],\n//                                r[2]-tvec[1]-rvec[1]};\n//        double t2 = std::sqrt(tvec2[0]*tvec2[0] +\n//            tvec2[1]*tvec2[1] + tvec2[2]*tvec2[2]);\n//        s2 += erfc(alpha*t2)/std::abs(t2);\n//      }\n//    }\n//\n//    double_complex s3 = 0.0;\n//    double sqrtpi = std::sqrt(constants::pi);\n//    for (unsigned int ia = 0; ia < natoms; ia++)\n//    {\n//      Atom iatom = mentity->get_atom(ia);\n//      s3 += 2.0*iatom.q*alpha/sqrtpi;\n//    }\n//\n//    double rvalue = std::real(s1 - s3);\n////    MADNESS_ASSERT(std::imag(s1) < 1e-10);\n////    double rvalue = std::real(s1);\n//    return rvalue;\n//  }\n\n  virtual ~EwaldNuclearPotentialFunctor() {}\n};\n//*************************************************************************\n\n//*************************************************************************\ndouble nuclear_potential(const Tensor<double>& c, const Tensor<double>& e, double r)\n{\n  double val = 0.0;\n  for (unsigned int mu = 0; mu < c.dim(0); mu++)\n  {\n    val += c[mu]*std::exp(-e[mu]*r*r);\n  }\n  return val;\n}\n//*************************************************************************\n\n//*************************************************************************\nclass MolecularNuclearPotentialFunctor2 : public FunctionFunctorInterface<double,3> {\nprivate:\n  MolecularEntity mentity;\n  Tensor<double> coeff;\n  Tensor<double> expnt;\n  BoundaryConditions<3> bc;\n  std::vector< Vector<double,3> > rvecs;\n\n\npublic:\n  MolecularNuclearPotentialFunctor2(World& world, const MolecularEntity& mentity,\n      const double& R, double eps, double lo=1e-12) : mentity(mentity)\n  {\n    bc=FunctionDefaults<3>::get_bc();\n    if (bc(0,0) == BC_PERIODIC)\n    {\n      rvecs = generate_R_vectors(world, 8.0*R);\n    }\n    else\n    {\n      rvecs.push_back({0.0,0.0,0.0});\n    }\n    const Tensor<double>& cell_width = FunctionDefaults<3>::get_cell_width();\n    double hi = cell_width.normf(); // Diagonal width of cell\n    if (bc(0,0) == BC_PERIODIC) hi *= 100;\n    else hi *= 5; // Extend range for periodic summation\n    const double pi = constants::pi;\n\n    print(\"hi:  \", hi);\n\n//    gen_ce(0.0,1e-5,eps,coeff,expnt);\n\n    // bsh_fit generates representation for 1/4Pir but we want 1/r\n    // so have to scale eps by 1/4Pi\n    bsh_fit(0.0, lo, hi, eps/(4.0*pi), &coeff, &expnt, false);\n\n    if (bc(0,0) == BC_PERIODIC) {\n        truncate_periodic_expansion(coeff, expnt, cell_width.max(), true);\n    }\n    coeff.scale(4.0*pi);\n\n    for (unsigned int i = 0; i < coeff.dim(0); i++)\n    {\n      coeff[i] = coeff[i]*R;\n      expnt[i] = expnt[i]*R*R;\n    }\n\n//    for (unsigned int i = 0; i < coeff.dim(0); i++)\n//    {\n//      print(\"i:  \", i,\"  coeff:  \", coeff[i], \"  expnt:  \", expnt[i]);\n//    }\n//\n//    for (unsigned int i = 0; i < rvecs.size(); i++)\n//    {\n//      Vector<double,3> rvec = rvecs[i];\n//      double R2 = rvec[0]*rvec[0] + rvec[1]*rvec[1] + rvec[2]*rvec[2];\n//      print(\"i:  \", i, \"  R:  \", rvecs[i], \"  R2:  \", R2);\n//    }\n  }\n\n//  double operator()(const coordT& r) const\n//  {\n//    double rval = 0.0;\n//    for (unsigned int ia = 0; ia < mentity.natom(); ia++)\n//    {\n//      Atom iatom = mentity.get_atom(ia);\n//      for (unsigned int mu = 0; mu < coeff.dim(0); mu++)\n//      {\n//        for (unsigned int ir = 0; ir < rvecs.size(); ir++)\n//        {\n//          Vector<double,3> rvec = rvecs[ir];\n//          Vector<double,3> tvec {r[0]-iatom.x-rvec[0],\n//                                 r[1]-iatom.y-rvec[1],\n//                                 r[2]-iatom.z-rvec[2]};\n//          double T2 = tvec[0]*tvec[0] + tvec[1]*tvec[1] + tvec[2]*tvec[2];\n//          rval += std::exp(-expnt[mu]*T2);\n//        }\n//        rval *= coeff[mu];\n//      }\n//      rval *= iatom.q;\n//    }\n//    return rval;\n//  }\n\n  double operator()(const coordT& r) const\n  {\n    double rval = 0.0;\n    for (unsigned int ia = 0; ia < mentity.natom(); ia++)\n    {\n      Atom iatom = mentity.get_atom(ia);\n      for (unsigned int ir = 0; ir < rvecs.size(); ir++)\n      {\n        Vector<double,3> rvec = rvecs[ir];\n        Vector<double,3> tvec {r[0]-iatom.x-rvec[0],\n                               r[1]-iatom.y-rvec[1],\n                               r[2]-iatom.z-rvec[2]};\n        double t1 = std::sqrt(tvec[0]*tvec[0] + tvec[1]*tvec[1] + tvec[2]*tvec[2]);\n        rval += -iatom.q*nuclear_potential(coeff,expnt,t1);\n      }\n    }\n    return rval;\n  }\n\n  Tensor<double> get_coeff() {return coeff;}\n  Tensor<double> get_expnt() {return expnt;}\n};\n//*************************************************************************\n\n//*************************************************************************\nclass MolecularNuclearChargeDensityFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    const MolecularEntity& _mentity;\n    const double R;\n    const bool periodic;\n    const std::vector<coordT> _specialpts;\n    double charge;\n\npublic:\n    MolecularNuclearChargeDensityFunctor(const MolecularEntity& mentity, const double& R,\n        const bool& periodic, const std::vector<coordT>& specialpts)\n      : _mentity(mentity), R(R), periodic(periodic), _specialpts(specialpts) {\n      charge = mentity.total_nuclear_charge();\n      print(\"charge is: \", charge);\n    }\n\n    virtual std::vector<coordT> special_points() const\n    {\n      return _specialpts;\n    }\n\n    virtual Level special_level()\n    {\n      return 10;\n    }\n\n    double operator()(const coordT& x) const\n    {\n        double big = 0.5*R + 6.0*_mentity.smallest_length_scale();\n//        double big = 2*R + 6.0*_mentity.smallest_length_scale();\n        // Only one contribution at any point due to the short\n        // range of the nuclear charge density\n        //printf(\"big: %10.8f\\n\\n\", big);\n        double value = 0.0;\n//        double value = charge;\n        if (periodic)\n        {\n            for (int xr = -1; xr <= 1; xr += 1)\n            {\n                double xx = x[0] + xr*R;\n                //printf(\"x[0]: %10.8f     xx: %10.8f\\n\", x[0], xx);\n                if (xx < big && xx > -big)\n                {\n                    for (int yr = -1; yr <= 1; yr += 1)\n                    {\n                        double yy = x[1] + yr*R;\n                        //printf(\"y[0]: %10.8f     yy: %10.8f\\n\", x[1], yy);\n                        if (yy < big && yy > -big)\n                        {\n                            for (int zr = -1; zr <= 1; zr += 1)\n                            {\n                                double zz = x[2] + zr*R;\n                                //printf(\"z[0]: %10.8f     zz: %10.8f\\n\", x[2], zz);\n                                if (zz < big && zz > -big)\n                                {\n                                    double t1 = _mentity.nuclear_charge_density(xx, yy, zz);\n                                    value += t1;\n                                    //printf(\"t1: %10.8f     value: %10.8f\\n\", t1, value);\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        else\n        {\n            value = _mentity.nuclear_charge_density(x[0], x[1], x[2]);\n        }\n        return value;\n    }\n};\n//*************************************************************************\n\n//*************************************************************************\nrfunctionT make_nuclear_charge_density(World& world,\n    const MolecularEntity& mentity, double thresh = 1e-6)\n{\n  std::vector<coordT> specialpts;\n  for (int i = 0; i < mentity.natom(); i++)\n  {\n    coordT pt(0.0);\n    Atom atom = mentity.get_atom(i);\n    pt[0] = atom.x; pt[1] = atom.y; pt[2] = atom.z;\n    specialpts.push_back(pt);\n//    if (world.rank() == 0) print(\"Special point: \", pt);\n  }\n\n  rfunctionT rhon = rfactoryT(world).functor(\n      rfunctorT(new MolecularNuclearChargeDensityFunctor(mentity, L, true, specialpts))).\n      thresh(thresh).initial_level(6).truncate_on_project();\n\n  return rhon;\n\n}\n//*************************************************************************\n\n//*************************************************************************\nrvecfuncT make_nuclear_charge_density_individual(World& world,\n            const MolecularEntity& mentity, double thresh)\n{\n  rvecfuncT ndensity;\n  for (int i = 0; i < mentity.natom(); i++)\n  {\n    // do special points for single density\n    coordT pt(0.0);\n    Atom atom = mentity.get_atom(i);\n    pt[0] = atom.x; pt[1] = atom.y; pt[2] = atom.z;\n    std::vector<coordT> specialpts;\n    specialpts.push_back(pt);\n    // create single density\n    MolecularEntity m = mentity.get_entity(i);\n    rfunctionT rho_i = rfactoryT(world).functor(\n        rfunctorT(new MolecularNuclearChargeDensityFunctor(m, L, true, specialpts))).\n        thresh(thresh).initial_level(6).truncate_on_project();\n    ndensity.push_back(rho_i);\n  }\n  return ndensity;\n}\n//*************************************************************************\n\n//*************************************************************************\n\n//*************************************************************************\n\n//***************************************************************************\nvoid test_gaussian_num_coeffs(int argc, char** argv)\n{\n  initialize(argc, argv);\n\n  World world(SafeMPI::COMM_WORLD);\n\n  try {\n      // Load info for MADNESS numerical routines\n      startup(world,argc,argv);\n      std::cout.precision(6);\n      FunctionDefaults<3>::set_thresh(1e-6);\n      FunctionDefaults<3>::set_k(10);\n      FunctionDefaults<3>::set_bc(BoundaryConditions<3>(BC_PERIODIC));\n      FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n\n      // Create normalized gaussian function with wide ranging exponents\n      for (int in = 0; in < 20; in++)\n      {\n        int n = in - 8;\n        double expnt = std::pow(2.0, (int) n);\n        double coeff = std::pow(expnt/constants::pi, 1.5);\n        rfunctionT fexp = rfactoryT(world).functor(\n            rfunctorT(new GaussianFunctor(coeff,expnt))).truncate_on_project();\n        // how many nodes needed to represent function\n        int maxnodes = fexp.max_nodes();\n        double tr = fexp.trace();\n        // full-width half maximum\n        double fwhm = 2*std::log(2)/expnt;\n        // full-width 1/10th maximum\n        double fwtm = 2*std::log(10)/expnt;\n        if (world.rank() == 0) print(\"n:  \", n, \"  coeff:  \", coeff, \"  expnt:  \",\n            expnt, \"  trace:  \", tr, \"  max nodes:  \", maxnodes, \"  fwhm:  \", fwhm);\n      }\n\n  } catch (const SafeMPI::Exception& e) {\n      print(e);\n      error(\"caught an MPI exception\");\n  } catch (const madness::MadnessException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a MADNESS exception\");\n  } catch (const madness::TensorException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a Tensor exception\");\n  } catch (const char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (const std::string& s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string (class) exception\");\n  } catch (const std::exception& e) {\n      if (world.rank() == 0) print(e.what());\n      error(\"caught an STL exception\");\n  } catch (...) {\n      error(\"caught unhandled exception\");\n  }\n\n  finalize();\n\n\n}\n//***************************************************************************\n\n\n//*************************************************************************\nvoid compute_madelung_energy_PWSCF(World& world, MolecularEntity mentity,\n    double alpha = 8.5, double rmax = 100.0, double gmax = 100.0)\n{\n  // generate real and reciprocal lattice vectors\n  std::vector< Vector<double,3> > rvecs = generate_R_vectors(world, rmax);\n  std::vector< Vector<double,3> > gvecs = generate_G_vectors(world, gmax);\n  if (world.rank() == 0)\n    printf(\"rvecs size: %d     gvecs size: %d\\n\", rvecs.size(), gvecs.size());\n  // number of atoms in unit cell\n  unsigned int natoms = mentity.natom();\n  // other parameters\n  const double TWOPI = 2*constants::pi;\n  double v = compute_volume();\n\n  if (world.rank() == 0) mentity.print();\n\n  // RECIPROCAL SPACE SUM\n  int NG = 7;\n  double charge = mentity.total_nuclear_charge();\n  double_complex s1 = -charge*charge/alpha/alpha/4.0;\n    // skip G=0\n    for (unsigned int ig = 1; ig < gvecs.size(); ig++)\n//    for (unsigned int ig = 1; ig < NG; ig++)\n    {\n      Vector<double,3> gvec = gvecs[ig];\n      double G2 = gvec[0]*gvec[0] + gvec[1]*gvec[1] + gvec[2]*gvec[2];\n      double_complex rhon = double_complex(0.0,0.0);\n      for (unsigned int ia = 0; ia < natoms; ia++)\n      {\n        Atom iatom = mentity.get_atom(ia);\n        Vector<double,3> tvec {1*(-iatom.x),\n                               1*(-iatom.y),\n                               1*(-iatom.z)};\n        double_complex t1 = std::exp(double_complex(0.0,gvec[0]*tvec[0] +\n                                     gvec[1]*tvec[1] + gvec[2]*tvec[2]));\n        rhon += iatom.q*t1;\n      }\n//      print(\"rhon:   \", std::abs(rhon));\n      s1 += std::abs(rhon)*std::abs(rhon)*std::exp(-G2/(4.0*alpha*alpha))/G2;\n//      print(\"extra amount:     \", std::abs(rhon)*std::abs(rhon)*std::exp(-G2/(4.0*alpha*alpha))/G2);\n    }\n  s1 *= 2.0*TWOPI/v;\n\n//  // REAL SPACE SUM\n  double_complex s2 = 0.0;\n  // loop over R-lattice vectors\n  for (unsigned int ir = 0; ir < rvecs.size(); ir++)\n  {\n    Vector<double,3> rvec = rvecs[ir];\n    // loop through the atoms in the unit cell\n    for (unsigned int ia = 0; ia < natoms; ia++)\n    {\n      for (unsigned int ja = 0; ja < natoms; ja++)\n      {\n        // do not include term if R=(0.0,0.0,0.0) and i==j\n        if ((ir > 0) || ((ir==0) && (ia != ja)))\n        {\n          Atom iatom = mentity.get_atom(ia);\n          Atom jatom = mentity.get_atom(ja);\n          Vector<double,3> dvec {L*(iatom.x-jatom.x),\n                                 L*(iatom.y-jatom.y),\n                                 L*(iatom.z-jatom.z)};\n          Vector<double,3> tvec {dvec[0]+rvec[0],\n                                 dvec[1]+rvec[1],\n                                 dvec[2]+rvec[2]};\n          double tnorm = std::sqrt(tvec[0]*tvec[0] + tvec[1]*tvec[1] +\n                                   tvec[2]*tvec[2]);\n//              s2 += iatom.q*jatom.q*(1.0 - erf(alpha*tnorm))/tnorm;\n          s2 += iatom.q*jatom.q*(erfc(alpha*tnorm))/tnorm;\n        }\n      }\n    }\n  }\n  s2 *= 0.5;\n//\n  double_complex s3 = 0.0;\n  if (world.rank() == 0) printf(\"\\n\");\n  double sqrtpi = std::sqrt(constants::pi);\n  for (unsigned int ia = 0; ia < natoms; ia++)\n  {\n    Atom iatom = mentity.get_atom(ia);\n//    printf(\"atom %d    charge: %8.4f\\n\",ia,iatom.q);\n    s3 += 2.0*iatom.q*iatom.q*alpha/sqrtpi;\n//    s3 += iatom.q*iatom.q*alpha*std::sqrt(8.0/TWOPI);\n//    print(\"update energy: \", 2.0*iatom.q*iatom.q*alpha/sqrtpi);\n  }\n//  print(\"value: \", 2*alpha/sqrtpi);\n\n\n  double energy = std::real(s1 + s2 - s3);\n\n  if (world.rank()==0)\n  {\n    printf(\"alpha: %8.4f G-sum: %8.4f  R-sum: %8.4f  total energy:  %15.7f\\n\",\n        alpha, std::real(s1-s3), std::real(s2), energy);\n  }\n}\n//*************************************************************************\n\n//*************************************************************************\nvoid compute_madelung_energy(World& world, MolecularEntity mentity,\n    double alpha = 1.5, double rmax = 200.0, double gmax = 200.0)\n{\n  // generate real and reciprocal lattice vectors\n  std::vector< Vector<double,3> > rvecs = generate_R_vectors(world, rmax);\n  std::vector< Vector<double,3> > gvecs = generate_G_vectors(world, gmax);\n  if (world.rank() == 0)\n    printf(\"rvecs size: %d     gvecs size: %d\\n\", rvecs.size(), gvecs.size());\n  // number of atoms in unit cell\n  unsigned int natoms = mentity.natom();\n  // other parameters\n  const double TWOPI = 2*constants::pi;\n  double v = compute_volume();\n  double charge = -mentity.total_nuclear_charge();\n\n  // RECIPROCAL SPACE SUM\n  double_complex s1 = 0.0;\n  // skip G=0\n  for (unsigned int ig = 1; ig < gvecs.size(); ig++)\n  //for (unsigned int ig = 1; ig < 7; ig++)\n  {\n    Vector<double,3> gvec = gvecs[ig];\n    double G2 = gvec[0]*gvec[0] + gvec[1]*gvec[1] + gvec[2]*gvec[2];\n    double_complex rhon = double_complex(0.0,0.0);\n    for (unsigned int ia = 0; ia < natoms; ia++)\n    {\n      Atom iatom = mentity.get_atom(ia);\n      Vector<double,3> tvec {1*(iatom.x),\n                             1*(iatom.y),\n                             1*(iatom.z)};\n      double_complex t1 = std::exp(double_complex(0.0,gvec[0]*tvec[0] +\n                                   gvec[1]*tvec[1] + gvec[2]*tvec[2]));\n      rhon += iatom.q*t1;\n    }\n    s1 += std::abs(rhon)*std::abs(rhon)*std::exp(-G2/(4.0*alpha*alpha))/G2;\n//    print(\"abs(rhon):  \", std::abs(rhon), \"  G1:  \", std::sqrt(G2), \"     g-update: \",\n//        std::abs(rhon)*std::abs(rhon)*std::exp(-G2/(4.0*alpha*alpha))/G2);\n\n  }\n  s1 *= TWOPI/v;\n\n//  print(\"reciprocal space sum:  \", s1);\n\n  // REAL SPACE SUM\n  double_complex s2 = 0.0;\n  // loop over R-lattice vectors\n  for (unsigned int ir = 0; ir < rvecs.size(); ir++)\n//    for (unsigned int ir = 0; ir < 7; ir++)\n  {\n    Vector<double,3> rvec = rvecs[ir];\n    // loop through the atoms in the unit cell\n    for (unsigned int ia = 0; ia < natoms; ia++)\n    {\n      for (unsigned int ja = 0; ja <= ia ; ja++)\n      {\n        // do not include term if R=(0.0,0.0,0.0) and i==j\n        if ((ir > 0) || ((ir==0) && (ia != ja)))\n        {\n          Atom iatom = mentity.get_atom(ia);\n          Atom jatom = mentity.get_atom(ja);\n          Vector<double,3> dvec {1*(iatom.x-jatom.x),\n                                 1*(iatom.y-jatom.y),\n                                 1*(iatom.z-jatom.z)};\n          Vector<double,3> tvec {dvec[0]+rvec[0],\n                                 dvec[1]+rvec[1],\n                                 dvec[2]+rvec[2]};\n          double tnorm = std::sqrt(tvec[0]*tvec[0] + tvec[1]*tvec[1] +\n                                   tvec[2]*tvec[2]);\n//              s2 += iatom.q*jatom.q*(1.0 - erf(alpha*tnorm))/tnorm;\n          s2 += 0.5*iatom.q*jatom.q*(erfc(alpha*tnorm))/tnorm;\n//          print(\"tnorm:  \", tnorm, \"     r-update: \", iatom.q*jatom.q*(erfc(alpha*tnorm))/tnorm);\n        }\n      }\n    }\n  }\n\n  double_complex s3 = 0.0;\n  double sqrtpi = std::sqrt(constants::pi);\n  for (unsigned int ia = 0; ia < natoms; ia++)\n  {\n    Atom iatom = mentity.get_atom(ia);\n    s3 += iatom.q*iatom.q*alpha/sqrtpi;\n  }\n\n  // MISC. TERM\n  double s4 = -charge*charge/alpha/alpha/4.0;\n\n\n  double energy = std::abs(s1) + std::abs(s2) - std::abs(s3);\n\n  if (world.rank()==0)\n  {\n    printf(\"G-sum:  %8.4f    %8.4f\\n\",std::real(s1), std::imag(s1));\n    printf(\"R-sum:  %8.4f    %8.4f\\n\",std::real(s2), std::imag(s2));\n    printf(\"C-sum:  %8.4f    %8.4f\\n\",std::real(s3), std::imag(s3));\n    printf(\"C2-sum: %8.4f\\n\",s4);\n    printf(\"sum1:   %8.4f\\n\\n\", std::abs(s1-s3+s2));\n    printf(\"sum2:   %8.4f\\n\\n\", std::abs(s1-s3+s2+s4));\n    printf(\"\\n\\nalpha: %8.4f G-sum: %8.4f  C-sum: %8.4f  R-sum: %8.4f  total energy:  %15.7f\\n\",\n        alpha, std::abs(s1), std::abs(s3), std::abs(s2), energy);\n//    printf(\"%8.4f   %15.7f\\n\",\n//        alpha, energy);\n  }\n}\n//*************************************************************************\n\n//*************************************************************************\nvoid test_gence(int argc, char** argv)\n{\n  Tensor<double> c,e;\n  gen_ce(0.0, 1e-8, 1e-12, c, e);\n  unsigned int npts = 250;\n  double LL = 100.0;\n  for (unsigned int i = 1; i < npts; i++)\n  {\n    double r = i*LL/npts;\n    double val = 0.0;\n    for (unsigned int mu = 0; mu < c.dim(0); mu++)\n    {\n      val += c[mu]*std::exp(-e[mu]*r*r);\n    }\n    double val2 = 1/r;\n    double rerr = std::abs(val-val2)/val;\n    printf(\"%10.5f  %15.10e  %15.10e  %15.10e\\n\", r, val2, val, rerr);\n  }\n}\n//*************************************************************************\n\n//*************************************************************************\nvoid test_gence2(int argc, char** argv)\n{\n  Tensor<double> c,e;\n//  gen_ce(0.0, 1e-8, 1e-12, c, e);\n  // bsh_fit generates representation for 1/4Pir but we want 1/r\n  // so have to scale eps by 1/4Pi\n  double lo = 1e-8;\n  double eps = 1e-12;\n  bsh_fit(0.0, lo, 100.0*L, eps/(4.0*constants::pi), &c, &e, false);\n\n//  if (bc(0,0) == BC_PERIODIC) {\n//      truncate_periodic_expansion(c, e, cell_width.max(), true);\n//  }\n  c.scale(4.0*constants::pi);\n\n  for (unsigned int i = 0; i < c.dim(0); i++)\n  {\n    c[i] = c[i]*L;\n    e[i] = e[i]*L*L;\n  }\n\n\n  unsigned int npts = 250;\n  double LL = 100.0;\n  for (unsigned int i = 1; i < npts; i++)\n  {\n    double r = i*LL/npts;\n    double val = nuclear_potential(c, e, r);\n    double val2 = 1/r;\n    double rerr = std::abs(val-val2)/val;\n    printf(\"%10.5f  %15.10e  %15.10e  %15.10e\\n\", r, val2, val, rerr);\n  }\n}\n//*************************************************************************\n\n//*************************************************************************\nvoid test_nuclear_potential2(int argc, char** argv)\n{\n  initialize(argc, argv);\n\n  World world(SafeMPI::COMM_WORLD);\n\n  try {\n      // Load info for MADNESS numerical routines\n      startup(world,argc,argv);\n      std::cout.precision(6);\n      FunctionDefaults<3>::set_thresh(1e-6);\n      FunctionDefaults<3>::set_k(8);\n      FunctionDefaults<3>::set_bc(BoundaryConditions<3>(BC_FREE));\n      FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n\n      MolecularEntity mentity;\n      mentity.add_atom(0.0,0.0,0.0,1.0,1.0);\n      mentity.center();\n\n      MolecularNuclearPotentialFunctor2 npoty(world, mentity, L, 1e-16);\n      if (world.rank() == 0) mentity.print();\n\n      Tensor<double> c = npoty.get_coeff();\n      Tensor<double> e = npoty.get_expnt();\n\n      unsigned int npts = 153;\n      for (unsigned int ir = 1; ir < npts; ir++)\n      {\n        double rpt = ir*L/npts-L/2;\n        coordT pt(rpt);\n        double npotpt = npoty(pt);\n        rpt *= std::sqrt(3);\n        double npotpt2 = -1/std::abs(rpt);\n        double nerror = std::abs((npotpt-npotpt2)/npotpt2);\n        if (world.rank() == 0) printf(\"%10.5f     %15.10e     %15.10e     %15.10e\\n\", rpt, npotpt, npotpt2, nerror);\n      }\n\n  } catch (const SafeMPI::Exception& e) {\n      print(e);\n      error(\"caught an MPI exception\");\n  } catch (const madness::MadnessException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a MADNESS exception\");\n  } catch (const madness::TensorException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a Tensor exception\");\n  } catch (const char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (const std::string& s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string (class) exception\");\n  } catch (const std::exception& e) {\n      if (world.rank() == 0) print(e.what());\n      error(\"caught an STL exception\");\n  } catch (...) {\n      error(\"caught unhandled exception\");\n  }\n\n  finalize();\n}\n//*************************************************************************\n\n//*************************************************************************\nvoid test_nuclear_potential(int argc, char** argv)\n{\n  initialize(argc, argv);\n\n  World world(SafeMPI::COMM_WORLD);\n\n  try {\n      // Load info for MADNESS numerical routines\n      startup(world,argc,argv);\n      std::cout.precision(6);\n      FunctionDefaults<3>::set_thresh(1e-6);\n      FunctionDefaults<3>::set_k(8);\n      FunctionDefaults<3>::set_bc(BoundaryConditions<3>(BC_PERIODIC));\n      FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n\n      MolecularEntity mentity;\n      mentity.add_atom(0.0,0.0,0.0,7,9);\n      mentity.add_atom(L/2,L/2,L/2,1,3);\n      mentity.center();\n\n//      if (world.rank() == 0) print(\"Making Ewald nuclear potential ...\");\n//      rfunctionT npot2 = rfactoryT(world).functor(\n//          rfunctorT(new EwaldNuclearPotentialFunctor(world, &mentity, 0.2))).\n//          thresh(1e-6).initial_level(6).truncate_on_project();\n      if (world.rank() == 0) print(\"Making charge density ...\");\n      rfunctionT ndensity = make_nuclear_charge_density(world,mentity,1e-6);\n      if (world.rank() == 0) print(\"Setting avg value of charge density to zero ...\");\n      double ndensav = ndensity.trace();\n      if (world.rank() == 0) print(\"avg value of charge density: \", ndensav);\n      rfunctionT avgval = rfactoryT(world).functor(rfunctorT(new OnesFunctor(ndensav)));\n      //ndensity -= avgval;\n\n      print(\"mentity total charge:  \", mentity.total_nuclear_charge());\n\n      SeparatedConvolution<double,3> cop =\n          CoulombOperator(world,1e-2,FunctionDefaults<3>::get_thresh() * 0.1);\n      if (world.rank() == 0) print(\"Making normal nuclear potential ...\");\n      rfunctionT npot1 = apply(cop,ndensity);\n      if (world.rank() == 0) print(\"Creating difference potential ...\");\n//      rfunctionT npotd = npot1-npot2;\n//      double nptr = npotd.trace();\n//      if (world.rank() == 0) print(\"The trace of the difference of potentials: \", nptr);\n\n//      if (world.rank() == 0) print(\"Making *new* nuclear potential ...\");\n//      rfunctionT vnuc2 = rfactoryT(world).functor(\n//          rfunctorT(new MolecularNuclearPotentialFunctor2(world, mentity, L, 1e-8))).\n//          truncate_on_project();\n//      if (world.rank() == 0) print(\"Done making normal nuclear potential ...\");\n\n\n      //      EwaldNuclearPotentialFunctor ewaldf(world, &mentity, 0.7);\n      //      EwaldNuclearPotentialFunctor ewaldf1(world, &mentity, 1.1);\n      //      EwaldNuclearPotentialFunctor ewaldf2(world, &mentity, 2.0);\n      EwaldNuclearPotentialFunctor ewaldf(world, &mentity, 0.05);\n      EwaldNuclearPotentialFunctor ewaldf1(world, &mentity, 0.2);\n      EwaldNuclearPotentialFunctor ewaldf2(world, &mentity, 0.4);\n      MolecularNuclearPotentialFunctor2 mnpotf(world, mentity, L , 1e-7, 1e-2);\n      unsigned int npts = 250;\n      for (unsigned int ir = 0; ir < npts; ir++)\n      {\n        double rpt = ir*L/npts-L/2;\n        coordT pt(rpt);\n        double npot1pt = npot1(pt);\n        double npot2pt = ewaldf(pt);\n        double npot3pt = ewaldf1(pt);\n        double npot4pt = ewaldf2(pt);\n        double npot5pt = mnpotf(pt);\n        double nerror2 = std::abs(npot1pt-npot2pt);\n        double nerror3 = std::abs(npot1pt-npot3pt);\n        double nerror4 = std::abs(npot1pt-npot4pt);\n        double nerror5 = std::abs(npot1pt-npot5pt);\n//        if (world.rank() == 0) print(rpt, \"  \", npot1pt, \"  \", npot2pt,\n//            \"  \", npot3pt, \"  \", npot4pt, \"  \", nerror2, nerror3, nerror4);\n//        if (world.rank() == 0) print(rpt, \"  \", npot1pt, \"  \", npot3pt, \"  \",\n//            npot5pt, \"  \", nerror3, \"  \", nerror5);\n        if (world.rank() == 0)\n          printf(\"%10.7e  %10.7e  %10.7e  %10.7e  %10.7e  %10.7e  %10.7e  %10.7e  %10.7e  %10.7e\\n\",\n            rpt, npot1pt, npot2pt, npot3pt, npot4pt, npot5pt,\n            nerror2, nerror3, nerror4, nerror5);\n      }\n\n  } catch (const SafeMPI::Exception& e) {\n      print(e);\n      error(\"caught an MPI exception\");\n  } catch (const madness::MadnessException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a MADNESS exception\");\n  } catch (const madness::TensorException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a Tensor exception\");\n  } catch (const char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (const std::string& s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string (class) exception\");\n  } catch (const std::exception& e) {\n      if (world.rank() == 0) print(e.what());\n      error(\"caught an STL exception\");\n  } catch (...) {\n      error(\"caught unhandled exception\");\n  }\n\n  finalize();\n\n\n}\n//*************************************************************************\n\n//*************************************************************************\nvoid test_nuclear_potential3(int argc, char** argv)\n{\n  initialize(argc, argv);\n\n  World world(SafeMPI::COMM_WORLD);\n\n  try {\n      // Load info for MADNESS numerical routines\n      startup(world,argc,argv);\n      std::cout.precision(6);\n      FunctionDefaults<3>::set_thresh(1e-6);\n      FunctionDefaults<3>::set_k(8);\n      FunctionDefaults<3>::set_bc(BoundaryConditions<3>(BC_PERIODIC));\n      FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n\n      MolecularEntity mentity;\n      mentity.add_atom(0.0,0.0,0.0,7,9);\n      mentity.add_atom(L/2,L/2,L/2,1,3);\n      mentity.center();\n\n      if (world.rank() == 0) print(\"Making charge density ...\");\n      rfunctionT ndensity2 = make_nuclear_charge_density(world,mentity,1e-2);\n      rfunctionT ndensity4 = make_nuclear_charge_density(world,mentity,1e-4);\n      rfunctionT ndensity6 = make_nuclear_charge_density(world,mentity,1e-6);\n      rfunctionT ndensity8 = make_nuclear_charge_density(world,mentity,1e-8);\n\n      if (world.rank() == 0) print(\"Making normal nuclear potential (1e-2) ...\");\n      SeparatedConvolution<double,3> cop2 =\n          CoulombOperator(world,1e-2,1e-2);\n      rfunctionT npot2 = apply(cop2,ndensity2);\n      if (world.rank() == 0) print(\"Making normal nuclear potential (1e-4) ...\");\n      SeparatedConvolution<double,3> cop4 =\n          CoulombOperator(world,1e-2,1e-4);\n      rfunctionT npot4 = apply(cop4,ndensity4);\n      if (world.rank() == 0) print(\"Making normal nuclear potential (1e-6) ...\");\n      SeparatedConvolution<double,3> cop6 =\n          CoulombOperator(world,1e-2,1e-6);\n      rfunctionT npot6 = apply(cop6,ndensity6);\n      if (world.rank() == 0) print(\"Making normal nuclear potential (1e-8) ...\");\n      SeparatedConvolution<double,3> cop8 =\n          CoulombOperator(world,1e-2,1e-8);\n      rfunctionT npot8 = apply(cop8,ndensity8);\n\n      unsigned int npts = 250;\n      for (unsigned int ir = 0; ir < npts; ir++)\n      {\n        double rpt = ir*L/npts-L/2;\n        coordT pt(rpt);\n        double npot2pt = npot2(pt);\n        double npot4pt = npot4(pt);\n        double npot6pt = npot6(pt);\n        double npot8pt = npot8(pt);\n        double nerror2 = std::abs(npot8pt-npot2pt);\n        double nerror4 = std::abs(npot8pt-npot4pt);\n        double nerror6 = std::abs(npot8pt-npot6pt);\n        double nerror8 = std::abs(npot8pt-npot8pt);\n        if (world.rank() == 0)\n          printf(\"%10.7e  %10.7e  %10.7e  %10.7e  %10.7e  %10.7e  %10.7e  %10.7e  %10.7e\\n\",\n            rpt, npot2pt, npot4pt, npot6pt, npot8pt,\n            nerror2, nerror4, nerror6, nerror8);\n      }\n\n  } catch (const SafeMPI::Exception& e) {\n      print(e);\n      error(\"caught an MPI exception\");\n  } catch (const madness::MadnessException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a MADNESS exception\");\n  } catch (const madness::TensorException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a Tensor exception\");\n  } catch (const char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (const std::string& s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string (class) exception\");\n  } catch (const std::exception& e) {\n      if (world.rank() == 0) print(e.what());\n      error(\"caught an STL exception\");\n  } catch (...) {\n      error(\"caught unhandled exception\");\n  }\n\n  finalize();\n\n\n}\n//*************************************************************************\n\nvoid test_nuclear_potential_big_unit_cell(int argc, char** argv)\n{\n  initialize(argc, argv);\n\n  World world(SafeMPI::COMM_WORLD);\n\n  try {\n      // Load info for MADNESS numerical routines\n      startup(world,argc,argv);\n      std::cout.precision(6);\n      FunctionDefaults<3>::set_thresh(1e-6);\n      FunctionDefaults<3>::set_k(8);\n//      FunctionDefaults<3>::set_bc(BoundaryConditions<3>(BC_PERIODIC));\n      FunctionDefaults<3>::set_bc(BoundaryConditions<3>(BC_FREE));\n      FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n\n      MolecularEntity mentity;\n      mentity.add_atom(0.0,0.0,0.0,7,9);\n      mentity.add_atom(L/2,L/2,L/2,1,3);\n      mentity.center();\n\n      if (world.rank() == 0) print(\"Making charge density ...\");\n      rfunctionT ndensity = make_nuclear_charge_density(world,mentity,1e-6);\n      SeparatedConvolution<double,3> cop =\n          CoulombOperator(world,1e-2,FunctionDefaults<3>::get_thresh() * 0.1);\n      if (world.rank() == 0) print(\"Making normal nuclear potential ...\");\n      rfunctionT npot1 = apply(cop,ndensity);\n      if (world.rank() == 0) print(\"Creating difference potential ...\");\n      unsigned int npts = 250;\n\n      Atom at0 = mentity.get_atom(0);\n      Atom at1 = mentity.get_atom(1);\n      mentity.print();\n      for (unsigned int ir = 0; ir < npts; ir++)\n      {\n        double rpt = ir*L/npts-L/2;\n        coordT pt(rpt);\n        double npot1pt = npot1(pt);\n        double npot2pt = -at0.q/std::sqrt((rpt-at0.x)*(rpt-at0.x) +\n            (rpt-at0.y)*(rpt-at0.y) + (rpt-at0.z)*(rpt-at0.z)) -\n            at1.q/std::sqrt((rpt-at1.x)*(rpt-at1.x) +\n                (rpt-at1.y)*(rpt-at1.y) + (rpt-at1.z)*(rpt-at1.z));\n        if (world.rank() == 0) print(rpt, \"  \", npot1pt, \"  \", npot2pt);\n      }\n\n  } catch (const SafeMPI::Exception& e) {\n      print(e);\n      error(\"caught an MPI exception\");\n  } catch (const madness::MadnessException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a MADNESS exception\");\n  } catch (const madness::TensorException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a Tensor exception\");\n  } catch (const char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (const std::string& s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string (class) exception\");\n  } catch (const std::exception& e) {\n      if (world.rank() == 0) print(e.what());\n      error(\"caught an STL exception\");\n  } catch (...) {\n      error(\"caught unhandled exception\");\n  }\n\n  finalize();\n\n\n}\n//*************************************************************************\n\n\n//*************************************************************************\nvoid test_G_R_vectors(int argc, char** argv)\n{\n  initialize(argc, argv);\n\n  World world(SafeMPI::COMM_WORLD);\n\n  try {\n      // Load info for MADNESS numerical routines\n      startup(world,argc,argv);\n\n      std::vector<Vector<double,3> > gvecs = generate_G_vectors(world,50.0);\n      std::vector<Vector<double,3> > rvecs = generate_R_vectors(world,150.0);\n\n      for (unsigned int ir = 0; ir < rvecs.size(); ir++)\n      {\n        Vector<double,3> rvec = rvecs[ir];\n        for (unsigned int ig = 0; ig < gvecs.size(); ig++)\n        {\n          Vector<double,3> gvec = gvecs[ig];\n          double t1 = rvec[0]*gvec[0] + rvec[1]*gvec[1] + rvec[2]*gvec[2];\n          double_complex t2 = std::exp(double_complex(0.0,t1));\n          MADNESS_ASSERT(std::abs(std::imag(t2)) < 1e-10);\n        }\n      }\n\n  } catch (const SafeMPI::Exception& e) {\n      print(e);\n      error(\"caught an MPI exception\");\n  } catch (const madness::MadnessException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a MADNESS exception\");\n  } catch (const madness::TensorException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a Tensor exception\");\n  } catch (const char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (const std::string& s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string (class) exception\");\n  } catch (const std::exception& e) {\n      if (world.rank() == 0) print(e.what());\n      error(\"caught an STL exception\");\n  } catch (...) {\n      error(\"caught unhandled exception\");\n  }\n\n  finalize();\n}\n//*************************************************************************\n\n//*************************************************************************\nvoid test_nuclear_energy(int argc, char** argv)\n{\n  initialize(argc, argv);\n\n  World world(SafeMPI::COMM_WORLD);\n\n  try {\n      // Load info for MADNESS numerical routines\n      startup(world,argc,argv);\n      std::cout.precision(6);\n      FunctionDefaults<3>::set_thresh(1e-6);\n      FunctionDefaults<3>::set_k(8);\n      FunctionDefaults<3>::set_bc(BoundaryConditions<3>(BC_PERIODIC));\n      FunctionDefaults<3>::set_cubic_cell(0,L);\n\n      MolecularEntity mentity;\n      mentity.add_atom(0.0,0.0,0.0,7,9);\n      mentity.add_atom(L/2,L/2,L/2,1,3);\n      mentity.center();\n\n      if (world.rank() == 0) mentity.print();\n\n//        int ntype = mentity.get_num_types();\n//        int n1 = mentity.get_num_atoms_type(9);\n//        int n2 = mentity.get_num_atoms_type(3);\n//        printf(\"Number of type of atoms: %d\\n\", ntype);\n//        printf(\"F: %d\\n\", n1);\n//        printf(\"Li: %d\\n\", n2);\n\n//        for (unsigned int i = 0; i < mentity.atoms.size(); i++)\n//        {\n//          printf(\"atom %d --- (%8.4f, %8.4f, %8.4f)\\n\");\n//        }\n\n\n//        for (unsigned int i = 0; i < 800; i++)\n//        {\n//          compute_madelung_energy2(world, mentity, 0.05 + i*0.005);\n//        }\n\n//        compute_madelung_energy_PWSCF(world,mentity,1.14017543,100.0,100.0);\n      compute_madelung_energy_PWSCF(world,mentity,1.2,50.0,100.0);\n      compute_madelung_energy_PWSCF(world,mentity,1.25,50.0,100.0);\n      compute_madelung_energy_PWSCF(world,mentity,1.3,50.0,100.0);\n      compute_madelung_energy_PWSCF(world,mentity,1.35,50.0,100.0);\n      compute_madelung_energy_PWSCF(world,mentity,1.4,50.0,100.0);\n      compute_madelung_energy_PWSCF(world,mentity,1.45,50.0,100.0);\n//      compute_madelung_energy_PWSCF(world,mentity,0.3,50.0,100.0);\n\n//        for (unsigned i = 0; i < 20; i++)\n//        {\n//          compute_madelung_energy2(world, mentity, 0.004, 0.0+i*50.0, 200.0);\n//        }\n\n//        compute_madelung_energy2(world, mentity, 1.2, 100.0, 100.0);\n//        compute_madelung_energy2(world, mentity, 1.3, 100.0, 100.0);\n//        compute_madelung_energy2(world, mentity, 1.4, 100.0, 100.0);\n//        compute_madelung_energy2(world, mentity, 1.5, 100.0, 100.0);\n\n  } catch (const SafeMPI::Exception& e) {\n      print(e);\n      error(\"caught an MPI exception\");\n  } catch (const madness::MadnessException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a MADNESS exception\");\n  } catch (const madness::TensorException& e) {\n      if (world.rank() == 0) print(e);\n      error(\"caught a Tensor exception\");\n  } catch (const char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (char* s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string exception\");\n  } catch (const std::string& s) {\n      if (world.rank() == 0) print(s);\n      error(\"caught a string (class) exception\");\n  } catch (const std::exception& e) {\n      if (world.rank() == 0) print(e.what());\n      error(\"caught an STL exception\");\n  } catch (...) {\n      error(\"caught unhandled exception\");\n  }\n\n  finalize();\n\n\n}\n//*************************************************************************\n\nint main(int argc, char** argv)\n{\n//    test_nuclear_energy(argc,argv);\n  //test_gaussian_num_coeffs(argc,argv);\n  test_nuclear_potential3(argc,argv);\n  //test_gence2(argc,argv);\n  //test_G_R_vectors(argc,argv);\n  return 0;\n}\n\n"
  },
  {
    "path": "src/apps/periodic_old/hartreefock.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#include \"hartreefock.h\"\n\nnamespace madness\n{\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  HartreeFockNuclearPotentialOp<T,NDIM>::HartreeFockNuclearPotentialOp(World& world,\n    funcT V, double coeff, double thresh) :\n  EigSolverOp<T,NDIM>(world, coeff, thresh)\n  {\n    // Message for the matrix element output\n    this->messageME(\"HartreeFockNuclearPotentialOp\");\n    _V = V;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  HartreeFockCoulombOp<T,NDIM>::HartreeFockCoulombOp(World& world, double coeff,\n      double thresh) : EigSolverOp<T,NDIM>(world, coeff, thresh)\n  {\n    // Message for the matrix element output\n    this->messageME(\"HartreeFockCoulombOp\");\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  HartreeFockExchangeOp<T,NDIM>::HartreeFockExchangeOp(World& world, double coeff,\n      double thresh) : EigSolverOp<T,NDIM>(world, coeff, thresh)\n  {\n    // Message for the matrix element output\n    this->messageME(\"HartreeFockExchangeOp\");\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  Function<T,NDIM> HartreeFockNuclearPotentialOp<T,NDIM>::op_r(const funcT& rho, const funcT& rhon, const funcT& psi)\n  {\n    funcT rfunc = _V*psi;\n    return rfunc;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  Function<T,NDIM> HartreeFockCoulombOp<T,NDIM>::op_r(const funcT& rho, const funcT& rhon, const funcT& psi)\n  {\n    // Create Coulomb operator\n    SeparatedConvolution<T,3> cop =\n      CoulombOperator<T,3>(this->world(), FunctionDefaults<3>::get_k(), 1e-4, this->thresh());\n    // Apply the Coulomb operator\n    funcT Vc = apply(cop, rho);\n    funcT rfunc = Vc*psi;\n    return  rfunc;\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  Function<T,NDIM> HartreeFockExchangeOp<T,NDIM>::op_o(const std::vector<funcT>& phis, const funcT& rhon, const funcT& psi)\n  {\n    // Return value\n    funcT rfunc = FunctionFactory<T,3>(this->world());\n    // Create Coulomb operator\n    SeparatedConvolution<T,NDIM> cop = CoulombOperator<T,NDIM>(this->world(),\n        FunctionDefaults<3>::get_k(), 1e-4, this->thresh());\n    // Use the psi and pj wavefunctions to build a product so that the K\n    // operator can be applied to the wavefunction indexed by pj, NOT PSI.\n    for (typename std::vector<funcT>::const_iterator pj = phis.begin(); pj != phis.end(); ++pj)\n    {\n      // Get phi(j) from iterator\n      const funcT& phij = (*pj);\n      // NOTE that psi is involved in this calculation\n      funcT prod = phij*psi;\n      // Transform Coulomb operator into a function (stubbed)\n      prod.truncate(this->thresh());\n      funcT Vex = apply(cop, prod);\n      // NOTE that the index is j.\n      rfunc += Vex*phij;\n    }\n    return rfunc;\n\n  }\n  //*************************************************************************\n\n  //*************************************************************************\n  template <typename T, int NDIM>\n  HartreeFock<T,NDIM>::HartreeFock(World& world, funcT V, std::vector<funcT> phis,\n    std::vector<double> eigs, bool bCoulomb, bool bExchange, double thresh)\n   : _world(world), _V(V), _thresh(thresh)\n  {\n    _bCoulomb = bCoulomb;\n    _bExchange = bExchange;\n    // Create ops list\n    std::vector<EigSolverOp<T,NDIM>*> ops;\n    // Add nuclear potential to ops list\n    ops.push_back(new HartreeFockNuclearPotentialOp<T,NDIM>(world, V, 1.0, thresh));\n    // Check for coulomb and exchange, and add as appropriate\n    if (bCoulomb)\n    {\n      ops.push_back(new HartreeFockCoulombOp<T,NDIM>(world, 2.0, thresh));\n    }\n    if (bExchange)\n    {\n      ops.push_back(new HartreeFockExchangeOp<T,NDIM>(world, -1.0, thresh));\n    }\n    // Create solver\n    _solver = new EigSolver<T,NDIM>(world, phis, eigs, ops, thresh, false);\n    _solver->addObserver(this);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n    template <typename T, int NDIM>\n  HartreeFock<T,NDIM>::~HartreeFock()\n  {\n    delete _solver;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n    template <typename T, int NDIM>\n  void HartreeFock<T,NDIM>::hartree_fock(int maxits)\n  {\n    _solver->solve(maxits);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n    template <typename T, int NDIM>\n  double HartreeFock<T,NDIM>::calculate_ke_sp(funcT psi)\n  {\n    double kenergy = 0.0;\n    for (int axis = 0; axis < 3; axis++)\n    {\n      funcT dpsi = diff(psi, axis);\n      kenergy += 0.5 * inner(dpsi, dpsi);\n    }\n    return kenergy;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n    template <typename T, int NDIM>\n  double HartreeFock<T,NDIM>::calculate_pe_sp(funcT psi)\n  {\n    funcT vpsi = _V*psi;\n    return vpsi.inner(psi);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n    template <typename T, int NDIM>\n  double HartreeFock<T,NDIM>::calculate_coulomb_energy(const std::vector<funcT>& phis, const funcT& psi)\n  {\n    if (include_coulomb())\n    {\n      // Electron density\n      funcT density = FunctionFactory<T,3>(_world);\n      // Create Coulomb operator\n      SeparatedConvolution<T,NDIM> op =\n        CoulombOperator<T,3>(_world, FunctionDefaults<3>::get_k(), 1e-4, _thresh);\n      for (typename std::vector<funcT>::const_iterator pj = phis.begin(); pj != phis.end(); ++pj)\n      {\n        // Get phi(j) from iterator\n        const funcT& phij = (*pj);\n        // Compute the j-th density\n        funcT prod = phij*phij;\n        density += prod;\n      }\n      // Transform Coulomb operator into a function (stubbed)\n      density.truncate(_thresh);\n      funcT Vc = apply(op, density);\n      // Note that we are not using psi\n      // The density is built from all of the wavefunctions. The contribution\n      // psi will be subtracted out later during the exchange.\n      funcT vpsi = Vc*psi;\n      return inner(vpsi, psi);\n    }\n    return 0.0;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  double HartreeFock<T,NDIM>::calculate_exchange_energy(const std::vector<funcT>& phis,\n      const funcT& psi)\n  {\n    // Return value\n    funcT rfunc = FunctionFactory<double,NDIM>(world());\n    if (include_exchange())\n    {\n      // Create Coulomb operator\n      SeparatedConvolution<T,NDIM> op = CoulombOperator<T,NDIM>(world(),\n          FunctionDefaults<NDIM>::get_k(), 1e-4, thresh());\n      // Use the psi and pj wavefunctions to build a product so that the K\n      // operator can be applied to the wavefunction indexed by pj, NOT PSI.\n      for (typename std::vector<funcT>::const_iterator pj = phis.begin(); pj != phis.end(); ++pj)\n      {\n        // Get phi(j) from iterator\n        const funcT& phij = (*pj);\n        // NOTE that psi is involved in this calculation\n        funcT prod = phij*psi;\n        // Transform Coulomb operator into a function (stubbed)\n        funcT Vex = apply(op, prod);\n        // NOTE that the index is j.\n        rfunc += Vex*phij;\n      }\n    }\n    return inner(rfunc, psi);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  double HartreeFock<T,NDIM>::calculate_tot_ke_sp(const std::vector<funcT>& phis)\n  {\n    double tot_ke = 0.0;\n    for (unsigned int pi = 0; pi < phis.size(); pi++)\n    {\n      // Get psi from collection\n      const funcT psi = phis[pi];\n      // Calculate kinetic energy contribution from psi\n      tot_ke += calculate_ke_sp(psi);\n    }\n    return tot_ke;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  double HartreeFock<T,NDIM>::calculate_tot_pe_sp(const std::vector<funcT>& phis)\n  {\n    double tot_pe = 0.0;\n    for (unsigned int pi = 0; pi < phis.size(); pi++)\n    {\n      // Get psi from collection\n      const funcT psi = phis[pi];\n      // Calculate potential energy contribution from psi\n      tot_pe += calculate_pe_sp(psi);\n    }\n    return tot_pe;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  double HartreeFock<T,NDIM>::calculate_tot_coulomb_energy(const std::vector<funcT>& phis)\n  {\n    double tot_ce = 0.0;\n    for (unsigned int pi = 0; pi < phis.size(); pi++)\n    {\n      // Get psi from collection\n      const funcT psi = phis[pi];\n      // Calculate coulomb energy contribution from psi\n      tot_ce += calculate_coulomb_energy(phis, psi);\n    }\n    return tot_ce;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  double HartreeFock<T,NDIM>::calculate_tot_exchange_energy(const std::vector<funcT>& phis)\n  {\n    double tot_ee = 0.0;\n    for (unsigned int pi = 0; pi < phis.size(); pi++)\n    {\n      // Get psi from collection\n      const funcT psi = phis[pi];\n      // Calculate exchange energy contribution from psi\n      tot_ee += calculate_exchange_energy(phis, psi);\n    }\n    return tot_ee;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  void HartreeFock<T,NDIM>::iterateOutput(const std::vector<funcT>& phis,\n      const std::vector<double>& eigs,const funcT& rho, const int& iter)\n  {\n    if (iter%3 == 0)\n    {\n      if (world().rank() == 0) printf(\"Calculating energies ...\\n\");\n      if (world().rank() == 0) printf(\"Calculating KE ...\\n\");\n      double ke = 2.0 * calculate_tot_ke_sp(phis);\n      if (world().rank() == 0) printf(\"Calculating PE ...\\n\");\n      double pe = 2.0 * calculate_tot_pe_sp(phis);\n      if (world().rank() == 0) printf(\"Calculating CE ...\\n\");\n      double ce = calculate_tot_coulomb_energy(phis);\n      if (world().rank() == 0) printf(\"Calculating EE ...\\n\");\n      double ee = calculate_tot_exchange_energy(phis);\n      if (world().rank() == 0) printf(\"Calculating NE ...\\n\");\n      double ne = 0.0;\n      if (world().rank() == 0) printf(\"Kinetic energy:\\t\\t\\t %.8f\\n\", ke);\n      if (world().rank() == 0) printf(\"Potential energy:\\t\\t %.8f\\n\", pe);\n      if (world().rank() == 0) printf(\"Two-electron energy:\\t\\t %.8f\\n\", 2.0*ce - ee);\n      if (world().rank() == 0) printf(\"Total energy:\\t\\t\\t %.8f\\n\", ke + pe + 2.0*ce - ee + ne);\n      if (world().rank() == 0) printf(\"gs eigv: = \\t\\t\\t %.4f\\n\", eigs[0]);\n    }\n  }\n  //***************************************************************************\n}\n//*****************************************************************************\n\n"
  },
  {
    "path": "src/apps/periodic_old/hartreefock.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef HARTREEFOCK_H_\n#define HARTREEFOCK_H_\n\n#include <madness/mra/mra.h>\n#include <madness/world/MADworld.h>\n#include <vector>\n\n#include \"eigsolver.h\"\n\nnamespace madness\n{\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  // Typedef's\n  class HartreeFockNuclearPotentialOp : public EigSolverOp<T,NDIM>\n  {\n  public:\n    typedef Function<T,NDIM> funcT;\n    //*************************************************************************\n    // Constructor\n    HartreeFockNuclearPotentialOp(World& world, funcT V, double coeff, double thresh);\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there an orbitally-dependent term?\n    virtual bool is_od() {return false;}\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there a density-dependent term?\n    virtual bool is_rd() {return true;}\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual funcT op_r(const funcT& rho, const funcT& rhon, const funcT& psi);\n    //*************************************************************************\n\n  private:\n    //*************************************************************************\n    funcT _V;\n    //*************************************************************************\n  };\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  // Typedef's\n  class HartreeFockCoulombOp : public EigSolverOp<T,NDIM>\n  {\n  public:\n    typedef Function<T,NDIM> funcT;\n    //*************************************************************************\n    // Constructor\n    HartreeFockCoulombOp(World& world, double coeff, double thresh);\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there an orbitally-dependent term?\n    virtual bool is_od() {return false;}\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there a density-dependent term?\n    virtual bool is_rd() {return true;}\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual funcT op_r(const funcT& rho, const funcT& rhon, const funcT& psi);\n    //*************************************************************************\n\n  };\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  // Typedef's\n  class HartreeFockExchangeOp : public EigSolverOp<T,NDIM>\n  {\n  public:\n    typedef Function<T,NDIM> funcT;\n    //*************************************************************************\n    // Constructor\n    HartreeFockExchangeOp(World& world, double coeff, double thresh);\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there an orbitally-dependent term?\n    virtual bool is_od() {return true;}\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there a density-dependent term?\n    virtual bool is_rd() {return false;}\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual funcT op_o(const std::vector<funcT>& phis, const funcT& psi);\n    //*************************************************************************\n\n  };\n  //***************************************************************************\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class HartreeFock : public IEigSolverObserver<T,NDIM>\n  {\n  public:\n    typedef Function<T,NDIM> funcT;\n    //*************************************************************************\n    // Constructor\n    HartreeFock(World& world, funcT V, std::vector<funcT> phis,\n      std::vector<double> eigs, bool bCoulomb, bool bExchange, double thresh);\n    //*************************************************************************\n\n    //*************************************************************************\n    // Destructor\n  \tvirtual ~HartreeFock();\n    //*************************************************************************\n\n    //*************************************************************************\n  \tvoid hartree_fock(int maxits);\n    //*************************************************************************\n\n    //*************************************************************************\n    funcT calculate_coulomb(funcT psi);\n    //*************************************************************************\n\n    //*************************************************************************\n    funcT calculate_exchange(funcT psi);\n    //*************************************************************************\n\n    //*************************************************************************\n    double calculate_ke_sp(funcT psi);\n    //*************************************************************************\n\n    //*************************************************************************\n    double calculate_pe_sp(funcT psi);\n    //*************************************************************************\n\n    //*************************************************************************\n    double calculate_coulomb_energy(const std::vector<funcT>& phis,\n        const funcT& psi);\n    //*************************************************************************\n\n    //*************************************************************************\n    double calculate_exchange_energy(const std::vector<funcT>& phis,\n        const funcT& psi);\n    //*************************************************************************\n\n    //*************************************************************************\n    T matrix_element(const funcT& phii, const funcT& phij)\n    {\n      return _solver->matrix_element(phii, phij);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual void iterateOutput(const std::vector<funcT>& phis,\n        const std::vector<double>& eigs, const funcT& rho, const int& iter);\n    //*************************************************************************\n\n    //*************************************************************************\n    bool include_coulomb()\n    {\n      return _bCoulomb;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    bool include_exchange()\n    {\n      return _bExchange;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    double get_eig(int indx)\n    {\n      return _solver->get_eig(indx);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    funcT get_phi(int indx)\n    {\n      return _solver->get_phi(indx);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    const std::vector<double>& eigs()\n    {\n      return _solver->eigs();\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    const std::vector<funcT>& phis()\n    {\n      return _solver->phis();\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    double calculate_tot_ke_sp(const std::vector<funcT>& phis);\n    //*************************************************************************\n\n    //*************************************************************************\n    double calculate_tot_pe_sp(const std::vector<funcT>& phis);\n    //*************************************************************************\n\n    //*************************************************************************\n    double calculate_tot_coulomb_energy(const std::vector<funcT>& phis);\n    //*************************************************************************\n\n    //*************************************************************************\n    double calculate_tot_exchange_energy(const std::vector<funcT>& phis);\n    //*************************************************************************\n\nprivate:\n\n    //*************************************************************************\n    // Eigenvalue solver\n    EigSolver<T,NDIM>* _solver;\n    //*************************************************************************\n\n    //*************************************************************************\n    // Flags for whether to include the coulomb and exchange\n    bool _bCoulomb;\n    bool _bExchange;\n    //*************************************************************************\n\n    //*************************************************************************\n    World& _world;\n    //*************************************************************************\n\n    //*************************************************************************\n    funcT _V;\n    //*************************************************************************\n\n    //*************************************************************************\n    double _thresh;\n    //*************************************************************************\n\n    //*************************************************************************\n    World& world() {return _world;}\n    //*************************************************************************\n\n    //*************************************************************************\n    double thresh() {return _thresh;}\n    //*************************************************************************\n\n  };\n  //***************************************************************************\n\n}\n\n#endif /*HARTREEFOCK_H_*/\n"
  },
  {
    "path": "src/apps/periodic_old/input",
    "content": "dft\n  nempty 0\n  L 5.0\n  ngridk 1 1 1\n  ispotential false\n  periodic true\n  spinpol false\n  maxits 30\n  lo 1e-2\n  waveorder 6\n  thresh 1e-4\n  fractional false\n  maxsub 8\n  maxrotn 0.1\n  canon true\n  noprint_matrices\nend\n\n# LiF with L = 5.0\ngeometry\n  li   0.0  0.0  0.0\n  f    0.5  0.5  0.5\nend\n\ngeometry\n  he   0.0  0.0  0.0\nend\n\n# LiF with L = 5.0\ngeometry\n  li  -1.25  -1.25  -1.25\n  f    1.25   1.25   1.25\nend\n\n# helium with L = 8.0 in fractional coordinates \ngeometry\n  he   0.25  0.25  0.25\n  he   0.25  0.25  0.75\n  he   0.25  0.75  0.25\n  he   0.75  0.25  0.25\n  he   0.75  0.75  0.25\n  he   0.25  0.75  0.75\n  he   0.75  0.25  0.75\n  he   0.75  0.75  0.75\nend\n\n# LiF with L = 7.6\ngeometry\n  li   0.0  0.0  0.0\n  li   0.0  0.5  0.5\n  li   0.5  0.5  0.0\n  li   0.5  0.0  0.5\n  f    0.0  0.0  0.5\n  f    0.0  0.5  0.0 \n  f    0.5  0.0  0.0\n  f    0.5  0.5  0.5\nend\n\n#Si = with L = 6.0\ngeometry\n  si   0.0  0.0  0.0\nend\n\n#LiH with L = 6.0 (frac coords)\ngeometry\n  li   0.0  0.0  0.0\n  h    0.5  0.5  0.5\nend\n\n#LiH with L = 6.0 \ngeometry\n  li  -3.0 -3.0 -3.0\n  h    3.0  3.0  3.0\nend\n\n# with L = 8.0 in fractional coordinates \ngeometry\n  be   0.25  0.25  0.25\n  be   0.25  0.25  0.75\n  be   0.25  0.75  0.25\n  be   0.75  0.25  0.25\n  be   0.75  0.75  0.25\n  be   0.25  0.75  0.75\n  be   0.75  0.25  0.75\n  be   0.75  0.75  0.75\nend\n\n# LiF molecule to compare with Robert\ngeometry\n  li 0 0 0\n  f  0 0 2.5\nend\n\ngeometry\n  be 0.0  0.0  0.0\nend\n\ngeometry\n  f    0.0  0.0  0.0\nend\n\n#beryllium\ngeometry\n  c   0.0  0.0  0.0\nend\n\n# beryllium with L = 8.0\ngeometry\n  be  -3.0 -3.0 -3.0\n  be   1.0  1.0  1.0\nend\n\n# beryllium with L = 8.0 \ngeometry\n  be   2.0  2.0  2.0\n  be   2.0  2.0 -2.0\n  be   2.0 -2.0  2.0\n  be  -2.0  2.0  2.0\n  be  -2.0 -2.0  2.0\n  be   2.0 -2.0 -2.0\n  be  -2.0  2.0 -2.0\n  be  -2.0 -2.0 -2.0\nend\n\n# Be with L = 8.0 in fractional coordinates \ngeometry\n  be   0.25  0.25  0.25\n  be   0.25  0.25  0.75\n  be   0.25  0.75  0.25\n  be   0.75  0.25  0.25\n  be   0.75  0.75  0.25\n  be   0.25  0.75  0.75\n  be   0.75  0.25  0.75\n  be   0.75  0.75  0.75\nend\n\n# helium with L = 8.0\ngeometry \n  he  -3.0 -3.0 -3.0\n  he  -3.0 -3.0  1.0\n  he  -3.0  1.0 -3.0\n  he  -3.0  1.0  1.0\n  he   1.0 -3.0 -3.0\n  he   1.0 -3.0  1.0\n  he   1.0  1.0 -3.0\n  he   1.0  1.0  1.0\nend\n\n#beryllium\ngeometry\n  be   0.0  0.0  0.0\nend\n\n# water*1\ngeometry\n  O  0.0    0.0 0.0\n  H  1.4375 0.0 1.15\n  H -1.4375 0.0 1.15\nend\n\n# D6h benzene at 6-31g* SCF =m\ngeometry\n  C  0.00000000    2.61951159     0.00000000\n  C  0.00000000   -2.61951159     0.00000000\n  C  2.26854281    1.30974042     0.00000000\n  C -2.26854281    1.30974042     0.00000000\n  C  2.26854281   -1.30974042     0.00000000\n  C -2.26854281   -1.30974042     0.00000000\n  H  0.00000000    4.65209154     0.00000000\n  H  0.00000000   -4.65209154     0.00000000\n  H  4.02886772    2.32598919     0.00000000\n  H -4.02886772    2.32598919     0.00000000\n  H  4.02886772   -2.32598919     0.00000000\n  H -4.02886772   -2.32598919     0.00000000\nend\n\n# water dimer\ngeometry\n  units angstrom\n  O -0.04537298   1.27083455    0.00000000\n  H  0.11541692   1.82777013    0.77758805\n  H  0.11541692   1.82777013   -0.77758805\n  O -0.10561006  -0.47346262    0.00000000\n  H -0.09896558  -1.45781563    0.00000000\n  H  0.84226145  -1.68923759    0.00000000\nend\n\ngeometry\n  Be 0 0 0\n  Be 0 0 5\n  Be 0 0 10\n  Be 0 0 15\n  Be 0 0 20\n  Be 0 0 25\n  Be 0 0 30\nend\n\ngeometry\n  be 0 0 0\nend\n\n\n# water*5\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n\n\n\n# D6h benzene at 6-31g* SCF =m\ngeometry\n  C  0.00000000    2.61951159     0.00000000\n  C  0.00000000   -2.61951159     0.00000000\n  C  2.26854281    1.30974042     0.00000000\n  C -2.26854281    1.30974042     0.00000000\n  C  2.26854281   -1.30974042     0.00000000\n  C -2.26854281   -1.30974042     0.00000000\n  H  0.00000000    4.65209154     0.00000000\n  H  0.00000000   -4.65209154     0.00000000\n  H  4.02886772    2.32598919     0.00000000\n  H -4.02886772    2.32598919     0.00000000\n  H  4.02886772   -2.32598919     0.00000000\n  H -4.02886772   -2.32598919     0.00000000\nend\n\n\n\n\n# Lithium atom\ngeometry\n  Li 0 0 0\nend\n\n\n\ngeometry\n  be 0 0 0\nend\n\n\n\n\n\n# water*9\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n\n\n\n# water*17\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -1.562 1.556 -3.743\n  H   -0.872 2.240 -3.503\n  H   -2.461 1.867 -3.431\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   3.544 0.925 -1.230\n  H   4.454 0.792 -1.623\n  H   3.590 0.812 -0.237\n  O   2.718 4.262 0.458\n  H   3.685 4.442 0.273\n  H   2.550 3.276 0.419\n  O   4.068 1.601 1.434\n  H   5.026 1.810 1.239\n  H   3.871 1.805 2.394\n  O   -0.077 3.440 -2.750\n  H   0.503 2.709 -2.390\n  H   -0.034 4.231 -2.140\n  O   -3.562 -0.141 2.104\n  H   -3.670 -1.112 1.889\n  H   -4.304 0.150 2.708\n  O   2.865 1.448 -3.822\n  H   2.102 0.810 -3.928\n  H   3.231 1.378 -2.894\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   -0.932 -3.524 2.530\n  H   -0.441 -2.916 3.154\n  H   -0.772 -4.475 2.796\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n\n\n\n\n\n\n\n# water*5\ngeometry\n  units angstrom\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\nend\n\n\n\n# water*35\ngeometry\n  units angstrom\n  O   -2.591 -0.898 -4.405\n  H   -1.704 -0.542 -4.109\n  H   -2.513 -1.255 -5.336\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   1.451 3.499 2.870\n  H   1.210 4.168 3.573\n  H   1.914 3.961 2.113\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   3.690 2.403 3.993\n  H   4.451 3.015 4.210\n  H   2.853 2.938 3.877\n  O   5.003 -2.167 2.276\n  H   5.065 -1.570 3.076\n  H   4.079 -2.121 1.897\n  O   2.740 -5.205 -0.011\n  H   2.359 -4.286 0.096\n  H   2.592 -5.521 -0.948\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   -4.250 2.926 -3.199\n  H   -3.744 3.772 -3.366\n  H   -4.529 2.888 -2.239\n  O   -5.179 -2.392 -0.345\n  H   -4.607 -2.632 0.440\n  H   -4.606 -2.005 -1.068\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -1.562 1.556 -3.743\n  H   -0.872 2.240 -3.503\n  H   -2.461 1.867 -3.431\n  O   2.161 -0.896 4.600\n  H   3.160 -0.935 4.567\n  H   1.841 -0.115 4.063\n  O   -2.020 -5.788 -0.763\n  H   -1.639 -4.864 -0.801\n  H   -2.820 -5.794 -0.163\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   3.544 0.925 -1.230\n  H   4.454 0.792 -1.623\n  H   3.590 0.812 -0.237\n  O   -5.557 2.427 -0.659\n  H   -6.083 1.596 -0.841\n  H   -5.458 2.550 0.328\n  O   2.718 4.262 0.458\n  H   3.685 4.442 0.273\n  H   2.550 3.276 0.419\n  O   4.068 1.601 1.434\n  H   5.026 1.810 1.239\n  H   3.871 1.805 2.394\n  O   5.833 -0.679 -0.244\n  H   5.908 -1.110 0.656\n  H   5.768 -1.386 -0.948\n  O   0.185 -2.868 5.188\n  H   0.595 -3.776 5.275\n  H   0.903 -2.173 5.222\n  O   -2.006 5.584 0.364\n  H   -1.395 5.940 -0.343\n  H   -1.706 4.668 0.634\n  O   -0.077 3.440 -2.750\n  H   0.503 2.709 -2.390\n  H   -0.034 4.231 -2.140\n  O   -3.562 -0.141 2.104\n  H   -3.670 -1.112 1.889\n  H   -4.304 0.150 2.708\n  O   2.865 1.448 -3.822\n  H   2.102 0.810 -3.928\n  H   3.231 1.378 -2.894\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   0.536 5.441 -0.945\n  H   1.398 5.073 -0.598\n  H   0.599 6.437 -1.008\n  O   -0.932 -3.524 2.530\n  H   -0.441 -2.916 3.154\n  H   -0.772 -4.475 2.796\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   -4.111 -2.648 2.417\n  H   -3.284 -3.052 2.810\n  H   -4.914 -2.999 2.898\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\n  O   0.891 -0.095 -4.585\n  H   1.370 -0.796 -5.115\n  H   0.214 0.358 -5.166\n  O   -1.675 3.224 3.349\n  H   -1.164 3.751 4.028\n  H   -1.596 3.666 2.455\n  O   1.262 -3.954 -3.289\n  H   0.410 -4.196 -3.754\n  H   1.684 -4.780 -2.914\nend\n\n\n\n\ngeometry\n  units angstrom\n  h 0 0 0\n  h 1 0 0\nend\n\n\n\n# water*70\ngeometry\n  units angstrom\n  O   -2.591 -0.898 -4.405\n  H   -1.704 -0.542 -4.109\n  H   -2.513 -1.255 -5.336\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   1.451 3.499 2.870\n  H   1.210 4.168 3.573\n  H   1.914 3.961 2.113\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   -4.066 4.005 3.885\n  H   -3.995 4.957 4.183\n  H   -3.156 3.656 3.661\n  O   3.690 2.403 3.993\n  H   4.451 3.015 4.210\n  H   2.853 2.938 3.877\n  O   -5.022 0.649 -4.243\n  H   -4.273 -0.004 -4.353\n  H   -4.660 1.516 -3.898\n  O   -1.962 -2.092 7.241\n  H   -1.271 -2.150 6.519\n  H   -2.191 -1.132 7.406\n  O   -5.658 0.190 3.826\n  H   -6.561 0.552 3.590\n  H   -5.729 -0.792 4.003\n  O   5.003 -2.167 2.276\n  H   5.065 -1.570 3.076\n  H   4.079 -2.121 1.897\n  O   2.740 -5.205 -0.011\n  H   2.359 -4.286 0.096\n  H   2.592 -5.521 -0.948\n  O   -1.040 -5.189 -4.625\n  H   -0.456 -5.402 -5.409\n  H   -1.364 -6.038 -4.209\n  O   3.101 6.996 1.942\n  H   3.131 5.997 1.961\n  H   2.165 7.299 1.760\n  O   -3.064 -3.450 -4.998\n  H   -2.319 -4.108 -4.887\n  H   -2.886 -2.645 -4.432\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   -4.250 2.926 -3.199\n  H   -3.744 3.772 -3.366\n  H   -4.529 2.888 -2.239\n  O   2.088 -2.599 -5.399\n  H   1.534 -2.826 -6.201\n  H   1.842 -3.205 -4.642\n  O   0.089 3.928 -5.479\n  H   0.674 4.692 -5.749\n  H   0.099 3.835 -4.483\n  O   -4.393 1.699 5.817\n  H   -4.900 1.329 5.038\n  H   -4.513 2.691 5.852\n  O   -5.179 -2.392 -0.345\n  H   -4.607 -2.632 0.440\n  H   -4.606 -2.005 -1.068\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -0.184 -5.996 3.292\n  H   0.634 -5.834 3.843\n  H   -0.166 -6.929 2.933\n  O   6.744 2.879 -1.799\n  H   6.709 2.499 -2.723\n  H   7.445 3.592 -1.757\n  O   -1.799 -1.423 -6.793\n  H   -2.095 -0.572 -7.227\n  H   -0.887 -1.667 -7.123\n  O   -1.562 1.556 -3.743\n  H   -0.872 2.240 -3.503\n  H   -2.461 1.867 -3.431\n  O   2.161 -0.896 4.600\n  H   3.160 -0.935 4.567\n  H   1.841 -0.115 4.063\n  O   0.107 1.468 -6.868\n  H   -0.101 2.302 -6.356\n  H   -0.572 1.343 -7.592\n  O   0.219 7.296 1.815\n  H   -0.497 7.981 1.682\n  H   -0.094 6.413 1.464\n  O   -6.699 -0.093 -0.118\n  H   -7.620 -0.447 0.044\n  H   -6.029 -0.693 0.319\n  O   -2.020 -5.788 -0.763\n  H   -1.639 -4.864 -0.801\n  H   -2.820 -5.794 -0.163\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   3.544 0.925 -1.230\n  H   4.454 0.792 -1.623\n  H   3.590 0.812 -0.237\n  O   -5.557 2.427 -0.659\n  H   -6.083 1.596 -0.841\n  H   -5.458 2.550 0.328\n  O   -5.728 2.979 1.921\n  H   -5.008 3.330 2.519\n  H   -6.318 2.358 2.438\n  O   2.718 4.262 0.458\n  H   3.685 4.442 0.273\n  H   2.550 3.276 0.419\n  O   4.068 1.601 1.434\n  H   5.026 1.810 1.239\n  H   3.871 1.805 2.394\n  O   5.833 -0.679 -0.244\n  H   5.908 -1.110 0.656\n  H   5.768 -1.386 -0.948\n  O   -0.227 4.984 5.241\n  H   -0.206 4.365 6.026\n  H   -0.565 5.880 5.531\n  O   0.185 -2.868 5.188\n  H   0.595 -3.776 5.275\n  H   0.903 -2.173 5.222\n  O   1.567 -0.094 7.082\n  H   1.675 -0.270 6.104\n  H   1.702 -0.945 7.591\n  O   -6.733 -3.792 -2.231\n  H   -6.154 -3.985 -3.023\n  H   -6.211 -3.273 -1.555\n  O   -2.006 5.584 0.364\n  H   -1.395 5.940 -0.343\n  H   -1.706 4.668 0.634\n  O   -3.940 -5.480 1.339\n  H   -3.935 -6.239 1.991\n  H   -4.884 -5.249 1.103\n  O   -0.077 3.440 -2.750\n  H   0.503 2.709 -2.390\n  H   -0.034 4.231 -2.140\n  O   -3.562 -0.141 2.104\n  H   -3.670 -1.112 1.889\n  H   -4.304 0.150 2.708\n  O   2.145 -6.344 -2.231\n  H   3.120 -6.559 -2.291\n  H   1.719 -6.921 -1.534\n  O   2.865 1.448 -3.822\n  H   2.102 0.810 -3.928\n  H   3.231 1.378 -2.894\n  O   -2.134 0.325 6.016\n  H   -2.949 0.903 5.987\n  H   -1.804 0.168 5.085\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   -3.083 5.492 -3.884\n  H   -2.244 6.034 -3.822\n  H   -3.646 5.655 -3.073\n  O   0.536 5.441 -0.945\n  H   1.398 5.073 -0.598\n  H   0.599 6.437 -1.008\n  O   -0.932 -3.524 2.530\n  H   -0.441 -2.916 3.154\n  H   -0.772 -4.475 2.796\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   5.087 -4.778 1.625\n  H   5.098 -3.800 1.833\n  H   4.441 -4.954 0.882\n  O   4.558 2.619 -5.781\n  H   3.910 2.456 -5.038\n  H   4.121 2.410 -6.657\n  O   -1.128 -7.398 -2.954\n  H   -1.640 -8.210 -2.673\n  H   -1.178 -6.707 -2.233\n  O   -4.227 5.725 -1.282\n  H   -5.034 5.348 -0.826\n  H   -3.445 5.688 -0.661\n  O   4.106 -0.877 -4.871\n  H   3.327 -1.490 -4.999\n  H   3.782 0.067 -4.813\n  O   -4.111 -2.648 2.417\n  H   -3.284 -3.052 2.810\n  H   -4.914 -2.999 2.898\n  O   6.723 1.948 0.853\n  H   6.382 1.169 0.328\n  H   7.362 2.475 0.292\n  O   -0.571 1.311 8.043\n  H   0.313 0.914 8.291\n  H   -0.891 0.901 7.188\n  O   4.912 -0.265 4.360\n  H   4.609 0.665 4.149\n  H   5.640 -0.230 5.046\n  O   5.352 4.701 -0.048\n  H   5.850 4.342 0.742\n  H   5.660 4.234 -0.877\n  O   7.940 0.152 -2.111\n  H   7.570 0.886 -2.681\n  H   7.221 -0.517 -1.921\n  O   5.888 -1.800 -2.940\n  H   5.229 -1.345 -3.540\n  H   5.794 -2.791 -3.031\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\n  O   0.891 -0.095 -4.585\n  H   1.370 -0.796 -5.115\n  H   0.214 0.358 -5.166\n  O   -1.675 3.224 3.349\n  H   -1.164 3.751 4.028\n  H   -1.596 3.666 2.455\n  O   1.262 -3.954 -3.289\n  H   0.410 -4.196 -3.754\n  H   1.684 -4.780 -2.914\nend\n\n# water*144\ngeometry\n  units angstrom\n  O   -9.359 -1.472 -0.457\n  H   -9.366 -2.333 -0.966\n  H   -9.901 -0.789 -0.947\n  O   2.377 7.497 -3.832\n  H   2.957 6.974 -4.457\n  H   2.434 8.470 -4.059\n  O   -2.591 -0.898 -4.405\n  H   -1.704 -0.542 -4.109\n  H   -2.513 -1.255 -5.336\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   1.451 3.499 2.870\n  H   1.210 4.168 3.573\n  H   1.914 3.961 2.113\n  O   -4.756 0.823 8.564\n  H   -5.126 -0.107 8.583\n  H   -4.725 1.150 7.619\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   6.787 4.926 2.613\n  H   7.726 5.043 2.289\n  H   6.421 5.811 2.902\n  O   -4.066 4.005 3.885\n  H   -3.995 4.957 4.183\n  H   -3.156 3.656 3.661\n  O   3.690 2.403 3.993\n  H   4.451 3.015 4.210\n  H   2.853 2.938 3.877\n  O   -5.022 0.649 -4.243\n  H   -4.273 -0.004 -4.353\n  H   -4.660 1.516 -3.898\n  O   -1.900 3.708 -7.094\n  H   -2.721 4.275 -7.030\n  H   -1.341 3.837 -6.275\n  O   -1.962 -2.092 7.241\n  H   -1.271 -2.150 6.519\n  H   -2.191 -1.132 7.406\n  O   -5.658 0.190 3.826\n  H   -6.561 0.552 3.590\n  H   -5.729 -0.792 4.003\n  O   5.003 -2.167 2.276\n  H   5.065 -1.570 3.076\n  H   4.079 -2.121 1.897\n  O   0.971 8.024 -1.417\n  H   1.694 7.819 -2.078\n  H   1.200 8.863 -0.923\n  O   2.740 -5.205 -0.011\n  H   2.359 -4.286 0.096\n  H   2.592 -5.521 -0.948\n  O   7.721 2.515 5.255\n  H   7.920 1.866 5.989\n  H   6.971 3.115 5.534\n  O   5.750 7.146 3.481\n  H   4.788 7.294 3.250\n  H   6.087 7.920 4.018\n  O   -8.152 4.383 -2.618\n  H   -7.819 3.556 -3.071\n  H   -7.829 5.189 -3.114\n  O   5.092 -0.656 -8.134\n  H   5.524 0.080 -8.655\n  H   4.118 -0.456 -8.019\n  O   1.593 -8.076 -0.089\n  H   1.175 -8.479 0.726\n  H   2.497 -7.716 0.143\n  O   -1.040 -5.189 -4.625\n  H   -0.456 -5.402 -5.409\n  H   -1.364 -6.038 -4.209\n  O   3.101 6.996 1.942\n  H   3.131 5.997 1.961\n  H   2.165 7.299 1.760\n  O   8.020 0.899 2.975\n  H   7.650 1.251 2.115\n  H   7.768 1.513 3.723\n  O   -3.064 -3.450 -4.998\n  H   -2.319 -4.108 -4.887\n  H   -2.886 -2.645 -4.432\n  O   5.551 4.270 5.300\n  H   4.695 4.701 5.588\n  H   5.896 4.729 4.481\n  O   -4.485 8.675 2.394\n  H   -3.636 8.610 1.870\n  H   -5.215 8.193 1.908\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   -4.250 2.926 -3.199\n  H   -3.744 3.772 -3.366\n  H   -4.529 2.888 -2.239\n  O   2.088 -2.599 -5.399\n  H   1.534 -2.826 -6.201\n  H   1.842 -3.205 -4.642\n  O   4.846 -1.699 7.968\n  H   4.949 -1.460 8.933\n  H   5.593 -1.292 7.442\n  O   -7.933 1.521 3.421\n  H   -8.812 1.071 3.261\n  H   -8.050 2.249 4.097\n  O   1.258 8.356 4.085\n  H   0.797 7.935 3.303\n  H   1.890 9.061 3.760\n  O   0.089 3.928 -5.479\n  H   0.674 4.692 -5.749\n  H   0.099 3.835 -4.483\n  O   -4.393 1.699 5.817\n  H   -4.900 1.329 5.038\n  H   -4.513 2.691 5.852\n  O   -5.179 -2.392 -0.345\n  H   -4.607 -2.632 0.440\n  H   -4.606 -2.005 -1.068\n  O   5.067 7.316 0.249\n  H   5.259 6.361 0.022\n  H   4.222 7.368 0.782\n  O   0.595 4.467 -8.345\n  H   -0.284 4.068 -8.085\n  H   0.944 5.026 -7.592\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -0.184 -5.996 3.292\n  H   0.634 -5.834 3.843\n  H   -0.166 -6.929 2.933\n  O   4.204 -4.197 -5.876\n  H   3.601 -3.415 -5.719\n  H   4.933 -4.199 -5.192\n  O   -0.816 -5.669 8.301\n  H   -1.275 -5.111 8.993\n  H   -1.369 -5.689 7.468\n  O   6.744 2.879 -1.799\n  H   6.709 2.499 -2.723\n  H   7.445 3.592 -1.757\n  O   -1.799 -1.423 -6.793\n  H   -2.095 -0.572 -7.227\n  H   -0.887 -1.667 -7.123\n  O   -1.562 1.556 -3.743\n  H   -0.872 2.240 -3.503\n  H   -2.461 1.867 -3.431\n  O   0.893 -5.948 -6.780\n  H   1.779 -6.403 -6.692\n  H   0.268 -6.533 -7.297\n  O   8.209 -5.281 0.671\n  H   8.107 -4.554 -0.008\n  H   8.981 -5.865 0.421\n  O   2.161 -0.896 4.600\n  H   3.160 -0.935 4.567\n  H   1.841 -0.115 4.063\n  O   0.107 1.468 -6.868\n  H   -0.101 2.302 -6.356\n  H   -0.572 1.343 -7.592\n  O   0.219 7.296 1.815\n  H   -0.497 7.981 1.682\n  H   -0.094 6.413 1.464\n  O   -6.810 4.999 -0.222\n  H   -6.547 4.090 0.102\n  H   -7.216 4.924 -1.133\n  O   -2.260 8.292 0.709\n  H   -2.309 8.665 -0.217\n  H   -2.399 7.302 0.677\n  O   -6.220 -4.150 6.077\n  H   -5.228 -4.025 6.098\n  H   -6.567 -4.220 7.012\n  O   -6.699 -0.093 -0.118\n  H   -7.620 -0.447 0.044\n  H   -6.029 -0.693 0.319\n  O   -2.020 -5.788 -0.763\n  H   -1.639 -4.864 -0.801\n  H   -2.820 -5.794 -0.163\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   3.139 -8.517 3.576\n  H   2.717 -7.695 3.958\n  H   3.625 -8.283 2.734\n  O   3.544 0.925 -1.230\n  H   4.454 0.792 -1.623\n  H   3.590 0.812 -0.237\n  O   -5.557 2.427 -0.659\n  H   -6.083 1.596 -0.841\n  H   -5.458 2.550 0.328\n  O   -5.728 2.979 1.921\n  H   -5.008 3.330 2.519\n  H   -6.318 2.358 2.438\n  O   -6.553 -4.656 0.861\n  H   -7.471 -4.671 1.257\n  H   -6.309 -3.717 0.618\n  O   2.752 4.918 7.960\n  H   3.595 4.382 7.904\n  H   2.313 4.755 8.844\n  O   2.718 4.262 0.458\n  H   3.685 4.442 0.273\n  H   2.550 3.276 0.419\n  O   6.373 -5.511 3.795\n  H   5.969 -5.397 2.887\n  H   7.282 -5.093 3.810\n  O   4.068 1.601 1.434\n  H   5.026 1.810 1.239\n  H   3.871 1.805 2.394\n  O   5.833 -0.679 -0.244\n  H   5.908 -1.110 0.656\n  H   5.768 -1.386 -0.948\n  O   -0.227 4.984 5.241\n  H   -0.206 4.365 6.026\n  H   -0.565 5.880 5.531\n  O   0.185 -2.868 5.188\n  H   0.595 -3.776 5.275\n  H   0.903 -2.173 5.222\n  O   1.482 -5.346 5.311\n  H   1.044 -5.849 6.056\n  H   2.463 -5.273 5.489\n  O   -6.982 -6.493 -1.881\n  H   -6.853 -5.502 -1.837\n  H   -7.396 -6.813 -1.028\n  O   1.567 -0.094 7.082\n  H   1.675 -0.270 6.104\n  H   1.702 -0.945 7.591\n  O   -6.733 -3.792 -2.231\n  H   -6.154 -3.985 -3.023\n  H   -6.211 -3.273 -1.555\n  O   -2.241 1.065 -8.099\n  H   -2.838 1.811 -7.804\n  H   -1.927 1.238 -9.033\n  O   1.184 -8.406 -4.271\n  H   0.289 -8.227 -3.862\n  H   1.816 -7.671 -4.024\n  O   -1.759 -5.986 5.639\n  H   -1.238 -5.812 4.803\n  H   -2.042 -6.945 5.662\n  O   -2.006 5.584 0.364\n  H   -1.395 5.940 -0.343\n  H   -1.706 4.668 0.634\n  O   -4.223 -3.032 -7.462\n  H   -4.510 -2.086 -7.314\n  H   -3.597 -3.309 -6.734\n  O   -0.809 -7.960 1.390\n  H   -1.522 -8.595 1.092\n  H   -0.870 -7.116 0.857\n  O   5.950 -4.502 -3.135\n  H   6.883 -4.774 -2.897\n  H   5.299 -5.061 -2.622\n  O   -3.940 -5.480 1.339\n  H   -3.935 -6.239 1.991\n  H   -4.884 -5.249 1.103\n  O   1.479 6.047 -6.364\n  H   0.992 6.875 -6.088\n  H   2.446 6.260 -6.505\n  O   -5.989 7.555 0.510\n  H   -6.325 6.623 0.371\n  H   -6.104 8.080 -0.333\n  O   -0.077 3.440 -2.750\n  H   0.503 2.709 -2.390\n  H   -0.034 4.231 -2.140\n  O   -3.562 -0.141 2.104\n  H   -3.670 -1.112 1.889\n  H   -4.304 0.150 2.708\n  O   2.145 -6.344 -2.231\n  H   3.120 -6.559 -2.291\n  H   1.719 -6.921 -1.534\n  O   3.486 -6.707 -6.725\n  H   3.931 -7.296 -6.051\n  H   3.591 -5.750 -6.453\n  O   3.117 5.630 4.947\n  H   2.437 5.438 5.655\n  H   2.900 6.500 4.504\n  O   2.865 1.448 -3.822\n  H   2.102 0.810 -3.928\n  H   3.231 1.378 -2.894\n  O   -2.134 0.325 6.016\n  H   -2.949 0.903 5.987\n  H   -1.804 0.168 5.085\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   2.245 -0.070 -7.994\n  H   2.050 -0.872 -8.559\n  H   1.385 0.356 -7.712\n  O   -3.771 6.541 4.451\n  H   -3.120 6.986 5.066\n  H   -4.025 7.173 3.719\n  O   -3.083 5.492 -3.884\n  H   -2.244 6.034 -3.822\n  H   -3.646 5.655 -3.073\n  O   6.549 -1.629 -6.134\n  H   6.179 -1.178 -6.947\n  H   5.996 -1.385 -5.337\n  O   -6.423 -2.669 3.744\n  H   -7.133 -2.666 3.040\n  H   -6.827 -2.922 4.624\n  O   5.518 5.429 -5.599\n  H   5.103 4.520 -5.550\n  H   6.371 5.378 -6.119\n  O   0.536 5.441 -0.945\n  H   1.398 5.073 -0.598\n  H   0.599 6.437 -1.008\n  O   -0.412 4.121 7.686\n  H   -0.671 3.161 7.796\n  H   0.304 4.351 8.345\n  O   -0.932 -3.524 2.530\n  H   -0.441 -2.916 3.154\n  H   -0.772 -4.475 2.796\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   5.087 -4.778 1.625\n  H   5.098 -3.800 1.833\n  H   4.441 -4.954 0.882\n  O   9.306 -1.472 -0.457\n  H   9.298 -2.333 -0.966\n  H   8.763 -0.789 -0.947\n  O   4.558 2.619 -5.781\n  H   3.910 2.456 -5.038\n  H   4.121 2.410 -6.657\n  O   -1.128 -7.398 -2.954\n  H   -1.640 -8.210 -2.673\n  H   -1.178 -6.707 -2.233\n  O   -4.850 6.232 -5.686\n  H   -4.011 6.277 -5.143\n  H   -4.619 6.249 -6.659\n  O   2.889 2.658 -8.186\n  H   2.770 1.706 -8.467\n  H   1.994 3.097 -8.110\n  O   6.997 -0.718 6.306\n  H   7.672 -0.198 5.782\n  H   7.437 -1.517 6.715\n  O   -7.918 1.301 -3.143\n  H   -6.959 1.023 -3.197\n  H   -8.435 0.620 -2.624\n  O   3.500 -3.912 7.720\n  H   4.049 -3.076 7.711\n  H   3.854 -4.550 7.036\n  O   7.958 -1.838 3.365\n  H   7.996 -0.854 3.190\n  H   7.035 -2.174 3.179\n  O   -4.191 -7.483 3.353\n  H   -3.364 -7.577 3.908\n  H   -4.449 -8.377 2.987\n  O   -4.227 5.725 -1.282\n  H   -5.034 5.348 -0.826\n  H   -3.445 5.688 -0.661\n  O   4.106 -0.877 -4.871\n  H   3.327 -1.490 -4.999\n  H   3.782 0.067 -4.813\n  O   6.833 1.952 -4.327\n  H   6.068 2.142 -4.943\n  H   7.682 1.906 -4.855\n  O   -4.111 -2.648 2.417\n  H   -3.284 -3.052 2.810\n  H   -4.914 -2.999 2.898\n  O   -6.546 -6.100 4.045\n  H   -6.395 -5.153 4.329\n  H   -5.665 -6.541 3.872\n  O   -7.147 -2.401 -6.115\n  H   -6.641 -3.072 -5.572\n  H   -8.083 -2.330 -5.769\n  O   6.723 1.948 0.853\n  H   6.382 1.169 0.328\n  H   7.362 2.475 0.292\n  O   -0.571 1.311 8.043\n  H   0.313 0.914 8.291\n  H   -0.891 0.901 7.188\n  O   -8.493 -2.561 1.927\n  H   -9.246 -2.330 2.543\n  H   -8.752 -2.340 0.986\n  O   4.912 -0.265 4.360\n  H   4.609 0.665 4.149\n  H   5.640 -0.230 5.046\n  O   5.352 4.701 -0.048\n  H   5.850 4.342 0.742\n  H   5.660 4.234 -0.877\n  O   7.940 0.152 -2.111\n  H   7.570 0.886 -2.681\n  H   7.221 -0.517 -1.921\n  O   5.888 -1.800 -2.940\n  H   5.229 -1.345 -3.540\n  H   5.794 -2.791 -3.031\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\n  O   -1.040 7.276 -4.144\n  H   -0.192 7.211 -3.617\n  H   -0.851 7.711 -5.025\n  O   -3.497 -4.223 6.794\n  H   -2.862 -3.458 6.906\n  H   -3.107 -4.889 6.157\n  O   8.413 4.473 -0.589\n  H   8.692 4.954 0.242\n  H   9.168 4.474 -1.245\n  O   0.891 -0.095 -4.585\n  H   1.370 -0.796 -5.115\n  H   0.214 0.358 -5.166\n  O   -7.160 5.526 3.647\n  H   -7.450 6.336 4.157\n  H   -6.268 5.696 3.229\n  O   4.118 8.839 -1.791\n  H   4.506 8.434 -0.963\n  H   4.100 8.155 -2.520\n  O   -1.675 3.224 3.349\n  H   -1.164 3.751 4.028\n  H   -1.596 3.666 2.455\n  O   4.080 -7.695 1.256\n  H   4.959 -8.005 0.894\n  H   4.099 -6.702 1.373\n  O   0.180 -3.354 -7.226\n  H   -0.436 -3.427 -8.011\n  H   0.492 -4.267 -6.963\n  O   4.731 -7.308 -1.953\n  H   4.528 -8.286 -2.008\n  H   5.347 -7.138 -1.183\n  O   4.713 -5.705 5.949\n  H   5.264 -5.537 5.132\n  H   5.295 -6.077 6.673\n  O   -1.868 -3.701 -8.968\n  H   -2.407 -3.382 -8.188\n  H   -2.050 -3.118 -9.760\n  O   1.262 -3.954 -3.289\n  H   0.410 -4.196 -3.754\n  H   1.684 -4.780 -2.914\n  O   -6.482 1.649 -6.374\n  H   -5.847 1.368 -5.654\n  H   -7.076 2.376 -6.030\n  O   -2.746 9.171 -2.040\n  H   -3.551 9.761 -2.100\n  H   -2.785 8.479 -2.762\n  O   1.522 -2.362 9.024\n  H   0.867 -2.777 9.656\n  H   2.059 -3.080 8.580\n  O   -5.387 -4.448 -4.788\n  H   -5.604 -5.131 -5.485\n  H   -4.530 -3.989 -5.025\nend\n\n# water*213\ngeometry\n  units angstrom\n  O   -9.564 5.657 1.611\n  H   -8.967 5.042 2.126\n  H   -9.118 6.546 1.508\n  O   7.655 -9.405 -6.932\n  H   7.028 -9.701 -7.653\n  H   7.671 -8.406 -6.893\n  O   2.377 7.497 -3.832\n  H   2.957 6.974 -4.457\n  H   2.434 8.470 -4.059\n  O   -8.388 8.317 1.547\n  H   -7.546 8.010 1.104\n  H   -8.191 9.109 2.125\n  O   8.817 1.831 7.613\n  H   9.333 1.039 7.287\n  H   9.315 2.669 7.389\n  O   4.829 -4.894 -8.756\n  H   4.134 -4.580 -9.403\n  H   4.477 -4.815 -7.824\n  O   -2.591 -0.898 -4.405\n  H   -1.704 -0.542 -4.109\n  H   -2.513 -1.255 -5.336\n  O   1.215 0.624 2.639\n  H   1.229 1.615 2.508\n  H   0.364 0.360 3.094\n  O   1.451 3.499 2.870\n  H   1.210 4.168 3.573\n  H   1.914 3.961 2.113\n  O   -2.256 5.958 8.393\n  H   -1.997 6.468 9.214\n  H   -1.471 5.433 8.065\n  O   -4.756 0.823 8.564\n  H   -5.126 -0.107 8.583\n  H   -4.725 1.150 7.619\n  O   2.382 -1.764 1.436\n  H   2.086 -1.833 0.483\n  H   1.953 -0.967 1.861\n  O   8.630 6.074 -4.351\n  H   8.102 6.484 -3.608\n  H   9.551 6.464 -4.361\n  O   6.787 4.926 2.613\n  H   7.726 5.043 2.289\n  H   6.421 5.811 2.902\n  O   8.929 -2.526 -4.937\n  H   8.779 -2.602 -3.951\n  H   8.086 -2.220 -5.379\n  O   -4.066 4.005 3.885\n  H   -3.995 4.957 4.183\n  H   -3.156 3.656 3.661\n  O   -8.271 -7.802 2.803\n  H   -7.536 -7.201 3.120\n  H   -8.680 -8.269 3.587\n  O   3.690 2.403 3.993\n  H   4.451 3.015 4.210\n  H   2.853 2.938 3.877\n  O   -5.022 0.649 -4.243\n  H   -4.273 -0.004 -4.353\n  H   -4.660 1.516 -3.898\n  O   -1.900 3.708 -7.094\n  H   -2.721 4.275 -7.030\n  H   -1.341 3.837 -6.275\n  O   7.200 -3.179 7.917\n  H   6.208 -3.233 7.801\n  H   7.439 -3.415 8.859\n  O   7.878 -6.324 -2.513\n  H   7.752 -6.736 -1.610\n  H   8.196 -7.021 -3.156\n  O   8.176 -6.559 -7.069\n  H   7.647 -5.733 -7.262\n  H   8.425 -7.004 -7.929\n  O   -1.962 -2.092 7.241\n  H   -1.271 -2.150 6.519\n  H   -2.191 -1.132 7.406\n  O   -5.658 0.190 3.826\n  H   -6.561 0.552 3.590\n  H   -5.729 -0.792 4.003\n  O   5.003 -2.167 2.276\n  H   5.065 -1.570 3.076\n  H   4.079 -2.121 1.897\n  O   9.263 -2.788 5.762\n  H   8.980 -2.922 4.812\n  H   9.202 -3.657 6.254\n  O   0.971 8.024 -1.417\n  H   1.694 7.819 -2.078\n  H   1.200 8.863 -0.923\n  O   2.740 -5.205 -0.011\n  H   2.359 -4.286 0.096\n  H   2.592 -5.521 -0.948\n  O   7.721 2.515 5.255\n  H   7.920 1.866 5.989\n  H   6.971 3.115 5.534\n  O   5.750 7.146 3.481\n  H   4.788 7.294 3.250\n  H   6.087 7.920 4.018\n  O   2.009 -8.898 -7.919\n  H   1.412 -8.721 -8.702\n  H   2.671 -8.154 -7.830\n  O   -8.152 4.383 -2.618\n  H   -7.819 3.556 -3.071\n  H   -7.829 5.189 -3.114\n  O   5.092 -0.656 -8.134\n  H   5.524 0.080 -8.655\n  H   4.118 -0.456 -8.019\n  O   1.593 -8.076 -0.089\n  H   1.175 -8.479 0.726\n  H   2.497 -7.716 0.143\n  O   -1.040 -5.189 -4.625\n  H   -0.456 -5.402 -5.409\n  H   -1.364 -6.038 -4.209\n  O   3.101 6.996 1.942\n  H   3.131 5.997 1.961\n  H   2.165 7.299 1.760\n  O   8.020 0.899 2.975\n  H   7.650 1.251 2.115\n  H   7.768 1.513 3.723\n  O   -3.064 -3.450 -4.998\n  H   -2.319 -4.108 -4.887\n  H   -2.886 -2.645 -4.432\n  O   5.551 4.270 5.300\n  H   4.695 4.701 5.588\n  H   5.896 4.729 4.481\n  O   -4.485 8.675 2.394\n  H   -3.636 8.610 1.870\n  H   -5.215 8.193 1.908\n  O   -2.809 -1.320 -1.524\n  H   -2.687 -1.139 -2.500\n  H   -2.625 -0.486 -1.004\n  O   7.260 5.621 8.730\n  H   6.444 5.051 8.630\n  H   7.652 5.485 9.641\n  O   -4.250 2.926 -3.199\n  H   -3.744 3.772 -3.366\n  H   -4.529 2.888 -2.239\n  O   2.088 -2.599 -5.399\n  H   1.534 -2.826 -6.201\n  H   1.842 -3.205 -4.642\n  O   4.846 -1.699 7.968\n  H   4.949 -1.460 8.933\n  H   5.593 -1.292 7.442\n  O   -7.602 7.912 5.278\n  H   -7.852 7.213 5.949\n  H   -8.331 8.595 5.221\n  O   -7.933 1.521 3.421\n  H   -8.812 1.071 3.261\n  H   -8.050 2.249 4.097\n  O   1.258 8.356 4.085\n  H   0.797 7.935 3.303\n  H   1.890 9.061 3.760\n  O   -6.413 -1.265 8.476\n  H   -7.005 -0.891 9.190\n  H   -6.641 -2.227 8.324\n  O   0.089 3.928 -5.479\n  H   0.674 4.692 -5.749\n  H   0.099 3.835 -4.483\n  O   -7.176 4.229 7.879\n  H   -6.193 4.390 7.971\n  H   -7.384 3.966 6.936\n  O   -4.393 1.699 5.817\n  H   -4.900 1.329 5.038\n  H   -4.513 2.691 5.852\n  O   -5.179 -2.392 -0.345\n  H   -4.607 -2.632 0.440\n  H   -4.606 -2.005 -1.068\n  O   6.483 -8.887 5.150\n  H   6.042 -8.148 4.641\n  H   5.882 -9.187 5.891\n  O   5.067 7.316 0.249\n  H   5.259 6.361 0.022\n  H   4.222 7.368 0.782\n  O   0.595 4.467 -8.345\n  H   -0.284 4.068 -8.085\n  H   0.944 5.026 -7.592\n  O   0.846 1.015 -1.428\n  H   1.740 0.624 -1.208\n  H   0.391 0.444 -2.112\n  O   -0.184 -5.996 3.292\n  H   0.634 -5.834 3.843\n  H   -0.166 -6.929 2.933\n  O   4.204 -4.197 -5.876\n  H   3.601 -3.415 -5.719\n  H   4.933 -4.199 -5.192\n  O   -0.816 -5.669 8.301\n  H   -1.275 -5.111 8.993\n  H   -1.369 -5.689 7.468\n  O   -2.593 -8.452 5.546\n  H   -2.151 -9.349 5.537\n  H   -3.575 -8.565 5.701\n  O   6.744 2.879 -1.799\n  H   6.709 2.499 -2.723\n  H   7.445 3.592 -1.757\n  O   6.678 1.311 9.267\n  H   7.150 1.018 10.099\n  H   7.331 1.351 8.510\n  O   -1.799 -1.423 -6.793\n  H   -2.095 -0.572 -7.227\n  H   -0.887 -1.667 -7.123\n  O   5.147 3.677 9.007\n  H   4.578 3.717 9.829\n  H   5.546 2.763 8.923\n  O   -4.690 -4.583 9.143\n  H   -4.161 -4.327 8.333\n  H   -4.468 -3.963 9.896\n  O   -1.562 1.556 -3.743\n  H   -0.872 2.240 -3.503\n  H   -2.461 1.867 -3.431\n  O   0.893 -5.948 -6.780\n  H   1.779 -6.403 -6.692\n  H   0.268 -6.533 -7.297\n  O   8.209 -5.281 0.671\n  H   8.107 -4.554 -0.008\n  H   8.981 -5.865 0.421\n  O   -5.028 2.883 -8.319\n  H   -4.750 2.197 -8.992\n  H   -5.619 2.456 -7.633\n  O   2.161 -0.896 4.600\n  H   3.160 -0.935 4.567\n  H   1.841 -0.115 4.063\n  O   0.107 1.468 -6.868\n  H   -0.101 2.302 -6.356\n  H   -0.572 1.343 -7.592\n  O   -8.934 6.366 7.309\n  H   -9.851 6.199 7.672\n  H   -8.325 5.623 7.586\n  O   0.219 7.296 1.815\n  H   -0.497 7.981 1.682\n  H   -0.094 6.413 1.464\n  O   -6.810 4.999 -0.222\n  H   -6.547 4.090 0.102\n  H   -7.216 4.924 -1.133\n  O   -2.260 8.292 0.709\n  H   -2.309 8.665 -0.217\n  H   -2.399 7.302 0.677\n  O   -6.220 -4.150 6.077\n  H   -5.228 -4.025 6.098\n  H   -6.567 -4.220 7.012\n  O   -6.699 -0.093 -0.118\n  H   -7.620 -0.447 0.044\n  H   -6.029 -0.693 0.319\n  O   -2.020 -5.788 -0.763\n  H   -1.639 -4.864 -0.801\n  H   -2.820 -5.794 -0.163\n  O   -1.399 0.623 3.523\n  H   -2.161 0.094 3.147\n  H   -1.634 1.595 3.518\n  O   3.139 -8.517 3.576\n  H   2.717 -7.695 3.958\n  H   3.625 -8.283 2.734\n  O   3.544 0.925 -1.230\n  H   4.454 0.792 -1.623\n  H   3.590 0.812 -0.237\n  O   -5.557 2.427 -0.659\n  H   -6.083 1.596 -0.841\n  H   -5.458 2.550 0.328\n  O   -8.310 -4.400 -7.767\n  H   -9.211 -4.389 -7.334\n  H   -7.703 -3.765 -7.290\n  O   -5.728 2.979 1.921\n  H   -5.008 3.330 2.519\n  H   -6.318 2.358 2.438\n  O   -8.543 -7.037 0.239\n  H   -8.175 -7.281 1.137\n  H   -8.829 -7.866 -0.241\n  O   -6.553 -4.656 0.861\n  H   -7.471 -4.671 1.257\n  H   -6.309 -3.717 0.618\n  O   7.167 -4.065 -7.723\n  H   7.046 -3.333 -7.052\n  H   6.285 -4.287 -8.137\n  O   2.752 4.918 7.960\n  H   3.595 4.382 7.904\n  H   2.313 4.755 8.844\n  O   2.718 4.262 0.458\n  H   3.685 4.442 0.273\n  H   2.550 3.276 0.419\n  O   5.836 -6.870 8.200\n  H   5.755 -6.297 9.016\n  H   6.762 -7.245 8.147\n  O   6.373 -5.511 3.795\n  H   5.969 -5.397 2.887\n  H   7.282 -5.093 3.810\n  O   4.068 1.601 1.434\n  H   5.026 1.810 1.239\n  H   3.871 1.805 2.394\n  O   5.833 -0.679 -0.244\n  H   5.908 -1.110 0.656\n  H   5.768 -1.386 -0.948\n  O   -0.227 4.984 5.241\n  H   -0.206 4.365 6.026\n  H   -0.565 5.880 5.531\n  O   2.645 7.735 8.196\n  H   2.798 7.860 9.176\n  H   2.543 6.760 7.996\n  O   4.081 6.645 -7.409\n  H   4.700 6.151 -6.799\n  H   4.600 7.316 -7.940\n  O   0.185 -2.868 5.188\n  H   0.595 -3.776 5.275\n  H   0.903 -2.173 5.222\n  O   1.482 -5.346 5.311\n  H   1.044 -5.849 6.056\n  H   2.463 -5.273 5.489\n  O   8.670 1.210 -7.468\n  H   9.499 0.678 -7.640\n  H   8.797 1.768 -6.647\n  O   -6.982 -6.493 -1.881\n  H   -6.853 -5.502 -1.837\n  H   -7.396 -6.813 -1.028\n  O   -6.585 -8.381 7.660\n  H   -7.077 -8.731 8.458\n  H   -7.196 -7.803 7.119\n  O   1.567 -0.094 7.082\n  H   1.675 -0.270 6.104\n  H   1.702 -0.945 7.591\n  O   -6.733 -3.792 -2.231\n  H   -6.154 -3.985 -3.023\n  H   -6.211 -3.273 -1.555\n  O   7.446 8.892 0.595\n  H   8.250 8.605 1.115\n  H   6.745 8.181 0.645\n  O   -2.241 1.065 -8.099\n  H   -2.838 1.811 -7.804\n  H   -1.927 1.238 -9.033\n  O   1.184 -8.406 -4.271\n  H   0.289 -8.227 -3.862\n  H   1.816 -7.671 -4.024\n  O   -1.759 -5.986 5.639\n  H   -1.238 -5.812 4.803\n  H   -2.042 -6.945 5.662\n  O   -2.006 5.584 0.364\n  H   -1.395 5.940 -0.343\n  H   -1.706 4.668 0.634\n  O   -4.223 -3.032 -7.462\n  H   -4.510 -2.086 -7.314\n  H   -3.597 -3.309 -6.734\n  O   4.802 -7.949 -4.709\n  H   5.395 -8.750 -4.799\n  H   5.086 -7.412 -3.915\n  O   -0.809 -7.960 1.390\n  H   -1.522 -8.595 1.092\n  H   -0.870 -7.116 0.857\n  O   -7.590 -0.268 -7.752\n  H   -7.225 0.516 -7.250\n  H   -7.399 -1.108 -7.243\n  O   5.950 -4.502 -3.135\n  H   6.883 -4.774 -2.897\n  H   5.299 -5.061 -2.622\n  O   -3.940 -5.480 1.339\n  H   -3.935 -6.239 1.991\n  H   -4.884 -5.249 1.103\n  O   0.269 8.569 -6.235\n  H   0.645 8.836 -7.123\n  H   0.516 9.254 -5.549\n  O   1.479 6.047 -6.364\n  H   0.992 6.875 -6.088\n  H   2.446 6.260 -6.505\n  O   7.903 4.699 -6.735\n  H   8.682 4.611 -7.357\n  H   8.208 5.101 -5.872\n  O   -1.278 -7.179 -7.880\n  H   -1.350 -6.915 -8.842\n  H   -2.020 -7.809 -7.651\n  O   -5.989 7.555 0.510\n  H   -6.325 6.623 0.371\n  H   -6.104 8.080 -0.333\n  O   -5.920 -9.108 -5.406\n  H   -6.278 -8.283 -5.844\n  H   -6.481 -9.894 -5.667\n  O   -8.255 3.588 5.170\n  H   -8.051 4.194 4.402\n  H   -9.246 3.476 5.253\n  O   -0.077 3.440 -2.750\n  H   0.503 2.709 -2.390\n  H   -0.034 4.231 -2.140\n  O   -3.562 -0.141 2.104\n  H   -3.670 -1.112 1.889\n  H   -4.304 0.150 2.708\n  O   -5.187 9.268 5.755\n  H   -5.784 8.756 5.136\n  H   -5.728 9.632 6.513\n  O   2.145 -6.344 -2.231\n  H   3.120 -6.559 -2.291\n  H   1.719 -6.921 -1.534\n  O   7.474 7.684 -2.165\n  H   7.070 7.863 -3.062\n  H   6.762 7.377 -1.533\n  O   3.486 -6.707 -6.725\n  H   3.931 -7.296 -6.051\n  H   3.591 -5.750 -6.453\n  O   -5.241 -7.039 -8.907\n  H   -5.124 -6.118 -9.281\n  H   -5.564 -7.653 -9.628\n  O   -7.822 9.280 -8.840\n  H   -7.568 8.317 -8.926\n  H   -7.822 9.541 -7.875\n  O   3.117 5.630 4.947\n  H   2.437 5.438 5.655\n  H   2.900 6.500 4.504\n  O   0.663 8.780 6.798\n  H   0.704 8.731 5.800\n  H   1.403 8.233 7.190\n  O   2.865 1.448 -3.822\n  H   2.102 0.810 -3.928\n  H   3.231 1.378 -2.894\n  O   -2.134 0.325 6.016\n  H   -2.949 0.903 5.987\n  H   -1.804 0.168 5.085\n  O   -4.626 5.171 7.284\n  H   -3.706 5.357 7.629\n  H   -4.874 5.861 6.605\n  O   1.469 -2.254 -1.184\n  H   0.605 -2.509 -0.749\n  H   1.556 -2.733 -2.058\n  O   -1.418 -3.313 -0.230\n  H   -1.206 -3.365 0.746\n  H   -1.779 -2.405 -0.444\n  O   -3.555 -8.725 -7.129\n  H   -3.968 -8.139 -7.826\n  H   -4.210 -8.876 -6.389\n  O   2.245 -0.070 -7.994\n  H   2.050 -0.872 -8.559\n  H   1.385 0.356 -7.712\n  O   -3.771 6.541 4.451\n  H   -3.120 6.986 5.066\n  H   -4.025 7.173 3.719\n  O   -3.083 5.492 -3.884\n  H   -2.244 6.034 -3.822\n  H   -3.646 5.655 -3.073\n  O   6.549 -1.629 -6.134\n  H   6.179 -1.178 -6.947\n  H   5.996 -1.385 -5.337\n  O   -6.423 -2.669 3.744\n  H   -7.133 -2.666 3.040\n  H   -6.827 -2.922 4.624\n  O   -8.573 3.739 -8.349\n  H   -8.965 2.825 -8.246\n  H   -8.187 3.834 -9.267\n  O   5.518 5.429 -5.599\n  H   5.103 4.520 -5.550\n  H   6.371 5.378 -6.119\n  O   -7.405 6.830 -3.649\n  H   -7.506 7.564 -2.978\n  H   -6.465 6.817 -3.991\n  O   -8.962 2.663 -5.129\n  H   -8.732 2.029 -4.390\n  H   -9.296 3.522 -4.740\n  O   -1.711 7.703 6.156\n  H   -0.858 8.157 6.413\n  H   -2.199 7.417 6.982\n  O   0.536 5.441 -0.945\n  H   1.398 5.073 -0.598\n  H   0.599 6.437 -1.008\n  O   -0.412 4.121 7.686\n  H   -0.671 3.161 7.796\n  H   0.304 4.351 8.345\n  O   -0.932 -3.524 2.530\n  H   -0.441 -2.916 3.154\n  H   -0.772 -4.475 2.796\n  O   -3.219 1.186 -0.253\n  H   -4.033 1.733 -0.448\n  H   -3.341 0.705 0.616\n  O   6.483 -7.292 -0.018\n  H   6.951 -6.599 0.531\n  H   6.934 -8.176 0.108\n  O   5.087 -4.778 1.625\n  H   5.098 -3.800 1.833\n  H   4.441 -4.954 0.882\n  O   9.306 -1.472 -0.457\n  H   9.298 -2.333 -0.966\n  H   8.763 -0.789 -0.947\n  O   4.558 2.619 -5.781\n  H   3.910 2.456 -5.038\n  H   4.121 2.410 -6.657\n  O   -1.128 -7.398 -2.954\n  H   -1.640 -8.210 -2.673\n  H   -1.178 -6.707 -2.233\n  O   -4.850 6.232 -5.686\n  H   -4.011 6.277 -5.143\n  H   -4.619 6.249 -6.659\n  O   -8.125 -6.086 6.778\n  H   -8.063 -5.804 5.820\n  H   -8.011 -5.288 7.369\n  O   -8.154 -0.363 6.519\n  H   -7.404 -0.669 7.106\n  H   -8.474 -1.128 5.960\n  O   2.889 2.658 -8.186\n  H   2.770 1.706 -8.467\n  H   1.994 3.097 -8.110\n  O   6.997 -0.718 6.306\n  H   7.672 -0.198 5.782\n  H   7.437 -1.517 6.715\n  O   -7.918 1.301 -3.143\n  H   -6.959 1.023 -3.197\n  H   -8.435 0.620 -2.624\n  O   -7.548 5.986 -6.781\n  H   -7.721 5.271 -7.459\n  H   -6.676 5.808 -6.325\n  O   -8.516 8.614 -6.067\n  H   -8.368 7.680 -6.393\n  H   -9.484 8.849 -6.159\n  O   3.500 -3.912 7.720\n  H   4.049 -3.076 7.711\n  H   3.854 -4.550 7.036\n  O   7.958 -1.838 3.365\n  H   7.996 -0.854 3.190\n  H   7.035 -2.174 3.179\n  O   -1.490 8.030 -8.316\n  H   -0.899 7.729 -7.567\n  H   -2.111 8.741 -7.986\n  O   -4.191 -7.483 3.353\n  H   -3.364 -7.577 3.908\n  H   -4.449 -8.377 2.987\n  O   -4.227 5.725 -1.282\n  H   -5.034 5.348 -0.826\n  H   -3.445 5.688 -0.661\n  O   4.106 -0.877 -4.871\n  H   3.327 -1.490 -4.999\n  H   3.782 0.067 -4.813\n  O   6.833 1.952 -4.327\n  H   6.068 2.142 -4.943\n  H   7.682 1.906 -4.855\n  O   -4.111 -2.648 2.417\n  H   -3.284 -3.052 2.810\n  H   -4.914 -2.999 2.898\n  O   -6.546 -6.100 4.045\n  H   -6.395 -5.153 4.329\n  H   -5.665 -6.541 3.872\n  O   -7.147 -2.401 -6.115\n  H   -6.641 -3.072 -5.572\n  H   -8.083 -2.330 -5.769\n  O   6.723 1.948 0.853\n  H   6.382 1.169 0.328\n  H   7.362 2.475 0.292\n  O   -0.571 1.311 8.043\n  H   0.313 0.914 8.291\n  H   -0.891 0.901 7.188\n  O   -8.493 -2.561 1.927\n  H   -9.246 -2.330 2.543\n  H   -8.752 -2.340 0.986\n  O   -4.933 -8.273 -2.851\n  H   -5.473 -7.489 -2.545\n  H   -5.248 -8.562 -3.755\n  O   4.912 -0.265 4.360\n  H   4.609 0.665 4.149\n  H   5.640 -0.230 5.046\n  O   5.352 4.701 -0.048\n  H   5.850 4.342 0.742\n  H   5.660 4.234 -0.877\n  O   7.940 0.152 -2.111\n  H   7.570 0.886 -2.681\n  H   7.221 -0.517 -1.921\n  O   4.863 9.076 7.408\n  H   4.637 9.977 7.780\n  H   4.140 8.427 7.646\n  O   5.888 -1.800 -2.940\n  H   5.229 -1.345 -3.540\n  H   5.794 -2.791 -3.031\n  O   -6.970 -6.626 -6.793\n  H   -6.318 -6.635 -7.552\n  H   -7.752 -6.051 -7.032\n  O   -1.137 3.033 0.493\n  H   -1.894 2.475 0.151\n  H   -0.268 2.601 0.249\n  O   -4.166 5.479 -8.203\n  H   -4.602 4.592 -8.356\n  H   -3.737 5.791 -9.050\n  O   0.994 -7.837 8.540\n  H   0.579 -6.938 8.400\n  H   0.676 -8.466 7.830\n  O   -1.040 7.276 -4.144\n  H   -0.192 7.211 -3.617\n  H   -0.851 7.711 -5.025\n  O   -3.497 -4.223 6.794\n  H   -2.862 -3.458 6.906\n  H   -3.107 -4.889 6.157\n  O   8.413 4.473 -0.589\n  H   8.692 4.954 0.242\n  H   9.168 4.474 -1.245\n  O   0.891 -0.095 -4.585\n  H   1.370 -0.796 -5.115\n  H   0.214 0.358 -5.166\n  O   -7.160 5.526 3.647\n  H   -7.450 6.336 4.157\n  H   -6.268 5.696 3.229\n  O   -6.738 8.745 -1.738\n  H   -6.224 9.430 -2.254\n  H   -7.631 9.118 -1.487\n  O   9.148 -5.184 3.446\n  H   8.915 -5.100 2.477\n  H   9.561 -6.080 3.612\n  O   4.118 8.839 -1.791\n  H   4.506 8.434 -0.963\n  H   4.100 8.155 -2.520\n  O   -1.675 3.224 3.349\n  H   -1.164 3.751 4.028\n  H   -1.596 3.666 2.455\n  O   4.080 -7.695 1.256\n  H   4.959 -8.005 0.894\n  H   4.099 -6.702 1.373\n  O   0.180 -3.354 -7.226\n  H   -0.436 -3.427 -8.011\n  H   0.492 -4.267 -6.963\n  O   4.731 -7.308 -1.953\n  H   4.528 -8.286 -2.008\n  H   5.347 -7.138 -1.183\n  O   4.713 -5.705 5.949\n  H   5.264 -5.537 5.132\n  H   5.295 -6.077 6.673\n  O   6.594 8.038 -4.794\n  H   7.012 8.311 -5.661\n  H   6.127 7.161 -4.911\n  O   9.272 -8.787 5.058\n  H   8.314 -9.072 5.084\n  H   9.383 -7.945 5.587\n  O   -1.868 -3.701 -8.968\n  H   -2.407 -3.382 -8.188\n  H   -2.050 -3.118 -9.760\n  O   1.262 -3.954 -3.289\n  H   0.410 -4.196 -3.754\n  H   1.684 -4.780 -2.914\n  O   -7.233 -4.055 8.541\n  H   -7.794 -4.229 9.350\n  H   -6.287 -4.321 8.728\n  O   -6.482 1.649 -6.374\n  H   -5.847 1.368 -5.654\n  H   -7.076 2.376 -6.030\n  O   -2.746 9.171 -2.040\n  H   -3.551 9.761 -2.100\n  H   -2.785 8.479 -2.762\n  O   1.522 -2.362 9.024\n  H   0.867 -2.777 9.656\n  H   2.059 -3.080 8.580\n  O   8.635 -7.791 9.015\n  H   9.359 -8.390 9.358\n  H   8.937 -7.355 8.167\n  O   -5.387 -4.448 -4.788\n  H   -5.604 -5.131 -5.485\n  H   -4.530 -3.989 -5.025\n  O   9.424 -9.013 -1.553\n  H   8.730 -9.715 -1.393\n  H   9.319 -8.645 -2.478\nend\n"
  },
  {
    "path": "src/apps/periodic_old/lda.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/*\n * lda.h\n *\n *  Created on: Nov 10, 2008\n *      Author: wsttiger\n */\n\n#ifndef LDA_H_\n#define LDA_H_\n\n#include <madness/mra/mra.h>\n#include <madness/world/MADworld.h>\n#include <math.h>\n#include <madness/madness_config.h>\n\ntypedef double doublereal;\ntypedef MADNESS_FORINT integer;\ntypedef int logical;\n\n#define max(a,b) ((a)>=(b)?(a):(b))\n\n/* static double pow_dd(doublereal* a, doublereal* b) { */\n/*     return pow(*a,*b); */\n/* } */\n\n/* lda.f -- translated by f2c (version 20050501).\n   You must link the resulting object file with libf2c:\n  on Microsoft Windows system, link with libf2c.lib;\n  on Linux or Unix systems, link with .../path/to/libf2c.a -lm\n  or, if you install libf2c.a in a standard place, with -lf2c -lm\n  -- in that order, at the end of the command line, as in\n    cc *.o -lf2c -lm\n  Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n    http://www.netlib.org/f2c/libf2c.zip\n*/\n\n\n/* Table of constant values */\n\n#include <cmath>\n\nstatic inline double pow(const double* a, const double* b) {\n    return pow(*a, *b);\n}\n\nstatic double c_b2 = .333333333333333333333333333333333;\nstatic double c_b7 = .333333333333333333333333333333;\nstatic double c_b8 = .5;\nstatic double c_b14 = 1.333333333333333333333333333333;\n\n\ninline /* Subroutine */ int x_rks_s__(const double *r__, double *f, double *\n  dfdra)\n{\n\n    /* Local variables */\n    double ra13;\n\n\n/*     This subroutine evaluates the spin polarised exchange functional */\n/*     in the Local Density Approximation [1], and the corresponding */\n/*     potential. Often this functional is referred to as the Dirac */\n/*     functional [2] or Slater functional. */\n\n/*     [1] F. Bloch, Zeitschrift fuer Physik, Vol. 57 (1929) 545. */\n\n/*     [2] P.A.M. Dirac, Proceedings of the Cambridge Philosophical */\n/*         Society, Vol. 26 (1930) 376. */\n\n/*     Parameters: */\n\n/*     r     the total electron density */\n/*     f     On return the functional value */\n/*     dfdra On return the derivative of f with respect to alpha electron */\n/*           density */\n\n\n/*     Ax = -3/4*(6/pi)**(1/3) */\n/*     Bx = -(6/pi)**(1/3) */\n/*     C  = (1/2)**(1/3) */\n\n\n\n\n    ra13 = pow(r__, &c_b2) * .793700525984099737375852819636154;\n    *f = *r__ * -.930525736349100025002010218071667 * ra13;\n    *dfdra = ra13 * -1.24070098179880003333601362409556;\n\n    return 0;\n} /* x_rks_s__ */\n\n/* ----------------------------------------------------------------------- */\ninline /* Subroutine */ int x_uks_s__(double *ra, double *rb, double *f,\n  double *dfdra, double *dfdrb)\n{\n    /* Local variables */\n    double ra13, rb13;\n\n\n/*     This subroutine evaluates the spin polarised exchange functional */\n/*     in the Local Density Approximation [1], and the corresponding */\n/*     potential. Often this functional is referred to as the Dirac */\n/*     functional [2] or Slater functional. */\n\n/*     [1] F. Bloch, Zeitschrift fuer Physik, Vol. 57 (1929) 545. */\n\n/*     [2] P.A.M. Dirac, Proceedings of the Cambridge Philosophical */\n/*         Society, Vol. 26 (1930) 376. */\n\n/*     Parameters: */\n\n/*     ra    the alpha electron density */\n/*     rb    the beta  electron density */\n/*     f     On return the functional value */\n/*     dfdra On return the derivative of f with respect to ra */\n/*     dfdrb On return the derivative of f with respect to rb */\n\n\n/*     Ax = -3/4*(6/pi)**(1/3) */\n/*     Bx = -(6/pi)**(1/3) */\n\n\n\n\n    ra13 = pow(ra, &c_b2);\n    rb13 = pow(rb, &c_b2);\n    *f = (*ra * ra13 + *rb * rb13) * -.930525736349100025002010218071667;\n    *dfdra = ra13 * -1.24070098179880003333601362409556;\n    *dfdrb = rb13 * -1.24070098179880003333601362409556;\n\n    return 0;\n} /* x_uks_s__ */\n\ninline /* Subroutine */ int c_rks_vwn5__(const double *r__, double *f, double *\n  dfdra)\n{\n    /* Local variables */\n    double a2, b2, c2, d2, i1, i2, i3, p1, p2, p3, p4, t4, t5, t6,\n      t7, iv, alpha_rho13__, iv2, pp1, pp2, inv, srho, srho13;\n\n\n/*     This subroutine evaluates the Vosko, Wilk and Nusair correlation */\n/*     functional number 5 [1] for the closed shell case, with the */\n/*     parametrisation as given in table 5. */\n\n/*     The original code was obtained from Dr. Phillip Young, */\n/*     with corrections from Dr. Paul Sherwood. */\n\n/*     [1] S.H. Vosko, L. Wilk, and M. Nusair */\n/*         \"Accurate spin-dependent electron liquid correlation energies */\n/*          for local spin density calculations: a critical analysis\", */\n/*         Can.J.Phys, Vol. 58 (1980) 1200-1211. */\n\n/*     Parameters: */\n\n/*     r      the total electron density */\n/*     f      On return the functional value */\n/*     dfdra  On return the derivative of f with respect to the alpha */\n/*            electron density */\n\n\n\n\n/* VWN interpolation parameters */\n\n/* paramagnetic */\n    a2 = .0621814;\n    b2 = 3.72744;\n    c2 = 12.9352;\n    d2 = -.10498;\n\n/* t4 = (1/(4/3)*pi)**(1/3) */\n    t4 = .620350490899399531;\n\n/* t5 = 0.5/(2**(1/3)-1) */\n    t5 = 1.92366105093153617;\n\n/* t6 = 2/(3*(2**(1/3)-1)) */\n    t6 = 2.56488140124204822;\n\n/* t7 = 2.25*(2**(1/3)-1) */\n    t7 = .584822362263464735;\n\n/* Paramagnetic interpolation constants */\n\n    p1 = 6.1519908197590798;\n    p2 = a2 * .5;\n    p3 = 9.6902277115443745e-4;\n    p4 = .038783294878113009;\n\n/* closed shell case */\n    srho = *r__;\n    srho13 = pow(&srho, &c_b7);\n    alpha_rho13__ = pow(&c_b8, &c_b7) * srho;\n    iv2 = t4 / srho13;\n    iv = sqrt(iv2);\n\n/* paramagnetic */\n    inv = 1. / (iv2 + b2 * iv + c2);\n    i1 = log(iv2 * inv);\n    i2 = log((iv - d2) * (iv - d2) * inv);\n/* corrected b1->b2 ps Apr98 */\n    i3 = atan(p1 / (iv * 2. + b2));\n    pp1 = p2 * i1 + p3 * i2 + p4 * i3;\n    pp2 = a2 * (1. / iv - iv * inv * (b2 / (iv - d2) + 1.));\n\n    *f = pp1 * srho;\n    *dfdra = pp1 - iv * .166666666666666666666666666666 * pp2;\n\n    return 0;\n} /* c_rks_vwn5__ */\n\n/* ----------------------------------------------------------------------- */\ninline /* Subroutine */ int c_uks_vwn5__(double *ra, double *rb, double *\n  f, double *dfdra, double *dfdrb)\n{\n    /* System generated locals */\n    double d__1, d__2;\n\n    /* Local variables */\n    double v, beta_rho13__, a1, b1, c1, d1, a2, b2, c2, d2, a3, b3,\n       c3, d3, f1, f2, f3, p1, p2, p3, s1, t1, t2, s2, t4, t5, t6, t7,\n      s3, s4, p4, f4, i1, i2, i3, iv, alpha_rho13__, ff1, ff2, iv2, pp1,\n       pp2, ss1, ss2, tau, inv, vwn1, vwn2, dtau, zeta, srho, zeta3,\n      zeta4, srho13, inter1, inter2;\n\n\n/*     This subroutine evaluates the Vosko, Wilk and Nusair correlation */\n/*     functional number 5 [1], with the parametrisation as given in */\n/*     table 5. */\n\n/*     The original code was obtained from Dr. Phillip Young, */\n/*     with corrections from Dr. Paul Sherwood. */\n\n/*     [1] S.H. Vosko, L. Wilk, and M. Nusair */\n/*         \"Accurate spin-dependent electron liquid correlation energies */\n/*          for local spin density calculations: a critical analysis\", */\n/*         Can.J.Phys, Vol. 58 (1980) 1200-1211. */\n\n/*     Parameters: */\n\n/*     ra     the alpha-electron density */\n/*     rb     the beta-electron density */\n/*     f      On return the functional value */\n/*     dfdra  On return the derivative of f with respect to ra */\n/*     dfdrb  On return the derivative of f with respect to rb */\n\n\n\n/*     tn13 = 2**(1/3) */\n/*     tn43 = 2**(4/3) */\n\n/* VWN interpolation parameters */\n\n/* spin stiffness */\n    a1 = -.0337737278807791058;\n    b1 = 1.13107;\n    c1 = 13.0045;\n    d1 = -.0047584;\n/* paramagnetic */\n    a2 = .0621814;\n    b2 = 3.72744;\n    c2 = 12.9352;\n    d2 = -.10498;\n/* ferromagnetic */\n/* try cadpac/nwchem value (.5*a2) */\n    a3 = .0310907;\n    b3 = 7.06042;\n    c3 = 18.0578;\n    d3 = -.325;\n\n/* t4 = (1/(4/3)*pi)**(1/3) */\n    t4 = .620350490899399531;\n\n/* t5 = 0.5/(2**(1/3)-1) */\n    t5 = 1.92366105093153617;\n\n/* t6 = 2/(3*(2**(1/3)-1)) */\n    t6 = 2.56488140124204822;\n\n/* t7 = 2.25*(2**(1/3)-1) */\n    t7 = .584822362263464735;\n\n/* Spin stiffness interpolation constants */\n\n    s1 = 7.12310891781811772;\n    s2 = a1 * .5;\n    s3 = -6.9917323507644313e-6;\n    s4 = -.0053650918488835769;\n\n/* Paramagnetic interpolation constants */\n\n    p1 = 6.1519908197590798;\n    p2 = a2 * .5;\n    p3 = 9.6902277115443745e-4;\n    p4 = .038783294878113009;\n\n/* Ferromagnetic interpolation constants */\n\n    f1 = 4.73092690956011364;\n    f2 = a3 * .5;\n\n/*      F3 = -0.244185082989490298d-02 *0.5d0 */\n/*      F4 = -0.570212323620622186d-01 *0.5d0 */\n\n/*  try nwchem values */\n\n    f3 = .00224786709554261133;\n    f4 = .0524913931697809227;\n\n/* Interpolation intervals */\n\n    inter1 = .99999999989999999;\n    inter2 = -.99999999989999999;\n\n/* open shell case */\n    alpha_rho13__ = pow(ra, &c_b7);\n    beta_rho13__ = pow(rb, &c_b7);\n    srho = *ra + *rb;\n    srho13 = pow(&srho, &c_b7);\n    iv2 = t4 / srho13;\n    iv = sqrt(iv2);\n\n/* spin-stiffness */\n    inv = 1. / (iv2 + b1 * iv + c1);\n    i1 = log(iv2 * inv);\n    i2 = log((iv - d1) * (iv - d1) * inv);\n    i3 = atan(s1 / (iv * 2. + b1));\n    ss1 = s2 * i1 + s3 * i2 + s4 * i3;\n    ss2 = a1 * (1. / iv - iv * inv * (b1 / (iv - d1) + 1.));\n\n/* paramagnetic */\n    inv = 1. / (iv2 + b2 * iv + c2);\n    i1 = log(iv2 * inv);\n    i2 = log((iv - d2) * (iv - d2) * inv);\n/* corrected b1->b2 ps Apr98 */\n    i3 = atan(p1 / (iv * 2. + b2));\n    pp1 = p2 * i1 + p3 * i2 + p4 * i3;\n    pp2 = a2 * (1. / iv - iv * inv * (b2 / (iv - d2) + 1.));\n\n/* ferromagnetic */\n    inv = 1. / (iv2 + b3 * iv + c3);\n    i1 = log(iv2 * inv);\n    i2 = log((iv - d3) * (iv - d3) * inv);\n    i3 = atan(f1 / (iv * 2. + b3));\n    ff1 = f2 * i1 + f3 * i2 + f4 * i3;\n    ff2 = a3 * (1. / iv - iv * inv * (b3 / (iv - d3) + 1.));\n\n/* polarisation function */\n\n    zeta = (*ra - *rb) / srho;\n    zeta3 = zeta * zeta * zeta;\n    zeta4 = zeta3 * zeta;\n    if (zeta > inter1) {\n  vwn1 = t5 * .51984209978974638;\n  vwn2 = t6 * 1.25992104989487316476721060727823;\n    } else if (zeta < inter2) {\n  vwn1 = t5 * .51984209978974638;\n  vwn2 = t6 * -1.25992104989487316476721060727823;\n    } else {\n  d__1 = zeta + 1.;\n  d__2 = 1. - zeta;\n  vwn1 = (pow(&d__1, &c_b14) + pow(&d__2, &c_b14) - 2.) * t5;\n  d__1 = zeta + 1.;\n  d__2 = 1. - zeta;\n  vwn2 = (pow(&d__1, &c_b7) - pow(&d__2, &c_b7)) * t6;\n    }\n    ss1 *= t7;\n    ss2 *= t7;\n    tau = ff1 - pp1 - ss1;\n    dtau = ff2 - pp2 - ss2;\n\n    v = pp1 + vwn1 * (ss1 + tau * zeta4);\n    *f = v * srho;\n\n    t1 = v - iv * .166666666666666666666666666667 * (pp2 + vwn1 * (ss2 + dtau\n      * zeta4));\n    t2 = vwn2 * (ss1 + tau * zeta4) + vwn1 * 4. * tau * zeta3;\n    *dfdra = t1 + t2 * (1. - zeta);\n    *dfdrb = t1 - t2 * (zeta + 1.);\n\n    return 0;\n} /* c_uks_vwn5__ */\n\n////***************************************************************************\n//int rks_x_lda__ (integer *ideriv, integer *npt, doublereal *rhoa1,\n//                  doublereal *sigmaaa1, doublereal *zk, doublereal *vrhoa,\n//                  doublereal *vsigmaaa, doublereal *v2rhoa2, doublereal *v2rhoasigmaaa,\n//                  doublereal *v2sigmaaa2);\n////***************************************************************************\n//\n////***************************************************************************\n//int rks_c_vwn5__ (integer *ideriv, integer *npt, doublereal *rhoa1,\n//                  doublereal *sigmaaa1, doublereal *zk, doublereal *vrhoa,\n//                  doublereal *vsigmaaa, doublereal *v2rhoa2, doublereal *v2rhoasigmaaa,\n//                  doublereal *v2sigmaaa2);\n////***************************************************************************\n\ninline /* Subroutine */ int rks_c_vwn5__(integer *ideriv, integer *npt, doublereal *\n  rhoa1, doublereal *sigmaaa1, doublereal *zk, doublereal *vrhoa,\n  doublereal *vsigmaaa, doublereal *v2rhoa2, doublereal *v2rhoasigmaaa,\n  doublereal *v2sigmaaa2)\n{\n  // WSTHORNTON\n  static doublereal c_b2 = .16666666666666666;\n  static doublereal c_b3 = .33333333333333331;\n   /* System generated locals */\n    integer i__1;\n    doublereal d__1, d__2;\n\n    /* Builtin functions */\n    double pow_dd(doublereal *, doublereal *), log(doublereal), atan(\n      doublereal);\n\n    /* Local variables */\n    static integer i__;\n    static doublereal s1, t1, t2, t4, t6, t7, t10, t20, t11, t22, t13, t23,\n      t16, t17, t25, t19, t26, t28, t29, t32, t33, t37, t38, t40, t41,\n      t43, t51, t52, t27, t34, t39, t46, t47, t48, t49, t53, t55, t56,\n      t58, t60, t63, t66, t67, t68, t69, t77, t79, t80, t81, t88, t92,\n      t94, t102, t103, t105, t107, t125, t134, t138, rho;\n\n\n/*     S.H. Vosko, L. Wilk, and M. Nusair */\n/*     Accurate spin-dependent electron liquid correlation energies for */\n/*     local spin density calculations: a critical analysis */\n/*     Can. J. Phys. 58 (1980) 1200-1211 */\n\n\n/*     CITATION: */\n\n/*     Functionals were obtained from the Density Functional Repository */\n/*     as developed and distributed by the Quantum Chemistry Group, */\n/*     CCLRC Daresbury Laboratory, Daresbury, Cheshire, WA4 4AD */\n/*     United Kingdom. Contact Huub van Dam (h.j.j.vandam@dl.ac.uk) or */\n/*     Paul Sherwood for further information. */\n\n/*     COPYRIGHT: */\n\n/*     Users may incorporate the source code into software packages and */\n/*     redistribute the source code provided the source code is not */\n/*     changed in anyway and is properly cited in any documentation or */\n/*     publication related to its use. */\n\n/*     ACKNOWLEDGEMENT: */\n\n/*     The source code was generated using Maple 8 through a modified */\n/*     version of the dfauto script published in: */\n\n/*        R. Strange, F.R. Manby, P.J. Knowles */\n/*        Automatic code generation in density functional theory */\n/*        Comp. Phys. Comm. 136 (2001) 310-318. */\n\n    /* Parameter adjustments */\n    --v2sigmaaa2;\n    --v2rhoasigmaaa;\n    --v2rhoa2;\n    --vsigmaaa;\n    --vrhoa;\n    --zk;\n    --sigmaaa1;\n    --rhoa1;\n\n    /* Function Body */\n    if (*ideriv == 0) {\n  i__1 = *npt;\n  for (i__ = 1; i__ <= i__1; ++i__) {\n/* Computing MAX */\n      d__1 = 0., d__2 = rhoa1[i__];\n      rho = max(d__1,d__2);\n      if (rho > 1e-20) {\n    t1 = 1 / rho;\n    t2 = pow_dd(&t1, &c_b3);\n    t4 = pow_dd(&t1, &c_b2);\n    t7 = 1 / (t2 * .6203504908994 + t4 * 2.935818660072219 +\n      12.9352);\n    t10 = log(t2 * .6203504908994 * t7);\n    t16 = atan(6.15199081975908 / (t4 * 1.575246635799487 +\n      3.72744));\n/* Computing 2nd power */\n    d__1 = t4 * .7876233178997433 + .10498;\n    t20 = d__1 * d__1;\n    t22 = log(t20 * t7);\n    zk[i__] = rho * (t10 * .0310907 + t16 * .03878329487811301 +\n      t22 * 9.690227711544374e-4);\n      } else {\n/* rho */\n    zk[i__] = 0.;\n      }\n/* rho */\n  }\n    } else if (*ideriv == 1) {\n  i__1 = *npt;\n  for (i__ = 1; i__ <= i__1; ++i__) {\n/* Computing MAX */\n      d__1 = 0., d__2 = rhoa1[i__];\n      rho = max(d__1,d__2);\n      if (rho > 1e-20) {\n    t1 = 1 / rho;\n    t2 = pow_dd(&t1, &c_b3);\n    t4 = pow_dd(&t1, &c_b2);\n    t6 = t2 * .6203504908994 + t4 * 2.935818660072219 + 12.9352;\n    t7 = 1 / t6;\n    t10 = log(t2 * .6203504908994 * t7);\n    t11 = t10 * .0310907;\n    t13 = t4 * 1.575246635799487 + 3.72744;\n    t16 = atan(6.15199081975908 / t13);\n    t17 = t16 * .03878329487811301;\n    t19 = t4 * .7876233178997433 + .10498;\n/* Computing 2nd power */\n    d__1 = t19;\n    t20 = d__1 * d__1;\n    t22 = log(t20 * t7);\n    t23 = t22 * 9.690227711544374e-4;\n    zk[i__] = rho * (t11 + t17 + t23);\n/* Computing 2nd power */\n    d__1 = t2;\n    t25 = d__1 * d__1;\n    t26 = 1 / t25;\n/* Computing 2nd power */\n    d__1 = rho;\n    t28 = d__1 * d__1;\n    t29 = 1 / t28;\n/* Computing 2nd power */\n    d__1 = t6;\n    t32 = d__1 * d__1;\n    t33 = 1 / t32;\n/* Computing 2nd power */\n    d__1 = t4;\n    t37 = d__1 * d__1;\n/* Computing 2nd power */\n    d__1 = t37;\n    t38 = d__1 * d__1;\n    t40 = 1 / t38 / t4;\n    t41 = t40 * t29;\n    t43 = t26 * -.2067834969664667 * t29 - t41 *\n      .4893031100120365;\n/* Computing 2nd power */\n    d__1 = t13;\n    t51 = d__1 * d__1;\n    t52 = 1 / t51;\n    vrhoa[i__] = t11 + t17 + t23 + rho * ((t26 *\n      -.2067834969664667 * t7 * t29 - t2 * .6203504908994 *\n      t33 * t43) * .05011795824473985 / t2 * t6 + t52 *\n      .0626408570946439 * t40 * t29 / (t52 * 37.8469910464\n      + 1.) + (t19 * -.2625411059665811 * t7 * t41 - t20 *\n      1. * t33 * t43) * 9.690227711544374e-4 / t20 * t6);\n      } else {\n/* rho */\n    zk[i__] = 0.;\n    vrhoa[i__] = 0.;\n      }\n/* rho */\n  }\n    } else if (*ideriv == 2) {\n  i__1 = *npt;\n  for (i__ = 1; i__ <= i__1; ++i__) {\n/* Computing MAX */\n      d__1 = 0., d__2 = rhoa1[i__];\n      rho = max(d__1,d__2);\n      if (rho > 1e-20) {\n    t1 = 1 / rho;\n    t2 = pow_dd(&t1, &c_b3);\n    t4 = pow_dd(&t1, &c_b2);\n    t6 = t2 * .6203504908994 + t4 * 2.935818660072219 + 12.9352;\n    t7 = 1 / t6;\n    t10 = log(t2 * .6203504908994 * t7);\n    t11 = t10 * .0310907;\n    t13 = t4 * 1.575246635799487 + 3.72744;\n    t16 = atan(6.15199081975908 / t13);\n    t17 = t16 * .03878329487811301;\n    t19 = t4 * .7876233178997433 + .10498;\n/* Computing 2nd power */\n    d__1 = t19;\n    t20 = d__1 * d__1;\n    t22 = log(t20 * t7);\n    t23 = t22 * 9.690227711544374e-4;\n    zk[i__] = rho * (t11 + t17 + t23);\n/* Computing 2nd power */\n    d__1 = t2;\n    t25 = d__1 * d__1;\n    t26 = 1 / t25;\n    t27 = t26 * t7;\n/* Computing 2nd power */\n    d__1 = rho;\n    t28 = d__1 * d__1;\n    t29 = 1 / t28;\n/* Computing 2nd power */\n    d__1 = t6;\n    t32 = d__1 * d__1;\n    t33 = 1 / t32;\n    t34 = t2 * t33;\n/* Computing 2nd power */\n    d__1 = t4;\n    t37 = d__1 * d__1;\n/* Computing 2nd power */\n    d__1 = t37;\n    t38 = d__1 * d__1;\n    t39 = t38 * t4;\n    t40 = 1 / t39;\n    t41 = t40 * t29;\n    t43 = t26 * -.2067834969664667 * t29 - t41 *\n      .4893031100120365;\n    t46 = t27 * -.2067834969664667 * t29 - t34 * .6203504908994 *\n      t43;\n    t47 = 1 / t2;\n    t48 = t46 * t47;\n    t49 = t48 * t6;\n/* Computing 2nd power */\n    d__1 = t13;\n    t51 = d__1 * d__1;\n    t52 = 1 / t51;\n    t53 = t52 * t40;\n    t55 = t52 * 37.8469910464 + 1.;\n    t56 = 1 / t55;\n    t58 = t53 * t29 * t56;\n    t60 = t19 * t7;\n    t63 = t20 * t33;\n    t66 = t60 * -.2625411059665811 * t41 - t63 * 1. * t43;\n    t67 = 1 / t20;\n    t68 = t66 * t67;\n    t69 = t68 * t6;\n    vrhoa[i__] = t11 + t17 + t23 + rho * (t49 *\n      .05011795824473985 + t58 * .0626408570946439 + t69 *\n      9.690227711544374e-4);\n    t77 = 1 / t25 / t1;\n/* Computing 2nd power */\n    d__1 = t28;\n    t79 = d__1 * d__1;\n    t80 = 1 / t79;\n    t81 = t77 * t7 * t80;\n    t88 = 1 / t28 / rho;\n    t92 = 1 / t32 / t6;\n/* Computing 2nd power */\n    d__1 = t43;\n    t94 = d__1 * d__1;\n    t102 = 1 / t39 / t1;\n    t103 = t102 * t80;\n    t105 = t40 * t88;\n    t107 = t77 * -.1378556646443111 * t80 + t26 *\n      .4135669939329333 * t88 - t103 * .4077525916766971 +\n      t105 * .978606220024073;\n    t125 = t80 * t56;\n/* Computing 2nd power */\n    d__1 = t51;\n    t134 = d__1 * d__1;\n/* Computing 2nd power */\n    d__1 = t55;\n    t138 = d__1 * d__1;\n    s1 = t49 * .2004718329789594 + t58 * .2505634283785756;\n    v2rhoa2[i__] = s1 + t69 * .00387609108461775 + rho * 2. * ((\n      t81 * -.1378556646443111 + t26 * .4135669939329333 *\n      t33 * t29 * t43 + t27 * .4135669939329333 * t88 + t2 *\n       1.2407009817988 * t92 * t94 - t34 * .6203504908994 *\n      t107) * .05011795824473985 * t47 * t6 + t46 *\n      .01670598608157995 / t2 / t1 * t6 * t29 + t48 *\n      .05011795824473985 * t43 + .03289159980064473 / t51 /\n      t13 * t77 * t125 + t52 * .05220071424553658 * t102 *\n      t125 - t53 * .1252817141892878 * t88 * t56 -\n      1.244848083156773 / t134 / t13 * t77 * t80 / t138 + (\n      t81 * .03446391616107778 + t19 * .5250822119331622 *\n      t33 * t41 * t43 - t60 * .2187842549721509 * t103 +\n      t60 * .5250822119331622 * t105 + t20 * 2. * t92 * t94\n      - t63 * 1. * t107) * 9.690227711544374e-4 * t67 * t6\n      + t66 * 2.544083100456872e-4 / t20 / t19 * t6 * t40 *\n      t29 + t68 * 9.690227711544374e-4 * t43);\n      } else {\n/* rho */\n    zk[i__] = 0.;\n    vrhoa[i__] = 0.;\n    v2rhoa2[i__] = 0.;\n      }\n/* rho */\n  }\n    }\n/* ideriv */\n    return 0;\n} /* rks_c_vwn5__ */\n\ninline /* Subroutine */ int rks_x_lda__(integer *ideriv, integer *npt, doublereal *\n  rhoa1, doublereal *sigmaaa1, doublereal *zk, doublereal *vrhoa,\n  doublereal *vsigmaaa, doublereal *v2rhoa2, doublereal *v2rhoasigmaaa,\n  doublereal *v2sigmaaa2)\n{\n  // WSTHORNTON\n  static doublereal c_b2 = .33333333333333331;\n\n    /* System generated locals */\n    integer i__1;\n    doublereal d__1, d__2;\n\n    /* Builtin functions */\n    double pow_dd(doublereal *, doublereal *);\n\n    /* Local variables */\n    static integer i__;\n    static doublereal t1, t5, rho;\n\n\n/*     P.A.M. Dirac */\n/*     Proceedings of the Cambridge Philosophical Society, 26 (1930) 376 */\n\n\n/*     CITATION: */\n\n/*     Functionals were obtained from the Density Functional Repository */\n/*     as developed and distributed by the Quantum Chemistry Group, */\n/*     CCLRC Daresbury Laboratory, Daresbury, Cheshire, WA4 4AD */\n/*     United Kingdom. Contact Huub van Dam (h.j.j.vandam@dl.ac.uk) or */\n/*     Paul Sherwood for further information. */\n\n/*     COPYRIGHT: */\n\n/*     Users may incorporate the source code into software packages and */\n/*     redistribute the source code provided the source code is not */\n/*     changed in anyway and is properly cited in any documentation or */\n/*     publication related to its use. */\n\n/*     ACKNOWLEDGEMENT: */\n\n/*     The source code was generated using Maple 8 through a modified */\n/*     version of the dfauto script published in: */\n\n/*        R. Strange, F.R. Manby, P.J. Knowles */\n/*        Automatic code generation in density functional theory */\n/*        Comp. Phys. Comm. 136 (2001) 310-318. */\n\n    /* Parameter adjustments */\n    --v2sigmaaa2;\n    --v2rhoasigmaaa;\n    --v2rhoa2;\n    --vsigmaaa;\n    --vrhoa;\n    --zk;\n    --sigmaaa1;\n    --rhoa1;\n\n    /* Function Body */\n    if (*ideriv == 0) {\n  i__1 = *npt;\n  for (i__ = 1; i__ <= i__1; ++i__) {\n/* Computing MAX */\n      d__1 = 0., d__2 = rhoa1[i__];\n      rho = max(d__1,d__2);\n      if (rho > 1e-20) {\n    t1 = pow_dd(&rho, &c_b2);\n    zk[i__] = t1 * -.7385587663820224 * rho;\n      } else {\n/* rho */\n    zk[i__] = 0.;\n      }\n/* rho */\n  }\n    } else if (*ideriv == 1) {\n  i__1 = *npt;\n  for (i__ = 1; i__ <= i__1; ++i__) {\n/* Computing MAX */\n      d__1 = 0., d__2 = rhoa1[i__];\n      rho = max(d__1,d__2);\n      if (rho > 1e-20) {\n    t1 = pow_dd(&rho, &c_b2);\n    zk[i__] = t1 * -.7385587663820224 * rho;\n    vrhoa[i__] = t1 * -.9847450218426965;\n      } else {\n/* rho */\n    zk[i__] = 0.;\n    vrhoa[i__] = 0.;\n      }\n/* rho */\n  }\n    } else if (*ideriv == 2) {\n  i__1 = *npt;\n  for (i__ = 1; i__ <= i__1; ++i__) {\n/* Computing MAX */\n      d__1 = 0., d__2 = rhoa1[i__];\n      rho = max(d__1,d__2);\n      if (rho > 1e-20) {\n    t1 = pow_dd(&rho, &c_b2);\n    zk[i__] = t1 * -.7385587663820224 * rho;\n    vrhoa[i__] = t1 * -.9847450218426965;\n/* Computing 2nd power */\n    d__1 = t1;\n    t5 = d__1 * d__1;\n    v2rhoa2[i__] = -.6564966812284644 / t5;\n      } else {\n/* rho */\n    zk[i__] = 0.;\n    vrhoa[i__] = 0.;\n    v2rhoa2[i__] = 0.;\n      }\n/* rho */\n  }\n    }\n/* ideriv */\n    return 0;\n} /* rks_x_lda__ */\n\nconst double THRESH_RHO = 1e-8;\nconst double THRESH_GRHO = 1e-20;\n\ninline void wst_munge_grho(int npoint, double *rho, double *grho) {\n    for (int i=0; i<npoint; i++) {\n        if (rho[i]<THRESH_RHO) rho[i] = THRESH_RHO;\n        if ((rho[i] <=THRESH_RHO) ||\n            (grho[i] < THRESH_GRHO)) grho[i] = THRESH_GRHO;\n    }\n}\n\ninline void wst_munge_rho(int npoint, double *rho) {\n    for (int i=0; i<npoint; i++) {\n        if (rho[i]<THRESH_RHO) rho[i] = THRESH_RHO;\n    }\n}\n\n//***************************************************************************\ninline void xc_rks_generic_lda(Tensor<double> rho_alpha,           ///< Alpha-spin density at each grid point\n                          Tensor<double> f,                         ///< Value of functional at each grid point\n                          Tensor<double> df_drho)                   ///< Derivative of functional w.r.t. rho_alpha\n  {\n    MADNESS_ASSERT(rho_alpha.iscontiguous());\n    MADNESS_ASSERT(f.iscontiguous());\n    MADNESS_ASSERT(df_drho.iscontiguous());\n\n    rho_alpha = rho_alpha.flat();\n    f = f.flat();\n    df_drho = df_drho.flat();\n\n      integer ideriv = 2;\n      integer npt = rho_alpha.dim(0);\n\n      Tensor<double> gamma_alpha(npt);\n      Tensor<double> tf(npt);\n      Tensor<double> tdf_drho(npt);\n      Tensor<double> tdf_dgamma(npt);\n      Tensor<double> td2f_drho2(npt);\n      Tensor<double> td2f_drhodgamma(npt);\n      Tensor<double> td2f_dgamma2(npt);\n\n      wst_munge_rho(npt, rho_alpha.ptr());\n\n      f.fill(0.0);\n      df_drho.fill(0.0);\n\n      int returnvalue = ::rks_x_lda__(&ideriv, &npt, rho_alpha.ptr(), gamma_alpha.ptr(),\n               tf.ptr(),\n               tdf_drho.ptr(), tdf_dgamma.ptr(),\n               td2f_drho2.ptr(), td2f_drhodgamma.ptr(), td2f_dgamma2.ptr());\n\n      f.gaxpy(1.0, tf, 1.0);\n      df_drho.gaxpy(1.0, tdf_drho, 1.0);\n\n      tf.fill(0.0);\n      tdf_drho.fill(0.0);\n\n      returnvalue = ::rks_c_vwn5__(&ideriv, &npt, rho_alpha.ptr(), gamma_alpha.ptr(),\n                tf.ptr(),\n                tdf_drho.ptr(), tdf_dgamma.ptr(),\n                td2f_drho2.ptr(), td2f_drhodgamma.ptr(), td2f_dgamma2.ptr());\n\n      f.gaxpy(1.0, tf, 1.0);\n      df_drho.gaxpy(1.0, tdf_drho, 1.0);\n\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <int NDIM>\n inline void dft_xc_lda_V(const Key<NDIM>& key, Tensor<double>& t)\n  {\n    Tensor<double> enefunc = copy(t);\n    Tensor<double> V = copy(t);\n    ::xc_rks_generic_lda(t, enefunc, V);\n    t(___) = V(___);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template <int NDIM>\n inline void dft_xc_lda_ene(const Key<NDIM>& key, Tensor<double>& t)\n  {\n    Tensor<double> V = copy(t);\n    Tensor<double> enefunc = copy(t);\n    ::xc_rks_generic_lda(t, enefunc, V);\n    t(___) = enefunc(___);\n  }\n  //***************************************************************************\n\n//  //***************************************************************************\n//  static double munge(double r) {\n//      if (r < 1e-12) r = 1e-12;\n//      return r;\n//  }\n//  //***************************************************************************\n//\n//  //***************************************************************************\n//  static void ldaop(const Key<3>& key, Tensor<double>& t) {\n//      UNARY_OPTIMIZED_ITERATOR(double, t, double r=munge(2.0* *_p0); double q; double dq1; double dq2;x_rks_s__(&r, &q, &dq1);c_rks_vwn5__(&r, &q, &dq2); *_p0 = dq1+dq2);\n//  }\n//  //***************************************************************************\n//\n//  //***************************************************************************\n//  static void ldaeop(const Key<3>& key, Tensor<double>& t) {\n//      UNARY_OPTIMIZED_ITERATOR(double, t, double r=munge(2.0* *_p0); double q1; double q2; double dq;x_rks_s__(&r, &q1, &dq);c_rks_vwn5__(&r, &q2, &dq); *_p0 = q1+q2);\n//  }\n//  //***************************************************************************\n\n\n\n#endif /* LDA_H_ */\n"
  },
  {
    "path": "src/apps/periodic_old/libxc.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/*\n * libxc.h\n *\n *  Created on: Nov 23, 2008\n *      Author: wsttiger\n */\n\n#ifndef LIBXC_H_\n#define LIBXC_H_\n\n#include <madness/mra/mra.h>\n#include <madness/world/MADworld.h>\n//#include \"xc.h\"\n#include \"lda.h\"\n\n//***************************************************************************\nstatic double munge(double r) {\n  if (r < 1e-15) r = 2e-15;\n  return r;\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename T>\ninline static void ldaop(const Key<3>& key, Tensor<T>& t) {\n    UNARY_OPTIMIZED_ITERATOR(T, t, double r=munge(2.0* *_p0); double q; double dq1; double dq2;x_rks_s__(&r, &q, &dq1);c_rks_vwn5__(&r, &q, &dq2); *_p0 = dq1+dq2);\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename T>\ninline static void ldaeop(const Key<3>& key, Tensor<T>& t) {\n    UNARY_OPTIMIZED_ITERATOR(T, t, double r=munge(2.0* *_p0); double q1; double q2; double dq;x_rks_s__(&r, &q1, &dq);c_rks_vwn5__(&r, &q2, &dq); *_p0 = q1+q2);\n}\n//***************************************************************************\n\n////***************************************************************************\n//template <typename T>\n//inline static void libxc_ldaop(const Key<3>& key, Tensor<T>& t) {\n//  XC(lda_type) xc_c_func;\n//  XC(lda_type) xc_x_func;\n//  xc_lda_init(&xc_c_func, XC_LDA_C_VWN,XC_UNPOLARIZED);\n//  xc_lda_x_init(&xc_x_func, XC_UNPOLARIZED, 3, 0);\n//  UNARY_OPTIMIZED_ITERATOR(T, t, double r=munge(2.0* *_p0); double q; double dq1; double dq2;\n//                           xc_lda_vxc(&xc_x_func, &r, &q, &dq1); xc_lda_vxc(&xc_c_func, &r, &q, &dq2);\n//                           *_p0 = dq1+dq2);\n//}\n////***************************************************************************\n\n////***************************************************************************\n//template <typename T>\n//inline static void libxc_ldaop_sp(const Key<3>& key, Tensor<T>& t, Tensor<T>& a, Tensor<T>& b)\n//{\n//  XC(lda_type) xc_c_func;\n//  XC(lda_type) xc_x_func;\n//  xc_lda_init(&xc_c_func, XC_LDA_C_VWN,XC_POLARIZED);\n//  xc_lda_x_init(&xc_x_func, XC_POLARIZED, 3, 0);\n//  TERNARY_OPTIMIZED_ITERATOR(T, t, T, a, T, b, double r[2]; r[0] = munge(*_p1);\n//                             r[1] = munge(*_p2); double q[2]; double dq1[2]; double dq2[2];\n//                             xc_lda_vxc(&xc_x_func, &r[0], &q[0], &dq1[0]); xc_lda_vxc(&xc_c_func, &r[0], &q[0], &dq2[0]);\n//                             *_p0 = dq1[0]+dq2[0]);\n//}\n////***************************************************************************\n\n////***************************************************************************\n//template <typename T>\n//inline static void libxc_ldaeop_sp(const Key<3>& key, Tensor<T>& t, Tensor<T>& a, Tensor<T>& b)\n//{\n//  XC(lda_type) xc_c_func;\n//  XC(lda_type) xc_x_func;\n//  xc_lda_init(&xc_c_func, XC_LDA_C_VWN,XC_POLARIZED);\n//  xc_lda_x_init(&xc_x_func, XC_POLARIZED, 3, 0);\n//  TERNARY_OPTIMIZED_ITERATOR(T, t, T, a, T, b, double r[2]; r[0] = munge(*_p1);\n//                             r[1] = munge(*_p2); double q1[2]; double q2[2]; double dq[2];\n//                             xc_lda_vxc(&xc_x_func, &r[0], &q1[0], &dq[0]); xc_lda_vxc(&xc_c_func, &r[0], &q2[0], &dq[0]);\n//                             *_p0 = q1[0]+q2[0]);\n//}\n////***************************************************************************\n\n////***************************************************************************\n//inline static void libxc_ldaeop_sp(const Key<3>& key, Tensor<double>& t) {\n//  XC(lda_type) xc_c_func;\n//  XC(lda_type) xc_x_func;\n//  xc_lda_init(&xc_c_func, XC_LDA_C_VWN,XC_UNPOLARIZED);\n//  xc_lda_x_init(&xc_x_func, XC_UNPOLARIZED, 3, 0);\n//  UNARY_OPTIMIZED_ITERATOR(double, t, double r=munge(2.0* *_p0); double q1; double q2; double dq; xc_lda_vxc(&xc_x_func, &r, &q1, &dq); xc_lda_vxc(&xc_c_func, &r, &q2, &dq); *_p0 = q1+q2);\n//}\n////***************************************************************************\n\n//const double THRESH_RHO = 1e-8;\n//const double THRESH_GRHO = 1e-20;\n//\n////***************************************************************************\n//inline void wst_munge_grho(int npoint, double *rho, double *grho) {\n//    for (int i=0; i<npoint; i++) {\n//        if (rho[i]<THRESH_RHO) rho[i] = THRESH_RHO;\n//        if ((rho[i] <=THRESH_RHO) ||\n//            (grho[i] < THRESH_GRHO)) grho[i] = THRESH_GRHO;\n//    }\n//}\n////***************************************************************************\n//\n////***************************************************************************\n//inline void wst_munge_rho(int npoint, double *rho) {\n//    for (int i=0; i<npoint; i++) {\n//        if (rho[i]<THRESH_RHO) rho[i] = THRESH_RHO;\n//    }\n//}\n////***************************************************************************\n//\n////***************************************************************************\n//inline void xc_generic_lda(Tensor<double> rho_alpha,           ///< Alpha-spin density at each grid point\n//                          Tensor<double> f,                         ///< Value of functional at each grid point\n//                          Tensor<double> df_drho,                   ///< Derivative of functional w.r.t. rho_alpha\n//                          bool spinpol)\n//    {\n//    MADNESS_ASSERT(rho_alpha.iscontiguous());\n//    MADNESS_ASSERT(f.iscontiguous());\n//    MADNESS_ASSERT(df_drho.iscontiguous());\n//\n//    rho_alpha = rho_alpha.flat();\n//    f = f.flat();\n//    df_drho = df_drho.flat();\n//\n//    XC(lda_type) xc_c_func;\n//    XC(lda_type) xc_x_func;\n//\n//    int npt = rho_alpha.dim(0);\n//\n//    Tensor<double> tf(npt);\n//    Tensor<double> tdf_drho(npt);\n//    double* rhoptr = rho_alpha.ptr();\n//    double* tfptr = tf.ptr();\n//    double* tdf_drhoptr = tdf_drho.ptr();\n//\n//    tf.fill(0.0);\n//    tdf_drho.fill(0.0);\n//    f.fill(0.0);\n//    df_drho.fill(0.0);\n//\n//    wst_munge_rho(npt, rhoptr);\n//\n//    xc_lda_init(&xc_c_func, XC_LDA_C_VWN,XC_UNPOLARIZED);\n//    for (int i = 0; i < npt; i++)\n//    {\n//      xc_lda_vxc(&xc_c_func, &rhoptr[i], &tfptr[i], &tdf_drhoptr[i]);\n//    }\n//\n//    f.gaxpy(1.0, tf, 1.0);\n//    df_drho.gaxpy(1.0, tdf_drho, 1.0);\n//\n//    tf.fill(0.0);\n//    tdf_drho.fill(0.0);\n//\n//    xc_lda_x_init(&xc_x_func, XC_UNPOLARIZED, 3, 0);\n//    for (int i = 0; i < npt; i++)\n//    {\n//      xc_lda_vxc(&xc_x_func, &rhoptr[i], &tfptr[i], &tdf_drhoptr[i]);\n//    }\n//\n//    f.gaxpy(1.0, tf, 1.0);\n//    df_drho.gaxpy(1.0, tdf_drho, 1.0);\n//}\n//  //***************************************************************************\n//\n//  //***************************************************************************\n//  template <int NDIM>\n// inline void xc_lda_V(const Key<NDIM>& key, Tensor<double>& t)\n//  {\n//    Tensor<double> enefunc = copy(t);\n//    Tensor<double> V = copy(t);\n//    ::xc_generic_lda(t, enefunc, V, false);\n//    t(___) = V(___);\n//  }\n//  //***************************************************************************\n//\n//  //***************************************************************************\n//  template <int NDIM>\n// inline void xc_lda_ene(const Key<NDIM>& key, Tensor<double>& t)\n//  {\n//    Tensor<double> V = copy(t);\n//    Tensor<double> enefunc = copy(t);\n//    ::xc_generic_lda(t, enefunc, V, false);\n//    t(___) = enefunc(___);\n//  }\n//  //***************************************************************************\n\n\n\n#endif /* LIBXC_H_ */\n"
  },
  {
    "path": "src/apps/periodic_old/matlab/cosine_potential/fd_coulomb_conv.m",
    "content": "% This script tests a finite difference scheme on the 3D coulomb\n% convolution problem.\n\nclear all;\nclose all;\n\n% Size of cube\nnsize = 20;\n% Dimensions of cube\nL = 5.0;\n% points in real space\nx = linspace(-L/2,L/2,nsize);\ny = linspace(-L/2,L/2,nsize);\nz = linspace(-L/2,L/2,nsize);\n% make rho\nfprintf(1,'making rho ...\\n\\n');\nrho = zeros(nsize,nsize,nsize);\nfor ri = 1:nsize\n    for rj = 1:nsize\n        for rk = 1:nsize\n            rho(ri,rj,rk) = exp(-5*(x(ri)*x(ri) + y(rj)*y(rj) + z(rk)*z(rk)));\n        end\n    end\nend\n% compute indicies\n[I,J,K] = ind2sub([nsize nsize nsize], [1:nsize*nsize*nsize]);\n\n% return value\nrv = zeros(nsize,nsize,nsize);\n\n% main loop\n% if you think of this convolution as a matrix-vector multiply,\n% mi and mj index into the matrix which has the size of [npoints, npoints]\n% where npoints is the total number of points in the cube\nfprintf(1,'running main loop ...\\n\\n');\nfor mi = 1:nsize*nsize*nsize\n    fprintf(1,'mi = %d\\n', mi);\n    for mj = 1:nsize*nsize*nsize\n        % compute indices to express mi and mj into a 3-D index\n        % so we can associate ki and kj with variables x and x'\n        ki = [I(mi) J(mi) K(mi)]; \n        kj = [I(mj) J(mj) K(mj)]; \n        % compute distance\n        distx = x(ki(1)) - x(kj(1));\n        disty = x(ki(2)) - x(kj(2));\n        distz = x(ki(3)) - x(kj(3));\n        dist = sqrt(distx^2 + disty^2 + distz^2);\n        temp = rho(kj(1), kj(2), kj(3))/dist;\n        rv(ki) = rv(ki) + temp;\n    end\nend\n"
  },
  {
    "path": "src/apps/periodic_old/matlab/cosine_potential/test_coulomb.m",
    "content": "clear all;\nclose all;\n\n%% lattice constant\nnpts = 2800;\nL = 5.0;\nx = linspace(-L/2, L/2, npts);\ndelx = x(2) - x(1);\n%% 1-body potential\nalpha = 12.5;\nn = 1;\nv = -alpha * (cos(2 * n * pi * x/ L) + 1);\nV = diag(v);\n%% kinetic energy\nT = 2 * diag(ones(npts, 1)) - diag(ones(npts-1,1), 1) - diag(ones(npts-1,1), -1);\nT(1,npts) = -1;\nT(npts,1) = -1;\nT = T ./ (delx)^2;\n%% hamiltonian\nH = T + V;"
  },
  {
    "path": "src/apps/periodic_old/matlab/cosine_potential/test_coulomb1D.m",
    "content": "clear all;\nclose all;\n\n%% lattice constant\nnpts = 100;\nL = 5.0;\nx = linspace(-L/2, L/2, npts);\ndelx = x(2) - x(1);\n%% 1-body potential\nalpha = 12.5;\nn = 1;\nv = -alpha * (cos(2 * n * pi * x/ L) + 1);\nV = diag(v);\n%% kinetic energy\nT = 2 * diag(ones(npts, 1)) - diag(ones(npts-1,1), 1) - diag(ones(npts-1,1), -1);\nT(1,npts) = -1;\nT(npts,1) = -1;\nT = T ./ (delx)^2;\n%% hamiltonian\nH = T + V;"
  },
  {
    "path": "src/apps/periodic_old/matlab/cosine_potential/test_coulomb1D_pw.m",
    "content": "clear all;\nclose all;\n\nalpha = 4.5;\nnpts = 30;\nL = 30.0;\n\nbeta = L*L/(4*pi*pi);\ngamma = 2*beta;\n\nH = diag([-(npts-1)/2:(npts-1)/2].^2 - alpha*gamma*ones(1,npts));\nH = H - alpha*beta*diag(ones(npts-1,1),-1) - alpha*beta*diag(ones(npts-1,1),1);\n \nevH = eig(H)/gamma;\n"
  },
  {
    "path": "src/apps/periodic_old/matlab/cosine_potential/test_coulomb1D_sincos.m",
    "content": "clear all;\nclose all;\n\nalpha = 12.5;\n% npts has to be odd\nnpts = 51;\nL = 5.0;\n\nbeta = L*L/(4*pi*pi);\ngamma = 2*beta;\n% range needs to go from -(npts-1)/2 ... (npts-1)/2\nH = diag([-(npts-1)/2:(npts-1)/2].^2 - alpha*gamma*ones(1,npts));\nH = H - alpha*beta*diag(ones(npts-1,1),-1) - alpha*beta*diag(ones(npts-1,1),1);\n \nevH = eig(H)/gamma;\n"
  },
  {
    "path": "src/apps/periodic_old/matlab/cosine_potential/test_coulomb3D.m",
    "content": "clear all;\nclose all;\n\n%% lattice constant\nnpts = 10;\nL = 5.0;\nx = linspace(-L/2, L/2, npts+1);\ny = linspace(-L/2, L/2, npts+1);\nz = linspace(-L/2, L/2, npts+1);\nx = x(1:npts);\ny = y(1:npts);\nz = z(1:npts);\ndelx = x(2) - x(1);\n%% 1-body potential\nalpha = 12.5;\nv = zeros(npts,npts,npts);\nfor i = 1:npts\n    for j = 1:npts\n        for k = 1:npts\n            v(i,j,k) = -alpha*(cos(2*pi*x(i)/ L)*cos(2*pi*y(j)/ L)*cos(2*pi*z(k)/L) + 1);\n        end\n    end\nend\nV = diag(v(:));\n%% kinetic energy\nT = -0.5 * buildlaplacian3d(npts, delx);\n%% hamiltonian\nH = T + V;"
  },
  {
    "path": "src/apps/periodic_old/matlab/cosine_potential/test_coulomb3D_pw.m",
    "content": "clear all;\nclose all;\n\nalpha = 12.5;\n\nG = zeros(9,3);\nG(1,:) = [0 0 0];\nG(2,:) = [1 1 1];\nG(3,:) = [1 1 -1];\nG(4,:) = [1 -1 1];\nG(5,:) = [-1 1 1];\nG(6,:) = [1 -1 -1];\nG(7,:) = [-1 -1 1];\nG(8,:) = [-1 1 -1];\nG(9,:) = [-1 -1 -1];\n\nmagicvecs = zeros(8,3);\nmagicvecs(1,:) = [1 1 1];\nmagicvecs(2,:) = [1 1 -1];\nmagicvecs(3,:) = [1 -1 1];\nmagicvecs(4,:) = [-1 1 1];\nmagicvecs(5,:) = [1 -1 -1];\nmagicvecs(6,:) = [-1 -1 1];\nmagicvecs(7,:) = [-1 1 -1];\nmagicvecs(8,:) = [-1 -1 -1];\n\nV = zeros(8,8);\n\nfor gi = 1:8\n    for gj = 1:gi\n        tmpv = G(gi,:) - G(gj,:);\n        for mi = 1:8\n            if (tmpv == magicvecs(mi,:))\n                fprintf(1, '(%d,%d)\\t[%d %d %d]\\n', gi, gj, tmpv);\n                V(gi,gj) = -0.125 * alpha^3;\n                V(gj,gi) = V(gi,gj);\n            end\n        end\n    end\nend\n"
  },
  {
    "path": "src/apps/periodic_old/matlab/cosine_potential/test_coulomb3D_sep.m",
    "content": "clear all;\nclose all;\n\n% lattice constant\nnpts = 15;\nL = 30.0;\nalpha = 13.5;\n\n% build one component of the Hamiltonian\nHi = buildHamiltonian1D(L, npts,alpha);\nev1d = eig(Hi);\n\n% build 3D Hamiltonian\nx = linspace(-L/2, L/2, npts+1);\ny = linspace(-L/2, L/2, npts+1);\nz = linspace(-L/2, L/2, npts+1);\nx = x(1:npts);\ny = y(1:npts);\nz = z(1:npts);\ndelx = x(2) - x(1);\n% 1-body potential\nv = zeros(npts,npts,npts);\nfor i = 1:npts\n    for j = 1:npts\n        for k = 1:npts\n            v(i,j,k) = -alpha*(cos(2*pi*x(i)/ L) + cos(2*pi*y(j)/ L) + cos(2*pi*z(k)/L) + 3);\n        end\n    end\nend\nV = diag(v(:));\n% kinetic energy\nT = -0.5 * buildlaplacian3d(npts, delx);\n% hamiltonian\nH = T + V;\nev3d = eig(H);\n\nerror = abs(ev3d(1) - 3*ev1d(1));\nfprintf(1,'ev1d(1) = %.8f  ev3d = %.8f  error = %.8f\\n\\n', ev1d(1), ev3d(1), error);"
  },
  {
    "path": "src/apps/periodic_old/mentity.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id: test.cc 257 2007-06-25 19:09:38Z HartmanBaker $\n*/\n\n\n/// \\file mentity.cc\n/// \\brief Simple management of molecular information and potential\n\n#include <madness/mra/mra.h>\n#include <madness/constants.h>\n#include \"mentity.h\"\n#include <madness/misc/misc.h>\n\nusing namespace madness;\n\nstatic const double PI = 3.1415926535897932384;\n\nstatic inline double distance(double x1, double y1, double z1, double x2, double y2, double z2) {\n    double xx = x1-x2;\n    double yy = y1-y2;\n    double zz = z1-z2;\n    return sqrt(xx*xx + yy*yy + zz*zz);\n}\n\nstatic inline double distance_sq(double x1, double y1, double z1, double x2, double y2, double z2) {\n    double xx = x1-x2;\n    double yy = y1-y2;\n    double zz = z1-z2;\n    return xx*xx + yy*yy + zz*zz;\n}\n\nstatic const unsigned int NUMBER_OF_ATOMS_IN_TABLE = 110;\nstatic const AtomicData atomic_data[NUMBER_OF_ATOMS_IN_TABLE] = {\n    {\"Bq\",  \"bq\",   0  ,  0   ,  0.0               , 0.0           ,0.0             , 0.0    },\n    {\"H\",   \"h\",    1  ,  1   ,  2.6569547399e-05  , 1.32234e-05   ,2.1248239171e+09, 0.30   },\n    {\"He\",  \"he\",   2  ,  4   ,  3.5849373401e-05  , 2.63172e-05   ,1.1671538870e+09, 1.22   },\n    {\"Li\",  \"li\",   3  ,  7   ,  4.0992133976e-05  , 2.34051e-05   ,8.9266848806e+08, 1.23   },\n    {\"Be\",  \"be\",   4  ,  9   ,  4.3632829651e-05  , 3.03356e-05   ,7.8788802914e+08, 0.89   },\n    {\"B\",   \"b\",    5  ,  11  ,  4.5906118608e-05  , 3.54894e-05   ,7.1178709563e+08, 0.88   },\n    {\"C\",   \"c\",    6  ,  12  ,  4.6940079496e-05  , 3.76762e-05   ,6.8077502929e+08, 0.77   },\n    {\"N\",   \"n\",    7  ,  14  ,  4.8847128967e-05  , 4.15204e-05   ,6.2865615725e+08, 0.70   },\n    {\"O\",   \"o\",    8  ,  16  ,  5.0580178957e-05  , 4.48457e-05   ,5.8631436655e+08, 0.66   },\n    {\"F\",   \"f\",    9  ,  19  ,  5.2927138943e-05  , 4.91529e-05   ,5.3546911034e+08, 0.58   },\n    {\"Ne\",  \"ne\",  10  ,  20  ,  5.3654104231e-05  , 5.04494e-05   ,5.2105715255e+08, 1.60   },\n    {\"Na\",  \"na\",  11  ,  23  ,  5.5699159416e-05  , 5.40173e-05   ,4.8349721509e+08, 1.66   },\n    {\"Mg\",  \"mg\",  12  ,  24  ,  5.6341070732e-05  , 5.51157e-05   ,4.7254270882e+08, 1.36   },\n    {\"Al\",  \"al\",  13  ,  27  ,  5.8165765928e-05  , 5.81891e-05   ,4.4335984491e+08, 1.25   },\n    {\"Si\",  \"si\",  14  ,  28  ,  5.8743802504e-05  , 5.91490e-05   ,4.3467748823e+08, 1.17   },\n    {\"P\",   \"p\",   15  ,  31  ,  6.0399312923e-05  , 6.18655e-05   ,4.1117553148e+08, 1.10   },\n    {\"S\",   \"s\",   16  ,  32  ,  6.0927308666e-05  , 6.27224e-05   ,4.0407992047e+08, 1.04   },\n    {\"Cl\",  \"cl\",  17  ,  35  ,  6.2448101115e-05  , 6.51676e-05   ,3.8463852873e+08, 0.99   },\n    {\"Ar\",  \"ar\",  18  ,  40  ,  6.4800211825e-05  , 6.88887e-05   ,3.5722217300e+08, 1.91   },\n    {\"K\",   \"k\",   19  ,  39  ,  6.4346167051e-05  , 6.81757e-05   ,3.6228128110e+08, 2.03   },\n    {\"Ca\",  \"ca\",  20  ,  40  ,  6.4800211825e-05  , 6.88887e-05   ,3.5722217300e+08, 1.74   },\n    {\"Sc\",  \"sc\",  21  ,  45  ,  6.6963627201e-05  , 7.22548e-05   ,3.3451324570e+08, 1.44   },\n    {\"Ti\",  \"ti\",  22  ,  48  ,  6.8185577480e-05  , 7.41350e-05   ,3.2263108827e+08, 1.32   },\n    {\"V\",   \"v\",   23  ,  51  ,  6.9357616830e-05  , 7.59254e-05   ,3.1181925878e+08, 1.22   },\n    {\"Cr\",  \"cr\",  24  ,  52  ,  6.9738057221e-05  , 7.65040e-05   ,3.0842641793e+08, 1.19   },\n    {\"Mn\",  \"mn\",  25  ,  55  ,  7.0850896638e-05  , 7.81897e-05   ,2.9881373610e+08, 1.17   },\n    {\"Fe\",  \"fe\",  26  ,  56  ,  7.1212829817e-05  , 7.87358e-05   ,2.9578406371e+08, 1.165  },\n    {\"Co\",  \"co\",  27  ,  59  ,  7.2273420879e-05  , 8.03303e-05   ,2.8716667270e+08, 1.16   },\n    {\"Ni\",  \"ni\",  28  ,  58  ,  7.1923970253e-05  , 7.98058e-05   ,2.8996391416e+08, 1.15   },\n    {\"Cu\",  \"cu\",  29  ,  63  ,  7.3633018675e-05  , 8.23625e-05   ,2.7665979354e+08, 1.17   },\n    {\"Zn\",  \"zn\",  30  ,  64  ,  7.3963875193e-05  , 8.28551e-05   ,2.7419021043e+08, 1.25   },\n    {\"Ga\",  \"ga\",  31  ,  69  ,  7.5568424848e-05  , 8.52341e-05   ,2.6267002737e+08, 1.25   },\n    {\"Ge\",  \"ge\",  32  ,  74  ,  7.7097216161e-05  , 8.74862e-05   ,2.5235613399e+08, 1.22   },\n    {\"As\",  \"as\",  33  ,  75  ,  7.7394645153e-05  , 8.79228e-05   ,2.5042024280e+08, 1.21   },\n    {\"Se\",  \"se\",  34  ,  80  ,  7.8843427408e-05  , 9.00427e-05   ,2.4130163719e+08, 1.17   },\n    {\"Br\",  \"br\",  35  ,  79  ,  7.8558604038e-05  , 8.96268e-05   ,2.4305454351e+08, 1.14   },\n    {\"Kr\",  \"kr\",  36  ,  84  ,  7.9959560033e-05  , 9.16684e-05   ,2.3461213272e+08, 1.98   },\n    {\"Rb\",  \"rb\",  37  ,  85  ,  8.0233033713e-05  , 9.20658e-05   ,2.3301551109e+08, 2.22   },\n    {\"Sr\",  \"sr\",  38  ,  88  ,  8.1040799081e-05  , 9.32375e-05   ,2.2839354730e+08, 1.92   },\n    {\"Y\",   \"y\",   39  ,  89  ,  8.1305968993e-05  , 9.36215e-05   ,2.2690621893e+08, 1.62   },\n    {\"Zr\",  \"zr\",  40  ,  90  ,  8.1569159980e-05  , 9.40022e-05   ,2.2544431039e+08, 1.45   },\n    {\"Nb\",  \"nb\",  41  ,  93  ,  8.2347219223e-05  , 9.51261e-05   ,2.2120420724e+08, 1.34   },\n    {\"Mo\",  \"mo\",  42  ,  98  ,  8.3607614434e-05  , 9.69412e-05   ,2.1458511597e+08, 1.29   },\n    {\"Tc\",  \"tc\",  43  ,  98  ,  8.3607614434e-05  , 9.69412e-05   ,2.1458511597e+08, 1.27   },\n    {\"Ru\",  \"ru\",  44  , 102  ,  8.4585397905e-05  , 9.83448e-05   ,2.0965270287e+08, 1.24   },\n    {\"Rh\",  \"rh\",  45  , 103  ,  8.4825835954e-05  , 9.86893e-05   ,2.0846586999e+08, 1.25   },\n    {\"Pd\",  \"pd\",  46  , 106  ,  8.5537941156e-05  , 9.97084e-05   ,2.0500935221e+08, 1.28   },\n    {\"Ag\",  \"ag\",  47  , 107  ,  8.5772320442e-05  , 1.00043e-04   ,2.0389047621e+08, 1.34   },\n    {\"Cd\",  \"cd\",  48  , 114  ,  8.7373430179e-05  , 1.02327e-04   ,1.9648639618e+08, 1.41   },\n    {\"In\",  \"in\",  49  , 115  ,  8.7596760865e-05  , 1.02644e-04   ,1.9548577691e+08, 1.50   },\n    {\"Sn\",  \"sn\",  50  , 120  ,  8.8694413774e-05  , 1.04204e-04   ,1.9067718154e+08, 1.40   },\n    {\"Sb\",  \"sb\",  51  , 121  ,  8.8910267995e-05  , 1.04510e-04   ,1.8975246242e+08, 1.41   },\n    {\"Te\",  \"te\",  52  , 130  ,  9.0801452955e-05  , 1.07185e-04   ,1.8193056289e+08, 1.37   },\n    {\"I\",   \"i\",   53  , 127  ,  9.0181040290e-05  , 1.06309e-04   ,1.8444240538e+08, 1.33   },\n    {\"Xe\",  \"xe\",  54  , 132  ,  9.1209776425e-05  , 1.07762e-04   ,1.8030529331e+08, 2.09   },\n    {\"Cs\",  \"cs\",  55  , 133  ,  9.1412392742e-05  , 1.08047e-04   ,1.7950688281e+08, 2.35   },\n    {\"Ba\",  \"ba\",  56  , 138  ,  9.2410525664e-05  , 1.09453e-04   ,1.7565009043e+08, 1.98   },\n    {\"La\",  \"la\",  57  , 139  ,  9.2607247118e-05  , 1.09730e-04   ,1.7490463170e+08, 1.69   },\n    {\"Ce\",  \"ce\",  58  , 140  ,  9.2803027311e-05  , 1.10006e-04   ,1.7416744147e+08, 1.65   },\n    {\"Pr\",  \"pr\",  59  , 141  ,  9.2997877424e-05  , 1.10279e-04   ,1.7343837120e+08, 1.65   },\n    {\"Nd\",  \"nd\",  60  , 144  ,  9.3576955934e-05  , 1.11093e-04   ,1.7129844956e+08, 1.64   },\n    {\"Pm\",  \"pm\",  61  , 145  ,  9.3768193375e-05  , 1.11361e-04   ,1.7060044589e+08, 1.65   },\n    {\"Sm\",  \"sm\",  62  , 152  ,  9.5082839751e-05  , 1.13204e-04   ,1.6591550422e+08, 1.66   },\n    {\"Eu\",  \"eu\",  63  , 153  ,  9.5267329183e-05  , 1.13462e-04   ,1.6527352089e+08, 1.65   },\n    {\"Gd\",  \"gd\",  64  , 158  ,  9.6177915369e-05  , 1.14735e-04   ,1.6215880671e+08, 1.61   },\n    {\"Tb\",  \"tb\",  65  , 159  ,  9.6357719009e-05  , 1.14986e-04   ,1.6155419421e+08, 1.59   },\n    {\"Dy\",  \"dy\",  66  , 162  ,  9.6892647152e-05  , 1.15733e-04   ,1.5977529080e+08, 1.59   },\n    {\"Ho\",  \"ho\",  67  , 162  ,  9.6892647152e-05  , 1.15733e-04   ,1.5977529080e+08, 1.58   },\n    {\"Er\",  \"er\",  68  , 168  ,  9.7943009317e-05  , 1.17198e-04   ,1.5636673634e+08, 1.57   },\n    {\"Tm\",  \"tm\",  69  , 169  ,  9.8115626740e-05  , 1.17438e-04   ,1.5581702004e+08, 1.56   },\n    {\"Yb\",  \"yb\",  70  , 174  ,  9.8968651305e-05  , 1.18625e-04   ,1.5314257850e+08, 1.56   },\n    {\"Lu\",  \"lu\",  71  , 175  ,  9.9137288835e-05  , 1.18859e-04   ,1.5262201512e+08, 1.56   },\n    {\"Hf\",  \"hf\",  72  , 180  ,  9.9970978172e-05  , 1.20018e-04   ,1.5008710340e+08, 1.44   },\n    {\"Ta\",  \"ta\",  73  , 181  ,  1.0013585755e-04  , 1.20246e-04   ,1.4959325643e+08, 1.34   },\n    {\"W\",   \"w\",   74  , 184  ,  1.0062688070e-04  , 1.20928e-04   ,1.4813689532e+08, 1.30   },\n    {\"Re\",  \"re\",  75  , 187  ,  1.0111259523e-04  , 1.21601e-04   ,1.4671710337e+08, 1.28   },\n    {\"Os\",  \"os\",  76  , 192  ,  1.0191070333e-04  , 1.22706e-04   ,1.4442808782e+08, 1.26   },\n    {\"Ir\",  \"ir\",  77  , 193  ,  1.0206865731e-04  , 1.22925e-04   ,1.4398142103e+08, 1.26   },\n    {\"Pt\",  \"pt\",  78  , 195  ,  1.0238293593e-04  , 1.23360e-04   ,1.4309883584e+08, 1.29   },\n    {\"Au\",  \"au\",  79  , 197  ,  1.0269507292e-04  , 1.23792e-04   ,1.4223027307e+08, 1.34   },\n    {\"Hg\",  \"hg\",  80  , 202  ,  1.0346628039e-04  , 1.24857e-04   ,1.4011788914e+08, 1.44   },\n    {\"Tl\",  \"tl\",  81  , 205  ,  1.0392291259e-04  , 1.25488e-04   ,1.3888925203e+08, 1.55   },\n    {\"Pb\",  \"pb\",  82  , 208  ,  1.0437511130e-04  , 1.26112e-04   ,1.3768840081e+08, 1.54   },\n    {\"Bi\",  \"bi\",  83  , 209  ,  1.0452487744e-04  , 1.26318e-04   ,1.3729411599e+08, 1.52   },\n    {\"Po\",  \"po\",  84  , 209  ,  1.0452487744e-04  , 1.26318e-04   ,1.3729411599e+08, 1.53   },\n    {\"At\",  \"at\",  85  , 210  ,  1.0467416660e-04  , 1.26524e-04   ,1.3690277000e+08, 1.50   },\n    {\"Rn\",  \"rn\",  86  , 222  ,  1.0642976299e-04  , 1.28942e-04   ,1.3242350205e+08, 2.20   },\n    {\"Fr\",  \"fr\",  87  , 223  ,  1.0657317899e-04  , 1.29139e-04   ,1.3206733609e+08, 3.24   },\n    {\"Ra\",  \"ra\",  88  , 226  ,  1.0700087100e-04  , 1.29727e-04   ,1.3101367628e+08, 2.68   },\n    {\"Ac\",  \"ac\",  89  , 227  ,  1.0714259349e-04  , 1.29922e-04   ,1.3066730974e+08, 2.25   },\n    {\"Th\",  \"th\",  90  , 232  ,  1.0784503195e-04  , 1.30887e-04   ,1.2897067480e+08, 2.16   },\n    {\"Pa\",  \"pa\",  91  , 231  ,  1.0770535752e-04  , 1.30695e-04   ,1.2930539512e+08, 1.93   },\n    {\"U\",   \"u\",   92  , 238  ,  1.0867476102e-04  , 1.32026e-04   ,1.2700881714e+08, 3.00   },\n    {\"Np\",  \"np\",  93  , 237  ,  1.0853744903e-04  , 1.31838e-04   ,1.2733038109e+08, 1.57   },\n    {\"Pu\",  \"pu\",  94  , 244  ,  1.0949065967e-04  , 1.33145e-04   ,1.2512299012e+08, 1.81   },\n    {\"Am\",  \"am\",  95  , 243  ,  1.0935561268e-04  , 1.32960e-04   ,1.2543221826e+08, 2.21   },\n    {\"Cm\",  \"cm\",  96  , 247  ,  1.0989359973e-04  , 1.33697e-04   ,1.2420711085e+08, 1.43   },\n    {\"Bk\",  \"bk\",  97  , 247  ,  1.0989359973e-04  , 1.33697e-04   ,1.2420711085e+08, 1.42   },\n    {\"Cf\",  \"cf\",  98  , 251  ,  1.1042580946e-04  , 1.34426e-04   ,1.2301273547e+08, 1.40   },\n    {\"Es\",  \"es\",  99  , 252  ,  1.1055797721e-04  , 1.34607e-04   ,1.2271879740e+08, 1.39   },\n    {\"Fm\",  \"fm\",  100 , 257  ,  1.1121362374e-04  , 1.35504e-04   ,1.2127611477e+08, 1.38   },\n    {\"Md\",  \"md\",  101 , 258  ,  1.1134373034e-04  , 1.35682e-04   ,1.2099285491e+08, 1.37   },\n    {\"No\",  \"no\",  102 , 259  ,  1.1147350119e-04  , 1.35859e-04   ,1.2071131346e+08, 1.36   },\n    {\"Lr\",  \"lr\",  103 , 262  ,  1.1186082063e-04  , 1.36389e-04   ,1.1987683191e+08, 1.34   },\n    {\"Db\",  \"db\",  104 , 261  ,  1.1173204420e-04  , 1.36213e-04   ,1.2015331850e+08, 1.40   },\n    {\"Jl\",  \"jl\",  105 , 262  ,  1.1186082063e-04  , 1.36389e-04   ,1.1987683191e+08, 1.40   },\n    {\"Rf\",  \"rf\",  106 , 263  ,  1.1198926979e-04  , 1.36565e-04   ,1.1960199758e+08, 1.40   },\n    {\"Bh\",  \"bh\",  107 , 262  ,  1.1186082063e-04  , 1.36389e-04   ,1.1987683191e+08, 1.40   },\n    {\"Hn\",  \"hn\",  108 , 265  ,  1.1224519460e-04  , 1.36914e-04   ,1.1905722195e+08, 1.40   },\n    {\"Mt\",  \"mt\",  109 , 266  ,  1.1237267433e-04  , 1.37088e-04   ,1.1878724932e+08, 1.40   } };\n\nconst AtomicData& get_atomic_data(unsigned int atomic_number) {\n    if (atomic_number >= NUMBER_OF_ATOMS_IN_TABLE) throw \"I am not an alchemist\";\n    return atomic_data[atomic_number];\n}\n\n\nunsigned int symbol_to_atomic_number(const std::string& symbol) {\n    std::string tlow = madness::lowercase(symbol);\n    for (unsigned int i=0; i<NUMBER_OF_ATOMS_IN_TABLE; i++) {\n        if (tlow.compare(atomic_data[i].symbol_lowercase) == 0) return i;\n    }\n    std::string msg = \"unknown atom -- \" + symbol;\n    throw msg;\n}\n\n\n/// Returns radius for smoothing nuclear potential with energy precision eprec\nstatic double smoothing_parameter(double Z, double eprec) {\n    // The min is since asymptotic form not so good at low acc.\n    // The 2 is from two electrons in 1s closed shell.\n    if (Z == 0.0) return 1.0;\n    double Z5 = Z*Z*Z*Z*Z;\n    double c = pow(std::min(1e-3,eprec)/2.0/0.00435/Z5,1.0/3.0);\n    return c;\n}\n\n\n/// Regularized 1/r potential.\n\n/// Invoke as \\c u(r/c)/c where \\c c is the radius of the\n/// smoothed volume.\nstatic double smoothed_potential(double r) {\n    const double THREE_SQRTPI = 5.31736155271654808184;\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-8){\n        pot = erf(r)/r + (exp(-r2) + 16.0*exp(-4.0*r2))/(THREE_SQRTPI);\n    } else{\n        pot = (2.0 + 17.0/3.0)/sqrt(PI);\n    }\n\n    return pot;\n}\n\n/// Derivative of the regularized 1/r potential\n\n/// dV/dx = (x/r) * du(r/c)/(c*c)\nstatic double dsmoothed_potential(double r)\n{\n    const double THREE_SQRTPI = 5.31736155271654808184;\n    const double SQRTPI = 1.77245385090551602728;\n    double value;\n    double r2 = r*r;\n\n    if (r > 6.5)\n        value = -1.0/r2;\n    else {\n        if (r > 1e-8){\n            value =  (-2.0*r*exp(-r2)-128.0*r*exp(-4.0*r2))/(THREE_SQRTPI);\n            value += 2.0*exp(-r2)/(r*SQRTPI) - erf(r)/r2;\n        }else if (r > 0.1) {\n            value =  (-2.0*exp(-r2)-128.0*exp(-4.0*r2))/(THREE_SQRTPI);\n            value += (-4./3.+(4./5.+(-2./7.+(2./27.-1./66.*r2)*r2)*r2)*r2)/SQRTPI;\n            value *= r;\n        }else if (r != 0.0){\n            value =  (-2.0*exp(-r2)-128.0*exp(-4.0*r2))/(THREE_SQRTPI);\n            value += (-4./3.+(4./5.+(-2./7.+(2./27.-1./66.*r2)*r2)*r2)*r2)/SQRTPI;\n            value *= r;\n        }else\n            value = 0.0;\n    }\n    return value;\n}\n\n/// Charge density corresponding to smoothed 1/r potential\n\n/// Invoke as \\c rho(r/c)/c^3 where \\c c is the radius of the\n/// smoothed volume.\nstatic double smoothed_density(double r)\n{\n    const double RPITO1P5 = 0.1795871221251665617; // 1.0/Pi^1.5\n    double rsquared = r*r;\n    double tmp1 = exp(-rsquared);\n    double tmp2 = tmp1*tmp1;\n    double tmp4 = tmp2*tmp2;\n    return ((-3.0/2.0+(1.0/3.0)*rsquared)*tmp1+(-32.0+(256.0/3.0)*rsquared)*tmp4)*RPITO1P5;\n}\n\nstd::ostream& operator<<(std::ostream& s, const Atom& atom) {\n    s << \"Atom([\" << atom.x << \", \" << atom.y << \", \" << atom.z << \"], \" << atom.q << \",\" << atom.atomic_number << \")\";\n    return s;\n}\n\n/// Read coordinates from a file\n\n/// Scans the file for the first geometry block in the format\n/// \\code\n///    geometry\n///       tag x y z\n///       ...\n///    end\n/// \\endcode\n/// The charge \\c q is inferred from the tag which is\n/// assumed to be the standard symbol for an element.\n/// Same as the simplest NWChem format.  For ghost\n/// atoms (\\c bq ) the  charge is read as a fifth field\n/// on the line.\n///\n/// This code is just for the examples ... don't trust it!\nMolecularEntity::MolecularEntity(const std::string& filename, bool fractional = false) {\n    read_file(filename, fractional);\n}\n\nvoid MolecularEntity::read_file(const std::string& filename, bool fractional = false) {\n    atoms.clear(); rcut.clear(); rsqasymptotic.clear();\n    std::ifstream f(filename.c_str());\n    madness::position_stream(f, \"geometry\");\n    double scale = 1.0;\n\n    std::string s;\n    while (std::getline(f,s))\n    {\n        std::istringstream ss(s);\n        std::string tag;\n        ss >> tag;\n        if (tag == \"end\")\n        {\n            goto finished;\n        }\n        else if (tag == \"units\")\n        {\n            if (natom()) throw \"MolecularEntity: read_file: presently units must be the first line of the geometry block\";\n            ss >> tag;\n            if (tag == \"a.u.\" || tag == \"au\" || tag == \"atomic\")\n            {\n                std::cout << \"\\nAtomic units being used \" << scale << \"\\n\\n\";\n                scale = 1.0;\n            }\n            else if (tag == \"angstrom\" || tag == \"angs\")\n            {\n                scale = 1e-10 / madness::constants::atomic_unit_of_length;\n                std::cout << \"\\nAngstrom being used \" << scale << \"\\n\\n\";\n            }\n            else\n            {\n                throw \"MolecularEntity: read_file: unknown units requested\";\n            }\n        }\n        else\n        {\n            Tensor<double> factor = FunctionDefaults<3>::get_cell_width();\n            double xx, yy, zz;\n            ss >> xx >> yy >> zz;\n            if (fractional)\n            {\n              // If using fractional coordinates, the constrain x, y, and z to be between 0.0 and 1.0\n              MADNESS_ASSERT(xx <= 1.0);\n              MADNESS_ASSERT(yy <= 1.0);\n              MADNESS_ASSERT(zz <= 1.0);\n              MADNESS_ASSERT(xx >= 0.0);\n              MADNESS_ASSERT(yy >= 0.0);\n              MADNESS_ASSERT(zz >= 0.0);\n              xx *= factor[0]; yy *= factor[1]; zz *= factor[2];\n            }\n            else\n            {\n              xx *= scale; yy *= scale; zz *= scale;\n            }\n            int atn = symbol_to_atomic_number(tag); // Charge of ghost atom\n            double qq = atn;\n            if (atn == 0) ss >> qq;\n            add_atom(xx,yy,zz,qq,atn);\n        }\n    }\n    throw \"No end to the geometry in the input file\";\n finished:\n    ;\n}\n\nvoid MolecularEntity::add_atom(double x, double y, double z, int atomic_number, double q) {\n    atoms.push_back(Atom(x,y,z,atomic_number,q));\n    double c = smoothing_parameter(q, 1e-5); // This is error per atom\n    rsqasymptotic.push_back(36.0*c*c);\n    rcut.push_back(1.0/c);\n}\n\nvoid MolecularEntity::set_atom_coords(unsigned int i, double x, double y, double z) {\n    if (i>=atoms.size()) throw \"trying to set coords of invalid atom\";\n    atoms[i].x = x;\n    atoms[i].y = y;\n    atoms[i].z = z;\n}\n\nconst Atom& MolecularEntity::get_atom(unsigned int i) const {\n    if (i>=atoms.size()) throw \"trying to get coords of invalid atom\";\n    return atoms[i];\n}\n\nvoid MolecularEntity::print() const {\n    std::cout.flush();\n    printf(\" geometry\\n\");\n    for (int i=0; i<natom(); i++) {\n        printf(\"   %-2s  %20.8f %20.8f %20.8f\", atomic_data[atoms[i].atomic_number].symbol,\n               atoms[i].x, atoms[i].y, atoms[i].z);\n        if (atoms[i].atomic_number == 0) printf(\"     %20.8f\", atoms[i].q);\n        printf(\"\\n\");\n    }\n    printf(\" end\\n\");\n}\n\ndouble MolecularEntity::inter_atomic_distance(unsigned int i,unsigned int j) const {\n    if (i>=atoms.size()) throw \"trying to compute distance with invalid atom\";\n    if (j>=atoms.size()) throw \"trying to compute distance with invalid atom\";\n    return distance(atoms[i].x, atoms[i].y, atoms[i].z,\n                    atoms[j].x, atoms[j].y, atoms[j].z);\n}\n\ndouble MolecularEntity::nuclear_repulsion_energy() const {\n    double sum = 0.0;\n    for (unsigned int i=0; i<atoms.size(); i++) {\n        for (unsigned int j=i+1; j<atoms.size(); j++) {\n            sum += atoms[i].atomic_number * atoms[j].atomic_number / inter_atomic_distance(i,j);\n        }\n    }\n    return sum;\n}\n\ndouble MolecularEntity::smallest_length_scale() const {\n    double rcmax = 0.0;\n    for (unsigned int i=0; i<atoms.size(); i++) {\n        rcmax = std::max(rcmax,rcut[i]);\n    }\n    return 1.0/rcmax;\n}\n\n\n/// Moves the center of nuclear charge to the origin\nvoid MolecularEntity::center() {\n    double xx=0.0, yy=0.0, zz=0.0, qq=0.0;\n    for (unsigned int i=0; i<atoms.size(); i++) {\n        xx += atoms[i].x*atoms[i].q;\n        yy += atoms[i].y*atoms[i].q;\n        zz += atoms[i].z*atoms[i].q;\n        qq += atoms[i].q;\n    }\n    xx /= qq;\n    yy /= qq;\n    zz /= qq;\n    for (unsigned int i=0; i<atoms.size(); i++) {\n        atoms[i].x -= xx;\n        atoms[i].y -= yy;\n        atoms[i].z -= zz;\n    }\n}\n\n/// Returns the half width of the bounding cube\n\n/// The MolecularEntity will be contained in the cube [-L,+L].\ndouble MolecularEntity::bounding_cube() const {\n    double L = 0.0;\n    for (unsigned int i=0; i<atoms.size(); i++) {\n        L = std::max(L, fabs(atoms[i].x));\n        L = std::max(L, fabs(atoms[i].y));\n        L = std::max(L, fabs(atoms[i].z));\n    }\n    return L;\n}\n\ndouble MolecularEntity::total_nuclear_charge() const {\n    double sum = 0.0;\n    for (unsigned int i=0; i<atoms.size(); i++) {\n        sum += atoms[i].q;\n    }\n    return sum;\n}\n\ndouble MolecularEntity::nuclear_attraction_potential(double x, double y, double z) const {\n    // This is very inefficient since it scales as O(ngrid*natom)\n    // ... we can easily make an O(natom) version using\n    // the integral operator and sparse projection of an effective\n    // density ... its potential can be evaluated at the same\n    // time as the electronic Coulomb potential so it will be\n    // essentially free.\n\n    double sum = 0.0;\n    for (unsigned int i=0; i<atoms.size(); i++) {\n        double r = distance(atoms[i].x, atoms[i].y, atoms[i].z, x, y, z);\n        //sum -= atoms[i].q/(r+1e-8);\n        sum -= atoms[i].q * smoothed_potential(r*rcut[i])*rcut[i];\n    }\n    return sum;\n}\n\ndouble MolecularEntity::nuclear_charge_density(double x, double y, double z) const {\n  // Only one atom will contribute due to the short range of the nuclear\n  // charge density\n  for (unsigned int i=0; i<atoms.size(); i++) {\n      double big = rsqasymptotic[i];\n      double xx = atoms[i].x - x;\n      double rsq = xx*xx;\n      if (rsq <  big) {\n          double yy = atoms[i].y - y;\n          rsq += yy*yy;\n          if (rsq < big) {\n              double zz = atoms[i].z - z;\n              rsq += zz*zz;\n              if (rsq < big) {\n                  double r = sqrt(rsq);\n                  return atoms[i].atomic_number * smoothed_density(r*rcut[i])*rcut[i]*rcut[i]*rcut[i];\n              }\n          }\n      }\n  }\n  return 0.0;\n\n//  double sum = 0.0;\n//  for (unsigned int i = 0; i < atoms.size(); i++)\n//  {\n//    double r = distance(atoms[i].x, atoms[i].y, atoms[i].z, x, y, z);\n//    double e1 = 50.0;\n//    double coeff = pow(e1/PI, 1.5);\n//    sum -= atoms[i].atomic_number * coeff * exp(-e1 * r * r);\n//  }\n//  return sum;\n}\n\n\n"
  },
  {
    "path": "src/apps/periodic_old/mentity.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#ifndef MENTITY_H_\n\n#include <vector>\n#include <string>\n#include <iostream>\n#include <fstream>\n#include <sstream>\n#include <algorithm>\n#include <ctype.h>\n#include <cmath>\n#include <madness/misc/misc.h>\n\nstruct AtomicData {\n    // !!! The order of declaration here must match the order in the initializer !!!\n\n    // Nuclear info from L. Visscher and K.G. Dyall, Dirac-Fock\n    // atomic electronic structure calculations using different\n    // nuclear charge distributions, Atom. Data Nucl. Data Tabl., 67,\n    // (1997), 207.\n    //\n    // http://dirac.chem.sdu.dk/doc/FiniteNuclei/FiniteNuclei.shtml\n    const char* const symbol;\n    const char* const symbol_lowercase;\n    const unsigned int atomic_number;\n    const int isotope_number;\n    const double nuclear_radius;     ///< Radius of the nucleus for the finite nucleus models (in atomic units).\n    const double nuclear_half_charge_radius; ///< Half charge radius in the Fermi Model (in atomic units).\n    const double nuclear_gaussian_exponent; ///< Exponential parameter in the Gaussian Model (in atomic units).\n\n    /// Covalent radii stolen without shame from NWChem\n    const double covalent_radius;\n};\n\nconst AtomicData& get_atomic_data(unsigned int atn);\n\nunsigned int symbol_to_atomic_number(const std::string& symbol);\n\n\nclass Atom {\npublic:\n    double x, y, z, q;          ///< Coordinates and charge in atomic units\n    unsigned int atomic_number; ///< Atomic number\n\n    Atom(double x, double y, double z, double q, unsigned int atomic_number)\n        : x(x), y(y), z(z), q(q), atomic_number(atomic_number)\n    {}\n\n    Atom(const Atom& a)\n        : x(a.x), y(a.y), z(a.z), q(a.q), atomic_number(a.atomic_number)\n    {}\n\n    /// Default construct makes a zero charge ghost atom at origin\n    Atom()\n        : x(0), y(0), z(0), q(0), atomic_number(0)\n    {}\n\n    template <typename Archive>\n    void serialize(Archive& ar) {ar & x & y & z & q & atomic_number;}\n};\n\nstd::ostream& operator<<(std::ostream& s, const Atom& atom);\n\nclass MolecularEntity {\nprivate:\n    // If you add more fields don't forget to serialize them\n    std::vector<Atom> atoms;\n    std::vector<double> rcut;  // Reciprocal of the smoothing radius\n    std::vector<double> rsqasymptotic;   // Value of r*r beyond which the potential is asymptotic 1/r\n\npublic:\n    /// Makes a MolecularEntity with zero atoms\n    MolecularEntity() : atoms() {};\n\n    MolecularEntity(const std::string& filename, bool fractional);\n\n    void read_file(const std::string& filename, bool fractional);\n\n    void add_atom(double x, double y, double z, int atn, double q);\n\n    int natom() const {return atoms.size();};\n\n    void set_atom_coords(unsigned int i, double x, double y, double z);\n\n    double bounding_cube() const;\n\n    const Atom& get_atom(unsigned int i) const;\n\n    void print() const;\n\n    double inter_atomic_distance(unsigned int i,unsigned int j) const;\n\n    double nuclear_repulsion_energy() const;\n\n    double smallest_length_scale() const;\n\n    void center();\n\n    double total_nuclear_charge() const;\n\n    double nuclear_attraction_potential(double x, double y, double z) const;\n\n    double nuclear_charge_density(double x, double y, double z) const;\n\n    template <typename Archive>\n    void serialize(Archive& ar) {ar & atoms & rcut & rsqasymptotic;}\n};\n\n#define MENTITY_H_\n\n\n#endif /* MENTITY_H_ */\n"
  },
  {
    "path": "src/apps/periodic_old/molecularbasis.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MOLECULAR_BASIS_H\n#define MOLECULAR_BASIS_H\n\n#include <madness/madness_config.h>\n#include <madness/constants.h>\n#include \"mentity.h\"\n#include <madness/external/tinyxml/tinyxml.h>\n#include <madness/tensor/tensor.h>\n\n#include <vector>\n#include <algorithm>\n#include <iostream>\n#include <sstream>\n#include <iomanip>\n#include <cstdio>\n\n/// Represents a single shell of contracted, Cartesian, Gaussian primitives\nclass ContractedGaussianShell {\n    int type;  ///< Angular momentum = 0, 1, 2, ...\n    std::vector<double> coeff;\n    std::vector<double> expnt;\n    double rsqmax;\n    int numbf;  ///< Number of basis functions in shell (type+1)*(type+2)/2\n\n    void normalize() {\n        // nwcchem cartesian normalization conventions\n        // translation of nmcoeff.F into python and thence to c++\n        int np = coeff.size();\n        if (np == 1) coeff[0] = 1.0e0;\n\n        double pi32=pow(madness::constants::pi,1.5);\n        int l_lim = 2*type - 1;\n        double f = 1.0e00;\n        for (int n=l_lim; n>1; n-=2) f *= n;\n\n        for (int n=0; n<np; n++)\n            coeff[n] *= pow(2.e0*expnt[n]/madness::constants::pi,0.75e0)*pow(4.e0*expnt[n],0.5E0*type)/sqrt(f);\n\n        double sum = 0.0;\n        for (int n1=0; n1<np; n1++) {\n            for (int n2=0; n2<np; n2++) {\n                double S =pi32/pow(expnt[n1]+expnt[n2],1.5e0+type)/pow(2e0,type);\n                sum = sum + coeff[n1]*coeff[n2]*S;\n            }\n        }\n        sum *= f;\n\n        f = 1e0/sqrt(sum);\n        for (int n=0; n<np; n++) coeff[n] *= f;\n    }\n\npublic:\n    ContractedGaussianShell()\n            : type(-1), coeff(), expnt(), rsqmax(0.0), numbf(0) {};\n\n    ContractedGaussianShell(int type,\n                            const std::vector<double>& coeff,\n                            const std::vector<double>& expnt,\n                            bool donorm=true)\n            : type(type), coeff(coeff), expnt(expnt), numbf((type+1)*(type+2)/2) {\n        if (donorm) normalize();\n        double minexpnt = expnt[0];\n        for (unsigned int i=1; i<expnt.size(); i++)\n            minexpnt = std::min(minexpnt,expnt[i]);\n        rsqmax = 18.4/minexpnt;  // 18.4 = 8*ln(10)\n    }\n\n\n    /// Returns square of the distance beyond which function is less than 1e-8.\n    double rangesq() const {\n        return rsqmax;\n    }\n\n\n    /// Evaluates the radial part of the contracted function\n    double eval_radial(double rsq) const {\n        if (rsq > rsqmax) return 0.0;\n        double sum = 0.0;\n        for (unsigned int i=0; i<coeff.size(); i++) {\n            double ersq = expnt[i]*rsq;\n            if (ersq < 18.4) sum += coeff[i]*exp(-ersq);\n        }\n        return sum;\n    }\n\n\n    /// Evaluates the entire shell returning the incremented result pointer\n    double* eval(double rsq, double x, double y, double z, double* bf) const {\n        double R = eval_radial(rsq);\n        if (fabs(R) < 1e-8) {\n            for (int i=0; i<numbf; i++) bf[i] = 0.0;\n\n        }\n        else {\n            switch (type) {\n            case 0:\n                bf[0] =  R;\n                break;\n            case 1:\n                bf[0] =  R*x;\n                bf[1] =  R*y;\n                bf[2] =  R*z;\n                break;\n            case 2:\n                bf[0] = R*x*x;\n                bf[1] = R*x*y;\n                bf[2] = R*x*z ;\n                bf[3] = R*y*y ;\n                bf[4] = R*y*z ;\n                bf[5] = R*z*z;\n                break;\n            case 3:\n                bf[0] = R*x*x*x;\n                bf[1] = R*x*x*y;\n                bf[2] = R*x*x*z;\n                bf[3] = R*x*y*y;\n                bf[4] = R*x*y*z;\n                bf[5] = R*x*z*z;\n                bf[6] = R*y*y*y;\n                bf[7] = R*y*y*z;\n                bf[8] = R*y*z*z;\n                bf[9] = R*z*z*z;\n                break;\n\n            default:\n                throw \"UNKNOWN ANGULAR MOMENTUM\";\n            }\n        }\n        return bf+numbf;\n    }\n\n\n    /// Returns the shell angular momentum\n    int angular_momentum() const {\n        return type;\n    }\n\n    /// Returns the number of basis functions in the shell\n    int nbf() const {\n        return numbf;\n    }\n\n    /// Returns the number of primitives in the contraction\n    int nprim() const {\n        return coeff.size();\n    }\n\n    /// Returns a const reference to the coefficients\n    const std::vector<double>& get_coeff() const {\n        return coeff;\n    }\n\n    /// Returns a const reference to the exponents\n    const std::vector<double>& get_expnt() const {\n        return expnt;\n    }\n\n    /// Returns a string description of the basis function type\n    const char* get_desc(int ibf) const {\n        static const char* tags[4][10] = {\n            {\"s\"   ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    } ,\n            {\"px\"  ,\"py\"  ,\"pz\"  ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    } ,\n            {\"dxx\" ,\"dxy\" ,\"dxz\" ,\"dyy\" ,\"dyz\" ,\"dzz\" ,\"\"    ,\"\"    ,\"\"    ,\"\"    } ,\n            {\"fxxx\",\"fxxy\",\"fxxz\",\"fxyy\",\"fxyz\",\"fxzz\",\"fxzz\",\"fyyy\",\"fyzz\",\"fzzz\"}\n        };\n        MADNESS_ASSERT(ibf<numbf && ibf >= 0);\n        return tags[type][ibf];\n    }\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & type & coeff & expnt & rsqmax & numbf;\n    }\n};\n\n\nstd::ostream& operator<<(std::ostream& s, const ContractedGaussianShell& c) {\n    static const char* tag[] = {\"s\",\"p\",\"d\",\"f\",\"g\"};\n    char buf[32768];\n    char* p = buf;\n    const std::vector<double>& coeff = c.get_coeff();\n    const std::vector<double>& expnt = c.get_expnt();\n\n    p += sprintf(p,\"%s [\",tag[c.angular_momentum()]);\n    for (int i=0; i<c.nprim(); i++) {\n        p += sprintf(p, \"%.6f(%.6f)\",coeff[i],expnt[i]);\n        if (i != (c.nprim()-1)) p += sprintf(p, \", \");\n    }\n    p += sprintf(p, \"]\");\n    s << buf;\n    return s;\n}\n\n\n/// Represents multiple shells of contracted gaussians on a single center\nclass AtomicBasis {\n    std::vector<ContractedGaussianShell> g;\n    double rmaxsq;\n    int numbf;\n    Tensor<double> dmat, avec, bvec;\n\npublic:\n    AtomicBasis() : g(), rmaxsq(0.0), numbf(0) {};\n\n    AtomicBasis(const std::vector<ContractedGaussianShell>& g)\n            : g(g) {\n        rmaxsq = 0.0;\n        numbf = 0;\n        for (unsigned int i=0; i<g.size(); i++) {\n            rmaxsq = std::max(rmaxsq, g[i].rangesq());\n            numbf += g[i].nbf();\n        }\n    }\n\n    void set_guess_info(const Tensor<double>& dmat,\n                        const Tensor<double>& avec, const Tensor<double>& bvec) {\n        this->dmat = copy(dmat);\n        this->avec = copy(avec);\n        this->bvec = copy(bvec);\n    }\n\n    /// Returns the number of basis functions on the center\n    int nbf() const {\n        return numbf;\n    }\n\n    /// Returns the number of shells on the center\n    int nshell() const {\n        return g.size();\n    }\n\n    /// Returns a const reference to the shells\n    const std::vector<ContractedGaussianShell>& get_shells() const {\n        return g;\n    };\n\n    /// Evaluates the basis functions at point x, y, z relative to atomic center\n\n    /// The array bf[] must be large enough to hold nbf() values.\n    ///\n    /// Returned is the incremented pointer.\n    double* eval(double x, double y, double z, double* bf) const {\n        double rsq = x*x + y*y + z*z;\n        if (rsq > rmaxsq) {\n            for (int i=0; i<numbf; i++) bf[i] = 0.0;\n            return bf+numbf;\n        }\n\n        double* bfstart = bf;\n        for (unsigned int i=0; i<g.size(); i++) {\n            bf = g[i].eval(rsq, x, y, z, bf);\n        }\n        // paranoia is good\n        MADNESS_ASSERT(bf-bfstart == numbf);\n        return bf;\n    }\n\n    /// Evaluates the guess atomic density at point x, y, z relative to atomic center\n    double eval_guess_density(double x, double y, double z) const {\n        MADNESS_ASSERT(has_guess_info());\n        double rsq = x*x + y*y + z*z;\n        if (rsq > rmaxsq) return 0.0;\n\n        double bf[numbf];\n        eval(x, y, z, bf);\n        const double* p = dmat.ptr();\n        double sum = 0.0;\n        for (int i=0; i<numbf; i++, p+=numbf) {\n            double sumj = 0.0;\n            for (int j=0; j<numbf; ++j)\n                sumj += p[j]*bf[j];\n            sum += bf[i]*sumj;\n        }\n        return sum;\n    }\n\n    /// Return shell that contains basis function ibf and also return index of function in the shell\n    const ContractedGaussianShell& get_shell_from_basis_function(int ibf, int& ibf_in_shell) const {\n        int n=0;\n        for (unsigned int i=0; i<g.size(); i++) {\n            int nbf_in_shell = g[i].nbf();\n            if (ibf>=n && ibf<(n+nbf_in_shell)) {\n                ibf_in_shell = ibf-n;\n                return g[i];\n            }\n            else {\n                n += g[i].nbf();\n            }\n        }\n        MADNESS_EXCEPTION(\"AtomicBasis: get_shell_from_basis_function\", ibf*100000 + nbf());\n    }\n\n    bool has_guess_info() const {\n        return dmat.size()>0;\n    }\n\n    const Tensor<double>& get_dmat() const {\n        return dmat;\n    };\n\n    const Tensor<double>& get_avec() const {\n        return avec;\n    };\n\n    const Tensor<double>& get_bvec() const {\n        return bvec;\n    };\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & g & rmaxsq & numbf & dmat & avec & bvec;\n    }\n\n};\n\nstd::ostream& operator<<(std::ostream& s, const AtomicBasis& c) {\n    const std::vector<ContractedGaussianShell>& shells = c.get_shells();\n    for (int i=0; i<c.nshell(); i++) {\n        s << \"     \" << shells[i] << std::endl;\n    }\n    if (c.has_guess_info()) {\n        s << \"     \" << \"Guess density matrix\" << std::endl;\n        s << c.get_dmat();\n    }\n\n    return s;\n}\n\n/// Used to represent one basis function from a shell on a specific center\nclass AtomicBasisFunction {\nprivate:\n    const double xx, yy, zz; // Coordinates of the center\n    const ContractedGaussianShell& shell; // Reference to the underlying atomic shell\n    const int ibf; // Index of basis function in the shell (0, 1, ...)\n    const int nbf; // Number of functions in the shell\n\npublic:\n    AtomicBasisFunction(double x, double y, double z,\n                        const ContractedGaussianShell& shell, int ibf)\n            : xx(x), yy(y), zz(z), shell(shell), ibf(ibf), nbf(shell.nbf()) {}\n\n\n    AtomicBasisFunction(const AtomicBasisFunction& aofunc)\n            : xx(aofunc.xx)\n            , yy(aofunc.yy)\n            , zz(aofunc.zz)\n            , shell(aofunc.shell)\n            , ibf(aofunc.ibf)\n            , nbf(aofunc.nbf) {}\n\n    double operator()(double x, double y, double z) const {\n        double bf[nbf];\n        x-=xx;\n        y-=yy;\n        z-=zz;\n        double rsq = x*x + y*y + z*z;\n        shell.eval(rsq, x, y, z, bf);\n        return bf[ibf];\n    }\n\n    void print_me(std::ostream& s) const {\n        s << \"atomic basis function: center \" << xx << \" \" << yy << \" \" << zz << \" : ibf \" << ibf << \" nbf \" << nbf << \" : shell \" << shell << std::endl;\n    }\n\n    const ContractedGaussianShell& get_shell() const {\n        return shell;\n    }\n\n    int get_index() const {\n        return ibf;\n    }\n\n    const char* get_desc() const {\n        return shell.get_desc(ibf);\n    }\n    \n    void get_coords(double& x, double& y, double& z) const {\n    \tx=xx; y=yy; z=zz;\n\t\treturn;\n    }\n\n    double rangesq() const {\n        return shell.rangesq();\n    }\n};\n\nstd::ostream& operator<<(std::ostream& s, const AtomicBasisFunction& a) {\n    a.print_me(s);\n    return s;\n};\n\n/// Contracted Gaussian basis\nclass AtomicBasisSet {\n    std::string name;\n    std::vector<AtomicBasis> ag;  //< Basis associated by atomic number = 1, 2, ...; 0=Bq.\n\n    template <typename T>\n    std::vector<T> load_tixml_vector(TiXmlElement* node, int n, const char* name) {\n        TiXmlElement* child = node->FirstChildElement(name);\n        MADNESS_ASSERT(child);\n        std::istringstream s(child->GetText());\n        std::vector<T> r(n);\n        for (int i=0; i<n; i++) {\n            MADNESS_ASSERT(s >> r[i]);\n        }\n        return r;\n    }\n\n    template <typename T>\n    Tensor<T> load_tixml_matrix(TiXmlElement* node, int n, int m, const char* name) {\n        TiXmlElement* child = node->FirstChildElement(name);\n        MADNESS_ASSERT(child);\n        std::istringstream s(child->GetText());\n        Tensor<T> r(n,m);\n        for (int i=0; i<n; i++) {\n            for (int j=0; j<m; j++) {\n                MADNESS_ASSERT(s >> r(i,j));\n            }\n        }\n        return r;\n    }\n\npublic:\n    AtomicBasisSet() : name(\"unknown\"), ag(110) {}\n\n\n    AtomicBasisSet(std::string filename) : name(\"\"), ag(110) {\n        read_file(filename);\n    }\n\n    void read_file(std::string filename) {\n        static const bool debug = false;\n        TiXmlDocument doc(filename);\n        if (!doc.LoadFile()) {\n            std::cout << \"AtomicBasisSet: Failed loading from file \" << filename\n                      << \" : ErrorDesc  \" << doc.ErrorDesc()\n                      << \" : Row \" << doc.ErrorRow()\n                      << \" : Col \" << doc.ErrorCol() << std::endl;\n            MADNESS_EXCEPTION(\"AtomicBasisSet: Failed loading basis set\",0);\n        }\n        for (TiXmlElement* node=doc.FirstChildElement(); node; node=node->NextSiblingElement()) {\n            if (strcmp(node->Value(),\"name\") == 0) {\n                name = node->GetText();\n                if (debug) std::cout << \"Loading basis set \" << name << std::endl;\n            }\n            else if (strcmp(node->Value(), \"basis\") == 0) {\n                const char* symbol = node->Attribute(\"symbol\");\n                if (debug) std::cout << \"  found basis set for \" << symbol << std::endl;\n                int atn = symbol_to_atomic_number(symbol);\n                std::vector<ContractedGaussianShell> g;\n                for (TiXmlElement* shell=node->FirstChildElement(); shell; shell=shell->NextSiblingElement()) {\n                    const char* type = shell->Attribute(\"type\");\n                    int nprim=-1;\n                    shell->Attribute(\"nprim\",&nprim);\n                    if (debug) std::cout << \"      found shell \" << type << \" \" << nprim << std::endl;\n                    std::vector<double> expnt = load_tixml_vector<double>(shell, nprim, \"exponents\");\n                    if (strcmp(type,\"L\") == 0) {\n                        std::vector<double> scoeff = load_tixml_vector<double>(shell, nprim, \"scoefficients\");\n                        std::vector<double> pcoeff = load_tixml_vector<double>(shell, nprim, \"pcoefficients\");\n                        g.push_back(ContractedGaussianShell(0,scoeff,expnt));\n                        g.push_back(ContractedGaussianShell(1,pcoeff,expnt));\n                    }\n                    else {\n                        static const char* tag[] = {\"S\",\"P\",\"D\",\"F\",\"G\"};\n                        int i;\n                        for (i=0; i<5; i++) {\n                            if (strcmp(type,tag[i]) == 0) goto foundit;\n                        }\n                        MADNESS_EXCEPTION(\"Loading atomic basis set: bad shell type?\",0);\nfoundit:\n                        std::vector<double> coeff = load_tixml_vector<double>(shell, nprim, \"coefficients\");\n                        g.push_back(ContractedGaussianShell(i, coeff, expnt));\n                    }\n                }\n                ag[atn] = AtomicBasis(g);\n            }\n            else if (strcmp(node->Value(), \"atomicguess\") == 0) {\n                const char* symbol = node->Attribute(\"symbol\");\n                if (debug) std::cout << \"  atomic guess info for \" << symbol << std::endl;\n                int atn = symbol_to_atomic_number(symbol);\n                MADNESS_ASSERT(is_supported(atn));\n                int nbf = ag[atn].nbf();\n                Tensor<double> dmat = load_tixml_matrix<double>(node, nbf, nbf, \"guessdensitymatrix\");\n                Tensor<double> avec = load_tixml_matrix<double>(node, nbf, nbf, \"alphavectors\");\n                Tensor<double> bvec = load_tixml_matrix<double>(node, nbf, nbf, \"betavectors\");\n                ag[atn].set_guess_info(dmat, avec, bvec);\n            }\n            else {\n                MADNESS_EXCEPTION(\"Loading atomic basis set: unexpected XML element\", 0);\n            }\n        }\n\n    }\n\n\n    /// Makes map from atoms to first basis function on atom and number of basis functions on atom\n    void atoms_to_bfn(const MolecularEntity& mentity, std::vector<int>& at_to_bf, std::vector<int>& at_nbf) {\n        at_to_bf = std::vector<int>(mentity.natom());\n        at_nbf   = std::vector<int>(mentity.natom());\n\n        int n = 0;\n        for (int i=0; i<mentity.natom(); i++) {\n            const Atom& atom = mentity.get_atom(i);\n            const int atn = atom.atomic_number;\n            MADNESS_ASSERT(is_supported(atn));\n            at_to_bf[i] = n;\n            at_nbf[i] = ag[atn].nbf();\n            n += at_nbf[i];\n        }\n    }\n\n\n    /// Returns the number of the atom the ibf'th basis function is on\n    int basisfn_to_atom(const MolecularEntity& mentity, int ibf) const {\n        MADNESS_ASSERT(ibf >= 0);\n        int n = 0;\n        for (int i=0; i<mentity.natom(); i++) {\n            // Is the desired function on this atom?\n            const Atom& atom = mentity.get_atom(i);\n            const int atn = atom.atomic_number;\n            MADNESS_ASSERT(is_supported(atn));\n            const int nbf_on_atom = ag[atn].nbf();\n            if (ibf >= n  && (n+nbf_on_atom) > ibf) {\n                return i;\n            }\n            else {\n                n += nbf_on_atom;\n            }\n        }\n        MADNESS_EXCEPTION(\"AtomicBasisSet: get_atomic_basis_function: confused?\", ibf);\n    }\n\n    /// Returns the ibf'th atomic basis function\n    AtomicBasisFunction get_atomic_basis_function(const MolecularEntity& mentity, int ibf) const {\n        MADNESS_ASSERT(ibf >= 0);\n        int n = 0;\n        for (int i=0; i<mentity.natom(); i++) {\n            // Is the desired function on this atom?\n            const Atom& atom = mentity.get_atom(i);\n            const int atn = atom.atomic_number;\n            MADNESS_ASSERT(is_supported(atn));\n            const int nbf_on_atom = ag[atn].nbf();\n            if (ibf >= n  && (n+nbf_on_atom) > ibf) {\n                int index;\n                const ContractedGaussianShell& shell =\n                    ag[atn].get_shell_from_basis_function(ibf-n, index);\n                return AtomicBasisFunction(atom.x, atom.y, atom.z, shell, index);\n            }\n            else {\n                n += nbf_on_atom;\n            }\n        }\n        MADNESS_EXCEPTION(\"AtomicBasisSet: get_atomic_basis_function: confused?\", ibf);\n    }\n\n\n    /// Given a molecule count the number of basis functions\n    int nbf(const MolecularEntity& mentity) const {\n        int n = 0;\n        for (int i=0; i<mentity.natom(); i++) {\n            const Atom& atom = mentity.get_atom(i);\n            const int atn = atom.atomic_number;\n            MADNESS_ASSERT(is_supported(atn));\n            n += ag[atn].nbf();\n        }\n        return n;\n    }\n\n    /// Evaluates the basis functions\n    void eval(const MolecularEntity& mentity, double x, double y, double z, double *bf) const {\n        for (int i=0; i<mentity.natom(); i++) {\n            const Atom& atom = mentity.get_atom(i);\n            const int atn = atom.atomic_number;\n            bf = ag[atn].eval(x-atom.x, y-atom.y, z-atom.z, bf);\n        }\n    }\n\n\n    /// Evaluates the guess density\n    double eval_guess_density(const MolecularEntity& mentity, double x, double y, double z) const {\n        double sum = 0.0;\n        for (int i=0; i<mentity.natom(); i++) {\n            const Atom& atom = mentity.get_atom(i);\n            const int atn = atom.atomic_number;\n            sum += ag[atn].eval_guess_density(x-atom.x, y-atom.y, z-atom.z);\n        }\n        return sum;\n    }\n\n    bool is_supported(int atomic_number) const {\n        return ag[atomic_number].nbf() > 0;\n    }\n\n    /// Print basis info for atoms in the molecule (once for each unique atom type)\n    void print(const MolecularEntity& mentity) const {\n        std::cout << \"\\n \" << name << \" atomic basis set\" << std::endl;\n        for (int i=0; i<mentity.natom(); i++) {\n            const Atom& atom = mentity.get_atom(i);\n            const unsigned int atn = atom.atomic_number;\n            for (int j=0; j<i; j++) {\n                if (mentity.get_atom(j).atomic_number == atn)\n                    goto doneitalready;\n            }\n            std::cout << std::endl;\n            std::cout << \"   \" <<  get_atomic_data(i).symbol << std::endl;\n            std::cout << ag[atn];\ndoneitalready:\n            ;\n        }\n    }\n\n    template <typename T>\n    class AnalysisSorter {\n        const Tensor<T> v;\n    public:\n        AnalysisSorter(const Tensor<T>& v) : v(v) {}\n        bool operator()(long i, long j) const {\n            return std::abs(v[i]) > std::abs(v[j]);\n        }\n    };\n\n    /// Given a vector of AO coefficients prints an analysis\n\n    /// For each significant coeff it prints\n    /// - atomic symbol\n    /// - atom number\n    /// - basis function type (e.g., dxy)\n    /// - basis function number\n    /// - MO coeff\n    template <typename T>\n    void print_anal(const MolecularEntity& mentity, const Tensor<T>& v) {\n        const double thresh = 0.2*v.normf();\n        if (thresh == 0.0) {\n            printf(\"    zero vector\\n\");\n            return;\n        }\n        long nbf = int(v.dim[0]);\n        long list[nbf];\n        long ngot=0;\n        for (long i=0; i<nbf; i++) {\n            if (std::abs(v(i)) > thresh) {\n                list[ngot++] = i;\n            }\n        }\n        std::sort(list,list+ngot,AnalysisSorter<T>(v));\n\n        const char* format;\n        if (mentity.natom() < 10) {\n            format = \"  %2s(%1d)%4s(%2ld)%6.3f  \";\n        }\n        else if (mentity.natom() < 100) {\n            format = \"  %2s(%2d)%4s(%3ld)%6.3f  \";\n        }\n        else if (mentity.natom() < 1000) {\n            format = \"  %2s(%3d)%4s(%4ld)%6.3f  \";\n        }\n        else {\n            format = \"  %2s(%4d)%4s(%5ld)%6.3f  \";\n        }\n        for (long ii=0; ii<ngot; ii++) {\n            long ibf = list[ii];\n\n            const int iat = basisfn_to_atom(mentity, ibf);\n            const Atom& atom = mentity.get_atom(iat);\n            const AtomicBasisFunction ao = get_atomic_basis_function(mentity, ibf);\n            const char* desc = ao.get_desc();\n            const char* element = get_atomic_data(atom.atomic_number).symbol;\n\n            // This will need wrapping in a template for a complex MO vector\n            printf(format, element, iat, desc, ibf, v[ibf]);\n        }\n        printf(\"\\n\");\n    }\n\n    /// Print basis info for all supported atoms\n    void print_all() const {\n        std::cout << \"\\n \" << name << \" atomic basis set\" << std::endl;\n        for (unsigned int i=0; i<ag.size(); i++) {\n            if (ag[i].nbf() > 0) {\n                std::cout << \"   \" <<  get_atomic_data(i).symbol << std::endl;\n                std::cout << ag[i];\n            }\n        }\n    }\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & name & ag;\n    }\n};\n\n\n\n#endif\n"
  },
  {
    "path": "src/apps/periodic_old/outputwriter.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef OUTPUTWRITER_H_\n#define OUTPUTWRITER_H_\n\n#include <fstream>\n\nclass OutputWriter\n{\npublic:\n  //***************************************************************************\n  static OutputWriter* instance()\n  {\n    if (!_instance)\n      _instance = new OutputWriter();\n    return _instance;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  void init_debug(char* filename)\n  {\n    dostr = new std::ofstream(filename);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  void init_log(char* filename)\n  {\n    lostr = new std::ofstream(filename);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  void init_eigv(char* filename)\n  {\n    evostr = new std::ofstream(filename);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  virtual ~OutputWriter()\n  {\n    if (dostr) delete dostr;\n    if (lostr) delete lostr;\n    if (evostr) delete evostr;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  std::ofstream* debug_stream()\n  {\n    return dostr;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  std::ofstream* log_stream()\n  {\n    return lostr;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  std::ofstream* eigv_stream()\n  {\n    return evostr;\n  }\n  //***************************************************************************\n\nprivate:\n  //***************************************************************************\n  OutputWriter()\n  {\n    dostr = 0;\n    lostr = 0;\n    evostr = 0;\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  static OutputWriter* _instance;\n  //***************************************************************************\n\n  //***************************************************************************\n  std::ofstream* dostr;\n  //***************************************************************************\n\n  //***************************************************************************\n  std::ofstream* lostr;\n  //***************************************************************************\n\n  //***************************************************************************\n  std::ofstream* evostr;\n  //***************************************************************************\n};\n\nOutputWriter* OutputWriter::_instance = 0;\n\n#endif /* OUTPUTWRITER_H_ */\n"
  },
  {
    "path": "src/apps/periodic_old/poperator.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef POPERATOR_H_\n#define POPERATOR_H_\n\n#include <madness/constants.h>\n#include <madness/mra/operator.h>\n\n#define WST_PI madness::constants::pi\n//#define WST_PI 3.14159265358979323846264338328\n\nnamespace madness\n{\n  //***************************************************************************\n  const double acut1e_6 = 0.25; //0.6450626287524907;\n  //***************************************************************************\n\n//  //***************************************************************************\n//  template<typename Q, int NDIM>\n//  SeparatedConvolution<Q, NDIM> PeriodicHFExchangeOp(World& world, long k,\n//  double lo, double eps, Tensor<double> L, Vector<double,3> q)\n//  {\n//    // bsh_fit generates representation for 1/4Pir but we want 1/r\n//    // so have to scale eps by 1/4Pi\n//    Tensor<double> coeff, expnt;\n//    //if (mu==0) eps /= 4.0*pi;\n//    bsh_fit(0.0, lo, 100.0*L[0], eps/(4.0 * WST_PI), &coeff, &expnt, false); //eps /(4.0*pi)\n//\n//    // Scale coefficients according to the dimensionality and add to the list of operators\n//    std::vector< std::shared_ptr< Convolution1D<Q> > > ops;\n//    for (int i=0; i < coeff.dim(0); ++i)\n//    {\n//      if (expnt[i]*L[0]*L[0] > acut1e_6)\n//      {\n//        double c = pow(4 * WST_PI * coeff[i], 1.0/double(NDIM));\n//        ops.push_back(std::shared_ptr< Convolution1D<Q> >(new GaussianConvolution1D<Q>(k,\n//        \t  c*L[0], expnt[i]*L[0]*L[0], 1.0, 0, true, q)));\n//      }\n//    }\n//\n//    return SeparatedConvolution<Q, NDIM>(world, ops);\n//  }\n//  //***************************************************************************\n\n  //***************************************************************************\n  template<typename Q, int NDIM>\n  SeparatedConvolution<Q, NDIM> PeriodicCoulombOp(World& world, long k, double lo, double eps, Tensor<double> L)\n  {\n    // bsh_fit generates representation for 1/4Pir but we want 1/r\n    // so have to scale eps by 1/4Pi\n    Tensor<double> coeff, expnt;\n    //if (mu==0) eps /= 4.0*pi;\n    bsh_fit(0.0, lo, 100.0*L[0], eps/(4.0 * WST_PI), &coeff, &expnt, false); //eps /(4.0*pi)\n\n    // Scale coefficients according to the dimensionality and add to the list of operators\n    std::vector< std::shared_ptr< Convolution1D<Q> > > ops;\n    for (int i=0; i < coeff.dim(0); ++i)\n    {\n      if (expnt[i]*L[0]*L[0] > acut1e_6)\n      {\n        double c = pow(4 * WST_PI * coeff[i], 1.0/double(NDIM));\n        ops.push_back(std::shared_ptr< Convolution1D<Q> >(new GaussianConvolution1D<Q>(k, c*L[0], expnt[i]*L[0]*L[0], 1.0, 0, true)));\n      }\n    }\n\n    return SeparatedConvolution<Q, NDIM>(world, ops);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template<typename Q, int NDIM>\n  SeparatedConvolution<Q, NDIM>* PeriodicCoulombOpPtr(World& world, long k, double lo, double eps, Tensor<double> L)\n  {\n    // bsh_fit generates representation for 1/4Pir but we want 1/r\n    // so have to scale eps by 1/4Pi\n    Tensor<double> coeff, expnt;\n    //if (mu==0) eps /= 4.0*pi;\n    bsh_fit(0.0, lo, 100.0*L[0], eps/(4.0 * WST_PI), &coeff, &expnt, false); //eps /(4.0*pi)\n\n    // Scale coefficients according to the dimensionality and add to the list of operators\n    std::vector< std::shared_ptr< Convolution1D<Q> > > ops;\n    for (int i=0; i < coeff.dim(0); ++i)\n    {\n      if (expnt[i]*L[0]*L[0] > acut1e_6)\n      {\n        double c = pow(4 * WST_PI * coeff[i], 1.0/double(NDIM));\n        ops.push_back(std::shared_ptr< Convolution1D<Q> >(new GaussianConvolution1D<double>(k, c*L[0], expnt[i]*L[0]*L[0], 1.0, 0, true)));\n      }\n    }\n\n    return new SeparatedConvolution<Q, NDIM>(world, ops);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template<typename Q, int NDIM>\n  SeparatedConvolution<Q, NDIM> PeriodicBSHOp(World& world, double mu, long k, double lo, double eps, Tensor<double> L)\n  {\n    // bsh_fit generates representation for 1/4Pir but we want 1/r\n    // so have to scale eps by 1/4Pi\n    Tensor<double> coeff, expnt;\n    //if (mu==0) eps /= 4.0*pi;\n    bsh_fit(mu, lo, 10.0*L[0], eps, &coeff, &expnt, false); //eps /(4.0*pi)\n\n    // Scale coefficients according to the dimensionality and add to the list of operators\n    std::vector< std::shared_ptr< Convolution1D<Q> > > ops;\n    for (int i=0; (i < coeff.dim(0)); ++i)\n    {\n      double c = pow(coeff[i], 1.0/double(NDIM));\n      ops.push_back(std::shared_ptr< Convolution1D<Q> >(new GaussianConvolution1D<double>(k, c*L[0], expnt[i]*L[0]*L[0], 1.0, 0, true)));\n    }\n\n    return SeparatedConvolution<Q, NDIM>(world, ops);\n  }\n  //***************************************************************************\n\n  //***************************************************************************\n  template<typename Q, int NDIM>\n  SeparatedConvolution<Q, NDIM>* PeriodicBSHOpPtr(World& world, double mu, long k, double lo, double eps, Tensor<double> L)\n  {\n    // bsh_fit generates representation for 1/4Pir but we want 1/r\n    // so have to scale eps by 1/4Pi\n    Tensor<double> coeff, expnt;\n    //if (mu==0) eps /= 4.0*pi;\n    bsh_fit(mu, lo, 10.0*L[0], eps, &coeff, &expnt, false); //eps /(4.0*pi)\n\n    // Scale coefficients according to the dimensionality and add to the list of operators\n    std::vector< std::shared_ptr< Convolution1D<Q> > > ops;\n    for (int i=0; (i < coeff.dim(0)); ++i)\n    {\n      double c = pow(coeff[i], 1.0/double(NDIM));\n      ops.push_back(std::shared_ptr< Convolution1D<Q> >(new GaussianConvolution1D<double>(k, c*L[0], expnt[i]*L[0]*L[0], 1.0, 0, true)));\n    }\n\n    return new SeparatedConvolution<Q, NDIM>(world, ops);\n  }\n  //***************************************************************************\n\n};\n\n#endif\n"
  },
  {
    "path": "src/apps/periodic_old/solver.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/mra/mra.h>\n//#include <madness/mra/lbdeux.h>\n#include <madness/world/MADworld.h>\n#include <madness/tensor/solvers.h>\n#include <vector>\n#include <madness/fortran_ctypes.h>\n#include <cmath>\n\n#include \"poperator.h\"\n#include \"libxc.h\"\n#include \"electronicstructureparams.h\"\n#include \"complexfun.h\"\n#include \"esolver.h\"\n\n#ifndef SOLVER_H_\n\nusing std::endl;\nusing std::setfill;\nusing std::setw;\nusing std::ostream;\n\n/*!\n  \\ingroup applications\n  \\defgroup periodic_solver Periodic Solver\n  \\brief The Periodic Solver group is a group that contains the software\n  objects that are needed to solve a periodic Kohn-Sham hamiltonian.\n*/\n\n//*****************************************************************************\n/* static double onesfunc(const coordT& x) */\n/* { */\n/*   return 1.0; */\n/* } */\n//*****************************************************************************\n\nnamespace madness\n{\n  //***************************************************************************\n  /*!\n   \\ingroup periodic_solver\n   \\Fermi-Dirac distribution function for fixing the occupation numbers\n   */\n  template <typename T>\n  T stheta_fd(const T& x)\n  {\n    if (x > 50.0)\n    {\n      return 1.0;\n    }\n    else if (x < -50.0)\n    {\n      return 0.0;\n    }\n    else\n    {\n      return 1.0/(1.0 + exp(-x));\n    }\n  }\n  //***************************************************************************\n\n  // NOTE: so this is totally hacked because of the requirement of using a box\n  //       of L*L*L rather than the convention of using a combination of\n  //       lattice vectors and reciprocal lattice vectors (FOR NOW)\n  // On second thought, it might be ok for general use if used \"right\".\n  //***************************************************************************\n  template <std::size_t NDIM>\n  class ComplexExp : public FunctionFunctorInterface<double_complex,NDIM> {\n  public:\n      typedef Vector<double,NDIM> coordT;\n      typedef Vector<double,NDIM> vec3dT;\n      const double_complex coeff;\n      const vec3dT exponent;\n\n      ComplexExp(vec3dT exponent, double_complex coeff)\n              : exponent(exponent), coeff(coeff) {}\n\n      double_complex operator()(const coordT& x) const {\n          double sum = 0.0;\n          for (std::size_t i=0; i<NDIM; ++i) {\n              sum += x[i]*exponent[i];\n          };\n          return coeff*exp(double_complex(0.0,sum));\n      }\n  };\n  //***************************************************************************\n\n\n  //***************************************************************************\n  class WSTAtomicBasisFunctor : public FunctionFunctorInterface<double_complex,3> {\n  private:\n      const AtomicBasisFunction aofunc;\n      double L;\n      double kx, ky, kz;\n\n      std::vector<coord_3d> specialpt;\n  public:\n      WSTAtomicBasisFunctor(const AtomicBasisFunction& aofunc, double L, double kx, double ky, double kz)\n          : aofunc(aofunc), L(L), kx(kx), ky(ky), kz(kz)\n      {\n        double x, y, z;\n          aofunc.get_coords(x,y,z);\n          coord_3d r;\n          r[0]=x; r[1]=y; r[2]=z;\n          specialpt=std::vector<coord_3d>(1,r);\n      }\n\n      ~WSTAtomicBasisFunctor() {}\n\n      double_complex operator()(const coord_3d& x) const {\n          double_complex sum = 0.0;\n          const int R = 1;\n          const double_complex I = double_complex(0.0,1.0);\n          for (int i=-R; i<=+R; i++) {\n              double xx = x[0]+i*L;\n              for (int j=-R; j<=+R; j++) {\n                  double yy = x[1]+j*L;\n                  for (int k=-R; k<=+R; k++) {\n                      double zz = x[2]+k*L;\n                      sum += -exp(-I*(kx*xx+ky*yy+kz*zz+constants::pi/2))*aofunc(xx, yy, zz);\n                      //print(kx,ky,kz,exp(-I*(kx*xx+ky*yy+kz*zz+constants::pi/2)),aofunc(xx, yy, zz));\n                  }\n              }\n          }\n          return sum;\n      }\n\n      std::vector<coord_3d> special_points() const {return specialpt;}\n  };\n  //***************************************************************************\n\n\n  /// A MADNESS functor to compute either x, y, or z\n  //***************************************************************************\n  class DipoleFunctor : public FunctionFunctorInterface<double,3> {\n  private:\n      const int axis;\n  public:\n      DipoleFunctor(int axis) : axis(axis) {}\n      double operator()(const coordT& x) const {\n          return x[axis];\n      }\n      virtual ~DipoleFunctor() {}\n  };\n  //***************************************************************************\n\n  /*!\n   \\ingroup periodic_solver\n\n   \\brief The SubspaceK class is a container class holding previous orbitals\n   and residuals.\n   \\par\n   The Solver class uses the Krylov Accelerated Inexact Newton Solver (KAIN)\n   accelerate the convergence a given calculation. The KAIN solver needs to\n   store a subspace of previous orbitals and residuals. In the case is this\n   implementation, the orbitals are store according to which k-point to which\n   they belong.\n  */\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class SubspaceK\n  {\n    // Typedef's\n    typedef std::complex<T> valueT;\n    typedef Function<valueT,NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n    typedef std::pair<vecfuncT,vecfuncT> pairvecfuncT;\n    typedef std::vector<pairvecfuncT> subspaceT;\n    typedef Tensor<valueT> tensorT;\n    typedef std::vector<tensorT> vectensorT;\n    typedef std::vector<subspaceT> vecsubspaceT;\n\n    //*************************************************************************\n    World& _world;\n    //*************************************************************************\n\n    //*************************************************************************\n    vectensorT _Q;\n    //*************************************************************************\n\n    //*************************************************************************\n    vecsubspaceT _subspace;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::vector<KPoint> _kpoints;\n    //*************************************************************************\n\n    //*************************************************************************\n    ElectronicStructureParams _params;\n    //*************************************************************************\n\n    //*************************************************************************\n    double _residual;\n    //*************************************************************************\n\n  public:\n\n    //*************************************************************************\n    SubspaceK(World& world, const ElectronicStructureParams& params,\n            const std::vector<KPoint>& kpoints) : _world(world), _kpoints(kpoints),\n            _params(params)\n    {\n      _residual = 1e6;\n      for (unsigned int kp = 0; kp < _kpoints.size(); kp++)\n      {\n        _Q.push_back(tensorT(1,1));\n        _subspace.push_back(subspaceT());\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void update_subspace(vecfuncT& awfs_new,\n                         vecfuncT& bwfs_new,\n                         const vecfuncT& awfs_old,\n                         const vecfuncT& bwfs_old)\n    {\n      // compute residuals (total)\n      vecfuncT t_rm = sub(_world, awfs_old, awfs_new);\n      if (_params.spinpol)\n      {\n        vecfuncT br = sub(_world, bwfs_old, bwfs_new);\n        t_rm.insert(t_rm.end(), br.begin(), br.end());\n      }\n      std::vector<double> rnvec = norm2<valueT,NDIM>(_world, t_rm);\n      if (_world.rank() == 0)\n      {\n        double rnorm = 0.0;\n        for (unsigned int i = 0; i < rnvec.size(); i++) rnorm += rnvec[i];\n        if (_world.rank() == 0) print(\"residual = \", rnorm);\n        _residual = rnorm;\n      }\n      _world.gop.broadcast(_residual, 0);\n\n      for (unsigned int kp = 0; kp < _kpoints.size(); kp++)\n      {\n        KPoint kpoint = _kpoints[kp];\n\n        vecfuncT k_phisa(awfs_old.begin() + kpoint.begin, awfs_old.begin() + kpoint.end);\n        vecfuncT k_phisb(bwfs_old.begin() + kpoint.begin, bwfs_old.begin() + kpoint.end);\n        vecfuncT k_awfs(awfs_new.begin() + kpoint.begin, awfs_new.begin() + kpoint.end);\n        vecfuncT k_bwfs(bwfs_new.begin() + kpoint.begin, bwfs_new.begin() + kpoint.end);\n\n        // compute residuals for k-point\n        // concatentate up and down spins\n        vecfuncT k_rm = sub(_world, k_phisa, k_awfs);\n        vecfuncT k_vm(k_phisa);\n        if (_params.spinpol)\n        {\n          vecfuncT k_br = sub(_world, k_phisb, k_bwfs);\n          k_rm.insert(k_rm.end(), k_br.begin(), k_br.end());\n          k_vm.insert(k_vm.end(), k_phisb.begin(), k_phisb.end());\n        }\n\n        // Update subspace and matrix Q\n        compress(_world, k_vm, false);\n        compress(_world, k_rm, false);\n        _world.gop.fence();\n        subspaceT k_subspace = _subspace[kp];\n        k_subspace.push_back(pairvecfuncT(k_vm,k_rm));\n\n        int m = k_subspace.size();\n        tensorT ms(m);\n        tensorT sm(m);\n        for (int s = 0; s < m; s++)\n        {\n            const vecfuncT& k_vs = k_subspace[s].first;\n            const vecfuncT& k_rs = k_subspace[s].second;\n            for (unsigned int i = 0; i < k_vm.size(); i++)\n            {\n                ms[s] += k_vm[i].inner_local(k_rs[i]);\n                sm[s] += k_vs[i].inner_local(k_rm[i]);\n            }\n        }\n        _world.gop.sum(ms.ptr(),m);\n        _world.gop.sum(sm.ptr(),m);\n\n        tensorT newQ(m,m);\n        if (m > 1) newQ(Slice(0,-2),Slice(0,-2)) = _Q[kp];\n        newQ(m-1,_) = ms;\n        newQ(_,m-1) = sm;\n\n        _Q[kp] = newQ;\n        if (_world.rank() == 0) print(_Q[kp]);\n\n        // Solve the subspace equations\n        tensorT c;\n        if (_world.rank() == 0) {\n            double rcond = 1e-12;\n            while (1) {\n                c = KAIN(_Q[kp],rcond);\n                if (abs(c[m-1]) < 3.0) {\n                    break;\n                }\n                else if (rcond < 0.01) {\n                    if (_world.rank() == 0)\n                      print(\"Increasing subspace singular value threshold \", c[m-1], rcond);\n                    rcond *= 100;\n                }\n                else {\n                    if (_world.rank() == 0)\n                      print(\"Forcing full step due to subspace malfunction\");\n                    c = 0.0;\n                    c[m-1] = 1.0;\n                    break;\n                }\n            }\n        }\n\n        _world.gop.broadcast_serializable(c, 0);\n        if (_world.rank() == 0) {\n            //print(\"Subspace matrix\");\n            //print(Q);\n            print(\"Subspace solution\", c);\n        }\n\n        // Form linear combination for new solution\n        vecfuncT k_phisa_new = zero_functions_compressed<valueT,NDIM>(_world, k_phisa.size());\n        vecfuncT k_phisb_new = zero_functions_compressed<valueT,NDIM>(_world, k_phisb.size());\n        std::complex<double> one = std::complex<double>(1.0,0.0);\n        unsigned int norbitals = awfs_old.size() / _kpoints.size();\n        for (unsigned int m = 0; m < k_subspace.size(); m++)\n        {\n            const vecfuncT& k_vm = k_subspace[m].first;\n            const vecfuncT& k_rm = k_subspace[m].second;\n            // WSTHORNTON Stopped here!\n            const vecfuncT  vma(k_vm.begin(),k_vm.begin() + norbitals);\n            const vecfuncT  rma(k_rm.begin(),k_rm.begin() + norbitals);\n            const vecfuncT  vmb(k_vm.end() - norbitals, k_vm.end());\n            const vecfuncT  rmb(k_rm.end() - norbitals, k_rm.end());\n\n            gaxpy(_world, one, k_phisa_new, c(m), vma, false);\n            gaxpy(_world, one, k_phisa_new,-c(m), rma, false);\n            gaxpy(_world, one, k_phisb_new, c(m), vmb, false);\n            gaxpy(_world, one, k_phisb_new,-c(m), rmb, false);\n        }\n        _world.gop.fence();\n\n        if (_params.maxsub <= 1) {\n            // Clear subspace if it is not being used\n            k_subspace.clear();\n        }\n        else if (k_subspace.size() == _params.maxsub) {\n            // Truncate subspace in preparation for next iteration\n            k_subspace.erase(k_subspace.begin());\n            _Q[kp] = _Q[kp](Slice(1,-1),Slice(1,-1));\n        }\n        // Save subspace\n        _subspace[kp] = k_subspace;\n\n        for (unsigned int wi = kpoint.begin, fi = 0; wi < kpoint.end;\n          wi++, fi++)\n        {\n          awfs_new[wi] = k_phisa_new[fi];\n          bwfs_new[wi] = k_phisb_new[fi];\n        }\n      }\n    }\n    //*************************************************************************\n\n  };\n\n  /*!\n   \\ingroup periodic_solver\n\n   \\brief The SubspaceK class is a container class holding previous orbitals\n   and residuals.\n   \\par\n   The Solver class uses the Krylov Accelerated Inexact Newton Solver (KAIN)\n   accelerate the convergence a given calculation. The KAIN solver needs to\n   store a subspace of previous orbitals and residuals.\n  */\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class Subspace\n  {\n    // Typedef's\n    typedef std::complex<T> valueT;\n    typedef Function<valueT,NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n    typedef std::pair<vecfuncT,vecfuncT> pairvecfuncT;\n    typedef std::vector<pairvecfuncT> subspaceT;\n    typedef Tensor<valueT> tensorT;\n\n    //*************************************************************************\n    World& _world;\n    //*************************************************************************\n\n    //*************************************************************************\n    tensorT _Q;\n    //*************************************************************************\n\n    //*************************************************************************\n    subspaceT _subspace;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::vector<KPoint> _kpoints;\n    //*************************************************************************\n\n    //*************************************************************************\n    ElectronicStructureParams _params;\n    //*************************************************************************\n\n  public:\n\n    //*************************************************************************\n    Subspace(World& world, const ElectronicStructureParams& params)\n      : _world(world), _params(params)\n    {\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void update_subspace(vecfuncT& awfs_new,\n                         vecfuncT& bwfs_new,\n                         const vecfuncT& awfs_old,\n                         const vecfuncT& bwfs_old,\n                         const vecfuncT& rm)\n    {\n      // concatentate up and down spins\n      vecfuncT vm = awfs_old;\n      if (_params.spinpol)\n      {\n        vm.insert(vm.end(), bwfs_old.begin(), bwfs_old.end());\n      }\n\n      // Update subspace and matrix Q\n      compress(_world, vm, false);\n      compress(_world, rm, false);\n      _world.gop.fence();\n      _subspace.push_back(pairvecfuncT(vm,rm));\n\n      int m = _subspace.size();\n      tensorT ms(m);\n      tensorT sm(m);\n      for (int s=0; s<m; s++)\n      {\n          const vecfuncT& vs = _subspace[s].first;\n          const vecfuncT& rs = _subspace[s].second;\n          for (unsigned int i=0; i<vm.size(); i++)\n          {\n              ms[s] += vm[i].inner_local(rs[i]);\n              sm[s] += vs[i].inner_local(rm[i]);\n          }\n      }\n      _world.gop.sum(ms.ptr(),m);\n      _world.gop.sum(sm.ptr(),m);\n\n      tensorT newQ(m,m);\n      if (m > 1) newQ(Slice(0,-2),Slice(0,-2)) = _Q;\n      newQ(m-1,_) = ms;\n      newQ(_,m-1) = sm;\n\n      _Q = newQ;\n      if (_world.rank() == 0) print(_Q);\n\n      // Solve the subspace equations\n      tensorT c;\n      if (_world.rank() == 0) {\n          double rcond = 1e-12;\n          while (1) {\n              c = KAIN(_Q,rcond);\n              if (abs(c[m-1]) < 3.0) {\n                  break;\n              }\n              else if (rcond < 0.01) {\n                  if (_world.rank() == 0)\n                    print(\"Increasing subspace singular value threshold \", c[m-1], rcond);\n                  rcond *= 100;\n              }\n              else {\n                  if (_world.rank() == 0)\n                    print(\"Forcing full step due to subspace malfunction\");\n                  c = 0.0;\n                  c[m-1] = 1.0;\n                  break;\n              }\n          }\n      }\n\n      _world.gop.broadcast_serializable(c, 0);\n      if (_world.rank() == 0) {\n          //print(\"Subspace matrix\");\n          //print(Q);\n          print(\"Subspace solution\", c);\n      }\n\n      // Form linear combination for new solution\n      vecfuncT phisa_new = zero_functions_compressed<valueT,NDIM>(_world, awfs_old.size());\n      vecfuncT phisb_new = zero_functions_compressed<valueT,NDIM>(_world, bwfs_old.size());\n      std::complex<double> one = std::complex<double>(1.0,0.0);\n      for (unsigned int m=0; m<_subspace.size(); m++) {\n          const vecfuncT& vm = _subspace[m].first;\n          const vecfuncT& rm = _subspace[m].second;\n          const vecfuncT  vma(vm.begin(),vm.begin()+awfs_old.size());\n          const vecfuncT  rma(rm.begin(),rm.begin()+awfs_old.size());\n          const vecfuncT  vmb(vm.end()-bwfs_old.size(), vm.end());\n          const vecfuncT  rmb(rm.end()-bwfs_old.size(), rm.end());\n\n          gaxpy(_world, one, phisa_new, c(m), vma, false);\n          gaxpy(_world, one, phisa_new,-c(m), rma, false);\n          gaxpy(_world, one, phisb_new, c(m), vmb, false);\n          gaxpy(_world, one, phisb_new,-c(m), rmb, false);\n      }\n      _world.gop.fence();\n\n      if (_params.maxsub <= 1) {\n          // Clear subspace if it is not being used\n          _subspace.clear();\n      }\n      else if (_subspace.size() == _params.maxsub) {\n          // Truncate subspace in preparation for next iteration\n          _subspace.erase(_subspace.begin());\n          _Q = _Q(Slice(1,-1),Slice(1,-1));\n      }\n      awfs_new = phisa_new;\n      bwfs_new = phisb_new;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void reproject()\n    {\n      //  //if (_world.rank() == 0)\n      //    //printf(\"\\n\\nreprojecting subspace to wavelet order: %d and thresh: %.5e\\n\\n\",\n      //    //FunctionDefaults<3>::get_k(), FunctionDefaults<3>::get_thresh());\n      //\n      //  unsigned int m = _subspace.size();\n      //  for (unsigned int s = 0; s < m; s++)\n      //  {\n      //      vecfuncT& vs = _subspace[s].first;\n      //      vecfuncT& rs = _subspace[s].second;\n      //      reconstruct(_world, vs);\n      //      reconstruct(_world, rs);\n      //      unsigned int vm = vs.size();\n      //      for (unsigned int i = 0; i < vm; i++)\n      //      {\n      //        vs[i] = madness::project(vs[i], FunctionDefaults<3>::get_k(),\n      //          FunctionDefaults<3>::get_thresh(), false);\n      //        rs[i] = madness::project(rs[i], FunctionDefaults<3>::get_k(),\n      //          FunctionDefaults<3>::get_thresh(), false);\n      //      }\n      //      _world.gop.fence();\n      //      truncate(_world, vs);\n      //      truncate(_world, rs);\n      //      normalize(_world, vs);\n      //  }\n      //  _world.gop.fence();\n\n    }\n    //*************************************************************************\n\n  };\n\n//  template <typename T, int NDIM>\n//  struct lbcost {\n//      double leaf_value;\n//      double parent_value;\n//      lbcost(double leaf_value=1.0, double parent_value=0.0) : leaf_value(leaf_value), parent_value(parent_value) {}\n//      double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n//          if (key.level() <= 1) {\n//              return 100.0*(leaf_value+parent_value);\n//          }\n//          else if (node.is_leaf()) {\n//              return leaf_value;\n//          }\n//          else {\n//              return parent_value;\n//          }\n//      }\n//  };\n\n  //***************************************************************************\n\n  /*! \\ingroup periodic_solver\n      \\brief The main class of the periodic DFT solver\n      \\f[\n      z = frac{x}{1 - y^2}\n      \\f]\n  */\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class Solver\n  {\n    // Typedef's\n    typedef std::complex<T> valueT;\n    typedef Function<T,NDIM> rfunctionT;\n    typedef FunctionFactory<T,NDIM> rfactoryT;\n    typedef Function<valueT,NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n    typedef FunctionFactory<valueT,NDIM> factoryT;\n    typedef Vector<double,NDIM> kvecT;\n    typedef SeparatedConvolution<T,3> operatorT;\n    typedef std::shared_ptr<operatorT> poperatorT;\n    typedef Tensor<double> rtensorT;\n    typedef Tensor<std::complex<double> > ctensorT;\n    typedef Tensor<valueT> tensorT;\n    typedef std::pair<vecfuncT,vecfuncT> pairvecfuncT;\n    typedef std::vector<pairvecfuncT> subspaceT;\n    typedef std::vector<tensorT> vectensorT;\n    typedef std::vector<subspaceT> vecsubspaceT;\n\n    //*************************************************************************\n    World& _world;\n    //*************************************************************************\n\n    //*************************************************************************\n    // This variable could either be a nuclear potiential or a nuclear charge\n    // density depending on the \"ispotential\" boolean variable in the\n    // ElectronicStructureParams class.\n    rfunctionT _vnucrhon;\n    //*************************************************************************\n\n    //*************************************************************************\n    vecfuncT _phisa;\n    //*************************************************************************\n\n    //*************************************************************************\n    vecfuncT _phisb;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::vector<T> _eigsa;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::vector<T> _eigsb;\n    //*************************************************************************\n\n    //*************************************************************************\n    ElectronicStructureParams _params;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::vector<KPoint> _kpoints;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::vector<double> _occsa;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::vector<double> _occsb;\n    //*************************************************************************\n\n    //*************************************************************************\n    rfunctionT _rhoa;\n    //*************************************************************************\n\n    //*************************************************************************\n    rfunctionT _rhob;\n    //*************************************************************************\n\n    //*************************************************************************\n    rfunctionT _rho;\n    //*************************************************************************\n\n    //*************************************************************************\n    rfunctionT _vnuc;\n    //*************************************************************************\n\n    //*************************************************************************\n    SeparatedConvolution<T,NDIM>* _cop;\n    //*************************************************************************\n\n//    //*************************************************************************\n//    vecsubspaceT _subspace;\n//    //*************************************************************************\n//\n//    //*************************************************************************\n//    vectensorT _Q;\n//    //*************************************************************************\n\n    //*************************************************************************\n    Subspace<T,NDIM>* _subspace;\n    //*************************************************************************\n\n    //*************************************************************************\n    MolecularEntity _mentity;\n    //*************************************************************************\n\n    //*************************************************************************\n    double _residual;\n    //*************************************************************************\n\n    //*************************************************************************\n    AtomicBasisSet _aobasis;\n    //*************************************************************************\n\n    //*************************************************************************\n    double _maxthresh;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::ofstream _outputF;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::ofstream _matF;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::ofstream _eigF;\n    //*************************************************************************\n\n    //*************************************************************************\n    std::ofstream _kmeshF;\n    //*************************************************************************\n\n    //*************************************************************************\n    int _it;\n    //*************************************************************************\n\n    //*************************************************************************\n    cvecfuncT _aobasisf;\n    //*************************************************************************\n\n    //*************************************************************************\n    int _nao;\n    //*************************************************************************\n\n  public:\n\n    //*************************************************************************\n    double ttt, sss;\n    void START_TIMER(World& world) {\n        world.gop.fence(); ttt=wall_time(); sss=cpu_time();\n    }\n\n    void END_TIMER(World& world, const char* msg) {\n    ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    Solver(World& world, const std::string& filename) : _world(world)\n    {\n      init(filename);\n      if (_params.periodic) FunctionDefaults<3>::set_bc(BC_PERIODIC);\n      _residual = 1e5;\n      make_nuclear_potential();\n\n      if (_params.restart==0) initial_guess();\n//      for (unsigned int kp = 0; kp < _kpoints.size(); kp++)\n//      {\n//        _Q.push_back(tensorT(1,1));\n//        _subspace.push_back(subspaceT());\n//      }\n      _subspace = new Subspace<T,NDIM>(world, _params);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void init(const std::string& filename)\n    {\n\n      // params\n      if (_world.rank() == 0)\n      {\n        _params.read_file(filename);\n        //_params.fractional = false;\n      }\n      // Send params\n      _world.gop.broadcast_serializable(_params, 0);\n      if (_params.centered)\n        FunctionDefaults<3>::set_cubic_cell(-_params.L/2,_params.L/2);\n      else\n        FunctionDefaults<3>::set_cubic_cell(-_params.L/2,_params.L/2);\n//        FunctionDefaults<3>::set_cubic_cell(0,_params.L);\n      FunctionDefaults<3>::set_thresh(_params.thresh);\n      FunctionDefaults<3>::set_k(_params.waveorder);\n\n      // mentity and aobasis\n      if (_world.rank() == 0)\n      {\n        _aobasis.read_file(_params.basis);\n        _mentity.read_file(filename, _params.fractional);\n        if (_params.centered) _mentity.center();\n      }\n      // Send mentity and aobasis\n      _world.gop.broadcast_serializable(_mentity, 0);\n      _world.gop.broadcast_serializable(_aobasis, 0);\n      // set number of electrons to the total nuclear charge of the mentity\n      _params.nelec = _mentity.total_nuclear_charge();\n      // total number of bands include empty\n      _params.nbands = (_params.nelec/2) + _params.nempty;\n      _params.ncharge = _mentity.total_nuclear_charge();\n      if ((_params.nelec % 2) == 1) _params.nelec++;\n\n      // Open output files\n      _outputF.open(\"output.txt\");\n      _matF.open(\"matrix.txt\");\n      _eigF.open(\"eigs.txt\");\n\n      // kmesh\n      if (_params.restart == 0)\n      {\n        if (_params.periodic) // PERIODIC\n        {\n          // GAMMA POINT\n          if ((_params.ngridk0 == 1) && (_params.ngridk1 == 1) && (_params.ngridk2 == 1))\n          {\n            _kpoints.push_back(KPoint(coordT(0.0), 1.0));\n          }\n          if ((_params.ngridk0 == 0) && (_params.ngridk1 == 0) && (_params.ngridk2 == 0))\n          {\n            double TWO_PI = 2.0 * madness::constants::pi;\n            double t1 = TWO_PI/_params.L;\n            coordT c1 {0.0,0.0,0.0};\n            coordT c2 {0.5*t1,0.5*t1,0.5*t1};\n            _kpoints.push_back(KPoint(c1, 0.5));\n            _kpoints.push_back(KPoint(c2, 0.5));\n          }\n          else // NORMAL BANDSTRUCTURE\n          {\n            _kpoints = genkmesh(_params.ngridk0, _params.ngridk1,\n                                _params.ngridk2, _params.koffset0,\n                                _params.koffset1, _params.koffset2,\n                                _params.L);\n          }\n        }\n        else // NOT-PERIODIC\n        {\n          _kpoints.push_back(KPoint(coordT(0.0), 1.0));\n        }\n        if (_world.rank() == 0)\n        {\n          _kmeshF.open(\"kpoints.txt\");\n          _kmeshF << \"kpts: \" << _kpoints.size() << endl;\n          _kmeshF << \"ik\" << setw(10) << \"kpt\" << setw(30) << \"weight\" << endl;\n          _kmeshF << \"--\" << setw(10) << \"---\" << setw(30) << \"------\" << endl;\n\n          //_kmeshF << setfill('-') << setw(55) << \"-\" << endl;\n          //_kmeshF << setfill(' ') << endl;\n          _kmeshF << endl;\n          for (unsigned int i = 0; i < _kpoints.size(); i++)\n          {\n            KPoint kpoint = _kpoints[i];\n            _kmeshF << i << setw(10) << kpoint.k[0];\n            _kmeshF << setw(10) << kpoint.k[1];\n            _kmeshF << setw(10) << kpoint.k[2];\n            _kmeshF << setw(10) << kpoint.weight << endl;\n          }\n          _kmeshF.close();\n        }\n      }\n      else\n      {\n        load_orbitals();\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    std::vector<KPoint> genkmesh(unsigned int ngridk0, unsigned ngridk1, unsigned int ngridk2,\n                                 double koffset0, double koffset1, double koffset2, double R)\n    {\n      std::vector<KPoint> kmesh;\n      double step0 = 1.0/ngridk0;\n      double step1 = 1.0/ngridk1;\n      double step2 = 1.0/ngridk2;\n      double weight = 1.0/(ngridk0*ngridk1*ngridk2);\n      double TWO_PI = 2.0 * madness::constants::pi;\n      for (unsigned int i = 0; i < ngridk0; i++)\n      {\n        for (unsigned int j = 0; j < ngridk1; j++)\n        {\n          for (unsigned int k = 0; k < ngridk2; k++)\n          {\n            //double k0 = (i*step0 - step0/2) * TWO_PI/R;\n            //double k1 = (j*step1 - step1/2) * TWO_PI/R;\n            //double k2 = (k*step2 - step2/2) * TWO_PI/R;\n            double k0 = ((i*step0)+koffset0) * TWO_PI/R;\n            double k1 = ((j*step1)+koffset1) * TWO_PI/R;\n            double k2 = ((k*step2)+koffset2) * TWO_PI/R;\n            KPoint kpoint(k0, k1, k2, weight);\n            kmesh.push_back(kpoint);\n          }\n        }\n      }\n      return kmesh;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void save_orbitals()\n    {\n      archive::ParallelOutputArchive ar(_world, \"orbitals\", _params.nio);\n      ar & _params.spinpol;\n      ar & (unsigned int)(_kpoints.size());\n      for (unsigned int i = 0; i < _kpoints.size(); i++) ar & _kpoints[i];\n//      ar & (unsigned int)(_occsa.size());\n//      for (unsigned int i = 0; i < _occsa.size(); i++) ar & _occsa[i];\n      ar & (unsigned int)(_phisa.size());\n      for (unsigned int i = 0; i < _phisa.size(); i++) ar & _phisa[i];\n      if (_params.spinpol)\n      {\n//        ar & (unsigned int)(_occsb.size());\n//        for (unsigned int i = 0; i < _occsb.size(); i++) ar & _occsb[i];\n        ar & (unsigned int)(_phisb.size());\n        for (unsigned int i = 0; i < _phisb.size(); i++) ar & _phisb[i];\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void load_orbitals()\n    {\n      const double thresh = FunctionDefaults<3>::get_thresh();\n      const int k = FunctionDefaults<3>::get_k();\n\n      archive::ParallelInputArchive ar(_world, \"orbitals\");\n\n      // spin-polarized\n      bool spinrest;\n      ar & spinrest;\n      // kpoints\n      unsigned int nkpts;\n      ar & nkpts;\n      _kpoints.clear();\n      for (unsigned int i = 0; i < nkpts; i++)\n      {\n        KPoint tkpt;\n        ar & tkpt;\n        _kpoints.push_back(tkpt);\n      }\n      // occs\n//      unsigned int noccs;\n//      ar & noccs;\n//      _occs.clear();\n//      for (unsigned int i = 0; i < noccs; i++)\n//      {\n//        double tocc;\n//        ar & tocc;\n//        _occs.push_back(tocc);\n//      }\n      // orbitals\n      unsigned int norbs;\n      ar & norbs;\n      _phisa.clear();\n      _eigsa.clear();\n      for (unsigned int i = 0; i < norbs; i++)\n      {\n        functionT tfunc;\n        ar & tfunc;\n        _phisa.push_back(tfunc);\n        _eigsa.push_back(-0.1);\n      }\n      // check for k mismatch\n      if (_phisa[0].k() != k)\n      {\n        reconstruct(_world,_phisa);\n        for (unsigned int i = 0; i < _phisa.size(); i++)\n          _phisa[i] = madness::project(_phisa[i], k, thresh, false);\n        _world.gop.fence();\n      }\n      // orthonormalize\n      for (unsigned int i = 0; i < _kpoints.size(); i++)\n        gram_schmidt(_phisa, _kpoints[i]);\n\n      if (_params.spinpol)\n      {\n        _phisb.clear();\n        _eigsb.clear();\n        for (unsigned int i = 0; i < norbs; i++)\n        {\n          functionT tfunc;\n          ar & tfunc;\n          _phisb.push_back(tfunc);\n          _eigsb.push_back(-0.1);\n        }\n        // check for k mismatch\n        if (_phisb[0].k() != k)\n        {\n          reconstruct(_world,_phisb);\n          for (unsigned int i = 0; i < _phisb.size(); i++)\n            _phisb[i] = madness::project(_phisb[i], k, thresh, false);\n          _world.gop.fence();\n        }\n        // orthonormalize\n        for (unsigned int i = 0; i < _kpoints.size(); i++)\n          gram_schmidt(_phisb, _kpoints[i]);\n      }\n      else\n      {\n        for (unsigned int i = 0; i < norbs; i++)\n        {\n          _phisb.push_back(_phisa[i]);\n          _eigsb.push_back(_eigsa[i]);\n        }\n      }\n      // create vector for occupation numbers\n      _occsa = std::vector<double>(norbs, 0.0);\n      _occsb = std::vector<double>(norbs, 0.0);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void make_nuclear_potential_impl()\n    {\n      _vnucrhon = rfactoryT(_world).functor(rfunctorT(new MolecularPotentialFunctor(_mentity))).thresh(_params.thresh * 0.1).truncate_on_project();\n      _vnuc = copy(_vnucrhon);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void make_nuclear_charge_density_impl()\n    {\n      std::vector<coordT> specialpts;\n      for (int i = 0; i < _mentity.natom(); i++)\n      {\n        coordT pt(0.0);\n        Atom atom = _mentity.get_atom(i);\n        pt[0] = atom.x; pt[1] = atom.y; pt[2] = atom.z;\n        specialpts.push_back(pt);\n        if (_world.rank() == 0) print(\"Special point: \", pt);\n      }\n      double now = wall_time();\n      std::cout << \"THE FUNCTOR IS \" << MolecularNuclearChargeDensityFunctor(_mentity, _params.L, _params.periodic, specialpts)(specialpts[0]) << endl;\n      // WSTHORNTON\n      //MADNESS_ASSERT(false);\n\n\n      _vnucrhon = rfactoryT(_world).functor(\n          rfunctorT(new MolecularNuclearChargeDensityFunctor(_mentity, _params.L, _params.periodic, specialpts))).\n          thresh(_params.thresh).initial_level(6).truncate_on_project();\n\n      if (_world.rank() == 0) printf(\"%f\\n\", wall_time() - now);\n      if (_world.rank() == 0) print(\"calculating trace of rhon ..\\n\\n\");\n      double rtrace = _vnucrhon.trace();\n      if (_world.rank() == 0) print(\"rhon trace = \", rtrace);\n      now = wall_time();\n      _vnucrhon.truncate();\n      _vnuc = apply(*_cop, _vnucrhon);\n      if (_world.rank() == 0) printf(\"%f\\n\", wall_time() - now);\n      if (_world.rank() == 0) print(\"Done creating nuclear potential ..\\n\");\n\n\n      // WSTHORNTON\n      rfunctionT vnuc2 = rfactoryT(_world).functor(rfunctorT(new\n          MolecularPotentialFunctor(_mentity))).\n          thresh(_params.thresh * 0.1).truncate_on_project();\n      rfunctionT vnucdiff = _vnuc-vnuc2;\n      double t1 = vnucdiff.trace();\n      if (_world.rank() == 0) printf(\"Difference in nuclear potential: %15.8f\\n\\n\", t1);\n      for (int i = 0; i < 101; i++)\n      {\n        double dx = _params.L/100;\n        double pt2 = -_params.L/2 + dx*i;\n        coordT cpt(pt2);\n        double val = vnucdiff(cpt);\n        if (_world.rank() == 0) printf(\"%10.5f    %15.8f\\n\",pt2,val);\n      }\n      //MADNESS_ASSERT(false);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void make_nuclear_potential()\n    {\n      // Make coulomb operator\n      _cop = CoulombOperatorPtr(_world, _params.lo, FunctionDefaults<3>::get_thresh() * 0.1);\n\n      Tensor<double> csize = FunctionDefaults<3>::get_cell();\n      if (_world.rank() == 0)\n      {\n        printf(\"Cell parameters\\n\");\n        printf(\"------------------------------\\n\");\n        print(\"cell(x) is \",csize(0,0), csize(0,1));\n        print(\"cell(y) is \",csize(1,0), csize(1,1));\n        print(\"cell(z) is \",csize(2,0), csize(2,1));\n        printf(\"\\n\");\n      }\n      if (_params.ispotential) // potential\n      {\n        make_nuclear_potential_impl();\n      }\n      else // charge density\n      {\n        make_nuclear_charge_density_impl();\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    struct GuessDensity : public FunctionFunctorInterface<double,3> {\n        const MolecularEntity& mentity;\n        const AtomicBasisSet& aobasis;\n        double R;\n        const bool periodic;\n\n        double operator()(const coordT& x) const\n        {\n          double value = 0.0;\n          if (periodic)\n          {\n            for (int xr = -2; xr <= 2; xr += 1)\n            {\n              for (int yr = -2; yr <= 2; yr += 1)\n              {\n                for (int zr = -2; zr <= 2; zr += 1)\n                {\n                  value += aobasis.eval_guess_density(mentity,\n                      x[0]+xr*R, x[1]+yr*R, x[2]+zr*R);\n                }\n              }\n            }\n          }\n          else\n          {\n            value = aobasis.eval_guess_density(mentity, x[0], x[1], x[2]);\n          }\n          return value;\n        }\n\n        GuessDensity(const MolecularEntity& mentity, const AtomicBasisSet& aobasis,\n            const double& R, const bool& periodic)\n        : mentity(mentity), aobasis(aobasis), R(R), periodic(periodic) {}\n    };\n    //*************************************************************************\n\n    //*************************************************************************\n    template <typename Q>\n    void test_periodicity(const Function<Q,3>& f)\n    {\n      int npts = 101;\n      double eps = 1e-8;\n      coordT r(0.0);\n      double delta = _params.L/(npts-1);\n      double begin = -_params.L/2;\n      double end = _params.L/2;\n      double tol = 1e-6;\n      // x-axis\n      printf(\"periodicity along x-axis:  \\n\");\n      printf(\"-------------------------------------------------------------\\n\\n\");\n      for (int i = 0; i < npts; i++)\n      {\n        printf(\"\\n-------------------- edge --------------------\\n\");\n        for (int j = 0; j < npts; j++)\n        {\n          coordT r1, r2, dr1, dr2;\n          r1[0] = begin+eps; r1[1] = (i*delta)+begin; r1[2] = (j*delta)+begin;\n          r2[0] = end-eps; r2[1] = (i*delta)+begin; r2[2] = (j*delta)+begin;\n          dr1[0] = begin+2*eps; dr1[1] = (i*delta)+begin; dr1[2] = (j*delta)+begin;\n          dr2[0] = end-2*eps; dr2[1] = (i*delta)+begin; dr2[2] = (j*delta)+begin;\n          double val = std::abs(f(r1)-f(r2));\n          std::string success = val < tol ? \"PASS!\" : \"FAIL!\";\n          printf(\"%10.6f%10.6f%10.6f  %10.6f%10.6f%10.6f  %10.5e   %s\\n\",\n              r1[0],r1[1],r1[2],r2[0],r2[1],r2[2],val,success.c_str());\n        }\n      }\n      // y-axis\n      printf(\"\\nperiodicity along y-axis:  \\n\");\n      printf(\"-------------------------------------------------------------\\n\\n\");\n      for (int i = 0; i < npts; i++)\n      {\n        printf(\"\\n-------------------- edge --------------------\\n\");\n        for (int j = 0; j < npts; j++)\n        {\n          coordT r1, r2, dr1, dr2;\n          r1[0] = (i*delta)+begin; r1[1] = begin+eps; r1[2] = (j*delta)+begin;\n          r2[0] = (i*delta)+begin; r2[1] = end-eps; r2[2] = (j*delta)+begin;\n          dr1[0] = (i*delta)+begin; dr1[1] = begin+2*eps; dr1[2] = (j*delta)+begin;\n          dr2[0] = (i*delta)+begin; dr2[1] = end-2*eps; dr2[2] = (j*delta)+begin;\n          double val = std::abs(f(r1)-f(r2));\n          std::string success = val < tol ? \"PASS!\" : \"FAIL!\";\n          printf(\"%10.6f%10.6f%10.6f  %10.6f%10.6f%10.6f  %10.5e   %s\\n\",\n              r1[0],r1[1],r1[2],r2[0],r2[1],r2[2],val,success.c_str());\n        }\n      }\n      // z-axis\n      printf(\"\\nperiodicity along z-axis:  \\n\");\n      printf(\"-------------------------------------------------------------\\n\\n\");\n      for (int i = 0; i < npts; i++)\n      {\n        printf(\"\\n-------------------- edge --------------------\\n\");\n        for (int j = 0; j < npts; j++)\n        {\n          coordT r1, r2, dr1, dr2;\n          r1[0] = (i*delta)+begin; r1[1] = (j*delta)+begin; r1[2] = begin+eps;\n          r2[0] = (i*delta)+begin; r2[1] = (j*delta)+begin; r2[2] = end-eps;\n          dr1[0] = (i*delta)+begin; dr1[1] = (j*delta)+begin; dr1[2] = begin+2*eps;\n          dr2[0] = (i*delta)+begin; dr2[1] = (j*delta)+begin; dr2[2] = end-2*eps;\n          double val = std::abs(f(r1)-f(r2));\n          std::string success = val < tol ? \"PASS!\" : \"FAIL!\";\n          printf(\"%10.6f%10.6f%10.6f  %10.6f%10.6f%10.6f  %10.5e   %s\\n\",\n              r1[0],r1[1],r1[2],r2[0],r2[1],r2[2],val,success.c_str());\n        }\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    rfunctionT\n    make_lda_potential(World& world,\n                       const rfunctionT& arho,\n                       const rfunctionT& brho,\n                       const rfunctionT& adelrhosq,\n                       const rfunctionT& bdelrhosq)\n    {\n  //      MADNESS_ASSERT(!_params.spinpol);\n        rfunctionT vlda = copy(arho);\n//        vlda.unaryop(&::libxc_ldaop<double>);\n        vlda.unaryop(&::ldaop<double>);\n        return vlda;\n    }\n\n    vecfuncT project_ao_basis(World& world, KPoint kpt) {\n        vecfuncT ao(_aobasis.nbf(_mentity));\n\n//        Level initial_level = 3;\n//        for (int i=0; i < _aobasis.nbf(_mentity); i++) {\n//          functorT aofunc(new AtomicBasisFunctor(_aobasis.get_atomic_basis_function(_mentity,i),\n//              _params.L, _params.periodic, kpt));\n//            ao[i] = factoryT(world).functor(aofunc).initial_level(initial_level).truncate_on_project().nofence();\n//        }\n//        world.gop.fence();\n\n//        WSTAtomicBasisFunctor aofunc(_aobasis.get_atomic_basis_function(_mentity,4),\n//            _params.L, kpt.k[0], kpt.k[1], kpt.k[2]);\n//        coord_3d p(5e-2);\n//        double_complex val = aofunc(p);\n//        print(\"AO_PROJECT: val is \", val);\n//        MADNESS_ASSERT(false);\n\n        for (int i=0; i < _aobasis.nbf(_mentity); i++) {\n          functorT aofunc(new WSTAtomicBasisFunctor(_aobasis.get_atomic_basis_function(_mentity,i),\n              _params.L, kpt.k[0], kpt.k[1], kpt.k[2]));\n            ao[i] = factoryT(world).functor(aofunc).truncate_on_project().truncate_mode(0);\n        }\n        world.gop.fence();\n\n//        std::vector<double> norms;\n//        norms = norm2s(world, ao);\n//        for (int i=0; i<_aobasis.nbf(_mentity); i++) {\n//            if (world.rank() == 0 && fabs(norms[i]-1.0)>1e-3) print(i,\" bad ao norm?\", norms[i]);\n//            norms[i] = 1.0/norms[i];\n//        }\n//\n//        scale(world, ao, norms);\n//        norms = norm2s(world, ao);\n//        for (int i=0; i<_aobasis.nbf(_mentity); i++) {\n//            if (world.rank() == 0 && fabs(norms[i]-1.0)>1e-3) print(i,\" bad ao norm?\", norms[i]);\n//            norms[i] = 1.0/norms[i];\n//        }\n//        scale(world, ao, norms);\n\n        return ao;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    // Constructor\n    Solver(World& world,\n           rfunctionT vnucrhon,\n           vecfuncT phisa,\n           vecfuncT phisb,\n           std::vector<T> eigsa,\n           std::vector<T> eigsb,\n           ElectronicStructureParams params,\n           MolecularEntity mentity)\n       : _world(world), _vnucrhon(vnucrhon), _phisa(phisa), _phisb(phisb),\n       _eigsa(eigsa), _eigsb(eigsb), _params(params), _mentity(mentity)\n    {\n      _residual = 1e5;\n      _cop = CoulombOperatorPtr(const_cast<World&>(world), params.lo, params.thresh * 0.1);\n\n      if (params.ispotential)\n      {\n        _vnuc = copy(_vnucrhon);\n      }\n      else\n      {\n        _vnuc = apply(*_cop, _vnucrhon);\n      }\n    }\n    //*************************************************************************\n\n    /// Initializes alpha and beta mos, occupation numbers, eigenvalues\n    //*************************************************************************\n    void initial_guess()\n    {\n      // Get initial guess for the electronic density\n      if (_world.rank() == 0) print(\"Guessing rho ...\\n\\n\");\n\n      rfunctionT rho = rfactoryT(_world);\n      if (_params.restart == 0)\n      {\n        rho = rfactoryT(_world).functor(rfunctorT(new GuessDensity(_mentity,\n              _aobasis, _params.L, _params.periodic))).initial_level(3);\n      }\n      else\n      {\n        MADNESS_EXCEPTION(\"restart not working right now!\",0);\n      }\n      // This is a cheat\n      rho.scale(_params.ncharge/rho.trace());\n\n      char fname3[25];\n      coord_3d rp1(-_params.L/2);\n      coord_3d rp2(_params.L/2);\n      plot_line(fname3,101,rp1,rp2,rho);\n\n      // load balance\n      //if(_world.size() > 1) {\n      //    START_TIMER(_world);\n      //    LoadBalanceDeux<3> lb(_world);\n      //    lb.add_tree(_vnuc, lbcost<double,3>(1.0, 0.0), false);\n      //    lb.add_tree(rho, lbcost<double,3>(1.0, 1.0), true);\n\n      //    FunctionDefaults<3>::redistribute(_world, lb.load_balance(6.0));\n      //}\n\n      if (_params.restart != 1)\n      {\n        // build effective potential\n        rfunctionT vlocal;\n        // Is this a many-body system?\n        if (_params.ncharge > 1.0)\n        {\n          if (_world.rank() == 0) print(\"Creating Coulomb op ...\\n\\n\");\n          SeparatedConvolution<double, 3>* op = 0;\n          // Is this system periodic?\n          if (_params.periodic)\n          {\n            Tensor<double> cellsize = FunctionDefaults<3>::get_cell_width();\n            //op = PeriodicCoulombOpPtr<double, 3> (_world, _params.waveorder,\n            //    _params.lo, _params.thresh * 0.1, cellsize);\n            op = CoulombOperatorPtr(_world, _params.lo, _params.thresh * 0.1);\n          }\n          else\n          {\n            op = CoulombOperatorPtr(_world, _params.lo, _params.thresh * 0.1);\n          }\n          if (_world.rank() == 0) print(\"Building effective potential ...\\n\\n\");\n          rfunctionT vc = apply(*op, rho);\n          vlocal = _vnuc + vc; //.scale(1.0-1.0/nel); // Reduce coulomb to increase binding\n          rho.scale(0.5);\n          // WSTHORNTON\n          _rhoa = rho;\n          _rhob = rho;\n          // Do the LDA\n          rfunctionT vlda = make_lda_potential(_world, rho, rho, rfunctionT(), rfunctionT());\n          vlocal = vlocal + vlda;\n          delete op;\n        }\n        else\n        {\n          vlocal = _vnuc;\n        }\n\n        // Clear these functions\n//        rho.clear();\n        vlocal.reconstruct();\n\n        // Get size information from k-points and ao_basis so that we can correctly size\n        // the _orbitals data structure and the eigs tensor\n        // number of orbitals in the basis set\n        int _nao = _aobasis.nbf(_mentity);\n\n        // number of kpoints\n        int nkpts = _kpoints.size();\n        // total number of orbitals to be processed (no symmetry)\n        int norbs = _params.nbands * nkpts;\n        // Check to see if the basis set can accomodate the number of bands\n        if (_params.nbands > _nao)\n          MADNESS_EXCEPTION(\"Error: basis not large enough to accomodate number of bands\", _nao);\n        // set the number of orbitals\n        _eigsa = std::vector<double>(norbs, 0.0);\n        _eigsb = std::vector<double>(norbs, 0.0);\n        _occsa = std::vector<double>(norbs, 0.0);\n        _occsb = std::vector<double>(norbs, 0.0);\n        if (_world.rank() == 0) print(\"Building kinetic energy matrix ...\\n\\n\");\n        // Need to do kinetic piece for every k-point\n        for (int ki = 0; ki < nkpts; ki++)\n        {\n          // These are our initial basis functions\n          if (_world.rank() == 0) print(\"Projecting atomic orbitals ...\\n\\n\");\n          START_TIMER(_world);\n          cvecfuncT ao = project_ao_basis(_world, _kpoints[ki]);\n          END_TIMER(_world, \"projecting atomic orbital basis\");\n//          for (unsigned int iao = 0; iao < _nao; iao)\n//          {\n//            _aobasisf.push_back(ao[iao]);\n//          }\n\n          for (unsigned int ai = 0; ai < ao.size(); ai++)\n          {\n            std::vector<long> npt(3,101);\n            char fnamedx[50];\n            sprintf(fnamedx, \"aofunc_k_%2.2d__%2.2d__.dx\",ki,ai);\n            std::vector<long> npt2(3,101);\n            plotdx(ao[ai], fnamedx, FunctionDefaults<3>::get_cell(), npt2);\n          }\n\n          coord_3d p1(-_params.L/2);\n          coord_3d p2(_params.L/2);\n          for (int i = 0; i < ao.size(); i++)\n          {\n            char fname[25];\n            sprintf(fname, \"ao_line_%d.txt\",i);\n            plot_line(fname,101,p1,p2,ao[i]);\n          }\n          char fname2[25];\n          sprintf(fname2, \"vnuc_line.txt\");\n          plot_line(fname2,101,p1,p2,_vnuc);\n          char fname3[25];\n          sprintf(fname3, \"vlocal_line.txt\");\n          plot_line(fname3,101,p1,p2,vlocal);\n\n\n          // load balancing\n          //if(_world.size() > 1)\n          //{\n          //  LoadBalanceDeux<3> lb(_world);\n          //  lb.add_tree(_vnuc, lbcost<double,3>(1.0, 1.0), false);\n          //  for(unsigned int i = 0; i < ao.size(); i++)\n          //  {\n          //      lb.add_tree(ao[i], lbcost<valueT,3>(1.0, 1.0), false);\n          //  }\n\n          //  FunctionDefaults<3>::redistribute(_world, lb.load_balance(6.0));\n          //}\n\n          // Get k-point from list\n          KPoint& kpoint = _kpoints[ki];\n\n\n\n\n          // WSTHORNTON\n//          ctensorT S = matrix_inner(_world,ao,ao,true);\n//          print(S);\n//          ctensorT U = csqrt(S);\n//          ao = transform(_world, ao, U, _params.thresh, true);\n\n\n\n\n          // Build kinetic matrx\n          //ctensorT kinetic = ::kinetic_energy_matrix_slow<T,NDIM>(_world, ao, _params.periodic, kpt);\n          ctensorT kinetic = ::kinetic_energy_matrix_slow<T,NDIM>(_world, ao, _params.periodic, kpoint);\n          // Build the overlap matrix\n          if (_world.rank() == 0) print(\"Building overlap matrix ...\\n\\n\");\n          ctensorT overlap = matrix_inner(_world, ao, ao, true);\n          // Build the potential matrix\n          reconstruct(_world, ao);\n          if (_world.rank() == 0) print(\"Building potential energy matrix ...\\n\\n\");\n          //cvecfuncT vpsi = mul_sparse(_world, vlocal, ao, _params.thresh);\n          cvecfuncT vpsi;\n          for (int i = 0; i < ao.size(); i++)\n            vpsi.push_back(vlocal*ao[i]);\n          _world.gop.fence();\n          compress(_world, vpsi);\n          truncate(_world, vpsi);\n          compress(_world, ao);\n          // Build the potential matrix\n          ctensorT potential = matrix_inner(_world, vpsi, ao, true);\n          _world.gop.fence();\n          // free memory\n          vpsi.clear();\n          _world.gop.fence();\n\n          // Construct and diagonlize Fock matrix\n          ctensorT fock = potential + kinetic;\n          ctensorT fockzero = fock-conj_transpose(fock);\n          if (_world.rank() == 0)\n          {\n            print(\"Kinetic:\");\n            print(kinetic);\n            print(\"Potential:\");\n            print(potential);\n            print(\"Fock: (pre-symmetrized)\");\n            print(fock);\n            print(\"FockZero: (should be zero)\");\n            print(fockzero);\n            print(\"Overlap:\");\n            print(overlap);\n          }\n          fock = 0.5 * (fock + conj_transpose(fock));\n          for (unsigned int i = 0; i < fock.dim(0); i++)\n          {\n            fock(i,i) += i*_params.thresh*0.1;\n          }\n\n          ctensorT c; rtensorT e;\n          sygv(fock, overlap, 1, c, e);\n\n          // diagonlize kinetic\n          ctensorT ck; rtensorT ek;\n          sygv(kinetic, overlap, 1, ck, ek);\n          // diagonalize potential\n          ctensorT cp; rtensorT ep;\n          sygv(potential, overlap, 1, cp, ep);\n          // diagonalize overlap\n          ctensorT co; rtensorT eo;\n          syev(overlap, co, eo);\n\n          if (_world.rank() == 0)\n          {\n            print(\"fock eigenvectors dims:\",c.dim(0),c.dim(1));\n            print(\"fock eigenvectors:\");\n            print(c);\n          }\n\n          if (_world.rank() == 0)\n          {\n            print(\"kinetic eigenvalues\");\n            print(ek);\n          }\n\n          if (_world.rank() == 0)\n          {\n            print(\"potential eigenvalues\");\n            print(ep);\n          }\n\n          if (_world.rank() == 0)\n          {\n            print(\"overlap eigenvalues\");\n            print(eo);\n          }\n          if (_world.rank() == 0)\n          {\n            print(\"fock eigenvalues\");\n            print(e);\n          }\n\n          if (_world.rank() == 0)\n          {\n            printf(\"Overlap: \\n\");\n            for (int i = 0; i < overlap.dim(0); i++)\n                {\n                    for (int j = 0; j < overlap.dim(1); j++)\n                        {\n                            printf(\"%10.5f\", real(overlap(i,j)));\n                        }\n                    printf(\"\\n\");\n                }\n            printf(\"\\n\");\n            printf(\"\\n\");\n          }\n\n          compress(_world, ao);\n          _world.gop.fence();\n          // Take linear combinations of the gaussian basis orbitals as the starting\n          // orbitals for solver\n          vecfuncT tmp_orbitals = transform(_world, ao, c(_, Slice(0, _nao - 1)));\n\n//          tmp_orbitals[0] = ao[0];\n//          tmp_orbitals[1] = ao[1];\n//          tmp_orbitals[2] = ao[2];\n//          tmp_orbitals[3] = ao[3];\n//          tmp_orbitals[4] = ao[4];\n\n          // WSTHORNTON\n          // checking the symmetry\n//          int npts = 101;\n//          double delta = _params.L/(npts-1);\n//          double begin = -_params.L/2;\n//          double end = _params.L/2;\n//          double tol = 1e-6;\n//\n//          for (int i = 0; i < npts; i++)\n//          {\n//            double x = (i*delta)+begin;\n//            for (int j = 0; j < npts; j++)\n//            {\n//              double y = (j*delta)+begin;\n//              for (int k = 0; k < npts; k++)\n//              {\n//                double z = (k*delta)+begin;\n//                coord_3d r1 {x,y,z};\n//                coord_3d r2 {y,x,z};\n//                coord_3d r3 {z,y,x};\n//                coord_3d r4 {x,z,y};\n//                double_complex pxr2 = ao[2](r2); double_complex pyr1 = ao[3](r1);\n//                double_complex pxr3 = ao[2](r3); double_complex pzr1 = ao[4](r1);\n//                double_complex pyr4 = ao[3](r4);\n//                double err_xy = std::abs(pxr2-pyr1);\n//                double err_xz = std::abs(pxr3-pzr1);\n//                std::string success = err_xy < tol ? \"PASS!\" : \"FAIL!\";\n//                printf(\"%10.4e + %10.4e     %10.4e + %10.4e     %15.8e\\n     %s\\n\",\n//                    std::real(pxr2), std::imag(pxr2), std::real(pyr1), std::imag(pyr1),\n//                    err_xy, success.c_str());\n//              }\n//            }\n//          }\n\n//          MADNESS_ASSERT(false);\n\n          // WSTHORNTON\n//          const double PI_OVER_8 = madness::constants::pi/8;\n//          SeparatedConvolution<double,3> op = CoulombOperator(_world, _params.lo, _params.thresh * 0.1);\n//          rfunctionT vlda = make_lda_potential(_world, rho, rho, rfunctionT(), rfunctionT());\n//          rho.scale(2.0);\n//          rfunctionT vc2 = apply(op,rho);\n//          double rtr2 = rho.trace();\n//          rfunctionT vlocal2 = vc2 + _vnuc;\n//\n//          SeparatedConvolution<double,3> op2 = CoulombOperator(_world, _params.lo, _params.thresh * 0.1);\n//          SeparatedConvolution<double,3> bshop = BSHOperator3D(_world, -0.2, _params.lo, _params.thresh * 0.1);\n\n\n//          if (_world.rank() == 0)\n//          {\n//            print(\"trace of rho:\");\n//            print(rtr2);\n//          }\n//          for (int i = 0; i < 5; i++)\n//          {\n//            double th = i*PI_OVER_8;\n//            tmp_orbitals[2] = ao[2];\n//            tmp_orbitals[3] = cos(th)*ao[3] + sin(th)*ao[4];\n//            tmp_orbitals[4] = -sin(th)*ao[3] + cos(th)*ao[4];\n//\n//            ctensorT fred(3,3);\n//            for (int ii = 2; ii < 5; ii++)\n//            {\n//              for (int jj = 2; jj < 5; jj++)\n//              {\n//                fred(ii-2,jj-2) = inner(tmp_orbitals[ii], _vnuc*tmp_orbitals[jj]);\n//                if (std::abs(fred(ii-2,jj-2)) < 1e-6)\n//                  fred(ii-2,jj-2) = std::complex<double>(0.0,0.0);\n//\n//              }\n//            }\n\n//            complex_derivative_3d Dx(_world,0);\n//            complex_derivative_3d Dy(_world,1);\n//            complex_derivative_3d Dz(_world,2);\n//\n//            ctensorT fred(3,3);\n//            std::complex<double> I = std::complex<double>(0.0,1.0);\n//            std::complex<double> one = std::complex<double>(1.0,0.0);\n//            for (int ii = 2; ii < 5; ii++)\n//            {\n//              for (int jj = 2; jj < 5; jj++)\n//              {\n//                double ksq = kpoint.k[0]*kpoint.k[0] +\n//                    kpoint.k[1]*kpoint.k[1] +\n//                    kpoint.k[2]*kpoint.k[2];\n//\n//                cfunctionT ct1 = -I*kpoint.k[0]*Dx(tmp_orbitals[jj]) -\n//                  I*kpoint.k[1]*Dy(tmp_orbitals[jj]) -\n//                  I*kpoint.k[2]*Dz(tmp_orbitals[jj]);\n//\n//                cfunctionT ct2 = -0.5*Dx(Dx(tmp_orbitals[jj])) +\n//                    Dy(Dy(tmp_orbitals[jj])) +\n//                    Dz(Dz(tmp_orbitals[jj]));\n//\n//                cfunctionT ct3 = 0.5*ksq*tmp_orbitals[jj];\n//\n//                fred(ii-2,jj-2) = inner(tmp_orbitals[ii], ct1+ct2+ct3);\n//                if (std::abs(fred(ii-2,jj-2)) < 1e-6)\n//                  fred(ii-2,jj-2) = std::complex<double>(0.0,0.0);\n//              }\n//            }\n\n//            ctensorT cf; rtensorT ef;\n//            syev(fred, cf, ef);\n//\n//            if (_world.rank() == 0)\n//            {\n//                print(\"Fred:\", i);\n//                print(fred);\n//                print(\"eigenvalues:\");\n//                print(ef);\n//                print(\"eigenvectors:\");\n//                print(cf);\n//            }\n//          }\n//          MADNESS_ASSERT(false);\n\n\n          _world.gop.fence();\n          truncate(_world, tmp_orbitals);\n          normalize(_world, tmp_orbitals);\n\n          // Build the overlap matrix\n          if (_world.rank() == 0) print(\"Building overlap matrix ...\\n\\n\");\n          ctensorT overlap2 = matrix_inner(_world, tmp_orbitals, tmp_orbitals, true);\n\n          rtensorT tmp_eigs = e(Slice(0, _nao - 1));\n\n          if (_world.rank() == 0) printf(\"(%8.4f,%8.4f,%8.4f)\\n\",kpoint.k[0], kpoint.k[1], kpoint.k[2]);\n          if (_world.rank() == 0) print(tmp_eigs);\n          if (_world.rank() == 0) print(\"\\n\");\n\n          //if (_world.rank() == 0) print(\"kinetic energy for kp = \", kp);\n          //if (_world.rank() == 0) print(kinetic);\n          //if (_world.rank() == 0) print(\"\\n\");\n\n          // DEBUG\n          if (_world.rank() == 0) {\n              printf(\"Overlap: \\n\");\n              for (int i = 0; i < kinetic.dim(0); i++)\n                  {\n                      for (int j = 0; j < kinetic.dim(1); j++)\n                          {\n                              printf(\"%10.5f\", real(overlap(i,j)));\n                          }\n                      printf(\"\\n\");\n                  }\n              printf(\"\\n\");\n              printf(\"\\n\");\n\n              printf(\"Kinetic: \\n\");\n              for (int i = 0; i < kinetic.dim(0); i++)\n                  {\n                      for (int j = 0; j < kinetic.dim(1); j++)\n                          {\n                              printf(\"%10.5f\", real(kinetic(i,j)));\n                          }\n                      printf(\"\\n\");\n                  }\n              printf(\"\\n\");\n              printf(\"\\n\");\n\n              printf(\"V: \\n\");\n              for (int i = 0; i < potential.dim(0); i++)\n                  {\n                      for (int j = 0; j < potential.dim(1); j++)\n                          {\n                              printf(\"%10.5f\", real(potential(i,j)));\n                          }\n                      printf(\"\\n\");\n                  }\n              printf(\"\\n\");\n              printf(\"\\n\");\n\n              printf(\"Fock: \\n\");\n              for (int i = 0; i < fock.dim(0); i++)\n                  {\n                      for (int j = 0; j < fock.dim(1); j++)\n                          {\n                              printf(\"%10.5f\", real(fock(i,j)));\n                          }\n                      printf(\"\\n\");\n                  }\n              printf(\"\\n\");\n              printf(\"\\n\");\n\n              printf(\"New overlap: \\n\");\n              for (int i = 0; i < overlap2.dim(0); i++)\n                  {\n                      for (int j = 0; j < overlap2.dim(1); j++)\n                          {\n                              printf(\"%10.5f\", real(overlap2(i,j)));\n                          }\n                      printf(\"\\n\");\n                  }\n              printf(\"\\n\");\n              printf(\"\\n\");\n          }\n\n          // Fill in orbitals and eigenvalues\n          kpoint.begin = ki*_params.nbands;\n          kpoint.end = (ki+1)*_params.nbands;\n          for (unsigned int oi = kpoint.begin, ti = 0; oi < kpoint.end; oi++, ti++)\n          {\n            //if (_world.rank() == 0) print(oi, ti, kpt.begin, kpt.end);\n            // normalize the orbitals\n            //tmp_orbitals[ti].scale(1.0/tmp_orbitals[ti].norm2());\n            _phisa.push_back(tmp_orbitals[ti]);\n            _phisb.push_back(tmp_orbitals[ti]);\n            _eigsa[oi] = tmp_eigs[ti];\n            _eigsb[oi] = tmp_eigs[ti];\n          }\n        }\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    // Constructor\n    Solver(World& world,\n           const rfunctionT& vnucrhon,\n           const vecfuncT& phis,\n           const std::vector<T>& eigs,\n           const ElectronicStructureParams& params,\n           MolecularEntity mentity)\n       : _world(world), _vnucrhon(vnucrhon), _phisa(phis), _phisb(phis),\n       _eigsa(eigs), _eigsb(eigs), _params(params), _mentity(mentity)\n    {\n      _residual = 1e5;\n      if (params.periodic)\n      {\n        Tensor<double> box = FunctionDefaults<NDIM>::get_cell_width();\n        //_cop = PeriodicCoulombOpPtr<T,NDIM>(const_cast<World&>(world),\n        //    FunctionDefaults<NDIM>::get_k(), params.lo, params.thresh * 0.1, box);\n        _cop = CoulombOperatorPtr(const_cast<World&>(world), params.lo, params.thresh * 0.1);\n      }\n      else\n      {\n        _cop = CoulombOperatorPtr(const_cast<World&>(world), params.lo, params.thresh * 0.1);\n      }\n\n      if (params.ispotential)\n      {\n        _vnuc = copy(_vnucrhon);\n      }\n      else\n      {\n        _vnuc = apply(*_cop, _vnucrhon);\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    // Constructor\n    Solver(World& world,\n           rfunctionT vnucrhon,\n           vecfuncT phis,\n           std::vector<T> eigs,\n           std::vector<KPoint> kpoints,\n           std::vector<double> occs,\n           ElectronicStructureParams params,\n           MolecularEntity mentity)\n       : _world(world), _vnucrhon(vnucrhon), _phisa(phis), _phisb(phis),\n         _eigsa(eigs), _eigsb(eigs), _params(params),\n         _kpoints(kpoints), _occsa(occs), _occsb(occs), _mentity(mentity)\n    {\n      _residual = 1e5;\n      if (params.periodic)\n      {\n        Tensor<double> box = FunctionDefaults<NDIM>::get_cell_width();\n        _cop = CoulombOperatorPtr(const_cast<World&>(world), params.lo, params.thresh * 0.1);\n      }\n      else\n      {\n        _cop = CoulombOperatorPtr(const_cast<World&>(world), params.lo, params.thresh * 0.1);\n      }\n\n      if (params.ispotential)\n      {\n        _vnuc = copy(_vnucrhon);\n      }\n      else\n      {\n        _vnuc = apply(*_cop, _vnucrhon);\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual ~Solver()\n    {\n      _outputF.close();\n      _matF.close();\n      _eigF.close();\n      delete _subspace;\n    }\n    //*************************************************************************\n\n    //***************************************************************************\n    // set occupation numbers (only for insulators ... no smearing)\n    void set_occs2(const std::vector<KPoint>& kpoints,\n                   const std::vector<double>& eigsa,\n                   const std::vector<double>& eigsb,\n                   std::vector<double>& occsa,\n                   std::vector<double>& occsb)\n    {\n      for (unsigned int ik = 0; ik < kpoints.size(); ik++)\n      {\n        // get k-point\n        KPoint k = kpoints[ik];\n\n        // pull subset of data that corresponds to k\n        const std::vector<double> k_eigsa(eigsa.begin() + k.begin, eigsa.begin() + k.end);\n        const std::vector<double> k_eigsb(eigsb.begin() + k.begin, eigsb.begin() + k.end);\n        std::vector<double> k_occsa(occsa.begin() + k.begin, occsa.begin() + k.end);\n        std::vector<double> k_occsb(occsb.begin() + k.begin, occsb.begin() + k.end);\n\n        // demand all vectors have the same size\n        unsigned int sz = k_eigsa.size();\n        MADNESS_ASSERT(k_eigsb.size() == sz);\n        MADNESS_ASSERT(k_occsa.size() == sz);\n        MADNESS_ASSERT(k_occsb.size() == sz);\n        // concatenate eigenvalues\n        std::vector<double> teigs;\n        //std::copy(k_eigsa.begin(), k_eigsa.end(), teigs.begin());\n        //teigs.insert(teigs.end(), k_eigsb.begin(), k_eigsb.end());\n        //std::copy(k_eigsb.begin(), k_eigsb.end(), back_inserter(teigs));\n        for (unsigned int ist = 0; ist < k_eigsa.size(); ist++) teigs.push_back(k_eigsa[ist]);\n        for (unsigned int ist = 0; ist < k_eigsb.size(); ist++) teigs.push_back(k_eigsb[ist]);\n\n        if (_world.rank() == 0) printf(\"setting occs ....\\n\\n\");\n        for (unsigned int ist = 0; ist < teigs.size(); ist++)\n        {\n          if (_world.rank() == 0)\n          {\n            printf(\"%5d    %15.8f\\n\", ist, teigs[ist]);\n          }\n        }\n\n        // indicies\n        std::vector<unsigned int> inds(2*sz);\n        for (unsigned int i = 0; i < 2*sz; i++) inds[i] = i;\n        // sort by eigenvalue\n        for (unsigned int i = 0; i < 2*sz; i++)\n        {\n          for (unsigned int j = i+1; j < 2*sz; j++)\n          {\n            if (teigs[j] < teigs[i])\n            {\n              double t1 = teigs[i];\n              teigs[i] = teigs[j];\n              teigs[j] = t1;\n              int it1 = inds[i];\n              inds[i] = inds[j];\n              inds[j] = it1;\n            }\n          }\n        }\n\n        if (_world.rank() == 0)\n          printf(\"\\nSorted eigenvalues:\\n\");\n        for (unsigned int i = 0; i < teigs.size(); i++)\n        {\n          if (_world.rank() == 0)\n            printf(\"%10d%10d     %15.8f\\n\",i,inds[i],teigs[i]);\n        }\n\n        // assign occupation numbers\n        double availablecharge = _params.ncharge;\n        for (unsigned int i = 0; (i < 2*sz) && (availablecharge > 0.0) ; i++)\n        {\n          unsigned int current = inds[i];\n          if (current >= sz)\n          {\n            current -= sz;\n            k_occsb[current] = 1.0;\n            availablecharge -= 1.0;\n          }\n          else\n          {\n            k_occsa[current] = 1.0;\n            availablecharge -= 1.0;\n          }\n        }\n\n        for (unsigned int ik1 = k.begin, ik2 = 0; ik1 < k.end; ik1++,ik2++)\n        {\n          occsa[ik1] = k_occsa[ik2];\n          occsb[ik1] = k_occsb[ik2];\n        }\n      }\n\n      for (unsigned int ik = 0; ik < kpoints.size(); ik++)\n      {\n        KPoint k = kpoints[ik];\n        if (_world.rank() == 0)\n        {\n          printf(\"k-point is: %d: \\n\",ik);\n        }\n        for (unsigned int ist = k.begin; ist < k.end; ist++)\n        {\n          if (_world.rank() == 0)\n          {\n            printf(\"occa:    %12.5f          occb:    %12.5f \\n\",occsa[ist],occsb[ist]);\n          }\n        }\n      }\n\n    }\n    //***************************************************************************\n\n    //***************************************************************************\n    /*!\n     \\ingroup periodic_solver\n     \\brief Compute the electronic density for either a molecular or periodic\n            system.\n     */\n    rfunctionT compute_rho_slow(const vecfuncT& phis, std::vector<KPoint> kpoints,\n                               std::vector<double> occs)\n    {\n      // Electron density\n      rfunctionT rho = rfactoryT(_world);\n      _world.gop.fence();\n      if (_world.rank() == 0) _outputF << \"computing rho ...\" << endl;\n      // Loop over k-points\n      for (unsigned int kp = 0; kp < kpoints.size(); kp++)\n      {\n        // get k-point\n        KPoint kpoint = kpoints[kp];\n        // loop through bands\n        for (unsigned int j = kpoint.begin; j < kpoint.end; j++)\n        {\n          // Get phi(j) from iterator\n          const functionT& phij = phis[j];\n          // Compute the j-th density\n          //rfunctionT prod = abs_square(phij);\n          rfunctionT prod = abssq(phij,true);\n          double rnrm = prod.trace();\n          prod.scale(1/rnrm);\n//          rho += 0.5 * _occs[j] * kpoint.weight * prod;\n          rho += occs[j] * kpoint.weight * prod;\n        }\n      }\n      rho.truncate();\n\n      return rho;\n    }\n\n    // computes the electronic density for 1 spin\n    rfunctionT compute_rho(const vecfuncT& phis, std::vector<KPoint> kpoints,\n                          std::vector<double> occs)\n    {\n      if (_world.rank() == 0) _outputF << \"computing rho ...\" << endl;\n      rfunctionT rho = rfactoryT(_world);       // Electron density\n\n      reconstruct(_world, phis); // For max parallelism\n      std::vector<rfunctionT> phisq(phis.size());\n      for (unsigned int i=0; i<phis.size(); i++) {\n          phisq[i] = abssq(phis[i],false);\n      }\n      _world.gop.fence();\n      std::vector<double> phinorm = norm2s(_world, phis);\n\n      compress(_world,phisq); // since will be using gaxpy for accumulation\n      rho.compress();\n\n      // Loop over k-points\n      for (unsigned int kp = 0; kp < kpoints.size(); kp++)\n      {\n        // get k-point\n        KPoint kpoint = kpoints[kp];\n        // loop through bands\n        for (unsigned int j = kpoint.begin; j < kpoint.end; j++)\n        {\n          rho.gaxpy(1.0, phisq[j], occs[j] * kpoint.weight / (phinorm[j]*phinorm[j]), false);\n        }\n      }\n      _world.gop.fence();\n      phisq.clear();\n      rho.truncate();\n\n      return rho;\n    }\n\n\n    //***************************************************************************\n\n    //***************************************************************************\n    std::vector<poperatorT> make_bsh_operators(const std::vector<T>& eigs)\n    {\n      // Make BSH vector\n      std::vector<poperatorT> bops;\n      // Get defaults\n      double tol = FunctionDefaults<NDIM>::get_thresh();\n      // Loop through eigenvalues, adding a BSH operator to bops\n      // for each eigenvalue\n      int sz = eigs.size();\n      for (int i = 0; i < sz; i++)\n      {\n          T eps = eigs[i];\n          if (eps > 0)\n          {\n              if (_world.rank() == 0)\n              {\n                  std::cout << \"bsh: warning: positive eigenvalue\" << i << eps << endl;\n              }\n              eps = -0.1;\n          }\n\n          bops.push_back(poperatorT(BSHOperatorPtr3D(_world, sqrt(-2.0*eps), _params.lo, tol * 0.1)));\n      }\n      return bops;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n//    void loadbal()\n//    {\n//        if(_world.size() == 1)\n//            return;\n//\n//        LoadBalanceDeux<3> lb(_world);\n//        lb.add_tree(_vnuc, lbcost<double,3>(1.0, 0.0), false);\n//        lb.add_tree(_rhoa, lbcost<double,3>(1.0, 1.0), false);\n//        for(unsigned int i = 0;i < _phisa.size();i++)\n//        {\n//            lb.add_tree(_phisa[i], lbcost<valueT,3>(1.0, 1.0), false);\n//        }\n//        if(_params.spinpol)\n//        {\n//            lb.add_tree(_rhob, lbcost<double,3>(1.0, 1.0), false);\n//            for(unsigned int i = 0;i < _phisb.size();i++)\n//            {\n//                lb.add_tree(_phisa[i], lbcost<valueT,3>(1.0, 1.0), false);\n//            }\n//        }\n//\n//        FunctionDefaults<3>::redistribute(_world, lb.load_balance(6.0));\n//   }\n   //*************************************************************************\n\n    //*************************************************************************\n    double calculate_kinetic_energy()\n    {\n      double ke = 0.0;\n      if (!_params.periodic)\n      {\n        complex_derivative_3d Dx(_world,0);\n        complex_derivative_3d Dy(_world,1);\n        complex_derivative_3d Dz(_world,2);\n        for (unsigned int i = 0; i < _phisa.size(); i++)\n        {\n          functionT dpdx = Dx(_phisa[i]);\n          functionT dpdy = Dy(_phisa[i]);\n          functionT dpdz = Dz(_phisa[i]);\n          ke += 0.5 * (real(inner(dpdx,dpdx)) + real(inner(dpdy,dpdy))\n              + real(inner(dpdz,dpdz)));\n        }\n        if (_params.spinpol)\n        {\n          for (unsigned int i = 0; i < _phisb.size(); i++)\n          {\n            functionT dpdx = Dx(_phisb[i]);\n            functionT dpdy = Dy(_phisb[i]);\n            functionT dpdz = Dz(_phisb[i]);\n            ke += 0.5 * (real(inner(dpdx,dpdx)) + real(inner(dpdy,dpdy))\n                + real(inner(dpdz,dpdz)));\n          }\n        }\n        else\n        {\n          ke *= 2.0;\n        }\n      }\n      return ke;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    /*!\n     \\ingroup periodic_solver\n     \\brief Applies the LDA effective potential to each orbital. Currently only\n            lda and spin-polarized is not implemented.\n     */\n    void apply_potential(vecfuncT& pfuncsa,\n        vecfuncT& pfuncsb, const vecfuncT& phisa,\n        const vecfuncT& phisb, const rfunctionT& rhoa, const rfunctionT& rhob,\n        const rfunctionT& rho)\n    {\n      // Nuclear and coulomb potentials\n      rfunctionT vc = apply(*_cop, rho);\n\n      // combined density\n      rfunctionT rho2 = rho + _vnucrhon;\n      double vnucrhontrace = _vnucrhon.trace();\n      double rhotrace = rho.trace();\n      double rho2trace = rho2.trace();\n      if (_world.rank() == 0) printf(\"_vnucrhon trace: %10e\\n\", vnucrhontrace);\n      if (_world.rank() == 0) printf(\"rho trace: %10e\\n\", rhotrace);\n      if (_world.rank() == 0) printf(\"rho2 trace: %10e\\n\", rho2trace);\n      rfunctionT vlocal = (_params.ispotential) ? _vnuc + vc : apply(*_cop, rho2);\n      rfunctionT vlocal2 = _vnuc + vc;\n      double vlerr = (vlocal-vlocal2).norm2();\n      if (_world.rank() == 0) printf(\"vlerr trace: %10e\\n\\n\", vlerr);\n\n\n      // Calculate energies for Coulomb and nuclear\n      double ce = 0.5*inner(vc,rho);\n      double pe = inner(_vnuc,rho);\n      double xc = 0.0;\n      double ke = calculate_kinetic_energy();\n      // Exchange\n      if (_params.functional == 1)\n      {\n        // LDA, is calculation spin-polarized?\n        if (_params.spinpol)\n        {\n        \tMADNESS_EXCEPTION(\"Spin polarized not implemented!\",0);\n//          // potential\n//          rfunctionT vxca = binary_op(rhoa, rhob, &::libxc_ldaop_sp<double>);\n//          rfunctionT vxcb = binary_op(rhob, rhoa, &::libxc_ldaop_sp<double>);\n//          pfuncsa = mul_sparse(_world, vlocal + vxca, phisa, _params.thresh * 0.1);\n//          pfuncsb = mul_sparse(_world, vlocal + vxcb, phisb, _params.thresh * 0.1);\n//          // energy\n//          rfunctionT fca = binary_op(rhoa, rhob, &::libxc_ldaeop_sp<double>);\n//          rfunctionT fcb = binary_op(rhob, rhoa, &::libxc_ldaeop_sp<double>);\n//          xc = fca.trace() + fcb.trace();\n        }\n        else\n        {\n          // potential\n          rfunctionT vxc = copy(rhoa);\n//          vxc.unaryop(&::libxc_ldaop<double>);\n          START_TIMER(_world);\n          vxc.unaryop(&::ldaop<double>);\n\n          //test_periodicity(vc);\n//          for (unsigned int i = 0; i < phisa.size(); i++)\n//          {\n//            test_periodicity(phisa[i]);\n//          }\n\n          pfuncsa = mul_sparse(_world, vlocal2+vxc, phisa, _params.thresh * 0.1);\n//          rfunctionT vxc2 = binary_op(rhoa, rhoa, &::libxc_ldaop_sp<double>);\n//          pfuncsa = mul_sparse(_world, vlocal + vxc2, phisa, _params.thresh * 0.1);\n\n//          for (unsigned int i = 0; i < pfuncsa.size(); i++)\n//          {\n//            test_periodicity(pfuncsa[i]);\n//          }\n\n\n          END_TIMER(_world,\"Applying LDA potential\");\n          // energy\n          rfunctionT fc = copy(rhoa);\n          fc.unaryop(&::ldaeop<double>);\n          xc = fc.trace();\n        }\n      }\n      else if (_params.functional == 2)\n      {\n        START_TIMER(_world);\n        pfuncsa = mul_sparse(_world, vlocal, phisa, _params.thresh * 0.1);\n        END_TIMER(_world,\"Applying local potential\");\n        START_TIMER(_world);\n        // gamma-point?\n        if ((_params.ngridk0 == 1) && (_params.ngridk1 == 1) && (_params.ngridk2 == 1))\n        {\n          apply_hf_exchange3(_phisa, _phisb, pfuncsa, pfuncsb, xc);\n        }\n        else\n        {\n          apply_hf_exchange4(_phisa, _phisb, pfuncsa, pfuncsb, xc);\n        }\n        END_TIMER(_world, \"Applying HF exchange\");\n      }\n      std::cout.precision(8);\n      if (_world.rank() == 0)\n      {\n        printf(\"Energies:\\n\");\n        printf(\"Kinetic energy:     %20.10f\\n\", ke);\n        printf(\"Potential energy:   %20.10f\\n\", pe);\n        printf(\"Coulomb energy:     %20.10f\\n\", ce);\n        printf(\"Exchange energy:    %20.10f\\n\", xc);\n        printf(\"Total energy:       %20.10f\\n\\n\", ke + pe + ce + xc);\n      }\n    }\n    //*************************************************************************\n\n    // working for a molecule / atom ... need to test with periodic boundary\n    // conditions as a gamma point only calculation\n    //*************************************************************************\n//    void apply_hf_exchange2(vecfuncT& phisa, vecfuncT& phisb,\n//                           vecfuncT& funcsa, vecfuncT& funcsb,\n//                           double& xc)\n//    {\n//      Vector<double,3> q {0.0,0.0,0.0};\n//      SeparatedConvolution<double_complex,3> hfexop =\n//          PeriodicHFExchangeOperator(_world, q, _params.lo,\n//              FunctionDefaults<3>::get_thresh() * 0.1);\n//      for (unsigned int i = 0; i < phisa.size(); i++)\n//      {\n//        bool isreal1 = is_real<T,NDIM>(phisa[i]);\n//        MADNESS_ASSERT(isreal1);\n////        rfunctionT phi_i = real(phisa[i]);\n//        for (unsigned int j = 0; j < phisa.size(); j++)\n//        {\n//          bool isreal2 = is_real<T,NDIM>(phisa[j]);\n//          MADNESS_ASSERT(isreal2);\n////          rfunctionT phi_j = real(phisa[j]);\n////          rfunctionT prod = phi_i*phi_j;\n//          functionT prod = phisa[i]*phisa[j];\n//          prod.truncate();\n////          rfunctionT Vex = apply(*_cop,prod);\n//          rfunctionT Vex = real(apply(hfexop,prod));\n//          functionT tf1 = Vex*phisa[j];\n//          funcsa[i] -= tf1;\n//          xc -= real(inner(phisa[i],tf1));\n//        }\n//      }\n//    }\n    //*************************************************************************\n\n    // working for a molecule / atom ... works for a gamma point calculation\n    //*************************************************************************\n    void apply_hf_exchange3(vecfuncT& phisa, vecfuncT& phisb,\n                            vecfuncT& funcsa, vecfuncT& funcsb,\n                            double& xc)\n    {\n      for (unsigned int j = 0; j < phisa.size(); j++)\n      {\n        rfunctionT phi_j = real(phisa[j]);\n        // do diagonal piece first\n        rfunctionT dprod = phi_j*phi_j;\n        dprod.truncate();\n        rfunctionT dVex = apply(*_cop,dprod);\n        functionT tf_jjj = dVex*phisa[j];\n        funcsa[j] -= tf_jjj;\n        xc -= real(inner(phisa[j],tf_jjj));\n        for (unsigned int i = j+1; i < phisa.size(); i++)\n        {\n          rfunctionT phi_i = real(phisa[i]);\n          rfunctionT prod = phi_i*phi_j;\n          prod.truncate();\n          rfunctionT Vex = apply(*_cop,prod);\n          // do the jij-th term\n          functionT tf_jij = Vex*phisa[j];\n          funcsa[i] -= tf_jij;\n          xc -= real(inner(phisa[i],tf_jij));\n          // do the iji-th term (in the complex case, use the complex\n          // conjugate)\n          functionT tf_iji = Vex*phisa[i];\n          funcsa[j] -= tf_iji;\n          xc -= real(inner(phisa[j],tf_iji));\n        }\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    KPoint find_kpt_from_orb(unsigned int idx)\n    {\n      for (unsigned int i = 0; i < _kpoints.size(); i++)\n      {\n        KPoint k1 = _kpoints[i];\n        if (k1.is_orb_in_kpoint(idx)) return k1;\n      }\n      MADNESS_EXCEPTION(\"Error: find_kpt_from_orb: didn't find kpoint\\n\", 0);\n    }\n    //************************************************************************\n\n    // hf exchange with k-points for periodic solid\n    //*************************************************************************\n    void apply_hf_exchange4(vecfuncT& phisa, vecfuncT& phisb,\n                           vecfuncT& funcsa, vecfuncT& funcsb,\n                           double& xc)\n    {\n      for (unsigned int i = 0; i < phisa.size(); i++)\n      {\n        functionT phi_i = phisa[i];\n        KPoint k_i = find_kpt_from_orb(i);\n        for (unsigned int j = 0; j < phisa.size(); j++)\n        {\n          functionT phi_j = phisa[j];\n          KPoint k_j = find_kpt_from_orb(j);\n          Vector<double,3> q {(k_i.k[0]-k_j.k[0])*_params.L,\n                              (k_i.k[1]-k_j.k[1])*_params.L,\n                              (k_i.k[2]-k_j.k[2])*_params.L};\n          Vector<double,3> q2 {k_i.k[0]-k_j.k[0],\n                               k_i.k[1]-k_j.k[1],\n                               k_i.k[2]-k_j.k[2]};\n          functionT cexp =\n              factoryT(_world).functor(functorT(new\n                  ComplexExp<3>(q2, double_complex(1.0,0.0))));\n          functionT cexp2 = conj(cexp);\n          cexp.truncate();\n          cexp2.truncate();\n          functionT prod = phi_i*phi_j*cexp;\n          SeparatedConvolution<double_complex,3> hfexop =\n              PeriodicHFExchangeOperator(_world, q, _params.lo,\n                  FunctionDefaults<3>::get_thresh() * 0.1);\n          functionT Vex = apply(hfexop,prod);\n          functionT tf1 = Vex*phisa[j]*cexp2;\n          funcsa[i] -= tf1;\n          xc -= real(inner(phisa[i],tf1));\n        }\n      }\n    }\n    //*************************************************************************\n\n    // not working and not tested .... supposed to be for the periodic boundary\n    // conditions with k-points\n    //*************************************************************************\n    void apply_hf_exchange(vecfuncT& phisa, vecfuncT& phisb,\n                           vecfuncT& funcsa, vecfuncT& funcsb)\n    {\n      for (unsigned int ink1 = 0, ik1 = 0; ink1 < _phisa.size(); ++ink1)\n      {\n        for (unsigned int ink2 = 0, ik2 = 0; ink2 <= ink1; ink2++)\n        {\n          KPoint k1 = _kpoints[ik1];\n          KPoint k2 = _kpoints[ik2];\n\n          if (ink1 == k1.end) ik1++;\n          if (ink2 == k2.end) ik2++;\n\n          MADNESS_ASSERT(ik1 == 0);\n          MADNESS_ASSERT(ik2 == 0);\n\n          // no phase factor\n          if (ik1 == ik2)\n          {\n//            // same state (diagonal piece)\n//            if (ink1 == ink2)\n//            {\n//              rfunctionT prod = abs_square(phisa[ink1]);\n//              rfunctionT fr = apply(*_cop,prod);\n//              funcsa[ink1] -= funcsa[ink1]*fr;\n//            }\n//            else\n            {\n              Vector<double,3> q = 0.0;\n              functionT f = phisa[ink1]*conj(phisa[ink2]);\n              SeparatedConvolution<double_complex,3> hfexop =\n                  PeriodicHFExchangeOperator(_world, q, _params.lo, FunctionDefaults<3>::get_thresh() * 0.1);\n              functionT fr = apply(hfexop,f);\n              funcsa[ink1] -= funcsa[ink2]*fr;\n              funcsa[ink2] -= funcsa[ink1]*conj(fr);\n\n              // test code\n              rfunctionT g1 = abs(phisa[ink1]);\n              rfunctionT g2 = abs(phisa[ink2]);\n              rfunctionT ff = g1*g2;\n\n              printf(\"norm diff: %20.8f\\n\", abs(ff.norm2()-f.norm2()));\n              MADNESS_ASSERT(abs(ff.norm2()-f.norm2()) <= 1e-5);\n              rfunctionT fr2 = apply(*_cop,ff);\n              MADNESS_ASSERT(abs(fr.norm2()-fr2.norm2()) <= 1e-5);\n            }\n          }\n//          else\n//          {\n//            Vector<double,3> q = VectorFactory(k1.k[0]-k2.k[0],\n//                                               k1.k[1]-k2.k[1],\n//                                               k1.k[2]-k2.k[2]);\n//            functionT cexp = factoryT(_world).functor(functorT(new ComplexExp<3>(q, double_complex(1.0,0.0))));\n//            cexp.truncate();\n//\n//            functionT f = phisa[ink1]*conj(phisa[ink2])*cexp;\n//            SeparatedConvolution<double_complex,3> hfexop =\n//                PeriodicHFExchangeOperator(_world, q, _params.lo, FunctionDefaults<3>::get_thresh() * 0.1);\n//            functionT fr = apply(hfexop,f);\n//            funcsa[ink1] -= phisa[ink1]*fr*conj(cexp);\n//            funcsa[ink2] -= phisa[ink2]*conj(fr)*cexp;\n//          }\n        }\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void reproject()\n    {\n      _params.waveorder += 2;\n      _params.thresh /= 100;\n      FunctionDefaults<3>::set_thresh(_params.thresh);\n      FunctionDefaults<3>::set_k(_params.waveorder);\n      if (_world.rank() == 0) _outputF << \"reprojecting to wavelet order \"\n          << _params.waveorder << endl;\n      reconstruct(_world, _phisa);\n      for(unsigned int i = 0; i < _phisa.size(); i++)\n      {\n        _phisa[i] = madness::project(_phisa[i], FunctionDefaults<3>::get_k(),\n          FunctionDefaults<3>::get_thresh(), false);\n      }\n      _world.gop.fence();\n      truncate(_world, _phisa);\n      normalize(_world, _phisa);\n      if(_params.spinpol)\n      {\n        reconstruct(_world, _phisb);\n        for(unsigned int i = 0; i < _phisb.size(); i++)\n        {\n            _phisb[i] = madness::project(_phisb[i], FunctionDefaults<3>::get_k(),\n              FunctionDefaults<3>::get_thresh(), false);\n        }\n        _world.gop.fence();\n        truncate(_world, _phisb);\n        normalize(_world, _phisb);\n      }\n\n      delete _cop;\n      make_nuclear_potential();\n      //_subspace->reproject();\n      delete _subspace;\n      _subspace = new Subspace<T,NDIM>(_world, _params);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void solve()\n    {\n\n      // WSTHORNTON (debug) Test periodicity\n//      if (_world.rank() == 0) printf(\"initial orbitals (periodicity) ...\\n\\n\");\n//      for (unsigned int i = 0; i < _phisa.size(); i++)\n//      {\n//        if (_world.rank() == 0) printf(\"orbital %d\\n\",i);\n//        test_periodicity(_phisa[i]);\n//        if (_world.rank() == 0) printf(\"\\n\\n\");\n//      }\n//      if (_world.rank() == 0) printf(\"\\n\\n\\n\\n\");\n\n      if (_world.rank() == 0) print(\"size of phisa is:  \", _phisa.size());\n      // keep track of how many iterations have gone by without reprojecting\n      int rit = 0;\n      int rpthresh = 20;\n      for (_it = 0; _it < _params.maxits && _residual > _params.rcriterion; _it++, rit++)\n      {\n        // should we reproject?\n        if ((_it > 0) && ((_residual < 20*_params.thresh) || (rit == rpthresh)))\n        {\n          // reproject orbitals and reset threshold\n          reproject();\n          rit = 0;\n        }\n\n        if (_world.rank() == 0) _outputF << \"_it = \" << _it << endl;\n\n        // Set occupation numbers\n        set_occs2(_kpoints,_eigsa,_eigsb,_occsa,_occsb);\n\n        // Compute density\n        rfunctionT rhoa = compute_rho(_phisa, _kpoints, _occsa);\n        rfunctionT rhob = (_params.spinpol) ? compute_rho(_phisb, _kpoints, _occsb) : rhoa;\n//        rfunctionT rhoa = _rhoa;\n//        rfunctionT rhob = _rhob;\n        double drhoa = (_rhoa-rhoa).trace();\n        double drhob = (_rhob-rhob).trace();\n        if (_world.rank() == 0)\n        {\n          printf(\"diff of alpha rho: %15.7f\\n\",drhoa);\n          printf(\"diff of beta rho: %15.7f\\n\",drhob);\n        }\n\n        _rho = rhoa + rhob;\n\n        _rhoa = rhoa;\n        _rhob = rhob;\n        double rtrace = _rho.trace();\n        if (_world.rank() == 0) _outputF << \"trace of rho\" << rtrace << endl;\n\n//        if(_it < 2 || (_it % 10) == 0)\n//        {\n//          START_TIMER(_world);\n//          //loadbal();\n//          END_TIMER(_world, \"Load balancing\");\n//        }\n\n        std::vector<functionT> pfuncsa =\n                zero_functions<valueT,NDIM>(_world, _phisa.size());\n        std::vector<functionT> pfuncsb =\n                zero_functions<valueT,NDIM>(_world, _phisb.size());\n\n        // Apply the potentials to the orbitals\n        if (_world.rank() == 0) _outputF << \"applying potential ...\\n\" << endl;\n        //START_TIMER(_world);\n        apply_potential(pfuncsa, pfuncsb, _phisa, _phisb, _rhoa, _rhob, _rho);\n        //END_TIMER(_world,\"apply potential\");\n\n        // Do right hand side for all k-points\n        std::vector<double> alpha(pfuncsa.size(), 0.0);\n        do_rhs_simple(_phisa, pfuncsa, _kpoints, alpha, _eigsa);\n\n        if (_params.plotorbs)\n        {\n          std::vector<long> npt(3,101);\n          for (unsigned int ik = 0; ik < _kpoints.size(); ik++)\n          {\n            KPoint kpoint = _kpoints[ik];\n            int ist = 0;\n            for (unsigned int kst = kpoint.begin; kst < kpoint.end; kst++, ist++)\n            {\n              std::ostringstream strm;\n              strm << \"pre_unk_\" << ik << \"_\" << ist << \".dx\";\n              std::string fname = strm.str();\n              plotdx(_phisa[kst], fname.c_str(), FunctionDefaults<3>::get_cell(), npt);\n            }\n          }\n        }\n        // WSTHORNTON\n        // DEBUG\n        if (_world.rank() == 0)\n          printf(\"\\n\\n\\n\\n------ Debugging BSH operator -----\");\n        for (unsigned int ik = 0; ik < _kpoints.size(); ik++)\n        {\n          KPoint kpoint = _kpoints[ik];\n          std::vector<double> k_alpha(alpha.begin() + kpoint.begin, alpha.begin() + kpoint.end);\n          if (_world.rank() == 0)\n            printf(\"alpha: (%6.4f,%6.4f,%6.4f)\\n\",kpoint.k[0],kpoint.k[1],kpoint.k[2]);\n          for (unsigned int ia = 0; ia < k_alpha.size(); ia++)\n          {\n            if (_world.rank() == 0) printf(\"%15.8f\\n\", k_alpha[ia]);\n          }\n        }\n        if (_world.rank() == 0) printf(\"\\n\\n\\n\\n\");\n\n        // WSTHORNTON (debug)\n        if (_world.rank() == 0) printf(\"before BSH application ...\\n\\n\");\n        for (unsigned int ik = 0; ik < _kpoints.size(); ik++)\n        {\n          KPoint kpoint = _kpoints[ik];\n          double k0 = kpoint.k[0];\n          double k1 = kpoint.k[1];\n          double k2 = kpoint.k[2];\n          if (_world.rank() == 0)\n            printf(\"(%6.5f, %6.5f, %6.5f)\\n\",k0,k1,k2);\n          std::vector<functionT> k_phisa(_phisa.begin() + kpoint.begin, _phisa.begin() + kpoint.end);\n          std::vector<functionT> k_pfuncsa(pfuncsa.begin() + kpoint.begin, pfuncsa.begin() + kpoint.end);\n          KPoint kpoint_gamma;\n          print_fock_matrix_eigs(k_phisa, k_pfuncsa, kpoint_gamma);\n\n          // diagonalize overlap\n          tensorT overlap = matrix_inner(_world,k_pfuncsa,k_pfuncsa,true);\n          ctensorT co; rtensorT eo;\n          syev(overlap, co, eo);\n\n          if (_world.rank() == 0) printf(\"Overlap eigenvalues: \\n\");\n          if (_world.rank() == 0) print(overlap);\n          for (unsigned int ie = 0; ie < eo.dim(0); ie++)\n          {\n            if (_world.rank() == 0) printf(\"%d    %15.8e\\n\", ie, eo(ie,ie));\n          }\n\n        }\n        if (_world.rank() == 0) printf(\"\\n\\n\\n\\n\");\n\n        // WSTHORNTON (debug) Test periodicity\n//        if (_world.rank() == 0) printf(\"before BSH application (periodicity) ...\\n\\n\");\n//        for (unsigned int i = 0; i < _phisa.size(); i++)\n//        {\n//          if (_world.rank() == 0) printf(\"orbital %d\\n\",i);\n//          test_periodicity(_phisa[i]);\n//          if (_world.rank() == 0) printf(\"\\n\\n\");\n//        }\n//        if (_world.rank() == 0) printf(\"\\n\\n\\n\\n\");\n\n        // Make BSH Green's function\n        std::vector<poperatorT> bopsa = make_bsh_operators(alpha);\n        std::vector<T> sfactor(pfuncsa.size(), -2.0);\n        scale(_world, pfuncsa, sfactor);\n\n        // Apply Green's function to orbitals\n        if (_world.rank() == 0) std::cout << \"applying BSH operator ...\\n\" << endl;\n        truncate<valueT,NDIM>(_world, pfuncsa);\n        START_TIMER(_world);\n        std::vector<functionT> tmpa = apply(_world, bopsa, pfuncsa);\n        END_TIMER(_world,\"apply BSH\");\n        bopsa.clear();\n\n        // WSTHORNTON\n        // norms\n        if (_world.rank() == 0) printf(\"norms of tmpa\\n\");\n        std::vector<double> tmpa_norms = norm2s(_world, tmpa);\n        for (unsigned int i = 0; i < tmpa_norms.size(); i++)\n        {\n          if (_world.rank() == 0) printf(\"%10d     %15.8f\\n\", i, tmpa_norms[i]);\n        }\n        if (_world.rank() == 0) printf(\"\\n\\n\\n\\n\");\n\n        // Do other spin\n        vecfuncT tmpb = zero_functions<valueT,NDIM>(_world, _phisb.size());\n        if (_params.spinpol)\n        {\n          alpha = std::vector<double>(_phisb.size(), 0.0);\n          do_rhs_simple(_phisb, pfuncsb,  _kpoints, alpha, _eigsb);\n          std::vector<poperatorT> bopsb = make_bsh_operators(alpha);\n          scale(_world, pfuncsb, sfactor);\n          truncate<valueT,NDIM>(_world, pfuncsb);\n          tmpb = apply(_world, bopsb, pfuncsb);\n          bopsb.clear();\n        }\n        else\n        {\n          for (unsigned int i = 0; i < _eigsa.size(); i++) _eigsb[i] = _eigsa[i];\n        }\n        \n        // WSTHORNTON (debug)\n        std::vector<functionT> pfuncsa2=\n                zero_functions<valueT,NDIM>(_world, _phisa.size());\n        std::vector<functionT> pfuncsb2=\n                zero_functions<valueT,NDIM>(_world, _phisa.size());\n\n        // Apply the potentials to the orbitals\n        if (_world.rank() == 0) _outputF << \"applying potential2 ...\\n\" << endl;\n        apply_potential(pfuncsa2, pfuncsb2, tmpa, tmpb, _rhoa, _rhob, _rho);\n        for (unsigned int ik = 0; ik < _kpoints.size(); ik++)\n        {\n          KPoint kpoint = _kpoints[ik];\n          double k0 = kpoint.k[0];\n          double k1 = kpoint.k[1];\n          double k2 = kpoint.k[2];\n          if (_world.rank() == 0)\n            printf(\"(%6.5f, %6.5f, %6.5f)\\n\",k0,k1,k2);\n          std::vector<functionT> k_tmpa(tmpa.begin() + kpoint.begin, tmpa.begin() + kpoint.end);\n          std::vector<functionT> k_pfuncsa2(pfuncsa2.begin() + kpoint.begin, pfuncsa2.begin() + kpoint.end);\n          print_fock_matrix_eigs(k_tmpa, k_pfuncsa2, kpoint);\n\n\n          // diagonalize overlap\n//          tensorT overlap = matrix_inner(_world,k_tmpa,k_tmpa,true);\n//          if (_world.rank() == 0) print(overlap);\n//          ctensorT co; rtensorT eo;\n//          syev(overlap, co, eo);\n//\n//          if (_world.rank() == 0) printf(\"Overlap eigenvalues: \\n\");\n//          for (unsigned int ie = 0; ie < eo.dim(0); ie++)\n//          {\n//            if (_world.rank() == 0) printf(\"%d    %15.8e\\n\", ie, eo(ie,ie));\n//          }\n        }\n        if (_world.rank() == 0) printf(\"\\n\\n\\n\\n\");\n\n\n\n        if (_world.rank() == 0) printf(\"\\n\\n\\n\\n\");\n\n        // Update orbitals\n        update_orbitals(tmpa, tmpb, _kpoints);\n        save_orbitals();\n\n        // WSTHORNTON\n        if (_world.rank() == 0) _outputF << \"after update_orbitals() ...\\n\" << endl;\n        pfuncsa2=zero_functions<valueT,NDIM>(_world, _phisa.size());\n        pfuncsb2=zero_functions<valueT,NDIM>(_world, _phisa.size());\n        apply_potential(pfuncsa2, pfuncsb2, _phisa, _phisb, _rhoa, _rhob, _rho);\n        for (unsigned int ik = 0; ik < _kpoints.size(); ik++)\n        {\n          KPoint kpoint = _kpoints[ik];\n          double k0 = kpoint.k[0];\n          double k1 = kpoint.k[1];\n          double k2 = kpoint.k[2];\n          if (_world.rank() == 0)\n            printf(\"(%6.5f, %6.5f, %6.5f)\\n\",k0,k1,k2);\n          std::vector<functionT> k_phisa(_phisa.begin() + kpoint.begin, _phisa.begin() + kpoint.end);\n          std::vector<functionT> k_pfuncsa2(pfuncsa2.begin() + kpoint.begin, pfuncsa2.begin() + kpoint.end);\n          print_fock_matrix_eigs(k_phisa, k_pfuncsa2, kpoint);\n        }\n        if (_world.rank() == 0) printf(\"\\n\\n\\n\\n\");\n\n      }\n\n      if (_params.plotorbs)\n      {\n        std::vector<long> npt(3,101);\n        for (unsigned int ik = 0; ik < _kpoints.size(); ik++)\n        {\n          KPoint kpoint = _kpoints[ik];\n          int ist = 0;\n          for (unsigned int kst = kpoint.begin; kst < kpoint.end; kst++, ist++)\n          {\n            std::ostringstream strm;\n            strm << \"unk_\" << ik << \"_\" << ist << \".dx\";\n            std::string fname = strm.str();\n            plotdx(_phisa[kst], fname.c_str(), FunctionDefaults<3>::get_cell(), npt);\n          }\n        }\n      }\n      save_orbitals();\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    ctensorT matrix_exponential(const ctensorT& A) {\n        const double tol = 1e-13;\n        MADNESS_ASSERT(A.dim(0) == A.dim(1));\n\n        // Scale A by a power of 2 until it is \"small\"\n        double anorm = A.normf();\n        int n = 0;\n        double scale = 1.0;\n        while (anorm*scale > 0.1)\n        {\n            n++;\n            scale *= 0.5;\n        }\n        tensorT B = scale*A;    // B = A*2^-n\n\n        // Compute exp(B) using Taylor series\n        ctensorT expB = ctensorT(2, B.dims());\n        for (int i = 0; i < expB.dim(0); i++) expB(i,i) = std::complex<T>(1.0,0.0);\n\n        int k = 1;\n        ctensorT term = B;\n        while (term.normf() > tol)\n        {\n            expB += term;\n            term = inner(term,B);\n            k++;\n            term.scale(1.0/k);\n        }\n\n        // Repeatedly square to recover exp(A)\n        while (n--)\n        {\n            expB = inner(expB,expB);\n        }\n\n        return expB;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    template<typename Q>\n    void print_tensor2d(ostream& os, Tensor<Q> t)\n    {\n      os.precision(5);\n      for (int i = 0; i < t.dim(0); i++)\n      {\n        for (int j = 0; j < t.dim(1); j++)\n        {\n          os << t(i,j) << setw(12);\n        }\n        os << endl;\n      }\n      os << endl;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void print_potential_matrix_eigs(const vecfuncT& wf, const vecfuncT& vwf)\n    {\n      // Build the potential matrix\n      START_TIMER(_world);\n      tensorT potential = matrix_inner(_world, wf, vwf, true);\n      _world.gop.fence();\n      END_TIMER(_world,\"potential energy matrix\");\n      if (_world.rank()==0) printf(\"\\n\");\n      tensorT overlap = matrix_inner(_world,wf,wf,true);\n      _world.gop.fence();\n\n      // diagonalize potential\n      ctensorT cp; rtensorT ep;\n      sygv(potential, overlap, 1, cp, ep);\n      if (_world.rank() == 0)\n      {\n        print(\"potential eigenvectors dims:\",cp.dim(0),cp.dim(1));\n        print(\"potential eigenvectors:\");\n        print(cp);\n        printf(\"\\n\\n\");\n        print(\"potential eigenvalues:\");\n        print(ep);\n        printf(\"\\n\\n\");\n      }\n\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void print_fock_matrix_eigs(const vecfuncT& wf, const vecfuncT& vwf, KPoint kpoint)\n    {\n      // Build the potential matrix\n      START_TIMER(_world);\n      tensorT potential = matrix_inner(_world, wf, vwf, true);\n      _world.gop.fence();\n      END_TIMER(_world,\"potential energy matrix\");\n      if (_world.rank()==0) printf(\"\\n\");\n\n      START_TIMER(_world);\n      if (_world.rank() == 0) _outputF << \"Building kinetic energy matrix ...\\n\\n\" << endl;\n        //tensorT kinetic = ::kinetic_energy_matrix_slow<T,NDIM>(_world, psi,\n        //                                          _params.periodic,\n        //                                          kpoint);\n        tensorT kinetic = ::kinetic_energy_matrix<T,NDIM>(_world, wf,\n                                                  _params.periodic,\n                                                  kpoint);\n      _world.gop.fence();\n      END_TIMER(_world,\"kinetic energy matrix\");\n      if (_world.rank() == 0) printf(\"\\n\");\n\n      if (_world.rank() == 0) _outputF << \"Constructing Fock matrix ...\\n\\n\" << endl;\n      tensorT fock = potential + kinetic;\n      fock = 0.5 * (fock + conj_transpose(fock));\n      _world.gop.fence();\n\n      // DEBUG\n      tensorT overlap = matrix_inner(_world,wf,wf,true);\n      _world.gop.fence();\n\n      // diagonlize kinetic\n      ctensorT ck; rtensorT ek;\n      sygv(kinetic, overlap, 1, ck, ek);\n      // diagonalize potential\n      ctensorT cp; rtensorT ep;\n      sygv(potential, overlap, 1, cp, ep);\n      // diagonalize overlap\n      ctensorT co; rtensorT eo;\n      syev(overlap, co, eo);\n      ctensorT c; rtensorT e;\n      sygv(fock, overlap, 1, c, e);\n\n      if (_world.rank() == 0)\n      {\n        print(\"kinetic matrix:\");\n        print(kinetic);\n        print(\"\\nkinetic eigenvalues:\");\n        print(ek);\n        print(\"\\n\");\n\n        print(\"potential matrix:\");\n        print(potential);\n        print(\"\\npotential eigenvalues:\");\n        print(ep);\n        print(\"\\n\");\n\n        print(\"fock matrix:\");\n        print(fock);\n        print(\"\\nfock eigenvalues:\");\n        print(e);\n        print(\"\\n\");\n      }\n\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void do_rhs(vecfuncT& wf,\n                vecfuncT& vwf,\n                std::vector<KPoint> kpoints,\n                std::vector<T>& alpha,\n                std::vector<double>& eigs)\n    {\n      // tolerance\n      double trantol = 0.1*_params.thresh/std::min(30.0,double(wf.size()));\n      double thresh = 1e-4;\n\n      if (_world.rank() == 0) _eigF << \"Iteration: \" << _it << endl;\n      for (unsigned int kp = 0; kp < kpoints.size(); kp++)\n      {\n        // Get k-point and orbitals for this k-point\n        KPoint kpoint = kpoints[kp];\n        double k0 = kpoint.k[0];\n        double k1 = kpoint.k[1];\n        double k2 = kpoint.k[2];\n        // Extract the relevant portion of the list of orbitals and the list of the\n        // V times the orbitals\n        vecfuncT k_wf(wf.begin() + kpoint.begin, wf.begin() + kpoint.end);\n        vecfuncT k_vwf(vwf.begin() + kpoint.begin, vwf.begin() + kpoint.end);\n        // Build fock matrix\n        tensorT fock = build_fock_matrix(k_wf, k_vwf, kpoint);\n        tensorT overlap = matrix_inner(_world, k_wf, k_wf, true);\n        \n//        // Do right hand side stuff for kpoint\n//        bool isgamma = (is_equal(k0,0.0,1e-5) &&\n//                        is_equal(k1,0.0,1e-5) &&\n//                        is_equal(k2,0.0,1e-5));\n//        if (_params.periodic && !isgamma) // Non-zero k-point\n//        {\n//          // Do the gradient term and k^2/2\n//          vecfuncT d_wf = zero_functions<valueT,NDIM>(_world, k_wf.size());\n//          complex_derivative_3d Dx(_world,0);\n//          complex_derivative_3d Dy(_world,1);\n//          complex_derivative_3d Dz(_world,2);\n//          for (unsigned int i = 0; i < k_wf.size(); i++)\n//          {\n//            // gradient\n//            functionT dx_wf = Dx(k_wf[i]);\n//            functionT dy_wf = Dy(k_wf[i]);\n//            functionT dz_wf = Dz(k_wf[i]);\n//            d_wf[i] = std::complex<T>(0.0,k0)*dx_wf +\n//                      std::complex<T>(0.0,k1)*dy_wf +\n//                      std::complex<T>(0.0,k2)*dz_wf;\n//            // k^/2\n//            double ksq = k0*k0 + k1*k1 + k2*k2;\n//            k_vwf[i] += 0.5 * ksq * k_wf[i];\n//            k_vwf[i] -= d_wf[i];\n//          }\n//        }\n\n        if (_params.canon) // canonical orbitals\n        {\n          ctensorT U; rtensorT e;\n          sygv(fock, overlap, 1, U, e);\n\n          unsigned int nmo = k_wf.size();\n          // Fix phases.\n          long imax;\n          for (long j = 0; j < nmo; j++)\n          {\n              // Get index of largest value in column\n              U(_,j).absmax(&imax);\n              T ang = arg(U(imax,j));\n              std::complex<T> phase = exp(std::complex<T>(0.0,-ang));\n              // Loop through the rest of the column and divide by the phase\n              for (long i = 0; i < nmo; i++)\n              {\n                U(i,j) *= phase;\n              }\n          }\n\n          // Within blocks with the same occupation number attempt to\n          // keep orbitals in the same order (to avoid confusing the\n          // non-linear solver).  Have to run the reordering multiple\n          // times to handle multiple degeneracies.\n          int maxpass = 5;\n          for (int pass = 0; pass < maxpass; pass++)\n          {\n              long j;\n              for (long i = 0; i < nmo; i++)\n              {\n                U(_, i).absmax(&j);\n                if (i != j)\n                {\n                  tensorT tmp = copy(U(_, i));\n                  U(_, i) = U(_, j);\n                  U(_, j) = tmp;\n                  //swap(e[i], e[j]);\n                  T ti = e[i];\n                  T tj = e[j];\n                  e[i] = tj; e[j] = ti;\n                }\n              }\n          }\n\n          // Rotations between effectively degenerate states confound\n          // the non-linear equation solver ... undo these rotations\n          long ilo = 0; // first element of cluster\n          while (ilo < nmo-1) {\n              long ihi = ilo;\n              while (fabs(real(e[ilo]-e[ihi+1])) < thresh*10.0*max(fabs(real(e[ilo])),1.0)) {\n                  ihi++;\n                  if (ihi == nmo-1) break;\n              }\n              long nclus = ihi - ilo + 1;\n              if (nclus > 1) {\n                  if (_world.rank() == 0) print(\"   found cluster\", ilo, ihi);\n                  tensorT q = copy(U(Slice(ilo,ihi),Slice(ilo,ihi)));\n                  //print(q);\n                  // Special code just for nclus=2\n                  // double c = 0.5*(q(0,0) + q(1,1));\n                  // double s = 0.5*(q(0,1) - q(1,0));\n                  // double r = sqrt(c*c + s*s);\n                  // c /= r;\n                  // s /= r;\n                  // q(0,0) = q(1,1) = c;\n                  // q(0,1) = -s;\n                  // q(1,0) = s;\n\n                  // Iteratively construct unitary rotation by\n                  // exponentiating the antisymmetric part of the matrix\n                  // ... is quadratically convergent so just do 3\n                  // iterations\n                  ctensorT rot = matrix_exponential(-0.5*(q - conj_transpose(q)));\n                  q = inner(q,rot);\n                  ctensorT rot2 = matrix_exponential(-0.5*(q - conj_transpose(q)));\n                  q = inner(q,rot2);\n                  ctensorT rot3 = matrix_exponential(-0.5*(q - conj_transpose(q)));\n                  q = inner(rot,inner(rot2,rot3));\n                  U(_,Slice(ilo,ihi)) = inner(U(_,Slice(ilo,ihi)),q);\n              }\n              ilo = ihi+1;\n          }\n\n          // Debug output\n          if (_params.print_matrices && _world.rank() == 0)\n          {\n              printf(\"(%10.5f, %10.5f, %10.5f)\\n\", k0, k1, k2);\n              print(\"Overlap matrix:\");\n              print(overlap);\n\n              print(\"Fock matrix:\");\n              print(fock);\n\n              print(\"U matrix: (eigenvectors)\");\n              print(U);\n\n              print(\"Fock matrix eigenvalues:\");\n              print(e); \n          }\n\n          // WSTHORNTON\n          //print_fock_matrix_eigs(k_wf, k_vwf, kpoint);\n\n          // transform orbitals and V * (orbitals)\n          //k_vwf = transform(_world, k_vwf, U, 1e-5 / std::min(30.0, double(k_wf.size())), false);\n          //k_wf = transform(_world, k_wf, U, FunctionDefaults<3>::get_thresh() / std::min(30.0, double(k_wf.size())), true);\n\n          // WSTHORNTON\n          //print_fock_matrix_eigs(k_wf, k_vwf, kpoint);\n\n          // Do right hand side stuff for kpoint\n          bool isgamma = (is_equal(k0,0.0,1e-5) &&\n                          is_equal(k1,0.0,1e-5) &&\n                          is_equal(k2,0.0,1e-5));\n          if (_params.periodic && !isgamma) // Non-zero k-point\n          {\n            // Do the gradient term and k^2/2\n            vecfuncT d_wf = zero_functions_compressed<valueT,NDIM>(_world, k_wf.size());\n            complex_derivative_3d Dx(_world,0);\n            complex_derivative_3d Dy(_world,1);\n            complex_derivative_3d Dz(_world,2);\n            for (unsigned int i = 0; i < k_wf.size(); i++)\n            {\n              // gradient\n              functionT dx_wf = Dx(k_wf[i]);\n              functionT dy_wf = Dy(k_wf[i]);\n              functionT dz_wf = Dz(k_wf[i]);\n              d_wf[i] = std::complex<T>(0.0,k0)*dx_wf +\n                        std::complex<T>(0.0,k1)*dy_wf +\n                        std::complex<T>(0.0,k2)*dz_wf;\n              // k^/2\n              double ksq = k0*k0 + k1*k1 + k2*k2;\n              k_vwf[i] += 0.5 * ksq * k_wf[i];\n              k_vwf[i] -= d_wf[i];\n            }\n          }\n\n          // WSTHORNTON (new code)\n          unsigned int eimax = -1;\n          double eimaxval = -1e10;\n          for (unsigned int ei = kpoint.begin, fi = 0; ei < kpoint.end;\n            ei++, fi++)\n          {\n            if ((real(e(fi,fi)) > 0.0) && (real(e(fi,fi)) > eimaxval))\n            {\n              eimax = fi;\n              eimaxval = real(e(fi,fi));\n            }\n          }\n\n          double eshift = (eimaxval > 0.0) ? eimaxval + 0.1 : 0.0;\n          for (unsigned int ei = kpoint.begin, fi = 0; ei < kpoint.end;\n            ei++, fi++)\n          {\n            // Save the latest eigenvalues\n            eigs[ei] = real(e(fi,fi));\n            alpha[ei] = e(fi,fi)-eshift;\n            k_vwf[fi] += (alpha[ei]-eigs[ei])*k_wf[fi];\n          }\n\n          if (_world.rank() == 0)\n          {\n            _eigF << \"kpt: \" << kp << endl;\n            _eigF << setfill('-') << setw(20) << \" \" << endl;\n            for (unsigned int ei = kpoint.begin; ei < kpoint.end; ei++)\n            {\n              char eigstr[50];\n              printf(\"%3d%15.10f\",ei,real(eigs[ei]));\n//              _eigF << ei << setfill(' ') << setw(12) << real(eigs[ei]) << endl;\n              _eigF << eigstr << endl;\n            }\n            _eigF << \"\\n\\n\" << endl;\n          }\n        }\n        else // non-canonical orbitals\n        {\n          // diagonlize just to print eigenvalues\n          tensorT overlap = matrix_inner(_world, k_wf, k_wf, true);\n          ctensorT c; rtensorT e;\n          sygv(fock, overlap, 1, c, e);\n          for (unsigned int ei = 0; ei < e.dim(0); ei++)\n          {\n            double diffe = (ei == 0) ? 0.0 : real(e(ei,ei))-real(e(ei-1,ei-1));\n            if (_world.rank() == 0)\n              print(\"kpoint \", kp, \"ei \", ei, \"eps \", real(e(ei,ei)), \"\\tdiff\\t\", diffe);\n          }\n\n          for (unsigned int ei = kpoint.begin, fi = 0;\n            ei < kpoint.end; ei++, fi++)\n          {\n            alpha[ei] = std::min(-0.1, real(fock(fi,fi)));\n            fock(fi,fi) -= std::complex<T>(alpha[ei], 0.0);\n          }\n\n          std::vector<functionT> fwf = transform(_world, k_wf, fock, trantol);\n          gaxpy(_world, 1.0, k_vwf, -1.0, fwf);\n          fwf.clear();\n        }\n        for (unsigned int wi = kpoint.begin, fi = 0; wi < kpoint.end;\n          wi++, fi++)\n        {\n          wf[wi] = k_wf[fi];\n          vwf[wi] = k_vwf[fi];\n        }\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void do_rhs_simple(vecfuncT& wf,\n                vecfuncT& vwf,\n                std::vector<KPoint> kpoints,\n                std::vector<T>& alpha,\n                std::vector<double>& eigs)\n    {\n      // tolerance\n      double trantol = 0.1*_params.thresh/std::min(30.0,double(wf.size()));\n      double thresh = 1e-4;\n\n      if (_world.rank() == 0) _eigF << \"Iteration: \" << _it << endl;\n      for (unsigned int kp = 0; kp < kpoints.size(); kp++)\n      {\n        // Get k-point and orbitals for this k-point\n        KPoint kpoint = kpoints[kp];\n        double k0 = kpoint.k[0];\n        double k1 = kpoint.k[1];\n        double k2 = kpoint.k[2];\n        // Extract the relevant portion of the list of orbitals and the list of the\n        // V times the orbitals\n        vecfuncT k_wf(wf.begin() + kpoint.begin, wf.begin() + kpoint.end);\n        vecfuncT k_vwf(vwf.begin() + kpoint.begin, vwf.begin() + kpoint.end);\n\n        // Build fock matrix\n        tensorT fock = build_fock_matrix(k_wf, k_vwf, kpoint);\n        tensorT overlap = matrix_inner(_world, k_wf, k_wf, true);\n        for (unsigned int i = 0; i < k_wf.size(); i++)\n          fock(i,i) += std::complex<double>(i*_params.thresh*0.1,0.0);\n\n        ctensorT U; rtensorT e;\n        sygv(fock, overlap, 1, U, e);\n\n        if (_params.print_matrices && _world.rank() == 0)\n        {\n            printf(\"(%10.5f, %10.5f, %10.5f)\\n\", k0, k1, k2);\n            print(\"Overlap matrix:\");\n            print(overlap);\n\n            print(\"Fock matrix:\");\n            print(fock);\n\n            print(\"U matrix: (eigenvectors)\");\n            print(U);\n\n            print(\"Fock matrix eigenvalues:\");\n            print(e);\n        }\n\n\n        // this is all of the B.S. for the solver\n        if (_params.solver == 1)\n        {\n          unsigned int nmo = k_wf.size();\n          // Fix phases.\n          long imax;\n          for (long j = 0; j < nmo; j++)\n          {\n              // Get index of largest value in column\n              U(_,j).absmax(&imax);\n              T ang = arg(U(imax,j));\n              std::complex<T> phase = exp(std::complex<T>(0.0,-ang));\n              // Loop through the rest of the column and divide by the phase\n              for (long i = 0; i < nmo; i++)\n              {\n                U(i,j) *= phase;\n              }\n          }\n\n          // Within blocks with the same occupation number attempt to\n          // keep orbitals in the same order (to avoid confusing the\n          // non-linear solver).  Have to run the reordering multiple\n          // times to handle multiple degeneracies.\n          int maxpass = 5;\n          for (int pass = 0; pass < maxpass; pass++)\n          {\n              long j;\n              for (long i = 0; i < nmo; i++)\n              {\n                U(_, i).absmax(&j);\n                if (i != j)\n                {\n                  tensorT tmp = copy(U(_, i));\n                  U(_, i) = U(_, j);\n                  U(_, j) = tmp;\n                  //swap(e[i], e[j]);\n                  T ti = e[i];\n                  T tj = e[j];\n                  e[i] = tj; e[j] = ti;\n                }\n              }\n          }\n\n          // Rotations between effectively degenerate states confound\n          // the non-linear equation solver ... undo these rotations\n          long ilo = 0; // first element of cluster\n          while (ilo < nmo-1) {\n              long ihi = ilo;\n              while (fabs(real(e[ilo]-e[ihi+1])) < thresh*10.0*max(fabs(real(e[ilo])),1.0)) {\n                  ihi++;\n                  if (ihi == nmo-1) break;\n              }\n              long nclus = ihi - ilo + 1;\n              if (nclus > 1) {\n                  if (_world.rank() == 0) print(\"   found cluster\", ilo, ihi);\n                  tensorT q = copy(U(Slice(ilo,ihi),Slice(ilo,ihi)));\n                  //print(q);\n                  // Special code just for nclus=2\n                  // double c = 0.5*(q(0,0) + q(1,1));\n                  // double s = 0.5*(q(0,1) - q(1,0));\n                  // double r = sqrt(c*c + s*s);\n                  // c /= r;\n                  // s /= r;\n                  // q(0,0) = q(1,1) = c;\n                  // q(0,1) = -s;\n                  // q(1,0) = s;\n\n                  // Iteratively construct unitary rotation by\n                  // exponentiating the antisymmetric part of the matrix\n                  // ... is quadratically convergent so just do 3\n                  // iterations\n                  ctensorT rot = matrix_exponential(-0.5*(q - conj_transpose(q)));\n                  q = inner(q,rot);\n                  ctensorT rot2 = matrix_exponential(-0.5*(q - conj_transpose(q)));\n                  q = inner(q,rot2);\n                  ctensorT rot3 = matrix_exponential(-0.5*(q - conj_transpose(q)));\n                  q = inner(rot,inner(rot2,rot3));\n                  U(_,Slice(ilo,ihi)) = inner(U(_,Slice(ilo,ihi)),q);\n              }\n              ilo = ihi+1;\n          }\n        }\n\n        // transform orbitals and V * (orbitals)\n        k_vwf = transform(_world, k_vwf, U, 1e-5 / std::min(30.0, double(k_wf.size())), false);\n        k_wf = transform(_world, k_wf, U, FunctionDefaults<3>::get_thresh() / std::min(30.0, double(k_wf.size())), true);\n\n        // Do right hand side stuff for kpoint\n        bool isgamma = (is_equal(k0,0.0,1e-5) &&\n                        is_equal(k1,0.0,1e-5) &&\n                        is_equal(k2,0.0,1e-5));\n        if (_params.periodic && !isgamma) // Non-zero k-point\n        {\n          // Do the gradient term and k^2/2\n          vecfuncT d_wf = zero_functions_compressed<valueT,NDIM>(_world, k_wf.size());\n          complex_derivative_3d Dx(_world,0);\n          complex_derivative_3d Dy(_world,1);\n          complex_derivative_3d Dz(_world,2);\n          for (unsigned int i = 0; i < k_wf.size(); i++)\n          {\n            // gradient\n            functionT dx_wf = Dx(k_wf[i]);\n            functionT dy_wf = Dy(k_wf[i]);\n            functionT dz_wf = Dz(k_wf[i]);\n\n            // WSTHORNTON\n//            double delxx = std::abs(inner(k_wf[i],Dx(Dx(k_wf[i]))));\n//            double delyy = std::abs(inner(k_wf[i],Dy(Dy(k_wf[i]))));\n//            double delzz = std::abs(inner(k_wf[i],Dz(Dz(k_wf[i]))));\n\n//            if (_world.rank() == 0)\n//              printf(\"orb %2.2d  delxx:  %15.8e  delyy:  %15.8e  delzz:  %15.8e\\n\",i, delxx, delyy, delzz);\n\n            // WSTHORNTON\n//            std::vector<long> npt(3,101);\n//            char fnamedx[50];\n//            sprintf(fnamedx, \"xorb%2.2d__.dx\",i);\n//            plotdx(k_wf[i], fnamedx, FunctionDefaults<3>::get_cell(), npt);\n//\n//            char fnamedx_dx[50];\n//            sprintf(fnamedx_dx, \"xorb%2.2d__dx.dx\",i);\n//            plotdx(dx_wf, fnamedx_dx, FunctionDefaults<3>::get_cell(), npt);\n//            char fnamedx_dy[50];\n//            sprintf(fnamedx_dy, \"xorb%2.2d__dy.dx\",i);\n//            plotdx(dy_wf, fnamedx_dy, FunctionDefaults<3>::get_cell(), npt);\n//            char fnamedx_dz[50];\n//            sprintf(fnamedx_dz, \"xorb%2.2d__dz.dx\",i);\n//            plotdx(dz_wf, fnamedx_dz, FunctionDefaults<3>::get_cell(), npt);\n//\n//            rfunctionT xfunc = rfactoryT(_world).functor(\n//              rfunctorT(new DipoleFunctor(0))).\n//                thresh(_params.thresh).truncate_on_project();\n//            rfunctionT yfunc = rfactoryT(_world).functor(\n//              rfunctorT(new DipoleFunctor(1))).\n//                thresh(_params.thresh).truncate_on_project();\n//            rfunctionT zfunc = rfactoryT(_world).functor(\n//              rfunctorT(new DipoleFunctor(2))).\n//                thresh(_params.thresh).truncate_on_project();\n//\n//            double xdip = std::abs(inner(k_wf[i],xfunc*k_wf[i]));\n//            double ydip = std::abs(inner(k_wf[i],yfunc*k_wf[i]));\n//            double zdip = std::abs(inner(k_wf[i],zfunc*k_wf[i]));\n//\n//            if (_world.rank() == 0)\n//              printf(\"orb: %1d     dipole moment: (%7.5e,%7.5e,%7.5e)\\n\",i,xdip,ydip,zdip);\n//\n//            double xdip1 = std::real(inner(k_wf[i],xfunc*k_wf[i]));\n//            double ydip1 = std::real(inner(k_wf[i],yfunc*k_wf[i]));\n//            double zdip1 = std::real(inner(k_wf[i],zfunc*k_wf[i]));\n//\n//            if (_world.rank() == 0)\n//              printf(\"orb: %1d     dipole moment: (%7.5e,%7.5e,%7.5e)\\n\",i,xdip1,ydip1,zdip1);\n//\n//            double xdip2 = std::imag(inner(k_wf[i],xfunc*k_wf[i]));\n//            double ydip2 = std::imag(inner(k_wf[i],yfunc*k_wf[i]));\n//            double zdip2 = std::imag(inner(k_wf[i],zfunc*k_wf[i]));\n//\n//            if (_world.rank() == 0)\n//              printf(\"orb: %1d     dipole moment: (%7.5e,%7.5e,%7.5e)\\n\\n\\n\",i,xdip2,ydip2,zdip2);\n//\n//            // WSTHORNTON\n//            char fname_x[50];\n//            char fname_y[50];\n//            char fname_z[50];\n//\n//            char fnamex_x[50];\n//            char fnamex_y[50];\n//            char fnamex_z[50];\n//\n//            char fnamey_x[50];\n//            char fnamey_y[50];\n//            char fnamey_z[50];\n//\n//            char fnamez_x[50];\n//            char fnamez_y[50];\n//            char fnamez_z[50];\n//\n//            sprintf(fname_x, \"orb%2.2d__x.dat\",i);\n//            sprintf(fname_y, \"orb%2.2d__y.dat\",i);\n//            sprintf(fname_z, \"orb%2.2d__z.dat\",i);\n//\n//            sprintf(fnamex_x, \"orb%2.2d_dx_x.dat\",i);\n//            sprintf(fnamex_y, \"orb%2.2d_dx_y.dat\",i);\n//            sprintf(fnamex_z, \"orb%2.2d_dx_z.dat\",i);\n//\n//            sprintf(fnamey_x, \"orb%2.2d_dy_x.dat\",i);\n//            sprintf(fnamey_y, \"orb%2.2d_dy_y.dat\",i);\n//            sprintf(fnamey_z, \"orb%2.2d_dy_z.dat\",i);\n//\n//            sprintf(fnamez_x, \"orb%2.2d_dz_x.dat\",i);\n//            sprintf(fnamez_y, \"orb%2.2d_dz_y.dat\",i);\n//            sprintf(fnamez_z, \"orb%2.2d_dz_z.dat\",i);\n//\n//            coord_3d pt1x {-_params.L/2,0.0,0.0};\n//            coord_3d pt2x { _params.L/2,0.0,0.0};\n//\n//            coord_3d pt1y {0.0,-_params.L/2,0.0};\n//            coord_3d pt2y {0.0, _params.L/2,0.0};\n//\n//            coord_3d pt1z {0.0,0.0,-_params.L/2};\n//            coord_3d pt2z {0.0,0.0, _params.L/2};\n//\n//            plot_line(fname_x,30000,pt1x,pt2x,k_wf[i]);\n//            plot_line(fname_y,30000,pt1y,pt2y,k_wf[i]);\n//            plot_line(fname_z,30000,pt1z,pt2z,k_wf[i]);\n//\n//            plot_line(fnamex_x,30000,pt1x,pt2x,dx_wf);\n//            plot_line(fnamex_y,30000,pt1y,pt2y,dx_wf);\n//            plot_line(fnamex_z,30000,pt1z,pt2z,dx_wf);\n//\n//            plot_line(fnamey_x,30000,pt1x,pt2x,dy_wf);\n//            plot_line(fnamey_y,30000,pt1y,pt2y,dy_wf);\n//            plot_line(fnamey_z,30000,pt1z,pt2z,dy_wf);\n//\n//            plot_line(fnamez_x,30000,pt1x,pt2x,dz_wf);\n//            plot_line(fnamez_y,30000,pt1y,pt2y,dz_wf);\n//            plot_line(fnamez_z,30000,pt1z,pt2z,dz_wf);\n\n\n\n            d_wf[i] = std::complex<T>(0.0,k0)*dx_wf +\n                      std::complex<T>(0.0,k1)*dy_wf +\n                      std::complex<T>(0.0,k2)*dz_wf;\n            // k^/2\n            double ksq = k0*k0 + k1*k1 + k2*k2;\n            k_vwf[i] += 0.5 * ksq * k_wf[i];\n            k_vwf[i] -= d_wf[i];\n          }\n        }\n\n\n        // WSTHORNTON (new code)\n        unsigned int eimax = -1;\n        double eimaxval = -1e10;\n        for (unsigned int ei = kpoint.begin, fi = 0; ei < kpoint.end;\n          ei++, fi++)\n        {\n          if ((real(e(fi,fi)) > 0.0) && (real(e(fi,fi)) > eimaxval))\n          {\n            eimax = fi;\n            eimaxval = real(e(fi,fi));\n          }\n        }\n\n        double eshift = (eimaxval > 0.0) ? eimaxval + 0.1 : 0.0;\n        for (unsigned int ei = kpoint.begin, fi = 0; ei < kpoint.end;\n          ei++, fi++)\n        {\n          // Save the latest eigenvalues\n          eigs[ei] = real(e(fi,fi));\n          alpha[ei] = e(fi,fi)-eshift;\n          k_vwf[fi] += (alpha[ei]-eigs[ei])*k_wf[fi];\n        }\n\n//        if (_world.rank() == 0) printf(\"do_rhs_simple: (3) ...\\n\\n\");\n//        print_fock_matrix_eigs(k_wf, k_vwf, kpoint_gamma);\n\n        if (_world.rank() == 0)\n        {\n          _eigF << \"kpt: \" << kp << endl;\n          _eigF << setfill('-') << setw(20) << \" \" << endl;\n          for (unsigned int ei = kpoint.begin; ei < kpoint.end; ei++)\n          {\n            char eigstr[50];\n            sprintf(eigstr,\"%3d%15.10f\",ei,real(eigs[ei]));\n            _eigF << eigstr << endl;\n          }\n          _eigF << \"\\n\\n\" << endl;\n        }\n        for (unsigned int wi = kpoint.begin, fi = 0; wi < kpoint.end;\n          wi++, fi++)\n        {\n          wf[wi] = k_wf[fi];\n          vwf[wi] = k_vwf[fi];\n        }\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    tensor_complex make_kinetic_matrix(World& world, const vector_complex_function_3d& v, const KPoint& k) {\n        const double_complex I = double_complex(0.0,1.0);\n        double kx = k.k[0];\n        double ky = k.k[1];\n        double kz = k.k[2];\n\n        complex_derivative_3d Dx(world, 0);\n        complex_derivative_3d Dy(world, 1);\n        complex_derivative_3d Dz(world, 2);\n\n        vector_complex_function_3d dvx = apply(world, Dx, v);\n        vector_complex_function_3d dvy = apply(world, Dy, v);\n        vector_complex_function_3d dvz = apply(world, Dz, v);\n\n        // -1/2 (del + ik)^2 = -1/2 del^2 - i k.del + 1/2 k^2\n        // -1/2 <p|del^2|q> = +1/2 <del p | del q>\n\n        tensor_complex f1 = 0.5 * (matrix_inner(world, dvx, dvx, true) +\n                                   matrix_inner(world, dvy, dvy, true) +\n                                   matrix_inner(world, dvz, dvz, true));\n\n        tensor_complex f2 =\n            (-I*kx)*matrix_inner(world, v, dvx, false) +\n            (-I*ky)*matrix_inner(world, v, dvy, false) +\n            (-I*kz)*matrix_inner(world, v, dvz, false);\n\n        tensor_complex f3 = (0.5 * (kx*kx + ky*ky + kz*kz)) * matrix_inner(world, v, v, true);\n\n        return f1 + f2 + f3;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    tensorT build_fock_matrix(vecfuncT& psi,\n                              vecfuncT& vpsi,\n                              KPoint kpoint)\n    {\n      // Build the potential matrix\n      START_TIMER(_world);\n      tensorT potential = matrix_inner(_world, psi, vpsi, true);\n      _world.gop.fence();\n      END_TIMER(_world,\"potential energy matrix\");\n      if (_world.rank()==0) printf(\"\\n\");\n\n      START_TIMER(_world);\n      if (_world.rank() == 0) _outputF << \"Building kinetic energy matrix ...\\n\\n\" << endl;\n        tensorT kinetic = ::kinetic_energy_matrix<T,NDIM>(_world, psi,\n                                                  _params.periodic,\n                                                  kpoint);\n      tensorT kinetic2 = make_kinetic_matrix(_world, psi, kpoint);\n      _world.gop.fence();\n      END_TIMER(_world,\"kinetic energy matrix\");\n      if (_world.rank() == 0) printf(\"\\n\");\n\n      if (_world.rank() == 0) _outputF << \"Constructing Fock matrix ...\\n\\n\" << endl;\n      tensorT fock = potential + kinetic;\n      fock = 0.5 * (fock + conj_transpose(fock));\n      _world.gop.fence();\n\n      if (_world.rank() == 0)\n      {\n        print(\"KINETIC:\");\n        print(kinetic);\n        print(\"KINETIC2:\");\n        print(kinetic2);\n        print(\"POTENTIAL:\");\n        print(potential);\n        print(\"FOCK:\");\n        print(fock);\n      }\n\n      return fock;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void gram_schmidt(vecfuncT& f, KPoint kpoint)\n    {\n      for (unsigned int fi = kpoint.begin; fi < kpoint.end; ++fi)\n      {\n        // Project out the lower states\n        for (unsigned int fj = kpoint.begin; fj < fi; ++fj)\n        {\n          valueT overlap = inner(f[fj], f[fi]);\n          f[fi] -= overlap*f[fj];\n        }\n        f[fi].scale(1.0/f[fi].norm2());\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    /// Given overlap matrix, return rotation with 3rd order error to orthonormalize the vectors\n    tensorT Q3(const tensorT& s) {\n        tensorT Q = inner(s,s);\n        Q.gaxpy(0.2,s,-2.0/3.0);\n        for (int i=0; i<s.dim(0); ++i) Q(i,i) += 1.0;\n        return Q.scale(15.0/8.0);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    /// Computes matrix square root (not used any more?)\n    ctensorT csqrt(const ctensorT& s, double tol=1e-8) {\n        int n=s.dim(0), m=s.dim(1);\n        MADNESS_ASSERT(n==m);\n        ctensorT c; rtensorT e;\n        //s.gaxpy(0.5,conj_transpose(s),0.5); // Ensure exact symmetry\n        syev(s, c, e);\n        for (int i=0; i<n; ++i) {\n            if (e(i) < -tol) {\n                MADNESS_EXCEPTION(\"Matrix square root: negative eigenvalue\",i);\n            }\n            else if (e(i) < tol) { // Ugh ..\n                print(\"Matrix square root: Warning: small eigenvalue \", i, e(i));\n                e(i) = tol;\n            }\n            e(i) = 1.0/sqrt(e(i));\n        }\n        for (int j=0; j<n; ++j) {\n            for (int i=0; i<n; ++i) {\n                c(j,i) *= e(i);\n            }\n        }\n        return c;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void orthonormalize(vecfuncT& wf, KPoint kpoint)\n    {\n      // extract k-point orbitals\n      vecfuncT k_wf(wf.begin() + kpoint.begin, wf.begin() + kpoint.end);\n      ctensorT S = matrix_inner(_world,k_wf,k_wf,true);\n      printf(\"orthonormalize: \\n\");\n      printf(\"before matrix (after): \\n\");\n      print(S);\n      ctensorT U = csqrt(S);\n      k_wf = transform(_world, k_wf, U, _params.thresh, true);\n\n      ctensorT S2 = matrix_inner(_world,k_wf,k_wf,true);\n      printf(\"overlap matrix (after): \\n\");\n      print(S2);\n      for (unsigned int wi = kpoint.begin, fi = 0; wi < kpoint.end;\n        wi++, fi++)\n      {\n        wf[wi] = k_wf[fi];\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    vecfuncT compute_residual(const vecfuncT& awfs,\n                              const vecfuncT& bwfs)\n    {\n      // vector of residual functions\n      vecfuncT rm = sub(_world, _phisa, awfs);\n      // if spin-polarized insert beta spin-orbital residual functions\n      if (_params.spinpol)\n      {\n        vecfuncT br = sub(_world, _phisb, bwfs);\n        rm.insert(rm.end(), br.begin(), br.end());\n      }\n      // scalar residual\n      std::vector<double> rnvec = norm2s<valueT,NDIM>(_world, rm);\n      double rnorm = 0.0;\n      for (unsigned int i = 0; i < rnvec.size(); i++) rnorm += rnvec[i];\n      // renormalize and print\n      _residual = rnorm / rnvec.size();\n      if (_world.rank() == 0) _outputF << \"\\nResiduals\\n---------\" << endl;\n      if (_world.rank() == 0) _outputF << std::setiosflags(std::ios::scientific) << \"residual = \" << _residual << endl;\n      if (_world.rank() == 0)\n      {\n        _outputF << endl;\n        for (unsigned int i = 0; i < rnvec.size(); i++)\n        {\n          _outputF << \"residual\" << i << \"\\t\" << rnvec[i] << endl;\n        }\n        _outputF << endl;\n      }\n\n      return rm;\n    }\n\n    //*************************************************************************\n    void update_orbitals(vecfuncT& awfs,\n                         vecfuncT& bwfs,\n                         std::vector<KPoint> kpoints)\n    {\n      // truncate before we do anyting\n      truncate<valueT,NDIM> (_world, awfs);\n      truncate<valueT,NDIM> (_world, _phisa);\n      if (_params.spinpol)\n      {\n        truncate<valueT,NDIM> (_world, bwfs);\n        truncate<valueT,NDIM> (_world, _phisb);\n      }\n      // compute residual\n      vecfuncT rm = compute_residual(awfs, bwfs);\n      if (_params.solver > 0 && _params.maxsub > 1)\n      {\n        // nonlinear solver\n        _subspace->update_subspace(awfs, bwfs, _phisa, _phisb, rm);\n      }\n\n      // do step restriction\n      step_restriction(_phisa, awfs, 0);\n      if (_params.spinpol)\n      {\n        step_restriction(_phisb, bwfs, 1);\n      }\n      // do gram-schmidt\n      for (unsigned int kp = 0; kp < kpoints.size(); kp++)\n      {\n        gram_schmidt(awfs, kpoints[kp]);\n//        orthonormalize(awfs, kpoints[kp]);\n        if (_params.spinpol)\n        {\n          gram_schmidt(bwfs, kpoints[kp]);\n//          orthonormalize(bwfs, kpoints[kp]);\n        }\n      }\n\n      // update alpha and beta orbitals\n      truncate<valueT,NDIM>(_world, awfs);\n      for (unsigned int ai = 0; ai < awfs.size(); ai++) {\n          _phisa[ai] = awfs[ai].scale(1.0 / awfs[ai].norm2());\n      }\n      if (_params.spinpol)\n      {\n        truncate<valueT,NDIM>(_world, bwfs);\n        for (unsigned int bi = 0; bi < bwfs.size(); bi++)\n        {\n            _phisb[bi] = bwfs[bi].scale(1.0 / bwfs[bi].norm2());\n        }\n      }\n      else\n      {\n        for (unsigned int ia = 0; ia < awfs.size(); ia++)\n        {\n          _phisb[ia] = _phisa[ia];\n        }\n      }\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void step_restriction(vecfuncT& owfs,\n                          vecfuncT& nwfs,\n                          int aorb)\n    {\n      double s = (_it < 4) ? 0.75 : _params.sd;\n      if (_world.rank() == 0) print(\"damping factor: \", s);\n      for (unsigned int i = 0; i < owfs.size(); i++)\n          nwfs[i].gaxpy(1.0 - s, owfs[i], s, false);\n//      std::vector<double> rnorm = norm2s(_world, sub(_world, owfs, nwfs));\n//      // Step restriction\n//      int nres = 0;\n//      for (unsigned int i = 0; i < owfs.size(); i++)\n//      {\n//        if (rnorm[i] > _params.maxrotn)\n//        {\n//          double s = _params.maxrotn / rnorm[i];\n//          nres++;\n//          if (_world.rank() == 0)\n//          {\n//            if (!aorb && nres == 1) _outputF << \"  restricting step for alpha orbitals:\" << endl;\n//            if (aorb && nres == 1) _outputF << \"  restricting step for beta orbitals:\" << endl;\n//            _outputF << i;\n//          }\n//          nwfs[i].gaxpy(s, owfs[i], 1.0 - s, false);\n//        }\n//      }\n//      if (nres > 0 && _world.rank() == 0) printf(\"\\n\");\n//      _world.gop.fence();\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    void fix_occupations(const std::vector<T>& eps,\n                         std::vector<double>& occs)\n    {\n      // Find max/min eigenvalues\n      double emax = eps[0];\n      double emin = emax;\n      for (int i = 0; i < eps.size(); i++)\n      {\n        emax = (eps[i] > emax) ? eps[i] : emax;\n        emin = (eps[i] < emin) ? eps[i] : emin;\n      }\n\n      int maxits = 1000;\n      // This is hardcoded to 2.0 (non-spinpolarized case) for now.\n      double occmax = 2.0;\n      // Fermi energy\n      double efermi = 0.0;\n      // Use bisection method to find the fermi energy and update occupation numbers\n      bool bstop = false;\n      // Some smoothing parameter\n      double t1 = 1.0/_params.swidth;\n      for (int it = 0; (it < maxits)&&(!bstop); it++)\n      {\n        // Proposed fermi energy\n        efermi = 0.5 * (emax + emin);\n        // Accumulated charge\n        double charge = 0.0;\n        // Loop over all eigenvalues and count the charge\n        for (int i = 0; i < eps.size(); i++)\n        {\n          double x = (efermi-eps[i]) * t1;\n          // need to add some smearing function here\n          occs[i] = occmax*stheta_fd(x);\n          charge += _kpoints[i].weight() * occs[i];\n        }\n        if (fabs(emax-emin) < 1e-5)\n          bstop = true;\n        else if (charge < _params.ncharge)\n          emin = efermi;\n        else\n          emax = efermi;\n      }\n    }\n    //*************************************************************************\n\n//    //*************************************************************************\n//    void update_eigenvalues(const vecfuncT& wavefs,\n//        const vecfuncT& pfuncs, const vecfuncT& phis,\n//        std::vector<T>& eigs)\n//    {\n//      // Update e\n//      if (_world.rank() == 0) printf(\"Updating e ...\\n\\n\");\n//      for (unsigned int ei = 0; ei < eigs.size(); ei++)\n//      {\n//        functionT r = wavefs[ei] - phis[ei];\n//        double tnorm = wavefs[ei].norm2();\n//        // Compute correction to the eigenvalues\n//        T ecorrection = -0.5*real(inner(pfuncs[ei], r)) / (tnorm*tnorm);\n//        T eps_old = eigs[ei];\n//        T eps_new = eps_old + ecorrection;\n////        if (_world.rank() == 0) printf(\"ecorrection = %.8f\\n\\n\", ecorrection);\n////        if (_world.rank() == 0) printf(\"eps_old = %.8f eps_new = %.8f\\n\\n\", eps_old, eps_new);\n//        // Sometimes eps_new can go positive, THIS WILL CAUSE THE ALGORITHM TO CRASH. So,\n//        // I bounce the new eigenvalue back into the negative side of the real axis. I\n//        // keep doing this until it's good or I've already done it 10 times.\n//        int counter = 50;\n//        while (eps_new >= 0.0 && counter < 20)\n//        {\n//          // Split the difference between the new and old estimates of the\n//          // pi-th eigenvalue.\n//          eps_new = eps_old + 0.5 * (eps_new - eps_old);\n//          counter++;\n//        }\n//        // Still no go, forget about it. (1$ to Donnie Brasco)\n//        if (eps_new >= 0.0)\n//        {\n//          if (_world.rank() == 0) printf(\"FAILURE OF WST: exiting!!\\n\\n\");\n//          _exit(0);\n//        }\n//        // Set new eigenvalue\n//        eigs[ei] = eps_new;\n//      }\n//    }\n//    //*************************************************************************\n\n//    //*************************************************************************\n//    double get_eig(int indx)\n//    {\n//      return _solver->get_eig(indx);\n//    }\n//    //*************************************************************************\n//\n//    //*************************************************************************\n//    functionT get_phi(int indx)\n//    {\n//      return _solver->get_phi(indx);\n//    }\n//    //*************************************************************************\n//\n//    //*************************************************************************\n//    const std::vector<double>& eigs()\n//    {\n//      return _solver->eigs();\n//    }\n//    //*************************************************************************\n//\n//    //*************************************************************************\n//    const vecfuncT& phis()\n//    {\n//      return _solver->phis();\n//    }\n//    //*************************************************************************\n\n  };\n  //***************************************************************************\n\n}\n#define SOLVER_H_\n\n#endif /* SOLVER_H_ */\n"
  },
  {
    "path": "src/apps/periodic_old/solver_driver.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include \"electronicstructureapp.h\"\n#include \"solver.h\"\n\nusing namespace madness;\n\nint main(int argc, char** argv)\n{\n    initialize(argc, argv);\n\n    World world(SafeMPI::COMM_WORLD);\n\n    try {\n        // Load info for MADNESS numerical routines\n        startup(world,argc,argv);\n        std::cout.precision(6);\n        FunctionDefaults<3>::set_pmap(pmapT(new LevelPmap(world)));\n\n\n//        // Process 0 reads input information and broadcasts\n//        ElectronicStructureApp app(world, \"input\");\n//\n//        // Warm and fuzzy for the user\n//        if (world.rank() == 0) {\n//            print(\"\\n\\n\");\n//            print(\" MADNESS Hartree-Fock and Density Functional Theory Program\");\n//            print(\" ----------------------------------------------------------\\n\");\n//            print(\"\\n\");\n//            app.entity().print();\n//            print(\"\\n\");\n//            //app.params().print(world);\n//        }\n//\n//        app.make_nuclear_potential();\n//        app.initial_guess();\n//        ElectronicStructureParams params = app.params();\n//        Function<double,3> vnucrhon = app.vnucrhon();\n//        vecfuncT orbs = app.orbitals();\n//        std::vector<double> eigs;\n//        std::vector< Function< std::complex<double>,3> > phis;\n//        std::vector<double> tmpe = app.eigs();\n//        print(tmpe);\n//        int neps = eigs.size();\n//        for (int i = 0; i < neps; i++)\n//        {\n//          phis.push_back(orbs[i]);\n//          eigs.push_back(tmpe[i]);\n//        }\n//\n//        Solver<double,3> dftcalc(world, vnucrhon, app.orbitals(), app.eigs(),\n//                                 app.kpoints(), app.occs(), app.params(),\n//                                 app.entity());\n\n        Solver<double,3> dftcalc(world, \"input\");\n        dftcalc.solve();\n        world.gop.fence();\n\n    } catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    } catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    } catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    } catch (const char* s) {\n        print(s);\n        error(\"caught a string exception\");\n    } catch (char* s) {\n        print(s);\n        error(\"caught a string exception\");\n    } catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    } catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    } catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    finalize();\n\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/periodic_old/sto-3g",
    "content": "<?xml version=\"1.0\" ?>\n<name>\nSTO-3G\n</name>\n<basis symbol=\"H\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      3.425250910\n      0.623913730\n      0.168855400\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n</basis>\n<basis symbol=\"He\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      6.362421390\n      1.158923000\n      0.313649790\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Li\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     16.119575000\n      2.936200700\n      0.794650500\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.636289700\n      0.147860100\n      0.048088700\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Be\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     30.167871000\n      5.495115300\n      1.487192700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.314833100\n      0.305538900\n      0.099370700\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"B\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     48.791113000\n      8.887362200\n      2.405267000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.236956100\n      0.519820500\n      0.169061800\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"C\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     71.616837000\n     13.045096000\n      3.530512200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.941249400\n      0.683483100\n      0.222289900\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"N\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     99.106169000\n     18.052312000\n      4.885660200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.780455900\n      0.878496600\n      0.285714400\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"O\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    130.709320000\n     23.808861000\n      6.443608300\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.033151300\n      1.169596100\n      0.380389000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"F\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    166.679130000\n     30.360812000\n      8.216820700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.464803200\n      1.502281200\n      0.488588500\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ne\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    207.015610000\n     37.708151000\n     10.205297000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      8.246315100\n      1.916266200\n      0.623229300\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Na\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    250.772430000\n     45.678511000\n     12.362388000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     12.040193000\n      2.797881900\n      0.909958000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.478740600\n      0.412564900\n      0.161475100\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Mg\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    299.237400000\n     54.506470000\n     14.751580000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     15.121820000\n      3.513987000\n      1.142857000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.395448000\n      0.389326000\n      0.152380000\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Al\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    351.421476700\n     64.011860670\n     17.324107610\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     18.899396210\n      4.391813233\n      1.428353970\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.395448293\n      0.389326532\n      0.152379766\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Si\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    407.797551400\n     74.280833050\n     20.103292290\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     23.193656060\n      5.389706871\n      1.752899952\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.478740622\n      0.412564880\n      0.161475098\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"P\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    468.365637800\n     85.313385590\n     23.089131560\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     28.032639580\n      6.514182577\n      2.118614352\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.743103231\n      0.486321377\n      0.190342891\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"S\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    533.125735900\n     97.109518300\n     26.281625420\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     33.329751730\n      7.745117521\n      2.518952599\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.029194274\n      0.566140052\n      0.221583379\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Cl\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    601.345613600\n    109.535854200\n     29.644676860\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     38.960418890\n      9.053563477\n      2.944499834\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.129386495\n      0.594093427\n      0.232524141\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ar\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    674.446518400\n    122.851275300\n     33.248349450\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     45.164243920\n     10.495199000\n      3.413364448\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.621366518\n      0.731354605\n      0.286247236\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"K\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    771.510368100\n    140.531576600\n     38.033328990\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     52.402039790\n     12.177107100\n      3.960373165\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.651583985\n      1.018782663\n      0.398744630\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.503982251\n      0.186001147\n      0.082140067\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ca\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    854.032495100\n    155.563085100\n     42.101441790\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     59.560299440\n     13.840532700\n      4.501370797\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.374706256\n      1.220531941\n      0.477707930\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.455848976\n      0.168236941\n      0.074295207\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Sc\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    941.662425000\n    171.524986200\n     46.421355160\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     67.176687710\n     15.610417540\n      5.076992278\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.698159231\n      1.433088313\n      0.552930024\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      0.551700068\n      0.168286106\n      0.064930011\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.630932838\n      0.232853898\n      0.102830736\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ti\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1033.571245000\n    188.266292600\n     50.952206010\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     75.251204600\n     17.486761620\n      5.687237606\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.395535474\n      1.645810296\n      0.635004777\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      1.645981194\n      0.502076728\n      0.193716810\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.712264025\n      0.262870220\n      0.116086261\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"V\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1130.762517000\n    205.969804100\n     55.743467110\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     83.783850110\n     19.469564930\n      6.332106784\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.141151276\n      1.873246881\n      0.722756883\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.964817927\n      0.904363968\n      0.348931734\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.712264025\n      0.262870220\n      0.116086261\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Cr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1232.320450000\n    224.468708200\n     60.749992510\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     92.774624230\n     21.558827490\n      7.011599810\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.899488096\n      2.104563782\n      0.812006134\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      4.241479241\n      1.293786360\n      0.499182999\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.754778054\n      0.278560571\n      0.123015285\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Mn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1337.153266000\n    243.564136500\n     65.917960620\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    102.022002100\n     23.707719230\n      7.710486098\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.701960922\n      2.349343572\n      0.906449787\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.426950461\n      1.655392868\n      0.638702032\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.670982286\n      0.247634663\n      0.109358078\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Fe\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1447.400411000\n    263.645791600\n     71.352840190\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    111.919489100\n     26.007682360\n      8.458505490\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      8.548569754\n      2.607586250\n      1.006087840\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.411803475\n      1.955804428\n      0.754610151\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.592115681\n      0.218527925\n      0.096504236\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Co\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1557.298704000\n    283.663902900\n     76.770522340\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    121.834474100\n     28.311711640\n      9.207847321\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      9.480851678\n      2.891961952\n      1.115808827\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      7.664527389\n      2.337925151\n      0.902044205\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.592115681\n      0.218527925\n      0.096504236\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ni\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1679.771028000\n    305.972389600\n     82.808069430\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    132.858889900\n     30.873548780\n     10.041036270\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     10.330743350\n      3.151206003\n      1.215833241\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      8.627722755\n      2.631730438\n      1.015403419\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.630932838\n      0.232853898\n      0.102830736\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Cu\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1801.806730000\n    328.201345000\n     88.824092280\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    144.121218400\n     33.490671730\n     10.892205880\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     11.307754020\n      3.449225397\n      1.330818388\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      9.647911930\n      2.942920654\n      1.135470278\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.630932838\n      0.232853898\n      0.102830736\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Zn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1929.432301000\n    351.448502100\n     95.115680210\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    155.841675500\n     36.214253910\n     11.777999340\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     12.281527440\n      3.746257327\n      1.445422541\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     10.947370770\n      3.339297018\n      1.288404602\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.889713885\n      0.328360379\n      0.145007406\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ga\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2061.424532000\n    375.491051700\n    101.622532400\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    167.761868000\n     38.984250280\n     12.678888130\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     12.615055200\n      3.847993927\n      1.484675684\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     12.615055200\n      3.847993927\n      1.484675684\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.798524374\n      0.294705714\n      0.130145151\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ge\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2196.384229000\n    400.074129200\n    108.275672600\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    180.389038000\n     41.918533040\n     13.633207950\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     14.196656190\n      4.330432640\n      1.670815538\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     14.196656190\n      4.330432640\n      1.670815538\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.985832560\n      0.363834215\n      0.160673025\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"As\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2337.065673000\n    425.699429800\n    115.210879000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    193.197053500\n     44.894840400\n     14.601195480\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     15.871635840\n      4.841354819\n      1.867945198\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     15.871635840\n      4.841354819\n      1.867945198\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.107681464\n      0.408804124\n      0.180532211\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Se\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2480.626814000\n    451.849270800\n    122.288046400\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    206.157878000\n     47.906657270\n     15.580731800\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     17.639994140\n      5.380760465\n      2.076064666\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     17.639994140\n      5.380760465\n      2.076064666\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.214644297\n      0.448280136\n      0.197965235\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Br\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2629.997471000\n    479.057322400\n    129.651607000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    219.835025500\n     51.084932220\n     16.614405460\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     19.501731090\n      5.948649577\n      2.295173940\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     19.501731090\n      5.948649577\n      2.295173940\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.396037488\n      0.515225632\n      0.227529071\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Kr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2782.160055000\n    506.773927000\n    137.152801900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    233.951411800\n     54.365276810\n     17.681275330\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     21.456846710\n      6.545022156\n      2.525273021\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     21.456846710\n      6.545022156\n      2.525273021\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.590049336\n      0.586828205\n      0.259149523\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Rb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2938.601529000\n    535.269937000\n    144.864934000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    248.507037000\n     57.747691000\n     18.781341000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     23.505340970\n      7.169878201\n      2.766361909\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     23.505340970\n      7.169878201\n      2.766361909\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.247796820\n      0.829578393\n      0.366350565\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.486993992\n      0.262216156\n      0.115825488\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Sr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3100.983951000\n    564.848097800\n    152.869938900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    263.501900700\n     61.232174930\n     19.914603720\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     25.578866920\n      7.802369707\n      3.010396794\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     25.578866920\n      7.802369707\n      3.010396794\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.461032403\n      0.908275734\n      0.401104140\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.437080480\n      0.235340816\n      0.103954177\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Y\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3266.026869000\n    594.910871000\n    161.006099000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    277.937724000\n     64.586750000\n     21.005616000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     30.671326000\n      8.557222000\n      3.349239000\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.660043000\n      1.774715000\n      0.691295000\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.667688000\n      0.984544000\n      0.434785000\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.128212000\n      0.962594000\n      0.472861000\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.207424000\n      0.111685000\n      0.049333000\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Zr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3435.348677000\n    625.753049800\n    169.353195800\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    293.783029200\n     68.268857970\n     22.203151440\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     30.732931030\n      9.374523538\n      3.616982618\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     30.732931030\n      9.374523538\n      3.616982618\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.827607815\n      1.101055827\n      0.484687486\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      0.486993992\n      0.262216156\n      0.115825488\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.887830189\n      0.345716474\n      0.152185243\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Nb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3610.742864000\n    657.701320100\n    177.999644500\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    310.067572800\n     72.053035690\n     23.433883480\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     33.019978580\n     10.072145940\n      3.886147028\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     33.019978580\n     10.072145940\n      3.886147028\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.144798430\n      1.224568208\n      0.539057940\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      1.344878866\n      0.523688859\n      0.230529125\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.486993992\n      0.262216156\n      0.115825488\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Mo\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3788.666115000\n    690.110262300\n    186.770769100\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    326.430956700\n     75.855534200\n     24.670574010\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     35.469481290\n     10.819322340\n      4.174430912\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     35.469481290\n     10.819322340\n      4.174430912\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.496895188\n      1.361672861\n      0.599411746\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      1.702112315\n      0.662793713\n      0.291763424\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.512962508\n      0.276198597\n      0.122001777\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Tc\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3970.868257000\n    723.298609800\n    195.752831100\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    343.584632300\n     79.841679520\n     25.966992190\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     38.089919830\n     11.618639620\n      4.482832367\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     38.089919830\n     11.618639620\n      4.482832367\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.829752708\n      1.491285854\n      0.656467704\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.101373228\n      0.818263843\n      0.360201758\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.461699983\n      0.248596896\n      0.109809621\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ru\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4159.274210000\n    757.616989400\n    205.040723900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    360.798656100\n     83.841848430\n     27.267971270\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     40.717516780\n     12.420140440\n      4.792076302\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     40.717516780\n     12.420140440\n      4.792076302\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.197516371\n      1.634491118\n      0.719507014\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.390895761\n      0.931002417\n      0.409829556\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.413135485\n      0.222447917\n      0.098259157\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Rh\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4350.077794000\n    792.372100500\n    214.446813300\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    378.433426400\n     87.939789810\n     28.600748990\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     43.521794550\n     13.275534540\n      5.122113939\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     43.521794550\n     13.275534540\n      5.122113939\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.540857408\n      1.768186338\n      0.778359979\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.779066094\n      1.082153932\n      0.476366825\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.413135485\n      0.222447917\n      0.098259157\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Pd\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4545.160269000\n    827.906616800\n    224.063840200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    396.488943300\n     92.135503650\n     29.965325350\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     46.419450970\n     14.159412110\n      5.463141383\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     46.419450970\n     14.159412110\n      5.463141383\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.919104589\n      1.915473830\n      0.843196295\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      3.025977448\n      1.178299934\n      0.518690532\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.437080480\n      0.235340816\n      0.103954177\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ag\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4744.521634000\n    864.220538300\n    233.891804500\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    414.965206900\n     96.428989950\n     31.361700350\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     49.410486050\n     15.071773140\n      5.815158634\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     49.410486050\n     15.071773140\n      5.815158634\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.290230450\n      2.059988316\n      0.906811928\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      3.283395668\n      1.278537254\n      0.562815247\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.437080480\n      0.235340816\n      0.103954177\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Cd\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4950.261905000\n    901.696385600\n    244.034231300\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    433.446938500\n    100.723746900\n     32.758488610\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     52.592792350\n     16.042478000\n      6.189686744\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     52.592792350\n     16.042478000\n      6.189686744\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.674851796\n      2.209757875\n      0.972740857\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      3.642963976\n      1.418551290\n      0.624449770\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.594915098\n      0.320325000\n      0.141493186\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"In\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5158.224714000\n    939.577070700\n    254.286223100\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    452.331322300\n    105.112071600\n     34.185707990\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     55.975397690\n     17.074280440\n      6.587788204\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     55.975397690\n     17.074280440\n      6.587788204\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.048549180\n      1.965878882\n      0.865384724\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.048549180\n      1.965878882\n      0.865384724\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.566923061\n      0.305253019\n      0.134835626\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Sn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5370.466413000\n    978.237161100\n    264.749152200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    472.051532200\n    109.694624300\n     35.676096360\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     59.151411880\n     18.043066000\n      6.961575790\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     59.151411880\n     18.043066000\n      6.961575790\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.583138529\n      2.174045204\n      0.957020051\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.583138529\n      2.174045204\n      0.957020051\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.623581642\n      0.335760162\n      0.148311168\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Sb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5586.987002000\n   1017.676657000\n    275.423018900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    492.192488800\n    114.374949400\n     37.198283360\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     62.521797750\n     19.071141120\n      7.358239131\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     62.521797750\n     19.071141120\n      7.358239131\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.120693149\n      2.383366187\n      1.049163663\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.120693149\n      2.383366187\n      1.049163663\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.652922693\n      0.351558503\n      0.155289573\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Te\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5810.061591000\n   1058.309972000\n    286.419979700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    512.754192000\n    119.153047100\n     38.752269000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     65.985562270\n     20.127699700\n      7.765892279\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     65.985562270\n     20.127699700\n      7.765892279\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.707956921\n      2.612043655\n      1.149828048\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.707956921\n      2.612043655\n      1.149828048\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.701271348\n      0.377591265\n      0.166788702\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"I\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   6035.183623000\n   1099.316231000\n    297.517873700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    533.736641800\n    124.028917100\n     40.338053280\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     69.542705450\n     21.212741750\n      8.184535234\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     69.542705450\n     21.212741750\n      8.184535234\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.295991196\n      2.841021154\n      1.250624506\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      7.295991196\n      2.841021154\n      1.250624506\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.790036458\n      0.425385789\n      0.187900384\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<atomicguess symbol=\"H\" basis=\"STO-3G\">\n  <guessdensitymatrix>\n          1.00000\n  </guessdensitymatrix>\n  <alphavectors>\n          1.00000\n  </alphavectors>\n  <betavectors>\n          1.00000\n  </betavectors>\n</atomicguess>\n<atomicguess symbol=\"He\" basis=\"STO-3G\">\n  <guessdensitymatrix>\n          2.00000\n  </guessdensitymatrix>\n  <alphavectors>\n          1.00000\n  </alphavectors>\n  <betavectors>\n          1.00000\n  </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Li\" basis=\"STO-3G\">\n  <guessdensitymatrix>\n     2.04425    -0.22218     0.00000     0.00000     0.00000\n    -0.22218     1.06290     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     0.00000\n  </guessdensitymatrix>\n  <alphavectors>\n     0.98393     0.30597     0.00000     0.00000     0.00000\n     0.05968    -1.02868     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000    -1.00000\n  </alphavectors>\n  <betavectors>\n     0.98446    -0.30427     0.00000     0.00000     0.00000\n     0.05790     1.02878     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n  </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Be\" basis=\"STO-3G\">\n  <guessdensitymatrix>\n     2.14443    -0.55652     0.00000     0.00000     0.00000\n    -0.55652     2.14443     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     0.00000\n  </guessdensitymatrix>\n  <alphavectors>\n    -0.98625    -0.31547     0.00000     0.00000     0.00000\n    -0.04871     1.03433     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n  </alphavectors>\n  <betavectors>\n     0.98625    -0.31547     0.00000     0.00000     0.00000\n     0.04871     1.03433     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n  </betavectors>\n</atomicguess>\n<atomicguess symbol=\"B\" basis=\"STO-3G\">\n  <guessdensitymatrix>\n     2.15642    -0.58078     0.00000     0.00000     0.00000\n    -0.58078     2.15642     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.33333     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.33333     0.00000\n     0.00000     0.00000     0.00000     0.00000     0.33333\n  </guessdensitymatrix>\n  <alphavectors>\n    -0.98732    -0.32158     0.00000     0.00000     0.00000\n    -0.04378     1.03745     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n  </alphavectors>\n  <betavectors>\n     0.98789    -0.31982     0.00000     0.00000     0.00000\n     0.04194     1.03752     0.00000     0.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n  </betavectors>\n</atomicguess>\n<atomicguess symbol=\"C\" basis=\"STO-3G\">\n  <guessdensitymatrix>\n     2.13148    -0.52938     0.00000     0.00000     0.00000\n    -0.52938     2.13148     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.66667     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.66667     0.00000\n     0.00000     0.00000     0.00000     0.00000     0.66667\n  </guessdensitymatrix>\n  <alphavectors>\n    -0.99094    -0.28944     0.00000     0.00000     0.00000\n    -0.03426     1.03178     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n  </alphavectors>\n  <betavectors>\n     0.99155    -0.28733     0.00000     0.00000     0.00000\n     0.03206     1.03185     0.00000     0.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n  </betavectors>\n</atomicguess>\n<atomicguess symbol=\"N\" basis=\"STO-3G\">\n  <guessdensitymatrix>\n     2.11695    -0.49756     0.00000     0.00000     0.00000\n    -0.49756     2.11695     0.00000     0.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n  </guessdensitymatrix>\n  <alphavectors>\n     0.99274     0.27008     0.00000     0.00000     0.00000\n     0.02918    -1.02841     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000    -1.00000     0.00000\n  </alphavectors>\n  <betavectors>\n     0.99332    -0.26794     0.00000     0.00000     0.00000\n     0.02697     1.02847     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n  </betavectors>\n</atomicguess>\n<atomicguess symbol=\"O\" basis=\"STO-3G\">\n  <guessdensitymatrix>\n     2.11871    -0.50151     0.00000     0.00000     0.00000\n    -0.50151     2.11871     0.00000     0.00000     0.00000\n     0.00000     0.00000     1.33333     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.33333     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.33333\n  </guessdensitymatrix>\n  <alphavectors>\n     0.99343     0.26916     0.00000     0.00000     0.00000\n     0.02636    -1.02891     0.00000     0.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n     0.00000     0.00000     0.00000    -1.00000     0.00000\n  </alphavectors>\n  <betavectors>\n     0.99372    -0.26808     0.00000     0.00000     0.00000\n     0.02525     1.02894     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n  </betavectors>\n</atomicguess>\n<atomicguess symbol=\"F\" basis=\"STO-3G\">\n  <guessdensitymatrix>\n     2.12008    -0.50456     0.00000     0.00000     0.00000\n    -0.50456     2.12008     0.00000     0.00000     0.00000\n     0.00000     0.00000     1.66667     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.66667     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.66667\n  </guessdensitymatrix>\n  <alphavectors>\n    -0.99396    -0.26849     0.00000     0.00000     0.00000\n    -0.02422     1.02930     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n  </alphavectors>\n  <betavectors>\n     0.99407    -0.26806     0.00000     0.00000     0.00000\n     0.02378     1.02931     0.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n  </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ne\" basis=\"STO-3G\">\n  <guessdensitymatrix>\n     2.12527    -0.51598     0.00000     0.00000     0.00000\n    -0.51598     2.12527     0.00000     0.00000     0.00000\n     0.00000     0.00000     2.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     2.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     2.00000\n  </guessdensitymatrix>\n  <alphavectors>\n    -0.99416    -0.27254     0.00000     0.00000     0.00000\n    -0.02302     1.03058     0.00000     0.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n  </alphavectors>\n  <betavectors>\n     0.99416    -0.27254     0.00000     0.00000     0.00000\n     0.02302     1.03058     0.00000     0.00000     0.00000\n     0.00000     0.00000     1.00000     0.00000     0.00000\n     0.00000     0.00000     0.00000     0.00000     1.00000\n     0.00000     0.00000     0.00000     1.00000     0.00000\n  </betavectors>\n</atomicguess>\n"
  },
  {
    "path": "src/apps/periodic_old/test_be.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <iostream>\n\n#include \"dft.h\"\n#include \"hartreefock.h\"\n\nusing std::cout;\nusing std::endl;\n\nusing namespace madness;\n\nconst double PI = 3.1415926535897932384;\n\ntypedef Vector<double,3> coordT;\n\n/// Returns radius for smoothing nuclear potential with energy precision eprec\n//*****************************************************************************\nstatic double smoothing_parameter(double Z, double eprec) {\n    // The min is since asymptotic form not so good at low acc.\n    // The 2 is from two electrons in 1s closed shell.\n    if (Z == 0.0) return 1.0;\n    double Z5 = Z*Z*Z*Z*Z;\n    double c = pow(std::min(1e-3,eprec)/2.0/0.00435/Z5,1.0/3.0);\n    return c;\n}\n//*****************************************************************************\n\n\n/// Regularized 1/r potential.\n\n/// Invoke as \\c u(r/c)/c where \\c c is the radius of the\n/// smoothed volume.\n//*****************************************************************************\nstatic double smoothed_potential(double r) {\n    const double THREE_SQRTPI = 5.31736155271654808184;\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-8){\n        pot = erf(r)/r + (exp(-r2) + 16.0*exp(-4.0*r2))/(THREE_SQRTPI);\n    } else{\n        pot = (2.0 + 17.0/3.0)/sqrt(PI);\n    }\n\n    return pot;\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double psi_func_be1(const coordT& rr)\n{\n  const double x=rr[0], y=rr[1], z=rr[2];\n  double r = sqrt(x*x+y*y+z*z);\n  return exp(-4.0*r+1e-4);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double psi_func_be2(const coordT& rr)\n{\n  const double x=rr[0], y=rr[1], z=rr[2];\n  double r = sqrt(x*x+y*y+z*z);\n  return (1.0 - 2.0*r*exp(-2.0*r));\n}\n//*****************************************************************************\n\n\n//*****************************************************************************\nstatic double V_func_be(const coordT& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  double rr = sqrt(x*x + y*y + z*z);\n  double c = smoothing_parameter(4.0, 1e-7);\n  return -4.0 * smoothed_potential(rr/c) / c;\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double rho_func_be(const coordT& rr)\n{\n  const double x=rr[0], y=rr[1], z=rr[2];\n//  double e1 = 20.0;\n//  double coeff = pow(e1/PI, 1.5);\n//  return -4.0 * coeff * exp(-e1 * (x*x + y*y + z*z));\n  double c = 0.1;\n  double r = sqrt(x*x + y*y + z*z);\n  r = r / c;\n  const double RPITO1P5 = 0.1795871221251665617; // 1.0/Pi^1.5\n  return 4.0 * ((-3.0/2.0+(1.0/3.0)*r*r)*exp(-r*r)+(-32.0+(256.0/3.0)*r*r)*exp(-4.0*r*r))*RPITO1P5/c/c/c;\n}\n//*****************************************************************************\n\n//*****************************************************************************\nvoid test_hf_be(World& world)\n{\n  //if (world.rank() == 0) cout << \"Running test application HartreeFock ...\" << endl;\n\n  typedef Vector<double,3> coordT;\n  typedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\n\n  // Function defaults\n  double bsize = 42.4;\n  int funck = 6;\n  double thresh = 1e-4;\n  FunctionDefaults<3>::set_k(funck);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_autorefine(false);\n  FunctionDefaults<3>::set_cubic_cell(-bsize, bsize);\n\n  // Nuclear potential (Be)\n  const coordT origin(0.0);\n  if (world.rank() == 0) madness::print(\"Creating Function object for nuclear charge density  ...\");\n  Function<double,3> rhon = FunctionFactory<double,3>(world).f(rho_func_be).thresh(thresh).initial_level(4);\n  Function<double,3> vnuc = FunctionFactory<double,3>(world).f(V_func_be).thresh(thresh);\n\n  double rhontrace = rhon.trace();\n  if (world.rank() == 0)\n    printf(\"trace of rhon = %.8f\\n\\n\", rhontrace);\n\n  if (world.rank() == 0)\n    cout << \"Operating on nuclear charge density ...\" << endl;\n  SeparatedConvolution<double, 3> op = CoulombOperator<double, 3> (world,\n    FunctionDefaults<3>::get_k(), 1e-8, thresh);\n  Function<double, 3> V_from_rho_nuc = apply(op, rhon);\n  if (world.rank() == 0)  printf(\"\\n\");\n  double L = 2.0 * bsize;\n  double bstep = L / 100.0;\n  vnuc.reconstruct();\n  V_from_rho_nuc.reconstruct();\n  for (int i = 0; i < 101; i++)\n  {\n    coordT p(-L / 2 + i * bstep);\n    double error = fabs(vnuc(p) - V_from_rho_nuc(p));\n    if (world.rank() == 0)\n      printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], vnuc(p), V_from_rho_nuc(p),\n          error, error / vnuc(p));\n  }\n  if (world.rank() == 0) printf(\"\\n\");\n\n\n  // Guess for the wavefunctions\n  if (world.rank() == 0) madness::print(\"Creating wavefunction's ...\");\n  Function<double,3> psi1 = FunctionFactory<double,3>(world).f(psi_func_be1);\n  psi1.scale(1.0/psi1.norm2());\n  Function<double,3> psi2 = FunctionFactory<double,3>(world).f(psi_func_be2);\n  psi2.scale(1.0/psi2.norm2());\n\n  // Create list of wavefunctions\n  std::vector<Function<double,3> > phis;\n  phis.push_back(psi1);\n  phis.push_back(psi2);\n\n  // Creat list of eigenvalues\n  std::vector<double> eigs;\n  eigs.push_back(-5.0);\n  eigs.push_back(-0.5);\n\n  // Create DFT object\n  if (world.rank() == 0) madness::print(\"Creating DFT object...\");\n  //HartreeFock hf(world, Vnuc, phis, eigs, true, true, thresh);\n  ElectronicStructureParams params;\n  params.periodic = false;\n  DFT<double,3> dftcalc(world, rhon, phis, eigs, params);\n  if (world.rank() == 0) madness::print(\"Running DFT object...\");\n  dftcalc.solve(51);\n\n}\n//*****************************************************************************\n\n#define TO_STRING(s) TO_STRING2(s)\n#define TO_STRING2(s) #s\n\n//*****************************************************************************\nint main(int argc, char** argv)\n{\n  SafeMPI::Init(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n  if (world.rank() == 0)\n  {\n    print(\"\");\n    print(\"--------------------------------------------\");\n    print(\"   MADNESS\", \" multiresolution testsuite\");\n    print(\"--------------------------------------------\");\n    print(\"\");\n    print(\"   number of processors ...\", world.size());\n    print(\"    processor frequency ...\", cpu_frequency());\n    print(\"            host system ...\", TO_STRING(HOST_SYSTEM));\n    print(\"             byte order ...\", TO_STRING(MADNESS_BYTE_ORDER));\n    print(\"          configured by ...\", MADNESS_CONFIGURATION_USER);\n    print(\"          configured on ...\", MADNESS_CONFIGURATION_HOST);\n    print(\"          configured at ...\", MADNESS_CONFIGURATION_DATE);\n    print(\"                    CXX ...\", MADNESS_CONFIGURATION_CXX);\n    print(\"               CXXFLAGS ...\", MADNESS_CONFIGURATION_CXXFLAGS);\n#ifdef OPTERON_TUNE\n    print(\"             tuning for ...\", \"opteron\");\n#elif defined(CORE_DUO_TUNE)\n    print(\"             tuning for ...\", \"core duo\");\n#else\n    print(\"             tuning for ...\", \"default\");\n#endif\n#ifdef BOUNDS_CHECKING\n    print(\" tensor bounds checking ...\", \"enabled\");\n#endif\n#ifdef TENSOR_INSTANCE_COUNT\n    print(\"  tensor instance count ...\", \"enabled\");\n#endif\n    print(\" \");\n  }\n\n  try\n  {\n    printf(\"WSTHORNTON: Starting up the world ... \\n\");\n\n    startup(world,argc,argv);\n    if (world.rank() == 0) print(\"Initial tensor instance count\", BaseTensor::get_instance_count());\n    test_hf_be(world);\n  }\n  catch (const SafeMPI::Exception& e)\n  {\n    print(e);\n    error(\"caught an MPI exception\");\n  }\n  catch (const madness::MadnessException& e)\n  {\n    print(e);\n    error(\"caught a MADNESS exception\");\n  }\n  catch (const madness::TensorException& e)\n  {\n    print(e);\n    error(\"caught a Tensor exception\");\n  }\n  catch (const char* s)\n  {\n    print(s);\n    error(\"caught a string exception\");\n  }\n  catch (const std::string& s)\n  {\n    print(s);\n    error(\"caught a string (class) exception\");\n  }\n  catch (const std::exception& e)\n  {\n    print(e.what());\n    error(\"caught an STL exception\");\n  }\n  catch (...)\n  {\n    error(\"caught unhandled exception\");\n  }\n\n  if (world.rank() == 0)\n    print(\"entering final fence\");\n  world.gop.fence();\n  if (world.rank() == 0)\n    print(\"done with final fence\");\n  if (world.rank() == 0)\n    print(\"Final tensor instance count\", BaseTensor::get_instance_count());\n  SafeMPI::Finalize();\n\n  return 0;\n}\n//*****************************************************************************\n\n"
  },
  {
    "path": "src/apps/periodic_old/test_comm.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n\nusing namespace std;\nusing namespace madness;\n\nclass Array : public WorldObject<Array> {\n    vector<double> v;\npublic:\n    /// Make block distributed array with size elements\n    Array(World& world, size_t size)\n        : WorldObject<Array>(world), v((size-1)/world.size()+1)\n    {\n        process_pending();\n    }\n\n    /// Return the process in which element i resides\n    ProcessID owner(size_t i) const {return i/v.size();};\n\n    /// Read element i\n    Future<double> read(size_t i) const {\n        if (owner(i) == world.rank())\n            return Future<double>(v[i-world.rank()*v.size()]);\n        else\n            return send(owner(i), &Array::read, i);\n    }\n\n    /// Write element i\n    void write(size_t i, double value) {\n        if (owner(i) == world.rank())\n            v[i-world.rank()*v.size()] = value;\n        else\n            send(owner(i), &Array::write, i, value);\n    }\n};\n\n\nint main(int argc, char** argv) {\n    SafeMPI::Init(argc, argv);\n    madness::World world(SafeMPI::COMM_WORLD);\n\n    Array a(world, 10000), b(world, 10000);\n\n    // Without regard to locality, initialize a[i]=i*10, b[i]=i*7\n    for (int i=world.rank(); i<10000; i+=world.size()) {\n        a.write(i, 10.0*i);\n        b.write(i,  7.0*i);\n    }\n    world.gop.fence();\n\n    // All processes verify 100 random values from each array\n    for (int j=0; j<100; j++) {\n        size_t i = world.rand()%10000;\n        Future<double> vala = a.read(i);\n        Future<double> valb = b.read(i);\n        // Could do work here until results are available\n        MADNESS_CHECK(vala.get() == 10.0*i);\n        MADNESS_CHECK(valb.get() ==  7.0*i);\n    }\n    world.gop.fence();\n\n    if (world.rank() == 0) print(\"OK!\");\n    SafeMPI::Finalize();\n}\n\n"
  },
  {
    "path": "src/apps/periodic_old/test_coulomb.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <madness/constants.h>\n#include \"eigsolver.h\"\n#include \"dft.h\"\n//#include \"outputwriter.h\"\n\nusing namespace madness;\nusing std::endl;\n\n#define WST_PI madness::constants::pi\n\n//#define DEBUG_STREAM *(OutputWriter::instance()->debug_stream())\n//#define LOG_STREAM *(OutputWriter::instance()->log_stream())\n\n#define DEBUG_STREAM std::cout\n#define LOG_STREAM std::cout\n\ntypedef Vector<double,3> coordT3d;\ntypedef Vector<double,1> coordT1d;\n\nconst double L = 30.0;\nconst double alpha = 4.5;\n\n/// Returns radius for smoothing nuclear potential with energy precision eprec\n//*****************************************************************************\nstatic double smoothing_parameter(double Z, double eprec) {\n    // The min is since asymptotic form not so good at low acc.\n    // The 2 is from two electrons in 1s closed shell.\n    if (Z == 0.0) return 1.0;\n    double Z5 = Z*Z*Z*Z*Z;\n    double c = pow(std::min(1e-3,eprec)/2.0/0.00435/Z5,1.0/3.0);\n    return c;\n}\n//*****************************************************************************\n\n\n/// Regularized 1/r potential.\n//*****************************************************************************\n/// Invoke as \\c u(r/c)/c where \\c c is the radius of the\n/// smoothed volume.\nstatic double smoothed_potential(double r) {\n    const double THREE_SQRTPI = 5.31736155271654808184;\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-8){\n        pot = erf(r)/r + (exp(-r2) + 16.0*exp(-4.0*r2))/(THREE_SQRTPI);\n    } else{\n        pot = (2.0 + 17.0/3.0)/sqrt(WST_PI);\n    }\n\n    return pot;\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double V_cosine1D(const coordT1d& r)\n{\n  const double x=r[0];\n  double twopi = 2 * WST_PI;\n  return  -alpha*(cos(twopi*x/L)+1);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double V_cosine3D(const coordT3d& r)\n{\n  const double x=r[0]; const double y = r[1]; const double z = r[2];\n  double twopi = 2 * WST_PI;\n  return  -alpha*(cos(twopi*x/L)*cos(twopi*y/L)*cos(twopi*z/L) + 1);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double V_cosine3D_sep(const coordT3d& r)\n{\n  const double x=r[0]; const double y = r[1]; const double z = r[2];\n  double twopi = 2 * WST_PI;\n  return  -alpha*(cos(twopi*x/L) + cos(twopi*y/L) + cos(twopi*z/L) + 3);\n}\n//*****************************************************************************\n\n//*****************************************************************************\ntemplate <int NDIM>\nstatic double gaussian_func(const Vector<double, NDIM> r)\n{\n  double sum = 0.0;\n  for (int i = 0; i < NDIM; i++)\n    sum += r[i]*r[i];\n  return exp(-2*L*sum);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double phi_initial_guess1D(const coordT1d& r)\n{\n  return gaussian_func<1>(r);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double phi_initial_guess3D(const coordT3d& r)\n{\n  const double x=r[0]; const double y = r[1]; const double z = r[2];\n  double twopi = 2 * WST_PI;\n\n  // From Matlab diagonalization in a PW basis\n  // Coefficients for alpha = 4.5 and L = 30.0\n  // Size of subspace is 15 x 15 x 15\n  double coeffs[15] = {\n      -0.4174,\n      -0.3775,\n      -0.3088,\n      -0.2286,\n      -0.1533,\n      -0.0932,\n      -0.0514,\n      -0.0258,\n      -0.0118,\n      -0.0049,\n      -0.0019,\n      -0.0007,\n      -0.0002,\n      -0.0001,\n      -0.0000};\n\n  double rvalx = 0.0;\n  double rvaly = 0.0;\n  double rvalz = 0.0;\n  for (int nx = 0; nx < 15; nx++)\n  {\n    rvalx += 2 * coeffs[nx] * cos(twopi*x*(nx+1)/L);\n  }\n  for (int ny = 0; ny < 15; ny++)\n  {\n    rvaly += 2 * coeffs[ny] * cos(twopi*y*(ny+1)/L);\n  }\n  for (int nz = 0; nz < 15; nz++)\n  {\n    rvalz += 2 * coeffs[nz] * cos(twopi*z*(nz+1)/L);\n  }\n  return  rvalx * rvaly * rvalz;\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double psi_func_he(const coordT3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  return 6.0*exp(-2.0*sqrt(x*x+y*y+z*z)+1e-4);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double V_func_he(const coordT3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  double rr = sqrt(x*x + y*y + z*z);\n  double c = smoothing_parameter(2.0, 1e-7);\n  return -2.0 * smoothed_potential(rr/c) / c;\n}\n//*****************************************************************************\n\n\n////*****************************************************************************\n//void test_cosine_1D(int argc, char** argv)\n//{\n//  MPI::Init(argc, argv);\n//  World world(MPI::COMM_WORLD);\n//  startup(world,argc,argv);\n//\n//  // Function defaults\n//  int funck = 6;\n//  double thresh = 1e-4;\n//  FunctionDefaults<1>::set_k(funck);\n//  FunctionDefaults<1>::set_thresh(thresh);\n//  FunctionDefaults<1>::set_refine(true);\n//  FunctionDefaults<1>::set_initial_level(2);\n//  FunctionDefaults<1>::set_truncate_mode(1);\n//  FunctionDefaults<1>::set_cubic_cell(-L/2, L/2);\n//\n//  // Nuclear potential (Be)\n//  //const coordT origin(0.0);\n//  if (world.rank() == 0) madness::print(\"Creating Function object for nuclear potential ...\");\n//  Function<double,1> Vnuc = FunctionFactory<double,1>(world).f(V_cosine1D).thresh(thresh);\n//\n//  // Guess for the wavefunctions\n//  if (world.rank() == 0) madness::print(\"Creating wavefunction's ...\");\n//  Function<double,1> psi = FunctionFactory<double,1>(world).f(phi_initial_guess1D);\n//  psi.scale(1.0/psi.norm2());\n//  std::vector<Function<double,1> > phis;\n//  phis.push_back(psi);\n//  // Create list of eigenvalues\n//  std::vector<double> eigs;\n//  eigs.push_back(-5.0);\n//  // Create list of operators\n//  std::vector<EigSolverOp<double,1>*> ops;\n//  ops.push_back(new DFTNuclearPotentialOp<double,1>(world, Vnuc, 1.0, thresh));\n//  // Create eigensolver\n//  if (world.rank() == 0) madness::print(\"Creating Eigensolver object...\");\n//  // Constructor for non-periodic system\n//  EigSolver<double,1> solver(world, phis, eigs, ops, thresh);\n//  if (world.rank() == 0) madness::print(\"Diagonalizing Hamiltonian ...\");\n//  solver.solve(11);\n//\n//  MPI::Finalize();\n//}\n////*****************************************************************************\n\n////*****************************************************************************\n//void test_cosine_3D(int argc, char** argv)\n//{\n//  MPI::Init(argc, argv);\n//  World world(MPI::COMM_WORLD);\n//  startup(world,argc,argv);\n//\n//  // Function defaults\n//  int funck = 8;\n//  double thresh = 1e-6;\n//  FunctionDefaults<3>::set_k(funck);\n//  FunctionDefaults<3>::set_thresh(thresh);\n//  FunctionDefaults<3>::set_refine(true);\n//  FunctionDefaults<3>::set_initial_level(2);\n//  FunctionDefaults<3>::set_truncate_mode(1);\n//  FunctionDefaults<3>::set_cubic_cell(-L/2, L/2);\n//\n//  // Nuclear potential (Be)\n//  //const coordT origin(0.0);\n//  if (world.rank() == 0) madness::print(\"Creating Function object for nuclear potential ...\");\n//  Function<double,3> Vnuc = FunctionFactory<double,3>(world).f(V_cosine3D_sep).thresh(thresh);\n//  Vnuc.truncate();\n//\n//  // Guess for the wavefunctions\n//  if (world.rank() == 0) madness::print(\"Creating wavefunction's ...\");\n//  Function<double,3> psi = FunctionFactory<double,3>(world).f(phi_initial_guess3D);\n//  psi.truncate();\n//  psi.scale(1.0/psi.norm2());\n//  std::vector<Function<double,3> > phis;\n//  phis.push_back(psi);\n//  // Create list of eigenvalues\n//  std::vector<double> eigs;\n//  eigs.push_back(-26.33);\n//  // Create list of operators\n//  std::vector<EigSolverOp<double,3>*> ops;\n//  ops.push_back(new DFTNuclearPotentialOp<double,3>(world, Vnuc, 1.0, thresh));\n//  // Create eigensolver\n//  if (world.rank() == 0) madness::print(\"Creating Eigensolver object...\");\n//  // Constructor for non-periodic system\n//  EigSolver<double,3> solver(world, phis, eigs, ops, thresh);\n//  if (world.rank() == 0) madness::print(\"Diagonalizing Hamiltonian ...\");\n//  solver.solve(155);\n//\n//  double eval = solver.get_eig(0);\n//  Function<double,3> func = solver.get_phi(0);\n//  if (world.rank() == 0) printf(\"reconstructing func ...\\n\\n\");\n//  func.reconstruct();\n//  coordT3d pt1(0.3);\n//  coordT3d pt2(1.3);\n//  if (world.rank() == 0) printf(\"evaluating points ...\\n\\n\");\n//  double funcpt1 = func(pt1);\n//  double funcpt2 = func(pt2);\n//  if (world.rank() == 0) printf(\"eval = %.8f\\n\\n\", eval);\n//  if (world.rank() == 0) printf(\"func(pt1) = %.8f\\tfunc(pt2) = %.8f\\n\\n\", funcpt1, funcpt2);\n//\n//  MPI::Finalize();\n//}\n////*****************************************************************************\n\n//*****************************************************************************\nvoid test_he(int argc, char** argv)\n{\n  SafeMPI::Init(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n  startup(world,argc,argv);\n\n  // Setup output files\n//  OutputWriter::instance()->init_debug(\"test_he_debug.txt\");\n//  OutputWriter::instance()->init_log(\"test_he_log.txt\");\n\n  // Function defaults\n  int funck = 6;\n  double thresh = 1e-4;\n  FunctionDefaults<3>::set_k(funck);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_refine(true);\n  FunctionDefaults<3>::set_initial_level(2);\n  FunctionDefaults<3>::set_truncate_mode(1);\n  FunctionDefaults<3>::set_cubic_cell(-L/2, L/2);\n\n  // Nuclear potential (Be)\n  //const coordT origin(0.0);\n  if (world.rank() == 0) LOG_STREAM << \"Creating Function object for nuclear potential ...\\n\" << endl;\n  Function<double,3> Vnuc = FunctionFactory<double,3>(world).f(V_func_he).thresh(thresh);\n\n  // Guess for the wavefunctions\n  if (world.rank() == 0) LOG_STREAM << \"Creating wavefunction's ...\\n\" << endl;\n  Function<double,3> psi = FunctionFactory<double,3>(world).f(psi_func_he);\n  psi.scale(1.0/psi.norm2());\n  std::vector<Function<double,3> > phis;\n  phis.push_back(psi);\n  // Create list of eigenvalues\n  std::vector<double> eigs;\n  eigs.push_back(-5.0);\n  // Create dft object\n  if (world.rank() == 0) LOG_STREAM << \"Creating DFT object...\" << endl;\n  // Constructor for non-periodic system\n  DFT<double,3> dft(world, Vnuc, phis, eigs, thresh, true);\n  if (world.rank() == 0) LOG_STREAM << \"Running DFT object...\" << endl;\n  dft.solve(31);\n\n  SafeMPI::Finalize();\n}\n//*****************************************************************************\n\nint main(int argc, char** argv)\n{\n  //test_he(argc, argv);\n  //test_cosine_3D(argc, argv);\n  return 0;\n}\n"
  },
  {
    "path": "src/apps/periodic_old/test_he.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <iostream>\n\n#include \"solver.h\"\n#include \"poperator.h\"\n#include \"util.h\"\n\n#include \"xc.h\"\n\nusing std::cout;\nusing std::endl;\n\nusing namespace madness;\n\nconst double PI = 3.1415926535897932384;\n\ntypedef Vector<double,3> coordT;\n\n//static void libxc_ldaop(const Key<3>& key, Tensor<double>& t);\n\n/// Returns radius for smoothing nuclear potential with energy precision eprec\n//*****************************************************************************\nstatic double smoothing_parameter(double Z, double eprec) {\n    // The min is since asymptotic form not so good at low acc.\n    // The 2 is from two electrons in 1s closed shell.\n    if (Z == 0.0) return 1.0;\n    double Z5 = Z*Z*Z*Z*Z;\n    double c = pow(std::min(1e-3,eprec)/2.0/0.00435/Z5,1.0/3.0);\n    return c;\n}\n//*****************************************************************************\n\nvoid printfunc(const World& world, Function<double,3> f, int npts)\n{\n  Tensor<double> LL = FunctionDefaults<3>::get_cell_width();\n  double L = LL[0];\n  double bstep = L / npts;\n  f.reconstruct();\n  for (int i = 0; i <= npts; i++)\n  {\n    Vector<double,3> p(-L/2 + i * bstep);\n    if (world.rank() == 0) printf(\"%.2f\\t\\t%.8f\\n\", p[0], f(p));\n  }\n  if (world.rank() == 0) printf(\"\\n\");\n}\n\n/// Regularized 1/r potential.\n\n/// Invoke as \\c u(r/c)/c where \\c c is the radius of the\n/// smoothed volume.\n//*****************************************************************************\nstatic double smoothed_potential(double r) {\n    const double THREE_SQRTPI = 5.31736155271654808184;\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-8){\n        pot = erf(r)/r + (exp(-r2) + 16.0*exp(-4.0*r2))/(THREE_SQRTPI);\n    } else{\n        pot = (2.0 + 17.0/3.0)/sqrt(PI);\n    }\n\n    return pot;\n}\n//*****************************************************************************\n\nvoid multiply_op(const Key<3>& key, Tensor<double> tcube,\n                 Tensor<double> lcube,\n                 Tensor<double> rcube)\n{\n  TERNARY_OPTIMIZED_ITERATOR(double, tcube, double, lcube, double, rcube, *_p0 = *_p1 * *_p2;);\n}\n\n//*****************************************************************************\nstatic double psi_func_he(const coordT& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  return 6.0*exp(-2.0*sqrt(x*x+y*y+z*z)+1e-4);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double V_func_he(const coordT& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  double rr = sqrt(x*x + y*y + z*z);\n  double c = smoothing_parameter(2.0, 1e-7);\n  return -2.0 * smoothed_potential(rr/c) / c;\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double rho_func_he(const coordT& rr)\n{\n  const double x=rr[0], y=rr[1], z=rr[2];\n//  double e1 = 50.0;\n//  double coeff = pow(e1/PI, 1.5);\n//  return -2.0 * coeff * exp(-e1 * (x*x + y*y + z*z));\n  double c = 0.1;\n  double r = sqrt(x*x + y*y + z*z);\n  r = r / c;\n  const double RPITO1P5 = 0.1795871221251665617; // 1.0/Pi^1.5\n  return 2.0 * ((-3.0/2.0+(1.0/3.0)*r*r)*exp(-r*r)+(-32.0+(256.0/3.0)*r*r)*exp(-4.0*r*r))*RPITO1P5/c/c/c;\n}\n//*****************************************************************************\n\n//*****************************************************************************\ntemplate <typename T, int NDIM>\nclass HeElectronicChargeDensityIGuess : public FunctionFunctorInterface<T,NDIM>\n{\npublic:\n    typedef Vector<double,NDIM> coordT;\n    const coordT center;\n\n    HeElectronicChargeDensityIGuess(const coordT& center)\n        : center(center) {};\n\n    T operator()(const coordT& rr) const\n    {\n        double sum = 0.0;\n        for (int i=0; i < NDIM; i++)\n        {\n            double xx = center[i]-rr[i];\n            sum += xx*xx;\n        };\n        return 6.0*exp(-2.0*sqrt(sum)+1e-4);\n    };\n};\n//*****************************************************************************\n\n//*****************************************************************************\ntemplate <typename T, int NDIM>\nclass HeNuclearChargeDensityIGuess : public FunctionFunctorInterface<T,NDIM>\n{\npublic:\n    typedef Vector<double,NDIM> coordT;\n    const coordT center;\n\n    HeNuclearChargeDensityIGuess(const coordT& center)\n        : center(center) {};\n\n    T operator()(const coordT& rr) const\n    {\n        double sum = 0.0;\n        for (int i=0; i < NDIM; i++)\n        {\n            double xx = center[i]-rr[i];\n            sum += xx*xx;\n        };\n        double c = 0.1;\n        double r = sqrt(sum);\n        r = r / c;\n        const double RPITO1P5 = 0.1795871221251665617; // 1.0/Pi^1.5\n        return 2.0 * ((-3.0/2.0+(1.0/3.0)*r*r)*exp(-r*r)+(-32.0+(256.0/3.0)*r*r)*exp(-4.0*r*r))*RPITO1P5/c/c/c;\n    };\n};\n//*****************************************************************************\n\n//*****************************************************************************\nvoid test_xc(World& world)\n{\n//  Tensor<double> rho(5);\n//  Tensor<double> vxc(5);\n//  Tensor<double> exc(5);\n//  rho[0] = 3.4; rho[1] = 3.0; rho[2] = 1.76; rho[3] = 3600.0; rho[4] = 3200.0;\n//  xc_generic_lda(rho, exc, vxc, false);\n//\n//  for (int i = 1; i < 5; i++)\n//  {\n//    //if (world.rank() == 0) printf(\"rho[%d] = %.4f  vxc[%d] = %.5f  exc[%d] = %.5f\\n\", i rho[i], i, vxc[i], i, exc[i]);\n//    if (world.rank() == 0) printf(\"rho[%d] = %.4e  vxc[%d] = %.4e\\n\", i, rho[i], i, vxc[i]);\n//  }\n}\n//*****************************************************************************\n\n//***************************************************************************\ndouble he_munge(double r) {\n  if (r < 1e-12) r = 1e-12;\n  return r;\n}\n//***************************************************************************\n\n//***************************************************************************\nstatic void he_ldaop(const Key<3>& key, Tensor<double>& t) {\n  XC(lda_type) xc_c_func;\n  XC(lda_type) xc_x_func;\n  xc_lda_init(&xc_c_func, XC_LDA_C_VWN,XC_UNPOLARIZED);\n  xc_lda_x_init(&xc_x_func, XC_UNPOLARIZED, 3, 0);\n  UNARY_OPTIMIZED_ITERATOR(double, t, double r=he_munge(2.0* *_p0); double q; double dq1; double dq2;xc_lda_vxc(&xc_x_func, &r, &q, &dq1);xc_lda_vxc(&xc_c_func, &r, &q, &dq2); *_p0 = dq1+dq2);\n}\n//***************************************************************************\n\n//***************************************************************************\ntemplate <typename T, int NDIM>\nstruct myunaryop_square\n{\n  typedef T resultT;\n  Tensor<T> operator()(const Key<NDIM>& key, const Tensor<T>& t) const\n  {\n    Tensor<T> result = copy(t);\n    T* r = result.ptr();\n    for (int i = 0; i < result.size; i++)\n    {\n      r[i] = r[i]*r[i];\n      //printf(\"%10.7e%15.7e\\n\", t[i], result[i]);\n    }\n    return result;\n  }\n  template <typename Archive>\n  void serialize(Archive& ar) {}\n};\n//***************************************************************************\n\n//*****************************************************************************\nvoid test_hf_he(World& world)\n{\n  cout << \"Running test application HartreeFock ...\" << endl;\n\n  typedef Vector<double,3> coordT;\n  typedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\n\n  // Dimensions of the bounding box\n  double bsize = 22.4;\n//  for (int i=0; i<3; i++)\n//  {\n//    FunctionDefaults<3>::cell(i,0) = -bsize;\n//    FunctionDefaults<3>::cell(i,1) = bsize;\n//  }\n  // Function defaults\n  int funck = 8;\n  double thresh = 1e-6;\n  FunctionDefaults<3>::set_k(funck);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_cubic_cell(-bsize, bsize);\n  FunctionDefaults<3>::set_autorefine(false);\n\n  // Nuclear potential (He atom)\n  const coordT origin(0.0);\n  cout << \"Creating Function object for nuclear charge density ...\" << endl;\n//  Function<double,3> rhon = FunctionFactory<double,3>(world).f(rho_func_he);\n  Function<double,3> rhon =\n    FunctionFactory<double,3>(world).functor(functorT(new HeNuclearChargeDensityIGuess<double,3>(origin)));\n  Function<double,3> vnuc = FunctionFactory<double,3>(world).f(V_func_he);\n  rhon.truncate();\n  vnuc.truncate();\n\n  //  if (world.rank() == 0) cout << \"Operating on nuclear charge density ...\" << endl;\n//  SeparatedConvolution<double,3> op = CoulombOperator<double>(world, FunctionDefaults<3>::get_k(),\n//      1e-8, thresh);\n//  Function<double,3> V_from_rho_nuc = apply(op, rhon);\n//  if (world.rank() == 0) printf(\"\\n\");\n//  double L = 2.0 * bsize;\n//  double bstep = L / 100.0;\n//  vnuc.reconstruct();\n//  V_from_rho_nuc.reconstruct();\n//  for (int i=0; i<101; i++)\n//  {\n//    coordT p(-L/2 + i*bstep);\n//    double error = fabs(vnuc(p) - V_from_rho_nuc(p));\n//    if (world.rank() == 0) printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], vnuc(p), V_from_rho_nuc(p), error, error / vnuc(p));\n//  }\n//  if (world.rank() == 0) printf(\"\\n\");\n//\n\n  // Guess for the wavefunction\n  if (world.rank() == 0) cout << \"Creating wavefunction psi ...\" << endl;\n//  Function<double,3> psi = FunctionFactory<double,3>(world).f(psi_func_he);\n  Function<double,3> psi =\n    FunctionFactory<double,3>(world).functor(functorT(new HeElectronicChargeDensityIGuess<double,3>(origin)));\n  psi.scale(1.0/psi.norm2());\n\n  //Function<double,3> prod = binary_op(vnuc, psi, &::multiply_op);\n  Function<double,3> prod = unary_op(psi, myunaryop_square<double,3>());\n  if (world.rank() == 0)  printf(\"\\n\");\n   double L = 2.0 * bsize;\n   double bstep = L / 100.0;\n   prod.reconstruct();\n   for (int i = 0; i < 101; i++)\n   {\n     coordT p(-L / 2 + i * bstep);\n     if (world.rank() == 0)\n       printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], psi(p), psi(p)*psi(p), prod(p));\n   }\n   if (world.rank() == 0) printf(\"\\n\");\n\n\n//  Function<double,3> tmprho = square(psi);\n//  double rtrace = tmprho.trace();\n//  if (world.rank() == 0) printf(\"tmprho trace = %f\\n\\n\", rtrace);\n//  Function<double,3> vxc = copy(tmprho);\n//  vxc.unaryop(&he_ldaop);\n//\n//  if (world.rank() == 0) printf(\"\\n\");\n//  if (world.rank() == 0) printf(\"p\\t\\trho\\tvxc\\n\");\n//  double L = 2.0 * bsize;\n//  double bstep = L / 100.0;\n//  vxc.reconstruct();\n//  tmprho.reconstruct();\n//  for (int i=0; i<101; i++)\n//  {\n//    coordT p(-L/2 + i*bstep);\n//    if (world.rank() == 0) printf(\"%.2f\\t\\t%.8f\\t%.8f\\n\", p[0], tmprho(p), vxc(p));\n//  }\n//  if (world.rank() == 0) printf(\"\\n\");\n\n\n  // Create lists\n  std::vector<Function<double,3> > phis;\n  std::vector<double> eigs;\n  phis.push_back(psi);\n  eigs.push_back(-0.6);\n\n  // Create DFT object\n  if (world.rank() == 0) cout << \"Creating DFT object ...\" << endl;\n  ElectronicStructureParams params;\n  params.periodic = false;\n  Solver<double,3> dftcalc(world, rhon, phis, phis, eigs, eigs, params);\n  if (world.rank() == 0) cout << \"Running DFT calculation ...\" << endl;\n  dftcalc.solve();\n}\n//*****************************************************************************\n\n//*****************************************************************************\nvoid test_he_potential(World& world)\n{\n  cout << \"Running test application HartreeFock ...\" << endl;\n\n  typedef Vector<double,3> coordT;\n  typedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\n\n  // Dimensions of the bounding box\n  double bsize = 22.4;\n//  for (int i=0; i<3; i++)\n//  {\n//    FunctionDefaults<3>::cell(i,0) = -bsize;\n//    FunctionDefaults<3>::cell(i,1) = bsize;\n//  }\n  // Function defaults\n  int funck = 8;\n  double thresh = 1e-6;\n  FunctionDefaults<3>::set_k(funck);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_cubic_cell(-bsize, bsize);\n\n  // Nuclear potential (He atom)\n  const coordT origin(8.0);\n  cout << \"Creating Function object for nuclear charge density ...\" << endl;\n  Function<double,3> rhon = FunctionFactory<double,3>(world).f(rho_func_he);\n  Function<double,3> vnuc0 = FunctionFactory<double,3>(world).f(V_func_he);\n  rhon.truncate();\n  vnuc0.truncate();\n\n  // Guess for the wavefunction\n  cout << \"Creating wavefunction psi ...\" << endl << endl;\n  Function<double,3> psi = FunctionFactory<double,3>(world).f(psi_func_he);\n  psi.scale(1.0/psi.norm2());\n\n  cout << \"Creating electronic density from psi ...\" << endl << endl;\n  Function<double,3> rho = square(psi);\n  rho.truncate();\n  rho.scale(2);\n\n  cout << \"Creating nuclear and electronic ops ...\" << endl << endl;\n  Tensor<double> cellsize = FunctionDefaults<3>::get_cell_width();\n  SeparatedConvolution<double,3>* cop = PeriodicCoulombOpPtr<double,3>(world, funck,1e-10, thresh, cellsize);\n  SeparatedConvolution<double,3> op = CoulombOperator<double>(world, funck,1e-10, thresh);\n\n  cout << \"Building potentials ...\" << endl << endl;\n  Function<double,3> vnuc = apply(op, rhon);\n  Function<double,3> velec = apply(op, rho);\n  Function<double,3> totalV = vnuc + velec;\n  Function<double,3> totalV2 = apply(*cop, rho + rhon);\n  // printing out\n  double L = 2.0 * bsize;\n  double bstep = L / 100.0;\n  rho.reconstruct();\n  rhon.reconstruct();\n  vnuc0.reconstruct();\n  vnuc.reconstruct();\n  velec.reconstruct();\n  totalV.truncate();\n  totalV.reconstruct();\n  for (int i=0; i<101; i++)\n  {\n    coordT p(-L/2 + i*bstep);\n    printf(\"%.2f\\t\\t%.8f\\t%.8f\\n\", p[0], totalV(p), totalV2(p));\n  }\n  printf(\"\\n\");\n\n  cout.precision(8);\n  cout << \"energy (periodic) is \" << inner(totalV2, rho) << endl << endl;\n  cout << \"energy (non-periodic) is \" << inner(totalV, rho) << endl << endl;\n\n  cout << \"Trace of rhon is \" << rhon.trace() << endl << endl;\n  cout << \"Trace of rho is \" << rho.trace() << endl << endl;\n//  cout << \"Trace of totalV is \" << totalV.trace() << endl << endl;\n//  cout << \"Trace of totalV2 is \" << totalV2.trace() << endl << endl;\n//  cout << \"value: \" << totalV.trace()/L/L/L << endl << endl;\n//\n//  // matrix elements\n//  printf(\"matrix element for totalV: %.8f\\n\\n\", inner(psi, totalV * psi));\n//  printf(\"matrix element for totalV2: %.8f\\n\\n\", inner(psi, totalV2 * psi));\n}\n//*****************************************************************************\n\n#define TO_STRING(s) TO_STRING2(s)\n#define TO_STRING2(s) #s\n\n//*****************************************************************************\nint main(int argc, char** argv)\n{\n  initialize(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n  if (world.rank() == 0)\n  {\n    print(\"\");\n    print(\"--------------------------------------------\");\n    print(\"   MADNESS\", \" multiresolution testsuite\");\n    print(\"--------------------------------------------\");\n    print(\"\");\n    print(\"   number of processors ...\", world.size());\n    print(\"    processor frequency ...\", cpu_frequency());\n    print(\"            host system ...\", TO_STRING(HOST_SYSTEM));\n    print(\"             byte order ...\", TO_STRING(MADNESS_BYTE_ORDER));\n    print(\"          configured by ...\", MADNESS_CONFIGURATION_USER);\n    print(\"          configured on ...\", MADNESS_CONFIGURATION_HOST);\n    print(\"          configured at ...\", MADNESS_CONFIGURATION_DATE);\n    print(\"                    CXX ...\", MADNESS_CONFIGURATION_CXX);\n    print(\"               CXXFLAGS ...\", MADNESS_CONFIGURATION_CXXFLAGS);\n#ifdef OPTERON_TUNE\n    print(\"             tuning for ...\", \"opteron\");\n#elif defined(CORE_DUO_TUNE)\n    print(\"             tuning for ...\", \"core duo\");\n#else\n    print(\"             tuning for ...\", \"default\");\n#endif\n#ifdef BOUNDS_CHECKING\n    print(\" tensor bounds checking ...\", \"enabled\");\n#endif\n#ifdef TENSOR_INSTANCE_COUNT\n    print(\"  tensor instance count ...\", \"enabled\");\n#endif\n    print(\" \");\n  }\n\n  try\n  {\n    printf(\"WSTHORNTON: Starting up the world ... \\n\");\n\n    startup(world,argc,argv);\n    if (world.rank() == 0) print(\"Initial tensor instance count\", BaseTensor::get_instance_count());\n    test_xc(world);\n    test_hf_he(world);\n  }\n  catch (const SafeMPI::Exception& e)\n  {\n    print(e);\n    error(\"caught an MPI exception\");\n  }\n  catch (const madness::MadnessException& e)\n  {\n    print(e);\n    error(\"caught a MADNESS exception\");\n  }\n  catch (const madness::TensorException& e)\n  {\n    print(e);\n    error(\"caught a Tensor exception\");\n  }\n  catch (const char* s)\n  {\n    print(s);\n    error(\"caught a string exception\");\n  }\n  catch (const std::string& s)\n  {\n    print(s);\n    error(\"caught a string (class) exception\");\n  }\n  catch (const std::exception& e)\n  {\n    print(e.what());\n    error(\"caught an STL exception\");\n  }\n  catch (...)\n  {\n    error(\"caught unhandled exception\");\n  }\n\n  if (world.rank() == 0)\n    print(\"entering final fence\");\n  world.gop.fence();\n  if (world.rank() == 0)\n    print(\"done with final fence\");\n  if (world.rank() == 0)\n    print(\"Final tensor instance count\", BaseTensor::get_instance_count());\n\n  finalize();\n  return 0;\n}\n//*****************************************************************************\n\n"
  },
  {
    "path": "src/apps/periodic_old/test_hf.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <iostream>\n\n#include \"dft.h\"\n#include \"hartreefock.h\"\n\nusing std::cout;\nusing std::endl;\n\nusing namespace madness;\n\nconst double PI = 3.1415926535897932384;\n\ntypedef Vector<double,3> coordT;\n\n/// Returns radius for smoothing nuclear potential with energy precision eprec\n//*****************************************************************************\nstatic double smoothing_parameter(double Z, double eprec) {\n    // The min is since asymptotic form not so good at low acc.\n    // The 2 is from two electrons in 1s closed shell.\n    if (Z == 0.0) return 1.0;\n    double Z5 = Z*Z*Z*Z*Z;\n    double c = pow(std::min(1e-3,eprec)/2.0/0.00435/Z5,1.0/3.0);\n    return c;\n}\n//*****************************************************************************\n\n\n/// Regularized 1/r potential.\n\n/// Invoke as \\c u(r/c)/c where \\c c is the radius of the\n/// smoothed volume.\n//*****************************************************************************\nstatic double smoothed_potential(double r) {\n    const double THREE_SQRTPI = 5.31736155271654808184;\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-8){\n        pot = erf(r)/r + (exp(-r2) + 16.0*exp(-4.0*r2))/(THREE_SQRTPI);\n    } else{\n        pot = (2.0 + 17.0/3.0)/sqrt(PI);\n    }\n\n    return pot;\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double psi_func_be1(const coordT& rr)\n{\n  const double x=rr[0], y=rr[1], z=rr[2];\n  double r = sqrt(x*x+y*y+z*z);\n  return exp(-4.0*r+1e-4);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double psi_func_be2(const coordT& rr)\n{\n  const double x=rr[0], y=rr[1], z=rr[2];\n  double r = sqrt(x*x+y*y+z*z);\n  return (1.0 - 2.0*r*exp(-2.0*r));\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double psi_func_he(const coordT& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  return 6.0*exp(-2.0*sqrt(x*x+y*y+z*z)+1e-4);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double V_func_he(const coordT& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  double rr = sqrt(x*x + y*y + z*z);\n  double c = smoothing_parameter(2.0, 1e-7);\n  return -2.0 * smoothed_potential(rr/c) / c;\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double rho_func_he(const coordT& rr)\n{\n  const double x=rr[0], y=rr[1], z=rr[2];\n//  double e1 = 100.0;\n//  double coeff = pow(e1/PI, 1.5);\n//  return -1.0 * coeff * exp(-e1 * (x*x + y*y + z*z));\n  double c = 0.1;\n  double r = sqrt(x*x + y*y + z*z);\n  r = r / c;\n  const double RPITO1P5 = 0.1795871221251665617; // 1.0/Pi^1.5\n  return 2.0 * ((-3.0/2.0+(1.0/3.0)*r*r)*exp(-r*r)+(-32.0+(256.0/3.0)*r*r)*exp(-4.0*r*r))*RPITO1P5/c/c/c;\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double V_func_be(const coordT& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  double rr = sqrt(x*x + y*y + z*z);\n  double c = smoothing_parameter(4.0, 1e-7);\n  return -4.0 * smoothed_potential(rr/c) / c;\n}\n//*****************************************************************************\n\n//*****************************************************************************\ndouble V_func_h2(const Vector<double,3>& r)\n{\n  double x = r[0];\n  double y = r[1];\n  double z = r[2];\n  return -1.0/(sqrt(x*x + y*y + (z-0.7)*(z-0.7)) + 1e-8) +\n    -1.0/(sqrt(x*x + y*y + (z+0.7)*(z+0.7)) + 1e-8);\n}\n//*****************************************************************************\n\n//*****************************************************************************\ndouble psi_func_h2(const Vector<double,3>& r)\n{\n  double x = r[0];\n  double y = r[1];\n  double z = r[2];\n//  return exp(-0.5*(x*x + y*y + (z-0.7)*(z-0.7))) +\n//    exp(-0.5*(x*x + y*y + (z+0.7)*(z+0.7)));\n  return exp(-sqrt(x*x + y*y + (z-0.7)*(z-0.7))) +\n    exp(-sqrt(x*x + y*y + (z+0.7)*(z+0.7)));\n}\n//*****************************************************************************\n\n//*****************************************************************************\nclass H2Potential :\n  public FunctionFunctorInterface<double,3>\n{\npublic:\n  typedef Vector<double,3> coordT;\n\n  H2Potential() {}\n\n  double operator()(const coordT& x) const\n  {\n    double xx = x[0];\n    double yy = x[1];\n    double zz = x[2];\n    return -1.0/(sqrt(xx*xx + yy*yy + (zz-0.7)*(zz-7.0)) + 1e-08) +\n      -1.0/(sqrt(xx*xx + yy*yy + (zz+0.7)*(zz+7.0)) + 1e-08);\n  }\n};\n//*****************************************************************************\n\n//*****************************************************************************\nvoid test_hf_h2(World& world)\n{\n  cout << \"Running test application HartreeFock ...\" << endl;\n\n  typedef Vector<double,3> coordT;\n  typedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\n\n  // Dimensions of the bounding box\n//  double bsize = 30.0;\n//  for (int i=0; i<3; i++)\n//  {\n//    FunctionDefaults<3>::cell(i,0) = -bsize;\n//    FunctionDefaults<3>::cell(i,1) = bsize;\n//  }\n  // Function defaults\n  int funck = 8;\n  double thresh = 1e-6;\n  FunctionDefaults<3>::set_k(funck);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_refine(true);\n  FunctionDefaults<3>::set_initial_level(2);\n  FunctionDefaults<3>::set_truncate_mode(1);\n  FunctionDefaults<3>::set_cubic_cell(30.0, 30.0);\n\n  // Nuclear potential (harmonic oscillator)\n  const coordT origin(0.0);\n  cout << \"Creating Function object for nuclear potential ...\" << endl;\n  Function<double,3> Vnuc = FunctionFactory<double,3>(world).f(V_func_h2);\n\n  // Guess for the wavefunction\n  cout << \"Creating wavefunction psi ...\" << endl;\n  Function<double,3> psi = FunctionFactory<double,3>(world).f(psi_func_h2);\n  psi.scale(1.0/psi.norm2());\n  printf(\"Norm of psi = %.5f\\n\\n\", psi.norm2());\n  // Create HartreeFock object\n  cout << \"Creating HartreeFock object...\" << endl;\n//  HartreeFock hf(world, Vnuc, psi, -0.6, true, true, 1e-5);\n//  cout << \"Running HartreeFock object...\" << endl;\n//  hf.hartree_fock(10);\n\n//  double ke = 2.0 * hf.calculate_tot_ke_sp();\n//  double pe = 2.0 * hf.calculate_tot_pe_sp();\n//  double ce = hf.calculate_tot_coulomb_energy();\n//  double ee = hf.calculate_tot_exchange_energy();\n//  double ne = 1.0/1.4;\n//  printf(\"Kinetic energy:\\t\\t\\t %.8f\\n\", ke);\n//  printf(\"Potential energy:\\t\\t %.8f\\n\", pe);\n//  printf(\"Two-electron energy:\\t\\t %.8f\\n\", 2.0*ce - ee);\n//  printf(\"Total energy:\\t\\t\\t %.8f\\n\", ke + pe + 2.0*ce - ee + ne);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nvoid test_hf_he(World& world)\n{\n  cout << \"Running test application HartreeFock ...\" << endl;\n\n  typedef Vector<double,3> coordT;\n  typedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\n\n  // Dimensions of the bounding box\n  double bsize = 22.4;\n//  for (int i=0; i<3; i++)\n//  {\n//    FunctionDefaults<3>::cell(i,0) = -bsize;\n//    FunctionDefaults<3>::cell(i,1) = bsize;\n//  }\n  // Function defaults\n  int funck = 8;\n  double thresh = 1e-6;\n  FunctionDefaults<3>::set_k(funck);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_refine(true);\n  FunctionDefaults<3>::set_initial_level(2);\n  FunctionDefaults<3>::set_truncate_mode(1);\n  FunctionDefaults<3>::set_cubic_cell(-bsize, bsize);\n\n  // Nuclear potential (He atom)\n  const coordT origin(0.0);\n  cout << \"Creating Function object for nuclear charge density ...\" << endl;\n  Function<double,3> rhon = FunctionFactory<double,3>(world).f(rho_func_he);\n  Function<double,3> vnuc = FunctionFactory<double,3>(world).f(V_func_he);\n  rhon.truncate();\n  vnuc.truncate();\n  cout << \"Operating on nuclear charge density ...\" << endl;\n  SeparatedConvolution<double,3> op = CoulombOperator<double>(world, FunctionDefaults<3>::get_k(),\n      1e-8, thresh);\n  Function<double,3> V_from_rho_nuc = apply(op, rhon);\n  printf(\"\\n\");\n  double L = 2.0 * bsize;\n  double bstep = L / 100.0;\n  vnuc.reconstruct();\n  V_from_rho_nuc.reconstruct();\n  for (int i=0; i<101; i++)\n  {\n    coordT p(-L/2 + i*bstep);\n    double error = fabs(vnuc(p) - V_from_rho_nuc(p));\n    printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], vnuc(p), V_from_rho_nuc(p), error, error / vnuc(p));\n  }\n  printf(\"\\n\");\n\n  // Guess for the wavefunction\n  cout << \"Creating wavefunction psi ...\" << endl;\n  Function<double,3> psi = FunctionFactory<double,3>(world).f(psi_func_he);\n  psi.scale(1.0/psi.norm2());\n\n  // Create lists\n  std::vector<Function<double,3> > phis;\n  std::vector<double> eigs;\n  phis.push_back(psi);\n  eigs.push_back(-0.6);\n\n  // Create DFT object\n  if (world.rank() == 0) cout << \"Creating DFT object ...\" << endl;\n//  DFT<double,3> dftcalc(world, rhon, phis, eigs, thresh, false);\n//  if (world.rank() == 0) cout << \"Running DFT calculation ...\" << endl;\n//  dftcalc.solve(35);\n//  HartreeFock hf(world, Vnuc, phis, eigs, true, true, thresh);\n//  hf.hartree_fock(10);\n\n//  double ke = 2.0 * hf.calculate_tot_ke_sp();\n//  double pe = 2.0 * hf.calculate_tot_pe_sp();\n//  double ce = hf.calculate_tot_coulomb_energy();\n//  double ee = hf.calculate_tot_exchange_energy();\n//  printf(\"Kinetic energy:\\t\\t\\t %.8f\\n\", ke);\n//  printf(\"Potential energy:\\t\\t %.8f\\n\", pe);\n//  printf(\"Two-electron energy:\\t\\t %.8f\\n\", 2.0*ce - ee);\n//  printf(\"Total energy:\\t\\t\\t %.8f\\n\", ke + pe + 2.0*ce - ee);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nvoid test_hf_be(World& world)\n{\n  //if (world.rank() == 0) cout << \"Running test application HartreeFock ...\" << endl;\n\n  typedef Vector<double,3> coordT;\n  typedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\n\n  // Dimensions of the bounding box\n//  double bsize = 40.0;\n//  for (int i=0; i<3; i++)\n//  {\n//    FunctionDefaults<3>::cell(i,0) = -bsize;\n//    FunctionDefaults<3>::cell(i,1) = bsize;\n//  }\n  // Function defaults\n  int funck = 6;\n  double thresh = 1e-4;\n  FunctionDefaults<3>::set_k(funck);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_refine(true);\n  FunctionDefaults<3>::set_initial_level(2);\n  FunctionDefaults<3>::set_truncate_mode(1);\n  FunctionDefaults<3>::set_cubic_cell(-40.0, 40.0);\n\n  // Nuclear potential (Be)\n  const coordT origin(0.0);\n  if (world.rank() == 0) madness::print(\"Creating Function object for nuclear potential ...\");\n  Function<double,3> Vnuc = FunctionFactory<double,3>(world).f(V_func_be).thresh(thresh);\n\n  // Guess for the wavefunctions\n  if (world.rank() == 0) madness::print(\"Creating wavefunction's ...\");\n  Function<double,3> psi1 = FunctionFactory<double,3>(world).f(psi_func_be1);\n  psi1.scale(1.0/psi1.norm2());\n  Function<double,3> psi2 = FunctionFactory<double,3>(world).f(psi_func_be2);\n  psi2.scale(1.0/psi2.norm2());\n  // Create list of wavefunctions\n  std::vector<Function<double,3> > phis;\n  phis.push_back(psi1);\n  phis.push_back(psi2);\n  // Creat list of eigenvalues\n  std::vector<double> eigs;\n  eigs.push_back(-5.0);\n  eigs.push_back(-0.5);\n  // Create HartreeFock object\n  if (world.rank() == 0) madness::print(\"Creating DFT object...\");\n  //HartreeFock hf(world, Vnuc, phis, eigs, true, true, thresh);\n  std::vector< Vector<double,3> > kpoints(1);\n  Vector<double,3> gammapt;\n  gammapt[0] = 0.0; gammapt[1] = 0.0; gammapt[2] = 0.0;\n  kpoints[0] = gammapt;\n//  DFT<double,3> dftcalc(world, Vnuc, phis, eigs, thresh, true);\n//  if (world.rank() == 0) madness::print(\"Running DFT object...\");\n//  dftcalc.solve(51);\n  //hf.hartree_fock(20);\n//  double ke = 2.0 * hf.calculate_tot_ke_sp();\n//  double pe = 2.0 * hf.calculate_tot_pe_sp();\n//  double ce = hf.calculate_tot_coulomb_energy();\n//  double ee = hf.calculate_tot_exchange_energy();\n//  printf(\"Kinetic energy:\\t\\t\\t %.8f\\n\", ke);\n//  printf(\"Potential energy:\\t\\t %.8f\\n\", pe);\n//  printf(\"Two-electron energy:\\t\\t %.8f\\n\", 2.0*ce - ee);\n//  printf(\"Total energy:\\t\\t\\t %.8f\\n\", ke + pe + 2.0*ce - ee);\n}\n//*****************************************************************************\n\n#define TO_STRING(s) TO_STRING2(s)\n#define TO_STRING2(s) #s\n\n//*****************************************************************************\nint main(int argc, char** argv)\n{\n  SafeMPI::Init(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n  if (world.rank() == 0)\n  {\n    print(\"\");\n    print(\"--------------------------------------------\");\n    print(\"   MADNESS\", \" multiresolution testsuite\");\n    print(\"--------------------------------------------\");\n    print(\"\");\n    print(\"   number of processors ...\", world.size());\n    print(\"    processor frequency ...\", cpu_frequency());\n    print(\"            host system ...\", TO_STRING(HOST_SYSTEM));\n    print(\"             byte order ...\", TO_STRING(MADNESS_BYTE_ORDER));\n    print(\"          configured by ...\", MADNESS_CONFIGURATION_USER);\n    print(\"          configured on ...\", MADNESS_CONFIGURATION_HOST);\n    print(\"          configured at ...\", MADNESS_CONFIGURATION_DATE);\n    print(\"                    CXX ...\", MADNESS_CONFIGURATION_CXX);\n    print(\"               CXXFLAGS ...\", MADNESS_CONFIGURATION_CXXFLAGS);\n#ifdef OPTERON_TUNE\n    print(\"             tuning for ...\", \"opteron\");\n#elif defined(CORE_DUO_TUNE)\n    print(\"             tuning for ...\", \"core duo\");\n#else\n    print(\"             tuning for ...\", \"default\");\n#endif\n#ifdef BOUNDS_CHECKING\n    print(\" tensor bounds checking ...\", \"enabled\");\n#endif\n#ifdef TENSOR_INSTANCE_COUNT\n    print(\"  tensor instance count ...\", \"enabled\");\n#endif\n    print(\" \");\n  }\n\n  try\n  {\n    printf(\"WSTHORNTON: Starting up the world ... \\n\");\n\n    startup(world,argc,argv);\n    if (world.rank() == 0) print(\"Initial tensor instance count\", BaseTensor::get_instance_count());\n    test_hf_he(world);\n  }\n  catch (const SafeMPI::Exception& e)\n  {\n    print(e);\n    error(\"caught an MPI exception\");\n  }\n  catch (const madness::MadnessException& e)\n  {\n    print(e);\n    error(\"caught a MADNESS exception\");\n  }\n  catch (const madness::TensorException& e)\n  {\n    print(e);\n    error(\"caught a Tensor exception\");\n  }\n  catch (const char* s)\n  {\n    print(s);\n    error(\"caught a string exception\");\n  }\n  catch (const std::string& s)\n  {\n    print(s);\n    error(\"caught a string (class) exception\");\n  }\n  catch (const std::exception& e)\n  {\n    print(e.what());\n    error(\"caught an STL exception\");\n  }\n  catch (...)\n  {\n    error(\"caught unhandled exception\");\n  }\n\n  if (world.rank() == 0)\n    print(\"entering final fence\");\n  world.gop.fence();\n  if (world.rank() == 0)\n    print(\"done with final fence\");\n  if (world.rank() == 0)\n    print(\"Final tensor instance count\", BaseTensor::get_instance_count());\n  SafeMPI::Finalize();\n\n  return 0;\n}\n//*****************************************************************************\n"
  },
  {
    "path": "src/apps/periodic_old/test_hydro.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <iostream>\n\n#include \"dft.h\"\n//#include \"hartreefock.h\"\n\nusing std::cout;\nusing std::endl;\n\nusing namespace madness;\n\nconst double PI = 3.1415926535897932384;\n\ntypedef Vector<double,3> coordT;\n\n  //***************************************************************************\n  template <typename T, int NDIM>\n  class NuclearChargeDensityOp : public EigSolverOp<T,NDIM>\n  {\n  public:\n    typedef Function<T,NDIM> funcT;\n    //*************************************************************************\n    // Constructor\n    NuclearChargeDensityOp(World& world, funcT rhon, double coeff, double thresh)\n    : EigSolverOp<T,NDIM>(world, coeff, thresh)\n    {\n      _cop =\n        CoulombOperatorPtr<T,NDIM>(const_cast<World&>(world),\n            FunctionDefaults<3>::get_k(), 1e-4, thresh);\n      _rhon = rhon;\n      // Apply operator to get potential\n      _Vnuc = apply(*_cop, rhon);\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    ~NuclearChargeDensityOp()\n    {\n      delete _cop;\n    }\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there an orbitally-dependent term?\n    virtual bool is_od() {return false;}\n    //*************************************************************************\n\n    //*************************************************************************\n    // Is there a density-dependent term?\n    virtual bool is_rd() {return true;}\n    //*************************************************************************\n\n    //*************************************************************************\n    void prepare_op(Function<double,NDIM> rho) {}\n    //*************************************************************************\n\n    //*************************************************************************\n    virtual funcT op_r(const funcT& rho, const funcT& psi)\n    {\n      return _Vnuc * psi;\n    }\n    //*************************************************************************\n\n  private:\n    //*************************************************************************\n    funcT _rhon;\n    //*************************************************************************\n\n    //*************************************************************************\n    SeparatedConvolution<T,NDIM>* _cop;\n    //*************************************************************************\n\n    //*************************************************************************\n    funcT _Vnuc;\n    //*************************************************************************\n  };\n  //***************************************************************************\n\n//*****************************************************************************\nstatic double rho_func_hydro(const coordT& rr)\n{\n  const double x=rr[0], y=rr[1], z=rr[2];\n//  double e1 = 100.0;\n//  double coeff = pow(e1/PI, 1.5);\n//  return -1.0 * coeff * exp(-e1 * (x*x + y*y + z*z));\n  double c = 0.1;\n  double r = sqrt(x*x + y*y + z*z);\n  r = r / c;\n  const double RPITO1P5 = 0.1795871221251665617; // 1.0/Pi^1.5\n  return ((-3.0/2.0+(1.0/3.0)*r*r)*exp(-r*r)+(-32.0+(256.0/3.0)*r*r)*exp(-4.0*r*r))*RPITO1P5/c/c/c;\n}\n//*****************************************************************************\n\n//*****************************************************************************\ndouble psi_func_hydro(const Vector<double,3>& r)\n{\n  double x = r[0];\n  double y = r[1];\n  double z = r[2];\n  return exp(-(x*x + y*y + z*z));\n}\n//*****************************************************************************\n\n//*****************************************************************************\nvoid test_hydro(World& world)\n{\n  // Box size\n  double L = 40.0;\n\n  // Function defaults\n  int funck = 8;\n  double thresh = 1e-6;\n  FunctionDefaults<3>::set_k(funck);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_cubic_cell(-L/2, L/2);\n\n  // Nuclear potential (Be)\n  //const coordT origin(0.0);\n  if (world.rank() == 0) madness::print(\"Creating Function object for nuclear charge density ...\\n\\n\");\n  Function<double,3> rhon = FunctionFactory<double,3>(world).f(rho_func_hydro).thresh(thresh).initial_level(4);\n  rhon.truncate();\n  double rhontrace = rhon.trace();\n  if (world.rank() == 0) madness::print(\"trace of rho is \", rhontrace);\n\n  // Guess for the wavefunctions\n  if (world.rank() == 0) madness::print(\"Creating wavefunction's ...\\n\\n\");\n  Function<double,3> psi = FunctionFactory<double,3>(world).f(psi_func_hydro);\n  psi.truncate();\n  psi.scale(1.0/psi.norm2());\n  std::vector<Function<double,3> > phis;\n  phis.push_back(psi);\n  // Create list of eigenvalues\n  std::vector<double> eigs;\n  eigs.push_back(-0.9);\n  // Create ops\n  std::vector<EigSolverOp<double,3>*> ops;\n  ops.push_back(new DFTNuclearChargeDensityOp<double,3>(world, rhon, 1.0, thresh, true));\n  // Create eigensolver\n  if (world.rank() == 0) madness::print(\"Creating Eigensolver object...\\n\\n\");\n  // Constructor for non-periodic system\n  EigSolver<double,3> solver(world, rhon, phis, eigs, ops, thresh, true);\n  if (world.rank() == 0) madness::print(\"Diagonalizing Hamiltonian ...\\n\\n\");\n  solver.solve(15);\n\n  double eval = solver.get_eig(0);\n  Function<double,3> func = solver.get_phi(0);\n  if (world.rank() == 0) printf(\"reconstructing func ...\\n\\n\");\n\n  SafeMPI::Finalize();\n}\n//*****************************************************************************\n\n#define TO_STRING(s) TO_STRING2(s)\n#define TO_STRING2(s) #s\n\n//*****************************************************************************\nint main(int argc, char** argv)\n{\n  SafeMPI::Init(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n  if (world.rank() == 0)\n  {\n    print(\"\");\n    print(\"--------------------------------------------\");\n    print(\"   MADNESS\", \" multiresolution testsuite\");\n    print(\"--------------------------------------------\");\n    print(\"\");\n    print(\"   number of processors ...\", world.size());\n    print(\"    processor frequency ...\", cpu_frequency());\n    print(\"            host system ...\", TO_STRING(HOST_SYSTEM));\n    print(\"             byte order ...\", TO_STRING(MADNESS_BYTE_ORDER));\n    print(\"          configured by ...\", MADNESS_CONFIGURATION_USER);\n    print(\"          configured on ...\", MADNESS_CONFIGURATION_HOST);\n    print(\"          configured at ...\", MADNESS_CONFIGURATION_DATE);\n    print(\"                    CXX ...\", MADNESS_CONFIGURATION_CXX);\n    print(\"               CXXFLAGS ...\", MADNESS_CONFIGURATION_CXXFLAGS);\n#ifdef OPTERON_TUNE\n    print(\"             tuning for ...\", \"opteron\");\n#elif defined(CORE_DUO_TUNE)\n    print(\"             tuning for ...\", \"core duo\");\n#else\n    print(\"             tuning for ...\", \"default\");\n#endif\n#ifdef BOUNDS_CHECKING\n    print(\" tensor bounds checking ...\", \"enabled\");\n#endif\n#ifdef TENSOR_INSTANCE_COUNT\n    print(\"  tensor instance count ...\", \"enabled\");\n#endif\n    print(\" \");\n  }\n\n  try\n  {\n    startup(world,argc,argv);\n    test_hydro(world);\n  }\n  catch (const SafeMPI::Exception& e)\n  {\n    print(e);\n    error(\"caught an MPI exception\");\n  }\n  catch (const madness::MadnessException& e)\n  {\n    print(e);\n    error(\"caught a MADNESS exception\");\n  }\n  catch (const madness::TensorException& e)\n  {\n    print(e);\n    error(\"caught a Tensor exception\");\n  }\n  catch (const char* s)\n  {\n    print(s);\n    error(\"caught a string exception\");\n  }\n  catch (const std::string& s)\n  {\n    print(s);\n    error(\"caught a string (class) exception\");\n  }\n  catch (const std::exception& e)\n  {\n    print(e.what());\n    error(\"caught an STL exception\");\n  }\n  catch (...)\n  {\n    error(\"caught unhandled exception\");\n  }\n\n  if (world.rank() == 0)\n    print(\"entering final fence\");\n  world.gop.fence();\n  if (world.rank() == 0)\n    print(\"done with final fence\");\n  if (world.rank() == 0)\n    print(\"Final tensor instance count\", BaseTensor::get_instance_count());\n  SafeMPI::Finalize();\n\n  return 0;\n}\n//*****************************************************************************\n"
  },
  {
    "path": "src/apps/periodic_old/test_lattice.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include \"poperator.h\"\n\nusing namespace madness;\n\ntypedef Vector<double,3> coordT3d;\ntypedef Vector<double,1> coordT1d;\n\nconst double L = 15.0;\nconst double N = 2.0;\n\n//*****************************************************************************\n// Test function for the periodic BSH operator.\nstatic double rho_bsh_func3d(const coordT3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  double twopi = 2 * WST_PI;\n  return  cos(twopi*x/L) * cos(twopi*y/L) * cos(twopi*z/L);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double func_ones(const coordT3d& r)\n{\n  return 1.0;\n}\n//*****************************************************************************\n\n//*****************************************************************************\n// Test charge density for the periodic coulomb operator.\nstatic double_complex rho_coulomb_func3d(const coordT3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  double npi = N * WST_PI;\n  return  cos(npi*x/L) * cos(npi*y/L) * cos(npi*z/L);\n}\n//*****************************************************************************\n\n//*****************************************************************************\n// complex exponential to test for george\nstatic std::complex<double> complex_exp_1d(const coordT1d r)\n{\n  const double x=r[0];\n  double npi = N * WST_PI;\n  return  exp(std::complex<double>(0.0,npi*x/L));\n}\n//*****************************************************************************\n\n//*****************************************************************************\n// Test function used to check the consistency of the coulomb operator and the\n// periodic coulomb operator. We must insure that the total charge density is zero.\nstatic double rho_gaussian_func3d(const coordT3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  const double expnt1 = 1.0;\n  const double expnt2 = 2.0;\n  const double coeff1 = pow(expnt1/WST_PI, 1.5);\n  const double coeff2 = pow(expnt2/WST_PI, 1.5);\n  double piece1 = coeff1 * exp(-expnt1 * (x*x + y*y + z*z));\n  double piece2 = -coeff2 * exp(-expnt2 * (x*x + y*y + z*z));\n\n  //  return piece1-(1/L/L/L);\n    return piece1;\n}\n//*****************************************************************************\n\n//*****************************************************************************\n// Test function for the periodic coulomb operator.\nstatic double_complex phi_coulomb_func3d(const coordT3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  double npi = N * WST_PI;\n  double threepi = 3 * WST_PI;\n  return  (4.0*L*L/(threepi*N*N)) * cos(npi*x/L) * cos(npi*y/L) * cos(npi*z/L);\n}\n//*****************************************************************************\n\n////*****************************************************************************\n//static double phi_func3d(const coordT3d& r)\n//{\n//  const double x=r[0], y=r[1], z=r[2];\n//  double twopi = 2 * WST_PI;\n//  double threepi = 3 * WST_PI;\n//  return  (1/threepi) * cos(twopi*x) * cos(twopi*y) * cos(twopi*z);\n//}\n////*****************************************************************************\n\n//*****************************************************************************\n// Test function for periodic BSH operator.\nstatic double phi_bsh_func3d(const coordT3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  double twopi = 2 * WST_PI;\n  double sixteenpisquared = 16.0 * WST_PI * WST_PI;\n  return  (L*L/sixteenpisquared) * cos(twopi*x/L) * cos(twopi*y/L) * cos(twopi*z/L);\n}\n//*****************************************************************************\n\n//*****************************************************************************\ntemplate <typename Q, int NDIM>\nQ laplacian(const Q& f, bool periodic = false)\n{\n  // Check for periodic boundary conditions\n  Tensor<int> oldbc = FunctionDefaults<NDIM>::get_bc();\n  if (periodic)\n  {\n    Tensor<int> bc(NDIM,2);\n    bc(___) = 1;\n    FunctionDefaults<NDIM>::set_bc(bc);\n  }\n  else\n  {\n    Tensor<int> bc(NDIM,2);\n    bc(___) = 0;\n    FunctionDefaults<NDIM>::set_bc(bc);\n  }\n  // Do calculation\n  Q lapf = diff(diff(f,0),0);\n  for (int i=1; i<NDIM; ++i) lapf += diff(diff(f,i),i);\n  // Restore previous boundary conditions\n  FunctionDefaults<NDIM>::set_bc(oldbc);\n  return lapf;\n};\n//*****************************************************************************\n\n//*****************************************************************************\ntemplate <typename Q> class wstFunctor\n{\npublic:\n  int kmax;\n  double coeff, expnt;\n  wstFunctor(int kmax, double coeff, double expnt) :\n    kmax(kmax), coeff(coeff), expnt(expnt)\n  {\n  }\n  Q operator()(double x) const\n  { //x \\in [-1,1] as checked\n    Q sx0 = 0.0;\n    for (int ki = -kmax; ki <= kmax; ki++)\n    {\n      double k = (double) ki;\n      sx0 += exp(-expnt*(x-k)*(x-k));\n    }\n    return sx0*coeff;\n  }\n};\n//*****************************************************************************\n\n////*****************************************************************************\n//struct PeriodicConditionalRefineTest\n//{\n//  bool operator() (const Key<3>& key, const Tensor<double>& t) const\n//  {\n//    // Is the box above the level from where we want to refine?\n//    int n = key.level();\n//    if (n >= 6) return false;\n//    // Are we on the boundary?\n//    Translation l1 = key.translation()[0];\n//    Translation l2 = key.translation()[1];\n//    Translation l3 = key.translation()[2];\n//    Translation maxl = (1ul<<n) - 1;\n//    if ((l1 == 0 || l1 == maxl) || (l2 == 0 || l2 == maxl) || (l3 == 0 || l3 == maxl))\n//    {\n//      print(\"Refining ...\\n\", key);\n//      return true;\n//    }\n//    return false;\n//  }\n//\n//  template <typename Archive>\n//  void serialize(const Archive& arch) {}\n//};\n////*****************************************************************************\n\n////*****************************************************************************\n//// This code tests the convolution of a periodic charge density with just one gaussian\n//// with periodic boundary conditions.\n//void testPeriodicGaussian(World& world, double coeff, double expnt,\n//    int lmax, int k, double thresh, double* data)\n//{\n//  // Function defaults\n//  FunctionDefaults<3>::set_k(k);\n//  FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n//  FunctionDefaults<3>::set_thresh(thresh);\n//\n//  // Test function\n//  Function<double,3> rho = FunctionFactory<double,3>(world).f(rho_coulomb_func3d);\n//\n//  // Create operator\n//  std::vector< std::shared_ptr< Convolution1D<double> > > ops(1);\n//  ops[0] = std::shared_ptr< Convolution1D<double> >(new PeriodicGaussianConvolution1D<double>(k, 10, coeff*L, expnt*L*L));\n//  SeparatedConvolution<double,3> op(world, k, ops);\n//\n//  // Apply operator\n//  Function<double,3> phi = apply(op, rho);\n//\n//  for (int i=0; i<21; i++)\n//  {\n//    double start = L/2;\n//    double step = L / 20;\n//    coordT3d p(-start + i*step);\n//    printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], phi(p), data[i], phi(p) / data[i]);\n//    //printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], phi(p), data[i], fabs(phi(p) - data[i]));\n//  }\n//}\n////*****************************************************************************\n\n////*****************************************************************************\n//void testSinglePeriodicGaussians(int argc, char** argv)\n//{\n//  MPI::Init(argc, argv);\n//  World world(MPI::COMM_WORLD);\n//  startup(world,argc,argv);\n//\n//  double maple_data_2500[21] =\n//    {\n//      -44.02214685,\n//      -37.86955441,\n//      -23.31010082,\n//      -8.939789115,\n//      -1.299027398,\n//      0.0,\n//      1.299027398,\n//      8.939789115,\n//      23.31010082,\n//      37.86955441,\n//      44.02214685,\n//      37.86955441,\n//      23.31010082,\n//      8.939789115,\n//      1.299027398,\n//      0.0,\n//      -1.299027398,\n//      -8.939789115,\n//      -23.31010082,\n//      -37.86955441,\n//      -44.02214685\n//    };\n//\n//  double maple_data_25000[21] =\n//    {\n//      -1.407020542,\n//      -1.210373524,\n//      -0.7450293332,\n//      -0.2857304296,\n//      -0.04151906172,\n//      0.0,\n//      0.04151906172,\n//      0.2857304296,\n//      0.7450293332,\n//      1.210373524,\n//      1.407020542,\n//      1.210373524,\n//      0.7450293332,\n//      0.2857304296,\n//      0.04151906172,\n//      0.0,\n//      -0.04151906172,\n//      -0.2857304296,\n//      -0.7450293332,\n//      -1.210373524,\n//      -1.407020542\n//    };\n//\n//  double maple_data_55000[21] =\n//    {\n//      -0.4314663948,\n//      -0.3711640906,\n//      -0.2284651223,\n//      -0.08761995618,\n//      -0.01273192489,\n//      0.0,\n//      0.01273192489,\n//      0.08761995618,\n//      0.2284651223,\n//      0.3711640906,\n//      0.4314663948,\n//      0.3711640906,\n//      0.2284651223,\n//      0.08761995618,\n//      0.01273192489,\n//      0.0,\n//      -0.01273192489,\n//      -0.08761995618,\n//      -0.2284651223,\n//      -0.3711640906,\n//      -0.4314663948\n//    };\n//\n//  double maple_data_95000[21] =\n//    {\n//      -0.1901095982,\n//      -0.1635396336,\n//      -0.1006646476,\n//      -0.03860647055,\n//      -0.005609848544,\n//      0.0,\n//      0.005609848544,\n//      0.03860647055,\n//      0.1006646476,\n//      0.1635396336,\n//      0.1901095982,\n//      0.1635396336,\n//      0.1006646476,\n//      0.03860647055,\n//      0.005609848544,\n//      0.0,\n//      -0.005609848544,\n//      -0.03860647055,\n//      -0.1006646476,\n//      -0.1635396336,\n//      -0.1901095982\n//    };\n//\n//  int k = 8;\n//  double thresh = 1e-6;\n//  printf(\"\\nTesting with exponent = 2500\\n\\n\");\n//  testPeriodicGaussian(world, 100, 2500, 16, k, thresh, &maple_data_2500[0]);\n//  printf(\"\\nTesting with exponent = 25000\\n\\n\");\n//  testPeriodicGaussian(world, 100, 25000, 16, k, thresh, &maple_data_25000[0]);\n//  printf(\"\\nTesting with exponent = 55000\\n\\n\");\n//  testPeriodicGaussian(world, 100, 55000, 16, k, thresh, &maple_data_55000[0]);\n//  printf(\"\\nTesting with exponent = 95000\\n\\n\");\n//  testPeriodicGaussian(world, 100, 95000, 16, k, thresh, &maple_data_95000[0]);\n//  MPI::Finalize();\n//}\n////*****************************************************************************\n\n////*****************************************************************************\n//void testSinglePeriodicGaussians_L10(int argc, char** argv)\n//{\n//  MPI::Init(argc, argv);\n//  World world(MPI::COMM_WORLD);\n//  startup(world,argc,argv);\n//\n//  double maple_data_2500[21] =\n//    {\n//      -1.407020542,\n//      -1.210373524,\n//      -0.7450293332,\n//      -0.2857304296,\n//      -0.04151906172,\n//      0.0,\n//      0.04151906172,\n//      0.2857304296,\n//      0.7450293332,\n//       1.210373524,\n//       1.407020542,\n//       1.210373524,\n//      0.7450293332,\n//      0.2857304296,\n//      0.04151906172,\n//      0.0,\n//      -0.04151906172,\n//      -0.2857304296,\n//      -0.7450293332,\n//      -1.210373524,\n//      -1.407020542\n//    };\n//\n//  double maple_data_25000[21] =\n//    {\n//      -1.407020542,\n//      -1.210373524,\n//      -0.7450293332,\n//      -0.2857304296,\n//      -0.04151906172,\n//      0.0,\n//      0.04151906172,\n//      0.2857304296,\n//      0.7450293332,\n//      1.210373524,\n//      1.407020542,\n//      1.210373524,\n//      0.7450293332,\n//      0.2857304296,\n//      0.04151906172,\n//      0.0,\n//      -0.04151906172,\n//      -0.2857304296,\n//      -0.7450293332,\n//      -1.210373524,\n//      -1.407020542\n//    };\n//\n//  double maple_data_55000[21] =\n//    {\n//      -0.4314663948,\n//      -0.3711640906,\n//      -0.2284651223,\n//      -0.08761995618,\n//      -0.01273192489,\n//      0.0,\n//      0.01273192489,\n//      0.08761995618,\n//      0.2284651223,\n//      0.3711640906,\n//      0.4314663948,\n//      0.3711640906,\n//      0.2284651223,\n//      0.08761995618,\n//      0.01273192489,\n//      0.0,\n//      -0.01273192489,\n//      -0.08761995618,\n//      -0.2284651223,\n//      -0.3711640906,\n//      -0.4314663948\n//    };\n//\n//  double maple_data_95000[21] =\n//    {\n//      -0.1901095982,\n//      -0.1635396336,\n//      -0.1006646476,\n//      -0.03860647055,\n//      -0.005609848544,\n//      0.0,\n//      0.005609848544,\n//      0.03860647055,\n//      0.1006646476,\n//      0.1635396336,\n//      0.1901095982,\n//      0.1635396336,\n//      0.1006646476,\n//      0.03860647055,\n//      0.005609848544,\n//      0.0,\n//      -0.005609848544,\n//      -0.03860647055,\n//      -0.1006646476,\n//      -0.1635396336,\n//      -0.1901095982\n//    };\n//\n//  int k = 8;\n//  double thresh = 1e-6;\n//  printf(\"\\nTesting with exponent = 2500\\n\\n\");\n//  testPeriodicGaussian(world, 100, 2500, 16, k, thresh, &maple_data_2500[0]);\n////  printf(\"\\nTesting with exponent = 25000\\n\\n\");\n////  testPeriodicGaussian(world, 100, 25000, 16, k, thresh, &maple_data_25000[0]);\n////  printf(\"\\nTesting with exponent = 55000\\n\\n\");\n////  testPeriodicGaussian(world, 100, 55000, 16, k, thresh, &maple_data_55000[0]);\n////  printf(\"\\nTesting with exponent = 95000\\n\\n\");\n////  testPeriodicGaussian(world, 100, 95000, 16, k, thresh, &maple_data_95000[0]);\n//  MPI::Finalize();\n//}\n////*****************************************************************************\n\n//*****************************************************************************\nvoid testPeriodicCoulomb3d(int argc, char**argv)\n{\n  SafeMPI::Init(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n  startup(world,argc,argv);\n\n  // Function defaults\n  int k = 10;\n  double thresh = 1e-8;\n  FunctionDefaults<3>::set_k(k);\n  FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n  FunctionDefaults<3>::set_thresh(thresh);\n\n  // Create test charge density and the exact solution to Poisson's equation\n  // with said charge density\n  printf(\"building rho ...\\n\\n\");\n  Function<double_complex,3> rho = FunctionFactory<double_complex,3>(world).f(rho_coulomb_func3d);\n  rho.truncate();\n  printf(\"building phi_exact ...\\n\\n\");\n  Function<double_complex,3> phi_exact = FunctionFactory<double_complex,3>(world).f(phi_coulomb_func3d);\n\n  // Create operator and apply\n  Tensor<double> cellsize = FunctionDefaults<3>::get_cell_width();\n  SeparatedConvolution<double_complex,3> op = PeriodicCoulombOp<double_complex,3>(world, k, 1e-8, thresh, cellsize);\n  printf(\"applying operator ...\\n\\n\");\n  Function<double_complex,3> phi_test = apply(op, rho);\n\n  // Apply the laplacian operator the phi_test and see if we get rho back\n//  printf(\"applying laplacian operator to phi_test ...\\n\\n\");\n//  Function<double,3> rho_test = laplacian<Function<double,3>, 3>(phi_test, false);\n//  rho_test.scale(-1.0/4/WST_PI);\n//  Function<double,3> rho_diff = rho - rho_test;\n\n//  rho.reconstruct();\n//  rho_test.reconstruct();\n//  rho_diff.reconstruct();\n  phi_exact.reconstruct();\n  phi_test.reconstruct();\n\n  double bstep = L / 100.0;\n  for (int i=0; i<101; i++)\n  {\n    coordT3d p(-L/2 + i*bstep);\n    double error = abs(phi_exact(p) - phi_test(p));\n    printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], abs(phi_exact(p)), abs(phi_test(p)), error, error / abs(phi_exact(p)));\n    //printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], rho(p), rho_test(p), rho_diff(p), 0.0);\n  }\n\n  // Plot to OpenDX\n  std::vector<long> npt(3,101);\n  Function<double_complex,3> phi_diff = phi_exact - phi_test;\n  plotdx(phi_test, \"phitest.dx\", FunctionDefaults<3>::get_cell(), npt);\n  plotdx(phi_exact, \"phiexact.dx\", FunctionDefaults<3>::get_cell(), npt);\n  plotdx(phi_diff, \"phidiff.dx\", FunctionDefaults<3>::get_cell(), npt);\n\n  SafeMPI::Finalize();\n}\n//*****************************************************************************\n\n////*****************************************************************************\n//// This method is just a simple test of the coulomb operator without periodic\n//// boundary conditions.\n//void testNonPeriodicCoulomb3d(int argc, char**argv)\n//{\n//  MPI::Init(argc, argv);\n//  World world(MPI::COMM_WORLD);\n//  startup(world,argc,argv);\n//\n//  // Function defaults\n//  int k = 14;\n//  double thresh = 1e-12;\n//  double eps = 1e-12;\n//  FunctionDefaults<3>::set_k(k);\n//  FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n//  FunctionDefaults<3>::set_thresh(thresh);\n//\n//  // Create test charge density and the exact solution to Poisson's equation\n//  // with said charge density\n//  printf(\"building rho ...\\n\\n\");\n//  Function<double,3> rho = FunctionFactory<double,3>(world).f(rho_gaussian_func3d);\n//\n//  // Create operator and apply\n//  SeparatedConvolution<double,3> op = CoulombOperator<double>(world, k, 1e-6, eps);\n//  printf(\"applying operator ...\\n\\n\");\n//  Function<double,3> phi_test = apply(op, rho);\n//\n//  // Apply the laplacian operator the phi_test and see if we get rho back\n//  printf(\"applying laplacian operator to phi_test ...\\n\\n\");\n//  Function<double,3> rho_test = laplacian<Function<double,3>, 3>(phi_test, false);\n//  rho_test.scale(-1.0/4/WST_PI);\n//  Function<double,3> rho_diff = rho - rho_test;\n//\n//  rho.reconstruct();\n//  rho_test.reconstruct();\n//  rho_diff.reconstruct();\n//\n//  double bstep = L / 100.0;\n//  for (int i=0; i<101; i++)\n//  {\n//    coordT3d p(-L/2 + i*bstep);\n//    printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], rho(p), rho_test(p), rho_diff(p), rho_test(p) / rho(p));\n//  }\n//\n//  MPI::Finalize();\n//}\n////*****************************************************************************\n\n////*****************************************************************************\n//void testPeriodicBSH3d(int argc, char**argv)\n//{\n//  MPI::Init(argc, argv);\n//  World world(MPI::COMM_WORLD);\n//  startup(world,argc,argv);\n//\n//  // Function defaults\n//  int k = 8;\n//  double thresh = 1e-6;\n//  double eps = 1e-6;\n//  FunctionDefaults<3>::set_k(k);\n//  FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n//  FunctionDefaults<3>::set_thresh(thresh);\n//\n//  // Create test charge density and the exact solution to Poisson's equation\n//  // with said charge density\n//  Function<double,3> rho = FunctionFactory<double,3>(world).f(rho_bsh_func3d);\n//  Function<double,3> phi_exact = FunctionFactory<double,3>(world).f(phi_bsh_func3d);\n//\n//  // Create operator and apply\n//  double twopi = 2 * WST_PI;\n//  Tensor<double> cellsize = FunctionDefaults<3>::get_cell_width();\n//  SeparatedConvolution<double,3> op = PeriodicBSHOp<double,3>(world, twopi/L, k, 1e-8, eps, cellsize);\n//  Function<double,3> phi_test = apply(op, rho);\n//\n//  double bstep = L / 100.0;\n//  for (int i=0; i<101; i++)\n//  {\n//    coordT3d p(-L/2 + i*bstep);\n//    printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], phi_exact(p), phi_test(p), phi_exact(p)/phi_test(p), fabs(phi_exact(p)-phi_test(p)));\n//  }\n//\n//  // Plot to OpenDX\n////  printf(\"plotting to openDX ...\\n\\n\");\n////  vector<long> npt(3,101);\n////  Function<double,3> phi_diff = phi_exact - phi_test;\n////  plotdx(phi_test, \"phitest.dx\", FunctionDefaults<3>::get_cell(), npt);\n////  plotdx(phi_exact, \"phiexact.dx\", FunctionDefaults<3>::get_cell(), npt);\n////  plotdx(phi_diff, \"phidiff.dx\", FunctionDefaults<3>::get_cell(), npt);\n////  printf(\"finished plotting to openDX ...\\n\\n\");\n//\n//  MPI::Finalize();\n//  printf(\"done!\\n\\n\");\n//}\n////*****************************************************************************\n\n////*****************************************************************************\n//// This function test both the periodic and non-periodic versions of the Coulomb\n//// operator. In order to make this test valid set L to a high value so that\n//// charge distribution should not be able to see its neighbor.\n//void testPeriodicCoulomb3d_gauss(int argc, char**argv)\n//{\n//  MPI::Init(argc, argv);\n//  World world(MPI::COMM_WORLD);\n//  startup(world,argc,argv);\n//\n//  // Function defaults\n//  int k = 10;\n//  double thresh = 1e-8;\n//  double eps = 1e-8;\n//  FunctionDefaults<3>::set_k(k);\n//  FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n//  FunctionDefaults<3>::set_thresh(thresh);\n//\n//  // Test for a noncubic system\n//  //  Tensor<double> csize(3,3);\n////  double sz = L/2;\n////  csize(0,0) = -1.2 * sz; csize(0,1) = 1.2 * sz;\n////  csize(1,0) = -1.5 * sz; csize(1,1) = 1.5 * sz;\n////  csize(2,0) = -1.0 * sz; csize(2,1) = 1.0 * sz;\n////  FunctionDefaults<3>::set_cell(csize);\n//\n//  // Create test charge density and the exact solution to Poisson's equation\n//  // with said charge density\n//  printf(\"building gaussian charge distribution ...\\n\\n\");\n//  Function<double,3> rho = FunctionFactory<double,3>(world).f(rho_gaussian_func3d);\n//  rho.truncate();\n//\n//  // Average value of the test function\n//  Function<double,3> ones = FunctionFactory<double,3>(world).f(func_ones);\n//  //double avgval = inner(rho,ones);\n//  double avgval = rho.trace();\n//  printf(\"Average value of rho is %.8f\\n\\n\", avgval);\n//\n//  // Create operator and apply\n//  Tensor<double> cellsize = FunctionDefaults<3>::get_cell_width();\n//  SeparatedConvolution<double,3> pop = PeriodicCoulombOp<double,3>(world, k,1e-10, eps, cellsize);\n//  printf(\"applying periodic operator ...\\n\\n\");\n//  Function<double,3> phi_periodic = apply(pop, rho);\n//  SeparatedConvolution<double,3> op = CoulombOperator<double>(world, FunctionDefaults<3>::get_k(),\n//      1e-10, eps);\n//  printf(\"applying non-periodic operator ...\\n\\n\");\n//  Function<double,3> phi_nonperiodic = apply(op, rho);\n//  phi_nonperiodic.truncate();\n//  phi_periodic.truncate();\n//\n//  phi_periodic.reconstruct();\n//  phi_nonperiodic.reconstruct();\n//\n//  double bstep = L / 100.0;\n//  for (int i=0; i<101; i++)\n//  {\n//    coordT3d p(-L/2 + i*bstep);\n//    double error = fabs(phi_periodic(p) - phi_nonperiodic(p));\n//    printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], phi_periodic(p), phi_nonperiodic(p), error, phi_periodic(p) / phi_nonperiodic(p));\n//  }\n//\n//  // Plot to OpenDX\n////  vector<long> npt(3,101);\n////  Function<double,3> phi_diff = phi_periodic - phi_nonperiodic;\n////  plotdx(phi_periodic, \"phiperiodic.dx\", FunctionDefaults<3>::get_cell(), npt);\n////  plotdx(phi_nonperiodic, \"phinonperiodic.dx\", FunctionDefaults<3>::get_cell(), npt);\n////  plotdx(phi_diff, \"phidiff.dx\", FunctionDefaults<3>::get_cell(), npt);\n//\n//  MPI::Finalize();\n//}\n////*****************************************************************************\n\n////*****************************************************************************\n//// This function test both the periodic and non-periodic versions of the BSH\n//// operator. In order to make this test valid set L to a high value so that\n//// charge distribution should not be able to see its neighbor.\n//void testPeriodicBSH3d_gauss(int argc, char**argv)\n//{\n//  MPI::Init(argc, argv);\n//  World world(MPI::COMM_WORLD);\n//  startup(world,argc,argv);\n//\n//  // Function defaults\n//  int k = 10;\n//  double thresh = 1e-8;\n//  double eps = 1e-8;\n//  FunctionDefaults<3>::set_k(k);\n//  FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n//  FunctionDefaults<3>::set_thresh(thresh);\n//\n//  // Test for a noncubic system\n//  //  Tensor<double> csize(3,3);\n////  double sz = L/2;\n////  csize(0,0) = -1.2 * sz; csize(0,1) = 1.2 * sz;\n////  csize(1,0) = -1.5 * sz; csize(1,1) = 1.5 * sz;\n////  csize(2,0) = -1.0 * sz; csize(2,1) = 1.0 * sz;\n////  FunctionDefaults<3>::set_cell(csize);\n//\n//  // Create test charge density and the exact solution to Poisson's equation\n//  // with said charge density\n//  printf(\"building gaussian charge distribution ...\\n\\n\");\n//  Function<double,3> rho = FunctionFactory<double,3>(world).f(rho_gaussian_func3d);\n//  rho.truncate();\n//\n//  // Average value of the test function\n//  Function<double,3> ones = FunctionFactory<double,3>(world).f(func_ones);\n//  double avgval = inner(rho,ones);\n//  printf(\"Average value of rho is %.8f\\n\\n\", avgval);\n//\n//  // Create operator and apply\n//  Tensor<double> cellsize = FunctionDefaults<3>::get_cell_width();\n//  SeparatedConvolution<double,3> pop = PeriodicBSHOp<double,3>(world, -3.0, k,1e-6, eps, cellsize);\n//  printf(\"applying periodic operator ...\\n\\n\");\n//  Function<double,3> phi_periodic = apply(pop, rho);\n//  SeparatedConvolution<double,3> op = BSHOperator3D<double>(world, -3.0, FunctionDefaults<3>::get_k(),\n//      1e-6, thresh);\n//  printf(\"applying non-periodic operator ...\\n\\n\");\n//  Function<double,3> phi_nonperiodic = apply(op, rho);\n//\n//  double bstep = L / 100.0;\n//  for (int i=0; i<101; i++)\n//  {\n//    coordT3d p(-L/2 + i*bstep);\n//    double error = fabs(phi_periodic(p) - phi_nonperiodic(p));\n//    printf(\"%.2f\\t\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], phi_periodic(p), phi_nonperiodic(p), error, phi_periodic(p) / phi_nonperiodic(p));\n//  }\n//\n////  // Plot to OpenDX\n////  vector<long> npt(3,101);\n////  Function<double,3> phi_diff = phi_periodic - phi_nonperiodic;\n////  plotdx(phi_periodic, \"phiperiodic.dx\", FunctionDefaults<3>::get_cell(), npt);\n////  plotdx(phi_nonperiodic, \"phinonperiodic.dx\", FunctionDefaults<3>::get_cell(), npt);\n////  plotdx(phi_diff, \"phidiff.dx\", FunctionDefaults<3>::get_cell(), npt);\n//\n//  MPI::Finalize();\n//}\n////*****************************************************************************\n\n//*****************************************************************************\nint main(int argc, char**argv)\n{\n  BoundaryConditions<3> bc(BC_PERIODIC);\n  FunctionDefaults<3>::set_bc(bc);\n  //testPeriodicBSH3d(argc, argv);\n  //testPeriodicCoulomb3d_gauss(argc, argv);\n  //testNonPeriodicCoulomb3d(argc, argv);\n  testPeriodicCoulomb3d(argc, argv);\n  //testPeriodicBSH3d_gauss(argc, argv);\n  //testSinglePeriodicGaussians(argc,argv);\n  return 0;\n}\n//*****************************************************************************\n\n"
  },
  {
    "path": "src/apps/periodic_old/test_xc.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <iostream>\n\n#include \"libxc.h\"\n\nusing std::cout;\nusing std::endl;\n\nusing namespace madness;\n\nconst double PI = 3.1415926535897932384;\n\ntypedef Vector<double,3> coordT;\n\n//static inline double pow(const double* a, const double* b) {\n//    return pow(*a, *b);\n//}\n\n//static double c_b2 = .333333333333333333333333333333333;\n//static double c_b7 = .333333333333333333333333333333;\n//static double c_b8 = .5;\n//static double c_b14 = 1.333333333333333333333333333333;\n\n//inline /* Subroutine */ int x_rks_s__(const double *r__, double *f, double *\n//  dfdra)\n//{\n//\n//    /* Local variables */\n//    static double ra13;\n//\n//\n///*     This subroutine evaluates the spin polarised exchange functional */\n///*     in the Local Density Approximation [1], and the corresponding */\n///*     potential. Often this functional is referred to as the Dirac */\n///*     functional [2] or Slater functional. */\n//\n///*     [1] F. Bloch, Zeitschrift fuer Physik, Vol. 57 (1929) 545. */\n//\n///*     [2] P.A.M. Dirac, Proceedings of the Cambridge Philosophical */\n///*         Society, Vol. 26 (1930) 376. */\n//\n///*     Parameters: */\n//\n///*     r     the total electron density */\n///*     f     On return the functional value */\n///*     dfdra On return the derivative of f with respect to alpha electron */\n///*           density */\n//\n//\n///*     Ax = -3/4*(6/pi)**(1/3) */\n///*     Bx = -(6/pi)**(1/3) */\n///*     C  = (1/2)**(1/3) */\n//\n//\n//\n//\n//    ra13 = pow(r__, &c_b2) * .793700525984099737375852819636154;\n//    *f = *r__ * -.930525736349100025002010218071667 * ra13;\n//    *dfdra = ra13 * -1.24070098179880003333601362409556;\n//\n//    return 0;\n//} /* x_rks_s__ */\n//\n///* ----------------------------------------------------------------------- */\n//inline /* Subroutine */ int x_uks_s__(double *ra, double *rb, double *f,\n//  double *dfdra, double *dfdrb)\n//{\n//    /* Local variables */\n//    static double ra13, rb13;\n//\n//\n///*     This subroutine evaluates the spin polarised exchange functional */\n///*     in the Local Density Approximation [1], and the corresponding */\n///*     potential. Often this functional is referred to as the Dirac */\n///*     functional [2] or Slater functional. */\n//\n///*     [1] F. Bloch, Zeitschrift fuer Physik, Vol. 57 (1929) 545. */\n//\n///*     [2] P.A.M. Dirac, Proceedings of the Cambridge Philosophical */\n///*         Society, Vol. 26 (1930) 376. */\n//\n///*     Parameters: */\n//\n///*     ra    the alpha electron density */\n///*     rb    the beta  electron density */\n///*     f     On return the functional value */\n///*     dfdra On return the derivative of f with respect to ra */\n///*     dfdrb On return the derivative of f with respect to rb */\n//\n//\n///*     Ax = -3/4*(6/pi)**(1/3) */\n///*     Bx = -(6/pi)**(1/3) */\n//\n//\n//\n//\n//    ra13 = pow(ra, &c_b2);\n//    rb13 = pow(rb, &c_b2);\n//    *f = (*ra * ra13 + *rb * rb13) * -.930525736349100025002010218071667;\n//    *dfdra = ra13 * -1.24070098179880003333601362409556;\n//    *dfdrb = rb13 * -1.24070098179880003333601362409556;\n//\n//    return 0;\n//} /* x_uks_s__ */\n//\n//inline /* Subroutine */ int c_rks_vwn5__(const double *r__, double *f, double *\n//  dfdra)\n//{\n//    /* Local variables */\n//    static double a2, b2, c2, d2, i1, i2, i3, p1, p2, p3, p4, t4, t5, t6,\n//      t7, iv, alpha_rho13__, iv2, pp1, pp2, inv, srho, srho13;\n//\n//\n///*     This subroutine evaluates the Vosko, Wilk and Nusair correlation */\n///*     functional number 5 [1] for the closed shell case, with the */\n///*     parametrisation as given in table 5. */\n//\n///*     The original code was obtained from Dr. Phillip Young, */\n///*     with corrections from Dr. Paul Sherwood. */\n//\n///*     [1] S.H. Vosko, L. Wilk, and M. Nusair */\n///*         \"Accurate spin-dependent electron liquid correlation energies */\n///*          for local spin density calculations: a critical analysis\", */\n///*         Can.J.Phys, Vol. 58 (1980) 1200-1211. */\n//\n///*     Parameters: */\n//\n///*     r      the total electron density */\n///*     f      On return the functional value */\n///*     dfdra  On return the derivative of f with respect to the alpha */\n///*            electron density */\n//\n//\n//\n//\n///* VWN interpolation parameters */\n//\n///* paramagnetic */\n//    a2 = .0621814;\n//    b2 = 3.72744;\n//    c2 = 12.9352;\n//    d2 = -.10498;\n//\n///* t4 = (1/(4/3)*pi)**(1/3) */\n//    t4 = .620350490899399531;\n//\n///* t5 = 0.5/(2**(1/3)-1) */\n//    t5 = 1.92366105093153617;\n//\n///* t6 = 2/(3*(2**(1/3)-1)) */\n//    t6 = 2.56488140124204822;\n//\n///* t7 = 2.25*(2**(1/3)-1) */\n//    t7 = .584822362263464735;\n//\n///* Paramagnetic interpolation constants */\n//\n//    p1 = 6.1519908197590798;\n//    p2 = a2 * .5;\n//    p3 = 9.6902277115443745e-4;\n//    p4 = .038783294878113009;\n//\n///* closed shell case */\n//    srho = *r__;\n//    srho13 = pow(&srho, &c_b7);\n//    alpha_rho13__ = pow(&c_b8, &c_b7) * srho;\n//    iv2 = t4 / srho13;\n//    iv = sqrt(iv2);\n//\n///* paramagnetic */\n//    inv = 1. / (iv2 + b2 * iv + c2);\n//    i1 = log(iv2 * inv);\n//    i2 = log((iv - d2) * (iv - d2) * inv);\n///* corrected b1->b2 ps Apr98 */\n//    i3 = atan(p1 / (iv * 2. + b2));\n//    pp1 = p2 * i1 + p3 * i2 + p4 * i3;\n//    pp2 = a2 * (1. / iv - iv * inv * (b2 / (iv - d2) + 1.));\n//\n//    *f = pp1 * srho;\n//    *dfdra = pp1 - iv * .166666666666666666666666666666 * pp2;\n//\n//    return 0;\n//} /* c_rks_vwn5__ */\n//\n///* ----------------------------------------------------------------------- */\n//inline /* Subroutine */ int c_uks_vwn5__(double *ra, double *rb, double *\n//  f, double *dfdra, double *dfdrb)\n//{\n//    /* System generated locals */\n//    double d__1, d__2;\n//\n//    /* Local variables */\n//    static double v, beta_rho13__, a1, b1, c1, d1, a2, b2, c2, d2, a3, b3,\n//       c3, d3, f1, f2, f3, p1, p2, p3, s1, t1, t2, s2, t4, t5, t6, t7,\n//      s3, s4, p4, f4, i1, i2, i3, iv, alpha_rho13__, ff1, ff2, iv2, pp1,\n//       pp2, ss1, ss2, tau, inv, vwn1, vwn2, dtau, zeta, srho, zeta3,\n//      zeta4, srho13, inter1, inter2;\n//\n//\n///*     This subroutine evaluates the Vosko, Wilk and Nusair correlation */\n///*     functional number 5 [1], with the parametrisation as given in */\n///*     table 5. */\n//\n///*     The original code was obtained from Dr. Phillip Young, */\n///*     with corrections from Dr. Paul Sherwood. */\n//\n///*     [1] S.H. Vosko, L. Wilk, and M. Nusair */\n///*         \"Accurate spin-dependent electron liquid correlation energies */\n///*          for local spin density calculations: a critical analysis\", */\n///*         Can.J.Phys, Vol. 58 (1980) 1200-1211. */\n//\n///*     Parameters: */\n//\n///*     ra     the alpha-electron density */\n///*     rb     the beta-electron density */\n///*     f      On return the functional value */\n///*     dfdra  On return the derivative of f with respect to ra */\n///*     dfdrb  On return the derivative of f with respect to rb */\n//\n//\n//\n///*     tn13 = 2**(1/3) */\n///*     tn43 = 2**(4/3) */\n//\n///* VWN interpolation parameters */\n//\n///* spin stiffness */\n//    a1 = -.0337737278807791058;\n//    b1 = 1.13107;\n//    c1 = 13.0045;\n//    d1 = -.0047584;\n///* paramagnetic */\n//    a2 = .0621814;\n//    b2 = 3.72744;\n//    c2 = 12.9352;\n//    d2 = -.10498;\n///* ferromagnetic */\n///* try cadpac/nwchem value (.5*a2) */\n//    a3 = .0310907;\n//    b3 = 7.06042;\n//    c3 = 18.0578;\n//    d3 = -.325;\n//\n///* t4 = (1/(4/3)*pi)**(1/3) */\n//    t4 = .620350490899399531;\n//\n///* t5 = 0.5/(2**(1/3)-1) */\n//    t5 = 1.92366105093153617;\n//\n///* t6 = 2/(3*(2**(1/3)-1)) */\n//    t6 = 2.56488140124204822;\n//\n///* t7 = 2.25*(2**(1/3)-1) */\n//    t7 = .584822362263464735;\n//\n///* Spin stiffness interpolation constants */\n//\n//    s1 = 7.12310891781811772;\n//    s2 = a1 * .5;\n//    s3 = -6.9917323507644313e-6;\n//    s4 = -.0053650918488835769;\n//\n///* Paramagnetic interpolation constants */\n//\n//    p1 = 6.1519908197590798;\n//    p2 = a2 * .5;\n//    p3 = 9.6902277115443745e-4;\n//    p4 = .038783294878113009;\n//\n///* Ferromagnetic interpolation constants */\n//\n//    f1 = 4.73092690956011364;\n//    f2 = a3 * .5;\n//\n///*      F3 = -0.244185082989490298d-02 *0.5d0 */\n///*      F4 = -0.570212323620622186d-01 *0.5d0 */\n//\n///*  try nwchem values */\n//\n//    f3 = .00224786709554261133;\n//    f4 = .0524913931697809227;\n//\n///* Interpolation intervals */\n//\n//    inter1 = .99999999989999999;\n//    inter2 = -.99999999989999999;\n//\n///* open shell case */\n//    alpha_rho13__ = pow(ra, &c_b7);\n//    beta_rho13__ = pow(rb, &c_b7);\n//    srho = *ra + *rb;\n//    srho13 = pow(&srho, &c_b7);\n//    iv2 = t4 / srho13;\n//    iv = sqrt(iv2);\n//\n///* spin-stiffness */\n//    inv = 1. / (iv2 + b1 * iv + c1);\n//    i1 = log(iv2 * inv);\n//    i2 = log((iv - d1) * (iv - d1) * inv);\n//    i3 = atan(s1 / (iv * 2. + b1));\n//    ss1 = s2 * i1 + s3 * i2 + s4 * i3;\n//    ss2 = a1 * (1. / iv - iv * inv * (b1 / (iv - d1) + 1.));\n//\n///* paramagnetic */\n//    inv = 1. / (iv2 + b2 * iv + c2);\n//    i1 = log(iv2 * inv);\n//    i2 = log((iv - d2) * (iv - d2) * inv);\n///* corrected b1->b2 ps Apr98 */\n//    i3 = atan(p1 / (iv * 2. + b2));\n//    pp1 = p2 * i1 + p3 * i2 + p4 * i3;\n//    pp2 = a2 * (1. / iv - iv * inv * (b2 / (iv - d2) + 1.));\n//\n///* ferromagnetic */\n//    inv = 1. / (iv2 + b3 * iv + c3);\n//    i1 = log(iv2 * inv);\n//    i2 = log((iv - d3) * (iv - d3) * inv);\n//    i3 = atan(f1 / (iv * 2. + b3));\n//    ff1 = f2 * i1 + f3 * i2 + f4 * i3;\n//    ff2 = a3 * (1. / iv - iv * inv * (b3 / (iv - d3) + 1.));\n//\n///* polarisation function */\n//\n//    zeta = (*ra - *rb) / srho;\n//    zeta3 = zeta * zeta * zeta;\n//    zeta4 = zeta3 * zeta;\n//    if (zeta > inter1) {\n//  vwn1 = t5 * .51984209978974638;\n//  vwn2 = t6 * 1.25992104989487316476721060727823;\n//    } else if (zeta < inter2) {\n//  vwn1 = t5 * .51984209978974638;\n//  vwn2 = t6 * -1.25992104989487316476721060727823;\n//    } else {\n//  d__1 = zeta + 1.;\n//  d__2 = 1. - zeta;\n//  vwn1 = (pow(&d__1, &c_b14) + pow(&d__2, &c_b14) - 2.) * t5;\n//  d__1 = zeta + 1.;\n//  d__2 = 1. - zeta;\n//  vwn2 = (pow(&d__1, &c_b7) - pow(&d__2, &c_b7)) * t6;\n//    }\n//    ss1 *= t7;\n//    ss2 *= t7;\n//    tau = ff1 - pp1 - ss1;\n//    dtau = ff2 - pp2 - ss2;\n//\n//    v = pp1 + vwn1 * (ss1 + tau * zeta4);\n//    *f = v * srho;\n//\n//    t1 = v - iv * .166666666666666666666666666667 * (pp2 + vwn1 * (ss2 + dtau\n//      * zeta4));\n//    t2 = vwn2 * (ss1 + tau * zeta4) + vwn1 * 4. * tau * zeta3;\n//    *dfdra = t1 + t2 * (1. - zeta);\n//    *dfdrb = t1 - t2 * (zeta + 1.);\n//\n//    return 0;\n//} /* c_uks_vwn5__ */\n\n//*****************************************************************************\nstatic double gauss_func3(const coordT& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  return exp(-3.0*(x*x + y*y + z*z));\n}\n//*****************************************************************************\n\n//*****************************************************************************\nstatic double gauss_func1(const coordT& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  return exp(-1.0*(x*x + y*y + z*z));\n}\n//*****************************************************************************\n\n//*****************************************************************************\nvoid test_xc1(World& world)\n{\n  XC(lda_type) xc_c_func;\n  XC(lda_type) xc_x_func;\n  XC(lda_type) xc_c_func2;\n  XC(lda_type) xc_x_func2;\n\n  xc_lda_init(&xc_c_func, XC_LDA_C_VWN,XC_UNPOLARIZED);\n  xc_lda_x_init(&xc_x_func, XC_UNPOLARIZED, 3, 0);\n  xc_lda_init(&xc_c_func2, XC_LDA_C_VWN,XC_POLARIZED);\n  xc_lda_x_init(&xc_x_func2, XC_POLARIZED, 3, 0);\n\n  for (int k = -10; k < 10; k++)\n  {\n    double r = pow(3.5, k);\n    double tmpr[2];\n    tmpr[0] = 0.5 * r;\n    tmpr[1] = 0.5 * r;\n    double libxc_v1 = 0.0, libxc_v2 = 0.0, libxc_e1 = 0.0, libxc_e2 = 0.0;\n    double da_v1 = 0.0, da_v2 = 0.0, da_e1 = 0.0, da_e2 = 0.0;\n    double libxc_v1_sp[2], libxc_v2_sp[2], libxc_e1_sp[2], libxc_e2_sp[2];\n    x_rks_s__(&r, &da_e1, &da_v1);\n    c_rks_vwn5__(&r, &da_e2, &da_v2);\n    xc_lda_vxc(&xc_x_func, &r, &libxc_e1, &libxc_v1);\n    xc_lda_vxc(&xc_c_func, &r, &libxc_e2, &libxc_v2);\n    xc_lda_vxc(&xc_x_func2, &tmpr[0], &libxc_e1_sp[0], &libxc_v1_sp[0]);\n    xc_lda_vxc(&xc_c_func2, &tmpr[0], &libxc_e2_sp[0], &libxc_v2_sp[0]);\n\n    printf(\"%.5e     %8e     %8e     %8e\\n\", r, libxc_e1+libxc_e2, da_e1+da_e2, libxc_e1_sp[0]+libxc_e2_sp[0]);\n  }\n}\n//*****************************************************************************\n\n////***************************************************************************\n//static double munge(double r) {\n//  if (r < 1e-12) r = 1e-12;\n//  return r;\n//}\n////***************************************************************************\n\n//***************************************************************************\nstatic void da_ldaop(const Key<3>& key, Tensor<double>& t) {\n  UNARY_OPTIMIZED_ITERATOR(double, t, double r=munge(2.0* *_p0); double q; double dq1; double dq2;x_rks_s__(&r, &q, &dq1);c_rks_vwn5__(&r, &q, &dq2); *_p0 = dq1+dq2);\n}\n//***************************************************************************\n\n////***************************************************************************\n//static void libxc_ldaop(const Key<3>& key, Tensor<double>& t) {\n//  XC(lda_type) xc_c_func;\n//  XC(lda_type) xc_x_func;\n//  xc_lda_init(&xc_c_func, XC_LDA_C_VWN,XC_UNPOLARIZED);\n//  xc_lda_x_init(&xc_x_func, XC_UNPOLARIZED, 3, 0);\n//  UNARY_OPTIMIZED_ITERATOR(double, t, double r=munge(2.0* *_p0); double q; double dq1; double dq2;xc_lda_vxc(&xc_x_func, &r, &q, &dq1);xc_lda_vxc(&xc_c_func, &r, &q, &dq2); *_p0 = dq1+dq2);\n//}\n////***************************************************************************\n\n//*****************************************************************************\nvoid multiply_op(const Key<3>& key, Tensor<double> tcube,\n                 Tensor<double> lcube,\n                 Tensor<double> rcube)\n{\n  TERNARY_OPTIMIZED_ITERATOR(double, tcube, double, lcube, double, rcube, *_p0 = *_p1 * *_p2;);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nvoid add_op(const Key<3>& key, Tensor<double> tcube,\n                 Tensor<double> lcube,\n                 Tensor<double> rcube)\n{\n  TERNARY_OPTIMIZED_ITERATOR(double, tcube, double, lcube, double, rcube, *_p0 = *_p1 + *_p2;);\n}\n//*****************************************************************************\n\n//*****************************************************************************\nvoid test_xc2(World& world)\n{\n  // Function defaults\n  int funck = 8;\n  double thresh = 1e-6;\n  double L = 10.0;\n  FunctionDefaults<3>::set_k(funck);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_cubic_cell(-L/2, L/2);\n\n  Function<double,3> f = FunctionFactory<double,3>(world).f(gauss_func3);\n  Function<double,3> f2 = FunctionFactory<double,3>(world).f(gauss_func1);\n  Function<double,3> fda = copy(f);\n  Function<double,3> flibxc = copy(f);\n  fda.unaryop(&da_ldaop);\n  flibxc.unaryop(&libxc_ldaop);\n  f.scale(0.5);\n  Function<double,3> flibxc_sp = binary_op(f, f, &::libxc_ldaop_sp);\n  Function<double,3> prod = binary_op(f, f2, &::multiply_op);\n  Function<double,3> sum = binary_op(f, f2, &::add_op);\n\n  if (world.rank() == 0) printf(\"\\n\");\n  double bstep = L / 100.0;\n  fda.reconstruct();\n  flibxc.reconstruct();\n  for (int i=0; i<101; i++)\n  {\n    coordT p(-L/2 + i*bstep);\n    if (world.rank() == 0) printf(\"%5.2f%18.8e%15.8f%15.8f%15.8f\\n\", p[0], f(p), fda(p), flibxc(p), flibxc_sp(p));\n//    if (world.rank() == 0) printf(\"%.2f\\t\\t%.8e\\t%.8f\\t%.8f\\t%.8f\\n\", p[0], f(p), fda(p), flibxc(p), flibxc_sp(p));\n//    if (world.rank() == 0) printf(\"%.2f\\t\\t%.8f\\t%.8f\\n\", p[0], f(p)+f2(p), sum(p));\n  }\n  if (world.rank() == 0) printf(\"\\n\");\n\n}\n//*****************************************************************************\n\n#define TO_STRING(s) TO_STRING2(s)\n#define TO_STRING2(s) #s\n\n//*****************************************************************************\nint main(int argc, char** argv)\n{\n  initialize(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n  if (world.rank() == 0)\n  {\n    print(\"\");\n    print(\"--------------------------------------------\");\n    print(\"   MADNESS\", \" multiresolution testsuite\");\n    print(\"--------------------------------------------\");\n    print(\"\");\n    print(\"   number of processors ...\", world.size());\n    print(\"    processor frequency ...\", cpu_frequency());\n    print(\"            host system ...\", TO_STRING(HOST_SYSTEM));\n    print(\"             byte order ...\", TO_STRING(MADNESS_BYTE_ORDER));\n    print(\"          configured by ...\", MADNESS_CONFIGURATION_USER);\n    print(\"          configured on ...\", MADNESS_CONFIGURATION_HOST);\n    print(\"          configured at ...\", MADNESS_CONFIGURATION_DATE);\n    print(\"                    CXX ...\", MADNESS_CONFIGURATION_CXX);\n    print(\"               CXXFLAGS ...\", MADNESS_CONFIGURATION_CXXFLAGS);\n#ifdef OPTERON_TUNE\n    print(\"             tuning for ...\", \"opteron\");\n#elif defined(CORE_DUO_TUNE)\n    print(\"             tuning for ...\", \"core duo\");\n#else\n    print(\"             tuning for ...\", \"default\");\n#endif\n#ifdef BOUNDS_CHECKING\n    print(\" tensor bounds checking ...\", \"enabled\");\n#endif\n#ifdef TENSOR_INSTANCE_COUNT\n    print(\"  tensor instance count ...\", \"enabled\");\n#endif\n    print(\" \");\n  }\n\n  try\n  {\n    printf(\"WSTHORNTON: Starting up the world ... \\n\");\n\n    startup(world,argc,argv);\n    if (world.rank() == 0) print(\"Initial tensor instance count\", BaseTensor::get_instance_count());\n    test_xc2(world);\n  }\n  catch (const SafeMPI::Exception& e)\n  {\n    print(e);\n    error(\"caught an MPI exception\");\n  }\n  catch (const madness::MadnessException& e)\n  {\n    print(e);\n    error(\"caught a MADNESS exception\");\n  }\n  catch (const madness::TensorException& e)\n  {\n    print(e);\n    error(\"caught a Tensor exception\");\n  }\n  catch (const char* s)\n  {\n    print(s);\n    error(\"caught a string exception\");\n  }\n  catch (const std::string& s)\n  {\n    print(s);\n    error(\"caught a string (class) exception\");\n  }\n  catch (const std::exception& e)\n  {\n    print(e.what());\n    error(\"caught an STL exception\");\n  }\n  catch (...)\n  {\n    error(\"caught unhandled exception\");\n  }\n\n  if (world.rank() == 0)\n    print(\"entering final fence\");\n  world.gop.fence();\n  if (world.rank() == 0)\n    print(\"done with final fence\");\n  if (world.rank() == 0)\n    print(\"Final tensor instance count\", BaseTensor::get_instance_count());\n\n  finalize();\n  return 0;\n}\n//*****************************************************************************\n\n"
  },
  {
    "path": "src/apps/periodic_old/testconv.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n\nusing namespace std;\nusing namespace madness;\n\n#define N 100\n\nclass Array : public WorldObject<Array> {\n    vector<double> v;\npublic:\n    /// Make block distributed array with size elements\n    Array(World& world, size_t size)\n        : WorldObject<Array>(world), v((size-1)/world.size()+1)\n    {\n        process_pending();\n    }\n\n    /// Return the process in which element i resides\n    ProcessID owner(size_t i) const {return i/v.size();};\n\n    /// Read element i\n    Future<double> read(size_t i) const {\n        if (owner(i) == world.rank())\n            return Future<double>(v[i-world.rank()*v.size()]);\n        else\n            return send(owner(i), &Array::read, i);\n    }\n\n    /// Write element i\n    void write(size_t i, double value) {\n        if (owner(i) == world.rank())\n            v[i-world.rank()*v.size()] = value;\n        else\n            send(owner(i), &Array::write, i, value);\n    }\n};\n\n\nint main(int argc, char** argv) {\n    SafeMPI::Init(argc, argv);\n    madness::World world(SafeMPI::COMM_WORLD);\n\n    // here is our global object\n    Array x(world, N), y(world, N);\n\n    // initialize vectors\n    for (int i=0; i < N; i++)\n    {\n        x.write(i, i);\n        y.write(i, 0.0);\n    }\n    world.gop.fence();\n\n    // print x\n    if (world.rank() == 0)\n    {\n      for (size_t i = 0; i < N; i++)\n      {\n        printf(\"%.4f\\n\", x.read(i).get());\n      }\n    }\n\n    for (size_t i = 0; i < N; i++)\n    {\n        Future<double> valxm = (i != 0) ? x.read(i-1) : Future<double>(0.0);\n        Future<double> valxp = (i != N) ? x.read(i+1) : Future<double>(0.0);\n        Future<double> valx = x.read(i);\n\n        y.write(i, 0.3333333333*valxm.get() + valxp.get() + 0.3333333333*valx.get());\n    }\n    world.gop.fence();\n\n    if (world.rank() == 0)\n    {\n      for (size_t i = 0; i < N; i++)\n      {\n        printf(\"%.4f\\n\", y.read(i).get());\n      }\n    }\n    SafeMPI::Finalize();\n}\n\n"
  },
  {
    "path": "src/apps/periodic_old/util.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n"
  },
  {
    "path": "src/apps/periodic_old/util.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef UTIL_H_\n#define UTIL_H_\n\n#include <madness/mra/mra.h>\n#include <madness/world/MADworld.h>\n\nnamespace madness {\n//  void printfunc(const World& world, Function<double,3> f, int npts)\n//  {\n//    Tensor<double> LL = FunctionDefaults<3>::get_cell_width();\n//    double L = LL[0];\n//    double bstep = L / npts;\n//    f.reconstruct();\n//    for (int i = 0; i <= npts; i++)\n//    {\n//      Vector<double,3> p(-L/2 + i * bstep);\n//      if (world.rank() == 0) printf(\"%.2f\\t\\t%.8f\\n\", p[0], f(p));\n//    }\n//    if (world.rank() == 0) printf(\"\\n\");\n//  }\n\n//  void printfunc(const World& world, Function<double,3> f1, Function<double,3> f2, int npts)\n//  {\n//    Tensor<double> LL = FunctionDefaults<3>::get_cell_width();\n//    double L = LL[0];\n//    double bstep = L / npts;\n//    f1.reconstruct();\n//    f2.reconstruct();\n//    for (int i = 0; i <= npts; i++)\n//    {\n//      Vector<double,3> p(-L/2 + i * bstep);\n//      if (world.rank() == 0) printf(\"%.2f\\t\\t%.8f\\t%.8f\\n\", p[0], f1(p), f2(p));\n//    }\n//    if (world.rank() == 0) printf(\"\\n\");\n//  }\n}\n//\n//#include <madness/mra/mra.h>\n//#include <madness/world/MADworld.h>\n//#include <vector>\n//\n//namespace madness\n//{\n//  class OnesFunctor :\n//  public FunctionFunctorInterface<double,3>\n//  {\n//  private:\n//\n//  public:\n//    //*************************************************************************\n//    OnesFunctor()\n//    {\n//    }\n//    //*************************************************************************\n//\n//    //*************************************************************************\n//    virtual ~OnesFunctor() {}\n//    //*************************************************************************\n//\n//    //*************************************************************************\n//    double operator()(const coordT& x) const\n//    {\n//      return 1.0;\n//    }\n//    //*************************************************************************\n//  };\n//\n//  //***************************************************************************\n//  class ZerosFunctor :\n//  public FunctionFunctorInterface<double,3>\n//  {\n//  private:\n//\n//  public:\n//    //*************************************************************************\n//    ZerosFunctor()\n//    {\n//    }\n//    //*************************************************************************\n//\n//    //*************************************************************************\n//    virtual ~ZerosFunctor() {}\n//    //*************************************************************************\n//\n//    //*************************************************************************\n//    double operator()(const coordT& x) const\n//    {\n//      return 0.0;\n//    }\n//    //*************************************************************************\n//  };\n//  //***************************************************************************\n//}\n\n#endif\n"
  },
  {
    "path": "src/apps/plot/CMakeLists.txt",
    "content": "# src/apps/moldft\n\nadd_mad_executable(plot2cube plot2cube.cpp MADchem)\nadd_dependencies(applications-madness plot2cube)\nadd_mad_executable(plot2plane plot2plane.cpp MADchem)\nadd_dependencies(applications-madness plot2plane)\n\ninstall(TARGETS plot2cube DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\ninstall(TARGETS plot2plane DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/plot/README.md",
    "content": "# Plot Functions from Chemistry Libraries\n\n```bash\nplot2cube file=mra_orbital_0\nplot2plane file=mra_orbital_1\n```\n\nneeds files\n- mra_orbital_0.00000\n- input\n\n\n"
  },
  {
    "path": "src/apps/plot/plot2cube.cpp",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/funcplot.h>\n#include \"madness/mra/commandlineparser.h\"\n#include <madness/chem/CalculationParameters.h>\n#include <madness/chem/molecule.h>\n\nusing namespace madness;\n\nint main(int argc, char** argv) {\n\n    World& world=initialize(argc, argv);\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    commandlineparser parser(argc,argv);\n\tbool printhelp=parser.key_exists(\"help\");\n\n\t// if no filename is given print help\n\tstd::vector<std::string> filenames;\n    if (parser.key_exists(\"file\")) {\n    \tfilenames = parser.split(parser.value(\"file\"),\",\");\n    } else {\n    \tstd::cout << \"\\ninvalid usage: no filename(s) given\\n\";\n    \tprinthelp=true;\n    }\n\n\t// check if file exists using c++ filesystem\n\ttry {\n\t\tfor (const auto& filename : filenames) {\n\t\t\tbool file_ok=std::filesystem::exists(filename+\".00000\");\n\t\t\t// if (not file_ok) throw std::runtime_error(\"file not found\");\n\t\t\tif (not file_ok) {\n\t\t\t\tstd::cout << \"\\ncould not find data file: \"+filename+\"\\n\";\n\t\t\t\tprinthelp=true;\n\t\t\t}\n\t\t}\n\t} catch (...) {\n    \tstd::cout << \"\\ncould not find data file(s): \";\n\t\tprinthelp=true;\n\t}\n\n\n\tif (printhelp) {\n\tstd::cout << \"\\nUSAGE: plot2cube file=name1[,name2][,name3] [options]\\n\\n\";\n\t\tstd::cout << \"name1,name2,..  names of the files to plot, each must contain one 3d function only \\n\";\n\t\tstd::cout << \"                filename without extension, e.g. nemo4 instead of nemo4.00000\\n\\n\";\n\t\tstd::cout << \"OPTIONS: command line options similar to the electronic structure calculations \\n\";\n\t\tstd::cout << \"         will read the input file if it exists, command line options will override the input file\\n\";\n\t\tstd::cout << std::endl;\n\t\tstd::cout << \"           e.g. plot2cube file=nemo4,nemo0 --geometry=h2o\\n\";\n\t\tstd::cout << \"           e.g. plot2cube file=nemo4 --geometry=\\\"no_orient=true; source_name=h2o\\\"\\n\";\n\t\tstd::cout << \"           e.g. plot2cube file=nemo4 --geometry=h2o --plot=\\\"zoom 4;  origin=[3, 3, 3]\\\"\\n\\n\";\n\t\tstd::cout << std::endl;\n\t\tstd::cout << \"default plot options are: \\n\";\n\t\tPlotParameters pparam;\n\t\tpparam.print(\"plot\",\"end\");\n\t\tfinalize();\n\t\treturn 0;\n\t}\n\n\n\t// get molecule and calculation parameters\n\tMolecule molecule(world,parser);\n\tCalculationParameters param(world,parser);\n\tAtomicBasisSet aobasis(param.aobasis()); // not actually needed here..\n\tparam.set_derived_values(molecule);\n\tPlotParameters pparam(world,parser);\n\n\tif (world.rank()==0) {\n\t\tprint_header2(\"plotting parameters\");\n\t\tparam.print(\"dft\",\"end\");\n\t\tmolecule.print();\n\t\tpparam.print(\"plot\",\"end\");\n\t}\n\n    // load functions\n\tFunctionDefaults<3>::set_cubic_cell(-param.L(),param.L());\n\n\tfor (const auto& filename : filenames) {\n\t\tFunction<double,3> f = FunctionFactory<double,3>(world);\n    \tif(world.rank()==0) std::cout << \"load function \" << filename << \"\\n\";\n    \tload(f,filename);\n    \tif(world.rank()==0) std::cout << \"... success\\n\";\n\n    \t// plot cube file\n    \tstd::string outfile=filename+\".cube\";\n    \tif(world.rank()==0) std::cout << \"creating cubefile \" << outfile << \"\\n\";\n    \tplot_cubefile<3>(world,f,outfile,molecule.cubefile_header(pparam.origin<3>()),\n    \t\tpparam.npoints(),pparam.zoom(),pparam.origin<3>());\n    \tif(world.rank()==0) std::cout << \"... success\\n\";\n\t}\n\n\tfinalize();\n\treturn 0;\n\n}\n"
  },
  {
    "path": "src/apps/plot/plot2plane.cpp",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/funcplot.h>\n#include \"madness/mra/commandlineparser.h\"\n#include <madness/chem/CalculationParameters.h>\n#include <madness/chem/molecule.h>\n\nusing namespace madness;\n\ntemplate<std::size_t NDIM>\nvoid do_plot (World& world, const std::vector<std::string>& filenames, const PlotParameters& pparam) {\n\n\tstd::vector<Function<double,NDIM>> vf;\n\tfor (const auto& filename : filenames) {\n\t\tFunction<double,NDIM> f = FunctionFactory<double,NDIM>(world);\n\t\tif(world.rank()==0) std::cout << \"load function \" << filename << \"\\n\";\n\t\tload(f,filename);\n\t\tf.get_impl()->verify_tree_state_local();\n\n\t\t// annoying temporary fix\n\t\tTensorArgs targs(FunctionDefaults<NDIM>::get_tensor_type(),f.get_impl()->get_thresh());\n\t\tf.change_tensor_type(targs);\n\n\t\tif(world.rank()==0) std::cout << \"... success\\n\";\n\t\tvf.push_back(f);\n\t}\n\n\tstd::string outfile=filenames[0]+\".plane\";\n\tif(world.rank()==0) std::cout << \"creating plot data in file \" << outfile << \"\\n\";\n\tplot_plane(world,vf,outfile,pparam);\n\tif(world.rank()==0) std::cout << \"... success\\n\";\n\n}\n\n\n\n\nint main(int argc, char** argv) {\n\tWorld& world=initialize(argc, argv);\n\tstartup(world,argc,argv);\n\tstd::cout.precision(6);\n\n\tcommandlineparser parser(argc,argv);\n\tbool printhelp=parser.key_exists(\"help\");\n\n\t// if no filename is given print help\n\tstd::vector<std::string> filenames;\n\tif (parser.key_exists(\"file\")) {\n\t\tfilenames = parser.split(parser.value(\"file\"),\",\");\n\t} else {\n\t\tstd::cout << \"\\ninvalid usage: no filename(s) given\\n\";\n\t\tprinthelp=true;\n\t}\n\n\t// check if file exists using c++ filesystem\n\ttry {\n\t\tfor (const auto& filename : filenames) {\n\t\t\tbool file_ok=std::filesystem::exists(filename+\".00000\");\n\t\t\t// if (not file_ok) throw std::runtime_error(\"file not found\");\n\t\t\tif (not file_ok) {\n\t\t\t\tstd::cout << \"\\ncould not find data file: \"+filename+\"\\n\";\n\t\t\t\tprinthelp=true;\n\t\t\t}\n\t\t}\n\t} catch (...) {\n\t\tstd::cout << \"\\ncould not find data file(s): \";\n\t\tprinthelp=true;\n\t}\n\n\n\tif (printhelp) {\n\t\tstd::cout << \"\\nUSAGE: plot2plane file=name1[,name2][,name3] [options]\\n\\n\";\n\t\tstd::cout << \"name1,name2,..  names of the files to plot, each must contain one 3d function only \\n\";\n\t\tstd::cout << \"                filename without extension, e.g. nemo4 instead of nemo4.00000\\n\\n\";\n\t\tstd::cout << \"OPTIONS: command line options similar to the electronic structure calculations \\n\";\n\t\tstd::cout << \"         will read the input file if it exists, command line options will override the input file\\n\";\n\t\tstd::cout << std::endl;\n\t\tstd::cout << \"           e.g. plot2plane file=nemo4,nemo0 --geometry=h2o\\n\";\n\t\tstd::cout << \"           e.g. plot2plane file=nemo4 --geometry=\\\"no_orient=true; source_name=h2o\\\"\\n\";\n\t\tstd::cout << \"           e.g. plot2plane file=nemo4 --geometry=h2o --plot=\\\"zoom 4;  origin=[3, 3, 3]\\\"\\n\";\n\t\tstd::cout << \"           e.g. plot2plane file=nemo4 --geometry=h2o --plot=\\\"plane=x1x2;  origin=[3, 3, 3]\\\"\\n\\n\";\n\t\tstd::cout << std::endl;\n\t\tstd::cout << \"default plot options are: \\n\";\n\t\tPlotParameters pparam;\n\t\tpparam.print(\"plot\",\"end\");\n\t\tfinalize();\n\t\treturn 0;\n\t}\n\n\n\t// get molecule and calculation parameters\n\tMolecule molecule(world,parser);\n\tCalculationParameters param(world,parser);\n\tAtomicBasisSet aobasis(param.aobasis()); // not actually needed here..\n\tparam.set_derived_values(molecule);\n\tPlotParameters pparam(world,parser);\n\n\tif (world.rank()==0) {\n\t\tprint_header2(\"plotting parameters\");\n\t\tparam.print(\"dft\",\"end\");\n\t\tmolecule.print();\n\t\tpparam.print(\"plot\",\"end\");\n\t}\n\n\t// load functions\n\tFunctionDefaults<3>::set_cubic_cell(-param.L(),param.L());\n\tFunctionDefaults<6>::set_cubic_cell(-param.L(),param.L());\n\n\n\ttry {\n\t\tdo_plot<3>(world,filenames,pparam);\n\t} catch (...) {\n\t\tstd::cout << \"plotting in 3d failed\\n\";\n\t}\n\n\ttry {\n\t\tdo_plot<6>(world,filenames,pparam);\n\t} catch (...) {\n\t\tstd::cout << \"plotting in 6d failed\\n\";\n\t}\n\n\tfinalize();\n\treturn 0;\n}\n"
  },
  {
    "path": "src/apps/pno/CMakeLists.txt",
    "content": "# src/apps/pno\n\nadd_mad_executable(pno pno.cpp MADchem)\nadd_dependencies(applications-madness pno)\n\ninstall(TARGETS pno DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/pno/auxbas",
    "content": "$basis\n*\nhe cc-pVDZ-F12 -- demonstration purpose\n*\n    4   s\n    234.0000000              0.0025870\n     35.1600000              0.0195330\n      7.9890000              0.0909980\n      2.2120000              0.2720500\n    1   s\n      0.6669000              1.0000000\n    1   s\n      0.2089000              1.0000000\n    1   s\n      0.0513800              1.0000000\n    1   p\n      0.9781000              1.0000000\n    1   p\n      0.3590000              1.0000000\n*\n$end\n\n"
  },
  {
    "path": "src/apps/pno/input",
    "content": "plot\nend\n\ndft\nno_compute false\nxc hf\neconv 1.e-4\ndconv 3.e-4\nk 7\nend\n\nnemo\nncf (none,1.0)\nend\n\npno\nthresh 1.e-3\nexop multipole\nend\n\nf12\ngamma 1.4\nend\n\nmolecule\nhe 0.0 0.0 0.0\nend\n\n~     \n"
  },
  {
    "path": "src/apps/pno/input_hylleraas_file",
    "content": "Hylleraas MP2 energies with cabs from file\nsee 'auxbas_example' file for file format\nNote that Hylleraas energies are not recommended for f12 calculations. \nUse projected as energytype and don't worry about aux. bases\n\nplot\nend\n\ndft\nno_compute false\nxc hf\neconv 1.e-4\ndconv 3.e-4\nk 7\nncf (none,1.0)\nend\n\npno\ntpno 1.e-7\nthresh 1.e-4\nend\n\nf12\nauxbas auxbas_example\nenergytype hylleraas\nend\n\ngeometry\neprec 1.e-6\nhe 0.0 0.0 0.0\nend\n\n"
  },
  {
    "path": "src/apps/pno/input_hylleraas_internal",
    "content": "Hylleraas MP2 energies with internally generated cabs\nNote that Hylleraas energies are not recommended for f12 calculations.\nUse projected as energytype and don't worry about aux. bases\n\nplot\nend\n\ndft\nno_compute false\nxc hf\neconv 1.e-4\ndconv 3.e-4\nk 7\nncf (none,1.0)\nend\n\npno\ntpno 1.e-7\nthresh 1.e-4\nend\n\nf12\nenergytype hylleraas\nauxbas he-4s3p2d1f\nend\n\ngeometry\neprec 1.e-6\nhe 0.0 0.0 0.0\nend\n\n"
  },
  {
    "path": "src/apps/pno/pno.cpp",
    "content": "#include <iomanip>\n#include<madness/chem/SCF.h>\n#include<madness/chem/nemo.h>\n#include<madness/chem/PNO.h>\n#include <madness/misc/info.h>\n\n\nusing namespace madness;\n\n// DEFINE PARAMETER TAGS FOR THE INPUT FILE\nconst std::string TAG_PNO = \"pno\";\nconst std::string TAG_F12 = \"f12\";\nconst std::string TAG_CP = \"computeprotocol\";\n\n\nint main(int argc, char** argv) {\n\n    World& world=initialize(argc, argv,false);\n    if (world.rank() == 0) {\n        print_header1(\"PNO -- MP2 energies using pair natural orbitals\");\n        printf(\"starting at time %.1f\\n\", wall_time());\n    }\n\n    startup(world,argc,argv,true);\n    std::cout.precision(6);\n    if (world.rank()==0) print(info::print_revision_information());\n\n    if(world.rank()==0){\n        std::cout << \"\\n\\n\";\n        std::cout << \"-------------------------------------------------------------------------------------\\n\";\n        std::cout << \"SOLVING MRA-PNO-F12 as described in \\n\";\n        std::cout << \"J.S. Kottmann, F.A. Bischoff, E.F. Valeev\\n\";\n        std::cout << \"Direct determination of optimal pair-natural orbitals in a real-space representation:\\n\";\n        std::cout << \"the second-order Møller-Plesset energy\\n\";\n        std::cout << \"Journal of Chemical Physics ... 2019\\n\";\n        std::cout << \"-------------------------------------------------------------------------------------\\n\";\n        std::cout << \"\\n\\n\";\n    }\n\n\n    commandlineparser parser(argc,argv);\n\n    if (parser.key_exists(\"help\")) {\n        PNO::help();\n\n    } else if (parser.key_exists(\"print_parameters\")) {\n        PNO::print_parameters();\n\n    } else {\n\n\n    \t// Compute the SCF Reference\n    \tconst double time_scf_start = wall_time();\n        Nemo nemo(world,parser);\n    \tnemo.get_calc()->param.print();\n    \tconst double scf_energy = nemo.value();\n    \tif (world.rank() == 0) print(\"nemo energy: \", scf_energy);\n    \tif (world.rank() == 0) printf(\" at time %.1f\\n\", wall_time());\n    \tconst double time_scf_end = wall_time();\n\n    \t// Compute MRA-PNO-MP2-F12\n    \tconst double time_pno_start = wall_time();\n    \tPNOParameters parameters(world,parser,nemo.get_calc()->molecule,TAG_PNO);\n    \tF12Parameters paramf12(world, parser, parameters, TAG_F12);\n    \tPNO pno(world, nemo, parameters, paramf12);\n    \tstd::vector<PNOPairs> all_pairs;\n    \tpno.solve(all_pairs);\n    \tconst double time_pno_end = wall_time();\n\n\n    \tif(world.rank()==0){\n    \t\tstd::cout << std::setfill(' ');\n    \t\tstd::cout << \"\\n\\n\\n\";\n    \t\tstd::cout << \"--------------------------------------------------\\n\";\n    \t\tstd::cout << \"MRA-PNO-MP2-F12 ended \\n\";\n    \t\tstd::cout << \"--------------------------------------------------\\n\";\n    \t\tstd::cout << std::setw(25) << \"time scf\" << \" = \" << time_scf_end - time_scf_start << \"\\n\";\n    \t\tstd::cout << std::setw(25) << \"energy scf\" << \" = \" << scf_energy << \"\\n\";\n    \t\tstd::cout << \"--------------------------------------------------\\n\";\n    \t}\n    \tdouble mp2_energy = 0.0;\n    \tstd::cout<< std::setw(25) << \"time pno\" << \" = \" << time_pno_end - time_pno_start << \"\\n\";\n    \tfor(const auto& pairs: all_pairs){\n    \t\tif(pairs.type == MP2_PAIRTYPE){\n    \t\t\tmp2_energy = pairs.energies.total_energy();\n    \t\t}\n    \t\tstd::pair<size_t, size_t> ranks= pno.get_average_rank(pairs.pno_ij);\n    \t\tif(world.rank()==0){\n    \t\t\tstd::string name;\n    \t\t\tstd::stringstream ss;\n    \t\t\tss << pairs.type;\n    \t\t\tss >> name;\n    \t\t\tstd::cout<< std::setw(25) << \"energy \"+name << \" = \" << pairs.energies.total_energy() << \"\\n\";\n    \t\t\tstd::cout<< std::setw(25) << \"average pno rank \" + name << \" = \" << ranks.first << \"\\n\";\n    \t\t\tstd::cout<< std::setw(25) << \"max pno rank \" + name << \" = \" << ranks.second << \"\\n\";\n    \t\t}\n    \t}\n    \tif(world.rank()==0 and mp2_energy != 0.0){\n    \t\tstd::cout << \"--------------------------------------------------\\n\";\n    \t\t\tstd::cout<< std::setw(25) << \"energy(total)\" << \" = \" << scf_energy + mp2_energy << \"\\n\";\n    \t\t\tstd::cout << \"--------------------------------------------------\\n\";\n    \t\t\tstd::cout << \"\\n\\n\\n\";\n    \t}\n\n    \tworld.gop.fence();\n    \tif (world.rank() == 0) printf(\"finished at time %.1f\\n\", wall_time());\n    \tprint_stats(world);\n    }\n\tfinalize();\n\treturn 0;\n}\n"
  },
  {
    "path": "src/apps/tdse/CMakeLists.txt",
    "content": "# src/apps/tdse\n\nadd_mad_executable(tdse tdse.cc MADmra)\n\nadd_mad_executable(tdse4 tdse4.cc MADmra)\n\n#install(TARGETS tdse tdse4 DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/tdse/graveyard",
    "content": "\n    for (int i=-1000; i<=1000; i++) {\n        double x = i*0.01*cut;\n        double h = 0.001;\n        coordT rm2(0.0); rm2[0] = x - 2.0*h;\n        coordT rm1(0.0); rm1[0] = x - h;\n        coordT  r0(0.0);  r0[0] = x;\n        coordT rp1(0.0); rp1[0] = x + h;\n        coordT rp2(0.0); rp2[0] = x + 2.0*h;\n        double dVnumeric = (8.0*(V(rp1) - V(rm1)) - (V(rp2)-V(rm2)))/(12.0*h);\n        double dVanal = dVdx(r0);\n        print(i, x, dVnumeric, dVanal, dVnumeric - dVanal);\n    }\n    return 0;\n        \n\n\n\n\n\nstatic inline double s(double x) {\n  /* Iterated first beta function to switch smoothly \n     from 0->1 in [0,1].  n iterations produce 2*n-1 \n     zero derivatives at the end points. Order of polyn\n     is 3^n.\n\n     Currently use one iteration so that first deriv.\n     is zero at interior boundary and is exactly representable\n     by low order multiwavelet without refinement */\n#define B1(x) (x*x*(3.-2.*x))\n  x = B1(x);\n  return x;\n}\n\ndouble mask_function(const coordT& r) {\n    const double lo = 0.0625;\n    const double hi = 1.0-lo;\n    double result = 1.0;\n\n    coordT rsim;\n    user_to_sim(r, rsim);\n\n    for (int d=0; d<3; d++) {\n        double x = rsim[d];\n        if (x<lo)\n            result *= s(x/lo);\n        else if (x>hi)\n            result *= s((1.0-x)/lo);\n    }\n\n    return result;\n}\n\n"
  },
  {
    "path": "src/apps/tdse/hatom.job",
    "content": "#PBS -A chm022 \n#PBS -l size=128\n#PBS -l walltime=00:20:00\n#PBS -j oe\n#PBS -M nevence@utk.edu\n#PBS -m a\n#PBS -m e\n#PBS -m b\n#PBS -S /bin/csh\n\n#module swap PrgEnv-pgi PrgEnv-gnu\n#module load subversion\n#module load acml/4.1.0\nexport MRA_DATA_DIR=/tmp/work/nevence/trunk/src/lib/mra/\nexport MPICH_PTL_UNEX_EVENTS=204800\nexport MPICH_SMP_OFF\n\ncd /tmp/work/nevence/trunk/src/apps/tdse\n\naprun -n 4096 ./tdse\n\n"
  },
  {
    "path": "src/apps/tdse/input",
    "content": "L 300.0\nLsmall 10.0\nLlarge 50.0\nF 0.176\nomega 1.32\nnatom 1\n   1.0    0.0 0.0 0.0\nk 8\nthresh 1e-6\nsafety 1e-0\ncut 0.025\nprefix data\nnplot 999\nnprint 1\nnloadbal 20\nnio 1\nndump 10\nncycle 2\ntarget_time 20\ntScale 5.0\n\n"
  },
  {
    "path": "src/apps/tdse/input4",
    "content": "L 60.0\nF 1.76\nomega 0.06\nk 8\nthresh 1e-4\nsafety 1.0\ncut 0.6\nprefix data4\nnprint 1\nnloadbal 10\nnio 5\nndump 20\nncycle 2\ntarget_time 209.44\n#target_time 0.5\ntScale 1.0\n\n"
  },
  {
    "path": "src/apps/tdse/restart",
    "content": "60\n"
  },
  {
    "path": "src/apps/tdse/tdse.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/// \\file tdse/tdse.cc\n/// \\brief Evolves the hydrogen atom in imaginary and also real time\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/qmprop.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n#include <madness/tensor/vmath.h>\n#include <complex>\n#include <madness/mra/funcimpl.h>\n#include <madness/mra/lbdeux.h>\n\nusing namespace madness;\n\n\nstruct InputParameters {\n  static const int MAXNATOM=99;\n\n    // IF YOU ADD A NEW PARAMETER DON'T FORGET TO INCLUDE IT IN\n    // a) read()\n    // b) serialize()\n    // c) operator<<()\n\n  double L;           // Box size for the simulation\n  double Lsmall;      // Box size for small (near nucleus) plots\n  double Llarge;      // Box size for large (far from nucleus) plots\n  double F;           // Laser field strength\n  double omega;       // Laser frequency\n  double ncycle;      // Number of laser cycles in envelope\n  int natom;          // Number of atoms\n  double Z[MAXNATOM]; // Nuclear charge of atoms\n  double R[MAXNATOM][3]; // Coordinates of atoms\n  int k;              // wavelet order\n  double thresh;      // precision for truncating wave function\n  double safety;      // additional precision (thresh*safety) for operators and potential\n  double cut;         // smoothing parameter for 1/r (same for all atoms for now)\n  std::string iState ; // initial state = \"1s\" or \"2s\"\n  std::string prefix; // Prefix for filenames\n  int ndump;          // dump wave function to disk every ndump steps\n  int nplot;          // dump opendx plot to disk every nplot steps\n  int nprint;         // print stats every nprint steps\n  int nloadbal;       // load balance every nloadbal steps\n  int nio;            // Number of IO nodes\n  double tScale;      // Scaling parameter for optimization\n  double target_time; // Target end-time for the simulation\n\n  void read(const char* filename) {\n    std::ifstream f(filename);\n    std::string tag;\n    iState = \"1s\";\n    printf(\"\\n\");\n    printf(\"       Simulation parameters\\n\");\n    printf(\"       ---------------------\\n\");\n    while(f >> tag) {\n        if (tag[0] == '#') {\n            char ch;\n            printf(\"    comment  %s \",tag.c_str());\n            while (f.get(ch)) {\n                printf(\"%c\",ch);\n                if (ch == '\\n') break;\n            }\n        }\n        else if (tag == \"L\") {\n            f >> L;\n            printf(\"             L = %.1f\\n\", L);\n        }\n        else if (tag == \"Lsmall\") {\n            f >> Lsmall;\n            printf(\"        Lsmall = %.1f\\n\", Lsmall);\n        }\n        else if (tag == \"Llarge\") {\n            f >> Llarge;\n            printf(\"        Llarge = %.1f\\n\", Llarge);\n        }\n        else if (tag == \"F\") {\n            f >> F;\n            printf(\"             F = %.6f\\n\", F);\n        }\n        else if (tag == \"omega\") {\n            f >> omega;\n            printf(\"         omega = %.6f\\n\", omega);\n        }\n        else if (tag == \"ncycle\") {\n            f >> ncycle;\n            printf(\"         ncycle = %.6f\\n\", ncycle);\n        }\n        else if (tag == \"natom\") {\n            f >> natom;\n            printf(\"         natom = %d\\n\", natom);\n            for (int i=0; i<natom; i++) {\n                f >> Z[i] >> R[i][0] >> R[i][1] >> R[i][2];\n                printf(\"           atom %2d   %.1f  %10.6f  %10.6f  %10.6f\\n\", i, Z[i], R[i][0], R[i][1], R[i][2]);\n            }\n        }\n        else if (tag == \"k\") {\n            f >> k;\n            printf(\"             k = %d\\n\", k);\n        }\n        else if (tag == \"thresh\") {\n            f >> thresh;\n            printf(\"        thresh = %.1e\\n\", thresh);\n        }\n        else if (tag == \"safety\") {\n            f >> safety;\n            printf(\"        safety = %.1e\\n\", safety);\n        }\n        else if (tag == \"cut\") {\n            f >> cut;\n            printf(\"           cut = %.2f\\n\", cut);\n        }\n        else if (tag == \"iState\") {\n            f >> iState;\n            printf(\"        iState = %s\\n\", iState.c_str());\n        }\n        else if (tag == \"prefix\") {\n            f >> prefix;\n            printf(\"        prefix = %s\\n\", prefix.c_str());\n        }\n        else if (tag == \"ndump\") {\n            f >> ndump;\n            printf(\"         ndump = %d\\n\", ndump);\n        }\n        else if (tag == \"nplot\") {\n            f >> nplot;\n            printf(\"         nplot = %d\\n\", nplot);\n        }\n        else if (tag == \"nprint\") {\n            f >> nprint;\n            printf(\"         nprint = %d\\n\", nprint);\n        }\n        else if (tag == \"nloadbal\") {\n            f >> nloadbal;\n            printf(\"       nloadbal = %d\\n\", nloadbal);\n        }\n        else if (tag == \"nio\") {\n            f >> nio;\n            printf(\"            nio = %d\\n\", nio);\n        }\n        else if (tag == \"target_time\") {\n            f >> target_time;\n            printf(\"    target_time = %.3f\\n\", target_time);\n        }\n        else if (tag == \"tScale\") {\n            f >> tScale;\n            printf(\"         tScale = %.5f\\n\", tScale);\n        }\n        else {\n            MADNESS_EXCEPTION(\"unknown input option\", 0);\n        }\n    }\n  }\n\n  template <typename Archive>\n  void serialize(Archive & ar) {\n    ar & L & Lsmall & Llarge & F & omega & ncycle & natom & Z;\n    ar & archive::wrap(&(R[0][0]), 3*MAXNATOM);\n    ar & k & thresh & safety & cut & iState & prefix & ndump & nplot & nprint & nloadbal & nio;\n    ar & target_time & tScale;\n  }\n};\n\nstd::ostream& operator<<(std::ostream& s, const InputParameters& p) {\n    s << p.L<< \" \" << p.Lsmall<< \" \" << p.Llarge<< \" \" << p.F << \" \" << p.omega <<\n        \" \" << p.ncycle << \" \" << p.Z << \" \" << p.R[0]<< \" \" << p.k<< \" \" <<\n        p.thresh<< \" \" << p.cut<< \" \" << p.iState << \" \" << p.prefix<< \" \" << p.ndump<< \" \" <<\n        p.nplot << \" \" << p.nprint << \" \"  << p.nloadbal << \" \" << p.nio << p.tScale << std::endl;\nreturn s;\n}\n\nInputParameters param;\n\nstatic double zero_field_time;      // Laser actually switches on after this time (set by propagate)\n                                    // Delay provides for several steps with no field before start\n\n// typedefs to make life less verbose\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double_complex,3> > complex_functorT;\ntypedef Function<double_complex,3> complex_functionT;\ntypedef FunctionFactory<double_complex,3> complex_factoryT;\n\ntypedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmapT;\n\ntypedef Convolution1D<double_complex> complex_operatorT;\n#define MAKE_PROPAGATOR(world, t)\n\n    struct refop {\n        bool operator()(FunctionImpl<double_complex,3>* impl, const Key<3>& key, const Tensor<double_complex>& t) const {\n            double tol = impl->truncate_tol(impl->get_thresh(), key);\n            double lo, hi;\n            impl->tnorm(t, &lo, &hi);\n            return hi > tol;;\n        }\n        template <typename Archive> void serialize(Archive& ar) {}\n    };\n\ncomplex_functionT APPLY(const complex_operatorT* q1d, const complex_functionT& psi) {\n    complex_functionT r = psi;  // Shallow copy violates constness !!!!!!!!!!!!!!!!!\n    coordT lo, hi;\n    lo[2] = -10;\n    hi[2] = +10;\n\n    r.reconstruct();\n    r.broaden();\n    r.broaden();\n    r.broaden();\n    r.broaden();\n\n    r = apply_1d_realspace_push(*q1d, r, 2); r.sum_down();\n    r = apply_1d_realspace_push(*q1d, r, 1); r.sum_down();\n    r = apply_1d_realspace_push(*q1d, r, 0); r.sum_down();\n\n    return r;\n}\n\n//typedef SeparatedConvolution<double_complex,3> complex_operatorT;\n\n// Derivative of the smoothed 1/r approximation\n\n// Invoke as \\c du(r/c)/(c*c) where \\c c is the radius of the smoothed volume.\nstatic double d_smoothed_potential(double r) {\n    double r2 = r*r;\n\n    if (r > 6.5) {\n        return -1.0/r2;\n    }\n    else if (r > 1e-2) {\n        return -(1.1283791670955126*(0.88622692545275800*erf(r)-exp(-r2)*r*(1.0-r2)))/r2;\n    }\n    else {\n        return (-1.880631945159187623160265+(1.579730833933717603454623-0.7253866074185437975046736*r2)*r2)*r;\n    }\n}\n\n// Smoothed 1/r potential.\n\n// Invoke as \\c u(r/c)/c where \\c c is the radius of the smoothed volume.\nstatic double smoothed_potential(double r) {\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-2) {\n        pot = erf(r)/r + exp(-r2)*0.56418958354775630;\n    } else{\n        pot = 1.6925687506432689-r2*(0.94031597257959381-r2*(0.39493270848342941-0.12089776790309064*r2));\n    }\n\n    return pot;\n}\n\n// Nuclear attraction potential\nstatic double V(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      double rr = sqrt(xx*xx+yy*yy+zz*zz);\n\n      sum +=  -param.Z[i]*smoothed_potential(rr/param.cut)/param.cut;\n    }\n    return sum;\n}\n\n// dV/dx\nstatic double dVdx(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      if (xx) {\n\tdouble rr = sqrt(xx*xx+yy*yy+zz*zz);\n\tsum += -param.Z[i]*xx*d_smoothed_potential(rr/param.cut)/(rr*param.cut*param.cut);\n      }\n    }\n    return sum;\n}\n\n// dV/dy\nstatic double dVdy(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      if (yy) {\n\tdouble rr = sqrt(xx*xx+yy*yy+zz*zz);\n\tsum += -param.Z[i]*yy*d_smoothed_potential(rr/param.cut)/(rr*param.cut*param.cut);\n      }\n    }\n    return sum;\n}\n\n// dV/dz\nstatic double dVdz(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      if (zz) {\n\tdouble rr = sqrt(xx*xx+yy*yy+zz*zz);\n\tsum += -param.Z[i]*zz*d_smoothed_potential(rr/param.cut)/(rr*param.cut*param.cut);\n      }\n    }\n    return sum;\n}\n\n// Initial guess wave function using symmetric superposition of 1s orbital on atoms\nstatic double guess1s(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      double Z  = param.Z[i];\n      double rr = sqrt(xx*xx+yy*yy+zz*zz+param.cut*param.cut);\n      sum += sqrt(3.14*Z*Z*Z)*exp(-Z*rr);\n    }\n    return sum;\n}\n\n// Initial guess wave function using symmetric superposition of 1s orbital on atoms\nstatic double guess2s(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      double Z  = param.Z[i];\n      double rr = sqrt(xx*xx + yy*yy + zz*zz + param.cut*param.cut);\n      sum += sqrt(3.14*Z*Z*Z)*(1 - Z*rr/2)*exp(-Z*rr/2);\n    }\n    return sum;\n}\n\n// x-dipole\ndouble xdipole(const coordT& r) {\n    return r[0];\n}\n\n// y-dipole\ndouble ydipole(const coordT& r) {\n    return r[1];\n}\n\n// z-dipole\ndouble zdipole(const coordT& r) {\n    return r[2];\n}\n\n// Strength of the laser field at time t\ndouble laser(double t) {\n    double omegat = param.omega*t;\n\n    if (omegat < 0.0 || omegat/(2*param.ncycle) > constants::pi) return 0.0;\n\n    double envelope = sin(omegat/(2*param.ncycle));\n    envelope *= envelope;\n    return param.F*envelope*sin(omegat);\n}\n\ndouble myreal(double t) {return t;}\n\ndouble myreal(const double_complex& t) {return real(t);}\n\n// Given psi and V evaluate the energy ... leaves psi compressed, potn reconstructed\ntemplate <typename T>\ndouble energy(World& world, const Function<T,3>& psi, const functionT& potn) {\n    // First do all work in the scaling function basis\n    psi.reconstruct();\n    bool DOFENCE = false;\n    Derivative<T,3> Dx(world,0), Dy(world,1), Dz(world,2);\n    Function<T,3> dx = Dx(psi,DOFENCE);\n    Function<T,3> dy = Dy(psi,DOFENCE);\n    Function<T,3> dz = Dz(psi,DOFENCE);\n    Function<T,3> Vpsi = psi*potn;\n\n    // Now do all work in the wavelet basis\n    psi.compress(DOFENCE); Vpsi.compress(DOFENCE); dx.compress(DOFENCE); dy.compress(DOFENCE); dz.compress(true);\n    T S = psi.inner(psi);\n    T PE = psi.inner(Vpsi);\n    T KE = 0.5*(inner(dx,dx) + inner(dy,dy) + inner(dz,dz));\n    T E = (KE+PE)/S;\n\n    dx.clear(); dy.clear(); dz.clear(); Vpsi.clear(); // To free memory on return\n    world.gop.fence();\n//     if (world.rank() == 0) {\n//         print(\"the overlap integral is\",S);\n//         print(\"the kinetic energy integral\",KE);\n//         print(\"the potential energy integral\",PE);\n//         print(\"the total energy\",E);\n//     }\n\n    return myreal(E);\n}\n\nvoid converge(World& world, functionT& potn, functionT& psi, double& eps) {\n\n    for (int iter=0; iter<30; iter++) {\n        if (world.rank() == 0) print(\"beginning iter\", iter, wall_time());\n        operatorT op = BSHOperator3D(world, sqrt(-2*eps), param.cut, param.thresh);\n        functionT Vpsi = (potn*psi);\n        if (world.rank() == 0) print(\"made V*psi\", wall_time());\n        Vpsi.scale(-2.0).truncate();\n        if (world.rank() == 0) print(\"tryuncated V*psi\", wall_time());\n        functionT tmp = apply(op,Vpsi).truncate(param.thresh);\n        if (world.rank() == 0) print(\"applied operator\", wall_time());\n        double norm = tmp.norm2();\n        functionT r = tmp-psi;\n        double rnorm = r.norm2();\n        double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n        if (world.rank() == 0) {\n            print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n        }\n        psi = tmp.scale(1.0/norm);\n        eps = eps_new;\n        if (rnorm < std::max(1e-5,param.thresh)) break;\n    }\n}\n\nvoid converge2s(World& world, functionT& potn, functionT& psi, double& eps) {\n\n    for (int iter=0; iter<30; iter++) {\n        if (world.rank() == 0) print(\"beginning iter\", iter, wall_time());\n        operatorT op = BSHOperator3D(world, sqrt(-2*eps), param.cut, param.thresh);\n        functionT Vpsi = (potn*psi);\n        if (world.rank() == 0) print(\"made V*psi\", wall_time());\n        Vpsi.scale(-2.0).truncate();\n        if (world.rank() == 0) print(\"tryuncated V*psi\", wall_time());\n        functionT tmp = apply(op,Vpsi).truncate(param.thresh);\n        if (world.rank() == 0) print(\"applied operator\", wall_time());\n       double norm = tmp.norm2();\n        functionT r = tmp-psi;\n        double rnorm = r.norm2();\n        double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n        if (world.rank() == 0) {\n            print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n        }\n        psi = tmp.scale(1.0/norm);\n        eps = eps_new;\n        if (rnorm < std::max(1e-5,param.thresh)) break;\n    }\n}\n\ncomplex_functionT chin_chen(const complex_functionT& expV_0,\n                            const complex_functionT& expV_tilde,\n                            const complex_functionT& expV_1,\n                            const complex_operatorT* G,\n                            const complex_functionT& psi0) {\n    // psi(t) = exp(-i*V(t)*t/6) exp(-i*T*t/2) exp(-i*2*Vtilde(t/2)*t/3) exp(-i*T*t/2) exp(-i*V(0)*t/6)\n    // .             expV_1            G               expV_tilde             G             expV_0\n\n    complex_functionT psi1;\n\n    double t0 = wall_time();\n    psi1 = expV_0*psi0;     psi1.truncate();\n    double t1 = wall_time();\n    psi1 = APPLY(G,psi1);   psi1.truncate();\n\n    double t2 = wall_time();\n    psi1 = expV_tilde*psi1; psi1.truncate();\n    double t3 = wall_time();\n\n    psi1 = APPLY(G,psi1);   psi1.truncate();\n    double t4 = wall_time();\n    psi1 = expV_1*psi1;     psi1.truncate(param.thresh);\n    double t5 = wall_time();\n\n    if (psi1.world().rank() == 0) {\n        printf(\"chin-chen: %.2f %.2f %.2f %.2f %.2f\\n\", t1-t0, t2-t1, t3-t2, t4-t3, t5-t4);\n    }\n\n    return psi1;\n}\n\ncomplex_functionT trotter(World& world,\n                          const complex_functionT& expV,\n                          const complex_operatorT* G,\n                          const complex_functionT& psi0) {\n    //    psi(t) = exp(-i*T*t/2) exp(-i*V(t/2)*t) exp(-i*T*t/2) psi(0)\n\n    complex_functionT psi1;\n\n    unsigned long size = psi0.size();\n    if (world.rank() == 0) print(\"APPLYING G\", size);\n    psi1 = APPLY(G,psi0);  psi1.truncate();  size = psi1.size();\n    if (world.rank() == 0) print(\"APPLYING expV\", size);\n    psi1 = expV*psi1;      psi1.truncate();  size = psi1.size();\n    if (world.rank() == 0) print(\"APPLYING G again\", size);\n    psi1 = APPLY(G,psi1);  psi1.truncate(param.thresh);  size = psi1.size();\n    if (world.rank() == 0) print(\"DONE\", size);\n\n    return psi1;\n}\n\ntemplate<typename T, int NDIM>\nstruct unaryexp {\n//     void operator()(const Key<NDIM>& key, Tensor<T>& t) const {\n//         UNARY_OPTIMIZED_ITERATOR(T, t, *_p0 = exp(*_p0););\n//     }\n//     template <typename Archive>\n//     void serialize(Archive& ar) {}\n};\n\n\ntemplate<int NDIM>\nstruct unaryexp<double_complex,NDIM> {\n    void operator()(const Key<NDIM>& key, Tensor<double_complex>& t) const {\n        //vzExp(t.size, t.ptr(), t.ptr());\n        UNARY_OPTIMIZED_ITERATOR(double_complex, t, *_p0 = exp(*_p0););\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\n\n// Returns exp(-I*t*V)\ncomplex_functionT make_exp(double t, const functionT& v) {\n    v.reconstruct();\n    complex_functionT expV = double_complex(0.0,-t)*v;\n    expV.unaryop(unaryexp<double_complex,3>());\n    //expV.truncate(); expV.reconstruct();\n    return expV;\n}\n\nvoid print_stats_header(World& world) {\n    if (world.rank() == 0) {\n        printf(\"  step       time            field           energy            norm           overlap0         x-dipole         y-dipole         z-dipole           accel      wall-time(s)\\n\");\n        printf(\"------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ------------\\n\");\n    }\n}\n\nvoid print_stats(World& world, int step, double t, const functionT& v,\n                 const functionT& x, const functionT& y, const functionT& z,\n                 const functionT& dV_dz,\n                 const complex_functionT& psi0, const complex_functionT& psi) {\n    double norm = psi.norm2();\n    double current_energy = energy(world, psi, v);\n    double xdip = real(inner(psi, x*psi))/(norm*norm);\n    double ydip = real(inner(psi, y*psi))/(norm*norm);\n    double zdip = real(inner(psi, z*psi))/(norm*norm);\n    double overlap0 = std::abs(psi.inner(psi0))/norm;\n    double accel = real(psi.inner(psi*dV_dz))/(norm*norm);\n    if (world.rank() == 0) {\n        printf(\"%7d %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %9.1f\\n\", step, t, laser(t), current_energy, norm, overlap0, xdip, ydip, zdip, accel, wall_time());\n    }\n}\n\nconst char* wave_function_filename(int step) {\n    static char fname[256];\n    snprintf(fname, 256, \"%s-%5.5d\", param.prefix.c_str(), step);\n    return fname;\n}\n\nconst char* wave_function_small_plot_filename(int step) {\n    static char fname[256];\n    snprintf(fname,256, \"%s-%5.5dS.dx\", param.prefix.c_str(), step);\n    return fname;\n}\n\nconst char* wave_function_large_plot_filename(int step) {\n    static char fname[256];\n    snprintf(fname,256, \"%s-%5.5dL.dx\", param.prefix.c_str(), step);\n    return fname;\n}\n\ncomplex_functionT wave_function_load(World& world, int step) {\n    complex_functionT psi;\n    archive::ParallelInputArchive ar(world, wave_function_filename(step));\n    ar & psi;\n    return psi;\n}\n\nvoid wave_function_store(World& world, int step, const complex_functionT& psi) {\n    archive::ParallelOutputArchive ar(world, wave_function_filename(step), param.nio);\n    ar & psi;\n}\n\nbool wave_function_exists(World& world, int step) {\n    return archive::ParallelInputArchive<madness::archive::BinaryFstreamInputArchive>::exists(world, wave_function_filename(step));\n}\n\nvoid doplot(World& world, int step, const complex_functionT& psi, double Lplot, long numpt, const char* fname) {\n    double start = wall_time();\n    Tensor<double> cell(3,2);\n    std::vector<long> npt(3, numpt);\n    cell(_,0) = -Lplot;\n    cell(_,1) =  Lplot;\n    //plotdx(psi, fname, cell, npt);\n    if (world.rank() == 0) print(\"plotting used\", wall_time()-start);\n}\n\n\nvoid line_plot(World& world, int step, complex_functionT& psi) {\n    static const int npt = 10001;\n    double_complex v[10001];\n    psi.reconstruct();\n    for (int i=0; i<npt; i++)\n        v[i] = 0.0;\n    for (int i=world.rank(); i<npt; i+=world.size()) {\n        double z = -param.Llarge + 2.0*i*param.Llarge/(npt-1);\n        coordT r(0.0);\n        r[2] = z;\n        v[i] = psi.eval(r).get();\n    }\n    world.gop.fence();\n    world.gop.sum(v, npt);\n    if (world.rank() == 0) {\n        char buf[280];\n        snprintf(buf, 280, \"%s.lineplot\", wave_function_filename(step));\n        std::ofstream f(buf);\n        f.precision(10);\n        for (int i=0; i<npt; i++) {\n            double z = -param.Llarge + 2.0*i*param.Llarge/(npt-1);\n            f << z << \" \" << v[i] << \"\\n\";\n        }\n    }\n    world.gop.fence();\n}\n\ntemplate <typename T, int NDIM>\nstruct lbcost {\n    double leaf_value;\n    double parent_value;\n    lbcost(double leaf_value=1.0, double parent_value=1.0) : leaf_value(leaf_value), parent_value(parent_value) {}\n    double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n        if (key.level() <= 1) {\n            return 128.0;\n        }\n        else if (node.is_leaf()) {\n            double fac = 3.0;\n            if (key.level() >= 7) fac *= 2.0;\n            return leaf_value*fac;\n        }\n        else {\n            return parent_value;\n        }\n        //return key.level()+1.0;\n    }\n};\n\nvoid preloadbal(World& world,\n                functionT& potn,\n                complex_functionT& psi) {\n    if (world.size() < 2) return;\n    if (world.rank() == 0) print(\"starting preLB\");\n    LoadBalanceDeux<3> lb(world);\n    lb.add_tree(potn, lbcost<double,3>(1.0,1.0));\n    lb.add_tree(psi, lbcost<double_complex,3>(1.0,1.0));\n    FunctionDefaults<3>::redistribute(world,lb.load_balance(2.0, false));\n    world.gop.fence();\n    //if (world.rank() == 0) print(\"Verifying psi\");\n    world.gop.fence();\n}\n\nvoid loadbal(World& world,\n             functionT& potn,\n             complex_functionT& psi) {\n    if (world.size() < 2) return;\n    if (world.rank() == 0) print(\"starting LB\");\n    LoadBalanceDeux<3> lb(world);\n    lb.add_tree(potn, lbcost<double,3>(1.0,1.0));\n\n    psi.reconstruct();\n    psi.broaden();\n    psi.broaden();\n    lb.add_tree(psi, lbcost<double_complex,3>(1.0,1.0));\n    FunctionDefaults<3>::redistribute(world,lb.load_balance(2.0, false));\n    world.gop.fence();\n    //if (world.rank() == 0) print(\"Verifying potn\");\n    //potn.verify_tree();\n    //if (world.rank() == 0) print(\"Verifying psi\");\n    //psi.verify_tree();\n    world.gop.fence();\n    psi.truncate();\n    world.gop.fence();\n    //if (world.rank() == 0) print(\"Verifying psi (compressed and truncated)\");\n    //psi.verify_tree();\n    world.gop.fence();\n}\n\n\n// Evolve the wave function in real time starting from given time step on disk\nvoid propagate(World& world, int step0) {\n    //double ctarget = 10.0/param.cut;                // From Fourier analysis of the potential\n    double ctarget = 5.0/param.cut;                // More optimistic?\n    //double c = 1.86*ctarget; // This for 10^5 steps\n    double c = 1.72*ctarget;   // This for 10^4 steps\n    double tcrit = 2*constants::pi/(c*c);\n    double time_step = tcrit * param.tScale;\n\n    zero_field_time = 10.0*time_step;\n\n    int nstep = int((param.target_time + zero_field_time)/time_step + 1);\n\n    // Ensure everyone has the same data\n    world.gop.broadcast(c);\n    world.gop.broadcast(time_step);\n    world.gop.broadcast(nstep);\n\n    // The time-independent part of the potential plus derivatives for\n    // Chin-Chen and also for computing the power spectrum ... compute\n    // derivatives analytically to reduce numerical noise\n    functionT potn = factoryT(world).f(V);         potn.truncate(param.thresh);\n\n    int step = step0;  // The current step\n    double t = step0 * time_step - zero_field_time;        // The current time\n    complex_functionT psi = wave_function_load(world, step); // The wave function at time t\n    //    if (world.rank() == 0) print(\"verifying psi after load\");\n    //world.gop.fence();\n    //psi.verify_tree();\n    world.gop.fence();\n    //if (world.rank() == 0) print(\"finished verifying psi after load\");\n\n    preloadbal(world, potn, psi);\n\n    // Free particle propagator for both Trotter and Chin-Chen --- exp(-I*T*time_step/2)\n    //SeparatedConvolution<double_complex,3> G = qm_free_particle_propagator<3>(world, param.k, c, 0.5*time_step);\n    //G.doleaves = true;\n\n    complex_operatorT* G = qm_1d_free_particle_propagator(param.k, c, 0.5*time_step, 2.0*param.L);\n\n    functionT dpotn_dx = factoryT(world).f(dVdx);  dpotn_dx.truncate(param.thresh);\n    functionT dpotn_dy = factoryT(world).f(dVdy);  dpotn_dy.truncate(param.thresh);\n    functionT dpotn_dz = factoryT(world).f(dVdz);  dpotn_dz.truncate(param.thresh);\n\n    functionT dpotn_dx_sq = dpotn_dx*dpotn_dx;\n    functionT dpotn_dy_sq = dpotn_dy*dpotn_dy;\n\n    // Dipole moment functions for laser field and for printing statistics\n    functionT x = factoryT(world).f(xdipole);\n    functionT y = factoryT(world).f(ydipole);\n    functionT z = factoryT(world).f(zdipole);\n\n    // Wave function at time t=0 for printing statistics\n    complex_functionT psi0 = wave_function_load(world, 0);\n\n    functionT vt = potn+laser(t)*z; // The total potential at time t\n\n    loadbal(world, potn, psi);\n\n    if (world.rank() == 0) {\n        printf(\"\\n\");\n        printf(\"        Evolution parameters\\n\");\n        printf(\"       --------------------\\n\");\n        printf(\"     bandlimit = %.2f\\n\", ctarget);\n        printf(\" eff-bandlimit = %.2f\\n\", c);\n        printf(\"         tcrit = %.6f\\n\", tcrit);\n        printf(\"     time step = %.6f\\n\", time_step);\n        printf(\" no field time = %.6f\\n\", zero_field_time);\n        printf(\"   target time = %.2f\\n\", param.target_time);\n        printf(\"         nstep = %d\\n\", nstep);\n        printf(\"\\n\");\n        printf(\"  restart step = %d\\n\", step0);\n        printf(\"  restart time = %.6f\\n\", t);\n        printf(\"\\n\");\n    }\n\n    print_stats_header(world);\n    {\n        // Make gradient of potential at time t in z direction to compute HHG\n        functionT dV_dz = copy(dpotn_dz);\n        dV_dz.add_scalar(laser(t));\n\n        print_stats(world, step, t, vt, x, y, z, dV_dz, psi0, psi);\n        line_plot(world, step, psi);\n    }\n    world.gop.fence();\n\n    psi.truncate();\n\n    bool use_trotter = false;\n    while (step < nstep) {\n        double t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13;\n        t0 = wall_time();\n        if (step < 2 || (step%param.nloadbal) == 0)\n            loadbal(world, potn, psi);\n        t1 = wall_time();\n\n        long depth = psi.max_depth(); long size=psi.size();\n        if (use_trotter) {\n            // Make the potential at time t + step/2\n            functionT vhalf = potn + laser(t+0.5*time_step)*z;\n\n            // Apply Trotter to advance from time t to time t+step\n            complex_functionT expV = make_exp(time_step, vhalf);\n            psi = trotter(world, expV, G, psi);\n        }\n        else { // Chin-Chen\n            // Make z-component of del V at time tstep/2\n\n            functionT dV_dz = copy(dpotn_dz);\n            t2 = wall_time();\n            dV_dz.add_scalar(laser(t+0.5*time_step));\n\n            // Make Vtilde at time tstep/2\n            functionT Vtilde = potn + laser(t+0.5*time_step)*z;\n            t3 = wall_time();\n\n            //functionT dvsq = dpotn_dx_sq + dpotn_dy_sq + dV_dz*dV_dz;\n            world.gop.fence();\n            functionT dV_dz_sq = dV_dz*dV_dz;\n            world.gop.fence();\n            dV_dz_sq.compress();\n            world.gop.fence();\n            functionT dvsq = dpotn_dx_sq + dpotn_dy_sq + dV_dz_sq;\n            world.gop.fence();\n            dV_dz_sq.clear();\n\n            t4 = wall_time();\n            Vtilde.gaxpy(1.0, dvsq, -time_step*time_step/48.0);\n            t5 = wall_time();\n\n            // Exponentiate potentials\n            complex_functionT expv_0     = make_exp(time_step/6.0, vt);\n            t6 = wall_time();\n            complex_functionT expv_tilde = make_exp(2.0*time_step/3.0, Vtilde);\n            t7 = wall_time();\n            complex_functionT expv_1     = make_exp(time_step/6.0, potn + laser(t+time_step)*z);\n            t8 = wall_time();\n\n            // Free up some memory\n            dV_dz.clear();\n            Vtilde.clear();\n            dvsq.clear();\n            world.gop.fence();\n            t9 = wall_time();\n\n            // Apply Chin-Chen\n            psi = chin_chen(expv_0, expv_tilde, expv_1, G, psi);\n            t10 = wall_time();\n        }\n\n        // Update counters, print info, dump/plot as necessary\n        step++;\n        t += time_step;\n        vt = potn+laser(t)*z;\n\n\n        {\n            // Make gradient of potential at time t in z direction to compute HHG\n            functionT dV_dz = copy(dpotn_dz);\n            t11 = wall_time();\n            dV_dz.add_scalar(laser(t));\n            t12 = wall_time();\n\n            if ((step%param.nprint) == 0 || step==nstep) {\n                print_stats(world, step, t, vt, x, y, z, dV_dz, psi0, psi);\n                line_plot(world, step, psi);\n                if (world.rank() == 0) print(step, \"depth\", depth, \"size\", size);\n            }\n\n            t13 = wall_time();\n            if (world.rank() == 0)\n                printf(\"loadbal=%.2f copy=%.2f Vtil=%.2f dvsq =%.2f gaxpy=%.2f exp1=%.2f exp2=%.2f exp3=%.2f clear=%.2f CC=%.2f copy=%.2f addscl=%.2f prnt=%.2f\\n\",\n                       t1-t0, t2-t1, t3-t2, t4-t3, t5-t4, t6-t5, t7-t6, t8-t7, t9-t8, t10-t9, t11-t10, t12-t11, t13-t12);\n        }\n\n        if ((step%param.ndump) == 0 || step==nstep) {\n            double start = wall_time();\n            wave_function_store(world, step, psi);\n            // Update the restart file for automatic restarting\n            if (world.rank() == 0) {\n                std::ofstream(\"restart\") << step << std::endl;\n                print(\"dumping took\", wall_time()-start);\n            }\n            world.gop.fence();\n        }\n\n        if ((step%param.nplot) == 0 || step==nstep) {\n            doplot(world, step, psi, param.Lsmall, 201, wave_function_small_plot_filename(step));\n            doplot(world, step, psi, param.Llarge, 201, wave_function_large_plot_filename(step));\n        }\n    }\n}\n\nvoid doit(World& world) {\n    std::cout.precision(8);\n\n    if (world.rank() == 0) param.read(\"input\");\n    world.gop.broadcast_serializable(param, 0);\n\n    FunctionDefaults<3>::set_k(param.k);                        // Wavelet order\n    FunctionDefaults<3>::set_thresh(param.thresh*param.safety);       // Accuracy\n    FunctionDefaults<3>::set_initial_level(4);\n    FunctionDefaults<3>::set_cubic_cell(-param.L,param.L);\n    FunctionDefaults<3>::set_apply_randomize(true);\n    FunctionDefaults<3>::set_autorefine(false);\n    FunctionDefaults<3>::set_truncate_mode(0);\n    FunctionDefaults<3>::set_pmap(pmapT(new SimplePmap< Key<3> >(world)));\n    FunctionDefaults<3>::set_truncate_on_project(true);\n\n    // Make the potential\n    functionT potn = factoryT(world).f(V);  potn.truncate();\n\n    // Before doing anything else use the potential to guide future\n    // data distribution\n    LoadBalanceDeux<3> lb(world);\n    lb.add_tree(potn, lbcost<double,3>());\n    FunctionDefaults<3>::set_pmap(lb.load_balance());\n    world.gop.fence();\n    potn = copy(potn, FunctionDefaults<3>::get_pmap());\n\n    // Read restart information\n    int step0;               // Initial time step ... filenames are <prefix>-<step0>\n    if (world.rank() == 0) std::ifstream(\"restart\") >> step0;\n    world.gop.broadcast(step0);\n\n    bool exists = wave_function_exists(world, step0);\n\n    if (!exists) {\n        if (step0 == 0) {\n            if (world.rank() == 0) print(\"Computing initial ground state wavefunction\", wall_time());\n            functionT psi1s = factoryT(world).f(guess1s);\n            psi1s.scale(1.0/psi1s.norm2());\n            psi1s.truncate();\n            psi1s.scale(1.0/psi1s.norm2());\n            if (world.rank() == 0) print(\"got psi1s\", wall_time());\n            double eps = energy(world, psi1s, potn);\n            if (world.rank() == 0) print(\"guess energy\", eps, wall_time());\n            converge(world, potn, psi1s, eps);\n            psi1s.truncate(param.thresh);\n            functionT iState = psi1s;\n            if( param.iState == \"2s\" ) {\n                if (world.rank() == 0) print(\"Computing initial 2s eigenfunction\", wall_time());\n                functionT psi2s = factoryT(world).f(guess2s);\n                psi2s.scale(1.0/psi2s.norm2());\n                psi2s.truncate();\n                psi2s.scale(1.0/psi2s.norm2());\n                for(int iter=0; iter<30; iter++) {\n                    if (world.rank() == 0) print(\"orthoganalizing psi_2s to psi_1s\", wall_time());\n                    psi2s = psi2s - inner(psi2s,psi1s) * psi1s;\n                    psi2s.scale(1.0/psi2s.norm2());\n                    psi2s.truncate();\n                    psi2s.scale(1.0/psi2s.norm2());\n                    if (world.rank() == 0) print(\"guess energy\", eps, wall_time());\n                    eps = energy(world, psi2s, potn);\n                    if (world.rank() == 0) print(\"constructing BSH op \", wall_time());\n                    operatorT op = BSHOperator3D(world, sqrt(-2*eps), param.cut, param.thresh);\n                    functionT Vpsi2s = (potn*psi2s);\n                    Vpsi2s.scale(-2.0).truncate();\n                    if (world.rank() == 0) print(\"truncated V*psi2s\", wall_time());\n                    functionT tmp = apply(op,Vpsi2s).truncate(param.thresh);\n                    double  norm = tmp.norm2();\n                    //DIPOLE check\n                    functionT y = factoryT(world).f(ydipole);\n                    functionT z = factoryT(world).f(zdipole);\n                    double ydip = myreal(inner(psi2s, y*psi2s))/(norm*norm);\n                    double zdip = myreal(inner(psi2s, z*psi2s))/(norm*norm);\n                    if (world.rank() == 0) print(\"applied operator:     <y> =\",ydip,\n                                                 \" <z> = \", zdip, \"   \",  wall_time());\n                    // ERROR check\n                    functionT  r = tmp - psi2s;\n                    double rnorm = r.norm2();\n                     // ?? I'm not sure why this is the error in the energy\n                    double eps_error =  - 0.5*inner(Vpsi2s,r)/(norm*norm);\n                    if (world.rank() == 0 ) {\n                        print(\"norm = \",norm,\"  eps = \",eps,\" err(psi) = \", rnorm,\" err(eps) = \",eps_error);\n                    }\n                    psi2s = tmp.scale(1.0/norm);\n                    if( rnorm < std::max(1e-5, param.thresh)) break;\n                }\n                iState = psi2s;\n            }\n            complex_functionT iStateC = double_complex(1.0,0.0)*iState;\n            wave_function_store(world, 0, iStateC);\n        }\n        else {\n            if (world.rank() == 0) {\n                print(\"The requested restart was not found ---\", step0);\n                error(\"restart failed\", 0);\n            }\n            world.gop.fence();\n        }\n    }\n\n    potn.clear();\n    propagate(world, step0);\n}\n\nint main(int argc, char** argv) {\n    initialize(argc,argv);\n    World world(SafeMPI::COMM_WORLD);\n    //if(world.rank() == 0) system(\"Version: $Rev$\"); // What is this supposed to do?\n    startup(world,argc,argv);\n    try {\n        doit(world);\n    } catch (const SafeMPI::Exception& e) {\n        print(e); std::cout.flush();\n        error(\"caught an MPI exception\");\n    } catch (const madness::MadnessException& e) {\n        print(e); std::cout.flush();\n        error(\"caught a MADNESS exception\");\n    } catch (const madness::TensorException& e) {\n        print(e); std::cout.flush();\n        error(\"caught a Tensor exception\");\n    } catch (const char* s) {\n        print(s); std::cout.flush();\n        error(\"caught a c-string exception\");\n    } catch (const std::string& s) {\n        print(s); std::cout.flush();\n        error(\"caught a string (class) exception\");\n    } catch (const std::exception& e) {\n        print(e.what()); std::cout.flush();\n        error(\"caught an STL exception\");\n    } catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n\n    world.gop.fence();\n\n    print_stats(world);\n    finalize();\n    return 0;\n}\n\n\n"
  },
  {
    "path": "src/apps/tdse/tdse.confused.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/// \\file tdse/tdse.confused.cc\n/// \\brief Evolves the hydrogen atom in imaginary and also real time\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/qmprop.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n#include <madness/tensor/vmath.h>\n\n#include <madness/mra/lbdeux.h>\n\nusing namespace madness;\n\nstruct InputParameters {\n  static const int MAXNATOM=99;\n\n    // IF YOU ADD A NEW PARAMETER DON'T FORGET TO INCLUDE IT IN\n    // a) read()\n    // b) serialize()\n    // c) operator<<()\n\n  double L;           // Box size for the simulation\n  double Lsmall;      // Box size for small (near nucleus) plots\n  double Llarge;      // Box size for large (far from nucleus) plots\n  double F;           // Laser field strength\n  double omega;       // Laser frequency\n  double ncycle;      // Number of laser cycles in envelope\n  int natom;          // Number of atoms\n  double Z[MAXNATOM]; // Nuclear charge of atoms\n  double R[MAXNATOM][3]; // Coordinates of atoms\n  int k;              // wavelet order\n  double thresh;      // precision for truncating wave function\n  double safety;      // additional precision (thresh*safety) for operators and potential\n  double cut;         // smoothing parameter for 1/r (same for all atoms for now)\n  string prefix;      // Prefix for filenames\n  int ndump;          // dump wave function to disk every ndump steps\n  int nplot;          // dump opendx plot to disk every nplot steps\n  int nprint;         // print stats every nprint steps\n  int nloadbal;       // load balance every nloadbal steps\n  int nio;            // Number of IO nodes\n\n  double tScale;      // Scaling parameter for optimization\n\n  double target_time;// Target end-time for the simulation\n\n  void read(const char* filename) {\n    ifstream f(filename);\n    string tag;\n    printf(\"\\n\");\n    printf(\"       Simulation parameters\\n\");\n    printf(\"       ---------------------\\n\");\n    while(f >> tag) {\n        if (tag[0] == '#') {\n            char ch;\n            printf(\"    comment  %s \",tag.c_str());\n            while (f.get(ch)) {\n                printf(\"%c\",ch);\n                if (ch == '\\n') break;\n            }\n        }\n        else if (tag == \"L\") {\n            f >> L;\n            printf(\"             L = %.1f\\n\", L);\n        }\n        else if (tag == \"Lsmall\") {\n            f >> Lsmall;\n            printf(\"        Lsmall = %.1f\\n\", Lsmall);\n        }\n        else if (tag == \"Llarge\") {\n            f >> Llarge;\n            printf(\"        Llarge = %.1f\\n\", Llarge);\n        }\n        else if (tag == \"F\") {\n            f >> F;\n            printf(\"             F = %.6f\\n\", F);\n        }\n        else if (tag == \"omega\") {\n            f >> omega;\n            printf(\"         omega = %.6f\\n\", omega);\n        }\n        else if (tag == \"ncycle\") {\n            f >> ncycle;\n            printf(\"         ncycle = %.6f\\n\", ncycle);\n        }\n        else if (tag == \"natom\") {\n            f >> natom;\n            printf(\"         natom = %d\\n\", natom);\n            for (int i=0; i<natom; i++) {\n                f >> Z[i] >> R[i][0] >> R[i][1] >> R[i][2];\n                printf(\"           atom %2d   %.1f  %10.6f  %10.6f  %10.6f\\n\", i, Z[i], R[i][0], R[i][1], R[i][2]);\n            }\n        }\n        else if (tag == \"k\") {\n            f >> k;\n            printf(\"             k = %d\\n\", k);\n        }\n        else if (tag == \"thresh\") {\n            f >> thresh;\n            printf(\"        thresh = %.1e\\n\", thresh);\n        }\n        else if (tag == \"safety\") {\n            f >> safety;\n            printf(\"        safety = %.1e\\n\", safety);\n        }\n        else if (tag == \"cut\") {\n            f >> cut;\n            printf(\"           cut = %.2f\\n\", cut);\n        }\n        else if (tag == \"prefix\") {\n            f >> prefix;\n            printf(\"        prefix = %s\\n\", prefix.c_str());\n        }\n        else if (tag == \"ndump\") {\n            f >> ndump;\n            printf(\"         ndump = %d\\n\", ndump);\n        }\n        else if (tag == \"nplot\") {\n            f >> nplot;\n            printf(\"         nplot = %d\\n\", nplot);\n        }\n        else if (tag == \"nprint\") {\n            f >> nprint;\n            printf(\"         nprint = %d\\n\", nprint);\n        }\n        else if (tag == \"nloadbal\") {\n            f >> nloadbal;\n            printf(\"         nloadbal = %d\\n\", nloadbal);\n        }\n        else if (tag == \"nio\") {\n            f >> nio;\n            printf(\"           nio = %d\\n\", nio);\n        }\n        else if (tag == \"target_time\") {\n            f >> target_time;\n            printf(\"   target_time = %.3f\\n\", target_time);\n        }\n        else if (tag == \"tScale\") {\n            f >> tScale;\n            printf(\"           tScale = %.5f\\n\", tScale);\n        }\n        else {\n            MADNESS_EXCEPTION(\"unknown input option\", 0);\n        }\n    }\n  }\n\n  template <typename Archive>\n  void serialize(Archive & ar) {\n    ar & L & Lsmall & Llarge & F & omega & ncycle & natom & Z;\n    ar & archive::wrap(&(R[0][0]), 3*MAXNATOM);\n    ar & k & thresh & safety & cut & prefix & ndump & nplot & nprint & nloadbal & nio & target_time &\n\t\ttScale;\n  }\n};\n\nostream& operator<<(ostream& s, const InputParameters& p) {\n    s << p.L<< \" \" << p.Lsmall<< \" \" << p.Llarge<< \" \" << p.F<< \" \" << p.omega<<\n        \" \" << p.ncycle << \" \" << p.Z<< \" \" << p.R[0]<< \" \" << p.k<< \" \" <<\n        p.thresh<< \" \" << p.cut<< \" \" << p.prefix<< \" \" << p.ndump<< \" \" <<\n        p.nplot << \" \" << p.nprint << \" \"  << p.nloadbal << \" \" << p.nio << p.tScale << std::endl;\nreturn s;\n}\n\nInputParameters param;\n\nstatic double zero_field_time;      // Laser actually switches on after this time (set by propagate)\n                                    // Delay provides for several steps with no field before start\n\n// typedefs to make life less verbose\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double_complex,3> > complex_functorT;\ntypedef Function<double_complex,3> complex_functionT;\ntypedef FunctionFactory<double_complex,3> complex_factoryT;\ntypedef SeparatedConvolution<double_complex,3> complex_operatorT;\ntypedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmapT;\n\n// This controls the distribution of data across the machine\nclass LevelPmap : public WorldDCPmapInterface< Key<3> > {\nprivate:\n    const int nproc;\npublic:\n    LevelPmap() : nproc(0) {};\n\n    LevelPmap(World& world) : nproc(world.nproc()) {}\n\n    // Find the owner of a given key\n    ProcessID owner(const Key<3>& key) const {\n        Level n = key.level();\n        if (n == 0) return 0;\n        hashT hash;\n\n        // This randomly hashes levels 0-2 and then\n        // hashes nodes by their grand-parent key so as\n        // to increase locality separately on each level.\n        //if (n <= 2) hash = key.hash();\n        //else hash = key.parent(2).hash();\n\n        // This randomly hashes levels 0-3 and then\n        // maps nodes on even levels to the same\n        // random node as their parent.\n        // if (n <= 3 || (n&0x1)) hash = key.hash();\n        // else hash = key.parent().hash();\n\n        // This randomly hashes each key\n        hash = key.hash();\n\n        return hash%nproc;\n    }\n};\n\n// Derivative of the smoothed 1/r approximation\n\n// Invoke as \\c du(r/c)/(c*c) where \\c c is the radius of the smoothed volume.\nstatic double d_smoothed_potential(double r) {\n    double r2 = r*r;\n\n    if (r > 6.5) {\n        return -1.0/r2;\n    }\n    else if (r > 1e-2) {\n        return -(1.1283791670955126*(0.88622692545275800*erf(r)-exp(-r2)*r*(1.0-r2)))/r2;\n    }\n    else {\n        return (-1.880631945159187623160265+(1.579730833933717603454623-0.7253866074185437975046736*r2)*r2)*r;\n    }\n}\n\n// Smoothed 1/r potential.\n\n// Invoke as \\c u(r/c)/c where \\c c is the radius of the smoothed volume.\nstatic double smoothed_potential(double r) {\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-2) {\n        pot = erf(r)/r + exp(-r2)*0.56418958354775630;\n    } else{\n        pot = 1.6925687506432689-r2*(0.94031597257959381-r2*(0.39493270848342941-0.12089776790309064*r2));\n    }\n\n    return pot;\n}\n\n// Nuclear attraction potential\nstatic double V(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      double rr = sqrt(xx*xx+yy*yy+zz*zz);\n\n      sum +=  -param.Z[i]*smoothed_potential(rr/param.cut)/param.cut;\n    }\n    return sum;\n}\n\n// dV/dx\nstatic double dVdx(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      if (xx) {\n\tdouble rr = sqrt(xx*xx+yy*yy+zz*zz);\n\tsum += -param.Z[i]*xx*d_smoothed_potential(rr/param.cut)/(rr*param.cut*param.cut);\n      }\n    }\n    return sum;\n}\n\n// dV/dy\nstatic double dVdy(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      if (yy) {\n\tdouble rr = sqrt(xx*xx+yy*yy+zz*zz);\n\tsum += -param.Z[i]*yy*d_smoothed_potential(rr/param.cut)/(rr*param.cut*param.cut);\n      }\n    }\n    return sum;\n}\n\n// dV/dz\nstatic double dVdz(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      if (zz) {\n\tdouble rr = sqrt(xx*xx+yy*yy+zz*zz);\n\tsum += -param.Z[i]*zz*d_smoothed_potential(rr/param.cut)/(rr*param.cut*param.cut);\n      }\n    }\n    return sum;\n}\n\n// Initial guess wave function using symmetric superposition of 1s orbital on atoms\nstatic double guess(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    double sum = 0.0;\n    for (int i=0; i<param.natom; i++) {\n      double xx = x-param.R[i][0];\n      double yy = y-param.R[i][1];\n      double zz = z-param.R[i][2];\n      double rr = sqrt(xx*xx+yy*yy+zz*zz+param.cut*param.cut);\n      sum += sqrt(3.14*param.Z[i]*param.Z[i]*param.Z[i])*exp(-param.Z[i]*rr);\n    }\n    return sum;\n}\n\n// x-dipole\ndouble xdipole(const coordT& r) {\n    return r[0];\n}\n\n// y-dipole\ndouble ydipole(const coordT& r) {\n    return r[1];\n}\n\n// z-dipole\ndouble zdipole(const coordT& r) {\n    return r[2];\n}\n\n// Strength of the laser field at time t\ndouble laser(double t) {\n    double omegat = param.omega*t;\n\n    if (omegat < 0.0 || omegat/(2*param.ncycle) > constants::pi) return 0.0;\n\n    double envelope = sin(omegat/(2*param.ncycle));\n    envelope *= envelope;\n    return param.F*envelope*sin(omegat);\n}\n\ndouble myreal(double t) {return t;}\n\ndouble myreal(const double_complex& t) {return real(t);}\n\n// Given psi and V evaluate the energy ... leaves psi compressed, potn reconstructed\ntemplate <typename T>\ndouble energy(World& world, const Function<T,3>& psi, const functionT& potn) {\n    // First do all work in the scaling function basis\n    bool DOFENCE = false;\n    psi.reconstruct();\n    Function<T,3> dx = diff(psi,0,DOFENCE);\n    Function<T,3> dy = diff(psi,1,DOFENCE);\n    Function<T,3> dz = diff(psi,2,DOFENCE);\n    Function<T,3> Vpsi = psi*potn;\n\n    // Now do all work in the wavelet basis\n    psi.compress(DOFENCE); Vpsi.compress(DOFENCE); dx.compress(DOFENCE); dy.compress(DOFENCE); dz.compress(true);\n    T S = psi.inner(psi);\n    T PE = psi.inner(Vpsi);\n    T KE = 0.5*(inner(dx,dx) + inner(dy,dy) + inner(dz,dz));\n    T E = (KE+PE)/S;\n\n    dx.clear(); dy.clear(); dz.clear(); Vpsi.clear(); // To free memory on return\n    world.gop.fence();\n//     if (world.rank() == 0) {\n//         print(\"the overlap integral is\",S);\n//         print(\"the kinetic energy integral\",KE);\n//         print(\"the potential energy integral\",PE);\n//         print(\"the total energy\",E);\n//     }\n\n    return myreal(E);\n}\n\nvoid converge(World& world, functionT& potn, functionT& psi, double& eps) {\n\n    for (int iter=0; iter<30; iter++) {\n        if (world.rank() == 0) print(\"beginning iter\", iter, wall_time());\n        operatorT op = BSHOperator3D<double>(world, sqrt(-2*eps), param.k, param.cut, param.thresh);\n        functionT Vpsi = (potn*psi);\n        if (world.rank() == 0) print(\"made V*psi\", wall_time());\n        Vpsi.scale(-2.0).truncate();\n        if (world.rank() == 0) print(\"tryuncated V*psi\", wall_time());\n        functionT tmp = apply(op,Vpsi).truncate(param.thresh);\n        if (world.rank() == 0) print(\"applied operator\", wall_time());\n        double norm = tmp.norm2();\n        functionT r = tmp-psi;\n        double rnorm = r.norm2();\n        double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n        if (world.rank() == 0) {\n            print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n        }\n        psi = tmp.scale(1.0/norm);\n        eps = eps_new;\n        if (rnorm < std::max(1e-5,param.thresh)) break;\n    }\n}\n\ncomplex_functionT chin_chen(const complex_functionT& expV_0,\n                            const complex_functionT& expV_tilde,\n                            const complex_functionT& expV_1,\n                            const complex_operatorT& G,\n                            const complex_functionT& psi0) {\n    // psi(t) = exp(-i*V(t)*t/6) exp(-i*T*t/2) exp(-i*2*Vtilde(t/2)*t/3) exp(-i*T*t/2) exp(-i*V(0)*t/6)\n    // .             expV_1            G               expV_tilde             G             expV_0\n\n    complex_functionT psi1;\n\n    double t0 = wall_time();\n    psi1 = expV_0*psi0;     psi1.truncate();\n    double t1 = wall_time();\n    psi1 = apply(G,psi1);   psi1.truncate();\n    double t2 = wall_time();\n    psi1 = expV_tilde*psi1; psi1.truncate();\n    double t3 = wall_time();\n    psi1 = apply(G,psi1);   psi1.truncate();\n    double t4 = wall_time();\n    psi1 = expV_1*psi1;     psi1.truncate(param.thresh);\n    double t5 = wall_time();\n\n    if (psi1.world().rank() == 0) {\n        printf(\"chin-chen: %.2f %.2f %.2f %.2f %.2f\\n\", t1-t0, t2-t1, t3-t2, t4-t3, t5-t4);\n    }\n\n    return psi1;\n}\n\ncomplex_functionT trotter(World& world,\n                          const complex_functionT& expV,\n                          const complex_operatorT& G,\n                          const complex_functionT& psi0) {\n    //    psi(t) = exp(-i*T*t/2) exp(-i*V(t/2)*t) exp(-i*T*t/2) psi(0)\n\n    complex_functionT psi1;\n\n    unsigned long size = psi0.size();\n    if (world.rank() == 0) print(\"APPLYING G\", size);\n    psi1 = apply(G,psi0);  psi1.truncate();  size = psi1.size();\n    if (world.rank() == 0) print(\"APPLYING expV\", size);\n    psi1 = expV*psi1;      psi1.truncate();  size = psi1.size();\n    if (world.rank() == 0) print(\"APPLYING G again\", size);\n    psi1 = apply(G,psi1);  psi1.truncate(param.thresh);  size = psi1.size();\n    if (world.rank() == 0) print(\"DONE\", size);\n\n    return psi1;\n}\n\ntemplate<typename T, int NDIM>\nstruct unaryexp {\n//     void operator()(const Key<NDIM>& key, Tensor<T>& t) const {\n//         UNARY_OPTIMIZED_ITERATOR(T, t, *_p0 = exp(*_p0););\n//     }\n//     template <typename Archive>\n//     void serialize(Archive& ar) {}\n};\n\n\ntemplate<int NDIM>\nstruct unaryexp<double_complex,NDIM> {\n    void operator()(const Key<NDIM>& key, Tensor<double_complex>& t) const {\n        //vzExp(t.size, t.ptr(), t.ptr());\n        UNARY_OPTIMIZED_ITERATOR(double_complex, t, *_p0 = exp(*_p0););\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\n\n// Returns exp(-I*t*V)\ncomplex_functionT make_exp(double t, const functionT& v) {\n    v.reconstruct();\n    complex_functionT expV = double_complex(0.0,-t)*v;\n    expV.unaryop(unaryexp<double_complex,3>());\n    return expV;\n}\n\nvoid print_stats_header(World& world) {\n    if (world.rank() == 0) {\n        printf(\"  step       time            field           energy            norm           overlap0         x-dipole         y-dipole         z-dipole           accel      wall-time(s)\\n\");\n        printf(\"------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ------------\\n\");\n    }\n}\n\nvoid print_stats(World& world, int step, double t, const functionT& v,\n                 const functionT& x, const functionT& y, const functionT& z,\n                 const functionT& dV_dz,\n                 const complex_functionT& psi0, const complex_functionT& psi) {\n    double norm = psi.norm2();\n    double current_energy = energy(world, psi, v);\n    double xdip = real(inner(psi, x*psi))/(norm*norm);\n    double ydip = real(inner(psi, y*psi))/(norm*norm);\n    double zdip = real(inner(psi, z*psi))/(norm*norm);\n    double overlap0 = std::abs(psi.inner(psi0))/norm;\n    double accel = std::abs(psi.inner(psi*dV_dz))/(norm*norm);\n    if (world.rank() == 0) {\n        printf(\"%7d %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %9.1f\\n\", step, t, laser(t), current_energy, norm, overlap0, xdip, ydip, zdip, accel, wall_time());\n    }\n}\n\nconst char* wave_function_filename(int step) {\n    static char fname[1024];\n    sprintf(fname, \"%s-%5.5d\", param.prefix.c_str(), step);\n    return fname;\n}\n\nconst char* wave_function_small_plot_filename(int step) {\n    static char fname[1024];\n    sprintf(fname, \"%s-%5.5dS.dx\", param.prefix.c_str(), step);\n    return fname;\n}\n\nconst char* wave_function_large_plot_filename(int step) {\n    static char fname[1024];\n    sprintf(fname, \"%s-%5.5dL.dx\", param.prefix.c_str(), step);\n    return fname;\n}\n\ncomplex_functionT wave_function_load(World& world, int step) {\n    complex_functionT psi;\n    ParallelInputArchive ar(world, wave_function_filename(step));\n    ar & psi;\n    return psi;\n}\n\nvoid wave_function_store(World& world, int step, const complex_functionT& psi) {\n    ParallelOutputArchive ar(world, wave_function_filename(step), param.nio);\n    ar & psi;\n}\n\nbool wave_function_exists(World& world, int step) {\n    return ParallelInputArchive::exists(world, wave_function_filename(step));\n}\n\nvoid doplot(World& world, int step, const complex_functionT& psi, double Lplot, long numpt, const char* fname) {\n    double start = wall_time();\n    Tensor<double> cell(3,2);\n    std::vector<long> npt(3, numpt);\n    cell(_,0) = -Lplot;\n    cell(_,1) =  Lplot;\n    //plotdx(psi, fname, cell, npt);\n    if (world.rank() == 0) print(\"plotting used\", wall_time()-start);\n}\n\n\nvoid line_plot(World& world, int step, complex_functionT& psi) {\n    static const int npt = 10001;\n    double_complex v[10001];\n    psi.reconstruct();\n    for (int i=0; i<npt; i++)\n        v[i] = 0.0;\n    for (int i=world.rank(); i<npt; i+=world.size()) {\n        double z = -param.Llarge + 2.0*i*param.Llarge/(npt-1);\n        coordT r(0.0);\n        r[2] = z;\n        v[i] = psi.eval(r);\n    }\n    world.gop.fence();\n    world.gop.sum(v, npt);\n    if (world.rank() == 0) {\n        char buf[256];\n        sprintf(buf, \"%s.lineplot\", wave_function_filename(step));\n        ofstream f(buf);\n        f.precision(10);\n        for (int i=0; i<npt; i++) {\n            double z = -param.Llarge + 2.0*i*param.Llarge/(npt-1);\n            f << z << \" \" << v[i] << \"\\n\";\n        }\n    }\n    world.gop.fence();\n}\n\ntemplate <typename T, int NDIM>\nstruct lbcost {\n    double leaf_value;\n    double parent_value;\n    lbcost(double leaf_value=1.0, double parent_value=1.0) : leaf_value(leaf_value), parent_value(parent_value) {}\n    double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n        if (key.level() <= 1) return 1000.0;\n        else if (node.is_leaf()) {\n            return leaf_value;\n        }\n        else {\n            return parent_value;\n        }\n        //return key.level()+1.0;\n    }\n};\n\nvoid loadbal(World& world,\n             functionT& potn, functionT& vt,\n             functionT& dpotn_dx, functionT& dpotn_dy, functionT& dpotn_dz,\n             functionT& dpotn_dx_sq, functionT& dpotn_dy_sq,\n             complex_functionT& psi, complex_functionT& psi0,\n             functionT& x, functionT& y, functionT& z) {\n    if (world.size() < 2) return;\n    if (world.rank() == 0) print(\"starting LB\");\n    LoadBalanceDeux<3> lb(world);\n    lb.add_tree(potn, lbcost<double,3>(1.0,1.0));\n    lb.add_tree(psi, lbcost<double_complex,3>(10.0,10.0));\n    FunctionDefaults<3>::set_pmap(lb.load_balance());\n    world.gop.fence();\n    if (world.rank() == 0) print(\"starting LB copies\");\n    world.gop.fence();\n    potn = copy(potn, FunctionDefaults<3>::get_pmap(), true);\n    vt = copy(vt, FunctionDefaults<3>::get_pmap(), true);\n    dpotn_dx = copy(dpotn_dx, FunctionDefaults<3>::get_pmap(), true);\n    dpotn_dy = copy(dpotn_dy, FunctionDefaults<3>::get_pmap(), true);\n    dpotn_dz = copy(dpotn_dz, FunctionDefaults<3>::get_pmap(), true);\n    dpotn_dx_sq = copy(dpotn_dx_sq, FunctionDefaults<3>::get_pmap(), true);\n    dpotn_dy_sq = copy(dpotn_dy_sq, FunctionDefaults<3>::get_pmap(), true);\n    psi = copy(psi, FunctionDefaults<3>::get_pmap(), true);\n    psi0 = copy(psi0, FunctionDefaults<3>::get_pmap(), true);\n    x = copy(x, FunctionDefaults<3>::get_pmap(), true);\n    y = copy(y, FunctionDefaults<3>::get_pmap(), true);\n    z = copy(z, FunctionDefaults<3>::get_pmap(), true);\n    world.gop.fence();\n    if (world.rank() == 0) print(\"done with LB\");\n    world.gop.fence();\n}\n\n// Evolve the wave function in real time starting from given time step on disk\nvoid propagate(World& world, int step0) {\n    //double ctarget = 10.0/param.cut;                // From Fourier analysis of the potential\n    double ctarget = 5.0/param.cut;\n    //double c = 1.86*ctarget; // This for 10^5 steps\n    double c = 1.72*ctarget;   // This for 10^4 steps\n    double tcrit = 2*constants::pi/(c*c);\n\n    double time_step = tcrit * param.tScale;\n\n    zero_field_time = 10.0*time_step;\n\n    int nstep = (param.target_time + zero_field_time)/time_step + 1;\n\n    // Ensure everyone has the same data\n    world.gop.broadcast(c);\n    world.gop.broadcast(time_step);\n    world.gop.broadcast(nstep);\n\n    // Free particle propagator for both Trotter and Chin-Chen --- exp(-I*T*time_step/2)\n    SeparatedConvolution<double_complex,3> G = qm_free_particle_propagator<3>(world, param.k, c, 0.5*time_step, 2*param.L);\n    //G.doleaves = true;\n\n    // The time-independent part of the potential plus derivatives for\n    // Chin-Chen and also for computing the power spectrum ... compute\n    // derivatives analytically to reduce numerical noise\n    functionT potn = factoryT(world).f(V);         potn.truncate();\n    functionT dpotn_dx = factoryT(world).f(dVdx);\n    functionT dpotn_dy = factoryT(world).f(dVdy);\n    functionT dpotn_dz = factoryT(world).f(dVdz);\n\n    functionT dpotn_dx_sq = dpotn_dx*dpotn_dx;\n    functionT dpotn_dy_sq = dpotn_dy*dpotn_dy;\n\n    // Dipole moment functions for laser field and for printing statistics\n    functionT x = factoryT(world).f(xdipole);\n    functionT y = factoryT(world).f(ydipole);\n    functionT z = factoryT(world).f(zdipole);\n\n    // Wave function at time t=0 for printing statistics\n    complex_functionT psi0 = wave_function_load(world, 0);\n\n    int step = step0;  // The current step\n    double t = step0 * time_step - zero_field_time;        // The current time\n    complex_functionT psi = wave_function_load(world, step); // The wave function at time t\n    functionT vt = potn+laser(t)*z; // The total potential at time t\n\n    if (world.rank() == 0) {\n        printf(\"\\n\");\n        printf(\"        Evolution parameters\\n\");\n        printf(\"       --------------------\\n\");\n        printf(\"     bandlimit = %.2f\\n\", ctarget);\n        printf(\" eff-bandlimit = %.2f\\n\", c);\n        printf(\"         tcrit = %.6f\\n\", tcrit);\n        printf(\"     time step = %.6f\\n\", time_step);\n        printf(\" no field time = %.6f\\n\", zero_field_time);\n        printf(\"   target time = %.2f\\n\", param.target_time);\n        printf(\"         nstep = %d\\n\", nstep);\n        printf(\"\\n\");\n        printf(\"  restart step = %d\\n\", step0);\n        printf(\"  restart time = %.6f\\n\", t);\n        printf(\"\\n\");\n    }\n\n    print_stats_header(world);\n    {\n        // Make gradient of potential at time t in z direction to compute HHG\n        functionT dV_dz = copy(dpotn_dz);\n        dV_dz.add_scalar(laser(t));\n\n        print_stats(world, step, t, vt, x, y, z, dV_dz, psi0, psi);\n        line_plot(world, step, psi);\n    }\n    world.gop.fence();\n\n    psi.truncate();\n\n    bool use_trotter = false;\n    while (step < nstep) {\n        double t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13;\n        t0 = wall_time();\n        if (step < 2 || (step%param.nloadbal) == 0)\n            loadbal(world, potn, vt, dpotn_dx, dpotn_dy, dpotn_dz, dpotn_dx_sq, dpotn_dy_sq, psi, psi0, x, y, z);\n        t1 = wall_time();\n\n        long depth = psi.max_depth(); long size=psi.size();\n        if (use_trotter) {\n            // Make the potential at time t + step/2\n            functionT vhalf = potn + laser(t+0.5*time_step)*z;\n\n            // Apply Trotter to advance from time t to time t+step\n            complex_functionT expV = make_exp(time_step, vhalf);\n            psi = trotter(world, expV, G, psi);\n        }\n        else { // Chin-Chen\n            // Make z-component of del V at time tstep/2\n\n            functionT dV_dz = copy(dpotn_dz);\n            t2 = wall_time();\n            dV_dz.add_scalar(laser(t+0.5*time_step));\n\n            // Make Vtilde at time tstep/2\n            functionT Vtilde = potn + laser(t+0.5*time_step)*z;\n            t3 = wall_time();\n\n            //functionT dvsq = dpotn_dx_sq + dpotn_dy_sq + dV_dz*dV_dz;\n            world.gop.fence();\n            functionT dV_dz_sq = dV_dz*dV_dz;\n            world.gop.fence();\n            dV_dz_sq.compress();\n            world.gop.fence();\n            functionT dvsq = dpotn_dx_sq + dpotn_dy_sq + dV_dz_sq;\n            world.gop.fence();\n            dV_dz_sq.clear();\n\n            t4 = wall_time();\n            Vtilde.gaxpy(1.0, dvsq, -time_step*time_step/48.0);\n            t5 = wall_time();\n\n            // Exponentiate potentials\n            complex_functionT expv_0     = make_exp(time_step/6.0, vt);\n            t6 = wall_time();\n            complex_functionT expv_tilde = make_exp(2.0*time_step/3.0, Vtilde);\n            t7 = wall_time();\n            complex_functionT expv_1     = make_exp(time_step/6.0, potn + laser(t+time_step)*z);\n            t8 = wall_time();\n\n            // Free up some memory\n            dV_dz.clear();\n            Vtilde.clear();\n            dvsq.clear();\n            world.gop.fence();\n            t9 = wall_time();\n\n            // Apply Chin-Chen\n            psi = chin_chen(expv_0, expv_tilde, expv_1, G, psi);\n            t10 = wall_time();\n        }\n\n        // Update counters, print info, dump/plot as necessary\n        step++;\n        t += time_step;\n        vt = potn+laser(t)*z;\n\n\n        {\n            // Make gradient of potential at time t in z direction to compute HHG\n            functionT dV_dz = copy(dpotn_dz);\n            t11 = wall_time();\n            dV_dz.add_scalar(laser(t));\n            t12 = wall_time();\n\n            if ((step%param.nprint) == 0 || step==nstep) {\n                print_stats(world, step, t, vt, x, y, z, dV_dz, psi0, psi);\n                line_plot(world, step, psi);\n                if (world.rank() == 0) print(step, \"depth\", depth, \"size\", size);\n            }\n\n            t13 = wall_time();\n            if (world.rank() == 0)\n                printf(\"loadbal=%.2f copy=%.2f Vtil=%.2f dvsq =%.2f gaxpy=%.2f exp1=%.2f exp2=%.2f exp3=%.2f clear=%.2f CC=%.2f copy=%.2f addscl=%.2f prnt=%.2f\\n\",\n                       t1-t0, t2-t1, t3-t2, t4-t3, t5-t4, t6-t5, t7-t6, t8-t7, t9-t8, t10-t9, t11-t10, t12-t11, t13-t12);\n        }\n\n        if ((step%param.ndump) == 0 || step==nstep) {\n            double start = wall_time();\n            wave_function_store(world, step, psi);\n            // Update the restart file for automatic restarting\n            if (world.rank() == 0) {\n                std::ofstream(\"restart\") << step << std::endl;\n                print(\"dumping took\", wall_time()-start);\n            }\n            world.gop.fence();\n        }\n\n        if ((step%param.nplot) == 0 || step==nstep) {\n            doplot(world, step, psi, param.Lsmall, 201, wave_function_small_plot_filename(step));\n            doplot(world, step, psi, param.Llarge, 201, wave_function_large_plot_filename(step));\n        }\n    }\n}\n\nvoid doit(World& world) {\n    cout.precision(8);\n\n    if (world.rank() == 0) param.read(\"input\");\n    world.gop.broadcast_serializable(param, 0);\n\n    FunctionDefaults<3>::set_k(param.k);                        // Wavelet order\n    FunctionDefaults<3>::set_thresh(param.thresh*param.safety);       // Accuracy\n    FunctionDefaults<3>::set_initial_level(4);\n    FunctionDefaults<3>::set_cubic_cell(-param.L,param.L);\n    FunctionDefaults<3>::set_apply_randomize(true);\n    FunctionDefaults<3>::set_autorefine(false);\n    FunctionDefaults<3>::set_truncate_mode(2);\n    FunctionDefaults<3>::set_pmap(pmapT(new LevelPmap(world)));\n\n    // Make the potential\n    functionT potn = factoryT(world).f(V);  potn.truncate();\n\n    // Before doing anything else use the potential to guide future\n    // data distribution\n    LoadBalanceDeux<3> lb(world);\n    lb.add_tree(potn, lbcost<double,3>());\n    FunctionDefaults<3>::set_pmap(lb.load_balance());\n    world.gop.fence();\n    potn = copy(potn, FunctionDefaults<3>::get_pmap());\n\n    // Read restart information\n    int step0;               // Initial time step ... filenames are <prefix>-<step0>\n    if (world.rank() == 0) std::ifstream(\"restart\") >> step0;\n    world.gop.broadcast(step0);\n\n    bool exists = wave_function_exists(world, step0);\n\n    if (!exists) {\n        if (step0 == 0) {\n            if (world.rank() == 0) print(\"Computing initial ground state wavefunction\", wall_time());\n            functionT psi = factoryT(world).f(guess);\n            psi.scale(1.0/psi.norm2());\n            psi.truncate();\n            psi.scale(1.0/psi.norm2());\n            if (world.rank() == 0) print(\"got psi\", wall_time());\n\n            double eps = energy(world, psi, potn);\n            if (world.rank() == 0) print(\"guess energy\", eps, wall_time());\n            converge(world, potn, psi, eps);\n\n            psi.truncate(param.thresh);\n\n            complex_functionT psic = double_complex(1.0,0.0)*psi;\n            wave_function_store(world, 0, psic);\n        }\n        else {\n            if (world.rank() == 0) {\n                print(\"The requested restart was not found ---\", step0);\n                error(\"restart failed\", 0);\n            }\n            world.gop.fence();\n        }\n    }\n\n    propagate(world, step0);\n}\n\nint main(int argc, char** argv) {\n    initialize(argc,argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n\n    try {\n        doit(world);\n    } catch (const SafeMPI::Exception& e) {\n        print(e); std::cout.flush();\n        error(\"caught an MPI exception\");\n    } catch (const madness::MadnessException& e) {\n        print(e); std::cout.flush();\n        error(\"caught a MADNESS exception\");\n    } catch (const madness::TensorException& e) {\n        print(e); std::cout.flush();\n        error(\"caught a Tensor exception\");\n    } catch (const char* s) {\n        print(s); std::cout.flush();\n        error(\"caught a c-string exception\");\n    } catch (char* s) {\n        print(s); std::cout.flush();\n        error(\"caught a c-string exception\");\n    } catch (const std::string& s) {\n        print(s); std::cout.flush();\n        error(\"caught a string (class) exception\");\n    } catch (const std::exception& e) {\n        print(e.what()); std::cout.flush();\n        error(\"caught an STL exception\");\n    } catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n\n    world.gop.fence();\n\n    print_stats(world);\n    finalize();\n    return 0;\n}\n\n\n"
  },
  {
    "path": "src/apps/tdse/tdse4.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/// \\file tdse/tdse4.cc\n/// \\brief Evolves the hydrogen molecular ion in 4D ... 3 electron + 1 nuclear degree of freedom\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/funcimpl.h>\n#include <madness/mra/qmprop.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n#include <madness/tensor/vmath.h>\n\n#include <madness/mra/lbdeux.h>\n\nusing namespace madness;\n\n\ntemplate <typename T, int NDIM>\nstruct lbcost {\n    double leaf_value;\n    double parent_value;\n    lbcost(double leaf_value=1.0, double parent_value=1.0) : leaf_value(leaf_value), parent_value(parent_value) {}\n    double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n        if (node.is_leaf()) {\n            return leaf_value;\n        }\n        else {\n            return parent_value;\n        }\n        //return key.level()+1.0;\n    }\n};\n\n\n// typedefs to make life less verbose\ntypedef Vector<double,4> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,4> > functorT;\ntypedef Function<double,4> functionT;\ntypedef FunctionFactory<double,4> factoryT;\ntypedef SeparatedConvolution<double,4> operatorT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double_complex,4> > complex_functorT;\ntypedef Function<double_complex,4> complex_functionT;\ntypedef FunctionFactory<double_complex,4> complex_factoryT;\ntypedef Convolution1D<double_complex> complex_operatorT;\ntypedef std::shared_ptr< WorldDCPmapInterface< Key<4> > > pmapT;\n\ndouble real(double a) {return a;}\n\nstatic const double reduced_mass = 0.5*constants::proton_electron_mass_ratio;\nstatic const double sqrtmu = sqrt(reduced_mass);\nstatic const double R0 = 2.04; // Effective center of nuclear wave function\nstatic const double s0 = sqrtmu*R0;\nstatic const double Z=1.0;\n\nstruct InputParameters {\n  static const int MAXNATOM=99;\n\n    // IF YOU ADD A NEW PARAMETER DON'T FORGET TO INCLUDE IT IN\n    // a) read()\n    // b) serialize()\n    // c) operator<<()\n\n  double L;           // Box size for the simulation\n  double F;           // Laser field strength\n  double omega;       // Laser frequency\n  double ncycle;      // Number of laser cycles in envelope\n  int k;              // wavelet order\n  double thresh;      // precision for truncating wave function\n  double safety;      // additional precision (thresh*safety) for operators and potential\n  double cut;         // smoothing parameter for 1/r (same for all atoms for now)\n  std::string prefix;      // Prefix for filenames\n  int ndump;          // dump wave function to disk every ndump steps\n  int nprint;         // print stats every nprint steps\n  int nloadbal;       // load balance every nloadbal steps\n  int nio;            // Number of IO nodes\n\n  double tScale;      // Scaling parameter for optimization\n\n  double target_time;// Target end-time for the simulation\n\n  void read(const char* filename) {\n    std::ifstream f(filename);\n    std::string tag;\n    printf(\"\\n\");\n    printf(\"       Simulation parameters\\n\");\n    printf(\"       ---------------------\\n\");\n    printf(\"             Z = %.1f\\n\", Z);\n    printf(\"            R0 = %.6f\\n\", R0);\n    printf(\"            mu = %.6f\\n\", reduced_mass);\n    printf(\"      sqrt(mu) = %.6f\\n\", sqrtmu);\n    while(f >> tag) {\n        if (tag[0] == '#') {\n            char ch;\n            printf(\"    comment  %s \",tag.c_str());\n            while (f.get(ch)) {\n                printf(\"%c\",ch);\n                if (ch == '\\n') break;\n            }\n        }\n        else if (tag == \"L\") {\n            f >> L;\n            printf(\"             L = %.1f\\n\", L);\n        }\n        else if (tag == \"F\") {\n            f >> F;\n            printf(\"             F = %.6f\\n\", F);\n        }\n        else if (tag == \"omega\") {\n            f >> omega;\n            printf(\"         omega = %.6f\\n\", omega);\n        }\n        else if (tag == \"ncycle\") {\n            f >> ncycle;\n            printf(\"         ncycle = %.6f\\n\", ncycle);\n        }\n        else if (tag == \"k\") {\n            f >> k;\n            printf(\"             k = %d\\n\", k);\n        }\n        else if (tag == \"thresh\") {\n            f >> thresh;\n            printf(\"        thresh = %.1e\\n\", thresh);\n        }\n        else if (tag == \"safety\") {\n            f >> safety;\n            printf(\"        safety = %.1e\\n\", safety);\n        }\n        else if (tag == \"cut\") {\n            f >> cut;\n            printf(\"           cut = %.2f\\n\", cut);\n        }\n        else if (tag == \"prefix\") {\n            f >> prefix;\n            printf(\"        prefix = %s\\n\", prefix.c_str());\n        }\n        else if (tag == \"ndump\") {\n            f >> ndump;\n            printf(\"         ndump = %d\\n\", ndump);\n        }\n        else if (tag == \"nprint\") {\n            f >> nprint;\n            printf(\"         nprint = %d\\n\", nprint);\n        }\n        else if (tag == \"nloadbal\") {\n            f >> nloadbal;\n            printf(\"         nloadbal = %d\\n\", nloadbal);\n        }\n        else if (tag == \"nio\") {\n            f >> nio;\n            printf(\"           nio = %d\\n\", nio);\n        }\n        else if (tag == \"target_time\") {\n            f >> target_time;\n            printf(\"   target_time = %.3f\\n\", target_time);\n        }\n        else if (tag == \"tScale\") {\n            f >> tScale;\n            printf(\"           tScale = %.5f\\n\", tScale);\n        }\n        else {\n            MADNESS_EXCEPTION(\"unknown input option\", 0);\n        }\n    }\n  }\n\n  template <typename Archive>\n  void serialize(Archive & ar) {\n      ar & L & F & omega & ncycle;\n      ar & k & thresh & safety & cut & prefix & ndump & nprint & nloadbal & nio & target_time & tScale;\n  }\n};\n\nstd::ostream& operator<<(std::ostream& s, const InputParameters& p) {\n    s << p.L<< \" \" << p.F<< \" \" << p.omega << \" \" <<\n        p.ncycle << \" \" << p.k<< \" \" <<\n        p.thresh<< \" \" << p.cut<< \" \" << p.prefix<< \" \" << p.ndump<< \" \" <<\n        p.nprint << \" \"  << p.nloadbal << \" \" << p.nio << p.tScale << std::endl;\nreturn s;\n}\n\nInputParameters param;\n\nstatic double zero_field_time;      // Laser actually switches on after this time (set by propagate)\n                                    // Delay provides for several steps with no field before start\n\n// Smoothed 1/r potential.\n\n// Invoke as \\c u(r/c)/c where \\c c is the radius of the smoothed volume.\nstatic double smoothed_potential(double r) {\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-2) {\n        pot = erf(r)/r + exp(-r2)*0.56418958354775630;\n    } else{\n        pot = 1.6925687506432689-r2*(0.94031597257959381-r2*(0.39493270848342941-0.12089776790309064*r2));\n    }\n\n    return pot;\n}\n\n// Potential - nuclear-nuclear repulsion\nstatic double Vn(const coordT& r) {\n    double s=r[3];\n    double R = R0 + s/sqrtmu;\n    if (R < 0.0) R = 0.0;// Do something vaguely sensible for non-physical bond length\n\n    double cut = 0.5;\n    return smoothed_potential(R/cut)/cut;\n}\n\n// Potential - electron-nuclear attraction\nstatic double Ve(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2], s=r[3];\n    double R = R0 + s/sqrtmu;\n    if (R < 0.0) R = 0.0;\n\n    double zz = z-R*0.5;\n    double rr = sqrt(x*x+y*y+zz*zz);\n    double Va = -Z*smoothed_potential(rr/param.cut)/param.cut;\n\n    zz = z+R*0.5;\n    rr = sqrt(x*x+y*y+zz*zz);\n    double Vb = -Z*smoothed_potential(rr/param.cut)/param.cut;\n\n    return Va + Vb;\n}\n\n// Initial guess wave function using symmetric superposition of 1s orbital on atoms and harmonic oscillator\nstatic double guess(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2], s=r[3];\n    const double R = R0 + s/sqrtmu;\n\n    // These from fitting to Predrag's exact function form for psinuc in BO approx\n    static const double a = 4.42162;\n    static const double alpha = 1.28164;\n    static const double beta = -1.06379;\n\n    static const double empirical_norm = 43.0;\n\n    // Screen on size of nuclear wave function\n    static const double Rmax = R0 + sqrt(46.0/a);\n    if (R-R0 > Rmax) return 0.0;\n\n    // Note in electronic part we are using R0 not R ... OR SHOULD THIS BE R? TRY BOTH!\n    static const double face = sqrt(3.14*Z*Z*Z);\n    double zz = z-R0*0.5;\n    double rr = sqrt(x*x+y*y+zz*zz);\n    double psia = face*exp(-Z*rr);\n    zz = z+R0*0.5;\n    rr = sqrt(x*x+y*y+zz*zz);\n    double psib = face*exp(-Z*rr);\n\n    // Nuclear part\n    double R2 = (R-R0)*(R-R0);\n    double psinuc = alpha*exp(-a*R2) + beta*(R-R0)*exp(-1.5*a*R2);\n\n    return (psia + psib)*psinuc / empirical_norm;;\n}\n\n// x-dipole electronic\ndouble xdipole(const coordT& r) {\n    return r[0];\n}\n\n// y-dipole electronic\ndouble ydipole(const coordT& r) {\n    return r[1];\n}\n\n// z-dipole electronic\ndouble zdipole(const coordT& r) {\n    return r[2];\n}\n\ndouble bond_length(const coordT& r) {\n    return R0 + r[3]/sqrtmu;\n}\n\n// Strength of the laser field at time t\ndouble laser(double t) {\n    double omegat = param.omega*t;\n\n    if (omegat < 0.0 || omegat/(2*param.ncycle) > constants::pi) return 0.0;\n\n    double envelope = sin(omegat/(2*param.ncycle));\n    envelope *= envelope;\n    return param.F*envelope*sin(omegat);\n}\n\ndouble myreal(double t) {return t;}\n\ndouble myreal(const double_complex& t) {return real(t);}\n\n// Given psi and V evaluate the energy ... leaves psi compressed, potn reconstructed\ntemplate <typename T>\ndouble energy(World& world, const Function<T,4>& psi, const functionT& pote, const functionT& potn, const functionT& potf) {\n    // First do all work in the scaling function basis\n    //bool DOFENCE = false;\n    bool DOFENCE = true;\n    psi.reconstruct();\n    Derivative<T,4> Dx(world,0), Dy(world,1), Dz(world,2), Ds(world,3);\n    Function<T,4> dx = Dx(psi,DOFENCE);\n    Function<T,4> dy = Dy(psi,DOFENCE);\n    Function<T,4> dz = Dz(psi,DOFENCE);\n    Function<T,4> ds = Ds(psi,DOFENCE);\n    Function<T,4> Vepsi = psi*pote;\n    Function<T,4> Vnpsi = psi*potn;\n    Function<T,4> Vfpsi = psi*potf;\n\n    // Now do all work in the wavelet basis\n    psi.compress(DOFENCE);\n    Vepsi.compress(DOFENCE);\n    Vnpsi.compress(DOFENCE);\n    Vfpsi.compress(DOFENCE);\n    dx.compress(DOFENCE);\n    dy.compress(DOFENCE);\n    dz.compress(DOFENCE);\n    ds.compress(true);\n    double S = real(psi.inner(psi));\n    double PEe = real(psi.inner(Vepsi))/S;\n    double PEn = real(psi.inner(Vnpsi))/S;\n    double PEf = real(psi.inner(Vfpsi))/S;\n    double KEe = real(0.5*(inner(dx,dx) + inner(dy,dy) + inner(dz,dz)))/S;\n    double KEn = real(0.5*inner(ds,ds))/S;\n    double E = (KEe + KEn + PEe + PEn + PEf);\n\n    dx.clear(); dy.clear(); dz.clear(); ds.clear(); Vepsi.clear(); Vepsi.clear(); Vfpsi.clear(); // To free memory on return\n    world.gop.fence();\n    if (world.rank() == 0) {\n        printf(\"energy=%.6f overlap=%.6f KEe=%.6f KEn=%.6f PEe=%.6f PEn=%.6f PEf=%.6f\\n\", E, S, KEe, KEn, PEe, PEn, PEf);\n     }\n\n    return myreal(E);\n}\n\ndouble fred(const coordT& r) {\n    static const double a = 0.1;\n    double rsq = r[0]*r[0]+r[1]*r[1]+r[2]*r[2]+r[3]*r[3];\n    return 10.0*exp(-a*rsq);\n}\n\ndouble delsqfred(const coordT& r) {\n    static const double a = 0.1;\n    double rsq = r[0]*r[0]+r[1]*r[1]+r[2]*r[2]+r[3]*r[3];\n    return (4.0*a*a*rsq - 4.0*2.0*a)*10.0*exp(-a*rsq);\n}\n\n\nvoid testbsh(World& world) {\n    double mu = 0.3;\n    functionT test = factoryT(world).f(fred); test.truncate();\n    functionT rhs = (mu*mu)*test - functionT(factoryT(world).f(delsqfred));\n    rhs.truncate();\n    operatorT op = BSHOperator<4>(world, mu, 1e-2, FunctionDefaults<4>::get_thresh());\n\n    functionT result = apply(op,rhs);\n\n    double err = (result - test).norm2();\n    print(\"ERR\", err);\n    result.reconstruct();\n    for (int i=-100; i<=100; i++) {\n        coordT r(i*0.01*5.0);\n        double ok = fred(r);\n        double bad = result(r);\n        print(r[0], ok, bad, ok-bad, ok?bad/ok:0.0);\n    }\n}\n\nvoid converge(World& world, functionT& potn, functionT& pote, functionT& pot, functionT& psi, double& eps) {\n    functionT zero = factoryT(world);\n    for (int iter=0; iter<205; iter++) {\n        if (world.rank() == 0) print(\"beginning iter\", iter, wall_time());\n\n        functionT Vpsi = pot*psi;// - 0.5*psi; // TRY SHIFTING POTENTIAL AND ENERGY DOWN\n        //eps -= 0.5;\n\n        operatorT op = BSHOperator<4>(world, sqrt(-2*eps), param.cut, param.thresh);\n        if (world.rank() == 0) print(\"made V*psi\", wall_time());\n        Vpsi.scale(-2.0).truncate();\n        if (world.rank() == 0) print(\"tryuncated V*psi\", wall_time());\n        functionT tmp = apply(op,Vpsi).truncate(param.thresh);\n        if (world.rank() == 0) print(\"applied operator\", wall_time());\n        double norm = tmp.norm2();\n        functionT r = tmp-psi;\n        double rnorm = r.norm2();\n        double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n        if (world.rank() == 0) {\n            print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n        }\n\n        tmp.scale(1.0/norm);\n\n        double d = 0.3;\n        psi = tmp*d + psi*(1.0-d);\n\n        psi.scale(1.0/psi.norm2());\n\n        eps = eps_new;\n        energy(world, psi, pote, potn, zero);\n\n        if (rnorm < std::max(1e-5,param.thresh)) break;\n    }\n}\n\ncomplex_functionT APPLY(const complex_operatorT* Ge, const complex_operatorT* Gn, const complex_functionT& psi) {\n    complex_functionT r = psi;  // Shallow copy violates constness !!!!!!!!!!!!!!!!!\n\n    r.reconstruct();\n    r.broaden();\n    r.broaden();\n    r.broaden();\n    r.broaden();\n\n    r = apply_1d_realspace_push(*Gn, r, 3); r.sum_down();\n    r = apply_1d_realspace_push(*Ge, r, 2); r.sum_down();\n    r = apply_1d_realspace_push(*Ge, r, 1); r.sum_down();\n    r = apply_1d_realspace_push(*Ge, r, 0); r.sum_down();\n\n    return r;\n}\n\ncomplex_functionT trotter(World& world,\n                          const complex_functionT& expV,\n                          const complex_operatorT* Ge,\n                          const complex_operatorT* Gn,\n                          const complex_functionT& psi0) {\n    //    psi(t) = exp(-i*T*t/2) exp(-i*V(t/2)*t) exp(-i*T*t/2) psi(0)\n\n    complex_functionT psi1;\n\n    unsigned long size = psi0.size();\n    if (world.rank() == 0) print(\"APPLYING G\", size);\n    psi1 = APPLY(Ge,Gn,psi0);  psi1.truncate();  size = psi1.size();\n    if (world.rank() == 0) print(\"APPLYING expV\", size);\n    psi1 = expV*psi1;      psi1.truncate();  size = psi1.size();\n\n    pmapT oldpmap = FunctionDefaults<4>::get_pmap();\n    LoadBalanceDeux<4> lb(world);\n    lb.add_tree(psi1, lbcost<double_complex,4>(1.0,1.0));\n    FunctionDefaults<4>::set_pmap(lb.load_balance());\n    psi1 = copy(psi1, FunctionDefaults<4>::get_pmap(), true);\n\n    if (world.rank() == 0) print(\"APPLYING G again\", size);\n    psi1 = APPLY(Ge,Gn,psi1);  psi1.truncate(param.thresh);  size = psi1.size();\n    if (world.rank() == 0) print(\"DONE\", size);\n\n    FunctionDefaults<4>::set_pmap(oldpmap);\n    psi1 = copy(psi1, oldpmap, true);\n\n    return psi1;\n}\n\ntemplate<typename T, int NDIM>\nstruct unaryexp {};\n\n\ntemplate<int NDIM>\nstruct unaryexp<double_complex,NDIM> {\n    void operator()(const Key<NDIM>& key, Tensor<double_complex>& t) const {\n        //vzExp(t.size, t.ptr(), t.ptr());\n        UNARY_OPTIMIZED_ITERATOR(double_complex, t, *_p0 = exp(*_p0););\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\n\n// Returns exp(-I*t*V)\ncomplex_functionT make_exp(double t, const functionT& v) {\n    v.reconstruct();\n    complex_functionT expV = double_complex(0.0,-t)*v;\n    expV.unaryop(unaryexp<double_complex,4>());\n    return expV;\n}\n\nvoid print_stats_header(World& world) {\n    if (world.rank() == 0) {\n        printf(\"  step       time            field           energy            norm           overlap0         x-dipole         y-dipole         z-dipole           <R>         wall-time(s)\\n\");\n        printf(\"------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ---------------- ------------\\n\");\n    }\n}\n\nvoid print_stats(World& world, int step, double t, const functionT& pote,  const functionT& potn, const functionT& potf,\n                 const functionT& x, const functionT& y, const functionT& z, const functionT& R,\n                 const complex_functionT& psi0, const complex_functionT& psi) {\n    double start = wall_time();\n    double norm = psi.norm2();\n    double current_energy = energy(world, psi, pote, potn, potf);\n    double xdip = real(inner(psi, x*psi))/(norm*norm);\n    double ydip = real(inner(psi, y*psi))/(norm*norm);\n    double zdip = real(inner(psi, z*psi))/(norm*norm);\n    double Ravg = real(inner(psi, R*psi))/(norm*norm);\n    double overlap0 = std::abs(psi.inner(psi0))/norm;\n    if (world.rank() == 0) {\n        printf(\"%7d %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %16.8e %9.1f\\n\", step, t, laser(t), current_energy, norm, overlap0, xdip, ydip, zdip, Ravg, wall_time());\n        printf(\"printing used %.1f\\n\", wall_time() - start);\n    }\n}\n\nconst char* wave_function_filename(int step) {\n    static char fname[1024];\n    snprintf(fname,1024, \"%s-%5.5d\", param.prefix.c_str(), step);\n    return fname;\n}\n\nconst char* wave_function_small_plot_filename(int step) {\n    static char fname[1024];\n    snprintf(fname,1024, \"%s-%5.5dS.dx\", param.prefix.c_str(), step);\n    return fname;\n}\n\nconst char* wave_function_large_plot_filename(int step) {\n    static char fname[1024];\n    snprintf(fname,1024, \"%s-%5.5dL.dx\", param.prefix.c_str(), step);\n    return fname;\n}\n\ncomplex_functionT wave_function_load(World& world, int step) {\n    complex_functionT psi;\n    archive::ParallelInputArchive ar(world, wave_function_filename(step));\n    ar & psi;\n    return psi;\n}\n\nvoid wave_function_store(World& world, int step, const complex_functionT& psi) {\n    archive::ParallelOutputArchive ar(world, wave_function_filename(step), param.nio);\n    ar & psi;\n}\n\nbool wave_function_exists(World& world, int step) {\n    return archive::ParallelInputArchive<madness::archive::BinaryFstreamInputArchive>::exists(world, wave_function_filename(step));\n}\n\n\nvoid loadbal(World& world,\n             functionT& pote, functionT& potn, functionT& pot, functionT& vt,\n             complex_functionT& psi, complex_functionT& psi0,\n             functionT& x, functionT& y, functionT& z, functionT& R) {\n    if (world.size() < 2) return;\n    if (world.rank() == 0) print(\"starting LB\");\n    LoadBalanceDeux<4> lb(world);\n    lb.add_tree(vt, lbcost<double,4>(1.0,1.0));\n    lb.add_tree(psi, lbcost<double_complex,4>(10.0,5.0));\n    FunctionDefaults<4>::redistribute(world,lb.load_balance(2.0,false));\n    world.gop.fence();\n}\n\ntemplate <typename T>\nvoid initial_loadbal(World& world,\n                     functionT& pote, functionT& potn, functionT& pot,\n                     Function<T,4>& psi) {\n    if (world.size() < 2) return;\n    if (world.rank() == 0) print(\"starting initial LB\");\n    LoadBalanceDeux<4> lb(world);\n    lb.add_tree(pote, lbcost<double,4>(1.0,1.0));\n    lb.add_tree(potn, lbcost<double,4>(1.0,1.0));\n    lb.add_tree(psi, lbcost<T,4>(10.0,5.0));\n    FunctionDefaults<4>::redistribute(world,lb.load_balance(2.0,false));\n    world.gop.fence();\n}\n\n\n// Evolve the wave function in real time starting from given time step on disk\nvoid propagate(World& world, functionT& pote, functionT& potn, functionT& pot, int step0) {\n    double ctarget = 5.0/param.cut;\n    double c = 1.72*ctarget;   // This for 10^4 steps\n    double tcrit = 2*constants::pi/(c*c);\n\n    double time_step = tcrit * param.tScale;\n\n    zero_field_time = 20.0*time_step;\n\n    int nstep = int((param.target_time + zero_field_time)/time_step + 1);\n\n    // Ensure everyone has the same data\n    world.gop.broadcast(c);\n    world.gop.broadcast(time_step);\n    world.gop.broadcast(nstep);\n\n    // Free particle propagator\n    complex_operatorT* Ge = qm_1d_free_particle_propagator(param.k, c, 0.5*time_step, 2.0*param.L);\n    complex_operatorT* Gn = qm_1d_free_particle_propagator(param.k, c, 0.5*time_step,  s0+param.L);\n\n\n    // Dipole moment functions for laser field and for printing statistics\n    functionT x = factoryT(world).f(xdipole);\n    functionT y = factoryT(world).f(ydipole);\n    functionT z = factoryT(world).f(zdipole);\n    functionT R = factoryT(world).f(bond_length);\n\n    // Wave function at time t=0 for printing statistics\n    complex_functionT psi0 = wave_function_load(world, 0);\n    initial_loadbal(world, pote, potn, pot, psi0);\n\n    int step = step0;  // The current step\n    double t = step0 * time_step - zero_field_time;        // The current time\n    complex_functionT psi = wave_function_load(world, step); // The wave function at time t\n    functionT vt = pot+laser(t)*x; // The total potential at time t\n\n    if (world.rank() == 0) {\n        printf(\"\\n\");\n        printf(\"        Evolution parameters\\n\");\n        printf(\"       --------------------\\n\");\n        printf(\"     bandlimit = %.2f\\n\", ctarget);\n        printf(\" eff-bandlimit = %.2f\\n\", c);\n        printf(\"         tcrit = %.6f\\n\", tcrit);\n        printf(\"     time step = %.6f\\n\", time_step);\n        printf(\" no field time = %.6f\\n\", zero_field_time);\n        printf(\"   target time = %.2f\\n\", param.target_time);\n        printf(\"         nstep = %d\\n\", nstep);\n        printf(\"\\n\");\n        printf(\"  restart step = %d\\n\", step0);\n        printf(\"  restart time = %.6f\\n\", t);\n        printf(\"\\n\");\n    }\n\n    print_stats_header(world);\n    print_stats(world, step, t, pote, potn, laser(t)*x, x, y, z, R, psi0, psi0);\n    world.gop.fence();\n\n    psi.truncate();\n\n    while (step < nstep) {\n        if (step < 2 || (step%param.nloadbal) == 0)\n            loadbal(world, pote, potn, pot, vt, psi, psi0, x, y, z, R);\n\n        long depth = psi.max_depth(); long size=psi.size();\n        if (world.rank() == 0) print(\"depth size\", depth, size);\n\n        // Make the potential at time t + step/2\n        functionT vhalf = pot + laser(t+0.5*time_step)*x;\n\n        // Apply Trotter to advance from time t to time t+step\n        complex_functionT expV = make_exp(time_step, vhalf);\n        psi = trotter(world, expV, Ge, Gn, psi);\n\n        // Update counters, print info, dump/plot as necessary\n        step++;\n        t += time_step;\n        vt = pot+laser(t)*x;\n\n        if ((step%param.nprint)==0 || step==nstep)\n        print_stats(world, step, t, pote, potn, laser(t)*x, x, y, z, R, psi0, psi);\n\n        if ((step%param.ndump) == 0 || step==nstep) {\n            double start = wall_time();\n            wave_function_store(world, step, psi);\n            // Update the restart file for automatic restarting\n            if (world.rank() == 0) {\n                std::ofstream(\"restart4\") << step << std::endl;\n                print(\"dumping took\", wall_time()-start);\n            }\n            world.gop.fence();\n        }\n    }\n}\n\nvoid doit(World& world) {\n    std::cout.precision(8);\n\n    if (world.rank() == 0) param.read(\"input4\");\n    world.gop.broadcast_serializable(param, 0);\n\n    FunctionDefaults<4>::set_k(param.k);                        // Wavelet order\n    FunctionDefaults<4>::set_thresh(param.thresh*param.safety);       // Accuracy\n    FunctionDefaults<4>::set_initial_level(4);\n\n    real_tensor cell(4,2);\n    cell(0,0)=-param.L; cell(0,1)=param.L;\n    cell(1,0)=-param.L; cell(1,1)=param.L;\n    cell(2,0)=-param.L; cell(2,1)=param.L;\n    cell(3,0)=-s0;      cell(3,1)=param.L;\n    FunctionDefaults<4>::set_cell(cell);\n    //FunctionDefaults<4>::set_cubic_cell(-param.L,param.L);\n    FunctionDefaults<4>::set_apply_randomize(true);\n    FunctionDefaults<4>::set_autorefine(false);\n    FunctionDefaults<4>::set_truncate_mode(1);\n    FunctionDefaults<4>::set_truncate_on_project(true);\n    FunctionDefaults<4>::set_pmap(pmapT(new SimplePmap< Key<4> >(world)));\n\n    // Read restart information\n    int step0;               // Initial time step ... filenames are <prefix>-<step0>\n    if (world.rank() == 0) std::ifstream(\"restart4\") >> step0;\n    world.gop.broadcast(step0);\n\n    bool exists = wave_function_exists(world, step0);\n\n    if (world.rank() == 0) {\n        print(\"EXISTS\",exists,\"STEP0\",step0);\n        std::ofstream out(\"plot.dat\");\n        for (int i=-100; i<=100; i++) {\n            double x = i*0.01*param.L;\n            coordT rn(0.0), re(0.0);\n            rn[3]=x;\n            re[2]=x;\n            double vn = Vn(rn);\n            double ve = Ve(re);\n            double pn = guess(rn);\n            double pe = guess(re);\n            out << x << \" \" << vn << \" \" << ve << \" \" << pn << \" \" << pe << std::endl;\n        }\n        out.close();\n    }\n\n    // Make the potential\n    if (world.rank() == 0) print(\"COMPRESSING Vn\",wall_time());\n    functionT potn = factoryT(world).f(Vn);  potn.truncate();\n    if (world.rank() == 0) print(\"COMPRESSING Ve\",wall_time());\n    functionT pote = factoryT(world).f(Ve);  pote.truncate();\n    functionT pot = potn + pote;\n\n    //LoadBalanceDeux<4> lb(world);\n    //lb.add_tree(pot, lbcost<double,4>());\n    //FunctionDefaults<4>::redistribute(world,lb.load_balance(2.0,false));\n    //world.gop.fence();\n\n    if (!exists) {\n        if (step0 == 0) {\n            if (world.rank() == 0) print(\"Computing initial ground state wavefunction\", wall_time());\n            functionT psi = factoryT(world).f(guess);\n            double norm0 = psi.norm2();\n            psi.scale(1.0/norm0);\n            psi.truncate();\n            if (world.rank() == 0) print(\"computed norm\", norm0, \"at\", wall_time());\n            norm0 = psi.norm2();\n            psi.scale(1.0/norm0);\n\n            initial_loadbal(world, pote, potn, pot, psi);\n\n            double eps = energy(world, psi, pote, potn, functionT(factoryT(world)));\n            if (world.rank() == 0) print(\"guess energy\", eps, wall_time());\n            converge(world, potn, pote, pot, psi, eps);\n\n            psi.truncate(param.thresh);\n\n            complex_functionT psic = double_complex(1.0,0.0)*psi;\n            wave_function_store(world, 0, psic);\n        }\n        else {\n            if (world.rank() == 0) {\n                print(\"The requested restart was not found ---\", step0);\n                error(\"restart failed\", 0);\n            }\n            world.gop.fence();\n        }\n    }\n\n    propagate(world, pote, potn, pot, step0);\n}\n\nint main(int argc, char** argv) {\n    initialize(argc,argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n\n    try {\n        doit(world);\n    } catch (const SafeMPI::Exception& e) {\n        print(e); std::cout.flush();\n        error(\"caught an MPI exception\");\n    } catch (const madness::MadnessException& e) {\n        print(e); std::cout.flush();\n        error(\"caught a MADNESS exception\");\n    } catch (const madness::TensorException& e) {\n        print(e); std::cout.flush();\n        error(\"caught a Tensor exception\");\n    } catch (const char* s) {\n        print(s); std::cout.flush();\n        error(\"caught a c-string exception\");\n    } catch (const std::string& s) {\n        print(s); std::cout.flush();\n        error(\"caught a string (class) exception\");\n    } catch (const std::exception& e) {\n        print(e.what()); std::cout.flush();\n        error(\"caught an STL exception\");\n    } catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n\n    world.gop.fence();\n\n    print_stats(world);\n    finalize();\n    return 0;\n}\n\n\n"
  },
  {
    "path": "src/apps/zcis/CMakeLists.txt",
    "content": "# src/apps/moldft\n\nadd_mad_executable(zcis zcis.cc \"MADchem\")\nadd_dependencies(applications-madness zcis)\n\n\ninstall(TARGETS zcis DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/zcis/zcis.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n  \\file examples/znemo.cc\n  \\brief solve the HF equations using numerical exponential MOs\n\n  The source is\n  <a href=http://code.google.com/p/m-a-d-n-e-s-s/source/browse/local\n  /trunk/src/apps/examples/nemo.cc>here</a>.\n\n*/\n\n#include <madness/chem/zcis.h>\n\nusing namespace madness;\n\n\nint main(int argc, char** argv) {\n\n    World& world=initialize(argc, argv,false);\n    if (world.rank() == 0) {\n        print_header1(\" ZCIS -- excited states in the CIS approximation using complex orbitals\");\n    }\n\n    startup(world,argc,argv,true);\n    std::cout.precision(6);\n    if (world.rank()==0) print(info::print_revision_information());\n\n\n    commandlineparser parser(argc,argv);\n    if (parser.key_exists(\"help\")) {\n        Zcis::help();\n\n    } else if (parser.key_exists(\"print_parameters\")) {\n        Zcis::print_parameters();\n\n    } else {\n\n        try {\n            std::shared_ptr<Znemo> znemo(new Znemo(world, parser));\n            znemo->value();\n            Zcis zcis(world, parser, znemo);\n            zcis.value();\n        } catch (const SafeMPI::Exception& e) {\n            print(e);\n            error(\"caught an MPI exception\");\n        } catch (const madness::MadnessException& e) {\n            print(e);\n            error(\"caught a MADNESS exception\");\n        } catch (const madness::TensorException& e) {\n            print(e);\n            error(\"caught a Tensor exception\");\n        } catch (const char *s) {\n            print(s);\n            error(\"caught a string exception\");\n        } catch (const std::string& s) {\n            print(s);\n            error(\"caught a string (class) exception\");\n        } catch (const std::exception& e) {\n            print(e.what());\n            error(\"caught an STL exception\");\n        } catch (...) {\n            error(\"caught unhandled exception\");\n        }\n    }\n\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/apps/znemo/CMakeLists.txt",
    "content": "# src/apps/moldft\n\nadd_mad_executable(znemo znemo.cc \"MADchem\")\nadd_dependencies(applications-madness znemo)\n\nif(BUILD_TESTING)\n  if (NOT ENABLE_GENTENSOR)\n    add_scripted_tests(test_energy.py znemo \"medium;applications\")\n  endif()\nendif()\n\n\ninstall(TARGETS znemo DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\n"
  },
  {
    "path": "src/apps/znemo/madtest1.calc_info.ref.json",
    "content": "{\n    \"B\": [\n        0.0,\n        0.0,\n        -1.0\n    ],\n    \"driver\": \"energy\",\n    \"model\": \"UHF\",\n    \"return_energy\": -2.6727709985264108,\n    \"scf_eigenvalues_a\": {\n        \"dims\": [\n            1\n        ],\n        \"size\": 1,\n        \"vals\": [\n            -1.1967516543545087\n        ]\n    },\n    \"scf_eigenvalues_b\": {\n        \"dims\": [\n            1\n        ],\n        \"size\": 1,\n        \"vals\": [\n            -0.14163878297274543\n        ]\n    },\n    \"time\": \"2023-01-21 23:49:19\",\n    \"wall_time\": 14.747344970703125\n}"
  },
  {
    "path": "src/apps/znemo/test_energy.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport subprocess\nimport argparse\n\nsys.path.append(\"@CMAKE_SOURCE_DIR@/bin\")\nfrom test_utilities import madjsoncompare\n\nif __name__ == \"__main__\":\n\n    # get command line arguments\n    parser=argparse.ArgumentParser(description='command line arguments for this test case')\n    # default value will be set by cmake\n    parser.add_argument(\"--reference_directory\",action=\"store\",default=\"@SRCDIR@\",help=\"the directory with the reference file in json format\")\n    args=parser.parse_args()\n\n    # some user output\n    print(\"Testing @BINARY@/@TESTCASE@\")\n    print(\" reference files found in directory:\",args.reference_directory)\n\n    prefix='madtest1'\n    outputfile=prefix+'.calc_info.json'\n    referencefile=args.reference_directory+\"/\"+prefix+\".calc_info.ref.json\"\n\n    # run test\n    global_arguments=' --geometry=he'\n    dft_arguments=' --dft=\"maxiter=1; econv=1.e-4; dconv=1.e-3; prefix='+prefix+'\"'\n    other_arguments=' --complex=\"physical_B=-1.0\" --geometry=\"no_orient=true; source_name=he\"'\n    cmd='rm '+outputfile+' reference.00000 restartaodata; ./@BINARY@ '+global_arguments + dft_arguments  + other_arguments\n    print(\"executing \\n \",cmd)\n#    output=subprocess.run(cmd,shell=True,capture_output=True, text=True).stdout\n    p=subprocess.run(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE , universal_newlines=True)\n    print(\"finished with run\")\n\n    # compare results\n    cmp=madjsoncompare(outputfile,referencefile)\n    cmp.compare([\"driver\"],1.e-4)\n    cmp.compare([\"model\"],1.e-4)\n    cmp.compare([\"return_energy\"],1.e-2)\n    print(\"final success: \",cmp.success)\n\n    sys.exit(cmp.exitcode())"
  },
  {
    "path": "src/apps/znemo/znemo.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n  \\file examples/znemo.cc\n  \\brief solve the HF equations using numerical exponential MOs\n\n  The source is\n  <a href=http://code.google.com/p/m-a-d-n-e-s-s/source/browse/local\n  /trunk/src/apps/examples/nemo.cc>here</a>.\n\n*/\n\n#if !defined USE_GENTENSOR\n\n#include <madness/chem/znemo.h>\nusing namespace madness;\n\nint main(int argc, char** argv) {\n\n    World& world=initialize(argc, argv,false);\n    if (world.rank() == 0) {\n        print_header1(\" ZNEMO -- complex Hartree-Fock using numerical exponential molecular orbitals\");\n        printf(\"starting at time %.1f\\n\", wall_time());\n    }\n\n    startup(world,argc,argv,true);\n    std::cout.precision(6);\n    if (world.rank()==0) print(info::print_revision_information());\n\n\n    commandlineparser parser(argc,argv);\n    parser.set_keyval(\"no_orient\",\"true\");  // needs to be passed to molecule *before* construction\n    if (parser.key_exists(\"help\")) {\n        Znemo::help();\n\n    } else if (parser.key_exists(\"print_parameters\")) {\n        Znemo::print_parameters();\n\n    } else {\n\n        try {\n\n            bool analyze_only=parser.key_exists(\"analyze\");\n\n            std::shared_ptr<Znemo> znemo(new Znemo(world,parser));\n\n            // optimize the geometry if requested\n            if (znemo->get_calc_param().gopt()) {\n                print_header2(\"Geometry Optimization\");\n\n                Tensor<double> geomcoord = znemo->molecule().get_all_coords().flat();\n                MolecularOptimizer geom(world,parser,znemo);\n                geom.parameters.set_derived_value<std::vector<std::string> >(\"remove_dof\",{});\n                geom.parameters.print(\"geometry optimization parameters\",\"end\");\n                geom.optimize(geomcoord);\n            } else {\n\n                // compute the energy to get converged orbitals\n                double energy=0.0;\n                if (not analyze_only) {\n                    energy=znemo->value();\n                } else {\n                    auto zmos=znemo->read_reference();\n                    for (int i=0; i<znemo->get_calc_param().nalpha(); ++i) znemo->amo.push_back(zmos.first.get_mos()[i]);\n                    for (int i=0; i<znemo->get_calc_param().nbeta(); ++i) znemo->bmo.push_back(zmos.second.get_mos()[i]);\n                    energy=znemo->analyze();\n                }\n\n                if (world.rank()==0) {\n                    printf(\"final energy   %12.8f\\n\", energy);\n                    printf(\"finished at time %.1f\\n\", wall_time());\n                }\n            }\n\n        } catch (const SafeMPI::Exception& e) {\n            print(e);\n            error(\"caught an MPI exception\");\n        } catch (const madness::MadnessException& e) {\n            print(e);\n            error(\"caught a MADNESS exception\");\n        } catch (const madness::TensorException& e) {\n            print(e);\n            error(\"caught a Tensor exception\");\n        } catch (const char* s) {\n            print(s);\n            error(\"caught a string exception\");\n        } catch (const std::string& s) {\n            print(s);\n            error(\"caught a string (class) exception\");\n        } catch (const std::exception& e) {\n            print(e.what());\n            error(\"caught an STL exception\");\n        } catch (...) {\n            error(\"caught unhandled exception\");\n        }\n    }\n\n    finalize();\n    return 0;\n}\n#else\n\n#include <iostream>\nint main() {\n    std::cout << \"U need to configure with -D ENABLE_GENTENSOR=0 to enable znemo\\n\";\n    return 0;\n}\n\n#endif\n"
  },
  {
    "path": "src/examples/3dharmonic.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n  \\file examples/3dharmonic.cc\n  \\brief Solves for the ground state of the quantum 3d harmonic oscillator\n  \\defgroup example3dharm Solves the 3D harmonic oscillator\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/3dharmonic.cc>here</a>.\n\n  \\par Points of interest\n  - convolution with the Green's function\n  - need to adjust the zero of energy to use the bound-state Green's function\n  - failure of simple fixed-point iteration\n  - use of simple non-linear equation solver\n  - plotting 3D function along a line\n\n  \\par Background\n\n  We seek the ground state of the 3D Schrodinger equation\n  \\f[\n  \\left( -\\frac{1}{2} \\nabla^2 + V(r) \\right) \\psi(r) = E \\psi(r)\n  \\f]\n  with\n  \\f[\n  V(r) = \\frac{1}{2} |r|^2\n  \\f]\n  As usual, we rewrite the differential equation into integral form\n  \\f[\n  \\psi(r) = \\left( -\\frac{1}{2} \\nabla^2 - E \\right)^{-1} V(r) \\psi(r)\n  \\f]\n  but unfortunately we are left with two problems.\n\n  First, recall that application\n  of the inverse of the differential operator corresponds to convolution\n  with the Green's function to the Helmholtz equation that satisfies\n  \\f[\n  \\left(-\\nabla^2 + \\mu^2 \\right) G(r,r'; \\mu) = \\delta(r-r')\n  \\f]\n  In 3D, we have\n  \\f[\n  G(r,r'; \\mu) = \\frac{e^{-\\mu |r-r'|}}{4 \\pi |r-r|}\n  \\f]\n  that MADNESS can currently only apply efficiently for real \\f$\\mu\\f$ and since\n  \\f$\\mu = \\sqrt{-2 E}\\f$ only for negative energies (hence bound\n  states).  But for the harmonic oscillator there are no free particle\n  states and the zero of energy is not chosen to describe the lowest\n  energy of a free particle but simply as the zero of potential\n  energy.  To solve this problem we can shift the zero of energy down\n  by subtracting a constant (\\f$\\Delta\\f$) from both sides of the\n  equation, hence making the effective ground state energy negative.\n  \\f[\n  \\psi(r) = \\left( -\\frac{1}{2} \\nabla^2 - E + \\Delta \\right)^{-1} \\left( V(r) -\\Delta\\right)  \\psi(r)\n  \\f]\n\n  How negative do we need to make the energy?  To answer this we need\n  to discuss the second problem.  The fixed-point iteration described\n  by the integral equation only reliably converges to the ground state\n  if the potential is negative everywhere the wave function is\n  significant.  The exact solution is\n  \\f$\\psi(r)=\\pi^{-1/4}\\exp(-r^2 / 2)\\f$ (with $E=$1.5) that\n  becomes 1e-6 (but how small is small enough?) at \\f$r=5.3\\f$ where\n  \\f$V\\f$ is 14.0. So let's take this as the value of \\f$\\Delta\\f$ and\n  try the fixed point iteration.  Bad news.  It starts converging\n  (slowly) to the right answer but then diverges and even damping\n  (step restriction) does not solve the problem.  We have to make the\n  shift large enough to make the potential negative in the entire\n  volume to avoid the divergence, but this makes the convergence\n  really slow.\n\n  The fix is to not rely upon the simple fixed point iteration but to\n  use an equation solver to force convergence.  This also enables us\n  to choose the size of the shift to optimize the rate of convergence\n  (empirically \\f$\\Delta=7\\f$ is best) rather than being forced to\n  pick a large value.  We use the very easy to use solver in\n  mra/nonlinsol.h .\n\n  [Aside.  It is possible to apply the operator for positive energies,\n  but efficient application requires separate treatment of the\n  singular and the long-range oscillatory terms, and the latter is\n  presently not a production capability of MADNESS.  If you need this,\n  let us know.]\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/mra/funcplot.h>\n#include <madness/mra/nonlinsol.h>\n\nusing namespace madness;\n\nconst double L = 7.0;\n//const double DELTA = 3*L*L/2; // Use this to make fixed-point iteration converge\nconst double DELTA = 7.0;\n\n// The initial guess wave function\ndouble guess(const coord_3d& r) {\n  return exp(-(r[0]*r[0]+r[1]*r[1]+r[2]*r[2])/3.0);\n}\n\n// The shifted potential\ndouble potential(const coord_3d& r) {\n  return 0.5*(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]) - DELTA;\n}\n\n// Convenience routine for plotting\nvoid plot(const char* filename, const real_function_3d& f) {\n  coord_3d lo(0.0), hi(0.0);\n  lo[2] = -L; hi[2] = L;\n  plot_line(filename,401,lo,hi,f);\n}\n\ndouble energy(World& world, const real_function_3d& phi, const real_function_3d& V) {\n  double potential_energy = inner(phi,V*phi); // <phi|Vphi> = <phi|V|phi>\n  double kinetic_energy = 0.0;\n  for (int axis=0; axis<3; axis++) {\n    real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n    real_function_3d dphi = D(phi);\n    kinetic_energy += 0.5*inner(dphi,dphi);  // (1/2) <dphi/dx | dphi/dx>\n  }\n  double energy = kinetic_energy + potential_energy;\n  //print(\"kinetic\",kinetic_energy,\"potential\", potential_energy, \"total\", energy);\n  return energy;\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    if (world.rank() == 0) printf(\"starting at time %.1f\\n\", wall_time());\n\n    const double thresh = 1e-5;\n    FunctionDefaults<3>::set_k(6);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_cubic_cell(-L,L);\n\n    real_function_3d phi = real_factory_3d(world).f(guess);\n    real_function_3d V = real_factory_3d(world).f(potential);\n    plot(\"potential.dat\", V);\n\n    phi.scale(1.0/phi.norm2());  // phi *= 1.0/norm\n\n    double E = energy(world,phi,V);\n\n    NonlinearSolver solver;\n\n    for (int iter=0; iter<100; iter++) {\n      char filename[256];\n      snprintf(filename, 256, \"phi-%3.3d.dat\", iter);\n      plot(filename,phi);\n\n      real_function_3d Vphi = V*phi;\n      Vphi.truncate();\n      real_convolution_3d op = BSHOperator3D(world, sqrt(-2*E), 0.01, thresh);\n\n      real_function_3d r = phi + 2.0 * op(Vphi); // the residual\n      double err = r.norm2();\n\n      phi = solver.update(phi, r);\n      //phi = phi-r;  // Replace the above line with this to use fixed-point iteration\n\n      double norm = phi.norm2();\n      phi.scale(1.0/norm);  // phi *= 1.0/norm\n      E = energy(world,phi,V);\n\n      if (world.rank() == 0)\n          print(\"iteration\", iter, \"energy\", E, \"norm\", norm, \"error\",err);\n\n      if (err < 5e-4) break;\n    }\n\n    print(\"Final energy without shift\", E+DELTA);\n\n    if (world.rank() == 0) printf(\"finished at time %.1f\\n\", wall_time());\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/CMakeLists.txt",
    "content": "# src/examples\n\n\nadd_subdirectory(writecoeffs)\n\nset(EXAMPLE_SOURCES\n    madinfo h2dft hedft hello hatom_energy h2 he tdse_example heat heat2 csqrt hatom hatom_sf_dirac\n    sdf_shape_tester test_gmres tdse1d vnucso nonlinschro sininteg functionio \n    dataloadbal hatom_1d binaryop dielectric hehf 3dharmonic\n    testspectralprop dielectric_external_field tiny h2dynamic newsolver testcomplexfunctionsolver\n    helium_exact density_smoothing siam_example ac_corr dirac-hatom\n    derivatives array_worldobject pcr)\n \nif(LIBXC_FOUND)\n  list(APPEND EXAMPLE_SOURCES hefxc)\nendif()\n\n# Create executables for example applications\nforeach(example ${EXAMPLE_SOURCES})\n  add_mad_executable(${example} ${example}.cc \"MADchem\")\n  add_dependencies(numerical-examples-madness ${example})\nendforeach()\n\nif(NOT (MADNESS_BUILD_MADWORLD_ONLY OR MADNESS_BUILD_LIBRARIES_ONLY) AND LAPACK_FOUND)\n\tadd_subdirectory(periodic)\nendif()\n\n"
  },
  {
    "path": "src/examples/RUNALL",
    "content": "PROGS=\"hello hatom_energy h2 he heat heat2 csqrt sdf_shape_tester test_gmres nonlinschro sininteg functionio laplace_sphere testpot\"\n\nfor prog in $PROGS\ndo\n  echo \"\"\n  echo \"Running $prog\"\n  echo \"\"\n  time ./$prog\ndone\n\necho \"\"\necho \"Running interior_dirichlet 0.2 0\"\necho \"\"\n./interior_dirichlet 0.2 0\n\necho \"\"\necho dataloadbal requires circa 50 processors to illustrate loadbalancing\necho vnucso is a little too big for most machines\necho tdse and tdse1d are long and boring unless you are really interested in them\necho \"\"\n\n"
  },
  {
    "path": "src/examples/ac_corr.cc",
    "content": "/*\n * ac_corr.cpp\n *\n *  Created on: Nov 17, 2016\n *      Author: msahre\n */\n\n#include <madness/world/MADworld.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/funcplot.h>\n#include <exception>\n#include <iterator>\n#include <list>\n//#include<madness/chem/molecule.h>\n#include <madness/misc/info.h>\n#include<madness/chem/AC.h>\n\n\n\nusing namespace madness;\n\n/// Asymptotic correction for DFT. In the correction the xc-potential is replaced by an 1/r term far away from the nuclei\n/// to give the correct asymptotic behavior. Close to the nuclei the standard xc-potential is used. The transition between\n/// the different potentials is achieved via a linear interpolation.\n/// This is a test code to compute the corrected potential in 1D or 2D.\n/// The density functional is computed using the slater potential. The orbitals have to be inserted manually in the xc_functor\n/// class in the density() function.\n/// The molecule/atom has to be initialized manually in the main function and has to be stored as a vector of atom_information.\n\n\n/// Functor for the exchange correlation potential\ntemplate<unsigned long int NDIM>\nclass xc_functor : public FunctionFunctorInterface<double,NDIM>{\n\npublic:\n\txc_functor(){}\n\txc_functor(std::vector<atom_information<NDIM> > atoms): atoms(atoms){}\n\n\t/// returns the slater potential\n\tdouble operator ()(const Vector<double, NDIM> &r)const{\n\t\treturn xc_potential(r);\n\t}\n\nprivate:\n\t/// computes distance between coordinate of electron and coordinate of nucleus\n\tdouble get_distance(Vector<double,NDIM> elec, Vector<double,NDIM> nuc) const{\n\t\tdouble distance = 0.0;\n\t\tfor(unsigned i = 0; i < NDIM; i++){\n\t\t\tdistance += (elec[i]-nuc[i])*(elec[i]-nuc[i]);\n\t\t}\n\t\tdistance = sqrt(distance);\n\n\t\treturn distance;\n\t}\n\n\t/// forms the density\n\tdouble density (const Vector<double, NDIM> &r) const{\n            //double dist = get_distance(r, atoms[0].coord)*get_distance(r, atoms[0].coord);\n\n\t\t//double sto2g_h = 0.430128498*exp(-1.309756377*get_distance(r, atoms[0].coord)*get_distance(r, atoms[0].coord))+ 0.678913531*exp(-0.233135974*get_distance(r, atoms[0].coord)*get_distance(r, atoms[0].coord));\n\t\t//double density = sto2g_h*sto2g_h;\n\t\t//double density = sto2g_h*sto2g_h;\n\t\tdouble sto2g_he = 0.4301280*exp(-2.4328790*get_distance(r, atoms[0].coord)*get_distance(r, atoms[0].coord))+ 0.6789140*exp(-0.4330510*get_distance(r, atoms[0].coord)*get_distance(r, atoms[0].coord));\n\t\tdouble density = 1.0*sto2g_he*sto2g_he;\n\t\t//double be_1s = 0.4301280*exp(-11.5356690*dist)+ 0.6789140*exp(-2.0533430*dist);\n\t\t//double be_2s = 0.0494720*exp(-0.5081630*dist)+ 0.9637820s*exp(-0.1288840*dist);\n\n\t\treturn 2.0*density;\n\t}\n\n\t/// equation for the slater potential\n\tdouble xc_potential(const Vector<double, NDIM> &r) const{\n\t\treturn -pow((3.0/M_PI)*density(r), (1.0/3.0));\n\t}\n\n\t/// Needed information about the molecule to apply asymtotic correction\n\tstd::vector<atom_information<NDIM> > atoms;\n\n};\n\n\n\nint main(int argc, char** argv){\n\n\tconst long k = 7;\n\tconst double thresh = 1.e-5;\n\tconst double L = 50.0;\n\n\t/// interval limits for interpolation region\n    double lim1 = 3.0;\n    double lim2 = 4.0;\n\n    madness::initialize(argc,argv);\n    madness::World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    madness::print(\"Hello from processor\",world.rank());\n\n    ///////////////////////////////////////////////////////////////////\n    //\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //\n    //                      Test for 1D functionals\t\t\t\t\t //\n    //\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //\n    ///////////////////////////////////////////////////////////////////\n\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<1>::set_cubic_cell(-L,L);\n    FunctionDefaults<1>::set_truncate_mode(3);\n\n    /// Coordinates of atoms\n\t// atom 1\n    Vector<double, 1> coord1;\n\tcoord1=0.0;\n//\t// atom 2\n//\tVector<double, 1> coord2;\n//\tcoord2=1.0;\n//\t//atom 3\n//\tVector<double, 1> coord3;\n//\tcoord3=2.0;\n\n\t/// Vector for the atom information for all atoms of the molecule\n\tstd::vector<atom_information<1> > atomvec;\n\n\t/// atom information atom 1\n\tatom_information<1> atom1;\n\tatom1.coord = coord1;\n\tatom1.charge = 2;\n\tatom1.R1 = slater_radius(atom1.charge)*lim1;\n\tatom1.R2 = slater_radius(atom1.charge)*lim2;\n\n//\t/// atom information atom 2\n//\tatom_information<1> atom2;\n//\tatom2.coord = coord2;\n//\tatom2.charge = 2;\n//\tatom2.R1 = slater_radius(atom2.charge)*lim1;\n//\tatom2.R2 = slater_radius(atom2.charge)*lim2;\n\n//\t/// atom information atom 3\n//\tatom_information<1> atom3;\n//\tatom3.coord = coord3;\n//\tatom3.charge = 2;\n//\tatom3.R1 = slater_radius(atom3.charge)*lim1;\n//\tatom3.R2 = slater_radius(atom3.charge)*lim2;\n\n\t/// put atoms in atom_information vector\n\tatomvec.push_back(atom1);\n\t//atomvec.push_back(atom2);\n\t//atomvec.push_back(atom3);\n\n\t/// Create ACParameters object (necessary to use AC class)\n\tACParameters<1> param;\n\tparam.atoms_ = atomvec;\n\tparam.R1_ = lim1;\n\tparam.R2_ = lim2;\n\tparam.dft_coefficient_ = 1.0;\n\tparam.e_ion_ = 0.0;\n\tparam.eh_ = 0.0;\n\tparam.interpolation_scheme_ = \"linear\";\n\tparam.num_elec_ = 2.0;\n\tparam.use_mult_ = true;\n\n\t/// create an object of the AC class to calculate the correction\n\tAC<1> ac(param);\n\n\t/// make xc_potential 1D\n\t/// WARNING: You have to change the code of the density function in the XC functor class to get the right density for your molecule\n\tstd::cout << \"Computing density...\\n\";\n\tstd::shared_ptr<FunctionFunctorInterface<double, 1> > xc_ptr(new xc_functor<1>(atomvec));\n\treal_function_1d xc_pot = real_factory_1d(world).functor(xc_ptr);\n\treal_function_1d xc_ref = real_factory_1d(world).functor(xc_ptr);\n\tplot_plane(world, xc_pot, \"test_xc_potential\");\n\n\t/// apply correction\n\txc_pot = ac.apply(xc_pot);\n\tstd::cout << \"Plotting corrected potential...\\n\";\n\tplot_plane(world, xc_pot, \"test_total\");\n\n\t/// difference between corrected and uncorrected standard potential\n\treal_function_1d int_total = xc_pot - xc_ref;\n\tplot_plane(world, int_total, \"test_diff\");\n\n\n    ///////////////////////////////////////////////////////////////////\n    //\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //\n    //                      Test for 2D functionals\t\t\t\t\t //\n    //\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //\n    ///////////////////////////////////////////////////////////////////\n//    FunctionDefaults<2>::set_k(k);\n//    FunctionDefaults<2>::set_thresh(thresh);\n//    FunctionDefaults<2>::set_cubic_cell(-L,L);\n//    FunctionDefaults<2>::set_truncate_mode(3);\n\n    madness::finalize();\n\treturn 0;\n}\n\n\n\n\n"
  },
  {
    "path": "src/examples/array_worldobject.cc",
    "content": "#include <madness/world/world.h>\n#include <madness/world/worldgop.h>\n#include <madness/world/world_object.h>\n\nusing namespace std;\nusing namespace madness;\n\nclass Array : public WorldObject<Array> {\n    vector<double> v;\npublic:\n    /// Make block distributed array with size elements\n    Array(World& world, size_t size) \n        : WorldObject<Array>(world), v((size-1)/world.size()+1)\n    {\n        process_pending();\n    };\n\n    /// Return the process in which element i resides\n    ProcessID owner(size_t i) const {return i/v.size();};\n\n    Future<double> read(size_t i) const {\n        if (owner(i) == get_world().rank())\n            return Future<double>(v[i-get_world().rank()*v.size()]);\n        else\n            return send(owner(i), &Array::read, i);\n    };\n\n    void write(size_t i, double value) {\n        if (owner(i) == get_world().rank())\n            v[i-get_world().rank()*v.size()] = value;\n        else\n            send(owner(i), &Array::write, i, value);\n    };\n};\n\nint main(int argc, char** argv) {\n    World& world = initialize(argc, argv);\n\n    size_t N = 10000 - (10000%world.size()); // make array size a multiple of the number of processes for simplicity\n\n    Array a(world, N), b(world, N);\n\n    // Without regard to locality, initialize a and b\n    for (size_t i=world.rank(); i<N; i+=world.size()) {\n        a.write(i, 10.0*i);\n        b.write(i,  7.0*i);\n    }\n    world.gop.fence();\n\n    // All processes verify 100 random values from each array\n    for (int j=0; j<100; j++) {\n        size_t i = world.rand()%N;\n        Future<double> vala = a.read(i);\n        Future<double> valb = b.read(i);\n        // Could do work here until results are available\n        MADNESS_ASSERT(vala.get() == 10.0*i);\n        MADNESS_ASSERT(valb.get() ==  7.0*i);\n    }\n    world.gop.fence();\n\n    if (world.rank() == 0) print(\"OK!\");\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/binaryop.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n  \\file examples/binaryop.cc\n  \\brief Illustrates general composition of two functions\n  \\defgroup examplebinop Illustrates general composition of two functions\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/binaryop.cc>here</a>.\n\n  \\par Points of interest\n  - use of a binary operation to apply a complex operation to two functions\n  - use of asymptotic analysis to ensure good behavior in presence of numerical noise\n\n  \\par Background\n\n  In nuclear physics density functional theory it is necessary to compute\n  functions of the form\n\n  \\f[\n  U(r) = \\frac{\\Delta^2 (r)}{\\rho^{2/3} (r)}\n  \\f]\n\n  The functions \\f$ \\Delta \\f$ and \\f$ \\rho \\f$ are both expected to go to zero\n  at large \\f$ r \\f$ as is the ratio (i.e., \\f$ \\Delta \\f$ goes to zero faster\n  than \\f$ \\rho \\f$).  Moreover, \\f$ \\rho \\f$ should everywhere be positive\n  and is not expected to be zero in the interior region (for ground states only?).\n\n  \\par Implementation\n\n  The first problem is how to compose this operation inside MADNESS.\n  One could square \\f$ Delta \\f$, use \\c unaryop() to compute the\n  negative fractional power of \\f$ \\rho() \\f$, and then multiply the\n  two.  With care (see below) this should work.  Easier, faster, and\n  more accurate is to do all of the above at once. This is accomplished\n  with a binary operation that acts upon the input function values and\n  returns the result.\n\n  The second and most significant problem is numerical noise in the\n  functions that can lead to \\f$ \\rho \\f$ being zero and even negative\n  while \\f$ Delta \\f$ is non-zero.  However, the expected asymptotics\n  tell us that if either \\f$ Delta \\f$ or \\f$ \\rho \\f$ are so small\n  that noise is dominating, that the result of the binary operation\n  should be zero.  [Aside. To accomplish the same using a unary\n  operation the operation that computes \\f$ rho^{-2/3} \\f$ should\n  return zero if \\f$ rho \\f$ is small. But this precludes us from\n  simultaneously using information about the size of \\f$ \\Delta \\f$\n  and does not ensure that both are computed at the same level of\n  refinement.]\n\n  Analysis is necessary.  The threshold at which to screen values to\n  their asymptotic form depends on the problem, the accuracy of\n  computation, and possibly the box size.  In this problem we choose\n  \\f[\n  \\Delta(r) = exp(- | r | )\n  \\f]\n  and\n  \\f[\n  \\rho(r) = exp(- 2 | r | ) = \\Delta^2(r)\n  \\f]\n  Thus, the exact result is\n  \\f[\n  U(r) = \\frac{\\Delta^2 (r)}{\\rho^{2/3} (r)} = exp( - 2 | r | / 3)\n  \\f]\n\n  Note that the result has a smaller exponent than the two input\n  functions and is therefore significant at a longer range.  Since we\n  cannot generate information we do not have, once the input functions\n  degenerate into numerical noise we must expect that the ratio is\n  also just noise.  In the physical application, the potential \\f$\n  U(r) \\f$ is applied to another function that is also decaying\n  expoentially, which makes \\em small noise at long range not\n  significant.  By screening to the physically expected value of zero\n  we therefore ensure correct physics.\n\n*/\n\n#include <madness/mra/mra.h>\n\nusing namespace madness;\n\nstatic const double L = 30;     // Half box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-6; // precision\n\nstatic const double small = thresh*1e-4;\n\ndouble delta(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return exp(-sqrt(x*x+y*y+z*z+1e-6));\n}\n\ndouble uexact(const coord_3d& r) {\n    return pow(delta(r),2.0/3.0);\n}\n\n// This functor is used to perform the binary operation\nstruct Uop {\n    void operator()(const Key<3>& key,\n                    real_tensor U,\n                    const real_tensor& Delta,\n                    const real_tensor& rho) const {\n        ITERATOR(U,\n                 double d = Delta(IND);\n                 double p = rho(IND);\n                 if (p<small || d<small)\n                     U(IND) = 0.0;\n                 else\n                     U(IND) = d*d/pow(p,2.0/3.0);\n                 );\n    }\n\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world, argc, argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_cubic_cell(-L, L);\n    FunctionDefaults<3>::set_initial_level(4);\n\n    real_function_3d Delta = real_factory_3d(world).f(delta);\n    Delta.truncate(); // Deliberately truncate to introduce numerical noise\n\n    real_function_3d rho = Delta*Delta;\n    rho.truncate(); // Deliberately truncate to introduce numerical noise\n\n    real_function_3d U = binary_op(Delta, rho, Uop());\n\n    double err = U.err(uexact);\n    if (world.rank() == 0) print(\"Estimated error norm is \", err);\n\n    // Make the exact result just for plotting\n    real_function_3d exact = real_factory_3d(world).f(uexact);\n\n    // Make a line plot from the origin along the x axis to examine the functions in detail\n    coord_3d lo(0), hi(0);\n    hi[0] = L;\n    plot_line(\"binaryop.dat\", 1001, lo, hi, Delta, rho, U, exact);\n\n    finalize();\n    return 0;\n}\n\n"
  },
  {
    "path": "src/examples/colloid.cc",
    "content": "/*\nThis file is part of MADNESS.\nCopyright (C) 2007,2010 Oak Ridge National Laboratory\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version.\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\nFor more information please contact:\nRobert J. Harrison\nOak Ridge National Laboratory\nOne Bethel Valley Road\nP.O. Box 2008, MS-6367\n\nemail: harrisonrj@ornl.gov\ntel:   865-241-3937\nfax:   865-572-0680\n\n\nThis proram simulates the effect of surface solute interaction between a colloid and a hydrogen atom\n*/\n\n\n//#include <madness/mra/operator.h>\n#include \"molecularmask.h\"\n#include <madness/mra/nonlinsol.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/lbdeux.h>\n#include <madness/misc/ran.h>\n#include <madness/tensor/solvers.h>\n#include <ctime>\n#include <list>\n#include <jacob/molecule.h>\n#include <madness/mra/sdf_shape_3D.h>\n#include <madness/mra/funcplot.h>\n#include <madness/constants.h>\n#include <cmath>\n#include <vector>\nusing namespace madness;\nusing namespace std;\ntypedef real_function_3d realfunc;\n//typedef SeparatedConvolution<double,3> operatorT;\n//typedef std::shared_ptr<operatorT> poperatorT;\n\n//compute the distance between two points\ninline double distance1(const coord_3d& r, const coord_3d& center){\n    double x1 = r[0], y1 = r[1], z1 = r[2];\n    double x2 = center[0], y2 = center[1], z2 = center[2];\n    double xx = x1-x2;\n    double yy = y1-y2;\n    double zz = z1-z2;\n    return sqrt(xx*xx + yy*yy + zz*zz);\n}\n\ndouble nuclear_charge_function(const coord_3d& r) {\n    const double expnt = 100.0;\n    const double coeff = pow(1.0/constants::pi*expnt,0.5*3);\n    return coeff*exp(-expnt*(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]));\n}\n\ndouble electronic_charge_function(const coord_3d& r) {\n    const double coeff = 1.0/constants::pi;\n    return coeff*exp(-2.0*sqrt(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]));\n}\n\ndouble charge_function(const coord_3d& r) {\n    return nuclear_charge_function(r) - electronic_charge_function(r);\n}\n\n\nclass SurfaceMoleculeInteraction {\nprivate:\n    const double& d; //distance between reaction surface and molecular center\n    const double& R; //radius of the spheres forming the colloid surface\n    const std::vector<double> charge_center; //defines the center of  nuclear charge\n    realfunc& rhot; //total charge density\n    const double& sigma;  //surface width\n    World& world;\n    const int& maxiter;\n    //compute the reciprocal of a madness function\n    template <typename T, int NDIM>\n    struct Reciprocal {\n        void operator()(const Key<NDIM>& key, Tensor<T>& t) const {\n            UNARY_OPTIMIZED_ITERATOR(T, t, *_p0 = 1.0/(*_p0));\n        }\n        template <typename Archive> void serialize(Archive& ar) {}\n    };\n\n    //this is used to perform a binary operation\n    struct Bop {\n        void operator()(const Key<3>& key,\n                        real_tensor rfunc,\n                        const real_tensor& func1,\n                        const real_tensor& func2) const {\n            ITERATOR(rfunc,\n                     double d = func1(IND);\n                     double p = func2(IND);\n                     rfunc(IND) = d*p;\n                     );\n        }\n\n        template <typename Archive>\n        void serialize(Archive& ar) {}\n    };\npublic:\n    //set coordinates of colloid atoms\n    std::vector< madness::Vector<double,3> > colloid_coords()const{\n        // const std::vector<double> cc(0.0);// = charge_center;\n        std::vector< madness::Vector<double,3> > c(6); //6 spheres on the colloid surface\n        double sqrttwo = std::sqrt(2.0);\n        double dist= (sqrttwo/2.0)*R;\n        //double x = cc[0], y =  cc[1], z = cc[2];\n        double x = 0.0, y =  0.0, z = 0.0;\n        c[0][0]= x - dist, c[0][1]= y - d - dist, c[0][2] = z;\n        c[1][0]= x - dist, c[1][1]= y - d + dist, c[1][2] = z;\n        c[2][0]= x + dist, c[2][1]= y - d + dist, c[2][2] = z;\n        c[3][0]= x + dist, c[3][1]= y - d - dist, c[3][2] = z;\n        c[4][0]= x , c[4][1]= y - d , c[4][2] = z + R;\n        c[5][0]= x , c[5][1]= y - d, c[5][2] = z - R;\n        return c;\n    }\n    std::vector<double> colloid_radii()const {\n        int nsphere = colloid_coords().size();\n        std::vector<double> c(nsphere);\n        for(int i=0; i<nsphere; i++)\n            c[i] = R;\n        return c;\n    }\n\n    //make surface charge\n    realfunc make_surfcharge(const realfunc& u,const realfunc& surface,const realfunc& volume) const {\n        real_derivative_3d Dx = free_space_derivative<double,3>(rhot.world(), 0);\n        real_derivative_3d Dy = free_space_derivative<double,3>(rhot.world(), 1);\n        real_derivative_3d Dz = free_space_derivative<double,3>(rhot.world(), 2);\n        realfunc Revolume = copy(volume);\n        Revolume.unaryop(Reciprocal<double,3>());\n        coord_3d lo(0.0),hi(0.0);\n        lo[0] = -20.0;\n        hi[0] = 20.0;\n        plot_line(\"Revolume.dat\",401,lo,hi,Revolume);\n        realfunc gradu = Dx(u) + Dy(u) + Dz(u);\n        const double rfourpi = 1.0/(4.0*constants::pi);\n        realfunc ratio_surface_vol = binary_op(Revolume,surface, Bop());\n        realfunc scharge = binary_op(gradu,ratio_surface_vol, Bop());\n        return scharge.scale(rfourpi);\n    }\n    //The perturbed potential near the colloid as a result of the presence of the molecular charge distribution\n    realfunc perturbed_molecular_pot(const realfunc& surface,const realfunc& volume) const {\n        const bool USE_SOLVER = true;\n        double tol = std::max(1e-4,FunctionDefaults<3>::get_thresh());\n        real_convolution_3d op = madness::CoulombOperator(world, tol*10.0, tol*0.1);\n        realfunc U0 = op(rhot);\n        coord_3d lo(0.0),hi(0.0);\n        lo[0] = -20.0;\n        hi[0] = 20.0;\n        plot_line(\"initial_pot.dat\",401,lo,hi,U0);\n        realfunc charge = make_surfcharge(U0,surface,volume);\n        realfunc U = op(charge);\n        double unorm = U.norm2();\n        if (USE_SOLVER) {\n            madness::NonlinearSolver solver;//(5);\n            realfunc uvec, rvec;\n            if (world.rank() == 0){\n                print(\"\\n\\n\");//for formating output\n                madness::print(\"      Computing the perturbed solute potential         \");\n                madness::print(\"              ______________________           \\n \");\n\n                madness::print(\"iteration \",\"    \",\" residue norm2\\n\");\n            }\n            realfunc charg = make_surfcharge(U,surface,volume);\n            for (int iter=0; iter<maxiter; iter++) {\n                uvec = U;\n                //coord_3d lo(0.0),hi(0.0);\n                //lo[0] = -20.0;\n                // hi[0] = 20.0;\n                // plot_line(\"imp_Surfacepot.dat\",1001,lo,hi,U);\n\n                rvec = (U -op(charg)).truncate() ;\n                realfunc U_new = solver.update(uvec,rvec);\n                double err = rvec.norm2();\n                if (world.rank()==0)\n                    madness::print(\"  \", iter,\"             \" , err);\n                if (err >0.3*unorm){ U = 0.5*U + 0.5*U_new;\n                }\n                else\n                    U = U_new;\n                if (err < 10.0*tol) break;\n            }\n        }\n        return U;\n    }\n\n    SurfaceMoleculeInteraction(const double& d, const double& R,const\n                               std::vector<double>& charge_center,\n                               realfunc& rhot, const double& sigma, World& world,const int& maxiter)\n        :d(d),R(R),                      //d and R are in a.u\n         charge_center(0.0),\n         rhot(rhot),sigma(sigma),world(world),maxiter(maxiter){\n        MADNESS_ASSERT(colloid_coords().size()==colloid_radii().size());\n    }\n};\n\nint main(int argc, char **argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n    const int k = 6; // wavelet order\n\n    const double thresh = 1e-6; // truncation threshold\n\n    const double L = 50; // box is [-L,L]\n\n    //const int natom = 6; // number of atoms\n\n    double sigma = 0.5; // Surface width\n\n    const double R = 3.2503287; // radius of colloid sphere\n\n    const double d = 6.61404096; // distance between center of charge and coilloid center\n\n    const int maxiter = 25; // maximum iteration\n\n\n    // Function defaults\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_cubic_cell(-L, L);\n    FunctionDefaults<3>::set_initial_level(2);\n    //Creat an object\n    //Molecule molecule;\n    const std::vector<double> charge_center(0.0); //defines the center of  nuclear charge\n    real_function_3d rhot   = real_factory_3d(world).f(charge_function);\n    SurfaceMoleculeInteraction SMI(d,R,charge_center,rhot,sigma,world,maxiter);\n\n    real_functor_3d volume_functor(new MolecularVolumeMask(sigma, SMI.colloid_radii(), SMI.colloid_coords()));\n    real_functor_3d surface_functor(new MolecularSurface(sigma, SMI.colloid_radii(), SMI.colloid_coords()));\n    real_function_3d vol = real_factory_3d(world).functor(volume_functor);\n    real_function_3d surface = real_factory_3d(world).functor(surface_functor).truncate_on_project();\n    realfunc pot = SMI.perturbed_molecular_pot(surface,vol);\n     coord_3d lo(0.0),hi(0.0);\n     lo[0] = -20.0;\n     hi[0] = 20.0;\n     plot_line(\"colloid_vol.dat\",1001,lo,hi,vol);\n     plot_line(\"colloid_surface.dat\",1001,lo,hi,surface);\n     plot_line(\"colloid_pot.dat\",1001,lo,hi,pot);\n\n    print(\"the volume is\", vol.trace());\n    print(\"the area   is\", surface.trace());\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/compiler/Makefile",
    "content": "   WARN = -Waddress \\\n          -Warray-bounds \\\n          -Wc++0x-compat \\\n          -Wchar-subscripts \\\n          -Wformat \\\n          -Wmain \\\n          -Wmissing-braces \\\n          -Wreorder \\\n          -Wreturn-type \\\n          -Wsequence-point \\\n          -Wsign-compare \\\n          -Wstrict-aliasing \\\n          -Wstrict-overflow=1 \\\n          -Wswitch \\\n          -Wtrigraphs \\\n          -Wuninitialized \\\n          -Wunknown-pragmas \\\n          -Wunused-function \\\n          -Wunused-label \\\n          -Wunused-value \\\n          -Wunused-variable \\\n          -Wvolatile-register-var\n\n\nmra:\tmra.yy mra.ll mra-driver.hh mra-driver.cc mra.cc \n\tbison -d -ra -o mra-parser.cc mra.yy\n\tflex -o mra-scanner.cc mra.ll\n\tg++ $(WARN) -o $@ -I. mra.cc mra-driver.cc mra-scanner.cc mra-parser.cc\n\nrun:\tmra\n\t./mra input\n\tpdflatex eqn.tex\n\tevince eqn.pdf\n\nclean:\n\t/bin/rm -f mra *.o position.hh stack.hh location.hh mra-parser.* mra-scanner.* *~ *aux *dvi *pdf *log stuff prog.tex prog.cc prog.tree\n\n# keep\n# Makefile   mra.cc   mra-driver.cc   mra-driver.hh   mra.ll   mra.yy\n"
  },
  {
    "path": "src/examples/compiler/Makefile-prog.am",
    "content": "include $(top_srcdir)/config/MakeGlobal.am\n\nnoinst_PROGRAMS = prog\n \nprog_SOURCES = prog.cc \nprog_LDADD = $(MRALIBS)\n"
  },
  {
    "path": "src/examples/compiler/README",
    "content": "This is a demo of compiling a very high-level, Latex-like langauge\ninto C++/MADNESS.  The objectives are\n\n  - lower the entry barrier for doing practical calculations with\n    MADNESS, even to the point of being useful in the classroom.\n\n  - automate mapping basic math constructs into C++ to facilitate\n    understanding of how to compose MADNESS applications in C++.\n\nThe compiler is a quick and dirty hack using flex and bison.  It is\nfar from production quality, but most problems can be easily fixed\nby looking at \"mra.ll\", \"mra.yy\", or \"mra-driver.hh\".  It's\nactually pretty simple.\n\n\nTo build:\n\n   - you will need a recent version of bison, flex, and g++\n\n   - type \"make\"\n\n   - you now have the executable \"mra\"\n\n\nTo run the compiler:\n\n   - \"./mra inputfilename\"\n\n     This produces output to the terminal and\n     three output files\n\n     * The terminal output informs you about errors\n       and type inferences.\n\n     * \"prog.cc\" holds the generated C++ file.\n       \n     * \"prog.tex\" holds the generated Latex equation.\n\n     * \"prog.tree\" holds the syntax tree that is \n       useful for debugging the compiler\n\nTo view the latex:\n\n   - you will need the AMS tex and font packages installed\n\n   - \"pdflatex eqn.tex\" will generate eqn.pdf\n     (\"eqn.tex\" is just boiler plate that includes \"prog.tex\")\n\n\nTo compile and run the generated program:\n\n   - \"make -f Makefile-prog prog\"\n\n   - \"./prog\"\n\n   \nExamples\n\n   - hatom - calculates the energy of the hydrogen atom ground state\n\n   - hehf - solves the HF equations for the helium atom\n\n   - hehf2 - solves the HF equations for the helium atom\n\n   - hatompolar - solves for the polarizability of the hydrogen atom\n\n   - he2el - calculates the energy of the two-term Hylleraars \n     wavefunction for helium (this will require 40+ GB of memory)\n\n   - qa - a pathetic attempt at quality assurance testing\n\n\nThe language\n\n   - Variables can be either names of Greek letters (no backslash\n     needed) or the usual alpha-numeric string. Capilize the\n     first letter to get uppercase Greek.\n\n   - There are lots of reserved names, mostly math functions \n     and greek names - these are not actually checked for.\n\n   - For prettiest latex output use single character variable names\n\n   - Types are inferred, though if this breaks you can declare \n     the type. \n\n   - x is implicitly typed as a coordinate of the appropriate \n     dimension\n\n   - pi (lowercase) is the real value 3.141...\n\n   - the boolean values true and false are recognized\n\n   - subscripts become array references in the C++ (x_1 --> x[1])\n\n   - comments - characters from # to EOL are ignored\n\n   - Each program has to have this form\n\n     Let\n       domain specification\n       optional declarations and other definitions\n     In\n       program source\n     End\n\n   - The Let block provides global defintions and parameters for the\n     main body of the code -- they will become global defintions in\n     the C++ file.\n\n     * domain specification is \n\n       Omega = [lo,hi]^D\n\n       which specifies a cube in D dimensions.  The values of lo and\n       hi are available as box_lo and box_hi in the C++, and D as D.\n\n     * k = integer value\n\n       specifies the order of the wavelet, default is 6\n\n     * epsilon = real value\n\n       specifies the truncation threshold, default is 1e-4\n\n     * You can define other global constants\n\n     * Type declarations of the form (not usually needed)\n\n       comma-separated-list in field\n\n       e.g.,\n\n       a, b in R\n\n       where field is one of R (real), C (Complex), Z (Integer) (still\n       need to add RT, CT, RF, CF, Rd for tensors, functions, and\n       d-dimension vector/coordinate).\n\n     * One-line function definitions\n\n       name = paramlist -> expression\n\n       Have a look at the examples for usage.\n\n   - The In block provides the executable statements that will appear\n     in your C++ main program.\n\n     * Arithmetic (+,-,*,/), comparison (<,>,>=,<=,==,!=), boolean\n       (and, or, not), subscript/array (x_i), and power (x^y)\n       operations should work as expected.\n\n     * for variable in [lo,hi]\n          statements\n       end\n\n       specifies iteration over an inclusive range that is assumed integer\n\n     * while exp\n           statements\n       end\n       \n     * break jumps out of a loop\n\n     * if exp\n         statements\n       elif exp\n         statements\n       else\n         statements\n       end\n\n     * sum_var=lo^hi exp \n\n       computes the sum of exp with variable var varied over the\n       inclusive range [lo,hi].  Should nest correctly and work\n       inside expressions.\n\n       Presently assumes result is a number so cannot yet sum up a\n       function result ... to fix this need to modify the\n       initialization of the accumulation variable by peeling off the\n       first term.\n\n     * print comma-separated-expression-list\n\n       does the obvious thing\n\n     * plot function\n\n       plots the madness function to file \"plot\" using opendx format.\n       You can also use the form\n\n       plot function, filename\n\n       where file name is a string valued expression (e.g., \"fred\")\n\n     * vec(x) in 1D\n     * vec(x,y) in 2D\n     * etc.\n\n       converts Cartesian coordinates into a vector coordinate\n\n     * f(x) in 1D\n     * f(x,y) in 2D\n     * etc.\n       \n       where f is a MADNESS function evaluates the function at a point\n\n\n     * function(r) \n       \n       where f is a MADNESS function and r is a vector coordinate\n       evaluates the function at a point\n\n\n     * |x| is abs(x)\n\n     * ||x|| is norm(x)\n\n     * ||x||_F is normf(x)\n\n     * < f | g > is bra-ket notation for inner(f,g)\n\n       To get < f | Q | g > write <f | Q g>\n\n     * < f > is bra-ket notation for f.trace() = int(f(x),x in Omega)\n\n     * del_i is partial derivative in i'th direction\n       (i=0 is x, i=1 is y, etc.). E.g., \n\n       dfdz = del_2 f\n\n       is the derivative in the z direction of the madness function f.\n\n     * del^2 applies the laplacian (is this working?)\n\n     * del^-2 applies the Coulomb GF\n \n     * (expression - del^2)^-1 applies the BSH with mu^2 = expression\n\n       The recognition of this pattern is very crude and it must be\n       typed in exactly the above ordering and form.\n\n       Application of the GFs truncates the input and the output\n       for efficiency.\n\n     * F is the operator that projects a C++ function into the\n       multiwavelet basis.  E.g., if in the Let block you had\n\n       g = x -> exp(-sqrt(x_0^2 + x_1^2 + x_2^2))\n\n       Then in the In block you could have\n\n       f = F g\n\n       You can use the result of \"F g\" in expressions (since it\n       compiles to real_function(function_factory(g))).\n\nFeel free to extend and fix.\n\n\n\n"
  },
  {
    "path": "src/examples/compiler/eqn.tex",
    "content": "\\documentclass[11pt,fleqn]{article}\n\\usepackage{amsmath}\n\\usepackage{amsfonts}\n\\usepackage{graphicx}\n\\usepackage{braket}\n\n\\setlength{\\oddsidemargin}{0.25in}\n\\setlength{\\evensidemargin}{-0.25in}\n\\setlength{\\topmargin}{-.5in}\n\\setlength{\\textheight}{8.5in}\n\\setlength{\\parskip}{.1in}\n\\setlength{\\parindent}{2em}\n\\setlength{\\textwidth}{6.25in}\n\n\\DeclareMathOperator{\\sign}{sign}\n\\newcommand{\\Gzero}{G^{(0)}}\n\\newcommand{\\gzero}{g^{(0)}}\n\\newcommand{\\Szero}{\\Sigma^{(0)}}\n\\newcommand{\\szero}{\\sigma^{(0)}}\n\\providecommand{\\abs}[1]{\\lvert #1 \\rvert}\n\\providecommand{\\norm}[1]{\\lVert #1 \\rVert}\n\\providecommand{\\normf}[1]{\\lVert #1 \\rVert_F}\n\n\\begin{document}\n\n\\begin{align*}\n  \\input{prog.tex}\n\\end{align*}\n\n\n\\end{document}\n"
  },
  {
    "path": "src/examples/compiler/hatom",
    "content": "Let\n  Omega = [-20, 20]^3\n  r = x -> sqrt(x_0^2 + x_1^2 + x_2^2)\n  g = x -> exp(-r(x))\n  v = x -> -r(x)^-1\nIn\n  psi = F g\n  nu = F v  \n  S = < psi | psi >\n  V = < psi | nu * psi >\n  T = 1/2 * sum_i=0^2 < del_i psi | del_i psi >\n  print S, V, T, (T + V)/S\nEnd\n\n\n\n"
  },
  {
    "path": "src/examples/compiler/hatompolar",
    "content": "Let\n  Omega = [-60, 60]^3\n  r = x -> sqrt(x_0^2 + x_1^2 + x_2^2)\n  g = x -> exp(-r(x))\n  v = x -> -1/r(x)\n  u = x -> x_2\nIn\n  lambda = -0.5\n  nu = F v  \n  U = F u\n  psi = F g\n  psi = psi * ||psi||^-1\n  phi = U * psi\n\n  for j in [0,13]\n    phi = -2 * (-2*lambda - del^2)^-1 (nu*phi + U*psi)\n    E2a = <phi|U*psi>\n    E2b = -1/2 * sum_i=0^2 < del_i phi | del_i phi > -  <phi | nu*phi> + lambda*<phi|phi>\n    print \"iter\", j, \"norm\", ||phi||, \"alpha\", 2*E2a, 2*E2b, 4*E2a-2*E2b\n  end\nEnd\n\n\n\n"
  },
  {
    "path": "src/examples/compiler/he2el",
    "content": "Let\n  Omega = [-20, 20]^6\n  r1 = x -> sqrt(x_0^2 + x_1^2 + x_2^2)\n  r2 = x -> sqrt(x_3^2 + x_4^2 + x_5^2)\n  r12 = x -> sqrt((x_0 - x_3)^2 + (x_1 - x_4)^2 + (x_2 - x_5)^2)\n  g = x -> (1 + 1/2 * r12(x)) * exp(-2*(r1(x) + r2(x)))\n  v = x -> -2/r1(x) - 2/r2(x) + 1/r12(x)\nIn\n  psi = F g\n  nu = F v  \n  S = < psi | psi >\n  V = < psi | nu * psi >\n  T = 1/2 * sum_i=0^5 < del_i psi | del_i psi >\n  print S, V, T, (T + V)/S\nEnd\n\n\n\n"
  },
  {
    "path": "src/examples/compiler/hehf",
    "content": "Let\n  #k = 8\n  epsilon = 1e-6\n  Omega = [-20, 20]^3\n  r = x -> sqrt(x_0^2 + x_1^2 + x_2^2)\n  g = x -> exp(-2*r(x))\n  v = x -> -2/r(x)\nIn\n  nu = F v  \n  phi = F g\n  lambda = -1.0\n\n  while true\n    phi = phi * ||phi||^-1\n    V = nu - del^-2 4 * pi * phi^2\n    psi = -2 * (-2*lambda - del^2)^-1 V * phi\n    Delta = psi - phi\n    delta = <V*phi|Delta> / <psi|psi>\n    lambda = lambda + delta\n    phi = phi + Delta\n    print \"norm\",||psi||,\"eval\",lambda,\"err(phi)\",||Delta||,\"err(eval)\",delta\n    if ||Delta|| < 1e-4\n      break\n    end\n  end\nEnd\n\n\n\n"
  },
  {
    "path": "src/examples/compiler/hehf2",
    "content": "Let\n  epsilon = 1e-6\n  k = 8\n  Omega = [-20, 20]^3\n  r = x -> sqrt(x_0^2 + x_1^2 + x_2^2)\n  g = x -> exp(-2*r(x))\n  v = x -> -2/r(x)\nIn\n  nu = F v  \n  phi = F g\n  lambda = -1.0\n  for i in [0,13]\n    phi = phi * ||phi||^-1\n    V = nu - del^-2 4 * pi * phi^2\n    psi = -2 * (-2*lambda - del^2)^-1 V * phi\n    lambda = lambda + <V*phi|psi - phi> / <psi|psi>\n    phi = psi\n    print \"iter\", i, \"norm\", ||phi||, \"eval\",lambda\n  end\nEnd\n\n\n\n"
  },
  {
    "path": "src/examples/compiler/mra-driver.cc",
    "content": "#include \"mra-driver.hh\"\n#include \"mra-parser.hh\"\n\nmra_driver::mra_driver ()\n    : scopedepth(0)\n    , tmpvarcnt(0)\n    , use_k_default(true)\n    , use_eps_default(true)\n    , trace_scanning (false)\n    , trace_parsing (false)\n{\n    insert_sym(\"built in\", new Exp(\"pi\",Exp::REAL));\n}\n\nmra_driver::~mra_driver ()\n{\n}\n\nint\nmra_driver::parse (const std::string &f)\n{\n  file = f;\n  scan_begin ();\n  yy::mra_parser parser (*this);\n  parser.set_debug_level (trace_parsing);\n  int res = parser.parse ();\n  scan_end ();\n  return res;\n}\n\nvoid\nmra_driver::error (const yy::location& l, const std::string& m)\n{\n  std::cerr << l << \": \" << m << std::endl;\n}\n\nvoid\nmra_driver::error (const std::string& m)\n{\n  std::cerr << m << std::endl;\n}\n"
  },
  {
    "path": "src/examples/compiler/mra-driver.hh",
    "content": "#ifndef MRA_DRIVER_HH\n# define MRA_DRIVER_HH\n# include <string>\n# include <map>\n# include <vector>\n# include <sstream>\n# include \"mra-parser.hh\"\n\n// Tell Flex the lexer's prototype ...\n# define YY_DECL                                      \\\n  yy::mra_parser::token_type                       \\\n  yylex (yy::mra_parser::semantic_type* yylval,      \\\n         yy::mra_parser::location_type* yylloc,      \\\n         mra_driver& driver)\n// ... and declare it for the parser's sake.\nYY_DECL;\n\nclass Exp;\n\nextern std::map<std::string, bool> dectab;        // keeps track of CXX declared symbols\n\nstd::ostream& operator<<(std::ostream& s, const Exp& e);\n\nclass Exp {\npublic:\n    enum Type {\n        INTEGER, \n        REAL, \n        COMPLEX, \n        REALTEN, \n        COMPLEXTEN, \n        REALFUN, \n        COMPLEXFUN, \n        STRING, \n        COORD,\n        UNKNOWN\n    };\n\n    static const char* type_name(Type t) {\n        static const char* name[] = {\"Z \", \"R \", \"C \", \"RT\", \"CT\", \"RF\", \"CF\", \"S \", \"Rd\", \"U \"};\n        return name[t];\n    }\n\n    static const char* cxx_type_name(Type t) {\n        static const char* name[] = {\"long\", \"double\", \"double_complex\", \"real_tensor\", \"complex_tensor\", \"real_function\", \"complex_function\", \"std::string\", \"coord\", \"unknown\"};\n        return name[t];\n    }\n    \n    typedef std::vector<Exp*>::iterator iterator;\n    typedef std::vector<Exp*>::const_iterator const_iterator;\n\nprivate:\n    std::string s;       // Token or operator\n    Type t;              // Result type\n    std::vector<Exp*> c; // Children in order\n\npublic:\n\n    // Leaf node\n    Exp(const std::string& s, Type t=UNKNOWN) \n        : s(s), t(t), c()\n    {}\n\n    // Unary op\n    Exp(const std::string& s, Exp* left, Type t=UNKNOWN) \n        : s(s), t(t), c()\n    {\n        c.push_back(left);\n        if (is_unknown(t)) this->t = unaryoptype(s,left->type());\n    }\n\n    // Binary op\n    Exp(const std::string& s, Exp* left, Exp*right, Type t=UNKNOWN)\n        : s(s), t(t), c()\n    {\n        c.push_back(left);\n        c.push_back(right);\n        if (is_unknown(t)) this->t = binaryoptype(s,left->type(),right->type());\n    }\n\n    // Ternary op\n    Exp(const std::string& s, Exp* left, Exp* middle, Exp* right, Type t=UNKNOWN)\n        : s(s), t(t), c()\n    {\n        c.push_back(left);\n        c.push_back(middle);\n        c.push_back(right);\n    }\n\n    // Quaternary op\n    Exp(const std::string& s, Exp* left, Exp* middle, Exp* right, Exp* far, Type t=UNKNOWN)\n        : s(s), t(t), c()\n    {\n        c.push_back(left);\n        c.push_back(middle);\n        c.push_back(right);\n        c.push_back(far);\n    }\n\n    Exp* add(Exp* child) \n    {\n        c.push_back(child);\n        return child;\n    }\n\n    Exp* add(const std::string& str, Type t=UNKNOWN) \n    {\n        return add(new Exp(str,t));\n    }\n\n    void print_tree(std::ostream& file, int depth=0) const {\n        for (int i=0; i<depth; i++) file << \"        \";\n        file << *this << std::endl;\n        for (const_iterator iter = c.begin(); \n             iter != c.end(); \n             ++iter) (*iter)->print_tree(file,depth+1);\n        \n    }\n\n    bool match_sub_tree(const Exp* t) const {\n        // t points to a template tree that we want to\n        // match against this sub-tree. either exact match\n        // or wildcard indicated by null string in t\n        \n        if (t->str() == \"\" || (t->str() == str() && t->c.size() <= c.size())) {\n            const_iterator it = t->begin();\n            const_iterator ti =    begin();\n            while (it != t->end()) {\n                if (! (*ti)->match_sub_tree(*it)) return false;\n                ++it;\n                ++ti;\n            }\n            return true;\n        }\n        return false;\n    }\n\n    void regenerate(std::ostream& file) const {\n        // varlist, arglist, paramlist can be 1 or more entries\n        if (s == \"arglist\" || s==\"varlist\" || s==\"paramlist\") {\n            const_iterator iter = c.begin(); \n            while (iter != c.end()) {\n                (*iter)->regenerate(file);\n                ++iter;\n                if (iter == c.end()) {\n                    break;\n                }\n                else {\n                    file << \", \";\n                }\n            }\n        }\n        else if (c.size() == 0) {\n            file << s;\n        }\n        else if (c.size() == 1) {\n            // ()       (exp)\n            // -        - exp\n            // not      not exp\n            // greek    greek name\n            // print    print arglist\n            // plot     plot  exp\n            // F        F variable\n            // while    while exp\n            // if       if exp\n            // elif     elif exp\n            // trace    trace exp\n\n            if      (s == \"()\") file << \"(\";\n            else if (s == \"-\") file << \"-\";\n            else if (s == \"greek\");\n            else if (s == \"trace\") file << \"<\"; \n            else file << s << \" \";\n\n            c[0]->regenerate(file);\n\n            if (s == \"()\") file << \")\";\n            else if (s == \"trace\") file << \">\"; \n        }\n        else if (c.size() == 2) {\n            // decl     varlist in field\n            // call     variable(arglist)\n            // mathfun  funcname(exp)\n            // braket   <a|b>\n            // =, +, -, *, _, ^    exp op exp\n            // del\n\n            if (s == \"decl\") {\n                c[0]->regenerate(file);\n                file << \"in \";\n                c[1]->regenerate(file);\n            }\n            else if (s == \"call\") {\n                c[0]->regenerate(file);\n                file << \"(\";\n                c[1]->regenerate(file);\n                file << \")\";\n            }\n            else if (s == \"mathfun\") {\n                if      (c[0]->str() == \"abs\") file << \"|\";\n                else if (c[0]->str() == \"norm\") file << \"||\";\n                else if (c[0]->str() == \"normf\") file << \"||\";\n                else {\n                    c[0]->regenerate(file);\n                    file << \"(\";\n                }\n                c[1]->regenerate(file);\n                if      (c[0]->str() == \"abs\") file << \"|\";\n                else if (c[0]->str() == \"norm\") file << \"||\";\n                else if (c[0]->str() == \"normf\") file << \"||_F\";\n                else file << \")\";\n            }\n            else if (s == \"braket\") {\n                file << \"<\";\n                c[0]->regenerate(file);\n                file << \"|\";\n                c[1]->regenerate(file);\n                file << \">\";\n            }\n            else if (s == \"del\") {\n                file << \"del_\";\n                c[0]->regenerate(file);\n                file << \" \";\n                c[1]->regenerate(file);\n            }\n            else if (s==\"_\" || s==\"^\") {\n                c[0]->regenerate(file);\n                file << s;\n                c[1]->regenerate(file);\n            }\n            else if (s == \"lt\") {\n                c[0]->regenerate(file);\n                file << \" < \";\n                c[1]->regenerate(file);\n            }\n            else if (s == \"gt\") {\n                c[0]->regenerate(file);\n                file << \" < \";\n                c[1]->regenerate(file);\n            }\n            else if (s == \"le\") {\n                c[0]->regenerate(file);\n                file << \" <= \";\n                c[1]->regenerate(file);\n            }\n            else if (s == \"ge\") {\n                c[0]->regenerate(file);\n                file << \" >= \";\n                c[1]->regenerate(file);\n            }\n            else if (s == \"eq\") {\n                c[0]->regenerate(file);\n                file << \" == \";\n                c[1]->regenerate(file);\n            }\n            else if (s == \"ne\") {\n                c[0]->regenerate(file);\n                file << \" != \";\n                c[1]->regenerate(file);\n            }\n            else {\n                c[0]->regenerate(file);\n                file << \" \" << s << \" \";\n                c[1]->regenerate(file);\n            }\n        }\n        else if (c.size() == 3) {\n            // def      variable = paramlist -> exp\n            // domain   lo, hi, D\n            // ^_       x^y_z\n\n            if (s == \"def\") {\n                c[0]->regenerate(file);\n                file << \" = \";\n                c[1]->regenerate(file);\n                file << \" -> \";\n                c[2]->regenerate(file);\n            }\n            else if (s == \"domain\") {\n                file << \"Omega = [\";\n                c[0]->regenerate(file);\n                file << \", \";\n                c[1]->regenerate(file);\n                file << \"]^\";\n                c[2]->regenerate(file);\n            }\n            else if (s == \"^_\") {\n                c[0]->regenerate(file);\n                file << \"^\";\n                c[1]->regenerate(file);\n                file << \"_\";\n                c[2]->regenerate(file);\n            }\n            else if (s == \"for\") {\n                file << \"for \";\n                c[0]->regenerate(file);\n                file << \" in [\";\n                c[1]->regenerate(file);\n                file << \",\";\n                c[2]->regenerate(file);\n                file << \"]\";\n            }\n            else {\n                std::cout << \"Trying to generate unknown expression with 3 arguments?\\n\";\n                this->print_tree(std::cout);\n            }\n        }\n        else if (s == \"sum\") {\n            file << \"sum_\";\n            c[0]->regenerate(file);\n            file << \"=\";\n            c[1]->regenerate(file);\n            file << \"^\";\n            c[2]->regenerate(file);\n            file << \" \";\n            c[3]->regenerate(file);\n        }\n        else {\n            std::cout << \"Trying to generate expression with more than 4 arguments?\\n\";\n            this->print_tree(std::cout);\n        }\n    }\n\n    void generate_tex(std::ostream& file) const {\n        // varlist, arglist, paramlist can be 1 or more entries\n        if (s == \"arglist\" || s==\"varlist\" || s==\"paramlist\") {\n            const_iterator iter = c.begin(); \n            while (iter != c.end()) {\n                (*iter)->generate_tex(file);\n                ++iter;\n                if (iter == c.end()) {\n                    break;\n                }\n                else {\n                    file << \", \";\n                }\n            }\n        }\n        else if (c.size() == 0) {\n            if (s==\"Let\" || s==\"In\" || s==\"End\" || s==\"else\" || s==\"end\" || s==\"true\" || s==\"false\" || s==\"break\") {\n                file << \"\\\\textsf{\" << s <<\"}\\\\ \";\n            }\n            else if (is_string(t)) {\n                file << \"\\\\verb+\" << s << \"+\";\n            }\n            else {\n                file << s;\n            }\n        }\n        else if (c.size() == 1) {\n            // ()       (exp)\n            // {}       {exp}\n            // -        - exp\n            // not      not exp\n            // F        F variable\n            // greek    greek name\n            // print    print arglist\n            // if       if exp\n            // elif     elif exp\n            // while    while exp\n            // plot     plot  exp\n            // lap\n            // trace    trace exp\n            \n            if      (s == \"()\") file << \"\\\\left(\";\n            else if (s == \"{}\") file << \"{\";\n            else if (s == \"-\") file << \"-\";\n            else if (s == \"F\") file << \"\\\\mathcal{F}\\\\ \";\n            else if (s == \"greek\") file << \"\\\\\";\n            else if (s == \"lap\") file << \" \\\\nabla^2 \";\n            else if (s == \"trace\") file << \" \\\\langle \";\n            else file << \"\\\\textsf{\" << s << \"}\\\\ \";\n            \n            c[0]->generate_tex(file);\n            \n            if      (s == \"{}\") file << \"}\";\n            else if (s == \"()\") file << \"\\\\right)\";\n            else if (s == \"trace\") file << \" \\\\rangle \";\n        }\n        else if (c.size() == 2) {\n            // decl     varlist in field\n            // call     variable(arglist)\n            // mathfun  funcname(exp)\n            // braket   <a|b>\n            // =, +, -, *, _, ^    exp op exp\n            // del\n            // bsh\n\n            if (s == \"decl\") {\n                c[0]->generate_tex(file);\n                file << \" \\\\in \";\n                c[1]->generate_tex(file);\n            }\n            else if (s == \"call\") {\n                c[0]->generate_tex(file);\n                file << \"\\\\left(\";\n                c[1]->generate_tex(file);\n                file << \"\\\\right)\";\n            }\n            else if (s == \"mathfun\") {\n                file << \" \\\\\";\n                c[0]->generate_tex(file);\n                const std::string cs = c[0]->str();\n                if (cs==\"sqrt\" || cs==\"abs\" || cs==\"norm\" || cs==\"normf\") file << \"{\";\n                else file << \"\\\\left(\";\n                c[1]->generate_tex(file);\n                if (cs==\"sqrt\" || cs==\"abs\" || cs==\"norm\" || cs==\"normf\") file << \"}\";\n                else file << \"\\\\right)\";\n            }\n            else if (s == \"braket\") {\n                file << \" \\\\langle \";\n                c[0]->generate_tex(file);\n                file << \" | \";\n                c[1]->generate_tex(file);\n                file << \" \\\\rangle \";\n            }\n            else if (s == \"bsh\") {\n                if (c[0]->str() == \"0.0\") {\n                    file << \" \\\\nabla^{-2} \\\\left(\";\n                    c[1]->generate_tex(file);\n                    file << \"\\\\right) \";\n                }\n                else {\n                    file << \" \\\\left(\";\n                    c[0]->generate_tex(file);\n                    file << \" - \\\\nabla^2 \\\\right)^{-1} \\\\left(\";\n                    c[1]->generate_tex(file);\n                    file << \"\\\\right) \";\n                }\n            }\n            else if (s == \"=\") {\n                c[0]->generate_tex(file);\n                file << \" \\\\ = \\\\ \";\n                c[1]->generate_tex(file);\n            }\n            else if (s == \"/\") {\n                file << \" \\\\frac{\";\n                c[0]->strip_paren()->generate_tex(file);\n                file << \"}{\";\n                c[1]->strip_paren()->generate_tex(file);\n                file << \"} \";\n            }\n            else if (s == \"op\") {\n                c[0]->generate_tex(file);\n                file << \" \\\\otimes \";\n                c[1]->generate_tex(file);\n            }\n            else if (s == \"del\") {\n                file << \" \\\\nabla_{\";\n                c[0]->generate_tex(file);\n                file << \"}{\";\n                c[1]->generate_tex(file);\n                file << \"} \";\n            }\n            else if (s==\"^\" || s==\"_\") {\n                file << \"{\";\n                c[0]->generate_tex(file);\n                file << \"}\";\n                file << s;\n                file << \"{\";\n                c[1]->generate_tex(file);\n                file << \"}\";\n            }\n            else if (s == \"lt\") {\n                c[0]->generate_tex(file);\n                file << \" < \";\n                c[1]->generate_tex(file);\n            }\n            else if (s == \"gt\") {\n                c[0]->generate_tex(file);\n                file << \" < \";\n                c[1]->generate_tex(file);\n            }\n            else if (s == \" le\") {\n                c[0]->generate_tex(file);\n                file << \" \\\\leq \";\n                c[1]->generate_tex(file);\n            }\n            else if (s == \"ge\") {\n                c[0]->generate_tex(file);\n                file << \" \\\\geq \";\n                c[1]->generate_tex(file);\n            }\n            else if (s == \"eq\") {\n                c[0]->generate_tex(file);\n                file << \" == \";\n                c[1]->generate_tex(file);\n            }\n            else if (s == \"ne\") {\n                c[0]->generate_tex(file);\n                file << \" \\\\neq \";\n                c[1]->generate_tex(file);\n            }\n            else {\n                c[0]->generate_tex(file);\n                if (!(s==\"+\" || s==\"-\" || s==\"*\")) file << \"\\\\ \\\\textsf{\";\n                file << s;\n                if (!(s==\"+\" || s==\"-\" || s==\"*\")) file << \"}\\\\ \";\n                c[1]->generate_tex(file);\n            }\n        }\n        else if (c.size() == 3) {\n            // def      variable = paramlist -> exp\n            // domain   lo, hi, D\n            // ^_       x^y_z\n\n            if (s == \"def\") {\n                c[0]->generate_tex(file);\n                file << \" \\\\ = \\\\ \";\n                c[1]->generate_tex(file);\n                file << \" \\\\rightarrow \";\n                c[2]->generate_tex(file);\n            }\n            else if (s == \"domain\") {\n                file << \"\\\\Omega \\\\ = \\\\ [\";\n                c[0]->generate_tex(file);\n                file << \" , \";\n                c[1]->generate_tex(file);\n                file << \"]^\";\n                c[2]->generate_tex(file);\n            }\n            else if (s == \"^_\") {\n                c[0]->generate_tex(file);\n                file << \"^{\";\n                c[1]->generate_tex(file);\n                file << \"}_{\";\n                c[2]->generate_tex(file);\n                file << \"} \";\n            }\n            else if (s == \"for\") {\n                file << \" \\\\textsf{for}\\\\ \";\n                c[0]->generate_tex(file);\n                file << \" \\\\in [\";\n                c[1]->generate_tex(file);\n                file << \",\";\n                c[2]->generate_tex(file);\n                file << \"]\";\n            }\n            else {\n                std::cout << \"Trying to generate unknown expression with 3 arguments?\\n\";\n                this->print_tree(std::cout);\n            }\n        }\n        else if (s == \"sum\") {\n            file << \" \\\\sum_{\";\n            c[0]->generate_tex(file);\n            file << \"=\";\n            c[1]->generate_tex(file);\n            file << \"}^{\";\n            c[2]->generate_tex(file);\n            file << \"} \\\\left(\";\n            c[3]->generate_tex(file);\n            file << \"\\\\right) \";\n        }\n        else {\n            std::cout << \"Trying to generate expression with more than 3 arguments?\\n\";\n            this->print_tree(std::cout);\n        }\n    }\n\n    const Exp* strip_paren() const {\n        if (s == \"()\") return c[0];\n        else return this;\n    }\n\n    void generate_cxx(std::ostream& file) const {\n        // varlist, arglist, paramlist can be 1 or more entries\n        if (s == \"arglist\" || s==\"varlist\" || s==\"paramlist\") {\n            const_iterator iter = c.begin(); \n            while (iter != c.end()) {\n                const Exp* e = *iter;\n                \n                if (s == \"paramlist\") {\n                    Exp::Type t = e->type();\n                    bool pass_by_const_ref = (! Exp::is_pod(t));\n                    if (pass_by_const_ref) file << \"const \";\n                    file << Exp::cxx_type_name(t);\n                    if (pass_by_const_ref) file << \"&\";\n                    file << \" \";\n                }\n                e->generate_cxx(file);\n                ++iter;\n                if (iter == c.end()) {\n                    break;\n                }\n                else {\n                    file << \", \";\n                }\n            }\n        }\n        else if (c.size() == 0) {\n            if (s==\"Let\") {\n                file << \"#include <madness/mra/mra.h>\\n\";\n                file << \"using namespace madness;\\n\";\n            }\n            else if (s == \"In\") {\n                file << \"\\nvoid setup(World& world, int argc, char** argv) {\\n\";\n                file << \"    startup(world,argc,argv);\\n\";\n                file << \"    std::cout.precision(8);\\n\";\n                file << \"    FunctionDefaults<D>::set_cubic_cell(box_lo,box_hi);\\n\";\n                file << \"    FunctionDefaults<D>::set_k(k);\\n\";\n                file << \"    FunctionDefaults<D>::set_thresh(epsilon);\\n\";\n                file << \"    FunctionDefaults<D>::set_truncate_on_project(true);\\n\";\n                file << \"    FunctionDefaults<D>::set_project_randomize(true);\\n\";\n                //file << \"    FunctionDefaults<D>::set_truncate_mode(1);\\n\";\n                file << \"    real_grad = gradient_operator<double,D>(world);\\n\";\n                file << \"    complex_grad = gradient_operator<double_complex,D>(world);\\n\";\n                file << \"}\\n\";\n                file << \"\\n\";\n                file << \"int main(int argc, char**argv) {\\n\";\n                file << \"    initialize(argc,argv);\\n\";\n                file << \"    World world(SafeMPI::COMM_WORLD);\\n\";\n                file << \"    setup(world, argc, argv);\\n\";\n            }\n            else if (s == \"End\") {\n                file << \"\\n\";\n                file << \"    real_grad.clear();\\n\";\n                file << \"    complex_grad.clear();\\n\";\n                file << \"    finalize();\\n\";\n                file << \"    return 0;\\n\";\n                file << \"}\\n\";\n            }\n            else if (s == \"pi\") {\n                file << \"constants::pi\";\n            }\n            else if (s != \"end\") {\n                file << s;\n            }\n        }\n        else if (c.size() == 1) {\n            // ()       (exp)\n            // {}       {exp}\n            // -        - exp\n            // not      not exp\n            // F        F variable\n            // if, elif, while\n            // greek    greek name\n            // print    print arglist\n            // plot     plot  exp\n            // lap\n            // trace\n\n            if      (s == \"()\") file << \"(\";\n            else if (s == \"{}\") file << \"{\";\n            else if (s == \"-\") file << \"-\";\n            else if (s == \"F\") {\n                if (is_real(t)) file << \"real_function(real_factory(world).f(\";\n                else            file << \"complex_function(complex_factory(world).f(\";\n            }\n            else if (s == \"lap\") file << \"laplacian(\";\n            else if (s == \"print\") file << \"print(\";\n            else if (s == \"plot\")  file << \"plot(\";\n            else if (s == \"if\")  file << \"if (\";\n            else if (s == \"elif\")  file << \"else if (\";\n            else if (s == \"while\")  file << \"while (\";\n            else if (s == \"greek\") ;\n            else if (s == \"not\") file << \"!\";\n            else if (s == \"trace\") file << \"(\";\n            else file << s << \" \";\n\n            c[0]->generate_cxx(file);\n\n            if (s == \"{}\") file << \"}\";\n            if (s == \"()\" || s == \"print\" || s == \"plot\" || s == \"if\" || s==\"elif\" || s==\"while\" || s==\"lap\") file << \")\";\n            else if (s == \"F\") file << \"))\";\n            else if (s == \"()\") file << \")\";\n            else if (s == \"trace\") file << \").trace()\";\n        }\n        else if (c.size() == 2) {\n            // decl     varlist in field\n            // call     variable(arglist)\n            // mathfun  funcname(exp)\n            // braket   <a|b>\n            // =, +, -, *, _, ^    exp op exp\n            // comparison/logical ops\n            // del\n            // bsh\n\n            if (s == \"decl\") {\n            }\n            else if (s == \"call\") {\n                c[0]->generate_cxx(file);\n                file << \"(\";\n                c[1]->generate_cxx(file);\n                file << \")\";\n            }\n            else if (s == \"mathfun\") {\n                c[0]->generate_cxx(file);\n                file << \"(\";\n                c[1]->generate_cxx(file);\n                file << \")\";\n            }\n            else if (s == \"braket\") {\n                file << \"inner(\";\n                c[0]->generate_cxx(file);\n                file << \", \";\n                c[1]->generate_cxx(file);\n                file << \")\";\n            }\n            else if (s == \"=\") {\n                std::string cs = c[0]->str();\n                if (cs == \"greek\") cs = c[0]->c[0]->str();\n                // Declare variables at first assignment\n                if (dectab.find(cs) == dectab.end()) {\n                    dectab[cs] = true;\n                    file << Exp::cxx_type_name(c[0]->type()) << \" \";\n                }\n                c[0]->generate_cxx(file);\n                file << \" = \";\n                c[1]->generate_cxx(file);\n            }\n            else if (s == \"/\" && is_integer(c[0]->type()) && is_integer(c[1]->type())) {\n                // Probably want 1/2=0.5\n                file << \"double(\";\n                c[0]->generate_cxx(file);\n                file << \") / \";\n                c[1]->generate_cxx(file);\n            }\n            else if (s == \"^\") {\n                if (c[1]->str() == \"2\") {\n                    file << \"(\";\n                    c[0]->generate_cxx(file);\n                    file << \"*\";\n                    c[0]->generate_cxx(file);\n                    file << \")\";\n                }\n                else if (c[1]->str()==\"-\" && c[1]->c.size()==1 && c[1]->c[0]->str()==\"1\") {\n                    file << \"(1.0/\";\n                    c[0]->generate_cxx(file);\n                    file << \")\";\n                }\n                else {\n                    file << \"std::pow(\";\n                    c[0]->generate_cxx(file);\n                    file << \", \";\n                    c[1]->generate_cxx(file);\n                    file << \")\";\n                }\n            }\n            else if (s == \"_\") {\n                c[0]->generate_cxx(file);\n                file << \"[\";\n                c[1]->generate_cxx(file);                \n                file << \"]\";\n            }            \n            else if (s == \"and\") {\n                c[0]->generate_cxx(file);\n                file << \" && \";\n                c[1]->generate_cxx(file);\n            }\n            else if (s == \"or\") {\n                c[0]->generate_cxx(file);\n                file << \" || \";\n                c[1]->generate_cxx(file);\n            }\n            else if (s == \"lt\") {\n                c[0]->generate_cxx(file);\n                file << \" < \";\n                c[1]->generate_cxx(file);\n            }\n            else if (s == \"gt\") {\n                c[0]->generate_cxx(file);\n                file << \" < \";\n                c[1]->generate_cxx(file);\n            }\n            else if (s == \"le\") {\n                c[0]->generate_cxx(file);\n                file << \" <= \";\n                c[1]->generate_cxx(file);\n            }\n            else if (s == \"ge\") {\n                c[0]->generate_cxx(file);\n                file << \" >= \";\n                c[1]->generate_cxx(file);\n            }\n            else if (s == \"eq\") {\n                c[0]->generate_cxx(file);\n                file << \" == \";\n                c[1]->generate_cxx(file);\n            }\n            else if (s == \"ne\") {\n                c[0]->generate_cxx(file);\n                file << \" != \";\n                c[1]->generate_cxx(file);\n            }\n            else if (s == \"del\") {\n                if (is_real(t)) {\n                    file << \"(*real_grad[\";\n                    c[0]->generate_cxx(file);\n                    file << \"])(\";\n                    c[1]->generate_cxx(file);\n                    file << \")\";\n                }\n            }\n            else if (s == \"bsh\") {\n                file << \"BSH(sqrt(\";\n                c[0]->generate_cxx(file);\n                file << \"))((\";\n                c[1]->generate_cxx(file);\n                file << \").truncate()).truncate()\";\n                if (c[0]->str() == \"0.0\") file <<\".scale(-1.0)\"; // Since mapped del^-2 not -del^-2\n            }\n            else {\n                c[0]->generate_cxx(file);\n                file << \" \" << s << \" \";\n                c[1]->generate_cxx(file);\n            }\n        }\n        else if (c.size() == 3) {\n            // def      variable = paramlist -> exp\n            // domain   lo, hi, D\n            // ^_       x^y_z\n\n            if (s == \"def\") {\n                file << \"\\n\" << Exp::cxx_type_name(c[0]->type()) << \" \";\n                c[0]->generate_cxx(file);\n                file << \"(\";\n                c[1]->generate_cxx(file);\n                file << \") {\\n    return \";\n                c[2]->generate_cxx(file);\n                file << \";\\n}\";\n            }\n            else if (s == \"domain\") {\n                file << \"\\nconst double box_lo = \";\n                c[0]->generate_cxx(file);\n                file << \", box_hi = \";\n                c[1]->generate_cxx(file);\n                file << \";\\n\";\n                file << \"const int D = \";\n                c[2]->generate_cxx(file);\n                file << \";\\n\";\n                file << \"typedef Function<double,D> real_function;\\n\";\n                file << \"typedef Function<double_complex,D> complex_function;\\n\";\n                file << \"typedef FunctionFactory<double,D> real_factory;\\n\";\n                file << \"typedef FunctionFactory<double_complex,D> complex_factory;\\n\";\n                file << \"typedef Vector<double,D> coord;\\n\\n\";\n                file << \"std::vector< std::shared_ptr < Derivative<double,D> > > real_grad;\\n\";\n                file << \"std::vector< std::shared_ptr < Derivative<double_complex,D> > > complex_grad;\\n\";\n                file << \"template <typename functionT>\\n\";\n                file << \"void plot(const functionT& f, const char* filename = \\\"plot.dx\\\") {\\n\";\n                file << \"    plotdx(f, filename, FunctionDefaults<D>::get_cell(), std::vector<long>(D,101));\\n\";\n                file << \"}\\n\";\n                file << \"template <typename functionT> functionT laplacian(const functionT& f) {throw \\\"not yet\\\";}\\n\";\n                file << \"template <typename T> double norm(const T& t) {return t.normf();}\\n\";\n                file << \"template <typename T> double normf(const T& t) {return t.normf();}\\n\";\n                file << \"template <typename T> double norm(const Function<T,D>& t) {return t.norm2();}\\n\";\n                file << \"#define BSH(mu) BSHOperator<D>(world, mu, 1e-4, epsilon)\";\n\n            }\n            else if (s == \"^_\") {\n                if (c[1]->str() == \"2\") {\n                    file << \"(\";\n                    c[0]->generate_cxx(file);\n                    file << \"[\";\n                    c[2]->generate_cxx(file);\n                    file << \"]*\";\n                    c[0]->generate_cxx(file);\n                    file << \"[\";\n                    c[2]->generate_cxx(file);\n                    file << \"]\";\n                    file << \")\";\n                }\n                else {\n                    file << \"std::pow(\";\n                    c[0]->generate_cxx(file);\n                    file << \"[\";\n                    c[2]->generate_cxx(file);\n                    file << \"], \";\n                    c[1]->generate_cxx(file);\n                    file << \") \";\n                }\n            }\n            else if (s == \"for\") {\n                file << \"for (int \";\n                c[0]->generate_cxx(file);\n                file << \"=\";\n                c[1]->generate_cxx(file);\n                file << \"; \";\n                c[0]->generate_cxx(file);\n                file << \"<=\";\n                c[2]->generate_cxx(file);\n                file << \"; \";\n                c[0]->generate_cxx(file);\n                file << \"++) {\";\n            }\n            else {\n                std::cout << \"Trying to generate unknown expression with 3 arguments?\\n\";\n                this->print_tree(std::cout);\n            }\n        }\n        else if (s == \"sum\") {\n            file << \"for (int \";\n            c[0]->generate_cxx(file);\n            file << \"=\";\n            c[1]->generate_cxx(file);\n            file << \"; \";\n            c[0]->generate_cxx(file);\n            file << \"<=\";\n            c[2]->generate_cxx(file);\n            file << \"; \";\n            c[0]->generate_cxx(file);\n            file << \"++) {\";\n            c[3]->generate_cxx(file);\n            file << \" ;}\";\n        }\n        else {\n            std::cout << \"Trying to generate expression with more than 3 arguments?\\n\";\n            this->print_tree(std::cout);\n        }\n    }\n\n    const std::string& str() const {\n        return s;\n    }\n\n    Type type() const {\n        return t;\n    }\n\n    iterator begin() {\n        return c.begin();\n    }\n\n    iterator end() {\n        return c.end();\n    }\n\n    const_iterator begin() const {\n        return c.begin();\n    }\n\n    const_iterator end() const {\n        return c.end();\n    }\n\n    // Type of MRA function inferred from C++ function return type\n    static Type funtype(Type t) {\n        if      (t == REAL) return REALFUN;\n        else if (t == COMPLEX) return COMPLEXFUN;\n        else {\n            std::cout << \"tying to make a function from \" << type_name(t) << std::endl;\n            return UNKNOWN;\n        }\n    }\n\n    // Type of result from subscripting/indexing operation t_i == t[i]\n    static Type subscrtype(Type t) {\n        if (t==COORD || t==REALTEN) return REAL;\n        else if (t==COMPLEXTEN) return COMPLEX;\n        else return UNKNOWN;\n    }\n\n    // Type of result from braket <f|g>\n    static Type brakettype(Type f, Type g) {\n        if (f==REALFUN) {\n            if (g==REALFUN) return REAL;\n            else if (g==COMPLEXFUN) return COMPLEX;\n        }\n        else if (f==COMPLEXFUN && (g==REALFUN || g==COMPLEXFUN)) \n            return COMPLEX;\n        \n        std::cout << \"computing braket with non-function types? <\" << type_name(f) << \"|\" << type_name(g) << \">\\n\";\n        return UNKNOWN;\n    }\n\n    static bool is_real(Type t) {\n        return (t==INTEGER || t==REAL || t==REALFUN || t==REALTEN);\n    }\n\n    static bool is_complex(Type t) {\n        return (t==COMPLEX || t==COMPLEXFUN || t==COMPLEXTEN);\n    }\n\n    static bool is_string(Type t) {\n        return (t==STRING);\n    }\n\n    static bool is_tensor(Type t) {\n        return (t==REALTEN || t==COMPLEXTEN);\n    }\n\n    static bool is_integer(Type t) {\n        return (t==INTEGER);\n    }\n\n    static bool is_number(Type t) {\n        return (t==INTEGER || t==REAL);\n    }\n\n    static bool is_unknown(Type t) {\n        return (t==UNKNOWN);\n    }\n\n    static bool is_pod(Type t) {\n        return (t==INTEGER || t==REAL || t==COMPLEX);\n    }\n\n    static bool is_mrafun(Type t) {\n        return (t==REALFUN || t==COMPLEXFUN);\n    }\n\n    // Try to guess type of result from unaryop(op,t)\n    static Type unaryoptype(const std::string& op, Type t) {\n        if (op==\"norm\" || op==\"normf\") return REAL;\n        return t;\n    }\n\n    // Try to guess type of result from binaryop(op,l,r)\n    static Type binaryoptype(const std::string& op, Type l, Type r) {\n        if (op == \"mathfun\") return unaryoptype(op, r);\n        if (op == \"norm\" || op == \"normf\") return REAL;\n        if (is_unknown(l) || is_unknown(r)) return UNKNOWN;\n        if (is_string(l) || is_string(r)) return STRING;\n\n        // Can it be an integer?\n        if (is_integer(l) && is_integer(r)) {\n            if (op==\"+\" || op==\"-\" || op==\"*\") return INTEGER;\n        }\n        \n        // Choice is now (complex|real) (number|tensor|function)\n        if (is_complex(l) || is_complex(r)) {\n            if (is_tensor(l) || is_tensor(r)) return COMPLEXTEN;\n            if (is_mrafun(l) || is_mrafun(r)) return COMPLEXFUN;\n            return COMPLEX;\n        }\n        else {\n            if (is_tensor(l) || is_tensor(r)) return REALTEN;\n            if (is_mrafun(l) || is_mrafun(r)) return REALFUN;\n            return REAL;\n        }\n    }\n\n    void set_type(Type t) {\n        this->t = t;\n    }\n\n    ~Exp() {\n        for (iterator iter = c.begin(); \n             iter != c.end(); \n             ++iter) delete *iter;\n    }\n\n    Exp* operator[](int i) const {\n        return c[i];\n    }\n    \n};\n\ninline std::ostream& operator<<(std::ostream& s, const Exp& e) {\n    s << Exp::type_name(e.type()) << \" \" << e.str(); \n    return s;\n}\n\n// Conducting the whole scanning and parsing of mra.\nclass mra_driver {\npublic:\n    int scopedepth;             // Nesting depth of if/while to disambiguate end keyword\n    int tmpvarcnt;              // Counts temporary variables\n    bool use_k_default;         // False if user specified k\n    bool use_eps_default;       // False if user specified eps\n\n    std::vector<Exp*>::iterator cur; // When traversing entire tree this is the current statement\n    std::map<std::string, Exp::Type> symtab;   // maps symbols to types\n    std::vector<Exp*> program;                 // The full AST\n\n\n    mra_driver ();\n    virtual ~mra_driver ();\n\n\n    // Handling the scanner.\n    void scan_begin ();\n    void scan_end ();\n    bool trace_scanning;\n\n    std::string tmpvar() {\n        std::ostringstream o;\n        o << \"tmp\" << tmpvarcnt++;\n        return o.str();\n    }\n\n    // Run the parser.  Return 0 on success.\n    int parse (const std::string& f);\n    std::string file;\n    bool trace_parsing;\n\n    // Error handling.\n    void error (const yy::location& l, const std::string& m);\n    void error (const std::string& m);\n\n    // Adds a new statement\n    Exp* add(Exp* statement) {\n        program.push_back(statement);\n        return statement;\n    }\n\n    // Inserts a new statement *before* current one and maintains current iterator\n    void insert_before(Exp* e) {\n        cur = program.insert(cur, e);\n        cur++;\n    }\n\n    // Inserts a new statement *after* current one and maintains current iterator\n    void insert_after(Exp* e) {\n        cur = program.insert(cur+1, e);\n        cur--;\n    }\n\n    // Rewrites statement to replace sum with for loops prior to generating C++\n    void rewrite_sum(Exp* ee) {\n        Exp& e = *ee;\n        const std::string& s = e.str();\n        const Exp::Type t = e.type();\n        if (s == \"sum\") {\n            Exp* ind = e[0];\n            Exp* lo  = e[1];\n            Exp* hi  = e[2];\n            Exp* exp = e[3];\n\n            //if (Exp::is_pod(t)) {\n            Exp* var = new Exp(tmpvar(),t);\n            insert_sym(\"temporary\", var);\n            insert_before(new Exp(\"=\", var, new Exp(\"0\",Exp::INTEGER)));\n            insert_before(new Exp(\"for\",ind,lo,hi));\n\n            rewrite_sum(exp);\n\n            insert_before(new Exp(\"=\",new Exp(*var), \n                                  new Exp(\"+\",new Exp(*var),exp,t),t));\n            insert_before(new Exp(\"end\"));\n            e = *var;\n            //}\n            \n        }\n        else {\n            for (Exp::iterator it=e.begin(); it!=e.end(); ++it) {\n                rewrite_sum(*it);\n            }\n        }\n    }\n\n    Exp::Type lookup_type(const std::string& s) {\n        std::map<std::string,Exp::Type>::const_iterator it = symtab.find(s);\n        if (it != symtab.end()) {\n            return it->second;\n        }\n        else if (s[0] == 'x') { /* Implicit typing of coordinates x */\n            std::cout << \"implict typing of \" << s << \" as Rd (coordinate)\\n\";\n            symtab[s] = Exp::COORD;\n            return Exp::COORD;\n        }\n        else {\n            return Exp::UNKNOWN;\n        }\n    }\n\n    Exp::Type lookup_type(const Exp* e) {\n        return lookup_type(e->str());\n    }\n\n    void insert_sym(const std::string& how, const std::string& s, Exp::Type t) {\n        Exp::Type oldt = lookup_type(s);\n        if (oldt != t && oldt != Exp::UNKNOWN) {\n            std::cout << how << \" type of \" << s << \" as \" << Exp::type_name(t) << \" overriding previous definition of \" << Exp::type_name(oldt) << std::endl;\n        }\n        else {\n            std::cout << how << \" type of \" << s << \" as \" << Exp::type_name(t) << std::endl;\n        }\n        symtab[s] = t;\n    }\n\n    void insert_sym(const std::string& how, const Exp* e) {\n        if (e->str() == \"greek\") {\n            insert_sym(how, (*(e->begin()))->str(), e->type()); // gack!\n        }\n        else {\n            insert_sym(how, e->str(), e->type());\n        }\n    }\n\n    void addsyms(const Exp* e, const std::string& type) {\n        Exp::Type t;\n\n        if      (type == \"Z\")  t = Exp::INTEGER;\n        else if (type == \"R\")  t = Exp::REAL;\n        else if (type == \"C\")  t = Exp::COMPLEX;\n        else if (type == \"TR\") t = Exp::REALTEN;\n        else if (type == \"TC\") t = Exp::COMPLEXTEN;\n        else if (type == \"FR\") t = Exp::REALFUN;\n        else if (type == \"FC\") t = Exp::COMPLEXFUN;\n        else if (type == \"S\")  t = Exp::STRING;\n        else {\n            std::cout << \"unknown type \" << type << \" in declaration\" << std::endl;\n            t = Exp::UNKNOWN;\n        }\n        \n        if (e->str() == \"varlist\") {\n            for (Exp::const_iterator iter=e->begin(); iter!=e->end(); ++iter) {\n                insert_sym(\"declaring\",(*iter)->str(), t);\n            }\n        }\n        else {\n            std::cout << \"!! was expecting varlist in declaration\\n\";\n        }\n    }\n\n    void print_tree(std::ostream& file) const {\n        for (std::vector<Exp*>::const_iterator iter = program.begin(); iter != program.end();  ++iter) \n            (*iter)->print_tree(file);\n    }\n\n    void regenerate(std::ostream& file) const {\n        int indent = 1;\n        for (std::vector<Exp*>::const_iterator iter = program.begin(); iter != program.end();  ++iter) {\n            const Exp* e = *iter;\n            const std::string& s = e->str();\n\n            int ind = indent;\n            if (s==\"Let\" || s==\"In\" || s==\"End\") {\n                ind = 0;\n            }\n            else if (s==\"if\" || s==\"while\" || s==\"for\") {\n                indent++;\n            }\n            else if (s==\"elif\" || s==\"else\") {\n                ind--;\n            }\n            else if (s == \"end\") {\n                ind--;\n                indent--;\n            }\n\n            for (int i=0; i<4*ind; i++) file << \" \";\n            \n            (*iter)->regenerate(file);\n\n            file << std::endl;\n        }\n    }\n\n    void generate_tex(std::ostream& file) const {\n        int indent = 1;\n        for (std::vector<Exp*>::const_iterator iter = program.begin(); iter != program.end();  ++iter) {\n            const Exp* e = *iter;\n            const std::string& s = e->str();\n\n            int ind = indent;\n            if (s==\"Let\" || s==\"In\" || s==\"End\") {\n                ind = 0;\n            }\n            else if (s==\"if\" || s==\"while\" || s==\"for\") {\n                indent++;\n            }\n            else if (s==\"elif\" || s==\"else\") {\n                ind--;\n            }\n            else if (s == \"end\") {\n                ind--;\n                indent--;\n            }\n\n            file << \"& \";\n            for (int i=0; i<4*ind; i++) file << \"\\\\ \";\n            \n            (*iter)->generate_tex(file);\n\n            file << \"\\\\\\\\\" << std::endl;\n        }\n    }\n\n    void generate_cxx(std::ostream& file) {\n\n        // note class global variable cur\n        for (cur = program.begin(); cur != program.end();  ++cur) \n            rewrite_sum(*cur);\n\n        int indent = 0;\n        for (std::vector<Exp*>::const_iterator iter = program.begin(); iter != program.end();  ++iter) {\n            const Exp* e = *iter;\n            const std::string& s = e->str();\n\n            int ind = indent;\n            if (s==\"Let\" || s==\"In\" || s==\"End\") {\n                ind = 0;\n                if (s==\"In\") indent++;\n            }\n            else if (s==\"if\" || s==\"while\" || s==\"for\") {\n                indent++;\n            }\n            else if (s==\"elif\" || s==\"else\") {\n                ind--;\n            }\n            else if (s == \"end\") {\n                ind--;\n                indent--;\n            }\n\n            if (s == \"=\") {\n                const std::string& cs = (*(e->begin()))->str();\n                if (cs == \"k\") use_k_default = false;\n                if (cs == \"greek\" && (*(*(e->begin()))->begin())->str()==\"epsilon\") \n                    use_eps_default = false;\n            }\n\n            if (s == \"In\") {\n                if (use_k_default) {\n                    file << \"const int k = 6;\\n\";\n                    insert_sym(\"defaulting\", new Exp(\"k\",Exp::INTEGER));\n                }\n                if (use_eps_default) {\n                    file << \"const double epsilon = 1e-4;\\n\";\n                    insert_sym(\"defaulting\", new Exp(\"epsilon\",Exp::REAL));\n                }\n            }                \n\n\n            for (int i=0; i<4*ind; i++) file << \" \";\n            \n            if (s==\"elif\" || s==\"else\") {\n                file << \"}\\n\";\n                for (int i=0; i<4*ind; i++) file << \" \";\n            }\n            \n            (*iter)->generate_cxx(file);\n\n            if (s==\"if\" || s==\"elif\" || s==\"else\" || s==\"while\") \n                file << \" {\";\n            else if (s==\"end\")\n                file << \"}\";\n            else if (!(s==\"Let\" || s==\"In\" || s==\"End\" || s==\"def\" || s==\"domain\" || s==\"sum\" || s==\"for\"))\n                file << \";\";\n\n            file << std::endl;\n        }\n    }\n\n};\n\n#endif // ! MRA_DRIVER_HH\n"
  },
  {
    "path": "src/examples/compiler/mra.cc",
    "content": "#include <iostream>\n#include <fstream>\n#include \"mra-driver.hh\"\n\nstd::map<std::string, bool> dectab;        // keeps track of CXX declared symbols\n\nint\nmain (int argc, char *argv[])\n{\n  mra_driver driver;\n  for (++argv; argv[0]; ++argv)\n    if (*argv == std::string (\"-p\"))\n      driver.trace_parsing = true;\n    else if (*argv == std::string (\"-s\"))\n      driver.trace_scanning = true;\n    else if (!driver.parse (*argv))\n        ;\n  \n  std::ofstream treefile(\"prog.tree\",std::ios_base::trunc);\n  std::ostream treeout(treefile.rdbuf());\n  driver.print_tree(treeout);\n  treefile.close();\n\n  std::ofstream regfile(\"prog.reg\",std::ios_base::trunc);\n  std::ostream regout(regfile.rdbuf());\n  driver.regenerate(regout);\n  regfile.close();\n\n  std::ofstream texfile(\"prog.tex\",std::ios_base::trunc);\n  std::ostream texout(texfile.rdbuf());\n  driver.generate_tex(texout);\n  texfile.close();\n\n  std::ofstream ccfile(\"prog.cc\",std::ios_base::trunc);\n  std::ostream ccout(ccfile.rdbuf());\n  driver.generate_cxx(ccout);\n  ccfile.close();\n\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/compiler/mra.ll",
    "content": "%{\n#include <cstdlib>\n#include <string>\n#include \"mra-parser.hh\"\n#include \"mra-driver.hh\"\n\n#define TOK(X) yylval->s=new std::string(yytext); return token::X;\n#define RET(X) return token::X;\n\n#undef yywrap\n#define yywrap() 1\n#define yyterminate() return token::END\n%}\n\n%option noyywrap nounput batch debug\n\nCOMMENT  #[^\\n]*[\\n]\nWHITESPACE [ \\t]*\nEOL [\\n]+\n\nPLUS     \\+\nMINUS    \\-\nRARROW   \\-\\>\nTIMES    \"*\"\nDIVIDE   \\/\nPOWER    \\^\nLBRACE   \"{\"\nRBRACE   \"}\"\nLBRACK   \\[\nRBRACK   \\]\nLPAREN   \"(\"\nRPAREN   \")\"\nMLINE    \\|\nMMLINE   \\|\\|\nLANGLE   <\nRANGLE   >\nSEMICOLON ;\nCOMMA     ,\nPERIOD   \".\"\nASSIGN    \"=\"\nSUBSCRIPT _\n\nF        F\nFUNCTION abs|norm|normf|sqrt|exp|sin|cos|tan|cot|sec|arcsin|arccos|arctan|sinh|cosh|tanh|coth|erf|log|ln\nPRINT    print\nPLOT     plot\nREAD     read\nWRITE    write\nWHILE    [wW][hH][iI][lL][eE]\nFOR      [fF][oO][rR]\nIF       [iI][fF]\nELIF     [eE][lL][iI][fF]\nELSE     [eE][lL][sS][eE]\nSUM      [sS][uU][mM]\nDEL      [dD][eD][lL]\n\nLET  [lL][eE][tT]\nIN   [iI][nN]\nEND  [eE][nN][dD]\n\nOR       [oO][rR]\nAND      [aA][nN][dD]\nNOT      [nN][oO][tT]\nNE       \"!=\"\nEQ       \"==\"\nLE       \"<=\"\nGE       \">=\"\n\nGREEK Delta|Gamma|Lambda|Phi|Pi|Psi|Sigma|Theta|Upsilon|Xi|alpha|beta|chi|delta|digamma|epsilon|eta|gamma|iota|kappa|lambda|mu|nu|omega|phi|pi|psi|rho|sigma|tau|theta|upsilon|varepsilon|varkappa|varphi|varpi|varrho|varsigma|vartheta|xi|zeta\n\nOMEGA Omega\n\nNABLA nabla\n\nNAME     [a-zA-Z][a-zA-Z0-9]*\nDIGIT    [0-9]\nINTEGER  [0-9]+\nFIELD    [RCZ]\n\nFLOAT0   [0-9]*\".\"[0-9]+\nFLOAT1   [0-9]+\".\"[0-9]*\nFLOAT2   [0-9]+[eE][\\+\\-]?[0-9]+\nFLOAT3   [0-9]*\".\"[0-9]+[eE][\\+\\-]?[0-9]+\nFLOAT    {FLOAT0}|{FLOAT1}|{FLOAT2}|{FLOAT3}\n\nSTRING   \\\"[^\\\"\\n]*\\\"\n\n%{\n# define YY_USER_ACTION  yylloc->columns (yyleng);\n%}\n\n%%\n\n%{\n  yylloc->step ();\n%}\n\n%{\n  typedef yy::mra_parser::token token;\n%}\n\n\n{COMMENT}     yylloc->lines(1); yylloc->step(); RET(EOL);\n{WHITESPACE}  yylloc->step();\n{EOL}         yylloc->lines(yyleng); yylloc->step(); RET(EOL);\n\n\n{FLOAT} {TOK(FLOAT)}\n{INTEGER} {TOK(INTEGER)}\n\n{F}  {RET(F)}\n\n{FIELD} {TOK(FIELD)}\n\n{OR} {RET(OR)}\n{AND} {RET(AND)}\n{NE} {RET(NE)}\n{EQ} {RET(EQ)}\n{NOT} {RET(NOT)}\n{LE}  {RET(LE)}\n{GE}  {RET(GE)}\n\n{READ} {RET(READ)}\n{WRITE} {RET(WRITE)}\n{PRINT} {RET(PRINT)}\n{PLOT} {RET(PLOT)}\n{WHILE} {RET(WHILE)}\n{FOR} {RET(FOR)}\n{IF}    {RET(IF)}\n{ELIF}  {RET(ELIF)}\n{ELSE}  {RET(ELSE)}\n{SUM}   {RET(SUM)}\n{DEL}   {RET(DEL)}\n{FUNCTION} {TOK(FUNCTION)}\n{GREEK} {TOK(GREEK)}\n{OMEGA} {RET(OMEGA)}\n\n{LET} {RET(LET)}\n{IN}  {RET(IN)}\n{END} {RET(ENDPROG)}\n\n{NAME} {TOK(NAME)}\n\n{SEMICOLON} {RET(SEMICOLON)}\n{SUBSCRIPT} {RET(SUBSCRIPT)}\n{COMMA} {RET(COMMA)}\n{PERIOD} {RET(PERIOD)}\n\n{STRING} {TOK(STRING)}\n\n{PLUS} {RET(PLUS)}\n{MINUS} {RET(MINUS)}\n{TIMES} {RET(TIMES)}\n{DIVIDE} {RET(DIVIDE)}\n{POWER} {RET(POWER)}\n\n{LBRACE} {RET(LBRACE)}\n{RBRACE} {RET(RBRACE)}\n{LBRACK} {RET(LBRACK)}\n{RBRACK} {RET(RBRACK)}\n{LPAREN} {RET(LPAREN)}\n{RPAREN} {RET(RPAREN)}\n{LANGLE} {RET(LANGLE)}\n{RANGLE} {RET(RANGLE)}\n\n{ASSIGN} {RET(ASSIGN)}\n{RARROW} {RET(RARROW)}\n{MMLINE} {RET(MMLINE)}\n{MLINE}  {RET(MLINE)}\n\n%%\n\nvoid mra_driver::scan_begin ()\n{\n  yy_flex_debug = trace_scanning;\n  if (file == \"-\")\n    yyin = stdin;\n  else if (!(yyin = fopen (file.c_str (), \"r\")))\n    {\n      error (std::string (\"cannot open \") + file);\n      exit (1);\n    }\n}\n\nvoid mra_driver::scan_end ()\n{\n  fclose (yyin);\n}\n"
  },
  {
    "path": "src/examples/compiler/mra.yy",
    "content": "%skeleton \"lalr1.cc\"\n%defines\n%define parser_class_name \"mra_parser\"\n\n\n%code requires {\n# include <iostream>\n# include <string>\n# include <cmath>\n# include <cstdio>\n\nclass mra_driver;\nstruct Exp;\n}\n\n%union\n{\n  std::string *s;\n  Exp *e;\n};\n\n%parse-param { mra_driver& driver }\n%lex-param   { mra_driver& driver }\n%locations\n%initial-action\n{\n  @$.begin.filename = @$.end.filename = &driver.file;\n};\n\n%debug\n%error-verbose\n\n%code {\n# include \"mra-driver.hh\"\n}\n\n%type  <e> exp\n%type  <e> statement\n%type  <e> letstatement\n%type  <e> assignment\n%type  <e> paramlist\n%type  <e> arglist\n%type  <e> varlist\n%type  <e> variable\n%type  <e> summation\n%type  <e> derivative\n%type  <e> laplacian\n%type  <e> bsh\n%type  <e> braket\n%type  <e> mline\n%type  <e> norm2\n%type  <e> normf\n\n%token <s> NAME\n%token <s> GREEK\n%token <s> FLOAT\n%token <s> INTEGER\n%token <s> STRING\n%token <s> FUNCTION\n%token <s> FIELD\n\n%token LPAREN\n%token RPAREN\n%token LBRACE\n%token RBRACE\n%token LBRACK\n%token RBRACK\n%token LANGLE\n%token RANGLE\n%token MLINE\n%token MMLINE\n\n%token F\n%token OMEGA\n%token PRINT\n%token PLOT\n%token READ\n%token WRITE\n%token WHILE\n%token FOR\n%token IF\n%token ELIF\n%token ELSE\n%token SUM\n%token DEL\n\n%token SEMICOLON\n%token COMMA\n%token PERIOD\n\n%token ASSIGN\n%token RARROW\n\n%token EOL\n%token END 0 \n\n%token LET\n%token IN\n%token ENDPROG\n\n%left  OR\n%left  AND\n%left  LT GT LE GE EQ NE\n%left  LANGLE RANGLE MLINE\n%left  PLUS MINUS\n%left  SUMMATION\n%left  TIMES DIVIDE\n%left  DERIVATIVE \n%left  NOT NEGATE\n%nonassoc BRAKET\n%right SUBSCRIPT POWER\n\n%printer    { debug_stream () << $$.s; } <>\n\n%%\n\nprogram: LET EOL                                   { driver.add(new Exp(\"Let\")); } \n            letstatements \n         IN EOL                                    { driver.add(new Exp(\"In\")); } \n            statementlist \n\nletstatements: /*empty*/\n        | letstatements letstatement\n\nletstatement:\n          EOL                                      {}\n        | varlist  IN FIELD EOL                    { driver.add(new Exp(\"decl\",$1,new Exp(*$3))); driver.addsyms($1,*$3); }\n        | variable ASSIGN exp EOL                  { driver.add(new Exp(\"=\",$1, $3, $3->type()));\n                                                     if ($1->type() == Exp::UNKNOWN) {\n                                                        $1->set_type($3->type());\n                                                        driver.insert_sym(\"inferring\", $1);\n                                                     }\n                                                   }   \n        | variable ASSIGN paramlist RARROW exp EOL { driver.add(new Exp(\"def\",$1,$3,$5,$5->type())); \n                                                     if ($1->type() == Exp::UNKNOWN) {\n                                                        $1->set_type($5->type());\n                                                        driver.insert_sym(\"inferring\", $1);\n                                                     }\n                                                   }\n        | OMEGA ASSIGN LBRACK exp COMMA exp RBRACK POWER INTEGER EOL\n                                                   { driver.add(new Exp(\"domain\",$4,$6,new Exp(*$9,Exp::INTEGER))); }\n\nstatementlist: \n          /*empty*/ \n        | statementlist statement\n\nstatement:\n          EOL                                      {}\n        | assignment EOL                           { driver.add($1); }\n        | exp EOL                                  { driver.add($1); }\n        | PRINT arglist EOL                        { driver.add(new Exp(\"print\",$2)); }\n        | PLOT arglist EOL                         { driver.add(new Exp(\"plot\",$2)); }\n        | WHILE exp EOL                            { driver.add(new Exp(\"while\",$2)); driver.scopedepth++; } \n        | IF    exp EOL                            { driver.add(new Exp(\"if\",$2)); driver.scopedepth++; } \n        | ELIF  exp EOL                            { driver.add(new Exp(\"elif\",$2)); } \n        | ELSE  EOL                                { driver.add(new Exp(\"else\")); } \n        | FOR variable                             { $2->set_type(Exp::INTEGER); driver.insert_sym(\"inferring\",$2);}\n          IN LBRACK exp COMMA exp RBRACK EOL       { driver.add(new Exp(\"for\",$2,$6,$8)); driver.scopedepth++; }\n        | ENDPROG EOL                              { if(driver.scopedepth==0) {\n                                                       driver.add(new Exp(\"End\")); // End of program\n                                                     }\n                                                     else {\n                                                       driver.scopedepth--;\n                                                       driver.add(new Exp(\"end\")); // End of block\n                                                     }\n                                                   }\n        \nassignment:\n          variable ASSIGN exp                      { $$ = new Exp(\"=\",$1, $3, $3->type());\n                                                     if ($1->type() == Exp::UNKNOWN) {\n                                                        $1->set_type($3->type());\n                                                        driver.insert_sym(\"inferring\", $1);\n                                                     }\n                                                   }  \nsummation:\n          SUM SUBSCRIPT variable ASSIGN exp POWER exp { \n                                                        $3->set_type(Exp::INTEGER); \n                                                        driver.insert_sym(\"inferring\",$3); \n                                                        $$ = new Exp(\"sum\", $3, $5, $7);                                                        \n                                                      } \n\nderivative:\n          DEL SUBSCRIPT exp                        { $$ = new Exp(\"del\",$3); }    \n\nlaplacian: \n          DEL POWER INTEGER                        { $$ = new Exp(\"laplacian\"); if (*$3 != \"2\") driver.error(\"bad power for laplacian?\"); }\n\nbsh:\n          LPAREN exp MINUS DEL POWER INTEGER RPAREN POWER MINUS INTEGER  { $$ = new Exp(\"bsh\",$2); }\n        | DEL POWER MINUS INTEGER                  { $$ = new Exp(\"bsh\",new Exp(\"0.0\",Exp::REAL)); if (*$4 != \"2\") driver.error(\"bad power for inv laplacian?\"); }\n\n\n\nbraket:\n          LANGLE mline RANGLE                      { $$ = $2; }\n        | LANGLE exp RANGLE                        { $$ = new Exp(\"trace\",$2,Exp::brakettype($2->type(),$2->type())); }\n\n\nnormf:\n          MMLINE exp MMLINE SUBSCRIPT F            { $$ = new Exp(\"mathfun\", new Exp(\"normf\"), $2, Exp::REAL); }\n\nnorm2:\n          MMLINE exp MMLINE                        { $$ = new Exp(\"mathfun\", new Exp(\"norm\"), $2, Exp::REAL); }\n\nmline:\n          exp MLINE exp                            { $$ = new Exp(\"braket\", $1, $3, Exp::brakettype($1->type(),$3->type())); }\n\nexp:\n          INTEGER                                  { $$ = new Exp(*$1,Exp::INTEGER); }\n        | STRING                                   { $$ = new Exp(*$1,Exp::STRING); }\n        | FLOAT                                    { $$ = new Exp(*$1,Exp::REAL); }\n        | variable                                 { $$ = $1; } \n        | braket %prec BRAKET                      { $$ = $1; }\n        | exp PLUS exp                             { $$ = new Exp(\"+\",$1,$3); }\n        | exp MINUS exp                            { $$ = new Exp(\"-\",$1,$3); }\n        | exp TIMES exp                            { $$ = new Exp(\"*\",$1,$3); }\n        | exp DIVIDE exp                           { $$ = new Exp(\"/\",$1,$3); }\n        | exp POWER exp SUBSCRIPT exp              { $$ = new Exp(\"^_\",$1,$3,$5,Exp::subscrtype($1->type())); }\n        | exp SUBSCRIPT exp POWER exp              { $$ = new Exp(\"^_\",$1,$5,$3,Exp::subscrtype($1->type())); }\n        | exp POWER exp                            { $$ = new Exp(\"^\",$1,$3,$1->type()); }\n        | exp SUBSCRIPT exp                        { $$ = new Exp(\"_\",$1,$3,Exp::subscrtype($1->type())); }\n        | exp OR exp                               { $$ = new Exp(\"or\",$1,$3); }\n        | exp AND exp                              { $$ = new Exp(\"and\",$1,$3); }\n        | exp LANGLE exp %prec LT                  { $$ = new Exp(\"lt\",$1,$3); }\n        | exp RANGLE exp %prec GT                  { $$ = new Exp(\"gt\",$1,$3); }\n        | exp LE exp                               { $$ = new Exp(\"le\",$1,$3); }\n        | exp GE exp                               { $$ = new Exp(\"ge\",$1,$3); }\n        | exp EQ exp                               { $$ = new Exp(\"eq\",$1,$3); }\n        | exp NE exp                               { $$ = new Exp(\"ne\",$1,$3); }\n        | NOT exp                                  { $$ = new Exp(\"not\",$2); }\n        | MINUS exp                                { $$ = new Exp(\"-\",$2,$2->type()); }\n        | LPAREN exp RPAREN                        { $$ = new Exp(\"()\",$2,$2->type()); }\n        | F            variable                    { $$ = new Exp(\"F\", $2, Exp::funtype($2->type())); }\n        | F     LPAREN variable RPAREN             { $$ = new Exp(\"F\", $3, Exp::funtype($3->type())); }\n        |       MLINE  exp MLINE                   { $$ = new Exp(\"mathfun\", new Exp(\"abs\"), $2, Exp::REAL); }\n        | normf                                    { $$ = $1; }\n        | norm2                                    { $$ = $1; }\n        | FUNCTION LPAREN exp RPAREN               { $$ = new Exp(\"mathfun\", new Exp(*$1), $3); }\n        | variable LPAREN arglist RPAREN           { $$ = new Exp(\"call\", $1, $3, $1->type()); }\n        | derivative exp %prec DERIVATIVE          { $$ = $1; $$->set_type($2->type()); $$->add($2); }\n        | summation  exp %prec SUMMATION           { $$ = $1; $$->set_type($2->type()); $$->add($2); }\n        | laplacian  exp %prec SUMMATION           { $$ = $1; $$->set_type($2->type()); $$->add($2); }\n        | bsh        exp %prec SUMMATION           { $$ = $1; $$->set_type($2->type()); $$->add($2); }\n\nvariable:\n          NAME                          { $$ = new Exp(*$1, driver.lookup_type(*$1)); } \n        | F                             { $$ = new Exp(\"F\", driver.lookup_type(\"F\")); } \n        | FIELD                         { $$ = new Exp(*$1, driver.lookup_type(*$1)); } \n        | GREEK                         { $$ = new Exp(\"greek\", new Exp(*$1), driver.lookup_type(*$1)); }\n\n/* comma separated list of variables used in type declaration */\nvarlist:\n          variable                      { $$ = new Exp(\"varlist\", $1); }\n        | varlist COMMA variable        { $$ = $1; $1->add($3); }\n\n/* comma separated list of variables used to define function parameters */\nparamlist:\n          variable                      { $$ = new Exp(\"paramlist\", $1); }\n        | paramlist COMMA variable      { $$ = $1; $1->add($3); }\n\n/* comma separated list of expressions used to pass arguments to functions */\narglist:\n        exp                             { $$ = new Exp(\"arglist\", $1); }\n        | arglist COMMA exp             { $$ = $1; $1->add($3); }\n\n%%\n\nvoid yy::mra_parser::error (const yy::mra_parser::location_type& l,\n                            const std::string& m)\n{\n  driver.error (l, m);\n}\n"
  },
  {
    "path": "src/examples/compiler/qa",
    "content": "Let\n  k = 6\n  epsilon = 1e-4\n  Omega = [-20, 20]^3\n  r = x -> sqrt(x_0^2 + x_1^2 + x_2^2)\n  g = x -> exp(-r(x))\n  v = x -> -r(x)^-1\nIn\n\n  if 2*2+3 == 7\n     print \"1 OK\"\n  else\n     print \"1 FAIL\"\n  end\n\n  r = sum_i=0^3 sum_j=0^5 i*j\n  if r == 90\n    print \"1a OK\"\n  else\n    print \"1a FAIL\"\n  end\n\n  psi = F g\n  S = < psi | psi >\n  if |S-3.1416| < 1e-4\n    print \"2 OK\"\n  else\n    print \"2 FAIL\"\n  end\n\n  nu = F v  \n  V = < psi | nu * psi >\n  if |V+3.1416| < 1e-4\n    print \"2 OK\"\n  else\n    print \"2 FAIL\"\n  end\n\n  T = 1/2 * sum_i=0^2 < del_i psi | del_i psi >\n  if |T - 1.5708| < 1e-4\n    print \"3 OK\"\n  else\n    print \"3 FAIL\"\n  end\n\nEnd\n"
  },
  {
    "path": "src/examples/csqrt.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <complex>\n\nusing namespace madness;\n\ntypedef Vector<double,1> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<std::complex<double>,1> > functorT;\ntypedef Function<std::complex<double>,1> cfunctionT;\ntypedef FunctionFactory<std::complex<double>,1> factoryT;\ntypedef SeparatedConvolution<std::complex<double>,1> operatorT;\n\nstatic const double R = 1.4;    // bond length\nstatic const double L = 32.0*R; // box size\nstatic const long k = 5;        // wavelet order\nstatic const double thresh = 1e-3; // precision\n\nstatic std::complex<double> f(const coordT& r)\n{\n    return std::complex<double>(0.0,2.0);\n}\n\ntemplate <typename T>\ninline static void csqrt_op(const Key<1>& key, Tensor< T >& t) {\n    UNARY_OPTIMIZED_ITERATOR(T, t, *_p0 = sqrt(*_p0));\n}\n\n\n\nint main(int argc, char** argv)\n{\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<1>::set_refine(true);\n    FunctionDefaults<1>::set_initial_level(2);\n    FunctionDefaults<1>::set_truncate_mode(0);\n    FunctionDefaults<1>::set_cubic_cell(-L/2, L/2);\n\n    cfunctionT boring = factoryT(world).f(f);\n    boring.truncate();\n\n    cfunctionT sqrt_of_boring = copy(boring);\n    sqrt_of_boring.unaryop(&csqrt_op<double_complex>);\n    double error = (square(sqrt_of_boring) - boring).norm2();\n    print(\"error is \", error);\n    world.gop.fence();\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/dataloadbal.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/*!\n  \\file examples/dataloadbal.cc\n  \\brief Illustrates how to use static data/load balancing of functions\n  \\defgroup loadbaleg Data and load balancing\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/dataloadbal.cc>here</a>.\n\n  This is one of the more computationally demanding examples - either run it on\n  50 or more nodes of jaguar or reduce the number of functions employed\n  (value of \\c NFUNC in the source).\n\n  \\par Points of interest\n  - Using functors to incorporate state into functions to be compressed\n  - Using special points in a functor to provide hints to adaptive refinement algorithm\n  - Operating on multiple functions in a vector\n  - Heuristic analysis of function trees to generate a new mapping of data to processor\n  - Installation of the new process map with automatic redistribution of data\n  - Timing to estimate benefit of load balancing\n\n  \\par Background\n\n  Poor distribution of work (load imbalance) is the largest reason for\n  inefficient parallel execution within MADNESS.  Poor data distribution\n  (data imbalance) contributes to load imbalance and also leads to\n  out-of-memory problems due to one or more processes having too much\n  data.  Thus, we are interested in uniform distribution of both\n  work and data.\n\n  Many operations in MADNESS are entirely data driven (i.e.,\n  computation occurs in the processor that \"owns\" the data) since\n  there is insufficient work to justify moving data between processes\n  (e.g., computing the inner product between functions).  However, a\n  few expensive operations can have work shipped to other processors.\n\n  There are presently three load balancing mechanisms within MADNESS\n  - static and driven by the distribution of data,\n  - dynamic via random assignment of work, and\n  - dynamic via work stealing (currently only in prototype).\n\n  Until the work stealing becomes production quality we must exploit\n  the first two forms.  The random work assignment is controlled by\n  options in the FunctionDefaults class.\n  - FunctionDefaults::set_apply_randomize(bool) controls the use of\n  randomization in applying integral (convolution) operators. It is\n  typically beneficial when computing to medium/high precision.\n  - FunctionDefaults::set_project_randomize(bool) constrols the use\n  of randomization in projecting from an analytic form (i.e., C++)\n  into the discontinuous spectral element basis.  It is typically\n  beneficial unless there is already a good static data distribution.\n  Since these options are straightforward to enable, this example\n  focusses on static data redistribution.\n\n  The process map (an instance of WorldDCPmapInterface) controls\n  mapping of data to processors and it is actually quite easy to write\n  your own (e.g., see WorldDCDefaultPmap or LevelPmap) that ensure\n  uniform data distribution.  However, you also seek to incorporate\n  estimates of the computational cost into the distribution.  The\n  class LBDeuxPmap (deux since it is the second such class) in\n  mra/lbdeux.h does this by examining the functions you request and\n  using provided weights to estimate the computational cost.\n  Communication costs are proportional to the number of broken links\n  in the tree.  Since some operations work in the scaling function\n  basis, some in the wavelet basis, and some in non-standard form,\n  there is an element of empiricism in getting best performance from\n  most algorithms.\n\n  \\par Implementation\n\n  The example times how long it takes to perform the following operations\n  - constructing 4000 Gaussian functions with random exponent and origin,\n  - truncating them,\n  - differentiating them, and\n  - applying the Coulomb Green's function to them.\n\n  The process map (data distribution) is then modified using the LBDeux\n  heuristic and the operations repeated.\n\n  \\par Results\n\n  \\verbatim\n  /tmp/work/harrison % aprun -n 50 -d 12 -cc none ./dataloadbal\n  Runtime initialized with 10 threads in the pool and affinity 1 0 2\n  Before load balancing\n  project 2.57 truncate 9.18 differentiate 11.80 convolve 12.57 balance 0.00\n  project 2.74 truncate 9.08 differentiate 11.33 convolve 13.07 balance 0.00\n  project 2.80 truncate 8.84 differentiate 10.76 convolve 12.66 balance 2.19\n  After load balancing\n  project 2.96 truncate 2.56 differentiate 3.28 convolve 9.81 balance 0.00\n  project 3.05 truncate 2.61 differentiate 3.46 convolve 9.24 balance 0.00\n  project 3.01 truncate 2.60 differentiate 3.25 convolve 9.30 balance 0.00\n  \\endverbatim\n\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/vmra.h>\n#include <madness/mra/lbdeux.h>\n#include <madness/constants.h>\nusing namespace madness;\n\nstatic const int NFUNC = 4;\n\n// A class that behaves like a function to compute a Gaussian of given origin and exponent\nclass Gaussian : public FunctionFunctorInterface<double,3> {\npublic:\n    const coord_3d center;\n    const double exponent;\n    const double coefficient;\n    std::vector<coord_3d> specialpt;\n\n    Gaussian(const coord_3d& center, double exponent, double coefficient)\n        : center(center), exponent(exponent), coefficient(coefficient), specialpt(1)\n    {\n        specialpt[0][0] = center[0];\n        specialpt[0][1] = center[1];\n        specialpt[0][2] = center[2];\n    }\n\n    // MADNESS will call this interface\n    double operator()(const coord_3d& x) const {\n        double sum = 0.0;\n        for (int i=0; i<3; i++) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        return coefficient*exp(-exponent*sum);\n    }\n\n    // By default, adaptive projection into the spectral element basis\n    // starts uniformly distributed at the initial level.  However, if\n    // a function is \"spiky\" it may be necessary to project at a finer\n    // level but doing this uniformly is expensive.  This method\n    // enables us to tell MADNESS about points/areas needing deep\n    // refinement (the default is no special points).\n    std::vector<coord_3d> special_points() const {\n        return specialpt;\n    }\n};\n\n// Makes a new square-normalized Gaussian functor with random origin and exponent\nreal_functor_3d random_gaussian() {\n    const double expntmin=1e-1;\n    const double expntmax=1e4;\n    const real_tensor& cell = FunctionDefaults<3>::get_cell();\n    coord_3d origin;\n    for (int i=0; i<3; i++) {\n        origin[i] = RandomValue<double>()*(cell(i,1)-cell(i,0)) + cell(i,0);\n    }\n    double lo = log(expntmin);\n    double hi = log(expntmax);\n    double expnt = exp(RandomValue<double>()*(hi-lo) + lo);\n    double coeff = pow(2.0*expnt/constants::pi,0.75);\n    return real_functor_3d(new Gaussian(origin,expnt,coeff));\n}\n\n// This structure is used to estimate the cost of computing on a block of coefficients\n// The constructor saves an estimate of the relative cost of computing on\n// leaf (scaling function) or interior (wavelet) coefficients.  Unless you\n// are doing nearly exclusively just one type of operation the speed is\n// not that sensitive to the choice, so the default is usually OK.\n//\n// The operator() method is invoked for each block of coefficients\n// (function node) to estimate the cost. Since pretty much everything\n// involves work at the top of the tree we give levels 0 and 1 a 100x\n// multiplier to avoid them being a bottleneck.\nstruct LBCost {\n    double leaf_value;\n    double parent_value;\n    LBCost(double leaf_value=1.0, double parent_value=1.0)\n        : leaf_value(leaf_value)\n        , parent_value(parent_value)\n    {}\n\n    double operator()(const Key<3>& key, const FunctionNode<double,3>& node) const {\n        if (key.level() <= 1) {\n            return 100.0*(leaf_value+parent_value);\n        }\n        else if (node.is_leaf()) {\n            return leaf_value;\n        }\n        else {\n            return parent_value;\n        }\n    }\n};\n\nvoid test(World& world, bool doloadbal=false) {\n    double start;\n    vector_real_function_3d f(NFUNC);\n\n    default_random_generator.setstate(99); // Ensure all processes have the same state\n\n    // By default a sychronization (fence) is performed after projecting a new function\n    // but if you are projecting many functions this is inefficient.  Here we turn\n    // off the fence when projecting, and do it manually just once.\n    start = wall_time();\n    for (int i=0; i<NFUNC; i++)\n        f[i] = real_factory_3d(world).functor(random_gaussian()).nofence();\n    world.gop.fence();\n    double projection = wall_time() - start;\n\n    start = wall_time();\n    truncate(world, f);\n    double truncation = wall_time() - start;\n\n    start = wall_time();\n    Derivative<double,3> Dx(world,0);\n    apply(world, Dx, f); // Computes vector of derivatives and discards result\n    double differentiation = wall_time() - start;\n\n    // Make the Coulomb operator\n    real_convolution_3d op = CoulombOperator(world, 1e-2, 1e-6);\n\n    start = wall_time();\n    apply(world, op, f); // Applies Coulomb GF and discards result\n    double convolution = wall_time() - start;\n\n    start = wall_time();\n    if (doloadbal) {\n        LoadBalanceDeux<3> lb(world);\n        for (int i=0; i<NFUNC; i++)\n            lb.add_tree(f[i], LBCost(2.0,1.0));\n\n        // Calling redistribute() installs the new process map and\n        // redistributes all functions using the old process map.\n        // This is almost always what you want.  However, since we\n        // know that we are about to throw away our functions (f) we\n        // could simply call set_pmap() that installs the new map but\n        // does not redistribute.\n        FunctionDefaults<3>::redistribute(world, lb.load_balance(2.0,false));\n    }\n    double loadbal = wall_time() - start;\n\n    if (world.rank() == 0) printf(\"project %.2f truncate %.2f differentiate %.2f convolve %.2f balance %.2f\\n\",\n                                  projection, truncation, differentiation, convolution, loadbal);\n}\n\nint main(int argc, char** argv) {\n  // Initialize the parallel programming environment\n  initialize(argc,argv);\n  World world(SafeMPI::COMM_WORLD);\n\n  // Load info for MADNESS numerical routines\n  startup(world,argc,argv);\n\n  // Set/override defaults\n  FunctionDefaults<3>::set_cubic_cell(-20,20);\n  FunctionDefaults<3>::set_apply_randomize(false);\n  FunctionDefaults<3>::set_project_randomize(false);\n  FunctionDefaults<3>::set_truncate_on_project(true);\n\n  // First three without data redistribution\n  if (world.rank() == 0) print(\"Before load balancing\");\n  test(world);\n  test(world);\n  test(world, true);\n\n  // At end of last test data was redistributed, repeat again three times\n  if (world.rank() == 0) print(\"After load balancing\");\n  test(world);\n  test(world);\n  test(world);\n\n  finalize();\n\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/density_smoothing.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n */\n\n/*!\n  \\file examples/density_smoothing.cc\n  \\brief solve the HF equations using numerical exponential MOs\n\n  The source is\n  <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/density_smoothing.cc>here</a>.\n\n */\n#include \"smooth.h\"\n#include\"madness/mra/commandlineparser.h\"\n#include<madness/misc/info.h>\n\n\nusing namespace madness;\n\n\nint main(int argc, char** argv) {\n\tinitialize(argc, argv);\n\tWorld world(SafeMPI::COMM_WORLD);\n\tif (world.rank() == 0) {\n\t\tprint(\"\\n  Density Smoothing for XC kernel \\n\");\n\t\tprintf(\"starting at time %.1f\\n\", wall_time());\n\t\tprint(\"\\nmain() compiled at \",__TIME__,\" on \",__DATE__);\n\n\t}\n\tstartup(world,argc,argv);\n\tstd::cout.precision(6);\n\n\tif (world.rank()==0) {\n\t\tprint(\"           git source description ...\", info::git_source_description());\n\t}\n\n\ttry {\n\n\t\tif(world.rank()==0){\n\t\t\tstd::cout << \"Converge Orbitals with Nemo\" << std::endl;\n\t\t}\n\n\t\tcommandlineparser parser(argc,argv);\n        Nemo nemo(world,parser);\n        auto calc=nemo.get_calc();\n\t\tif (world.rank()==0) {\n\t\t\tcalc->molecule.print();\n\t\t\tprint(\"\\n\");\n\t\t\tcalc->param.print(\"dft\");\n\t\t}\n\n\t\t// compute the energy to get converged orbitals\n\t\tconst double energy=nemo.value();\n\t\tif (world.rank()==0) {\n\t\t\tprintf(\"final energy   %12.8f\\n\", energy);\n\t\t\tprintf(\"finished at time %.1f\\n\", wall_time());\n\t\t}\n\n\t\tif(world.rank()==0){\n\t\t\tstd::cout << \"\\n\\nSmooth Density:\" << std::endl;\n\t\t\tstd::cout << \"Orbital energie \\n\";\n\t\t\tstd::cout << \"3D Threshold is \" << FunctionDefaults<3>::get_thresh() << std::endl;\n\t\t\tstd::cout << \"\\n\\n\";\n\t\t}\n\n\t\tconst size_t norb = nemo.get_calc()->amo.size();\n\t\tstd::vector<double> eps;\n\t\tfor(size_t i=0;i<norb;i++){\n\t\t\teps.push_back(nemo.get_calc()->aeps(i));\n\t\t}\n\t\tusing madness::operators::operator<<;\n\t\tstd::cout << \"Orbital energies\\n \" << eps << std::endl;\n\n\t\treal_function_3d density = real_factory_3d(world);\n\t\tdouble width = FunctionDefaults<3>::get_cell_min_width()/2.0 - 1.e-3;\n\t\treal_function_3d R2 = nemo.ncf->square();\n\t\tfor(auto x:nemo.get_calc()->amo){\n\t\t\t//x.truncate();\n\t\t\tx.refine();\n\t\t\tx.scale(-1.0);\n\t\t\treal_function_3d xsquare = x*x;\n\t\t\tplot_plane(world,xsquare,\"xsquare\");\n\t\t\tplot_plane(world,x,\"xorbital\");\n\t\t\tplot_plane(world,x,\"R2\");\n\t\t\tcoord_3d start(0.0); start[0]=-width;\n\t\t\tcoord_3d end(0.0); end[0]=width;\n\t\t\tconst std::string line = \"line\";\n\t\t\tplot_line((line+\"_xorbital\").c_str(),1000,start,end,x);\n\t\t\tplot_line((line + \"_xsquare\").c_str(),1000,start,end,xsquare);\n\t\t\tplot_line((line+\"_R2\").c_str(),1000,start,end,R2);\n\t\t\tdensity+=xsquare;\n//\t\t\treal_function_3d amoR = x*nemo.nuclear_correlation->square();\n//\t\t\tdensity += amoR*x;\n\t\t}\n\t\tdensity=density*nemo.ncf->square();\n\t\tdensity.truncate(FunctionDefaults<3>::get_thresh()*0.01);\n\t\tsmooth<double,3> smoothing(world);\n\t\tsmoothing.smooth_density_from_orbitals(nemo.get_calc()->amo);\n\t\t//smoothing.set_molecule_mask(1.0,1.0,nemo.get_calc()->molecule.get_atoms());\n\n\n\n\n\n\t} catch (const SafeMPI::Exception& e) {\n\t\tprint(e);\n\t\terror(\"caught an MPI exception\");\n\t} catch (const madness::MadnessException& e) {\n\t\tprint(e);\n\t\terror(\"caught a MADNESS exception\");\n\t} catch (const madness::TensorException& e) {\n\t\tprint(e);\n\t\terror(\"caught a Tensor exception\");\n\t} catch (const char* s) {\n\t\tprint(s);\n\t\terror(\"caught a string exception\");\n\t} catch (const std::string& s) {\n\t\tprint(s);\n\t\terror(\"caught a string (class) exception\");\n\t} catch (const std::exception& e) {\n\t\tprint(e.what());\n\t\terror(\"caught an STL exception\");\n\t} catch (...) {\n\t\terror(\"caught unhandled exception\");\n\t}\n\n\n\tfinalize();\n\treturn 0;\n}\n"
  },
  {
    "path": "src/examples/derivatives.cc",
    "content": "\n/* The following goes through each derivative model and runs the macro tests using that model.\n * To load the new derivative models, you create the derivative operator normally, then use the \n * \"set_deriv_type#()\" function. See lines 413 - 437 for examples.\n */\n\n#include <madness/mra/mra.h>\n#include <madness/mra/funcplot.h>\n#include <string>\n\nusing namespace madness;\n\n// Constants for use in tests\nconst double L = 16.0;   // box size [-L,L]^3\nconst double a_gaussian = 1.0; \nconst std::size_t bufsize=256;\n\n// Analytic gaussian function\ndouble gaussian(const coord_3d& r) {\n    const double a = a_gaussian;\n    const double fac = std::pow(2*a/constants::pi,0.75);\n    const double x=r[0], y=r[1], z=r[2];\n    return fac*exp(-a*(x*x+y*y+z*z));\n}\n// Analytic first derivative of gaussian function\ndouble gaussian1(const coord_3d& r) {\n    const double a = a_gaussian;\n    const double fac = std::pow(2*a/constants::pi,0.75);\n    const double x=r[0], y=r[1], z=r[2];\n    return -2.0*a*x*fac*exp(-a*(x*x+y*y+z*z));\n}\n// Analytic second derivative of gaussian function\ndouble gaussian2(const coord_3d& r) {\n    const double a = a_gaussian;\n    const double fac = std::pow(2*a/constants::pi,0.75);\n    const double x=r[0], y=r[1], z=r[2];\n    return (4.0*a*a*x*x - 2.0*a)*fac*exp(-a*(x*x+y*y+z*z));\n}\n// Analytic third derivative of gaussian function\ndouble gaussian3(const coord_3d& r) {\n    const double a = a_gaussian;\n    const double fac = std::pow(2*a/constants::pi,0.75);\n    const double x=r[0], y=r[1], z=r[2];\n    return (12.0*a*a*x - 8.0*a*a*a*x*x*x)*fac*exp(-a*(x*x+y*y+z*z));\n}\n// Expectation value of gaussian\ndouble gaussian_energy() {\n    double a = a_gaussian;\n    return a;\n}\n\n// Define functions\nconst std::string funcname = \"gaussian\";\ndouble (*f )(const coord_3d&) = gaussian;\ndouble (*f1)(const coord_3d&) = gaussian1;\ndouble (*f2)(const coord_3d&) = gaussian2;\ndouble (*f3)(const coord_3d&) = gaussian3;\ndouble (*energy)() = gaussian_energy;\n\nclass F : public FunctionFunctorInterface<double,3> {\nprivate:\n    double(*f)(const coord_3d&);\n    std::vector<coord_3d> pts;\npublic:\n    F(double(*f)(const coord_3d&), const coord_3d& pt) : f(f), pts(1,pt) {}\n\n    double operator()(const coord_3d& r) const {return f(r);}\n\n    std::vector<coord_3d> special_points() const {return pts;}\n};\n\nchar* p(char* buf, const char* name, int k, int initial_level, double thresh, int order) {\n    snprintf(buf, bufsize, \"%s-%02d-%02d-%.1e-%d.dat\", name, k, initial_level, thresh, order);\n    return buf;\n}\n\ntemplate <typename funcT>\nTensor<double> tabulate(funcT& f, const std::vector<coord_3d>& pts) {\n  Tensor<double> v(pts.size());\n  int i=0;\n  for (auto pt : pts) {\n    v[i++] = f(pt);\n  }\n  return v;\n}\n\nstd::vector<coord_3d> make_pts(size_t n, double lo, double hi) {\n  std::vector<coord_3d> pts;\n  double h = (hi-lo)/(n-1);\n  for (size_t i=0; i<n; i++) {\n    double x = lo + h*i;\n    pts.push_back(coord_3d({x,0.0,0.0}));\n  }\n  return pts;\n}\n\nvoid plotter1(const std::string& fname, const std::vector<coord_3d>& pts, real_function_3d& g0, real_function_3d& g1, real_function_3d& g2, real_function_3d& g3) {\n  Tensor<double> g0numer = tabulate(g0 , pts);\n  Tensor<double> g1numer = tabulate(g1, pts);\n  Tensor<double> g2numer = tabulate(g2, pts);\n  Tensor<double> g3numer = tabulate(g3, pts);\n  Tensor<double> g0exact = tabulate(f , pts);\n  Tensor<double> g1exact = tabulate(f1, pts);\n  Tensor<double> g2exact = tabulate(f2, pts);\n  Tensor<double> g3exact = tabulate(f3, pts);\n\n  FILE* file = fopen(fname.c_str(), \"w\");\n  for (size_t i=0; i<pts.size(); i++) {\n    fprintf(file,\"%21.12e %21.12e %21.12e %21.12e %21.12e %21.12e %21.12e %21.12e %21.12e %21.12e %21.12e \\n\", \n\t    pts[i][0], pts[i][1], pts[i][2], g0numer[i], g0exact[i], g1numer[i], g1exact[i], g2numer[i], g2exact[i], g3numer[i], g3exact[i]);\n  }\n\n  fclose(file);\n}\n\nvoid plotter2(const std::string& fname, const std::vector<coord_3d>& pts, real_function_3d& g0, real_function_3d& g2) {\n  Tensor<double> g0numer = tabulate(g0 , pts);\n  Tensor<double> g2numer = tabulate(g2, pts);\n  Tensor<double> g0exact = tabulate(f , pts);\n  Tensor<double> g2exact = tabulate(f2, pts);\n\n  FILE* file = fopen(fname.c_str(), \"w\");\n  for (size_t i=0; i<pts.size(); i++) {\n    fprintf(file,\"%21.12e %21.12e %21.12e %21.12e %21.12e %21.12e %21.12e\\n\", \n\t    pts[i][0], pts[i][1], pts[i][2], g0numer[i], g0exact[i], g2numer[i], g2exact[i]);\n  }\n\n  fclose(file);\n}\n \nvoid plotter3(const std::string& fname, const std::vector<coord_3d>& pts, real_function_3d& g0, real_function_3d& g3) {\n  Tensor<double> g0numer = tabulate(g0 , pts);\n  Tensor<double> g3numer = tabulate(g3, pts);\n  Tensor<double> g0exact = tabulate(f , pts);\n  Tensor<double> g3exact = tabulate(f3, pts);\n\n  FILE* file = fopen(fname.c_str(), \"w\");\n  for (size_t i=0; i<pts.size(); i++) {\n    fprintf(file,\"%21.12e %21.12e %21.12e %21.12e %21.12e %21.12e %21.12e \\n\", \n\t    pts[i][0], pts[i][1], pts[i][2], g0numer[i], g0exact[i], g3numer[i], g3exact[i]);\n}\n \n  fclose(file);\n}\n\nvoid test(World& world, int k, int initial_level, double thresh, int truncmode, bool refine) {\n\n    char buf[bufsize];\n\n    print(\"\\n\\n\\n\");\n    print(\"testing function:\", funcname, \"k:\", k, \"initial level:\", initial_level, \"thresh:\", thresh, \"truncmode:\", truncmode, \"refine:\", refine);\n    print(\"\\n\");\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_refine(refine);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_initial_level(initial_level);\n    FunctionDefaults<3>::set_truncate_mode(truncmode); \n    FunctionDefaults<3>::set_truncate_on_project(true); \n\n    const double lo=-L, hi=L;\n    const size_t npts = 10001;\n    const std::vector<coord_3d> pts = make_pts(npts, lo+1e-13, hi-1e-13); // Sampling points\n\n    std::string model;\n\n    FunctionDefaults<3>::set_cubic_cell(lo,hi);\n    \n    Derivative<double,3> D = free_space_derivative<double,3>(world, 0);\n    if (funcname == \"sin\"){\n        FunctionDefaults<3>::set_bc(BC_PERIODIC);\n    }\n    \n    double g0norm, g1norm, g2norm, g3norm;\n    \n    {\n      real_functor_3d gfunctor(new F(f1,{0,0,0}));\n      real_function_3d g1  = real_factory_3d(world).functor(gfunctor).thresh(1e-4);\n      g1norm = g1.norm2();\n    }\n    {\n      real_functor_3d gfunctor(new F(f2,{0,0,0}));\n      real_function_3d g2  = real_factory_3d(world).functor(gfunctor).thresh(1e-4);\n      g2norm = g2.norm2();\n    }\n    {\n      real_functor_3d gfunctor(new F(f3,{0,0,0}));\n      real_function_3d g3 = real_factory_3d(world).functor(gfunctor).thresh(1e-4);\n      g3norm = g3.norm2();\n    }\n\n    real_functor_3d gfunctor(new F(f,{0,0,0}));\n    real_function_3d g  = real_factory_3d(world).functor(gfunctor);\n    g0norm = g.norm2();\n    \n    const double e = energy();\n    \n#define PRINT(what,value) print(\"@\", initial_level, \",\", k, \",\", thresh, \",\", model, \",\", what, \",\", value)\n    \n    model = \"project\";\n    \n    print(\"@ headings, initial_level, k, model, what, value\");\n    \n    PRINT(\"g0norm\", g0norm);\n    PRINT(\"g1norm\", g1norm);\n    PRINT(\"g2norm\", g2norm);\n    PRINT(\"energyexact\", e);\n\n// Prints relevant values for a first derivative    \n#define DOIT1 \\\n \treal_function_3d g1 = D(g);  \\\n \treal_function_3d g2 = D(g1); \\\n \treal_function_3d g3 = D(g2); \\\n \tPRINT(\"relerrg1\", g1.err(f1)/g1norm); \\\n \tPRINT(\"relerrg2\", g2.err(f2)/g2norm); \\\n \tPRINT(\"relerrg3\", g3.err(f3)/g3norm); \\\n\tPRINT(\"e-<g1|g1>\", e-g1.inner(g1));   \\\n \tPRINT(\"e+<g|g2>\", e+g.inner(g2));     \\\n        plotter1(p(buf,model.c_str(),k,initial_level,thresh,1), pts, g, g1, g2, g3);\n\n// Prints relevant values for a second derivative\n#define DOIT2 \\\n\treal_function_3d g2 = D(g); \\\n \tPRINT(\"relerrg2\", g2.err(f2)/g2norm); \\\n \tPRINT(\"e+<g|g2>\", e+g.inner(g2));     \\\n        plotter2(p(buf,model.c_str(),k,initial_level,thresh,2), pts, g, g2);\n\n// Prints relevant values for a third derivative\n#define DOIT3 \\\n \treal_function_3d g3 = D(g); \\\n \tPRINT(\"relerrg3\", g3.err(f3)/g3norm); \\\n        plotter3(p(buf,model.c_str(),k,initial_level,thresh,3),  pts, g, g3);\n\n    {\n        model = \"abgv\";\n\tDOIT1;\n    }\n\n    {\n        model = \"ble-1\";\n        D.set_ble1();\n\tDOIT1;\n    }\n\n    {\n        model = \"ble-2\";\n        D.set_ble2();\n\tDOIT2;\n    }\n\n    {\n        model = \"bspline-1\";\n        D.set_bspline1();\n\tDOIT1;\n    }\n\n    {\n        model = \"bspline-2\";\n        D.set_bspline2();\n\tDOIT2;\n    }\n\n    {\n        model = \"bspline-3\";\n        D.set_bspline3();\n        DOIT3;\n    }\n\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    std::cout.precision(10);\n\n    if(world.rank() == 0) print(\"\\n\\nBLE derivatives are available for k = 1 to k = 15.\\nBspline derivatives are available for k = 1 to k = 18.\\n\");\n\n    double thresh = 1e-4;\n    int initial_level = 4; \n    for (int k=7; k<15; k+=2) {\n       test(world, k, initial_level, thresh, 1, true);\n    }\n\n    world.gop.fence();\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/dielectric.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n  \\file examples/dielectric.cc\n  \\brief Example solution of Poisson's equation in a dielectric (polarizable) medium\n  \\defgroup exampledielectric Poisson's equation in a dielectric medium\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/dielectric.cc>here</a>.\n\n  \\par Points of interest\n  - use of iterative equation solver\n  - convolution with the Green's function\n  - unary operator to compute reciprocal of a function\n  - use of diffuse domain approximation to represent interior surfaces\n  - line and volume plots\n\n  \\par Background\n\n  We wish to solve Poisson's equation within a non-homogeneous medium, i.e.,\n  in which the permittivity is not constant.\n  \\f[\n  \\nabla . \\left( \\epsilon(r) \\nabla u(r)  \\right) = - 4 \\pi \\rho(r)\n  \\f]\n  Expanding and rearranging yields,\n  \\f[\n     \\nabla^2 u(r) = - \\frac{1}{\\epsilon(r)} \\left( 4 \\pi \\rho(r) + \\nabla \\epsilon(r) .  \\nabla u(r) \\right)\n  \\f]\n  We can interpret \\f$\\rho / \\epsilon\\f$ as the effective free charge density\n  and \\f$\\nabla \\epsilon . \\nabla u / \\epsilon\\f$ as the induced surface charge density.\n  Assuming free-space boundary conditions at long range we can invert the Laplacian\n  by convolution with the free-space Green's function that is \\f$-1 / 4 \\pi |r-s|\\f$.\n  Note that MADNESS provides convolution with \\f$G(r,s) = 1/|r-s|\\f$ so you have to\n  keep track of the \\f$-1/4\\pi\\f$ yourself.\n\n  Thus, our equation becomes (deliberately written in the form of a\n  fixed point iteration --- given a guess for \\f$u\\f$ we can compute\n  the r.h.s. and directly obtain a new value for \\f$u\\f$ that hopefully\n  is closer to the solution)\n  \\f[\n     u = G * \\left(\\rho_{\\mbox{vol}} + \\rho_{\\mbox{surf}} \\right)\n  \\f]\n  where\n  \\f[\n     \\rho_{\\mbox{vol}} = \\frac{\\rho}{\\epsilon}\n  \\f]\n  and\n  \\f[\n     \\rho_{\\mbox{surf}} = \\frac{\\nabla \\epsilon .  \\nabla u}{4 \\pi \\epsilon}\n  \\f]\n\n  Let's solve a problem to which we know the exact answer --- a point\n  charge at the center of a sphere \\f$R=2\\f$.  Inside the sphere the permittivity\n  is \\f$\\epsilon_1 = 1\\f$ and outside it is \\f$\\epsilon_2 = 10\\f$.  The exact\n  solution is\n  \\f[\n     u(r) =\n            \\left \\lbrace\n               \\begin{array}{cc}\n                    \\frac{1}{\\epsilon_2 |r|} & |r| > R \\\\\n                    \\frac{1}{\\epsilon_1 |r|} + \\left( \\frac{1}{\\epsilon_2} - \\frac{1}{\\epsilon_1} \\right) \\frac{1}{R}  & |r| < R\n               \\end{array}\n            \\right .\n  \\f]\n  The surface charge density integrated over the suface has the value\n  \\f[\n     q_{\\mbox{surface}} = -\\frac{\\epsilon_2 - \\epsilon_1}{\\epsilon_2} = -0.9\n  \\f]\n\n  To implement the problem in MADNESS we want the permittivity defined\n  as a function over all space, so we define a characteristic function\n  \\f$C(r)\\f$ (or mask) that is defined to be one inside the sphere and\n  zero outside\n  \\f[\n    C(r) = H(R-|r|)\n  \\f]\n  where \\f$H(x)\\f$ is the Heaviside step function.  Hence, we have\n  \\f[\n     \\epsilon(r) = \\epsilon_1 C(r) + \\epsilon_2 \\left( 1 - C(r) \\right)\n  \\f]\n  To smooth the discontinuity we replace the Heaviside step function\n  with\n  \\f[\n     H(x,\\sigma) = \\frac{1}{2} \\left( 1 + \\mathop{\\mathrm{erf}} \\frac{x}{\\sigma} \\right)\n  \\f]\n  where \\f$\\sigma\\f$ is the effective width of the step (0.2 in the code).  Similarly, the\n  point charge is replaced by a suitably normalized Gaussian with a an\n  exponent sufficiently large as to appear as a point charge (delta\n  function) on the scale of interest (we pick \\f$\\xi=100\\f$)\n  \\f[\n     \\rho(r) = \\left(\\pi \\xi \\right)^{-3/2} e^{-\\xi |r|^2}\n  \\f]\n\n  Starting from an initial guess we could try to iterate\n  our equation for \\f$u(r)\\f$ but, sadly, this does not converge reliably.\n  The simplest approach is to introduce some damping or step restriction.\n  With \\f$m\\f$ indicating the iteration number, we write\n  \\f[\n     u^{(m+1)} = \\alpha u^{(m)} + (1-\\alpha) G * \\left(\\rho^{(m)}_{\\mbox{vol}} + \\rho^{(m)}_{\\mbox{surf}} \\right)\n  \\f]\n  with \\f$ \\alpha \\in [0,1]\\f$ .  This works (for sufficiently small \\f$\\alpha\\f$)\n  and is implemented in the code.\n\n  A more robust approach is to use a solver that exploits information\n  from previous iterations (the Krylov subspace) to estimate the\n  optimal direction and length of the step to take.  Such a\n  solver is provided by nonlinsol.h.  Each iteration we pass\n  the current solution and corresponding residual to the solver\n  and it provides the next trial vector.\n\n  In the code you can switch between using the solver or simple iteration\n  by changing the value of \\c USE_SOLVER .\n\n  One final point is how to compute the reciprocal of the\n  permittivity.  This operation is not provided explicity by MADNESS,\n  in part because even functions that are\n  analytically never zero, might be (nearly) zero due to numerical truncation.\n  Handling this issue correctly is problem specific.  More generally,\n  we want to compute a function-of-a-function.  If \\f$f(r)\\f$\n  is a MADNESS function that takes a d-dimensional vector as its\n  argument (in this examaple \\f$d=3\\f$) and \\f$F(x)\\f$ is computable\n  function that takes a scalar argument, we want to compute the\n  new MADNESS function\n  \\f[\n      g(r) = F(f(r))\n  \\f]\n  There are various ways to do this.  The simplest is employed here ---\n  we define a function (\\c reciprocal() ) that is passed into the\n  \\c unaryop() method that modifies the function \\em in-place.\n  This simple approach is justified here since we know our\n  input function is never zero even due to numerical noise,\n  and the output function is about as smooth as the input.\n  If it were not, we might have to refine the input function\n  to obtain the desired precision.\n\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/funcplot.h>\n#include <madness/tensor/solvers.h>\n#include \"molecularmask.h\"\n#include <madness/mra/nonlinsol.h>\n#include <madness/constants.h>\n#include <vector>\n\nusing namespace madness;\nusing namespace std;\n\nconst int k = 6; // wavelet order\nconst double thresh = 1e-4; // truncation threshold\nconst double L = 5; // box is [-L,L]\nconst double sigma = 0.1; // Surface width\n\nconst double epsilon_0 = 1.0; // Interior dielectric\nconst double epsilon_1 =10.0; // Exterior dielectric\nconst double R = 2.0; // Radius of cavity\n\n// Crude macro for timing\ndouble XXstart;\n#define TIME(MSG,X) XXstart=wall_time();         \\\n                    X; \\\n                    if (world.rank() == 0) print(\"timer:\",MSG,\"used\",wall_time()-XXstart) \\\n\n\ndouble reciprocal(double x) {\n    return 1.0/x;\n    }\n\ndouble charge_function(const coord_3d& r) {\n    const double expnt = 100.0;\n    const double coeff = pow(1.0/constants::pi*expnt,0.5*3);\n    return coeff*exp(-expnt*(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]));\n}\n\ndouble exact_function(const coord_3d& x) {\n    const double expnt = 100.0;\n    double r = sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\n\n    if (r > R) {\n        return 1.0/(epsilon_1*r);\n    }\n    else {\n        return erf(sqrt(expnt)*r)/(epsilon_0*r)\n            + (1.0/epsilon_1 - 1.0/epsilon_0)/R;\n    }\n}\n\nint main(int argc, char **argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n    coord_3d lo(0.0), hi(0.0); // Range for line plotting\n    lo[0] =-5.0;\n    hi[0] = 5.0;\n\n    // Function defaults\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_cubic_cell(-L, L);\n    FunctionDefaults<3>::set_initial_level(3);\n    FunctionDefaults<3>::set_truncate_on_project(true);\n    //FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_bc(BC_FREE);\n\n    // The Coulomb operator (this is just 1/r ... whereas the notes are -1/4pir)\n    real_convolution_3d op = CoulombOperator(world, sigma*0.001, thresh*0.1);\n\n    // Derivative operators\n    real_derivative_3d Dx = free_space_derivative<double,3>(world, 0);\n    real_derivative_3d Dy = free_space_derivative<double,3>(world, 1);\n    real_derivative_3d Dz = free_space_derivative<double,3>(world, 2);\n\n    // We will have one sphere of radius R centered at the origin\n    vector<double> atomic_radii(1,R);\n    vector<coord_3d> atomic_coords(1,coord_3d(0.0));\n    print(\"k     \", k);\n    print(\"thresh\", thresh);\n    print(\"L     \", L);\n    print(\"sigma \", sigma);\n    print(\"eps0  \", epsilon_0, \"  eps1  \", epsilon_1);\n    print(\"radii \", atomic_radii);\n    print(\"coords\", atomic_coords);\n\n    // Functors for mask related quantities\n    auto volume_functor = MolecularVolumeMask(sigma, atomic_radii, atomic_coords);\n    auto gradx_functor = MolecularVolumeMaskGrad(sigma, atomic_radii, atomic_coords, 0);\n    auto grady_functor = MolecularVolumeMaskGrad(sigma, atomic_radii, atomic_coords, 1);\n    auto gradz_functor = MolecularVolumeMaskGrad(sigma, atomic_radii, atomic_coords, 2);\n    auto surface_functor = MolecularSurface(sigma, atomic_radii, atomic_coords);\n\n    // Make the actual functions\n    TIME(\"make volume \", real_function_3d volume = real_factory_3d(world).functor(volume_functor));\n    TIME(\"make gradx  \", real_function_3d gradx = real_factory_3d(world).functor(gradx_functor));\n    TIME(\"make grady  \", real_function_3d grady = real_factory_3d(world).functor(grady_functor));\n    TIME(\"make gradz  \", real_function_3d gradz = real_factory_3d(world).functor(gradz_functor));\n    TIME(\"make surface\", real_function_3d surface = real_factory_3d(world).functor(surface_functor));\n    TIME(\"make charge \", real_function_3d charge = real_factory_3d(world).f(charge_function));\n    TIME(\"make exact  \", real_function_3d exact = real_factory_3d(world).f(exact_function));\n\n    // Reciprocal of the dielectric function\n    real_function_3d rdielectric = epsilon_0*volume + epsilon_1*(1.0-volume);\n    rdielectric.unaryop(reciprocal);\n\n    // Gradient of the dielectric function\n    real_function_3d di_gradx = (epsilon_0-epsilon_1)*gradx;\n    real_function_3d di_grady = (epsilon_0-epsilon_1)*grady;\n    real_function_3d di_gradz = (epsilon_0-epsilon_1)*gradz;\n\n    // Print some values for sanity checking\n    print(\"the volume is\", volume.trace());\n    print(\"the area   is\", surface.trace());\n    print(\"the charge is\", charge.trace());\n\n    // Free up stuff we are not using any more to save memory\n    volume.clear();\n    surface.clear();\n    gradx.clear();\n    grady.clear();\n    gradz.clear();\n\n    const double rfourpi = 1.0/(4.0*constants::pi);\n    charge = rdielectric*charge;\n\n    // Initial guess is constant dielectric\n    real_function_3d u = op(charge).truncate();\n    double unorm = u.norm2();\n\n    const bool USE_SOLVER = true;\n\n    if (USE_SOLVER) {\n        // This section employs a non-linear equation solver from solvers.h\n        // and nonlinsol.h as described in\n        // http://onlinelibrary.wiley.com/doi/10.1002/jcc.10108/abstract\n        NonlinearSolver solver;\n        for (int iter=0; iter<20; iter++) {\n            real_function_3d surface_charge =\n                rfourpi*rdielectric*(di_gradx*Dx(u) + di_grady*Dy(u) + di_gradz*Dz(u));\n            real_function_3d r = (u - op(charge + surface_charge)).truncate();\n\n            real_function_3d unew = solver.update(u, r);\n\n            double change = (unew-u).norm2();\n            double err = (u-exact).norm2();\n            print(\"iter\", iter, \"change\", change, \"err\", err,\n                  \"exact(3.0)\", exact(coord_3d(3.0)), \"soln(3.0)\", u(coord_3d(3.0)),\n                  \"surface charge\", surface_charge.trace());\n\n            if (change > 0.3*unorm)\n                u = 0.5*unew + 0.5*u;\n            else\n                u = unew;\n\n            if (change < 10.0*thresh) break;\n        }\n    }\n    else {\n        // This section employs a simple iteration with damping (step restriction)\n        for (int iter=0; iter<20; iter++) {\n            real_function_3d u_prev = u;\n            real_function_3d surface_charge =\n                rfourpi*rdielectric*(di_gradx*Dx(u) + di_grady*Dy(u) + di_gradz*Dz(u));\n            u = op(charge + surface_charge).truncate();\n\n            double change = (u-u_prev).norm2();\n            double err = (u-exact).norm2();\n            print(\"iteration\", iter, change, err, exact(coord_3d(3.0)), u(coord_3d(3.0)), surface_charge.trace());\n            if (change > 0.3*unorm) u = 0.5*u + 0.5*u_prev;\n            if (change < 10.0*thresh) break;\n        }\n    }\n\n\n    plot_line(\"testpot.dat\", 301, lo, hi, u, exact);\n    real_tensor cell(3,2);\n    cell(_,0) = -4.0;\n    cell(_,1) =  4.0;\n\n    plotdx(u, \"testpot.dx\", cell);\n    plotdx(exact, \"exact.dx\", cell);\n    plotdx(u-exact, \"err.dx\", cell);\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/dielectric_external_field.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n  \\file dielectric_external_field.cc\n  \\brief Example solution of Laplace's equations for dielectric sphere in an external field\n  \\defgroup exampledielectricfield Laplace's equations for dielectric sphere in an external field\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/dielectric_external_field.cc>here</a>.\n\n  \\par Points of interest\n  - use of iterative equation solver\n  - convolution with the Green's function\n  - use of diffuse domain approximation to represent interior surfaces\n  - line and volume plots\n  - imposition of exterior Neumann boundary conditions\n\n  \\par Background\n\n  We wish to solve Laplaces's equation within a non-homogeneous medium, i.e.,\n  in which the permittivity is not constant, with an external electric field.\n  \\f[\n  \\nabla . \\left( \\epsilon(r) \\nabla v(r)  \\right) = 0\n  \\f]\n  Expanding and rearranging yields,\n  \\f[\n     \\nabla^2 v(r) = - \\frac{1}{\\epsilon} \\nabla \\epsilon(r) .  \\nabla v(r)\n  \\f]\n  We can interpret \\f$\\nabla \\epsilon . \\nabla u / \\epsilon\\f$ as the\n  induced surface charge density.\n\n  MADNESS's default Coulomb Green's function (\\f$-1 / |r-s|\\f$) corresponds to the free-space\n  Dirichlet boundary condition \\f$v(\\infty)=0\\f$.  But we wish to\n  impose the Neumann condition \\f$- \\partial v / \\partial z(\\infty) = E\\f$.\n  Thus, we write our solution as the sum of the asymptotic solution\n  (\\f$v = - E z\\f$) and a component that goes to zero at infinity so that\n  our MADNESS Green's function can be used.  Substituting\n  \\f[\n  v(r) = - E z + u(r)\n  \\f]\n  our equation becomes\n  \\f[\n     \\nabla^2 u(r) = \\frac{1}{\\epsilon} \\nabla \\epsilon(r) .  \\left(E - \\nabla u(r) \\right)\n  \\f]\n  The quantity in parentheses is the total electric field --- the sum of the applied\n  field and that due to the induced surface charge.\n\n  The exact solution is readily derived by expanding in spherical harmonics\n  and matching the potential and electric displacement at the surface, or by\n  looking inside Jackson, or by a quick google to find\n  <A HREF=\"http://homer.phys.uh.edu/~hunger/class/fall_2010/lectures/lecture_10.pdf\">\n  this page.</A>\n\n  (Note that while the Green's function to Poisson's equation is \\f$-1 / 4 \\pi |r-s|\\f$,\n  MADNESS provides convolution with \\f$G(r,s) = 1/|r-s|\\f$,\n  so you have to keep track of the \\f$-1/4\\pi\\f$ yourself.)\n\n  (Note that to obtain an accurate solution with \\f$\\sigma<0.2\\f$ you will need\n  to increase the order of the wavelet and decrease the threshold, e.g.,\n  \\f$k=8, \\mbox{thresh}=1e-5\\f$.\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/funcplot.h>\n#include <madness/tensor/solvers.h>\n#include \"molecularmask.h\"\n#include <madness/mra/nonlinsol.h>\n#include <madness/constants.h>\n#include <vector>\n\nusing namespace madness;\nusing namespace std;\n\nconst int k = 6; // wavelet order\nconst double thresh = 1e-4; // truncation threshold\nconst double L = 50; // box is [-L,L]\nconst double sigma = 0.3; // Surface width\nconst double Ez = 0.05; // External electric field\n\nconst double epsilon_0 = 100.0; // Interior dielectric\nconst double epsilon_1 =   1.0; // Exterior dielectric\nconst double R = 20.0; // Radius of cavity\n\n// Adjustment to radius of sphere to enhance accuracy of calculation\n// at finite value of sigma\nconst double delta = 0.65*sigma;\n\ndouble exact_function(const coord_3d& x) {\n    const double epsilon_r = epsilon_1 / epsilon_0;\n    double r = sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\n\n    if (r < R) {\n        return Ez*x[2] * (1 - 3 / (epsilon_r + 2));\n    }\n    else {\n        return Ez*x[2] * (epsilon_r - 1)/(epsilon_r+2)*std::pow(R/r,3.0); // -1\n    }\n}\n\nint main(int argc, char **argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n    coord_3d lo(0.0), hi(0.0); // Range for line plotting\n    lo[2] =-L;\n    hi[2] = L;\n\n    // Function defaults\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_cubic_cell(-L, L);\n    FunctionDefaults<3>::set_truncate_on_project(true);\n    FunctionDefaults<3>::set_bc(BC_FREE);\n\n    // The Coulomb operator (this is just 1/r ... whereas the notes are -1/4pir)\n    auto op = CoulombOperator(world, sigma*0.001, thresh*0.1);\n\n    // Derivative operators\n    auto Dx = free_space_derivative<double,3>(world, 0);\n    auto Dy = free_space_derivative<double,3>(world, 1);\n    auto Dz = free_space_derivative<double,3>(world, 2);\n\n    // We will have one sphere of radius R centered at the origin\n    vector<double> atomic_radii(1,R-delta);\n    vector<coord_3d> atomic_coords(1,coord_3d(0.0));\n    print(\"k     \", k);\n    print(\"thresh\", thresh);\n    print(\"L     \", L);\n    print(\"sigma \", sigma);\n    print(\"delta \", delta);\n    print(\"eps0  \", epsilon_0, \"  eps1  \", epsilon_1);\n    print(\"radii \", atomic_radii);\n    print(\"coords\", atomic_coords);\n\n    print(MolecularVolumeExponentialSwitchLogGrad(sigma,epsilon_1,epsilon_0, atomic_radii, atomic_coords,0).special_points());\n\n    // Log derivative of the dielectric function\n    std::vector<real_function_3d> logd(3);\n    for (int i = 0; i < 3; i++)\n      logd.emplace_back(real_factory_3d(world).functor(MolecularVolumeExponentialSwitchLogGrad(sigma,epsilon_1,epsilon_0, atomic_radii, atomic_coords,i)));\n\n    //double area = 4*madness::constants::pi*R*R;\n    //double simulation_volume = 8*L*L*L;\n\n    const double rfourpi = 1.0/(4.0*constants::pi);\n\n    // Initial guess is zero\n    real_function_3d u(world);\n    double unorm = 0.0;\n\n    NonlinearSolver solver(20);\n    real_function_3d surface_charge, old_surface_charge(world);\n    for (int iter=0; iter<20; iter++) {\n        // Scale with 1/4pi AFTER applying operator to get one more digit of accuracy\n        surface_charge = (logd[0]*Dx(u) + logd[1]*Dy(u) + logd[2]*(-Ez+Dz(u))).truncate();\n        real_function_3d r = (u - op(surface_charge).scale(rfourpi)).truncate(thresh*0.032);\n        surface_charge.scale(rfourpi);\n\n        real_function_3d unew = solver.update(u, r);\n\n        double change = (unew-u).norm2();\n        double schange = (old_surface_charge-surface_charge).norm2();\n        double err = u.err(exact_function);\n        print(\"iter\", iter, \"change\", change, \"err\", err,\n              \"surface charge\", surface_charge.trace(), \"schange\", schange);\n\n        old_surface_charge = surface_charge;\n\n        if (change > 0.3*unorm)\n            u = 0.5*unew + 0.5*u;\n        else\n            u = unew;\n\n        if (schange < 10.0*thresh) break;\n    }\n\n    plot_line(\"testpot.dat\", 1001, lo, hi, u, surface_charge);\n\n    real_tensor cell(3,2);\n    cell(_,0) = -L;\n    cell(_,1) =  L;\n\n    plotdx(u, \"testpot.dx\", cell);\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/dirac-hatom.cc",
    "content": "/*!\n  \\file examples/dirac-hatom.cc\n  \\brief solve the hydrogen atom using the 4-component Dirac equation\n\n  example usage:  dirac-hatom --thresh=1.e-5 --k=7 --dirac=\"charge=100\"\n\n\n*/\n#include <iostream>\n#include<madchem.h>\n\nusing namespace madness;\n\n\nenum Uplo {upper, lower};\nstatic bool debug=false;\nstatic double alpha1=constants::fine_structure_constant;\nstatic double clight=1.0/alpha1;\nstatic double shift=0.0;\nstatic double epsilon=1.e-12;\nstatic bool use_ble=false;\nstatic bool use_bsp=false;\nstatic double lo=1.e-7;\nstatic double nucrad=1e-8;\nstatic double nucexpt=3.0/nucrad; // actually the squareroot of the Gaussian exponent\n\nreal_function_3d mask;\n\nclass DiracParameters : public QCCalculationParametersBase {\npublic:\n    std::string get_tag() const override {\n        return std::string(\"dirac\");\n    }\n\n    /// ctor reading out the input file\n    DiracParameters() {\n        initialize<double>(\"shift\",0.0);\n\tinitialize<double>(\"nucrad\",1e-8);\n        initialize<double>(\"charge\",10.0);\n        initialize<double>(\"lo\",1.e-7,\"lo for the operator apply\");\n        initialize<bool>(\"use_ble\",false);\n        initialize<bool>(\"use_bsp\",false);\n        initialize<long>(\"nstates\",1);\n        initialize<long>(\"ansatz\",0);\n    }\n\n    DiracParameters(World& world, const commandlineparser& parser) : DiracParameters() {\n        // read input file\n        read_input_and_commandline_options(world,parser,\"dirac\");\n    }\n\n    double shift() const {return get<double>(\"shift\");}\n    double nucrad() const {return get<double>(\"nucrad\");}\n    double charge() const {return get<double>(\"charge\");}\n    double lo() const {return get<double>(\"lo\");}\n    bool use_ble() const {return get<bool>(\"use_ble\");}\n    bool use_bsp() const {return get<bool>(\"use_bsp\");}\n    long nstates() const {return get<long>(\"nstates\");}\n    long ansatz() const {return get<long>(\"ansatz\");}\n\n\n};\n\ndouble compute_gamma(const double nuclear_charge) {\n    return sqrt(1-nuclear_charge*nuclear_charge*alpha1*alpha1);\n}\n\nstruct stepfunction : public FunctionFunctorInterface<double,3> {\n    int axis=-1;\n    stepfunction(const int axis) : axis(axis) {\n        MADNESS_CHECK(axis>=0 && axis<3);\n    }\n    double operator()(const coord_3d& r) const final { return r[axis]/(r.normf()+epsilon); }\n    Level special_level() const final {return 20;};\n    std::vector<Vector<double, 3UL>> special_points() const override {\n        coord_3d o={0.0,0.0,0.0};\n        return {o};\n    }\n};\n\nstruct ncf_cusp {\n    double a=1.3;\n    double Z=-1;\n    ncf_cusp(double a, double Z) :a(a),Z(Z) {}\n    double operator()(const double& r) const {\n        if (a<0.0) return 1.0;\n        return 1.0+(1.0/(a-1.0))*exp(-a*Z*r);\n    }\n};\n\nstruct Sigma_ncf_cusp {\n    double a=1.3;\n    double Z=-1;\n    Sigma_ncf_cusp(double a, double Z) :a(a),Z(Z) {}\n    double operator()(const double& r) const {\n        if (a<0.0) return 0.0;\n        const double denominator=1.0 + 1.0 / (a - 1.0) * exp(-a * Z * r);\n        const double numerator=-a*Z/(a-1.0) * exp(-a * Z * r);\n        return numerator/denominator;\n    }\n};\n\nstruct ncf_singularity {\n    double gamma=0.0;\n    ncf_singularity(double gamma) : gamma(gamma) {}\n    double operator()(const double& r) const {\n        if (gamma<0.0) return 1.0;\n        return 1.0/(std::pow(r,1.0-gamma)+epsilon);\n    }\n};\n\nstruct ncf : public FunctionFunctorInterface<double,3> {\n    ncf_singularity ncfs;\n    ncf_cusp ncfc;\n    long power=1;\n    ncf(double gamma, double a, double Z) : ncfs(gamma), ncfc(a,Z) {}\n    double operator()(const coord_3d& r) const override {\n        double rr=r.normf();\n        return std::pow(ncfs(rr) * ncfc(rr),power);\n    }\n\n    Level special_level() const final {return 20;};\n    std::vector<Vector<double, 3UL>> special_points() const final {\n        coord_3d o={0.0,0.0,0.0};\n        return {o};\n    }\n};\n\ndouble generalized_laguerre(const double alpha, const long n, const double r) {\n    if (n<0) return 0.0;\n    else if (n==0) return 1.0;\n    else if (n==1) return (1.0+alpha-r);\n    else if (n==2) return 0.5*r*r - (alpha + 2.0)*r + 0.5*(alpha+1)*(alpha+2);\n    else\n    MADNESS_EXCEPTION(\"generalized Laguerre polynomial implemented only up to order n=2\",1);\n}\n\n\n/// returns the complex value of a given spherical harmonic\nstruct SphericalHarmonics{\n    long l, m;\n    bool zero=false;\n    SphericalHarmonics(const long l, const long m) : l(l), m(m) {\n        if (l<0) this->l=-l-1;\n        if (abs(this->m)>this->l) zero=true;\n    }\n\n    double_complex operator()(const coord_3d& xyz) const {\n        if (zero) return {0.0,0.0};\n        // const double r=xyz.normf();\n        // const double r2=r*r;\n        // const double x=xyz[0];\n        // const double y=xyz[1];\n        // const double z=xyz[2];\n        const double_complex i=double_complex(0.0,1.0);\n        auto stepx=stepfunction(0);\n        auto stepy=stepfunction(1);\n        auto stepz=stepfunction(2);\n        double_complex step_x_m_iy=stepx(xyz) - i* stepy(xyz);\n        double_complex step_x_p_iy=stepx(xyz) + i* stepy(xyz);\n        if ((l==0) and (m== 0)) return 0.5*sqrt(1.0/constants::pi);\n\n//        if ((l==1) and (m==-1)) return 0.5*sqrt(1.5/constants::pi) * (x - i*y)/r;\n//        if ((l==1) and (m== 0)) return 0.5*sqrt(3.0/constants::pi) * z/r;\n//        if ((l==1) and (m== 1)) return -0.5*sqrt(1.5/constants::pi) * (x + i*y)/r;\n        if ((l==1) and (m==-1)) return 0.5*sqrt(1.5/constants::pi) * (stepx(xyz) - i *stepy(xyz));\n        if ((l==1) and (m== 0)) return 0.5*sqrt(3.0/constants::pi) * stepz(xyz);\n        if ((l==1) and (m== 1)) return -0.5*sqrt(1.5/constants::pi) * (stepx(xyz) + i *stepy(xyz));\n\n        if ((l==2) and (m==-2)) return  0.25*sqrt(7.5/constants::pi) * step_x_m_iy * step_x_m_iy;\n        if ((l==2) and (m==-1)) return  0.5 *sqrt(7.5/constants::pi) * step_x_m_iy * stepz(xyz);\n        if ((l==2) and (m== 0)) return  0.25*sqrt(5.0/constants::pi) * (3.0*stepz(xyz)*stepz(xyz)- 1.0);\n        if ((l==2) and (m== 1)) return -0.5 *sqrt(7.5/constants::pi) * step_x_p_iy * stepz(xyz);\n        if ((l==2) and (m== 2)) return  0.25*sqrt(7.5/constants::pi) * step_x_p_iy * step_x_p_iy;\n\n        if ((l==3) and (m==-3)) return  0.125*sqrt(35/constants::pi) * step_x_m_iy * step_x_m_iy * step_x_m_iy;\n        if ((l==3) and (m==-2)) return  0.25*sqrt(105/constants::pi) * step_x_m_iy * step_x_m_iy * stepz(xyz);\n        if ((l==3) and (m==-1)) return  0.125*sqrt(21/constants::pi) * step_x_m_iy * (5*stepz(xyz)*stepz(xyz) - 1.0);\n        if ((l==3) and (m== 0)) return  0.25*sqrt(7.0/constants::pi) * (5*stepz(xyz)*stepz(xyz)*stepz(xyz) - 3.0*stepz(xyz));\n        if ((l==3) and (m== 1)) return -0.125*sqrt(21/constants::pi) * step_x_p_iy * (5*stepz(xyz)*stepz(xyz) - 1.0);\n        if ((l==3) and (m== 2)) return  0.25*sqrt(105/constants::pi) * step_x_p_iy * step_x_p_iy * stepz(xyz);\n        if ((l==3) and (m== 3)) return -0.125*sqrt(35/constants::pi) * step_x_p_iy * step_x_p_iy * step_x_p_iy;\n        MADNESS_EXCEPTION(\"out of range in SphericalHarmonics\",1);\n\n        return double_complex(0.0,0.0);\n    }\n\n};\n\nstruct sgl_guess {\n    long n,l,m;\n    double Z;\n    sgl_guess(const long n, const long l, const long m, const double Z) : n(n), l(l), m(m), Z(Z) {}\n\n    double_complex operator()(const coord_3d& coord) const {\n        double_complex Y=SphericalHarmonics(l,m)(coord);\n        double r=coord.normf();\n        double rho=2.0*Z*r/n;\n        double R= generalized_laguerre(2.*l+1.,n-l-1,rho);\n        double e=exp(-0.5*rho);\n        return e*R*std::pow(rho,double(l))*Y;\n    }\n\n    double energy() const {\n        return 0.5*Z*Z/(n*n);\n    }\n\n    complex_function_3d get_wf(World& world) const {\n        std::vector<coord_3d> special_points(1,coord_3d({0.0,0.0,0.0}));\n        complex_function_3d wf = complex_factory_3d(world).functor(*this).special_points(special_points);\n        double norm=wf.norm2();\n        wf.scale(1.0/norm);\n        return wf;\n    }\n\n\n\n};\n\n\n/// following Dyall: p 104f\nstruct Xi {\n    long k, component, a;\n    double m, l;\n    Xi(const long k, const double m, const double component, const double j, const long l)\n      : k(k),  component(component), a(0), m(m), l(l) {\n        MADNESS_CHECK(component==0 or component==1);\n        a=compute_a(j,l);\n    }\n\n    static long compute_a(const double j, const long l) {\n        if (j>l) return 1;\n        if (j<l) return -1;\n        throw;\n    }\n\n    double_complex operator()(const coord_3d& xyz) const {\n        double_complex result;\n        double denominator2=2.0*l+1;\n        if (component==0) {\n            double numerator=a*sqrt((l+0.5+a*m)/denominator2);\n            auto Y=SphericalHarmonics(k,lround(m-0.5));\n            result=numerator*Y(xyz);\n        } else if (component==1) {\n            double numerator=sqrt((l+0.5-a*m)/denominator2);\n            auto Y=SphericalHarmonics(k,lround(m+0.5));\n            result=numerator*Y(xyz);\n        }\n        return result;\n    }\n};\n\nstruct Omega {\n    long k, component;\n    double m;\n    Omega(const long k, const double m, const double component) : k(k), component(component), m(m) {\n        MADNESS_CHECK(component==0 or component==1);\n    }\n    double_complex operator()(const coord_3d& xyz) const {\n        double sgnk= (k>0) ? 1.0 : -1.0;\n        double_complex result;\n        if (component==0) {\n            double nn=sqrt((k+0.5-m)/(2*k+1));\n            auto Y=SphericalHarmonics(k,lround(m-0.5));\n            result=nn*Y(xyz);\n        } else if (component==1) {\n            double nn=sqrt((k+0.5+m)/(2*k+1));\n            auto Y=SphericalHarmonics(k,lround(m+0.5));\n            result=-sgnk*nn*Y(xyz);\n        }\n        return result;\n    }\n};\n\n\ndouble compute_electronic_energy(const double energy) {\n    double c=1.0/alpha1;\n    return energy-c*c-shift;\n}\n\n\ndouble mask1d(double x) {\n    /* Iterated first beta function to switch smoothly\n           from 0->1 in [0,1].  n iterations produce 2*n-1\n           zero derivatives at the end points. Order of polyn\n           is 3^n.\n\n           Currently use one iteration so that first deriv.\n           is zero at interior boundary and is exactly representable\n           by low order multiwavelet without refinement */\n\n    x = (x * x * (3. - 2. * x));\n    return x;\n}\n\ndouble mask3d(const Vector<double,3>& ruser) {\n    coord_3d rsim;\n    user_to_sim(ruser, rsim);\n    double x = rsim[0], y = rsim[1], z = rsim[2];\n    double lo = 0.0625, hi = 1.0 - lo, result = 1.0;\n    double rlo = 1.0 / lo;\n\n    if (x < lo)\n        result *= mask1d(x * rlo);\n    else if (x > hi)\n        result *= mask1d((1.0 - x) * rlo);\n    if (y < lo)\n        result *= mask1d(y * rlo);\n    else if (y > hi)\n        result *= mask1d((1.0 - y) * rlo);\n    if (z < lo)\n        result *= mask1d(z * rlo);\n    else if (z > hi)\n        result *= mask1d((1.0 - z) * rlo);\n\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nclass MyDerivativeOperator : public SCFOperatorBase<T,NDIM> {\n    typedef Function<T,NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n    typedef Tensor<T> tensorT;\n\npublic:\n\n    MyDerivativeOperator(World& world, const int axis1) : world(world), axis(axis1) {}\n    void set_ble1() {ble=true;};\n    void set_bspline1() {bsp=true;};\n\n    std::string info() const {return \"D\"+std::to_string(axis);}\n\n    functionT operator()(const functionT& ket) const {\n        vecfuncT vket(1,ket);\n        return this->operator()(vket)[0];\n    }\n\n    vecfuncT operator()(const vecfuncT& vket) const {\n        auto gradop = free_space_derivative<T,NDIM>(world, axis);\n        if (ble) gradop.set_ble1();\n        else if (bsp) gradop.set_bspline1();\n        vecfuncT dvket=apply(world, gradop, vket, false);\n        world.gop.fence();\n        return dvket;\n    }\n\n    T operator()(const functionT& bra, const functionT& ket) const {\n        vecfuncT vbra(1,bra), vket(1,ket);\n        Tensor<T> tmat=this->operator()(vbra,vket); \n        return tmat(0l,0l);\n    }\n\n    tensorT operator()(const vecfuncT& vbra, const vecfuncT& vket) const {\n        const auto bra_equiv_ket = &vbra == &vket;\n        vecfuncT dvket=this->operator()(vket);\n        return matrix_inner(world,vbra,dvket, bra_equiv_ket);\n    }\n\nprivate:\n    World& world;\n    int axis;\n    bool ble=false;\n    bool bsp=false;\n};\n\n\n/// defines a 4-spinor\nclass Spinor {\npublic:\n    vector_complex_function_3d components;\n    World& world() const {return components.front().world();}\n    Spinor() {\n        components.resize(4);\n    }\n\n    Spinor(World& world) {\n        components=zero_functions_compressed<double_complex,3>(world,4);\n    }\n\n    Spinor(const vector_complex_function_3d& components) : components(components){}\n\n    Spinor& operator+=(const Spinor& other) {\n        components+=other.components;\n        return *this;\n    }\n\n    Spinor& operator-=(const Spinor& other) {\n        components-=other.components;\n        return *this;\n    }\n\n    Spinor operator+(const Spinor& other) const {\n        Spinor result;\n        result.components=copy(world(),components); // deep copy\n        result.components+=other.components;\n        return result;\n    }\n\n    Spinor operator-(const Spinor& other) const {\n        Spinor result;\n        result.components=copy(world(),components); // deep copy\n        result.components-=other.components;\n        return result;\n    }\n\n    Spinor& truncate() {\n        double thresh = components[0].thresh();\n        components[0].truncate(thresh,false);\n        components[1].truncate(thresh,false);\n        components[2].truncate(thresh/clight,false);\n\tcomponents[3].truncate(thresh/clight);\n        return *this;\n    }\n\n    void print_norms(std::string text) {\n        auto norms = norm2s(world(), components);\n        auto realnorms = norm2s(world(), real(components));\n        auto imagnorms = norm2s(world(), imag(components));\n\tsize_t sizes[4];\n\tfor (size_t i=0; i<4; i++) sizes[i] = components[i].size();\n        print(text,norms);\n        print(\"  -- real,imag\",realnorms,imagnorms);\n\tprint(\"  -- sizes\", sizes);\n\tsize_t k = components[0].k();\n\tfor (auto& s : sizes) s /= k*k*k;\n\tprint(\"  -- nodes\", sizes);\n\t\n//        print(\"  -- moments  \",x1,y1,z1,x2,y2,z2);\n//        plot(text);\n    }\n\n    void plot(const std::string filename) const {\n        plot_plane(world(), real(components), \"Re_\"+filename);\n        plot_plane(world(), imag(components), \"Im_\"+filename);\n    }\n\n    friend double_complex inner(const Spinor& bra, const Spinor& ket) {\n        return inner(bra.components,ket.components);\n    }\n};\n\ntemplate<typename T>\nSpinor operator*(const T fac, const Spinor& arg) {\n    return Spinor(fac*arg.components);\n}\n\ntemplate<typename T>\nSpinor operator*(const Spinor& arg, const T fac) {\n    return Spinor(fac*arg.components);\n}\n\n\nSpinor copy(const Spinor& other) {\n    return Spinor(copy(other.world(),other.components));\n}\n\nstd::vector<Spinor> copy(const std::vector<Spinor>& other) {\n    std::vector<Spinor> result;\n    for (auto& oo : other) result.push_back(copy(oo.world(),oo.components));\n    return result;\n}\n\n\ntemplate<typename T>\nstd::vector<Spinor> operator*(const std::vector<Spinor>& arg, const T fac) {\n    std::vector<Spinor> result=copy(arg);\n    for (auto& r : result) r=r*fac;\n    return result;\n}\ndouble_complex inner(const std::vector<Spinor>& bra, const std::vector<Spinor> ket) {\n    double_complex result=0.0;\n    for (size_t i=0; i<bra.size(); ++i) result+=inner(bra[i],ket[i]);\n    return result;\n}\n\nTensor<double_complex> matrix_inner(const std::vector<Spinor>& bra, const std::vector<Spinor> ket) {\n    Tensor<double_complex> result(bra.size(),ket.size());\n    for (size_t i=0; i<bra.size(); ++i) {\n        for (size_t j=0; j<ket.size(); ++j) {\n            result(i,j)=inner(bra[i],ket[j]);\n        }\n    }\n    return result;\n}\n\nstd::vector<Spinor> operator-=(std::vector<Spinor>& left, const std::vector<Spinor>& right) {\n    for (size_t i=0; i<right.size(); ++i) left[i]-=right[i];\n    return left;\n}\n\nstd::vector<Spinor> operator+=(std::vector<Spinor>& left, const std::vector<Spinor>& right) {\n    for (size_t i=0; i<right.size(); ++i) left[i]+=right[i];\n    return left;\n}\n\nstd::vector<Spinor> operator-(const std::vector<Spinor>& left, const std::vector<Spinor>& right) {\n    std::vector<Spinor> result=copy(left);\n    result-=right;\n    return result;\n}\n\n\nstd::vector<Spinor> truncate(std::vector<Spinor> arg) {\n    for (auto& a : arg) a.truncate();\n    return arg;\n}\n\nstruct LProjector {\n    long lmax=3;\n    World& world;\n    std::map<std::pair<long,long>,complex_function_3d> Ylm;\n    LProjector(World& world) : world(world) {\n        for (long l=0; l<lmax; ++l) {\n            for (long m=-l; m<l+1; ++m) {\n                SphericalHarmonics Y(l,m);\n                auto lm=std::make_pair(l,m);\n                auto functor=[&Y](const coord_3d& r){return Y(r)*100.0*exp(-10.0*r.normf());};\n                Ylm[lm]=complex_factory_3d(world).functor(functor);\n            }\n        }\n    }\n\n    void analyze(const Spinor& f, const std::string text=\"\") const {\n        madness::print(text);\n        for (int c=0; c<4; ++c) {\n            auto bla=f.components[c];\n            LProjector lproj(world);\n            lproj(bla,\"component \"+std::to_string(c));\n        }\n    }\n\n    void operator()(const complex_function_3d& f, const std::string text=\"\") const {\n        madness::print(\"  \"+text);\n        for (long l=0; l<lmax; ++l) {\n            for (long m = -l; m < l+1; ++m) {\n                auto lm=std::make_pair(l,m);\n                const complex_function_3d& Y=Ylm.find(lm)->second;\n                double_complex ovlp=inner(Y,f);\n                if (std::abs(ovlp)>1.e-7) madness::print(\"< lm | f> \",l,m,ovlp);\n            }\n        }\n    }\n};\n\n\n\n// The default constructor for functions does not initialize\n// them to any value, but the solver needs functions initialized\n// to zero for which we also need the world object.\nstruct spinorallocator {\n    World& world;\n    const int n;\n\n    /// @param[in]\tworld\tthe world\n    /// @param[in]\tnn\t\tthe number of functions in a given vector\n    spinorallocator(World& world, const int n) : world(world), n(n) {\n    }\n\n    /// allocate a vector of n empty functions\n   std::vector<Spinor> operator()() {\n        std::vector<Spinor> r(n);\n        for (auto & rr : r) rr=Spinor(world);\n        return r;\n    }\n};\n\n/// class defining an operator in matrix form, fixed to size (4,4)\nclass MatrixOperator {\npublic:\n    typedef std::vector<std::pair<double_complex,std::shared_ptr<SCFOperatorBase<double_complex,3>>>> opT;\n\n    explicit MatrixOperator(const int i=4, const int j=4) {\n        elements.resize(i);\n        for (auto& e : elements) e.resize(j);\n    }\n\n    std::size_t nrow() const {return elements.size();}\n    std::size_t ncol() const {\n        if (elements.size()) return elements[0].size();\n        return 0;\n    }\n\n    virtual Spinor operator()(const Spinor& arg) const {\n        World& world=arg.components[0].world();\n        double_complex norm1=inner(arg,arg);\n        Spinor result;\n        for (auto& c : result.components) c=complex_factory_3d(world).compressed();\n        for (size_t i=0; i<ncol(); ++i) {\n            for (size_t j=0; j<nrow(); ++j) {\n                const opT& ops=elements[i][j];\n                for (const auto& op : ops) {\n                    auto fac=op.first;\n                    result.components[i]+=fac * (*op.second)(arg.components[j]);\n                }\n            }\n        }\n        double_complex norm2=inner(arg,arg);\n        result.truncate();\n\n        if (std::abs(norm1-norm2)/std::abs(norm1)>1.e-10) throw;\n\n        return result;\n    }\n\n    virtual std::vector<Spinor> operator()(const std::vector<Spinor>& arg) const {\n        std::vector<Spinor> result;\n        for (auto& a : arg) result.push_back((*this)(a));\n        return result;\n    }\n\n\n    /// add a submatrix to this\n\n    /// @param[in]  istart   row where to add the submatrix\n    /// @param[in]  jstart   column where to add the submatrix\n    void add_submatrix(int istart, int jstart, const MatrixOperator& submatrix) {\n        if (istart+submatrix.ncol()>ncol()) throw std::runtime_error(\"submatrix too large: too many columns\");\n        if (jstart+submatrix.nrow()>nrow()) throw std::runtime_error(\"submatrix too large: too many rows\");\n        for (size_t i=istart; i<istart+submatrix.ncol(); ++i) {\n            for (size_t j=jstart; j<jstart+submatrix.nrow(); ++j) {\n                for (auto& elem : submatrix.elements[i-istart][j-jstart]) elements[i][j].push_back(elem);\n            }\n        }\n    }\n\n    MatrixOperator& operator+=(const MatrixOperator& other) {\n        for (size_t i=0; i<ncol(); ++i) {\n            for (size_t j=0; j<nrow(); ++j) {\n                for (auto& elem : other.elements[i][j]) elements[i][j].push_back(elem);\n            }\n        }\n        return *this;\n    }\n\n    MatrixOperator operator+(const MatrixOperator& other) const {\n        MatrixOperator result;\n        for (size_t i=0; i<ncol(); ++i) {\n            for (size_t j=0; j<nrow(); ++j) {\n                for (auto& elem : this->elements[i][j]) result.elements[i][j].push_back(elem);\n                for (auto& elem : other.elements[i][j]) result.elements[i][j].push_back(elem);\n            }\n        }\n        return result;\n    }\n\n    void add_operator(const int i, const int j, const double_complex& fac, const std::shared_ptr<SCFOperatorBase<double_complex,3>> op) {\n        elements[i][j].push_back(std::make_pair(fac,op));\n    }\n\n    void print(std::string name=\"\") const {\n        madness::print(name);\n        for (size_t i=0; i<ncol(); i++) {\n\t  for (size_t j=0; j<nrow(); j++) {\n                const opT& ops=elements[i][j];\n                for (auto op : ops) {\n                    auto fac=op.first;\n                    std::cout << \" \" << fac << \" \" << (op.second)->info();\n                }\n                std::cout << \" ||| \";\n            }\n            std::cout << std::endl;\n        }\n    }\n\n    /// matrix containing prefactor and operator\n    std::vector<std::vector<opT>> elements;\n};\n\nclass Metric : public MatrixOperator{\npublic:\n    double c0=1.0, c1=1.0, c2=1.0, c3=1.0;\n    virtual Spinor operator()(const Spinor& arg) const {\n        auto result=copy(arg);\n        result.components[0].scale(c0);\n        result.components[1].scale(c1);\n        result.components[2].scale(c2);\n        result.components[3].scale(c3);\n        return result;\n    }\n\n    void print() const {\n        madness::print(\"metric \",c0,c1,c2,c3);\n    }\n};\n\n\nvoid show_norms(const Spinor& bra, const Spinor& ket, const std::string& name) {\n    Metric m;\n    auto norms = inner(ket.world(), m(bra).components, ket.components);\n    madness::print(\"norms of \",name,\": \",norms);\n}\n\nMatrixOperator make_Hdiag(World& world, const LocalPotentialOperator<double_complex,3>& V1) {\n    MatrixOperator Hv;\n    Hv.add_operator(0,0, 1.0,std::make_shared<LocalPotentialOperator<double_complex,3>>(V1));\n    Hv.add_operator(1,1, 1.0,std::make_shared<LocalPotentialOperator<double_complex,3>>(V1));\n    Hv.add_operator(2,2, 1.0,std::make_shared<LocalPotentialOperator<double_complex,3>>(V1));\n    Hv.add_operator(3,3, 1.0,std::make_shared<LocalPotentialOperator<double_complex,3>>(V1));\n    return Hv;\n}\n\n// Potential due to gaussian with exponent\ndouble potn(double r) {\n  double nr = r*nucexpt;\n  if (nr > 1e-8) return std::erf(nr)/r;\n  else return 2.0*nucexpt/std::sqrt(constants::pi); // to avoid divide by zero at origin\n}\n\n/// this is the nuclear potential on the diagonal\nMatrixOperator make_Hv(World& world, const double nuclear_charge) {\n    complex_function_3d V=complex_factory_3d(world)\n      .functor([&nuclear_charge](const coord_3d& r){return double_complex(-nuclear_charge*potn(r.normf()));});\n          //.functor([&nuclear_charge](const coord_3d& r){return double_complex(-nuclear_charge/(r.normf()+1.e-13));});\n    auto V1=LocalPotentialOperator<double_complex,3>(world,\"V\",V);\n    return make_Hdiag(world,V1);\n}\n\n\n\n/// returns a (2,2) matrix\nMatrixOperator make_sp(World& world) {\n    MatrixOperator sp(2,2);\n    const double_complex ii=double_complex(0.0,1.0);\n    const double alpha=constants::fine_structure_constant;\n    const double c =  1.0/alpha;\n    auto Dz=MyDerivativeOperator<double_complex,3>(world,2);\n    auto Dx=MyDerivativeOperator<double_complex,3>(world,0);\n    auto Dy=MyDerivativeOperator<double_complex,3>(world,1);\n    if (use_ble) {\n        MADNESS_CHECK(!use_bsp);\n        Dz.set_ble1();\n        Dx.set_ble1();\n        Dy.set_ble1();\n    }\n    if (use_bsp) {\n        MADNESS_CHECK(!use_ble);\n        Dz.set_bspline1();\n        Dx.set_bspline1();\n        Dy.set_bspline1();\n    }\n\n    sp.add_operator(0,0,-c*ii,std::make_shared<MyDerivativeOperator<double_complex,3>>(Dz));\n    sp.add_operator(0,1,-c*ii,std::make_shared<MyDerivativeOperator<double_complex,3>>(Dx));\n    sp.add_operator(0,1,-c,std::make_shared<MyDerivativeOperator<double_complex,3>>(Dy));\n\n    sp.add_operator(1,0,-c*ii,std::make_shared<MyDerivativeOperator<double_complex,3>>(Dx));\n    sp.add_operator(1,0,c,std::make_shared<MyDerivativeOperator<double_complex,3>>(Dy));\n    sp.add_operator(1,1,c*ii,std::make_shared<MyDerivativeOperator<double_complex,3>>(Dz));\n    return sp;\n}\n\n\nMatrixOperator make_alpha_p(World& world) {\n    MatrixOperator Hd;\n    MatrixOperator sp = make_sp(world);\n    Hd.add_submatrix(0, 2, sp);\n    Hd.add_submatrix(2, 0, sp);\n    return Hd;\n}\n\n/// this is c sigma p + beta m c^2\n\n/// @param[in]  ll  scalar on the LL (1,1) block\n/// @param[in]  ss  scalar on the SS (2,2) block\nMatrixOperator make_Hd(World& world, const std::pair<double_complex,std::string>& ll,\n                       const std::pair<double_complex,std::string>& ss) {\n    MatrixOperator Hd=make_alpha_p(world);\n\n    complex_function_3d V=complex_factory_3d(world).functor([](const coord_3d& r){return double_complex(1.0,0.0);});\n    auto V1=LocalPotentialOperator<double_complex,3>(world,ll.second,V);\n    auto V2=LocalPotentialOperator<double_complex,3>(world,ss.second,V);\n\n    if (ll.first!=0.0) {\n        Hd.add_operator(0,0,ll.first,std::make_shared<LocalPotentialOperator<double_complex,3>>(V1));\n        Hd.add_operator(1,1,ll.first,std::make_shared<LocalPotentialOperator<double_complex,3>>(V1));\n    }\n    if (ss.first!=0.0) {\n        Hd.add_operator(2, 2, ss.first, std::make_shared<LocalPotentialOperator<double_complex, 3>>(V1));\n        Hd.add_operator(3, 3, ss.first, std::make_shared<LocalPotentialOperator<double_complex, 3>>(V1));\n    }\n    return Hd;\n}\n\ntemplate<typename ansatzT>\nstd::vector<Spinor> schrodinger2dirac(const std::vector<complex_function_3d> wf, const ansatzT& ansatz, const double nuclear_charge) {\n    World& world=wf.front().world();\n    std::vector<Spinor> sgl;\n    for (auto& w : wf ){\n        Spinor tmp(world);\n        tmp.components[0]=w;\n        sgl.push_back(tmp);\n    }\n    MatrixOperator sp=make_alpha_p(world);\n\n    std::vector<Spinor> result1;\n    for (auto& s : sgl)  {\n        Spinor tmp=(sp(s)+s).truncate();\n        tmp.components[2].scale(0.5*alpha1*alpha1);\n        tmp.components[3].scale(0.5*alpha1*alpha1);\n        result1.push_back(tmp);\n    }\n    MatrixOperator Rinv=ansatz.Rinv(world);\n    std::vector<Spinor> result=Rinv(result1);\n\n    for (size_t i=0; i<result.size(); ++i) result[i].print_norms(\"dirac\"+std::to_string(i));\n    return result;\n}\n\nTensor<double_complex> get_fock_transformation(World& world, const std::vector<Spinor>& spinors,\n                                               const Tensor<double_complex>& overlap, const Tensor<double_complex>& fock) {\n\n    const double thresh_degenerate=1.e-6;\n    Tensor<double_complex> U;\n    Tensor<double> evals;\n    sygvp(world, fock, overlap, 1, U, evals);\n\n    Tensor<double> occ(spinors.size());\n    occ=1.0;\n    Localizer::undo_reordering(U, occ, evals);\n    Localizer::undo_degenerate_rotations(U, evals, thresh_degenerate);\n\n    world.gop.broadcast(U.ptr(), U.size(), 0);\n    world.gop.broadcast(evals.ptr(), evals.size(), 0);\n    return U;\n}\n\n/// Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i]\n\n/// Uses sparsity in the transformation matrix --- set small elements to\n/// zero to take advantage of this.\nstd::vector<Spinor>\ntransform(World& world, const std::vector<Spinor>& v,\n          const Tensor<double_complex>& c) {\n\n    PROFILE_BLOCK(Vtransformsp);\n    int n = v.size();  // n is the old dimension\n    int m = c.dim(1);  // m is the new dimension\n    MADNESS_ASSERT(n==c.dim(0));\n\n    std::vector<Spinor> vc(m);\n    for (size_t i=0; i<vc.size(); ++i) vc[i]=Spinor(world);\n\n    for (int i=0; i<m; ++i) {\n        for (int j=0; j<n; ++j) {\n            if (c(j,i) != double_complex(0.0)) gaxpy(world,double_complex(1.0),vc[i].components,\n                                                     c(j,i),v[j].components,false);\n        }\n    }\n\n    world.gop.fence(); // must always fence here to ensure gaxpy's are complete\n    return vc;\n}\n\nstd::vector<Spinor> orthonormalize_fock(const std::vector<Spinor>& arg,\n                                        const std::vector<Spinor>& bra,\n                                        Tensor<double_complex>& fock) {\n    World& world=arg.front().world();\n    Tensor<double_complex> ovlp(arg.size(),arg.size());\n    for (size_t i=0; i<arg.size(); ++i) {\n        for (size_t j=i; j<arg.size(); ++j) {\n            ovlp(i,j)=inner(bra[i],arg[j]);\n            ovlp(j,i)=std::conj(ovlp(i,j));\n        }\n    }\n\n    Tensor<double_complex> U= get_fock_transformation(world,arg,ovlp,fock);\n    fock=inner(conj(U),inner(fock,U),0,0);\n//    print(\"fock in orthonormalize_fock\");\n//    print(fock);\n\n    std::vector<Spinor> result=transform(world,arg,U);\n    return result;\n\n}\n\nstruct AnsatzBase {\npublic:\n    [[nodiscard]] virtual std::string filename() const {return \"ansatz\"+this->name(); }\n    [[nodiscard]] virtual std::string name() const =0;\n\n    AnsatzBase(const double Z, const double a) : nuclear_charge(Z), a(a) {}\n    int iansatz=0;\n    double nuclear_charge=0.0;\n    double a=-1.3;\n\n    virtual void normalize(Spinor& bra, Spinor& ket) const {\n        Metric m;\n        double_complex norm2=inner(bra,m(ket));\n        double norm=sqrt(real(norm2));\n        scale(ket.world(),ket.components,1.0/norm);\n        if (&bra!=&ket) scale(bra.world(),bra.components,1.0/norm);\n    }\n\n    virtual void normalize(Spinor& ket) const {\n        auto bra=make_bra(ket);\n        normalize(bra,ket);\n    }\n\n    virtual void normalize(std::vector<Spinor>& ket) const {\n        auto bra=make_vbra(ket);\n        normalize(bra,ket);\n    }\n\n    virtual void normalize(std::vector<Spinor>& bra, std::vector<Spinor>& ket) const {\n        for (size_t i=0; i<ket.size(); ++i) normalize(bra[i],ket[i]);\n    }\n\n\n    virtual Spinor make_guess(World& world) const = 0;\n    virtual MatrixOperator make_Hd(World& world) const = 0;\n    virtual MatrixOperator R(World& world) const {\n        MADNESS_EXCEPTION(\"no R implemented in this ansatz\",1);\n    }\n    virtual MatrixOperator Rinv(World& world) const {\n        MADNESS_EXCEPTION(\"no Rinv implemented in this ansatz\",1);\n    }\n\n    virtual std::vector<Spinor> make_vbra(const std::vector<Spinor>& ket) const {\n        std::vector<Spinor> result;\n        for (const auto& k : ket) result.push_back(this->make_bra(k));\n        return truncate(result);\n    }\n    [[nodiscard]] virtual Spinor make_bra(const Spinor& ket) const = 0;\n\n    [[nodiscard]] virtual double mu(const double energy) const {\n        return sqrt(-energy*energy*alpha1*alpha1 + 1.0/(alpha1*alpha1));\n    }\n    [[nodiscard]] double get_cusp_a() const {return a;}\n};\n\nstruct Ansatz0 : public AnsatzBase {\npublic:\n\n    Ansatz0(const double nuclear_charge) : AnsatzBase(nuclear_charge,1.0) {\n        this->a=-1.0;\n        iansatz=0;\n    };\n\n    [[nodiscard]] std::string name() const {\n        return \"0\";\n    }\n    Spinor make_guess(World& world) const {\n        Spinor result;\n        const double_complex ii(0.0,1.0);\n        const double_complex one(1.0,0.0);\n        const double n=1;\n        const double Z=double(nuclear_charge);\n        const double alpha=constants::fine_structure_constant;\n        const double gamma=compute_gamma(nuclear_charge);\n//        print(\"gamma-1\",gamma-1.0);\n        const double C=nuclear_charge/n;\n        // m=0.5;\n        result.components[0]=complex_factory_3d(world).functor([&Z,&gamma,&alpha,&C,&ii,&one](const coord_3d& r){return std::pow(r.normf(),gamma-1.0)*one*(1+gamma)*exp(-C*r.normf());});\n        result.components[1]=complex_factory_3d(world).functor([&Z,&gamma,&alpha,&C,&ii,&one](const coord_3d& r){return std::pow(r.normf(),gamma-1.0)*0.0*one;});\n        result.components[2]=complex_factory_3d(world).functor([&Z,&gamma,&alpha,&C,&ii,&one](const coord_3d& r){return std::pow(r.normf(),gamma-1.0)*ii*Z*alpha*r[2]/r.normf()*exp(-C*r.normf());});\n        result.components[3]=complex_factory_3d(world).functor([&Z,&gamma,&alpha,&C,&ii,&one](const coord_3d& r){return std::pow(r.normf(),gamma-1.0)*ii*Z*alpha*(r[0] + ii*r[1])/r.normf()*exp(-C*r.normf());});\n        // m=-0.5;\n//        print(\"make_guess with m=-0.5\");\n//        result.components[0]=complex_factory_3d(world).functor([&Z,&gamma,&alpha,&C,&ii,&one](const coord_3d& r){return std::pow(r.normf(),gamma-1.0)*0.0*one;});\n//        result.components[1]=complex_factory_3d(world).functor([&Z,&gamma,&alpha,&C,&ii,&one](const coord_3d& r){return std::pow(r.normf(),gamma-1.0)*one*(1+gamma)*exp(-C*r.normf());});\n//        result.components[2]=complex_factory_3d(world).functor([&Z,&gamma,&alpha,&C,&ii,&one](const coord_3d& r){return std::pow(r.normf(),gamma-1.0)*ii*Z*alpha*(r[0] - ii*r[1])/r.normf()*exp(-C*r.normf());});\n//        result.components[3]=complex_factory_3d(world).functor([&Z,&gamma,&alpha,&C,&ii,&one](const coord_3d& r){return -std::pow(r.normf(),gamma-1.0)*ii*Z*alpha*r[2]/r.normf()*exp(-C*r.normf());});\n        return result;\n    }\n\n    MatrixOperator make_Hv(World& world) const {\n        return ::make_Hv(world,nuclear_charge);\n    }\n\n    Spinor make_bra(const Spinor& ket) const {\n        return Spinor(copy(ket.world(),ket.components));\n    }\n    MatrixOperator make_Hd(World& world) const {\n        double c2=1.0/(alpha1*alpha1);\n        return ::make_Hd(world,{c2,\"mc2\"},{-c2,\"-mc2\"});\n    }\n\n//    double mu(const double energy) const {\n//        return sqrt(-energy*energy*alpha1*alpha1 + 1.0/(alpha1*alpha1));\n//    }\n    double energy() const {\n        return compute_gamma(nuclear_charge)/(alpha1*alpha1);\n    }\n\n    MatrixOperator R(World& world) const {\n        complex_function_3d one1=complex_factory_3d(world).functor([](const coord_3d& r) {return double_complex(1.0,0.0);});\n        auto one = LocalPotentialOperator<double_complex, 3>(world, \"1\" , one1);\n        return make_Hdiag(world,one);\n    }\n    MatrixOperator Rinv(World& world) const {\n        complex_function_3d one1=complex_factory_3d(world).functor([](const coord_3d& r) {return double_complex(1.0,0.0);});\n        auto one = LocalPotentialOperator<double_complex, 3>(world, \"1\" , one1);\n        return make_Hdiag(world,one);\n    }\n\n};\n\nMatrixOperator moments(World& world, int axis, int order) {\n    MatrixOperator result;\n    //int a=axis;\n    //int o=order;\n    complex_function_3d m=complex_factory_3d(world)\n            .functor([&axis, &order](const coord_3d& r){return double_complex(std::pow(r[axis],double(order)),0.0);});\n    auto mm=LocalPotentialOperator<double_complex,3>(world,\"moment\",m);\n    result.add_operator(0,0,1.0,std::make_shared<LocalPotentialOperator<double_complex,3>>(mm));\n    result.add_operator(1,1,1.0,std::make_shared<LocalPotentialOperator<double_complex,3>>(mm));\n    result.add_operator(2,2,1.0,std::make_shared<LocalPotentialOperator<double_complex,3>>(mm));\n    result.add_operator(3,3,1.0,std::make_shared<LocalPotentialOperator<double_complex,3>>(mm));\n    return result;\n}\n\nstruct ExactSpinor : public FunctionFunctorInterface<double_complex,3> {\n    long n, k, l;\n    mutable int component=0;\n    double E=0.0, C=0.0, gamma=0.0, Z, j, m;\n    bool regularized=true;\n    double cusp_a=-1.0;\n    bool compute_F=false;\n    ExactSpinor(const int n, const char lc, const double j, const int Z, const double m=0.0)\n            : ExactSpinor(n, l_char_to_int(lc),j,Z,m) { }\n    ExactSpinor(const int n, const int l, const double j, const int Z,const double m=0.0)\n        : n(n), l(l), Z(Z), j(j), m(m) {\n        if (std::abs(j-(l+0.5))<1.e-10) k=lround(-j-0.5);       // j = l+1/2\n        else k=lround(j+0.5);\n\n        if (m==0.0) this->m=j;\n        gamma=sqrt(k*k - Z*Z*alpha1*alpha1);\n        E= compute_energy();\n        C=compute_C();\n    }\n\n    std::string l_to_string(const long l) const {\n        if (l==0) return \"S\";\n        if (l==1) return \"P\";\n        if (l==2) return \"D\";\n        return \"failed\";\n    }\n\n    std::string filename() const {\n        return \"es_\"+std::to_string(n)+l_to_string(l)+std::to_string(j)+\"_m\"+std::to_string(m);\n        return \"es_n\"+std::to_string(n)+\"_k\"+std::to_string(k)+\"_j\"+std::to_string(j)+\"_m\"+std::to_string(m);\n    }\n\n    void set_ansatz(const AnsatzBase& ansatz) {\n        compute_F = (ansatz.iansatz == 3);\n        cusp_a=ansatz.get_cusp_a();\n        regularized= !(ansatz.iansatz == 0);\n    }\n\n    static int l_char_to_int(const char lc) {\n        int ll=0;\n        if (lc=='S') ll=0;\n        else if (lc=='P') ll=1;\n        else if (lc=='D') ll=2;\n        else {\n            MADNESS_EXCEPTION(\"confused L quantum in ExactSpinor\",1);\n        }\n        return ll;\n    }\n\n    Level special_level() const final {return 20;};\n    std::vector<Vector<double, 3UL>> special_points() const final {\n        coord_3d o={0.0,0.0,0.0};\n        return {o};\n    }\n\n    double compute_energy() const {\n        double c=1.0/alpha1;\n        MADNESS_CHECK(gamma!=0.0);\n        double E=c * c * 1.0/sqrt(1.0 + Z*Z/(c*c)*std::pow(n-std::abs(k)+gamma,-2.0));\n        return E;\n    }\n    double compute_C() const {\n        MADNESS_CHECK(E!=0.0);\n        const double c=1.0/alpha1;\n        return sqrt(c*c - E*E/(c*c));\n    }\n    // the energy dependent term for the spinor\n    double compute_en() const {\n        const double c=1.0/alpha1;\n        return (gamma * c*c - k*get_energy()) / (c*C);\n    }\n\n    double get_energy() const {\n        return E;\n    }\n\n    void print() const {\n        madness::print(\"exact solution for n=\",n,\", k=\",k, \"j=\",j, \"m=\",m);\n        char lc='S';\n        if (l==1) lc='P';\n        if (l==2) lc='D';\n        MADNESS_CHECK(l<3);\n        madness::print(\"term symbol\",n,lc,j);\n        madness::print(\"energy =    \",E, E-1.0/(alpha1*alpha1));\n        madness::print(\"compute_F   \",compute_F);\n        madness::print(\"regularized \",regularized);\n        madness::print(\"cusp_a      \",cusp_a);\n        madness::print(\"C        \",C);\n    }\n\n    double_complex operator()(const coord_3d& c) const override {\n        if (compute_F) return Fvalue(c);\n        else return psivalue(c);\n    }\n\n    double_complex Fvalue(const coord_3d& coord) const {\n        double r=coord.normf();\n        double rho=2*C*r;\n        double gamma1= compute_gamma(Z);\n        ncf_cusp cusp(cusp_a, Z);\n        double radial=exp(-rho*0.5)/cusp(r);\n        if (k*k>1) radial*=std::pow(rho,gamma-gamma1);\n\n        double_complex i={0.0,1.0};\n\n        const long absk=std::abs(k);\n        const double c=1.0/alpha1;\n        const double Lnk1= generalized_laguerre(2*gamma+1.0,n-absk-1,rho);\n        const double Lnk = generalized_laguerre(2*gamma-1.0,n-absk  ,rho);\n        const double En=compute_en();\n\n        const double G=Z/c * (gamma1 + gamma + 1 -k)*rho*Lnk1 + (gamma1+1)* (gamma - gamma1 -k +1)*En *Lnk;\n        const double_complex F=i*(gamma1+1)*(gamma1+gamma - 1 - k) * rho * Lnk1 + i*Z/c *(gamma1- gamma + 1 + k) *En *Lnk;\n\n        if (component==0) {\n            return radial * G * Omega(k,m,0)(coord);\n        } else if (component==1) {\n            return radial * G * Omega(k,m,1)(coord);\n        } else if (component==2) {\n            return radial * F * Omega(-k,m,0)(coord);\n        } else if (component==3) {\n            return radial * F * Omega(-k,m,1)(coord);\n        }\n        MADNESS_EXCEPTION(\"confused component in ExactSpinor::Fvalue\",1);\n        return 0.0;\n    }\n\n    double_complex psivalue(const coord_3d& coord) const {\n        double r=coord.normf();\n        double rho=2*C*r;\n        double radial=1.0;\n        ncf_cusp ncf(cusp_a,Z);\n        radial*=std::pow(2*C,gamma)*exp(-0.5*rho)/ncf(r);\n        // three cases for R^{-1} * r^{gamma_k-1}:\n        // 1. regularization with R=r^{gamma1-1}, |k|==1: factor: 1\n        // 2. regularization with R=r^{gamma1-1}, |k|>1: factor: r^{gamma_k-gamma1}\n        // 3. no regularization, factor r^{gamma_k-1};\n        double gamma1= compute_gamma(Z);\n        long absk= std::abs(k);\n        if (regularized) {\n            if (absk>1) {\n                radial *= std::pow(r,gamma-gamma1);          // exponent is positive\n            }\n        } else {\n            ncf_singularity ncf_s(gamma);\n            radial *= ncf_s(r);\n        }\n\n\n        const double Lnk1= generalized_laguerre(2*gamma+1.0,n-absk-1,rho);\n        const double Lnk = generalized_laguerre(2*gamma-1.0,n-absk  ,rho);\n        const double En=compute_en();\n        const double c=1.0/alpha1;\n\n        double_complex i={0.0,1.0};\n        double g=radial * (Z/c*rho* Lnk1 + (gamma - k)*En * Lnk);\n        double f=radial * ((gamma-k)*rho*Lnk1 + Z/c*En * Lnk);\n//        double f=Z*alpha1*radial;\n        //double sgnk= (k>0) ? 1.0 : -1.0;\n\n//        return angular(coord,g,f);\n//        if (component==0) {\n//            return g * Xi(k,m,0,j,l)(coord);\n//        } else if (component==1) {\n//            return g * Xi(k,m,1,j,l)(coord);\n//        } else if (component==2) {\n//            return i * f * Xi(-k,m,0,j,l)(coord);\n//        } else if (component==3) {\n//            return i * f * Xi(-k,m,1,j,l)(coord);\n//        }\n\n        if (component==0) {\n            return g * Omega(k,m,0)(coord);\n        } else if (component==1) {\n            return g * Omega(k,m,1)(coord);\n        } else if (component==2) {\n            return i * f * Omega(-k,m,0)(coord);\n        } else if (component==3) {\n            return i * f * Omega(-k,m,1)(coord);\n        }\n\n        MADNESS_EXCEPTION(\"confused component in ExactSpinor\",1);\n        return {0.0,0.0};\n    }\n\n    double_complex angular(const coord_3d& c, const double g, const double f) const {\n\n        double_complex i={0.0,1.0};\n        double_complex prefac =std::pow(i,l)*std::pow(-1.0,m+0.5);\n        if (component==0) {   // j = l+1/2 : k=-j-0.5 == j=1/2 ; k=-1\n            double nn = (l==lround(j-0.5)) ? -sqrt((j+m)/(2.0*j)) : sqrt((j-m+1)/(2*j+2));\n            return prefac * g * nn *SphericalHarmonics(l,lround(m-0.5))(c);\n//            return g/r * sqrt(double_complex((k + 0.5 - m)/(2.0*k + 1))) *SphericalHarmonics(k,lround(m-0.5))(c);\n        } else if (component==1) {\n            double nn = (l==lround(j-0.5)) ? sqrt((j-m)/(2.0*j)) : sqrt((j+m+1)/(2*j+2));\n            return prefac * g * nn *SphericalHarmonics(l,lround(m+0.5))(c);\n//            return -g/r * sgnk* sqrt(double_complex((k + 0.5 + m)/(2.0*k + 1))) *SphericalHarmonics(k,lround(m+0.5))(c);\n        } else if (component==2) {\n            double nn = (l==lround(j-0.5)) ? sqrt((j-m+1)/(2.0*j+2.0)) : sqrt((j+m)/(2.0*j));\n            long ll=  (l==lround(j-0.5))  ? l+1 : l-1;\n            return prefac * i*f * nn *SphericalHarmonics(ll,lround(m-0.5))(c);\n//            return i*f/r * sqrt(double_complex((-k + 0.5 - m)/(-2.0*k + 1))) *SphericalHarmonics(-k,lround(m-0.5))(c);\n        } else if (component==3) {\n            double nn = (l==lround(j-0.5)) ? sqrt((j+m+1)/(2.0*j+2.0)) : -sqrt((j-m)/(2.0*j));\n            long ll=  (l==lround(j-0.5))  ? l+1 : l-1;\n            return prefac * i*f * nn *SphericalHarmonics(ll,lround(m+0.5))(c);\n//            return -i*f/r * sgnk* sqrt(double_complex((-k + 0.5 - m)/(-2.0*k + 1))) *SphericalHarmonics(-k,lround(m+0.5))(c);\n        }\n        MADNESS_EXCEPTION(\"confused component in ExactSpinor::angular\",1);\n        return {0.0,0.0};\n    }\n\n    Spinor get_spinor(World& world) const {\n        Spinor spinor;\n        component=0;\n        spinor.components[0]=complex_factory_3d(world).functor(*this);\n        component=1;\n        spinor.components[1]=complex_factory_3d(world).functor(*this);\n        component=2;\n        spinor.components[2]=complex_factory_3d(world).functor(*this);\n        component=3;\n        spinor.components[3]=complex_factory_3d(world).functor(*this);\n        return spinor;\n    }\n\n\n};\n\n\ntemplate<typename AnsatzT>\nvoid orthonormalize(std::vector<Spinor>& arg, const AnsatzT ansatz) {\n    World& world=arg.front().world();\n\n    double maxq;\n    do {\n        auto bra=ansatz.make_vbra(arg);\n        ansatz.normalize(bra,arg);\n        Tensor<double_complex> S=matrix_inner(bra,arg);\n        Tensor<double_complex> Q = NemoBase::Q2(S);\n        maxq=0.0;\n        for (int i=0; i<Q.dim(0); ++i)\n            for (int j=0; j<i; ++j)\n                maxq = std::max(maxq,std::abs(Q(i,j)));\n        arg = transform(world, arg, Q);\n        truncate(arg);\n    } while (maxq>0.01);\n\n    auto bra=ansatz.make_vbra(arg);\n}\n\n\n\ntemplate<typename ansatzT>\nSpinor apply_bsh(ansatzT& ansatz, const MatrixOperator& Hd, const MatrixOperator& Hv, const MatrixOperator& metric,\n                 const Spinor& spinor, const double energy) {\n    World& world=spinor.world();\n    timer t(world);\n\n    const double mu=ansatz.mu(energy);\n    double fac=  alpha1*alpha1;\n    print(\"energy, mu, bsh_prefac in bsh: \",energy, mu,fac);\n\n    auto bra=ansatz.make_bra(spinor);\n    if (debug) show_norms(bra,spinor,\"spinor before vpsi\");\n    auto vpsi=-2.0*Hv(spinor);\n\n    vpsi.components[2] *= clight; // Scale small components so that integral operator maintains precision\n    vpsi.components[3] *= clight;\n\n    vpsi.truncate();\n    if (debug) show_norms(bra,vpsi,\"norms of vpsi\");\n    if (debug) show_norms(ansatz.make_bra(vpsi),vpsi,\"<vpsi | vpsi>\");\n    t.tag(\"Vpsi\");\n\n    auto g=BSHOperator<3>(world,mu,lo,FunctionDefaults<3>::get_thresh());\n    auto gvpsi1=apply(world,g,vpsi.components);\n    gvpsi1 = truncate(gvpsi1); /// Truncate before undoing scaling\n    \n    vpsi.components[2] *= 1.0/clight; // Undo scaling\n    vpsi.components[3] *= 1.0/clight;\n    gvpsi1[2] *= 1.0/clight;\n    gvpsi1[3] *= 1.0/clight;\n    t.tag(\"GVpsi\");\n\n    auto gvpsi=Spinor(gvpsi1);\n    \n    if (debug) show_norms(ansatz.make_bra(gvpsi),gvpsi,\"|| gvpsi ||\");\n\n    auto result1=Hd(gvpsi);\n    if (debug) show_norms(ansatz.make_bra(result1),result1,\"|| Hd(gvpsi) ||\");\n\n    auto result2=energy*metric(gvpsi);\n    if (debug) show_norms(ansatz.make_bra(result2),result2,\"|| energy*N*(gvpsi) ||\");\n    Spinor result=0.5*fac*(result1 + result2);\n\n    if (debug) show_norms(ansatz.make_bra(result),result,\"<result | result>\");\n    t.tag(\"HdGVpsi\");\n\n    return result.truncate();\n}\n\nvoid apply_mask(std::vector<Spinor>& v) {\n  for (auto& s : v) {\n    for (auto& f : s.components) {\n      f = f*mask;\n    }\n  }\n}\n\ntemplate<typename AnsatzT>\nstd::vector<Spinor> iterate(const std::vector<Spinor>& input, const std::vector<double> energy, const AnsatzT& ansatz, const int maxiter) {\n\n    print_header2(\"starting iterations\");\n    World& world=input.front().world();\n    spinorallocator alloc(world,input.size());\n    XNonlinearSolver<std::vector<Spinor>,double_complex,spinorallocator> solver(alloc);\n    solver.set_maxsub(5); // was 3\n    solver.do_print=true;\n\n    auto Hv=ansatz.make_Hv(world);\n    auto Hd=ansatz.make_Hd(world);\n    auto H=Hd+Hv;\n    auto metric=  Metric();\n    std::vector<Spinor> current=copy(input);\n    orthonormalize(current,ansatz);\n    for (int iter=0; iter<maxiter; ++iter) {\n        if (iter<2) solver.clear_subspace();    // start KAIN after 1st iteration since initial guess might be not very smooth\n        double wall0=wall_time();\n\n        print_header3(\"Iteration \"+std::to_string(iter));\n        orthonormalize(current,ansatz);\n        std::vector<Spinor> newpsi;\n        for (auto& n : current) n.print_norms(\"norm of current spinor\");\n        for (size_t i=0; i<current.size(); ++i) newpsi.push_back(apply_bsh(ansatz,Hd,Hv,metric,current[i],energy[i]));\n        for (auto& n : newpsi) n.print_norms(\"norm of updated spinor\");\n        auto residual=truncate(current-newpsi);\n        double res=0.0;\n        for (const auto& r : residual) res+=norm2(world,r.components);\n        newpsi=truncate(solver.update(current,residual,1.e-4,3));\n\tapply_mask(newpsi);\n        orthonormalize(newpsi,ansatz);\n\tauto bra=ansatz.make_vbra(newpsi);\n        Tensor<double_complex> fock;\n\t{\n\t  auto Hpsi = H(newpsi);\n\t  auto Hvpsi = Hv(newpsi);\n\t  fock =matrix_inner(bra,Hpsi);\n\t\n\t  Vector<double,3> lo = {0.0, 0.0, 0.0};\n\t  Vector<double,3> hi = {0.0, 0.0, 0.5*FunctionDefaults<3>::get_cell()(2,1)};\n\t  Hpsi[0].components.insert(Hpsi[0].components.end(), Hvpsi[0].components.begin(), Hvpsi[0].components.end());\n\t  Hpsi[0].components.insert(Hpsi[0].components.end(), newpsi[0].components.begin(), newpsi[0].components.end());\n\t  plot_line(\"Hpsi.dat\", 10001, lo, hi, Hpsi[0].components);\n\t}\n\t\n        fock+=conj_transpose(fock);\n        fock*=0.5;\n        newpsi=truncate(orthonormalize_fock(newpsi,bra,fock));\n        bra=ansatz.make_vbra(newpsi);\n        std::vector<double> energy_differences;\n        for (size_t i=0; i<current.size(); ++i) {\n//            newpsi[i].plot(\"psi\"+std::to_string(i)+\"_iteration\"+std::to_string(iter)+\"_ansatz\"+ansatz.filename());\n            double en=real(inner(bra[i],H(newpsi[i])));\n//            show_norms(bra,H(newpsi),\"energy contributions\");\n            double el_energy=compute_electronic_energy(en);\n            double exact_el_energy=compute_electronic_energy(energy[i]);\n            double diff=(el_energy-exact_el_energy);\n            energy_differences.push_back(diff);\n            printf(\"energy, el. energy, exact el. energy, difference %12.8f %12.8f %12.8f %4.1e\\n\", en, el_energy,exact_el_energy,diff);\n        }\n        current=newpsi;\n        double wall1=wall_time();\n        printf(\"elapsed time in iteration %2d: %6.2f with error %4.1e \\n\",iter,wall1-wall0,res );\n//        printf(\"elapsed time in iteration %2d: %6.2f with energy/diff %12.8f %.2e \\n\",iter,wall1-wall0,compute_electronic_energy(en),\n//               compute_electronic_energy(en) - compute_electronic_energy(energy));\n    }\n    return current;\n}\n\ntemplate<typename ansatzT>\nvoid run(World& world, ansatzT ansatz, const int nuclear_charge, const commandlineparser& parser, const int nstates) {\n\n  //double thresh=FunctionDefaults<3>::get_thresh();\n  //long tmode=FunctionDefaults<3>::get_truncate_mode();\n//    Nemo nemo(world,parser);\n//    if (world.rank()==0) nemo.get_param().print(\"dft\",\"end\");\n\n    mask = real_factory_3d(world).f(&mask3d);\n    mask.truncate();\n    mask.reconstruct();\n\n    std::vector<Spinor> guesses;\n    std::vector<double> energies;\n\n//    guesses.push_back(guess);\n//    energies.push_back(ansatz.energy());\n    ExactSpinor psi1s_half=ExactSpinor(1,'S',0.5,nuclear_charge,0.5);\n    ExactSpinor psi1s_mhalf=ExactSpinor(1,'S',0.5,nuclear_charge,-0.5);\n    ExactSpinor psi2s_half=ExactSpinor(2,'S',0.5,nuclear_charge,0.5);\n    ExactSpinor psi2s_mhalf=ExactSpinor(2,'S',0.5,nuclear_charge,-0.5);\n    ExactSpinor psi2p1_half  =ExactSpinor(2,'P',0.5,nuclear_charge, 0.5);\n    ExactSpinor psi2p1_mhalf =ExactSpinor(2,'P',0.5,nuclear_charge,-0.5);\n    ExactSpinor psi2p2_thalf =ExactSpinor(2,'P',1.5,nuclear_charge, 1.5);\n    ExactSpinor psi2p2_half  =ExactSpinor(2,'P',1.5,nuclear_charge, 0.5);\n    ExactSpinor psi2p2_mhalf =ExactSpinor(2,'P',1.5,nuclear_charge,-0.5);\n    ExactSpinor psi2p2_mthalf=ExactSpinor(2,'P',1.5,nuclear_charge,-1.5);\n//    std::vector<ExactSpinor> states ={psi1s,psi2p};\n    std::vector<ExactSpinor> states ={psi1s_half,psi1s_mhalf,       // 1S 1/2\n                                      psi2s_half,psi2s_mhalf,       // 2S 1/2\n                                      psi2p1_half,psi2p1_mhalf,     // 2P 1/2\n                                      psi2p2_mhalf,psi2p2_thalf,psi2p2_mhalf,psi2p2_mthalf}; // 2P 3/2\n\n\n    sgl_guess sgl_1s=sgl_guess(1,0,0,nuclear_charge);\n    sgl_guess sgl_2s=sgl_guess(2,0,0,nuclear_charge);\n    sgl_guess sgl_2p0=sgl_guess(2,1,0,nuclear_charge);\n    sgl_guess sgl_2p1=sgl_guess(2,1,1,nuclear_charge);\n    sgl_guess sgl_2pm1=sgl_guess(2,1,-1,nuclear_charge);\n    sgl_guess sgl_3s=sgl_guess(3,0,0,nuclear_charge);\n    std::vector<sgl_guess> sgl_states={sgl_1s,sgl_2s,sgl_2p0,sgl_2p1,sgl_2pm1,sgl_3s};\n    std::vector<Spinor> guess;\n    const bool sglguess=true;\n    if (sglguess) {\n        print(\"\\nUsing Schroedinger guess\\n\");\n\n        std::vector<complex_function_3d> wf;\n        for (int i=0; i<nstates; ++i) wf.push_back(sgl_states[i].get_wf(world));\n        guess= schrodinger2dirac(wf,ansatz,nuclear_charge);\n    } else {\n        print(\"\\nUsing exact spinor guess\\n\");\n        for (auto& state: states) {\n            state.set_ansatz(ansatz);\n            guess.push_back(state.get_spinor(world));\n            state.print();\n            guess.back().print_norms(\"guess\");\n\n        }\n    }\n    apply_mask(guess);\n    orthonormalize(guess,ansatz);\n    auto bra=ansatz.make_vbra(guess);\n    Tensor<double_complex> S=matrix_inner(bra,guess);\n    print(\"initial overlap after  orthonormalization\");\n    print(S);\n\n\n//    for (ExactSpinor& state : states) {\n    for (int i=0; i<nstates; ++i) {\n        ExactSpinor& state=states[i];\n        state.compute_F=true;\n        state.cusp_a=ansatz.get_cusp_a();\n//        Spinor guess=state.get_spinor(world);\n        Spinor spinorguess=guess[i];\n        guesses.push_back(spinorguess);\n        energies.push_back(state.get_energy());\n        ansatz.normalize(guesses.back());\n    }\n\n\n    //const double alpha=constants::fine_structure_constant;\n    //const double c=1.0/alpha;\n    //const double gamma= compute_gamma(nuclear_charge);\n    //double electronic_energy=gamma*c*c - c*c;\n    //double energy=ansatz.energy();\n\n    auto Hv=ansatz.make_Hv(world);\n    auto Hd=ansatz.make_Hd(world);\n    auto H=Hv+Hd;\n    print_header2(\"Hamilton matrices\");\n    Hv.print(\"Hamiltonian Hv\");\n    Hd.print(\"Hamiltonian Hd\");\n    H.print(\"Hamiltonian Hd+Hv\");\n\n    auto result=iterate(guesses,energies,ansatz,10);\n\n}\n\ntemplate<typename ansatzT>\nvoid eigenvector_test(World& world, const ansatzT ansatz, ExactSpinor es) {\n    print(\"=============================================================\");\n    print(\"Ansatz\", ansatz.name());\n    LProjector lproj(world);\n\n    es.set_ansatz(ansatz);\n    es.print();\n    auto exactF = es.get_spinor(world);\n    ansatz.normalize(exactF);\n    exactF.print_norms(\"exactf normalized\");\n    exactF.plot(\"exact\"+es.filename()+ansatz.filename());\n    lproj.analyze(exactF,\"ExactSpinor\");\n\n    auto exactF1 = ansatz.make_guess(world);\n    ansatz.normalize(exactF1);\n    lproj.analyze(exactF1,\"ansatz.make_guess\");\n    exactF1.print_norms(\"make_guess normalized\");\n    auto diff1=exactF-exactF1;\n    diff1.print_norms(\"exactf-make_guess normalized\");\n\n    Spinor spinor = copy(exactF);\n\n    auto Hv = ansatz.make_Hv(world);\n    auto Hd = ansatz.make_Hd(world);\n    auto H = Hv + Hd;\n    H.print(\"H\");\n    Hd.print(\"Hd\");\n    Hv.print(\"Hv\");\n\n\n\n    Spinor bra = ansatz.make_bra(spinor);\n    ansatz.normalize(bra, spinor);\n    auto norms = norm2s(world, spinor.components);\n\n    print(\"\");\n    auto Hdspinor = Hd(spinor);\n    auto Hvspinor = Hv(spinor);\n    auto Hspinor = H(spinor);\n    auto hnorms = norm2s(world, Hspinor.components);\n    auto energy_norms=norms;\n    for (auto& c : energy_norms) c*=es.get_energy();\n    print(\"E * component norms\", energy_norms);\n    print(\"H(spinor) component norms\", hnorms);\n    auto en = inner(bra, Hspinor);\n\n    auto diff = Hspinor - en * spinor;\n    spinor.print_norms(\"spinor\");\n    Hspinor.print_norms(\"Hspinor\");\n    Hdspinor.print_norms(\"Hdspinor\");\n    Hvspinor.print_norms(\"Hvspinor\");\n    diff.print_norms(\"diff_Hspinor_en_spinor\");\n    double c=1.0/alpha1;\n    print(\"energy\", en, real(en - c * c), \"difference\", real(en - c * c) - (es.get_energy() - c * c));print(\"\");\n    print(\"\");\n}\n\nint main(int argc, char* argv[]) {\n    World& world=initialize(argc,argv);\n    if (world.rank()==0) {\n        print(\"\\n\");\n        print_centered(\"Dirac hydrogen atom\");\n    }\n    startup(world,argc,argv,true);\n    if (world.rank()==0) print(madness::info::print_revision_information());\n\n\n    commandlineparser parser(argc,argv);\n//    parser.set_keyval(\"dft\",\"'k=8'\");\n    if (world.rank()==0) {\n        print(\"\\ncommand line parameters\");\n        parser.print_map();\n    }\n\n    FunctionDefaults<3>::set_cubic_cell(-20,20);\n    FunctionDefaults<3>::set_k(12);\n    FunctionDefaults<3>::set_thresh(1.e-10);\n    int tmode=1;\n    if (parser.key_exists(\"k\")) FunctionDefaults<3>::set_k(atoi(parser.value(\"k\").c_str()));\n    if (parser.key_exists(\"thresh\")) FunctionDefaults<3>::set_thresh(atof(parser.value(\"thresh\").c_str()));\n    if (parser.key_exists(\"L\")) FunctionDefaults<3>::set_cubic_cell(-atof(parser.value(\"L\").c_str()),atof(parser.value(\"L\").c_str()));\n    if (parser.key_exists(\"truncate_mode\")) tmode=atoi(parser.value(\"truncate_mode\").c_str());\n    FunctionDefaults<3>::set_truncate_mode(tmode);\n\n    DiracParameters parameters(world,parser);\n    parameters.print(\"dirac\");\n    use_ble=parameters.use_ble();\n    use_bsp=parameters.use_bsp();\n    nucrad=parameters.nucrad();\n    nucexpt=3.0/nucrad;\n    print(\"square root of nuclear exponent\", nucexpt);\n    lo=parameters.lo();\n\n    print(\"\\nCalculation parameters\");\n    print(\"thresh      \",FunctionDefaults<3>::get_thresh());\n    print(\"k           \",FunctionDefaults<3>::get_k());\n    print(\"trunc mode  \",FunctionDefaults<3>::get_truncate_mode());\n    print(\"cell        \",FunctionDefaults<3>::get_cell_width());\n\n\n    const double alpha=constants::fine_structure_constant;\n    const double c=1.0/alpha;\n    const double gamma= compute_gamma(parameters.charge());\n    print(\"speed of light\",c);\n    print(\"fine structure constant\",alpha);\n    //const int k=1;\n    print(\"gamma\",gamma);\n    double energy_exact=gamma*c*c - c*c;\n    print(\"1s energy for Z=\",parameters.charge(),\": \",energy_exact);\n\n    ExactSpinor es1s(1,'S',0.5,parameters.charge());\n    ExactSpinor es2s(2,'S',0.5,parameters.charge());\n    ExactSpinor es2p1(2,'P',0.5,parameters.charge());\n    ExactSpinor es2p2(2,'P',1.5,parameters.charge());\n\n    print(\"exact energies: 1s, 2s, 2p1/2, 2p3/2\",es1s.get_energy()-c*c,\n          es2s.get_energy()-c*c,\n          es2p1.get_energy()-c*c,\n          es2p2.get_energy()-c*c);\n\n\n\n\n//    eigenvector_test(world,Ansatz1(nuclear_charge,nemo_factor),ExactSpinor(1,'S',0.5,nuclear_charge, 0.5));\n//    eigenvector_test(world,Ansatz1(nuclear_charge,nemo_factor),ExactSpinor(2,'S',0.5,nuclear_charge, 0.5));\n//    eigenvector_test(world,Ansatz1(nuclear_charge,nemo_factor),ExactSpinor(2,'P',0.5,nuclear_charge, 0.5));\n//    eigenvector_test(world,Ansatz1(nuclear_charge,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge, 1.5));\n//    eigenvector_test(world,Ansatz0(nuclear_charge,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge, 0.5));\n//    eigenvector_test(world,Ansatz0(nuclear_charge,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge,-0.5));\n//    eigenvector_test(world,Ansatz0(nuclear_charge,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge,-1.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,nemo_factor),ExactSpinor(2,'S',0.5,nuclear_charge,-0.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge, 1.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge, 0.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge,-0.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge,-1.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,nemo_factor),ExactSpinor(2,'P',0.5,nuclear_charge, 0.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,nemo_factor),ExactSpinor(2,'P',0.5,nuclear_charge, 0.5));\n//    eigenvector_test(world,Ansatz1(nuclear_charge,1),ExactSpinor(1,'S',0.5,nuclear_charge));\n//    eigenvector_test(world,Ansatz2(nuclear_charge,1),ExactSpinor(1,'S',0.5,nuclear_charge));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,1,nemo_factor),ExactSpinor(1,'S',0.5,nuclear_charge));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,1,1.3),ExactSpinor(3,'D',2.5,nuclear_charge));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,1,nemo_factor),ExactSpinor(1,'S',0.5,nuclear_charge,0.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,1,nemo_factor),ExactSpinor(1,'S',0.5,nuclear_charge,-0.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,1,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge,1.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,1,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge,0.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,1,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge,-0.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,1,nemo_factor),ExactSpinor(2,'P',1.5,nuclear_charge,-1.5));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,1,-1.2),ExactSpinor(2,'P',1.5,nuclear_charge));\n//    eigenvector_test(world,Ansatz3(nuclear_charge,1,-1.2),ExactSpinor(1,'S',0.5,nuclear_charge));\n\n\n    try {\n        run(world,Ansatz0(parameters.charge()),parameters.charge(),parser,parameters.nstates());\n    } catch (...) {\n        std::cout << \"caught an error \" << std::endl;\n    }\n    finalize();\n    return 0;\n\n\n}\n"
  },
  {
    "path": "src/examples/functionio.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file functionio.cc\n  \\brief Example of I/O with functions\n  \\defgroup functionioeg Example of function I/O from getting started guide\n  \\ingroup examples\n\n  \\par Points of interest\n  - Moving MADNESS functions to/from disk\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/functionio.cc>here</a>.\n\n  \\par Background\n  MADNESS functions are parallel objects distributed across the whole\n  machine.  If you try to store a function into a sequential archive,\n  only the part local to the calling process will be stored.\n  I.e., you need to use a parallel archive.  The parallel archive\n  has an adjustable number of proceses that actually perform I/O\n  for effiency.  If your functions are few and small, the default of one\n  writer is OK.  For large (or many) functions and I/O is a bottleneck,\n  then increase the number of I/O nodes.\n\n  \\par Implementation\n  Three different functions are created, written to disk, read back,\n  and finally compared with the originals.\n\n */\n\n#include <madness/mra/mra.h>\n#include <madness/constants.h>\nusing namespace madness;\nusing namespace std;\n\nstatic const double L = 10;     // Half box size\n\n/// Normalized gaussian\nstatic double function(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    static const double alpha = 1.9; // Exponent of gaussian\n    static const double fac = pow(constants::pi/alpha,-1.5);\n    return exp(-alpha*(x*x+y*y+z*z))*fac;\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world, argc, argv);\n    FunctionDefaults<3>::set_cubic_cell(-L, L);\n    const char filename[] = \"mi_casa_es_su_casa\";\n\n    if (world.rank() == 0) print(\"Making test functions\");\n    real_function_3d f = real_factory_3d(world).f(::function);\n    real_function_3d g = f*f;\n    real_function_3d h = g - f;\n\n    if (world.rank() == 0) print(\"Writing test functions -->\", filename);\n    {\n        archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> out(world, filename);\n        out & f & g & h;\n    }\n\n    if (world.rank() == 0) print(\"Reading test functions <--\", filename);\n    real_function_3d ftest, gtest, htest;\n    {\n        archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> input(world, filename);\n        input & ftest & gtest & htest;\n    }\n\n    double err = (f-ftest).norm2() + (g-gtest).norm2() + (h-htest).norm2();\n    if (world.rank() == 0) print(\"The difference is\", err);\n\n    finalize();\n}\n"
  },
  {
    "path": "src/examples/gaussian.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file gaussian.cc\n \\brief A simple example of projecting and using MADNESS functions.\n \\ingroup gettingstarted\n\n This example projects a simple Gaussian function,\n \\f[ g(\\vec{x}) = e^{-|\\vec{x}|^2}, \\f]\n into the MADNESS adaptive basis and computes several integrals:\n \\f[\n    \\int \\mathrm{d}^3 \\vec{x} \\; g(\\vec{x}) = \\pi^{3/2} \\doteq 5.5683279,\n \\f]\n \\f[\n    \\left( \\int \\mathrm{d}^3 \\vec{x} \\; g(\\vec{x})^2 \\right)^{1/2} = (\\pi/2)^{3/4} \\doteq 1.403104,\n \\f]\n \\f[\n    \\int \\mathrm{d}^3 \\vec{x} \\; g(\\vec{x}) \\int \\mathrm{d}^3 \\vec{y} \\; |\\vec{x}-\\vec{y}|^{-1} g(\\vec{y}) = \\pi^{5/2} 2^{1/2} \\doteq 24.739429.\n \\f]\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\nusing namespace madness;\n\n/// C++ function for projecting the Gaussian test function.\n\n/// \\param[in] r The coordinate at which to evaluate the function.\n/// \\return The value of the Gaussian at the specified coordinate.\ndouble gaussian(const coord_3d& r) {\n    double x=r[0], y=r[1], z=r[2];\n    return exp(-(x*x + y*y + z*z));\n}\n\n/// Main function. Project the function and compute the integrals.\n\n/// \\param[in] argc The number of command-line arguments.\n/// \\param[in] argv The command-line arguments.\n/// \\return Exit status.\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n    FunctionDefaults<3>::set_cubic_cell(-6.0,6.0);\n    real_convolution_3d op = CoulombOperator(world, 1e-4, 1e-6);\n    real_function_3d g = real_factory_3d(world).f(gaussian);\n\n    g.truncate();\n\n    print(g.trace()); // exact trace is Pi^(3/2)=5.56832799683175\n    print(g.norm2()); // exact norm2 is (Pi/2)^3/4=1.40310414553422\n    print(inner(g,op(g))); // exact answer is Pi^(5/2)*sqrt(2) = 24.7394294511936\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/graveyard",
    "content": "\n=============== PHIL.CC ====================\n/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n#include <madness/mra/lbdeux.h>\n\nusing namespace madness;\nusing namespace std;\n\n\ntypedef SharedPtr< FunctionFunctorInterface<double,3> > functorT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef Function<double,3> functionT;\ntypedef Vector<double,3> coordT;\n\ntemplate <typename T, int NDIM>\nstruct lbcost {\n    double leaf_value;\n    double parent_value;\n    lbcost(double leaf_value=1.0, double parent_value=0.0) : leaf_value(leaf_value), parent_value(parent_value) {}\n    double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n        if (key.level() <= 1) {\n            return 1000;\n        }\n        else if (node.is_leaf()) {\n            return leaf_value;\n        }\n        else {\n            return parent_value;\n        }\n    }\n};\n\nconst double PI = 3.1415926535897932384;\n\n// list of centers\nvector<coordT> centers;\n\nconst double expnt = 60.0;\nconst double coeff = pow(expnt/PI,1.5);\n\n// Test function\nclass Test : public FunctionFunctorInterface<double,3> {\npublic:\n    double operator()(const coordT& x) const {\n        double sum = 0.0;\n        for (unsigned int i=0; i<centers.size(); i++) {\n            const coordT& y = centers[i];\n            double xx = x[0]-y[0];\n            double yy = x[1]-y[1];\n            double zz = x[2]-y[2];\n            \n            double arg = expnt*(xx*xx + yy*yy + zz*zz);\n            if (arg < 46) sum += coeff*exp(-arg);\n        }\n\n        return sum;\n    }\n\n    vector<coordT> special_points() const {\n        return centers;\n    }\n\n    virtual Level special_level() {\n        return 6;\n    }\n\n};\n\ndouble ttt_, sss_;\n#define START_TIMER world.gop.fence(); ttt_=wall_time(); sss_=cpu_time()\n#define END_TIMER(msg) ttt_=wall_time()-ttt_; sss_=cpu_time()-sss_; if (world.rank()==0) printf(\"timer: %20.20s %8.4fs %8.4fs\\n\", msg, sss_, ttt_)\n        \n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    try {\n        World world(MPI::COMM_WORLD);\n        \n        startup(world,argc,argv);\n        cout.precision(8);\n        \n        Tensor<double> cell(3,2);\n        double L = 30.0;\n        for (int i=0; i<3; i++) {\n            cell(i,0) = -L;\n            cell(i,1) =  L;\n        }\n        FunctionDefaults<3>::set_cell(cell);\n        FunctionDefaults<3>::set_k(10);\n        FunctionDefaults<3>::set_thresh(1e-10);\n        FunctionDefaults<3>::set_refine(true);\n        FunctionDefaults<3>::set_autorefine(false);\n        FunctionDefaults<3>::set_initial_level(2);\n        FunctionDefaults<3>::set_apply_randomize(false);\n        FunctionDefaults<3>::set_project_randomize(true);\n\n        const int ncent = 10; // No. of centers is ncent**3\n        double h = 2*L/ncent;\n        coordT v;\n        for (int ix=0; ix<ncent; ix++) {\n            double x = -L + h*(ix+0.5);\n            for (int iy=0; iy<ncent; iy++) {\n                double y = -L + h*(iy+0.5);\n                for (int iz=0; iz<ncent; iz++) {\n                    double z = -L + h*(iz+0.5);\n                    //if (world.rank() == 0) print(ix, iy, iz, x, y, z);\n                    v[0] = x; v[1] = y; v[2] = z;\n                    centers.push_back(v);\n                }\n            }\n        }\n\n        if (world.rank() == 0) print(\"FIRST WITHOUT LOAD BAL\");\n        START_TIMER;\n        functionT rho = factoryT(world).functor(functorT(new Test()));\n        world.gop.fence();\n        END_TIMER(\"project\");\n\n        START_TIMER;\n        LoadBalanceDeux<3> lb(world);\n        lb.add_tree(rho, lbcost<double,3>(1.0,1.0));\n        FunctionDefaults<3>::set_pmap(lb.load_balance(2.0));\n        world.gop.fence();\n        END_TIMER(\"load balance\");\n\n        if (world.rank() == 0) print(\"NOW WITH LOAD BAL\");\n        START_TIMER;\n        rho = functionT(factoryT(world).functor(functorT(new Test())));\n        world.gop.fence();\n        END_TIMER(\"project\");\n\n        START_TIMER;\n        double norm = rho.trace();\n        END_TIMER(\"trace in scaling fn\");\n        if (world.rank() == 0) print(\"trace\", norm);\n        \n        START_TIMER;\n        norm = rho.norm2();\n        END_TIMER(\"norm2 in scaling fn\");\n        if (world.rank() == 0) print(\"norm2\", norm);\n        \n        START_TIMER;\n        rho.compress();\n        world.gop.fence();\n        END_TIMER(\"compress\");\n\n        START_TIMER;\n        norm = rho.trace();\n        END_TIMER(\"trace in wavelets\");\n        if (world.rank() == 0) print(\"trace\", norm);\n        \n        START_TIMER;\n        norm = rho.norm2();\n        END_TIMER(\"norm2 in wavelets\");\n        if (world.rank() == 0) print(\"norm2\", norm);\n        \n        START_TIMER;\n        rho.reconstruct();\n        world.gop.fence();\n        END_TIMER(\"reconstruct\");\n\n        START_TIMER;\n        rho.compress();\n        world.gop.fence();\n        END_TIMER(\"compress\");\n\n        world.gop.fence();\n        START_TIMER;\n        rho.truncate();\n        END_TIMER(\"truncate\");\n\n        START_TIMER;\n        rho.reconstruct();\n        END_TIMER(\"reconstruct\");\n\n        START_TIMER;\n        rho.compress();\n        END_TIMER(\"compress\");\n\n        START_TIMER;\n        rho.reconstruct();\n        END_TIMER(\"reconstruct\");\n\n        SeparatedConvolution<double,3> op = CoulombOperator<double>(world, \n                                                                    FunctionDefaults<3>::get_k(), \n                                                                    1e-3, \n                                                                    FunctionDefaults<3>::get_thresh());\n\n        world.gop.fence();\n        START_TIMER;\n        apply(op, rho);\n        END_TIMER(\"apply-1\");\n\n        world.gop.fence();\n        START_TIMER;\n        apply(op, rho);\n        END_TIMER(\"apply-2\");\n\n        world.gop.fence();\n        START_TIMER;\n        LoadBalanceDeux<3> lbX(world);\n        lbX.add_tree(rho, lbcost<double,3>(1.0,1.0));\n        world.gop.fence();\n        FunctionDefaults<3>::set_pmap(lbX.load_balance(2.0));\n        world.gop.fence();\n        rho = copy(rho, FunctionDefaults<3>::get_pmap());\n        world.gop.fence();\n        END_TIMER(\"load balance truncated\");\n\n        START_TIMER;\n        rho.reconstruct();\n        END_TIMER(\"reconstruct\");\n\n        START_TIMER;\n        rho.compress();\n        END_TIMER(\"compress\");\n\n        START_TIMER;\n        rho.reconstruct();\n        END_TIMER(\"reconstruct\");\n\n        START_TIMER;\n        apply(op, rho);\n        END_TIMER(\"apply-1\");\n\n        START_TIMER;\n        apply(op, rho);\n        END_TIMER(\"apply-2\");\n\n        START_TIMER;\n        size_t ncoeff = rho.size();\n        END_TIMER(\"count coeff\");\n        if (world.rank() == 0) print(\"NCOEFF \", ncoeff);\n\n        START_TIMER;\n        size_t depth = rho.max_depth();\n        END_TIMER(\"count coeff\");\n        if (world.rank() == 0) print(\"depth \", depth);\n\n        ThreadPool::end();\n        print_stats(world);\n\n    } catch (const MPI::Exception& e) {\n        //        print(e);\n        error(\"caught an MPI exception\");\n    } catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    } catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    } catch (const char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    } catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    } catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    } catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    } catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    finalize();\n    return 0;\n}\n\n=====================================\n\n==== BIGBOY.CC =============\n/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov \n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  \n  $Id$\n*/\n\n/// \\file bigboy.cc\n/// \\brief artificial benchmark for Cray XT testing\n\n#include <madness/mra/mra.h>\nusing namespace madness;\n\n#include \"molecule.h\"\n\ntypedef Vector<double,3> coordT;\ntypedef SharedPtr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\n\ndouble ttt, sss;\n#define START_TIMER world.gop.fence(); ttt=wall_time(); sss=cpu_time()\n#define END_TIMER(msg) ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt)\n\nstatic const double PI = 3.1415926535897932384;\n\nstatic inline double distancesq(double x1, double y1, double z1, double x2, double y2, double z2) {\n    double xx = x1-x2;\n    double yy = y1-y2;\n    double zz = z1-z2;\n    return (xx*xx + yy*yy + zz*zz);\n}\n\nclass MolecularDensityFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    const Molecule& molecule;\n\npublic:\n    MolecularDensityFunctor(const Molecule& molecule) \n        : molecule(molecule)\n    {}\n\n    double operator()(const coordT& x) const {\n        double sum = 0.0;\n        for (int i=0; i<molecule.natom(); i++) {\n            const Atom& atom = molecule.get_atom(i);\n            double rsq = distancesq(x[0],x[1],x[2],atom.x,atom.y,atom.z);\n            if (rsq < 144.0) {\n                double r = sqrt(rsq);\n                sum += exp(-2*r + 1e-6);\n            }\n        }\n        return sum;\n    }\n};\n\n\nvoid bigboy(World& world, const Molecule& molecule) {\n    // Solves Poisson's equation for a molecule-like charge density\n\n    START_TIMER;\n    functionT rho = factoryT(world).functor(functorT(new MolecularDensityFunctor(molecule)));\n    END_TIMER(\"project density\");\n    START_TIMER;\n    LoadBalImpl<3> lb(rho);\n    world.gop.fence();\n    FunctionDefaults<3>::pmap = lb.load_balance();\n    rho = copy(rho, FunctionDefaults<3>::pmap);\n    END_TIMER(\"load balancing\");\n    START_TIMER;\n    double rho_norm = rho.norm2();\n    END_TIMER(\"density norm\");\n\n    if (world.rank() == 0) print(\"rho norm\", rho_norm);\n\n    SeparatedConvolution<double,3> op = CoulombOperator<double>(world, \n                                                                  FunctionDefaults<3>::k, \n                                                                  1e-3, \n                                                                  FunctionDefaults<3>::thresh);\n    if (world.rank() == 0) {\n        world.am.print_stats();\n        world.taskq.print_stats();\n    }\n\n    START_TIMER;\n    functionT V = apply(op,rho);\n    END_TIMER(\"Coulomb operator\");\n\n    if (world.rank() == 0) {\n        world.am.print_stats();\n        world.taskq.print_stats();\n    }\n\n    world.gop.fence();\n}\n\nint main(int argc, char** argv) {\n    initialize(argc,argv);\n    World world(MPI::COMM_WORLD);\n    \n    try {\n        // Load info for MADNESS numerical routines\n        startup(world,argc,argv);\n        \n        // Process 0 reads the molecule information and\n        // broadcasts to everyone else\n        Molecule molecule;\n        if (world.rank() == 0) molecule.read_file(\"bigboy.input\");\n        world.gop.broadcast_serializable(molecule, 0);\n        \n        // Use a cell big enough to have exp(-sqrt(2*I)*r) decay to\n        // 1e-6 with I=1ev=0.037Eh --> need 50 a.u. either side of the molecule\n        double L = molecule.bounding_cube();\n        L += 50.0;\n        for (int i=0; i<3; i++) {\n            FunctionDefaults<3>::cell(i,0) = -L;\n            FunctionDefaults<3>::cell(i,1) =  L;\n        }\n        \n        // Setup initial defaults for numerical functions\n        FunctionDefaults<3>::k = 8;\n        FunctionDefaults<3>::thresh = 1e-6;\n        FunctionDefaults<3>::refine = true;\n        FunctionDefaults<3>::initial_level = 2;\n        FunctionDefaults<3>::truncate_mode = 1;  \n        \n        // Warm and fuzzy for the user\n        if (world.rank() == 0) {\n            print(\"\\n\\n\");\n            print(\" MADNESS example Hartree-Fock program\");\n            print(\" ------------------------------------\\n\");\n            molecule.print();\n            print(\"\\n\");\n            print(\"            box size \", L);\n            print(\" number of processes \", world.size());\n            //if (nelec&1) throw \"Closed shell only --- number of electrons is odd\";\n        }\n        \n        bigboy(world, molecule);\n\n        world.gop.fence();\n\n    } catch (const MPI::Exception& e) {\n        //        print(e);\n        error(\"caught an MPI exception\");\n    } catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    } catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    } catch (const char* s) {\n        print(s);\n        error(\"caught a string exception\");\n    } catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    } catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    } catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    finalize();\n    \n    return 0;\n}\n\n=====================================\n=== bigboy2.cc -=====\n\n/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n#include <madness/mra/lbdeux.h>\n\nusing namespace madness;\nusing namespace std;\n\nconst double PI = 3.1415926535897932384;\n\n\n\ntemplate <typename T, int NDIM>\nstruct lbcost {\n    double leaf_value;\n    double parent_value;\n    lbcost(double leaf_value=1.0, double parent_value=0.0) : leaf_value(leaf_value), parent_value(parent_value) {}\n    double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n        if (node.is_leaf()) {\n            return leaf_value;\n        }\n        else {\n            return parent_value;\n        }\n    }\n};\n\n/// Makes a square-normalized Gaussian with random origin and exponent\n\ntemplate <typename T>\nT complexify(T c) {return c;}\n\ntemplate <> double_complex complexify<double_complex>(double_complex c) {\n    return c*double_complex(0.5,-sqrt(3.0)*0.5);\n}\n\ntemplate <> float_complex complexify<float_complex>(float_complex c) {\n    return c*float_complex(0.5,-sqrt(3.0)*0.5);\n}\n\n\ntemplate <typename T, int NDIM>\nclass Gaussian : public FunctionFunctorInterface<T,NDIM> {\npublic:\n    typedef Vector<double,NDIM> coordT;\n    const coordT center;\n    const double exponent;\n    const T coefficient;\n    \n    Gaussian(const coordT& center, double exponent, T coefficient) \n        : center(center), exponent(exponent), coefficient(complexify(coefficient)) {};\n\n    T operator()(const coordT& x) const {\n        double sum = 0.0;\n        for (int i=0; i<NDIM; i++) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        return coefficient*exp(-exponent*sum);\n    };\n};\n\n/// Makes a square-normalized Gaussian with random origin and exponent\ntemplate <typename T, int NDIM>\nGaussian<T,NDIM>*\nRandomGaussian(const Tensor<double> cell, double expntmax=1e5) {\n    typedef Vector<double,NDIM> coordT;\n    coordT origin;\n    for (int i=0; i<NDIM; i++) {\n        origin[i] = RandomValue<double>()*(cell(i,1)-cell(i,0)) + cell(i,0);\n    }\n//     double lo = log(0.1);\n//     double hi = log(expntmax);\n//     double expnt = exp(RandomValue<double>()*(hi-lo) + lo);\n    double expnt = 30.0;\n    T coeff = pow(2.0*expnt/PI,0.25*NDIM);            \n    return new Gaussian<T,NDIM>(origin,expnt,coeff);\n}\n\ndouble ttt, sss;\n#define START_TIMER world.gop.fence(); ttt=wall_time(); sss=cpu_time()\n#define END_TIMER(msg) ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt)\n        \n\ntypedef SharedPtr< FunctionFunctorInterface<double,3> > functorT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef Function<double,3> functionT;\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    try {\n        World world(MPI::COMM_WORLD);\n        \n        cout.precision(8);\n        startup(world,argc,argv);\n        \n        Tensor<double> cell(3,2);\n        for (int i=0; i<3; i++) {\n            cell(i,0) = -30;\n            cell(i,1) =  30;\n        }\n        FunctionDefaults<3>::set_cell(cell);\n        FunctionDefaults<3>::set_k(14);\n        FunctionDefaults<3>::set_thresh(1e-12);\n        FunctionDefaults<3>::set_refine(true);\n        FunctionDefaults<3>::set_autorefine(false);\n        FunctionDefaults<3>::set_initial_level(5);\n        FunctionDefaults<3>::set_apply_randomize(false);\n        FunctionDefaults<3>::set_project_randomize(true);\n\n        default_random_generator.setstate(314159);  // Ensure all processes have the same sequence (for exponents)\n    \n        int nfunc = 1000;\n        if (world.rank() == 0) print(\"FIRST WITHOUT LOAD BAL\", nfunc);\n        std::vector< Function<double,3> > v(nfunc);\n        world.gop.fence();\n        START_TIMER;\n        for (int i=0; i<nfunc; i++) {\n            v[i] = functionT(factoryT(world).functor(functorT(RandomGaussian<double,3>(cell,100.0))).fence(false));\n        }\n        world.gop.fence();\n        END_TIMER(\"project\");\n\n        world.gop.fence();\n        START_TIMER;\n        LoadBalanceDeux<3> lb(world);\n        for (int i=0; i<nfunc; i++) {\n            lb.add_tree(v[i], lbcost<double,3>(1.0,1.0), false);\n        }\n        world.gop.fence();\n        FunctionDefaults<3>::set_pmap(lb.load_balance(2.0));\n        world.gop.fence();\n        END_TIMER(\"load balance\");\n\n        default_random_generator.setstate(314159);  // Ensure all processes have the same sequence (for exponents)\n\n        if (world.rank() == 0) print(\"NOW WITH LOAD BAL\");\n        world.gop.fence();\n        START_TIMER;\n        for (int i=0; i<nfunc; i++) {\n            v[i] = functionT(factoryT(world).functor(functorT(RandomGaussian<double,3>(cell,1000.0))).fence(false));\n        }\n        world.gop.fence();\n        END_TIMER(\"project\");\n        \n        world.gop.fence();\n        START_TIMER;\n        compress(world, v);\n        END_TIMER(\"compress\");\n\n        world.gop.fence();\n        START_TIMER;\n        truncate(world, v);\n        END_TIMER(\"truncate\");\n\n        START_TIMER;\n        reconstruct(world,v);\n        END_TIMER(\"reconstruct\");\n\n        SeparatedConvolution<double,3> op = CoulombOperator<double>(world, \n                                                                    FunctionDefaults<3>::get_k(), \n                                                                    1e-3, \n                                                                    FunctionDefaults<3>::get_thresh());\n\n        world.gop.fence();\n        START_TIMER;\n        apply(world, op, v);\n        END_TIMER(\"apply-1\");\n\n        world.gop.fence();\n        START_TIMER;\n        apply(world, op, v);\n        END_TIMER(\"apply-2\");\n\n        world.gop.fence();\n        START_TIMER;\n        LoadBalanceDeux<3> lbX(world);\n        for (int i=0; i<nfunc; i++) {\n            lbX.add_tree(v[i], lbcost<double,3>(1.0,1.0), false);\n        }\n        world.gop.fence();\n        FunctionDefaults<3>::set_pmap(lbX.load_balance(2.0));\n        world.gop.fence();\n        for (int i=0; i<nfunc; i++) {\n            v[i] = copy(v[i], FunctionDefaults<3>::get_pmap(), false);\n        }\n        world.gop.fence();\n        END_TIMER(\"load balance truncated\");\n\n        START_TIMER;\n        reconstruct(world,v);\n        END_TIMER(\"reconstruct\");\n\n        world.gop.fence();\n        START_TIMER;\n        apply(world, op, v);\n        END_TIMER(\"apply-1\");\n\n        world.gop.fence();\n        START_TIMER;\n        apply(world, op, v);\n        END_TIMER(\"apply-2\");\n\n        world.gop.fence();\n        START_TIMER;\n        size_t ncoeff = 0;\n        for (int i=0; i<nfunc; i++) ncoeff += v[i].size();\n        END_TIMER(\"count coeff\");\n        if (world.rank() == 0) print(\"NCOEFF \", ncoeff);\n\n        ThreadPool::end();\n        print_stats(world);\n\n    } catch (const MPI::Exception& e) {\n        //        print(e);\n        error(\"caught an MPI exception\");\n    } catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    } catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    } catch (const char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    } catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    } catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    } catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    } catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    finalize();\n    return 0;\n}\n=====================\n=== bigboy.input ===\n\ngeometry\n  Cu  0.00000000000000   0.00000000000000   0.00000000000000\n  Cu  1.43432821090460  -1.43432821090460   1.43432821090460\n  Cu  2.86865642180919  -2.86865642180919   2.86865642180919\n  Cu  4.30298463271379  -4.30298463271379   4.30298463271379\n  Cu -1.43432821090460   1.43432821090460   1.43432821090460\n  Cu  0.00000000000000   0.00000000000000   2.86865642180919\n  Cu  1.43432821090460  -1.43432821090460   4.30298463271379\n  Cu  2.86865642180919  -2.86865642180919   5.73731284361838\n  Cu -2.86865642180919   2.86865642180919   2.86865642180919\n  Cu -1.43432821090460   1.43432821090460   4.30298463271379\n  Cu  0.00000000000000   0.00000000000000   5.73731284361838\n  Cu  1.43432821090460  -1.43432821090460   7.17164105452298\n  Cu -4.30298463271379   4.30298463271379   4.30298463271379\n  Cu -2.86865642180919   2.86865642180919   5.73731284361838\n  Cu -1.43432821090460   1.43432821090460   7.17164105452298\n  Cu  0.00000000000000   0.00000000000000   8.60596926542758\n  Cu  1.43432821090460   1.43432821090460  -1.43432821090460\n  Cu  2.86865642180919   0.00000000000000   0.00000000000000\n  Cu  4.30298463271379  -1.43432821090460   1.43432821090460\n  Cu  5.73731284361838  -2.86865642180919   2.86865642180919\n  Cu  0.00000000000000   2.86865642180919   0.00000000000000\n  Cu  1.43432821090460   1.43432821090460   1.43432821090460\n  Cu  2.86865642180919   0.00000000000000   2.86865642180919\n  Cu  4.30298463271379  -1.43432821090460   4.30298463271379\n  Cu -1.43432821090460   4.30298463271379   1.43432821090460\n  Cu  0.00000000000000   2.86865642180919   2.86865642180919\n  Cu  1.43432821090460   1.43432821090460   4.30298463271379\n  Cu  2.86865642180919   0.00000000000000   5.73731284361838\n  Cu -2.86865642180919   5.73731284361838   2.86865642180919\n  Cu -1.43432821090460   4.30298463271379   4.30298463271379\n  Cu  0.00000000000000   2.86865642180919   5.73731284361839\n  Cu  1.43432821090460   1.43432821090460   7.17164105452298\nend\n\ngeometry\n  Cu  0.00000000000000   0.00000000000000   0.00000000000000\n  Cu  1.43432821090460  -1.43432821090460   1.43432821090460\n  Cu  2.86865642180919  -2.86865642180919   2.86865642180919\n  Cu  4.30298463271379  -4.30298463271379   4.30298463271379\n  Cu -1.43432821090460   1.43432821090460   1.43432821090460\n  Cu  0.00000000000000   0.00000000000000   2.86865642180919\n  Cu  1.43432821090460  -1.43432821090460   4.30298463271379\n  Cu  2.86865642180919  -2.86865642180919   5.73731284361838\n  Cu -2.86865642180919   2.86865642180919   2.86865642180919\n  Cu -1.43432821090460   1.43432821090460   4.30298463271379\n  Cu  0.00000000000000   0.00000000000000   5.73731284361838\n  Cu  1.43432821090460  -1.43432821090460   7.17164105452298\n  Cu -4.30298463271379   4.30298463271379   4.30298463271379\n  Cu -2.86865642180919   2.86865642180919   5.73731284361838\n  Cu -1.43432821090460   1.43432821090460   7.17164105452298\n  Cu  0.00000000000000   0.00000000000000   8.60596926542758\n  Cu  1.43432821090460   1.43432821090460  -1.43432821090460\n  Cu  2.86865642180919   0.00000000000000   0.00000000000000\n  Cu  4.30298463271379  -1.43432821090460   1.43432821090460\n  Cu  5.73731284361838  -2.86865642180919   2.86865642180919\n  Cu  0.00000000000000   2.86865642180919   0.00000000000000\n  Cu  1.43432821090460   1.43432821090460   1.43432821090460\n  Cu  2.86865642180919   0.00000000000000   2.86865642180919\n  Cu  4.30298463271379  -1.43432821090460   4.30298463271379\n  Cu -1.43432821090460   4.30298463271379   1.43432821090460\n  Cu  0.00000000000000   2.86865642180919   2.86865642180919\n  Cu  1.43432821090460   1.43432821090460   4.30298463271379\n  Cu  2.86865642180919   0.00000000000000   5.73731284361838\n  Cu -2.86865642180919   5.73731284361838   2.86865642180919\n  Cu -1.43432821090460   4.30298463271379   4.30298463271379\n  Cu  0.00000000000000   2.86865642180919   5.73731284361839\n  Cu  1.43432821090460   1.43432821090460   7.17164105452298\n  Cu  2.86865642180919   2.86865642180919  -2.86865642180919\n  Cu  4.30298463271379   1.43432821090460  -1.43432821090460\n  Cu  5.73731284361838   0.00000000000000   0.00000000000000\n  Cu  7.17164105452298  -1.43432821090460   1.43432821090460\n  Cu  1.43432821090460   4.30298463271379  -1.43432821090460\n  Cu  2.86865642180919   2.86865642180919   0.00000000000000\n  Cu  4.30298463271379   1.43432821090460   1.43432821090460\n  Cu  5.73731284361838   0.00000000000000   2.86865642180919\n  Cu  0.00000000000000   5.73731284361838   0.00000000000000\n  Cu  1.43432821090460   4.30298463271379   1.43432821090460\n  Cu  2.86865642180919   2.86865642180919   2.86865642180919\n  Cu  4.30298463271379   1.43432821090460   4.30298463271379\n  Cu -1.43432821090460   7.17164105452298   1.43432821090460\n  Cu  0.00000000000000   5.73731284361839   2.86865642180919\n  Cu  1.43432821090460   4.30298463271379   4.30298463271379\n  Cu  2.86865642180919   2.86865642180919   5.73731284361839\n  Cu  4.30298463271379   4.30298463271379  -4.30298463271379\n  Cu  5.73731284361838   2.86865642180919  -2.86865642180919\n  Cu  7.17164105452298   1.43432821090460  -1.43432821090460\n  Cu  8.60596926542758   0.00000000000000   0.00000000000000\n  Cu  2.86865642180919   5.73731284361838  -2.86865642180919\n  Cu  4.30298463271379   4.30298463271379  -1.43432821090460\n  Cu  5.73731284361839   2.86865642180919   0.00000000000000\n  Cu  7.17164105452298   1.43432821090460   1.43432821090460\n  Cu  1.43432821090460   7.17164105452298  -1.43432821090460\n  Cu  2.86865642180919   5.73731284361839   0.00000000000000\n  Cu  4.30298463271379   4.30298463271379   1.43432821090460\n  Cu  5.73731284361839   2.86865642180919   2.86865642180919\n  Cu  0.00000000000000   8.60596926542758   0.00000000000000\n  Cu  1.43432821090460   7.17164105452298   1.43432821090460\n  Cu  2.86865642180919   5.73731284361839   2.86865642180919\n  Cu  4.30298463271379   4.30298463271379   4.30298463271379\nend\n\ngeometry\n  H 0 0 0\n  H 1 0 0\n  H 0 1 0\n  H 0 0 1\nend\n=============\n========= fast.cc ===========\n/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n#include <madness/mra/lbdeux.h>\n\nusing namespace madness;\nusing namespace std;\n\nVoid doit(int niter) {\n    Tensor<double> c(20,20,20), d(20,20,20), e(20,20,20);\n    Tensor<double> a(20,20);\n    for (int i=0; i<niter; i++) {\n        fast_transform(c,a,d,e);\n    }\n    return None;\n}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    try {\n        World world(MPI::COMM_WORLD);\n        cout.precision(8);\n\n        int niter = 100000;\n\n        world.gop.fence();\n        double start = wall_time();\n        if (world.rank() == 0) print(\"starting at\", start);\n        world.gop.fence();\n        for (unsigned int i=0; i<=ThreadPool::size(); i++) world.taskq.add(doit, niter); // Note +1\n        world.taskq.fence();\n        world.gop.fence();\n        double end = wall_time();\n        if (world.rank() == 0) print(\"starting at\", end);\n        world.gop.fence();\n\n        ThreadPool::end();\n        print_stats(world);\n\n        if (world.rank() == 0) {\n            double nflop = (ThreadPool::size()+1.0)*20.0*20.0*20.0*20.0*2.0*3.0*niter;\n            print(\"\");\n            print(\"NFLOPS \", nflop);\n            print(\"  USED \", end-start);\n            print(\"  RATE \", nflop/(end-start));\n            print(\"\");\n        }\n    } catch (const MPI::Exception& e) {\n        //        print(e);\n        error(\"caught an MPI exception\");\n    } catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    } catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    } catch (const char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    } catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    } catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    } catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    } catch (...) {\n        error(\"caught unhandled exception\");\n    }\n    \n    finalize();\n    return 0;\n}\n ==========================\n"
  },
  {
    "path": "src/examples/gygi_soltion.cc",
    "content": "/*\n\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n$Id$\n*/\n\n/*!\n  \\file examples/gygi_slution.cc\n  \\brief compute the dielectric cavity and the electrostatic potential of hydrogen atom in water\n  \\defgroup examplegygi compute the dielectric cavity and the electrostatic potential of hydrogen atom in water\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/gygi_slution.cc>here</a>.\n\n  \\par Points of interest\n  - compute the dielectric functional (of density)\n  - compute the electrostatic potential by convolving the free space Green's function with the effective charge and the induced surface charge\n  - compute the derivatives of the dielectric functional and the electrosstatic potential with respect to the density\n  \\par Background\n  - This program is an implementation of the solvation model in THE JOURNAL OF CHEMICAL PHYSICS 124, 074103 (2006)\n  - The DFT equation is not solved\n  - The test system isa hydrogen atom (1s orbital)\n*/\n //We will test this for a hydrogen atom\n#include <madness/mra/mra.h>\n#include <madness/constants.h>\n#include <ctime>\n#include <madness/tensor/solvers.h>\n#include <madness/mra/funcplot.h>\n#include <madness/mra/nonlinsol.h>\nusing namespace madness;\ntypedef real_function_3d realfunc;\n//define parameter\nconst double epsilon = 78.304;\nconst double beta = 1.300;\nconst double rho_0 = 0.0004;\nconst double Gamma = 0.07197;\nconst int k= 8;\nconst double L = 10;\nconst double thresh = 1e-6;\nconst int maxiter = 20;\n//Macro for timing\ndouble XXstart;\n#define TIME(MSG,X) XXstart=wall_time();          \\\n                    X; \\\n\t\t    if (world.rank() == 0)print(\"timer: \", MSG,\"used\",wall_time() - XXstart) \\\n\n//nucleu charge density\ndouble nuc_func(const coord_3d& r) {\n  const double expnt = 100.0;\n  const double coeff = -1.0*pow(1.0/constants::pi*expnt,0.5*3);\n  return coeff*exp(-expnt*(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]));\n}\n//define the electronic density function of a hydrogen atom\ndouble rho_func(const coord_3d& r){\n  double R = sqrt(r[0]*r[0] +r[1]*r[1] + r[2]*r[2]);\n  double coef = -1.0/constants::pi;\n  return coef*exp(-2.0*R);\n}\n//define a class for the Gygi potential and the surface cavity\nclass GygiPot {\nprivate:\n  const realfunc& rho;    //density for the poisson's equation\n  const realfunc& rhot;    //density for the dielectric functional\n  const double& rho_0;  // the density at the solut-solvent interface\n  const double& epsilon; //assyptotic value of the dielectric functional\n  const int& maxiter;  // maximum iterations in the solver\n  World& world;\n  const double& Gamma;   //the surface tention of the solvent\n  static const double cutrho = 1e-8;  //cutoff value of the density\n  //utility function\n\n  //unary operator to determine the reciprocal of a madness function\n  template<typename T,int DIM>\n  struct Reciprocal {\n    void operator()(const Key<DIM>& key, Tensor<T>& t) const {\n      UNARY_OPTIMIZED_ITERATOR(T, t,*_p0=1.0/(*_p0));\n    }\n    template <typename Archive>void serialize(Archive& ar) {}\n  };\n  //unary operator to raise electronic density to the power 2beta\n  template<typename T,int DIM>\n  struct Pow {\n    void operator()(const Key<DIM>& key,Tensor<T>& t) const {\n      UNARY_OPTIMIZED_ITERATOR(T,t,\n\t\t\t       if(*_p0 <cutrho)\n\t\t\t       \t *_p0 = 0.0;\n\t\t\t       else\n\t\t\t\t *_p0 = pow(*_p0,2*beta);\n\t\t\t       );\n    }\n    template <typename Archive>void serialize(Archive& ar) {}\n  };\n  //unary operator to raise electronic density to the power 2beta - 1\n  template<typename T,int DIM>\n  struct Pow_beta_one {\n    void operator()(const Key<DIM>& key,Tensor<T>& t) const {\n      UNARY_OPTIMIZED_ITERATOR(T,t,\n\t\t\t       if (*_p0 < cutrho)\n\t\t\t       \t *_p0 = 0.0;\n\t\t\t       else\n\t\t\t\t *_p0 = pow(*_p0,2*beta-1);\n\t\t\t       );\n    }\n    template <typename Archive>void serialize(Archive& ar) {}\n  };\n  //density ratio raised to the power 2beta\n  realfunc ratio_rho()const {\n    double rerho_0 =-1.0/rho_0;\n    realfunc rr = rerho_0*rhot;\n    rr.unaryop(Pow<double,3>());\n    return rr;\n  }\n  //density ratio raised to the power 2*beta -1\n  realfunc rho_beta_one() const {\n    double rerho_0 =-1.0/rho_0 ;\n    realfunc rr = rerho_0*rhot;\n    rr.unaryop(Pow_beta_one<double,3>());\n    return rr;\n  }\n  //reciprocal of 1 + ratio_rho()\n  realfunc re_one_plus_ratio_rho() const{\n    realfunc value = 1.0 + ratio_rho();\n    value.unaryop(Reciprocal<double,3>());\n    return value;\n  }\n  //gradient of density\n  realfunc grad_rho(const realfunc& dens) const {\n    real_derivative_3d Dx = free_space_derivative<double,3>(dens.world(), 0);\n    real_derivative_3d Dy = free_space_derivative<double,3>(dens.world(), 1);\n    real_derivative_3d Dz = free_space_derivative<double,3>(dens.world(), 2);\n    return (Dx(dens) + Dy(dens) + Dz(dens));\n  }\n  //reciprocal of gradient of density\n  realfunc re_grad_rho(const realfunc& dens) const{\n    realfunc value = grad_rho(dens);\n    value.unaryop(Reciprocal<double,3>());\n    return value;\n  }\npublic:\n  //define methods of the class\n  //define the dielectric functional\n  realfunc epsilon_rho()const {\n    return 1.0 + ((epsilon - 1.0)/2.0)*(1.0 +((1.0 -ratio_rho())*re_one_plus_ratio_rho()));\n    // return ratio_rho();\n  }\n  //reciprocal of the dielectric functional\n  realfunc re_epsilon_rho() const{\n    realfunc value = epsilon_rho();\n    value.unaryop(Reciprocal<double,3>());\n    return value;\n  }\n  //derivative of the dielectric functional\n  realfunc depsilon_drho() const {\n    //this is the derivative w.r.t to rho\n    double fac = (1.0 - epsilon)/rho_0;\n    realfunc nume =2.0*beta*rho_beta_one();\n    realfunc denom = re_one_plus_ratio_rho()*re_one_plus_ratio_rho();\n    return fac*nume*denom;\n    // return rho_beta_one();\n  }\n  //derivative of the dielectric functional\n  double cavitation_energy() const {\n    double fac =1.0/rho_0;\n    double quantum_surface = 0.5*fac*beta*grad_rho(rho).norm2();\n    double convfact = 6.423049507e-4; // 1N/m = 6.423049507e-4a.u\n    return convfact*Gamma*quantum_surface;\n  }\n  //cavitation potential to be included in the KS equation\n  realfunc dfree_drho() const {\n    double fac = beta/(4.0*rho_0);\n    real_derivative_3d Dx = free_space_derivative<double,3>(rhot.world(), 0);\n    real_derivative_3d Dy = free_space_derivative<double,3>(rhot.world(), 1);\n    real_derivative_3d Dz = free_space_derivative<double,3>(rhot.world(), 2);\n    realfunc gradsq = Dx(rho)*Dx(rho) + Dy(rho)*Dy(rho) + Dz(rho)*Dz(rho);\n    realfunc nume = fac*grad_rho(gradsq);\n    realfunc denom =(1.0/grad_rho(rho).norm2())*re_grad_rho(rho);\n    double convfact = 6.423049507e-4; // 1N/m = 6.423049507e-4a.u\n    return nume*denom*convfact*Gamma;\n  }\n  /*defining the quantum surface with a Gaussian\n  double expnt_surface() const{\n    real_derivative_3d Dx = free_space_derivative<double,3>(rhot.world(), 0);\n    real_derivative_3d Dy = free_space_derivative<double,3>(rhot.world(), 1);\n    real_derivative_3d Dz = free_space_derivative<double,3>(rhot.world(), 2);\n    realfunc grad_rho = Dx(rho) + Dy(rho) + Dz(rho);\n    double fac = 3.0/(rho_0*sqrt(constants::pi));\n    return fac*grad_rho.norm2();\n  }\n  */\n//Define the guess potential for the Poisson's equation\n  realfunc GuessPotential(World& world) const {\n    double tol = madness::FunctionDefaults<3>::get_thresh();\n    real_convolution_3d op = madness::CoulombOperator(world, tol*10.0, tol*0.1);\n    //return op(rho);\n    return op(re_epsilon_rho()*rho);   //U_0\n}\n//Molecular potential i.e potential due to the molecular charge distribution\n  realfunc MolecularPotential()const {\n    return (re_epsilon_rho()*rho);\n  }\n  //compute the gradient of epsilon[rho]\n  realfunc depsilon_dr() const {\n    return depsilon_drho()*grad_rho(rhot);\n  }\n  //compute the surface charge\n  realfunc make_surfcharge(const realfunc& u) const {\n    realfunc gradU = grad_rho(u);\n    //  realfunc eprho = epsilon_rho();\n    const double rfourpi = 1.0/(4.0*constants::pi);\n    return (rfourpi*re_epsilon_rho()*depsilon_dr()*gradU).truncate();\n  }\n\n  //Define the electrostatic potential\n  realfunc ESP(World& world)const {\n    const bool USE_SOLVER = true;\n    double tol = std::max(1e-3,FunctionDefaults<3>::get_thresh());\n    real_convolution_3d op = madness::CoulombOperator(world, tol*10.0, tol*0.1);\n    realfunc U = GuessPotential(world);\n    double unorm = U.norm2();\n    print(\"U.norm2: \", unorm);\n    if (USE_SOLVER) {\n      madness::NonlinearSolver solver;\n      // This section employs a non-linear equation solver from solvers.h\n      //  http://onlinelibrary.wiley.com/doi/10.1002/jcc.10108/abstract\n      if (world.rank() == 0){\n        print(\"\\n\\n\");//for formating output\n\tmadness::print(\"    Computing the Electrostatic Potential   \");\n\tmadness::print(\"           ______________________           \\n \");\n\n\tmadness::print(\"iteration          residue norm2                soln(10.0)            used \\n\");\n      }\n      realfunc uvec, rvec;\n      for (int iter=0; iter<maxiter; iter++) {\n\tdouble start = wall_time();\n        uvec = U;\n        realfunc W = MolecularPotential();\n        realfunc Scharge = make_surfcharge(U);\n        rvec = U + op(W + Scharge);\n        realfunc U_new = solver.update(uvec,rvec);\n        double err = rvec.norm2();\n        if (world.rank()==0)\n\t  madness::print(\"  \", iter,\"             \" , err,\"           \",U(coord_3d(10.0)),\"   \", wall_time()-start );\n        if (err >0.3*unorm){ U = 0.5*U + 0.5*U_new;\n        }\n        else\n\t  U = U_new;\n        if(err < 10.0*tol) break;\n      }\n    }\n    return U ;\n  }\n  //Define the dielectric potential\n  realfunc V_epsilon(const realfunc& u) const {\n    realfunc grad_ESP = grad_rho(u);\n    double coef = -1.0/(8.0*constants::pi);\n    return coef*grad_ESP*grad_ESP*depsilon_drho();\n  }\n  //Defining the gradient of the ESP w.r.t rho\n  realfunc dESP_drho(const realfunc u) const {\n    return u +V_epsilon(u);\n  }\n  //Defining the Constructor\n  GygiPot(const realfunc& rho,\n\t  const realfunc& rhot,\n\t  const double& rho_0,\n\t  const double& epsilon,\n\t  const int& maxiter,\n\t  World& world,\n\t  const double Gamma)\n    :rho(rho),\n    rhot(rhot),\n    rho_0(rho_0),\n    epsilon(epsilon),\n    maxiter(maxiter),\n    world(world),\n    Gamma(Gamma){}\n  };\nint main(int argc, char **argv){\n  initialize(argc,argv);\n  World world(SafeMPI::COMM_WORLD);\n  startup(world,argc,argv);\n  //Function default\n  FunctionDefaults<3>::set_k(k);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_cubic_cell(-L, L);\n  FunctionDefaults<3>::set_initial_level(4);\n  FunctionDefaults<3>::set_truncate_on_project(false);\n  FunctionDefaults<3>::set_bc(BC_FREE);\n\n  //Print parameters\n  print(\"k            \",k);\n  print(\"thresh       \",thresh);\n  print(\"rho_0        \", rho_0);\n  print(\"beta         \",beta);\n  print(\"epsilon      \",epsilon);\n  print(\"maxiter      \",maxiter);\n  print(\"L            \",L);\n  TIME(\"make eletronic density:  \",const realfunc rho = real_factory_3d(world).f(rho_func));\n  TIME(\"make nuclear density:  \",const realfunc rhon = real_factory_3d(world).f(nuc_func));\n  print(\"total charge: \", rho.trace());\n  print(\"total charge: \", rhon.trace());\n  //total charge\n  const realfunc rhot = rho + rhon;\n  //Make a GygiPot object\n  GygiPot gygi(rho,rhot,rho_0,epsilon,maxiter,world,Gamma);\n  TIME(\"make ESP:                         \", realfunc U = gygi.ESP(world));\n  //derivative of dielectric function w.r.t rho\n  TIME(\"make depsilon_drho:               \", realfunc depdrho = gygi.depsilon_drho());\n  //total charge\n  TIME(\"make epsilon[rho]:                \",realfunc eprho = gygi.epsilon_rho());\n  TIME(\"make reciprocal of dielectric:    \",realfunc reprho = gygi.re_epsilon_rho());\n  TIME(\"make charge:                      \",realfunc charge = gygi.make_surfcharge(U));\n  TIME(\"make V_epsilon:                   \",realfunc Ve = gygi.V_epsilon(U));\n  TIME(\"make dESP_drho:                   \",realfunc desp_drho = gygi.dESP_drho(U));\n  TIME(\"make cavitation energy:           \",double cavE = gygi.cavitation_energy());\n  //TIME(\"make exponent surface:            \",double expsurf = gygi.expnt_surface());\n  TIME(\"make deriv of free energy:        \",realfunc dfree = gygi.dfree_drho());\n  //make the dielectric functional\n  print(\"plotting \");\n  coord_3d lo(0.0), hi(0.0); // Range for line plotting\n  lo[0] =-10.0;\n  hi[0] = 10.0;\n  plot_line(\"ESP.dat\", 401, lo, hi, U);\n  plot_line(\"dielec_cavity.dat\", 401, lo, hi, eprho);\n  plot_line(\"surfcharge.dat\", 401, lo, hi, charge);\n  plot_line(\"Ueps.dat\", 401, lo,hi, Ve );\n  plot_line(\"rhot.dat\", 401, lo, hi,rhot );\n  plot_line(\"desp_drho.dat\", 401, lo, hi, desp_drho );\n  plot_line(\"dfree_drho.dat\", 401, lo, hi, dfree );\n  plotdx(eprho,\"dielec_cavity.dx\");\n  print(\"\\ncompute quantum surface \\n\");\n  print(\" dfree_drho  \",dfree.norm2());\n  print(\"cav energy:   \",cavE);\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/h2.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file h2.cc\n  \\brief Solves the Hartree-Fock equations for the hydrogen molecule\n  \\defgroup examplesh2hf Hartree-Fock equations for the hydrogen molecule\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/h2.cc>h2.cc</a>.\n\n  The Hartree-Fock wave function is computed for the hydrogen molecule\n  in three dimensions without using symmetry.\n\n  Since all of the details except for the nuclear potential are the\n  same, please refer to the \\ref examplehehf helium atom HF example.\n\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\nusing namespace madness;\n\nstatic const double R = 1.4;    // bond length\nstatic const double L = 64.0*R; // box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-6; // precision\n\nstatic double guess(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return (exp(-sqrt(x*x+y*y+(z-R/2)*(z-R/2)+1e-8))+\n            exp(-sqrt(x*x+y*y+(z+R/2)*(z+R/2)+1e-8)));\n}\n\nstatic double V(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return -1.0/sqrt(x*x+y*y+(z-R/2)*(z-R/2)+1e-8)+\n           -1.0/sqrt(x*x+y*y+(z+R/2)*(z+R/2)+1e-8);\n}\n\nvoid iterate(World& world, real_function_3d& V, real_function_3d& psi, double& eps) {\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n    real_function_3d Vpsi = (V*psi);\n    Vpsi.scale(-2.0).truncate();\n    real_function_3d tmp = op(Vpsi).truncate();\n    double norm = tmp.norm2();\n    real_function_3d r = tmp-psi;\n    double rnorm = r.norm2();\n    double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n    if (world.rank() == 0) {\n        print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n    }\n    psi = tmp.scale(1.0/norm);\n    eps = eps_new;\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_initial_level(5);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_cubic_cell(-L/2, L/2);\n    // for (int i=0; i<3; i++) {\n    // FunctionDefaults<3>::cell(i,0) = -L/2;\n    // FunctionDefaults<3>::cell(i,1) =  L/2;\n    // }\n\n    real_function_3d Vnuc = real_factory_3d(world).f(V);\n    real_function_3d psi  = real_factory_3d(world).f(guess);\n    psi.truncate();\n    psi.scale(1.0/psi.norm2());\n\n    real_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n\n    double eps = -0.6;\n    for (int iter=0; iter<10; iter++) {\n        real_function_3d rho = square(psi).truncate();\n        real_function_3d potential = Vnuc + op(rho).truncate();\n        iterate(world, potential, psi, eps);\n    }\n\n    double kinetic_energy = 0.0;\n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n        real_function_3d dpsi = D(psi);\n        kinetic_energy += inner(dpsi,dpsi);\n    }\n\n    real_function_3d rho = square(psi);\n    double two_electron_energy = inner(op(rho),rho);\n    double nuclear_attraction_energy = 2.0*inner(Vnuc,rho);\n    double nuclear_repulsion_energy = 1.0/R;\n    double total_energy = kinetic_energy + two_electron_energy +\n        nuclear_attraction_energy + nuclear_repulsion_energy;\n    double virial = (nuclear_attraction_energy + two_electron_energy + nuclear_repulsion_energy) / kinetic_energy;\n\n    if (world.rank() == 0) {\n        print(\"            Kinetic energy \", kinetic_energy);\n        print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n        print(\"       Two-electron energy \", two_electron_energy);\n        print(\" Nuclear  repulsion energy \", nuclear_repulsion_energy);\n        print(\"              Total energy \", total_energy);\n        print(\"                    Virial \", virial);\n    }\n\n    world.gop.fence();\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/h2dft.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/nonlinsol.h>\n\n\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\n#include <madness/mra/lbdeux.h>\n#include <madness/mra/qmprop.h>\n\n#include <madness/misc/misc.h>\n#include <madness/misc/ran.h>\n\n#include <madness/tensor/systolic.h>\n#include <madness/tensor/solvers.h>\n#include <madness/tensor/elem.h>\n\n\n#include<madness/chem/xcfunctional.h>\n#include<madness/chem/SCFOperators.h>\n\n\nusing namespace madness;\n\n\ntypedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmapT;\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef std::vector<functionT> vecfuncT;\ntypedef std::pair<vecfuncT,vecfuncT> pairvecfuncT;\ntypedef std::vector<pairvecfuncT> subspaceT;\ntypedef Tensor<double> tensorT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef std::shared_ptr<operatorT> poperatorT;\ntypedef Function<std::complex<double>,3> complex_functionT;\ntypedef std::vector<complex_functionT> cvecfuncT;\ntypedef Convolution1D<double_complex> complex_operatorT;\n\n\nstatic const double R = 1.4;    // bond length\nstatic const double L = 64.0*R; // box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-5; // precision\n\n//XCfunctional xc;\nstd::vector< std::shared_ptr<real_derivative_3d> > gradop;\n\n//functionT make_dft_potential(World & world, XCfunctional& xc, const vecfuncT& vf,\n//        int ispin, XCfunctional::xc_contribution what)\n//{\n//\treturn multiop_values<double, xc_potential, 3>(xc_potential(xc, ispin, what), vf);\n//}\n//\n//double make_dft_energy(World & world, XCfunctional& xc, const vecfuncT& vf, int ispin)\n//{\n//\tfunctionT vlda = multiop_values<double, xc_functional, 3>(xc_functional(xc), vf);\n//\treturn vlda.trace();\n//}\n\nstatic double guess(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return (exp(-sqrt(x*x+y*y+(z-R/2)*(z-R/2)+1e-8))+\n            exp(-sqrt(x*x+y*y+(z+R/2)*(z+R/2)+1e-8)));\n}\n\nstatic double V(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return -1.0/sqrt(x*x+y*y+(z-R/2)*(z-R/2)+1e-8)+\n           -1.0/sqrt(x*x+y*y+(z+R/2)*(z+R/2)+1e-8);\n}\n\n//template <class solverT>\ndouble iterate_ground(World& world, NonlinearSolver& solver,\n\t\treal_function_3d& V, real_function_3d& psi,\n\t\tdouble& eps) {\n\treal_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n\treal_function_3d Vpsi = (V*psi);\n\tVpsi.scale(-2.0).truncate();\n\treal_function_3d tmp = op(Vpsi).truncate();\n\tdouble norm = tmp.norm2();\n\treal_function_3d r = tmp-psi;\n\tdouble rnorm = r.norm2();\n\tdouble eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n\tif (world.rank() == 0) {\n\t\tprint(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n\t}\n\tpsi = solver.update(psi, r);\n\tpsi.scale(1.0/psi.norm2());\n\teps = eps_new;\n\treturn rnorm;\n}\n\nint main(int argc, char** argv) {\n\tinitialize(argc, argv);\n\tWorld world(SafeMPI::COMM_WORLD);\n\n\tstartup(world,argc,argv);\n\tstd::cout.precision(6);\n\n\tFunctionDefaults<3>::set_k(k);\n\tFunctionDefaults<3>::set_thresh(thresh);\n\tFunctionDefaults<3>::set_refine(true);\n\tFunctionDefaults<3>::set_initial_level(5);\n\tFunctionDefaults<3>::set_truncate_mode(1);\n\tFunctionDefaults<3>::set_cubic_cell(-L/2, L/2);\n\n\tif (world.rank() == 0) print(\"\\n  Solving for the KS aux. wave function\\n\");\n\tfunctionT Vnuc = real_factory_3d(world).f(V);\n\tfunctionT psi  = real_factory_3d(world).f(guess);\n\tpsi.truncate();\n\tpsi.scale(1.0/psi.norm2());\n\n\tstd::string xc_data;\n\txc_data=\"lda\";\n\t//xc_data=\"GGA_X_PBE 1.\";\n\t//xc_data=\"GGA_C_PBE 1.\";\n\t//xc_data=\"GGA_X_B88 1.\";\n//\tXCfunctional xc;\n//\txc.initialize(xc_data, false, world);\n\n\tpoperatorT coulop;\n\tcoulop = poperatorT(CoulombOperatorPtr(world, 1e-10, thresh));\n\tgradop = gradient_operator<double,3>(world);\n\treal_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n\n\tdouble eps = -0.5;\n\t{\n\t    NonlinearSolver solver;\n\t    for (int iter=0; iter<20; iter++) {\n\t        functionT rho = square(psi).truncate();\n\n\t        rho.reconstruct();\n//\t        vecfuncT delrho;\n//\t        vecfuncT vf(XCfunctional::number_xc_args);\n//\n//\t        vf[XCfunctional::enum_rhoa]=rho;\n//\t        // ADD SIGMA\n//\t        if (xc.is_gga()) {\n//\t            for(int axis = 0;axis < 3;++axis){\n//\t                Derivative<double,3> D = free_space_derivative<double,3>(world, axis);\n//\t                delrho.push_back(D(rho));\n//\t            }\n//\t            functionT saa = delrho[0]*delrho[0]+delrho[1]*delrho[1]+delrho[2]*delrho[2];\n//\t            vf[XCfunctional::enum_saa]=(saa); // sigma_aa\n//\t            if (vf.size()) {\n//\t                reconstruct(world, vf);\n//\t                refine_to_common_level(world,vf); // Ugly but temporary (I hope!)\n//\t            }\n//\t        }\n//\t        //double exc = make_dft_energy(world,xc, vf, 0);\n//\t        //print(\"exc=\",exc );\n//\n//\t        real_function_3d vxc =  make_dft_potential(world,xc, vf, 0, XCfunctional::potential_rho);\n//\n//\t        if (xc.is_gga()) {\n//\t            functionT vsigaa = make_dft_potential(world,xc, vf, 0, XCfunctional::potential_same_spin).truncate();\n//\n//\t            for (int axis=0; axis<1; axis++) {\n//\t                Derivative<double,3> D = free_space_derivative<double,3>(world, axis);\n//\t                real_function_3d  gradn = D(rho);\n//\t                real_function_3d  ddel = vsigaa*gradn;\n//\t                ddel.scale(2.0);\n//\n//\t                real_function_3d vxc2=D(ddel).truncate();\n//\t                vxc = vxc - vxc2;\n//\t            }\n//\t        }\n\t        XCOperator<double,3> xc(world,xc_data,false,rho,rho);\n\t        real_function_3d vxc=xc.make_xc_potential();\n\n\n\t        if(iter == 1000){\n\t            coord_3d r(0.0);\n\t            for (int i=0; i<201; i++) {\n\t                r[2] = -L/2. + L*i/200.0;\n\t                print(r[2], rho(r));\n\t                //print(r[2], vsigaa(r));\n\t                //print(r[0], vxc(r)*r[0]*2.);\n\t            }\n\t        }\n\t        real_function_3d potential = Vnuc + 2* op(rho).truncate() +vxc.truncate();\n\n\t        double err  = iterate_ground(world, solver, potential, psi, eps);\n\t        if (err < thresh) break;\n\t    }\n\t}\n\tdouble kinetic_energy = 0.0;\n\tfor (int axis=0; axis<3; axis++) {\n\t    real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n\t    real_function_3d dpsi = D(psi);\n\t    kinetic_energy += inner(dpsi,dpsi);\n\t}\n\n\treal_function_3d rho = square(psi);\n\tdouble two_electron_energy = 2*inner(op(rho),rho); // <u|rho> = <phi phi | 1/r12 | phi phi>\n\trho.reconstruct();\n\n//\tvecfuncT vf;\n//\tvf.push_back(rho);\n//\tdouble exc=make_dft_energy(world,xc, vf, 0); // Exc\n    XCOperator<double,3> xc(world,xc_data,false,rho,rho);\n    real_function_3d vxc=xc.make_xc_potential();\n    double exc=xc.compute_xc_energy();\n\n\tdouble nuclear_repulsion_energy = 1.0/R;\n\tdouble nuclear_attraction_energy = 2.0*inner(Vnuc,rho); // <V|rho> = <phi|V|phi>\n\tdouble total_energy = kinetic_energy + two_electron_energy +\n\t        nuclear_attraction_energy + exc + nuclear_repulsion_energy;\n\tdouble virial = (nuclear_attraction_energy + two_electron_energy ) / kinetic_energy;\n\n\tif (world.rank() == 0) {\n\t    print(\"\");\n\t    print(\"            Kinetic energy \", kinetic_energy);\n\t    print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n\t    print(\" Nuclear repulsion energy  \", nuclear_repulsion_energy);\n\t    print(\"       Two-electron energy \", two_electron_energy);\n\t    print(\"                 XC energy \", exc);\n\t    print(\"              Total energy \", total_energy);\n\t    print(\"                    Virial \", virial);\n\t}\n\n\n\tworld.gop.fence();\n\tfinalize();\n\treturn 0;\n}\n"
  },
  {
    "path": "src/examples/h2dynamic.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/nonlinsol.h>\n\nusing namespace madness;\n\nstatic const double R = 1.4;    // bond length\nstatic const double L = 64.0*R; // box size\nstatic const long k = 6;        // wavelet order\nstatic const double thresh = 1e-4; // precision\n\nstatic double guess(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return (exp(-sqrt(x*x+y*y+(z-R/2)*(z-R/2)+1e-8))+\n            exp(-sqrt(x*x+y*y+(z+R/2)*(z+R/2)+1e-8)));\n}\n\nstatic double V(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return -1.0/sqrt(x*x+y*y+(z-R/2)*(z-R/2)+1e-8)+\n           -1.0/sqrt(x*x+y*y+(z+R/2)*(z+R/2)+1e-8);\n}\n\ndouble rifunction(const coord_3d& r) {\n    return r[2]; //z\n}\n\ndouble iterate_ground(World& world, NonlinearSolver& solver, real_function_3d& V, real_function_3d& psi, double& eps) {\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n    real_function_3d Vpsi = (V*psi);\n    Vpsi.scale(-2.0).truncate();\n    real_function_3d tmp = op(Vpsi);\n    double norm = tmp.norm2();\n    real_function_3d r = tmp-psi;\n    double rnorm = r.norm2();\n    double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n    if (world.rank() == 0) {\n        print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n    }\n    psi = solver.update(psi, r);\n    psi.truncate();\n    psi.scale(1.0/psi.norm2());\n    eps = eps_new;\n    return rnorm;\n}\n\ndouble iterate_excite(World& world, NonlinearSolver& solver, real_function_3d& V, real_function_3d& psi, real_function_3d& dpsi, double& eps, real_function_3d& ri) {\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n    real_convolution_3d du = CoulombOperator(world, 0.001, 1e-6);\n    real_function_3d rhs = V*dpsi + (du(psi*dpsi).scale(2.0) + ri)*psi;\n\n    rhs.scale(-2.0).truncate();\n    real_function_3d r = op(rhs) - dpsi;\n    double rnorm = r.norm2();\n    dpsi = solver.update(dpsi, r);\n    dpsi.truncate();\n    if (world.rank() == 0) {\n        print(\"dpsi error = \", rnorm);\n    }\n    return rnorm;\n }\n\ndouble iterate_xy(World& world, real_function_3d& V, real_function_3d& psi, real_function_3d& dpsi, double& eps, real_function_3d& ri, real_function_3d& x, real_function_3d& y, double omega) {\n  real_convolution_3d uop = CoulombOperator(world, 0.001, 1e-6);\n  real_convolution_3d gOpx = BSHOperator3D(world, sqrt(-2*(eps+omega)), 0.001, 1e-6);\n  real_convolution_3d gOpy = BSHOperator3D(world, sqrt(-2*(eps-omega)), 0.001, 1e-6);\n  real_function_3d gp2 = uop(y*psi);\n  real_function_3d gp3 = uop(x*psi);\n\n  real_function_3d pp = psi * (gp2 + gp3 + ri);\n\n  real_function_3d xrhs = V*x + pp;\n  xrhs.scale(-2.0).truncate();\n  real_function_3d new_x = gOpx(xrhs);\n  new_x = new_x - inner(psi,new_x)*psi;\n\n  real_function_3d yrhs = V*y + pp;\n  yrhs.scale(-2.0).truncate();\n  real_function_3d new_y = gOpy(yrhs);\n  new_y = new_y - inner(psi,new_y)*psi;\n\n  double errx = (x-new_x).norm2();\n  double erry = (y-new_y).norm2();\n\n  if (world.rank() == 0)\n      print(\"errx =\", errx, \"erry =\", erry);\n\n  x = new_x.truncate();\n  y = new_y.truncate();\n\n  return errx+erry;\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_initial_level(5);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_cubic_cell(-L/2, L/2);\n\n    real_function_3d Vnuc = real_factory_3d(world).f(V);\n    real_function_3d psi  = real_factory_3d(world).f(guess);\n    psi.truncate();\n    psi.scale(1.0/psi.norm2());\n\n    real_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n    double eps = -0.6;\n\n    if (world.rank() == 0)\n        print(\"\\n  Solving for the ground state HF orbital\\n\");\n    {\n      NonlinearSolver solver;\n      for (int iter=0; iter<10; iter++) {\n        real_function_3d rho = square(psi).truncate();\n        real_function_3d potential = Vnuc + op(rho).truncate();\n        double err  = iterate_ground(world, solver, potential, psi, eps);\n\tif (err < thresh) break;\n      }\n    }\n\n    double kinetic_energy = 0.0;\n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n        real_function_3d dpsi = D(psi);\n        kinetic_energy += inner(dpsi,dpsi);\n    }\n\n    real_function_3d rho = square(psi);\n    double two_electron_energy = inner(op(rho),rho); // <u|rho> = <phi phi | 1/r12 | phi phi>\n    double nuclear_attraction_energy = 2.0*inner(Vnuc,rho); // <V|rho> = <phi|V|phi>\n    double nuclear_repulsion_energy = 1.0/R;\n    double total_energy = kinetic_energy + two_electron_energy +\n        nuclear_attraction_energy + nuclear_repulsion_energy;\n    double virial = (nuclear_attraction_energy + two_electron_energy + nuclear_repulsion_energy) / kinetic_energy;\n\n    if (world.rank() == 0) {\n        print(\"\");\n        print(\"            Kinetic energy \", kinetic_energy);\n        print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n        print(\"       Two-electron energy \", two_electron_energy);\n        print(\" Nuclear  repulsion energy \", nuclear_repulsion_energy);\n        print(\"              Total energy \", total_energy);\n        print(\"                    Virial \", virial);\n    }\n\n    world.gop.fence();\n\n    // for(int i=-100; i<=100; i++) {\n    //   coord_3d r(0.0);\n    //   r[2] = i*0.1;\n    //   print(r[2],psi(r));\n    // }\n\n    if (world.rank() == 0)\n        print(\"\\n  Solving for the static response function (dphi/dFz)\\n\");\n\n    real_function_3d ri  = real_factory_3d(world).f(rifunction);\n    real_function_3d dpsi(world); //zero\n    rho = square(psi).truncate();\n    real_function_3d potential = Vnuc + op(rho).truncate();\n    {\n        NonlinearSolver solver;\n        for(int iter=1; iter<=20; iter++) {\n            double err = iterate_excite(world, solver, potential, psi, dpsi, eps, ri);\n            if (err < thresh*10.0) break;\n        }\n    }\n    // for (int i=-100; i<=100; i++) {\n    //   coord_3d r(0.0);\n    //   r[2] = i*0.1;\n    //   print(r[2],dpsi(r));\n    // }\n\n    double h1 = 0.0;\n    for (int axis=0; axis<3; axis++) {\n      real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n      real_function_3d nadp = D(dpsi);\n      h1 += 0.5*inner(nadp,nadp);\n    }\n    double h2 = inner(Vnuc*dpsi,dpsi);\n    double ans1 = h1 + h2;\n\n    real_function_3d e1 = dpsi*psi;\n    real_function_3d e2 = psi*psi;\n    real_function_3d e3 = dpsi*dpsi;\n    double ans2 = inner(e1,op(e1));\n    double ans3 = inner(e3,op(e2));\n    double ans4 = inner(dpsi,dpsi);\n    double ans5 = inner(dpsi,ri*psi);\n    double d2Ea = (4*ans1) + (8*ans2) + (4*ans3) - (4*(eps*ans4)) + (8*ans5);\n    double d2Eb = 4*ans5;\n    double d2E  = 2*d2Eb - d2Ea;\n    double alpha_static = -d2E;\n\n    if (world.rank() == 0) {\n        print(\"< dpsi | h | dpsi >\", ans1);\n        print(\"< dpsi dpsi | psi psi >\", ans2);\n        print(\"< dpsi psi | dpsi psi >\", ans3);\n        print(\" eps \",eps);\n        print(\"< dpsi | dpsi >\", ans4);\n        print(\"< dpsi | r | psi > \",ans5);\n        print(\"E2a = -<1|H0 - E0|1> =\", d2Ea);\n        print(\"E2b =  <1| V - E1|0> =\", d2Eb);\n        print(\"E2 variational form  =\", d2E);\n        print(\" alpha_static \",alpha_static);\n    }\n\n    double omega = 0.0;\n    for(int j=0; j<=4; j++) {\n      omega = 0.365 + (j*0.005);\n\n      if (world.rank() == 0)\n          print(\"\\n  Solving for the dynamic response function at omega =\",omega,\"\\n\");\n\n      real_function_3d x = real_factory_3d(world); //zero\n      real_function_3d y = real_factory_3d(world); //zero\n      for(int iter=1; iter<=20; iter++) {\n          double err = iterate_xy(world, potential, psi, dpsi, eps, ri, x, y, omega);\n          if (err < 10*thresh) break;\n      }\n      //for (int i=-100; i<=100; i++) {\n      //coord_3d r(0.0);\n      //r[2] = i*0.1;\n\t//print(r[2],x(r));\n\t//print(r[2],y(r));\n      //}\n\n      //print(\"alpha_dynamic +w\", 2.0*inner(ri,x*psi));\n      //print(\"alpha_dynamic -w\", 2.0*inner(ri,y*psi));\n\n      real_function_3d drho = (x*psi)+(psi*y);\n      double alpha_dynamic = -2*inner(ri,drho);\n      print(\"alpha_dynamic omega = \",omega,\" alpha = \",alpha_dynamic);\n    }\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/hatom.cc",
    "content": "#include <fstream>\n#include <iostream>\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\nusing namespace madness;\n\nstatic const double L = 32.0;   // box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-7; // precision\nstatic const double F=0.0; // electric field\n\nstatic double guess(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    // this is the exact solution\n    //return exp(-sqrt(x*x+y*y+z*z))/sqrt(constants::pi);\n    //\n    // this is too diffuse\n    return exp(-sqrt(x*x+y*y+z*z)/2.0)/sqrt(8.0*constants::pi);\n}\n\nstatic double V(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return -1.0/(sqrt(x*x+y*y+z*z)) + F*z;\n}\n\ninline double mask1(double x) {\n    /* Iterated first beta function to switch smoothly\n           from 0->1 in [0,1].  n iterations produce 2*n-1\n           zero derivatives at the end points. Order of polyn\n           is 3^n.\n\n           Currently use one iteration so that first deriv.\n           is zero at interior boundary and is exactly representable\n           by low order multiwavelet without refinement */\n\n    x = (x * x * (3. - 2. * x));\n    return x;\n}\n\nstatic double mask3(const coord_3d& ruser) {\n    coord_3d rsim;\n    user_to_sim(ruser, rsim);\n    double x = rsim[0], y = rsim[1], z = rsim[2];\n    double lo = 0.0625, hi = 1.0 - lo, result = 1.0;\n    double rlo = 1.0 / lo;\n\n    if (x < lo)\n        result *= mask1(x * rlo);\n    else if (x > hi)\n        result *= mask1((1.0 - x) * rlo);\n    if (y < lo)\n        result *= mask1(y * rlo);\n    else if (y > hi)\n        result *= mask1((1.0 - y) * rlo);\n    if (z < lo)\n        result *= mask1(z * rlo);\n    else if (z > hi)\n        result *= mask1((1.0 - z) * rlo);\n\n    return result;\n}\n\nvoid iterate(World& world, real_function_3d& V, real_function_3d& mask, real_function_3d& psi, double& eps) {\n    real_function_3d Vpsi = (V*psi);\n    Vpsi.scale(-2.0).truncate();\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n    real_function_3d tmp = apply(op,Vpsi).truncate();\n    tmp = tmp*mask;\n    double norm = tmp.norm2();\n    real_function_3d r = tmp-psi;\n    double rnorm = r.norm2();\n    double eps_new;\n    if (rnorm > 0.2) {\n        r *= 0.2/rnorm;\n        print(\"step restriction\");\n        eps_new = eps;\n    }\n    else {\n        // Only update energy once step restriction is lifted since this is only locally convergent\n        eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n    }\n    if (world.rank() == 0) {\n        print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n    }\n    psi += r;\n    psi.scale(1.0/psi.norm2());\n    eps = eps_new;\n}\n\nstd::tuple<double,double,double> compute_energy(World& world, real_function_3d& Vnuc, real_function_3d& psi) {\n    double kinetic_energy = 0.0;\n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n        real_function_3d dpsi = D(psi);\n        kinetic_energy += 0.5*inner(dpsi,dpsi);\n    }\n    real_function_3d rho = square(psi).truncate();\n    double nuclear_attraction_energy = inner(Vnuc*psi,psi);\n    double total_energy = kinetic_energy + nuclear_attraction_energy;\n    return {kinetic_energy, nuclear_attraction_energy, total_energy};\n}\n\nvoid run(World& world) {\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n\n    real_function_3d Vnuc = real_factory_3d(world).f(V).truncate_mode(1);\n    real_function_3d psi  = real_factory_3d(world).f(guess);\n    real_function_3d mask = real_factory_3d(world).f(mask3);\n    psi = psi*mask;\n    print(\"initial\", psi.norm2());\n    psi.scale(1.0/psi.norm2());\n\n    double eps = -0.5;\n    for (int iter=0; iter<15; iter++) {\n        real_function_3d rho = square(psi).truncate();\n        iterate(world, Vnuc, mask, psi, eps);\n    }\n\n    // Manually tabluate the orbital along a line along the z axis ... probably easier to use the lineplot routine\n    coord_3d r(0.0);\n    psi.reconstruct();\n    for (int i=0; i<201; i++) {\n        r[2] = -L/2 + L*i/200.0;\n        print(r[2], psi(r));\n    }\n  \n    auto [kinetic_energy, nuclear_attraction_energy, total_energy] = compute_energy(world, Vnuc, psi);\n    if (world.rank() == 0) {\n        print(\"            Electric Field \", F);\n        print(\"            Kinetic energy \", kinetic_energy);\n        print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n        print(\"              Total energy \", total_energy);\n    }\n}\n\nint main(int argc, char** argv) {\n    World& world = initialize(argc, argv);\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    run(world);\n    \n    world.gop.fence();\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/hatom_1d.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file hatom_1d.cc\n  \\brief Solves the Schrodinger equation for the 1-d hydrogen atom\n  \\ingroup examples\n\n  The Hartree-Fock wave function is computed for the hydrogen atom\n  in one dimension without using symmetry.\n\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\nusing namespace madness;\n\nstatic const double L = 100;    // box size\nstatic const long k = 6;        // wavelet order\nstatic const double thresh = 1e-4; // precision\n\nstatic double guess(const coord_1d& r) {\n    const double x=r[0];\n    // exact, up to normalization\n    return x*exp(-fabs(x));\n}\n\nstatic double V(const coord_1d& r) {\n    const double x=r[0];\n    return - 1.0/(fabs(x) + 1e-8);\n}\n\nvoid iterate(World& world, real_function_1d& V, real_function_1d& psi, double& eps) {\n    real_convolution_1d op = BSHOperator<1>(world, sqrt(-2.0*eps), 0.001, 1e-6);\n    real_function_1d Vpsi = (V*psi);\n    Vpsi.scale(-1.0).truncate();\n    real_function_1d tmp = op(Vpsi).truncate();\n    tmp.scale(2.0).truncate();\n    double norm = tmp.norm2();\n    real_function_1d r = tmp-psi;\n    double rnorm = r.norm2();\n    double eps_new = eps - inner(Vpsi,r)/(norm*norm);\n    if (world.rank() == 0) {\n        print(\"norm=\",norm,\" eps=\",eps,\" ||dpsi||=\",rnorm,\" deps=\",eps_new-eps);\n    }\n    psi = tmp.scale(1.0/norm);\n    eps = eps_new;\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<1>::set_refine(true);\n    FunctionDefaults<1>::set_initial_level(5);\n    FunctionDefaults<1>::set_truncate_mode(1);\n    FunctionDefaults<1>::set_cubic_cell(-L/2, L/2);\n    //FunctionDefaults<1>::set_max_refine_level(2);\n    // for (int i=0; i<1; i++) {\n    // FunctionDefaults<1>::cell(i,0) = -L/2;\n    // FunctionDefaults<1>::cell(i,1) =  L/2;\n    // }\n\n    real_function_1d Vnuc = real_factory_1d(world).f(V);\n    real_function_1d psi  = real_factory_1d(world).f(guess);\n    psi.truncate();\n    psi.scale(1.0/psi.norm2());\n\n    double eps = -0.5;\n    for (int iter=0; iter<50; iter++) {\n      std::cout << \"Iteration \" << iter << std::endl;\n      //psi.print_tree();\n\n      // plot psi\n#if 0\n      std::ostringstream oss;\n      oss << \"psi_\" << iter << \".dat\";\n      const Vector<double,1> lo(-L/2);\n      const Vector<double,1> hi(+L/2);\n      plot_line(oss.str().c_str(), 10001, lo, hi, psi);\n#endif\n\n      real_function_1d potential = Vnuc;\n      iterate(world, potential, psi, eps);\n    }\n\n    real_derivative_1d D = free_space_derivative<double,1>(world, 0);\n    real_function_1d dpsi = D(psi);\n    const double kinetic_energy = 0.5*inner(dpsi,dpsi);\n\n    real_function_1d rho = square(psi);\n    double potential_energy = inner(Vnuc,rho);\n\n    double total_energy = kinetic_energy + potential_energy;\n    double virial = potential_energy / kinetic_energy;\n\n    if (world.rank() == 0) {\n        print(\"            Kinetic energy \", kinetic_energy);\n        print(\"          Potential energy \", potential_energy);\n        print(\"              Total energy \", total_energy);\n        print(\"                    Virial \", virial);\n    }\n\n    world.gop.fence();\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/hatom_energy.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n  \\file examples/hatom_energy.cc\n  \\brief Compute the energy of the hydrogen atom ground state\n  \\defgroup hatom_energy Energy of the hydrogen atom ground state\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/hatom_energy.cc>here</a>.\n\n  This example computes the energy of the ground state of\n  the hydrogen atom as the expectation value of the\n  non-relativistic Schr&ouml;dinger Hamiltonian within the\n  Born-Oppenheimer approximation.  Explicitly,\n  \\f[\n      E = \\frac{\\langle \\psi \\mid - \\frac{1}{2}  \\nabla^2  - \\frac{1}{r} \\mid \\psi \\rangle}{\\langle \\psi \\mid \\psi \\rangle}\n  \\f]\n  where the unnormalized wave function is\n  \\f[\n     \\psi(r) = e^{-r}\n  \\f]\n\n  \\par Implementation\n\n  Two functions are required - the wave function and the potential. Note the small\n  constants introduced to eliminate the cusp in the wave function and the singularity\n  in the potential. Due to the volume element this smoothing has negligible effect on\n  the result (perturbation theory can make this rigorous).\n\n  The wave function is exponentially decaying and has the value 2e-9 at r=20, so\n  we pick this as a box size that is effectively infinite.\n\n  Using integration by parts and noting that \\f$ \\psi(\\infty)=0 \\f$\n  \\f[\n       \\langle \\psi \\mid \\nabla^2 \\mid \\psi \\rangle = - \\langle \\nabla \\psi \\mid \\nabla \\psi \\rangle\n  \\f]\n  Finally, due to the spherical symmetry we only need compute one component of the Laplacian\n  in Cartesian coordinates.\n\n  The exact answer is \\f$-\\frac{1}{2}\\f$ in atomic units.\n*/\n\n#include <madness/mra/mra.h>\n\nusing namespace madness;\n\ndouble psi(const Vector<double,3>& r) {\n  return exp(-sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]+1e-6));\n}\n\ndouble V(const Vector<double,3>& r) {\n  return -1.0/sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]+1e-6);\n}\n\nint main(int argc, char**argv) {\n  // Initialize the parallel programming environment\n  initialize(argc,argv);\n  World world(SafeMPI::COMM_WORLD);\n\n  // Load info for MADNESS numerical routines\n  startup(world,argc,argv);\n  std::cout.precision(8);\n\n  // Use defaults for numerical functions except for user simulation volume\n  FunctionDefaults<3>::set_cubic_cell(-20,20);\n\n  Function<double,3> u = FunctionFactory<double,3>(world).f(psi);\n  Function<double,3> v = FunctionFactory<double,3>(world).f(V);\n  Function<double,3> vu = v*u;\n  real_derivative_3d Dx = free_space_derivative<double,3>(world,0);\n  Function<double,3> du = Dx(u);\n  double KE = 3*0.5*(du.inner(du));\n  double PE = vu.inner(u);\n  double S = u.inner(u);\n\n  if (world.mpi.Get_rank() == 0) {\n    print(\"the overlap integral is\",S);\n    print(\"the kinetic energy integral\",KE);\n    print(\"the potential energy integral\",PE);\n    print(\"the total energy\",(KE+PE)/S);\n  }\n\n  finalize();\n\n  return 0;\n}\n\n"
  },
  {
    "path": "src/examples/hatom_sf_dirac.cc",
    "content": "#include <fstream>\n#include <iostream>\n#include <algorithm>\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/lbdeux.h>\n#include <madness/mra/nonlinsol.h>\n#include <madness/chem/atomutil.h>\n\nusing namespace madness; \n\nstatic const double Z = 80.0;      // nuclear charge\nstatic const double L = 40.0/Z;    // L=40/Z [-L,L] box size so exp(-Zr)=1e-16 padded a bit since we are masking\nstatic const long k = 8;           // wavelet order\nstatic const double thresh = 1e-6; // precision\nstatic const double c = 137.035999679; // speed of light\nstatic const int Vtruncmode = (Z<=10 && thresh>1e-10) ? 1 : 0; // Point nucleus potential woes\nstatic const double eprec = 0.0; //std::min(1e-4,thresh*Z*Z); // Note this is for NR wavefun, and for now we just want relative not absolute error\nstatic const double rcut = 1e-4; // typical size of heavy nucleus //smoothing_parameter(Z, eprec);\nstatic const double v = std::sqrt(1.0 - Z*Z/(c*c)) - 1.0;\n\ninline double mask1(double x) {\n    x = (x * x * (3. - 2. * x));\n    return x;\n}\n\nstatic double mask3(const coord_3d& ruser) {\n    coord_3d rsim;\n    user_to_sim(ruser, rsim);\n    double x = rsim[0], y = rsim[1], z = rsim[2];\n    double lo = 0.0625, hi = 1.0 - lo, result = 1.0;\n    double rlo = 1.0 / lo;\n\n    if (x < lo)\n        result *= mask1(mask1(x * rlo));\n    else if (x > hi)\n        result *= mask1(mask1((1.0 - x) * rlo));\n    if (y < lo)\n        result *= mask1(mask1(y * rlo));\n    else if (y > hi)\n        result *= mask1(mask1((1.0 - y) * rlo));\n    if (z < lo)\n        result *= mask1(mask1(z * rlo));\n    else if (z > hi)\n        result *= mask1(mask1((1.0 - z) * rlo));\n\n    return result;\n}\n\n\nstruct LBCost {\n    double leaf_value;\n    double parent_value;\n    LBCost(double leaf_value=1.0, double parent_value=1.0)\n        : leaf_value(leaf_value)\n        , parent_value(parent_value)\n    {}\n\n    double operator()(const Key<3>& key, const FunctionNode<double,3>& node) const {\n        if (node.is_leaf()) return leaf_value;\n        else return parent_value;\n    }\n};\n\n// This class is used to store information for the non-linear solver\nstruct F {\n    real_function_3d psi, phi;\n\n    F(const real_function_3d& psi, const real_function_3d& phi) \n        : psi(psi), phi(phi)\n    {}\n\n    F operator-(const F& b) const {\n        return F(psi-b.psi, phi-b.phi);\n    }\n\n    F operator+=(const F& b) { // Operator+= necessarphi\n        psi += b.psi; phi += b.phi;\n        return *this;\n    }\n\n    F operator*(double a) const { // Scale bphi a constant necessarphi\n        return F(psi*a,phi*a);\n    }\n};\n\ndouble inner(const F& a, const F& b) {\n    return inner(a.psi,b.psi) + inner(a.phi,b.phi);\n}\n\nstruct allocator {\n    World& world;\n\n    allocator(World& world) : world(world) {}\n\n    F operator()() {\n        return F(real_function_3d(world),real_function_3d(world));\n    }\n};\n\ndouble exact_energy(double Z) {\n    if (Z<=10) {\n        double a2 = Z*Z/(c*c);\n        double a4 = a2*a2;\n        double a6 = a4*a2;\n        double a8 = a4*a4;\n        return Z*Z*(-1.0/2.0 - 1.0/8.0*a2 - 1/16*a4 - 5.0/128.0*a6 - 7.0/256.0*a8);\n    }\n    double Za = Z/c;\n    double s = Za / sqrt(1.0 - Za*Za);\n    return c*c/std::sqrt(1.0 + s*s) - c*c;\n}\n\nstatic double psi_guess(const coord_3d& r) {\n    double R = std::sqrt(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]);\n    const double expnt = std::sqrt(-2*exact_energy(Z)*(1+exact_energy(Z)/(2*c*c)));\n    return std::pow(R+rcut,v)*exp(-expnt*R)/sqrt(constants::pi/(expnt*expnt*expnt)); // note +rcut in singular part to smooth on nuclear scale\n    //const double expnt = Z*0.5;\n    //return exp(-expnt*R)/sqrt(constants::pi/(expnt*expnt*expnt)); // note +rcut in singular part to smooth on nuclear scale\n}\n\nstatic double phi_guess(const coord_3d& r) {\n    double R = std::sqrt(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]);\n    const double expnt = std::sqrt(-2*exact_energy(Z)*(1+exact_energy(Z)/(2*c*c)));\n    return exp(-expnt*R)/sqrt(constants::pi/(expnt*expnt*expnt));\n    // const double expnt = Z;\n    // return exp(-expnt*R)/sqrt(constants::pi/(expnt*expnt*expnt)); // note +rcut in singular part to smooth on nuclear scale\n}\n\nstatic double V(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    //return -Z/(sqrt(x*x+y*y+z*z));\n    return (-Z/rcut)*smoothed_potential(sqrt(x*x+y*y+z*z)/rcut);\n}\n\nclass Vderiv : public FunctionFunctorInterface<double,3> {\n    const int axis;\npublic:\n    Vderiv(int axis) : axis(axis) {}\n\n    double operator()(const coord_3d& r) const {\n        double R = std::sqrt(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]);\n        double rc = 1.0/rcut;\n        return - Z * (r[axis] / R) * dsmoothed_potential(R * rc) * (rc * rc);\n    }\n};\n\n// Applies pV.p/4m^2c^2 phi = sum_q (-dV/dq dphi/dq - V d^2phi/dq^2)\nreal_function_3d pVp(World& world, const real_function_3d& V, const real_function_3d gradV[3], const real_function_3d& phi) {\n    real_function_3d Wphi = real_function_3d(world);\n    for (int axis=0; axis<3; axis++) {\n        {\n            real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n            D.set_bspline1();\n            Wphi -= D(phi)*gradV[axis];\n        }\n        {\n            real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n            D.set_bspline2();\n            Wphi -= D(phi)*V;\n        }\n    }\n    Wphi *= 1.0/(4.0*c*c);\n    return Wphi;\n}\n\n// Applies pV.p/4m^2c^2\nreal_function_3d pVp(World& world, const real_function_3d& V, const real_function_3d& phi) {\n    real_function_3d Wphi = real_function_3d(world);\n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n        D.set_bspline1(); // try bspline smoother derivative\n        Wphi -= D(D(phi)*V);\n    }\n    Wphi *= 1.0/(4.0*c*c);\n    return Wphi;\n}\n\n// E<psi|psi> = <psi|T|phi> + <psi|V|psi>\nstd::tuple<double,double,double,double> compute_energy(World& world,\n                                                       real_function_3d& V,\n                                                       real_function_3d& psi,\n                                                       real_function_3d& phi)\n{\n    double overlap = inner(psi,psi);\n    double potential_energy = inner(psi,V*psi) / overlap;\n    double kinetic_energy = 0.0;\n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis); // more accurate to use ABGV derivative for KE\n        real_function_3d dpsi = D(psi);\n        real_function_3d dphi = D(phi);\n        kinetic_energy += 0.5*inner(dpsi,dphi);\n    }\n    kinetic_energy /= overlap;\n    double total_energy = kinetic_energy + potential_energy;\n    return {total_energy, kinetic_energy, potential_energy, overlap};\n}\n\n// (T-E) phi = -V psi + E(psi-phi)\n// and with s=1+E/2mc^2\n// T (psi-s*phi) = - pVp phi/4mc^2\n// BAD!! (T-E) (psi-s*phi) = - pVp phi - E(psi-s*phi)\ntemplate <typename solverT>\nstd::tuple<real_function_3d, real_function_3d, double> iterate(World& world,\n                                                               const real_function_3d& V,\n                                                               const real_function_3d gradV[3],\n                                                               const real_function_3d& mask,\n                                                               const real_function_3d& psi,\n                                                               const real_function_3d& phi,\n                                                               const double energy,\n                                                               const int iter,\n                                                               solverT& solver)\n{\n    real_convolution_3d coulop = CoulombOperator(world, rcut*0.1, thresh);\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*energy), rcut*0.1, thresh);\n    real_function_3d rhs = -2*(psi*V - energy*(psi-phi));\n    rhs.truncate();\n    real_function_3d phi_new = apply(op,rhs);\n\n    double s = 1.0 + energy/(2*c*c);\n    //rhs = -2*(pVp(world,V,gradV,phi) + energy*(psi-s*phi));\n    rhs = -(2/(4*constants::pi))*pVp(world,V,phi);\n    rhs.truncate();\n    real_function_3d psimphi_new = apply(coulop,rhs);\n    real_function_3d psi_new = s*phi_new + psimphi_new;\n\n    psi_new.truncate();\n    phi_new.truncate();\n\n    psi_new = psi_new * mask;\n    phi_new = phi_new * mask;\n    \n    double rnormL = (psi_new-psi).norm2();\n    double rnormP = (phi_new-phi).norm2();\n    if (world.rank() == 0) print(rnormL, rnormP);\n    double rnorm = (psi_new-psi).norm2() + (phi_new-phi).norm2();\n\n    // Comment out next 5 lines to not use the solver (i.e., to just do fixed-point iteration)\n    if (iter>1) {\n        F f = solver.update(F(psi,phi), F(psi_new-psi, phi_new-phi));\n        psi_new = f.psi;\n        phi_new = f.phi;\n        psi_new.truncate();\n        phi_new.truncate();\n    }\n\n    double stepnorm = (psi_new-psi).norm2() + (phi_new-phi).norm2();\n    double maxstep = 1e-1;\n    if (stepnorm > maxstep) {\n        if (world.rank() == 0) print(\"step restriction\", stepnorm);\n        double step = maxstep/stepnorm;\n        psi_new = psi + step*(psi_new-psi);\n        phi_new = phi + step*(phi_new-phi);\n    }\n\n    double norm = inner(psi_new,psi_new);\n    psi_new *= 1.0/sqrt(norm);\n    phi_new *= 1.0/sqrt(norm);\n    \n    return {psi_new, phi_new, rnorm};\n}\n\nvoid run(World& world) {\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_cubic_cell(-L,L);\n\n    if (world.rank() == 0) {\n        print(\"            Z:\", Z);\n        print(\"            L:\", L);\n        print(\"            k:\", k);\n        print(\"            v:\", v);\n        print(\"            c:\", c);\n        print(\"         rcut:\", rcut);\n        print(\"        eprec:\", eprec);\n        print(\"       thresh:\", thresh);\n        print(\"       Vtmode:\", Vtruncmode);\n        print(\"     exact DC:\", exact_energy(Z));\n        print(\"\");\n    }\n\n    {\n        real_function_3d Vnuc = real_factory_3d(world).f(V).truncate_mode(Vtruncmode);\n        LoadBalanceDeux<3> lb(world);\n        lb.add_tree(Vnuc, LBCost(1.0,8.0));\n        FunctionDefaults<3>::redistribute(world, lb.load_balance(2.0,false));\n    }\n    real_function_3d Vnuc = real_factory_3d(world).f(V).truncate_mode(Vtruncmode);\n\n    real_function_3d gradV[3];\n    for (int axis=0; axis<3; axis++) {\n        std::shared_ptr<FunctionFunctorInterface<double,3>> p(new Vderiv(axis));\n        gradV[axis] = real_factory_3d(world).functor(p).truncate_mode(0);\n    }\n\n\n    coord_3d lo = {0.0,0.0,-L}, hi = {0.0,0.0,L};\n    const int npt = 1001;\n    \n    real_function_3d mask  = real_factory_3d(world).f(mask3);\n    plot_line(\"mask.dat\", npt, lo, hi, mask);\n    \n    real_function_3d psi  = real_factory_3d(world).f(psi_guess);\n    real_function_3d phi  = real_factory_3d(world).f(phi_guess);\n    psi = psi*mask;\n    phi = phi*mask;\n    {\n        double norm;\n        norm = psi.norm2();  psi.scale(1.0/norm);\n        norm = phi.norm2();  phi.scale(1.0/norm);\n    }\n\n    XNonlinearSolver<F,double,allocator> solver = XNonlinearSolver<F,double,allocator>(allocator(world));\n    solver.set_maxsub(10);\n    \n    double energy = -0.5*Z*Z; // NR energy guess\n    for (int iter=0; iter<1000; iter++) {\n        char fname[256];\n        snprintf(fname,256,\"psi-phi-%3.3d.dat\", iter);\n        plot_line(fname, npt, lo, hi, psi, phi);\n        \n        auto [psi_new, phi_new, rnorm] = iterate(world, Vnuc, gradV, mask, psi, phi, energy, iter, solver);\n        psi = psi_new;\n        phi = phi_new;\n\n        auto psisize = psi.size();\n        auto phisize = phi.size();\n        auto phinorm = phi.norm2();\n        auto [total_energy, kinetic_energy, potential_energy, overlap] = compute_energy(world, Vnuc, psi, phi);\n        \n        if (world.rank() == 0) {\n            print(\"\\niteration \", iter, \" rnorm \", rnorm, \" psi size \", psisize, \" phi size \", phisize, \" phi norm \", phinorm);\n            print(\"            Kinetic energy  \", kinetic_energy);\n            print(\" Nuclear attraction energy \", potential_energy);\n            print(\"              Total energy \", total_energy, total_energy - energy);\n        }\n\n        energy = total_energy;\n\n        if (iter>10 and rnorm<10.0*thresh) break;\n    }\n}\n\nint main(int argc, char** argv) {\n    World& world = initialize(argc, argv);\n    startup(world,argc,argv);\n    std::cout.precision(10);\n\n    run(world); // Put all functions in separate scope to force destruction before finalize\n\n    world.gop.fence();\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/he.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/lbdeux.h>\n\nusing namespace madness;\n\nstatic const double L = 30.0;   // box size\nstatic const long k = 6;        // wavelet order\nstatic const double thresh = 1e-4; // precision\n\nstatic const double   rcut = 0.01; // Smoothing distance in 1e potential\nstatic const double r12cut = 0.01; // Smoothing distance in 2e potential\nstatic const double   dcut = 0.01; // Smoothing distance in wave function\nstatic const double d12cut = 0.01; // Smoothing distance in wave function\n\nstatic const long oi = 0;        // orbital (mcquarrie, hylleraas-3term)\nstatic const long vi = 1;        // potential (all, pot1/2, eri, Vpsi_eri)\n\n// Smoothed 1/r potential (c is the smoothing distance)\nstatic double u(double r, double c) {\n    r = r/c;\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-2) {\n        pot = erf(r)/r + exp(-r2)*0.56418958354775630;\n    } else{\n        pot = 1.6925687506432689-r2*(0.94031597257959381-r2*(0.39493270848342941-0.12089776790309064*r2));\n    }\n\n    return pot/c;\n}\n\nvoid distances(const coord_6d& r, double& r1, double& r2, double& r12) {\n    const double x1=r[0], y1=r[1], z1=r[2];\n    const double x2=r[3], y2=r[4], z2=r[5];\n    const double xx=x1-x2, yy=y1-y2, zz=z1-z2;\n    r1 = sqrt(x1*x1 + y1*y1 + z1*z1);\n    r2 = sqrt(x2*x2 + y2*y2 + z2*z2);\n    r12 = sqrt(xx*xx + yy*yy + zz*zz);\n}\n\n\n\nstatic double V(const coord_6d& r) {\n    double r1, r2, r12;\n    distances(r, r1, r2, r12);\n    if (vi==0) {\n\treturn -2.0*u(r1,rcut) - 2.0*u(r2,rcut) + 1.0*u(r12,r12cut);\n    } else if (vi==1) {\n\treturn -2.0*u(r1,rcut) - 2.0*u(r2,rcut) ;\n    } else if (vi==2) {\n\treturn  1.0*u(r12,r12cut);\n    } else if (vi==3) {\t\t// for Vpsi\n\treturn  1.0*u(r12,r12cut);\n    } else {\n    \tMADNESS_EXCEPTION(\"unknown vi\",0);\n\treturn 0.0;\n    }\n}\n\n\nstruct LBCost {\n    double leaf_value;\n    double parent_value;\n    LBCost(double leaf_value=1.0, double parent_value=1.0)\n        : leaf_value(leaf_value)\n        , parent_value(parent_value)\n    {}\n\n    double operator()(const Key<6>& key, const FunctionNode<double,6>& node) const {\n        if (key.level() <= 1) {\n            return 100.0*(leaf_value+parent_value);\n        }\n        else if (node.is_leaf()) {\n            return leaf_value;\n        }\n        else {\n            return parent_value;\n        }\n    }\n};\n\n\nstruct true_op {\n    bool operator()(FunctionImpl<double,6>* impl, const Key<6>& key, const FunctionNode<double,6>& t) const {\n        return true;\n    }\n\n    template <typename Archive> void serialize (Archive& ar) {}\n};\n\nstatic double f6d(const coord_6d& r) {\n    double r1, r2, r12;\n    distances(r, r1, r2, r12);\n    r1 = sqrt(r1*r1 + dcut*dcut); // Smooth cusps just a little\n    r2 = sqrt(r2*r2 + dcut*dcut);\n    r12 = sqrt(r12*r12 + d12cut*d12cut);\n    double val;\n    if (oi==0) {\t\t// McQuarrie\n        val=exp(-(27.0/16.0)*(r1+r2));\n    } else if (oi==1) {\t\t// Hylleraas-3-term\n\tval=-exp(-1.81607*(r1 + r2)) * (\n\t-1.33083943395992\n\t-0.388320016632985 * r12\n\t-0.174093511691879 *  ( r1*r1  + r2*r2  -2.0 * r1 * r2 )\n\t);\n    } else if (oi==2) {\t\t// Hylleraas-2-term\n        val=exp(-1.8*(r1 + r2))*(1.0 + 0.5*r12);\n    } else {\n    \tMADNESS_EXCEPTION(\"unknown oi\",0);\n    }\n    return val;\n\n}\n\n/*\nstatic double Vpsi(const coord_6d& r) {\n    return f6d(r) * V(r);\n}\n*/\n\nclass YetAnotherWrapperClass {\n    const real_function_6d& f;\n    real_function_6d eri;\n    const Tensor<double>& qx;\n\npublic:\n    YetAnotherWrapperClass(const real_function_6d& f)\n        : f(f)\n\t\t, eri(TwoElectronFactory(f.get_impl()->world).dcut(dcut*dcut).thresh(thresh*0.1).k(k))\n//        , eri(ERIFactory(f.get_impl()->world).dcut(dcut*dcut).thresh(thresh*0.1).k(k))\n        , qx(FunctionCommonData<double,6>::get(k).quad_x)\n    {\n//        eri=ERIFactory<double,6>(f.get_impl()->world).dcut(dcut*dcut).thresh(thresh).k(k);\n    }\n\n    void operator()(const Key<6>& key, Tensor<double>& t) const {\n    \tconst long npt=k+3;\n        Tensor<double> v(npt,npt,npt,npt,npt,npt);\n\n        f.get_impl()->fcube(key, V, qx, v);\n//        v+=f.get_impl()->coeffs2values(\n//\t\tkey,eri.get_impl()->get_functor()->coeff(key).full_tensor());\n\n        t.emul(v);\n\n//        f.get_impl()->fcube(key, V, qx, v);\n//        t=v;\n    }\n};\n\nreal_function_6d multiply_by_V(const real_function_6d& psi) {\n    real_function_6d Vpsi = copy(psi);\n    Vpsi.unaryop(YetAnotherWrapperClass(Vpsi));\n    return Vpsi;\n}\n\ndouble energy(World& world, const real_function_6d& psi) {\n    double kinetic_energy = 0.0, potential_energy = 0.0, overlap;\n    for (int axis=0; axis<1; axis++) { // Note use of spherical symmetry\n        real_derivative_6d D = free_space_derivative<double,6>(world, axis);\n        real_function_6d dpsi = D(psi);\n        double dd = 0.5*inner(dpsi,dpsi);\n        kinetic_energy += dd;\n    }\n    kinetic_energy *= 6.0; // Spherical symmetry\n\n    potential_energy = inner(psi,multiply_by_V(psi));\n//    real_function_6d vpsi = real_factory_6d(world).f(Vpsi);\n//    potential_energy = inner(psi,vpsi);\n\n    overlap = inner(psi,psi);\n\n    double total = (kinetic_energy  + potential_energy)/overlap;\n    double size = psi.size();\n    if (world.rank() == 0) {\n        printf(\"        k %ld\\n\", k);\n        printf(\"   thresh %.1e\\n\", thresh);\n        printf(\"   t-mode %d\\n\", FunctionDefaults<6>::get_truncate_mode());\n        printf(\"   t-on-p %d\\n\", FunctionDefaults<6>::get_truncate_on_project());\n        printf(\"   smooth %.1e %.1e %.1e %.1e\\n\", rcut, r12cut, dcut, d12cut);\n        printf(\"        L %12.6f\\n\", L);\n        print (\"   tensor \", FunctionDefaults<6>::get_tensor_type());\n        printf(\"       oi %ld\\n\", oi);\n        printf(\"       vi %ld\\n\", vi);\n        printf(\"\\n\");\n        printf(\"   #coeff %12.2e\\n\", size);\n        printf(\"        S %12.6f\\n\", overlap);\n        printf(\"       KE %12.6f\\n\", kinetic_energy/overlap);\n        printf(\"       PE %12.6f\\n\", potential_energy/overlap);\n        printf(\"    Total %12.6f\\n\", total);\n    }\n\n    return total;\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    if (world.rank() == 0) printf(\"starting at time %.1f\\n\", wall_time());\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<6>::set_k(k);\n    FunctionDefaults<6>::set_thresh(thresh);\n    FunctionDefaults<6>::set_truncate_mode(0);\n    FunctionDefaults<6>::set_truncate_on_project(true);\n    FunctionDefaults<6>::set_project_randomize(true);\n    FunctionDefaults<6>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<6>::set_tensor_type(TT_2D);\n//    FunctionDefaults<6>::set_tensor_type(TT_FULL);\n    \n    if (world.rank() == 0) printf(\"compressing PSI at time %.1f\\n\", wall_time());\n    real_function_6d psi = real_factory_6d(world).f(f6d);\n//    psi.refine_general(true_op());\n    if (world.rank() == 0) printf(\"computing norm at time %.1f\\n\", wall_time());\n    if (world.rank() == 0) printf(\"load balancing using psi at time %.1f\\n\", wall_time());\n    LoadBalanceDeux<6> lb(world);\n    lb.add_tree(psi,LBCost(1.0,1.0));\n    FunctionDefaults<6>::redistribute(world, lb.load_balance(2.0,false));\n\n\n//     if (world.rank() == 0) print(\"compressing V\");\n//     real_function_6d potn = real_factory_6d(world).f(V);\n\n\n    if (world.rank() == 0) printf(\"computing energy at time %.1f\\n\", wall_time());\n    energy(world, psi);\n\n    if (world.rank() == 0) printf(\"finished at time %.1f\\n\", wall_time());\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/heat.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n  \\file examples/heat.cc\n  \\brief Example Green function for the 3D heat equation\n  \\defgroup exampleheat Solves heat equation using the Green's function\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/heat.cc>here</a>.\n\n  \\par Points of interest\n  - use of a functor to compute the solution at an arbitrary future time\n  - convolution with the Green's function\n\n  \\par Background\n\n  Solves the 3D time-dependent heat equation\n  \\f[\n  \\frac{\\partial u}{\\partial t} = c \\nabla^2 u(r,t)\n  \\f]\n  by direct convolution with the Green's function,\n  \\f[\n  \\frac{1}{\\sqrt{4 \\pi c t}}  \\exp \\frac{-x^2}{4 c t}\n  \\f]\n\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef Tensor<double> tensorT;\n\nstatic const double L = 10;     // Half box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-6; // precision\nstatic const double c = 2.0;       //\nstatic const double tstep = 0.333;\nstatic const double alpha = 1.9; // Exponent\n\n// Initial Gaussian with exponent alpha\nstatic double uinitial(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return exp(-alpha*(x*x+y*y+z*z))*pow(constants::pi/alpha,-1.5);\n}\n\n\n// Exact solution at time t\nclass uexact : public FunctionFunctorInterface<double,3> {\n    double t;\npublic:\n    uexact(double t) : t(t) {}\n\n    double operator()(const coordT& r) const {\n        const double x=r[0], y=r[1], z=r[2];\n        double rsq = (x*x+y*y+z*z);\n\n        return exp(-rsq*alpha/(1.0+4.0*alpha*t*c)) * pow(alpha/((1+4*alpha*t*c)*constants::pi),1.5);\n    }\n};\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world, argc, argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_autorefine(false);\n    FunctionDefaults<3>::set_cubic_cell(-L, L);\n\n    functionT u0 = factoryT(world).f(uinitial);\n    u0.truncate();\n\n    double u0_norm = u0.norm2();\n    double u0_trace = u0.trace();\n\n    if (world.rank() == 0) print(\"Initial norm\", u0_norm,\"trace\", u0_trace);\n\n    world.gop.fence();\n\n\n    // du/dt = c del^2 u\n    //\n    // Time evolution operator is 1/sqrt(4 pi c t)  exp(-x^2 / 4 c t)\n\n    tensorT expnt(1), coeff(1);\n    expnt[0] = 1.0/(4.0*c*tstep);\n    coeff[0] = pow(4.0*constants::pi*c*tstep,-1.5);\n\n    double lo_dummy=1.e-4;\n    double thresh_dummy=1.e-6;\n    operatorT G(world, coeff, expnt, lo_dummy, thresh_dummy);\n\n    functionT ut = G(u0);\n\n    double ut_norm = ut.norm2();\n    double ut_trace = ut.trace();\n    double err = ut.err(uexact(tstep));\n\n    if (world.rank() == 0) print(\"Final norm\", ut_norm,\"trace\", ut_trace,\"err\",err);\n\n    finalize();\n    return 0;\n}\n\n"
  },
  {
    "path": "src/examples/heat2.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n\n/*!\n\\file heat2.cc\n\\brief Example Green function for the 3D heat equation with a linear term\n\\defgroup heatex2 Evolve in time 3D heat equation with a linear term\n\\ingroup examples\n\nThe source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/heat2.cc>here</a>.\n\n\\par Points of interest\n  - application of a function of a function to exponentiate the potential\n  - use of a functor to compute the solution at an arbitrary future time\n  - convolution with the Green's function\n\n\n\\par Background\n\nThis adds to the complexity of the other \\ref exampleheat \"heat equation example\"\nby including a linear term.  Specifically, we solve\n\\f[\n  \\frac{\\partial u(x,t)}{\\partial t} = c \\nabla^2 u(x,t) + V_p(x,t) u(x,t)\n\\f]\nIf \\f$ V_p = 0 \\f$ time evolution operator is\n\\f[\n  G_0(x,t) = \\frac{1}{\\sqrt{4 \\pi c t}} \\exp \\frac{-x^2}{4 c t}\n\\f]\nFor non-zero \\f$ V_p \\f$ the time evolution is performed using the Trotter splitting\n\\f[\n  G(x,t) = G_0(x,t/2) * \\exp(V_p t) * G_0(x,t/2) + O(t^3)\n\\f]\nIn order to form an exact solution for testing, we choose \\f$ V_p(x,t)=\\mbox{constant} \\f$\nbut the solution method is not limited to this choice.\n\n*/\n\nusing namespace madness;\n\nstatic const double L = 20;     // Half box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-6; // precision\nstatic const double c = 2.0;       //\nstatic const double tstep = 0.1;\nstatic const double alpha = 1.9; // Exponent\nstatic const double VVV = 0.2;  // Vp constant value\n\n// Initial Gaussian with exponent alpha\nstatic double uinitial(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return exp(-alpha*(x*x+y*y+z*z))*pow(constants::pi/alpha,-1.5);\n}\n\n\nstatic double Vp(const coord_3d& r) {\n    return VVV;\n}\n\n\n// Exact solution at time t\nclass uexact : public FunctionFunctorInterface<double,3> {\n    double t;\npublic:\n    uexact(double t) : t(t) {}\n\n    double operator()(const coord_3d& r) const {\n        const double x=r[0], y=r[1], z=r[2];\n        double rsq = (x*x+y*y+z*z);\n\n        return exp(VVV*t)*exp(-rsq*alpha/(1.0+4.0*alpha*t*c)) * pow(alpha/((1+4*alpha*t*c)*constants::pi),1.5);\n    }\n};\n\n\n// Functor to compute exp(f) where f is a madness function\ntemplate<typename T, int NDIM>\nstruct unaryexp {\n    void operator()(const Key<NDIM>& key, Tensor<T>& t) const {\n        UNARY_OPTIMIZED_ITERATOR(T, t, *_p0 = exp(*_p0););\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world, argc, argv);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_autorefine(false);\n    FunctionDefaults<3>::set_cubic_cell(-L, L);\n\n    real_function_3d u0 = real_factory_3d(world).f(uinitial);\n    u0.truncate();\n\n    double u0_norm = u0.norm2();\n    double u0_trace = u0.trace();\n\n    if (world.rank() == 0) print(\"Initial norm\", u0_norm,\"trace\", u0_trace);\n    world.gop.fence();\n\n    // Make exponential of Vp\n    real_function_3d expVp = real_factory_3d(world).f(Vp);\n    expVp.scale(tstep);\n    expVp.unaryop(unaryexp<double,3>());\n\n    print(\"Vp(0)\", expVp(coord_3d(0.0)));\n\n    // Make G(x,t/2)\n    real_tensor expnt(1), coeff(1);\n    expnt[0] = 1.0/(4.0*c*tstep*0.5);\n    coeff[0] = pow(4.0*constants::pi*c*tstep*0.5,-1.5);\n    real_convolution_3d G(world, coeff, expnt, 1.e-4, 1.e-4);\n\n    // Propagate forward 50 time steps\n    real_function_3d u = u0;\n    for (int step=1; step<=50; step++) {\n        u = G(u);  u.truncate();\n        u = u*expVp;\n        u = G(u); u.truncate();\n\n        double u_norm = u.norm2();\n        double u_trace = u.trace();\n        double err = u.err(uexact(tstep*step));\n\n        if (world.rank() == 0) print(\"step\", step, \"norm\", u_norm,\"trace\", u_trace,\"err\",err);\n    }\n\n    finalize();\n    return 0;\n}\n\n"
  },
  {
    "path": "src/examples/hedft.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/nonlinsol.h>\n\n\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\n#include <madness/mra/lbdeux.h>\n#include <madness/mra/qmprop.h>\n\n#include <madness/misc/misc.h>\n#include <madness/misc/ran.h>\n\n#include <madness/tensor/systolic.h>\n#include <madness/tensor/solvers.h>\n#include <madness/tensor/elem.h>\n\n\n#include<madness/chem/xcfunctional.h>\n#include<madness/chem/SCFOperators.h>\n\n#include <madness/mra/legendre.h>\n\n\nusing namespace madness;\n\n\ntypedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmapT;\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef std::vector<functionT> vecfuncT;\ntypedef std::pair<vecfuncT,vecfuncT> pairvecfuncT;\ntypedef std::vector<pairvecfuncT> subspaceT;\ntypedef Tensor<double> tensorT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef std::shared_ptr<operatorT> poperatorT;\ntypedef Function<std::complex<double>,3> complex_functionT;\ntypedef std::vector<complex_functionT> cvecfuncT;\ntypedef Convolution1D<double_complex> complex_operatorT;\n\n\n\nstatic const double length = 50.0; // box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-8; // precision\n\nstd::vector< std::shared_ptr<real_derivative_3d> > gradop;\n//XCfunctional xc;\n\n//double make_dft_energy(World & world, const vecfuncT& vf, int ispin)\n//{\n//\tfunctionT vlda = multiop_values<double, xc_functional, 3>(xc_functional(xc), vf);\n//\treturn vlda.trace();\n//}\n//\n//functionT make_dft_potential(World & world, const vecfuncT& vf, int ispin,\n//        XCfunctional::xc_contribution what)\n//{\n//\treturn multiop_values<double, xc_potential, 3>(xc_potential(xc, ispin, what), vf);\n//}\n\nstatic double guess(const coord_3d& r) {\n\tconst double x=r[0], y=r[1], z=r[2];\n\treturn (2.0*exp(-sqrt(x*x+y*y+z*z+1e-8)));\n}\n\nstatic double V(const coord_3d& r) {\n\tconst double x=r[0], y=r[1], z=r[2];\n\treturn  -2.0/sqrt(x*x+y*y+z*z+1e-8);\n}\n\n\n/*static double guess_density(const coord_3d& r) {\n\tconst double x=r[0], y=r[1], z=r[2];\n\treturn (4.0*exp(-2.0*sqrt(x*x+y*y+z*z+1e-6)))/(12.566358048);\n}\n\n//d/dx**2+d/dy**2+d/dz**2\nstatic double guess_gradient(const coord_3d& r) {\n\tconst double x=r[0], y=r[1], z=r[2];\n        double dx=(-8.0*x*exp(-2.0*sqrt(x*x+y*y+z*z+1e-6)))/(sqrt(z*z+y*y+x*x+1e-6)*12.566358048);\n        double dy=(-8.0*y*exp(-2.0*sqrt(x*x+y*y+z*z+1e-6)))/(sqrt(z*z+y*y+x*x+1e-6)*12.566358048);\n        double dz=(-8.0*z*exp(-2.0*sqrt(x*x+y*y+z*z+1e-6)))/(sqrt(z*z+y*y+x*x+1e-6)*12.566358048);\n\treturn dx*dx+dy*dy+dz*dz;\n}*/\n\n\n//template <class solverT>\ndouble iterate_ground(World& world, NonlinearSolver& solver,\n\t\treal_function_3d& V, real_function_3d& psi,\n\t\tdouble& eps) {\n\treal_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n\treal_function_3d Vpsi = (V*psi);\n\tVpsi.scale(-2.0).truncate();\n\treal_function_3d tmp = op(Vpsi).truncate();\n\tdouble norm = tmp.norm2();\n\treal_function_3d r = tmp-psi;\n\tdouble rnorm = r.norm2();\n\tdouble eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n\tif (world.rank() == 0) {\n\t\tprint(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n\t}\n\tpsi = solver.update(psi, r);\n\tpsi.scale(1.0/psi.norm2());\n\teps = eps_new;\n\treturn rnorm;\n}\n\nint main(int argc, char** argv) {\n\tinitialize(argc, argv);\n\tWorld world(SafeMPI::COMM_WORLD);\n\n\tstartup(world,argc,argv);\n\tstd::cout.precision(12);\n\n\tFunctionDefaults<3>::set_k(k);\n\tFunctionDefaults<3>::set_thresh(thresh);\n\tFunctionDefaults<3>::set_refine(true);\n\tFunctionDefaults<3>::set_initial_level(5);\n\tFunctionDefaults<3>::set_truncate_mode(1);\n\tFunctionDefaults<3>::set_cubic_cell(-length/2, length/2);\n\n\tif (world.rank() == 0) print(\"\\n  Solving for the KS aux. wave function\\n\");\n\tfunctionT Vnuc = real_factory_3d(world).f(V);\n\tfunctionT psi  = real_factory_3d(world).f(guess);\n\tpsi.truncate();\n\tpsi.scale(1.0/psi.norm2());\n\n\n\tstd::string xc_data;\n\t//xc_data=\"LDA_X 1.0 LDA_C_VWN 1.0\";\n\txc_data=\"GGA_X_PBE 1.0 GGA_C_PBE 1.0\";\n\t//xc_data=\"GGA_X_PBE 1.\";\n\t//xc_data=\"GGA_C_PBE 1.\";\n\t//xc_data=\"GGA_X_B88 1.\";\n//\txc.initialize(xc_data, false, world);\n\n        poperatorT coulop;\n        coulop = poperatorT(CoulombOperatorPtr(world, 1e-10, thresh));\n        gradop = gradient_operator<double,3>(world);\n\treal_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n\n\tdouble eps = -0.5;\n\t{\n\t    NonlinearSolver solver;\n\t    for (int iter=0; iter<20; iter++) {\n\t        functionT rho = square(psi).truncate();\n\t        //functionT rho  = real_factory_3d(world).f(guess_density);\n\t        //rho.truncate();\n\t        rho.reconstruct();\n\n//\t        vecfuncT delrho;\n//\t        vecfuncT vf(XCfunctional::number_xc_args);    // number of possible intermediates\n//\n////\t        vf.push_back(rho);\n//\t        vf[XCfunctional::enum_rhoa]=rho;\n//\n//\t        // ADD SIGMA\n//\t        functionT saa;\n//\t        if (xc.is_gga()) {\n//\t            for(int axis = 0;axis < 3;++axis){\n//\t                Derivative<double,3> D = free_space_derivative<double,3>(world, axis);\n//\t                delrho.push_back(D(rho));\n//\t            }\n//\t            saa = delrho[0]*delrho[0]+delrho[1]*delrho[1]+delrho[2]*delrho[2];\n//\t            //saa  = real_factory_3d(world).f(guess_gradient);\n//\t            //saa.truncate();\n//\t            //saa.reconstruct();\n//\n//\t            vf[XCfunctional::enum_saa]=saa;\n//\n//\t            reconstruct(world, vf);\n//\t            refine_to_common_level(world,vf); // Ugly but temporary (I hope!)\n//\t        }\n//\t        //double exc = make_dft_energy(world, vf, 0);\n//\t        //print(\"exc=\",exc );\n//\n//\t        real_function_3d vxc =  make_dft_potential(world, vf, 0, XCfunctional::potential_rho);\n//\n//\n//\t        functionT vsigaa;\n//\t        if (xc.is_gga()) {\n//\t            vsigaa = make_dft_potential(world, vf, 0, XCfunctional::potential_same_spin).truncate();\n//\n//\t            for (int axis=0; axis<3; axis++) {\n//\t                Derivative<double,3> D = free_space_derivative<double,3>(world, axis);\n//\t                real_function_3d  gradn = D(rho);\n//\t                real_function_3d  ddel = vsigaa*gradn;\n//\t                ddel.scale(2.0);\n//\n//\t                real_function_3d vxc2=D(ddel).truncate();\n//\t                vxc = vxc - vxc2;\n//\t            }\n//\t        }\n            XCOperator<double,3> xc(world,xc_data,false,rho,rho);\n            real_function_3d vxc=xc.make_xc_potential();\n\n\t        real_function_3d potential = Vnuc + 2* op(rho).truncate() +vxc.truncate();\n\n\t        //deactivate test printing for now\n\t        if(iter == 0 && false){\n\t            std::ofstream file;\n\t            std::ostringstream iter_str;\n\t            iter_str << iter;\n\n\t            file.open (\"iter\"+iter_str.str()+\".txt\");\n\t            file.precision(12);\n\t            coord_3d r(0.0);\n\t            /*double av, avrho, avpot;*/\n\t            //double dx=0.1;\n\t            //int imax=length/dx;\n\t            int imax=1024;\n\t            for (int i=0; i<=imax; i++) {\n\t                r[0] = -length/2. + length*i/imax;\n\t                /*av=0.0;avrho=0.0;avpot=0.0;\n\t\t\t      for (int j=0; j<=imax; j++) {\n\t\t\t         r[1] = -L/2. + L*j/imax;\n\t\t\t         for (int k=0; k<=imax; k++) {\n\t\t\t            r[0] = -L/2. + L*k/imax;\n\n\t\t\t            //print(r[2], vf[1](r));\n\t\t\t            //print(r[2], vsigaa(r));\n\t\t\t            //print(r[0], vxc(r)*r[0]);\n\t\t\t            //print(r[0], vxc(r)*r[0], r[2], vf[1](r), r[2], vsigaa(r));\n\t\t\t            //if (xc.is_gga())\n\t\t\t            //   {file << r[0] << \"\\t\" << vxc(r)*r[0] << \"\\t\" << r[2] << \"\\t\" << vf[1](r) << \"\\t\" << r[2] << \"\\t\" << vsigaa(r) << \"\\n\";}\n\t\t\t            //else\n\t\t\t            //{file << r[0] << \"\\t\" << r[1] << \"\\t\" << r[2] << \"\\t\" << vxc(r) << \"\\t\" << vxc(r)*r[0] << \"\\t\" << vxc(r)*r[1] << \"\\t\" << vxc(r)*r[2] << \"\\n\" ;}\n\n\t\t\t            av+=vxc(r);\n\t\t\t            avrho+=rho(r);\n\t\t\t            avpot+=potential(r);\n\t\t\t         }\n\t\t\t      }*/\n\t                r[2]=0.01;r[1]=0.01;\n\t                /*file << r[2] << \"\\t\" << vxc(r) << \"\\t\" << vxc_trunc(r) << \"\\t\" << av/((imax+1)*(imax+1)) << \"\\t\";\n                              file << potential(r) << \"\\t\" << avpot/((imax+1)*(imax+1)) << \"\\t\" << Vnuc(r) << \"\\t\"  << rho(r) << \"\\t\" << avrho/((imax+1)*(imax+1));\n                              file << \"\\t\" << psi(r) << \"\\n\" ;*/\n\n\t                //functionT rho_nt = square(psi);\n\t                //functionT rho_rec = square(psi).truncate();\n\t                //rho_rec.reconstruct();\n\t                functionT rho_nt = real_factory_3d(world);\n\t                functionT rho_rec = real_factory_3d(world);\n\n\t                file << r[0] << \"\\t\" << vxc(r) << \"\\t\" << potential(r) << \"\\t\" << Vnuc(r) << \"\\t\";\n\t                file << rho(r) << \"\\t\" << rho_nt(r) << \"\\t\"  << rho_rec(r) << \"\\t\" << psi(r);\n\n\t                file << \"\\n\";\n\t            }\n\t            file.close();\n\n\t            ///////////////////////////////////////////////////////////\n\t            /*{\n                              int npt_plot=101;\n                              tensorT plot_cell;\n                              //plot_cell = tensorT(3L,2L);\n                              std::vector<long> npt(3,npt_plot);\n\n                              if (plot_cell.size() == 0)\n                                  plot_cell = copy(FunctionDefaults<3>::get_cell());\n\n                                  plotdx(rho, \"density.dx\", plot_cell, npt, true);\n                                  plotdx(Vnuc, \"vnuc.dx\", plot_cell, npt, true);\n\n                           }*/\n\t            ///////////////////////////////////////////////////////////\n\n\t        }\n\n\t        double err  = iterate_ground(world, solver, potential, psi, eps);\n\n\t        if (err < thresh) break;\n\t    }\n\t}\n\tdouble kinetic_energy = 0.0;\n\tfor (int axis=0; axis<3; axis++) {\n\t    real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n\t    real_function_3d dpsi = D(psi);\n\t    kinetic_energy += inner(dpsi,dpsi);\n\t}\n\n\treal_function_3d rho = square(psi);\n\tdouble two_electron_energy = 2*inner(op(rho),rho); // <u|rho> = <phi phi | 1/r12 | phi phi>\n\trho.reconstruct();\n//\tvecfuncT vf(13);\n//\tvf.push_back(rho);\n//    vf[XCfunctional::enum_rhoa]=rho;\n\n//\tvecfuncT delrho;\n    XCOperator<double,3> xc(world,xc_data,false,rho,rho);\n    real_function_3d vxc=xc.make_xc_potential();\n\n//\tif (xc.is_gga()) {\n//\t    for(int axis = 0;axis < 3;++axis){\n//\t        Derivative<double,3> D = free_space_derivative<double,3>(world, axis);\n//\t        delrho.push_back(D(rho));\n//\t    }\n//\t    functionT saa = delrho[0]*delrho[0]+delrho[1]*delrho[1]+delrho[2]*delrho[2];\n////\t    vf.push_back(saa); // sigma_aa\n//\t    vf[XCfunctional::enum_saa]=saa;\n//\n//\t    reconstruct(world, vf);\n//\t    refine_to_common_level(world,vf); // Ugly but temporary (I hope!)\n//\t}\n//    double exc=make_dft_energy(world, vf, 0); // Exc\n\tdouble exc=xc.compute_xc_energy(); // Exc\n\tdouble nuclear_attraction_energy = 2.0*inner(Vnuc,rho); // <V|rho> = <phi|V|phi>\n\tdouble total_energy = kinetic_energy + two_electron_energy +\n\t\tnuclear_attraction_energy + exc;\n\tdouble virial = (nuclear_attraction_energy + two_electron_energy ) / kinetic_energy;\n\n\tif (world.rank() == 0) {\n\t\tprint(\"\");\n\t\tprint(\"            Kinetic energy \", kinetic_energy);\n\t\tprint(\" Nuclear attraction energy \", nuclear_attraction_energy);\n\t\tprint(\"       Two-electron energy \", two_electron_energy);\n\t\tprint(\"                 XC energy \", exc);\n\t\tprint(\"              Total energy \", total_energy);\n\t\tprint(\"                    Virial \", virial);\n\t}\n\n\n\n        //print out scaling functions\n        /*{\n        std::ofstream file;\n \tfile.open (\"scalingc.txt\");\n\tfile.precision(12);\n        double phi[k];\n        double dx=0.01;\n        int l=1;\n        int imax=2*l/dx;\n        double x=-l;\n        for (int n=0;n<=64;n++) {\n        x=-1;\n        for (int i=0; i<=imax; i++) {\n          legendre_polynomials(x,k,phi);\n          file << x+n*2*l;\n          for (int j=0;j<k;j++) {\n            file << \"\\t\" << phi[j];\n          }\n          file << \"\\n\";\n          x+=dx;\n        }\n        }\n        file.close();\n        }*/\n\n\tworld.gop.fence();\n\tfinalize();\n\treturn 0;\n}\n\n\n\n"
  },
  {
    "path": "src/examples/hefxc.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/nonlinsol.h>\n\n\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\n#include <madness/mra/lbdeux.h>\n#include <madness/mra/qmprop.h>\n\n#include <madness/misc/misc.h>\n#include <madness/misc/ran.h>\n\n#include <madness/tensor/systolic.h>\n#include <madness/tensor/elem.h>\n\n\n#include<madness/chem/xcfunctional.h>\n#include<madness/chem/SCFOperators.h>\n\n#include <madness/mra/legendre.h>\n\n\nusing namespace madness;\n\n\ntypedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmapT;\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef std::vector<functionT> vecfuncT;\ntypedef std::pair<vecfuncT,vecfuncT> pairvecfuncT;\ntypedef std::vector<pairvecfuncT> subspaceT;\ntypedef Tensor<double> tensorT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef std::shared_ptr<operatorT> poperatorT;\ntypedef Function<std::complex<double>,3> complex_functionT;\ntypedef std::vector<complex_functionT> cvecfuncT;\ntypedef Convolution1D<double_complex> complex_operatorT;\n\n\n\nstatic const double Length = 50.0; // box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-6; // precision\n\nstd::vector< std::shared_ptr<real_derivative_3d> > gradop;\n\n//double make_dft_energy(World & world, const vecfuncT& vf, int ispin)\n//{\n//\tfunctionT vlda = multiop_values<double, xc_functional, 3>(xc_functional(xc), vf);\n//\treturn vlda.trace();\n//}\n//\n//functionT make_dft_potential(World & world, const vecfuncT& vf, int ispin,\n//        XCfunctional::xc_contribution what)\n//{\n//\treturn multiop_values<double, xc_potential, 3>(xc_potential(xc, ispin, what), vf);\n//}\n//\n//functionT make_dft_kernel(World & world, const vecfuncT& vf, int ispin,\n//        int what)\n//{\n//    // xc_kernel has been disables and replaced by xc_kernel_apply, because\n//    // it's more stable for GGA's\n////        return multiop_values<double, xc_kernel, 3>(xc_kernel(xc, ispin, what), vf);\n//}\n\n\nstatic double guess(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return (2.0*exp(-sqrt(x*x+y*y+z*z+1e-8)));\n}\n\n// static double V(const coord_3d& r) {\n//     const double x=r[0], y=r[1], z=r[2];\n//     return  -2.0/sqrt(x*x+y*y+z*z+1e-8);\n// }\n\n\n// static double guess_density(const coord_3d& r) {\n//     const double x=r[0], y=r[1], z=r[2];\n//     return (4.0*exp(-2.0*sqrt(x*x+y*y+z*z+1e-6)))/(12.566358048);\n// }\n\n\n// //d/dx**2+d/dy**2+d/dz**2\n// static double guess_gradient(const coord_3d& r) {\n//     const double x=r[0], y=r[1], z=r[2];\n//     double dx=(-8.0*x*exp(-2.0*sqrt(x*x+y*y+z*z+1e-6)))/(sqrt(z*z+y*y+x*x+1e-6)*12.566358048);\n//     double dy=(-8.0*y*exp(-2.0*sqrt(x*x+y*y+z*z+1e-6)))/(sqrt(z*z+y*y+x*x+1e-6)*12.566358048);\n//     double dz=(-8.0*z*exp(-2.0*sqrt(x*x+y*y+z*z+1e-6)))/(sqrt(z*z+y*y+x*x+1e-6)*12.566358048);\n//     return dx*dx+dy*dy+dz*dz;\n// }\n\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n    std::cout.precision(12);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_initial_level(5);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_cubic_cell(-Length/2, Length/2);\n\n    if (world.rank() == 0) print(\"\\n  Solving for the KS aux. wave function\\n\");\n    functionT psi  = real_factory_3d(world).f(guess);\n    psi.truncate();\n    psi.scale(1.0/psi.norm2());\n\n\n    std::string xc_data;\n    //xc_data=\"GGA_X_PBE 1.0 RHOTOL 1e-7 RHOMIN 0.0 SIGTOL 0.0 SIGMIN 0.0\";\n\n    //xc_data=\"GGA_X_PBE 1.0 RHOTOL 1e-7 RHOMIN 0.0 SIGTOL 1.e-10 SIGMIN 1.e-10\";\n    //xc_data=\"GGA_X_PBE 1.0 RHOTOL 1e-7 RHOMIN 0.0 SIGTOL 1.e-10 SIGMIN 1.e-10\";\n\n    //\txc_data=\"GGA_X_B88 1.0 RHOTOL 1e-5 RHOMIN 1e-4 SIGTOL 1e-3 SIGMIN 1e-5\";\n    //xc_data=\"GGA_X_B88 1.0 RHOTOL 1e-7 RHOMIN 0.0 SIGTOL 0.0 SIGMIN 0.0\";\n    //robert suggestions\n    //xc_data=\"LDA_X 1.0 LDA_C_VWN 1.0\";\n    //xc_data=\"GGA_C_LYP 1.0 GGA_X_B88 1.0 RHOTOL 1e-7 RHOMIN 0.0 SIGTOL 0.0 SIGMIN 0.0\";\n    //xc_data=\"GGA_X_PBE 1.0 GGA_C_PBE 1.0 RHOTOL 0.0 RHOMIN 0.0 SIGTOL 1e-8 SIGMIN 1e-8\";\n    //xc_data=\"GGA_X_B88 1.0 RHOTOL 1e-7 RHOMIN 0.0 SIGTOL 0.0 SIGMIN 0.0\";\n    xc_data=\"GGA_C_LYP 1.0 GGA_X_B88 1.0 RHOTOL 1e-7 RHOMIN 0.0 SIGTOL 1e-10 SIGMIN 1e-10\";\n    //xc_data=\"GGA_X_PBE 1.\";\n    //xc_data=\"GGA_C_PBE 1.\";\n    //xc_data=\"GGA_X_B88 1.\";\n    //\txc.initialize(xc_data, false, world);\n    XCOperator<double,3> xc(world,xc_data,false,psi,psi);\n\n    gradop = gradient_operator<double,3>(world);\n\n    {\n        functionT rho = square(psi).truncate();\n        rho.reconstruct();\n\n        vecfuncT delrho;\n        vecfuncT vf;\n\n        vf.push_back(rho);\n\n        // ADD SIGMA\n//        functionT saa;\n//        if (xc.xc->is_gga()) {\n//            for(int axis = 0;axis < 3;++axis){\n//                Derivative<double,3> D = free_space_derivative<double,3>(world, axis);\n//                delrho.push_back(D(rho));\n//            }\n//            saa = delrho[0]*delrho[0]+delrho[1]*delrho[1]+delrho[2]*delrho[2];\n//\n//            vf.push_back(saa); // sigma_aa\n//            if (vf.size()) {\n//                reconstruct(world, vf);\n//                //                       rho.refine_to_common_level(vf); // Ugly but temporary (I hope!)\n//                refine_to_common_level(world,vf); // Ugly but temporary (I hope!)\n//            }\n//        }\n//        double exc = make_dft_energy(world, vf, 0);\n        double exc = xc.compute_xc_energy();\n        print(\"exc=\",exc );\n\n//        real_function_3d  vxco = make_dft_potential(world, vf, 0, XCfunctional::potential_rho); //.truncate();\n//#if 1\n//        if (xc.is_gga() ) {\n//            // get Vsigma_aa (if it is the case and Vsigma_bb)\n//            functionT vsigaa = make_dft_potential(world, vf, 0, XCfunctional::potential_same_spin); //.truncate();\n//\n//            for (int axis=0; axis<3; axis++) {\n//                functionT gradn = delrho[axis];\n//                functionT ddel = vsigaa*gradn;\n//                ddel.scale(4.0);\n//                Derivative<double,3> D = free_space_derivative<double,3>(world, axis);\n//                functionT vxc2=D(ddel);\n//                vxco = vxco - vxc2;//.truncate();\n//            }\n//        } //is gga\n//#endif\n\n        real_function_3d vxco=xc.make_xc_potential();\n//        real_function_3d vxc = real_factory_3d(world);\n//        vxc.scale(0.0);\n//\n//\n//        real_function_3d d1 = make_dft_kernel(world, vf, 0, 0); //.truncate();\n//        d1.scale(constants::pi);\n//        functionT vxc0 =  d1*rho;\n//        vxc0.scale(2.);\n//        vxc = vxc + vxc0;\n//\n//\n//#if 1\n//        if (xc.is_gga() ) {\n//            // get Vsigma_aa (if it is the case and Vsigma_bb)\n//            functionT d2 = make_dft_kernel(world, vf, 0, 1);\n//            d2.scale(constants::pi);\n//            //\n//            functionT vxc1 = d2 * saa ;//  d2e/drds *s\n//            vxc1.scale(1.*1.*4.);\n//            vxc = vxc + vxc1;\n//            //\n//            functionT d3 = make_dft_kernel(world, vf, 0, 2);\n//            d3.scale(constants::pi);\n//            //\n//            functionT d4 = make_dft_potential(world, vf, 0, XCfunctional::potential_same_spin);\n//            d4.scale(constants::pi);\n//            d4.scale(1.*2);\n//            //\n//            //\n//            functionT fxct4 = d2 * rho;\n//            fxct4.scale(1.*1.*2); //2 because rho\n//            functionT fxct5 = d3 * saa ;\n//            fxct5.scale(1.*1.*4); //4 cause saa\n//            functionT fxct6 = fxct5 + fxct4;\n//\n//            for (int axis=0; axis<3; axis++) {\n//                functionT gradn = delrho[axis ];\n//\n//                functionT ddel = (fxct6 + d4) * gradn;\n//                ddel.scale(1.*1.*2);\n//\n//                Derivative<double,3> D = free_space_derivative<double,3>(world, axis);\n//                functionT fxc2=D(ddel);\n//                vxc = vxc + fxc2 ;//.truncate();\n//                //\n//            }\n//        } //isgga\n//\n//        //  vxc.scale(4);\n//#endif\n        real_function_3d vxc=xc.apply_xc_kernel(rho);\n\n        std::ofstream file;\n        file.open (\"fxc.txt\");\n        file.precision(12);\n#if 0\n        std::ofstream fd1;\n        fd1.open (\"fd1.txt\");\n        fd1.precision(12);\n        std::ofstream fd2;\n        fd2.open (\"fd2.txt\");\n        fd2.precision(12);\n        std::ofstream fd3;\n        fd3.open (\"fd3.txt\");\n        fd3.precision(12);\n        std::ofstream fd4;\n        fd4.open (\"fd4.txt\");\n        fd4.precision(12);\n#endif\n        coord_3d r(0.0);\n        /*double av, avrho, avpot;*/\n        //double dx=0.1;\n        //int imax=Length/dx;\n        int imax=1024;\n        for (int i=0; i<=imax; i++) {\n            r[0] = -Length/2. + Length*i/imax;\n            /*av=0.0;avrho=0.0;avpot=0.0;\n\t        for (int j=0; j<=imax; j++) {\n\t           r[1] = -L/2. + L*j/imax;\n\t           for (int k=0; k<=imax; k++) {\n\t              r[0] = -L/2. + L*k/imax;\n\n\t              //print(r[2], vf[1](r));\n\t              //print(r[2], vsigaa(r));\n\t              //print(r[0], vxc(r)*r[0]);\n\t              //print(r[0], vxc(r)*r[0], r[2], vf[1](r), r[2], vsigaa(r));\n\t              //if (xc.is_gga())\n\t              //   {file << r[0] << \"\\t\" << vxc(r)*r[0] << \"\\t\" << r[2] << \"\\t\" << vf[1](r) << \"\\t\" << r[2] << \"\\t\" << vsigaa(r) << \"\\n\";}\n\t              //else\n\t              //{file << r[0] << \"\\t\" << r[1] << \"\\t\" << r[2] << \"\\t\" << vxc(r) << \"\\t\" << vxc(r)*r[0] << \"\\t\" << vxc(r)*r[1] << \"\\t\" << vxc(r)*r[2] << \"\\n\" ;}\n\n\t              av+=vxc(r);\n\t              avrho+=rho(r);\n\t              avpot+=potential(r);\n\t           }\n\t        }*/\n            r[2]=0.01;r[1]=0.01;\n            /*file << r[2] << \"\\t\" << vxc(r) << \"\\t\" << vxc_trunc(r) << \"\\t\" << av/((imax+1)*(imax+1)) << \"\\t\";\n                   file << potential(r) << \"\\t\" << avpot/((imax+1)*(imax+1)) << \"\\t\" << Vnuc(r) << \"\\t\"  << rho(r) << \"\\t\" << avrho/((imax+1)*(imax+1));\n                   file << \"\\t\" << psi(r) << \"\\n\" ;*/\n\n            //functionT rho_nt = square(psi);\n            //functionT rho_rec = square(psi).truncate();\n            //rho_rec.reconstruct();\n\n            file << r[0] << \"\\t\" << vxc(r) << \"\\t\"<< \"\\t\" << vxco(r) << \"\\t\";\n            //file << rho(r) ;\n            //    fd1 << r[0] << \"\\t\" << d1(r) << \"\\n\" ;\n            //    fd2 << r[0] << \"\\t\" << d2(r) << \"\\n\" ;\n            //    fd3 << r[0] << \"\\t\" << d3(r) << \"\\n\" ;\n            //    fd4 << r[0] << \"\\t\" << d4(r) << \"\\n\" ;\n            /*\n                   file << r[0] << \"\\t\" << vxc(r) << \"\\t\" << potential(r) << \"\\t\" << Vnuc(r) << \"\\t\";\n                   file << rho(r) << \"\\t\" << rho_nt(r) << \"\\t\"  << rho_rec(r) << \"\\t\" << psi(r);\n\n             */\n\n            file << \"\\n\";\n        }\n        file.close();\n#if 0\n        fd1.close();\n        fd2.close();\n        fd3.close();\n        fd4.close();\n#endif\n\n        ///////////////////////////////////////////////////////////\n        /*{\n                   int npt_plot=101;\n                   tensorT plot_cell;\n                   //plot_cell = tensorT(3L,2L);\n                   std::vector<long> npt(3,npt_plot);\n\n                   if (plot_cell.size() == 0)\n                       plot_cell = copy(FunctionDefaults<3>::get_cell());\n\n                       plotdx(rho, \"density.dx\", plot_cell, npt, true);\n                       plotdx(Vnuc, \"vnuc.dx\", plot_cell, npt, true);\n\n                }*/\n        ///////////////////////////////////////////////////////////\n\n\n\n    }\n\n\n\n    world.gop.fence();\n    finalize();\n    return 0;\n}\n\n\n\n"
  },
  {
    "path": "src/examples/hehf.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file hehf.cc\n  \\brief Solves the Hartree-Fock equations for the helium atom\n  \\defgroup examplehehf Hartree-Fock equations for the helium atom\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/hehf.cc>here</a>.\n\n  \\par Points of interest\n  - application of the Coulomb and Helmholtz Green's functions\n  - smoothing of the potential and initial guess\n  - manual evaluation of the solution along a line\n\n  \\par Background\n\n  The Hartree-Fock wave function is computed for the helium atom\n  in three dimensions without using spherical symmetry.\n\n  The atomic orbital is an eigenfunction of the Fock operator\n  \\f{eqnarray*}{\n     \\hat{F} \\phi(r) &=& \\epsilon \\phi(r) \\\\\n     \\hat{F} &=& -\\frac{1}{2} \\nabla^2 - \\frac{2}{r} + u(r) \\\\\n     u(r) &=& \\int \\frac{\\rho(s)}{| r - s |} d^3s \\\\\n     \\rho(r) &=& \\phi(r)^2\n  \\f}\n  that depends upon the orbital via the Coulomb potential (\\f$ u(r) \\f$)\n  arising from the electronic density (\\f$ \\rho(r) \\f$).\n\n  \\par Implementation\n\n  Per the usual MADNESS practice, the equation is rearranged into\n  integral form\n  \\f[\n      \\phi = - 2 G_{\\mu} * ( V \\phi)\n  \\f]\n  where \\f$ \\mu = \\sqrt{-2E} \\f$ and \\f$G_{\\mu}\\f$ is the Green's function\n  for the Helmholtz equation\n  \\f[\n      \\left( - \\nabla^2 + \\mu^2  \\right) G(r,r^{\\prime}) = \\delta(r,r^{\\prime})\n  \\f]\n\n  The initial guess is \\f$ \\exp(-2r) \\f$, which is normalized before use.\n  Each iteration proceeds by\n  - computing the density by squaring the orbital,\n  - computing the Coulomb potential by applying the Coulomb Green's function,\n  - multiplying the orbital by the total potential,\n  - updating the orbital by applying the Helmholtz Green's function,\n  - updating the energy according to a second-order accurate estimate\n    (see the initial MRQC paper), and finally\n  - normalizing the new wave function.\n\n  The kinetic energy operator is denoted by \\f$T~=~-\\frac{1}{2}\n  \\nabla^2 \\f$.  Thus, one would expect to compute the kinetic energy\n  with respect to a wave function \\f$ \\phi \\f$ by \\f$ <T \\phi, \\phi >\n  \\f$.  In this particular example, the wave functions goes to zero\n  smoothly before the boundary so we apply the product rule for differentiation\n  and the kinetic energy is equal to \\f$ < \\nabla \\phi, \\nabla \\phi >\n  \\f$.\n\n\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\nusing namespace madness;\n\nstatic const double L = 32.0;   // box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-6; // precision\n\nstatic double guess(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return 6.0*exp(-2.0*sqrt(x*x+y*y+z*z+1e-4));\n}\n\nstatic double V(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return -2.0/(sqrt(x*x+y*y+z*z+1e-8));\n}\n\nvoid iterate(World& world, real_function_3d& V, real_function_3d& psi, double& eps) {\n    real_function_3d Vpsi = (V*psi);\n    Vpsi.scale(-2.0).truncate();\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n    real_function_3d tmp = apply(op,Vpsi).truncate();\n    double norm = tmp.norm2();\n    real_function_3d r = tmp-psi;\n    double rnorm = r.norm2();\n    double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n    if (world.rank() == 0) {\n        print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n    }\n    psi = tmp.scale(1.0/norm);\n    eps = eps_new;\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n\n    real_function_3d Vnuc = real_factory_3d(world).f(V).truncate_mode(0);\n    real_function_3d psi  = real_factory_3d(world).f(guess);\n    psi.scale(1.0/psi.norm2());\n    real_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n\n    double eps = -1.0;\n    for (int iter=0; iter<10; iter++) {\n        real_function_3d rho = square(psi).truncate();\n        real_function_3d potential = Vnuc + apply(op,rho).truncate();\n        iterate(world, potential, psi, eps);\n    }\n\n    double kinetic_energy = 0.0;\n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n        real_function_3d dpsi = D(psi);\n        kinetic_energy += inner(dpsi,dpsi);\n    }\n\n    real_function_3d rho = square(psi).truncate();\n    double two_electron_energy = inner(apply(op,rho),rho);\n    double nuclear_attraction_energy = 2.0*inner(Vnuc*psi,psi);\n    double total_energy = kinetic_energy + nuclear_attraction_energy + two_electron_energy;\n\n    // Manually tabluate the orbital along a line ... probably easier\n    // to use the lineplot routine\n    coord_3d r(0.0);\n    psi.reconstruct();\n    for (int i=0; i<201; i++) {\n        r[2] = -L/2 + L*i/200.0;\n        print(r[2], psi(r));\n    }\n\n    if (world.rank() == 0) {\n        print(\"            Kinetic energy \", kinetic_energy);\n        print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n        print(\"       Two-electron energy \", two_electron_energy);\n        print(\"              Total energy \", total_energy);\n        print(\"                    Virial \", (nuclear_attraction_energy + two_electron_energy) / kinetic_energy);\n    }\n\n    world.gop.fence();\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/helium_exact.cc",
    "content": "/*\n This file is part of MADNESS.\n\n Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n For more information please contact:\n\n Robert J. Harrison\n Oak Ridge National Laboratory\n One Bethel Valley Road\n P.O. Box 2008, MS-6367\n\n email: harrisonrj@ornl.gov\n tel:   865-241-3937\n fax:   865-572-0680\n\n $Id$\n */\n/*!\n \\file helium_exact.cc\n \\brief Solves the two-particle system exactly\n \\defgroup helium_exact Solves the two-particle system exactly\n \\ingroup examples\n\n\n */\n\n#include <madness/misc/info.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/funcplot.h>\n#include <madness/mra/lbdeux.h>\n\n#include <iostream>\n\n#include<madness/chem/SCF.h>\n#include<madness/chem/nemo.h>\n#include<madness/chem/correlationfactor.h>\n#include<madness/chem/electronic_correlation_factor.h>\n#include\"madness/mra/commandlineparser.h\"\n\n\n// switch the electronic interaction on or off\n#undef WITH_G12\n#define WITH_G12\n\nstatic double lo = 1.e-8;\nstatic double bsh_eps = 1.e-8;\n\nusing namespace madness;\n\ntypedef std::shared_ptr<NuclearCorrelationFactor> ncf_ptr;\n\n// apply the mixed double commutator\nreal_function_6d apply_U_mix(World& world, const real_function_6d& psi,\n\t\tconst CorrelationFactor2& ecf, const ncf_ptr& ncf) {\n\n\treal_function_6d v = real_factory_6d(world);\n\n\t// for screening when the multiplication is performed\n\tconst double eps = -2.9;\n\treal_convolution_6d op_mod = BSHOperator<6>(world, sqrt(-2 * eps), lo,\n\t\t\tbsh_eps);\n\top_mod.modified() = true;\n\n\t// the part with the derivative operators: U1\n\tfor (int axis = 0; axis < 3; ++axis) {\n\t\tif (world.rank() == 0)\n\t\t\tprint(\"Umix working on axis: \", axis);\n\n\t\t// particles 1 and 2\n\t\t// note ncf->U1 returns -S'/S  => swap signs\n\t\tconst real_function_3d U1_axis_ncf1 = copy(ncf->U1(axis)).scale(-1.0);\n\t\tconst real_function_3d U1_axis_ncf2 = copy((ncf->U1(axis)));\n\n\t\t// is \\vec r12/r12\n\t\treal_function_6d U1_axis_ecf = ecf.U1(axis);\n\n\t\treal_function_6d x = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.g12(U1_axis_ecf).ket(copy(psi));\n\t\tx.fill_tree(op_mod);\n\n\t\treal_function_6d x2 = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t\t.V_for_particle1(U1_axis_ncf1).V_for_particle2(U1_axis_ncf2)\n\t\t\t\t\t.ket(x);\n\t\tx2.fill_tree(op_mod);\n\n\t\tv += x2;\n\t\tv.truncate();\n\t}\n\treturn v;\n}\n\n// apply the U1 potential of the nuclear correlation factor\nreal_function_6d apply_U_ncf(World& world, const real_function_6d& psi,\n\t\tconst ncf_ptr& ncf) {\n\n\treal_function_6d result = real_factory_6d(world);\n\n\t// for screening when the multiplication is performed\n\tconst double eps = -2.9;\n\treal_convolution_6d op_mod = BSHOperator<6>(world, sqrt(-2 * eps), lo,\n\t\t\tbsh_eps);\n\top_mod.modified() = true;\n\n\t// the part with the derivative operators: U1\n\tfor (int axis = 0; axis < 6; ++axis) {\n\t\treal_derivative_6d D = free_space_derivative<double, 6>(world, axis);\n\t\tconst real_function_6d Drhs = D(psi).truncate();\n\n\t\t// note integer arithmetic\n\t\tif (world.rank() == 0)\n\t\t\tprint(\"axis, axis^%3, axis/3+1\", axis, axis % 3, axis / 3 + 1);\n\t\tconst real_function_3d U1_axis = ncf->U1(axis % 3);\n\n\t\treal_function_6d x;\n\t\tif (axis / 3 + 1 == 1) {\n\t\t\tx = CompositeFactory<double, 6, 3>(world).ket(Drhs).V_for_particle1(\n\t\t\t\t\tcopy(U1_axis));\n\t\t} else if (axis / 3 + 1 == 2) {\n\t\t\tx = CompositeFactory<double, 6, 3>(world).ket(Drhs).V_for_particle2(\n\t\t\t\t\tcopy(U1_axis));\n\t\t}\n\t\tx.fill_tree(op_mod);\n\t\tresult += x;\n\t\tresult.truncate().reduce_rank();\n\t}\n\n\treal_function_3d U2 = ncf->U2();\n\treal_function_6d r2 =\n\t\t\tCompositeFactory<double, 6, 3>(world).ket(copy(psi)).V_for_particle1(\n\t\t\t\t\tcopy(U2)).V_for_particle2(copy(U2));\n\tr2.fill_tree(op_mod);\n\tresult = (result + r2).truncate();\n\n\treturn result;\n}\n\n\n// apply the U1 potential of the nuclear correlation factor\nreal_function_6d apply_V(World& world, const real_function_6d& psi, const SCF& calc) {\n\n\treal_function_3d vnuc=copy(calc.potentialmanager->vnuclear());\n\t// for screening when the multiplication is performed\n\tconst double eps = -0.5;\n\treal_convolution_6d op_mod = BSHOperator<6>(world, sqrt(-2 * eps), lo,\n\t\t\tbsh_eps);\n\top_mod.modified() = true;\n\n\treal_function_6d r2 =\n\t\t\tCompositeFactory<double, 6, 3>(world).ket(copy(psi)).V_for_particle1(\n\t\t\t\t\tcopy(vnuc)).V_for_particle2(copy(vnuc));\n\tr2.fill_tree(op_mod);\n\n\treturn r2;\n}\n\n\n// apply the U1 potential of the electronic correlation factor\nreal_function_6d apply_U_ecf(World& world, const real_function_6d& psi,\n\t\tconst CorrelationFactor2& ecf) {\n\n\tconst double eps = -2.9;\n\treturn ecf.apply_U(psi, eps);\n}\n\n/// reconstruct the full wave function\n\n/// Psi from the regularized wave function and the correlation factors\nreal_function_6d reconstruct_psi(World& world, const real_function_6d& psi,\n\t\tconst CorrelationFactor2& ecf, const ncf_ptr& ncf) {\n\tconst double eps = -2.9;\n\treal_convolution_6d op_mod = BSHOperator<6>(world,sqrt(-2*eps),lo,bsh_eps);\n\top_mod.modified() = true;\n\n\t// reconstruct the full wave function\n\treal_function_6d R1psi=CompositeFactory<double, 6, 3>(world)\n\t\t\t\t\t\t\t.V_for_particle1(copy(ncf->function()))\n\t\t\t\t\t\t\t.ket(copy(psi));\n\tR1psi.fill_tree(op_mod);\n\n\treal_function_6d R12psi=CompositeFactory<double, 6, 3>(world)\n\t\t\t\t\t\t\t.V_for_particle2(copy(ncf->function()))\n\t\t\t\t\t\t\t.ket(copy(R1psi));\n\tR12psi.fill_tree(op_mod);\n\n\n#ifdef WITH_G12\n\treal_function_6d Rfpsi = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.g12(ecf.function()).ket(copy(R12psi));\n\tRfpsi.fill_tree(op_mod);\n#else\n\treal_function_6d Rfpsi=copy(R12psi);\n#endif\n\n\tdouble Rfnorm=inner(Rfpsi,Rfpsi);\n\tif (world.rank()==0) print(\"< Rf psi | Rf psi> \",Rfnorm);\n\treturn Rfpsi;\n}\n\n\n/// compute R_12^2f_12^2|psi>\nreal_function_6d compute_R2f2_psi(World& world, const real_function_6d& psi,\n\t\tconst CorrelationFactor2& ecf, const ncf_ptr& ncf) {\n\tconst double eps = -2.9;\n\treal_convolution_6d op_mod = BSHOperator<6>(world,sqrt(-2*eps),lo,bsh_eps);\n\top_mod.modified() = true;\n\n\t// reconstruct the full wave function\n\treal_function_6d R1psi=CompositeFactory<double, 6, 3>(world)\n\t\t\t\t\t\t\t.V_for_particle1(copy(ncf->square()))\n\t\t\t\t\t\t\t.ket(copy(psi));\n\tR1psi.fill_tree(op_mod);\n\n\treal_function_6d Rsq_psi=CompositeFactory<double, 6, 3>(world)\n\t\t\t\t\t\t\t.V_for_particle2(copy(ncf->square()))\n\t\t\t\t\t\t\t.ket(copy(R1psi));\n\tRsq_psi.fill_tree(op_mod);\n\n\n#ifdef WITH_G12\n\treal_function_6d R2f2psi = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.g12(ecf.square()).ket(copy(Rsq_psi));\n\tR2f2psi.fill_tree(op_mod);\n#else\n\treal_function_6d R2f2psi=copy(Rsq_psi);\n#endif\n\n\tdouble Rfnorm=inner(R2f2psi,psi);\n\tif (world.rank()==0) print(\"< R2f2 psi | psi> \",Rfnorm);\n\treturn R2f2psi;\n}\n\n/// compute the energy using the regularization\n\n/// @return the energy expectation value <E> = < psi | R2f2 (T+U) | psi >\ndouble compute_energy_with_U(World& world, const real_function_6d& psi,\n\t\tconst CorrelationFactor2& ecf, const ncf_ptr& ncf, const real_function_6d& twoVpsi) {\n\n\t// this is the bra function <psi | R^2 f^2\n\treal_function_6d R2f2psi=compute_R2f2_psi(world,psi,ecf,ncf);\n\n\t// the norm of the real wave function (=denominator in the energy expression)\n\tconst double norm=inner(R2f2psi,psi);\n\n\t// the pseudo-kinetic energy\n\tdouble ke=0;\n\tfor (int i=0; i<6; ++i) {\n\t\treal_derivative_6d D = free_space_derivative<double, 6>(world, i);\n\t\tconst real_function_6d Drhs = D(psi).truncate();\n\t\tconst real_function_6d Dlhs = D(R2f2psi).truncate();\n\t\tconst double ke_axis=inner(Dlhs,Drhs);\n\t\tke+=0.5*ke_axis/norm;\n\t\tif (world.rank()==0) print(\"<psi | R2f2 T(i)  | psi>/<Psi | Psi> \",0.5*ke_axis);\n\t}\n\tif (world.rank()==0) print(\"<psi | R2f2 T | psi>/<Psi | Psi> \",ke);\n\n\t// the pseudo-potential energy (note factor -2 on Vpsi!)\n\tconst double pe=-0.5*inner(R2f2psi,twoVpsi)/norm;\n\tif (world.rank()==0) print(\"<psi | R2f2 U | psi>/<Psi | Psi> \",pe);\n\n\tconst double energy=ke+pe;\n\tif (world.rank()==0) print(\"<psi | R2f2 (T+U) | psi>/<Psi | Psi> \",energy);\n\treturn energy;\n}\n\n/// compute the energy using the reconstructed wave function\n\n/// @return the energy expectation value <E> = < Psi | H | Psi >\ndouble compute_energy(World& world, const real_function_6d& psi,\n\t\tconst CorrelationFactor2& ecf, const ncf_ptr& ncf, const real_function_3d& vnuc) {\n\n\tconst double eps = -2.9;\n\treal_convolution_6d op_mod = BSHOperator<6>(world,sqrt(-2*eps),lo,bsh_eps);\n\top_mod.modified() = true;\n\n\n\treal_function_6d Rfpsi=reconstruct_psi(world,psi,ecf,ncf);\n\treal_function_6d psi2=(psi*psi).truncate();\n\n#ifdef WITH_G12\n\treal_function_6d psif2 = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.g12(ecf.square()).ket(copy(psi2));\n\tpsif2.fill_tree(op_mod);\n#else\n\treal_function_6d psif2=copy(psi2);\n#endif\n\n\treal_function_6d R2 = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.particle1(copy(ncf->square()))\n\t\t\t\t.particle2(copy(ncf->square()));\n\n\tdouble norm=inner(psif2,R2);\n\tif (world.rank()==0) print(\"<psi | psi> \",norm);\n\n\t{\n\t\treal_function_6d R2f2 = CompositeFactory<double, 6, 3>(world)\n#ifdef WITH_G12\n\t\t\t\t\t.g12(ecf.square())\n#endif\n\t\t\t\t\t.particle1(copy(ncf->square()))\n\t\t\t\t\t.particle2(copy(ncf->square()));\n\t\tdouble norm1=inner(psi2,R2f2);\n\t\tif (world.rank()==0) print(\"<psi | psi> \",norm1);\n\n\t}\n\n\treal_function_6d eri=TwoElectronFactory(world).dcut(bsh_eps);\n\treal_function_6d R2V = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.g12(eri).particle1(copy(ncf->square()))\n\t\t\t\t.particle2(copy(ncf->square()));\n\n\tdouble pe=inner(psif2,R2V);\n\tif (world.rank()==0) print(\"<psi | V_el | psi>/<psi | psi> \",pe/norm);\n\n\n\tconst real_function_3d R2Vnuc=vnuc*ncf->square();\n\treal_function_6d R2Vnuc6_1  = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.particle1(copy(ncf->square()))\n\t\t\t\t.particle2(copy(R2Vnuc));\n\tdouble pe1=inner(psif2,R2Vnuc6_1);\n\treal_function_6d R2Vnuc6_2  = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.particle1(copy(R2Vnuc))\n\t\t\t\t.particle2(copy(ncf->square()));\n\tdouble pe2=inner(psif2,R2Vnuc6_2);\n\n\tif (world.rank()==0) print(\"<psi | V_nuc | psi>/<psi | psi> \",(pe1+pe2)/norm);\n\n\tdouble ke=0;\n\tfor (int i=0; i<6; ++i) {\n\t\treal_derivative_6d D = free_space_derivative<double, 6>(world, i);\n\t\tconst real_function_6d Drhs = D(Rfpsi).truncate();\n\t\tconst double n=Drhs.norm2();\n\t\tke+=0.5*n*n;\n\t\tif (world.rank()==0) print(\"<psi | T(i)  | psi>/<psi | psi> \",0.5*n*n/norm);\n\t}\n\n\tif (world.rank()==0) print(\"<psi | T     | psi>/<psi | psi> \",ke/norm);\n\n\treal_function_6d VRfpsi=CompositeFactory<double, 6, 3>(world)\n\t\t\t\t\t\t\t.V_for_particle1(copy(vnuc))\n\t\t\t\t\t\t\t.V_for_particle2(copy(vnuc))\n\t\t\t\t\t\t\t.ket(copy(Rfpsi));\n\tdouble pe_nuc=inner(VRfpsi,Rfpsi);\n\tif (world.rank()==0) print(\"<psi | V_nuc2| psi>/<psi | psi> \",pe_nuc/norm);\n\n\treturn (pe1 + pe2 + pe + ke)/norm;\n}\n\nvoid save(World& world, const real_function_6d& f, std::string filename) {\n\tarchive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, filename.c_str(), 1);\n\tar & f;\n}\n\nvoid load(World& world, real_function_6d& f, std::string filename) {\n\tarchive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, filename.c_str(), 1);\n\tar & f;\n}\n\n/// the electronic U potential is U -1/r12 = f^-1 [T, f] = f^-1 T f - T\nvoid test_U_el(World& world, const real_function_6d& psi,\n\t\tconst CorrelationFactor2& ecf) {\n\n\t// expectation value of U\n\treal_function_6d Vpsi = apply_U_ecf(world, psi, ecf);\n\tdouble u=inner(psi,Vpsi);\n\tif (world.rank()==0) print(\"<psi | U | psi> \",u);\n\n\n\treal_function_6d eri=TwoElectronFactory(world).dcut(bsh_eps);\n\treal_function_6d gpsi = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.g12(eri).ket(copy(psi));\n\tdouble g=inner(psi,gpsi);\n\tif (world.rank()==0) print(\"<psi | 1/r12 | psi> \",g);\n\n\n\t// expectation value of the first term rhs\n\tconst double eps = -2.9;\n\treal_convolution_6d op_mod = BSHOperator<6>(world, sqrt(-2 * eps), lo,\n\t\t\tbsh_eps);\n\top_mod.modified() = true;\n\treal_function_6d fpsi = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.g12(ecf.function()).ket(copy(psi));\n\tfpsi.fill_tree(op_mod);\n\n\treal_function_6d finvpsi = CompositeFactory<double, 6, 3>(world)\n\t\t\t\t.g12(ecf.inverse()).ket(copy(psi));\n\tfinvpsi.fill_tree(op_mod);\n\n\tdouble ftf=0;\n\tfor (int i=0; i<6; ++i) {\n\t\treal_derivative_6d D = free_space_derivative<double, 6>(world, i);\n\t\tconst real_function_6d Dbra = D(fpsi).truncate();\n\t\tconst real_function_6d Dket = D(finvpsi).truncate();\n\t\tconst double ke1=0.5*inner(Dbra,Dket);\n\t\tftf+=ke1;\n\t\tif (world.rank()==0) print(\"<psi |f-1 T(i) f| psi> \",ke1);\n\t}\n\n\tif (world.rank()==0) print(\"<psi | f-1 T f | psi> \",ftf);\n\n\n\t// expectation value of the second term rhs\n\tdouble ke=0;\n\tfor (int i=0; i<6; ++i) {\n\t\treal_derivative_6d D = free_space_derivative<double, 6>(world, i);\n\t\tconst real_function_6d Drhs = D(psi).truncate();\n\t\tconst double n=Drhs.norm2();\n\t\tke+=0.5*n*n;\n\t\tif (world.rank()==0) print(\"<psi | T(i)  | psi> \",0.5*n*n);\n\t}\n\n\tif (world.rank()==0) print(\"<psi | T     | psi> \",ke);\n\n\tif (world.rank()==0) {\n\t\tprint(\" U - f-1 T f - T \",(u - g) - (ftf - ke));\n\t}\n\n}\n\n\nint main(int argc, char** argv) {\n\tinitialize(argc, argv);\n\tWorld world(SafeMPI::COMM_WORLD);\n\tstartup(world, argc, argv,true);\n\tstd::cout.precision(6);\n\n\tif (world.rank()==0) {\n          print(\"           git source description ...\", info::git_source_description());\n\t}\n\n\tif (world.rank() == 0) {\n\t\tprint(\"main() in helium_exact.cc compiled at \", __TIME__, \" on \",\n\t\t\t\t__DATE__);\n\t}\n\n\t// read out input and stuff\n\tcommandlineparser parser(argc,argv);\n    parser.set_keyval(\"geometry\",\"he\"); // it's always going to be helium\n\tNemo nemo(world, parser);\n\tauto calc=nemo.get_calc();\n\n\tTensorType tt = TT_2D;\n\tFunctionDefaults<6>::set_tensor_type(tt);\n\tFunctionDefaults<6>::set_thresh(FunctionDefaults<3>::get_thresh());\n\tFunctionDefaults<6>::set_k(FunctionDefaults<3>::get_k());\n    FunctionDefaults<3>::set_cubic_cell(-calc->param.L(), calc->param.L());\n    FunctionDefaults<6>::set_cubic_cell(-calc->param.L(), calc->param.L());\n    calc->set_protocol<6>(world,FunctionDefaults<3>::get_thresh());\n\n\n    // get command line parameters\n    bool do_energy=false;\n    std::string testfilename;\n    for(int ii = 1; ii < argc; ii++) {\n        const std::string arg=argv[ii];\n        if (arg==\"energy_only\") do_energy=true;\n    }\n\n\tif (world.rank() == 0) {\n\t\tprint(\"helium exact\");\n\t\tprint(\"polynomial order:    \", FunctionDefaults<6>::get_k());\n\t\tprint(\"threshold:           \", FunctionDefaults<6>::get_thresh());\n\t\tprint(\"truncation mode:     \", FunctionDefaults<6>::get_truncate_mode());\n\t\tprint(\"tensor type:         \", FunctionDefaults<6>::get_tensor_type());\n\t\tprint(\"cell size:           \", FunctionDefaults<6>::get_cell());\n\t\tprint(\"\");\n\t\tprint(\"facReduce            \", GenTensor<double>::fac_reduce());\n\t\tprint(\"max displacement     \", Displacements<6>::bmax_default());\n\t\tprint(\"apply randomize      \",\n\t\t\t\tFunctionDefaults<6>::get_apply_randomize());\n\t\tprint(\"world.size()         \", world.size());\n\t\tprint(\"compute energy only  \", do_energy);\n\t\tprint(\"\");\n\t}\n\n\n\t// solve the one-particle equations for having a guess for the wave function\n\tnemo.value();\n\n\t// create the electronic and nuclear correlation factors\n\tncf_ptr ncf = nemo.ncf;\n\tCorrelationFactor2 ecf(world);\n\n\t// get a guess for the wave function\n\tdouble eps = -2.919474;\n\treal_function_6d psi;\n\n\tstd::string filename = \"he_psi_exact\";\n\tbool exists = archive::ParallelInputArchive<madness::archive::BinaryFstreamInputArchive>::exists(world,\n\t\t\tfilename.c_str());\n\tif (exists) {\n\t\tif (world.rank() == 0) print(\"reading wave function from file\");\n\t\tarchive::ParallelInputArchive<archive::BinaryFstreamInputArchive> iar(world, filename.c_str(), 1);\n\t\tiar & psi & eps;\n\t\tpsi.set_thresh(FunctionDefaults<6>::get_thresh());\n\t\treal_function_3d vnuc=copy(calc->potentialmanager->vnuclear());\n\t\tcompute_energy(world,psi,ecf,ncf,vnuc);\n\n\t} else {\n\t\tpsi = hartree_product(calc->amo[0], calc->amo[0]);\n\t}\n\tpsi.print_size(\"guess psi\");\n\n\n\tif (do_energy) {\n\t\treal_function_6d  Vpsi1;\n\t\tload(world,Vpsi1,\"Vpsi\");\n\t\tconst double en1=compute_energy_with_U(world,psi,ecf,ncf,Vpsi1);\n\t\tVpsi1.clear();\n\t\tif (world.rank()==0) print(\"asymmetric energy :  \",en1);\n\t\treal_function_3d vnuc1=copy(calc->potentialmanager->vnuclear());\n\t\tconst double en2=compute_energy(world,psi,ecf,ncf,vnuc1);\n\t\tif (world.rank()==0) print(\"symmetric energy  :  \",en2);\n\t} else {\n\n\t\ttest_U_el(world,psi,ecf);\n\n\t\tif (world.rank()==0) {\n\t\t\tprint(\" total energy  2nd order update      < H > \");\n\t\t}\n\n\n\t\tfor (int iter = 0; iter < nemo.get_calc()->param.maxiter(); ++iter) {\n\n\t\t\treal_function_6d Vpsi = real_factory_6d(world);\n\t#ifdef WITH_G12\n\t\t\tVpsi = apply_U_mix(world, psi, ecf, ncf);\n\t\t\tVpsi.print_size(\"Umix\");\n\n\t\t\tVpsi += apply_U_ecf(world, psi, ecf);\n\t\t\tVpsi.truncate();\n\t\t\tVpsi.print_size(\"Umix+U_ecf\");\n\t#endif\n\t\t\tVpsi += apply_U_ncf(world, psi, ncf);\n\t\t\tVpsi.truncate();\n\t//\t\tVpsi += apply_V(world, psi, *nemo.get_calc().get());\n\t\t\tVpsi.print_size(\"Umix+U_ecf+U_ncf\");\n\n\t\t\tVpsi.scale(-2.0).truncate();\n\t\t\tVpsi.print_size(\"Vpsi\");\n\n\n\t\t\tVpsi.scale(-2.0);\n\t\t\treal_convolution_6d bsh = BSHOperator<6>(world, sqrt(-2 * eps), lo,\n\t\t\t\t\tbsh_eps);\n\t\t\tbsh.destructive() = true;\n\t\t\tsave(world,Vpsi,\"Vpsi\");\n\t\t\treal_function_6d tmp = bsh(Vpsi).truncate();// green is destructive\n\t\t\ttmp.print_size(\"GV Psi\");\n\t\t\tsave(world,tmp,\"GVpsi\");\n\n\t\t\t// second order update of the energy\n\t\t\treal_function_6d r = tmp - psi;\n\t\t\tdouble rnorm = r.norm2();\n\t\t\tdouble norm = tmp.norm2();\n\t\t\tload(world,Vpsi,\"Vpsi\");\n\t\t\tdouble eps_new = eps - 0.5 * inner(Vpsi, r) / (norm * norm);\n\t\t\tif (world.rank() == 0) {\n\t\t\t\tprint(\"norm=\", norm, \" eps=\", eps, \" err(psi)=\", rnorm,\n\t\t\t\t\t\t\" err(eps)=\", eps_new - eps);\n\t\t\t}\n\t\t\tVpsi.clear();\n\t\t\ttmp.scale(1.0 / norm);\n\t\t\tpsi = copy(tmp);\n\t\t\tif (iter >1) {\n\t\t\t\tif (world.rank() == 0)\n\t\t\t\t\tprint(\"updating energy\");\n\t\t\t\teps = eps_new;\n\t\t\t}\n\t\t\tarchive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, filename.c_str(), 1);\n\t\t\tar & psi & eps;\n\n\t\t\treal_function_3d vnuc=copy(calc->potentialmanager->vnuclear());\n\t\t\tdouble energy=compute_energy(world,psi,ecf,ncf,vnuc);\n\n\t\t\tif (world.rank()==0) {\n\t\t\t\tprint(\" total energy \",eps,energy);\n\t\t\t}\n\n\t\t}\n\t}\n\n\tif (world.rank() == 0)\n\t\tprintf(\"\\nfinished at time %.1fs\\n\\n\", wall_time());\n\tworld.gop.fence();\n\tfinalize();\n\n\treturn 0;\n}\n\n"
  },
  {
    "path": "src/examples/helium_mp2.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/*!\n  \\file helium_mp2.cc\n  \\brief Solves the Hartree-Fock and MP2 equations for the helium atom\n  \\defgroup examplehehf Hartree-Fock and MP2 for the helium atom\n  \\ingroup examples\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/funcplot.h>\n#include <madness/mra/lbdeux.h>\n\n#include <iostream>\n\n\n\nusing namespace madness;\n\nstatic const double dcut=1.e-5;\nstatic const double r12cut=1.e-3;\nstatic const double rcut=1.e-3;\nstatic const double shift=0.0;\n\n//static const double L = 32.0;   // box size\n//static const long k = 6 ;        // wavelet order\n//static const double thresh = 1e-3; // precision\n//static const TensorType tt = TT_3D;\n//static const long truncate_mode = 0;\n\n//template<typename T>\n//static std::string stringify(T arg) {\n//\tstd::ostringstream o;\n//\tif (!(o << arg))\n//\t\tthrow std::domain_error(\"stringify(double)\");\n//\treturn o.str();\n//}\n\nstatic double guess(const coord_3d& r) {\n    const double x=r[0]+shift, y=r[1]+shift, z=r[2];\n    return 6.0*exp(-sqrt(x*x+y*y+z*z+1e-8));\n}\n\nstatic double V(const coord_3d& r) {\n    const double x=r[0]+shift, y=r[1]+shift, z=r[2];\n    return -1.0/(sqrt(x*x+y*y+z*z+1e-10));\n}\n\nstatic double HO_3d(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return x*x + y*y + z*z;\n}\n\nstatic double HO_6d(const coord_6d& r) {\n\n\t// separation for 2-way decomposition (SVD; r1 -- r2)\n\tconst double x1=r[0], x2=r[3];\n    const double y1=r[1], y2=r[4];\n    const double z1=r[2], z2=r[5];\n\n    const double value=(x1*x1 + y1*y1 + z1*z1) + (x2*x2 + y2*y2 + z2*z2);\n    return value;\n}\n\n\nstatic double gauss_3d(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    const double r2= x*x + y*y + z*z;\n    const double norm=0.712705695388313;\n    return norm*exp(-r2);\n}\n\nstatic double gauss_6d(const coord_6d& r) {\n\n\t// separation for 2-way decomposition (SVD; r1 -- r2)\n\tconst double x1=r[0], x2=r[3];\n    const double y1=r[1], y2=r[4];\n    const double z1=r[2], z2=r[5];\n\n    const double r2=(x1*x1 + y1*y1 + z1*z1) + (x2*x2 + y2*y2 + z2*z2);\n    const double norm=0.5;\n    return norm*exp(-r2);\n}\n\n\nstatic double HO_vphi_3d(const coord_3d& r) {\n    const double v=HO_3d(r);\n    const double phi=gauss_3d(r);\n    return v*phi;\n}\n\n\nstatic double Z2(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return -2.0/(sqrt(x*x+y*y+z*z+dcut*dcut));\n}\n\nstatic double Z1(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return -1.0/(sqrt(x*x+y*y+z*z+dcut*dcut));\n}\n\n\nstatic double V_1(const coord_6d& r) {\n\n\t// separation for 2-way decomposition (SVD; r1 -- r2)\n\tconst double x1=r[0], x2=r[3];\n\tconst double y1=r[1], y2=r[4];\n\tconst double z1=r[2], z2=r[5];\n\n\n\tconst double r1 = sqrt(x1*x1 + y1*y1 + z1*z1 + dcut*dcut);\n\tconst double r2 = sqrt(x2*x2 + y2*y2 + z2*z2 + dcut*dcut);\n\n\tconst double value=-2.0/r1 - 2.0/r2;\n\treturn value;\n\n\n}\n\n// Smoothed 1/r potential (c is the smoothing distance)\nstatic double u(double r, double c) {\n    r = r/c;\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-2) {\n        pot = erf(r)/r + exp(-r2)*0.56418958354775630;\n    } else{\n        pot = 1.6925687506432689-r2*(0.94031597257959381-r2*(0.39493270848342941-0.12089776790309064*r2));\n    }\n\n    return pot/c;\n}\n\nvoid distances(const coord_6d& r, double& r1, double& r2, double& r12) {\n    const double x1=r[0], y1=r[1], z1=r[2];\n    const double x2=r[3], y2=r[4], z2=r[5];\n    const double xx=x1-x2, yy=y1-y2, zz=z1-z2;\n    r1 = sqrt(x1*x1 + y1*y1 + z1*z1);\n    r2 = sqrt(x2*x2 + y2*y2 + z2*z2);\n    r12 = sqrt(xx*xx + yy*yy + zz*zz);\n}\n\nstatic double V(const coord_6d& r) {\n    double r1, r2, r12;\n    distances(r, r1, r2, r12);\n    return -2.0*u(r1,rcut) - 2.0*u(r2,rcut) + 1.0*u(r12,r12cut);\n}\n\n\nstatic double coul(const coord_6d& r) {\n\n//\t// separation for 2-way decomposition (SVD; r1 -- r2)\n//\tconst double x1=r[0], x2=r[3];\n//\tconst double y1=r[1], y2=r[4];\n//\tconst double z1=r[2], z2=r[5];\n//\n//\tconst double xx=x1-x2, yy=y1-y2, zz=z1-z2;\n//\n////\tconst double r1 = sqrt(x1*x1 + y1*y1 + z1*z1 + dcut*dcut);\n////\tconst double r2 = sqrt(x2*x2 + y2*y2 + z2*z2 + dcut*dcut);\n//\tconst double r12= sqrt(xx*xx + yy*yy + zz*zz + dcut*dcut*1.e6);\n\n\tdouble r1,r2,r12;\n\tdistances(r, r1, r2, r12);\n\tconst double value= 1.0*u(r12,r12cut);\n//\tconst double value= + 1.0/r12;\n\treturn value;\n}\n\n\nstatic double helium_pot(const coord_6d& r) {\n\n    // separation for 2-way decomposition (SVD; r1 -- r2)\n    const double x1=r[0], x2=r[3];\n    const double y1=r[1], y2=r[4];\n    const double z1=r[2], z2=r[5];\n\n    const double xx=x1-x2, yy=y1-y2, zz=z1-z2;\n\n    const double r1 = sqrt(x1*x1 + y1*y1 + z1*z1 + dcut*dcut);\n    const double r2 = sqrt(x2*x2 + y2*y2 + z2*z2 + dcut*dcut);\n    const double r12= sqrt(xx*xx + yy*yy + zz*zz + dcut*dcut);\n\n    const double value=-2.0/r1 - 2.0/r2;// + 1.0/r12;\n//    const double value= + 1.0/r12;\n    return value;\n}\n\n// return the helium potential times the hylleraas function\nstatic double V_times_phi(const coord_6d& r) {\n\n\t// separation for 2-way decomposition (SVD; r1 -- r2)\n\tconst double x1=r[0], x2=r[3];\n    const double y1=r[1], y2=r[4];\n    const double z1=r[2], z2=r[5];\n\n    const double xx=x1-x2, yy=y1-y2, zz=z1-z2;\n\n    const double r1 = sqrt(x1*x1 + y1*y1 + z1*z1 + dcut*dcut);\n    const double r2 = sqrt(x2*x2 + y2*y2 + z2*z2 + dcut*dcut);\n    const double r12= sqrt(xx*xx + yy*yy + zz*zz + dcut*dcut);\n\n    const double pot=-2.0/r1 - 2.0/r2;// + 1.0/r12;\n    const double phi=exp(-1.8*(r1 + r2))*(1.0 + 0.5*r12);\n    const double value=pot*phi;\n\n    return value;\n}\n\n\n// according to McQuarrie\nstatic double h_orbital(const coord_3d& r) {\n    return exp(-sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]+1e-6));\n}\n\n\n// according to McQuarrie\nstatic double he_plus_orbital(const coord_3d& r) {\n    return exp(-2.0*sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]+1e-6));\n}\n\n// according to Ed\nstatic double he_orbital_3d(const coord_3d& r) {\n\n    // separation for 2-way decomposition (SVD; r1 -- r2)\n\tconst double x1=r[0];\n    const double y1=r[1];\n    const double z1=r[2];\n\n    const double r1 = sqrt(x1*x1 + y1*y1 + z1*z1 + dcut*dcut);\n\n    const double val=(0.00995312870402086*(31.05166416452748 - 7.405311261369526*r1 +\n           r1*r1)*(4.335496673568937 + 0.24243181498262073*r1 +\n           r1*r1)) * exp(-1.81607*r1);\n\n    return val;\n}\n\n// according to McQuarrie\nstatic double he_orbital_McQuarrie(const coord_3d& r) {\n\n    // separation for 2-way decomposition (SVD; r1 -- r2)\n\tconst double x1=r[0];\n    const double y1=r[1];\n    const double z1=r[2];\n\n    const double r1 = sqrt(x1*x1 + y1*y1 + z1*z1 + dcut*dcut);\n\n    const double val=exp(-(27.0/16.0)*r1);\n\n    return val;\n}\n\n\n// according to Ed / McQuarrie\nstatic double he_orbitals(const coord_6d& r) {\n\n    // separation for 2-way decomposition (SVD; r1 -- r2)\n    coord_3d r1;\n    coord_3d r2;\n    r1[0]=r[0];\n    r1[1]=r[1];\n    r1[2]=r[2];\n    r2[0]=r[3];\n    r2[1]=r[4];\n    r2[2]=r[5];\n\n//    const double val=he_orbital_3d(r1) * he_orbital_3d(r2);\n    const double val=he_orbital_McQuarrie(r1) * he_orbital_McQuarrie(r2);\n\n    return val;\n}\n\n\nstatic double hylleraas_3term(const coord_6d& r) {\n\n    // E = -2.902432028988 E_h\n\n    // separation for 2-way decomposition (SVD; r1 -- r2)\n\tconst double x1=r[0], x2=r[3];\n    const double y1=r[1], y2=r[4];\n    const double z1=r[2], z2=r[5];\n    const double xx=x1-x2, yy=y1-y2, zz=z1-z2;\n\n    const double r1 = sqrt(x1*x1 + y1*y1 + z1*z1 + dcut*dcut);\n    const double r2 = sqrt(x2*x2 + y2*y2 + z2*z2 + dcut*dcut);\n    const double r12= sqrt(xx*xx + yy*yy + zz*zz + dcut*dcut);\n\n    return -exp(-1.81607*(r1 + r2)) * (\n    -1.33083943395992\n    -0.388320016632985 * r12\n    -0.174093511691879 *  ( r1*r1  + r2*r2  -2 * r1 * r2 )\n    );\n}\n\n\n// Hylleraas 3-term minus He orbitals\nstatic double he_correlation(const coord_6d& r) {\n\treturn hylleraas_3term(r) - he_orbitals(r);\n}\n\n\n\nclass YetAnotherWrapperClass {\n    const real_function_6d& f;\n    const real_function_3d f3;\n    const long k;\n    real_function_6d eri;\n    const Tensor<double>& qx6;\n    const Tensor<double>& qx3;\n    Tensor<double> identity;\n\npublic:\n    YetAnotherWrapperClass(const real_function_6d& f)\n        : f(f)\n        , f3(real_factory_3d(f.get_impl()->world))\n        , k(f.k())\n        , eri()\n        , qx6(FunctionCommonData<double,6>::get(k).quad_x)\n        , qx3(FunctionCommonData<double,3>::get(k).quad_x)\n    {\n        identity=Tensor<double>(k,k,k);\n        identity=1.0;\n        eri=ERIFactory<double,6>(f.get_impl()->world).dcut(1.e-8);\n    }\n\n    void operator()(const Key<6>& key, Tensor<double>& t) const {\n\n#if 0\n        // break key into particles\n        const Vector<Translation, 6> l=key.translation();\n        const Vector<Translation, 3> l1 {l[0],l[1],l[2]};\n        const Vector<Translation, 3> l2 {l[3],l[4],l[5]};\n        const Key<3> key1(key.level(),l1);\n        const Key<3> key2(key.level(),l2);\n\n//        Tensor<double> g12=eri.coeff(key);\n        Tensor<double> g12=eri.get_impl()->coeffs2values(\n\t\tkey,eri.get_impl()->get_functor()->coeff(key).full_tensor());\n        Tensor<double> pot1(k,k,k), pot2(k,k,k);\n        f3.get_impl()->fcube(key1,Z2,qx3,pot1);\n        f3.get_impl()->fcube(key2,Z2,qx3,pot2);\n\n        // direct product: V(1) * E(2) + E(1) * V(2)\n//        g12+= outer(pot1,identity) + outer(identity,pot2);\n        t.emul(g12);\n#else\n\tTensor<double> v(k,k,k,k,k,k);\n       \tf.get_impl()->fcube(key, helium_pot, qx6, v);\n//       \tf.get_impl()->fcube(key, coul, qx6, v);\n//        t.emul(v);\n        t=v;\n\n#endif\n\n    }\n\n};\n\nreal_function_6d multiply_by_V(const real_function_6d& psi) {\n    real_function_6d Vpsi = copy(psi);\n    Vpsi.unaryop(YetAnotherWrapperClass(Vpsi));\n    return Vpsi;\n}\n\ntemplate<size_t NDIM>\nvoid save_function(World& world, const Function<double,NDIM>& pair, const std::string name) {\n    if (world.rank()==0) print(\"saving function\",name);\n    archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, name.c_str(), 1);\n    ar & pair & FunctionDefaults<NDIM>::get_cell();\n}\n\ntemplate<size_t NDIM>\nvoid load_function(World& world, Function<double,NDIM>& pair, const std::string name) {\n    archive::ParallelInputArchive<archive::BinaryFstreamIn putArchive> ar(world, name.c_str());\n//    archive::ParallelInputArchive ar(world, \"restart\");\n    Tensor<double> cell;\n    ar & pair & cell;\n}\n\n\nstruct LBCost {\n    double leaf_value;\n    double parent_value;\n    LBCost(double leaf_value=1.0, double parent_value=1.0)\n        : leaf_value(leaf_value)\n        , parent_value(parent_value)\n    {}\n\n    double operator()(const Key<6>& key, const FunctionNode<double,6>& node) const {\n//        if (key.level() <= 1) {\n//\t\treturn 100.0;\n//        }\n//        else {\n//\t\treturn 1.0;\n//\t}\n        if (node.is_leaf()) {\n            return std::abs(node.coeff().rank());\n        } else {\n            return parent_value;\n        }\n    }\n};\n\n\n//struct true_op {\n//    bool operator()(FunctionImpl<double,3>* impl, const Key<3>& key, const FunctionNode<double,3>& t) const {\n//        return true;\n//    }\n//\n//    template <typename Archive> void serialize (Archive& ar) {}\n//};\n\nstruct true_op {\n    bool operator()(FunctionImpl<double,6>* impl, const Key<6>& key, const FunctionNode<double,6>& t) const {\n        return true;\n    }\n\n    template <typename Archive> void serialize (Archive& ar) {}\n};\n\n\nstruct true_if_n_gt_op {\n    long _l;\n    true_if_n_gt_op() : _l(100) {}\n    true_if_n_gt_op(const int level) : _l(level) {}\n    bool operator()(FunctionImpl<double,6>* impl, const Key<6>& key, const FunctionNode<double,6>& t) const {\n        return (key.level()>_l);\n    }\n\n    template <typename Archive> void serialize (Archive& ar) {}\n};\n\n/// Returns the box at level n that contains the given point in simulation coordinates\n     Key<6> simpt2key(const Vector<double,6>& pt, Level n) {\n         const std::size_t NDIM=6;\n         Vector<Translation,NDIM> l;\n         double twon = std::pow(2.0, double(n));\n         for (std::size_t i=0; i<NDIM; ++i) {\n             l[i] = Translation(twon*pt[i]);\n         }\n         return Key<NDIM>(n,l);\n     }\n\n//struct true_if_close_to_nucleus {\n//    typedef Vector<double,6> coordT;\n//    coordT nuc;\n//    true_if_close_to_nucleus() {}\n//    true_if_close_to_nucleus(coordT& a) : nuc(a) {}\n//    bool operator()(FunctionImpl<double,6>* impl, const Key<6>& key, const FunctionNode<double,6>& t) const {\n//        coordT simpt;\n//        user_to_sim(nuc, simpt);\n//        Key<6> specialkey = simpt2key(simpt, key.level());\n//        return (specialkey.is_neighbor_of(key));\n//    }\n//\n//    template <typename Archive> void serialize (Archive& ar) {\n//        ar & nuc;\n//    }\n//\n//};\n\n/// iterate the helium wavefunction\n/// @param[in]      world   world\n/// @param[in]      Vpsi    -2.0*V*pair\n/// @param[in/out]  psi     pair function\n/// @param[in/out]  eps     energy\nvoid iterate(World& world, real_function_6d& Vpsi, real_function_6d& psi, double& eps) {\n\n    LoadBalanceDeux<6> lb(world);\n    double ncoeff=std::pow(double(FunctionDefaults<6>::get_k()),double(6));\n    lb.add_tree(Vpsi,LBCost(1.0,ncoeff));\n    FunctionDefaults<6>::redistribute(world, lb.load_balance(2.0,false));\n    if(world.rank() == 0) printf(\"redistributed at time   %.1fs\\n\", wall_time());\n\n    MADNESS_ASSERT(eps<0.0);\n    real_convolution_6d op = BSHOperator<6>(world, sqrt(-2*eps), 0.00001, 1e-6);\n    op.modified()=false;\n\n    if(world.rank() == 0) printf(\"starting convolution at time %.1fs\\n\", wall_time());\n    real_function_6d tmp = op(Vpsi);\n    if(world.rank() == 0) printf(\"ending convolution at time   %.1fs\\n\", wall_time());\n\n    tmp.print_size(\"tmp before truncation\");\n    tmp.truncate();\n    tmp.print_size(\"tmp after truncation\");\n    if(world.rank() == 0) printf(\"truncated at time   %.1fs\\n\", wall_time());\n\n    double norm = tmp.norm2();\n    real_function_6d r = tmp-psi;\n    double rnorm=r.norm2();\n    double eps_new = eps -0.5 * inner(r,Vpsi)/(norm*norm);\n    if (world.rank() == 0) {\n        print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n        print(\"eps_new\",eps_new);\n    }\n    psi = tmp.scale(1.0/norm);\n    eps = eps_new;\n}\n\nvoid iterate(World& world, const real_function_3d& V, real_function_3d& psi, double& eps) {\n\n\treal_function_3d Vpsi = (V*psi);\n    Vpsi.scale(-2.0).truncate();\n\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.0001, 1e-6);\n    real_function_3d tmp;\n//\n//    // direct Vpsi\n//    if (0) {\n//    \t// set the impl of arg to get the structure of the target tree\n//    \treal_function_3d arg=CompositeFactory<double,3,3>(world)\n//    \t        .ket(copy(Vpsi).get_impl())\n//    \t\t\t.muster(copy(Vpsi).get_impl());\n//\n//    \ttmp = op(arg).truncate();\n//    }\n//\n//    // composite Vpsi\n//    else {\n////        psi.refine_general(true_op());\n//        print(\"psi.size()\",psi.size(),psi.tree_size());\n//    \treal_function_3d arg=CompositeFactory<double,3,3>(world)\n////    \t        .V_for_particle1(copy(V).get_impl())\n//    \t        .ket(copy(Vpsi).get_impl())\n//\t\t\t\t.muster(copy(Vpsi).get_impl());\n//\n//    \ttmp = op(arg);\n//    \tprint(\"tmp.size()\",tmp.size(),tmp.norm2());\n////    \ttmp.scale(-2.0);\n//    \ttmp.truncate();\n//        print(\"tmp.truncated.size()\",tmp.size());\n//\n//    }\n\n    // conventional\n//    tmp=op(Vpsi).truncate();\n\n    double norm = tmp.norm2();\n    real_function_3d r = tmp-psi;\n    double rnorm = r.norm2();\n    double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n    if (world.rank() == 0) {\n        print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n        print(\"eps_new\",eps_new);\n    }\n    psi = tmp.scale(1.0/norm);\n    eps = eps_new;\n}\n\nvoid compute_energy(World& world, const real_function_3d& psi, const real_function_3d& pot, double& ke, double& pe) {\n\n\n    double kinetic_energy = 0.0;\n    for (int axis=0; axis<3; axis++) {\n    \treal_derivative_3d D = free_space_derivative<double,3>(world, axis);\n    \treal_function_3d dpsi = D(psi);\n    \tkinetic_energy += 0.5*inner(dpsi,dpsi);\n    }\n    ke=kinetic_energy;\n\n    pe=inner(psi,pot*psi);\n    if(world.rank() == 0) {\n        printf(\"compute the energy at time   %.1fs\\n\", wall_time());\n        printf(\"kinetic energy      %12.8f\\n\", ke);\n        printf(\"potential energy    %12.8f\\n\", pe);\n        printf(\"total energy        %12.8f\\n\", pe+ke);\n    }\n}\n\n\n\nvoid compute_energy(World& world, const real_function_6d& pair,\n\t\tconst real_function_3d& pot1, const real_function_3d& pot2, double& ke, double& pe) {\n\n\t// compute kinetic energy\n\tke=0.0;\n\tif (1) {\n\t\tfor (int axis=0; axis<6; axis++) {\n\t\t\treal_derivative_6d D = free_space_derivative<double,6>(world, axis);\n\t\t\treal_function_6d dpsi = D(pair);\n//            double a=0.5*inner(dpsi,dpsi);\n\t\t\tdouble aa=dpsi.norm2();\n\t\t\tdouble a=0.5*aa*aa;\n\t\t\tke += a;\n\t\t\tif (world.rank()==0) print(\"done with axis\",axis, a);\n\t\t}\n\t}\n\tif (world.rank()==0) {\n\t    print(\"kinetic energy:\", ke);\n\t    printf(\"\\nkinetic at time %.1fs\\n\\n\", wall_time());\n\t}\n\n\t// compute potential energy\n\tpe=0.0;\n\tif (1) {\n\n\t\t// two-electron interaction potential\n\t\treal_function_6d eri=ERIFactory<double,6>(world).dcut(1.e-8);\n\n\n\t\treal_function_6d v11=CompositeFactory<double,6,3>(world)\n\t\t\t\t.ket(copy(pair))\n\t\t\t\t.g12(eri)\n\t\t\t\t.V_for_particle1(copy(pot1))\n\t\t\t\t.V_for_particle2(copy(pot2))\n\t\t\t\t;\n\n\t\t// make the tree (optional!)\n        if (1) {\n\t\t    // this is a dummy convolution\n            real_convolution_6d op = BSHOperator<6>(world, -0.1, 0.00001, 1e-6);\n            op.modified()=true;\n            v11.fill_tree(op);\n        }\n\n\t\tdouble a=inner(pair,v11);\n        if (world.rank()==0) print(\"<phi|V_tot|phi> \", a);\n\t\tpe=a;\n\t} else {\n\t\tpe=-2.0*ke;\n\t}\n\tif (world.rank()==0) print(\"total energy\",ke+pe);\n\n\tif(world.rank() == 0) printf(\"\\npotential at time %.1fs\\n\\n\", wall_time());\n\n}\n\n\nvoid solve(World& world, real_function_6d& pair, double& energy, long maxiter, double dcut) {\n\n    const long k=FunctionDefaults<6>::get_k();\n    const double thresh=FunctionDefaults<6>::get_thresh();\n\n\tif (world.rank()==0) {\n\t\tprint(\"solving the helium atom with parameters\");\n\t\tprint(\"energy   \",energy);\n\t\tprint(\"dcut     \",dcut);\n\t\tprint(\"k        \",k);\n\t\tprint(\"thresh   \",thresh);\n\t}\n\n\t// one-electron potential\n\treal_function_3d pot1=real_factory_3d(world).f(Z2);\n\treal_function_3d pot2=real_factory_3d(world).f(Z2);\n\n\tif(world.rank() == 0) printf(\"\\nproject at time %.1fs\\n\\n\", wall_time());\n\n\tfor (long i=0; i<maxiter; i++) {\n\n\t\t// two-electron interaction potential\n\t\treal_function_6d eri=ERIFactory<double,6>(world).dcut(dcut);\n\n\t\treal_function_6d vphi=CompositeFactory<double,6,3>(world)\n\t\t\t\t\t\t\t.ket(copy(pair))\n\t\t\t\t\t\t\t.g12(eri)\n\t\t\t\t\t\t\t.V_for_particle1(copy(pot1))\n\t\t\t\t\t\t\t.V_for_particle2(copy(pot2))\n\t\t\t\t\t\t\t;\n//\t\tvphi.get_impl()->make_Vphi();\n\t\tMADNESS_EXCEPTION(\"fix solve in helium_mp2\",1);\n\n\t\tlong tree_size1=pair.tree_size();\n        long tree_size2=vphi.tree_size();\n        long size2=vphi.size();\n        if (world.rank()==0) print(\"refined pair\",tree_size1,tree_size2,size2);\n\n\n        // plot xy plane containing the origin\n        for (int ii=0; ii<20; ii++) {\n            coord_6d fix_coord(0.0);\n            // electron 2:\n            fix_coord[3]=0.0;\n            fix_coord[4]=0.1+0.1*ii;\n            fix_coord[5]=0.0;\n\n            Tensor<double> cell(6,2);\n            cell(Slice(_),0)=-2.0;\n            cell(Slice(_),1)= 2.0;\n            std::string filename=\"plot_plane_d\"+stringify(fix_coord[4])+\"_k\"+stringify(k)+\"_eps\"+stringify(thresh);\n            vphi.get_impl()->print_plane(filename,\"xy\",fix_coord);\n\n        }\n        std::string name=\"vphi_k\"+stringify(k)+\"_e\"+stringify(thresh)+\"_it\"+stringify(i);\n\t\tdouble L=FunctionDefaults<6>::get_cell_width()[0];\n\t\tcoord_6d lo(0.0), hi(0.0);\n\t\tlo[0]=-L/2;\n\t\thi[0]=L/2;\n\t\tfor (int ii=-5; ii<6; ii++) {\n\t\t    lo[3]=hi[3]=double(ii);\n\t\t    trajectory<6> line=trajectory<6>::line2(lo,hi,601);\n\t\t    plot_along<6>(world,line,vphi,(name+\"lineplot\"+stringify(ii)));\n            plot_along<6>(world,line,helium_pot,(name+\"lineplot_coul\"+stringify(ii)));\n\t\t}\n\n\n\t\titerate(world,vphi,pair,energy);\n\t\tpair.reconstruct();\n\n\t\tlong tree_size=pair.tree_size();\n\t\tlong size=pair.size();\n\t\tif(world.rank() == 0) print(\"pair.tree_size() in iteration\",i,\":\",tree_size);\n\t\tif(world.rank() == 0) print(\"pair.size() in iteration\",i,     \":\",size);\n\t\tname=\"restart_k\"+stringify(k)+\"_e\"+stringify(thresh)+\"_it\"+stringify(i);\n\t\tsave_function(world,pair,name);\n\n\n\t\tif (i%3==0) {\n\t\t\tdouble ke, pe;\n\t\t\tcompute_energy(world,pair,pot1,pot2,ke,pe);\n\t\t\tif (world.rank()==0) print(\"virial ratio in iteration  :\",i, pe/ke, ke+pe);\n\t\t}\n\t}\n\n\n    // plot xy plane containing the origin\n    for (int i=0; i<20; i++) {\n        coord_6d fix_coord(0.0);\n        // electron 2:\n        fix_coord[3]=0.0;\n        fix_coord[4]=0.1+0.1*i;\n        fix_coord[5]=0.0;\n\n        pair.reconstruct();\n        std::shared_ptr<FunctionImpl<double,6> > pair_impl=pair.get_impl();\n        Tensor<double> cell(6,2);\n        cell(Slice(_),0)=-2.0;\n        cell(Slice(_),1)= 2.0;\n        std::string filename=\"plot_plane_d\"+stringify(fix_coord[4])+\"_k\"+stringify(k)+\"_eps\"+stringify(thresh);\n        pair_impl->print_plane(filename,\"xy\",fix_coord);\n\n    }\n\n\tif (world.rank()==0) print(\"finished\",maxiter,\"iterations\");\n\tdouble ke, pe;\n\tcompute_energy(world,pair,pot1,pot2,ke,pe);\n\tif (world.rank()==0) print(\"virial ratio   :\", pe/ke, ke+pe);\n\n\n}\n\n\n// test the modified NS form\nvoid test_modified(World& world) {\n\n    real_function_3d V=real_factory_3d(world).f(Z1);\n    real_function_3d psi=real_factory_3d(world).f(gauss_3d);\n    psi.scale(1.0/inner(psi,psi));\n\n    double energy=-0.5;\n    double eps;\n\n    coord_3d lo, hi;\n    const double L=FunctionDefaults<3>::get_cell_width()[0];\n    lo[0]=-L/2; hi[0]=L/2;\n    trajectory<3> traj=trajectory<3>::line2(lo,hi,201);\n    plot_along(world,traj,psi,\"name\");\n\n\n    if(world.rank() == 0) printf(\"starting at time %.1fs\\n\\n\", wall_time());\n    for (int i=0; i<20; i++) {\n\n        print(\"\");\n        print(\"entering iteration\",i);\n        eps=energy;\n        real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.0001, 1e-6);\n\n        op.modified()=true;\n        op.doleaves=false;\n        print(\"operator modified\",op.modified());\n\n        real_function_3d Vpsi = (V*psi);\n        Vpsi.scale(-2.0).truncate();\n//        real_function_3d tmp=op(Vpsi).truncate();\n        real_function_3d tmp;\n        MADNESS_EXCEPTION(\"op() only with NDIM==6\",1);\n        psi=tmp;\n        psi.scale(1.0/psi.norm2());\n        plot_along(world,traj,psi,\"name\"+stringify(i));\n\n        double ke,pe;\n        compute_energy(world,psi,V,ke,pe);\n\n    }\n    if(world.rank() == 0) printf(\"finished at time %.1fs\\n\\n\", wall_time());\n\n\n}\n\n\n\n// test the modified NS form\nvoid test_recursive_application(World& world) {\n\n    if (world.rank()==0) print(\"in test_recursive_application\");\n\n    // one orbital at a time\n//    real_function_3d orbital=real_factory_3d(world).f(he_orbital_McQuarrie);\n    real_function_3d orbital=real_factory_3d(world).f(h_orbital);\n\n    double norm=inner(orbital,orbital);\n    orbital.scale(1.0/sqrt(norm));\n\n    real_function_6d pair=hartree_product(orbital,orbital);\n    double norm2=inner(pair,pair);\n    if (world.rank()==0) print(\"<phi | phi>\",norm2);\n    double ke,pe,eps;\n    const real_function_3d pot1=real_factory_3d(world).f(Z1);\n    const real_function_3d pot2=real_factory_3d(world).f(Z1);\n\n\n    {\n        // 3d\n        compute_energy(world,orbital,pot1,ke,pe);\n        eps=-0.5;\n\n        if (1) {\n            real_function_3d vphi=-2.0*(orbital*pot1);\n            real_convolution_3d op2 = BSHOperator<3>(world, sqrt(-2*eps), 0.00001, 1e-6);\n            op2.modified()=false;\n            real_function_3d tmp;//=op2(vphi);\n            MADNESS_EXCEPTION(\"op() only with NDIM==6\",1);\n            tmp.scale(1.0/sqrt(tmp.norm2()));\n            double ke, pe;\n            compute_energy(world,tmp,pot1,ke,pe);\n\n            coord_3d lo, hi;\n            const double L=FunctionDefaults<3>::get_cell_width()[0];\n            lo[0]=-L/2; hi[0]=L/2;\n            trajectory<3> traj=trajectory<3>::line2(lo,hi,201);\n            plot_along(world,traj,tmp,\"name0\");\n\n        }\n\n        {\n            real_function_3d two_phi=orbital.scale(-2.0);\n\n            real_function_3d phi2=CompositeFactory<double,3,3>(world)\n                                .ket(copy(two_phi))\n                                .V_for_particle1(copy(pot1))\n                                ;\n            {\n                real_convolution_3d op = BSHOperator<3>(world, sqrt(-2*eps), 0.00001, 1e-6);\n                op.modified()=true;\n                phi2.fill_tree(op);\n            }\n\n            real_convolution_3d op = BSHOperator<3>(world, sqrt(-2*eps), 0.00001, 1e-6);\n            op.modified()=false;\n//            phi2=op(phi2);\n            phi2.scale(1.0/sqrt(phi2.norm2()));\n\n            compute_energy(world,phi2,pot1,ke,pe);\n\n\n            coord_3d lo, hi;\n            const double L=FunctionDefaults<3>::get_cell_width()[0];\n            lo[0]=-L/2; hi[0]=L/2;\n            trajectory<3> traj=trajectory<3>::line2(lo,hi,201);\n            plot_along(world,traj,phi2,\"name1\");\n\n        }\n\n\n\n    }\n\n//    double v=inner(pair,vphi);\n//    if (world.rank()==0) print(\"inner(pair,vphi\",v);\n\n\n}\n\n\nvoid test_adaptive_tree(World& world, const bool restart, const std::string restartname) {\n\n    if (world.rank()==0) print(\"in test_adaptive_tree\");\n\n    double thresh=FunctionDefaults<6>::get_thresh();\n//    const double L=FunctionDefaults<6>::get_cell_width()[0];\n    long k=FunctionDefaults<6>::get_k();\n\n    // one orbital at a time\n    real_function_3d orbital=real_factory_3d(world).f(he_orbital_McQuarrie);\n//    real_function_3d orbital=real_factory_3d(world).f(he_plus_orbital);\n    orbital.scale(1.0/orbital.norm2());\n\n    const real_function_3d pot1=real_factory_3d(world).f(Z2);\n    const real_function_3d pot2=real_factory_3d(world).f(Z2);\n\n    // get he+ energy\n//    for (int i=0; i<20; ++i) {\n//        double ke,pe;\n//        compute_energy(world,orbital,pot1,ke,pe);\n//        double eps=ke+pe;\n//        std::string name=\"orbital_it\"+stringify(i);\n//        save_function(world,orbital,name);\n//        iterate(world,pot1,orbital,eps);\n//    }\n//    orbital=real_factory_3d(world).f(he_orbital_McQuarrie);\n\n    double en1=inner(orbital,pot1*orbital);\n    if (world.rank()==0) printf(\"1e pot energy computed as < phi | V phi>: %12.8f\\n\",en1);\n\n    double ke,pe,eps;\n    compute_energy(world,orbital,pot1,ke,pe);\n\n    real_function_6d pair;\n    if (restart) {\n        load_function(world,pair,restartname);\n    } else {\n        pair=hartree_product(orbital,orbital);\n    }\n    double norm2=inner(pair,pair);\n    if (world.rank()==0) print(\"<phi | phi>\",norm2);\n\n    pair=pair=symmetrize(pair,\"sy_particle\");\n\n    compute_energy(world,pair,pot1,pot2,ke,pe);\n    eps=ke+pe;\n\n//    real_function_6d vpair=hartree_product(orbital*pot1,orbital);\n//    double en=inner(pair,vpair);\n//    if (world.rank()==0) printf(\"2e pot energy computed as < phi | V phi>: %12.8f\\n\",en);\n//\n//    long size,tsize;\n//    size=vpair.size();\n//    tsize=vpair.tree_size();\n//    if (world.rank()==0) print(\"done computing pot size\",size,tsize);\n\n    for (int ii=0; ii<10; ++ii) {\n\n\n\n        // two-electron interaction potential\n        real_function_6d eri=ERIFactory<double,6>(world).dcut(dcut);\n\n        real_function_6d vphi=CompositeFactory<double,6,3>(world)\n                                            .ket(copy(pair))\n                                            .g12(eri)\n                                            .V_for_particle1(copy(pot1))\n                                            .V_for_particle2(copy(pot2))\n                                            ;\n\n        // make the tree\n        if (1) {\n            real_convolution_6d op = BSHOperator<6>(world, sqrt(-2*eps), 0.00001, 1e-6);\n            op.modified()=true;\n            vphi.fill_tree(op);\n            vphi.scale(-2.0);\n            vphi.print_size(\"vphi\");\n\n        }\n\n        // convolute\n        {\n            iterate(world,vphi,pair,eps);\n\n        }\n\n        {\n            const std::string appendix=\"_k\"+stringify(k)+\"_eps\"+stringify(thresh)+\"_it\"+stringify(ii);\n            std::string filename=\"pair\"+appendix;\n            save_function(world,pair,filename);\n            pair.print_size(\"pair\");\n        }\n\n        compute_energy(world,pair,pot1,pot2,ke,pe);\n//        eps=ke+pe;\n\n\n        double norm=pair.norm2();\n        if (world.rank()==0) printf(\"norm(pair) : %12.8f\",norm);\n        if(world.rank() == 0) printf(\"\\nfinished iteration %d at time %.1fs\\n\\n\", ii, wall_time());\n\n    }\n}\n\n\nvoid test_truncation(World& world) {\n\n    const real_function_3d orbital=real_factory_3d(world).f(he_orbital_McQuarrie);\n    const real_function_3d pot1=real_factory_3d(world).f(Z2);\n    const real_function_3d prod=orbital*pot1;\n    prod.print_size(\"prod\");\n\n    real_function_3d a1,a2;\n    {\n        a1=copy(prod);\n        a1.reconstruct();\n        a1.truncate();\n        a1.reconstruct();\n        a1.print_size(\"a1\");\n    }\n    {\n        a2=copy(prod);\n        a2.compress();\n        a2.truncate();\n        a2.reconstruct();\n        a2.print_size(\"a2\");\n    }\n    real_function_3d a=a1-a2;\n    print(\"norm(a)\",a.norm2());\n\n\n}\n\n\nvoid test_compress(World& world) {\n\n    const real_function_3d orbital=real_factory_3d(world).f(he_orbital_McQuarrie);\n    const real_function_3d pot1=real_factory_3d(world).f(Z2);\n    const real_function_3d prod=orbital*pot1;\n\n    real_function_6d pair=hartree_product(orbital,orbital);\n    real_function_6d vpair=hartree_product(prod,prod);\n    pair.print_size(\"pair\");\n    double ke,pe;\n\n    real_function_6d a1,a2,a3;\n//    {\n//        a1=copy(pair);\n//        a1.compress();\n//        a1.reconstruct();\n//        a1.print_size(\"a1\");\n//    }\n    {\n        a2=copy(vpair);\n        a2.print_size(\"a2\");\n    }\n    {\n        a3=copy(pair);\n        real_function_6d vphi=CompositeFactory<double,6,3>(world)\n                                            .ket(copy(a3))\n//                                            .g12(eri.get_impl())\n                                            .V_for_particle1(copy(pot1))\n                                            .V_for_particle2(copy(pot1))\n                                            ;\n\n        // make the tree\n        real_convolution_6d op = BSHOperator<6>(world, sqrt(1.0), 0.00001, 1e-6);\n        op.modified()=true;\n        vphi.fill_tree(op);\n        a3=vphi;\n        a3.print_size(\"a3\");\n    }\n    real_function_6d a=a3-a2;\n    print(\"norm(a)\",a.norm2());\n\n\n}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    // defaults\n    double L = 16;   // box size\n    long k = 4 ;        // wavelet order\n    double thresh = 1.e-2; // precision\n    TensorType tt=TT_2D;\n\n    // set the parameters\n    bool restart=false;\n    std::string restart_name;\n\n    for(int i = 1; i < argc; i++) {\n        const std::string arg=argv[i];\n\n        // break parameters into key and val\n        size_t pos=arg.find(\"=\");\n        std::string key=arg.substr(0,pos);\n        std::string val=arg.substr(pos+1);\n\n        if (key==\"size\") L=atof(val.c_str());               // usage: size=10\n        if (key==\"k\") k=atoi(val.c_str());                  // usage: k=5\n        if (key==\"thresh\") thresh=atof(val.c_str());        // usage: thresh=1.e-3\n        if (key==\"TT\") {\n            if (val==\"TT_2D\") tt=TT_2D;\n            else if (val==\"TT_3D\") tt=TT_3D;\n            else if (val==\"TT_FULL\") tt=TT_FULL;\n            else {\n                print(\"arg\",arg, \"key\",key,\"val\",val);\n                MADNESS_EXCEPTION(\"confused tensor type\",0);\n            }\n\n        }\n        if (key==\"restart\") {                               // usage: restart=path/to/mo_file\n            restart_name=stringify(val);\n            restart=true;\n        }\n    }\n\n\n\n    if (world.rank()==0) {\n        print(\"restart mode\",restart,\" restart_name=\", restart_name);\n        printf(\"\\nstarting at time %.1fs\\n\\n\", wall_time());\n    }\n\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n\n    FunctionDefaults<6>::set_k(k);\n    FunctionDefaults<6>::set_thresh(thresh);\n    FunctionDefaults<6>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<6>::set_tensor_type(tt);\n    FunctionDefaults<6>::set_apply_randomize(true);\n\n\n\n    if (world.rank()==0) {\n        print(\"polynomial order:  \", FunctionDefaults<6>::get_k());\n        print(\"threshold:         \", FunctionDefaults<6>::get_thresh());\n        print(\"cell size:         \", L);\n        print(\"truncation mode:   \", FunctionDefaults<6>::get_truncate_mode());\n        print(\"tensor type:       \", FunctionDefaults<6>::get_tensor_type());\n        print(\"\");\n        print(\"orthogonalization  \", OrthoMethod());\n        print(\"facReduce          \", GenTensor<double>::fac_reduce());\n        print(\"max displacement   \", Displacements<6>::bmax_default());\n        print(\"apply randomize    \", FunctionDefaults<6>::get_apply_randomize());\n        print(\"world.size()       \", world.size());\n        print(\"\");\n    }\n\n    if (world.rank()==0) {\n        print(\"size consistency of the 6d green's function?\");\n        print(\"\");\n    }\n\n    if (0) test_compress(world);\n    if (0) test_truncation(world);\n    if (0) test_modified(world);\n    if (0) test_recursive_application(world);\n    if (1) test_adaptive_tree(world,restart,restart_name);\n\n    if(world.rank() == 0) printf(\"\\nfinished at time %.1fs\\n\\n\", wall_time());\n    world.gop.fence();\n    finalize();\n\n    return 0;\n\n\n    // helium\n#if 0\n\n    if (0) {\n        // compute the energy of Hylleraas\n        real_function_6d pair=real_factory_6d(world).f(hylleraas_3term);\n        long tree_size=pair.tree_size();\n        long size=pair.size();\n        if (world.rank()==0) print(\"Hylleraas-3term;  tree size\",tree_size);\n        if (world.rank()==0) print(\"Hylleraas-3term;  size     \",size);\n\n        // normalize pair function\n        double norm=inner(pair,pair);\n        pair.scale(1.0/sqrt(norm));\n\n        tree_size=pair.tree_size();\n        size=pair.size();\n        if (world.rank()==0) print(\"Hylleraas-3term;  tree size\",tree_size);\n        if (world.rank()==0) print(\"Hylleraas-3term;  size     \",size);\n\n        // initial energy\n        double ke,pe;\n        real_function_3d pot1=real_factory_3d(world).f(Z2);\n        real_function_3d pot2=real_factory_3d(world).f(Z2);\n\n        compute_energy(world,pair,pot1,pot2,ke,pe);\n\n        return 0;\n    }\n\n\n    // one orbital at a time\n\treal_function_3d orbital=real_factory_3d(world).f(he_orbital_McQuarrie);\n\n\t{\n\t\tlong tree_size=orbital.tree_size();\n\t\tlong size=orbital.size();\n\t\tif (world.rank()==0) {\n\t\t    print(\"orbital.tree_size()\",tree_size);\n\t\t    print(\"orbital.size()     \",size);\n\t\t}\n\t}\n\n\n    {\n    \tdouble norm=inner(orbital,orbital);\n    \torbital.scale(1.0/sqrt(norm));\n//\torbital.print_tree();\n\n    \t// compute kinetic energy\n    \tdouble kinetic_energy = 0.0;\n    \tfor (int axis=0; axis<3; axis++) {\n    \t\treal_derivative_3d D = free_space_derivative<double,3>(world, axis);\n    \t\treal_function_3d dpsi = D(orbital);\n    \t\tkinetic_energy += 0.5*inner(dpsi,dpsi);\n    \t}\n    \tif (world.rank()==0) print(\"kinetic energy/electron  :\", kinetic_energy);\n\n    \t// compute potential energy\n    \treal_function_3d one_el_pot=real_factory_3d(world).f(Z2);\n    \tdouble pe=inner(orbital,one_el_pot*orbital);\n    \tif (world.rank()==0) print(\"potential energy/electron:\",pe);\n    }\n\n\n    real_function_6d pair;\n    double energy;\n    // where we start and where we end\n    double current_thresh=1.e-2;\n    const double max_thresh=FunctionDefaults<6>::get_thresh();\n\n    if (not restart) {\n        pair=hartree_product(orbital,orbital);\n\n        LoadBalanceDeux<6> lb(world);\n        double ncoeff=std::pow(FunctionDefaults<6>::get_k(),6);\n        lb.add_tree(pair,LBCost(1.0,ncoeff));\n        FunctionDefaults<6>::redistribute(world, lb.load_balance(2.0,false));\n\n        // normalize pair function\n        double norm=inner(pair,pair);\n        pair.scale(1.0/sqrt(norm));\n    } else {\n        load_function(world,pair,restart_name);\n    \tpair=project(pair,FunctionDefaults<6>::get_k(),pair.thresh());\t// change to appropriate k\n        if (world.rank()==0) {\n            print(\"restart from file \",restart_name);\n            print(\"k                 \",pair.k());\n            print(\"thresh            \",pair.thresh());\n//            print(\"read energy       \",energy);\n        }\n        current_thresh=pair.thresh();\n    }\n    if(world.rank() == 0) printf(\"\\npair function at time %.1fs\\n\\n\", wall_time());\n\n    {\n    \tlong tree_size=pair.tree_size();\n    \tlong size=pair.size();\n    \tif (world.rank()==0) {\n    \t    print(\"pair.tree_size()\",tree_size);\n    \t    print(\"pair.size()     \",size);\n    \t}\n    }\n\n    // initial energy\n//    if (not restart) {\n        double ke,pe;\n        real_function_3d pot1=real_factory_3d(world).f(Z2);\n        real_function_3d pot2=real_factory_3d(world).f(Z2);\n//        // Coulomb potential\n//        real_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n////        real_function_3d orbital2=real_factory_3d(world).f(he_orbital_McQuarrie);\n//        real_function_3d rho = 0.5*square(orbital).truncate();\n//        real_function_3d coulpot = op(rho).truncate();\n//        pot1+=coulpot;\n//        pot2+=coulpot;\n\n\n        compute_energy(world,pair,pot1,pot2,ke,pe);\n        energy=ke+pe;\n        if (world.rank()==0) print(\"computed energy   \",energy);\n//    }\n\n    // solve for thresh=1.e-3\n    if (current_thresh>1.e-3) {\n        FunctionDefaults<6>::set_thresh(1.e-3);\n    \treal_function_6d pair1=project(pair,FunctionDefaults<6>::get_k(),1.e-3);\n    \tsolve(world,pair1,energy,4,1.e-4);\n    \tpair=pair1;\n    \tcurrent_thresh=1.e-3;\n    }\n\n    // solve for thresh=1.e-4\n    if ((current_thresh>1.e-4) and (max_thresh<9.e-4)) {\n        FunctionDefaults<6>::set_thresh(1.e-4);\n    \treal_function_6d pair1=project(pair,FunctionDefaults<6>::get_k(),1.e-4);\n    \tsolve(world,pair1,energy,8,1.e-4);\n    \tpair=pair1;\n    \tcurrent_thresh=1.e-4;\n    }\n\n    // solve for thresh=1.e-5\n    if ((current_thresh>1.e-5) and (max_thresh<9.e-5)) {\n        FunctionDefaults<6>::set_thresh(1.e-5);\n    \treal_function_6d pair1=project(pair,FunctionDefaults<6>::get_k(),1.e-5);\n    \tsolve(world,pair1,energy,8,1.e-8);\n    \tpair=pair1;\n        current_thresh=1.e-5;\n    }\n\n    // solve for thresh=1.e-6\n    if (max_thresh<9.e-6) {\n        FunctionDefaults<6>::set_thresh(1.e-6);\n    \treal_function_6d pair1=project(pair,FunctionDefaults<6>::get_k(),1.e-6);\n    \tsolve(world,pair1,energy,8,1.e-8);\n    \tpair=pair1;\n    }\n\n    // finally solve\n    FunctionDefaults<6>::set_thresh(max_thresh);\n    solve(world,pair,energy,10,1.e-8);\n\n#endif\n\n\n     // hylleraas for ACS\n#if 0\n\n     FunctionDefaults<3>::set_k(k);\n     FunctionDefaults<3>::set_thresh(thresh);\n     FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n\n     FunctionDefaults<6>::set_k(k);\n     FunctionDefaults<6>::set_thresh(thresh);\n     FunctionDefaults<6>::set_cubic_cell(-L/2,L/2);\n     FunctionDefaults<6>::set_tensor_type(TT_2D);\n\n\n     print(\"polynomial order:  \", FunctionDefaults<6>::get_k());\n     print(\"threshold:         \", FunctionDefaults<6>::get_thresh());\n     print(\"cell size:         \", L);\n     print(\"truncation mode:   \", FunctionDefaults<6>::get_truncate_mode());\n     print(\"tensor type:       \", FunctionDefaults<6>::get_tensor_type());\n\n\t // plot circle with radius 0.5, with electron 2 at (0.0, 0.5, 0.0)\n     if (0) {\n\t     coord_3d el2(0.0);\n\t     const double phi=1.0;\n\t     const double radius=0.5;\n\t     el2[0]=radius * sin(phi);\n\t     el2[1]=radius * cos(phi);\n \t\t std::string filename=\"hylleraas_plotfile_k\"+stringify(k)+\"_eps\"+stringify(thresh);\n\t\t trajectory<6> traj(0.5,el2,201);\n\t\t plot_along<6>(world,traj,hylleraas_3term,filename);\n\t\t print(\"plotting done\");\n     }\n\n     // pair function\n//     real_function_6d pair=real_factory_6d(world).f(he_correlation);\n     real_function_6d pair=real_factory_6d(world).f(hylleraas_3term);\n//     print(\"Hylleraas correlation part: 3-term minus Ed's HF\");\n     print(\"Hylleraas-3term;  tree size\",pair.tree_size());\n     print(\"Hylleraas-3term;  size     \",pair.size());\n\n     // normalize pair function\n     double norm=inner(pair,pair);\n     print(\"norm(ij_pair)\",norm);\n     pair.scale(1.0/sqrt(norm));\n\n     print(\"Hylleraas-3term;  tree size\",pair.tree_size());\n     print(\"Hylleraas-3term;  size     \",pair.size());\n\n\t // plot circle with radius 0.5, with electron 2 at (0.0, 0.5, 0.0)\n     {\n\t\t coord_3d el2(0.0);\n\t\t const double phi=1.0;\n\t\t const double radius=0.5;\n\t\t el2[0]=radius * sin(phi);\n\t\t el2[1]=radius * cos(phi);\n\t\t std::string filename=\"plotfile_k\"+stringify(k)+\"_eps\"+stringify(thresh);\n\t\t trajectory<6> traj(0.5,el2,201);\n\t\t plot_along<6>(world,traj,pair,filename);\n     }\n\n     // plot xy plane containing the origin\n     for (int i=0; i<20; i++) {\n    \t coord_6d fix_coord(0.0);\n    \t // electron 2:\n    \t fix_coord[3]=0.0;\n    \t fix_coord[4]=0.1+0.1*i;\n    \t fix_coord[5]=0.0;\n\n    \t std::shared_ptr<FunctionImpl<double,6> > pair_impl=pair.get_impl();\n    \t Tensor<double> cell(6,2);\n    \t cell(Slice(_),0)=-2.0;\n    \t cell(Slice(_),1)= 2.0;\n    \t std::string filename=\"plot_plane_d\"+stringify(fix_coord[4])+\"_k\"+stringify(k)+\"_eps\"+stringify(thresh);\n    \t pair_impl->print_plane(filename,\"xy\",fix_coord,cell);\n\n     }\n     if (1) {\n\t\t // plot function thru xy plane containing the origin\n\t\t std::shared_ptr<FunctionImpl<double,6> > pair_impl=pair.get_impl();\n\t\t Tensor<double> cell(6,2);\n\t\t cell(Slice(_),0)=-2.0;\n\t\t cell(Slice(_),1)= 2.0;\n\t\t std::string filename=\"plot_function_k\"+stringify(k)+\"_eps\"+stringify(thresh);\n\t\t FILE * f = fopen(filename.c_str(), \"w\");\n\t\t if(!f) MADNESS_EXCEPTION(\"plotvtk: failed to open the plot file\", 0);\n\n         fprintf(f,\"\\\\psset{xunit=4cm}\\n\");\n         fprintf(f,\"\\\\psset{yunit=4cm}\\n\");\n         fprintf(f,\"\\\\begin{pspicture}(0,0)(0,4)\\n\");\n         fprintf(f,\"\\\\pslinewidth=0.05pt\\n\");\n\n\n\t\t for (int i=-100; i<100; i++) {\n\t\t\t for (int j=-100; j<100; j++) {\n\t\t\t\t coord_6d fix_coord(0.0);\n\t\t\t\t // electron 2:\n\t\t\t\t fix_coord[0]=0.0+i*0.05;\n\t\t\t\t fix_coord[1]=0.0+j*0.05;\n\t\t\t\t fix_coord[2]=0.0;\n\t\t\t\t fix_coord[3]=0.0;\n\t\t\t\t fix_coord[4]=0.5;\n\t\t\t\t fix_coord[5]=0.0;\n\t\t\t\t print(\"coord\",fix_coord);\n\t\t\t\t fprintf(f,\"%12.8f   %12.8f   %12.8f\\n\",fix_coord[0],fix_coord[1],pair(fix_coord));\n\t\t\t }\n\t\t }\n\n         fprintf(f,\"\\\\end{pspicture}\\n\");\n\t\t fclose(f);\n\n     }\n\n#if 0\n\n     // compute kinetic energy\n     double kinetic_energy = 0.0;\n     for (int axis=0; axis<6; axis++) {\n     \treal_derivative_6d D = free_space_derivative<double,6>(world, axis);\n     \treal_function_6d dpsi = D(pair);\n     \tkinetic_energy += 0.5*inner(dpsi,dpsi);\n     \tprint(\"done with axis\",axis);\n     }\n     print(\"kinetic energy:\", kinetic_energy);\n\n     if(world.rank() == 0) printf(\"\\nkinetic at time %.1fs\\n\\n\", wall_time());\n\n\n     // compute potential energy\n     double potential_energy=0.0;\n     {\n \t\t// doomed copy of pair, to save pair\n \t\treal_function_6d copy_of_pair=copy(pair);\n\n \t\t// two-electron interaction potential\n \t\treal_function_6d eri=ERIFactory<double,6>(world).dcut(dcut);\n\n \t    // one-electron potential\n \t    real_function_3d pot1=real_factory_3d(world).f(Z2);\n \t    real_function_3d pot2=real_factory_3d(world).f(Z2);\n\n\n \t\treal_function_6d v11=CompositeFactory<double,6,3>(world)\n \t\t\t\t.ket(copy_of_pair.get_impl())\n \t\t\t\t.g12(eri.get_impl())\n \t\t\t\t.V_for_particle1(pot1.get_impl())\n \t\t\t\t.V_for_particle2(pot2.get_impl())\n \t\t\t\t;\n\n\n \t\tdouble a=inner(pair,v11);\n \t\tprint(\"<phi|V_tot|phi> \", a);\n \t\tpotential_energy=a;\n     }\n\n\n     print(\"for Hylleraas 3-term\");\n     print(\"total energy   :\",kinetic_energy+potential_energy);\n     print(\"expected energy:\",-2.902432);\n#endif\n\n\n\n#endif\n\n\n     if(world.rank() == 0) printf(\"\\nfinished at time %.1fs\\n\\n\", wall_time());\n     world.gop.fence();\n\n     finalize();\n     return 0;\n}\n\n\n"
  },
  {
    "path": "src/examples/hello.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n/// \\file examples/hello.cc\n/// \\brief Simplest example program for MADNESS\n/// \\defgroup hellowworldmad Hello world MADNESS style\n/// \\ingroup examples\n///\n/// Simplest program that initializes the MADNESS parallel runtime\n/// using initialize(), makes a madness::World object, prints\n/// a greeting, and then cleans up.\n///\n/// To initialize the MADNESS numerical environment you also need\n/// \\c startup(world,argc,argv) and should include mra/mra.h rather\n/// than world/MADworld.h .\n\n#include <madness/world/MADworld.h>\n\nint main(int argc, char** argv) {\n    madness::initialize(argc,argv);\n    madness::World world(SafeMPI::COMM_WORLD);\n\n    madness::print(\"Hello from processor\",world.rank());\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/input_tdhf_virtuals",
    "content": "plot\n plane x2 x3\n zoom 1.0\n npoints 50\n origin 0.5 0.0 0.0\nend\n\ndft\n xc hf\n k 8\n econv 1.e-5\n dconv 1.e-4\n protocol 1.e-5\n canon\n nuclear_corrfac none\n charge 1\nend\n\nexcite\nguess_thresh 1.e-3\nsolve_thresh 1.e-4\nsolve_seq_thresh 1.e-5\nend\n\nTDA\n compute_virtuals\n guess octopole\n guess_excitations 8\n iterating_excitations 8\n excitations 7\n iter_max 30\n guess_iter 3\n solve_iter 4\n econv 5.e-4\n dconv 2.e-2\n guess_econv 5.e-3\n guess_dconv 5.e-2\n hard_dconv 1.e-3\n hard_econv 1.e-4\nno_otf\nend\n\n# also possible:\nguess auto-3 #,4,5,6\n\ngeometry\nb 0.0 0.0 0.0\nend\n"
  },
  {
    "path": "src/examples/madinfo.cc",
    "content": "/*\n * cheminfo_prog.cc\n *\n *  Created on: Jan 20, 2020\n *      Author: fbischoff\n */\n\n#include <string>\n#include <iostream>\n\n#include \"madness/misc/info.h\"\n#include <madness/madness_config.h>\nint main() {\n\n        std::cout << \"The git source tree description at compile time is:   \" << madness::info::git_source_description() << std::endl;\n\tstd::string line2(madness::info::build_time());\n\tstd::string line3(madness::info::build_date());\n\tstd::cout << \"MADNESS built on:                      \" << line3  << \" at \" << line2 << std::endl;\n\n\treturn 0;\n\n}\n"
  },
  {
    "path": "src/examples/molecularmask.h",
    "content": "#ifndef MOLECULAR_MASK_H\n#define MOLECULAR_MASK_H\n\n#include <madness/mra/mra.h>\n#include <madness/constants.h>\n#include <cmath>\n#include <vector>\n\n// Distance between two points in 3D\ninline double distance(const madness::coord_3d& a, const madness::coord_3d& b) {\n    double x = a[0] - b[0];\n    double y = a[1] - b[1];\n    double z = a[2] - b[2];\n    return sqrt(x*x + y*y + z*z);\n}\n\n// Basic functionality for the mask\nclass MolecularMaskBase {\nprotected:\n    const double sigma;\n    const std::vector<double> atomic_radii;\n    const std::vector<madness::coord_3d> atomic_coords;\n    const int natom;\n\n    // signed distance function for point r relative to sphere radius R at center\n    double sdf(const madness::coord_3d& r, const madness::coord_3d& center, double R) const {\n        return distance(r,center) - R;\n    }\n\n    // gradient of the signed distance function\n    madness::coord_3d grad_sdf(const madness::coord_3d& r, const madness::coord_3d& center) const {\n        return (r - center)*(1.0/distance(r,center));\n    }\n\n    // Mask or characteristic function (argument s is the signed distance)\n    double mask(double s) const {\n        if (s > 6.0) return 0.0;\n        else if (s < -6.0) return 1.0;\n        else return 0.5*erfc(s);\n    }\n\n    // Complement of the mask or characteristic function (argument s is the signed distance)\n    double cmask(double s) const {\n        return mask(-s);\n    }\n\n    // Derivative of the mask w.r.t. s\n    double dmask(double s) const {\n        const double fac = 1.0/sqrt(madness::constants::pi);\n        if (fabs(s) > 6.0) return 0.0;\n        return -exp(-s*s)*fac;\n    }\n\n    // Mask or characteristic function for atom i\n    double atomic_mask(const madness::coord_3d& r, unsigned int i) const {\n        double s = sdf(r, atomic_coords[i], atomic_radii[i]);\n        return mask(s/sigma);\n    }\n\n    // Complement of the mask or characteristic function for atom i\n    // (we use this directly to avoid numerical cancellation)\n    double atomic_cmask(const madness::coord_3d& r, unsigned int i) const {\n        double s = sdf(r, atomic_coords[i], atomic_radii[i]);\n        return cmask(s/sigma);\n    }\n\n    // Gradient of the atomic mask\n    madness::coord_3d grad_atomic_mask(const madness::coord_3d& r, unsigned int i) const {\n        double s = sdf(r, atomic_coords[i], atomic_radii[i]);\n        return grad_sdf(r,atomic_coords[i])*(dmask(s/sigma)/sigma);\n    }\n\n    // Gradient of the molecular mask\n    madness::coord_3d gradient(const madness::coord_3d& r) const {\n        // precompute the atomic masks\n        std::vector<double> m(natom);\n        double value = 1.0;\n        for (int i=0; i<natom; i++) {\n            m[i] = atomic_cmask(r,i);\n            value *= m[i];\n        }\n        \n        // return 0.0 if not in the surface\n        if (value<1e-12 || (1.0-value)<1e-12) return madness::coord_3d(0.0);\n        \n        madness::coord_3d grad(0.0);\n        for (int i=0; i<natom; i++) {\n            if (m[i] > 1e-12) \n                grad += grad_atomic_mask(r,i)*(value/m[i]);\n        }\n        return grad;\n    }\n\npublic:\n    MolecularMaskBase(double sigma, \n                      const std::vector<double> atomic_radii,\n                      const std::vector<madness::coord_3d> atomic_coords) \n        : sigma(sigma)\n        , atomic_radii(atomic_radii)\n        , atomic_coords(atomic_coords)\n        , natom(atomic_coords.size())\n    {\n        MADNESS_ASSERT(atomic_radii.size() == atomic_coords.size());\n    }\n\n    std::vector< madness::Vector<double,3> > special_points() const {\n        std::vector< madness::Vector<double,3> > v;\n        int npt = 4;\n        for (int t=0; t<=npt; t++) {\n            const double theta = madness::constants::pi*double(t)/double(npt);\n            for (int p=0; p<2*npt; p++) {\n                const double phi = 2.0*madness::constants::pi*double(p)/double(2*npt);\n                const double xx = std::sin(theta)*std::cos(phi);\n                const double yy = std::sin(theta)*std::sin(phi);\n                const double zz = std::cos(theta);\n                for (int i=0; i<natom; i++) {\n                    const double x = atomic_coords[i][0] + atomic_radii[i]*xx;\n                    const double y = atomic_coords[i][1] + atomic_radii[i]*yy;\n                    const double z = atomic_coords[i][2] + atomic_radii[i]*zz;\n                    v.push_back({x,y,z});\n                }\n                if (t==0 || t==npt) break;\n            }\n        }\n        return v;\n    }\n};\n\n// This functor is one inside the molecule, 1/2 on the surface, and zero\n// exterior to the molecule.\nclass MolecularVolumeMask : private MolecularMaskBase\n                          , public madness::FunctionFunctorInterface<double,3> {\npublic:\n    MolecularVolumeMask(double sigma, \n                        const std::vector<double> atomic_radii,\n                        const std::vector<madness::coord_3d> atomic_coords) \n        : MolecularMaskBase(sigma, atomic_radii, atomic_coords)\n    {}\n\n    virtual double operator()(const madness::coord_3d& r) const {\n        double value = 1.0;\n        for (int i=0; i<natom; i++) {\n            value *= atomic_cmask(r,i);\n        }\n        return 1.0 - value;\n    }\n\n    std::vector< madness::Vector<double,3> > special_points() const {\n        return MolecularMaskBase::special_points();\n    }\n};\n\n// This functor is zero inside the molecule, 1/2 on the surface, and one\n// exterior to the molecule.\nclass MolecularVolumeComplementMask : private MolecularMaskBase\n                                    , public madness::FunctionFunctorInterface<double,3> {\npublic:\n    MolecularVolumeComplementMask(double sigma, \n                                  const std::vector<double> atomic_radii,\n                                  const std::vector<madness::coord_3d> atomic_coords) \n        : MolecularMaskBase(sigma, atomic_radii, atomic_coords)\n    {}\n    \n    virtual double operator()(const madness::coord_3d& r) const {\n        double value = 1.0;\n        for (int i=0; i<natom; i++) {\n            value *= atomic_cmask(r,i);\n        }\n        return value;\n    }\n\n    std::vector< madness::Vector<double,3> > special_points() const {\n        return MolecularMaskBase::special_points();\n    }\n\n};\n\n/// Switches between \\a positive values \\c Vint and \\c Vext with special log derivative\n\n\n/// Switches between \\a positive values \\c Vint on the interior and \\c Vext on the interior.\n/// It has value \n/// \\f[\n///  V_(r,\\sigma) = \\exp \\left( \\log V_{int} C(r,\\sigma) + \\log V_{ext} (1 - C(r,\\sigma)  \\right)\n///  = V_{ext} \\exp \\left( \\log \\frac{V_{int}}{V_{ext}} C(r,\\sigma) \\right)\n///  = V_{int} \\exp \\left( \\log \\frac{V_{ext}}{V_{int}} \\overline{C}(r,\\sigma) \\right)\n/// \\f]\n/// where \\f$ C(r,\\sigma) \\f$ is the regular volume mask provided by MolecularVolumeMask,\n/// and \\f$ \\overline{C} \\f$ is its complement.\n/// Its log-derivative is precisely located in the surface with value\n/// \\f[ \n/// \\nabla \\log V = \\frac{\\nabla V}{V} = \\log \\frac{V_{int}}{V_{ext}} \\nabla C\n/// \\f] \n/// with \\f$ \\nabla C \\f$ already being computed by MolecularVolumeMaskGrad.\n/// The advantage of this is that if \\f$ \\| V_{ext} - V_{int} \\| \\f$\n/// is big, the log derivative of the regular volume mask (\\f$ C \\f$) is\n/// displaced from the surface (perhaps by multiple values of \\f$\n/// \\sigma \\f$).  This leads to slow convergence w.r.t \\f$ \\sigma \\f$ and \n/// potential inaccuracies depending how the numerical representation is computed. \n/// The surface charge\n/// in dielectric problems is controlled by \\f$ \\nabla \\log \\epsilon\n/// \\f$ and hence the dielectric should employ this form of the switch.\nclass MolecularVolumeExponentialSwitch : public madness::FunctionFunctorInterface<double,3> {\n    const MolecularVolumeComplementMask cmask;\n    const double Vint, Vext, fac;\npublic:\n    MolecularVolumeExponentialSwitch(double sigma, \n                                     double Vint, \n                                     double Vext,\n                                     const std::vector<double> atomic_radii,\n                                     const std::vector<madness::coord_3d> atomic_coords) \n        : cmask(sigma, atomic_radii, atomic_coords)\n        , Vint(Vint)\n        , Vext(Vext)\n        , fac(log(Vext/Vint))\n    {\n        if (Vint <= 0 || Vext <= 0) throw \"Only works for positive values\";\n    }\n    \n    virtual double operator()(const madness::coord_3d& r) const {\n        double c = cmask(r);\n        if (c == 0.0) return Vint;\n        else if (c == 1.0) return Vext;\n        else return Vint * exp(fac * c); \n    }\n\n    std::vector< madness::Vector<double,3> > special_points() const {\n        return cmask.special_points();\n    }\n};\n\n/// Computes the reciprocal of MolecularVolumeExponentialSwitch\nclass MolecularVolumeExponentialSwitchReciprocal : public madness::FunctionFunctorInterface<double,3> {\n    const MolecularVolumeExponentialSwitch s;\npublic:\n    MolecularVolumeExponentialSwitchReciprocal(double sigma, \n                                               double Vint, \n                                               double Vext,\n                                               const std::vector<double> atomic_radii,\n                                               const std::vector<madness::coord_3d> atomic_coords) \n        : s(sigma, Vint, Vext, atomic_radii, atomic_coords)\n    {}\n    \n    virtual double operator()(const madness::coord_3d& r) const {\n        return 1.0/s(r);\n    }\n};\n\n\n// This functor is a shell that limits to a delta function in the\n// molecular surface and integrates to the molecular surface area.\nclass MolecularSurface : private MolecularMaskBase\n                       , public madness::FunctionFunctorInterface<double,3> {\npublic:\n    MolecularSurface(double sigma, \n                     const std::vector<double> atomic_radii,\n                     const std::vector<madness::coord_3d> atomic_coords) \n        : MolecularMaskBase(sigma, atomic_radii, atomic_coords)\n    {}\n\n    virtual double operator()(const madness::coord_3d& r) const {\n        madness::coord_3d grad = gradient(r);\n        return sqrt(grad[0]*grad[0] + grad[1]*grad[1] + grad[2]*grad[2]);\n    }\n\n    std::vector< madness::Vector<double,3> > special_points() const {\n        return MolecularMaskBase::special_points();\n    }\n};\n\n// Evaluates component i (0=x, 1=y, 2=z) of the gradient of the mask\nclass MolecularVolumeMaskGrad : private MolecularMaskBase\n                              , public madness::FunctionFunctorInterface<double,3> {\n    const int i;\npublic:\n    MolecularVolumeMaskGrad(double sigma, \n                     const std::vector<double> atomic_radii,\n                     const std::vector<madness::coord_3d> atomic_coords,\n                     int i) \n        : MolecularMaskBase(sigma, atomic_radii, atomic_coords)\n        , i(i)\n    {}\n\n    virtual double operator()(const madness::coord_3d& r) const {\n        madness::coord_3d grad = gradient(r);\n        return grad[i];\n    }\n\n    std::vector< madness::Vector<double,3> > special_points() const {\n        return MolecularMaskBase::special_points();\n    }\n};\n\n/// Returns the requested component of the derivative of the log of MolecularVolumeExponentialSwitch\nclass MolecularVolumeExponentialSwitchLogGrad : public madness::FunctionFunctorInterface<double,3> {\n    const MolecularVolumeMaskGrad g;\n    const double fac;\npublic:\n    MolecularVolumeExponentialSwitchLogGrad(double sigma, \n                                            double Vint, \n                                            double Vext,\n                                            const std::vector<double> atomic_radii,\n                                            const std::vector<madness::coord_3d> atomic_coords,\n                                            int i) \n        : g(sigma, atomic_radii, atomic_coords, i)\n        , fac(log(Vint/Vext))\n    {\n        if (Vint <= 0 || Vext <= 0) throw \"Only works for positive values\";\n    }\n    \n    virtual double operator()(const madness::coord_3d& r) const {\n        return fac * g(r);\n    }\n\n    std::vector< madness::Vector<double,3> > special_points() const {\n        return g.special_points();\n    }\n};\n\n#endif\n"
  },
  {
    "path": "src/examples/molecularsurface.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/sdf_shape_3D.h>\n#include <madness/mra/funcplot.h>\n#include \"molecularmask.h\"\n#include <madness/constants.h>\n#include <vector>\n\nusing namespace madness;\nusing namespace std;\n\n// Crude macro for timing\ndouble XXstart;\n#define TIME(MSG,X) XXstart=wall_time();         \\\n                    X; \\\n                    if (world.rank() == 0) print(\"timer:\",MSG,\"used\",wall_time()-XXstart) \\\n\n// Area of two intersecting spheres separated by d\ndouble area_two_spheres(double r1, double r2, double d) {\n    if (d > r1+r2) d = r1 + r2;\n    return constants::pi*(2*d*r1*r1+2*d*r2*r2+r1*r1*r1+r1*d*d-r1*r2*r2+r2*d*d-r2*r1*r1+r2*r2*r2)/d;\n}\n\n// Volume of two intersecting spheres separated by d\ndouble volume_two_spheres(double r1, double r2, double d) {\n    if (d > r1+r2) return 0.0;\n    double overlap = constants::pi*(r1+r2-d)*(r1+r2-d)*(d*d + 2*d*r1 + 2*d*r2 - 3*r1*r1 - 3*r2*r2 + 6*r1*r2)/(12*d);\n    return 4.0*constants::pi*(r1*r1*r1 + r2*r2*r2)/3.0 - overlap;\n}\n\n\nint main(int argc, char **argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n    const int k = 8; // wavelet order\n    const double thresh = 1e-6; // truncation threshold\n    const double L = 5; // box is [-L,L]\n    const int natom = 2; // number of atoms\n    const double sigma = 0.5; // Surface width\n\n    // Function defaults\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_cubic_cell(-L, L);\n    FunctionDefaults<3>::set_initial_level(2);\n\n    // Set up atomic coordinates and radii\n    vector<double> atomic_radii(natom);\n    vector<coord_3d> atomic_coords(natom);\n     for (int i=0; i<natom; i++) {\n       atomic_radii[i] = 1.0 + i*0.5;\n        atomic_coords[i][0] = 0.0;\n        atomic_coords[i][1] = 0.0;\n        atomic_coords[i][2] = i*1.5;\n        print(\"atom\",i,atomic_coords[i],atomic_radii[i]);\n    }\n\n    real_functor_3d volume_functor(new MolecularVolumeMask(sigma, atomic_radii, atomic_coords));\n    real_functor_3d surface_functor(new MolecularSurface(sigma, atomic_radii, atomic_coords));\n\n    TIME(\"make volume \", real_function_3d volume = real_factory_3d(world).functor(volume_functor));\n    TIME(\"make surface\", real_function_3d surface = real_factory_3d(world).functor(surface_functor).truncate_on_project());\n\n    print(\"the volume is\", volume.trace());\n    print(\"the area   is\", surface.trace());\n\n    if (natom == 2) {\n        double d = ::distance(atomic_coords[0],atomic_coords[1]);\n        double r1 = atomic_radii[0];\n        double r2 = atomic_radii[1];\n        print(\"d\",d,\"r1\",r1,\"r2\",r2,\"r1+r2-d\",r1+r2-d);\n        print(\"analytic volume intersecting spheres\", volume_two_spheres(r1, r2, d));\n        print(\"analytic area   intersecting spheres\", area_two_spheres(r1, r2, d));\n    }\n\n    std::vector<long> npt(3,401);\n    Tensor<double> cell(3,2);\n    cell(_,0) = -5;\n    cell(_,1) =  5;\n\n    TIME(\"plot surface\",plotdx(surface, \"surface.dx\"));\n    TIME(\"plot volume \",plotdx(volume, \"volume.dx\", cell, npt));\n    TIME(\"plot povray \",plotpovray(volume, \"volume.df3\", cell, npt));\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/navstokes_cosines.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n\n/*!\n  \\file navstokes_cosines.cc\n  \\brief Example Solving the Navier-Stokes equations\n  \\defgroup examplense Solves a Navier-Stokes equation\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/navstokes_cosines.cc >here</a>.\n\n  \\par Points of interest\n  - convolution with periodic Green's function (Possion/Coulomb kernel and Modified Helmholtz/Bound State Helmholtz/Yukawa kernel)\n  - output data for ParaView\n\n  \\par Background\n  This illustrates the solution of a Navier-Stokes equation for incompressible flows,\n  \\f{eqnarray*}{\n  u_t - u \\cdot \\nabla u + \\nabla p & = &\\mu \\Delta u + f \\\\\n  \\nabla \\cdot u & = & 0\n  \\f}\n  where the force and the viscocity  \\f$ f \\f$ and \\f$ \\mu \\f$ are given in the code.\n\n  \\par Implementation\n\n    Step 1.  Calculate the pressure at time \\f$ n+1 \\f$ explicitly.\n    \\f[\n    \\Delta p = \\nabla \\cdot (f - u_{n} \\cdot \\nabla u_{n} )\n    \\f]\n    Everything in the RHS is either given or known; thus \\f$p\\f$ can be obtained by applying a Coulomb operator.\n\n    Step 2.  Calculate the velocity at time n+1.\n    \\f[\n    (\\frac{1}{ \\delta t \\mu } - \\Delta) u_{n+1} = \\frac {f - \\nabla p - u_n \\cdot \\nabla u_n }{ \\mu } + \\frac {u_n}{ \\delta t \\mu }\n    \\f]\n    Again, \\f$u_{n+1}\\f$ is calculated by applying the BSH operator to the RHS.\n\n    The resulting method is a first order in time scheme and can be extended by Spectral/Krylov deferred corrections to construct higher order methods.\n    Particularly, the construction of a second order scheme under this frame is easy and similar to the Crank-Nicolson technique, which is also demonstrated by the example.\n\n    \\par Reference\n    Jia, J.; Hill, J.; Fann, G. & Harrison, R. J.\n    MULTIRESOLUTION FAST METHODS FOR A PERIODIC 3-D NAVIER-STOKES SOLVER\n    Proceedings of the Eighth International Symposium on Distributed Computing and Applications to Business, Engineering and Science, Publishing House of Electronics Industry, 2009\n\n\n*/\n\n\n#include <madness/mra/vmra.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n\ntypedef Vector<double, 3> coordT3d,coordT;\ntypedef Vector<double, 1> coordT1d;\ntypedef Function<double, 3> functionT;\ntypedef std::vector<functionT> functT;\nconst double pi=madness::constants::pi;\n\nconst double L = 2*pi; //Cell length\nconst double N = 8.0;\n\nconst double mu = 1; // Effective Viscosity\nconst double deltaT = pi*0.0001; // Size of time step\nconst int Nts = L/deltaT+10; // Number of time steps\nconst int k = 10; // Wavelet order (usually precision + 2)\nconst double pthresh = 1.e-9; // Precision\nconst double pthresh1 = 1e-10;// * pthresh;\nconst double uthresh = pthresh; // Precision\nconst double uthresh1 = pthresh1;\n\n\ndouble mytime = 0.0; // Global variable for the current time\n// This should be passed in thru the class or app context\nconst double cc = 0;// L/(deltaT*Nts)/2;\n\n//wrapper, but no longer needed.\nstruct FunctorInterfaceWrapper : public FunctionFunctorInterface<double,3> {\n    double (*f)(const coordT&);\n\n    FunctorInterfaceWrapper(double (*f)(const coordT&)) : f(f) {}\n\n    double operator()(const coordT& x) const {return f(x);}\n};\n\ntemplate<typename T, int NDIM> //used to simplifying the mirgrating to new bc. use with caution if you change your bc at runtime.\nstatic Function<T,NDIM> diff(const Function<T,NDIM>& f, int axis) {\n\tstatic Vector<std::shared_ptr<Derivative<T,NDIM> >,NDIM> df;\n\tif (df[axis] == nullptr) df[axis] = std::shared_ptr<Derivative<T,NDIM> >(new Derivative<T,NDIM>(f.world(), axis));\n\treturn (*df[axis])(f);\n}\n\n//*****************************************************************************\nstatic double init_zero(const coordT3d& r) {\n\treturn 0.0;\n}\n//*****************************************************************************\n//*****************************************************************************\n\nstatic double uxexact(const coordT3d& r) {\n\tconst double x=r[0]+cc*mytime, y = r[1], z = r[2];\n\tdouble t = mytime;\n\n\treturn cos(.5*t) * sin(x) * sin(x) * (sin(2. * y) * sin(z) * sin(z) - sin(y)\n\t\t\t* sin(y) * sin(2. * z));\n\n}\n//*****************************************************************************\n//*****************************************************************************\nstatic double uyexact(const coordT3d& r) {\n\tconst double x=r[0]+cc*mytime, y = r[1], z = r[2];\n\tdouble t = mytime;\n\n\treturn cos(.5*t) * sin(y) * sin(y) * (sin(2. * z) * sin(x) * sin(x) - sin(z)\n\t\t\t* sin(z) * sin(2. * x));\n}\n//*****************************************************************************\n//*****************************************************************************\nstatic double uzexact(const coordT3d& r) {\n\tconst double x=r[0]+cc*mytime, y = r[1], z = r[2];\n\tdouble t = mytime;\n\n\treturn cos(.5*t) * sin(z) * sin(z) * (sin(2. * x) * sin(y) * sin(y) - sin(x)\n\t\t\t* sin(x) * sin(2. * y));\n}\n//*****************************************************************************\n//*****************************************************************************\nstatic double fxexact(const coordT3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n        double t = mytime ;\n\n return -sin(t / 0.2e1) * pow(sin(x + cc * t), 0.2e1) * (sin(0.2e1 * y) * pow(sin(z), 0.2e1) - pow(sin(y), 0.2e1) * sin(0.2e1 * z)) / 0.2e1 + 0.2e1 * cos(t / 0.2e1) * sin(x + cc * t) * (sin(0.2e1 * y) * pow(sin(z), 0.2e1) - pow(sin(y), 0.2e1) * sin(0.2e1 * z)) * cos(x + cc * t) * cc - cos(t / 0.2e1) * sin(x + cc * t) * sin(y) * cos(z) + 0.2e1 * pow(cos(t / 0.2e1), 0.2e1) * pow(sin(x + cc * t), 0.3e1) * pow(sin(0.2e1 * y) * pow(sin(z), 0.2e1) - pow(sin(y), 0.2e1) * sin(0.2e1 * z), 0.2e1) * cos(x + cc * t) + pow(cos(t / 0.2e1), 0.2e1) * pow(sin(y), 0.2e1) * (sin(0.2e1 * z) * pow(sin(x + cc * t), 0.2e1) - pow(sin(z), 0.2e1) * sin(0.2e1 * x + 0.2e1 * cc * t)) * pow(sin(x + cc * t), 0.2e1) * (0.2e1 * cos(0.2e1 * y) * pow(sin(z), 0.2e1) - 0.2e1 * sin(y) * sin(0.2e1 * z) * cos(y)) + pow(cos(t / 0.2e1), 0.2e1) * pow(sin(z), 0.2e1) * (sin(0.2e1 * x + 0.2e1 * cc * t) * pow(sin(y), 0.2e1) - pow(sin(x + cc * t), 0.2e1) * sin(0.2e1 * y)) * pow(sin(x + cc * t), 0.2e1) * (0.2e1 * sin(0.2e1 * y) * sin(z) * cos(z) - 0.2e1 * pow(sin(y), 0.2e1) * cos(0.2e1 * z)) - mu * (0.2e1 * cos(t / 0.2e1) * pow(cos(x + cc * t), 0.2e1) * (sin(0.2e1 * y) * pow(sin(z), 0.2e1) - pow(sin(y), 0.2e1) * sin(0.2e1 * z)) - 0.2e1 * cos(t / 0.2e1) * pow(sin(x + cc * t), 0.2e1) * (sin(0.2e1 * y) * pow(sin(z), 0.2e1) - pow(sin(y), 0.2e1) * sin(0.2e1 * z)) + cos(t / 0.2e1) * pow(sin(x + cc * t), 0.2e1) * (-0.4e1 * sin(0.2e1 * y) * pow(sin(z), 0.2e1) - 0.2e1 * pow(cos(y), 0.2e1) * sin(0.2e1 * z) + 0.2e1 * pow(sin(y), 0.2e1) * sin(0.2e1 * z)) + cos(t / 0.2e1) * pow(sin(x + cc * t), 0.2e1) * (0.2e1 * sin(0.2e1 * y) * pow(cos(z), 0.2e1) - 0.2e1 * sin(0.2e1 * y) * pow(sin(z), 0.2e1) + 0.4e1 * pow(sin(y), 0.2e1) * sin(0.2e1 * z)));\n}\n//*****************************************************************************\n//*****************************************************************************\nstatic double fyexact(const coordT3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n        double t = mytime ;\n\n  return -sin(t / 0.2e1) * pow(sin(y), 0.2e1) * (sin(0.2e1 * z) * pow(sin(x + cc * t), 0.2e1) - pow(sin(z), 0.2e1) * sin(0.2e1 * x + 0.2e1 * cc * t)) / 0.2e1 + cos(t / 0.2e1) * pow(sin(y), 0.2e1) * (0.2e1 * sin(0.2e1 * z) * sin(x + cc * t) * cos(x + cc * t) * cc - 0.2e1 * pow(sin(z), 0.2e1) * cos(0.2e1 * x + 0.2e1 * cc * t) * cc) + cos(t / 0.2e1) * cos(x + cc * t) * cos(y) * cos(z) + pow(cos(t / 0.2e1), 0.2e1) * pow(sin(x + cc * t), 0.2e1) * (sin(0.2e1 * y) * pow(sin(z), 0.2e1) - pow(sin(y), 0.2e1) * sin(0.2e1 * z)) * pow(sin(y), 0.2e1) * (0.2e1 * sin(0.2e1 * z) * sin(x + cc * t) * cos(x + cc * t) - 0.2e1 * pow(sin(z), 0.2e1) * cos(0.2e1 * x + 0.2e1 * cc * t)) + 0.2e1 * pow(cos(t / 0.2e1), 0.2e1) * pow(sin(y), 0.3e1) * pow(sin(0.2e1 * z) * pow(sin(x + cc * t), 0.2e1) - pow(sin(z), 0.2e1) * sin(0.2e1 * x + 0.2e1 * cc * t), 0.2e1) * cos(y) + pow(cos(t / 0.2e1), 0.2e1) * pow(sin(z), 0.2e1) * (sin(0.2e1 * x + 0.2e1 * cc * t) * pow(sin(y), 0.2e1) - pow(sin(x + cc * t), 0.2e1) * sin(0.2e1 * y)) * pow(sin(y), 0.2e1) * (0.2e1 * cos(0.2e1 * z) * pow(sin(x + cc * t), 0.2e1) - 0.2e1 * sin(z) * sin(0.2e1 * x + 0.2e1 * cc * t) * cos(z)) - mu * (cos(t / 0.2e1) * pow(sin(y), 0.2e1) * (0.2e1 * sin(0.2e1 * z) * pow(cos(x + cc * t), 0.2e1) - 0.2e1 * sin(0.2e1 * z) * pow(sin(x + cc * t), 0.2e1) + 0.4e1 * pow(sin(z), 0.2e1) * sin(0.2e1 * x + 0.2e1 * cc * t)) + 0.2e1 * cos(t / 0.2e1) * pow(cos(y), 0.2e1) * (sin(0.2e1 * z) * pow(sin(x + cc * t), 0.2e1) - pow(sin(z), 0.2e1) * sin(0.2e1 * x + 0.2e1 * cc * t)) - 0.2e1 * cos(t / 0.2e1) * pow(sin(y), 0.2e1) * (sin(0.2e1 * z) * pow(sin(x + cc * t), 0.2e1) - pow(sin(z), 0.2e1) * sin(0.2e1 * x + 0.2e1 * cc * t)) + cos(t / 0.2e1) * pow(sin(y), 0.2e1) * (-0.4e1 * sin(0.2e1 * z) * pow(sin(x + cc * t), 0.2e1) - 0.2e1 * pow(cos(z), 0.2e1) * sin(0.2e1 * x + 0.2e1 * cc * t) + 0.2e1 * pow(sin(z), 0.2e1) * sin(0.2e1 * x + 0.2e1 * cc * t)));\n\n}\n//*****************************************************************************\n//*****************************************************************************\nstatic double fzexact(const coordT3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n        double t = mytime ;\n\n  return -sin(t / 0.2e1) * pow(sin(z), 0.2e1) * (sin(0.2e1 * x + 0.2e1 * cc * t) * pow(sin(y), 0.2e1) - pow(sin(x + cc * t), 0.2e1) * sin(0.2e1 * y)) / 0.2e1 + cos(t / 0.2e1) * pow(sin(z), 0.2e1) * (0.2e1 * cos(0.2e1 * x + 0.2e1 * cc * t) * cc * pow(sin(y), 0.2e1) - 0.2e1 * sin(x + cc * t) * sin(0.2e1 * y) * cos(x + cc * t) * cc) - cos(t / 0.2e1) * cos(x + cc * t) * sin(y) * sin(z) + pow(cos(t / 0.2e1), 0.2e1) * pow(sin(x + cc * t), 0.2e1) * (sin(0.2e1 * y) * pow(sin(z), 0.2e1) - pow(sin(y), 0.2e1) * sin(0.2e1 * z)) * pow(sin(z), 0.2e1) * (0.2e1 * cos(0.2e1 * x + 0.2e1 * cc * t) * pow(sin(y), 0.2e1) - 0.2e1 * sin(x + cc * t) * sin(0.2e1 * y) * cos(x + cc * t)) + pow(cos(t / 0.2e1), 0.2e1) * pow(sin(y), 0.2e1) * (sin(0.2e1 * z) * pow(sin(x + cc * t), 0.2e1) - pow(sin(z), 0.2e1) * sin(0.2e1 * x + 0.2e1 * cc * t)) * pow(sin(z), 0.2e1) * (0.2e1 * sin(0.2e1 * x + 0.2e1 * cc * t) * sin(y) * cos(y) - 0.2e1 * pow(sin(x + cc * t), 0.2e1) * cos(0.2e1 * y)) + 0.2e1 * pow(cos(t / 0.2e1), 0.2e1) * pow(sin(z), 0.3e1) * pow(sin(0.2e1 * x + 0.2e1 * cc * t) * pow(sin(y), 0.2e1) - pow(sin(x + cc * t), 0.2e1) * sin(0.2e1 * y), 0.2e1) * cos(z) - mu * (cos(t / 0.2e1) * pow(sin(z), 0.2e1) * (-0.4e1 * sin(0.2e1 * x + 0.2e1 * cc * t) * pow(sin(y), 0.2e1) - 0.2e1 * pow(cos(x + cc * t), 0.2e1) * sin(0.2e1 * y) + 0.2e1 * pow(sin(x + cc * t), 0.2e1) * sin(0.2e1 * y)) + cos(t / 0.2e1) * pow(sin(z), 0.2e1) * (0.2e1 * sin(0.2e1 * x + 0.2e1 * cc * t) * pow(cos(y), 0.2e1) - 0.2e1 * sin(0.2e1 * x + 0.2e1 * cc * t) * pow(sin(y), 0.2e1) + 0.4e1 * pow(sin(x + cc * t), 0.2e1) * sin(0.2e1 * y)) + 0.2e1 * cos(t / 0.2e1) * pow(cos(z), 0.2e1) * (sin(0.2e1 * x + 0.2e1 * cc * t) * pow(sin(y), 0.2e1) - pow(sin(x + cc * t), 0.2e1) * sin(0.2e1 * y)) - 0.2e1 * cos(t / 0.2e1) * pow(sin(z), 0.2e1) * (sin(0.2e1 * x + 0.2e1 * cc * t) * pow(sin(y), 0.2e1) - pow(sin(x + cc * t), 0.2e1) * sin(0.2e1 * y)));\n}\n\n//*****************************************************************************\n//*****************************************************************************\n//*****************************************************************************\nstatic double pexact(const coordT3d& r) {\n\tconst double x=r[0]+cc*mytime, y = r[1], z = r[2];\n\tdouble t = mytime;\n\n\treturn cos(.5*t) * cos(x) * sin(y) * cos(z);\n}\n\n//*****************************************************************************\n//*****************************************************************************\n//*****************************************************************************\n\n// Compute the divergence\ninline functionT div(const functT& uint) {\n\treturn diff(uint[0], 0) + diff(uint[1], 1) + diff(uint[2], 2);\n}\n\n// Compute the Laplacian\ninline functionT lap(const functionT& uint) {\n\treturn diff(diff(uint, 0),0) + diff(diff(uint,1), 1) + diff(diff(uint,2), 2);\n}\n\nWorld *pworld;\n#define myfun std::vector< Function<T,NDIM> >\n\n// Compute the advection of \\c uu and store it in \\c advu for return\ntemplate<typename T, int NDIM> void adv(const myfun& uu, myfun& advu) {\n\tfor (int i=0; i < 3; ++i)  advu[i] = diff(uu[0]*uu[i],0) + diff(uu[1]*uu[i],1) + diff(uu[2]*uu[i],2);\n}\n\ntemplate<typename T, int NDIM> inline myfun operator-(const myfun& l, const myfun& r) { return sub(*pworld, l, r); }\n\nvoid testNavierStokes(int argc, char**argv) {\n\tinitialize(argc, argv);\n\ttry {\n\tWorld world(SafeMPI::COMM_WORLD);\n\n\tpworld = &world;\n\tstartup(world, argc, argv);\n\n\t// Function defaults\n\tFunctionDefaults<3>::set_k(k);\n\tFunctionDefaults<3>::set_cubic_cell(0.0, L);\n\tFunctionDefaults<3>::set_thresh(pthresh);\n\tFunctionDefaults<3>::set_bc(BC_PERIODIC);\n\n\t// construct the periodic Coulomb operator for later use\n\tSeparatedConvolution<double, 3> op = CoulombOperator (world, pthresh1, pthresh1);\n\n\t// construct the periodic BSH operator for later use\n\tdouble const dum = 1 / deltaT / mu;\n\tSeparatedConvolution<double, 3> op1 = BSHOperator<3>(world,\tsqrt(dum), uthresh1, uthresh1);\n\n\n\t// construct the periodic BSH operator for later use\n\tTensor<double> cellsize = FunctionDefaults<3>::get_cell_width();\n//\tSeparatedConvolution<double, 3> op11 = PeriodicBSHOp<double, 3> (world, sqrt(dum), k, uthresh1, uthresh1, cellsize);\n\n\t// Initialize the old solution and print out to vts files\n\tmytime = 0.0;\n\n\tfunctT u(3);\n\tfunctT rhs(3);\n\tfunctT f(3);\n\tu[0] = FunctionFactory<double, 3> (world).f(uxexact  ) .truncate_on_project();\n\tu[1] = FunctionFactory<double, 3> (world).f(uyexact  ) .truncate_on_project();\n\tu[2] = FunctionFactory<double, 3> (world).f(uzexact  ) .truncate_on_project();\n\n\n\tprint(\"col error\",op(lap(u[0])).scale(-1. / (4. * pi)).err(uxexact));\n\tprint(\"bsh error\", op1(dum*u[0] - lap(u[0])).err(uxexact));\n\n\n\tFunction<double, 3> divu = div(u); // computer the divergence\n\tdouble divun=divu.norm2();\n\tint dd=divu.max_depth();\n\tif (world.rank()==0) print(\"initial div, depth:\", divun, dd); //print out some information\n\n\tfor (int t =  0; t < Nts; t++) {\n\t\tmytime = deltaT*(t+1);\n\t\t//if (world.rank()==0) print(\"current time: \", mytime);\n\t\t// Step 1.  Calculate the pressure at time t+1.\n\t\t//            Laplace p = div (f-u grad u)\n\t\tf[0] = FunctionFactory<double, 3> (world).f(fxexact).truncate_on_project();\n\t\tf[1] = FunctionFactory<double, 3> (world).f(fyexact).truncate_on_project();\n\t\tf[2] = FunctionFactory<double, 3> (world).f(fzexact).truncate_on_project();\n\n\n\t\tadv(u, rhs);\n\t\t//adv works like: for (int i=0; i < 3; ++i)  rhs[i] = u[0]*diff(u[i],0) + u[1]*diff(u[i],1) + u[2]*diff(u[i],2);\n\n\t\tfunctionT divf = div(f-rhs);\n\n\t\tFunction<double,3> p = op(divf); // apply the Coulomb operator to compute the pressure \\c p\n\t\tp.scale(-1. / (4. * pi));\n\n\t\t// Step 2.  Calculate the velocity at time t+1.\n\t\t//            (1/(deltaT mu) - Laplace) u_t+1 = (f - grad p - u grad u)/mu + u_t/(deltaT mu)\n\n\t\t// do the following calculation\n\t\t//~ rhs[0] = (f[0] - diff(p, 0) -rhs[0])*(1. / mu) + u[0]*dum;\n\t\t//~ rhs[1] = (f[1] - diff(p, 1) -rhs[1])*(1. / mu) + u[1]*dum;\n\t\t//~ rhs[2] = (f[2] - diff(p, 2) -rhs[2])*(1. / mu) + u[2]*dum;\n\t\tf[0] -= diff(p,0);\n\t\tf[1] -= diff(p,1);\n\t\tf[2] -= diff(p,2);\n\t\tgaxpy(world, 1, rhs, -1, f);\n\t\tgaxpy(world, -1./mu, rhs, dum, u);\n\n\t\tfunctT ue = apply(world, op1, rhs); // apply the BSH operator to update the velocity \\c ue\n\n\t\t//u = ue;  // use this line for first order/mixed Euler's method\n\n\t\tgaxpy(world,-1,u,2,ue); ++t; mytime += deltaT; //for (int i=0; i < 3; ++i) u[i] = 2.0*ue[i] - u[i];// += (mu*lap(ue[i])-(ue[0]*diff(ue[i],0) + ue[1]*diff(ue[i],1) + ue[2]*diff(ue[i],2)) - diff(p,i) + f[i])*(2*deltaT);\n\t\t//use the above line for second order/Crank-Nicolson like scheme\n\t\t//note that in this case, the time-step size is instead 2*deltaT\n\n\n\t\tif ( (t%10)==0 && world.rank()==0) { // output the current status to vts files every 10 steps\n                   char filename[100];\n                   sprintf(filename, \"data-%02d.vts\", t);\n                   Vector<double, 3> plotlo, plothi;\n                   Vector<long, 3> npts;\n                   for(int i = 0; i < 3; ++i) {\n                           plotlo[i] = 0.0;\n                           plothi[i] = 1.0;\n                           npts[i] = 21;\n                   }\n                   plotvtk_begin(world, filename, plotlo, plothi, npts);\n                   plotvtk_data(u[0], \"u\", world, filename, plotlo, plothi, npts);\n                   plotvtk_data(u[1], \"v\", world, filename, plotlo, plothi, npts);\n                   plotvtk_data(u[2], \"w\", world, filename, plotlo, plothi, npts);\n                   plotvtk_data(p   , \"p\", world, filename, plotlo, plothi, npts);\n                   plotvtk_end<3>(world, filename);\n\t\t}\n\n\t\t{\n\t\t//~ Function<double, 3> du = FunctionFactory<double, 3> (world).f(uxexact).truncate_on_project();\n\t\t//~ du -= u[0];\n\t\t//~ Function<double, 3> dv = FunctionFactory<double, 3> (world).f(uyexact).truncate_on_project();\n\t\t//~ dv -= u[1];\n\t\t//~ Function<double, 3> dw = FunctionFactory<double, 3> (world).f(uzexact).truncate_on_project();\n\t\t//~ dw -= u[2];\n\n\t\tdouble  a=div(u).norm2(), b=u[0].err(uxexact), c=u[1].err(uyexact),d=u[2].err(uzexact);\n\t\tif (world.rank()==0)  print(t+1, mytime, a,b,c,d); // print out some information\n\t\t}\n\t}\n\n//\tRMI::end();\n\t} catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    } catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    } catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    } catch (const char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    } catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    } catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    } catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    } catch (...) {\n        error(\"caught unhandled exception\");\n    };\n    finalize();\n}\n//*****************************************************************************\n\n//*****************************************************************************\nint main(int argc, char**argv) {\n\ttestNavierStokes(argc, argv);\n\treturn 0;\n}\n//*****************************************************************************\n\n"
  },
  {
    "path": "src/examples/newsolver.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/nonlinsol.h>\n\nusing namespace madness;\n\nstatic const double R = 1.4;    // bond length\nstatic const double L = 64.0*R; // box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-5; // precision\n\nstatic double guess(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return (exp(-sqrt(x*x+y*y+(z-R/2)*(z-R/2)+1e-8))+\n            exp(-sqrt(x*x+y*y+(z+R/2)*(z+R/2)+1e-8)));\n}\n\nstatic double V(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return -1.0/sqrt(x*x+y*y+(z-R/2)*(z-R/2)+1e-8)+\n           -1.0/sqrt(x*x+y*y+(z+R/2)*(z+R/2)+1e-8);\n}\n\ndouble rifunction(const coord_3d& r) {\n    return r[2]; //z\n}\n\ndouble iterate_ground(World& world, NonlinearSolver& solver, \n                      real_function_3d& V, real_function_3d& psi, \n                      double& eps) {\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n    real_function_3d Vpsi = (V*psi);\n    Vpsi.scale(-2.0).truncate();\n    real_function_3d tmp = op(Vpsi).truncate();\n    double norm = tmp.norm2();\n    real_function_3d r = tmp-psi;\n    double rnorm = r.norm2();\n    double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n    if (world.rank() == 0) {\n        print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n    }\n    psi = solver.update(psi, r);\n    psi.scale(1.0/psi.norm2());\n    eps = eps_new;\n    return rnorm;\n}\n\ndouble iterate_excite(World& world, NonlinearSolver& solver, \n                      real_function_3d& V, real_function_3d& psi, \n                      real_function_3d& dpsi, double& eps, \n                      real_function_3d& ri) {\n    real_convolution_3d du = CoulombOperator(world, 0.001, 1e-6); \n    real_function_3d Vdpsi = (V*dpsi);\n    real_function_3d rhs = Vdpsi + (psi*2*du(psi*dpsi)) + (ri*psi);\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n\n    rhs.scale(-2.0).truncate();\n    real_function_3d r = op(rhs) - dpsi;\n    dpsi = solver.update(dpsi, r);\n    dpsi.truncate();\n    double dpsi_error = r.norm2();\n    if (world.rank() == 0) {\n        print(\"dpsi error = \", dpsi_error);\n    }\n    return dpsi_error;\n }\n\n// This class is used to store information for the\n// non-linear solver used by the dynamic polarizability\nstruct F {\n    real_function_3d x, y;\n\n    F(const real_function_3d& x, const real_function_3d& y) \n        : x(x), y(y)\n    {}\n\n    F operator-(const F& b) const {\n        return F(x-b.x, y-b.y);\n    }\n\n    F operator+=(const F& b) { // Operator+= necessary\n        x += b.x; y += b.y;\n        return *this;\n    }\n\n    F operator*(double a) const { // Scale by a constant necessary\n        return F(x*a,y*a);\n    }\n};\n\ndouble inner(const F& a, const F& b) {\n    return inner(a.x,b.x) + inner(a.y,b.y);\n}\n\n// The default constructor for functions does not initialize\n// them to any value, but the solver needs functions initialized\n// to zero for which we also need the world object.\nstruct allocator {\n    World& world;\n\n    allocator(World& world) : world(world) {}\n\n    F operator()() {\n        return F(real_function_3d(world),real_function_3d(world));\n    }\n};\n\n\n/// solve the dynamic response equations\n\n/// @param[in]\tworld\tthe world\n/// @param[in]\tsolver\tthe KAIN solver\n/// @param[in]\tV\t\tthe local potential (here: V_nuc + 1/2 J )\n/// @param[in]\tpsi\t\tthe orbital\n/// @param[in]\teps\t\torbital energy for psi\n/// @param[in]\tri\t\tthe external perturbation (here: z)\n/// @param[in,out]\tx\tthe x part of the response vector\n/// @param[in,out]\ty\tthe y part of the response vector\n/// @param[in]\tomega\tthe frequency of the external perturbation\n/// @return\t\tthe current error in the residual of the response equations\ntemplate <class solverT>\ndouble iterate_xy(World& world, solverT& solver, const real_function_3d& V,\n                  const real_function_3d& psi,\n                  double& eps, const real_function_3d& ri, real_function_3d& x,\n                  real_function_3d& y, const double omega) {\n    real_convolution_3d gOpx = BSHOperator3D(world, sqrt(-2*(eps+omega)), 0.001, 1e-6);\n    real_convolution_3d gOpy = BSHOperator3D(world, sqrt(-2*(eps-omega)), 0.001, 1e-6);\n    real_convolution_3d uop = CoulombOperator(world, 0.001, 1e-6);\n    real_function_3d gp2 = uop(y*psi);\n    real_function_3d gp3 = uop(x*psi);\n    real_function_3d pp = (gp3 + gp2 + ri) * psi;\n    \n    real_function_3d xrhs = V*x + pp;\n    xrhs.scale(-2.0).truncate();\n    real_function_3d new_x = gOpx(xrhs).truncate();\n    new_x = new_x - inner(psi,new_x)*psi;\n    double xerr = (x - new_x).norm2();\n    \n    real_function_3d yrhs = V*y + pp;\n    yrhs.scale(-2.0).truncate();\n    real_function_3d new_y = gOpy(yrhs).truncate();\n    new_y = new_y - inner(psi,new_y)*psi;\n    double yerr = (y - new_y).norm2();\n    \n    F xy = solver.update(F(x,y), F(new_x-x, new_y-y));\n    \n    x = xy.x.truncate();\n    y = xy.y.truncate();\n    print(\"dynamic\", xerr, yerr);\n    return xerr+yerr;\n}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    \n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_initial_level(5);\n    FunctionDefaults<3>::set_truncate_mode(1);  \n    FunctionDefaults<3>::set_cubic_cell(-L/2, L/2);\n    \n    if (world.rank() == 0) print(\"\\n  Solving for the HF wave function\\n\");\n    real_function_3d Vnuc = real_factory_3d(world).f(V);\n    real_function_3d psi  = real_factory_3d(world).f(guess);\n    psi.truncate();\n    psi.scale(1.0/psi.norm2());\n\n    real_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n    double eps = -0.6;\n    {\n      NonlinearSolver solver;\n      for (int iter=0; iter<10; iter++) {\n        real_function_3d rho = square(psi).truncate();\n        real_function_3d potential = Vnuc + op(rho).truncate();\n        double err  = iterate_ground(world, solver, potential, psi, eps);\n\tif (err < thresh) break;\n      }\n    }\n    double kinetic_energy = 0.0;\n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n        real_function_3d dpsi = D(psi);\n        kinetic_energy += inner(dpsi,dpsi);\n    }\n\n    real_function_3d rho = square(psi);\n    double two_electron_energy = inner(op(rho),rho); // <u|rho> = <phi phi | 1/r12 | phi phi>\n    double nuclear_attraction_energy = 2.0*inner(Vnuc,rho); // <V|rho> = <phi|V|phi>\n    double nuclear_repulsion_energy = 1.0/R;\n    double total_energy = kinetic_energy + two_electron_energy + \n        nuclear_attraction_energy + nuclear_repulsion_energy;\n    double virial = (nuclear_attraction_energy + two_electron_energy + nuclear_repulsion_energy) / kinetic_energy;\n\n    if (world.rank() == 0) {\n        print(\"\");\n        print(\"            Kinetic energy \", kinetic_energy);\n        print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n        print(\"       Two-electron energy \", two_electron_energy);\n        print(\" Nuclear  repulsion energy \", nuclear_repulsion_energy);\n        print(\"              Total energy \", total_energy);\n        print(\"                    Virial \", virial);\n    }\n\n    plot_line(\"psi.dat\", 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, psi);\n\n    world.gop.fence();\n\n    if (world.rank() == 0) print(\"\\nSolving for the static response function\\n\");\n\n    real_function_3d ri  = real_factory_3d(world).f(rifunction);\n    real_function_3d dpsi(world); //zero\n    rho = square(psi).truncate();\n    real_function_3d potential = Vnuc + op(rho).truncate();\n    {\n        NonlinearSolver solver;\n        for(int iter=1; iter<=20; iter++) {\n            double err = iterate_excite(world, solver, potential, psi, dpsi, eps, ri);\n            if (err < 10*thresh) break;\n        }\n    }\n\n    plot_line(\"dpsi.dat\", 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, dpsi);\n    plot_line(\"rho.dat\", 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, rho);\n\n    double h1 = 0.0;\n    for (int axis=0; axis<3; axis++) {\n      real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n      real_function_3d nadp = D(dpsi);\n      h1 += 0.5*inner(nadp,nadp);\n    }\n    double h2 = inner(Vnuc*dpsi,dpsi);\n    double ans1 = h1 + h2;\n\n    real_function_3d e1 = dpsi*psi;\n    real_function_3d e2 = psi*psi;\n    real_function_3d e3 = dpsi*dpsi;\n    double ans2 = inner(e1,op(e1));\n    double ans3 = inner(e3,op(e2));\n    double ans4 = inner(dpsi,dpsi);\n    double ans5 = inner(dpsi,ri*psi);\n    double d2Ea = (4*ans1) + (8*ans2) + (4*ans3) - (4*(eps*ans4)) + (8*ans5);\n    double d2Eb =  4*ans5;\n\n    if (world.rank() == 0) {\n        print(\"\");\n        print(\"< dpsi | h | dpsi >\", ans1);\n        print(\"< dpsi dpsi | psi psi >\", ans2);\n        print(\"< dpsi psi | dpsi psi >\", ans3);\n        print(\"< dpsi | dpsi >\", ans4);\n        print(\"< dpsi | r | psi > \",ans5);\n        print(\"\");\n        print(\" < 1 |  V - E1 | 0 > =\", d2Ea);\n        print(\"-< 0 | H0 - E0 | 0 > =\", d2Eb);\n        print(\"variational estimate =\", 2*d2Ea - d2Eb);\n    }\n    \n    // For first frequency use zero as the initial guess but at subsequent\n    // frequencies use the previous solution as the guess.\n    real_function_3d x = real_factory_3d(world); //zero\n    real_function_3d y = real_factory_3d(world); //zero\n    for(int j=0; j<=4; j++) {\n        double omega = 0.365 + (j*0.005);\n        if (world.rank() == 0) print(\"\\nSolving for the dynamic response function with omega =\", omega,\"\\n\");\n\n        XNonlinearSolver<F,double,allocator> solver = XNonlinearSolver<F,double,allocator>(allocator(world));\n        \n        for(int iter=1; iter<=20; iter++) {\n            double err = iterate_xy(world, solver, potential, psi, eps, ri, x, y, omega);\n            if (err < 10*thresh) break;\n        }\n\n        real_function_3d drho = (x*psi)+(psi*y);\n        double alpha_dynamic = -2*inner(ri,drho);    \n        if (world.rank() == 0) \n            print(\"\\nalpha_dynamic omega = \",omega,\" alpha = \",alpha_dynamic);\n\n        const std::size_t bufsize=32;\n        char fname[bufsize];\n        snprintf(fname, bufsize,\"x_%6.4f.dat\", omega);\n        plot_line(fname, 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, x);\n        snprintf(fname, bufsize,\"y_%6.4f.dat\", omega);\n        plot_line(fname, 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, y);\n        snprintf(fname, bufsize,\"drho_%6.4f.dat\", omega);\n        plot_line(fname, 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, drho);\n    }\n    \n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/newsolver_lda.cc",
    "content": "\n#include <type_traits>\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/nonlinsol.h>\n\n#include <madness/mra/lbdeux.h>\n#include <madness/mra/qmprop.h>\n\n#include <madness/misc/misc.h>\n#include <madness/misc/ran.h>\n\n#include <madness/tensor/systolic.h>\n#include <madness/tensor/solvers.h>\n#include <madness/tensor/elem.h>\n\n\n#include<madness/chem/xcfunctional.h>\n\n#include <madness/mra/legendre.h>\n\n#include<madness/chem/xcfunctional.h>\n\n\nusing namespace madness;\n\n\ntypedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmapT;\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef std::vector<functionT> vecfuncT;\ntypedef std::pair<vecfuncT,vecfuncT> pairvecfuncT;\ntypedef std::vector<pairvecfuncT> subspaceT;\ntypedef Tensor<double> tensorT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef std::shared_ptr<operatorT> poperatorT;\ntypedef Function<std::complex<double>,3> complex_functionT;\ntypedef std::vector<complex_functionT> cvecfuncT;\ntypedef Convolution1D<double_complex> complex_operatorT;\n\n\n//static const double R = 1.4;    // bond length\n//static const double L = 64.0*R; // box size\nstatic const double L = 50.0; // box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-5; // precision\nstatic const int maxiter=10;\nstatic const int maxiterp=10;\n\nstd::vector< std::shared_ptr<real_derivative_3d> > gradop;\nXCfunctional xc;\n\n//prod/// simple projector class for 1- and 2-particle projectors\n//prodtemplate<typename T, std::size_t NDIM>\n//prodclass Projector {\n//prod\n//prod    int particle_;\n//prod    std::vector<Function<T,NDIM> > p_;\n//prod\n//prodpublic:\n//prod\n//prod    Projector() : p_(std::vector<Function<T,NDIM> >()) {}\n//prod\n//prod    /// simple constructor with only one orbital to project out\n//prod    Projector(const Function<T,NDIM>& p, const int particle=0)\n//prod            : particle_(particle), p_(std::vector<Function<T,NDIM> >(1,p)) {\n//prod        MADNESS_ASSERT(particle_==0 or particle_==1);\n//prod        MADNESS_ASSERT(p_.size()>0);\n//prod    }\n//prod\n//prod    /// constructor with a set of orbitals to project out\n//prod    Projector(const std::vector<Function<T,NDIM> >& p, const int particle=0) : particle_(particle), p_(p) {\n//prod        MADNESS_ASSERT(particle_==0 or particle_==1);\n//prod        MADNESS_ASSERT(p_.size()>0);\n//prod    }\n//prod\n//prod    int& particle() {return particle_;}\n//prod    const int& particle() const {return particle_;}\n//prod\n//prod    /// get a const reference to the orbitals\n//prod    const std::vector<Function<T,NDIM> >& p() const {return p_;}\n//prod\n//prod    /// project f on p: |result> =  | p><p | f>\n//prod    template<std::size_t FDIM>\n//prod    typename std::enable_if<NDIM==FDIM, Function<T,FDIM> >::type\n//prod    operator()(const Function<T,FDIM>& f) const {\n//prod\n//prod        const double ovlp=inner(f,p_[0]);\n//prod        Function<T,NDIM> sum=ovlp*p_[0];\n//prod\n//prod        for (unsigned int i=1; i<p_.size(); ++i) {\n//prod            const double ovlp2=inner(f,p_[i]);\n//prod            sum=(sum+ovlp2*p_[i]).truncate().reduce_rank();\n//prod        }\n//prod        return sum;\n//prod    }\n//prod\n//prod    /// project p out of f: |result(1,2)> = sum_p | p(1)><p(1) | f(1,2)>\n//prod    template<std::size_t FDIM>\n//prod    typename std::enable_if<2*NDIM==FDIM, Function<T,FDIM> >::type\n//prod    operator()(const Function<T,FDIM>& f) const {\n//prod        real_function_6d sum=real_factory_6d(p_.begin()->world());\n//prod        for (unsigned int i=0; i<p_.size(); ++i) {\n//prod            const real_function_3d pf2=f.project_out(p_[i],particle_);\n//prod            real_function_6d tmp;\n//prod            MADNESS_EXCEPTION(\"Projector class: the hartree product is inaccurate -- don't use it\",1);\n//prod            if (particle_==0) tmp=hartree_product(p_[i],pf2);\n//prod            else tmp=hartree_product(pf2,p_[i]);\n//prod            sum=(sum+tmp);\n//prod        }\n//prod        sum.truncate();\n//prod        return sum;\n//prod    }\n//prod};\n\n\ndouble make_dft_energy(World & world, const vecfuncT& vf, int ispin)\n{\n\tfunctionT vlda = multiop_values<double, xc_functional, 3>(xc_functional(xc, ispin), vf);\n\treturn vlda.trace();\n}\n\nfunctionT make_dft_potential(World & world, const vecfuncT& vf, int ispin, int what)\n{\n\treturn multiop_values<double, xc_potential, 3>(xc_potential(xc, ispin, what), vf);\n}\n\nfunctionT make_dft_kernel(World & world, const vecfuncT& vf, int ispin, int what)\n{\n\treturn multiop_values<double, xc_kernel, 3>(xc_kernel(xc, ispin, what), vf);\n}\n\n//prodstatic double guess(const coord_3d& r) {\n//prod    const double x=r[0], y=r[1], z=r[2];\n//prod    return (exp(-sqrt(x*x+y*y+(z-R/2)*(z-R/2)+1e-8))+\n//prod            exp(-sqrt(x*x+y*y+(z+R/2)*(z+R/2)+1e-8)));\n//prod}\n//prod\n//prodstatic double V(const coord_3d& r) {\n//prod    const double x=r[0], y=r[1], z=r[2];\n//prod    return -1.0/sqrt(x*x+y*y+(z-R/2)*(z-R/2)+1e-8)+\n//prod           -1.0/sqrt(x*x+y*y+(z+R/2)*(z+R/2)+1e-8);\n//prod}\n\nstatic double guess(const coord_3d& r) {\n\tconst double x=r[0], y=r[1], z=r[2];\n\n \t//return (x*x+y*y+z*z);\n \treturn (2.0*exp(-sqrt(x*x+y*y+z*z+1e-8)));\n \t//return (2.0*exp(-sqrt(x*x+y*y+z*z+1e-8))+1e-8);\n}\n\nstatic double V(const coord_3d& r) {\n\tconst double x=r[0], y=r[1], z=r[2];\n\treturn  -2.0/sqrt(x*x+y*y+z*z+1e-8);\n}\n\ndouble rifunction(const coord_3d& r) {\n    return r[2]; //z\n}\n\ndouble iterate_ground(World& world, NonlinearSolver& solver, \n                      functionT& V, functionT& psi, \n                      double& eps) {\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n    functionT Vpsi = (V*psi);\n    Vpsi.scale(-2.0).truncate();\n    functionT tmp = op(Vpsi).truncate();\n    double norm = tmp.norm2();\n    functionT r = tmp-psi;\n    double rnorm = r.norm2();\n    double eps_new = eps - 0.5*inner(Vpsi,r)/(norm*norm);\n    if (world.rank() == 0) {\n        print(\"norm=\",norm,\" eps=\",eps,\" err(psi)=\",rnorm,\" err(eps)=\",eps_new-eps);\n    }\n    psi = solver.update(psi, r);\n    psi.scale(1.0/psi.norm2());\n    eps = eps_new;\n    return rnorm;\n}\n\ndouble iterate_excite(World& world, NonlinearSolver& solver, \n                      functionT& V, functionT& psi, \n                      functionT& dpsi, double& eps, \n                      functionT& ri) {\n    real_convolution_3d du = CoulombOperator(world, 0.001, 1e-6); \n    functionT Vdpsi = (V*dpsi);\n// LDA\n    functionT rho = psi*psi;\n    vecfuncT vf;\n    vf.push_back(rho);\n    functionT fxc = make_dft_kernel(world, vf, 0, 0).truncate();\n\n    functionT rhod = 2*dpsi*psi; //pert density\n\n    //functionT rhs = Vdpsi + 2.*psi*du(psi*dpsi)  + ri*psi;\n    functionT Gampsi = 2.*psi*du(rhod) + psi*fxc*rhod*2.*constants::pi + ri*psi;\n    //Projector<double,3> rho0(psi);\n    double ovlp = inner(psi,Gampsi);\n    functionT rhs = Vdpsi + Gampsi - psi*ovlp;\n//prod    functionT rhs = Vdpsi + Gampsi ;\n    real_convolution_3d op = BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n\n    rhs.scale(-2.0).truncate();\n    //functionT r = op(rhs)*.7+dpsi*.3 - dpsi;\n    functionT r = op(rhs) - dpsi;\n    dpsi = solver.update(dpsi, r);\n    dpsi.truncate();\n    double dpsi_error = r.norm2();\n    if (world.rank() == 0) {\n        //printf(\"dpsi error = %f \\t ovl = %f \\n\", dpsi_error, ovlp);\n        printf(\"dpsi error = %f \\n\", dpsi_error);\n    }\n    return dpsi_error;\n }\n\n//prod// This class is used to store information for the\n//prod// non-linear solver used by the dynamic polarizability\n//prodstruct F {\n//prod    functionT x, y;\n//prod\n//prod    F(const functionT& x, const functionT& y) \n//prod        : x(x), y(y)\n//prod    {}\n//prod\n//prod    F operator-(const F& b) {\n//prod        return F(x-b.x, y-b.y);\n//prod    }\n//prod\n//prod    F operator+=(const F& b) { // Operator+= necessary\n//prod        x += b.x; y += b.y;\n//prod        return *this;\n//prod    }\n//prod\n//prod    F operator*(double a) { // Scale by a constant necessary\n//prod        return F(x*a,y*a);\n//prod    }\n//prod};\n//prod\n//proddouble inner(const F& a, const F& b) {\n//prod    return inner(a.x,b.x) + inner(a.y,b.y);\n//prod}\n//prod\n//prod// The default constructor for functions does not initialize\n//prod// them to any value, but the solver needs functions initialized\n//prod// to zero for which we also need the world object.\n//prodstruct allocator {\n//prod    World& world;\n//prod\n//prod    allocator(World& world) : world(world) {}\n//prod\n//prod    F operator()() {\n//prod        return F(functionT(world),functionT(world));\n//prod    }\n//prod};\n//prod\n//prod\n//prodtemplate <class solverT>\n//proddouble iterate_xy(World& world, solverT& solver, functionT& V, \n//prod                  functionT& psi, double& eps, \n//prod                  functionT& ri, functionT& x, \n//prod                  functionT& y, double& omega) {\n//prod    real_convolution_3d gOp= BSHOperator3D(world, sqrt(-2*eps), 0.001, 1e-6);\n//prod    real_convolution_3d uop = CoulombOperator(world, 0.001, 1e-6);\n//prod\n//prod    functionT gp2 = uop(y*psi);\n//prod    functionT gp3 = uop(x*psi);\n//prod// LDA\n//prod    vecfuncT vf;\n//prod    functionT rho = psi*psi;\n//prod    vf.push_back(rho);\n//prod    functionT fxc = make_dft_kernel(world, vf, 0, 0);\n//prod\n//prod    functionT pp = (gp3 + gp2 + fxc*x + fxc*y + ri) * psi;\n//prod\n//prod    functionT xrhs = V*x + pp;\n//prod    x.truncate();\n//prod    xrhs.gaxpy(1.0, x, -omega,false);\n//prod\n//prod    xrhs.scale(-2.0).truncate();\n//prod    functionT new_x = gOp(xrhs).truncate();\n//prod    new_x = new_x - inner(psi,new_x)*psi;\n//prod    double xerr = (x - new_x).norm2();\n//prod    \n//prod    functionT yrhs = V*y + pp;\n//prod    y.truncate();\n//prod    yrhs.gaxpy(1.0, y, omega,false);\n//prod\n//prod    yrhs.scale(-2.0).truncate();\n//prod    functionT new_y = gOp(yrhs).truncate();\n//prod    new_y = new_y - inner(psi,new_y)*psi;\n//prod    double yerr = (y - new_y).norm2();\n//prod    \n//prod    F xy = solver.update(F(x,y), F(new_x-x, new_y-y));\n//prod    \n//prod    x = xy.x.truncate();\n//prod    y = xy.y.truncate();\n//prod    print(\"dynamic\", xerr, yerr);\n//prod    return xerr+yerr;\n//prod}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    \n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_initial_level(5);\n    FunctionDefaults<3>::set_truncate_mode(1);  \n    FunctionDefaults<3>::set_cubic_cell(-L/2, L/2);\n    \n    if (world.rank() == 0) print(\"\\n  Solving for the DFT/LDA wave function\\n\");\n    functionT Vnuc = real_factory_3d(world).f(V);\n    functionT psi  = real_factory_3d(world).f(guess);\n    psi.truncate();\n    psi.scale(1.0/psi.norm2());\n\n    std::string xc_data;\n    xc_data=\"lda\";\n    xc.initialize(xc_data, false);\n\n//    poperatorT coulop;\n//    coulop = poperatorT(CoulombOperatorPtr(world, 1e-10, thresh));\n    poperatorT coulop;\n    coulop = poperatorT(CoulombOperatorPtr(world, 1e-10, thresh));\n    gradop = gradient_operator<double,3>(world);\n    real_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n    double eps = -0.5;\n    {\n      NonlinearSolver solver;\n      for (int iter=0; iter<maxiter; iter++) {\n        functionT rho = psi*psi;\n// LDA\n        vecfuncT vf;\n\tvf.push_back(rho);\n        //functionT fxc =  make_dft_kernel(world, vf, 0, 0);\n        //functionT vxc =  fxc*rho*2;\n        functionT vxc =  make_dft_potential(world, vf, 0, 0);\n\n        functionT potential = Vnuc + 2.*op(rho).truncate() + vxc.truncate();\n        double err  = iterate_ground(world, solver, potential, psi, eps);\n\tif (err < thresh) break;\n      }\n    }\n    double kinetic_energy = 0.0;\n    for (int axis=0; axis<3; axis++) {\n        real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n        functionT dpsi = D(psi);\n        kinetic_energy += inner(dpsi,dpsi);\n    }\n\n    functionT rho = square(psi);\n    rho.reconstruct();\n    vecfuncT vf;\n    vf.push_back(rho);\n    double exc=make_dft_energy(world, vf, 0); // Exc\n    double two_electron_energy = 2.*inner(op(rho),rho); // <u|rho> = <phi phi | 1/r12 | phi phi>\n    double nuclear_attraction_energy = 2.0*inner(Vnuc,rho); // <V|rho> = <phi|V|phi>\n    double densii = inner(psi,psi); // <rho> \n   // double nuclear_repulsion_energy = 1.0/R;\n    double total_energy = kinetic_energy + two_electron_energy + \n            nuclear_attraction_energy +  exc;\n   //     nuclear_attraction_energy + nuclear_repulsion_energy + exc;\n    double virial = (nuclear_attraction_energy + two_electron_energy ) / kinetic_energy;\n    //double virial = (nuclear_attraction_energy + two_electron_energy + nuclear_repulsion_energy) / kinetic_energy;\n\n    if (world.rank() == 0) {\n        print(\"\");\n        print(\"            Kinetic energy \", kinetic_energy);\n        print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n        print(\"       Two-electron energy \", two_electron_energy);\n//        print(\" Nuclear  repulsion energy \", nuclear_repulsion_energy);\n        print(\"                 XC energy \", exc);\n        print(\"              Total energy \", total_energy);\n        print(\"                    Virial \", virial);\n        print(\"                       dee \", densii);\n    }\n\n//    plot_line(\"psi.dat\", 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, psi);\n\n\n    world.gop.fence();\n\n#if 1\n    if (world.rank() == 0) print(\"\\nSolving for the static response function\\n\");\n\n    functionT ri  = real_factory_3d(world).f(rifunction);\n//    functionT dpsi(world); //zero\n//    dpsi = 1*psi;\n    functionT dpsi = real_factory_3d(world); //zero\n    rho = square(psi).truncate();\n// LDA\n    //vecfuncT vf;\n    //vf.push_back(rho);\n    functionT vxc =  make_dft_potential(world, vf, 0, 0);\n    functionT potential = Vnuc + 2.*op(rho).truncate() + vxc.truncate();\n    //functionT potential = Vnuc + 2.*op(rho).truncate() + vxc.truncate();\n    \n    {\n        NonlinearSolver solver;\n        for(int iter=1; iter<=maxiterp; iter++) {\n            double err = iterate_excite(world, solver, potential, psi, dpsi, eps, ri);\n            if (err < 10*thresh) break;\n        }\n    }\n\n//prod    plot_line(\"dpsi.dat\", 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, dpsi);\n//prod    plot_line(\"rho.dat\", 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, rho);\n\n    double h1 = 0.0;\n    for (int axis=0; axis<3; axis++) {\n      real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n      functionT nadp = D(dpsi);\n      h1 += 0.5*inner(nadp,nadp);\n    }\n    double h2 = inner(Vnuc*dpsi,dpsi);\n    double ans1 = h1 + h2;\n\n    functionT e1 = dpsi*psi;\n    functionT e2 = psi*psi;\n    functionT e3 = dpsi*dpsi;\n    double ans2 = inner(e1,op(e1));\n    double ans3 = inner(e3,op(e2));\n    double ans4 = inner(dpsi,dpsi);\n    double ans5 = inner(dpsi,ri*psi);\n    double d2Ea = (4*ans1) + (8*ans2) + (4*ans3) - (4*(eps*ans4)) + (8*ans5);\n    double d2Eb =  4*ans5;\n\n    if (world.rank() == 0) {\n        print(\"\");\n        print(\"< dpsi | h | dpsi >\", ans1);\n        print(\"< dpsi dpsi | psi psi >\", ans2);\n        print(\"< dpsi psi | dpsi psi >\", ans3);\n        print(\"< dpsi | dpsi >\", ans4);\n        print(\"< dpsi | r | psi > \",ans5);\n        print(\"\");\n        print(\" < 1 |  V - E1 | 0 > =\", d2Ea);\n        print(\"-< 0 | H0 - E0 | 0 > =\", d2Eb);\n        print(\"variational estimate =\", 2*d2Ea - d2Eb);\n    }\n    \n#endif\n#if 0\n    // For first frequency use zero as the initial guess but at subsequent\n    // frequencies use the previous solution as the guess.\n    functionT x = real_factory_3d(world); //zero\n    functionT y = real_factory_3d(world); //zero\n    for(int j=0; j<=1; j++) {\n        //double omega = 0.365 + (j*0.005);\n        //double omega = 0.1 + (j*0.01);\n        double omega = 0.0;\n        if (world.rank() == 0) print(\"\\nSolving for the dynamic response function with omega =\", omega,\"\\n\");\n\n        XNonlinearSolver<F,double,allocator> solver = XNonlinearSolver<F,double,allocator>(allocator(world));\n        \n        for(int iter=1; iter<=maxiterp; iter++) {\n            double err = iterate_xy(world, solver, potential, psi, eps, ri, x, y, omega);\n            if (err < 10*thresh) break;\n        }\n\n        functionT drho = (x*psi)+(psi*y);\n        double alpha_dynamic = -2*inner(ri,drho);    \n        if (world.rank() == 0) \n            print(\"\\nalpha_dynamic omega = \",omega,\" alpha = \",alpha_dynamic);\n\n        char fname[32];\n        sprintf(fname,\"x_%6.4f.dat\", omega);\n        plot_line(fname, 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, x);\n        sprintf(fname,\"y_%6.4f.dat\", omega);\n        plot_line(fname, 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, y);\n        sprintf(fname,\"drho_%6.4f.dat\", omega);\n        plot_line(fname, 1001, {0.0,0.0,-20.0}, {0.0,0.0,20.0}, drho);\n    }\n#endif\n    \n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/nonlinschro.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file nonlinschro.cc\n  \\brief Solves 1D nonlinear Schr&ouml;dinger equation\n  \\defgroup examplenonlinsc Solves a 1D nonlinear Schr&ouml;dinger equation\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/nonlinschro.cc>here</a>.\n\n  \\par Points of interest\n  - Convolution with the negative energy (bound state) Helmholtz Green's function\n  - Iterative solution of the integral form of the equation\n  - Smooth truncation of the density to manage numerical noise amplified by nearly singular potential\n  - Plotting of the solution and potential\n\n  \\par Background\n\n  This illustrates solution of a non-linear Schr&ouml;dinger motivated by\n  exploring problems associated with equations of the same form from\n  nuclear physics.\n\n  We seek the lowest eigenfunction of\n  \\f[\n  -\\nabla^2 \\psi(x) + V(x) \\psi(x) = E \\psi(x)\n  \\f]\n  where the potential is\n  \\f[\n  V(x) = -a \\exp(-b x^2) + \\frac{c}{(n(x)+\\eta)^{1/3}} - d n(x)^{5/3} + V_{\\mbox{shift}}\n  \\f]\n  The parameters \\f$ a \\f$, \\f$ b \\f$, \\f$ c \\f$, \\f$ d \\f$, and  \\f$ V_{\\mbox{shift}} \\f$\n  are given in the code.  The density is given by\n  \\f[\n  n(x) = \\psi(x)^2\n  \\f]\n  There would normally be multiple states occupied but for simplicity we are employing\n  just one.\n\n  The first term in the potential is weak and seems to be there to\n  stabilize the solution.  The second term seems to act as a confining\n  potential since it becomes large and positive when the density is\n  small.  The third term represents short-range attraction between\n  particles, and the fourth adjusts the zero of energy.\n\n  [These notes were written by a chemist ... if you are a nuclear physicist could you\n  please clean them up?].\n\n  \\par Implementation\n\n  The integral form of the equation is\n  \\f[\n     \\psi = - 2 G_{\\mu} * \\left ( V \\psi \\right)\n  \\f]\n  where \\f$ G_{\\mu}\\f$ is the Green's function for the Helmholtz equation\n  \\f[\n     \\left( - \\frac{d^2}{dx^2} + \\mu^2 \\right) G(x,x^{\\prime}) = \\delta(x-x^{\\prime})\n  \\f]\n  where \\f$\\mu = \\sqrt{-2 E}\\f$.\n\n  We employ a simple fixed-point iteration to the self-consistent\n  solution, but strong damping or step restriction is necessary to\n  ensure convergence.  This is due to the nearly singluar potential,\n  the problem being exacerbated by small \\f$ \\eta \\f$.  A reliable\n  solution scheme seems to be to first solve with a large value of\n  \\f$ \\eta \\f$ and then to reduce it in several steps to its final value.\n  A much more efficient scheme would involve use of a non-linear\n  equation solver instead of simple iteration.\n\n  The density is analytically everywhere positive, but numeric noise\n  can introduce regions where it is zero or even slightly negative.\n  To avoid very non-physical results, we smoothly switch values less\n  than some threshold to a minimum value.  This is preferable to\n  employing a sharp cutoff.\n\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <algorithm>\n\nusing namespace madness;\n\nstatic const double L = 10.0;           // box size\nstatic const long k = 10;                // wavelet order\nstatic const double thresh = 1e-8;      // precision\nstatic const double ntol = thresh*10.0; // Cutoff for numerically small density\nstatic const double a = 0.125;\nstatic const double b = 1.0;\nstatic const double c = 1.0;\nstatic const double d = 1.0;\nstatic const double eta_end = 1e-5; // Target value for eta\nstatic double eta = eta_end*1024;   // Initial value foe eta\n\n\nstatic const double vasymp = c/std::pow(eta_end,1.0/3.0);\nstatic const double vshift = -3.0; // Only impacts BSH operator\n\n// For x<xmax, smoothly restricts x to be greater than or equal to xmin>0\ndouble munge(double x, double xmin, double xmax) {\n    // A cubic polyn that smoothly interpolates between\n    //\n    // x=0    where it has value xmin and zero slope, and\n    //\n    // x=xmax where it has value xmax and unit slope\n\n    if (x > xmax) {\n        return x;\n    }\n    else if (x <= 0.0) {\n        return xmin;\n    }\n    else {\n        double x1 = x/xmax;\n        double x2 = x1*x1;\n        double x3 = x1*x2;\n        return xmin+(2.0*xmax-3.0*xmin)*x2 - (-2.0*xmin+xmax)*x3;\n    }\n}\n\n// This invoked to compute the part of the potential that is a function of the density\ntemplate <typename T>\nstatic void Vdynamic(const Key<1> & key, Tensor<T>& t)\n{\n    static const double onethird = 1.0/3.0;\n    static const double fivethird = 5.0/3.0;\n    UNARY_OPTIMIZED_ITERATOR(T, t,\n                             double n=munge(*_p0, ntol, 10.0*ntol);\n                             *_p0 = c/pow(n+eta,onethird) - d*pow(n+eta,fivethird));\n}\n\n// The part of the potential that does not depend on the density\nstatic double Vstatic(const coord_1d& r) {\n    const double x=r[0];\n    return -a*exp(-b*x*x) + vshift;\n}\n\nstatic double guess(const coord_1d& r) {\n    const double x=r[0];\n    return exp(-0.2*x*x);\n}\n\nreal_function_1d make_potential(World& world, const real_function_1d& rho) {\n    real_function_1d vstatic = real_factory_1d(world).f(Vstatic);\n    real_function_1d vdynamic = copy(rho);\n    vdynamic.unaryop(&Vdynamic<double>);\n    return vstatic + vdynamic;\n}\n\nvoid iterate(World& world, real_function_1d& psi) {\n    // Compute density and full potential\n    real_function_1d rho = psi*psi;\n    real_function_1d v = make_potential(world, rho);\n\n    // Compute energy components and print\n    real_function_1d dpsi = Derivative<double,1>(world,0)(psi);\n    dpsi.verify_tree();\n    double kinetic_energy = inner(dpsi,dpsi);\n    double potential_energy = inner(rho, v);\n    double energy = potential_energy + kinetic_energy;\n\n    // Update the wave function\n    real_function_1d Vpsi = v*psi;\n    Vpsi.scale(-1.0).truncate();\n    real_convolution_1d op = BSHOperator<1>(world, sqrt(-energy), 0.001, 1e-6);\n    real_function_1d tmp = op(Vpsi).truncate();\n    real_function_1d r = tmp-psi;\n    double rnorm = r.norm2();\n    //double step = std::min(1.0,0.05/rnorm);\n    double step = 0.025;\n    if (rnorm > 10) step = 0.1/rnorm;\n    psi = psi + step*r;\n    psi.scale(1.0/psi.norm2());\n\n    print(\"KE =\", kinetic_energy,\"  PE =\",potential_energy,\"  E =\",energy, \"  err(psi) =\", rnorm, \"  step =\", step);\n}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<1>::set_truncate_mode(1);\n    FunctionDefaults<1>::set_cubic_cell(-L,L);\n\n    real_function_1d psi = real_factory_1d(world).f(guess);\n    print(psi.norm2());\n    psi.scale(1.0/psi.norm2());\n    print(psi.norm2());\n\n    while (1) {\n        print(\"\\nSOLVING WITH ETA\", eta);\n        for (int iter=0; iter<30; iter++)\n            iterate(world, psi);\n        if (eta <= eta_end) break;\n        eta *= 0.5;\n    }\n\n    real_function_1d rho = psi*psi;\n    real_function_1d v = make_potential(world, rho);\n\n    coord_1d lo(-L), hi(L);\n    double scale = vasymp/psi(coord_1d(0.0));\n    plot_line(\"psi.txt\", 201, lo, hi, psi*scale, v);\n\n    world.gop.fence();\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/pcr.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/*!\n  \\file examples/sininteg.cc\n  \\brief Compute the integral sin(x) x=0..10\n  \\warning If you change this example, please update the \"MADNESS Basics\" module\n  in the documentation (doc/getting_started/gstart_basics.dox). \\defgroup\n  sininteg First example from getting started guide \\ingroup examples\n\n  Computes the integral\n  \\f[\n     \\int_0^{10} sin(x) dx\n  \\f]\n  by projecting \\f$ sin(x) \\f$ into the discontinuous spectral element\n  basis and using the \\c trace() method.\n */\n\n// #warning If you changed this example, please update the \"Getting started with\n// MADNESS\" documentation module.\n\n#include <madness/mra/mra.h>\n\nusing namespace madness;\n\n#include <madness/mra/mra.h>\n#include <madness/mra/vmra.h>\n\nusing namespace madness;\n\nstatic const double L = 32.0;      // box size\nstatic const long k = 8;           // wavelet order\nstatic const double thresh = 1e-6; // precision\n\nstatic const size_t nfunc = 64; // number of functions\n\n// A class that behaves like a function to compute a Gaussian of given origin\n// and exponent\nclass Gaussian : public FunctionFunctorInterface<double, 3> {\npublic:\n  const coord_3d center;\n  const double exponent;\n  const double coefficient;\n  std::vector<coord_3d> specialpt;\n\n  Gaussian(const coord_3d &center, double exponent, double coefficient)\n      : center(center), exponent(exponent), coefficient(coefficient),\n        specialpt(1) {\n    specialpt[0][0] = center[0];\n    specialpt[0][1] = center[1];\n    specialpt[0][2] = center[2];\n  }\n\n  // MADNESS will call this interface\n  double operator()(const coord_3d &x) const {\n    double sum = 0.0;\n    for (int i = 0; i < 3; i++) {\n      double xx = center[i] - x[i];\n      sum += xx * xx;\n    };\n    return coefficient * exp(-exponent * sum);\n  }\n\n  // By default, adaptive projection into the spectral element basis\n  // starts uniformly distributed at the initial level.  However, if\n  // a function is \"spiky\" it may be necessary to project at a finer\n  // level but doing this uniformly is expensive.  This method\n  // enables us to tell MADNESS about points/areas needing deep\n  // refinement (the default is no special points).\n  std::vector<coord_3d> special_points() const { return specialpt; }\n};\n\n// Makes a new square-normalized Gaussian functor with random origin and\n// exponent\nreal_functor_3d random_gaussian() {\n  const double expntmin = 1e-1;\n  const double expntmax = 1e4;\n  const real_tensor &cell = FunctionDefaults<3>::get_cell();\n  coord_3d origin;\n  for (int i = 0; i < 3; i++) {\n    origin[i] = RandomValue<double>() * (cell(i, 1) - cell(i, 0)) + cell(i, 0);\n  }\n  double lo = log(expntmin);\n  double hi = log(expntmax);\n  double expnt = exp(RandomValue<double>() * (hi - lo) + lo);\n  print(\"expnt\", expnt, origin);\n  double coeff = pow(2.0 * expnt / constants::pi, 0.75);\n  return real_functor_3d(new Gaussian(origin, expnt, coeff));\n}\n\n// Makes a vector of new square-normalized Gaussian functions with random origin\n// and exponent\nstd::vector<real_function_3d> random_gaussians(size_t n, World &world) {\n  std::vector<real_function_3d> result(n);\n  for (size_t i = 0; i < n; i++) {\n    result[i] = FunctionFactory<double, 3>(world).functor(random_gaussian());\n  }\n  return result;\n}\n\nvoid test(World &world) {\n\n  FunctionDefaults<3>::set_k(k);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_truncate_mode(1);\n  FunctionDefaults<3>::set_cubic_cell(-L / 2, L / 2);\n\n  default_random_generator.setstate(\n      99); // Ensure all processes have the same state\n\n  // Create a vector of random Gaussian functions\n  std::vector<real_function_3d> a = random_gaussians(nfunc, world);\n  truncate(world, a);\n  compress(world, a, true);\n  auto b = copy(world, a);\n  reconstruct(world, b, true);\n  compress(world, b, true);\n\n  auto diff = sub(world, a, b, true);\n  // compute the norm of the errors for each component\n  for (size_t i = 0; i < nfunc; i++) {\n    if (world.rank() == 0) {\n      print(\"error\", i, diff[i].norm2());\n    }\n  }\n}\n\nint main(int argc, char **argv) {\n  initialize(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n\n  startup(world, argc, argv);\n\n  if (world.rank() == 0)\n    FunctionDefaults<3>::print();\n\n  test(world);\n\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/periodic/CMakeLists.txt",
    "content": "# src/examples/periodic\n\nif (BUILD_TESTING)\n  set(EXAMPLE_SOURCES\n          testpercoul\n          erfcr\n          testfilter)\n\n  # Create executables for example applications\n  foreach(example ${EXAMPLE_SOURCES})\n  #add_mad_executable(${example} ${example}.cc \"MADchem\")\n  add_unittests(${example} \"${example}.cc\" \"MADchem\" \"unittests;short\")\n  add_dependencies(numerical-examples-madness ${example})\nendforeach()\nendif()\n\nfind_package(FFTW)\nif (TARGET FFTW::Double)\n  add_mad_executable(testpercoulfft \"test.cc;testfuns.cc;testpc.h\" \"MADchem\")\n  target_link_libraries(testpercoulfft PRIVATE FFTW::Double)\n  add_dependencies(numerical-examples-madness testpercoulfft)\nendif()\n"
  },
  {
    "path": "src/examples/periodic/erfcr.cc",
    "content": "#include <iostream>\n#include <utility>\n#include <vector>\n#include <cmath>\n\n#include <madness/misc/gnuplot.h>\n\n// Gaussian expansion of erfc(a*r)/r accurate to epsilon over [rlo,inf]\n// Returns pair [coeffs,expnts]\nstd::pair<std::vector<double>,std::vector<double>>\nmake_fit(double a, double epsilon, double rlo) {\n    const double pi = 3.14159265358979323846264338328;\n    \n    // Alpert end-point correction points and weights\n    const std::vector<double> x = {0.05899550614325259, 0.3082757062227814, 0.7463707253079130, 1.355993726494664, 2.112943217346336, 2.987241496545946, 3.944798920961176, 4.950269202842798, 5.972123043117706, 6.989783558137742, 7.997673019512965, 8.999694932747039, 9.999979225211805, 10.99999938266130, 11.99999999462073, 13.00000000000000};\n    const std::vector<double> omega = {0.1511076023874179, 0.3459395921169090, 0.5273502805146873, 0.6878444094543021, 0.8210319140034114, 0.9218382875515803, 0.9873027487553060, 1.018251913441155, 1.021933430349293, 1.012567983413513, 1.004052289554521, 1.000713413344501, 1.000063618302950, 1.000002486385216, 1.000000030404477, 1.000000000020760};\n    const size_t A = 14;\n\n    // The kernel in s\n    auto K = [=](double s){return 2*std::exp(-rlo*rlo*std::exp(2*s)+s)/std::sqrt(pi);};\n    const double slo = std::log(a);\n    double shi = slo;\n    while (K(shi) > 1e-100) { // Estimate upper bound \n        shi += 0.01;\n    }\n    const double T = shi - slo;\n    const double hs = pi*pi / (std::log(16*pi) - 2*std::log(epsilon) + 1);\n    double ht = hs/T;\n    const size_t n = std::ceil(1.0/ht) - A;\n    ht = 1.0/(n+A-1);\n\n    std::cout << \"n   \" << n << std::endl;\n    std::cout << \"slo \" << slo << std::endl;\n    std::cout << \"shi \" << shi << std::endl;\n    std::cout << \"T   \" << T << std::endl;\n    std::cout << \"hs  \" << hs << std::endl;\n    std::cout << \"ht  \" << ht << std::endl;\n\n    auto CC = [&](double t){return 2*a*T*std::exp(T*t)/std::sqrt(pi);};\n    auto ZZ = [&](double t){return a*a*std::exp(2*T*t);};\n        \n    std::vector<double> coeffs,expnts;\n\n    for (size_t i=0; i<x.size(); i++) {\n        double t = ht*x[i];\n        coeffs.push_back(ht*omega[i]*CC(t));\n        expnts.push_back(ZZ(t));\n    }\n    \n    for (size_t i=0; i<n; i++) {\n        double t = ht*(A+i);\n        coeffs.push_back(ht*CC(t));\n        expnts.push_back(ZZ(t));\n    }\n\n    // for (size_t i=0; i<coeffs.size(); i++) {\n    //     std::cout << i << \" \" << coeffs[i] << \" \" << expnts[i] << std::endl;\n    // }\n\n    return {coeffs,expnts};\n    \n}\n\nint main() {\n  const double a = 0.25;\n  const double epsilon = 1e-8;\n  const double rlo = 1e-8;\n  auto [c, t] = make_fit(a, epsilon, rlo);\n\n  auto fit = [&c=c, &t=t](double r) {\n    double sum = 0;\n    for (size_t i = 0; i < c.size(); i++) {\n      sum += c[i] * std::exp(-t[i] * r * r);\n    }\n    return sum;\n  };\n\n  // Fill vector R and E with overall error data for plotting\n  std::vector<double> R, E;\n  double scale = std::pow(10.0, 1.0 / (5 * c.size()));\n  double maxerr = std::numeric_limits<double>::min();\n  for (double r = 1e-8; r < 30.0; r *= scale) {\n    double exact = std::erfc(0.25 * r) / r;\n    double approx = fit(r);\n    double err = std::abs(approx - exact);\n    double relerr = err / exact;\n    double overallerr = std::min(err, relerr);\n    maxerr = std::max(overallerr, maxerr);\n    R.push_back(r);\n    E.push_back(overallerr);\n  }\n  // plot, if wanted\n  if (false) {\n    madness::Gnuplot gp(\"set logscale; set style data lines; set xrange [1e-8:30]; set yrange [1e-10:1e-6]; set xlabel 'r'; set ylabel 'min(err,relerr)'; set format x '%.0e'\");\n    gp.plot(R, E);\n  }\n\n  return maxerr <= epsilon ? 0 : 1;\n}\n"
  },
  {
    "path": "src/examples/periodic/test.cc",
    "content": "#include \"testpc.h\"\n#include <fftw3.h>\n\n/*****************\n\nUse FFT to compute the electrostatic potential due to some test\ncharge densities.  Note that FFT produces a result with\n\n  a) mean value that is zero because it projects out the constant (k=0) mode.\n\n  b) an opposing electric field to cancel that arising from the periodic\n     sum of the dipole moment potential\n\nTest cases --- select by number\n1) Gaussian spheropole\n2) Gaussian dipole\n3) Gaussian quadrupole\n4) Cosine function\n\nCompile with \"g++ -O3 -Wall test.cc -I.. -lfftw3 -llapacke\"\n\n *****************/\n\nint main() {\n    std::cout.precision(15);\n\n    set_test_case(2); // select test case\n    \n    const size_t n = 50*L; // number of lattice points in each direction\n    const size_t nh = n/2+1; // for real to complex transform last dimension\n    const size_t mid = n/2;  // for mapping hermitian symmetry in transform (and testing and plotting)\n\n    const double lo = -0.5*L;\n    const double hi = 0.5*L;\n    const double h = (hi - lo) / (n - 1);\n    std::vector<double> x = linspace(lo,hi,n,false); // exclude right endpoint\n    std::vector<double> y = x; // Presently assuming cubic domain with equal spacing in x, y, and z\n    std::vector<double> z = x;\n\n    std::vector<double> F = tabulate(f, x, y, z);\n    {\n        madness::Gnuplot g(\"set style data l\");\n        // Extract the middle z column?\n        std::vector<double> col(&F[mid*n*n + mid*n], &F[mid*n*n + mid*n + n]);\n        g.plot(z, col);\n    }\n\n    // sum the values in F to get the total charge\n    double norm = std::reduce(F.begin(), F.end(), 0.0)*h*h*h;\n    std::cout << \"norm = \" << norm << std::endl;\n    \n    // Perform a 3D Fourier transform of F and store the result in G\n    std::unique_ptr<fftw_complex[]> G(new fftw_complex[n*n*nh]);\n    {\n        fftw_plan plan = fftw_plan_dft_r2c_3d(n, n, n, F.data() , G.get(), FFTW_ESTIMATE);\n        fftw_execute(plan);\n        fftw_destroy_plan(plan);\n    }\n\n    // Navigate the way FFTW stores the Hermitian symmetric data\n    auto fudge = [=](size_t j) {return j<nh ? j : n-j;};\n\n    double kscale = 4.0*pi*L*L/(n*n);\n\n    // Apply Coulomb GF in fourier space\n    for (size_t jx=0; jx<n; jx++) {\n        double kx = 2.0*pi*fudge(jx)/n;\n        for (size_t jy=0; jy<n; jy++) {\n            double ky = 2.0*pi*fudge(jy)/n;\n            for (size_t jz=0; jz<nh; jz++) {\n                double kz = 2.0*pi*jz/n;\n                double ksq = kx*kx + ky*ky + kz*kz;\n\n                if (ksq > 1.0e-20) {\n                    double kfac = kscale/ksq;\n                    size_t j = jx*n*nh + jy*nh + jz;\n                    //if (std::abs(G[j][0]) > 1e-6) {\n                        //std::cout << jx << \" (\" << fudge(jx) << \") \" << jy << \" (\" << fudge(jy) << \") \" << jz << \" \" << ksq << \" \" << G[j][0] << \" \" << G[j][1] << std::endl;\n                    //}\n                    G[j][0] *= kfac;\n                    G[j][1] *= kfac;\n                }\n            }\n        }\n    }\n    \n    // Do the reverse transform into FF\n    std::vector<double> FF(n*n*n);\n    {\n        fftw_plan plan = fftw_plan_dft_c2r_3d(n, n, n, G.get() , FF.data(), FFTW_ESTIMATE);\n        fftw_execute(plan);\n        fftw_destroy_plan(plan);\n        const double scale = 1.0/(n*n*n); // FFTW transforms are not normalized\n        for (double& u : FF) u *= scale;\n    }\n\n    // Check the mean potential --- expected to be zero\n    double FFmean = std::reduce(FF.begin(), FF.end(), 0.0)*h*h*h / (L*L*L);\n    std::cout << \"FFmean = \" << FFmean << std::endl;\n    \n    size_t j = mid; //mid+3; // test point (avoid origin) -- don't need to avoid origin now we are treating erf(0)/0 correctly\n    {\n        madness::Gnuplot g(\"set style data l\");\n        std::vector<double> col(&FF[j*n*n + j*n], &FF[j*n*n + j*n + n]);\n        std::vector<double> col2(n);\n        std::vector<double> col3(n);\n        std::cout << \" i   z        FFT               analytic       FFT-analytic\\n\";\n        \n        for (size_t i = 0; i < n; i++) {\n            double v = exact(x[j],y[j],z[i]);\n            std::cout << i << \" \" << z[i] << \" \" << col[i] << \" \" << v << \" \" << col[i]-v << std::endl;\n            col2[i] = v;\n            col3[i] = col[i] - v;\n        }\n\n        //g.plot(z, col, col2);\n        g.plot(z, col3);\n        \n    }\n\n    // std::vector<double> sums = periodic_sum_partial(x[j],y[j],z[0],exact_quadrupoleX,50);\n    // //std::vector<double> sums = periodic_sum_partial(x[j],y[j],z[0],exact_dipoleX,50);\n    // for (size_t i = 0; i < sums.size(); i++) {\n    //     std::cout << i << \" \" << sums[i] << \" \" << exact(x[j],y[j],z[0]) << std::endl;\n    // }\n    // std::cout << exact(x[j],y[j],z[0]) << \" \" << FF[j*n*n + j*n + 0] <<  \" !! \" << periodic_sum_accelerated(x[j],y[j],z[0],exact_quadrupoleX) << std::endl;\n\n    // size_t p = 7; // no. of terms in the polynomial fit --- 7 is best for quadrupole\n    // for (size_t i=p+1; i<sums.size()-p; i++) {\n    //     // Extract the last p terms of the series in v starting at position i\n    //     std::vector<double> f(&sums[i], &sums[i+p]);\n    //     std::vector<double> N(p);\n    //     for (size_t j=0; j<p; j++) {\n    //         N[j] = i+j;\n    //     }\n    //     std::vector<double> c = fit(p, p, N, f);\n    //     std::cout << i << \" \" << c[0] << \" \" << sums[i]-FF[j*n*n + j*n + 0] << \" \" << c[0]-FF[j*n*n + j*n + 0] << std::endl;\n    // }\n\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/periodic/testfilter.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\nconst double L = 10;\n\nstatic double gaussian_3d(const madness::coord_3d& r, const double expnt) {\n    const double x=r[0], y=r[1], z=r[2];\n    const double coeff = pow(expnt/M_PI, 1.5);\n    return coeff * exp(-expnt * (x*x + y*y + z*z));\n}\n\nstatic double rho_electronic_3d(const madness::coord_3d& r) { return gaussian_3d(r, 1); }\nstatic double rho_nuclear_3d(const madness::coord_3d& r) { return -gaussian_3d(r, 10000); }\n\nstatic double rho_gaussian_func_3d(const madness::coord_3d& r) {\n    return rho_electronic_3d(r) + rho_nuclear_3d(r);\n}\n\n// filter out leading order moments up to order k by zeroing out the corresponding coefficients in compressed representation\ntemplate<typename T, std::size_t NDIM>\nvoid filter_moments_inplace(madness::Function<T,NDIM>& f, const int k, const bool fence=true) {\n\n    // can only filter in compressed representation\n    if (!f.is_compressed()) {\n        f.compress(fence);\n    }\n\n    auto filter_op = [&](madness::Tensor<T> &coeff) {\n        if constexpr (NDIM == 3) {\n            if (k >= 0) {\n                coeff(0, 0, 0) = 0.;\n            }\n            if (k >= 1) {\n                coeff(1, 0, 0) = 0.;\n                coeff(0, 1, 0) = 0.;\n                coeff(0, 0, 1) = 0.;\n            }\n            if (k >= 2) {\n                coeff(2, 0, 0) = 0.;\n                coeff(0, 2, 0) = 0.;\n                coeff(0, 0, 2) = 0.;\n                coeff(1, 1, 0) = 0.;\n                coeff(1, 0, 1) = 0.;\n                coeff(0, 1, 1) = 0.;\n            }\n            if (k >= 3)\n                abort();// TODO implement support for higher moments\n        } else\n            static_assert(\"filter_moments_inplace at the moment is implemented for NDIM=3\");\n    };\n\n    // on [-L,L] normalized scaling function k is Sqrt[(2 k + 1)/(2 L)] LegendreP[k, x/L]\n    // the coefficient of x^k in LegendreP[k, x] is 2^(-k) Binomial[2 k, k], hence\n    // coefficient of x^k in scaling function k is Sqrt[(2 k + 1)/(2 L)] Binomial[2 k, k]/(2 L)^k\n    // thus if all moments of up to k-1 vanish, k-th moment (=expectation value of x^k) of\n    // scaling function k is its coefficient times Sqrt[(2 L)/ (2 k + 1)] (2 L)^k / Binomial[2 k, k]\n    f.unaryop_coeff([&](const madness::Key<NDIM> &key, madness::Tensor<T> &coeff) {\n        MADNESS_ASSERT(f.is_compressed());\n        // for compressed form only need 1 node, but public interface does not allow mutable access to the data\n        if (key == f.get_impl()->key0()) {\n            filter_op(coeff);\n        }\n    },\n                    fence);\n}\n\nint main(int argc, char**argv) {\n    using namespace madness;\n    {\n      auto &world = initialize(argc, argv);\n      startup(world, argc, argv, true);\n      \n      // Function defaults\n      int k = 11;\n      double thresh = 1e-9;\n      double eps = 1e-9;\n      FunctionDefaults<3>::set_k(k);\n      FunctionDefaults<3>::set_cubic_cell(-L / 2, L / 2);\n      FunctionDefaults<3>::set_thresh(thresh);\n      FunctionDefaults<3>::set_refine(true);\n      FunctionDefaults<3>::set_initial_level(2);\n      FunctionDefaults<3>::set_truncate_mode(1);\n      \n      Function<double, 3> rho, rhoE, rhoN, V_periodic, V_periodicE, V_periodicN;\n      \n      {\n        // moments to filter out (0 = charge, 1 = dipoles, 2 = quadrupoles, >=3 not supported yet)\n        constexpr int filter_level = 0;\n\tprintf(\"building gaussian diff charge distribution ...\\n\\n\");\n\tstd::vector<coord_3d> special_pt{coord_3d(std::array<double,3>{0.0, 0.0, 0.0})};\n\trho = FunctionFactory<double, 3>(world).special_points(special_pt).initial_level(4).f(rho_gaussian_func_3d);\n        // rho[E+N] is neutral, so no need to filter out the leading moment, but does not hurt\n        filter_moments_inplace(rho, filter_level);\n\trho.truncate();\n\trhoE = FunctionFactory<double, 3>(world).special_points(special_pt).initial_level(4).f(rho_electronic_3d);\n        filter_moments_inplace(rhoE, filter_level);\n\trhoE.truncate();\n\trhoN = FunctionFactory<double, 3>(world).special_points(special_pt).initial_level(4).f(rho_nuclear_3d);\n        filter_moments_inplace(rhoN, filter_level);\n\trhoN.truncate();\n\t\n\tBoundaryConditions<3> bc_periodic(BC_PERIODIC);\n\tSeparatedConvolution<double, 3> pop = CoulombOperator(world, 1e-4, eps, bc_periodic.lattice_range());\n\tprintf(\"applying periodic operator ...\\n\\n\");\n\tV_periodic = apply(pop, rho);\n\tV_periodic.truncate();\n\tV_periodicE = apply(pop, rhoE);\n\tV_periodicE.truncate();\n\tV_periodicN = apply(pop, rhoN);\n\tV_periodicN.truncate();\n\t\n\tV_periodic.reconstruct();\n\tV_periodicE.reconstruct();\n\tV_periodicN.reconstruct();\n      }\n      \n      double bstep = L / 1000.0;\n      printf(\"   z\\t\\tV_(E+N)[z]\\tV_E[z]\\t\\tV_N[z]\\t\\tV_E[z]+V_n[z]\\trho\\t\\terror\\n\");\n      for (int i = 0; i < 1001; i++) {\n\tdouble x = -L / 2 + i * bstep;\n        coord_3d p(std::array<double, 3>{0,0,x});\n        printf(\"%.3f\\t\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\t%.8f\\n\", p[2], V_periodic(p), V_periodicE(p), V_periodicN(p), V_periodicE(p) + V_periodicN(p), rho(p), V_periodic(p) - V_periodicN(p) - V_periodicE(p));\n      }\n    }\n    madness::finalize();\n}\n"
  },
  {
    "path": "src/examples/periodic/testfuns.cc",
    "content": "#include \"testpc.h\"\n#include \"madness/tensor/clapack_fortran.h\"\n#include \"madness/world/madness_exception.h\"\n\ndouble (*f)(double, double, double) = nullptr;\ndouble (*exact)(double, double, double) = nullptr;\n\n// Evaluate erf(a*r)/r with correct limit at origin\ndouble erfaroverr(double a, double r) {\n    if (a*r*r/3.0 < 1e-8) {\n        return 2*a/std::sqrt(pi);\n    }\n    else {\n        return std::erf(a*r)/r;\n    }\n}\n\n// Solve M[m,n] c[n] = f[m] in least squares sense\n// M is the fitting matrix corresponding to m observations and n parameters\n// f is the vector of m observations\n// return the vector c of n fitted parameters\nstd::vector<double> solve(size_t m, size_t n, const std::vector<double>& M, const std::vector<double>& f) {\n    std::vector<double> c = f;\n    std::vector<double> M1 = M;\n    integer lwork = 2 * std::max(m,n);\n    std::vector<double> work(lwork);\n    integer mm = m, nn = n, nrhs = 1, lda = n, ldb = n, info = 0;\n    char trans = 'T';\n    dgels_(&trans,&nn,&mm,&nrhs,M1.data(),&lda,c.data(),&ldb,work.data(),&lwork,&info,1);\n    MADNESS_ASSERT(info == 0);\n    \n    return std::vector<double>(c.data(), c.data()+n);\n}\n\n// Fit the m data points in f to a polynomial of order n in inverse powers of N\nstd::vector<double> fit(size_t m, size_t n, const std::vector<double> N, const std::vector<double>& f) {\n    //print(1,n,N);\n    //print(m,1,f);\n    \n    std::vector<double> M;\n    for (size_t i=0; i<m; i++) {\n        for (size_t j=0; j<n; j++) {\n            M.push_back(pow(1.0/N[i], j));\n        }\n    }\n    //print(m,n,M);\n    return solve(m, n, M, f);\n}\n\n// A C++ procedure to tabulate f(x,y,z) at x = x(i), y = y(j), z = z(k)\nstd::vector<double> tabulate(double(*f)(double, double, double), std::vector<double> x, std::vector<double> y, std::vector<double> z) {\n    const size_t nx = x.size();\n    const size_t ny = y.size();\n    const size_t nz = z.size();\n    std::vector<double> F(nx * ny * nz);\n    for (size_t i = 0; i < nx; i++) {\n        for (size_t j = 0; j < ny; j++) {\n            for (size_t k = 0; k < nz; k++) {\n                F[i*ny*nz + j*nz + k] = f(x[i], y[j], z[k]);\n            }\n        }\n    }\n    return F;\n}\n\n// Periodic sum of functions\ndouble periodic_sum(double x, double y, double z, double(*f)(double, double, double), const int N = 50) {\n    // N number of lattice points summed in each direction\n    double sum = 0.0;\n    for (int X=-N; X<=N; X++) {\n        for (int Y=-N; Y<=N; Y++) {\n            for (int Z=-N; Z<=N; Z++) {\n                sum += f(x+X*L,y+Y*L,z+Z*L);\n            }\n        }\n    }\n    return sum;\n}\n\n// Periodic sum of functions returning vector of values of partial sums in order of increasing cube size\nstd::vector<double> periodic_sum_partial(double x, double y, double z, double(*f)(double, double, double), const int N) {\n    std::vector<double> sums;\n    double sum = f(x,y,z);\n    sums.push_back(sum);\n    int count = 1;\n    // Dumb loop structure since attempt to be smart failed!\n    for (int n = 1; n <= N; n++) {\n        for (int X=-n; X<=n; X++) {\n            for (int Y=-n; Y<=n; Y++) {\n                for (int Z=-n; Z<=n; Z++) {\n                    if (std::abs(X) == n || std::abs(Y) == n || std::abs(Z) == n) {\n                        sum += f(x+X*L,y+Y*L,z+Z*L);\n                        count++;\n                    }\n                }\n            }\n        }\n        sums.push_back(sum);\n    }\n    return sums;\n}\n\n// Periodic sum of functions accelerated by fitting t to a polynomial in 1/N\ndouble periodic_sum_accelerated(double x, double y, double z, double(*f)(double, double, double), const size_t N=9, const size_t p=7) {\n    std::vector<double> sums = periodic_sum_partial(x,y,z,f,N);\n    // Extract the last p terms of the series in v\n    std::vector<double> v(&sums[N-p], &sums[N]);\n    std::vector<double> n(p);\n    for (size_t j=0; j<p; j++) {\n        n[j] = N-p+j;\n    }\n    std::vector<double> c = fit(p, p, n, v);\n    return c[0];\n}\n\ndouble distancesq(double x, double y, double z, double x0, double y0, double z0) {\n    double dx = x - x0;\n    double dy = y - y0;\n    double dz = z - z0;\n    return dx*dx + dy*dy + dz*dz;\n}\n\n// Gaussian spheropole test function\nconst double a = 100.0;\nconst double b = 200.0;\ndouble f_spheropole(double x, double y, double z) {\n    const double afac = std::pow(a/pi, 1.5);\n    const double bfac = std::pow(b/pi, 1.5);\n    const double rsq = distancesq(x,y,z,xshift,yshift,zshift);\n    return afac*exp(-a*rsq) - bfac*exp(-b*rsq);\n}\n\n// No need for periodic summation since the potential is zero exterior to the charge density\ndouble exact_spheropole(double x, double y, double z) {\n    const double mean = pi*(1/b - 1/a)/(L*L*L); // the mean of the potential over the domain\n    const double rsq = distancesq(x,y,z,xshift,yshift,zshift);\n    const double r = std::sqrt(rsq);\n    //return std::erf(std::sqrt(a)*r)/r - std::erf(std::sqrt(b)*r)/r - mean;\n    return erfaroverr(std::sqrt(a),r) - erfaroverr(std::sqrt(b),r) - mean;\n};\n\n// Gaussian dipole test function\nconst double offset = 0.1;\ndouble f_dipole(double x, double y, double z) {\n    const double bfac = std::pow(b/pi, 1.5);\n    const double r1sq = distancesq(x,y,z,xshift,yshift,zshift-offset);\n    const double r2sq = distancesq(x,y,z,xshift,yshift,zshift+offset);\n    return bfac*(std::exp(-b*r1sq) - std::exp(-b*r2sq));\n}\n\n// Potential due to single Gaussian dipole\ndouble exact_dipoleX(double x, double y, double z) {\n    const double r1sq = distancesq(x,y,z,xshift,yshift,zshift-offset);\n    const double r2sq = distancesq(x,y,z,xshift,yshift,zshift+offset);\n    const double r1 = std::sqrt(r1sq);\n    const double r2 = std::sqrt(r2sq);\n    //return std::erf(std::sqrt(b)*r1)/r1 - std::erf(std::sqrt(b)*r2)/r2;\n    double sb = std::sqrt(b);\n    return erfaroverr(sb,r1) - erfaroverr(sb,r2);\n};\n\n// Potential due to opposing electric field generated by FT to satisty the periodic boundary conditions and continuity\ndouble opposing_field_potential(double x, double y, double z) {\n    // center of charge is at (xshift,yshift,zshift)\n    const double mu = 2*offset;\n    return mu*4*pi/(3*L*L*L) * (z-zshift);\n}\n\n// Periodic sum of dipole potentials\ndouble exact_dipole(double x, double y, double z) {\n    // const double mean = 0.0; // the mean of the potential over the domain(zero due to dipole symmetry)\n    return periodic_sum_accelerated(x, y, z, exact_dipoleX) + opposing_field_potential(x,y,z);\n}\n\n// Gaussian quadrupole test function in yz plane\ndouble f_quadrupole(double x, double y, double z) {\n    const double bfac = std::pow(b/pi, 1.5);\n    const double r1sq = distancesq(x, y, z, xshift, yshift,        zshift-offset);\n    const double r2sq = distancesq(x, y, z, xshift, yshift,        zshift+offset);\n    const double r3sq = distancesq(x, y, z, xshift, yshift-offset, zshift);\n    const double r4sq = distancesq(x, y, z, xshift, yshift+offset, zshift);\n    return bfac*(std::exp(-b*r1sq) + std::exp(-b*r2sq) - std::exp(-b*r3sq) - std::exp(-b*r4sq)  );\n}\n\n// Potential due to single Gaussian quadrupole\ndouble exact_quadrupoleX(double x, double y, double z) {\n    const double r1sq = distancesq(x, y, z, xshift, yshift,        zshift-offset);\n    const double r2sq = distancesq(x, y, z, xshift, yshift,        zshift+offset);\n    const double r3sq = distancesq(x, y, z, xshift, yshift-offset, zshift);\n    const double r4sq = distancesq(x, y, z, xshift, yshift+offset, zshift);\n    const double r1 = std::sqrt(r1sq);\n    const double r2 = std::sqrt(r2sq);\n    const double r3 = std::sqrt(r3sq);\n    const double r4 = std::sqrt(r4sq);\n    //return std::erf(std::sqrt(b)*r1)/r1 + std::erf(std::sqrt(b)*r2)/r2  - std::erf(std::sqrt(b)*r3)/r3  - std::erf(std::sqrt(b)*r4)/r4;\n    double sb = std::sqrt(b);\n    return  erfaroverr(sb,r1) + erfaroverr(sb,r2) - erfaroverr(sb,r3) - erfaroverr(sb,r4);\n};\n\n// Periodic sum of quadrupole potentials\ndouble exact_quadrupole(double x, double y, double z) {\n    // const double mean = 0.0; // the mean of the potential over the domain(zero due to dipole symmetry)\n    //return periodic_sum(x, y, z, exact_quadrupoleX);\n    return periodic_sum_accelerated(x, y, z, exact_quadrupoleX);\n}\n\n\n// Cosine test function\nconst double wx = 1;\nconst double wy = 2;\nconst double wz = 3;\ndouble f_cosine(double x, double y, double z) {\n    return std::cos(wx*2*pi*(x-xshift)/L)*std::cos(wy*2*pi*(y-yshift)/L)*std::cos(wz*2*pi*(z-zshift)/L);\n}\n\ndouble exact_cosine(double x, double y, double z) {\n    return f_cosine(x,y,z) / (pi*(wx*wx + wy*wy + wz*wz)/(L*L));\n}\n\n// Return a vector with n equally spaced values between a and b, optionally including the right endpoint\nstd::vector<double> linspace(double a, double b, size_t n, bool include_right_endpoint) {\n    double h = (b - a) / (include_right_endpoint ? (n - 1) : n);\n    std::vector<double> v(n);\n    for (size_t i = 0; i < n; i++) {\n        v[i] = a + i*h;\n    }\n    return v;\n}\n\nvoid set_test_case(int test_case) {\n    if (test_case == 1) {\n        f = f_spheropole;\n        exact = exact_spheropole;\n        std::cout << \"Test case set to Gaussian spheropole\" << std::endl;\n    } else if (test_case == 2) {\n        f = f_dipole;\n        exact = exact_dipole;\n        std::cout << \"Test case set to Gaussian dipole\" << std::endl;\n    } else if (test_case == 3) {\n        f = f_quadrupole;\n        exact = exact_quadrupole;\n        std::cout << \"Test case set to Gaussian quadrupole\" << std::endl;\n    } else if (test_case == 4) {\n        f = f_cosine;\n        exact = exact_cosine;\n        std::cout << \"Test case set to cosine\" << std::endl;\n    } else {\n        std::cerr << \"Invalid test case number\" << std::endl;\n        throw \"bad\";\n    }\n}\n"
  },
  {
    "path": "src/examples/periodic/testpc.h",
    "content": "#ifndef MAD_TESTPC_H\n#define MAD_TESTPC_H\n\n#include <iostream>\n#include <complex>\n#include <numeric>\n#include <vector>\n#include <cmath>\n\n#include <madness/misc/gnuplot.h>\n\nconst double pi = 3.14159265358979323846;\nconst double L = 1.0; // must be integer for cosine test to work, and > 1 for gaussian tests to work\nconst double xshift = 0.0; // shift from origin of charge distributions to test the periodicity in [-0.5*L,0.5*L]\nconst double yshift = 0.0; \nconst double zshift = 0.0;\n\n// Will be assigned by main program based on test_case selection\nextern double (*f)(double, double, double);\nextern double (*exact)(double, double, double);\n\nvoid set_test_case(int test_case);\n\n// print the matrix M[m,n] in row-major order\ntemplate <typename T>\nvoid print(size_t m, size_t n, const std::vector<T>& M) {\n    for (size_t i=0; i<m; i++) {\n        for (size_t j=0; j<n; j++) {\n            std::cout << i << \" \" << M[i*n+j] << \" \";\n        }\n        std::cout << std::endl;\n    }\n}\n\nstd::vector<double> tabulate(double(*f)(double, double, double), std::vector<double> x, std::vector<double> y, std::vector<double> z);\n\nstd::vector<double> linspace(double a, double b, size_t n, bool include_right_endpoint = true);\n\n#endif\n"
  },
  {
    "path": "src/examples/periodic/testpercoul.cc",
    "content": "#include <madness/mra/mra.h>\n#include <madness/mra/mw.h>\n#include <madness/mra/operator.h>\n#include <madness/chem/potentialmanager.h>\n\nconst int L = 18;\nconst int Lx = L;\nconst int Ly = L;\nconst int Lz = L;\n\n// N.B. Normalized Gaussian exponent a produces potential erf(sqrt(a)*r)/r\n\n/// unit-normalized constant\nstatic double unit_func3d(const madness::coord_3d& r)\n{\n  return 1/(L*L*L);\n}\n\n/// diffuse gaussian (a=1) at 0,0,0\nstatic double gdiffuse_000_func3d(const madness::coord_3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  /* diffuse Gaussian ~ electronic density */\n  const double expnt1 = 1.0;\n  const double coeff1 = pow(expnt1/M_PI, 1.5);\n  return coeff1 * exp(-expnt1 * (x*x + y*y + z*z));\n}\n\n/// tight gaussian (a=1e4) at 0,0,0\nstatic double gtight_000_func3d(const madness::coord_3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2];\n  /* diffuse Gaussian ~ electronic density */\n  const double expnt1 = 1.e4;\n  const double coeff1 = pow(expnt1/M_PI, 1.5);\n  return coeff1 * exp(-expnt1 * (x*x + y*y + z*z));\n}\n\n/// diffuse gaussian (a=1) at 0,0,1\nstatic double gdiffuse_001_func3d(const madness::coord_3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2]-1.;\n  /* diffuse Gaussian ~ electronic density */\n  const double expnt1 = 1.0;\n  const double coeff1 = pow(expnt1/M_PI, 1.5);\n  return coeff1 * exp(-expnt1 * (x*x + y*y + z*z));\n}\n\n/// diffuse gaussian (a=1) at 0,0,-1\nstatic double gdiffuse_00m1_func3d(const madness::coord_3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2]+1.;\n  /* diffuse Gaussian ~ electronic density */\n  const double expnt1 = 1.0;\n  const double coeff1 = pow(expnt1/M_PI, 1.5);\n  return coeff1 * exp(-expnt1 * (x*x + y*y + z*z));\n}\n\n/// tight gaussian (a=1e4) at 0,0,-1\nstatic double gtight_00m1_func3d(const madness::coord_3d& r)\n{\n  const double x=r[0], y=r[1], z=r[2]+1.;\n  /* diffuse Gaussian ~ electronic density */\n  const double expnt1 = 1.e4;\n  const double coeff1 = pow(expnt1/M_PI, 1.5);\n  return coeff1 * exp(-expnt1 * (x*x + y*y + z*z));\n}\n\n/// `K`-th moment function along `Axis`, w.r.t to the center of the cell\ntemplate <std::size_t Axis, std::size_t K = 1>\nstatic double kth_moment_func3d(const madness::coord_3d& r) {\n  MADNESS_ASSERT(Axis < 3);\n  auto cell = madness::FunctionDefaults<3>::get_cell();\n  auto o_axis = (cell(Axis, 1) - cell(Axis, 0)) / 2.;\n  return pow(r[Axis] - o_axis, K);\n}\n\n/// spheropole (spherical second moment) function w.r.t the center of the cell\nstatic double r2_func3d(const madness::coord_3d& r) {\n  auto cell = madness::FunctionDefaults<3>::get_cell();\n  const auto x = r[0] - (cell(0, 1) - cell(0, 0)) / 2.;\n  const auto y = r[1] - (cell(1, 1) - cell(1, 0)) / 2.;\n  const auto z = r[2] - (cell(2, 1) - cell(2, 0)) / 2.;\n  return x * x + y * y + z * z;\n}\n\n/// \\brief Filter the moments of a function\n/// \\param[in,out] f on entry: a function to filter; on exit: function with Cartesian moments up to (and including) order \\p k zeroed out\n/// \\param[in] k the maximum order of Cartesian moments to zero out\n/// \\param[in] fence if true, synchronize the function's world after filtering (default: true); since this is an in-place operation, only set `fence=false` when you know there are no pending readers of \\p f\ntemplate<typename T, std::size_t NDIM>\nvoid filter_moments_inplace(madness::Function<T,NDIM>& f, const int k, const bool fence=true) {\n  auto filter_op = [&](madness::Tensor<T> &coeff) {\n    if constexpr (NDIM == 3) {\n      if (k >= 0) {\n        coeff(0, 0, 0) = 0.;\n      }\n      if (k >= 1) {\n        coeff(1, 0, 0) = 0.;\n        coeff(0, 1, 0) = 0.;\n        coeff(0, 0, 1) = 0.;\n      }\n      if (k >= 2) {\n        coeff(2, 0, 0) = 0.;\n        coeff(0, 2, 0) = 0.;\n        coeff(0, 0, 2) = 0.;\n        coeff(1, 1, 0) = 0.;\n        coeff(1, 0, 1) = 0.;\n        coeff(0, 1, 1) = 0.;\n      }\n      if (k >= 3)\n        abort();// TODO implement support for higher moments\n    } else\n      static_assert(\"filter_moments_inplace at the moment is implemented for NDIM=3\");\n  };\n\n  // on [-L,L] normalized scaling function k is Sqrt[(2 k + 1)/(2 L)] LegendreP[k, x/L]\n  // the coefficient of x^k in LegendreP[k, x] is 2^(-k) Binomial[2 k, k], hence\n  // the coefficient of x^k in LegendreP[k, x] is 2^(-k) Binomial[2 k, k], hence\n  // coefficient of x^k in scaling function k is Sqrt[(2 k + 1)/(2 L)] Binomial[2 k, k]/(2 L)^k\n  // thus if all moments of up to k-1 vanish, k-th moment (=expectation value of x^k) of\n  // scaling function k is its coefficient times Sqrt[(2 L)/ (2 k + 1)] (2 L)^k / Binomial[2 k, k]\n  f.unaryop_coeff([&](const madness::Key<NDIM> &key, madness::Tensor<T> &coeff) {\n    if (f.is_reconstructed()) {\n      filter_op(coeff);\n    } else if (f.is_compressed()) {\n      // for compressed form only need 1 node, but public interface does not allow mutable access to the data\n      if (key == f.get_impl()->key0()) {\n        filter_op(coeff);\n      }\n    } else {\n      MADNESS_EXCEPTION(\"filter_moments_inplace(f): f must be either compressed or reconstructed\", 1);\n    }\n  },\n                  fence);\n}\n\n// This function test both the periodic and non-periodic versions of the Coulomb\n// operator. In order to make this test valid set L to a high value so that\n// charge distribution should not be able to see its neighbor.\nint main(int argc, char**argv) {\n  using namespace madness;\n  auto &world = initialize(argc, argv);\n  startup(world, argc, argv, true);\n\n  int nerrors = 0;\n\n  {\n\n    // Function defaults\n    int k = 10;\n    double eps = std::pow(10., -k+2);\n    FunctionDefaults<3>::set_k(k);\n    Tensor<double> cell(3, 2);\n    cell(0, 0) = -Lx / 2;\n    cell(0, 1) = Ly / 2;\n    cell(1, 0) = -Ly / 2;\n    cell(1, 1) = Ly / 2;\n    cell(2, 0) = -Lz / 2;\n    cell(2, 1) = Lz / 2;\n    BoundaryConditions<3> bc_open(BC_FREE);\n    BoundaryConditions<3> bc_periodic(BC_PERIODIC);\n    BoundaryConditions<3> bc_mixed({BC_FREE, BC_FREE, BC_FREE, BC_FREE, BC_PERIODIC, BC_PERIODIC});\n    FunctionDefaults<3>::set_bc(bc_mixed);\n    const auto bc = FunctionDefaults<3>::get_bc();\n    Displacements<3>::reset_periodic_axes(bc.is_periodic());\n\n    FunctionDefaults<3>::set_cell(cell);\n    FunctionDefaults<3>::set_thresh(eps);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_autorefine(false);\n    FunctionDefaults<3>::set_initial_level(2);\n    FunctionDefaults<3>::set_truncate_mode(0);\n\n    // Create test charge density and the exact solution to Poisson's equation\n    // with said charge density\n    auto r000 =\n        std::vector<coord_3d>{coord_3d(std::array<double, 3>{0.0, 0.0, 0.0})};\n    auto r001 =\n        std::vector<coord_3d>{coord_3d(std::array<double, 3>{0.0, 0.0, 1.0})};\n    auto r00m1 =\n        std::vector<coord_3d>{coord_3d(std::array<double, 3>{0.0, 0.0, -1.0})};\n    Function<double, 3> unit =\n        FunctionFactory<double, 3>(world).initial_level(4).f(unit_func3d);\n    printf(\"projected unit\\n\");\n    Function<double, 3> gdiffuse_000 = FunctionFactory<double, 3>(world)\n                                           .initial_level(4)\n                                           .special_points(r000)\n                                           .f(gdiffuse_000_func3d);\n    printf(\"projected gdiffuse_000\\n\");\n    Function<double, 3> gtight_000 = FunctionFactory<double, 3>(world)\n                                         .initial_level(4)\n                                         .special_points(r000)\n                                         .f(gtight_000_func3d);\n    printf(\"projected gtight_000\\n\");\n    Function<double, 3> gdiffuse_001 = FunctionFactory<double, 3>(world)\n                                           .initial_level(4)\n                                           .special_points(r001)\n                                           .f(gdiffuse_001_func3d);\n    printf(\"projected gdiffuse_001\\n\");\n    Function<double, 3> gdiffuse_00m1 = FunctionFactory<double, 3>(world)\n                                            .initial_level(4)\n                                            .special_points(r00m1)\n                                            .f(gdiffuse_00m1_func3d);\n    printf(\"projected gdiffuse_00m1\\n\");\n    Function<double, 3> gtight_00m1 = FunctionFactory<double, 3>(world)\n                                          .initial_level(4)\n                                          .special_points(r00m1)\n                                          .f(gtight_00m1_func3d);\n    printf(\"projected gtight_00m1\\n\");\n    Function<double, 3> r2 =\n        FunctionFactory<double, 3>(world).initial_level(4).f(r2_func3d);\n    printf(\"projected r2\\n\");\n    Function<double, 3> x =\n        FunctionFactory<double, 3>(world).initial_level(4).f(\n            kth_moment_func3d<0, 1>);\n    Function<double, 3> y =\n        FunctionFactory<double, 3>(world).initial_level(4).f(\n            kth_moment_func3d<1, 1>);\n    Function<double, 3> z =\n        FunctionFactory<double, 3>(world).initial_level(4).f(\n            kth_moment_func3d<2, 1>);\n    printf(\"projected dipoles\\n\");\n    unit.truncate();\n    gdiffuse_000.truncate();\n    gtight_000.truncate();\n    gdiffuse_001.truncate();\n    gdiffuse_00m1.truncate();\n    gtight_00m1.truncate();\n    r2.truncate();\n    x.truncate();\n    y.truncate();\n    z.truncate();\n    printf(\"truncated\\n\");\n\n    printf(\"\\n\");\n\n    print(\"gdiffuse = diffuse Gaussian at (0,0,-1)\");\n    auto gdiffuse = gdiffuse_00m1;\n    print(\"gtight = tight Gaussian at (0,0,-1)\");\n    auto gtight = gtight_00m1;\n    auto rho = gdiffuse - gtight;\n    // filter_moments_inplace(rho,2);\n    printf(\"rho = gdiffuse - gtight\\n\\n\");\n\n    // Average value of the test function\n    printf(\"Average value of gdiffuse is %.8f\\n\", gdiffuse.trace());\n    printf(\"Average value of gtight is %.8f\\n\", gtight.trace());\n    printf(\"Average value of rho is %.8f\\n\", rho.trace());\n    printf(\"Spheropole of rho is %.8f\\n\", rho.inner(r2));\n    printf(\"Average value of unit density is %.8f\\n\", unit.trace());\n    printf(\"Spheropole of unit density is %.8f\\n\", unit.inner(r2));\n\n    printf(\"\\n\");\n\n    // Create operators and apply\n    SeparatedConvolution<double, 3> op =\n        CoulombOperator(world, 1e-10, eps, bc_open.lattice_range());\n    SeparatedConvolution<double, 3> pop =\n        CoulombOperator(world, 1e-10, eps, bc.lattice_range());\n\n    auto range = bc.make_range<3>(1, .5/L);\n\n    // N.B. non-periodic Coulomb with range restriction to [-L/2,L/2]\n    SeparatedConvolution<double, 3> op_rr(\n        world,\n        madness::OperatorInfo(0.0, 1e-10, eps, madness::OT_G12,\n                              /* truncate? */ false,\n                              /* range restriction? */\n                              range\n                              ),\n        madness::no_lattice_sum_range<3>());\n    // N.B. Coulomb with range restriction to [-L/2,L/2]\n    SeparatedConvolution<double, 3> pop_rr(\n        world,\n        madness::OperatorInfo(0.0, 1e-10, eps, madness::OT_G12,\n                              /* truncate? */ false,\n                              /* range restriction? */\n                              range\n                              ),\n        bc.lattice_range());\n    // N.B. Coulomb with range restriction to [-L/2,L/2]\n    SeparatedConvolution<double, 3> pop2_rr(\n        world,\n        madness::OperatorInfo(0.0, 1e-10, eps, madness::OT_G12,\n                              /* truncate? */ false,\n                              /* range restriction? */\n                              range\n                              ),\n        madness::no_lattice_sum_range<3>());\n    pop2_rr.set_domain_periodicity(bc.is_periodic());\n\n    // check operator norms\n    {\n      int nerrors_local = 0;\n\n      constexpr auto ND = 3;\n      for (int n = 1; n <= 5; ++n) {\n        const auto twonm1 = 1 << (n - 1);\n        const auto twonm3 = 1 << std::max((n - 1), 0);\n        Key<ND> key(n, {twonm3, twonm1, 0});\n\n        std::size_t disp_count = 0;\n        std::array<std::optional<std::int64_t>, ND> box_radius;\n        std::array<std::optional<std::int64_t>, ND> surface_thickness;\n        auto &range = op_rr.get_range();\n        for (int d = 0; d != ND; ++d) {\n          if (range[d]) {\n            box_radius[d] = range[d].N();\n            surface_thickness[d] = range[d].finite_soft() ? 2 : 0;\n          }\n        }\n\n        // surface displacements\n        {\n          BoxSurfaceDisplacementRange<ND> range_boundary_face_displacements(\n              key, box_radius, surface_thickness, madness::no_lattice_sum<3>(),\n              [](const auto level, const auto &dest,\n                 const auto &displacement) -> bool { return true; });\n          // check that all displacements are unique:\n          {\n            std::vector disps(range_boundary_face_displacements.begin(),\n                              range_boundary_face_displacements.end());\n            std::sort(disps.begin(), disps.end());\n            auto it = std::unique(disps.begin(), disps.end());\n\n            if (it != disps.end()) {\n              std::cout << \"Duplicates found!!\" << std::endl;\n              abort();\n            }\n          }\n\n          auto process_displacement = [&](const Key<3>& disp) {\n\n            auto rp2 = pop2_rr.get_ops();\n            auto rp = pop_rr.get_ops();\n            auto rnp = op_rr.get_ops();\n            const auto twon = 1 << n;\n            MADNESS_ASSERT(rp2.size() == rp.size());\n            for(size_t mu=0; mu != rp.size(); ++mu) {\n              for(int d=0; d!=3; ++d) {\n                const auto& rp_R = rp[mu].getop(d)->nonstandard(n, disp[d])->R;\n                const auto& rp2_R = rp2[mu].getop(d)->nonstandard(n, disp[d])->R;\n                if (!rp_R.has_data()) {\n                  MADNESS_ASSERT(!rp2_R.has_data());\n                  continue;\n                }\n\n                if (bc.is_periodic()[d]) {\n                  auto rp_mu_gau =\n                      std::dynamic_pointer_cast<GaussianConvolution1D<double>>(\n                          rp[mu].getop(d));\n\n                  const auto &rnp_d0_R =\n                      rnp[mu].getop(d)->nonstandard(n, disp[d])->R;\n                  const auto &rnp_d1_R =\n                      rnp[mu].getop(d)->nonstandard(n, disp[d] + twon)->R;\n                  const auto &rnp_dm1_R =\n                      rnp[mu].getop(d)->nonstandard(n, disp[d] - twon)->R;\n                  MADNESS_ASSERT(rnp_d0_R.has_data() || rnp_d1_R.has_data() ||\n                                 rnp_dm1_R.has_data());\n                  Tensor<double> rp_R_recomputed;\n                  if (rnp_d0_R.has_data())\n                    rp_R_recomputed = copy(rnp_d0_R);\n                  if (rnp_d1_R.has_data())\n                    rp_R_recomputed = rp_R_recomputed.has_data()\n                                          ? rp_R_recomputed + rnp_d1_R\n                                          : copy(rnp_d1_R);\n                  if (rnp_dm1_R.has_data())\n                    rp_R_recomputed = rp_R_recomputed.has_data()\n                                          ? rp_R_recomputed + rnp_dm1_R\n                                          : copy(rnp_dm1_R);\n                  const auto error_rp = (rp_R - rp_R_recomputed).normf();\n                  const auto error_rp2 = (rp2_R - rnp_d0_R).normf();\n\n                  if (error_rp > 1e-14 || error_rp2 > 1e-14) {\n                    if (true) {\n                      std::cout << \"||RP||{n=\" << n << \",l=0} -> {n=\" << n\n                                << \",l=\" << disp.translation()\n                                << \"} = \" << std::scientific\n                                << pop_rr.norm(\n                                       n, Key<3>(n, disp.translation()),\n                                       Key<3>(n, Vector<Translation, 3>{0, 0, 0}))\n                                << \"\\n\";\n                      std::cout << \"||RP2||{n=\" << n << \",l=0} -> {n=\" << n\n                                << \",l=\" << disp.translation()\n                                << \"} = \" << std::scientific\n                                << pop2_rr.norm(\n                                       n, Key<3>(n, disp.translation()),\n                                       Key<3>(n, Vector<Translation, 3>{0, 0, 0}))\n                                << \"\\n\";\n                    }\n                    ++nerrors_local;\n                  }\n                }\n              }\n            }\n          };\n\n          for (int l = 0; l != (1 << (n - 1)) + 5; ++l) {\n            process_displacement(Key<3>(n, Vector<Translation, 3>({l, 0, 0})));\n            ++disp_count;\n          }\n\n          if (n <= 3) {\n            for (auto &&disp : range_boundary_face_displacements) {\n              process_displacement(disp);\n              ++disp_count;\n            }\n          }\n\n          process_displacement(Key<3>(n, Vector<Translation, 3>({-4,0,7})));\n          process_displacement(Key<3>(n, Vector<Translation, 3>({-4,1,7})));\n\n        } // box displacements\n\n      }\n      std::cout << \"RNP operator norms check ... \" << (nerrors_local > 0 ? \"(FAIL)\" : \"(PASS)\") << std::endl;\n      nerrors += nerrors_local;\n    }\n\n    const std::vector<std::reference_wrapper<const SeparatedConvolution<double, 3>>> test_operators = {op, pop, op_rr, pop_rr, pop2_rr};\n    const std::vector<std::string> test_operator_names = {\"NP\", \"P\", \"RNP\", \"RP\", \"RP2\"};\n    std::map<std::string, std::reference_wrapper<const SeparatedConvolution<double, 3>>> str2op;\n    for(size_t i=0; i!=test_operators.size(); ++i) {\n      str2op.emplace(test_operator_names[i], test_operators[i]);\n    }\n    const std::vector<Function<double, 3>> test_functions = {rho, gdiffuse, gtight};\n    const std::vector<std::string> test_function_names = {\"rho\", \"gdiffuse\", \"gtight\"};  // must be this order since we assume 0 = 1 - 2\n\n    std::vector<std::vector<Function<double, 3>>> V_op_f;\n    int oi = 0;\n    for(const auto& o: test_operators) {\n      int fi = 0;\n\n      V_op_f.push_back({});\n      V_op_f.back().reserve(test_functions.size());\n\n      for(const auto& f: test_functions) {\n\n        printf(\"applying operator %s to %s ... \", test_operator_names[oi].c_str(), test_function_names[fi].c_str());\n        const auto tstart = cpu_time();\n        V_op_f[oi].emplace_back(apply(o.get(), f).truncate());\n        const auto tstop = cpu_time();\n        printf(\"%5.2e sec\\n\", tstop - tstart);\n\n        printf(\"  <V_%s[%s]> = %.8f\\n\",\n               test_operator_names[oi].c_str(), test_function_names[fi].c_str(), V_op_f[oi].back().trace());\n\n        ++fi;\n      }\n\n      printf(\"\\n\");\n      ++oi;\n    }\n    printf(\"\\n\");\n\n    std::map<std::string, std::vector<Function<double, 3>>> str2V;\n    for(size_t i=0; i!=test_operators.size(); ++i) {\n      str2V.emplace(test_operator_names[i], V_op_f[i]);\n    }\n\n    for(size_t oi=0; oi != test_operators.size(); ++oi) {\n      std::string ostr = test_operator_names[oi];\n      std::string vstr = \"V_\" + ostr;\n      const auto error =(str2V[ostr][0] - str2V[ostr][1] + str2V[ostr][2]).norm2();\n      const auto tol = k <=10 ? 2e2 * eps : 5e-7;\n      const bool success = error <= tol;\n      if (!success) ++nerrors;\n      std::cout << \"||\" << vstr << \"(rho)-\" << vstr << \"(gdiffuse)+\" << vstr\n                << \"(gtight)||=\"\n                << error << (success ? \" (PASS)\" : \" (FAIL)\")\n                << std::endl;\n    }\n    printf(\"\\n\");\n\n    const int step = 1;\n    const std::vector<std::string> axis_names = {\"X\", \"Z\"};\n    for(const auto& axis_name: axis_names) {\n\n      auto make_coord = [&](int r) {\n        return axis_name==\"X\" ? coord_3d{double(r), 0, 0} : (axis_name==\"Y\" ? coord_3d{0, double(r), 0} : coord_3d{0, 0, double(r)});\n      };\n\n      for(size_t fi=0; fi != test_functions.size(); ++fi) {\n        const auto& f = test_functions[fi];\n        const auto L = axis_name==\"X\" ? Lx : (axis_name==\"Y\" ? Ly : Lz);\n\n        printf(\"Scan along %s axis\\n\", axis_name.c_str());\n        printf(\"%10c%18s%18s%18s%18s%18s%18s%18s%18s%18s%18s\\n\", std::tolower(axis_name[0]),\n               test_function_names[fi].c_str(), \"V_NP\", \"V_P\", \"V_RNP\", \"V_RP\", \"V_RP2\",\n               \"V_P-V_NP\", \"V_P-V_RP\",\n               \"V_RP-V_NP\", \"V_RP-V_RP2\");\n        for (int r = -L / 2; r <= L / 2;\n             r += step) {\n          auto p = make_coord(r);\n          printf(\"%10.2f%18.8f%18.8f%18.8f%18.8f%18.8f%18.8f%18.8f%18.8f%18.8f%18.8f\\n\", (double)r,\n                 f(p), str2V[\"NP\"][fi](p), str2V[\"P\"][fi](p), str2V[\"RNP\"][fi](p), str2V[\"RP\"][fi](p), str2V[\"RP2\"][fi](p),\n                 str2V[\"P\"][fi](p) - str2V[\"NP\"][fi](p),\n                 str2V[\"P\"][fi](p) - str2V[\"RP\"][fi](p),\n                 str2V[\"RP\"][fi](p) - str2V[\"NP\"][fi](p),\n                 str2V[\"RP\"][fi](p) - str2V[\"RP2\"][fi](p)\n                 );\n        }\n\n        // check periodicity of potential\n        for (std::string opstr : {\"P\", \"RP\"}) {\n          const auto ptol = k <= 10 ? 1e2 * eps : 1e-5;\n          std::string result_str = \"(PASS)\";\n          if (std::abs(str2V[opstr][fi](make_coord(L / 2)) -\n                       str2V[opstr][fi](make_coord(-L / 2))) > ptol) {\n            ++nerrors;\n            result_str = \"(FAIL)\";\n          }\n          printf(\"check if V_%s(%s) is periodic along %s: %s\\n\", opstr.c_str(),\n                 test_function_names[fi].c_str(),\n                 axis_name.c_str(), result_str.c_str());\n        }\n      }\n    }  // gaussian density test\n\n    // test superfine structure\n    if (false) {  // tiny MRA box\n      const auto n=15;\n      const auto twon = (1<<n);\n      const auto one_over_twon = 1./twon;\n      const Key<3> key(15, {(1<<14) - 1, (1<<14)-1, 18932});\n      const auto ff =\n          ScalingFunctionFunctor<3>({Lx/2, Ly/2, Lz/2}, key, {0,0,0});\n      std::cout << \"ff(ff.special_points()[0]) = \" << ff(ff.special_points()[0]) << std::endl;\n      madness::real_function_3d f =\n          madness::real_factory_3d(world)\n              .functor(ff)\n              .truncate_mode(0)\n          //.special_points(std::vector{coord_3d{-0.5*one_over_twon,-0.5*one_over_twon,-L + (18932*2*L+0.5) * one_over_twon}})\n          ;\n      f.truncate();\n      f.print_tree(std::cout);\n\n      auto V_np = op(f);\n      auto V_rnp = op_rr(f);\n\n      std::string axis_name = \"Z\";\n      printf(\"Scan along %s axis\\n\", axis_name.c_str());\n      printf(\"%10c%18s%18s%18s\\n\", std::tolower(axis_name[0]),\n             \"ρn\", \"V_NP\", \"V_RNP\");\n      const auto step = 0.18;\n      for (double r = -L / 2; r <= L / 2;\n           r += step) {\n        coord_3d p = {-0.5*one_over_twon, -0.5*one_over_twon, (double)r};\n        printf(\"%10.2f%18.8f%18.8f%18.8f\\n\", (double)r,\n               f(p), V_np(p), V_rnp(p)\n        );\n      }\n\n    }  // superfine box test\n\n    if (true) { // sum of point charges\n      int nerrors_local = 0;\n      auto check = [&](double error, double tol) {\n        bool success = error < tol;\n        if (!success)\n          ++nerrors_local;\n      };\n      auto scheck = [&](const auto& str, double error, double tol) {\n        const bool success = error < tol;\n        if (!success)\n          ++nerrors_local;\n        std::cout << str << \" = \" << error\n                  << (success ? \"(PASS)\" : \"(FAIL)\") << std::endl;\n      };\n\n      constexpr auto x0 = -1.0;\n      const auto xs = {-9., -7.9, -4.7, -4.3, x0};\n\n      std::vector<madness::Atom> mad_atoms;\n      // uncomment all charges to stress test\n      for (const auto& atom : std::vector<std::array<double, 3>>{\n//               {x0, 0., 1.4},\n//               {x0, 0., -0.4},\n//               {x0, 0., 3.2},\n//               {x0, 0., -2.2},\n//               {x0, 0., 5.0},\n//               {x0, 0., -4.0},\n//               {x0, 0., 6.8},\n//               {x0, 0., -5.8},\n//               {x0, 0., 8.6},\n               {x0, 0., -7.6}\n           }) {\n        mad_atoms.emplace_back(atom[0], atom[1], atom[2], +1., 1);\n      }\n      madness::Molecule mol(std::move(mad_atoms),\n                            eps/10.);\n      auto ρn_func = std::make_shared<madness::NuclearDensityFunctor>(mol);\n      using fi3d = madness::FunctionFunctorInterface<double, 3>;\n      madness::real_function_3d ρnuc =\n          madness::real_factory_3d(world)\n              .functor(std::static_pointer_cast<fi3d>(ρn_func))\n              .truncate_mode(0)\n              .truncate_on_project();\n      ρnuc.truncate();\n\n      auto V_np = op(ρnuc);\n      auto V_np_exact_func = std::make_shared<madness::MolecularPotentialFunctor>(mol);\n      madness::real_function_3d  V_np_exact =\n          madness::real_factory_3d(world)\n              .functor(std::static_pointer_cast<fi3d>(V_np_exact_func))\n              .truncate_mode(0)\n              .truncate_on_project();\n      V_np_exact *= -1;\n      scheck(\"||NP - NP(exact)||\", (V_np - V_np_exact).norm2(), 1e2 * eps);\n\n      {\n        for (auto x: xs) {\n          printf(\"Scan along {%f,0,z} ray\\n\", x);\n          printf(\"%10s%18s%18s%18s%18s%18s\\n\", \"z\", \"V_NP\",\n                 \"V_NP(exact)\", \"δV_NP\", \"V_NP(exact,mw)\",\n                 \"V_NP(exact,δmw)\");\n          const auto step = 0.18;\n          for (double z = -L / 2; z <= L / 2; z += step) {\n            coord_3d p = {x, 0, (double)z};\n            const auto v = V_np(p);\n            const auto v_ex = -(*V_np_exact_func)(p);\n            const auto v_ex_mw = V_np_exact(p);\n\n            printf(\"%10.2f%18.8f%18.8f%18.8f%18.8f%18.8f\\n\", (double)z, v,\n                   v_ex, v-v_ex, v_ex, v_ex_mw - v_ex);\n\n            // near the point charges the errors due to projection can be large, but operator application reduces them\n            check(v-v_ex_mw, (x == x0 ? 5e2 : 5) * eps);\n            check(v-v_ex, 5 * eps);\n          }\n        }\n      }\n\n      auto V_rp = pop_rr(ρnuc);\n      auto V_rp2 = pop2_rr(ρnuc);\n\n      scheck(\"||RP - RP2||\", (V_rp - V_rp2).norm2(), 1e2 * eps);\n\n      auto V_rp_exact_func = std::make_shared<madness::WignerSeitzPotentialFunctor>(mol, FunctionDefaults<3>::get_cell(), FunctionDefaults<3>::get_bc(), range);\n      madness::real_function_3d  V_rp_exact =\n          madness::real_factory_3d(world)\n              .functor(std::static_pointer_cast<fi3d>(V_rp_exact_func))\n              .truncate_mode(0)\n              .truncate_on_project();\n      V_rp_exact *= -1;\n      scheck(\"||RP - RP(exact)||\", (V_rp - V_rp_exact).norm2(), 1e2 * eps);\n      scheck(\"||RP2 - RP(exact)||\", (V_rp2 - V_rp_exact).norm2(), 1e2 * eps);\n\n      {\n        for (auto x: xs) {\n          printf(\"Scan along {%f,0,z} ray\\n\", x);\n          printf(\"%10s%18s%18s%18s%18s%18s\\n\", \"z\", \"V_RP\",\n                 \"V_RP(exact)\", \"δV_RP\", \"V_RP(exact,mw)\",\n                 \"V_RP(exact,δmw)\");\n          const auto step = 0.18;\n          for (double z = -L / 2; z <= L / 2; z += step) {\n            coord_3d p = {x, 0, (double)z};\n            const auto v = V_rp(p);\n            const auto v_ex_mw = V_rp_exact(p);\n            const auto v_ex = -(*V_rp_exact_func)(p);\n\n            printf(\"%10.2f%18.8f%18.8f%18.8f%18.8f%18.8f\\n\", (double)z, v,\n                   v_ex, v - v_ex, v_ex_mw, v_ex_mw - v_ex);\n\n            // near the point charges the errors due to projection can be large, but operator application reduces them\n            check(v-v_ex_mw, (x == x0 ? 5e2 : 5) * eps);\n            check(v-v_ex, 5 * eps);\n          }\n        }\n      }\n\n      auto V_rnp = op_rr(ρnuc);\n      auto V_rnp_exact_func = std::make_shared<madness::WignerSeitzPotentialFunctor>(mol, FunctionDefaults<3>::get_cell(), FunctionDefaults<3>::get_bc(), range, std::array{0,0,0});\n      madness::real_function_3d  V_rnp_exact =\n          madness::real_factory_3d(world)\n              .functor(std::static_pointer_cast<fi3d>(V_rnp_exact_func))\n              .truncate_mode(1)\n              .truncate_on_project();\n      V_rnp_exact *= -1;\n      scheck(\"||RNP - RNP(exact)||\", (V_rnp - V_rnp_exact).norm2(), 1e2 * eps);\n\n      {\n        for (auto x: xs) {\n          printf(\"Scan along {%f,0,z} ray\\n\", x);\n          printf(\"%10s%18s%18s%18s%18s%18s\\n\", \"z\", \"V_RNP\",\n                 \"V_RNP(exact)\", \"δV_RNP\", \"V_RNP(exact, mw)\",\n                 \"V_RNP(exact,δmw)\");\n          const auto step = 0.18;\n          for (double z = -L / 2; z <= L / 2; z += step) {\n            coord_3d p = {x, 0, (double)z};\n            const auto v = V_rnp(p);\n            const auto v_ex_mw = V_rnp_exact(p);\n            const auto v_ex = -(*V_rnp_exact_func)(p);\n\n            printf(\"%10.2f%18.8f%18.8f%18.8f%18.8f%18.8f\\n\", (double)z, v,\n                   v_ex, v - v_ex, v_ex_mw, v_ex_mw - v_ex);\n\n            // near the point charges the errors due to projection can be large, but operator application reduces them\n            check(v-v_ex_mw, (x == x0 ? 5e2 : 5) * eps);\n            check(v-v_ex, 5 * eps);\n          }\n        }\n      }\n\n      plot_plane(world, std::vector{V_np - V_np_exact,\n                                    V_rnp - V_rnp_exact, V_rp2 - V_rp_exact, V_rp - V_rp2}, \"input\");\n\n      auto V_p = pop(ρnuc);\n      {\n        std::string axis_name = \"Z\";\n        printf(\"Scan along %s axis\\n\", axis_name.c_str());\n        printf(\"%10c%18s%18s%18s%18s%18s%18s\\n\", std::tolower(axis_name[0]),\n               \"ρn\", \"V_NP\", \"V_RNP\", \"V_P\", \"V_RP\", \"V_RP2\");\n        const auto step = 0.18;\n        for (double r = -L / 2; r <= L / 2; r += step) {\n          coord_3d p = {x0, 0, (double)r};\n          printf(\"%10.2f%18.8f%18.8f%18.8f%18.8f%18.8f%18.8f\\n\", (double)r,\n                 ρnuc(p), V_np(p), V_rnp(p), V_p(p), V_rp(p), V_rp2(p));\n        }\n      }\n\n      // plot contributions from individual Gaussians in the separated representation\n      // do this for every 10th term in the separated representation\n      if (false) {\n        const auto rank = op.get_rank();\n        MADNESS_ASSERT(rank == op_rr.get_rank());\n        for (int mu = 0; mu < rank; mu += 10) {\n          std::cout << \"=== op[mu].alpha = \"\n                    << std::static_pointer_cast<GaussianConvolution1D<double>>(\n                           op.get_ops().at(mu).getop(0))\n                           ->expnt\n                    << std::endl;\n          SeparatedConvolution<double, 3> op_mu(\n              world, std::vector{op.get_ops().at(mu)});\n          SeparatedConvolution<double, 3> op_rr_mu(\n              world, std::vector{op_rr.get_ops().at(mu)});\n\n          auto V_np = op_mu(ρnuc);\n          auto V_rnp = op_rr_mu(ρnuc);\n\n          std::string axis_name = \"Z\";\n          printf(\"Scan along %s axis\\n\", axis_name.c_str());\n          printf(\"%10c%18s%18s%18s\\n\", std::tolower(axis_name[0]), \"ρn\", \"V_NP\",\n                 \"V_RNP\");\n          const auto step = 0.18;\n          for (double r = -L / 2; r <= L / 2; r += step) {\n            coord_3d p = {0, 0, (double)r};\n            printf(\"%10.2f%18.8f%18.8f%18.8f\\n\", (double)r, ρnuc(p), V_np(p),\n                   V_rnp(p));\n          }\n        }\n      }\n\n      nerrors += nerrors_local;\n    }  // point charge test\n\n  }\n\n  madness::finalize();\n\n  printf(\"nerrors = %d\\n\", nerrors);\n\n  return nerrors;\n}\n"
  },
  {
    "path": "src/examples/ploterr.cc",
    "content": "#include <madness/mra/mra.h>\n\nusing namespace madness;\n\ndouble myf(const coord_1d& r) {\n    return 1.0/sqrt(fabs(r[0])+1e-6);\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n    FunctionDefaults<1>::set_cubic_cell(-3,3);\n\n    for (int t=1; t<6; t++) {\n        double thresh = pow(0.1,t);\n        FunctionDefaults<1>::set_thresh(thresh);\n        for (int k=1; k<=6; k++) {\n            FunctionDefaults<1>::set_k(k);\n\n            real_function_1d f = real_factory_1d(world).f(myf);\n            f.truncate();\n            char fname[32];\n            sprintf(fname, \"err_t%1.1d_k%1.1d.dat\", t, k);\n            FILE* file = fopen(fname, \"w\");\n            for (int i=0; i<=10000; i++) {\n                double x = 6.0*i/10000 - 3.0;\n                coord_1d r(x);\n                fprintf(file, \"%12.6f %12.6f %12.6f %.3e\\n\",\n                        x, fabs(myf(r)-f(r)), myf(r), f(r));\n            }\n        }\n    }\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/sdf_shape_tester.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n  \\file examples/sdf_shape_tester.cc\n  \\brief Demonstrates/tests use of 3D shape functions\n  \\defgroup shape_tester Demonstrates/tests use of 3D shape functions\n  \\ingroup examples\n\n  \\par Points of interest\n  - Use of shape functions to define interior surfaces\n  - Plotting for subsequent visualization with OpenDX\n\n  \\par Backgroud\n\n  The classes in mra/sdf_shape_3D.h illustrate how to define\n  surfaces as MADNESS functions for subsequent use in calculations\n  using them as sources or for enforcing boundary conditions on\n  interior surfaces.  This example instantiates each shape and\n  plots it for subsequent visual verification (with OpenDX).\n\n */\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/sdf_shape_3D.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n\nint main(int argc, char **argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n    static const double L = 2.0;\n\n    double epsilon = 0.2;\n\n    // Function defaults\n    FunctionDefaults<3>::set_k(5);\n    FunctionDefaults<3>::set_thresh(1e-3);\n    FunctionDefaults<3>::set_cubic_cell(-L, L);\n\n    // create the shape mask\n    coord_3d pt, vec, sides;\n    double c, rad, vol, area;\n    pt[0] = 0.0;\n    pt[1] = 0.5;\n    pt[2] = 0.0;\n    vec[0] = 0.0;\n    vec[1] = 0.0;\n    vec[2] = 1.0;\n    sides[0]=0.3;\n    sides[1]=0.6;\n    sides[2]=1.0;\n    c = 0.5;\n    rad = 0.75;\n\n    // for plotting the shapes the old code used VTK, but I dunno how to use that\n    // so switched to opendx\n\n    real_function_3d f;\n\n    // use LLRV domain masking\n    std::shared_ptr< DomainMaskInterface > llrv(new LLRVDomainMask(epsilon));\n\n    // cylinder\n    std::shared_ptr< SignedDFInterface<3> > cylinder(new SDFCylinder(rad, 1.0, pt, vec));\n//    std::shared_ptr< DomainMaskSDFFunctor<3> > cylfunctor(new DomainMaskSDFFunctor<3>(llrv, cylinder));\n    DomainMaskSDFFunctor<3> cylfunctor(llrv, cylinder);\n\n    // the functor, by default, makes the volume function\n    f = real_factory_3d(world).functor(cylfunctor);\n    vol = f.trace();\n    plotdx(f, \"cylinder_mask.dx\");\n\n    // set the functor to make the surface function\n//    cylfunctor->setMaskFunction(DomainMaskSDFFunctor<3>::SURFACE);\n    cylfunctor.setMaskFunction(DomainMaskSDFFunctor<3>::SURFACE);\n    f = real_factory_3d(world).functor(cylfunctor);\n    area = f.trace();\n    plotdx(f, \"cylinder_surface.dx\");\n    if (world.rank() == 0)\n        print(\"cylinder: err in volume\", vol - constants::pi*rad*rad, \"err in area\", area-2.0*3.141593*(rad + rad*rad));\n\n    // cube\n    std::shared_ptr< SignedDFInterface<3> > cube(new SDFCube(sqrt(2.0), pt));\n//    std::shared_ptr< DomainMaskSDFFunctor<3> > cubefunctor(new DomainMaskSDFFunctor<3>(llrv, cube));\n    DomainMaskSDFFunctor<3> cubefunctor(llrv, cube);\n\n    f = real_factory_3d(world).functor(cubefunctor);\n    vol = f.trace();\n    plotdx(f, \"cube_mask.dx\");\n\n//    cubefunctor->setMaskFunction(DomainMaskSDFFunctor<3>::SURFACE);\n    cubefunctor.setMaskFunction(DomainMaskSDFFunctor<3>::SURFACE);\n    f = real_factory_3d(world).functor(cubefunctor);\n    area = f.trace();\n    plotdx(f, \"cube_surface.dx\");\n    if (world.rank() == 0)\n        print(\"cube: err in volume\", vol-sqrt(2.0)*sqrt(2.0)*sqrt(2.0), \"err in area\", area-12.0);\n\n    // sphere\n    std::shared_ptr< SignedDFInterface<3> > sphere(new SDFSphere(c, pt));\n//    std::shared_ptr< DomainMaskSDFFunctor<3> > spherefunctor(new DomainMaskSDFFunctor<3>(llrv, sphere));\n    DomainMaskSDFFunctor<3> spherefunctor(llrv, sphere);\n\n    f = real_factory_3d(world).functor(spherefunctor);\n    vol = f.trace();\n    plotdx(f, \"sphere_mask.dx\");\n\n    spherefunctor.setMaskFunction(DomainMaskSDFFunctor<3>::SURFACE);\n    f = real_factory_3d(world).functor(spherefunctor);\n    area = f.trace();\n    plotdx(f, \"sphere_surface.dx\");\n    if (world.rank() == 0)\n        print(\"sphere: err in volume\", vol-4.0*constants::pi/3.0*c*c*c, \"err in area\", area-4.0*constants::pi*c*c);\n\n    // cone\n    std::shared_ptr< SignedDFInterface<3> > cone(new SDFCone(c, pt, vec));\n//    std::shared_ptr< DomainMaskSDFFunctor<3> > conefunctor(new DomainMaskSDFFunctor<3>(llrv, cone));\n    DomainMaskSDFFunctor<3> conefunctor(llrv, cone);\n\n    f = real_factory_3d(world).functor(conefunctor);\n    plotdx(f, \"cone_mask.dx\");\n\n    conefunctor.setMaskFunction(DomainMaskSDFFunctor<3>::SURFACE);\n    f = real_factory_3d(world).functor(conefunctor);\n    plotdx(f, \"cone_surface.dx\");\n\n    // paraboloid\n    std::shared_ptr< SignedDFInterface<3> > paraboloid(new SDFParaboloid(c, pt, vec));\n//    std::shared_ptr< DomainMaskSDFFunctor<3> > parafunctor(new DomainMaskSDFFunctor<3>(llrv, paraboloid));\n    DomainMaskSDFFunctor<3> parafunctor(llrv, paraboloid);\n    f = real_factory_3d(world).functor(parafunctor);\n    plotdx(f, \"paraboloid_surface.dx\");\n\n    // plane\n    std::shared_ptr< SignedDFInterface<3> > plane(new SDFPlane(vec, pt));\n//    std::shared_ptr< DomainMaskSDFFunctor<3> > planefunctor(new DomainMaskSDFFunctor<3>(llrv, plane));\n    DomainMaskSDFFunctor<3> planefunctor(llrv, plane);\n    f = real_factory_3d(world).functor(planefunctor);\n    plotdx(f, \"plane_surface.dx\");\n\n    // ellipsoid\n    std::shared_ptr< SignedDFInterface<3> > ellipsoid(new SDFEllipsoid(sides, pt));\n//    std::shared_ptr< DomainMaskSDFFunctor<3> > ellipfunctor(new DomainMaskSDFFunctor<3>(llrv, ellipsoid));\n    DomainMaskSDFFunctor<3> ellipfunctor(llrv, ellipsoid);\n    f = real_factory_3d(world).functor(ellipfunctor);\n    plotdx(f, \"ellipsoid_surface.dx\");\n\n    // box\n    std::shared_ptr< SignedDFInterface<3> > box(new SDFBox(sides, pt));\n//    std::shared_ptr< DomainMaskSDFFunctor<3> > boxfunctor(new DomainMaskSDFFunctor<3>(llrv, box));\n    DomainMaskSDFFunctor<3> boxfunctor(llrv, box);\n    f = real_factory_3d(world).functor(boxfunctor);\n    plotdx(f, \"box_surface.dx\");\n\n    finalize();\n\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/siam_example.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file siam_example.cc\n \\brief A simple example of solving PDEs with MADNESS.\n \\ingroup gettingstarted\n\n This example solves Poisson's equation for a system with an inhomogeneous dielectric constant,\n \\f[ \\nabla \\cdot{} \\left[ \\epsilon(\\vec{r}) \\nabla u(\\vec{r}) \\right] = - 4 \\pi \\rho(\\vec{r}). \\f]\n\n \\f$ \\epsilon(\\vec{r}) = \\epsilon_\\mathrm{int}\\f$ for \\f$ |\\vec{r}| < R\\f$ and\n \\f$ \\epsilon(\\vec{r}) = \\epsilon_\\mathrm{ext}\\f$ for \\f$ |\\vec{r}| > R.\\f$\n The PDE is converted to a fixed point iteration using the Green's function for\n the Laplacian (with free-space boundary conditions) and then solved using a\n fixed point iteration.\n\n Other objectives are to demonstrate the use of functors when projecting MADNESS\n functions.\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/constants.h>\n#include <madness/mra/nonlinsol.h>\n\nusing namespace madness;\nusing namespace std;\n\nconst double eps_int = 1.0; ///< Interior dielectric.\nconst double eps_ext =10.0; ///< Exterior dielectric.\nconst double R = 2.0; ///< Radius of sphere.\nconst double xi = 100.0; ///< Exponent for delta function approx.\nconst double sigma = 0.1; ///< Surface \"width\".\n\n/// Functor representing the log-derivative of \\f$\\epsilon\\f$ along an axis.\n\n/// A \"mask\" function is used to smoothly transition from inside the sphere\n/// to outside the sphere. The width of this transition region is\n/// \\f$\\mathcal{O}(\\sigma)\\f$.\nclass DSphere : public FunctionFunctorInterface<double, 3> {\n  const double fac; ///< The factor multiplying the log-derivative.\n  const int axis; ///< The component of the log-derivative we want.\n\nprotected:\n  /// Derivative of the mask with respect to \\f$s=sdf/\\sigma\\f$.\n\n  /// \\param[in] s The signed distance (in units of \\f$\\sigma\\f$) from the\n  ///    surface of the sphere.\n  /// \\return The derivative of the mask.\n  double dmask(double s) const {\n    if (fabs(s) > 6.0) return 0.0;\n    return -exp(-s*s) / sqrt(constants::pi);\n  }\n  \npublic:\n  /// Constructor.\n\n  /// \\param[in] Vint The dielectric inside the sphere.\n  /// \\param[in] Vext The dielectric outside the sphere.\n  /// \\param[in] axis The component of the log-derivative to project with this functor.\n  DSphere(double Vint, double Vext, int axis) \n    : fac(log(Vint/Vext)), axis(axis)  {}\n  \n  /// Function used by MADNESS to project a function.\n\n  /// \\param[in] r The coordinate at which to evaluate the function.\n  /// \\return The value of the component of the log-derivative at the point.\n  double operator()(const coord_3d &r) const {\n    double d = sqrt(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]);\n    double sdf = (d-R) / sigma;\n    return fac*r[axis]*dmask(sdf)/(sigma*d);\n  }\n};\n\n/// Function that provides the charge density, \\f$ \\rho \\f$.\n\n/// \\param[in] r The coordinate at which to evaluate the function.\n/// \\return The value of \\f$ \\rho \\f$ at the point.\ndouble rho_function(const coord_3d &r) {\n  const double coeff = pow(xi / constants::pi, 1.5);\n  return coeff*exp(-xi * (r[0]*r[0] + r[1]*r[1] + r[2]*r[2]));\n}\n\n/// Main function. Project the functions and solve the PDE.\n\n/// \\param[in] argc The number of command-line arguments.\n/// \\param[in] argv The command-line arguments.\n/// \\return Exit status.\nint main(int argc, char **argv) {\n  const double rfourpi = 1.0/(4.0*constants::pi);\n  initialize(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n  startup(world, argc, argv);\n\n  // Function defaults\n  FunctionDefaults<3>::set_k(6);\n  FunctionDefaults<3>::set_thresh(1e-4);\n  FunctionDefaults<3>::set_cubic_cell(-5, 5);\n  FunctionDefaults<3>::set_initial_level(3);\n  FunctionDefaults<3>::set_truncate_on_project(true);\n\n  // Make integral and derivative operators\n  real_convolution_3d op = CoulombOperator(world, 1e-4, FunctionDefaults<3>::get_thresh());\n  real_derivative_3d Dx = free_space_derivative<double,3>(world, 0);\n  real_derivative_3d Dy = free_space_derivative<double,3>(world, 1);\n  real_derivative_3d Dz = free_space_derivative<double,3>(world, 2);\n\n  // Make functors for dielectric related quantities\n  real_functor_3d epsx_functor(new DSphere(eps_int, eps_ext, 0));\n  real_functor_3d epsy_functor(new DSphere(eps_int, eps_ext, 1));\n  real_functor_3d epsz_functor(new DSphere(eps_int, eps_ext, 2));\n\n  // Make the actual numerical functions\n  real_function_3d rho = real_factory_3d(world).f(rho_function);\n  real_function_3d eps_x = real_factory_3d(world).functor(epsx_functor);\n  real_function_3d eps_y = real_factory_3d(world).functor(epsy_functor);\n  real_function_3d eps_z = real_factory_3d(world).functor(epsz_functor);\n\n  real_function_3d u = op(rho).truncate(); // Initial guess\n  NonlinearSolver solver;\n  for (int iter=0; iter<20; iter++) {\n    real_function_3d surf_rho = rfourpi*(eps_x*Dx(u) + eps_y*Dy(u) + eps_z*Dz(u));\n    real_function_3d r = (u - op(rho + surf_rho)).truncate(); // residual\n    real_function_3d unew = solver.update(u, r);\n    double change = (unew - u).norm2();\n    u = unew;\n\n    print(\"iter\", iter, \"change\", change, \"surf charge\", surf_rho.trace());\n    \n    if (change < 10.*FunctionDefaults<3>::get_thresh()) break;\n  }\n  \n  coord_3d lo{0.0,0.0,0.0}, hi{5.0,0.0,0.0}; // Range for line plotting\n  plot_line(\"testpot.dat\", 501, lo, hi, u);\n  \n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/sininteg.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/*!\n  \\file examples/sininteg.cc\n  \\brief Compute the integral sin(x) x=0..10\n  \\warning If you change this example, please update the \"MADNESS Basics\" module in the documentation (doc/getting_started/gstart_basics.dox).\n  \\defgroup sininteg First example from getting started guide\n  \\ingroup examples\n\n  Computes the integral\n  \\f[\n     \\int_0^{10} sin(x) dx\n  \\f]\n  by projecting \\f$ sin(x) \\f$ into the discontinuous spectral element\n  basis and using the \\c trace() method.\n */\n\n// #warning If you changed this example, please update the \"Getting started with MADNESS\" documentation module.\n\n#include <madness/mra/mra.h>\n\nusing namespace madness;\n\ndouble myf(const coord_1d& r) {\n    return std::sin(r[0]);\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n\n    FunctionDefaults<1>::set_cubic_cell(0,10);\n\n    real_function_1d f = real_factory_1d(world).f(myf);\n\n    double integral = f.trace();\n\n    if (world.rank() == 0) print(\"The result is\", integral);\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/smooth",
    "content": ""
  },
  {
    "path": "src/examples/smooth.h",
    "content": "/*\n * smooth.h\n *\n *  Created on: Nov 25, 2015\n *      Author: kottmanj\n */\n\n#ifndef SRC_EXAMPLES_SMOOTH_H_\n#define SRC_EXAMPLES_SMOOTH_H_\n\n#include <iostream>\n#include <string>\n#include<madness/chem/nemo.h>\n#include <madness/mra/funcplot.h>\n#include <cmath>\n#include<madness/chem/SCFOperators.h>\n#include <madness/mra/function_common_data.h>\n\nstatic double RHOMIN = 1.e-20;\n\nnamespace madness {\ndouble make_log(double x) {\n    if (x < 0.0) return log(RHOMIN);\n    return log(x);\n}\n\ndouble make_exp(double x) {\n    return exp(x);\n}\n\ndouble estimate_area(double x) {\n    double thresh = FunctionDefaults<3>::get_thresh();\n    if (fabs(x) < thresh) return 0.0;\n    else return 1.0;\n}\n\nstatic double test_1d_functor(const coord_1d& x) {\n    return exp(-fabs(x[0])) + 0.1 * sin(30.0 * x[0]);\n}\n\n[[maybe_unused]] static double xf(const coord_3d& x) {\n    return x[1];\n}\n\nstatic double r2(const coord_3d& x) {\n    return x[0] * x[0] + x[1] * x[1] + x[2] * x[2];\n}\n\n[[maybe_unused]] static double slater_functor(const coord_3d& x) {\n    double rsq = r2(x);\n    double r = sqrt(rsq);\n    return exp(-r);\n}\n\n[[maybe_unused]] static double mask_factor = 5.0;\n[[maybe_unused]] static double cutoff_radius = 5.0;\n\n//static double mask_functor(const coord_3d &x){\n//\tdouble r = sqrt(r2(x));\n//\t//return 1-erf(mask_factor*r);\n//\treturn 0.5*(1.0 - tanh(mask_factor*(r-cutoff_radius)));\n//}\n[[maybe_unused]] static double mask_functor_box(const coord_3d& x) {\n    double r = sqrt(r2(x));\n    //return 1-erf(mask_factor*r);\n    return 0.5 * (1.0 - tanh(1.0 * (r - 15)));\n}\n//static double inv_mask_functor(const coord_3d &x){\n//\tdouble r = sqrt(r2(x));\n//\treturn 0.5*(1.0 + tanh(mask_factor*(r-cutoff_radius)));\n//}\n\nstruct munging_operator {\n    munging_operator() : thresh_(FunctionDefaults<3>::get_thresh()) {}\n\n    munging_operator(const double thresh) : thresh_(thresh) {}\n\n    void operator()(const Key<3>& key,\n                    real_tensor U,\n                    const real_tensor& function,\n                    const real_tensor& smoothed_function) const {\n        ITERATOR(U,\n                 double f = function(IND);\n                         //double sf = smoothed_function(IND);\n                         if (fabs(f) < thresh_)\n                             U(IND) = 0.0;\n                         else\n                             U(IND) = f;\n        );\n    }\n\n    template<typename Archive>\n    void serialize(Archive& ar) {}\n\n    double thresh_;\n};\n\nstruct asymptotic_density {\npublic:\n    asymptotic_density(const double& ie) : ionization_energy_(ie), center_of_charge_(0.0) {}\n\n    asymptotic_density(const double& ie, const coord_3d& coc) : ionization_energy_(ie), center_of_charge_(coc) {}\n\n    double operator()(const coord_3d& x1) const {\n        coord_3d x;\n        x[0] = x1[0] - center_of_charge_[0];\n        x[1] = x1[1] - center_of_charge_[1];\n        x[2] = x1[2] - center_of_charge_[2];\n        double r = sqrt((x[0] * x[0] + x[1] * x[1] + x[2] * x[2]));\n        double result = exp(-2.0 * sqrt(2.0 * fabs(ionization_energy_)) * r);\n        return result;\n    }\n\n    const double ionization_energy_;\n    const coord_3d center_of_charge_;\n};\n\nstruct asymptotic_slater_kernel {\npublic:\n    asymptotic_slater_kernel(const asymptotic_density& tmp) : asymptotic_rho_(tmp) {}\n\n    double operator()(const coord_3d& x) const {\n        double prefactor = 1.0 / M_PI;\n        double r = sqrt((x[0] * x[0] + x[1] * x[1] + x[2] * x[2]));\n        double kernel = prefactor * exp(2.0 / 3.0 * 2.0 * sqrt(2.0 * fabs(asymptotic_rho_.ionization_energy_)) *\n                                        r);//pow(rho,2.0/3.0);\n        double rho = asymptotic_rho_(x);\n        return kernel * rho;\n    }\n\nprivate:\n    const asymptotic_density asymptotic_rho_;\n};\n\nstruct slater_kernel {\n    slater_kernel() : thresh_(FunctionDefaults<3>::get_thresh()) {}\n\n    slater_kernel(const double thresh) : thresh_(thresh) {}\n\n    void operator()(const Key<3>& key,\n                    real_tensor U,\n                    const real_tensor& rho,\n                    const real_tensor& pt_rho) const {\n        double safety = thresh_ * 0.01;\n        double safety_kernel = pow(safety, -2.0 / 3.0);\n        double safety_kernel_safety_pd = pre * pow(safety, 1.0 / 3.0);\n        ITERATOR(U,\n                 double d = rho(IND);\n                         double pd = pt_rho(IND);\n                         if (d < safety and fabs(pd) < safety) U(IND) = safety_kernel_safety_pd;\n                         else if (d < safety) U(IND) = pre * safety_kernel * pd;\n                         else U(IND) = pre * pow(d, -2.0 / 3.0) * pd;\n        );\n    }\n\n    template<typename Archive>\n    void serialize(Archive& ar) {}\n\n    double thresh_;\n    double pre = 1.0 / M_PI;\n};\n\n// static double analytical_slater_functor(double rho) {\n//     double tmp;\n//     if (rho < 0.0) tmp = 0.0;\n//     else tmp = pow(rho, 1.0 / 3.0);\n//     double prefactor = 1.0 / M_PI;\n//     return prefactor * tmp;\n// }\n\nstruct asymptotic_slater : public FunctionFunctorInterface<double, 3> {\npublic:\n    asymptotic_slater(const double& ipot_) : ipot(ipot_) {}\n\n    const double ipot;\n    const double prefactor = 1.0 / M_PI;\n\n    double operator()(const coord_3d& x) const {\n        const double r = sqrt((x[0] * x[0] + x[1] * x[1] + x[2] * x[2]));\n        const double kernel = prefactor * exp(2.0 / 3.0 * 2.0 * sqrt(2.0 * fabs(ipot)) * r);\n        return kernel;\n    }\n};\n\nstruct apply_kernel_helper {\n\npublic:\n    apply_kernel_helper(const double& ipot_) : ipot(ipot_), asl(ipot_) {}\n\n    struct slater_kernel {\n        double operator()(const double& rho) const {\n            double tmp = rho;\n            if (tmp < 0.0) tmp = 1.e-10;\n            return prefactor * pow(tmp, -2.0 / 3.0);\n        }\n\n        const double prefactor = 1.0 / M_PI;\n    };\n\n\n    madness::Tensor<double> slater_apply(const std::vector<madness::Tensor<double> >& t, const madness::Key<3>& key,\n                                         const FunctionCommonData<double, 3> cdata) const {\n        madness::Tensor<double> rho = t.front();\n        madness::Tensor<double> pt_rho = t.back();\n        const long k = FunctionDefaults<3>::get_k();\n        const Tensor<double>& quad_x = cdata.quad_x;\n\n        // if all points of the perturbed density are below the threshold: Set the result to zero\n        bool pt_zero = true;\n        if (pt_rho.absmax() > safety_thresh_ptrho) pt_zero = false;\n\n        // fast return if pt_rho is zero\n        if (pt_zero) {\n            std::vector<long> kdims(3, k);\n            Tensor<double> zero_result(kdims, true);\n            return zero_result;\n        }\n\n        // if all points of the unperturbed density are below the threshold: Use asymptotical density\n        bool rho_ana = true;\n        //if(rho.absmax()>safety_thresh_rho) rho_ana = false;\n\n        // analytical kernel based on asymptotical density\n        Tensor<double> kernel_val(k, k, k);\n        if (rho_ana) {\n            madness::fcube<double, 3>(key, asl, quad_x, kernel_val);\n        } else {\n            kernel_val = copy(rho);\n            slater_kernel slater_tmp;\n            kernel_val.unaryop<slater_kernel>(slater_tmp);\n        }\n\n        // multiply kernel values with pt_rho values\n        Tensor<double> result = kernel_val.emul(pt_rho);\n        return result;\n\n    }\n\n    const double prefactor = 1.0 / M_PI;\n    const double ipot;\n    asymptotic_slater asl;\n    const double safety_thresh_rho = FunctionDefaults<3>::get_thresh() * 0.01;\n    const double safety_thresh_ptrho = FunctionDefaults<3>::get_thresh() * 0.01;\n};\n\nstruct slater_kernel_apply {\n\n    const FunctionCommonData<double, 3>& cdata;\n\n    const apply_kernel_helper *xc;\n\n    slater_kernel_apply(const apply_kernel_helper& xc_) : cdata(\n            FunctionCommonData<double, 3>::get(FunctionDefaults<3>::get_k())), xc(&xc_) {}\n\n    madness::Tensor<double> operator()(const madness::Key<3>& key,\n                                       const std::vector<madness::Tensor<double> >& t) const {\n        madness::Tensor<double> r = xc->slater_apply(t, key, cdata);\n        return r;\n    }\n};\n\nstruct density_mask_operator {\n\n    density_mask_operator(const double thresh) : safety(thresh) {}\n\n    madness::Tensor<double> operator()(const madness::Key<3>& key,\n                                       const std::vector<madness::Tensor<double> >& t) const {\n\n        const madness::Tensor<double>& rho = t.front();\n        // set result to zero\n        const long& k = FunctionDefaults<3>::get_k();\n        std::vector<long> kdims(3, k);\n        madness::Tensor<double> result(kdims, true);\n        result = 3.0;\n        if (rho.absmax() < safety) {\n            result = 0.0;\n        } else {\n            result = 1.0;\n        }\n        return result;\n    }\n\n    const double safety;\n};\n\nstruct merging_operator {\n\n    merging_operator(const double c) : cutoff(c) {}\n\n    madness::Tensor<double> operator()(const madness::Key<3>& key,\n                                       const std::vector<madness::Tensor<double> >& t) const {\n\n        const madness::Tensor<double>& f = t.front();\n        const madness::Tensor<double>& sf = t.back();\n        if (f.absmax() > cutoff) {\n            return f;\n        } else {\n            return sf;\n        }\n    }\n\n    const double cutoff;\n};\n\n\ntemplate<std::size_t NDIM>\nstatic double make_radius(const Vector<double, NDIM>& x) {\n    double r2 = 0.0;\n    for (double xi: x) r2 += xi * xi;\n    return sqrt(r2);\n}\n\ntemplate<std::size_t NDIM>\nstatic double mask_munging(const double x) {\n    if (fabs(x) < 0.1 * FunctionDefaults<NDIM>::get_thresh()) return 0.0;\n    else return x;\n}\n\ntemplate<std::size_t NDIM>\nstatic double unitfunctor(const Vector<double, NDIM>& x) {\n    return 1.0;\n}\n\ntemplate<std::size_t NDIM>\nstatic double munge(const double x) {\n    if (fabs(x) < FunctionDefaults<NDIM>::get_thresh() * 0.001) return 1.e-20;\n    else return x;\n}\n\ntemplate<typename T, std::size_t NDIM>\nclass smooth {\npublic:\n    smooth(World& world) :\n            world(world) {\n    }\n\n    smooth(World& world, const double& box_mask_factor, const double box_mask_cutoff) :\n            world(world) {\n    }\n\n    struct mask_functor {\n    public:\n        mask_functor(const double& factor, const double& cutoff) : factor_(factor), cutoff_radius_(cutoff),\n                                                                   shift_(0.0) {}\n\n        mask_functor(const double& factor, const double& cutoff, const Vector<double, NDIM> shift) : factor_(factor),\n                                                                                                     cutoff_radius_(\n                                                                                                             cutoff),\n                                                                                                     shift_(shift) {\n            std::cout << \"shift is \" << shift_ << std::endl;\n        }\n\n        double operator()(const Vector<double, NDIM>& x) const {\n            const Vector<double, 3> shifted_x = x - shift_;\n            const double r = make_radius<NDIM>(shifted_x);\n            return (1.0 - tanh(r));\n        }\n\n    private:\n        const double factor_;\n        const double cutoff_radius_;\n        const Vector<double, NDIM> shift_;\n    };\n\n    struct inv_mask_functor {\n    public:\n        inv_mask_functor(const double& factor, const double& cutoff) : factor_(factor), cutoff_radius_(cutoff),\n                                                                       shift_(0.0) {}\n\n        inv_mask_functor(const double& factor, const double& cutoff, const Vector<double, NDIM> shift) : factor_(\n                factor), cutoff_radius_(cutoff), shift_(shift) {}\n\n        double operator()(const Vector<double, NDIM>& x) const {\n            const Vector<double, 3> shifted_x = x - shift_;\n            const double r = make_radius<NDIM>(shifted_x);\n            return 0.5 * (1.0 + tanh(factor_ * (r - cutoff_radius_)));\n        }\n\n    private:\n        const double factor_;\n        const double cutoff_radius_;\n        const Vector<double, NDIM> shift_;\n    };\n\n\n    Function<T, NDIM> smooth_sigma(const Function<T, NDIM>& density) {\n        MADNESS_ASSERT(NDIM == 3);\n        std::cout << \"Make Sigma\\n\";\n        real_function_3d sigma = make_sigma(density);\n        make_plots(density, \"density\");\n        make_plots(sigma, \"sigma\");\n\n        const double cutoff = get_density_thresh();\n\n        std::cout << \"Make Smooth Density\\n\";\n        real_function_3d smooth_rho = cut_oscillations(density, cutoff);\n\n        std::cout << \"Make Smooth Sigma\\n\";\n        real_function_3d smooth_sigma = cut_oscillations(sigma, cutoff);\n        make_plots(smooth_sigma, \"smooth_sigma\");\n        sigma.print_size(\"sigma\");\n        smooth_sigma.print_size(\"smooth_sigma\");\n        make_plots(smooth_rho, \"smooth_density\");\n\n\n        return sigma;\n    }\n\n    Function<T, NDIM> smooth_density_from_orbitals(const std::vector<Function<T, NDIM>>& orbitals) const {\n        const double thresh = FunctionDefaults<NDIM>::get_thresh();\n        Function<T, NDIM> density = FunctionFactory<T, NDIM>(world);\n        for (size_t i = 0; i < orbitals.size(); i++) {\n            Function<T, NDIM> orb = orbitals[i];\n            orb.refine();\n            Function<T, NDIM> boxes = cut_oscillations(orb, 1000.0, 1);\n            make_plots(boxes, \"orbital_sceleton\");\n            Function<T, NDIM> sf = cut_oscillations(orbitals[i], thresh, 1);\n            make_plots(sf, \"smooth_orbital_1_\" + stringify(i));\n            sf = cut_oscillations(sf, thresh * 0.1, 1);\n            make_plots(sf, \"smooth_orbital_2_\" + stringify(i));\n            sf = cut_oscillations(sf, thresh * 0.01, 1);\n            Function<T, NDIM> sf_squared = sf * sf;\n            density += sf_squared;\n            make_plots(sf, \"smooth_orbital_3_\" + stringify(i));\n            make_plots(sf_squared, \"smooth_squared_orbital_\" + stringify(i));\n        }\n        make_plots(density, \"smooth_density\");\n        return density;\n    }\n\n    // Function gets linearized if it falls below certain threshold\n    Function<T, NDIM> cut_oscillations(const Function<T, NDIM>& f, const double& cutoff, const size_t order) const {\n        // project the function to linear scaling functions\n        Function<T, NDIM> lf = project(f, order);\n        lf = project(lf, FunctionDefaults<NDIM>::get_k());\n        // merge\n        const Function<T, NDIM> sf = merge_functions(f, lf, cutoff);\n        return sf;\n    }\n\n    Function<T, NDIM> make_sigma(const Function<T, NDIM>& density) const {\n        MADNESS_ASSERT(NDIM == 3);\n        std::vector<std::shared_ptr<real_derivative_3d> > gradop;\n        gradop = gradient_operator<double, 3>(world);\n        real_function_3d sigma = real_factory_3d(world);\n        for (auto d: gradop) {\n            density.autorefine();\n            real_function_3d drho = (*d)(density);\n            drho.autorefine();\n            sigma += drho * drho;\n        }\n        return sigma;\n    }\n\n    Function<T, NDIM> smooth_density(const Function<T, NDIM>& density, const std::string& msg = \"function\") {\n        make_plots(density, \"density\");\n        // if thresh is 1.e-x then density thresh is 1.e-2x\n        const double density_thresh = get_density_thresh();\n        std::cout << \"Density thresh is \" << density_thresh << std::endl;\n        Function<T, NDIM> ln_density = copy(density);\n        ln_density.unaryop(make_log);\n        make_plots(ln_density, \"ln_density\");\n        Function<T, NDIM> linearized_ln_density = linearize(ln_density);\n        linearized_ln_density = gaussian_smoothing(linearized_ln_density, 0.5, \"linearized_ln_density\");\n        Function<T, NDIM> smooth_density = copy(linearized_ln_density);\n        smooth_density.refine();\n        smooth_density.unaryop(make_exp);\n        Function<T, NDIM> munged_density = merge_functions(density, smooth_density, get_density_thresh());\n        return munged_density;\n    }\n\n    Function<T, NDIM> linearize(const Function<T, NDIM>& ln_rho) const {\n        Function<T, NDIM> linear_ln_rho = project(ln_rho, 2);\n        make_plots(linear_ln_rho, \"linear_ln_rho\");\n        Function<T, NDIM> result = project(linear_ln_rho, FunctionDefaults<NDIM>::get_k());\n        make_plots(result, \"linear_ln_rho_backprojected\");\n        return result;\n    }\n\n    Function<T, NDIM> munge_density(const Function<T, NDIM>& density) const {\n        Function<T, NDIM> munged_density = copy(density);\n        munged_density.unaryop(munge<NDIM>);\n        return munged_density;\n    }\n\n    Function<T, NDIM> make_density_mask(const Function<T, NDIM>& density) const {\n        vecfuncT density_wrapper;\n        density.reconstruct();\n        density_wrapper.push_back(density);\n        density_mask_operator op_tmp(get_density_thresh());\n        real_function_3d density_mask = multiop_values<double, density_mask_operator, 3>(op_tmp, density_wrapper);\n        make_plots(density_mask, \"density_mask\");\n        return density_mask;\n    }\n\n    double get_density_thresh() const {\n        const double& thresh = FunctionDefaults<NDIM>::get_thresh();\n        double density_thresh = thresh;\n        for (size_t i = 0; i < 10; i++) {\n            double di = (double) i;\n            if (thresh > pow(10.0, -di)) break;\n            else density_thresh = pow(10.0, -2.0 * di);\n        }\n        return density_thresh;\n    }\n\n    Function<T, NDIM> make_mask(const Function<T, NDIM>& samplef, const double& thresh) const {\n        vecfuncT sample_wrapper;\n        samplef.reconstruct();\n        sample_wrapper.push_back(samplef);\n        density_mask_operator op_tmp(thresh);\n        real_function_3d mask = multiop_values<double, density_mask_operator, 3>(op_tmp, sample_wrapper);\n        // The mask is constant on each box so make shure this will be the case (avoid flutuations)\n        real_function_3d const_mask = project(mask, 1);\n        mask = project(const_mask, FunctionDefaults<NDIM>::get_k());\n        make_plots(mask, \"mask\");\n        return mask;\n    }\n\n    Function<T, NDIM> make_inv_mask(const Function<T, NDIM>& mask) const {\n        Function<T, NDIM> unit = FunctionFactory<T, NDIM>(world).f(unitfunctor);\n        real_function_3d inv = unit - mask;\n        real_function_3d const_inv = project(inv, 1);\n        inv = project(const_inv, FunctionDefaults<NDIM>::get_k());\n        return inv;\n    }\n\n    Function<T, NDIM> make_explog(const Function<T, NDIM>& f, const std::string& msg = \"function\") const {\n        // make logf\n        Function<T, NDIM> logf = copy(f);\n        logf.unaryop(make_log);\n\n        // smooth logf\n        Function<T, NDIM> smoothed_logf = gaussian_smoothing(logf, 0.5);\n\n        // reconstruct f via f=exp^(log(f));\n        Function<T, NDIM> explogf = copy(smoothed_logf);\n        explogf.unaryop(make_exp);\n\n        // apply the box_mask to eliminate weird boundary effects\n        //explogf = box_mask_*explogf;\n\n        // make some plots\n        make_plots(f, msg);\n        make_plots(smoothed_logf, \"smoothed_log\" + msg);\n        make_plots(logf, \"log\" + msg);\n        make_plots(explogf, \"explog_\" + msg);\n        return explogf;\n    }\n\n    Function<T, NDIM> gaussian_smoothing(const Function<T, NDIM>& f, const double& eps = 0.04,\n                                         const std::string& name = \"nooutput\") const {\n        if (name != \"noputput\") output(\"\\nSmoothing \" + name + \" with eps \" + stringify(eps));\n        double exponent = 1.0 / (2.0 * eps);\n        Tensor<double> coeffs(1), exponents(1);\n        exponents(0L) = exponent;\n        coeffs(0L) = gauss_norm(exponent);\n        SeparatedConvolution<T, NDIM> op(world, coeffs, exponents);\n        Function<T, NDIM> smoothed_f = apply(op, f);\n        make_plots(smoothed_f, \"smoothed_\" + name);\n        return smoothed_f;\n\n    }\n\n    Function<T, NDIM>\n    merge_functions(const Function<T, NDIM>& f, const Function<T, NDIM>& sf, const Function<T, NDIM>& mask,\n                    const std::string& name = \"f\") const {\n        Function<T, NDIM> inv_mask = make_inv_mask(mask);\n        Function<T, NDIM> part1 = mask * f;\n        Function<T, NDIM> part2 = inv_mask * sf;\n        Function<T, NDIM> result = part1 + part2;\n        make_plots(mask, \"mask_\" + name);\n        make_plots(inv_mask, \"inv_mask_\" + name);\n        make_plots(part1, \"masked_\" + name);\n        make_plots(part2, \"masked_s\" + name);\n        return result;\n    }\n\n    Function<T, NDIM>\n    merge_functions(const Function<T, NDIM>& f, const Function<T, NDIM>& sf, const double& thresh) const {\n        MADNESS_ASSERT(NDIM == 3);\n        vecfuncT wrapper;\n        wrapper.push_back(f);\n        wrapper.push_back(sf);\n        refine_to_common_level(world, wrapper);\n        merging_operator op_tmp(thresh);\n        real_function_3d merged_f = multiop_values<double, merging_operator, 3>(op_tmp, wrapper);\n        return merged_f;\n    }\n\n    void make_plots(const Function<T, NDIM>& f, const std::string& name = \"function\") const {\n        double width = FunctionDefaults<3>::get_cell_min_width() / 2.0 - 1.e-3;\n        plot_plane(world, f, name);\n        coord_3d start(0.0);\n        start[0] = -width;\n        coord_3d end(0.0);\n        end[0] = width;\n        plot_line((\"line_\" + name).c_str(), 1000, start, end, f);\n    }\n\n\n    void test_1d() const {\n        FunctionDefaults<1>::set_thresh(1.e-5);\n        FunctionDefaults<1>::set_k(8);\n        FunctionDefaults<1>::set_cubic_cell(-25.0, 25.0);\n        real_function_1d f = real_factory_1d(world).f(test_1d_functor);\n        Tensor<double> coeffs(1), exponents(1);\n        exponents(0L) = 1.0 / (2.0 * 0.04);\n        coeffs(0L) = pow((1.0 / (2.0 * 0.04)) / M_PI, 0.5);\n        SeparatedConvolution<double, 1> op(world, coeffs, exponents,1.e-5,1.e-5);\n        real_function_1d sf = apply(op, f);\n        double diff = (f - sf).norm2();\n        output(\"||f - smoothed_f||_1D=\" + stringify(diff));\n        coord_1d start;\n        start[0] = -10.0;\n        coord_1d end;\n        end[0] = 10.0;\n        plot_line(\"smoothed_1d\", 1000, start, end, sf);\n        plot_line(\"noise_1d\", 1000, start, end, f);\n    }\n\n    double gauss_norm(const double& exponent) const {\n        return pow(exponent / M_PI, 0.5 * 3.0);\n    }\n\n    void output(const std::string& msg) const {\n        if (world.rank() == 0) std::cout << msg << std::endl;\n    }\n\nprivate:\n    World& world;\n    const Function<T, NDIM> box_mask_;\n    Function<T, NDIM> mask_;\n    Function<T, NDIM> inv_mask_;\n};\n\n} // namespace madness\n\n\n#endif /* SRC_EXAMPLES_SMOOTH_H_ */\n"
  },
  {
    "path": "src/examples/spectralprop.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file spectralprop.h\n  \\brief Spectral propagator in time using semigroup approach\n  \\defgroup spectralprop Spectral propagator in time using semigroup approach\n  \\ingroup examples\n\n  The source is <a href=http://code.google.com/p/m-a-d-n-e-s-s/source/browse/local/trunk/src/apps/examples/spectralprop.h>here</a>.\n\n  \\par Points of interest\n  - high-order integration of general time-dependent problems\n  - semigroup approach\n\n  \\par Background\n\n  Given \\f$ u(0) \\f$,  we seek to solve the PDE\n  \\f[\n     \\frac{du}{dt} = \\hat{L} u + N(u)\n  \\f]\n  for the function at some future time \\f$ t \\f$ (i.e., for \\f$ u(t) \\f$).\n  \\f$ \\hat{L} \\f$ is a linear operator that we are\n  able to exponentiate, and \\f$ N \\f$ is everything else\n  including linear and non-linear parts.\n\n  In the semigroup approach the formal solution to the PDE\n  is written\n  \\f[\n     u(t) = \\exp(t \\hat{L} ) u(0) + \\int_0^t \\exp((t-\\tau)\\hat{L}) N(u(\\tau)) d\\tau\n  \\f]\n  Numerical quadrature of the integral using Gauss-Legendre\n  quadrature points is used resulting in a set of equations\n  that are iteratively solved (presently using simple fixed\n  point iteration from a first-order explicit rule).\n\n  The user provides\n  - functors to apply the exponential and non-linear parts, and\n  - if necessary a user-defined data type that supports\n    a copy constructor, assignment, inplace addition, multiplication\n    from the right by a double, and computation of the distance\n    between two solutions \\f$ a \\f$ and \\f$ b \\f$ with the api\n    \\verb+double distance(a,b)+\n\n  Have a look in testspectralprop.cc for example use.\n\n  With \\f$ n \\f$ quadrature points, the error is \\f$ O\\left(t^{2n+1}\\right) \\f$\n  and the number of applications of the exponential operator per\n  time step is \\f$ 1+(n_{it}+1)n +n_{it}n^2 \\f$ where \\f$ n_{it} \\f$\n  is the number of iterations necessary to solve the equations\n  (typically about 5 but this is problem dependent).\n\n*/\n\n\n#include <madness/mra/legendre.h>\n#include <madness/world/madness_exception.h>\n\n#include <algorithm>\n#include <cmath>\n#include <complex>\n\nnamespace madness {\n\n    /// Default function for computing the distance between two doubles\n    inline double distance(double a, double b)\n    {\n        return std::sqrt((a-b)*(a-b));\n    }\n\n    /// Default function for computing the distance between two complex numbers\n    template <typename T>\n    inline double distance(std::complex<T>& a, std::complex<T>& b)\n    {\n        return std::abs(a-b);\n    }\n\n\n    /// Spectral propagtor in time.  Refer to documentation of file spectralprop.h for math detail.\n    class SpectralPropagator {\n        const int NPT;          ///< Number of quadrature points\n        std::vector<double> x;  ///< Quadrature points on [0,1] with value 0 prepended\n        std::vector<double> w;  ///< Quadrature weights on [0,1] with value 0 prepended\n        SpectralPropagator* q;\n        \n        /// Private: Makes interpolating polyn p[i](t), i=0..NPT\n        double p(int i, double t) {\n            double top=1.0, bot=1.0;\n            for (int j=0; j<i; j++) {\n                top *= (t-x[j]);\n                bot *= (x[i]-x[j]);\n            }\n            for (int j=i+1; j<=NPT; j++) {\n                top *= (t-x[j]);\n                bot *= (x[i]-x[j]);\n            }\n            return top/bot;\n        }\n\n        /// Private: Computes interpolated solution\n        template <typename uT>\n        uT u(double dt, const std::vector<uT>& v) {\n            uT U = v[0]*p(0,dt);\n            for (int i=1; i<=NPT; i++) {\n                U += v[i]*p(i,dt);\n            }\n            return U;\n        }\n\n        // Separated this out to enable recursive use of solver ... but this \n        // turned out to be largely not useful.\n        template <typename uT, typename expLT, typename NT>\n        std::vector<uT> solve(double t, double Delta, const uT& u0, const expLT& expL, const NT& N, const double eps, bool doprint, bool recurinit, int& napp) {\n            if (doprint) madness::print(\"solving with NPT\", NPT);\n            std::vector<uT> v(NPT+1,u0);\n\n            if (!recurinit || NPT==1) {\n                // Initialize using explicit first-order accurate rule\n                for (int i=1; i<=NPT; i++) {\n                    double dt = x[i] - x[i-1];\n                    v[i] = expL(dt*Delta,v[i-1]);\n                    v[i] += expL(Delta*dt,N(t+Delta*x[i-1],v[i-1]))*(dt*Delta);\n                }\n            }\n            else {\n                // Recur down to lower-order quadrature rules for initial guess\n                std::vector<uT> vx = q->solve(t, Delta, u0, expL, N, eps*10000.0, doprint, recurinit, napp);\n                for (int i=1; i<=NPT; i++) {\n                    v[i] = q->u(x[i],vx);\n                }\n            }\n\n            // Precompute G(x[1]-x[0])*v[0]\n            uT Gv0 = expL((x[1] - x[0])*Delta,v[0]); napp++;\n\n            // Crude fixed point iteration\n            uT vold = v[NPT]; // Track convergence thru change at last quadrature point\n            bool converged = false;\n            for (int iter=0; iter<20; iter++) {\n                for (int i=1; i<=NPT; i++) {\n                    double dt = x[i] - x[i-1];\n                    uT vinew = (i==0) ? Gv0*1.0 : expL(dt*Delta,v[i-1]); // *1.0 in case copy is shallow\n                    if (i != 0) napp++;\n                    for (int k=1; k<=NPT; k++) {\n                        double ddt = x[i-1] + dt*x[k];\n                        vinew += expL(dt*Delta*(1.0-x[k]), N(t + Delta*ddt, u(ddt, v)))*(dt*Delta*w[k]); napp++;\n                    }\n                    v[i] = vinew;\n                }\n                double err = ::madness::distance(v[NPT],vold);\n                vold = v[NPT];\n                if (doprint) print(\"spectral\",iter,err);\n                converged = (err < eps);\n                if (converged) break;\n            }\n            if (!converged) throw \"spectral propagator failed to converge\";\n\n            return v;\n        }\n\n    public:\n        /// Construct propagator using \\c NPT points\n\tSpectralPropagator(int NPT)\n            : NPT(NPT)\n            , x(NPT+1)\n            , w(NPT+1)\n            , q(0)\n        {\n            x[0] = w[0] = 0.0;\n            MADNESS_ASSERT(gauss_legendre(NPT, 0.0, 1.0, &x[1], &w[1]));\n\n            // The iterative solution requires quadrature points in increasing\n            // order corresponding to shooting forward.\n            std::reverse(x.begin()+1, x.end());\n            std::reverse(w.begin()+1, w.end());\n\n            if (NPT > 1) q = new SpectralPropagator(NPT-1);\n        }\n\n        ~SpectralPropagator() \n        {\n            delete q;\n        }\n\n        /// Step forward in time from \\f$ t \\f$ to \\f$ t+\\Delta \\f$\n\n        /// The template types should be automatically inferred from\n        /// the invocation.  \\c uT is the C++ type for the solution.\n        ///\n        /// @param[in] t The current time\n        /// @param[in] Delta The time step\n        /// @param[in] u0 The solution at the current time\n        /// @param[in] expL A function or functor to compute \\f$ \\exp{\\tau \\hat{L}} u \\f$  for \\f$ \\tau \\in (0,\\Delta) \\f$\n        /// @param[in] N A function to compute the non-linear part\n        /// @param[in] eps Threshold for convergence of iteration on norm of change in solution at last quadrature point.\n        /// @param[in] doprint If true will print some info on convergence\n        /// @param[in] recurinit If true initial guess is recursion from lower order quadrature instead of default explicit rule\n        /// @returns The solution at time \\f$ t+\\Delta \\f$\n        ///\n        /// The user provided operators are invoked as\n        /// \\code\n        /// uT expL(double tau, const uT& u)\n        /// \\endcode\n        /// where \\f$ \\tau \\in (0,\\Delta) \\f$\n        /// and\n        /// \\code\n        /// uT N(double T, const uT& u)\n        /// \\endcode\n        /// where \\f$ T \\in (t,t+\\Delta) \\f$ and \\f$ u \\f$ is a trial solution at time \\f$ T \\f$.\n        template <typename uT, typename expLT, typename NT>\n        uT step(double t, double Delta, const uT& u0, const expLT& expL, const NT& N, const double eps=1e-12, bool doprint=false, bool recurinit=true) {\n            int napp = 0;\n            \n            // Compute solution at quadrature points\n            std::vector<uT> v = solve(t, Delta, u0, expL, N, eps, doprint, recurinit, napp);\n\n            // Integrate forward from last quadrature point to the end point\n            double dt = 1.0 - x[NPT];\n            uT vinew = expL(dt*Delta,v[NPT]);\n            for (int k=1; k<=NPT; k++) {\n                double ddt = x[NPT] + dt*x[k];\n                vinew += expL(dt*Delta*(1.0-x[k]), N(t + Delta*ddt, u(ddt, v)))*(dt*Delta*w[k]); napp++;\n            }\n\n            if (doprint) print(\"number of operator applications\", napp);\n            return vinew;\n\t}\n    };\n\n    class SpectralPropagatorGaussLobatto {\n        const int NPT;\n        std::vector<double> x;\n        std::vector<double> w;\n\n        // Makes interpolating polyn p[i](t), i=0..NPT-1\n        double p(int i, double t) {\n            double top=1.0, bot=1.0;\n            for (int j=0; j<i; j++) {\n                top *= (t-x[j]);\n                bot *= (x[i]-x[j]);\n            }\n            for (int j=i+1; j<NPT; j++) {\n                top *= (t-x[j]);\n                bot *= (x[i]-x[j]);\n            }\n            return top/bot;\n        }\n\n        template <typename uT>\n        uT u(double dt, const std::vector<uT>& v) {\n            uT U = v[0]*p(0,dt);\n            for (int i=1; i<NPT; i++) {\n                U += v[i]*p(i,dt);\n            }\n            return U;\n        }\n\n    public:\n        // Constructor\n        // ... input ... npt,\n        // ... makes ... x, w, p\n        //\n        // Apply\n        // ... input ... u(0)\n        // ... makes guess v(i), i=0..npt using explicit 1st order rule.\n\n\tSpectralPropagatorGaussLobatto(int NPT)\n            : NPT(NPT)\n            , x(NPT)\n            , w(NPT)\n        {\n            MADNESS_ASSERT(NPT>=2 && NPT<=6);\n            // Gauss Lobatto on [-1,1]\n            x[0] = -1.0; x[NPT-1] = 1.0; w[0] = w[NPT-1] = 2.0/(NPT*(NPT-1));\n            if (NPT == 2) {\n            }\n            else if (NPT == 3) {\n                x[1] = 0.0; w[1] = 4.0/3.0;\n            }\n            else if (NPT == 4) {\n                x[1] = -1.0/std::sqrt(5.0);  w[1] = 5.0/6.0;\n                x[2] = -x[1];                w[2] = w[1];\n            }\n            else if (NPT == 5) {\n                x[1] = -std::sqrt(3.0/7.0); w[1] = 49.0/90.0;\n                x[2] = 0.0;                  w[2] = 32.0/45.0;\n                x[3] = -x[1];                w[3] = w[1];\n            }\n            else if (NPT == 6) {\n                x[1] = -std::sqrt((7.0+2.0*std::sqrt(7.0))/21.0); w[1] = (14.0-std::sqrt(7.0))/30.0;\n                x[2] = -std::sqrt((7.0-2.0*std::sqrt(7.0))/21.0); w[2] = (14.0+std::sqrt(7.0))/30.0;\n                x[3] = -x[2];                                     w[3] = w[2];\n                x[4] = -x[1];                                     w[4] = w[1];\n            }\n            else {\n                throw \"bad NPT\";\n            }\n\n            // Map from [-1,1] onto [0,1]\n            for (int i=0; i<NPT; i++) {\n                x[i] = 0.5*(1.0 + x[i]);\n                w[i] = 0.5*w[i];\n            }\n        }\n\n        template <typename uT, typename expLT, typename NT>\n        uT step(double t, double Delta, const uT& u0, const expLT& expL, const NT& N, const double eps=1e-12, bool doprint=false) {\n            std::vector<uT> v(NPT,u0);\n\n            // Initialize using explicit first-order accurate rule\n            for (int i=1; i<NPT; i++) {\n                double dt = x[i] - x[i-1];\n                v[i] = expL(dt*Delta,v[i-1]);\n                v[i] += expL(Delta*dt,N(t+Delta*x[i-1],v[i-1]))*(dt*Delta);\n            }\n\n            // Crude fixed point iteration\n            uT vold = v[NPT-1];\n            for (int iter=0; iter<12; iter++) {\n                for (int i=1; i<NPT; i++) {\n                    double dt = x[i] - x[i-1];\n                    uT vinew = expL(dt*Delta,v[i-1]);\n                    for (int k=0; k<NPT; k++) {\n                        double ddt = x[i-1] + dt*x[k];\n                        vinew += expL(dt*Delta*(1.0-x[k]), N(t + Delta*ddt, u(ddt, v)))*(dt*Delta*w[k]);\n                    }\n                    v[i] = vinew;\n                }\n                double err = ::madness::distance(vold, v[NPT-1]);\n                if (doprint) print(\"hello\",iter,err);\n                vold = v[NPT-1];\n                if (err < eps) break;\n            }\n\n            return vold;\n\t}\n    };\n\n}\n"
  },
  {
    "path": "src/examples/svpe.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/funcplot.h>\n#include <madness/tensor/solvers.h>\n#include \"molecularmask.h\"\n#include <madness/mra/nonlinsol.h>\n#include <madness/constants.h>\n#include <vector>\n\nusing namespace madness;\nusing namespace std;\n\nconst int k = 8; // wavelet order\nconst double thresh = 1e-6; // truncation threshold\nconst double L = 20; // box is [-L,L]\nconst double sigma = 0.5; // Surface width\n\nconst double epsilon_0 = 1.0; // Interior dielectric\nconst double epsilon_1 = 78.3600; // Exterior dielectric\nconst double R = 2.456644; // Radius of cavity\n\n// Crude macro for timing\ndouble XXstart;\n#define TIME(MSG,X) XXstart=wall_time();         \\\n                    X; \\\n                    if (world.rank() == 0) print(\"timer:\",MSG,\"used\",wall_time()-XXstart) \\\n\ndouble reciprocal(double x) {\n    return 1.0/x;\n}\n\ndouble nuclear_charge_function(const coord_3d& r) {\n    const double expnt = 100.0;\n    const double coeff = pow(1.0/constants::pi*expnt,0.5*3);\n    return coeff*exp(-expnt*(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]));\n}\n\ndouble electronic_charge_function(const coord_3d& r) {\n    const double coeff = 1.0/constants::pi;\n    return coeff*exp(-2.0*sqrt(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]));\n}\n\ndouble charge_function(const coord_3d& r) {\n    return nuclear_charge_function(r) - electronic_charge_function(r);\n}\n\nclass SVPESolver {\n    const double thresh;\n    const double minlen;\n    const double sigma;                 //< Width of surface layer\n    const double epsilon_0;             //< Interior dielectric\n    const double epsilon_1;             //< Exterior dielectric\n    real_convolution_3d op;             //< Coulomb operator (1/r ... no 4pi)\n    //std::vector<real_convolution_3d_ptr> gop; //< Gradient of the Coulomb operator\n    vector_real_function_3d dlog; //< Log-derivative of the dielectric\n    real_function_3d rdielectric; //< Reciprocal of the dielectric\n\n    // /// Apply Gbar\n    // real_function_3d gbar(const real_function_3d& f) const {\n    //     real_function_3d r = (*gop[0])(f).truncate()*dlog[0] + (*gop[1])(f).truncate()*dlog[1] + (*gop[1])(f).truncate()*dlog[1];\n    //     return r.truncate();\n    // }\n\n\n    // /// Solve for the full Coulomb potential using the other formulation\n    // real_function_3d solve2(const real_function_3d& rho,\n    //                         const real_function_3d& uguess = real_function_3d(),\n    //                         bool printing = true) const {\n\n    //     real_function_3d charge = rdielectric*rho;\n    //     charge.truncate();\n    //     real_function_3d sig0 = gbar(charge);\n    //     real_function_3d sc = uguess.is_initialized() ? make_surface_charge(uguess) : sig0;\n    //     sc = sig0 + gbar(sc);\n    //     NonlinearSolver sol2;\n    //     for (int iter=0; iter<10; iter++) {\n    //         double start = wall_time();\n    //         real_function_3d r = sc - (sig0 + gbar(sc));\n    //         sc = sol2.update(sc,r);\n    //         double rnorm = r.norm2();\n    //         if (printing) print(iter, sc.trace(), rnorm, wall_time()-start);\n    //         if (rnorm < 10.0*thresh) break;\n    //     }\n    //     return op(rho + sc).truncate();\n    // }\n\npublic:\n    SVPESolver(World& world,\n               double sigma, double epsilon_0, double epsilon_1,\n               const vector_real& atomic_radii, const vector_coord_3d& atomic_coords,\n               const double minlen)\n        : thresh(FunctionDefaults<3>::get_thresh())\n        , minlen(minlen)\n        , sigma(sigma)\n        , epsilon_0(epsilon_0)\n        , epsilon_1(epsilon_1)\n        , op(CoulombOperator(world, minlen, thresh))\n          //, gop(GradCoulombOperator(world, minlen, thresh))\n        , dlog(3)\n    {\n        // Functors for mask related quantities\n        real_functor_3d rdielectric_functor(new MolecularVolumeExponentialSwitchReciprocal(sigma, epsilon_0, epsilon_1, atomic_radii, atomic_coords));\n        real_functor_3d gradx_functor(new MolecularVolumeExponentialSwitchLogGrad(sigma, epsilon_0, epsilon_1, atomic_radii, atomic_coords,0));\n        real_functor_3d grady_functor(new MolecularVolumeExponentialSwitchLogGrad(sigma, epsilon_0, epsilon_1, atomic_radii, atomic_coords,1));\n        real_functor_3d gradz_functor(new MolecularVolumeExponentialSwitchLogGrad(sigma, epsilon_0, epsilon_1, atomic_radii, atomic_coords,2));\n\n        // Make the actual functions\n        const double rfourpi = 1.0/(4.0*constants::pi);\n        rdielectric = real_factory_3d(world).functor(rdielectric_functor).nofence();\n        dlog[0] = real_factory_3d(world).functor(gradx_functor).nofence();\n        dlog[1] = real_factory_3d(world).functor(grady_functor).nofence();\n        dlog[2] = real_factory_3d(world).functor(gradz_functor); // FENCE\n        scale(world, dlog, rfourpi);\n        rdielectric.truncate(false);\n        truncate(world, dlog);\n    }\n\n    /// Given the full Coulomb potential computes the surface charge\n    real_function_3d make_surface_charge(const real_function_3d& u) const {\n        real_derivative_3d Dx = free_space_derivative<double,3>(u.world(), 0);\n        real_derivative_3d Dy = free_space_derivative<double,3>(u.world(), 1);\n        real_derivative_3d Dz = free_space_derivative<double,3>(u.world(), 2);\n        return (dlog[0]*Dx(u) + dlog[1]*Dy(u) + dlog[2]*Dz(u)).truncate();\n    }\n\n    /// Solve for the full Coulomb potential using the free-particle GF\n    real_function_3d solve(const real_function_3d& rho,\n                           const real_function_3d uguess = real_function_3d(),\n                           bool printing = true) const {\n        real_function_3d charge = rdielectric*rho;\n        charge.truncate();\n\n        // Initial guess is constant dielectric\n        real_function_3d u0 = op(charge).truncate();\n        real_function_3d u = uguess.is_initialized() ? uguess : u0;\n        double unorm = u.norm2();\n        NonlinearSolver solver;\n        for (int iter=0; iter<20; iter++) {\n            double start = wall_time();\n            real_function_3d surface_charge = make_surface_charge(u);\n            real_function_3d r = (u - u0 - op(surface_charge)).truncate();\n            double sigtot = surface_charge.trace();\n            surface_charge.clear();\n\n            real_function_3d unew = solver.update(u, r);\n\n            double change = (unew-u).norm2();\n            if (printing)\n                print(\"iter\", iter, \"change\", change,\n                      \"soln(10.0)\", u(coord_3d(10.0)),\n                      \"surface charge\", sigtot,\"used\",wall_time()-start);\n\n            // Step restriction\n            if (change > 0.3*unorm)\n                u = 0.5*unew + 0.5*u;\n            else\n                u = unew;\n\n            if (change < std::max(1e-3,10.0*thresh)) break;\n        }\n        return u;\n    }\n};\n\nint main(int argc, char **argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n    // Function defaults\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_cubic_cell(-L, L);\n    FunctionDefaults<3>::set_initial_level(4);\n    FunctionDefaults<3>::set_truncate_on_project(true);\n    FunctionDefaults<3>::set_bc(BC_FREE);\n\n    // We will have one sphere of radius R centered at the origin\n    vector<double> atomic_radii(1,R);\n    vector<coord_3d> atomic_coords(1,coord_3d(0.0));\n    print(\"k     \", k);\n    print(\"thresh\", thresh);\n    print(\"L     \", L);\n    print(\"sigma \", sigma);\n    print(\"eps0  \", epsilon_0, \"  eps1  \", epsilon_1);\n    print(\"radii \", atomic_radii);\n    print(\"coords\", atomic_coords);\n\n    TIME(\"make charge \", real_function_3d charge   = real_factory_3d(world).f(charge_function));\n    charge.truncate();\n    SVPESolver solver(world, sigma, epsilon_0, epsilon_1, atomic_radii, atomic_coords, min(1e-3,sigma*0.1));\n\n    real_function_3d u = solver.solve(charge);\n    print(\"Solving again to verify that the initial guess works\");\n    u = solver.solve(charge,u);\n    real_function_3d Scharge = solver.make_surface_charge(u);\n    coord_3d lo(0.0), hi(0.0);\n    lo[0] = -20;\n    hi[0] = 20;\n    plot_line(\"Scharge.dat\",401,lo,hi,Scharge);\n    // For comparison with Chipman make the reaction potential\n    real_convolution_3d op = CoulombOperator(world, min(1e-3,sigma*0.1), thresh);\n\n    TIME(\"make ufree  \", real_function_3d ufree = op(charge).truncate());\n    print(\"<rhotot|ureact>\", 0.5*charge.inner((u-ufree)));\n    print(\"free energy(Kcal/mol)\", 0.5*charge.inner((u-ufree))*527.5095);\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/tdhf_input",
    "content": "plot\n plane x2 x3\n zoom 1.0\n npoints 50\n origin 0.5 0.0 0.0\nend\n\ndft\n xc hf\n k 8\n econv 1.e-5\n dconv 1.e-4\n protocol 1.e-5\n canon\n nuclear_corrfac none\nend\n\nexcite\nguess_thresh 1.e-3\nsolve_thresh 1.e-4\nsolve_seq_thresh 1.e-5\nend\n\nTDA\n guess dipole+\n guess_excitations 4\n iterating_excitations 4\n excitations 4\n iter_max 30\n guess_iter 3\n solve_iter 4\n econv 5.e-4\n dconv 2.e-2\n guess_econv 5.e-3\n guess_dconv 5.e-2\n hard_dconv 1.e-3\n hard_econv 1.e-4\nno_otf\nend\n\n# other guess possibilities:\n# guess auto-3\n# guess auto-4\n# guess octopole \n# or guess custom combinded with keyword exop x 1.0 y 2.0 z 1.0 for xy^2z guess\n\ngeometry\nhe 0.0 0.0 0.0\nend\n"
  },
  {
    "path": "src/examples/tdse1d.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n\t\\file tdse1d.cc\n\t\\brief Example propagation of TDSE (translating atom) using various propagators\n\t\\defgroup exampletdse1d Solves a 1D time-dependent Schr&ouml;dinger equation using splitting and semi-group approaches with the free-particle propagator.\n  \\ingroup examples\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/tdse1d.cc >here</a>.\n\n  \\par Points of interest\n  - convolution with the Green's function/free-particle propagator\n  - use free-particle propagators construct different schemes to find the solution\n  - collocation methods on quadrature points\n\n  \\par Background\n  This illustrates solution of a time-dependent Schr&ouml;dinger equation.\n\n  We solve the following PDE\n  \\f[\n  -\\nabla^2 \\psi(x,t) + V(x,t) \\psi(x,t) = i\\psi_t(x,t)\n  \\f]\n  where the potential is\n  \\f[\n  V(x,t) = -8 \\exp((x - v \\cdot t)^2)\n  \\f]\n  and the velocity \\f$ v \\f$ is given in the code.\n\n  \\par Implementation\n\n  Splitting based schemes, such as Trotter and Chin-Chen, can be found in existing literatures.\n\n\n  The quadrature collocation method is based on the semi-group form of the equation\n  \\f[\n     \\psi(x,t) = \\psi(x,0) * G(x,t) - \\int_0^t V(x,s) \\cdot \\psi(x,s) * G(x,t-s) ds\n  \\f]\n  where \\f$ G \\f$ is the Green's function/free-particle propagator\n  \\f[\n     \\left( - \\frac{d^2}{dx^2} - i \\frac{d}{dt} \\right) G(x) = \\delta(x)).\n  \\f]\n\n  To find \\f$ \\psi(x,t) \\f$, all temporal integrals are computed by a \\f$n\\f$ point Gauss-Legendre quadrature rule and we need to\n  calculate employ a simple fixed-point iteration to the self-consistent\n  solutions at the \\f$n\\f$ quadrature points on the intervel \\f$ [0,t] \\f$.\n  All \\f$ \\psi \\f$ involved in computing the integrals over the subintervels\n  are interpolated by the \\f$n\\f$ values on the largest intervel \\f$ [0,t] \\f$.\n\n  The fixed-point iteration is applied to the correction term of the semi-group formulation,\n \\f[\n     \\psi^{m+1}(x,t) - \\psi^{m}(x,t) = - \\int_0^t V(x,s) \\cdot ( \\psi^{m}(x,s) - \\psi^{m-1}(x,s)) * G(x,t-s) ds\n \\f]\n or\n   \\f[\n     \\delta^{m+1}(x,t) = - \\int_0^t V(x,s) \\cdot  \\delta^{m}(x,s) * G(x,t-s) ds\n \\f]\n where \\f$ \\delta^m \\f$ is the \\f$ m_{th} \\f$ correction term.\n\n  A much more efficient scheme would involve use of a non-linear\n  equation solver instead of simple iteration.\n\n Once we have the solutions at the \\f$n\\f$ quadrature points on \\f$ [0,t] \\f$, quadrature rule is used to construct the solution at \\f$t\\f$.\n\n \\par Reference\n  Preprint.\n\n*/\n\n\n#define NO_GENTENSOR\n#include <madness/mra/mra.h>\n#include <madness/mra/qmprop.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n#include <string>\n\nusing namespace madness;\n\n// This to test various implementaitons of the 1d propagator\n#ifdef USE_NSFORM\n  typedef SeparatedConvolution<double_complex,1> complex_operatorT;\n  typedef std::shared_ptr<complex_operatorT> pcomplex_operatorT;\n  #define APPLY(G,psi) apply(*G,psi)\n  #define MAKE_PROPAGATOR(world, t) qm_free_particle_propagatorPtr<1>(world, k, c, t)\n\n#else\n  typedef Convolution1D<double_complex> complex_operatorT;\n  typedef std::shared_ptr<complex_operatorT> pcomplex_operatorT;\n\n  complex_function_1d APPLY(complex_operatorT* q1d, const complex_function_1d& psi) {\n      psi.reconstruct();\n\n      psi.broaden();\n      psi.broaden();\n      psi.broaden();\n      psi.broaden();\n\n      psi.broaden();\n      // psi.broaden();\n      // psi.broaden();\n      // psi.broaden();\n\n      complex_function_1d r = apply_1d_realspace_push(*q1d, psi, 0);\n      r.sum_down();\n      return r;\n  }\n  #define MAKE_PROPAGATOR(world, t) qm_1d_free_particle_propagator(k, c, t, 2.0*L)\n\n#endif\n\n\n// Simulation parameters\nstatic const double L = 100.0; // Simulation in [-L,L]\nstatic const double x0 = -L + 10.0; // Initial position of the atom\nstatic const double energy_exact = -6.188788775728796797594788; // From Maple\n\nstatic const long k = 20;        // wavelet order\nstatic const double thresh = 1e-12; // precision\n\nstatic const double velocity = 3.0;\n//static const double eshift = energy_exact - 0.5*velocity*velocity; // Use this value to remove rotating phase\nstatic const double eshift = 0.0;\n\n// Estimate the bandwidth and largest practical time step using G0\nstatic double ctarget = 20.0; // Estimated from FT of exact solution ... was 20\nstatic double c = 1.86*ctarget;\nstatic double tcrit = 2*constants::pi/(c*c);\n\nstatic double current_time = 0.0; // Lazy but easier than making functors for everything\n\n/////////////////////////////////// For quadrature collocations ///////////////////////////////\n// global vars for the laziness\nstatic const double_complex I = double_complex(0,1);\nint np; // number of quadrature pts\nTensor<double> B, tc;\npcomplex_operatorT G;\nstd::vector<pcomplex_operatorT> Gs, Gss, Gtrs;\nconst int maxiter = 20;\ndouble fix_iter_tol = thresh*10.0;\n\nstruct refop {\n    bool operator()(FunctionImpl<double_complex,1>* impl, const Key<1>& key, const Tensor<double_complex>& t) const {\n        double tol = impl->truncate_tol(impl->get_thresh(), key);\n        double lo, hi;\n        impl->tnorm(t, &lo, &hi);\n        return hi > tol;;\n    }\n    template <typename Archive> void serialize(Archive& ar) {}\n};\n\n\n// Position of atom at current time\ndouble atom_position() {\n    return x0 + velocity*current_time;\n}\n\n// Exact solution ... (H-E)psi is accurate to 2e-7 or better inside Maple\ndouble_complex psi_exact(const coord_1d& r) {\n    const double x = r[0] - atom_position();\n\n    if (fabs(x) > 9.0) return 0.0;\n\n    const double xsq = x*x;\n\n    // Horner's form for stability ... yes, it is 70-order polyn ... don't panic ... all is OK\n    const double psi = exp(-1.30*xsq)*(-1.02151632756275513018719494826+(.522210612113707231536059971069+(-.378478352719362210706386739834+(.183732263756009855463432582593+(-0.866826311335724362186706464428e-1+(0.364601910940641762284283418688e-1+(-0.144289291226899801775738667691e-1+(0.536464813679927807734520149659e-2+(-0.188945345474975346004237994967e-2+(0.628725522158030920219217207400e-3+(-0.195986657875763402765072721284e-3+(0.563993909330309881048156461300e-4+(-0.147273758530730072646826354339e-4+(0.343202525037692780236348165792e-5+(-7.03765391498970506694108123682e-7+(1.25577395245191089173671652503e-7+(-1.93270666918809750376161513191e-8+(2.54624395753990033043923369519e-9+(-2.84968491109847694778452937732e-10+(2.68398879018928855922002181223e-11+(-2.09811331054703124038096336404e-12+(1.32869596552058891546970129944e-13+(-6.47453843054578193348503832223e-15+(2.08146181239264250219157355910e-16+(-8.27692933283146365185698371000e-19+(-4.21076100567125673420604632290e-19+(3.34873683682880953223636900553e-20+(-1.62840449033428572820374528252e-21+(5.80781234060753332169593869292e-23+(-1.58754665363960354625758075480e-24+(3.34792415609741263184593450566e-26+(-5.37727687523701580992550859153e-28+(6.37706272777548158355242766766e-30+(-5.27154378837014394526580093435e-32+(2.71430533655911926094030668033e-34-6.55694230766452931026127498540e-37*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq);\n\n    // Galilean translation factor\n    const double arg = x*velocity - (energy_exact - velocity*velocity*0.5 - eshift)*current_time;\n    const double_complex tranfac = exp(double_complex(0,arg));\n    return psi*tranfac;\n}\n\n// Time-dependent potential for translating atom\ndouble V(const coord_1d& r) {\n    const double x = r[0] - atom_position();\n    if (fabs(x) > 6.2) return 0.0;\n\n    return -8.0*exp(-x*x) - eshift;\n}\n\n// (dV/dr)^2\ndouble dVsq(const coord_1d& r) {\n    const double x = r[0] - atom_position();\n    if (fabs(x) > 4.5) return 0.0;\n\n    double dv = 16.0*x*exp(-x*x);\n    return dv*dv;\n}\n\n\ntemplate<typename T, int NDIM>\nstruct unaryexp {\n    void operator()(const Key<NDIM>& key, Tensor<T>& t) const {\n        UNARY_OPTIMIZED_ITERATOR(T, t, *_p0 = exp(*_p0););\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\n// exp(-i (vcoeff*V + dcoeff*dV^2))\ncomplex_function_1d expV(World& world, double vcoeff, double dcoeff) {\n    real_function_1d potn = real_factory_1d(world).f(V);\n    potn.scale(vcoeff);\n    if (dcoeff) {\n        real_function_1d d = real_factory_1d(world).f(dVsq).initial_level(10);\n        potn.compress(); d.compress();\n        potn.gaxpy(1.0, d, dcoeff);   //delta = 1.5*t;/\n    }\n    complex_function_1d expV = double_complex(0.0,-1.0)*potn;\n    expV.unaryop(unaryexp<double_complex,1>());\n    expV.truncate();\n    return expV;\n}\n\n// Evolve forward one time step using symplectic gradient 4-th-order local accurate\n// G should G0(tstep/2)\n// CC is xi=0.0, chi=1.0/72.0\n// optimal is xi=-17/18000 chi=71/4500\ncomplex_function_1d sympgrad4(World& world,\n                            const complex_function_1d& psi0,\n                            const double tstep,\n                            const double xi,\n                            const double chi) {\n\n    static complex_operatorT* G = 0;\n    if (!G) G = MAKE_PROPAGATOR(world, tstep*0.5);\n\n    const double lambda = 1.0/6.0;\n    complex_function_1d psi;\n\n    psi = expV(world, tstep*lambda, -xi*tstep*tstep*tstep)*psi0;           psi.truncate();\n    psi = APPLY(G, psi);                                                   psi.truncate();\n\n    current_time += 0.5*tstep;\n\n    psi = expV(world, tstep*(1.0-2.0*lambda), -chi*tstep*tstep*tstep)*psi; psi.truncate();\n\n    current_time += 0.5*tstep;\n\n    psi = APPLY(G,psi);                                                    psi.truncate();\n    psi = expV(world, tstep*lambda, -xi*tstep*tstep*tstep)*psi;            psi.truncate();\n\n    return psi;\n}\n\ncomplex_function_1d sympgrad6(World& world,\n                            const complex_function_1d& psi0,\n                            const double tstep) {\n\n    const double rho = 0.1097059723948682e+00;\n    const double theta = 0.4140632267310831e+00;\n    const double nu = 0.2693315848935301e+00;\n    const double lambda = 0.1131980348651556e+01;\n    const double chi = -0.1324638643416052e-01;\n    const double mu =  0.8642161339706166e-03;\n\n    static complex_operatorT *Grho=0, *Gtheta=0, *Gmid=0;\n\n    if (Grho == 0) {\n        Grho   = MAKE_PROPAGATOR(world, tstep*rho);\n        Gtheta = MAKE_PROPAGATOR(world, tstep*theta);\n        Gmid   = MAKE_PROPAGATOR(world, tstep*(1.0-2.0*(theta+rho))/2.0);\n    }\n\n    complex_function_1d psi;\n\n    psi = APPLY(Grho, psi0);                                                psi.truncate();\n    current_time += rho*tstep;\n    psi = expV(world, tstep*nu, -mu*tstep*tstep*tstep)*psi;                  psi.truncate();\n    psi = APPLY(Gtheta, psi);                                               psi.truncate();\n    current_time += theta*tstep;\n    psi = expV(world, tstep*lambda, 0.0)*psi;                                psi.truncate();\n    psi = APPLY(Gmid, psi);                                                 psi.truncate();\n    current_time += tstep*(1.0-2.0*(theta+rho))/2.0;\n    psi = expV(world, tstep*(1.0-2.0*(lambda+nu)), -chi*tstep*tstep*tstep)*psi; psi.truncate();\n    psi = APPLY(Gmid, psi);                                                 psi.truncate();\n    current_time += tstep*(1.0 - 2.0*(theta+rho))/2.0;\n    psi = expV(world, tstep*lambda, 0.0)*psi;                                psi.truncate();\n    psi = APPLY(Gtheta, psi);                                               psi.truncate();\n    current_time += theta*tstep;\n    psi = expV(world, tstep*nu, -mu*tstep*tstep*tstep)*psi;                  psi.truncate();\n    psi = APPLY(Grho, psi);                                                 psi.truncate();\n    current_time += rho*tstep;\n\n    return psi;\n}\n\n\n// Evolve forward one time step using Trotter ... G = G0(tstep/2)\ncomplex_function_1d trotter(World& world, const complex_function_1d& psi0, const double tstep, complex_operatorT* G0 = 0) {\n    static complex_operatorT* G = 0;\n\tif (G0) G = G0;\n    if (!G) G = MAKE_PROPAGATOR(world, tstep*0.5);\n\n    complex_function_1d psi = APPLY(G, psi0);    psi.truncate();\n\n    current_time += 0.5*tstep;\n\n    psi = expV(world, tstep, 0.0)*psi;         psi.truncate();\n\n    current_time += 0.5*tstep;\n\n    psi = APPLY(G,psi);                        psi.truncate();\n\n    return psi;\n}\n\nvoid print_info(World& world, const complex_function_1d& psi, int step) {\n    real_function_1d potn = real_factory_1d(world).f(V).truncate_on_project();\n    complex_derivative_1d D = free_space_derivative<double_complex,1>(world,0);\n    complex_function_1d dpsi = D(psi);\n    double ke = inner(dpsi,dpsi).real() * 0.5;\n    double pe = psi.inner(psi*potn).real();\n    double norm = psi.norm2();\n\n    complex_function_1d psiX = complex_factory_1d(world).f(psi_exact);\n    double err = (psiX - psi).norm2();\n\n    if (world.rank() > 0) return;\n    if ((step%40) == 0) {\n        printf(\"\\n\");\n        printf(\" step    time      atom x              norm               kinetic              potential             energy              err norm     depth   size  \\n\");\n        printf(\"------ -------- ------------     ----------------     ----------------     ----------------     ----------------     ---------------- ----  --------\\n\");\n    }\n    printf(\"%6d %8.4f %12.8f %20.13f %20.13f %20.13f %20.13f %20.13f %4d %9ld\\n\",\n           step, current_time, atom_position(), norm, ke, pe, ke+pe, err, int(psi.max_depth()), long(psi.size()));\n}\n\n\nstatic void readin(int np) {\n    Tensor<double> BB(np), tctc(np);\n    gauss_legendre(np, 0, 1, tctc.ptr(), BB.ptr());\n    B=BB; tc=tctc;\n}\n\n//generate j_th lagrange interpolating coefficients\ndouble icoeff(const int np, const int j, const double t) {\n    double dum = 1;\n    for (int i=  0; i< j; ++i) dum *= (t-tc[i])/(tc[j]-tc[i]);\n    for (int i=j+1; i<np; ++i) dum *= (t-tc[i])/(tc[j]-tc[i]);\n    return dum;\n}\n\n//evaluate the interpolating polynomail of ps at t\ntemplate<typename T> T myp(const std::vector<T>& ps, const double t) {\n    int np = ps.size();\n    T p = ps[0]*icoeff(np, 0, t);\n    for (int j=1; j<np; ++j) p += ps[j]*icoeff(np, j, t);\n    return p;\n}\n\n// Evolve forward one time step using quadrature rules\ncomplex_function_1d q_c(World& world, const int np, const complex_function_1d psi0, const double tstep) {\n    //can be more vectorized.\n\n    std::vector<complex_function_1d> ps(np), ps1(np);\n    //    for (int i=0; i<np; ++i) ps[i] = copy(psi0);\n\n    double tdum = current_time;\n    complex_function_1d pdum;\n    std::vector<complex_function_1d> qs(np); //qs stores current solution values at quadrature points\n    std::vector<real_function_1d> Vs(np); //Vs stores the function values of V at quadrature points\n    std::vector< std::vector<real_function_1d> > Vss(np);  //Vas stores the function values of V at SUB quadrature points\n    for (int i=0; i<np; ++i) {\n        current_time = tdum + tstep*tc[i];\n        Vs[i] = real_factory_1d(world).f(V).truncate_on_project();\n        Vs[i].truncate();\n        Vss[i].resize(np);\n        for (int k=0; k<np; ++k) {\n            current_time = tdum + tstep*tc[i]*tc[k];\n            Vss[i][k]=real_factory_1d(world).f(V).truncate_on_project();\n            Vss[i][k].truncate();\n        }\n        //~ ps[i] = APPLY(Gs[np - i - 1].get(), psi0).truncate();\n        //~ qs[i]=copy(ps[i]);\n        ps1[i] = APPLY(Gs[np - i - 1].get(), psi0).truncate();  //ps1 temporarily holds the solutions after first correction. Part 1/2\n        current_time = tdum + (i?tstep*tc[i-1]:0);\n        //Use trotter to generate initial guess at quadrature points; note that current_time is implicitly changed.\n        qs[i] =  trotter(world, (i?qs[i-1]:psi0), tstep*(tc[i]-(i?tc[i-1]:0)),Gtrs[i].get());\n    }\n\n    compress(world, ps1);\n    for (int i=0; i<np; ++i) for (int k=0; k<np; ++k) {\n\t\t//ps1[i].gaxpy(1.0,APPLY(Gss[i*np+k].get(), ).compress(), -tstep*tc[i]*I*B[k]);\n\t\tcomplex_function_1d tmp = (Vss[i][k]*myp(qs,tc[i]*tc[k])).scale(-tstep*tc[i]*I*B[k]).truncate();\n\t\tps1[i].gaxpy(1.0,APPLY(Gss[i*np+k].get(), tmp).compress(), 1.0);  //ps1 temporarily holds the solutions after first correction. Part 2/2\n    }\n\n\t// Preparation for one time step is done now, and preceed to iterations.\n\n    ps = sub(world, ps1, qs);  // initialize ps, which is the correction term\n    qs = ps1;  // update the solutions with the first correction.\n\n    // now the fix-pt iterations for \\psi's or qs' on the quadrature pts\n    fix_iter_tol = thresh / tstep;\n    if (world.rank() == 0) printf(\"fix iters \");\n    double err = norm2(world, ps1)/np ;\n\n    //~ ps=copy(world, qs);\n    for (int j=0; j<maxiter; ++j) {\n        if (world.rank() == 0) printf(\" %6.0e\",err);\n        if (err <= fix_iter_tol) break;\n        err = 0;\n        ps1 = zero_functions<double_complex,1>(world, np); // ps1 holds the newly computed correction term\n        compress(world,ps1);\n        for (int i=0; i<np; ++i) {\n            for (int k=0; k<np; ++k) { // compute the correction term\n                //ps1[i].gaxpy(1.0, APPLY(Gss[i*np+k].get(), Vss[i][k]*myp(ps,tc[i]*tc[k])).compress(), -tstep*tc[i]*I*B[k]);\n                complex_function_1d tmp = (Vss[i][k]*myp(ps,tc[i]*tc[k])).scale(-tstep*tc[i]*I*B[k]).truncate();\n                ps1[i].gaxpy(1.0, APPLY(Gss[i*np+k].get(), tmp).compress(), 1.0);\n            }\n            err += ps1[i].truncate().norm2();\n        }\n        err /= np;\n        gaxpy(world, 1.0, qs, 1.0, ps1);  // accumulate the corrections into the solutions.\n        ps = ps1; //copy(world, ps1);\n    }\n    if (world.rank() == 0) printf(\"\\n\");\n\n    // hopefully the iteration converged correctly and now use the semi-group formula with quadrature rule applied to the integral to compute the result.\n    pdum = APPLY(G.get(), psi0);\n    pdum.compress();\n    for (int k=0; k<np; ++k) {\n        //pdum.gaxpy(1.0, APPLY(Gs[k].get(), Vs[k]*qs[k]).compress(), -I*B[k]*tstep);\n        complex_function_1d tmp = (Vs[k]*qs[k]).scale(-I*B[k]*tstep);\n        pdum.gaxpy(1.0, APPLY(Gs[k].get(), tmp).compress(), 1.0);\n    }\n\n    current_time = tdum + tstep;\n\n    return pdum.truncate();\n}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    std::cout.precision(8);\n\n    FunctionDefaults<1>::set_k(k);                 // Wavelet order\n    FunctionDefaults<1>::set_thresh(thresh);       // Accuracy\n    FunctionDefaults<1>::set_autorefine(false);\n    FunctionDefaults<1>::set_cubic_cell(-L,L);\n    FunctionDefaults<1>::set_initial_level(8);     // Initial projection level\n    FunctionDefaults<1>::set_truncate_mode(0);\n\n    complex_function_1d psi = complex_factory_1d(world).f(psi_exact);\n    psi.truncate();\n\n    double tstep = 0.0;\n    int selection = -1;\n\n    if (world.rank() == 0) {\n\tprint(\"   0: Trotter\");\n\tprint(\"   1: Symplectic-grad-4 Chin-Chen\");\n\tprint(\"   2: Symplectic-grad-4 optimal\");\n\tprint(\"   3: Symplectic-grad-6\");\n\tprint(\"   4: Quadrature 1pt\");\n\tprint(\"   5: Quadrature 2pt\");\n\tprint(\"   6: Quadrature 3pt\");\n\tprint(\"   7: Quadrature 4pt\");\n\tprint(\"   8: Quadrature 5pt\");\n\tprint(\"   9: Quadrature 6pt\");\n\tprint(\" 10+: Quadrature 7pt+ extremely experimental, try at your own risk:)\");\n\n\twhile (selection < 0 || selection > 20) {\n\t  std::cout << \" Select propagation method (0-20):\";\n\t  std::cout.flush();\n\t  std::cin >> selection;\n\t}\n\n\tprint(\"Critical time step is\", tcrit, \"\\n\");\n\n\tstd::cout << \" Enter time step: \";\n\tstd::cout.flush();\n\tstd::cin >> tstep;\n    }\n\n    world.gop.broadcast(selection);\n    world.gop.broadcast(tstep);\n\n    int nstep = (velocity==0) ? 100 : int((L - 10 - x0)/velocity/tstep);\n\n      if (world.rank() == 0) {\n    print(\"\");\n    print(\" Wavelet order\", k);\n    print(\"     Threshold\", thresh);\n    print(\"      Velocity\", velocity);\n    print(\"     Time step\", tstep);\n    print(\"      No.steps\", nstep);\n    print(\"        Method\", selection);\n      }\n\n    if (selection == 0) {\n        for (int step=0; step<nstep; step++) {\n            print_info(world, psi,step);\n            psi = trotter(world, psi, tstep);\n        }\n    }\n    else if (selection == 1) {\n        for (int step=0; step<nstep; step++) {\n            print_info(world, psi,step);\n            psi = sympgrad4(world, psi, tstep, 0.0, 1.0/72.0); // CC\n        }\n    }\n    else if (selection == 2) {\n        for (int step=0; step<nstep; step++) {\n            print_info(world, psi,step);\n            psi = sympgrad4(world, psi, tstep, -17.0/18000.0, 71.0/4500.0); // Optimal\n        }\n    }\n    else if (selection == 3) {\n        for (int step=0; step<nstep; step++) {\n            print_info(world, psi,step);\n            psi = sympgrad6(world, psi, tstep);\n        }\n    }\n    else {\n        np = selection - 3;\n        if (world.rank() == 0) print(\" No. quad. pt.\", np);\n\n\treadin(np);\n\tG = pcomplex_operatorT(MAKE_PROPAGATOR(world, tstep));\n        for (int i=0; i<np; ++i)\n            Gs.push_back(pcomplex_operatorT(MAKE_PROPAGATOR(world, (1-tc[i])*tstep))); //Generate the free-space FS kernel at quadrature points\n\n        for (int j=0; j<np; ++j)  {    //Generate the free-space FS kernel at SUB quadrature points\n            //~ for (int i=0; i<np; ++i) Gss.push_back(pcomplex_operatorT(MAKE_PROPAGATOR(world, (1-tc[i])*tstep*tc[j]))); //[j*np+i] , 1-tc[i] = tc[np-i-1]\n            for (int i=0; i<np-j; ++i) Gss.push_back(pcomplex_operatorT(MAKE_PROPAGATOR(world, (1-tc[i])*tstep*tc[j]))); //[j*np+i] , 1-tc[i] = tc[np-i-1]\n\t\t\tfor (int i=np-j; i<np; ++i)  Gss.push_back(Gss[(np-1-i)*np+(np-1-j)]); //[j*np+i] , 1-tc[i] = tc[np-i-1] // make use of symmetry\n\t\t}\n\n        for (int i=0; i<1+(np>>1); ++i) Gtrs.push_back(pcomplex_operatorT(MAKE_PROPAGATOR(world, (tc[i]-(i?tc[i-1]:0))*tstep/2)));  //Generate the free-space FS kernel for Trotter to construct initial guess\n\t\tfor (int i=1+(np>>1); i<np; ++i) Gtrs.push_back(Gtrs[np-i]);   // make use of symmetry\n\n        for (int step=0; step<nstep; step++) {\n            print_info(world, psi, step);\n            psi = q_c(world, np, psi, tstep);\n        }\n    }\n\n    print(\"CURRENT TIME\",current_time);\n    complex_function_1d exact = complex_factory_1d(world).f(psi_exact);\n    coord_1d lo, hi;\n    lo[0] = -L; hi[0] = L;\n    plot_line(\"psiplot.dat\",30001,lo,hi,psi,exact);\n\n    finalize();\n    return 0;\n}\n\n"
  },
  {
    "path": "src/examples/tdse_example.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/// \\file examples/tdse_example.cc\n/// \\brief Evolves the hydrogen atom in imaginary and also real time\n\n\n#include <madness/mra/lbdeux.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/qmprop.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n\n// Convenient but sleazy use of global variables to define simulation parameters\nstatic const double L = 23.0;\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-6; // precision\nstatic const double cut = 0.2;  // smoothing parameter for 1/r\nstatic const double F = 1.0;  // Laser field strength\nstatic const double omega = 1.0; // Laser frequency\n\n// typedefs to make life less verbose\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\n\ntypedef std::shared_ptr< FunctionFunctorInterface<double_complex,3> > complex_functorT;\ntypedef Function<double_complex,3> complex_functionT;\ntypedef FunctionFactory<double_complex,3> complex_factoryT;\ntypedef SeparatedConvolution<double_complex,3> complex_operatorT;\n\n/// Regularized 1/r potential.\n\n/// Invoke as \\c u(r/c)/c where \\c c is the radius of the\n/// smoothed volume.\nstatic double smoothed_potential(double r) {\n    const double PI = 3.1415926535897932384;\n    const double THREE_SQRTPI = 5.31736155271654808184;\n    double r2 = r*r, pot;\n    if (r > 6.5){\n        pot = 1.0/r;\n    } else if (r > 1e-8){\n        pot = erf(r)/r + (exp(-r2) + 16.0*exp(-4.0*r2))/(THREE_SQRTPI);\n    } else{\n        pot = (2.0 + 17.0/3.0)/sqrt(PI);\n    }\n\n    return pot;\n}\n\n/// Smoothed 1/r nuclear potential\nstatic double V(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    const double rr = sqrt(x*x+y*y+z*z);\n    return -smoothed_potential(rr/cut)/cut;\n}\n\n/// Initial guess wave function\nstatic double guess(const coordT& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return exp(-1.0*sqrt(x*x+y*y+z*z+cut*cut)); // Change 1.0 to 0.6 to make bad guess\n}\n\n/// z-dipole\ndouble zdipole(const coordT& r) {\n    return r[2];\n}\n\n/// Strength of the laser field at time t ... 1 full cycle\ndouble laser(double t) {\n    double omegat = omega*t;\n    if (omegat < 0.0 || omegat > 1) return 0.0;\n    else return F*sin(2*constants::pi*omegat);\n}\n\n/// Given psi and V evaluate the energy\ntemplate <typename T>\ndouble energy(World& world, const Function<T,3>& psi, const functionT& potn) {\n    T S = psi.inner(psi);\n    T PE = psi.inner(psi*potn);\n    T KE = 0.0;\n    for (int axis=0; axis<3; axis++) {\n        Derivative<T,3> D = free_space_derivative<T,3>(world, axis);\n        Function<T,3> dpsi = D(psi);\n        KE += inner(dpsi,dpsi)*0.5;\n    }\n    T E = (KE+PE)/S;\n\n    if (world.rank() == 0) {\n        print(\"the overlap integral is\",S);\n        print(\"the kinetic energy integral\",KE);\n        print(\"the potential energy integral\",PE);\n        print(\"the total energy\",E);\n    }\n    return -std::abs(E); // ugh\n}\n\ntemplate<typename T, int NDIM>\nstruct unaryexp {\n    void operator()(const Key<NDIM>& key, Tensor<T>& t) const {\n        UNARY_OPTIMIZED_ITERATOR(T, t, *_p0 = exp(*_p0););\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\ntemplate <typename T, int NDIM>\ndouble lbcost(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) {\n  return 1;\n}\n\n\ntemplate <typename T, std::size_t NDIM>\nvoid load_balance(World& world, const madness::Function<T,NDIM>& psi) {\n    if (world.rank() == 0) print(\"load balancing\");\n    LoadBalanceDeux<3> lb(world); \n    lb.add_tree(psi, lbcost<T,NDIM>); \n    FunctionDefaults<NDIM>::redistribute(world, lb.load_balance(2.0,false));\n}\n\n/// Evolve the wave function in imaginary time to converge to ground state\nvoid converge(World& world, functionT& potn, functionT& psi, double& eps) {\n    // The imaginary time Green's function is just the heat kernel.\n    // In 1D it is 1/sqrt(2*pi*t) * exp(-x^2/2t)\n\n    // We will evolve with the simple Trotter form exp(-T*t/2) exp(-V*t) exp(-T*t/2)\n    // so to keep things vaguely stable we want max(exp(-V*t)) (which is at the origin)\n    // to be circa 10.0.  Hence our largest time step is -ln(10)/V(0).  As we\n    // approach convergence we shrink the time step to the desired precision.\n\n    load_balance(world, psi);\n\n    double tmax = -2.3/V(coordT(0.0));\n    tmax = 0.004;\n    if (world.rank() == 0) print(\"tmax\", tmax);\n\n    functionT expV = (-tmax)*potn;\n    expV.unaryop(unaryexp<double,3>());\n    expV.truncate();\n\n\n\n    Tensor<double> coeff(1); coeff[0] = 1.0/pow(constants::pi*tmax,1.5);\n    Tensor<double> expnt(1); expnt[0] = 1.0/tmax;\n    operatorT* op = new operatorT(world,coeff,expnt,0.0,0.0);\n\n    for (int iter=0; iter<20; iter++) {\n        if (world.rank() == 0) print(\"ITER\",iter);\n        psi = (*op)(psi);\n        psi = expV*psi;\n        psi.truncate();\n        psi = (*op)(psi);\n        psi.truncate();\n        double norm = psi.norm2();\n        if (world.rank() == 0) print(\"new norm\", norm);\n        psi.scale(1.0/norm);\n        eps = energy(world, psi,potn);\n        if (((iter+1)%50)==0 && tmax>0.001) {\n            load_balance(world, psi);\n            tmax *= 0.5;\n            expV = (-tmax)*potn;\n            expV.unaryop(unaryexp<double,3>());\n\n            delete op;\n            coeff[0] = 1.0/sqrt(constants::pi*tmax);\n            expnt[0] = 1.0/tmax;\n            op = new operatorT(world,coeff,expnt,0.0,0.0);\n        }\n    }\n    delete op;\n}\n\n/// Evolve the wave function in real time\nvoid propagate(World& world, functionT& potn, functionT& psi0, double& eps) {\n    // In the absense of a time-dependent potential we should just have the\n    // rotating phase of the ground state wave function\n\n    //double ctarget = constants::pi/(0.5*cut);\n    double ctarget = constants::pi/(2.0*cut);\n    double c = 1.86*ctarget; //1.86*ctarget;\n    double tcrit = 2*constants::pi/(c*c);\n    double tstep = 10.0*tcrit;\n    int nstep = int(100.0/tstep);\n\n    double Eshift = -0.4985;\n\n    potn.add_scalar(-Eshift);\n\n    tstep = 0.005;\n    nstep = 10;\n\n    if (world.rank() == 0) {\n        print(\"bandlimit\",ctarget,\"effband\",c,\"tcrit\",tcrit,\"tstep\",tstep,\"nstep\",nstep);\n    }\n\n    complex_functionT psi = double_complex(1.0,0.0)*psi0;\n    SeparatedConvolution<double_complex,3> G = qm_free_particle_propagator<3>(world, k, c, 0.5*tstep);\n\n    functionT zdip = factoryT(world).f(zdipole);\n\n    if (world.rank() == 0) print(\"truncating\");\n    psi.truncate();\n    if (world.rank() == 0) print(\"initial normalize\");\n    psi.scale(1.0/psi.norm2());\n    int steplo = -1;\n    for (int step=steplo; step<nstep; step++) {\n        if (world.rank() == 0) print(\"\\nStarting time step\",step,tstep*step);\n\n        energy(world, psi, potn+laser((step)*tstep)*zdip);  // Use field at current time to evaluate energy\n\n        double_complex dipole = inner(psi,zdip*psi);\n        if (world.rank() == 0) print(\"THE DIPOLE IS\", dipole);\n\n        if (step > steplo) {\n            load_balance(world, psi);\n        }\n\n        if (world.rank() == 0) print(\"making expV\");\n        functionT totalpotn = potn + laser((step+0.5)*tstep)*zdip; // Use midpoint field to advance in time\n        //totalpotn.refine();\n        totalpotn.reconstruct();\n        complex_functionT expV = double_complex(0.0,-tstep)*totalpotn;\n        expV.unaryop(unaryexp<double_complex,3>());\n        expV.truncate();\n        //expV.refine();\n        expV.reconstruct();\n        double expVnorm = expV.norm2();\n        if (world.rank() == 0) print(\"expVnorm\", expVnorm);\n\n        long sz = psi.size();\n        //psi.refine();\n        if (world.rank() == 0) print(\"applying operator 1\",sz);\n        psi = G(psi);\n        psi.truncate();\n        //psi.refine();\n\n        sz = psi.size();\n        if (world.rank() == 0) print(\"multipling by expV\",sz);\n        psi = expV*psi;\n        psi.truncate();\n        //psi.refine();\n        sz = psi.size();\n        if (world.rank() == 0) print(\"applying operator 2\",sz);\n        psi = G(psi);\n        psi.truncate();\n        sz = psi.size();\n        double norm = psi.norm2();\n        if (world.rank() == 0) print(step, step*tstep, norm,sz);\n    }\n}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n    FunctionDefaults<3>::set_k(k);                 // Wavelet order\n    FunctionDefaults<3>::set_thresh(thresh);         // Accuracy\n    FunctionDefaults<3>::set_refine(true);         // Enable adaptive refinement\n    FunctionDefaults<3>::set_initial_level(2);     // Initial projection level\n    FunctionDefaults<3>::set_cubic_cell(-L,L);\n\n    if (world.rank() == 0) print(\"V(0)\", V(coordT(0)));\n\n    functionT psi = factoryT(world).f(guess);\n    functionT potn = factoryT(world).f(V);\n    psi.scale(1.0/psi.norm2());\n    psi.truncate();\n    psi.scale(1.0/psi.norm2());\n\n    energy(world, psi, potn);\n\n    double eps = -0.5;\n    converge(world, potn, psi, eps);\n    propagate(world, potn, psi, eps);\n\n    world.gop.fence();\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/test_derivative.cc",
    "content": "\n#include \"madness.h\"\n\nusing namespace madness;\n\n// 1D sin(n*x)\nclass F : public FunctionFunctorInterface<double,1> \n{\n   private:\n      const int n;\n\n   public:\n      F(int n) : n(n) {}\n\n      double operator()(const coord_1d& x) const \n      {\n         return std::sin(n * x[0]);\n      }    \n};\n\n// 1D gaussian, centered at point p\n// exp(n * (x-p) * (x-p))\nclass G : public FunctionFunctorInterface<double,1> \n{\n   private:\n      const int n;\n      const double p;\n\n   public:\n      G(int n, double p) : n(n), p(p) {}\n\n      double operator()(const coord_1d& x) const \n      {\n         return std::exp(-n * (x[0]-p) * (x[0]-p));\n      }    \n};\n\n\nint main(int argc,char** argv)\n{\n   // MADNESS initialization boiler plate\n   initialize(argc, argv);\n   World world(SafeMPI::COMM_WORLD);\n   startup(world, argc, argv);\n   std::cout.precision(17);\n\n   int k = 4;\n   double thresh = 1e-8;\n\n   // More MADNESS boiler plate\n   FunctionDefaults<1>::set_k(k);\n   FunctionDefaults<1>::set_thresh(thresh);\n   FunctionDefaults<1>::set_cubic_cell(-6,6);\n\n   // Printing parameters\n   print(\"\\n          k =\", FunctionDefaults<1>::get_k());\n   print(\"     thresh =\", FunctionDefaults<1>::get_thresh());\n   print(\" Boundaries =\", FunctionDefaults<1>::get_cell());\n   print(\"\\n\");\n\n   // Make sure truncate on project is off\n   FunctionDefaults<1>::set_truncate_on_project(false);\n\n   // Our 1 parameter\n   int n = 1;\n\n   // Create the functions\n   real_function_1d f = real_factory_1d(world).functor(real_functor_1d(new G(n, 0.5)));\n   //real_function_1d f = real_factory_1d(world).functor(real_functor_1d(new F(n)));\n   f = project(f,  k, thresh); \n   real_function_1d ftrunc = copy(f).truncate();\n   real_function_1d eps = f - ftrunc;\n   real_function_1d feps = f + eps;\n\n   // Create an agbv derivative\n   real_derivative_1d Dx(world, 0); \n\n   // Apply the derivative\n   real_function_1d deps = apply(Dx, eps);\n   real_function_1d dftrunc = apply(Dx, ftrunc);\n   real_function_1d dfeps = apply(Dx, feps);\n   real_function_1d df = apply(Dx, f);\n\n   // Second derivative\n   //real_function_1d d2f = apply(Dx, df);\n   //double integral = -inner(f,d2f);\n   //print(\"integral =\", integral);\n   //print(\"sqrt(pi/2) =\", sqrt(constants::pi/2.0));\n\n   // Test orthogonality between functions\n   double eps_ftrunc = inner(eps, ftrunc);\n   double deps_ftrunc = inner(deps, ftrunc); \n   double deps_dftrunc = inner(deps, dftrunc); \n   double dfeps_dfeps = inner(dfeps, dfeps);\n   double dftrunc_dftrunc = inner(dftrunc, dftrunc);\n   double dftrunc_deps = inner(dftrunc, deps);\n   double deps_deps = inner(deps, deps);\n   double ftrunc_ftrunc = inner(ftrunc, ftrunc);\n   double eps_eps = inner(eps, eps);\n   double f_f = inner(f,f);\n\n   // Output \n   print(\"\\n< eps | ftrunc > =\", eps_ftrunc);\n   print(\"\\n< deps | ftrunc > =\", deps_ftrunc);\n   print(\"\\n< deps |dftrunc > =\", deps_dftrunc);\n   print(\"\");\n   print(\"\\n< dfeps | dfeps > =\", dfeps_dfeps);\n   print(\"\\n< dftrunc | dftrunc > =\", dftrunc_dftrunc);\n   print(\"\\n< dftrunc | deps > =\", dftrunc_deps);\n   print(\"\\n< deps | dftrunc > =\", deps_dftrunc);\n   print(\"\\n< deps | deps > =\", deps_deps);\n   print(\"\");\n   print(\"\\n< ftrunc | ftrunc > =\", ftrunc_ftrunc);\n   print(\"\\n< eps | eps > =\", eps_eps);\n   print(\"\\n< f | f > =\", f_f);\n  \n   // Line plots\n   int npts = 1001;\n   const Vector<double,1> lo(0.0);\n   const Vector<double,1> hi( 1.0);\n   plot_line(\"deriv_test_plots.txt\", npts, lo, hi, f, ftrunc, eps, deps);\n\n   // Printing trees in reconstructed form\n   f.reconstruct();\n   ftrunc.reconstruct();\n   eps.reconstruct();\n   deps.reconstruct();\n \n   print(\"\\n\\nf (reconstructed) tree:\\n\");\n   f.print_tree();\n   print(\"\\n\\nftrunc (reconstructed) tree:\\n\");\n   ftrunc.print_tree();\n   print(\"\\n\\neps (reconstructed) tree:\\n\");\n   eps.print_tree();\n   print(\"\\n\\ndeps (reconstructed) tree:\\n\");\n   deps.print_tree();\n\n   // Printing trees in compressed form\n   f.compress();\n   ftrunc.compress();\n   eps.compress();\n   deps.compress();\n \n   print(\"\\n\\nf (compressed) tree:\\n\");\n   f.print_tree();\n   print(\"\\n\\nftrunc (compressed) tree:\\n\");\n   ftrunc.print_tree();\n   print(\"\\n\\neps (compressed) tree:\\n\");\n   eps.print_tree();\n   print(\"\\n\\ndeps (compressed) tree:\\n\");\n   deps.print_tree();\n\n   // MADNESS finalization boiler plate\n   world.gop.fence();\n   finalize();\n   return 0;\n}\n"
  },
  {
    "path": "src/examples/test_gmres.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/// A set of routines for testing the GMRES solver.\n///\n/// Combinations of real/complex MADNESS Vectors/Functions are tested using\n/// the child AbstractVectorSpace classes in gmres.h.  Other operators are\n/// defined in this file for the tests.\n///\n/// For each type of number system and class of object, there are three tests:\n///   1) x is already equal to the solution (converge on the start)\n///   2) x is 0, but A is the identity operator (converge after 1 iteration)\n///   3) an arbitrary test that requires more than one iteration.\n///\n/// NOTE: The final test (complex Function, #3) may sometimes report FAILURE\n/// if the final residual is close (but still lower than) the threshold.\n/// Tightening up the default tolerance of the MADNESS functions makes this\n/// go away.\n\n#include <madness/mra/mra.h>\n#include <madness/tensor/gmres.h>\n\nusing namespace madness;\n\n/// the identity operator for real vectors\nclass RealVecIdentOp : public Operator<Vector<double, 3> > {\n\tprotected:\n\t\tvoid action(const Vector<double, 3> &invec, Vector<double, 3> &outvec)\n\t\t\tconst {\n\n\t\t\toutvec[0] = 1.0*invec[0] + 0.0*invec[1] + 0.0*invec[2];\n\t\t\toutvec[1] = 0.0*invec[0] + 1.0*invec[1] + 0.0*invec[2];\n\t\t\toutvec[2] = 0.0*invec[0] + 0.0*invec[1] + 1.0*invec[2];\n\t\t}\n};\n\n/// an arbitrary operator for real vectors\nclass RealVecLinearOp : public Operator<Vector<double, 3> > {\n\tprotected:\n\t\tvoid action(const Vector<double, 3> &invec, Vector<double, 3> &outvec)\n\t\t\tconst {\n\n\t\t\toutvec[0] = 1.0*invec[0] + 0.0*invec[1] + 1.0*invec[2];\n\t\t\toutvec[1] = 3.0*invec[0] + 1.0*invec[1] + 0.0*invec[2];\n\t\t\toutvec[2] = 2.0*invec[0] + 1.0*invec[1] + 1.0*invec[2];\n\t\t}\n};\n\n/// the identity operator for complex vectors\nclass ComplexVecIdentOp : public Operator<Vector<std::complex<double>, 3> > {\n\tprotected:\n\t\tvoid action(const Vector<std::complex<double>, 3> &invec,\n\t\t\tVector<std::complex<double>, 3> &outvec) const {\n\n\t\t\toutvec = invec;\n\t\t}\n};\n\n/// an arbitrary operator for complex vectors\nclass ComplexVecLinearOp : public Operator<Vector<std::complex<double>, 3> > {\n\tprotected:\n\t\tvoid action(const Vector<std::complex<double>, 3> &invec,\n\t\t\tVector<std::complex<double>, 3> &outvec) const {\n\n\t\t\toutvec[0] = std::complex<double>(37.0, 36.0)*invec[0] +\n             std::complex<double>(-47.0, 12.0)*invec[1] +\n             std::complex<double>(-50.0, 0.0)*invec[2];\n\t\t\toutvec[1] = std::complex<double>(23.0, 12.0)*invec[0] +\n             std::complex<double>(0.0, 0.0)*invec[1] +\n             std::complex<double>(19.0, 0.0)*invec[2];\n\t\t\toutvec[2] = std::complex<double>(0.0, -3.0)*invec[0] +\n             std::complex<double>(17.0, -10.0)*invec[1] +\n             std::complex<double>(0.0, 4.0)*invec[2];\n\t\t}\n};\n\n/// the identity operator for a real function\nclass RealFuncIdentOp : public Operator<Function<double, 3> > {\n\tprotected:\n\t\tvoid action(const Function<double, 3> &invec,\n\t\t\tFunction<double, 3> &outvec) const {\n\n\t\t\toutvec = copy(invec);\n\t\t}\n};\n\n/// an arbitrary operator for a real function\n/// assumes the function b is never zero in the domain\nclass RealFuncLinearOp : public Operator<Function<double, 3> > {\n\tprotected:\n\t\tconst Function<double, 3> &b;\n\n\t\tvoid action(const Function<double, 3> &invec,\n\t\t\tFunction<double, 3> &outvec) const {\n\n\t\t\toutvec = b * invec;\n\t\t\tinvec.compress();\n\t\t\toutvec.truncate();\n\t\t}\n\n\tpublic:\n\t\tRealFuncLinearOp(const Function<double, 3> &_b) : b(_b) {}\n};\n\n/// the identity operator for a complex function\nclass ComplexFuncIdentOp : public Operator<Function<std::complex<double>, 3> > {\n\tprotected:\n\t\tvoid action(const Function<std::complex<double>, 3> &invec,\n\t\t\tFunction<std::complex<double>, 3> &outvec) const {\n\n\t\t\toutvec = copy(invec);\n\t\t}\n};\n\n/// an arbitrary operator for a complex function\n/// assumes the function b is never zero in the domain\nclass ComplexFuncLinearOp : public Operator<Function<std::complex<double>, 3> > {\n\tprotected:\n\t\tconst Function<std::complex<double>, 3> &b;\n\n\t\tvoid action(const Function<std::complex<double>, 3> &invec,\n\t\t\tFunction<std::complex<double>, 3> &outvec) const {\n\n\t\t\toutvec = b * invec;\n\t\t\tinvec.compress();\n\t\t\toutvec.truncate();\n\t\t}\n\n\tpublic:\n\t\tComplexFuncLinearOp(const Function<std::complex<double>, 3> &_b) : b(_b) {}\n};\n\n\n/// test functions: true for success, false for failure\nconst int NTESTS = 12;\nbool realvec0();\nbool realvec1();\nbool realvec2();\nbool cplxvec0();\nbool cplxvec1();\nbool cplxvec2();\nbool realfunc0();\nbool realfunc1();\nbool realfunc2();\nbool cplxfunc0();\nbool cplxfunc1();\nbool cplxfunc2();\n\n/// pointer to the world\nWorld *worldptr;\n\n/// function pointer typedef (for making an array)\ntypedef bool (*testptr)(void);\n\n/// main routine: execute the tests\nint main(int argc, char **argv) {\n\tint i, passed = 0;\n\n\ttestptr tests[NTESTS];\n\tconst std::size_t bufsize=80;\n\tchar names[NTESTS][bufsize];\n\ttests[0] = realvec0;\n\tsnprintf(names[0],bufsize, \"Testing real vectors, 0-step convergence\");\n\ttests[1] = realvec1;\n\tsnprintf(names[1],bufsize, \"Testing real vectors, 1-step convergence\");\n\ttests[2] = realvec2;\n\tsnprintf(names[2],bufsize, \"Testing real vectors, >1-step convergence\");\n\ttests[3] = cplxvec0;\n\tsnprintf(names[3],bufsize, \"Testing complex vectors, 0-step convergence\");\n\ttests[4] = cplxvec1;\n\tsnprintf(names[4],bufsize, \"Testing complex vectors, 1-step convergence\");\n\ttests[5] = cplxvec2;\n\tsnprintf(names[5],bufsize, \"Testing complex vectors, >1-step convergence\");\n\ttests[6] = realfunc0;\n\tsnprintf(names[6],bufsize, \"Testing real functions, 0-step convergence\");\n\ttests[7] = realfunc1;\n\tsnprintf(names[7],bufsize, \"Testing real functions, 1-step convergence\");\n\ttests[8] = realfunc2;\n\tsnprintf(names[8],bufsize, \"Testing real functions, >1-step convergence\");\n\ttests[9] = cplxfunc0;\n\tsnprintf(names[9],bufsize, \"Testing complex functions, 0-step convergence\");\n\ttests[10] = cplxfunc1;\n\tsnprintf(names[10],bufsize, \"Testing complex functions, 1-step convergence\");\n\ttests[11] = cplxfunc2;\n\tsnprintf(names[11],bufsize, \"Testing complex functions, >1-step convergence\");\n\n   initialize(argc, argv);\n\tWorld world(SafeMPI::COMM_WORLD);\n\tworldptr = &world;\n\tstartup(world,argc,argv);\n\n\t// Function defaults\n\tFunctionDefaults<3>::set_k(6);\n\tFunctionDefaults<3>::set_cubic_cell(-2.0, 2.0);\n\tFunctionDefaults<3>::set_thresh(1.0e-4);\n\tFunctionDefaults<3>::set_max_refine_level(4);\n\n\t// run the tests\n\tfor(i = 0; i < NTESTS; ++i) {\n\t\tprintf(\"*** %s:\\n\", names[i]);\n\t\tif(tests[i]()) {\n\t\t\tprintf(\"   --------- PASSED\\n\\n\");\n\t\t\t++passed;\n\t\t}\n\t\telse\n\t\t\tprintf(\"   --------- FAILED\\n\\n\");\n\t}\n\n\tprintf(\"%d of %d tests passed\\n\", passed, NTESTS);\n\n   finalize();\n\n\treturn 0;\n}\n\n/// test real vectors, converge on zeroth step\nbool realvec0() {\n\tRealVecIdentOp lo;\n\tVectorSpace<double, 3> space(*worldptr);\n\tVector<double, 3> x, b;\n\tdouble resid_thresh = 5.0e-4;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb[0] = 1.0;\n\tb[1] = 2.0;\n\tb[2] = 3.0;\n\tx = b;\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\t// solution is [1,2,3]\n\treturn space.norm(x-b) < 5.0e-4;\n}\n\n/// test real vectors, converge after 1 step\nbool realvec1() {\n\tRealVecIdentOp lo;\n\tVectorSpace<double, 3> space(*worldptr);\n\tVector<double, 3> x, b;\n\tdouble resid_thresh = 5.0e-4;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb[0] = 1.0;\n\tb[1] = 2.0;\n\tb[2] = 3.0;\n\tx = 0.0;\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\t// solution is [1,2,3]\n\treturn space.norm(x-b) < 5.0e-4;\n}\n\n/// test real vectors, converge after >1 steps\nbool realvec2() {\n\tRealVecLinearOp lo;\n\tVectorSpace<double, 3> space(*worldptr);\n\tVector<double, 3> x, b;\n\tdouble resid_thresh = 5.0e-4;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb[0] = 1.0;\n\tb[1] = 2.0;\n\tb[2] = 3.0;\n\tx = 0.0;\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\t// solution is [0,2,1]\n\tb[0] = 0.0; b[1] = 2.0; b[2] = 1.0;\n\treturn space.norm(x-b) < 5.0e-4;\n}\n\n/// test complex vectors, converge after 0 steps\nbool cplxvec0() {\n\tComplexVecIdentOp lo;\n\tVectorSpace<std::complex<double>, 3> space(*worldptr);\n\tVector<std::complex<double>, 3> x, b;\n\tdouble resid_thresh = 5.0e-4;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb[0] = std::complex<double>(1.0, 2.0);\n\tb[1] = std::complex<double>(2.0, 1.0);\n\tb[2] = std::complex<double>(3.0, 0.0);\n\tx = b;\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\t// solution is [(1,2), (2,1), (3,0)]\n\treturn space.norm(x-b) < 5.0e-4;\n}\n\n/// test complex vectors, converge after 1 step\nbool cplxvec1() {\n\tComplexVecIdentOp lo;\n\tVectorSpace<std::complex<double>, 3> space(*worldptr);\n\tVector<std::complex<double>, 3> x, b;\n\tdouble resid_thresh = 5.0e-4;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb[0] = std::complex<double>(1.0, 2.0);\n\tb[1] = std::complex<double>(2.0, 2.0);\n\tb[2] = std::complex<double>(3.0, 0.0);\n\tx = 0.0;\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\t// solution is [(1,2), (2,2), (3,0)]\n\treturn space.norm(x-b) < 5.0e-4;\n}\n\n/// test complex vectors, converge after >1 steps\nbool cplxvec2() {\n\tComplexVecLinearOp lo;\n\tVectorSpace<std::complex<double>, 3> space(*worldptr);\n\tVector<std::complex<double>, 3> x, b;\n\tdouble resid_thresh = 5.0e-4;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb[0] = std::complex<double>(1.0, 2.0);\n\tb[1] = std::complex<double>(2.0, 2.0);\n\tb[2] = std::complex<double>(3.0, 0.0);\n\tx = 0.0;\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\t// solution is in the following vector\n\tb[0] = std::complex<double>(142537429.0, 13617861.0) / 1013086721.0;\n\tb[1] = std::complex<double>(114173858.0, 105798015.0) / 1013086721.0;\n\tb[2] = std::complex<double>(-57303847.0, 132289.0) / 1013086721.0;\n\treturn space.norm(x-b) < 5.0e-4;\n}\n\n/// Some functions for testing MADNESS Functions...\nstatic double magfunc(const Vector<double, 3> &pt) {\n\treturn sqrt(pt[0]*pt[0] + pt[1]*pt[1] + pt[2]*pt[2]);\n}\n\nstatic std::complex<double> zmagfunc(const Vector<double, 3> &pt) {\n\treturn std::complex<double>(pt[0], sqrt(pt[1]*pt[1] + pt[2]*pt[2]));\n}\n\n// inverts a madness function... assumes the function is never 0\ntemplate <typename T>\ninline static void invert(const Key<3> &key, Tensor<T> &t) {\n\tUNARY_OPTIMIZED_ITERATOR(T, t, *_p0 = 1.0 / *_p0);\n}\n\n\n/// test real functions, converge after 0 steps\nbool realfunc0() {\n\tRealFuncIdentOp lo;\n\tFunctionSpace<double, 3> space(*worldptr);\n\tFunction<double, 3> x, b;\n\tdouble resid_thresh = 1.0e-3;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb = FunctionFactory<double, 3>(*worldptr).f(magfunc);\n\tb.truncate();\n\tx = copy(b);\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\treturn space.norm(x-b) < 1.0e-3;\n}\n\n/// test real functions, converge after 1 step\nbool realfunc1() {\n\tRealFuncIdentOp lo;\n\tFunctionSpace<double, 3> space(*worldptr);\n\tFunction<double, 3> x, b;\n\tdouble resid_thresh = 1.0e-3;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb = FunctionFactory<double, 3>(*worldptr).f(magfunc);\n\tb.truncate();\n\tx = FunctionFactory<double, 3>(*worldptr); // zero function\n\tx.truncate();\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\treturn space.norm(x-b) < 1.0e-3;\n}\n\n/// test real functions, converge after >1 steps\nbool realfunc2() {\n\tFunctionSpace<double, 3> space(*worldptr);\n\tFunction<double, 3> x, b, mult;\n\tdouble resid_thresh = 1.0e-3;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb = FunctionFactory<double, 3>(*worldptr).f(magfunc);\n\tb.truncate();\n\tx = FunctionFactory<double, 3>(*worldptr); // zero function\n\tx.truncate();\n\tmult = copy(b);\n\tmult.add_scalar(1.0);\n\tmult.compress();\n\n\tRealFuncLinearOp lo(mult);\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\n\t// compute the actual solution\n\tmult.unaryop(&invert<double>);\n\tb = mult * b;\n\tb.truncate();\n\treturn space.norm(x-b) < 1.0e-3;\n}\n\n/// test complex functions, converge after 0 steps\nbool cplxfunc0() {\n\tComplexFuncIdentOp lo;\n\tFunctionSpace<std::complex<double>, 3> space(*worldptr);\n\tFunction<std::complex<double>, 3> x, b;\n\tdouble resid_thresh = 1.0e-3;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb = FunctionFactory<std::complex<double>, 3>(*worldptr).f(zmagfunc);\n\tb.truncate();\n\tx = copy(b);\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\treturn space.norm(x-b) < 1.0e-3;\n}\n\n/// test complex functions, converge after 1 step\nbool cplxfunc1() {\n\tComplexFuncIdentOp lo;\n\tFunctionSpace<std::complex<double>, 3> space(*worldptr);\n\tFunction<std::complex<double>, 3> x, b;\n\tdouble resid_thresh = 1.0e-3;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 10;\n\n\tb = FunctionFactory<std::complex<double>, 3>(*worldptr).f(zmagfunc);\n\tb.truncate();\n\tx = FunctionFactory<std::complex<double>, 3>(*worldptr); // zero function\n\tx.truncate();\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\treturn space.norm(x-b) < 1.0e-3;\n}\n\n/// test complex functions, converge after >1 steps\nbool cplxfunc2() {\n\tFunctionSpace<std::complex<double>, 3> space(*worldptr);\n\tFunction<std::complex<double>, 3> x, b, mult;\n\tdouble resid_thresh = 2.0e-3;\n\tdouble update_thresh = 1.0e-10;\n\tint maxiters = 25;\n\n\tb = FunctionFactory<std::complex<double>, 3>(*worldptr).f(zmagfunc);\n\tb.truncate();\n\tx = FunctionFactory<std::complex<double>, 3>(*worldptr); // zero function\n\tx.truncate();\n\tmult = copy(b);\n\tmult.add_scalar(std::complex<double>(1.0, 1.0));\n\tmult.truncate();\n\n\tComplexFuncLinearOp lo(mult);\n\n\tGMRES(space, lo, b, x, maxiters, resid_thresh, update_thresh, true);\n\n\t// compute the actual solution\n\tmult.unaryop(&invert<double_complex>);\n\tb = mult * b;\n\tb.truncate();\n\treturn space.norm(x-b) < 2.0e-3;\n}\n"
  },
  {
    "path": "src/examples/testcomplexfunctionsolver.cc",
    "content": "#include <iostream>\n#include <madness/mra/mra.h>\n#include <madness/mra/nonlinsol.h>\n#include <complex>\n#include <cmath>\n\nusing namespace madness;\n\nconst size_t N = 1;\nusing dataT = std::complex<double>;\nusing functionT = Function<dataT,N>;\nusing factoryT = FunctionFactory<dataT,N>;\n\nclass F;\nF allocator();\n\nclass F {\n    functionT x;\n\npublic:\n    F(const functionT& x) : x(copy(x)) {}\n\n    F() : x(allocator().x) {}      // Default constructor necessary for storage in vector\n\n    F(const F& a) : x(copy(a.x)) {} // Copy constructor necessary\n\n    F operator=(const F& f) { // Assignment required for storage in vector\n        if (this != &f) {\n            x = copy(f.x);\n        }\n        return *this;\n    }\n\n    F operator-(const F& b) const { // Operator- necessary\n        return F(x-b.x);\n    }\n\n    F& operator+=(const F& b) { // Operator+= necessary\n        x += b.x;\n        return *this;\n    }\n\n    F operator*(const dataT& a) const { // Scale by a constant necessary\n        return F(x*a);\n    }\n\n    const functionT& get() const {return x;}\n};\n\n// If the default constructor does not make a zero value need an\n// allocator.  It can be a function or a class.\nF allocator() {\n    return F(functionT(factoryT(World::get_default())));\n}\n\n// This interface is necessary to compute inner products\ndataT inner(const F& a, const F& b) {\n    return conj(a.get()).inner(b.get());\n}\n\n// void residualx(const Key<N>& key, Tensor<dataT>& t) {\n//     UNARY_OPTIMIZED_ITERATOR(dataT, t, *_p0 = std::exp(-*_p0) - *_p0;);\n// }\n\nvoid residualx(const Key<N>& key, Tensor<dataT>& t) {\n    UNARY_OPTIMIZED_ITERATOR(dataT, t, *_p0 = (*_p0)*(*_p0)+1.0;);\n}\n\nF residual(const F& f) {\n    functionT r = copy(f.get());\n    r.unaryop(&residualx);\n    return F(r);\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    {\n        World world(SafeMPI::COMM_WORLD);\n        startup(world,argc,argv);\n        XNonlinearSolver<F,dataT,F(*)()> solver(allocator);\n        solver.set_maxsub(5);\n        \n        // This line should compile but won't work because the\n        // default constructor F() sets x=99 not zero\n        //XNonlinearSolver<F,double> solver;\n        \n        functionT guess = factoryT(world);\n        guess.add_scalar(std::complex<double>(0.5,0.5));\n        F x(guess);\n        for (int iter=0; iter<20; iter++) {\n            auto r = residual(x);\n            std::cout << iter << \" \" << residual(x).get().norm2() << \" \" << x.get()(coord_1d({0.5})) << std::endl;\n            x = solver.update(x, residual(x));\n        }\n        world.gop.fence();\n        world.gop.fence();\n    }\n    finalize();\n\n    return 0;\n}\n\n"
  },
  {
    "path": "src/examples/testspectralprop.cc",
    "content": "\n#include <madness/mra/mra.h>\n#include <iostream>\n#include <vector>\n\n// These forward declarations are here for SpectralPropagator::step() in spectralprop.h.\nclass Fred;\nnamespace madness {\n    double distance(const Fred& a, const Fred& b);\n    double distance(madness::Function<std::complex<double>, 1ul>& a, madness::Function<std::complex<double>, 1ul>& b);\n}\n\n#include \"spectralprop.h\"\n\nusing namespace madness;\n\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// test0 is a simple scalar problem\n//\n// -u + u^2 = du/dt    u(0)=-0.1\n//\n// test1 is the same differential equation\n// but simultaneously propagating 3 different\n// initial conditions (-0.1,-0.2,-0.3) to\n// illustrate use of a custom class.\n//\n// test2 is the same differential equation\n// as the heat2.cc example\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n/// Wrapper around vector demonstrating interface necessary\nclass Fred {\n    std::vector<double> v;\n\n    // Default constructor not needed\n    Fred();\n\npublic:\n    // Specific to this example\n    Fred(double a, double b, double c)\n        : v(3) {v[0] = a; v[1] = b; v[2] = c;}\n    void set(int i, double a) {v[i] = a;}\n    double get(int i) const {return v[i];}\n\n    // The following interfaces are ncessary\n\n    // Copy constructor\n    Fred(const Fred& f) : v(f.v) {}\n\n    // Assignment\n    Fred& operator=(const Fred& f) {\n        if (this != &f) v = f.v;\n        return *this;\n    }\n\n    // Inplace addition\n    Fred& operator+=(const Fred& f) {\n        for (int i=0; i<3; i++) v[i] += f.v[i];\n        return *this;\n    }\n\n    // Scale from right by double\n    Fred operator*(const double& d) const {\n        Fred f(*this);\n        for (int i=0; i<3; i++) f.v[i] *= d;\n        return f;\n    }\n};\n\nnamespace madness {\n    // distance is in madness namespace to disambiguate it from std::distance.\n    double distance(const Fred& a, const Fred& b)\n    {\n        double xsq = 0.0;\n        for (int i=0; i<3; i++) {\n            double xx = a.get(i) - b.get(i);\n            xsq += xx*xx;\n        }\n        return std::sqrt(xsq);\n    }\n} // namespace madness\n\n\n// Not required\nstd::ostream& operator<<(std::ostream& s, const Fred& f) {\n    s << \"[\" << f.get(0) << \", \" << f.get(1) << \", \" << f.get(2) << \"]\";\n    return s;\n}\n\ndouble expL_double(double dt, double u) {\n    return exp(-dt)*u;\n}\n\ndouble N_double(double t, const double u) {\n    return u*u;\n}\n\nFred expL(double dt, const Fred& f) {\n    Fred r(f);\n    for (int i=0; i<3; i++) r.set(i,exp(-dt)*f.get(i));\n    return r;\n}\n\nFred N(double t, const Fred& f) {\n    Fred r(f);\n    for (int i=0; i<3; i++) r.set(i,f.get(i)*f.get(i));\n    return r;\n}\n\ndouble exact(double t, double u0) {\n    return -u0/(-u0+std::exp(t)*u0-std::exp(t));\n}\n\nvoid test0(World& world) {\n    if (world.rank() == 0) {\n        print(\"Testing Gauss Legendre --- double\");\n        const double t = 0.0;\n        const double dt = 0.1;\n        double u0 = -0.1;\n\n        // Solutions from maple\n        double M[4] = {\n             0.0,\n            -0.089631631149550335419,\n            -0.089630792118101842108,\n            -0.089630792044157819486\n        };\n\n        for (int NPT=1; NPT<=3; NPT++) {\n            SpectralPropagator P(NPT);\n            double u = P.step(t, dt, u0, expL_double, N_double);\n\n            // Error relative to numerical solution computed by Maple\n            // ... it should be near machine precision\n            double err = std::fabs(u - M[NPT]);\n\n            // Error relative to exact solution ... should converge\n            // rapidly as order is increased.\n            double errexact = std::fabs(u - exact(t+dt, u0));\n\n            print(\"NPT =\", NPT, \"err(Maple)\", err, \"err(exact)\", errexact);\n        }\n    }\n}\n\nvoid test0GaussLobatto(World& world) {\n    if (world.rank() == 0) {\n        print(\"Testing Gauss Lobatto --- double\");\n        const double dt = 0.1;\n        double u0 = -0.1;\n\n        for (int NPT=2; NPT<=6; NPT++) {\n            double t = 0.0;\n            SpectralPropagatorGaussLobatto P(NPT);\n            double u = u0;\n            for (int step=0; step<11; step++) {\n                u = P.step(t, dt, u, expL_double, N_double, 1e-12, false);\n                t += dt;\n            }\n            double errexact = u - exact(t,u0);\n            print(\"NPT =\", NPT, \"err(exact t=11dt)\", errexact);\n        }\n    }\n}\n\nvoid test1(World& world) {\n    if (world.rank() == 0) {\n        print(\"Testing Gauss Legendre --- user-defined type\");\n        const double t = 0.0;\n        const double dt = 0.1;\n        Fred u0(-0.1,-0.2,-0.3);\n\n        // Solutions from maple\n        Fred M[4] = {\n            Fred(0.0,0.0,0.0),\n            Fred(-0.089631631149550335419,-0.17759183895709322265,-0.26392868193278156650),\n            Fred(-0.089630792118101842108,-0.17758754617993929487,-0.26391672762980049068),\n            Fred(-0.089630792044157819486,-0.17758754573188727124,-0.26391672628171338046)\n        };\n\n        for (int NPT=1; NPT<=3; NPT++) {\n            SpectralPropagator P(NPT);\n            Fred u = P.step(t, dt, u0, expL, N);\n\n            // Error relative to numerical solution computed by Maple\n            // ... it should be near machine precision\n            double err = 0.0;\n\n            // Error relative to exact solution ... should converge\n            // rapidly as order is increased.\n            double errexact = 0.0;\n            for (int i=0; i<3; i++) {\n                err += std::fabs(u.get(i) - M[NPT].get(i));\n                errexact += std::fabs(u.get(i) - exact(t+dt, u0.get(i)));\n            }\n\n            print(\"NPT =\", NPT, \"err(Maple)\", err, \"err(exact)\", errexact);\n        }\n\n        for (int NPT=1; NPT<=3; NPT++) {\n            double t = 0.0;\n            SpectralPropagator P(NPT);\n            Fred u = u0;\n            for (int step=0; step<11; step++) {\n                u = P.step(t, dt, u, expL, N);\n                t += dt;\n            }\n            double errexact = 0.0;\n            for (int i=0; i<3; i++) {\n                errexact += std::fabs(u.get(i) - exact(t, u0.get(i)));\n            }\n\n            print(\"NPT =\", NPT, \"err(exact t=11dt)\", errexact);\n\n        }\n    }\n}\n\n///////////////////////////////////////////////////\n// All this crap for the non-linear TDSE problem //\n///////////////////////////////////////////////////\n\n#include <madness/mra/mra.h>\n#include <madness/mra/qmprop.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n\nnamespace madness {\n\ndouble distance(madness::Function<std::complex<double>, 1ul>& a, madness::Function<std::complex<double>, 1ul>& b) {\n    return (a-b).norm2();\n}\n}\n\n\n\nstatic const double L = 100.0; // Simulation in [-L,L]\nstatic const double x0 = -L + 10.0; // Initial position of the atom\nstatic const double energy_exact = -6.188788775728796797594788; // From Maple\nstatic const double velocity = 3.0;\nstatic const long k = 12;        // wavelet order\nstatic const double thresh = 1e-8; // precision\nstatic const double eshift = 0.0;\n//static const double eshift = energy_exact - 0.5*velocity*velocity; // Use this value to remove rotating phase\n\n// Estimate the bandwidth and largest practical time step using G0\nstatic double ctarget = 20.0; // Estimated from FT of exact solution ... was 20\nstatic double c = 1.86*ctarget;\nstatic double tcrit = 2*constants::pi/(c*c);\n\ntypedef Convolution1D<double_complex> complex_operatorT;\ntypedef std::shared_ptr<complex_operatorT> pcomplex_operatorT;\n\n// Position of atom at given time\ndouble atom_position(double current_time) {\n    return x0 + velocity*current_time;\n}\n\nclass PsiExact : public FunctionFunctorInterface<double_complex,1>\n{\n    const double current_time;\n    const double atom_x;\npublic:\n    PsiExact(double current_time)\n        : current_time(current_time)\n        , atom_x(atom_position(current_time))\n    {}\n\n    // Exact solution ... (H-E)psi is accurate to 2e-7 or better inside Maple\n    double_complex operator()(const coord_1d& r) const {\n        const double x = r[0] - atom_x;\n\n        if (fabs(x) > 9.0) return 0.0;\n\n        const double xsq = x*x;\n\n        // Horner's form for stability ... yes, it is 70-order polyn ... don't panic ... all is OK\n\n        const double psi = exp(-1.30*xsq)*(-1.02151632756275513018719494826+(.522210612113707231536059971069+(-.378478352719362210706386739834+(.183732263756009855463432582593+(-0.866826311335724362186706464428e-1+(0.364601910940641762284283418688e-1+(-0.144289291226899801775738667691e-1+(0.536464813679927807734520149659e-2+(-0.188945345474975346004237994967e-2+(0.628725522158030920219217207400e-3+(-0.195986657875763402765072721284e-3+(0.563993909330309881048156461300e-4+(-0.147273758530730072646826354339e-4+(0.343202525037692780236348165792e-5+(-7.03765391498970506694108123682e-7+(1.25577395245191089173671652503e-7+(-1.93270666918809750376161513191e-8+(2.54624395753990033043923369519e-9+(-2.84968491109847694778452937732e-10+(2.68398879018928855922002181223e-11+(-2.09811331054703124038096336404e-12+(1.32869596552058891546970129944e-13+(-6.47453843054578193348503832223e-15+(2.08146181239264250219157355910e-16+(-8.27692933283146365185698371000e-19+(-4.21076100567125673420604632290e-19+(3.34873683682880953223636900553e-20+(-1.62840449033428572820374528252e-21+(5.80781234060753332169593869292e-23+(-1.58754665363960354625758075480e-24+(3.34792415609741263184593450566e-26+(-5.37727687523701580992550859153e-28+(6.37706272777548158355242766766e-30+(-5.27154378837014394526580093435e-32+(2.71430533655911926094030668033e-34-6.55694230766452931026127498540e-37*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq)*xsq);\n\n        // Galilean translation factor\n        const double arg = x*velocity - (energy_exact - velocity*velocity*0.5 - eshift)*current_time;\n        const double_complex tranfac = exp(double_complex(0,arg));\n        return psi*tranfac;\n    }\n};\n\nclass Vnuclear : public FunctionFunctorInterface<double,1>\n{\n    const double atom_x;\npublic:\n    Vnuclear(double current_time) : atom_x(atom_position(current_time)) {}\n\n    double operator()(const coord_1d& r) const {\n        // Time-dependent potential for translating atom\n        const double x = r[0] - atom_x;\n        if (fabs(x) > 6.2) return 0.0;\n\n        return -8.0*exp(-x*x) - eshift;\n    }\n};\n\ncomplex_function_1d APPLY(complex_operatorT* q1d, const complex_function_1d& psi) {\n    psi.reconstruct();\n\n    psi.broaden();\n    psi.broaden();\n    psi.broaden();\n    psi.broaden();\n    psi.broaden();\n\n    complex_function_1d r = apply_1d_realspace_push(*q1d, psi, 0);\n    r.sum_down();\n    return r;\n}\n\ncomplex_operatorT* MAKE_PROPAGATOR(World& world, double t)\n{\n    return qm_1d_free_particle_propagator(k, c, t, 2.0*L);\n}\n\ntemplate <typename T>\nstd::pair<bool, T> find_fuzzy(double t, const std::vector< std::pair<double,T> >& cache) {\n    for (unsigned int i=0; i<cache.size(); i++) {\n        if (std::fabs(cache[i].first - t) < 1e-12*t) {\n            return std::make_pair(true, cache[i].second);\n        }\n    }\n    return std::make_pair(false, T());\n}\n\nstatic std::vector< std::pair<double, complex_operatorT*> > G_cache;\ncomplex_operatorT* G(World& world, double dt) {\n    std::pair<bool, complex_operatorT*> r = find_fuzzy(dt, G_cache);\n    complex_operatorT* p;\n    if (r.first) {\n        p = r.second;\n    }\n    else {\n        //print(\"making operator for dt =\", dt);\n        G_cache.push_back(std::make_pair(dt, p = MAKE_PROPAGATOR(world, dt)));\n    }\n    return p;\n}\n\nstd::vector< std::pair<double, real_function_1d> > vnuc_cache;\nreal_function_1d vnuc(World& world, double t) {\n    std::pair<bool,real_function_1d> r = find_fuzzy(t, vnuc_cache);\n    real_function_1d vnuc;\n    if (r.first) {\n        vnuc = r.second;\n    }\n    else {\n        //print(\"making vnuc for t =\", t);\n        vnuc_cache.push_back(std::make_pair(t, vnuc = real_factory_1d(world).functor(real_functor_1d(new Vnuclear(t)))));\n    }\n    return vnuc;\n}\n\ncomplex_function_1d applyexpLt(double dt, const complex_function_1d& u) {\n    if (dt < 1e-12) return copy(u);\n    return APPLY(G(u.world(), dt), u).truncate();\n}\n\ncomplex_function_1d applyN(double t, const complex_function_1d& u) {\n    return (u*(vnuc(u.world(), t)*double_complex(0.0,-1.0))).truncate(); ///  + conj(u)*u\n}\n\nvoid print_info(World& world, double current_time, const complex_function_1d& psi, int step) {\n    real_function_1d potn = vnuc(world, current_time);\n    complex_derivative_1d D = free_space_derivative<double_complex,1>(world,0);\n    complex_function_1d dpsi = D(psi);\n    double ke = inner(dpsi,dpsi).real() * 0.5;\n    double pe = psi.inner(psi*(double_complex(1,0)*potn)).real(); // +psi*conj(psi)\n    double norm = psi.norm2();\n    double err = psi.err(PsiExact(current_time));\n    ke /= norm*norm;\n    pe /= norm*norm;\n\n    if (world.rank() > 0) return;\n    if ((step%40) == 0) {\n        printf(\"\\n\");\n        printf(\" step    time      atom x              norm               kinetic              potential             energy              err norm     depth   size  \\n\");\n        printf(\"------ -------- ------------     ----------------     ----------------     ----------------     ----------------     ---------------- ----  --------\\n\");\n    }\n    printf(\"%6d %8.4f %12.8f %20.13f %20.13f %20.13f %20.13f %20.13f %4d %9ld\\n\",\n           step, current_time, atom_position(current_time), norm, ke, pe, ke+pe, err, int(psi.max_depth()), long(psi.size()));\n}\n\n\nvoid test2(World& world) {\n    if (world.rank() == 0) print(\"Testing Gauss Legendre --- TDSE 1D example\");\n    std::cout.precision(8);\n    FunctionDefaults<1>::set_k(k);                 // Wavelet order\n    FunctionDefaults<1>::set_thresh(thresh);       // Accuracy\n    FunctionDefaults<1>::set_autorefine(false);\n    FunctionDefaults<1>::set_cubic_cell(-L,L);\n    FunctionDefaults<1>::set_initial_level(8);     // Initial projection level\n    FunctionDefaults<1>::set_truncate_mode(1);\n\n    complex_function_1d psi0 = complex_factory_1d(world).functor(complex_functor_1d(new PsiExact(0.0)));\n    psi0.truncate();\n    complex_function_1d psi = copy(psi0);\n\n    // These should be input\n    double tstep = 10.0*tcrit;\n    int NPT = 3;\n\n    world.gop.broadcast(NPT);\n    world.gop.broadcast(tstep);\n\n    int nstep = (velocity==0) ? 100 : int((L - 10 - x0)/velocity/tstep);\n\n    if (world.rank() == 0) {\n        print(\"\");\n        print(\" Wavelet order\", k);\n        print(\"     Threshold\", thresh);\n        print(\"      Velocity\", velocity);\n        print(\"     Time step\", tstep);\n        print(\"      No.steps\", nstep);\n        print(\"           NPT\", NPT);\n    }\n\n    SpectralPropagator P(NPT);\n    double t = 0.0;\n    for (int step=0; step<nstep; step++) {\n        //if ((step%10) == 0)\n        print_info(world, t, psi, step);\n        if (velocity==0) print(\"PHASE\", inner(psi,psi0), exp(double_complex(0.0,-energy_exact*t)));\n        psi = P.step(t, tstep, psi, applyexpLt, applyN, thresh*10.0); //, true, false);\n        psi.truncate();\n\n        t += tstep;\n        vnuc_cache.clear();\n    }\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n    test0(world);\n    print(\"GL\");\n    test0GaussLobatto(world);\n    test1(world);\n    test2(world);\n\n    finalize();\n    return 0;\n}\n\n\n\n\n"
  },
  {
    "path": "src/examples/testttg.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/vmra.h>\n#include <madness/mra/lbdeux.h>\n#include <madness/constants.h>\n#include <stdlib.h>\nusing namespace madness;\n\n// A class that behaves like a function to compute a Gaussian of given origin and exponent\nclass Gaussian : public FunctionFunctorInterface<double,3> {\npublic:\n    const coord_3d center;\n    const double exponent;\n    const double coefficient;\n    std::vector<coord_3d> specialpt;\n    \n    Gaussian(const coord_3d& center, double exponent, double coefficient)\n        : center(center), exponent(exponent), coefficient(coefficient), specialpt(1)\n    {\n        specialpt[0][0] = center[0];\n        specialpt[0][1] = center[1];\n        specialpt[0][2] = center[2];\n    }\n    \n    // MADNESS will call this interface\n    double operator()(const coord_3d& x) const {\n        double sum = 0.0;\n        for (int i=0; i<3; i++) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        return coefficient*exp(-exponent*sum);\n    }\n    \n    // // By default, adaptive projection into the spectral element basis\n    // // starts uniformly distributed at the initial level.  However, if\n    // // a function is \"spiky\" it may be necessary to project at a finer\n    // // level but doing this uniformly is expensive.  This method\n    // // enables us to tell MADNESS about points/areas needing deep\n    // // refinement (the default is no special points).\n    // std::vector<coord_3d> special_points() const {\n    //     return specialpt;\n    // }\n};\n\nclass LevelPmapX : public WorldDCPmapInterface<Key<3>> {\n private:\n     const int nproc;\n public:\n    LevelPmapX() : nproc(0) {};\n\n    LevelPmapX(World& world) : nproc(world.nproc()) {}\n\n    /// Find the owner of a given key\n    ProcessID owner(const Key<3>& key) const {\n      Level n = key.level();\n      if (n == 0) return 0;\n        hashT hash;\n        if (n <= 3 || (n&0x1)) hash = key.hash();\n        else hash = key.parent().hash();\n        return hash%nproc;\n    }\n };\n\n/// A pmap that spatially decomposes the domain and by default slightly overdcomposes to attempt to load balance\nclass PartitionPmap : public WorldDCPmapInterface<Key<3>> {\nprivate:\n    const int nproc;\n    Level target_level;\npublic:\n    PartitionPmap()\n        : nproc(1)\n        , target_level(3)\n    {};\n\n    // Default is to try to optimize the target_level, but you can specify any value > 0\n    PartitionPmap(size_t nproc, const Level target_level=0)\n        : nproc(nproc)\n    {\n        if (target_level > 0) {\n            this->target_level = target_level;\n        }\n        else {\n            this->target_level = 1;\n            int p = nproc-1;\n            while (p) {\n                p >>= 3;\n                this->target_level++;\n            }\n        }            \n    }\n\n    /// Find the owner of a given key\n    ProcessID owner(const Key<3>& key) const {\n        hashT hash;\n        if (key.level() <= target_level) {\n            hash = key.hash();\n        }\n        else {\n            hash = key.parent(target_level - key.level()).hash();\n        }\n        return hash%nproc;\n    }\n};\n\n\nvoid test2(World& world, size_t nfunc, size_t k, double thresh) {\n    // Extra scope level to be sure all global data is freed before leaving\n    {\n        LevelPmapX p(world);\n\n        double expnt = 30000.0;\n        double fac = std::pow(2.0*expnt/M_PI,0.25*3);\n        \n        FunctionDefaults<3>::set_cubic_cell(-6.0,6.0);\n        FunctionDefaults<3>::set_apply_randomize(false);\n        FunctionDefaults<3>::set_project_randomize(false);\n        FunctionDefaults<3>::set_truncate_on_project(true);\n        FunctionDefaults<3>::set_truncate_mode(0); // Or should be 1 ????????????????????????????????????????????\n        FunctionDefaults<3>::set_k(k);\n        FunctionDefaults<3>::set_thresh(thresh);\n//        FunctionDefaults<3>::set_pmap(std::shared_ptr<WorldDCPmapInterface<Key<3>>>(static_cast<WorldDCPmapInterface<Key<3>>*>(new PartitionPmap(world.size(),3))));\n        FunctionDefaults<3>::set_pmap(std::shared_ptr<WorldDCPmapInterface<Key<3>>>(static_cast<WorldDCPmapInterface<Key<3>>*>(new LevelPmapX(world))));\n        {\n            const int N = 6; // looking for where exp(-a*x^2) < 10**-N\n            const int K = 6; // typically the lowest order of the polyn\n            const double log10 = std::log(10.0);\n            const double log2 = std::log(2.0);\n            const double L = 12.0;\n            const double a = expnt*L*L;\n            double n = std::log(a/(4*K*K*(N*log10+std::log(fac))))/(2*log2);\n            //std::cout << expnt << \" \" << a << \" \" << n << std::endl;\n            Level initlev = Level(n<2 ? 2.0 : std::ceil(n)); // ????????????? should subtract one ???????????\n            FunctionDefaults<3>::set_initial_level(initlev);\n        }\n        \n        srand48(5551212); // for reproducible results\n        for (size_t i=0; i<10000; i++) drand48(); // warmup generator\n        \n        double start_total = wall_time();\n        double start;\n        \n        start = wall_time();\n        std::vector<real_function_3d> funcs;\n        for (size_t i=0; i<nfunc; i++) {\n            coord_3d r;\n            for (size_t d=0; d<3; d++) {\n                r[d] = -6.0 + 12.0*drand48();\n            }\n            if (world.rank() == 0) print(r, expnt, fac);\n            double startx = wall_time();\n            funcs.push_back(real_factory_3d(world).functor(Gaussian(r, expnt, fac)).nofence());\n            if (world.rank() == 0) print(\"pp \", wall_time()-startx);\n        }\n        world.gop.fence();\n        double used_project = wall_time() - start;\n        \n        start = wall_time();\n        std::vector<double> norms = norm2s(world, funcs);\n        double used_norms_project = wall_time() - start;\n        if (world.rank() == 0) print(\"norms after projection\", norms);\n\n        start = wall_time();\n        compress(world, funcs);\n        double used_compress = wall_time() - start;\n        \n        start = wall_time();\n        norms = norm2s(world, funcs);\n        double used_norms_compress = wall_time() - start;\n        if (world.rank() == 0) print(\"norms after compress\", norms);\n        \n        start = wall_time();\n        reconstruct(world, funcs);\n        double used_reconstruct = wall_time() - start;\n        \n        start = wall_time();\n        norms = norm2s(world, funcs);\n        double used_norms_reconstruct = wall_time() - start;\n        if (world.rank() == 0) print(\"norms after reconstruct\", norms);\n        double used_total = wall_time() - start_total;\n        \n        if (world.rank() == 0) {\n            print(\"  #processes : \", world.size());\n            print(\"    #threads : \", ThreadPool::size()+1); // does NOT include the communication thread and assumes main thread is computing\n            print(\"     project : \", used_project);\n            print(\"    compress : \", used_compress);\n            print(\" reconstruct : \", used_reconstruct);\n            print(\"      norm-1 : \", used_norms_project);\n            print(\"      norm-2 : \", used_norms_compress);\n            print(\"      norm-3 : \", used_norms_reconstruct);\n            print(\"       total : \", used_total);\n        }\n\n        for (auto& func : funcs) {\n            size_t n = func.tree_size();\n            size_t maxn = func.max_nodes();\n            size_t minn = func.min_nodes();\n            if (world.rank() == 0) print(\"size \", n, minn, maxn);\n        }\n    }\n    // Extra scope level to be sure all global data is freed before leaving\n    world.gop.fence();\n    world.gop.fence();\n}\n\nint main(int argc, char** argv) {\n    // Initialize the parallel programming environment\n    initialize(argc,argv);\n    // Extra scope to make sure world is destroyed before finalizing\n    {\n        World world(SafeMPI::COMM_WORLD);\n        startup(world,argc,argv);\n        test2(world, 20, 10, 1e-8);\n    }\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/tiny.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file tiny.cc\n  \\brief Solves the Hartree-Fock and MP2 equations for the helium atom\n  \\defgroup examplehehf Hartree-Fock and MP2 for the helium atom\n  \\ingroup examples\n\n  The source is\n  <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/helium_mp2.cc>here</a>.\n\n\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/funcplot.h>\n#include <madness/mra/lbdeux.h>\n\n#include <iostream>\n\nusing namespace madness;\n\nnamespace madness{\nextern std::vector<std::string> cubefile_header(std::string filename=\"input\", const bool& no_orient=false);\n}\ntemplate<size_t NDIM>\nvoid load_function(World& world, Function<double,NDIM>& pair, const std::string name) {\n    if (world.rank()==0)  print(\"loading function \", name);\n\n    archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, name.c_str());\n    ar & pair;\n\n    FunctionDefaults<3>::set_k(pair.k());\n    FunctionDefaults<6>::set_k(pair.k());\n\n    FunctionDefaults<3>::set_thresh(pair.thresh());\n    FunctionDefaults<6>::set_thresh(pair.thresh());\n\n    std::string line=\"loaded function \"+name;\n    pair.print_size(line);\n\n}\ntemplate<size_t NDIM>\nvoid save_function(World& world, Function<double,NDIM>& pair, const std::string name) {\n    if (world.rank()==0)  print(\"loading function \", name);\n\n    archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, name.c_str());\n    ar & pair;\n\n    std::string line=\"saved function \"+name;\n    pair.print_size(line);\n\n}\n\n\ntemplate<size_t NDIM>\nvoid draw_line(World& world, Function<double,NDIM>& pair, const std::string restart_name) {\n\n    Vector<double,NDIM> lo(0.0), hi(0.0);\n    lo[2]=-8.0;\n    hi[2]=8.0;\n\n    {\n        std::string filename=\"line_\"+restart_name;\n        trajectory<NDIM> line=trajectory<NDIM>::line2(lo,hi,601);\n        plot_along<NDIM>(world,line,pair,filename);\n    }\n\n}\n\ntemplate<size_t NDIM>\nvoid draw_circle(World& world, Function<double,NDIM>& pair, const std::string restart_name) {\n\n\tstd::string filename=\"circle_\"+restart_name;\n\tcoord_3d el2(0.0);\n\tel2[1]=0.5;\n\ttrajectory<NDIM> circ(0.5,el2,601);\n\tplot_along<NDIM>(world,circ,pair,filename);\n\n}\n\n\nvoid dostuff(World& world) {\n    real_function_3d rho=real_factory_3d(world),rhonemo=real_factory_3d(world),\n            vsigaa,vsigaanemo;\n    real_function_3d sigmanemo=real_factory_3d(world);\n    real_function_3d dens_pt0=real_factory_3d(world);\n\n    load(rho,\"rho\");\n    load(rhonemo,\"rhonemo\");\n    load(sigmanemo,\"sigmanemo\");\n    load(dens_pt0,\"dens_pt0\");\n\n    FunctionDefaults<3>::set_k(rho.k());\n    FunctionDefaults<3>::set_thresh(rho.thresh());\n\n    rho.reconstruct();\n    rhonemo.reconstruct();\n    std::vector< std::shared_ptr<Derivative<double,3> > > gradop =\n             gradient_operator<double,3>(world);\n\n    // vsig with nemos\n    {\n\n    }\n\n    // vsig with mos\n    {\n        real_function_3d drhoa_x=(*gradop[0])(rho, true).refine();\n        real_function_3d drhoa_y=(*gradop[1])(rho, true).refine();\n        real_function_3d drhoa_z=(*gradop[2])(rho, true).refine();\n        world.gop.fence();\n\n        // assign the reduced densities sigma\n        vsigaa=(drhoa_x * drhoa_x + drhoa_y * drhoa_y + drhoa_z * drhoa_z);\n    }\n\n    double width = FunctionDefaults<3>::get_cell_min_width()/2.0 - 1.e-3;\n    coord_3d start(0.0); start[0]=-width;\n    coord_3d end(0.0); end[0]=width;\n\n\n    plot_line(\"line_rho\",10000,start,end,rho);\n    plot_line(\"line_vsigaa\",10000,start,end,vsigaa);\n    plot_line(\"line_dens_pt0\",10000,start,end,dens_pt0);\n\n    SeparatedConvolution<double,3> smooth=SmoothingOperator3D(world,0.005);\n    real_function_3d sigmanemo_smooth=smooth(sigmanemo);\n    plot_line(\"line_sigaanemo_smooth\",10000,start,end,sigmanemo_smooth);\n    real_function_3d dens_pt0_smooth=smooth(dens_pt0);\n    plot_line(\"line_dens_pt0_smooth\",10000,start,end,dens_pt0_smooth);\n\n}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n\n    // determine the box size L\n    double L=-1.0;\n    bool no_orient=false;\n    std::ifstream f(\"input\");\n    position_stream(f, \"dft\");\n    std::string s;\n    while (f >> s) {\n    \tif (s == \"end\") {\n    \t\tbreak;\n    \t} else if (s == \"L\") {\n    \t\tf >> L;\n        } else if (s == \"no_orient\") {\n                no_orient=true;\n        }\n    }\n\n    std::string c;\n    position_stream(f, \"plot\");\n    while (f >> s) {\n    \tif (s == \"end\") {\n    \t\tbreak;\n    \t} else if (s == \"line\") {\n    \t\tf >> c;\n        }\n    }\n\n    if (L<0.0) MADNESS_EXCEPTION(\"box size indetermined\",1);\n    FunctionDefaults<3>::set_cubic_cell(-L,L);\n    FunctionDefaults<6>::set_cubic_cell(-L,L);\n//    FunctionDefaults<6>::set_tensor_type(TT_2D);\n    FunctionDefaults<6>::set_tensor_type(TT_FULL);\n\n    // convert human to mad form (analogous to plot_plane in funcplot.h)\n    unsigned int cc;\n    if (c == \"x1\") cc = 0;\n    else if (c == \"x2\") cc = 1;\n    else if (c == \"x3\") cc = 2;\n    else {\n    \tprint(\"plot line axis not defined, plotting x1 axis\");\n    \tc = \"x1\";\n    \tcc = 0;\n    }\n\n    if (world.rank()==0) {\n     \t    print(\"cell size:         \", FunctionDefaults<6>::get_cell_width()[0]);\n    }\n\n    // load the function of interest\n    std::vector<std::string> filenames;\n\n    for(int i = 1; i < argc; i++) {\n        const std::string arg=argv[i];\n\n        // break parameters into key and val\n        size_t pos=arg.find(\"=\");\n        std::string key=arg.substr(0,pos);\n        std::string val=arg.substr(pos+1);\n\n        if (key==\"file\") {                               // usage: restart=path/to/mo_file\n            filenames.push_back(stringify(val));\n        }\n    }\n\n\t// make sure we're doing what we want to do\n\tif (world.rank()==0) {\n\t\tprint(\"polynomial order:  \", FunctionDefaults<6>::get_k());\n\t\tprint(\"threshold:         \", FunctionDefaults<6>::get_thresh());\n\t\tprint(\"cell size:         \", FunctionDefaults<6>::get_cell()(0,1) - FunctionDefaults<6>::get_cell()(0,0));\n\t\tprint(\"truncation mode:   \", FunctionDefaults<6>::get_truncate_mode());\n\t\tprint(\"tensor type:       \", FunctionDefaults<6>::get_tensor_type());\n\t\tprint(\"\");\n\t\tprint(\"facReduce          \", GenTensor<double>::fac_reduce());\n\t\tprint(\"max displacement   \", Displacements<6>::bmax_default());\n\t\tprint(\"apply randomize    \", FunctionDefaults<6>::get_apply_randomize());\n\t\tprint(\"world.size()       \", world.size());\n\t\tprint(\"no_orient          \", no_orient);\n\t\tprint(\"\");\n\t}\n\n//\tdostuff(world);\n\n    try {\n        static const size_t NDIM=3;\n        std::vector<Function<double,NDIM> > vf;\n        for (size_t i=0; i<filenames.size(); ++i) {\n            real_function_3d tmp;\n            try { // load a single function\n                load_function(world,tmp,filenames[i]);\n                vf.push_back(tmp);\n            } catch (...) { // load a vector of functions\n                std::vector<Function<double,NDIM> > tmp2;\n                load_function(world,tmp2,filenames[i]);\n                for (auto& t : tmp2) vf.push_back(t);\n            }\n        }\n\t\tplot_plane(world,vf,filenames[0]);\n\n\t\tdouble width = FunctionDefaults<3>::get_cell_min_width()/2.0 - 1.e-3;\n\t\tcoord_3d start(0.0); start[cc]=-width;\n\t\tcoord_3d end(0.0); end[cc]=width;\n\t\tplot_line((\"line_\"+c+\"_\"+filenames[0]).c_str(),10000,start,end,vf[0]);\n\n\t\t// plot the Gaussian cube file\n\t\tstd::vector<std::string> molecular_info=cubefile_header(\"input\",no_orient);\n\t\tstd::string filename=filenames[0]+\".cube\";\n\t\tplot_cubefile<3>(world,vf[0],filename,molecular_info);\n\n    } catch (...) {\n        try {\n            static const size_t NDIM=6;\n            std::vector<Function<double,NDIM> > vf(filenames.size());\n            for (size_t i=0; i<filenames.size(); ++i) load_function(world,vf[i],filenames[i]);\n            plot_plane(world,vf,filenames[0]);\n        } catch (...) {\n\n        }\n    }\n\n\n\n    world.gop.fence();\n    print(\"exiting tiny\");\n\n    return 0;\n}\n\n"
  },
  {
    "path": "src/examples/vnucso.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/*!\n\n  \\file vnucso.cc\n  \\brief Solves the Hartree-Fock equation for the 2-cosh potential with spin-orbit in Nuclear\n  Density Functional Theory without assumption of spatial symmetry.\n  \\ingroup examples\n\n  Points of interest\n\n  - Forming a Hamiltonian and a Fock matrix\n  - Forming and solving a generalized eigensystem problem using LAPACK\n  - Refining the representation of real and complex functions\n  - Vectors of functions and operators, inner-product, gaxpy\n  - Application of the Helmholtz bound-state Green function as vector of operators and functions\n  - Projection and change of representation of functions from multiwavelets of degree k to k+1\n\n  The source is <a href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/vnucso.cc>here</a>.\n\n\n  This is a more involved example than the Hydrogen and Helium.\n  This example couples the traditional diagonalization approach with that of the integral equation approach.\n  The details are described in:\n  G. I. Fann , J. Pei, R. J. Harrison1, J. Jia, J. Hill1 , M. Ou, W. Nazarewicz, W. A. Shelton\n  and N. Schunck, \"Fast multiresolution methods for density functional theory in nuclear physics,\"\n  Journal of Physics, 180 (2009) 012080.\n\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/vmra.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n// using namespace std;\n\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > real_functorT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double_complex,3> > complex_functorT;\ntypedef Function<double,3> real_functionT;\ntypedef Function<double_complex,3> complex_functionT;\ntypedef FunctionFactory<double,3> real_factoryT;\ntypedef FunctionFactory<double_complex,3> complex_factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef std::shared_ptr<operatorT> poperatorT;\n\nconst double L = 120.0;     // box is [-L,L]\nconst double zeta = 7.5;   // potential wells at +/-zeta\nconst double R1 = 2.0;     // potential parameter\nconst double R2 = 2.0;     // potential parameter\nconst double a1 = 1.0;     // potential parameter\nconst double a2 = 1.0;     // potential parameter\nconst double reduced = 0.04825964488415279478;\nconst double V1 = -50.0*reduced;   // potential parameter\nconst double V2 = -50.0*reduced;   // potential parameter\nconst double lambda_correct = 0.0026608048208104861/reduced; // SO potential parameter\n\n//static const double lambda_fudge = lambda_correct*100.0;\n\nstatic double lambda = lambda_correct;\nstatic const double fac1=exp(-R1/a1);\nstatic const double fac2=exp(-R2/a2);\n\nstruct Guess : FunctionFunctorInterface<double_complex,3> {\n    const double z;        // z-coordinate center\n    const double exponent; // exponent\n    const int nx, ny, nz;  // powers of x, y, z ... only 0 or 1 supported!\n\n    Guess(double z, double exponent, int nx, int ny, int nz)\n        : z(z), exponent(exponent), nx(nx), ny(ny), nz(nz) {}\n\n    double_complex operator()(const coordT& r) const {\n        double rsq = r[0]*r[0] + r[1]*r[1] + (r[2]-z)*(r[2]-z);\n        double psi = exp(-exponent*rsq);\n        if (nx) psi *= r[0];\n        if (ny) psi *= r[1];\n        if (nz) psi *= (r[2]-z);\n        return double_complex(psi,0.0);\n    }\n};\n\nstatic double V(const coordT& r)\n{\n    const double x=r[0], y=r[1], z=r[2];\n    const double zp=(z+zeta), zm = (z-zeta);\n    const double rp = sqrt(x*x + y*y + zp*zp);\n    const double rm = sqrt(x*x + y*y + zm*zm);\n\n    return V1/(1.0 + fac1*cosh(rp/a1)) + V2/(1.0 + fac2*cosh(rm/a2));\n}\n\nvoid moments(World& world, const std::vector<complex_functionT>& u, const std::vector<complex_functionT>& v) {\n  FunctionDefaults<3>::set_autorefine(true);\n  complex_functionT rho = complex_factoryT(world);\n  rho.compress();\n  reconstruct(world, u);\n  reconstruct(world, v);\n  for (unsigned int i=0; i<u.size(); i++) {\n    complex_functionT psisq = conj(u[i])*u[i] + conj(v[i])*v[i];\n    psisq.compress();\n    rho.gaxpy(1.0, psisq, 1.0);\n  }\n  double_complex moment1 = rho.trace();\n  complex_functionT rhosq = (rho*rho).scale(2.);\n  double_complex moment2a = rhosq.trace();\n  double_complex moment2b = inner(rho,rho);\n  double_complex moment3 = inner(rho,rhosq);\n  if (world.rank() == 0) {\n    print(\"  moment1\", moment1);\n    print(\"  moment2\", moment2a, moment2b);\n    print(\"  moment3\", moment3);\n  }\n  FunctionDefaults<3>::set_autorefine(false);\n}\n\nvoid gaxpy1(World& world,\n\t    const double_complex alpha,\n\t    std::vector<complex_functionT>& a,\n\t    const double_complex beta,\n\t    const std::vector<complex_functionT>& b,\n\t    bool fence=true)\n{\n  MADNESS_ASSERT(a.size() == b.size());\n\n  for (unsigned int i=0; i<a.size(); i++) {\n    a[i] = alpha*a[i] + beta*b[i];\n  }\n  if (fence) world.gop.fence();\n}\n\nstd::vector<poperatorT> make_bsh_operators(World& world, const Tensor<double>& evals, double tol)\n{\n    int n = evals.dim(0);\n    std::vector<poperatorT> ops(n);\n    for (int i=0; i<n; i++) {\n        double eps = evals(i);\n        if (eps > 0) eps = -0.05;\n        double lo = 0.1*tol; // heuristic\n        ops[i] = poperatorT(BSHOperatorPtr3D(world, sqrt(-eps), lo, tol));\n    }\n    return ops;\n}\n\nTensor<double_complex> hamiltonian_matrix(World& world,\n                                          const std::vector<complex_functionT>& u,\n                                          const std::vector<complex_functionT>& v,\n                                          const std::vector<complex_functionT>& Vu,\n                                          const std::vector<complex_functionT>& Vv,\n                                          const std::vector<complex_functionT> du[3],\n                                          const std::vector<complex_functionT> dv[3])\n{\n    reconstruct(world, u);\n    reconstruct(world, v);\n    int n = u.size();\n    Tensor<double_complex> r(n,n);\n\n    for (int axis=0; axis<3; axis++) {\n      r += matrix_inner(world, du[axis], du[axis], true);\n      r += matrix_inner(world, dv[axis], dv[axis], true);\n    }\n    return r + matrix_inner(world, u, Vu, true) + matrix_inner(world, v, Vv, true);\n}\n\nvoid apply_potential(World& world,\n                     const real_functionT& V0,\n                     const real_functionT& V0x,\n                     const real_functionT& V0y,\n                     const real_functionT& V0z,\n                     const std::vector<complex_functionT>& u,\n                     const std::vector<complex_functionT>& v,\n                     std::vector<complex_functionT>& Vu,\n                     std::vector<complex_functionT>& Vv,\n                     std::vector<complex_functionT> du[3],\n                     std::vector<complex_functionT> dv[3],\n                     bool doso)\n{\n    const double_complex lam(lambda,0.0);\n    const double_complex one(1.0,0.0);\n    const double_complex I(0.0,1.0);\n    const int x=0, y=1, z=2; // Attempt to make SO term more readable\n\n    reconstruct(world, u);\n    reconstruct(world, v);\n    V0.reconstruct();\n    V0x.reconstruct();\n    V0y.reconstruct();\n    V0z.reconstruct();\n\n    for (int axis=0; axis<3; axis++) {\n        complex_derivative_3d D = free_space_derivative<double_complex,3>(world, axis);\n        du[axis] = apply(world, D, u);\n        dv[axis] = apply(world, D, v);\n    }\n\n    Vu = mul(world, V0, u);\n    Vv = mul(world, V0, v );\n\n    if (!doso) return;\n\n    gaxpy(world, one, Vu, -I*lam, mul(world, V0y, du[x]));\n    gaxpy(world, one, Vu,  I*lam, mul(world, V0x, du[y]));\n    gaxpy(world, one, Vu,    lam, mul(world, V0z, dv[x]));\n    gaxpy(world, one, Vu, -I*lam, mul(world, V0z, dv[y]));\n    gaxpy(world, one, Vu,   -lam, mul(world, V0x, dv[z]));\n    gaxpy(world, one, Vu,  I*lam, mul(world, V0y, dv[z]));\n\n\n    gaxpy(world, one, Vv,  I*lam, mul(world, V0y, dv[x]));\n    gaxpy(world, one, Vv, -I*lam, mul(world, V0x, dv[y]));\n    gaxpy(world, one, Vv,   -lam, mul(world, V0z, du[x]));\n    gaxpy(world, one, Vv, -I*lam, mul(world, V0z, du[y]));\n    gaxpy(world, one, Vv,    lam, mul(world, V0x, du[z]));\n    gaxpy(world, one, Vv,  I*lam, mul(world, V0y, du[z]));\n\n}\n\nvoid normalize2(World& world, std::vector<complex_functionT>& u, std::vector<complex_functionT>& v) {\n  std::vector<double> unorm = norm2s(world,u);\n  std::vector<double> vnorm = norm2s(world,v);\n  std::vector<double> normu(u.size());\n\n  for (unsigned int i=0; i<u.size(); i++) {\n    normu[i] = sqrt(unorm[i]*unorm[i] + vnorm[i]*vnorm[i]);\n  }\n  for (unsigned int i=0; i<u.size(); i++) {\n    u[i].scale(double_complex(1.0/normu[i],0.));\n    v[i].scale(double_complex(1.0/normu[i],0.));\n  }\n}\n\n\n\nvoid doit(World& world) {\n    // We are not using time-reversal symmetry and hence are doing\n    // about 2x too much work.  With a little bit more complexity we\n    // could readily exploit it.  Time reversal symmetry implies that\n    // if (u,v) (two-component wave function) is an eigen function\n    // then (-v*, u*) is a degenerate solution.  We could use this\n    // symmetry by ensuring that after updating (and before\n    // diagonalization) the higher energy states are orthogonal to\n    // lower states and their time-reversed form.\n\n    if (world.rank() == 0) print(\"entered solver at time\", wall_time());\n    long k = 5;              // wavelet order\n    double thresh = 1e-3;    // precision for wave function\n    coordT zero;\n\n    zero[0]=0.; zero[1]=0.; zero[2]=0.;\n\n    // FunctionDefaults<3>::k = k;\n    //    FunctionDefaults<3>::thresh = thresh;\n    // FunctionDefaults<3>::refine = true;\n    // FunctionDefaults<3>::autorefine = false;\n    // FunctionDefaults<3>::initial_level = 2;\n    // FunctionDefaults<3>::truncate_mode = 1;\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_autorefine(false);\n    FunctionDefaults<3>::set_initial_level(2);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_cubic_cell(-L,L);\n\n    // for (int i=0; i<3; i++) {\n    // FunctionDefaults<3>::cell(i,0) = -L;\n    // FunctionDefaults<3>::cell(i,1) =  L;\n    // }\n    if (world.rank() == 0) print(\"Making guesses\");\n    std::vector<complex_functionT> u;\n    std::vector<complex_functionT> v;\n    std::vector<complex_functionT> w;\n\n    // Initial guess is as for SO-free but first with (u,0) and then (0,v)\n\n    // Could this get any more verbose?  This needs to be fixed.\n    u.push_back(complex_factoryT(world).functor(complex_functorT(new Guess( zeta, 0.15, 0, 0, 0))).nofence());  // s\n    v.push_back(complex_functionT(complex_factoryT(world)));\n\n    u.push_back(complex_factoryT(world).functor(complex_functorT(new Guess(-zeta, 0.15, 0, 0, 0))).nofence());  // s\n    v.push_back(complex_functionT(complex_factoryT(world)));\n\n    u.push_back(complex_factoryT(world).functor(complex_functorT(new Guess( zeta, 0.15, 0, 0, 1))).nofence());  // pz\n    v.push_back(complex_functionT(complex_factoryT(world)));\n\n    u.push_back(complex_factoryT(world).functor(complex_functorT(new Guess(-zeta, 0.15, 0, 0, 1))).nofence());  // pz\n    v.push_back(complex_functionT(complex_factoryT(world)));\n    u.push_back(complex_factoryT(world).functor(complex_functorT(new Guess( zeta, 0.15, 0, 1, 0))).nofence());  // py\n    v.push_back(complex_functionT(complex_factoryT(world)));\n    u.push_back(complex_factoryT(world).functor(complex_functorT(new Guess(-zeta, 0.15, 0, 1, 0))).nofence());  // py\n    v.push_back(complex_functionT(complex_factoryT(world)));\n    u.push_back(complex_factoryT(world).functor(complex_functorT(new Guess( zeta, 0.15, 1, 0, 0))).nofence());  // px\n    v.push_back(complex_functionT(complex_factoryT(world)));\n\n    u.push_back(complex_factoryT(world).functor(complex_functorT(new Guess(-zeta, 0.15, 1, 0, 0))).nofence());  // px\n    v.push_back(complex_functionT(complex_factoryT(world)));\n    u.push_back(complex_factoryT(world).functor(complex_functorT(new Guess( zeta, 0.03, 0, 0, 0))).nofence());  // s\n    v.push_back(complex_functionT(complex_factoryT(world)));\n    u.push_back(complex_factoryT(world).functor(complex_functorT(new Guess(-zeta, 0.03, 0, 0, 0))).nofence());  // s\n    v.push_back(complex_functionT(complex_factoryT(world)));\n    //\n    v.push_back(complex_factoryT(world).functor(complex_functorT(new Guess( zeta, 0.15, 0, 0, 0))).nofence());  // s\n    u.push_back(complex_functionT(complex_factoryT(world)));\n    v.push_back(complex_factoryT(world).functor(complex_functorT(new Guess(-zeta, 0.15, 0, 0, 0))).nofence());  // s\n    u.push_back(complex_functionT(complex_factoryT(world)));\n    v.push_back(complex_factoryT(world).functor(complex_functorT(new Guess( zeta, 0.15, 0, 0, 1))).nofence());  // pz\n    u.push_back(complex_functionT(complex_factoryT(world)));\n    v.push_back(complex_factoryT(world).functor(complex_functorT(new Guess(-zeta, 0.15, 0, 0, 1))).nofence());  // pz\n    u.push_back(complex_functionT(complex_factoryT(world)));\n    v.push_back(complex_factoryT(world).functor(complex_functorT(new Guess( zeta, 0.15, 0, 1, 0))).nofence());  // py\n    u.push_back(complex_functionT(complex_factoryT(world)));\n    v.push_back(complex_factoryT(world).functor(complex_functorT(new Guess(-zeta, 0.15, 0, 1, 0))).nofence());  // py\n    u.push_back(complex_functionT(complex_factoryT(world)));\n    v.push_back(complex_factoryT(world).functor(complex_functorT(new Guess( zeta, 0.15, 1, 0, 0))).nofence());  // px\n    u.push_back(complex_functionT(complex_factoryT(world)));\n    v.push_back(complex_factoryT(world).functor(complex_functorT(new Guess(-zeta, 0.15, 1, 0, 0))).nofence());  // px\n    u.push_back(complex_functionT(complex_factoryT(world)));\n    v.push_back(complex_factoryT(world).functor(complex_functorT(new Guess( zeta, 0.03, 0, 0, 0))).nofence());  // s\n    u.push_back(complex_functionT(complex_factoryT(world)));\n    v.push_back(complex_factoryT(world).functor(complex_functorT(new Guess(-zeta, 0.03, 0, 0, 0))).nofence());  // s\n    u.push_back(complex_functionT(complex_factoryT(world)));\n    world.gop.fence();\n    normalize2(world, u, v);\n\n\n    int nvec=u.size();\n    Tensor<double_complex> H1(nvec,nvec);\n    Tensor<double_complex> S1(nvec,nvec);\n\n    Tensor<double_complex> c;\n    Tensor<double> e, e1(nvec);\n    double maxerr;\n    real_functionT V0, V0x, V0y, V0z;\n    //double shift=0.;\n    bool doso = false; // turned on once converged to 1e-4\n    if (world.rank() == 0) {\n      print(\" u size \",  u.size(), \"v size \", v.size()); }\n\n    doitagain:\n\n    while (thresh > 0.9e-10) {\n      if (world.rank() == 0) {\n\tprint(\"\\n Solving with thresh\",thresh,\"k\",k,\"at time\", wall_time(), \"\\n\");\n            printf(\"  iter   root        energy         err      time\\n\");\n            printf(\"  ----   ----  ------------------ -------   ------\\n\");\n      }\n\n      V0 = real_factoryT(world).f(V).thresh(thresh*.1);\n      V0x = real_derivative_3d(world,0)(V0);\n      V0y = real_derivative_3d(world,1)(V0);\n      V0z = real_derivative_3d(world,2)(V0);\n\n      // If it does not converge in 10 iters it probably needs more precision.\n      for (int iter=0; iter<10; iter++) {\n\n\t// loadbalance(world, u, v, V0, V0x, V0y, V0z);\n\n\tstd::vector<complex_functionT> Vu, Vv, du[3], dv[3];\n\n\tapply_potential(world, V0, V0x, V0y, V0z, u, v, Vu, Vv, du, dv, doso);\n\tworld.gop.fence(); // free memory\n\n\tTensor<double_complex> H = hamiltonian_matrix(world, u, v, Vu, Vv, du, dv);\n\tTensor<double_complex> S = matrix_inner(world, u, u) + matrix_inner(world, v, v);\n\n\tif ( iter==0) {\n\t  for (int iii = 0; iii < nvec; iii++ )\n\t    for (int jjj = 0; jjj < nvec; jjj++ ){\n\t      H1(jjj,iii) = double_complex(0.5,0.0)*(H(iii,jjj)+H(jjj,iii));\n\t    }\n\t}\n\telse\n\t  for (int iii = 0; iii < nvec; iii++ )\n\t    for (int jjj = 0; jjj < nvec; jjj++ ){\n\t      H1(jjj,iii) = H(jjj,iii);\n\t    }\n\n\tif ( iter==0) {\n\t  for (int iii = 0; iii < nvec; iii++ )\n\t    for (int jjj = 0; jjj < nvec; jjj++ ){\n\t      S1(jjj,iii) = double_complex(0.5,0.0)*(S(iii,jjj)+S(jjj,iii));\n\t    }\n\t}\n\telse\n\t  for (int iii = 0; iii < nvec; iii++ )\n\t    for (int jjj = 0; jjj < nvec; jjj++ ){\n\t      S1(jjj,iii) = S(jjj,iii);\n\t    }\n\n\tworld.gop.fence(); // free memory\n\n\tsygv(H1, S1, 1, c, e);\n\n\tfor (int axis=0; axis<3; axis++) {\n\t  du[axis].clear();\n\t  dv[axis].clear();\n\t}\n\n\tworld.gop.fence(); // free memory\n\te = e(Slice(0,nvec-1));\n\tu  = transform(world, u,  c(_,Slice(0,nvec-1)));\n\tv  = transform(world, v,  c(_,Slice(0,nvec-1)));\n\n\tVu = transform(world, Vu, c(_,Slice(0,nvec-1)));\n\tVv = transform(world, Vv, c(_,Slice(0,nvec-1)));\n\tworld.gop.fence(); // free memory\n\n\ttruncate(world, u);\n\ttruncate(world, v);\n\ttruncate(world, Vu);\n\ttruncate(world, Vv);\n\tworld.gop.fence();\n\n\tnormalize2(world, u, v);\n\n\tworld.gop.fence(); // free memory\n\n\tfor (int iii = 0; iii < nvec; iii++ )\n\t  e1[iii] = e[iii]; // +shift;\n\n\n\tfor (int i=0; i<nvec; i++) {\n\t  Vu[i].refine();\n\t  Vv[i].refine();\n\t}\n\n\tworld.gop.fence();\n\tstd::vector<poperatorT> ops = make_bsh_operators(world, e1, thresh);\n\n\tstd::vector<complex_functionT> u_new = apply(world, ops, Vu);\n\tstd::vector<complex_functionT> v_new = apply(world, ops, Vv);\n\n\tnormalize2(world, u_new, v_new);\n\n\tVu.clear();\n\tVv.clear();\n\tworld.gop.fence();\n\n\tstd::vector<double> rnormu = norm2s(world,add(world, u, u_new));\n\tstd::vector<double> rnormv = norm2s(world,add(world, v, v_new));\n\tstd::vector<double> rnorm(nvec);\n\n\tfor (int i=0; i<nvec; i++)\n\t  rnorm[i] = sqrt(rnormu[i]*rnormu[i] + rnormv[i]*rnormv[i]);\n\tworld.gop.fence();\n\n\tmaxerr= 0.;\n\tfor (int i=0; i<nvec; i++) {\n\t  if (world.rank() == 0) printf(\"  %3d    %3d  %18.12f  %.1e  %7.1f\\n\",\n\t\t\t\t\titer, i, e[i]/reduced, rnorm[i], wall_time());\n\t  maxerr = std::max(maxerr,rnorm[i]);\n\t}\n\n\tu = u_new;\n\tv = v_new;\n\n\tu_new.clear();\n\tv_new.clear();\n\n\tif (maxerr < 1.e-3 && !doso) {\n\t  // We initially converged to a threshold of 1e-4 without SO\n\t  // and now we repeat the 1e-4 iteration with SO and continue\n\t  // with SO on.\n\t  if (world.rank() == 0) print(\"\\n Turning on the SO interaction \\n\");\n\t  doso = true;\n\t  goto doitagain;  // Gotta love it\n\t  break;\n\t}\n      }\n\n      moments(world, u, v);\n\n      thresh *= 1e-1;\n      k += 1;\n      FunctionDefaults<3>::set_k(k);\n      FunctionDefaults<3>::set_thresh(thresh);\n      reconstruct(world,u);\n      reconstruct(world,v);\n      for (unsigned int i=0; i<u.size(); i++) {\n\tu[i] = madness::project(u[i], k, thresh);\n\tv[i] = madness::project(v[i], k, thresh);\n      }\n      V0 = real_factoryT(world).f(V).thresh(thresh*.1);\n      V0x = real_derivative_3d(world,0)(V0);\n      V0y = real_derivative_3d(world,1)(V0);\n      V0z = real_derivative_3d(world,2)(V0);\n      world.gop.fence();\n\n    }\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n\n//     cpu_set_t mask;\n//     CPU_ZERO(&mask);\n//     CPU_SET(MPI::COMM_WORLD.Get_rank(), &mask);\n//     if( sched_setaffinity( 0, sizeof(mask), &mask ) == -1 ) {\n//         printf(\"WARNING: Could not set CPU Affinity, continuing...\\n\");\n//     }\n\n    try {\n        doit(world);\n    } catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    } catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    } catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    } catch (const char* s) {\n        print(s);\n        error(\"caught a string exception\");\n    } catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    } catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    } catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/vtk.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  This was written by Judith Hill.\n*/\n\n\n#include <madness/mra/mra.h>\n\nvoid doplotptk(World& world, int step, const functionT& psi, double Lplot, long numpt, const char* fname) {\n    double start = wall_time();\n    Tensor<double> cell(3,2);\n    std::vector<long> npt(3, numpt);\n    cell(_,0) = -Lplot;\n    cell(_,1) =  Lplot;\n    plotvtk(psi, fname, cell, npt, false);\n    if (world.rank() == 0) print(\"plotting used\", wall_time()-start);\n}\n\ntemplate <typename T, int NDIM>\nvoid plotvtk(const Function<T,NDIM>& function,\n            const char* filename,\n            const Tensor<double>& cell,\n            const std::vector<long>& npt,\n            bool binary) {\n    PROFILE_FUNC;\n    MADNESS_ASSERT(NDIM<=6);\n\n    function.verify();\n    World& world = const_cast< Function<T,NDIM>& >(function).world();\n    FILE *f=0;\n    if (world.rank() == 0) {\n        f = fopen(filename, \"w\");\n        if (!f) MADNESS_EXCEPTION(\"plotvtk: failed to open the plot file\", 0);\n\n        double spacex = (cell(0,1) - cell(0,0))/(npt[0] - 1) ; \n        double spacey = (cell(1,1) - cell(1,0))/(npt[1] - 1) ; \n        double spacez = (cell(2,1) - cell(2,0))/(npt[2] - 1) ; \n  \n        fprintf(f, \"<VTKFile type=\\\"StructuredGrid\\\" version=\\\"0.1\\\" byte_order=\\\"LittleEndian\\\" compressor=\\\"vtkZLibDataCompressor\\\">\\n\") ;\n        fprintf(f, \"  <StructuredGrid WholeExtent=\\\"0 %ld 0 %ld 0 %ld\\\">\\n\",\n                       npt[0]-1, npt[1]-1, npt[2]-1) ;\n        fprintf(f, \"  <Piece Extent=\\\"0 %ld 0 %ld 0 %ld\\\">\\n\",\n                       npt[0]-1, npt[1]-1, npt[2]-1) ;\n        fprintf(f, \"      <PointData>\\n\") ;\n        fprintf(f, \"        <DataArray Name=\\\"data\\\" format=\\\"ascii\\\" type=\\\"Float32\\\" NumberOfComponents=\\\"1\\\">\\n\") ;\n\n        world.gop.fence();\n        Tensor<T> tmpr = function.eval_cube(cell, npt);\n            for (IndexIterator it(npt); it; ++it) {\n                fprintf (f, \"%.6e\\n\", tmpr(*it)) ;\n            }\n        fprintf(f, \"        </DataArray>\\n\") ;\n        fprintf(f, \"      </PointData>\\n\") ;\n\n        fprintf(f, \"      <Points>\\n\") ;\n        fprintf(f, \"        <DataArray NumberOfComponents=\\\"3\\\" type=\\\"Float32\\\" format=\\\"ascii\\\">\\n\") ;\n\n        double coordx = cell(0,0) ;\n        double coordy = cell(1,0) ;\n        double coordz = cell(2,0) ;\n\n        for (int i=0; i<npt[0]; i++)\n        {\n          coordy = cell(1,0) ;\n          for (int j=0; j<npt[1]; j++)\n          {\n            coordz = cell(2,0) ;\n            for (int k=0; k<npt[2]; k++)\n            {\n              fprintf(f, \"%f %f %f\\n\", coordx, coordy, coordz) ;\n              coordz = coordz + spacez ;\n            }\n            coordy = coordy + spacey ;\n          }\n          coordx = coordx + spacex ;\n        }\n        fprintf(f, \"        </DataArray>\\n\") ;\n        fprintf(f, \"      </Points>\\n\") ;\n\n        fprintf(f, \"      <CellData>\\n\") ;\n        fprintf(f, \"      </CellData>\\n\") ;\n        fprintf(f, \"    </Piece>\\n\") ;\n        fprintf(f, \"  </StructuredGrid>\\n\") ;\n        fprintf(f, \"</VTKFile>\\n\") ;\n        fclose(f);\n    }\n    world.gop.fence();\n}\n"
  },
  {
    "path": "src/examples/writecoeff.cc",
    "content": "#include <complex>\n#include <memory>\n#include <madness/mra/mra.h>\n#include <madness/world/worldmutex.h>\n\nusing namespace madness;\n\nstatic const size_t D = 2;\ntypedef Vector<double,D> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<std::complex<double>,D> > functorT;\ntypedef Function<std::complex<double>,D> cfunctionT;\ntypedef FunctionFactory<std::complex<double>,D> factoryT;\ntypedef SeparatedConvolution<std::complex<double>,D> operatorT;\n\nstatic const double R = 1.4;    // bond length\nstatic const double L = 32.0*R; // box size\nstatic const long k = 3;        // wavelet order\nstatic const double thresh = 1e-3; // precision\n\nstatic std::complex<double> f(const coordT& r)\n{\n    return std::complex<double>(0.0,2.0);\n}\n\ntemplate <typename T, size_t D>\nclass WriteCoeffImpl : public Mutex {\n    const int k;\n    std::ostream& out;\npublic:\n    WriteCoeffImpl(const int k, std::ostream& out)\n        : k(k)\n        , out(out)\n    {}\n\n    void operator()(const Key<D>& key, const Tensor< T >& t) const {\n        ScopedMutex obolus(*this);\n        out << key << \" \" << t << std::endl;\n    }\n};\n\ntemplate <typename T, size_t D>\nclass WriteCoeff {\n    std::shared_ptr<WriteCoeffImpl<T,D>> impl;\n\npublic:\n    WriteCoeff(const int k, std::ostream& out)\n        : impl(new WriteCoeffImpl<T,D>(k, out))\n    {}\n\n    void operator()(const Key<D>& key, const Tensor< T >& t) const {\n        (*impl)(key, t);\n    }\n};\n\n\n\nint main(int argc, char** argv)\n{\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<D>::set_k(k);\n    FunctionDefaults<D>::set_thresh(thresh);\n    FunctionDefaults<D>::set_refine(true);\n    FunctionDefaults<D>::set_initial_level(2);\n    FunctionDefaults<D>::set_truncate_mode(0);\n    FunctionDefaults<D>::set_cubic_cell(-L/2, L/2);\n\n    cfunctionT fun = factoryT(world).f(f);\n    fun.truncate();\n\n    cfunctionT sqrt_of_fun = copy(fun);\n    auto op = WriteCoeff<std::complex<double>,D>(k, std::cout);\n    fun.unaryop(op);\n    world.gop.fence();\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeff2.cc",
    "content": "#include <complex>\n#include <iomanip>\n#include <iostream>\n#include <madness/mra/mra.h>\n#include <memory>\n\nusing namespace madness;\n\nstatic const size_t D = 2;\ntypedef Vector<double, D> coordT;\ntypedef Key<D> keyT;\ntypedef double dataT;// was std::complex<double>\ntypedef std::shared_ptr<FunctionFunctorInterface<dataT, D>> functorT;\ntypedef Function<dataT, D> functionT;\ntypedef FunctionFactory<dataT, D> factoryT;\ntypedef SeparatedConvolution<dataT, D> operatorT;\n\nstatic const double L = 4.0;\nstatic const long k = 5;          // wavelet order\nstatic const double thresh = 1e-3;// precision\n\nstatic dataT f(const coordT &r) {\n    double R = r.normf();\n    return std::exp(-R * R);\n}\n\ntemplate<typename T, std::size_t NDIM>\nvoid write_function_coeffs(const Function<T, NDIM> &f, std::ostream &out, const Key<NDIM> &key) {\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    auto it = coeffs.find(key).get();\n    if (it == coeffs.end()) {\n        for (int i = 0; i < key.level(); ++i) out << \"  \";\n        out << key << \"  missing --> \" << coeffs.owner(key) << \"\\n\";\n    } else {\n        const auto &node = it->second;\n        if (node.has_coeff()) {\n            auto values = f.get_impl()->coeffs2values(key, node.coeff());\n            for (int i = 0; i < key.level(); ++i) out << \"  \";\n            out << key.level() << \" \";\n            for (int i = 0; i < NDIM; ++i) out << key.translation()[i] << \" \";\n            out << std::endl;\n            for (size_t i = 0; i < values.size(); i++) out << values.ptr()[i] << \" \";\n            out << std::endl;\n        }\n        if (node.has_children()) {\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) { write_function_coeffs<T, NDIM>(f, out, kit.key()); }\n        }\n    }\n}\n\ntemplate<typename T, std::size_t NDIM>\nsize_t count_leaf_nodes(const Function<T, NDIM> &f) {\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    size_t count = 0;\n    for (auto it = coeffs.begin(); it != coeffs.end(); ++it) {\n        const auto &key = it->first;\n        const auto &node = it->second;\n        if (node.has_coeff()) { count++; }\n    }\n    f.get_impl()->world.gop.sum(count);\n    return count;\n}\n\ntemplate<typename T, std::size_t NDIM>\nvoid write_function(const Function<T, NDIM> &f, std::ostream &out) {\n    f.reconstruct();\n    std::cout << \"NUMBER OF LEAF NODES: \" << count_leaf_nodes(f) << std::endl;\n\n    auto flags = out.flags();\n    auto precision = out.precision();\n    out << std::setprecision(17);\n    out << std::scientific;\n\n    if (f.get_impl()->world.rank() == 0) {\n        out << NDIM << std::endl;\n        const auto &cell = FunctionDefaults<NDIM>::get_cell();\n        for (int d = 0; d < NDIM; ++d) {\n            for (int i = 0; i < 2; ++i) out << cell(d, i) << \" \";\n            out << std::endl;\n        }\n        out << f.k() << std::endl;\n        out << count_leaf_nodes(f) << std::endl;\n\n        write_function_coeffs(f, out, Key<NDIM>(0));\n    }\n    f.get_impl()->world.gop.fence();\n\n    out << std::setprecision(precision);\n    out.setf(flags);\n}\n\ntemplate<typename T, std::size_t NDIM>\nvoid read_function_coeffs(Function<T, NDIM> &f, std::istream &in) {\n    auto &coeffs = f.get_impl()->get_coeffs();\n\n    while (true) {\n        Level n;\n        Vector<Translation, NDIM> l;\n        long dims[NDIM];\n        in >> n;\n        if (in.eof()) break;\n\n        for (int i = 0; i < NDIM; ++i) {\n            in >> l[i];\n            dims[i] = f.k();\n        }\n        Key<NDIM> key(n, l);\n\n        Tensor<T> values(NDIM, dims);\n        for (size_t i = 0; i < values.size(); i++) in >> values.ptr()[i];\n        auto t = f.get_impl()->values2coeffs(key, values);\n\n        // f.get_impl()->accumulate2(t, coeffs, key);\n        coeffs.task(key, &FunctionNode<T, NDIM>::accumulate2, t, coeffs, key);\n    }\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T, NDIM> read_function(World &world, std::istream &in) {\n    size_t ndim;\n    in >> ndim;\n    MADNESS_CHECK(ndim == NDIM);\n\n    Tensor<double> cell(NDIM, 2);\n    for (int d = 0; d < NDIM; ++d) {\n        for (int i = 0; i < 2; ++i) in >> cell(d, i);\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n\n    int k;\n    in >> k;\n    FunctionFactory<T, NDIM> factory(world);\n    Function<T, NDIM> f(factory.k(k).empty());\n    world.gop.fence();\n\n    read_function_coeffs(f, in);\n\n    f.verify_tree();\n\n    return f;\n}\n\nvoid test(World &world) {\n    functionT fun = factoryT(world).f(f);\n    fun.truncate();\n\n    {\n        double norm = fun.norm2();\n        if (world.rank() == 0) std::cout << \"norm = \" << norm << std::endl;\n        std::ofstream out(\"fun.dat\", std::ios::out);\n        write_function(fun, out);\n        out.close();\n        // fun.print_tree();\n    }\n\n    {\n        std::ifstream in(\"fun.dat\", std::ios::in);\n        functionT fun2 = read_function<dataT, D>(world, in);\n        double norm = fun2.norm2();\n        if (world.rank() == 0) std::cout << \"norm = \" << norm << std::endl;\n        // write_function(fun2,std::cout);\n        // fun2.print_tree();\n        double err = (fun - fun2).norm2();\n        if (world.rank() == 0) std::cout << \"error = \" << err << std::endl;\n    }\n}\n\nint main(int argc, char **argv) {\n    World &world = initialize(argc, argv);\n    startup(world, argc, argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<D>::set_k(k);\n    FunctionDefaults<D>::set_thresh(thresh);\n    FunctionDefaults<D>::set_refine(true);\n    FunctionDefaults<D>::set_initial_level(2);\n    FunctionDefaults<D>::set_truncate_mode(0);\n    FunctionDefaults<D>::set_cubic_cell(-L / 2, L / 2);\n\n    test(world);\n\n    world.gop.fence();\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/CMakeLists.txt",
    "content": "# src/examples\n\nset(EXAMPLE_SOURCES\n    writecoeff writecoeff2 writecoeff3 writecoeff_json h2_write h2_write_json h2_write_json_2 writecoeff_hdf5)\n\n# Create executables for example applications\nforeach(example ${EXAMPLE_SOURCES})\n  add_mad_executable(${example} ${example}.cc \"MADchem\")\n  add_dependencies(numerical-examples-madness ${example})\nendforeach()\n"
  },
  {
    "path": "src/examples/writecoeffs/FunctionIO.h",
    "content": "#include \"ccpairfunction.h\"\n#include \"funcdefaults.h\"\n#include <iostream>\n#include <madness/mra/mra.h>\n\nusing namespace madness;\n\nconstexpr int simple_pow(int a, int b) {\n  if (b == 0) {\n    return 1;\n  } else {\n    int result = 1;\n    for (int i = 0; i < b; i++) {\n      result *= a;\n    }\n    return result;\n  }\n}\n\ntemplate <typename T, std::size_t NDIM> class FunctionIO {\n\nprivate:\n  long k = FunctionDefaults<NDIM>::get_k();\n  long ndims = NDIM;\n  long npts_per_box = simple_pow(k, ndims);\n\npublic:\n  static size_t count_leaf_nodes(const Function<T, NDIM> &f) {\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    size_t count = 0;\n    for (auto it = coeffs.begin(); it != coeffs.end(); ++it) {\n      // const auto &key = it->first;\n      const auto &node = it->second;\n      if (node.has_coeff()) {\n        count++;\n      }\n    }\n    f.get_impl()->world.gop.sum(count);\n    return count;\n  }\n  static void write_function_coeffs(const Function<T, NDIM> &f,\n                                    std::ostream &out, const Key<NDIM> &key) {\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    auto it = coeffs.find(key).get();\n    if (it == coeffs.end()) {\n      for (int i = 0; i < key.level(); ++i)\n        out << \"  \";\n      out << key << \"  missing --> \" << coeffs.owner(key) << \"\\n\";\n    } else {\n      const auto &node = it->second;\n      if (node.has_coeff()) {\n        auto values = f.get_impl()->coeffs2values(key, node.coeff());\n        for (int i = 0; i < key.level(); ++i)\n          out << \"  \";\n        out << key.level() << \" \";\n        for (size_t i = 0; i < NDIM; ++i)\n          out << key.translation()[i] << \" \";\n        out << std::endl;\n#if HAVE_GENTENSOR\n        MADNESS_EXCEPTION(\"FunctionIO not implemented for GenTensor\", 0);\n#else\n        for (size_t i = 0; i < (size_t)values.size(); i++)\n          out << values.ptr()[i] << \" \";\n#endif\n\n        out << std::endl;\n      }\n      if (node.has_children()) {\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n          write_function_coeffs(f, out, kit.key());\n        }\n      }\n    }\n  }\n  static void write_function(const Function<T, NDIM> &f, std::ostream &out) {\n    f.reconstruct();\n    std::cout << \"NUMBER OF LEAF NODES: \" << count_leaf_nodes(f) << std::endl;\n\n    auto flags = out.flags();\n    auto precision = out.precision();\n    out << std::setprecision(17);\n    out << std::scientific;\n\n    if (f.get_impl()->world.rank() == 0) {\n      out << NDIM << std::endl;\n      const auto &cell = FunctionDefaults<NDIM>::get_cell();\n      for (size_t d = 0; d < NDIM; ++d) {\n        for (int i = 0; i < 2; ++i)\n          out << cell(d, i) << \" \";\n        out << std::endl;\n      }\n      out << f.k() << std::endl;\n      out << count_leaf_nodes(f) << std::endl;\n\n      write_function_coeffs(f, out, Key<NDIM>(0));\n    }\n    f.get_impl()->world.gop.fence();\n\n    out << std::setprecision(precision);\n    out.setf(flags);\n  }\n\n  static void read_function_coeffs(Function<T, NDIM> &f, std::istream &in,\n                                   int num_leaf_nodes) {\n    auto &coeffs = f.get_impl()->get_coeffs();\n\n    for (int i = 0; i < num_leaf_nodes; i++) {\n      Level n;\n      Vector<Translation, NDIM> l;\n      long dims[NDIM];\n      in >> n;\n      if (in.eof())\n        break;\n\n      for (size_t i = 0; i < NDIM; ++i) {\n        in >> l[i];\n        dims[i] = f.k();\n      }\n      Key<NDIM> key(n, l);\n\n      Tensor<T> values(NDIM, dims);\n      for (size_t i = 0; i < (size_t)values.size(); i++)\n        in >> values.ptr()[i];\n      auto t = f.get_impl()->values2coeffs(key, values);\n\n      // f.get_impl()->accumulate2(t, coeffs, key);\n      coeffs.task(key, &FunctionNode<T, NDIM>::accumulate2, t, coeffs, key);\n    }\n  }\n\n  static Function<T, NDIM> read_function(World &world, std::istream &in) {\n    size_t ndim;\n    in >> ndim;\n    MADNESS_CHECK(ndim == NDIM);\n\n    Tensor<double> cell(NDIM, 2);\n    for (size_t d = 0; d < NDIM; ++d) {\n      for (int i = 0; i < 2; ++i)\n        in >> cell(d, i);\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n\n    int k;\n    in >> k;\n    int num_leaf_nodes;\n    in >> num_leaf_nodes;\n    FunctionFactory<T, NDIM> factory(world);\n    Function<T, NDIM> f(factory.k(k).empty());\n    world.gop.fence();\n\n    read_function_coeffs(f, in, num_leaf_nodes);\n\n    f.verify_tree();\n\n    return f;\n  }\n};\ntemplate <typename T, std::size_t NDIM> struct FunctionIOData {\n\n  long k = 0;\n  long npts_per_box = 0;\n  std::size_t ndim = NDIM;\n  std::array<std::pair<double, double>, NDIM> cell;\n  long num_leaf_nodes{};\n  std::vector<std::array<long, NDIM + 1>> nl;\n  std::vector<std::vector<double>> values;\n\n  FunctionIOData() = default;\n\n  explicit FunctionIOData(const Function<T, NDIM> &f) {\n\n    npts_per_box = simple_pow(f.k(), NDIM);\n\n    f.reconstruct();\n    if (f.get_impl()->world.rank() == 0) {\n      num_leaf_nodes = FunctionIO<T, NDIM>::count_leaf_nodes(f);\n      ndim = NDIM;\n      k = f.k();\n      const auto &cell_world = FunctionDefaults<NDIM>::get_cell();\n      for (size_t d = 0; d < NDIM; ++d) {\n        cell[d].first = cell_world(d, 0);\n        cell[d].second = cell_world(d, 1);\n      }\n\n      initialize_func_coeffs(f, Key<NDIM>(0));\n    }\n    f.get_impl()->world.gop.fence();\n  }\n\n  void initialize_func_coeffs(const Function<T, NDIM> &f,\n                              const Key<NDIM> &key) {\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    auto it = coeffs.find(key).get();\n    if (it == coeffs.end()) {\n      for (int i = 0; i < key.level(); ++i)\n        std::cout << \"  \";\n      std::cout << key << \"  missing --> \" << coeffs.owner(key) << \"\\n\";\n    } else {\n      const auto &node = it->second;\n      if (node.has_coeff()) {\n        auto node_values = f.get_impl()->coeffs2values(key, node.coeff());\n        std::array<long, NDIM + 1> key_i;\n        key_i[0] = key.level();\n        for (size_t i = 0; i < NDIM; ++i)\n          key_i[i + 1] = key.translation()[i];\n        nl.push_back(key_i);\n        std::vector<double> values_i(npts_per_box);\n#if HAVE_GENTENSOR\n        MADNESS_EXCEPTION(\"FunctionIO coeffs not implemented for GenTensor\", 0);\n#else\n        std::copy(node_values.ptr(), node_values.ptr() + npts_per_box,\n                  values_i.begin());\n#endif\n        values.push_back(values_i);\n      }\n      if (node.has_children()) {\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n          initialize_func_coeffs(f, kit.key());\n        }\n      }\n    }\n  }\n  void set_function_coeffs(Function<T, NDIM> &f, int num_leaf_nodes) {\n    auto &coeffs = f.get_impl()->get_coeffs();\n\n    for (int i = 0; i < num_leaf_nodes; i++) {\n      Vector<Translation, NDIM> l;\n      long dims[NDIM];\n\n      for (size_t i = 0; i < NDIM; ++i) {\n        dims[i] = f.k();\n      }\n\n      auto n = nl[i][0];\n      for (size_t j = 0; j < NDIM; ++j) {\n        l[j] = nl[i][j + 1];\n      }\n      Key<NDIM> key(n, l);\n\n      Tensor<T> values(NDIM, dims);\n      std::copy(this->values[i].begin(), this->values[i].end(), values.ptr());\n      auto t = f.get_impl()->values2coeffs(key, values);\n\n      // f.get_impl()->accumulate2(t, coeffs, key);\n      coeffs.task(key, &FunctionNode<T, NDIM>::accumulate2, t, coeffs, key);\n    }\n  }\n\n  Function<T, NDIM> create_function(World &world) {\n\n    size_t ndim = this->ndim;\n    MADNESS_CHECK(ndim == NDIM);\n    Tensor<double> cell_t(NDIM, 2);\n    for (size_t d = 0; d < NDIM; ++d) {\n      cell_t(d, 0) = cell[d].first;\n      cell_t(d, 1) = cell[d].second;\n    }\n\n    FunctionDefaults<NDIM>::set_cell(cell_t);\n\n    FunctionFactory<T, NDIM> factory(world);\n    Function<T, NDIM> f(factory.k(k).empty());\n    world.gop.fence();\n\n    set_function_coeffs(f, num_leaf_nodes);\n\n    f.verify_tree();\n\n    return f;\n  }\n};\n\ntemplate <typename T, std::size_t NDIM>\nvoid to_json(json &j, const FunctionIOData<T, NDIM> &p) {\n  j = json{{\"npts_per_box\", p.npts_per_box},\n           {\"k\", p.k},\n           {\"cell\", p.cell},\n           {\"num_leaf_nodes\", p.num_leaf_nodes},\n           {\"nl\", p.nl},\n           {\"ndim\", p.ndim},\n           {\"values\", p.values}};\n}\n\ntemplate <typename T, std::size_t NDIM>\nvoid from_json(const json &j, FunctionIOData<T, NDIM> &p) {\n  j.at(\"npts_per_box\").get_to(p.npts_per_box);\n  j.at(\"k\").get_to(p.k);\n  j.at(\"cell\").get_to(p.cell);\n  j.at(\"num_leaf_nodes\").get_to(p.num_leaf_nodes);\n  j.at(\"nl\").get_to(p.nl);\n  j.at(\"values\").get_to(p.values);\n  j.at(\"ndim\").get_to(p.ndim);\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/FunctionIO2.h",
    "content": "#include \"ccpairfunction.h\"\n#include \"funcdefaults.h\"\n#include \"madness/mra/function_common_data.h\"\n#include <iostream>\n#include <madness/mra/mra.h>\n\nusing namespace madness;\n\nconstexpr int simple_pow(int a, int b) {\n  if (b == 0) {\n    return 1;\n  } else {\n    int result = 1;\n    for (int i = 0; i < b; i++) {\n      result *= a;\n    }\n    return result;\n  }\n}\n\ntemplate <typename T, std::size_t NDIM> class FunctionIO {\n\nprivate:\n  long k = FunctionDefaults<NDIM>::get_k();\n  long ndims = NDIM;\n  long npts_per_box = simple_pow(k, ndims);\n\npublic:\n  static size_t count_leaf_nodes(const Function<T, NDIM> &f) {\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    size_t count = 0;\n    for (auto it = coeffs.begin(); it != coeffs.end(); ++it) {\n      // const auto &key = it->first;\n      const auto &node = it->second;\n      if (node.has_coeff()) {\n        count++;\n      }\n    }\n    f.get_impl()->world.gop.sum(count);\n    return count;\n  }\n  static void write_function_coeffs(const Function<T, NDIM> &f,\n                                    std::ostream &out, const Key<NDIM> &key) {\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    auto it = coeffs.find(key).get();\n    if (it == coeffs.end()) {\n      for (int i = 0; i < key.level(); ++i)\n        out << \"  \";\n      out << key << \"  missing --> \" << coeffs.owner(key) << \"\\n\";\n    } else {\n      const auto &node = it->second;\n      if (node.has_coeff()) {\n        auto values = f.get_impl()->coeffs2values(key, node.coeff());\n        for (int i = 0; i < key.level(); ++i)\n          out << \"  \";\n        out << key.level() << \" \";\n        for (size_t i = 0; i < NDIM; ++i)\n          out << key.translation()[i] << \" \";\n        out << std::endl;\n#if HAVE_GENTENSOR\n        MADNESS_EXCEPTION(\"FunctionIO not implemented for GenTensor\", 0);\n#else\n        for (size_t i = 0; i < (size_t)values.size(); i++)\n          out << values.ptr()[i] << \" \";\n#endif\n        out << std::endl;\n      }\n      if (node.has_children()) {\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n          write_function_coeffs(f, out, kit.key());\n        }\n      }\n    }\n  }\n  static void write_function(const Function<T, NDIM> &f, std::ostream &out) {\n    f.reconstruct();\n    std::cout << \"NUMBER OF LEAF NODES: \" << count_leaf_nodes(f) << std::endl;\n\n    auto flags = out.flags();\n    auto precision = out.precision();\n    out << std::setprecision(17);\n    out << std::scientific;\n\n    if (f.get_impl()->world.rank() == 0) {\n      out << NDIM << std::endl;\n      const auto &cell = FunctionDefaults<NDIM>::get_cell();\n      for (size_t d = 0; d < NDIM; ++d) {\n        for (int i = 0; i < 2; ++i)\n          out << cell(d, i) << \" \";\n        out << std::endl;\n      }\n      out << f.k() << std::endl;\n      out << count_leaf_nodes(f) << std::endl;\n\n      write_function_coeffs(f, out, Key<NDIM>(0));\n    }\n    f.get_impl()->world.gop.fence();\n\n    out << std::setprecision(precision);\n    out.setf(flags);\n  }\n\n  static void read_function_coeffs(Function<T, NDIM> &f, std::istream &in,\n                                   int num_leaf_nodes) {\n    auto &coeffs = f.get_impl()->get_coeffs();\n\n    for (int i = 0; i < num_leaf_nodes; i++) {\n      Level n;\n      Vector<Translation, NDIM> l;\n      long dims[NDIM];\n      in >> n;\n      if (in.eof())\n        break;\n\n      for (int i = 0; i < NDIM; ++i) {\n        in >> l[i];\n        dims[i] = f.k();\n      }\n      Key<NDIM> key(n, l);\n\n      Tensor<T> values(NDIM, dims);\n      for (size_t i = 0; i < values.size(); i++)\n        in >> values.ptr()[i];\n      auto t = f.get_impl()->values2coeffs(key, values);\n\n      // f.get_impl()->accumulate2(t, coeffs, key);\n      coeffs.task(key, &FunctionNode<T, NDIM>::accumulate2, t, coeffs, key);\n    }\n  }\n\n  static Function<T, NDIM> read_function(World &world, std::istream &in) {\n    size_t ndim;\n    in >> ndim;\n    MADNESS_CHECK(ndim == NDIM);\n\n    Tensor<double> cell(NDIM, 2);\n    for (int d = 0; d < NDIM; ++d) {\n      for (int i = 0; i < 2; ++i)\n        in >> cell(d, i);\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n\n    int k;\n    in >> k;\n    int num_leaf_nodes;\n    in >> num_leaf_nodes;\n    FunctionFactory<T, NDIM> factory(world);\n    Function<T, NDIM> f(factory.k(k).empty());\n    world.gop.fence();\n\n    read_function_coeffs(f, in, num_leaf_nodes);\n\n    f.verify_tree();\n\n    return f;\n  }\n};\n\ntemplate <typename T, std::size_t NDIM> struct FunctionIOData {\n\n  typedef Vector<double, NDIM> coordT; ///< Type of vector holding coordinates\n  typedef int Level;\n\n  long k = 0;\n  long npts_per_box = 0;\n  std::size_t ndim = NDIM;\n  std::array<std::pair<double, double>, NDIM> cell;\n  long num_leaf_nodes{};\n  std::vector<std::array<long, NDIM + 1>> nl;\n  std::vector<std::vector<double>> values;\n  std::vector<std::vector<coordT>> coords;\n\n  FunctionIOData() = default;\n\n  explicit FunctionIOData(const Function<T, NDIM> &f) {\n\n    npts_per_box = simple_pow(f.k(), NDIM);\n\n    f.reconstruct();\n    if (f.get_impl()->world.rank() == 0) {\n      num_leaf_nodes = FunctionIO<T, NDIM>::count_leaf_nodes(f);\n      ndim = NDIM;\n      k = f.k();\n      const auto &cell_world = FunctionDefaults<NDIM>::get_cell();\n      for (size_t d = 0; d < NDIM; ++d) {\n        cell[d].first = cell_world(d, 0);\n        cell[d].second = cell_world(d, 1);\n      }\n\n      initialize_func_coeffs(f, Key<NDIM>(0));\n    }\n    f.get_impl()->world.gop.fence();\n  }\n\n  // write function coordinates for dim 1, 2, 3\n  void initialize_func_coeffs(const Function<T, NDIM> &f,\n                              const Key<NDIM> &key) {\n    const Tensor<double> &cell_width = FunctionDefaults<NDIM>::get_cell_width();\n    const Tensor<double> &cell = FunctionDefaults<NDIM>::get_cell();\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    auto it = coeffs.find(key).get();\n    if (it == coeffs.end()) {\n      for (int i = 0; i < key.level(); ++i)\n        std::cout << \"  \";\n      std::cout << key << \"  missing --> \" << coeffs.owner(key) << \"\\n\";\n    } else {\n\n      auto cdata = f.get_impl()->get_cdata();\n\n      const Tensor<double> qx = cdata.quad_x;\n      // const size_t npt = qx.dim(0);\n      const auto &node = it->second;\n      if (node.has_coeff()) {\n\n        const Level n = key.level();\n        const double h = std::pow(0.5, double(n));\n        coordT c; // will hold the point in user coordinates\n\n        auto node_values = f.get_impl()->coeffs2values(key, node.coeff());\n        std::array<long, NDIM + 1> key_i;\n        key_i[0] = key.level();\n        auto l = key.translation();\n        for (size_t i = 0; i < NDIM; ++i)\n          key_i[i + 1] = key.translation()[i];\n\n        nl.push_back(key_i);\n        coords.push_back(std::vector<coordT>());\n\n        if (NDIM == 1) {\n          for (long i = 0; i < k; ++i) {\n            c[0] = cell(0, 0) + h * cell_width[0] * (l[0] + qx(i)); // x\n            coords.back().push_back(c);\n          }\n        } else if (NDIM == 2) {\n          for (long i = 0; i < k; ++i) {\n            c[0] = cell(0, 0) + h * cell_width[0] * (l[0] + qx(i)); // x\n            for (long j = 0; j < k; ++j) {\n              c[1] = cell(1, 0) + h * cell_width[1] * (l[1] + qx(j)); // y\n              coords.back().push_back(c);\n            }\n          }\n        } else if (NDIM == 3) {\n          for (long j = 0; j < k; ++j) {\n            c[1] = cell(1, 0) + h * cell_width[1] * (l[1] + qx(j)); // y\n            for (long m = 0; m < k; ++m) {\n              c[2] = cell(2, 0) + h * cell_width[2] * (l[2] + qx(m)); // z\n              coords.back().push_back(c);\n            }\n          }\n        } else {\n          MADNESS_EXCEPTION(\"only NDIM <= 3 in print_grid\", 0);\n        }\n\n        std::vector<double> values_i(npts_per_box);\n#if HAVE_GENTENSOR\n        MADNESS_EXCEPTION(\"FunctionIO not implemented for GenTensor\", 0);\n#else\n        std::copy(node_values.ptr(), node_values.ptr() + npts_per_box,\n                  values_i.begin());\n#endif\n        values.push_back(values_i);\n      }\n      if (node.has_children()) {\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n          initialize_func_coeffs(f, kit.key());\n        }\n      }\n    }\n  }\n  void set_function_coeffs(Function<T, NDIM> &f, int num_leaf_nodes) {\n    auto &coeffs = f.get_impl()->get_coeffs();\n\n    for (int i = 0; i < num_leaf_nodes; i++) {\n      Vector<Translation, NDIM> l;\n      long dims[NDIM];\n\n      for (size_t i = 0; i < NDIM; ++i) {\n        dims[i] = f.k();\n      }\n\n      auto n = nl[i][0];\n      for (size_t j = 0; j < NDIM; ++j) {\n        l[j] = nl[i][j + 1];\n      }\n      Key<NDIM> key(n, l);\n\n      Tensor<T> values(NDIM, dims);\n      std::copy(this->values[i].begin(), this->values[i].end(), values.ptr());\n      auto t = f.get_impl()->values2coeffs(key, values);\n\n      // f.get_impl()->accumulate2(t, coeffs, key);\n      coeffs.task(key, &FunctionNode<T, NDIM>::accumulate2, t, coeffs, key);\n    }\n  }\n\n  Function<T, NDIM> create_function(World &world) {\n\n    size_t ndim = this->ndim;\n    MADNESS_CHECK(ndim == NDIM);\n    Tensor<double> cell_t(NDIM, 2);\n    for (size_t d = 0; d < NDIM; ++d) {\n      cell_t(d, 0) = cell[d].first;\n      cell_t(d, 1) = cell[d].second;\n    }\n\n    FunctionDefaults<NDIM>::set_cell(cell_t);\n\n    FunctionFactory<T, NDIM> factory(world);\n    Function<T, NDIM> f(factory.k(k).empty());\n    world.gop.fence();\n\n    set_function_coeffs(f, num_leaf_nodes);\n\n    f.verify_tree();\n\n    return f;\n  }\n};\n\ntemplate <typename T, std::size_t NDIM>\nvoid to_json(json &j, const FunctionIOData<T, NDIM> &p) {\n  j = json{{\"npts_per_box\", p.npts_per_box},\n           {\"num_leaf_nodes\", p.num_leaf_nodes},\n           {\"k\", p.k},\n           {\"cell\", p.cell},\n           {\"nl\", p.nl},\n           {\"ndim\", p.ndim},\n           {\"coords\", p.coords},\n           {\"values\", p.values}};\n}\n\ntemplate <typename T, std::size_t NDIM>\nvoid from_json(const json &j, FunctionIOData<T, NDIM> &p) {\n  j.at(\"npts_per_box\").get_to(p.npts_per_box);\n  j.at(\"k\").get_to(p.k);\n  j.at(\"cell\").get_to(p.cell);\n  j.at(\"num_leaf_nodes\").get_to(p.num_leaf_nodes);\n  j.at(\"nl\").get_to(p.nl);\n  j.at(\"values\").get_to(p.values);\n  j.at(\"ndim\").get_to(p.ndim);\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/FunctionIOHDF5.h",
    "content": "#include \"ccpairfunction.h\"\n#include \"funcdefaults.h\"\n#include \"madness/mra/function_common_data.h\"\n#include <iostream>\n#include <madness/mra/mra.h>\n#include <h5cpp/h5cpp.hpp>\n\nusing namespace madness;\n\nconstexpr int simple_pow(int a, int b) {\n  if (b == 0) {\n    return 1;\n  } else {\n    int result = 1;\n    for (int i = 0; i < b; i++) {\n      result *= a;\n    }\n    return result;\n  }\n}\n\ntemplate <typename T, std::size_t NDIM> class FunctionIO {\n\nprivate:\n  long k = FunctionDefaults<NDIM>::get_k();\n  long ndims = NDIM;\n  long npts_per_box = simple_pow(k, ndims);\n\npublic:\n  static size_t count_leaf_nodes(const Function<T, NDIM> &f) {\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    size_t count = 0;\n    for (auto it = coeffs.begin(); it != coeffs.end(); ++it) {\n      const auto &key = it->first;\n      const auto &node = it->second;\n      if (node.has_coeff()) {\n        count++;\n      }\n    }\n    f.get_impl()->world.gop.sum(count);\n    return count;\n  }\n  static void write_function_coeffs(const Function<T, NDIM> &f,\n                                    std::ostream &out, const Key<NDIM> &key) {\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    auto it = coeffs.find(key).get();\n    if (it == coeffs.end()) {\n      for (int i = 0; i < key.level(); ++i)\n        out << \"  \";\n      out << key << \"  missing --> \" << coeffs.owner(key) << \"\\n\";\n    } else {\n      const auto &node = it->second;\n      if (node.has_coeff()) {\n        auto values = f.get_impl()->coeffs2values(key, node.coeff());\n        for (int i = 0; i < key.level(); ++i)\n          out << \"  \";\n        out << key.level() << \" \";\n        for (int i = 0; i < NDIM; ++i)\n          out << key.translation()[i] << \" \";\n        out << std::endl;\n        for (size_t i = 0; i < values.size(); i++)\n          out << values.ptr()[i] << \" \";\n        out << std::endl;\n      }\n      if (node.has_children()) {\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n          write_function_coeffs(f, out, kit.key());\n        }\n      }\n    }\n  }\n  static void write_function(const Function<T, NDIM> &f, std::ostream &out) {\n    f.reconstruct();\n    std::cout << \"NUMBER OF LEAF NODES: \" << count_leaf_nodes(f) << std::endl;\n\n    auto flags = out.flags();\n    auto precision = out.precision();\n    out << std::setprecision(17);\n    out << std::scientific;\n\n    if (f.get_impl()->world.rank() == 0) {\n      out << NDIM << std::endl;\n      const auto &cell = FunctionDefaults<NDIM>::get_cell();\n      for (int d = 0; d < NDIM; ++d) {\n        for (int i = 0; i < 2; ++i)\n          out << cell(d, i) << \" \";\n        out << std::endl;\n      }\n      out << f.k() << std::endl;\n      out << count_leaf_nodes(f) << std::endl;\n\n      write_function_coeffs(f, out, Key<NDIM>(0));\n    }\n    f.get_impl()->world.gop.fence();\n\n    out << std::setprecision(precision);\n    out.setf(flags);\n  }\n\n  static void read_function_coeffs(Function<T, NDIM> &f, std::istream &in,\n                                   int num_leaf_nodes) {\n    auto &coeffs = f.get_impl()->get_coeffs();\n\n    for (int i = 0; i < num_leaf_nodes; i++) {\n      Level n;\n      Vector<Translation, NDIM> l;\n      long dims[NDIM];\n      in >> n;\n      if (in.eof())\n        break;\n\n      for (int i = 0; i < NDIM; ++i) {\n        in >> l[i];\n        dims[i] = f.k();\n      }\n      Key<NDIM> key(n, l);\n\n      Tensor<T> values(NDIM, dims);\n      for (size_t i = 0; i < values.size(); i++)\n        in >> values.ptr()[i];\n      auto t = f.get_impl()->values2coeffs(key, values);\n\n      // f.get_impl()->accumulate2(t, coeffs, key);\n      coeffs.task(key, &FunctionNode<T, NDIM>::accumulate2, t, coeffs, key);\n    }\n  }\n\n  static Function<T, NDIM> read_function(World &world, std::istream &in) {\n    size_t ndim;\n    in >> ndim;\n    MADNESS_CHECK(ndim == NDIM);\n\n    Tensor<double> cell(NDIM, 2);\n    for (int d = 0; d < NDIM; ++d) {\n      for (int i = 0; i < 2; ++i)\n        in >> cell(d, i);\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n\n    int k;\n    in >> k;\n    int num_leaf_nodes;\n    in >> num_leaf_nodes;\n    FunctionFactory<T, NDIM> factory(world);\n    Function<T, NDIM> f(factory.k(k).empty());\n    world.gop.fence();\n\n    read_function_coeffs(f, in, num_leaf_nodes);\n\n    f.verify_tree();\n\n    return f;\n  }\n};\n\ntemplate <typename T, std::size_t NDIM> struct FunctionIOData {\n\n  typedef Vector<double, NDIM> coordT; ///< Type of vector holding coordinates\n  typedef int Level;\n\n  long k = 0;\n  long npts_per_box = 0;\n  std::size_t ndim = NDIM;\n  std::array<std::pair<double, double>, NDIM> cell;\n  long num_leaf_nodes{};\n  std::vector<std::array<long, NDIM + 1>> nl;\n  std::vector<std::vector<double>> values;\n  std::vector<std::vector<coordT>> coords;\n\n  FunctionIOData() = default;\n\n  explicit FunctionIOData(const Function<T, NDIM> &f) {\n\n    npts_per_box = simple_pow(f.k(), NDIM);\n\n    f.reconstruct();\n    if (f.get_impl()->world.rank() == 0) {\n      num_leaf_nodes = FunctionIO<T, NDIM>::count_leaf_nodes(f);\n      ndim = NDIM;\n      k = f.k();\n      const auto &cell_world = FunctionDefaults<NDIM>::get_cell();\n      for (int d = 0; d < NDIM; ++d) {\n        cell[d].first = cell_world(d, 0);\n        cell[d].second = cell_world(d, 1);\n      }\n\n      initialize_func_coeffs(f, Key<NDIM>(0));\n    }\n    f.get_impl()->world.gop.fence();\n  }\n\n  void initialize_func_coeffs(const Function<T, NDIM> &f,\n                              const Key<NDIM> &key) {\n    const Tensor<double> &cell_width = FunctionDefaults<NDIM>::get_cell_width();\n    const Tensor<double> &cell = FunctionDefaults<NDIM>::get_cell();\n    const auto &coeffs = f.get_impl()->get_coeffs();\n    auto it = coeffs.find(key).get();\n    if (it == coeffs.end()) {\n      for (int i = 0; i < key.level(); ++i)\n        std::cout << \"  \";\n      std::cout << key << \"  missing --> \" << coeffs.owner(key) << \"\\n\";\n    } else {\n\n      auto cdata = f.get_impl()->get_cdata();\n\n      const Tensor<double> qx = cdata.quad_x;\n      const size_t npt = qx.dim(0);\n      const auto &node = it->second;\n      if (node.has_coeff()) {\n\n        const Level n = key.level();\n        const double h = std::pow(0.5, double(n));\n        coordT c; // will hold the point in user coordinates\n\n        auto node_values = f.get_impl()->coeffs2values(key, node.coeff());\n        std::array<long, NDIM + 1> key_i;\n        key_i[0] = key.level();\n        auto l = key.translation();\n        for (int i = 0; i < NDIM; ++i)\n          key_i[i + 1] = key.translation()[i];\n\n        nl.push_back(key_i);\n        coords.push_back(std::vector<coordT>());\n\n        if (NDIM == 3) {\n          for (size_t i = 0; i < k; ++i) {\n            c[0] = cell(0, 0) + h * cell_width[0] * (l[0] + qx(i)); // x\n            for (size_t j = 0; j < k; ++j) {\n              c[1] = cell(1, 0) + h * cell_width[1] * (l[1] + qx(j)); // y\n              for (size_t m = 0; m < k; ++m) {\n                c[2] = cell(2, 0) + h * cell_width[2] * (l[2] + qx(m)); // z\n                coords.back().push_back(c);\n              }\n            }\n          }\n        } else {\n          MADNESS_EXCEPTION(\"only NDIM=3 in print_grid\", 0);\n        }\n\n        std::vector<double> values_i(npts_per_box);\n        std::copy(node_values.ptr(), node_values.ptr() + npts_per_box,\n                  values_i.begin());\n        values.push_back(values_i);\n      }\n      if (node.has_children()) {\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n          initialize_func_coeffs(f, kit.key());\n        }\n      }\n    }\n  }\n  void set_function_coeffs(Function<T, NDIM> &f, int num_leaf_nodes) {\n    auto &coeffs = f.get_impl()->get_coeffs();\n\n    for (int i = 0; i < num_leaf_nodes; i++) {\n      Vector<Translation, NDIM> l;\n      long dims[NDIM];\n\n      for (int i = 0; i < NDIM; ++i) {\n        dims[i] = f.k();\n      }\n\n      auto n = nl[i][0];\n      for (int j = 0; j < NDIM; ++j) {\n        l[j] = nl[i][j + 1];\n      }\n      Key<NDIM> key(n, l);\n\n      Tensor<T> values(NDIM, dims);\n      std::copy(this->values[i].begin(), this->values[i].end(), values.ptr());\n      auto t = f.get_impl()->values2coeffs(key, values);\n\n      // f.get_impl()->accumulate2(t, coeffs, key);\n      coeffs.task(key, &FunctionNode<T, NDIM>::accumulate2, t, coeffs, key);\n    }\n  }\n\n  Function<T, NDIM> create_function(World &world) {\n\n    size_t ndim = this->ndim;\n    MADNESS_CHECK(ndim == NDIM);\n    Tensor<double> cell_t(NDIM, 2);\n    for (int d = 0; d < NDIM; ++d) {\n      cell_t(d, 0) = cell[d].first;\n      cell_t(d, 1) = cell[d].second;\n    }\n\n    FunctionDefaults<NDIM>::set_cell(cell_t);\n\n    FunctionFactory<T, NDIM> factory(world);\n    Function<T, NDIM> f(factory.k(k).empty());\n    world.gop.fence();\n\n    set_function_coeffs(f, num_leaf_nodes);\n\n    f.verify_tree();\n\n    return f;\n  }\n};\n\ntemplate <typename T, std::size_t NDIM>\nvoid to_json(json &j, const FunctionIOData<T, NDIM> &p) {\n  j = json{{\"npts_per_box\", p.npts_per_box},\n           {\"k\", p.k},\n           {\"cell\", p.cell},\n           {\"num_leaf_nodes\", p.num_leaf_nodes},\n           {\"coords\", p.coords},\n           {\"nl\", p.nl},\n           {\"ndim\", p.ndim},\n           {\"values\", p.values}};\n}\n\ntemplate <typename T, std::size_t NDIM>\nvoid from_json(const json &j, FunctionIOData<T, NDIM> &p) {\n  j.at(\"npts_per_box\").get_to(p.npts_per_box);\n  j.at(\"k\").get_to(p.k);\n  j.at(\"cell\").get_to(p.cell);\n  j.at(\"num_leaf_nodes\").get_to(p.num_leaf_nodes);\n  j.at(\"nl\").get_to(p.nl);\n  j.at(\"values\").get_to(p.values);\n  j.at(\"ndim\").get_to(p.ndim);\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/app.cpp",
    "content": "#include \"core.hpp\"\n\nvoid createFile() {\n  file::File File = file::create(\"SomeFile.hdf5\", file::AccessFlags::Truncate);\n  node::Group RootGroup = File.root();\n\n  std::vector<int> Data{1, 2, 3, 4, 5, 6};\n  Dimensions Shape{2, 3};\n  Dimensions MaxShape{dataspace::Simple::unlimited, 3};\n  Dimensions ChunkSize{512, 3};\n  dataspace::Simple Dataspace{Shape, MaxShape};\n  datatype::Datatype Datatype = datatype::create<std::int32_t>();\n  auto Dataset = node::ChunkedDataset(RootGroup, \"test_data\", Datatype,\n                                      Dataspace, ChunkSize);\n  Dataset.write(Data);\n}\n\nint main() { \n\n\n\n    auto file = create_file(\"test.h5\");\n\n\n\n\n\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/core.cpp",
    "content": "#include \"core.hpp\"\n\nhdf5::file::File create_file(const std::string &name) { \n   return hdf5::file::create(name);\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/core.hpp",
    "content": "#include <h5cpp/hdf5.hpp>\n#include <string>\n\nusing namespace hdf5;\n\nvoid createFile() {\n  file::File File = file::create(\"Tensor.hdf5\", file::AccessFlags::Truncate);\n  node::Group RootGroup = File.root();\n\n  std::vector<int> Data{1, 2, 3, 4, 5, 6};\n  Dimensions Shape{2, 3};\n  Dimensions MaxShape{dataspace::Simple::unlimited, 3};\n  Dimensions ChunkSize{512, 3};\n  dataspace::Simple Dataspace{Shape, MaxShape};\n  datatype::Datatype Datatype = datatype::create<std::int32_t>();\n  auto Dataset = node::ChunkedDataset(RootGroup, \"test_data\", Datatype,\n                                      Dataspace, ChunkSize);\n  Dataset.write(Data);\n}\n\nhdf5::file::File create_file(const std::string &filename);\n"
  },
  {
    "path": "src/examples/writecoeffs/h2_write.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file h2.cc\n  \\brief Solves the Hartree-Fock equations for the hydrogen molecule\n  \\defgroup examplesh2hf Hartree-Fock equations for the hydrogen molecule\n  \\ingroup examples\n\n  The source is <a\n  href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/h2.cc>h2.cc</a>.\n\n  The Hartree-Fock wave function is computed for the hydrogen molecule\n  in three dimensions without using symmetry.\n\n  Since all of the details except for the nuclear potential are the\n  same, please refer to the \\ref examplehehf helium atom HF example.\n\n*/\n#include <FunctionIO.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\nusing namespace madness;\n\nstatic const double R = 1.4;       // bond length\nstatic const double L = 64.0 * R;  // box size\nstatic const long k = 8;           // wavelet order\nstatic const double thresh = 1e-6; // precision\n\nstatic double guess(const coord_3d &r) {\n  const double x = r[0], y = r[1], z = r[2];\n  return (exp(-sqrt(x * x + y * y + (z - R / 2) * (z - R / 2) + 1e-8)) +\n          exp(-sqrt(x * x + y * y + (z + R / 2) * (z + R / 2) + 1e-8)));\n}\n\nstatic double V(const coord_3d &r) {\n  const double x = r[0], y = r[1], z = r[2];\n  return -1.0 / sqrt(x * x + y * y + (z - R / 2) * (z - R / 2) + 1e-8) +\n         -1.0 / sqrt(x * x + y * y + (z + R / 2) * (z + R / 2) + 1e-8);\n}\n\nvoid iterate(World &world, real_function_3d &V, real_function_3d &psi,\n             double &eps) {\n  real_convolution_3d op = BSHOperator3D(world, sqrt(-2 * eps), 0.001, 1e-6);\n  real_function_3d Vpsi = (V * psi);\n  Vpsi.scale(-2.0).truncate();\n  real_function_3d tmp = op(Vpsi).truncate();\n  double norm = tmp.norm2();\n  real_function_3d r = tmp - psi;\n  double rnorm = r.norm2();\n  double eps_new = eps - 0.5 * inner(Vpsi, r) / (norm * norm);\n  if (world.rank() == 0) {\n    print(\"norm=\", norm, \" eps=\", eps, \" err(psi)=\", rnorm,\n          \" err(eps)=\", eps_new - eps);\n  }\n  psi = tmp.scale(1.0 / norm);\n  eps = eps_new;\n}\n\nint main(int argc, char **argv) {\n  initialize(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n\n  startup(world, argc, argv);\n  std::cout.precision(6);\n\n  FunctionDefaults<3>::set_k(k);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_refine(true);\n  FunctionDefaults<3>::set_initial_level(5);\n  FunctionDefaults<3>::set_truncate_mode(1);\n  FunctionDefaults<3>::set_cubic_cell(-L / 2, L / 2);\n  // for (int i=0; i<3; i++) {\n  // FunctionDefaults<3>::cell(i,0) = -L/2;\n  // FunctionDefaults<3>::cell(i,1) =  L/2;\n  // }\n\n  real_function_3d Vnuc = real_factory_3d(world).f(V);\n  real_function_3d psi = real_factory_3d(world).f(guess);\n  psi.truncate();\n  psi.scale(1.0 / psi.norm2());\n\n  real_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n\n  double eps = -0.6;\n  for (int iter = 0; iter < 10; iter++) {\n    real_function_3d rho = square(psi).truncate();\n    real_function_3d potential = Vnuc + op(rho).truncate();\n    iterate(world, potential, psi, eps);\n  }\n\n  using fio = FunctionIO<double, 3>;\n  {\n    double norm = psi.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    std::ofstream out(\"h2_psi.dat\", std::ios::out);\n    fio::write_function(psi, out);\n    out.close();\n    // fun.print_tree();\n  }\n\n  std::ifstream in(\"h2_psi.dat\", std::ios::in);\n  real_function_3d psi2 = fio::read_function(world, in);\n  {\n    double norm = psi2.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    // write_function(fun2,std::cout);\n    // fun2.print_tree();\n    double err = (psi - psi2).norm2();\n    if (world.rank() == 0)\n      std::cout << \"error = \" << err << std::endl;\n  }\n\n  double kinetic_energy = 0.0;\n  for (int axis = 0; axis < 3; axis++) {\n    real_derivative_3d D = free_space_derivative<double, 3>(world, axis);\n    real_function_3d dpsi = D(psi);\n    kinetic_energy += inner(dpsi, dpsi);\n  }\n\n  auto print_energies = [&](real_function_3d &psi, const std::string &name) {\n    real_function_3d rho = square(psi);\n    double two_electron_energy = inner(op(rho), rho);\n    double nuclear_attraction_energy = 2.0 * inner(Vnuc, rho);\n    double nuclear_repulsion_energy = 1.0 / R;\n    double total_energy = kinetic_energy + two_electron_energy +\n                          nuclear_attraction_energy + nuclear_repulsion_energy;\n    double virial = (nuclear_attraction_energy + two_electron_energy +\n                     nuclear_repulsion_energy) /\n                    kinetic_energy;\n    if (world.rank() == 0) {\n      print(\"Energy for \", name);\n      print(\"            Kinetic energy \", kinetic_energy);\n      print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n      print(\"       Two-electron energy \", two_electron_energy);\n      print(\" Nuclear  repulsion energy \", nuclear_repulsion_energy);\n      print(\"              Total energy \", total_energy);\n      print(\"                    Virial \", virial);\n    }\n  };\n\n  print_energies(psi, \"psi\");\n  print_energies(psi2, \"psi read\");\n\n  world.gop.fence();\n\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/h2_write_json.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file h2.cc\n  \\brief Solves the Hartree-Fock equations for the hydrogen molecule\n  \\defgroup examplesh2hf Hartree-Fock equations for the hydrogen molecule\n  \\ingroup examples\n\n  The source is <a\n  href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/h2.cc>h2.cc</a>.\n\n  The Hartree-Fock wave function is computed for the hydrogen molecule\n  in three dimensions without using symmetry.\n\n  Since all of the details except for the nuclear potential are the\n  same, please refer to the \\ref examplehehf helium atom HF example.\n\n*/\n#include <FunctionIO.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\nusing namespace madness;\n\nstatic const double R = 1.4;       // bond length\nstatic const double L = 64.0 * R;  // box size\nstatic const long k = 8;           // wavelet order\nstatic const double thresh = 1e-6; // precision\n\nstatic double guess(const coord_3d &r) {\n  const double x = r[0], y = r[1], z = r[2];\n  return (exp(-sqrt(x * x + y * y + (z - R / 2) * (z - R / 2) + 1e-8)) +\n          exp(-sqrt(x * x + y * y + (z + R / 2) * (z + R / 2) + 1e-8)));\n}\n\nstatic double V(const coord_3d &r) {\n  const double x = r[0], y = r[1], z = r[2];\n  return -1.0 / sqrt(x * x + y * y + (z - R / 2) * (z - R / 2) + 1e-8) +\n         -1.0 / sqrt(x * x + y * y + (z + R / 2) * (z + R / 2) + 1e-8);\n}\n\nvoid iterate(World &world, real_function_3d &V, real_function_3d &psi,\n             double &eps) {\n  real_convolution_3d op = BSHOperator3D(world, sqrt(-2 * eps), 0.001, 1e-6);\n  real_function_3d Vpsi = (V * psi);\n  Vpsi.scale(-2.0).truncate();\n  real_function_3d tmp = op(Vpsi).truncate();\n  double norm = tmp.norm2();\n  real_function_3d r = tmp - psi;\n  double rnorm = r.norm2();\n  double eps_new = eps - 0.5 * inner(Vpsi, r) / (norm * norm);\n  if (world.rank() == 0) {\n    print(\"norm=\", norm, \" eps=\", eps, \" err(psi)=\", rnorm,\n          \" err(eps)=\", eps_new - eps);\n  }\n  psi = tmp.scale(1.0 / norm);\n  eps = eps_new;\n}\n\nint main(int argc, char **argv) {\n  initialize(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n\n  startup(world, argc, argv);\n  std::cout.precision(6);\n\n  FunctionDefaults<3>::set_k(k);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_refine(true);\n  FunctionDefaults<3>::set_initial_level(5);\n  FunctionDefaults<3>::set_truncate_mode(1);\n  FunctionDefaults<3>::set_cubic_cell(-L / 2, L / 2);\n  // for (int i=0; i<3; i++) {\n  // FunctionDefaults<3>::cell(i,0) = -L/2;\n  // FunctionDefaults<3>::cell(i,1) =  L/2;\n  // }\n\n  real_function_3d Vnuc = real_factory_3d(world).f(V);\n  real_function_3d psi = real_factory_3d(world).f(guess);\n  psi.truncate();\n  psi.scale(1.0 / psi.norm2());\n\n  real_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n\n  double eps = -0.6;\n  for (int iter = 0; iter < 10; iter++) {\n    real_function_3d rho = square(psi).truncate();\n    real_function_3d potential = Vnuc + op(rho).truncate();\n    iterate(world, potential, psi, eps);\n  }\n\n  //using fio = FunctionIO<double, 3>;\n  {\n    double norm = psi.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    std::ofstream out(\"h2_psi.json\", std::ios::out);\n\n    json j_psi;\n    to_json(j_psi, FunctionIOData<double, 3>(psi));\n    out << j_psi.dump(2);\n    out.close();\n    // fun.print_tree();\n  }\n\n  std::ifstream in(\"h2_psi.json\", std::ios::in);\n  json j_psi_read;\n  in >> j_psi_read;\n  auto psi_data = j_psi_read.get<FunctionIOData<double, 3>>();\n  auto psi2 = psi_data.create_function(world);\n\n  {\n    double norm = psi2.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    // write_function(fun2,std::cout);\n    // fun2.print_tree();\n    double err = (psi - psi2).norm2();\n    if (world.rank() == 0)\n      std::cout << \"error = \" << err << std::endl;\n  }\n\n  double kinetic_energy = 0.0;\n  for (int axis = 0; axis < 3; axis++) {\n    real_derivative_3d D = free_space_derivative<double, 3>(world, axis);\n    real_function_3d dpsi = D(psi);\n    kinetic_energy += inner(dpsi, dpsi);\n  }\n\n  auto print_energies = [&](real_function_3d &psi, const std::string &name) {\n    real_function_3d rho = square(psi);\n    double two_electron_energy = inner(op(rho), rho);\n    double nuclear_attraction_energy = 2.0 * inner(Vnuc, rho);\n    double nuclear_repulsion_energy = 1.0 / R;\n    double total_energy = kinetic_energy + two_electron_energy +\n                          nuclear_attraction_energy + nuclear_repulsion_energy;\n    double virial = (nuclear_attraction_energy + two_electron_energy +\n                     nuclear_repulsion_energy) /\n                    kinetic_energy;\n    if (world.rank() == 0) {\n      print(\"Energy for \", name);\n      print(\"            Kinetic energy \", kinetic_energy);\n      print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n      print(\"       Two-electron energy \", two_electron_energy);\n      print(\" Nuclear  repulsion energy \", nuclear_repulsion_energy);\n      print(\"              Total energy \", total_energy);\n      print(\"                    Virial \", virial);\n    }\n  };\n\n  print_energies(psi, \"psi\");\n  print_energies(psi2, \"psi read\");\n\n  world.gop.fence();\n\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/h2_write_json_2.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n/*!\n  \\file h2.cc\n  \\brief Solves the Hartree-Fock equations for the hydrogen molecule\n  \\defgroup examplesh2hf Hartree-Fock equations for the hydrogen molecule\n  \\ingroup examples\n\n  The source is <a\n  href=https://github.com/m-a-d-n-e-s-s/madness/blob/master/src/examples/h2.cc>h2.cc</a>.\n\n  The Hartree-Fock wave function is computed for the hydrogen molecule\n  in three dimensions without using symmetry.\n\n  Since all of the details except for the nuclear potential are the\n  same, please refer to the \\ref examplehehf helium atom HF example.\n\n*/\n#include <FunctionIO2.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n\nusing namespace madness;\n\nstatic const double R = 1.4;       // bond length\nstatic const double L = 64.0 * R;  // box size\nstatic const long k = 8;           // wavelet order\nstatic const double thresh = 1e-6; // precision\n\nstatic double guess(const coord_3d &r) {\n  const double x = r[0], y = r[1], z = r[2];\n  return (exp(-sqrt(x * x + y * y + (z - R / 2) * (z - R / 2) + 1e-8)) +\n          exp(-sqrt(x * x + y * y + (z + R / 2) * (z + R / 2) + 1e-8)));\n}\n\nstatic double V(const coord_3d &r) {\n  const double x = r[0], y = r[1], z = r[2];\n  return -1.0 / sqrt(x * x + y * y + (z - R / 2) * (z - R / 2) + 1e-8) +\n         -1.0 / sqrt(x * x + y * y + (z + R / 2) * (z + R / 2) + 1e-8);\n}\n\nvoid iterate(World &world, real_function_3d &V, real_function_3d &psi,\n             double &eps) {\n  real_convolution_3d op = BSHOperator3D(world, sqrt(-2 * eps), 0.001, 1e-6);\n  real_function_3d Vpsi = (V * psi);\n  Vpsi.scale(-2.0).truncate();\n  real_function_3d tmp = op(Vpsi).truncate();\n  double norm = tmp.norm2();\n  real_function_3d r = tmp - psi;\n  double rnorm = r.norm2();\n  double eps_new = eps - 0.5 * inner(Vpsi, r) / (norm * norm);\n  if (world.rank() == 0) {\n    print(\"norm=\", norm, \" eps=\", eps, \" err(psi)=\", rnorm,\n          \" err(eps)=\", eps_new - eps);\n  }\n  psi = tmp.scale(1.0 / norm);\n  eps = eps_new;\n}\n\nint main(int argc, char **argv) {\n  initialize(argc, argv);\n  World world(SafeMPI::COMM_WORLD);\n\n  startup(world, argc, argv);\n  std::cout.precision(6);\n\n  FunctionDefaults<3>::set_k(k);\n  FunctionDefaults<3>::set_thresh(thresh);\n  FunctionDefaults<3>::set_refine(true);\n  FunctionDefaults<3>::set_initial_level(5);\n  FunctionDefaults<3>::set_truncate_mode(1);\n  FunctionDefaults<3>::set_cubic_cell(-L / 2, L / 2);\n  // for (int i=0; i<3; i++) {\n  // FunctionDefaults<3>::cell(i,0) = -L/2;\n  // FunctionDefaults<3>::cell(i,1) =  L/2;\n  // }\n\n  real_function_3d Vnuc = real_factory_3d(world).f(V);\n  real_function_3d psi = real_factory_3d(world).f(guess);\n  psi.truncate();\n  psi.scale(1.0 / psi.norm2());\n\n  real_convolution_3d op = CoulombOperator(world, 0.001, 1e-6);\n\n  double eps = -0.6;\n  for (int iter = 0; iter < 10; iter++) {\n    real_function_3d rho = square(psi).truncate();\n    real_function_3d potential = Vnuc + op(rho).truncate();\n    iterate(world, potential, psi, eps);\n  }\n\n  //using fio = FunctionIO<double, 3>;\n  {\n    double norm = psi.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    std::ofstream out(\"h2_psi.json\", std::ios::out);\n\n    json j_psi;\n    to_json(j_psi, FunctionIOData<double, 3>(psi));\n    out << j_psi.dump(2);\n    out.close();\n    // fun.print_tree();\n  }\n\n  std::ifstream in(\"h2_psi.json\", std::ios::in);\n  json j_psi_read;\n  in >> j_psi_read;\n  auto psi_data = j_psi_read.get<FunctionIOData<double, 3>>();\n  auto psi2 = psi_data.create_function(world);\n\n  {\n    double norm = psi2.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    // write_function(fun2,std::cout);\n    // fun2.print_tree();\n    double err = (psi - psi2).norm2();\n    if (world.rank() == 0)\n      std::cout << \"error = \" << err << std::endl;\n  }\n\n  double kinetic_energy = 0.0;\n  for (int axis = 0; axis < 3; axis++) {\n    real_derivative_3d D = free_space_derivative<double, 3>(world, axis);\n    real_function_3d dpsi = D(psi);\n    kinetic_energy += inner(dpsi, dpsi);\n  }\n\n  auto print_energies = [&](real_function_3d &psi, const std::string &name) {\n    real_function_3d rho = square(psi);\n    double two_electron_energy = inner(op(rho), rho);\n    double nuclear_attraction_energy = 2.0 * inner(Vnuc, rho);\n    double nuclear_repulsion_energy = 1.0 / R;\n    double total_energy = kinetic_energy + two_electron_energy +\n                          nuclear_attraction_energy + nuclear_repulsion_energy;\n    double virial = (nuclear_attraction_energy + two_electron_energy +\n                     nuclear_repulsion_energy) /\n                    kinetic_energy;\n    if (world.rank() == 0) {\n      print(\"Energy for \", name);\n      print(\"            Kinetic energy \", kinetic_energy);\n      print(\" Nuclear attraction energy \", nuclear_attraction_energy);\n      print(\"       Two-electron energy \", two_electron_energy);\n      print(\" Nuclear  repulsion energy \", nuclear_repulsion_energy);\n      print(\"              Total energy \", total_energy);\n      print(\"                    Virial \", virial);\n    }\n  };\n\n  print_energies(psi, \"psi\");\n  print_energies(psi2, \"psi read\");\n\n  world.gop.fence();\n\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/h5cpp_test.cc",
    "content": "#include <h5cpp/h5cpp.hpp>\n#include <iostream>\n#include <vector>\n\nusing namespace hdf5;\n\n//\n// h5cpp has native support for std::vector IO. This example shows how to do it.\n//\n\nusing DataType = std::vector<int>;\n\nint main() {\n  file::File f = file::create(\"std_vector_io.h5\", file::AccessFlags::Truncate);\n  node::Group root_group = f.root();\n\n  //\n  // writing data to a dataset in the file\n  //\n  DataType write_data{1, 2, 3, 4};\n  node::Dataset dataset(root_group, \"data\", datatype::create<DataType>(),\n                        dataspace::create(write_data));\n  dataset.write(write_data);\n\n  //\n  // retrieving the data back from disk\n  //\n  DataType read_data(static_cast<size_t>(\n      dataset.dataspace().size())); // allocate enough memory\n  dataset.read(read_data);\n\n  //\n  // print the data\n  //\n  std::for_each(read_data.begin(), read_data.end(),\n                [](int value) { std::cout << value << \"\\t\"; });\n  std::cout << std::endl;\n\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/writecoeff.cc",
    "content": "#include <complex>\n#include <memory>\n#include <madness/mra/mra.h>\n#include <madness/world/worldmutex.h>\n\nusing namespace madness;\n\nstatic const size_t D = 2;\ntypedef Vector<double,D> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<std::complex<double>,D> > functorT;\ntypedef Function<std::complex<double>,D> cfunctionT;\ntypedef FunctionFactory<std::complex<double>,D> factoryT;\ntypedef SeparatedConvolution<std::complex<double>,D> operatorT;\n\nstatic const double R = 1.4;    // bond length\nstatic const double L = 32.0*R; // box size\nstatic const long k = 3;        // wavelet order\nstatic const double thresh = 1e-3; // precision\n\nstatic std::complex<double> f(const coordT& r)\n{\n    return std::complex<double>(0.0,2.0);\n}\n\ntemplate <typename T, size_t D>\nclass WriteCoeffImpl : public Mutex {\n    const int k;\n    std::ostream& out;\npublic:\n    WriteCoeffImpl(const int k, std::ostream& out)\n        : k(k)\n        , out(out)\n    {}\n\n    void operator()(const Key<D>& key, const Tensor< T >& t) const {\n        ScopedMutex obolus(*this);\n        out << key << \" \" << t << std::endl;\n    }\n};\n\ntemplate <typename T, size_t D>\nclass WriteCoeff {\n    std::shared_ptr<WriteCoeffImpl<T,D>> impl;\n\npublic:\n    WriteCoeff(const int k, std::ostream& out)\n        : impl(new WriteCoeffImpl<T,D>(k, out))\n    {}\n\n    void operator()(const Key<D>& key, const Tensor< T >& t) const {\n        (*impl)(key, t);\n    }\n};\n\n\n\nint main(int argc, char** argv)\n{\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    startup(world,argc,argv);\n    std::cout.precision(6);\n\n    FunctionDefaults<D>::set_k(k);\n    FunctionDefaults<D>::set_thresh(thresh);\n    FunctionDefaults<D>::set_refine(true);\n    FunctionDefaults<D>::set_initial_level(2);\n    FunctionDefaults<D>::set_truncate_mode(0);\n    FunctionDefaults<D>::set_cubic_cell(-L/2, L/2);\n\n    cfunctionT fun = factoryT(world).f(f);\n    fun.truncate();\n\n    cfunctionT sqrt_of_fun = copy(fun);\n    auto op = WriteCoeff<std::complex<double>,D>(k, std::cout);\n    fun.unaryop(op);\n    world.gop.fence();\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/writecoeff2.cc",
    "content": "#include <complex>\n#include <iomanip>\n#include <iostream>\n#include <madness/mra/mra.h>\n#include <memory>\n\nusing namespace madness;\n\nstatic const size_t D = 2;\ntypedef Vector<double, D> coordT;\ntypedef Key<D> keyT;\ntypedef double dataT; // was std::complex<double>\ntypedef std::shared_ptr<FunctionFunctorInterface<dataT, D>> functorT;\ntypedef Function<dataT, D> functionT;\ntypedef FunctionFactory<dataT, D> factoryT;\ntypedef SeparatedConvolution<dataT, D> operatorT;\n\nstatic const double L = 4.0;\nstatic const long k = 5;           // wavelet order\nstatic const double thresh = 1e-3; // precision\n\nstatic dataT f(const coordT &r) {\n  double R = r.normf();\n  return std::exp(-R * R);\n}\n\ntemplate <typename T, std::size_t NDIM>\nvoid write_function_coeffs(const Function<T, NDIM> &f, std::ostream &out,\n                           const Key<NDIM> &key) {\n  const auto &coeffs = f.get_impl()->get_coeffs();\n  auto it = coeffs.find(key).get();\n  if (it == coeffs.end()) {\n    for (int i = 0; i < key.level(); ++i)\n      out << \"  \";\n    out << key << \"  missing --> \" << coeffs.owner(key) << \"\\n\";\n  } else {\n    const auto &node = it->second;\n    if (node.has_coeff()) {\n      auto values = f.get_impl()->coeffs2values(key, node.coeff());\n      for (int i = 0; i < key.level(); ++i)\n        out << \"  \";\n      out << key.level() << \" \";\n      for (size_t i = 0; i < NDIM; ++i)\n        out << key.translation()[i] << \" \";\n      out << std::endl;\n#if HAVE_GENTENSOR\n      MADNESS_EXCEPTION(\"FunctionIO not implemented for GenTensor\", 0);\n#else\n      for (size_t i = 0; i < (size_t)values.size(); i++)\n        out << values.ptr()[i] << \" \";\n#endif\n      out << std::endl;\n    }\n    if (node.has_children()) {\n      for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n        write_function_coeffs<T, NDIM>(f, out, kit.key());\n      }\n    }\n  }\n}\n\ntemplate <typename T, std::size_t NDIM>\nsize_t count_leaf_nodes(const Function<T, NDIM> &f) {\n  const auto &coeffs = f.get_impl()->get_coeffs();\n  size_t count = 0;\n  for (auto it = coeffs.begin(); it != coeffs.end(); ++it) {\n    // const auto &key = it->first;\n    const auto &node = it->second;\n    if (node.has_coeff()) {\n      count++;\n    }\n  }\n  f.get_impl()->world.gop.sum(count);\n  return count;\n}\n\ntemplate <typename T, std::size_t NDIM>\nvoid write_function(const Function<T, NDIM> &f, std::ostream &out) {\n  f.reconstruct();\n  std::cout << \"NUMBER OF LEAF NODES: \" << count_leaf_nodes(f) << std::endl;\n\n  auto flags = out.flags();\n  auto precision = out.precision();\n  out << std::setprecision(17);\n  out << std::scientific;\n\n  if (f.get_impl()->world.rank() == 0) {\n    out << NDIM << std::endl;\n    const auto &cell = FunctionDefaults<NDIM>::get_cell();\n    for (size_t d = 0; d < NDIM; ++d) {\n      for (int i = 0; i < 2; ++i)\n        out << cell(d, i) << \" \";\n      out << std::endl;\n    }\n    out << f.k() << std::endl;\n    out << count_leaf_nodes(f) << std::endl;\n\n    write_function_coeffs(f, out, Key<NDIM>(0));\n  }\n  f.get_impl()->world.gop.fence();\n\n  out << std::setprecision(precision);\n  out.setf(flags);\n}\n\ntemplate <typename T, std::size_t NDIM>\nvoid read_function_coeffs(Function<T, NDIM> &f, std::istream &in,\n                          int num_leaf_nodes) {\n  auto &coeffs = f.get_impl()->get_coeffs();\n\n  for (int i = 0; i < num_leaf_nodes; i++) {\n    Level n;\n    Vector<Translation, NDIM> l;\n    long dims[NDIM];\n    in >> n;\n    if (in.eof())\n      break;\n\n    for (size_t i = 0; i < NDIM; ++i) {\n      in >> l[i];\n      dims[i] = f.k();\n    }\n    Key<NDIM> key(n, l);\n\n    Tensor<T> values(NDIM, dims);\n    for (size_t i = 0; i < (size_t)values.size(); i++)\n      in >> values.ptr()[i];\n    auto t = f.get_impl()->values2coeffs(key, values);\n\n    // f.get_impl()->accumulate2(t, coeffs, key);\n    coeffs.task(key, &FunctionNode<T, NDIM>::accumulate2, t, coeffs, key);\n  }\n}\n\ntemplate <typename T, std::size_t NDIM>\nFunction<T, NDIM> read_function(World &world, std::istream &in) {\n  size_t ndim;\n  in >> ndim;\n  MADNESS_CHECK(ndim == NDIM);\n\n  Tensor<double> cell(NDIM, 2);\n  for (size_t d = 0; d < NDIM; ++d) {\n    for (int i = 0; i < 2; ++i)\n      in >> cell(d, i);\n  }\n  FunctionDefaults<NDIM>::set_cell(cell);\n\n  int k;\n  in >> k;\n  int num_leaf_nodes;\n  in >> num_leaf_nodes;\n  FunctionFactory<T, NDIM> factory(world);\n  Function<T, NDIM> f(factory.k(k).empty());\n  world.gop.fence();\n\n  read_function_coeffs(f, in, num_leaf_nodes);\n\n  f.verify_tree();\n\n  return f;\n}\n\nvoid test(World &world) {\n  functionT fun = factoryT(world).f(f);\n  fun.truncate();\n\n  {\n    double norm = fun.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    std::ofstream out(\"fun.dat\", std::ios::out);\n    write_function(fun, out);\n    out.close();\n    // fun.print_tree();\n  }\n\n  {\n    std::ifstream in(\"fun.dat\", std::ios::in);\n    functionT fun2 = read_function<dataT, D>(world, in);\n    double norm = fun2.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    // write_function(fun2,std::cout);\n    // fun2.print_tree();\n    double err = (fun - fun2).norm2();\n    if (world.rank() == 0)\n      std::cout << \"error = \" << err << std::endl;\n  }\n}\n\nint main(int argc, char **argv) {\n  World &world = initialize(argc, argv);\n  startup(world, argc, argv);\n  std::cout.precision(6);\n\n  FunctionDefaults<D>::set_k(k);\n  FunctionDefaults<D>::set_thresh(thresh);\n  FunctionDefaults<D>::set_refine(true);\n  FunctionDefaults<D>::set_initial_level(2);\n  FunctionDefaults<D>::set_truncate_mode(0);\n  FunctionDefaults<D>::set_cubic_cell(-L / 2, L / 2);\n\n  test(world);\n\n  world.gop.fence();\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/writecoeff3.cc",
    "content": "#include <FunctionIO.h>\n#include <iostream>\n#include <madness/mra/mra.h>\n#include <memory>\n\nusing namespace madness;\n\nstatic const size_t D = 2;\ntypedef Vector<double, D> coordT;\ntypedef Key<D> keyT;\ntypedef double dataT; // was std::complex<double>\ntypedef std::shared_ptr<FunctionFunctorInterface<dataT, D>> functorT;\ntypedef Function<dataT, D> functionT;\ntypedef FunctionFactory<dataT, D> factoryT;\ntypedef SeparatedConvolution<dataT, D> operatorT;\n\nstatic const double L = 4.0;\nstatic const long k = 5;           // wavelet order\nstatic const double thresh = 1e-3; // precision\n\nstatic dataT f(const coordT &r) {\n  double R = r.normf();\n  return std::exp(-R * R);\n}\n\nusing fio = FunctionIO<double, D>;\n\nvoid test(World &world) {\n  functionT fun = factoryT(world).f(f);\n  fun.truncate();\n\n  FunctionIOData<double, D> data(fun);\n\n  json j;\n  to_json(j, data);\n  auto p2 = j.template get<FunctionIOData<double, D>>();\n  json j2;\n  to_json(j2, p2);\n\n  if (world.rank() == 0) {\n    print(\"j\", j.dump(2));\n    print(\"p2\", j2.dump(2));\n  }\n\n  // ...\n\n  auto leafnodes = FunctionIO<double, D>::count_leaf_nodes(fun);\n  if (world.rank() == 0) {\n    print(\"fun: num leaf nodes: \", leafnodes);\n  }\n\n  {\n    double norm = fun.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n\n    std::ofstream out(\"fun.json\", std::ios::out);\n    out << j.dump(2);\n    out.close();\n    // fun.print_tree();\n  }\n\n  {\n    std::ifstream in(\"fun.json\", std::ios::in);\n    json j_read;\n    in >> j_read;\n\n    auto p_read = j_read.get<FunctionIOData<double, D>>();\n    auto fun2 = p_read.create_function(world);\n\n    double norm = fun2.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    // write_function(fun2,std::cout);\n    // fun2.print_tree();\n    double err = (fun - fun2).norm2();\n    if (world.rank() == 0)\n      std::cout << \"error = \" << err << std::endl;\n  }\n}\n\nint main(int argc, char **argv) {\n  World &world = initialize(argc, argv);\n  startup(world, argc, argv);\n  std::cout.precision(6);\n\n  FunctionDefaults<D>::set_k(k);\n  FunctionDefaults<D>::set_thresh(thresh);\n  FunctionDefaults<D>::set_refine(true);\n  FunctionDefaults<D>::set_initial_level(2);\n  FunctionDefaults<D>::set_truncate_mode(0);\n  FunctionDefaults<D>::set_cubic_cell(-L / 2, L / 2);\n\n  test(world);\n\n  world.gop.fence();\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/writecoeff_hdf5.cc",
    "content": "#include <FunctionIO.h>\n#include <iostream>\n#include <madness/mra/mra.h>\n#include <memory>\n\nusing namespace madness;\n\nstatic const size_t D = 2;\ntypedef Vector<double, D> coordT;\ntypedef Key<D> keyT;\ntypedef double dataT; // was std::complex<double>\ntypedef std::shared_ptr<FunctionFunctorInterface<dataT, D>> functorT;\ntypedef Function<dataT, D> functionT;\ntypedef FunctionFactory<dataT, D> factoryT;\ntypedef SeparatedConvolution<dataT, D> operatorT;\n\nstatic const double L = 4.0;\nstatic const long k = 5;           // wavelet order\nstatic const double thresh = 1e-3; // precision\n\nstatic dataT f(const coordT &r) {\n  double R = r.normf();\n  return std::exp(-R * R);\n}\n\nusing fio = FunctionIO<double, D>;\n\nvoid test(World &world) {\n  functionT fun = factoryT(world).f(f);\n  fun.truncate();\n\n  auto leafnodes = FunctionIO<double, D>::count_leaf_nodes(fun);\n  if (world.rank() == 0) {\n    print(\"fun: num leaf nodes: \", leafnodes);\n  }\n\n  {\n    double norm = fun.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    std::ofstream out(\"fun.dat\", std::ios::out);\n    fio::write_function(fun, out);\n    out.close();\n    // fun.print_tree();\n  }\n\n  {\n    std::ifstream in(\"fun.dat\", std::ios::in);\n    functionT fun2 = fio::read_function(world, in);\n    double norm = fun2.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    // write_function(fun2,std::cout);\n    // fun2.print_tree();\n    double err = (fun - fun2).norm2();\n    if (world.rank() == 0)\n      std::cout << \"error = \" << err << std::endl;\n  }\n}\n\nint main(int argc, char **argv) {\n  World &world = initialize(argc, argv);\n  startup(world, argc, argv);\n  std::cout.precision(6);\n\n  FunctionDefaults<D>::set_k(k);\n  FunctionDefaults<D>::set_thresh(thresh);\n  FunctionDefaults<D>::set_refine(true);\n  FunctionDefaults<D>::set_initial_level(2);\n  FunctionDefaults<D>::set_truncate_mode(0);\n  FunctionDefaults<D>::set_cubic_cell(-L / 2, L / 2);\n\n  test(world);\n\n  world.gop.fence();\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/examples/writecoeffs/writecoeff_json.cc",
    "content": "#include <FunctionIO2.h>\n#include <iostream>\n#include <madness/mra/mra.h>\n#include <memory>\n\nusing namespace madness;\n\nstatic const size_t D = 2;\ntypedef Vector<double, D> coordT;\ntypedef Key<D> keyT;\ntypedef double dataT; // was std::complex<double>\ntypedef std::shared_ptr<FunctionFunctorInterface<dataT, D>> functorT;\ntypedef Function<dataT, D> functionT;\ntypedef FunctionFactory<dataT, D> factoryT;\ntypedef SeparatedConvolution<dataT, D> operatorT;\n\nstatic const double L = 4.0;\nstatic const long k = 5;           // wavelet order\nstatic const double thresh = 1e-3; // precision\n\nstatic dataT f(const coordT &r) {\n  double R = r.normf();\n  return std::exp(-R * R);\n}\n\nusing fio = FunctionIO<double, D>;\n\nvoid test(World &world) {\n  functionT fun = factoryT(world).f(f);\n  fun.truncate();\n\n  {\n    double norm = fun.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n    std::ofstream out(\"fun.json\", std::ios::out);\n    json j_fun;\n    to_json(j_fun, FunctionIOData<double, D>(fun));\n    out << j_fun.dump(2);\n    out.close();\n    fio::write_function(fun, out);\n    out.close();\n  }\n\n  {\n    std::ifstream in(\"fun.json\", std::ios::in);\n    json j_read;\n    in >> j_read;\n    auto j_read_data = j_read.get<FunctionIOData<double, D>>();\n    auto fun2 = j_read_data.create_function(world);\n\n    double norm = fun2.norm2();\n    if (world.rank() == 0)\n      std::cout << \"norm = \" << norm << std::endl;\n\n    double err = (fun - fun2).norm2();\n\n    if (world.rank() == 0)\n      std::cout << \"error = \" << err << std::endl;\n  }\n}\n\nint main(int argc, char **argv) {\n  World &world = initialize(argc, argv);\n  startup(world, argc, argv);\n  std::cout.precision(6);\n\n  FunctionDefaults<D>::set_initial_level(2);\n  FunctionDefaults<D>::set_truncate_mode(0);\n  FunctionDefaults<D>::set_cubic_cell(-L / 2, L / 2);\n\n  test(world);\n\n  world.gop.fence();\n  finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/madchem.h",
    "content": "\n#ifndef MADNESS_MADCHEM_H\n#define MADNESS_MADCHEM_H\n\n// numerical library\n#include<madness.h>\n\n// convenience\n#include<madness/world/timing_utilities.h>\n#include<madness/misc/info.h>\n\n// the KAIN nonlinear solver\n#include<madness/mra/nonlinsol.h>\n\n// quantum chemistry headers\n#include<madness/chem/AC.h>\n#include<madness/chem/BSHApply.h>\n#include<madness/chem/CC2.h>\n#include<madness/chem/CCPotentials.h>\n#include<madness/chem/CCStructures.h>\n#include<madness/chem/CalculationParameters.h>\n#include<madness/chem/ParameterManager.hpp>\n#include<madness/chem/ESInterface.h>\n#include<madness/chem/GuessFactory.h>\n#include<madness/chem/MolecularOrbitals.h>\n#include<madness/chem/NWChem.h>\n#include<madness/chem/PNO.h>\n#include<madness/chem/PNOF12Potentials.h>\n#include<madness/chem/PNOGuessFunctions.h>\n#include<madness/chem/PNOParameters.h>\n#include<madness/chem/PNOStructures.h>\n#include<madness/chem/PNOTensors.h>\n#include\"madness/mra/QCCalculationParametersBase.h\"\n#include<madness/chem/QCPropertyInterface.h>\n#include<madness/chem/SCF.h>\n#include<madness/chem/SCFOperators.h>\n#include<madness/chem/SCFProtocol.h>\n#include<madness/chem/TDHF.h>\n#include<madness/chem/atomutil.h>\n#include<madness/chem/basis.h>\n#include<madness/chem/ccpairfunction.h>\n#include\"madness/mra/commandlineparser.h\"\n#include<madness/chem/corepotential.h>\n#include<madness/chem/correlationfactor.h>\n#include<madness/chem/diamagneticpotentialfactor.h>\n#include<madness/chem/distpm.h>\n#include<madness/chem/electronic_correlation_factor.h>\n#include<madness/chem/exchangeoperator.h>\n#include<madness/chem/gaussian.h>\n#include<madness/chem/gth_pseudopotential.h>\n#include<madness/chem/localizer.h>\n#include<madness/chem/masks_and_boxes.h>\n#include<madness/chem/molecular_functors.h>\n#include<madness/chem/molecular_optimizer.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/chem/molecule.h>\n#include<madness/chem/molopt.h>\n#include<madness/chem/mp2.h>\n#include<madness/chem/nemo.h>\n#include<madness/chem/oep.h>\n#include<madness/chem/pcm.h>\n#include<madness/chem/pointgroupoperator.h>\n#include<madness/chem/pointgroupsymmetry.h>\n#include<madness/chem/polynomial.h>\n#include<madness/chem/potentialmanager.h>\n#include<madness/chem/projector.h>\n#include<madness/chem/vibanal.h>\n#include<madness/chem/write_test_input.h>\n#include<madness/chem/xcfunctional.h>\n#include<madness/chem/zcis.h>\n#include<madness/chem/znemo.h>\n\n#endif //MADNESS_MADCHEM_H\n"
  },
  {
    "path": "src/madness/CMakeLists.txt",
    "content": "# src/madness\n\n### MADWorld runtime\nadd_subdirectory(world)\n# may need to build elemental as part of MADWorld\nadd_subdirectory(external)\nif (ENABLE_ELEMENTAL)\n\tif (MADNESS_HAS_ELEMENTAL_EMBEDDED)\n\t\tinclude_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/elemental/include\n\t\t\t\t${CMAKE_CURRENT_BINARY_DIR}/external/elemental/include)\n\telseif (MADNESS_HAS_ELEMENTAL)\n\t\tinclude_directories(${ELEMENTAL_SOURCE_DIR}/include\n\t\t\t\t${ELEMENTAL_SOURCE_DIR}/external/suite_sparse/include\n\t\t\t\t${ELEMENTAL_BINARY_DIR}/include)\n\tendif ()\nendif(ENABLE_ELEMENTAL)\nif(MADNESS_BUILD_MADWORLD_ONLY)  # madness library includes just madworld\n\tadd_library(madness $<TARGET_OBJECTS:MADworld-obj>)\nendif(MADNESS_BUILD_MADWORLD_ONLY)\n\n### CLAPACK will be build if BLAS/LAPACK is available\nif (LAPACK_FOUND)\n  set(MADCLAPACK_HEADERS tensor/cblas.h tensor/cblas_types.h\n\t\ttensor/clapack.h tensor/clapack_fortran.h\n\t\ttensor/lapacke_types.h) # this part of MADlinalg is purely independent of MADtensor\n  # add custom target for \"installing\" MADclapack headers\n  install(FILES ${MADCLAPACK_HEADERS}\n\t\tDESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}/madness/tensor\"\n\t\tCOMPONENT clapack)\n  add_custom_target(install-madness-clapack\n\t\tCOMMAND ${CMAKE_COMMAND} -DCOMPONENT=clapack -P ${PROJECT_BINARY_DIR}/cmake_install.cmake\n\t\tCOMMENT \"Installing clapack headers\"\n\t\tUSES_TERMINAL)\nendif(LAPACK_FOUND)\n\n### numerics + apps\nif (NOT MADNESS_BUILD_MADWORLD_ONLY)\n\tadd_subdirectory(misc)\n\tadd_subdirectory(tensor)\n\tadd_subdirectory(mra)\n\tadd_subdirectory(chem)\n    # Create the super library that contains all MADNESS libraries\n\tadd_library(madness\n    \t$<TARGET_OBJECTS:MADworld-obj> $<TARGET_OBJECTS:MADmisc-obj>\n    \t$<TARGET_OBJECTS:MADtensor-obj> ${MADTENSOR_MTXMQ_OBJ}\n    \t$<TARGET_OBJECTS:MADlinalg-obj> $<TARGET_OBJECTS:MADmuparser-obj>\n    \t$<TARGET_OBJECTS:MADtinyxml-obj> $<TARGET_OBJECTS:MADmra-obj>\n\t\t$<TARGET_OBJECTS:MADchem-obj>)\nendif(NOT MADNESS_BUILD_MADWORLD_ONLY)\n\n# Set the dependencies for the super-library\ntarget_compile_features(madness INTERFACE \"cxx_std_${CMAKE_CXX_STANDARD}\")\n# DISABLEPIE flag can break linking of dependent libraries (e.g. on Linux using gcc6)\n# instead for each dependent executable target T do:\n# target_link_libraries(T MADNESS_DISABLEPIE_LINKER_FLAGS)\n#\n#if(LINKER_HAS_DISABLEPIE_SUPPORT)\n#  target_link_libraries(madness INTERFACE \"${DISABLEPIE_LINKER_FLAG}\")\n#endif()\nif(GPERFTOOLS_FOUND)\n  target_include_directories(madness PUBLIC ${GPERFTOOLS_INCLUDE_DIRS})\n  target_link_libraries(madness PUBLIC ${GPERFTOOLS_LIBRARIES})\nendif()\nif(LIBUNWIND_FOUND AND NOT GPERFTOOLS_LIBRARIES MATCHES \"unwind\")\n  target_include_directories(madness PUBLIC ${LIBUNWIND_INCLUDE_DIR})\n  target_link_libraries(madness PUBLIC ${LIBUNWIND_LIBRARIES})\nendif()\nif(ELEMENTAL_FOUND)\n  target_link_libraries(madness PUBLIC ${ELEMENTAL_PACKAGE_NAME})\nendif()\nif(PAPI_FOUND)\n  target_include_directories(madness PUBLIC ${PAPI_INCLUDE_DIRS})\n  target_link_libraries(madness PUBLIC ${PAPI_LIBRARIES})\nendif()\nif(TBB_FOUND AND TARGET TBB::tbb)\n  target_link_libraries(madness PUBLIC TBB::tbb)\n  if (TBB_COMPILE_FLAGS)\n    target_compile_definitions(madness PUBLIC \"${TBB_COMPILE_FLAGS}\")\n  endif(TBB_COMPILE_FLAGS)\nendif()\nif(TARGET PaRSEC::parsec)\n  target_link_libraries(madness PUBLIC PaRSEC::parsec)\nendif()\nif(MPI_FOUND)\n  target_include_directories(madness PUBLIC ${MPI_INCLUDE_PATH})\n  target_compile_definitions(madness PUBLIC -DMPICH_SKIP_MPICXX=1 -DOMPI_SKIP_MPICXX=1)\n  target_compile_options(madness PUBLIC \"${MPI_COMPILE_FLAGS}\")\n  target_link_libraries(madness PUBLIC ${MPI_LINK_FLAGS})\n  target_link_libraries(madness PUBLIC ${MPI_LIBRARIES})\nendif()\nif(HAVE_IBMBGQ OR HAVE_IBMBGP)\n  target_link_libraries(madness PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/new_mtxmq/bests/libMADMTXM.a)\nendif()\nif (LAPACK_FOUND)\n\n\t# if LAPACK_LIBRARIES includes IMPORTED targets make sure they are available\n\tif (LAPACK_LIBRARIES MATCHES OpenMP::OpenMP_C AND NOT TARGET OpenMP::OpenMP_C)\n\t\tfind_package(OpenMP REQUIRED COMPONENTS C)\n\tendif()\n\n\ttarget_link_libraries(madness PUBLIC ${LAPACK_LIBRARIES})\n\tif (LAPACK_INCLUDE_DIRS)\n\t\ttarget_include_directories(madness PUBLIC ${LAPACK_INCLUDE_DIRS})\n\tendif(LAPACK_INCLUDE_DIRS)\n\tif (LAPACK_COMPILE_OPTIONS)\n\t\ttarget_compile_options(madness PUBLIC ${LAPACK_COMPILE_OPTIONS})\n\tendif(LAPACK_COMPILE_OPTIONS)\n\tif (LAPACK_COMPILE_DEFINITIONS)\n\t\ttarget_compile_definitions(madness PUBLIC ${LAPACK_COMPILE_DEFINITIONS})\n\tendif(LAPACK_COMPILE_DEFINITIONS)\nendif(LAPACK_FOUND)\ntarget_link_libraries(madness PUBLIC Threads::Threads)\nif (WORLD_GET_DEFAULT_DISABLED)\n  target_compile_definitions(madness PUBLIC -DMADNESS_DISABLE_WORLD_GET_DEFAULT=1)\nendif (WORLD_GET_DEFAULT_DISABLED)\n# MADchem dependencies\nif (TARGET Libxc::xc)\n\ttarget_link_libraries(madness PUBLIC Libxc::xc)\nendif ()\nif (PCM_FOUND)\n\ttarget_include_directories(madness PUBLIC ${PCM_INCLUDE_DIRS})\n\ttarget_link_libraries(madness PUBLIC ${PCM_LIBRARIES})\nendif ()\nif (BOOST_FOUND)\n\ttarget_include_directories(madness PUBLIC ${BOOST_INCLUDE_DIRS})\n\ttarget_link_libraries(madness PUBLIC ${BOOST_LIBRARIES})\nendif ()\n\n# Add common header files and madness library to the install list\ninstall(FILES constants.h fortran_ctypes.h madness_config.h ${CMAKE_CURRENT_BINARY_DIR}/config.h\n    DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}/madness\"\n    COMPONENT common)\nadd_custom_target(install-madness-common\n     COMMAND ${CMAKE_COMMAND} -DCOMPONENT=common -P ${CMAKE_BINARY_DIR}/cmake_install.cmake\n     COMMENT \"Installing common library components\"\n     USES_TERMINAL)\n     \ninstall(TARGETS madness EXPORT madness\n        COMPONENT madness\n        LIBRARY DESTINATION \"${MADNESS_INSTALL_LIBDIR}\"\n        ARCHIVE DESTINATION \"${MADNESS_INSTALL_LIBDIR}\"\n        INCLUDES DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}\")\nadd_custom_target(install-madness\n        COMMAND ${CMAKE_COMMAND} -DCOMPONENT=madness -P ${CMAKE_BINARY_DIR}/cmake_install.cmake\n        COMMENT \"Installing madness library components\"\n        USES_TERMINAL)\n#add_dependencies(install-madness madness)\nadd_dependencies(install-madness install-madness-common)\nadd_dependencies(install-madness-libraries install-madness)\n"
  },
  {
    "path": "src/madness/chem/3-21g",
    "content": "<?xml version=\"1.0\" ?>\n<name>\n   3-21G\n</name>\n<basis symbol=\"H\">\n  <shell type=\"S\" nprim=\"2\">\n    <exponents>\n      5.44717800\n      0.82454700\n    </exponents>\n    <coefficients>\n      0.15628500\n      0.90469100\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.18319200\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"He\">\n  <shell type=\"S\" nprim=\"2\">\n    <exponents>\n      13.62670000\n      1.99935000\n    </exponents>\n    <coefficients>\n      0.17523000\n      0.89348300\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.38299300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Li\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      36.83820000\n      5.48172000\n      1.11327000\n    </exponents>\n    <coefficients>\n      0.06966860\n      0.38134600\n      0.68170200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.54020500\n      0.10225500\n    </exponents>\n    <scoefficients>\n      -0.26312700\n      1.14339000\n    </scoefficients>\n    <pcoefficients>\n      0.16154600\n      0.91566300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02856500\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Be\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      71.88760000\n      10.72890000\n      2.22205000\n    </exponents>\n    <coefficients>\n      0.06442630\n      0.36609600\n      0.69593400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.29548000\n      0.26888100\n    </exponents>\n    <scoefficients>\n      -0.42106400\n      1.22407000\n    </scoefficients>\n    <pcoefficients>\n      0.20513200\n      0.88252800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.07735000\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"B\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      116.43400000\n      17.43140000\n      3.68016000\n    </exponents>\n    <coefficients>\n      0.06296050\n      0.36330400\n      0.69725500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      2.28187000\n      0.46524800\n    </exponents>\n    <scoefficients>\n      -0.36866200\n      1.19944000\n    </scoefficients>\n    <pcoefficients>\n      0.23115200\n      0.86676400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.12432800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"C\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      172.25600000\n      25.91090000\n      5.53335000\n    </exponents>\n    <coefficients>\n      0.06176690\n      0.35879400\n      0.70071300\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      3.66498000\n      0.77054500\n    </exponents>\n    <scoefficients>\n      -0.39589700\n      1.21584000\n    </scoefficients>\n    <pcoefficients>\n      0.23646000\n      0.86061900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.19585700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"N\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      242.76600000\n      36.48510000\n      7.81449000\n    </exponents>\n    <coefficients>\n      0.05986570\n      0.35295500\n      0.70651300\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      5.42522000\n      1.14915000\n    </exponents>\n    <scoefficients>\n      -0.41330100\n      1.22442000\n    </scoefficients>\n    <pcoefficients>\n      0.23797200\n      0.85895300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.28320500\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"O\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      322.03700000\n      48.43080000\n      10.42060000\n    </exponents>\n    <coefficients>\n      0.05923940\n      0.35150000\n      0.70765800\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      7.40294000\n      1.57620000\n    </exponents>\n    <scoefficients>\n      -0.40445300\n      1.22156000\n    </scoefficients>\n    <pcoefficients>\n      0.24458600\n      0.85395500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.37368400\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"F\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      413.80100000\n      62.24460000\n      13.43400000\n    </exponents>\n    <coefficients>\n      0.05854830\n      0.34930800\n      0.70963200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      9.77759000\n      2.08617000\n    </exponents>\n    <scoefficients>\n      -0.40732700\n      1.22314000\n    </scoefficients>\n    <pcoefficients>\n      0.24668000\n      0.85232100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.48238300\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ne\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      515.72400000\n      77.65380000\n      16.81360000\n    </exponents>\n    <coefficients>\n      0.05814300\n      0.34795100\n      0.71071400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      12.48300000\n      2.66451000\n    </exponents>\n    <scoefficients>\n      -0.40992200\n      1.22431000\n    </scoefficients>\n    <pcoefficients>\n      0.24746000\n      0.85174300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.60625000\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Na\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      547.61300000\n      82.06780000\n      17.69170000\n    </exponents>\n    <coefficients>\n      0.06749110\n      0.39350500\n      0.66560500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      17.54070000\n      3.79398000\n      0.90644100\n    </exponents>\n    <scoefficients>\n      -0.11193700\n      0.25465400\n      0.84441700\n    </scoefficients>\n    <pcoefficients>\n      0.12823300\n      0.47153300\n      0.60427300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.50182400\n      0.06094580\n    </exponents>\n    <scoefficients>\n      -0.21966000\n      1.08912000\n    </scoefficients>\n    <pcoefficients>\n      0.00906650\n      0.99720200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02443490\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mg\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      652.84100000\n      98.38050000\n      21.29960000\n    </exponents>\n    <coefficients>\n      0.06759820\n      0.39177800\n      0.66666100\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      23.37270000\n      5.19953000\n      1.31508000\n    </exponents>\n    <scoefficients>\n      -0.11024600\n      0.18411900\n      0.89639900\n    </scoefficients>\n    <pcoefficients>\n      0.12101400\n      0.46281000\n      0.60690700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.61134900\n      0.14184100\n    </exponents>\n    <scoefficients>\n      -0.36110100\n      1.21505000\n    </scoefficients>\n    <pcoefficients>\n      0.02426330\n      0.98667300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04640110\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Al\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      775.73700000\n      116.95200000\n      25.33260000\n    </exponents>\n    <coefficients>\n      0.06683470\n      0.38906100\n      0.66946800\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      29.47960000\n      6.63314000\n      1.72675000\n    </exponents>\n    <scoefficients>\n      -0.10790200\n      0.14624500\n      0.92373000\n    </scoefficients>\n    <pcoefficients>\n      0.11757400\n      0.46117400\n      0.60553500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.94616000\n      0.20250600\n    </exponents>\n    <scoefficients>\n      -0.32032700\n      1.18412000\n    </scoefficients>\n    <pcoefficients>\n      0.05193830\n      0.97266000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.06390880\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Si\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      910.65500000\n      137.33600000\n      29.76010000\n    </exponents>\n    <coefficients>\n      0.06608230\n      0.38622900\n      0.67238000\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      36.67160000\n      8.31729000\n      2.21645000\n    </exponents>\n    <scoefficients>\n      -0.10451100\n      0.10741000\n      0.95144600\n    </scoefficients>\n    <pcoefficients>\n      0.11335500\n      0.45757800\n      0.60742700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.07913000\n      0.30242200\n    </exponents>\n    <scoefficients>\n      -0.37610800\n      1.25165000\n    </scoefficients>\n    <pcoefficients>\n      0.06710300\n      0.95688300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.09333920\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"P\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      1054.90000000\n      159.19500000\n      34.53040000\n    </exponents>\n    <coefficients>\n      0.06554100\n      0.38403600\n      0.67454100\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      44.28660000\n      10.10190000\n      2.73997000\n    </exponents>\n    <scoefficients>\n      -0.10213000\n      0.08159200\n      0.96978800\n    </scoefficients>\n    <pcoefficients>\n      0.11085100\n      0.45649500\n      0.60693600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.21865000\n      0.39554600\n    </exponents>\n    <scoefficients>\n      -0.37149500\n      1.27099000\n    </scoefficients>\n    <pcoefficients>\n      0.09158200\n      0.93492400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.12281100\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"S\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      1210.62000000\n      182.74700000\n      39.66730000\n    </exponents>\n    <coefficients>\n      0.06500700\n      0.38204000\n      0.67654500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      52.22360000\n      11.96290000\n      3.28911000\n    </exponents>\n    <scoefficients>\n      -0.10031000\n      0.06508800\n      0.98145500\n    </scoefficients>\n    <pcoefficients>\n      0.10964600\n      0.45764900\n      0.60426100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.22384000\n      0.45730300\n    </exponents>\n    <scoefficients>\n      -0.28608900\n      1.22806000\n    </scoefficients>\n    <pcoefficients>\n      0.16477700\n      0.87085500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.14226900\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cl\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      1376.40000000\n      207.85700000\n      45.15540000\n    </exponents>\n    <coefficients>\n      0.06458270\n      0.38036300\n      0.67819000\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      60.80140000\n      13.97650000\n      3.88710000\n    </exponents>\n    <scoefficients>\n      -0.09876390\n      0.05113380\n      0.99133700\n    </scoefficients>\n    <pcoefficients>\n      0.10859800\n      0.45868200\n      0.60196200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.35299000\n      0.52695500\n    </exponents>\n    <scoefficients>\n      -0.22240100\n      1.18252000\n    </scoefficients>\n    <pcoefficients>\n      0.21921600\n      0.82232100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.16671400\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ar\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      1553.71000000\n      234.67800000\n      51.01210000\n    </exponents>\n    <coefficients>\n      0.06417070\n      0.37879700\n      0.67975200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      70.04530000\n      16.14730000\n      4.53492000\n    </exponents>\n    <scoefficients>\n      -0.09746610\n      0.03905690\n      0.99991600\n    </scoefficients>\n    <pcoefficients>\n      0.10761900\n      0.45957600\n      0.60004100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.54209000\n      0.60726700\n    </exponents>\n    <scoefficients>\n      -0.17686600\n      1.14690000\n    </scoefficients>\n    <pcoefficients>\n      0.25568700\n      0.78984200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.19537300\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"K\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      1721.17550000\n      260.01633000\n      56.62455400\n    </exponents>\n    <coefficients>\n      0.06487470\n      0.38085930\n      0.67736810\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      71.55720000\n      15.43894000\n      4.47455100\n    </exponents>\n    <scoefficients>\n      -0.10934290\n      0.11306400\n      0.94625750\n    </scoefficients>\n    <pcoefficients>\n      0.13396540\n      0.53026730\n      0.51179920\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.12127500\n      1.18862100\n      0.37567400\n    </exponents>\n    <scoefficients>\n      -0.26997300\n      0.36463230\n      0.81075330\n    </scoefficients>\n    <pcoefficients>\n      0.01994922\n      0.43402130\n      0.64532260\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.24457700\n      0.03897200\n    </exponents>\n    <scoefficients>\n      -0.26882500\n      1.12898300\n    </scoefficients>\n    <pcoefficients>\n      0.00030810\n      0.99987870\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.01606300\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ca\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      1915.43480000\n      289.53324000\n      63.10635200\n    </exponents>\n    <coefficients>\n      0.06462400\n      0.37983800\n      0.67832900\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      80.39744000\n      17.33075000\n      5.08362400\n    </exponents>\n    <scoefficients>\n      -0.10930300\n      0.10890000\n      0.94927700\n    </scoefficients>\n    <pcoefficients>\n      0.13543300\n      0.53722200\n      0.50180400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.78222900\n      1.46255800\n      0.47922300\n    </exponents>\n    <scoefficients>\n      -0.28160700\n      0.34105100\n      0.83810400\n    </scoefficients>\n    <pcoefficients>\n      0.01900900\n      0.43603800\n      0.63867100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.43968200\n      0.05913000\n    </exponents>\n    <scoefficients>\n      -0.26970500\n      1.11329300\n    </scoefficients>\n    <pcoefficients>\n      0.00030800\n      0.99989600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02389700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sc\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      2119.88700000\n      320.42990000\n      69.89893000\n    </exponents>\n    <coefficients>\n      0.06442100\n      0.37916000\n      0.67896300\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      89.76450000\n      19.38510000\n      5.73142300\n    </exponents>\n    <scoefficients>\n      -0.10938400\n      0.10507000\n      0.95220500\n    </scoefficients>\n    <pcoefficients>\n      0.13632800\n      0.54186000\n      0.49505500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.49193800\n      1.74374200\n      0.56622700\n    </exponents>\n    <scoefficients>\n      -0.28521100\n      0.32415500\n      0.85659200\n    </scoefficients>\n    <pcoefficients>\n      0.01761400\n      0.43364500\n      0.64255100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.51680200\n      0.06721400\n    </exponents>\n    <scoefficients>\n      -0.26267800\n      1.10807900\n    </scoefficients>\n    <pcoefficients>\n      0.00032700\n      0.99989300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02598500\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      5.72221500\n      1.36084900\n    </exponents>\n    <coefficients>\n      0.26523600\n      0.85586100\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.32265200\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ti\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      2335.02000000\n      353.04410000\n      77.05845000\n    </exponents>\n    <coefficients>\n      0.06421700\n      0.37841200\n      0.67968100\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      99.57387000\n      21.54671000\n      6.41396500\n    </exponents>\n    <scoefficients>\n      -0.10947200\n      0.10194300\n      0.95462200\n    </scoefficients>\n    <pcoefficients>\n      0.13729700\n      0.54587500\n      0.48906800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.23827900\n      1.99610800\n      0.64649000\n    </exponents>\n    <scoefficients>\n      -0.28613700\n      0.32182800\n      0.85955100\n    </scoefficients>\n    <pcoefficients>\n      0.01923700\n      0.44044200\n      0.63562000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.57328500\n      0.07311900\n    </exponents>\n    <scoefficients>\n      -0.24245000\n      1.10007500\n    </scoefficients>\n    <pcoefficients>\n      0.00029200\n      0.99990700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02653800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      7.08366600\n      1.70963400\n    </exponents>\n    <coefficients>\n      0.26292100\n      0.85577200\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.41412300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"V\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      2563.87700000\n      387.53400000\n      84.59823000\n    </exponents>\n    <coefficients>\n      0.06394800\n      0.37759400\n      0.68054200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      109.79380000\n      23.76921000\n      7.12296100\n    </exponents>\n    <scoefficients>\n      -0.10983600\n      0.10070700\n      0.95563300\n    </scoefficients>\n    <pcoefficients>\n      0.13842100\n      0.55048900\n      0.48241700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.98120400\n      2.21983900\n      0.71980300\n    </exponents>\n    <scoefficients>\n      -0.28845900\n      0.33643600\n      0.84819000\n    </scoefficients>\n    <pcoefficients>\n      0.02182100\n      0.45676200\n      0.61867500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.63126200\n      0.08006200\n    </exponents>\n    <scoefficients>\n      -0.23649000\n      1.09772100\n    </scoefficients>\n    <pcoefficients>\n      0.00019000\n      0.99994000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02886500\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      8.34291700\n      2.03294400\n    </exponents>\n    <coefficients>\n      0.26406200\n      0.85396600\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.49571200\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      2798.29400000\n      423.13700000\n      92.43886000\n    </exponents>\n    <coefficients>\n      0.06382400\n      0.37708400\n      0.68098900\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      120.28060000\n      26.03727000\n      7.84417200\n    </exponents>\n    <scoefficients>\n      -0.11777900\n      0.10143100\n      0.95719800\n    </scoefficients>\n    <pcoefficients>\n      0.13987800\n      0.55598300\n      0.47481800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.79327600\n      2.49719600\n      0.80514200\n    </exponents>\n    <scoefficients>\n      -0.28885700\n      0.33511500\n      0.85024800\n    </scoefficients>\n    <pcoefficients>\n      0.02218500\n      0.46162500\n      0.61453900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.70392100\n      0.08616200\n    </exponents>\n    <scoefficients>\n      -0.23225100\n      1.09367100\n    </scoefficients>\n    <pcoefficients>\n      0.00018000\n      0.99994500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03219900\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      9.62533900\n      2.36226400\n    </exponents>\n    <coefficients>\n      0.26559600\n      0.85215600\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.57709400\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      3041.68600000\n      460.09010000\n      100.59580000\n    </exponents>\n    <coefficients>\n      0.06374500\n      0.37674900\n      0.68124700\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      131.76730000\n      28.56915000\n      8.66050100\n    </exponents>\n    <scoefficients>\n      -0.11029600\n      0.09819000\n      0.95765900\n    </scoefficients>\n    <pcoefficients>\n      0.14045400\n      0.55780200\n      0.47150100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      8.56908100\n      2.76817800\n      0.88728800\n    </exponents>\n    <scoefficients>\n      -0.29171400\n      0.34396300\n      0.84519800\n    </scoefficients>\n    <pcoefficients>\n      0.02422400\n      0.46866000\n      0.60742100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.76744300\n      0.09202500\n    </exponents>\n    <scoefficients>\n      -0.23000400\n      1.09145000\n    </scoefficients>\n    <pcoefficients>\n      0.00030800\n      0.99990700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03326500\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      11.06884000\n      2.73070700\n    </exponents>\n    <coefficients>\n      0.26527200\n      0.85179500\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.66850900\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Fe\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      3299.18400000\n      499.08860000\n      109.16140000\n    </exponents>\n    <coefficients>\n      0.06358600\n      0.37620200\n      0.68178500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      143.46520000\n      31.16858000\n      9.48361200\n    </exponents>\n    <scoefficients>\n      -0.11055200\n      0.09684700\n      0.95879700\n    </scoefficients>\n    <pcoefficients>\n      0.14110100\n      0.56038700\n      0.46764400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      9.46456500\n      3.10037300\n      0.98649300\n    </exponents>\n    <scoefficients>\n      -0.29205600\n      0.33752400\n      0.85194200\n    </scoefficients>\n    <pcoefficients>\n      0.02376200\n      0.46891100\n      0.60831100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.85341200\n      0.09881200\n    </exponents>\n    <scoefficients>\n      -0.22794400\n      1.08828700\n    </scoefficients>\n    <pcoefficients>\n      -0.00042600\n      1.00012400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03644200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      12.35449000\n      3.05560500\n    </exponents>\n    <coefficients>\n      0.26861100\n      0.84927200\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.73859100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Co\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      3564.76200000\n      539.39080000\n      118.04490000\n    </exponents>\n    <coefficients>\n      0.06348700\n      0.37581800\n      0.68212200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      155.43820000\n      33.81561000\n      10.33323000\n    </exponents>\n    <scoefficients>\n      -0.11098700\n      0.09676700\n      0.95899200\n    </scoefficients>\n    <pcoefficients>\n      0.14206400\n      0.56344400\n      0.46302400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      10.38152000\n      3.38271400\n      1.07695400\n    </exponents>\n    <scoefficients>\n      -0.29226200\n      0.34325100\n      0.84696300\n    </scoefficients>\n    <pcoefficients>\n      0.02631300\n      0.47691700\n      0.59915400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.90901500\n      0.10504100\n    </exponents>\n    <scoefficients>\n      -0.21746000\n      1.08499800\n    </scoefficients>\n    <pcoefficients>\n      0.00022800\n      0.99993400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03725700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      13.74070000\n      3.40898300\n    </exponents>\n    <coefficients>\n      0.27095500\n      0.84734200\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.81864100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ni\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      3848.00500000\n      582.03070000\n      127.36740000\n    </exponents>\n    <coefficients>\n      0.06326600\n      0.37517100\n      0.68282400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      168.28960000\n      36.65633000\n      11.23212000\n    </exponents>\n    <scoefficients>\n      -0.11111500\n      0.09532400\n      0.96016100\n    </scoefficients>\n    <pcoefficients>\n      0.14249000\n      0.56554700\n      0.45999300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      11.35877000\n      3.73884600\n      1.18246300\n    </exponents>\n    <scoefficients>\n      -0.29206000\n      0.33754100\n      0.85253300\n    </scoefficients>\n    <pcoefficients>\n      0.02613800\n      0.47659800\n      0.60038000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.98890400\n      0.11102500\n    </exponents>\n    <scoefficients>\n      -0.21368700\n      1.08193300\n    </scoefficients>\n    <pcoefficients>\n      0.00029400\n      0.99991700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03925800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      15.22069000\n      3.78602000\n    </exponents>\n    <coefficients>\n      0.27260600\n      0.84592800\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.90455700\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cu\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      4134.30200000\n      625.49120000\n      136.95560000\n    </exponents>\n    <coefficients>\n      0.06318800\n      0.37484500\n      0.68310000\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      181.49600000\n      39.57431000\n      12.16246000\n    </exponents>\n    <scoefficients>\n      -0.11132000\n      0.09448700\n      0.96087900\n    </scoefficients>\n    <pcoefficients>\n      0.14308400\n      0.56775600\n      0.45671400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      12.35111000\n      4.04965100\n      1.27922500\n    </exponents>\n    <scoefficients>\n      -0.29222300\n      0.34299100\n      0.84794600\n    </scoefficients>\n    <pcoefficients>\n      0.02772700\n      0.48352400\n      0.59297800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.04980400\n      0.11693300\n    </exponents>\n    <scoefficients>\n      -0.20650800\n      1.07927300\n    </scoefficients>\n    <pcoefficients>\n      0.00013900\n      0.99996100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.00075100\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      16.75938000\n      4.17897700\n    </exponents>\n    <coefficients>\n      0.27411200\n      0.84462500\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.99432700\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Zn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      4432.28800000\n      670.66010000\n      146.90240000\n    </exponents>\n    <coefficients>\n      0.06309300\n      0.37450400\n      0.68341600\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      195.00420000\n      42.56889000\n      13.12143000\n    </exponents>\n    <scoefficients>\n      -0.11162800\n      0.09433600\n      0.96110000\n    </scoefficients>\n    <pcoefficients>\n      0.14380600\n      0.57000200\n      0.45331200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      13.40231000\n      4.39990600\n      1.38514800\n    </exponents>\n    <scoefficients>\n      -0.29178100\n      0.34261400\n      0.84828400\n    </scoefficients>\n    <pcoefficients>\n      0.02870500\n      0.48625200\n      0.59023500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.12155800\n      0.12294400\n    </exponents>\n    <scoefficients>\n      -0.20237100\n      1.07703500\n    </scoefficients>\n    <pcoefficients>\n      0.00034400\n      0.99990500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04219300\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      18.36820000\n      4.59130400\n    </exponents>\n    <coefficients>\n      0.27538600\n      0.84347700\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      1.09020300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ga\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      4751.89790000\n      718.92054000\n      157.44592000\n    </exponents>\n    <coefficients>\n      0.06284000\n      0.37361100\n      0.68436300\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      209.58340000\n      45.69171000\n      14.13297000\n    </exponents>\n    <scoefficients>\n      -0.11151600\n      0.09269600\n      0.96228700\n    </scoefficients>\n    <pcoefficients>\n      0.14426600\n      0.57317800\n      0.44908600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      14.59954000\n      4.86084200\n      1.54911100\n    </exponents>\n    <scoefficients>\n      0.29102900\n      -0.32318800\n      -0.86439100\n    </scoefficients>\n    <pcoefficients>\n      0.02656200\n      0.48331400\n      0.59243000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.26794300\n      0.18839900\n    </exponents>\n    <scoefficients>\n      -0.28513100\n      1.12802200\n    </scoefficients>\n    <pcoefficients>\n      0.03018300\n      0.98846600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.05723700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      21.29253000\n      5.39316600\n      1.33388300\n    </exponents>\n    <coefficients>\n      0.16199000\n      0.51167400\n      0.58987300\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ge\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      5073.74990000\n      767.72417000\n      168.18881000\n    </exponents>\n    <coefficients>\n      0.06272500\n      0.37316700\n      0.68478700\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      224.43600000\n      48.95543000\n      15.18370000\n    </exponents>\n    <scoefficients>\n      -0.11151500\n      0.09120000\n      0.96344900\n    </scoefficients>\n    <pcoefficients>\n      0.14464000\n      0.57538000\n      0.44599500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      15.91257000\n      5.44143700\n      1.74260300\n    </exponents>\n    <scoefficients>\n      -0.28956500\n      0.29388300\n      0.88919900\n    </scoefficients>\n    <pcoefficients>\n      0.02297300\n      0.47324500\n      0.60327800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.46653800\n      0.26309300\n    </exponents>\n    <scoefficients>\n      -0.39673400\n      1.19067000\n    </scoefficients>\n    <pcoefficients>\n      0.02789300\n      0.98749000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.08482100\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      24.32142100\n      6.22381400\n      1.58873700\n    </exponents>\n    <coefficients>\n      0.15779900\n      0.51149200\n      0.58577000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"As\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      5407.61380000\n      818.17436000\n      179.26569000\n    </exponents>\n    <coefficients>\n      0.06260100\n      0.37277900\n      0.68518400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      237.77830000\n      54.25662000\n      16.32803000\n    </exponents>\n    <scoefficients>\n      -0.11283800\n      0.08722700\n      0.96818800\n    </scoefficients>\n    <pcoefficients>\n      0.14968000\n      0.56232200\n      0.45932300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      17.10185000\n      5.80514400\n      1.90208400\n    </exponents>\n    <scoefficients>\n      -0.29145400\n      0.29696200\n      0.88657900\n    </scoefficients>\n    <pcoefficients>\n      0.02568600\n      0.48339700\n      0.58878500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.67540400\n      0.34165600\n    </exponents>\n    <scoefficients>\n      -0.50576100\n      1.25176400\n    </scoefficients>\n    <pcoefficients>\n      0.02528200\n      0.98743300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.11363000\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      27.43720900\n      7.08404400\n      1.85582300\n    </exponents>\n    <coefficients>\n      0.15449500\n      0.51143200\n      0.58219400\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Se\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      5751.32150000\n      870.25721000\n      190.72949000\n    </exponents>\n    <coefficients>\n      0.06249300\n      0.37236800\n      0.68558000\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      255.01640000\n      55.57654000\n      17.35661000\n    </exponents>\n    <scoefficients>\n      -0.11190800\n      0.09099900\n      0.96366800\n    </scoefficients>\n    <pcoefficients>\n      0.14614900\n      0.58137100\n      0.43746000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      18.44568000\n      6.32875900\n      2.09675800\n    </exponents>\n    <scoefficients>\n      -0.29179300\n      0.28462100\n      0.89730500\n    </scoefficients>\n    <pcoefficients>\n      0.02442100\n      0.48336500\n      0.58790400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.87263300\n      0.41747400\n    </exponents>\n    <scoefficients>\n      -0.56776400\n      1.29412700\n    </scoefficients>\n    <pcoefficients>\n      0.02825500\n      0.98490600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.13709100\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      30.62746400\n      7.97127600\n      2.13481000\n    </exponents>\n    <coefficients>\n      0.15198600\n      0.51164000\n      0.57869400\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Br\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      6103.28990000\n      923.69743000\n      202.52031000\n    </exponents>\n    <coefficients>\n      0.06241800\n      0.37204100\n      0.68587300\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      270.60150000\n      58.25357000\n      18.46933000\n    </exponents>\n    <scoefficients>\n      -0.11214900\n      0.09314500\n      0.96167900\n    </scoefficients>\n    <pcoefficients>\n      0.14775100\n      0.60105600\n      0.41287000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      19.76142000\n      6.82175200\n      2.29162900\n    </exponents>\n    <scoefficients>\n      -0.29387000\n      0.28026600\n      0.90203600\n    </scoefficients>\n    <pcoefficients>\n      0.02500700\n      0.48661000\n      0.58242300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      2.13120600\n      0.49935400\n    </exponents>\n    <scoefficients>\n      -0.65180300\n      1.33601200\n    </scoefficients>\n    <pcoefficients>\n      0.02870800\n      0.98407000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.16476400\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      33.96509700\n      8.90083100\n      2.42843600\n    </exponents>\n    <coefficients>\n      0.14966700\n      0.51174800\n      0.57591500\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Kr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      6446.63070000\n      976.87570000\n      214.47955000\n    </exponents>\n    <coefficients>\n      0.06254000\n      0.37210700\n      0.68561100\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      287.64460000\n      62.62009000\n      19.69174000\n    </exponents>\n    <scoefficients>\n      -0.11206100\n      0.09013900\n      0.96433000\n    </scoefficients>\n    <pcoefficients>\n      0.14752800\n      0.58689200\n      0.42950700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      21.12321000\n      7.30328600\n      2.48885000\n    </exponents>\n    <scoefficients>\n      -0.29581700\n      0.27921700\n      0.90373000\n    </scoefficients>\n    <pcoefficients>\n      0.02607000\n      0.49225000\n      0.57427400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      2.36137400\n      0.58601600\n    </exponents>\n    <scoefficients>\n      -0.72024500\n      1.37684600\n    </scoefficients>\n    <pcoefficients>\n      0.02877500\n      0.98333900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.19444700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      37.36810300\n      9.85431300\n      2.73279500\n    </exponents>\n    <coefficients>\n      0.14794700\n      0.51217200\n      0.57295000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Rb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      6816.72250000\n      1033.00070000\n      226.90861000\n    </exponents>\n    <coefficients>\n      0.06249600\n      0.37195000\n      0.68572900\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      304.12830000\n      66.26058000\n      20.91945000\n    </exponents>\n    <scoefficients>\n      -0.11233000\n      0.09075100\n      0.96394100\n    </scoefficients>\n    <pcoefficients>\n      0.14844100\n      0.58912500\n      0.42582500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      22.46533000\n      7.87746800\n      2.70527100\n    </exponents>\n    <scoefficients>\n      -0.30048500\n      0.27835700\n      0.90761000\n    </scoefficients>\n    <pcoefficients>\n      0.02445400\n      0.49445400\n      0.57185700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.69211600\n      0.72305600\n      0.25983800\n    </exponents>\n    <scoefficients>\n      -0.33116200\n      0.50969900\n      0.69824600\n    </scoefficients>\n    <pcoefficients>\n      0.01190100\n      0.49517300\n      0.57372400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.18971400\n      0.03399700\n    </exponents>\n    <scoefficients>\n      -0.27119300\n      1.14155000\n    </scoefficients>\n    <pcoefficients>\n      0.00030800\n      0.99986500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.01471200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      40.86603100\n      10.84088500\n      3.05083400\n    </exponents>\n    <coefficients>\n      0.14660400\n      0.51272500\n      0.56998000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      7215.47350000\n      1092.85190000\n      239.98182000\n    </exponents>\n    <coefficients>\n      0.06228200\n      0.37131000\n      0.68644400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      322.12460000\n      70.09046000\n      22.17641000\n    </exponents>\n    <scoefficients>\n      -0.11223500\n      0.08954400\n      0.96481300\n    </scoefficients>\n    <pcoefficients>\n      0.14883700\n      0.59194700\n      0.42217100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      23.92763000\n      8.47511400\n      2.94293400\n    </exponents>\n    <scoefficients>\n      -0.30247200\n      0.27008400\n      0.91592000\n    </scoefficients>\n    <pcoefficients>\n      0.02483700\n      0.49347800\n      0.57098300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.94096600\n      0.85235600\n      0.32153700\n    </exponents>\n    <scoefficients>\n      -0.35198500\n      0.49725500\n      0.72386000\n    </scoefficients>\n    <pcoefficients>\n      0.00972300\n      0.49832200\n      0.56505600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.34804200\n      0.04817700\n    </exponents>\n    <scoefficients>\n      -0.28514700\n      1.12093900\n    </scoefficients>\n    <pcoefficients>\n      0.00030800\n      0.99989300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02180300\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      44.56611500\n      11.88148900\n      3.38755800\n    </exponents>\n    <coefficients>\n      0.14512700\n      0.51306800\n      0.56766400\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Y\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      7646.42100000\n      1156.86300000\n      253.71520000\n    </exponents>\n    <coefficients>\n      0.06189100\n      0.37020700\n      0.68775600\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      341.85400000\n      74.20986000\n      23.51352000\n    </exponents>\n    <scoefficients>\n      -0.11190000\n      0.08680500\n      0.96678500\n    </scoefficients>\n    <pcoefficients>\n      0.14857200\n      0.59430700\n      0.41960400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      18.86260000\n      16.45405000\n      3.48450000\n    </exponents>\n    <scoefficients>\n      -1.47787300\n      1.34725900\n      1.00623100\n    </scoefficients>\n    <pcoefficients>\n      -0.70414100\n      1.05786200\n      0.73938200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.22173300\n      1.05070500\n      0.39259200\n    </exponents>\n    <scoefficients>\n      -0.36995800\n      0.43086400\n      0.80208700\n    </scoefficients>\n    <pcoefficients>\n      0.00249400\n      0.45376200\n      0.61306800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.43276400\n      0.05701200\n    </exponents>\n    <scoefficients>\n      -0.34645800\n      1.13277700\n    </scoefficients>\n    <pcoefficients>\n      -0.00133700\n      1.00044000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02375400\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      50.35375000\n      13.53078000\n      3.94499600\n    </exponents>\n    <coefficients>\n      0.13679600\n      0.50190600\n      0.57886000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      1.53013700\n      0.63006700\n    </exponents>\n    <coefficients>\n      0.33840300\n      0.72932900\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.21658800\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Zr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      8084.59200000\n      1221.66800000\n      267.69170000\n    </exponents>\n    <coefficients>\n      0.06157800\n      0.36939900\n      0.68872800\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      361.02120000\n      78.30495000\n      24.84523000\n    </exponents>\n    <scoefficients>\n      -0.11190700\n      0.08584000\n      0.96751300\n    </scoefficients>\n    <pcoefficients>\n      0.14876200\n      0.59656900\n      0.41678500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      20.00628000\n      17.57415000\n      3.74298500\n    </exponents>\n    <scoefficients>\n      -1.54434900\n      1.40959600\n      1.00934900\n    </scoefficients>\n    <pcoefficients>\n      -0.75684800\n      1.11209000\n      0.73680200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.55478800\n      1.17899200\n      0.44469700\n    </exponents>\n    <scoefficients>\n      -0.37938700\n      0.42328500\n      0.81406800\n    </scoefficients>\n    <pcoefficients>\n      0.00259900\n      0.45997600\n      0.60584900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.50504900\n      0.06211600\n    </exponents>\n    <scoefficients>\n      -0.32951200\n      1.12070900\n    </scoefficients>\n    <pcoefficients>\n      -0.00124900\n      1.00038400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02558000\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      54.72323000\n      14.77416000\n      4.35896100\n    </exponents>\n    <coefficients>\n      0.13482400\n      0.50055400\n      0.57878200\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      1.86284200\n      0.64331300\n    </exponents>\n    <coefficients>\n      0.28503200\n      0.79720700\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.19939500\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Nb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      8466.51700000\n      1281.26100000\n      281.23110000\n    </exponents>\n    <coefficients>\n      0.06180400\n      0.36980500\n      0.68807900\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      379.47290000\n      82.33589000\n      26.22248000\n    </exponents>\n    <scoefficients>\n      -0.11210600\n      0.08650300\n      0.96705700\n    </scoefficients>\n    <pcoefficients>\n      0.14966700\n      0.59871800\n      0.41323800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      21.16294000\n      18.58978000\n      4.00998100\n    </exponents>\n    <scoefficients>\n      -1.55513100\n      1.41793900\n      1.01062000\n    </scoefficients>\n    <pcoefficients>\n      -0.75546200\n      1.11396600\n      0.73276700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.83637500\n      1.30332500\n      0.49343100\n    </exponents>\n    <scoefficients>\n      -0.38910400\n      0.43497000\n      0.81159000\n    </scoefficients>\n    <pcoefficients>\n      0.00329000\n      0.47164500\n      0.59369900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.57237300\n      0.06820300\n    </exponents>\n    <scoefficients>\n      -0.31560900\n      1.11404700\n    </scoefficients>\n    <pcoefficients>\n      -0.00113300\n      1.00033800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02715700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      59.01219000\n      16.01279000\n      4.77718500\n    </exponents>\n    <coefficients>\n      0.13371000\n      0.50003900\n      0.57753800\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      1.97044300\n      0.66193500\n    </exponents>\n    <coefficients>\n      0.31068100\n      0.78006900\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.20599700\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mo\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      8899.49100000\n      1346.76400000\n      295.63520000\n    </exponents>\n    <coefficients>\n      0.06170600\n      0.36945400\n      0.68843400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      399.31390000\n      86.59356000\n      27.63904000\n    </exponents>\n    <scoefficients>\n      -0.11214400\n      0.08601100\n      0.96743300\n    </scoefficients>\n    <pcoefficients>\n      0.15006600\n      0.60076900\n      0.41038600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      22.50292000\n      19.49171000\n      4.27818000\n    </exponents>\n    <scoefficients>\n      -1.42230600\n      1.28418500\n      1.01086600\n    </scoefficients>\n    <pcoefficients>\n      -0.66806600\n      1.03034600\n      0.72834800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.16302100\n      1.43530500\n      0.54378200\n    </exponents>\n    <scoefficients>\n      -0.39642300\n      0.43707900\n      0.81484600\n    </scoefficients>\n    <pcoefficients>\n      0.00296300\n      0.47914700\n      0.58648700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.63180100\n      0.07325800\n    </exponents>\n    <scoefficients>\n      -0.30336200\n      1.10841300\n    </scoefficients>\n    <pcoefficients>\n      -0.00107900\n      1.00031300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02802500\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      63.78045000\n      17.37358000\n      5.23078400\n    </exponents>\n    <coefficients>\n      0.13173900\n      0.49853200\n      0.57817800\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      2.27093700\n      0.75465300\n    </exponents>\n    <coefficients>\n      0.31126400\n      0.78103400\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.23514200\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Tc\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      9329.48200000\n      1412.50600000\n      310.26430000\n    </exponents>\n    <coefficients>\n      0.06171200\n      0.36933700\n      0.68847200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      418.81750000\n      91.25078000\n      29.11212000\n    </exponents>\n    <scoefficients>\n      -0.11240300\n      0.08531800\n      0.96817700\n    </scoefficients>\n    <pcoefficients>\n      0.15007200\n      0.60005700\n      0.41098600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      25.91064000\n      23.26770000\n      4.70708300\n    </exponents>\n    <scoefficients>\n      -1.38044600\n      1.19790000\n      1.05264900\n    </scoefficients>\n    <pcoefficients>\n      -1.65527100\n      1.98602000\n      0.72903400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.44113800\n      1.59563900\n      0.59556000\n    </exponents>\n    <scoefficients>\n      -0.40411400\n      0.43983800\n      0.82193600\n    </scoefficients>\n    <pcoefficients>\n      0.01229100\n      0.46320700\n      0.59838300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.67388100\n      0.07724100\n    </exponents>\n    <scoefficients>\n      -0.27000300\n      1.09915000\n    </scoefficients>\n    <pcoefficients>\n      -0.00092000\n      1.00026400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02869600\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      68.78375000\n      18.80389000\n      5.70522800\n    </exponents>\n    <coefficients>\n      0.12969300\n      0.49661900\n      0.57954700\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      2.59916400\n      0.86227600\n    </exponents>\n    <coefficients>\n      0.30921900\n      0.78290600\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.27060700\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ru\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      9786.16100000\n      1481.47700000\n      325.41220000\n    </exponents>\n    <coefficients>\n      0.06160500\n      0.36898200\n      0.68884500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      439.86650000\n      95.76273000\n      30.60566000\n    </exponents>\n    <scoefficients>\n      -0.11239100\n      0.08469400\n      0.96863800\n    </scoefficients>\n    <pcoefficients>\n      0.15037900\n      0.60192900\n      0.40846400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      27.27737000\n      24.51082000\n      5.00894600\n    </exponents>\n    <scoefficients>\n      -1.39555300\n      1.21085200\n      1.05404500\n    </scoefficients>\n    <pcoefficients>\n      -1.66861800\n      2.00279000\n      0.72514400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.76581200\n      1.73453100\n      0.64663600\n    </exponents>\n    <scoefficients>\n      -0.41036300\n      0.44800300\n      0.81980800\n    </scoefficients>\n    <pcoefficients>\n      0.01127400\n      0.47270300\n      0.58984300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.74066200\n      0.08217100\n    </exponents>\n    <scoefficients>\n      -0.26396600\n      1.09485700\n    </scoefficients>\n    <pcoefficients>\n      -0.00076200\n      1.00021200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03009700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      73.98330000\n      20.28149000\n      6.19429800\n    </exponents>\n    <coefficients>\n      0.12776000\n      0.49514700\n      0.58065500\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      2.88910800\n      0.95396100\n    </exponents>\n    <coefficients>\n      0.31599400\n      0.77806600\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.29588100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Rh\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      10217.71000000\n      1548.41200000\n      340.49900000\n    </exponents>\n    <coefficients>\n      0.06173200\n      0.36915300\n      0.68851400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      460.75930000\n      100.32890000\n      32.13971000\n    </exponents>\n    <scoefficients>\n      -0.11244600\n      0.08438100\n      0.96890200\n    </scoefficients>\n    <pcoefficients>\n      0.15085800\n      0.60351400\n      0.40602500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      28.79329000\n      25.91768000\n      5.32064000\n    </exponents>\n    <scoefficients>\n      -1.40409100\n      1.21616900\n      1.05655500\n    </scoefficients>\n    <pcoefficients>\n      -1.71221800\n      2.04760300\n      0.72298300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.10974800\n      1.87541400\n      0.69955800\n    </exponents>\n    <scoefficients>\n      -0.41264700\n      0.45188500\n      0.81889900\n    </scoefficients>\n    <pcoefficients>\n      0.00937400\n      0.48155400\n      0.58223100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.80057100\n      0.08732100\n    </exponents>\n    <scoefficients>\n      -0.25534800\n      1.09130800\n    </scoefficients>\n    <pcoefficients>\n      -0.00077600\n      1.00021200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03140700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      79.25597000\n      21.78945000\n      6.69751800\n    </exponents>\n    <coefficients>\n      0.12619000\n      0.49395400\n      0.58133000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      3.19090800\n      1.05457500\n    </exponents>\n    <coefficients>\n      0.32104000\n      0.77385200\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.32607900\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Pd\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      10728.74000000\n      1624.07400000\n      356.79370000\n    </exponents>\n    <coefficients>\n      0.06142900\n      0.36832800\n      0.68950300\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      482.47830000\n      105.05900000\n      33.68145000\n    </exponents>\n    <scoefficients>\n      -0.11267900\n      0.08461200\n      0.96878700\n    </scoefficients>\n    <pcoefficients>\n      0.15107900\n      0.60509200\n      0.40398000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      30.18654000\n      27.16642000\n      5.63593400\n    </exponents>\n    <scoefficients>\n      -1.41854700\n      1.22944400\n      1.05708300\n    </scoefficients>\n    <pcoefficients>\n      -1.70981700\n      2.04930800\n      0.71863000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.47537400\n      1.99760400\n      0.74393000\n    </exponents>\n    <scoefficients>\n      -0.41726100\n      0.47058800\n      0.80463600\n    </scoefficients>\n    <pcoefficients>\n      0.01158400\n      0.49745500\n      0.56552700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.89016300\n      0.09282100\n    </exponents>\n    <scoefficients>\n      -0.27843200\n      1.09302800\n    </scoefficients>\n    <pcoefficients>\n      -0.00127200\n      1.00033200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03377400\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      84.23691000\n      23.24919000\n      7.19676000\n    </exponents>\n    <coefficients>\n      0.12564300\n      0.49372000\n      0.58034300\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      3.47307700\n      1.14805000\n    </exponents>\n    <coefficients>\n      0.32815400\n      0.76802700\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.35481100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ag\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      11190.78000000\n      1695.07700000\n      372.67520000\n    </exponents>\n    <coefficients>\n      0.06149500\n      0.36840500\n      0.68932500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      504.61620000\n      109.87180000\n      35.29513000\n    </exponents>\n    <scoefficients>\n      -0.11265800\n      0.08402800\n      0.96923400\n    </scoefficients>\n    <pcoefficients>\n      0.15148000\n      0.60651400\n      0.40183000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      31.56877000\n      28.34397000\n      5.94512700\n    </exponents>\n    <scoefficients>\n      -1.42202800\n      1.23409800\n      1.05568300\n    </scoefficients>\n    <pcoefficients>\n      -1.67336600\n      2.01897600\n      0.71268900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.80025600\n      2.12725600\n      0.79355100\n    </exponents>\n    <scoefficients>\n      -0.41961700\n      0.48435000\n      0.79520300\n    </scoefficients>\n    <pcoefficients>\n      0.01430400\n      0.50719400\n      0.55397400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.92854400\n      0.09725500\n    </exponents>\n    <scoefficients>\n      -0.25230000\n      1.08739200\n    </scoefficients>\n    <pcoefficients>\n      -0.00148100\n      1.00038800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03493300\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      89.93335000\n      24.87496000\n      7.73819100\n    </exponents>\n    <coefficients>\n      0.12401600\n      0.49238300\n      0.58149700\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      3.79655700\n      1.25664400\n    </exponents>\n    <coefficients>\n      0.33142600\n      0.76516300\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.38813300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cd\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      11686.09000000\n      1770.11100000\n      389.20900000\n    </exponents>\n    <coefficients>\n      0.06142700\n      0.36815700\n      0.68957200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      527.60040000\n      114.83290000\n      36.95829000\n    </exponents>\n    <scoefficients>\n      -0.11259200\n      0.08327000\n      0.96979800\n    </scoefficients>\n    <pcoefficients>\n      0.15180500\n      0.60776000\n      0.39996300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      33.01548000\n      29.54543000\n      6.27850800\n    </exponents>\n    <scoefficients>\n      -1.40647100\n      1.21815600\n      1.05552000\n    </scoefficients>\n    <pcoefficients>\n      -1.60902400\n      1.95956800\n      0.70802700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.15059600\n      2.25974600\n      0.84142600\n    </exponents>\n    <scoefficients>\n      -0.42292100\n      0.49877100\n      0.78507600\n    </scoefficients>\n    <pcoefficients>\n      0.01448200\n      0.51866100\n      0.54266600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      0.94906900\n      0.10148800\n    </exponents>\n    <scoefficients>\n      -0.22155500\n      1.08094400\n    </scoefficients>\n    <pcoefficients>\n      -0.00154000\n      1.00041200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03598700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      95.47274000\n      26.48196000\n      8.28288600\n    </exponents>\n    <coefficients>\n      0.12308300\n      0.49167700\n      0.58154100\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"2\">\n    <exponents>\n      4.08214100\n      1.35727900\n    </exponents>\n    <coefficients>\n      0.33794100\n      0.75916800\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.42083100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"In\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      12214.54700000\n      1848.91360000\n      406.36833000\n    </exponents>\n    <coefficients>\n      0.06124800\n      0.36767500\n      0.69013600\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      550.44230000\n      119.77440000\n      38.66927000\n    </exponents>\n    <scoefficients>\n      -0.11270900\n      0.08344400\n      0.96968800\n    </scoefficients>\n    <pcoefficients>\n      0.15237000\n      0.60965100\n      0.39702500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      47.02931000\n      22.49642000\n      6.69711700\n    </exponents>\n    <scoefficients>\n      -0.27589500\n      0.05977300\n      1.08214800\n    </scoefficients>\n    <pcoefficients>\n      -0.14084800\n      0.52908700\n      0.66206800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.57236000\n      2.50215800\n      0.94202500\n    </exponents>\n    <scoefficients>\n      -0.42848300\n      0.46336400\n      0.82196800\n    </scoefficients>\n    <pcoefficients>\n      0.01091300\n      0.50367600\n      0.55818100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.00122100\n      0.16597000\n    </exponents>\n    <scoefficients>\n      -0.43641700\n      1.18989300\n    </scoefficients>\n    <pcoefficients>\n      0.02316300\n      0.99033100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.05434000\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      102.17356000\n      28.39463200\n      8.92480500\n    </exponents>\n    <coefficients>\n      0.12055600\n      0.48849800\n      0.58501900\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      4.53536400\n      1.53714800\n      0.49949200\n    </exponents>\n    <coefficients>\n      0.25085700\n      0.56931100\n      0.38406400\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      12741.67400000\n      1928.46920000\n      423.80797000\n    </exponents>\n    <coefficients>\n      0.06113500\n      0.36729300\n      0.69054500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      574.28750000\n      124.95370000\n      40.39576000\n    </exponents>\n    <scoefficients>\n      -0.11274600\n      0.08286300\n      0.97015100\n    </scoefficients>\n    <pcoefficients>\n      0.15258000\n      0.61101100\n      0.39515500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      48.80662000\n      23.83588000\n      7.04829600\n    </exponents>\n    <scoefficients>\n      -0.28245300\n      0.06605600\n      1.08198700\n    </scoefficients>\n    <pcoefficients>\n      -0.15096300\n      0.53996800\n      0.66048200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.97337800\n      2.69304000\n      1.02595800\n    </exponents>\n    <scoefficients>\n      -0.43403600\n      0.46102900\n      0.82855800\n    </scoefficients>\n    <pcoefficients>\n      0.01195100\n      0.50671900\n      0.55291100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.13146300\n      0.20340900\n    </exponents>\n    <scoefficients>\n      -0.52520800\n      1.22922600\n    </scoefficients>\n    <pcoefficients>\n      0.02107100\n      0.99059100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.07056400\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      108.05630000\n      30.13157600\n      9.53003600\n    </exponents>\n    <coefficients>\n      0.11982400\n      0.48759100\n      0.58498700\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      4.96261000\n      1.71208300\n      0.57719500\n    </exponents>\n    <coefficients>\n      0.25294900\n      0.57276100\n      0.36903900\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      13289.38300000\n      2010.52180000\n      441.69815000\n    </exponents>\n    <coefficients>\n      0.06098400\n      0.36684900\n      0.69105000\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      598.88900000\n      130.03850000\n      42.13286000\n    </exponents>\n    <scoefficients>\n      -0.11272000\n      0.08264400\n      0.97025800\n    </scoefficients>\n    <pcoefficients>\n      0.15306700\n      0.61359700\n      0.39169900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      51.51333000\n      24.43595000\n      7.42093100\n    </exponents>\n    <scoefficients>\n      -0.27704300\n      0.05750300\n      1.08470300\n    </scoefficients>\n    <pcoefficients>\n      -0.13787000\n      0.53635500\n      0.65086800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.31423500\n      2.84405300\n      1.10585500\n    </exponents>\n    <scoefficients>\n      -0.44038100\n      0.47373400\n      0.82213500\n    </scoefficients>\n    <pcoefficients>\n      0.01530500\n      0.51608300\n      0.53875700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.27863700\n      0.24123200\n    </exponents>\n    <scoefficients>\n      -0.60169500\n      1.25869200\n    </scoefficients>\n    <pcoefficients>\n      0.02225300\n      0.98964300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.08663000\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      115.80955000\n      32.30583500\n      10.25032800\n    </exponents>\n    <coefficients>\n      0.11662800\n      0.48343600\n      0.59014000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.48621000\n      1.92162000\n      0.66606300\n    </exponents>\n    <coefficients>\n      0.24836600\n      0.57431500\n      0.36430400\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Te\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      13796.56000000\n      2088.87980000\n      459.39319000\n    </exponents>\n    <coefficients>\n      0.06108600\n      0.36696300\n      0.69079400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      623.26310000\n      135.36000000\n      44.00048000\n    </exponents>\n    <scoefficients>\n      -0.11282000\n      0.08225200\n      0.97060100\n    </scoefficients>\n    <pcoefficients>\n      0.15341900\n      0.61490000\n      0.38951600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      54.19078000\n      25.82039000\n      7.80958300\n    </exponents>\n    <scoefficients>\n      -0.27441200\n      0.05183000\n      1.08762200\n    </scoefficients>\n    <pcoefficients>\n      -0.14333100\n      0.53918800\n      0.65228500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.76421700\n      3.04393200\n      1.19925300\n    </exponents>\n    <scoefficients>\n      -0.44673100\n      0.46947000\n      0.82981100\n    </scoefficients>\n    <pcoefficients>\n      0.01274600\n      0.52212300\n      0.53266100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.34036400\n      0.27808800\n    </exponents>\n    <scoefficients>\n      -0.59047000\n      1.28196800\n    </scoefficients>\n    <pcoefficients>\n      0.02558800\n      0.98710200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.09672600\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      121.40830000\n      34.01521700\n      10.86913800\n    </exponents>\n    <coefficients>\n      0.11691400\n      0.48355600\n      0.58838600\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.80311100\n      2.05806600\n      0.73283000\n    </exponents>\n    <coefficients>\n      0.26019400\n      0.57977600\n      0.34055800\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"I\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      14351.18600000\n      2173.07410000\n      477.87205000\n    </exponents>\n    <coefficients>\n      0.06100300\n      0.36664000\n      0.69113100\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      648.18870000\n      140.30640000\n      45.69880000\n    </exponents>\n    <scoefficients>\n      -0.11285100\n      0.08322800\n      0.96975200\n    </scoefficients>\n    <pcoefficients>\n      0.15411400\n      0.61946200\n      0.38375800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      56.69469000\n      27.48875000\n      8.20909600\n    </exponents>\n    <scoefficients>\n      -0.27369700\n      0.04650000\n      1.09157600\n    </scoefficients>\n    <pcoefficients>\n      -0.15232200\n      0.54376900\n      0.65616800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      8.19167900\n      3.24459600\n      1.30048900\n    </exponents>\n    <scoefficients>\n      -0.45082800\n      0.46320900\n      0.83863600\n    </scoefficients>\n    <pcoefficients>\n      0.01187000\n      0.52652500\n      0.52660800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.45138000\n      0.32810300\n    </exponents>\n    <scoefficients>\n      -0.66585200\n      1.32858400\n    </scoefficients>\n    <pcoefficients>\n      0.02754100\n      0.98513700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.11507600\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      128.09026000\n      35.98237800\n      11.55111600\n    </exponents>\n    <coefficients>\n      0.11586400\n      0.48204900\n      0.58944500\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.14615200\n      2.22093700\n      0.80991200\n    </exponents>\n    <coefficients>\n      0.26818200\n      0.58006100\n      0.32622600\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Xe\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      14902.23600000\n      2256.53830000\n      496.37317000\n    </exponents>\n    <coefficients>\n      0.06099700\n      0.36662900\n      0.69111500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      673.66110000\n      145.84910000\n      47.57708000\n    </exponents>\n    <scoefficients>\n      -0.11291300\n      0.08290500\n      0.97002900\n    </scoefficients>\n    <pcoefficients>\n      0.15442700\n      0.62061700\n      0.38200400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      59.16752000\n      28.61159000\n      8.59659600\n    </exponents>\n    <scoefficients>\n      -0.27397700\n      0.04553000\n      1.09252800\n    </scoefficients>\n    <pcoefficients>\n      -0.15185700\n      0.54715100\n      0.65195400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      8.63867600\n      3.46281800\n      1.40104000\n    </exponents>\n    <scoefficients>\n      -0.45584100\n      0.46173600\n      0.84428800\n    </scoefficients>\n    <pcoefficients>\n      0.00958500\n      0.52981900\n      0.52359800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"2\">\n    <exponents>\n      1.57847400\n      0.37508100\n    </exponents>\n    <scoefficients>\n      -0.72777200\n      1.36279700\n    </scoefficients>\n    <pcoefficients>\n      0.02807200\n      0.98426400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.13317900\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      134.91331000\n      37.95638700\n      12.22747500\n    </exponents>\n    <coefficients>\n      0.11501100\n      0.48159500\n      0.58961300\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.60049300\n      2.39805100\n      0.88648200\n    </exponents>\n    <coefficients>\n      0.27188400\n      0.58555700\n      0.31274600\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cs\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      15525.86600000\n      2349.00550000\n      516.23555000\n    </exponents>\n    <coefficients>\n      0.06072400\n      0.36584200\n      0.69204700\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      687.50505000\n      67.19115700\n      27.99200300\n    </exponents>\n    <coefficients>\n      -0.11021300\n      0.72720300\n      0.34014300\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      60.16818800\n      10.86869400\n      4.74070500\n    </exponents>\n    <coefficients>\n      -0.27531500\n      0.89012800\n      0.26486300\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      9.88716300\n      2.36934300\n      1.14167600\n    </exponents>\n    <coefficients>\n      -0.36882700\n      0.83258200\n      0.38878900\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      1.76907800\n      0.38362000\n      0.17130600\n    </exponents>\n    <coefficients>\n      -0.34094200\n      0.70009700\n      0.49345200\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"2\">\n    <exponents>\n      0.21184900\n      0.04032400\n    </exponents>\n    <coefficients>\n      -0.27502200\n      0.19360400\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.01705800\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      1024.28330000\n      239.64889000\n      71.25554800\n    </exponents>\n    <coefficients>\n      0.07918500\n      0.41993300\n      0.64325100\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      139.45864000\n      25.81081000\n      10.13945200\n    </exponents>\n    <coefficients>\n      -0.03312300\n      0.38910800\n      0.67903300\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      4.32424400\n      1.93641500\n      0.81450500\n    </exponents>\n    <coefficients>\n      0.38166900\n      0.57697600\n      0.11540500\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.59458400\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.27499200\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.11155300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      144.05139000\n      40.50514600\n      13.08624400\n    </exponents>\n    <coefficients>\n      0.11183000\n      0.47683500\n      0.59541700\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      7.37157800\n      2.72482400\n      1.02667800\n    </exponents>\n    <coefficients>\n      0.25372500\n      0.57888600\n      0.33259800\n    </coefficients>\n  </shell>\n</basis>\n<atomicguess symbol=\"H\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     0.12471      0.25952 \n     0.25952      0.54005 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -0.25162      0.82009 \n   </alphaeps>\n   <betaeps>\n    -0.49620      0.58648 \n   </betaeps>\n   <alphavectors>\n     0.35314      1.26139 \n     0.73488     -1.08432 \n   </alphavectors>\n   <betavectors>\n     0.37341      1.25554 \n     0.71732     -1.09602 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"He\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     0.39953      0.59645 \n     0.59645      0.89045 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -0.53973      1.69739 \n   </alphaeps>\n   <betaeps>\n    -0.53973      1.69739 \n   </betaeps>\n   <alphavectors>\n     0.44695      1.16142 \n     0.66725     -1.05045 \n   </alphavectors>\n   <betavectors>\n     0.44695      1.16142 \n     0.66725     -1.05045 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Li\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     1.98932      0.10534      0.00000      0.00000      0.00000     -0.21415      0.00000      0.00000      0.00000 \n     0.10534      0.15683      0.00000      0.00000      0.00000      0.24877      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00137      0.00000      0.00000      0.00000      0.00175      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00000      0.00175      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00000      0.00175 \n    -0.21415      0.24877      0.00000      0.00000      0.00000      0.47037      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00175      0.00000      0.00000      0.00000      0.00222      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00175      0.00000      0.00000      0.00000      0.00222      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00175      0.00000      0.00000      0.00000      0.00222 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.98306      0.00565      0.00565      0.00565      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -1.83635     -0.11582     -0.04999     -0.04999     -0.04999      0.07706      0.07706      0.07706      0.08229 \n   </alphaeps>\n   <betaeps>\n    -1.82861     -0.07992     -0.02169     -0.02169     -0.02169      0.10377      0.10377      0.10377      0.11037 \n   </betaeps>\n   <alphavectors>\n     0.98564     -0.21440      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.12236 \n     0.09520      0.37641     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.56926 \n     0.00000     -0.00000      0.00000      0.49324     -0.00000      1.13438     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.49324      0.00000      1.13438     -0.00000     -0.00000 \n    -0.00000      0.00000      0.49324      0.00000      0.00000      0.00000      0.00000      1.13438     -0.00000 \n    -0.03533      0.68993     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.45090 \n     0.00000     -0.00000      0.00000      0.62674      0.00000     -1.06645      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.62674      0.00000     -1.06645      0.00000     -0.00000 \n    -0.00000      0.00000      0.62674     -0.00000     -0.00000     -0.00000     -0.00000     -1.06645      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98623     -0.20184      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13805 \n     0.09211      0.24530     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.59521 \n     0.00000      0.00000     -0.00000      0.00000      0.34212     -0.00000      1.18872     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.34212     -0.00000      0.00000      0.00000      0.00000      1.18872      0.00000 \n     0.00000     -0.00000      0.00000      0.34212     -0.00000      1.18872      0.00000     -0.00000      0.00000 \n    -0.03439      0.80767     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.38883 \n     0.00000      0.00000     -0.00000      0.00000      0.75962      0.00000     -0.97626      0.00000      0.00000 \n    -0.00000      0.00000      0.75962      0.00000     -0.00000     -0.00000     -0.00000     -0.97626     -0.00000 \n     0.00000     -0.00000      0.00000      0.75962     -0.00000     -0.97626     -0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Be\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.06343      0.09366      0.00000      0.00000      0.00000     -0.44805      0.00000      0.00000      0.00000 \n     0.09366      0.12514      0.00000      0.00000      0.00000      0.36939      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.44805      0.36939      0.00000      0.00000      0.00000      1.35371      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -3.80005     -0.20315     -0.07202     -0.07202     -0.07202      0.25112      0.25112      0.25112      0.39106 \n   </alphaeps>\n   <betaeps>\n    -3.80005     -0.20315     -0.07202     -0.07202     -0.07202      0.25112      0.25112      0.25112      0.39106 \n   </betaeps>\n   <alphavectors>\n     0.98937     -0.22992     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02622 \n     0.10056      0.22904      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.64350 \n    -0.00000     -0.00000     -0.00000      0.46870     -0.00000     -0.00000     -0.00000      1.14477     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.46870     -0.00000      1.14477      0.00000     -0.00000 \n    -0.00000     -0.00000      0.46870     -0.00000     -0.00000      1.14477      0.00000      0.00000      0.00000 \n    -0.03542      0.82195      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.45611 \n    -0.00000     -0.00000     -0.00000      0.64955      0.00000      0.00000      0.00000     -1.05275      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.64955      0.00000     -1.05275     -0.00000      0.00000 \n    -0.00000     -0.00000      0.64955      0.00000      0.00000     -1.05275     -0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98937     -0.22992      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02622 \n     0.10056      0.22904     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.64350 \n     0.00000      0.00000      0.00000      0.46870     -0.00000     -0.00000      1.14477      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.46870     -0.00000     -0.00000      1.14477      0.00000 \n    -0.00000      0.00000      0.46870     -0.00000     -0.00000      1.14477     -0.00000      0.00000     -0.00000 \n    -0.03542      0.82195     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.45611 \n     0.00000      0.00000      0.00000      0.64955      0.00000      0.00000     -1.05275     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.64955      0.00000      0.00000     -1.05275     -0.00000 \n    -0.00000      0.00000      0.64955     -0.00000     -0.00000     -1.05275      0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"B\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.05510      0.05868      0.00000      0.00000      0.00000     -0.44024      0.00000      0.00000      0.00000 \n     0.05868      0.18341      0.00000      0.00000      0.00000      0.43784      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.10139      0.00000      0.00000      0.00000      0.10733      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.10139      0.00000      0.00000      0.00000      0.10733      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.10139      0.00000      0.00000      0.00000      0.10733 \n    -0.44024      0.43784      0.00000      0.00000      0.00000      1.21417      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.10733      0.00000      0.00000      0.00000      0.11361      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.10733      0.00000      0.00000      0.00000      0.11361      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.10733      0.00000      0.00000      0.00000      0.11361 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -6.49268     -0.35342     -0.14115     -0.14115     -0.14115      0.37642      0.37642      0.37642      0.55997 \n   </alphaeps>\n   <betaeps>\n    -6.48166     -0.31067     -0.10083     -0.10083     -0.10083      0.40993      0.40993      0.40993      0.59680 \n   </betaeps>\n   <alphavectors>\n     0.98450     -0.24207      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.09754 \n     0.10057      0.29805      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.55660 \n     0.00000     -0.00000      0.00000      0.55151      0.00000      0.00000      1.06415      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.55151      0.00000     -0.00000      1.06415      0.00000 \n    -0.00000      0.00000      0.55151     -0.00000     -0.00000      1.06415     -0.00000     -0.00000     -0.00000 \n    -0.03350      0.76739     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.38694 \n     0.00000     -0.00000      0.00000      0.58381     -0.00000     -0.00000     -1.04677      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.58381     -0.00000      0.00000     -1.04677      0.00000 \n    -0.00000      0.00000      0.58381     -0.00000     -0.00000     -1.04677      0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98486     -0.23941     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.10042 \n     0.09875      0.27333      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.56125 \n     0.00000     -0.00000     -0.00000      0.51939      0.00000      1.08019     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.51939      0.00000      0.00000      0.00000      1.08019     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.51939     -0.00000     -0.00000      1.08019      0.00000 \n    -0.03302      0.78935      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.37457 \n     0.00000     -0.00000     -0.00000      0.61491      0.00000     -1.02882      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.61491      0.00000     -0.00000     -0.00000     -1.02882      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.61491      0.00000     -0.00000     -1.02882     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"C\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.05785      0.06788      0.00000      0.00000      0.00000     -0.46205      0.00000      0.00000      0.00000 \n     0.06788      0.15596      0.00000      0.00000      0.00000      0.41184      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.21228      0.00000      0.00000      0.00000      0.21796      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.21228      0.00000      0.00000      0.00000      0.21796      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.21228      0.00000      0.00000      0.00000      0.21796 \n    -0.46205      0.41184      0.00000      0.00000      0.00000      1.29970      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.21796      0.00000      0.00000      0.00000      0.22379      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.21796      0.00000      0.00000      0.00000      0.22380      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.21796      0.00000      0.00000      0.00000      0.22380 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.66667      0.66667      0.66667      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -9.84678     -0.51398     -0.20688     -0.20688     -0.20688      0.61336      0.61336      0.61336      0.96618 \n   </alphaeps>\n   <betaeps>\n    -9.81585     -0.41649     -0.11286     -0.11286     -0.11286      0.69284      0.69284      0.69284      1.05436 \n   </betaeps>\n   <alphavectors>\n     0.98300     -0.25125     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.10817 \n     0.10188      0.27843      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.51936 \n     0.00000     -0.00000     -0.00000      0.00000      0.56429     -0.00000      0.00000      1.03445      0.00000 \n    -0.00000      0.00000      0.00000      0.56429     -0.00000      0.00000      1.03445     -0.00000      0.00000 \n     0.00000     -0.00000      0.56429     -0.00000      0.00000      1.03445      0.00000     -0.00000     -0.00000 \n    -0.03139      0.78931      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.32744 \n     0.00000     -0.00000     -0.00000      0.00000      0.57939     -0.00000      0.00000     -1.02606      0.00000 \n    -0.00000      0.00000      0.00000      0.57939      0.00000     -0.00000     -1.02606      0.00000      0.00000 \n     0.00000     -0.00000      0.57939      0.00000     -0.00000     -1.02606      0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98363     -0.24680     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.11262 \n     0.09889      0.24141      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.52587 \n    -0.00000      0.00000      0.00000      0.00000      0.51493     -0.00000     -0.00000      1.05988     -0.00000 \n     0.00000     -0.00000     -0.00000      0.51494      0.00000     -0.00000      1.05988      0.00000     -0.00000 \n     0.00000     -0.00000      0.51494      0.00000      0.00000      1.05988     -0.00000     -0.00000      0.00000 \n    -0.03065      0.82144      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.30782 \n    -0.00000      0.00000      0.00000      0.00000      0.62708     -0.00000     -0.00000     -0.99763     -0.00000 \n     0.00000     -0.00000     -0.00000      0.62708     -0.00000      0.00000     -0.99763      0.00000     -0.00000 \n     0.00000     -0.00000      0.62708     -0.00000     -0.00000     -0.99763     -0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"N\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.05898      0.07842      0.00000      0.00000      0.00000     -0.47752      0.00000      0.00000      0.00000 \n     0.07842      0.13703      0.00000      0.00000      0.00000      0.38934      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.32397      0.00000      0.00000      0.00000      0.32978      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.32397      0.00000      0.00000      0.00000      0.32978      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.32397      0.00000      0.00000      0.00000      0.32978 \n    -0.47752      0.38934      0.00000      0.00000      0.00000      1.36364      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.32978      0.00000      0.00000      0.00000      0.33569      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.32978      0.00000      0.00000      0.00000      0.33569      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.32978      0.00000      0.00000      0.00000      0.33569 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -13.87160     -0.68866     -0.27236     -0.27236     -0.27236      0.91612      0.91612      0.91612      1.49796 \n   </alphaeps>\n   <betaeps>\n   -13.81313     -0.52754     -0.11437     -0.11437     -0.11437      1.05129      1.05129      1.05129      1.64898 \n   </betaeps>\n   <alphavectors>\n     0.98198     -0.25651     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.11375 \n     0.10385      0.26117      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.49720 \n    -0.00000     -0.00000      0.56918      0.00000      0.00000     -0.00000      1.01927     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.56918      0.00000     -0.00000     -0.00000      1.01927      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.56918      1.01927      0.00000      0.00000     -0.00000 \n    -0.03040      0.80703      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.28789 \n     0.00000     -0.00000      0.57939     -0.00000     -0.00000      0.00000     -1.01350     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.57939     -0.00000      0.00000      0.00000     -1.01350      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.57939     -1.01350      0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98278     -0.25109      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.11884 \n     0.10017      0.21909      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.50418 \n     0.00000      0.00000      0.51129     -0.00000      0.00000      0.00000      1.04950      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.51129     -0.00000     -0.00000     -0.00000      1.04950     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.51129      1.04950     -0.00000      0.00000     -0.00000 \n    -0.02951      0.84294     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.26470 \n     0.00000      0.00000      0.63517     -0.00000      0.00000      0.00000     -0.97951     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.63517      0.00000     -0.00000      0.00000     -0.97951     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.63517     -0.97951     -0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"O\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.05639      0.06955      0.00000      0.00000      0.00000     -0.47805      0.00000      0.00000      0.00000 \n     0.06955      0.14744      0.00000      0.00000      0.00000      0.40571      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.42697      0.00000      0.00000      0.00000      0.44424      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.42697      0.00000      0.00000      0.00000      0.44424      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.42697      0.00000      0.00000      0.00000      0.44424 \n    -0.47805      0.40571      0.00000      0.00000      0.00000      1.34164      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.44424      0.00000      0.00000      0.00000      0.46323      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.44424      0.00000      0.00000      0.00000      0.46323      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.44424      0.00000      0.00000      0.00000      0.46323 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -18.60325     -0.86100     -0.32171     -0.32171     -0.32171      1.25208      1.25208      1.25208      2.03198 \n   </alphaeps>\n   <betaeps>\n   -18.55572     -0.74937     -0.21023     -0.21023     -0.21023      1.34679      1.34679      1.34679      2.13776 \n   </betaeps>\n   <alphavectors>\n     0.98040     -0.25965      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.13825 \n     0.10265      0.26293     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.46926 \n    -0.00000     -0.00000      0.00000      0.00000      0.57361      0.00000      0.00000      1.00106      0.00000 \n    -0.00000     -0.00000      0.57361      0.00000     -0.00000      1.00106      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.57361     -0.00000     -0.00000      1.00106     -0.00000      0.00000 \n    -0.02867      0.80881     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.24886 \n    -0.00000     -0.00000      0.00000      0.00000      0.58156     -0.00000     -0.00000     -0.99646     -0.00000 \n    -0.00000      0.00000      0.58156      0.00000     -0.00000     -0.99646     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.58156      0.00000      0.00000     -0.99646      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98086     -0.25632     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.14114 \n     0.10065      0.24009      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.47330 \n     0.00000     -0.00000      0.54205     -0.00000     -0.00000      0.00000      1.01849     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.54205     -0.00000     -0.00000      1.01849     -0.00000 \n     0.00000     -0.00000      0.00000      0.54205     -0.00000      1.01849      0.00000      0.00000      0.00000 \n    -0.02820      0.82816      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.23612 \n     0.00000     -0.00000      0.61241     -0.00000     -0.00000      0.00000     -0.97781     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.61241     -0.00000     -0.00000     -0.97781     -0.00000 \n     0.00000     -0.00000      0.00000      0.61241     -0.00000     -0.97781      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"F\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.05558      0.06974      0.00000      0.00000      0.00000     -0.48208      0.00000      0.00000      0.00000 \n     0.06974      0.14527      0.00000      0.00000      0.00000      0.40460      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.53300      0.00000      0.00000      0.00000      0.55936      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.53301      0.00000      0.00000      0.00000      0.55937      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.53300      0.00000      0.00000      0.00000      0.55936 \n    -0.48208      0.40460      0.00000      0.00000      0.00000      1.35373      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.55936      0.00000      0.00000      0.00000      0.58731      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.55937      0.00000      0.00000      0.00000      0.58732      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.55936      0.00000      0.00000      0.00000      0.58731 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.66668      0.66666      0.66666      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -23.99490     -1.03666     -0.35828     -0.35827     -0.35827      1.67531      1.67531      1.67531      2.73803 \n   </alphaeps>\n   <betaeps>\n   -23.96744     -0.97851     -0.29943     -0.29942     -0.29942      1.72535      1.72535      1.72535      2.79401 \n   </betaeps>\n   <alphavectors>\n     0.97968     -0.26115     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.14837 \n     0.10231      0.25405      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.45331 \n     0.00000      0.00000     -0.00000      0.00000      0.57065     -0.00000      0.99376      0.00000     -0.00000 \n     0.00000      0.00000      0.57065     -0.00000      0.00000      0.99376      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.57065     -0.00000      0.00000      0.00000      0.99376      0.00000 \n    -0.02755      0.81839     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.22006 \n    -0.00000      0.00000     -0.00000      0.00000      0.58851      0.00000     -0.98329      0.00000      0.00000 \n     0.00000      0.00000      0.58851     -0.00000      0.00000     -0.98329     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.58851      0.00000     -0.00000     -0.00000     -0.98329      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.97987     -0.25973      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.14955 \n     0.10149      0.24486     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.45495 \n     0.00000      0.00000      0.00000      0.55771      0.00000     -0.00000      1.00108      0.00000      0.00000 \n     0.00000      0.00000      0.55771     -0.00000      0.00000      1.00108      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.55771      0.00000      0.00000      1.00108     -0.00000 \n    -0.02735      0.82611      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.21485 \n     0.00000      0.00000      0.00000      0.60121     -0.00000      0.00000     -0.97558      0.00000      0.00000 \n     0.00000      0.00000      0.60121     -0.00000      0.00000     -0.97558     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.60121     -0.00000     -0.00000     -0.97558      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ne\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.05521      0.07088      0.00000      0.00000      0.00000     -0.48582      0.00000      0.00000      0.00000 \n     0.07088      0.14131      0.00000      0.00000      0.00000      0.40058      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.64286      0.00000      0.00000      0.00000      0.67430      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.64286      0.00000      0.00000      0.00000      0.67430      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.64286      0.00000      0.00000      0.00000      0.67430 \n    -0.48582      0.40058      0.00000      0.00000      0.00000      1.36905      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.67430      0.00000      0.00000      0.00000      0.70726      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.67430      0.00000      0.00000      0.00000      0.70726      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.67430      0.00000      0.00000      0.00000      0.70726 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -30.05243     -1.21898     -0.38514     -0.38514     -0.38514      2.16847      2.16847      2.16847      3.56398 \n   </alphaeps>\n   <betaeps>\n   -30.05243     -1.21898     -0.38514     -0.38514     -0.38514      2.16847      2.16847      2.16847      3.56398 \n   </betaeps>\n   <alphavectors>\n     0.97923     -0.26213      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.15508 \n     0.10191      0.24550     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.44389 \n    -0.00000      0.00000      0.56695      0.00000     -0.00000     -0.00000      0.99045     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.56695     -0.00000      0.00000      0.00000      0.99045     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.56695      0.99045      0.00000     -0.00000     -0.00000 \n    -0.02670      0.82693     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.20009 \n    -0.00000      0.00000      0.59467     -0.00000      0.00000      0.00000     -0.97405      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.59467      0.00000     -0.00000     -0.00000     -0.97405      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.59467     -0.97405     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.97923     -0.26213      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.15508 \n     0.10191      0.24550     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.44389 \n    -0.00000     -0.00000      0.00000      0.56695      0.00000      0.00000      0.00000      0.99045     -0.00000 \n    -0.00000      0.00000      0.56695      0.00000      0.00000      0.00000      0.99045     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.56695      0.99045     -0.00000     -0.00000      0.00000 \n    -0.02670      0.82693     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.20009 \n    -0.00000     -0.00000      0.00000      0.59467      0.00000     -0.00000     -0.00000     -0.97405     -0.00000 \n     0.00000     -0.00000      0.59467     -0.00000     -0.00000     -0.00000     -0.97405      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.59467     -0.97405      0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Na\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.10750     -0.47876      0.00000      0.00000      0.00000     -0.02676      0.00000      0.00000      0.00000      0.04408      0.00000      0.00000      0.00000 \n    -0.47876      2.12758      0.00000      0.00000      0.00000      0.02758      0.00000      0.00000      0.00000     -0.16825      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.95340      0.00000      0.00000      0.00000      0.18903      0.00000      0.00000      0.00000     -0.09631      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.95340      0.00000      0.00000      0.00000      0.18903      0.00000      0.00000      0.00000     -0.09631      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.95340      0.00000      0.00000      0.00000      0.18903      0.00000      0.00000      0.00000     -0.09631 \n    -0.02676      0.02758      0.00000      0.00000      0.00000      0.35032      0.00000      0.00000      0.00000      0.26235      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.18903      0.00000      0.00000      0.00000      0.01868      0.00000      0.00000      0.00000     -0.00882      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.18903      0.00000      0.00000      0.00000      0.01868      0.00000      0.00000      0.00000     -0.00882      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.18903      0.00000      0.00000      0.00000      0.01868      0.00000      0.00000      0.00000     -0.00882 \n     0.04408     -0.16825      0.00000      0.00000      0.00000      0.26235      0.00000      0.00000      0.00000      0.21350      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.09631      0.00000      0.00000      0.00000     -0.00882      0.00000      0.00000      0.00000      0.00543      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.09631      0.00000      0.00000      0.00000     -0.00882      0.00000      0.00000      0.00000      0.00543      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.09631      0.00000      0.00000      0.00000     -0.00882      0.00000      0.00000      0.00000      0.00543 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99459      0.00180      0.00180      0.00180      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -37.45511     -2.03189     -1.02406     -1.02406     -1.02406     -0.11277     -0.03557     -0.03557     -0.03557      0.04936      0.06965      0.06965      0.06965 \n   </alphaeps>\n   <betaeps>\n   -37.45396     -2.03019     -1.02195     -1.02195     -1.02195     -0.08274     -0.01620     -0.01620     -0.01620      0.06586      0.08869      0.08869      0.08869 \n   </betaeps>\n   <alphavectors>\n     0.98964     -0.27095      0.00000     -0.00000      0.00000      0.04321      0.00000     -0.00000      0.00000      0.02715      0.00000     -0.00000     -0.00000 \n     0.04198      1.02056     -0.00000      0.00000     -0.00000     -0.20190     -0.00000      0.00000     -0.00000      0.02255      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.98796      0.00000     -0.00000     -0.00000     -0.12025     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.17840 \n     0.00000     -0.00000      0.00000      0.98796      0.00000      0.00000     -0.00000     -0.12025      0.00000      0.00000     -0.17840      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.98796     -0.00000     -0.00000      0.00000     -0.12025     -0.00000     -0.00000     -0.17840     -0.00000 \n    -0.00669      0.07233     -0.00000      0.00000     -0.00000      0.58473      0.00000     -0.00000      0.00000      1.98922      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.09778     -0.00000      0.00000      0.00000      0.44421     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.53513 \n     0.00000     -0.00000      0.00000      0.09778     -0.00000     -0.00000     -0.00000      0.44421     -0.00000     -0.00000      1.53513     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.09778     -0.00000     -0.00000      0.00000      0.44421     -0.00000     -0.00000      1.53513      0.00000 \n     0.00208     -0.03769      0.00000     -0.00000      0.00000      0.46029      0.00000     -0.00000      0.00000     -2.03000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.04954      0.00000     -0.00000     -0.00000      0.61758      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.46501 \n    -0.00000      0.00000     -0.00000     -0.04954      0.00000      0.00000      0.00000      0.61758      0.00000      0.00000     -1.46501     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.04954      0.00000      0.00000     -0.00000      0.61758      0.00000      0.00000     -1.46501     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98964     -0.27102      0.00000      0.00000      0.00000      0.04064      0.00000      0.00000      0.00000      0.03028      0.00000     -0.00000      0.00000 \n     0.04198      1.02077     -0.00000     -0.00000     -0.00000     -0.20199     -0.00000     -0.00000     -0.00000      0.00727      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.98859     -0.00000     -0.00000      0.00000      0.00000     -0.09477     -0.00000      0.00000     -0.00000      0.00000     -0.18991 \n    -0.00000      0.00000     -0.00000      0.98859     -0.00000     -0.00000     -0.00000     -0.00000     -0.09477      0.00000     -0.18991      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.98859      0.00000     -0.09477      0.00000      0.00000     -0.00000     -0.00000     -0.18991     -0.00000 \n    -0.00669      0.07028     -0.00000     -0.00000     -0.00000      0.42516      0.00000      0.00000      0.00000      2.02939      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.09359      0.00000      0.00000     -0.00000     -0.00000      0.24566     -0.00000     -0.00000     -0.00000     -0.00000      1.57937 \n    -0.00000      0.00000     -0.00000      0.09359      0.00000      0.00000      0.00000      0.00000      0.24566     -0.00000      1.57937     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.09359     -0.00000      0.24566      0.00000      0.00000     -0.00000     -0.00000      1.57937      0.00000 \n     0.00208     -0.03677      0.00000      0.00000      0.00000      0.61983      0.00000      0.00000      0.00000     -1.98712     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.04778     -0.00000     -0.00000     -0.00000     -0.00000      0.79869      0.00000      0.00000      0.00000      0.00000     -1.37475 \n     0.00000     -0.00000      0.00000     -0.04778     -0.00000     -0.00000     -0.00000     -0.00000      0.79869      0.00000     -1.37475      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.04778     -0.00000      0.79869     -0.00000     -0.00000      0.00000      0.00000     -1.37475     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mg\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.11664     -0.50824      0.00000      0.00000      0.00000     -0.02827      0.00000      0.00000      0.00000      0.10345      0.00000      0.00000      0.00000 \n    -0.50824      2.21493      0.00000      0.00000      0.00000     -0.03207      0.00000      0.00000      0.00000     -0.45841      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.90554      0.00000      0.00000      0.00000      0.21466      0.00000      0.00000      0.00000     -0.08111      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.90554      0.00000      0.00000      0.00000      0.21466      0.00000      0.00000      0.00000     -0.08111      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.90554      0.00000      0.00000      0.00000      0.21466      0.00000      0.00000      0.00000     -0.08111 \n    -0.02827     -0.03207      0.00000      0.00000      0.00000      0.35882      0.00000      0.00000      0.00000      0.52945      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.21466      0.00000      0.00000      0.00000      0.02418      0.00000      0.00000      0.00000     -0.00914      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.21466      0.00000      0.00000      0.00000      0.02418      0.00000      0.00000      0.00000     -0.00914      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.21466      0.00000      0.00000      0.00000      0.02418      0.00000      0.00000      0.00000     -0.00914 \n     0.10345     -0.45841      0.00000      0.00000      0.00000      0.52945      0.00000      0.00000      0.00000      0.85887      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.08111      0.00000      0.00000      0.00000     -0.00914      0.00000      0.00000      0.00000      0.00346      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.08111      0.00000      0.00000      0.00000     -0.00914      0.00000      0.00000      0.00000      0.00346      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.08111      0.00000      0.00000      0.00000     -0.00914      0.00000      0.00000      0.00000      0.00346 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -45.61130     -2.86364     -1.67657     -1.67657     -1.67657     -0.17607     -0.05127     -0.05127     -0.05127      0.13156      0.17092      0.17092      0.17092 \n   </alphaeps>\n   <betaeps>\n   -45.61130     -2.86364     -1.67657     -1.67657     -1.67657     -0.17607     -0.05127     -0.05127     -0.05127      0.13156      0.17092      0.17092      0.17092 \n   </betaeps>\n   <alphavectors>\n     0.98869     -0.27856      0.00000      0.00000      0.00000      0.05670     -0.00000      0.00000     -0.00000      0.04798     -0.00000      0.00000     -0.00000 \n     0.04442      1.01153     -0.00000     -0.00000     -0.00000     -0.28688      0.00000     -0.00000      0.00000     -0.07928      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.97610      0.00000     -0.00000     -0.00000     -0.16275      0.00000     -0.00000     -0.28321      0.00000 \n     0.00000      0.00000     -0.00000      0.97610     -0.00000      0.00000     -0.16275     -0.00000     -0.00000     -0.00000     -0.28321     -0.00000      0.00000 \n    -0.00000      0.00000      0.97610      0.00000      0.00000     -0.00000      0.00000     -0.16275      0.00000     -0.00000      0.00000     -0.00000     -0.28321 \n    -0.00937      0.10118     -0.00000     -0.00000     -0.00000      0.41120     -0.00000     -0.00000     -0.00000      1.80027     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.10996     -0.00000      0.00000      0.00000      0.34500     -0.00000      0.00000      1.36361      0.00000 \n     0.00000      0.00000     -0.00000      0.10996      0.00000     -0.00000      0.34500      0.00000      0.00000      0.00000      1.36361     -0.00000      0.00000 \n    -0.00000      0.00000      0.10996     -0.00000     -0.00000     -0.00000      0.00000      0.34500      0.00000      0.00000     -0.00000      0.00000      1.36361 \n     0.00319     -0.04125      0.00000      0.00000      0.00000      0.65401     -0.00000     -0.00000     -0.00000     -1.72554      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.04155      0.00000     -0.00000     -0.00000      0.73665      0.00000     -0.00000     -1.16951     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.04155     -0.00000      0.00000      0.73665     -0.00000     -0.00000     -0.00000     -1.16951      0.00000     -0.00000 \n     0.00000     -0.00000     -0.04155      0.00000      0.00000      0.00000     -0.00000      0.73665     -0.00000     -0.00000      0.00000     -0.00000     -1.16951 \n   </alphavectors>\n   <betavectors>\n     0.98869     -0.27856      0.00000     -0.00000      0.00000      0.05670      0.00000      0.00000      0.00000      0.04798     -0.00000      0.00000     -0.00000 \n     0.04442      1.01153     -0.00000      0.00000     -0.00000     -0.28688     -0.00000     -0.00000     -0.00000     -0.07928      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.97610      0.00000      0.00000     -0.16275      0.00000      0.00000     -0.00000     -0.28321     -0.00000 \n    -0.00000      0.00000      0.97610      0.00000     -0.00000      0.00000     -0.16275      0.00000     -0.00000     -0.00000     -0.28321     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.97610      0.00000     -0.00000     -0.00000     -0.00000     -0.16275     -0.00000      0.00000     -0.00000     -0.28321 \n    -0.00937      0.10118     -0.00000      0.00000     -0.00000      0.41120      0.00000      0.00000     -0.00000      1.80027     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.10996      0.00000      0.00000      0.34500     -0.00000     -0.00000      0.00000      1.36361     -0.00000 \n    -0.00000      0.00000      0.10996     -0.00000      0.00000     -0.00000      0.34500     -0.00000      0.00000      0.00000      1.36361     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.10996     -0.00000     -0.00000     -0.00000     -0.00000      0.34500      0.00000     -0.00000      0.00000      1.36361 \n     0.00319     -0.04125      0.00000     -0.00000      0.00000      0.65401      0.00000      0.00000     -0.00000     -1.72554      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.04155     -0.00000     -0.00000      0.73665      0.00000      0.00000     -0.00000     -1.16951      0.00000 \n     0.00000     -0.00000     -0.04155      0.00000     -0.00000      0.00000      0.73665      0.00000     -0.00000     -0.00000     -1.16951      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.04155      0.00000      0.00000      0.00000      0.00000      0.73665     -0.00000      0.00000     -0.00000     -1.16951 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sc\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.15975     -0.62658      0.00000      0.00000      0.00000      0.07578      0.00000      0.00000      0.00000     -0.07895      0.00000      0.00000      0.00000     -0.00344      0.00000      0.00000      0.00000      0.04545      0.00000      0.00000      0.04545      0.00000      0.04545      0.02883      0.00000      0.00000      0.02883      0.00000      0.02883 \n    -0.62658      2.46089      0.00000      0.00000      0.00000     -0.20211      0.00000      0.00000      0.00000      0.23717      0.00000      0.00000      0.00000      0.03965      0.00000      0.00000      0.00000     -0.26662      0.00000      0.00000     -0.26662      0.00000     -0.26662     -0.08153      0.00000      0.00000     -0.08153      0.00000     -0.08153 \n     0.00000      0.00000      2.20871      0.00000      0.00000      0.00000     -0.67010      0.00000      0.00000      0.00000     -0.06951      0.00000      0.00000      0.00000      0.03176      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.20871      0.00000      0.00000      0.00000     -0.67010      0.00000      0.00000      0.00000     -0.06951      0.00000      0.00000      0.00000      0.03176      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.20871      0.00000      0.00000      0.00000     -0.67010      0.00000      0.00000      0.00000     -0.06951      0.00000      0.00000      0.00000      0.03176      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07578     -0.20211      0.00000      0.00000      0.00000      1.57081      0.00000      0.00000      0.00000     -0.36681      0.00000      0.00000      0.00000     -0.19438      0.00000      0.00000      0.00000      0.13978      0.00000      0.00000      0.13978      0.00000      0.13978      0.01120      0.00000      0.00000      0.01120      0.00000      0.01120 \n     0.00000      0.00000     -0.67010      0.00000      0.00000      0.00000      2.15586      0.00000      0.00000      0.00000      0.13274      0.00000      0.00000      0.00000     -0.05525      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.67010      0.00000      0.00000      0.00000      2.15586      0.00000      0.00000      0.00000      0.13274      0.00000      0.00000      0.00000     -0.05525      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.67010      0.00000      0.00000      0.00000      2.15586      0.00000      0.00000      0.00000      0.13274      0.00000      0.00000      0.00000     -0.05525      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.07895      0.23717      0.00000      0.00000      0.00000     -0.36681      0.00000      0.00000      0.00000      1.02284      0.00000      0.00000      0.00000      0.45131      0.00000      0.00000      0.00000     -0.04031      0.00000      0.00000     -0.04031      0.00000     -0.04031      0.02737      0.00000      0.00000      0.02737      0.00000      0.02737 \n     0.00000      0.00000     -0.06951      0.00000      0.00000      0.00000      0.13274      0.00000      0.00000      0.00000      0.00859      0.00000      0.00000      0.00000     -0.00360      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.06951      0.00000      0.00000      0.00000      0.13274      0.00000      0.00000      0.00000      0.00859      0.00000      0.00000      0.00000     -0.00360      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06951      0.00000      0.00000      0.00000      0.13274      0.00000      0.00000      0.00000      0.00859      0.00000      0.00000      0.00000     -0.00360      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00344      0.03965      0.00000      0.00000      0.00000     -0.19438      0.00000      0.00000      0.00000      0.45131      0.00000      0.00000      0.00000      0.20370      0.00000      0.00000      0.00000     -0.01387      0.00000      0.00000     -0.01387      0.00000     -0.01387      0.01374      0.00000      0.00000      0.01374      0.00000      0.01374 \n     0.00000      0.00000      0.03176      0.00000      0.00000      0.00000     -0.05525      0.00000      0.00000      0.00000     -0.00360      0.00000      0.00000      0.00000      0.00153      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03176      0.00000      0.00000      0.00000     -0.05525      0.00000      0.00000      0.00000     -0.00360      0.00000      0.00000      0.00000      0.00153      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03176      0.00000      0.00000      0.00000     -0.05525      0.00000      0.00000      0.00000     -0.00360      0.00000      0.00000      0.00000      0.00153      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.04545     -0.26662      0.00000      0.00000      0.00000      0.13978      0.00000      0.00000      0.00000     -0.04031      0.00000      0.00000      0.00000     -0.01387      0.00000      0.00000      0.00000      0.10595      0.00000      0.00000      0.00443      0.00000      0.00443      0.08208      0.00000      0.00000     -0.02673      0.00000     -0.02673 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.20306      0.00000      0.00000      0.00000      0.00000      0.00000      0.21763      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.20306      0.00000      0.00000      0.00000      0.00000      0.00000      0.21763      0.00000      0.00000      0.00000 \n     0.04545     -0.26662      0.00000      0.00000      0.00000      0.13978      0.00000      0.00000      0.00000     -0.04031      0.00000      0.00000      0.00000     -0.01387      0.00000      0.00000      0.00000      0.00443      0.00000      0.00000      0.10596      0.00000      0.00442     -0.02673      0.00000      0.00000      0.08208      0.00000     -0.02673 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.20306      0.00000      0.00000      0.00000      0.00000      0.00000      0.21763      0.00000 \n     0.04545     -0.26662      0.00000      0.00000      0.00000      0.13978      0.00000      0.00000      0.00000     -0.04031      0.00000      0.00000      0.00000     -0.01387      0.00000      0.00000      0.00000      0.00443      0.00000      0.00000      0.00442      0.00000      0.10596     -0.02673      0.00000      0.00000     -0.02673      0.00000      0.08208 \n     0.02883     -0.08153      0.00000      0.00000      0.00000      0.01120      0.00000      0.00000      0.00000      0.02737      0.00000      0.00000      0.00000      0.01374      0.00000      0.00000      0.00000      0.08208      0.00000      0.00000     -0.02673      0.00000     -0.02673      0.08199      0.00000      0.00000     -0.03463      0.00000     -0.03463 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21763      0.00000      0.00000      0.00000      0.00000      0.00000      0.23324      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21763      0.00000      0.00000      0.00000      0.00000      0.00000      0.23324      0.00000      0.00000      0.00000 \n     0.02883     -0.08153      0.00000      0.00000      0.00000      0.01120      0.00000      0.00000      0.00000      0.02737      0.00000      0.00000      0.00000      0.01374      0.00000      0.00000      0.00000     -0.02673      0.00000      0.00000      0.08208      0.00000     -0.02673     -0.03463      0.00000      0.00000      0.08199      0.00000     -0.03463 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21763      0.00000      0.00000      0.00000      0.00000      0.00000      0.23324      0.00000 \n     0.02883     -0.08153      0.00000      0.00000      0.00000      0.01120      0.00000      0.00000      0.00000      0.02737      0.00000      0.00000      0.00000      0.01374      0.00000      0.00000      0.00000     -0.02673      0.00000      0.00000     -0.02673      0.00000      0.08208     -0.03463      0.00000      0.00000     -0.03463      0.00000      0.08199 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99934      0.20011      0.20011      0.20011      0.20011      0.20011      0.00004      0.00004      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99291      0.00141      0.00141      0.00141      0.00141      0.00141      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -159.04160    -17.13185    -14.11906    -14.11906    -14.11906     -1.99011     -1.22290     -1.22290     -1.22290     -0.15495     -0.09763     -0.09763     -0.09763     -0.09763     -0.09763     -0.05338     -0.05338     -0.05338      0.03349      0.06572      0.06572      0.06572      0.50460      1.00365      1.00365      1.00365      1.00365      1.00365     12.02361 \n   </alphaeps>\n   <betaeps>\n  -159.04150    -17.12313    -14.11256    -14.11256    -14.11256     -1.95985     -1.19282     -1.19282     -1.19282     -0.14629     -0.06937     -0.06937     -0.06937     -0.06937     -0.06937     -0.05072     -0.05072     -0.05072      0.03672      0.06899      0.06899      0.06899      0.51863      1.02880      1.02880      1.02880      1.02880      1.02880     12.05021 \n   </betaeps>\n   <alphavectors>\n     0.98477     -0.31009     -0.00000     -0.00000      0.00000      0.11414     -0.00000     -0.00000      0.00000     -0.03091      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.01433      0.00000      0.00000     -0.00000      0.05758     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.09241 \n     0.05474      1.01525      0.00000      0.00000     -0.00000     -0.42908      0.00000      0.00000     -0.00000      0.11527     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.10368     -0.00000     -0.00000      0.00000     -0.18491      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.40330 \n    -0.00000     -0.00000     -0.00000      0.98437     -0.00000      0.00000     -0.00000     -0.00000     -0.36798      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06923     -0.00000      0.00000      0.00000      0.07685     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.98437     -0.00000     -0.36798      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06923     -0.00000      0.00000      0.00000      0.07685      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.98437     -0.00000      0.00000     -0.00000      0.00000     -0.36798      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06923      0.00000     -0.00000      0.00000      0.07685      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.02160      0.26735      0.00000      0.00000     -0.00000      0.79655     -0.00000     -0.00000      0.00000     -0.28733      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.02463      0.00000      0.00000     -0.00000      0.81736     -0.00000      0.00000      0.00000     -0.00000     -0.00000     12.98750 \n    -0.00000     -0.00000     -0.00000      0.04728      0.00000     -0.00000      0.00000      0.00000      1.03740     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.23310      0.00000     -0.00000     -0.00000     -0.26648      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04728      0.00000      1.03740     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.23310      0.00000     -0.00000     -0.00000     -0.26648     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.04728      0.00000     -0.00000      0.00000     -0.00000      1.03740     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.23310     -0.00000      0.00000     -0.00000     -0.26648     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00598      0.04178      0.00000      0.00000     -0.00000      0.00773     -0.00000     -0.00000      0.00000      0.72836     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.89861     -0.00000     -0.00000      0.00000      2.62732      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.05854 \n     0.00000      0.00000      0.00000     -0.01126      0.00000     -0.00000      0.00000      0.00000      0.06352      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.62315     -0.00000      0.00000      0.00000      1.47493     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.01126      0.00000      0.06352      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.62315     -0.00000      0.00000      0.00000      1.47493      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.01126      0.00000     -0.00000      0.00000     -0.00000      0.06352      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.62315      0.00000     -0.00000      0.00000      1.47493      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00299     -0.01750     -0.00000     -0.00000      0.00000     -0.00399      0.00000      0.00000     -0.00000      0.29425     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -2.02318      0.00000      0.00000      0.00000     -1.22779      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.41081 \n    -0.00000     -0.00000     -0.00000      0.00611      0.00000      0.00000     -0.00000     -0.00000     -0.02653      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.45855      0.00000     -0.00000     -0.00000     -1.49280     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00611     -0.00000     -0.02653     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.45855      0.00000     -0.00000     -0.00000     -1.49280      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00611     -0.00000      0.00000     -0.00000      0.00000     -0.02653     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.45855     -0.00000      0.00000     -0.00000     -1.49280      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01606     -0.08257     -0.00000     -0.00000      0.00000      0.10707     -0.00000     -0.00000      0.00000     -0.02473      0.00000      0.00000      0.50192     -0.00000     -0.28978      0.00000     -0.00000      0.00000      0.00940     -0.00000      0.00000     -0.00000     -0.00804      0.00000     -0.00000      0.79364     -0.00000     -0.45821     -5.49052 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.00385     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.58728      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.00385      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.58728     -0.00000      0.00000 \n    -0.01606     -0.08257     -0.00000     -0.00000      0.00000      0.10707     -0.00000     -0.00000      0.00000     -0.02473      0.00000      0.00000     -0.00000     -0.00000      0.57957     -0.00000      0.00000     -0.00000      0.00940      0.00000     -0.00000      0.00000     -0.00804     -0.00000      0.00000     -0.00000     -0.00000      0.91641     -5.49052 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.00385      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.58728      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01606     -0.08257     -0.00000     -0.00000      0.00000      0.10707     -0.00000     -0.00000      0.00000     -0.02473      0.00000      0.00000     -0.50192     -0.00000     -0.28979      0.00000     -0.00000      0.00000      0.00940     -0.00000      0.00000     -0.00000     -0.00804      0.00000     -0.00000     -0.79364      0.00000     -0.45821     -5.49052 \n     0.00230     -0.03208     -0.00000     -0.00000      0.00000      0.02507     -0.00000     -0.00000      0.00000      0.02697     -0.00000     -0.00000      0.53789      0.00000     -0.31055      0.00000     -0.00000      0.00000     -0.01240     -0.00000      0.00000     -0.00000     -0.99048      0.00000     -0.00000     -0.76972      0.00000      0.44439     -1.02454 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.07578      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.53943     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.07578     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.53943      0.00000     -0.00000 \n     0.00230     -0.03208     -0.00000     -0.00000      0.00000      0.02507     -0.00000     -0.00000      0.00000      0.02697     -0.00000     -0.00000     -0.00000      0.00000      0.62110     -0.00000      0.00000     -0.00000     -0.01240      0.00000     -0.00000      0.00000     -0.99048     -0.00000      0.00000      0.00000     -0.00000     -0.88879     -1.02454 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.07578      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.53943      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00230     -0.03208     -0.00000     -0.00000      0.00000      0.02507     -0.00000     -0.00000      0.00000      0.02697     -0.00000     -0.00000     -0.53789      0.00000     -0.31055      0.00000     -0.00000      0.00000     -0.01240     -0.00000      0.00000     -0.00000     -0.99048      0.00000     -0.00000      0.76971     -0.00000      0.44440     -1.02454 \n   </alphavectors>\n   <betavectors>\n     0.98477     -0.31014     -0.00000     -0.00000      0.00000      0.11402     -0.00000      0.00000      0.00000     -0.02970     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.01457     -0.00000      0.00000     -0.00000      0.05809     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.09244 \n     0.05474      1.01543      0.00000      0.00000     -0.00000     -0.42867      0.00000     -0.00000     -0.00000      0.10955      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.10493      0.00000     -0.00000      0.00000     -0.18747      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.40339 \n    -0.00000     -0.00000     -0.00000      0.98453     -0.00000      0.00000     -0.00000     -0.36745      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.06733     -0.00000      0.00000     -0.00000      0.07909     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98453     -0.00000     -0.36745      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.06733      0.00000     -0.00000      0.00000      0.07909      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.98453      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.36745      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.06733     -0.00000      0.00000      0.00000      0.07909     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.02159      0.26641      0.00000      0.00000     -0.00000      0.79657     -0.00000      0.00000      0.00000     -0.27650     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02431      0.00000      0.00000     -0.00000      0.82444     -0.00000     -0.00000      0.00000      0.00000      0.00000     12.98731 \n    -0.00000     -0.00000     -0.00000      0.04685      0.00000     -0.00000      0.00000      1.03693     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.22644      0.00000     -0.00000      0.00000     -0.27405      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.04685      0.00000      1.03693     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.22644     -0.00000      0.00000     -0.00000     -0.27405     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.04685     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.03693     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.22644      0.00000     -0.00000     -0.00000     -0.27405      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00598      0.04154      0.00000      0.00000     -0.00000      0.00862     -0.00000      0.00000      0.00000      0.70178     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.95420      0.00000     -0.00000      0.00000      2.59377     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.05809 \n     0.00000      0.00000      0.00000     -0.01116      0.00000     -0.00000      0.00000      0.06549      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.58008     -0.00000      0.00000     -0.00000      1.49231     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.01116      0.00000      0.06549      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.58008      0.00000     -0.00000      0.00000      1.49231      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.01116     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.06549      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.58008     -0.00000      0.00000      0.00000      1.49231     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00299     -0.01739     -0.00000     -0.00000      0.00000     -0.00438      0.00000     -0.00000     -0.00000      0.34255     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -2.02834     -0.00000      0.00000     -0.00000     -1.20662      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.41064 \n    -0.00000     -0.00000     -0.00000      0.00605     -0.00000      0.00000     -0.00000     -0.02729     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.50163      0.00000     -0.00000      0.00000     -1.47887      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00605     -0.00000     -0.02729     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.50163     -0.00000      0.00000     -0.00000     -1.47887     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00605      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02729      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.50163      0.00000     -0.00000     -0.00000     -1.47887     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.01606     -0.08238     -0.00000     -0.00000      0.00000      0.10703     -0.00000      0.00000      0.00000     -0.02494     -0.28829      0.49932      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00885      0.00000      0.00000     -0.00000     -0.00912     -0.45915      0.00000      0.79528      0.00000      0.00000     -5.49052 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.99865      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.59055     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.99865      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.59055     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.01606     -0.08238     -0.00000     -0.00000      0.00000      0.10703     -0.00000      0.00000      0.00000     -0.02494      0.57657      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00885     -0.00000     -0.00000      0.00000     -0.00912      0.91831      0.00000      0.00000     -0.00000     -0.00000     -5.49052 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.99865     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.59055     -0.00000 \n    -0.01606     -0.08238     -0.00000     -0.00000      0.00000      0.10703     -0.00000      0.00000      0.00000     -0.02494     -0.28828     -0.49932      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00885      0.00000      0.00000     -0.00000     -0.00912     -0.45915     -0.00000     -0.79528      0.00000      0.00000     -5.49052 \n     0.00230     -0.03192     -0.00000     -0.00000      0.00000      0.02499     -0.00000      0.00000      0.00000      0.01438     -0.31201      0.54041      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02416      0.00000      0.00000     -0.00000     -0.99077      0.44338     -0.00000     -0.76795      0.00000      0.00000     -1.02431 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.08082     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.53590      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.08082     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.53590      0.00000      0.00000      0.00000     -0.00000 \n     0.00230     -0.03192     -0.00000     -0.00000      0.00000      0.02499     -0.00000      0.00000      0.00000      0.01438      0.62401      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.02416     -0.00000     -0.00000      0.00000     -0.99077     -0.88675      0.00000     -0.00000     -0.00000     -0.00000     -1.02431 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.08082      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.53590     -0.00000 \n     0.00230     -0.03192     -0.00000     -0.00000      0.00000      0.02499     -0.00000      0.00000      0.00000      0.01438     -0.31200     -0.54041      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02416      0.00000      0.00000     -0.00000     -0.99077      0.44338      0.00000      0.76795      0.00000      0.00000     -1.02431 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ti\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.15948     -0.62733      0.00000      0.00000      0.00000      0.24181      0.00000      0.00000      0.00000     -0.06127      0.00000      0.00000      0.00000     -0.01072      0.00000      0.00000      0.00000     -0.02228      0.00000      0.00000     -0.02228      0.00000     -0.02228      0.01483      0.00000      0.00000      0.01483      0.00000      0.01483 \n    -0.62733      2.48104      0.00000      0.00000      0.00000     -0.39433      0.00000      0.00000      0.00000      0.22346      0.00000      0.00000      0.00000      0.04313      0.00000      0.00000      0.00000     -0.19210      0.00000      0.00000     -0.19210      0.00000     -0.19210     -0.07916      0.00000      0.00000     -0.07916      0.00000     -0.07916 \n     0.00000      0.00000      2.22121      0.00000      0.00000      0.00000     -0.69275      0.00000      0.00000      0.00000     -0.06473      0.00000      0.00000      0.00000      0.02863      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.22121      0.00000      0.00000      0.00000     -0.69275      0.00000      0.00000      0.00000     -0.06473      0.00000      0.00000      0.00000      0.02863      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.22121      0.00000      0.00000      0.00000     -0.69275      0.00000      0.00000      0.00000     -0.06473      0.00000      0.00000      0.00000      0.02863      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.24181     -0.39433      0.00000      0.00000      0.00000      1.46726      0.00000      0.00000      0.00000     -0.37791      0.00000      0.00000      0.00000     -0.16866      0.00000      0.00000      0.00000      0.16531      0.00000      0.00000      0.16531      0.00000      0.16531      0.03193      0.00000      0.00000      0.03193      0.00000      0.03193 \n     0.00000      0.00000     -0.69275      0.00000      0.00000      0.00000      2.17322      0.00000      0.00000      0.00000      0.12497      0.00000      0.00000      0.00000     -0.05093      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.69275      0.00000      0.00000      0.00000      2.17322      0.00000      0.00000      0.00000      0.12497      0.00000      0.00000      0.00000     -0.05093      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.69275      0.00000      0.00000      0.00000      2.17322      0.00000      0.00000      0.00000      0.12497      0.00000      0.00000      0.00000     -0.05093      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.06127      0.22346      0.00000      0.00000      0.00000     -0.37791      0.00000      0.00000      0.00000      1.10184      0.00000      0.00000      0.00000      0.44244      0.00000      0.00000      0.00000     -0.04508      0.00000      0.00000     -0.04508      0.00000     -0.04508      0.02250      0.00000      0.00000      0.02250      0.00000      0.02250 \n     0.00000      0.00000     -0.06473      0.00000      0.00000      0.00000      0.12497      0.00000      0.00000      0.00000      0.00751      0.00000      0.00000      0.00000     -0.00309      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.06473      0.00000      0.00000      0.00000      0.12497      0.00000      0.00000      0.00000      0.00751      0.00000      0.00000      0.00000     -0.00309      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06473      0.00000      0.00000      0.00000      0.12497      0.00000      0.00000      0.00000      0.00751      0.00000      0.00000      0.00000     -0.00309      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01072      0.04313      0.00000      0.00000      0.00000     -0.16866      0.00000      0.00000      0.00000      0.44244      0.00000      0.00000      0.00000      0.18407      0.00000      0.00000      0.00000     -0.01717      0.00000      0.00000     -0.01717      0.00000     -0.01717      0.00919      0.00000      0.00000      0.00919      0.00000      0.00919 \n     0.00000      0.00000      0.02863      0.00000      0.00000      0.00000     -0.05093      0.00000      0.00000      0.00000     -0.00309      0.00000      0.00000      0.00000      0.00127      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02863      0.00000      0.00000      0.00000     -0.05093      0.00000      0.00000      0.00000     -0.00309      0.00000      0.00000      0.00000      0.00127      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02863      0.00000      0.00000      0.00000     -0.05093      0.00000      0.00000      0.00000     -0.00309      0.00000      0.00000      0.00000      0.00127      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02228     -0.19210      0.00000      0.00000      0.00000      0.16531      0.00000      0.00000      0.00000     -0.04508      0.00000      0.00000      0.00000     -0.01717      0.00000      0.00000      0.00000      0.16659      0.00000      0.00000     -0.03613      0.00000     -0.03613      0.15217      0.00000      0.00000     -0.06328      0.00000     -0.06328 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40544      0.00000      0.00000      0.00000      0.00000      0.00000      0.43090      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40545      0.00000      0.00000      0.00000      0.00000      0.00000      0.43091      0.00000      0.00000      0.00000 \n    -0.02228     -0.19210      0.00000      0.00000      0.00000      0.16531      0.00000      0.00000      0.00000     -0.04508      0.00000      0.00000      0.00000     -0.01717      0.00000      0.00000      0.00000     -0.03613      0.00000      0.00000      0.16659      0.00000     -0.03613     -0.06328      0.00000      0.00000      0.15217      0.00000     -0.06328 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40545      0.00000      0.00000      0.00000      0.00000      0.00000      0.43091      0.00000 \n    -0.02228     -0.19210      0.00000      0.00000      0.00000      0.16531      0.00000      0.00000      0.00000     -0.04508      0.00000      0.00000      0.00000     -0.01717      0.00000      0.00000      0.00000     -0.03613      0.00000      0.00000     -0.03613      0.00000      0.16659     -0.06328      0.00000      0.00000     -0.06328      0.00000      0.15216 \n     0.01483     -0.07916      0.00000      0.00000      0.00000      0.03193      0.00000      0.00000      0.00000      0.02250      0.00000      0.00000      0.00000      0.00919      0.00000      0.00000      0.00000      0.15217      0.00000      0.00000     -0.06328      0.00000     -0.06328      0.15682      0.00000      0.00000     -0.07216      0.00000     -0.07215 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43090      0.00000      0.00000      0.00000      0.00000      0.00000      0.45796      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43091      0.00000      0.00000      0.00000      0.00000      0.00000      0.45797      0.00000      0.00000      0.00000 \n     0.01483     -0.07916      0.00000      0.00000      0.00000      0.03193      0.00000      0.00000      0.00000      0.02250      0.00000      0.00000      0.00000      0.00919      0.00000      0.00000      0.00000     -0.06328      0.00000      0.00000      0.15217      0.00000     -0.06328     -0.07216      0.00000      0.00000      0.15682      0.00000     -0.07215 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43091      0.00000      0.00000      0.00000      0.00000      0.00000      0.45797      0.00000 \n     0.01483     -0.07916      0.00000      0.00000      0.00000      0.03193      0.00000      0.00000      0.00000      0.02250      0.00000      0.00000      0.00000      0.00919      0.00000      0.00000      0.00000     -0.06328      0.00000      0.00000     -0.06328      0.00000      0.15216     -0.07215      0.00000      0.00000     -0.07215      0.00000      0.15682 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99477      0.40105      0.40105      0.40104      0.40104      0.40104      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99747      0.00050      0.00050      0.00050      0.00050      0.00050      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -176.00970    -19.34212    -16.11933    -16.11933    -16.11933     -2.24849     -1.39985     -1.39985     -1.39985     -0.16439     -0.12464     -0.12464     -0.12464     -0.12464     -0.12464     -0.05295     -0.05295     -0.05295      0.03395      0.06889      0.06889      0.06889      0.65078      1.29753      1.29753      1.29754      1.29754      1.29754     14.32270 \n   </alphaeps>\n   <betaeps>\n  -176.00930    -19.32011    -16.10306    -16.10306    -16.10306     -2.18192     -1.33432     -1.33432     -1.33432     -0.14976     -0.06361     -0.06361     -0.06361     -0.06361     -0.06361     -0.04910     -0.04910     -0.04910      0.03981      0.07415      0.07415      0.07415      0.68281      1.35179      1.35179      1.35179      1.35179      1.35179     14.36834 \n   </betaeps>\n   <alphavectors>\n     0.98359     -0.31213     -0.00000     -0.00000     -0.00000      0.11796      0.00000     -0.00000     -0.00000     -0.03205      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.01631      0.00000      0.00000     -0.00000      0.06431      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.16210 \n     0.05953      1.01396      0.00000      0.00000      0.00000     -0.44272     -0.00000      0.00000      0.00000      0.11849     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.10034     -0.00000     -0.00000      0.00000     -0.22432     -0.00000      0.00000      0.00000      0.00000      0.00000      0.71947 \n     0.00000     -0.00000      0.00000      0.98434     -0.00000     -0.00000     -0.00000     -0.00000     -0.37656      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.06639     -0.00000      0.00000      0.00000      0.07348      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.98434     -0.00000      0.00000     -0.37656     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06639      0.00000      0.00000     -0.00000      0.07348      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.98434     -0.00000      0.00000     -0.00000     -0.37656     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.06639     -0.00000     -0.00000      0.00000      0.07348      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.07563      0.17602      0.00000      0.00000      0.00000      0.79160      0.00000     -0.00000     -0.00000     -0.27939      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02264      0.00000     -0.00000     -0.00000      0.95658      0.00000     -0.00000      0.00000      0.00000     -0.00000     13.21652 \n     0.00000     -0.00000      0.00000      0.04634      0.00000      0.00000      0.00000      0.00000      1.04196     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.21879      0.00000     -0.00000     -0.00000     -0.24851      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.04634      0.00000     -0.00000      1.04196      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.21879     -0.00000     -0.00000      0.00000     -0.24851     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.04634     -0.00000      0.00000     -0.00000      1.04196      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.21879      0.00000      0.00000     -0.00000     -0.24851     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00091      0.03006     -0.00000      0.00000      0.00000      0.00579     -0.00000     -0.00000     -0.00000      0.76783     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.71188      0.00000     -0.00000      0.00000      2.08377     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.21933 \n    -0.00000      0.00000     -0.00000     -0.00989      0.00000      0.00000      0.00000      0.00000      0.05800      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.62645     -0.00000      0.00000      0.00000      1.38808     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00989      0.00000     -0.00000      0.05800     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.62645      0.00000      0.00000     -0.00000      1.38808      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00989      0.00000     -0.00000      0.00000      0.05800      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.62645     -0.00000     -0.00000      0.00000      1.38808      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00006     -0.01317      0.00000     -0.00000     -0.00000     -0.00208      0.00000      0.00000      0.00000      0.26048     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.88290     -0.00000      0.00000     -0.00000     -0.98663     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.50315 \n     0.00000     -0.00000      0.00000      0.00516     -0.00000     -0.00000     -0.00000     -0.00000     -0.02369     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.46121      0.00000     -0.00000     -0.00000     -1.41530      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00516     -0.00000      0.00000     -0.02369      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.46121     -0.00000     -0.00000      0.00000     -1.41530     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00516     -0.00000      0.00000     -0.00000     -0.02369     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.46121     -0.00000     -0.00000      0.00000     -1.41530     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.03855     -0.04207     -0.00000     -0.00000     -0.00000      0.10734     -0.00000     -0.00000     -0.00000     -0.02945      0.00000     -0.00000      0.50243     -0.00000     -0.29008     -0.00000      0.00000     -0.00000     -0.01307     -0.00000     -0.00000      0.00000     -0.04429     -0.00000      0.00000      0.00000      0.79813     -0.46080     -5.45925 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.00485      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.59627     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.00485      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.59627      0.00000      0.00000     -0.00000     -0.00000 \n    -0.03855     -0.04207     -0.00000     -0.00000     -0.00000      0.10734      0.00000     -0.00000     -0.00000     -0.02945      0.00000     -0.00000     -0.50243     -0.00000     -0.29008     -0.00000      0.00000     -0.00000     -0.01307     -0.00000     -0.00000      0.00000     -0.04429     -0.00000      0.00000     -0.00000     -0.79813     -0.46080     -5.45925 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.00485      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.59627      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.03855     -0.04207     -0.00000     -0.00000     -0.00000      0.10734     -0.00000     -0.00000     -0.00000     -0.02945      0.00000     -0.00000      0.00000     -0.00000      0.58015      0.00000     -0.00000      0.00000     -0.01307      0.00000      0.00000     -0.00000     -0.04429      0.00000     -0.00000     -0.00000     -0.00000      0.92161     -5.45925 \n    -0.00424     -0.02673      0.00000     -0.00000     -0.00000      0.03161      0.00000     -0.00000     -0.00000      0.02525     -0.00000      0.00000      0.53396      0.00000     -0.30828     -0.00000      0.00000     -0.00000      0.00633     -0.00000     -0.00000      0.00000     -0.88969     -0.00000      0.00000     -0.00000     -0.77739      0.44883     -1.36681 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.06792     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.55478      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.06792     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.55478     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00424     -0.02673     -0.00000     -0.00000     -0.00000      0.03161      0.00000     -0.00000     -0.00000      0.02525     -0.00000      0.00000     -0.53396      0.00000     -0.30828     -0.00000      0.00000     -0.00000      0.00633     -0.00000     -0.00000      0.00000     -0.88969     -0.00000      0.00000      0.00000      0.77739      0.44883     -1.36681 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.06792     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.55478     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00424     -0.02673      0.00000     -0.00000     -0.00000      0.03161     -0.00000     -0.00000     -0.00000      0.02525     -0.00000      0.00000      0.00000      0.00000      0.61656     -0.00000     -0.00000      0.00000      0.00633      0.00000      0.00000     -0.00000     -0.88969      0.00000     -0.00000      0.00000      0.00000     -0.89765     -1.36681 \n   </alphavectors>\n   <betavectors>\n     0.98359     -0.31224     -0.00000     -0.00000     -0.00000      0.11764     -0.00000     -0.00000     -0.00000     -0.02988     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.01678      0.00000     -0.00000     -0.00000      0.06518     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.16212 \n     0.05952      1.01441      0.00000      0.00000      0.00000     -0.44167      0.00000      0.00000      0.00000      0.10862      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.10228     -0.00000      0.00000      0.00000     -0.22826      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.71953 \n     0.00000     -0.00000      0.00000      0.00000      0.98465     -0.00000     -0.00000      0.00000     -0.37544     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.06392      0.00000      0.00000      0.07716      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.98465      0.00000     -0.00000     -0.00000     -0.37544      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.06392      0.00000      0.00000      0.07716     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.98465      0.00000     -0.00000     -0.00000     -0.37544      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06392     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.07716     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.07561      0.17567     -0.00000      0.00000      0.00000      0.78928     -0.00000     -0.00000     -0.00000     -0.25867     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.01970      0.00000     -0.00000     -0.00000      0.97186     -0.00000      0.00000     -0.00000     -0.00000      0.00000     13.21598 \n     0.00000     -0.00000      0.00000      0.00000      0.04546      0.00000      0.00000     -0.00000      1.04083      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.21019     -0.00000     -0.00000     -0.26057     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.04546     -0.00000      0.00000      0.00000      1.04083     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.21019     -0.00000     -0.00000     -0.26057      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.04546      0.00000     -0.00000     -0.00000      1.04083     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.21019      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.26057     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00091      0.02977     -0.00000      0.00000      0.00000      0.00681      0.00000     -0.00000     -0.00000      0.71749     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.79209     -0.00000     -0.00000      0.00000      2.03441     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.21809 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00970      0.00000      0.00000     -0.00000      0.06287     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.56360      0.00000      0.00000      1.41456      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00970     -0.00000      0.00000      0.00000      0.06287      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.56360      0.00000      0.00000      1.41456     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00970     -0.00000      0.00000      0.00000      0.06287     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.56360     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.41456     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00006     -0.01303      0.00000     -0.00000     -0.00000     -0.00247     -0.00000      0.00000      0.00000      0.34135      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.88557      0.00000      0.00000     -0.00000     -0.95668      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.50263 \n     0.00000     -0.00000      0.00000      0.00000      0.00507     -0.00000     -0.00000      0.00000     -0.02567      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.52410     -0.00000     -0.00000     -1.39320      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00507      0.00000     -0.00000     -0.00000     -0.02567     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.52410     -0.00000     -0.00000     -1.39320     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00507      0.00000     -0.00000     -0.00000     -0.02567      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.52410     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.39320     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.03854     -0.04238      0.00000     -0.00000     -0.00000      0.10787      0.00000     -0.00000     -0.00000     -0.02982     -0.28672      0.49662     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.01536      0.00000     -0.00000     -0.00000     -0.04683     -0.46290      0.80176     -0.00000     -0.00000      0.00000     -5.45921 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.99323     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.60353     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.99323      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.60353      0.00000 \n    -0.03854     -0.04238      0.00000     -0.00000     -0.00000      0.10787      0.00000     -0.00000     -0.00000     -0.02982     -0.28672     -0.49662     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.01536      0.00000     -0.00000     -0.00000     -0.04683     -0.46290     -0.80176      0.00000     -0.00000      0.00000     -5.45921 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.99323      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.60353      0.00000      0.00000 \n    -0.03854     -0.04238      0.00000     -0.00000     -0.00000      0.10787     -0.00000     -0.00000     -0.00000     -0.02982      0.57344      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01536     -0.00000      0.00000      0.00000     -0.04683      0.92580      0.00000     -0.00000      0.00000     -0.00000     -5.45921 \n    -0.00424     -0.02654     -0.00000     -0.00000     -0.00000      0.03234      0.00000     -0.00000     -0.00000      0.00616     -0.31153      0.53959     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.01014      0.00000     -0.00000     -0.00000     -0.89086      0.44658     -0.77349      0.00000     -0.00000      0.00000     -1.36623 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.07919      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.54698      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.07919     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.54698     -0.00000 \n    -0.00424     -0.02654     -0.00000     -0.00000     -0.00000      0.03234      0.00000     -0.00000     -0.00000      0.00616     -0.31153     -0.53959     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.01014      0.00000     -0.00000     -0.00000     -0.89086      0.44658      0.77349     -0.00000     -0.00000      0.00000     -1.36623 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.07919     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.54698     -0.00000      0.00000 \n    -0.00424     -0.02654      0.00000     -0.00000     -0.00000      0.03234     -0.00000     -0.00000     -0.00000      0.00616      0.62307      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01014     -0.00000      0.00000      0.00000     -0.89086     -0.89315     -0.00000     -0.00000      0.00000     -0.00000     -1.36623 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"V\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.15930     -0.62708      0.00000      0.00000      0.00000      0.31914      0.00000      0.00000      0.00000     -0.05015      0.00000      0.00000      0.00000     -0.01594      0.00000      0.00000      0.00000     -0.05225      0.00000      0.00000     -0.05225      0.00000     -0.05225      0.00571      0.00000      0.00000      0.00571      0.00000      0.00571 \n    -0.62708      2.48944      0.00000      0.00000      0.00000     -0.51471      0.00000      0.00000      0.00000      0.20330      0.00000      0.00000      0.00000      0.05151      0.00000      0.00000      0.00000     -0.14775      0.00000      0.00000     -0.14775      0.00000     -0.14775     -0.07305      0.00000      0.00000     -0.07305      0.00000     -0.07305 \n     0.00000      0.00000      2.23079      0.00000      0.00000      0.00000     -0.70972      0.00000      0.00000      0.00000     -0.06264      0.00000      0.00000      0.00000      0.02778      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.23079      0.00000      0.00000      0.00000     -0.70972      0.00000      0.00000      0.00000     -0.06264      0.00000      0.00000      0.00000      0.02778      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.23079      0.00000      0.00000      0.00000     -0.70972      0.00000      0.00000      0.00000     -0.06264      0.00000      0.00000      0.00000      0.02778      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.31914     -0.51471      0.00000      0.00000      0.00000      1.48831      0.00000      0.00000      0.00000     -0.36510      0.00000      0.00000      0.00000     -0.17362      0.00000      0.00000      0.00000      0.16313      0.00000      0.00000      0.16313      0.00000      0.16313      0.04042      0.00000      0.00000      0.04042      0.00000      0.04042 \n     0.00000      0.00000     -0.70972      0.00000      0.00000      0.00000      2.18595      0.00000      0.00000      0.00000      0.12067      0.00000      0.00000      0.00000     -0.04957      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.70972      0.00000      0.00000      0.00000      2.18595      0.00000      0.00000      0.00000      0.12067      0.00000      0.00000      0.00000     -0.04957      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.70972      0.00000      0.00000      0.00000      2.18595      0.00000      0.00000      0.00000      0.12067      0.00000      0.00000      0.00000     -0.04957      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05015      0.20330      0.00000      0.00000      0.00000     -0.36510      0.00000      0.00000      0.00000      1.05194      0.00000      0.00000      0.00000      0.45897      0.00000      0.00000      0.00000     -0.04170      0.00000      0.00000     -0.04170      0.00000     -0.04170      0.01814      0.00000      0.00000      0.01814      0.00000      0.01814 \n     0.00000      0.00000     -0.06264      0.00000      0.00000      0.00000      0.12067      0.00000      0.00000      0.00000      0.00697      0.00000      0.00000      0.00000     -0.00288      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.06264      0.00000      0.00000      0.00000      0.12067      0.00000      0.00000      0.00000      0.00697      0.00000      0.00000      0.00000     -0.00288      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06264      0.00000      0.00000      0.00000      0.12067      0.00000      0.00000      0.00000      0.00697      0.00000      0.00000      0.00000     -0.00288      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01594      0.05151      0.00000      0.00000      0.00000     -0.17362      0.00000      0.00000      0.00000      0.45897      0.00000      0.00000      0.00000      0.21125      0.00000      0.00000      0.00000     -0.01837      0.00000      0.00000     -0.01837      0.00000     -0.01837      0.00698      0.00000      0.00000      0.00698      0.00000      0.00698 \n     0.00000      0.00000      0.02778      0.00000      0.00000      0.00000     -0.04957      0.00000      0.00000      0.00000     -0.00288      0.00000      0.00000      0.00000      0.00121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02778      0.00000      0.00000      0.00000     -0.04957      0.00000      0.00000      0.00000     -0.00288      0.00000      0.00000      0.00000      0.00121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02778      0.00000      0.00000      0.00000     -0.04957      0.00000      0.00000      0.00000     -0.00288      0.00000      0.00000      0.00000      0.00121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05225     -0.14775      0.00000      0.00000      0.00000      0.16313      0.00000      0.00000      0.00000     -0.04170      0.00000      0.00000      0.00000     -0.01837      0.00000      0.00000      0.00000      0.23397      0.00000      0.00000     -0.07591      0.00000     -0.07591      0.22365      0.00000      0.00000     -0.10011      0.00000     -0.10011 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.61976      0.00000      0.00000      0.00000      0.00000      0.00000      0.64751      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.61976      0.00000      0.00000      0.00000      0.00000      0.00000      0.64751      0.00000      0.00000      0.00000 \n    -0.05225     -0.14775      0.00000      0.00000      0.00000      0.16313      0.00000      0.00000      0.00000     -0.04170      0.00000      0.00000      0.00000     -0.01837      0.00000      0.00000      0.00000     -0.07591      0.00000      0.00000      0.23397      0.00000     -0.07592     -0.10011      0.00000      0.00000      0.22365      0.00000     -0.10011 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.61976      0.00000      0.00000      0.00000      0.00000      0.00000      0.64751      0.00000 \n    -0.05225     -0.14775      0.00000      0.00000      0.00000      0.16313      0.00000      0.00000      0.00000     -0.04170      0.00000      0.00000      0.00000     -0.01837      0.00000      0.00000      0.00000     -0.07591      0.00000      0.00000     -0.07592      0.00000      0.23397     -0.10011      0.00000      0.00000     -0.10011      0.00000      0.22365 \n     0.00571     -0.07305      0.00000      0.00000      0.00000      0.04042      0.00000      0.00000      0.00000      0.01814      0.00000      0.00000      0.00000      0.00698      0.00000      0.00000      0.00000      0.22365      0.00000      0.00000     -0.10011      0.00000     -0.10011      0.22945      0.00000      0.00000     -0.10881      0.00000     -0.10881 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.64751      0.00000      0.00000      0.00000      0.00000      0.00000      0.67651      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.64751      0.00000      0.00000      0.00000      0.00000      0.00000      0.67651      0.00000      0.00000      0.00000 \n     0.00571     -0.07305      0.00000      0.00000      0.00000      0.04042      0.00000      0.00000      0.00000      0.01814      0.00000      0.00000      0.00000      0.00698      0.00000      0.00000      0.00000     -0.10011      0.00000      0.00000      0.22365      0.00000     -0.10011     -0.10881      0.00000      0.00000      0.22945      0.00000     -0.10881 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.64751      0.00000      0.00000      0.00000      0.00000      0.00000      0.67651      0.00000 \n     0.00571     -0.07305      0.00000      0.00000      0.00000      0.04042      0.00000      0.00000      0.00000      0.01814      0.00000      0.00000      0.00000      0.00698      0.00000      0.00000      0.00000     -0.10011      0.00000      0.00000     -0.10011      0.00000      0.22365     -0.10881      0.00000      0.00000     -0.10881      0.00000      0.22945 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.98002      0.60400      0.60400      0.60400      0.60400      0.60400      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99965      0.00006      0.00006      0.00006      0.00006      0.00006      0.00003      0.00003      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -193.83720    -21.66703    -18.22904    -18.22904    -18.22904     -2.50597     -1.57524     -1.57524     -1.57524     -0.17187     -0.14655     -0.14655     -0.14655     -0.14655     -0.14655     -0.05183     -0.05183     -0.05183      0.03932      0.07796      0.07796      0.07796      0.79637      1.55773      1.55773      1.55773      1.55773      1.55773     15.82485 \n   </alphaeps>\n   <betaeps>\n  -193.83660    -21.62803    -18.20053    -18.20053    -18.20053     -2.39988     -1.47133     -1.47133     -1.47133     -0.15248     -0.04988     -0.04988     -0.04988     -0.04988     -0.04988     -0.04731     -0.04731     -0.04731      0.04794      0.08531      0.08531      0.08531      0.84817      1.64341      1.64341      1.64341      1.64341      1.64341     15.88798 \n   </betaeps>\n   <alphavectors>\n     0.98270     -0.31378      0.00000      0.00000      0.00000      0.12055      0.00000     -0.00000      0.00000     -0.03242      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01741      0.00000     -0.00000      0.00000      0.06833      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.19828 \n     0.06301      1.01195     -0.00000     -0.00000     -0.00000     -0.45181     -0.00000      0.00000     -0.00000      0.11913     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.10220     -0.00000      0.00000     -0.00000     -0.24245     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.88203 \n    -0.00000      0.00000     -0.00000     -0.00000      0.98436      0.00000     -0.00000     -0.00000     -0.38291     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06359     -0.00000     -0.00000      0.00000      0.07339      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.98436      0.00000     -0.00000      0.00000     -0.38291     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.06359     -0.00000     -0.00000      0.07339      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.98436      0.00000      0.00000     -0.00000     -0.38291      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.06359     -0.00000      0.00000      0.00000      0.00000      0.07339      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.09634      0.12749     -0.00000     -0.00000     -0.00000      0.80787     -0.00000     -0.00000      0.00000     -0.27964      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.02020     -0.00000     -0.00000     -0.00000      1.06922     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     12.85234 \n    -0.00000      0.00000     -0.00000     -0.00000      0.04554     -0.00000      0.00000      0.00000      1.04537      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.20619      0.00000      0.00000     -0.00000     -0.24388      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.04554     -0.00000      0.00000     -0.00000      1.04537      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.20619      0.00000      0.00000     -0.24388      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.04554     -0.00000     -0.00000      0.00000      1.04537     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.20619      0.00000      0.00000     -0.00000     -0.00000     -0.24388      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00372      0.02315     -0.00000     -0.00000     -0.00000      0.00651     -0.00000     -0.00000      0.00000      0.76551     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.68927     -0.00000      0.00000     -0.00000      1.88698     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.22185 \n     0.00000     -0.00000      0.00000      0.00000     -0.00938     -0.00000      0.00000      0.00000      0.05428     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.59953     -0.00000     -0.00000      0.00000      1.38911     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00938      0.00000      0.00000     -0.00000      0.05428     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.59953     -0.00000     -0.00000      1.38911     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00938      0.00000      0.00000     -0.00000      0.05428      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.59953     -0.00000     -0.00000      0.00000      0.00000      1.38911     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00124     -0.01053      0.00000      0.00000      0.00000     -0.00183      0.00000      0.00000     -0.00000      0.26644     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.86268      0.00000     -0.00000      0.00000     -0.91217      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.52568 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00489      0.00000     -0.00000     -0.00000     -0.02230      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.48839      0.00000      0.00000     -0.00000     -1.39799      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00489     -0.00000     -0.00000      0.00000     -0.02230      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.48839      0.00000      0.00000     -1.39799      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00489     -0.00000     -0.00000     -0.00000     -0.02230      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.48839      0.00000      0.00000     -0.00000     -0.00000     -1.39799      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.04685     -0.02145      0.00000      0.00000      0.00000      0.10040     -0.00000     -0.00000      0.00000     -0.02861     -0.10027      0.57615      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.02003      0.00000     -0.00000      0.00000     -0.06899     -0.04529      0.91900      0.00000      0.00000     -0.00000     -5.23652 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.01292     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.59368     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.01292     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.59368     -0.00000 \n    -0.04685     -0.02145      0.00000      0.00000      0.00000      0.10040     -0.00000     -0.00000      0.00000     -0.02861     -0.44883     -0.37491      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.02003      0.00000     -0.00000      0.00000     -0.06899      0.81852     -0.42027     -0.00000     -0.00000      0.00000     -5.23652 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.01292     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.59368      0.00000     -0.00000     -0.00000 \n    -0.04685     -0.02145      0.00000      0.00000      0.00000      0.10040     -0.00000     -0.00000      0.00000     -0.02861      0.54910     -0.20124      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.02003      0.00000     -0.00000      0.00000     -0.06899     -0.77323     -0.49872      0.00000      0.00000     -0.00000     -5.23652 \n    -0.00785     -0.02206      0.00000      0.00000      0.00000      0.03288      0.00000     -0.00000      0.00000      0.02416     -0.10476      0.60195     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01174      0.00000      0.00000     -0.00000     -0.86204      0.04445     -0.90184     -0.00000     -0.00000      0.00000     -1.50126 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.05828     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.56393      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.05828      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.56393      0.00000 \n    -0.00785     -0.02206      0.00000      0.00000      0.00000      0.03288      0.00000     -0.00000      0.00000      0.02416     -0.46893     -0.39170     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01174      0.00000      0.00000     -0.00000     -0.86204     -0.80324      0.41243      0.00000      0.00000     -0.00000     -1.50126 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05828      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.56393     -0.00000      0.00000      0.00000 \n    -0.00785     -0.02206      0.00000      0.00000      0.00000      0.03288      0.00000     -0.00000      0.00000      0.02416      0.57368     -0.21025     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01174      0.00000      0.00000     -0.00000     -0.86204      0.75879      0.48941     -0.00000     -0.00000      0.00000     -1.50126 \n   </alphavectors>\n   <betavectors>\n     0.98271     -0.31398      0.00000     -0.00000     -0.00000      0.12002     -0.00000     -0.00000     -0.00000     -0.02956     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.01809      0.00000     -0.00000     -0.00000      0.06943     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.19827 \n     0.06300      1.01274     -0.00000      0.00000      0.00000     -0.45002      0.00000      0.00000      0.00000      0.10614      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.10483     -0.00000      0.00000      0.00000     -0.24735      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.88203 \n    -0.00000     -0.00000      0.00000     -0.00000      0.98482     -0.00000      0.00000      0.00000     -0.38123     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.06079     -0.00000      0.00000     -0.00000      0.07815      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.98482     -0.00000     -0.00000      0.00000     -0.38123      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06079     -0.00000     -0.00000      0.00000      0.07815      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.98482     -0.00000     -0.00000     -0.00000     -0.38123      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.06079     -0.00000      0.00000      0.00000      0.07815      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.09631      0.12815     -0.00000      0.00000      0.00000      0.80296     -0.00000     -0.00000     -0.00000     -0.25113      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.01454      0.00000     -0.00000     -0.00000      1.09128      0.00000      0.00000      0.00000     -0.00000      0.00000     12.85138 \n    -0.00000     -0.00000      0.00000     -0.00000      0.04426      0.00000     -0.00000     -0.00000      1.04361      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.19651      0.00000     -0.00000      0.00000     -0.25914     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.04426      0.00000      0.00000     -0.00000      1.04361     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.19651      0.00000      0.00000     -0.00000     -0.25914      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.04426      0.00000      0.00000      0.00000      1.04361     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.19651      0.00000      0.00000     -0.00000     -0.25914      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00372      0.02287     -0.00000      0.00000      0.00000      0.00765     -0.00000     -0.00000     -0.00000      0.69038      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.78662     -0.00000      0.00000      0.00000      1.82655      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.21996 \n     0.00000      0.00000     -0.00000      0.00000     -0.00911      0.00000     -0.00000     -0.00000      0.06205     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.52140     -0.00000      0.00000     -0.00000      1.41997      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00911     -0.00000      0.00000     -0.00000      0.06205      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.52140     -0.00000     -0.00000      0.00000      1.41997     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00911     -0.00000     -0.00000     -0.00000      0.06205      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.52140     -0.00000     -0.00000      0.00000      1.41997     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00124     -0.01039      0.00000     -0.00000     -0.00000     -0.00222      0.00000      0.00000      0.00000      0.37616     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.86137      0.00000     -0.00000     -0.00000     -0.87597     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.52483 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00475     -0.00000      0.00000      0.00000     -0.02557      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.56520      0.00000     -0.00000      0.00000     -1.36868     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00475      0.00000     -0.00000      0.00000     -0.02557     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.56520      0.00000      0.00000     -0.00000     -1.36868      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00475      0.00000      0.00000      0.00000     -0.02557     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.56520      0.00000      0.00000     -0.00000     -1.36868      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.04684     -0.02240      0.00000     -0.00000     -0.00000      0.10140     -0.00000     -0.00000     -0.00000     -0.02942     -0.08375     -0.00000      0.00000      0.00000      0.56825      0.00000     -0.00000     -0.00000     -0.02385      0.00000     -0.00000     -0.00000     -0.07286     -0.11482     -0.00000     -0.00000      0.91951     -0.00000     -5.23643 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.99487     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.60501     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.99487      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.60501      0.00000     -0.00000     -0.00000 \n    -0.04684     -0.02240      0.00000     -0.00000     -0.00000      0.10140     -0.00000     -0.00000     -0.00000     -0.02942     -0.45024     -0.00000      0.00000      0.00000     -0.35666      0.00000     -0.00000     -0.00000     -0.02385      0.00000     -0.00000     -0.00000     -0.07286     -0.73891     -0.00000     -0.00000     -0.55920      0.00000     -5.23643 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.99487     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.60501      0.00000      0.00000      0.00000     -0.00000 \n    -0.04684     -0.02240      0.00000     -0.00000     -0.00000      0.10140     -0.00000     -0.00000     -0.00000     -0.02942      0.53399     -0.00000      0.00000      0.00000     -0.21160      0.00000     -0.00000     -0.00000     -0.02385      0.00000     -0.00000     -0.00000     -0.07286      0.85373      0.00000      0.00000     -0.36031      0.00000     -5.23643 \n    -0.00785     -0.02192      0.00000     -0.00000     -0.00000      0.03466     -0.00000     -0.00000     -0.00000      0.00088     -0.09057     -0.00000      0.00000      0.00000      0.61451      0.00000      0.00000      0.00000     -0.00838      0.00000     -0.00000     -0.00000     -0.86390      0.11102      0.00000      0.00000     -0.88907      0.00000     -1.50037 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.07587      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.55188      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.07587     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.55188     -0.00000      0.00000      0.00000 \n    -0.00785     -0.02192      0.00000     -0.00000     -0.00000      0.03466     -0.00000     -0.00000     -0.00000      0.00088     -0.48690     -0.00000      0.00000      0.00000     -0.38569      0.00000      0.00000      0.00000     -0.00838      0.00000     -0.00000     -0.00000     -0.86390      0.71445      0.00000      0.00000      0.54069     -0.00000     -1.50037 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.07587      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.55188     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00785     -0.02192      0.00000     -0.00000     -0.00000      0.03466     -0.00000     -0.00000     -0.00000      0.00088      0.57747     -0.00000      0.00000      0.00000     -0.22882      0.00000      0.00000      0.00000     -0.00838      0.00000     -0.00000     -0.00000     -0.86390     -0.82547     -0.00000     -0.00000      0.34839     -0.00000     -1.50037 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cr\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.14966     -0.60472      0.00000      0.00000      0.00000      0.34897      0.00000      0.00000      0.00000     -0.02015      0.00000      0.00000      0.00000     -0.00967      0.00000      0.00000      0.00000     -0.07018      0.00000      0.00000     -0.07018      0.00000     -0.07018      0.00024      0.00000      0.00000      0.00024      0.00000      0.00024 \n    -0.60472      2.47201      0.00000      0.00000      0.00000     -0.56361      0.00000      0.00000      0.00000      0.10832      0.00000      0.00000      0.00000      0.02316      0.00000      0.00000      0.00000     -0.11384      0.00000      0.00000     -0.11384      0.00000     -0.11384     -0.07116      0.00000      0.00000     -0.07116      0.00000     -0.07116 \n     0.00000      0.00000      2.23860      0.00000      0.00000      0.00000     -0.72300      0.00000      0.00000      0.00000     -0.06455      0.00000      0.00000      0.00000      0.03885      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.23860      0.00000      0.00000      0.00000     -0.72300      0.00000      0.00000      0.00000     -0.06455      0.00000      0.00000      0.00000      0.03885      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.23860      0.00000      0.00000      0.00000     -0.72300      0.00000      0.00000      0.00000     -0.06455      0.00000      0.00000      0.00000      0.03885      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.34897     -0.56361      0.00000      0.00000      0.00000      1.46115      0.00000      0.00000      0.00000     -0.16893      0.00000      0.00000      0.00000     -0.09861      0.00000      0.00000      0.00000      0.14509      0.00000      0.00000      0.14509      0.00000      0.14509      0.05376      0.00000      0.00000      0.05376      0.00000      0.05376 \n     0.00000      0.00000     -0.72300      0.00000      0.00000      0.00000      2.19383      0.00000      0.00000      0.00000      0.12360      0.00000      0.00000      0.00000     -0.08225      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.72300      0.00000      0.00000      0.00000      2.19383      0.00000      0.00000      0.00000      0.12360      0.00000      0.00000      0.00000     -0.08225      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.72300      0.00000      0.00000      0.00000      2.19383      0.00000      0.00000      0.00000      0.12360      0.00000      0.00000      0.00000     -0.08225      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02015      0.10832      0.00000      0.00000      0.00000     -0.16893      0.00000      0.00000      0.00000      0.50512      0.00000      0.00000      0.00000      0.24216      0.00000      0.00000      0.00000     -0.01730      0.00000      0.00000     -0.01730      0.00000     -0.01730      0.00686      0.00000      0.00000      0.00686      0.00000      0.00686 \n     0.00000      0.00000     -0.06455      0.00000      0.00000      0.00000      0.12360      0.00000      0.00000      0.00000      0.06181      0.00000      0.00000      0.00000      0.05048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.06455      0.00000      0.00000      0.00000      0.12360      0.00000      0.00000      0.00000      0.06181      0.00000      0.00000      0.00000      0.05048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06455      0.00000      0.00000      0.00000      0.12360      0.00000      0.00000      0.00000      0.06181      0.00000      0.00000      0.00000      0.05048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00967      0.02316      0.00000      0.00000      0.00000     -0.09861      0.00000      0.00000      0.00000      0.24216      0.00000      0.00000      0.00000      0.11688      0.00000      0.00000      0.00000     -0.00895      0.00000      0.00000     -0.00895      0.00000     -0.00895      0.00343      0.00000      0.00000      0.00343      0.00000      0.00343 \n     0.00000      0.00000      0.03885      0.00000      0.00000      0.00000     -0.08225      0.00000      0.00000      0.00000      0.05048      0.00000      0.00000      0.00000      0.05917      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03885      0.00000      0.00000      0.00000     -0.08225      0.00000      0.00000      0.00000      0.05048      0.00000      0.00000      0.00000      0.05917      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03885      0.00000      0.00000      0.00000     -0.08225      0.00000      0.00000      0.00000      0.05048      0.00000      0.00000      0.00000      0.05917      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.07018     -0.11384      0.00000      0.00000      0.00000      0.14509      0.00000      0.00000      0.00000     -0.01730      0.00000      0.00000      0.00000     -0.00895      0.00000      0.00000      0.00000      0.31364      0.00000      0.00000     -0.12255      0.00000     -0.12254      0.32458      0.00000      0.00000     -0.15018      0.00000     -0.15017 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.87236      0.00000      0.00000      0.00000      0.00000      0.00000      0.94951      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.87236      0.00000      0.00000      0.00000      0.00000      0.00000      0.94951      0.00000      0.00000      0.00000 \n    -0.07018     -0.11384      0.00000      0.00000      0.00000      0.14509      0.00000      0.00000      0.00000     -0.01730      0.00000      0.00000      0.00000     -0.00895      0.00000      0.00000      0.00000     -0.12255      0.00000      0.00000      0.31363      0.00000     -0.12254     -0.15018      0.00000      0.00000      0.32458      0.00000     -0.15017 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.87236      0.00000      0.00000      0.00000      0.00000      0.00000      0.94951      0.00000 \n    -0.07018     -0.11384      0.00000      0.00000      0.00000      0.14509      0.00000      0.00000      0.00000     -0.01730      0.00000      0.00000      0.00000     -0.00895      0.00000      0.00000      0.00000     -0.12254      0.00000      0.00000     -0.12254      0.00000      0.31364     -0.15017      0.00000      0.00000     -0.15018      0.00000      0.32458 \n     0.00024     -0.07116      0.00000      0.00000      0.00000      0.05376      0.00000      0.00000      0.00000      0.00686      0.00000      0.00000      0.00000      0.00343      0.00000      0.00000      0.00000      0.32458      0.00000      0.00000     -0.15018      0.00000     -0.15017      0.34830      0.00000      0.00000     -0.16844      0.00000     -0.16844 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.94951      0.00000      0.00000      0.00000      0.00000      0.00000      1.03349      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.94951      0.00000      0.00000      0.00000      0.00000      0.00000      1.03349      0.00000      0.00000      0.00000 \n     0.00024     -0.07116      0.00000      0.00000      0.00000      0.05376      0.00000      0.00000      0.00000      0.00686      0.00000      0.00000      0.00000      0.00343      0.00000      0.00000      0.00000     -0.15018      0.00000      0.00000      0.32458      0.00000     -0.15018     -0.16844      0.00000      0.00000      0.34830      0.00000     -0.16844 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.94951      0.00000      0.00000      0.00000      0.00000      0.00000      1.03349      0.00000 \n     0.00024     -0.07116      0.00000      0.00000      0.00000      0.05376      0.00000      0.00000      0.00000      0.00686      0.00000      0.00000      0.00000      0.00343      0.00000      0.00000      0.00000     -0.15017      0.00000      0.00000     -0.15017      0.00000      0.32458     -0.16844      0.00000      0.00000     -0.16844      0.00000      0.34830 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.88763      0.88763      0.88763      0.88763      0.88763      0.18728      0.18728      0.18728      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -212.41710    -23.98522    -20.33099    -20.33099    -20.33099     -2.67576     -1.66567     -1.66567     -1.66567     -0.18226     -0.09288     -0.09288     -0.09288     -0.09288     -0.09288     -0.06315     -0.06315     -0.06315      0.03746      0.08075      0.08075      0.08075      0.96928      1.88105      1.88105      1.88105      1.88105      1.88105     17.01226 \n   </alphaeps>\n   <betaeps>\n  -212.41500    -23.92219    -20.28507    -20.28507    -20.28507     -2.51522     -1.50781     -1.50781     -1.50781     -0.11602     -0.02487     -0.02487     -0.02487      0.05901      0.05901      0.05901      0.05901      0.05901      0.07530      0.12054      0.12054      0.12054      1.07471      2.02427      2.02427      2.02427      2.02427      2.02427     17.11983 \n   </betaeps>\n   <alphavectors>\n     0.98252     -0.30813      0.00000     -0.00000      0.00000      0.11864     -0.00000      0.00000      0.00000     -0.03017      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01788     -0.00000     -0.00000     -0.00000      0.07042     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.21516 \n     0.06543      1.00894     -0.00000      0.00000     -0.00000     -0.45531      0.00000     -0.00000     -0.00000      0.11212     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.10900      0.00000      0.00000      0.00000     -0.25536      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.99000 \n    -0.00000      0.00000     -0.00000      0.00000      0.98446     -0.00000     -0.38728     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06052     -0.00000     -0.00000     -0.00000      0.07716     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.98446      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.38728      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.06052     -0.00000     -0.00000      0.00000      0.07716      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.98446     -0.00000      0.00000     -0.00000     -0.38728     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.06052     -0.00000      0.00000     -0.00000      0.07716      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.10546      0.09735     -0.00000      0.00000     -0.00000      0.82410     -0.00000      0.00000      0.00000     -0.26740     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00892      0.00000     -0.00000      0.00000      1.20051      0.00000     -0.00000      0.00000     -0.00000      0.00000     12.38595 \n    -0.00000      0.00000     -0.00000      0.00000      0.04464      0.00000      1.04566      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.19239      0.00000      0.00000      0.00000     -0.25139     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.04464     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.04566     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.19239     -0.00000      0.00000      0.00000     -0.25139      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.04464      0.00000     -0.00000      0.00000      1.04566      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.19239     -0.00000      0.00000      0.00000     -0.25139      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00521      0.01847     -0.00000      0.00000     -0.00000      0.00963     -0.00000      0.00000      0.00000      0.71007     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.80042      0.00000      0.00000      0.00000      1.76754     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.21312 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00909      0.00000      0.06448     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.52795     -0.00000     -0.00000     -0.00000      1.45470      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00909     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.06448     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.52795      0.00000     -0.00000     -0.00000      1.45470     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00909      0.00000     -0.00000      0.00000      0.06448     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.52795     -0.00000     -0.00000     -0.00000      1.45470     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00205     -0.00884      0.00000     -0.00000      0.00000     -0.00306      0.00000     -0.00000     -0.00000      0.34161      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.91257     -0.00000     -0.00000     -0.00000     -0.88805      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.55462 \n    -0.00000      0.00000     -0.00000      0.00000      0.00487     -0.00000     -0.02809     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.55321      0.00000      0.00000      0.00000     -1.41365     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00487      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02809      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.55321     -0.00000      0.00000      0.00000     -1.41365      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00487     -0.00000      0.00000     -0.00000     -0.02809      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.55321      0.00000      0.00000      0.00000     -1.41365      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.05043     -0.00953      0.00000     -0.00000      0.00000      0.09128     -0.00000      0.00000      0.00000     -0.02565     -0.39917     -0.41020      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.02475     -0.00000     -0.00000     -0.00000     -0.09656     -0.38947      0.00000     -0.00000      0.84241     -0.00000     -5.00266 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.99136     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.60750     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.99136      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.60750     -0.00000      0.00000     -0.00000      0.00000 \n    -0.05043     -0.00953      0.00000     -0.00000      0.00000      0.09128     -0.00000      0.00000      0.00000     -0.02565     -0.15565      0.55079      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.02475     -0.00000     -0.00000     -0.00000     -0.09656      0.92429     -0.00000      0.00000     -0.08392     -0.00000     -5.00266 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.99136      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.60750      0.00000 \n    -0.05043     -0.00953      0.00000     -0.00000      0.00000      0.09128     -0.00000      0.00000      0.00000     -0.02565      0.55483     -0.14060      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.02475     -0.00000     -0.00000     -0.00000     -0.09656     -0.53482      0.00000     -0.00000     -0.75850      0.00000     -5.00266 \n    -0.00997     -0.01818      0.00000     -0.00000      0.00000      0.03661     -0.00000      0.00000      0.00000      0.00969     -0.43447     -0.44647     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00366      0.00000      0.00000      0.00000     -0.85205      0.37554     -0.00000      0.00000     -0.81229      0.00000     -1.55356 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.07904      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.55001      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.07904     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.55001      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00997     -0.01818      0.00000     -0.00000      0.00000      0.03661     -0.00000      0.00000      0.00000      0.00969     -0.16942      0.59950     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00366      0.00000      0.00000      0.00000     -0.85205     -0.89123      0.00000     -0.00000      0.08092      0.00000     -1.55356 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.07904     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.55001     -0.00000 \n    -0.00997     -0.01818      0.00000     -0.00000      0.00000      0.03661     -0.00000      0.00000      0.00000      0.00969      0.60389     -0.15303     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00366      0.00000      0.00000      0.00000     -0.85205      0.51569     -0.00000      0.00000      0.73137     -0.00000     -1.55356 \n   </alphavectors>\n   <betavectors>\n     0.98252     -0.30842     -0.00000      0.00000      0.00000      0.11796     -0.00000     -0.00000     -0.00000     -0.02640     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02016     -0.00000      0.00000      0.00000      0.07135     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.21508 \n     0.06541      1.01015      0.00000     -0.00000     -0.00000     -0.45300      0.00000      0.00000      0.00000      0.09218      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.11735      0.00000     -0.00000     -0.00000     -0.25998      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.98973 \n     0.00000      0.00000      0.00000      0.98510      0.00000     -0.00000     -0.38516     -0.00000     -0.00000      0.00000      0.04651      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.08850      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.98510      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.38516     -0.00000      0.00000      0.00000      0.04651     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.08850     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.98510     -0.00000      0.00000     -0.38516     -0.00000      0.00000      0.00000      0.04651      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.08850     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.10543      0.09908      0.00000     -0.00000     -0.00000      0.81791     -0.00000     -0.00000     -0.00000     -0.24355      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00554      0.00000     -0.00000      0.00000      1.21828     -0.00000      0.00000      0.00000     -0.00000      0.00000     12.38510 \n     0.00000      0.00000      0.00000      0.04289     -0.00000      0.00000      1.04387      0.00000      0.00000     -0.00000     -0.14666      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.28737     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.04289     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.04387      0.00000      0.00000      0.00000     -0.14666      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.28737      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.04289      0.00000     -0.00000      1.04387      0.00000     -0.00000      0.00000     -0.14666      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.28737     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00521      0.01819      0.00000     -0.00000     -0.00000      0.01016     -0.00000     -0.00000     -0.00000      0.46935     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.93800      0.00000     -0.00000     -0.00000      1.70300      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.21045 \n    -0.00000     -0.00000     -0.00000     -0.00871     -0.00000      0.00000      0.07278     -0.00000     -0.00000      0.00000      0.25418      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.52616      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00871     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.07278     -0.00000      0.00000     -0.00000      0.25418     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.52616     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00871      0.00000     -0.00000      0.07278     -0.00000      0.00000     -0.00000      0.25418      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.52616      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00205     -0.00869     -0.00000      0.00000      0.00000     -0.00316      0.00000      0.00000      0.00000      0.60119     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.86978     -0.00000      0.00000      0.00000     -0.84115      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.55300 \n     0.00000      0.00000      0.00000      0.00467      0.00000     -0.00000     -0.03196      0.00000      0.00000     -0.00000      0.80134     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.28921      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00467      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.03196      0.00000     -0.00000      0.00000      0.80134      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.28921      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00467     -0.00000      0.00000     -0.03196      0.00000     -0.00000      0.00000      0.80134     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.28921     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.05041     -0.01117     -0.00000      0.00000      0.00000      0.09252     -0.00000     -0.00000     -0.00000     -0.02470     -0.00000     -0.00000     -0.00000      0.56245      0.00000      0.00829      0.00000     -0.00000     -0.03404     -0.00000      0.00000      0.00000     -0.09949     -0.00000     -0.00000      0.93387      0.02068      0.00000     -5.00253 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.97429      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.61790      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.97429     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.61790      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.05041     -0.01117     -0.00000      0.00000      0.00000      0.09252     -0.00000     -0.00000     -0.00000     -0.02470     -0.00000     -0.00000     -0.00000     -0.28841     -0.00000      0.48295     -0.00000      0.00000     -0.03404      0.00000      0.00000     -0.00000     -0.09949      0.00000     -0.00000     -0.48485      0.79841     -0.00000     -5.00253 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.97429     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.61790     -0.00000 \n    -0.05041     -0.01117     -0.00000      0.00000      0.00000      0.09252     -0.00000     -0.00000     -0.00000     -0.02470     -0.00000     -0.00000     -0.00000     -0.27404     -0.00000     -0.49124      0.00000     -0.00000     -0.03404      0.00000     -0.00000      0.00000     -0.09949      0.00000      0.00000     -0.44902     -0.81909     -0.00000     -5.00253 \n    -0.00997     -0.01811     -0.00000      0.00000      0.00000      0.03894     -0.00000     -0.00000     -0.00000     -0.00467     -0.00000     -0.00000     -0.00000      0.63235      0.00000      0.00932      0.00000     -0.00000     -0.02200     -0.00000      0.00000      0.00000     -0.85313     -0.00000     -0.00000     -0.88803     -0.01967     -0.00000     -1.55279 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.09538     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.53850      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.09538      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.53850      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00997     -0.01811     -0.00000      0.00000      0.00000      0.03894     -0.00000     -0.00000     -0.00000     -0.00467     -0.00000     -0.00000     -0.00000     -0.32425     -0.00000      0.54297     -0.00000      0.00000     -0.02200      0.00000      0.00000     -0.00000     -0.85313      0.00000     -0.00000      0.46105     -0.75923      0.00000     -1.55279 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.09538     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.53850     -0.00000 \n    -0.00997     -0.01811     -0.00000      0.00000      0.00000      0.03894     -0.00000     -0.00000     -0.00000     -0.00467     -0.00000     -0.00000     -0.00000     -0.30810     -0.00000     -0.55229      0.00000     -0.00000     -0.02200      0.00000     -0.00000      0.00000     -0.85313      0.00000      0.00000      0.42698      0.77889      0.00000     -1.55279 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mn\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.15979     -0.62731      0.00000      0.00000      0.00000      0.39539      0.00000      0.00000      0.00000     -0.03711      0.00000      0.00000      0.00000     -0.02207      0.00000      0.00000      0.00000     -0.08072      0.00000      0.00000     -0.08072      0.00000     -0.08072     -0.00599      0.00000      0.00000     -0.00599      0.00000     -0.00599 \n    -0.62731      2.49464      0.00000      0.00000      0.00000     -0.68078      0.00000      0.00000      0.00000      0.17341      0.00000      0.00000      0.00000      0.06442      0.00000      0.00000      0.00000     -0.08634      0.00000      0.00000     -0.08634      0.00000     -0.08634     -0.05960      0.00000      0.00000     -0.05960      0.00000     -0.05960 \n     0.00000      0.00000      2.24556      0.00000      0.00000      0.00000     -0.73556      0.00000      0.00000      0.00000     -0.05965      0.00000      0.00000      0.00000      0.02703      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.24556      0.00000      0.00000      0.00000     -0.73556      0.00000      0.00000      0.00000     -0.05965      0.00000      0.00000      0.00000      0.02703      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.24556      0.00000      0.00000      0.00000     -0.73556      0.00000      0.00000      0.00000     -0.05965      0.00000      0.00000      0.00000      0.02703      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.39539     -0.68078      0.00000      0.00000      0.00000      1.60188      0.00000      0.00000      0.00000     -0.34511      0.00000      0.00000      0.00000     -0.18407      0.00000      0.00000      0.00000      0.14243      0.00000      0.00000      0.14243      0.00000      0.14243      0.04654      0.00000      0.00000      0.04654      0.00000      0.04654 \n     0.00000      0.00000     -0.73556      0.00000      0.00000      0.00000      2.20611      0.00000      0.00000      0.00000      0.11562      0.00000      0.00000      0.00000     -0.04915      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.73556      0.00000      0.00000      0.00000      2.20611      0.00000      0.00000      0.00000      0.11562      0.00000      0.00000      0.00000     -0.04915      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.73556      0.00000      0.00000      0.00000      2.20611      0.00000      0.00000      0.00000      0.11562      0.00000      0.00000      0.00000     -0.04915      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03711      0.17341      0.00000      0.00000      0.00000     -0.34511      0.00000      0.00000      0.00000      1.00790      0.00000      0.00000      0.00000      0.47734      0.00000      0.00000      0.00000     -0.03185      0.00000      0.00000     -0.03185      0.00000     -0.03185      0.01586      0.00000      0.00000      0.01586      0.00000      0.01586 \n     0.00000      0.00000     -0.05965      0.00000      0.00000      0.00000      0.11562      0.00000      0.00000      0.00000      0.00637      0.00000      0.00000      0.00000     -0.00272      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05965      0.00000      0.00000      0.00000      0.11562      0.00000      0.00000      0.00000      0.00637      0.00000      0.00000      0.00000     -0.00272      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05965      0.00000      0.00000      0.00000      0.11562      0.00000      0.00000      0.00000      0.00637      0.00000      0.00000      0.00000     -0.00272      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02207      0.06442      0.00000      0.00000      0.00000     -0.18407      0.00000      0.00000      0.00000      0.47734      0.00000      0.00000      0.00000      0.24877      0.00000      0.00000      0.00000     -0.01692      0.00000      0.00000     -0.01692      0.00000     -0.01692      0.00462      0.00000      0.00000      0.00462      0.00000      0.00462 \n     0.00000      0.00000      0.02703      0.00000      0.00000      0.00000     -0.04915      0.00000      0.00000      0.00000     -0.00272      0.00000      0.00000      0.00000      0.00117      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02703      0.00000      0.00000      0.00000     -0.04915      0.00000      0.00000      0.00000     -0.00272      0.00000      0.00000      0.00000      0.00117      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02703      0.00000      0.00000      0.00000     -0.04915      0.00000      0.00000      0.00000     -0.00272      0.00000      0.00000      0.00000      0.00117      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.08072     -0.08634      0.00000      0.00000      0.00000      0.14243      0.00000      0.00000      0.00000     -0.03185      0.00000      0.00000      0.00000     -0.01692      0.00000      0.00000      0.00000      0.37160      0.00000      0.00000     -0.15509      0.00000     -0.15509      0.36357      0.00000      0.00000     -0.17227      0.00000     -0.17227 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05339      0.00000      0.00000      0.00000      0.00000      0.00000      1.07168      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05339      0.00000      0.00000      0.00000      0.00000      0.00000      1.07168      0.00000      0.00000      0.00000 \n    -0.08072     -0.08634      0.00000      0.00000      0.00000      0.14243      0.00000      0.00000      0.00000     -0.03185      0.00000      0.00000      0.00000     -0.01692      0.00000      0.00000      0.00000     -0.15509      0.00000      0.00000      0.37160      0.00000     -0.15509     -0.17227      0.00000      0.00000      0.36357      0.00000     -0.17227 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05339      0.00000      0.00000      0.00000      0.00000      0.00000      1.07168      0.00000 \n    -0.08072     -0.08634      0.00000      0.00000      0.00000      0.14243      0.00000      0.00000      0.00000     -0.03185      0.00000      0.00000      0.00000     -0.01692      0.00000      0.00000      0.00000     -0.15509      0.00000      0.00000     -0.15509      0.00000      0.37160     -0.17227      0.00000      0.00000     -0.17227      0.00000      0.36357 \n    -0.00599     -0.05960      0.00000      0.00000      0.00000      0.04654      0.00000      0.00000      0.00000      0.01586      0.00000      0.00000      0.00000      0.00462      0.00000      0.00000      0.00000      0.36357      0.00000      0.00000     -0.17227      0.00000     -0.17227      0.36697      0.00000      0.00000     -0.17818      0.00000     -0.17818 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.07168      0.00000      0.00000      0.00000      0.00000      0.00000      1.09029      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.07168      0.00000      0.00000      0.00000      0.00000      0.00000      1.09029      0.00000      0.00000      0.00000 \n    -0.00599     -0.05960      0.00000      0.00000      0.00000      0.04654      0.00000      0.00000      0.00000      0.01586      0.00000      0.00000      0.00000      0.00462      0.00000      0.00000      0.00000     -0.17227      0.00000      0.00000      0.36357      0.00000     -0.17227     -0.17818      0.00000      0.00000      0.36697      0.00000     -0.17818 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.07168      0.00000      0.00000      0.00000      0.00000      0.00000      1.09029      0.00000 \n    -0.00599     -0.05960      0.00000      0.00000      0.00000      0.04654      0.00000      0.00000      0.00000      0.01586      0.00000      0.00000      0.00000      0.00462      0.00000      0.00000      0.00000     -0.17227      0.00000      0.00000     -0.17227      0.00000      0.36357     -0.17818      0.00000      0.00000     -0.17818      0.00000      0.36697 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99996      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -232.06150    -26.66838    -22.79095    -22.79095    -22.79095     -3.04088     -1.93937     -1.93937     -1.93937     -0.18784     -0.18784     -0.18784     -0.18784     -0.18784     -0.18647     -0.05006     -0.05006     -0.05006      0.04862      0.09463      0.09463      0.09463      1.09790      2.11450      2.11450      2.11450      2.11450      2.11450     18.23069 \n   </alphaeps>\n   <betaeps>\n  -232.06030    -26.58571    -22.73146    -22.73146    -22.73146     -2.84978     -1.75304     -1.75304     -1.75304     -0.15881     -0.04422     -0.04422     -0.04422     -0.01323     -0.01323     -0.01323     -0.01323     -0.01323      0.06263      0.10577      0.10577      0.10577      1.19450      2.26875      2.26875      2.26875      2.26875      2.26875     18.32866 \n   </betaeps>\n   <alphavectors>\n     0.98144     -0.31685     -0.00000      0.00000      0.00000      0.12393     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.03206     -0.00000      0.00000      0.00000      0.01834     -0.00000      0.00000      0.00000      0.07334      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.24362 \n     0.06774      1.00804      0.00000     -0.00000     -0.00000     -0.46303      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.11837      0.00000     -0.00000     -0.00000     -0.10558      0.00000     -0.00000     -0.00000     -0.26126     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.08045 \n    -0.00000      0.00000      0.00000     -0.00000      0.98444      0.00000     -0.00000      0.00000     -0.39237      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.05796     -0.00000      0.00000      0.07100     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.98444      0.00000      0.00000     -0.00000     -0.39237     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.05796     -0.00000      0.00000     -0.00000      0.07100     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.98444     -0.00000      0.00000     -0.00000     -0.39237     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05796      0.00000      0.00000     -0.00000      0.00000      0.07100     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.10981      0.06912      0.00000     -0.00000     -0.00000      0.85116     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.27936     -0.00000      0.00000      0.00000      0.01408      0.00000     -0.00000      0.00000      1.27855     -0.00000      0.00000      0.00000     -0.00000      0.00000     11.90667 \n    -0.00000      0.00000      0.00000     -0.00000      0.04425     -0.00000      0.00000     -0.00000      1.05068      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.18334      0.00000     -0.00000     -0.22966     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.04425     -0.00000     -0.00000      0.00000      1.05068      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.18334      0.00000     -0.00000      0.00000     -0.22966      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.04425      0.00000     -0.00000      0.00000      1.05068      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.18334     -0.00000     -0.00000      0.00000     -0.00000     -0.22966     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00584      0.01380      0.00000     -0.00000     -0.00000      0.01173     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.76587      0.00000     -0.00000     -0.00000     -1.67309      0.00000     -0.00000     -0.00000      1.62466     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.11548 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00847     -0.00000      0.00000     -0.00000      0.04913     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.56328     -0.00000      0.00000      1.39966      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00847      0.00000      0.00000      0.00000      0.04913     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.56328     -0.00000      0.00000     -0.00000      1.39966      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00847      0.00000     -0.00000      0.00000      0.04913     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.56328      0.00000      0.00000     -0.00000      0.00000      1.39966      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00242     -0.00669     -0.00000      0.00000      0.00000     -0.00387      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.26714      0.00000     -0.00000     -0.00000      1.85256     -0.00000      0.00000      0.00000     -0.81714      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.51373 \n    -0.00000      0.00000      0.00000     -0.00000      0.00446      0.00000     -0.00000      0.00000     -0.02080      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.52210      0.00000     -0.00000     -1.38652     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00446     -0.00000     -0.00000     -0.00000     -0.02080      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.52210      0.00000     -0.00000      0.00000     -1.38652     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00446     -0.00000      0.00000     -0.00000     -0.02080     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.52210     -0.00000     -0.00000      0.00000     -0.00000     -1.38652     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.05189      0.00262      0.00000     -0.00000     -0.00000      0.08272     -0.00000      0.00000      0.00000     -0.43563     -0.40169     -0.00000      0.00000     -0.00000     -0.02263     -0.00000      0.00000      0.00000      0.02402     -0.00000      0.00000      0.00000     -0.11503      0.89831     -0.17844     -0.00000      0.00000     -0.00000     -4.76109 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.02635     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.58632     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.02635     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.58632     -0.00000      0.00000     -0.00000 \n    -0.05189      0.00262      0.00000     -0.00000     -0.00000      0.08272     -0.00000      0.00000      0.00000      0.56569     -0.17642     -0.00000      0.00000     -0.00000     -0.02263     -0.00000      0.00000      0.00000      0.02402     -0.00000      0.00000      0.00000     -0.11503     -0.29462      0.86718      0.00000     -0.00000      0.00000     -4.76109 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.02635     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.58632     -0.00000      0.00000 \n    -0.05189      0.00262      0.00000     -0.00000     -0.00000      0.08272     -0.00000      0.00000      0.00000     -0.13006      0.57811     -0.00000      0.00000     -0.00000     -0.02263     -0.00000      0.00000      0.00000      0.02402     -0.00000      0.00000      0.00000     -0.11503     -0.60369     -0.68874      0.00000     -0.00000      0.00000     -4.76109 \n    -0.01166     -0.01453     -0.00000      0.00000      0.00000      0.03157     -0.00000      0.00000      0.00000     -0.44319     -0.40867     -0.00000      0.00000     -0.00000      0.02368      0.00000     -0.00000     -0.00000     -0.01846      0.00000     -0.00000     -0.00000     -0.83766     -0.89170      0.17713      0.00000     -0.00000      0.00000     -1.59719 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.04417      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.57464      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.04417      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.57464      0.00000     -0.00000      0.00000 \n    -0.01166     -0.01453     -0.00000      0.00000      0.00000      0.03157     -0.00000      0.00000      0.00000      0.57552     -0.17948     -0.00000      0.00000     -0.00000      0.02368      0.00000     -0.00000     -0.00000     -0.01846      0.00000     -0.00000     -0.00000     -0.83766      0.29245     -0.86080     -0.00000      0.00000     -0.00000     -1.59719 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.04417      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.57464      0.00000     -0.00000 \n    -0.01166     -0.01453     -0.00000      0.00000      0.00000      0.03157     -0.00000      0.00000      0.00000     -0.13232      0.58815     -0.00000      0.00000     -0.00000      0.02368      0.00000     -0.00000     -0.00000     -0.01846      0.00000     -0.00000     -0.00000     -0.83766      0.59925      0.68367     -0.00000      0.00000     -0.00000     -1.59719 \n   </alphavectors>\n   <betavectors>\n     0.98144     -0.31723     -0.00000      0.00000      0.00000      0.12296      0.00000     -0.00000      0.00000     -0.02838      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01939     -0.00000     -0.00000      0.00000      0.07469      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.24356 \n     0.06772      1.00959      0.00000     -0.00000     -0.00000     -0.45972     -0.00000      0.00000     -0.00000      0.10150     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.10962      0.00000      0.00000     -0.00000     -0.26716     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.08030 \n     0.00000      0.00000      0.00000      0.98516     -0.00000      0.00000      0.00000     -0.00000     -0.38980      0.00000      0.05502     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.07727      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.98516     -0.00000     -0.00000      0.00000     -0.38980     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05502      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.07727      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.98516     -0.00000     -0.00000     -0.38980      0.00000     -0.00000      0.00000      0.05502      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.07727      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.10979      0.07225      0.00000     -0.00000     -0.00000      0.84125      0.00000     -0.00000      0.00000     -0.23990      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00282      0.00000     -0.00000      0.00000      1.31182     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     11.90460 \n     0.00000      0.00000      0.00000      0.04230      0.00000     -0.00000     -0.00000      0.00000      1.04806     -0.00000     -0.17320      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.24906      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.04230      0.00000      0.00000     -0.00000      1.04806      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.17320     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.24906      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.04230      0.00000      0.00000      1.04806     -0.00000      0.00000     -0.00000     -0.17320     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.24906     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00584      0.01366      0.00000     -0.00000     -0.00000      0.01333      0.00000     -0.00000      0.00000      0.64854     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.78887      0.00000     -0.00000     -0.00000      1.55284     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.11249 \n    -0.00000     -0.00000     -0.00000     -0.00808      0.00000     -0.00000     -0.00000      0.00000      0.06175      0.00000      0.46443     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.43501     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00808     -0.00000     -0.00000      0.00000      0.06175     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.46443      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.43501     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00808      0.00000      0.00000      0.06175      0.00000     -0.00000      0.00000      0.46443      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.43501      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00242     -0.00660     -0.00000      0.00000      0.00000     -0.00436     -0.00000      0.00000     -0.00000      0.42105     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.84280     -0.00000      0.00000      0.00000     -0.77418      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.51226 \n     0.00000      0.00000      0.00000      0.00425     -0.00000      0.00000      0.00000     -0.00000     -0.02640      0.00000      0.61724      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.34677      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00425      0.00000      0.00000      0.00000     -0.02640      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.61724     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.34677      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00425     -0.00000     -0.00000     -0.02640     -0.00000      0.00000     -0.00000      0.61724     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.34677      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.05188      0.00031      0.00000     -0.00000     -0.00000      0.08435      0.00000     -0.00000      0.00000     -0.02474      0.00000      0.00000      0.00000     -0.25281      0.51747     -0.00000     -0.00000      0.00000     -0.03032     -0.00000     -0.00000     -0.00000     -0.12156      0.91497     -0.00000      0.00000      0.00000     -0.14516     -4.76085 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.99753     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.60460      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.99753      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.60460     -0.00000     -0.00000 \n    -0.05188      0.00031      0.00000     -0.00000     -0.00000      0.08435      0.00000     -0.00000      0.00000     -0.02474      0.00000      0.00000      0.00000     -0.32174     -0.47768      0.00000      0.00000     -0.00000     -0.03032     -0.00000      0.00000      0.00000     -0.12156     -0.33177      0.00000     -0.00000     -0.00000      0.86497     -4.76085 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.99753      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.60460     -0.00000     -0.00000      0.00000 \n    -0.05188      0.00031      0.00000     -0.00000     -0.00000      0.08435      0.00000     -0.00000      0.00000     -0.02474      0.00000      0.00000      0.00000      0.57455     -0.03979     -0.00000     -0.00000      0.00000     -0.03032      0.00000     -0.00000     -0.00000     -0.12156     -0.58320      0.00000     -0.00000     -0.00000     -0.71981     -4.76085 \n    -0.01166     -0.01465     -0.00000      0.00000      0.00000      0.03560      0.00000     -0.00000      0.00000     -0.00399      0.00000      0.00000      0.00000     -0.27180      0.55633     -0.00000     -0.00000      0.00000     -0.00567     -0.00000     -0.00000     -0.00000     -0.84086     -0.88699      0.00000     -0.00000     -0.00000      0.14072     -1.59568 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.07244     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.55553      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.07244     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.55553     -0.00000      0.00000 \n    -0.01166     -0.01465     -0.00000      0.00000      0.00000      0.03560      0.00000     -0.00000      0.00000     -0.00399      0.00000      0.00000      0.00000     -0.34590     -0.51355      0.00000      0.00000     -0.00000     -0.00567     -0.00000      0.00000      0.00000     -0.84086      0.32162     -0.00000      0.00000      0.00000     -0.83852     -1.59568 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.07244     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.55553     -0.00000     -0.00000      0.00000 \n    -0.01166     -0.01465     -0.00000      0.00000      0.00000      0.03560      0.00000     -0.00000      0.00000     -0.00399      0.00000      0.00000      0.00000      0.61769     -0.04278     -0.00000     -0.00000      0.00000     -0.00567      0.00000     -0.00000     -0.00000     -0.84086      0.56537     -0.00000      0.00000      0.00000      0.69779     -1.59568 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Fe\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.16099     -0.63009      0.00000      0.00000      0.00000      0.40597      0.00000      0.00000      0.00000     -0.03494      0.00000      0.00000      0.00000     -0.02313      0.00000      0.00000      0.00000     -0.08389      0.00000      0.00000     -0.08389      0.00000     -0.08389     -0.00771      0.00000      0.00000     -0.00771      0.00000     -0.00771 \n    -0.63009      2.50117      0.00000      0.00000      0.00000     -0.72662      0.00000      0.00000      0.00000      0.16896      0.00000      0.00000      0.00000      0.06689      0.00000      0.00000      0.00000     -0.07307      0.00000      0.00000     -0.07307      0.00000     -0.07307     -0.05462      0.00000      0.00000     -0.05462      0.00000     -0.05462 \n     0.00000      0.00000      2.25313      0.00000      0.00000      0.00000     -0.74871      0.00000      0.00000      0.00000     -0.05782      0.00000      0.00000      0.00000      0.02760      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25313      0.00000      0.00000      0.00000     -0.74871      0.00000      0.00000      0.00000     -0.05782      0.00000      0.00000      0.00000      0.02760      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25313      0.00000      0.00000      0.00000     -0.74871      0.00000      0.00000      0.00000     -0.05782      0.00000      0.00000      0.00000      0.02760      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.40597     -0.72662      0.00000      0.00000      0.00000      1.64965      0.00000      0.00000      0.00000     -0.34313      0.00000      0.00000      0.00000     -0.18597      0.00000      0.00000      0.00000      0.13558      0.00000      0.00000      0.13558      0.00000      0.13558      0.04572      0.00000      0.00000      0.04572      0.00000      0.04572 \n     0.00000      0.00000     -0.74871      0.00000      0.00000      0.00000      2.21693      0.00000      0.00000      0.00000      0.11145      0.00000      0.00000      0.00000     -0.05117      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.74871      0.00000      0.00000      0.00000      2.21693      0.00000      0.00000      0.00000      0.11145      0.00000      0.00000      0.00000     -0.05117      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.74871      0.00000      0.00000      0.00000      2.21693      0.00000      0.00000      0.00000      0.11145      0.00000      0.00000      0.00000     -0.05117      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03494      0.16896      0.00000      0.00000      0.00000     -0.34313      0.00000      0.00000      0.00000      1.00440      0.00000      0.00000      0.00000      0.47658      0.00000      0.00000      0.00000     -0.02868      0.00000      0.00000     -0.02868      0.00000     -0.02868      0.01756      0.00000      0.00000      0.01756      0.00000      0.01756 \n     0.00000      0.00000     -0.05782      0.00000      0.00000      0.00000      0.11145      0.00000      0.00000      0.00000      0.00986      0.00000      0.00000      0.00000      0.00243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05782      0.00000      0.00000      0.00000      0.11145      0.00000      0.00000      0.00000      0.00986      0.00000      0.00000      0.00000      0.00243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05782      0.00000      0.00000      0.00000      0.11145      0.00000      0.00000      0.00000      0.00986      0.00000      0.00000      0.00000      0.00243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02313      0.06689      0.00000      0.00000      0.00000     -0.18597      0.00000      0.00000      0.00000      0.47658      0.00000      0.00000      0.00000      0.23926      0.00000      0.00000      0.00000     -0.01535      0.00000      0.00000     -0.01535      0.00000     -0.01535      0.00652      0.00000      0.00000      0.00652      0.00000      0.00652 \n     0.00000      0.00000      0.02760      0.00000      0.00000      0.00000     -0.05117      0.00000      0.00000      0.00000      0.00243      0.00000      0.00000      0.00000      0.00782      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02760      0.00000      0.00000      0.00000     -0.05117      0.00000      0.00000      0.00000      0.00243      0.00000      0.00000      0.00000      0.00782      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02760      0.00000      0.00000      0.00000     -0.05117      0.00000      0.00000      0.00000      0.00243      0.00000      0.00000      0.00000      0.00782      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.08389     -0.07307      0.00000      0.00000      0.00000      0.13558      0.00000      0.00000      0.00000     -0.02868      0.00000      0.00000      0.00000     -0.01535      0.00000      0.00000      0.00000      0.44586      0.00000      0.00000     -0.19508      0.00000     -0.19508      0.43248      0.00000      0.00000     -0.20771      0.00000     -0.20771 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.28188      0.00000      0.00000      0.00000      0.00000      0.00000      1.28038      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.28188      0.00000      0.00000      0.00000      0.00000      0.00000      1.28038      0.00000      0.00000      0.00000 \n    -0.08389     -0.07307      0.00000      0.00000      0.00000      0.13558      0.00000      0.00000      0.00000     -0.02868      0.00000      0.00000      0.00000     -0.01535      0.00000      0.00000      0.00000     -0.19508      0.00000      0.00000      0.44586      0.00000     -0.19508     -0.20771      0.00000      0.00000      0.43248      0.00000     -0.20771 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.28188      0.00000      0.00000      0.00000      0.00000      0.00000      1.28038      0.00000 \n    -0.08389     -0.07307      0.00000      0.00000      0.00000      0.13558      0.00000      0.00000      0.00000     -0.02868      0.00000      0.00000      0.00000     -0.01535      0.00000      0.00000      0.00000     -0.19508      0.00000      0.00000     -0.19508      0.00000      0.44586     -0.20771      0.00000      0.00000     -0.20771      0.00000      0.43248 \n    -0.00771     -0.05462      0.00000      0.00000      0.00000      0.04572      0.00000      0.00000      0.00000      0.01756      0.00000      0.00000      0.00000      0.00652      0.00000      0.00000      0.00000      0.43248      0.00000      0.00000     -0.20771      0.00000     -0.20771      0.42960      0.00000      0.00000     -0.21002      0.00000     -0.21002 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.28038      0.00000      0.00000      0.00000      0.00000      0.00000      1.27924      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.28038      0.00000      0.00000      0.00000      0.00000      0.00000      1.27924      0.00000      0.00000      0.00000 \n    -0.00771     -0.05462      0.00000      0.00000      0.00000      0.04572      0.00000      0.00000      0.00000      0.01756      0.00000      0.00000      0.00000      0.00652      0.00000      0.00000      0.00000     -0.20771      0.00000      0.00000      0.43248      0.00000     -0.20771     -0.21002      0.00000      0.00000      0.42960      0.00000     -0.21002 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.28038      0.00000      0.00000      0.00000      0.00000      0.00000      1.27924      0.00000 \n    -0.00771     -0.05462      0.00000      0.00000      0.00000      0.04572      0.00000      0.00000      0.00000      0.01756      0.00000      0.00000      0.00000      0.00652      0.00000      0.00000      0.00000     -0.20771      0.00000      0.00000     -0.20771      0.00000      0.43248     -0.21002      0.00000      0.00000     -0.21002      0.00000      0.42960 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.18934      0.18934      0.18934      0.18934      0.18934      0.01776      0.01776      0.01776      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -252.50230    -29.37618    -25.28156    -25.28156    -25.28156     -3.32154     -2.13005     -2.13005     -2.13005     -0.20756     -0.20756     -0.20756     -0.20756     -0.20756     -0.19352     -0.04932     -0.04932     -0.04932      0.05642      0.10607      0.10607      0.10607      1.21986      2.33419      2.33419      2.33419      2.33419      2.33419     19.21840 \n   </alphaeps>\n   <betaeps>\n  -252.50120    -29.30220    -25.22858    -25.22858    -25.22858     -3.16363     -1.97626     -1.97626     -1.97626     -0.17285     -0.06342     -0.06342     -0.06342     -0.06342     -0.06342     -0.04613     -0.04613     -0.04613      0.06650      0.11393      0.11393      0.11393      1.29687      2.46040      2.46040      2.46040      2.46040      2.46040     19.29621 \n   </betaeps>\n   <alphavectors>\n     0.98109     -0.31838     -0.00000      0.00000      0.00000      0.12520      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.03157     -0.00000      0.00000     -0.00000     -0.01844      0.00000     -0.00000     -0.00000      0.07352      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.25254 \n     0.06892      1.00767      0.00000     -0.00000     -0.00000     -0.46710     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.11670      0.00000     -0.00000      0.00000      0.10797     -0.00000      0.00000      0.00000     -0.25972     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.11992 \n    -0.00000      0.00000      0.00000     -0.00000      0.98467     -0.00000     -0.00000     -0.39648      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.05561      0.00000     -0.00000      0.07066     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.98467     -0.00000     -0.00000      0.00000     -0.39648      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05561     -0.00000      0.00000      0.00000      0.07066      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.98467     -0.00000      0.00000      0.00000     -0.00000     -0.39648      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05561     -0.00000     -0.00000      0.00000      0.00000      0.07066     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.10836      0.05722      0.00000     -0.00000     -0.00000      0.86491      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.27497     -0.00000      0.00000     -0.00000     -0.00312     -0.00000     -0.00000      0.00000      1.31079      0.00000      0.00000     -0.00000      0.00000     -0.00000     11.35858 \n    -0.00000      0.00000      0.00000     -0.00000      0.04312      0.00000      0.00000      1.05283     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.17385     -0.00000      0.00000     -0.22565      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.04312      0.00000      0.00000     -0.00000      1.05283     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.17385      0.00000     -0.00000     -0.00000     -0.22565      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.04312      0.00000     -0.00000     -0.00000      0.00000      1.05283     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.17385      0.00000      0.00000     -0.00000     -0.00000     -0.22565      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00618      0.01207      0.00000     -0.00000     -0.00000      0.01349      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.75143      0.00000     -0.00000      0.00000      1.71439     -0.00000      0.00000      0.00000      1.61134     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.09897 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00806      0.00000      0.00000      0.04909      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.53818      0.00000     -0.00000      1.42931      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00806      0.00000      0.00000     -0.00000      0.04909     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.53818     -0.00000      0.00000      0.00000      1.42931     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00806      0.00000     -0.00000     -0.00000      0.00000      0.04909      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.53818     -0.00000     -0.00000      0.00000      0.00000      1.42931     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00266     -0.00598     -0.00000      0.00000      0.00000     -0.00485     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.28307      0.00000     -0.00000      0.00000     -1.88083      0.00000      0.00000     -0.00000     -0.82384     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.51886 \n    -0.00000      0.00000      0.00000     -0.00000      0.00431     -0.00000     -0.00000     -0.02140     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.54337     -0.00000      0.00000     -1.40024      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00431     -0.00000     -0.00000      0.00000     -0.02140      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.54337      0.00000     -0.00000     -0.00000     -1.40024      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00431     -0.00000      0.00000      0.00000     -0.00000     -0.02140     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.54337      0.00000      0.00000     -0.00000     -0.00000     -1.40024     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.05149      0.00680      0.00000     -0.00000     -0.00000      0.07779      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.52096      0.00000     -0.30078     -0.02070     -0.00000     -0.00000      0.00000     -0.02545     -0.00000     -0.00000      0.00000     -0.12475      0.00000      0.00000      0.78474      0.00000     -0.45299     -4.55418 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.04193      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.56941      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.04193      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.56941     -0.00000     -0.00000 \n    -0.05149      0.00680      0.00000     -0.00000     -0.00000      0.07779      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.60156     -0.02070      0.00000      0.00000     -0.00000     -0.02545      0.00000      0.00000     -0.00000     -0.12475     -0.00000     -0.00000     -0.00007      0.00000      0.90610     -4.55418 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.04193     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.56941     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.05149      0.00680      0.00000     -0.00000     -0.00000      0.07779      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.52097      0.00000     -0.30078     -0.02070     -0.00000     -0.00000      0.00000     -0.02545     -0.00000     -0.00000      0.00000     -0.12475      0.00000      0.00000     -0.78467     -0.00000     -0.45311     -4.55418 \n    -0.01178     -0.01249     -0.00000      0.00000      0.00000      0.03081      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.51665      0.00000     -0.29829      0.02162     -0.00000     -0.00000      0.00000      0.01626     -0.00000     -0.00000      0.00000     -0.83453      0.00000      0.00000     -0.78759     -0.00000      0.45463     -1.54518 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.03330     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.57511     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.03330      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.57511      0.00000      0.00000 \n    -0.01178     -0.01249     -0.00000      0.00000      0.00000      0.03081      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.59658      0.02162      0.00000      0.00000     -0.00000      0.01626      0.00000      0.00000     -0.00000     -0.83453     -0.00000     -0.00000      0.00007      0.00000     -0.90939     -1.54518 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.03330     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.57511     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.01178     -0.01249     -0.00000      0.00000      0.00000      0.03081      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.51665      0.00000     -0.29829      0.02162     -0.00000     -0.00000      0.00000      0.01626     -0.00000     -0.00000      0.00000     -0.83453      0.00000      0.00000      0.78752      0.00000      0.45476     -1.54518 \n   </alphavectors>\n   <betavectors>\n     0.98109     -0.31869      0.00000      0.00000     -0.00000      0.12440      0.00000     -0.00000     -0.00000     -0.02891     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.01927     -0.00000      0.00000     -0.00000      0.07454     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.25248 \n     0.06890      1.00895     -0.00000     -0.00000      0.00000     -0.46433     -0.00000      0.00000      0.00000      0.10434      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.11124      0.00000     -0.00000      0.00000     -0.26418      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.11978 \n     0.00000     -0.00000      0.00000      0.00000      0.98522     -0.00000     -0.00000      0.00000     -0.39452      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05368      0.00000      0.00000     -0.00000      0.07520      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.98522     -0.00000      0.00000      0.00000     -0.39452      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.05368     -0.00000      0.00000     -0.00000      0.07520      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.98522     -0.00000     -0.00000     -0.00000     -0.39452      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05368     -0.00000     -0.00000     -0.00000      0.07520     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.10835      0.06010     -0.00000     -0.00000      0.00000      0.85723      0.00000     -0.00000     -0.00000     -0.24650     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00499      0.00000      0.00000      0.00000      1.33648     -0.00000      0.00000     -0.00000      0.00000      0.00000     11.35680 \n     0.00000     -0.00000      0.00000      0.00000      0.04163      0.00000      0.00000     -0.00000      1.05090     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.16721     -0.00000     -0.00000      0.00000     -0.23950      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.04163      0.00000     -0.00000     -0.00000      1.05090     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.16721      0.00000     -0.00000      0.00000     -0.23950     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.04163      0.00000      0.00000      0.00000      1.05090     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.16721      0.00000      0.00000      0.00000     -0.23950      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00618      0.01203     -0.00000     -0.00000      0.00000      0.01446      0.00000     -0.00000     -0.00000      0.66257      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.79932      0.00000     -0.00000      0.00000      1.55848     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.09657 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00777      0.00000      0.00000     -0.00000      0.05883      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.46663      0.00000      0.00000     -0.00000      1.45388     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00777      0.00000     -0.00000     -0.00000      0.05883      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.46663     -0.00000      0.00000     -0.00000      1.45388      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00777      0.00000      0.00000      0.00000      0.05883     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.46663     -0.00000     -0.00000     -0.00000      1.45388     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00266     -0.00594      0.00000      0.00000     -0.00000     -0.00510     -0.00000      0.00000      0.00000      0.39874     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.87386     -0.00000      0.00000     -0.00000     -0.79200      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.51766 \n     0.00000     -0.00000      0.00000      0.00000      0.00415     -0.00000     -0.00000      0.00000     -0.02586     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.61203     -0.00000     -0.00000      0.00000     -1.37155      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00415     -0.00000      0.00000      0.00000     -0.02586      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.61203      0.00000     -0.00000      0.00000     -1.37155      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00415     -0.00000     -0.00000     -0.00000     -0.02586      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.61203      0.00000      0.00000      0.00000     -1.37155     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.05149      0.00482     -0.00000     -0.00000      0.00000      0.07883      0.00000     -0.00000     -0.00000     -0.02236     -0.29392     -0.00000      0.50905     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.03009      0.00000      0.00000      0.00000     -0.12989     -0.45761      0.00000      0.79244     -0.00000     -0.00000     -4.55399 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.01811     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.58497     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.01811      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.58497      0.00000      0.00000     -0.00000      0.00000 \n    -0.05149      0.00482     -0.00000     -0.00000      0.00000      0.07883      0.00000     -0.00000     -0.00000     -0.02236      0.58781      0.00000      0.00002      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.03009     -0.00000     -0.00000     -0.00000     -0.12989      0.91508     -0.00000      0.00008      0.00000     -0.00000     -4.55399 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.01811     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.58497     -0.00000     -0.00000 \n    -0.05149      0.00482     -0.00000     -0.00000      0.00000      0.07883      0.00000     -0.00000     -0.00000     -0.02236     -0.29389     -0.00000     -0.50906     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.03009      0.00000      0.00000      0.00000     -0.12989     -0.45747      0.00000     -0.79252      0.00000      0.00000     -4.55399 \n    -0.01178     -0.01266      0.00000      0.00000     -0.00000      0.03425      0.00000     -0.00000     -0.00000      0.00129     -0.30513     -0.00000      0.52847     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00111      0.00000      0.00000      0.00000     -0.83707      0.45021      0.00000     -0.77962      0.00000      0.00000     -1.54397 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.05697      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.55933     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.05697      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.55933      0.00000      0.00000     -0.00000      0.00000 \n    -0.01178     -0.01266      0.00000      0.00000     -0.00000      0.03425      0.00000     -0.00000     -0.00000      0.00129      0.61024      0.00000      0.00002      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00111     -0.00000     -0.00000     -0.00000     -0.83707     -0.90028     -0.00000     -0.00008      0.00000      0.00000     -1.54397 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.05697      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.55933     -0.00000      0.00000 \n    -0.01178     -0.01266      0.00000      0.00000     -0.00000      0.03425      0.00000     -0.00000     -0.00000      0.00129     -0.30511     -0.00000     -0.52849     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00111      0.00000      0.00000      0.00000     -0.83707      0.45007      0.00000      0.77970     -0.00000     -0.00000     -1.54397 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Co\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.16197     -0.63195      0.00000      0.00000      0.00000      0.41464      0.00000      0.00000      0.00000     -0.03230      0.00000      0.00000      0.00000     -0.02431      0.00000      0.00000      0.00000     -0.08665      0.00000      0.00000     -0.08665      0.00000     -0.08665     -0.00929      0.00000      0.00000     -0.00929      0.00000     -0.00929 \n    -0.63195      2.50389      0.00000      0.00000      0.00000     -0.76108      0.00000      0.00000      0.00000      0.15714      0.00000      0.00000      0.00000      0.07024      0.00000      0.00000      0.00000     -0.06161      0.00000      0.00000     -0.06161      0.00000     -0.06161     -0.05121      0.00000      0.00000     -0.05121      0.00000     -0.05121 \n     0.00000      0.00000      2.25971      0.00000      0.00000      0.00000     -0.75981      0.00000      0.00000      0.00000     -0.05579      0.00000      0.00000      0.00000      0.02559      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25971      0.00000      0.00000      0.00000     -0.75981      0.00000      0.00000      0.00000     -0.05579      0.00000      0.00000      0.00000      0.02559      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25971      0.00000      0.00000      0.00000     -0.75981      0.00000      0.00000      0.00000     -0.05579      0.00000      0.00000      0.00000      0.02559      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.41464     -0.76108      0.00000      0.00000      0.00000      1.69694      0.00000      0.00000      0.00000     -0.33717      0.00000      0.00000      0.00000     -0.19350      0.00000      0.00000      0.00000      0.12752      0.00000      0.00000      0.12752      0.00000      0.12752      0.04627      0.00000      0.00000      0.04627      0.00000      0.04627 \n     0.00000      0.00000     -0.75981      0.00000      0.00000      0.00000      2.22513      0.00000      0.00000      0.00000      0.10861      0.00000      0.00000      0.00000     -0.04750      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.75981      0.00000      0.00000      0.00000      2.22513      0.00000      0.00000      0.00000      0.10861      0.00000      0.00000      0.00000     -0.04750      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.75981      0.00000      0.00000      0.00000      2.22513      0.00000      0.00000      0.00000      0.10861      0.00000      0.00000      0.00000     -0.04750      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03230      0.15714      0.00000      0.00000      0.00000     -0.33717      0.00000      0.00000      0.00000      0.98445      0.00000      0.00000      0.00000      0.49092      0.00000      0.00000      0.00000     -0.02583      0.00000      0.00000     -0.02583      0.00000     -0.02583      0.01545      0.00000      0.00000      0.01545      0.00000      0.01545 \n     0.00000      0.00000     -0.05579      0.00000      0.00000      0.00000      0.10861      0.00000      0.00000      0.00000      0.00674      0.00000      0.00000      0.00000     -0.00075      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05579      0.00000      0.00000      0.00000      0.10861      0.00000      0.00000      0.00000      0.00674      0.00000      0.00000      0.00000     -0.00075      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05579      0.00000      0.00000      0.00000      0.10861      0.00000      0.00000      0.00000      0.00674      0.00000      0.00000      0.00000     -0.00075      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02431      0.07024      0.00000      0.00000      0.00000     -0.19350      0.00000      0.00000      0.00000      0.49092      0.00000      0.00000      0.00000      0.25124      0.00000      0.00000      0.00000     -0.01454      0.00000      0.00000     -0.01454      0.00000     -0.01454      0.00658      0.00000      0.00000      0.00658      0.00000      0.00658 \n     0.00000      0.00000      0.02559      0.00000      0.00000      0.00000     -0.04750      0.00000      0.00000      0.00000     -0.00075      0.00000      0.00000      0.00000      0.00329      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02559      0.00000      0.00000      0.00000     -0.04750      0.00000      0.00000      0.00000     -0.00075      0.00000      0.00000      0.00000      0.00329      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02559      0.00000      0.00000      0.00000     -0.04750      0.00000      0.00000      0.00000     -0.00075      0.00000      0.00000      0.00000      0.00329      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.08665     -0.06161      0.00000      0.00000      0.00000      0.12752      0.00000      0.00000      0.00000     -0.02583      0.00000      0.00000      0.00000     -0.01454      0.00000      0.00000      0.00000      0.52126      0.00000      0.00000     -0.23549      0.00000     -0.23548      0.50764      0.00000      0.00000     -0.24595      0.00000     -0.24594 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.51347      0.00000      0.00000      0.00000      0.00000      0.00000      1.50714      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.51347      0.00000      0.00000      0.00000      0.00000      0.00000      1.50714      0.00000      0.00000      0.00000 \n    -0.08665     -0.06161      0.00000      0.00000      0.00000      0.12752      0.00000      0.00000      0.00000     -0.02583      0.00000      0.00000      0.00000     -0.01454      0.00000      0.00000      0.00000     -0.23549      0.00000      0.00000      0.52125      0.00000     -0.23548     -0.24595      0.00000      0.00000      0.50763      0.00000     -0.24594 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.51347      0.00000      0.00000      0.00000      0.00000      0.00000      1.50714      0.00000 \n    -0.08665     -0.06161      0.00000      0.00000      0.00000      0.12752      0.00000      0.00000      0.00000     -0.02583      0.00000      0.00000      0.00000     -0.01454      0.00000      0.00000      0.00000     -0.23548      0.00000      0.00000     -0.23548      0.00000      0.52126     -0.24594      0.00000      0.00000     -0.24594      0.00000      0.50763 \n    -0.00929     -0.05121      0.00000      0.00000      0.00000      0.04627      0.00000      0.00000      0.00000      0.01545      0.00000      0.00000      0.00000      0.00658      0.00000      0.00000      0.00000      0.50764      0.00000      0.00000     -0.24595      0.00000     -0.24594      0.50324      0.00000      0.00000     -0.24736      0.00000     -0.24736 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.50714      0.00000      0.00000      0.00000      0.00000      0.00000      1.50118      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.50714      0.00000      0.00000      0.00000      0.00000      0.00000      1.50118      0.00000      0.00000      0.00000 \n    -0.00929     -0.05121      0.00000      0.00000      0.00000      0.04627      0.00000      0.00000      0.00000      0.01545      0.00000      0.00000      0.00000      0.00658      0.00000      0.00000      0.00000     -0.24595      0.00000      0.00000      0.50763      0.00000     -0.24594     -0.24736      0.00000      0.00000      0.50324      0.00000     -0.24735 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.50714      0.00000      0.00000      0.00000      0.00000      0.00000      1.50118      0.00000 \n    -0.00929     -0.05121      0.00000      0.00000      0.00000      0.04627      0.00000      0.00000      0.00000      0.01545      0.00000      0.00000      0.00000      0.00658      0.00000      0.00000      0.00000     -0.24594      0.00000      0.00000     -0.24594      0.00000      0.50763     -0.24736      0.00000      0.00000     -0.24735      0.00000      0.50323 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.39655      0.39655      0.39655      0.39655      0.39655      0.00575      0.00575      0.00575      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -273.75380    -32.14756    -27.83325    -27.83325    -27.83325     -3.56255     -2.28014     -2.28014     -2.28014     -0.19137     -0.18407     -0.18407     -0.18407     -0.18407     -0.18407     -0.04537     -0.04537     -0.04537      0.06193      0.11504      0.11504      0.11504      1.36958      2.62633      2.62633      2.62633      2.62633      2.62633     20.59119 \n   </alphaeps>\n   <betaeps>\n  -273.75300    -32.08801    -27.79078    -27.79078    -27.79078     -3.44335     -2.16402     -2.16402     -2.16402     -0.17669     -0.07498     -0.07498     -0.07498     -0.07498     -0.07498     -0.04295     -0.04295     -0.04295      0.06947      0.12096      0.12096      0.12096      1.42788      2.72158      2.72158      2.72158      2.72158      2.72158     20.64898 \n   </betaeps>\n   <alphavectors>\n     0.98076     -0.31984     -0.00000      0.00000     -0.00000      0.12611      0.00000      0.00000     -0.00000     -0.03063     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01909     -0.00000      0.00000      0.00000      0.07395     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.26215 \n     0.07002      1.00748      0.00000     -0.00000      0.00000     -0.46960     -0.00000     -0.00000      0.00000      0.11126      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.10454      0.00000     -0.00000     -0.00000     -0.26510      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.16210 \n     0.00000     -0.00000     -0.00000      0.00000      0.98487     -0.00000     -0.00000     -0.00000     -0.40004     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05249     -0.00000      0.00000     -0.00000      0.07047     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.98487      0.00000     -0.00000      0.00000      0.00000     -0.40004     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.05249      0.00000      0.00000      0.00000      0.00000      0.07047     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.98487      0.00000      0.00000     -0.40004      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05249     -0.00000     -0.00000      0.07047      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.10740      0.04860      0.00000     -0.00000      0.00000      0.87821      0.00000      0.00000     -0.00000     -0.27058     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.02201      0.00000      0.00000      0.00000      1.33709     -0.00000      0.00000      0.00000     -0.00000     -0.00000     10.97794 \n     0.00000     -0.00000     -0.00000      0.00000      0.04216      0.00000      0.00000      0.00000      1.05458      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.16234      0.00000     -0.00000      0.00000     -0.22246      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.04216     -0.00000      0.00000     -0.00000     -0.00000      1.05458      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.16234     -0.00000     -0.00000     -0.00000     -0.00000     -0.22246      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.04216     -0.00000     -0.00000      1.05458     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.16234      0.00000      0.00000     -0.22246     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00610      0.00991      0.00000     -0.00000      0.00000      0.01483      0.00000      0.00000     -0.00000      0.73105      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.67037      0.00000     -0.00000     -0.00000      1.49451      0.00000      0.00000      0.00000      0.00000      0.00000      1.01811 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00740      0.00000      0.00000      0.00000      0.04867      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.50422      0.00000      0.00000     -0.00000      1.39605      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00740      0.00000     -0.00000     -0.00000     -0.00000      0.04867     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.50422      0.00000      0.00000      0.00000      0.00000      1.39605     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00740     -0.00000     -0.00000      0.04867      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.50422     -0.00000     -0.00000      1.39605      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00262     -0.00482     -0.00000      0.00000     -0.00000     -0.00537     -0.00000     -0.00000      0.00000      0.31340      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.81489     -0.00000      0.00000      0.00000     -0.74824      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.47335 \n     0.00000     -0.00000     -0.00000      0.00000      0.00386     -0.00000     -0.00000     -0.00000     -0.02090     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.58070      0.00000      0.00000     -0.00000     -1.34076     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00386     -0.00000      0.00000      0.00000      0.00000     -0.02090      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.58070     -0.00000     -0.00000     -0.00000     -0.00000     -1.34076      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00386      0.00000      0.00000     -0.02090     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.58070      0.00000      0.00000     -1.34076      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.05120      0.00965      0.00000     -0.00000      0.00000      0.07241      0.00000      0.00000     -0.00000     -0.01913     -0.00000      0.00000      0.60385     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02627     -0.00000      0.00000     -0.00000     -0.13623      0.00000      0.00002      0.90252     -0.00000      0.00000     -4.40572 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.04589      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.56321      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.04589      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.56321      0.00000 \n    -0.05120      0.00965      0.00000     -0.00000      0.00000      0.07241      0.00000      0.00000     -0.00000     -0.01913     -0.00000      0.52294     -0.30193      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02627      0.00000     -0.00000      0.00000     -0.13623      0.00000      0.78160     -0.45128      0.00000     -0.00000     -4.40572 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.04589      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.56321     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.05120      0.00965      0.00000     -0.00000      0.00000      0.07241      0.00000      0.00000      0.00000     -0.01913     -0.00000     -0.52295     -0.30192      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02627      0.00000     -0.00000      0.00000     -0.13623     -0.00000     -0.78162     -0.45124      0.00000      0.00000     -4.40572 \n    -0.01206     -0.01088     -0.00000      0.00000     -0.00000      0.03038      0.00000      0.00000      0.00000      0.01691      0.00000      0.00000      0.59575     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01340     -0.00000      0.00000     -0.00000     -0.82619      0.00000     -0.00002     -0.90789     -0.00000      0.00000     -1.52290 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.03186     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.57251     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.03186     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.57251      0.00000 \n    -0.01206     -0.01088     -0.00000      0.00000     -0.00000      0.03038      0.00000      0.00000     -0.00000      0.01691      0.00000      0.51593     -0.29788      0.00000     -0.00000      0.00000      0.00000      0.00000      0.01340      0.00000     -0.00000      0.00000     -0.82619     -0.00000     -0.78625      0.45396      0.00000      0.00000     -1.52290 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.03186     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.57251      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.01206     -0.01088     -0.00000      0.00000     -0.00000      0.03038      0.00000      0.00000      0.00000      0.01691      0.00000     -0.51593     -0.29787      0.00000     -0.00000      0.00000      0.00000      0.00000      0.01340      0.00000     -0.00000      0.00000     -0.82619      0.00000      0.78626      0.45393      0.00000     -0.00000     -1.52290 \n   </alphavectors>\n   <betavectors>\n     0.98077     -0.32007     -0.00000     -0.00000     -0.00000      0.12551      0.00000     -0.00000      0.00000     -0.02885     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01969     -0.00000      0.00000      0.00000      0.07464      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.26210 \n     0.07001      1.00843      0.00000      0.00000      0.00000     -0.46754     -0.00000      0.00000     -0.00000      0.10318      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.10679      0.00000     -0.00000     -0.00000     -0.26798     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.16199 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.98526      0.00000      0.00000     -0.00000     -0.39869     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05125     -0.00000      0.00000      0.00000      0.07354     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.98526     -0.00000     -0.00000     -0.00000     -0.00000     -0.39869      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.05125      0.00000     -0.00000      0.00000     -0.00000      0.07354     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.98526      0.00000      0.00000     -0.39869     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.05125     -0.00000     -0.00000      0.07354     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.10740      0.05088      0.00000      0.00000      0.00000      0.87263      0.00000     -0.00000     -0.00000     -0.25093      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01708     -0.00000      0.00000      0.00000      1.35522      0.00000     -0.00000      0.00000      0.00000      0.00000     10.97662 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.04112     -0.00000     -0.00000      0.00000      1.05327      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.15810      0.00000     -0.00000     -0.00000     -0.23170      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.04112      0.00000      0.00000      0.00000      0.00000      1.05327     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.15810     -0.00000      0.00000     -0.00000      0.00000     -0.23170      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.04112     -0.00000     -0.00000      1.05327      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.15810      0.00000      0.00000     -0.23170      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00610      0.00992      0.00000      0.00000      0.00000      0.01548      0.00000     -0.00000     -0.00000      0.67029      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.72571      0.00000     -0.00000     -0.00000      1.46082      0.00000      0.00000      0.00000      0.00000      0.00000      1.01652 \n     0.00000      0.00000      0.00000      0.00000     -0.00720     -0.00000     -0.00000      0.00000      0.05536      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.45737      0.00000     -0.00000     -0.00000      1.41184      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00720     -0.00000     -0.00000      0.00000      0.00000      0.05536      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.45737      0.00000     -0.00000      0.00000     -0.00000      1.41184      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00720     -0.00000     -0.00000      0.05536     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.45737     -0.00000     -0.00000      1.41184      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00262     -0.00481     -0.00000     -0.00000     -0.00000     -0.00552     -0.00000      0.00000      0.00000      0.39103     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.80806     -0.00000      0.00000      0.00000     -0.72845     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.47256 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00376      0.00000      0.00000     -0.00000     -0.02393     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.62502     -0.00000      0.00000      0.00000     -1.32063     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00376      0.00000      0.00000     -0.00000     -0.00000     -0.02393     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.62502     -0.00000      0.00000     -0.00000      0.00000     -1.32063     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00376      0.00000      0.00000     -0.02393      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.62502      0.00000      0.00000     -1.32063     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.05120      0.00816      0.00000      0.00000      0.00000      0.07308      0.00000     -0.00000     -0.00000     -0.02029     -0.00000      0.00000     -0.00000      0.00000      0.59388      0.00000     -0.00000      0.00000     -0.02944      0.00000      0.00000     -0.00000     -0.13983      0.00000     -0.00000      0.00000      0.00000      0.90911     -4.40558 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.02863      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.57463     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.02863     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.57463     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.05120      0.00816      0.00000      0.00000      0.00000      0.07308      0.00000     -0.00000      0.00000     -0.02029      0.51432      0.00000     -0.00000      0.00000     -0.29694     -0.00000      0.00000     -0.00000     -0.02944     -0.00000     -0.00000      0.00000     -0.13983     -0.00000      0.00000      0.78731      0.00000     -0.45456     -4.40558 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.02863      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.57463     -0.00000     -0.00000 \n    -0.05120      0.00816      0.00000      0.00000      0.00000      0.07308      0.00000     -0.00000      0.00000     -0.02029     -0.51432      0.00000     -0.00000      0.00000     -0.29694     -0.00000      0.00000     -0.00000     -0.02944     -0.00000     -0.00000      0.00000     -0.13983     -0.00000      0.00000     -0.78731     -0.00000     -0.45455     -4.40558 \n    -0.01206     -0.01105     -0.00000     -0.00000     -0.00000      0.03298      0.00000     -0.00000      0.00000      0.00372     -0.00000      0.00000      0.00000     -0.00000      0.60570      0.00000     -0.00000      0.00000      0.00209      0.00000      0.00000     -0.00000     -0.82793      0.00000     -0.00000     -0.00000     -0.00000     -0.90128     -1.52205 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.04910     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.56106      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.04910      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.56106     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.01206     -0.01105     -0.00000     -0.00000     -0.00000      0.03298      0.00000     -0.00000      0.00000      0.00372      0.52455      0.00000      0.00000     -0.00000     -0.30285     -0.00000      0.00000     -0.00000      0.00209     -0.00000     -0.00000      0.00000     -0.82793     -0.00000      0.00000     -0.78053     -0.00000      0.45064     -1.52205 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.04910     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.56106      0.00000      0.00000 \n    -0.01206     -0.01105     -0.00000     -0.00000     -0.00000      0.03298      0.00000     -0.00000      0.00000      0.00372     -0.52455      0.00000      0.00000     -0.00000     -0.30285     -0.00000      0.00000     -0.00000      0.00209     -0.00000     -0.00000      0.00000     -0.82793     -0.00000      0.00000      0.78053      0.00000      0.45064     -1.52205 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ni\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.16282     -0.63346      0.00000      0.00000      0.00000      0.41848      0.00000      0.00000      0.00000     -0.02942      0.00000      0.00000      0.00000     -0.02547      0.00000      0.00000      0.00000     -0.08789      0.00000      0.00000     -0.08789      0.00000     -0.08789     -0.01014      0.00000      0.00000     -0.01014      0.00000     -0.01014 \n    -0.63346      2.50568      0.00000      0.00000      0.00000     -0.78909      0.00000      0.00000      0.00000      0.14607      0.00000      0.00000      0.00000      0.07413      0.00000      0.00000      0.00000     -0.05170      0.00000      0.00000     -0.05170      0.00000     -0.05170     -0.04857      0.00000      0.00000     -0.04857      0.00000     -0.04857 \n     0.00000      0.00000      2.26515      0.00000      0.00000      0.00000     -0.76893      0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000      0.02527      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26515      0.00000      0.00000      0.00000     -0.76893      0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000      0.02527      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26515      0.00000      0.00000      0.00000     -0.76893      0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000      0.02527      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.41848     -0.78909      0.00000      0.00000      0.00000      1.72917      0.00000      0.00000      0.00000     -0.32140      0.00000      0.00000      0.00000     -0.20025      0.00000      0.00000      0.00000      0.12066      0.00000      0.00000      0.12066      0.00000      0.12066      0.04741      0.00000      0.00000      0.04741      0.00000      0.04741 \n     0.00000      0.00000     -0.76893      0.00000      0.00000      0.00000      2.23182      0.00000      0.00000      0.00000      0.10858      0.00000      0.00000      0.00000     -0.04739      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.76893      0.00000      0.00000      0.00000      2.23182      0.00000      0.00000      0.00000      0.10858      0.00000      0.00000      0.00000     -0.04739      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.76893      0.00000      0.00000      0.00000      2.23182      0.00000      0.00000      0.00000      0.10858      0.00000      0.00000      0.00000     -0.04739      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02942      0.14607      0.00000      0.00000      0.00000     -0.32140      0.00000      0.00000      0.00000      0.94918      0.00000      0.00000      0.00000      0.50253      0.00000      0.00000      0.00000     -0.02261      0.00000      0.00000     -0.02261      0.00000     -0.02261      0.01364      0.00000      0.00000      0.01364      0.00000      0.01364 \n     0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000      0.10858      0.00000      0.00000      0.00000      0.00561      0.00000      0.00000      0.00000     -0.00216      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000      0.10858      0.00000      0.00000      0.00000      0.00561      0.00000      0.00000      0.00000     -0.00216      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000      0.10858      0.00000      0.00000      0.00000      0.00561      0.00000      0.00000      0.00000     -0.00216      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02547      0.07413      0.00000      0.00000      0.00000     -0.20025      0.00000      0.00000      0.00000      0.50253      0.00000      0.00000      0.00000      0.26908      0.00000      0.00000      0.00000     -0.01381      0.00000      0.00000     -0.01381      0.00000     -0.01381      0.00631      0.00000      0.00000      0.00631      0.00000      0.00631 \n     0.00000      0.00000      0.02527      0.00000      0.00000      0.00000     -0.04739      0.00000      0.00000      0.00000     -0.00216      0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02527      0.00000      0.00000      0.00000     -0.04739      0.00000      0.00000      0.00000     -0.00216      0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02527      0.00000      0.00000      0.00000     -0.04739      0.00000      0.00000      0.00000     -0.00216      0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.08789     -0.05170      0.00000      0.00000      0.00000      0.12066      0.00000      0.00000      0.00000     -0.02261      0.00000      0.00000      0.00000     -0.01381      0.00000      0.00000      0.00000      0.59731      0.00000      0.00000     -0.27569      0.00000     -0.27569      0.58144      0.00000      0.00000     -0.28330      0.00000     -0.28330 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.74600      0.00000      0.00000      0.00000      0.00000      0.00000      1.72945      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.74600      0.00000      0.00000      0.00000      0.00000      0.00000      1.72945      0.00000      0.00000      0.00000 \n    -0.08789     -0.05170      0.00000      0.00000      0.00000      0.12066      0.00000      0.00000      0.00000     -0.02261      0.00000      0.00000      0.00000     -0.01381      0.00000      0.00000      0.00000     -0.27569      0.00000      0.00000      0.59732      0.00000     -0.27569     -0.28330      0.00000      0.00000      0.58143      0.00000     -0.28329 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.74600      0.00000      0.00000      0.00000      0.00000      0.00000      1.72945      0.00000 \n    -0.08789     -0.05170      0.00000      0.00000      0.00000      0.12066      0.00000      0.00000      0.00000     -0.02261      0.00000      0.00000      0.00000     -0.01381      0.00000      0.00000      0.00000     -0.27569      0.00000      0.00000     -0.27569      0.00000      0.59731     -0.28330      0.00000      0.00000     -0.28329      0.00000      0.58143 \n    -0.01014     -0.04857      0.00000      0.00000      0.00000      0.04741      0.00000      0.00000      0.00000      0.01364      0.00000      0.00000      0.00000      0.00631      0.00000      0.00000      0.00000      0.58144      0.00000      0.00000     -0.28330      0.00000     -0.28330      0.57373      0.00000      0.00000     -0.28290      0.00000     -0.28291 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.72945      0.00000      0.00000      0.00000      0.00000      0.00000      1.71324      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.72945      0.00000      0.00000      0.00000      0.00000      0.00000      1.71324      0.00000      0.00000      0.00000 \n    -0.01014     -0.04857      0.00000      0.00000      0.00000      0.04741      0.00000      0.00000      0.00000      0.01364      0.00000      0.00000      0.00000      0.00631      0.00000      0.00000      0.00000     -0.28330      0.00000      0.00000      0.58143      0.00000     -0.28329     -0.28290      0.00000      0.00000      0.57372      0.00000     -0.28290 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.72945      0.00000      0.00000      0.00000      0.00000      0.00000      1.71324      0.00000 \n    -0.01014     -0.04857      0.00000      0.00000      0.00000      0.04741      0.00000      0.00000      0.00000      0.01364      0.00000      0.00000      0.00000      0.00631      0.00000      0.00000      0.00000     -0.28330      0.00000      0.00000     -0.28329      0.00000      0.58143     -0.28291      0.00000      0.00000     -0.28290      0.00000      0.57373 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.99999      0.99999      0.99999      0.99999      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.59952      0.59952      0.59952      0.59952      0.59952      0.00080      0.00080      0.00080      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -295.86820    -35.04010    -30.50567    -30.50567    -30.50567     -3.81573     -2.43937     -2.43937     -2.43937     -0.19119     -0.16265     -0.16265     -0.16265     -0.16265     -0.16265     -0.04218     -0.04218     -0.04218      0.06979      0.12652      0.12652      0.12652      1.53287      2.93735      2.93735      2.93735      2.93735      2.93735     21.74879 \n   </alphaeps>\n   <betaeps>\n  -295.86760    -34.99766    -30.47548    -30.47548    -30.47548     -3.73537     -2.36104     -2.36104     -2.36104     -0.18187     -0.08882     -0.08882     -0.08882     -0.08882     -0.08882     -0.04060     -0.04060     -0.04060      0.07488      0.13048      0.13048      0.13048      1.57225      3.00162      3.00162      3.00162      3.00162      3.00162     21.78745 \n   </betaeps>\n   <alphavectors>\n     0.98048     -0.32114      0.00000     -0.00000      0.00000      0.12686     -0.00000      0.00000     -0.00000     -0.02968      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01937     -0.00000     -0.00000     -0.00000      0.07457      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.26893 \n     0.07098      1.00713     -0.00000      0.00000     -0.00000     -0.47169      0.00000     -0.00000      0.00000      0.10730     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.10516      0.00000      0.00000      0.00000     -0.26685     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.19345 \n    -0.00000      0.00000      0.98509     -0.00000      0.00000     -0.00000     -0.40283     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.04967      0.00000      0.00000     -0.00000      0.07021     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.98509     -0.00000      0.00000      0.00000     -0.40283     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.04967     -0.00000      0.00000      0.07021     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.98509     -0.00000      0.00000      0.00000     -0.40283     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.04967     -0.00000     -0.00000     -0.00000      0.00000      0.07021     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.10507      0.04138     -0.00000      0.00000     -0.00000      0.88818     -0.00000      0.00000     -0.00000     -0.26282      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.02170      0.00000      0.00000     -0.00000      1.38269     -0.00000     -0.00000     -0.00000      0.00000      0.00000     10.57506 \n    -0.00000      0.00000      0.04124      0.00000     -0.00000      0.00000      1.05596      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.15220     -0.00000     -0.00000      0.00000     -0.21944      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.04124      0.00000     -0.00000     -0.00000      1.05596      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.15220      0.00000     -0.00000     -0.21944      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.04124      0.00000     -0.00000     -0.00000      1.05596      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.15220      0.00000      0.00000      0.00000     -0.00000     -0.21944      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00600      0.00841     -0.00000      0.00000     -0.00000      0.01704     -0.00000      0.00000     -0.00000      0.70747      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.67969     -0.00000      0.00000      0.00000      1.42752     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.96751 \n     0.00000     -0.00000     -0.00695      0.00000     -0.00000      0.00000      0.04963      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.47153     -0.00000     -0.00000      0.00000      1.40153     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00695      0.00000     -0.00000     -0.00000      0.04963     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.47153     -0.00000      0.00000      1.40153     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00695      0.00000     -0.00000     -0.00000      0.04963     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.47153     -0.00000     -0.00000     -0.00000      0.00000      1.40153     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00263     -0.00412      0.00000     -0.00000      0.00000     -0.00648      0.00000     -0.00000      0.00000      0.34205      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.80378      0.00000     -0.00000     -0.00000     -0.71753      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.45486 \n    -0.00000      0.00000      0.00363     -0.00000      0.00000     -0.00000     -0.02160     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.61155      0.00000      0.00000     -0.00000     -1.32287      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00363     -0.00000      0.00000      0.00000     -0.02160      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.61155      0.00000     -0.00000     -1.32287      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00363     -0.00000      0.00000      0.00000     -0.02160      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.61155      0.00000      0.00000      0.00000     -0.00000     -1.32287      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.05035      0.01217     -0.00000      0.00000     -0.00000      0.06812      0.00000      0.00000     -0.00000     -0.01748     -0.00000      0.60469      0.00000     -0.03310     -0.00000     -0.00000     -0.00000     -0.00000     -0.02701      0.00000      0.00000     -0.00000     -0.14839     -0.00000      0.89876      0.00000     -0.04309      0.00000     -4.24497 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.04892      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.55848      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.04892     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.55848      0.00000      0.00000     -0.00000 \n    -0.05035      0.01217     -0.00000      0.00000     -0.00000      0.06812     -0.00000      0.00000     -0.00000     -0.01748      0.00000     -0.27368     -0.00000      0.54023      0.00000     -0.00000     -0.00000     -0.00000     -0.02701     -0.00000     -0.00000      0.00000     -0.14839      0.00000     -0.41206     -0.00000      0.79989     -0.00000     -4.24497 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.04892     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.55848      0.00000 \n    -0.05035      0.01217     -0.00000      0.00000     -0.00000      0.06812      0.00000      0.00000     -0.00000     -0.01748      0.00000     -0.33101     -0.00000     -0.50712     -0.00000      0.00000      0.00000      0.00000     -0.02701      0.00000     -0.00000      0.00000     -0.14839      0.00000     -0.48669      0.00000     -0.75680      0.00000     -4.24497 \n    -0.01208     -0.00951      0.00000     -0.00000      0.00000      0.03048     -0.00000      0.00000     -0.00000      0.01309     -0.00000      0.59423      0.00000     -0.03253     -0.00000     -0.00000      0.00000     -0.00000      0.01094      0.00000      0.00000     -0.00000     -0.82209      0.00000     -0.90571      0.00000      0.04342      0.00000     -1.49207 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.03077      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.57054     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03077     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.57054     -0.00000     -0.00000     -0.00000 \n    -0.01208     -0.00951      0.00000     -0.00000      0.00000      0.03048     -0.00000      0.00000     -0.00000      0.01309      0.00000     -0.26894     -0.00000      0.53088      0.00000     -0.00000     -0.00000     -0.00000      0.01094     -0.00000     -0.00000      0.00000     -0.82209     -0.00000      0.41525     -0.00000     -0.80608     -0.00000     -1.49207 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.03077     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.57054      0.00000 \n    -0.01208     -0.00951      0.00000     -0.00000      0.00000      0.03048      0.00000      0.00000     -0.00000      0.01309      0.00000     -0.32529     -0.00000     -0.49835     -0.00000      0.00000      0.00000      0.00000      0.01094      0.00000     -0.00000      0.00000     -0.82209     -0.00000      0.49046      0.00000      0.76266      0.00000     -1.49207 \n   </alphavectors>\n   <betavectors>\n     0.98048     -0.32128      0.00000      0.00000     -0.00000      0.12646      0.00000      0.00000      0.00000     -0.02861     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.01975     -0.00000      0.00000      0.00000      0.07497     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.26890 \n     0.07097      1.00776     -0.00000     -0.00000      0.00000     -0.47033     -0.00000     -0.00000     -0.00000      0.10248      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.10657      0.00000     -0.00000     -0.00000     -0.26855      0.00000      0.00000      0.00000     -0.00000      0.00000      1.19337 \n    -0.00000      0.00000      0.98533     -0.00000      0.00000      0.00000     -0.40199      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.04898     -0.00000      0.00000     -0.00000      0.07204     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.98533      0.00000      0.00000      0.00000     -0.40199      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.04898      0.00000      0.00000     -0.00000      0.07204     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.98533      0.00000      0.00000      0.00000     -0.40199      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.04898      0.00000      0.00000      0.00000      0.07204      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.10507      0.04293     -0.00000     -0.00000      0.00000      0.88463      0.00000      0.00000      0.00000     -0.25106     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.01865      0.00000     -0.00000      0.00000      1.39405     -0.00000     -0.00000      0.00000      0.00000     -0.00000     10.57415 \n    -0.00000      0.00000      0.04059      0.00000     -0.00000     -0.00000      1.05518     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.14983      0.00000     -0.00000      0.00000     -0.22491      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.04059     -0.00000     -0.00000     -0.00000      1.05518     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.14983     -0.00000     -0.00000      0.00000     -0.22491      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.04059     -0.00000     -0.00000     -0.00000      1.05518     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.14983     -0.00000     -0.00000     -0.00000     -0.22491      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00600      0.00844     -0.00000     -0.00000      0.00000      0.01746      0.00000      0.00000      0.00000      0.66922     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.71231      0.00000     -0.00000     -0.00000      1.40774     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.96651 \n     0.00000     -0.00000     -0.00683      0.00000     -0.00000     -0.00000      0.05382      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.44370     -0.00000      0.00000     -0.00000      1.41043      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00683     -0.00000     -0.00000     -0.00000      0.05382      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.44370      0.00000      0.00000     -0.00000      1.41043      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00683     -0.00000     -0.00000     -0.00000      0.05382      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.44370      0.00000      0.00000      0.00000      1.41043      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00263     -0.00412      0.00000      0.00000     -0.00000     -0.00659     -0.00000     -0.00000     -0.00000      0.38980      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.79878     -0.00000      0.00000      0.00000     -0.70595      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.45436 \n    -0.00000      0.00000      0.00357     -0.00000      0.00000      0.00000     -0.02350     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.63757      0.00000     -0.00000      0.00000     -1.31050     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00357      0.00000      0.00000      0.00000     -0.02350     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.63757     -0.00000     -0.00000      0.00000     -1.31050      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00357      0.00000      0.00000      0.00000     -0.02350      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.63757     -0.00000     -0.00000     -0.00000     -1.31050     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.05035      0.01119     -0.00000     -0.00000      0.00000      0.06849      0.00000      0.00000      0.00000     -0.01822      0.59870     -0.00000     -0.00000      0.00000      0.02471      0.00000      0.00000     -0.00000     -0.02896      0.00000      0.00000     -0.00000     -0.15070      0.90288      0.00000      0.00000     -0.00000      0.04601     -4.24487 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.03786     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.56586      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.03786      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.56586     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.05035      0.01119     -0.00000     -0.00000      0.00000      0.06849      0.00000      0.00000      0.00000     -0.01822     -0.32075     -0.00000     -0.00000      0.00000      0.50613      0.00000      0.00000     -0.00000     -0.02896      0.00000      0.00000     -0.00000     -0.15070     -0.49128      0.00000      0.00000     -0.00000      0.75891     -4.24487 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.03786      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.56586     -0.00000      0.00000 \n    -0.05035      0.01119     -0.00000     -0.00000      0.00000      0.06849      0.00000      0.00000      0.00000     -0.01822     -0.27795     -0.00000     -0.00000      0.00000     -0.53085     -0.00000     -0.00000      0.00000     -0.02896     -0.00000     -0.00000      0.00000     -0.15070     -0.41160     -0.00000     -0.00000      0.00000     -0.80492     -4.24487 \n    -0.01208     -0.00964      0.00000      0.00000     -0.00000      0.03219      0.00000      0.00000      0.00000      0.00539      0.60101      0.00000      0.00000     -0.00000      0.02481      0.00000      0.00000     -0.00000      0.00423      0.00000      0.00000     -0.00000     -0.82317     -0.90135      0.00000     -0.00000     -0.00000     -0.04593     -1.49152 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.04186      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.56321     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.04186     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.56321      0.00000      0.00000      0.00000      0.00000 \n    -0.01208     -0.00964      0.00000      0.00000     -0.00000      0.03219      0.00000      0.00000      0.00000      0.00539     -0.32199      0.00000      0.00000     -0.00000      0.50808      0.00000      0.00000     -0.00000      0.00423      0.00000      0.00000     -0.00000     -0.82317      0.49045      0.00000      0.00000     -0.00000     -0.75763     -1.49152 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.04186     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.56321      0.00000     -0.00000 \n    -0.01208     -0.00964      0.00000      0.00000     -0.00000      0.03219      0.00000      0.00000      0.00000      0.00539     -0.27902      0.00000      0.00000     -0.00000     -0.53289     -0.00000     -0.00000      0.00000      0.00423     -0.00000     -0.00000      0.00000     -0.82317      0.41090     -0.00000     -0.00000      0.00000      0.80355     -1.49152 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cu\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.16258     -0.63091      0.00000      0.00000      0.00000      0.39951      0.00000      0.00000      0.00000     -0.05215      0.00000      0.00000      0.00000      0.00160      0.00000      0.00000      0.00000     -0.08635      0.00000      0.00000     -0.08635      0.00000     -0.08635     -0.00244      0.00000      0.00000     -0.00244      0.00000     -0.00244 \n    -0.63091      2.49046      0.00000      0.00000      0.00000     -0.75476      0.00000      0.00000      0.00000      0.22076      0.00000      0.00000      0.00000     -0.00837      0.00000      0.00000      0.00000     -0.04512      0.00000      0.00000     -0.04512      0.00000     -0.04512     -0.07312      0.00000      0.00000     -0.07312      0.00000     -0.07312 \n     0.00000      0.00000      2.26946      0.00000      0.00000      0.00000     -0.77594      0.00000      0.00000      0.00000     -0.03287      0.00000      0.00000      0.00000      0.00076      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26946      0.00000      0.00000      0.00000     -0.77594      0.00000      0.00000      0.00000     -0.03287      0.00000      0.00000      0.00000      0.00076      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26946      0.00000      0.00000      0.00000     -0.77594      0.00000      0.00000      0.00000     -0.03287      0.00000      0.00000      0.00000      0.00076      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.39951     -0.75476      0.00000      0.00000      0.00000      1.59181      0.00000      0.00000      0.00000     -0.27591      0.00000      0.00000      0.00000     -0.00227      0.00000      0.00000      0.00000      0.11161      0.00000      0.00000      0.11161      0.00000      0.11161      0.09440      0.00000      0.00000      0.09440      0.00000      0.09440 \n     0.00000      0.00000     -0.77594      0.00000      0.00000      0.00000      2.23583      0.00000      0.00000      0.00000      0.05299      0.00000      0.00000      0.00000     -0.00191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.77594      0.00000      0.00000      0.00000      2.23583      0.00000      0.00000      0.00000      0.05299      0.00000      0.00000      0.00000     -0.00191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.77594      0.00000      0.00000      0.00000      2.23583      0.00000      0.00000      0.00000      0.05299      0.00000      0.00000      0.00000     -0.00191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05215      0.22076      0.00000      0.00000      0.00000     -0.27591      0.00000      0.00000      0.00000      2.31994      0.00000      0.00000      0.00000     -0.14325      0.00000      0.00000      0.00000     -0.08446      0.00000      0.00000     -0.08446      0.00000     -0.08446     -0.12773      0.00000      0.00000     -0.12773      0.00000     -0.12773 \n     0.00000      0.00000     -0.03287      0.00000      0.00000      0.00000      0.05299      0.00000      0.00000      0.00000      0.35128      0.00000      0.00000      0.00000     -0.00136      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.03287      0.00000      0.00000      0.00000      0.05299      0.00000      0.00000      0.00000      0.35128      0.00000      0.00000      0.00000     -0.00136      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.03287      0.00000      0.00000      0.00000      0.05299      0.00000      0.00000      0.00000      0.35128      0.00000      0.00000      0.00000     -0.00136      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00160     -0.00837      0.00000      0.00000      0.00000     -0.00227      0.00000      0.00000      0.00000     -0.14325      0.00000      0.00000      0.00000      2.00912      0.00000      0.00000      0.00000      0.00439      0.00000      0.00000      0.00439      0.00000      0.00439      0.00625      0.00000      0.00000      0.00625      0.00000      0.00625 \n     0.00000      0.00000      0.00076      0.00000      0.00000      0.00000     -0.00191      0.00000      0.00000      0.00000     -0.00136      0.00000      0.00000      0.00000      1.99997      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00076      0.00000      0.00000      0.00000     -0.00191      0.00000      0.00000      0.00000     -0.00136      0.00000      0.00000      0.00000      1.99997      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00076      0.00000      0.00000      0.00000     -0.00191      0.00000      0.00000      0.00000     -0.00136      0.00000      0.00000      0.00000      1.99997      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.08635     -0.04512      0.00000      0.00000      0.00000      0.11161      0.00000      0.00000      0.00000     -0.08446      0.00000      0.00000      0.00000      0.00439      0.00000      0.00000      0.00000      0.01608      0.00000      0.00000      0.01608      0.00000      0.01608      0.01142      0.00000      0.00000      0.01142      0.00000      0.01142 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.08635     -0.04512      0.00000      0.00000      0.00000      0.11161      0.00000      0.00000      0.00000     -0.08446      0.00000      0.00000      0.00000      0.00439      0.00000      0.00000      0.00000      0.01608      0.00000      0.00000      0.01608      0.00000      0.01608      0.01142      0.00000      0.00000      0.01142      0.00000      0.01142 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.08635     -0.04512      0.00000      0.00000      0.00000      0.11161      0.00000      0.00000      0.00000     -0.08446      0.00000      0.00000      0.00000      0.00439      0.00000      0.00000      0.00000      0.01608      0.00000      0.00000      0.01608      0.00000      0.01608      0.01142      0.00000      0.00000      0.01142      0.00000      0.01142 \n    -0.00244     -0.07312      0.00000      0.00000      0.00000      0.09440      0.00000      0.00000      0.00000     -0.12773      0.00000      0.00000      0.00000      0.00625      0.00000      0.00000      0.00000      0.01142      0.00000      0.00000      0.01142      0.00000      0.01142      0.01182      0.00000      0.00000      0.01182      0.00000      0.01182 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00244     -0.07312      0.00000      0.00000      0.00000      0.09440      0.00000      0.00000      0.00000     -0.12773      0.00000      0.00000      0.00000      0.00625      0.00000      0.00000      0.00000      0.01142      0.00000      0.00000      0.01142      0.00000      0.01142      0.01182      0.00000      0.00000      0.01182      0.00000      0.01182 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00244     -0.07312      0.00000      0.00000      0.00000      0.09440      0.00000      0.00000      0.00000     -0.12773      0.00000      0.00000      0.00000      0.00625      0.00000      0.00000      0.00000      0.01142      0.00000      0.00000      0.01142      0.00000      0.01142      0.01182      0.00000      0.00000      0.01182      0.00000      0.01182 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99992      0.00003      0.00003      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -317.79390    -36.97562    -32.22218    -32.22218    -32.22218     -3.15558     -1.69882     -1.69882     -1.69882      0.00416      0.00416      0.00416      0.00603      0.08501      0.19806      0.19806      0.19806      0.69351      0.69351      0.69351      0.69351      0.69351      2.05857      4.03805      4.03805      4.03805      4.03805      4.03805     22.89643 \n   </alphaeps>\n   <betaeps>\n  -317.79340    -36.97601    -32.22237    -32.22237    -32.22237     -3.15560     -1.69866     -1.69866     -1.69866      0.00448      0.00448      0.00448      0.00691      0.13675      0.24697      0.24697      0.24697      0.69487      0.69487      0.69487      0.69487      0.69487      2.07048      4.04056      4.04056      4.04056      4.04056      4.04056     22.90807 \n   </betaeps>\n   <alphavectors>\n     0.98030     -0.32236      0.00000      0.00000      0.00000      0.12492      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00275     -0.02751     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.07703     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.27362 \n     0.07143      1.00693     -0.00000     -0.00000     -0.00000     -0.46369     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00962      0.10439      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.28635      0.00000      0.00000      0.00000      0.00000      0.00000      1.20408 \n     0.00000      0.00000     -0.00000     -0.00000      0.98527      0.00000     -0.40329     -0.00000      0.00000      0.00042      0.00000     -0.00000     -0.00000      0.00000      0.08671     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.98527      0.00000      0.00000      0.00000     -0.00000     -0.40329     -0.00000      0.00000      0.00042      0.00000     -0.00000      0.00000      0.08671      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.98527      0.00000      0.00000     -0.00000     -0.00000     -0.40329     -0.00000      0.00000      0.00042      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.08671      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.10004      0.03571     -0.00000     -0.00000     -0.00000      0.87393      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.01860     -0.13436     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.49079     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      9.94397 \n     0.00000      0.00000     -0.00000     -0.00000      0.04042     -0.00000      1.05095      0.00000     -0.00000     -0.00124     -0.00000      0.00000      0.00000     -0.00000     -0.25914     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.04042     -0.00000     -0.00000     -0.00000      0.00000      1.05095      0.00000     -0.00000     -0.00124     -0.00000      0.00000     -0.00000     -0.25914     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.04042     -0.00000     -0.00000      0.00000      0.00000      1.05095      0.00000     -0.00000     -0.00124     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.25914      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00321      0.00384     -0.00000     -0.00000     -0.00000      0.01709      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.07112      1.07755     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.65270     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.47659 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00412      0.00000      0.06808     -0.00000      0.00000      0.00227      0.00000     -0.00000     -0.00000      0.00000      1.01326     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00412      0.00000      0.00000      0.00000     -0.00000      0.06808     -0.00000      0.00000      0.00227      0.00000     -0.00000      0.00000      1.01326      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00412     -0.00000     -0.00000     -0.00000     -0.00000      0.06808     -0.00000      0.00000      0.00227      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.01326      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00009     -0.00012      0.00000      0.00000      0.00000     -0.00040     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.99353     -0.13215      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.02074      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.01431 \n     0.00000      0.00000     -0.00000     -0.00000      0.00003     -0.00000     -0.00045      0.00000     -0.00000      0.99997     -0.00000      0.00000      0.00000     -0.00000     -0.01244      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00003     -0.00000     -0.00000     -0.00000      0.00000     -0.00045      0.00000     -0.00000      0.99997     -0.00000      0.00000     -0.00000     -0.01244     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000     -0.00045      0.00000     -0.00000      0.99997     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.01244     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.04854      0.01393     -0.00000     -0.00000     -0.00000      0.06240      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00324     -0.04099      0.00000     -0.00000     -0.00000      0.54977      0.00000     -0.00000     -0.02009      0.00000     -0.19000      0.93248      0.00000      0.00000     -0.04351      0.00000     -4.02477 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.95286     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.61687      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.95286      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.61687      0.00000      0.00000     -0.00000      0.00000 \n    -0.04854      0.01393     -0.00000     -0.00000     -0.00000      0.06240      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00324     -0.04099      0.00000     -0.00000     -0.00000     -0.25749     -0.00000      0.00000      0.48616     -0.00000     -0.19000     -0.42856      0.00000      0.00000      0.82931     -0.00000     -4.02477 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.95286      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.61687     -0.00000 \n    -0.04854      0.01393     -0.00000     -0.00000     -0.00000      0.06240      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00324     -0.04099      0.00000     -0.00000     -0.00000     -0.29228     -0.00000      0.00000     -0.46607     -0.00000     -0.19000     -0.50392     -0.00000     -0.00000     -0.78580     -0.00000     -4.02477 \n    -0.01145     -0.00806      0.00000      0.00000      0.00000      0.04590      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00525     -0.06337      0.00000     -0.00000     -0.00000      0.64926      0.00000     -0.00000     -0.02372      0.00000     -0.78392     -0.86622      0.00000      0.00000      0.04042      0.00000     -1.37560 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.12531      0.00000      0.00000      0.00000      0.00000      0.00000     -1.50196     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.12531     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.50196     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01145     -0.00806      0.00000      0.00000      0.00000      0.04590      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00525     -0.06337      0.00000     -0.00000     -0.00000     -0.30409     -0.00000      0.00000      0.57414     -0.00000     -0.78392      0.39810      0.00000      0.00000     -0.77037     -0.00000     -1.37560 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.12531     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.50196      0.00000 \n    -0.01145     -0.00806      0.00000      0.00000      0.00000      0.04590      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00525     -0.06337      0.00000     -0.00000     -0.00000     -0.34518     -0.00000      0.00000     -0.55042     -0.00000     -0.78392      0.46811     -0.00000     -0.00000      0.72996     -0.00000     -1.37560 \n   </alphavectors>\n   <betavectors>\n     0.98030     -0.32236      0.00000     -0.00000      0.00000      0.12492      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00151     -0.02820     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.07691     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.27359 \n     0.07143      1.00692     -0.00000      0.00000     -0.00000     -0.46369     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00488      0.10693      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.28601      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.20398 \n     0.00000     -0.00000      0.00000      0.98527     -0.00000      0.00000     -0.40348      0.00000      0.00000      0.00028     -0.00000     -0.00000     -0.00000      0.00000      0.08584     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.98527      0.00000      0.00000      0.00000     -0.40348     -0.00000     -0.00000      0.00028      0.00000      0.00000      0.00000      0.00000      0.08584     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.98527     -0.00000      0.00000      0.00000      0.00000     -0.40348      0.00000     -0.00000      0.00028     -0.00000      0.00000     -0.00000      0.00000      0.08584     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.10004      0.03566     -0.00000      0.00000     -0.00000      0.87452      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.01353     -0.14874     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.48463     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      9.94464 \n     0.00000     -0.00000      0.00000      0.04042      0.00000     -0.00000      1.05151     -0.00000     -0.00000     -0.00081      0.00000      0.00000      0.00000     -0.00000     -0.25688     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.04042     -0.00000     -0.00000     -0.00000      1.05151      0.00000      0.00000     -0.00081     -0.00000     -0.00000     -0.00000     -0.00000     -0.25688      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.04042      0.00000     -0.00000     -0.00000     -0.00000      1.05151     -0.00000      0.00000     -0.00081      0.00000     -0.00000      0.00000     -0.00000     -0.25688      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00321      0.00384     -0.00000      0.00000     -0.00000      0.01635      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.02011      1.07371      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.66226     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.47700 \n    -0.00000      0.00000     -0.00000     -0.00411     -0.00000     -0.00000      0.06591      0.00000      0.00000      0.00063     -0.00000     -0.00000     -0.00000      0.00000      1.01341      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00411      0.00000      0.00000      0.00000      0.06591     -0.00000     -0.00000      0.00063      0.00000      0.00000      0.00000      0.00000      1.01341      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00411     -0.00000      0.00000      0.00000      0.00000      0.06591      0.00000     -0.00000      0.00063     -0.00000      0.00000     -0.00000      0.00000      1.01341     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00009     -0.00012      0.00000     -0.00000      0.00000     -0.00039     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.99864     -0.08530      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02078      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.01430 \n     0.00000     -0.00000      0.00000      0.00003      0.00000      0.00000     -0.00044     -0.00000     -0.00000      0.99999      0.00000      0.00000      0.00000     -0.00000     -0.01083     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00003     -0.00000     -0.00000     -0.00000     -0.00044      0.00000      0.00000      0.99999     -0.00000     -0.00000     -0.00000     -0.00000     -0.01083      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00003      0.00000     -0.00000     -0.00000     -0.00000     -0.00044     -0.00000      0.00000      0.99999      0.00000     -0.00000      0.00000     -0.00000     -0.01083      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.04854      0.01396     -0.00000      0.00000     -0.00000      0.06221      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00110     -0.03904     -0.00000     -0.00000      0.00000      0.52945     -0.00000      0.00000     -0.15173     -0.00000     -0.18837     -0.32120      0.00000     -0.00000      0.87611     -0.00000     -4.02487 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.95394     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.61623      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.95394      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.61623      0.00000     -0.00000     -0.00000 \n    -0.04854      0.01396     -0.00000      0.00000     -0.00000      0.06221      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00110     -0.03904     -0.00000     -0.00000      0.00000     -0.13332      0.00000     -0.00000      0.53438      0.00000     -0.18837     -0.59813     -0.00000      0.00000     -0.71622      0.00000     -4.02487 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.95394      0.00000      0.00000      1.61623     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.04854      0.01396     -0.00000      0.00000     -0.00000      0.06221      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00110     -0.03904     -0.00000     -0.00000      0.00000     -0.39613      0.00000     -0.00000     -0.38265     -0.00000     -0.18837      0.91933     -0.00000     -0.00000     -0.15988     -0.00000     -4.02487 \n    -0.01145     -0.00805      0.00000     -0.00000      0.00000      0.04591      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00168     -0.05629     -0.00000     -0.00000      0.00000      0.62400     -0.00000      0.00000     -0.17883     -0.00000     -0.78379      0.29864      0.00000     -0.00000     -0.81457     -0.00000     -1.37599 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.12430      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.50272     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.12430     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.50272     -0.00000     -0.00000      0.00000 \n    -0.01145     -0.00805      0.00000     -0.00000      0.00000      0.04591      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00168     -0.05629     -0.00000     -0.00000      0.00000     -0.15713      0.00000     -0.00000      0.62981      0.00000     -0.78379      0.55612     -0.00000      0.00000      0.66592      0.00000     -1.37599 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.12430     -0.00000     -0.00000     -1.50272      0.00000      0.00000      0.00000     -0.00000 \n    -0.01145     -0.00805      0.00000     -0.00000      0.00000      0.04591      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00168     -0.05629     -0.00000     -0.00000      0.00000     -0.46687      0.00000     -0.00000     -0.45098     -0.00000     -0.78379     -0.85476     -0.00000     -0.00000      0.14866     -0.00000     -1.37599 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Zn\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.16477     -0.63737      0.00000      0.00000      0.00000      0.42314      0.00000      0.00000      0.00000     -0.02650      0.00000      0.00000      0.00000     -0.02605      0.00000      0.00000      0.00000     -0.08879      0.00000      0.00000     -0.08879      0.00000     -0.08879     -0.01168      0.00000      0.00000     -0.01168      0.00000     -0.01168 \n    -0.63737      2.51095      0.00000      0.00000      0.00000     -0.82903      0.00000      0.00000      0.00000      0.13141      0.00000      0.00000      0.00000      0.07640      0.00000      0.00000      0.00000     -0.03886      0.00000      0.00000     -0.03886      0.00000     -0.03886     -0.04403      0.00000      0.00000     -0.04403      0.00000     -0.04403 \n     0.00000      0.00000      2.27437      0.00000      0.00000      0.00000     -0.78450      0.00000      0.00000      0.00000     -0.05183      0.00000      0.00000      0.00000      0.02371      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.27437      0.00000      0.00000      0.00000     -0.78450      0.00000      0.00000      0.00000     -0.05183      0.00000      0.00000      0.00000      0.02371      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.27437      0.00000      0.00000      0.00000     -0.78450      0.00000      0.00000      0.00000     -0.05183      0.00000      0.00000      0.00000      0.02371      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.42314     -0.82903      0.00000      0.00000      0.00000      1.79616      0.00000      0.00000      0.00000     -0.30852      0.00000      0.00000      0.00000     -0.20557      0.00000      0.00000      0.00000      0.10848      0.00000      0.00000      0.10848      0.00000      0.10848      0.04633      0.00000      0.00000      0.04633      0.00000      0.04633 \n     0.00000      0.00000     -0.78450      0.00000      0.00000      0.00000      2.24467      0.00000      0.00000      0.00000      0.10280      0.00000      0.00000      0.00000     -0.04529      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.78450      0.00000      0.00000      0.00000      2.24467      0.00000      0.00000      0.00000      0.10280      0.00000      0.00000      0.00000     -0.04529      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.78450      0.00000      0.00000      0.00000      2.24467      0.00000      0.00000      0.00000      0.10280      0.00000      0.00000      0.00000     -0.04529      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02650      0.13141      0.00000      0.00000      0.00000     -0.30852      0.00000      0.00000      0.00000      0.92908      0.00000      0.00000      0.00000      0.51106      0.00000      0.00000      0.00000     -0.01811      0.00000      0.00000     -0.01811      0.00000     -0.01811      0.01324      0.00000      0.00000      0.01324      0.00000      0.01324 \n     0.00000      0.00000     -0.05183      0.00000      0.00000      0.00000      0.10280      0.00000      0.00000      0.00000      0.00579      0.00000      0.00000      0.00000     -0.00072      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05183      0.00000      0.00000      0.00000      0.10280      0.00000      0.00000      0.00000      0.00579      0.00000      0.00000      0.00000     -0.00072      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05183      0.00000      0.00000      0.00000      0.10280      0.00000      0.00000      0.00000      0.00579      0.00000      0.00000      0.00000     -0.00072      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02605      0.07640      0.00000      0.00000      0.00000     -0.20557      0.00000      0.00000      0.00000      0.51106      0.00000      0.00000      0.00000      0.28197      0.00000      0.00000      0.00000     -0.01190      0.00000      0.00000     -0.01190      0.00000     -0.01190      0.00641      0.00000      0.00000      0.00641      0.00000      0.00641 \n     0.00000      0.00000      0.02371      0.00000      0.00000      0.00000     -0.04529      0.00000      0.00000      0.00000     -0.00072      0.00000      0.00000      0.00000      0.00305      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02371      0.00000      0.00000      0.00000     -0.04529      0.00000      0.00000      0.00000     -0.00072      0.00000      0.00000      0.00000      0.00305      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02371      0.00000      0.00000      0.00000     -0.04529      0.00000      0.00000      0.00000     -0.00072      0.00000      0.00000      0.00000      0.00305      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.08879     -0.03886      0.00000      0.00000      0.00000      0.10848      0.00000      0.00000      0.00000     -0.01811      0.00000      0.00000      0.00000     -0.01190      0.00000      0.00000      0.00000      0.75190      0.00000      0.00000     -0.35648      0.00000     -0.35648      0.72570      0.00000      0.00000     -0.35640      0.00000     -0.35640 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21678      0.00000      0.00000      0.00000      0.00000      0.00000      2.16420      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21678      0.00000      0.00000      0.00000      0.00000      0.00000      2.16420      0.00000      0.00000      0.00000 \n    -0.08879     -0.03886      0.00000      0.00000      0.00000      0.10848      0.00000      0.00000      0.00000     -0.01811      0.00000      0.00000      0.00000     -0.01190      0.00000      0.00000      0.00000     -0.35648      0.00000      0.00000      0.75190      0.00000     -0.35649     -0.35639      0.00000      0.00000      0.72571      0.00000     -0.35639 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21678      0.00000      0.00000      0.00000      0.00000      0.00000      2.16420      0.00000 \n    -0.08879     -0.03886      0.00000      0.00000      0.00000      0.10848      0.00000      0.00000      0.00000     -0.01811      0.00000      0.00000      0.00000     -0.01190      0.00000      0.00000      0.00000     -0.35648      0.00000      0.00000     -0.35649      0.00000      0.75191     -0.35639      0.00000      0.00000     -0.35640      0.00000      0.72571 \n    -0.01168     -0.04403      0.00000      0.00000      0.00000      0.04633      0.00000      0.00000      0.00000      0.01324      0.00000      0.00000      0.00000      0.00641      0.00000      0.00000      0.00000      0.72570      0.00000      0.00000     -0.35639      0.00000     -0.35639      0.70663      0.00000      0.00000     -0.34979      0.00000     -0.34980 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.16420      0.00000      0.00000      0.00000      0.00000      0.00000      2.11287      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.16420      0.00000      0.00000      0.00000      0.00000      0.00000      2.11287      0.00000      0.00000      0.00000 \n    -0.01168     -0.04403      0.00000      0.00000      0.00000      0.04633      0.00000      0.00000      0.00000      0.01324      0.00000      0.00000      0.00000      0.00641      0.00000      0.00000      0.00000     -0.35640      0.00000      0.00000      0.72571      0.00000     -0.35640     -0.34979      0.00000      0.00000      0.70664      0.00000     -0.34979 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.16420      0.00000      0.00000      0.00000      0.00000      0.00000      2.11287      0.00000 \n    -0.01168     -0.04403      0.00000      0.00000      0.00000      0.04633      0.00000      0.00000      0.00000      0.01324      0.00000      0.00000      0.00000      0.00641      0.00000      0.00000      0.00000     -0.35640      0.00000      0.00000     -0.35639      0.00000      0.72571     -0.34980      0.00000      0.00000     -0.34979      0.00000      0.70664 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99850      0.99850      0.99850      0.99850      0.99850      0.00249      0.00249      0.00249      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99850      0.99850      0.99850      0.99850      0.99850      0.00249      0.00249      0.00249      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -342.68640    -41.18426    -36.20358    -36.20358    -36.20358     -4.35110     -2.77885     -2.77885     -2.77885     -0.19544     -0.12031     -0.12031     -0.12031     -0.12031     -0.12031     -0.03862     -0.03862     -0.03862      0.08022      0.14407      0.14407      0.14407      1.87786      3.60394      3.60394      3.60394      3.60394      3.60394     24.89121 \n   </alphaeps>\n   <betaeps>\n  -342.68640    -41.18426    -36.20358    -36.20358    -36.20358     -4.35110     -2.77885     -2.77885     -2.77885     -0.19544     -0.12031     -0.12031     -0.12031     -0.12031     -0.12031     -0.03862     -0.03862     -0.03862      0.08022      0.14407      0.14407      0.14407      1.87786      3.60394      3.60394      3.60394      3.60394      3.60394     24.89121 \n   </betaeps>\n   <alphavectors>\n     0.98003     -0.32362      0.00000     -0.00000      0.00000      0.12807     -0.00000      0.00000     -0.00000     -0.02822     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.01981      0.00000     -0.00000     -0.00000      0.07571     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.28179 \n     0.07239      1.00725     -0.00000      0.00000     -0.00000     -0.47496      0.00000     -0.00000      0.00000      0.10048      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.10199     -0.00000      0.00000      0.00000     -0.27301      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.25109 \n     0.00000      0.00000      0.98549     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.40742      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.04509     -0.00000      0.00000     -0.00000      0.00000      0.06842     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.98549      0.00000     -0.00000     -0.40742      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.04509     -0.00000     -0.00000      0.00000      0.06842     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.98549      0.00000     -0.00000     -0.40742     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.04509      0.00000     -0.00000      0.06842     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.10133      0.03408     -0.00000      0.00000     -0.00000      0.90672     -0.00000      0.00000     -0.00000     -0.25399      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.03853      0.00000      0.00000     -0.00000      1.44729      0.00000     -0.00000     -0.00000     -0.00000      0.00000     10.08474 \n     0.00000      0.00000      0.03965      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.05864     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.13611      0.00000     -0.00000      0.00000      0.00000     -0.21036     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.03965     -0.00000      0.00000      1.05864     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.13611      0.00000      0.00000      0.00000     -0.21036     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.03965     -0.00000      0.00000      1.05864     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13611     -0.00000      0.00000     -0.21036     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00556      0.00623     -0.00000      0.00000     -0.00000      0.01984     -0.00000      0.00000     -0.00000      0.68123      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.64868     -0.00000      0.00000      0.00000      1.28590     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.86427 \n    -0.00000     -0.00000     -0.00612     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.04892      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.43089     -0.00000      0.00000     -0.00000     -0.00000      1.38090      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00612     -0.00000      0.00000      0.04892      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43089     -0.00000     -0.00000     -0.00000      1.38090      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00612     -0.00000      0.00000      0.04892      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.43089      0.00000     -0.00000      1.38090      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00246     -0.00303      0.00000     -0.00000      0.00000     -0.00782      0.00000     -0.00000      0.00000      0.37538     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.75040     -0.00000     -0.00000     -0.00000     -0.64177      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.40713 \n     0.00000      0.00000      0.00315      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02130     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.65226      0.00000     -0.00000      0.00000      0.00000     -1.27072     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00315      0.00000     -0.00000     -0.02130     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.65226      0.00000      0.00000      0.00000     -1.27072     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00315      0.00000     -0.00000     -0.02130     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.65226     -0.00000      0.00000     -1.27072     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.04893      0.01428     -0.00000      0.00000     -0.00000      0.06061     -0.00000      0.00000     -0.00000     -0.01479      0.60321     -0.07842      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02623      0.00000     -0.00000     -0.00000     -0.16607      0.82740     -0.34378      0.00000     -0.00000     -0.00000     -4.04450 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.05359     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.55187      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.05359     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.55187      0.00000      0.00000 \n    -0.04893      0.01428     -0.00000      0.00000     -0.00000      0.06061     -0.00000      0.00000     -0.00000     -0.01479     -0.23369      0.56161      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02623      0.00000     -0.00000     -0.00000     -0.16607     -0.11598      0.88844      0.00000     -0.00000     -0.00000     -4.04450 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.05359     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.55187      0.00000     -0.00000     -0.00000 \n    -0.04893      0.01428     -0.00000      0.00000     -0.00000      0.06061     -0.00000      0.00000     -0.00000     -0.01479     -0.36952     -0.48319      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02623      0.00000     -0.00000     -0.00000     -0.16607     -0.71142     -0.54466     -0.00000      0.00000      0.00000     -4.04450 \n    -0.01218     -0.00786      0.00000     -0.00000      0.00000      0.02973     -0.00000      0.00000     -0.00000      0.00902      0.58890     -0.07656     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.01016     -0.00000      0.00000      0.00000     -0.81383     -0.83629      0.34747     -0.00000      0.00000      0.00000     -1.47007 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.02860      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.56855     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.02860      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.56855     -0.00000     -0.00000 \n    -0.01218     -0.00786      0.00000     -0.00000      0.00000      0.02973     -0.00000      0.00000     -0.00000      0.00902     -0.22815      0.54829     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.01016     -0.00000      0.00000      0.00000     -0.81383      0.11722     -0.89798     -0.00000      0.00000      0.00000     -1.47007 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.02860      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.56855     -0.00000      0.00000      0.00000 \n    -0.01218     -0.00786      0.00000     -0.00000      0.00000      0.02973     -0.00000      0.00000     -0.00000      0.00902     -0.36076     -0.47173     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.01016     -0.00000      0.00000      0.00000     -0.81383      0.71907      0.55051      0.00000     -0.00000     -0.00000     -1.47007 \n   </alphavectors>\n   <betavectors>\n     0.98003     -0.32362     -0.00000      0.00000     -0.00000      0.12807      0.00000      0.00000     -0.00000     -0.02822      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.01981      0.00000      0.00000      0.00000      0.07571     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.28179 \n     0.07239      1.00725      0.00000     -0.00000      0.00000     -0.47496     -0.00000     -0.00000      0.00000      0.10048     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.10199     -0.00000     -0.00000     -0.00000     -0.27301      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.25109 \n    -0.00000     -0.00000      0.98549     -0.00000      0.00000      0.00000      0.00000     -0.40742      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.04509      0.00000     -0.00000      0.06842      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.98549     -0.00000      0.00000     -0.40742      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.04509     -0.00000      0.00000     -0.00000     -0.00000      0.06842     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.98549     -0.00000     -0.00000     -0.00000     -0.40742     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.04509     -0.00000      0.00000      0.00000      0.06842     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.10133      0.03408      0.00000     -0.00000      0.00000      0.90672      0.00000      0.00000     -0.00000     -0.25399     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.03853      0.00000      0.00000      0.00000      1.44729      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     10.08474 \n    -0.00000     -0.00000      0.03965      0.00000     -0.00000     -0.00000     -0.00000      1.05864      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13611     -0.00000      0.00000     -0.21036      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.03965      0.00000     -0.00000      1.05864     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.13611     -0.00000     -0.00000      0.00000      0.00000     -0.21036      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.03965      0.00000      0.00000      0.00000      1.05864      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13611      0.00000     -0.00000     -0.00000     -0.21036     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00556      0.00623      0.00000     -0.00000      0.00000      0.01984      0.00000      0.00000     -0.00000      0.68123     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.64868     -0.00000     -0.00000     -0.00000      1.28590     -0.00000      0.00000      0.00000      0.00000      0.00000      0.86427 \n     0.00000      0.00000     -0.00612      0.00000     -0.00000     -0.00000     -0.00000      0.04892      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.43089      0.00000     -0.00000      1.38090     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00612     -0.00000     -0.00000      0.04892      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.43089      0.00000      0.00000     -0.00000     -0.00000      1.38090     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00612      0.00000      0.00000      0.00000      0.04892      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.43089     -0.00000      0.00000      0.00000      1.38090      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00246     -0.00303     -0.00000      0.00000     -0.00000     -0.00782     -0.00000     -0.00000      0.00000      0.37538      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.75040      0.00000      0.00000      0.00000     -0.64177      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.40713 \n    -0.00000     -0.00000      0.00315     -0.00000      0.00000      0.00000      0.00000     -0.02130     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.65226     -0.00000      0.00000     -1.27072      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00315      0.00000      0.00000     -0.02130      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.65226     -0.00000     -0.00000      0.00000      0.00000     -1.27072      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00315     -0.00000     -0.00000     -0.00000     -0.02130     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.65226      0.00000     -0.00000     -0.00000     -1.27072     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.04893      0.01428      0.00000     -0.00000      0.00000      0.06061      0.00000      0.00000     -0.00000     -0.01479     -0.39261     -0.46462      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02623      0.00000      0.00000      0.00000     -0.16607      0.80985     -0.38328     -0.00000     -0.00000     -0.00000     -4.04450 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.05359      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.55187     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.05359      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.55187     -0.00000     -0.00000 \n    -0.04893      0.01428      0.00000     -0.00000      0.00000      0.06061      0.00000      0.00000     -0.00000     -0.01479     -0.20607      0.57232      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02623      0.00000      0.00000      0.00000     -0.16607     -0.07299      0.89300      0.00000      0.00000     -0.00000     -4.04450 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.05359     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.55187     -0.00000      0.00000     -0.00000 \n    -0.04893      0.01428      0.00000     -0.00000      0.00000      0.06061      0.00000      0.00000     -0.00000     -0.01479      0.59868     -0.10770      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02623      0.00000      0.00000      0.00000     -0.16607     -0.73686     -0.50971     -0.00000      0.00000      0.00000     -4.04450 \n    -0.01218     -0.00786     -0.00000      0.00000     -0.00000      0.02973      0.00000      0.00000     -0.00000      0.00902     -0.38330     -0.45360     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.01016     -0.00000     -0.00000     -0.00000     -0.81383     -0.81856      0.38740      0.00000      0.00000      0.00000     -1.47007 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.02860      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.56855      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.02860     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.56855      0.00000      0.00000 \n    -0.01218     -0.00786     -0.00000      0.00000     -0.00000      0.02973      0.00000      0.00000     -0.00000      0.00902     -0.20118      0.55875     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.01016     -0.00000     -0.00000     -0.00000     -0.81383      0.07378     -0.90259     -0.00000     -0.00000      0.00000     -1.47007 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.02860      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.56855      0.00000     -0.00000      0.00000 \n    -0.01218     -0.00786     -0.00000      0.00000     -0.00000      0.02973      0.00000      0.00000     -0.00000      0.00902      0.58448     -0.10514     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.01016     -0.00000     -0.00000     -0.00000     -0.81383      0.74478      0.51519      0.00000     -0.00000     -0.00000     -1.47007 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Al\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.12322     -0.52566      0.00000      0.00000      0.00000     -0.02091      0.00000      0.00000      0.00000      0.11325      0.00000      0.00000      0.00000 \n    -0.52566      2.24314      0.00000      0.00000      0.00000     -0.10243      0.00000      0.00000      0.00000     -0.46800      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.91430      0.00000      0.00000      0.00000      0.16298      0.00000      0.00000      0.00000     -0.11217      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.91430      0.00000      0.00000      0.00000      0.16298      0.00000      0.00000      0.00000     -0.11217      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.91430      0.00000      0.00000      0.00000      0.16298      0.00000      0.00000      0.00000     -0.11217 \n    -0.02091     -0.10243      0.00000      0.00000      0.00000      0.53812      0.00000      0.00000      0.00000      0.56889      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.16298      0.00000      0.00000      0.00000      0.09729      0.00000      0.00000      0.00000      0.09299      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.16298      0.00000      0.00000      0.00000      0.09729      0.00000      0.00000      0.00000      0.09299      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.16298      0.00000      0.00000      0.00000      0.09729      0.00000      0.00000      0.00000      0.09299 \n     0.11325     -0.46800      0.00000      0.00000      0.00000      0.56889      0.00000      0.00000      0.00000      0.66090      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.11217      0.00000      0.00000      0.00000      0.09299      0.00000      0.00000      0.00000      0.13262      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.11217      0.00000      0.00000      0.00000      0.09299      0.00000      0.00000      0.00000      0.13262      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.11217      0.00000      0.00000      0.00000      0.09299      0.00000      0.00000      0.00000      0.13262 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -54.72093     -3.88391     -2.51216     -2.51216     -2.51216     -0.29331     -0.10972     -0.10972     -0.10972      0.14640      0.19336      0.19336      0.19336 \n   </alphaeps>\n   <betaeps>\n   -54.71910     -3.88152     -2.50921     -2.50921     -2.50921     -0.26837     -0.08598     -0.08598     -0.08598      0.16481      0.21081      0.21081      0.21081 \n   </betaeps>\n   <alphavectors>\n     0.98784     -0.28491     -0.00000     -0.00000      0.00000      0.06788      0.00000      0.00000     -0.00000      0.06064      0.00000     -0.00000     -0.00000 \n     0.04653      1.00542      0.00000      0.00000     -0.00000     -0.32956     -0.00000     -0.00000      0.00000     -0.13190     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.97452      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.20671      0.00000      0.00000     -0.00000     -0.30153 \n    -0.00000     -0.00000     -0.00000      0.97452     -0.00000     -0.00000     -0.20671      0.00000     -0.00000      0.00000     -0.30153     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.97452     -0.00000     -0.00000     -0.20671      0.00000     -0.00000     -0.00000     -0.30153     -0.00000 \n    -0.01204      0.11554      0.00000      0.00000     -0.00000      0.50801      0.00000     -0.00000     -0.00000      1.71458      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.10120      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.48079      0.00000     -0.00000      0.00000      1.30016 \n    -0.00000     -0.00000     -0.00000      0.10120      0.00000      0.00000      0.48079      0.00000      0.00000     -0.00000      1.30016     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.10120      0.00000     -0.00000      0.48079     -0.00000      0.00000      0.00000      1.30016     -0.00000 \n     0.00495     -0.04552     -0.00000     -0.00000      0.00000      0.57067      0.00000     -0.00000      0.00000     -1.67852     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.03559     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.62475      0.00000     -0.00000      0.00000     -1.19738 \n     0.00000      0.00000      0.00000     -0.03559     -0.00000     -0.00000      0.62475     -0.00000     -0.00000      0.00000     -1.19738      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.03559      0.00000      0.00000      0.62475      0.00000     -0.00000     -0.00000     -1.19738     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98785     -0.28495      0.00000     -0.00000      0.00000      0.06754      0.00000     -0.00000     -0.00000      0.06073     -0.00000      0.00000     -0.00000 \n     0.04652      1.00565     -0.00000      0.00000     -0.00000     -0.32863     -0.00000      0.00000      0.00000     -0.13249      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.97487      0.00000      0.00000     -0.00000     -0.20125      0.00000      0.00000     -0.00000     -0.30407     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.97487      0.00000     -0.00000     -0.00000     -0.20125      0.00000      0.00000      0.00000     -0.30407      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.97487      0.00000     -0.00000      0.00000     -0.20125     -0.00000      0.00000      0.00000     -0.30407 \n    -0.01204      0.11468     -0.00000      0.00000     -0.00000      0.50324      0.00000     -0.00000     -0.00000      1.71604     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.10000      0.00000      0.00000     -0.00000      0.46063     -0.00000     -0.00000     -0.00000      1.30753      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.10000     -0.00000      0.00000      0.00000      0.46063     -0.00000     -0.00000     -0.00000      1.30753      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.10000     -0.00000      0.00000     -0.00000      0.46063      0.00000     -0.00000     -0.00000      1.30753 \n     0.00495     -0.04528      0.00000     -0.00000      0.00000      0.57538     -0.00000     -0.00000      0.00000     -1.67692      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.03533     -0.00000     -0.00000      0.00000      0.64323     -0.00000     -0.00000      0.00000     -1.18756     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.03533     -0.00000      0.00000      0.00000      0.64323      0.00000      0.00000      0.00000     -1.18756     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.03533     -0.00000      0.00000     -0.00000      0.64323     -0.00000      0.00000      0.00000     -1.18756 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Si\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.12848     -0.53907      0.00000      0.00000      0.00000     -0.03280      0.00000      0.00000      0.00000      0.13104      0.00000      0.00000      0.00000 \n    -0.53907      2.27825      0.00000      0.00000      0.00000     -0.09743      0.00000      0.00000      0.00000     -0.56121      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.92231      0.00000      0.00000      0.00000      0.11644      0.00000      0.00000      0.00000     -0.16051      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.92231      0.00000      0.00000      0.00000      0.11644      0.00000      0.00000      0.00000     -0.16051      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.92231      0.00000      0.00000      0.00000      0.11644      0.00000      0.00000      0.00000     -0.16051 \n    -0.03280     -0.09743      0.00000      0.00000      0.00000      0.48113      0.00000      0.00000      0.00000      0.56779      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.11644      0.00000      0.00000      0.00000      0.18872      0.00000      0.00000      0.00000      0.19910      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.11644      0.00000      0.00000      0.00000      0.18872      0.00000      0.00000      0.00000      0.19910      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.11644      0.00000      0.00000      0.00000      0.18872      0.00000      0.00000      0.00000      0.19910 \n     0.13104     -0.56121      0.00000      0.00000      0.00000      0.56779      0.00000      0.00000      0.00000      0.76087      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.16051      0.00000      0.00000      0.00000      0.19910      0.00000      0.00000      0.00000      0.25345      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.16051      0.00000      0.00000      0.00000      0.19910      0.00000      0.00000      0.00000      0.25345      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.16051      0.00000      0.00000      0.00000      0.19910      0.00000      0.00000      0.00000      0.25345 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66667      0.66667      0.66667      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -64.67879     -5.01509     -3.45886     -3.45886     -3.45886     -0.41149     -0.16670     -0.16670     -0.16670      0.23190      0.28895      0.28895      0.28895 \n   </alphaeps>\n   <betaeps>\n   -64.67302     -5.00797     -3.45003     -3.45003     -3.45003     -0.35556     -0.11507     -0.11507     -0.11507      0.27165      0.32717      0.32717      0.32717 \n   </betaeps>\n   <alphavectors>\n     0.98708     -0.29041      0.00000      0.00000      0.00000      0.07490      0.00000     -0.00000     -0.00000      0.06864      0.00000      0.00000     -0.00000 \n     0.04880      0.99668     -0.00000     -0.00000     -0.00000     -0.37948     -0.00000      0.00000      0.00000     -0.19742     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.97013      0.00000     -0.00000      0.00000      0.00000     -0.24070      0.00000      0.00000     -0.33702     -0.00000 \n     0.00000      0.00000      0.97013      0.00000     -0.00000      0.00000     -0.24070     -0.00000     -0.00000     -0.00000     -0.33702     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.97013     -0.00000      0.00000     -0.24070      0.00000      0.00000      0.00000      0.00000     -0.33702 \n    -0.01371      0.13178      0.00000     -0.00000     -0.00000      0.48139      0.00000     -0.00000     -0.00000      1.75793      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.10257     -0.00000      0.00000     -0.00000     -0.00000      0.50216     -0.00000     -0.00000      1.28659      0.00000 \n     0.00000      0.00000      0.10257      0.00000     -0.00000      0.00000      0.50216      0.00000      0.00000     -0.00000      1.28659      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.10257      0.00000     -0.00000      0.50216     -0.00000     -0.00000     -0.00000     -0.00000      1.28659 \n     0.00572     -0.04898     -0.00000      0.00000      0.00000      0.60615     -0.00000     -0.00000     -0.00000     -1.68477     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.03214      0.00000     -0.00000     -0.00000     -0.00000      0.61410      0.00000      0.00000     -1.18196      0.00000 \n    -0.00000     -0.00000     -0.03214     -0.00000      0.00000     -0.00000      0.61410      0.00000      0.00000     -0.00000     -1.18196     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.03214     -0.00000     -0.00000      0.61410      0.00000      0.00000      0.00000      0.00000     -1.18196 \n   </alphavectors>\n   <betavectors>\n     0.98709     -0.29052     -0.00000      0.00000      0.00000      0.07384     -0.00000     -0.00000      0.00000      0.06919     -0.00000      0.00000      0.00000 \n     0.04877      0.99727      0.00000     -0.00000     -0.00000     -0.37625      0.00000      0.00000     -0.00000     -0.20060      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.97084      0.00000     -0.00000     -0.00000     -0.22997      0.00000      0.00000     -0.00000     -0.34242      0.00000 \n     0.00000     -0.00000      0.97084     -0.00000     -0.00000     -0.00000     -0.22997      0.00000      0.00000      0.00000     -0.34242      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.97084      0.00000     -0.00000      0.00000     -0.22997      0.00000      0.00000     -0.00000     -0.34242 \n    -0.01369      0.12996     -0.00000     -0.00000     -0.00000      0.46343     -0.00000     -0.00000      0.00000      1.76289     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.10044     -0.00000      0.00000      0.00000      0.46664     -0.00000     -0.00000      0.00000      1.30006      0.00000 \n     0.00000     -0.00000      0.10044     -0.00000     -0.00000     -0.00000      0.46664     -0.00000     -0.00000      0.00000      1.30006     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.10044     -0.00000      0.00000     -0.00000      0.46664     -0.00000     -0.00000      0.00000      1.30006 \n     0.00572     -0.04850      0.00000      0.00000      0.00000      0.62341      0.00000     -0.00000      0.00000     -1.67848      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.03171      0.00000      0.00000      0.00000      0.64641      0.00000      0.00000     -0.00000     -1.16462     -0.00000 \n     0.00000      0.00000     -0.03171      0.00000      0.00000      0.00000      0.64641     -0.00000     -0.00000     -0.00000     -1.16462      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.03171     -0.00000      0.00000     -0.00000      0.64641      0.00000      0.00000     -0.00000     -1.16462 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"P\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.13365     -0.55067      0.00000      0.00000      0.00000     -0.03814      0.00000      0.00000      0.00000      0.14131      0.00000      0.00000      0.00000 \n    -0.55067      2.30944      0.00000      0.00000      0.00000     -0.12381      0.00000      0.00000      0.00000     -0.61523      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.94834      0.00000      0.00000      0.00000      0.04972      0.00000      0.00000      0.00000     -0.21268      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.94834      0.00000      0.00000      0.00000      0.04972      0.00000      0.00000      0.00000     -0.21268      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.94834      0.00000      0.00000      0.00000      0.04972      0.00000      0.00000      0.00000     -0.21268 \n    -0.03814     -0.12381      0.00000      0.00000      0.00000      0.50989      0.00000      0.00000      0.00000      0.57688      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.04972      0.00000      0.00000      0.00000      0.31117      0.00000      0.00000      0.00000      0.30901      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.04972      0.00000      0.00000      0.00000      0.31117      0.00000      0.00000      0.00000      0.30901      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04972      0.00000      0.00000      0.00000      0.31117      0.00000      0.00000      0.00000      0.30901 \n     0.14131     -0.61523      0.00000      0.00000      0.00000      0.57688      0.00000      0.00000      0.00000      0.75605      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.21268      0.00000      0.00000      0.00000      0.30901      0.00000      0.00000      0.00000      0.34225      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.21268      0.00000      0.00000      0.00000      0.30901      0.00000      0.00000      0.00000      0.34225      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.21268      0.00000      0.00000      0.00000      0.30901      0.00000      0.00000      0.00000      0.34225 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -75.47627     -6.25555     -4.51169     -4.51169     -4.51169     -0.53287     -0.22579     -0.22579     -0.22579      0.30736      0.37753      0.37753      0.37753 \n   </alphaeps>\n   <betaeps>\n   -75.46442     -6.24163     -4.49441     -4.49441     -4.49441     -0.44196     -0.14267     -0.14267     -0.14267      0.36961      0.43789      0.43789      0.43789 \n   </betaeps>\n   <alphavectors>\n     0.98642     -0.29571      0.00000     -0.00000     -0.00000      0.08015     -0.00000     -0.00000     -0.00000      0.07282     -0.00000     -0.00000     -0.00000 \n     0.05094      0.98805     -0.00000      0.00000      0.00000     -0.42139      0.00000      0.00000      0.00000     -0.27318      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.96855      0.00000      0.00000     -0.00000      0.00000     -0.26510     -0.00000     -0.00000     -0.00000     -0.35210      0.00000 \n     0.00000     -0.00000      0.00000      0.96855      0.00000     -0.00000     -0.26510      0.00000      0.00000      0.00000     -0.35210     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.96855     -0.00000     -0.00000      0.00000     -0.26510     -0.00000     -0.00000      0.00000     -0.35210 \n    -0.01539      0.14423     -0.00000      0.00000      0.00000      0.49906      0.00000     -0.00000     -0.00000      1.80886      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.10086     -0.00000     -0.00000     -0.00000     -0.00000      0.53979      0.00000      0.00000      0.00000      1.27820      0.00000 \n     0.00000     -0.00000      0.00000      0.10086     -0.00000      0.00000      0.53979     -0.00000     -0.00000     -0.00000      1.27820     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.10086      0.00000      0.00000     -0.00000      0.53979      0.00000      0.00000     -0.00000      1.27820 \n     0.00669     -0.05285      0.00000     -0.00000     -0.00000      0.59790     -0.00000     -0.00000     -0.00000     -1.71651     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.03020      0.00000      0.00000      0.00000      0.00000      0.58349     -0.00000     -0.00000     -0.00000     -1.19441     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.03020      0.00000     -0.00000      0.58349      0.00000      0.00000      0.00000     -1.19441     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.03020      0.00000     -0.00000     -0.00000      0.58349     -0.00000     -0.00000      0.00000     -1.19441 \n   </alphavectors>\n   <betavectors>\n     0.98644     -0.29588     -0.00000     -0.00000      0.00000      0.07838      0.00000      0.00000      0.00000      0.07385     -0.00000     -0.00000     -0.00000 \n     0.05089      0.98905      0.00000      0.00000     -0.00000     -0.41500     -0.00000     -0.00000     -0.00000     -0.27927      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.96952     -0.00000      0.00000      0.00000     -0.25003     -0.00000     -0.00000     -0.00000      0.00000     -0.36036      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.96952      0.00000      0.00000      0.00000     -0.25003     -0.00000     -0.36036      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.96952     -0.00000      0.00000      0.00000     -0.25003      0.00000     -0.00000      0.00000      0.00000     -0.36036 \n    -0.01536      0.14154      0.00000      0.00000     -0.00000      0.46853      0.00000      0.00000      0.00000      1.81722     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.09812     -0.00000      0.00000     -0.00000      0.49188      0.00000      0.00000      0.00000     -0.00000      1.29760      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.09812     -0.00000     -0.00000     -0.00000      0.49188      0.00000      1.29760      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.09812      0.00000     -0.00000     -0.00000      0.49188     -0.00000      0.00000     -0.00000     -0.00000      1.29760 \n     0.00668     -0.05216     -0.00000     -0.00000      0.00000      0.62687      0.00000      0.00000      0.00000     -1.70617      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.02965      0.00000     -0.00000     -0.00000      0.62762     -0.00000     -0.00000     -0.00000      0.00000     -1.17184     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.02965     -0.00000     -0.00000     -0.00000      0.62762     -0.00000     -1.17184      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.02965      0.00000     -0.00000     -0.00000      0.62762      0.00000     -0.00000      0.00000      0.00000     -1.17184 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"S\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.13922     -0.56249      0.00000      0.00000      0.00000     -0.02718      0.00000      0.00000      0.00000      0.13728      0.00000      0.00000      0.00000 \n    -0.56249      2.35711      0.00000      0.00000      0.00000     -0.25050      0.00000      0.00000      0.00000     -0.60262      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.98607      0.00000      0.00000      0.00000     -0.04105      0.00000      0.00000      0.00000     -0.25608      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.98607      0.00000      0.00000      0.00000     -0.04105      0.00000      0.00000      0.00000     -0.25608      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.98607      0.00000      0.00000      0.00000     -0.04105      0.00000      0.00000      0.00000     -0.25608 \n    -0.02718     -0.25050      0.00000      0.00000      0.00000      0.72541      0.00000      0.00000      0.00000      0.60160      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.04105      0.00000      0.00000      0.00000      0.49341      0.00000      0.00000      0.00000      0.42138      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.04105      0.00000      0.00000      0.00000      0.49341      0.00000      0.00000      0.00000      0.42138      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.04105      0.00000      0.00000      0.00000      0.49341      0.00000      0.00000      0.00000      0.42138 \n     0.13728     -0.60262      0.00000      0.00000      0.00000      0.60160      0.00000      0.00000      0.00000      0.57021      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.25608      0.00000      0.00000      0.00000      0.42138      0.00000      0.00000      0.00000      0.38529      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.25608      0.00000      0.00000      0.00000      0.42138      0.00000      0.00000      0.00000      0.38529      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.25608      0.00000      0.00000      0.00000      0.42138      0.00000      0.00000      0.00000      0.38529 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -87.13246     -7.62208     -5.68703     -5.68703     -5.68703     -0.64717     -0.27748     -0.27748     -0.27748      0.33174      0.42576      0.42576      0.42576 \n   </alphaeps>\n   <betaeps>\n   -87.12207     -7.61050     -5.67255     -5.67255     -5.67255     -0.58439     -0.22083     -0.22083     -0.22083      0.37104      0.46489      0.46489      0.46489 \n   </betaeps>\n   <alphavectors>\n     0.98587     -0.30115     -0.00000     -0.00000     -0.00000      0.08392     -0.00000     -0.00000      0.00000      0.07149     -0.00000      0.00000     -0.00000 \n     0.05324      0.97874      0.00000      0.00000      0.00000     -0.46880      0.00000      0.00000     -0.00000     -0.37944      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.96928     -0.00000      0.00000      0.00000     -0.28434      0.00000      0.00000      0.00000     -0.34890 \n    -0.00000     -0.00000      0.96928      0.00000      0.00000     -0.00000     -0.28434     -0.00000     -0.00000     -0.00000     -0.34890      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.96928      0.00000     -0.00000      0.00000     -0.28434     -0.00000      0.00000      0.00000     -0.34890      0.00000 \n    -0.01711      0.15122      0.00000      0.00000      0.00000      0.59404     -0.00000     -0.00000      0.00000      1.81822     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.09537     -0.00000      0.00000      0.00000      0.60463     -0.00000     -0.00000     -0.00000      1.22794 \n    -0.00000     -0.00000      0.09537     -0.00000      0.00000     -0.00000      0.60463      0.00000      0.00000      0.00000      1.22794      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.09537     -0.00000      0.00000     -0.00000      0.60463      0.00000     -0.00000     -0.00000      1.22794     -0.00000 \n     0.00780     -0.05579     -0.00000     -0.00000     -0.00000      0.52021     -0.00000     -0.00000     -0.00000     -1.72947      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.02830      0.00000     -0.00000     -0.00000      0.52899     -0.00000     -0.00000     -0.00000     -1.19412 \n     0.00000      0.00000     -0.02830      0.00000     -0.00000      0.00000      0.52899     -0.00000     -0.00000     -0.00000     -1.19412      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.02830     -0.00000      0.00000     -0.00000      0.52899     -0.00000      0.00000      0.00000     -1.19412     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98588     -0.30125      0.00000      0.00000      0.00000      0.08269      0.00000     -0.00000      0.00000      0.07234      0.00000      0.00000      0.00000 \n     0.05321      0.97946     -0.00000     -0.00000     -0.00000     -0.46303     -0.00000      0.00000     -0.00000     -0.38465     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.96983      0.00000      0.00000     -0.00000     -0.27467     -0.00000      0.00000     -0.00000     -0.35506 \n     0.00000      0.00000      0.96983      0.00000     -0.00000     -0.00000     -0.27467      0.00000      0.00000      0.00000     -0.35506     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.96983     -0.00000     -0.00000     -0.00000     -0.27467      0.00000     -0.00000      0.00000     -0.35506      0.00000 \n    -0.01708      0.14954     -0.00000     -0.00000     -0.00000      0.57159      0.00000     -0.00000      0.00000      1.82554      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.09384      0.00000      0.00000     -0.00000      0.57428     -0.00000     -0.00000      0.00000      1.24254 \n     0.00000      0.00000      0.09384      0.00000     -0.00000     -0.00000      0.57428      0.00000      0.00000      0.00000      1.24254      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.09384      0.00000      0.00000     -0.00000      0.57428     -0.00000      0.00000     -0.00000      1.24254     -0.00000 \n     0.00779     -0.05534      0.00000      0.00000      0.00000      0.54157      0.00000     -0.00000     -0.00000     -1.72292     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.02797     -0.00000     -0.00000      0.00000      0.55823     -0.00000      0.00000     -0.00000     -1.18074 \n    -0.00000     -0.00000     -0.02797     -0.00000      0.00000      0.00000      0.55823     -0.00000     -0.00000     -0.00000     -1.18074     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.02797      0.00000      0.00000      0.00000      0.55823      0.00000     -0.00000      0.00000     -1.18074      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cl\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.14401     -0.57356      0.00000      0.00000      0.00000     -0.02174      0.00000      0.00000      0.00000      0.13737      0.00000      0.00000      0.00000 \n    -0.57356      2.39635      0.00000      0.00000      0.00000     -0.32845      0.00000      0.00000      0.00000     -0.59853      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.02770      0.00000      0.00000      0.00000     -0.13786      0.00000      0.00000      0.00000     -0.29926      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.02770      0.00000      0.00000      0.00000     -0.13786      0.00000      0.00000      0.00000     -0.29926      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.02770      0.00000      0.00000      0.00000     -0.13787      0.00000      0.00000      0.00000     -0.29926 \n    -0.02174     -0.32845      0.00000      0.00000      0.00000      0.85887      0.00000      0.00000      0.00000      0.60214      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.13786      0.00000      0.00000      0.00000      0.69574      0.00000      0.00000      0.00000      0.52659      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.13786      0.00000      0.00000      0.00000      0.69574      0.00000      0.00000      0.00000      0.52659      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.13787      0.00000      0.00000      0.00000      0.69575      0.00000      0.00000      0.00000      0.52660 \n     0.13737     -0.59853      0.00000      0.00000      0.00000      0.60214      0.00000      0.00000      0.00000      0.48373      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.29926      0.00000      0.00000      0.00000      0.52659      0.00000      0.00000      0.00000      0.41780      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.29926      0.00000      0.00000      0.00000      0.52659      0.00000      0.00000      0.00000      0.41780      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.29926      0.00000      0.00000      0.00000      0.52660      0.00000      0.00000      0.00000      0.41781 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66668      0.66666      0.66666      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -99.63045     -9.10068     -6.97065     -6.97065     -6.97065     -0.75975     -0.32636     -0.32636     -0.32636      0.39286      0.49794      0.49794      0.49794 \n   </alphaeps>\n   <betaeps>\n   -99.62407     -9.09384     -6.96206     -6.96205     -6.96205     -0.72726     -0.29706     -0.29706     -0.29706      0.41202      0.51719      0.51719      0.51719 \n   </betaeps>\n   <alphavectors>\n     0.98537     -0.30578     -0.00000      0.00000      0.00000      0.08703     -0.00000     -0.00000     -0.00000      0.07270      0.00000     -0.00000      0.00000 \n     0.05491      0.97353      0.00000     -0.00000     -0.00000     -0.49859      0.00000      0.00000      0.00000     -0.43164     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.96982     -0.00000     -0.00000     -0.00000     -0.29790     -0.00000     -0.00000     -0.00000     -0.34821     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.96982     -0.00000     -0.00000      0.00000     -0.29790      0.00000      0.00000     -0.00000     -0.34821 \n    -0.00000      0.00000      0.96982     -0.00000      0.00000      0.00000     -0.29790      0.00000      0.00000     -0.00000     -0.34821      0.00000     -0.00000 \n    -0.01829      0.15740     -0.00000     -0.00000     -0.00000      0.64143     -0.00000     -0.00000     -0.00000      1.83172      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.09165      0.00000      0.00000      0.00000      0.64382      0.00000      0.00000      0.00000      1.20320      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.09165      0.00000      0.00000     -0.00000      0.64382     -0.00000     -0.00000      0.00000      1.20320 \n    -0.00000      0.00000      0.09165     -0.00000      0.00000      0.00000      0.64382     -0.00000     -0.00000      0.00000      1.20320     -0.00000      0.00000 \n     0.00854     -0.05874     -0.00000      0.00000      0.00000      0.48296      0.00000     -0.00000     -0.00000     -1.74184     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.02721      0.00000      0.00000      0.00000      0.49424     -0.00000     -0.00000     -0.00000     -1.20032     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.02721      0.00000      0.00000     -0.00000      0.49424      0.00000      0.00000     -0.00000     -1.20032 \n     0.00000      0.00000     -0.02721      0.00000     -0.00000     -0.00000      0.49424     -0.00000     -0.00000      0.00000     -1.20032      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98538     -0.30583     -0.00000     -0.00000     -0.00000      0.08644     -0.00000      0.00000      0.00000      0.07314     -0.00000     -0.00000      0.00000 \n     0.05489      0.97388      0.00000      0.00000      0.00000     -0.49551      0.00000     -0.00000     -0.00000     -0.43438      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.97005     -0.00000      0.00000     -0.00000     -0.29345      0.00000     -0.00000     -0.00000     -0.35132      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.97005      0.00000      0.00000     -0.00000     -0.29345      0.00000      0.00000     -0.00000     -0.35132 \n    -0.00000      0.00000      0.97005      0.00000      0.00000      0.00000     -0.29345      0.00000     -0.00000      0.00000     -0.35132      0.00000     -0.00000 \n    -0.01828      0.15662     -0.00000      0.00000      0.00000      0.63045     -0.00000      0.00000      0.00000      1.83560     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.09101      0.00000     -0.00000      0.00000      0.62995     -0.00000      0.00000      0.00000      1.21057      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.09101     -0.00000     -0.00000      0.00000      0.62995     -0.00000     -0.00000      0.00000      1.21057 \n    -0.00000      0.00000      0.09101      0.00000      0.00000      0.00000      0.62995     -0.00000      0.00000      0.00000      1.21057     -0.00000      0.00000 \n     0.00854     -0.05852      0.00000     -0.00000     -0.00000      0.49342      0.00000      0.00000      0.00000     -1.73891      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.02706     -0.00000     -0.00000      0.00000      0.50802      0.00000     -0.00000     -0.00000     -1.19455     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02706     -0.00000     -0.00000      0.00000      0.50802      0.00000      0.00000     -0.00000     -1.19455 \n     0.00000     -0.00000     -0.02706     -0.00000     -0.00000     -0.00000      0.50802     -0.00000      0.00000      0.00000     -1.19455      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ar\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.14813     -0.58290      0.00000      0.00000      0.00000     -0.01998      0.00000      0.00000      0.00000      0.13957      0.00000      0.00000      0.00000 \n    -0.58290      2.42586      0.00000      0.00000      0.00000     -0.37513      0.00000      0.00000      0.00000     -0.60338      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.07218      0.00000      0.00000      0.00000     -0.23889      0.00000      0.00000      0.00000     -0.34242      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.07218      0.00000      0.00000      0.00000     -0.23889      0.00000      0.00000      0.00000     -0.34242      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.07218      0.00000      0.00000      0.00000     -0.23889      0.00000      0.00000      0.00000     -0.34242 \n    -0.01998     -0.37513      0.00000      0.00000      0.00000      0.93435      0.00000      0.00000      0.00000      0.60049      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.23889      0.00000      0.00000      0.00000      0.90796      0.00000      0.00000      0.00000      0.62653      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.23889      0.00000      0.00000      0.00000      0.90796      0.00000      0.00000      0.00000      0.62653      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.23889      0.00000      0.00000      0.00000      0.90796      0.00000      0.00000      0.00000      0.62653 \n     0.13957     -0.60338      0.00000      0.00000      0.00000      0.60049      0.00000      0.00000      0.00000      0.44532      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.34242      0.00000      0.00000      0.00000      0.62653      0.00000      0.00000      0.00000      0.44802      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.34242      0.00000      0.00000      0.00000      0.62653      0.00000      0.00000      0.00000      0.44802      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.34242      0.00000      0.00000      0.00000      0.62653      0.00000      0.00000      0.00000      0.44802 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -112.97180    -10.69269     -8.36434     -8.36434     -8.36434     -0.87230     -0.37365     -0.37365     -0.37365      0.47860      0.58979      0.58979      0.58979 \n   </alphaeps>\n   <betaeps>\n  -112.97180    -10.69269     -8.36434     -8.36434     -8.36434     -0.87230     -0.37365     -0.37365     -0.37365      0.47860      0.58979      0.58979      0.58979 \n   </betaeps>\n   <alphavectors>\n     0.98492     -0.30982      0.00000      0.00000      0.00000      0.08949     -0.00000     -0.00000     -0.00000      0.07452      0.00000     -0.00000      0.00000 \n     0.05628      0.96969     -0.00000     -0.00000     -0.00000     -0.51910      0.00000      0.00000      0.00000     -0.46714     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.97014      0.00000     -0.00000     -0.30809      0.00000      0.00000     -0.00000     -0.00000     -0.35002      0.00000 \n    -0.00000      0.00000      0.97014      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.30809      0.00000      0.00000     -0.00000     -0.35002 \n     0.00000      0.00000     -0.00000     -0.00000      0.97014     -0.00000      0.00000     -0.30809      0.00000     -0.00000     -0.35002      0.00000     -0.00000 \n    -0.01919      0.16289     -0.00000     -0.00000     -0.00000      0.66353     -0.00000     -0.00000     -0.00000      1.84895      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.08898     -0.00000      0.00000      0.66788     -0.00000     -0.00000      0.00000      0.00000      1.19139      0.00000 \n    -0.00000      0.00000      0.08898      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.66788     -0.00000     -0.00000      0.00000      1.19139 \n     0.00000      0.00000     -0.00000     -0.00000      0.08898      0.00000     -0.00000      0.66788      0.00000     -0.00000      1.19139      0.00000     -0.00000 \n     0.00909     -0.06123      0.00000      0.00000      0.00000      0.46779     -0.00000     -0.00000     -0.00000     -1.75160     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.02641      0.00000      0.00000      0.47256      0.00000      0.00000     -0.00000     -0.00000     -1.20639     -0.00000 \n     0.00000     -0.00000     -0.02641     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.47256      0.00000      0.00000     -0.00000     -1.20639 \n     0.00000     -0.00000      0.00000      0.00000     -0.02641      0.00000     -0.00000      0.47256     -0.00000      0.00000     -1.20639     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98492     -0.30982     -0.00000      0.00000     -0.00000      0.08949     -0.00000      0.00000      0.00000      0.07452      0.00000      0.00000      0.00000 \n     0.05628      0.96969      0.00000     -0.00000      0.00000     -0.51910      0.00000     -0.00000     -0.00000     -0.46714     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.97014     -0.00000     -0.00000     -0.30809     -0.00000     -0.00000      0.00000      0.00000     -0.35002     -0.00000 \n     0.00000     -0.00000      0.97014     -0.00000      0.00000      0.00000     -0.00000     -0.30809      0.00000      0.00000      0.00000      0.00000     -0.35002 \n    -0.00000     -0.00000     -0.00000      0.00000      0.97014      0.00000     -0.00000      0.00000     -0.30809      0.00000     -0.35002      0.00000      0.00000 \n    -0.01919      0.16289      0.00000     -0.00000      0.00000      0.66353     -0.00000      0.00000      0.00000      1.84895      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.08898      0.00000      0.00000      0.66788      0.00000      0.00000     -0.00000     -0.00000      1.19139     -0.00000 \n     0.00000     -0.00000      0.08898      0.00000     -0.00000     -0.00000      0.00000      0.66788     -0.00000     -0.00000     -0.00000     -0.00000      1.19139 \n     0.00000     -0.00000     -0.00000      0.00000      0.08898     -0.00000      0.00000     -0.00000      0.66788     -0.00000      1.19139     -0.00000     -0.00000 \n     0.00909     -0.06123     -0.00000      0.00000     -0.00000      0.46779     -0.00000      0.00000      0.00000     -1.75160     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.02641     -0.00000     -0.00000      0.47256     -0.00000     -0.00000      0.00000      0.00000     -1.20639      0.00000 \n    -0.00000      0.00000     -0.02641     -0.00000      0.00000     -0.00000      0.00000      0.47256      0.00000      0.00000      0.00000      0.00000     -1.20639 \n     0.00000      0.00000      0.00000     -0.00000     -0.02641     -0.00000      0.00000     -0.00000      0.47256     -0.00000     -1.20639     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"K\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.15139     -0.59897      0.00000      0.00000      0.00000      0.16674      0.00000      0.00000      0.00000      0.00602      0.00000      0.00000      0.00000     -0.01599      0.00000      0.00000      0.00000 \n    -0.59897      2.37267      0.00000      0.00000      0.00000     -0.72926      0.00000      0.00000      0.00000      0.00117      0.00000      0.00000      0.00000      0.04714      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.16654      0.00000      0.00000      0.00000     -0.59248      0.00000      0.00000      0.00000     -0.07390      0.00000      0.00000      0.00000      0.03720      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.16654      0.00000      0.00000      0.00000     -0.59248      0.00000      0.00000      0.00000     -0.07390      0.00000      0.00000      0.00000      0.03720      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.16654      0.00000      0.00000      0.00000     -0.59248      0.00000      0.00000      0.00000     -0.07390      0.00000      0.00000      0.00000      0.03720 \n     0.16674     -0.72926      0.00000      0.00000      0.00000      2.27157      0.00000      0.00000      0.00000     -0.12979      0.00000      0.00000      0.00000     -0.10887      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.59248      0.00000      0.00000      0.00000      2.11102      0.00000      0.00000      0.00000      0.15928      0.00000      0.00000      0.00000     -0.07555      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.59248      0.00000      0.00000      0.00000      2.11102      0.00000      0.00000      0.00000      0.15928      0.00000      0.00000      0.00000     -0.07555      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.59248      0.00000      0.00000      0.00000      2.11102      0.00000      0.00000      0.00000      0.15928      0.00000      0.00000      0.00000     -0.07555 \n     0.00602      0.00117      0.00000      0.00000      0.00000     -0.12979      0.00000      0.00000      0.00000      0.55403      0.00000      0.00000      0.00000      0.21595      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07390      0.00000      0.00000      0.00000      0.15928      0.00000      0.00000      0.00000      0.01641      0.00000      0.00000      0.00000     -0.00297      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07390      0.00000      0.00000      0.00000      0.15928      0.00000      0.00000      0.00000      0.01641      0.00000      0.00000      0.00000     -0.00297      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07390      0.00000      0.00000      0.00000      0.15928      0.00000      0.00000      0.00000      0.01641      0.00000      0.00000      0.00000     -0.00297 \n    -0.01599      0.04714      0.00000      0.00000      0.00000     -0.10887      0.00000      0.00000      0.00000      0.21595      0.00000      0.00000      0.00000      0.08608      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03720      0.00000      0.00000      0.00000     -0.07555      0.00000      0.00000      0.00000     -0.00297      0.00000      0.00000      0.00000      0.00507      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03720      0.00000      0.00000      0.00000     -0.07555      0.00000      0.00000      0.00000     -0.00297      0.00000      0.00000      0.00000      0.00507      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03720      0.00000      0.00000      0.00000     -0.07555      0.00000      0.00000      0.00000     -0.00297      0.00000      0.00000      0.00000      0.00507 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.96868      0.01044      0.01044      0.01044      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -127.48720    -12.78016    -10.20246    -10.20246    -10.20246     -1.29123     -0.69824     -0.69824     -0.69824     -0.09736     -0.03836     -0.03836     -0.03836      0.02022      0.03790      0.03790      0.03790 \n   </alphaeps>\n   <betaeps>\n  -127.48680    -12.77970    -10.20202    -10.20202    -10.20202     -1.28980     -0.69621     -0.69621     -0.69621     -0.07580     -0.02330     -0.02330     -0.02330      0.02907      0.04872      0.04872      0.04872 \n   </betaeps>\n   <alphavectors>\n     0.98600     -0.30408      0.00000     -0.00000     -0.00000      0.10396     -0.00000     -0.00000      0.00000     -0.02130      0.00000      0.00000     -0.00000     -0.00819     -0.00000      0.00000      0.00000 \n     0.05094      1.01266     -0.00000      0.00000      0.00000     -0.39429      0.00000      0.00000     -0.00000      0.07527     -0.00000     -0.00000      0.00000      0.06355      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.98598      0.00000      0.00000      0.00000      0.00000     -0.33313      0.00000      0.05836     -0.00000      0.00000     -0.00000      0.06677     -0.00000     -0.00000 \n    -0.00000      0.00000      0.98598     -0.00000     -0.00000     -0.00000      0.00000     -0.33313      0.00000     -0.00000     -0.00000      0.05836      0.00000      0.00000      0.00000      0.06677     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.98598     -0.00000     -0.33313      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05836      0.00000      0.00000     -0.00000      0.06677 \n    -0.01081      0.05810     -0.00000      0.00000      0.00000      1.04747     -0.00000     -0.00000      0.00000     -0.26796      0.00000      0.00000     -0.00000      0.03093     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.04652     -0.00000     -0.00000      0.00000      0.00000      1.02559     -0.00000     -0.20925     -0.00000      0.00000      0.00000     -0.24571     -0.00000     -0.00000 \n    -0.00000      0.00000      0.04652      0.00000      0.00000      0.00000      0.00000      1.02559      0.00000      0.00000     -0.00000     -0.20925      0.00000     -0.00000     -0.00000     -0.24571     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.04652      0.00000      1.02559      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.20925     -0.00000     -0.00000      0.00000     -0.24571 \n     0.00317     -0.01416      0.00000     -0.00000     -0.00000      0.03355     -0.00000     -0.00000      0.00000      0.75455     -0.00000     -0.00000      0.00000      2.05665      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.01105      0.00000      0.00000     -0.00000     -0.00000      0.08162      0.00000      0.59916      0.00000     -0.00000     -0.00000      1.55945      0.00000      0.00000 \n     0.00000     -0.00000     -0.01105     -0.00000     -0.00000     -0.00000     -0.00000      0.08162     -0.00000     -0.00000      0.00000      0.59916     -0.00000      0.00000      0.00000      1.55945      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.01105      0.00000      0.08162     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.59916      0.00000      0.00000     -0.00000      1.55945 \n    -0.00133      0.00660     -0.00000      0.00000      0.00000     -0.01612      0.00000      0.00000     -0.00000      0.29710     -0.00000     -0.00000      0.00000     -2.17550     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00635     -0.00000     -0.00000      0.00000      0.00000     -0.03788     -0.00000      0.46998     -0.00000      0.00000      0.00000     -1.57246     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00635      0.00000      0.00000      0.00000      0.00000     -0.03788      0.00000      0.00000     -0.00000      0.46998      0.00000     -0.00000     -0.00000     -1.57246     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00635     -0.00000     -0.03788      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.46998     -0.00000     -0.00000      0.00000     -1.57246 \n   </alphavectors>\n   <betavectors>\n     0.98600     -0.30409      0.00000      0.00000      0.00000      0.10399     -0.00000      0.00000     -0.00000     -0.02058     -0.00000      0.00000     -0.00000     -0.00950      0.00000     -0.00000      0.00000 \n     0.05094      1.01266     -0.00000     -0.00000     -0.00000     -0.39442      0.00000     -0.00000      0.00000      0.07040      0.00000     -0.00000      0.00000      0.06809     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.98599     -0.00000      0.00000     -0.00000     -0.33346     -0.00000     -0.00000      0.00000      0.00000      0.04865      0.00000      0.07257      0.00000     -0.00000 \n     0.00000      0.00000      0.98599     -0.00000     -0.00000      0.00000     -0.33346      0.00000      0.00000     -0.00000      0.04865     -0.00000     -0.00000     -0.00000     -0.00000      0.07257     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.98599      0.00000     -0.00000     -0.00000     -0.33346      0.00000      0.00000      0.04865      0.00000      0.00000     -0.00000      0.00000      0.07257 \n    -0.01081      0.05808     -0.00000     -0.00000     -0.00000      1.04778      0.00000      0.00000     -0.00000     -0.26817     -0.00000      0.00000     -0.00000      0.01391      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.04650      0.00000     -0.00000     -0.00000      1.02684     -0.00000      0.00000      0.00000     -0.00000     -0.17413     -0.00000     -0.26700      0.00000     -0.00000 \n     0.00000      0.00000      0.04650      0.00000      0.00000     -0.00000      1.02684      0.00000      0.00000      0.00000     -0.17413      0.00000     -0.00000      0.00000     -0.00000     -0.26700     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.04650     -0.00000     -0.00000     -0.00000      1.02684     -0.00000     -0.00000     -0.17413     -0.00000     -0.00000      0.00000     -0.00000     -0.26700 \n     0.00317     -0.01414      0.00000      0.00000      0.00000      0.03115      0.00000      0.00000     -0.00000      0.61646      0.00000     -0.00000      0.00000      2.10221     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.01103      0.00000     -0.00000      0.00000      0.07587      0.00000      0.00000      0.00000     -0.00000      0.39958      0.00000      1.62238     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.01103      0.00000      0.00000     -0.00000      0.07587     -0.00000     -0.00000      0.00000      0.39958     -0.00000      0.00000     -0.00000      0.00000      1.62238      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.01103      0.00000      0.00000      0.00000      0.07587      0.00000      0.00000      0.39958      0.00000      0.00000     -0.00000      0.00000      1.62238 \n    -0.00133      0.00659     -0.00000     -0.00000     -0.00000     -0.01495     -0.00000     -0.00000      0.00000      0.44078      0.00000     -0.00000      0.00000     -2.15101      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00634     -0.00000      0.00000     -0.00000     -0.03532     -0.00000     -0.00000     -0.00000      0.00000      0.66289     -0.00000     -1.50142      0.00000     -0.00000 \n     0.00000      0.00000      0.00634     -0.00000     -0.00000      0.00000     -0.03532      0.00000      0.00000     -0.00000      0.66289      0.00000     -0.00000      0.00000     -0.00000     -1.50142     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00634     -0.00000     -0.00000     -0.00000     -0.03532     -0.00000     -0.00000      0.66289     -0.00000     -0.00000      0.00000     -0.00000     -1.50142 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ca\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.15661     -0.61437      0.00000      0.00000      0.00000      0.18871      0.00000      0.00000      0.00000     -0.01460      0.00000      0.00000      0.00000     -0.03004      0.00000      0.00000      0.00000 \n    -0.61437      2.41433      0.00000      0.00000      0.00000     -0.81623      0.00000      0.00000      0.00000      0.09873      0.00000      0.00000      0.00000      0.08949      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.19316      0.00000      0.00000      0.00000     -0.64172      0.00000      0.00000      0.00000     -0.07272      0.00000      0.00000      0.00000      0.03413      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.19316      0.00000      0.00000      0.00000     -0.64172      0.00000      0.00000      0.00000     -0.07272      0.00000      0.00000      0.00000      0.03413      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.19316      0.00000      0.00000      0.00000     -0.64172      0.00000      0.00000      0.00000     -0.07272      0.00000      0.00000      0.00000      0.03413 \n     0.18871     -0.81623      0.00000      0.00000      0.00000      2.42482      0.00000      0.00000      0.00000     -0.44101      0.00000      0.00000      0.00000     -0.19981      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.64172      0.00000      0.00000      0.00000      2.13707      0.00000      0.00000      0.00000      0.13777      0.00000      0.00000      0.00000     -0.05828      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.64172      0.00000      0.00000      0.00000      2.13707      0.00000      0.00000      0.00000      0.13777      0.00000      0.00000      0.00000     -0.05828      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.64172      0.00000      0.00000      0.00000      2.13707      0.00000      0.00000      0.00000      0.13777      0.00000      0.00000      0.00000     -0.05828 \n    -0.01460      0.09873      0.00000      0.00000      0.00000     -0.44101      0.00000      0.00000      0.00000      1.28920      0.00000      0.00000      0.00000      0.41637      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07272      0.00000      0.00000      0.00000      0.13777      0.00000      0.00000      0.00000      0.00976      0.00000      0.00000      0.00000     -0.00376      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07272      0.00000      0.00000      0.00000      0.13777      0.00000      0.00000      0.00000      0.00976      0.00000      0.00000      0.00000     -0.00376      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07272      0.00000      0.00000      0.00000      0.13777      0.00000      0.00000      0.00000      0.00976      0.00000      0.00000      0.00000     -0.00376 \n    -0.03004      0.08949      0.00000      0.00000      0.00000     -0.19981      0.00000      0.00000      0.00000      0.41637      0.00000      0.00000      0.00000      0.13665      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03413      0.00000      0.00000      0.00000     -0.05828      0.00000      0.00000      0.00000     -0.00376      0.00000      0.00000      0.00000      0.00190      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03413      0.00000      0.00000      0.00000     -0.05828      0.00000      0.00000      0.00000     -0.00376      0.00000      0.00000      0.00000      0.00190      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03413      0.00000      0.00000      0.00000     -0.05828      0.00000      0.00000      0.00000     -0.00376      0.00000      0.00000      0.00000      0.00190 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99864      0.00045      0.00045      0.00045      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99864      0.00045      0.00045      0.00045      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -142.91040    -14.98760    -12.19658    -12.19658    -12.19658     -1.71917     -1.03723     -1.03723     -1.03723     -0.14229     -0.05298     -0.05298     -0.05298      0.03048      0.05927      0.05927      0.05927 \n   </alphaeps>\n   <betaeps>\n  -142.91040    -14.98760    -12.19658    -12.19658    -12.19658     -1.71917     -1.03723     -1.03723     -1.03723     -0.14229     -0.05298     -0.05298     -0.05298      0.03048      0.05927      0.05927      0.05927 \n   </betaeps>\n   <alphavectors>\n     0.98559     -0.30681      0.00000     -0.00000     -0.00000      0.10953      0.00000      0.00000     -0.00000     -0.02810      0.00000      0.00000     -0.00000     -0.01467      0.00000     -0.00000     -0.00000 \n     0.05205      1.01144     -0.00000      0.00000      0.00000     -0.41270     -0.00000     -0.00000      0.00000      0.10553     -0.00000     -0.00000      0.00000      0.10783     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.98454     -0.00000     -0.00000      0.00000      0.00000     -0.35673     -0.00000      0.00000     -0.00000      0.07115     -0.00000      0.00000     -0.00000      0.07707 \n    -0.00000     -0.00000      0.00000     -0.00000      0.98454      0.00000      0.00000     -0.35673      0.00000      0.00000      0.00000      0.07115      0.00000     -0.00000      0.00000      0.07707      0.00000 \n     0.00000      0.00000      0.98454      0.00000      0.00000      0.00000     -0.35673      0.00000      0.00000     -0.00000      0.07115     -0.00000      0.00000      0.00000      0.07707      0.00000     -0.00000 \n    -0.01171      0.05959     -0.00000      0.00000      0.00000      1.05102      0.00000      0.00000     -0.00000     -0.32283      0.00000      0.00000     -0.00000      0.00597     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.04824      0.00000      0.00000      0.00000      0.00000      1.03256      0.00000      0.00000     -0.00000     -0.24612      0.00000     -0.00000     -0.00000     -0.27522 \n    -0.00000     -0.00000      0.00000     -0.00000      0.04824     -0.00000      0.00000      1.03256      0.00000     -0.00000      0.00000     -0.24612      0.00000      0.00000     -0.00000     -0.27522      0.00000 \n     0.00000      0.00000      0.04824     -0.00000     -0.00000     -0.00000      1.03256      0.00000      0.00000      0.00000     -0.24612     -0.00000      0.00000     -0.00000     -0.27522      0.00000     -0.00000 \n     0.00512     -0.01976      0.00000     -0.00000     -0.00000      0.03747      0.00000      0.00000     -0.00000      0.80228     -0.00000     -0.00000      0.00000      1.96367     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.01254     -0.00000     -0.00000     -0.00000     -0.00000      0.06737     -0.00000     -0.00000      0.00000      0.64037     -0.00000      0.00000      0.00000      1.53566 \n     0.00000      0.00000     -0.00000      0.00000     -0.01254     -0.00000     -0.00000      0.06737     -0.00000      0.00000     -0.00000      0.64037     -0.00000     -0.00000      0.00000      1.53566     -0.00000 \n    -0.00000     -0.00000     -0.01254      0.00000      0.00000     -0.00000      0.06737     -0.00000     -0.00000     -0.00000      0.64037      0.00000     -0.00000      0.00000      1.53566     -0.00000      0.00000 \n    -0.00271      0.01080     -0.00000      0.00000      0.00000     -0.01568     -0.00000     -0.00000      0.00000      0.26086     -0.00000     -0.00000      0.00000     -2.10203      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00699     -0.00000     -0.00000      0.00000      0.00000     -0.02850     -0.00000      0.00000     -0.00000      0.43716      0.00000     -0.00000     -0.00000     -1.56040 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00699      0.00000      0.00000     -0.02850      0.00000      0.00000      0.00000      0.43716      0.00000      0.00000     -0.00000     -1.56040      0.00000 \n     0.00000      0.00000      0.00699     -0.00000     -0.00000      0.00000     -0.02850      0.00000      0.00000      0.00000      0.43716     -0.00000      0.00000     -0.00000     -1.56040      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98559     -0.30681     -0.00000      0.00000     -0.00000      0.10953      0.00000      0.00000     -0.00000     -0.02810      0.00000     -0.00000     -0.00000     -0.01467     -0.00000     -0.00000      0.00000 \n     0.05205      1.01144      0.00000     -0.00000      0.00000     -0.41270     -0.00000     -0.00000      0.00000      0.10553     -0.00000      0.00000      0.00000      0.10783      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.98454      0.00000     -0.00000     -0.00000     -0.35673      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.07115      0.00000     -0.00000     -0.00000      0.07707 \n     0.00000     -0.00000     -0.00000      0.00000      0.98454     -0.00000      0.00000      0.00000     -0.35673      0.00000      0.07115      0.00000     -0.00000     -0.00000      0.00000      0.07707     -0.00000 \n     0.00000      0.00000      0.00000      0.98454      0.00000      0.00000     -0.00000     -0.35673     -0.00000      0.00000     -0.00000      0.07115     -0.00000     -0.00000      0.07707      0.00000      0.00000 \n    -0.01171      0.05959      0.00000     -0.00000      0.00000      1.05102      0.00000      0.00000     -0.00000     -0.32283      0.00000     -0.00000     -0.00000      0.00597      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.04824     -0.00000      0.00000      0.00000      1.03256      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.24612     -0.00000     -0.00000     -0.00000     -0.27522 \n     0.00000     -0.00000     -0.00000      0.00000      0.04824      0.00000      0.00000      0.00000      1.03256     -0.00000     -0.24612      0.00000     -0.00000      0.00000      0.00000     -0.27522     -0.00000 \n     0.00000      0.00000      0.00000      0.04824     -0.00000     -0.00000     -0.00000      1.03256     -0.00000     -0.00000     -0.00000     -0.24612     -0.00000      0.00000     -0.27522      0.00000      0.00000 \n     0.00512     -0.01976     -0.00000      0.00000     -0.00000      0.03747      0.00000      0.00000     -0.00000      0.80228     -0.00000      0.00000      0.00000      1.96367      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.01254      0.00000     -0.00000     -0.00000      0.06737     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.64037      0.00000      0.00000      0.00000      1.53566 \n    -0.00000      0.00000      0.00000     -0.00000     -0.01254     -0.00000     -0.00000     -0.00000      0.06737      0.00000      0.64037     -0.00000      0.00000     -0.00000     -0.00000      1.53566      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.01254      0.00000      0.00000      0.00000      0.06737      0.00000      0.00000      0.00000      0.64037      0.00000     -0.00000      1.53566     -0.00000     -0.00000 \n    -0.00271      0.01080      0.00000     -0.00000      0.00000     -0.01568     -0.00000     -0.00000      0.00000      0.26086     -0.00000      0.00000      0.00000     -2.10203     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00699     -0.00000      0.00000      0.00000     -0.02850      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.43716     -0.00000     -0.00000     -0.00000     -1.56040 \n     0.00000     -0.00000     -0.00000      0.00000      0.00699     -0.00000      0.00000      0.00000     -0.02850     -0.00000      0.43716      0.00000     -0.00000      0.00000      0.00000     -1.56040     -0.00000 \n     0.00000      0.00000      0.00000      0.00699     -0.00000     -0.00000     -0.00000     -0.02850     -0.00000     -0.00000     -0.00000      0.43716     -0.00000      0.00000     -1.56040      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Y\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17162     -0.65684      0.00000      0.00000      0.00000      0.64084      0.00000      0.00000      0.00000      0.29800      0.00000      0.00000      0.00000      0.00811      0.00000      0.00000      0.00000      0.01508      0.00000      0.00000      0.00000     -0.19550      0.00000      0.00000     -0.19550      0.00000     -0.19550     -0.15859      0.00000      0.00000     -0.15859      0.00000     -0.15859      0.00403      0.00000      0.00000      0.00403      0.00000      0.00403 \n    -0.65684      2.64809      0.00000      0.00000      0.00000     -1.14934      0.00000      0.00000      0.00000      0.20927      0.00000      0.00000      0.00000     -0.07824      0.00000      0.00000      0.00000     -0.03799      0.00000      0.00000      0.00000     -0.00783      0.00000      0.00000     -0.00783      0.00000     -0.00783      0.09171      0.00000      0.00000      0.09171      0.00000      0.09171     -0.00259      0.00000      0.00000     -0.00259      0.00000     -0.00259 \n     0.00000      0.00000      2.40065      0.00000      0.00000      0.00000     -1.06079      0.00000      0.00000      0.00000      0.31480      0.00000      0.00000      0.00000      0.03094      0.00000      0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.40065      0.00000      0.00000      0.00000     -1.06079      0.00000      0.00000      0.00000      0.31480      0.00000      0.00000      0.00000      0.03094      0.00000      0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.40065      0.00000      0.00000      0.00000     -1.06079      0.00000      0.00000      0.00000      0.31480      0.00000      0.00000      0.00000      0.03094      0.00000      0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.64084     -1.14934      0.00000      0.00000      0.00000      2.69162      0.00000      0.00000      0.00000     -0.82621      0.00000      0.00000      0.00000      0.20494      0.00000      0.00000      0.00000      0.08975      0.00000      0.00000      0.00000      0.00641      0.00000      0.00000      0.00641      0.00000      0.00641     -0.07789      0.00000      0.00000     -0.07790      0.00000     -0.07789      0.00459      0.00000      0.00000      0.00459      0.00000      0.00459 \n     0.00000      0.00000     -1.06079      0.00000      0.00000      0.00000      2.83079      0.00000      0.00000      0.00000     -1.05063      0.00000      0.00000      0.00000     -0.06793      0.00000      0.00000      0.00000      0.02756      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.06079      0.00000      0.00000      0.00000      2.83079      0.00000      0.00000      0.00000     -1.05063      0.00000      0.00000      0.00000     -0.06793      0.00000      0.00000      0.00000      0.02756      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.06079      0.00000      0.00000      0.00000      2.83079      0.00000      0.00000      0.00000     -1.05063      0.00000      0.00000      0.00000     -0.06793      0.00000      0.00000      0.00000      0.02756      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.29800      0.20927      0.00000      0.00000      0.00000     -0.82621      0.00000      0.00000      0.00000      3.28617      0.00000      0.00000      0.00000     -0.55965      0.00000      0.00000      0.00000     -0.27991      0.00000      0.00000      0.00000     -0.07489      0.00000      0.00000     -0.07489      0.00000     -0.07489     -0.17480      0.00000      0.00000     -0.17480      0.00000     -0.17480     -0.05623      0.00000      0.00000     -0.05622      0.00000     -0.05623 \n     0.00000      0.00000      0.31480      0.00000      0.00000      0.00000     -1.05063      0.00000      0.00000      0.00000      2.33669      0.00000      0.00000      0.00000      0.13764      0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.31480      0.00000      0.00000      0.00000     -1.05063      0.00000      0.00000      0.00000      2.33669      0.00000      0.00000      0.00000      0.13764      0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.31480      0.00000      0.00000      0.00000     -1.05063      0.00000      0.00000      0.00000      2.33669      0.00000      0.00000      0.00000      0.13764      0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00811     -0.07824      0.00000      0.00000      0.00000      0.20494      0.00000      0.00000      0.00000     -0.55965      0.00000      0.00000      0.00000      1.02210      0.00000      0.00000      0.00000      0.40521      0.00000      0.00000      0.00000      0.00804      0.00000      0.00000      0.00804      0.00000      0.00804      0.05784      0.00000      0.00000      0.05783      0.00000      0.05784      0.05303      0.00000      0.00000      0.05302      0.00000      0.05303 \n     0.00000      0.00000      0.03094      0.00000      0.00000      0.00000     -0.06793      0.00000      0.00000      0.00000      0.13764      0.00000      0.00000      0.00000      0.00828      0.00000      0.00000      0.00000     -0.00321      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03094      0.00000      0.00000      0.00000     -0.06793      0.00000      0.00000      0.00000      0.13764      0.00000      0.00000      0.00000      0.00828      0.00000      0.00000      0.00000     -0.00321      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03094      0.00000      0.00000      0.00000     -0.06793      0.00000      0.00000      0.00000      0.13764      0.00000      0.00000      0.00000      0.00828      0.00000      0.00000      0.00000     -0.00321      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01508     -0.03799      0.00000      0.00000      0.00000      0.08975      0.00000      0.00000      0.00000     -0.27991      0.00000      0.00000      0.00000      0.40521      0.00000      0.00000      0.00000      0.16371      0.00000      0.00000      0.00000      0.00279      0.00000      0.00000      0.00279      0.00000      0.00279      0.02486      0.00000      0.00000      0.02486      0.00000      0.02486      0.02117      0.00000      0.00000      0.02116      0.00000      0.02117 \n     0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.02756      0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000     -0.00321      0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.02756      0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000     -0.00321      0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.02756      0.00000      0.00000      0.00000     -0.05519      0.00000      0.00000      0.00000     -0.00321      0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.19550     -0.00783      0.00000      0.00000      0.00000      0.00641      0.00000      0.00000      0.00000     -0.07489      0.00000      0.00000      0.00000      0.00804      0.00000      0.00000      0.00000      0.00279      0.00000      0.00000      0.00000      1.92970      0.00000      0.00000     -0.93435      0.00000     -0.93435      0.14845      0.00000      0.00000     -0.05286      0.00000     -0.05285     -0.06364      0.00000      0.00000      0.03209      0.00000      0.03210 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.72811      0.00000      0.00000      0.00000      0.00000      0.00000      0.40260      0.00000      0.00000      0.00000      0.00000      0.00000     -0.19146      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.72811      0.00000      0.00000      0.00000      0.00000      0.00000      0.40260      0.00000      0.00000      0.00000      0.00000      0.00000     -0.19146      0.00000      0.00000      0.00000 \n    -0.19550     -0.00783      0.00000      0.00000      0.00000      0.00641      0.00000      0.00000      0.00000     -0.07489      0.00000      0.00000      0.00000      0.00804      0.00000      0.00000      0.00000      0.00279      0.00000      0.00000      0.00000     -0.93435      0.00000      0.00000      1.92971      0.00000     -0.93435     -0.05285      0.00000      0.00000      0.14846      0.00000     -0.05285      0.03209      0.00000      0.00000     -0.06364      0.00000      0.03209 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.72811      0.00000      0.00000      0.00000      0.00000      0.00000      0.40260      0.00000      0.00000      0.00000      0.00000      0.00000     -0.19146      0.00000 \n    -0.19550     -0.00783      0.00000      0.00000      0.00000      0.00641      0.00000      0.00000      0.00000     -0.07489      0.00000      0.00000      0.00000      0.00804      0.00000      0.00000      0.00000      0.00279      0.00000      0.00000      0.00000     -0.93435      0.00000      0.00000     -0.93435      0.00000      1.92970     -0.05285      0.00000      0.00000     -0.05286      0.00000      0.14845      0.03210      0.00000      0.00000      0.03209      0.00000     -0.06364 \n    -0.15859      0.09171      0.00000      0.00000      0.00000     -0.07789      0.00000      0.00000      0.00000     -0.17480      0.00000      0.00000      0.00000      0.05784      0.00000      0.00000      0.00000      0.02486      0.00000      0.00000      0.00000      0.14845      0.00000      0.00000     -0.05285      0.00000     -0.05285      0.08581      0.00000      0.00000     -0.00858      0.00000     -0.00858      0.06764      0.00000      0.00000     -0.02727      0.00000     -0.02727 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40260      0.00000      0.00000      0.00000      0.00000      0.00000      0.18878      0.00000      0.00000      0.00000      0.00000      0.00000      0.18982      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40260      0.00000      0.00000      0.00000      0.00000      0.00000      0.18878      0.00000      0.00000      0.00000      0.00000      0.00000      0.18982      0.00000      0.00000      0.00000 \n    -0.15859      0.09171      0.00000      0.00000      0.00000     -0.07790      0.00000      0.00000      0.00000     -0.17480      0.00000      0.00000      0.00000      0.05783      0.00000      0.00000      0.00000      0.02486      0.00000      0.00000      0.00000     -0.05286      0.00000      0.00000      0.14846      0.00000     -0.05286     -0.00858      0.00000      0.00000      0.08581      0.00000     -0.00858     -0.02727      0.00000      0.00000      0.06764      0.00000     -0.02727 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40260      0.00000      0.00000      0.00000      0.00000      0.00000      0.18878      0.00000      0.00000      0.00000      0.00000      0.00000      0.18982      0.00000 \n    -0.15859      0.09171      0.00000      0.00000      0.00000     -0.07789      0.00000      0.00000      0.00000     -0.17480      0.00000      0.00000      0.00000      0.05784      0.00000      0.00000      0.00000      0.02486      0.00000      0.00000      0.00000     -0.05285      0.00000      0.00000     -0.05285      0.00000      0.14845     -0.00858      0.00000      0.00000     -0.00858      0.00000      0.08581     -0.02727      0.00000      0.00000     -0.02727      0.00000      0.06764 \n     0.00403     -0.00259      0.00000      0.00000      0.00000      0.00459      0.00000      0.00000      0.00000     -0.05623      0.00000      0.00000      0.00000      0.05303      0.00000      0.00000      0.00000      0.02117      0.00000      0.00000      0.00000     -0.06364      0.00000      0.00000      0.03209      0.00000      0.03210      0.06764      0.00000      0.00000     -0.02727      0.00000     -0.02727      0.09123      0.00000      0.00000     -0.04071      0.00000     -0.04071 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.19146      0.00000      0.00000      0.00000      0.00000      0.00000      0.18982      0.00000      0.00000      0.00000      0.00000      0.00000      0.26387      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.19146      0.00000      0.00000      0.00000      0.00000      0.00000      0.18982      0.00000      0.00000      0.00000      0.00000      0.00000      0.26387      0.00000      0.00000      0.00000 \n     0.00403     -0.00259      0.00000      0.00000      0.00000      0.00459      0.00000      0.00000      0.00000     -0.05622      0.00000      0.00000      0.00000      0.05302      0.00000      0.00000      0.00000      0.02116      0.00000      0.00000      0.00000      0.03209      0.00000      0.00000     -0.06364      0.00000      0.03209     -0.02727      0.00000      0.00000      0.06764      0.00000     -0.02727     -0.04071      0.00000      0.00000      0.09123      0.00000     -0.04071 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.19146      0.00000      0.00000      0.00000      0.00000      0.00000      0.18982      0.00000      0.00000      0.00000      0.00000      0.00000      0.26387      0.00000 \n     0.00403     -0.00259      0.00000      0.00000      0.00000      0.00459      0.00000      0.00000      0.00000     -0.05623      0.00000      0.00000      0.00000      0.05303      0.00000      0.00000      0.00000      0.02117      0.00000      0.00000      0.00000      0.03210      0.00000      0.00000      0.03209      0.00000     -0.06364     -0.02727      0.00000      0.00000     -0.02727      0.00000      0.06764     -0.04071      0.00000      0.00000     -0.04071      0.00000      0.09123 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99968      0.19993      0.19993      0.19993      0.19993      0.19993      0.00023      0.00023      0.00023      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.98891      0.00221      0.00221      0.00221      0.00221      0.00221      0.00002      0.00002      0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -602.27950    -81.81113    -74.57677    -74.57677    -74.57677    -13.15632    -10.38818    -10.38818    -10.38818     -5.83224     -5.83224     -5.83224     -5.83224     -5.83224     -1.70929     -0.99486     -0.99486     -0.99486     -0.14762     -0.08748     -0.08748     -0.08748     -0.08748     -0.08748     -0.04989     -0.04989     -0.04989      0.02479      0.06137      0.06137      0.06137      0.34073      0.78282      0.78282      0.78282      0.78282      0.78282      2.73752    109.45140 \n   </alphaeps>\n   <betaeps>\n  -602.27940    -81.80899    -74.57522    -74.57522    -74.57522    -13.15450    -10.38616    -10.38616    -10.38616     -5.82969     -5.82969     -5.82969     -5.82969     -5.82969     -1.69169     -0.97450     -0.97450     -0.97450     -0.13755     -0.06495     -0.06495     -0.06495     -0.06495     -0.06495     -0.04663     -0.04663     -0.04663      0.02756      0.06511      0.06511      0.06511      0.35070      0.79964      0.79964      0.79965      0.79965      0.79965      2.75249    109.45820 \n   </betaeps>\n   <alphavectors>\n     0.97675     -0.33215      0.00000     -0.00000     -0.00000      0.13571      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.05259      0.00000     -0.00000     -0.00000      0.01630     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01258     -0.00000      0.00000      0.00000     -0.01872     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.07843     -0.54309 \n     0.08875      1.00959     -0.00000      0.00000      0.00000     -0.49991     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.20754     -0.00000      0.00000      0.00000     -0.06259      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02032      0.00000     -0.00000     -0.00000      0.11142      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.33497      2.79063 \n    -0.00000     -0.00000      0.00000      0.98040      0.00000      0.00000     -0.46092      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.16334     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03575      0.00000      0.00000     -0.00000      0.00000     -0.03953      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.98040      0.00000      0.00000      0.00000     -0.46092     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.16334     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03575      0.00000      0.00000      0.00000     -0.03953      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.98040     -0.00000      0.00000     -0.00000     -0.00000     -0.46092      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.16334      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.03575      0.00000     -0.00000     -0.03953      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.16818      0.03468     -0.00000      0.00000      0.00000      1.03445      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.47166      0.00000     -0.00000     -0.00000      0.15592     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.19379     -0.00000      0.00000      0.00000     -0.07912      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.66480     18.89520 \n    -0.00000     -0.00000      0.00000      0.04916     -0.00000     -0.00000      1.07695     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.50308      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.11326     -0.00000     -0.00000      0.00000     -0.00000      0.12589     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.04916      0.00000      0.00000      0.00000      1.07695      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.50308      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.11326     -0.00000     -0.00000     -0.00000      0.12589     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.04916      0.00000     -0.00000      0.00000      0.00000      1.07695     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.50308     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11326     -0.00000      0.00000      0.12589     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.16720     -0.09172      0.00000     -0.00000     -0.00000      0.17772      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.16695     -0.00000      0.00000     -0.00000     -0.45404      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02405      0.00000     -0.00000     -0.00000      1.09855      0.00000     -0.00000      0.00000     -0.00000     -0.00000      6.93840     11.20280 \n     0.00000      0.00000     -0.00000     -0.01124      0.00000     -0.00000      0.01763      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.08053     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.29972      0.00000      0.00000     -0.00000      0.00000     -0.34684      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.01124     -0.00000     -0.00000     -0.00000      0.01763      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.08053     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.29972      0.00000      0.00000      0.00000     -0.34684      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.01124      0.00000     -0.00000      0.00000      0.00000      0.01763      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.08053      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.29972      0.00000     -0.00000     -0.34684      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00597      0.00337     -0.00000      0.00000      0.00000      0.01006      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.03115     -0.00000      0.00000     -0.00000      0.72434     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      2.26846     -0.00000      0.00000      0.00000      3.86886     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.15986     -0.18901 \n    -0.00000     -0.00000      0.00000      0.00424      0.00000      0.00000     -0.00196      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.06444      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.62109     -0.00000     -0.00000      0.00000     -0.00000      1.62545     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00424      0.00000      0.00000      0.00000     -0.00196     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.06444     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.62109     -0.00000     -0.00000      0.00000      1.62545     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00424     -0.00000      0.00000     -0.00000     -0.00000     -0.00196      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.06444     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.62109     -0.00000      0.00000      1.62545     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00255     -0.00135      0.00000     -0.00000     -0.00000     -0.00373     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.01096      0.00000     -0.00000      0.00000      0.25948     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -2.30667      0.00000      0.00000      0.00000     -1.72709      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.44764      0.07991 \n     0.00000      0.00000     -0.00000     -0.00239     -0.00000     -0.00000      0.00097     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02604      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.46277      0.00000      0.00000     -0.00000      0.00000     -1.60958      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00239     -0.00000     -0.00000     -0.00000      0.00097      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02604      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.46276     -0.00000     -0.00000     -0.00000     -1.60958      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00239      0.00000     -0.00000      0.00000      0.00000      0.00097     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.02604     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.46277      0.00000     -0.00000     -1.60958      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.09788      0.01354     -0.00000      0.00000     -0.00000      0.01027      0.00000     -0.00000      0.00000      0.00000      0.84395     -0.00000     -0.00000     -0.48725     -0.01641     -0.00000     -0.00000     -0.00000      0.00547      0.11001      0.00000     -0.00000     -0.19054      0.00000     -0.00000     -0.00000      0.00000      0.00091     -0.00000     -0.00000      0.00000     -0.01122     -0.30304     -0.00000      0.00000     -0.00000      0.17496     -0.07787     -9.73138 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.68790     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.38108      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.60608     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.68790      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.38108     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.60608      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.09788      0.01354     -0.00000      0.00000     -0.00000      0.01027      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.97451     -0.01641      0.00000      0.00000     -0.00000      0.00547     -0.22002     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00091      0.00000      0.00000      0.00000     -0.01122     -0.00000      0.00000     -0.00000      0.00000     -0.34992     -0.07787     -9.73138 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.68790      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.38108     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.60608     -0.00000      0.00000      0.00000      0.00000 \n    -0.09788      0.01354     -0.00000      0.00000      0.00000      0.01027      0.00000     -0.00000     -0.00000      0.00000     -0.84395     -0.00000     -0.00000     -0.48725     -0.01641     -0.00000     -0.00000      0.00000      0.00547      0.11001      0.00000     -0.00000      0.19054     -0.00000     -0.00000     -0.00000      0.00000      0.00091     -0.00000     -0.00000     -0.00000     -0.01122      0.30304      0.00000     -0.00000      0.00000      0.17496     -0.07787     -9.73138 \n    -0.06454      0.03578     -0.00000      0.00000      0.00000     -0.05215     -0.00000      0.00000     -0.00000     -0.00000      0.06962      0.00000      0.00000     -0.04019     -0.03603      0.00000     -0.00000      0.00000      0.04303     -0.24883     -0.00000      0.00000      0.43098     -0.00000      0.00000      0.00000     -0.00000      0.09284      0.00000      0.00000     -0.00000     -0.03083      0.98937      0.00000     -0.00000      0.00000     -0.57121     -3.24591     -4.18838 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.13923      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.86196     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.97874      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.13923     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.86196      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.97874     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.06454      0.03578     -0.00000      0.00000      0.00000     -0.05215     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.08039     -0.03603      0.00000     -0.00000      0.00000      0.04303      0.49765      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.09284     -0.00000     -0.00000     -0.00000     -0.03083      0.00000     -0.00000      0.00000     -0.00000      1.14243     -3.24591     -4.18838 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.13923     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.86196      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.97874     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.06454      0.03578     -0.00000      0.00000      0.00000     -0.05215     -0.00000      0.00000     -0.00000     -0.00000     -0.06962      0.00000      0.00000     -0.04019     -0.03603      0.00000     -0.00000     -0.00000      0.04303     -0.24883     -0.00000      0.00000     -0.43098      0.00000      0.00000      0.00000     -0.00000      0.09284      0.00000      0.00000      0.00000     -0.03083     -0.98937     -0.00000      0.00000     -0.00000     -0.57121     -3.24591     -4.18838 \n     0.00166     -0.00108      0.00000     -0.00000     -0.00000     -0.00759     -0.00000      0.00000     -0.00000     -0.00000     -0.01539      0.00000      0.00000      0.00888     -0.00813      0.00000     -0.00000     -0.00000      0.04687     -0.32865     -0.00000      0.00000      0.56923     -0.00000      0.00000      0.00000     -0.00000     -0.10105      0.00000      0.00000     -0.00000     -1.34199     -0.86268     -0.00000     -0.00000      0.00000      0.49807      0.58002      0.00466 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.03077      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.13847      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.72535      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03077      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.13847      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.72535      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00166     -0.00108      0.00000     -0.00000     -0.00000     -0.00759     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01777     -0.00813      0.00000     -0.00000      0.00000      0.04687      0.65730      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.10105     -0.00000     -0.00000     -0.00000     -1.34199     -0.00000     -0.00000      0.00000     -0.00000     -0.99613      0.58002      0.00466 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.03077     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.13847     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.72535     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00166     -0.00108      0.00000     -0.00000     -0.00000     -0.00759     -0.00000      0.00000     -0.00000     -0.00000      0.01539      0.00000      0.00000      0.00888     -0.00813      0.00000     -0.00000     -0.00000      0.04687     -0.32865     -0.00000      0.00000     -0.56923      0.00000      0.00000      0.00000     -0.00000     -0.10105      0.00000      0.00000      0.00000     -1.34199      0.86268      0.00000      0.00000     -0.00000      0.49807      0.58002      0.00466 \n   </alphavectors>\n   <betavectors>\n     0.97675     -0.33216      0.00000     -0.00000     -0.00000      0.13571      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05275      0.00000      0.00000      0.00000      0.01553     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.01282     -0.00000      0.00000     -0.00000     -0.01903     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.07833     -0.54309 \n     0.08875      1.00961     -0.00000      0.00000      0.00000     -0.49993     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.20825     -0.00000     -0.00000      0.00000     -0.06000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.02063      0.00000     -0.00000     -0.00000      0.11213      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.33461      2.79064 \n     0.00000     -0.00000      0.00000      0.98041      0.00000      0.00000     -0.46094     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.16332     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.03428     -0.00000      0.00000     -0.00000     -0.04065      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.98041     -0.00000     -0.00000     -0.00000     -0.46094      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.16332      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.03428     -0.00000     -0.00000      0.00000     -0.04065     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.98041     -0.00000     -0.00000     -0.00000     -0.00000     -0.46094     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.16332      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03428     -0.00000      0.00000     -0.00000     -0.04065      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.16818      0.03475     -0.00000      0.00000     -0.00000      1.03452      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.47325      0.00000      0.00000      0.00000      0.14775     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.19771     -0.00000      0.00000     -0.00000     -0.08381      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.66435     18.89518 \n     0.00000     -0.00000      0.00000      0.04914     -0.00000     -0.00000      1.07702      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.50306      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.10856      0.00000     -0.00000      0.00000      0.12945     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.04914     -0.00000     -0.00000     -0.00000      1.07702     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.50306     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.10856      0.00000      0.00000     -0.00000      0.12945      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.04914      0.00000      0.00000      0.00000      0.00000      1.07702      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.50306     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.10856      0.00000     -0.00000      0.00000      0.12945     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.16720     -0.09164      0.00000     -0.00000      0.00000      0.17759      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.17977     -0.00000     -0.00000      0.00000     -0.43903      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.02374      0.00000     -0.00000      0.00000      1.09991      0.00000     -0.00000     -0.00000      0.00000      0.00000      6.93670     11.20298 \n    -0.00000      0.00000     -0.00000     -0.01124      0.00000     -0.00000      0.01748     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.08086     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.28693     -0.00000      0.00000     -0.00000     -0.35647      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.01124     -0.00000      0.00000      0.00000      0.01748     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.08086      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.28693     -0.00000     -0.00000      0.00000     -0.35647     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.01124      0.00000     -0.00000      0.00000      0.00000      0.01748     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.08086      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.28693     -0.00000      0.00000     -0.00000     -0.35647      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00597      0.00337     -0.00000      0.00000     -0.00000      0.01002      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.03311     -0.00000     -0.00000      0.00000      0.70767     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      2.35371     -0.00000      0.00000     -0.00000      3.82178     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.15632     -0.18897 \n     0.00000     -0.00000      0.00000      0.00424      0.00000      0.00000     -0.00193     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06312      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.56317      0.00000     -0.00000      0.00000      1.64646     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00424     -0.00000     -0.00000     -0.00000     -0.00193      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.06312      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.56316     -0.00000      0.00000     -0.00000      1.64647     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00424     -0.00000     -0.00000     -0.00000     -0.00000     -0.00193     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.06312     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.56317      0.00000     -0.00000      0.00000      1.64646     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00255     -0.00135      0.00000     -0.00000      0.00000     -0.00372     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.01168      0.00000      0.00000     -0.00000      0.31174      0.00000     -0.00000      0.00000     -0.00000      0.00001      0.00000      0.00000     -0.00000     -2.32355     -0.00000      0.00000      0.00000     -1.69593      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.44610      0.07990 \n    -0.00000      0.00000     -0.00000     -0.00239     -0.00000     -0.00000      0.00095      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.02508     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.51946     -0.00000      0.00000     -0.00000     -1.59221     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00239      0.00000      0.00000      0.00000      0.00095     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02508     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.51946      0.00000      0.00000     -0.00000     -1.59221     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00239      0.00000      0.00000      0.00000      0.00000      0.00095      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02508      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.51946     -0.00000      0.00000     -0.00000     -1.59221      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.09788      0.01350     -0.00000      0.00000      0.00000      0.01027      0.00000     -0.00000     -0.00000      0.00000      0.84406      0.00000      0.00000     -0.48732     -0.01646     -0.00000     -0.00000      0.00000      0.00524     -0.19056     -0.00000      0.00000     -0.00000      0.11002     -0.00000      0.00000     -0.00000      0.00089     -0.00000      0.00000     -0.00000     -0.01105     -0.30272     -0.00000     -0.00000     -0.00000      0.17478     -0.07764     -9.73138 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.68812     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.38111     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.60544     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.68812      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.38111      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.60544     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.09788      0.01350     -0.00000      0.00000     -0.00000      0.01027      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.97464     -0.01646      0.00000      0.00000      0.00000      0.00524     -0.00000      0.00000      0.00000     -0.00000     -0.22004     -0.00000      0.00000     -0.00000      0.00089      0.00000     -0.00000      0.00000     -0.01105     -0.00000     -0.00000     -0.00000      0.00000     -0.34955     -0.07764     -9.73138 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.68812     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.38111      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.60544      0.00000      0.00000      0.00000      0.00000 \n    -0.09788      0.01350     -0.00000      0.00000     -0.00000      0.01027      0.00000     -0.00000      0.00000      0.00000     -0.84406      0.00000      0.00000     -0.48732     -0.01646     -0.00000     -0.00000     -0.00000      0.00524      0.19056      0.00000     -0.00000      0.00000      0.11002      0.00000     -0.00000      0.00000      0.00089      0.00000     -0.00000      0.00000     -0.01105      0.30272      0.00000      0.00000      0.00000      0.17478     -0.07764     -9.73138 \n    -0.06454      0.03575     -0.00000      0.00000     -0.00000     -0.05215     -0.00000      0.00000      0.00000     -0.00000      0.06930     -0.00000     -0.00000     -0.04001     -0.04106      0.00000      0.00000     -0.00000      0.04172      0.43174      0.00000     -0.00000      0.00000     -0.24927      0.00000     -0.00000      0.00000      0.09485      0.00000     -0.00000      0.00000     -0.03093      0.98906      0.00000      0.00000      0.00000     -0.57104     -3.24572     -4.18845 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13861      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.86348      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.97812      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.13861     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.86348     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.97812      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.06454      0.03575     -0.00000      0.00000     -0.00000     -0.05215     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.08003     -0.04106      0.00000      0.00000     -0.00000      0.04171      0.00000     -0.00000      0.00000     -0.00000      0.49853      0.00000     -0.00000      0.00000      0.09486     -0.00000      0.00000     -0.00000     -0.03093      0.00000      0.00000      0.00000     -0.00000      1.14207     -3.24572     -4.18845 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.13861      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.86348     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.97812     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.06454      0.03575     -0.00000      0.00000     -0.00000     -0.05215     -0.00000      0.00000     -0.00000     -0.00000     -0.06930     -0.00000     -0.00000     -0.04001     -0.04106      0.00000      0.00000      0.00000      0.04172     -0.43174     -0.00000      0.00000     -0.00000     -0.24927     -0.00000      0.00000     -0.00000      0.09485     -0.00000      0.00000     -0.00000     -0.03093     -0.98906     -0.00000     -0.00000     -0.00000     -0.57104     -3.24572     -4.18845 \n     0.00166     -0.00108      0.00000     -0.00000      0.00000     -0.00756     -0.00000      0.00000     -0.00000     -0.00000     -0.01535     -0.00000     -0.00000      0.00886     -0.00951      0.00000      0.00000     -0.00000      0.02835      0.56858      0.00000     -0.00000      0.00000     -0.32827      0.00000     -0.00000      0.00000     -0.12085      0.00000     -0.00000      0.00000     -1.34120     -0.86311     -0.00000      0.00000      0.00000      0.49831      0.57923      0.00465 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.03070      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.13717     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.72621     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03070      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.13717     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.72621     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00166     -0.00108      0.00000     -0.00000      0.00000     -0.00756     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.01772     -0.00951      0.00000      0.00000     -0.00000      0.02834      0.00000     -0.00000      0.00000     -0.00000      0.65654      0.00000     -0.00000     -0.00000     -0.12085     -0.00000      0.00000     -0.00000     -1.34120     -0.00000      0.00000      0.00000     -0.00000     -0.99663      0.57923      0.00465 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03070     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.13717      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.72621      0.00000      0.00000      0.00000      0.00000 \n     0.00166     -0.00108      0.00000     -0.00000      0.00000     -0.00756     -0.00000      0.00000      0.00000     -0.00000      0.01535     -0.00000     -0.00000      0.00886     -0.00951      0.00000      0.00000      0.00000      0.02835     -0.56858     -0.00000      0.00000     -0.00000     -0.32827     -0.00000      0.00000     -0.00000     -0.12085     -0.00000      0.00000     -0.00000     -1.34120      0.86311      0.00000     -0.00000     -0.00000      0.49831      0.57923      0.00465 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Zr\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.18060     -0.68224      0.00000      0.00000      0.00000      0.53769      0.00000      0.00000      0.00000      0.10684      0.00000      0.00000      0.00000      0.00140      0.00000      0.00000      0.00000      0.01399      0.00000      0.00000      0.00000     -0.13357      0.00000      0.00000     -0.13357      0.00000     -0.13357     -0.08443      0.00000      0.00000     -0.08443      0.00000     -0.08443      0.01047      0.00000      0.00000      0.01047      0.00000      0.01047 \n    -0.68224      2.67986      0.00000      0.00000      0.00000     -1.14243      0.00000      0.00000      0.00000      0.30360      0.00000      0.00000      0.00000     -0.06995      0.00000      0.00000      0.00000     -0.03542      0.00000      0.00000      0.00000     -0.02685      0.00000      0.00000     -0.02685      0.00000     -0.02685      0.06014      0.00000      0.00000      0.06014      0.00000      0.06014     -0.00584      0.00000      0.00000     -0.00584      0.00000     -0.00584 \n     0.00000      0.00000      2.41230      0.00000      0.00000      0.00000     -1.08699      0.00000      0.00000      0.00000      0.33620      0.00000      0.00000      0.00000      0.03071      0.00000      0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.41230      0.00000      0.00000      0.00000     -1.08699      0.00000      0.00000      0.00000      0.33620      0.00000      0.00000      0.00000      0.03071      0.00000      0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.41230      0.00000      0.00000      0.00000     -1.08699      0.00000      0.00000      0.00000      0.33620      0.00000      0.00000      0.00000      0.03071      0.00000      0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.53769     -1.14243      0.00000      0.00000      0.00000      2.72128      0.00000      0.00000      0.00000     -0.91939      0.00000      0.00000      0.00000      0.18961      0.00000      0.00000      0.00000      0.08364      0.00000      0.00000      0.00000      0.01815      0.00000      0.00000      0.01815      0.00000      0.01815     -0.05516      0.00000      0.00000     -0.05516      0.00000     -0.05516      0.00565      0.00000      0.00000      0.00565      0.00000      0.00565 \n     0.00000      0.00000     -1.08699      0.00000      0.00000      0.00000      2.89140      0.00000      0.00000      0.00000     -1.12057      0.00000      0.00000      0.00000     -0.06803      0.00000      0.00000      0.00000      0.02805      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.08699      0.00000      0.00000      0.00000      2.89140      0.00000      0.00000      0.00000     -1.12057      0.00000      0.00000      0.00000     -0.06803      0.00000      0.00000      0.00000      0.02805      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.08699      0.00000      0.00000      0.00000      2.89140      0.00000      0.00000      0.00000     -1.12057      0.00000      0.00000      0.00000     -0.06803      0.00000      0.00000      0.00000      0.02805      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.10684      0.30360      0.00000      0.00000      0.00000     -0.91939      0.00000      0.00000      0.00000      3.11867      0.00000      0.00000      0.00000     -0.54244      0.00000      0.00000      0.00000     -0.23430      0.00000      0.00000      0.00000     -0.04722      0.00000      0.00000     -0.04722      0.00000     -0.04722     -0.14107      0.00000      0.00000     -0.14107      0.00000     -0.14107     -0.01831      0.00000      0.00000     -0.01831      0.00000     -0.01831 \n     0.00000      0.00000      0.33620      0.00000      0.00000      0.00000     -1.12057      0.00000      0.00000      0.00000      2.38525      0.00000      0.00000      0.00000      0.13605      0.00000      0.00000      0.00000     -0.05596      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.33620      0.00000      0.00000      0.00000     -1.12057      0.00000      0.00000      0.00000      2.38525      0.00000      0.00000      0.00000      0.13605      0.00000      0.00000      0.00000     -0.05596      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.33620      0.00000      0.00000      0.00000     -1.12057      0.00000      0.00000      0.00000      2.38525      0.00000      0.00000      0.00000      0.13605      0.00000      0.00000      0.00000     -0.05596      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00140     -0.06995      0.00000      0.00000      0.00000      0.18961      0.00000      0.00000      0.00000     -0.54244      0.00000      0.00000      0.00000      0.87210      0.00000      0.00000      0.00000      0.37089      0.00000      0.00000      0.00000      0.00649      0.00000      0.00000      0.00649      0.00000      0.00649      0.05358      0.00000      0.00000      0.05358      0.00000      0.05358      0.04775      0.00000      0.00000      0.04775      0.00000      0.04775 \n     0.00000      0.00000      0.03071      0.00000      0.00000      0.00000     -0.06803      0.00000      0.00000      0.00000      0.13605      0.00000      0.00000      0.00000      0.00782      0.00000      0.00000      0.00000     -0.00322      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03071      0.00000      0.00000      0.00000     -0.06803      0.00000      0.00000      0.00000      0.13605      0.00000      0.00000      0.00000      0.00782      0.00000      0.00000      0.00000     -0.00322      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03071      0.00000      0.00000      0.00000     -0.06803      0.00000      0.00000      0.00000      0.13605      0.00000      0.00000      0.00000      0.00782      0.00000      0.00000      0.00000     -0.00322      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01399     -0.03542      0.00000      0.00000      0.00000      0.08364      0.00000      0.00000      0.00000     -0.23430      0.00000      0.00000      0.00000      0.37089      0.00000      0.00000      0.00000      0.16172      0.00000      0.00000      0.00000      0.00200      0.00000      0.00000      0.00200      0.00000      0.00200      0.02213      0.00000      0.00000      0.02213      0.00000      0.02213      0.01890      0.00000      0.00000      0.01890      0.00000      0.01890 \n     0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.02805      0.00000      0.00000      0.00000     -0.05596      0.00000      0.00000      0.00000     -0.00322      0.00000      0.00000      0.00000      0.00133      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.02805      0.00000      0.00000      0.00000     -0.05596      0.00000      0.00000      0.00000     -0.00322      0.00000      0.00000      0.00000      0.00133      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01392      0.00000      0.00000      0.00000      0.02805      0.00000      0.00000      0.00000     -0.05596      0.00000      0.00000      0.00000     -0.00322      0.00000      0.00000      0.00000      0.00133      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.13357     -0.02685      0.00000      0.00000      0.00000      0.01815      0.00000      0.00000      0.00000     -0.04722      0.00000      0.00000      0.00000      0.00649      0.00000      0.00000      0.00000      0.00200      0.00000      0.00000      0.00000      1.94292      0.00000      0.00000     -0.95565      0.00000     -0.95565      0.09305      0.00000      0.00000     -0.03876      0.00000     -0.03876     -0.09580      0.00000      0.00000      0.04721      0.00000      0.04722 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.79714      0.00000      0.00000      0.00000      0.00000      0.00000      0.26361      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28605      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.79714      0.00000      0.00000      0.00000      0.00000      0.00000      0.26361      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28605      0.00000      0.00000      0.00000 \n    -0.13357     -0.02685      0.00000      0.00000      0.00000      0.01815      0.00000      0.00000      0.00000     -0.04722      0.00000      0.00000      0.00000      0.00649      0.00000      0.00000      0.00000      0.00200      0.00000      0.00000      0.00000     -0.95565      0.00000      0.00000      1.94291      0.00000     -0.95565     -0.03876      0.00000      0.00000      0.09305      0.00000     -0.03876      0.04722      0.00000      0.00000     -0.09580      0.00000      0.04722 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.79714      0.00000      0.00000      0.00000      0.00000      0.00000      0.26361      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28605      0.00000 \n    -0.13357     -0.02685      0.00000      0.00000      0.00000      0.01815      0.00000      0.00000      0.00000     -0.04722      0.00000      0.00000      0.00000      0.00649      0.00000      0.00000      0.00000      0.00200      0.00000      0.00000      0.00000     -0.95565      0.00000      0.00000     -0.95565      0.00000      1.94290     -0.03875      0.00000      0.00000     -0.03876      0.00000      0.09304      0.04721      0.00000      0.00000      0.04722      0.00000     -0.09580 \n    -0.08443      0.06014      0.00000      0.00000      0.00000     -0.05516      0.00000      0.00000      0.00000     -0.14107      0.00000      0.00000      0.00000      0.05358      0.00000      0.00000      0.00000      0.02213      0.00000      0.00000      0.00000      0.09305      0.00000      0.00000     -0.03876      0.00000     -0.03875      0.18484      0.00000      0.00000     -0.07256      0.00000     -0.07256      0.15035      0.00000      0.00000     -0.07161      0.00000     -0.07161 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.26361      0.00000      0.00000      0.00000      0.00000      0.00000      0.51480      0.00000      0.00000      0.00000      0.00000      0.00000      0.44392      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.26361      0.00000      0.00000      0.00000      0.00000      0.00000      0.51480      0.00000      0.00000      0.00000      0.00000      0.00000      0.44392      0.00000      0.00000      0.00000 \n    -0.08443      0.06014      0.00000      0.00000      0.00000     -0.05516      0.00000      0.00000      0.00000     -0.14107      0.00000      0.00000      0.00000      0.05358      0.00000      0.00000      0.00000      0.02213      0.00000      0.00000      0.00000     -0.03876      0.00000      0.00000      0.09305      0.00000     -0.03876     -0.07256      0.00000      0.00000      0.18485      0.00000     -0.07256     -0.07161      0.00000      0.00000      0.15035      0.00000     -0.07161 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.26361      0.00000      0.00000      0.00000      0.00000      0.00000      0.51480      0.00000      0.00000      0.00000      0.00000      0.00000      0.44392      0.00000 \n    -0.08443      0.06014      0.00000      0.00000      0.00000     -0.05516      0.00000      0.00000      0.00000     -0.14107      0.00000      0.00000      0.00000      0.05358      0.00000      0.00000      0.00000      0.02213      0.00000      0.00000      0.00000     -0.03876      0.00000      0.00000     -0.03876      0.00000      0.09304     -0.07256      0.00000      0.00000     -0.07256      0.00000      0.18485     -0.07161      0.00000      0.00000     -0.07161      0.00000      0.15035 \n     0.01047     -0.00584      0.00000      0.00000      0.00000      0.00565      0.00000      0.00000      0.00000     -0.01831      0.00000      0.00000      0.00000      0.04775      0.00000      0.00000      0.00000      0.01890      0.00000      0.00000      0.00000     -0.09580      0.00000      0.00000      0.04722      0.00000      0.04721      0.15035      0.00000      0.00000     -0.07161      0.00000     -0.07161      0.14637      0.00000      0.00000     -0.06830      0.00000     -0.06830 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28605      0.00000      0.00000      0.00000      0.00000      0.00000      0.44392      0.00000      0.00000      0.00000      0.00000      0.00000      0.42935      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28605      0.00000      0.00000      0.00000      0.00000      0.00000      0.44392      0.00000      0.00000      0.00000      0.00000      0.00000      0.42935      0.00000      0.00000      0.00000 \n     0.01047     -0.00584      0.00000      0.00000      0.00000      0.00565      0.00000      0.00000      0.00000     -0.01831      0.00000      0.00000      0.00000      0.04775      0.00000      0.00000      0.00000      0.01890      0.00000      0.00000      0.00000      0.04721      0.00000      0.00000     -0.09580      0.00000      0.04722     -0.07161      0.00000      0.00000      0.15035      0.00000     -0.07161     -0.06830      0.00000      0.00000      0.14637      0.00000     -0.06830 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28605      0.00000      0.00000      0.00000      0.00000      0.00000      0.44392      0.00000      0.00000      0.00000      0.00000      0.00000      0.42935      0.00000 \n     0.01047     -0.00584      0.00000      0.00000      0.00000      0.00565      0.00000      0.00000      0.00000     -0.01831      0.00000      0.00000      0.00000      0.04775      0.00000      0.00000      0.00000      0.01890      0.00000      0.00000      0.00000      0.04722      0.00000      0.00000      0.04722      0.00000     -0.09580     -0.07161      0.00000      0.00000     -0.07161      0.00000      0.15035     -0.06830      0.00000      0.00000     -0.06830      0.00000      0.14637 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.92150      0.41570      0.41570      0.41570      0.41570      0.41570      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.88844      0.02231      0.02231      0.02231      0.02231      0.02231      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -635.56000    -87.14908    -79.65352    -79.65352    -79.65352    -14.34745    -11.44138    -11.44138    -11.44138     -6.65891     -6.65891     -6.65891     -6.65891     -6.65891     -1.91637     -1.13868     -1.13868     -1.13868     -0.15714     -0.13412     -0.13412     -0.13412     -0.13412     -0.13412     -0.04947     -0.04947     -0.04947      0.02764      0.06762      0.06762      0.06762      0.31778      0.62492      0.62492      0.62492      0.62492      0.62492      2.01927     99.16444 \n   </alphaeps>\n   <betaeps>\n  -635.55990    -87.14402    -79.64983    -79.64983    -79.64983    -14.34330    -11.43672    -11.43672    -11.43672     -6.65314     -6.65314     -6.65314     -6.65314     -6.65314     -1.88026     -1.09803     -1.09803     -1.09803     -0.13741     -0.09178     -0.09178     -0.09178     -0.09178     -0.09178     -0.04243     -0.04243     -0.04243      0.03256      0.07528      0.07528      0.07528      0.33186      0.65561      0.65561      0.65561      0.65561      0.65561      2.05196     99.18151 \n   </betaeps>\n   <alphavectors>\n     0.97831     -0.33356      0.00000     -0.00000     -0.00000      0.13693     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.05429     -0.00000     -0.00000     -0.00000      0.01679     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.01225     -0.00000     -0.00000      0.00000     -0.01615      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.06480     -0.49088 \n     0.08070      1.01429     -0.00000      0.00000      0.00000     -0.50431      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.21554      0.00000      0.00000      0.00000     -0.06508      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01491      0.00000      0.00000     -0.00000      0.11774     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.27280      2.55746 \n     0.00000     -0.00000      0.00000     -0.00000      0.97987      0.00000     -0.00000     -0.00000     -0.46541     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.17147      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.03614      0.00000     -0.00000     -0.00000     -0.03967      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.97987     -0.00000     -0.00000      0.00000     -0.46541     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.17147     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.03614     -0.00000      0.00000     -0.00000     -0.03967      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.97987     -0.00000     -0.00000     -0.00000     -0.46541     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.17147     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.03614     -0.00000      0.00000     -0.00000     -0.03967      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.11928      0.05735     -0.00000      0.00000      0.00000      1.03922     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.48955     -0.00000     -0.00000     -0.00000      0.16204     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.20522      0.00000     -0.00000      0.00000     -0.00985      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.54922     17.68525 \n     0.00000     -0.00000      0.00000     -0.00000      0.05024     -0.00000      0.00000      0.00000      1.07875     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.52859     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.11478     -0.00000      0.00000      0.00000      0.12664     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.05024      0.00000      0.00000     -0.00000      1.07875      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.52859      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.11478      0.00000     -0.00000      0.00000      0.12664     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.05024      0.00000      0.00000      0.00000      1.07875      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.52859      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.11478      0.00000     -0.00000      0.00000      0.12664     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.08639     -0.05033      0.00000     -0.00000     -0.00000      0.15909     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.15215      0.00000      0.00000      0.00000     -0.45703      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.08473      0.00000      0.00000     -0.00000      1.44783     -0.00000      0.00000      0.00000     -0.00000     -0.00000      4.91317      6.46297 \n    -0.00000      0.00000     -0.00000      0.00000     -0.01182     -0.00000      0.00000      0.00000      0.01626      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.09175      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.29211      0.00000     -0.00000     -0.00000     -0.33466      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.01182      0.00000      0.00000     -0.00000      0.01626     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.09175     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.29211     -0.00000      0.00000     -0.00000     -0.33466      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.01182      0.00000      0.00000      0.00000      0.01626     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.09175     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.29211     -0.00000      0.00000     -0.00000     -0.33466      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00801      0.00410     -0.00000      0.00000      0.00000      0.00017     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00423      0.00000      0.00000      0.00000      0.70012     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.55709     -0.00000     -0.00000      0.00000      5.21373     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.76422     -0.42345 \n     0.00000     -0.00000      0.00000     -0.00000      0.00420      0.00000     -0.00000     -0.00000     -0.00121     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.06297     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.63006     -0.00000      0.00000      0.00000      1.59515     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00420     -0.00000     -0.00000      0.00000     -0.00121      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.06297      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.63006      0.00000     -0.00000      0.00000      1.59515     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00420     -0.00000     -0.00000     -0.00000     -0.00121      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06297      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.63006      0.00000     -0.00000      0.00000      1.59515     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00237     -0.00107      0.00000     -0.00000     -0.00000     -0.00003      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00039     -0.00000     -0.00000     -0.00000      0.25275     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -2.38376      0.00000     -0.00000      0.00000     -2.03069      0.00000     -0.00000      0.00000      0.00000      0.00000      0.53482      0.11693 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00236     -0.00000      0.00000      0.00000      0.00056      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02618      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.45294     -0.00000      0.00000      0.00000     -1.59189      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00236      0.00000      0.00000     -0.00000      0.00056     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02618      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.45294     -0.00000      0.00000     -0.00000     -1.59189      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00236      0.00000      0.00000      0.00000      0.00056     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02618     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.45294     -0.00000      0.00000     -0.00000     -1.59189      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.07033      0.00037     -0.00000      0.00000      0.00000      0.00919     -0.00000     -0.00000      0.00000      0.00005      0.00000      0.00000     -0.00000      0.97674     -0.01492     -0.00000     -0.00000     -0.00000      0.00467     -0.23376      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00263      0.00000     -0.00000      0.00000     -0.01726     -0.31076      0.00000      0.00000     -0.00000     -0.00000     -0.06015     -8.90996 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.69176      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.40489      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.53825      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.69176      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.40489      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.53825     -0.00000      0.00000     -0.00000 \n    -0.07033      0.00037     -0.00000      0.00000      0.00000      0.00919     -0.00000     -0.00000      0.00000      0.84585      0.00000      0.00000     -0.00000     -0.48841     -0.01492      0.00000      0.00000      0.00000      0.00467      0.11688     -0.20245     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00263     -0.00000      0.00000     -0.00000     -0.01726      0.15538     -0.26913     -0.00000      0.00000      0.00000     -0.06015     -8.90996 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.69176     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.40489     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.53825      0.00000     -0.00000      0.00000     -0.00000 \n    -0.07033      0.00037     -0.00000      0.00000      0.00000      0.00919     -0.00000     -0.00000      0.00000     -0.84590      0.00000      0.00000     -0.00000     -0.48833     -0.01492      0.00000      0.00000      0.00000      0.00467      0.11688      0.20245      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00263     -0.00000      0.00000     -0.00000     -0.01726      0.15538      0.26913      0.00000     -0.00000      0.00000     -0.06015     -8.90996 \n    -0.03274      0.01914     -0.00000      0.00000      0.00000     -0.04688      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.07695     -0.03241     -0.00000     -0.00000     -0.00000      0.04716      0.60435     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.04539     -0.00000      0.00000     -0.00000     -0.27272      1.04630     -0.00000     -0.00000      0.00000      0.00000     -2.41047     -2.35309 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.13328     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.04677     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.81224     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13328     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.04677     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.81224      0.00000     -0.00000      0.00000 \n    -0.03274      0.01914     -0.00000      0.00000      0.00000     -0.04688      0.00000      0.00000     -0.00000      0.06664     -0.00000     -0.00000      0.00000     -0.03848     -0.03241     -0.00000      0.00000      0.00000      0.04716     -0.30218      0.52339      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.04539      0.00000     -0.00000      0.00000     -0.27272     -0.52315      0.90612      0.00000     -0.00000     -0.00000     -2.41047     -2.35309 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.13328      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.04677      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.81224     -0.00000      0.00000     -0.00000      0.00000 \n    -0.03274      0.01914     -0.00000      0.00000      0.00000     -0.04688      0.00000      0.00000     -0.00000     -0.06664     -0.00000     -0.00000      0.00000     -0.03847     -0.03241     -0.00000      0.00000      0.00000      0.04716     -0.30218     -0.52339     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.04539      0.00000     -0.00000      0.00000     -0.27272     -0.52315     -0.90612     -0.00000      0.00000     -0.00000     -2.41047     -2.35309 \n     0.00431     -0.00239      0.00000     -0.00000     -0.00000     -0.00054      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.01898      0.00530      0.00000      0.00000      0.00000      0.05517      0.56995     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.21012     -0.00000      0.00000     -0.00000     -1.73327     -1.01303      0.00000      0.00000      0.00000      0.00000      0.91517      0.23504 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.03288     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.98719      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.75463      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.03288      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.98719      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.75463      0.00000      0.00000     -0.00000 \n     0.00431     -0.00239      0.00000     -0.00000     -0.00000     -0.00054      0.00000      0.00000     -0.00000     -0.01644     -0.00000     -0.00000      0.00000      0.00949      0.00530      0.00000     -0.00000     -0.00000      0.05517     -0.28497      0.49359      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.21012      0.00000     -0.00000      0.00000     -1.73327      0.50651     -0.87732     -0.00000     -0.00000     -0.00000      0.91517      0.23504 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.03288      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.98719      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.75463      0.00000     -0.00000      0.00000      0.00000 \n     0.00431     -0.00239      0.00000     -0.00000     -0.00000     -0.00054      0.00000      0.00000     -0.00000      0.01644     -0.00000     -0.00000      0.00000      0.00949      0.00530      0.00000     -0.00000     -0.00000      0.05517     -0.28498     -0.49359     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.21012      0.00000     -0.00000      0.00000     -1.73327      0.50652      0.87731      0.00000      0.00000     -0.00000      0.91517      0.23504 \n   </alphavectors>\n   <betavectors>\n     0.97831     -0.33356     -0.00000     -0.00000      0.00000      0.13694     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05452      0.00000      0.00000      0.00000      0.01547      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.01264      0.00000     -0.00000      0.00000     -0.01657     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.06467     -0.49089 \n     0.08069      1.01432      0.00000      0.00000     -0.00000     -0.50436      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.21655     -0.00000     -0.00000     -0.00000     -0.06040     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.01484      0.00000      0.00000     -0.00000      0.11833      0.00000      0.00000      0.00000     -0.00000      0.00000      0.27240      2.55748 \n    -0.00000      0.00000      0.00000      0.00000      0.97987      0.00000     -0.00000     -0.00000     -0.46544      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.17137     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.03331     -0.00000      0.00000     -0.00000     -0.04190      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.97987      0.00000     -0.00000      0.00000     -0.46544     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.17137      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03331      0.00000     -0.00000      0.00000     -0.04190     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.97987     -0.00000      0.00000     -0.00000     -0.46544     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.17137      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.03331      0.00000      0.00000      0.00000     -0.04190      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.11928      0.05748      0.00000      0.00000     -0.00000      1.03938     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.49237      0.00000      0.00000      0.00000      0.14877      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.21360      0.00000     -0.00000      0.00000     -0.01786      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.54874     17.68519 \n    -0.00000      0.00000      0.00000      0.00000      0.05021     -0.00000      0.00000      0.00000      1.07890     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.52841      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.10576      0.00000     -0.00000      0.00000      0.13377     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.05021     -0.00000      0.00000     -0.00000      1.07890      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.52841     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.10576     -0.00000      0.00000     -0.00000      0.13377     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.05021      0.00000     -0.00000      0.00000      1.07890      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.52841      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.10576     -0.00000     -0.00000     -0.00000      0.13377     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.08639     -0.05023     -0.00000     -0.00000      0.00000      0.15861     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.17098     -0.00000     -0.00000     -0.00000     -0.42050     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.10384      0.00000      0.00000     -0.00000      1.43677      0.00000      0.00000      0.00000     -0.00000      0.00000      4.91437      6.46336 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.01181     -0.00000      0.00000      0.00000      0.01595      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.09203     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.26842     -0.00000      0.00000     -0.00000     -0.35309      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.01181     -0.00000      0.00000     -0.00000      0.01595     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.09203      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.26842      0.00000     -0.00000      0.00000     -0.35309      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.01181      0.00000     -0.00000      0.00000      0.01595     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.09203     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.26842      0.00000      0.00000      0.00000     -0.35309      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00801      0.00410      0.00000      0.00000     -0.00000      0.00011     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00531     -0.00000     -0.00000      0.00000      0.68772      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      2.74213      0.00000     -0.00000      0.00000      5.12643      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.74697     -0.42338 \n    -0.00000      0.00000      0.00000      0.00000      0.00420      0.00000     -0.00000     -0.00000     -0.00114     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.06176     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.51950      0.00000     -0.00000     -0.00000      1.63455     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00420      0.00000     -0.00000      0.00000     -0.00114     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.06176     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.51950     -0.00000      0.00000     -0.00000      1.63455     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00420      0.00000     -0.00000     -0.00000     -0.00114     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.06176      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.51950     -0.00000     -0.00000     -0.00000      1.63455     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00237     -0.00107     -0.00000     -0.00000      0.00000     -0.00001      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00069      0.00000      0.00000     -0.00000      0.34023      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -2.42159     -0.00000     -0.00000     -0.00000     -1.97382     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.52925      0.11691 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00236     -0.00000      0.00000      0.00000      0.00052      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.02514      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.56074      0.00000     -0.00000      0.00000     -1.55721     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00236     -0.00000      0.00000     -0.00000      0.00052     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02514      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.56074      0.00000      0.00000      0.00000     -1.55721     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00236     -0.00000      0.00000      0.00000      0.00052      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02514     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.56074      0.00000      0.00000     -0.00000     -1.55721     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.07033      0.00029      0.00000      0.00000     -0.00000      0.00918     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.97696     -0.01475      0.00000     -0.00000      0.00000      0.00407      0.00000     -0.00000     -0.00000      0.00000     -0.23195     -0.00000      0.00000     -0.00000     -0.00312     -0.00000     -0.00000      0.00000     -0.01662     -0.00000      0.00000     -0.00000      0.00000     -0.31143     -0.05970     -8.90996 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.69214     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.40176      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.53942      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.69214     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.40176      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.53942     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.07033      0.00029      0.00000      0.00000     -0.00000      0.00918     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.84607      0.00000     -0.48848     -0.01475     -0.00000      0.00000      0.00000      0.00407      0.00000     -0.00000     -0.20088      0.00000      0.11598      0.00000     -0.00000      0.00000     -0.00312      0.00000      0.00000     -0.00000     -0.01662      0.00000     -0.00000     -0.26971      0.00000      0.15572     -0.05970     -8.90996 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.69214      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.40176     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.53942      0.00000     -0.00000     -0.00000 \n    -0.07033      0.00029      0.00000      0.00000     -0.00000      0.00918     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.84607      0.00000     -0.48847     -0.01475     -0.00000      0.00000      0.00000      0.00407      0.00000     -0.00000      0.20088     -0.00000      0.11598     -0.00000      0.00000     -0.00000     -0.00312     -0.00000      0.00000      0.00000     -0.01662     -0.00000     -0.00000      0.26971     -0.00000      0.15572     -0.05970     -8.90996 \n    -0.03274      0.01910      0.00000      0.00000     -0.00000     -0.04678      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.07630     -0.04052      0.00000     -0.00000      0.00000      0.03738      0.00000     -0.00000      0.00000     -0.00000      0.59979      0.00000     -0.00000      0.00000      0.03855      0.00000      0.00000     -0.00000     -0.26604      0.00000     -0.00000      0.00000     -0.00000      1.04897     -2.41125     -2.35323 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.13216     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.03887     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.81687     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.13216      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.03887     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.81687      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.03274      0.01910      0.00000      0.00000     -0.00000     -0.04678      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06608     -0.00000     -0.03815     -0.04052     -0.00000      0.00000     -0.00000      0.03738      0.00000     -0.00000      0.51943     -0.00000     -0.29990     -0.00000      0.00000     -0.00000      0.03855     -0.00000     -0.00000      0.00000     -0.26604     -0.00000      0.00000      0.90843     -0.00000     -0.52449     -2.41125     -2.35323 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.13216     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.03887      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.81687     -0.00000      0.00000      0.00000 \n    -0.03274      0.01910      0.00000      0.00000     -0.00000     -0.04678      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06608     -0.00000     -0.03815     -0.04052     -0.00000      0.00000      0.00000      0.03738      0.00000     -0.00000     -0.51944      0.00000     -0.29990      0.00000     -0.00000      0.00000      0.03855      0.00000     -0.00000     -0.00000     -0.26604      0.00000      0.00000     -0.90844      0.00000     -0.52448     -2.41125     -2.35323 \n     0.00431     -0.00238     -0.00000     -0.00000      0.00000     -0.00051      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.01888      0.00466     -0.00000      0.00000     -0.00000      0.01996      0.00000     -0.00000      0.00000     -0.00000      0.57438      0.00000     -0.00000      0.00000     -0.25566      0.00000      0.00000     -0.00000     -1.73119      0.00000     -0.00000     -0.00000      0.00000     -1.01053      0.90895      0.23501 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.03271      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.99486      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.75029      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.03271     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.99486      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.75029      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00431     -0.00238     -0.00000     -0.00000      0.00000     -0.00051      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01635     -0.00000      0.00944      0.00466      0.00000     -0.00000     -0.00000      0.01996      0.00000     -0.00000      0.49743     -0.00000     -0.28719     -0.00000      0.00000     -0.00000     -0.25566     -0.00000     -0.00000      0.00000     -1.73119     -0.00000      0.00000     -0.87514      0.00000      0.50527      0.90895      0.23501 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.03271     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.99486     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.75029      0.00000     -0.00000      0.00000 \n     0.00431     -0.00238     -0.00000     -0.00000      0.00000     -0.00051      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.01635     -0.00000      0.00944      0.00466      0.00000     -0.00000     -0.00000      0.01996      0.00000     -0.00000     -0.49743      0.00000     -0.28719      0.00000     -0.00000      0.00000     -0.25566      0.00000     -0.00000     -0.00000     -1.73119      0.00000      0.00000      0.87515     -0.00000      0.50526      0.90895      0.23501 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Nb\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.18241     -0.68736      0.00000      0.00000      0.00000      0.54520      0.00000      0.00000      0.00000      0.07473      0.00000      0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000      0.01310      0.00000      0.00000      0.00000     -0.13341      0.00000      0.00000     -0.13341      0.00000     -0.13341     -0.07237      0.00000      0.00000     -0.07237      0.00000     -0.07237      0.01189      0.00000      0.00000      0.01189      0.00000      0.01189 \n    -0.68736      2.69632      0.00000      0.00000      0.00000     -1.15316      0.00000      0.00000      0.00000      0.31909      0.00000      0.00000      0.00000     -0.05410      0.00000      0.00000      0.00000     -0.03390      0.00000      0.00000      0.00000     -0.03137      0.00000      0.00000     -0.03137      0.00000     -0.03137      0.05634      0.00000      0.00000      0.05634      0.00000      0.05634     -0.00453      0.00000      0.00000     -0.00453      0.00000     -0.00453 \n     0.00000      0.00000      2.42415      0.00000      0.00000      0.00000     -1.11269      0.00000      0.00000      0.00000      0.35533      0.00000      0.00000      0.00000      0.03085      0.00000      0.00000      0.00000     -0.01370      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.42415      0.00000      0.00000      0.00000     -1.11269      0.00000      0.00000      0.00000      0.35533      0.00000      0.00000      0.00000      0.03085      0.00000      0.00000      0.00000     -0.01370      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.42415      0.00000      0.00000      0.00000     -1.11269      0.00000      0.00000      0.00000      0.35533      0.00000      0.00000      0.00000      0.03085      0.00000      0.00000      0.00000     -0.01370      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.54520     -1.15316      0.00000      0.00000      0.00000      2.75594      0.00000      0.00000      0.00000     -0.94432      0.00000      0.00000      0.00000      0.15252      0.00000      0.00000      0.00000      0.08010      0.00000      0.00000      0.00000      0.01660      0.00000      0.00000      0.01660      0.00000      0.01660     -0.05687      0.00000      0.00000     -0.05687      0.00000     -0.05687     -0.00004      0.00000      0.00000     -0.00004      0.00000     -0.00004 \n     0.00000      0.00000     -1.11269      0.00000      0.00000      0.00000      2.94791      0.00000      0.00000      0.00000     -1.18200      0.00000      0.00000      0.00000     -0.06901      0.00000      0.00000      0.00000      0.02800      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.11269      0.00000      0.00000      0.00000      2.94791      0.00000      0.00000      0.00000     -1.18200      0.00000      0.00000      0.00000     -0.06901      0.00000      0.00000      0.00000      0.02800      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.11269      0.00000      0.00000      0.00000      2.94791      0.00000      0.00000      0.00000     -1.18200      0.00000      0.00000      0.00000     -0.06901      0.00000      0.00000      0.00000      0.02800      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07473      0.31909      0.00000      0.00000      0.00000     -0.94432      0.00000      0.00000      0.00000      2.98468      0.00000      0.00000      0.00000     -0.44521      0.00000      0.00000      0.00000     -0.21110      0.00000      0.00000      0.00000     -0.04133      0.00000      0.00000     -0.04133      0.00000     -0.04133     -0.11275      0.00000      0.00000     -0.11275      0.00000     -0.11275      0.01226      0.00000      0.00000      0.01226      0.00000      0.01226 \n     0.00000      0.00000      0.35533      0.00000      0.00000      0.00000     -1.18200      0.00000      0.00000      0.00000      2.42643      0.00000      0.00000      0.00000      0.13617      0.00000      0.00000      0.00000     -0.05547      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.35533      0.00000      0.00000      0.00000     -1.18200      0.00000      0.00000      0.00000      2.42643      0.00000      0.00000      0.00000      0.13617      0.00000      0.00000      0.00000     -0.05547      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.35533      0.00000      0.00000      0.00000     -1.18200      0.00000      0.00000      0.00000      2.42643      0.00000      0.00000      0.00000      0.13617      0.00000      0.00000      0.00000     -0.05547      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00451     -0.05410      0.00000      0.00000      0.00000      0.15252      0.00000      0.00000      0.00000     -0.44521      0.00000      0.00000      0.00000      0.67746      0.00000      0.00000      0.00000      0.35503      0.00000      0.00000      0.00000      0.00513      0.00000      0.00000      0.00513      0.00000      0.00513      0.03405      0.00000      0.00000      0.03404      0.00000      0.03405      0.02478      0.00000      0.00000      0.02479      0.00000      0.02478 \n     0.00000      0.00000      0.03085      0.00000      0.00000      0.00000     -0.06901      0.00000      0.00000      0.00000      0.13617      0.00000      0.00000      0.00000      0.00769      0.00000      0.00000      0.00000     -0.00314      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03085      0.00000      0.00000      0.00000     -0.06901      0.00000      0.00000      0.00000      0.13617      0.00000      0.00000      0.00000      0.00769      0.00000      0.00000      0.00000     -0.00314      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03085      0.00000      0.00000      0.00000     -0.06901      0.00000      0.00000      0.00000      0.13617      0.00000      0.00000      0.00000      0.00769      0.00000      0.00000      0.00000     -0.00314      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01310     -0.03390      0.00000      0.00000      0.00000      0.08010      0.00000      0.00000      0.00000     -0.21110      0.00000      0.00000      0.00000      0.35503      0.00000      0.00000      0.00000      0.19285      0.00000      0.00000      0.00000      0.00156      0.00000      0.00000      0.00156      0.00000      0.00156      0.01565      0.00000      0.00000      0.01565      0.00000      0.01565      0.01089      0.00000      0.00000      0.01089      0.00000      0.01089 \n     0.00000      0.00000     -0.01370      0.00000      0.00000      0.00000      0.02800      0.00000      0.00000      0.00000     -0.05547      0.00000      0.00000      0.00000     -0.00314      0.00000      0.00000      0.00000      0.00128      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01370      0.00000      0.00000      0.00000      0.02800      0.00000      0.00000      0.00000     -0.05547      0.00000      0.00000      0.00000     -0.00314      0.00000      0.00000      0.00000      0.00128      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01370      0.00000      0.00000      0.00000      0.02800      0.00000      0.00000      0.00000     -0.05547      0.00000      0.00000      0.00000     -0.00314      0.00000      0.00000      0.00000      0.00128      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.13341     -0.03137      0.00000      0.00000      0.00000      0.01660      0.00000      0.00000      0.00000     -0.04133      0.00000      0.00000      0.00000      0.00513      0.00000      0.00000      0.00000      0.00156      0.00000      0.00000      0.00000      1.96414      0.00000      0.00000     -0.96608      0.00000     -0.96609      0.03800      0.00000      0.00000     -0.01291      0.00000     -0.01291     -0.12700      0.00000      0.00000      0.06224      0.00000      0.06224 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.86049      0.00000      0.00000      0.00000      0.00000      0.00000      0.10183      0.00000      0.00000      0.00000      0.00000      0.00000     -0.37848      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.86049      0.00000      0.00000      0.00000      0.00000      0.00000      0.10183      0.00000      0.00000      0.00000      0.00000      0.00000     -0.37848      0.00000      0.00000      0.00000 \n    -0.13341     -0.03137      0.00000      0.00000      0.00000      0.01660      0.00000      0.00000      0.00000     -0.04133      0.00000      0.00000      0.00000      0.00513      0.00000      0.00000      0.00000      0.00156      0.00000      0.00000      0.00000     -0.96608      0.00000      0.00000      1.96416      0.00000     -0.96609     -0.01291      0.00000      0.00000      0.03799      0.00000     -0.01290      0.06224      0.00000      0.00000     -0.12700      0.00000      0.06224 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.86049      0.00000      0.00000      0.00000      0.00000      0.00000      0.10183      0.00000      0.00000      0.00000      0.00000      0.00000     -0.37848      0.00000 \n    -0.13341     -0.03137      0.00000      0.00000      0.00000      0.01660      0.00000      0.00000      0.00000     -0.04133      0.00000      0.00000      0.00000      0.00513      0.00000      0.00000      0.00000      0.00156      0.00000      0.00000      0.00000     -0.96609      0.00000      0.00000     -0.96609      0.00000      1.96414     -0.01291      0.00000      0.00000     -0.01291      0.00000      0.03799      0.06224      0.00000      0.00000      0.06223      0.00000     -0.12700 \n    -0.07237      0.05634      0.00000      0.00000      0.00000     -0.05687      0.00000      0.00000      0.00000     -0.11275      0.00000      0.00000      0.00000      0.03405      0.00000      0.00000      0.00000      0.01565      0.00000      0.00000      0.00000      0.03800      0.00000      0.00000     -0.01291      0.00000     -0.01291      0.32514      0.00000      0.00000     -0.14801      0.00000     -0.14801      0.23442      0.00000      0.00000     -0.11689      0.00000     -0.11689 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10183      0.00000      0.00000      0.00000      0.00000      0.00000      0.94631      0.00000      0.00000      0.00000      0.00000      0.00000      0.70262      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10183      0.00000      0.00000      0.00000      0.00000      0.00000      0.94631      0.00000      0.00000      0.00000      0.00000      0.00000      0.70262      0.00000      0.00000      0.00000 \n    -0.07237      0.05634      0.00000      0.00000      0.00000     -0.05687      0.00000      0.00000      0.00000     -0.11275      0.00000      0.00000      0.00000      0.03404      0.00000      0.00000      0.00000      0.01565      0.00000      0.00000      0.00000     -0.01291      0.00000      0.00000      0.03799      0.00000     -0.01291     -0.14801      0.00000      0.00000      0.32515      0.00000     -0.14801     -0.11689      0.00000      0.00000      0.23442      0.00000     -0.11689 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10183      0.00000      0.00000      0.00000      0.00000      0.00000      0.94631      0.00000      0.00000      0.00000      0.00000      0.00000      0.70262      0.00000 \n    -0.07237      0.05634      0.00000      0.00000      0.00000     -0.05687      0.00000      0.00000      0.00000     -0.11275      0.00000      0.00000      0.00000      0.03405      0.00000      0.00000      0.00000      0.01565      0.00000      0.00000      0.00000     -0.01291      0.00000      0.00000     -0.01290      0.00000      0.03799     -0.14801      0.00000      0.00000     -0.14801      0.00000      0.32515     -0.11689      0.00000      0.00000     -0.11689      0.00000      0.23442 \n     0.01189     -0.00453      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.01226      0.00000      0.00000      0.00000      0.02478      0.00000      0.00000      0.00000      0.01089      0.00000      0.00000      0.00000     -0.12700      0.00000      0.00000      0.06224      0.00000      0.06224      0.23442      0.00000      0.00000     -0.11689      0.00000     -0.11689      0.18783      0.00000      0.00000     -0.09067      0.00000     -0.09067 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.37848      0.00000      0.00000      0.00000      0.00000      0.00000      0.70262      0.00000      0.00000      0.00000      0.00000      0.00000      0.55699      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.37848      0.00000      0.00000      0.00000      0.00000      0.00000      0.70262      0.00000      0.00000      0.00000      0.00000      0.00000      0.55699      0.00000      0.00000      0.00000 \n     0.01189     -0.00453      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.01226      0.00000      0.00000      0.00000      0.02479      0.00000      0.00000      0.00000      0.01089      0.00000      0.00000      0.00000      0.06224      0.00000      0.00000     -0.12700      0.00000      0.06223     -0.11689      0.00000      0.00000      0.23442      0.00000     -0.11689     -0.09067      0.00000      0.00000      0.18783      0.00000     -0.09067 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.37848      0.00000      0.00000      0.00000      0.00000      0.00000      0.70262      0.00000      0.00000      0.00000      0.00000      0.00000      0.55699      0.00000 \n     0.01189     -0.00453      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.01226      0.00000      0.00000      0.00000      0.02478      0.00000      0.00000      0.00000      0.01089      0.00000      0.00000      0.00000      0.06224      0.00000      0.00000      0.06224      0.00000     -0.12700     -0.11689      0.00000      0.00000     -0.11689      0.00000      0.23442     -0.09067      0.00000      0.00000     -0.09067      0.00000      0.18783 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.67054      0.66589      0.66589      0.66589      0.66589      0.66589      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.84504      0.03099      0.03099      0.03099      0.03099      0.03099      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -669.84110    -92.66280    -84.90051    -84.90051    -84.90051    -15.56046    -12.51650    -12.51650    -12.51650     -7.50718     -7.50718     -7.50718     -7.50718     -7.50718     -2.10085     -1.26171     -1.26171     -1.26171     -0.15748     -0.15730     -0.15730     -0.15730     -0.15730     -0.15730     -0.04462     -0.04462     -0.04462      0.03338      0.07693      0.07693      0.07693      0.34248      0.61304      0.61304      0.61304      0.61304      0.61304      1.95062    108.35360 \n   </alphaeps>\n   <betaeps>\n  -669.84100    -92.65351    -84.89373    -84.89373    -84.89373    -15.55303    -12.50807    -12.50807    -12.50807     -7.49685     -7.49685     -7.49685     -7.49685     -7.49685     -2.04017     -1.19497     -1.19497     -1.19497     -0.13230     -0.09155     -0.09155     -0.09155     -0.09155     -0.09155     -0.03758     -0.03758     -0.03758      0.04001      0.08774      0.08774      0.08774      0.36009      0.65683      0.65683      0.65683      0.65683      0.65683      2.00124    108.38040 \n   </betaeps>\n   <alphavectors>\n     0.97811     -0.33469      0.00000      0.00000     -0.00000      0.13839     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05592     -0.00000     -0.00000      0.00000      0.01692      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01209     -0.00000      0.00000     -0.00000     -0.01656     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.06255     -0.50923 \n     0.08148      1.01530     -0.00000     -0.00000      0.00000     -0.50862      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.22076      0.00000      0.00000     -0.00000     -0.06567     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01347      0.00000     -0.00000      0.00000      0.12204      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.25669      2.66165 \n     0.00000      0.00000      0.97921      0.00000     -0.00000     -0.00000      0.00000     -0.47037      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.17881      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.03562     -0.00000      0.00000     -0.00000     -0.04156     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.97921     -0.00000      0.00000      0.00000     -0.47037      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17881     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03562     -0.00000     -0.00000      0.00000     -0.04156      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.97921     -0.00000     -0.00000     -0.47037     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.17881      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.03562      0.00000      0.00000     -0.00000     -0.04156     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.12153      0.06151     -0.00000     -0.00000      0.00000      1.03985     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.50786     -0.00000     -0.00000      0.00000      0.16364      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.20572     -0.00000      0.00000     -0.00000     -0.00988     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.56013     17.98784 \n     0.00000      0.00000      0.05154     -0.00000      0.00000      0.00000     -0.00000      1.08070     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.55082     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.11317      0.00000     -0.00000      0.00000      0.13276      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.05154      0.00000     -0.00000     -0.00000      1.08070      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.55082      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.11317      0.00000      0.00000     -0.00000      0.13276     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.05154      0.00000      0.00000      1.08070      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.55082      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.11317     -0.00000     -0.00000      0.00000      0.13276      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.07311     -0.04332      0.00000      0.00000     -0.00000      0.15241     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.14099      0.00000      0.00000     -0.00000     -0.45077     -0.00000     -0.00000     -0.00001      0.00000     -0.00000      0.00000      0.00000      0.00000      0.13547      0.00000     -0.00000      0.00000      1.62465      0.00000     -0.00000      0.00000     -0.00000      0.00000      4.46191      5.18944 \n    -0.00000     -0.00000     -0.01245     -0.00000      0.00000      0.00000     -0.00000      0.01503      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.10138      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.27825     -0.00000      0.00000     -0.00000     -0.33845      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.01245      0.00000     -0.00000     -0.00000      0.01503     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.10138     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.27825     -0.00000     -0.00000      0.00000     -0.33845      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.01245      0.00000      0.00000      0.01503     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.10138     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.27825      0.00000      0.00000     -0.00000     -0.33845     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00882      0.00449     -0.00000     -0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00835     -0.00000     -0.00000      0.00000      0.67758      0.00000      0.00000      0.00001     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.68715     -0.00000      0.00000     -0.00000      5.67877      0.00000      0.00000      0.00000      0.00000     -0.00000     -2.07507     -0.48375 \n     0.00000      0.00000      0.00417      0.00000     -0.00000     -0.00000      0.00000     -0.00066      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.06172     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.58308      0.00000     -0.00000      0.00000      1.55889      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00417     -0.00000      0.00000      0.00000     -0.00066      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06172      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.58308     -0.00000      0.00000     -0.00000      1.55889      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00417     -0.00000     -0.00000     -0.00066     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06172      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.58308     -0.00000     -0.00000      0.00000      1.55889     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00213     -0.00093      0.00000      0.00000     -0.00000      0.00117     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00307      0.00000      0.00000     -0.00000      0.28250      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -2.35254     -0.00000      0.00000     -0.00000     -2.01550     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.55281      0.11093 \n    -0.00000     -0.00000     -0.00229     -0.00000      0.00000      0.00000     -0.00000      0.00025     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.02544     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.50247     -0.00000      0.00000     -0.00000     -1.52657     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00229      0.00000     -0.00000     -0.00000      0.00025     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02544      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.50247      0.00000      0.00000     -0.00000     -1.52657     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00229      0.00000      0.00000      0.00025      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.02544     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.50247      0.00000      0.00000     -0.00000     -1.52657     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.07101     -0.00188      0.00000      0.00000     -0.00000      0.00928     -0.00000     -0.00000     -0.00000     -0.47514      0.85433     -0.00000      0.00000      0.00000     -0.01391     -0.00000     -0.00000      0.00000      0.00420     -0.21172      0.00000      0.12232     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00397      0.00000     -0.00000      0.00000     -0.01869     -0.25452     -0.00000      0.14700      0.00000     -0.00000     -0.05004     -9.00479 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.69320     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.42351      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.50909     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.69320      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.42351     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.50909     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.07101     -0.00188      0.00000      0.00000     -0.00000      0.00928     -0.00000     -0.00000     -0.00000      0.97744     -0.01568     -0.00000      0.00000      0.00000     -0.01391     -0.00000     -0.00000     -0.00000      0.00421     -0.00008      0.00000     -0.24452      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00397     -0.00000      0.00000     -0.00000     -0.01869     -0.00004     -0.00000     -0.29392     -0.00000      0.00000     -0.05004     -9.00479 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.69320      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.42351      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.50909      0.00000      0.00000      0.00000 \n    -0.07101     -0.00188      0.00000      0.00000     -0.00000      0.00928     -0.00000     -0.00000     -0.00000     -0.50230     -0.83865     -0.00000      0.00000      0.00000     -0.01391     -0.00000     -0.00000      0.00000      0.00420      0.21180      0.00000      0.12219     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00397      0.00000     -0.00000      0.00000     -0.01869      0.25456      0.00000      0.14692     -0.00000      0.00000     -0.05004     -9.00479 \n    -0.02741      0.01620     -0.00000     -0.00000      0.00000     -0.04437      0.00000      0.00000      0.00000     -0.03663      0.06586      0.00000     -0.00000     -0.00000     -0.02628     -0.00000     -0.00000     -0.00000      0.04291      0.57263      0.00000     -0.33084      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00100     -0.00000      0.00000     -0.00000     -0.42463      0.86936      0.00000     -0.50209     -0.00000      0.00000     -2.21057     -1.86363 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.13053      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.14547     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73886      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.13053     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.14547      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73886      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.02741      0.01620     -0.00000     -0.00000      0.00000     -0.04437      0.00000      0.00000      0.00000      0.07535     -0.00121      0.00000     -0.00000     -0.00000     -0.02628     -0.00000     -0.00000      0.00000      0.04289      0.00020      0.00000      0.66134     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00100      0.00000     -0.00000      0.00000     -0.42463      0.00015      0.00000      1.00393      0.00000     -0.00000     -2.21057     -1.86363 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13053     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.14547     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73886     -0.00000     -0.00000     -0.00000 \n    -0.02741      0.01620     -0.00000     -0.00000      0.00000     -0.04437      0.00000      0.00000      0.00000     -0.03872     -0.06465      0.00000     -0.00000     -0.00000     -0.02628     -0.00000     -0.00000     -0.00000      0.04291     -0.57284      0.00000     -0.33049      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00100     -0.00000      0.00000     -0.00000     -0.42463     -0.86950     -0.00000     -0.50184      0.00000     -0.00000     -2.21057     -1.86363 \n     0.00513     -0.00281      0.00000      0.00000     -0.00000      0.00240     -0.00000     -0.00000     -0.00000      0.00960     -0.01726     -0.00000      0.00000      0.00000      0.01150      0.00000      0.00000     -0.00000      0.05181      0.44543      0.00000     -0.25735      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.27188     -0.00000      0.00000     -0.00000     -1.89727     -0.89819     -0.00000      0.51875      0.00000     -0.00000      1.08042      0.28791 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.03422     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.89102      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.79654      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03422      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.89102     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.79654     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00513     -0.00281      0.00000      0.00000     -0.00000      0.00240     -0.00000     -0.00000     -0.00000     -0.01975      0.00032     -0.00000      0.00000      0.00000      0.01150      0.00000      0.00000      0.00000      0.05180      0.00016      0.00000      0.51443     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.27188      0.00000     -0.00000      0.00000     -1.89727     -0.00015     -0.00000     -1.03723      0.00000      0.00000      1.08042      0.28791 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.03422     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.89102      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.79654      0.00000     -0.00000     -0.00000 \n     0.00513     -0.00281      0.00000      0.00000     -0.00000      0.00240     -0.00000     -0.00000     -0.00000      0.01015      0.01695     -0.00000      0.00000      0.00000      0.01150      0.00000      0.00000     -0.00000      0.05181     -0.44559      0.00000     -0.25708      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.27188     -0.00000      0.00000     -0.00000     -1.89727      0.89834      0.00000      0.51848     -0.00000      0.00000      1.08042      0.28791 \n   </alphavectors>\n   <betavectors>\n     0.97811     -0.33470     -0.00000      0.00000      0.00000      0.13841     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05619      0.00000      0.00000     -0.00000      0.01494      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.01256     -0.00000     -0.00000     -0.00000     -0.01700     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06245     -0.50923 \n     0.08148      1.01536      0.00000     -0.00000     -0.00000     -0.50870      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.22193     -0.00000     -0.00000      0.00000     -0.05860     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.01311      0.00000      0.00000      0.00000      0.12229      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.25660      2.66168 \n     0.00000      0.00000      0.00000     -0.00000      0.97923     -0.00000      0.00000     -0.47042     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.17857      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.03194      0.00000      0.00000      0.00000     -0.04449     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.97923     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.47042      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.17857     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.03194      0.00000     -0.00000     -0.00000     -0.04449     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.97923      0.00000     -0.00000     -0.47042      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.17857     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.03194     -0.00000     -0.00000      0.00000     -0.04449     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.12152      0.06175      0.00000     -0.00000     -0.00000      1.04019     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.51198      0.00000      0.00000     -0.00000      0.14401      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.21689     -0.00000     -0.00000     -0.00000     -0.01948     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.55957     17.98775 \n     0.00000      0.00000      0.00000     -0.00000      0.05150      0.00000     -0.00000      1.08096      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.55028     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.10146     -0.00000     -0.00000     -0.00000      0.14208      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.05150      0.00000      0.00000     -0.00000      0.00000      0.00000      1.08096     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.55028      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.10146     -0.00000      0.00000      0.00000      0.14208      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.05150     -0.00000      0.00000      1.08096     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.55028      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.10146      0.00000      0.00000     -0.00000      0.14208     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07311     -0.04318     -0.00000      0.00000      0.00000      0.15156     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.16523     -0.00000     -0.00000      0.00000     -0.38947     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.17330      0.00000      0.00000      0.00000      1.59768     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      4.46937      5.18987 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.01243      0.00000     -0.00000      0.01450     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.10120      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.24836      0.00000      0.00000      0.00000     -0.36151     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.01243      0.00000      0.00000     -0.00000      0.00000      0.00000      0.01450      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.10120     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.24836      0.00000     -0.00000     -0.00000     -0.36151     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.01243     -0.00000      0.00000      0.01450      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.10120     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.24836     -0.00000     -0.00000      0.00000     -0.36151     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00882      0.00447      0.00000     -0.00000     -0.00000     -0.00456      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00882      0.00000      0.00000     -0.00000      0.66100      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      2.95010      0.00000     -0.00000     -0.00000      5.56202     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -2.03918     -0.48365 \n     0.00000      0.00000      0.00000     -0.00000      0.00417     -0.00000      0.00000     -0.00055     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.06204     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.44436     -0.00000     -0.00000     -0.00000      1.60394      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00417     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00055     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.06204     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.44436     -0.00000      0.00000     -0.00000      1.60394      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00417      0.00000     -0.00000     -0.00055      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.06204      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.44436      0.00000      0.00000     -0.00000      1.60394      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00213     -0.00092     -0.00000      0.00000      0.00000      0.00119     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00314      0.00000     -0.00000     -0.00000      0.40601      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -2.39611     -0.00000     -0.00000     -0.00000     -1.94454      0.00000      0.00000      0.00000      0.00000     -0.00000      0.54282      0.11092 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00229      0.00000     -0.00000      0.00019      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02499      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.63417      0.00000      0.00000      0.00000     -1.47674      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00229      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00019      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02499      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.63417     -0.00000      0.00000      0.00000     -1.47674     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00229     -0.00000      0.00000      0.00019     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02499      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.63417     -0.00000     -0.00000      0.00000     -1.47674      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.07100     -0.00202     -0.00000      0.00000      0.00000      0.00925     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.84680      0.00000     -0.48906     -0.01348      0.00000      0.00000      0.00000      0.00328      0.00000     -0.00000      0.11940      0.00000     -0.20785     -0.00000      0.00000      0.00000     -0.00485     -0.00000     -0.00000      0.00000     -0.01768      0.00000     -0.00000      0.14835      0.00000     -0.25709     -0.04966     -9.00479 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.69375      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.41518     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.51411      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.69375      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.41518     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.51411     -0.00000      0.00000      0.00000 \n    -0.07100     -0.00202     -0.00000      0.00000      0.00000      0.00925     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00014      0.00000      0.97789     -0.01348      0.00000     -0.00000     -0.00000      0.00328     -0.00000      0.00000     -0.23970     -0.00000      0.00052      0.00000     -0.00000     -0.00000     -0.00485      0.00000     -0.00000     -0.00000     -0.01768     -0.00000      0.00000     -0.29682     -0.00000      0.00007     -0.04966     -9.00479 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.69375     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.41518     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.51411      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.07100     -0.00202     -0.00000      0.00000      0.00000      0.00925     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.84694      0.00000     -0.48882     -0.01348     -0.00000      0.00000      0.00000      0.00328      0.00000     -0.00000      0.12030     -0.00000      0.20733     -0.00000      0.00000      0.00000     -0.00485     -0.00000      0.00000      0.00000     -0.01768      0.00000     -0.00000      0.14847     -0.00000      0.25702     -0.04966     -9.00479 \n    -0.02741      0.01615      0.00000     -0.00000     -0.00000     -0.04419      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06443     -0.00000     -0.03721     -0.03715     -0.00000      0.00000      0.00000      0.02323      0.00000      0.00000     -0.32240     -0.00000      0.56124      0.00000     -0.00000     -0.00000     -0.01761      0.00000      0.00000     -0.00000     -0.40811     -0.00000      0.00000     -0.50636     -0.00000      0.87753     -2.21363     -1.86377 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.12887      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.12107      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.75481     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.12887     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.12107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.75481      0.00000     -0.00000     -0.00000 \n    -0.02741      0.01615      0.00000     -0.00000     -0.00000     -0.04419      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00001     -0.00000      0.07440     -0.03715     -0.00000      0.00000      0.00000      0.02323      0.00000      0.00000      0.64725      0.00000     -0.00141     -0.00000      0.00000      0.00000     -0.01761     -0.00000      0.00000      0.00000     -0.40811      0.00000     -0.00000      1.01314      0.00000     -0.00024     -2.21363     -1.86377 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.12887      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.12107      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.75481     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02741      0.01615      0.00000     -0.00000     -0.00000     -0.04419      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06444     -0.00000     -0.03719     -0.03715      0.00000      0.00000     -0.00000      0.02323      0.00000      0.00000     -0.32485      0.00000     -0.55983      0.00000     -0.00000     -0.00000     -0.01761      0.00000     -0.00000     -0.00000     -0.40811     -0.00000      0.00000     -0.50678      0.00000     -0.87728     -2.21363     -1.86377 \n     0.00513     -0.00280     -0.00000      0.00000      0.00000      0.00243     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.01697      0.00000      0.00980      0.01202      0.00000     -0.00000     -0.00000      0.00284      0.00000      0.00000     -0.26345     -0.00000      0.45862      0.00000     -0.00000     -0.00000     -0.33800      0.00000      0.00000     -0.00000     -1.89539     -0.00000      0.00000      0.51475      0.00000     -0.89207      1.06622      0.28786 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.03393     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.91609     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.78389      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.03393     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.91609      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.78389     -0.00000      0.00000      0.00000 \n     0.00513     -0.00280     -0.00000      0.00000      0.00000      0.00243     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01959      0.01202     -0.00000     -0.00000      0.00000      0.00284      0.00000      0.00000      0.52890      0.00000     -0.00115     -0.00000      0.00000      0.00000     -0.33800     -0.00000      0.00000      0.00000     -1.89539      0.00000     -0.00000     -1.02993     -0.00000      0.00025      1.06622      0.28786 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.03393      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.91609     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.78389     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00513     -0.00280     -0.00000      0.00000      0.00000      0.00243     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.01697      0.00000      0.00979      0.01202     -0.00000     -0.00000      0.00000      0.00284      0.00000      0.00000     -0.26545      0.00000     -0.45747      0.00000     -0.00000     -0.00000     -0.33800      0.00000     -0.00000     -0.00000     -1.89539     -0.00000      0.00000      0.51518     -0.00000      0.89182      1.06622      0.28786 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mo\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.18074     -0.68327      0.00000      0.00000      0.00000      0.59057      0.00000      0.00000      0.00000      0.09246      0.00000      0.00000      0.00000     -0.00644      0.00000      0.00000      0.00000      0.00978      0.00000      0.00000      0.00000     -0.15361      0.00000      0.00000     -0.15361      0.00000     -0.15361     -0.07986      0.00000      0.00000     -0.07986      0.00000     -0.07986      0.00971      0.00000      0.00000      0.00971      0.00000      0.00971 \n    -0.68327      2.70933      0.00000      0.00000      0.00000     -1.16571      0.00000      0.00000      0.00000      0.30636      0.00000      0.00000      0.00000     -0.03684      0.00000      0.00000      0.00000     -0.02201      0.00000      0.00000      0.00000     -0.03319      0.00000      0.00000     -0.03319      0.00000     -0.03319      0.06271      0.00000      0.00000      0.06271      0.00000      0.06271     -0.00162      0.00000      0.00000     -0.00162      0.00000     -0.00162 \n     0.00000      0.00000      2.43478      0.00000      0.00000      0.00000     -1.13555      0.00000      0.00000      0.00000      0.37185      0.00000      0.00000      0.00000      0.03179      0.00000      0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.43478      0.00000      0.00000      0.00000     -1.13555      0.00000      0.00000      0.00000      0.37185      0.00000      0.00000      0.00000      0.03179      0.00000      0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.43478      0.00000      0.00000      0.00000     -1.13555      0.00000      0.00000      0.00000      0.37185      0.00000      0.00000      0.00000      0.03179      0.00000      0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.59057     -1.16571      0.00000      0.00000      0.00000      2.81038      0.00000      0.00000      0.00000     -0.92270      0.00000      0.00000      0.00000      0.10644      0.00000      0.00000      0.00000      0.05168      0.00000      0.00000      0.00000      0.00510      0.00000      0.00000      0.00510      0.00000      0.00510     -0.06963      0.00000      0.00000     -0.06963      0.00000     -0.06963     -0.00429      0.00000      0.00000     -0.00429      0.00000     -0.00429 \n     0.00000      0.00000     -1.13555      0.00000      0.00000      0.00000      2.99772      0.00000      0.00000      0.00000     -1.23406      0.00000      0.00000      0.00000     -0.07322      0.00000      0.00000      0.00000      0.02941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.13555      0.00000      0.00000      0.00000      2.99772      0.00000      0.00000      0.00000     -1.23406      0.00000      0.00000      0.00000     -0.07322      0.00000      0.00000      0.00000      0.02941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.13555      0.00000      0.00000      0.00000      2.99772      0.00000      0.00000      0.00000     -1.23406      0.00000      0.00000      0.00000     -0.07322      0.00000      0.00000      0.00000      0.02941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.09246      0.30636      0.00000      0.00000      0.00000     -0.92270      0.00000      0.00000      0.00000      2.88619      0.00000      0.00000      0.00000     -0.29013      0.00000      0.00000      0.00000     -0.12817      0.00000      0.00000      0.00000     -0.03995      0.00000      0.00000     -0.03995      0.00000     -0.03995     -0.09874      0.00000      0.00000     -0.09874      0.00000     -0.09874      0.01581      0.00000      0.00000      0.01581      0.00000      0.01581 \n     0.00000      0.00000      0.37185      0.00000      0.00000      0.00000     -1.23406      0.00000      0.00000      0.00000      2.45927      0.00000      0.00000      0.00000      0.14396      0.00000      0.00000      0.00000     -0.05842      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.37185      0.00000      0.00000      0.00000     -1.23406      0.00000      0.00000      0.00000      2.45927      0.00000      0.00000      0.00000      0.14396      0.00000      0.00000      0.00000     -0.05842      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.37185      0.00000      0.00000      0.00000     -1.23406      0.00000      0.00000      0.00000      2.45927      0.00000      0.00000      0.00000      0.14396      0.00000      0.00000      0.00000     -0.05842      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00644     -0.03684      0.00000      0.00000      0.00000      0.10644      0.00000      0.00000      0.00000     -0.29013      0.00000      0.00000      0.00000      0.47848      0.00000      0.00000      0.00000      0.22710      0.00000      0.00000      0.00000      0.00352      0.00000      0.00000      0.00352      0.00000      0.00352      0.01638      0.00000      0.00000      0.01638      0.00000      0.01638      0.01890      0.00000      0.00000      0.01890      0.00000      0.01890 \n     0.00000      0.00000      0.03179      0.00000      0.00000      0.00000     -0.07322      0.00000      0.00000      0.00000      0.14396      0.00000      0.00000      0.00000      0.00853      0.00000      0.00000      0.00000     -0.00339      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03179      0.00000      0.00000      0.00000     -0.07322      0.00000      0.00000      0.00000      0.14396      0.00000      0.00000      0.00000      0.00853      0.00000      0.00000      0.00000     -0.00339      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03179      0.00000      0.00000      0.00000     -0.07322      0.00000      0.00000      0.00000      0.14396      0.00000      0.00000      0.00000      0.00853      0.00000      0.00000      0.00000     -0.00339      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00978     -0.02201      0.00000      0.00000      0.00000      0.05168      0.00000      0.00000      0.00000     -0.12817      0.00000      0.00000      0.00000      0.22710      0.00000      0.00000      0.00000      0.10789      0.00000      0.00000      0.00000      0.00071      0.00000      0.00000      0.00071      0.00000      0.00071      0.00699      0.00000      0.00000      0.00699      0.00000      0.00699      0.00912      0.00000      0.00000      0.00912      0.00000      0.00912 \n     0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.02941      0.00000      0.00000      0.00000     -0.05842      0.00000      0.00000      0.00000     -0.00339      0.00000      0.00000      0.00000      0.00146      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.02941      0.00000      0.00000      0.00000     -0.05842      0.00000      0.00000      0.00000     -0.00339      0.00000      0.00000      0.00000      0.00146      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.02941      0.00000      0.00000      0.00000     -0.05842      0.00000      0.00000      0.00000     -0.00339      0.00000      0.00000      0.00000      0.00146      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.15361     -0.03319      0.00000      0.00000      0.00000      0.00510      0.00000      0.00000      0.00000     -0.03995      0.00000      0.00000      0.00000      0.00352      0.00000      0.00000      0.00000      0.00071      0.00000      0.00000      0.00000      1.98570      0.00000      0.00000     -0.97233      0.00000     -0.97233     -0.01496      0.00000      0.00000      0.01486      0.00000      0.01487     -0.17090      0.00000      0.00000      0.08412      0.00000      0.08412 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.91606      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05964      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51002      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.91606      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05964      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51002      0.00000      0.00000      0.00000 \n    -0.15361     -0.03319      0.00000      0.00000      0.00000      0.00510      0.00000      0.00000      0.00000     -0.03995      0.00000      0.00000      0.00000      0.00352      0.00000      0.00000      0.00000      0.00071      0.00000      0.00000      0.00000     -0.97233      0.00000      0.00000      1.98570      0.00000     -0.97231      0.01487      0.00000      0.00000     -0.01496      0.00000      0.01487      0.08412      0.00000      0.00000     -0.17089      0.00000      0.08412 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.91606      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05964      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51002      0.00000 \n    -0.15361     -0.03319      0.00000      0.00000      0.00000      0.00510      0.00000      0.00000      0.00000     -0.03995      0.00000      0.00000      0.00000      0.00352      0.00000      0.00000      0.00000      0.00071      0.00000      0.00000      0.00000     -0.97233      0.00000      0.00000     -0.97231      0.00000      1.98569      0.01487      0.00000      0.00000      0.01488      0.00000     -0.01495      0.08412      0.00000      0.00000      0.08413      0.00000     -0.17089 \n    -0.07986      0.06271      0.00000      0.00000      0.00000     -0.06963      0.00000      0.00000      0.00000     -0.09874      0.00000      0.00000      0.00000      0.01638      0.00000      0.00000      0.00000      0.00699      0.00000      0.00000      0.00000     -0.01496      0.00000      0.00000      0.01487      0.00000      0.01487      0.44971      0.00000      0.00000     -0.21112      0.00000     -0.21112      0.33932      0.00000      0.00000     -0.17039      0.00000     -0.17039 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05964      0.00000      0.00000      0.00000      0.00000      0.00000      1.32164      0.00000      0.00000      0.00000      0.00000      0.00000      1.01941      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05964      0.00000      0.00000      0.00000      0.00000      0.00000      1.32164      0.00000      0.00000      0.00000      0.00000      0.00000      1.01941      0.00000      0.00000      0.00000 \n    -0.07986      0.06271      0.00000      0.00000      0.00000     -0.06963      0.00000      0.00000      0.00000     -0.09874      0.00000      0.00000      0.00000      0.01638      0.00000      0.00000      0.00000      0.00699      0.00000      0.00000      0.00000      0.01486      0.00000      0.00000     -0.01496      0.00000      0.01488     -0.21112      0.00000      0.00000      0.44970      0.00000     -0.21112     -0.17039      0.00000      0.00000      0.33932      0.00000     -0.17039 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05964      0.00000      0.00000      0.00000      0.00000      0.00000      1.32164      0.00000      0.00000      0.00000      0.00000      0.00000      1.01941      0.00000 \n    -0.07986      0.06271      0.00000      0.00000      0.00000     -0.06963      0.00000      0.00000      0.00000     -0.09874      0.00000      0.00000      0.00000      0.01638      0.00000      0.00000      0.00000      0.00699      0.00000      0.00000      0.00000      0.01487      0.00000      0.00000      0.01487      0.00000     -0.01495     -0.21112      0.00000      0.00000     -0.21112      0.00000      0.44970     -0.17039      0.00000      0.00000     -0.17039      0.00000      0.33932 \n     0.00971     -0.00162      0.00000      0.00000      0.00000     -0.00429      0.00000      0.00000      0.00000      0.01581      0.00000      0.00000      0.00000      0.01890      0.00000      0.00000      0.00000      0.00912      0.00000      0.00000      0.00000     -0.17090      0.00000      0.00000      0.08412      0.00000      0.08412      0.33932      0.00000      0.00000     -0.17039      0.00000     -0.17039      0.27531      0.00000      0.00000     -0.13606      0.00000     -0.13606 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51002      0.00000      0.00000      0.00000      0.00000      0.00000      1.01941      0.00000      0.00000      0.00000      0.00000      0.00000      0.82271      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51002      0.00000      0.00000      0.00000      0.00000      0.00000      1.01941      0.00000      0.00000      0.00000      0.00000      0.00000      0.82271      0.00000      0.00000      0.00000 \n     0.00971     -0.00162      0.00000      0.00000      0.00000     -0.00429      0.00000      0.00000      0.00000      0.01581      0.00000      0.00000      0.00000      0.01890      0.00000      0.00000      0.00000      0.00912      0.00000      0.00000      0.00000      0.08412      0.00000      0.00000     -0.17089      0.00000      0.08413     -0.17039      0.00000      0.00000      0.33932      0.00000     -0.17039     -0.13606      0.00000      0.00000      0.27531      0.00000     -0.13606 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51002      0.00000      0.00000      0.00000      0.00000      0.00000      1.01941      0.00000      0.00000      0.00000      0.00000      0.00000      0.82271      0.00000 \n     0.00971     -0.00162      0.00000      0.00000      0.00000     -0.00429      0.00000      0.00000      0.00000      0.01581      0.00000      0.00000      0.00000      0.01890      0.00000      0.00000      0.00000      0.00912      0.00000      0.00000      0.00000      0.08412      0.00000      0.00000      0.08412      0.00000     -0.17089     -0.17039      0.00000      0.00000     -0.17039      0.00000      0.33932     -0.13606      0.00000      0.00000     -0.13606      0.00000      0.27530 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.99988      0.99988      0.99988      0.99988      0.99988      0.00020      0.00020      0.00020      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -705.02630    -98.30761    -90.27858    -90.27858    -90.27858    -16.75413    -13.57078    -13.57078    -13.57078     -8.33645     -8.33645     -8.33645     -8.33645     -8.33645     -2.22688     -1.32869     -1.32869     -1.32869     -0.14549     -0.13717     -0.13717     -0.13717     -0.13717     -0.13717     -0.03492     -0.03492     -0.03492      0.04412      0.09050      0.09050      0.09050      0.39703      0.73446      0.73446      0.73446      0.73446      0.73446      2.32454    126.81760 \n   </alphaeps>\n   <betaeps>\n  -705.02540    -98.29074    -90.26611    -90.26611    -90.26611    -16.74050    -13.55522    -13.55522    -13.55522     -8.31785     -8.31785     -8.31785     -8.31785     -8.31785     -2.12636     -1.21931     -1.21931     -1.21931     -0.08228     -0.02197     -0.02197     -0.02197     -0.02197     -0.02197     -0.00497     -0.00497     -0.00497      0.06874      0.12938      0.12938      0.12938      0.45316      0.82839      0.82839      0.82839      0.82839      0.82839      2.41795    126.85810 \n   </betaeps>\n   <alphavectors>\n     0.97726     -0.33535      0.00000     -0.00000     -0.00000      0.13947     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.05711     -0.00000     -0.00000      0.00000      0.01614      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01205      0.00000     -0.00000     -0.00000     -0.01780      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.06320     -0.55235 \n     0.08587      1.01562     -0.00000      0.00000      0.00000     -0.51207      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.22600      0.00000      0.00000     -0.00000     -0.06295     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.01586     -0.00000      0.00000      0.00000      0.11754     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.26832      2.90514 \n     0.00000      0.00000      0.97869     -0.00000     -0.00000     -0.00000      0.00000     -0.47482      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.18463     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.03415     -0.00000      0.00000     -0.04374      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.97869     -0.00000     -0.00000      0.00000      0.00000     -0.47482      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.18463     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.03415      0.00000     -0.00000     -0.00000      0.00000     -0.04374     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.97869     -0.00000     -0.47482      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.18463     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.03415     -0.00000     -0.00000     -0.00000     -0.04374     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.14260      0.06313     -0.00000      0.00000      0.00000      1.04540     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.52153     -0.00000     -0.00000      0.00000      0.15701      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.19754      0.00000     -0.00000     -0.00000     -0.05673      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.58512     19.01316 \n     0.00000      0.00000      0.05257      0.00000      0.00000      0.00000     -0.00000      1.08294     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.56847     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.10848      0.00000     -0.00000      0.13967      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.05257      0.00000      0.00000     -0.00000     -0.00000      1.08294      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.56847     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.10848     -0.00000      0.00000      0.00000     -0.00000      0.13967     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.05257      0.00000      1.08294     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.56847      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.10848      0.00000      0.00000      0.00000      0.13967      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.07985     -0.04584      0.00000     -0.00000     -0.00000      0.15954     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.13460      0.00000      0.00000     -0.00000     -0.40306     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.09581     -0.00000     -0.00000      0.00000      1.42473     -0.00000      0.00000     -0.00000      0.00000      0.00000      5.10164      5.06162 \n    -0.00000     -0.00000     -0.01293      0.00000      0.00000      0.00000     -0.00000      0.01303      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.10843      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.25848     -0.00000      0.00000     -0.34454     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.01293      0.00000      0.00000     -0.00000     -0.00000      0.01303     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.10843      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.25848      0.00000     -0.00000     -0.00000      0.00000     -0.34454     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.01293      0.00000      0.01303      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.10843     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.25848     -0.00000     -0.00000     -0.00000     -0.34454      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00765      0.00373     -0.00000      0.00000      0.00000     -0.00216      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00429     -0.00000     -0.00000      0.00000      0.69159      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.56790      0.00000     -0.00000     -0.00000      4.81979      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.74793     -0.36740 \n     0.00000      0.00000      0.00404      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.06617     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.51360      0.00000     -0.00000      1.52350      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00404      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.06617     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.51360     -0.00000      0.00000      0.00000     -0.00000      1.52350      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00404     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.06617      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.51360      0.00000      0.00000      0.00000      1.52350      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00200     -0.00087      0.00000     -0.00000     -0.00000      0.00061     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00167      0.00000      0.00000     -0.00000      0.32845      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -2.23839     -0.00000      0.00000      0.00000     -1.70772     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.48255      0.09166 \n    -0.00000     -0.00000     -0.00217     -0.00000     -0.00000     -0.00000      0.00000     -0.00010      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02717      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.57285     -0.00000      0.00000     -1.44553     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00217     -0.00000     -0.00000      0.00000      0.00000     -0.00010     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.02717      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.57285      0.00000     -0.00000     -0.00000      0.00000     -1.44553     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00217     -0.00000     -0.00010      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.02717     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.57285     -0.00000     -0.00000     -0.00000     -1.44553     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.08139     -0.00281      0.00000     -0.00000     -0.00000      0.00739     -0.00000     -0.00000     -0.00000      0.92084     -0.00000     -0.00000     -0.00000     -0.32463     -0.01255     -0.00000     -0.00000      0.00000      0.00323      0.00000      0.00000     -0.00000      0.15785      0.19870      0.00000     -0.00000      0.00000     -0.00354     -0.00000     -0.00000      0.00000     -0.01289     -0.00000      0.00000     -0.00000      0.06500     -0.30370     -0.03746     -9.47433 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.69115     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.43954     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.53794      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.69115      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.43954     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.53794     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.08139     -0.00281      0.00000     -0.00000     -0.00000      0.00739     -0.00000     -0.00000     -0.00000     -0.74156     -0.00000     -0.00000     -0.00000     -0.63515     -0.01255     -0.00000     -0.00000      0.00000      0.00323      0.00000      0.00000     -0.00000     -0.25101      0.03735      0.00000     -0.00000      0.00000     -0.00354     -0.00000     -0.00000      0.00000     -0.01289     -0.00000      0.00000     -0.00000     -0.29551      0.09556     -0.03746     -9.47433 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.69115     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.43954     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.53794     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.08139     -0.00281      0.00000     -0.00000     -0.00000      0.00739     -0.00000     -0.00000     -0.00000     -0.17928     -0.00000     -0.00000     -0.00000      0.95978     -0.01255     -0.00000     -0.00000      0.00000      0.00323      0.00000      0.00000     -0.00000      0.09316     -0.23605     -0.00000      0.00000     -0.00000     -0.00354      0.00000      0.00000     -0.00000     -0.01289      0.00000     -0.00000      0.00000      0.23051      0.20814     -0.03746     -9.47433 \n    -0.03022      0.01721     -0.00000      0.00000      0.00000     -0.04694      0.00000      0.00000      0.00000      0.07136      0.00000      0.00000      0.00000     -0.02516     -0.02190     -0.00000     -0.00000      0.00000      0.02220      0.00000      0.00000     -0.00000     -0.40759     -0.51307     -0.00000      0.00000     -0.00000      0.00006      0.00000      0.00000     -0.00000     -0.33486      0.00000     -0.00000      0.00000     -0.21270      0.99381     -2.47603     -1.84139 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13106      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.13494      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.76032     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13106     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.13494      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.76032      0.00000      0.00000     -0.00000     -0.00000 \n    -0.03022      0.01721     -0.00000      0.00000      0.00000     -0.04694      0.00000      0.00000      0.00000     -0.05747      0.00000      0.00000      0.00000     -0.04922     -0.02190     -0.00000     -0.00000      0.00000      0.02220      0.00000      0.00000     -0.00000      0.64812     -0.09645     -0.00000      0.00000     -0.00000      0.00006      0.00000      0.00000     -0.00000     -0.33486      0.00000     -0.00000      0.00000      0.96702     -0.31270     -2.47603     -1.84139 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13106      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.13494      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.76032      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.03022      0.01721     -0.00000      0.00000      0.00000     -0.04694      0.00000      0.00000      0.00000     -0.01389      0.00000      0.00000      0.00000      0.07438     -0.02190     -0.00000     -0.00000      0.00000      0.02220      0.00000      0.00000     -0.00000     -0.24053      0.60951      0.00000     -0.00000      0.00000      0.00006     -0.00000     -0.00000      0.00000     -0.33486     -0.00000      0.00000     -0.00000     -0.75432     -0.68111     -2.47603     -1.84139 \n     0.00446     -0.00231      0.00000     -0.00000     -0.00000      0.00098     -0.00000     -0.00000     -0.00000     -0.01815     -0.00000     -0.00000     -0.00000      0.00640      0.01137      0.00000      0.00000     -0.00000      0.02758      0.00000      0.00000     -0.00000     -0.32533     -0.40952     -0.00000      0.00000     -0.00000     -0.25345      0.00000      0.00000     -0.00000     -1.67530      0.00000     -0.00000      0.00000      0.21654     -1.01175      0.94945      0.21896 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03333      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.90588     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.79209     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03333      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.90588     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.79209     -0.00000      0.00000      0.00000      0.00000 \n     0.00446     -0.00231      0.00000     -0.00000     -0.00000      0.00098     -0.00000     -0.00000     -0.00000      0.01461     -0.00000     -0.00000     -0.00000      0.01252      0.01137      0.00000      0.00000     -0.00000      0.02758      0.00000      0.00000     -0.00000      0.51732     -0.07698     -0.00000      0.00000     -0.00000     -0.25345      0.00000      0.00000     -0.00000     -1.67530      0.00000     -0.00000      0.00000     -0.98447      0.31835      0.94945      0.21896 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03333     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.90588     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.79209      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00446     -0.00231      0.00000     -0.00000     -0.00000      0.00098     -0.00000     -0.00000     -0.00000      0.00353     -0.00000     -0.00000     -0.00000     -0.01891      0.01137      0.00000      0.00000     -0.00000      0.02758      0.00000      0.00000     -0.00000     -0.19199      0.48650      0.00000     -0.00000      0.00000     -0.25345     -0.00000     -0.00000      0.00000     -1.67530     -0.00000      0.00000     -0.00000      0.76793      0.69341      0.94945      0.21896 \n   </alphavectors>\n   <betavectors>\n     0.97726     -0.33537      0.00000      0.00000      0.00000      0.13950     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.05747      0.00000     -0.00000     -0.00000      0.01288      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.01328     -0.00000      0.00000     -0.00000     -0.01865     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06289     -0.55235 \n     0.08587      1.01572     -0.00000     -0.00000     -0.00000     -0.51220      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.22762     -0.00000      0.00000      0.00000     -0.05400     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.01770     -0.00000     -0.00000      0.00000      0.11846      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.26740      2.90517 \n     0.00000      0.00000      0.97871      0.00000      0.00000     -0.00000     -0.47492      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.18435      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02389      0.00000     -0.00000     -0.04971     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.97871     -0.00000      0.00000      0.00000     -0.47492     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.18435     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02389      0.00000     -0.00000     -0.04971     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.97871      0.00000     -0.00000      0.00000     -0.47492     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.18435     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.02389      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.04971      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.14259      0.06355     -0.00000     -0.00000     -0.00000      1.04614     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.52704      0.00000     -0.00000     -0.00000      0.11617      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.21746     -0.00000      0.00000     -0.00000     -0.07288     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.58352     19.01304 \n     0.00000      0.00000      0.05250     -0.00000     -0.00000      0.00000      1.08338     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.56795      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.07579     -0.00000      0.00000      0.15870     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.05250      0.00000     -0.00000     -0.00000      1.08338     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.56795      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07579     -0.00000      0.00000      0.15870      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.05250     -0.00000      0.00000     -0.00000      1.08338      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.56795      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.07579     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.15870     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.07984     -0.04561      0.00000      0.00000      0.00000      0.15794     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.17008     -0.00000      0.00000      0.00000     -0.36268     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.12595     -0.00000      0.00000      0.00000      1.39525     -0.00000      0.00000     -0.00000     -0.00000      0.00000      5.10361      5.06222 \n    -0.00000     -0.00000     -0.01291     -0.00000     -0.00000      0.00000      0.01217      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.10905     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.17832      0.00000     -0.00000     -0.39032      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.01291      0.00000     -0.00000     -0.00000      0.01217      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.10905     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.17832      0.00000     -0.00000     -0.39032     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.01291     -0.00000      0.00000     -0.00000      0.01217     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.10905     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.17832      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.39032     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00765      0.00371     -0.00000     -0.00000     -0.00000     -0.00223      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00364      0.00000     -0.00000     -0.00000      0.40910      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      2.99820     -0.00000      0.00000      0.00000      4.61129     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.71393     -0.36730 \n     0.00000      0.00000      0.00403     -0.00000     -0.00000      0.00000      0.00018     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.06379      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.17515     -0.00000      0.00000      1.59827     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00403      0.00000     -0.00000     -0.00000      0.00018     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.06379      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17515     -0.00000      0.00000      1.59827      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00403     -0.00000      0.00000     -0.00000      0.00018      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.06379      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.17515     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.59827      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00200     -0.00086      0.00000      0.00000      0.00000      0.00063     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00147     -0.00000      0.00000      0.00000      0.66066      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -2.26313      0.00000     -0.00000     -0.00000     -1.57694      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.47164      0.09163 \n    -0.00000     -0.00000     -0.00216      0.00000      0.00000     -0.00000     -0.00020      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02554     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.86935      0.00000     -0.00000     -1.28920     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00216     -0.00000      0.00000      0.00000     -0.00020      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.02554      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.86935      0.00000     -0.00000     -1.28920      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00216      0.00000     -0.00000      0.00000     -0.00020      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02554      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.86935      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.28920      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.08138     -0.00304      0.00000      0.00000      0.00000      0.00726     -0.00000     -0.00000     -0.00000      0.94230     -0.00000     -0.00000     -0.00000     -0.25761     -0.01197      0.00000     -0.00000     -0.00000      0.00306      0.00000     -0.00000      0.00000     -0.20932      0.14017      0.00000      0.00000     -0.00000     -0.00416     -0.00000      0.00000      0.00000     -0.01177     -0.00000     -0.00000      0.00000      0.23552      0.20238     -0.03675     -9.47434 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.69201     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.43634      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.53785      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.69201     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.43634      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.53785      0.00000     -0.00000      0.00000     -0.00000 \n    -0.08138     -0.00304      0.00000      0.00000      0.00000      0.00726     -0.00000     -0.00000     -0.00000     -0.69425     -0.00000     -0.00000     -0.00000     -0.68725     -0.01197      0.00000     -0.00000     -0.00000      0.00306      0.00000     -0.00000      0.00000      0.22606      0.11119      0.00000      0.00000     -0.00000     -0.00416     -0.00000      0.00000      0.00000     -0.01177     -0.00000     -0.00000      0.00000      0.05751     -0.30515     -0.03675     -9.47434 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.69201      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.43634     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.53785     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.08138     -0.00304      0.00000      0.00000      0.00000      0.00726     -0.00000     -0.00000     -0.00000     -0.24806     -0.00000     -0.00000     -0.00000      0.94486     -0.01197      0.00000     -0.00000     -0.00000      0.00306      0.00000     -0.00000      0.00000     -0.01673     -0.25137     -0.00000     -0.00000      0.00000     -0.00416      0.00000     -0.00000     -0.00000     -0.01177      0.00000      0.00000     -0.00000     -0.29303      0.10277     -0.03675     -9.47434 \n    -0.03022      0.01712     -0.00000     -0.00000     -0.00000     -0.04656      0.00000      0.00000      0.00000      0.07159      0.00000      0.00000      0.00000     -0.01957     -0.03735      0.00000     -0.00000     -0.00000      0.01296      0.00000     -0.00000      0.00000      0.54213     -0.36304     -0.00000     -0.00000      0.00000     -0.01904      0.00000     -0.00000     -0.00000     -0.31785      0.00000      0.00000     -0.00000     -0.77226     -0.66362     -2.47793     -1.84160 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.12855     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.13009     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.76362     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.12855      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.13009     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.76362     -0.00000      0.00000      0.00000      0.00000 \n    -0.03022      0.01712     -0.00000     -0.00000     -0.00000     -0.04656      0.00000      0.00000      0.00000     -0.05275      0.00000      0.00000      0.00000     -0.05221     -0.03735      0.00000     -0.00000     -0.00000      0.01296      0.00000     -0.00000      0.00000     -0.58547     -0.28798     -0.00000     -0.00000      0.00000     -0.01904      0.00000     -0.00000     -0.00000     -0.31785      0.00000      0.00000     -0.00000     -0.18858      1.00061     -2.47793     -1.84160 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.12855     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.13009      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.76362      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.03022      0.01712     -0.00000     -0.00000     -0.00000     -0.04656      0.00000      0.00000      0.00000     -0.01885      0.00000      0.00000      0.00000      0.07179     -0.03735      0.00000     -0.00000     -0.00000      0.01296      0.00000     -0.00000      0.00000      0.04334      0.65102      0.00000      0.00000     -0.00000     -0.01904     -0.00000      0.00000      0.00000     -0.31785     -0.00000     -0.00000      0.00000      0.96085     -0.33699     -2.47793     -1.84160 \n     0.00446     -0.00230      0.00000      0.00000      0.00000      0.00102     -0.00000     -0.00000     -0.00000     -0.01828     -0.00000     -0.00000     -0.00000      0.00500      0.01093     -0.00000      0.00000      0.00000      0.00406      0.00000     -0.00000      0.00000      0.43698     -0.29263     -0.00000     -0.00000      0.00000     -0.36735      0.00000     -0.00000     -0.00000     -1.66086      0.00000      0.00000     -0.00000      0.78362      0.67338      0.93792      0.21892 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03282      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.91091      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.78955     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03282      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.91091      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.78955     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00446     -0.00230      0.00000      0.00000      0.00000      0.00102     -0.00000     -0.00000     -0.00000      0.01347     -0.00000     -0.00000     -0.00000      0.01333      0.01093     -0.00000      0.00000      0.00000      0.00406      0.00000     -0.00000      0.00000     -0.47192     -0.23212     -0.00000     -0.00000      0.00000     -0.36735      0.00000     -0.00000     -0.00000     -1.66086      0.00000      0.00000     -0.00000      0.19135     -1.01532      0.93792      0.21892 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03282     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.91091     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.78955      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00446     -0.00230      0.00000      0.00000      0.00000      0.00102     -0.00000     -0.00000     -0.00000      0.00481     -0.00000     -0.00000     -0.00000     -0.01833      0.01093     -0.00000      0.00000      0.00000      0.00406      0.00000     -0.00000      0.00000      0.03493      0.52475      0.00000      0.00000     -0.00000     -0.36735     -0.00000      0.00000      0.00000     -1.66086     -0.00000     -0.00000      0.00000     -0.97497      0.34194      0.93792      0.21892 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Tc\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17920     -0.67698      0.00000      0.00000      0.00000      0.65068      0.00000      0.00000      0.00000      0.11814      0.00000      0.00000      0.00000      0.00106      0.00000      0.00000      0.00000      0.01116      0.00000      0.00000      0.00000     -0.18092      0.00000      0.00000     -0.18092      0.00000     -0.18092     -0.09158      0.00000      0.00000     -0.09158      0.00000     -0.09158      0.00739      0.00000      0.00000      0.00739      0.00000      0.00739 \n    -0.67698      2.70971      0.00000      0.00000      0.00000     -1.22050      0.00000      0.00000      0.00000      0.28677      0.00000      0.00000      0.00000     -0.05312      0.00000      0.00000      0.00000     -0.02975      0.00000      0.00000      0.00000     -0.01180      0.00000      0.00000     -0.01180      0.00000     -0.01180      0.07453      0.00000      0.00000      0.07453      0.00000      0.07453     -0.00104      0.00000      0.00000     -0.00104      0.00000     -0.00104 \n     0.00000      0.00000      2.36551      0.00000      0.00000      0.00000     -1.02680      0.00000      0.00000      0.00000      0.32509      0.00000      0.00000      0.00000      0.03102      0.00000      0.00000      0.00000     -0.01385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.36551      0.00000      0.00000      0.00000     -1.02680      0.00000      0.00000      0.00000      0.32509      0.00000      0.00000      0.00000      0.03102      0.00000      0.00000      0.00000     -0.01385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.36551      0.00000      0.00000      0.00000     -1.02680      0.00000      0.00000      0.00000      0.32509      0.00000      0.00000      0.00000      0.03102      0.00000      0.00000      0.00000     -0.01385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.65068     -1.22050      0.00000      0.00000      0.00000      2.99213      0.00000      0.00000      0.00000     -0.94415      0.00000      0.00000      0.00000      0.14280      0.00000      0.00000      0.00000      0.07115      0.00000      0.00000      0.00000     -0.03480      0.00000      0.00000     -0.03480      0.00000     -0.03480     -0.09093      0.00000      0.00000     -0.09093      0.00000     -0.09093     -0.00304      0.00000      0.00000     -0.00304      0.00000     -0.00304 \n     0.00000      0.00000     -1.02680      0.00000      0.00000      0.00000      2.92811      0.00000      0.00000      0.00000     -1.22303      0.00000      0.00000      0.00000     -0.07760      0.00000      0.00000      0.00000      0.03237      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.02680      0.00000      0.00000      0.00000      2.92811      0.00000      0.00000      0.00000     -1.22303      0.00000      0.00000      0.00000     -0.07760      0.00000      0.00000      0.00000      0.03237      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.02680      0.00000      0.00000      0.00000      2.92811      0.00000      0.00000      0.00000     -1.22303      0.00000      0.00000      0.00000     -0.07760      0.00000      0.00000      0.00000      0.03237      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.11814      0.28677      0.00000      0.00000      0.00000     -0.94415      0.00000      0.00000      0.00000      3.01518      0.00000      0.00000      0.00000     -0.38765      0.00000      0.00000      0.00000     -0.19305      0.00000      0.00000      0.00000     -0.03254      0.00000      0.00000     -0.03254      0.00000     -0.03254     -0.11442      0.00000      0.00000     -0.11442      0.00000     -0.11442      0.00050      0.00000      0.00000      0.00050      0.00000      0.00050 \n     0.00000      0.00000      0.32509      0.00000      0.00000      0.00000     -1.22303      0.00000      0.00000      0.00000      2.47299      0.00000      0.00000      0.00000      0.12748      0.00000      0.00000      0.00000     -0.05120      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.32509      0.00000      0.00000      0.00000     -1.22303      0.00000      0.00000      0.00000      2.47299      0.00000      0.00000      0.00000      0.12748      0.00000      0.00000      0.00000     -0.05120      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.32509      0.00000      0.00000      0.00000     -1.22303      0.00000      0.00000      0.00000      2.47299      0.00000      0.00000      0.00000      0.12748      0.00000      0.00000      0.00000     -0.05120      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00106     -0.05312      0.00000      0.00000      0.00000      0.14280      0.00000      0.00000      0.00000     -0.38765      0.00000      0.00000      0.00000      0.63934      0.00000      0.00000      0.00000      0.30646      0.00000      0.00000      0.00000      0.00240      0.00000      0.00000      0.00240      0.00000      0.00240      0.02688      0.00000      0.00000      0.02688      0.00000      0.02688      0.02768      0.00000      0.00000      0.02768      0.00000      0.02768 \n     0.00000      0.00000      0.03102      0.00000      0.00000      0.00000     -0.07760      0.00000      0.00000      0.00000      0.12748      0.00000      0.00000      0.00000      0.00670      0.00000      0.00000      0.00000     -0.00270      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03102      0.00000      0.00000      0.00000     -0.07760      0.00000      0.00000      0.00000      0.12748      0.00000      0.00000      0.00000      0.00670      0.00000      0.00000      0.00000     -0.00270      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03102      0.00000      0.00000      0.00000     -0.07760      0.00000      0.00000      0.00000      0.12748      0.00000      0.00000      0.00000      0.00670      0.00000      0.00000      0.00000     -0.00270      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01116     -0.02975      0.00000      0.00000      0.00000      0.07115      0.00000      0.00000      0.00000     -0.19305      0.00000      0.00000      0.00000      0.30646      0.00000      0.00000      0.00000      0.16490      0.00000      0.00000      0.00000      0.00035      0.00000      0.00000      0.00035      0.00000      0.00035      0.01224      0.00000      0.00000      0.01224      0.00000      0.01224      0.01134      0.00000      0.00000      0.01134      0.00000      0.01134 \n     0.00000      0.00000     -0.01385      0.00000      0.00000      0.00000      0.03237      0.00000      0.00000      0.00000     -0.05120      0.00000      0.00000      0.00000     -0.00270      0.00000      0.00000      0.00000      0.00109      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01385      0.00000      0.00000      0.00000      0.03237      0.00000      0.00000      0.00000     -0.05120      0.00000      0.00000      0.00000     -0.00270      0.00000      0.00000      0.00000      0.00109      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01385      0.00000      0.00000      0.00000      0.03237      0.00000      0.00000      0.00000     -0.05120      0.00000      0.00000      0.00000     -0.00270      0.00000      0.00000      0.00000      0.00109      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.18092     -0.01180      0.00000      0.00000      0.00000     -0.03480      0.00000      0.00000      0.00000     -0.03254      0.00000      0.00000      0.00000      0.00240      0.00000      0.00000      0.00000      0.00035      0.00000      0.00000      0.00000      2.00260      0.00000      0.00000     -0.97579      0.00000     -0.97579     -0.05419      0.00000      0.00000      0.03809      0.00000      0.03810     -0.19206      0.00000      0.00000      0.09505      0.00000      0.09505 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.95679      0.00000      0.00000      0.00000      0.00000      0.00000     -0.18460      0.00000      0.00000      0.00000      0.00000      0.00000     -0.57423      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.95679      0.00000      0.00000      0.00000      0.00000      0.00000     -0.18460      0.00000      0.00000      0.00000      0.00000      0.00000     -0.57423      0.00000      0.00000      0.00000 \n    -0.18092     -0.01180      0.00000      0.00000      0.00000     -0.03480      0.00000      0.00000      0.00000     -0.03254      0.00000      0.00000      0.00000      0.00240      0.00000      0.00000      0.00000      0.00035      0.00000      0.00000      0.00000     -0.97579      0.00000      0.00000      2.00260      0.00000     -0.97579      0.03809      0.00000      0.00000     -0.05421      0.00000      0.03809      0.09506      0.00000      0.00000     -0.19207      0.00000      0.09505 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.95679      0.00000      0.00000      0.00000      0.00000      0.00000     -0.18460      0.00000      0.00000      0.00000      0.00000      0.00000     -0.57423      0.00000 \n    -0.18092     -0.01180      0.00000      0.00000      0.00000     -0.03480      0.00000      0.00000      0.00000     -0.03254      0.00000      0.00000      0.00000      0.00240      0.00000      0.00000      0.00000      0.00035      0.00000      0.00000      0.00000     -0.97579      0.00000      0.00000     -0.97579      0.00000      2.00262      0.03809      0.00000      0.00000      0.03809      0.00000     -0.05421      0.09506      0.00000      0.00000      0.09505      0.00000     -0.19205 \n    -0.09158      0.07453      0.00000      0.00000      0.00000     -0.09093      0.00000      0.00000      0.00000     -0.11442      0.00000      0.00000      0.00000      0.02688      0.00000      0.00000      0.00000      0.01224      0.00000      0.00000      0.00000     -0.05419      0.00000      0.00000      0.03809      0.00000      0.03809      0.55245      0.00000      0.00000     -0.25761      0.00000     -0.25762      0.37963      0.00000      0.00000     -0.18894      0.00000     -0.18894 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.18460      0.00000      0.00000      0.00000      0.00000      0.00000      1.62014      0.00000      0.00000      0.00000      0.00000      0.00000      1.13715      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.18460      0.00000      0.00000      0.00000      0.00000      0.00000      1.62014      0.00000      0.00000      0.00000      0.00000      0.00000      1.13715      0.00000      0.00000      0.00000 \n    -0.09158      0.07453      0.00000      0.00000      0.00000     -0.09093      0.00000      0.00000      0.00000     -0.11442      0.00000      0.00000      0.00000      0.02688      0.00000      0.00000      0.00000      0.01224      0.00000      0.00000      0.00000      0.03809      0.00000      0.00000     -0.05421      0.00000      0.03809     -0.25761      0.00000      0.00000      0.55245      0.00000     -0.25761     -0.18894      0.00000      0.00000      0.37963      0.00000     -0.18894 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.18460      0.00000      0.00000      0.00000      0.00000      0.00000      1.62014      0.00000      0.00000      0.00000      0.00000      0.00000      1.13715      0.00000 \n    -0.09158      0.07453      0.00000      0.00000      0.00000     -0.09093      0.00000      0.00000      0.00000     -0.11442      0.00000      0.00000      0.00000      0.02688      0.00000      0.00000      0.00000      0.01224      0.00000      0.00000      0.00000      0.03810      0.00000      0.00000      0.03809      0.00000     -0.05421     -0.25762      0.00000      0.00000     -0.25761      0.00000      0.55245     -0.18894      0.00000      0.00000     -0.18894      0.00000      0.37964 \n     0.00739     -0.00104      0.00000      0.00000      0.00000     -0.00304      0.00000      0.00000      0.00000      0.00050      0.00000      0.00000      0.00000      0.02768      0.00000      0.00000      0.00000      0.01134      0.00000      0.00000      0.00000     -0.19206      0.00000      0.00000      0.09506      0.00000      0.09506      0.37963      0.00000      0.00000     -0.18894      0.00000     -0.18894      0.27873      0.00000      0.00000     -0.13704      0.00000     -0.13705 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.57423      0.00000      0.00000      0.00000      0.00000      0.00000      1.13715      0.00000      0.00000      0.00000      0.00000      0.00000      0.83156      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.57423      0.00000      0.00000      0.00000      0.00000      0.00000      1.13715      0.00000      0.00000      0.00000      0.00000      0.00000      0.83156      0.00000      0.00000      0.00000 \n     0.00739     -0.00104      0.00000      0.00000      0.00000     -0.00304      0.00000      0.00000      0.00000      0.00050      0.00000      0.00000      0.00000      0.02768      0.00000      0.00000      0.00000      0.01134      0.00000      0.00000      0.00000      0.09505      0.00000      0.00000     -0.19207      0.00000      0.09505     -0.18894      0.00000      0.00000      0.37963      0.00000     -0.18894     -0.13704      0.00000      0.00000      0.27873      0.00000     -0.13705 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.57423      0.00000      0.00000      0.00000      0.00000      0.00000      1.13715      0.00000      0.00000      0.00000      0.00000      0.00000      0.83156      0.00000 \n     0.00739     -0.00104      0.00000      0.00000      0.00000     -0.00304      0.00000      0.00000      0.00000      0.00050      0.00000      0.00000      0.00000      0.02768      0.00000      0.00000      0.00000      0.01134      0.00000      0.00000      0.00000      0.09505      0.00000      0.00000      0.09505      0.00000     -0.19205     -0.18894      0.00000      0.00000     -0.18894      0.00000      0.37964     -0.13705      0.00000      0.00000     -0.13705      0.00000      0.27873 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.35344      0.12931      0.12931      0.12931      0.12931      0.12931      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -741.43010   -104.22880    -95.97520    -95.97520    -95.97520    -18.09558    -14.74028    -14.74028    -14.74028     -9.28638     -9.28638     -9.28638     -9.28638     -9.28638     -2.48018     -1.50352     -1.50352     -1.50352     -0.20785     -0.20785     -0.20785     -0.20785     -0.20785     -0.16380     -0.04179     -0.04179     -0.04179      0.03913      0.08700      0.08700      0.08700      0.42990      0.81482      0.81482      0.81482      0.81482      0.81482      2.70843    136.80050 \n   </alphaeps>\n   <betaeps>\n  -741.42930   -104.21080    -95.96183    -95.96183    -95.96183    -18.08158    -14.72394    -14.72394    -14.72394     -9.26707     -9.26707     -9.26707     -9.26707     -9.26707     -2.38414     -1.40183     -1.40183     -1.40183     -0.11739     -0.10674     -0.10674     -0.10674     -0.10674     -0.10674     -0.02190     -0.02190     -0.02190      0.05467      0.11092      0.11092      0.11092      0.47417      0.89213      0.89213      0.89213      0.89213      0.89213      2.79053    136.83430 \n   </betaeps>\n   <alphavectors>\n     0.97652     -0.33567      0.00000     -0.00000     -0.00000      0.14036      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05860     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.01666      0.00000      0.00000      0.00000      0.01154      0.00000     -0.00000      0.00000     -0.01962     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.06352     -0.57125 \n     0.09022      1.01463     -0.00000      0.00000      0.00000     -0.51173     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.22866      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.06511     -0.00000     -0.00000     -0.00000     -0.02177     -0.00000      0.00000     -0.00000      0.10675      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.26931      3.07734 \n    -0.00000     -0.00000      0.00000      0.98083     -0.00000     -0.00000     -0.00000      0.00000     -0.43820      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.16945      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.03032     -0.00000      0.00000      0.00000     -0.00000     -0.03730      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.98083     -0.00000     -0.00000     -0.00000     -0.00000     -0.43820      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.16945      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.03032     -0.00000      0.00000     -0.03730     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.98083      0.00000     -0.43820      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.16945      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.03032      0.00000      0.00000     -0.00000     -0.03730     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.16334      0.05475     -0.00000      0.00000      0.00000      1.06878      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.55129     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.16457      0.00000      0.00000      0.00000      0.17486      0.00000     -0.00000      0.00000     -0.12511      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.64164     19.53751 \n    -0.00000     -0.00000      0.00000      0.05062      0.00000      0.00000      0.00000     -0.00000      1.06050      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.58043     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.10797      0.00000     -0.00000     -0.00000      0.00000      0.13359      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.05062      0.00000      0.00000      0.00000      0.00000      1.06050     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.58043      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.10797      0.00000     -0.00000      0.13359     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.05062     -0.00000      1.06050     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.58043      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.10797     -0.00000     -0.00000      0.00000      0.13359     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.09021     -0.05098      0.00000     -0.00000     -0.00000      0.18936      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.14274      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.43856     -0.00000     -0.00000     -0.00000     -0.04372     -0.00000      0.00000      0.00000      1.17241     -0.00000      0.00000     -0.00000      0.00000      0.00000      5.94082      5.16111 \n     0.00000      0.00000     -0.00000     -0.01189      0.00000      0.00000      0.00000     -0.00000      0.03220     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.11164      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.25286     -0.00000      0.00000      0.00000     -0.00000     -0.32286     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.01189      0.00000      0.00000      0.00000      0.00000      0.03220      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.11164     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.25286     -0.00000      0.00000     -0.32286      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.01189     -0.00000      0.03220      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.11164     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.25286      0.00000      0.00000     -0.00000     -0.32286      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00601      0.00292     -0.00000      0.00000      0.00000      0.00096      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00396      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.71848      0.00000      0.00000      0.00000      2.25070      0.00000     -0.00000      0.00000      4.08406      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.44701     -0.24498 \n    -0.00000     -0.00000      0.00000      0.00352     -0.00000     -0.00000     -0.00000      0.00000     -0.00537      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.05695     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.54942      0.00000     -0.00000     -0.00000      0.00000      1.46940      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00352     -0.00000     -0.00000     -0.00000     -0.00000     -0.00537      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.05695      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.54942      0.00000     -0.00000      1.46940     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00352      0.00000     -0.00537      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05695      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.54942     -0.00000     -0.00000      0.00000      1.46940      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00176     -0.00077      0.00000     -0.00000     -0.00000     -0.00033     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00079     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.28574      0.00000      0.00000      0.00000     -2.10561     -0.00000     -0.00000     -0.00000     -1.50747     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.42869      0.06910 \n     0.00000      0.00000     -0.00000     -0.00186      0.00000      0.00000      0.00000     -0.00000      0.00274     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.02307     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.54096     -0.00000      0.00000      0.00000     -0.00000     -1.42007     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00186      0.00000      0.00000      0.00000      0.00000      0.00274     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.02307     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.54096     -0.00000      0.00000     -1.42007      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00186     -0.00000      0.00274     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.02307     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.54096      0.00000      0.00000     -0.00000     -1.42007     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.09188      0.00112     -0.00000      0.00000      0.00000     -0.00522     -0.00000      0.00000      0.00000     -0.24158      0.00000     -0.00000      0.00000      0.94400     -0.00590     -0.00000      0.00000     -0.00000      0.03039     -0.27426      0.00000     -0.00000     -0.00000      0.00144     -0.00000      0.00000     -0.00000     -0.00422      0.00000     -0.00000     -0.00000     -0.00690      0.06011     -0.31379      0.00000     -0.00000     -0.00000     -0.01439     -9.73218 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.68775      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.47795      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.55338      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.68775      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.47795     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.55338      0.00000     -0.00000 \n    -0.09188      0.00112     -0.00000      0.00000      0.00000     -0.00522     -0.00000      0.00000      0.00000     -0.69674      0.00000     -0.00000      0.00000     -0.68121     -0.00590     -0.00000      0.00000     -0.00000      0.22233      0.16345     -0.00000      0.00000      0.00000      0.00144      0.00000     -0.00000      0.00000     -0.00422     -0.00000      0.00000     -0.00000     -0.00690      0.24169      0.20895     -0.00000      0.00000     -0.00000     -0.01439     -9.73218 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.68775      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.47795     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.55338      0.00000      0.00000     -0.00000 \n    -0.09188      0.00112     -0.00000      0.00000      0.00000     -0.00522     -0.00000      0.00000      0.00000      0.93832      0.00000     -0.00000      0.00000     -0.26279     -0.00590     -0.00000      0.00000     -0.00000     -0.25271      0.11082     -0.00000     -0.00000      0.00000      0.00144     -0.00000      0.00000     -0.00000     -0.00422      0.00000     -0.00000      0.00000     -0.00690     -0.30181      0.10484     -0.00000      0.00000      0.00000     -0.01439     -9.73218 \n    -0.03428      0.01924     -0.00000      0.00000      0.00000     -0.05664     -0.00000      0.00000      0.00000     -0.01939      0.00000     -0.00000      0.00000      0.07577     -0.02326     -0.00000      0.00000     -0.00000     -0.07542      0.68067     -0.00000      0.00000      0.00000      0.03159      0.00000     -0.00000      0.00000      0.03214     -0.00000      0.00000      0.00000     -0.24628     -0.18987      0.99112     -0.00000      0.00000      0.00000     -2.82058     -1.88617 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.13546     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.18618     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.74788     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13546     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.18618      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.74788     -0.00000      0.00000 \n    -0.03428      0.01924     -0.00000      0.00000      0.00000     -0.05664     -0.00000      0.00000      0.00000     -0.05592      0.00000     -0.00000      0.00000     -0.05467     -0.02326     -0.00000      0.00000     -0.00000     -0.55177     -0.40565      0.00000     -0.00000     -0.00000      0.03159     -0.00000      0.00000     -0.00000      0.03214      0.00000     -0.00000      0.00000     -0.24628     -0.76340     -0.65999      0.00000     -0.00000      0.00000     -2.82058     -1.88617 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.13546     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.18618      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.74788     -0.00000     -0.00000      0.00000 \n    -0.03428      0.01924     -0.00000      0.00000      0.00000     -0.05664     -0.00000      0.00000      0.00000      0.07531      0.00000     -0.00000      0.00000     -0.02109     -0.02326     -0.00000      0.00000     -0.00000      0.62719     -0.27503      0.00000      0.00000     -0.00000      0.03159      0.00000     -0.00000      0.00000      0.03214     -0.00000      0.00000     -0.00000     -0.24628      0.95327     -0.33113      0.00000     -0.00000     -0.00000     -2.82058     -1.88617 \n     0.00344     -0.00176      0.00000     -0.00000     -0.00000     -0.00104     -0.00000      0.00000      0.00000      0.00480      0.00000     -0.00000      0.00000     -0.01875      0.00722      0.00000     -0.00000      0.00000     -0.05436      0.49063     -0.00000      0.00000      0.00000      0.03743      0.00000     -0.00000      0.00000     -0.17228     -0.00000      0.00000      0.00000     -1.44334      0.19829     -1.03510      0.00000     -0.00000     -0.00000      0.81515      0.14054 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.03352      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.85500     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.82545     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.03352      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.85500     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.82545     -0.00000      0.00000 \n     0.00344     -0.00176      0.00000     -0.00000     -0.00000     -0.00104     -0.00000      0.00000      0.00000      0.01384      0.00000     -0.00000      0.00000      0.01353      0.00722      0.00000     -0.00000      0.00000     -0.39772     -0.29239      0.00000     -0.00000     -0.00000      0.03743     -0.00000      0.00000     -0.00000     -0.17228      0.00000     -0.00000      0.00000     -1.44334      0.79728      0.68928     -0.00000      0.00000     -0.00000      0.81515      0.14054 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.03352      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.85500     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.82545     -0.00000     -0.00000      0.00000 \n     0.00344     -0.00176      0.00000     -0.00000     -0.00000     -0.00104     -0.00000      0.00000      0.00000     -0.01863      0.00000     -0.00000      0.00000      0.00522      0.00722      0.00000     -0.00000      0.00000      0.45208     -0.19824      0.00000      0.00000     -0.00000      0.03743      0.00000     -0.00000      0.00000     -0.17228     -0.00000      0.00000     -0.00000     -1.44334     -0.99557      0.34582     -0.00000      0.00000      0.00000      0.81515      0.14054 \n   </alphavectors>\n   <betavectors>\n     0.97652     -0.33569      0.00000     -0.00000      0.00000      0.14038      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.05882     -0.00000     -0.00000      0.00000      0.01428     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01233     -0.00000      0.00000     -0.00000     -0.02025     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.06336     -0.57125 \n     0.09021      1.01474     -0.00000      0.00000     -0.00000     -0.51182     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.22964      0.00000      0.00000     -0.00000     -0.05756      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02350      0.00000     -0.00000      0.00000      0.10790      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.26886      3.07736 \n     0.00000      0.00000     -0.00000      0.00000      0.98085      0.00000      0.00000      0.00000     -0.43829     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.16906     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02459     -0.00000     -0.00000      0.00000      0.00000     -0.04142      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.98085      0.00000     -0.00000      0.00000      0.00000     -0.43829      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.16906     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02459     -0.00000     -0.00000     -0.04142      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.98085     -0.00000      0.00000     -0.43829      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.16906      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02459     -0.00000     -0.00000     -0.00000     -0.04142     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.16333      0.05521     -0.00000      0.00000     -0.00000      1.06979      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.55530     -0.00000     -0.00000      0.00000      0.13688      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.18627     -0.00000      0.00000     -0.00000     -0.13562      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.64043     19.53742 \n     0.00000      0.00000     -0.00000      0.00000      0.05056     -0.00000     -0.00000     -0.00000      1.06095     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.57950      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.08747      0.00000      0.00000     -0.00000     -0.00000      0.14829      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.05056     -0.00000      0.00000     -0.00000     -0.00000      1.06095     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.57950     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.08747      0.00000      0.00000      0.14829      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.05056      0.00000     -0.00000      1.06095     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.57950      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.08747      0.00000      0.00000      0.00000      0.14829     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.09021     -0.05073      0.00000     -0.00000      0.00000      0.18770      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.17121      0.00000     -0.00000     -0.00000     -0.38623     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.03239      0.00000     -0.00000      0.00000      1.15044     -0.00000      0.00000     -0.00000     -0.00000      0.00000      5.94310      5.16138 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.01187     -0.00000     -0.00000     -0.00000      0.03133      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.11128     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.20333     -0.00000     -0.00000      0.00000      0.00000     -0.35734     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.01187     -0.00000      0.00000     -0.00000     -0.00000      0.03133      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.11128      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.20333     -0.00000     -0.00000     -0.35734     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.01187      0.00000     -0.00000      0.03133      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.11128     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.20333     -0.00000     -0.00000     -0.00000     -0.35734      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00601      0.00290     -0.00000      0.00000     -0.00000      0.00089      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00383      0.00000     -0.00000     -0.00000      0.58996      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      2.52864     -0.00000      0.00000     -0.00000      3.94835      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.42260     -0.24488 \n     0.00000      0.00000     -0.00000      0.00000      0.00352      0.00000      0.00000      0.00000     -0.00521     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.05812      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.32615      0.00000      0.00000     -0.00000     -0.00000      1.53444      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00352      0.00000     -0.00000      0.00000      0.00000     -0.00521     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.05812     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.32615      0.00000      0.00000      1.53444      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00352     -0.00000      0.00000     -0.00521     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05812      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.32615      0.00000      0.00000      0.00000      1.53444     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00176     -0.00077      0.00000     -0.00000      0.00000     -0.00031     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00074     -0.00000      0.00000      0.00000      0.48530     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -2.13058      0.00000     -0.00000      0.00000     -1.42116     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.42059      0.06907 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00186     -0.00000     -0.00000     -0.00000      0.00266      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.02319      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.74494     -0.00000     -0.00000      0.00000      0.00000     -1.32450     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00186     -0.00000      0.00000     -0.00000     -0.00000      0.00266      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02319      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.74494     -0.00000     -0.00000     -1.32450      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00186      0.00000     -0.00000      0.00266      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.02319     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.74494     -0.00000     -0.00000     -0.00000     -1.32450      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.09188      0.00086     -0.00000      0.00000     -0.00000     -0.00547     -0.00000     -0.00000     -0.00000     -0.38074     -0.00000     -0.00000      0.00000      0.89745     -0.00536     -0.00000      0.00000      0.00000      0.00147      0.05658     -0.26614     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00456     -0.00000     -0.00000      0.00000     -0.00617      0.09100     -0.30826      0.00000      0.00000     -0.00000     -0.01419     -9.73218 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.68853      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.47127     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.55670      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.68853      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.47127     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.55670      0.00000      0.00000 \n    -0.09188      0.00086     -0.00000      0.00000     -0.00000     -0.00547     -0.00000     -0.00000     -0.00000     -0.58684     -0.00000     -0.00000      0.00000     -0.77846     -0.00536     -0.00000      0.00000      0.00000      0.00147      0.20219      0.18207      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00456      0.00000      0.00000     -0.00000     -0.00617      0.22146      0.23293     -0.00000     -0.00000      0.00000     -0.01419     -9.73218 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.68853     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47127     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.55670      0.00000     -0.00000      0.00000 \n    -0.09188      0.00086     -0.00000      0.00000     -0.00000     -0.00547     -0.00000     -0.00000     -0.00000      0.96759     -0.00000     -0.00000      0.00000     -0.11899     -0.00536     -0.00000      0.00000      0.00000      0.00147     -0.25877      0.08407      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00456     -0.00000     -0.00000      0.00000     -0.00617     -0.31246      0.07532     -0.00000     -0.00000      0.00000     -0.01419     -9.73218 \n    -0.03428      0.01914     -0.00000      0.00000     -0.00000     -0.05622     -0.00000     -0.00000     -0.00000     -0.03005     -0.00000     -0.00000      0.00000      0.07083     -0.03582     -0.00000      0.00000      0.00000      0.01916     -0.14047      0.66071      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.02192      0.00000      0.00000     -0.00000     -0.23058     -0.28752      0.97398     -0.00000     -0.00000      0.00000     -2.82194     -1.88624 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.13326     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.16997      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.75894     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13326     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.16997      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.75894     -0.00000     -0.00000 \n    -0.03428      0.01914     -0.00000      0.00000     -0.00000     -0.05622     -0.00000     -0.00000     -0.00000     -0.04631     -0.00000     -0.00000      0.00000     -0.06144     -0.03582     -0.00000      0.00000      0.00000      0.01916     -0.50196     -0.45201     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.02192     -0.00000     -0.00000      0.00000     -0.23058     -0.69973     -0.73598      0.00000      0.00000     -0.00000     -2.82194     -1.88624 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13326      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.16997      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.75894     -0.00000      0.00000     -0.00000 \n    -0.03428      0.01914     -0.00000      0.00000     -0.00000     -0.05622     -0.00000     -0.00000     -0.00000      0.07636     -0.00000     -0.00000      0.00000     -0.00939     -0.03582     -0.00000      0.00000      0.00000      0.01916      0.64243     -0.20871     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.02192      0.00000      0.00000     -0.00000     -0.23058      0.98725     -0.23799      0.00000      0.00000     -0.00000     -2.82194     -1.88624 \n     0.00344     -0.00175      0.00000     -0.00000      0.00000     -0.00100     -0.00000     -0.00000     -0.00000      0.00746     -0.00000     -0.00000      0.00000     -0.01759      0.00748      0.00000     -0.00000     -0.00000      0.00376     -0.10469      0.49241      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.24059      0.00000      0.00000     -0.00000     -1.43915      0.29708     -1.00636      0.00000      0.00000     -0.00000      0.80608      0.14050 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03309      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.87194     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.81743      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03309      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.87194     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.81743      0.00000      0.00000 \n     0.00344     -0.00175      0.00000     -0.00000      0.00000     -0.00100     -0.00000     -0.00000     -0.00000      0.01150     -0.00000     -0.00000      0.00000      0.01526      0.00748      0.00000     -0.00000     -0.00000      0.00376     -0.37409     -0.33687     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.24059     -0.00000     -0.00000      0.00000     -1.43915      0.72300      0.76046     -0.00000     -0.00000      0.00000      0.80608      0.14050 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03309     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.87194     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.81743      0.00000     -0.00000      0.00000 \n     0.00344     -0.00175      0.00000     -0.00000      0.00000     -0.00100     -0.00000     -0.00000     -0.00000     -0.01896     -0.00000     -0.00000      0.00000      0.00233      0.00748      0.00000     -0.00000     -0.00000      0.00376      0.47878     -0.15554     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.24059      0.00000      0.00000     -0.00000     -1.43915     -1.02007      0.24591     -0.00000     -0.00000      0.00000      0.80608      0.14050 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ru\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17845     -0.67560      0.00000      0.00000      0.00000      0.67814      0.00000      0.00000      0.00000      0.12376      0.00000      0.00000      0.00000      0.00091      0.00000      0.00000      0.00000      0.00957      0.00000      0.00000      0.00000     -0.19195      0.00000      0.00000     -0.19195      0.00000     -0.19195     -0.09463      0.00000      0.00000     -0.09463      0.00000     -0.09463      0.00526      0.00000      0.00000      0.00526      0.00000      0.00526 \n    -0.67560      2.72579      0.00000      0.00000      0.00000     -1.22056      0.00000      0.00000      0.00000      0.27914      0.00000      0.00000      0.00000     -0.04380      0.00000      0.00000      0.00000     -0.02579      0.00000      0.00000      0.00000     -0.01995      0.00000      0.00000     -0.01995      0.00000     -0.01995      0.07932      0.00000      0.00000      0.07932      0.00000      0.07932      0.00195      0.00000      0.00000      0.00195      0.00000      0.00195 \n     0.00000      0.00000      2.37453      0.00000      0.00000      0.00000     -1.04590      0.00000      0.00000      0.00000      0.33726      0.00000      0.00000      0.00000      0.03137      0.00000      0.00000      0.00000     -0.01397      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.37453      0.00000      0.00000      0.00000     -1.04590      0.00000      0.00000      0.00000      0.33726      0.00000      0.00000      0.00000      0.03137      0.00000      0.00000      0.00000     -0.01397      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.37453      0.00000      0.00000      0.00000     -1.04590      0.00000      0.00000      0.00000      0.33726      0.00000      0.00000      0.00000      0.03137      0.00000      0.00000      0.00000     -0.01397      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.67814     -1.22056      0.00000      0.00000      0.00000      3.03445      0.00000      0.00000      0.00000     -0.93172      0.00000      0.00000      0.00000      0.11655      0.00000      0.00000      0.00000      0.06284      0.00000      0.00000      0.00000     -0.04197      0.00000      0.00000     -0.04197      0.00000     -0.04197     -0.10311      0.00000      0.00000     -0.10311      0.00000     -0.10311     -0.00835      0.00000      0.00000     -0.00835      0.00000     -0.00835 \n     0.00000      0.00000     -1.04590      0.00000      0.00000      0.00000      2.96758      0.00000      0.00000      0.00000     -1.26324      0.00000      0.00000      0.00000     -0.07917      0.00000      0.00000      0.00000      0.03312      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.04590      0.00000      0.00000      0.00000      2.96758      0.00000      0.00000      0.00000     -1.26324      0.00000      0.00000      0.00000     -0.07917      0.00000      0.00000      0.00000      0.03312      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.04590      0.00000      0.00000      0.00000      2.96758      0.00000      0.00000      0.00000     -1.26324      0.00000      0.00000      0.00000     -0.07917      0.00000      0.00000      0.00000      0.03312      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.12376      0.27914      0.00000      0.00000      0.00000     -0.93172      0.00000      0.00000      0.00000      2.93572      0.00000      0.00000      0.00000     -0.29507      0.00000      0.00000      0.00000     -0.16382      0.00000      0.00000      0.00000     -0.03149      0.00000      0.00000     -0.03149      0.00000     -0.03149     -0.09987      0.00000      0.00000     -0.09987      0.00000     -0.09987      0.00871      0.00000      0.00000      0.00871      0.00000      0.00871 \n     0.00000      0.00000      0.33726      0.00000      0.00000      0.00000     -1.26324      0.00000      0.00000      0.00000      2.50078      0.00000      0.00000      0.00000      0.13000      0.00000      0.00000      0.00000     -0.05270      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.33726      0.00000      0.00000      0.00000     -1.26324      0.00000      0.00000      0.00000      2.50078      0.00000      0.00000      0.00000      0.13000      0.00000      0.00000      0.00000     -0.05270      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.33726      0.00000      0.00000      0.00000     -1.26324      0.00000      0.00000      0.00000      2.50078      0.00000      0.00000      0.00000      0.13000      0.00000      0.00000      0.00000     -0.05270      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00091     -0.04380      0.00000      0.00000      0.00000      0.11655      0.00000      0.00000      0.00000     -0.29507      0.00000      0.00000      0.00000      0.52071      0.00000      0.00000      0.00000      0.27401      0.00000      0.00000      0.00000      0.00178      0.00000      0.00000      0.00178      0.00000      0.00178      0.01420      0.00000      0.00000      0.01420      0.00000      0.01420      0.01561      0.00000      0.00000      0.01561      0.00000      0.01561 \n     0.00000      0.00000      0.03137      0.00000      0.00000      0.00000     -0.07917      0.00000      0.00000      0.00000      0.13000      0.00000      0.00000      0.00000      0.00688      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03137      0.00000      0.00000      0.00000     -0.07917      0.00000      0.00000      0.00000      0.13000      0.00000      0.00000      0.00000      0.00688      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03137      0.00000      0.00000      0.00000     -0.07917      0.00000      0.00000      0.00000      0.13000      0.00000      0.00000      0.00000      0.00688      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00957     -0.02579      0.00000      0.00000      0.00000      0.06284      0.00000      0.00000      0.00000     -0.16382      0.00000      0.00000      0.00000      0.27401      0.00000      0.00000      0.00000      0.15060      0.00000      0.00000      0.00000      0.00020      0.00000      0.00000      0.00020      0.00000      0.00020      0.00746      0.00000      0.00000      0.00746      0.00000      0.00746      0.00807      0.00000      0.00000      0.00807      0.00000      0.00807 \n     0.00000      0.00000     -0.01397      0.00000      0.00000      0.00000      0.03312      0.00000      0.00000      0.00000     -0.05270      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00114      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01397      0.00000      0.00000      0.00000      0.03312      0.00000      0.00000      0.00000     -0.05270      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00114      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01397      0.00000      0.00000      0.00000      0.03312      0.00000      0.00000      0.00000     -0.05270      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00114      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.19195     -0.01995      0.00000      0.00000      0.00000     -0.04197      0.00000      0.00000      0.00000     -0.03149      0.00000      0.00000      0.00000      0.00178      0.00000      0.00000      0.00000      0.00020      0.00000      0.00000      0.00000      2.02861      0.00000      0.00000     -0.98490      0.00000     -0.98491     -0.11310      0.00000      0.00000      0.06822      0.00000      0.06822     -0.22968      0.00000      0.00000      0.11398      0.00000      0.11399 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.02706      0.00000      0.00000      0.00000      0.00000      0.00000     -0.36261      0.00000      0.00000      0.00000      0.00000      0.00000     -0.68733      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.02706      0.00000      0.00000      0.00000      0.00000      0.00000     -0.36261      0.00000      0.00000      0.00000      0.00000      0.00000     -0.68733      0.00000      0.00000      0.00000 \n    -0.19195     -0.01995      0.00000      0.00000      0.00000     -0.04197      0.00000      0.00000      0.00000     -0.03149      0.00000      0.00000      0.00000      0.00178      0.00000      0.00000      0.00000      0.00020      0.00000      0.00000      0.00000     -0.98490      0.00000      0.00000      2.02861      0.00000     -0.98491      0.06823      0.00000      0.00000     -0.11310      0.00000      0.06822      0.11399      0.00000      0.00000     -0.22969      0.00000      0.11398 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.02706      0.00000      0.00000      0.00000      0.00000      0.00000     -0.36261      0.00000      0.00000      0.00000      0.00000      0.00000     -0.68733      0.00000 \n    -0.19195     -0.01995      0.00000      0.00000      0.00000     -0.04197      0.00000      0.00000      0.00000     -0.03149      0.00000      0.00000      0.00000      0.00178      0.00000      0.00000      0.00000      0.00020      0.00000      0.00000      0.00000     -0.98491      0.00000      0.00000     -0.98491      0.00000      2.02862      0.06821      0.00000      0.00000      0.06822      0.00000     -0.11310      0.11398      0.00000      0.00000      0.11399      0.00000     -0.22969 \n    -0.09463      0.07932      0.00000      0.00000      0.00000     -0.10311      0.00000      0.00000      0.00000     -0.09987      0.00000      0.00000      0.00000      0.01420      0.00000      0.00000      0.00000      0.00746      0.00000      0.00000      0.00000     -0.11310      0.00000      0.00000      0.06823      0.00000      0.06821      0.68185      0.00000      0.00000     -0.32310      0.00000     -0.32310      0.46510      0.00000      0.00000     -0.23256      0.00000     -0.23256 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.36261      0.00000      0.00000      0.00000      0.00000      0.00000      2.00989      0.00000      0.00000      0.00000      0.00000      0.00000      1.39531      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.36261      0.00000      0.00000      0.00000      0.00000      0.00000      2.00989      0.00000      0.00000      0.00000      0.00000      0.00000      1.39531      0.00000      0.00000      0.00000 \n    -0.09463      0.07932      0.00000      0.00000      0.00000     -0.10311      0.00000      0.00000      0.00000     -0.09987      0.00000      0.00000      0.00000      0.01420      0.00000      0.00000      0.00000      0.00746      0.00000      0.00000      0.00000      0.06822      0.00000      0.00000     -0.11310      0.00000      0.06822     -0.32310      0.00000      0.00000      0.68184      0.00000     -0.32310     -0.23256      0.00000      0.00000      0.46510      0.00000     -0.23256 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.36261      0.00000      0.00000      0.00000      0.00000      0.00000      2.00989      0.00000      0.00000      0.00000      0.00000      0.00000      1.39531      0.00000 \n    -0.09463      0.07932      0.00000      0.00000      0.00000     -0.10311      0.00000      0.00000      0.00000     -0.09987      0.00000      0.00000      0.00000      0.01420      0.00000      0.00000      0.00000      0.00746      0.00000      0.00000      0.00000      0.06822      0.00000      0.00000      0.06822      0.00000     -0.11310     -0.32310      0.00000      0.00000     -0.32310      0.00000      0.68184     -0.23256      0.00000      0.00000     -0.23256      0.00000      0.46509 \n     0.00526      0.00195      0.00000      0.00000      0.00000     -0.00835      0.00000      0.00000      0.00000      0.00871      0.00000      0.00000      0.00000      0.01561      0.00000      0.00000      0.00000      0.00807      0.00000      0.00000      0.00000     -0.22968      0.00000      0.00000      0.11399      0.00000      0.11398      0.46510      0.00000      0.00000     -0.23256      0.00000     -0.23256      0.33412      0.00000      0.00000     -0.16614      0.00000     -0.16614 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.68733      0.00000      0.00000      0.00000      0.00000      0.00000      1.39531      0.00000      0.00000      0.00000      0.00000      0.00000      1.00051      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.68733      0.00000      0.00000      0.00000      0.00000      0.00000      1.39531      0.00000      0.00000      0.00000      0.00000      0.00000      1.00051      0.00000      0.00000      0.00000 \n     0.00526      0.00195      0.00000      0.00000      0.00000     -0.00835      0.00000      0.00000      0.00000      0.00871      0.00000      0.00000      0.00000      0.01561      0.00000      0.00000      0.00000      0.00807      0.00000      0.00000      0.00000      0.11398      0.00000      0.00000     -0.22969      0.00000      0.11399     -0.23256      0.00000      0.00000      0.46510      0.00000     -0.23256     -0.16614      0.00000      0.00000      0.33412      0.00000     -0.16614 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.68733      0.00000      0.00000      0.00000      0.00000      0.00000      1.39531      0.00000      0.00000      0.00000      0.00000      0.00000      1.00051      0.00000 \n     0.00526      0.00195      0.00000      0.00000      0.00000     -0.00835      0.00000      0.00000      0.00000      0.00871      0.00000      0.00000      0.00000      0.01561      0.00000      0.00000      0.00000      0.00807      0.00000      0.00000      0.00000      0.11399      0.00000      0.00000      0.11398      0.00000     -0.22969     -0.23256      0.00000      0.00000     -0.23256      0.00000      0.46509     -0.16614      0.00000      0.00000     -0.16614      0.00000      0.33412 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99998      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.37583      0.37583      0.37583      0.37583      0.37583      0.12083      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -778.48330   -110.25550   -101.73420   -101.73420   -101.73420    -19.41120    -15.91104    -15.91104    -15.91104    -10.22902    -10.22902    -10.22902    -10.22902    -10.22902     -2.62893     -1.58845     -1.58845     -1.58845     -0.19784     -0.19784     -0.19784     -0.19784     -0.19784     -0.15283     -0.03427     -0.03427     -0.03427      0.04822      0.10049      0.10049      0.10049      0.48587      0.91656      0.91656      0.91656      0.91656      0.91656      3.05473    151.70130 \n   </alphaeps>\n   <betaeps>\n  -778.48240   -110.24090   -101.72330   -101.72330   -101.72330    -19.39996    -15.89791    -15.89791    -15.89791    -10.21365    -10.21365    -10.21365    -10.21365    -10.21365     -2.55798     -1.51427     -1.51427     -1.51427     -0.12350     -0.12350     -0.12350     -0.12350     -0.12350     -0.11142     -0.01294     -0.01294     -0.01294      0.06415      0.12458      0.12458      0.12458      0.52587      0.97849      0.97849      0.97849      0.97849      0.97849      3.11707    151.72420 \n   </betaeps>\n   <alphavectors>\n     0.97587     -0.33643     -0.00000      0.00000     -0.00000      0.14141     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05972      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.01590      0.00000     -0.00000      0.00000      0.01177     -0.00000      0.00000      0.00000     -0.02034     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.06348     -0.59955 \n     0.09361      1.01588      0.00000     -0.00000      0.00000     -0.51529      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.23283     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06237     -0.00000      0.00000     -0.00000     -0.02239      0.00000     -0.00000     -0.00000      0.10814      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.27123      3.24519 \n     0.00000     -0.00000     -0.00000      0.00000      0.98037     -0.00000      0.00000     -0.44257     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.17397     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02849      0.00000      0.00000      0.00000      0.00000     -0.03909     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.98037     -0.00000     -0.00000     -0.44257     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.17397      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02849      0.00000     -0.00000     -0.03909     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.98037     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.44257      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.17397     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02849     -0.00000      0.00000      0.00000     -0.03909     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.17735      0.06143      0.00000     -0.00000      0.00000      1.07108     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.56493      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.15712      0.00000     -0.00000      0.00000      0.17727     -0.00000      0.00000      0.00000     -0.13857     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.65942     20.09065 \n     0.00000     -0.00000     -0.00000      0.00000      0.05149      0.00000     -0.00000      1.06213      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.59418     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.10114     -0.00000     -0.00000     -0.00000     -0.00000      0.13959      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.05149      0.00000      0.00000      1.06213      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.59418      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.10114     -0.00000      0.00000      0.13959      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.05149      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.06213     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.59418      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.10114      0.00000     -0.00000     -0.00000      0.13959      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.09201     -0.05074     -0.00000      0.00000     -0.00000      0.19513     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.14441     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.40140     -0.00000      0.00000     -0.00000     -0.03959      0.00000     -0.00000     -0.00000      1.15239     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      6.47063      4.76384 \n     0.00000      0.00000      0.00000     -0.00000     -0.01226      0.00000     -0.00000      0.03117     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.11779      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.23163      0.00000      0.00000      0.00000      0.00000     -0.32987     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.01226      0.00000      0.00000      0.03117     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.11779     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.23163      0.00000     -0.00000     -0.32987     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.01226     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.03117      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.11779     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.23163     -0.00000      0.00000      0.00000     -0.32987     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00496      0.00222      0.00000     -0.00000      0.00000      0.00204     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00421     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.69561      0.00000     -0.00000      0.00000      2.28241     -0.00000      0.00000     -0.00000      3.83495     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.31230     -0.17577 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00348     -0.00000      0.00000     -0.00488      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05805     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.47297     -0.00000     -0.00000     -0.00000     -0.00000      1.47543      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00348     -0.00000     -0.00000     -0.00488      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05805     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.47297     -0.00000      0.00000      1.47543      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00348     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00488     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05805      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.47297      0.00000     -0.00000     -0.00000      1.47543      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00147     -0.00059     -0.00000      0.00000     -0.00000     -0.00063      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00093      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.34500      0.00000     -0.00000      0.00000     -2.07677      0.00000     -0.00000      0.00000     -1.40557      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.39266      0.05003 \n     0.00000      0.00000      0.00000     -0.00000     -0.00183      0.00000     -0.00000      0.00248     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02361      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.61426      0.00000      0.00000      0.00000      0.00000     -1.37178     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00183      0.00000      0.00000      0.00248     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.02361     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.61426      0.00000     -0.00000     -1.37178     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00183      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00248      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02361      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.61426     -0.00000      0.00000      0.00000     -1.37178     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.09868     -0.00239     -0.00000      0.00000     -0.00000     -0.00558      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.88947     -0.39634     -0.00487      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.20687      0.19704      0.00113      0.00000     -0.00000     -0.00000     -0.00442     -0.00000     -0.00000     -0.00000     -0.00583      0.00000     -0.00000      0.00000      0.19529      0.26229     -0.00624     -9.97387 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.68664      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.49483      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.56639      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.68664     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.49483     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.56639      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.09868     -0.00239     -0.00000      0.00000     -0.00000     -0.00558      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.78797     -0.57214     -0.00487      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.27408      0.08063      0.00113     -0.00000      0.00000      0.00000     -0.00442      0.00000      0.00000      0.00000     -0.00583     -0.00000      0.00000     -0.00000     -0.32479      0.03798     -0.00624     -9.97387 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68664      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.49483      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.56639      0.00000      0.00000      0.00000      0.00000 \n    -0.09868     -0.00239     -0.00000      0.00000     -0.00000     -0.00558      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.10150      0.96848     -0.00487      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06721     -0.27767      0.00113      0.00000     -0.00000     -0.00000     -0.00442     -0.00000     -0.00000     -0.00000     -0.00583     -0.00000      0.00000     -0.00000      0.12950     -0.30027     -0.00624     -9.97387 \n    -0.03515      0.01916      0.00000     -0.00000      0.00000     -0.05890      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.07096     -0.03162     -0.02229      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.50150     -0.47767      0.01908     -0.00000      0.00000      0.00000      0.02318      0.00000      0.00000      0.00000     -0.23268     -0.00000      0.00000     -0.00000     -0.59867     -0.80407     -3.03634     -1.75361 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.13456     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.19958     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.73632     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13456      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.19958      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73632     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.03515      0.01916      0.00000     -0.00000      0.00000     -0.05890      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06286     -0.04564     -0.02229      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.66442     -0.19548      0.01908      0.00000     -0.00000     -0.00000      0.02318     -0.00000     -0.00000     -0.00000     -0.23268      0.00000     -0.00000      0.00000      0.99568     -0.11643     -3.03634     -1.75361 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.13456      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.19958     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73632     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.03515      0.01916      0.00000     -0.00000      0.00000     -0.05890      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00810      0.07726     -0.02229      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.16292      0.67314      0.01908     -0.00000      0.00000      0.00000      0.02318      0.00000      0.00000      0.00000     -0.23268      0.00000     -0.00000      0.00000     -0.39701      0.92050     -3.03634     -1.75361 \n     0.00280     -0.00132     -0.00000      0.00000     -0.00000     -0.00186      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.01702      0.00758      0.00770     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.35537     -0.33848      0.02127     -0.00000      0.00000      0.00000     -0.18317      0.00000      0.00000      0.00000     -1.38934     -0.00000      0.00000     -0.00000      0.62673      0.84175      0.74862      0.09812 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.03227      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.85004      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.81769     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.03227      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.85004     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.81769     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00280     -0.00132     -0.00000      0.00000     -0.00000     -0.00186      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.01508      0.01095      0.00770     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.47082     -0.13852      0.02127      0.00000     -0.00000     -0.00000     -0.18317     -0.00000     -0.00000     -0.00000     -1.38934      0.00000     -0.00000      0.00000     -1.04234      0.12189      0.74862      0.09812 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.03227     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.85004      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.81769      0.00000      0.00000      0.00000     -0.00000 \n     0.00280     -0.00132     -0.00000      0.00000     -0.00000     -0.00186      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00194     -0.01853      0.00770     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.11545      0.47700      0.02127     -0.00000      0.00000      0.00000     -0.18317      0.00000      0.00000      0.00000     -1.38934      0.00000     -0.00000      0.00000      0.41561     -0.96364      0.74862      0.09812 \n   </alphavectors>\n   <betavectors>\n     0.97587     -0.33645     -0.00000      0.00000     -0.00000      0.14143     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05983     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.01432      0.00000      0.00000      0.00000      0.01247      0.00000     -0.00000      0.00000     -0.02076      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.06336     -0.59955 \n     0.09361      1.01597      0.00000     -0.00000      0.00000     -0.51535      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.23333      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.05789     -0.00000     -0.00000     -0.00000     -0.02425     -0.00000      0.00000     -0.00000      0.10889     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.27084      3.24519 \n    -0.00000     -0.00000     -0.00000      0.00000      0.98039     -0.00000     -0.44264      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.17370      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.02332     -0.00000     -0.00000     -0.04241     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.98039     -0.00000     -0.00000      0.00000     -0.44264      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.17370      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02332     -0.00000      0.00000      0.00000     -0.00000     -0.04241     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.98039      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.44264     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.17370     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.02332      0.00000     -0.00000      0.00000     -0.04241     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.17734      0.06179      0.00000     -0.00000      0.00000      1.07190     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.56715     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.13732      0.00000      0.00000      0.00000      0.18623      0.00000     -0.00000      0.00000     -0.14525     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.65836     20.09059 \n    -0.00000     -0.00000     -0.00000      0.00000      0.05145      0.00000      1.06246     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.59354      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.08270      0.00000      0.00000      0.15142      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.05145      0.00000      0.00000     -0.00000      1.06246     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.59354     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.08270      0.00000     -0.00000     -0.00000      0.00000      0.15142      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.05145     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.06246      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.59354      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08270     -0.00000      0.00000     -0.00000      0.15142      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.09201     -0.05056     -0.00000      0.00000     -0.00000      0.19377     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.16191      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.37739     -0.00000     -0.00000     -0.00000     -0.03874     -0.00000      0.00000      0.00000      1.14035     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      6.47105      4.76396 \n     0.00000      0.00000      0.00000     -0.00000     -0.01224      0.00000      0.03054      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.11764     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.18815     -0.00000     -0.00000     -0.35701     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.01224      0.00000      0.00000     -0.00000      0.03054      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.11764      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.18815     -0.00000      0.00000      0.00000     -0.00000     -0.35701     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.01224     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.03054     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.11764     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.18815      0.00000     -0.00000      0.00000     -0.35701      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00496      0.00221      0.00000     -0.00000      0.00000      0.00200     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00415      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.55144     -0.00000      0.00000      0.00000      2.46853      0.00000      0.00000      0.00000      3.74638      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.29968     -0.17573 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00348     -0.00000     -0.00477     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05860      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.28128      0.00000      0.00000      1.52362     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00348     -0.00000     -0.00000      0.00000     -0.00477     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.05860     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.28128      0.00000     -0.00000     -0.00000      0.00000      1.52362     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00348      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00477     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.05860     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.28128     -0.00000      0.00000     -0.00000      1.52362     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00147     -0.00058     -0.00000      0.00000     -0.00000     -0.00062      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00091     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.51114     -0.00000      0.00000      0.00000     -2.08316      0.00000     -0.00000     -0.00000     -1.34551     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.38808      0.05002 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00182      0.00000      0.00242      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.02371     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.78390     -0.00000     -0.00000     -1.28242     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00182      0.00000      0.00000     -0.00000      0.00242     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02371     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.78390     -0.00000      0.00000      0.00000     -0.00000     -1.28242      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00182     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00242     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02371      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.78390      0.00000     -0.00000      0.00000     -1.28242     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.09868     -0.00259     -0.00000      0.00000     -0.00000     -0.00580      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.97354      0.03278     -0.00455     -0.00000     -0.00000      0.00000     -0.27119      0.08397      0.00000     -0.00000     -0.00000      0.00134      0.00000     -0.00000      0.00000     -0.00457      0.00000     -0.00000      0.00000     -0.00546      0.20202      0.25793      0.00000      0.00000     -0.00000     -0.00616     -9.97387 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.68718      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.49172      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.56747      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.68718     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.49172      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.56747     -0.00000      0.00000 \n    -0.09868     -0.00259     -0.00000      0.00000     -0.00000     -0.00580      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.51516      0.82672     -0.00455     -0.00000     -0.00000      0.00000      0.20832      0.19287      0.00000     -0.00000     -0.00000      0.00134     -0.00000     -0.00000      0.00000     -0.00457     -0.00000      0.00000      0.00000     -0.00546      0.12236     -0.30392     -0.00000     -0.00000      0.00000     -0.00616     -9.97387 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.68718      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.49172     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.56747      0.00000      0.00000      0.00000 \n    -0.09868     -0.00259     -0.00000      0.00000     -0.00000     -0.00580      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.45838     -0.85950     -0.00455     -0.00000     -0.00000      0.00000      0.06287     -0.27685     -0.00000      0.00000      0.00000      0.00134      0.00000      0.00000     -0.00000     -0.00457      0.00000     -0.00000     -0.00000     -0.00546     -0.32439      0.04599      0.00000      0.00000     -0.00000     -0.00616     -9.97387 \n    -0.03515      0.01909      0.00000     -0.00000      0.00000     -0.05852      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.07679      0.00259     -0.02996     -0.00000     -0.00000      0.00000      0.65807     -0.20376     -0.00000      0.00000      0.00000      0.01430     -0.00000      0.00000     -0.00000      0.01798     -0.00000      0.00000     -0.00000     -0.22441     -0.61974     -0.79125     -0.00000     -0.00000      0.00000     -3.03695     -1.75364 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.13308     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.19320     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.74082     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.13308      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.19320     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.74082      0.00000     -0.00000 \n    -0.03515      0.01909      0.00000     -0.00000      0.00000     -0.05852      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.04063      0.06521     -0.02996     -0.00000     -0.00000      0.00000     -0.50550     -0.46802     -0.00000      0.00000      0.00000      0.01430      0.00000      0.00000     -0.00000      0.01798      0.00000     -0.00000     -0.00000     -0.22441     -0.37537      0.93234      0.00000      0.00000     -0.00000     -3.03695     -1.75364 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13308      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.19320      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.74082     -0.00000     -0.00000     -0.00000 \n    -0.03515      0.01909      0.00000     -0.00000      0.00000     -0.05852      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.03615     -0.06779     -0.02996     -0.00000     -0.00000      0.00000     -0.15257      0.67179      0.00000     -0.00000     -0.00000      0.01430     -0.00000     -0.00000      0.00000      0.01798     -0.00000      0.00000      0.00000     -0.22441      0.99511     -0.14109     -0.00000     -0.00000      0.00000     -3.03695     -1.75364 \n     0.00280     -0.00131     -0.00000      0.00000     -0.00000     -0.00183      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01845     -0.00062      0.00779      0.00000      0.00000     -0.00000      0.47252     -0.14631     -0.00000      0.00000      0.00000      0.01190     -0.00000      0.00000     -0.00000     -0.22849     -0.00000      0.00000     -0.00000     -1.38504      0.64598      0.82475      0.00000      0.00000     -0.00000      0.74433      0.09810 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.03197     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.85677      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.81453     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.03197      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.85677      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.81453      0.00000     -0.00000 \n     0.00280     -0.00131     -0.00000      0.00000     -0.00000     -0.00183      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00976     -0.01567      0.00779      0.00000      0.00000     -0.00000     -0.36297     -0.33606     -0.00000      0.00000      0.00000      0.01190      0.00000      0.00000     -0.00000     -0.22849      0.00000     -0.00000     -0.00000     -1.38504      0.39127     -0.97181     -0.00000     -0.00000      0.00000      0.74433      0.09810 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03197     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.85677     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.81453     -0.00000     -0.00000     -0.00000 \n     0.00280     -0.00131     -0.00000      0.00000     -0.00000     -0.00183      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00869      0.01629      0.00779      0.00000      0.00000     -0.00000     -0.10955      0.48237      0.00000     -0.00000     -0.00000      0.01190     -0.00000     -0.00000      0.00000     -0.22849     -0.00000      0.00000      0.00000     -1.38504     -1.03724      0.14706      0.00000      0.00000     -0.00000      0.74433      0.09810 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Rh\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17808     -0.67506      0.00000      0.00000      0.00000      0.70395      0.00000      0.00000      0.00000      0.12823      0.00000      0.00000      0.00000      0.00180      0.00000      0.00000      0.00000      0.00862      0.00000      0.00000      0.00000     -0.20200      0.00000      0.00000     -0.20200      0.00000     -0.20200     -0.09763      0.00000      0.00000     -0.09763      0.00000     -0.09763      0.00324      0.00000      0.00000      0.00324      0.00000      0.00324 \n    -0.67506      2.74258      0.00000      0.00000      0.00000     -1.22004      0.00000      0.00000      0.00000      0.27662      0.00000      0.00000      0.00000     -0.03899      0.00000      0.00000      0.00000     -0.02434      0.00000      0.00000      0.00000     -0.02878      0.00000      0.00000     -0.02878      0.00000     -0.02878      0.08275      0.00000      0.00000      0.08275      0.00000      0.08275      0.00444      0.00000      0.00000      0.00444      0.00000      0.00444 \n     0.00000      0.00000      2.38087      0.00000      0.00000      0.00000     -1.06019      0.00000      0.00000      0.00000      0.34719      0.00000      0.00000      0.00000      0.03124      0.00000      0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.38087      0.00000      0.00000      0.00000     -1.06019      0.00000      0.00000      0.00000      0.34719      0.00000      0.00000      0.00000      0.03124      0.00000      0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.38087      0.00000      0.00000      0.00000     -1.06019      0.00000      0.00000      0.00000      0.34719      0.00000      0.00000      0.00000      0.03124      0.00000      0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.70395     -1.22004      0.00000      0.00000      0.00000      3.07754      0.00000      0.00000      0.00000     -0.94190      0.00000      0.00000      0.00000      0.10101      0.00000      0.00000      0.00000      0.05985      0.00000      0.00000      0.00000     -0.04807      0.00000      0.00000     -0.04808      0.00000     -0.04807     -0.10938      0.00000      0.00000     -0.10938      0.00000     -0.10938     -0.01261      0.00000      0.00000     -0.01261      0.00000     -0.01261 \n     0.00000      0.00000     -1.06019      0.00000      0.00000      0.00000      3.00058      0.00000      0.00000      0.00000     -1.29794      0.00000      0.00000      0.00000     -0.07946      0.00000      0.00000      0.00000      0.03310      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.06019      0.00000      0.00000      0.00000      3.00058      0.00000      0.00000      0.00000     -1.29794      0.00000      0.00000      0.00000     -0.07946      0.00000      0.00000      0.00000      0.03310      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.06019      0.00000      0.00000      0.00000      3.00058      0.00000      0.00000      0.00000     -1.29794      0.00000      0.00000      0.00000     -0.07946      0.00000      0.00000      0.00000      0.03310      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.12823      0.27662      0.00000      0.00000      0.00000     -0.94190      0.00000      0.00000      0.00000      2.92004      0.00000      0.00000      0.00000     -0.24215      0.00000      0.00000      0.00000     -0.15408      0.00000      0.00000      0.00000     -0.03075      0.00000      0.00000     -0.03074      0.00000     -0.03075     -0.09613      0.00000      0.00000     -0.09613      0.00000     -0.09613      0.01265      0.00000      0.00000      0.01265      0.00000      0.01265 \n     0.00000      0.00000      0.34719      0.00000      0.00000      0.00000     -1.29794      0.00000      0.00000      0.00000      2.52566      0.00000      0.00000      0.00000      0.13068      0.00000      0.00000      0.00000     -0.05304      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.34719      0.00000      0.00000      0.00000     -1.29794      0.00000      0.00000      0.00000      2.52566      0.00000      0.00000      0.00000      0.13068      0.00000      0.00000      0.00000     -0.05304      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.34719      0.00000      0.00000      0.00000     -1.29794      0.00000      0.00000      0.00000      2.52566      0.00000      0.00000      0.00000      0.13068      0.00000      0.00000      0.00000     -0.05304      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00180     -0.03899      0.00000      0.00000      0.00000      0.10101      0.00000      0.00000      0.00000     -0.24215      0.00000      0.00000      0.00000      0.45198      0.00000      0.00000      0.00000      0.26567      0.00000      0.00000      0.00000      0.00141      0.00000      0.00000      0.00140      0.00000      0.00141      0.00752      0.00000      0.00000      0.00752      0.00000      0.00752      0.00745      0.00000      0.00000      0.00745      0.00000      0.00745 \n     0.00000      0.00000      0.03124      0.00000      0.00000      0.00000     -0.07946      0.00000      0.00000      0.00000      0.13068      0.00000      0.00000      0.00000      0.00687      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03124      0.00000      0.00000      0.00000     -0.07946      0.00000      0.00000      0.00000      0.13068      0.00000      0.00000      0.00000      0.00687      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03124      0.00000      0.00000      0.00000     -0.07946      0.00000      0.00000      0.00000      0.13068      0.00000      0.00000      0.00000      0.00687      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00862     -0.02434      0.00000      0.00000      0.00000      0.05985      0.00000      0.00000      0.00000     -0.15408      0.00000      0.00000      0.00000      0.26567      0.00000      0.00000      0.00000      0.15658      0.00000      0.00000      0.00000      0.00018      0.00000      0.00000      0.00017      0.00000      0.00018      0.00472      0.00000      0.00000      0.00472      0.00000      0.00472      0.00435      0.00000      0.00000      0.00435      0.00000      0.00435 \n     0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.03310      0.00000      0.00000      0.00000     -0.05304      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00114      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.03310      0.00000      0.00000      0.00000     -0.05304      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00114      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01382      0.00000      0.00000      0.00000      0.03310      0.00000      0.00000      0.00000     -0.05304      0.00000      0.00000      0.00000     -0.00279      0.00000      0.00000      0.00000      0.00114      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.20200     -0.02878      0.00000      0.00000      0.00000     -0.04807      0.00000      0.00000      0.00000     -0.03075      0.00000      0.00000      0.00000      0.00141      0.00000      0.00000      0.00000      0.00018      0.00000      0.00000      0.00000      2.05617      0.00000      0.00000     -0.99471      0.00000     -0.99470     -0.17244      0.00000      0.00000      0.09857      0.00000      0.09858     -0.26503      0.00000      0.00000      0.13183      0.00000      0.13182 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.10180      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54204      0.00000      0.00000      0.00000      0.00000      0.00000     -0.79372      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.10181      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54206      0.00000      0.00000      0.00000      0.00000      0.00000     -0.79374      0.00000      0.00000      0.00000 \n    -0.20200     -0.02878      0.00000      0.00000      0.00000     -0.04808      0.00000      0.00000      0.00000     -0.03074      0.00000      0.00000      0.00000      0.00140      0.00000      0.00000      0.00000      0.00017      0.00000      0.00000      0.00000     -0.99471      0.00000      0.00000      2.05618      0.00000     -0.99471      0.09858      0.00000      0.00000     -0.17244      0.00000      0.09858      0.13183      0.00000      0.00000     -0.26503      0.00000      0.13183 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.10180      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54204      0.00000      0.00000      0.00000      0.00000      0.00000     -0.79372      0.00000 \n    -0.20200     -0.02878      0.00000      0.00000      0.00000     -0.04807      0.00000      0.00000      0.00000     -0.03075      0.00000      0.00000      0.00000      0.00141      0.00000      0.00000      0.00000      0.00018      0.00000      0.00000      0.00000     -0.99470      0.00000      0.00000     -0.99471      0.00000      2.05617      0.09858      0.00000      0.00000      0.09857      0.00000     -0.17244      0.13182      0.00000      0.00000      0.13183      0.00000     -0.26503 \n    -0.09763      0.08275      0.00000      0.00000      0.00000     -0.10938      0.00000      0.00000      0.00000     -0.09613      0.00000      0.00000      0.00000      0.00752      0.00000      0.00000      0.00000      0.00472      0.00000      0.00000      0.00000     -0.17244      0.00000      0.00000      0.09858      0.00000      0.09858      0.80798      0.00000      0.00000     -0.38582      0.00000     -0.38583      0.54130      0.00000      0.00000     -0.27080      0.00000     -0.27080 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54204      0.00000      0.00000      0.00000      0.00000      0.00000      2.38757      0.00000      0.00000      0.00000      0.00000      0.00000      1.62418      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54206      0.00000      0.00000      0.00000      0.00000      0.00000      2.38762      0.00000      0.00000      0.00000      0.00000      0.00000      1.62421      0.00000      0.00000      0.00000 \n    -0.09763      0.08275      0.00000      0.00000      0.00000     -0.10938      0.00000      0.00000      0.00000     -0.09613      0.00000      0.00000      0.00000      0.00752      0.00000      0.00000      0.00000      0.00472      0.00000      0.00000      0.00000      0.09857      0.00000      0.00000     -0.17244      0.00000      0.09857     -0.38582      0.00000      0.00000      0.80798      0.00000     -0.38582     -0.27080      0.00000      0.00000      0.54131      0.00000     -0.27080 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54204      0.00000      0.00000      0.00000      0.00000      0.00000      2.38757      0.00000      0.00000      0.00000      0.00000      0.00000      1.62418      0.00000 \n    -0.09763      0.08275      0.00000      0.00000      0.00000     -0.10938      0.00000      0.00000      0.00000     -0.09613      0.00000      0.00000      0.00000      0.00752      0.00000      0.00000      0.00000      0.00472      0.00000      0.00000      0.00000      0.09858      0.00000      0.00000      0.09858      0.00000     -0.17244     -0.38583      0.00000      0.00000     -0.38582      0.00000      0.80798     -0.27080      0.00000      0.00000     -0.27080      0.00000      0.54130 \n     0.00324      0.00444      0.00000      0.00000      0.00000     -0.01261      0.00000      0.00000      0.00000      0.01265      0.00000      0.00000      0.00000      0.00745      0.00000      0.00000      0.00000      0.00435      0.00000      0.00000      0.00000     -0.26503      0.00000      0.00000      0.13183      0.00000      0.13182      0.54130      0.00000      0.00000     -0.27080      0.00000     -0.27080      0.37863      0.00000      0.00000     -0.18892      0.00000     -0.18892 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.79372      0.00000      0.00000      0.00000      0.00000      0.00000      1.62418      0.00000      0.00000      0.00000      0.00000      0.00000      1.13508      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.79374      0.00000      0.00000      0.00000      0.00000      0.00000      1.62421      0.00000      0.00000      0.00000      0.00000      0.00000      1.13511      0.00000      0.00000      0.00000 \n     0.00324      0.00444      0.00000      0.00000      0.00000     -0.01261      0.00000      0.00000      0.00000      0.01265      0.00000      0.00000      0.00000      0.00745      0.00000      0.00000      0.00000      0.00435      0.00000      0.00000      0.00000      0.13183      0.00000      0.00000     -0.26503      0.00000      0.13183     -0.27080      0.00000      0.00000      0.54131      0.00000     -0.27080     -0.18892      0.00000      0.00000      0.37863      0.00000     -0.18892 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.79372      0.00000      0.00000      0.00000      0.00000      0.00000      1.62418      0.00000      0.00000      0.00000      0.00000      0.00000      1.13508      0.00000 \n     0.00324      0.00444      0.00000      0.00000      0.00000     -0.01261      0.00000      0.00000      0.00000      0.01265      0.00000      0.00000      0.00000      0.00745      0.00000      0.00000      0.00000      0.00435      0.00000      0.00000      0.00000      0.13182      0.00000      0.00000      0.13183      0.00000     -0.26503     -0.27080      0.00000      0.00000     -0.27080      0.00000      0.54130     -0.18892      0.00000      0.00000     -0.18892      0.00000      0.37863 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99997      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.59855      0.59855      0.59854      0.59852      0.59852      0.00733      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -816.48970   -116.47820   -107.69000   -107.69000   -107.69000    -20.78449    -17.13273    -17.13273    -17.13272    -11.22712    -11.22712    -11.22712    -11.22712    -11.22712     -2.79321     -1.68674     -1.68674     -1.68674     -0.19904     -0.19904     -0.19904     -0.19904     -0.19904     -0.14667     -0.02954     -0.02954     -0.02954      0.05576      0.11222      0.11222      0.11222      0.54696      1.02898      1.02898      1.02898      1.02898      1.02898      3.46927    166.19450 \n   </alphaeps>\n   <betaeps>\n  -816.48890   -116.46770   -107.68220   -107.68220   -107.68220    -20.77639    -17.12326    -17.12326    -17.12326    -11.21619    -11.21619    -11.21619    -11.21619    -11.21619     -2.74580     -1.63756     -1.63756     -1.63756     -0.14862     -0.14862     -0.14862     -0.14862     -0.14862     -0.11057     -0.00847     -0.00847     -0.00847      0.07050      0.13465      0.13465      0.13465      0.58138      1.07564      1.07564      1.07564      1.07565      1.07565      3.51282    166.20840 \n   </betaeps>\n   <alphavectors>\n     0.97527     -0.33728     -0.00000     -0.00000     -0.00000      0.14250      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.06082      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.01534      0.00000      0.00000      0.00000      0.01193     -0.00000      0.00000     -0.00000     -0.02138      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.06389     -0.62552 \n     0.09679      1.01728      0.00000      0.00000      0.00000     -0.51885     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.23640     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.06052     -0.00000     -0.00000     -0.00000     -0.02421      0.00000     -0.00000      0.00000      0.10824     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.27323      3.39820 \n    -0.00000     -0.00000      0.98001     -0.00000     -0.00000     -0.00000     -0.00000     -0.44560      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.17736      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.02688      0.00000     -0.00000     -0.00000     -0.04015      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.98001      0.00000      0.00000     -0.00000     -0.44560      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.17736      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02688      0.00000      0.00000     -0.00000     -0.04015      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.98001      0.00000      0.00000     -0.44560      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.17736     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02688     -0.00000     -0.00000     -0.00000     -0.04015     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.19053      0.06844      0.00000      0.00000      0.00000      1.07239      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.57880      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.15096      0.00000      0.00000      0.00000      0.17520     -0.00000      0.00000     -0.00000     -0.15989      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.68345     20.53517 \n    -0.00000     -0.00000      0.05222      0.00000      0.00000      0.00000      0.00000      1.06348     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.60543     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.09538     -0.00000      0.00000      0.00000      0.14331     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.05222     -0.00000      0.00000     -0.00000      1.06348     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.60543     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.09538     -0.00000     -0.00000      0.00000      0.14331     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.05222     -0.00000     -0.00000      1.06348     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.60543      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.09538      0.00000      0.00000      0.00000      0.14331      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.09393     -0.05177     -0.00000     -0.00000     -0.00000      0.19934      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.15118     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.37918     -0.00000     -0.00000     -0.00000     -0.06344      0.00000     -0.00000      0.00000      1.08815     -0.00000     -0.00000      0.00000      0.00000      0.00000      7.13667      4.33372 \n     0.00000      0.00000     -0.01257     -0.00000      0.00000      0.00000      0.00000      0.02989      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.12326      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.21474      0.00000     -0.00000     -0.00000     -0.33282      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01257     -0.00000     -0.00000      0.00000      0.02989     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.12326      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.21474      0.00000      0.00000     -0.00000     -0.33282     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.01257     -0.00000     -0.00000      0.02989      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.12326     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.21474     -0.00000     -0.00000     -0.00000     -0.33282     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00394      0.00164      0.00000      0.00000     -0.00000      0.00333      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00569     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.67066     -0.00000      0.00000     -0.00000      2.25983     -0.00000      0.00000      0.00000      3.54639      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.17277     -0.11612 \n    -0.00000     -0.00000      0.00342      0.00000     -0.00000     -0.00000     -0.00000     -0.00437      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.05841     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.41699     -0.00000      0.00000      0.00000      1.46893     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00342      0.00000      0.00000     -0.00000     -0.00437      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.05841      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.41699      0.00000     -0.00000      0.00000      1.46893     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00342      0.00000      0.00000     -0.00437      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.05841      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.41699      0.00000      0.00000      0.00000      1.46893      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00120     -0.00044     -0.00000     -0.00000      0.00000     -0.00101     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00149      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.39314     -0.00000      0.00000      0.00000     -2.02844      0.00000      0.00000     -0.00000     -1.29851      0.00000      0.00000      0.00000      0.00000     -0.00000      0.35734      0.03392 \n     0.00000      0.00000     -0.00178     -0.00000      0.00000      0.00000      0.00000      0.00219     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02372     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.66697      0.00000     -0.00000     -0.00000     -1.32463      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00178     -0.00000     -0.00000      0.00000      0.00219     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02372     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.66697     -0.00000     -0.00000      0.00000     -1.32463      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00178     -0.00000     -0.00000      0.00219     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02372      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.66697     -0.00000     -0.00000     -0.00000     -1.32463      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.10509     -0.00597     -0.00000     -0.00000     -0.00000     -0.00546     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.84277     -0.48658     -0.00399     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.25592      0.14775      0.00101     -0.00000      0.00000     -0.00000     -0.00423      0.00000     -0.00000      0.00000     -0.00471     -0.00000      0.00000     -0.00000     -0.28964      0.16722      0.00103    -10.16638 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.68555     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.51184     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.57928     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.68555      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.51184      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.57928      0.00000     -0.00000      0.00000     -0.00000 \n    -0.10509     -0.00597     -0.00000     -0.00000     -0.00000     -0.00546     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.97315     -0.00399      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.29551      0.00100      0.00000      0.00000      0.00000     -0.00423     -0.00000      0.00000     -0.00000     -0.00471      0.00000     -0.00000     -0.00000     -0.00000     -0.33445      0.00103    -10.16638 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.68555      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.51184      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.57928      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.10509     -0.00597     -0.00000     -0.00000     -0.00000     -0.00546     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.84277     -0.48658     -0.00399      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.25592      0.14775      0.00101      0.00000     -0.00000      0.00000     -0.00423      0.00000     -0.00000      0.00000     -0.00471     -0.00000      0.00000      0.00000      0.28964      0.16722      0.00103    -10.16638 \n    -0.03614      0.01960      0.00000      0.00000      0.00000     -0.06053     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.06698     -0.03867     -0.02332     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.60640     -0.35010      0.01166      0.00000     -0.00000      0.00000      0.02387     -0.00000      0.00000     -0.00000     -0.19953      0.00000     -0.00000      0.00000      0.86637     -0.50020     -3.31194     -1.60884 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.13395      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.21280      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73275      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13395      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.21280     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73275     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.03614      0.01960      0.00000      0.00000      0.00000     -0.06053     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.07734     -0.02332      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.70021      0.01166     -0.00000     -0.00000     -0.00000      0.02387      0.00000     -0.00000      0.00000     -0.19953     -0.00000      0.00000      0.00000      0.00000      1.00040     -3.31194     -1.60884 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.13395     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.21280     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73275      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.03614      0.01960      0.00000      0.00000      0.00000     -0.06053     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.06698     -0.03867     -0.02332      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.60640     -0.35010      0.01166     -0.00000      0.00000     -0.00000      0.02387     -0.00000      0.00000     -0.00000     -0.19953      0.00000     -0.00000     -0.00000     -0.86637     -0.50020     -3.31194     -1.60884 \n     0.00215     -0.00093     -0.00000     -0.00000      0.00000     -0.00290     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.01563      0.00903      0.00760      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.42106     -0.24310      0.01094      0.00000     -0.00000      0.00000     -0.18051     -0.00000      0.00000     -0.00000     -1.32054      0.00000     -0.00000     -0.00000     -0.90919      0.52492      0.67828      0.06000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.03127      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.84212     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.81837     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03127     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.84212     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.81837      0.00000     -0.00000      0.00000      0.00000 \n     0.00215     -0.00093     -0.00000     -0.00000     -0.00000     -0.00290     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.01805      0.00760     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.48620      0.01094     -0.00000     -0.00000     -0.00000     -0.18051      0.00000     -0.00000      0.00000     -1.32054     -0.00000      0.00000      0.00000     -0.00000     -1.04984      0.67828      0.06000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.03127     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.84212      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.81837     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00215     -0.00093     -0.00000     -0.00000      0.00000     -0.00290     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.01563      0.00903      0.00760     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.42106     -0.24310      0.01094     -0.00000      0.00000     -0.00000     -0.18051     -0.00000      0.00000     -0.00000     -1.32054      0.00000     -0.00000      0.00000      0.90919      0.52492      0.67828      0.06000 \n   </alphavectors>\n   <betavectors>\n     0.97527     -0.33729     -0.00000      0.00000     -0.00000      0.14252     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06087      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.01437     -0.00000      0.00000     -0.00000      0.01252      0.00000     -0.00000      0.00000     -0.02161     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06380     -0.62552 \n     0.09679      1.01733      0.00000     -0.00000      0.00000     -0.51889      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.23664     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05816      0.00000     -0.00000      0.00000     -0.02611     -0.00000      0.00000     -0.00000      0.10866      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.27291      3.39820 \n     0.00000     -0.00000      0.98002      0.00000      0.00000     -0.00000      0.00000     -0.44564     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.17720     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02234     -0.00000     -0.00000      0.00000     -0.04278     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.98002     -0.00000     -0.00000      0.00000     -0.44564     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.17720     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02234     -0.00000     -0.00000      0.00000     -0.04278     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.98002     -0.00000     -0.00000     -0.44564     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.17720     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02234      0.00000     -0.00000      0.00000     -0.04278      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.19053      0.06869      0.00000     -0.00000      0.00000      1.07299     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.57989      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13787     -0.00000      0.00000     -0.00000      0.18203      0.00000     -0.00000      0.00000     -0.16357     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.68258     20.53514 \n     0.00000     -0.00000      0.05219     -0.00000     -0.00000      0.00000     -0.00000      1.06370      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.60509      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.07921      0.00000      0.00000     -0.00000      0.15268      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.05219      0.00000     -0.00000      0.00000      1.06370      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.60509      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.07921      0.00000      0.00000     -0.00000      0.15268     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.05219      0.00000      0.00000      1.06370      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.60509      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.07921     -0.00000      0.00000     -0.00000      0.15268     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.09393     -0.05165     -0.00000      0.00000     -0.00000      0.19833     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.16102     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.37215      0.00000     -0.00000      0.00000     -0.07122     -0.00000      0.00000     -0.00000      1.08493      0.00000      0.00000      0.00000      0.00000     -0.00000      7.13587      4.33376 \n    -0.00000      0.00000     -0.01256      0.00000     -0.00000      0.00000     -0.00000      0.02948     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.12333     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.17733     -0.00000     -0.00000      0.00000     -0.35401     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.01256      0.00000      0.00000     -0.00000      0.02948     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.12333     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.17733     -0.00000     -0.00000      0.00000     -0.35401     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.01256      0.00000      0.00000      0.02948     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.12333     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.17733      0.00000     -0.00000      0.00000     -0.35401      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00394      0.00164      0.00000     -0.00000      0.00000      0.00331     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00572     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.53343     -0.00000      0.00000     -0.00000      2.37569      0.00000     -0.00000     -0.00000      3.49525     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.16775     -0.11610 \n     0.00000     -0.00000      0.00342     -0.00000      0.00000     -0.00000      0.00000     -0.00430     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.05823      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.25535      0.00000      0.00000     -0.00000      1.50548      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00342     -0.00000     -0.00000      0.00000     -0.00430     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05823      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.25535     -0.00000     -0.00000     -0.00000      1.50548      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00342     -0.00000     -0.00000     -0.00430      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.05823      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.25535     -0.00000      0.00000     -0.00000      1.50548     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00120     -0.00044     -0.00000      0.00000     -0.00000     -0.00100      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00150      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.52446     -0.00000      0.00000      0.00000     -2.02390     -0.00000      0.00000      0.00000     -1.25922      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.35513      0.03391 \n    -0.00000      0.00000     -0.00178      0.00000     -0.00000      0.00000     -0.00000      0.00215      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.02365      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.80660     -0.00000     -0.00000      0.00000     -1.24455     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00178      0.00000      0.00000     -0.00000      0.00215      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02365      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.80660      0.00000     -0.00000     -0.00000     -1.24455     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00178      0.00000      0.00000      0.00215     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02365      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.80660      0.00000     -0.00000      0.00000     -1.24455     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.10509     -0.00610     -0.00000      0.00000     -0.00000     -0.00562      0.00000      0.00000      0.00000     -0.00000      0.84294     -0.00000      0.00000     -0.48667     -0.00383      0.00000     -0.00000      0.00000     -0.25569      0.00000      0.14762     -0.00000     -0.00000      0.00124      0.00000      0.00000      0.00000     -0.00427      0.00000     -0.00000      0.00000     -0.00455     -0.28934     -0.00000      0.16705      0.00000     -0.00000      0.00104    -10.16638 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.68589     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.51138      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.57869      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.68589      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.51138     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.57869     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.10509     -0.00610     -0.00000      0.00000     -0.00000     -0.00562      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.97335     -0.00383     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.29524      0.00000     -0.00000      0.00124     -0.00000      0.00000      0.00000     -0.00427      0.00000     -0.00000      0.00000     -0.00455     -0.00000      0.00000     -0.33410     -0.00000      0.00000      0.00104    -10.16638 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.68589     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.51138      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.57869      0.00000      0.00000      0.00000 \n    -0.10509     -0.00610     -0.00000      0.00000     -0.00000     -0.00562      0.00000      0.00000     -0.00000      0.00000     -0.84294      0.00000     -0.00000     -0.48667     -0.00383      0.00000     -0.00000     -0.00000      0.25569     -0.00000      0.14762      0.00000      0.00000      0.00124      0.00000     -0.00000     -0.00000     -0.00427     -0.00000      0.00000     -0.00000     -0.00455      0.28934      0.00000      0.16705      0.00000     -0.00000      0.00104    -10.16638 \n    -0.03614      0.01955      0.00000     -0.00000      0.00000     -0.06024      0.00000      0.00000      0.00000     -0.00000      0.06652     -0.00000      0.00000     -0.03840     -0.02757      0.00000      0.00000     -0.00000      0.60664     -0.00000     -0.35024      0.00000      0.00000      0.01105     -0.00000     -0.00000     -0.00000      0.02285     -0.00000      0.00000     -0.00000     -0.19726      0.86624      0.00000     -0.50012     -0.00000      0.00000     -3.31206     -1.60884 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13304      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.21328     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73248      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13304      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.21328      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73248      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.03614      0.01955      0.00000     -0.00000      0.00000     -0.06024      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.07681     -0.02757      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.70049     -0.00000      0.00000      0.01105      0.00000     -0.00000     -0.00000      0.02285     -0.00000      0.00000     -0.00000     -0.19726      0.00000     -0.00000      1.00025      0.00000     -0.00000     -3.31206     -1.60884 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.13304      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.21328     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73248     -0.00000      0.00000     -0.00000 \n    -0.03614      0.01955      0.00000     -0.00000      0.00000     -0.06024      0.00000      0.00000      0.00000      0.00000     -0.06652      0.00000     -0.00000     -0.03840     -0.02757      0.00000      0.00000      0.00000     -0.60664      0.00000     -0.35024     -0.00000     -0.00000      0.01105     -0.00000      0.00000      0.00000      0.02285      0.00000     -0.00000      0.00000     -0.19726     -0.86624     -0.00000     -0.50012     -0.00000      0.00000     -3.31206     -1.60884 \n     0.00215     -0.00092     -0.00000      0.00000     -0.00000     -0.00288      0.00000      0.00000     -0.00000      0.00000     -0.01553      0.00000     -0.00000      0.00897      0.00753     -0.00000     -0.00000      0.00000      0.42082     -0.00000     -0.24296      0.00000      0.00000      0.01584     -0.00000     -0.00000     -0.00000     -0.20765     -0.00000      0.00000     -0.00000     -1.31715     -0.90930     -0.00000      0.52498     -0.00000      0.00000      0.67702      0.05999 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.03107     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.84165      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.81860     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.03107     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.84165      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.81860     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00215     -0.00092     -0.00000      0.00000     -0.00000     -0.00288      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.01794      0.00753     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.48593     -0.00000      0.00000      0.01584      0.00000     -0.00000     -0.00000     -0.20765     -0.00000      0.00000     -0.00000     -1.31715     -0.00000      0.00000     -1.04997      0.00000     -0.00000      0.67702      0.05999 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03107      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.84165      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.81860     -0.00000      0.00000     -0.00000 \n     0.00215     -0.00092     -0.00000      0.00000     -0.00000     -0.00288      0.00000      0.00000     -0.00000     -0.00000      0.01553     -0.00000      0.00000      0.00897      0.00753     -0.00000     -0.00000     -0.00000     -0.42082      0.00000     -0.24296     -0.00000     -0.00000      0.01584     -0.00000      0.00000      0.00000     -0.20765      0.00000     -0.00000      0.00000     -1.31715      0.90930      0.00000      0.52498     -0.00000      0.00000      0.67702      0.05999 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Pd\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17688     -0.67270      0.00000      0.00000      0.00000      0.73232      0.00000      0.00000      0.00000      0.12811      0.00000      0.00000      0.00000      0.00292      0.00000      0.00000      0.00000      0.00857      0.00000      0.00000      0.00000     -0.21329      0.00000      0.00000     -0.21329      0.00000     -0.21329     -0.09888      0.00000      0.00000     -0.09888      0.00000     -0.09888      0.00187      0.00000      0.00000      0.00187      0.00000      0.00187 \n    -0.67270      2.75844      0.00000      0.00000      0.00000     -1.22617      0.00000      0.00000      0.00000      0.27837      0.00000      0.00000      0.00000     -0.03619      0.00000      0.00000      0.00000     -0.02545      0.00000      0.00000      0.00000     -0.03539      0.00000      0.00000     -0.03539      0.00000     -0.03539      0.08599      0.00000      0.00000      0.08599      0.00000      0.08599      0.00543      0.00000      0.00000      0.00543      0.00000      0.00543 \n     0.00000      0.00000      2.39015      0.00000      0.00000      0.00000     -1.07967      0.00000      0.00000      0.00000      0.35917      0.00000      0.00000      0.00000      0.03076      0.00000      0.00000      0.00000     -0.01376      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.39015      0.00000      0.00000      0.00000     -1.07967      0.00000      0.00000      0.00000      0.35917      0.00000      0.00000      0.00000      0.03076      0.00000      0.00000      0.00000     -0.01376      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.39015      0.00000      0.00000      0.00000     -1.07967      0.00000      0.00000      0.00000      0.35917      0.00000      0.00000      0.00000      0.03076      0.00000      0.00000      0.00000     -0.01376      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.73232     -1.22617      0.00000      0.00000      0.00000      3.11375      0.00000      0.00000      0.00000     -0.94594      0.00000      0.00000      0.00000      0.09480      0.00000      0.00000      0.00000      0.06602      0.00000      0.00000      0.00000     -0.05278      0.00000      0.00000     -0.05278      0.00000     -0.05278     -0.11767      0.00000      0.00000     -0.11767      0.00000     -0.11767     -0.01314      0.00000      0.00000     -0.01314      0.00000     -0.01314 \n     0.00000      0.00000     -1.07967      0.00000      0.00000      0.00000      3.04076      0.00000      0.00000      0.00000     -1.33845      0.00000      0.00000      0.00000     -0.07756      0.00000      0.00000      0.00000      0.03268      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.07967      0.00000      0.00000      0.00000      3.04076      0.00000      0.00000      0.00000     -1.33845      0.00000      0.00000      0.00000     -0.07756      0.00000      0.00000      0.00000      0.03268      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.07967      0.00000      0.00000      0.00000      3.04076      0.00000      0.00000      0.00000     -1.33845      0.00000      0.00000      0.00000     -0.07756      0.00000      0.00000      0.00000      0.03268      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.12811      0.27837      0.00000      0.00000      0.00000     -0.94594      0.00000      0.00000      0.00000      2.87045      0.00000      0.00000      0.00000     -0.19824      0.00000      0.00000      0.00000     -0.15518      0.00000      0.00000      0.00000     -0.03091      0.00000      0.00000     -0.03091      0.00000     -0.03091     -0.08251      0.00000      0.00000     -0.08251      0.00000     -0.08251      0.00954      0.00000      0.00000      0.00954      0.00000      0.00954 \n     0.00000      0.00000      0.35917      0.00000      0.00000      0.00000     -1.33845      0.00000      0.00000      0.00000      2.55675      0.00000      0.00000      0.00000      0.12609      0.00000      0.00000      0.00000     -0.05184      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.35917      0.00000      0.00000      0.00000     -1.33845      0.00000      0.00000      0.00000      2.55675      0.00000      0.00000      0.00000      0.12609      0.00000      0.00000      0.00000     -0.05184      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.35917      0.00000      0.00000      0.00000     -1.33845      0.00000      0.00000      0.00000      2.55675      0.00000      0.00000      0.00000      0.12609      0.00000      0.00000      0.00000     -0.05184      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00292     -0.03619      0.00000      0.00000      0.00000      0.09480      0.00000      0.00000      0.00000     -0.19824      0.00000      0.00000      0.00000      0.40432      0.00000      0.00000      0.00000      0.27636      0.00000      0.00000      0.00000      0.00104      0.00000      0.00000      0.00104      0.00000      0.00104      0.00207      0.00000      0.00000      0.00207      0.00000      0.00207      0.00381      0.00000      0.00000      0.00381      0.00000      0.00381 \n     0.00000      0.00000      0.03076      0.00000      0.00000      0.00000     -0.07756      0.00000      0.00000      0.00000      0.12609      0.00000      0.00000      0.00000      0.00631      0.00000      0.00000      0.00000     -0.00260      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03076      0.00000      0.00000      0.00000     -0.07756      0.00000      0.00000      0.00000      0.12609      0.00000      0.00000      0.00000      0.00631      0.00000      0.00000      0.00000     -0.00260      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03076      0.00000      0.00000      0.00000     -0.07756      0.00000      0.00000      0.00000      0.12609      0.00000      0.00000      0.00000      0.00631      0.00000      0.00000      0.00000     -0.00260      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00857     -0.02545      0.00000      0.00000      0.00000      0.06602      0.00000      0.00000      0.00000     -0.15518      0.00000      0.00000      0.00000      0.27636      0.00000      0.00000      0.00000      0.18908      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00013      0.00000      0.00013      0.00201      0.00000      0.00000      0.00201      0.00000      0.00201      0.00256      0.00000      0.00000      0.00256      0.00000      0.00256 \n     0.00000      0.00000     -0.01376      0.00000      0.00000      0.00000      0.03268      0.00000      0.00000      0.00000     -0.05184      0.00000      0.00000      0.00000     -0.00260      0.00000      0.00000      0.00000      0.00108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01376      0.00000      0.00000      0.00000      0.03268      0.00000      0.00000      0.00000     -0.05184      0.00000      0.00000      0.00000     -0.00260      0.00000      0.00000      0.00000      0.00108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01376      0.00000      0.00000      0.00000      0.03268      0.00000      0.00000      0.00000     -0.05184      0.00000      0.00000      0.00000     -0.00260      0.00000      0.00000      0.00000      0.00108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.21329     -0.03539      0.00000      0.00000      0.00000     -0.05278      0.00000      0.00000      0.00000     -0.03091      0.00000      0.00000      0.00000      0.00104      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00000      2.08642      0.00000      0.00000     -1.00547      0.00000     -1.00547     -0.23613      0.00000      0.00000      0.13090      0.00000      0.13090     -0.29478      0.00000      0.00000      0.14686      0.00000      0.14686 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.18382      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73404      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88327      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.18382      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73404      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88327      0.00000      0.00000      0.00000 \n    -0.21329     -0.03539      0.00000      0.00000      0.00000     -0.05278      0.00000      0.00000      0.00000     -0.03091      0.00000      0.00000      0.00000      0.00104      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00000     -1.00547      0.00000      0.00000      2.08643      0.00000     -1.00548      0.13090      0.00000      0.00000     -0.23613      0.00000      0.13090      0.14686      0.00000      0.00000     -0.29478      0.00000      0.14686 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.18382      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73404      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88327      0.00000 \n    -0.21329     -0.03539      0.00000      0.00000      0.00000     -0.05278      0.00000      0.00000      0.00000     -0.03091      0.00000      0.00000      0.00000      0.00104      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00000     -1.00547      0.00000      0.00000     -1.00548      0.00000      2.08641      0.13090      0.00000      0.00000      0.13090      0.00000     -0.23613      0.14686      0.00000      0.00000      0.14686      0.00000     -0.29478 \n    -0.09888      0.08599      0.00000      0.00000      0.00000     -0.11767      0.00000      0.00000      0.00000     -0.08251      0.00000      0.00000      0.00000      0.00207      0.00000      0.00000      0.00000      0.00201      0.00000      0.00000      0.00000     -0.23613      0.00000      0.00000      0.13090      0.00000      0.13090      0.94403      0.00000      0.00000     -0.45446      0.00000     -0.45446      0.60655      0.00000      0.00000     -0.30310      0.00000     -0.30310 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73404      0.00000      0.00000      0.00000      0.00000      0.00000      2.79696      0.00000      0.00000      0.00000      0.00000      0.00000      1.81930      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73404      0.00000      0.00000      0.00000      0.00000      0.00000      2.79696      0.00000      0.00000      0.00000      0.00000      0.00000      1.81931      0.00000      0.00000      0.00000 \n    -0.09888      0.08599      0.00000      0.00000      0.00000     -0.11767      0.00000      0.00000      0.00000     -0.08251      0.00000      0.00000      0.00000      0.00207      0.00000      0.00000      0.00000      0.00201      0.00000      0.00000      0.00000      0.13090      0.00000      0.00000     -0.23613      0.00000      0.13090     -0.45446      0.00000      0.00000      0.94403      0.00000     -0.45446     -0.30310      0.00000      0.00000      0.60655      0.00000     -0.30310 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73404      0.00000      0.00000      0.00000      0.00000      0.00000      2.79696      0.00000      0.00000      0.00000      0.00000      0.00000      1.81931      0.00000 \n    -0.09888      0.08599      0.00000      0.00000      0.00000     -0.11767      0.00000      0.00000      0.00000     -0.08251      0.00000      0.00000      0.00000      0.00207      0.00000      0.00000      0.00000      0.00201      0.00000      0.00000      0.00000      0.13090      0.00000      0.00000      0.13090      0.00000     -0.23613     -0.45446      0.00000      0.00000     -0.45446      0.00000      0.94403     -0.30310      0.00000      0.00000     -0.30310      0.00000      0.60655 \n     0.00187      0.00543      0.00000      0.00000      0.00000     -0.01314      0.00000      0.00000      0.00000      0.00954      0.00000      0.00000      0.00000      0.00381      0.00000      0.00000      0.00000      0.00256      0.00000      0.00000      0.00000     -0.29478      0.00000      0.00000      0.14686      0.00000      0.14686      0.60655      0.00000      0.00000     -0.30310      0.00000     -0.30310      0.40377      0.00000      0.00000     -0.20169      0.00000     -0.20169 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88327      0.00000      0.00000      0.00000      0.00000      0.00000      1.81930      0.00000      0.00000      0.00000      0.00000      0.00000      1.21091      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88327      0.00000      0.00000      0.00000      0.00000      0.00000      1.81931      0.00000      0.00000      0.00000      0.00000      0.00000      1.21091      0.00000      0.00000      0.00000 \n     0.00187      0.00543      0.00000      0.00000      0.00000     -0.01314      0.00000      0.00000      0.00000      0.00954      0.00000      0.00000      0.00000      0.00381      0.00000      0.00000      0.00000      0.00256      0.00000      0.00000      0.00000      0.14686      0.00000      0.00000     -0.29478      0.00000      0.14686     -0.30310      0.00000      0.00000      0.60655      0.00000     -0.30310     -0.20169      0.00000      0.00000      0.40377      0.00000     -0.20169 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88327      0.00000      0.00000      0.00000      0.00000      0.00000      1.81931      0.00000      0.00000      0.00000      0.00000      0.00000      1.21091      0.00000 \n     0.00187      0.00543      0.00000      0.00000      0.00000     -0.01314      0.00000      0.00000      0.00000      0.00954      0.00000      0.00000      0.00000      0.00381      0.00000      0.00000      0.00000      0.00256      0.00000      0.00000      0.00000      0.14686      0.00000      0.00000      0.14686      0.00000     -0.29478     -0.30310      0.00000      0.00000     -0.30310      0.00000      0.60655     -0.20169      0.00000      0.00000     -0.20169      0.00000      0.40377 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99998      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.80000      0.80000      0.80000      0.80000      0.80000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -855.41910   -122.88560   -113.82910   -113.82910   -113.82910    -22.21345    -18.41549    -18.41549    -18.41549    -12.27757    -12.27757    -12.27757    -12.27757    -12.27757     -2.97854     -1.80658     -1.80658     -1.80658     -0.21703     -0.21703     -0.21703     -0.21703     -0.21703     -0.14639     -0.02765     -0.02765     -0.02765      0.06378      0.12470      0.12470      0.12470      0.60515      1.12156      1.12156      1.12156      1.12156      1.12156      3.85181    180.50440 \n   </alphaeps>\n   <betaeps>\n  -855.41830   -122.87980   -113.82470   -113.82470   -113.82470    -22.20885    -18.41014    -18.41014    -18.41014    -12.27150    -12.27150    -12.27150    -12.27150    -12.27150     -2.95373     -1.78085     -1.78085     -1.78085     -0.18887     -0.18887     -0.18887     -0.18887     -0.18887     -0.11571     -0.00679     -0.00679     -0.00679      0.07737      0.14437      0.14437      0.14437      0.63249      1.15296      1.15296      1.15296      1.15296      1.15296      3.87723    180.51130 \n   </betaeps>\n   <alphavectors>\n     0.97456     -0.33785      0.00000     -0.00000      0.00000      0.14349      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.06180     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.01511     -0.00000     -0.00000      0.00000      0.01263     -0.00000      0.00000      0.00000     -0.02141      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.06404     -0.64694 \n     0.10047      1.01816     -0.00000      0.00000     -0.00000     -0.52227     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.24071      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.05852     -0.00000      0.00000     -0.00000     -0.02031      0.00000     -0.00000     -0.00000      0.11750     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.27630      3.52487 \n     0.00000      0.00000      0.97972      0.00000     -0.00000      0.00000     -0.44976      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.18146      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02603     -0.00000      0.00000     -0.00000     -0.04119     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.97972     -0.00000     -0.00000     -0.00000     -0.44976     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.18146      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02603      0.00000     -0.00000      0.00000     -0.04119     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.97972      0.00000     -0.00000     -0.00000     -0.44976      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.18146      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02603      0.00000     -0.00000     -0.00000     -0.04119      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.20408      0.07179     -0.00000      0.00000     -0.00000      1.07319      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.58840     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.15163     -0.00000     -0.00000      0.00000      0.19720      0.00000      0.00000      0.00000     -0.13954      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.69731     20.82168 \n     0.00000      0.00000      0.05263     -0.00000      0.00000     -0.00000      1.06526      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.61866     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.09231      0.00000     -0.00000      0.00000      0.14695      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.05263      0.00000      0.00000      0.00000      1.06526      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.61866     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.09231     -0.00000      0.00000     -0.00000      0.14695      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.05263     -0.00000     -0.00000     -0.00000      1.06526     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.61866     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.09231     -0.00000      0.00000      0.00000      0.14695     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.09392     -0.05184      0.00000     -0.00000     -0.00000      0.20065      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.14874      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.34409     -0.00000      0.00000     -0.00000     -0.00511      0.00000      0.00000     -0.00000      1.15649     -0.00000      0.00000      0.00000     -0.00000     -0.00000      7.59565      3.80168 \n    -0.00000     -0.00000     -0.01280     -0.00000      0.00000     -0.00000      0.02886     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.13008      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.20390     -0.00000      0.00000     -0.00000     -0.33464      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.01280      0.00000      0.00000      0.00000      0.02886     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.13008      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.20390      0.00000     -0.00000      0.00000     -0.33464     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.01280     -0.00000      0.00000      0.00000      0.02886     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.13008      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.20390      0.00000     -0.00000      0.00000     -0.33464      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00317      0.00108     -0.00000      0.00000     -0.00000      0.00443      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00839      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.63571     -0.00000     -0.00000      0.00000      2.30142      0.00000      0.00000      0.00000      3.44057      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.08876     -0.07120 \n     0.00000      0.00000      0.00346      0.00000     -0.00000      0.00000     -0.00412     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05639     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.37694      0.00000     -0.00000      0.00000      1.49070      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00346     -0.00000     -0.00000     -0.00000     -0.00412     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.05639     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.37694     -0.00000      0.00000     -0.00000      1.49070      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00346      0.00000     -0.00000     -0.00000     -0.00412      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05639     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.37694     -0.00000      0.00000      0.00000      1.49070     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00099     -0.00027      0.00000     -0.00000      0.00000     -0.00138     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00225     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.43482      0.00000     -0.00000      0.00000     -2.04423     -0.00000     -0.00000      0.00000     -1.28585     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.34170      0.02068 \n    -0.00000     -0.00000     -0.00181      0.00000      0.00000     -0.00000      0.00208     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02317     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.70115     -0.00000      0.00000     -0.00000     -1.32009     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00181      0.00000      0.00000      0.00000      0.00208      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.02317     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.70115      0.00000     -0.00000      0.00000     -1.32009     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00181     -0.00000      0.00000      0.00000      0.00208     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02317      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.70115     -0.00000      0.00000      0.00000     -1.32009      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.11171     -0.00794      0.00000     -0.00000      0.00000     -0.00485     -0.00000      0.00000     -0.00000     -0.48644     -0.00000      0.84253      0.00000      0.00000     -0.00373     -0.00000      0.00000      0.00000      0.15261     -0.00000     -0.26433      0.00000     -0.00000      0.00072     -0.00000      0.00000     -0.00000     -0.00544      0.00000     -0.00000      0.00000     -0.00635      0.16881      0.00000     -0.29238     -0.00000      0.00000      0.00634    -10.28343 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.68507      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.52866      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.58476     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.68507     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.52866     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.58476      0.00000     -0.00000     -0.00000 \n    -0.11171     -0.00794      0.00000     -0.00000      0.00000     -0.00485     -0.00000      0.00000     -0.00000     -0.48644      0.00000     -0.84253     -0.00000     -0.00000     -0.00373     -0.00000      0.00000     -0.00000      0.15261      0.00000      0.26433      0.00000      0.00000      0.00072      0.00000     -0.00000      0.00000     -0.00544     -0.00000      0.00000     -0.00000     -0.00635      0.16881      0.00000      0.29238      0.00000     -0.00000      0.00634    -10.28343 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.68507      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.52866      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.58476     -0.00000      0.00000 \n    -0.11171     -0.00794      0.00000     -0.00000      0.00000     -0.00485     -0.00000      0.00000      0.00000      0.97287     -0.00000      0.00000     -0.00000     -0.00000     -0.00373      0.00000     -0.00000      0.00000     -0.30522     -0.00000      0.00000     -0.00000     -0.00000      0.00072      0.00000      0.00000     -0.00000     -0.00544     -0.00000      0.00000      0.00000     -0.00635     -0.33761     -0.00000      0.00000      0.00000     -0.00000      0.00634    -10.28343 \n    -0.03632      0.01961     -0.00000      0.00000      0.00000     -0.06099     -0.00000      0.00000      0.00000     -0.03828     -0.00000      0.06630      0.00000      0.00000     -0.01991     -0.00000      0.00000     -0.00000     -0.35691      0.00000      0.61819     -0.00000      0.00000      0.00422      0.00000     -0.00000      0.00000      0.01996     -0.00000      0.00000     -0.00000     -0.18550     -0.49665     -0.00000      0.86023      0.00000     -0.00000     -3.51312     -1.41868 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.13261      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.23637     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.72046      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.13261      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.23637      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.72046     -0.00000     -0.00000     -0.00000 \n    -0.03632      0.01961     -0.00000      0.00000      0.00000     -0.06099     -0.00000      0.00000      0.00000     -0.03828      0.00000     -0.06630     -0.00000     -0.00000     -0.01991     -0.00000      0.00000      0.00000     -0.35691     -0.00000     -0.61819     -0.00000     -0.00000      0.00422     -0.00000      0.00000     -0.00000      0.01996      0.00000     -0.00000      0.00000     -0.18550     -0.49665     -0.00000     -0.86023     -0.00000      0.00000     -3.51312     -1.41868 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.13261     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.23637     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.72046     -0.00000      0.00000 \n    -0.03632      0.01961     -0.00000      0.00000      0.00000     -0.06099     -0.00000      0.00000      0.00000      0.07656     -0.00000      0.00000     -0.00000     -0.00000     -0.01991     -0.00000      0.00000     -0.00000      0.71382      0.00000     -0.00000      0.00000      0.00000      0.00422     -0.00000     -0.00000      0.00000      0.01995      0.00000     -0.00000     -0.00000     -0.18550      0.99331      0.00000     -0.00000     -0.00000      0.00000     -3.51312     -1.41868 \n     0.00162     -0.00057      0.00000     -0.00000     -0.00000     -0.00378     -0.00000      0.00000      0.00000      0.00879      0.00000     -0.01522     -0.00000     -0.00000      0.00564      0.00000     -0.00000     -0.00000     -0.23730      0.00000      0.41102     -0.00000      0.00000      0.00591      0.00000     -0.00000      0.00000     -0.18830     -0.00000      0.00000     -0.00000     -1.29887      0.52687      0.00000     -0.91257      0.00000     -0.00000      0.62919      0.03194 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.03044     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.82204     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.82515      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.03044     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.82204     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.82515      0.00000      0.00000      0.00000 \n     0.00162     -0.00057      0.00000     -0.00000     -0.00000     -0.00378     -0.00000      0.00000      0.00000      0.00879     -0.00000      0.01522      0.00000      0.00000      0.00564      0.00000     -0.00000      0.00000     -0.23730     -0.00000     -0.41102     -0.00000     -0.00000      0.00591     -0.00000      0.00000     -0.00000     -0.18830      0.00000     -0.00000      0.00000     -1.29887      0.52687      0.00000      0.91257     -0.00000      0.00000      0.62919      0.03194 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.03044     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.82204      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.82515      0.00000     -0.00000 \n     0.00162     -0.00057      0.00000     -0.00000      0.00000     -0.00378     -0.00000      0.00000      0.00000     -0.01758      0.00000     -0.00000      0.00000      0.00000      0.00564      0.00000     -0.00000     -0.00000      0.47461      0.00000     -0.00000      0.00000      0.00000      0.00591     -0.00000     -0.00000      0.00000     -0.18830      0.00000     -0.00000     -0.00000     -1.29887     -1.05375     -0.00000      0.00000     -0.00000      0.00000      0.62919      0.03194 \n   </alphavectors>\n   <betavectors>\n     0.97456     -0.33786      0.00000      0.00000      0.00000      0.14350     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06182      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.01465      0.00000     -0.00000     -0.00000      0.01305      0.00000     -0.00000     -0.00000     -0.02151      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.06397     -0.64694 \n     0.10047      1.01818     -0.00000     -0.00000     -0.00000     -0.52229      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.24082     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05809     -0.00000      0.00000      0.00000     -0.02163     -0.00000      0.00000      0.00000      0.11757      0.00000     -0.00000      0.00000      0.00000      0.00000      0.27604      3.52487 \n     0.00000      0.00000      0.97973      0.00000      0.00000     -0.00000     -0.44979      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.18141     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02239     -0.00000     -0.00000      0.00000     -0.04312     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.97973     -0.00000      0.00000     -0.00000     -0.44979     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.18141     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02239      0.00000     -0.00000     -0.00000     -0.04312     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.97973     -0.00000      0.00000     -0.00000     -0.44979     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.18141      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.02239      0.00000      0.00000     -0.00000     -0.04312     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.20408      0.07192     -0.00000     -0.00000     -0.00000      1.07353     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.58883      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.14384      0.00000     -0.00000     -0.00000      0.20227      0.00000     -0.00000     -0.00000     -0.14139      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.69664     20.82167 \n     0.00000      0.00000      0.05262     -0.00000     -0.00000      0.00000      1.06538     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.61860      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.07933      0.00000      0.00000     -0.00000      0.15383      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.05262      0.00000     -0.00000      0.00000      1.06538      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.61860      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.07933     -0.00000      0.00000      0.00000      0.15383      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.05262      0.00000     -0.00000      0.00000      1.06538      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.61860     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.07933     -0.00000     -0.00000      0.00000      0.15383      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.09392     -0.05178      0.00000      0.00000      0.00000      0.20007     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.15289     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.35198     -0.00000      0.00000      0.00000     -0.01305     -0.00000      0.00000      0.00000      1.15935      0.00000     -0.00000     -0.00000      0.00000      0.00000      7.59422      3.80168 \n    -0.00000     -0.00000     -0.01280     -0.00000     -0.00000      0.00000      0.02865      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.13035     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.17453     -0.00000     -0.00000      0.00000     -0.34999     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.01280     -0.00000     -0.00000      0.00000      0.02865     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.13035     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.17453      0.00000     -0.00000     -0.00000     -0.34999      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.01280      0.00000     -0.00000      0.00000      0.02865     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.13035      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.17453      0.00000      0.00000     -0.00000     -0.34999     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00317      0.00108     -0.00000     -0.00000     -0.00000      0.00441     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00850     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.52635      0.00000     -0.00000      0.00000      2.36505      0.00000     -0.00000      0.00000      3.41591      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.08842     -0.07120 \n     0.00000      0.00000      0.00346      0.00000      0.00000     -0.00000     -0.00408     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.05546      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.25022      0.00000      0.00000     -0.00000      1.51716      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00346      0.00000      0.00000     -0.00000     -0.00408     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05546      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.25022     -0.00000      0.00000      0.00000      1.51716      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00346     -0.00000      0.00000     -0.00000     -0.00408     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05546      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.25022      0.00000     -0.00000      0.00000      1.51716     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00099     -0.00027      0.00000      0.00000      0.00000     -0.00137      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00229      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.52506      0.00000     -0.00000     -0.00000     -2.03846     -0.00000      0.00000     -0.00000     -1.26129     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.34101      0.02068 \n    -0.00000     -0.00000     -0.00181     -0.00000     -0.00000      0.00000      0.00206     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02284     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.80971     -0.00000     -0.00000      0.00000     -1.25644      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00181     -0.00000     -0.00000      0.00000      0.00206      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.02284     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.80971      0.00000     -0.00000     -0.00000     -1.25644     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00181      0.00000     -0.00000      0.00000      0.00206      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.02284     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.80971     -0.00000     -0.00000      0.00000     -1.25644      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.11171     -0.00800      0.00000      0.00000      0.00000     -0.00495      0.00000     -0.00000      0.00000      0.00000      0.84262     -0.48648      0.00000      0.00000     -0.00369      0.00000      0.00000      0.00000      0.00000      0.00000     -0.26507     -0.00000      0.15304      0.00097     -0.00000      0.00000      0.00000     -0.00548      0.00000     -0.00000      0.00000     -0.00627     -0.00000      0.00000     -0.29146      0.00000      0.16827      0.00634    -10.28343 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.68524     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.53015     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.58292     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.68524      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.53015      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.58292     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.11171     -0.00800      0.00000      0.00000      0.00000     -0.00495      0.00000     -0.00000     -0.00000     -0.00000     -0.84262     -0.48649     -0.00000     -0.00000     -0.00369     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.26507      0.00000      0.15304      0.00097     -0.00000      0.00000      0.00000     -0.00548     -0.00000      0.00000     -0.00000     -0.00627      0.00000     -0.00000      0.29146      0.00000      0.16827      0.00634    -10.28343 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.68524      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.53015     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.58292      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.11171     -0.00800      0.00000      0.00000      0.00000     -0.00495      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.97297      0.00000     -0.00000     -0.00369     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.30608      0.00097      0.00000     -0.00000     -0.00000     -0.00548      0.00000      0.00000      0.00000     -0.00627     -0.00000     -0.00000     -0.00000     -0.00000     -0.33655      0.00634    -10.28343 \n    -0.03632      0.01959     -0.00000     -0.00000     -0.00000     -0.06082      0.00000     -0.00000     -0.00000      0.00000      0.06608     -0.03815      0.00000      0.00000     -0.02162      0.00000      0.00000      0.00000      0.00000      0.00000      0.62081      0.00000     -0.35843      0.00621      0.00000     -0.00000     -0.00000      0.02108     -0.00000      0.00000     -0.00000     -0.18775      0.00000     -0.00000      0.85836     -0.00000     -0.49557     -3.51298     -1.41868 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.13216     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.24162     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.71671      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.13216     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.24162     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.71671     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.03632      0.01959     -0.00000     -0.00000     -0.00000     -0.06082      0.00000     -0.00000     -0.00000     -0.00000     -0.06608     -0.03815     -0.00000     -0.00000     -0.02162      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.62081     -0.00000     -0.35843      0.00621      0.00000     -0.00000     -0.00000      0.02108      0.00000     -0.00000      0.00000     -0.18775     -0.00000      0.00000     -0.85836     -0.00000     -0.49557     -3.51298     -1.41868 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13216     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.24162      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.71671      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.03632      0.01959     -0.00000     -0.00000     -0.00000     -0.06082      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.07630      0.00000     -0.00000     -0.02162     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.71685      0.00621     -0.00000      0.00000      0.00000      0.02108     -0.00000     -0.00000     -0.00000     -0.18775      0.00000      0.00000      0.00000      0.00000      0.99114     -3.51298     -1.41868 \n     0.00162     -0.00057      0.00000      0.00000      0.00000     -0.00377      0.00000     -0.00000      0.00000     -0.00000     -0.01517      0.00876     -0.00000     -0.00000      0.00542     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.40824      0.00000     -0.23570      0.01815      0.00000     -0.00000     -0.00000     -0.20278     -0.00000      0.00000     -0.00000     -1.29628      0.00000     -0.00000     -0.91382     -0.00000      0.52760      0.62979      0.03194 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.03033      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.81648      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.82764     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.03033     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.81648      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.82764      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00162     -0.00057      0.00000      0.00000      0.00000     -0.00377      0.00000     -0.00000      0.00000      0.00000      0.01517      0.00876      0.00000      0.00000      0.00542     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.40824     -0.00000     -0.23570      0.01815      0.00000     -0.00000     -0.00000     -0.20278      0.00000     -0.00000      0.00000     -1.29628     -0.00000      0.00000      0.91382     -0.00000      0.52760      0.62979      0.03194 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03033      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.81648     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.82764     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00162     -0.00057      0.00000      0.00000      0.00000     -0.00377      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01751     -0.00000      0.00000      0.00542      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.47139      0.01815     -0.00000      0.00000      0.00000     -0.20278     -0.00000     -0.00000     -0.00000     -1.29628      0.00000      0.00000     -0.00000      0.00000     -1.05519      0.62979      0.03194 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ag\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17702     -0.67400      0.00000      0.00000      0.00000      0.74837      0.00000      0.00000      0.00000      0.12351      0.00000      0.00000      0.00000      0.00420      0.00000      0.00000      0.00000      0.00833      0.00000      0.00000      0.00000     -0.21830      0.00000      0.00000     -0.21830      0.00000     -0.21830     -0.09856      0.00000      0.00000     -0.09856      0.00000     -0.09856      0.00028      0.00000      0.00000      0.00028      0.00000      0.00028 \n    -0.67400      2.77670      0.00000      0.00000      0.00000     -1.22348      0.00000      0.00000      0.00000      0.27878      0.00000      0.00000      0.00000     -0.03513      0.00000      0.00000      0.00000     -0.02684      0.00000      0.00000      0.00000     -0.04558      0.00000      0.00000     -0.04558      0.00000     -0.04558      0.08889      0.00000      0.00000      0.08889      0.00000      0.08889      0.00656      0.00000      0.00000      0.00656      0.00000      0.00656 \n     0.00000      0.00000      2.39932      0.00000      0.00000      0.00000     -1.09877      0.00000      0.00000      0.00000      0.37097      0.00000      0.00000      0.00000      0.03011      0.00000      0.00000      0.00000     -0.01343      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.39932      0.00000      0.00000      0.00000     -1.09877      0.00000      0.00000      0.00000      0.37097      0.00000      0.00000      0.00000      0.03011      0.00000      0.00000      0.00000     -0.01343      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.39932      0.00000      0.00000      0.00000     -1.09877      0.00000      0.00000      0.00000      0.37097      0.00000      0.00000      0.00000      0.03011      0.00000      0.00000      0.00000     -0.01343      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.74837     -1.22348      0.00000      0.00000      0.00000      3.15549      0.00000      0.00000      0.00000     -0.97144      0.00000      0.00000      0.00000      0.08660      0.00000      0.00000      0.00000      0.06729      0.00000      0.00000      0.00000     -0.05702      0.00000      0.00000     -0.05702      0.00000     -0.05702     -0.12052      0.00000      0.00000     -0.12052      0.00000     -0.12052     -0.01444      0.00000      0.00000     -0.01444      0.00000     -0.01444 \n     0.00000      0.00000     -1.09877      0.00000      0.00000      0.00000      3.07965      0.00000      0.00000      0.00000     -1.37702      0.00000      0.00000      0.00000     -0.07583      0.00000      0.00000      0.00000      0.03193      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.09877      0.00000      0.00000      0.00000      3.07965      0.00000      0.00000      0.00000     -1.37702      0.00000      0.00000      0.00000     -0.07583      0.00000      0.00000      0.00000      0.03193      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.09877      0.00000      0.00000      0.00000      3.07965      0.00000      0.00000      0.00000     -1.37702      0.00000      0.00000      0.00000     -0.07583      0.00000      0.00000      0.00000      0.03193      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.12351      0.27878      0.00000      0.00000      0.00000     -0.97144      0.00000      0.00000      0.00000      2.87768      0.00000      0.00000      0.00000     -0.18597      0.00000      0.00000      0.00000     -0.16667      0.00000      0.00000      0.00000     -0.02956      0.00000      0.00000     -0.02956      0.00000     -0.02956     -0.07813      0.00000      0.00000     -0.07813      0.00000     -0.07813      0.00747      0.00000      0.00000      0.00747      0.00000      0.00747 \n     0.00000      0.00000      0.37097      0.00000      0.00000      0.00000     -1.37702      0.00000      0.00000      0.00000      2.58620      0.00000      0.00000      0.00000      0.12261      0.00000      0.00000      0.00000     -0.05052      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.37097      0.00000      0.00000      0.00000     -1.37702      0.00000      0.00000      0.00000      2.58620      0.00000      0.00000      0.00000      0.12261      0.00000      0.00000      0.00000     -0.05052      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.37097      0.00000      0.00000      0.00000     -1.37702      0.00000      0.00000      0.00000      2.58620      0.00000      0.00000      0.00000      0.12261      0.00000      0.00000      0.00000     -0.05052      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00420     -0.03513      0.00000      0.00000      0.00000      0.08660      0.00000      0.00000      0.00000     -0.18597      0.00000      0.00000      0.00000      0.38216      0.00000      0.00000      0.00000      0.28411      0.00000      0.00000      0.00000      0.00098      0.00000      0.00000      0.00098      0.00000      0.00098      0.00052      0.00000      0.00000      0.00052      0.00000      0.00052      0.00220      0.00000      0.00000      0.00220      0.00000      0.00220 \n     0.00000      0.00000      0.03011      0.00000      0.00000      0.00000     -0.07583      0.00000      0.00000      0.00000      0.12261      0.00000      0.00000      0.00000      0.00590      0.00000      0.00000      0.00000     -0.00243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03011      0.00000      0.00000      0.00000     -0.07583      0.00000      0.00000      0.00000      0.12261      0.00000      0.00000      0.00000      0.00590      0.00000      0.00000      0.00000     -0.00243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03011      0.00000      0.00000      0.00000     -0.07583      0.00000      0.00000      0.00000      0.12261      0.00000      0.00000      0.00000      0.00590      0.00000      0.00000      0.00000     -0.00243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00833     -0.02684      0.00000      0.00000      0.00000      0.06729      0.00000      0.00000      0.00000     -0.16667      0.00000      0.00000      0.00000      0.28411      0.00000      0.00000      0.00000      0.21157      0.00000      0.00000      0.00000      0.00029      0.00000      0.00000      0.00029      0.00000      0.00029      0.00130      0.00000      0.00000      0.00130      0.00000      0.00130      0.00159      0.00000      0.00000      0.00159      0.00000      0.00159 \n     0.00000      0.00000     -0.01343      0.00000      0.00000      0.00000      0.03193      0.00000      0.00000      0.00000     -0.05052      0.00000      0.00000      0.00000     -0.00243      0.00000      0.00000      0.00000      0.00101      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01343      0.00000      0.00000      0.00000      0.03193      0.00000      0.00000      0.00000     -0.05052      0.00000      0.00000      0.00000     -0.00243      0.00000      0.00000      0.00000      0.00101      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01343      0.00000      0.00000      0.00000      0.03193      0.00000      0.00000      0.00000     -0.05052      0.00000      0.00000      0.00000     -0.00243      0.00000      0.00000      0.00000      0.00101      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.21830     -0.04558      0.00000      0.00000      0.00000     -0.05702      0.00000      0.00000      0.00000     -0.02956      0.00000      0.00000      0.00000      0.00098      0.00000      0.00000      0.00000      0.00029      0.00000      0.00000      0.00000      2.11651      0.00000      0.00000     -1.01745      0.00000     -1.01747     -0.29948      0.00000      0.00000      0.16242      0.00000      0.16244     -0.32727      0.00000      0.00000      0.16332      0.00000      0.16332 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.26794      0.00000      0.00000      0.00000      0.00000      0.00000     -0.92382      0.00000      0.00000      0.00000      0.00000      0.00000     -0.98119      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.26794      0.00000      0.00000      0.00000      0.00000      0.00000     -0.92382      0.00000      0.00000      0.00000      0.00000      0.00000     -0.98119      0.00000      0.00000      0.00000 \n    -0.21830     -0.04558      0.00000      0.00000      0.00000     -0.05702      0.00000      0.00000      0.00000     -0.02956      0.00000      0.00000      0.00000      0.00098      0.00000      0.00000      0.00000      0.00029      0.00000      0.00000      0.00000     -1.01745      0.00000      0.00000      2.11651      0.00000     -1.01746      0.16244      0.00000      0.00000     -0.29946      0.00000      0.16243      0.16332      0.00000      0.00000     -0.32727      0.00000      0.16333 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.26794      0.00000      0.00000      0.00000      0.00000      0.00000     -0.92382      0.00000      0.00000      0.00000      0.00000      0.00000     -0.98119      0.00000 \n    -0.21830     -0.04558      0.00000      0.00000      0.00000     -0.05702      0.00000      0.00000      0.00000     -0.02956      0.00000      0.00000      0.00000      0.00098      0.00000      0.00000      0.00000      0.00029      0.00000      0.00000      0.00000     -1.01747      0.00000      0.00000     -1.01746      0.00000      2.11653      0.16244      0.00000      0.00000      0.16244      0.00000     -0.29947      0.16332      0.00000      0.00000      0.16332      0.00000     -0.32728 \n    -0.09856      0.08889      0.00000      0.00000      0.00000     -0.12052      0.00000      0.00000      0.00000     -0.07813      0.00000      0.00000      0.00000      0.00052      0.00000      0.00000      0.00000      0.00130      0.00000      0.00000      0.00000     -0.29948      0.00000      0.00000      0.16244      0.00000      0.16244      1.07378      0.00000      0.00000     -0.51946      0.00000     -0.51945      0.67241      0.00000      0.00000     -0.33573      0.00000     -0.33572 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.92382      0.00000      0.00000      0.00000      0.00000      0.00000      3.18647      0.00000      0.00000      0.00000      0.00000      0.00000      2.01625      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.92382      0.00000      0.00000      0.00000      0.00000      0.00000      3.18647      0.00000      0.00000      0.00000      0.00000      0.00000      2.01625      0.00000      0.00000      0.00000 \n    -0.09856      0.08889      0.00000      0.00000      0.00000     -0.12052      0.00000      0.00000      0.00000     -0.07813      0.00000      0.00000      0.00000      0.00052      0.00000      0.00000      0.00000      0.00130      0.00000      0.00000      0.00000      0.16242      0.00000      0.00000     -0.29946      0.00000      0.16244     -0.51946      0.00000      0.00000      1.07379      0.00000     -0.51946     -0.33572      0.00000      0.00000      0.67242      0.00000     -0.33572 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.92382      0.00000      0.00000      0.00000      0.00000      0.00000      3.18647      0.00000      0.00000      0.00000      0.00000      0.00000      2.01625      0.00000 \n    -0.09856      0.08889      0.00000      0.00000      0.00000     -0.12052      0.00000      0.00000      0.00000     -0.07813      0.00000      0.00000      0.00000      0.00052      0.00000      0.00000      0.00000      0.00130      0.00000      0.00000      0.00000      0.16244      0.00000      0.00000      0.16243      0.00000     -0.29947     -0.51945      0.00000      0.00000     -0.51946      0.00000      1.07377     -0.33571      0.00000      0.00000     -0.33572      0.00000      0.67241 \n     0.00028      0.00656      0.00000      0.00000      0.00000     -0.01444      0.00000      0.00000      0.00000      0.00747      0.00000      0.00000      0.00000      0.00220      0.00000      0.00000      0.00000      0.00159      0.00000      0.00000      0.00000     -0.32727      0.00000      0.00000      0.16332      0.00000      0.16332      0.67241      0.00000      0.00000     -0.33572      0.00000     -0.33571      0.43415      0.00000      0.00000     -0.21693      0.00000     -0.21693 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.98119      0.00000      0.00000      0.00000      0.00000      0.00000      2.01625      0.00000      0.00000      0.00000      0.00000      0.00000      1.30216      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.98119      0.00000      0.00000      0.00000      0.00000      0.00000      2.01625      0.00000      0.00000      0.00000      0.00000      0.00000      1.30216      0.00000      0.00000      0.00000 \n     0.00028      0.00656      0.00000      0.00000      0.00000     -0.01444      0.00000      0.00000      0.00000      0.00747      0.00000      0.00000      0.00000      0.00220      0.00000      0.00000      0.00000      0.00159      0.00000      0.00000      0.00000      0.16332      0.00000      0.00000     -0.32727      0.00000      0.16332     -0.33573      0.00000      0.00000      0.67242      0.00000     -0.33572     -0.21693      0.00000      0.00000      0.43416      0.00000     -0.21693 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.98119      0.00000      0.00000      0.00000      0.00000      0.00000      2.01625      0.00000      0.00000      0.00000      0.00000      0.00000      1.30216      0.00000 \n     0.00028      0.00656      0.00000      0.00000      0.00000     -0.01444      0.00000      0.00000      0.00000      0.00747      0.00000      0.00000      0.00000      0.00220      0.00000      0.00000      0.00000      0.00159      0.00000      0.00000      0.00000      0.16332      0.00000      0.00000      0.16333      0.00000     -0.32728     -0.33572      0.00000      0.00000     -0.33572      0.00000      0.67241     -0.21693      0.00000      0.00000     -0.21693      0.00000      0.43415 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99998      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99997      0.99997      0.99997      0.99997      0.99997      0.00016      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -895.23550   -129.45220   -120.12350   -120.12350   -120.12350    -23.67717    -19.72886    -19.72886    -19.72886    -13.36017    -13.36017    -13.36017    -13.36017    -13.36017     -3.16218     -1.92354     -1.92354     -1.92354     -0.23326     -0.23326     -0.23326     -0.23326     -0.23326     -0.14604     -0.02628     -0.02628     -0.02628      0.06843      0.13252      0.13252      0.13252      0.66508      1.23528      1.23528      1.23528      1.23528      1.23528      4.32636    195.01870 \n   </alphaeps>\n   <betaeps>\n  -895.23490   -129.45220   -120.12330   -120.12330   -120.12330    -23.67680    -19.72848    -19.72848    -19.72848    -13.35991    -13.35991    -13.35991    -13.35991    -13.35991     -3.16143     -1.92232     -1.92232     -1.92232     -0.22789     -0.22789     -0.22789     -0.22789     -0.22789     -0.12032     -0.00628     -0.00628     -0.00628      0.08014      0.14939      0.14939      0.14939      0.68498      1.25129      1.25129      1.25129      1.25129      1.25129      4.33276    195.01910 \n   </betaeps>\n   <alphavectors>\n     0.97410     -0.33870      0.00000      0.00000      0.00000      0.14450     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.06271      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.01469      0.00000     -0.00000     -0.00000      0.01239     -0.00000     -0.00000     -0.00000     -0.02281     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.06393     -0.66857 \n     0.10280      1.01991     -0.00000     -0.00000     -0.00000     -0.52614      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.24301     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.05810     -0.00000      0.00000      0.00000     -0.02512      0.00000      0.00000      0.00000      0.11239      0.00000      0.00000      0.00000      0.00000     -0.00000      0.27285      3.64720 \n     0.00000      0.00000     -0.00000     -0.00000      0.97928     -0.00000      0.00000     -0.45415     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.18548      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.02510      0.00000      0.00000     -0.00000     -0.04149      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.97928      0.00000     -0.00000     -0.45415      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.18548      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.02510     -0.00000     -0.00000      0.00000     -0.04149     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.97928     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.45415     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.18548     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02510     -0.00000      0.00000      0.00000     -0.04149      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.21290      0.08034     -0.00000     -0.00000     -0.00000      1.07455     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.60064      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.14462      0.00000     -0.00000     -0.00000      0.18055     -0.00000     -0.00000     -0.00000     -0.17787      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.70320     21.18072 \n     0.00000      0.00000     -0.00000     -0.00000      0.05343      0.00000     -0.00000      1.06714      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.63090     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.08883     -0.00000     -0.00000      0.00000      0.14773      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.05343     -0.00000      0.00000      1.06714     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.63090     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.08883      0.00000      0.00000     -0.00000      0.14773     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.05343      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.06714     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.63090     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.08883      0.00000     -0.00000     -0.00000      0.14773     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.09184     -0.05325      0.00000      0.00000      0.00000      0.20110     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.15244     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.34450     -0.00000      0.00000      0.00000     -0.08432      0.00000      0.00000      0.00000      1.01307      0.00000      0.00000      0.00000      0.00000     -0.00000      8.30638      3.18445 \n    -0.00000     -0.00000      0.00000      0.00000     -0.01312      0.00000     -0.00000      0.02764     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.13648      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.19286      0.00000      0.00000     -0.00000     -0.33028     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.01312     -0.00000      0.00000      0.02764      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.13648      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.19286     -0.00000     -0.00000      0.00000     -0.33028      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.01312     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.02764      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.13648      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.19286     -0.00000      0.00000      0.00000     -0.33028      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00233      0.00071     -0.00000     -0.00000     -0.00000      0.00526     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.01089     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.61791      0.00000     -0.00000     -0.00000      2.24260     -0.00000     -0.00000     -0.00000      3.18921     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.97141     -0.03978 \n     0.00000      0.00000     -0.00000     -0.00000      0.00340     -0.00000      0.00000     -0.00374      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05498     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.35161     -0.00000     -0.00000      0.00000      1.47961      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00340      0.00000     -0.00000     -0.00374      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.05498     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.35161      0.00000      0.00000     -0.00000      1.47961     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00340      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00374     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05498     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.35161      0.00000     -0.00000     -0.00000      1.47961     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00077     -0.00019      0.00000      0.00000      0.00000     -0.00165      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00331      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.45989      0.00000     -0.00000     -0.00000     -1.99628      0.00000      0.00000      0.00000     -1.20269      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.31433      0.01222 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00177      0.00000     -0.00000      0.00187     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.02263     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.72417      0.00000      0.00000     -0.00000     -1.29125     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00177      0.00000      0.00000      0.00187     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02263     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.72417     -0.00000     -0.00000      0.00000     -1.29125      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00177     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00187      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02263      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.72417     -0.00000      0.00000      0.00000     -1.29125      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.11584     -0.01222      0.00000      0.00000      0.00000     -0.00453      0.00000      0.00000      0.00000      0.84817     -0.47525     -0.00000      0.00000      0.00000     -0.00322      0.00000     -0.00000      0.00000      0.20498      0.23824      0.00000      0.00000     -0.00000      0.00093      0.00000     -0.00000     -0.00000     -0.00433      0.00000      0.00000      0.00000     -0.00473      0.19051     -0.28561     -0.00000     -0.00000      0.00000      0.00790    -10.42985 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.68397      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.54435     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.59464     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.68397     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54435     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.59464      0.00000     -0.00000      0.00000     -0.00000 \n    -0.11584     -0.01222      0.00000      0.00000      0.00000     -0.00453      0.00000      0.00000      0.00000     -0.01250      0.97216     -0.00000      0.00000      0.00000     -0.00322      0.00000     -0.00000      0.00000     -0.30881      0.05840      0.00000      0.00000     -0.00000      0.00093      0.00000     -0.00000     -0.00000     -0.00433      0.00000      0.00000      0.00000     -0.00473     -0.34260     -0.02218     -0.00000     -0.00000      0.00000      0.00790    -10.42985 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.68397      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.54435     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.59464      0.00000      0.00000 \n    -0.11584     -0.01222      0.00000      0.00000      0.00000     -0.00453      0.00000      0.00000      0.00000     -0.83567     -0.49691     -0.00000      0.00000      0.00000     -0.00322      0.00000     -0.00000      0.00000      0.10383     -0.29664      0.00000      0.00000     -0.00000      0.00093      0.00000     -0.00000     -0.00000     -0.00433      0.00000      0.00000      0.00000     -0.00473      0.15210      0.30779      0.00000      0.00000     -0.00000      0.00790    -10.42985 \n    -0.03573      0.02015     -0.00000     -0.00000     -0.00000     -0.06133      0.00000      0.00000      0.00000      0.06687     -0.03747     -0.00000      0.00000      0.00000     -0.01925      0.00000     -0.00000      0.00000     -0.47079     -0.54718      0.00000      0.00000     -0.00000      0.00225      0.00000     -0.00000     -0.00000      0.03160     -0.00000     -0.00000     -0.00000     -0.14066     -0.55024      0.82494      0.00000      0.00000     -0.00000     -3.79997     -1.20003 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13276     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.25026      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.71752      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.13276      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.25026      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.71752     -0.00000      0.00000     -0.00000      0.00000 \n    -0.03573      0.02015     -0.00000     -0.00000     -0.00000     -0.06133      0.00000      0.00000      0.00000     -0.00099      0.07665     -0.00000      0.00000      0.00000     -0.01925      0.00000     -0.00000      0.00000      0.70927     -0.13412      0.00000      0.00000     -0.00000      0.00225      0.00000     -0.00000     -0.00000      0.03160     -0.00000     -0.00000     -0.00000     -0.14066      0.98954      0.06405      0.00000      0.00000     -0.00000     -3.79997     -1.20003 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.13276     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.25026      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.71752     -0.00000     -0.00000 \n    -0.03573      0.02015     -0.00000     -0.00000     -0.00000     -0.06133      0.00000      0.00000      0.00000     -0.06588     -0.03918     -0.00000      0.00000      0.00000     -0.01925      0.00000     -0.00000      0.00000     -0.23848      0.68130      0.00000      0.00000     -0.00000      0.00225      0.00000     -0.00000     -0.00000      0.03160     -0.00000     -0.00000     -0.00000     -0.14066     -0.43930     -0.88899     -0.00000     -0.00000      0.00000     -3.79997     -1.20003 \n     0.00101     -0.00024      0.00000      0.00000      0.00000     -0.00463      0.00000      0.00000      0.00000     -0.01505      0.00843     -0.00000      0.00000      0.00000      0.00469     -0.00000      0.00000     -0.00000     -0.30563     -0.35522     -0.00000     -0.00000      0.00000      0.00349      0.00000     -0.00000     -0.00000     -0.17037      0.00000      0.00000      0.00000     -1.22658      0.58600     -0.87855     -0.00000     -0.00000      0.00000      0.55807      0.01050 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02988      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.81165     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.82914      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.02988     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.81165     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.82914      0.00000     -0.00000      0.00000     -0.00000 \n     0.00101     -0.00024      0.00000      0.00000      0.00000     -0.00463      0.00000      0.00000      0.00000      0.00022     -0.01725     -0.00000      0.00000      0.00000      0.00469     -0.00000      0.00000     -0.00000      0.46045     -0.08707     -0.00000     -0.00000      0.00000      0.00349      0.00000     -0.00000     -0.00000     -0.17037      0.00000      0.00000      0.00000     -1.22658     -1.05385     -0.06821     -0.00000     -0.00000      0.00000      0.55807      0.01050 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.02988      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.81165     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.82914      0.00000      0.00000 \n     0.00101     -0.00024      0.00000      0.00000      0.00000     -0.00463      0.00000      0.00000      0.00000      0.01483      0.00882     -0.00000      0.00000      0.00000      0.00469     -0.00000      0.00000     -0.00000     -0.15482      0.44230     -0.00000     -0.00000      0.00000      0.00349      0.00000     -0.00000     -0.00000     -0.17037      0.00000      0.00000      0.00000     -1.22658      0.46785      0.94676      0.00000      0.00000     -0.00000      0.55807      0.01050 \n   </alphavectors>\n   <betavectors>\n     0.97410     -0.33870      0.00000     -0.00000      0.00000      0.14450      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.06272     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.01467      0.00000     -0.00000      0.00000      0.01269      0.00000     -0.00000     -0.00000     -0.02278     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.06388     -0.66857 \n     0.10280      1.01990     -0.00000      0.00000     -0.00000     -0.52614     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.24306      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.05880     -0.00000      0.00000     -0.00000     -0.02630     -0.00000      0.00000      0.00000      0.11223      0.00000      0.00000      0.00000      0.00000      0.00000      0.27261      3.64720 \n     0.00000      0.00000      0.97928     -0.00000      0.00000     -0.00000     -0.00000     -0.45416      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.18555     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.02205     -0.00000      0.00000     -0.04291      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.97928      0.00000     -0.45416     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18555     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02205     -0.00000     -0.00000     -0.00000     -0.04291     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.97928      0.00000      0.00000      0.00000     -0.00000     -0.45416     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.18555     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02205      0.00000     -0.00000      0.00000      0.00000     -0.04291      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.21290      0.08033     -0.00000      0.00000     -0.00000      1.07458      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.60072     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.14259      0.00000     -0.00000      0.00000      0.18372      0.00000     -0.00000     -0.00000     -0.17780      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.70273     21.18072 \n     0.00000      0.00000      0.05343      0.00000     -0.00000      0.00000      0.00000      1.06714     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.63113      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.07799      0.00000     -0.00000      0.15277      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.05343     -0.00000      1.06714      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.63113      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.07799      0.00000      0.00000      0.00000      0.15277      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.05343     -0.00000     -0.00000     -0.00000      0.00000      1.06714     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.63113     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.07799     -0.00000      0.00000     -0.00000     -0.00000      0.15277      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.09184     -0.05325      0.00000     -0.00000      0.00000      0.20107      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.15215      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.35823     -0.00000      0.00000     -0.00000     -0.09686      0.00000      0.00000      0.00000      1.02372      0.00000     -0.00000      0.00000      0.00000      0.00000      8.30439      3.18446 \n    -0.00000     -0.00000     -0.01312      0.00000     -0.00000      0.00000      0.00000      0.02763      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.13699     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.16887     -0.00000      0.00000     -0.34146     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.01312     -0.00000      0.02763     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.13699     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.16887     -0.00000     -0.00000     -0.00000     -0.34146      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.01312      0.00000     -0.00000     -0.00000      0.00000      0.02763      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.13699      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.16887      0.00000     -0.00000      0.00000      0.00000     -0.34146     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00233      0.00071     -0.00000      0.00000     -0.00000      0.00526      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.01108      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.53352      0.00000     -0.00000      0.00000      2.26533      0.00000     -0.00000     -0.00000      3.18744     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.97450     -0.03979 \n     0.00000      0.00000      0.00340     -0.00000      0.00000     -0.00000     -0.00000     -0.00373      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05314     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.24958      0.00000     -0.00000      1.50026      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00340     -0.00000     -0.00373      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.05314      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.24958      0.00000      0.00000      0.00000      1.50026     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00340     -0.00000      0.00000      0.00000     -0.00000     -0.00373     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05314     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.24958     -0.00000      0.00000     -0.00000     -0.00000      1.50026      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00077     -0.00019      0.00000     -0.00000      0.00000     -0.00165     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00338     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.51727      0.00000     -0.00000      0.00000     -1.98899     -0.00000     -0.00000      0.00000     -1.19126      0.00000     -0.00000      0.00000      0.00000      0.00000      0.31485      0.01222 \n    -0.00000     -0.00000     -0.00177      0.00000     -0.00000      0.00000      0.00000      0.00187     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02194      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.81081     -0.00000      0.00000     -1.23869     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00177      0.00000      0.00187     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.02194      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.81081     -0.00000     -0.00000     -0.00000     -1.23869      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00177      0.00000     -0.00000     -0.00000      0.00000      0.00187      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.02194      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.81081      0.00000     -0.00000      0.00000      0.00000     -1.23869     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.11584     -0.01221      0.00000     -0.00000      0.00000     -0.00454     -0.00000      0.00000     -0.00000     -0.69543     -0.67944     -0.00000      0.00000     -0.00000     -0.00324     -0.00000      0.00000      0.00000      0.20914      0.23725     -0.00000     -0.00000      0.00000      0.00109      0.00000     -0.00000      0.00000     -0.00432     -0.00000     -0.00000      0.00000     -0.00472      0.10614     -0.32455      0.00000     -0.00000      0.00000      0.00793    -10.42985 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.68398     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.54780     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.59144      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.68398      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.54780      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.59144      0.00000     -0.00000      0.00000      0.00000 \n    -0.11584     -0.01221      0.00000     -0.00000      0.00000     -0.00454     -0.00000      0.00000     -0.00000      0.93613     -0.26254     -0.00000      0.00000     -0.00000     -0.00324     -0.00000      0.00000      0.00000     -0.31003      0.06250     -0.00000     -0.00000      0.00000      0.00109      0.00000     -0.00000      0.00000     -0.00432     -0.00000     -0.00000      0.00000     -0.00472     -0.33414      0.07036     -0.00000      0.00000     -0.00000      0.00793    -10.42985 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.68398     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.54780      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.59144      0.00000      0.00000 \n    -0.11584     -0.01221      0.00000     -0.00000      0.00000     -0.00454     -0.00000      0.00000     -0.00000     -0.24070      0.94198     -0.00000      0.00000     -0.00000     -0.00324     -0.00000      0.00000      0.00000      0.10089     -0.29975     -0.00000     -0.00000      0.00000      0.00109      0.00000     -0.00000      0.00000     -0.00432     -0.00000     -0.00000      0.00000     -0.00472      0.22800      0.25419      0.00000      0.00000     -0.00000      0.00793    -10.42985 \n    -0.03573      0.02016     -0.00000      0.00000     -0.00000     -0.06132     -0.00000      0.00000     -0.00000     -0.05481     -0.05355     -0.00000     -0.00000     -0.00000     -0.01892     -0.00000      0.00000      0.00000     -0.48114     -0.54579     -0.00000     -0.00000      0.00000      0.00548      0.00000     -0.00000      0.00000      0.03488      0.00000      0.00000     -0.00000     -0.14738     -0.30691      0.93849     -0.00000      0.00000     -0.00000     -3.79968     -1.20004 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.13273      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.26021      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.71023     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.13273     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.26021     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.71023     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.03573      0.02016     -0.00000      0.00000     -0.00000     -0.06132     -0.00000      0.00000     -0.00000      0.07379     -0.02069     -0.00000     -0.00000     -0.00000     -0.01892     -0.00000      0.00000      0.00000      0.71324     -0.14379     -0.00000     -0.00000      0.00000      0.00548      0.00000     -0.00000      0.00000      0.03488      0.00000      0.00000     -0.00000     -0.14738      0.96621     -0.20346      0.00000     -0.00000      0.00000     -3.79968     -1.20004 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.13273      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.26021     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.71023     -0.00000     -0.00000 \n    -0.03573      0.02016     -0.00000      0.00000     -0.00000     -0.06132     -0.00000      0.00000     -0.00000     -0.01897      0.07425     -0.00000     -0.00000     -0.00000     -0.01892     -0.00000      0.00000      0.00000     -0.23210      0.68957     -0.00000     -0.00000      0.00000      0.00548      0.00000     -0.00000      0.00000      0.03488      0.00000      0.00000     -0.00000     -0.14738     -0.65931     -0.73504     -0.00000     -0.00000      0.00000     -3.79968     -1.20004 \n     0.00101     -0.00024      0.00000     -0.00000      0.00000     -0.00463     -0.00000      0.00000     -0.00000      0.01233      0.01204     -0.00000     -0.00000     -0.00000      0.00427      0.00000     -0.00000     -0.00000     -0.30582     -0.34691     -0.00000      0.00000     -0.00000      0.02028      0.00000     -0.00000      0.00000     -0.17406     -0.00000     -0.00000      0.00000     -1.22499      0.32909     -1.00631      0.00000     -0.00000      0.00000      0.56007      0.01050 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02985     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.80101     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.83382      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.02985      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.80101      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.83382      0.00000     -0.00000      0.00000      0.00000 \n     0.00101     -0.00024      0.00000     -0.00000      0.00000     -0.00463     -0.00000      0.00000     -0.00000     -0.01659      0.00465     -0.00000     -0.00000     -0.00000      0.00427      0.00000     -0.00000     -0.00000      0.45335     -0.09139     -0.00000      0.00000     -0.00000      0.02028      0.00000     -0.00000      0.00000     -0.17406     -0.00000     -0.00000      0.00000     -1.22499     -1.03604      0.21816     -0.00000      0.00000     -0.00000      0.56007      0.01050 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02985     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.80101      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.83382      0.00000      0.00000 \n     0.00101     -0.00024      0.00000     -0.00000      0.00000     -0.00463     -0.00000      0.00000     -0.00000      0.00427     -0.01670     -0.00000     -0.00000     -0.00000      0.00427      0.00000     -0.00000     -0.00000     -0.14752      0.43830     -0.00000      0.00000     -0.00000      0.02028      0.00000     -0.00000      0.00000     -0.17406     -0.00000     -0.00000      0.00000     -1.22499      0.70695      0.78815      0.00000      0.00000     -0.00000      0.56007      0.01050 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cd\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17754     -0.67681      0.00000      0.00000      0.00000      0.76500      0.00000      0.00000      0.00000      0.10779      0.00000      0.00000      0.00000      0.01965      0.00000      0.00000      0.00000      0.01149      0.00000      0.00000      0.00000     -0.22197      0.00000      0.00000     -0.22197      0.00000     -0.22197     -0.09694      0.00000      0.00000     -0.09694      0.00000     -0.09694      0.00094      0.00000      0.00000      0.00094      0.00000      0.00094 \n    -0.67681      2.80092      0.00000      0.00000      0.00000     -1.23605      0.00000      0.00000      0.00000      0.32580      0.00000      0.00000      0.00000     -0.09260      0.00000      0.00000      0.00000     -0.04068      0.00000      0.00000      0.00000     -0.05597      0.00000      0.00000     -0.05597      0.00000     -0.05597      0.08654      0.00000      0.00000      0.08654      0.00000      0.08654      0.00069      0.00000      0.00000      0.00069      0.00000      0.00069 \n     0.00000      0.00000      2.40946      0.00000      0.00000      0.00000     -1.11864      0.00000      0.00000      0.00000      0.38356      0.00000      0.00000      0.00000      0.02453      0.00000      0.00000      0.00000     -0.01088      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.40946      0.00000      0.00000      0.00000     -1.11864      0.00000      0.00000      0.00000      0.38356      0.00000      0.00000      0.00000      0.02453      0.00000      0.00000      0.00000     -0.01088      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.40946      0.00000      0.00000      0.00000     -1.11864      0.00000      0.00000      0.00000      0.38356      0.00000      0.00000      0.00000      0.02453      0.00000      0.00000      0.00000     -0.01088      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.76500     -1.23605      0.00000      0.00000      0.00000      3.21378      0.00000      0.00000      0.00000     -1.10356      0.00000      0.00000      0.00000      0.22713      0.00000      0.00000      0.00000      0.10128      0.00000      0.00000      0.00000     -0.05667      0.00000      0.00000     -0.05667      0.00000     -0.05667     -0.10951      0.00000      0.00000     -0.10951      0.00000     -0.10951      0.00124      0.00000      0.00000      0.00124      0.00000      0.00124 \n     0.00000      0.00000     -1.11864      0.00000      0.00000      0.00000      3.11463      0.00000      0.00000      0.00000     -1.41286      0.00000      0.00000      0.00000     -0.05720      0.00000      0.00000      0.00000      0.02356      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.11864      0.00000      0.00000      0.00000      3.11463      0.00000      0.00000      0.00000     -1.41286      0.00000      0.00000      0.00000     -0.05720      0.00000      0.00000      0.00000      0.02356      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.11864      0.00000      0.00000      0.00000      3.11463      0.00000      0.00000      0.00000     -1.41286      0.00000      0.00000      0.00000     -0.05720      0.00000      0.00000      0.00000      0.02356      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.10779      0.32580      0.00000      0.00000      0.00000     -1.10356      0.00000      0.00000      0.00000      3.22386      0.00000      0.00000      0.00000     -0.58987      0.00000      0.00000      0.00000     -0.27619      0.00000      0.00000      0.00000     -0.03031      0.00000      0.00000     -0.03031      0.00000     -0.03031     -0.11292      0.00000      0.00000     -0.11292      0.00000     -0.11292     -0.03376      0.00000      0.00000     -0.03376      0.00000     -0.03376 \n     0.00000      0.00000      0.38356      0.00000      0.00000      0.00000     -1.41286      0.00000      0.00000      0.00000      2.62320      0.00000      0.00000      0.00000      0.08925      0.00000      0.00000      0.00000     -0.03567      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.38356      0.00000      0.00000      0.00000     -1.41286      0.00000      0.00000      0.00000      2.62320      0.00000      0.00000      0.00000      0.08925      0.00000      0.00000      0.00000     -0.03567      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.38356      0.00000      0.00000      0.00000     -1.41286      0.00000      0.00000      0.00000      2.62320      0.00000      0.00000      0.00000      0.08925      0.00000      0.00000      0.00000     -0.03567      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01965     -0.09260      0.00000      0.00000      0.00000      0.22713      0.00000      0.00000      0.00000     -0.58987      0.00000      0.00000      0.00000      1.03912      0.00000      0.00000      0.00000      0.43407      0.00000      0.00000      0.00000      0.00193      0.00000      0.00000      0.00193      0.00000      0.00193      0.03894      0.00000      0.00000      0.03894      0.00000      0.03894      0.04993      0.00000      0.00000      0.04993      0.00000      0.04993 \n     0.00000      0.00000      0.02453      0.00000      0.00000      0.00000     -0.05720      0.00000      0.00000      0.00000      0.08925      0.00000      0.00000      0.00000      0.00310      0.00000      0.00000      0.00000     -0.00125      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02453      0.00000      0.00000      0.00000     -0.05720      0.00000      0.00000      0.00000      0.08925      0.00000      0.00000      0.00000      0.00310      0.00000      0.00000      0.00000     -0.00125      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02453      0.00000      0.00000      0.00000     -0.05720      0.00000      0.00000      0.00000      0.08925      0.00000      0.00000      0.00000      0.00310      0.00000      0.00000      0.00000     -0.00125      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01149     -0.04068      0.00000      0.00000      0.00000      0.10128      0.00000      0.00000      0.00000     -0.27619      0.00000      0.00000      0.00000      0.43407      0.00000      0.00000      0.00000      0.18165      0.00000      0.00000      0.00000      0.00060      0.00000      0.00000      0.00060      0.00000      0.00060      0.01725      0.00000      0.00000      0.01725      0.00000      0.01725      0.02094      0.00000      0.00000      0.02094      0.00000      0.02094 \n     0.00000      0.00000     -0.01088      0.00000      0.00000      0.00000      0.02356      0.00000      0.00000      0.00000     -0.03567      0.00000      0.00000      0.00000     -0.00125      0.00000      0.00000      0.00000      0.00050      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01088      0.00000      0.00000      0.00000      0.02356      0.00000      0.00000      0.00000     -0.03567      0.00000      0.00000      0.00000     -0.00125      0.00000      0.00000      0.00000      0.00050      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01088      0.00000      0.00000      0.00000      0.02356      0.00000      0.00000      0.00000     -0.03567      0.00000      0.00000      0.00000     -0.00125      0.00000      0.00000      0.00000      0.00050      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.22197     -0.05597      0.00000      0.00000      0.00000     -0.05667      0.00000      0.00000      0.00000     -0.03031      0.00000      0.00000      0.00000      0.00193      0.00000      0.00000      0.00000      0.00060      0.00000      0.00000      0.00000      2.14253      0.00000      0.00000     -1.02776      0.00000     -1.02777     -0.35786      0.00000      0.00000      0.19142      0.00000      0.19142     -0.31365      0.00000      0.00000      0.15678      0.00000      0.15677 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.34054      0.00000      0.00000      0.00000      0.00000      0.00000     -1.09855      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94089      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.34054      0.00000      0.00000      0.00000      0.00000      0.00000     -1.09855      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94089      0.00000      0.00000      0.00000 \n    -0.22197     -0.05597      0.00000      0.00000      0.00000     -0.05667      0.00000      0.00000      0.00000     -0.03031      0.00000      0.00000      0.00000      0.00193      0.00000      0.00000      0.00000      0.00060      0.00000      0.00000      0.00000     -1.02776      0.00000      0.00000      2.14250      0.00000     -1.02777      0.19142      0.00000      0.00000     -0.35785      0.00000      0.19142      0.15677      0.00000      0.00000     -0.31366      0.00000      0.15678 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.34054      0.00000      0.00000      0.00000      0.00000      0.00000     -1.09855      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94089      0.00000 \n    -0.22197     -0.05597      0.00000      0.00000      0.00000     -0.05667      0.00000      0.00000      0.00000     -0.03031      0.00000      0.00000      0.00000      0.00193      0.00000      0.00000      0.00000      0.00060      0.00000      0.00000      0.00000     -1.02777      0.00000      0.00000     -1.02777      0.00000      2.14250      0.19141      0.00000      0.00000      0.19142      0.00000     -0.35785      0.15678      0.00000      0.00000      0.15678      0.00000     -0.31365 \n    -0.09694      0.08654      0.00000      0.00000      0.00000     -0.10951      0.00000      0.00000      0.00000     -0.11292      0.00000      0.00000      0.00000      0.03894      0.00000      0.00000      0.00000      0.01725      0.00000      0.00000      0.00000     -0.35786      0.00000      0.00000      0.19142      0.00000      0.19141      1.20687      0.00000      0.00000     -0.58261      0.00000     -0.58260      0.64436      0.00000      0.00000     -0.31832      0.00000     -0.31831 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.09855      0.00000      0.00000      0.00000      0.00000      0.00000      3.57895      0.00000      0.00000      0.00000      0.00000      0.00000      1.92536      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.09855      0.00000      0.00000      0.00000      0.00000      0.00000      3.57895      0.00000      0.00000      0.00000      0.00000      0.00000      1.92536      0.00000      0.00000      0.00000 \n    -0.09694      0.08654      0.00000      0.00000      0.00000     -0.10951      0.00000      0.00000      0.00000     -0.11292      0.00000      0.00000      0.00000      0.03894      0.00000      0.00000      0.00000      0.01725      0.00000      0.00000      0.00000      0.19142      0.00000      0.00000     -0.35785      0.00000      0.19142     -0.58261      0.00000      0.00000      1.20688      0.00000     -0.58259     -0.31832      0.00000      0.00000      0.64436      0.00000     -0.31832 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.09855      0.00000      0.00000      0.00000      0.00000      0.00000      3.57895      0.00000      0.00000      0.00000      0.00000      0.00000      1.92536      0.00000 \n    -0.09694      0.08654      0.00000      0.00000      0.00000     -0.10951      0.00000      0.00000      0.00000     -0.11292      0.00000      0.00000      0.00000      0.03894      0.00000      0.00000      0.00000      0.01725      0.00000      0.00000      0.00000      0.19142      0.00000      0.00000      0.19142      0.00000     -0.35785     -0.58260      0.00000      0.00000     -0.58259      0.00000      1.20687     -0.31832      0.00000      0.00000     -0.31832      0.00000      0.64436 \n     0.00094      0.00069      0.00000      0.00000      0.00000      0.00124      0.00000      0.00000      0.00000     -0.03376      0.00000      0.00000      0.00000      0.04993      0.00000      0.00000      0.00000      0.02094      0.00000      0.00000      0.00000     -0.31365      0.00000      0.00000      0.15677      0.00000      0.15678      0.64436      0.00000      0.00000     -0.31832      0.00000     -0.31832      0.35452      0.00000      0.00000     -0.17356      0.00000     -0.17356 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94089      0.00000      0.00000      0.00000      0.00000      0.00000      1.92536      0.00000      0.00000      0.00000      0.00000      0.00000      1.05617      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94089      0.00000      0.00000      0.00000      0.00000      0.00000      1.92536      0.00000      0.00000      0.00000      0.00000      0.00000      1.05617      0.00000      0.00000      0.00000 \n     0.00094      0.00069      0.00000      0.00000      0.00000      0.00124      0.00000      0.00000      0.00000     -0.03376      0.00000      0.00000      0.00000      0.04993      0.00000      0.00000      0.00000      0.02094      0.00000      0.00000      0.00000      0.15678      0.00000      0.00000     -0.31366      0.00000      0.15678     -0.31832      0.00000      0.00000      0.64436      0.00000     -0.31832     -0.17356      0.00000      0.00000      0.35452      0.00000     -0.17357 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94089      0.00000      0.00000      0.00000      0.00000      0.00000      1.92536      0.00000      0.00000      0.00000      0.00000      0.00000      1.05617      0.00000 \n     0.00094      0.00069      0.00000      0.00000      0.00000      0.00124      0.00000      0.00000      0.00000     -0.03376      0.00000      0.00000      0.00000      0.04993      0.00000      0.00000      0.00000      0.02094      0.00000      0.00000      0.00000      0.15677      0.00000      0.00000      0.15678      0.00000     -0.31365     -0.31831      0.00000      0.00000     -0.31832      0.00000      0.64436     -0.17356      0.00000      0.00000     -0.17357      0.00000      0.35452 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -936.21020   -136.44720   -126.84210   -126.84210   -126.84210    -25.42882    -21.33444    -21.33444    -21.33444    -14.73046    -14.73046    -14.73046    -14.73046    -14.73046     -3.58325     -2.27209     -2.27209     -2.27209     -0.44561     -0.44561     -0.44561     -0.44561     -0.44561     -0.19463     -0.04256     -0.04256     -0.04256      0.05598      0.11568      0.11568      0.11568      0.65425      1.21246      1.21246      1.21246      1.21246      1.21246      4.59403    207.55620 \n   </alphaeps>\n   <betaeps>\n  -936.21020   -136.44720   -126.84210   -126.84210   -126.84210    -25.42882    -21.33444    -21.33444    -21.33444    -14.73046    -14.73046    -14.73046    -14.73046    -14.73046     -3.58325     -2.27209     -2.27209     -2.27209     -0.44561     -0.44561     -0.44561     -0.44561     -0.44561     -0.19463     -0.04256     -0.04256     -0.04256      0.05598      0.11568      0.11568      0.11568      0.65425      1.21246      1.21246      1.21246      1.21246      1.21246      4.59403    207.55620 \n   </betaeps>\n   <alphavectors>\n     0.97364     -0.33949     -0.00000      0.00000      0.00000      0.14555      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.06389     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.01662     -0.00000      0.00000     -0.00000      0.01142     -0.00000     -0.00000      0.00000     -0.02344      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06359     -0.68419 \n     0.10512      1.02131      0.00000     -0.00000     -0.00000     -0.52997     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.24719      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.06607      0.00000     -0.00000      0.00000     -0.02853      0.00000      0.00000     -0.00000      0.10577     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.27263      3.73759 \n    -0.00000      0.00000      0.00000     -0.00000      0.97882     -0.00000     -0.00000      0.00000     -0.45898      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.18968      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02808     -0.00000      0.00000     -0.03674     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.97882      0.00000     -0.00000     -0.00000     -0.45898      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.18968     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02808     -0.00000      0.00000     -0.00000     -0.00000     -0.03674     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.97882     -0.00000     -0.00000      0.00000     -0.45898     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.18968      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02808      0.00000      0.00000     -0.00000     -0.03674     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.22006      0.08731      0.00000     -0.00000     -0.00000      1.07243      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.61159     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.16337     -0.00000      0.00000     -0.00000      0.15356     -0.00000     -0.00000      0.00000     -0.20602     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.70071     21.30988 \n    -0.00000      0.00000      0.00000     -0.00000      0.05418      0.00000      0.00000     -0.00000      1.06908      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.64144     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.09906      0.00000     -0.00000      0.13028      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05418     -0.00000      0.00000      0.00000      1.06908     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.64144     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.09906      0.00000     -0.00000      0.00000      0.00000      0.13028      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.05418      0.00000      0.00000     -0.00000      1.06908      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.64144     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.09906     -0.00000     -0.00000      0.00000      0.13028      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.08984     -0.05468     -0.00000      0.00000      0.00000      0.20506      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.16960      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.43687      0.00000     -0.00000      0.00000     -0.18928      0.00000      0.00000     -0.00000      0.95206     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      8.90713      2.60824 \n     0.00000     -0.00000     -0.00000      0.00000     -0.01336      0.00000      0.00000     -0.00000      0.02680     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.14486      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.21523     -0.00000      0.00000     -0.29029     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.01336     -0.00000      0.00000      0.00000      0.02680      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.14486      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.21523     -0.00000      0.00000     -0.00000     -0.00000     -0.29029     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.01336      0.00000      0.00000     -0.00000      0.02680     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.14486      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.21523      0.00000      0.00000     -0.00000     -0.29029     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00182      0.00050      0.00000     -0.00000     -0.00000      0.00567      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.01616      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.72060     -0.00000      0.00000     -0.00000      1.96932     -0.00000     -0.00000      0.00000      3.10455     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.91560     -0.02349 \n    -0.00000      0.00000      0.00000     -0.00000      0.00333     -0.00000     -0.00000      0.00000     -0.00346      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.03910     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.51657      0.00000     -0.00000      1.41386      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00333      0.00000     -0.00000     -0.00000     -0.00346      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.03910      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.51657      0.00000     -0.00000      0.00000      0.00000      1.41386      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00333     -0.00000     -0.00000      0.00000     -0.00346      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.03910     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.51657     -0.00000     -0.00000      0.00000      1.41386      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00063     -0.00015     -0.00000      0.00000      0.00000     -0.00180     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00526     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.30132     -0.00000      0.00000     -0.00000     -1.94193      0.00000      0.00000     -0.00000     -1.20614      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.30399      0.00776 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00172      0.00000      0.00000     -0.00000      0.00172     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.01564      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.57465     -0.00000      0.00000     -1.34956      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00172     -0.00000      0.00000      0.00000      0.00172     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.01564     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.57465     -0.00000      0.00000     -0.00000     -0.00000     -1.34956     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00172      0.00000      0.00000     -0.00000      0.00172     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.01564      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.57465      0.00000      0.00000     -0.00000     -1.34956     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.11928     -0.01568     -0.00000      0.00000      0.00000     -0.00289     -0.00000      0.00000      0.00000      0.91250     -0.33478     -0.00000     -0.00000      0.00000     -0.00359     -0.00000      0.00000     -0.00000     -0.29064      0.16602     -0.00000      0.00000      0.00000      0.00115     -0.00000     -0.00000     -0.00000     -0.00286     -0.00000     -0.00000      0.00000     -0.00325      0.30972     -0.12356      0.00000     -0.00000     -0.00000      0.00900    -10.47414 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.68350     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.57974     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.57755     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.68350     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.57974      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.57755     -0.00000     -0.00000      0.00000      0.00000 \n    -0.11928     -0.01568     -0.00000      0.00000      0.00000     -0.00289     -0.00000      0.00000      0.00000     -0.74617     -0.62286     -0.00000     -0.00000      0.00000     -0.00359     -0.00000      0.00000     -0.00000      0.28909      0.16869      0.00000     -0.00000     -0.00000      0.00115      0.00000      0.00000      0.00000     -0.00286      0.00000      0.00000     -0.00000     -0.00325     -0.26186     -0.20644     -0.00000     -0.00000     -0.00000      0.00900    -10.47414 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68350      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.57974     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.57755      0.00000     -0.00000     -0.00000 \n    -0.11928     -0.01568     -0.00000      0.00000      0.00000     -0.00289     -0.00000      0.00000      0.00000     -0.16632      0.95763     -0.00000     -0.00000      0.00000     -0.00359     -0.00000      0.00000     -0.00000      0.00154     -0.33471      0.00000     -0.00000     -0.00000      0.00115      0.00000      0.00000      0.00000     -0.00286      0.00000      0.00000     -0.00000     -0.00325     -0.04785      0.33000     -0.00000      0.00000      0.00000      0.00900    -10.47414 \n    -0.03514      0.02071      0.00000     -0.00000     -0.00000     -0.06298     -0.00000      0.00000      0.00000      0.07162     -0.02628     -0.00000     -0.00000      0.00000     -0.02313     -0.00000      0.00000     -0.00000      0.66735     -0.38120      0.00000     -0.00000     -0.00000      0.02793      0.00000      0.00000      0.00000      0.05865      0.00000      0.00000     -0.00000     -0.14939     -0.89136      0.35559     -0.00000      0.00000      0.00000     -4.04731     -0.99170 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.13214      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.33117      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.66220      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13214      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.33117     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.66220      0.00000      0.00000     -0.00000     -0.00000 \n    -0.03514      0.02071      0.00000     -0.00000     -0.00000     -0.06298     -0.00000      0.00000      0.00000     -0.05857     -0.04889     -0.00000     -0.00000      0.00000     -0.02313     -0.00000      0.00000     -0.00000     -0.66381     -0.38734     -0.00000      0.00000      0.00000      0.02793     -0.00000     -0.00000     -0.00000      0.05865     -0.00000     -0.00000      0.00000     -0.14939      0.75363      0.59414      0.00000      0.00000      0.00000     -4.04731     -0.99170 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.13214     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.33117      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.66220     -0.00000      0.00000      0.00000 \n    -0.03514      0.02071      0.00000     -0.00000     -0.00000     -0.06298     -0.00000      0.00000      0.00000     -0.01306      0.07517     -0.00000     -0.00000      0.00000     -0.02313     -0.00000      0.00000     -0.00000     -0.00355      0.76854     -0.00000      0.00000      0.00000      0.02793     -0.00000     -0.00000     -0.00000      0.05865     -0.00000     -0.00000      0.00000     -0.14939      0.13772     -0.94974      0.00000     -0.00000     -0.00000     -4.04731     -0.99170 \n     0.00062     -0.00002     -0.00000      0.00000      0.00000     -0.00518     -0.00000      0.00000      0.00000     -0.01593      0.00585     -0.00000     -0.00000      0.00000     -0.00061      0.00000     -0.00000     -0.00000      0.36401     -0.20793      0.00000     -0.00000     -0.00000      0.03470      0.00000      0.00000      0.00000     -0.10092      0.00000      0.00000     -0.00000     -1.16522      1.00026     -0.39904      0.00000     -0.00000     -0.00000      0.51836      0.00012 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02940     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.72610     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.86528      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02940     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.72610      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.86528     -0.00000      0.00000     -0.00000      0.00000 \n     0.00062     -0.00002     -0.00000      0.00000      0.00000     -0.00518     -0.00000      0.00000      0.00000      0.01303      0.01088     -0.00000     -0.00000      0.00000     -0.00061      0.00000     -0.00000     -0.00000     -0.36208     -0.21128     -0.00000      0.00000      0.00000      0.03470     -0.00000     -0.00000     -0.00000     -0.10092     -0.00000     -0.00000      0.00000     -1.16522     -0.84571     -0.66673     -0.00000     -0.00000     -0.00000      0.51836      0.00012 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02940      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.72610     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.86528      0.00000     -0.00000     -0.00000 \n     0.00062     -0.00002     -0.00000      0.00000      0.00000     -0.00518     -0.00000      0.00000      0.00000      0.00290     -0.01672     -0.00000     -0.00000      0.00000     -0.00061      0.00000     -0.00000     -0.00000     -0.00193      0.41921     -0.00000      0.00000      0.00000      0.03470     -0.00000     -0.00000     -0.00000     -0.10092     -0.00000     -0.00000      0.00000     -1.16522     -0.15455      1.06577     -0.00000      0.00000      0.00000      0.51836      0.00012 \n   </alphavectors>\n   <betavectors>\n     0.97364     -0.33949     -0.00000     -0.00000     -0.00000      0.14555     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.06389      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.01662      0.00000      0.00000      0.00000      0.01142     -0.00000      0.00000     -0.00000     -0.02344      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06359     -0.68419 \n     0.10512      1.02131      0.00000      0.00000      0.00000     -0.52997      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.24719     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.06607     -0.00000     -0.00000     -0.00000     -0.02853      0.00000     -0.00000      0.00000      0.10577     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.27263      3.73759 \n    -0.00000     -0.00000     -0.00000      0.97882     -0.00000     -0.00000      0.00000      0.00000     -0.45898     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.18968     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02808      0.00000     -0.00000     -0.00000     -0.03674      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.97882     -0.00000      0.00000     -0.45898     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.18968     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02808      0.00000      0.00000     -0.00000      0.00000     -0.03674      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.97882     -0.00000     -0.00000     -0.00000     -0.45898      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.18968     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02808      0.00000     -0.00000     -0.03674      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.22006      0.08731      0.00000      0.00000      0.00000      1.07243     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.61159      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.16337      0.00000      0.00000      0.00000      0.15356     -0.00000      0.00000     -0.00000     -0.20602     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.70071     21.30988 \n    -0.00000     -0.00000     -0.00000      0.05418      0.00000      0.00000     -0.00000     -0.00000      1.06908     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.64144      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.09906     -0.00000      0.00000      0.00000      0.13028      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.05418      0.00000     -0.00000      1.06908      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.64144      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.09906     -0.00000     -0.00000      0.00000     -0.00000      0.13028     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.05418      0.00000      0.00000      0.00000      1.06908     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.64144     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.09906     -0.00000      0.00000      0.13028      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.08984     -0.05468     -0.00000     -0.00000     -0.00000      0.20506     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.16960     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.43687     -0.00000     -0.00000     -0.00000     -0.18928      0.00000     -0.00000      0.00000      0.95206     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      8.90713      2.60824 \n     0.00000      0.00000      0.00000     -0.01336     -0.00000      0.00000     -0.00000     -0.00000      0.02680      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.14486     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.21523      0.00000     -0.00000     -0.00000     -0.29029     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.01336      0.00000     -0.00000      0.02680     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.14486     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.21523      0.00000      0.00000     -0.00000      0.00000     -0.29029     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.01336      0.00000      0.00000      0.00000      0.02680      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.14486      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.21523      0.00000     -0.00000     -0.29029     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00182      0.00050      0.00000      0.00000      0.00000      0.00567     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01616     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.72060      0.00000      0.00000      0.00000      1.96932     -0.00000      0.00000     -0.00000      3.10455     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.91560     -0.02349 \n    -0.00000     -0.00000     -0.00000      0.00333     -0.00000     -0.00000      0.00000      0.00000     -0.00346     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.03910      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.51657     -0.00000      0.00000      0.00000      1.41386      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00333     -0.00000      0.00000     -0.00346      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.03910      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.51657     -0.00000     -0.00000      0.00000     -0.00000      1.41386     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00333     -0.00000     -0.00000     -0.00000     -0.00346     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.03910     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.51657     -0.00000      0.00000      1.41386      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00063     -0.00015     -0.00000     -0.00000     -0.00000     -0.00180      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00526      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.30132      0.00000      0.00000      0.00000     -1.94193      0.00000     -0.00000     -0.00000     -1.20614      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.30399      0.00776 \n     0.00000      0.00000      0.00000     -0.00172      0.00000      0.00000     -0.00000     -0.00000      0.00172      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.01564     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.57465      0.00000     -0.00000     -0.00000     -1.34956     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00172      0.00000     -0.00000      0.00172     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01564     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.57465      0.00000      0.00000     -0.00000      0.00000     -1.34956      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00172      0.00000      0.00000      0.00000      0.00172      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01564      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.57465      0.00000     -0.00000     -1.34956      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.11928     -0.01568     -0.00000     -0.00000     -0.00000     -0.00289      0.00000      0.00000      0.00000      0.84261     -0.48450      0.00000     -0.00000      0.00000     -0.00359      0.00000     -0.00000     -0.00000     -0.29471      0.15868     -0.00000     -0.00000      0.00000      0.00115      0.00000      0.00000     -0.00000     -0.00286      0.00000     -0.00000     -0.00000     -0.00325      0.29871     -0.14820      0.00000     -0.00000      0.00000      0.00900    -10.47414 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.68350     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.57974      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.57755      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.68350      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.57974      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.57755      0.00000     -0.00000      0.00000     -0.00000 \n    -0.11928     -0.01568     -0.00000     -0.00000     -0.00000     -0.00289      0.00000      0.00000      0.00000     -0.84089     -0.48747      0.00000     -0.00000      0.00000     -0.00359      0.00000     -0.00000     -0.00000      0.28477      0.17589     -0.00000     -0.00000      0.00000      0.00115      0.00000      0.00000     -0.00000     -0.00286      0.00000     -0.00000     -0.00000     -0.00325     -0.27770     -0.18459     -0.00000      0.00000     -0.00000      0.00900    -10.47414 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.68350     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.57974      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.57755      0.00000     -0.00000     -0.00000 \n    -0.11928     -0.01568     -0.00000     -0.00000     -0.00000     -0.00289      0.00000      0.00000      0.00000     -0.00172      0.97197      0.00000     -0.00000      0.00000     -0.00359      0.00000     -0.00000     -0.00000      0.00994     -0.33456      0.00000      0.00000     -0.00000      0.00115     -0.00000     -0.00000      0.00000     -0.00286     -0.00000      0.00000      0.00000     -0.00325     -0.02101      0.33279      0.00000      0.00000     -0.00000      0.00900    -10.47414 \n    -0.03514      0.02071      0.00000      0.00000      0.00000     -0.06298      0.00000      0.00000      0.00000      0.06614     -0.03803      0.00000     -0.00000      0.00000     -0.02313      0.00000     -0.00000     -0.00000      0.67670     -0.36435      0.00000      0.00000     -0.00000      0.02793     -0.00000     -0.00000      0.00000      0.05865     -0.00000      0.00000      0.00000     -0.14939     -0.85968      0.42651     -0.00000      0.00000     -0.00000     -4.04731     -0.99170 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.13214      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.33117     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.66220     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.13214     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.33117     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.66220      0.00000      0.00000     -0.00000      0.00000 \n    -0.03514      0.02071      0.00000      0.00000      0.00000     -0.06298      0.00000      0.00000      0.00000     -0.06600     -0.03826      0.00000     -0.00000      0.00000     -0.02313      0.00000     -0.00000     -0.00000     -0.65389     -0.40386      0.00000      0.00000     -0.00000      0.02793     -0.00000     -0.00000      0.00000      0.05865     -0.00000      0.00000      0.00000     -0.14939      0.79921      0.53125      0.00000     -0.00000      0.00000     -4.04731     -0.99170 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.13214      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.33117     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.66220     -0.00000      0.00000      0.00000 \n    -0.03514      0.02071      0.00000      0.00000      0.00000     -0.06298      0.00000      0.00000      0.00000     -0.00013      0.07629      0.00000     -0.00000      0.00000     -0.02313      0.00000     -0.00000     -0.00000     -0.02281      0.76821     -0.00000     -0.00000      0.00000      0.02793      0.00000      0.00000     -0.00000      0.05865      0.00000     -0.00000     -0.00000     -0.14939      0.06048     -0.95776     -0.00000     -0.00000      0.00000     -4.04731     -0.99170 \n     0.00062     -0.00002     -0.00000     -0.00000     -0.00000     -0.00518      0.00000      0.00000      0.00000     -0.01471      0.00846      0.00000     -0.00000      0.00000     -0.00061      0.00000     -0.00000     -0.00000      0.36911     -0.19874      0.00000      0.00000     -0.00000      0.03470     -0.00000     -0.00000      0.00000     -0.10092     -0.00000      0.00000      0.00000     -1.16522      0.96472     -0.47862      0.00000     -0.00000      0.00000      0.51836      0.00012 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02940     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.72610      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.86528     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.02940      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.72610      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.86528     -0.00000      0.00000     -0.00000      0.00000 \n     0.00062     -0.00002     -0.00000     -0.00000     -0.00000     -0.00518      0.00000      0.00000      0.00000      0.01468      0.00851      0.00000     -0.00000      0.00000     -0.00061      0.00000     -0.00000     -0.00000     -0.35667     -0.22029      0.00000      0.00000     -0.00000      0.03470     -0.00000     -0.00000      0.00000     -0.10092     -0.00000      0.00000      0.00000     -1.16522     -0.89686     -0.59616     -0.00000      0.00000     -0.00000      0.51836      0.00012 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02940     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.72610      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.86528     -0.00000     -0.00000     -0.00000 \n     0.00062     -0.00002     -0.00000     -0.00000     -0.00000     -0.00518      0.00000      0.00000      0.00000      0.00003     -0.01697      0.00000     -0.00000      0.00000     -0.00061      0.00000     -0.00000     -0.00000     -0.01244      0.41903     -0.00000     -0.00000      0.00000      0.03470      0.00000      0.00000     -0.00000     -0.10092      0.00000     -0.00000     -0.00000     -1.16522     -0.06786      1.07478      0.00000      0.00000     -0.00000      0.51836      0.00012 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ga\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.18400     -0.68373      0.00000      0.00000      0.00000     -0.13428      0.00000      0.00000      0.00000     -0.04155      0.00000      0.00000      0.00000     -0.02440      0.00000      0.00000      0.00000      0.04663      0.00000      0.00000      0.04663      0.00000      0.04663 \n    -0.68373      2.54126      0.00000      0.00000      0.00000      0.76301      0.00000      0.00000      0.00000      0.13744      0.00000      0.00000      0.00000      0.09152      0.00000      0.00000      0.00000     -0.09654      0.00000      0.00000     -0.09654      0.00000     -0.09654 \n     0.00000      0.00000      2.28012      0.00000      0.00000      0.00000     -0.79256      0.00000      0.00000      0.00000     -0.04492      0.00000      0.00000      0.00000      0.03484      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.28012      0.00000      0.00000      0.00000     -0.79256      0.00000      0.00000      0.00000     -0.04492      0.00000      0.00000      0.00000      0.03484      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.28012      0.00000      0.00000      0.00000     -0.79256      0.00000      0.00000      0.00000     -0.04492      0.00000      0.00000      0.00000      0.03484      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.13428      0.76301      0.00000      0.00000      0.00000      2.21607      0.00000      0.00000      0.00000      0.37838      0.00000      0.00000      0.00000      0.28376      0.00000      0.00000      0.00000     -0.06237      0.00000      0.00000     -0.06237      0.00000     -0.06237 \n     0.00000      0.00000     -0.79256      0.00000      0.00000      0.00000      2.24720      0.00000      0.00000      0.00000      0.06573      0.00000      0.00000      0.00000     -0.07675      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.79256      0.00000      0.00000      0.00000      2.24720      0.00000      0.00000      0.00000      0.06573      0.00000      0.00000      0.00000     -0.07675      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.79256      0.00000      0.00000      0.00000      2.24720      0.00000      0.00000      0.00000      0.06573      0.00000      0.00000      0.00000     -0.07675      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04155      0.13744      0.00000      0.00000      0.00000      0.37838      0.00000      0.00000      0.00000      0.89627      0.00000      0.00000      0.00000      0.55830      0.00000      0.00000      0.00000      0.00247      0.00000      0.00000      0.00247      0.00000      0.00247 \n     0.00000      0.00000     -0.04492      0.00000      0.00000      0.00000      0.06573      0.00000      0.00000      0.00000      0.09428      0.00000      0.00000      0.00000      0.10141      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.04492      0.00000      0.00000      0.00000      0.06573      0.00000      0.00000      0.00000      0.09428      0.00000      0.00000      0.00000      0.10141      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.04492      0.00000      0.00000      0.00000      0.06573      0.00000      0.00000      0.00000      0.09428      0.00000      0.00000      0.00000      0.10141      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02440      0.09152      0.00000      0.00000      0.00000      0.28376      0.00000      0.00000      0.00000      0.55830      0.00000      0.00000      0.00000      0.34897      0.00000      0.00000      0.00000      0.00041      0.00000      0.00000      0.00041      0.00000      0.00041 \n     0.00000      0.00000      0.03484      0.00000      0.00000      0.00000     -0.07675      0.00000      0.00000      0.00000      0.10141      0.00000      0.00000      0.00000      0.11947      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03484      0.00000      0.00000      0.00000     -0.07675      0.00000      0.00000      0.00000      0.10141      0.00000      0.00000      0.00000      0.11947      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03484      0.00000      0.00000      0.00000     -0.07675      0.00000      0.00000      0.00000      0.10141      0.00000      0.00000      0.00000      0.11947      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.04663     -0.09654      0.00000      0.00000      0.00000     -0.06237      0.00000      0.00000      0.00000      0.00247      0.00000      0.00000      0.00000      0.00041      0.00000      0.00000      0.00000      2.00471      0.00000      0.00000     -0.99530      0.00000     -0.99532 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000 \n     0.04663     -0.09654      0.00000      0.00000      0.00000     -0.06237      0.00000      0.00000      0.00000      0.00247      0.00000      0.00000      0.00000      0.00041      0.00000      0.00000      0.00000     -0.99530      0.00000      0.00000      2.00470      0.00000     -0.99530 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000 \n     0.04663     -0.09654      0.00000      0.00000      0.00000     -0.06237      0.00000      0.00000      0.00000      0.00247      0.00000      0.00000      0.00000      0.00041      0.00000      0.00000      0.00000     -0.99532      0.00000      0.00000     -0.99530      0.00000      2.00471 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -367.65180    -44.90547    -39.69238    -39.69238    -39.69238     -5.07826     -3.40052     -3.40052     -3.40052     -0.51435     -0.51435     -0.51435     -0.51435     -0.51435     -0.31533     -0.10265     -0.10265     -0.10265      0.10155      0.16874      0.16874      0.16874      5.09797 \n   </alphaeps>\n   <betaeps>\n  -367.65120    -44.90498    -39.69174    -39.69174    -39.69174     -5.07730     -3.39944     -3.39944     -3.39944     -0.51280     -0.51280     -0.51280     -0.51280     -0.51280     -0.29274     -0.07932     -0.07932     -0.07932      0.11840      0.18485      0.18485      0.18485      5.11005 \n   </betaeps>\n   <alphavectors>\n     0.98381     -0.32744      0.00000     -0.00000     -0.00000     -0.12639     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.03045      0.00000      0.00000     -0.00000     -0.01966     -0.00000     -0.00000      0.00000      0.01885 \n     0.05494      1.01916     -0.00000      0.00000      0.00000      0.46601      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.10836     -0.00000     -0.00000      0.00000      0.10906     -0.00000      0.00000     -0.00000     -0.16672 \n    -0.00000     -0.00000      0.00000      0.98474     -0.00000     -0.00000      0.00000     -0.41177     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.06816      0.00000     -0.00000      0.00000      0.09323      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.98474      0.00000      0.00000     -0.00000     -0.41177     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.06816     -0.00000     -0.00000      0.00000      0.09323      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.98474      0.00000     -0.00000     -0.00000     -0.41177     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.06816      0.00000      0.00000     -0.00000      0.09323      0.00000     -0.00000 \n     0.03076     -0.11656      0.00000     -0.00000     -0.00000      0.99528      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.31643     -0.00000     -0.00000      0.00000      0.06193      0.00000      0.00000      0.00000      5.00125 \n    -0.00000     -0.00000      0.00000      0.04147      0.00000      0.00000     -0.00000      1.05557      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.21188     -0.00000      0.00000     -0.00000     -0.30125     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.04147     -0.00000     -0.00000      0.00000      1.05557      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.21188      0.00000      0.00000     -0.00000     -0.30125     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.04147     -0.00000      0.00000      0.00000      1.05557      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.21188     -0.00000     -0.00000      0.00000     -0.30125     -0.00000      0.00000 \n    -0.00104      0.00755     -0.00000      0.00000      0.00000     -0.02464     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.66718     -0.00000     -0.00000      0.00000      1.57703     -0.00000      0.00000     -0.00000     -1.54907 \n     0.00000      0.00000     -0.00000     -0.00838     -0.00000     -0.00000     -0.00000      0.04906     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.51783     -0.00000      0.00000      0.00000      1.27675     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00838     -0.00000     -0.00000      0.00000      0.04906      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.51783      0.00000      0.00000     -0.00000      1.27675     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00838      0.00000      0.00000      0.00000      0.04906     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.51783     -0.00000      0.00000     -0.00000      1.27675      0.00000     -0.00000 \n     0.00050     -0.00304      0.00000     -0.00000     -0.00000      0.00769      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.42023     -0.00000     -0.00000     -0.00000     -1.63290      0.00000      0.00000      0.00000      0.67138 \n    -0.00000     -0.00000      0.00000      0.00389      0.00000     -0.00000      0.00000     -0.01659     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.59724      0.00000     -0.00000     -0.00000     -1.19311      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00389      0.00000      0.00000     -0.00000     -0.01659     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.59724     -0.00000     -0.00000      0.00000     -1.19311      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00389     -0.00000     -0.00000     -0.00000     -0.01659      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.59724      0.00000     -0.00000      0.00000     -1.19311     -0.00000      0.00000 \n     0.00862     -0.03165      0.00000     -0.00000     -0.00000     -0.03561      0.00000      0.00000     -0.00000     -0.50000     -0.00000      0.00000      0.86603     -0.00000     -0.00112     -0.00000     -0.00000     -0.00000     -0.01645     -0.00000     -0.00000     -0.00000      2.45646 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00862     -0.03165      0.00000     -0.00000     -0.00000     -0.03561     -0.00000     -0.00000      0.00000      1.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00112      0.00000      0.00000      0.00000     -0.01645      0.00000      0.00000      0.00000      2.45646 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00862     -0.03165      0.00000     -0.00000     -0.00000     -0.03561      0.00000      0.00000     -0.00000     -0.50000     -0.00000      0.00000     -0.86603     -0.00000     -0.00112     -0.00000     -0.00000     -0.00000     -0.01645     -0.00000     -0.00000     -0.00000      2.45646 \n   </alphavectors>\n   <betavectors>\n     0.98381     -0.32744     -0.00000      0.00000      0.00000     -0.12639      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.03047      0.00000     -0.00000     -0.00000     -0.01952      0.00000      0.00000     -0.00000      0.01891 \n     0.05494      1.01916      0.00000     -0.00000     -0.00000      0.46604     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.10841     -0.00000      0.00000      0.00000      0.10849     -0.00000     -0.00000      0.00000     -0.16698 \n     0.00000      0.00000      0.00000      0.98474     -0.00000     -0.00000      0.00000     -0.41182      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.06664     -0.00000      0.00000     -0.00000      0.09410     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.98474     -0.00000     -0.00000     -0.00000     -0.41182     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.06664      0.00000      0.00000     -0.00000      0.09410      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.98474     -0.00000     -0.00000     -0.00000     -0.41182     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.06664     -0.00000      0.00000     -0.00000      0.09410     -0.00000 \n     0.03076     -0.11654     -0.00000      0.00000      0.00000      0.99537     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.32486      0.00000      0.00000      0.00000      0.06379      0.00000     -0.00000      0.00000      5.00067 \n    -0.00000      0.00000      0.00000      0.04147      0.00000      0.00000     -0.00000      1.05573     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.20709      0.00000     -0.00000      0.00000     -0.30402      0.00000     -0.00000 \n    -0.00000     -0.00000      0.04147      0.00000      0.00000      0.00000      1.05573      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.20709     -0.00000     -0.00000      0.00000     -0.30402     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.04147      0.00000      0.00000      0.00000      1.05573      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.20709      0.00000     -0.00000      0.00000     -0.30402      0.00000 \n    -0.00104      0.00755      0.00000     -0.00000     -0.00000     -0.02438     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.67069     -0.00000      0.00000      0.00000      1.57345     -0.00000     -0.00000      0.00000     -1.55120 \n     0.00000     -0.00000     -0.00000     -0.00838     -0.00000     -0.00000     -0.00000      0.04851      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.49908     -0.00000      0.00000      0.00000      1.28421      0.00000      0.00000 \n     0.00000      0.00000     -0.00838      0.00000      0.00000      0.00000      0.04851      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.49908      0.00000      0.00000      0.00000      1.28421      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00838      0.00000      0.00000      0.00000      0.04851     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.49908     -0.00000     -0.00000      0.00000      1.28421     -0.00000 \n     0.00050     -0.00304     -0.00000      0.00000      0.00000      0.00761     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.41502      0.00000      0.00000      0.00000     -1.63409      0.00000      0.00000     -0.00000      0.67173 \n    -0.00000      0.00000      0.00000      0.00389     -0.00000     -0.00000      0.00000     -0.01646     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.61466      0.00000     -0.00000      0.00000     -1.18424     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00389     -0.00000     -0.00000     -0.00000     -0.01646     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.61466      0.00000      0.00000     -0.00000     -1.18424      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00389     -0.00000     -0.00000     -0.00000     -0.01646      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.61466      0.00000     -0.00000     -0.00000     -1.18424     -0.00000 \n     0.00862     -0.03164     -0.00000      0.00000      0.00000     -0.03560      0.00000      0.00000     -0.00000     -0.50000      0.00000      0.00000      0.00000      0.86603      0.00294      0.00000      0.00000      0.00000     -0.01488     -0.00000      0.00000     -0.00000      2.45647 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00862     -0.03164     -0.00000      0.00000      0.00000     -0.03560     -0.00000      0.00000      0.00000      1.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00294      0.00000      0.00000      0.00000     -0.01488     -0.00000     -0.00000      0.00000      2.45647 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00862     -0.03164     -0.00000      0.00000      0.00000     -0.03560     -0.00000     -0.00000      0.00000     -0.50000      0.00000      0.00000     -0.00000     -0.86603      0.00294     -0.00000     -0.00000     -0.00000     -0.01488      0.00000     -0.00000     -0.00000      2.45647 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ge\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.18648     -0.69115      0.00000      0.00000      0.00000      0.14130      0.00000      0.00000      0.00000     -0.03470      0.00000      0.00000      0.00000     -0.03589      0.00000      0.00000      0.00000      0.04643      0.00000      0.00000      0.04643      0.00000      0.04643 \n    -0.69115      2.56121      0.00000      0.00000      0.00000     -0.80047      0.00000      0.00000      0.00000      0.12176      0.00000      0.00000      0.00000      0.13256      0.00000      0.00000      0.00000     -0.09123      0.00000      0.00000     -0.09123      0.00000     -0.09123 \n     0.00000      0.00000      2.28983      0.00000      0.00000      0.00000     -0.81045      0.00000      0.00000      0.00000     -0.03386      0.00000      0.00000      0.00000      0.05609      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.28983      0.00000      0.00000      0.00000     -0.81045      0.00000      0.00000      0.00000     -0.03386      0.00000      0.00000      0.00000      0.05609      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.28983      0.00000      0.00000      0.00000     -0.81045      0.00000      0.00000      0.00000     -0.03386      0.00000      0.00000      0.00000      0.05609      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.14130     -0.80047      0.00000      0.00000      0.00000      2.32147      0.00000      0.00000      0.00000     -0.32973      0.00000      0.00000      0.00000     -0.37321      0.00000      0.00000      0.00000      0.04804      0.00000      0.00000      0.04804      0.00000      0.04804 \n     0.00000      0.00000     -0.81045      0.00000      0.00000      0.00000      2.27385      0.00000      0.00000      0.00000      0.01470      0.00000      0.00000      0.00000     -0.13587      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.81045      0.00000      0.00000      0.00000      2.27385      0.00000      0.00000      0.00000      0.01470      0.00000      0.00000      0.00000     -0.13587      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.81045      0.00000      0.00000      0.00000      2.27385      0.00000      0.00000      0.00000      0.01470      0.00000      0.00000      0.00000     -0.13587      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03470      0.12176      0.00000      0.00000      0.00000     -0.32973      0.00000      0.00000      0.00000      0.68459      0.00000      0.00000      0.00000      0.59054      0.00000      0.00000      0.00000     -0.00037      0.00000      0.00000     -0.00037      0.00000     -0.00037 \n     0.00000      0.00000     -0.03386      0.00000      0.00000      0.00000      0.01470      0.00000      0.00000      0.00000      0.18615      0.00000      0.00000      0.00000      0.20495      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.03386      0.00000      0.00000      0.00000      0.01470      0.00000      0.00000      0.00000      0.18615      0.00000      0.00000      0.00000      0.20495      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.03386      0.00000      0.00000      0.00000      0.01470      0.00000      0.00000      0.00000      0.18615      0.00000      0.00000      0.00000      0.20495      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03589      0.13256      0.00000      0.00000      0.00000     -0.37321      0.00000      0.00000      0.00000      0.59054      0.00000      0.00000      0.00000      0.51307      0.00000      0.00000      0.00000     -0.00220      0.00000      0.00000     -0.00220      0.00000     -0.00220 \n     0.00000      0.00000      0.05609      0.00000      0.00000      0.00000     -0.13587      0.00000      0.00000      0.00000      0.20495      0.00000      0.00000      0.00000      0.23660      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05609      0.00000      0.00000      0.00000     -0.13587      0.00000      0.00000      0.00000      0.20495      0.00000      0.00000      0.00000      0.23660      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05609      0.00000      0.00000      0.00000     -0.13587      0.00000      0.00000      0.00000      0.20495      0.00000      0.00000      0.00000      0.23660      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.04643     -0.09123      0.00000      0.00000      0.00000      0.04804      0.00000      0.00000      0.00000     -0.00037      0.00000      0.00000      0.00000     -0.00220      0.00000      0.00000      0.00000      2.00380      0.00000      0.00000     -0.99621      0.00000     -0.99623 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000 \n     0.04643     -0.09123      0.00000      0.00000      0.00000      0.04804      0.00000      0.00000      0.00000     -0.00037      0.00000      0.00000      0.00000     -0.00220      0.00000      0.00000      0.00000     -0.99621      0.00000      0.00000      2.00379      0.00000     -0.99621 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000 \n     0.04643     -0.09123      0.00000      0.00000      0.00000      0.04804      0.00000      0.00000      0.00000     -0.00037      0.00000      0.00000      0.00000     -0.00220      0.00000      0.00000      0.00000     -0.99623      0.00000      0.00000     -0.99621      0.00000      2.00380 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66667      0.66667      0.66667      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -393.64390    -48.77422    -43.32514    -43.32514    -43.32514     -5.82804     -4.03773     -4.03773     -4.03773     -0.92319     -0.92319     -0.92319     -0.92319     -0.92319     -0.42396     -0.15563     -0.15563     -0.15563      0.18528      0.25525      0.25525      0.25525      7.74669 \n   </alphaeps>\n   <betaeps>\n  -393.64180    -48.77265    -43.32308    -43.32308    -43.32308     -5.82499     -4.03427     -4.03427     -4.03427     -0.91876     -0.91876     -0.91876     -0.91876     -0.91876     -0.37489     -0.10697     -0.10697     -0.10697      0.21926      0.28827      0.28827      0.28827      7.77595 \n   </betaeps>\n   <alphavectors>\n     0.98372     -0.32859     -0.00000      0.00000     -0.00000      0.12804     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.03424     -0.00000     -0.00000      0.00000     -0.02228     -0.00000      0.00000      0.00000     -0.04563 \n     0.05503      1.02007      0.00000     -0.00000      0.00000     -0.47070      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.12468      0.00000      0.00000     -0.00000      0.14936      0.00000     -0.00000     -0.00000      0.33530 \n     0.00000     -0.00000     -0.00000      0.00000      0.98408     -0.00000      0.00000     -0.00000     -0.41719      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.08486      0.00000     -0.00000      0.11308      0.00000     -0.00000 \n    -0.00000     -0.00000      0.98408      0.00000     -0.00000     -0.00000     -0.41719      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.08486      0.00000      0.00000      0.00000      0.11308      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.98408      0.00000      0.00000     -0.00000     -0.41719     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.08486     -0.00000      0.00000      0.00000      0.00000      0.11308      0.00000 \n    -0.03231      0.11895      0.00000     -0.00000      0.00000      1.01280     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.33855      0.00000     -0.00000      0.00000      0.02877      0.00000     -0.00000      0.00000      6.27863 \n    -0.00000     -0.00000     -0.00000      0.00000      0.04291      0.00000     -0.00000      0.00000      1.05429     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.26315     -0.00000      0.00000     -0.36734     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.04291     -0.00000      0.00000      0.00000      1.05429     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.26315     -0.00000     -0.00000     -0.00000     -0.36734     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.04291     -0.00000     -0.00000      0.00000      1.05429      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.26315      0.00000     -0.00000     -0.00000     -0.00000     -0.36734      0.00000 \n    -0.00031      0.00516      0.00000     -0.00000      0.00000      0.03627      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.58537      0.00000      0.00000     -0.00000      1.71658      0.00000     -0.00000     -0.00000      1.82969 \n     0.00000      0.00000      0.00000     -0.00000     -0.01067      0.00000     -0.00000      0.00000      0.05136      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.52073      0.00000     -0.00000      1.35579      0.00000     -0.00000 \n     0.00000      0.00000     -0.01067      0.00000     -0.00000     -0.00000      0.05136     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.52073      0.00000      0.00000     -0.00000      1.35579      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.01067     -0.00000     -0.00000      0.00000      0.05136     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.52073     -0.00000      0.00000      0.00000      0.00000      1.35579     -0.00000 \n     0.00018     -0.00186     -0.00000      0.00000     -0.00000     -0.01128     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.50613     -0.00000      0.00000     -0.00000     -1.72537     -0.00000      0.00000      0.00000     -0.80757 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00498     -0.00000      0.00000     -0.00000     -0.01529      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.59509     -0.00000      0.00000     -1.25001      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00498     -0.00000      0.00000      0.00000     -0.01529      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.59509      0.00000      0.00000     -0.00000     -1.25001     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00498      0.00000      0.00000     -0.00000     -0.01529      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.59509      0.00000     -0.00000     -0.00000     -0.00000     -1.25001      0.00000 \n     0.00916     -0.03244     -0.00000      0.00000     -0.00000      0.02727     -0.00000      0.00000     -0.00000     -0.50000     -0.00000      0.00000      0.00000      0.86603     -0.00529     -0.00000      0.00000      0.00000     -0.03409      0.00000      0.00000      0.00000     -3.05355 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00916     -0.03244     -0.00000      0.00000     -0.00000      0.02727      0.00000      0.00000     -0.00000      1.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00529      0.00000     -0.00000     -0.00000     -0.03409     -0.00000     -0.00000     -0.00000     -3.05355 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00916     -0.03244     -0.00000      0.00000     -0.00000      0.02727      0.00000     -0.00000     -0.00000     -0.50000     -0.00000      0.00000      0.00000     -0.86603     -0.00529     -0.00000      0.00000      0.00000     -0.03409      0.00000      0.00000      0.00000     -3.05355 \n   </alphavectors>\n   <betavectors>\n     0.98372     -0.32859      0.00000      0.00000      0.00000      0.12806      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.03409      0.00000     -0.00000      0.00000     -0.02218      0.00000      0.00000      0.00000     -0.04573 \n     0.05503      1.02007     -0.00000     -0.00000     -0.00000     -0.47079     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.12378     -0.00000      0.00000     -0.00000      0.14886     -0.00000     -0.00000     -0.00000      0.33573 \n    -0.00000      0.00000      0.00000      0.00000      0.98408     -0.00000      0.00000     -0.41732      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.08181      0.00000      0.00000     -0.00000      0.11479      0.00000     -0.00000 \n    -0.00000      0.00000      0.98408      0.00000     -0.00000     -0.00000     -0.41732     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.08181      0.00000      0.00000      0.00000      0.11479      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.98408     -0.00000     -0.00000      0.00000      0.00000     -0.41732     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.08181      0.00000      0.00000      0.00000      0.11479      0.00000 \n    -0.03232      0.11889      0.00000     -0.00000     -0.00000      1.01301      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.35288      0.00000     -0.00000     -0.00000      0.02436     -0.00000     -0.00000     -0.00000      6.27783 \n    -0.00000      0.00000      0.00000      0.00000      0.04290      0.00000     -0.00000      1.05474     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.25352     -0.00000     -0.00000      0.00000     -0.37281      0.00000      0.00000 \n     0.00000      0.00000      0.04290      0.00000     -0.00000     -0.00000      1.05474      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.25352     -0.00000     -0.00000      0.00000     -0.37281     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.04290      0.00000      0.00000     -0.00000     -0.00000      1.05474      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.25352     -0.00000     -0.00000     -0.00000     -0.37281      0.00000 \n    -0.00031      0.00515      0.00000     -0.00000     -0.00000      0.03555     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.58249     -0.00000      0.00000     -0.00000      1.71465     -0.00000     -0.00000     -0.00000      1.83243 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.01066      0.00000     -0.00000      0.05008      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.48836      0.00000      0.00000     -0.00000      1.36784     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.01066     -0.00000      0.00000      0.00000      0.05008      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.48836      0.00000      0.00000      0.00000      1.36784      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.01066      0.00000     -0.00000     -0.00000     -0.00000      0.05008     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.48836      0.00000      0.00000      0.00000      1.36784     -0.00000 \n     0.00018     -0.00186     -0.00000      0.00000      0.00000     -0.01107      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.50660      0.00000      0.00000     -0.00000     -1.72516      0.00000      0.00000      0.00000     -0.80773 \n    -0.00000      0.00000      0.00000      0.00000      0.00498     -0.00000      0.00000     -0.01496      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.62466     -0.00000     -0.00000      0.00000     -1.23550      0.00000      0.00000 \n     0.00000      0.00000      0.00498      0.00000     -0.00000     -0.00000     -0.01496     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.62466      0.00000      0.00000      0.00000     -1.23550     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00498     -0.00000      0.00000      0.00000      0.00000     -0.01496     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.62466     -0.00000     -0.00000     -0.00000     -1.23550      0.00000 \n     0.00916     -0.03241     -0.00000      0.00000      0.00000      0.02725     -0.00000     -0.00000     -0.00000     -0.50000      0.00000     -0.00000     -0.00000      0.86603      0.00191     -0.00000      0.00000     -0.00000     -0.03166     -0.00000      0.00000     -0.00000     -3.05358 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00916     -0.03241     -0.00000      0.00000      0.00000      0.02725     -0.00000     -0.00000     -0.00000      1.00000     -0.00000      0.00000     -0.00000      0.00000      0.00191      0.00000     -0.00000      0.00000     -0.03166      0.00000      0.00000      0.00000     -3.05358 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00916     -0.03241     -0.00000      0.00000      0.00000      0.02725      0.00000     -0.00000      0.00000     -0.50000      0.00000     -0.00000      0.00000     -0.86603      0.00191     -0.00000     -0.00000     -0.00000     -0.03166     -0.00000     -0.00000      0.00000     -3.05358 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"As\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.18853     -0.69701      0.00000      0.00000      0.00000      0.15246      0.00000      0.00000      0.00000     -0.02706      0.00000      0.00000      0.00000     -0.04653      0.00000      0.00000      0.00000      0.04377      0.00000      0.00000      0.04377      0.00000      0.04377 \n    -0.69701      2.57652      0.00000      0.00000      0.00000     -0.84063      0.00000      0.00000      0.00000      0.10736      0.00000      0.00000      0.00000      0.16863      0.00000      0.00000      0.00000     -0.08264      0.00000      0.00000     -0.08264      0.00000     -0.08264 \n     0.00000      0.00000      2.30508      0.00000      0.00000      0.00000     -0.84018      0.00000      0.00000      0.00000     -0.01550      0.00000      0.00000      0.00000      0.08163      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.30508      0.00000      0.00000      0.00000     -0.84018      0.00000      0.00000      0.00000     -0.01550      0.00000      0.00000      0.00000      0.08163      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.30508      0.00000      0.00000      0.00000     -0.84018      0.00000      0.00000      0.00000     -0.01550      0.00000      0.00000      0.00000      0.08163      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.15246     -0.84063      0.00000      0.00000      0.00000      2.45559      0.00000      0.00000      0.00000     -0.29935      0.00000      0.00000      0.00000     -0.44855      0.00000      0.00000      0.00000      0.02683      0.00000      0.00000      0.02683      0.00000      0.02683 \n     0.00000      0.00000     -0.84018      0.00000      0.00000      0.00000      2.32460      0.00000      0.00000      0.00000     -0.05432      0.00000      0.00000      0.00000     -0.20964      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.84018      0.00000      0.00000      0.00000      2.32460      0.00000      0.00000      0.00000     -0.05432      0.00000      0.00000      0.00000     -0.20964      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.84018      0.00000      0.00000      0.00000      2.32460      0.00000      0.00000      0.00000     -0.05432      0.00000      0.00000      0.00000     -0.20964      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02706      0.10736      0.00000      0.00000      0.00000     -0.29935      0.00000      0.00000      0.00000      0.54975      0.00000      0.00000      0.00000      0.59628      0.00000      0.00000      0.00000     -0.00061      0.00000      0.00000     -0.00061      0.00000     -0.00061 \n     0.00000      0.00000     -0.01550      0.00000      0.00000      0.00000     -0.05432      0.00000      0.00000      0.00000      0.27487      0.00000      0.00000      0.00000      0.31078      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01550      0.00000      0.00000      0.00000     -0.05432      0.00000      0.00000      0.00000      0.27487      0.00000      0.00000      0.00000      0.31078      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01550      0.00000      0.00000      0.00000     -0.05432      0.00000      0.00000      0.00000      0.27487      0.00000      0.00000      0.00000      0.31078      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04653      0.16863      0.00000      0.00000      0.00000     -0.44855      0.00000      0.00000      0.00000      0.59628      0.00000      0.00000      0.00000      0.65360      0.00000      0.00000      0.00000     -0.00243      0.00000      0.00000     -0.00243      0.00000     -0.00243 \n     0.00000      0.00000      0.08163      0.00000      0.00000      0.00000     -0.20964      0.00000      0.00000      0.00000      0.31078      0.00000      0.00000      0.00000      0.36190      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.08163      0.00000      0.00000      0.00000     -0.20964      0.00000      0.00000      0.00000      0.31078      0.00000      0.00000      0.00000      0.36190      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.08163      0.00000      0.00000      0.00000     -0.20964      0.00000      0.00000      0.00000      0.31078      0.00000      0.00000      0.00000      0.36190      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.04377     -0.08264      0.00000      0.00000      0.00000      0.02683      0.00000      0.00000      0.00000     -0.00061      0.00000      0.00000      0.00000     -0.00243      0.00000      0.00000      0.00000      2.00295      0.00000      0.00000     -0.99707      0.00000     -0.99707 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000 \n     0.04377     -0.08264      0.00000      0.00000      0.00000      0.02683      0.00000      0.00000      0.00000     -0.00061      0.00000      0.00000      0.00000     -0.00243      0.00000      0.00000      0.00000     -0.99707      0.00000      0.00000      2.00295      0.00000     -0.99706 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000 \n     0.04377     -0.08264      0.00000      0.00000      0.00000      0.02683      0.00000      0.00000      0.00000     -0.00061      0.00000      0.00000      0.00000     -0.00243      0.00000      0.00000      0.00000     -0.99707      0.00000      0.00000     -0.99706      0.00000      2.00293 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -420.12300    -52.74066    -47.01039    -47.01039    -47.01039     -6.60375     -4.69130     -4.69130     -4.69130     -1.36370     -1.36370     -1.36370     -1.36370     -1.36370     -0.52823     -0.20622     -0.20622     -0.20622      0.28668      0.35495      0.35495      0.35495     11.59613 \n   </alphaeps>\n   <betaeps>\n  -420.11850    -52.73738    -47.00596    -47.00596    -47.00596     -6.59750     -4.68423     -4.68423     -4.68423     -1.35535     -1.35535     -1.35535     -1.35535     -1.35535     -0.45116     -0.13097     -0.13097     -0.13097      0.33914      0.40590      0.40590      0.40590     11.64470 \n   </betaeps>\n   <alphavectors>\n     0.98357     -0.32964      0.00000      0.00000      0.00000      0.12962      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.03743     -0.00000     -0.00000      0.00000     -0.02408     -0.00000      0.00000      0.00000     -0.07781 \n     0.05539      1.02021     -0.00000     -0.00000     -0.00000     -0.47470     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.13865      0.00000      0.00000     -0.00000      0.19054      0.00000     -0.00000     -0.00000      0.54060 \n    -0.00000      0.00000      0.98357      0.00000      0.00000     -0.00000     -0.00000     -0.42441      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.09888     -0.00000     -0.00000     -0.00000      0.13044      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.98357      0.00000      0.00000     -0.42441      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09888     -0.00000      0.00000      0.00000     -0.00000      0.13044     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.98357      0.00000      0.00000      0.00000     -0.42441      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.09888      0.00000      0.00000      0.13044      0.00000      0.00000 \n    -0.03222      0.12220     -0.00000     -0.00000     -0.00000      1.03651      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.36113     -0.00000     -0.00000      0.00000      0.12807      0.00000     -0.00000     -0.00000      7.75567 \n    -0.00000      0.00000      0.04377     -0.00000     -0.00000      0.00000      0.00000      1.05502     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.30484     -0.00000      0.00000      0.00000     -0.42420      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.04377     -0.00000     -0.00000      1.05502     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.30484      0.00000     -0.00000     -0.00000      0.00000     -0.42420     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.04377     -0.00000     -0.00000      0.00000      1.05502      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.30484     -0.00000     -0.00000     -0.42420      0.00000     -0.00000 \n     0.00104      0.00163     -0.00000     -0.00000     -0.00000      0.04265      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.52662      0.00000      0.00000     -0.00000      1.79858      0.00000     -0.00000     -0.00000      2.03074 \n     0.00000     -0.00000     -0.01250     -0.00000     -0.00000      0.00000      0.00000      0.05080      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.51923      0.00000     -0.00000     -0.00000      1.41803     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.01250      0.00000     -0.00000      0.05080      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.51923     -0.00000      0.00000      0.00000     -0.00000      1.41803     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.01250     -0.00000     -0.00000      0.00000      0.05080     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.51923      0.00000      0.00000      1.41803     -0.00000     -0.00000 \n    -0.00044     -0.00012      0.00000      0.00000      0.00000     -0.01241     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.56884      0.00000      0.00000     -0.00000     -1.78844     -0.00000      0.00000      0.00000     -0.90865 \n    -0.00000      0.00000      0.00578      0.00000      0.00000     -0.00000     -0.00000     -0.01299     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.60126     -0.00000      0.00000      0.00000     -1.28338      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00578     -0.00000      0.00000     -0.01299     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.60126      0.00000     -0.00000     -0.00000      0.00000     -1.28338      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00578      0.00000      0.00000     -0.00000     -0.01299      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.60126     -0.00000     -0.00000     -1.28338      0.00000     -0.00000 \n     0.00892     -0.03308      0.00000      0.00000      0.00000      0.01653      0.00000     -0.00000      0.00000     -0.52465      0.85132     -0.00000     -0.00000     -0.00000     -0.00634     -0.00000     -0.00000      0.00000     -0.04854     -0.00000      0.00000      0.00000     -3.73083 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00892     -0.03308      0.00000      0.00000      0.00000      0.01653      0.00000     -0.00000      0.00000      0.99959      0.02870     -0.00000     -0.00000     -0.00000     -0.00634     -0.00000     -0.00000      0.00000     -0.04854     -0.00000      0.00000      0.00000     -3.73083 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00892     -0.03308      0.00000      0.00000      0.00000      0.01653      0.00000     -0.00000      0.00000     -0.47493     -0.88002     -0.00000     -0.00000     -0.00000     -0.00634     -0.00000     -0.00000      0.00000     -0.04854     -0.00000      0.00000      0.00000     -3.73083 \n   </alphavectors>\n   <betavectors>\n     0.98357     -0.32964     -0.00000     -0.00000      0.00000      0.12965      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.03708      0.00000      0.00000     -0.00000     -0.02403     -0.00000     -0.00000      0.00000     -0.07792 \n     0.05538      1.02021      0.00000      0.00000     -0.00000     -0.47487     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.13660     -0.00000     -0.00000      0.00000      0.19016      0.00000      0.00000     -0.00000      0.54110 \n     0.00000      0.00000      0.00000      0.00000      0.98358      0.00000      0.00000     -0.42466      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.09469     -0.00000     -0.00000      0.00000      0.13269     -0.00000     -0.00000 \n     0.00000     -0.00000      0.98358     -0.00000      0.00000      0.00000     -0.42466      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.09469      0.00000     -0.00000      0.00000      0.13269      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.98358     -0.00000     -0.00000     -0.00000     -0.00000     -0.42466     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.09469     -0.00000      0.00000     -0.00000      0.13269     -0.00000 \n    -0.03222      0.12208      0.00000      0.00000     -0.00000      1.03687      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.37922      0.00000      0.00000     -0.00000      0.12215     -0.00000      0.00000      0.00000      7.75485 \n     0.00000      0.00000      0.00000      0.00000      0.04376     -0.00000     -0.00000      1.05583     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.29165      0.00000      0.00000     -0.00000     -0.43142     -0.00000      0.00000 \n     0.00000     -0.00000      0.04376      0.00000     -0.00000     -0.00000      1.05583     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.29165     -0.00000      0.00000     -0.00000     -0.43142      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.04376      0.00000      0.00000      0.00000      0.00000      1.05583     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.29165      0.00000     -0.00000      0.00000     -0.43142     -0.00000 \n     0.00104      0.00161      0.00000      0.00000     -0.00000      0.04141      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.51854     -0.00000     -0.00000      0.00000      1.79803     -0.00000      0.00000      0.00000      2.03333 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.01249     -0.00000     -0.00000      0.04874      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.47973     -0.00000     -0.00000      0.00000      1.43195      0.00000      0.00000 \n    -0.00000      0.00000     -0.01249     -0.00000      0.00000     -0.00000      0.04874      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.47973      0.00000     -0.00000      0.00000      1.43195     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01249     -0.00000      0.00000      0.00000      0.00000      0.04874      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.47973     -0.00000      0.00000     -0.00000      1.43195      0.00000 \n    -0.00043     -0.00012     -0.00000     -0.00000      0.00000     -0.01206     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.57421     -0.00000     -0.00000      0.00000     -1.78676      0.00000     -0.00000     -0.00000     -0.90859 \n     0.00000      0.00000      0.00000      0.00000      0.00578     -0.00000     -0.00000     -0.01246      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.63663      0.00000      0.00000     -0.00000     -1.26621     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00578     -0.00000      0.00000      0.00000     -0.01246      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.63663     -0.00000      0.00000     -0.00000     -1.26621      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00578     -0.00000     -0.00000     -0.00000     -0.00000     -0.01246     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.63663      0.00000     -0.00000      0.00000     -1.26621     -0.00000 \n     0.00893     -0.03303     -0.00000     -0.00000      0.00000      0.01650      0.00000      0.00000     -0.00000     -0.53392      0.84554     -0.00000      0.00000     -0.00000      0.00276     -0.00000     -0.00000      0.00000     -0.04578      0.00000     -0.00000     -0.00000     -3.73087 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00893     -0.03303     -0.00000     -0.00000      0.00000      0.01650      0.00000      0.00000     -0.00000      0.99922      0.03962     -0.00000      0.00000     -0.00000      0.00276     -0.00000     -0.00000      0.00000     -0.04578      0.00000     -0.00000     -0.00000     -3.73087 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00893     -0.03303     -0.00000     -0.00000      0.00000      0.01650      0.00000      0.00000     -0.00000     -0.46530     -0.88515     -0.00000      0.00000     -0.00000      0.00276     -0.00000     -0.00000      0.00000     -0.04578      0.00000     -0.00000     -0.00000     -3.73087 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Se\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.19037     -0.70194      0.00000      0.00000      0.00000      0.17908      0.00000      0.00000      0.00000     -0.02069      0.00000      0.00000      0.00000     -0.05452      0.00000      0.00000      0.00000      0.03441      0.00000      0.00000      0.03441      0.00000      0.03441 \n    -0.70194      2.59039      0.00000      0.00000      0.00000     -0.91162      0.00000      0.00000      0.00000      0.10043      0.00000      0.00000      0.00000      0.19168      0.00000      0.00000      0.00000     -0.06156      0.00000      0.00000     -0.06156      0.00000     -0.06156 \n     0.00000      0.00000      2.31570      0.00000      0.00000      0.00000     -0.86557      0.00000      0.00000      0.00000      0.01077      0.00000      0.00000      0.00000      0.10705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.31570      0.00000      0.00000      0.00000     -0.86557      0.00000      0.00000      0.00000      0.01077      0.00000      0.00000      0.00000      0.10705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.31570      0.00000      0.00000      0.00000     -0.86557      0.00000      0.00000      0.00000      0.01077      0.00000      0.00000      0.00000      0.10705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.17908     -0.91162      0.00000      0.00000      0.00000      2.58812      0.00000      0.00000      0.00000     -0.30441      0.00000      0.00000      0.00000     -0.49351      0.00000      0.00000      0.00000      0.00717      0.00000      0.00000      0.00717      0.00000      0.00717 \n     0.00000      0.00000     -0.86557      0.00000      0.00000      0.00000      2.38748      0.00000      0.00000      0.00000     -0.14429      0.00000      0.00000      0.00000     -0.28776      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.86557      0.00000      0.00000      0.00000      2.38748      0.00000      0.00000      0.00000     -0.14429      0.00000      0.00000      0.00000     -0.28776      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.86557      0.00000      0.00000      0.00000      2.38748      0.00000      0.00000      0.00000     -0.14429      0.00000      0.00000      0.00000     -0.28776      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02069      0.10043      0.00000      0.00000      0.00000     -0.30441      0.00000      0.00000      0.00000      0.52808      0.00000      0.00000      0.00000      0.60198      0.00000      0.00000      0.00000     -0.00087      0.00000      0.00000     -0.00087      0.00000     -0.00087 \n     0.00000      0.00000      0.01077      0.00000      0.00000      0.00000     -0.14429      0.00000      0.00000      0.00000      0.38416      0.00000      0.00000      0.00000      0.42425      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.01077      0.00000      0.00000      0.00000     -0.14429      0.00000      0.00000      0.00000      0.38416      0.00000      0.00000      0.00000      0.42425      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.01077      0.00000      0.00000      0.00000     -0.14429      0.00000      0.00000      0.00000      0.38416      0.00000      0.00000      0.00000      0.42425      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05452      0.19168      0.00000      0.00000      0.00000     -0.49351      0.00000      0.00000      0.00000      0.60198      0.00000      0.00000      0.00000      0.69559      0.00000      0.00000      0.00000     -0.00214      0.00000      0.00000     -0.00214      0.00000     -0.00214 \n     0.00000      0.00000      0.10705      0.00000      0.00000      0.00000     -0.28776      0.00000      0.00000      0.00000      0.42425      0.00000      0.00000      0.00000      0.47725      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.10705      0.00000      0.00000      0.00000     -0.28776      0.00000      0.00000      0.00000      0.42425      0.00000      0.00000      0.00000      0.47725      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.10705      0.00000      0.00000      0.00000     -0.28776      0.00000      0.00000      0.00000      0.42425      0.00000      0.00000      0.00000      0.47725      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03441     -0.06156      0.00000      0.00000      0.00000      0.00717      0.00000      0.00000      0.00000     -0.00087      0.00000      0.00000      0.00000     -0.00214      0.00000      0.00000      0.00000      2.00172      0.00000      0.00000     -0.99828      0.00000     -0.99828 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000 \n     0.03441     -0.06156      0.00000      0.00000      0.00000      0.00717      0.00000      0.00000      0.00000     -0.00087      0.00000      0.00000      0.00000     -0.00214      0.00000      0.00000      0.00000     -0.99828      0.00000      0.00000      2.00173      0.00000     -0.99830 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000 \n     0.03441     -0.06156      0.00000      0.00000      0.00000      0.00717      0.00000      0.00000      0.00000     -0.00087      0.00000      0.00000      0.00000     -0.00214      0.00000      0.00000      0.00000     -0.99828      0.00000      0.00000     -0.99830      0.00000      2.00173 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -448.34100    -57.02332    -51.08653    -51.08653    -51.08653     -7.44336     -5.41981     -5.41981     -5.41981     -1.84614     -1.84614     -1.84614     -1.84614     -1.84614     -0.61994     -0.24650     -0.24650     -0.24650      0.37494      0.44103      0.44103      0.44103     16.29911 \n   </alphaeps>\n   <betaeps>\n  -448.33730    -57.02049    -51.08283    -51.08283    -51.08283     -7.43809     -5.41387     -5.41387     -5.41387     -1.83946     -1.83946     -1.83946     -1.83946     -1.83946     -0.56832     -0.19686     -0.19686     -0.19686      0.40937      0.47451      0.47451      0.47451     16.33309 \n   </betaeps>\n   <alphavectors>\n     0.98347     -0.33055      0.00000     -0.00000      0.00000      0.13082      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.04006     -0.00000      0.00000     -0.00000     -0.02643      0.00000     -0.00000     -0.00000     -0.11317 \n     0.05577      1.02054     -0.00000      0.00000     -0.00000     -0.47804     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.14918      0.00000     -0.00000      0.00000      0.21563     -0.00000      0.00000      0.00000      0.74435 \n    -0.00000      0.00000      0.98266      0.00000     -0.00000      0.00000     -0.42925     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.10945     -0.00000     -0.00000     -0.00000      0.14088     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.98266      0.00000     -0.00000     -0.00000     -0.42925      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.10945     -0.00000      0.00000     -0.00000      0.14088      0.00000 \n     0.00000     -0.00000      0.00000      0.98266      0.00000     -0.00000      0.00000     -0.42925     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.10945     -0.00000     -0.00000      0.00000      0.14088     -0.00000      0.00000 \n    -0.02935      0.10936     -0.00000      0.00000     -0.00000      1.06051     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.39033      0.00000      0.00000     -0.00000      0.16022     -0.00000      0.00000      0.00000      9.09610 \n    -0.00000      0.00000      0.04600     -0.00000      0.00000     -0.00000      1.05613      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.33882      0.00000      0.00000      0.00000     -0.46258      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.04600     -0.00000      0.00000      0.00000      1.05613     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.33882      0.00000     -0.00000      0.00000     -0.46258     -0.00000 \n     0.00000     -0.00000      0.00000      0.04600     -0.00000      0.00000     -0.00000      1.05613      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.33882      0.00000      0.00000     -0.00000     -0.46258     -0.00000     -0.00000 \n     0.00290     -0.00306      0.00000     -0.00000      0.00000      0.04793     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.51535      0.00000     -0.00000      0.00000      1.80170     -0.00000      0.00000      0.00000      2.12152 \n     0.00000     -0.00000     -0.01394      0.00000     -0.00000      0.00000      0.04638      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.53917     -0.00000     -0.00000     -0.00000      1.42667     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.01394     -0.00000      0.00000      0.00000      0.04638      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.53917     -0.00000      0.00000     -0.00000      1.42667     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.01394     -0.00000     -0.00000     -0.00000      0.04638     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.53917     -0.00000     -0.00000      0.00000      1.42667     -0.00000      0.00000 \n    -0.00132      0.00211     -0.00000      0.00000     -0.00000     -0.01332      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.58651     -0.00000     -0.00000      0.00000     -1.78704      0.00000     -0.00000     -0.00000     -0.93504 \n    -0.00000      0.00000      0.00623      0.00000     -0.00000      0.00000     -0.00956     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.59297     -0.00000     -0.00000     -0.00000     -1.28026      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00623      0.00000     -0.00000     -0.00000     -0.00956     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.59297      0.00000     -0.00000      0.00000     -1.28026      0.00000 \n     0.00000     -0.00000      0.00000      0.00623      0.00000     -0.00000      0.00000     -0.00956     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.59297      0.00000      0.00000     -0.00000     -1.28026     -0.00000     -0.00000 \n     0.00738     -0.02761      0.00000     -0.00000      0.00000      0.00588     -0.00000      0.00000      0.00000      1.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00404     -0.00000      0.00000      0.00000     -0.05863      0.00000      0.00000     -0.00000     -4.36729 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00738     -0.02761      0.00000     -0.00000      0.00000      0.00588      0.00000      0.00000      0.00000     -0.50000      0.00000      0.00000     -0.00000      0.86603     -0.00404      0.00000      0.00000     -0.00000     -0.05863     -0.00000     -0.00000      0.00000     -4.36729 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00738     -0.02761      0.00000     -0.00000      0.00000      0.00588     -0.00000     -0.00000      0.00000     -0.50000      0.00000      0.00000      0.00000     -0.86603     -0.00404      0.00000     -0.00000     -0.00000     -0.05863     -0.00000     -0.00000      0.00000     -4.36729 \n   </alphavectors>\n   <betavectors>\n     0.98347     -0.33055      0.00000     -0.00000      0.00000      0.13084     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.03978      0.00000     -0.00000      0.00000     -0.02647      0.00000      0.00000     -0.00000     -0.11323 \n     0.05576      1.02054     -0.00000      0.00000     -0.00000     -0.47817      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.14747     -0.00000      0.00000     -0.00000      0.21569     -0.00000     -0.00000      0.00000      0.74459 \n     0.00000      0.00000      0.98267      0.00000     -0.00000      0.00000     -0.42942      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.10684      0.00000     -0.00000      0.00000      0.14232     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.98267      0.00000      0.00000     -0.00000     -0.42942     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.10684     -0.00000     -0.00000      0.00000      0.14232      0.00000 \n     0.00000     -0.00000      0.00000      0.98267     -0.00000      0.00000     -0.00000     -0.42942      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.10684      0.00000      0.00000      0.00000      0.14232     -0.00000      0.00000 \n    -0.02936      0.10926     -0.00000      0.00000     -0.00000      1.06085      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.40007     -0.00000     -0.00000      0.00000      0.15693     -0.00000     -0.00000      0.00000      9.09569 \n     0.00000      0.00000      0.04599     -0.00000      0.00000     -0.00000      1.05670     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.33055     -0.00000      0.00000     -0.00000     -0.46723      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.04599     -0.00000     -0.00000      0.00000      1.05670      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.33055      0.00000      0.00000     -0.00000     -0.46723     -0.00000 \n     0.00000     -0.00000      0.00000      0.04599      0.00000     -0.00000      0.00000      1.05670     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.33055     -0.00000     -0.00000     -0.00000     -0.46723      0.00000     -0.00000 \n     0.00290     -0.00306      0.00000     -0.00000      0.00000      0.04708      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.50788     -0.00000     -0.00000     -0.00000      1.80260     -0.00000     -0.00000      0.00000      2.12258 \n    -0.00000     -0.00000     -0.01393      0.00000     -0.00000     -0.00000      0.04503     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.51639      0.00000     -0.00000      0.00000      1.43511     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.01393     -0.00000     -0.00000      0.00000      0.04503     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.51639     -0.00000     -0.00000      0.00000      1.43511      0.00000 \n    -0.00000      0.00000     -0.00000     -0.01393     -0.00000      0.00000      0.00000      0.04503      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.51639      0.00000      0.00000      0.00000      1.43511     -0.00000      0.00000 \n    -0.00132      0.00211     -0.00000      0.00000     -0.00000     -0.01309     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.59265      0.00000     -0.00000     -0.00000     -1.78509      0.00000      0.00000     -0.00000     -0.93489 \n     0.00000      0.00000      0.00623     -0.00000      0.00000     -0.00000     -0.00923      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.61330      0.00000     -0.00000      0.00000     -1.27065      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00623      0.00000      0.00000     -0.00000     -0.00923     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.61330      0.00000      0.00000     -0.00000     -1.27065      0.00000 \n    -0.00000     -0.00000      0.00000      0.00623      0.00000     -0.00000     -0.00000     -0.00923     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.61330     -0.00000     -0.00000     -0.00000     -1.27065      0.00000     -0.00000 \n     0.00738     -0.02757      0.00000     -0.00000      0.00000      0.00582     -0.00000      0.00000      0.00000      1.00000      0.00000      0.00000     -0.00000     -0.00000      0.00088      0.00000      0.00000      0.00000     -0.05744      0.00000      0.00000     -0.00000     -4.36731 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00738     -0.02757      0.00000     -0.00000      0.00000      0.00582     -0.00000      0.00000      0.00000     -0.50000     -0.00000     -0.00000      0.00000      0.86603      0.00088     -0.00000     -0.00000     -0.00000     -0.05744     -0.00000     -0.00000      0.00000     -4.36731 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00738     -0.02757      0.00000     -0.00000      0.00000      0.00582      0.00000      0.00000      0.00000     -0.50000     -0.00000     -0.00000      0.00000     -0.86603      0.00088     -0.00000     -0.00000     -0.00000     -0.05744     -0.00000     -0.00000      0.00000     -4.36731 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Br\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.19155     -0.70461      0.00000      0.00000      0.00000      0.21248      0.00000      0.00000      0.00000     -0.01178      0.00000      0.00000      0.00000     -0.06371      0.00000      0.00000      0.00000      0.02133      0.00000      0.00000      0.02133      0.00000      0.02133 \n    -0.70461      2.59969      0.00000      0.00000      0.00000     -0.97943      0.00000      0.00000      0.00000      0.09085      0.00000      0.00000      0.00000      0.22058      0.00000      0.00000      0.00000     -0.04003      0.00000      0.00000     -0.04003      0.00000     -0.04003 \n     0.00000      0.00000      2.31665      0.00000      0.00000      0.00000     -0.87695      0.00000      0.00000      0.00000      0.02835      0.00000      0.00000      0.00000      0.14230      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.31665      0.00000      0.00000      0.00000     -0.87695      0.00000      0.00000      0.00000      0.02835      0.00000      0.00000      0.00000      0.14230      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.31665      0.00000      0.00000      0.00000     -0.87695      0.00000      0.00000      0.00000      0.02835      0.00000      0.00000      0.00000      0.14230      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.21248     -0.97943      0.00000      0.00000      0.00000      2.70376      0.00000      0.00000      0.00000     -0.28762      0.00000      0.00000      0.00000     -0.53499      0.00000      0.00000      0.00000     -0.01179      0.00000      0.00000     -0.01179      0.00000     -0.01179 \n     0.00000      0.00000     -0.87695      0.00000      0.00000      0.00000      2.44909      0.00000      0.00000      0.00000     -0.23224      0.00000      0.00000      0.00000     -0.38203      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.87695      0.00000      0.00000      0.00000      2.44909      0.00000      0.00000      0.00000     -0.23224      0.00000      0.00000      0.00000     -0.38202      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.87695      0.00000      0.00000      0.00000      2.44909      0.00000      0.00000      0.00000     -0.23224      0.00000      0.00000      0.00000     -0.38202      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01178      0.09085      0.00000      0.00000      0.00000     -0.28762      0.00000      0.00000      0.00000      0.47906      0.00000      0.00000      0.00000      0.60051      0.00000      0.00000      0.00000     -0.00163      0.00000      0.00000     -0.00163      0.00000     -0.00163 \n     0.00000      0.00000      0.02835      0.00000      0.00000      0.00000     -0.23224      0.00000      0.00000      0.00000      0.48837      0.00000      0.00000      0.00000      0.53780      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02835      0.00000      0.00000      0.00000     -0.23224      0.00000      0.00000      0.00000      0.48837      0.00000      0.00000      0.00000      0.53780      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02835      0.00000      0.00000      0.00000     -0.23224      0.00000      0.00000      0.00000      0.48837      0.00000      0.00000      0.00000      0.53780      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.06371      0.22058      0.00000      0.00000      0.00000     -0.53499      0.00000      0.00000      0.00000      0.60051      0.00000      0.00000      0.00000      0.76588      0.00000      0.00000      0.00000     -0.00212      0.00000      0.00000     -0.00212      0.00000     -0.00212 \n     0.00000      0.00000      0.14230      0.00000      0.00000      0.00000     -0.38203      0.00000      0.00000      0.00000      0.53780      0.00000      0.00000      0.00000      0.60128      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.14230      0.00000      0.00000      0.00000     -0.38202      0.00000      0.00000      0.00000      0.53780      0.00000      0.00000      0.00000      0.60128      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.14230      0.00000      0.00000      0.00000     -0.38202      0.00000      0.00000      0.00000      0.53780      0.00000      0.00000      0.00000      0.60128      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02133     -0.04003      0.00000      0.00000      0.00000     -0.01179      0.00000      0.00000      0.00000     -0.00163      0.00000      0.00000      0.00000     -0.00212      0.00000      0.00000      0.00000      2.00100      0.00000      0.00000     -0.99900      0.00000     -0.99900 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000 \n     0.02133     -0.04003      0.00000      0.00000      0.00000     -0.01179      0.00000      0.00000      0.00000     -0.00163      0.00000      0.00000      0.00000     -0.00212      0.00000      0.00000      0.00000     -0.99900      0.00000      0.00000      2.00101      0.00000     -0.99902 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000 \n     0.02133     -0.04003      0.00000      0.00000      0.00000     -0.01179      0.00000      0.00000      0.00000     -0.00163      0.00000      0.00000      0.00000     -0.00212      0.00000      0.00000      0.00000     -0.99900      0.00000      0.00000     -0.99902      0.00000      2.00101 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66667      0.66667      0.66667      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -476.87170    -61.32609    -55.06717    -55.06717    -55.06717     -8.30171     -6.15437     -6.15437     -6.15437     -2.35335     -2.35335     -2.35335     -2.35335     -2.35335     -0.70679     -0.28199     -0.28199     -0.28199      0.49365      0.55178      0.55178      0.55178     22.90655 \n   </alphaeps>\n   <betaeps>\n  -476.86930    -61.32433    -55.06487    -55.06487    -55.06487     -8.29854     -6.15081     -6.15081     -6.15081     -2.34952     -2.34952     -2.34952     -2.34952     -2.34952     -0.68085     -0.25722     -0.25722     -0.25722      0.51082      0.56841      0.56841      0.56841     22.92405 \n   </betaeps>\n   <alphavectors>\n     0.98324     -0.33129     -0.00000     -0.00000      0.00000      0.13218      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04233     -0.00000      0.00000     -0.00000     -0.02809     -0.00000      0.00000      0.00000     -0.15361 \n     0.05678      1.01955      0.00000      0.00000     -0.00000     -0.48099     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.16095      0.00000     -0.00000      0.00000      0.25495      0.00000     -0.00000     -0.00000      0.99907 \n     0.00000     -0.00000      0.97861      0.00000      0.00000      0.00000     -0.43470      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.11869     -0.00000     -0.00000      0.00000      0.15227      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.97861      0.00000     -0.00000      0.00000     -0.00000     -0.43470     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.11869      0.00000      0.00000      0.00000      0.15227      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.97861     -0.00000     -0.00000     -0.43470      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.11869      0.00000      0.00000     -0.00000      0.15227      0.00000      0.00000 \n    -0.02266      0.09671      0.00000      0.00000     -0.00000      1.08375     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.40701      0.00000      0.00000     -0.00000      0.24378      0.00000     -0.00000     -0.00000     10.66477 \n     0.00000     -0.00000      0.05680      0.00000      0.00000      0.00000      1.05362     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.36629      0.00000      0.00000     -0.00000     -0.50141     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.05680     -0.00000      0.00000     -0.00000      0.00000      1.05362      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.36629     -0.00000     -0.00000     -0.00000     -0.50141     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.05680      0.00000      0.00000      1.05362     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.36629     -0.00000     -0.00000      0.00000     -0.50141     -0.00000      0.00000 \n     0.00530     -0.00791      0.00000     -0.00000      0.00000      0.05196     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.48843      0.00000     -0.00000      0.00000      1.81741      0.00000     -0.00000     -0.00000      2.21267 \n    -0.00000      0.00000     -0.01921     -0.00000     -0.00000     -0.00000      0.04652     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.54243     -0.00000     -0.00000      0.00000      1.45730      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.01921     -0.00000      0.00000     -0.00000      0.00000      0.04652     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.54243      0.00000      0.00000      0.00000      1.45730      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.01921     -0.00000      0.00000      0.04652      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.54243      0.00000      0.00000     -0.00000      1.45730      0.00000     -0.00000 \n    -0.00247      0.00443     -0.00000      0.00000     -0.00000     -0.01384      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.61702      0.00000     -0.00000      0.00000     -1.80269     -0.00000      0.00000      0.00000     -0.97962 \n     0.00000     -0.00000      0.00848      0.00000      0.00000      0.00000     -0.00859      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.59702     -0.00000     -0.00000      0.00000     -1.28842     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00848      0.00000     -0.00000      0.00000     -0.00000     -0.00859     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.59702     -0.00000     -0.00000     -0.00000     -1.28842      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00848      0.00000     -0.00000     -0.00859     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.59702     -0.00000     -0.00000      0.00000     -1.28842     -0.00000      0.00000 \n     0.00407     -0.02152     -0.00000     -0.00000      0.00000     -0.00403     -0.00000      0.00000      0.00000      1.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00263     -0.00000     -0.00000      0.00000     -0.07088     -0.00000      0.00000     -0.00000     -5.08753 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00407     -0.02152     -0.00000     -0.00000      0.00000     -0.00403     -0.00000      0.00000      0.00000     -0.50000      0.00000     -0.00000      0.86603     -0.00000     -0.00263     -0.00000      0.00000     -0.00000     -0.07088     -0.00000     -0.00000      0.00000     -5.08753 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00407     -0.02152     -0.00000     -0.00000      0.00000     -0.00403      0.00000     -0.00000      0.00000     -0.50000      0.00000     -0.00000     -0.86603     -0.00000     -0.00263     -0.00000      0.00000     -0.00000     -0.07088     -0.00000     -0.00000      0.00000     -5.08753 \n   </alphavectors>\n   <betavectors>\n     0.98324     -0.33129     -0.00000     -0.00000      0.00000      0.13219      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.04219      0.00000     -0.00000     -0.00000     -0.02812     -0.00000      0.00000      0.00000     -0.15363 \n     0.05678      1.01955      0.00000      0.00000     -0.00000     -0.48106     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.16002     -0.00000      0.00000      0.00000      0.25505      0.00000     -0.00000     -0.00000      0.99916 \n     0.00000     -0.00000      0.97861      0.00000      0.00000      0.00000     -0.43479     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.11749      0.00000      0.00000      0.00000      0.15293      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.97861      0.00000     -0.00000      0.00000      0.00000     -0.43479     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.11749      0.00000      0.00000      0.00000      0.15293     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.97861     -0.00000      0.00000     -0.43479      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.11749     -0.00000      0.00000     -0.00000      0.15293     -0.00000      0.00000 \n    -0.02267      0.09665      0.00000      0.00000     -0.00000      1.08394     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.41102     -0.00000     -0.00000     -0.00000      0.24249      0.00000     -0.00000     -0.00000     10.66463 \n     0.00000     -0.00000      0.05679      0.00000      0.00000      0.00000      1.05392      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.36250     -0.00000     -0.00000     -0.00000     -0.50354     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.05679     -0.00000      0.00000     -0.00000     -0.00000      1.05392      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.36250     -0.00000     -0.00000     -0.00000     -0.50354      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.05679      0.00000     -0.00000      1.05392     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.36250      0.00000     -0.00000      0.00000     -0.50354      0.00000     -0.00000 \n     0.00530     -0.00792     -0.00000     -0.00000      0.00000      0.05154     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.48472     -0.00000      0.00000      0.00000      1.81803      0.00000     -0.00000     -0.00000      2.21299 \n    -0.00000      0.00000     -0.01920     -0.00000     -0.00000     -0.00000      0.04586      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.53264      0.00000      0.00000      0.00000      1.46093      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.01920     -0.00000      0.00000     -0.00000     -0.00000      0.04586      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.53264      0.00000      0.00000      0.00000      1.46093     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.01920     -0.00000     -0.00000      0.04586      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.53264     -0.00000      0.00000     -0.00000      1.46093      0.00000      0.00000 \n    -0.00246      0.00443      0.00000      0.00000     -0.00000     -0.01373      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.62027      0.00000      0.00000      0.00000     -1.80163     -0.00000      0.00000      0.00000     -0.97953 \n     0.00000     -0.00000      0.00848      0.00000      0.00000      0.00000     -0.00843     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.60567      0.00000      0.00000      0.00000     -1.28438     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00848      0.00000     -0.00000      0.00000      0.00000     -0.00843     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.60567     -0.00000     -0.00000     -0.00000     -1.28438      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00848      0.00000      0.00000     -0.00843     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.60567      0.00000     -0.00000      0.00000     -1.28438      0.00000     -0.00000 \n     0.00408     -0.02150      0.00000     -0.00000      0.00000     -0.00407     -0.00000      0.00000      0.00000      1.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00064      0.00000      0.00000      0.00000     -0.07050     -0.00000      0.00000     -0.00000     -5.08753 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00408     -0.02150     -0.00000     -0.00000      0.00000     -0.00407      0.00000      0.00000      0.00000     -0.50000     -0.00000     -0.00000      0.86603      0.00000     -0.00064      0.00000     -0.00000     -0.00000     -0.07050     -0.00000     -0.00000      0.00000     -5.08753 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00408     -0.02150     -0.00000     -0.00000      0.00000     -0.00407     -0.00000      0.00000      0.00000     -0.50000     -0.00000     -0.00000     -0.86603      0.00000     -0.00064      0.00000     -0.00000     -0.00000     -0.07050     -0.00000     -0.00000      0.00000     -5.08753 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Kr\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.19254     -0.70625      0.00000      0.00000      0.00000      0.25043      0.00000      0.00000      0.00000     -0.00442      0.00000      0.00000      0.00000     -0.07154      0.00000      0.00000      0.00000      0.00615      0.00000      0.00000      0.00615      0.00000      0.00615 \n    -0.70625      2.60742      0.00000      0.00000      0.00000     -1.03950      0.00000      0.00000      0.00000      0.08534      0.00000      0.00000      0.00000      0.24144      0.00000      0.00000      0.00000     -0.02175      0.00000      0.00000     -0.02175      0.00000     -0.02175 \n     0.00000      0.00000      2.34766      0.00000      0.00000      0.00000     -0.93902      0.00000      0.00000      0.00000      0.07068      0.00000      0.00000      0.00000      0.17081      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.34766      0.00000      0.00000      0.00000     -0.93902      0.00000      0.00000      0.00000      0.07068      0.00000      0.00000      0.00000      0.17081      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.34766      0.00000      0.00000      0.00000     -0.93902      0.00000      0.00000      0.00000      0.07068      0.00000      0.00000      0.00000      0.17081      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.25043     -1.03950      0.00000      0.00000      0.00000      2.81547      0.00000      0.00000      0.00000     -0.28842      0.00000      0.00000      0.00000     -0.57833      0.00000      0.00000      0.00000     -0.02910      0.00000      0.00000     -0.02910      0.00000     -0.02910 \n     0.00000      0.00000     -0.93902      0.00000      0.00000      0.00000      2.55873      0.00000      0.00000      0.00000     -0.34422      0.00000      0.00000      0.00000     -0.47984      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.93902      0.00000      0.00000      0.00000      2.55873      0.00000      0.00000      0.00000     -0.34422      0.00000      0.00000      0.00000     -0.47984      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.93902      0.00000      0.00000      0.00000      2.55873      0.00000      0.00000      0.00000     -0.34422      0.00000      0.00000      0.00000     -0.47984      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00442      0.08534      0.00000      0.00000      0.00000     -0.28842      0.00000      0.00000      0.00000      0.44246      0.00000      0.00000      0.00000      0.59927      0.00000      0.00000      0.00000     -0.00118      0.00000      0.00000     -0.00118      0.00000     -0.00118 \n     0.00000      0.00000      0.07068      0.00000      0.00000      0.00000     -0.34422      0.00000      0.00000      0.00000      0.60295      0.00000      0.00000      0.00000      0.65564      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.07068      0.00000      0.00000      0.00000     -0.34422      0.00000      0.00000      0.00000      0.60295      0.00000      0.00000      0.00000      0.65564      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.07068      0.00000      0.00000      0.00000     -0.34422      0.00000      0.00000      0.00000      0.60295      0.00000      0.00000      0.00000      0.65564      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.07154      0.24144      0.00000      0.00000      0.00000     -0.57833      0.00000      0.00000      0.00000      0.59927      0.00000      0.00000      0.00000      0.82697      0.00000      0.00000      0.00000     -0.00028      0.00000      0.00000     -0.00028      0.00000     -0.00028 \n     0.00000      0.00000      0.17081      0.00000      0.00000      0.00000     -0.47984      0.00000      0.00000      0.00000      0.65564      0.00000      0.00000      0.00000      0.71910      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.17081      0.00000      0.00000      0.00000     -0.47984      0.00000      0.00000      0.00000      0.65564      0.00000      0.00000      0.00000      0.71910      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.17081      0.00000      0.00000      0.00000     -0.47984      0.00000      0.00000      0.00000      0.65564      0.00000      0.00000      0.00000      0.71910      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00615     -0.02175      0.00000      0.00000      0.00000     -0.02910      0.00000      0.00000      0.00000     -0.00118      0.00000      0.00000      0.00000     -0.00028      0.00000      0.00000      0.00000      2.00083      0.00000      0.00000     -0.99918      0.00000     -0.99917 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000 \n     0.00615     -0.02175      0.00000      0.00000      0.00000     -0.02910      0.00000      0.00000      0.00000     -0.00118      0.00000      0.00000      0.00000     -0.00028      0.00000      0.00000      0.00000     -0.99918      0.00000      0.00000      2.00082      0.00000     -0.99918 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000 \n     0.00615     -0.02175      0.00000      0.00000      0.00000     -0.02910      0.00000      0.00000      0.00000     -0.00118      0.00000      0.00000      0.00000     -0.00028      0.00000      0.00000      0.00000     -0.99917      0.00000      0.00000     -0.99918      0.00000      2.00082 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -506.67520    -65.96515    -59.52617    -59.52617    -59.52617     -9.21927     -6.95164     -6.95164     -6.95164     -2.91551     -2.91551     -2.91551     -2.91551     -2.91551     -0.79116     -0.31563     -0.31563     -0.31563      0.62551      0.67271      0.67271      0.67271     31.36529 \n   </alphaeps>\n   <betaeps>\n  -506.67520    -65.96515    -59.52617    -59.52617    -59.52617     -9.21927     -6.95164     -6.95164     -6.95164     -2.91551     -2.91551     -2.91551     -2.91551     -2.91551     -0.79116     -0.31563     -0.31563     -0.31563      0.62551      0.67271      0.67271      0.67271     31.36529 \n   </betaeps>\n   <alphavectors>\n     0.98300     -0.33205     -0.00000     -0.00000      0.00000      0.13330      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.04420     -0.00000      0.00000      0.00000     -0.02954     -0.00000     -0.00000      0.00000     -0.19794 \n     0.05808      1.01872      0.00000      0.00000     -0.00000     -0.48378     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.16883      0.00000     -0.00000     -0.00000      0.28566      0.00000      0.00000     -0.00000      1.26284 \n     0.00000      0.00000      0.00000      0.00000      0.98119      0.00000     -0.44158      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.12690      0.00000     -0.00000      0.00000      0.16222      0.00000 \n    -0.00000     -0.00000      0.98119     -0.00000      0.00000     -0.00000     -0.00000     -0.44158     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.12690      0.00000      0.00000      0.16222      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.98119      0.00000     -0.00000     -0.00000      0.00000     -0.44158      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.12690      0.00000     -0.00000     -0.00000      0.00000      0.16222      0.00000      0.00000 \n    -0.01263      0.08535      0.00000      0.00000     -0.00000      1.10295      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.42871     -0.00000      0.00000      0.00000      0.29879     -0.00000      0.00000     -0.00000     12.24564 \n     0.00000      0.00000      0.00000      0.00000      0.04919     -0.00000      1.06006     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.39143     -0.00000      0.00000     -0.00000     -0.53659     -0.00000 \n    -0.00000     -0.00000      0.04919      0.00000     -0.00000      0.00000      0.00000      1.06006     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.39143      0.00000     -0.00000     -0.53659      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.04919     -0.00000      0.00000      0.00000     -0.00000      1.06006      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.39143     -0.00000     -0.00000      0.00000     -0.00000     -0.53659      0.00000      0.00000 \n     0.00789     -0.01138     -0.00000     -0.00000      0.00000      0.05185      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.46728      0.00000     -0.00000      0.00000      1.83739     -0.00000      0.00000     -0.00000      2.26738 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.01654     -0.00000      0.04051      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.54732      0.00000     -0.00000      0.00000      1.48802      0.00000 \n     0.00000      0.00000     -0.01654     -0.00000      0.00000      0.00000      0.00000      0.04051      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.54732     -0.00000      0.00000      1.48802     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01654      0.00000     -0.00000     -0.00000      0.00000      0.04051     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.54732      0.00000     -0.00000     -0.00000      0.00000      1.48802     -0.00000      0.00000 \n    -0.00369      0.00609      0.00000      0.00000     -0.00000     -0.01281     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.64286      0.00000     -0.00000      0.00000     -1.82246      0.00000     -0.00000      0.00000     -1.00882 \n     0.00000      0.00000      0.00000      0.00000      0.00713      0.00000     -0.00527     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.59956     -0.00000      0.00000     -0.00000     -1.29803     -0.00000 \n    -0.00000     -0.00000      0.00713      0.00000     -0.00000     -0.00000     -0.00000     -0.00527     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.59956      0.00000     -0.00000     -1.29803      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00713     -0.00000      0.00000      0.00000     -0.00000     -0.00527      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.59956     -0.00000      0.00000      0.00000     -0.00000     -1.29803      0.00000     -0.00000 \n    -0.00076     -0.01631     -0.00000     -0.00000      0.00000     -0.01206     -0.00000      0.00000      0.00000      0.98564     -0.16886      0.00000      0.00000      0.00000     -0.00031     -0.00000      0.00000     -0.00000     -0.07888      0.00000     -0.00000      0.00000     -5.82533 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00076     -0.01631     -0.00000     -0.00000      0.00000     -0.01206     -0.00000      0.00000      0.00000     -0.63906     -0.76916      0.00000      0.00000      0.00000     -0.00031     -0.00000      0.00000     -0.00000     -0.07888      0.00000     -0.00000      0.00000     -5.82533 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00076     -0.01631     -0.00000     -0.00000      0.00000     -0.01206     -0.00000      0.00000      0.00000     -0.34658      0.93802      0.00000      0.00000      0.00000     -0.00031     -0.00000      0.00000     -0.00000     -0.07888      0.00000     -0.00000      0.00000     -5.82533 \n   </alphavectors>\n   <betavectors>\n     0.98300     -0.33205     -0.00000      0.00000      0.00000      0.13330     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04420     -0.00000      0.00000      0.00000     -0.02954      0.00000     -0.00000     -0.00000     -0.19794 \n     0.05808      1.01872      0.00000     -0.00000     -0.00000     -0.48378      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.16883      0.00000     -0.00000     -0.00000      0.28566     -0.00000      0.00000      0.00000      1.26284 \n     0.00000      0.00000      0.00000      0.98119     -0.00000      0.00000     -0.00000     -0.00000     -0.44158      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.12690     -0.00000     -0.00000      0.00000     -0.00000      0.16222      0.00000 \n    -0.00000     -0.00000      0.98119      0.00000      0.00000     -0.00000      0.00000     -0.44158     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.12690     -0.00000     -0.00000     -0.00000      0.00000      0.16222      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.98119     -0.00000     -0.44158     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.12690      0.00000      0.16222     -0.00000     -0.00000      0.00000 \n    -0.01263      0.08535      0.00000     -0.00000     -0.00000      1.10295     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.42871     -0.00000      0.00000      0.00000      0.29879     -0.00000      0.00000      0.00000     12.24564 \n     0.00000      0.00000      0.00000      0.04919      0.00000     -0.00000      0.00000      0.00000      1.06006      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.39143      0.00000      0.00000     -0.00000      0.00000     -0.53659     -0.00000 \n    -0.00000     -0.00000      0.04919     -0.00000     -0.00000      0.00000     -0.00000      1.06006     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.39143      0.00000      0.00000      0.00000     -0.00000     -0.53659      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.04919      0.00000      1.06006      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.39143     -0.00000     -0.53659     -0.00000     -0.00000      0.00000 \n     0.00789     -0.01138     -0.00000      0.00000      0.00000      0.05185     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.46728      0.00000     -0.00000     -0.00000      1.83739     -0.00000      0.00000      0.00000      2.26738 \n    -0.00000     -0.00000     -0.00000     -0.01654     -0.00000      0.00000     -0.00000     -0.00000      0.04051     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.54732     -0.00000     -0.00000      0.00000     -0.00000      1.48802      0.00000 \n     0.00000      0.00000     -0.01654      0.00000      0.00000      0.00000     -0.00000      0.04051     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.54732     -0.00000     -0.00000     -0.00000      0.00000      1.48802     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.01654      0.00000      0.04051     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.54732      0.00000      1.48802      0.00000      0.00000      0.00000 \n    -0.00369      0.00609      0.00000     -0.00000     -0.00000     -0.01281      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.64286      0.00000     -0.00000     -0.00000     -1.82246      0.00000     -0.00000     -0.00000     -1.00882 \n     0.00000      0.00000      0.00000      0.00713      0.00000     -0.00000      0.00000      0.00000     -0.00527      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.59956      0.00000      0.00000     -0.00000      0.00000     -1.29803     -0.00000 \n    -0.00000     -0.00000      0.00713     -0.00000     -0.00000     -0.00000      0.00000     -0.00527      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.59956      0.00000      0.00000      0.00000     -0.00000     -1.29803      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00713     -0.00000     -0.00527      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.59956     -0.00000     -1.29803     -0.00000     -0.00000     -0.00000 \n    -0.00076     -0.01631     -0.00000      0.00000      0.00000     -0.01206      0.00000      0.00000     -0.00000      0.99385     -0.00000     -0.11077     -0.00000      0.00000     -0.00031     -0.00000      0.00000      0.00000     -0.07888      0.00000     -0.00000     -0.00000     -5.82533 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00076     -0.01631     -0.00000      0.00000      0.00000     -0.01206      0.00000      0.00000     -0.00000     -0.59285     -0.00000     -0.80531     -0.00000      0.00000     -0.00031     -0.00000      0.00000      0.00000     -0.07888      0.00000     -0.00000     -0.00000     -5.82533 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00076     -0.01631     -0.00000      0.00000      0.00000     -0.01206      0.00000      0.00000     -0.00000     -0.40099     -0.00000      0.91608     -0.00000      0.00000     -0.00031     -0.00000      0.00000      0.00000     -0.07888      0.00000     -0.00000     -0.00000     -5.82533 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Rb\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.19709     -0.72331      0.00000      0.00000      0.00000      0.20936      0.00000      0.00000      0.00000     -0.08383      0.00000      0.00000      0.00000      0.00182      0.00000      0.00000      0.00000      0.00501      0.00000      0.00000      0.00000      0.02939      0.00000      0.00000      0.02939      0.00000      0.02939 \n    -0.72331      2.65456      0.00000      0.00000      0.00000     -1.01980      0.00000      0.00000      0.00000      0.35346      0.00000      0.00000      0.00000     -0.02039      0.00000      0.00000      0.00000     -0.01435      0.00000      0.00000      0.00000     -0.05214      0.00000      0.00000     -0.05214      0.00000     -0.05214 \n     0.00000      0.00000      2.36964      0.00000      0.00000      0.00000     -0.98934      0.00000      0.00000      0.00000      0.24913      0.00000      0.00000      0.00000      0.03319      0.00000      0.00000      0.00000     -0.01695      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.36964      0.00000      0.00000      0.00000     -0.98934      0.00000      0.00000      0.00000      0.24913      0.00000      0.00000      0.00000      0.03319      0.00000      0.00000      0.00000     -0.01695      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.36964      0.00000      0.00000      0.00000     -0.98934      0.00000      0.00000      0.00000      0.24913      0.00000      0.00000      0.00000      0.03319      0.00000      0.00000      0.00000     -0.01695      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.20936     -1.01980      0.00000      0.00000      0.00000      2.73582      0.00000      0.00000      0.00000     -0.93097      0.00000      0.00000      0.00000      0.06137      0.00000      0.00000      0.00000      0.02958      0.00000      0.00000      0.00000     -0.00226      0.00000      0.00000     -0.00226      0.00000     -0.00226 \n     0.00000      0.00000     -0.98934      0.00000      0.00000      0.00000      2.66307      0.00000      0.00000      0.00000     -0.84351      0.00000      0.00000      0.00000     -0.07788      0.00000      0.00000      0.00000      0.03791      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.98934      0.00000      0.00000      0.00000      2.66307      0.00000      0.00000      0.00000     -0.84351      0.00000      0.00000      0.00000     -0.07788      0.00000      0.00000      0.00000      0.03791      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.98934      0.00000      0.00000      0.00000      2.66307      0.00000      0.00000      0.00000     -0.84351      0.00000      0.00000      0.00000     -0.07788      0.00000      0.00000      0.00000      0.03791      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.08383      0.35346      0.00000      0.00000      0.00000     -0.93097      0.00000      0.00000      0.00000      2.37849      0.00000      0.00000      0.00000     -0.25971      0.00000      0.00000      0.00000     -0.05825      0.00000      0.00000      0.00000      0.01001      0.00000      0.00000      0.01001      0.00000      0.01001 \n     0.00000      0.00000      0.24913      0.00000      0.00000      0.00000     -0.84351      0.00000      0.00000      0.00000      2.21653      0.00000      0.00000      0.00000      0.14698      0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.24913      0.00000      0.00000      0.00000     -0.84351      0.00000      0.00000      0.00000      2.21653      0.00000      0.00000      0.00000      0.14698      0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.24913      0.00000      0.00000      0.00000     -0.84351      0.00000      0.00000      0.00000      2.21653      0.00000      0.00000      0.00000      0.14698      0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00182     -0.02039      0.00000      0.00000      0.00000      0.06137      0.00000      0.00000      0.00000     -0.25971      0.00000      0.00000      0.00000      0.66573      0.00000      0.00000      0.00000      0.18207      0.00000      0.00000      0.00000     -0.00350      0.00000      0.00000     -0.00350      0.00000     -0.00350 \n     0.00000      0.00000      0.03319      0.00000      0.00000      0.00000     -0.07788      0.00000      0.00000      0.00000      0.14698      0.00000      0.00000      0.00000      0.01509      0.00000      0.00000      0.00000     -0.00113      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03319      0.00000      0.00000      0.00000     -0.07788      0.00000      0.00000      0.00000      0.14698      0.00000      0.00000      0.00000      0.01509      0.00000      0.00000      0.00000     -0.00113      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03319      0.00000      0.00000      0.00000     -0.07788      0.00000      0.00000      0.00000      0.14698      0.00000      0.00000      0.00000      0.01509      0.00000      0.00000      0.00000     -0.00113      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00501     -0.01435      0.00000      0.00000      0.00000      0.02958      0.00000      0.00000      0.00000     -0.05825      0.00000      0.00000      0.00000      0.18207      0.00000      0.00000      0.00000      0.05001      0.00000      0.00000      0.00000     -0.00078      0.00000      0.00000     -0.00078      0.00000     -0.00078 \n     0.00000      0.00000     -0.01695      0.00000      0.00000      0.00000      0.03791      0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000     -0.00113      0.00000      0.00000      0.00000      0.00463      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01695      0.00000      0.00000      0.00000      0.03791      0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000     -0.00113      0.00000      0.00000      0.00000      0.00463      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01695      0.00000      0.00000      0.00000      0.03791      0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000     -0.00113      0.00000      0.00000      0.00000      0.00463      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02939     -0.05214      0.00000      0.00000      0.00000     -0.00226      0.00000      0.00000      0.00000      0.01001      0.00000      0.00000      0.00000     -0.00350      0.00000      0.00000      0.00000     -0.00078      0.00000      0.00000      0.00000      2.00139      0.00000      0.00000     -0.99860      0.00000     -0.99861 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000 \n     0.02939     -0.05214      0.00000      0.00000      0.00000     -0.00226      0.00000      0.00000      0.00000      0.01001      0.00000      0.00000      0.00000     -0.00350      0.00000      0.00000      0.00000     -0.00078      0.00000      0.00000      0.00000     -0.99860      0.00000      0.00000      2.00139      0.00000     -0.99860 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000 \n     0.02939     -0.05214      0.00000      0.00000      0.00000     -0.00226      0.00000      0.00000      0.00000      0.01001      0.00000      0.00000      0.00000     -0.00350      0.00000      0.00000      0.00000     -0.00078      0.00000      0.00000      0.00000     -0.99861      0.00000      0.00000     -0.99860      0.00000      2.00138 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.96250      0.01250      0.01250      0.01250      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -537.39270    -70.94421    -64.23848    -64.23848    -64.23848    -10.45219     -8.06097     -8.06097     -8.06097     -3.79361     -3.79361     -3.79361     -3.79361     -3.79361     -1.14429     -0.59542     -0.59542     -0.59542     -0.09389     -0.03702     -0.03702     -0.03702      0.01562      0.03474      0.03474      0.03474     22.88272 \n   </alphaeps>\n   <betaeps>\n  -537.39250    -70.94406    -64.23834    -64.23834    -64.23834    -10.45192     -8.06068     -8.06068     -8.06068     -3.79332     -3.79332     -3.79332     -3.79332     -3.79332     -1.14305     -0.59339     -0.59339     -0.59339     -0.07467     -0.02343     -0.02343     -0.02343      0.02270      0.04381      0.04381      0.04381     22.88411 \n   </betaeps>\n   <alphavectors>\n     0.98314     -0.33356      0.00000     -0.00000     -0.00000      0.13592      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.04687      0.00000      0.00000      0.00000      0.00978      0.00000      0.00000     -0.00000      0.00535      0.00000     -0.00000     -0.00000     -0.16303 \n     0.05628      1.02180     -0.00000      0.00000      0.00000     -0.49645     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.18105     -0.00000     -0.00000     -0.00000     -0.04047     -0.00000     -0.00000      0.00000     -0.01061     -0.00000      0.00000      0.00000      0.92972 \n    -0.00000     -0.00000      0.00000      0.98172     -0.00000     -0.00000     -0.00000      0.00000     -0.44880      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.13998     -0.00000      0.00000      0.00000     -0.02815      0.00000     -0.00000     -0.00000     -0.00000     -0.03122     -0.00000 \n     0.00000      0.00000      0.98172      0.00000      0.00000      0.00000     -0.44880     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.13998     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02815     -0.00000      0.00000     -0.03122      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.98172     -0.00000     -0.00000     -0.44880      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.13998      0.00000     -0.02815      0.00000      0.00000      0.00000     -0.03122     -0.00000     -0.00000     -0.00000 \n    -0.02803      0.10469     -0.00000      0.00000      0.00000      1.06817      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.45864      0.00000      0.00000      0.00000      0.09907      0.00000      0.00000     -0.00000      0.10782      0.00000     -0.00000     -0.00000      9.87894 \n    -0.00000     -0.00000      0.00000      0.04644      0.00000      0.00000      0.00000     -0.00000      1.06875     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.43224      0.00000     -0.00000     -0.00000      0.08885     -0.00000      0.00000      0.00000      0.00000      0.09896      0.00000 \n     0.00000      0.00000      0.04644     -0.00000     -0.00000     -0.00000      1.06875     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.43224      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.08885      0.00000     -0.00000      0.09896     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.04644      0.00000      0.00000      1.06875     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.43224     -0.00000      0.08885     -0.00000     -0.00000     -0.00000      0.09896      0.00000      0.00000     -0.00000 \n     0.00317     -0.00431      0.00000     -0.00000     -0.00000      0.03738      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.06831     -0.00000     -0.00000     -0.00000     -0.30964     -0.00000     -0.00000      0.00000      0.01597     -0.00000     -0.00000     -0.00000      0.95350 \n     0.00000      0.00000     -0.00000     -0.00879      0.00000      0.00000      0.00000     -0.00000      0.03168      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.05110     -0.00000      0.00000      0.00000     -0.25880      0.00000     -0.00000     -0.00000     -0.00000     -0.29865     -0.00000 \n    -0.00000     -0.00000     -0.00879     -0.00000     -0.00000     -0.00000      0.03168      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.05110     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.25880     -0.00000      0.00000     -0.29865     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00879      0.00000      0.00000      0.03168      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.05110      0.00000     -0.25880      0.00000      0.00000      0.00000     -0.29865     -0.00000     -0.00000      0.00000 \n    -0.00126      0.00161     -0.00000      0.00000      0.00000     -0.01081     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00391      0.00000      0.00000      0.00000      0.83148      0.00000      0.00000     -0.00000      2.19669      0.00000     -0.00000     -0.00000     -0.34257 \n    -0.00000     -0.00000      0.00000      0.00316     -0.00000     -0.00000     -0.00000      0.00000     -0.00813     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.07478      0.00000     -0.00000     -0.00000      0.61985     -0.00000      0.00000      0.00000      0.00000      1.66039      0.00000 \n     0.00000      0.00000      0.00316      0.00000      0.00000      0.00000     -0.00813     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.07478      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.61985      0.00000     -0.00000      1.66039     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00316     -0.00000     -0.00000     -0.00813     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.07478     -0.00000      0.61985     -0.00000     -0.00000     -0.00000      1.66039      0.00000      0.00000     -0.00000 \n     0.00063     -0.00075      0.00000     -0.00000     -0.00000      0.00562      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00362     -0.00000     -0.00000     -0.00000      0.22772      0.00000      0.00000     -0.00000     -2.33340     -0.00000      0.00000      0.00000      0.17288 \n     0.00000      0.00000     -0.00000     -0.00186      0.00000      0.00000      0.00000     -0.00000      0.00469     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.03358      0.00000     -0.00000     -0.00000      0.45140      0.00000     -0.00000     -0.00000     -0.00000     -1.66458     -0.00000 \n    -0.00000     -0.00000     -0.00186     -0.00000     -0.00000     -0.00000      0.00469      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03358     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.45140     -0.00000      0.00000     -1.66458      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00186      0.00000      0.00000      0.00469     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03358      0.00000      0.45140      0.00000      0.00000      0.00000     -1.66458      0.00000     -0.00000     -0.00000 \n     0.00621     -0.02497      0.00000     -0.00000     -0.00000      0.00341      0.00000     -0.00000     -0.00000      0.99075     -0.13570      0.00000      0.00000     -0.00000      0.00389     -0.00000     -0.00000     -0.00000     -0.00411      0.00000      0.00000     -0.00000     -0.01414      0.00000      0.00000     -0.00000     -4.76839 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00621     -0.02497      0.00000     -0.00000     -0.00000      0.00341      0.00000     -0.00000     -0.00000     -0.61289     -0.79017     -0.00000     -0.00000      0.00000      0.00389     -0.00000      0.00000      0.00000     -0.00411     -0.00000     -0.00000     -0.00000     -0.01414     -0.00000     -0.00000      0.00000     -4.76839 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00621     -0.02497      0.00000     -0.00000     -0.00000      0.00341      0.00000     -0.00000     -0.00000     -0.37786      0.92586      0.00000      0.00000     -0.00000      0.00389      0.00000     -0.00000     -0.00000     -0.00411      0.00000      0.00000      0.00000     -0.01414      0.00000      0.00000      0.00000     -4.76839 \n   </alphavectors>\n   <betavectors>\n     0.98314     -0.33356      0.00000      0.00000     -0.00000      0.13592     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.04689     -0.00000     -0.00000     -0.00000      0.00939     -0.00000     -0.00000      0.00000      0.00585      0.00000      0.00000     -0.00000     -0.16303 \n     0.05628      1.02180     -0.00000     -0.00000      0.00000     -0.49645      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.18110      0.00000      0.00000      0.00000     -0.03949      0.00000      0.00000     -0.00000     -0.01271     -0.00000     -0.00000      0.00000      0.92973 \n     0.00000      0.00000     -0.00000      0.98172      0.00000      0.00000     -0.00000      0.00000     -0.44880     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.14016      0.00000     -0.00000      0.00000     -0.02387      0.00000      0.00000     -0.03379     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.98172     -0.00000      0.00000      0.00000     -0.00000     -0.44880      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.14016      0.00000      0.00000     -0.00000     -0.02387     -0.00000     -0.00000      0.00000     -0.03379      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.98172     -0.00000     -0.44880      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.14016     -0.00000      0.00000     -0.00000     -0.02387      0.00000     -0.00000      0.00000      0.00000     -0.03379     -0.00000      0.00000 \n    -0.02803      0.10469     -0.00000     -0.00000      0.00000      1.06823     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.45873     -0.00000     -0.00000     -0.00000      0.09334     -0.00000     -0.00000      0.00000      0.11328      0.00000      0.00000     -0.00000      9.87892 \n     0.00000      0.00000     -0.00000      0.04644     -0.00000     -0.00000      0.00000     -0.00000      1.06876      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.43284     -0.00000      0.00000     -0.00000      0.07533      0.00000     -0.00000      0.10708     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.04644      0.00000     -0.00000     -0.00000      0.00000      1.06876     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.43284     -0.00000     -0.00000     -0.00000      0.07533      0.00000     -0.00000     -0.00000      0.10708     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.04644      0.00000      1.06876      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.43284      0.00000     -0.00000      0.00000      0.07533     -0.00000      0.00000     -0.00000     -0.00000      0.10708     -0.00000      0.00000 \n     0.00317     -0.00431      0.00000      0.00000     -0.00000      0.03736     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.06868      0.00000      0.00000      0.00000     -0.30870      0.00000      0.00000     -0.00000     -0.00073      0.00000      0.00000     -0.00000      0.95353 \n    -0.00000     -0.00000      0.00000     -0.00879     -0.00000     -0.00000      0.00000     -0.00000      0.03165     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.05296      0.00000     -0.00000      0.00000     -0.21894     -0.00000      0.00000     -0.32299      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00879     -0.00000      0.00000     -0.00000      0.00000      0.03165      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.05296      0.00000      0.00000      0.00000     -0.21894     -0.00000      0.00000      0.00000     -0.32299      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00879      0.00000      0.03165     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.05296     -0.00000      0.00000     -0.00000     -0.21894      0.00000     -0.00000      0.00000      0.00000     -0.32299      0.00000     -0.00000 \n    -0.00126      0.00161     -0.00000     -0.00000      0.00000     -0.01080      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00646     -0.00000      0.00000     -0.00000      0.70575     -0.00000     -0.00000      0.00000      2.24021      0.00000      0.00000     -0.00000     -0.34273 \n     0.00000      0.00000     -0.00000      0.00316      0.00000      0.00000     -0.00000      0.00000     -0.00812     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.06739     -0.00000      0.00000     -0.00000      0.42338      0.00000     -0.00000      1.72131     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00316      0.00000     -0.00000      0.00000     -0.00000     -0.00812     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.06739     -0.00000     -0.00000     -0.00000      0.42338      0.00000     -0.00000     -0.00000      1.72131     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00316     -0.00000     -0.00812      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.06739      0.00000     -0.00000      0.00000      0.42338     -0.00000      0.00000     -0.00000     -0.00000      1.72131     -0.00000      0.00000 \n     0.00063     -0.00075      0.00000      0.00000     -0.00000      0.00562     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00498      0.00000     -0.00000      0.00000      0.35947     -0.00000     -0.00000      0.00000     -2.31675     -0.00000     -0.00000      0.00000      0.17293 \n    -0.00000     -0.00000      0.00000     -0.00186     -0.00000     -0.00000      0.00000     -0.00000      0.00469      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.03014      0.00000     -0.00000      0.00000      0.64126     -0.00000      0.00000     -1.60112      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00186     -0.00000      0.00000      0.00000     -0.00000      0.00469      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03014     -0.00000      0.00000      0.00000      0.64126     -0.00000      0.00000      0.00000     -1.60112      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00186      0.00000      0.00469     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03014      0.00000     -0.00000     -0.00000      0.64126      0.00000     -0.00000      0.00000      0.00000     -1.60112      0.00000     -0.00000 \n     0.00621     -0.02497      0.00000      0.00000     -0.00000      0.00339     -0.00000      0.00000      0.00000     -0.81520     -0.57918     -0.00000     -0.00000      0.00000      0.00386     -0.00000     -0.00000     -0.00000     -0.00382      0.00000      0.00000     -0.00000     -0.01453      0.00000      0.00000      0.00000     -4.76839 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00621     -0.02497      0.00000      0.00000     -0.00000      0.00339     -0.00000      0.00000      0.00000      0.90918     -0.41639     -0.00000      0.00000      0.00000      0.00386     -0.00000     -0.00000      0.00000     -0.00382      0.00000      0.00000     -0.00000     -0.01453      0.00000      0.00000      0.00000     -4.76839 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00621     -0.02497      0.00000      0.00000     -0.00000      0.00339     -0.00000      0.00000      0.00000     -0.09398      0.99557      0.00000      0.00000     -0.00000      0.00386      0.00000      0.00000     -0.00000     -0.00382     -0.00000     -0.00000      0.00000     -0.01453     -0.00000     -0.00000     -0.00000     -4.76839 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sr\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.19774     -0.72589      0.00000      0.00000      0.00000      0.24851      0.00000      0.00000      0.00000     -0.09298      0.00000      0.00000      0.00000      0.01240      0.00000      0.00000      0.00000      0.01120      0.00000      0.00000      0.00000      0.01498      0.00000      0.00000      0.01498      0.00000      0.01498 \n    -0.72589      2.66998      0.00000      0.00000      0.00000     -1.08847      0.00000      0.00000      0.00000      0.39863      0.00000      0.00000      0.00000     -0.07080      0.00000      0.00000      0.00000     -0.02922      0.00000      0.00000      0.00000     -0.03714      0.00000      0.00000     -0.03714      0.00000     -0.03714 \n     0.00000      0.00000      2.38415      0.00000      0.00000      0.00000     -1.02189      0.00000      0.00000      0.00000      0.27684      0.00000      0.00000      0.00000      0.03567      0.00000      0.00000      0.00000     -0.01798      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.38415      0.00000      0.00000      0.00000     -1.02189      0.00000      0.00000      0.00000      0.27684      0.00000      0.00000      0.00000      0.03567      0.00000      0.00000      0.00000     -0.01798      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.38415      0.00000      0.00000      0.00000     -1.02189      0.00000      0.00000      0.00000      0.27684      0.00000      0.00000      0.00000      0.03567      0.00000      0.00000      0.00000     -0.01798      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.24851     -1.08847      0.00000      0.00000      0.00000      2.88231      0.00000      0.00000      0.00000     -1.06869      0.00000      0.00000      0.00000      0.22281      0.00000      0.00000      0.00000      0.06608      0.00000      0.00000      0.00000     -0.01662      0.00000      0.00000     -0.01662      0.00000     -0.01662 \n     0.00000      0.00000     -1.02189      0.00000      0.00000      0.00000      2.73722      0.00000      0.00000      0.00000     -0.93636      0.00000      0.00000      0.00000     -0.07889      0.00000      0.00000      0.00000      0.03697      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.02189      0.00000      0.00000      0.00000      2.73722      0.00000      0.00000      0.00000     -0.93636      0.00000      0.00000      0.00000     -0.07889      0.00000      0.00000      0.00000      0.03697      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.02189      0.00000      0.00000      0.00000      2.73722      0.00000      0.00000      0.00000     -0.93636      0.00000      0.00000      0.00000     -0.07889      0.00000      0.00000      0.00000      0.03697      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.09298      0.39863      0.00000      0.00000      0.00000     -1.06869      0.00000      0.00000      0.00000      2.57489      0.00000      0.00000      0.00000     -0.63237      0.00000      0.00000      0.00000     -0.11543      0.00000      0.00000      0.00000      0.01054      0.00000      0.00000      0.01054      0.00000      0.01054 \n     0.00000      0.00000      0.27684      0.00000      0.00000      0.00000     -0.93636      0.00000      0.00000      0.00000      2.27028      0.00000      0.00000      0.00000      0.13606      0.00000      0.00000      0.00000     -0.05913      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.27684      0.00000      0.00000      0.00000     -0.93636      0.00000      0.00000      0.00000      2.27028      0.00000      0.00000      0.00000      0.13606      0.00000      0.00000      0.00000     -0.05913      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.27684      0.00000      0.00000      0.00000     -0.93636      0.00000      0.00000      0.00000      2.27028      0.00000      0.00000      0.00000      0.13606      0.00000      0.00000      0.00000     -0.05913      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01240     -0.07080      0.00000      0.00000      0.00000      0.22281      0.00000      0.00000      0.00000     -0.63237      0.00000      0.00000      0.00000      1.55759      0.00000      0.00000      0.00000      0.32143      0.00000      0.00000      0.00000     -0.00772      0.00000      0.00000     -0.00772      0.00000     -0.00772 \n     0.00000      0.00000      0.03567      0.00000      0.00000      0.00000     -0.07889      0.00000      0.00000      0.00000      0.13606      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00317      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03567      0.00000      0.00000      0.00000     -0.07889      0.00000      0.00000      0.00000      0.13606      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00317      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03567      0.00000      0.00000      0.00000     -0.07889      0.00000      0.00000      0.00000      0.13606      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00317      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01120     -0.02922      0.00000      0.00000      0.00000      0.06608      0.00000      0.00000      0.00000     -0.11543      0.00000      0.00000      0.00000      0.32143      0.00000      0.00000      0.00000      0.06675      0.00000      0.00000      0.00000     -0.00154      0.00000      0.00000     -0.00154      0.00000     -0.00154 \n     0.00000      0.00000     -0.01798      0.00000      0.00000      0.00000      0.03697      0.00000      0.00000      0.00000     -0.05913      0.00000      0.00000      0.00000     -0.00317      0.00000      0.00000      0.00000      0.00194      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01798      0.00000      0.00000      0.00000      0.03697      0.00000      0.00000      0.00000     -0.05913      0.00000      0.00000      0.00000     -0.00317      0.00000      0.00000      0.00000      0.00194      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01798      0.00000      0.00000      0.00000      0.03697      0.00000      0.00000      0.00000     -0.05913      0.00000      0.00000      0.00000     -0.00317      0.00000      0.00000      0.00000      0.00194      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01498     -0.03714      0.00000      0.00000      0.00000     -0.01662      0.00000      0.00000      0.00000      0.01054      0.00000      0.00000      0.00000     -0.00772      0.00000      0.00000      0.00000     -0.00154      0.00000      0.00000      0.00000      2.00096      0.00000      0.00000     -0.99903      0.00000     -0.99903 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000 \n     0.01498     -0.03714      0.00000      0.00000      0.00000     -0.01662      0.00000      0.00000      0.00000      0.01054      0.00000      0.00000      0.00000     -0.00772      0.00000      0.00000      0.00000     -0.00154      0.00000      0.00000      0.00000     -0.99903      0.00000      0.00000      2.00097      0.00000     -0.99904 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000 \n     0.01498     -0.03714      0.00000      0.00000      0.00000     -0.01662      0.00000      0.00000      0.00000      0.01054      0.00000      0.00000      0.00000     -0.00772      0.00000      0.00000      0.00000     -0.00154      0.00000      0.00000      0.00000     -0.99903      0.00000      0.00000     -0.99904      0.00000      2.00096 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99713      0.00096      0.00096      0.00096      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99713      0.00096      0.00096      0.00096      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -569.12190    -76.13410    -69.17034    -69.17034    -69.17034    -11.71762     -9.19929     -9.19929     -9.19929     -4.69912     -4.69912     -4.69912     -4.69912     -4.69912     -1.46527     -0.84594     -0.84594     -0.84594     -0.13309     -0.05013     -0.05013     -0.05013      0.02438      0.05360      0.05360      0.05360     31.13546 \n   </alphaeps>\n   <betaeps>\n  -569.12190    -76.13410    -69.17034    -69.17034    -69.17034    -11.71762     -9.19929     -9.19929     -9.19929     -4.69912     -4.69912     -4.69912     -4.69912     -4.69912     -1.46527     -0.84594     -0.84594     -0.84594     -0.13309     -0.05013     -0.05013     -0.05013      0.02438      0.05360      0.05360      0.05360     31.13546 \n   </betaeps>\n   <alphavectors>\n     0.98282     -0.33398      0.00000      0.00000     -0.00000      0.13683     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.04988      0.00000      0.00000     -0.00000      0.01343      0.00000     -0.00000     -0.00000      0.00994     -0.00000     -0.00000     -0.00000     -0.20767 \n     0.05770      1.02135     -0.00000     -0.00000      0.00000     -0.49897      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.19201     -0.00000     -0.00000      0.00000     -0.05173     -0.00000      0.00000      0.00000     -0.01706      0.00000      0.00000      0.00000      1.16786 \n    -0.00000      0.00000      0.98102      0.00000     -0.00000     -0.00000     -0.45423      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.15281      0.00000     -0.03433      0.00000     -0.00000     -0.00000     -0.03640      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.98102      0.00000     -0.00000      0.00000     -0.45423     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.15281     -0.00000     -0.00000      0.00000      0.00000     -0.03433      0.00000     -0.00000      0.00000     -0.03640      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.98102      0.00000      0.00000     -0.00000     -0.45423      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.15281     -0.00000     -0.00000     -0.00000     -0.00000     -0.03433     -0.00000      0.00000     -0.00000     -0.03640      0.00000 \n    -0.01836      0.09622     -0.00000     -0.00000      0.00000      1.08250     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.48909      0.00000      0.00000     -0.00000      0.14354      0.00000     -0.00000     -0.00000      0.17888     -0.00000     -0.00000     -0.00000     11.18784 \n    -0.00000      0.00000      0.04786     -0.00000      0.00000      0.00000      1.06964      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.47136     -0.00000      0.10880      0.00000     -0.00000      0.00000      0.11599      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.04786     -0.00000      0.00000     -0.00000      1.06964      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.47136     -0.00000     -0.00000     -0.00000      0.00000      0.10880      0.00000      0.00000      0.00000      0.11599      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.04786     -0.00000     -0.00000      0.00000      1.06964     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.47136     -0.00000      0.00000     -0.00000     -0.00000      0.10880      0.00000      0.00000     -0.00000      0.11599      0.00000 \n     0.00461     -0.00572      0.00000      0.00000     -0.00000      0.04055     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.07721     -0.00000     -0.00000      0.00000     -0.35458     -0.00000      0.00000      0.00000      0.05413     -0.00000     -0.00000      0.00000      1.01690 \n     0.00000     -0.00000     -0.00995     -0.00000      0.00000      0.00000      0.03203     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.06486      0.00000     -0.30282     -0.00000      0.00000     -0.00000     -0.33746     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00995     -0.00000      0.00000     -0.00000      0.03203     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.06486      0.00000      0.00000      0.00000     -0.00000     -0.30282     -0.00000     -0.00000     -0.00000     -0.33746     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00995      0.00000     -0.00000      0.00000      0.03203      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.06486      0.00000     -0.00000      0.00000      0.00000     -0.30282     -0.00000      0.00000      0.00000     -0.33746     -0.00000 \n    -0.00267      0.00307     -0.00000     -0.00000      0.00000     -0.01554      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00289      0.00000      0.00000     -0.00000      0.88361      0.00000     -0.00000     -0.00000      2.23671     -0.00000     -0.00000     -0.00000     -0.51348 \n    -0.00000      0.00000      0.00412      0.00000     -0.00000     -0.00000     -0.00876      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.06437     -0.00000      0.66268      0.00000     -0.00000      0.00000      1.75920      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00412      0.00000     -0.00000      0.00000     -0.00876     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.06437     -0.00000     -0.00000     -0.00000      0.00000      0.66268      0.00000      0.00000     -0.00000      1.75920      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00412     -0.00000     -0.00000      0.00000     -0.00876     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.06437     -0.00000      0.00000      0.00000     -0.00000      0.66268      0.00000     -0.00000     -0.00000      1.75920     -0.00000 \n     0.00162     -0.00177      0.00000      0.00000     -0.00000      0.00927     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00599     -0.00000     -0.00000      0.00000      0.18260      0.00000     -0.00000     -0.00000     -2.40320      0.00000      0.00000      0.00000      0.30476 \n     0.00000     -0.00000     -0.00246     -0.00000      0.00000      0.00000      0.00509     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02783      0.00000      0.41190     -0.00000      0.00000     -0.00000     -1.76591     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00246     -0.00000      0.00000     -0.00000      0.00509      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02783      0.00000      0.00000      0.00000     -0.00000      0.41190     -0.00000     -0.00000      0.00000     -1.76591     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00246      0.00000      0.00000     -0.00000      0.00509      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02783      0.00000     -0.00000     -0.00000      0.00000      0.41190     -0.00000      0.00000      0.00000     -1.76591     -0.00000 \n     0.00126     -0.02091      0.00000      0.00000     -0.00000     -0.00365      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.98421     -0.17700      0.00348     -0.00000     -0.00000      0.00000     -0.00436     -0.00000      0.00000      0.00000     -0.01373      0.00000      0.00000      0.00000     -5.42550 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00126     -0.02091      0.00000      0.00000     -0.00000     -0.00365      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.33882      0.94085      0.00348     -0.00000     -0.00000      0.00000     -0.00436     -0.00000      0.00000      0.00000     -0.01373      0.00000      0.00000      0.00000     -5.42550 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00126     -0.02091      0.00000      0.00000     -0.00000     -0.00365      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.64539     -0.76385      0.00348     -0.00000     -0.00000      0.00000     -0.00436     -0.00000      0.00000      0.00000     -0.01373      0.00000      0.00000      0.00000     -5.42550 \n   </alphavectors>\n   <betavectors>\n     0.98282     -0.33398     -0.00000     -0.00000     -0.00000      0.13683     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04988      0.00000      0.00000     -0.00000      0.01343     -0.00000     -0.00000      0.00000      0.00994     -0.00000      0.00000      0.00000     -0.20767 \n     0.05770      1.02135      0.00000      0.00000      0.00000     -0.49897      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.19201     -0.00000     -0.00000      0.00000     -0.05173      0.00000      0.00000     -0.00000     -0.01706      0.00000     -0.00000     -0.00000      1.16786 \n     0.00000     -0.00000      0.98102     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.45423     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.15281     -0.00000     -0.00000     -0.00000     -0.00000     -0.03433      0.00000      0.00000     -0.00000     -0.03640      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.98102      0.00000     -0.00000     -0.45423      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.15281     -0.00000     -0.03433     -0.00000     -0.00000      0.00000     -0.03640     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.98102      0.00000     -0.00000     -0.45423     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.15281      0.00000      0.00000      0.00000     -0.00000     -0.03433      0.00000     -0.00000     -0.00000     -0.03640     -0.00000 \n    -0.01836      0.09622      0.00000      0.00000      0.00000      1.08250     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.48909      0.00000      0.00000     -0.00000      0.14354     -0.00000     -0.00000      0.00000      0.17888      0.00000      0.00000      0.00000     11.18784 \n     0.00000     -0.00000      0.04786      0.00000      0.00000      0.00000     -0.00000      0.00000      1.06964      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.47136     -0.00000     -0.00000      0.00000     -0.00000      0.10880      0.00000     -0.00000     -0.00000      0.11599      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.04786     -0.00000      0.00000      1.06964     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.47136      0.00000      0.10880     -0.00000     -0.00000     -0.00000      0.11599     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.04786     -0.00000      0.00000      1.06964      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.47136      0.00000     -0.00000      0.00000     -0.00000      0.10880     -0.00000     -0.00000     -0.00000      0.11599     -0.00000 \n     0.00461     -0.00572     -0.00000     -0.00000     -0.00000      0.04055     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.07721     -0.00000     -0.00000      0.00000     -0.35458      0.00000      0.00000     -0.00000      0.05413      0.00000      0.00000      0.00000      1.01690 \n    -0.00000      0.00000     -0.00995      0.00000      0.00000      0.00000     -0.00000      0.00000      0.03203     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.06486      0.00000      0.00000     -0.00000      0.00000     -0.30282     -0.00000      0.00000      0.00000     -0.33746     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00995     -0.00000      0.00000      0.03203      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.06486     -0.00000     -0.30282      0.00000      0.00000      0.00000     -0.33746      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00995     -0.00000     -0.00000      0.03203     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.06486     -0.00000      0.00000     -0.00000      0.00000     -0.30282      0.00000      0.00000      0.00000     -0.33746     -0.00000 \n    -0.00267      0.00307      0.00000      0.00000      0.00000     -0.01554      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00289      0.00000      0.00000     -0.00000      0.88361     -0.00000     -0.00000      0.00000      2.23671      0.00000      0.00000      0.00000     -0.51348 \n     0.00000     -0.00000      0.00412     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00876      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06437     -0.00000     -0.00000      0.00000     -0.00000      0.66268      0.00000     -0.00000     -0.00000      1.75920      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00412      0.00000     -0.00000     -0.00876     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06437      0.00000      0.66268     -0.00000     -0.00000     -0.00000      1.75920     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00412     -0.00000     -0.00000     -0.00876     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.06437      0.00000     -0.00000      0.00000     -0.00000      0.66268     -0.00000     -0.00000     -0.00000      1.75920     -0.00000 \n     0.00162     -0.00177     -0.00000     -0.00000     -0.00000      0.00927     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00599     -0.00000     -0.00000      0.00000      0.18260     -0.00000     -0.00000      0.00000     -2.40320     -0.00000     -0.00000     -0.00000      0.30476 \n    -0.00000      0.00000     -0.00246      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00509     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.02783      0.00000      0.00000     -0.00000      0.00000      0.41190     -0.00000      0.00000      0.00000     -1.76591     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00246     -0.00000      0.00000      0.00509     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.02783     -0.00000      0.41190      0.00000     -0.00000      0.00000     -1.76591      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00246      0.00000      0.00000      0.00509      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02783     -0.00000      0.00000     -0.00000      0.00000      0.41190      0.00000      0.00000      0.00000     -1.76591      0.00000 \n     0.00126     -0.02091     -0.00000     -0.00000     -0.00000     -0.00365      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.94247     -0.33428      0.00348     -0.00000     -0.00000      0.00000     -0.00436      0.00000      0.00000     -0.00000     -0.01373     -0.00000     -0.00000     -0.00000     -5.42550 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00126     -0.02091     -0.00000     -0.00000     -0.00000     -0.00365      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.18174      0.98335      0.00348     -0.00000     -0.00000      0.00000     -0.00436      0.00000      0.00000     -0.00000     -0.01373     -0.00000     -0.00000     -0.00000     -5.42550 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00126     -0.02091     -0.00000     -0.00000     -0.00000     -0.00365      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.76073     -0.64907      0.00348     -0.00000     -0.00000      0.00000     -0.00436      0.00000      0.00000     -0.00000     -0.01373     -0.00000     -0.00000     -0.00000     -5.42550 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"In\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17987     -0.67643      0.00000      0.00000      0.00000      0.81678      0.00000      0.00000      0.00000     -0.01117      0.00000      0.00000      0.00000      0.06632      0.00000      0.00000      0.00000      0.00391      0.00000      0.00000      0.00000     -0.23854      0.00000      0.00000     -0.23854      0.00000     -0.23854     -0.05610      0.00000      0.00000     -0.05610      0.00000     -0.05610 \n    -0.67643      2.79578      0.00000      0.00000      0.00000     -1.31077      0.00000      0.00000      0.00000      0.40117      0.00000      0.00000      0.00000     -0.12724      0.00000      0.00000      0.00000     -0.05400      0.00000      0.00000      0.00000     -0.02543      0.00000      0.00000     -0.02543      0.00000     -0.02543      0.06626      0.00000      0.00000      0.06626      0.00000      0.06626 \n     0.00000      0.00000      2.40786      0.00000      0.00000      0.00000     -1.11292      0.00000      0.00000      0.00000      0.37028      0.00000      0.00000      0.00000      0.02738      0.00000      0.00000      0.00000     -0.02074      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.40786      0.00000      0.00000      0.00000     -1.11292      0.00000      0.00000      0.00000      0.37028      0.00000      0.00000      0.00000      0.02738      0.00000      0.00000      0.00000     -0.02074      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.40786      0.00000      0.00000      0.00000     -1.11292      0.00000      0.00000      0.00000      0.37028      0.00000      0.00000      0.00000      0.02738      0.00000      0.00000      0.00000     -0.02074      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.81678     -1.31077      0.00000      0.00000      0.00000      3.53889      0.00000      0.00000      0.00000     -1.30395      0.00000      0.00000      0.00000      0.28307      0.00000      0.00000      0.00000      0.17842      0.00000      0.00000      0.00000     -0.12286      0.00000      0.00000     -0.12286      0.00000     -0.12286     -0.08508      0.00000      0.00000     -0.08508      0.00000     -0.08508 \n     0.00000      0.00000     -1.11292      0.00000      0.00000      0.00000      3.10106      0.00000      0.00000      0.00000     -1.39518      0.00000      0.00000      0.00000     -0.04976      0.00000      0.00000      0.00000      0.05246      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.11292      0.00000      0.00000      0.00000      3.10106      0.00000      0.00000      0.00000     -1.39518      0.00000      0.00000      0.00000     -0.04976      0.00000      0.00000      0.00000      0.05246      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.11292      0.00000      0.00000      0.00000      3.10106      0.00000      0.00000      0.00000     -1.39518      0.00000      0.00000      0.00000     -0.04976      0.00000      0.00000      0.00000      0.05246      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01117      0.40117      0.00000      0.00000      0.00000     -1.30395      0.00000      0.00000      0.00000      3.05062      0.00000      0.00000      0.00000     -0.45759      0.00000      0.00000      0.00000     -0.44442      0.00000      0.00000      0.00000      0.00951      0.00000      0.00000      0.00951      0.00000      0.00951     -0.06779      0.00000      0.00000     -0.06779      0.00000     -0.06779 \n     0.00000      0.00000      0.37028      0.00000      0.00000      0.00000     -1.39518      0.00000      0.00000      0.00000      2.61714      0.00000      0.00000      0.00000      0.04107      0.00000      0.00000      0.00000     -0.09096      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.37028      0.00000      0.00000      0.00000     -1.39518      0.00000      0.00000      0.00000      2.61714      0.00000      0.00000      0.00000      0.04107      0.00000      0.00000      0.00000     -0.09096      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.37028      0.00000      0.00000      0.00000     -1.39518      0.00000      0.00000      0.00000      2.61714      0.00000      0.00000      0.00000      0.04107      0.00000      0.00000      0.00000     -0.09096      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06632     -0.12724      0.00000      0.00000      0.00000      0.28307      0.00000      0.00000      0.00000     -0.45759      0.00000      0.00000      0.00000      0.73742      0.00000      0.00000      0.00000      0.57463      0.00000      0.00000      0.00000     -0.00848      0.00000      0.00000     -0.00848      0.00000     -0.00848      0.03121      0.00000      0.00000      0.03121      0.00000      0.03121 \n     0.00000      0.00000      0.02738      0.00000      0.00000      0.00000     -0.04976      0.00000      0.00000      0.00000      0.04107      0.00000      0.00000      0.00000      0.08603      0.00000      0.00000      0.00000      0.10240      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02738      0.00000      0.00000      0.00000     -0.04976      0.00000      0.00000      0.00000      0.04107      0.00000      0.00000      0.00000      0.08603      0.00000      0.00000      0.00000      0.10240      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02738      0.00000      0.00000      0.00000     -0.04976      0.00000      0.00000      0.00000      0.04107      0.00000      0.00000      0.00000      0.08603      0.00000      0.00000      0.00000      0.10240      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00391     -0.05400      0.00000      0.00000      0.00000      0.17842      0.00000      0.00000      0.00000     -0.44442      0.00000      0.00000      0.00000      0.57463      0.00000      0.00000      0.00000      0.45324      0.00000      0.00000      0.00000     -0.00197      0.00000      0.00000     -0.00197      0.00000     -0.00197      0.02948      0.00000      0.00000      0.02948      0.00000      0.02948 \n     0.00000      0.00000     -0.02074      0.00000      0.00000      0.00000      0.05246      0.00000      0.00000      0.00000     -0.09096      0.00000      0.00000      0.00000      0.10240      0.00000      0.00000      0.00000      0.13021      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.02074      0.00000      0.00000      0.00000      0.05246      0.00000      0.00000      0.00000     -0.09096      0.00000      0.00000      0.00000      0.10240      0.00000      0.00000      0.00000      0.13021      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02074      0.00000      0.00000      0.00000      0.05246      0.00000      0.00000      0.00000     -0.09096      0.00000      0.00000      0.00000      0.10240      0.00000      0.00000      0.00000      0.13021      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.23854     -0.02543      0.00000      0.00000      0.00000     -0.12286      0.00000      0.00000      0.00000      0.00951      0.00000      0.00000      0.00000     -0.00848      0.00000      0.00000      0.00000     -0.00197      0.00000      0.00000      0.00000      2.21042      0.00000      0.00000     -1.05735      0.00000     -1.05734     -0.61794      0.00000      0.00000      0.31744      0.00000      0.31744 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.53551      0.00000      0.00000      0.00000      0.00000      0.00000     -1.87079      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.53551      0.00000      0.00000      0.00000      0.00000      0.00000     -1.87079      0.00000      0.00000      0.00000 \n    -0.23854     -0.02543      0.00000      0.00000      0.00000     -0.12286      0.00000      0.00000      0.00000      0.00951      0.00000      0.00000      0.00000     -0.00848      0.00000      0.00000      0.00000     -0.00197      0.00000      0.00000      0.00000     -1.05735      0.00000      0.00000      2.21042      0.00000     -1.05735      0.31744      0.00000      0.00000     -0.61795      0.00000      0.31744 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.53551      0.00000      0.00000      0.00000      0.00000      0.00000     -1.87079      0.00000 \n    -0.23854     -0.02543      0.00000      0.00000      0.00000     -0.12286      0.00000      0.00000      0.00000      0.00951      0.00000      0.00000      0.00000     -0.00848      0.00000      0.00000      0.00000     -0.00197      0.00000      0.00000      0.00000     -1.05734      0.00000      0.00000     -1.05735      0.00000      2.21040      0.31745      0.00000      0.00000      0.31744      0.00000     -0.61794 \n    -0.05610      0.06626      0.00000      0.00000      0.00000     -0.08508      0.00000      0.00000      0.00000     -0.06779      0.00000      0.00000      0.00000      0.03121      0.00000      0.00000      0.00000      0.02948      0.00000      0.00000      0.00000     -0.61794      0.00000      0.00000      0.31744      0.00000      0.31745      2.18601      0.00000      0.00000     -1.08173      0.00000     -1.08173 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.87079      0.00000      0.00000      0.00000      0.00000      0.00000      6.53553      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.87079      0.00000      0.00000      0.00000      0.00000      0.00000      6.53553      0.00000      0.00000      0.00000 \n    -0.05610      0.06626      0.00000      0.00000      0.00000     -0.08508      0.00000      0.00000      0.00000     -0.06779      0.00000      0.00000      0.00000      0.03121      0.00000      0.00000      0.00000      0.02948      0.00000      0.00000      0.00000      0.31744      0.00000      0.00000     -0.61795      0.00000      0.31744     -1.08173      0.00000      0.00000      2.18602      0.00000     -1.08172 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.87079      0.00000      0.00000      0.00000      0.00000      0.00000      6.53553      0.00000 \n    -0.05610      0.06626      0.00000      0.00000      0.00000     -0.08508      0.00000      0.00000      0.00000     -0.06779      0.00000      0.00000      0.00000      0.03121      0.00000      0.00000      0.00000      0.02948      0.00000      0.00000      0.00000      0.31744      0.00000      0.00000      0.31744      0.00000     -0.61794     -1.08173      0.00000      0.00000     -1.08172      0.00000      2.18602 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -977.85700   -143.37080   -133.48210   -133.48210   -133.48210    -27.10888    -22.98844    -22.98844    -22.98844    -15.96965    -15.96965    -15.96965    -15.96965    -15.96965     -4.03337     -2.69797     -2.69797     -2.69797     -0.70195     -0.70195     -0.70195     -0.70195     -0.70195     -0.29092     -0.10252     -0.10252     -0.10252      0.10676      0.16860      0.16860      0.16860      1.95625    196.26900 \n   </alphaeps>\n   <betaeps>\n  -977.85660   -143.37050   -133.48180   -133.48180   -133.48180    -27.10849    -22.98799    -22.98799    -22.98799    -15.96922    -15.96922    -15.96922    -15.96922    -15.96922     -4.03235     -2.69684     -2.69684     -2.69684     -0.69957     -0.69957     -0.69957     -0.69957     -0.69957     -0.27281     -0.08237     -0.08237     -0.08237      0.12134      0.18194      0.18194      0.18194      1.96541    196.26940 \n   </betaeps>\n   <alphavectors>\n     0.97367     -0.34012     -0.00000     -0.00000      0.00000      0.14712     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.06495      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.01876      0.00000     -0.00000      0.00000      0.01630     -0.00000      0.00000      0.00000     -0.04980     -0.65235 \n     0.10681      1.02099      0.00000      0.00000     -0.00000     -0.52720      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.24719     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.07031     -0.00000      0.00000     -0.00000     -0.02728      0.00000     -0.00000      0.00000      0.25666      3.73465 \n    -0.00000      0.00000      0.00000      0.00000      0.97823     -0.00000      0.00000      0.00000     -0.45858     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.19088      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.03931      0.00000     -0.00000     -0.05368     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.97823      0.00000     -0.00000      0.00000     -0.45858      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.19088      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03931     -0.00000     -0.00000      0.00000     -0.00000     -0.05368      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.97823     -0.00000      0.00000     -0.00000     -0.45858     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.19088      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.03931      0.00000     -0.00000      0.00000     -0.05368     -0.00000     -0.00000 \n     0.23199      0.08167      0.00000      0.00000     -0.00000      1.11763     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.64754      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.19963      0.00000     -0.00000      0.00000      0.25416     -0.00000      0.00000      0.00000     -0.40886     21.18220 \n    -0.00000      0.00000      0.00000      0.00000      0.05565      0.00000     -0.00000     -0.00000      1.06060      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.64745      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.14049     -0.00000      0.00000      0.19400      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.05565     -0.00000      0.00000     -0.00000      1.06060     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.64745     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.14049      0.00000      0.00000     -0.00000      0.00000      0.19400      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.05565      0.00000     -0.00000      0.00000      1.06060      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.64745      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.14049     -0.00000      0.00000     -0.00000      0.19400     -0.00000      0.00000 \n     0.04322     -0.03692     -0.00000     -0.00000      0.00000      0.15142     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.14085     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.43491     -0.00000      0.00000     -0.00000      0.07644     -0.00000      0.00000      0.00000      6.14091      0.68536 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.01416      0.00000     -0.00000     -0.00000      0.04336     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.13557     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.31597      0.00000     -0.00000     -0.46334     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.01416     -0.00000      0.00000     -0.00000      0.04336      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.13557      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.31597     -0.00000     -0.00000      0.00000     -0.00000     -0.46334      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.01416      0.00000     -0.00000      0.00000      0.04336     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.13557     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.31597      0.00000     -0.00000      0.00000     -0.46334      0.00000     -0.00000 \n     0.01508     -0.01223     -0.00000     -0.00000      0.00000      0.03285     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.03031     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.60382      0.00000     -0.00000      0.00000      1.76067     -0.00000      0.00000      0.00000      3.30820      0.22108 \n    -0.00000      0.00000      0.00000      0.00000      0.00485     -0.00000      0.00000      0.00000     -0.00933      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.04189      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.49707     -0.00000      0.00000      1.41967      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00485      0.00000     -0.00000      0.00000     -0.00933      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.04189     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.49707      0.00000      0.00000     -0.00000      0.00000      1.41967      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00485     -0.00000      0.00000     -0.00000     -0.00933      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.04189      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.49707     -0.00000      0.00000     -0.00000      1.41967      0.00000      0.00000 \n    -0.00490      0.00399      0.00000      0.00000     -0.00000     -0.00961      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00781      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.48087     -0.00000     -0.00000     -0.00000     -1.76287      0.00000     -0.00000     -0.00000     -1.16033     -0.07031 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00226      0.00000     -0.00000     -0.00000      0.00418     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.01137     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.62429      0.00000     -0.00000     -1.26111     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00226     -0.00000      0.00000     -0.00000      0.00418     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.01137     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.62429     -0.00000     -0.00000      0.00000     -0.00000     -1.26111     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00226      0.00000     -0.00000      0.00000      0.00418     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.01137     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.62429      0.00000     -0.00000      0.00000     -1.26111     -0.00000     -0.00000 \n    -0.12318     -0.01358     -0.00000     -0.00000      0.00000     -0.02200      0.00000      0.00000      0.00000     -0.49013      0.00000      0.00000      0.00000      0.84941      0.00995     -0.00000      0.00000     -0.00000      0.17856     -0.00000     -0.00000     -0.30927     -0.00000     -0.00348      0.00000      0.00000      0.00000     -0.01153      0.00000     -0.00000     -0.00000     -0.00481    -10.33180 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.69858      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.61854     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.69858      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.61854      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.12318     -0.01358     -0.00000     -0.00000      0.00000     -0.02200      0.00000      0.00000      0.00000     -0.49055      0.00000      0.00000      0.00000     -0.84917      0.00995     -0.00000      0.00000     -0.00000      0.17855     -0.00000     -0.00000      0.30927      0.00000     -0.00348      0.00000      0.00000      0.00000     -0.01153      0.00000     -0.00000     -0.00000     -0.00481    -10.33180 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.69858      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.61854     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.12318     -0.01358     -0.00000     -0.00000      0.00000     -0.02200      0.00000      0.00000      0.00000      0.98067     -0.00000     -0.00000     -0.00000     -0.00024      0.00995      0.00000     -0.00000      0.00000     -0.35711      0.00000      0.00000     -0.00000     -0.00000     -0.00348     -0.00000     -0.00000     -0.00000     -0.01153     -0.00000      0.00000      0.00000     -0.00481    -10.33180 \n    -0.01786      0.01471      0.00000      0.00000     -0.00000     -0.04700      0.00000      0.00000      0.00000     -0.03071      0.00000      0.00000      0.00000      0.05323     -0.01082     -0.00000      0.00000     -0.00000     -0.52094      0.00000      0.00000      0.90227      0.00000      0.02459     -0.00000     -0.00000     -0.00000     -0.05790     -0.00000      0.00000      0.00000     -3.14231     -0.27284 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.10644      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.80456      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.10644     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.80456      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.01786      0.01471      0.00000      0.00000     -0.00000     -0.04700      0.00000      0.00000      0.00000     -0.03074      0.00000      0.00000      0.00000     -0.05321     -0.01082     -0.00000      0.00000     -0.00000     -0.52092      0.00000      0.00000     -0.90229     -0.00000      0.02459     -0.00000     -0.00000     -0.00000     -0.05790     -0.00000      0.00000      0.00000     -3.14231     -0.27284 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.10644      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.80456     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.01786      0.01471      0.00000      0.00000     -0.00000     -0.04700      0.00000      0.00000      0.00000      0.06146     -0.00000     -0.00000     -0.00000     -0.00002     -0.01082      0.00000     -0.00000      0.00000      1.04186     -0.00000     -0.00000      0.00001      0.00000      0.02459      0.00000      0.00000      0.00000     -0.05790      0.00000     -0.00000     -0.00000     -3.14231     -0.27284 \n   </alphavectors>\n   <betavectors>\n     0.97367     -0.34012     -0.00000      0.00000      0.00000      0.14712      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.06495      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01904     -0.00000     -0.00000     -0.00000      0.01618     -0.00000     -0.00000      0.00000     -0.04972     -0.65235 \n     0.10681      1.02099      0.00000     -0.00000     -0.00000     -0.52720     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.24720     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.07133      0.00000      0.00000      0.00000     -0.02690      0.00000      0.00000     -0.00000      0.25641      3.73465 \n    -0.00000      0.00000      0.00000     -0.00000      0.97823      0.00000      0.00000     -0.45858      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.19091     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.03886     -0.00000      0.00000      0.00000     -0.00000     -0.05388     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.97823     -0.00000      0.00000      0.00000      0.00000     -0.45858      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.19091      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.03886     -0.00000     -0.00000     -0.05388     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.97823     -0.00000     -0.00000      0.00000     -0.45858     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.19091     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.03886     -0.00000     -0.00000     -0.00000     -0.05388      0.00000     -0.00000      0.00000     -0.00000 \n     0.23198      0.08167      0.00000     -0.00000     -0.00000      1.11766      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.64757      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.20285     -0.00000     -0.00000     -0.00000      0.25283     -0.00000     -0.00000      0.00000     -0.40806     21.18220 \n    -0.00000      0.00000      0.00000     -0.00000      0.05565     -0.00000     -0.00000      1.06060     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.64757      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.13890      0.00000     -0.00000     -0.00000      0.00000      0.19473      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05565      0.00000     -0.00000     -0.00000     -0.00000      1.06060     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.64757     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.13890      0.00000      0.00000      0.19473      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.05565      0.00000      0.00000     -0.00000      1.06060      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.64757     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.13890      0.00000      0.00000      0.00000      0.19473      0.00000      0.00000     -0.00000      0.00000 \n     0.04322     -0.03692     -0.00000      0.00000      0.00000      0.15139      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.14062     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.45454     -0.00000      0.00000      0.00000      0.07531     -0.00000     -0.00000      0.00000      6.13955      0.68537 \n     0.00000     -0.00000     -0.00000      0.00000     -0.01416     -0.00000     -0.00000      0.04335      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.13586     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.31236     -0.00000      0.00000      0.00000     -0.00000     -0.46508     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.01416      0.00000     -0.00000     -0.00000     -0.00000      0.04335      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.13586      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.31236     -0.00000     -0.00000     -0.46508     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.01416      0.00000      0.00000     -0.00000      0.04335     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.13586      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.31236     -0.00000     -0.00000     -0.00000     -0.46508     -0.00000     -0.00000      0.00000     -0.00000 \n     0.01508     -0.01223     -0.00000      0.00000      0.00000      0.03284      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.02986     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.60671      0.00000     -0.00000     -0.00000      1.75332     -0.00000     -0.00000      0.00000      3.31157      0.22109 \n    -0.00000      0.00000      0.00000     -0.00000      0.00484      0.00000      0.00000     -0.00932     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.04120      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.48747      0.00000     -0.00000     -0.00000      0.00000      1.42301      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00484     -0.00000      0.00000      0.00000      0.00000     -0.00932      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.04120     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.48747      0.00000      0.00000      1.42301      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00484     -0.00000     -0.00000      0.00000     -0.00932     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.04120     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.48747      0.00000      0.00000      0.00000      1.42301      0.00000      0.00000     -0.00000      0.00000 \n    -0.00490      0.00398      0.00000     -0.00000     -0.00000     -0.00961     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00769      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.47076      0.00000     -0.00000     -0.00000     -1.76574      0.00000      0.00000     -0.00000     -1.16011     -0.07031 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00226     -0.00000     -0.00000      0.00418      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.01120     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.63280     -0.00000      0.00000      0.00000     -0.00000     -1.25686     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00226      0.00000     -0.00000     -0.00000     -0.00000      0.00418     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.01120      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.63280     -0.00000     -0.00000     -1.25686     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00226      0.00000      0.00000     -0.00000      0.00418      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.01120      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.63280     -0.00000     -0.00000     -0.00000     -1.25686     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.12318     -0.01358     -0.00000      0.00000      0.00000     -0.02201     -0.00000     -0.00000     -0.00000     -0.49033      0.00000      0.00000      0.00000      0.84930      0.00995     -0.00000     -0.00000      0.00000      0.17856      0.00000     -0.00000     -0.30925      0.00000     -0.00354     -0.00000      0.00000     -0.00000     -0.01150     -0.00000      0.00000     -0.00000     -0.00481    -10.33180 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.69858      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.61852      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.69858      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.61852     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.12318     -0.01358     -0.00000      0.00000      0.00000     -0.02201     -0.00000     -0.00000     -0.00000     -0.49035      0.00000      0.00000      0.00000     -0.84929      0.00995     -0.00000     -0.00000      0.00000      0.17854      0.00000     -0.00000      0.30927     -0.00000     -0.00354     -0.00000     -0.00000      0.00000     -0.01150     -0.00000      0.00000     -0.00000     -0.00481    -10.33180 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.69858      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.61852      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.12318     -0.01358     -0.00000      0.00000      0.00000     -0.02201     -0.00000     -0.00000     -0.00000      0.98068     -0.00000     -0.00000     -0.00000     -0.00001      0.00995      0.00000      0.00000     -0.00000     -0.35710     -0.00000      0.00000     -0.00001      0.00000     -0.00354      0.00000     -0.00000     -0.00000     -0.01150      0.00000     -0.00000      0.00000     -0.00481    -10.33180 \n    -0.01786      0.01471      0.00000     -0.00000     -0.00000     -0.04698     -0.00000     -0.00000     -0.00000     -0.03072      0.00000      0.00000      0.00000      0.05321     -0.01066     -0.00000     -0.00000      0.00000     -0.52096     -0.00000      0.00000      0.90226     -0.00000      0.03461      0.00000     -0.00000      0.00000     -0.05570      0.00000     -0.00000      0.00000     -3.14225     -0.27284 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.10642      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.80456     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10642     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.80456     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.01786      0.01471      0.00000     -0.00000     -0.00000     -0.04698     -0.00000     -0.00000     -0.00000     -0.03072      0.00000      0.00000      0.00000     -0.05321     -0.01066     -0.00000     -0.00000      0.00000     -0.52090     -0.00000      0.00000     -0.90229      0.00000      0.03461      0.00000      0.00000     -0.00000     -0.05570      0.00000     -0.00000      0.00000     -3.14225     -0.27284 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.10642     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.80456      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01786      0.01471      0.00000     -0.00000     -0.00000     -0.04698     -0.00000     -0.00000     -0.00000      0.06144     -0.00000     -0.00000     -0.00000     -0.00000     -0.01066      0.00000      0.00000     -0.00000      1.04186      0.00000     -0.00000      0.00003     -0.00000      0.03461     -0.00000      0.00000      0.00000     -0.05570     -0.00000      0.00000     -0.00000     -3.14225     -0.27284 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sn\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17910     -0.67507      0.00000      0.00000      0.00000      0.84020      0.00000      0.00000      0.00000     -0.00456      0.00000      0.00000      0.00000      0.07035      0.00000      0.00000      0.00000      0.00565      0.00000      0.00000      0.00000     -0.24649      0.00000      0.00000     -0.24649      0.00000     -0.24649     -0.06211      0.00000      0.00000     -0.06211      0.00000     -0.06211 \n    -0.67507      2.81361      0.00000      0.00000      0.00000     -1.31750      0.00000      0.00000      0.00000      0.39557      0.00000      0.00000      0.00000     -0.13684      0.00000      0.00000      0.00000     -0.05978      0.00000      0.00000      0.00000     -0.03467      0.00000      0.00000     -0.03467      0.00000     -0.03467      0.07732      0.00000      0.00000      0.07732      0.00000      0.07732 \n     0.00000      0.00000      2.41403      0.00000      0.00000      0.00000     -1.13072      0.00000      0.00000      0.00000      0.38797      0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000     -0.03167      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.41403      0.00000      0.00000      0.00000     -1.13072      0.00000      0.00000      0.00000      0.38797      0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000     -0.03167      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.41403      0.00000      0.00000      0.00000     -1.13072      0.00000      0.00000      0.00000      0.38797      0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000     -0.03167      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.84020     -1.31750      0.00000      0.00000      0.00000      3.59946      0.00000      0.00000      0.00000     -1.34836      0.00000      0.00000      0.00000      0.31312      0.00000      0.00000      0.00000      0.20990      0.00000      0.00000      0.00000     -0.12623      0.00000      0.00000     -0.12623      0.00000     -0.12623     -0.09490      0.00000      0.00000     -0.09490      0.00000     -0.09490 \n     0.00000      0.00000     -1.13072      0.00000      0.00000      0.00000      3.15884      0.00000      0.00000      0.00000     -1.47023      0.00000      0.00000      0.00000     -0.01444      0.00000      0.00000      0.00000      0.08796      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.13072      0.00000      0.00000      0.00000      3.15884      0.00000      0.00000      0.00000     -1.47023      0.00000      0.00000      0.00000     -0.01444      0.00000      0.00000      0.00000      0.08796      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.13072      0.00000      0.00000      0.00000      3.15884      0.00000      0.00000      0.00000     -1.47023      0.00000      0.00000      0.00000     -0.01444      0.00000      0.00000      0.00000      0.08796      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00456      0.39557      0.00000      0.00000      0.00000     -1.34836      0.00000      0.00000      0.00000      3.11225      0.00000      0.00000      0.00000     -0.48193      0.00000      0.00000      0.00000     -0.47964      0.00000      0.00000      0.00000      0.00974      0.00000      0.00000      0.00974      0.00000      0.00974     -0.06753      0.00000      0.00000     -0.06753      0.00000     -0.06753 \n     0.00000      0.00000      0.38797      0.00000      0.00000      0.00000     -1.47023      0.00000      0.00000      0.00000      2.71024      0.00000      0.00000      0.00000     -0.04369      0.00000      0.00000      0.00000     -0.16747      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.38797      0.00000      0.00000      0.00000     -1.47023      0.00000      0.00000      0.00000      2.71024      0.00000      0.00000      0.00000     -0.04369      0.00000      0.00000      0.00000     -0.16747      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.38797      0.00000      0.00000      0.00000     -1.47023      0.00000      0.00000      0.00000      2.71024      0.00000      0.00000      0.00000     -0.04369      0.00000      0.00000      0.00000     -0.16747      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07035     -0.13684      0.00000      0.00000      0.00000      0.31312      0.00000      0.00000      0.00000     -0.48193      0.00000      0.00000      0.00000      0.70674      0.00000      0.00000      0.00000      0.58259      0.00000      0.00000      0.00000     -0.00925      0.00000      0.00000     -0.00925      0.00000     -0.00925      0.03042      0.00000      0.00000      0.03042      0.00000      0.03042 \n     0.00000      0.00000      0.01988      0.00000      0.00000      0.00000     -0.01444      0.00000      0.00000      0.00000     -0.04369      0.00000      0.00000      0.00000      0.19903      0.00000      0.00000      0.00000      0.21066      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000     -0.01444      0.00000      0.00000      0.00000     -0.04369      0.00000      0.00000      0.00000      0.19903      0.00000      0.00000      0.00000      0.21066      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000     -0.01444      0.00000      0.00000      0.00000     -0.04369      0.00000      0.00000      0.00000      0.19903      0.00000      0.00000      0.00000      0.21066      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00565     -0.05978      0.00000      0.00000      0.00000      0.20990      0.00000      0.00000      0.00000     -0.47964      0.00000      0.00000      0.00000      0.58259      0.00000      0.00000      0.00000      0.48564      0.00000      0.00000      0.00000     -0.00270      0.00000      0.00000     -0.00270      0.00000     -0.00270      0.03073      0.00000      0.00000      0.03073      0.00000      0.03073 \n     0.00000      0.00000     -0.03167      0.00000      0.00000      0.00000      0.08796      0.00000      0.00000      0.00000     -0.16747      0.00000      0.00000      0.00000      0.21066      0.00000      0.00000      0.00000      0.22921      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.03167      0.00000      0.00000      0.00000      0.08796      0.00000      0.00000      0.00000     -0.16747      0.00000      0.00000      0.00000      0.21066      0.00000      0.00000      0.00000      0.22921      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.03167      0.00000      0.00000      0.00000      0.08796      0.00000      0.00000      0.00000     -0.16747      0.00000      0.00000      0.00000      0.21066      0.00000      0.00000      0.00000      0.22921      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.24649     -0.03467      0.00000      0.00000      0.00000     -0.12623      0.00000      0.00000      0.00000      0.00974      0.00000      0.00000      0.00000     -0.00925      0.00000      0.00000      0.00000     -0.00270      0.00000      0.00000      0.00000      2.23126      0.00000      0.00000     -1.06362      0.00000     -1.06363     -0.65114      0.00000      0.00000      0.33458      0.00000      0.33460 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58981      0.00000      0.00000      0.00000      0.00000      0.00000     -1.97149      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58981      0.00000      0.00000      0.00000      0.00000      0.00000     -1.97149      0.00000      0.00000      0.00000 \n    -0.24649     -0.03467      0.00000      0.00000      0.00000     -0.12623      0.00000      0.00000      0.00000      0.00974      0.00000      0.00000      0.00000     -0.00925      0.00000      0.00000      0.00000     -0.00270      0.00000      0.00000      0.00000     -1.06362      0.00000      0.00000      2.23127      0.00000     -1.06364      0.33459      0.00000      0.00000     -0.65114      0.00000      0.33458 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58981      0.00000      0.00000      0.00000      0.00000      0.00000     -1.97149      0.00000 \n    -0.24649     -0.03467      0.00000      0.00000      0.00000     -0.12623      0.00000      0.00000      0.00000      0.00974      0.00000      0.00000      0.00000     -0.00925      0.00000      0.00000      0.00000     -0.00270      0.00000      0.00000      0.00000     -1.06363      0.00000      0.00000     -1.06364      0.00000      2.23129      0.33459      0.00000      0.00000      0.33459      0.00000     -0.65116 \n    -0.06211      0.07732      0.00000      0.00000      0.00000     -0.09490      0.00000      0.00000      0.00000     -0.06753      0.00000      0.00000      0.00000      0.03042      0.00000      0.00000      0.00000      0.03073      0.00000      0.00000      0.00000     -0.65114      0.00000      0.00000      0.33459      0.00000      0.33459      2.20527      0.00000      0.00000     -1.08965      0.00000     -1.08964 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.97149      0.00000      0.00000      0.00000      0.00000      0.00000      6.58980      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.97149      0.00000      0.00000      0.00000      0.00000      0.00000      6.58980      0.00000      0.00000      0.00000 \n    -0.06211      0.07732      0.00000      0.00000      0.00000     -0.09490      0.00000      0.00000      0.00000     -0.06753      0.00000      0.00000      0.00000      0.03042      0.00000      0.00000      0.00000      0.03073      0.00000      0.00000      0.00000      0.33458      0.00000      0.00000     -0.65114      0.00000      0.33459     -1.08965      0.00000      0.00000      2.20527      0.00000     -1.08963 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.97149      0.00000      0.00000      0.00000      0.00000      0.00000      6.58980      0.00000 \n    -0.06211      0.07732      0.00000      0.00000      0.00000     -0.09490      0.00000      0.00000      0.00000     -0.06753      0.00000      0.00000      0.00000      0.03042      0.00000      0.00000      0.00000      0.03073      0.00000      0.00000      0.00000      0.33460      0.00000      0.00000      0.33458      0.00000     -0.65116     -1.08964      0.00000      0.00000     -1.08963      0.00000      2.20526 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66667      0.66667      0.66667      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1020.77600   -150.80010   -140.63350   -140.63350   -140.63350    -29.02830    -24.74767    -24.74767    -24.74767    -17.50162    -17.50162    -17.50162    -17.50162    -17.50162     -4.53254     -3.11814     -3.11814     -3.11814     -0.99037     -0.99037     -0.99037     -0.99037     -0.99037     -0.37881     -0.15005     -0.15005     -0.15005      0.14160      0.20716      0.20716      0.20716      2.44301    207.34650 \n   </alphaeps>\n   <betaeps>\n -1020.77500   -150.79930   -140.63250   -140.63250   -140.63250    -29.02716    -24.74635    -24.74635    -24.74635    -17.50037    -17.50037    -17.50037    -17.50037    -17.50037     -4.52970     -3.11499     -3.11499     -3.11499     -0.98463     -0.98463     -0.98463     -0.98463     -0.98463     -0.34105     -0.10995     -0.10995     -0.10995      0.16868      0.23250      0.23250      0.23250      2.46054    207.34770 \n   </betaeps>\n   <alphavectors>\n     0.97303     -0.34070     -0.00000      0.00000     -0.00000      0.14793     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06608     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.02074     -0.00000      0.00000      0.00000      0.01895     -0.00000      0.00000     -0.00000     -0.05031     -0.66825 \n     0.11029      1.02206      0.00000     -0.00000      0.00000     -0.53011      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.25139      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.07551      0.00000     -0.00000     -0.00000     -0.02151      0.00000     -0.00000      0.00000      0.28957      3.82321 \n    -0.00000     -0.00000      0.97783      0.00000     -0.00000     -0.00000     -0.46048     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.19517     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.04636     -0.00000     -0.00000      0.00000      0.00000     -0.05882      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.97783     -0.00000      0.00000      0.00000     -0.46048     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.19517     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.04636     -0.00000     -0.00000     -0.00000     -0.05882      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.97783     -0.00000     -0.00000      0.00000     -0.46048     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.19517      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.04636     -0.00000      0.00000     -0.05882     -0.00000     -0.00000     -0.00000      0.00000 \n     0.24297      0.08746      0.00000     -0.00000      0.00000      1.11613     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.65954     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.22644     -0.00000      0.00000      0.00000      0.31718      0.00000      0.00000     -0.00000     -0.34176     21.23963 \n    -0.00000     -0.00000      0.05667     -0.00000      0.00000      0.00000      1.06069      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.66455      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.16707      0.00000      0.00000     -0.00000     -0.00000      0.21474     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.05667      0.00000     -0.00000     -0.00000      1.06069      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.66455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.16707      0.00000      0.00000      0.00000      0.21474     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.05667      0.00000      0.00000     -0.00000      1.06069      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.66455      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.16707      0.00000     -0.00000      0.21474      0.00000      0.00000      0.00000      0.00000 \n     0.04547     -0.04408     -0.00000      0.00000     -0.00000      0.16086     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.14281      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.45067      0.00000     -0.00000     -0.00000      0.19772      0.00000      0.00000     -0.00000      7.46174      0.21044 \n     0.00000      0.00000     -0.01515     -0.00000      0.00000      0.00000      0.04368     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.14276     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.37263     -0.00000     -0.00000      0.00000      0.00000     -0.51213      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.01515      0.00000     -0.00000     -0.00000      0.04368      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.14276     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.37263     -0.00000     -0.00000     -0.00000     -0.51213      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.01515      0.00000      0.00000     -0.00000      0.04368     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.14276     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.37263     -0.00000      0.00000     -0.51213     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.01535     -0.01402     -0.00000      0.00000     -0.00000      0.03273     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.02753      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.59554     -0.00000     -0.00000     -0.00000      1.87157      0.00000      0.00000     -0.00000      3.67614      0.07361 \n    -0.00000     -0.00000      0.00582      0.00000     -0.00000     -0.00000     -0.01036      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04098      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.54154      0.00000      0.00000     -0.00000     -0.00000      1.49598     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00582     -0.00000      0.00000      0.00000     -0.01036      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.04098      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.54154     -0.00000     -0.00000     -0.00000      1.49598      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00582     -0.00000     -0.00000      0.00000     -0.01036      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.04098      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.54154      0.00000     -0.00000      1.49598     -0.00000      0.00000      0.00000      0.00000 \n    -0.00504      0.00461      0.00000     -0.00000      0.00000     -0.00939      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00588     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.49602     -0.00000     -0.00000      0.00000     -1.87401     -0.00000     -0.00000      0.00000     -1.31303     -0.02414 \n     0.00000      0.00000     -0.00276     -0.00000      0.00000      0.00000      0.00471     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00999     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.58603     -0.00000     -0.00000      0.00000      0.00000     -1.34526      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00276      0.00000     -0.00000     -0.00000      0.00471      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.58603      0.00000      0.00000      0.00000     -1.34526     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00276      0.00000      0.00000     -0.00000      0.00471     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00999     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.58603     -0.00000      0.00000     -1.34526      0.00000     -0.00000     -0.00000      0.00000 \n    -0.12855     -0.01650     -0.00000      0.00000     -0.00000     -0.02054      0.00000      0.00000      0.00000     -0.00000      0.84815      0.00000      0.00000     -0.48948      0.00992     -0.00000      0.00000      0.00000     -0.32330      0.00000      0.00000      0.00000      0.18663     -0.00417      0.00000     -0.00000     -0.00000     -0.01478      0.00000      0.00000      0.00000     -0.01299    -10.34929 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.69613     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.64658     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.69613     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.64658      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.12855     -0.01650     -0.00000      0.00000     -0.00000     -0.02054      0.00000      0.00000      0.00000     -0.00000     -0.00017      0.00000      0.00000      0.97926      0.00992      0.00000     -0.00000     -0.00000      0.00002     -0.00000     -0.00000     -0.00000     -0.37330     -0.00417     -0.00000      0.00000      0.00000     -0.01478     -0.00000     -0.00000     -0.00000     -0.01299    -10.34929 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.69613     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.64658      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.12855     -0.01650     -0.00000      0.00000     -0.00000     -0.02054      0.00000      0.00000      0.00000     -0.00000     -0.84798      0.00000      0.00000     -0.48978      0.00992     -0.00000      0.00000      0.00000      0.32328     -0.00000     -0.00000     -0.00000      0.18667     -0.00417     -0.00000      0.00000     -0.00000     -0.01478      0.00000      0.00000      0.00000     -0.01299    -10.34929 \n    -0.01916      0.01783      0.00000     -0.00000      0.00000     -0.05090      0.00000      0.00000      0.00000     -0.00000      0.05477      0.00000      0.00000     -0.03161     -0.00874     -0.00000     -0.00000      0.00000      0.90597     -0.00000     -0.00000     -0.00000     -0.52300      0.02009     -0.00000      0.00000      0.00000     -0.07855     -0.00000     -0.00000     -0.00000     -3.71485     -0.09254 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.10953     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.81188      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.10953     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.81188     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.01916      0.01783      0.00000     -0.00000      0.00000     -0.05090      0.00000      0.00000      0.00000     -0.00000     -0.00001      0.00000      0.00000      0.06324     -0.00874      0.00000     -0.00000     -0.00000     -0.00006      0.00000      0.00000      0.00000      1.04609      0.02009      0.00000     -0.00000     -0.00000     -0.07855      0.00000      0.00000      0.00000     -3.71485     -0.09254 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.10953      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.81188     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.01916      0.01783      0.00000     -0.00000      0.00000     -0.05090      0.00000      0.00000      0.00000     -0.00000     -0.05476      0.00000      0.00000     -0.03163     -0.00874     -0.00000     -0.00000      0.00000     -0.90591      0.00000      0.00000      0.00000     -0.52309      0.02009      0.00000     -0.00000      0.00000     -0.07855     -0.00000     -0.00000     -0.00000     -3.71485     -0.09254 \n   </alphavectors>\n   <betavectors>\n     0.97303     -0.34070     -0.00000      0.00000     -0.00000      0.14793     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06608     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02112      0.00000     -0.00000      0.00000      0.01882     -0.00000      0.00000      0.00000     -0.05018     -0.66825 \n     0.11028      1.02206      0.00000     -0.00000      0.00000     -0.53011      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.25139      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.07711     -0.00000      0.00000     -0.00000     -0.02113      0.00000     -0.00000     -0.00000      0.28916      3.82321 \n     0.00000     -0.00000      0.97783      0.00000     -0.00000     -0.00000     -0.46048     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.19525     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.04523      0.00000      0.00000     -0.00000     -0.05941     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.97783     -0.00000      0.00000     -0.00000     -0.46048      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.19525      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.04523     -0.00000     -0.00000     -0.00000     -0.05941      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.97783      0.00000      0.00000     -0.00000     -0.46048     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.19525      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.04523      0.00000      0.00000      0.00000     -0.05941      0.00000     -0.00000      0.00000 \n     0.24297      0.08746      0.00000     -0.00000      0.00000      1.11621     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.65963      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.23030      0.00000     -0.00000     -0.00000      0.31562     -0.00000      0.00000     -0.00000     -0.34033     21.23963 \n     0.00000     -0.00000      0.05666     -0.00000      0.00000      0.00000      1.06071      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.66484      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.16300     -0.00000     -0.00000      0.00000      0.21690      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.05666      0.00000     -0.00000      0.00000      1.06071     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.66484     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.16300      0.00000      0.00000      0.00000      0.21690     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.05666     -0.00000     -0.00000      0.00000      1.06071      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.66484      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.16300     -0.00000     -0.00000     -0.00000      0.21690     -0.00000      0.00000      0.00000 \n     0.04547     -0.04407     -0.00000      0.00000     -0.00000      0.16076     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.14207     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.48895     -0.00000      0.00000      0.00000      0.19525     -0.00000      0.00000      0.00000      7.45951      0.21044 \n    -0.00000      0.00000     -0.01515     -0.00000      0.00000      0.00000      0.04365     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.14346     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.36336      0.00000      0.00000     -0.00000     -0.51719     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.01515      0.00000     -0.00000      0.00000      0.04365      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.14346      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.36336     -0.00000     -0.00000     -0.00000     -0.51719      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.01515     -0.00000     -0.00000      0.00000      0.04365     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.14346     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.36336      0.00000      0.00000      0.00000     -0.51719     -0.00000      0.00000     -0.00000 \n     0.01535     -0.01402     -0.00000      0.00000     -0.00000      0.03270     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.02638     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.58959      0.00000     -0.00000      0.00000      1.86410     -0.00000      0.00000      0.00000      3.68090      0.07361 \n     0.00000     -0.00000      0.00582      0.00000     -0.00000     -0.00000     -0.01035      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.03943      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.51762     -0.00000     -0.00000      0.00000      1.50447      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00582     -0.00000      0.00000     -0.00000     -0.01035     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.03943      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.51762      0.00000      0.00000      0.00000      1.50447     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00582      0.00000      0.00000     -0.00000     -0.01035      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.03943      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.51762     -0.00000     -0.00000     -0.00000      1.50447     -0.00000     -0.00000      0.00000 \n    -0.00504      0.00461      0.00000     -0.00000      0.00000     -0.00939      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00554      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.48915      0.00000     -0.00000     -0.00000     -1.87658      0.00000     -0.00000     -0.00000     -1.31193     -0.02414 \n    -0.00000      0.00000     -0.00276     -0.00000      0.00000      0.00000      0.00470     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00959     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.60743      0.00000      0.00000     -0.00000     -1.33573      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00276      0.00000     -0.00000      0.00000      0.00470      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00959     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.60743      0.00000      0.00000      0.00000     -1.33573     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00276     -0.00000     -0.00000      0.00000      0.00470      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00959     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.60743      0.00000      0.00000      0.00000     -1.33573     -0.00000      0.00000     -0.00000 \n    -0.12855     -0.01650     -0.00000      0.00000     -0.00000     -0.02057      0.00000     -0.00000      0.00000     -0.00000      0.84815     -0.00000     -0.00000     -0.48949      0.00991     -0.00000     -0.00000      0.00000     -0.00000     -0.32327     -0.00000     -0.00000      0.18662     -0.00419     -0.00000      0.00000      0.00000     -0.01474      0.00000      0.00000      0.00000     -0.01302    -10.34929 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.69614     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.64653     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.69614      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.64653      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.12855     -0.01650     -0.00000      0.00000     -0.00000     -0.02057      0.00000     -0.00000      0.00000     -0.00000     -0.00016     -0.00000     -0.00000      0.97927      0.00991      0.00000      0.00000     -0.00000      0.00000      0.00002      0.00000      0.00000     -0.37327     -0.00419      0.00000     -0.00000     -0.00000     -0.01474     -0.00000     -0.00000      0.00000     -0.01302    -10.34929 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.69614      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.64653      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.12855     -0.01650     -0.00000      0.00000     -0.00000     -0.02057      0.00000     -0.00000      0.00000     -0.00000     -0.84799     -0.00000     -0.00000     -0.48978      0.00991     -0.00000     -0.00000      0.00000     -0.00000      0.32326      0.00000      0.00000      0.18665     -0.00419      0.00000     -0.00000     -0.00000     -0.01474     -0.00000     -0.00000     -0.00000     -0.01302    -10.34929 \n    -0.01916      0.01783      0.00000     -0.00000      0.00000     -0.05087      0.00000     -0.00000      0.00000     -0.00000      0.05475     -0.00000     -0.00000     -0.03160     -0.00828      0.00000     -0.00000     -0.00000      0.00000      0.90596      0.00000      0.00000     -0.52301      0.03957      0.00000     -0.00000     -0.00000     -0.07567     -0.00000     -0.00000     -0.00000     -3.71476     -0.09254 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.10948      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.81188      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.10948      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.81188     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.01916      0.01783      0.00000     -0.00000      0.00000     -0.05087      0.00000     -0.00000      0.00000     -0.00000     -0.00001     -0.00000     -0.00000      0.06321     -0.00828      0.00000     -0.00000      0.00000      0.00000     -0.00004     -0.00000     -0.00000      1.04609      0.03957     -0.00000      0.00000      0.00000     -0.07567      0.00000      0.00000     -0.00000     -3.71476     -0.09254 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.10948     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.81188     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01916      0.01783      0.00000     -0.00000      0.00000     -0.05087      0.00000     -0.00000      0.00000     -0.00000     -0.05473     -0.00000     -0.00000     -0.03161     -0.00828      0.00000     -0.00000     -0.00000      0.00000     -0.90592     -0.00000     -0.00000     -0.52308      0.03957     -0.00000      0.00000      0.00000     -0.07567      0.00000      0.00000      0.00000     -3.71476     -0.09254 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sb\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17903     -0.67545      0.00000      0.00000      0.00000      0.85933      0.00000      0.00000      0.00000     -0.00725      0.00000      0.00000      0.00000      0.07065      0.00000      0.00000      0.00000      0.00838      0.00000      0.00000      0.00000     -0.25166      0.00000      0.00000     -0.25166      0.00000     -0.25166     -0.06408      0.00000      0.00000     -0.06408      0.00000     -0.06408 \n    -0.67545      2.83550      0.00000      0.00000      0.00000     -1.31103      0.00000      0.00000      0.00000      0.37531      0.00000      0.00000      0.00000     -0.14751      0.00000      0.00000      0.00000     -0.06249      0.00000      0.00000      0.00000     -0.04975      0.00000      0.00000     -0.04975      0.00000     -0.04975      0.09265      0.00000      0.00000      0.09265      0.00000      0.09265 \n     0.00000      0.00000      2.42483      0.00000      0.00000      0.00000     -1.15467      0.00000      0.00000      0.00000      0.40803      0.00000      0.00000      0.00000      0.00897      0.00000      0.00000      0.00000     -0.04387      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.42483      0.00000      0.00000      0.00000     -1.15467      0.00000      0.00000      0.00000      0.40803      0.00000      0.00000      0.00000      0.00897      0.00000      0.00000      0.00000     -0.04387      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.42483      0.00000      0.00000      0.00000     -1.15467      0.00000      0.00000      0.00000      0.40803      0.00000      0.00000      0.00000      0.00897      0.00000      0.00000      0.00000     -0.04387      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.85933     -1.31103      0.00000      0.00000      0.00000      3.66957      0.00000      0.00000      0.00000     -1.37628      0.00000      0.00000      0.00000      0.35024      0.00000      0.00000      0.00000      0.23816      0.00000      0.00000      0.00000     -0.13149      0.00000      0.00000     -0.13149      0.00000     -0.13149     -0.11299      0.00000      0.00000     -0.11299      0.00000     -0.11299 \n     0.00000      0.00000     -1.15467      0.00000      0.00000      0.00000      3.21520      0.00000      0.00000      0.00000     -1.54422      0.00000      0.00000      0.00000      0.03387      0.00000      0.00000      0.00000      0.12760      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.15467      0.00000      0.00000      0.00000      3.21520      0.00000      0.00000      0.00000     -1.54422      0.00000      0.00000      0.00000      0.03387      0.00000      0.00000      0.00000      0.12760      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.15467      0.00000      0.00000      0.00000      3.21520      0.00000      0.00000      0.00000     -1.54422      0.00000      0.00000      0.00000      0.03387      0.00000      0.00000      0.00000      0.12760      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00725      0.37531      0.00000      0.00000      0.00000     -1.37628      0.00000      0.00000      0.00000      3.08136      0.00000      0.00000      0.00000     -0.50118      0.00000      0.00000      0.00000     -0.48435      0.00000      0.00000      0.00000      0.01196      0.00000      0.00000      0.01196      0.00000      0.01196     -0.04454      0.00000      0.00000     -0.04454      0.00000     -0.04454 \n     0.00000      0.00000      0.40803      0.00000      0.00000      0.00000     -1.54422      0.00000      0.00000      0.00000      2.82168      0.00000      0.00000      0.00000     -0.15871      0.00000      0.00000      0.00000     -0.25252      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.40803      0.00000      0.00000      0.00000     -1.54422      0.00000      0.00000      0.00000      2.82168      0.00000      0.00000      0.00000     -0.15871      0.00000      0.00000      0.00000     -0.25252      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.40803      0.00000      0.00000      0.00000     -1.54422      0.00000      0.00000      0.00000      2.82168      0.00000      0.00000      0.00000     -0.15871      0.00000      0.00000      0.00000     -0.25252      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07065     -0.14751      0.00000      0.00000      0.00000      0.35024      0.00000      0.00000      0.00000     -0.50118      0.00000      0.00000      0.00000      0.70608      0.00000      0.00000      0.00000      0.59727      0.00000      0.00000      0.00000     -0.00965      0.00000      0.00000     -0.00965      0.00000     -0.00965      0.01918      0.00000      0.00000      0.01918      0.00000      0.01918 \n     0.00000      0.00000      0.00897      0.00000      0.00000      0.00000      0.03387      0.00000      0.00000      0.00000     -0.15871      0.00000      0.00000      0.00000      0.33850      0.00000      0.00000      0.00000      0.32189      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00897      0.00000      0.00000      0.00000      0.03387      0.00000      0.00000      0.00000     -0.15871      0.00000      0.00000      0.00000      0.33850      0.00000      0.00000      0.00000      0.32189      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00897      0.00000      0.00000      0.00000      0.03387      0.00000      0.00000      0.00000     -0.15871      0.00000      0.00000      0.00000      0.33850      0.00000      0.00000      0.00000      0.32189      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00838     -0.06249      0.00000      0.00000      0.00000      0.23816      0.00000      0.00000      0.00000     -0.48435      0.00000      0.00000      0.00000      0.59727      0.00000      0.00000      0.00000      0.50974      0.00000      0.00000      0.00000     -0.00375      0.00000      0.00000     -0.00375      0.00000     -0.00375      0.02178      0.00000      0.00000      0.02178      0.00000      0.02178 \n     0.00000      0.00000     -0.04387      0.00000      0.00000      0.00000      0.12760      0.00000      0.00000      0.00000     -0.25252      0.00000      0.00000      0.00000      0.32189      0.00000      0.00000      0.00000      0.31074      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.04387      0.00000      0.00000      0.00000      0.12760      0.00000      0.00000      0.00000     -0.25252      0.00000      0.00000      0.00000      0.32189      0.00000      0.00000      0.00000      0.31074      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.04387      0.00000      0.00000      0.00000      0.12760      0.00000      0.00000      0.00000     -0.25252      0.00000      0.00000      0.00000      0.32189      0.00000      0.00000      0.00000      0.31074      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.25166     -0.04975      0.00000      0.00000      0.00000     -0.13149      0.00000      0.00000      0.00000      0.01196      0.00000      0.00000      0.00000     -0.00965      0.00000      0.00000      0.00000     -0.00375      0.00000      0.00000      0.00000      2.25044      0.00000      0.00000     -1.06873      0.00000     -1.06874     -0.68048      0.00000      0.00000      0.34879      0.00000      0.34879 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.63834      0.00000      0.00000      0.00000      0.00000      0.00000     -2.05853      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.63834      0.00000      0.00000      0.00000      0.00000      0.00000     -2.05853      0.00000      0.00000      0.00000 \n    -0.25166     -0.04975      0.00000      0.00000      0.00000     -0.13149      0.00000      0.00000      0.00000      0.01196      0.00000      0.00000      0.00000     -0.00965      0.00000      0.00000      0.00000     -0.00375      0.00000      0.00000      0.00000     -1.06873      0.00000      0.00000      2.25043      0.00000     -1.06873      0.34878      0.00000      0.00000     -0.68048      0.00000      0.34877 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.63834      0.00000      0.00000      0.00000      0.00000      0.00000     -2.05853      0.00000 \n    -0.25166     -0.04975      0.00000      0.00000      0.00000     -0.13149      0.00000      0.00000      0.00000      0.01196      0.00000      0.00000      0.00000     -0.00965      0.00000      0.00000      0.00000     -0.00375      0.00000      0.00000      0.00000     -1.06874      0.00000      0.00000     -1.06873      0.00000      2.25045      0.34879      0.00000      0.00000      0.34878      0.00000     -0.68049 \n    -0.06408      0.09265      0.00000      0.00000      0.00000     -0.11299      0.00000      0.00000      0.00000     -0.04454      0.00000      0.00000      0.00000      0.01918      0.00000      0.00000      0.00000      0.02178      0.00000      0.00000      0.00000     -0.68048      0.00000      0.00000      0.34878      0.00000      0.34879      2.22131      0.00000      0.00000     -1.09785      0.00000     -1.09784 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.05853      0.00000      0.00000      0.00000      0.00000      0.00000      6.63833      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.05853      0.00000      0.00000      0.00000      0.00000      0.00000      6.63833      0.00000      0.00000      0.00000 \n    -0.06408      0.09265      0.00000      0.00000      0.00000     -0.11299      0.00000      0.00000      0.00000     -0.04454      0.00000      0.00000      0.00000      0.01918      0.00000      0.00000      0.00000      0.02178      0.00000      0.00000      0.00000      0.34879      0.00000      0.00000     -0.68048      0.00000      0.34878     -1.09785      0.00000      0.00000      2.22133      0.00000     -1.09784 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.05853      0.00000      0.00000      0.00000      0.00000      0.00000      6.63833      0.00000 \n    -0.06408      0.09265      0.00000      0.00000      0.00000     -0.11299      0.00000      0.00000      0.00000     -0.04454      0.00000      0.00000      0.00000      0.01918      0.00000      0.00000      0.00000      0.02178      0.00000      0.00000      0.00000      0.34879      0.00000      0.00000      0.34877      0.00000     -0.68049     -1.09784      0.00000      0.00000     -1.09784      0.00000      2.22132 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1064.57800   -158.40280   -147.94150   -147.94150   -147.94150    -30.99647    -26.57713    -26.57713    -26.57713    -19.08018    -19.08018    -19.08018    -19.08018    -19.08018     -5.04274     -3.55801     -3.55801     -3.55801     -1.29128     -1.29128     -1.29128     -1.29128     -1.29128     -0.46235     -0.19556     -0.19556     -0.19556      0.18176      0.24868      0.24868      0.24868      2.95910    214.73920 \n   </alphaeps>\n   <betaeps>\n -1064.57500   -158.40120   -147.93940   -147.93940   -147.93940    -30.99423    -26.57455    -26.57455    -26.57455    -19.07775    -19.07775    -19.07775    -19.07775    -19.07775     -5.03735     -3.55206     -3.55206     -3.55206     -1.28151     -1.28151     -1.28151     -1.28151     -1.28151     -0.40394     -0.13504     -0.13504     -0.13504      0.22114      0.28586      0.28586      0.28586      2.98497    214.74160 \n   </betaeps>\n   <alphavectors>\n     0.97249     -0.34148     -0.00000      0.00000     -0.00000      0.14883      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.06711      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.02251      0.00000      0.00000     -0.00000      0.02146      0.00000     -0.00000      0.00000     -0.04934     -0.67876 \n     0.11347      1.02449      0.00000     -0.00000      0.00000     -0.53332     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.25398     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07881     -0.00000     -0.00000      0.00000     -0.01394     -0.00000      0.00000     -0.00000      0.31361      3.90333 \n    -0.00000     -0.00000      0.97705      0.00000     -0.00000     -0.00000     -0.00000     -0.46500     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.20040     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.05255     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06339     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.97705     -0.00000      0.00000     -0.46500     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.20040     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.05255      0.00000      0.00000     -0.06339     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.97705      0.00000      0.00000     -0.00000     -0.46500      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.20040      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05255     -0.00000     -0.00000     -0.06339      0.00000     -0.00000     -0.00000 \n     0.25361      0.09920      0.00000     -0.00000      0.00000      1.11571      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.67145      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.25277      0.00000      0.00000     -0.00000      0.38418      0.00000     -0.00000      0.00000     -0.21717     21.31538 \n    -0.00000     -0.00000      0.05832     -0.00000      0.00000      0.00000      0.00000      1.06057      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.67906      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.18928      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.23174      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.05832      0.00000     -0.00000      1.06057      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.67906      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.18928     -0.00000     -0.00000      0.23174     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.05832     -0.00000     -0.00000      0.00000      1.06057     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.67906     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18928      0.00000      0.00000      0.23174      0.00000      0.00000      0.00000 \n     0.04164     -0.05168     -0.00000      0.00000     -0.00000      0.16824      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.13441     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.44334     -0.00000     -0.00000      0.00000      0.36645      0.00000     -0.00000      0.00000      8.80502     -0.59100 \n     0.00000      0.00000     -0.01619     -0.00000      0.00000      0.00000      0.00000      0.04630     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.14823     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.42107     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.55577      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.01619      0.00000     -0.00000      0.04630     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.14823     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.42107      0.00000      0.00000     -0.55577      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.01619     -0.00000     -0.00000      0.00000      0.04630      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.14823      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.42107     -0.00000     -0.00000     -0.55577     -0.00000     -0.00000     -0.00000 \n     0.01349     -0.01555     -0.00000      0.00000     -0.00000      0.03182      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.02023     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.60049      0.00000      0.00000     -0.00000      1.97024      0.00000     -0.00000      0.00000      3.97046     -0.14489 \n    -0.00000     -0.00000      0.00674      0.00000     -0.00000     -0.00000     -0.00000     -0.01199      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.03885      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.57904      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.55554     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00674      0.00000      0.00000     -0.01199     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.03885      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.57904     -0.00000     -0.00000      1.55554     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00674      0.00000      0.00000     -0.00000     -0.01199     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.03885     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.57904      0.00000      0.00000      1.55554      0.00000      0.00000      0.00000 \n    -0.00444      0.00514      0.00000     -0.00000      0.00000     -0.00899     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00238      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.50530      0.00000      0.00000     -0.00000     -1.95893     -0.00000      0.00000     -0.00000     -1.43038      0.04359 \n     0.00000      0.00000     -0.00322     -0.00000      0.00000      0.00000      0.00000      0.00546     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00837     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.55725     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.40343      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00322     -0.00000     -0.00000      0.00546      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00837     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.55725      0.00000      0.00000     -1.40343      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00322     -0.00000     -0.00000      0.00000      0.00546      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00837      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.55725     -0.00000     -0.00000     -1.40343     -0.00000     -0.00000      0.00000 \n    -0.13350     -0.02248     -0.00000      0.00000     -0.00000     -0.01942     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.01822      0.97729      0.00997     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.16538     -0.35158     -0.00504      0.00000      0.00000     -0.00000     -0.01933     -0.00000      0.00000     -0.00000     -0.03435    -10.36592 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.69301     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.67297      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.69301     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.67297     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.13350     -0.02248     -0.00000      0.00000     -0.00000     -0.01942     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.85547     -0.47286      0.00997     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.38717      0.03257     -0.00504     -0.00000     -0.00000      0.00000     -0.01933      0.00000     -0.00000      0.00000     -0.03435    -10.36592 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.69301      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.67297     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.13350     -0.02248     -0.00000      0.00000     -0.00000     -0.01942     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.83725     -0.50443      0.00997     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.22179      0.31902     -0.00504      0.00000      0.00000     -0.00000     -0.01933     -0.00000      0.00000     -0.00000     -0.03435    -10.36592 \n    -0.01787      0.02108      0.00000     -0.00000      0.00000     -0.05388     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00124      0.06627     -0.00173      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.44683      0.94991      0.00625     -0.00000     -0.00000      0.00000     -0.12638      0.00000     -0.00000      0.00000     -4.29206      0.21950 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11480     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.81824      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11480      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.81824      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01787      0.02108      0.00000     -0.00000      0.00000     -0.05388     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.05801     -0.03206     -0.00173      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.04607     -0.08799      0.00625      0.00000      0.00000     -0.00000     -0.12638     -0.00000      0.00000     -0.00000     -4.29206      0.21950 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.11480     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.81824     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.01787      0.02108      0.00000     -0.00000      0.00000     -0.05388     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05677     -0.03420     -0.00173      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.59923     -0.86193      0.00625     -0.00000     -0.00000      0.00000     -0.12638      0.00000     -0.00000      0.00000     -4.29206      0.21950 \n   </alphavectors>\n   <betavectors>\n     0.97249     -0.34148      0.00000     -0.00000     -0.00000      0.14883      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06712      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.02290     -0.00000      0.00000     -0.00000      0.02135      0.00000     -0.00000      0.00000     -0.04918     -0.67876 \n     0.11347      1.02449     -0.00000      0.00000      0.00000     -0.53331     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.25397     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.08078      0.00000     -0.00000      0.00000     -0.01366     -0.00000      0.00000     -0.00000      0.31312      3.90333 \n     0.00000     -0.00000      0.00000      0.97705     -0.00000     -0.00000     -0.00000     -0.46500      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.20052      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.05081     -0.00000      0.00000      0.00000     -0.00000     -0.06434     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.97705      0.00000     -0.46500     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.20052      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05081      0.00000      0.00000     -0.00000     -0.00000     -0.06434      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.97705      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.46500     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.20052      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05081      0.00000     -0.06434     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.25360      0.09919     -0.00000      0.00000      0.00000      1.11585      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.67169      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.25578     -0.00000      0.00000     -0.00000      0.38266      0.00000     -0.00000      0.00000     -0.21522     21.31538 \n     0.00000     -0.00000      0.00000      0.05832      0.00000      0.00000      0.00000      1.06059     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.67955     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.18300      0.00000     -0.00000     -0.00000      0.00000      0.23523     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.05832     -0.00000      1.06059      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.67955     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.18300     -0.00000     -0.00000      0.00000      0.00000      0.23523      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.05832     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.06059      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.67955     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.18300     -0.00000      0.23523     -0.00000     -0.00000      0.00000     -0.00000 \n     0.04164     -0.05167      0.00000     -0.00000     -0.00000      0.16805      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.13280     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.49933      0.00000     -0.00000      0.00000      0.36256      0.00000     -0.00000      0.00000      8.80239     -0.59104 \n    -0.00000      0.00000     -0.00000     -0.01619      0.00000      0.00000      0.00000      0.04626      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.14941      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.40673     -0.00000      0.00000      0.00000     -0.00000     -0.56394      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.01619     -0.00000      0.04626     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.14941      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.40673      0.00000      0.00000     -0.00000     -0.00000     -0.56394     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.01619     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.04626     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.14941      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.40673      0.00000     -0.56394      0.00000      0.00000     -0.00000      0.00000 \n     0.01349     -0.01555      0.00000     -0.00000     -0.00000      0.03177      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01821     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.58471     -0.00000      0.00000     -0.00000      1.96389      0.00000     -0.00000      0.00000      3.97597     -0.14490 \n     0.00000     -0.00000      0.00000      0.00674     -0.00000     -0.00000     -0.00000     -0.01197     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.03639     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.54368      0.00000     -0.00000     -0.00000      0.00000      1.56831      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00674      0.00000     -0.01197      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.03639     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.54368     -0.00000     -0.00000      0.00000      0.00000      1.56831      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00674     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.01197     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.03639     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.54368     -0.00000      1.56831     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00444      0.00514     -0.00000      0.00000      0.00000     -0.00898     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00175      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.50413     -0.00000      0.00000     -0.00000     -1.96057     -0.00000      0.00000     -0.00000     -1.42854      0.04359 \n    -0.00000      0.00000     -0.00000     -0.00322      0.00000      0.00000      0.00000      0.00545      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00772      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.58891     -0.00000      0.00000      0.00000     -0.00000     -1.39044      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00322     -0.00000      0.00545     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00772      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.58891      0.00000      0.00000     -0.00000     -0.00000     -1.39044     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00322     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00545     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00772      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.58891      0.00000     -1.39044      0.00000      0.00000     -0.00000      0.00000 \n    -0.13350     -0.02247      0.00000     -0.00000     -0.00000     -0.01947     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.95655     -0.20119      0.00998     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.35625      0.15497     -0.00490     -0.00000     -0.00000     -0.00000     -0.01926      0.00000     -0.00000      0.00000     -0.03444    -10.36592 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.69304     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.67289      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.69304     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.67289     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.13350     -0.02247      0.00000     -0.00000     -0.00000     -0.01947     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.65251     -0.72780      0.00998     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.31233      0.23103     -0.00490     -0.00000      0.00000      0.00000     -0.01926     -0.00000      0.00000     -0.00000     -0.03444    -10.36592 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.69304      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.67289      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.13350     -0.02247      0.00000     -0.00000     -0.00000     -0.01947     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.30404      0.92899      0.00998     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.04392     -0.38600     -0.00490      0.00000     -0.00000     -0.00000     -0.01926      0.00000     -0.00000      0.00000     -0.03444    -10.36592 \n    -0.01787      0.02107     -0.00000      0.00000      0.00000     -0.05381     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.06481     -0.01363     -0.00081      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.96263     -0.41874      0.03427      0.00000      0.00000      0.00000     -0.12313     -0.00000      0.00000     -0.00000     -4.29202      0.21951 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11471      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.81824     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.11471      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.81824     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.01787      0.02107     -0.00000      0.00000      0.00000     -0.05381     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.04421     -0.04931     -0.00081      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.84396     -0.62429      0.03427      0.00000     -0.00000     -0.00000     -0.12313      0.00000     -0.00000      0.00000     -4.29202      0.21951 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.11471     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.81824      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.01787      0.02107     -0.00000      0.00000      0.00000     -0.05381     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02060      0.06294     -0.00081      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.11867      1.04303      0.03427     -0.00000      0.00000      0.00000     -0.12313     -0.00000      0.00000     -0.00000     -4.29202      0.21951 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Te\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.17960     -0.67777      0.00000      0.00000      0.00000      0.87053      0.00000      0.00000      0.00000     -0.01729      0.00000      0.00000      0.00000      0.06967      0.00000      0.00000      0.00000      0.01086      0.00000      0.00000      0.00000     -0.25446      0.00000      0.00000     -0.25446      0.00000     -0.25446     -0.06357      0.00000      0.00000     -0.06357      0.00000     -0.06357 \n    -0.67777      2.84844      0.00000      0.00000      0.00000     -1.34022      0.00000      0.00000      0.00000      0.39109      0.00000      0.00000      0.00000     -0.15970      0.00000      0.00000      0.00000     -0.06797      0.00000      0.00000      0.00000     -0.04702      0.00000      0.00000     -0.04702      0.00000     -0.04702      0.09798      0.00000      0.00000      0.09798      0.00000      0.09798 \n     0.00000      0.00000      2.42861      0.00000      0.00000      0.00000     -1.16922      0.00000      0.00000      0.00000      0.42900      0.00000      0.00000      0.00000     -0.00710      0.00000      0.00000      0.00000     -0.05455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.42861      0.00000      0.00000      0.00000     -1.16922      0.00000      0.00000      0.00000      0.42900      0.00000      0.00000      0.00000     -0.00710      0.00000      0.00000      0.00000     -0.05455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.42861      0.00000      0.00000      0.00000     -1.16922      0.00000      0.00000      0.00000      0.42900      0.00000      0.00000      0.00000     -0.00710      0.00000      0.00000      0.00000     -0.05455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.87053     -1.34022      0.00000      0.00000      0.00000      3.71806      0.00000      0.00000      0.00000     -1.44579      0.00000      0.00000      0.00000      0.37003      0.00000      0.00000      0.00000      0.23969      0.00000      0.00000      0.00000     -0.13397      0.00000      0.00000     -0.13397      0.00000     -0.13397     -0.11087      0.00000      0.00000     -0.11087      0.00000     -0.11087 \n     0.00000      0.00000     -1.16922      0.00000      0.00000      0.00000      3.27266      0.00000      0.00000      0.00000     -1.63129      0.00000      0.00000      0.00000      0.09637      0.00000      0.00000      0.00000      0.16674      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.16922      0.00000      0.00000      0.00000      3.27266      0.00000      0.00000      0.00000     -1.63129      0.00000      0.00000      0.00000      0.09637      0.00000      0.00000      0.00000      0.16674      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.16922      0.00000      0.00000      0.00000      3.27266      0.00000      0.00000      0.00000     -1.63129      0.00000      0.00000      0.00000      0.09637      0.00000      0.00000      0.00000      0.16674      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01729      0.39109      0.00000      0.00000      0.00000     -1.44579      0.00000      0.00000      0.00000      3.19656      0.00000      0.00000      0.00000     -0.60767      0.00000      0.00000      0.00000     -0.52021      0.00000      0.00000      0.00000      0.01584      0.00000      0.00000      0.01584      0.00000      0.01584     -0.05095      0.00000      0.00000     -0.05095      0.00000     -0.05095 \n     0.00000      0.00000      0.42900      0.00000      0.00000      0.00000     -1.63129      0.00000      0.00000      0.00000      2.95530      0.00000      0.00000      0.00000     -0.29790      0.00000      0.00000      0.00000     -0.34147      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.42900      0.00000      0.00000      0.00000     -1.63129      0.00000      0.00000      0.00000      2.95530      0.00000      0.00000      0.00000     -0.29790      0.00000      0.00000      0.00000     -0.34147      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.42900      0.00000      0.00000      0.00000     -1.63129      0.00000      0.00000      0.00000      2.95530      0.00000      0.00000      0.00000     -0.29790      0.00000      0.00000      0.00000     -0.34147      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06967     -0.15970      0.00000      0.00000      0.00000      0.37003      0.00000      0.00000      0.00000     -0.60767      0.00000      0.00000      0.00000      0.77895      0.00000      0.00000      0.00000      0.60007      0.00000      0.00000      0.00000     -0.00925      0.00000      0.00000     -0.00925      0.00000     -0.00925      0.03135      0.00000      0.00000      0.03135      0.00000      0.03135 \n     0.00000      0.00000     -0.00710      0.00000      0.00000      0.00000      0.09637      0.00000      0.00000      0.00000     -0.29790      0.00000      0.00000      0.00000      0.51919      0.00000      0.00000      0.00000      0.43902      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00710      0.00000      0.00000      0.00000      0.09637      0.00000      0.00000      0.00000     -0.29790      0.00000      0.00000      0.00000      0.51919      0.00000      0.00000      0.00000      0.43902      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00710      0.00000      0.00000      0.00000      0.09637      0.00000      0.00000      0.00000     -0.29790      0.00000      0.00000      0.00000      0.51919      0.00000      0.00000      0.00000      0.43902      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01086     -0.06797      0.00000      0.00000      0.00000      0.23969      0.00000      0.00000      0.00000     -0.52021      0.00000      0.00000      0.00000      0.60007      0.00000      0.00000      0.00000      0.46555      0.00000      0.00000      0.00000     -0.00370      0.00000      0.00000     -0.00370      0.00000     -0.00370      0.02882      0.00000      0.00000      0.02882      0.00000      0.02882 \n     0.00000      0.00000     -0.05455      0.00000      0.00000      0.00000      0.16674      0.00000      0.00000      0.00000     -0.34147      0.00000      0.00000      0.00000      0.43902      0.00000      0.00000      0.00000      0.37523      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05455      0.00000      0.00000      0.00000      0.16674      0.00000      0.00000      0.00000     -0.34147      0.00000      0.00000      0.00000      0.43902      0.00000      0.00000      0.00000      0.37523      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05455      0.00000      0.00000      0.00000      0.16674      0.00000      0.00000      0.00000     -0.34147      0.00000      0.00000      0.00000      0.43902      0.00000      0.00000      0.00000      0.37523      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.25446     -0.04702      0.00000      0.00000      0.00000     -0.13397      0.00000      0.00000      0.00000      0.01584      0.00000      0.00000      0.00000     -0.00925      0.00000      0.00000      0.00000     -0.00370      0.00000      0.00000      0.00000      2.26628      0.00000      0.00000     -1.07596      0.00000     -1.07596     -0.70768      0.00000      0.00000      0.36185      0.00000      0.36184 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.68453      0.00000      0.00000      0.00000      0.00000      0.00000     -2.13910      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.68453      0.00000      0.00000      0.00000      0.00000      0.00000     -2.13910      0.00000      0.00000      0.00000 \n    -0.25446     -0.04702      0.00000      0.00000      0.00000     -0.13397      0.00000      0.00000      0.00000      0.01584      0.00000      0.00000      0.00000     -0.00925      0.00000      0.00000      0.00000     -0.00370      0.00000      0.00000      0.00000     -1.07596      0.00000      0.00000      2.26629      0.00000     -1.07597      0.36185      0.00000      0.00000     -0.70769      0.00000      0.36186 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.68453      0.00000      0.00000      0.00000      0.00000      0.00000     -2.13910      0.00000 \n    -0.25446     -0.04702      0.00000      0.00000      0.00000     -0.13397      0.00000      0.00000      0.00000      0.01584      0.00000      0.00000      0.00000     -0.00925      0.00000      0.00000      0.00000     -0.00370      0.00000      0.00000      0.00000     -1.07596      0.00000      0.00000     -1.07597      0.00000      2.26628      0.36184      0.00000      0.00000      0.36185      0.00000     -0.70769 \n    -0.06357      0.09798      0.00000      0.00000      0.00000     -0.11087      0.00000      0.00000      0.00000     -0.05095      0.00000      0.00000      0.00000      0.03135      0.00000      0.00000      0.00000      0.02882      0.00000      0.00000      0.00000     -0.70768      0.00000      0.00000      0.36185      0.00000      0.36184      2.23751      0.00000      0.00000     -1.10476      0.00000     -1.10475 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.13910      0.00000      0.00000      0.00000      0.00000      0.00000      6.68451      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.13910      0.00000      0.00000      0.00000      0.00000      0.00000      6.68451      0.00000      0.00000      0.00000 \n    -0.06357      0.09798      0.00000      0.00000      0.00000     -0.11087      0.00000      0.00000      0.00000     -0.05095      0.00000      0.00000      0.00000      0.03135      0.00000      0.00000      0.00000      0.02882      0.00000      0.00000      0.00000      0.36185      0.00000      0.00000     -0.70769      0.00000      0.36185     -1.10476      0.00000      0.00000      2.23750      0.00000     -1.10475 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.13910      0.00000      0.00000      0.00000      0.00000      0.00000      6.68451      0.00000 \n    -0.06357      0.09798      0.00000      0.00000      0.00000     -0.11087      0.00000      0.00000      0.00000     -0.05095      0.00000      0.00000      0.00000      0.03135      0.00000      0.00000      0.00000      0.02882      0.00000      0.00000      0.00000      0.36184      0.00000      0.00000      0.36186      0.00000     -0.70769     -1.10475      0.00000      0.00000     -1.10475      0.00000      2.23750 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1109.39700   -166.25330   -155.50740   -155.50740   -155.50740    -33.05678    -28.47497    -28.47497    -28.47497    -20.75137    -20.75137    -20.75137    -20.75137    -20.75137     -5.58404     -4.01823     -4.01823     -4.01823     -1.61852     -1.61852     -1.61852     -1.61852     -1.61852     -0.53717     -0.23206     -0.23206     -0.23206      0.20374      0.27614      0.27614      0.27614      3.30945    220.33180 \n   </alphaeps>\n   <betaeps>\n -1109.39500   -166.25200   -155.50570   -155.50570   -155.50570    -33.05490    -28.47282    -28.47282    -28.47282    -20.74934    -20.74934    -20.74934    -20.74934    -20.74934     -5.57967     -4.01345     -4.01345     -4.01345     -1.61132     -1.61132     -1.61132     -1.61132     -1.61132     -0.49832     -0.19278     -0.19278     -0.19278      0.22879      0.29989      0.29989      0.29989      3.32615    220.33380 \n   </betaeps>\n   <alphavectors>\n     0.97217     -0.34207      0.00000     -0.00000     -0.00000      0.14980     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.06824     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.02396     -0.00000     -0.00000      0.00000      0.02162      0.00000      0.00000      0.00000     -0.05086     -0.68272 \n     0.11472      1.02392     -0.00000      0.00000      0.00000     -0.53668      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.25887      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.08672      0.00000      0.00000     -0.00000     -0.02237     -0.00000     -0.00000     -0.00000      0.31207      3.90521 \n    -0.00000     -0.00000      0.00000     -0.00000      0.97651      0.00000     -0.00000     -0.46591     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.20364     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.05737      0.00000     -0.00000     -0.00000     -0.06549     -0.00000      0.00000 \n     0.00000      0.00000      0.97651     -0.00000     -0.00000     -0.00000     -0.46591      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.20364      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05737     -0.00000      0.00000     -0.00000     -0.06549     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.97651     -0.00000     -0.00000      0.00000     -0.00000     -0.46591      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.20364      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05737      0.00000      0.00000      0.00000     -0.06549     -0.00000     -0.00000     -0.00000 \n     0.25547      0.09760     -0.00000      0.00000      0.00000      1.11667     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.68365     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.26355     -0.00000     -0.00000      0.00000      0.36541     -0.00000      0.00000      0.00000     -0.26453     21.08242 \n    -0.00000     -0.00000      0.00000     -0.00000      0.05981     -0.00000      0.00000      1.06044      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.69236      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.20818     -0.00000      0.00000      0.00000      0.24137      0.00000     -0.00000 \n     0.00000      0.00000      0.05981      0.00000      0.00000      0.00000      1.06044     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.69236     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.20818      0.00000     -0.00000      0.00000      0.24137      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.05981      0.00000      0.00000     -0.00000      0.00000      1.06044     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.69236     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.20818     -0.00000     -0.00000     -0.00000      0.24137      0.00000     -0.00000     -0.00000 \n     0.03787     -0.05683      0.00000     -0.00000     -0.00000      0.16806     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.13287     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.51432      0.00000      0.00000     -0.00000      0.27551     -0.00000      0.00000      0.00000      9.46938     -1.21692 \n     0.00000      0.00000     -0.00000      0.00000     -0.01723     -0.00000      0.00000      0.04603     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.15447     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.46306      0.00000     -0.00000     -0.00000     -0.57994     -0.00000      0.00000 \n     0.00000     -0.00000     -0.01723      0.00000      0.00000      0.00000      0.04603      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.15447      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.46306     -0.00000      0.00000     -0.00000     -0.57994     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.01723      0.00000      0.00000     -0.00000      0.00000      0.04603      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.15447      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.46306      0.00000      0.00000      0.00000     -0.57994      0.00000      0.00000     -0.00000 \n     0.01172     -0.01596      0.00000     -0.00000     -0.00000      0.02866     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01945     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.62988     -0.00000     -0.00000      0.00000      1.93512     -0.00000      0.00000      0.00000      4.00290     -0.30637 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00726      0.00000     -0.00000     -0.01180      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.03785      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.62765     -0.00000      0.00000      0.00000      1.52497      0.00000     -0.00000 \n    -0.00000      0.00000      0.00726     -0.00000     -0.00000     -0.00000     -0.01180      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.03785      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.62765      0.00000     -0.00000      0.00000      1.52497      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00726     -0.00000     -0.00000      0.00000     -0.00000     -0.01180     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.03785     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.62765     -0.00000     -0.00000     -0.00000      1.52497      0.00000     -0.00000      0.00000 \n    -0.00361      0.00490     -0.00000      0.00000      0.00000     -0.00729      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00181      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.48031      0.00000     -0.00000      0.00000     -1.92860      0.00000     -0.00000     -0.00000     -1.36329      0.08882 \n     0.00000      0.00000     -0.00000      0.00000     -0.00334     -0.00000      0.00000      0.00513     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00731      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.52524      0.00000     -0.00000     -0.00000     -1.38450     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00334      0.00000      0.00000      0.00000      0.00513     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00731     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.52524      0.00000     -0.00000      0.00000     -1.38450     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00334      0.00000      0.00000     -0.00000      0.00000      0.00513      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00731      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.52524      0.00000      0.00000      0.00000     -1.38450      0.00000      0.00000     -0.00000 \n    -0.13447     -0.02130      0.00000     -0.00000     -0.00000     -0.01944      0.00000     -0.00000      0.00000     -0.48825     -0.00000      0.00000      0.84565      0.00000      0.01102      0.00000     -0.00000      0.00000      0.20036     -0.00000      0.00000     -0.34703     -0.00000     -0.00493      0.00000     -0.00000      0.00000     -0.01686     -0.00000      0.00000      0.00000     -0.02872    -10.24174 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.69131     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.69406      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.69131      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.69406     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.13447     -0.02130      0.00000     -0.00000     -0.00000     -0.01944      0.00000     -0.00000      0.00000      0.97648      0.00000     -0.00000      0.00001     -0.00000      0.01102     -0.00000      0.00000     -0.00000     -0.40072      0.00000     -0.00000     -0.00000     -0.00000     -0.00493      0.00000     -0.00000     -0.00000     -0.01686     -0.00000     -0.00000     -0.00000     -0.02872    -10.24174 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.69131     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.69406     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.13447     -0.02130      0.00000     -0.00000     -0.00000     -0.01944      0.00000     -0.00000      0.00000     -0.48823     -0.00000      0.00000     -0.84566      0.00000      0.01102      0.00000     -0.00000      0.00000      0.20036     -0.00000      0.00000      0.34703      0.00000     -0.00493     -0.00000      0.00000      0.00000     -0.01686      0.00000      0.00000      0.00000     -0.02872    -10.24174 \n    -0.01671      0.02358     -0.00000      0.00000      0.00000     -0.05415      0.00000     -0.00000      0.00000     -0.03358     -0.00000      0.00000      0.05817      0.00000      0.00052     -0.00000     -0.00000      0.00000     -0.52668      0.00000     -0.00000      0.91224      0.00000      0.01977     -0.00000      0.00000     -0.00000     -0.12312      0.00000     -0.00000     -0.00000     -4.67132      0.48138 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.11633     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.82448      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.11633     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.82448      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.01671      0.02358     -0.00000      0.00000      0.00000     -0.05415      0.00000     -0.00000      0.00000      0.06717      0.00000     -0.00000      0.00000     -0.00000      0.00052      0.00000      0.00000     -0.00000      1.05336     -0.00000      0.00000      0.00000      0.00000      0.01977     -0.00000      0.00000      0.00000     -0.12312      0.00000      0.00000      0.00000     -4.67132      0.48138 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.11633      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.82448     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.01671      0.02358     -0.00000      0.00000      0.00000     -0.05415      0.00000     -0.00000      0.00000     -0.03358     -0.00000      0.00000     -0.05817      0.00000      0.00052     -0.00000     -0.00000      0.00000     -0.52668      0.00000     -0.00000     -0.91224     -0.00000      0.01977      0.00000     -0.00000     -0.00000     -0.12312      0.00000     -0.00000     -0.00000     -4.67132      0.48138 \n   </alphavectors>\n   <betavectors>\n     0.97217     -0.34207      0.00000      0.00000     -0.00000      0.14980      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.06825     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.02412      0.00000     -0.00000      0.00000      0.02161     -0.00000      0.00000      0.00000     -0.05077     -0.68272 \n     0.11472      1.02392     -0.00000     -0.00000      0.00000     -0.53667     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.25887     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.08777      0.00000      0.00000     -0.00000     -0.02239      0.00000     -0.00000     -0.00000      0.31177      3.90521 \n     0.00000      0.00000     -0.00000      0.97651      0.00000      0.00000      0.00000     -0.46591      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.20373     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05621      0.00000      0.00000     -0.00000     -0.00000     -0.06618      0.00000     -0.00000 \n     0.00000      0.00000      0.97651     -0.00000      0.00000      0.00000     -0.46591     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.20373      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05621      0.00000      0.00000      0.00000     -0.06618     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.97651      0.00000      0.00000      0.00000     -0.46591     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.20373      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05621      0.00000      0.00000     -0.06618      0.00000      0.00000     -0.00000 \n     0.25546      0.09759     -0.00000     -0.00000      0.00000      1.11678      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.68381     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.26440      0.00000     -0.00000      0.00000      0.36514      0.00000      0.00000      0.00000     -0.26338     21.08241 \n     0.00000      0.00000     -0.00000      0.05981     -0.00000     -0.00000     -0.00000      1.06046     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.69270      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.20395     -0.00000     -0.00000      0.00000      0.00000      0.24391     -0.00000     -0.00000 \n    -0.00000      0.00000      0.05981      0.00000     -0.00000     -0.00000      1.06046      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.69270     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.20395     -0.00000     -0.00000     -0.00000      0.24391      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.05981     -0.00000     -0.00000     -0.00000      1.06046      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.69270     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.20395     -0.00000     -0.00000      0.24391     -0.00000      0.00000     -0.00000 \n     0.03787     -0.05682      0.00000      0.00000     -0.00000      0.16791      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.13168      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.54971     -0.00000      0.00000     -0.00000      0.27226     -0.00000      0.00000      0.00000      9.46763     -1.21696 \n    -0.00000     -0.00000      0.00000     -0.01723     -0.00000     -0.00000     -0.00000      0.04599      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.15530     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.45342      0.00000      0.00000     -0.00000     -0.00000     -0.58587      0.00000      0.00000 \n     0.00000     -0.00000     -0.01723      0.00000     -0.00000     -0.00000      0.04599     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.15530      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.45342      0.00000      0.00000      0.00000     -0.58587     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.01723     -0.00000     -0.00000     -0.00000      0.04599     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.15530      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.45342      0.00000      0.00000     -0.58587      0.00000     -0.00000      0.00000 \n     0.01172     -0.01595      0.00000      0.00000     -0.00000      0.02863      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.01801     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.61569      0.00000     -0.00000      0.00000      1.93315     -0.00000      0.00000      0.00000      4.00607     -0.30638 \n     0.00000      0.00000     -0.00000      0.00726      0.00000      0.00000      0.00000     -0.01178     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.03623      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.60528     -0.00000     -0.00000      0.00000      0.00000      1.53403     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00726     -0.00000      0.00000      0.00000     -0.01178     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.03623      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.60528     -0.00000     -0.00000     -0.00000      1.53403      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00726      0.00000      0.00000      0.00000     -0.01178     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.03623     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.60528     -0.00000     -0.00000      1.53403     -0.00000      0.00000     -0.00000 \n    -0.00361      0.00490     -0.00000     -0.00000      0.00000     -0.00728     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00138      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.48442     -0.00000     -0.00000      0.00000     -1.92832      0.00000     -0.00000     -0.00000     -1.36223      0.08882 \n    -0.00000     -0.00000      0.00000     -0.00334     -0.00000     -0.00000     -0.00000      0.00513      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00689     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.54546      0.00000      0.00000     -0.00000     -0.00000     -1.37666      0.00000      0.00000 \n     0.00000     -0.00000     -0.00334      0.00000     -0.00000     -0.00000      0.00513      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00689     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.54546     -0.00000     -0.00000     -0.00000     -1.37666     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00334     -0.00000     -0.00000     -0.00000      0.00513      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00689      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.54546      0.00000      0.00000     -1.37666      0.00000     -0.00000      0.00000 \n    -0.13447     -0.02129      0.00000      0.00000     -0.00000     -0.01948     -0.00000     -0.00000     -0.00000     -0.48825     -0.00000     -0.00000      0.84566      0.00000      0.01102      0.00000     -0.00000     -0.00000      0.20034      0.00000     -0.00000     -0.34700     -0.00000     -0.00483      0.00000      0.00000      0.00000     -0.01682      0.00000      0.00000     -0.00000     -0.02878    -10.24174 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.69134     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.69401      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.69134      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.69401     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.13447     -0.02129      0.00000      0.00000     -0.00000     -0.01948     -0.00000     -0.00000     -0.00000      0.97649      0.00000      0.00000      0.00001     -0.00000      0.01102     -0.00000      0.00000      0.00000     -0.40068     -0.00000      0.00000     -0.00000     -0.00000     -0.00483      0.00000      0.00000      0.00000     -0.01682     -0.00000     -0.00000      0.00000     -0.02878    -10.24174 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.69134      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.69401      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.13447     -0.02129      0.00000      0.00000     -0.00000     -0.01948     -0.00000     -0.00000     -0.00000     -0.48824     -0.00000     -0.00000     -0.84567      0.00000      0.01102      0.00000     -0.00000     -0.00000      0.20034      0.00000     -0.00000      0.34700      0.00000     -0.00483     -0.00000     -0.00000     -0.00000     -0.01682     -0.00000     -0.00000      0.00000     -0.02878    -10.24174 \n    -0.01671      0.02357     -0.00000     -0.00000      0.00000     -0.05409     -0.00000     -0.00000     -0.00000     -0.03357     -0.00000     -0.00000      0.05814      0.00000      0.00123     -0.00000     -0.00000      0.00000     -0.52669     -0.00000      0.00000      0.91224      0.00000      0.03754     -0.00000     -0.00000     -0.00000     -0.12124     -0.00000     -0.00000      0.00000     -4.67126      0.48140 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.11627     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.82448      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.11627     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.82448      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01671      0.02357     -0.00000     -0.00000      0.00000     -0.05409     -0.00000     -0.00000     -0.00000      0.06713      0.00000      0.00000      0.00000     -0.00000      0.00123      0.00000      0.00000     -0.00000      1.05337      0.00000     -0.00000      0.00000      0.00000      0.03754     -0.00000     -0.00000     -0.00000     -0.12124      0.00000      0.00000     -0.00000     -4.67126      0.48140 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.11627      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.82448      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01671      0.02357     -0.00000     -0.00000      0.00000     -0.05409     -0.00000     -0.00000     -0.00000     -0.03356     -0.00000     -0.00000     -0.05814      0.00000      0.00123     -0.00000     -0.00000      0.00000     -0.52668     -0.00000      0.00000     -0.91224     -0.00000      0.03754      0.00000      0.00000      0.00000     -0.12124      0.00000      0.00000     -0.00000     -4.67126      0.48140 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"I\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.18022     -0.68137      0.00000      0.00000      0.00000      0.87217      0.00000      0.00000      0.00000     -0.02164      0.00000      0.00000      0.00000      0.06812      0.00000      0.00000      0.00000      0.01512      0.00000      0.00000      0.00000     -0.25153      0.00000      0.00000     -0.25153      0.00000     -0.25153     -0.06487      0.00000      0.00000     -0.06487      0.00000     -0.06487 \n    -0.68137      2.87678      0.00000      0.00000      0.00000     -1.33115      0.00000      0.00000      0.00000      0.39306      0.00000      0.00000      0.00000     -0.16030      0.00000      0.00000      0.00000     -0.07999      0.00000      0.00000      0.00000     -0.06610      0.00000      0.00000     -0.06610      0.00000     -0.06610      0.10619      0.00000      0.00000      0.10619      0.00000      0.10619 \n     0.00000      0.00000      2.43339      0.00000      0.00000      0.00000     -1.18660      0.00000      0.00000      0.00000      0.45303      0.00000      0.00000      0.00000     -0.02011      0.00000      0.00000      0.00000     -0.07101      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.43339      0.00000      0.00000      0.00000     -1.18660      0.00000      0.00000      0.00000      0.45303      0.00000      0.00000      0.00000     -0.02011      0.00000      0.00000      0.00000     -0.07101      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.43339      0.00000      0.00000      0.00000     -1.18660      0.00000      0.00000      0.00000      0.45303      0.00000      0.00000      0.00000     -0.02011      0.00000      0.00000      0.00000     -0.07101      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.87217     -1.33115      0.00000      0.00000      0.00000      3.73350      0.00000      0.00000      0.00000     -1.50029      0.00000      0.00000      0.00000      0.36630      0.00000      0.00000      0.00000      0.27761      0.00000      0.00000      0.00000     -0.12579      0.00000      0.00000     -0.12579      0.00000     -0.12579     -0.11121      0.00000      0.00000     -0.11121      0.00000     -0.11121 \n     0.00000      0.00000     -1.18660      0.00000      0.00000      0.00000      3.33945      0.00000      0.00000      0.00000     -1.73241      0.00000      0.00000      0.00000      0.15391      0.00000      0.00000      0.00000      0.22424      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.18660      0.00000      0.00000      0.00000      3.33945      0.00000      0.00000      0.00000     -1.73241      0.00000      0.00000      0.00000      0.15391      0.00000      0.00000      0.00000      0.22424      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.18660      0.00000      0.00000      0.00000      3.33945      0.00000      0.00000      0.00000     -1.73241      0.00000      0.00000      0.00000      0.15391      0.00000      0.00000      0.00000      0.22424      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02164      0.39306      0.00000      0.00000      0.00000     -1.50029      0.00000      0.00000      0.00000      3.27225      0.00000      0.00000      0.00000     -0.60597      0.00000      0.00000      0.00000     -0.58459      0.00000      0.00000      0.00000      0.01607      0.00000      0.00000      0.01607      0.00000      0.01607     -0.05199      0.00000      0.00000     -0.05199      0.00000     -0.05199 \n     0.00000      0.00000      0.45303      0.00000      0.00000      0.00000     -1.73241      0.00000      0.00000      0.00000      3.11427      0.00000      0.00000      0.00000     -0.42858      0.00000      0.00000      0.00000     -0.46822      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.45303      0.00000      0.00000      0.00000     -1.73241      0.00000      0.00000      0.00000      3.11427      0.00000      0.00000      0.00000     -0.42858      0.00000      0.00000      0.00000     -0.46822      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.45303      0.00000      0.00000      0.00000     -1.73241      0.00000      0.00000      0.00000      3.11427      0.00000      0.00000      0.00000     -0.42858      0.00000      0.00000      0.00000     -0.46822      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06812     -0.16030      0.00000      0.00000      0.00000      0.36630      0.00000      0.00000      0.00000     -0.60597      0.00000      0.00000      0.00000      0.71176      0.00000      0.00000      0.00000      0.61822      0.00000      0.00000      0.00000     -0.00797      0.00000      0.00000     -0.00797      0.00000     -0.00797      0.02871      0.00000      0.00000      0.02871      0.00000      0.02871 \n     0.00000      0.00000     -0.02011      0.00000      0.00000      0.00000      0.15391      0.00000      0.00000      0.00000     -0.42858      0.00000      0.00000      0.00000      0.64449      0.00000      0.00000      0.00000      0.56099      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.02011      0.00000      0.00000      0.00000      0.15391      0.00000      0.00000      0.00000     -0.42858      0.00000      0.00000      0.00000      0.64449      0.00000      0.00000      0.00000      0.56099      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02011      0.00000      0.00000      0.00000      0.15391      0.00000      0.00000      0.00000     -0.42858      0.00000      0.00000      0.00000      0.64449      0.00000      0.00000      0.00000      0.56099      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01512     -0.07999      0.00000      0.00000      0.00000      0.27761      0.00000      0.00000      0.00000     -0.58459      0.00000      0.00000      0.00000      0.61822      0.00000      0.00000      0.00000      0.54052      0.00000      0.00000      0.00000     -0.00410      0.00000      0.00000     -0.00410      0.00000     -0.00410      0.02980      0.00000      0.00000      0.02980      0.00000      0.02980 \n     0.00000      0.00000     -0.07101      0.00000      0.00000      0.00000      0.22424      0.00000      0.00000      0.00000     -0.46822      0.00000      0.00000      0.00000      0.56099      0.00000      0.00000      0.00000      0.49247      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07101      0.00000      0.00000      0.00000      0.22424      0.00000      0.00000      0.00000     -0.46822      0.00000      0.00000      0.00000      0.56099      0.00000      0.00000      0.00000      0.49247      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07101      0.00000      0.00000      0.00000      0.22424      0.00000      0.00000      0.00000     -0.46822      0.00000      0.00000      0.00000      0.56099      0.00000      0.00000      0.00000      0.49247      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.25153     -0.06610      0.00000      0.00000      0.00000     -0.12579      0.00000      0.00000      0.00000      0.01607      0.00000      0.00000      0.00000     -0.00797      0.00000      0.00000      0.00000     -0.00410      0.00000      0.00000      0.00000      2.28092      0.00000      0.00000     -1.08168      0.00000     -1.08167     -0.73181      0.00000      0.00000      0.37240      0.00000      0.37239 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.72522      0.00000      0.00000      0.00000      0.00000      0.00000     -2.20842      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.72522      0.00000      0.00000      0.00000      0.00000      0.00000     -2.20842      0.00000      0.00000      0.00000 \n    -0.25153     -0.06610      0.00000      0.00000      0.00000     -0.12579      0.00000      0.00000      0.00000      0.01607      0.00000      0.00000      0.00000     -0.00797      0.00000      0.00000      0.00000     -0.00410      0.00000      0.00000      0.00000     -1.08168      0.00000      0.00000      2.28092      0.00000     -1.08167      0.37240      0.00000      0.00000     -0.73181      0.00000      0.37239 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.72522      0.00000      0.00000      0.00000      0.00000      0.00000     -2.20842      0.00000 \n    -0.25153     -0.06610      0.00000      0.00000      0.00000     -0.12579      0.00000      0.00000      0.00000      0.01607      0.00000      0.00000      0.00000     -0.00797      0.00000      0.00000      0.00000     -0.00410      0.00000      0.00000      0.00000     -1.08167      0.00000      0.00000     -1.08167      0.00000      2.28092      0.37240      0.00000      0.00000      0.37240      0.00000     -0.73182 \n    -0.06487      0.10619      0.00000      0.00000      0.00000     -0.11121      0.00000      0.00000      0.00000     -0.05199      0.00000      0.00000      0.00000      0.02871      0.00000      0.00000      0.00000      0.02980      0.00000      0.00000      0.00000     -0.73181      0.00000      0.00000      0.37240      0.00000      0.37240      2.25134      0.00000      0.00000     -1.11123      0.00000     -1.11125 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.20842      0.00000      0.00000      0.00000      0.00000      0.00000      6.72521      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.20842      0.00000      0.00000      0.00000      0.00000      0.00000      6.72521      0.00000      0.00000      0.00000 \n    -0.06487      0.10619      0.00000      0.00000      0.00000     -0.11121      0.00000      0.00000      0.00000     -0.05199      0.00000      0.00000      0.00000      0.02871      0.00000      0.00000      0.00000      0.02980      0.00000      0.00000      0.00000      0.37240      0.00000      0.00000     -0.73181      0.00000      0.37240     -1.11123      0.00000      0.00000      2.25134      0.00000     -1.11125 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.20842      0.00000      0.00000      0.00000      0.00000      0.00000      6.72521      0.00000 \n    -0.06487      0.10619      0.00000      0.00000      0.00000     -0.11121      0.00000      0.00000      0.00000     -0.05199      0.00000      0.00000      0.00000      0.02871      0.00000      0.00000      0.00000      0.02980      0.00000      0.00000      0.00000      0.37239      0.00000      0.00000      0.37239      0.00000     -0.73182     -1.11125      0.00000      0.00000     -1.11125      0.00000      2.25136 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66667      0.66667      0.66667      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1155.11700   -174.28340   -163.23030   -163.23030   -163.23030    -35.17444    -30.41787    -30.41787    -30.41787    -22.48104    -22.48104    -22.48104    -22.48104    -22.48104     -6.13647     -4.48455     -4.48455     -4.48455     -1.95718     -1.95718     -1.95718     -1.95718     -1.95718     -0.60614     -0.26346     -0.26346     -0.26346      0.27176      0.34733      0.34733      0.34733      3.89751    225.24840 \n   </alphaeps>\n   <betaeps>\n -1155.11600   -174.28260   -163.22930   -163.22930   -163.22930    -35.17331    -30.41657    -30.41657    -30.41657    -22.47982    -22.47982    -22.47982    -22.47982    -22.47982     -6.13391     -4.48177     -4.48177     -4.48177     -1.95326     -1.95326     -1.95326     -1.95326     -1.95326     -0.58668     -0.24407     -0.24407     -0.24407      0.28418      0.35913      0.35913      0.35913      3.90567    225.24960 \n   </betaeps>\n   <alphavectors>\n     0.97184     -0.34275     -0.00000      0.00000      0.00000      0.15072      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.06928     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02535      0.00000     -0.00000      0.00000      0.02390      0.00000      0.00000      0.00000     -0.05050     -0.68501 \n     0.11667      1.02706      0.00000     -0.00000     -0.00000     -0.54072     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.26290     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.09160     -0.00000      0.00000     -0.00000     -0.01939     -0.00000     -0.00000     -0.00000      0.33792      3.92652 \n     0.00000      0.00000      0.00000     -0.00000      0.97567      0.00000     -0.00000      0.00000     -0.46752      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.20733     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.06208      0.00000      0.00000      0.00000     -0.07165     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.97567     -0.00000     -0.00000     -0.00000     -0.46752      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.20733      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06208     -0.00000     -0.00000     -0.00000     -0.07165      0.00000      0.00000 \n     0.00000     -0.00000      0.97567     -0.00000     -0.00000      0.00000     -0.46752      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.20733      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.06208      0.00000      0.00000     -0.00000     -0.07165     -0.00000      0.00000      0.00000     -0.00000 \n     0.25841      0.10890      0.00000     -0.00000     -0.00000      1.10960     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.69199     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.27913      0.00000     -0.00000      0.00000      0.41348      0.00000      0.00000      0.00000     -0.19807     20.82637 \n     0.00000      0.00000      0.00000     -0.00000      0.06209     -0.00000      0.00000     -0.00000      1.06046     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.70618      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.22653     -0.00000     -0.00000     -0.00000      0.26614      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.06209      0.00000      0.00000      0.00000      1.06046     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.70618     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.22653      0.00000      0.00000      0.00000      0.26614     -0.00000     -0.00000 \n     0.00000     -0.00000      0.06209     -0.00000     -0.00000     -0.00000      1.06046     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.70618     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.22653     -0.00000     -0.00000      0.00000      0.26614      0.00000     -0.00000     -0.00000     -0.00000 \n     0.03556     -0.06347     -0.00000      0.00000      0.00000      0.17080      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.13680     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.54829     -0.00000      0.00000     -0.00000      0.37760     -0.00000     -0.00000     -0.00000     11.07578     -2.06038 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.01893     -0.00000      0.00000     -0.00000      0.04574      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.15990     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.50235      0.00000      0.00000      0.00000     -0.64267      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.01893      0.00000      0.00000      0.00000      0.04574      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.15990      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.50235     -0.00000     -0.00000     -0.00000     -0.64267      0.00000     -0.00000 \n    -0.00000      0.00000     -0.01893      0.00000      0.00000     -0.00000      0.04574     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.15990      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.50235      0.00000      0.00000      0.00000     -0.64267     -0.00000      0.00000     -0.00000      0.00000 \n     0.01076     -0.01699     -0.00000      0.00000      0.00000      0.02683     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.02019     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.59899      0.00000     -0.00000      0.00000      1.99648     -0.00000      0.00000      0.00000      4.34643     -0.50861 \n     0.00000      0.00000      0.00000     -0.00000      0.00843      0.00000     -0.00000      0.00000     -0.01205     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.03929      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.62403     -0.00000     -0.00000     -0.00000      1.57806      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00843     -0.00000     -0.00000     -0.00000     -0.01205      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.03929     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.62403      0.00000      0.00000      0.00000      1.57806     -0.00000      0.00000 \n     0.00000     -0.00000      0.00843     -0.00000     -0.00000      0.00000     -0.01205      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.03929      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.62403     -0.00000     -0.00000     -0.00000      1.57806      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00318      0.00496      0.00000     -0.00000     -0.00000     -0.00613      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00126      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.51840     -0.00000      0.00000     -0.00000     -1.96724      0.00000     -0.00000      0.00000     -1.42506      0.14038 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00381     -0.00000      0.00000     -0.00000      0.00511      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00676      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.54005      0.00000      0.00000      0.00000     -1.39604     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00381      0.00000      0.00000      0.00000      0.00511     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00676     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.54005     -0.00000     -0.00000     -0.00000     -1.39604     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00381      0.00000      0.00000     -0.00000      0.00511     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00676     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.54005     -0.00000     -0.00000     -0.00000     -1.39604     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.13598     -0.02757     -0.00000      0.00000      0.00000     -0.01503      0.00000      0.00000     -0.00000     -0.48772     -0.00000      0.00000      0.84476      0.00000      0.00976      0.00000      0.00000     -0.00000      0.20577     -0.00000      0.00000     -0.35641      0.00000      0.00470     -0.00000     -0.00000      0.00000     -0.01886      0.00000      0.00000      0.00000     -0.03736    -10.11371 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.68953      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.71281     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.68953      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.71281     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.13598     -0.02757     -0.00000      0.00000      0.00000     -0.01503     -0.00000      0.00000     -0.00000     -0.48772     -0.00000      0.00000     -0.84476      0.00000      0.00976     -0.00000      0.00000     -0.00000      0.20577     -0.00000      0.00000      0.35641     -0.00000      0.00470     -0.00000     -0.00000      0.00000     -0.01886     -0.00000      0.00000      0.00000     -0.03736    -10.11371 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.68953      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.71281      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.13598     -0.02757     -0.00000      0.00000      0.00000     -0.01503     -0.00000      0.00000     -0.00000      0.97545      0.00000     -0.00000     -0.00000     -0.00000      0.00976     -0.00000     -0.00000      0.00000     -0.41154      0.00000     -0.00000      0.00000     -0.00000      0.00470      0.00000      0.00000     -0.00000     -0.01886     -0.00000     -0.00000     -0.00000     -0.03736    -10.11371 \n    -0.01606      0.02662      0.00000     -0.00000     -0.00000     -0.05533     -0.00000      0.00000     -0.00000     -0.03420     -0.00000      0.00000      0.05924      0.00000      0.00078     -0.00000      0.00000     -0.00000     -0.52825      0.00000     -0.00000      0.91495     -0.00000     -0.02333      0.00000      0.00000     -0.00000     -0.15768     -0.00000     -0.00000     -0.00000     -5.41527      0.83758 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.11848     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.82991      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11848     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.82991     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.01606      0.02662      0.00000     -0.00000     -0.00000     -0.05533     -0.00000      0.00000     -0.00000     -0.03420     -0.00000      0.00000     -0.05924      0.00000      0.00078      0.00000      0.00000     -0.00000     -0.52825      0.00000     -0.00000     -0.91495      0.00000     -0.02333      0.00000      0.00000     -0.00000     -0.15768      0.00000     -0.00000     -0.00000     -5.41527      0.83758 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.11848      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.82991      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01606      0.02662      0.00000     -0.00000     -0.00000     -0.05533      0.00000      0.00000     -0.00000      0.06840      0.00000     -0.00000     -0.00000     -0.00000      0.00078      0.00000     -0.00000      0.00000      1.05650     -0.00000      0.00000     -0.00000      0.00000     -0.02333     -0.00000     -0.00000      0.00000     -0.15768      0.00000      0.00000      0.00000     -5.41527      0.83758 \n   </alphavectors>\n   <betavectors>\n     0.97184     -0.34275     -0.00000      0.00000      0.00000      0.15072      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.06929     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.02541      0.00000      0.00000     -0.00000      0.02391     -0.00000     -0.00000     -0.00000     -0.05046     -0.68501 \n     0.11667      1.02706      0.00000     -0.00000     -0.00000     -0.54072     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.26289      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.09205     -0.00000     -0.00000      0.00000     -0.01945      0.00000      0.00000      0.00000      0.33780      3.92653 \n    -0.00000      0.00000      0.00000      0.97567     -0.00000      0.00000     -0.00000      0.00000     -0.46753      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.20738      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06154      0.00000     -0.00000      0.00000     -0.07196     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.97567      0.00000     -0.00000     -0.46753      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.20738     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.06154     -0.00000     -0.00000     -0.00000     -0.07196      0.00000      0.00000 \n     0.00000     -0.00000      0.97567     -0.00000     -0.00000      0.00000     -0.46753      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.20738     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.06154     -0.00000      0.00000      0.00000     -0.07196     -0.00000      0.00000     -0.00000     -0.00000 \n     0.25841      0.10889      0.00000     -0.00000     -0.00000      1.10966      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.69209      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.27914     -0.00000      0.00000     -0.00000      0.41347      0.00000     -0.00000     -0.00000     -0.19754     20.82637 \n    -0.00000      0.00000      0.00000      0.06209      0.00000     -0.00000      0.00000     -0.00000      1.06047     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.70636     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.22456     -0.00000      0.00000     -0.00000      0.26729      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.06209     -0.00000      0.00000      1.06047     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.70636      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22456      0.00000      0.00000      0.00000      0.26729     -0.00000      0.00000 \n    -0.00000     -0.00000      0.06209      0.00000      0.00000     -0.00000      1.06047     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.70636      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.22456      0.00000     -0.00000     -0.00000      0.26729      0.00000     -0.00000      0.00000      0.00000 \n     0.03556     -0.06347     -0.00000      0.00000      0.00000      0.17071      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.13598     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.56565      0.00000     -0.00000      0.00000      0.37532     -0.00000      0.00000     -0.00000     11.07506     -2.06040 \n     0.00000     -0.00000     -0.00000     -0.01893      0.00000     -0.00000      0.00000     -0.00000      0.04572      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.16035      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.49785      0.00000     -0.00000      0.00000     -0.64536     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.01893     -0.00000      0.00000      0.04572      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.16035     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.49785     -0.00000     -0.00000     -0.00000     -0.64536      0.00000     -0.00000 \n    -0.00000      0.00000     -0.01893      0.00000      0.00000     -0.00000      0.04572     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.16035     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.49785     -0.00000      0.00000     -0.00000     -0.64536     -0.00000      0.00000     -0.00000      0.00000 \n     0.01076     -0.01699     -0.00000      0.00000      0.00000      0.02680      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.01940     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.59156     -0.00000      0.00000     -0.00000      1.99575     -0.00000     -0.00000     -0.00000      4.34779     -0.50862 \n    -0.00000      0.00000      0.00000      0.00843     -0.00000      0.00000     -0.00000      0.00000     -0.01204      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.03848     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.61435     -0.00000      0.00000     -0.00000      1.58188      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00843      0.00000     -0.00000     -0.01204     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.03848      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.61435      0.00000      0.00000      0.00000      1.58188     -0.00000      0.00000 \n     0.00000     -0.00000      0.00843     -0.00000     -0.00000      0.00000     -0.01204      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03848     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.61435      0.00000     -0.00000      0.00000      1.58188      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00318      0.00496      0.00000     -0.00000     -0.00000     -0.00612     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00103      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.52119      0.00000      0.00000      0.00000     -1.96680      0.00000      0.00000      0.00000     -1.42464      0.14038 \n     0.00000     -0.00000     -0.00000     -0.00381      0.00000     -0.00000      0.00000     -0.00000      0.00511     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00656     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.54861      0.00000     -0.00000      0.00000     -1.39270      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00381     -0.00000      0.00000      0.00511      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00656      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.54861     -0.00000     -0.00000     -0.00000     -1.39270     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00381      0.00000      0.00000     -0.00000      0.00511     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00656      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.54861      0.00000     -0.00000      0.00000     -1.39270     -0.00000      0.00000     -0.00000      0.00000 \n    -0.13598     -0.02757     -0.00000      0.00000      0.00000     -0.01506      0.00000     -0.00000     -0.00000     -0.48773     -0.00000     -0.00000      0.84477     -0.00000      0.00976     -0.00000      0.00000     -0.00000      0.20576      0.00000     -0.00000     -0.35639     -0.00000      0.00464      0.00000      0.00000     -0.00000     -0.01884     -0.00000     -0.00000      0.00000     -0.03740    -10.11371 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.68954      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.71279     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.68954     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.71279      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.13598     -0.02757     -0.00000      0.00000      0.00000     -0.01506     -0.00000     -0.00000     -0.00000     -0.48773     -0.00000     -0.00000     -0.84477     -0.00000      0.00976      0.00000      0.00000     -0.00000      0.20576      0.00000     -0.00000      0.35639      0.00000      0.00464     -0.00000      0.00000     -0.00000     -0.01884      0.00000     -0.00000     -0.00000     -0.03740    -10.11371 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.68954     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.71279     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.13598     -0.02757     -0.00000      0.00000      0.00000     -0.01506      0.00000     -0.00000     -0.00000      0.97545      0.00000      0.00000     -0.00000      0.00000      0.00976     -0.00000     -0.00000      0.00000     -0.41153     -0.00000      0.00000      0.00000      0.00000      0.00464      0.00000     -0.00000      0.00000     -0.01884     -0.00000      0.00000      0.00000     -0.03740    -10.11371 \n    -0.01606      0.02661      0.00000     -0.00000     -0.00000     -0.05529      0.00000     -0.00000     -0.00000     -0.03419     -0.00000     -0.00000      0.05922     -0.00000      0.00124      0.00000     -0.00000     -0.00000     -0.52825     -0.00000      0.00000      0.91495      0.00000     -0.03197     -0.00000     -0.00000      0.00000     -0.15656      0.00000      0.00000     -0.00000     -5.41526      0.83759 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.11845      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.82991      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11845      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.82991      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.01606      0.02661      0.00000     -0.00000     -0.00000     -0.05529     -0.00000     -0.00000     -0.00000     -0.03419     -0.00000     -0.00000     -0.05922     -0.00000      0.00124     -0.00000     -0.00000      0.00000     -0.52825     -0.00000      0.00000     -0.91495     -0.00000     -0.03197      0.00000     -0.00000      0.00000     -0.15656     -0.00000      0.00000      0.00000     -5.41526      0.83759 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.11845     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.82991     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01606      0.02661      0.00000     -0.00000     -0.00000     -0.05529     -0.00000     -0.00000     -0.00000      0.06839      0.00000      0.00000     -0.00000      0.00000      0.00124     -0.00000     -0.00000      0.00000      1.05650      0.00000     -0.00000     -0.00000     -0.00000     -0.03197     -0.00000      0.00000     -0.00000     -0.15656      0.00000     -0.00000     -0.00000     -5.41526      0.83759 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Xe\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.18135     -0.68526      0.00000      0.00000      0.00000      0.87330      0.00000      0.00000      0.00000     -0.02771      0.00000      0.00000      0.00000      0.06678      0.00000      0.00000      0.00000      0.01850      0.00000      0.00000      0.00000     -0.24843      0.00000      0.00000     -0.24843      0.00000     -0.24843     -0.06520      0.00000      0.00000     -0.06520      0.00000     -0.06520 \n    -0.68526      2.89594      0.00000      0.00000      0.00000     -1.33761      0.00000      0.00000      0.00000      0.38307      0.00000      0.00000      0.00000     -0.16578      0.00000      0.00000      0.00000     -0.08699      0.00000      0.00000      0.00000     -0.07568      0.00000      0.00000     -0.07568      0.00000     -0.07568      0.11901      0.00000      0.00000      0.11901      0.00000      0.11901 \n     0.00000      0.00000      2.44193      0.00000      0.00000      0.00000     -1.20953      0.00000      0.00000      0.00000      0.48085      0.00000      0.00000      0.00000     -0.03795      0.00000      0.00000      0.00000     -0.08680      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.44193      0.00000      0.00000      0.00000     -1.20953      0.00000      0.00000      0.00000      0.48085      0.00000      0.00000      0.00000     -0.03795      0.00000      0.00000      0.00000     -0.08680      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.44193      0.00000      0.00000      0.00000     -1.20953      0.00000      0.00000      0.00000      0.48085      0.00000      0.00000      0.00000     -0.03795      0.00000      0.00000      0.00000     -0.08680      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.87330     -1.33761      0.00000      0.00000      0.00000      3.77328      0.00000      0.00000      0.00000     -1.55605      0.00000      0.00000      0.00000      0.37705      0.00000      0.00000      0.00000      0.30755      0.00000      0.00000      0.00000     -0.12159      0.00000      0.00000     -0.12159      0.00000     -0.12159     -0.11545      0.00000      0.00000     -0.11545      0.00000     -0.11545 \n     0.00000      0.00000     -1.20953      0.00000      0.00000      0.00000      3.40748      0.00000      0.00000      0.00000     -1.83766      0.00000      0.00000      0.00000      0.22603      0.00000      0.00000      0.00000      0.27990      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.20953      0.00000      0.00000      0.00000      3.40748      0.00000      0.00000      0.00000     -1.83766      0.00000      0.00000      0.00000      0.22603      0.00000      0.00000      0.00000      0.27990      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.20953      0.00000      0.00000      0.00000      3.40748      0.00000      0.00000      0.00000     -1.83766      0.00000      0.00000      0.00000      0.22603      0.00000      0.00000      0.00000      0.27990      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02771      0.38307      0.00000      0.00000      0.00000     -1.55605      0.00000      0.00000      0.00000      3.28930      0.00000      0.00000      0.00000     -0.62020      0.00000      0.00000      0.00000     -0.62025      0.00000      0.00000      0.00000      0.01925      0.00000      0.00000      0.01925      0.00000      0.01925     -0.03989      0.00000      0.00000     -0.03989      0.00000     -0.03989 \n     0.00000      0.00000      0.48085      0.00000      0.00000      0.00000     -1.83766      0.00000      0.00000      0.00000      3.29518      0.00000      0.00000      0.00000     -0.58982      0.00000      0.00000      0.00000     -0.59143      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.48085      0.00000      0.00000      0.00000     -1.83766      0.00000      0.00000      0.00000      3.29518      0.00000      0.00000      0.00000     -0.58982      0.00000      0.00000      0.00000     -0.59143      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.48085      0.00000      0.00000      0.00000     -1.83766      0.00000      0.00000      0.00000      3.29518      0.00000      0.00000      0.00000     -0.58982      0.00000      0.00000      0.00000     -0.59143      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06678     -0.16578      0.00000      0.00000      0.00000      0.37705      0.00000      0.00000      0.00000     -0.62020      0.00000      0.00000      0.00000      0.68299      0.00000      0.00000      0.00000      0.62993      0.00000      0.00000      0.00000     -0.00737      0.00000      0.00000     -0.00737      0.00000     -0.00737      0.02565      0.00000      0.00000      0.02565      0.00000      0.02565 \n     0.00000      0.00000     -0.03795      0.00000      0.00000      0.00000      0.22603      0.00000      0.00000      0.00000     -0.58982      0.00000      0.00000      0.00000      0.79993      0.00000      0.00000      0.00000      0.68392      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.03795      0.00000      0.00000      0.00000      0.22603      0.00000      0.00000      0.00000     -0.58982      0.00000      0.00000      0.00000      0.79993      0.00000      0.00000      0.00000      0.68392      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.03795      0.00000      0.00000      0.00000      0.22603      0.00000      0.00000      0.00000     -0.58982      0.00000      0.00000      0.00000      0.79993      0.00000      0.00000      0.00000      0.68392      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01850     -0.08699      0.00000      0.00000      0.00000      0.30755      0.00000      0.00000      0.00000     -0.62025      0.00000      0.00000      0.00000      0.62993      0.00000      0.00000      0.00000      0.58419      0.00000      0.00000      0.00000     -0.00481      0.00000      0.00000     -0.00481      0.00000     -0.00481      0.02838      0.00000      0.00000      0.02838      0.00000      0.02838 \n     0.00000      0.00000     -0.08680      0.00000      0.00000      0.00000      0.27990      0.00000      0.00000      0.00000     -0.59143      0.00000      0.00000      0.00000      0.68392      0.00000      0.00000      0.00000      0.58828      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.08680      0.00000      0.00000      0.00000      0.27990      0.00000      0.00000      0.00000     -0.59143      0.00000      0.00000      0.00000      0.68392      0.00000      0.00000      0.00000      0.58828      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.08680      0.00000      0.00000      0.00000      0.27990      0.00000      0.00000      0.00000     -0.59143      0.00000      0.00000      0.00000      0.68392      0.00000      0.00000      0.00000      0.58828      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.24843     -0.07568      0.00000      0.00000      0.00000     -0.12159      0.00000      0.00000      0.00000      0.01925      0.00000      0.00000      0.00000     -0.00737      0.00000      0.00000      0.00000     -0.00481      0.00000      0.00000      0.00000      2.29692      0.00000      0.00000     -1.08934      0.00000     -1.08935     -0.75926      0.00000      0.00000      0.38441      0.00000      0.38441 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.77253      0.00000      0.00000      0.00000      0.00000      0.00000     -2.28731      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.77253      0.00000      0.00000      0.00000      0.00000      0.00000     -2.28731      0.00000      0.00000      0.00000 \n    -0.24843     -0.07568      0.00000      0.00000      0.00000     -0.12159      0.00000      0.00000      0.00000      0.01925      0.00000      0.00000      0.00000     -0.00737      0.00000      0.00000      0.00000     -0.00481      0.00000      0.00000      0.00000     -1.08934      0.00000      0.00000      2.29692      0.00000     -1.08935      0.38442      0.00000      0.00000     -0.75926      0.00000      0.38443 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.77253      0.00000      0.00000      0.00000      0.00000      0.00000     -2.28731      0.00000 \n    -0.24843     -0.07568      0.00000      0.00000      0.00000     -0.12159      0.00000      0.00000      0.00000      0.01925      0.00000      0.00000      0.00000     -0.00737      0.00000      0.00000      0.00000     -0.00481      0.00000      0.00000      0.00000     -1.08935      0.00000      0.00000     -1.08935      0.00000      2.29692      0.38442      0.00000      0.00000      0.38441      0.00000     -0.75925 \n    -0.06520      0.11901      0.00000      0.00000      0.00000     -0.11545      0.00000      0.00000      0.00000     -0.03989      0.00000      0.00000      0.00000      0.02565      0.00000      0.00000      0.00000      0.02838      0.00000      0.00000      0.00000     -0.75926      0.00000      0.00000      0.38442      0.00000      0.38442      2.26730      0.00000      0.00000     -1.11898      0.00000     -1.11897 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.28731      0.00000      0.00000      0.00000      0.00000      0.00000      6.77250      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.28731      0.00000      0.00000      0.00000      0.00000      0.00000      6.77250      0.00000      0.00000      0.00000 \n    -0.06520      0.11901      0.00000      0.00000      0.00000     -0.11545      0.00000      0.00000      0.00000     -0.03989      0.00000      0.00000      0.00000      0.02565      0.00000      0.00000      0.00000      0.02838      0.00000      0.00000      0.00000      0.38441      0.00000      0.00000     -0.75926      0.00000      0.38441     -1.11898      0.00000      0.00000      2.26727      0.00000     -1.11898 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.28731      0.00000      0.00000      0.00000      0.00000      0.00000      6.77250      0.00000 \n    -0.06520      0.11901      0.00000      0.00000      0.00000     -0.11545      0.00000      0.00000      0.00000     -0.03989      0.00000      0.00000      0.00000      0.02565      0.00000      0.00000      0.00000      0.02838      0.00000      0.00000      0.00000      0.38441      0.00000      0.00000      0.38443      0.00000     -0.75925     -1.11897      0.00000      0.00000     -1.11898      0.00000      2.26727 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1201.78100   -182.51300   -171.17270   -171.17270   -171.17270    -37.35112    -32.43954    -32.43954    -32.43954    -24.26568    -24.26568    -24.26568    -24.26568    -24.26568     -6.70582     -4.97436     -4.97436     -4.97436     -2.31207     -2.31207     -2.31207     -2.31207     -2.31207     -0.67280     -0.29341     -0.29341     -0.29341      0.34042      0.41571      0.41571      0.41571      4.60527    229.30520 \n   </alphaeps>\n   <betaeps>\n -1201.78100   -182.51300   -171.17270   -171.17270   -171.17270    -37.35112    -32.43954    -32.43954    -32.43954    -24.26568    -24.26568    -24.26568    -24.26568    -24.26568     -6.70582     -4.97436     -4.97436     -4.97436     -2.31207     -2.31207     -2.31207     -2.31207     -2.31207     -0.67280     -0.29341     -0.29341     -0.29341      0.34042      0.41571      0.41571      0.41571      4.60527    229.30520 \n   </betaeps>\n   <alphavectors>\n     0.97164     -0.34342     -0.00000     -0.00000     -0.00000      0.15163      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.07035     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02667     -0.00000     -0.00000      0.00000      0.02604      0.00000      0.00000     -0.00000     -0.04975     -0.68568 \n     0.11773      1.02854      0.00000      0.00000      0.00000     -0.54413     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.26651      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.09545      0.00000      0.00000     -0.00000     -0.01549     -0.00000     -0.00000      0.00000      0.36301      3.92829 \n     0.00000     -0.00000     -0.00000      0.97523     -0.00000     -0.00000     -0.00000     -0.00000     -0.47006     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21114     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.06601      0.00000     -0.07595      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.97523      0.00000      0.00000      0.00000      0.00000     -0.47006     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.21114      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.06601     -0.00000     -0.00000      0.00000      0.00000     -0.07595      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.97523      0.00000     -0.47006      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.21114      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.06601     -0.00000     -0.00000      0.00000      0.00000     -0.07595      0.00000      0.00000     -0.00000 \n     0.25841      0.11524      0.00000      0.00000      0.00000      1.10639      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.70347     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.29600     -0.00000     -0.00000      0.00000      0.46304      0.00000      0.00000     -0.00000     -0.07781     20.52416 \n     0.00000     -0.00000     -0.00000      0.06310      0.00000      0.00000      0.00000      0.00000      1.06099      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.71821      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.24131     -0.00000      0.28305      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.06310     -0.00000     -0.00000     -0.00000     -0.00000      1.06099      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.71821     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.24131      0.00000      0.00000     -0.00000     -0.00000      0.28305      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.06310     -0.00000      1.06099     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.71821     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.24131      0.00000      0.00000     -0.00000     -0.00000      0.28305      0.00000      0.00000      0.00000 \n     0.03080     -0.07371     -0.00000     -0.00000     -0.00000      0.17020      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.13183      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.57294      0.00000      0.00000     -0.00000      0.46766      0.00000      0.00000     -0.00000     12.61102     -2.95270 \n    -0.00000      0.00000      0.00000     -0.01991      0.00000      0.00000      0.00000      0.00000      0.04598     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.16592     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.53452      0.00000     -0.68712     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.01991     -0.00000     -0.00000     -0.00000     -0.00000      0.04598     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.16592      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.53452     -0.00000     -0.00000      0.00000      0.00000     -0.68712     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01991     -0.00000      0.04598      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.16592      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.53452     -0.00000     -0.00000      0.00000      0.00000     -0.68712     -0.00000      0.00000     -0.00000 \n     0.00908     -0.01875     -0.00000     -0.00000     -0.00000      0.02444      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.01613      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.58327     -0.00000     -0.00000      0.00000      2.04269      0.00000      0.00000     -0.00000      4.60471     -0.69346 \n     0.00000     -0.00000     -0.00000      0.00922     -0.00000     -0.00000     -0.00000     -0.00000     -0.01249      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.03706      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.63115     -0.00000      1.62441      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00922      0.00000      0.00000      0.00000      0.00000     -0.01249      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.03706     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.63115      0.00000      0.00000     -0.00000     -0.00000      1.62441     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00922      0.00000     -0.01249      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.03706     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.63115      0.00000      0.00000     -0.00000     -0.00000      1.62441      0.00000     -0.00000      0.00000 \n    -0.00260      0.00529      0.00000      0.00000      0.00000     -0.00507     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00073      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.54040     -0.00000     -0.00000      0.00000     -2.00636     -0.00000     -0.00000      0.00000     -1.47603      0.18342 \n    -0.00000      0.00000      0.00000     -0.00413      0.00000      0.00000      0.00000      0.00000      0.00523     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00530     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.54228      0.00000     -1.41611     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00413     -0.00000     -0.00000     -0.00000     -0.00000      0.00523     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00530      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.54228     -0.00000     -0.00000      0.00000      0.00000     -1.41611     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00413     -0.00000      0.00523     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00530     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.54228     -0.00000     -0.00000      0.00000      0.00000     -1.41611     -0.00000      0.00000     -0.00000 \n    -0.13594     -0.03082     -0.00000     -0.00000     -0.00000     -0.01257     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.10375      0.96897      0.00959      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.02132     -0.42265      0.00493     -0.00000     -0.00000     -0.00000     -0.02173      0.00000      0.00000      0.00000     -0.05998     -9.96351 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.68790     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.73298     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.68790      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.73298     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.13594     -0.03082     -0.00000     -0.00000     -0.00000     -0.01257     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.89103     -0.39463      0.00959      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.37669      0.19286      0.00493      0.00000      0.00000      0.00000     -0.02173     -0.00000     -0.00000      0.00000     -0.05998     -9.96351 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.68790     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.73298     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.13594     -0.03082     -0.00000     -0.00000     -0.00000     -0.01257     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.78728     -0.57434      0.00959      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.35537      0.22979      0.00493      0.00000      0.00000      0.00000     -0.02173     -0.00000     -0.00000     -0.00000     -0.05998     -9.96351 \n    -0.01421      0.03114      0.00000      0.00000      0.00000     -0.05512     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00737      0.06880      0.00592      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.05341      1.05883     -0.02536      0.00000      0.00000      0.00000     -0.18347     -0.00000     -0.00000     -0.00000     -6.10986      1.21431 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.11985     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.83627     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.11985     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.83627     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.01421      0.03114      0.00000      0.00000      0.00000     -0.05512     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.06327     -0.02802      0.00592      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.94367     -0.48316     -0.02536     -0.00000     -0.00000     -0.00000     -0.18347      0.00000      0.00000     -0.00000     -6.10986      1.21431 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.11985      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.83627     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.01421      0.03114      0.00000      0.00000      0.00000     -0.05512     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.05590     -0.04078      0.00592      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.89027     -0.57566     -0.02536     -0.00000     -0.00000     -0.00000     -0.18347      0.00000      0.00000      0.00000     -6.10986      1.21431 \n   </alphavectors>\n   <betavectors>\n     0.97164     -0.34342     -0.00000     -0.00000     -0.00000      0.15163     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.07035      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02667     -0.00000     -0.00000      0.00000      0.02604     -0.00000     -0.00000      0.00000     -0.04975     -0.68568 \n     0.11773      1.02854      0.00000      0.00000      0.00000     -0.54413      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.26651     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.09545      0.00000      0.00000     -0.00000     -0.01549      0.00000     -0.00000     -0.00000      0.36301      3.92829 \n     0.00000     -0.00000     -0.00000      0.97523      0.00000      0.00000     -0.00000     -0.00000     -0.47006      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.21114     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06601      0.00000     -0.00000     -0.07595     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.97523     -0.00000     -0.00000     -0.00000     -0.47006     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.21114      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06601      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.07595      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.97523     -0.00000      0.00000     -0.47006      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.21114     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06601     -0.00000     -0.00000     -0.07595     -0.00000      0.00000      0.00000 \n     0.25841      0.11524      0.00000      0.00000      0.00000      1.10639     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.70347      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.29600     -0.00000     -0.00000      0.00000      0.46304     -0.00000     -0.00000      0.00000     -0.07781     20.52416 \n     0.00000     -0.00000     -0.00000      0.06310     -0.00000     -0.00000      0.00000      0.00000      1.06099     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.71821      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.24131     -0.00000      0.00000      0.28305     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.06310      0.00000      0.00000      0.00000      1.06099      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.71821     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.24131     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.28305     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.06310      0.00000     -0.00000      1.06099     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.71821      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.24131      0.00000      0.00000      0.28305     -0.00000     -0.00000      0.00000 \n     0.03080     -0.07371     -0.00000     -0.00000     -0.00000      0.17020     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.13183      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.57294      0.00000      0.00000     -0.00000      0.46766     -0.00000     -0.00000      0.00000     12.61102     -2.95270 \n    -0.00000      0.00000      0.00000     -0.01991     -0.00000     -0.00000      0.00000      0.00000      0.04598      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.16592     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.53452      0.00000     -0.00000     -0.68712      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.01991      0.00000      0.00000      0.00000      0.04598     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.16592      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.53452      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.68712      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.01991      0.00000     -0.00000      0.04598      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.16592     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.53452     -0.00000     -0.00000     -0.68712      0.00000     -0.00000     -0.00000 \n     0.00908     -0.01875     -0.00000     -0.00000     -0.00000      0.02444     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.01613      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.58327     -0.00000     -0.00000      0.00000      2.04269     -0.00000     -0.00000      0.00000      4.60471     -0.69346 \n     0.00000     -0.00000     -0.00000      0.00922      0.00000      0.00000     -0.00000     -0.00000     -0.01249      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.03706      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.63115     -0.00000      0.00000      1.62441     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00922     -0.00000     -0.00000     -0.00000     -0.01249      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.03706     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.63115     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.62441      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00922     -0.00000      0.00000     -0.01249     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.03706      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.63115      0.00000      0.00000      1.62441     -0.00000      0.00000      0.00000 \n    -0.00260      0.00529      0.00000      0.00000      0.00000     -0.00507      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00073     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54040     -0.00000     -0.00000      0.00000     -2.00636      0.00000      0.00000     -0.00000     -1.47603      0.18342 \n    -0.00000      0.00000      0.00000     -0.00413     -0.00000     -0.00000      0.00000      0.00000      0.00523     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00530     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.54228      0.00000     -0.00000     -1.41611      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00413      0.00000      0.00000      0.00000      0.00523      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00530      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.54228      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.41611     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00413      0.00000     -0.00000      0.00523      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00530     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.54228     -0.00000     -0.00000     -1.41611      0.00000     -0.00000     -0.00000 \n    -0.13594     -0.03082     -0.00000     -0.00000     -0.00000     -0.01257      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.07875      0.97132      0.00959      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.01371     -0.42297      0.00493      0.00000     -0.00000     -0.00000     -0.02173     -0.00000      0.00000      0.00000     -0.05998     -9.96351 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.68790     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.73298      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.68790      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.73298      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.13594     -0.03082     -0.00000     -0.00000     -0.00000     -0.01257      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.88056     -0.41746      0.00959      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.37316      0.19961      0.00493     -0.00000     -0.00000     -0.00000     -0.02173      0.00000      0.00000     -0.00000     -0.05998     -9.96351 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.68790      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.73298      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.13594     -0.03082     -0.00000     -0.00000     -0.00000     -0.01257      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.80181     -0.55386      0.00959      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.35944      0.22336      0.00493     -0.00000      0.00000      0.00000     -0.02173      0.00000     -0.00000      0.00000     -0.05998     -9.96351 \n    -0.01421      0.03114      0.00000      0.00000      0.00000     -0.05512      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00559      0.06897      0.00592     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03436      1.05962     -0.02536     -0.00000      0.00000      0.00000     -0.18347      0.00000     -0.00000     -0.00000     -6.10986      1.21431 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.11985     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.83627      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.11985     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.83627     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.01421      0.03114      0.00000      0.00000      0.00000     -0.05512      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.06252     -0.02964      0.00592     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.93483     -0.50005     -0.02536      0.00000      0.00000      0.00000     -0.18347     -0.00000     -0.00000      0.00000     -6.10986      1.21431 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11985     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.83627      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.01421      0.03114      0.00000      0.00000      0.00000     -0.05512      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.05693     -0.03933      0.00592     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.90047     -0.55956     -0.02536      0.00000     -0.00000     -0.00000     -0.18347     -0.00000      0.00000     -0.00000     -6.10986      1.21431 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cs\" basis=\"3-21g\">\n   <guessdensitymatrix>\n     2.18637     -0.70138      0.99143     -0.21336      0.06626     -0.00303     -0.00563      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.27225      0.00000      0.00000     -0.27225      0.00000     -0.27225     -0.00572      0.00000      0.00000     -0.00572      0.00000     -0.00572 \n    -0.70138      2.92515     -1.92817      0.80247     -0.23359      0.01220      0.02661      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09320      0.00000      0.00000      0.09320      0.00000      0.09320     -0.00466      0.00000      0.00000     -0.00466      0.00000     -0.00466 \n     0.99143     -1.92817      4.34983     -2.18641      0.70763     -0.02131     -0.04828      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.16220      0.00000      0.00000     -0.16220      0.00000     -0.16220     -0.00026      0.00000      0.00000     -0.00026      0.00000     -0.00026 \n    -0.21336      0.80247     -2.18641      3.80822     -1.53685      0.13717      0.27048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04593      0.00000      0.00000      0.04593      0.00000      0.04593     -0.08044      0.00000      0.00000     -0.08044      0.00000     -0.08044 \n     0.06626     -0.23359      0.70763     -1.53685      2.37083      0.00211     -0.01286      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01550      0.00000      0.00000     -0.01550      0.00000     -0.01550      0.12702      0.00000      0.00000      0.12702      0.00000      0.12702 \n    -0.00303      0.01220     -0.02131      0.13717      0.00211      0.18855      0.34176      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00007      0.00000      0.00007     -0.03147      0.00000      0.00000     -0.03147      0.00000     -0.03147 \n    -0.00563      0.02661     -0.04828      0.27048     -0.01286      0.34176      0.61967      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00023      0.00000      0.00000      0.00023      0.00000      0.00023     -0.05787      0.00000      0.00000     -0.05787      0.00000     -0.05787 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.39986      0.00000      0.00000     -1.13464      0.00000      0.00000      0.44307      0.00000      0.00000      0.03819      0.00000      0.00000     -0.14848      0.00000      0.00000     -0.01852      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.39986      0.00000      0.00000     -1.13464      0.00000      0.00000      0.44307      0.00000      0.00000      0.03819      0.00000      0.00000     -0.14848      0.00000      0.00000     -0.01852      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.39986      0.00000      0.00000     -1.13464      0.00000      0.00000      0.44307      0.00000      0.00000      0.03819      0.00000      0.00000     -0.14848      0.00000      0.00000     -0.01852      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.13464      0.00000      0.00000      3.32331      0.00000      0.00000     -1.83197      0.00000      0.00000      0.10652      0.00000      0.00000      0.38328      0.00000      0.00000      0.11967      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.13464      0.00000      0.00000      3.32331      0.00000      0.00000     -1.83197      0.00000      0.00000      0.10652      0.00000      0.00000      0.38328      0.00000      0.00000      0.11967      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.13464      0.00000      0.00000      3.32331      0.00000      0.00000     -1.83197      0.00000      0.00000      0.10652      0.00000      0.00000      0.38328      0.00000      0.00000      0.11967      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.44307      0.00000      0.00000     -1.83197      0.00000      0.00000      3.49775      0.00000      0.00000     -0.46424      0.00000      0.00000     -0.73233      0.00000      0.00000     -0.31071      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.44307      0.00000      0.00000     -1.83197      0.00000      0.00000      3.49775      0.00000      0.00000     -0.46424      0.00000      0.00000     -0.73233      0.00000      0.00000     -0.31071      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.44307      0.00000      0.00000     -1.83197      0.00000      0.00000      3.49775      0.00000      0.00000     -0.46424      0.00000      0.00000     -0.73233      0.00000      0.00000     -0.31071      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03819      0.00000      0.00000      0.10652      0.00000      0.00000     -0.46424      0.00000      0.00000      0.31698      0.00000      0.00000      0.45856      0.00000      0.00000      0.20334      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03819      0.00000      0.00000      0.10652      0.00000      0.00000     -0.46424      0.00000      0.00000      0.31698      0.00000      0.00000      0.45856      0.00000      0.00000      0.20334      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03819      0.00000      0.00000      0.10652      0.00000      0.00000     -0.46424      0.00000      0.00000      0.31698      0.00000      0.00000      0.45856      0.00000      0.00000      0.20334      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.14848      0.00000      0.00000      0.38328      0.00000      0.00000     -0.73233      0.00000      0.00000      0.45856      0.00000      0.00000      0.68844      0.00000      0.00000      0.29955      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.14848      0.00000      0.00000      0.38328      0.00000      0.00000     -0.73233      0.00000      0.00000      0.45856      0.00000      0.00000      0.68844      0.00000      0.00000      0.29955      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.14848      0.00000      0.00000      0.38328      0.00000      0.00000     -0.73233      0.00000      0.00000      0.45856      0.00000      0.00000      0.68844      0.00000      0.00000      0.29955      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01852      0.00000      0.00000      0.11967      0.00000      0.00000     -0.31071      0.00000      0.00000      0.20334      0.00000      0.00000      0.29955      0.00000      0.00000      0.13168      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01852      0.00000      0.00000      0.11967      0.00000      0.00000     -0.31071      0.00000      0.00000      0.20334      0.00000      0.00000      0.29955      0.00000      0.00000      0.13168      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01852      0.00000      0.00000      0.11967      0.00000      0.00000     -0.31071      0.00000      0.00000      0.20334      0.00000      0.00000      0.29955      0.00000      0.00000      0.13168      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.27225      0.09320     -0.16220      0.04593     -0.01550      0.00007      0.00023      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.30595      0.00000      0.00000     -1.10146      0.00000     -1.10146     -0.78469      0.00000      0.00000      0.39352      0.00000      0.39352 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.81480      0.00000      0.00000      0.00000      0.00000      0.00000     -2.35638      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.81480      0.00000      0.00000      0.00000      0.00000      0.00000     -2.35638      0.00000      0.00000      0.00000 \n    -0.27225      0.09320     -0.16220      0.04593     -0.01550      0.00007      0.00023      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.10146      0.00000      0.00000      2.30593      0.00000     -1.10147      0.39352      0.00000      0.00000     -0.78468      0.00000      0.39352 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.81480      0.00000      0.00000      0.00000      0.00000      0.00000     -2.35638      0.00000 \n    -0.27225      0.09320     -0.16220      0.04593     -0.01550      0.00007      0.00023      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.10146      0.00000      0.00000     -1.10147      0.00000      2.30593      0.39351      0.00000      0.00000      0.39351      0.00000     -0.78468 \n    -0.00572     -0.00466     -0.00026     -0.08044      0.12702     -0.03147     -0.05787      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.78469      0.00000      0.00000      0.39352      0.00000      0.39351      2.28419      0.00000      0.00000     -1.12322      0.00000     -1.12321 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.35638      0.00000      0.00000      0.00000      0.00000      0.00000      6.81480      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.35638      0.00000      0.00000      0.00000      0.00000      0.00000      6.81480      0.00000      0.00000      0.00000 \n    -0.00572     -0.00466     -0.00026     -0.08044      0.12702     -0.03147     -0.05787      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.39352      0.00000      0.00000     -0.78468      0.00000      0.39351     -1.12322      0.00000      0.00000      2.28418      0.00000     -1.12321 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.35638      0.00000      0.00000      0.00000      0.00000      0.00000      6.81480      0.00000 \n    -0.00572     -0.00466     -0.00026     -0.08044      0.12702     -0.03147     -0.05787      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.39352      0.00000      0.00000      0.39352      0.00000     -0.78468     -1.12321      0.00000      0.00000     -1.12321      0.00000      2.28418 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1250.06800   -191.48710   -180.54020   -180.54020   -180.54020    -39.75426    -35.07697    -35.07697    -35.07697    -26.24744    -26.24744    -26.24744    -26.24744    -26.24744     -7.44882     -5.76359     -5.76359     -5.76359     -2.83929     -2.83929     -2.83929     -2.83929     -2.83929     -0.92309     -0.51297     -0.51297     -0.51297     -0.08712      0.09434      0.13449      0.13449      0.13449      1.43172      1.43172      1.43172      1.92334    244.59380 \n   </alphaeps>\n   <betaeps>\n -1250.06700   -191.48700   -180.54010   -180.54010   -180.54010    -39.75414    -35.07685    -35.07685    -35.07685    -26.24733    -26.24733    -26.24733    -26.24733    -26.24733     -7.44858     -5.76333     -5.76333     -5.76333     -2.83898     -2.83898     -2.83898     -2.83898     -2.83898     -0.92217     -0.51113     -0.51113     -0.51113     -0.07143      0.10499      0.14924      0.14924      0.14924      1.43625      1.43625      1.43625      1.92515    244.59390 \n   </betaeps>\n   <alphavectors>\n     0.97214     -0.34352      0.00000     -0.00000      0.00000      0.15486      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.07278      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.02871     -0.00000      0.00000     -0.00000     -0.00666      0.00003     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.04901     -0.67290 \n     0.11414      1.02416     -0.00000      0.00000     -0.00000     -0.55866     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.27668     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.10693      0.00000     -0.00000      0.00000      0.03276      0.09110      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.19198      3.93966 \n     0.22660     -0.07313      0.00000     -0.00000      0.00000      1.19871      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.75827      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.32347     -0.00000      0.00000     -0.00000     -0.05908      0.18990      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.52130     20.80533 \n    -0.00043      0.01094     -0.00000      0.00000     -0.00000      0.02164      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.15972     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.70627      0.00000     -0.00000      0.00000      0.34075      1.55518      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      7.08070     -3.63519 \n     0.00181      0.00045     -0.00000      0.00000     -0.00000      0.00313      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00377     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.09059     -0.00000      0.00000     -0.00000     -0.01592      3.13699      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.15653     -0.18641 \n    -0.00035     -0.00027      0.00000     -0.00000      0.00000     -0.00059     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00210      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00654     -0.00000      0.00000     -0.00000      0.43416      3.32433      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.72294      0.08028 \n    -0.00008      0.00009     -0.00000      0.00000     -0.00000     -0.00012     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00088     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00091      0.00000     -0.00000      0.00000      0.78719     -2.28399     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.18381     -0.02119 \n     0.00000      0.00000     -0.00000      0.00000      0.96581      0.00000      0.00000     -0.46597     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.21109      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.07373      0.00000     -0.00000     -0.00000      0.00000      0.04301     -0.11443     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.96581     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.46597      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.21109      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.07373      0.00000      0.00000     -0.00000      0.04301     -0.00000     -0.00000     -0.00000     -0.11443      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.96581      0.00000      0.00000     -0.46597      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.21109     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07373      0.00000      0.00000     -0.00000      0.00000      0.00000      0.04301      0.00000     -0.00000     -0.00000     -0.11443      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.08814     -0.00000     -0.00000      1.03207      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.71747     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.27157     -0.00000      0.00000      0.00000     -0.00000     -0.15893      0.44070     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.08814      0.00000     -0.00000      0.00000      0.00000      0.00000      1.03207      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.71747     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.27157     -0.00000     -0.00000      0.00000     -0.15893      0.00000      0.00000      0.00000      0.44070      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.08814     -0.00000     -0.00000      1.03207     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.71747      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.27157     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.15893     -0.00000      0.00000      0.00000      0.44070      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.03006     -0.00000     -0.00000      0.08847     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.16750      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.61327      0.00000     -0.00000     -0.00000      0.00000      0.36039     -1.19987      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.03006      0.00000     -0.00000      0.00000      0.00000      0.00000      0.08847     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.16750      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.61327      0.00000      0.00000     -0.00000      0.36039     -0.00000     -0.00000     -0.00000     -1.19987      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.03006     -0.00000      0.00000      0.08847      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.16750     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.61327      0.00000      0.00000     -0.00000      0.00000      0.00000      0.36039      0.00000     -0.00000     -0.00000     -1.19987     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.02513      0.00000      0.00000     -0.04561      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.01279     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.39524     -0.00000     -0.00000      0.00000     -0.00000     -0.03741      3.09708     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.02513     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.04561      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.01279     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.39524     -0.00000     -0.00000      0.00000     -0.03741      0.00000      0.00000      0.00000      3.09708      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.02513     -0.00000      0.00000     -0.04561      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01279      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.39524     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.03741     -0.00000      0.00000      0.00000      3.09708      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.01720     -0.00000     -0.00000      0.02721      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00808      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.58038      0.00000      0.00000     -0.00000      0.00000     -1.42465     -3.23662      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.01720      0.00000     -0.00000      0.00000      0.00000      0.00000      0.02721     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00808      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.58038      0.00000      0.00000      0.00000     -1.42465     -0.00000     -0.00000     -0.00000     -3.23662     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.01720     -0.00000     -0.00000      0.02721      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00808      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.58038      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.42465      0.00000     -0.00000     -0.00000     -3.23662     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00546      0.00000      0.00000     -0.00828     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00252     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.26178     -0.00000     -0.00000      0.00000     -0.00000      1.63470      1.18720     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00546     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00828      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00252     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.26178     -0.00000      0.00000     -0.00000      1.63470      0.00000      0.00000      0.00000      1.18720      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00546      0.00000      0.00000     -0.00828     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00252     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.26178     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.63470     -0.00000      0.00000      0.00000      1.18720      0.00000      0.00000 \n    -0.12060      0.03718     -0.00000      0.00000     -0.00000     -0.03076     -0.00000     -0.00000      0.00000     -0.36700      0.90107     -0.00000      0.00000      0.00000      0.01574     -0.00000     -0.00000      0.00000      0.11558     -0.41932     -0.00000     -0.00000     -0.00000     -0.00691     -0.00000     -0.00000     -0.00000      0.00021     -0.01615     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00643     -9.90835 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.68518      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.75337      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.68518     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.75337     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.12060      0.03718     -0.00000      0.00000     -0.00000     -0.03076     -0.00000     -0.00000      0.00000     -0.59685     -0.76836     -0.00000      0.00000      0.00000      0.01574     -0.00000     -0.00000      0.00000      0.30536      0.30975      0.00000      0.00000      0.00000     -0.00691      0.00000      0.00000      0.00000      0.00021     -0.01615      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00643     -9.90835 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.68518      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.75337     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.12060      0.03718     -0.00000      0.00000     -0.00000     -0.03076     -0.00000     -0.00000      0.00000      0.96385     -0.13270     -0.00000      0.00000      0.00000      0.01574     -0.00000     -0.00000      0.00000     -0.42093      0.10957     -0.00000     -0.00000     -0.00000     -0.00691     -0.00000     -0.00000     -0.00000      0.00021     -0.01615      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00643     -9.90835 \n    -0.00358     -0.00308      0.00000     -0.00000      0.00000     -0.00970     -0.00000     -0.00000      0.00000     -0.02705      0.06641     -0.00000      0.00000      0.00000      0.01160     -0.00000     -0.00000      0.00000     -0.28254      1.02510      0.00000      0.00000      0.00000      0.05750      0.00000      0.00000      0.00000     -0.07352     -0.44369      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -3.53971      1.08032 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.12421     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.84173      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.12421      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.84173      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00358     -0.00308      0.00000     -0.00000      0.00000     -0.00970     -0.00000     -0.00000      0.00000     -0.04399     -0.05663     -0.00000      0.00000      0.00000      0.01160     -0.00000     -0.00000      0.00000     -0.74649     -0.75724     -0.00000     -0.00000     -0.00000      0.05750     -0.00000     -0.00000     -0.00000     -0.07352     -0.44369     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -3.53971      1.08032 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.12421     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.84173      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00358     -0.00308      0.00000     -0.00000      0.00000     -0.00970     -0.00000     -0.00000      0.00000      0.07104     -0.00978     -0.00000      0.00000      0.00000      0.01160     -0.00000     -0.00000      0.00000      1.02903     -0.26786      0.00000      0.00000      0.00000      0.05750      0.00000      0.00000      0.00000     -0.07352     -0.44369     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -3.53971      1.08032 \n   </alphavectors>\n   <betavectors>\n     0.97214     -0.34352      0.00000     -0.00000      0.00000      0.15486      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.07278      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.02872     -0.00000      0.00000     -0.00000     -0.00669     -0.00014      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.04900     -0.67290 \n     0.11414      1.02416     -0.00000      0.00000     -0.00000     -0.55866     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.27669     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.10708      0.00000     -0.00000      0.00000      0.03051      0.09191     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.19188      3.93966 \n     0.22660     -0.07314      0.00000     -0.00000      0.00000      1.19872      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.75827      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.32331     -0.00000      0.00000     -0.00000     -0.06431      0.18834     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.52132     20.80533 \n    -0.00043      0.01094     -0.00000      0.00000     -0.00000      0.02163      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.15979     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.70856      0.00000     -0.00000      0.00000      0.31001      1.56759     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      7.07913     -3.63519 \n     0.00181      0.00045     -0.00000      0.00000     -0.00000      0.00313      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00377     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.08680     -0.00000      0.00000     -0.00000     -0.09397      3.13770     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.15445     -0.18641 \n    -0.00035     -0.00027      0.00000     -0.00000      0.00000     -0.00059     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00210      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00176     -0.00000      0.00000     -0.00000      0.34647      3.33399     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.72582      0.08028 \n    -0.00008      0.00009     -0.00000      0.00000     -0.00000     -0.00012     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00088     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00061     -0.00000      0.00000     -0.00000      0.84659     -2.26262      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.18410     -0.02119 \n    -0.00000      0.00000     -0.00000      0.00000      0.96581      0.00000      0.00000     -0.00000     -0.46597     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.21110     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.07393      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.04306     -0.11428     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.96581     -0.00000     -0.00000     -0.00000     -0.46597      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.21110      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.07393     -0.00000      0.00000     -0.00000      0.00000      0.04306     -0.00000     -0.00000     -0.00000     -0.11428     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.96581      0.00000     -0.00000      0.00000     -0.46597      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.21110      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.07393     -0.00000      0.00000     -0.00000      0.04306     -0.00000      0.00000      0.00000     -0.11428     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.08814     -0.00000     -0.00000      0.00000      1.03207     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.71748      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.27230     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.15919      0.44013     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.08814      0.00000      0.00000      0.00000      1.03207     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.71748     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.27230      0.00000     -0.00000      0.00000     -0.00000     -0.15919      0.00000      0.00000      0.00000      0.44013     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.08814     -0.00000      0.00000     -0.00000      1.03207     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.71748     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.27230      0.00000     -0.00000      0.00000     -0.15919      0.00000     -0.00000     -0.00000      0.44013      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.03006     -0.00000     -0.00000      0.00000      0.08847      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.16753     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.61482      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.36189     -1.19859      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.03006     -0.00000      0.00000      0.00000      0.08847      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.16753      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.61482     -0.00000      0.00000     -0.00000      0.00000      0.36189     -0.00000     -0.00000     -0.00000     -1.19859      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.03006     -0.00000      0.00000     -0.00000      0.08847      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.16753      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.61482     -0.00000      0.00000     -0.00000      0.36189     -0.00000      0.00000      0.00000     -1.19859     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.02513      0.00000      0.00000     -0.00000     -0.04561     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.01273      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.39372      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.04875      3.09711     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.02513     -0.00000     -0.00000     -0.00000     -0.04561      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.01273     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.39372      0.00000     -0.00000      0.00000      0.00000     -0.04875      0.00000      0.00000      0.00000      3.09711     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.02513      0.00000     -0.00000      0.00000     -0.04561     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01273     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.39372      0.00000     -0.00000      0.00000     -0.04875      0.00000     -0.00000     -0.00000      3.09711      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.01720     -0.00000     -0.00000      0.00000      0.02721      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00805     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.59110     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.40653     -3.24260     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.01720      0.00000      0.00000      0.00000      0.02721     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00805     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.59110      0.00000     -0.00000     -0.00000     -0.00000     -1.40653     -0.00000     -0.00000     -0.00000     -3.24260      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.01720     -0.00000      0.00000     -0.00000      0.02721      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00805      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.59110      0.00000     -0.00000      0.00000     -1.40653     -0.00000      0.00000      0.00000     -3.24260     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00546      0.00000      0.00000     -0.00000     -0.00828     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00251      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.25088      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.63099      1.19463      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00546     -0.00000     -0.00000     -0.00000     -0.00828      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00251      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.25088     -0.00000      0.00000      0.00000      0.00000      1.63099      0.00000      0.00000      0.00000      1.19463     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00546      0.00000     -0.00000      0.00000     -0.00828     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00251      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.25088     -0.00000      0.00000     -0.00000      1.63099      0.00000     -0.00000     -0.00000      1.19463      0.00000     -0.00000 \n    -0.12060      0.03719     -0.00000      0.00000     -0.00000     -0.03077     -0.00000      0.00000     -0.00000     -0.43227      0.87164      0.00000      0.00000      0.00000      0.01574     -0.00000      0.00000      0.00000      0.11614     -0.41917     -0.00000      0.00000     -0.00000     -0.00689     -0.00000     -0.00000      0.00000      0.00064     -0.01614     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00644     -9.90835 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.68518     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.75337      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.68518     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.75337     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.12060      0.03719     -0.00000      0.00000     -0.00000     -0.03077     -0.00000      0.00000     -0.00000     -0.53872     -0.81018      0.00000      0.00000      0.00000      0.01574     -0.00000      0.00000      0.00000      0.30494      0.31016      0.00000     -0.00000      0.00000     -0.00689     -0.00000     -0.00000     -0.00000      0.00064     -0.01614     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00644     -9.90835 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.68518      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.75337     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.12060      0.03719     -0.00000      0.00000     -0.00000     -0.03077     -0.00000      0.00000     -0.00000      0.97099     -0.06146      0.00000      0.00000      0.00000      0.01574     -0.00000      0.00000      0.00000     -0.42108      0.10900     -0.00000      0.00000     -0.00000     -0.00689      0.00000      0.00000     -0.00000      0.00064     -0.01614      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00644     -9.90835 \n    -0.00358     -0.00308      0.00000     -0.00000      0.00000     -0.00969     -0.00000      0.00000     -0.00000     -0.03186      0.06424      0.00000      0.00000      0.00000      0.01157     -0.00000      0.00000      0.00000     -0.28392      1.02472      0.00000     -0.00000      0.00000      0.05809      0.00000      0.00000     -0.00000     -0.06734     -0.44786      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -3.53929      1.08032 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.12421      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.84173     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.12421      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.84173      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00358     -0.00308      0.00000     -0.00000      0.00000     -0.00969     -0.00000      0.00000     -0.00000     -0.03971     -0.05971      0.00000      0.00000      0.00000      0.01157     -0.00000      0.00000      0.00000     -0.74547     -0.75824     -0.00000      0.00000     -0.00000      0.05809      0.00000      0.00000      0.00000     -0.06734     -0.44786      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -3.53929      1.08032 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.12421     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.84173      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00358     -0.00308      0.00000     -0.00000      0.00000     -0.00969     -0.00000      0.00000     -0.00000      0.07157     -0.00453      0.00000      0.00000      0.00000      0.01157     -0.00000      0.00000      0.00000      1.02939     -0.26648      0.00000     -0.00000      0.00000      0.05809     -0.00000     -0.00000      0.00000     -0.06734     -0.44786     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -3.53929      1.08032 \n   </betavectors>\n</atomicguess>\n"
  },
  {
    "path": "src/madness/chem/6-31g",
    "content": "<?xml version=\"1.0\" ?>\n<name>\n   6-31G\n</name>\n<basis symbol=\"H\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      18.73113700\n      2.82539370\n      0.64012170\n    </exponents>\n    <coefficients>\n      0.03349460\n      0.23472695\n      0.81375733\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.16127780\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"He\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      38.42163400\n      5.77803000\n      1.24177400\n    </exponents>\n    <coefficients>\n      0.02376600\n      0.15467900\n      0.46963000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.29796400\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Li\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      642.41892000\n      96.79851500\n      22.09112100\n      6.20107030\n      1.93511770\n      0.63673580\n    </exponents>\n    <coefficients>\n      0.00214260\n      0.01620890\n      0.07731560\n      0.24578600\n      0.47018900\n      0.34547080\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.32491840\n      0.63243060\n      0.07905340\n    </exponents>\n    <scoefficients>\n      -0.03509170\n      -0.19123280\n      1.08398780\n    </scoefficients>\n    <pcoefficients>\n      0.00894150\n      0.14100950\n      0.94536370\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03596200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Be\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      1264.58570000\n      189.93681000\n      43.15908900\n      12.09866300\n      3.80632320\n      1.27289030\n    </exponents>\n    <coefficients>\n      0.00194480\n      0.01483510\n      0.07209060\n      0.23715420\n      0.46919870\n      0.35652020\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.19646310\n      0.74781330\n      0.21996630\n    </exponents>\n    <scoefficients>\n      -0.11264870\n      -0.22950640\n      1.18691670\n    </scoefficients>\n    <pcoefficients>\n      0.05598020\n      0.26155060\n      0.79397230\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.08230990\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"B\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      2068.88230000\n      310.64957000\n      70.68303300\n      19.86108000\n      6.29930480\n      2.12702700\n    </exponents>\n    <coefficients>\n      0.00186630\n      0.01425150\n      0.06955160\n      0.23257290\n      0.46707870\n      0.36343140\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.72797100\n      1.19033770\n      0.35941170\n    </exponents>\n    <scoefficients>\n      -0.13039380\n      -0.13078890\n      1.13094440\n    </scoefficients>\n    <pcoefficients>\n      0.07459760\n      0.30784670\n      0.74345680\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.12675120\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"C\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      3047.52490000\n      457.36951000\n      103.94869000\n      29.21015500\n      9.28666300\n      3.16392700\n    </exponents>\n    <coefficients>\n      0.00183470\n      0.01403730\n      0.06884260\n      0.23218440\n      0.46794130\n      0.36231200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.86827240\n      1.88128850\n      0.54424930\n    </exponents>\n    <scoefficients>\n      -0.11933240\n      -0.16085420\n      1.14345640\n    </scoefficients>\n    <pcoefficients>\n      0.06899910\n      0.31642400\n      0.74430830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.16871440\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"N\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      4173.51100000\n      627.45790000\n      142.90210000\n      40.23433000\n      12.82021000\n      4.39043700\n    </exponents>\n    <coefficients>\n      0.00183480\n      0.01399500\n      0.06858700\n      0.23224100\n      0.46907000\n      0.36045500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      11.62635800\n      2.71628000\n      0.77221800\n    </exponents>\n    <scoefficients>\n      -0.11496100\n      -0.16911800\n      1.14585200\n    </scoefficients>\n    <pcoefficients>\n      0.06758000\n      0.32390700\n      0.74089500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.21203130\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"O\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      5484.67170000\n      825.23495000\n      188.04696000\n      52.96450000\n      16.89757000\n      5.79963530\n    </exponents>\n    <coefficients>\n      0.00183110\n      0.01395010\n      0.06844510\n      0.23271430\n      0.47019300\n      0.35852090\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      15.53961600\n      3.59993360\n      1.01376180\n    </exponents>\n    <scoefficients>\n      -0.11077750\n      -0.14802630\n      1.13076700\n    </scoefficients>\n    <pcoefficients>\n      0.07087430\n      0.33975280\n      0.72715860\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.27000580\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"F\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      7001.71309000\n      1051.36609000\n      239.28569000\n      67.39744530\n      21.51995730\n      7.40310130\n    </exponents>\n    <coefficients>\n      0.00181962\n      0.01391608\n      0.06840532\n      0.23318576\n      0.47126744\n      0.35661855\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      20.84795280\n      4.80830834\n      1.34406986\n    </exponents>\n    <scoefficients>\n      -0.10850698\n      -0.14645166\n      1.12868858\n    </scoefficients>\n    <pcoefficients>\n      0.07162872\n      0.34591210\n      0.72246996\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.35815139\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ne\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      8425.85153000\n      1268.51940000\n      289.62141400\n      81.85900400\n      26.25150790\n      9.09472051\n    </exponents>\n    <coefficients>\n      0.00188435\n      0.01433690\n      0.07010962\n      0.23737327\n      0.47300713\n      0.34840124\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      26.53213100\n      6.10175501\n      1.69627153\n    </exponents>\n    <scoefficients>\n      -0.10711829\n      -0.14616382\n      1.12777350\n    </scoefficients>\n    <pcoefficients>\n      0.07190959\n      0.34951337\n      0.71994051\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.44581870\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Na\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      9993.20000000\n      1499.89000000\n      341.95100000\n      94.67970000\n      29.73450000\n      10.00630000\n    </exponents>\n    <coefficients>\n      0.00193770\n      0.01480700\n      0.07270600\n      0.25262900\n      0.49324200\n      0.31316900\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      150.96300000\n      35.58780000\n      11.16830000\n      3.90201000\n      1.38177000\n      0.46638200\n    </exponents>\n    <scoefficients>\n      -0.00354210\n      -0.04395900\n      -0.10975210\n      0.18739800\n      0.64669900\n      0.30605800\n    </scoefficients>\n    <pcoefficients>\n      0.00500170\n      0.03551100\n      0.14282500\n      0.33862000\n      0.45157900\n      0.27327100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.49796600\n      0.08435300\n      0.06663500\n    </exponents>\n    <scoefficients>\n      -0.24850300\n      -0.13170400\n      1.23352000\n    </scoefficients>\n    <pcoefficients>\n      -0.02302300\n      0.95035900\n      0.05985800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02595440\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mg\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      11722.80000000\n      1759.93000000\n      400.84600000\n      112.80700000\n      35.99970000\n      12.18280000\n    </exponents>\n    <coefficients>\n      0.00197780\n      0.01511400\n      0.07391100\n      0.24919100\n      0.48792800\n      0.31966200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      189.18000000\n      45.21190000\n      14.35630000\n      5.13886000\n      1.90652000\n      0.70588700\n    </exponents>\n    <scoefficients>\n      -0.00323720\n      -0.04100800\n      -0.11260000\n      0.14863300\n      0.61649700\n      0.36482900\n    </scoefficients>\n    <pcoefficients>\n      0.00492810\n      0.03498900\n      0.14072500\n      0.33364200\n      0.44494000\n      0.26925400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.92934000\n      0.26903500\n      0.11737900\n    </exponents>\n    <scoefficients>\n      -0.21229000\n      -0.10798500\n      1.17584000\n    </scoefficients>\n    <pcoefficients>\n      -0.02241900\n      0.19227000\n      0.84618100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04210610\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Al\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      13983.10000000\n      2098.75000000\n      477.70500000\n      134.36000000\n      42.87090000\n      14.51890000\n    </exponents>\n    <coefficients>\n      0.00194267\n      0.01485990\n      0.07284940\n      0.24683000\n      0.48725800\n      0.32349600\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      239.66800000\n      57.44190000\n      18.28590000\n      6.59914000\n      2.49049000\n      0.94454000\n    </exponents>\n    <scoefficients>\n      -0.00292619\n      -0.03740800\n      -0.11448700\n      0.11563500\n      0.61259500\n      0.39379900\n    </scoefficients>\n    <pcoefficients>\n      0.00460285\n      0.03319900\n      0.13628200\n      0.33047600\n      0.44914600\n      0.26570400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.27790000\n      0.39759000\n      0.16009500\n    </exponents>\n    <scoefficients>\n      -0.22760600\n      0.00144583\n      1.09279000\n    </scoefficients>\n    <pcoefficients>\n      -0.01751300\n      0.24453300\n      0.80493400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.05565770\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Si\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      16115.90000000\n      2425.58000000\n      553.86700000\n      156.34000000\n      50.06830000\n      17.01780000\n    </exponents>\n    <coefficients>\n      0.00195948\n      0.01492880\n      0.07284780\n      0.24613000\n      0.48591400\n      0.32500200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      292.71800000\n      69.87310000\n      22.33630000\n      8.15039000\n      3.13458000\n      1.22543000\n    </exponents>\n    <scoefficients>\n      -0.00278094\n      -0.03571460\n      -0.11498500\n      0.09356340\n      0.60301700\n      0.41895900\n    </scoefficients>\n    <pcoefficients>\n      0.00443826\n      0.03266790\n      0.13472100\n      0.32867800\n      0.44964000\n      0.26137200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.72738000\n      0.57292200\n      0.22219200\n    </exponents>\n    <scoefficients>\n      -0.24463000\n      0.00431572\n      1.09818000\n    </scoefficients>\n    <pcoefficients>\n      -0.01779510\n      0.25353900\n      0.80066900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.07783690\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"P\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      19413.30000000\n      2909.42000000\n      661.36400000\n      185.75900000\n      59.19430000\n      20.03100000\n    </exponents>\n    <coefficients>\n      0.00185160\n      0.01420620\n      0.06999950\n      0.24007900\n      0.48476200\n      0.33520000\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      339.47800000\n      81.01010000\n      25.87800000\n      9.45221000\n      3.66566000\n      1.46746000\n    </exponents>\n    <scoefficients>\n      -0.00278217\n      -0.03604990\n      -0.11663100\n      0.09683280\n      0.61441800\n      0.40379800\n    </scoefficients>\n    <pcoefficients>\n      0.00456462\n      0.03369360\n      0.13975500\n      0.33936200\n      0.45092100\n      0.23858600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.15623000\n      0.74899700\n      0.28314500\n    </exponents>\n    <scoefficients>\n      -0.25292300\n      0.03285170\n      1.08125000\n    </scoefficients>\n    <pcoefficients>\n      -0.01776530\n      0.27405800\n      0.78542100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.09983170\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"S\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      21917.10000000\n      3301.49000000\n      754.14600000\n      212.71100000\n      67.98960000\n      23.05150000\n    </exponents>\n    <coefficients>\n      0.00186900\n      0.01423000\n      0.06969600\n      0.23848700\n      0.48330700\n      0.33807400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      423.73500000\n      100.71000000\n      32.15990000\n      11.80790000\n      4.63110000\n      1.87025000\n    </exponents>\n    <scoefficients>\n      -0.00237670\n      -0.03169300\n      -0.11331700\n      0.05609000\n      0.59225500\n      0.45500600\n    </scoefficients>\n    <pcoefficients>\n      0.00406100\n      0.03068100\n      0.13045200\n      0.32720500\n      0.45285100\n      0.25604200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.61584000\n      0.92216700\n      0.34128700\n    </exponents>\n    <scoefficients>\n      -0.25037400\n      0.06695700\n      1.05451000\n    </scoefficients>\n    <pcoefficients>\n      -0.01451100\n      0.31026300\n      0.75448300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.11716700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cl\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      25180.10000000\n      3780.35000000\n      860.47400000\n      242.14500000\n      77.33490000\n      26.24700000\n    </exponents>\n    <coefficients>\n      0.00183300\n      0.01403400\n      0.06909700\n      0.23745200\n      0.48303400\n      0.33985600\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      491.76500000\n      116.98400000\n      37.41530000\n      13.78340000\n      5.45215000\n      2.22588000\n    </exponents>\n    <scoefficients>\n      -0.00229740\n      -0.03071400\n      -0.11252800\n      0.04501600\n      0.58935300\n      0.46520600\n    </scoefficients>\n    <pcoefficients>\n      0.00398940\n      0.03031800\n      0.12988000\n      0.32795100\n      0.45352700\n      0.25215400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.18649000\n      1.14427000\n      0.42037700\n    </exponents>\n    <scoefficients>\n      -0.25183000\n      0.06158900\n      1.06018000\n    </scoefficients>\n    <pcoefficients>\n      -0.01429900\n      0.32357200\n      0.74350700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.14265700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ar\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      28348.30000000\n      4257.62000000\n      969.85700000\n      273.26300000\n      87.36950000\n      29.68670000\n    </exponents>\n    <coefficients>\n      0.00182526\n      0.01396860\n      0.06870730\n      0.23620400\n      0.48221400\n      0.34204300\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      575.89100000\n      136.81600000\n      43.80980000\n      16.20940000\n      6.46084000\n      2.65114000\n    </exponents>\n    <scoefficients>\n      -0.00215972\n      -0.02907750\n      -0.11082700\n      0.02769990\n      0.57761300\n      0.48868800\n    </scoefficients>\n    <pcoefficients>\n      0.00380665\n      0.02923050\n      0.12646700\n      0.32351000\n      0.45489600\n      0.25663000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.86028000\n      1.41373000\n      0.51664600\n    </exponents>\n    <scoefficients>\n      -0.25559200\n      0.03780660\n      1.08056000\n    </scoefficients>\n    <pcoefficients>\n      -0.01591970\n      0.32464600\n      0.74399000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.17388800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"K\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      31594.42000000\n      4744.33000000\n      1080.41900000\n      304.23380000\n      97.24586000\n      33.02495000\n    </exponents>\n    <coefficients>\n      0.00182801\n      0.01399403\n      0.06887129\n      0.23697600\n      0.48290400\n      0.34047950\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      622.76250000\n      147.88390000\n      47.32735000\n      17.51495000\n      6.92272200\n      2.76827700\n    </exponents>\n    <scoefficients>\n      -0.00250298\n      -0.03315550\n      -0.12263870\n      0.05353643\n      0.61938600\n      0.43458780\n    </scoefficients>\n    <pcoefficients>\n      0.00409464\n      0.03145199\n      0.13515580\n      0.33905000\n      0.46294550\n      0.22426380\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      11.84802000\n      4.07921100\n      1.76348100\n      0.78892700\n      0.35038700\n      0.14634400\n    </exponents>\n    <scoefficients>\n      0.01277689\n      0.20987670\n      -0.00309527\n      -0.55938840\n      -0.51347600\n      -0.06598035\n    </scoefficients>\n    <pcoefficients>\n      -0.01221377\n      -0.00690054\n      0.20074660\n      0.42813320\n      0.39701560\n      0.11047180\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.71680100\n      0.23374100\n      0.03867500\n    </exponents>\n    <scoefficients>\n      -0.05237772\n      -0.27985030\n      1.14154700\n    </scoefficients>\n    <pcoefficients>\n      0.03164300\n      -0.04046160\n      1.01202900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.01652100\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ca\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      35264.86000000\n      5295.50300000\n      1206.02000000\n      339.68390000\n      108.62640000\n      36.92103000\n    </exponents>\n    <coefficients>\n      0.00181350\n      0.01388493\n      0.06836162\n      0.23561880\n      0.48206390\n      0.34298190\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      706.30960000\n      167.81870000\n      53.82558000\n      20.01638000\n      7.97027900\n      3.21205900\n    </exponents>\n    <scoefficients>\n      0.00244823\n      0.03241504\n      0.12262190\n      -0.04316965\n      -0.61269950\n      -0.44875400\n    </scoefficients>\n    <pcoefficients>\n      0.00402037\n      0.03100601\n      0.13372790\n      0.33679830\n      0.46312810\n      0.22575320\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      14.19518000\n      4.88082800\n      2.16039000\n      0.98789900\n      0.44951700\n      0.18738700\n    </exponents>\n    <scoefficients>\n      0.01084500\n      0.20883330\n      0.03150338\n      -0.55265180\n      -0.54379970\n      -0.06669342\n    </scoefficients>\n    <pcoefficients>\n      -0.01289621\n      -0.01025198\n      0.19597810\n      0.43579330\n      0.39964520\n      0.09713636\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.03227100\n      0.38117100\n      0.06513100\n    </exponents>\n    <scoefficients>\n      -0.04439720\n      -0.32845630\n      1.16301000\n    </scoefficients>\n    <pcoefficients>\n      -0.42986210\n      0.00693583\n      0.97059330\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02601000\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sc\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      39088.98000000\n      5869.79200000\n      1336.91000000\n      376.60310000\n      120.46790000\n      40.98032000\n    </exponents>\n    <coefficients>\n      0.00180326\n      0.01380769\n      0.06800396\n      0.23470990\n      0.48156900\n      0.34456520\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      786.28520000\n      186.88700000\n      60.00935000\n      22.25883000\n      8.88514900\n      3.60921100\n    </exponents>\n    <scoefficients>\n      0.00245186\n      0.03259579\n      0.12382420\n      -0.04359890\n      -0.61771810\n      -0.44328230\n    </scoefficients>\n    <pcoefficients>\n      0.00403953\n      0.03122570\n      0.13498330\n      0.34247930\n      0.46231130\n      0.21775240\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      29.84355000\n      9.54238300\n      4.05679000\n      1.70470300\n      0.70623400\n      0.27953600\n    </exponents>\n    <scoefficients>\n      -0.00258630\n      0.07188424\n      0.25032600\n      -0.29910030\n      -0.74468180\n      -0.17997760\n    </scoefficients>\n    <pcoefficients>\n      -0.00609665\n      -0.02628884\n      0.05091001\n      0.37980970\n      0.51708830\n      0.18297720\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.06560900\n      0.42593300\n      0.07632000\n    </exponents>\n    <scoefficients>\n      0.06482978\n      0.32537560\n      -1.17080600\n    </scoefficients>\n    <pcoefficients>\n      -0.29384400\n      0.09235323\n      0.98479300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02959400\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      11.14701000\n      2.82104300\n      0.81962000\n    </exponents>\n    <coefficients>\n      0.08747672\n      0.37956350\n      0.71803930\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.22146800\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ti\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      43152.95000000\n      6479.57100000\n      1475.67500000\n      415.69910000\n      133.00060000\n      45.27222000\n    </exponents>\n    <coefficients>\n      0.00179187\n      0.01372392\n      0.06762830\n      0.23376420\n      0.48106960\n      0.34622800\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      874.68260000\n      207.97850000\n      66.87918000\n      24.87347000\n      9.96844100\n      4.06382600\n    </exponents>\n    <scoefficients>\n      0.00243101\n      0.03233027\n      0.12425200\n      -0.03903905\n      -0.61717890\n      -0.44730970\n    </scoefficients>\n    <pcoefficients>\n      0.00401768\n      0.03113966\n      0.13490770\n      0.34316720\n      0.46257600\n      0.21546030\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      33.64363000\n      10.87565000\n      4.62822500\n      1.95012600\n      0.80945200\n      0.32047400\n    </exponents>\n    <scoefficients>\n      -0.00294036\n      0.07163103\n      0.25289150\n      -0.29664010\n      -0.74322150\n      -0.18535200\n    </scoefficients>\n    <pcoefficients>\n      -0.00631162\n      -0.02697638\n      0.05316847\n      0.38455490\n      0.51276620\n      0.18111350\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.22414800\n      0.48426300\n      0.08409600\n    </exponents>\n    <scoefficients>\n      0.06351465\n      0.31514040\n      -1.16259500\n    </scoefficients>\n    <pcoefficients>\n      -0.21120700\n      0.07771998\n      0.98982140\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03203600\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      13.69085000\n      3.51315400\n      1.04043400\n    </exponents>\n    <coefficients>\n      0.08589418\n      0.37846710\n      0.71612390\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.28696200\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"V\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      47354.33000000\n      7110.78700000\n      1619.59100000\n      456.33790000\n      146.06060000\n      49.75791000\n    </exponents>\n    <coefficients>\n      0.00178451\n      0.01366754\n      0.06736122\n      0.23305520\n      0.48063160\n      0.34748020\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      968.14840000\n      230.28210000\n      74.14591000\n      27.64107000\n      11.11475000\n      4.54311300\n    </exponents>\n    <scoefficients>\n      0.00241060\n      0.03207243\n      0.12459420\n      -0.03482177\n      -0.61673740\n      -0.45098440\n    </scoefficients>\n    <pcoefficients>\n      0.00399500\n      0.03104061\n      0.13477470\n      0.34372790\n      0.46287590\n      0.21355470\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      37.64050000\n      12.28238000\n      5.23336600\n      2.20895000\n      0.91788000\n      0.36341200\n    </exponents>\n    <scoefficients>\n      -0.00323320\n      0.07130744\n      0.25438200\n      -0.29338870\n      -0.74156950\n      -0.19094100\n    </scoefficients>\n    <pcoefficients>\n      -0.00649406\n      -0.02753453\n      0.05516284\n      0.38796720\n      0.50902580\n      0.18038400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.39278100\n      0.54391300\n      0.09147600\n    </exponents>\n    <scoefficients>\n      0.06139703\n      0.30611300\n      -1.15489000\n    </scoefficients>\n    <pcoefficients>\n      -0.18912650\n      0.08005453\n      0.98773990\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03431200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      16.05025000\n      4.16006300\n      1.24326500\n    </exponents>\n    <coefficients>\n      0.08599899\n      0.38029960\n      0.71276590\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.34427700\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cr\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      51789.81000000\n      7776.84900000\n      1771.38500000\n      499.15880000\n      159.79820000\n      54.47021000\n    </exponents>\n    <coefficients>\n      0.00177618\n      0.01360476\n      0.06706925\n      0.23231040\n      0.48024100\n      0.34876530\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1064.32800000\n      253.21380000\n      81.60924000\n      30.48193000\n      12.29439000\n      5.03772200\n    </exponents>\n    <scoefficients>\n      0.00239967\n      0.03194886\n      0.12508680\n      -0.03221866\n      -0.61722840\n      -0.45259360\n    </scoefficients>\n    <pcoefficients>\n      0.00398700\n      0.03104662\n      0.13505180\n      0.34488650\n      0.46285710\n      0.21104260\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      41.56291000\n      13.67627000\n      5.84439000\n      2.47160900\n      1.02830800\n      0.40725000\n    </exponents>\n    <scoefficients>\n      -0.00345422\n      0.07218428\n      0.25448200\n      -0.29345340\n      -0.73854550\n      -0.19471570\n    </scoefficients>\n    <pcoefficients>\n      -0.00672250\n      -0.02806471\n      0.05820028\n      0.39169880\n      0.50478230\n      0.17902900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.57146400\n      0.60558000\n      0.09856100\n    </exponents>\n    <scoefficients>\n      0.05892219\n      0.29760550\n      -1.14750600\n    </scoefficients>\n    <pcoefficients>\n      -0.19301000\n      0.09605620\n      0.98176090\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03645900\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      18.41930000\n      4.81266100\n      1.44644700\n    </exponents>\n    <coefficients>\n      0.08650816\n      0.38266990\n      0.70937720\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.40041300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mn\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      56347.14000000\n      8460.94300000\n      1927.32500000\n      543.23430000\n      173.99050000\n      59.36005000\n    </exponents>\n    <coefficients>\n      0.00177158\n      0.01357081\n      0.06690605\n      0.23185410\n      0.47990460\n      0.34957370\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1165.41200000\n      277.32760000\n      89.47278000\n      33.48256000\n      13.54037000\n      5.55797200\n    </exponents>\n    <scoefficients>\n      0.00238875\n      0.03181708\n      0.12546700\n      -0.02955431\n      -0.61751600\n      -0.45444580\n    </scoefficients>\n    <pcoefficients>\n      0.00397732\n      0.03103112\n      0.13518940\n      0.34573870\n      0.46292050\n      0.20905920\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      45.83532000\n      15.18777000\n      6.50071000\n      2.75158300\n      1.14540400\n      0.45368700\n    </exponents>\n    <scoefficients>\n      -0.00366586\n      0.07231971\n      0.25444860\n      -0.29103800\n      -0.73598600\n      -0.19976170\n    </scoefficients>\n    <pcoefficients>\n      -0.00688758\n      -0.02846816\n      0.06031832\n      0.39389610\n      0.50137690\n      0.17922640\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.75799900\n      0.66702200\n      0.10512900\n    </exponents>\n    <scoefficients>\n      0.05628572\n      0.28974910\n      -1.14065300\n    </scoefficients>\n    <pcoefficients>\n      -0.50350240\n      0.23450110\n      0.91412570\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03841800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      20.94355000\n      5.51048600\n      1.66503800\n    </exponents>\n    <coefficients>\n      0.08672702\n      0.38418830\n      0.70690710\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.46173300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Fe\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      61132.62000000\n      9179.34200000\n      2090.85700000\n      589.24790000\n      188.75430000\n      64.44629000\n    </exponents>\n    <coefficients>\n      0.00176611\n      0.01353038\n      0.06673128\n      0.23148230\n      0.47970580\n      0.35019760\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1259.98000000\n      299.87610000\n      96.84917000\n      36.31020000\n      14.72996000\n      6.06607500\n    </exponents>\n    <scoefficients>\n      0.00243801\n      0.03224048\n      0.12657240\n      -0.03139902\n      -0.62075930\n      -0.45029140\n    </scoefficients>\n    <pcoefficients>\n      0.00402802\n      0.03144647\n      0.13683170\n      0.34872360\n      0.46179310\n      0.20430580\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      50.43485000\n      16.83929000\n      7.19208600\n      3.05342000\n      1.27364300\n      0.50409100\n    </exponents>\n    <scoefficients>\n      -0.00387326\n      0.07196598\n      0.25565910\n      -0.28828370\n      -0.73428220\n      -0.20493530\n    </scoefficients>\n    <pcoefficients>\n      -0.00701713\n      -0.02877660\n      0.06181383\n      0.39549460\n      0.49890590\n      0.17912510\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.95031600\n      0.73672100\n      0.11417700\n    </exponents>\n    <scoefficients>\n      0.05694869\n      0.28829150\n      -1.13815900\n    </scoefficients>\n    <pcoefficients>\n      -0.45937960\n      0.28521390\n      0.90764850\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04114800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      23.14994000\n      6.12236800\n      1.84660100\n    </exponents>\n    <coefficients>\n      0.08876935\n      0.38963190\n      0.70148160\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.50436100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Co\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      66148.99000000\n      9933.07700000\n      2262.81600000\n      637.91540000\n      204.41220000\n      69.82538000\n    </exponents>\n    <coefficients>\n      0.00175979\n      0.01348162\n      0.06649342\n      0.23079390\n      0.47929190\n      0.35140970\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1378.84100000\n      328.26940000\n      106.09460000\n      39.83275000\n      16.18622000\n      6.66778800\n    </exponents>\n    <scoefficients>\n      0.00237628\n      0.03167450\n      0.12628880\n      -0.02584552\n      -0.61834910\n      -0.45670080\n    </scoefficients>\n    <pcoefficients>\n      0.00397149\n      0.03108174\n      0.13574390\n      0.34768270\n      0.46263400\n      0.20516320\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      54.52355000\n      18.29783000\n      7.86734800\n      3.34053400\n      1.39375600\n      0.55132600\n    </exponents>\n    <scoefficients>\n      -0.00399300\n      0.07409663\n      0.25420000\n      -0.29216570\n      -0.73187030\n      -0.20407840\n    </scoefficients>\n    <pcoefficients>\n      -0.00729077\n      -0.02926027\n      0.06564150\n      0.40006520\n      0.49502360\n      0.17582400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.15194700\n      0.81106300\n      0.12101700\n    </exponents>\n    <scoefficients>\n      0.05379843\n      0.27599710\n      -1.12969200\n    </scoefficients>\n    <pcoefficients>\n      -0.21654960\n      0.12404880\n      0.97240640\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04303700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      25.59306000\n      6.80099000\n      2.05164700\n    </exponents>\n    <coefficients>\n      0.09004748\n      0.39317030\n      0.69768440\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.55567100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ni\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      71396.35000000\n      10720.84000000\n      2442.12900000\n      688.42650000\n      220.61530000\n      75.39373000\n    </exponents>\n    <coefficients>\n      0.00175300\n      0.01343122\n      0.06627041\n      0.23025080\n      0.47901860\n      0.35234440\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1492.53200000\n      355.40130000\n      114.95340000\n      43.22043000\n      17.59710000\n      7.25776500\n    </exponents>\n    <scoefficients>\n      0.00237071\n      0.03160566\n      0.12663350\n      -0.02417037\n      -0.61877750\n      -0.45767700\n    </scoefficients>\n    <pcoefficients>\n      0.00396755\n      0.03109479\n      0.13595170\n      0.34851360\n      0.46254980\n      0.20351860\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      59.35261000\n      20.02181000\n      8.61456100\n      3.66053100\n      1.52811100\n      0.60405700\n    </exponents>\n    <scoefficients>\n      -0.00416200\n      0.07425111\n      0.25413600\n      -0.29034770\n      -0.73021210\n      -0.20760570\n    </scoefficients>\n    <pcoefficients>\n      -0.00742145\n      -0.02953410\n      0.06731852\n      0.40166600\n      0.49266230\n      0.17568930\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.37927600\n      0.88583900\n      0.12852900\n    </exponents>\n    <scoefficients>\n      0.05157888\n      0.27076110\n      -1.12477000\n    </scoefficients>\n    <pcoefficients>\n      -0.18876630\n      0.10151990\n      0.97909060\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04519500\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      28.19147000\n      7.52358400\n      2.27122800\n    </exponents>\n    <coefficients>\n      0.09098881\n      0.39582080\n      0.69471540\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.61160300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cu\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      76794.38000000\n      11530.70000000\n      2626.57500000\n      740.49030000\n      237.35280000\n      81.15818000\n    </exponents>\n    <coefficients>\n      0.00174816\n      0.01339602\n      0.06610885\n      0.22982650\n      0.47876750\n      0.35307390\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1610.81400000\n      383.63670000\n      124.17330000\n      46.74678000\n      19.06569000\n      7.87156700\n    </exponents>\n    <scoefficients>\n      0.00236405\n      0.03153635\n      0.12694520\n      -0.02262840\n      -0.61920800\n      -0.45853930\n    </scoefficients>\n    <pcoefficients>\n      0.00396331\n      0.03110223\n      0.13613500\n      0.34929140\n      0.46247800\n      0.20201020\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      64.45732000\n      21.85212000\n      9.40534300\n      3.99916800\n      1.67029700\n      0.65962700\n    </exponents>\n    <scoefficients>\n      -0.00433108\n      0.07412307\n      0.25421080\n      -0.28748430\n      -0.72914360\n      -0.21139510\n    </scoefficients>\n    <pcoefficients>\n      -0.00752373\n      -0.02975687\n      0.06849654\n      0.40271410\n      0.49084900\n      0.17592680\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.60008800\n      0.96309400\n      0.13616100\n    </exponents>\n    <scoefficients>\n      0.05027577\n      0.26500400\n      -1.12015500\n    </scoefficients>\n    <pcoefficients>\n      -0.17029110\n      0.09310133\n      0.98143360\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04733200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      30.85341000\n      8.26498500\n      2.49533200\n    </exponents>\n    <coefficients>\n      0.09199905\n      0.39850210\n      0.69178970\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.66765800\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Zn\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      82400.94000000\n      12372.55000000\n      2818.35100000\n      794.57170000\n      254.72320000\n      87.13880000\n    </exponents>\n    <coefficients>\n      0.00174333\n      0.01335966\n      0.06594365\n      0.22941510\n      0.47854530\n      0.35377530\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1732.56900000\n      412.71490000\n      133.67800000\n      50.38585000\n      20.58358000\n      8.50594000\n    </exponents>\n    <scoefficients>\n      0.00236146\n      0.03150177\n      0.12727740\n      -0.02145928\n      -0.61976520\n      -0.45901800\n    </scoefficients>\n    <pcoefficients>\n      0.00396313\n      0.03113411\n      0.13639310\n      0.35012660\n      0.46231790\n      0.20049950\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      69.36492000\n      23.62082000\n      10.18471000\n      4.33408200\n      1.81091800\n      0.71484100\n    </exponents>\n    <scoefficients>\n      -0.00444010\n      0.07505253\n      0.25331110\n      -0.28818970\n      -0.72670520\n      -0.21334390\n    </scoefficients>\n    <pcoefficients>\n      -0.00768926\n      -0.02997982\n      0.07082411\n      0.40461410\n      0.48823250\n      0.17519700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.82384200\n      1.03954300\n      0.14326400\n    </exponents>\n    <scoefficients>\n      0.04898543\n      0.25927930\n      -1.11571100\n    </scoefficients>\n    <pcoefficients>\n      -0.15867630\n      0.08379327\n      0.98405470\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04929600\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      33.70764000\n      9.06110600\n      2.73838300\n    </exponents>\n    <coefficients>\n      0.09262648\n      0.40029800\n      0.68966080\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.73029400\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<atomicguess symbol=\"H\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     0.16371      0.27762 \n     0.27762      0.47079 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -0.07019      0.91759 \n   </alphaeps>\n   <betaeps>\n    -0.25951      0.68500 \n   </betaeps>\n   <alphavectors>\n    -0.24849     -1.30499 \n    -0.81877      1.04612 \n   </alphavectors>\n   <betavectors>\n     0.40461      1.26532 \n     0.68614     -1.13753 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"He\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     0.66346      0.61066 \n     0.61066      0.56205 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -0.55639      1.08876 \n   </alphaeps>\n   <betaeps>\n    -0.55639      1.08876 \n   </betaeps>\n   <alphavectors>\n    -0.57596     -1.15798 \n    -0.53012      1.17967 \n   </alphavectors>\n   <betavectors>\n     0.57596     -1.15798 \n     0.53012      1.17967 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Li\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.02836      0.02778      0.00000      0.00000      0.00000     -0.18753      0.00000      0.00000      0.00000 \n     0.02778      0.11650      0.00000      0.00000      0.00000      0.23269      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.18753      0.23269      0.00000      0.00000      0.00000      0.49532      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.57941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.42058      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -1.85210     -0.10528     -0.03630     -0.03630     -0.03630      0.09632      0.09632      0.09632      0.11891 \n   </alphaeps>\n   <betaeps>\n    -1.85081     -0.09961     -0.03174     -0.03174     -0.03174      0.09963      0.09963      0.09963      0.12267 \n   </betaeps>\n   <alphavectors>\n    -0.99684     -0.20207     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.06595 \n    -0.04817      0.34465     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -2.33453 \n    -0.00000     -0.00000      0.49824     -0.00000     -0.00000     -1.59853      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.49824      0.00000     -0.00000     -1.59853     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.49824     -0.00000      0.00000     -1.59853      0.00000 \n     0.02293      0.69292      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      2.27328 \n     0.00000      0.00000      0.55508      0.00000      0.00000      1.57969     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.55508      0.00000     -0.00000      1.57969     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.55508      0.00000      0.00000      1.57969     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99688     -0.20249      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.06406 \n     0.04752      0.32009     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -2.33804 \n    -0.00000      0.00000     -0.00000      0.00000     -0.47127      1.60668      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.47127      0.00000     -0.00000     -0.00000      1.60668      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.47127     -0.00000     -0.00000      0.00000     -1.60668     -0.00000 \n    -0.02257      0.71678     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.26587 \n     0.00000     -0.00000      0.00000     -0.00000     -0.58158     -1.57012     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.58158     -0.00000      0.00000      0.00000     -1.57012     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.58158      0.00000      0.00000     -0.00000      1.57012      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Be\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.09104     -0.05158      0.00000      0.00000      0.00000     -0.39202      0.00000      0.00000      0.00000 \n    -0.05158      0.17787      0.00000      0.00000      0.00000      0.44375      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.39202      0.44375      0.00000      0.00000      0.00000      1.14049      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -3.81516     -0.19579     -0.06325     -0.06325     -0.06325      0.25595      0.25595      0.25595      0.29224 \n   </alphaeps>\n   <betaeps>\n    -3.81516     -0.19579     -0.06325     -0.06325     -0.06325      0.25595      0.25595      0.25595      0.29224 \n   </betaeps>\n   <alphavectors>\n    -0.99470      0.23684      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00772 \n    -0.04429     -0.29491     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -2.01593 \n     0.00000     -0.00000     -0.00000     -0.49980      0.00000      1.24932      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.49980     -0.00000      0.00000     -0.00000     -1.24932      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.49980      0.00000     -0.00000      1.24932     -0.00000 \n     0.01730     -0.75495     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.90065 \n     0.00000      0.00000      0.00000     -0.59404     -0.00000     -1.20736     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.59404      0.00000     -0.00000      0.00000      1.20736      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.59404     -0.00000      0.00000     -1.20736      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99470      0.23684      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00772 \n    -0.04429     -0.29491     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -2.01593 \n     0.00000      0.00000     -0.00000      0.49980     -0.00000     -0.00000      1.24932     -0.00000      0.00000 \n    -0.00000      0.00000      0.49980      0.00000      0.00000      1.24932      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.49980      0.00000     -0.00000      1.24932     -0.00000 \n     0.01730     -0.75495     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.90065 \n    -0.00000     -0.00000      0.00000      0.59404      0.00000      0.00000     -1.20736     -0.00000     -0.00000 \n     0.00000     -0.00000      0.59404     -0.00000     -0.00000     -1.20736      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.59404     -0.00000      0.00000     -1.20736      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"B\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.09221     -0.10738      0.00000      0.00000      0.00000     -0.35788      0.00000      0.00000      0.00000 \n    -0.10738      0.30842      0.00000      0.00000      0.00000      0.52237      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.11875      0.00000      0.00000      0.00000      0.10191      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.11875      0.00000      0.00000      0.00000      0.10191      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.11875      0.00000      0.00000      0.00000      0.10191 \n    -0.35788      0.52237      0.00000      0.00000      0.00000      0.90373      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.10191      0.00000      0.00000      0.00000      0.08746      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.10191      0.00000      0.00000      0.00000      0.08746      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.10191      0.00000      0.00000      0.00000      0.08746 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.33289      0.33289      0.33289      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00044      0.00044      0.00044      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -6.51886     -0.34388     -0.13051     -0.13051     -0.13051      0.36482      0.36482      0.36482      0.40796 \n   </alphaeps>\n   <betaeps>\n    -6.50722     -0.30028     -0.08958     -0.08958     -0.08958      0.39722      0.39722      0.39722      0.44082 \n   </betaeps>\n   <alphavectors>\n     0.99332      0.24432      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.07899 \n     0.04253     -0.40695     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.85128 \n    -0.00000      0.00000     -0.00000     -0.59692     -0.00000      0.00000      1.13143     -0.00000      0.00000 \n     0.00000      0.00000     -0.59692      0.00000     -0.00000      0.00000     -0.00000      1.13143      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.59692     -1.13143      0.00000     -0.00000      0.00000 \n    -0.01626     -0.65585      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.76811 \n     0.00000     -0.00000     -0.00000     -0.51219      0.00000     -0.00000     -1.17223      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.51219      0.00000     -0.00000      0.00000     -0.00000     -1.17223     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.51219      1.17223      0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99367     -0.24177     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.08244 \n    -0.04032      0.37333     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.85840 \n     0.00000     -0.00000      0.00000      0.56249      0.00000     -0.00000     -0.00000     -1.14894      0.00000 \n     0.00000     -0.00000     -0.56249      0.00000      0.00000      1.14894      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.56249      0.00000     -1.14894      0.00000     -0.00000 \n     0.01529      0.68782      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.75593 \n    -0.00000      0.00000      0.00000      0.54736     -0.00000      0.00000      0.00000      1.15623     -0.00000 \n    -0.00000      0.00000     -0.54736      0.00000      0.00000     -1.15623     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.54736     -0.00000      1.15623     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"C\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.08644     -0.14403      0.00000      0.00000      0.00000     -0.31264      0.00000      0.00000      0.00000 \n    -0.14403      0.42685      0.00000      0.00000      0.00000      0.56124      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.28918      0.00000      0.00000      0.00000      0.20444      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.28917      0.00000      0.00000      0.00000      0.20444      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.28918      0.00000      0.00000      0.00000      0.20444 \n    -0.31264      0.56124      0.00000      0.00000      0.00000      0.75325      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.20444      0.00000      0.00000      0.00000      0.14454      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.20444      0.00000      0.00000      0.00000      0.14453      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.20444      0.00000      0.00000      0.00000      0.14454 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.66667      0.66667      0.66665      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -9.91065     -0.51518     -0.20791     -0.20791     -0.20791      0.46282      0.46282      0.46282      0.53156 \n   </alphaeps>\n   <betaeps>\n    -9.87822     -0.41688     -0.11467     -0.11467     -0.11466      0.53297      0.53297      0.53297      0.60218 \n   </betaeps>\n   <alphavectors>\n     0.99375      0.23711      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.08230 \n     0.03786     -0.48734     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.65653 \n     0.00000     -0.00000      0.65861     -0.00000     -0.00000      1.02317     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.65861     -0.00000     -0.00000      1.02317     -0.00000 \n    -0.00000      0.00000      0.00000     -0.65861     -0.00000     -0.00000      1.02317      0.00000      0.00000 \n    -0.01317     -0.58641     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.61110 \n    -0.00000      0.00000      0.46562      0.00000      0.00000     -1.12421     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.46562     -0.00000     -0.00000     -1.12421      0.00000 \n     0.00000      0.00000     -0.00000     -0.46562      0.00000      0.00000     -1.12421     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99428      0.23256      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.08862 \n    -0.03459     -0.43211     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.67186 \n    -0.00000      0.00000     -0.59821     -0.00000     -0.00000      1.05962      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.59820      0.00000      0.00000      1.05962      0.00000 \n    -0.00000      0.00000      0.00000     -0.59821     -0.00000      0.00000      1.05962      0.00000      0.00000 \n     0.01184     -0.63958     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.59076 \n    -0.00000      0.00000     -0.52998      0.00000      0.00000     -1.09534      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.52999      0.00000      0.00000     -1.09534      0.00000 \n     0.00000     -0.00000     -0.00000     -0.52998      0.00000     -0.00000     -1.09534     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"N\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.08410     -0.16724      0.00000      0.00000      0.00000     -0.29011      0.00000      0.00000      0.00000 \n    -0.16724      0.50515      0.00000      0.00000      0.00000      0.58118      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.47907      0.00000      0.00000      0.00000      0.30930      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.47907      0.00000      0.00000      0.00000      0.30930      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.47907      0.00000      0.00000      0.00000      0.30930 \n    -0.29011      0.58118      0.00000      0.00000      0.00000      0.68340      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.30930      0.00000      0.00000      0.00000      0.19969      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.30930      0.00000      0.00000      0.00000      0.19969      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.30930      0.00000      0.00000      0.00000      0.19969 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -13.98305     -0.70902     -0.29458     -0.29458     -0.29458      0.57187      0.57187      0.57187      0.67010 \n   </alphaeps>\n   <betaeps>\n   -13.92154     -0.54822     -0.14082     -0.14082     -0.14082      0.68399      0.68399      0.68399      0.78289 \n   </betaeps>\n   <alphavectors>\n    -0.99388     -0.23472     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.09518 \n    -0.03439      0.53391      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.50830 \n     0.00000      0.00000      0.00000      0.69215      0.00000     -0.00000      0.00000      0.94349     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.69215     -0.94349      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.69215     -0.00000      0.00000     -0.00000     -0.94349      0.00000     -0.00000 \n     0.01084      0.55106      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.48494 \n    -0.00000     -0.00000     -0.00000      0.44687     -0.00000      0.00000     -0.00000     -1.08145      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.44687      1.08145     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.44687      0.00000     -0.00000      0.00000      1.08145      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99454     -0.22826     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.10363 \n     0.03063      0.46687      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.53046 \n    -0.00000      0.00000      0.61460      0.00000     -0.00000     -0.99574      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.61460     -0.00000     -0.00000     -0.99574      0.00000 \n     0.00000     -0.00000     -0.00000      0.61460      0.00000     -0.00000      0.99574      0.00000      0.00000 \n    -0.00942      0.61606      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.45919 \n     0.00000     -0.00000      0.53180     -0.00000      0.00000      1.04232     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.53180      0.00000      0.00000      1.04232     -0.00000 \n    -0.00000      0.00000      0.00000      0.53180     -0.00000      0.00000     -1.04232      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"O\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.08920     -0.19509      0.00000      0.00000      0.00000     -0.27960      0.00000      0.00000      0.00000 \n    -0.19509      0.58304      0.00000      0.00000      0.00000      0.59234      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.64574      0.00000      0.00000      0.00000      0.41638      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.64574      0.00000      0.00000      0.00000      0.41638      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.64574      0.00000      0.00000      0.00000      0.41638 \n    -0.27960      0.59234      0.00000      0.00000      0.00000      0.60781      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.41638      0.00000      0.00000      0.00000      0.26996      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.41638      0.00000      0.00000      0.00000      0.26996      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.41638      0.00000      0.00000      0.00000      0.26996 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -18.75258     -0.89462     -0.35779     -0.35779     -0.35779      0.74524      0.74525      0.74525      0.86315 \n   </alphaeps>\n   <betaeps>\n   -18.70223     -0.78176     -0.24795     -0.24795     -0.24795      0.82049      0.82049      0.82049      0.93847 \n   </betaeps>\n   <alphavectors>\n     0.99397      0.23919      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.11366 \n     0.03145     -0.55739     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.46820 \n    -0.00000     -0.00000      0.70644      0.00000      0.00000     -0.91487     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.70644      0.00000      0.00000     -0.91487      0.00000 \n     0.00000     -0.00000     -0.00000      0.70644     -0.00000      0.00000     -0.91487     -0.00000      0.00000 \n    -0.00963     -0.53258      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.45463 \n     0.00000      0.00000      0.43721      0.00000      0.00000      1.07000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.43721     -0.00000     -0.00000      1.07000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.43721      0.00000     -0.00000      1.07000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99435      0.23512     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.11870 \n    -0.02942     -0.52010     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.48186 \n     0.00000     -0.00000      0.00000     -0.00000      0.66335     -0.00000     -0.00000      0.94658     -0.00000 \n    -0.00000      0.00000     -0.66335      0.00000      0.00000     -0.00000      0.94658     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.66335     -0.00000     -0.94658      0.00000     -0.00000     -0.00000 \n     0.00886     -0.56921      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.44070 \n    -0.00000      0.00000     -0.00000      0.00000      0.48624     -0.00000     -0.00000     -1.04862      0.00000 \n     0.00000     -0.00000     -0.48624     -0.00000     -0.00000      0.00000     -1.04862      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.48624      0.00000      1.04862      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"F\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.09534     -0.19807      0.00000      0.00000      0.00000     -0.29326      0.00000      0.00000      0.00000 \n    -0.19807      0.55351      0.00000      0.00000      0.00000      0.59411      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.78786      0.00000      0.00000      0.00000      0.52674      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.78786      0.00000      0.00000      0.00000      0.52675      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.78786      0.00000      0.00000      0.00000      0.52674 \n    -0.29326      0.59411      0.00000      0.00000      0.00000      0.64138      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.52674      0.00000      0.00000      0.00000      0.35256      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.52675      0.00000      0.00000      0.00000      0.35256      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.52674      0.00000      0.00000      0.00000      0.35256 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.66667      0.66667      0.66667      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -24.16923     -1.07776     -0.40242     -0.40241     -0.40241      1.04434      1.04434      1.04434      1.22114 \n   </alphaeps>\n   <betaeps>\n   -24.13992     -1.01869     -0.34404     -0.34404     -0.34404      1.08446      1.08446      1.08446      1.26141 \n   </betaeps>\n   <alphavectors>\n     0.99399      0.24480      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.12703 \n     0.02968     -0.53280     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.48038 \n     0.00000      0.00000     -0.00000      0.00000      0.69444      0.00000     -0.92208      0.00000     -0.00000 \n     0.00000     -0.00000      0.69444     -0.00000      0.00000      0.92208     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.69444      0.00000      0.00000     -0.00000     -0.92208     -0.00000 \n    -0.00875     -0.55879     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.44458 \n    -0.00000     -0.00000     -0.00000      0.00000      0.45191      0.00000      1.06219      0.00000      0.00000 \n    -0.00000      0.00000      0.45191     -0.00000      0.00000     -1.06219     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.45191     -0.00000      0.00000      0.00000      1.06219      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99415      0.24302      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.12913 \n     0.02882     -0.51761      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.48577 \n     0.00000      0.00000      0.00000      0.00000     -0.67707     -0.00000      0.93491      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.67707     -0.00000     -0.00000     -0.93491     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.67707     -0.00000      0.00000      0.00000     -0.93491      0.00000 \n    -0.00843     -0.57357     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.43878 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.47171      0.00000     -1.05355     -0.00000      0.00000 \n     0.00000      0.00000     -0.47171      0.00000      0.00000      1.05355      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.47171      0.00000     -0.00000     -0.00000      1.05355     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ne\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.09830     -0.20464      0.00000      0.00000      0.00000     -0.29441      0.00000      0.00000      0.00000 \n    -0.20464      0.55545      0.00000      0.00000      0.00000      0.59665      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.95499      0.00000      0.00000      0.00000      0.63357      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.95499      0.00000      0.00000      0.00000      0.63357      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.95499      0.00000      0.00000      0.00000      0.63357 \n    -0.29441      0.59665      0.00000      0.00000      0.00000      0.64367      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.63357      0.00000      0.00000      0.00000      0.42033      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.63357      0.00000      0.00000      0.00000      0.42033      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.63357      0.00000      0.00000      0.00000      0.42033 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -30.27035     -1.27480     -0.44549     -0.44549     -0.44549      1.34280      1.34280      1.34280      1.57960 \n   </alphaeps>\n   <betaeps>\n   -30.27035     -1.27480     -0.44549     -0.44549     -0.44549      1.34280      1.34280      1.34280      1.57960 \n   </betaeps>\n   <alphavectors>\n    -0.99432     -0.24592      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.13323 \n    -0.02726      0.52629     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.47136 \n    -0.00000      0.00000      0.00000      0.00000     -0.69101     -0.91846      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.69101      0.00000     -0.00000      0.00000      0.91846      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.69101     -0.00000      0.00000     -0.00000     -0.91846     -0.00000 \n     0.00775      0.56725     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.42797 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.45844      1.05399     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.45844     -0.00000      0.00000     -0.00000     -1.05399      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.45844      0.00000     -0.00000      0.00000      1.05399      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99432     -0.24592     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.13323 \n    -0.02726      0.52629      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.47136 \n     0.00000      0.00000      0.00000      0.69101     -0.00000     -0.91846     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.69101     -0.00000      0.91846      0.00000      0.00000 \n     0.00000      0.00000      0.69101      0.00000     -0.00000      0.00000      0.00000     -0.91846      0.00000 \n     0.00775      0.56725      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.42797 \n    -0.00000     -0.00000     -0.00000      0.45844      0.00000      1.05399      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.45844      0.00000     -1.05399      0.00000     -0.00000 \n    -0.00000     -0.00000      0.45844     -0.00000      0.00000     -0.00000     -0.00000      1.05399     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Na\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.11332     -0.49329      0.00000      0.00000      0.00000      0.00908      0.00000      0.00000      0.00000      0.02358      0.00000      0.00000      0.00000 \n    -0.49329      2.14730      0.00000      0.00000      0.00000     -0.07911      0.00000      0.00000      0.00000     -0.11471      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.97874      0.00000      0.00000      0.00000      0.05892      0.00000      0.00000      0.00000     -0.01733      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.97874      0.00000      0.00000      0.00000      0.05892      0.00000      0.00000      0.00000     -0.01733      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.97874      0.00000      0.00000      0.00000      0.05892      0.00000      0.00000      0.00000     -0.01733 \n     0.00908     -0.07911      0.00000      0.00000      0.00000      0.26809      0.00000      0.00000      0.00000      0.27571      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.05892      0.00000      0.00000      0.00000      0.00175      0.00000      0.00000      0.00000     -0.00052      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05892      0.00000      0.00000      0.00000      0.00175      0.00000      0.00000      0.00000     -0.00052      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05892      0.00000      0.00000      0.00000      0.00175      0.00000      0.00000      0.00000     -0.00052 \n     0.02358     -0.11471      0.00000      0.00000      0.00000      0.27571      0.00000      0.00000      0.00000      0.28409      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01733      0.00000      0.00000      0.00000     -0.00052      0.00000      0.00000      0.00000      0.00015      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01733      0.00000      0.00000      0.00000     -0.00052      0.00000      0.00000      0.00000      0.00015      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01733      0.00000      0.00000      0.00000     -0.00052      0.00000      0.00000      0.00000      0.00015 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.49999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -37.73004     -2.06604     -1.06481     -1.06481     -1.06481     -0.10440     -0.02850     -0.02850     -0.02850      0.06603      0.10114      0.10114      0.10114 \n   </alphaeps>\n   <betaeps>\n   -37.73004     -2.06604     -1.06481     -1.06481     -1.06481     -0.10440     -0.02850     -0.02850     -0.02850      0.06603      0.10114      0.10114      0.10114 \n   </betaeps>\n   <alphavectors>\n     0.99728      0.24775      0.00000      0.00000      0.00000     -0.03776     -0.00000      0.00000      0.00000     -0.02765     -0.00000     -0.00000      0.00000 \n     0.01145     -1.02632     -0.00000     -0.00000     -0.00000      0.20094      0.00000     -0.00000     -0.00000     -0.04916      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.99467     -0.00000      0.00000     -0.11599     -0.00000     -0.00000     -0.00000     -0.20636     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.99467     -0.00000     -0.00000      0.00000     -0.11599      0.00000     -0.00000     -0.00000     -0.20636 \n    -0.00000     -0.00000     -0.99467      0.00000     -0.00000     -0.00000     -0.00000      0.11599      0.00000      0.00000      0.00000     -0.20636     -0.00000 \n    -0.00223     -0.01214      0.00000     -0.00000     -0.00000     -0.51748     -0.00000     -0.00000      0.00000     -2.01118     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.02962      0.00000     -0.00000      0.29901     -0.00000      0.00000      0.00000      1.34684     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.02962      0.00000      0.00000      0.00000      0.29901     -0.00000      0.00000     -0.00000      1.34684 \n     0.00000      0.00000     -0.02962      0.00000     -0.00000      0.00000     -0.00000     -0.29901      0.00000     -0.00000      0.00000      1.34684     -0.00000 \n     0.00081      0.00372      0.00000      0.00000      0.00000     -0.53297     -0.00000     -0.00000      0.00000      2.01753     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00871     -0.00000     -0.00000      0.77908      0.00000     -0.00000     -0.00000     -1.11212      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00871      0.00000      0.00000     -0.00000      0.77908      0.00000     -0.00000      0.00000     -1.11212 \n     0.00000      0.00000      0.00871     -0.00000      0.00000      0.00000      0.00000     -0.77908     -0.00000      0.00000     -0.00000     -1.11212      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99728     -0.24775      0.00000      0.00000     -0.00000      0.03776      0.00000     -0.00000     -0.00000      0.02765     -0.00000     -0.00000      0.00000 \n    -0.01145      1.02632      0.00000      0.00000     -0.00000     -0.20094     -0.00000      0.00000      0.00000      0.04916     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.99467      0.00000     -0.11599     -0.00000      0.00000      0.00000      0.20636      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.99467     -0.00000     -0.00000     -0.00000     -0.11599      0.00000     -0.00000      0.00000     -0.00000      0.20636 \n    -0.00000      0.00000      0.99467     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.11599     -0.00000      0.00000      0.20636      0.00000 \n     0.00223      0.01214      0.00000     -0.00000      0.00000      0.51748      0.00000     -0.00000     -0.00000      2.01118     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.02962     -0.00000      0.29901      0.00000      0.00000     -0.00000     -1.34684      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.02962      0.00000      0.00000      0.00000      0.29901      0.00000      0.00000     -0.00000     -0.00000     -1.34684 \n     0.00000     -0.00000      0.02962     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.29901      0.00000      0.00000     -1.34684      0.00000 \n    -0.00081     -0.00372     -0.00000      0.00000     -0.00000      0.53297      0.00000     -0.00000     -0.00000     -2.01754      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00871     -0.00000      0.77908     -0.00000     -0.00000      0.00000      1.11212     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00871     -0.00000      0.00000      0.00000      0.77908     -0.00000     -0.00000      0.00000      0.00000      1.11212 \n     0.00000     -0.00000     -0.00871      0.00000     -0.00000      0.00000      0.00000      0.00000      0.77908     -0.00000     -0.00000      1.11212     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mg\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.12440     -0.52786      0.00000      0.00000      0.00000      0.03895      0.00000      0.00000      0.00000      0.05945      0.00000      0.00000      0.00000 \n    -0.52786      2.24074      0.00000      0.00000      0.00000     -0.24620      0.00000      0.00000      0.00000     -0.27825      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.96559      0.00000      0.00000      0.00000      0.07972      0.00000      0.00000      0.00000     -0.02716      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.96559      0.00000      0.00000      0.00000      0.07972      0.00000      0.00000      0.00000     -0.02716      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.96559      0.00000      0.00000      0.00000      0.07972      0.00000      0.00000      0.00000     -0.02716 \n     0.03895     -0.24620      0.00000      0.00000      0.00000      0.67508      0.00000      0.00000      0.00000      0.56363      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.07972      0.00000      0.00000      0.00000      0.00323      0.00000      0.00000      0.00000     -0.00110      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.07972      0.00000      0.00000      0.00000      0.00323      0.00000      0.00000      0.00000     -0.00110      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.07972      0.00000      0.00000      0.00000      0.00323      0.00000      0.00000      0.00000     -0.00110 \n     0.05945     -0.27825      0.00000      0.00000      0.00000      0.56363      0.00000      0.00000      0.00000      0.47308      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.02716      0.00000      0.00000      0.00000     -0.00110      0.00000      0.00000      0.00000      0.00038      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.02716      0.00000      0.00000      0.00000     -0.00110      0.00000      0.00000      0.00000      0.00038      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02716      0.00000      0.00000      0.00000     -0.00110      0.00000      0.00000      0.00000      0.00038 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -45.95953     -2.89792     -1.71432     -1.71432     -1.71432     -0.17590     -0.04979     -0.04979     -0.04979      0.09325      0.14778      0.14778      0.14778 \n   </alphaeps>\n   <betaeps>\n   -45.95953     -2.89792     -1.71432     -1.71432     -1.71432     -0.17590     -0.04979     -0.04979     -0.04979      0.09325      0.14778      0.14778      0.14778 \n   </betaeps>\n   <alphavectors>\n     0.99700     -0.25592     -0.00000      0.00000     -0.00000      0.05190     -0.00000      0.00000     -0.00000     -0.04822     -0.00000     -0.00000     -0.00000 \n     0.01214      1.02541      0.00000     -0.00000      0.00000     -0.26222      0.00000     -0.00000      0.00000      0.02440      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.99136      0.00000     -0.00000     -0.15904      0.00000     -0.00000     -0.00000     -0.00000     -0.25037      0.00000 \n    -0.00000      0.00000     -0.99136     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.15904     -0.00000      0.25037      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.99136     -0.00000      0.00000      0.15904     -0.00000      0.00000     -0.00000      0.00000      0.25037 \n    -0.00339      0.02838      0.00000     -0.00000     -0.00000      0.58028      0.00000      0.00000     -0.00000     -1.86007     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.04021     -0.00000      0.00000      0.42133     -0.00000      0.00000      0.00000      0.00000      1.36165     -0.00000 \n     0.00000     -0.00000     -0.04021      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.42133      0.00000     -1.36165     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.04021     -0.00000      0.00000     -0.42133      0.00000     -0.00000      0.00000     -0.00000     -1.36165 \n     0.00159     -0.01136     -0.00000      0.00000      0.00000      0.48622     -0.00000      0.00000     -0.00000      1.88292     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.01370      0.00000     -0.00000      0.67145      0.00000     -0.00000     -0.00000     -0.00000     -1.21969      0.00000 \n     0.00000     -0.00000      0.01370      0.00000      0.00000      0.00000      0.00000      0.00000      0.67145     -0.00000      1.21969     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.01370      0.00000     -0.00000     -0.67145      0.00000      0.00000      0.00000     -0.00000      1.21969 \n   </alphavectors>\n   <betavectors>\n     0.99700      0.25592      0.00000     -0.00000     -0.00000     -0.05190     -0.00000     -0.00000      0.00000     -0.04822     -0.00000      0.00000     -0.00000 \n     0.01214     -1.02541     -0.00000      0.00000      0.00000      0.26222      0.00000      0.00000     -0.00000      0.02440      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.99136     -0.00000      0.00000     -0.15904      0.00000     -0.00000     -0.00000      0.25037      0.00000      0.00000 \n    -0.00000      0.00000      0.99136     -0.00000      0.00000      0.00000      0.00000     -0.15904      0.00000     -0.00000     -0.00000     -0.00000      0.25037 \n     0.00000      0.00000      0.00000     -0.00000     -0.99136     -0.00000     -0.00000      0.00000     -0.15904      0.00000     -0.00000     -0.25037     -0.00000 \n    -0.00339     -0.02838     -0.00000      0.00000      0.00000     -0.58028     -0.00000     -0.00000      0.00000     -1.86007      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.04021      0.00000     -0.00000      0.42133     -0.00000      0.00000      0.00000     -1.36165      0.00000     -0.00000 \n     0.00000     -0.00000      0.04021      0.00000     -0.00000     -0.00000     -0.00000      0.42133     -0.00000      0.00000      0.00000      0.00000     -1.36165 \n     0.00000     -0.00000     -0.00000      0.00000     -0.04021      0.00000     -0.00000      0.00000      0.42133      0.00000     -0.00000      1.36165      0.00000 \n     0.00159      0.01136      0.00000     -0.00000      0.00000     -0.48622     -0.00000     -0.00000      0.00000      1.88292      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.01370     -0.00000      0.00000      0.67145      0.00000     -0.00000     -0.00000      1.21969     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.01370     -0.00000      0.00000      0.00000      0.00000      0.67145      0.00000     -0.00000     -0.00000     -0.00000      1.21969 \n    -0.00000      0.00000      0.00000     -0.00000      0.01370      0.00000      0.00000     -0.00000      0.67145     -0.00000      0.00000     -1.21969     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sc\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.18001      0.67267      0.00000      0.00000      0.00000     -0.16734      0.00000      0.00000      0.00000      0.03282      0.00000      0.00000      0.00000     -0.02233      0.00000      0.00000      0.00000      0.02583      0.00000      0.00000      0.02583      0.00000      0.02583      0.00086      0.00000      0.00000      0.00086      0.00000      0.00086 \n     0.67267      2.51448      0.00000      0.00000      0.00000     -0.83253      0.00000      0.00000      0.00000      0.14241      0.00000      0.00000      0.00000     -0.09152      0.00000      0.00000      0.00000      0.04748      0.00000      0.00000      0.04748      0.00000      0.04748      0.00354      0.00000      0.00000      0.00354      0.00000      0.00354 \n     0.00000      0.00000      2.22118      0.00000      0.00000      0.00000     -0.70309      0.00000      0.00000      0.00000     -0.01701      0.00000      0.00000      0.00000      0.00732      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.22118      0.00000      0.00000      0.00000     -0.70309      0.00000      0.00000      0.00000     -0.01701      0.00000      0.00000      0.00000      0.00732      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.22118      0.00000      0.00000      0.00000     -0.70309      0.00000      0.00000      0.00000     -0.01701      0.00000      0.00000      0.00000      0.00732      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.16734     -0.83253      0.00000      0.00000      0.00000      2.50906      0.00000      0.00000      0.00000     -0.46379      0.00000      0.00000      0.00000      0.30762      0.00000      0.00000      0.00000      0.00910      0.00000      0.00000      0.00910      0.00000      0.00910      0.00375      0.00000      0.00000      0.00375      0.00000      0.00375 \n     0.00000      0.00000     -0.70309      0.00000      0.00000      0.00000      2.22061      0.00000      0.00000      0.00000      0.02111      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.70309      0.00000      0.00000      0.00000      2.22061      0.00000      0.00000      0.00000      0.02111      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.70309      0.00000      0.00000      0.00000      2.22061      0.00000      0.00000      0.00000      0.02111      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03282      0.14241      0.00000      0.00000      0.00000     -0.46379      0.00000      0.00000      0.00000      0.69157      0.00000      0.00000      0.00000     -0.49324      0.00000      0.00000      0.00000     -0.03485      0.00000      0.00000     -0.03485      0.00000     -0.03485     -0.02486      0.00000      0.00000     -0.02486      0.00000     -0.02486 \n     0.00000      0.00000     -0.01701      0.00000      0.00000      0.00000      0.02111      0.00000      0.00000      0.00000      0.00025      0.00000      0.00000      0.00000     -0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01701      0.00000      0.00000      0.00000      0.02111      0.00000      0.00000      0.00000      0.00025      0.00000      0.00000      0.00000     -0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01701      0.00000      0.00000      0.00000      0.02111      0.00000      0.00000      0.00000      0.00025      0.00000      0.00000      0.00000     -0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02233     -0.09152      0.00000      0.00000      0.00000      0.30762      0.00000      0.00000      0.00000     -0.49324      0.00000      0.00000      0.00000      0.35402      0.00000      0.00000      0.00000      0.02480      0.00000      0.00000      0.02480      0.00000      0.02480      0.01733      0.00000      0.00000      0.01733      0.00000      0.01733 \n     0.00000      0.00000      0.00732      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000     -0.00008      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00732      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000     -0.00008      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00732      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000     -0.00008      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02583      0.04748      0.00000      0.00000      0.00000      0.00910      0.00000      0.00000      0.00000     -0.03485      0.00000      0.00000      0.00000      0.02480      0.00000      0.00000      0.00000      0.10807      0.00000      0.00000     -0.04943      0.00000     -0.04943      0.07623      0.00000      0.00000     -0.03586      0.00000     -0.03586 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.31501      0.00000      0.00000      0.00000      0.00000      0.00000      0.22419      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.31501      0.00000      0.00000      0.00000      0.00000      0.00000      0.22419      0.00000      0.00000      0.00000 \n     0.02583      0.04748      0.00000      0.00000      0.00000      0.00910      0.00000      0.00000      0.00000     -0.03485      0.00000      0.00000      0.00000      0.02480      0.00000      0.00000      0.00000     -0.04943      0.00000      0.00000      0.10807      0.00000     -0.04943     -0.03586      0.00000      0.00000      0.07623      0.00000     -0.03586 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.31501      0.00000      0.00000      0.00000      0.00000      0.00000      0.22419      0.00000 \n     0.02583      0.04748      0.00000      0.00000      0.00000      0.00910      0.00000      0.00000      0.00000     -0.03485      0.00000      0.00000      0.00000      0.02480      0.00000      0.00000      0.00000     -0.04943      0.00000      0.00000     -0.04943      0.00000      0.10807     -0.03586      0.00000      0.00000     -0.03586      0.00000      0.07623 \n     0.00086      0.00354      0.00000      0.00000      0.00000      0.00375      0.00000      0.00000      0.00000     -0.02486      0.00000      0.00000      0.00000      0.01733      0.00000      0.00000      0.00000      0.07623      0.00000      0.00000     -0.03586      0.00000     -0.03586      0.05431      0.00000      0.00000     -0.02547      0.00000     -0.02547 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22419      0.00000      0.00000      0.00000      0.00000      0.00000      0.15955      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22419      0.00000      0.00000      0.00000      0.00000      0.00000      0.15955      0.00000      0.00000      0.00000 \n     0.00086      0.00354      0.00000      0.00000      0.00000      0.00375      0.00000      0.00000      0.00000     -0.02486      0.00000      0.00000      0.00000      0.01733      0.00000      0.00000      0.00000     -0.03586      0.00000      0.00000      0.07623      0.00000     -0.03586     -0.02547      0.00000      0.00000      0.05431      0.00000     -0.02547 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22419      0.00000      0.00000      0.00000      0.00000      0.00000      0.15955      0.00000 \n     0.00086      0.00354      0.00000      0.00000      0.00000      0.00375      0.00000      0.00000      0.00000     -0.02486      0.00000      0.00000      0.00000      0.01733      0.00000      0.00000      0.00000     -0.03586      0.00000      0.00000     -0.03586      0.00000      0.07623     -0.02547      0.00000      0.00000     -0.02547      0.00000      0.05431 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.92591      0.00248      0.00248      0.00248      0.00248      0.00248      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.98760      0.21482      0.21482      0.21482      0.21482      0.21482      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -160.12500    -17.17895    -14.21480    -14.21480    -14.21480     -1.94827     -1.19296     -1.19296     -1.19296     -0.14345     -0.08326     -0.08326     -0.08326     -0.08326     -0.08326     -0.04841     -0.04841     -0.04841      0.04445      0.10747      0.10747      0.10747      0.39763      0.58997      0.58997      0.58997      0.58997      0.58997      2.94952 \n   </alphaeps>\n   <betaeps>\n  -160.12530    -17.18776    -14.22175    -14.22175    -14.22175     -1.97879     -1.22351     -1.22351     -1.22351     -0.15474     -0.11183     -0.11183     -0.11183     -0.11183     -0.11183     -0.05331     -0.05331     -0.05331      0.04081      0.09946      0.09946      0.09946      0.38748      0.56848      0.56848      0.56848      0.56848      0.56848      2.92224 \n   </betaeps>\n   <alphavectors>\n     0.99612     -0.29299      0.00000      0.00000     -0.00000     -0.10577     -0.00000      0.00000      0.00000     -0.02701      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00850      0.00000      0.00000      0.00000      0.04008      0.00000     -0.00000      0.00000      0.00000      0.00000      0.01758 \n    -0.01385     -1.03061      0.00000      0.00000     -0.00000     -0.42691      0.00000      0.00000      0.00000     -0.11237      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.15252      0.00000      0.00000      0.00000     -0.01931      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02913 \n    -0.00000      0.00000      0.99489      0.00000      0.00000      0.00000     -0.34752     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.06888     -0.00000      0.00000     -0.00000      0.10756      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.99489      0.00000     -0.00000     -0.00000      0.34752     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.06888     -0.00000      0.00000      0.00000     -0.10756     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.99489     -0.00000      0.00000     -0.00000      0.34752     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.06888     -0.00000     -0.00000      0.00000     -0.10756      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.01634     -0.07259     -0.00000      0.00000     -0.00000      1.05367      0.00000     -0.00000     -0.00000      0.37135     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00610     -0.00000     -0.00000     -0.00000     -1.35440     -0.00000      0.00000      0.00000      0.00000     -0.00000     -6.91562 \n    -0.00000      0.00000      0.01473      0.00000      0.00000      0.00000      1.05356      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.13577      0.00000     -0.00000      0.00000     -0.00573     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.01473     -0.00000      0.00000      0.00000     -1.05356      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.13577     -0.00000     -0.00000     -0.00000      0.00573      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.01473      0.00000     -0.00000      0.00000     -1.05356      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.13577      0.00000      0.00000     -0.00000      0.00573      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00068     -0.00059      0.00000      0.00000      0.00000     -0.01051      0.00000      0.00000      0.00000     -0.59281      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -2.75314      0.00000      0.00000      0.00000     -5.32570     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.71227 \n     0.00000      0.00000     -0.00494     -0.00000     -0.00000     -0.00000      0.01059      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.42156     -0.00000      0.00000      0.00000      1.46011      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00494      0.00000      0.00000      0.00000     -0.01059     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.42156     -0.00000      0.00000      0.00000     -1.46011     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00494     -0.00000      0.00000     -0.00000     -0.01059     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.42156     -0.00000     -0.00000      0.00000     -1.46011      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00023      0.00005      0.00000     -0.00000      0.00000     -0.00334      0.00000      0.00000      0.00000      0.45671     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -2.31945     -0.00000     -0.00000     -0.00000     -1.84977     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.49584 \n    -0.00000     -0.00000      0.00268      0.00000      0.00000      0.00000     -0.00283     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.65230     -0.00000      0.00000     -0.00000     -1.37044     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00268     -0.00000      0.00000      0.00000      0.00283      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.65230      0.00000     -0.00000     -0.00000      1.37044     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00268      0.00000     -0.00000     -0.00000      0.00283     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.65230      0.00000      0.00000     -0.00000      1.37044     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00614     -0.02273     -0.00000      0.00000     -0.00000     -0.00750     -0.00000      0.00000      0.00000      0.02585      0.68925     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.09303      0.00000      0.00000      0.00000     -0.23267     -0.84285      0.00000      0.00000     -0.00000     -0.00000     -3.30007 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.19381     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.45985      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.19381      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.45985      0.00000      0.00000     -0.00000     -0.00000 \n     0.00614     -0.02273     -0.00000      0.00000     -0.00000     -0.00750     -0.00000      0.00000      0.00000      0.02585     -0.34462      0.00000      0.00000      0.59691     -0.00000      0.00000      0.00000      0.00000      0.09303     -0.00000     -0.00000     -0.00000     -0.23267      0.42142     -0.00000     -0.00000      0.72993      0.00000     -3.30007 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.19381      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.45985     -0.00000 \n     0.00614     -0.02273     -0.00000      0.00000     -0.00000     -0.00750      0.00000      0.00000      0.00000      0.02585     -0.34462      0.00000      0.00000     -0.59691      0.00000     -0.00000     -0.00000     -0.00000      0.09303     -0.00000     -0.00000     -0.00000     -0.23267      0.42142     -0.00000      0.00000     -0.72993      0.00000     -3.30007 \n    -0.00009     -0.00157      0.00000      0.00000     -0.00000     -0.00600      0.00000      0.00000      0.00000      0.01228      0.50150     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.27854      0.00000      0.00000      0.00000     -1.87760      0.96641      0.00000      0.00000      0.00000     -0.00000      0.76442 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.86862      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.67387     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.86862     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.67387      0.00000     -0.00000      0.00000      0.00000 \n    -0.00009     -0.00157      0.00000      0.00000     -0.00000     -0.00600      0.00000      0.00000      0.00000      0.01228     -0.25075      0.00000      0.00000      0.43431     -0.00000      0.00000      0.00000      0.00000     -0.27854     -0.00000     -0.00000     -0.00000     -1.87760     -0.48320      0.00000      0.00000     -0.83694      0.00000      0.76442 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.86862     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.67387     -0.00000 \n    -0.00009     -0.00157      0.00000      0.00000     -0.00000     -0.00600     -0.00000      0.00000      0.00000      0.01228     -0.25075      0.00000      0.00000     -0.43431      0.00000     -0.00000     -0.00000     -0.00000     -0.27854     -0.00000     -0.00000     -0.00000     -1.87760     -0.48321      0.00000      0.00000      0.83694      0.00000      0.76442 \n   </alphavectors>\n   <betavectors>\n     0.99612     -0.29295      0.00000      0.00000      0.00000      0.10587      0.00000     -0.00000      0.00000     -0.02791     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00820     -0.00000      0.00000     -0.00000      0.03963     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01754 \n    -0.01385     -1.03045      0.00000      0.00000      0.00000      0.42730      0.00000     -0.00000      0.00000     -0.11728     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.14821     -0.00000      0.00000     -0.00000     -0.02335     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.02892 \n    -0.00000     -0.00000     -0.99474     -0.00000     -0.00000      0.00000     -0.34799      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.07305     -0.00000      0.00000      0.00000      0.10458     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.99474      0.00000      0.00000     -0.00000     -0.34799     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.07305     -0.00000     -0.00000      0.00000      0.10458     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.99474     -0.00000      0.00000      0.00000      0.34799      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.07305     -0.00000     -0.00000     -0.00000     -0.10458      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.01634     -0.07436     -0.00000      0.00000     -0.00000     -1.05135      0.00000      0.00000     -0.00000      0.39551      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00674      0.00000     -0.00000      0.00000     -1.36620      0.00000     -0.00000     -0.00000      0.00000     -0.00000      6.91229 \n    -0.00000     -0.00000     -0.01513     -0.00000     -0.00000      0.00000      1.05365     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.13512      0.00000     -0.00000      0.00000      0.00031     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.01513      0.00000     -0.00000      0.00000      1.05365     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.13512     -0.00000     -0.00000      0.00000      0.00031      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.01513     -0.00000      0.00000     -0.00000     -1.05365     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.13512     -0.00000     -0.00000     -0.00000     -0.00031      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00068     -0.00055     -0.00000     -0.00000     -0.00000      0.01063      0.00000     -0.00000      0.00000     -0.60873     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -2.64792     -0.00000      0.00000     -0.00000     -5.37339      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.72360 \n    -0.00000     -0.00000      0.00510      0.00000      0.00000     -0.00000      0.00959     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.48105     -0.00000      0.00000     -0.00000      1.44161     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00510      0.00000      0.00000     -0.00000      0.00959     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.48105     -0.00000     -0.00000      0.00000      1.44161     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00510     -0.00000      0.00000      0.00000     -0.00959      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.48105     -0.00000     -0.00000     -0.00000     -1.44161     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00023      0.00007     -0.00000     -0.00000     -0.00000      0.00335      0.00000     -0.00000      0.00000      0.40359      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -2.30493     -0.00000      0.00000     -0.00000     -1.87911      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.49930 \n     0.00000      0.00000     -0.00277     -0.00000     -0.00000      0.00000     -0.00264      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.59558     -0.00000      0.00000      0.00000     -1.39603      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00277     -0.00000     -0.00000      0.00000     -0.00264      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.59558      0.00000      0.00000     -0.00000     -1.39603      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00277      0.00000     -0.00000     -0.00000      0.00264     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.59558      0.00000      0.00000      0.00000      1.39603     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00614     -0.02335     -0.00000     -0.00000     -0.00000      0.00858     -0.00000     -0.00000      0.00000      0.03468      0.00000      0.00000     -0.69520     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.09788      0.00000     -0.00000      0.00000     -0.23899      0.00000     -0.00000      0.83794     -0.00001     -0.00000      3.29939 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.20413     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.45136     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.20413      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.45136     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00614     -0.02335      0.00000      0.00000      0.00000      0.00858     -0.00000     -0.00000      0.00000      0.03468      0.00000      0.00000      0.34760      0.60206      0.00000      0.00000      0.00000     -0.00000      0.09788      0.00000     -0.00000      0.00000     -0.23899      0.00000     -0.00000     -0.41896      0.72568     -0.00000      3.29939 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.20413     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.45136     -0.00000 \n     0.00614     -0.02335      0.00000      0.00000      0.00000      0.00858      0.00000     -0.00000      0.00000      0.03468      0.00000      0.00000      0.34760     -0.60206     -0.00000     -0.00000     -0.00000      0.00000      0.09788      0.00000     -0.00000      0.00000     -0.23899      0.00000     -0.00000     -0.41898     -0.72567     -0.00000      3.29939 \n    -0.00009     -0.00157     -0.00000     -0.00000     -0.00000      0.00593      0.00000     -0.00000      0.00000      0.03036      0.00000      0.00000     -0.49464     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.24976     -0.00000      0.00000     -0.00000     -1.87957      0.00000     -0.00000     -0.96994      0.00001     -0.00000     -0.76899 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.85675      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.67998      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.85675     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.67998     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00009     -0.00157     -0.00000     -0.00000     -0.00000      0.00593      0.00000     -0.00000      0.00000      0.03036      0.00000      0.00000      0.24732      0.42837      0.00000      0.00000      0.00000     -0.00000     -0.24976     -0.00000      0.00000     -0.00000     -1.87957      0.00000     -0.00000      0.48496     -0.84000     -0.00000     -0.76899 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.85675     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.67998     -0.00000 \n    -0.00009     -0.00157     -0.00000     -0.00000     -0.00000      0.00593      0.00000     -0.00000      0.00000      0.03036      0.00000      0.00000      0.24732     -0.42837     -0.00000     -0.00000     -0.00000      0.00000     -0.24976     -0.00000      0.00000     -0.00000     -1.87957      0.00000     -0.00000      0.48498      0.83999     -0.00000     -0.76899 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ti\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.18375      0.68211      0.00000      0.00000      0.00000     -0.15599      0.00000      0.00000      0.00000      0.03217      0.00000      0.00000      0.00000     -0.02086      0.00000      0.00000      0.00000      0.03153      0.00000      0.00000      0.03153      0.00000      0.03153      0.00393      0.00000      0.00000      0.00393      0.00000      0.00393 \n     0.68211      2.52943      0.00000      0.00000      0.00000     -0.81700      0.00000      0.00000      0.00000      0.12882      0.00000      0.00000      0.00000     -0.08657      0.00000      0.00000      0.00000      0.05584      0.00000      0.00000      0.05584      0.00000      0.05584      0.01002      0.00000      0.00000      0.01002      0.00000      0.01002 \n     0.00000      0.00000      2.23110      0.00000      0.00000      0.00000     -0.71863      0.00000      0.00000      0.00000     -0.01794      0.00000      0.00000      0.00000      0.00765      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.23110      0.00000      0.00000      0.00000     -0.71863      0.00000      0.00000      0.00000     -0.01794      0.00000      0.00000      0.00000      0.00765      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.23110      0.00000      0.00000      0.00000     -0.71863      0.00000      0.00000      0.00000     -0.01794      0.00000      0.00000      0.00000      0.00765      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.15599     -0.81700      0.00000      0.00000      0.00000      2.44535      0.00000      0.00000      0.00000     -0.38061      0.00000      0.00000      0.00000      0.28854      0.00000      0.00000      0.00000     -0.00297      0.00000      0.00000     -0.00297      0.00000     -0.00297     -0.00111      0.00000      0.00000     -0.00111      0.00000     -0.00111 \n     0.00000      0.00000     -0.71863      0.00000      0.00000      0.00000      2.22666      0.00000      0.00000      0.00000      0.02709      0.00000      0.00000      0.00000     -0.00866      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.71863      0.00000      0.00000      0.00000      2.22666      0.00000      0.00000      0.00000      0.02709      0.00000      0.00000      0.00000     -0.00866      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.71863      0.00000      0.00000      0.00000      2.22666      0.00000      0.00000      0.00000      0.02709      0.00000      0.00000      0.00000     -0.00866      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03217      0.12882      0.00000      0.00000      0.00000     -0.38061      0.00000      0.00000      0.00000      0.56937      0.00000      0.00000      0.00000     -0.46779      0.00000      0.00000      0.00000     -0.01919      0.00000      0.00000     -0.01919      0.00000     -0.01919     -0.02064      0.00000      0.00000     -0.02064      0.00000     -0.02064 \n     0.00000      0.00000     -0.01794      0.00000      0.00000      0.00000      0.02709      0.00000      0.00000      0.00000      0.00038      0.00000      0.00000      0.00000     -0.00013      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01794      0.00000      0.00000      0.00000      0.02709      0.00000      0.00000      0.00000      0.00038      0.00000      0.00000      0.00000     -0.00013      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01794      0.00000      0.00000      0.00000      0.02709      0.00000      0.00000      0.00000      0.00038      0.00000      0.00000      0.00000     -0.00013      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02086     -0.08657      0.00000      0.00000      0.00000      0.28854      0.00000      0.00000      0.00000     -0.46779      0.00000      0.00000      0.00000      0.39693      0.00000      0.00000      0.00000      0.01557      0.00000      0.00000      0.01557      0.00000      0.01557      0.01550      0.00000      0.00000      0.01550      0.00000      0.01550 \n     0.00000      0.00000      0.00765      0.00000      0.00000      0.00000     -0.00866      0.00000      0.00000      0.00000     -0.00013      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00765      0.00000      0.00000      0.00000     -0.00866      0.00000      0.00000      0.00000     -0.00013      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00765      0.00000      0.00000      0.00000     -0.00866      0.00000      0.00000      0.00000     -0.00013      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03153      0.05584      0.00000      0.00000      0.00000     -0.00297      0.00000      0.00000      0.00000     -0.01919      0.00000      0.00000      0.00000      0.01557      0.00000      0.00000      0.00000      0.21569      0.00000      0.00000     -0.10445      0.00000     -0.10445      0.15472      0.00000      0.00000     -0.07565      0.00000     -0.07565 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.64031      0.00000      0.00000      0.00000      0.00000      0.00000      0.46075      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.64031      0.00000      0.00000      0.00000      0.00000      0.00000      0.46075      0.00000      0.00000      0.00000 \n     0.03153      0.05584      0.00000      0.00000      0.00000     -0.00297      0.00000      0.00000      0.00000     -0.01919      0.00000      0.00000      0.00000      0.01557      0.00000      0.00000      0.00000     -0.10445      0.00000      0.00000      0.21569      0.00000     -0.10445     -0.07565      0.00000      0.00000      0.15472      0.00000     -0.07565 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.64030      0.00000      0.00000      0.00000      0.00000      0.00000      0.46074      0.00000 \n     0.03153      0.05584      0.00000      0.00000      0.00000     -0.00297      0.00000      0.00000      0.00000     -0.01919      0.00000      0.00000      0.00000      0.01557      0.00000      0.00000      0.00000     -0.10445      0.00000      0.00000     -0.10445      0.00000      0.21569     -0.07565      0.00000      0.00000     -0.07565      0.00000      0.15472 \n     0.00393      0.01002      0.00000      0.00000      0.00000     -0.00111      0.00000      0.00000      0.00000     -0.02064      0.00000      0.00000      0.00000      0.01550      0.00000      0.00000      0.00000      0.15472      0.00000      0.00000     -0.07565      0.00000     -0.07565      0.11163      0.00000      0.00000     -0.05414      0.00000     -0.05413 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46075      0.00000      0.00000      0.00000      0.00000      0.00000      0.33154      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46075      0.00000      0.00000      0.00000      0.00000      0.00000      0.33154      0.00000      0.00000      0.00000 \n     0.00393      0.01002      0.00000      0.00000      0.00000     -0.00111      0.00000      0.00000      0.00000     -0.02064      0.00000      0.00000      0.00000      0.01550      0.00000      0.00000      0.00000     -0.07565      0.00000      0.00000      0.15472      0.00000     -0.07565     -0.05414      0.00000      0.00000      0.11163      0.00000     -0.05414 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46074      0.00000      0.00000      0.00000      0.00000      0.00000      0.33153      0.00000 \n     0.00393      0.01002      0.00000      0.00000      0.00000     -0.00111      0.00000      0.00000      0.00000     -0.02064      0.00000      0.00000      0.00000      0.01550      0.00000      0.00000      0.00000     -0.07565      0.00000      0.00000     -0.07565      0.00000      0.15472     -0.05413      0.00000      0.00000     -0.05414      0.00000      0.11163 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99160      0.44811      0.44811      0.44810      0.44810      0.44809      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.76787      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -177.16380    -19.38942    -16.21668    -16.21668    -16.21668     -2.21587     -1.38239     -1.38239     -1.38239     -0.16034     -0.12468     -0.12468     -0.12468     -0.12468     -0.12468     -0.05179     -0.05179     -0.05179      0.05161      0.10361      0.10361      0.10361      0.49674      0.76301      0.76301      0.76301      0.76301      0.76301      4.97827 \n   </alphaeps>\n   <betaeps>\n  -177.16310    -19.36651    -16.19872    -16.19872    -16.19872     -2.14578     -1.31284     -1.31284     -1.31284     -0.13688     -0.05984     -0.05984     -0.05984     -0.05984     -0.05984     -0.04142     -0.04142     -0.04142      0.06119      0.12043      0.12043      0.12043      0.52502      0.81493      0.81493      0.81493      0.81493      0.81493      5.04083 \n   </betaeps>\n   <alphavectors>\n     0.99611     -0.29549     -0.00000      0.00000      0.00000     -0.10805     -0.00000     -0.00000      0.00000     -0.02799     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00871     -0.00000      0.00000     -0.00000      0.04708     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.01787 \n    -0.01354     -1.03226     -0.00000      0.00000      0.00000     -0.43369     -0.00000     -0.00000      0.00000     -0.11658     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.13277     -0.00000      0.00000     -0.00000      0.05790     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.31261 \n     0.00000     -0.00000      0.99486     -0.00000     -0.00000     -0.00000      0.35480      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07035     -0.00000      0.00000      0.00000      0.10078     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.99486      0.00000     -0.00000     -0.00000     -0.35480      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.07035     -0.00000     -0.00000      0.00000      0.10078      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.99486      0.00000      0.00000     -0.00000      0.35480     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.07035     -0.00000      0.00000     -0.00000     -0.10078      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.02052     -0.08170      0.00000     -0.00000     -0.00000      1.04973      0.00000      0.00000     -0.00000      0.37447      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.08624      0.00000     -0.00000      0.00000     -1.04428      0.00000      0.00000     -0.00000     -0.00000     -0.00000      9.88004 \n    -0.00000      0.00000      0.01494     -0.00000     -0.00000     -0.00000     -1.05528     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.15859      0.00000      0.00000     -0.00000     -0.09375      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.01494     -0.00000      0.00000      0.00000      1.05528     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.15859      0.00000      0.00000     -0.00000     -0.09375     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.01494     -0.00000     -0.00000      0.00000     -1.05528     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15859      0.00000     -0.00000      0.00000      0.09375      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00023     -0.00390      0.00000     -0.00000     -0.00000     -0.01032     -0.00000     -0.00000      0.00000     -0.59680     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.22278     -0.00000      0.00000     -0.00000     -3.87591      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.13118 \n     0.00000     -0.00000     -0.00459      0.00000      0.00000      0.00000     -0.01115     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.48391      0.00000      0.00000      0.00000      1.44431     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00459      0.00000      0.00000      0.00000      0.01115      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.48391     -0.00000     -0.00000      0.00000      1.44431      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00459      0.00000      0.00000      0.00000     -0.01115     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.48391     -0.00000      0.00000     -0.00000     -1.44431      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00006     -0.00119      0.00000     -0.00000     -0.00000     -0.00383      0.00000     -0.00000     -0.00000      0.42211      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      2.13211     -0.00000      0.00000     -0.00000     -1.52705      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.41094 \n    -0.00000      0.00000      0.00246     -0.00000     -0.00000     -0.00000      0.00351      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.59580     -0.00000     -0.00000     -0.00000     -1.38827      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00246     -0.00000     -0.00000     -0.00000     -0.00351     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.59580      0.00000      0.00000     -0.00000     -1.38827      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00246      0.00000     -0.00000     -0.00000      0.00351      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.59580      0.00000     -0.00000      0.00000      1.38827     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00784     -0.02590     -0.00000      0.00000      0.00000     -0.00951      0.00000     -0.00000     -0.00000      0.02421      0.00000      0.00000     -0.00000     -0.00000      0.69014      0.00000      0.00000      0.00000     -0.10593      0.00000     -0.00000     -0.00000     -0.08479     -0.00000      0.00000     -0.00000      0.00000      0.84795      4.58993 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.19537      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.46869      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.19537     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.46869     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00784     -0.02590     -0.00000      0.00000      0.00000     -0.00951     -0.00000     -0.00000      0.00000      0.02421      0.00000      0.00000     -0.00000     -0.59768     -0.34507     -0.00000     -0.00000     -0.00000     -0.10593      0.00000      0.00000     -0.00000     -0.08479      0.00000     -0.00000     -0.00000      0.73434     -0.42398      4.58993 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.19537      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.46869     -0.00000     -0.00000      0.00000 \n     0.00784     -0.02590      0.00000     -0.00000     -0.00000     -0.00951     -0.00000     -0.00000      0.00000      0.02421      0.00000      0.00000      0.00000      0.59768     -0.34507     -0.00000     -0.00000     -0.00000     -0.10593      0.00000      0.00000      0.00000     -0.08479      0.00000     -0.00000     -0.00000     -0.73434     -0.42397      4.58993 \n     0.00055     -0.00395     -0.00000      0.00000      0.00000     -0.00686     -0.00000     -0.00000      0.00000      0.03118      0.00000      0.00000     -0.00000     -0.00000      0.49661      0.00000      0.00000      0.00000      0.11212      0.00000     -0.00000     -0.00000     -1.38758      0.00000      0.00000     -0.00000     -0.00000     -0.97401     -0.38445 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.86015     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.68703     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.86015      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.68703     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00055     -0.00395      0.00000     -0.00000     -0.00000     -0.00686      0.00000     -0.00000     -0.00000      0.03118      0.00000      0.00000     -0.00000     -0.43007     -0.24831     -0.00000     -0.00000     -0.00000      0.11212      0.00000      0.00000     -0.00000     -1.38758      0.00000      0.00000     -0.00000     -0.84352      0.48701     -0.38445 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.86015      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.68703     -0.00000     -0.00000      0.00000 \n     0.00055     -0.00395      0.00000     -0.00000     -0.00000     -0.00686     -0.00000     -0.00000      0.00000      0.03118      0.00000      0.00000      0.00000      0.43008     -0.24830     -0.00000     -0.00000     -0.00000      0.11212      0.00000      0.00000      0.00000     -1.38758      0.00000      0.00000     -0.00000      0.84352      0.48700     -0.38445 \n   </alphavectors>\n   <betavectors>\n    -0.99611      0.29558     -0.00000     -0.00000     -0.00000     -0.10779     -0.00000      0.00000      0.00000      0.02621      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00926      0.00000      0.00000     -0.00000      0.04805     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01783 \n     0.01354      1.03252     -0.00000      0.00000     -0.00000     -0.43272     -0.00000      0.00000      0.00000      0.10577     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.13902      0.00000      0.00000     -0.00000      0.06547     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.31273 \n     0.00000      0.00000      0.99517     -0.00000      0.00000     -0.00000     -0.35370     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.06263      0.00000      0.00000     -0.00000     -0.10654     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.99517      0.00000     -0.00000     -0.00000      0.35370      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.06263      0.00000     -0.00000     -0.00000      0.10654      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.99517      0.00000     -0.00000     -0.00000      0.35370      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.06263     -0.00000     -0.00000      0.00000     -0.10654      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.02052      0.07717      0.00000     -0.00000      0.00000      1.04996      0.00000     -0.00000     -0.00000     -0.33945      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.07850     -0.00000     -0.00000      0.00000     -1.02670      0.00000     -0.00000      0.00000     -0.00000      0.00000      9.88322 \n     0.00000      0.00000      0.01407     -0.00000      0.00000     -0.00000      1.05481      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.15257     -0.00000     -0.00000      0.00000      0.10811      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.01407     -0.00000      0.00000      0.00000     -1.05481     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.15257     -0.00000      0.00000      0.00000     -0.10811     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.01407     -0.00000      0.00000      0.00000     -1.05481     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.15257      0.00000      0.00000     -0.00000      0.10811     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00023      0.00379      0.00000     -0.00000      0.00000     -0.01006      0.00000     -0.00000     -0.00000      0.53032     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -2.37396     -0.00000      0.00000     -0.00000     -3.79816      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.12081 \n    -0.00000     -0.00000     -0.00426      0.00000     -0.00000      0.00000      0.01465      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.36730     -0.00000     -0.00000      0.00000     -1.47824     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00426      0.00000      0.00000      0.00000     -0.01465      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.36730      0.00000     -0.00000     -0.00000      1.47824      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00426      0.00000     -0.00000      0.00000     -0.01465     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.36730      0.00000      0.00000      0.00000     -1.47824     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00006      0.00116      0.00000     -0.00000      0.00000     -0.00377      0.00000     -0.00000     -0.00000     -0.53553     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -2.14190     -0.00000     -0.00000      0.00000     -1.47805      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.40700 \n     0.00000      0.00000      0.00228     -0.00000      0.00000     -0.00000     -0.00476     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.70449      0.00000      0.00000     -0.00000      1.33639      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00228     -0.00000     -0.00000     -0.00000      0.00476     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.70449     -0.00000      0.00000      0.00000     -1.33639      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00228     -0.00000      0.00000     -0.00000      0.00476      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.70449     -0.00000     -0.00000     -0.00000      1.33639      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00784      0.02427     -0.00000      0.00000     -0.00000     -0.00919     -0.00000      0.00000      0.00000     -0.01290      0.67969      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.10339      0.00000      0.00000      0.00000     -0.07471      0.85635     -0.00000      0.00000     -0.00000      0.00000      4.59022 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.17725     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.48325     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.17725     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.48325     -0.00000     -0.00000 \n    -0.00784      0.02427      0.00000     -0.00000      0.00000     -0.00919     -0.00000     -0.00000     -0.00000     -0.01290     -0.33984     -0.58863     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10339     -0.00000     -0.00000     -0.00000     -0.07471     -0.42817      0.74162     -0.00000      0.00000     -0.00000      4.59022 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.17725      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.48325      0.00000      0.00000     -0.00000 \n    -0.00784      0.02427      0.00000     -0.00000      0.00000     -0.00919     -0.00000     -0.00000     -0.00000     -0.01290     -0.33984      0.58862     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10339      0.00000     -0.00000     -0.00000     -0.07471     -0.42818     -0.74162     -0.00000      0.00000     -0.00000      4.59022 \n    -0.00055      0.00379     -0.00000      0.00000     -0.00000     -0.00727      0.00000     -0.00000     -0.00000     -0.00580      0.50852      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.15106     -0.00000      0.00000      0.00000     -1.38534     -0.96784      0.00000     -0.00000      0.00000     -0.00000     -0.38037 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.88079      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.67635      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.88079      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.67635      0.00000      0.00000 \n    -0.00055      0.00379     -0.00000      0.00000     -0.00000     -0.00727      0.00000      0.00000      0.00000     -0.00580     -0.25426     -0.44040     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15106      0.00000     -0.00000     -0.00000     -1.38534      0.48392     -0.83818      0.00000     -0.00000      0.00000     -0.38037 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.88079      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.67635      0.00000      0.00000      0.00000 \n    -0.00055      0.00379     -0.00000      0.00000     -0.00000     -0.00727      0.00000      0.00000      0.00000     -0.00580     -0.25426      0.44039     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15106     -0.00000     -0.00000     -0.00000     -1.38534      0.48392      0.83817      0.00000     -0.00000      0.00000     -0.38037 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"V\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.18710      0.69017      0.00000      0.00000      0.00000     -0.15372      0.00000      0.00000      0.00000      0.03066      0.00000      0.00000      0.00000     -0.01943      0.00000      0.00000      0.00000      0.03312      0.00000      0.00000      0.03312      0.00000      0.03312      0.00591      0.00000      0.00000      0.00591      0.00000      0.00591 \n     0.69017      2.54073      0.00000      0.00000      0.00000     -0.82008      0.00000      0.00000      0.00000      0.11654      0.00000      0.00000      0.00000     -0.08132      0.00000      0.00000      0.00000      0.05563      0.00000      0.00000      0.05563      0.00000      0.05563      0.01402      0.00000      0.00000      0.01402      0.00000      0.01402 \n     0.00000      0.00000      2.23914      0.00000      0.00000      0.00000     -0.73170      0.00000      0.00000      0.00000     -0.01897      0.00000      0.00000      0.00000      0.00806      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.23914      0.00000      0.00000      0.00000     -0.73170      0.00000      0.00000      0.00000     -0.01897      0.00000      0.00000      0.00000      0.00806      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.23914      0.00000      0.00000      0.00000     -0.73170      0.00000      0.00000      0.00000     -0.01897      0.00000      0.00000      0.00000      0.00806      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.15372     -0.82008      0.00000      0.00000      0.00000      2.39773      0.00000      0.00000      0.00000     -0.32000      0.00000      0.00000      0.00000      0.26719      0.00000      0.00000      0.00000     -0.01066      0.00000      0.00000     -0.01066      0.00000     -0.01066     -0.00572      0.00000      0.00000     -0.00572      0.00000     -0.00572 \n     0.00000      0.00000     -0.73170      0.00000      0.00000      0.00000      2.23264      0.00000      0.00000      0.00000      0.03232      0.00000      0.00000      0.00000     -0.01121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.73170      0.00000      0.00000      0.00000      2.23264      0.00000      0.00000      0.00000      0.03232      0.00000      0.00000      0.00000     -0.01121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.73170      0.00000      0.00000      0.00000      2.23264      0.00000      0.00000      0.00000      0.03232      0.00000      0.00000      0.00000     -0.01121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03066      0.11654      0.00000      0.00000      0.00000     -0.32000      0.00000      0.00000      0.00000      0.48497      0.00000      0.00000      0.00000     -0.43826      0.00000      0.00000      0.00000     -0.01051      0.00000      0.00000     -0.01051      0.00000     -0.01051     -0.01648      0.00000      0.00000     -0.01648      0.00000     -0.01648 \n     0.00000      0.00000     -0.01897      0.00000      0.00000      0.00000      0.03232      0.00000      0.00000      0.00000      0.00052      0.00000      0.00000      0.00000     -0.00019      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01897      0.00000      0.00000      0.00000      0.03232      0.00000      0.00000      0.00000      0.00052      0.00000      0.00000      0.00000     -0.00019      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01897      0.00000      0.00000      0.00000      0.03232      0.00000      0.00000      0.00000      0.00052      0.00000      0.00000      0.00000     -0.00019      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01943     -0.08132      0.00000      0.00000      0.00000      0.26719      0.00000      0.00000      0.00000     -0.43826      0.00000      0.00000      0.00000      0.42455      0.00000      0.00000      0.00000      0.00909      0.00000      0.00000      0.00909      0.00000      0.00909      0.01264      0.00000      0.00000      0.01264      0.00000      0.01264 \n     0.00000      0.00000      0.00806      0.00000      0.00000      0.00000     -0.01121      0.00000      0.00000      0.00000     -0.00019      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00806      0.00000      0.00000      0.00000     -0.01121      0.00000      0.00000      0.00000     -0.00019      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00806      0.00000      0.00000      0.00000     -0.01121      0.00000      0.00000      0.00000     -0.00019      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03312      0.05563      0.00000      0.00000      0.00000     -0.01066      0.00000      0.00000      0.00000     -0.01051      0.00000      0.00000      0.00000      0.00909      0.00000      0.00000      0.00000      0.32450      0.00000      0.00000     -0.15959      0.00000     -0.15959      0.23115      0.00000      0.00000     -0.11424      0.00000     -0.11424 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.96818      0.00000      0.00000      0.00000      0.00000      0.00000      0.69078      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.96818      0.00000      0.00000      0.00000      0.00000      0.00000      0.69078      0.00000      0.00000      0.00000 \n     0.03312      0.05563      0.00000      0.00000      0.00000     -0.01066      0.00000      0.00000      0.00000     -0.01051      0.00000      0.00000      0.00000      0.00909      0.00000      0.00000      0.00000     -0.15959      0.00000      0.00000      0.32451      0.00000     -0.15959     -0.11425      0.00000      0.00000      0.23115      0.00000     -0.11425 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.96820      0.00000      0.00000      0.00000      0.00000      0.00000      0.69079      0.00000 \n     0.03312      0.05563      0.00000      0.00000      0.00000     -0.01066      0.00000      0.00000      0.00000     -0.01051      0.00000      0.00000      0.00000      0.00909      0.00000      0.00000      0.00000     -0.15959      0.00000      0.00000     -0.15959      0.00000      0.32451     -0.11425      0.00000      0.00000     -0.11425      0.00000      0.23115 \n     0.00591      0.01402      0.00000      0.00000      0.00000     -0.00572      0.00000      0.00000      0.00000     -0.01648      0.00000      0.00000      0.00000      0.01264      0.00000      0.00000      0.00000      0.23115      0.00000      0.00000     -0.11425      0.00000     -0.11425      0.16527      0.00000      0.00000     -0.08116      0.00000     -0.08116 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.69078      0.00000      0.00000      0.00000      0.00000      0.00000      0.49286      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.69078      0.00000      0.00000      0.00000      0.00000      0.00000      0.49286      0.00000      0.00000      0.00000 \n     0.00591      0.01402      0.00000      0.00000      0.00000     -0.00572      0.00000      0.00000      0.00000     -0.01648      0.00000      0.00000      0.00000      0.01264      0.00000      0.00000      0.00000     -0.11424      0.00000      0.00000      0.23115      0.00000     -0.11425     -0.08116      0.00000      0.00000      0.16527      0.00000     -0.08117 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.69079      0.00000      0.00000      0.00000      0.00000      0.00000      0.49287      0.00000 \n     0.00591      0.01402      0.00000      0.00000      0.00000     -0.00572      0.00000      0.00000      0.00000     -0.01648      0.00000      0.00000      0.00000      0.01264      0.00000      0.00000      0.00000     -0.11424      0.00000      0.00000     -0.11425      0.00000      0.23115     -0.08116      0.00000      0.00000     -0.08117      0.00000      0.16527 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99662      0.67354      0.67354      0.67354      0.67352      0.67352      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.63572      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -195.05900    -21.70054    -18.31929    -18.31929    -18.31929     -2.45316     -1.53943     -1.53943     -1.53943     -0.16362     -0.13167     -0.13167     -0.13167     -0.13167     -0.13167     -0.04892     -0.04892     -0.04892      0.06111      0.11482      0.11482      0.11482      0.59893      0.93493      0.93493      0.93493      0.93493      0.93493      7.60227 \n   </alphaeps>\n   <betaeps>\n  -195.05790    -21.66043    -18.28806    -18.28806    -18.28806     -2.34188     -1.42959     -1.42959     -1.42958     -0.13022     -0.03435     -0.03435     -0.03435     -0.02989     -0.02989     -0.02989     -0.02989     -0.02989      0.07715      0.14069      0.14069      0.14069      0.64633      1.01774      1.01774      1.01774      1.01774      1.01774      7.70064 \n   </betaeps>\n   <alphavectors>\n     0.99611      0.29777      0.00000      0.00000      0.00000      0.10987      0.00000     -0.00000     -0.00000     -0.02778      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00928     -0.00000      0.00000     -0.00000     -0.05128     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.05594 \n    -0.01327      1.03355     -0.00000     -0.00000     -0.00000      0.43880      0.00000     -0.00000     -0.00000     -0.11493      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.12741     -0.00000      0.00000     -0.00000     -0.09663     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.60304 \n    -0.00000      0.00000     -0.00000     -0.00000      0.99498      0.00000      0.00000     -0.00000     -0.36020      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.06704      0.00000      0.00000     -0.00000      0.10115      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.99498     -0.00000     -0.00000      0.36020      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.06704      0.00000     -0.00000     -0.00000     -0.10115     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.99498     -0.00000      0.00000     -0.00000     -0.00000      0.36020     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.06704     -0.00000     -0.00000      0.00000      0.10115     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.02265      0.08055      0.00000      0.00000     -0.00000     -1.05069     -0.00000      0.00000      0.00000      0.35338     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.09284      0.00000     -0.00000      0.00000      0.93809      0.00000      0.00000     -0.00000     -0.00000      0.00000    -12.45117 \n    -0.00000      0.00000     -0.00000     -0.00000      0.01449      0.00000      0.00000     -0.00000      1.05694     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.15826      0.00000     -0.00000      0.00000     -0.12278      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.01449      0.00000      0.00000     -1.05694     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.15826     -0.00000      0.00000      0.00000      0.12278      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.01449      0.00000     -0.00000      0.00000      0.00000     -1.05694      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.15826      0.00000      0.00000     -0.00000     -0.12278      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00076      0.00549      0.00000      0.00000     -0.00000      0.00963      0.00000     -0.00000     -0.00000     -0.58710      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.07158     -0.00000      0.00000      0.00000      3.28043      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.79710 \n     0.00000     -0.00000      0.00000      0.00000     -0.00422     -0.00000     -0.00000      0.00000      0.01213     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.45873     -0.00000      0.00000     -0.00000      1.43936     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00422     -0.00000     -0.00000     -0.01213      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.45873      0.00000     -0.00000      0.00000     -1.43936     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00422     -0.00000      0.00000     -0.00000     -0.00000     -0.01213     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.45873     -0.00000     -0.00000      0.00000      1.43936     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00026      0.00193      0.00000      0.00000     -0.00000      0.00386      0.00000     -0.00000      0.00000      0.44033     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.04449     -0.00000      0.00000      0.00000      1.35499      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.32623 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00225      0.00000      0.00000     -0.00000     -0.00404      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.62178      0.00000      0.00000     -0.00000     -1.35947      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00225      0.00000      0.00000      0.00404     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.62178     -0.00000      0.00000     -0.00000      1.35947     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00225      0.00000     -0.00000      0.00000      0.00000      0.00404     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.62178      0.00000     -0.00000     -0.00000     -1.35947      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00867      0.02498      0.00000      0.00000      0.00000      0.00945      0.00000     -0.00000      0.00000      0.01654     -0.69221     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.09252     -0.00000      0.00000     -0.00000      0.03624     -0.84678      0.00000      0.00000      0.00000     -0.00000     -5.70052 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.19895     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.46667      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.19895     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.46667      0.00000 \n     0.00867      0.02498      0.00000      0.00000     -0.00000      0.00945      0.00000     -0.00000      0.00000      0.01654      0.34611     -0.59948     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.09252     -0.00000      0.00000     -0.00000      0.03624      0.42339     -0.73334     -0.00000      0.00000      0.00000     -5.70052 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.19895     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.46667     -0.00000     -0.00000     -0.00000 \n     0.00867      0.02498      0.00000      0.00000     -0.00000      0.00945      0.00000     -0.00000     -0.00000      0.01654      0.34611      0.59948      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.09252      0.00000     -0.00000      0.00000      0.03624      0.42339      0.73334      0.00000     -0.00000     -0.00000     -5.70052 \n     0.00099      0.00520      0.00000      0.00000     -0.00000      0.00729      0.00000     -0.00000      0.00000      0.02837     -0.49388     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06802     -0.00000      0.00000      0.00000      1.20680      0.97585     -0.00000     -0.00000     -0.00000      0.00000      0.10844 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.85543      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.69022     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.85543      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.69022     -0.00000 \n     0.00099      0.00520      0.00000      0.00000     -0.00000      0.00729      0.00000     -0.00000     -0.00000      0.02837      0.24694     -0.42772     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.06802     -0.00000      0.00000      0.00000      1.20680     -0.48792      0.84511      0.00000     -0.00000     -0.00000      0.10844 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.85543      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.69022      0.00000      0.00000      0.00000 \n     0.00099      0.00520      0.00000      0.00000     -0.00000      0.00729      0.00000     -0.00000      0.00000      0.02837      0.24694      0.42772      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.06802      0.00000     -0.00000     -0.00000      1.20680     -0.48792     -0.84511     -0.00000      0.00000      0.00000      0.10844 \n   </alphavectors>\n   <betavectors>\n     0.99611      0.29789     -0.00000     -0.00000      0.00000      0.10944     -0.00000     -0.00000      0.00000      0.02537      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.01007      0.00000     -0.00000      0.00000     -0.05263      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05589 \n    -0.01326      1.03385     -0.00000     -0.00000      0.00000      0.43738     -0.00000     -0.00000      0.00000      0.09953      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.13472      0.00000     -0.00000      0.00000     -0.10665      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.60302 \n    -0.00000     -0.00000      0.00000      0.00000      0.99544      0.00000     -0.00000     -0.00000     -0.35848     -0.00000     -0.00000     -0.00000      0.05686      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.10872     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.99544      0.00000     -0.00000      0.00000      0.35848     -0.00000      0.00000      0.00000     -0.05686      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.10872      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.99544      0.00000     -0.00000      0.00000     -0.35848     -0.00000     -0.00000     -0.00000      0.05686     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.10872     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.02264      0.07360     -0.00000     -0.00000      0.00000     -1.04600      0.00000      0.00000     -0.00000     -0.31299     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.09022     -0.00000      0.00000     -0.00000      0.91760     -0.00000      0.00000      0.00000     -0.00000      0.00000     12.45423 \n    -0.00000     -0.00000      0.00000      0.00000      0.01321     -0.00000      0.00000      0.00000      1.05600      0.00000      0.00000      0.00000     -0.14749     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.14279      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.01321     -0.00000      0.00000     -0.00000     -1.05600      0.00000     -0.00000     -0.00000      0.14749     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.14279     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.01321     -0.00000      0.00000     -0.00000      1.05600      0.00000      0.00000      0.00000     -0.14749      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.14279      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00076      0.00515     -0.00000     -0.00000      0.00000      0.00975     -0.00000     -0.00000      0.00000      0.47129      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.24478      0.00000      0.00000     -0.00000      3.18587     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.78852 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00376      0.00000     -0.00000     -0.00000      0.01857      0.00000      0.00000      0.00000      0.30390      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.47975     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00376      0.00000     -0.00000      0.00000     -0.01857     -0.00000      0.00000      0.00000     -0.30390      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.47975      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00376      0.00000     -0.00000      0.00000      0.01857     -0.00000     -0.00000     -0.00000      0.30390     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.47975     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00026      0.00181     -0.00000     -0.00000      0.00000      0.00396     -0.00000     -0.00000      0.00000     -0.60316      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.04194     -0.00000      0.00000     -0.00000      1.29570     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.32266 \n    -0.00000     -0.00000      0.00000      0.00000      0.00200     -0.00000      0.00000      0.00000     -0.00663     -0.00000     -0.00000     -0.00000      0.76207      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.28607      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00200     -0.00000      0.00000     -0.00000      0.00663      0.00000     -0.00000     -0.00000     -0.76207     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.28607     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00200     -0.00000      0.00000     -0.00000     -0.00663      0.00000      0.00000      0.00000      0.76207      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.28607      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00867      0.02250     -0.00000     -0.00000      0.00000      0.01097     -0.00000     -0.00000      0.00000     -0.00433      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.67691     -0.09136      0.00000     -0.00000      0.00000      0.02380     -0.00000      0.00000      0.00000     -0.00000     -0.85907      5.70063 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.17244      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.48795     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.17244     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.48795     -0.00000      0.00000      0.00000     -0.00000 \n     0.00867      0.02250     -0.00000     -0.00000      0.00000      0.01097     -0.00000     -0.00000      0.00000     -0.00433      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.58622     -0.33845     -0.09136     -0.00000      0.00000     -0.00000      0.02380      0.00000     -0.00000     -0.00000     -0.74398      0.42953      5.70063 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.17244     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.48795      0.00000     -0.00000     -0.00000 \n     0.00867      0.02250     -0.00000     -0.00000      0.00000      0.01097     -0.00000     -0.00000      0.00000     -0.00433      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.58622     -0.33845     -0.09136     -0.00000      0.00000      0.00000      0.02380      0.00000     -0.00000      0.00000      0.74398      0.42953      5.70063 \n     0.00099      0.00484     -0.00000     -0.00000      0.00000      0.00854     -0.00000     -0.00000      0.00000     -0.00029      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.51132      0.11157      0.00000     -0.00000      0.00000      1.20419     -0.00000      0.00000     -0.00000      0.00000      0.96683     -0.10503 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.88562     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.67460      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.88562      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.67460      0.00000      0.00000     -0.00000      0.00000 \n     0.00099      0.00484     -0.00000     -0.00000      0.00000      0.00854     -0.00000     -0.00000      0.00000     -0.00029      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.44281     -0.25566      0.11157     -0.00000      0.00000     -0.00000      1.20419     -0.00000      0.00000      0.00000      0.83730     -0.48341     -0.10503 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.88563      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.67460     -0.00000      0.00000      0.00000 \n     0.00099      0.00484     -0.00000     -0.00000      0.00000      0.00854     -0.00000     -0.00000      0.00000     -0.00029      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.44281     -0.25566      0.11157     -0.00000      0.00000      0.00000      1.20419     -0.00000      0.00000     -0.00000     -0.83730     -0.48341     -0.10503 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cr\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.19013      0.69708      0.00000      0.00000      0.00000     -0.15886      0.00000      0.00000      0.00000      0.02966      0.00000      0.00000      0.00000     -0.01836      0.00000      0.00000      0.00000      0.03159      0.00000      0.00000      0.03159      0.00000      0.03159      0.00705      0.00000      0.00000      0.00705      0.00000      0.00705 \n     0.69708      2.54951      0.00000      0.00000      0.00000     -0.83966      0.00000      0.00000      0.00000      0.10855      0.00000      0.00000      0.00000     -0.07757      0.00000      0.00000      0.00000      0.04889      0.00000      0.00000      0.04889      0.00000      0.04889      0.01587      0.00000      0.00000      0.01587      0.00000      0.01587 \n     0.00000      0.00000      2.24608      0.00000      0.00000      0.00000     -0.74320      0.00000      0.00000      0.00000     -0.01938      0.00000      0.00000      0.00000      0.00822      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.24608      0.00000      0.00000      0.00000     -0.74320      0.00000      0.00000      0.00000     -0.01938      0.00000      0.00000      0.00000      0.00822      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.24608      0.00000      0.00000      0.00000     -0.74320      0.00000      0.00000      0.00000     -0.01938      0.00000      0.00000      0.00000      0.00822      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.15886     -0.83966      0.00000      0.00000      0.00000      2.37406      0.00000      0.00000      0.00000     -0.28355      0.00000      0.00000      0.00000      0.25173      0.00000      0.00000      0.00000     -0.01428      0.00000      0.00000     -0.01428      0.00000     -0.01428     -0.00821      0.00000      0.00000     -0.00821      0.00000     -0.00821 \n     0.00000      0.00000     -0.74320      0.00000      0.00000      0.00000      2.23893      0.00000      0.00000      0.00000      0.03514      0.00000      0.00000      0.00000     -0.01263      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.74320      0.00000      0.00000      0.00000      2.23893      0.00000      0.00000      0.00000      0.03514      0.00000      0.00000      0.00000     -0.01263      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.74320      0.00000      0.00000      0.00000      2.23893      0.00000      0.00000      0.00000      0.03514      0.00000      0.00000      0.00000     -0.01263      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02966      0.10855      0.00000      0.00000      0.00000     -0.28355      0.00000      0.00000      0.00000      0.43887      0.00000      0.00000      0.00000     -0.41810      0.00000      0.00000      0.00000     -0.00623      0.00000      0.00000     -0.00623      0.00000     -0.00623     -0.01432      0.00000      0.00000     -0.01432      0.00000     -0.01432 \n     0.00000      0.00000     -0.01938      0.00000      0.00000      0.00000      0.03514      0.00000      0.00000      0.00000      0.00063      0.00000      0.00000      0.00000     -0.00023      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01938      0.00000      0.00000      0.00000      0.03514      0.00000      0.00000      0.00000      0.00063      0.00000      0.00000      0.00000     -0.00023      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01938      0.00000      0.00000      0.00000      0.03514      0.00000      0.00000      0.00000      0.00063      0.00000      0.00000      0.00000     -0.00023      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01836     -0.07757      0.00000      0.00000      0.00000      0.25173      0.00000      0.00000      0.00000     -0.41810      0.00000      0.00000      0.00000      0.44119      0.00000      0.00000      0.00000      0.00531      0.00000      0.00000      0.00531      0.00000      0.00531      0.01088      0.00000      0.00000      0.01088      0.00000      0.01088 \n     0.00000      0.00000      0.00822      0.00000      0.00000      0.00000     -0.01263      0.00000      0.00000      0.00000     -0.00023      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00822      0.00000      0.00000      0.00000     -0.01263      0.00000      0.00000      0.00000     -0.00023      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00822      0.00000      0.00000      0.00000     -0.01263      0.00000      0.00000      0.00000     -0.00023      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03159      0.04889      0.00000      0.00000      0.00000     -0.01428      0.00000      0.00000      0.00000     -0.00623      0.00000      0.00000      0.00000      0.00531      0.00000      0.00000      0.00000      0.43358      0.00000      0.00000     -0.21482      0.00000     -0.21482      0.30314      0.00000      0.00000     -0.15048      0.00000     -0.15048 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.29682      0.00000      0.00000      0.00000      0.00000      0.00000      0.90724      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.29682      0.00000      0.00000      0.00000      0.00000      0.00000      0.90724      0.00000      0.00000      0.00000 \n     0.03159      0.04889      0.00000      0.00000      0.00000     -0.01428      0.00000      0.00000      0.00000     -0.00623      0.00000      0.00000      0.00000      0.00531      0.00000      0.00000      0.00000     -0.21482      0.00000      0.00000      0.43358      0.00000     -0.21482     -0.15048      0.00000      0.00000      0.30314      0.00000     -0.15048 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.29682      0.00000      0.00000      0.00000      0.00000      0.00000      0.90724      0.00000 \n     0.03159      0.04889      0.00000      0.00000      0.00000     -0.01428      0.00000      0.00000      0.00000     -0.00623      0.00000      0.00000      0.00000      0.00531      0.00000      0.00000      0.00000     -0.21482      0.00000      0.00000     -0.21482      0.00000      0.43358     -0.15048      0.00000      0.00000     -0.15048      0.00000      0.30314 \n     0.00705      0.01587      0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.01432      0.00000      0.00000      0.00000      0.01088      0.00000      0.00000      0.00000      0.30314      0.00000      0.00000     -0.15048      0.00000     -0.15048      0.21248      0.00000      0.00000     -0.10487      0.00000     -0.10488 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.90724      0.00000      0.00000      0.00000      0.00000      0.00000      0.63470      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.90724      0.00000      0.00000      0.00000      0.00000      0.00000      0.63470      0.00000      0.00000      0.00000 \n     0.00705      0.01587      0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.01432      0.00000      0.00000      0.00000      0.01088      0.00000      0.00000      0.00000     -0.15048      0.00000      0.00000      0.30314      0.00000     -0.15048     -0.10487      0.00000      0.00000      0.21247      0.00000     -0.10487 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.90724      0.00000      0.00000      0.00000      0.00000      0.00000      0.63470      0.00000 \n     0.00705      0.01587      0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.01432      0.00000      0.00000      0.00000      0.01088      0.00000      0.00000      0.00000     -0.15048      0.00000      0.00000     -0.15048      0.00000      0.30314     -0.10488      0.00000      0.00000     -0.10487      0.00000      0.21248 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99877      0.88806      0.88806      0.88806      0.88806      0.88806      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.56093      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -213.82410    -24.13520    -20.54353    -20.54353    -20.54353     -2.70221     -1.70570     -1.70570     -1.70570     -0.16713     -0.14149     -0.14149     -0.14149     -0.14149     -0.14149     -0.04614     -0.04614     -0.04614      0.06958      0.12931      0.12931      0.12931      0.69775      1.10068      1.10068      1.10068      1.10068      1.10068     11.11572 \n   </alphaeps>\n   <betaeps>\n  -213.82250    -24.07507    -20.49697    -20.49697    -20.49697     -2.54866     -1.55462     -1.55462     -1.55462     -0.12646     -0.02899     -0.02899     -0.02899     -0.00231     -0.00231     -0.00231     -0.00231     -0.00231      0.09145      0.16395      0.16395      0.16395      0.76365      1.21342      1.21342      1.21342      1.21342      1.21342     11.24904 \n   </betaeps>\n   <alphavectors>\n    -0.99611     -0.29981     -0.00000     -0.00000     -0.00000     -0.11143      0.00000      0.00000     -0.00000      0.02750     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00986     -0.00000      0.00000      0.00000     -0.05413      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.09779 \n     0.01309     -1.03431     -0.00000     -0.00000     -0.00000     -0.44308      0.00000      0.00000     -0.00000      0.11317     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.12444     -0.00000      0.00000      0.00000     -0.12185      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.91234 \n    -0.00000     -0.00000     -0.99512     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.36473      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.06431     -0.00000      0.00000     -0.00000     -0.10415     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99512      0.00000     -0.00000      0.00000     -0.36473     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.06431      0.00000      0.00000     -0.00000     -0.00000     -0.10415     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.99512      0.00000      0.36473     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.06431     -0.00000      0.00000     -0.10415     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.02328     -0.07313     -0.00000     -0.00000     -0.00000      1.05447     -0.00000      0.00000      0.00000     -0.33697      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.08375      0.00000     -0.00000     -0.00000      0.89386      0.00000      0.00000      0.00000     -0.00000      0.00000    -14.92508 \n     0.00000      0.00000     -0.01393      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.05866     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.15071      0.00000     -0.00000      0.00000      0.13040      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.01393     -0.00000      0.00000     -0.00000      1.05866      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.15071     -0.00000     -0.00000      0.00000      0.00000      0.13040      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.01393     -0.00000     -1.05866      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.15071      0.00000     -0.00000      0.13040      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00112     -0.00630     -0.00000     -0.00000     -0.00000     -0.00854      0.00000      0.00000     -0.00000      0.57971     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.97979     -0.00000      0.00000      0.00000      2.91605     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.54269 \n    -0.00000     -0.00000      0.00395     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.01188      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.42972     -0.00000      0.00000     -0.00000     -1.42839     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00395      0.00000     -0.00000      0.00000      0.01188     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.42972      0.00000      0.00000     -0.00000     -0.00000     -1.42839      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00395      0.00000     -0.01188     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.42972     -0.00000      0.00000     -1.42839      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00042     -0.00239     -0.00000     -0.00000     -0.00000     -0.00362      0.00000      0.00000     -0.00000     -0.45283     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.98219     -0.00000      0.00000      0.00000      1.23893     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.24720 \n     0.00000      0.00000     -0.00210      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00397     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.65062      0.00000     -0.00000      0.00000      1.32447      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00210     -0.00000      0.00000     -0.00000     -0.00397      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.65062     -0.00000     -0.00000      0.00000      0.00000      1.32447     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00210      0.00000      0.00397      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.65062      0.00000     -0.00000      1.32447      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00885     -0.02150     -0.00000     -0.00000     -0.00000     -0.00835      0.00000      0.00000     -0.00000     -0.01171     -0.18635      0.00000      0.67233     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.07660      0.00000     -0.00000      0.00000      0.01775     -0.15369      0.00000      0.00000      0.82730      0.00000     -6.77012 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.20842      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.45744     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.20842      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.45744      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00885     -0.02150     -0.00000     -0.00000     -0.00000     -0.00835      0.00000      0.00000     -0.00000     -0.01171     -0.48908      0.00000     -0.49755      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.07660      0.00000     -0.00000      0.00000      0.01775     -0.63962      0.00000      0.00000     -0.54675      0.00000     -6.77012 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.20842     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.45744     -0.00000     -0.00000     -0.00000 \n    -0.00885     -0.02150     -0.00000     -0.00000     -0.00000     -0.00835      0.00000      0.00000     -0.00000     -0.01171      0.67543     -0.00000     -0.17478      0.00000      0.00000      0.00000      0.00000      0.00000      0.07660     -0.00000      0.00000     -0.00000      0.01775      0.79330      0.00000      0.00000     -0.28055      0.00000     -6.77012 \n    -0.00130     -0.00579     -0.00000     -0.00000     -0.00000     -0.00711      0.00000      0.00000     -0.00000     -0.02644     -0.13037      0.00000      0.47036     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.04440      0.00000     -0.00000      0.00000      1.10115      0.17864     -0.00000      0.00000     -0.96159     -0.00000     -0.14080 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.84540     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.69402     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.84540     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.69402      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00130     -0.00579     -0.00000     -0.00000     -0.00000     -0.00711      0.00000      0.00000     -0.00000     -0.02644     -0.34216      0.00000     -0.34808      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.04440      0.00000     -0.00000      0.00000      1.10115      0.74344     -0.00000      0.00000      0.63550     -0.00000     -0.14080 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.84540      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.69402     -0.00000     -0.00000     -0.00000 \n    -0.00130     -0.00579     -0.00000     -0.00000     -0.00000     -0.00711      0.00000      0.00000     -0.00000     -0.02644      0.47253     -0.00000     -0.12228      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04440     -0.00000      0.00000     -0.00000      1.10115     -0.92208     -0.00000      0.00000      0.32609     -0.00000     -0.14080 \n   </alphavectors>\n   <betavectors>\n     0.99611     -0.29995      0.00000      0.00000      0.00000     -0.11085     -0.00000      0.00000     -0.00000      0.02464      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.01083     -0.00000      0.00000      0.00000     -0.05580      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.09771 \n    -0.01308     -1.03464     -0.00000     -0.00000     -0.00000     -0.44131     -0.00000      0.00000     -0.00000      0.09465      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.13228     -0.00000      0.00000      0.00000     -0.13364      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.91218 \n    -0.00000     -0.00000      0.99571      0.00000      0.00000      0.00000      0.00000     -0.00000      0.36242      0.00000      0.00000     -0.00000      0.05261      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.11284     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.99571     -0.00000     -0.00000     -0.36242     -0.00000      0.00000      0.00000      0.05261     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.11284     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99571      0.00000      0.00000      0.36242     -0.00000      0.00000      0.00000     -0.05261     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.11284      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.02326     -0.06465      0.00000      0.00000      0.00000      1.04389      0.00000     -0.00000      0.00000     -0.29383     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.08389      0.00000     -0.00000     -0.00000      0.87243     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     14.92804 \n    -0.00000     -0.00000      0.01229     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.05727     -0.00000     -0.00000      0.00000     -0.13813     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15368      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.01229      0.00000      0.00000      1.05727      0.00000     -0.00000     -0.00000     -0.13813      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.15368      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.01229     -0.00000     -0.00000     -1.05727      0.00000     -0.00000     -0.00000      0.13813      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.15368     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00112     -0.00571      0.00000      0.00000      0.00000     -0.00929     -0.00000      0.00000     -0.00000      0.42848      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -2.16173     -0.00000      0.00000      0.00000      2.81240     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.53590 \n     0.00000      0.00000     -0.00336      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02143      0.00000      0.00000     -0.00000      0.25538      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.46950     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00336      0.00000      0.00000      0.02143     -0.00000      0.00000      0.00000      0.25538     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.46950     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00336      0.00000      0.00000     -0.02143     -0.00000      0.00000      0.00000     -0.25538     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.46950     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00042     -0.00217      0.00000      0.00000      0.00000     -0.00400     -0.00000      0.00000     -0.00000     -0.64912     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.96703      0.00000     -0.00000     -0.00000      1.17472     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.24421 \n    -0.00000     -0.00000      0.00178     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00802     -0.00000     -0.00000      0.00000      0.80468     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.23692      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00178     -0.00000     -0.00000     -0.00802     -0.00000      0.00000      0.00000      0.80468      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.23692      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00178     -0.00000     -0.00000      0.00802      0.00000     -0.00000     -0.00000     -0.80468      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.23692      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00885     -0.01855      0.00000      0.00000      0.00000     -0.01200     -0.00000      0.00000     -0.00000      0.00046      0.00000     -0.00000      0.00000     -0.17358      0.00000     -0.00000     -0.65463     -0.00000      0.07575     -0.00000      0.00000      0.00000      0.00387      0.10304      0.00000     -0.00000      0.85177     -0.00000      6.77017 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.17304     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.48606     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.17304     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.48606     -0.00000 \n     0.00885     -0.01855      0.00000      0.00000      0.00000     -0.01200     -0.00000      0.00000     -0.00000      0.00046      0.00000     -0.00000      0.00000     -0.48014      0.00000     -0.00000      0.47764     -0.00000      0.07575     -0.00000      0.00000      0.00000      0.00387      0.68613      0.00000     -0.00000     -0.51512     -0.00000      6.77017 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.17304      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.48606     -0.00000      0.00000     -0.00000 \n     0.00885     -0.01855      0.00000      0.00000      0.00000     -0.01200     -0.00000      0.00000     -0.00000      0.00046      0.00000     -0.00000      0.00000      0.65372      0.00000     -0.00000      0.17700     -0.00000      0.07575     -0.00000      0.00000      0.00000      0.00387     -0.78917      0.00000     -0.00000     -0.33665     -0.00000      6.77017 \n     0.00130     -0.00521      0.00000      0.00000      0.00000     -0.00949     -0.00000      0.00000     -0.00000      0.00321      0.00000     -0.00000      0.00000     -0.13108      0.00000     -0.00000     -0.49438     -0.00000     -0.08964     -0.00000      0.00000      0.00000      1.09833     -0.11601      0.00000     -0.00000     -0.95904     -0.00000      0.14360 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.88587      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.67321      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.88587      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.67321      0.00000 \n     0.00130     -0.00521      0.00000      0.00000      0.00000     -0.00949     -0.00000      0.00000     -0.00000      0.00321      0.00000     -0.00000      0.00000     -0.36260      0.00000     -0.00000      0.36071     -0.00000     -0.08964     -0.00000      0.00000      0.00000      1.09833     -0.77254      0.00000     -0.00000      0.57999     -0.00000      0.14360 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.88587     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.67321      0.00000     -0.00000      0.00000 \n     0.00130     -0.00521      0.00000      0.00000      0.00000     -0.00949     -0.00000      0.00000     -0.00000      0.00321      0.00000     -0.00000      0.00000      0.49369      0.00000     -0.00000      0.13367     -0.00000     -0.08964     -0.00000      0.00000      0.00000      1.09833      0.88856      0.00000     -0.00000      0.37905     -0.00000      0.14360 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mn\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.19323      0.70465      0.00000      0.00000      0.00000     -0.17986      0.00000      0.00000      0.00000      0.03879      0.00000      0.00000      0.00000     -0.02062      0.00000      0.00000      0.00000      0.02550      0.00000      0.00000      0.02550      0.00000      0.02550      0.00587      0.00000      0.00000      0.00587      0.00000      0.00587 \n     0.70465      2.56313      0.00000      0.00000      0.00000     -0.90797      0.00000      0.00000      0.00000      0.14543      0.00000      0.00000      0.00000     -0.09017      0.00000      0.00000      0.00000      0.03087      0.00000      0.00000      0.03087      0.00000      0.03087      0.00910      0.00000      0.00000      0.00910      0.00000      0.00910 \n     0.00000      0.00000      2.25263      0.00000      0.00000      0.00000     -0.75792      0.00000      0.00000      0.00000     -0.01186      0.00000      0.00000      0.00000      0.00459      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25263      0.00000      0.00000      0.00000     -0.75792      0.00000      0.00000      0.00000     -0.01186      0.00000      0.00000      0.00000      0.00459      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25263      0.00000      0.00000      0.00000     -0.75792      0.00000      0.00000      0.00000     -0.01186      0.00000      0.00000      0.00000      0.00459      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.17986     -0.90797      0.00000      0.00000      0.00000      2.48982      0.00000      0.00000      0.00000     -0.38860      0.00000      0.00000      0.00000      0.28243      0.00000      0.00000      0.00000     -0.00162      0.00000      0.00000     -0.00162      0.00000     -0.00162      0.00929      0.00000      0.00000      0.00929      0.00000      0.00929 \n     0.00000      0.00000     -0.75792      0.00000      0.00000      0.00000      2.25596      0.00000      0.00000      0.00000      0.01220      0.00000      0.00000      0.00000     -0.00155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.75792      0.00000      0.00000      0.00000      2.25596      0.00000      0.00000      0.00000      0.01220      0.00000      0.00000      0.00000     -0.00155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.75792      0.00000      0.00000      0.00000      2.25596      0.00000      0.00000      0.00000      0.01220      0.00000      0.00000      0.00000     -0.00155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03879      0.14543      0.00000      0.00000      0.00000     -0.38860      0.00000      0.00000      0.00000      0.68180      0.00000      0.00000      0.00000     -0.51459      0.00000      0.00000      0.00000     -0.01277      0.00000      0.00000     -0.01277      0.00000     -0.01277     -0.03082      0.00000      0.00000     -0.03082      0.00000     -0.03082 \n     0.00000      0.00000     -0.01186      0.00000      0.00000      0.00000      0.01220      0.00000      0.00000      0.00000      0.00019      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01186      0.00000      0.00000      0.00000      0.01220      0.00000      0.00000      0.00000      0.00019      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01186      0.00000      0.00000      0.00000      0.01220      0.00000      0.00000      0.00000      0.00019      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02062     -0.09017      0.00000      0.00000      0.00000      0.28243      0.00000      0.00000      0.00000     -0.51459      0.00000      0.00000      0.00000      0.40995      0.00000      0.00000      0.00000      0.00898      0.00000      0.00000      0.00898      0.00000      0.00898      0.01995      0.00000      0.00000      0.01995      0.00000      0.01995 \n     0.00000      0.00000      0.00459      0.00000      0.00000      0.00000     -0.00155      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00459      0.00000      0.00000      0.00000     -0.00155      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00459      0.00000      0.00000      0.00000     -0.00155      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02550      0.03087      0.00000      0.00000      0.00000     -0.00162      0.00000      0.00000      0.00000     -0.01277      0.00000      0.00000      0.00000      0.00898      0.00000      0.00000      0.00000      0.52808      0.00000      0.00000     -0.26270      0.00000     -0.26270      0.33259      0.00000      0.00000     -0.16482      0.00000     -0.16482 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.58157      0.00000      0.00000      0.00000      0.00000      0.00000      0.99482      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.58157      0.00000      0.00000      0.00000      0.00000      0.00000      0.99482      0.00000      0.00000      0.00000 \n     0.02550      0.03087      0.00000      0.00000      0.00000     -0.00162      0.00000      0.00000      0.00000     -0.01277      0.00000      0.00000      0.00000      0.00898      0.00000      0.00000      0.00000     -0.26270      0.00000      0.00000      0.52808      0.00000     -0.26270     -0.16483      0.00000      0.00000      0.33258      0.00000     -0.16483 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.58157      0.00000      0.00000      0.00000      0.00000      0.00000      0.99482      0.00000 \n     0.02550      0.03087      0.00000      0.00000      0.00000     -0.00162      0.00000      0.00000      0.00000     -0.01277      0.00000      0.00000      0.00000      0.00898      0.00000      0.00000      0.00000     -0.26270      0.00000      0.00000     -0.26270      0.00000      0.52808     -0.16483      0.00000      0.00000     -0.16482      0.00000      0.33258 \n     0.00587      0.00910      0.00000      0.00000      0.00000      0.00929      0.00000      0.00000      0.00000     -0.03082      0.00000      0.00000      0.00000      0.01995      0.00000      0.00000      0.00000      0.33259      0.00000      0.00000     -0.16483      0.00000     -0.16483      0.21066      0.00000      0.00000     -0.10223      0.00000     -0.10223 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.99482      0.00000      0.00000      0.00000      0.00000      0.00000      0.62578      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.99482      0.00000      0.00000      0.00000      0.00000      0.00000      0.62578      0.00000      0.00000      0.00000 \n     0.00587      0.00910      0.00000      0.00000      0.00000      0.00929      0.00000      0.00000      0.00000     -0.03082      0.00000      0.00000      0.00000      0.01995      0.00000      0.00000      0.00000     -0.16482      0.00000      0.00000      0.33258      0.00000     -0.16482     -0.10223      0.00000      0.00000      0.21065      0.00000     -0.10223 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.99482      0.00000      0.00000      0.00000      0.00000      0.00000      0.62578      0.00000 \n     0.00587      0.00910      0.00000      0.00000      0.00000      0.00929      0.00000      0.00000      0.00000     -0.03082      0.00000      0.00000      0.00000      0.01995      0.00000      0.00000      0.00000     -0.16482      0.00000      0.00000     -0.16483      0.00000      0.33258     -0.10223      0.00000      0.00000     -0.10223      0.00000      0.21066 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.98208      0.00359      0.00359      0.00359      0.00359      0.00359      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -233.60660    -26.84525    -23.04127    -23.04127    -23.04127     -3.08768     -2.00181     -2.00181     -2.00181     -0.25875     -0.25875     -0.25875     -0.25875     -0.25875     -0.19361     -0.04853     -0.04853     -0.04853      0.06843      0.20661      0.20661      0.20661      0.76427      1.20711      1.20711      1.20711      1.20711      1.20711     16.12484 \n   </alphaeps>\n   <betaeps>\n  -233.60490    -26.76549    -22.97982    -22.97982    -22.97982     -2.90159     -1.81983     -1.81983     -1.81983     -0.16099     -0.09329     -0.09329     -0.09329     -0.09329     -0.09329     -0.03993     -0.03993     -0.03993      0.08349      0.24991      0.24991      0.24991      0.82915      1.32747      1.32747      1.32747      1.32747      1.32747     16.27680 \n   </betaeps>\n   <alphavectors>\n     0.99609      0.30160     -0.00000     -0.00000      0.00000      0.11299     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.02821      0.00000      0.00000     -0.00000     -0.00989     -0.00000     -0.00000     -0.00000      0.05532     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.14834 \n    -0.01302      1.03443     -0.00000     -0.00000      0.00000      0.44689     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.11785      0.00000      0.00000      0.00000     -0.11776     -0.00000     -0.00000     -0.00000      0.13514     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.28208 \n     0.00000     -0.00000     -0.99518      0.00000     -0.00000      0.00000     -0.00000      0.36932      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06349     -0.00000      0.00000     -0.00000     -0.00000     -0.13025     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.99518     -0.00000      0.00000      0.00000      0.36932      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.06349     -0.00000     -0.00000      0.00000      0.13025     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.99518      0.00000     -0.00000      0.36932      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.06349     -0.00000      0.00000     -0.13025      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.02220      0.05948     -0.00000     -0.00000      0.00000     -1.07427      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.34852     -0.00000     -0.00000      0.00000      0.07305      0.00000      0.00000     -0.00000     -0.89334      0.00000      0.00000     -0.00000     -0.00000      0.00000     17.72542 \n     0.00000     -0.00000     -0.01249      0.00000     -0.00000      0.00000     -0.00000     -1.06158      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.06267     -0.00000      0.00000     -0.00000     -0.00000     -0.14649      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.01249      0.00000     -0.00000     -0.00000     -1.06158      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.06267     -0.00000     -0.00000      0.00000      0.14649     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.01249      0.00000     -0.00000     -1.06158      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06267     -0.00000      0.00000     -0.14649     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00140      0.00654     -0.00000     -0.00000      0.00000      0.00368     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.62645      0.00000      0.00000     -0.00000     -1.81438     -0.00000     -0.00000      0.00000     -2.66267     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.30210 \n     0.00000     -0.00000      0.00421      0.00000     -0.00000      0.00000     -0.00000      0.00104      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.35066     -0.00000      0.00000     -0.00000     -0.00000     -1.35844     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00421     -0.00000      0.00000      0.00000      0.00104      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.35066     -0.00000     -0.00000      0.00000      1.35844     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00421      0.00000     -0.00000      0.00104      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.35066     -0.00000      0.00000     -1.35844     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00056      0.00265     -0.00000     -0.00000      0.00000      0.00170     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.37771     -0.00000     -0.00000     -0.00000     -1.92782      0.00000      0.00000      0.00000     -1.17340      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.16331 \n    -0.00000      0.00000     -0.00224     -0.00000      0.00000     -0.00000      0.00000     -0.00220     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.72940      0.00000     -0.00000      0.00000      0.00000      1.19155     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00224      0.00000     -0.00000     -0.00000     -0.00220     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.72940      0.00000      0.00000     -0.00000     -1.19155      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00224     -0.00000      0.00000     -0.00220     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.72940      0.00000     -0.00000      1.19155      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00828      0.01538     -0.00000     -0.00000      0.00000      0.00217     -0.00000     -0.00000      0.00000     -0.46380      0.55707     -0.00000      0.00000      0.00000      0.01621     -0.00000      0.00000     -0.00000      0.06227      0.00000     -0.00000      0.00000     -0.02115      0.00000     -0.00000     -0.33127     -0.00000     -0.74809      7.97798 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.25552      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.41708     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.25552      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.41708     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00828      0.01538     -0.00000     -0.00000      0.00000      0.00217     -0.00000     -0.00000      0.00000     -0.25054     -0.68020     -0.00000      0.00000      0.00000      0.01621     -0.00000      0.00000     -0.00000      0.06227      0.00000     -0.00000      0.00000     -0.02115      0.00000      0.00000      0.81350     -0.00000      0.08715      7.97798 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.25552      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.41708      0.00000      0.00000 \n     0.00828      0.01538     -0.00000     -0.00000      0.00000      0.00217     -0.00000     -0.00000      0.00000      0.71434      0.12313      0.00000     -0.00000     -0.00000      0.01621      0.00000     -0.00000      0.00000      0.06227     -0.00000      0.00000     -0.00000     -0.02115      0.00000      0.00000     -0.48222      0.00000      0.66093      7.97798 \n     0.00153      0.00585     -0.00000     -0.00000      0.00000      0.00198     -0.00000     -0.00000      0.00000     -0.29163      0.35028     -0.00000      0.00000      0.00000      0.04379     -0.00000      0.00000     -0.00000     -0.00520      0.00000     -0.00000      0.00000     -1.01579      0.00000      0.00000      0.40228     -0.00000      0.90843      0.42209 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.78944     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.72082     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.78944     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.72082     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00153      0.00585     -0.00000     -0.00000      0.00000      0.00198     -0.00000     -0.00000      0.00000     -0.15753     -0.42769     -0.00000      0.00000      0.00000      0.04379     -0.00000      0.00000     -0.00000     -0.00520      0.00000     -0.00000      0.00000     -1.01579      0.00000      0.00000     -0.98786     -0.00000     -0.10583      0.42209 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.78944     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.72082      0.00000      0.00000 \n     0.00153      0.00585     -0.00000     -0.00000      0.00000      0.00198     -0.00000     -0.00000      0.00000      0.44916      0.07742      0.00000     -0.00000     -0.00000      0.04379      0.00000     -0.00000      0.00000     -0.00520     -0.00000      0.00000     -0.00000     -1.01579      0.00000      0.00000      0.58558      0.00000     -0.80260      0.42209 \n   </alphavectors>\n   <betavectors>\n    -0.99610      0.30175     -0.00000     -0.00000     -0.00000     -0.11226      0.00000      0.00000     -0.00000      0.02550      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.01062      0.00000     -0.00000     -0.00000     -0.05735      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.14822 \n     0.01301      1.03484     -0.00000     -0.00000     -0.00000     -0.44482      0.00000      0.00000     -0.00000      0.10284      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.12443      0.00000     -0.00000     -0.00000     -0.14817      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.28169 \n     0.00000      0.00000     -0.00000      0.99588     -0.00000      0.00000     -0.00000      0.36616      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.05476      0.00000      0.00000     -0.00000      0.00000     -0.13762     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.99588      0.00000     -0.00000     -0.00000     -0.36616      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05476      0.00000     -0.00000     -0.13762     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.99588     -0.00000     -0.00000      0.00000      0.36616      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.05476     -0.00000     -0.00000      0.00000     -0.13762      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.02218      0.05118     -0.00000     -0.00000     -0.00000      1.05701     -0.00000     -0.00000      0.00000     -0.30254      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06815      0.00000      0.00000      0.00000      0.87152      0.00000     -0.00000     -0.00000      0.00000     -0.00000    -17.72844 \n     0.00000      0.00000     -0.00000      0.01077     -0.00000      0.00000     -0.00000     -1.06242      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.07947      0.00000      0.00000     -0.00000      0.00000     -0.13159     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.01077      0.00000     -0.00000     -0.00000      1.06242      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.07947      0.00000     -0.00000     -0.13159      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.01077      0.00000      0.00000     -0.00000     -1.06242     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.07947     -0.00000     -0.00000      0.00000     -0.13159     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00139      0.00577     -0.00000     -0.00000     -0.00000     -0.00551      0.00000      0.00000     -0.00000      0.54269     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.97270      0.00000     -0.00000     -0.00000      2.56734      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.29692 \n     0.00000      0.00000     -0.00000     -0.00345     -0.00000      0.00000     -0.00000     -0.01261      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.24288      0.00000      0.00000     -0.00000      0.00000     -1.38173     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00345      0.00000     -0.00000     -0.00000      0.01261      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.24288      0.00000     -0.00000     -1.38173      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00345     -0.00000     -0.00000     -0.00000     -0.01261      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.24288     -0.00000     -0.00000      0.00000     -1.38173      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00056      0.00233     -0.00000     -0.00000     -0.00000     -0.00254      0.00000      0.00000     -0.00000     -0.52167     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.92825     -0.00000     -0.00000     -0.00000      1.11646      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.16100 \n    -0.00000     -0.00000      0.00000      0.00183      0.00000     -0.00000      0.00000      0.00370     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.82071     -0.00000     -0.00000      0.00000     -0.00000      1.13059      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00183     -0.00000      0.00000      0.00000     -0.00370     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.82071     -0.00000      0.00000      1.13059      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00183      0.00000      0.00000     -0.00000      0.00370      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.82071      0.00000      0.00000     -0.00000      1.13059      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00827      0.01266     -0.00000     -0.00000     -0.00000     -0.00801      0.00000      0.00000     -0.00000     -0.00538     -0.45971      0.52483     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06037      0.00000     -0.00000     -0.00000      0.00540     -0.43398     -0.00000     -0.00000      0.72090     -0.00000     -7.97804 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.20844      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.45744      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.20844     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.45744      0.00000 \n    -0.00827      0.01266     -0.00000     -0.00000     -0.00000     -0.00801      0.00000      0.00000     -0.00000     -0.00538     -0.22466     -0.66053      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.06037     -0.00000      0.00000      0.00000      0.00540     -0.40733     -0.00000      0.00000     -0.73629     -0.00000     -7.97804 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.20844      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.45744     -0.00000     -0.00000     -0.00000 \n    -0.00827      0.01266     -0.00000     -0.00000     -0.00000     -0.00801      0.00000      0.00000     -0.00000     -0.00538      0.68437      0.13571     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06037      0.00000     -0.00000     -0.00000      0.00540      0.84131      0.00000     -0.00000      0.01539     -0.00000     -7.97804 \n    -0.00153      0.00513     -0.00000     -0.00000     -0.00000     -0.00612      0.00000      0.00000     -0.00000     -0.00656     -0.32159      0.36715     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.04223      0.00000     -0.00000     -0.00000      1.01485      0.50444     -0.00000     -0.00000     -0.83794     -0.00000     -0.42445 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.84537     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.69405      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.84537      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.69405      0.00000 \n    -0.00153      0.00513     -0.00000     -0.00000     -0.00000     -0.00612      0.00000      0.00000     -0.00000     -0.00656     -0.15716     -0.46208      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.04223     -0.00000      0.00000      0.00000      1.01485      0.47346     -0.00000     -0.00000      0.85583     -0.00000     -0.42445 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.84537     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.69405     -0.00000     -0.00000     -0.00000 \n    -0.00153      0.00513     -0.00000     -0.00000     -0.00000     -0.00612      0.00000      0.00000     -0.00000     -0.00656      0.47875      0.09493     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.04223      0.00000     -0.00000     -0.00000      1.01485     -0.97789     -0.00000     -0.00000     -0.01789     -0.00000     -0.42445 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Fe\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.19552      0.70960      0.00000      0.00000      0.00000     -0.19279      0.00000      0.00000      0.00000      0.03796      0.00000      0.00000      0.00000     -0.02088      0.00000      0.00000      0.00000      0.02101      0.00000      0.00000      0.02101      0.00000      0.02101      0.00578      0.00000      0.00000      0.00578      0.00000      0.00578 \n     0.70960      2.56980      0.00000      0.00000      0.00000     -0.93552      0.00000      0.00000      0.00000      0.14119      0.00000      0.00000      0.00000     -0.09184      0.00000      0.00000      0.00000      0.02254      0.00000      0.00000      0.02254      0.00000      0.02254      0.00900      0.00000      0.00000      0.00900      0.00000      0.00900 \n     0.00000      0.00000      2.25887      0.00000      0.00000      0.00000     -0.76729      0.00000      0.00000      0.00000     -0.01140      0.00000      0.00000      0.00000      0.00429      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25887      0.00000      0.00000      0.00000     -0.76729      0.00000      0.00000      0.00000     -0.01140      0.00000      0.00000      0.00000      0.00429      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25887      0.00000      0.00000      0.00000     -0.76729      0.00000      0.00000      0.00000     -0.01140      0.00000      0.00000      0.00000      0.00429      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.19279     -0.93552      0.00000      0.00000      0.00000      2.47043      0.00000      0.00000      0.00000     -0.36694      0.00000      0.00000      0.00000      0.27957      0.00000      0.00000      0.00000     -0.00577      0.00000      0.00000     -0.00577      0.00000     -0.00577      0.00663      0.00000      0.00000      0.00663      0.00000      0.00663 \n     0.00000      0.00000     -0.76729      0.00000      0.00000      0.00000      2.26030      0.00000      0.00000      0.00000      0.01218      0.00000      0.00000      0.00000     -0.00148      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.76729      0.00000      0.00000      0.00000      2.26030      0.00000      0.00000      0.00000      0.01218      0.00000      0.00000      0.00000     -0.00148      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.76729      0.00000      0.00000      0.00000      2.26030      0.00000      0.00000      0.00000      0.01218      0.00000      0.00000      0.00000     -0.00148      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03796      0.14119      0.00000      0.00000      0.00000     -0.36694      0.00000      0.00000      0.00000      0.65058      0.00000      0.00000      0.00000     -0.51728      0.00000      0.00000      0.00000     -0.00987      0.00000      0.00000     -0.00987      0.00000     -0.00987     -0.02799      0.00000      0.00000     -0.02799      0.00000     -0.02799 \n     0.00000      0.00000     -0.01140      0.00000      0.00000      0.00000      0.01218      0.00000      0.00000      0.00000      0.00015      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01140      0.00000      0.00000      0.00000      0.01218      0.00000      0.00000      0.00000      0.00015      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01140      0.00000      0.00000      0.00000      0.01218      0.00000      0.00000      0.00000      0.00015      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02088     -0.09184      0.00000      0.00000      0.00000      0.27957      0.00000      0.00000      0.00000     -0.51728      0.00000      0.00000      0.00000      0.42316      0.00000      0.00000      0.00000      0.00760      0.00000      0.00000      0.00760      0.00000      0.00760      0.02067      0.00000      0.00000      0.02067      0.00000      0.02067 \n     0.00000      0.00000      0.00429      0.00000      0.00000      0.00000     -0.00148      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00429      0.00000      0.00000      0.00000     -0.00148      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00429      0.00000      0.00000      0.00000     -0.00148      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02101      0.02254      0.00000      0.00000      0.00000     -0.00577      0.00000      0.00000      0.00000     -0.00987      0.00000      0.00000      0.00000      0.00760      0.00000      0.00000      0.00000      0.64377      0.00000      0.00000     -0.32107      0.00000     -0.32107      0.40036      0.00000      0.00000     -0.19915      0.00000     -0.19915 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.92967      0.00000      0.00000      0.00000      0.00000      0.00000      1.19904      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.92967      0.00000      0.00000      0.00000      0.00000      0.00000      1.19904      0.00000      0.00000      0.00000 \n     0.02101      0.02254      0.00000      0.00000      0.00000     -0.00577      0.00000      0.00000      0.00000     -0.00987      0.00000      0.00000      0.00000      0.00760      0.00000      0.00000      0.00000     -0.32107      0.00000      0.00000      0.64377      0.00000     -0.32107     -0.19915      0.00000      0.00000      0.40036      0.00000     -0.19916 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.92967      0.00000      0.00000      0.00000      0.00000      0.00000      1.19904      0.00000 \n     0.02101      0.02254      0.00000      0.00000      0.00000     -0.00577      0.00000      0.00000      0.00000     -0.00987      0.00000      0.00000      0.00000      0.00760      0.00000      0.00000      0.00000     -0.32107      0.00000      0.00000     -0.32107      0.00000      0.64377     -0.19915      0.00000      0.00000     -0.19916      0.00000      0.40037 \n     0.00578      0.00900      0.00000      0.00000      0.00000      0.00663      0.00000      0.00000      0.00000     -0.02799      0.00000      0.00000      0.00000      0.02067      0.00000      0.00000      0.00000      0.40036      0.00000      0.00000     -0.19915      0.00000     -0.19915      0.25018      0.00000      0.00000     -0.12273      0.00000     -0.12274 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19904      0.00000      0.00000      0.00000      0.00000      0.00000      0.74584      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19904      0.00000      0.00000      0.00000      0.00000      0.00000      0.74584      0.00000      0.00000      0.00000 \n     0.00578      0.00900      0.00000      0.00000      0.00000      0.00663      0.00000      0.00000      0.00000     -0.02799      0.00000      0.00000      0.00000      0.02067      0.00000      0.00000      0.00000     -0.19915      0.00000      0.00000      0.40036      0.00000     -0.19916     -0.12273      0.00000      0.00000      0.25018      0.00000     -0.12274 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19904      0.00000      0.00000      0.00000      0.00000      0.00000      0.74584      0.00000 \n     0.00578      0.00900      0.00000      0.00000      0.00000      0.00663      0.00000      0.00000      0.00000     -0.02799      0.00000      0.00000      0.00000      0.02067      0.00000      0.00000      0.00000     -0.19915      0.00000      0.00000     -0.19916      0.00000      0.40037     -0.12274      0.00000      0.00000     -0.12274      0.00000      0.25019 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99980      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.96144      0.20775      0.20775      0.20775      0.20775      0.20775      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -254.13810    -29.54201    -25.52699    -25.52699    -25.52699     -3.35177     -2.17823     -2.17823     -2.17823     -0.26763     -0.26763     -0.26763     -0.26763     -0.26763     -0.19498     -0.04470     -0.04470     -0.04470      0.07966      0.24366      0.24366      0.24366      0.84716      1.33181      1.33181      1.33181      1.33181      1.33181     20.09216 \n   </alphaeps>\n   <betaeps>\n  -254.13660    -29.47189    -25.47315    -25.47315    -25.47315     -3.20049     -2.03043     -2.03043     -2.03043     -0.16988     -0.13337     -0.13337     -0.13337     -0.13337     -0.13337     -0.03814     -0.03814     -0.03814      0.09156      0.27944      0.27944      0.27944      0.89771      1.42724      1.42724      1.42724      1.42724      1.42724     20.21147 \n   </betaeps>\n   <alphavectors>\n    -0.99607      0.30315     -0.00000      0.00000      0.00000     -0.11414      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02761      0.00000     -0.00000     -0.00000      0.01000      0.00000     -0.00000     -0.00000      0.05567      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.17823 \n     0.01309      1.03456      0.00000      0.00000      0.00000     -0.45035      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.11502      0.00000     -0.00000     -0.00000      0.11956      0.00000     -0.00000     -0.00000      0.13524      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.48751 \n     0.00000      0.00000      0.99545      0.00000     -0.00000     -0.00000     -0.00000      0.37272      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06137      0.00000     -0.00000     -0.00000     -0.14132     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99545      0.00000      0.00000     -0.37272      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.06137     -0.00000     -0.00000      0.00000      0.14132      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.99545      0.00000      0.00000      0.00000      0.37272     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.06137     -0.00000      0.00000      0.00000     -0.14132     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.01990      0.04658      0.00000      0.00000     -0.00000      1.07300      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.33092     -0.00000      0.00000      0.00000     -0.05233     -0.00000      0.00000      0.00000     -0.89914      0.00000      0.00000     -0.00000      0.00000      0.00000     18.71758 \n     0.00000      0.00000      0.01194      0.00000     -0.00000     -0.00000     -0.00000     -1.06314     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.09032      0.00000     -0.00000     -0.00000     -0.02616     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.01194      0.00000      0.00000      1.06314      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.09032     -0.00000     -0.00000      0.00000      0.02616     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.01194      0.00000      0.00000      0.00000     -1.06314      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.09032      0.00000     -0.00000     -0.00000     -0.02616     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00150      0.00636      0.00000      0.00000     -0.00000     -0.00389      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.60590      0.00000     -0.00000      0.00000      1.82227      0.00000     -0.00000     -0.00000     -2.60562      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.18732 \n     0.00000      0.00000     -0.00388      0.00000     -0.00000     -0.00000     -0.00000     -0.00031      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.30968      0.00000     -0.00000     -0.00000     -1.34871      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00388      0.00000      0.00000      0.00031      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.30968     -0.00000     -0.00000      0.00000      1.34871      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00388     -0.00000     -0.00000     -0.00000     -0.00031     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.30968     -0.00000     -0.00000     -0.00000     -1.34871      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00060      0.00257      0.00000      0.00000      0.00000     -0.00182      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.41060     -0.00000      0.00000      0.00000      1.90202     -0.00000     -0.00000     -0.00000     -1.13241      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.11907 \n    -0.00000     -0.00000      0.00205     -0.00000      0.00000      0.00000      0.00000     -0.00169      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.76664     -0.00000      0.00000      0.00000      1.14634      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00205     -0.00000     -0.00000      0.00169     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.76664      0.00000      0.00000     -0.00000     -1.14634      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00205      0.00000      0.00000      0.00000     -0.00169     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.76664      0.00000     -0.00000     -0.00000      1.14634     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00726      0.01013      0.00000      0.00000      0.00000     -0.00320      0.00000      0.00000     -0.00000      0.63516     -0.36671     -0.00000      0.00000     -0.00000      0.01239      0.00000      0.00000     -0.00000     -0.05261      0.00000     -0.00000     -0.00000     -0.02598      0.69670      0.40224      0.00000      0.00000      0.00000      8.42812 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.27032     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.39341      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.27032     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.39341     -0.00000 \n    -0.00726      0.01013      0.00000      0.00000      0.00000     -0.00320      0.00000      0.00000      0.00000     -0.63516     -0.36671      0.00000     -0.00000      0.00000      0.01239     -0.00000     -0.00000      0.00000     -0.05261     -0.00000      0.00000      0.00000     -0.02598     -0.69670      0.40224     -0.00000      0.00000     -0.00000      8.42812 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.27032     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.39341     -0.00000     -0.00000 \n    -0.00726      0.01013      0.00000      0.00000     -0.00000     -0.00320      0.00000      0.00000     -0.00000      0.00000      0.73342     -0.00000      0.00000     -0.00000      0.01239      0.00000      0.00000     -0.00000     -0.05261     -0.00000      0.00000      0.00000     -0.02598     -0.00000     -0.80449     -0.00000      0.00000      0.00000      8.42812 \n    -0.00151      0.00532      0.00000      0.00000     -0.00000     -0.00252      0.00000     -0.00000      0.00000      0.38896     -0.22457     -0.00000      0.00000     -0.00000      0.03675      0.00000      0.00000     -0.00000      0.01346      0.00000     -0.00000     -0.00000     -1.00983     -0.85880     -0.49583      0.00000      0.00000      0.00000      0.51744 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.77793     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.71759      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.77793      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.71759      0.00000 \n    -0.00151      0.00532      0.00000      0.00000     -0.00000     -0.00252      0.00000     -0.00000     -0.00000     -0.38896     -0.22457      0.00000     -0.00000      0.00000      0.03675     -0.00000     -0.00000      0.00000      0.01346     -0.00000      0.00000      0.00000     -1.00983      0.85880     -0.49583     -0.00000      0.00000      0.00000      0.51744 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.77793      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.71759     -0.00000      0.00000 \n    -0.00151      0.00532      0.00000      0.00000      0.00000     -0.00252      0.00000     -0.00000     -0.00000      0.00000      0.44914      0.00000      0.00000     -0.00000      0.03675      0.00000      0.00000      0.00000      0.01346     -0.00000     -0.00000      0.00000     -1.00983      0.00000      0.99165     -0.00000      0.00000      0.00000      0.51744 \n   </alphavectors>\n   <betavectors>\n    -0.99607     -0.30328      0.00000     -0.00000     -0.00000      0.11358      0.00000     -0.00000      0.00000     -0.02576      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01059     -0.00000     -0.00000      0.00000     -0.05718     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.17812 \n     0.01307     -1.03493      0.00000     -0.00000     -0.00000      0.44890      0.00000     -0.00000     -0.00000     -0.10455      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12465     -0.00000     -0.00000      0.00000     -0.14475     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.48715 \n     0.00000      0.00000     -0.00000     -0.99599      0.00000      0.00000      0.00000     -0.37018     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05488      0.00000      0.00000     -0.00000     -0.14677     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.99599      0.00000      0.00000      0.00000     -0.37018     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.05488     -0.00000     -0.00000     -0.00000      0.14677      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.99599      0.00000     -0.00000     -0.00000      0.37018      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.05488     -0.00000      0.00000     -0.00000      0.14677      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.01990     -0.04153      0.00000     -0.00000     -0.00000     -1.05758     -0.00000      0.00000     -0.00000      0.29986     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.04860      0.00000      0.00000     -0.00000      0.88520     -0.00000      0.00000     -0.00000     -0.00000     -0.00000    -18.71966 \n     0.00000      0.00000     -0.00000     -0.01059      0.00000      0.00000      0.00000      1.06291     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.09582      0.00000      0.00000     -0.00000     -0.01340     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.01059      0.00000      0.00000      0.00000      1.06291     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.09582     -0.00000      0.00000     -0.00000      0.01340      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.01059      0.00000     -0.00000     -0.00000     -1.06291     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.09582      0.00000     -0.00000      0.00000      0.01340      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00150     -0.00574      0.00000     -0.00000      0.00000      0.00602      0.00000     -0.00000     -0.00000     -0.54293     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.93284     -0.00000     -0.00000      0.00000      2.53920      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.18419 \n     0.00000      0.00000     -0.00000      0.00328      0.00000      0.00000      0.00000      0.01123     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.23557      0.00000      0.00000     -0.00000     -1.36357     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00328      0.00000      0.00000      0.00000      0.01123     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.23557     -0.00000     -0.00000     -0.00000      1.36357     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00328     -0.00000      0.00000      0.00000     -0.01123     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.23557      0.00000     -0.00000      0.00000      1.36357      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00060     -0.00232      0.00000     -0.00000     -0.00000      0.00276      0.00000     -0.00000     -0.00000      0.51457      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.89974     -0.00000     -0.00000      0.00000      1.09323      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.11768 \n    -0.00000     -0.00000      0.00000     -0.00173     -0.00000     -0.00000     -0.00000     -0.00312      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.82808     -0.00000     -0.00000      0.00000      1.10278      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00173     -0.00000     -0.00000     -0.00000     -0.00312      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.82808      0.00000     -0.00000      0.00000     -1.10278      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00173      0.00000     -0.00000     -0.00000      0.00312      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.82808     -0.00000      0.00000     -0.00000     -1.10278     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00726     -0.00862      0.00000     -0.00000     -0.00000      0.00848      0.00000     -0.00000     -0.00000      0.00492      0.00000     -0.00000      0.00000     -0.61662     -0.35600      0.00000      0.00000      0.00000      0.05082      0.00000     -0.00000      0.00000      0.01529     -0.00000      0.00000     -0.00000      0.41175     -0.71317     -8.42816 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.23323     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.42634      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.23323      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.42634      0.00000     -0.00000      0.00000 \n    -0.00726     -0.00862      0.00000     -0.00000     -0.00000      0.00848      0.00000     -0.00000      0.00000      0.00492     -0.00000      0.00000     -0.00000      0.61661     -0.35601     -0.00000     -0.00000     -0.00000      0.05082      0.00000     -0.00000      0.00000      0.01529     -0.00000      0.00000      0.00000      0.41174      0.71317     -8.42816 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.23323     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.42634      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00726     -0.00862      0.00000     -0.00000     -0.00000      0.00848      0.00000     -0.00000      0.00000      0.00492      0.00000     -0.00000      0.00000      0.00000      0.71201     -0.00000     -0.00000      0.00000      0.05082     -0.00000      0.00000     -0.00000      0.01529      0.00000     -0.00000     -0.00000     -0.82350     -0.00001     -8.42816 \n    -0.00151     -0.00480      0.00000     -0.00000      0.00000      0.00620      0.00000     -0.00000      0.00000      0.01118      0.00000     -0.00000      0.00000     -0.41142     -0.23753      0.00000      0.00000      0.00000     -0.03941      0.00000     -0.00000      0.00000      1.00899     -0.00000      0.00000     -0.00000     -0.48975      0.84827     -0.51891 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.82284     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.69654      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.82284     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.69654     -0.00000      0.00000     -0.00000 \n    -0.00151     -0.00480      0.00000     -0.00000      0.00000      0.00620      0.00000     -0.00000     -0.00000      0.01118     -0.00000      0.00000     -0.00000      0.41142     -0.23754     -0.00000     -0.00000     -0.00000     -0.03941      0.00000     -0.00000      0.00000      1.00899     -0.00000      0.00000      0.00000     -0.48974     -0.84827     -0.51891 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.82284      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.69654      0.00000      0.00000      0.00000      0.00000 \n    -0.00151     -0.00480      0.00000     -0.00000      0.00000      0.00620      0.00000     -0.00000     -0.00000      0.01118      0.00000      0.00000      0.00000      0.00000      0.47507     -0.00000     -0.00000      0.00000     -0.03941     -0.00000      0.00000     -0.00000      1.00899      0.00000     -0.00000     -0.00000      0.97950      0.00001     -0.51891 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Co\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.19763      0.71351      0.00000      0.00000      0.00000     -0.20488      0.00000      0.00000      0.00000      0.03622      0.00000      0.00000      0.00000     -0.02015      0.00000      0.00000      0.00000      0.01623      0.00000      0.00000      0.01623      0.00000      0.01623      0.00589      0.00000      0.00000      0.00589      0.00000      0.00589 \n     0.71351      2.57190      0.00000      0.00000      0.00000     -0.95441      0.00000      0.00000      0.00000      0.13258      0.00000      0.00000      0.00000     -0.08828      0.00000      0.00000      0.00000      0.01492      0.00000      0.00000      0.01492      0.00000      0.01492      0.00983      0.00000      0.00000      0.00983      0.00000      0.00983 \n     0.00000      0.00000      2.26457      0.00000      0.00000      0.00000     -0.77442      0.00000      0.00000      0.00000     -0.01155      0.00000      0.00000      0.00000      0.00464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26457      0.00000      0.00000      0.00000     -0.77442      0.00000      0.00000      0.00000     -0.01155      0.00000      0.00000      0.00000      0.00464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26457      0.00000      0.00000      0.00000     -0.77442      0.00000      0.00000      0.00000     -0.01155      0.00000      0.00000      0.00000      0.00464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.20488     -0.95441      0.00000      0.00000      0.00000      2.44128      0.00000      0.00000      0.00000     -0.33832      0.00000      0.00000      0.00000      0.26468      0.00000      0.00000      0.00000     -0.01012      0.00000      0.00000     -0.01012      0.00000     -0.01012      0.00194      0.00000      0.00000      0.00194      0.00000      0.00194 \n     0.00000      0.00000     -0.77442      0.00000      0.00000      0.00000      2.26212      0.00000      0.00000      0.00000      0.01682      0.00000      0.00000      0.00000     -0.00473      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.77442      0.00000      0.00000      0.00000      2.26212      0.00000      0.00000      0.00000      0.01682      0.00000      0.00000      0.00000     -0.00473      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.77442      0.00000      0.00000      0.00000      2.26212      0.00000      0.00000      0.00000      0.01682      0.00000      0.00000      0.00000     -0.00473      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03622      0.13258      0.00000      0.00000      0.00000     -0.33832      0.00000      0.00000      0.00000      0.61479      0.00000      0.00000      0.00000     -0.50517      0.00000      0.00000      0.00000     -0.00621      0.00000      0.00000     -0.00621      0.00000     -0.00621     -0.02317      0.00000      0.00000     -0.02317      0.00000     -0.02317 \n     0.00000      0.00000     -0.01155      0.00000      0.00000      0.00000      0.01682      0.00000      0.00000      0.00000      0.00017      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01155      0.00000      0.00000      0.00000      0.01682      0.00000      0.00000      0.00000      0.00017      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01155      0.00000      0.00000      0.00000      0.01682      0.00000      0.00000      0.00000      0.00017      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02015     -0.08828      0.00000      0.00000      0.00000      0.26468      0.00000      0.00000      0.00000     -0.50517      0.00000      0.00000      0.00000      0.42167      0.00000      0.00000      0.00000      0.00508      0.00000      0.00000      0.00508      0.00000      0.00508      0.01844      0.00000      0.00000      0.01844      0.00000      0.01844 \n     0.00000      0.00000      0.00464      0.00000      0.00000      0.00000     -0.00473      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00464      0.00000      0.00000      0.00000     -0.00473      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00464      0.00000      0.00000      0.00000     -0.00473      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01623      0.01492      0.00000      0.00000      0.00000     -0.01012      0.00000      0.00000      0.00000     -0.00621      0.00000      0.00000      0.00000      0.00508      0.00000      0.00000      0.00000      0.75943      0.00000      0.00000     -0.37928      0.00000     -0.37927      0.47336      0.00000      0.00000     -0.23608      0.00000     -0.23608 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.27739      0.00000      0.00000      0.00000      0.00000      0.00000      1.41888      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.27739      0.00000      0.00000      0.00000      0.00000      0.00000      1.41888      0.00000      0.00000      0.00000 \n     0.01623      0.01492      0.00000      0.00000      0.00000     -0.01012      0.00000      0.00000      0.00000     -0.00621      0.00000      0.00000      0.00000      0.00508      0.00000      0.00000      0.00000     -0.37928      0.00000      0.00000      0.75942      0.00000     -0.37928     -0.23608      0.00000      0.00000      0.47336      0.00000     -0.23608 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.27739      0.00000      0.00000      0.00000      0.00000      0.00000      1.41888      0.00000 \n     0.01623      0.01492      0.00000      0.00000      0.00000     -0.01012      0.00000      0.00000      0.00000     -0.00621      0.00000      0.00000      0.00000      0.00508      0.00000      0.00000      0.00000     -0.37927      0.00000      0.00000     -0.37928      0.00000      0.75942     -0.23607      0.00000      0.00000     -0.23607      0.00000      0.47336 \n     0.00589      0.00983      0.00000      0.00000      0.00000      0.00194      0.00000      0.00000      0.00000     -0.02317      0.00000      0.00000      0.00000      0.01844      0.00000      0.00000      0.00000      0.47336      0.00000      0.00000     -0.23608      0.00000     -0.23607      0.29595      0.00000      0.00000     -0.14637      0.00000     -0.14637 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.41888      0.00000      0.00000      0.00000      0.00000      0.00000      0.88465      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.41888      0.00000      0.00000      0.00000      0.00000      0.00000      0.88465      0.00000      0.00000      0.00000 \n     0.00589      0.00983      0.00000      0.00000      0.00000      0.00194      0.00000      0.00000      0.00000     -0.02317      0.00000      0.00000      0.00000      0.01844      0.00000      0.00000      0.00000     -0.23608      0.00000      0.00000      0.47336      0.00000     -0.23607     -0.14637      0.00000      0.00000      0.29595      0.00000     -0.14637 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.41888      0.00000      0.00000      0.00000      0.00000      0.00000      0.88465      0.00000 \n     0.00589      0.00983      0.00000      0.00000      0.00000      0.00194      0.00000      0.00000      0.00000     -0.02317      0.00000      0.00000      0.00000      0.01844      0.00000      0.00000      0.00000     -0.23608      0.00000      0.00000     -0.23608      0.00000      0.47336     -0.14637      0.00000      0.00000     -0.14637      0.00000      0.29596 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99516      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.88908      0.42315      0.42315      0.42315      0.42315      0.42315      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -275.50540    -32.32619    -28.09879    -28.09879    -28.09879     -3.59810     -2.33516     -2.33516     -2.33516     -0.25345     -0.25345     -0.25345     -0.25345     -0.25345     -0.19285     -0.04448     -0.04448     -0.04448      0.08847      0.16706      0.16706      0.16706      0.93997      1.49919      1.49919      1.49919      1.49919      1.49919     25.66994 \n   </alphaeps>\n   <betaeps>\n  -275.50420    -32.27088    -28.05649    -28.05649    -28.05649     -3.48609     -2.22564     -2.22564     -2.22564     -0.17354     -0.15353     -0.15353     -0.15353     -0.15353     -0.15353     -0.03783     -0.03783     -0.03783      0.09804      0.18394      0.18394      0.18394      0.97855      1.57056      1.57056      1.57056      1.57056      1.57056     25.75592 \n   </betaeps>\n   <alphavectors>\n    -0.99602      0.30473     -0.00000      0.00000     -0.00000      0.11515     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02698     -0.00000      0.00000     -0.00000     -0.01071     -0.00000     -0.00000     -0.00000     -0.05621     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.21538 \n     0.01328      1.03433     -0.00000      0.00000     -0.00000      0.45288     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.11103     -0.00000      0.00000     -0.00000     -0.11849      0.00000     -0.00000      0.00000     -0.14532     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.74938 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.99581     -0.00000      0.00000     -0.00000     -0.37531      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.05919     -0.00000      0.00000     -0.00000     -0.10410      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.99581      0.00000      0.00000      0.37531      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05919     -0.00000     -0.00000     -0.00000     -0.10410     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.99581     -0.00000      0.00000      0.00000      0.00000     -0.37531     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05919     -0.00000     -0.00000      0.00000      0.10410      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.01713      0.03527     -0.00000     -0.00000      0.00000     -1.06953     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.31312      0.00000     -0.00000      0.00000      0.04219      0.00000      0.00000      0.00000      0.88318      0.00000     -0.00000      0.00000      0.00000     -0.00000    -20.17196 \n     0.00000     -0.00000      0.00000     -0.00000     -0.01165      0.00000      0.00000      0.00000      1.06387     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.12474      0.00000     -0.00000      0.00000      0.10629      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.01165      0.00000      0.00000     -1.06387      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.12474     -0.00000     -0.00000     -0.00000      0.10629     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.01165      0.00000     -0.00000     -0.00000     -0.00000      1.06387      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.12474      0.00000      0.00000     -0.00000     -0.10629     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00154      0.00599     -0.00000      0.00000     -0.00000      0.00444     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.59443      0.00000      0.00000     -0.00000     -1.81802      0.00000     -0.00000      0.00000      2.46370      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.04108 \n    -0.00000      0.00000     -0.00000      0.00000      0.00298     -0.00000     -0.00000     -0.00000      0.00440      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.41062     -0.00000      0.00000     -0.00000     -1.38077      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00298     -0.00000     -0.00000     -0.00440     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.41062      0.00000      0.00000      0.00000     -1.38077      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00298     -0.00000      0.00000      0.00000      0.00000      0.00440     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.41062     -0.00000     -0.00000      0.00000      1.38077      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00063      0.00246     -0.00000      0.00000     -0.00000      0.00207     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.43626      0.00000     -0.00000      0.00000     -1.86995      0.00000     -0.00000      0.00000      1.06888      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.06075 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00158      0.00000      0.00000      0.00000     -0.00060      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.67177      0.00000     -0.00000      0.00000      1.26089     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00158      0.00000      0.00000      0.00060      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.67177     -0.00000     -0.00000     -0.00000      1.26089     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00158      0.00000     -0.00000     -0.00000     -0.00000     -0.00060      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.67177      0.00000      0.00000     -0.00000     -1.26089     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00601      0.00526     -0.00000     -0.00000      0.00000      0.00468     -0.00000     -0.00000      0.00000      0.00000      0.00158     -0.00000     -0.00000      0.73468      0.00788     -0.00000     -0.00000     -0.00000      0.04017     -0.00000      0.00000     -0.00000      0.02781     -0.00000      0.04700     -0.00000      0.00000      0.79856     -9.07179 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.27250     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.38553     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.27250      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.38553      0.00000      0.00000     -0.00000 \n    -0.00601      0.00526     -0.00000     -0.00000      0.00000      0.00468     -0.00000     -0.00000      0.00000      0.00000     -0.63704      0.00000      0.00000     -0.36597      0.00788      0.00000     -0.00000     -0.00000      0.04017     -0.00000      0.00000      0.00000      0.02781      0.00000      0.66807      0.00000     -0.00000     -0.43998     -9.07179 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.27250      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.38553     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00601      0.00526     -0.00000      0.00000     -0.00000      0.00468     -0.00000     -0.00000      0.00000      0.00000      0.63546     -0.00000     -0.00000     -0.36870      0.00788     -0.00000      0.00000      0.00000      0.04017      0.00000     -0.00000      0.00000      0.02781     -0.00000     -0.71507     -0.00000      0.00000     -0.35857     -9.07179 \n    -0.00148      0.00483     -0.00000     -0.00000      0.00000      0.00371     -0.00000     -0.00000      0.00000      0.00000      0.00097     -0.00000     -0.00000      0.44980      0.02863     -0.00000     -0.00000     -0.00000     -0.01818      0.00000      0.00000     -0.00000      0.97778      0.00000     -0.05809      0.00000      0.00000     -0.98689     -0.66551 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.77909      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.71230      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.77909     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.71230     -0.00000      0.00000     -0.00000 \n    -0.00148      0.00483     -0.00000      0.00000     -0.00000      0.00371     -0.00000     -0.00000      0.00000      0.00000     -0.39002      0.00000      0.00000     -0.22407      0.02863      0.00000     -0.00000     -0.00000     -0.01818     -0.00000      0.00000      0.00000      0.97778      0.00000     -0.82563      0.00000      0.00000      0.54375     -0.66551 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.77909     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.71230      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00148      0.00483     -0.00000     -0.00000      0.00000      0.00371     -0.00000     -0.00000      0.00000      0.00000      0.38906     -0.00000     -0.00000     -0.22574      0.02863     -0.00000      0.00000      0.00000     -0.01818      0.00000     -0.00000      0.00000      0.97778      0.00000      0.88372      0.00000      0.00000      0.44314     -0.66551 \n   </alphavectors>\n   <betavectors>\n    -0.99602     -0.30482      0.00000     -0.00000     -0.00000      0.11477      0.00000      0.00000     -0.00000      0.02575      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01117     -0.00000     -0.00000     -0.00000     -0.05721      0.00000      0.00000      0.00000      0.00000      0.00000     -0.21530 \n     0.01327     -1.03465      0.00000     -0.00000     -0.00000      0.45194      0.00000      0.00000     -0.00000      0.10384      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.12199     -0.00000     -0.00000     -0.00000     -0.15149      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.74911 \n     0.00000     -0.00000     -0.00000      0.00000      0.99616      0.00000      0.00000     -0.00000      0.37382      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05495      0.00000      0.00000     -0.00000      0.10831     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.99616      0.00000     -0.00000      0.00000      0.37382      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.05495      0.00000      0.00000     -0.00000     -0.10831     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.99616      0.00000     -0.00000      0.00000     -0.37382      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05495     -0.00000      0.00000     -0.00000      0.10831      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01713     -0.03283     -0.00000      0.00000     -0.00000     -1.05825     -0.00000     -0.00000      0.00000     -0.29432     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.04080      0.00000      0.00000      0.00000      0.87620     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000    -20.17315 \n    -0.00000      0.00000     -0.00000      0.00000      0.01069     -0.00000     -0.00000      0.00000     -1.06304     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.12237      0.00000     -0.00000      0.00000     -0.11696      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.01069     -0.00000      0.00000     -0.00000     -1.06304     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.12237     -0.00000     -0.00000      0.00000      0.11696      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.01069      0.00000     -0.00000      0.00000      1.06304     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.12237     -0.00000     -0.00000      0.00000     -0.11696     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00154     -0.00557      0.00000     -0.00000      0.00000      0.00611     -0.00000      0.00000      0.00000      0.54391      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.89027      0.00000     -0.00000     -0.00000      2.42064     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.03954 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00265      0.00000     -0.00000     -0.00000     -0.01148      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.34210      0.00000      0.00000     -0.00000      1.39928      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00265     -0.00000      0.00000     -0.00000     -0.01148      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.34210     -0.00000     -0.00000      0.00000     -1.39928     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00265     -0.00000      0.00000      0.00000      0.01148     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.34210     -0.00000      0.00000     -0.00000      1.39928      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00063     -0.00229     -0.00000      0.00000     -0.00000      0.00281     -0.00000      0.00000      0.00000     -0.51110     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.86541      0.00000     -0.00000     -0.00000      1.04339     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.06006 \n    -0.00000      0.00000     -0.00000      0.00000      0.00140     -0.00000      0.00000     -0.00000      0.00388     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.73305     -0.00000     -0.00000      0.00000     -1.22627     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00140      0.00000     -0.00000      0.00000      0.00388     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.73305      0.00000      0.00000     -0.00000      1.22627      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00140      0.00000     -0.00000     -0.00000     -0.00388     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.73305      0.00000     -0.00000      0.00000     -1.22627     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00601     -0.00469     -0.00000      0.00000     -0.00000      0.00854     -0.00000     -0.00000      0.00000     -0.00351     -0.00359      0.00000      0.00000     -0.00000     -0.72002      0.00000     -0.00000      0.00000     -0.03893      0.00000      0.00000      0.00000      0.02160      0.08744     -0.00000     -0.00000      0.80844     -0.00000     -9.07181 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.24712      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.40842      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.24712      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.40842      0.00000 \n    -0.00601     -0.00469      0.00000     -0.00000      0.00000      0.00854      0.00000     -0.00000     -0.00000     -0.00351      0.62535     -0.00000     -0.00000      0.00000      0.35690     -0.00000      0.00000     -0.00000     -0.03893     -0.00000      0.00000     -0.00000      0.02160     -0.74385      0.00000      0.00000     -0.32849     -0.00000     -9.07181 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.24712     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.40842      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00601     -0.00469      0.00000     -0.00000      0.00000      0.00854      0.00000     -0.00000      0.00000     -0.00351     -0.62176     -0.00000      0.00000      0.00000      0.36311      0.00000      0.00000     -0.00000     -0.03893     -0.00000      0.00000     -0.00000      0.02160      0.65641      0.00000      0.00000     -0.47994     -0.00000     -9.07181 \n    -0.00148     -0.00450     -0.00000      0.00000     -0.00000      0.00644     -0.00000      0.00000     -0.00000     -0.01312     -0.00233      0.00000      0.00000     -0.00000     -0.46768      0.00000     -0.00000      0.00000      0.03482      0.00000      0.00000      0.00000      0.97714     -0.10541     -0.00000     -0.00000     -0.97458     -0.00000     -0.66626 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.81006     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.69787      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.81006     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.69787     -0.00000 \n    -0.00148     -0.00450     -0.00000      0.00000     -0.00000      0.00644     -0.00000      0.00000      0.00000     -0.01312      0.40619     -0.00000     -0.00000      0.00000      0.23182     -0.00000      0.00000     -0.00000      0.03482     -0.00000     -0.00000     -0.00000      0.97714      0.89672     -0.00000     -0.00000      0.39600     -0.00000     -0.66626 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.81006     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.69787      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00148     -0.00450      0.00000     -0.00000      0.00000      0.00644      0.00000      0.00000     -0.00000     -0.01312     -0.40386     -0.00000      0.00000      0.00000      0.23586      0.00000      0.00000     -0.00000      0.03482      0.00000     -0.00000     -0.00000      0.97714     -0.79131     -0.00000     -0.00000      0.57858     -0.00000     -0.66626 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ni\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.19930      0.71621      0.00000      0.00000      0.00000     -0.21992      0.00000      0.00000      0.00000      0.03367      0.00000      0.00000      0.00000     -0.01980      0.00000      0.00000      0.00000      0.00999      0.00000      0.00000      0.00999      0.00000      0.00999      0.00569      0.00000      0.00000      0.00569      0.00000      0.00569 \n     0.71621      2.57205      0.00000      0.00000      0.00000     -0.97779      0.00000      0.00000      0.00000      0.12154      0.00000      0.00000      0.00000     -0.08640      0.00000      0.00000      0.00000      0.00497      0.00000      0.00000      0.00497      0.00000      0.00497      0.00995      0.00000      0.00000      0.00995      0.00000      0.00995 \n     0.00000      0.00000      2.26905      0.00000      0.00000      0.00000     -0.78138      0.00000      0.00000      0.00000     -0.01202      0.00000      0.00000      0.00000      0.00487      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26905      0.00000      0.00000      0.00000     -0.78138      0.00000      0.00000      0.00000     -0.01202      0.00000      0.00000      0.00000      0.00487      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26905      0.00000      0.00000      0.00000     -0.78138      0.00000      0.00000      0.00000     -0.01202      0.00000      0.00000      0.00000      0.00487      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.21992     -0.97779      0.00000      0.00000      0.00000      2.42068      0.00000      0.00000      0.00000     -0.30602      0.00000      0.00000      0.00000      0.25515      0.00000      0.00000      0.00000     -0.01233      0.00000      0.00000     -0.01233      0.00000     -0.01233     -0.00188      0.00000      0.00000     -0.00188      0.00000     -0.00188 \n     0.00000      0.00000     -0.78138      0.00000      0.00000      0.00000      2.26582      0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000     -0.00639      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.78138      0.00000      0.00000      0.00000      2.26582      0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000     -0.00639      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.78138      0.00000      0.00000      0.00000      2.26582      0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000     -0.00639      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03367      0.12154      0.00000      0.00000      0.00000     -0.30602      0.00000      0.00000      0.00000      0.56044      0.00000      0.00000      0.00000     -0.49362      0.00000      0.00000      0.00000     -0.00366      0.00000      0.00000     -0.00366      0.00000     -0.00366     -0.01828      0.00000      0.00000     -0.01828      0.00000     -0.01828 \n     0.00000      0.00000     -0.01202      0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000      0.00020      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01202      0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000      0.00020      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01202      0.00000      0.00000      0.00000      0.01988      0.00000      0.00000      0.00000      0.00020      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01980     -0.08640      0.00000      0.00000      0.00000      0.25515      0.00000      0.00000      0.00000     -0.49362      0.00000      0.00000      0.00000      0.43782      0.00000      0.00000      0.00000      0.00327      0.00000      0.00000      0.00327      0.00000      0.00327      0.01601      0.00000      0.00000      0.01601      0.00000      0.01601 \n     0.00000      0.00000      0.00487      0.00000      0.00000      0.00000     -0.00639      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00487      0.00000      0.00000      0.00000     -0.00639      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00487      0.00000      0.00000      0.00000     -0.00639      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00999      0.00497      0.00000      0.00000      0.00000     -0.01233      0.00000      0.00000      0.00000     -0.00366      0.00000      0.00000      0.00000      0.00327      0.00000      0.00000      0.00000      0.87558      0.00000      0.00000     -0.43756      0.00000     -0.43755      0.54613      0.00000      0.00000     -0.27275      0.00000     -0.27274 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.62629      0.00000      0.00000      0.00000      0.00000      0.00000      1.63775      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.62629      0.00000      0.00000      0.00000      0.00000      0.00000      1.63775      0.00000      0.00000      0.00000 \n     0.00999      0.00497      0.00000      0.00000      0.00000     -0.01233      0.00000      0.00000      0.00000     -0.00366      0.00000      0.00000      0.00000      0.00327      0.00000      0.00000      0.00000     -0.43756      0.00000      0.00000      0.87559      0.00000     -0.43756     -0.27275      0.00000      0.00000      0.54614      0.00000     -0.27275 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.62629      0.00000      0.00000      0.00000      0.00000      0.00000      1.63775      0.00000 \n     0.00999      0.00497      0.00000      0.00000      0.00000     -0.01233      0.00000      0.00000      0.00000     -0.00366      0.00000      0.00000      0.00000      0.00327      0.00000      0.00000      0.00000     -0.43755      0.00000      0.00000     -0.43756      0.00000      0.87559     -0.27274      0.00000      0.00000     -0.27274      0.00000      0.54614 \n     0.00569      0.00995      0.00000      0.00000      0.00000     -0.00188      0.00000      0.00000      0.00000     -0.01828      0.00000      0.00000      0.00000      0.01601      0.00000      0.00000      0.00000      0.54613      0.00000      0.00000     -0.27275      0.00000     -0.27274      0.34125      0.00000      0.00000     -0.16955      0.00000     -0.16954 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.63775      0.00000      0.00000      0.00000      0.00000      0.00000      1.02160      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.63775      0.00000      0.00000      0.00000      0.00000      0.00000      1.02159      0.00000      0.00000      0.00000 \n     0.00569      0.00995      0.00000      0.00000      0.00000     -0.00188      0.00000      0.00000      0.00000     -0.01828      0.00000      0.00000      0.00000      0.01601      0.00000      0.00000      0.00000     -0.27275      0.00000      0.00000      0.54614      0.00000     -0.27274     -0.16955      0.00000      0.00000      0.34126      0.00000     -0.16954 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.63775      0.00000      0.00000      0.00000      0.00000      0.00000      1.02160      0.00000 \n     0.00569      0.00995      0.00000      0.00000      0.00000     -0.00188      0.00000      0.00000      0.00000     -0.01828      0.00000      0.00000      0.00000      0.01601      0.00000      0.00000      0.00000     -0.27274      0.00000      0.00000     -0.27275      0.00000      0.54614     -0.16954      0.00000      0.00000     -0.16954      0.00000      0.34126 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.97337      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.83551      0.63823      0.63823      0.63823      0.63823      0.63822      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -297.73570    -35.22221    -30.78156    -30.78156    -30.78156     -3.84561     -2.49076     -2.49076     -2.49076     -0.23192     -0.23192     -0.23192     -0.23192     -0.23192     -0.19003     -0.03979     -0.03979     -0.03979      0.09934      0.17812      0.17812      0.17812      1.04790      1.68602      1.68602      1.68602      1.68602      1.68602     32.29241 \n   </alphaeps>\n   <betaeps>\n  -297.73480    -35.18499    -30.75315    -30.75315    -30.75315     -3.77413     -2.42079     -2.42079     -2.42079     -0.17650     -0.16770     -0.16770     -0.16770     -0.16770     -0.16770     -0.03447     -0.03447     -0.03447      0.10642      0.18928      0.18928      0.18928      1.07397      1.73254      1.73254      1.73254      1.73254      1.73254     32.34561 \n   </betaeps>\n   <alphavectors>\n    -0.99596     -0.30605     -0.00000     -0.00000      0.00000      0.11597      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.02627      0.00000     -0.00000     -0.00000     -0.01128     -0.00000     -0.00000     -0.00000      0.05726      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.25387 \n     0.01358     -1.03390      0.00000     -0.00000      0.00000      0.45485      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.10706      0.00000     -0.00000     -0.00000     -0.11930     -0.00000     -0.00000     -0.00000      0.15384     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -2.02095 \n     0.00000     -0.00000      0.00000      0.00000      0.99608     -0.00000     -0.00000      0.00000     -0.37744      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.05473      0.00000     -0.00000      0.00000     -0.09998      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.99608      0.00000     -0.00000      0.00000     -0.37744      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.05473     -0.00000     -0.00000      0.00000      0.09998     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.99608      0.00000      0.00000      0.00000      0.37744      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.05473     -0.00000     -0.00000      0.00000      0.09998     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01349     -0.02242     -0.00000      0.00000     -0.00000     -1.06736     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.29754     -0.00000      0.00000      0.00000      0.03082     -0.00000      0.00000      0.00000     -0.88218     -0.00000      0.00000     -0.00000      0.00000     -0.00000    -21.61490 \n    -0.00000      0.00000     -0.00000      0.00000      0.01090      0.00000      0.00000     -0.00000      1.06458     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.12105     -0.00000      0.00000     -0.00000      0.11648     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.01090     -0.00000      0.00000     -0.00000      1.06458     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.12105      0.00000      0.00000     -0.00000     -0.11648      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.01090      0.00000      0.00000     -0.00000     -1.06458     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.12105      0.00000     -0.00000     -0.00000     -0.11648      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00154     -0.00545     -0.00000     -0.00000      0.00000      0.00473      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.57290      0.00000     -0.00000     -0.00000     -1.81443     -0.00000     -0.00000     -0.00000     -2.33293     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.09949 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00258      0.00000      0.00000     -0.00000      0.00732     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.38169     -0.00000     -0.00000      0.00000     -1.38532     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00258     -0.00000      0.00000      0.00000      0.00732     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.38169      0.00000      0.00000     -0.00000      1.38532     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00258     -0.00000     -0.00000     -0.00000     -0.00732     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.38169      0.00000     -0.00000      0.00000      1.38532      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00065     -0.00229     -0.00000      0.00000     -0.00000      0.00224     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.46923     -0.00000      0.00000      0.00000     -1.83970     -0.00000     -0.00000      0.00000     -1.01349     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00438 \n    -0.00000      0.00000     -0.00000      0.00000      0.00135     -0.00000     -0.00000      0.00000     -0.00206      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.69811      0.00000      0.00000     -0.00000      1.24221      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00135      0.00000     -0.00000     -0.00000     -0.00206      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.69811     -0.00000     -0.00000      0.00000     -1.24221      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00135      0.00000      0.00000      0.00000      0.00206      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.69811     -0.00000      0.00000     -0.00000     -1.24221     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00437      0.00016     -0.00000     -0.00000      0.00000      0.00561      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.34036      0.00000     -0.65068     -0.00470      0.00000     -0.00000     -0.00000      0.03044     -0.00000      0.00000     -0.00000     -0.02909     -0.00000     -0.00000      0.37225      0.00000      0.70575     -9.70777 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.27189      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.38201     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.27189     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.38201      0.00000     -0.00000 \n    -0.00437      0.00016     -0.00000      0.00000     -0.00000      0.00561     -0.00000      0.00000      0.00000      0.00000      0.00000      0.73369     -0.00000      0.03058     -0.00470     -0.00000      0.00000      0.00000      0.03044      0.00000     -0.00000      0.00000     -0.02909     -0.00000     -0.00000     -0.79732      0.00000     -0.03049     -9.70777 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.27189     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.38201      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00437      0.00016     -0.00000      0.00000     -0.00000      0.00561      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.39333     -0.00000      0.62010     -0.00470     -0.00000      0.00000      0.00000      0.03044      0.00000     -0.00000      0.00000     -0.02909     -0.00000      0.00000      0.42507      0.00000     -0.67525     -9.70777 \n    -0.00139     -0.00416     -0.00000      0.00000     -0.00000      0.00468     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.20942      0.00000     -0.40035     -0.02178      0.00000     -0.00000     -0.00000     -0.02069     -0.00000      0.00000     -0.00000     -0.94868     -0.00000     -0.00000     -0.45990      0.00000     -0.87191     -0.82399 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.78257     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.70740      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.78257     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.70740      0.00000     -0.00000 \n    -0.00139     -0.00416     -0.00000      0.00000     -0.00000      0.00468     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.45143     -0.00000      0.01882     -0.02178     -0.00000      0.00000      0.00000     -0.02069     -0.00000     -0.00000      0.00000     -0.94868     -0.00000     -0.00000      0.98505      0.00000      0.03767     -0.82399 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.78257      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.70740      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00139     -0.00416     -0.00000     -0.00000      0.00000      0.00468      0.00000      0.00000      0.00000      0.00000      0.00000     -0.24201     -0.00000      0.38154     -0.02178     -0.00000      0.00000      0.00000     -0.02069      0.00000     -0.00000      0.00000     -0.94868     -0.00000     -0.00000     -0.52515      0.00000      0.83424     -0.82399 \n   </alphavectors>\n   <betavectors>\n    -0.99596     -0.30611      0.00000     -0.00000      0.00000      0.11574     -0.00000      0.00000     -0.00000      0.02556      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01160     -0.00000      0.00000     -0.00000     -0.05783     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.25382 \n     0.01357     -1.03415      0.00000     -0.00000      0.00000      0.45432     -0.00000      0.00000     -0.00000      0.10269      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.12145     -0.00000      0.00000     -0.00000     -0.15727     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.02077 \n    -0.00000      0.00000      0.00000      0.00000      0.99629      0.00000     -0.00000     -0.00000      0.37659      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.05209      0.00000     -0.00000     -0.00000      0.10250      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.99629     -0.00000      0.00000      0.00000     -0.37659      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05209      0.00000      0.00000     -0.00000      0.10250      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.99629      0.00000      0.00000      0.00000     -0.37659     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.05209     -0.00000     -0.00000     -0.00000     -0.10250     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01349     -0.02166     -0.00000     -0.00000      0.00000     -1.06049      0.00000     -0.00000      0.00000     -0.28794     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03068      0.00000     -0.00000      0.00000      0.87931      0.00000      0.00000      0.00000      0.00000     -0.00000     21.61549 \n     0.00000     -0.00000      0.00000      0.00000      0.01034     -0.00000     -0.00000      0.00000     -1.06408     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.11902     -0.00000      0.00000      0.00000     -0.12295     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.01034     -0.00000      0.00000      0.00000      1.06408     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.11902      0.00000      0.00000     -0.00000     -0.12295      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.01034      0.00000      0.00000      0.00000      1.06408      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.11902      0.00000     -0.00000     -0.00000      0.12295      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00154     -0.00521     -0.00000     -0.00000      0.00000      0.00581      0.00000     -0.00000     -0.00000      0.53691      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.85558     -0.00000      0.00000     -0.00000      2.30898      0.00000      0.00000      0.00000      0.00000     -0.00000      0.10014 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00240      0.00000      0.00000      0.00000     -0.01141     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.33766     -0.00000      0.00000      0.00000      1.39668     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00240      0.00000     -0.00000     -0.00000      0.01141      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.33766     -0.00000     -0.00000      0.00000      1.39668     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00240     -0.00000     -0.00000     -0.00000      0.01141      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.33766      0.00000      0.00000      0.00000     -1.39668      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00065     -0.00219     -0.00000     -0.00000      0.00000      0.00273      0.00000     -0.00000     -0.00000     -0.51719     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.83475     -0.00000     -0.00000     -0.00000      0.99902      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00408 \n    -0.00000      0.00000      0.00000      0.00000      0.00126     -0.00000     -0.00000      0.00000      0.00397      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.73706      0.00000     -0.00000     -0.00000     -1.21949      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00126     -0.00000      0.00000      0.00000     -0.00397      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.73706      0.00000      0.00000     -0.00000     -1.21949      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00126      0.00000      0.00000      0.00000     -0.00397      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.73706     -0.00000     -0.00000     -0.00000      1.21949     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00437      0.00019      0.00000      0.00000     -0.00000      0.00794     -0.00000     -0.00000     -0.00000     -0.00251     -0.33301     -0.00000      0.00000      0.64488     -0.00000      0.00000     -0.00000     -0.00000     -0.02971     -0.00000     -0.00000      0.00000      0.02604     -0.36931     -0.00000      0.00000     -0.71605     -0.00000      9.70778 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.25710      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.39547     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.25710      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.39547      0.00000 \n    -0.00437      0.00019      0.00000      0.00000     -0.00000      0.00794     -0.00000     -0.00000      0.00000     -0.00251      0.72499      0.00000     -0.00000     -0.03405     -0.00000     -0.00000      0.00000      0.00000     -0.02971      0.00000      0.00000     -0.00000      0.02604      0.80477      0.00000      0.00000      0.03819     -0.00000      9.70778 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.25710     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.39547      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00437      0.00019      0.00000      0.00000     -0.00000      0.00794     -0.00000      0.00000      0.00000     -0.00251     -0.39198     -0.00000      0.00000     -0.61084      0.00000     -0.00000      0.00000      0.00000     -0.02971     -0.00000      0.00000     -0.00000      0.02604     -0.43546      0.00000      0.00000      0.67785     -0.00000      9.70778 \n    -0.00139     -0.00399     -0.00000     -0.00000      0.00000      0.00637      0.00000     -0.00000     -0.00000     -0.01391     -0.21211     -0.00000      0.00000      0.41075     -0.00000      0.00000     -0.00000     -0.00000      0.02995     -0.00000     -0.00000      0.00000      0.94828      0.44963      0.00000      0.00000      0.87178     -0.00000      0.82432 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.80070     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.69898      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.80070     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.69898      0.00000 \n    -0.00139     -0.00399     -0.00000     -0.00000      0.00000      0.00637      0.00000     -0.00000     -0.00000     -0.01391      0.46178      0.00000     -0.00000     -0.02169     -0.00000     -0.00000      0.00000      0.00000      0.02995      0.00000      0.00000     -0.00000      0.94828     -0.97980      0.00000      0.00000     -0.04650     -0.00000      0.82432 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.80070      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.69898      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00139     -0.00399     -0.00000     -0.00000      0.00000      0.00637      0.00000      0.00000      0.00000     -0.01391     -0.24967     -0.00000      0.00000     -0.38907      0.00000     -0.00000      0.00000      0.00000      0.02995     -0.00000      0.00000     -0.00000      0.94828      0.53017      0.00000      0.00000     -0.82528     -0.00000      0.82432 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cu\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.20083      0.71850      0.00000      0.00000      0.00000     -0.23456      0.00000      0.00000      0.00000      0.03132      0.00000      0.00000      0.00000     -0.01957      0.00000      0.00000      0.00000      0.00395      0.00000      0.00000      0.00395      0.00000      0.00395      0.00533      0.00000      0.00000      0.00533      0.00000      0.00533 \n     0.71850      2.57191      0.00000      0.00000      0.00000     -0.99819      0.00000      0.00000      0.00000      0.11187      0.00000      0.00000      0.00000     -0.08472      0.00000      0.00000      0.00000     -0.00368      0.00000      0.00000     -0.00368      0.00000     -0.00368      0.00990      0.00000      0.00000      0.00990      0.00000      0.00990 \n     0.00000      0.00000      2.27310      0.00000      0.00000      0.00000     -0.78767      0.00000      0.00000      0.00000     -0.01260      0.00000      0.00000      0.00000      0.00515      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.27310      0.00000      0.00000      0.00000     -0.78767      0.00000      0.00000      0.00000     -0.01260      0.00000      0.00000      0.00000      0.00515      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.27310      0.00000      0.00000      0.00000     -0.78767      0.00000      0.00000      0.00000     -0.01260      0.00000      0.00000      0.00000      0.00515      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.23456     -0.99819      0.00000      0.00000      0.00000      2.40497      0.00000      0.00000      0.00000     -0.27974      0.00000      0.00000      0.00000      0.24728      0.00000      0.00000      0.00000     -0.01358      0.00000      0.00000     -0.01358      0.00000     -0.01358     -0.00516      0.00000      0.00000     -0.00516      0.00000     -0.00516 \n     0.00000      0.00000     -0.78767      0.00000      0.00000      0.00000      2.26900      0.00000      0.00000      0.00000      0.02281      0.00000      0.00000      0.00000     -0.00791      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.78767      0.00000      0.00000      0.00000      2.26900      0.00000      0.00000      0.00000      0.02281      0.00000      0.00000      0.00000     -0.00791      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.78767      0.00000      0.00000      0.00000      2.26900      0.00000      0.00000      0.00000      0.02281      0.00000      0.00000      0.00000     -0.00791      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03132      0.11187      0.00000      0.00000      0.00000     -0.27974      0.00000      0.00000      0.00000      0.51370      0.00000      0.00000      0.00000     -0.48311      0.00000      0.00000      0.00000     -0.00204      0.00000      0.00000     -0.00204      0.00000     -0.00204     -0.01432      0.00000      0.00000     -0.01432      0.00000     -0.01432 \n     0.00000      0.00000     -0.01260      0.00000      0.00000      0.00000      0.02281      0.00000      0.00000      0.00000      0.00024      0.00000      0.00000      0.00000     -0.00009      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01260      0.00000      0.00000      0.00000      0.02281      0.00000      0.00000      0.00000      0.00024      0.00000      0.00000      0.00000     -0.00009      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01260      0.00000      0.00000      0.00000      0.02281      0.00000      0.00000      0.00000      0.00024      0.00000      0.00000      0.00000     -0.00009      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01957     -0.08472      0.00000      0.00000      0.00000      0.24728      0.00000      0.00000      0.00000     -0.48311      0.00000      0.00000      0.00000      0.45509      0.00000      0.00000      0.00000      0.00196      0.00000      0.00000      0.00196      0.00000      0.00196      0.01358      0.00000      0.00000      0.01358      0.00000      0.01358 \n     0.00000      0.00000      0.00515      0.00000      0.00000      0.00000     -0.00791      0.00000      0.00000      0.00000     -0.00009      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00515      0.00000      0.00000      0.00000     -0.00791      0.00000      0.00000      0.00000     -0.00009      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00515      0.00000      0.00000      0.00000     -0.00791      0.00000      0.00000      0.00000     -0.00009      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00395     -0.00368      0.00000      0.00000      0.00000     -0.01358      0.00000      0.00000      0.00000     -0.00204      0.00000      0.00000      0.00000      0.00196      0.00000      0.00000      0.00000      0.99451      0.00000      0.00000     -0.49702      0.00000     -0.49702      0.61749      0.00000      0.00000     -0.30857      0.00000     -0.30857 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.98306      0.00000      0.00000      0.00000      0.00000      0.00000      1.85211      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.98306      0.00000      0.00000      0.00000      0.00000      0.00000      1.85211      0.00000      0.00000      0.00000 \n     0.00395     -0.00368      0.00000      0.00000      0.00000     -0.01358      0.00000      0.00000      0.00000     -0.00204      0.00000      0.00000      0.00000      0.00196      0.00000      0.00000      0.00000     -0.49702      0.00000      0.00000      0.99451      0.00000     -0.49701     -0.30857      0.00000      0.00000      0.61749      0.00000     -0.30857 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.98306      0.00000      0.00000      0.00000      0.00000      0.00000      1.85211      0.00000 \n     0.00395     -0.00368      0.00000      0.00000      0.00000     -0.01358      0.00000      0.00000      0.00000     -0.00204      0.00000      0.00000      0.00000      0.00196      0.00000      0.00000      0.00000     -0.49702      0.00000      0.00000     -0.49701      0.00000      0.99451     -0.30857      0.00000      0.00000     -0.30857      0.00000      0.61749 \n     0.00533      0.00990      0.00000      0.00000      0.00000     -0.00516      0.00000      0.00000      0.00000     -0.01432      0.00000      0.00000      0.00000      0.01358      0.00000      0.00000      0.00000      0.61749      0.00000      0.00000     -0.30857      0.00000     -0.30857      0.38383      0.00000      0.00000     -0.19116      0.00000     -0.19116 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.85211      0.00000      0.00000      0.00000      0.00000      0.00000      1.14998      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.85211      0.00000      0.00000      0.00000      0.00000      0.00000      1.14998      0.00000      0.00000      0.00000 \n     0.00533      0.00990      0.00000      0.00000      0.00000     -0.00516      0.00000      0.00000      0.00000     -0.01432      0.00000      0.00000      0.00000      0.01358      0.00000      0.00000      0.00000     -0.30857      0.00000      0.00000      0.61749      0.00000     -0.30857     -0.19116      0.00000      0.00000      0.38384      0.00000     -0.19116 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.85211      0.00000      0.00000      0.00000      0.00000      0.00000      1.14998      0.00000 \n     0.00533      0.00990      0.00000      0.00000      0.00000     -0.00516      0.00000      0.00000      0.00000     -0.01432      0.00000      0.00000      0.00000      0.01358      0.00000      0.00000      0.00000     -0.30857      0.00000      0.00000     -0.30857      0.00000      0.61749     -0.19116      0.00000      0.00000     -0.19116      0.00000      0.38384 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99828      0.99828      0.99828      0.99828      0.99828      0.91823      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.85232      0.85232      0.85232      0.85232      0.85232      0.82881      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -320.82970    -38.23489    -33.57954    -33.57954    -33.57954     -4.10056     -2.65106     -2.65106     -2.65106     -0.20854     -0.20854     -0.20854     -0.20854     -0.20854     -0.18688     -0.03468     -0.03468     -0.03468      0.11063      0.19309      0.19309      0.19309      1.15632      1.87472      1.87472      1.87472      1.87472      1.87472     39.18339 \n   </alphaeps>\n   <betaeps>\n  -320.82930    -38.21889    -33.56735    -33.56735    -33.56735     -4.07123     -2.62230     -2.62230     -2.62230     -0.18198     -0.18198     -0.18198     -0.18198     -0.18198     -0.18061     -0.03190     -0.03190     -0.03190      0.11404      0.19813      0.19813      0.19813      1.16771      1.89426      1.89426      1.89426      1.89426      1.89426     39.20458 \n   </betaeps>\n   <alphavectors>\n    -0.99590      0.30726     -0.00000      0.00000     -0.00000     -0.11672      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.02560     -0.00000     -0.00000     -0.00000      0.01181      0.00000     -0.00000     -0.00000      0.05798     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.28785 \n     0.01393      1.03350     -0.00000      0.00000     -0.00000     -0.45655      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.10325     -0.00000     -0.00000     -0.00000      0.11995      0.00000     -0.00000     -0.00000      0.15990     -0.00000      0.00000      0.00000     -0.00000      0.00000     -2.25947 \n    -0.00000      0.00000     -0.00000     -0.99632      0.00000     -0.00000      0.00000      0.37939     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05091     -0.00000      0.00000     -0.00000     -0.09823      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.99632      0.00000     -0.00000      0.00000      0.37939     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05091      0.00000     -0.00000     -0.00000     -0.09823      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.99632     -0.00000      0.00000      0.00000      0.37939     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.05091      0.00000     -0.00000     -0.00000     -0.09823      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00962      0.01169     -0.00000      0.00000     -0.00000      1.06530     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.28494      0.00000      0.00000      0.00000     -0.02179     -0.00000      0.00000      0.00000     -0.88315      0.00000     -0.00000     -0.00000      0.00000     -0.00000    -22.70043 \n    -0.00000      0.00000     -0.00000     -0.01022     -0.00000      0.00000     -0.00000     -1.06518      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.11789      0.00000     -0.00000      0.00000      0.13037     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.01022     -0.00000      0.00000     -0.00000     -1.06518      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.11789     -0.00000      0.00000      0.00000      0.13037     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.01022      0.00000     -0.00000     -0.00000     -1.06518      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.11789     -0.00000      0.00000      0.00000      0.13037     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00149      0.00488     -0.00000      0.00000     -0.00000     -0.00513      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.54987     -0.00000     -0.00000     -0.00000      1.81156      0.00000     -0.00000     -0.00000     -2.22793      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.21696 \n    -0.00000     -0.00000      0.00000      0.00227      0.00000     -0.00000      0.00000     -0.00997      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.34918      0.00000     -0.00000      0.00000     -1.38715     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00227      0.00000     -0.00000      0.00000     -0.00997     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.34918      0.00000     -0.00000     -0.00000     -1.38715      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00227     -0.00000      0.00000     -0.00000     -0.00997     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.34918      0.00000     -0.00000      0.00000     -1.38715      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00064      0.00208     -0.00000      0.00000     -0.00000     -0.00246      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.50079      0.00000      0.00000      0.00000      1.81041     -0.00000      0.00000      0.00000     -0.96635      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.04396 \n     0.00000      0.00000     -0.00000     -0.00118     -0.00000      0.00000     -0.00000      0.00337     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.72775     -0.00000      0.00000     -0.00000      1.21659      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00118     -0.00000      0.00000     -0.00000      0.00337      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.72775     -0.00000      0.00000      0.00000      1.21659     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00118      0.00000     -0.00000      0.00000      0.00337      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.72775     -0.00000      0.00000      0.00000      1.21659     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00264     -0.00463      0.00000     -0.00000      0.00000     -0.00642      0.00000      0.00000     -0.00000      0.53193      0.00000     -0.00000      0.00000      0.50648      0.00253      0.00000      0.00000     -0.00000     -0.02234      0.00000      0.00000     -0.00000     -0.03192     -0.57674     -0.00000     -0.00000      0.00000     -0.54754    -10.19131 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.27217      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.37742      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.27217      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.37742     -0.00000      0.00000 \n    -0.00264     -0.00463      0.00000     -0.00000      0.00000     -0.00642      0.00000     -0.00000      0.00000     -0.70459     -0.00000      0.00000     -0.00000      0.20742      0.00253     -0.00000     -0.00000      0.00000     -0.02234     -0.00000     -0.00000      0.00000     -0.03192      0.76255     -0.00000     -0.00000      0.00000     -0.22570    -10.19131 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.27217      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.37742      0.00000     -0.00000     -0.00000 \n    -0.00264     -0.00463      0.00000     -0.00000      0.00000     -0.00642      0.00000     -0.00000      0.00000      0.17266      0.00000     -0.00000      0.00000     -0.71391      0.00253      0.00000      0.00000      0.00000     -0.02234      0.00000     -0.00000     -0.00000     -0.03192     -0.18581     -0.00000     -0.00000      0.00000      0.77324    -10.19131 \n    -0.00124      0.00349     -0.00000      0.00000     -0.00000     -0.00568      0.00000     -0.00000      0.00000      0.32829      0.00000     -0.00000      0.00000      0.31259      0.01640      0.00000      0.00000     -0.00000      0.02398      0.00000      0.00000     -0.00000     -0.92634      0.71295     -0.00000     -0.00000      0.00000      0.67685     -0.95198 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.78515     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.70271      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.78515     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.70271     -0.00000      0.00000 \n    -0.00124      0.00349     -0.00000      0.00000     -0.00000     -0.00568      0.00000      0.00000     -0.00000     -0.43486     -0.00000      0.00000     -0.00000      0.12802      0.01640     -0.00000     -0.00000      0.00000      0.02398     -0.00000     -0.00000      0.00000     -0.92634     -0.94264     -0.00000     -0.00000      0.00000      0.27901     -0.95198 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.78515     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.70271      0.00000     -0.00000     -0.00000 \n    -0.00124      0.00349     -0.00000      0.00000     -0.00000     -0.00568      0.00000      0.00000     -0.00000      0.10656      0.00000     -0.00000      0.00000     -0.44061      0.01640      0.00000      0.00000      0.00000      0.02398      0.00000     -0.00000     -0.00000     -0.92634      0.22969     -0.00000     -0.00000      0.00000     -0.95585     -0.95198 \n   </alphavectors>\n   <betavectors>\n    -0.99590     -0.30729     -0.00000     -0.00000      0.00000      0.11663     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02534     -0.00000      0.00000      0.00000      0.01195     -0.00000      0.00000      0.00000      0.05818      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.28783 \n     0.01393     -1.03362     -0.00000     -0.00000      0.00000      0.45635     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.10153     -0.00000      0.00000      0.00000      0.12083     -0.00000      0.00000      0.00000      0.16112      0.00000     -0.00000      0.00000      0.00000     -0.00000     -2.25940 \n     0.00000     -0.00000     -0.00000      0.99640      0.00000     -0.00000     -0.00000      0.37908      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.04979     -0.00000      0.00000      0.00000      0.09922     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.99640      0.00000      0.00000      0.00000     -0.37908      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.04979     -0.00000      0.00000      0.00000     -0.09922     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.99640      0.00000      0.00000     -0.00000      0.37908     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04979      0.00000     -0.00000     -0.00000      0.09922     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00962     -0.01165     -0.00000     -0.00000     -0.00000     -1.06267      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.28182      0.00000     -0.00000     -0.00000     -0.02200      0.00000     -0.00000     -0.00000     -0.88242     -0.00000      0.00000     -0.00000     -0.00000      0.00000    -22.70062 \n    -0.00000      0.00000      0.00000      0.01001     -0.00000      0.00000      0.00000     -1.06498     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.11674      0.00000     -0.00000     -0.00000     -0.13295      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.01001     -0.00000     -0.00000     -0.00000      1.06498     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.11674      0.00000     -0.00000     -0.00000      0.13295      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.01001      0.00000      0.00000     -0.00000     -1.06498      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.11674     -0.00000      0.00000      0.00000     -0.13295      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00149     -0.00479     -0.00000     -0.00000     -0.00000      0.00557     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.53357     -0.00000      0.00000      0.00000      1.82690     -0.00000      0.00000      0.00000     -2.21934     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.21713 \n     0.00000     -0.00000     -0.00000     -0.00221      0.00000     -0.00000     -0.00000     -0.01149      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.33046     -0.00000      0.00000      0.00000      1.39172     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00221      0.00000      0.00000      0.00000      0.01149      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.33046     -0.00000      0.00000      0.00000     -1.39172     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00221     -0.00000     -0.00000      0.00000     -0.01149     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.33046     -0.00000      0.00000      0.00000      1.39172      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00064     -0.00204     -0.00000     -0.00000     -0.00000      0.00266     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.52078      0.00000     -0.00000     -0.00000      1.80762      0.00000     -0.00000     -0.00000     -0.96100     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.04404 \n     0.00000      0.00000      0.00000      0.00115     -0.00000      0.00000      0.00000      0.00408     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.74407      0.00000     -0.00000     -0.00000     -1.20668      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00115     -0.00000     -0.00000     -0.00000     -0.00408     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.74407      0.00000     -0.00000     -0.00000      1.20668     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00115      0.00000      0.00000     -0.00000      0.00408     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.74407      0.00000     -0.00000     -0.00000     -1.20668     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00264      0.00454      0.00000      0.00000      0.00000      0.00731     -0.00000      0.00000      0.00000      0.52980     -0.00000     -0.00000      0.00000     -0.50409     -0.00181      0.00000     -0.00000     -0.00000     -0.02205      0.00000     -0.00000      0.00000     -0.03095      0.57935     -0.00000     -0.00000      0.00000      0.54905    -10.19132 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.26664     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.38251     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.26664      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.38251      0.00000     -0.00000 \n    -0.00264      0.00454      0.00000      0.00000     -0.00000      0.00731     -0.00000      0.00000     -0.00000     -0.70145      0.00000      0.00000     -0.00000     -0.20678     -0.00181      0.00000     -0.00000     -0.00000     -0.02205     -0.00000     -0.00000      0.00000     -0.03095     -0.76517     -0.00000      0.00000      0.00000      0.22721    -10.19132 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.26664      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.38251     -0.00000     -0.00000     -0.00000 \n    -0.00264      0.00454      0.00000      0.00000     -0.00000      0.00731     -0.00000      0.00000     -0.00000      0.17165     -0.00000     -0.00000      0.00000      0.71086     -0.00181     -0.00000      0.00000      0.00000     -0.02205     -0.00000      0.00000     -0.00000     -0.03095      0.18582     -0.00000      0.00000      0.00000     -0.77626    -10.19132 \n    -0.00124     -0.00344     -0.00000     -0.00000     -0.00000      0.00635     -0.00000      0.00000     -0.00000      0.33126     -0.00000     -0.00000      0.00000     -0.31518     -0.01389      0.00000     -0.00000     -0.00000      0.02733      0.00000     -0.00000      0.00000     -0.92619     -0.71221      0.00000     -0.00000     -0.00000     -0.67496     -0.95207 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.79197      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.69955      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.79197     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.69955      0.00000     -0.00000 \n    -0.00124     -0.00344     -0.00000     -0.00000      0.00000      0.00635     -0.00000      0.00000      0.00000     -0.43859      0.00000      0.00000     -0.00000     -0.12929     -0.01389      0.00000     -0.00000     -0.00000      0.02733     -0.00000     -0.00000      0.00000     -0.92619      0.94064      0.00000     -0.00000     -0.00000     -0.27931     -0.95207 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.79197     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.69955     -0.00000     -0.00000     -0.00000 \n    -0.00124     -0.00344     -0.00000     -0.00000     -0.00000      0.00635     -0.00000      0.00000      0.00000      0.10733     -0.00000     -0.00000      0.00000      0.44447     -0.01389     -0.00000      0.00000      0.00000      0.02733     -0.00000      0.00000     -0.00000     -0.92619     -0.22843      0.00000      0.00000     -0.00000      0.95428     -0.95207 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Zn\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.20244      0.72148      0.00000      0.00000      0.00000     -0.25570      0.00000      0.00000      0.00000      0.03637      0.00000      0.00000      0.00000     -0.02096      0.00000      0.00000      0.00000     -0.00347      0.00000      0.00000     -0.00347      0.00000     -0.00347      0.00369      0.00000      0.00000      0.00369      0.00000      0.00369 \n     0.72148      2.57692      0.00000      0.00000      0.00000     -1.03882      0.00000      0.00000      0.00000      0.13514      0.00000      0.00000      0.00000     -0.09145      0.00000      0.00000      0.00000     -0.01445      0.00000      0.00000     -0.01445      0.00000     -0.01445      0.00521      0.00000      0.00000      0.00521      0.00000      0.00521 \n     0.00000      0.00000      2.27722      0.00000      0.00000      0.00000     -0.79454      0.00000      0.00000      0.00000     -0.00921      0.00000      0.00000      0.00000      0.00360      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.27722      0.00000      0.00000      0.00000     -0.79454      0.00000      0.00000      0.00000     -0.00921      0.00000      0.00000      0.00000      0.00360      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.27722      0.00000      0.00000      0.00000     -0.79454      0.00000      0.00000      0.00000     -0.00921      0.00000      0.00000      0.00000      0.00360      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.25570     -1.03882      0.00000      0.00000      0.00000      2.44555      0.00000      0.00000      0.00000     -0.33904      0.00000      0.00000      0.00000      0.25698      0.00000      0.00000      0.00000     -0.01081      0.00000      0.00000     -0.01081      0.00000     -0.01081      0.00262      0.00000      0.00000      0.00262      0.00000      0.00262 \n     0.00000      0.00000     -0.79454      0.00000      0.00000      0.00000      2.27477      0.00000      0.00000      0.00000      0.01457      0.00000      0.00000      0.00000     -0.00425      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.79454      0.00000      0.00000      0.00000      2.27477      0.00000      0.00000      0.00000      0.01457      0.00000      0.00000      0.00000     -0.00425      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.79454      0.00000      0.00000      0.00000      2.27477      0.00000      0.00000      0.00000      0.01457      0.00000      0.00000      0.00000     -0.00425      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03637      0.13514      0.00000      0.00000      0.00000     -0.33904      0.00000      0.00000      0.00000      0.67997      0.00000      0.00000      0.00000     -0.53721      0.00000      0.00000      0.00000     -0.00339      0.00000      0.00000     -0.00339      0.00000     -0.00339     -0.02435      0.00000      0.00000     -0.02435      0.00000     -0.02435 \n     0.00000      0.00000     -0.00921      0.00000      0.00000      0.00000      0.01457      0.00000      0.00000      0.00000      0.00010      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00921      0.00000      0.00000      0.00000      0.01457      0.00000      0.00000      0.00000      0.00010      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00921      0.00000      0.00000      0.00000      0.01457      0.00000      0.00000      0.00000      0.00010      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02096     -0.09145      0.00000      0.00000      0.00000      0.25698      0.00000      0.00000      0.00000     -0.53721      0.00000      0.00000      0.00000      0.42454      0.00000      0.00000      0.00000      0.00264      0.00000      0.00000      0.00264      0.00000      0.00264      0.01931      0.00000      0.00000      0.01931      0.00000      0.01931 \n     0.00000      0.00000      0.00360      0.00000      0.00000      0.00000     -0.00425      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00360      0.00000      0.00000      0.00000     -0.00425      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00360      0.00000      0.00000      0.00000     -0.00425      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00347     -0.01445      0.00000      0.00000      0.00000     -0.01081      0.00000      0.00000      0.00000     -0.00339      0.00000      0.00000      0.00000      0.00264      0.00000      0.00000      0.00000      1.10754      0.00000      0.00000     -0.55338      0.00000     -0.55338      0.65836      0.00000      0.00000     -0.32899      0.00000     -0.32900 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.32186      0.00000      0.00000      0.00000      0.00000      0.00000      1.97470      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.32186      0.00000      0.00000      0.00000      0.00000      0.00000      1.97470      0.00000      0.00000      0.00000 \n    -0.00347     -0.01445      0.00000      0.00000      0.00000     -0.01081      0.00000      0.00000      0.00000     -0.00339      0.00000      0.00000      0.00000      0.00264      0.00000      0.00000      0.00000     -0.55338      0.00000      0.00000      1.10754      0.00000     -0.55339     -0.32899      0.00000      0.00000      0.65836      0.00000     -0.32900 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.32186      0.00000      0.00000      0.00000      0.00000      0.00000      1.97470      0.00000 \n    -0.00347     -0.01445      0.00000      0.00000      0.00000     -0.01081      0.00000      0.00000      0.00000     -0.00339      0.00000      0.00000      0.00000      0.00264      0.00000      0.00000      0.00000     -0.55338      0.00000      0.00000     -0.55339      0.00000      1.10754     -0.32900      0.00000      0.00000     -0.32900      0.00000      0.65836 \n     0.00369      0.00521      0.00000      0.00000      0.00000      0.00262      0.00000      0.00000      0.00000     -0.02435      0.00000      0.00000      0.00000      0.01931      0.00000      0.00000      0.00000      0.65836      0.00000      0.00000     -0.32899      0.00000     -0.32900      0.39223      0.00000      0.00000     -0.19471      0.00000     -0.19472 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.97470      0.00000      0.00000      0.00000      0.00000      0.00000      1.17388      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.97470      0.00000      0.00000      0.00000      0.00000      0.00000      1.17388      0.00000      0.00000      0.00000 \n     0.00369      0.00521      0.00000      0.00000      0.00000      0.00262      0.00000      0.00000      0.00000     -0.02435      0.00000      0.00000      0.00000      0.01931      0.00000      0.00000      0.00000     -0.32899      0.00000      0.00000      0.65836      0.00000     -0.32900     -0.19471      0.00000      0.00000      0.39222      0.00000     -0.19472 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.97470      0.00000      0.00000      0.00000      0.00000      0.00000      1.17388      0.00000 \n     0.00369      0.00521      0.00000      0.00000      0.00000      0.00262      0.00000      0.00000      0.00000     -0.02435      0.00000      0.00000      0.00000      0.01931      0.00000      0.00000      0.00000     -0.32900      0.00000      0.00000     -0.32900      0.00000      0.65836     -0.19472      0.00000      0.00000     -0.19472      0.00000      0.39223 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -344.90200    -41.48671    -36.61389    -36.61389    -36.61389     -4.47247     -2.92330     -2.92330     -2.92330     -0.28023     -0.28023     -0.28023     -0.28023     -0.28023     -0.20467     -0.03792     -0.03792     -0.03792      0.11148      0.19189      0.19189      0.19189      1.23345      2.01744      2.01744      2.01744      2.01744      2.01744     47.11018 \n   </alphaeps>\n   <betaeps>\n  -344.90200    -41.48671    -36.61389    -36.61389    -36.61389     -4.47247     -2.92330     -2.92330     -2.92330     -0.28023     -0.28023     -0.28023     -0.28023     -0.28023     -0.20467     -0.03792     -0.03792     -0.03792      0.11148      0.19189      0.19189      0.19189      1.23345      2.01744      2.01744      2.01744      2.01744      2.01744     47.11018 \n   </betaeps>\n   <alphavectors>\n     0.99582     -0.30836     -0.00000     -0.00000      0.00000      0.11751     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02580     -0.00000     -0.00000     -0.00000      0.01184      0.00000     -0.00000     -0.00000     -0.05814      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.32417 \n    -0.01443     -1.03290     -0.00000     -0.00000      0.00000      0.45856     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.10532     -0.00000     -0.00000     -0.00000      0.11734      0.00000     -0.00000     -0.00000     -0.16311     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.50722 \n    -0.00000     -0.00000     -0.99654     -0.00000      0.00000     -0.00000     -0.00000     -0.38147     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05086      0.00000     -0.00000     -0.00000      0.09210     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.99654     -0.00000      0.00000      0.00000     -0.00000      0.38147     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.05086     -0.00000     -0.00000      0.00000     -0.09210      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.99654      0.00000     -0.38147     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.05086     -0.00000      0.00000      0.00000      0.09210      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00489     -0.00062     -0.00000     -0.00000      0.00000     -1.06883     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.28347     -0.00000      0.00000      0.00000     -0.01311     -0.00000      0.00000      0.00000      0.89001      0.00000      0.00000      0.00000     -0.00000      0.00000     23.84392 \n     0.00000      0.00000     -0.00958      0.00000     -0.00000      0.00000      0.00000      1.06644      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.11562     -0.00000      0.00000      0.00000     -0.12355      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00958      0.00000     -0.00000     -0.00000      0.00000     -1.06644      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.11562      0.00000      0.00000     -0.00000      0.12355     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00958      0.00000      1.06644      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.11562      0.00000     -0.00000     -0.00000     -0.12355     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00138     -0.00422     -0.00000     -0.00000      0.00000      0.00398      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.58305      0.00000     -0.00000     -0.00000      1.74964      0.00000     -0.00000     -0.00000      2.13933      0.00000      0.00000     -0.00000      0.00000      0.00000      0.33467 \n    -0.00000     -0.00000      0.00200     -0.00000      0.00000     -0.00000     -0.00000      0.00685     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.38457      0.00000     -0.00000     -0.00000      1.37025     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00200     -0.00000      0.00000      0.00000     -0.00000     -0.00685     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.38457     -0.00000     -0.00000      0.00000     -1.37025      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00200     -0.00000      0.00685     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.38457     -0.00000      0.00000      0.00000      1.37025      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00061     -0.00184     -0.00000     -0.00000      0.00000      0.00198      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.46072     -0.00000      0.00000      0.00000      1.79045     -0.00000      0.00000      0.00000      0.93702      0.00000      0.00000     -0.00000      0.00000      0.00000      0.09452 \n     0.00000      0.00000     -0.00104      0.00000     -0.00000      0.00000      0.00000     -0.00200      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.69684     -0.00000      0.00000      0.00000     -1.22698      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00104      0.00000     -0.00000     -0.00000      0.00000      0.00200      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.69684      0.00000      0.00000     -0.00000      1.22698      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00104      0.00000     -0.00200     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.69684      0.00000     -0.00000      0.00000     -1.22698      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00052      0.00928      0.00000      0.00000     -0.00000      0.00582      0.00000     -0.00000      0.00000     -0.00000      0.67119      0.00000     -0.00000      0.32116      0.00288     -0.00000      0.00000     -0.00000     -0.01554      0.00000      0.00000      0.00000      0.03783      0.00000      0.00000      0.70037     -0.35431      0.00000     10.69234 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.28877     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.35946     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.28877      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.35946     -0.00000 \n     0.00052      0.00928      0.00000      0.00000     -0.00000      0.00582      0.00000     -0.00000      0.00000     -0.00000     -0.61373     -0.00000      0.00000      0.42069      0.00288     -0.00000      0.00000     -0.00000     -0.01554      0.00000      0.00000      0.00000      0.03783      0.00000      0.00000     -0.65702     -0.42938      0.00000     10.69234 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.28877     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.35946      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00052      0.00928      0.00000      0.00000     -0.00000      0.00582      0.00000     -0.00000      0.00000     -0.00000     -0.05746     -0.00000      0.00000     -0.74185      0.00288      0.00000     -0.00000      0.00000     -0.01554     -0.00000     -0.00000     -0.00000      0.03783     -0.00000     -0.00000     -0.04334      0.78369      0.00000     10.69234 \n     0.00103     -0.00275     -0.00000     -0.00000      0.00000      0.00433      0.00000     -0.00000     -0.00000     -0.00000      0.39900      0.00000     -0.00000      0.19092      0.02093     -0.00000      0.00000     -0.00000      0.01321      0.00000      0.00000      0.00000      0.90000      0.00000      0.00000     -0.88066      0.44552      0.00000      1.09981 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.76612      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.70942     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.76612     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.70942     -0.00000 \n     0.00103     -0.00275     -0.00000     -0.00000      0.00000      0.00433      0.00000     -0.00000     -0.00000     -0.00000     -0.36484     -0.00000      0.00000      0.25008      0.02093     -0.00000      0.00000     -0.00000      0.01321      0.00000      0.00000      0.00000      0.90000      0.00000      0.00000      0.82616      0.53991      0.00000      1.09981 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.76612      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.70942     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00103     -0.00275     -0.00000     -0.00000      0.00000      0.00433      0.00000     -0.00000     -0.00000     -0.00000     -0.03416     -0.00000      0.00000     -0.44100      0.02093      0.00000     -0.00000      0.00000      0.01321     -0.00000     -0.00000     -0.00000      0.90000      0.00000     -0.00000      0.05450     -0.98543      0.00000      1.09981 \n   </alphavectors>\n   <betavectors>\n    -0.99582     -0.30836     -0.00000      0.00000      0.00000     -0.11751      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.02580     -0.00000      0.00000     -0.00000      0.01184      0.00000     -0.00000      0.00000     -0.05814      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.32417 \n     0.01443     -1.03290     -0.00000      0.00000      0.00000     -0.45856      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.10532     -0.00000      0.00000      0.00000      0.11734      0.00000     -0.00000      0.00000     -0.16311      0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.50722 \n    -0.00000      0.00000      0.00000     -0.00000      0.99654     -0.00000      0.00000      0.38147      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.05086     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.09210     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.99654     -0.00000     -0.00000      0.00000     -0.00000     -0.38147      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05086     -0.00000     -0.00000     -0.09210     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.99654      0.00000     -0.00000      0.00000      0.38147      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05086     -0.00000     -0.00000      0.09210     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00489     -0.00062     -0.00000     -0.00000      0.00000      1.06883     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.28347      0.00000      0.00000      0.00000     -0.01311     -0.00000      0.00000     -0.00000      0.89001     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     23.84392 \n     0.00000     -0.00000     -0.00000      0.00000      0.00958      0.00000     -0.00000     -1.06644     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.11562      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.12355      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00958      0.00000      0.00000     -0.00000      0.00000      1.06644     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.11562      0.00000      0.00000      0.12355      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00958      0.00000      0.00000     -0.00000     -1.06644      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.11562      0.00000      0.00000     -0.12355      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00138     -0.00422     -0.00000      0.00000      0.00000     -0.00398      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.58305     -0.00000      0.00000     -0.00000      1.74964      0.00000     -0.00000      0.00000      2.13933     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.33467 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00200     -0.00000      0.00000     -0.00685      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.38457     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.37025     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00200     -0.00000     -0.00000      0.00000     -0.00000      0.00685      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.38457     -0.00000     -0.00000     -1.37025      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00200      0.00000     -0.00000      0.00000     -0.00685      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.38457     -0.00000     -0.00000      1.37025     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00061     -0.00184     -0.00000      0.00000      0.00000     -0.00198      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.46072      0.00000     -0.00000      0.00000      1.79045      0.00000     -0.00000      0.00000      0.93702     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.09452 \n     0.00000     -0.00000     -0.00000      0.00000      0.00104      0.00000     -0.00000      0.00200     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.69684      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.22698      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00104      0.00000      0.00000     -0.00000      0.00000     -0.00200      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.69684      0.00000      0.00000      1.22698     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00104     -0.00000      0.00000     -0.00000      0.00200     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.69684      0.00000      0.00000     -1.22698     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00052      0.00928      0.00000     -0.00000     -0.00000     -0.00582      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.65566      0.35178     -0.00288     -0.00000      0.00000      0.00000     -0.01554      0.00000     -0.00000     -0.00000      0.03783     -0.00000     -0.00000     -0.74606     -0.24382      0.00000     10.69234 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.28877      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.35946      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.28877      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.35946      0.00000 \n    -0.00052      0.00928      0.00000     -0.00000     -0.00000     -0.00582      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.63248      0.39193     -0.00288     -0.00000      0.00000      0.00000     -0.01554      0.00000     -0.00000     -0.00000      0.03783     -0.00000     -0.00000      0.58418     -0.52420      0.00000     10.69234 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.28877      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.35946      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00052      0.00928      0.00000     -0.00000     -0.00000     -0.00582      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02318     -0.74371     -0.00288      0.00000     -0.00000     -0.00000     -0.01554     -0.00000      0.00000      0.00000      0.03783     -0.00000     -0.00000      0.16188      0.76801      0.00000     10.69234 \n    -0.00103     -0.00275     -0.00000      0.00000      0.00000     -0.00433      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.38976      0.20912     -0.02093     -0.00000      0.00000      0.00000      0.01321      0.00000     -0.00000     -0.00000      0.90000     -0.00000     -0.00000      0.93811      0.30658      0.00000      1.09981 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.76612     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.70942     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.76612     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.70942     -0.00000 \n    -0.00103     -0.00275     -0.00000      0.00000      0.00000     -0.00433      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.37598      0.23299     -0.02093     -0.00000      0.00000      0.00000      0.01321      0.00000     -0.00000     -0.00000      0.90000     -0.00000     -0.00000     -0.73456      0.65914      0.00000      1.09981 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.76612     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.70942      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00103     -0.00275     -0.00000      0.00000      0.00000     -0.00433      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.01378     -0.44211     -0.02093      0.00000     -0.00000     -0.00000      0.01321     -0.00000      0.00000      0.00000      0.90000     -0.00000     -0.00000     -0.20355     -0.96572      0.00000      1.09981 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Al\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.13413     -0.55336      0.00000      0.00000      0.00000      0.06347      0.00000      0.00000      0.00000      0.05795      0.00000      0.00000      0.00000 \n    -0.55336      2.28443      0.00000      0.00000      0.00000     -0.35610      0.00000      0.00000      0.00000     -0.25276      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.97963      0.00000      0.00000      0.00000      0.03019      0.00000      0.00000      0.00000     -0.05821      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.97963      0.00000      0.00000      0.00000      0.03019      0.00000      0.00000      0.00000     -0.05821      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.97963      0.00000      0.00000      0.00000      0.03019      0.00000      0.00000      0.00000     -0.05821 \n     0.06347     -0.35610      0.00000      0.00000      0.00000      0.98797      0.00000      0.00000      0.00000      0.52550      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03019      0.00000      0.00000      0.00000      0.11245      0.00000      0.00000      0.00000      0.10274      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03019      0.00000      0.00000      0.00000      0.11245      0.00000      0.00000      0.00000      0.10274      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03019      0.00000      0.00000      0.00000      0.11245      0.00000      0.00000      0.00000      0.10274 \n     0.05795     -0.25276      0.00000      0.00000      0.00000      0.52550      0.00000      0.00000      0.00000      0.28144      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.05821      0.00000      0.00000      0.00000      0.10274      0.00000      0.00000      0.00000      0.09765      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05821      0.00000      0.00000      0.00000      0.10274      0.00000      0.00000      0.00000      0.09765      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05821      0.00000      0.00000      0.00000      0.10274      0.00000      0.00000      0.00000      0.09765 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.29986      0.29986      0.29986      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.03347      0.03347      0.03347      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -55.13397     -3.92572     -2.55655     -2.55655     -2.55655     -0.29322     -0.10795     -0.10795     -0.10795      0.09206      0.15444      0.15444      0.15444 \n   </alphaeps>\n   <betaeps>\n   -55.13251     -3.92377     -2.55413     -2.55413     -2.55413     -0.27346     -0.08946     -0.08946     -0.08946      0.10538      0.16749      0.16749      0.16749 \n   </betaeps>\n   <alphavectors>\n    -0.99681     -0.26352      0.00000      0.00000     -0.00000      0.06326     -0.00000      0.00000      0.00000      0.05694     -0.00000     -0.00000      0.00000 \n    -0.01258      1.02514     -0.00000     -0.00000      0.00000     -0.30199      0.00000     -0.00000     -0.00000     -0.07371      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.99136     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.20234     -0.00000     -0.00000      0.00000      0.26127 \n    -0.00000      0.00000      0.00000     -0.00000      0.99136      0.00000      0.20234     -0.00000      0.00000      0.00000     -0.26127     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.99136      0.00000      0.00000     -0.00000      0.20234      0.00000     -0.00000     -0.00000      0.26127      0.00000 \n     0.00391      0.03330      0.00000     -0.00000      0.00000      0.70457     -0.00000      0.00000      0.00000      1.71437      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.03519     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.57642      0.00000      0.00000     -0.00000     -1.26252 \n     0.00000     -0.00000      0.00000     -0.00000      0.03519     -0.00000     -0.57642      0.00000     -0.00000     -0.00000      1.26252     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.03519     -0.00000     -0.00000      0.00000     -0.57642     -0.00000      0.00000      0.00000     -1.26252     -0.00000 \n    -0.00190     -0.01311     -0.00000      0.00000     -0.00000      0.37225     -0.00000      0.00000      0.00000     -1.79415     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.01116      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.53870     -0.00000      0.00000     -0.00000      1.23262 \n    -0.00000      0.00000     -0.00000      0.00000     -0.01116     -0.00000     -0.53870     -0.00000      0.00000      0.00000     -1.23262      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.01116      0.00000      0.00000     -0.00000     -0.53870      0.00000     -0.00000     -0.00000      1.23262      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99681      0.26355      0.00000     -0.00000      0.00000     -0.06298     -0.00000     -0.00000      0.00000      0.05707      0.00000     -0.00000      0.00000 \n    -0.01258     -1.02527     -0.00000      0.00000     -0.00000      0.30137      0.00000      0.00000     -0.00000     -0.07437      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.99159      0.00000     -0.00000      0.00000     -0.19787      0.00000     -0.00000     -0.00000      0.26377      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.99159      0.00000      0.00000     -0.00000     -0.19787     -0.00000     -0.00000     -0.00000      0.26377 \n     0.00000     -0.00000     -0.00000     -0.99159      0.00000      0.00000     -0.00000      0.19787     -0.00000      0.00000     -0.00000     -0.26377      0.00000 \n     0.00390     -0.03263     -0.00000      0.00000     -0.00000     -0.69953     -0.00000     -0.00000     -0.00000      1.71645      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.03426     -0.00000      0.00000     -0.00000      0.55748     -0.00000      0.00000      0.00000     -1.27102     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.03426     -0.00000     -0.00000      0.00000      0.55748      0.00000      0.00000      0.00000     -1.27102 \n    -0.00000     -0.00000     -0.00000     -0.03426     -0.00000     -0.00000      0.00000     -0.55748      0.00000     -0.00000      0.00000      1.27102     -0.00000 \n    -0.00190      0.01285      0.00000     -0.00000      0.00000     -0.37753     -0.00000      0.00000      0.00000     -1.79304     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.01086     -0.00000      0.00000     -0.00000      0.55708      0.00000     -0.00000     -0.00000      1.22442      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.01086      0.00000      0.00000      0.00000      0.55708     -0.00000     -0.00000      0.00000      1.22442 \n     0.00000     -0.00000     -0.00000      0.01086     -0.00000     -0.00000      0.00000     -0.55708      0.00000     -0.00000      0.00000     -1.22442     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Si\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.14265     -0.57519      0.00000      0.00000      0.00000      0.07217      0.00000      0.00000      0.00000      0.06615      0.00000      0.00000      0.00000 \n    -0.57519      2.31958      0.00000      0.00000      0.00000     -0.38733      0.00000      0.00000      0.00000     -0.27795      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.99941      0.00000      0.00000      0.00000     -0.03136      0.00000      0.00000      0.00000     -0.09652      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.99941      0.00000      0.00000      0.00000     -0.03136      0.00000      0.00000      0.00000     -0.09652      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.99941      0.00000      0.00000      0.00000     -0.03136      0.00000      0.00000      0.00000     -0.09652 \n     0.07217     -0.38733      0.00000      0.00000      0.00000      1.00467      0.00000      0.00000      0.00000      0.52936      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.03136      0.00000      0.00000      0.00000      0.27726      0.00000      0.00000      0.00000      0.20359      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.03136      0.00000      0.00000      0.00000      0.27726      0.00000      0.00000      0.00000      0.20359      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.03136      0.00000      0.00000      0.00000      0.27726      0.00000      0.00000      0.00000      0.20359 \n     0.06615     -0.27795      0.00000      0.00000      0.00000      0.52936      0.00000      0.00000      0.00000      0.28201      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.09652      0.00000      0.00000      0.00000      0.20359      0.00000      0.00000      0.00000      0.15221      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.09652      0.00000      0.00000      0.00000      0.20359      0.00000      0.00000      0.00000      0.15221      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.09652      0.00000      0.00000      0.00000      0.20359      0.00000      0.00000      0.00000      0.15221 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66587      0.66587      0.66587      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00079      0.00079      0.00079      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -65.15103     -5.06017     -3.50217     -3.50217     -3.50217     -0.41417     -0.16726     -0.16726     -0.16726      0.13365      0.20385      0.20385      0.20385 \n   </alphaeps>\n   <betaeps>\n   -65.14538     -5.05300     -3.49339     -3.49339     -3.49339     -0.35848     -0.11655     -0.11655     -0.11655      0.16736      0.23720      0.23720      0.23720 \n   </betaeps>\n   <alphavectors>\n     0.99665      0.26988      0.00000      0.00000      0.00000     -0.07226      0.00000      0.00000     -0.00000     -0.06780      0.00000     -0.00000     -0.00000 \n     0.01282     -1.02502     -0.00000      0.00000      0.00000      0.33048     -0.00000     -0.00000      0.00000      0.07732      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.99024     -0.00000     -0.00000     -0.23583     -0.00000      0.00000      0.00000     -0.00000      0.27765 \n    -0.00000     -0.00000     -0.00000      0.99024     -0.00000      0.00000     -0.00000      0.00000     -0.23583      0.00000     -0.00000     -0.27765      0.00000 \n     0.00000      0.00000      0.99024      0.00000      0.00000      0.00000      0.23583     -0.00000     -0.00000      0.00000     -0.27765      0.00000      0.00000 \n    -0.00427     -0.03947      0.00000     -0.00000      0.00000     -0.71798      0.00000      0.00000     -0.00000     -1.72748     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.03619      0.00000      0.00000      0.64207      0.00000     -0.00000     -0.00000      0.00000     -1.24521 \n     0.00000      0.00000      0.00000      0.03619      0.00000     -0.00000      0.00000     -0.00000      0.64207     -0.00000      0.00000      1.24521     -0.00000 \n    -0.00000     -0.00000      0.03619      0.00000      0.00000      0.00000     -0.64207      0.00000      0.00000     -0.00000      1.24521     -0.00000     -0.00000 \n     0.00213      0.01543      0.00000      0.00000      0.00000     -0.36420     -0.00000      0.00000     -0.00000      1.81043     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.01118      0.00000      0.00000      0.47740     -0.00000      0.00000      0.00000     -0.00000      1.26136 \n    -0.00000     -0.00000     -0.00000     -0.01118     -0.00000      0.00000      0.00000     -0.00000      0.47740      0.00000     -0.00000     -1.26136      0.00000 \n     0.00000      0.00000     -0.01118     -0.00000     -0.00000     -0.00000     -0.47740      0.00000      0.00000     -0.00000     -1.26136      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99666      0.26997     -0.00000     -0.00000      0.00000     -0.07115     -0.00000      0.00000      0.00000     -0.06849      0.00000     -0.00000      0.00000 \n     0.01279     -1.02542     -0.00000     -0.00000      0.00000      0.32846     -0.00000      0.00000      0.00000      0.08064      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.99084     -0.00000      0.00000     -0.00000     -0.22417      0.00000      0.00000     -0.28508      0.00000 \n    -0.00000     -0.00000      0.00000     -0.99084     -0.00000     -0.00000      0.00000      0.22417     -0.00000     -0.00000      0.00000      0.00000     -0.28508 \n    -0.00000     -0.00000     -0.99084      0.00000     -0.00000     -0.00000      0.22417     -0.00000      0.00000      0.00000      0.28508      0.00000      0.00000 \n    -0.00426     -0.03766      0.00000      0.00000     -0.00000     -0.69725      0.00000     -0.00000      0.00000     -1.73600     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.03405      0.00000     -0.00000      0.00000      0.59572     -0.00000     -0.00000      1.26810      0.00000 \n     0.00000      0.00000     -0.00000     -0.03405      0.00000      0.00000     -0.00000     -0.59572      0.00000      0.00000     -0.00000     -0.00000      1.26810 \n     0.00000      0.00000     -0.03405     -0.00000      0.00000      0.00000     -0.59572      0.00000     -0.00000     -0.00000     -1.26810     -0.00000     -0.00000 \n     0.00213      0.01471     -0.00000     -0.00000      0.00000     -0.38588     -0.00000      0.00000     -0.00000      1.80594      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.01048     -0.00000     -0.00000      0.00000      0.52363      0.00000      0.00000     -1.24289      0.00000 \n    -0.00000     -0.00000      0.00000      0.01048     -0.00000     -0.00000     -0.00000     -0.52363     -0.00000     -0.00000      0.00000      0.00000     -1.24289 \n    -0.00000     -0.00000      0.01048      0.00000     -0.00000     -0.00000     -0.52363      0.00000     -0.00000     -0.00000      1.24289      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"P\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.15010     -0.59452      0.00000      0.00000      0.00000      0.08295      0.00000      0.00000      0.00000      0.06903      0.00000      0.00000      0.00000 \n    -0.59452      2.35595      0.00000      0.00000      0.00000     -0.43750      0.00000      0.00000      0.00000     -0.28528      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.03155      0.00000      0.00000      0.00000     -0.11866      0.00000      0.00000      0.00000     -0.12954      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.03155      0.00000      0.00000      0.00000     -0.11866      0.00000      0.00000      0.00000     -0.12954      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.03155      0.00000      0.00000      0.00000     -0.11866      0.00000      0.00000      0.00000     -0.12954 \n     0.08295     -0.43750      0.00000      0.00000      0.00000      1.06940      0.00000      0.00000      0.00000      0.52220      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.11866      0.00000      0.00000      0.00000      0.49003      0.00000      0.00000      0.00000      0.29550      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.11866      0.00000      0.00000      0.00000      0.49003      0.00000      0.00000      0.00000      0.29550      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.11866      0.00000      0.00000      0.00000      0.49003      0.00000      0.00000      0.00000      0.29550 \n     0.06903     -0.28528      0.00000      0.00000      0.00000      0.52220      0.00000      0.00000      0.00000      0.25871      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.12954      0.00000      0.00000      0.00000      0.29550      0.00000      0.00000      0.00000      0.17990      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.12954      0.00000      0.00000      0.00000      0.29550      0.00000      0.00000      0.00000      0.17990      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.12954      0.00000      0.00000      0.00000      0.29550      0.00000      0.00000      0.00000      0.17990 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99809      0.99809      0.99809      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00191      0.00191      0.00191      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -76.02188     -6.31132     -4.56144     -4.56144     -4.56144     -0.53674     -0.22728     -0.22728     -0.22728      0.17832      0.25412      0.25412      0.25412 \n   </alphaeps>\n   <betaeps>\n   -76.01036     -6.29733     -4.54439     -4.54439     -4.54439     -0.44618     -0.14546     -0.14546     -0.14546      0.22983      0.30494      0.30494      0.30494 \n   </betaeps>\n   <alphavectors>\n    -0.99637      0.27597     -0.00000      0.00000     -0.00000     -0.07890      0.00000     -0.00000     -0.00000      0.07394      0.00000     -0.00000      0.00000 \n    -0.01359     -1.02549      0.00000     -0.00000     -0.00000      0.35602     -0.00000      0.00000      0.00000     -0.09707     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.99049     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.26039     -0.00000     -0.00000     -0.28428     -0.00000 \n    -0.00000      0.00000      0.00000      0.99049     -0.00000     -0.00000      0.00000      0.26039      0.00000      0.00000      0.00000      0.00000     -0.28428 \n     0.00000      0.00000     -0.00000      0.00000      0.99049      0.00000     -0.26039     -0.00000     -0.00000     -0.00000      0.28428     -0.00000      0.00000 \n     0.00473     -0.04029     -0.00000     -0.00000     -0.00000     -0.74674      0.00000      0.00000      0.00000      1.72286      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.03331     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.69868      0.00000     -0.00000      1.21922      0.00000 \n     0.00000     -0.00000      0.00000      0.03331      0.00000      0.00000     -0.00000     -0.69868      0.00000     -0.00000     -0.00000     -0.00000      1.21922 \n    -0.00000      0.00000     -0.00000      0.00000      0.03331     -0.00000      0.69868      0.00000     -0.00000      0.00000     -1.21922      0.00000      0.00000 \n    -0.00238      0.01571     -0.00000      0.00000     -0.00000     -0.34136      0.00000     -0.00000     -0.00000     -1.81275     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.01014      0.00000     -0.00000      0.00000      0.00000      0.00000      0.42379     -0.00000      0.00000     -1.27702     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.01014     -0.00000     -0.00000      0.00000     -0.42379     -0.00000      0.00000      0.00000      0.00000     -1.27702 \n     0.00000     -0.00000      0.00000     -0.00000     -0.01014      0.00000      0.42379     -0.00000      0.00000     -0.00000      1.27702     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99639     -0.27611      0.00000     -0.00000     -0.00000     -0.07701     -0.00000     -0.00000     -0.00000      0.07519     -0.00000     -0.00000     -0.00000 \n    -0.01355      1.02614     -0.00000      0.00000      0.00000      0.35248      0.00000      0.00000      0.00000     -0.10302      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.99131      0.00000      0.00000      0.24402     -0.00000      0.00000      0.00000      0.00000      0.00000      0.29570 \n    -0.00000      0.00000     -0.99131      0.00000     -0.00000      0.00000     -0.00000     -0.24402      0.00000      0.00000     -0.00000     -0.29570      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.99131      0.00000      0.00000     -0.00000     -0.24402      0.00000      0.29570      0.00000      0.00000 \n     0.00470      0.03758     -0.00000     -0.00000      0.00000     -0.71323     -0.00000     -0.00000     -0.00000      1.73707     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.03049      0.00000     -0.00000     -0.63616      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.25304 \n     0.00000     -0.00000     -0.03049     -0.00000      0.00000     -0.00000      0.00000      0.63616     -0.00000     -0.00000      0.00000      1.25304     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.03049     -0.00000     -0.00000      0.00000      0.63616     -0.00000     -1.25304     -0.00000     -0.00000 \n    -0.00237     -0.01463      0.00000     -0.00000     -0.00000     -0.37645     -0.00000     -0.00000     -0.00000     -1.80579      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00921     -0.00000      0.00000     -0.48783      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.25397 \n    -0.00000      0.00000      0.00921      0.00000     -0.00000      0.00000      0.00000      0.48783      0.00000      0.00000     -0.00000     -1.25397      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00921     -0.00000     -0.00000      0.00000      0.48783      0.00000      1.25397     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"S\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.15743     -0.61228      0.00000      0.00000      0.00000      0.09538      0.00000      0.00000      0.00000      0.06691      0.00000      0.00000      0.00000 \n    -0.61228      2.38520      0.00000      0.00000      0.00000     -0.49512      0.00000      0.00000      0.00000     -0.27279      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.06317      0.00000      0.00000      0.00000     -0.20673      0.00000      0.00000      0.00000     -0.16584      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.06317      0.00000      0.00000      0.00000     -0.20673      0.00000      0.00000      0.00000     -0.16584      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.06317      0.00000      0.00000      0.00000     -0.20673      0.00000      0.00000      0.00000     -0.16584 \n     0.09538     -0.49512      0.00000      0.00000      0.00000      1.21219      0.00000      0.00000      0.00000      0.49139      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.20673      0.00000      0.00000      0.00000      0.72441      0.00000      0.00000      0.00000      0.38604      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.20673      0.00000      0.00000      0.00000      0.72441      0.00000      0.00000      0.00000      0.38603      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.20673      0.00000      0.00000      0.00000      0.72441      0.00000      0.00000      0.00000      0.38603 \n     0.06691     -0.27279      0.00000      0.00000      0.00000      0.49139      0.00000      0.00000      0.00000      0.20215      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.16584      0.00000      0.00000      0.00000      0.38604      0.00000      0.00000      0.00000      0.20813      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.16584      0.00000      0.00000      0.00000      0.38603      0.00000      0.00000      0.00000      0.20813      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.16584      0.00000      0.00000      0.00000      0.38603      0.00000      0.00000      0.00000      0.20813 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99982      0.99982      0.99982      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33351      0.33351      0.33351      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -87.75745     -7.69076     -5.74497     -5.74497     -5.74497     -0.65154     -0.27936     -0.27936     -0.27936      0.21527      0.29683      0.29683      0.29683 \n   </alphaeps>\n   <betaeps>\n   -87.74724     -7.67898     -5.73061     -5.73061     -5.73061     -0.58843     -0.22278     -0.22278     -0.22278      0.24841      0.32960      0.32960      0.32960 \n   </betaeps>\n   <alphavectors>\n     0.99624      0.28151      0.00000     -0.00000      0.00000      0.08396      0.00000      0.00000      0.00000     -0.07581      0.00000     -0.00000      0.00000 \n     0.01390     -1.02487     -0.00000      0.00000     -0.00000     -0.37767     -0.00000     -0.00000     -0.00000      0.12900     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.98969      0.00000      0.00000     -0.00000      0.28074     -0.00000     -0.00000      0.00000      0.28714      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.98969      0.00000      0.00000     -0.00000      0.00000     -0.28074     -0.00000      0.00000      0.00000     -0.28714 \n     0.00000      0.00000      0.00000     -0.00000      0.98969      0.00000     -0.00000     -0.28074      0.00000      0.00000     -0.00000      0.28714      0.00000 \n    -0.00474     -0.04471      0.00000     -0.00000      0.00000      0.78836      0.00000      0.00000      0.00000     -1.65662      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.03428      0.00000      0.00000      0.00000     -0.74495      0.00000      0.00000     -0.00000     -1.15761     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.03428     -0.00000     -0.00000      0.00000     -0.00000      0.74495      0.00000     -0.00000     -0.00000      1.15761 \n     0.00000      0.00000      0.00000     -0.00000      0.03428     -0.00000      0.00000      0.74495      0.00000      0.00000      0.00000     -1.15761      0.00000 \n     0.00236      0.01698     -0.00000      0.00000     -0.00000      0.30541     -0.00000      0.00000      0.00000      1.76224     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.01015     -0.00000     -0.00000     -0.00000     -0.38474      0.00000      0.00000      0.00000      1.25442      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.01015      0.00000     -0.00000      0.00000     -0.00000      0.38474     -0.00000      0.00000      0.00000     -1.25442 \n     0.00000      0.00000     -0.00000      0.00000     -0.01015     -0.00000      0.00000      0.38474     -0.00000     -0.00000     -0.00000      1.25442     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99625     -0.28160     -0.00000      0.00000      0.00000      0.08265      0.00000     -0.00000      0.00000     -0.07677     -0.00000     -0.00000     -0.00000 \n     0.01386      1.02532      0.00000     -0.00000     -0.00000     -0.37489     -0.00000      0.00000     -0.00000      0.13350      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.99018      0.00000     -0.00000     -0.00000     -0.27061     -0.00000     -0.00000     -0.00000     -0.29506     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.99018      0.00000      0.00000     -0.00000      0.27061      0.00000      0.00000     -0.00000      0.29506      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.99018      0.00000     -0.00000     -0.00000      0.27061      0.00000     -0.00000     -0.00000      0.29506 \n    -0.00472      0.04301      0.00000     -0.00000     -0.00000      0.76602     -0.00000     -0.00000      0.00000     -1.66711     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.03269     -0.00000      0.00000      0.00000      0.70829      0.00000      0.00000      0.00000      1.18044      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.03269      0.00000     -0.00000      0.00000     -0.70829      0.00000      0.00000     -0.00000     -1.18044     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.03269     -0.00000      0.00000      0.00000     -0.70829     -0.00000      0.00000      0.00000     -1.18044 \n     0.00235     -0.01632     -0.00000      0.00000      0.00000      0.32910      0.00000     -0.00000     -0.00000      1.75798     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00964      0.00000     -0.00000     -0.00000      0.42391      0.00000      0.00000      0.00000     -1.24174      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00964     -0.00000     -0.00000      0.00000     -0.42391      0.00000     -0.00000      0.00000      1.24174      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00964      0.00000      0.00000      0.00000     -0.42391     -0.00000      0.00000     -0.00000      1.24174 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cl\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.16403     -0.62833      0.00000      0.00000      0.00000      0.10208      0.00000      0.00000      0.00000      0.07038      0.00000      0.00000      0.00000 \n    -0.62833      2.41175      0.00000      0.00000      0.00000     -0.52104      0.00000      0.00000      0.00000     -0.28442      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.10273      0.00000      0.00000      0.00000     -0.30276      0.00000      0.00000      0.00000     -0.20684      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.10273      0.00000      0.00000      0.00000     -0.30276      0.00000      0.00000      0.00000     -0.20684      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.10273      0.00000      0.00000      0.00000     -0.30276      0.00000      0.00000      0.00000     -0.20684 \n     0.10208     -0.52104      0.00000      0.00000      0.00000      1.22268      0.00000      0.00000      0.00000      0.49704      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.30276      0.00000      0.00000      0.00000      0.94083      0.00000      0.00000      0.00000      0.48170      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.30276      0.00000      0.00000      0.00000      0.94083      0.00000      0.00000      0.00000      0.48170      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.30276      0.00000      0.00000      0.00000      0.94083      0.00000      0.00000      0.00000      0.48170 \n     0.07038     -0.28442      0.00000      0.00000      0.00000      0.49704      0.00000      0.00000      0.00000      0.20461      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.20684      0.00000      0.00000      0.00000      0.48170      0.00000      0.00000      0.00000      0.24819      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.20684      0.00000      0.00000      0.00000      0.48170      0.00000      0.00000      0.00000      0.24819      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.20684      0.00000      0.00000      0.00000      0.48170      0.00000      0.00000      0.00000      0.24819 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99253      0.99253      0.99253      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.67414      0.67414      0.67414      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -100.34040     -9.18185     -7.03663     -7.03663     -7.03663     -0.76301     -0.32700     -0.32700     -0.32700      0.28860      0.37568      0.37568      0.37568 \n   </alphaeps>\n   <betaeps>\n  -100.33430     -9.17517     -7.02848     -7.02848     -7.02848     -0.73178     -0.29897     -0.29897     -0.29897      0.30455      0.39140      0.39140      0.39140 \n   </betaeps>\n   <alphavectors>\n     0.99613      0.28635      0.00000      0.00000     -0.00000      0.08823     -0.00000      0.00000     -0.00000      0.08121      0.00000     -0.00000     -0.00000 \n     0.01408     -1.02545     -0.00000     -0.00000      0.00000     -0.39298      0.00000     -0.00000      0.00000     -0.14265      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.98965      0.00000      0.00000      0.29517      0.00000      0.00000      0.00000     -0.00000      0.29781     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.98965      0.00000     -0.00000      0.00000      0.29517      0.00000      0.00000     -0.00000     -0.29781 \n     0.00000     -0.00000      0.98965     -0.00000      0.00000      0.00000      0.00000     -0.29517      0.00000      0.00000     -0.29781      0.00000     -0.00000 \n    -0.00483     -0.04502     -0.00000     -0.00000      0.00000      0.78557     -0.00000      0.00000     -0.00000      1.65273      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.03279     -0.00000     -0.00000     -0.75652     -0.00000     -0.00000     -0.00000      0.00000     -1.14459      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.03279      0.00000      0.00000     -0.00000     -0.75652     -0.00000     -0.00000      0.00000      1.14459 \n    -0.00000      0.00000      0.03279     -0.00000      0.00000     -0.00000     -0.00000      0.75652     -0.00000     -0.00000      1.14459     -0.00000      0.00000 \n     0.00239      0.01668      0.00000      0.00000     -0.00000      0.31409      0.00000      0.00000     -0.00000     -1.74992     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00932      0.00000      0.00000     -0.37912     -0.00000     -0.00000     -0.00000      0.00000      1.24452      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00932     -0.00000      0.00000     -0.00000     -0.37912     -0.00000     -0.00000      0.00000     -1.24452 \n     0.00000     -0.00000     -0.00932      0.00000     -0.00000     -0.00000     -0.00000      0.37912     -0.00000     -0.00000     -1.24452     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99613      0.28639     -0.00000     -0.00000     -0.00000     -0.08761     -0.00000      0.00000      0.00000      0.08166      0.00000      0.00000     -0.00000 \n    -0.01406     -1.02566      0.00000      0.00000      0.00000      0.39166      0.00000     -0.00000     -0.00000     -0.14477     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.98986      0.00000      0.00000      0.00000      0.00000      0.29085      0.00000     -0.00000      0.00000      0.30134 \n    -0.00000      0.00000      0.00000      0.00000      0.98986     -0.00000     -0.29085     -0.00000      0.00000     -0.00000     -0.30134      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.98986      0.00000      0.00000      0.00000     -0.00000      0.29085     -0.00000      0.00000     -0.00000     -0.30134      0.00000 \n     0.00482     -0.04427     -0.00000     -0.00000      0.00000     -0.77558      0.00000      0.00000      0.00000      1.65747      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.03214      0.00000     -0.00000     -0.00000      0.00000     -0.74152     -0.00000      0.00000      0.00000     -1.15438 \n     0.00000      0.00000      0.00000      0.00000      0.03214      0.00000      0.74152      0.00000     -0.00000      0.00000      1.15438     -0.00000      0.00000 \n     0.00000      0.00000     -0.03214      0.00000      0.00000     -0.00000      0.00000     -0.74152     -0.00000     -0.00000      0.00000      1.15438      0.00000 \n    -0.00239      0.01638      0.00000      0.00000     -0.00000     -0.32466      0.00000      0.00000      0.00000     -1.74800      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00912     -0.00000     -0.00000     -0.00000     -0.00000     -0.39534      0.00000     -0.00000     -0.00000      1.23946 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00912     -0.00000      0.39534      0.00000     -0.00000     -0.00000     -1.23946      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00912     -0.00000     -0.00000     -0.00000      0.00000     -0.39534      0.00000      0.00000     -0.00000     -1.23946     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ar\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.16972     -0.64149      0.00000      0.00000      0.00000      0.10404      0.00000      0.00000      0.00000      0.07680      0.00000      0.00000      0.00000 \n    -0.64149      2.42866      0.00000      0.00000      0.00000     -0.52046      0.00000      0.00000      0.00000     -0.30639      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.14450      0.00000      0.00000      0.00000     -0.39776      0.00000      0.00000      0.00000     -0.25299      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.14450      0.00000      0.00000      0.00000     -0.39776      0.00000      0.00000      0.00000     -0.25299      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.14450      0.00000      0.00000      0.00000     -0.39776      0.00000      0.00000      0.00000     -0.25299 \n     0.10404     -0.52046      0.00000      0.00000      0.00000      1.17593      0.00000      0.00000      0.00000      0.51652      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.39776      0.00000      0.00000      0.00000      1.14463      0.00000      0.00000      0.00000      0.58085      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.39776      0.00000      0.00000      0.00000      1.14463      0.00000      0.00000      0.00000      0.58085      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.39776      0.00000      0.00000      0.00000      1.14463      0.00000      0.00000      0.00000      0.58085 \n     0.07680     -0.30639      0.00000      0.00000      0.00000      0.51652      0.00000      0.00000      0.00000      0.22968      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.25299      0.00000      0.00000      0.00000      0.58085      0.00000      0.00000      0.00000      0.29606      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.25299      0.00000      0.00000      0.00000      0.58085      0.00000      0.00000      0.00000      0.29606      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.25299      0.00000      0.00000      0.00000      0.58085      0.00000      0.00000      0.00000      0.29606 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -113.77020    -10.78627     -8.43810     -8.43810     -8.43810     -0.87550     -0.37388     -0.37388     -0.37388      0.38824      0.47891      0.47891      0.47891 \n   </alphaeps>\n   <betaeps>\n  -113.77020    -10.78627     -8.43810     -8.43810     -8.43810     -0.87550     -0.37388     -0.37388     -0.37388      0.38824      0.47891      0.47891      0.47891 \n   </betaeps>\n   <alphavectors>\n     0.99602     -0.29043     -0.00000     -0.00000     -0.00000      0.09196     -0.00000     -0.00000      0.00000     -0.08811     -0.00000      0.00000     -0.00000 \n     0.01424      1.02591     -0.00000     -0.00000     -0.00000     -0.40204     -0.00000      0.00000     -0.00000      0.14502      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.98929     -0.00000     -0.00000      0.00000     -0.30587     -0.00000     -0.00000      0.00000     -0.30997      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.98929      0.00000      0.00000      0.30587      0.00000     -0.00000     -0.00000      0.00000      0.30997 \n    -0.00000      0.00000      0.00000     -0.98929     -0.00000      0.00000      0.00000     -0.00000     -0.30587     -0.00000      0.00000     -0.30997      0.00000 \n    -0.00492      0.04635      0.00000      0.00000      0.00000      0.76537      0.00000     -0.00000      0.00000     -1.66600     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.03265      0.00000      0.00000     -0.00000      0.75581      0.00000      0.00000     -0.00000      1.14815     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.03265     -0.00000     -0.00000     -0.75581     -0.00000      0.00000      0.00000     -0.00000     -1.14815 \n    -0.00000      0.00000      0.00000     -0.03265     -0.00000     -0.00000      0.00000     -0.00000      0.75581      0.00000      0.00000      1.14815     -0.00000 \n     0.00243     -0.01672     -0.00000     -0.00000     -0.00000      0.33846      0.00000     -0.00000      0.00000      1.74837      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00894     -0.00000     -0.00000      0.00000      0.38464     -0.00000     -0.00000      0.00000     -1.23933      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00894     -0.00000     -0.00000     -0.38464      0.00000     -0.00000     -0.00000      0.00000      1.23933 \n     0.00000     -0.00000     -0.00000      0.00894      0.00000     -0.00000     -0.00000      0.00000      0.38464     -0.00000     -0.00000     -1.23933      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99602      0.29043      0.00000     -0.00000      0.00000     -0.09196      0.00000      0.00000     -0.00000     -0.08811     -0.00000      0.00000      0.00000 \n    -0.01424     -1.02591     -0.00000     -0.00000     -0.00000      0.40204     -0.00000     -0.00000      0.00000      0.14502      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.98929      0.00000     -0.00000     -0.00000      0.00000      0.30587     -0.00000      0.00000     -0.00000     -0.30997      0.00000 \n    -0.00000     -0.00000     -0.00000      0.98929      0.00000      0.00000      0.30587     -0.00000      0.00000      0.00000     -0.30997     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98929     -0.00000      0.00000      0.00000      0.30587     -0.00000     -0.00000      0.00000     -0.30997 \n     0.00492     -0.04635      0.00000      0.00000     -0.00000     -0.76537      0.00000      0.00000     -0.00000     -1.66600     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.03265      0.00000     -0.00000      0.00000      0.00000     -0.75581      0.00000     -0.00000      0.00000      1.14815     -0.00000 \n     0.00000      0.00000     -0.00000      0.03265     -0.00000     -0.00000     -0.75581      0.00000     -0.00000     -0.00000      1.14815     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.03265      0.00000     -0.00000     -0.00000     -0.75581      0.00000      0.00000     -0.00000      1.14815 \n    -0.00243      0.01672      0.00000     -0.00000      0.00000     -0.33846      0.00000      0.00000     -0.00000      1.74837      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00894     -0.00000      0.00000     -0.00000     -0.00000     -0.38464      0.00000     -0.00000      0.00000     -1.23933     -0.00000 \n     0.00000      0.00000      0.00000     -0.00894      0.00000     -0.00000     -0.38464     -0.00000      0.00000      0.00000     -1.23933     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00894      0.00000     -0.00000     -0.00000     -0.38464     -0.00000     -0.00000     -0.00000     -1.23933 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"K\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.17071     -0.64801      0.00000      0.00000      0.00000     -0.19554      0.00000      0.00000      0.00000     -0.00806      0.00000      0.00000      0.00000     -0.00933      0.00000      0.00000      0.00000 \n    -0.64801      2.46619      0.00000      0.00000      0.00000      0.85528      0.00000      0.00000      0.00000      0.04764      0.00000      0.00000      0.00000      0.03656      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.18927      0.00000      0.00000      0.00000     -0.64218      0.00000      0.00000      0.00000     -0.01480      0.00000      0.00000      0.00000      0.00697      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.18927      0.00000      0.00000      0.00000     -0.64218      0.00000      0.00000      0.00000     -0.01480      0.00000      0.00000      0.00000      0.00697      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.18927      0.00000      0.00000      0.00000     -0.64218      0.00000      0.00000      0.00000     -0.01480      0.00000      0.00000      0.00000      0.00697 \n    -0.19554      0.85528      0.00000      0.00000      0.00000      2.33846      0.00000      0.00000      0.00000      0.15888      0.00000      0.00000      0.00000      0.08171      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.64218      0.00000      0.00000      0.00000      2.18127      0.00000      0.00000      0.00000      0.02194      0.00000      0.00000      0.00000     -0.00856      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.64218      0.00000      0.00000      0.00000      2.18127      0.00000      0.00000      0.00000      0.02194      0.00000      0.00000      0.00000     -0.00856      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.64218      0.00000      0.00000      0.00000      2.18127      0.00000      0.00000      0.00000      0.02194      0.00000      0.00000      0.00000     -0.00856 \n    -0.00806      0.04764      0.00000      0.00000      0.00000      0.15888      0.00000      0.00000      0.00000      0.52714      0.00000      0.00000      0.00000      0.23300      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01480      0.00000      0.00000      0.00000      0.02194      0.00000      0.00000      0.00000      0.00027      0.00000      0.00000      0.00000     -0.00009      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01480      0.00000      0.00000      0.00000      0.02194      0.00000      0.00000      0.00000      0.00027      0.00000      0.00000      0.00000     -0.00009      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01480      0.00000      0.00000      0.00000      0.02194      0.00000      0.00000      0.00000      0.00027      0.00000      0.00000      0.00000     -0.00009 \n    -0.00933      0.03656      0.00000      0.00000      0.00000      0.08171      0.00000      0.00000      0.00000      0.23300      0.00000      0.00000      0.00000      0.10311      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00697      0.00000      0.00000      0.00000     -0.00856      0.00000      0.00000      0.00000     -0.00009      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00697      0.00000      0.00000      0.00000     -0.00856      0.00000      0.00000      0.00000     -0.00009      0.00000      0.00000      0.00000      0.00005      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00697      0.00000      0.00000      0.00000     -0.00856      0.00000      0.00000      0.00000     -0.00009      0.00000      0.00000      0.00000      0.00005 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.49994      0.00002      0.00002      0.00002      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.49994      0.00002      0.00002      0.00002      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -128.37560    -12.84460    -10.28997    -10.28997    -10.28997     -1.29275     -0.70296     -0.70296     -0.70296     -0.09002     -0.03178     -0.03178     -0.03178      0.02409      0.04356      0.04356      0.04356 \n   </alphaeps>\n   <betaeps>\n  -128.37560    -12.84460    -10.28997    -10.28997    -10.28997     -1.29275     -0.70296     -0.70296     -0.70296     -0.09002     -0.03178     -0.03178     -0.03178      0.02409      0.04356      0.04356      0.04356 \n   </betaeps>\n   <alphavectors>\n     0.99635     -0.28796      0.00000     -0.00000      0.00000      0.09762      0.00000     -0.00000     -0.00000     -0.01947      0.00000      0.00000      0.00000      0.00558      0.00000     -0.00000      0.00000 \n     0.01351      1.02956     -0.00000     -0.00000      0.00000     -0.41118      0.00000      0.00000      0.00000      0.08777     -0.00000     -0.00000      0.00000     -0.09402     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.99520     -0.00000      0.00000     -0.00000     -0.32282     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.04903      0.00000     -0.00000      0.05606      0.00000 \n    -0.00000      0.00000     -0.00000      0.99520     -0.00000      0.00000     -0.00000      0.00000      0.32282     -0.00000     -0.00000     -0.04903     -0.00000     -0.00000      0.00000      0.00000     -0.05606 \n    -0.00000     -0.00000      0.00000      0.00000      0.99520     -0.00000     -0.00000      0.32282      0.00000     -0.00000      0.04903      0.00000      0.00000      0.00000      0.05606      0.00000      0.00000 \n     0.00267     -0.02132      0.00000      0.00000      0.00000     -1.06833      0.00000     -0.00000      0.00000      0.23428     -0.00000     -0.00000      0.00000      0.14828     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.01608     -0.00000      0.00000      0.00000      1.04421     -0.00000      0.00000      0.00000      0.00000      0.00000      0.19698     -0.00000     -0.00000     -0.25562     -0.00000 \n     0.00000     -0.00000     -0.00000      0.01608      0.00000     -0.00000     -0.00000     -0.00000     -1.04421      0.00000      0.00000      0.19698      0.00000      0.00000     -0.00000      0.00000      0.25562 \n     0.00000      0.00000      0.00000      0.00000      0.01608      0.00000     -0.00000     -1.04421     -0.00000      0.00000     -0.19698     -0.00000     -0.00000     -0.00000     -0.25562      0.00000      0.00000 \n     0.00088     -0.00568     -0.00000     -0.00000      0.00000      0.00535     -0.00000     -0.00000     -0.00000      0.72600      0.00000     -0.00000     -0.00000     -2.13839      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00401      0.00000     -0.00000     -0.00000      0.01057      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.53647      0.00000      0.00000      1.67632      0.00000 \n    -0.00000      0.00000      0.00000     -0.00401     -0.00000      0.00000      0.00000      0.00000     -0.01057     -0.00000      0.00000     -0.53647     -0.00000     -0.00000      0.00000     -0.00000     -1.67632 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00401     -0.00000      0.00000     -0.01057      0.00000     -0.00000      0.53647      0.00000      0.00000      0.00000      1.67632     -0.00000     -0.00000 \n    -0.00042      0.00284      0.00000      0.00000     -0.00000     -0.00310      0.00000      0.00000      0.00000      0.32107      0.00000     -0.00000     -0.00000      2.26430      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00216     -0.00000      0.00000     -0.00000     -0.00413     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.53297      0.00000      0.00000     -1.63200      0.00000 \n     0.00000      0.00000     -0.00000      0.00216      0.00000     -0.00000     -0.00000     -0.00000      0.00413     -0.00000     -0.00000     -0.53297      0.00000      0.00000     -0.00000      0.00000      1.63200 \n    -0.00000     -0.00000      0.00000      0.00000      0.00216     -0.00000     -0.00000      0.00413      0.00000     -0.00000      0.53297     -0.00000     -0.00000     -0.00000     -1.63200      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99635      0.28796     -0.00000     -0.00000      0.00000      0.09762      0.00000     -0.00000     -0.00000      0.01947      0.00000      0.00000      0.00000     -0.00558     -0.00000      0.00000     -0.00000 \n    -0.01351     -1.02956     -0.00000     -0.00000      0.00000     -0.41118     -0.00000      0.00000      0.00000     -0.08777     -0.00000     -0.00000      0.00000      0.09402      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99520      0.00000     -0.00000     -0.32282      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.04903     -0.00000      0.00000      0.05606      0.00000 \n    -0.00000     -0.00000      0.99520     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.32282     -0.00000      0.04903     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.05606 \n    -0.00000     -0.00000      0.00000     -0.00000      0.99520     -0.00000     -0.00000     -0.32282      0.00000     -0.00000      0.00000      0.04903     -0.00000      0.00000      0.05606     -0.00000     -0.00000 \n    -0.00267      0.02132     -0.00000     -0.00000      0.00000     -1.06833     -0.00000      0.00000      0.00000     -0.23428      0.00000     -0.00000      0.00000     -0.14828      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.01608     -0.00000      0.00000      1.04421     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.19698      0.00000     -0.00000     -0.25562     -0.00000 \n     0.00000      0.00000      0.01608     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.04421      0.00000     -0.19698      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.25562 \n     0.00000      0.00000      0.00000     -0.00000      0.01608      0.00000      0.00000      1.04421     -0.00000      0.00000     -0.00000     -0.19698      0.00000     -0.00000     -0.25562      0.00000      0.00000 \n    -0.00088      0.00568      0.00000     -0.00000     -0.00000      0.00535      0.00000     -0.00000     -0.00000     -0.72600     -0.00000     -0.00000      0.00000      2.13839     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00401      0.00000     -0.00000      0.01057      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.53647     -0.00000      0.00000      1.67632      0.00000 \n    -0.00000     -0.00000     -0.00401      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.01057     -0.00000      0.53647     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.67632 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00401     -0.00000     -0.00000      0.01057      0.00000     -0.00000      0.00000      0.53647     -0.00000      0.00000      1.67632     -0.00000     -0.00000 \n     0.00042     -0.00284     -0.00000      0.00000      0.00000     -0.00310     -0.00000      0.00000      0.00000     -0.32107      0.00000     -0.00000      0.00000     -2.26430     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00216     -0.00000      0.00000     -0.00413     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.53297      0.00000     -0.00000     -1.63200      0.00000 \n     0.00000      0.00000      0.00216     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00413      0.00000      0.53297     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.63200 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00216     -0.00000     -0.00000     -0.00413     -0.00000      0.00000      0.00000      0.53297      0.00000     -0.00000     -1.63200     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ca\" basis=\"6-31G\">\n   <guessdensitymatrix>\n     2.17647      0.66537      0.00000      0.00000      0.00000     -0.21770      0.00000      0.00000      0.00000     -0.02808      0.00000      0.00000      0.00000     -0.02330      0.00000      0.00000      0.00000 \n     0.66537      2.51663      0.00000      0.00000      0.00000     -0.94939      0.00000      0.00000      0.00000     -0.14317      0.00000      0.00000      0.00000     -0.09636      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.21472      0.00000      0.00000      0.00000     -0.69601      0.00000      0.00000      0.00000     -0.01707      0.00000      0.00000      0.00000      0.00840      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.21472      0.00000      0.00000      0.00000     -0.69601      0.00000      0.00000      0.00000     -0.01707      0.00000      0.00000      0.00000      0.00840      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.21472      0.00000      0.00000      0.00000     -0.69601      0.00000      0.00000      0.00000     -0.01707      0.00000      0.00000      0.00000      0.00840 \n    -0.21770     -0.94939      0.00000      0.00000      0.00000      2.49755      0.00000      0.00000      0.00000      0.41789      0.00000      0.00000      0.00000      0.23002      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.69601      0.00000      0.00000      0.00000      2.22189      0.00000      0.00000      0.00000      0.01598      0.00000      0.00000      0.00000     -0.00549      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.69601      0.00000      0.00000      0.00000      2.22189      0.00000      0.00000      0.00000      0.01598      0.00000      0.00000      0.00000     -0.00549      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.69601      0.00000      0.00000      0.00000      2.22189      0.00000      0.00000      0.00000      0.01598      0.00000      0.00000      0.00000     -0.00549 \n    -0.02808     -0.14317      0.00000      0.00000      0.00000      0.41789      0.00000      0.00000      0.00000      1.02374      0.00000      0.00000      0.00000      0.50365      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01707      0.00000      0.00000      0.00000      0.01598      0.00000      0.00000      0.00000      0.00036      0.00000      0.00000      0.00000      0.00014      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01707      0.00000      0.00000      0.00000      0.01598      0.00000      0.00000      0.00000      0.00036      0.00000      0.00000      0.00000      0.00014      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01707      0.00000      0.00000      0.00000      0.01598      0.00000      0.00000      0.00000      0.00036      0.00000      0.00000      0.00000      0.00014 \n    -0.02330     -0.09636      0.00000      0.00000      0.00000      0.23002      0.00000      0.00000      0.00000      0.50365      0.00000      0.00000      0.00000      0.24817      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00840      0.00000      0.00000      0.00000     -0.00549      0.00000      0.00000      0.00000      0.00014      0.00000      0.00000      0.00000      0.00032      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00840      0.00000      0.00000      0.00000     -0.00549      0.00000      0.00000      0.00000      0.00014      0.00000      0.00000      0.00000      0.00032      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00840      0.00000      0.00000      0.00000     -0.00549      0.00000      0.00000      0.00000      0.00014      0.00000      0.00000      0.00000      0.00032 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99885      0.00038      0.00038      0.00038      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99885      0.00038      0.00038      0.00038      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -143.89860    -15.05408    -12.29371    -12.29371    -12.29371     -1.71679     -1.03957     -1.03957     -1.03957     -0.14262     -0.05193     -0.05193     -0.05193      0.03957      0.09460      0.09460      0.09460 \n   </alphaeps>\n   <betaeps>\n  -143.89860    -15.05408    -12.29371    -12.29371    -12.29371     -1.71679     -1.03957     -1.03957     -1.03957     -0.14262     -0.05193     -0.05193     -0.05193      0.03957      0.09460      0.09460      0.09460 \n   </betaeps>\n   <alphavectors>\n     0.99623     -0.29074     -0.00000     -0.00000     -0.00000      0.10270      0.00000      0.00000     -0.00000      0.02617      0.00000     -0.00000      0.00000     -0.01179      0.00000      0.00000     -0.00000 \n    -0.01385     -1.02919     -0.00000     -0.00000     -0.00000      0.43010      0.00000      0.00000     -0.00000      0.11799     -0.00000     -0.00000      0.00000     -0.13855      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.99445      0.00000     -0.00000      0.00000     -0.34413     -0.00000     -0.00000      0.07469      0.00000     -0.00000     -0.11206      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.99445     -0.00000     -0.00000      0.34413     -0.00000     -0.00000     -0.00000     -0.07469     -0.00000     -0.00000     -0.00000      0.00000      0.11206      0.00000 \n    -0.00000     -0.00000      0.99445      0.00000     -0.00000     -0.00000      0.00000      0.34413      0.00000      0.00000      0.00000      0.00000     -0.07469     -0.00000     -0.00000      0.00000     -0.11206 \n     0.00285     -0.02290     -0.00000     -0.00000     -0.00000     -1.07366     -0.00000     -0.00000      0.00000     -0.30920     -0.00000     -0.00000      0.00000     -0.09624      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.01476     -0.00000      0.00000     -0.00000      1.05391     -0.00000      0.00000     -0.04303      0.00000     -0.00000     -0.30510     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.01476     -0.00000      0.00000     -1.05391      0.00000      0.00000     -0.00000      0.04303      0.00000      0.00000      0.00000      0.00000      0.30510      0.00000 \n    -0.00000      0.00000      0.01476      0.00000     -0.00000      0.00000     -0.00000     -1.05391      0.00000      0.00000     -0.00000     -0.00000      0.04303     -0.00000     -0.00000      0.00000     -0.30510 \n     0.00128     -0.00764     -0.00000      0.00000     -0.00000      0.01144      0.00000      0.00000     -0.00000     -0.71573      0.00000     -0.00000      0.00000      1.99256      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00594      0.00000      0.00000     -0.00000      0.00767     -0.00000     -0.00000      0.46762      0.00000     -0.00000     -1.47517     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00594      0.00000     -0.00000     -0.00767      0.00000      0.00000      0.00000     -0.46762     -0.00000     -0.00000      0.00000     -0.00000      1.47517      0.00000 \n    -0.00000     -0.00000     -0.00594      0.00000     -0.00000     -0.00000     -0.00000     -0.00767      0.00000      0.00000      0.00000      0.00000     -0.46762     -0.00000     -0.00000      0.00000     -1.47517 \n    -0.00067      0.00403      0.00000     -0.00000      0.00000     -0.00584     -0.00000     -0.00000      0.00000     -0.35239     -0.00000      0.00000     -0.00000     -2.10977      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00329      0.00000     -0.00000      0.00000     -0.00264      0.00000     -0.00000      0.60850     -0.00000      0.00000      1.41489      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00329     -0.00000      0.00000      0.00264     -0.00000     -0.00000     -0.00000     -0.60850     -0.00000     -0.00000      0.00000     -0.00000     -1.41489     -0.00000 \n     0.00000     -0.00000      0.00329     -0.00000      0.00000     -0.00000      0.00000      0.00264     -0.00000     -0.00000      0.00000      0.00000     -0.60850      0.00000      0.00000     -0.00000      1.41489 \n   </alphavectors>\n   <betavectors>\n     0.99623     -0.29074      0.00000      0.00000      0.00000     -0.10270      0.00000     -0.00000     -0.00000     -0.02617     -0.00000      0.00000      0.00000     -0.01179     -0.00000     -0.00000      0.00000 \n    -0.01385     -1.02919     -0.00000      0.00000      0.00000     -0.43010      0.00000     -0.00000     -0.00000     -0.11799     -0.00000      0.00000      0.00000     -0.13855     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.99445     -0.00000      0.00000      0.00000     -0.34413      0.00000      0.00000      0.00000     -0.00000      0.07469      0.00000      0.00000     -0.00000      0.11206 \n     0.00000     -0.00000      0.00000      0.00000      0.99445      0.00000      0.34413      0.00000     -0.00000      0.00000      0.07469     -0.00000      0.00000     -0.00000     -0.00000      0.11206     -0.00000 \n     0.00000      0.00000      0.99445     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.34413      0.00000      0.00000      0.07469      0.00000     -0.00000      0.11206     -0.00000      0.00000 \n     0.00285     -0.02290     -0.00000     -0.00000      0.00000      1.07366      0.00000      0.00000     -0.00000      0.30920     -0.00000     -0.00000      0.00000     -0.09624     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.01476     -0.00000      0.00000      0.00000      1.05391      0.00000      0.00000      0.00000     -0.00000     -0.04303      0.00000      0.00000     -0.00000      0.30510 \n     0.00000      0.00000      0.00000      0.00000      0.01476     -0.00000     -1.05391      0.00000      0.00000      0.00000     -0.04303     -0.00000      0.00000     -0.00000     -0.00000      0.30510      0.00000 \n     0.00000     -0.00000      0.01476     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.05391      0.00000     -0.00000     -0.04303      0.00000     -0.00000      0.30510     -0.00000      0.00000 \n     0.00128     -0.00764      0.00000     -0.00000      0.00000     -0.01144      0.00000     -0.00000     -0.00000      0.71573     -0.00000      0.00000      0.00000      1.99256      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00594      0.00000     -0.00000     -0.00000      0.00767     -0.00000     -0.00000     -0.00000      0.00000      0.46762     -0.00000     -0.00000      0.00000      1.47517 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00594      0.00000     -0.00767     -0.00000     -0.00000      0.00000      0.46762     -0.00000     -0.00000     -0.00000     -0.00000      1.47517      0.00000 \n     0.00000      0.00000     -0.00594     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00767      0.00000      0.00000      0.46762      0.00000     -0.00000      1.47517     -0.00000      0.00000 \n    -0.00067      0.00403     -0.00000      0.00000     -0.00000      0.00584     -0.00000      0.00000      0.00000      0.35239      0.00000     -0.00000     -0.00000     -2.10977     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00329     -0.00000      0.00000      0.00000     -0.00264      0.00000      0.00000      0.00000     -0.00000      0.60850      0.00000      0.00000     -0.00000     -1.41489 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00329      0.00000      0.00264      0.00000     -0.00000     -0.00000      0.60850      0.00000      0.00000      0.00000      0.00000     -1.41489     -0.00000 \n    -0.00000      0.00000      0.00329      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00264     -0.00000      0.00000      0.60850     -0.00000      0.00000     -1.41489      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n"
  },
  {
    "path": "src/madness/chem/6-31gss",
    "content": "<?xml version=\"1.0\" ?>\n<name>\n   6-31G**\n</name>\n<basis symbol=\"H\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      18.73113700\n      2.82539370\n      0.64012170\n    </exponents>\n    <coefficients>\n      0.03349460\n      0.23472695\n      0.81375733\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.16127780\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      1.10000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"He\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      38.42163400\n      5.77803000\n      1.24177400\n    </exponents>\n    <coefficients>\n      0.02376600\n      0.15467900\n      0.46963000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.29796400\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      1.10000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Li\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      642.41892000\n      96.79851500\n      22.09112100\n      6.20107030\n      1.93511770\n      0.63673580\n    </exponents>\n    <coefficients>\n      0.00214260\n      0.01620890\n      0.07731560\n      0.24578600\n      0.47018900\n      0.34547080\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.32491840\n      0.63243060\n      0.07905340\n    </exponents>\n    <scoefficients>\n      -0.03509170\n      -0.19123280\n      1.08398780\n    </scoefficients>\n    <pcoefficients>\n      0.00894150\n      0.14100950\n      0.94536370\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03596200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.20000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Be\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      1264.58570000\n      189.93681000\n      43.15908900\n      12.09866300\n      3.80632320\n      1.27289030\n    </exponents>\n    <coefficients>\n      0.00194480\n      0.01483510\n      0.07209060\n      0.23715420\n      0.46919870\n      0.35652020\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.19646310\n      0.74781330\n      0.21996630\n    </exponents>\n    <scoefficients>\n      -0.11264870\n      -0.22950640\n      1.18691670\n    </scoefficients>\n    <pcoefficients>\n      0.05598020\n      0.26155060\n      0.79397230\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.08230990\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.40000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"B\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      2068.88230000\n      310.64957000\n      70.68303300\n      19.86108000\n      6.29930480\n      2.12702700\n    </exponents>\n    <coefficients>\n      0.00186630\n      0.01425150\n      0.06955160\n      0.23257290\n      0.46707870\n      0.36343140\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.72797100\n      1.19033770\n      0.35941170\n    </exponents>\n    <scoefficients>\n      -0.13039380\n      -0.13078890\n      1.13094440\n    </scoefficients>\n    <pcoefficients>\n      0.07459760\n      0.30784670\n      0.74345680\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.12675120\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.60000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"C\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      3047.52490000\n      457.36951000\n      103.94869000\n      29.21015500\n      9.28666300\n      3.16392700\n    </exponents>\n    <coefficients>\n      0.00183470\n      0.01403730\n      0.06884260\n      0.23218440\n      0.46794130\n      0.36231200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.86827240\n      1.88128850\n      0.54424930\n    </exponents>\n    <scoefficients>\n      -0.11933240\n      -0.16085420\n      1.14345640\n    </scoefficients>\n    <pcoefficients>\n      0.06899910\n      0.31642400\n      0.74430830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.16871440\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"N\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      4173.51100000\n      627.45790000\n      142.90210000\n      40.23433000\n      12.82021000\n      4.39043700\n    </exponents>\n    <coefficients>\n      0.00183480\n      0.01399500\n      0.06858700\n      0.23224100\n      0.46907000\n      0.36045500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      11.62635800\n      2.71628000\n      0.77221800\n    </exponents>\n    <scoefficients>\n      -0.11496100\n      -0.16911800\n      1.14585200\n    </scoefficients>\n    <pcoefficients>\n      0.06758000\n      0.32390700\n      0.74089500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.21203130\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"O\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      5484.67170000\n      825.23495000\n      188.04696000\n      52.96450000\n      16.89757000\n      5.79963530\n    </exponents>\n    <coefficients>\n      0.00183110\n      0.01395010\n      0.06844510\n      0.23271430\n      0.47019300\n      0.35852090\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      15.53961600\n      3.59993360\n      1.01376180\n    </exponents>\n    <scoefficients>\n      -0.11077750\n      -0.14802630\n      1.13076700\n    </scoefficients>\n    <pcoefficients>\n      0.07087430\n      0.33975280\n      0.72715860\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.27000580\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"F\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      7001.71309000\n      1051.36609000\n      239.28569000\n      67.39744530\n      21.51995730\n      7.40310130\n    </exponents>\n    <coefficients>\n      0.00181962\n      0.01391608\n      0.06840532\n      0.23318576\n      0.47126744\n      0.35661855\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      20.84795280\n      4.80830834\n      1.34406986\n    </exponents>\n    <scoefficients>\n      -0.10850698\n      -0.14645166\n      1.12868858\n    </scoefficients>\n    <pcoefficients>\n      0.07162872\n      0.34591210\n      0.72246996\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.35815139\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ne\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      8425.85153000\n      1268.51940000\n      289.62141400\n      81.85900400\n      26.25150790\n      9.09472051\n    </exponents>\n    <coefficients>\n      0.00188435\n      0.01433690\n      0.07010962\n      0.23737327\n      0.47300713\n      0.34840124\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      26.53213100\n      6.10175501\n      1.69627153\n    </exponents>\n    <scoefficients>\n      -0.10711829\n      -0.14616382\n      1.12777350\n    </scoefficients>\n    <pcoefficients>\n      0.07190959\n      0.34951337\n      0.71994051\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.44581870\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Na\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      9993.20000000\n      1499.89000000\n      341.95100000\n      94.67970000\n      29.73450000\n      10.00630000\n    </exponents>\n    <coefficients>\n      0.00193770\n      0.01480700\n      0.07270600\n      0.25262900\n      0.49324200\n      0.31316900\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      150.96300000\n      35.58780000\n      11.16830000\n      3.90201000\n      1.38177000\n      0.46638200\n    </exponents>\n    <scoefficients>\n      -0.00354210\n      -0.04395900\n      -0.10975210\n      0.18739800\n      0.64669900\n      0.30605800\n    </scoefficients>\n    <pcoefficients>\n      0.00500170\n      0.03551100\n      0.14282500\n      0.33862000\n      0.45157900\n      0.27327100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.49796600\n      0.08435300\n      0.06663500\n    </exponents>\n    <scoefficients>\n      -0.24850300\n      -0.13170400\n      1.23352000\n    </scoefficients>\n    <pcoefficients>\n      -0.02302300\n      0.95035900\n      0.05985800\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02595440\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.17500000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mg\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      11722.80000000\n      1759.93000000\n      400.84600000\n      112.80700000\n      35.99970000\n      12.18280000\n    </exponents>\n    <coefficients>\n      0.00197780\n      0.01511400\n      0.07391100\n      0.24919100\n      0.48792800\n      0.31966200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      189.18000000\n      45.21190000\n      14.35630000\n      5.13886000\n      1.90652000\n      0.70588700\n    </exponents>\n    <scoefficients>\n      -0.00323720\n      -0.04100800\n      -0.11260000\n      0.14863300\n      0.61649700\n      0.36482900\n    </scoefficients>\n    <pcoefficients>\n      0.00492810\n      0.03498900\n      0.14072500\n      0.33364200\n      0.44494000\n      0.26925400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.92934000\n      0.26903500\n      0.11737900\n    </exponents>\n    <scoefficients>\n      -0.21229000\n      -0.10798500\n      1.17584000\n    </scoefficients>\n    <pcoefficients>\n      -0.02241900\n      0.19227000\n      0.84618100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04210610\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.17500000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Al\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      13983.10000000\n      2098.75000000\n      477.70500000\n      134.36000000\n      42.87090000\n      14.51890000\n    </exponents>\n    <coefficients>\n      0.00194267\n      0.01485990\n      0.07284940\n      0.24683000\n      0.48725800\n      0.32349600\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      239.66800000\n      57.44190000\n      18.28590000\n      6.59914000\n      2.49049000\n      0.94454000\n    </exponents>\n    <scoefficients>\n      -0.00292619\n      -0.03740800\n      -0.11448700\n      0.11563500\n      0.61259500\n      0.39379900\n    </scoefficients>\n    <pcoefficients>\n      0.00460285\n      0.03319900\n      0.13628200\n      0.33047600\n      0.44914600\n      0.26570400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.27790000\n      0.39759000\n      0.16009500\n    </exponents>\n    <scoefficients>\n      -0.22760600\n      0.00144583\n      1.09279000\n    </scoefficients>\n    <pcoefficients>\n      -0.01751300\n      0.24453300\n      0.80493400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.05565770\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.32500000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Si\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      16115.90000000\n      2425.58000000\n      553.86700000\n      156.34000000\n      50.06830000\n      17.01780000\n    </exponents>\n    <coefficients>\n      0.00195948\n      0.01492880\n      0.07284780\n      0.24613000\n      0.48591400\n      0.32500200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      292.71800000\n      69.87310000\n      22.33630000\n      8.15039000\n      3.13458000\n      1.22543000\n    </exponents>\n    <scoefficients>\n      -0.00278094\n      -0.03571460\n      -0.11498500\n      0.09356340\n      0.60301700\n      0.41895900\n    </scoefficients>\n    <pcoefficients>\n      0.00443826\n      0.03266790\n      0.13472100\n      0.32867800\n      0.44964000\n      0.26137200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.72738000\n      0.57292200\n      0.22219200\n    </exponents>\n    <scoefficients>\n      -0.24463000\n      0.00431572\n      1.09818000\n    </scoefficients>\n    <pcoefficients>\n      -0.01779510\n      0.25353900\n      0.80066900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.07783690\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.45000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"P\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      19413.30000000\n      2909.42000000\n      661.36400000\n      185.75900000\n      59.19430000\n      20.03100000\n    </exponents>\n    <coefficients>\n      0.00185160\n      0.01420620\n      0.06999950\n      0.24007900\n      0.48476200\n      0.33520000\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      339.47800000\n      81.01010000\n      25.87800000\n      9.45221000\n      3.66566000\n      1.46746000\n    </exponents>\n    <scoefficients>\n      -0.00278217\n      -0.03604990\n      -0.11663100\n      0.09683280\n      0.61441800\n      0.40379800\n    </scoefficients>\n    <pcoefficients>\n      0.00456462\n      0.03369360\n      0.13975500\n      0.33936200\n      0.45092100\n      0.23858600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.15623000\n      0.74899700\n      0.28314500\n    </exponents>\n    <scoefficients>\n      -0.25292300\n      0.03285170\n      1.08125000\n    </scoefficients>\n    <pcoefficients>\n      -0.01776530\n      0.27405800\n      0.78542100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.09983170\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.55000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"S\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      21917.10000000\n      3301.49000000\n      754.14600000\n      212.71100000\n      67.98960000\n      23.05150000\n    </exponents>\n    <coefficients>\n      0.00186900\n      0.01423000\n      0.06969600\n      0.23848700\n      0.48330700\n      0.33807400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      423.73500000\n      100.71000000\n      32.15990000\n      11.80790000\n      4.63110000\n      1.87025000\n    </exponents>\n    <scoefficients>\n      -0.00237670\n      -0.03169300\n      -0.11331700\n      0.05609000\n      0.59225500\n      0.45500600\n    </scoefficients>\n    <pcoefficients>\n      0.00406100\n      0.03068100\n      0.13045200\n      0.32720500\n      0.45285100\n      0.25604200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.61584000\n      0.92216700\n      0.34128700\n    </exponents>\n    <scoefficients>\n      -0.25037400\n      0.06695700\n      1.05451000\n    </scoefficients>\n    <pcoefficients>\n      -0.01451100\n      0.31026300\n      0.75448300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.11716700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.65000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cl\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      25180.10000000\n      3780.35000000\n      860.47400000\n      242.14500000\n      77.33490000\n      26.24700000\n    </exponents>\n    <coefficients>\n      0.00183300\n      0.01403400\n      0.06909700\n      0.23745200\n      0.48303400\n      0.33985600\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      491.76500000\n      116.98400000\n      37.41530000\n      13.78340000\n      5.45215000\n      2.22588000\n    </exponents>\n    <scoefficients>\n      -0.00229740\n      -0.03071400\n      -0.11252800\n      0.04501600\n      0.58935300\n      0.46520600\n    </scoefficients>\n    <pcoefficients>\n      0.00398940\n      0.03031800\n      0.12988000\n      0.32795100\n      0.45352700\n      0.25215400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.18649000\n      1.14427000\n      0.42037700\n    </exponents>\n    <scoefficients>\n      -0.25183000\n      0.06158900\n      1.06018000\n    </scoefficients>\n    <pcoefficients>\n      -0.01429900\n      0.32357200\n      0.74350700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.14265700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.75000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ar\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      28348.30000000\n      4257.62000000\n      969.85700000\n      273.26300000\n      87.36950000\n      29.68670000\n    </exponents>\n    <coefficients>\n      0.00182526\n      0.01396860\n      0.06870730\n      0.23620400\n      0.48221400\n      0.34204300\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      575.89100000\n      136.81600000\n      43.80980000\n      16.20940000\n      6.46084000\n      2.65114000\n    </exponents>\n    <scoefficients>\n      -0.00215972\n      -0.02907750\n      -0.11082700\n      0.02769990\n      0.57761300\n      0.48868800\n    </scoefficients>\n    <pcoefficients>\n      0.00380665\n      0.02923050\n      0.12646700\n      0.32351000\n      0.45489600\n      0.25663000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.86028000\n      1.41373000\n      0.51664600\n    </exponents>\n    <scoefficients>\n      -0.25559200\n      0.03780660\n      1.08056000\n    </scoefficients>\n    <pcoefficients>\n      -0.01591970\n      0.32464600\n      0.74399000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.17388800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.85000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"K\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      31594.42000000\n      4744.33000000\n      1080.41900000\n      304.23380000\n      97.24586000\n      33.02495000\n    </exponents>\n    <coefficients>\n      0.00182801\n      0.01399403\n      0.06887129\n      0.23697600\n      0.48290400\n      0.34047950\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      622.76250000\n      147.88390000\n      47.32735000\n      17.51495000\n      6.92272200\n      2.76827700\n    </exponents>\n    <scoefficients>\n      -0.00250298\n      -0.03315550\n      -0.12263870\n      0.05353643\n      0.61938600\n      0.43458780\n    </scoefficients>\n    <pcoefficients>\n      0.00409464\n      0.03145199\n      0.13515580\n      0.33905000\n      0.46294550\n      0.22426380\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      11.84802000\n      4.07921100\n      1.76348100\n      0.78892700\n      0.35038700\n      0.14634400\n    </exponents>\n    <scoefficients>\n      0.01277689\n      0.20987670\n      -0.00309527\n      -0.55938840\n      -0.51347600\n      -0.06598035\n    </scoefficients>\n    <pcoefficients>\n      -0.01221377\n      -0.00690054\n      0.20074660\n      0.42813320\n      0.39701560\n      0.11047180\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.71680100\n      0.23374100\n      0.03867500\n    </exponents>\n    <scoefficients>\n      -0.05237772\n      -0.27985030\n      1.14154700\n    </scoefficients>\n    <pcoefficients>\n      0.03164300\n      -0.04046160\n      1.01202900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.01652100\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.20000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ca\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      35264.86000000\n      5295.50300000\n      1206.02000000\n      339.68390000\n      108.62640000\n      36.92103000\n    </exponents>\n    <coefficients>\n      0.00181350\n      0.01388493\n      0.06836162\n      0.23561880\n      0.48206390\n      0.34298190\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      706.30960000\n      167.81870000\n      53.82558000\n      20.01638000\n      7.97027900\n      3.21205900\n    </exponents>\n    <scoefficients>\n      0.00244823\n      0.03241504\n      0.12262190\n      -0.04316965\n      -0.61269950\n      -0.44875400\n    </scoefficients>\n    <pcoefficients>\n      0.00402037\n      0.03100601\n      0.13372790\n      0.33679830\n      0.46312810\n      0.22575320\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      14.19518000\n      4.88082800\n      2.16039000\n      0.98789900\n      0.44951700\n      0.18738700\n    </exponents>\n    <scoefficients>\n      0.01084500\n      0.20883330\n      0.03150338\n      -0.55265180\n      -0.54379970\n      -0.06669342\n    </scoefficients>\n    <pcoefficients>\n      -0.01289621\n      -0.01025198\n      0.19597810\n      0.43579330\n      0.39964520\n      0.09713636\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.03227100\n      0.38117100\n      0.06513100\n    </exponents>\n    <scoefficients>\n      -0.04439720\n      -0.32845630\n      1.16301000\n    </scoefficients>\n    <pcoefficients>\n      -0.42986210\n      0.00693583\n      0.97059330\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02601000\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.20000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sc\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      39088.98000000\n      5869.79200000\n      1336.91000000\n      376.60310000\n      120.46790000\n      40.98032000\n    </exponents>\n    <coefficients>\n      0.00180326\n      0.01380769\n      0.06800396\n      0.23470990\n      0.48156900\n      0.34456520\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      786.28520000\n      186.88700000\n      60.00935000\n      22.25883000\n      8.88514900\n      3.60921100\n    </exponents>\n    <scoefficients>\n      0.00245186\n      0.03259579\n      0.12382420\n      -0.04359890\n      -0.61771810\n      -0.44328230\n    </scoefficients>\n    <pcoefficients>\n      0.00403953\n      0.03122570\n      0.13498330\n      0.34247930\n      0.46231130\n      0.21775240\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      29.84355000\n      9.54238300\n      4.05679000\n      1.70470300\n      0.70623400\n      0.27953600\n    </exponents>\n    <scoefficients>\n      -0.00258630\n      0.07188424\n      0.25032600\n      -0.29910030\n      -0.74468180\n      -0.17997760\n    </scoefficients>\n    <pcoefficients>\n      -0.00609665\n      -0.02628884\n      0.05091001\n      0.37980970\n      0.51708830\n      0.18297720\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.06560900\n      0.42593300\n      0.07632000\n    </exponents>\n    <scoefficients>\n      0.06482978\n      0.32537560\n      -1.17080600\n    </scoefficients>\n    <pcoefficients>\n      -0.29384400\n      0.09235323\n      0.98479300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02959400\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      11.14701000\n      2.82104300\n      0.81962000\n    </exponents>\n    <coefficients>\n      0.08747672\n      0.37956350\n      0.71803930\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.22146800\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"F\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ti\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      43152.95000000\n      6479.57100000\n      1475.67500000\n      415.69910000\n      133.00060000\n      45.27222000\n    </exponents>\n    <coefficients>\n      0.00179187\n      0.01372392\n      0.06762830\n      0.23376420\n      0.48106960\n      0.34622800\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      874.68260000\n      207.97850000\n      66.87918000\n      24.87347000\n      9.96844100\n      4.06382600\n    </exponents>\n    <scoefficients>\n      0.00243101\n      0.03233027\n      0.12425200\n      -0.03903905\n      -0.61717890\n      -0.44730970\n    </scoefficients>\n    <pcoefficients>\n      0.00401768\n      0.03113966\n      0.13490770\n      0.34316720\n      0.46257600\n      0.21546030\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      33.64363000\n      10.87565000\n      4.62822500\n      1.95012600\n      0.80945200\n      0.32047400\n    </exponents>\n    <scoefficients>\n      -0.00294036\n      0.07163103\n      0.25289150\n      -0.29664010\n      -0.74322150\n      -0.18535200\n    </scoefficients>\n    <pcoefficients>\n      -0.00631162\n      -0.02697638\n      0.05316847\n      0.38455490\n      0.51276620\n      0.18111350\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.22414800\n      0.48426300\n      0.08409600\n    </exponents>\n    <scoefficients>\n      0.06351465\n      0.31514040\n      -1.16259500\n    </scoefficients>\n    <pcoefficients>\n      -0.21120700\n      0.07771998\n      0.98982140\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03203600\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      13.69085000\n      3.51315400\n      1.04043400\n    </exponents>\n    <coefficients>\n      0.08589418\n      0.37846710\n      0.71612390\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.28696200\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"F\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"V\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      47354.33000000\n      7110.78700000\n      1619.59100000\n      456.33790000\n      146.06060000\n      49.75791000\n    </exponents>\n    <coefficients>\n      0.00178451\n      0.01366754\n      0.06736122\n      0.23305520\n      0.48063160\n      0.34748020\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      968.14840000\n      230.28210000\n      74.14591000\n      27.64107000\n      11.11475000\n      4.54311300\n    </exponents>\n    <scoefficients>\n      0.00241060\n      0.03207243\n      0.12459420\n      -0.03482177\n      -0.61673740\n      -0.45098440\n    </scoefficients>\n    <pcoefficients>\n      0.00399501\n      0.03104061\n      0.13477470\n      0.34372790\n      0.46287590\n      0.21355470\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      37.64050000\n      12.28238000\n      5.23336600\n      2.20895000\n      0.91788000\n      0.36341200\n    </exponents>\n    <scoefficients>\n      -0.00323320\n      0.07130744\n      0.25438200\n      -0.29338870\n      -0.74156950\n      -0.19094100\n    </scoefficients>\n    <pcoefficients>\n      -0.00649406\n      -0.02753453\n      0.05516284\n      0.38796720\n      0.50902580\n      0.18038400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.39278100\n      0.54391300\n      0.09147600\n    </exponents>\n    <scoefficients>\n      0.06139703\n      0.30611300\n      -1.15489000\n    </scoefficients>\n    <pcoefficients>\n      -0.18912650\n      0.08005453\n      0.98773990\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03431200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      16.05025000\n      4.16006300\n      1.24326500\n    </exponents>\n    <coefficients>\n      0.08599899\n      0.38029960\n      0.71276590\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.34427700\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"F\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cr\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      51789.81000000\n      7776.84900000\n      1771.38500000\n      499.15880000\n      159.79820000\n      54.47021000\n    </exponents>\n    <coefficients>\n      0.00177618\n      0.01360476\n      0.06706925\n      0.23231040\n      0.48024100\n      0.34876530\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1064.32800000\n      253.21380000\n      81.60924000\n      30.48193000\n      12.29439000\n      5.03772200\n    </exponents>\n    <scoefficients>\n      0.00239967\n      0.03194886\n      0.12508680\n      -0.03221866\n      -0.61722840\n      -0.45259360\n    </scoefficients>\n    <pcoefficients>\n      0.00398700\n      0.03104662\n      0.13505180\n      0.34488650\n      0.46285710\n      0.21104260\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      41.56291000\n      13.67627000\n      5.84439000\n      2.47160900\n      1.02830800\n      0.40725000\n    </exponents>\n    <scoefficients>\n      -0.00345422\n      0.07218428\n      0.25448200\n      -0.29345340\n      -0.73854550\n      -0.19471570\n    </scoefficients>\n    <pcoefficients>\n      -0.00672250\n      -0.02806471\n      0.05820028\n      0.39169880\n      0.50478230\n      0.17902900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.57146400\n      0.60558000\n      0.09856100\n    </exponents>\n    <scoefficients>\n      0.05892219\n      0.29760550\n      -1.14750600\n    </scoefficients>\n    <pcoefficients>\n      -0.19301000\n      0.09605620\n      0.98176090\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03645900\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      18.41930000\n      4.81266100\n      1.44644700\n    </exponents>\n    <coefficients>\n      0.08650816\n      0.38266990\n      0.70937720\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.40041300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"F\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mn\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      56347.14000000\n      8460.94300000\n      1927.32500000\n      543.23430000\n      173.99050000\n      59.36005000\n    </exponents>\n    <coefficients>\n      0.00177158\n      0.01357081\n      0.06690605\n      0.23185410\n      0.47990460\n      0.34957370\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1165.41200000\n      277.32760000\n      89.47278000\n      33.48256000\n      13.54037000\n      5.55797200\n    </exponents>\n    <scoefficients>\n      0.00238875\n      0.03181708\n      0.12546700\n      -0.02955431\n      -0.61751600\n      -0.45444580\n    </scoefficients>\n    <pcoefficients>\n      0.00397732\n      0.03103112\n      0.13518940\n      0.34573870\n      0.46292050\n      0.20905920\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      45.83532000\n      15.18777000\n      6.50071000\n      2.75158300\n      1.14540400\n      0.45368700\n    </exponents>\n    <scoefficients>\n      -0.00366586\n      0.07231971\n      0.25444860\n      -0.29103800\n      -0.73598600\n      -0.19976170\n    </scoefficients>\n    <pcoefficients>\n      -0.00688758\n      -0.02846816\n      0.06031832\n      0.39389610\n      0.50137690\n      0.17922640\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.75799900\n      0.66702200\n      0.10512900\n    </exponents>\n    <scoefficients>\n      0.05628572\n      0.28974910\n      -1.14065300\n    </scoefficients>\n    <pcoefficients>\n      -0.50350240\n      0.23450110\n      0.91412570\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03841800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      20.94355000\n      5.51048600\n      1.66503800\n    </exponents>\n    <coefficients>\n      0.08672702\n      0.38418830\n      0.70690710\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.46173300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"F\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Fe\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      61132.62000000\n      9179.34200000\n      2090.85700000\n      589.24790000\n      188.75430000\n      64.44629000\n    </exponents>\n    <coefficients>\n      0.00176611\n      0.01353038\n      0.06673128\n      0.23148230\n      0.47970580\n      0.35019760\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1259.98000000\n      299.87610000\n      96.84917000\n      36.31020000\n      14.72996000\n      6.06607500\n    </exponents>\n    <scoefficients>\n      0.00243801\n      0.03224048\n      0.12657240\n      -0.03139902\n      -0.62075930\n      -0.45029140\n    </scoefficients>\n    <pcoefficients>\n      0.00402802\n      0.03144647\n      0.13683170\n      0.34872360\n      0.46179310\n      0.20430580\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      50.43485000\n      16.83929000\n      7.19208600\n      3.05342000\n      1.27364300\n      0.50409100\n    </exponents>\n    <scoefficients>\n      -0.00387326\n      0.07196598\n      0.25565910\n      -0.28828370\n      -0.73428220\n      -0.20493530\n    </scoefficients>\n    <pcoefficients>\n      -0.00701713\n      -0.02877660\n      0.06181383\n      0.39549460\n      0.49890590\n      0.17912510\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.95031600\n      0.73672100\n      0.11417700\n    </exponents>\n    <scoefficients>\n      0.05694869\n      0.28829150\n      -1.13815900\n    </scoefficients>\n    <pcoefficients>\n      -0.45937960\n      0.28521390\n      0.90764850\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04114800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      23.14994000\n      6.12236800\n      1.84660100\n    </exponents>\n    <coefficients>\n      0.08876935\n      0.38963190\n      0.70148160\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.50436100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"F\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Co\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      66148.99000000\n      9933.07700000\n      2262.81600000\n      637.91540000\n      204.41220000\n      69.82538000\n    </exponents>\n    <coefficients>\n      0.00175979\n      0.01348162\n      0.06649342\n      0.23079390\n      0.47929190\n      0.35140970\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1378.84100000\n      328.26940000\n      106.09460000\n      39.83275000\n      16.18622000\n      6.66778800\n    </exponents>\n    <scoefficients>\n      0.00237628\n      0.03167450\n      0.12628880\n      -0.02584552\n      -0.61834910\n      -0.45670080\n    </scoefficients>\n    <pcoefficients>\n      0.00397149\n      0.03108174\n      0.13574390\n      0.34768270\n      0.46263400\n      0.20516320\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      54.52355000\n      18.29783000\n      7.86734800\n      3.34053400\n      1.39375600\n      0.55132600\n    </exponents>\n    <scoefficients>\n      -0.00399300\n      0.07409663\n      0.25420000\n      -0.29216570\n      -0.73187030\n      -0.20407840\n    </scoefficients>\n    <pcoefficients>\n      -0.00729077\n      -0.02926027\n      0.06564150\n      0.40006520\n      0.49502360\n      0.17582400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.15194700\n      0.81106300\n      0.12101700\n    </exponents>\n    <scoefficients>\n      0.05379843\n      0.27599710\n      -1.12969200\n    </scoefficients>\n    <pcoefficients>\n      -0.21654960\n      0.12404880\n      0.97240640\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04303700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      25.59306000\n      6.80099000\n      2.05164700\n    </exponents>\n    <coefficients>\n      0.09004748\n      0.39317030\n      0.69768440\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.55567100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"F\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ni\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      71396.35000000\n      10720.84000000\n      2442.12900000\n      688.42650000\n      220.61530000\n      75.39373000\n    </exponents>\n    <coefficients>\n      0.00175300\n      0.01343122\n      0.06627041\n      0.23025080\n      0.47901860\n      0.35234440\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1492.53200000\n      355.40130000\n      114.95340000\n      43.22043000\n      17.59710000\n      7.25776500\n    </exponents>\n    <scoefficients>\n      0.00237071\n      0.03160566\n      0.12663350\n      -0.02417037\n      -0.61877750\n      -0.45767700\n    </scoefficients>\n    <pcoefficients>\n      0.00396755\n      0.03109479\n      0.13595170\n      0.34851360\n      0.46254980\n      0.20351860\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      59.35261000\n      20.02181000\n      8.61456100\n      3.66053100\n      1.52811100\n      0.60405700\n    </exponents>\n    <scoefficients>\n      -0.00416200\n      0.07425111\n      0.25413600\n      -0.29034770\n      -0.73021210\n      -0.20760570\n    </scoefficients>\n    <pcoefficients>\n      -0.00742145\n      -0.02953410\n      0.06731852\n      0.40166600\n      0.49266230\n      0.17568930\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.37927600\n      0.88583900\n      0.12852900\n    </exponents>\n    <scoefficients>\n      0.05157888\n      0.27076110\n      -1.12477000\n    </scoefficients>\n    <pcoefficients>\n      -0.18876630\n      0.10151990\n      0.97909060\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04519500\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      28.19147000\n      7.52358400\n      2.27122800\n    </exponents>\n    <coefficients>\n      0.09098881\n      0.39582080\n      0.69471540\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.61160300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"F\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cu\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      76794.38000000\n      11530.70000000\n      2626.57500000\n      740.49030000\n      237.35280000\n      81.15818000\n    </exponents>\n    <coefficients>\n      0.00174816\n      0.01339602\n      0.06610885\n      0.22982650\n      0.47876750\n      0.35307390\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1610.81400000\n      383.63670000\n      124.17330000\n      46.74678000\n      19.06569000\n      7.87156700\n    </exponents>\n    <scoefficients>\n      0.00236405\n      0.03153635\n      0.12694520\n      -0.02262840\n      -0.61920800\n      -0.45853930\n    </scoefficients>\n    <pcoefficients>\n      0.00396331\n      0.03110223\n      0.13613500\n      0.34929140\n      0.46247800\n      0.20201020\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      64.45732000\n      21.85212000\n      9.40534300\n      3.99916800\n      1.67029700\n      0.65962700\n    </exponents>\n    <scoefficients>\n      -0.00433108\n      0.07412307\n      0.25421080\n      -0.28748430\n      -0.72914360\n      -0.21139510\n    </scoefficients>\n    <pcoefficients>\n      -0.00752373\n      -0.02975687\n      0.06849654\n      0.40271410\n      0.49084900\n      0.17592680\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.60008800\n      0.96309400\n      0.13616100\n    </exponents>\n    <scoefficients>\n      0.05027577\n      0.26500400\n      -1.12015500\n    </scoefficients>\n    <pcoefficients>\n      -0.17029110\n      0.09310133\n      0.98143360\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04733200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      30.85341000\n      8.26498500\n      2.49533200\n    </exponents>\n    <coefficients>\n      0.09199905\n      0.39850210\n      0.69178970\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.66765800\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"F\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Zn\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      82400.94000000\n      12372.55000000\n      2818.35100000\n      794.57170000\n      254.72320000\n      87.13880000\n    </exponents>\n    <coefficients>\n      0.00174333\n      0.01335966\n      0.06594365\n      0.22941510\n      0.47854530\n      0.35377530\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1732.56900000\n      412.71490000\n      133.67800000\n      50.38585000\n      20.58358000\n      8.50594000\n    </exponents>\n    <scoefficients>\n      0.00236146\n      0.03150177\n      0.12727740\n      -0.02145928\n      -0.61976520\n      -0.45901800\n    </scoefficients>\n    <pcoefficients>\n      0.00396312\n      0.03113411\n      0.13639310\n      0.35012660\n      0.46231790\n      0.20049950\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      69.36492000\n      23.62082000\n      10.18471000\n      4.33408200\n      1.81091800\n      0.71484100\n    </exponents>\n    <scoefficients>\n      -0.00444010\n      0.07505253\n      0.25331110\n      -0.28818970\n      -0.72670520\n      -0.21334390\n    </scoefficients>\n    <pcoefficients>\n      -0.00768926\n      -0.02997982\n      0.07082411\n      0.40461410\n      0.48823250\n      0.17519700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.82384200\n      1.03954300\n      0.14326400\n    </exponents>\n    <scoefficients>\n      0.04898543\n      0.25927930\n      -1.11571100\n    </scoefficients>\n    <pcoefficients>\n      -0.15867630\n      0.08379327\n      0.98405470\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04929600\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      33.70764000\n      9.06110600\n      2.73838300\n    </exponents>\n    <coefficients>\n      0.09262648\n      0.40029800\n      0.68966080\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.73029400\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"F\" nprim=\"1\">\n    <exponents>\n      0.80000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<atomicguess symbol=\"H\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     0.16371      0.27762      0.00000      0.00000      0.00000 \n     0.27762      0.47079      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -0.25951      0.68500      1.89174      1.89174      1.89174 \n   </alphaeps>\n   <betaeps>\n    -0.49823      0.46093      1.63423      1.63423      1.63423 \n   </betaeps>\n   <alphavectors>\n     0.40461      1.26532      0.00000      0.00000      0.00000 \n     0.68614     -1.13753      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.42743      1.25780      0.00000      0.00000      0.00000 \n     0.66545     -1.14975      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"He\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     0.66346      0.61066      0.00000      0.00000      0.00000 \n     0.61066      0.56205      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -0.55639      1.08876      1.80019      1.80019      1.80019 \n   </alphaeps>\n   <betaeps>\n    -0.55639      1.08876      1.80019      1.80019      1.80019 \n   </betaeps>\n   <alphavectors>\n     0.57596      1.15798      0.00000     -0.00000      0.00000 \n     0.53012     -1.17967     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      1.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      1.00000 \n    -0.00000      0.00000      0.00000      1.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.57596      1.15798      0.00000      0.00000      0.00000 \n     0.53012     -1.17967      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Li\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.03094      0.14527      0.00000      0.00000      0.00000     -0.21791      0.00000      0.00000      0.00000     -0.04126      0.00000      0.00000     -0.04126      0.00000     -0.04126 \n     0.14527      0.13288      0.00000      0.00000      0.00000      0.21240      0.00000      0.00000      0.00000      0.00148      0.00000      0.00000      0.00148      0.00000      0.00148 \n     0.00000      0.00000      0.00101      0.00000      0.00000      0.00000      0.00094      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00101      0.00000      0.00000      0.00000      0.00094      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00101      0.00000      0.00000      0.00000      0.00094      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.21791      0.21240      0.00000      0.00000      0.00000      0.44786      0.00000      0.00000      0.00000      0.01269      0.00000      0.00000      0.01269      0.00000      0.01269 \n     0.00000      0.00000      0.00094      0.00000      0.00000      0.00000      0.00088      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00094      0.00000      0.00000      0.00000      0.00088      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00094      0.00000      0.00000      0.00000      0.00088      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04126      0.00148      0.00000      0.00000      0.00000      0.01269      0.00000      0.00000      0.00000      0.00100      0.00000      0.00000      0.00100      0.00000      0.00100 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04126      0.00148      0.00000      0.00000      0.00000      0.01269      0.00000      0.00000      0.00000      0.00100      0.00000      0.00000      0.00100      0.00000      0.00100 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04126      0.00148      0.00000      0.00000      0.00000      0.01269      0.00000      0.00000      0.00000      0.00100      0.00000      0.00000      0.00100      0.00000      0.00100 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.98980      0.00340      0.00340      0.00340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -1.85432     -0.11482     -0.04376     -0.04376     -0.04376      0.09140      0.09140      0.09140      0.10621      0.39683      0.39683      0.39683      0.39683      0.39683      1.05535 \n   </alphaeps>\n   <betaeps>\n    -1.84652     -0.07513     -0.01166     -0.01166     -0.01166      0.11423      0.11423      0.11423      0.12990      0.44930      0.44930      0.44930      0.44930      0.44930      1.08503 \n   </betaeps>\n   <alphavectors>\n     0.99755     -0.20185     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.07826      0.00000      0.00000      0.00000      0.00000     -0.00000      0.10707 \n     0.10978      0.33380      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      3.14909      0.00000     -0.00000      0.00000      0.00000     -0.00000      9.44268 \n    -0.00000     -0.00000     -0.00000      0.54614     -0.00000      0.00000      0.00000      1.58280      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.54614      0.00000     -0.00000      1.58280      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.54614     -0.00000      1.58280      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.04374      0.66999      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -2.54635     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -2.94010 \n    -0.00000     -0.00000     -0.00000      0.50727      0.00000      0.00000      0.00000     -1.59568      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.50727     -0.00000      0.00000     -1.59568      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.50727     -0.00000     -1.59568      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.01949      0.01672      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.26982     -0.00000      0.00000     -0.00000      0.95381     -0.30040     -3.13641 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000 \n    -0.01949      0.01672      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.26982     -0.00000      0.00000     -0.00000     -0.73706     -0.67582     -3.13641 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01949      0.01672      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.26982     -0.00000      0.00000     -0.00000     -0.21675      0.97623     -3.13641 \n   </alphavectors>\n   <betavectors>\n     0.99775     -0.20469     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06663      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.10763 \n     0.10268      0.16318      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      3.28256     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      9.40171 \n    -0.00000     -0.00000      0.35434     -0.00000     -0.00000     -0.00000      0.00000      1.63645     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.35434      1.63645     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.35434      0.00000      0.00000      1.63645      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.04051      0.83272      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -2.52873      0.00000     -0.00000      0.00000      0.00000      0.00000     -2.91365 \n    -0.00000     -0.00000      0.69315      0.00000      0.00000     -0.00000      0.00000     -1.52416      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.69315     -1.52416     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.69315     -0.00000      0.00000     -1.52416      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01852      0.01778      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.30707      0.00000     -0.00000      0.00000     -0.64387     -0.76513     -3.13298 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000      0.00000 \n    -0.01852      0.01778      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.30707      0.00000     -0.00000      0.00000      0.98456     -0.17504     -3.13298 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000 \n    -0.01852      0.01778      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.30707      0.00000     -0.00000      0.00000     -0.34069      0.94018     -3.13298 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Be\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.07618      0.10472      0.00000      0.00000      0.00000     -0.39994      0.00000      0.00000      0.00000     -0.06679      0.00000      0.00000     -0.06679      0.00000     -0.06679 \n     0.10472      0.18725      0.00000      0.00000      0.00000      0.41925      0.00000      0.00000      0.00000     -0.00402      0.00000      0.00000     -0.00402      0.00000     -0.00402 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.39994      0.41925      0.00000      0.00000      0.00000      1.13815      0.00000      0.00000      0.00000      0.01129      0.00000      0.00000      0.01129      0.00000      0.01129 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.06679     -0.00402      0.00000      0.00000      0.00000      0.01129      0.00000      0.00000      0.00000      0.00215      0.00000      0.00000      0.00215      0.00000      0.00215 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.06679     -0.00402      0.00000      0.00000      0.00000      0.01129      0.00000      0.00000      0.00000      0.00215      0.00000      0.00000      0.00215      0.00000      0.00215 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.06679     -0.00402      0.00000      0.00000      0.00000      0.01129      0.00000      0.00000      0.00000      0.00215      0.00000      0.00000      0.00215      0.00000      0.00215 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -3.83264     -0.19637     -0.06345     -0.06345     -0.06345      0.25506      0.25506      0.25506      0.28986      0.81581      0.81581      0.81581      0.81581      0.81581      2.51100 \n   </alphaeps>\n   <betaeps>\n    -3.83264     -0.19637     -0.06345     -0.06345     -0.06345      0.25506      0.25506      0.25506      0.28986      0.81581      0.81581      0.81581      0.81581      0.81581      2.51100 \n   </betaeps>\n   <alphavectors>\n     0.99129     -0.23544      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.01681     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.32247 \n     0.11970      0.28160     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.21615      0.00000     -0.00000      0.00000     -0.00000     -0.00000      6.68370 \n    -0.00000      0.00000     -0.00000     -0.00000      0.50234      1.24830      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.50234     -0.00000     -0.00000      0.00000      1.24830     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.50234      0.00000     -0.00000      0.00000      1.24830      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.02264      0.75403     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.91482     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.41913 \n    -0.00000      0.00000     -0.00000     -0.00000      0.59158     -1.20856      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.59158      0.00000      0.00000     -0.00000     -1.20856      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.59158      0.00000     -0.00000      0.00000     -1.20856      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.03214      0.00652     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.08495     -0.00000     -0.73727      0.00000     -0.00000     -0.67560     -2.84424 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000 \n    -0.03214      0.00652     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.08495     -0.00000      0.95372     -0.00000      0.00000     -0.30069     -2.84424 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.03214      0.00652     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.08495     -0.00000     -0.21645      0.00000     -0.00000      0.97629     -2.84424 \n   </alphavectors>\n   <betavectors>\n     0.99129     -0.23544      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01681      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.32247 \n     0.11970      0.28160     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      2.21615      0.00000      0.00000      0.00000      0.00000     -0.00000      6.68370 \n    -0.00000      0.00000     -0.00000      0.00000      0.50234      1.24830      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.50234     -0.00000      0.00000      0.00000      1.24830     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.50234     -0.00000      0.00000     -0.00000      1.24830      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.02264      0.75403     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.91482     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.41913 \n    -0.00000      0.00000     -0.00000      0.00000      0.59158     -1.20856      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.59158      0.00000     -0.00000     -0.00000     -1.20856      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.59158      0.00000     -0.00000      0.00000     -1.20856      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.03214      0.00652     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.08495     -0.00000     -0.00000     -0.00000      0.93134     -0.36415     -2.84424 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.03214      0.00652     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.08495     -0.00000     -0.00000     -0.00000     -0.78104     -0.62449     -2.84424 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000 \n    -0.03214      0.00652     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.08495     -0.00000     -0.00000     -0.00000     -0.15030      0.98864     -2.84424 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"B\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.07338     -0.02369      0.00000      0.00000      0.00000     -0.34738      0.00000      0.00000      0.00000     -0.04212      0.00000      0.00000     -0.04212      0.00000     -0.04212 \n    -0.02369      0.32135      0.00000      0.00000      0.00000      0.52286      0.00000      0.00000      0.00000     -0.00362      0.00000      0.00000     -0.00362      0.00000     -0.00362 \n     0.00000      0.00000      0.11920      0.00000      0.00000      0.00000      0.10187      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.11921      0.00000      0.00000      0.00000      0.10188      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.11920      0.00000      0.00000      0.00000      0.10187      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.34738      0.52286      0.00000      0.00000      0.00000      0.90015      0.00000      0.00000      0.00000      0.00035      0.00000      0.00000      0.00035      0.00000      0.00035 \n     0.00000      0.00000      0.10187      0.00000      0.00000      0.00000      0.08706      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.10188      0.00000      0.00000      0.00000      0.08707      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.10187      0.00000      0.00000      0.00000      0.08706      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04212     -0.00362      0.00000      0.00000      0.00000      0.00035      0.00000      0.00000      0.00000      0.00091      0.00000      0.00000      0.00091      0.00000      0.00091 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04212     -0.00362      0.00000      0.00000      0.00000      0.00035      0.00000      0.00000      0.00000      0.00091      0.00000      0.00000      0.00091      0.00000      0.00091 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04212     -0.00362      0.00000      0.00000      0.00000      0.00035      0.00000      0.00000      0.00000      0.00091      0.00000      0.00000      0.00091      0.00000      0.00091 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.33334      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -6.53603     -0.34423     -0.13058     -0.13058     -0.13058      0.36424      0.36424      0.36424      0.40435      1.18507      1.18507      1.18507      1.18507      1.18507      3.16630 \n   </alphaeps>\n   <betaeps>\n    -6.52458     -0.30050     -0.08952     -0.08952     -0.08952      0.39662      0.39662      0.39662      0.43670      1.23592      1.23592      1.23592      1.23592      1.23592      3.21136 \n   </betaeps>\n   <alphavectors>\n     0.98838     -0.24375      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.06226      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.46892 \n     0.08778      0.40651      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.70586     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      4.25699 \n    -0.00000      0.00000      0.00000      0.59801      0.00000     -0.00000      1.13086     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.59801     -0.00000     -0.00000      1.13086      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.59801      0.00000      0.00000      1.13086     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01133      0.65428     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.78116      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.33454 \n    -0.00000      0.00000      0.00000      0.51107     -0.00000      0.00000     -1.17272     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.51107     -0.00000     -0.00000     -1.17272     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.51107     -0.00000     -0.00000     -1.17272     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02254      0.00093      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.07011     -0.50000      0.00000     -0.00000      0.86603     -0.00000     -2.04128 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000 \n    -0.02254      0.00093     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.07011      1.00000     -0.00000      0.00000     -0.00000      0.00000     -2.04128 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000      0.00000 \n    -0.02254      0.00093      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.07011     -0.50000      0.00000     -0.00000     -0.86603      0.00000     -2.04128 \n   </alphavectors>\n   <betavectors>\n     0.98928     -0.24165      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.06462      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.46778 \n     0.08053      0.37671     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.70240     -0.00000      0.00000      0.00000      0.00000      0.00000      4.26126 \n     0.00000     -0.00000      0.00000      0.56352      0.00000      1.14844      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.56352     -0.00000     -0.00000      1.14844     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.56352     -0.00000      0.00000     -0.00000      1.14844      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.01083      0.68689     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.76973     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.32986 \n     0.00000     -0.00000      0.00000      0.54631     -0.00000     -1.15672      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.54632     -0.00000     -0.00000     -1.15672     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.54631      0.00000     -0.00000      0.00000     -1.15672     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.02009     -0.00106      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.07522      0.86603     -0.00000     -0.00000     -0.00000     -0.50000     -2.04113 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000 \n    -0.02009     -0.00106      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.07522      0.00000     -0.00000     -0.00000     -0.00000      1.00000     -2.04113 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000 \n    -0.02009     -0.00106      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.07522     -0.86603      0.00000      0.00000      0.00000     -0.50000     -2.04113 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"C\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.07205     -0.09518      0.00000      0.00000      0.00000     -0.30287      0.00000      0.00000      0.00000     -0.02907      0.00000      0.00000     -0.02907      0.00000     -0.02907 \n    -0.09518      0.47659      0.00000      0.00000      0.00000      0.59844      0.00000      0.00000      0.00000     -0.01600      0.00000      0.00000     -0.01600      0.00000     -0.01600 \n     0.00000      0.00000      0.28909      0.00000      0.00000      0.00000      0.20446      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.28909      0.00000      0.00000      0.00000      0.20446      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.28909      0.00000      0.00000      0.00000      0.20445      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.30287      0.59844      0.00000      0.00000      0.00000      0.77503      0.00000      0.00000      0.00000     -0.01743      0.00000      0.00000     -0.01743      0.00000     -0.01743 \n     0.00000      0.00000      0.20446      0.00000      0.00000      0.00000      0.14460      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.20446      0.00000      0.00000      0.00000      0.14460      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.20445      0.00000      0.00000      0.00000      0.14459      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02907     -0.01600      0.00000      0.00000      0.00000     -0.01743      0.00000      0.00000      0.00000      0.00106      0.00000      0.00000      0.00106      0.00000      0.00106 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02907     -0.01600      0.00000      0.00000      0.00000     -0.01743      0.00000      0.00000      0.00000      0.00106      0.00000      0.00000      0.00106      0.00000      0.00106 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02907     -0.01600      0.00000      0.00000      0.00000     -0.01743      0.00000      0.00000      0.00000      0.00106      0.00000      0.00000      0.00106      0.00000      0.00106 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.66667      0.66667      0.66666      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -9.92455     -0.51599     -0.20826     -0.20826     -0.20826      0.46221      0.46221      0.46221      0.51998      1.56921      1.56921      1.56921      1.56921      1.56921      3.65722 \n   </alphaeps>\n   <betaeps>\n    -9.89249     -0.41772     -0.11505     -0.11505     -0.11505      0.53197      0.53197      0.53197      0.58743      1.67872      1.67872      1.67872      1.67872      1.67872      3.75919 \n   </betaeps>\n   <alphavectors>\n     0.98892     -0.24006      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.05645      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.43926 \n     0.07285      0.50862     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.46959     -0.00000     -0.00000      0.00000      0.00000      0.00000      3.22735 \n    -0.00000      0.00000      0.65851      0.00000     -0.00000     -0.00000      1.02324     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.65851     -0.00000      1.02324      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.65851      0.00000      0.00000      1.02324     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00331      0.59452     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.65582     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.72265 \n    -0.00000      0.00000      0.46572     -0.00000      0.00000      0.00000     -1.12417      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.46572      0.00000     -1.12417      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.46572      0.00000      0.00000     -1.12417     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.01983     -0.01297      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.10270      0.00000      0.86603      0.00000     -0.00000     -0.50000     -1.74034 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000 \n    -0.01983     -0.01297      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.10270     -0.00000     -0.86603     -0.00000      0.00000     -0.50000     -1.74034 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000 \n    -0.01983     -0.01297      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.10270     -0.00000     -0.00000     -0.00000      0.00000      1.00000     -1.74034 \n   </alphavectors>\n   <betavectors>\n     0.99033     -0.23601     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05996     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.43782 \n     0.06328      0.45671      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.46264      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      3.23845 \n    -0.00000      0.00000      0.00000      0.59829     -0.00000     -0.00000      1.05957     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.59829     -0.00000     -0.00000      1.05957      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.59829      0.00000      0.00000      1.05957     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00368      0.64927      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.64009      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.71132 \n    -0.00000      0.00000      0.00000      0.52990      0.00000      0.00000     -1.09538      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.52990      0.00000      0.00000     -1.09538      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.52989      0.00000      0.00000     -1.09538     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.01631     -0.01516     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.11472     -0.00000      0.86603     -0.00000     -0.00000     -0.50000     -1.73961 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000      0.00000      0.00000 \n    -0.01631     -0.01516     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.11472      0.00000     -0.86603      0.00000      0.00000     -0.50000     -1.73961 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000 \n    -0.01631     -0.01516     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.11472     -0.00000     -0.00000      0.00000      0.00000      1.00000     -1.73961 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"N\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.07179     -0.14952      0.00000      0.00000      0.00000     -0.26416      0.00000      0.00000      0.00000     -0.02120      0.00000      0.00000     -0.02120      0.00000     -0.02120 \n    -0.14952      0.51509      0.00000      0.00000      0.00000      0.59979      0.00000      0.00000      0.00000     -0.00843      0.00000      0.00000     -0.00843      0.00000     -0.00843 \n     0.00000      0.00000      0.47933      0.00000      0.00000      0.00000      0.30924      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.47933      0.00000      0.00000      0.00000      0.30924      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.47933      0.00000      0.00000      0.00000      0.30924      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.26416      0.59979      0.00000      0.00000      0.00000      0.71356      0.00000      0.00000      0.00000     -0.00923      0.00000      0.00000     -0.00923      0.00000     -0.00923 \n     0.00000      0.00000      0.30924      0.00000      0.00000      0.00000      0.19951      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.30924      0.00000      0.00000      0.00000      0.19951      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.30924      0.00000      0.00000      0.00000      0.19951      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02120     -0.00843      0.00000      0.00000      0.00000     -0.00923      0.00000      0.00000      0.00000      0.00044      0.00000      0.00000      0.00044      0.00000      0.00044 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02120     -0.00843      0.00000      0.00000      0.00000     -0.00923      0.00000      0.00000      0.00000      0.00044      0.00000      0.00000      0.00044      0.00000      0.00044 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02120     -0.00843      0.00000      0.00000      0.00000     -0.00923      0.00000      0.00000      0.00000      0.00044      0.00000      0.00000      0.00044      0.00000      0.00044 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -13.99661     -0.71001     -0.29529     -0.29529     -0.29529      0.57114      0.57114      0.57114      0.58143      1.57340      1.57340      1.57340      1.57340      1.57340      3.06817 \n   </alphaeps>\n   <betaeps>\n   -13.93542     -0.54921     -0.14148     -0.14148     -0.14148      0.67489      0.68275      0.68275      0.68275      1.72401      1.72401      1.72401      1.72401      1.72401      3.21550 \n   </betaeps>\n   <alphavectors>\n     0.98994     -0.23592     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.02045     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.39844 \n     0.04663      0.53693      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.24942      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.49868 \n    -0.00000     -0.00000     -0.00000      0.69234     -0.00000      0.00000     -0.00000     -0.94335      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.69234     -0.00000     -0.94335      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.69234      0.00000     -0.00000     -0.94335      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00817      0.55908      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.78804     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.44586 \n    -0.00000     -0.00000     -0.00000      0.44666      0.00000     -0.00000      0.00000      1.08154      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.44666      0.00000      1.08154      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.44666     -0.00000      0.00000      1.08154      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.01384     -0.00488     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.24814      0.91903     -0.00000     -0.00000      0.00000     -0.39418     -1.29655 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000 \n    -0.01384     -0.00488     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.24814     -0.80089      0.00000      0.00000     -0.00000     -0.59882     -1.29655 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000 \n    -0.01384     -0.00488     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.24814     -0.11815      0.00000      0.00000     -0.00000      0.99300     -1.29655 \n   </alphavectors>\n   <betavectors>\n     0.99141     -0.23078      0.00000      0.00000     -0.00000      0.02278     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.39766 \n     0.04032      0.47222     -0.00000     -0.00000     -0.00000     -1.24583      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.52343 \n    -0.00000      0.00000     -0.00000      0.61489     -0.00000     -0.00000      0.00000     -0.00000      0.99557     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.61489     -0.00000     -0.00000      0.99557      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.61489      0.00000      0.00000      0.00000      0.99557     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00582      0.63316     -0.00000     -0.00000      0.00000      1.78610     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.41745 \n    -0.00000      0.00000     -0.00000      0.53150      0.00000      0.00000     -0.00000      0.00000     -1.04247      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.53150     -0.00000     -0.00000     -1.04247      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.53150     -0.00000     -0.00000     -0.00000     -1.04247      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.01105     -0.00999      0.00000      0.00000      0.00000     -0.27063      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.40540     -0.00000      0.91414     -1.29204 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.01105     -0.00999      0.00000      0.00000      0.00000     -0.27063      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.99437      0.00000     -0.10599     -1.29204 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.01105     -0.00999      0.00000      0.00000     -0.00000     -0.27063      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.58897     -0.00000     -0.80815     -1.29204 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"O\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.07731     -0.19285      0.00000      0.00000      0.00000     -0.23455      0.00000      0.00000      0.00000     -0.02166      0.00000      0.00000     -0.02166      0.00000     -0.02166 \n    -0.19285      0.58395      0.00000      0.00000      0.00000      0.59262      0.00000      0.00000      0.00000     -0.00019      0.00000      0.00000     -0.00019      0.00000     -0.00019 \n     0.00000      0.00000      0.64608      0.00000      0.00000      0.00000      0.41628      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.64610      0.00000      0.00000      0.00000      0.41630      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.64608      0.00000      0.00000      0.00000      0.41628      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.23455      0.59262      0.00000      0.00000      0.00000      0.60579      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00005      0.00000      0.00005 \n     0.00000      0.00000      0.41628      0.00000      0.00000      0.00000      0.26969      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.41630      0.00000      0.00000      0.00000      0.26970      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.41628      0.00000      0.00000      0.00000      0.26969      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02166     -0.00019      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00024      0.00000      0.00000      0.00024      0.00000      0.00024 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02166     -0.00019      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00024      0.00000      0.00000      0.00024      0.00000      0.00024 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02166     -0.00019      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00024      0.00000      0.00000      0.00024      0.00000      0.00024 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.33337      0.33331      0.33331      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -18.76520     -0.89475     -0.35776     -0.35776     -0.35776      0.64506      0.74513      0.74513      0.74513      1.63882      1.63882      1.63883      1.63883      1.63883      3.04010 \n   </alphaeps>\n   <betaeps>\n   -18.71499     -0.78184     -0.24791     -0.24790     -0.24790      0.69809      0.82019      0.82019      0.82019      1.72429      1.72429      1.72429      1.72429      1.72429      3.13027 \n   </betaeps>\n   <alphavectors>\n     0.99083     -0.23850     -0.00000      0.00000      0.00000     -0.00930     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.40419 \n     0.03274      0.55824      0.00000     -0.00000     -0.00000     -1.33035      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.66086 \n     0.00000      0.00000      0.00000      0.70662     -0.00000     -0.00000     -0.91473      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.70662     -0.00000     -0.00000      0.00000     -0.91473     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.70662      0.00000      0.00000     -0.00000     -0.00000     -0.91473      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.01405      0.52651      0.00000     -0.00000      0.00000      2.22576     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.21075 \n     0.00000      0.00000      0.00000      0.43699      0.00000      0.00000      1.07009      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.43699     -0.00000     -0.00000      0.00000      1.07009     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.43699     -0.00000     -0.00000      0.00000      0.00000      1.07009      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.01150      0.00240      0.00000     -0.00000      0.00000     -0.41561      0.00000      0.00000     -0.00000      0.86603      0.00000     -0.00000     -0.00000     -0.50000     -1.31340 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000 \n    -0.01150      0.00240      0.00000     -0.00000     -0.00000     -0.41561      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.00000     -1.31340 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000 \n    -0.01150      0.00240      0.00000     -0.00000     -0.00000     -0.41561      0.00000      0.00000     -0.00000     -0.86603     -0.00000      0.00000      0.00000     -0.50000     -1.31340 \n   </alphavectors>\n   <betavectors>\n     0.99159     -0.23544      0.00000      0.00000      0.00000     -0.00903      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.40414 \n     0.03052      0.51992     -0.00000     -0.00000     -0.00000     -1.33558     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.68136 \n     0.00000      0.00000      0.00000      0.66357      0.00000     -0.00000      0.00000     -0.94643      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.66357     -0.00000     -0.00000      0.00000     -0.94642     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.66357      0.00000     -0.00000     -0.00000     -0.94643      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.01209      0.57292     -0.00000     -0.00000     -0.00000      2.24037     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.18430 \n     0.00000      0.00000      0.00000      0.48600     -0.00000      0.00000     -0.00000      1.04874     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.48600     -0.00000     -0.00000      0.00000      1.04874      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.48600     -0.00000      0.00000      0.00000      1.04874     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01016     -0.00162     -0.00000      0.00000      0.00000     -0.43288      0.00000      0.00000     -0.00000     -0.50000     -0.00000      0.00000      0.86603     -0.00000     -1.30782 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000 \n    -0.01016     -0.00162     -0.00000      0.00000      0.00000     -0.43288      0.00000      0.00000     -0.00000      1.00000      0.00000     -0.00000      0.00000     -0.00000     -1.30782 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000 \n    -0.01016     -0.00162      0.00000      0.00000      0.00000     -0.43288      0.00000      0.00000     -0.00000     -0.50000     -0.00000      0.00000     -0.86603      0.00000     -1.30782 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"F\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.08217     -0.21577      0.00000      0.00000      0.00000     -0.21242      0.00000      0.00000      0.00000     -0.02883      0.00000      0.00000     -0.02883      0.00000     -0.02883 \n    -0.21577      0.57366      0.00000      0.00000      0.00000      0.57260      0.00000      0.00000      0.00000      0.01117      0.00000      0.00000      0.01117      0.00000      0.01117 \n     0.00000      0.00000      0.78797      0.00000      0.00000      0.00000      0.52671      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.78798      0.00000      0.00000      0.00000      0.52672      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.78798      0.00000      0.00000      0.00000      0.52672      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.21242      0.57260      0.00000      0.00000      0.00000      0.57249      0.00000      0.00000      0.00000      0.01104      0.00000      0.00000      0.01104      0.00000      0.01104 \n     0.00000      0.00000      0.52671      0.00000      0.00000      0.00000      0.35247      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.52672      0.00000      0.00000      0.00000      0.35247      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.52672      0.00000      0.00000      0.00000      0.35247      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02883      0.01117      0.00000      0.00000      0.00000      0.01104      0.00000      0.00000      0.00000      0.00053      0.00000      0.00000      0.00053      0.00000      0.00053 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02883      0.01117      0.00000      0.00000      0.00000      0.01104      0.00000      0.00000      0.00000      0.00053      0.00000      0.00000      0.00053      0.00000      0.00053 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02883      0.01117      0.00000      0.00000      0.00000      0.01104      0.00000      0.00000      0.00000      0.00053      0.00000      0.00000      0.00053      0.00000      0.00053 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.66667      0.66667      0.66666      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -24.17884     -1.07699     -0.40145     -0.40145     -0.40145      0.82180      1.04493      1.04493      1.04493      1.72721      1.72721      1.72721      1.72721      1.72721      3.24114 \n   </alphaeps>\n   <betaeps>\n   -24.14962     -1.01785     -0.34307     -0.34307     -0.34307      0.84670      1.08502      1.08502      1.08502      1.76352      1.76352      1.76352      1.76352      1.76352      3.28016 \n   </betaeps>\n   <alphavectors>\n     0.99117     -0.24204     -0.00000      0.00000      0.00000     -0.08274      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.49619 \n     0.02176      0.54421      0.00000     -0.00000      0.00000     -1.86089      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.54367 \n    -0.00000      0.00000      0.00000     -0.00000      0.69449      0.00000      0.00000     -0.00000     -0.92204      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.69449      0.00000     -0.00000     -0.92204      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.69449     -0.00000     -0.00000     -0.00000     -0.00000     -0.92204     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.02378      0.52179      0.00000     -0.00000     -0.00000      3.52317     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      4.36013 \n    -0.00000      0.00000      0.00000     -0.00000      0.45185      0.00000      0.00000     -0.00000      1.06222      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.45185     -0.00000      0.00000      1.06222      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.45185      0.00000      0.00000      0.00000      0.00000      1.06222      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.01222      0.01269      0.00000     -0.00000      0.00000     -0.83571      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.00000     -1.87778 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000 \n    -0.01222      0.01269      0.00000     -0.00000     -0.00000     -0.83571      0.00000      0.00000      0.00000      0.86603      0.00000      0.00000     -0.00000     -0.50000     -1.87778 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000 \n    -0.01222      0.01269      0.00000     -0.00000      0.00000     -0.83571      0.00000      0.00000     -0.00000     -0.86603     -0.00000     -0.00000      0.00000     -0.50000     -1.87778 \n   </alphavectors>\n   <betavectors>\n     0.99150     -0.24104     -0.00000      0.00000     -0.00000     -0.08392      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.49583 \n     0.02133      0.52590      0.00000     -0.00000      0.00000     -1.87040      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.52888 \n    -0.00000     -0.00000     -0.00000      0.00000      0.67712     -0.00000     -0.00000      0.00000     -0.93487     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.67712      0.00000     -0.00000     -0.00000     -0.93487      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.67712      0.00000      0.00000     -0.00000     -0.93487     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.02233      0.54696      0.00000     -0.00000      0.00000      3.54835     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      4.33658 \n    -0.00000     -0.00000     -0.00000      0.00000      0.47165     -0.00000     -0.00000      0.00000      1.05358      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.47165     -0.00000      0.00000      0.00000      1.05358      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.47165     -0.00000     -0.00000      0.00000      1.05358      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.01155      0.00909      0.00000     -0.00000      0.00000     -0.84913      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.00000     -1.87178 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000      0.00000 \n    -0.01155      0.00909      0.00000     -0.00000      0.00000     -0.84913      0.00000     -0.00000     -0.00000      0.86603     -0.00000      0.00000      0.00000     -0.50000     -1.87178 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01155      0.00909      0.00000     -0.00000      0.00000     -0.84913      0.00000     -0.00000      0.00000     -0.86603      0.00000     -0.00000     -0.00000     -0.50000     -1.87178 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ne\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.08871     -0.23208      0.00000      0.00000      0.00000     -0.21494      0.00000      0.00000      0.00000     -0.02611      0.00000      0.00000     -0.02611      0.00000     -0.02611 \n    -0.23208      0.57740      0.00000      0.00000      0.00000      0.57982      0.00000      0.00000      0.00000      0.00973      0.00000      0.00000      0.00973      0.00000      0.00973 \n     0.00000      0.00000      0.95502      0.00000      0.00000      0.00000      0.63355      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.95502      0.00000      0.00000      0.00000      0.63355      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.95502      0.00000      0.00000      0.00000      0.63355      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.21494      0.57982      0.00000      0.00000      0.00000      0.58242      0.00000      0.00000      0.00000      0.00957      0.00000      0.00000      0.00957      0.00000      0.00957 \n     0.00000      0.00000      0.63355      0.00000      0.00000      0.00000      0.42030      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.63355      0.00000      0.00000      0.00000      0.42030      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.63355      0.00000      0.00000      0.00000      0.42030      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02611      0.00973      0.00000      0.00000      0.00000      0.00957      0.00000      0.00000      0.00000      0.00041      0.00000      0.00000      0.00041      0.00000      0.00041 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02611      0.00973      0.00000      0.00000      0.00000      0.00957      0.00000      0.00000      0.00000      0.00041      0.00000      0.00000      0.00041      0.00000      0.00041 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02611      0.00973      0.00000      0.00000      0.00000      0.00957      0.00000      0.00000      0.00000      0.00041      0.00000      0.00000      0.00041      0.00000      0.00041 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -30.27375     -1.27466     -0.44526     -0.44526     -0.44526      1.34293      1.34293      1.34293      1.52858      1.81261      1.81261      1.81261      1.81261      1.81261      5.49952 \n   </alphaeps>\n   <betaeps>\n   -30.27375     -1.27466     -0.44526     -0.44526     -0.44526      1.34293      1.34293      1.34293      1.52858      1.81261      1.81261      1.81261      1.81261      1.81261      5.49952 \n   </betaeps>\n   <alphavectors>\n     0.99233     -0.24421     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.03319     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.88231 \n     0.01524      0.53709      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -2.05055      0.00000      0.00000     -0.00000     -0.00000      0.00000     -4.98928 \n     0.00000     -0.00000     -0.00000      0.69102      0.00000     -0.91845      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.69102      0.00000     -0.00000      0.00000     -0.91845      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.69102     -0.00000     -0.00000     -0.91845     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.02437      0.53909      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      3.00076      0.00000     -0.00000      0.00000     -0.00000      0.00000     13.68861 \n     0.00000     -0.00000     -0.00000      0.45842     -0.00000      1.05400      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.45842     -0.00000      0.00000      0.00000      1.05400      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.45842     -0.00000     -0.00000      1.05400      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.01085      0.00937      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.53523      0.96040     -0.27861      0.00000     -0.00000      0.00000     -4.68652 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000 \n    -0.01085      0.00937      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.53523     -0.72149     -0.69243     -0.00000      0.00000     -0.00000     -4.68652 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000 \n    -0.01085      0.00937      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.53523     -0.23892      0.97104     -0.00000      0.00000     -0.00000     -4.68652 \n   </alphavectors>\n   <betavectors>\n     0.99233     -0.24421     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.03319     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.88231 \n     0.01524      0.53709      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -2.05055      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -4.98928 \n     0.00000     -0.00000     -0.00000      0.00000      0.69102     -0.00000     -0.91845     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.69102     -0.00000     -0.91845     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.69102      0.00000     -0.00000      0.00000     -0.00000     -0.91845     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02437      0.53909      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      3.00076      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     13.68861 \n     0.00000     -0.00000     -0.00000      0.00000      0.45842      0.00000      1.05400     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.45842      0.00000      1.05400     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.45842     -0.00000      0.00000     -0.00000      0.00000      1.05400      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01085      0.00937      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.53523      0.92763     -0.37351     -0.00000     -0.00000     -0.00000     -4.68652 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000 \n    -0.01085      0.00937      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.53523     -0.78728     -0.61659      0.00000      0.00000      0.00000     -4.68652 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000 \n    -0.01085      0.00937      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.53523     -0.14034      0.99010      0.00000      0.00000      0.00000     -4.68652 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Na\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.11339     -0.49329      0.00000      0.00000      0.00000      0.01653      0.00000      0.00000      0.00000      0.02022      0.00000      0.00000      0.00000     -0.00167      0.00000      0.00000     -0.00167      0.00000     -0.00167 \n    -0.49329      2.14609      0.00000      0.00000      0.00000     -0.10131      0.00000      0.00000      0.00000     -0.09840      0.00000      0.00000      0.00000      0.00431      0.00000      0.00000      0.00431      0.00000      0.00431 \n     0.00000      0.00000      1.97884      0.00000      0.00000      0.00000      0.05868      0.00000      0.00000      0.00000     -0.01742      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.97884      0.00000      0.00000      0.00000      0.05868      0.00000      0.00000      0.00000     -0.01742      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.97884      0.00000      0.00000      0.00000      0.05868      0.00000      0.00000      0.00000     -0.01742      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01653     -0.10131      0.00000      0.00000      0.00000      0.36339      0.00000      0.00000      0.00000      0.28181      0.00000      0.00000      0.00000     -0.00676      0.00000      0.00000     -0.00676      0.00000     -0.00676 \n     0.00000      0.00000      0.05868      0.00000      0.00000      0.00000      0.00193      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05868      0.00000      0.00000      0.00000      0.00193      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05868      0.00000      0.00000      0.00000      0.00193      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02022     -0.09840      0.00000      0.00000      0.00000      0.28181      0.00000      0.00000      0.00000      0.21873      0.00000      0.00000      0.00000     -0.00527      0.00000      0.00000     -0.00527      0.00000     -0.00527 \n     0.00000      0.00000     -0.01742      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000      0.00090      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01742      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000      0.00090      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01742      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000      0.00090      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00167      0.00431      0.00000      0.00000      0.00000     -0.00676      0.00000      0.00000      0.00000     -0.00527      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00013      0.00000      0.00013 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00167      0.00431      0.00000      0.00000      0.00000     -0.00676      0.00000      0.00000      0.00000     -0.00527      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00013      0.00000      0.00013 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00167      0.00431      0.00000      0.00000      0.00000     -0.00676      0.00000      0.00000      0.00000     -0.00527      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00013      0.00000      0.00013 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99580      0.00140      0.00140      0.00140      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -37.72587     -2.06263     -1.06171     -1.06171     -1.06171     -0.11446     -0.03492     -0.03492     -0.03492      0.04906      0.09445      0.09445      0.09445      0.29914      0.29914      0.29914      0.29914      0.29914      0.45475 \n   </alphaeps>\n   <betaeps>\n   -37.72476     -2.06082     -1.05925     -1.05925     -1.05925     -0.08302     -0.01351     -0.01351     -0.01351      0.06176      0.11796      0.11796      0.11796      0.33831      0.33831      0.33831      0.33831      0.33831      0.47838 \n   </betaeps>\n   <alphavectors>\n     0.99728     -0.24773     -0.00000      0.00000     -0.00000      0.03863     -0.00000      0.00000      0.00000      0.02804      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00497 \n     0.01148      1.02612      0.00000     -0.00000      0.00000     -0.19920      0.00000     -0.00000     -0.00000      0.09088      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.20133 \n    -0.00000     -0.00000     -0.00000      0.00000      0.99429     -0.00000      0.00000     -0.12534     -0.00000      0.00000     -0.20273     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.99429      0.00000     -0.00000     -0.00000     -0.12534     -0.00000     -0.00000      0.00000      0.00000     -0.20273      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99429      0.00000      0.00000      0.00000      0.00000     -0.12534     -0.00000     -0.00000     -0.00000     -0.20273      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00112      0.00886      0.00000     -0.00000      0.00000      0.60395     -0.00000      0.00000      0.00000      3.39147      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      7.62940 \n    -0.00000     -0.00000     -0.00000      0.00000      0.03169      0.00000     -0.00000      0.35378      0.00000     -0.00000      1.33346     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.03169     -0.00000      0.00000      0.00000      0.35378      0.00000      0.00000     -0.00000     -0.00000      1.33346      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03169      0.00000     -0.00000      0.00000     -0.00000      0.35378      0.00000      0.00000      0.00000      1.33346     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00044     -0.00275     -0.00000      0.00000     -0.00000      0.46866     -0.00000      0.00000      0.00000     -2.47281     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -2.29429 \n     0.00000      0.00000      0.00000     -0.00000     -0.00944     -0.00000      0.00000      0.73298     -0.00000      0.00000     -1.14303      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00944      0.00000     -0.00000      0.00000      0.73298     -0.00000     -0.00000      0.00000      0.00000     -1.14303     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00944     -0.00000     -0.00000      0.00000     -0.00000      0.73298     -0.00000     -0.00000     -0.00000     -1.14303     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00037      0.00140      0.00000     -0.00000      0.00000     -0.01127      0.00000     -0.00000     -0.00000     -0.47278     -0.00000     -0.00000      0.00000     -0.32938      0.00000     -0.00000      0.00000      0.94420     -2.64655 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000 \n    -0.00037      0.00140      0.00000     -0.00000      0.00000     -0.01127      0.00000     -0.00000     -0.00000     -0.47278     -0.00000     -0.00000      0.00000      0.98239     -0.00000      0.00000     -0.00000     -0.18685     -2.64655 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000 \n    -0.00037      0.00140      0.00000     -0.00000      0.00000     -0.01127      0.00000     -0.00000     -0.00000     -0.47278     -0.00000     -0.00000      0.00000     -0.65301      0.00000     -0.00000      0.00000     -0.75735     -2.64655 \n   </alphavectors>\n   <betavectors>\n     0.99728     -0.24779     -0.00000     -0.00000     -0.00000      0.03641      0.00000     -0.00000     -0.00000      0.03056      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00406 \n     0.01148      1.02635      0.00000      0.00000      0.00000     -0.20257     -0.00000      0.00000      0.00000      0.08272      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.20033 \n     0.00000     -0.00000     -0.00000     -0.00000      0.99509      0.00000     -0.10062     -0.00000     -0.00000      0.00000     -0.21232     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.99509     -0.00000     -0.00000      0.00000      0.00000     -0.10062      0.00000     -0.00000     -0.00000     -0.21232      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.99509     -0.00000     -0.00000     -0.00000     -0.00000     -0.10062     -0.00000     -0.00000     -0.00000     -0.21232     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00112      0.00918      0.00000      0.00000      0.00000      0.42258      0.00000     -0.00000     -0.00000      3.61314      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      7.53931 \n     0.00000     -0.00000     -0.00000     -0.00000      0.02737     -0.00000      0.20609      0.00000      0.00000     -0.00000      1.36420     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.02737      0.00000      0.00000     -0.00000     -0.00000      0.20609      0.00000      0.00000      0.00000      1.36420      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.02737      0.00000      0.00000      0.00000     -0.00000      0.20609      0.00000      0.00000     -0.00000      1.36420      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00044     -0.00256     -0.00000     -0.00000     -0.00000      0.62147      0.00000     -0.00000     -0.00000     -2.49105     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -2.23755 \n    -0.00000      0.00000      0.00000      0.00000     -0.00794      0.00000      0.85342     -0.00000     -0.00000      0.00000     -1.05616      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00794     -0.00000     -0.00000      0.00000      0.00000      0.85342     -0.00000     -0.00000     -0.00000     -1.05616     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00794     -0.00000     -0.00000     -0.00000      0.00000      0.85342     -0.00000     -0.00000      0.00000     -1.05616     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00037      0.00063      0.00000      0.00000      0.00000      0.00283      0.00000     -0.00000     -0.00000     -0.53797     -0.00000      0.00000      0.00000     -0.80566     -0.00000     -0.00000     -0.59238      0.00000     -2.63409 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000 \n    -0.00037      0.00063      0.00000      0.00000      0.00000      0.00283      0.00000     -0.00000     -0.00000     -0.53797     -0.00000      0.00000      0.00000     -0.11018     -0.00000     -0.00000      0.99391     -0.00000     -2.63409 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000 \n    -0.00037      0.00063      0.00000      0.00000      0.00000      0.00283      0.00000     -0.00000     -0.00000     -0.53797     -0.00000      0.00000      0.00000      0.91584      0.00000      0.00000     -0.40154     -0.00000     -2.63409 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mg\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.12217     -0.52045      0.00000      0.00000      0.00000      0.00108      0.00000      0.00000      0.00000      0.05083      0.00000      0.00000      0.00000      0.02172      0.00000      0.00000      0.02172      0.00000      0.02172 \n    -0.52045      2.22357      0.00000      0.00000      0.00000     -0.19457      0.00000      0.00000      0.00000     -0.27215      0.00000      0.00000      0.00000     -0.03246      0.00000      0.00000     -0.03246      0.00000     -0.03246 \n     0.00000      0.00000      1.96603      0.00000      0.00000      0.00000      0.07876      0.00000      0.00000      0.00000     -0.02673      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.96603      0.00000      0.00000      0.00000      0.07876      0.00000      0.00000      0.00000     -0.02673      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.96603      0.00000      0.00000      0.00000      0.07876      0.00000      0.00000      0.00000     -0.02673      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00108     -0.19457      0.00000      0.00000      0.00000      0.79589      0.00000      0.00000      0.00000      0.63302      0.00000      0.00000      0.00000     -0.03944      0.00000      0.00000     -0.03944      0.00000     -0.03944 \n     0.00000      0.00000      0.07876      0.00000      0.00000      0.00000      0.00316      0.00000      0.00000      0.00000     -0.00107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.07876      0.00000      0.00000      0.00000      0.00316      0.00000      0.00000      0.00000     -0.00107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.07876      0.00000      0.00000      0.00000      0.00316      0.00000      0.00000      0.00000     -0.00107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.05083     -0.27215      0.00000      0.00000      0.00000      0.63302      0.00000      0.00000      0.00000      0.51005      0.00000      0.00000      0.00000     -0.02897      0.00000      0.00000     -0.02897      0.00000     -0.02897 \n     0.00000      0.00000     -0.02673      0.00000      0.00000      0.00000     -0.00107      0.00000      0.00000      0.00000      0.00037      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.02673      0.00000      0.00000      0.00000     -0.00107      0.00000      0.00000      0.00000      0.00037      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02673      0.00000      0.00000      0.00000     -0.00107      0.00000      0.00000      0.00000      0.00037      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02172     -0.03246      0.00000      0.00000      0.00000     -0.03944      0.00000      0.00000      0.00000     -0.02897      0.00000      0.00000      0.00000      0.00284      0.00000      0.00000      0.00284      0.00000      0.00284 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02172     -0.03246      0.00000      0.00000      0.00000     -0.03944      0.00000      0.00000      0.00000     -0.02897      0.00000      0.00000      0.00000      0.00284      0.00000      0.00000      0.00284      0.00000      0.00284 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02172     -0.03246      0.00000      0.00000      0.00000     -0.03944      0.00000      0.00000      0.00000     -0.02897      0.00000      0.00000      0.00000      0.00284      0.00000      0.00000      0.00284      0.00000      0.00284 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -45.97085     -2.89967     -1.71583     -1.71583     -1.71583     -0.17568     -0.04979     -0.04979     -0.04979      0.09216      0.14749      0.14749      0.14749      0.25695      0.25695      0.25695      0.25695      0.25695      0.78264 \n   </alphaeps>\n   <betaeps>\n   -45.97085     -2.89967     -1.71583     -1.71583     -1.71583     -0.17568     -0.04979     -0.04979     -0.04979      0.09216      0.14749      0.14749      0.14749      0.25695      0.25695      0.25695      0.25695      0.25695      0.78264 \n   </betaeps>\n   <alphavectors>\n     0.99669     -0.25468      0.00000      0.00000      0.00000      0.05323     -0.00000      0.00000      0.00000      0.04542     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.10415 \n     0.01376      1.01927     -0.00000     -0.00000     -0.00000     -0.26960      0.00000     -0.00000     -0.00000     -0.01048      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.51861 \n     0.00000      0.00000     -0.00000     -0.00000      0.99147     -0.00000     -0.15794     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.25064     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.99147      0.00000     -0.00000      0.00000     -0.00000     -0.15794      0.00000     -0.25064      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.99147      0.00000      0.00000      0.00000     -0.00000     -0.15794      0.00000     -0.00000     -0.00000     -0.25064      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.01491      0.07052     -0.00000     -0.00000     -0.00000      0.62670     -0.00000      0.00000      0.00000      1.76202      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      3.59482 \n     0.00000      0.00000     -0.00000     -0.00000      0.03972      0.00000      0.41649      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.36315      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.03972     -0.00000      0.00000     -0.00000      0.00000      0.41649     -0.00000      1.36315      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.03972     -0.00000     -0.00000     -0.00000      0.00000      0.41649     -0.00000      0.00000      0.00000      1.36315      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00145      0.00009     -0.00000     -0.00000     -0.00000      0.50500     -0.00000      0.00000      0.00000     -1.90663     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.87185 \n    -0.00000     -0.00000      0.00000      0.00000     -0.01348      0.00000      0.67578     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.21730     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.01348      0.00000     -0.00000      0.00000     -0.00000      0.67578      0.00000     -1.21730     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.01348      0.00000      0.00000     -0.00000      0.00000      0.67578      0.00000     -0.00000     -0.00000     -1.21730     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00640     -0.02359      0.00000      0.00000      0.00000     -0.02866      0.00000     -0.00000     -0.00000      0.05500      0.00000     -0.00000      0.00000     -0.00000      0.99864      0.05213     -0.00000      0.00000     -1.96932 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000 \n     0.00640     -0.02359      0.00000      0.00000      0.00000     -0.02866      0.00000     -0.00000     -0.00000      0.05500      0.00000     -0.00000      0.00000     -0.00000     -0.54446      0.83878      0.00000     -0.00000     -1.96932 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00640     -0.02359      0.00000      0.00000      0.00000     -0.02866      0.00000     -0.00000     -0.00000      0.05500      0.00000     -0.00000      0.00000     -0.00000     -0.45418     -0.89091     -0.00000      0.00000     -1.96932 \n   </alphavectors>\n   <betavectors>\n     0.99669     -0.25468     -0.00000     -0.00000      0.00000      0.05323     -0.00000      0.00000     -0.00000      0.04542     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.10415 \n     0.01376      1.01927      0.00000      0.00000     -0.00000     -0.26960      0.00000     -0.00000      0.00000     -0.01048      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51861 \n     0.00000      0.00000      0.00000      0.00000      0.99147     -0.00000     -0.15794     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.25064     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.99147     -0.00000      0.00000     -0.00000     -0.15794      0.00000     -0.00000     -0.25064     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.99147     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.15794      0.00000     -0.00000     -0.25064     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.01491      0.07052      0.00000      0.00000     -0.00000      0.62670     -0.00000      0.00000     -0.00000      1.76202     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      3.59482 \n     0.00000      0.00000      0.00000      0.00000      0.03972      0.00000      0.41649      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.36315      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.03972      0.00000     -0.00000      0.00000      0.41649     -0.00000      0.00000      1.36315     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.03972      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.41649     -0.00000      0.00000      1.36315     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00145      0.00009      0.00000      0.00000     -0.00000      0.50500     -0.00000      0.00000     -0.00000     -1.90663      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.87185 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.01348      0.00000      0.67578     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.21730     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01348      0.00000     -0.00000      0.00000      0.67578      0.00000     -0.00000     -1.21730      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.01348      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.67578      0.00000     -0.00000     -1.21730      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00640     -0.02359     -0.00000     -0.00000      0.00000     -0.02866      0.00000     -0.00000      0.00000      0.05500     -0.00000      0.00000      0.00000     -0.78300     -0.00000     -0.62202      0.00000     -0.00000     -1.96932 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000 \n     0.00640     -0.02359     -0.00000     -0.00000      0.00000     -0.02866      0.00000     -0.00000      0.00000      0.05500     -0.00000      0.00000      0.00000      0.93019      0.00000     -0.36709     -0.00000      0.00000     -1.96932 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00640     -0.02359     -0.00000     -0.00000      0.00000     -0.02866      0.00000     -0.00000      0.00000      0.05500     -0.00000      0.00000      0.00000     -0.14718     -0.00000      0.98911      0.00000     -0.00000     -1.96932 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sc\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.18005      0.67282      0.00000      0.00000      0.00000     -0.16772      0.00000      0.00000      0.00000      0.03369      0.00000      0.00000      0.00000     -0.02243      0.00000      0.00000      0.00000      0.02581      0.00000      0.00000      0.02581      0.00000      0.02581      0.00079      0.00000      0.00000      0.00079      0.00000      0.00079      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.67282      2.51514      0.00000      0.00000      0.00000     -0.83417      0.00000      0.00000      0.00000      0.14631      0.00000      0.00000      0.00000     -0.09212      0.00000      0.00000      0.00000      0.04743      0.00000      0.00000      0.04743      0.00000      0.04743      0.00325      0.00000      0.00000      0.00325      0.00000      0.00325      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.21602      0.00000      0.00000      0.00000     -0.69749      0.00000      0.00000      0.00000     -0.01371      0.00000      0.00000      0.00000      0.00537      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00814      0.00000      0.00000     -0.00814      0.00000     -0.00814      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.21602      0.00000      0.00000      0.00000     -0.69749      0.00000      0.00000      0.00000     -0.01371      0.00000      0.00000      0.00000      0.00537      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000      0.00000     -0.00814      0.00000     -0.00814      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.21602      0.00000      0.00000      0.00000     -0.69749      0.00000      0.00000      0.00000     -0.01371      0.00000      0.00000      0.00000      0.00537      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000      0.00000     -0.00814      0.00000     -0.00814 \n    -0.16772     -0.83417      0.00000      0.00000      0.00000      2.50884      0.00000      0.00000      0.00000     -0.47594      0.00000      0.00000      0.00000      0.30918      0.00000      0.00000      0.00000      0.00838      0.00000      0.00000      0.00838      0.00000      0.00838      0.00473      0.00000      0.00000      0.00473      0.00000      0.00473      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.69749      0.00000      0.00000      0.00000      2.26572      0.00000      0.00000      0.00000      0.03096      0.00000      0.00000      0.00000     -0.01192      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000     -0.01728      0.00000     -0.01728      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.69749      0.00000      0.00000      0.00000      2.26572      0.00000      0.00000      0.00000      0.03096      0.00000      0.00000      0.00000     -0.01192      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000      0.00000     -0.01728      0.00000     -0.01728      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.69749      0.00000      0.00000      0.00000      2.26572      0.00000      0.00000      0.00000      0.03096      0.00000      0.00000      0.00000     -0.01192      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000      0.00000     -0.01728      0.00000     -0.01728 \n     0.03369      0.14631      0.00000      0.00000      0.00000     -0.47594      0.00000      0.00000      0.00000      0.71256      0.00000      0.00000      0.00000     -0.49745      0.00000      0.00000      0.00000     -0.03614      0.00000      0.00000     -0.03614      0.00000     -0.03614     -0.02676      0.00000      0.00000     -0.02676      0.00000     -0.02676      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01371      0.00000      0.00000      0.00000      0.03096      0.00000      0.00000      0.00000      0.00043      0.00000      0.00000      0.00000     -0.00017      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000     -0.00021      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01371      0.00000      0.00000      0.00000      0.03096      0.00000      0.00000      0.00000      0.00043      0.00000      0.00000      0.00000     -0.00017      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00000     -0.00021      0.00000     -0.00021      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01371      0.00000      0.00000      0.00000      0.03096      0.00000      0.00000      0.00000      0.00043      0.00000      0.00000      0.00000     -0.00017      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00000     -0.00021      0.00000     -0.00021 \n    -0.02243     -0.09212      0.00000      0.00000      0.00000      0.30918      0.00000      0.00000      0.00000     -0.49745      0.00000      0.00000      0.00000      0.34888      0.00000      0.00000      0.00000      0.02524      0.00000      0.00000      0.02524      0.00000      0.02524      0.01839      0.00000      0.00000      0.01839      0.00000      0.01839      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00537      0.00000      0.00000      0.00000     -0.01192      0.00000      0.00000      0.00000     -0.00017      0.00000      0.00000      0.00000      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00008      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00537      0.00000      0.00000      0.00000     -0.01192      0.00000      0.00000      0.00000     -0.00017      0.00000      0.00000      0.00000      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00008      0.00000      0.00008      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00537      0.00000      0.00000      0.00000     -0.01192      0.00000      0.00000      0.00000     -0.00017      0.00000      0.00000      0.00000      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00008      0.00000      0.00008 \n     0.02581      0.04743      0.00000      0.00000      0.00000      0.00838      0.00000      0.00000      0.00000     -0.03614      0.00000      0.00000      0.00000      0.02524      0.00000      0.00000      0.00000      0.10479      0.00000      0.00000     -0.04766      0.00000     -0.04766      0.07417      0.00000      0.00000     -0.03467      0.00000     -0.03467      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.30489      0.00000      0.00000      0.00000      0.00000      0.00000      0.21769      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.30489      0.00000      0.00000      0.00000      0.00000      0.00000      0.21769      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02581      0.04743      0.00000      0.00000      0.00000      0.00838      0.00000      0.00000      0.00000     -0.03614      0.00000      0.00000      0.00000      0.02524      0.00000      0.00000      0.00000     -0.04766      0.00000      0.00000      0.10479      0.00000     -0.04766     -0.03467      0.00000      0.00000      0.07417      0.00000     -0.03467      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.30489      0.00000      0.00000      0.00000      0.00000      0.00000      0.21769      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02581      0.04743      0.00000      0.00000      0.00000      0.00838      0.00000      0.00000      0.00000     -0.03614      0.00000      0.00000      0.00000      0.02524      0.00000      0.00000      0.00000     -0.04766      0.00000      0.00000     -0.04766      0.00000      0.10479     -0.03467      0.00000      0.00000     -0.03467      0.00000      0.07417      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00079      0.00325      0.00000      0.00000      0.00000      0.00473      0.00000      0.00000      0.00000     -0.02676      0.00000      0.00000      0.00000      0.01839      0.00000      0.00000      0.00000      0.07417      0.00000      0.00000     -0.03467      0.00000     -0.03467      0.05304      0.00000      0.00000     -0.02467      0.00000     -0.02467      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21769      0.00000      0.00000      0.00000      0.00000      0.00000      0.15543      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21769      0.00000      0.00000      0.00000      0.00000      0.00000      0.15543      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00079      0.00325      0.00000      0.00000      0.00000      0.00473      0.00000      0.00000      0.00000     -0.02676      0.00000      0.00000      0.00000      0.01839      0.00000      0.00000      0.00000     -0.03467      0.00000      0.00000      0.07417      0.00000     -0.03467     -0.02467      0.00000      0.00000      0.05304      0.00000     -0.02467      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21769      0.00000      0.00000      0.00000      0.00000      0.00000      0.15543      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00079      0.00325      0.00000      0.00000      0.00000      0.00473      0.00000      0.00000      0.00000     -0.02676      0.00000      0.00000      0.00000      0.01839      0.00000      0.00000      0.00000     -0.03467      0.00000      0.00000     -0.03467      0.00000      0.07417     -0.02467      0.00000      0.00000     -0.02467      0.00000      0.05304      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00000      0.00022      0.00000      0.00022      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00022      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00022 \n     0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00000      0.00022      0.00000      0.00022      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00000      0.00022      0.00000      0.00022      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00022      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00022 \n     0.00000      0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00022      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00814      0.00000      0.00000      0.00000     -0.01728      0.00000      0.00000      0.00000     -0.00021      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000      0.00022 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.98551      0.20290      0.20290      0.20290      0.20290      0.20290      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.96029      0.00794      0.00794      0.00794      0.00794      0.00794      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -160.14750    -17.19286    -14.22958    -14.22958    -14.22958     -1.97967     -1.22475     -1.22475     -1.22475     -0.15545     -0.11281     -0.11281     -0.11281     -0.11281     -0.11281     -0.05374     -0.05374     -0.05374      0.04066      0.09534      0.09534      0.09534      0.38692      0.56798      0.56798      0.56798      0.56798      0.56798      1.87372      1.87372      1.87372      1.91973      1.91973      1.91973      1.91973      1.91973      1.91973      1.91973      2.92112 \n   </alphaeps>\n   <betaeps>\n  -160.14750    -17.18493    -14.22334    -14.22334    -14.22334     -1.95178     -1.19684     -1.19684     -1.19684     -0.14573     -0.08682     -0.08682     -0.08682     -0.08682     -0.08682     -0.04970     -0.04970     -0.04970      0.04372      0.10165      0.10165      0.10165      0.39575      0.58704      0.58704      0.58704      0.58704      0.58704      1.89940      1.89940      1.89940      1.94929      1.94929      1.94929      1.94929      1.94929      1.94929      1.94929      2.94597 \n   </betaeps>\n   <alphavectors>\n     0.99612      0.29296      0.00000      0.00000     -0.00000     -0.10581     -0.00000      0.00000      0.00000      0.02796      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00819     -0.00000      0.00000     -0.00000     -0.03960     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.01754 \n    -0.01384      1.03052      0.00000      0.00000     -0.00000     -0.42713     -0.00000      0.00000      0.00000      0.11758      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.14796     -0.00000     -0.00000      0.00000      0.02355      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.02889 \n     0.00000     -0.00000      0.99260     -0.00000      0.00000      0.00000     -0.35010      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.07070      0.00000     -0.00000      0.00000      0.00000      0.08582      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.40245      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.99260     -0.00000      0.00000     -0.00000     -0.35010     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.07070      0.00000     -0.00000     -0.00000      0.08582     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.40245     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.99260     -0.00000     -0.00000     -0.00000     -0.35010     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.07070      0.00000     -0.00000      0.08582      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.40245     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01633      0.07369      0.00000      0.00000     -0.00000      1.04967      0.00000     -0.00000      0.00000     -0.39641      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00724      0.00000     -0.00000      0.00000      1.36641     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      6.91246 \n     0.00000     -0.00000      0.02429      0.00000     -0.00000     -0.00000      1.06352     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.12240     -0.00000      0.00000     -0.00000     -0.00000      0.07733     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.66966     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.02429      0.00000      0.00000     -0.00000      1.06352      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.12240     -0.00000     -0.00000      0.00000      0.07733      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.66966      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.02429      0.00000      0.00000      0.00000      1.06352      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.12240     -0.00000      0.00000      0.07733     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.66966      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00068      0.00056      0.00000      0.00000      0.00000     -0.01077     -0.00000      0.00000     -0.00000      0.61018      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      2.64155     -0.00000     -0.00000      0.00000      5.37626      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.72393 \n    -0.00000      0.00000     -0.00176      0.00000     -0.00000     -0.00000      0.01383      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.49516      0.00000      0.00000      0.00000      0.00000      1.46300     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.50405     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00176      0.00000     -0.00000      0.00000      0.01383      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.49516     -0.00000     -0.00000     -0.00000      1.46300     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.50405      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00176      0.00000      0.00000      0.00000      0.01383     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.49516      0.00000      0.00000      1.46300     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.50405      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00023     -0.00007     -0.00000     -0.00000      0.00000     -0.00339     -0.00000      0.00000      0.00000     -0.40029      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.30395      0.00000     -0.00000      0.00000      1.88099      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.49941 \n     0.00000     -0.00000      0.00072     -0.00000      0.00000      0.00000     -0.00534      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.58344     -0.00000     -0.00000     -0.00000     -0.00000     -1.41486      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.29148      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00072     -0.00000      0.00000     -0.00000     -0.00534     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.58344     -0.00000     -0.00000     -0.00000     -1.41486      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.29148     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00072     -0.00000     -0.00000     -0.00000     -0.00534     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.58344     -0.00000     -0.00000     -1.41486      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.29148     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00614      0.02313      0.00000      0.00000     -0.00000     -0.00931     -0.00000      0.00000      0.00000     -0.03493      0.60146     -0.00000      0.00000      0.00000     -0.34725      0.00000     -0.00000     -0.00000     -0.09799     -0.00000      0.00000      0.00000      0.23904     -0.72618     -0.00000      0.00000      0.00000      0.41926      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      3.29938 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.20291      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.45236      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.20291     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.45236     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00614      0.02313      0.00000      0.00000     -0.00000     -0.00931     -0.00000      0.00000     -0.00000     -0.03493     -0.00000     -0.00000      0.00000      0.00000      0.69450     -0.00000      0.00000      0.00000     -0.09799      0.00000     -0.00000     -0.00000      0.23904      0.00000      0.00000      0.00000      0.00000     -0.83852     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      3.29938 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.20291      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.45236     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00614      0.02313      0.00000      0.00000     -0.00000     -0.00931     -0.00000      0.00000     -0.00000     -0.03493     -0.60146     -0.00000      0.00000      0.00000     -0.34725      0.00000     -0.00000     -0.00000     -0.09799     -0.00000      0.00000      0.00000      0.23904      0.72618      0.00000     -0.00000     -0.00000      0.41926      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      3.29938 \n    -0.00009      0.00156      0.00000      0.00000      0.00000     -0.00603     -0.00000      0.00000      0.00000     -0.03123      0.42907     -0.00000      0.00000      0.00000     -0.24773      0.00000     -0.00000     -0.00000      0.24803     -0.00000      0.00000      0.00000      1.87975      0.83963      0.00000     -0.00000     -0.00000     -0.48476     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.76909 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.85815     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.67927     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.85815      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.67927      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00009      0.00156      0.00000      0.00000      0.00000     -0.00603     -0.00000      0.00000      0.00000     -0.03123     -0.00000     -0.00000      0.00000      0.00000      0.49545     -0.00000      0.00000      0.00000      0.24803      0.00000     -0.00000     -0.00000      1.87975     -0.00000     -0.00000      0.00000      0.00000      0.96952      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.76909 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.85815     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.67927     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00009      0.00156      0.00000      0.00000      0.00000     -0.00603     -0.00000      0.00000     -0.00000     -0.03123     -0.42907     -0.00000      0.00000      0.00000     -0.24773      0.00000     -0.00000     -0.00000      0.24803     -0.00000      0.00000      0.00000      1.87975     -0.83963     -0.00000      0.00000      0.00000     -0.48476     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.76909 \n    -0.00000      0.00000     -0.00708     -0.00000      0.00000      0.00000     -0.00750      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00980      0.00000     -0.00000      0.00000      0.00000     -0.05820      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.26751     -0.00000     -0.00000      0.00000     -0.79057      0.00000     -0.00000      0.00000     -0.61237     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00708      0.00000     -0.00000      0.00000     -0.00750      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00980      0.00000      0.00000      0.00000     -0.05820      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.26751     -0.00000     -0.00000      1.93649     -0.00000      0.00000      0.00000      1.50000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00708     -0.00000     -0.00000     -0.00000     -0.00750     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00980      0.00000     -0.00000     -0.05820      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.26751      0.00000      2.37171      0.00000      0.00000      0.00000     -0.61237      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00708     -0.00000      0.00000      0.00000     -0.00750      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00980      0.00000     -0.00000      0.00000      0.00000     -0.05820      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.26751      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.44949      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      3.87298      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00708     -0.00000      0.00000      0.00000     -0.00750      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00980      0.00000     -0.00000      0.00000      0.00000     -0.05820      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.26751     -0.00000     -0.00000      0.00000      2.37171      0.00000     -0.00000      0.00000     -0.61237     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00708      0.00000     -0.00000      0.00000     -0.00750      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00980      0.00000      0.00000      0.00000     -0.05820      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.26751     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00708     -0.00000     -0.00000     -0.00000     -0.00750     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00980     -0.00000     -0.00000     -0.05820      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.26751     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.44949      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00708      0.00000     -0.00000      0.00000     -0.00750      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00980      0.00000      0.00000      0.00000     -0.05820      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.26751     -0.00000     -0.00000     -1.93649     -0.00000     -0.00000     -0.00000      1.50000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00708     -0.00000     -0.00000     -0.00000     -0.00750     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00980      0.00000     -0.00000     -0.05820      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.26751      0.00000     -0.79057      0.00000      0.00000      0.00000     -0.61237     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99613      0.29300      0.00000      0.00000     -0.00000     -0.10572      0.00000      0.00000      0.00000      0.02714     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00844     -0.00000     -0.00000      0.00000     -0.04002     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01757 \n    -0.01384      1.03066      0.00000      0.00000     -0.00000     -0.42677      0.00000      0.00000      0.00000      0.11329     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.15179      0.00000     -0.00000      0.00000      0.01990      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.02909 \n     0.00000     -0.00000      0.99284     -0.00000      0.00000     -0.00000     -0.34995      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.06717      0.00000      0.00000      0.00000      0.08720     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.40231     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.99284      0.00000      0.00000      0.00000     -0.34995      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.06717     -0.00000     -0.00000      0.00000      0.08720      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.40231      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.99284      0.00000     -0.00000      0.00000     -0.34995     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.06717     -0.00000      0.00000     -0.00000      0.08720     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.40231     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.01633      0.07208      0.00000      0.00000     -0.00000      1.05217     -0.00000     -0.00000     -0.00000     -0.37348      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00484      0.00000      0.00000     -0.00000      1.35509      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      6.91560 \n     0.00000     -0.00000      0.02348      0.00000     -0.00000      0.00000      1.06466      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.12327     -0.00000      0.00000      0.00000      0.07734      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.66888     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.02348     -0.00000      0.00000      0.00000      1.06466     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.12327      0.00000      0.00000     -0.00000      0.07734      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.66888     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.02348     -0.00000      0.00000     -0.00000      1.06466      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.12327      0.00000     -0.00000     -0.00000      0.07734      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.66888      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00068      0.00059      0.00000      0.00000     -0.00000     -0.01067      0.00000      0.00000      0.00000      0.59974      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      2.73513      0.00000     -0.00000      0.00000      5.33387      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.71331 \n    -0.00000      0.00000     -0.00177     -0.00000     -0.00000      0.00000      0.01534     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.44346     -0.00000      0.00000      0.00000      1.48122      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.49889     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00177     -0.00000     -0.00000     -0.00000      0.01534     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.44346     -0.00000     -0.00000     -0.00000      1.48122      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.49889     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00177     -0.00000      0.00000     -0.00000      0.01534     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.44346     -0.00000     -0.00000     -0.00000      1.48122      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.49889      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00023     -0.00005     -0.00000     -0.00000     -0.00000     -0.00338      0.00000      0.00000     -0.00000     -0.44592      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.31723      0.00000     -0.00000      0.00000      1.85508      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.49620 \n     0.00000     -0.00000      0.00073      0.00000      0.00000     -0.00000     -0.00589      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.63306      0.00000     -0.00000     -0.00000     -1.39403     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.28825      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00073      0.00000      0.00000      0.00000     -0.00589      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.63306     -0.00000     -0.00000      0.00000     -1.39403     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.28825      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00073      0.00000     -0.00000      0.00000     -0.00589     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.63306      0.00000      0.00000      0.00000     -1.39403     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.28825     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00614      0.02256      0.00000      0.00000     -0.00000     -0.00815      0.00000      0.00000     -0.00000     -0.02664      0.59641      0.00000     -0.00000      0.00000     -0.34433     -0.00000      0.00000      0.00000     -0.09341      0.00000     -0.00000     -0.00000      0.23295     -0.73035      0.00000      0.42164      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      3.30003 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.19281      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.46067     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.19281     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.46067     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00614      0.02256      0.00000      0.00000     -0.00000     -0.00815      0.00000      0.00000     -0.00000     -0.02664     -0.00000      0.00000     -0.00000      0.00000      0.68867      0.00000     -0.00000     -0.00000     -0.09341     -0.00000      0.00000      0.00000      0.23295      0.00002     -0.00000     -0.84332      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      3.30003 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.19281     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.46067      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00614      0.02256      0.00000      0.00000     -0.00000     -0.00815      0.00000      0.00000      0.00000     -0.02664     -0.59641      0.00000     -0.00000      0.00000     -0.34434     -0.00000      0.00000      0.00000     -0.09341      0.00000     -0.00000     -0.00000      0.23295      0.73032     -0.00000      0.42168     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      3.30003 \n    -0.00009      0.00156      0.00000      0.00000      0.00000     -0.00610      0.00000      0.00000     -0.00000     -0.01409      0.43489      0.00000     -0.00000      0.00000     -0.25108     -0.00000      0.00000      0.00000      0.27355      0.00000     -0.00000     -0.00000      1.87818      0.83665     -0.00000     -0.48301     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.76476 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.86977     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.67327      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.86977      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.67327      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00009      0.00156      0.00000      0.00000     -0.00000     -0.00610      0.00000      0.00000      0.00000     -0.01409     -0.00000      0.00000     -0.00000      0.00000      0.50216      0.00000     -0.00000     -0.00000      0.27355     -0.00000      0.00000      0.00000      1.87818     -0.00003      0.00000      0.96607     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.76476 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.86977      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.67327     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00009      0.00156      0.00000      0.00000      0.00000     -0.00610      0.00000      0.00000      0.00000     -0.01409     -0.43489      0.00000     -0.00000      0.00000     -0.25108     -0.00000      0.00000      0.00000      0.27355      0.00000     -0.00000     -0.00000      1.87818     -0.83662      0.00000     -0.48305      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.76476 \n    -0.00000      0.00000     -0.00674      0.00000      0.00000     -0.00000     -0.00843      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00966      0.00000     -0.00000     -0.00000     -0.06233     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.26731      0.00000      0.00000     -0.00000     -0.79057      0.00000      0.00000      0.00000     -0.61237     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00674     -0.00000     -0.00000     -0.00000     -0.00843      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00966      0.00000      0.00000      0.00000     -0.06233     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.26731      0.00000     -0.00000      0.00000      1.93649      0.00000      0.00000      1.50000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00674      0.00000     -0.00000      0.00000     -0.00843      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00966     -0.00000      0.00000      0.00000     -0.06233     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.26731      0.00000      2.37171      0.00000     -0.00000      0.00000     -0.61237     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00674     -0.00000      0.00000     -0.00000     -0.00843     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00966      0.00000     -0.00000     -0.00000     -0.06233     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.26731      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.44949      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      3.87298      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00674      0.00000      0.00000     -0.00000     -0.00843      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00966      0.00000     -0.00000     -0.00000     -0.06233     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.26731      0.00000      0.00000     -0.00000      2.37171      0.00000      0.00000      0.00000     -0.61237     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00674     -0.00000     -0.00000     -0.00000     -0.00843      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00966      0.00000      0.00000      0.00000     -0.06233     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.26731      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00674      0.00000     -0.00000      0.00000     -0.00843      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00966     -0.00000      0.00000      0.00000     -0.06233     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.26731     -0.00000     -0.00000      0.00000      0.00000     -0.00000      2.44949     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00674     -0.00000     -0.00000     -0.00000     -0.00843      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00966      0.00000      0.00000      0.00000     -0.06233     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.26731      0.00000     -0.00000      0.00000     -1.93649     -0.00000     -0.00000      1.50000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00674      0.00000     -0.00000      0.00000     -0.00843      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00966     -0.00000      0.00000      0.00000     -0.06233     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.26731      0.00000     -0.79057      0.00000     -0.00000      0.00000     -0.61237      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ti\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.18391      0.68269      0.00000      0.00000      0.00000     -0.15888      0.00000      0.00000      0.00000      0.03479      0.00000      0.00000      0.00000     -0.02159      0.00000      0.00000      0.00000      0.03091      0.00000      0.00000      0.03091      0.00000      0.03091      0.00347      0.00000      0.00000      0.00347      0.00000      0.00347      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.68269      2.53177      0.00000      0.00000      0.00000     -0.82879      0.00000      0.00000      0.00000      0.14041      0.00000      0.00000      0.00000     -0.09023      0.00000      0.00000      0.00000      0.05336      0.00000      0.00000      0.05336      0.00000      0.05336      0.00818      0.00000      0.00000      0.00818      0.00000      0.00818      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.22663      0.00000      0.00000      0.00000     -0.71328      0.00000      0.00000      0.00000     -0.01124      0.00000      0.00000      0.00000      0.00409      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00796      0.00000      0.00000     -0.00796      0.00000     -0.00796      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.22663      0.00000      0.00000      0.00000     -0.71328      0.00000      0.00000      0.00000     -0.01124      0.00000      0.00000      0.00000      0.00409      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000      0.00000     -0.00796      0.00000     -0.00796      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.22663      0.00000      0.00000      0.00000     -0.71328      0.00000      0.00000      0.00000     -0.01124      0.00000      0.00000      0.00000      0.00409      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000      0.00000     -0.00796      0.00000     -0.00796 \n    -0.15888     -0.82879      0.00000      0.00000      0.00000      2.48532      0.00000      0.00000      0.00000     -0.42100      0.00000      0.00000      0.00000      0.30099      0.00000      0.00000      0.00000      0.00271      0.00000      0.00000      0.00271      0.00000      0.00271      0.00405      0.00000      0.00000      0.00405      0.00000      0.00405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.71328      0.00000      0.00000      0.00000      2.25599      0.00000      0.00000      0.00000      0.02909      0.00000      0.00000      0.00000     -0.01074      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000     -0.01176      0.00000     -0.01176      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.71328      0.00000      0.00000      0.00000      2.25599      0.00000      0.00000      0.00000      0.02909      0.00000      0.00000      0.00000     -0.01074      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000      0.00000     -0.01176      0.00000     -0.01176      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.71328      0.00000      0.00000      0.00000      2.25599      0.00000      0.00000      0.00000      0.02909      0.00000      0.00000      0.00000     -0.01074      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000      0.00000     -0.01176      0.00000     -0.01176 \n     0.03479      0.14041      0.00000      0.00000      0.00000     -0.42100      0.00000      0.00000      0.00000      0.64267      0.00000      0.00000      0.00000     -0.49336      0.00000      0.00000      0.00000     -0.02412      0.00000      0.00000     -0.02412      0.00000     -0.02412     -0.02548      0.00000      0.00000     -0.02548      0.00000     -0.02548      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01124      0.00000      0.00000      0.00000      0.02909      0.00000      0.00000      0.00000      0.00039      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000     -0.00014      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01124      0.00000      0.00000      0.00000      0.02909      0.00000      0.00000      0.00000      0.00039      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00000     -0.00014      0.00000     -0.00014      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01124      0.00000      0.00000      0.00000      0.02909      0.00000      0.00000      0.00000      0.00039      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00000     -0.00014      0.00000     -0.00014 \n    -0.02159     -0.09023      0.00000      0.00000      0.00000      0.30099      0.00000      0.00000      0.00000     -0.49336      0.00000      0.00000      0.00000      0.38360      0.00000      0.00000      0.00000      0.01842      0.00000      0.00000      0.01842      0.00000      0.01842      0.01851      0.00000      0.00000      0.01851      0.00000      0.01851      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00409      0.00000      0.00000      0.00000     -0.01074      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00005      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00409      0.00000      0.00000      0.00000     -0.01074      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00005      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00409      0.00000      0.00000      0.00000     -0.01074      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00005 \n     0.03091      0.05336      0.00000      0.00000      0.00000      0.00271      0.00000      0.00000      0.00000     -0.02412      0.00000      0.00000      0.00000      0.01842      0.00000      0.00000      0.00000      0.20851      0.00000      0.00000     -0.10055      0.00000     -0.10055      0.14564      0.00000      0.00000     -0.07072      0.00000     -0.07072      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.61812      0.00000      0.00000      0.00000      0.00000      0.00000      0.43272      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.61812      0.00000      0.00000      0.00000      0.00000      0.00000      0.43272      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03091      0.05336      0.00000      0.00000      0.00000      0.00271      0.00000      0.00000      0.00000     -0.02412      0.00000      0.00000      0.00000      0.01842      0.00000      0.00000      0.00000     -0.10055      0.00000      0.00000      0.20851      0.00000     -0.10055     -0.07072      0.00000      0.00000      0.14564      0.00000     -0.07072      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.61812      0.00000      0.00000      0.00000      0.00000      0.00000      0.43272      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03091      0.05336      0.00000      0.00000      0.00000      0.00271      0.00000      0.00000      0.00000     -0.02412      0.00000      0.00000      0.00000      0.01842      0.00000      0.00000      0.00000     -0.10055      0.00000      0.00000     -0.10055      0.00000      0.20851     -0.07072      0.00000      0.00000     -0.07072      0.00000      0.14564      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00347      0.00818      0.00000      0.00000      0.00000      0.00405      0.00000      0.00000      0.00000     -0.02548      0.00000      0.00000      0.00000      0.01851      0.00000      0.00000      0.00000      0.14564      0.00000      0.00000     -0.07072      0.00000     -0.07072      0.10243      0.00000      0.00000     -0.04904      0.00000     -0.04904      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43272      0.00000      0.00000      0.00000      0.00000      0.00000      0.30293      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43272      0.00000      0.00000      0.00000      0.00000      0.00000      0.30293      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00347      0.00818      0.00000      0.00000      0.00000      0.00405      0.00000      0.00000      0.00000     -0.02548      0.00000      0.00000      0.00000      0.01851      0.00000      0.00000      0.00000     -0.07072      0.00000      0.00000      0.14564      0.00000     -0.07072     -0.04904      0.00000      0.00000      0.10243      0.00000     -0.04904      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43272      0.00000      0.00000      0.00000      0.00000      0.00000      0.30293      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00347      0.00818      0.00000      0.00000      0.00000      0.00405      0.00000      0.00000      0.00000     -0.02548      0.00000      0.00000      0.00000      0.01851      0.00000      0.00000      0.00000     -0.07072      0.00000      0.00000     -0.07072      0.00000      0.14564     -0.04904      0.00000      0.00000     -0.04904      0.00000      0.10243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00013      0.00000      0.00013      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00013      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00013 \n     0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00013      0.00000      0.00013      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00013      0.00000      0.00013      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00013      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00013 \n     0.00000      0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00013      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00796      0.00000      0.00000      0.00000     -0.01176      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00000      0.00000      0.00000      0.00013      0.00000      0.00013 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.90645      0.41871      0.41871      0.41871      0.41871      0.41871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.97541      0.00492      0.00492      0.00492      0.00492      0.00492      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -177.21310    -19.42335    -16.25330    -16.25330    -16.25330     -2.23819     -1.40392     -1.40392     -1.40392     -0.16298     -0.14142     -0.14142     -0.14142     -0.14142     -0.14142     -0.05261     -0.05261     -0.05261      0.05090      0.09720      0.09720      0.09720      0.49248      0.75182      0.75182      0.75182      0.75182      0.75182      1.67391      1.67391      1.67391      1.94957      1.94957      1.94957      1.94957      1.94957      1.94957      1.94957      4.96276 \n   </alphaeps>\n   <betaeps>\n  -177.21300    -19.40216    -16.23671    -16.23671    -16.23671     -2.17326     -1.33974     -1.33974     -1.33974     -0.14759     -0.08327     -0.08327     -0.08327     -0.08327     -0.08327     -0.04762     -0.04762     -0.04762      0.05661      0.10673      0.10673      0.10673      0.51340      0.79420      0.79420      0.79420      0.79420      0.79420      1.72740      1.72740      1.72740      2.01040      2.01040      2.01040      2.01040      2.01040      2.01040      2.01040      5.01848 \n   </betaeps>\n   <alphavectors>\n     0.99611      0.29551     -0.00000     -0.00000      0.00000     -0.10808     -0.00000     -0.00000     -0.00000      0.02817     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00859     -0.00000     -0.00000     -0.00000     -0.04676      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.01798 \n    -0.01353      1.03232     -0.00000     -0.00000      0.00000     -0.43372     -0.00000     -0.00000     -0.00000      0.11746     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.13153     -0.00000     -0.00000     -0.00000     -0.05585      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.31294 \n    -0.00000      0.00000      0.99305     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.35647     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06918      0.00000     -0.00000      0.00000      0.08010     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.35780      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.99305      0.00000      0.00000     -0.35647     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.06918     -0.00000     -0.00000     -0.00000      0.08010     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.35780      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.99305      0.00000      0.00000     -0.35647      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06918      0.00000     -0.00000      0.00000      0.08010      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.35780     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.02051      0.08089     -0.00000     -0.00000      0.00000      1.05341      0.00000      0.00000      0.00000     -0.38441      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.09069      0.00000      0.00000     -0.00000      1.05191     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      9.87842 \n    -0.00000      0.00000      0.02224      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.06201      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.15028     -0.00000      0.00000     -0.00000     -0.01490      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.40054     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.02224     -0.00000     -0.00000      1.06201     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.15028     -0.00000      0.00000      0.00000     -0.01490      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.40054     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.02224     -0.00000     -0.00000      1.06201     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.15028     -0.00000      0.00000     -0.00000     -0.01490     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.40054     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00023      0.00385     -0.00000     -0.00000      0.00000     -0.00917     -0.00000     -0.00000     -0.00000      0.59842     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      2.19798     -0.00000     -0.00000      0.00000      3.88884      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.13442 \n     0.00000     -0.00000     -0.00071      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.01140      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.50879     -0.00000     -0.00000      0.00000      1.47237     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.61811     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00071     -0.00000     -0.00000      0.01140     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.50879     -0.00000      0.00000     -0.00000      1.47237      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.61811      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00071      0.00000     -0.00000      0.01140      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.50879     -0.00000      0.00000     -0.00000      1.47237     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.61811      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00005      0.00117     -0.00000     -0.00000      0.00000     -0.00342     -0.00000     -0.00000     -0.00000     -0.40947      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.12854      0.00000      0.00000      0.00000      1.53514     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.41210 \n    -0.00000      0.00000      0.00022     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00415     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.57331      0.00000     -0.00000      0.00000     -1.41645      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.32980      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00022      0.00000      0.00000     -0.00415      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.57331      0.00000     -0.00000      0.00000     -1.41645     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.32980     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00022     -0.00000      0.00000     -0.00415     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.57331      0.00000     -0.00000      0.00000     -1.41645      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.32980      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00784      0.02563     -0.00000     -0.00000      0.00000     -0.00828     -0.00000     -0.00000     -0.00000     -0.02795      0.00000     -0.00000      0.00000      0.00000      0.69755     -0.00000      0.00000     -0.00000     -0.10773      0.00000      0.00000     -0.00000      0.08923     -0.00000     -0.00000     -0.00000     -0.00000     -0.84187      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      4.58978 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.20819      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.45815     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.20819      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.45815     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00784      0.02563     -0.00000     -0.00000      0.00000     -0.00828     -0.00000     -0.00000     -0.00000     -0.02795      0.00000     -0.00000      0.60409      0.00000     -0.34878      0.00000     -0.00000      0.00000     -0.10773     -0.00000     -0.00000      0.00000      0.08923      0.00000      0.00000     -0.72908     -0.00000      0.42094      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      4.58978 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.20819     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.45815      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00784      0.02563     -0.00000     -0.00000      0.00000     -0.00828     -0.00000     -0.00000     -0.00000     -0.02795      0.00000     -0.00000     -0.60410      0.00000     -0.34877      0.00000     -0.00000      0.00000     -0.10773     -0.00000     -0.00000      0.00000      0.08923      0.00000      0.00000      0.72908      0.00000      0.42093     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      4.58978 \n     0.00055      0.00390     -0.00000     -0.00000      0.00000     -0.00575     -0.00000     -0.00000     -0.00000     -0.03711      0.00000     -0.00000      0.00000      0.00000      0.48805     -0.00000      0.00000     -0.00000      0.10561      0.00000      0.00000     -0.00000      1.38753     -0.00000     -0.00000      0.00000      0.00000      0.97832      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.38597 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.84533      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.69451      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.84533     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.69451     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00055      0.00390     -0.00000     -0.00000      0.00000     -0.00575     -0.00000     -0.00000     -0.00000     -0.03711      0.00000     -0.00000      0.42267      0.00000     -0.24403      0.00000     -0.00000      0.00000      0.10561     -0.00000     -0.00000      0.00000      1.38753      0.00000      0.00000      0.84725      0.00000     -0.48916     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.38597 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.84533      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.69451     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00055      0.00390     -0.00000     -0.00000      0.00000     -0.00575     -0.00000     -0.00000     -0.00000     -0.03711      0.00000     -0.00000     -0.42267      0.00000     -0.24402      0.00000     -0.00000      0.00000      0.10561     -0.00000     -0.00000      0.00000      1.38753      0.00000      0.00000     -0.84725     -0.00000     -0.48916      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.38597 \n     0.00000     -0.00000     -0.00626     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00530     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00670      0.00000      0.00000     -0.00000     -0.06249      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.16528      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00626      0.00000      0.00000     -0.00530      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00670      0.00000     -0.00000      0.00000     -0.06249     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.16528      0.00000     -0.00000     -0.00000     -0.00000     -0.00002      0.00000      2.44949     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00626      0.00000      0.00000     -0.00530     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00670      0.00000     -0.00000      0.00000     -0.06249      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.16528     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      2.44949     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00626     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00530     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00670      0.00000      0.00000     -0.00000     -0.06249      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.16528      1.93649      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.50000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      3.87298      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00626     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00530     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00670      0.00000      0.00000     -0.00000     -0.06249      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.16528     -1.93649      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.50000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00626      0.00000      0.00000     -0.00530      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00670      0.00000     -0.00000      0.00000     -0.06249     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.16528     -0.00000      0.00000      0.00000      0.00000     -0.79057     -0.00000     -0.61238     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00626     -0.00000      0.00000     -0.00530      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00670      0.00000     -0.00000      0.00000     -0.06249      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.16528      0.00000      0.00000     -0.00000     -0.00000      2.37171      0.00000     -0.61237      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00626      0.00000      0.00000     -0.00530      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00670      0.00000     -0.00000      0.00000     -0.06249     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.16528     -0.00000      0.00000      0.00000      0.00000      2.37171     -0.00000     -0.61236     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00626     -0.00000      0.00000     -0.00530      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00670      0.00000     -0.00000      0.00000     -0.06249      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.16528      0.00000      0.00000     -0.00000     -0.00000     -0.79057      0.00000     -0.61237      0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99612      0.29559     -0.00000     -0.00000     -0.00000     -0.10781     -0.00000     -0.00000      0.00000      0.02663      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00898      0.00000      0.00000     -0.00000     -0.04770      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.01791 \n    -0.01353      1.03256     -0.00000     -0.00000     -0.00000     -0.43272     -0.00000     -0.00000      0.00000      0.10939      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.13656      0.00000      0.00000     -0.00000     -0.06287      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.31296 \n    -0.00000      0.00000      0.99353      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.35540     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.06360     -0.00000      0.00000     -0.00000      0.08155      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.35825      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.99353     -0.00000      0.00000      0.00000     -0.35540      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.06360     -0.00000     -0.00000     -0.00000      0.08155      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.35825     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.99353      0.00000     -0.35540      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.06360     -0.00000      0.00000     -0.00000      0.08155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.35825      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02051      0.07668     -0.00000     -0.00000     -0.00000      1.05374      0.00000      0.00000     -0.00000     -0.34792     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.07954     -0.00000     -0.00000      0.00000      1.03193     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      9.88197 \n    -0.00000      0.00000      0.02067     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.06170      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.14479      0.00000     -0.00000      0.00000     -0.01415     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.40139     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.02067      0.00000     -0.00000     -0.00000      1.06170     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.14479      0.00000      0.00000      0.00000     -0.01415     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.40139      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.02067     -0.00000      1.06170     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.14479      0.00000     -0.00000      0.00000     -0.01415     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.40139     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00023      0.00374     -0.00000     -0.00000     -0.00000     -0.00920     -0.00000     -0.00000     -0.00000      0.57086      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.32162     -0.00000      0.00000     -0.00000      3.82361     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.12400 \n     0.00000     -0.00000     -0.00078     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.01603      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.42973      0.00000     -0.00000      0.00000      1.50323      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.60359      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00078      0.00000     -0.00000     -0.00000      0.01603      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.42973      0.00000     -0.00000     -0.00000      1.50323     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.60359      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00078     -0.00000      0.01603      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.42973      0.00000     -0.00000     -0.00000      1.50323     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.60359      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00005      0.00114     -0.00000     -0.00000     -0.00000     -0.00345     -0.00000     -0.00000     -0.00000     -0.48727     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      2.14071     -0.00000      0.00000     -0.00000      1.49602     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.40829 \n    -0.00000      0.00000      0.00027      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00597     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.64902     -0.00000      0.00000     -0.00000     -1.38533     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.32158     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00027     -0.00000      0.00000      0.00000     -0.00597      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.64902     -0.00000      0.00000      0.00000     -1.38533      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.32158     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00027      0.00000     -0.00597     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.64902     -0.00000      0.00000      0.00000     -1.38533      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.32158     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00784      0.02412     -0.00000     -0.00000     -0.00000     -0.00780     -0.00000     -0.00000      0.00000     -0.01670      0.68464     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.10396      0.00000      0.00000     -0.00000      0.07766     -0.85239      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      4.59014 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.18584      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.47639      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.18584     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.47639      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00784      0.02412     -0.00000     -0.00000     -0.00000     -0.00780     -0.00000     -0.00000     -0.00000     -0.01670     -0.34232      0.00000      0.59292     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.10396     -0.00000     -0.00000      0.00000      0.07766      0.42619     -0.73820     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      4.59014 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.18584     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.47639     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00784      0.02412     -0.00000     -0.00000     -0.00000     -0.00780     -0.00000     -0.00000      0.00000     -0.01670     -0.34233      0.00000     -0.59292     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.10396     -0.00000     -0.00000      0.00000      0.07766      0.42620      0.73819      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      4.59014 \n     0.00055      0.00376     -0.00000     -0.00000     -0.00000     -0.00645     -0.00000     -0.00000     -0.00000     -0.00986      0.50290     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.13753      0.00000      0.00000     -0.00000      1.38640      0.97078     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.38159 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.87105      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.68143     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.87105      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.68143      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00055      0.00376     -0.00000     -0.00000     -0.00000     -0.00645     -0.00000     -0.00000      0.00000     -0.00986     -0.25145      0.00000      0.43552     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.13753     -0.00000     -0.00000      0.00000      1.38640     -0.48538      0.84072      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.38159 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.87105     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.68143      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00055      0.00376     -0.00000     -0.00000     -0.00000     -0.00645     -0.00000     -0.00000     -0.00000     -0.00986     -0.25145      0.00000     -0.43552     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.13753     -0.00000     -0.00000      0.00000      1.38640     -0.48539     -0.84071     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.38159 \n     0.00000     -0.00000     -0.00563      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00553     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00897     -0.00000      0.00000     -0.00000     -0.07238     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.16469     -0.00000      0.00000     -1.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00563     -0.00000      0.00000      0.00000     -0.00553      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00897     -0.00000      0.00000      0.00000     -0.07238      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.16469     -0.00000     -0.00000     -0.00005      0.00000      2.44949      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00563      0.00000     -0.00553      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00897     -0.00000      0.00000      0.00000     -0.07238      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.16469     -0.00000      0.00000     -0.00001     -0.00000      2.44949     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00563      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00553     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00897     -0.00000      0.00000     -0.00000     -0.07238     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.16469     -0.00000      0.00000      1.50000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.93649     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      3.87298      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00563      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00553     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00897     -0.00000      0.00000     -0.00000     -0.07238     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.16469     -0.00000      0.00000      1.50000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.93649     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00563     -0.00000      0.00000      0.00000     -0.00553      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00897     -0.00000      0.00000      0.00000     -0.07238     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.16469      0.00000      0.00000     -0.79056     -0.00000     -0.61239      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00563      0.00000     -0.00553      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00897     -0.00000      0.00000      0.00000     -0.07238      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.16469      0.00000     -0.00000      2.37171      0.00000     -0.61237      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00563     -0.00000      0.00000      0.00000     -0.00553      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00897     -0.00000      0.00000      0.00000     -0.07238     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.16469      0.00000      0.00000      2.37172     -0.00000     -0.61233      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00563      0.00000     -0.00553      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00897     -0.00000      0.00000      0.00000     -0.07238      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.16469      0.00000     -0.00000     -0.79057      0.00000     -0.61237      0.00000      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"V\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.18727      0.69083      0.00000      0.00000      0.00000     -0.15703      0.00000      0.00000      0.00000      0.03373      0.00000      0.00000      0.00000     -0.02072      0.00000      0.00000      0.00000      0.03246      0.00000      0.00000      0.03246      0.00000      0.03246      0.00544      0.00000      0.00000      0.00544      0.00000      0.00544      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.69083      2.54339      0.00000      0.00000      0.00000     -0.83342      0.00000      0.00000      0.00000      0.12971      0.00000      0.00000      0.00000     -0.08755      0.00000      0.00000      0.00000      0.05303      0.00000      0.00000      0.05303      0.00000      0.05303      0.01216      0.00000      0.00000      0.01216      0.00000      0.01216      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.23500      0.00000      0.00000      0.00000     -0.72547      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000      0.00341      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000     -0.00821      0.00000     -0.00821      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.23500      0.00000      0.00000      0.00000     -0.72547      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000      0.00341      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000      0.00000     -0.00821      0.00000     -0.00821      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.23500      0.00000      0.00000      0.00000     -0.72547      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000      0.00341      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000      0.00000     -0.00821      0.00000     -0.00821 \n    -0.15703     -0.83342      0.00000      0.00000      0.00000      2.44328      0.00000      0.00000      0.00000     -0.36323      0.00000      0.00000      0.00000      0.28562      0.00000      0.00000      0.00000     -0.00485      0.00000      0.00000     -0.00485      0.00000     -0.00485     -0.00100      0.00000      0.00000     -0.00100      0.00000     -0.00100      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.72547      0.00000      0.00000      0.00000      2.24795      0.00000      0.00000      0.00000      0.02905      0.00000      0.00000      0.00000     -0.01029      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000     -0.00601      0.00000     -0.00601      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.72547      0.00000      0.00000      0.00000      2.24795      0.00000      0.00000      0.00000      0.02905      0.00000      0.00000      0.00000     -0.01029      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000      0.00000     -0.00601      0.00000     -0.00601      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.72547      0.00000      0.00000      0.00000      2.24795      0.00000      0.00000      0.00000      0.02905      0.00000      0.00000      0.00000     -0.01029      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000      0.00000     -0.00601      0.00000     -0.00601 \n     0.03373      0.12971      0.00000      0.00000      0.00000     -0.36323      0.00000      0.00000      0.00000      0.57067      0.00000      0.00000      0.00000     -0.48327      0.00000      0.00000      0.00000     -0.01415      0.00000      0.00000     -0.01415      0.00000     -0.01415     -0.01907      0.00000      0.00000     -0.01907      0.00000     -0.01907      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000      0.02905      0.00000      0.00000      0.00000      0.00040      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000     -0.00007      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000      0.02905      0.00000      0.00000      0.00000      0.00040      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00000     -0.00007      0.00000     -0.00007      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000      0.02905      0.00000      0.00000      0.00000      0.00040      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00000     -0.00007      0.00000     -0.00007 \n    -0.02072     -0.08755      0.00000      0.00000      0.00000      0.28562      0.00000      0.00000      0.00000     -0.48327      0.00000      0.00000      0.00000      0.41886      0.00000      0.00000      0.00000      0.01177      0.00000      0.00000      0.01177      0.00000      0.01177      0.01428      0.00000      0.00000      0.01428      0.00000      0.01428      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00341      0.00000      0.00000      0.00000     -0.01029      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00341      0.00000      0.00000      0.00000     -0.01029      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00341      0.00000      0.00000      0.00000     -0.01029      0.00000      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003 \n     0.03246      0.05303      0.00000      0.00000      0.00000     -0.00485      0.00000      0.00000      0.00000     -0.01415      0.00000      0.00000      0.00000      0.01177      0.00000      0.00000      0.00000      0.31840      0.00000      0.00000     -0.15645      0.00000     -0.15645      0.21824      0.00000      0.00000     -0.10760      0.00000     -0.10760      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.94972      0.00000      0.00000      0.00000      0.00000      0.00000      0.65168      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.94972      0.00000      0.00000      0.00000      0.00000      0.00000      0.65168      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03246      0.05303      0.00000      0.00000      0.00000     -0.00485      0.00000      0.00000      0.00000     -0.01415      0.00000      0.00000      0.00000      0.01177      0.00000      0.00000      0.00000     -0.15645      0.00000      0.00000      0.31840      0.00000     -0.15645     -0.10760      0.00000      0.00000      0.21824      0.00000     -0.10760      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.94972      0.00000      0.00000      0.00000      0.00000      0.00000      0.65168      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03246      0.05303      0.00000      0.00000      0.00000     -0.00485      0.00000      0.00000      0.00000     -0.01415      0.00000      0.00000      0.00000      0.01177      0.00000      0.00000      0.00000     -0.15645      0.00000      0.00000     -0.15645      0.00000      0.31841     -0.10760      0.00000      0.00000     -0.10760      0.00000      0.21824      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00544      0.01216      0.00000      0.00000      0.00000     -0.00100      0.00000      0.00000      0.00000     -0.01907      0.00000      0.00000      0.00000      0.01428      0.00000      0.00000      0.00000      0.21824      0.00000      0.00000     -0.10760      0.00000     -0.10760      0.15031      0.00000      0.00000     -0.07328      0.00000     -0.07328      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.65168      0.00000      0.00000      0.00000      0.00000      0.00000      0.44717      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.65168      0.00000      0.00000      0.00000      0.00000      0.00000      0.44717      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00544      0.01216      0.00000      0.00000      0.00000     -0.00100      0.00000      0.00000      0.00000     -0.01907      0.00000      0.00000      0.00000      0.01428      0.00000      0.00000      0.00000     -0.10760      0.00000      0.00000      0.21824      0.00000     -0.10760     -0.07328      0.00000      0.00000      0.15031      0.00000     -0.07328      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.65168      0.00000      0.00000      0.00000      0.00000      0.00000      0.44717      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00544      0.01216      0.00000      0.00000      0.00000     -0.00100      0.00000      0.00000      0.00000     -0.01907      0.00000      0.00000      0.00000      0.01428      0.00000      0.00000      0.00000     -0.10760      0.00000      0.00000     -0.10760      0.00000      0.21824     -0.07328      0.00000      0.00000     -0.07328      0.00000      0.15031      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00007      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00007      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00007 \n     0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00007      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00007      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00007      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00007 \n     0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00007      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00821      0.00000      0.00000      0.00000     -0.00601      0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000      0.00000      0.00007      0.00000      0.00007 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.79637      0.64073      0.64073      0.64073      0.64073      0.64073      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99570      0.00086      0.00086      0.00086      0.00086      0.00086      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -195.12530    -21.75230    -18.37367    -18.37367    -18.37367     -2.48998     -1.57493     -1.57493     -1.57493     -0.16693     -0.16031     -0.16031     -0.16031     -0.16031     -0.16031     -0.04929     -0.04929     -0.04929      0.06009      0.10567      0.10567      0.10567      0.59134      0.91598      0.91598      0.91598      0.91598      0.91598      1.54530      1.54530      1.54530      1.99379      1.99379      1.99379      1.99379      1.99379      1.99379      1.99379      7.57552 \n   </alphaeps>\n   <betaeps>\n  -195.12480    -21.71372    -18.34363    -18.34363    -18.34363     -2.38354     -1.47034     -1.47034     -1.47034     -0.14796     -0.06646     -0.06646     -0.06646     -0.06646     -0.06646     -0.04489     -0.04489     -0.04489      0.06824      0.11744      0.11744      0.11744      0.62553      0.98419      0.98419      0.98419      0.98419      0.98419      1.62334      1.62334      1.62334      2.08224      2.08224      2.08224      2.08224      2.08224      2.08224      2.08224      7.66542 \n   </betaeps>\n   <alphavectors>\n     0.99611      0.29778      0.00000      0.00000      0.00000     -0.10994      0.00000     -0.00000     -0.00000      0.02811      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00912     -0.00000     -0.00000     -0.00000     -0.05075      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05606 \n    -0.01326      1.03361      0.00000      0.00000      0.00000     -0.43893      0.00000     -0.00000     -0.00000      0.11645      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.12581     -0.00000     -0.00000     -0.00000     -0.09338      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.60340 \n    -0.00000     -0.00000      0.00000     -0.00000      0.99349      0.00000      0.00000      0.00000     -0.36140     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.06651      0.00000      0.00000     -0.00000     -0.00000      0.07789     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.32011     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.99349     -0.00000      0.00000      0.00000     -0.36140     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.06651      0.00000      0.00000      0.00000     -0.00000      0.07789      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.32011      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.99349     -0.00000     -0.00000     -0.00000     -0.36140     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.06651     -0.00000      0.07789      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.32011     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.02265      0.07985      0.00000      0.00000      0.00000      1.05598     -0.00000      0.00000      0.00000     -0.36659     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.09769     -0.00000      0.00000      0.00000      0.94813     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     12.44955 \n     0.00000     -0.00000      0.00000     -0.00000      0.02035     -0.00000     -0.00000     -0.00000      1.06139      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.15257      0.00000     -0.00000      0.00000      0.00000     -0.03665      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.21432      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.02035      0.00000     -0.00000     -0.00000      1.06139      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.15257     -0.00000      0.00000     -0.00000      0.00000     -0.03665     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.21432     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.02035     -0.00000     -0.00000      0.00000      1.06139      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.15257     -0.00000     -0.03665     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.21432      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00076      0.00543      0.00000      0.00000      0.00000     -0.00816      0.00000     -0.00000     -0.00000      0.58986      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.03997      0.00000      0.00000     -0.00000      3.29896     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.80012 \n     0.00000      0.00000     -0.00000      0.00000     -0.00001     -0.00000     -0.00000     -0.00000      0.01022      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.48691      0.00000     -0.00000     -0.00000     -0.00000      1.48259      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.71913      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00001      0.00000     -0.00000     -0.00000      0.01022     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.48691     -0.00000      0.00000     -0.00000     -0.00000      1.48259     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.71913      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.01022      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.48691     -0.00000      1.48259      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.71913      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00026      0.00191      0.00000      0.00000      0.00000     -0.00329      0.00000     -0.00000     -0.00000     -0.42228     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      2.04098      0.00000      0.00000     -0.00000      1.36570     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.32740 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00009      0.00000      0.00000      0.00000     -0.00351     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.59645     -0.00000     -0.00000      0.00000      0.00000     -1.39717     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.36264     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00009     -0.00000      0.00000      0.00000     -0.00351     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.59645      0.00000     -0.00000      0.00000      0.00000     -1.39717      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.36264     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00009      0.00000      0.00000     -0.00000     -0.00351     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.59645      0.00000     -1.39717     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.36264     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00867      0.02476      0.00000      0.00000      0.00000     -0.00777     -0.00000     -0.00000     -0.00000     -0.02091     -0.35123     -0.00000      0.00000      0.00000      0.60835      0.00000      0.00000     -0.00000     -0.09447     -0.00000      0.00000     -0.00000      0.04235      0.41915     -0.00000      0.00000      0.00000     -0.72599      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      5.70043 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.21671     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.45198     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.21671      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.45198      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00867      0.02476      0.00000      0.00000      0.00000     -0.00777      0.00000     -0.00000     -0.00000     -0.02091     -0.35123     -0.00000      0.00000      0.00000     -0.60835      0.00000      0.00000     -0.00000     -0.09447      0.00000      0.00000     -0.00000      0.04235      0.41915     -0.00000      0.00000     -0.00000      0.72599     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      5.70043 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.21671     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.45198     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00867      0.02476      0.00000      0.00000      0.00000     -0.00777      0.00000     -0.00000     -0.00000     -0.02091      0.70247      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.09447      0.00000     -0.00000      0.00000      0.04235     -0.83830      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      5.70043 \n     0.00099      0.00515      0.00000      0.00000      0.00000     -0.00563      0.00000     -0.00000     -0.00000     -0.03723     -0.24099     -0.00000      0.00000      0.00000      0.41740      0.00000      0.00000     -0.00000      0.05989      0.00000      0.00000     -0.00000      1.20687     -0.49089      0.00000     -0.00000     -0.00000      0.85025     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.10990 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.83480     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.70051      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.83480     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.70051      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00099      0.00515      0.00000      0.00000      0.00000     -0.00563     -0.00000     -0.00000     -0.00000     -0.03723     -0.24099     -0.00000      0.00000      0.00000     -0.41740      0.00000      0.00000     -0.00000      0.05989     -0.00000      0.00000     -0.00000      1.20687     -0.49089      0.00000     -0.00000      0.00000     -0.85025      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.10990 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.83480     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.70051     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00099      0.00515      0.00000      0.00000      0.00000     -0.00563      0.00000     -0.00000     -0.00000     -0.03723      0.48197      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.05989      0.00000     -0.00000      0.00000      1.20687      0.98179     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.10990 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00554      0.00000      0.00000      0.00000     -0.00348     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00496     -0.00000      0.00000      0.00000      0.00000     -0.07375     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.10366     -0.00000      0.00000     -0.61235      0.00000      0.00000     -0.79059     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00554     -0.00000      0.00000      0.00000     -0.00348     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00496      0.00000     -0.00000      0.00000      0.00000     -0.07375      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.10366      0.00000     -0.00000     -0.61244     -0.00000      0.00000      0.00000      0.00000      2.37169     -0.00000 \n    -0.00000      0.00000     -0.00554      0.00000      0.00000      0.00000     -0.00348     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00496      0.00000     -0.07375     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.10366     -0.00000      0.00000      1.49999     -0.00000     -0.00000      0.00000      1.93650      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00554      0.00000      0.00000      0.00000     -0.00348     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00496     -0.00000      0.00000      0.00000      0.00000     -0.07375     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.10366     -0.00000      0.00000     -0.61244     -0.00000     -0.00000      2.37169     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      3.87298      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00554      0.00000      0.00000      0.00000     -0.00348     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00496     -0.00000      0.00000      0.00000      0.00000     -0.07375     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.10366      0.00000     -0.00000      2.44949     -0.00000     -0.00000      0.00007     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00554     -0.00000      0.00000      0.00000     -0.00348     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00496      0.00000     -0.00000      0.00000      0.00000     -0.07375      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.10366      0.00000     -0.00000     -0.61235      0.00000     -0.00000     -0.00000     -0.00000     -0.79059     -0.00000 \n    -0.00000      0.00000     -0.00554      0.00000      0.00000      0.00000     -0.00348     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00496      0.00000     -0.07375     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.10366     -0.00000      0.00000      1.50001     -0.00000     -0.00000      0.00000     -1.93648     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00554     -0.00000      0.00000      0.00000     -0.00348     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00496      0.00000     -0.00000     -0.00000      0.00000     -0.07375      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.10366     -0.00000      0.00000      2.44949     -0.00000      0.00000      0.00000      0.00000      0.00007     -0.00000 \n    -0.00000      0.00000     -0.00554      0.00000      0.00000      0.00000     -0.00348     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00496      0.00000     -0.07375     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.10366     -0.00000      0.00000     -1.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99612      0.29789     -0.00000     -0.00000      0.00000     -0.10947     -0.00000     -0.00000     -0.00000      0.02597     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00960      0.00000     -0.00000     -0.00000     -0.05219      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.05597 \n    -0.01325      1.03390     -0.00000     -0.00000      0.00000     -0.43736     -0.00000     -0.00000     -0.00000      0.10510     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.13157      0.00000     -0.00000     -0.00000     -0.10343      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.60327 \n    -0.00000     -0.00000      0.00000     -0.00000      0.99417      0.00000     -0.00000     -0.00000     -0.35915      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05960     -0.00000      0.00000      0.00000      0.07864      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.32172     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.99417     -0.00000      0.00000      0.00000     -0.35915     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05960      0.00000      0.00000     -0.00000      0.07864      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.32172      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.99417     -0.00000     -0.00000     -0.00000     -0.35915     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.05960     -0.00000      0.00000      0.00000      0.07864     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.32172      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.02264      0.07314      0.00000     -0.00000      0.00000      1.05119     -0.00000      0.00000      0.00000     -0.32227      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.08763     -0.00000      0.00000     -0.00000      0.92266      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     12.45321 \n    -0.00000     -0.00000      0.00000     -0.00000      0.01820     -0.00000      0.00000      0.00000      1.05861     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.14289     -0.00000     -0.00000      0.00000     -0.03307     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.21806      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.01820      0.00000     -0.00000     -0.00000      1.05861      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.14289     -0.00000     -0.00000      0.00000     -0.03307     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.21806     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.01820     -0.00000     -0.00000     -0.00000      1.05861      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.14289      0.00000     -0.00000     -0.00000     -0.03307      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.21806     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00076      0.00509      0.00000     -0.00000      0.00000     -0.00862     -0.00000     -0.00000     -0.00000      0.54282     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.18387      0.00000     -0.00000      0.00000      3.21609     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.79091 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00017     -0.00000      0.00000      0.00000      0.01720      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.39548     -0.00000      0.00000      0.00000      1.52168     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.69298      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00017      0.00000     -0.00000     -0.00000      0.01720      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.39548     -0.00000     -0.00000     -0.00000      1.52168     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.69298      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00017      0.00000      0.00000     -0.00000      0.01720      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.39548      0.00000      0.00000      0.00000      1.52168      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.69298     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00026      0.00179      0.00000     -0.00000      0.00000     -0.00350     -0.00000     -0.00000     -0.00000     -0.52727      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      2.04866      0.00000     -0.00000      0.00000      1.31773     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.32374 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00620      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.68316      0.00000     -0.00000     -0.00000     -1.36054      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.34865     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00620     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.68316     -0.00000      0.00000      0.00000     -1.36054      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.34865     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00620     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.68316      0.00000      0.00000      0.00000     -1.36054      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.34865      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00866      0.02237      0.00000     -0.00000      0.00000     -0.00910     -0.00000     -0.00000     -0.00000     -0.00875     -0.34134      0.00000     -0.00000      0.59122     -0.00000      0.00000     -0.00000      0.00000     -0.09121      0.00000     -0.00000      0.00000      0.02682      0.42724     -0.00000      0.00000     -0.74001     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      5.70062 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.18244     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.48002      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.18244     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.48002     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00866      0.02237      0.00000     -0.00000      0.00000     -0.00910     -0.00000     -0.00000     -0.00000     -0.00875     -0.34134      0.00000     -0.00000     -0.59122     -0.00000      0.00000     -0.00000      0.00000     -0.09121      0.00000     -0.00000      0.00000      0.02682      0.42724     -0.00000      0.00000      0.74001      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      5.70062 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.18244      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.48002     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00866      0.02237      0.00000     -0.00000      0.00000     -0.00910      0.00000     -0.00000     -0.00000     -0.00875      0.68268     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.09121     -0.00000      0.00000     -0.00000      0.02682     -0.85449      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      5.70062 \n     0.00099      0.00479      0.00000     -0.00000      0.00000     -0.00739      0.00000     -0.00000     -0.00000     -0.00323     -0.25239      0.00000     -0.00000      0.43716     -0.00000      0.00000     -0.00000      0.00000      0.09653      0.00000     -0.00000      0.00000      1.20541     -0.48513      0.00000     -0.00000      0.84026      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.10592 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.87432      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.68053     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.87432      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.68053     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00099      0.00479      0.00000     -0.00000      0.00000     -0.00739     -0.00000     -0.00000     -0.00000     -0.00323     -0.25240      0.00000     -0.00000     -0.43716     -0.00000      0.00000     -0.00000      0.00000      0.09653      0.00000     -0.00000      0.00000      1.20541     -0.48513      0.00000     -0.00000     -0.84026     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.10592 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.87432      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.68053     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00099      0.00479     -0.00000     -0.00000      0.00000     -0.00739      0.00000     -0.00000     -0.00000     -0.00323      0.50479     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.09653     -0.00000      0.00000     -0.00000      1.20541      0.97025     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.10592 \n     0.00000      0.00000     -0.00000      0.00000     -0.00471      0.00000     -0.00000     -0.00000     -0.00200      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.01019      0.00000     -0.00000     -0.00000     -0.09034      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.10240      0.00000     -0.61251     -0.00000     -0.79046      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00471     -0.00000     -0.00000      0.00000     -0.00200     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.01019      0.00000      0.00000     -0.00000     -0.09034      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.10240      0.00000      0.00000      0.00000     -0.61196      0.00000      2.37181     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00471      0.00000      0.00000      0.00000     -0.00200     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.01019     -0.00000     -0.00000     -0.00000     -0.09034      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.10240      0.00000     -0.00000      1.50000      0.00000      0.00000     -0.00000      0.00000      1.93649     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00471      0.00000     -0.00000     -0.00000     -0.00200      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.01019      0.00000     -0.00000     -0.00000     -0.09034      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.10240      0.00000     -0.61196      0.00000      2.37182      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      3.87298      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00471      0.00000     -0.00000     -0.00000     -0.00200     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.01019      0.00000     -0.00000     -0.00000     -0.09034      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.10240     -0.00000      2.44949     -0.00000     -0.00043      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00471     -0.00000     -0.00000      0.00000     -0.00200     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.01019      0.00000      0.00000     -0.00000     -0.09034      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.10240      0.00000      0.00000      0.00000     -0.61251     -0.00000     -0.79046     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00471      0.00000      0.00000      0.00000     -0.00200     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.01019     -0.00000     -0.00000     -0.00000     -0.09034      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.10240      0.00000     -0.00000      1.50000      0.00000      0.00000     -0.00000      0.00000     -1.93649     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00471     -0.00000      0.00000      0.00000     -0.00200     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.01019      0.00000      0.00000      0.00000     -0.09034      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.10240     -0.00000     -0.00000     -0.00000      2.44949     -0.00000     -0.00043     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00471      0.00000      0.00000      0.00000     -0.00200     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.01019     -0.00000     -0.00000     -0.00000     -0.09034      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.10240      0.00000     -0.00000     -1.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cr\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.18966      0.69537      0.00000      0.00000      0.00000     -0.15234      0.00000      0.00000      0.00000      0.02265      0.00000      0.00000      0.00000     -0.01046      0.00000      0.00000      0.00000      0.03221      0.00000      0.00000      0.03221      0.00000      0.03221      0.00775      0.00000      0.00000      0.00775      0.00000      0.00775      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.69537      2.54291      0.00000      0.00000      0.00000     -0.81415      0.00000      0.00000      0.00000      0.08045      0.00000      0.00000      0.00000     -0.04669      0.00000      0.00000      0.00000      0.05141      0.00000      0.00000      0.05141      0.00000      0.05141      0.01874      0.00000      0.00000      0.01874      0.00000      0.01874      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.23952      0.00000      0.00000      0.00000     -0.72794      0.00000      0.00000      0.00000     -0.01063      0.00000      0.00000      0.00000      0.00767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01198      0.00000      0.00000     -0.01198      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.23952      0.00000      0.00000      0.00000     -0.72794      0.00000      0.00000      0.00000     -0.01063      0.00000      0.00000      0.00000      0.00767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00000     -0.01198      0.00000     -0.01198      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.23952      0.00000      0.00000      0.00000     -0.72794      0.00000      0.00000      0.00000     -0.01063      0.00000      0.00000      0.00000      0.00767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00000     -0.01198      0.00000     -0.01198 \n    -0.15234     -0.81415      0.00000      0.00000      0.00000      2.28335      0.00000      0.00000      0.00000     -0.19436      0.00000      0.00000      0.00000      0.15359      0.00000      0.00000      0.00000     -0.02112      0.00000      0.00000     -0.02112      0.00000     -0.02112     -0.01594      0.00000      0.00000     -0.01594      0.00000     -0.01594      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.72794      0.00000      0.00000      0.00000      2.21866      0.00000      0.00000      0.00000      0.03389      0.00000      0.00000      0.00000     -0.02155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00931      0.00000      0.00931      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.72794      0.00000      0.00000      0.00000      2.21866      0.00000      0.00000      0.00000      0.03389      0.00000      0.00000      0.00000     -0.02155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000      0.00000      0.00931      0.00000      0.00931      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.72794      0.00000      0.00000      0.00000      2.21866      0.00000      0.00000      0.00000      0.03389      0.00000      0.00000      0.00000     -0.02155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000      0.00000      0.00931      0.00000      0.00931 \n     0.02265      0.08045      0.00000      0.00000      0.00000     -0.19436      0.00000      0.00000      0.00000      0.29364      0.00000      0.00000      0.00000     -0.27550      0.00000      0.00000      0.00000     -0.00263      0.00000      0.00000     -0.00263      0.00000     -0.00263     -0.00818      0.00000      0.00000     -0.00818      0.00000     -0.00818      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01063      0.00000      0.00000      0.00000      0.03389      0.00000      0.00000      0.00000      0.01370      0.00000      0.00000      0.00000      0.02283      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000     -0.00015      0.00000     -0.00015      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01063      0.00000      0.00000      0.00000      0.03389      0.00000      0.00000      0.00000      0.01370      0.00000      0.00000      0.00000      0.02283      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000      0.00000     -0.00015      0.00000     -0.00015      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01063      0.00000      0.00000      0.00000      0.03389      0.00000      0.00000      0.00000      0.01370      0.00000      0.00000      0.00000      0.02283      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000      0.00000     -0.00015      0.00000     -0.00015 \n    -0.01046     -0.04669      0.00000      0.00000      0.00000      0.15359      0.00000      0.00000      0.00000     -0.27550      0.00000      0.00000      0.00000      0.25903      0.00000      0.00000      0.00000      0.00317      0.00000      0.00000      0.00317      0.00000      0.00317      0.00807      0.00000      0.00000      0.00807      0.00000      0.00807      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00767      0.00000      0.00000      0.00000     -0.02155      0.00000      0.00000      0.00000      0.02283      0.00000      0.00000      0.00000      0.04094      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000     -0.00062      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00767      0.00000      0.00000      0.00000     -0.02155      0.00000      0.00000      0.00000      0.02283      0.00000      0.00000      0.00000      0.04094      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000     -0.00062      0.00000     -0.00062      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00767      0.00000      0.00000      0.00000     -0.02155      0.00000      0.00000      0.00000      0.02283      0.00000      0.00000      0.00000      0.04094      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000     -0.00062      0.00000     -0.00062 \n     0.03221      0.05141      0.00000      0.00000      0.00000     -0.02112      0.00000      0.00000      0.00000     -0.00263      0.00000      0.00000      0.00000      0.00317      0.00000      0.00000      0.00000      0.44378      0.00000      0.00000     -0.21992      0.00000     -0.21992      0.32776      0.00000      0.00000     -0.16298      0.00000     -0.16298      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.32739      0.00000      0.00000      0.00000      0.00000      0.00000      0.98146      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.32739      0.00000      0.00000      0.00000      0.00000      0.00000      0.98146      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03221      0.05141      0.00000      0.00000      0.00000     -0.02112      0.00000      0.00000      0.00000     -0.00263      0.00000      0.00000      0.00000      0.00317      0.00000      0.00000      0.00000     -0.21992      0.00000      0.00000      0.44377      0.00000     -0.21993     -0.16298      0.00000      0.00000      0.32775      0.00000     -0.16298      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.32739      0.00000      0.00000      0.00000      0.00000      0.00000      0.98146      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03221      0.05141      0.00000      0.00000      0.00000     -0.02112      0.00000      0.00000      0.00000     -0.00263      0.00000      0.00000      0.00000      0.00317      0.00000      0.00000      0.00000     -0.21992      0.00000      0.00000     -0.21993      0.00000      0.44378     -0.16298      0.00000      0.00000     -0.16298      0.00000      0.32775      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00775      0.01874      0.00000      0.00000      0.00000     -0.01594      0.00000      0.00000      0.00000     -0.00818      0.00000      0.00000      0.00000      0.00807      0.00000      0.00000      0.00000      0.32776      0.00000      0.00000     -0.16298      0.00000     -0.16298      0.24242      0.00000      0.00000     -0.12042      0.00000     -0.12042      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.98146      0.00000      0.00000      0.00000      0.00000      0.00000      0.72568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.98146      0.00000      0.00000      0.00000      0.00000      0.00000      0.72568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00775      0.01874      0.00000      0.00000      0.00000     -0.01594      0.00000      0.00000      0.00000     -0.00818      0.00000      0.00000      0.00000      0.00807      0.00000      0.00000      0.00000     -0.16298      0.00000      0.00000      0.32775      0.00000     -0.16298     -0.12042      0.00000      0.00000      0.24242      0.00000     -0.12042      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.98146      0.00000      0.00000      0.00000      0.00000      0.00000      0.72568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00775      0.01874      0.00000      0.00000      0.00000     -0.01594      0.00000      0.00000      0.00000     -0.00818      0.00000      0.00000      0.00000      0.00807      0.00000      0.00000      0.00000     -0.16298      0.00000      0.00000     -0.16298      0.00000      0.32775     -0.12042      0.00000      0.00000     -0.12042      0.00000      0.24242      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009 \n     0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009 \n     0.00000      0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01198      0.00000      0.00000      0.00000      0.00931      0.00000      0.00000      0.00000     -0.00015      0.00000      0.00000      0.00000     -0.00062      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.94856      0.94856      0.94856      0.94856      0.94856      0.08573      0.08573      0.08573      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -213.78620    -24.07160    -20.48354    -20.48354    -20.48354     -2.63822     -1.64404     -1.64404     -1.64404     -0.16049     -0.08939     -0.08939     -0.08939     -0.08939     -0.08939     -0.04699     -0.04699     -0.04699      0.06883      0.11886      0.11886      0.11886      0.71343      1.13700      1.13700      1.13700      1.13700      1.13700      1.51198      1.51198      1.51198      2.10360      2.10360      2.10360      2.10360      2.10360      2.10360      2.10360     11.16465 \n   </alphaeps>\n   <betaeps>\n  -213.78410    -24.00941    -20.43516    -20.43516    -20.43516     -2.47731     -1.48523     -1.48523     -1.48523     -0.09505     -0.00979     -0.00979     -0.00979      0.06030      0.06030      0.06030      0.06030      0.06030      0.10962      0.16788      0.16788      0.16788      0.80226      1.26903      1.26903      1.26903      1.26903      1.26903      1.63866      1.63866      1.63866      2.24103      2.24103      2.24103      2.24103      2.24103      2.24103      2.24103     11.30893 \n   </betaeps>\n   <alphavectors>\n     0.99611      0.29981     -0.00000      0.00000     -0.00000     -0.11122      0.00000     -0.00000     -0.00000      0.02681      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.01027      0.00000      0.00000      0.00000     -0.05492     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.09767 \n    -0.01307      1.03437     -0.00000      0.00000     -0.00000     -0.44252      0.00000     -0.00000     -0.00000      0.10870      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.12758      0.00000      0.00000      0.00000     -0.12693     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.91196 \n    -0.00000      0.00000     -0.00000      0.00000      0.99394     -0.00000     -0.36311      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05931     -0.00000     -0.00000     -0.00000      0.07836     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.29120     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.99394      0.00000      0.00000     -0.00000      0.00000     -0.36311     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.05931      0.00000     -0.00000     -0.00000      0.07836     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.29120     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.99394      0.00000     -0.00000      0.00000     -0.00000     -0.36311     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05931     -0.00000     -0.00000     -0.00000      0.07836     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.29120      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.02328      0.07282     -0.00000      0.00000     -0.00000      1.04720     -0.00000      0.00000      0.00000     -0.31966      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.08077     -0.00000     -0.00000     -0.00000      0.88050     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     14.92678 \n    -0.00000      0.00000     -0.00000      0.00000      0.01861      0.00000      1.05441     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.13977      0.00000      0.00000      0.00000     -0.02901      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.08711     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.01861     -0.00000     -0.00000      0.00000     -0.00000      1.05441      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.13977     -0.00000      0.00000      0.00000     -0.02901      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.08711     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.01861     -0.00000      0.00000     -0.00000      0.00000      1.05441      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.13977     -0.00000     -0.00000      0.00000     -0.02901      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.08711      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00112      0.00622     -0.00000      0.00000     -0.00000     -0.01021      0.00000     -0.00000     -0.00000      0.54161     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.03833      0.00000      0.00000      0.00000      2.88344      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.53955 \n    -0.00000      0.00000     -0.00000      0.00000      0.00044      0.00000      0.01560      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.38964     -0.00000     -0.00000     -0.00000      1.53002      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.78733     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00044     -0.00000     -0.00000      0.00000     -0.00000      0.01560      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.38964     -0.00000     -0.00000     -0.00000      1.53002      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.78733     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00044     -0.00000      0.00000     -0.00000      0.00000      0.01560      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.38964     -0.00000     -0.00000     -0.00000      1.53002      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.78733      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00042      0.00236     -0.00000      0.00000     -0.00000     -0.00432      0.00000     -0.00000     -0.00000     -0.50890     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.98163      0.00000      0.00000      0.00000      1.21816      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.24586 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00027     -0.00000     -0.00532      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.69039      0.00000      0.00000      0.00000     -1.34710     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.37709      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00027      0.00000      0.00000     -0.00000      0.00000     -0.00532      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.69039     -0.00000      0.00000      0.00000     -1.34710     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.37709      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00027      0.00000     -0.00000      0.00000     -0.00000     -0.00532     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.69039      0.00000      0.00000      0.00000     -1.34710     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.37709     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00886      0.02145     -0.00000      0.00000     -0.00000     -0.01057      0.00000     -0.00000     -0.00000     -0.00582     -0.34755      0.58794      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.07480     -0.00000     -0.00000     -0.00000      0.00958      0.59473      0.61207     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      6.77016 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.18295      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.47818     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.18295      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.47818     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00886      0.02145     -0.00000      0.00000     -0.00000     -0.01057      0.00000     -0.00000     -0.00000     -0.00582      0.68294      0.00702      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.07480     -0.00000     -0.00000     -0.00000      0.00958     -0.82744      0.20902     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      6.77016 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.18295     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.47818     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00886      0.02145     -0.00000      0.00000     -0.00000     -0.01057      0.00000     -0.00000     -0.00000     -0.00582     -0.33540     -0.59495      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.07480     -0.00000     -0.00000     -0.00000      0.00958      0.23271     -0.82109      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      6.77016 \n     0.00130      0.00574     -0.00000      0.00000     -0.00000     -0.00943      0.00000     -0.00000     -0.00000     -0.01563     -0.25697      0.43472      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.05847      0.00000      0.00000      0.00000      1.10049     -0.67557     -0.69527      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.14230 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.87466     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.67910      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.87466     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.67910     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00130      0.00574     -0.00000      0.00000     -0.00000     -0.00943      0.00000     -0.00000     -0.00000     -0.01563      0.50496      0.00519      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.05847      0.00000      0.00000      0.00000      1.10049      0.93990     -0.23743      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.14230 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.87466      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.67910     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00130      0.00574     -0.00000      0.00000     -0.00000     -0.00943      0.00000     -0.00000     -0.00000     -0.01563     -0.24799     -0.43990      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.05847      0.00000      0.00000      0.00000      1.10049     -0.26434      0.93269     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.14230 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00488      0.00000      0.00329      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00956      0.00000      0.00000      0.00000     -0.10935     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.06956      0.00000     -0.02839     -0.00000     -0.00000     -0.00000     -0.99960     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00488      0.00000     -0.00000      0.00000     -0.00000      0.00329     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00956      0.00000     -0.00000     -0.00000     -0.10935     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.06956      0.00000      1.98057     -0.00000     -0.00000     -0.00000      1.44130     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00488     -0.00000      0.00000     -0.00000      0.00000      0.00329     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00956      0.00000      0.00000     -0.00000     -0.10935     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.06956      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73535     -0.00000      0.00000      1.72875     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00488      0.00000      0.00329      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00956      0.00000      0.00000      0.00000     -0.10935     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.06956     -0.00000      1.97830      0.00000      0.00000      0.00000      1.44441     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      3.87298      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00488      0.00000      0.00329      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00956      0.00000      0.00000      0.00000     -0.10935     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.06956      0.00000     -1.89312      0.00000      0.00000      0.00000      1.55438     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00488      0.00000     -0.00000      0.00000     -0.00000      0.00329     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00956      0.00000     -0.00000     -0.00000     -0.10935     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.06956     -0.00000     -0.02996      0.00000      0.00000      0.00000     -0.99955     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00488     -0.00000      0.00000     -0.00000      0.00000      0.00329     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00956      0.00000      0.00000     -0.00000     -0.10935     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.06956     -0.00000     -0.00000      0.00000      0.00000     -0.00000      2.10769     -0.00000      0.00000      1.24806     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00488      0.00000     -0.00000      0.00000     -0.00000      0.00329     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00956      0.00000     -0.00000     -0.00000     -0.10935     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.06956      0.00000     -1.89068     -0.00000     -0.00000     -0.00000      1.55735     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00488     -0.00000      0.00000     -0.00000      0.00000      0.00329     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00956      0.00000      0.00000     -0.00000     -0.10935     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.06956     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.12411      0.00000     -0.00000     -0.99227     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99611      0.29995      0.00000     -0.00000     -0.00000     -0.11067      0.00000     -0.00000      0.00000     -0.02400     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.01171     -0.00000      0.00000     -0.00000     -0.05628     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.09762 \n    -0.01306      1.03471      0.00000     -0.00000     -0.00000     -0.44089      0.00000     -0.00000      0.00000     -0.08652     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.13676     -0.00000      0.00000     -0.00000     -0.13734     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.91189 \n    -0.00000      0.00000      0.00000     -0.00000      0.99480     -0.00000     -0.36032      0.00000     -0.00000     -0.00000      0.04468      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.08268     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.29312     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.99480     -0.00000      0.00000     -0.00000     -0.36032      0.00000      0.00000      0.00000      0.00000      0.04468      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.08268     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.29312     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.99480      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.36032     -0.00000      0.00000      0.04468     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.08268      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.29312     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.02327      0.06399      0.00000     -0.00000     -0.00000      1.03637     -0.00000      0.00000     -0.00000      0.28403      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.09008      0.00000     -0.00000      0.00000      0.86308      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     14.92926 \n     0.00000      0.00000      0.00000     -0.00000      0.01592      0.00000      1.05100     -0.00000      0.00000      0.00000     -0.13031     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03504      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.09145      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.01592      0.00000     -0.00000      0.00000      1.05100     -0.00000     -0.00000     -0.00000     -0.00000     -0.13031      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.03504      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.09145      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.01592     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.05100     -0.00000     -0.00000     -0.13031      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.03504     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.09145      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00112      0.00561      0.00000     -0.00000     -0.00000     -0.01100      0.00000     -0.00000      0.00000     -0.28792     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.22763     -0.00000      0.00000     -0.00000      2.77909      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.53371 \n     0.00000      0.00000      0.00000     -0.00000      0.00019      0.00000      0.02103      0.00000     -0.00000     -0.00000      0.13128     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.58902      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.75515      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00019     -0.00000     -0.00000      0.00000      0.02103      0.00000      0.00000      0.00000      0.00000      0.13128      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.58902      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.75515      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00019     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.02103     -0.00000     -0.00000      0.13128      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.58902     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.75515     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00042      0.00213      0.00000     -0.00000     -0.00000     -0.00472      0.00000     -0.00000      0.00000      0.77596      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.93775     -0.00000      0.00000     -0.00000      1.14634      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.24312 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00013     -0.00000     -0.00729     -0.00000      0.00000     -0.00000      0.90477      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.21947     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.35745     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00013      0.00000      0.00000     -0.00000     -0.00729      0.00000      0.00000      0.00000      0.00000      0.90477     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.21947     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.35745     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00013      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00729     -0.00000     -0.00000      0.90477     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.21947      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.35745      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00885      0.01837      0.00000     -0.00000     -0.00000     -0.01453      0.00000     -0.00000      0.00000     -0.00745     -0.00000     -0.00000      0.00000      0.57672     -0.33481     -0.00000      0.00000      0.00000     -0.07502      0.00000     -0.00000      0.00000     -0.00091      0.60782      0.61697      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      6.77017 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.15504     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.50009      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.15504      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.50009      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00885      0.01837      0.00000     -0.00000     -0.00000     -0.01453      0.00000     -0.00000      0.00000     -0.00745     -0.00000     -0.00000      0.00000     -0.57832     -0.33205     -0.00000      0.00000      0.00000     -0.07502      0.00000     -0.00000      0.00000     -0.00091     -0.83822      0.21790      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      6.77017 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.15504      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.50009      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00885      0.01837      0.00000     -0.00000     -0.00000     -0.01453      0.00000     -0.00000      0.00000     -0.00745     -0.00000     -0.00000      0.00000      0.00159      0.66686     -0.00000      0.00000      0.00000     -0.07502      0.00000     -0.00000      0.00000     -0.00091      0.23040     -0.83487     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      6.77017 \n     0.00130      0.00514      0.00000     -0.00000     -0.00000     -0.01145      0.00000     -0.00000      0.00000      0.00164      0.00000      0.00000     -0.00000      0.45236     -0.26262      0.00000     -0.00000      0.00000      0.10634     -0.00000      0.00000     -0.00000      1.09670     -0.67359     -0.68373     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.14454 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.90598      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.66241      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.90598     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.66241      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00130      0.00514      0.00000     -0.00000     -0.00000     -0.01145      0.00000     -0.00000      0.00000      0.00164      0.00000      0.00000     -0.00000     -0.45361     -0.26045      0.00000     -0.00000      0.00000      0.10634     -0.00000      0.00000     -0.00000      1.09670      0.92892     -0.24148     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.14454 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.90598     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.66241      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00130      0.00514      0.00000     -0.00000     -0.00000     -0.01145      0.00000     -0.00000      0.00000      0.00164      0.00000      0.00000     -0.00000      0.00125      0.52307      0.00000     -0.00000      0.00000      0.10634     -0.00000      0.00000     -0.00000      1.09670     -0.25533      0.92521      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.14454 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00389      0.00000      0.00559      0.00000     -0.00000      0.00000      0.00348      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.13075     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.06718     -0.10384      0.00000     -0.00000     -0.00000     -0.99459     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00389     -0.00000     -0.00000      0.00000      0.00559      0.00000      0.00000      0.00000      0.00000      0.00348     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.13075     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.06718      0.00000      0.00000      1.95008     -0.00000     -0.00000      0.00000      1.48229     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00389     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00559      0.00000      0.00000      0.00348     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.13075      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.06718     -0.00000     -0.00000      0.00000      0.00000     -1.74428      0.00000     -0.00000      0.00000      1.71974     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00389      0.00000      0.00559      0.00000     -0.00000      0.00000      0.00348      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.13075     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.06718      2.08179      0.00000     -0.00000      0.00000      1.29080     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      3.87298     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00389      0.00000      0.00559      0.00000     -0.00000      0.00000      0.00348      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.13075     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.06718     -1.77026      0.00000     -0.00000      0.00000      1.69298     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00389     -0.00000     -0.00000      0.00000      0.00559      0.00000      0.00000      0.00000      0.00000      0.00348     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.13075     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.06718     -0.00000      0.00000     -0.00912     -0.00000      0.00000     -0.00000     -0.99996     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00389     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00559      0.00000      0.00000      0.00348     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13075      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.06718      0.00000      0.00000      0.00000      0.00000      2.10120      0.00000     -0.00000      0.00000      1.25896     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00389     -0.00000     -0.00000      0.00000      0.00559      0.00000      0.00000      0.00000      0.00000      0.00348     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.13075     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.06718     -0.00000      0.00000     -1.92274     -0.00000     -0.00000      0.00000      1.51759     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00389     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00559      0.00000      0.00000      0.00348     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13075      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.06718     -0.00000     -0.00000      0.00000      0.00000     -0.11897     -0.00000      0.00000     -0.00000     -0.99290     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mn\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.19323      0.70467      0.00000      0.00000      0.00000     -0.17962      0.00000      0.00000      0.00000      0.03888      0.00000      0.00000      0.00000     -0.02062      0.00000      0.00000      0.00000      0.02561      0.00000      0.00000      0.02561      0.00000      0.02561      0.00589      0.00000      0.00000      0.00589      0.00000      0.00589      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.70467      2.56326      0.00000      0.00000      0.00000     -0.90718      0.00000      0.00000      0.00000      0.14588      0.00000      0.00000      0.00000     -0.09020      0.00000      0.00000      0.00000      0.03127      0.00000      0.00000      0.03127      0.00000      0.03127      0.00924      0.00000      0.00000      0.00924      0.00000      0.00924      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.25072      0.00000      0.00000      0.00000     -0.75468      0.00000      0.00000      0.00000     -0.00741      0.00000      0.00000      0.00000      0.00234      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00451      0.00000      0.00000     -0.00451      0.00000     -0.00451      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25072      0.00000      0.00000      0.00000     -0.75468      0.00000      0.00000      0.00000     -0.00741      0.00000      0.00000      0.00000      0.00234      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000      0.00000     -0.00451      0.00000     -0.00451      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25072      0.00000      0.00000      0.00000     -0.75468      0.00000      0.00000      0.00000     -0.00741      0.00000      0.00000      0.00000      0.00234      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000      0.00000     -0.00451      0.00000     -0.00451 \n    -0.17962     -0.90718      0.00000      0.00000      0.00000      2.48552      0.00000      0.00000      0.00000     -0.38944      0.00000      0.00000      0.00000      0.28202      0.00000      0.00000      0.00000     -0.00249      0.00000      0.00000     -0.00249      0.00000     -0.00249      0.00890      0.00000      0.00000      0.00890      0.00000      0.00890      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.75468      0.00000      0.00000      0.00000      2.27864      0.00000      0.00000      0.00000      0.02572      0.00000      0.00000      0.00000     -0.00889      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000     -0.01005      0.00000     -0.01005      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.75468      0.00000      0.00000      0.00000      2.27864      0.00000      0.00000      0.00000      0.02572      0.00000      0.00000      0.00000     -0.00889      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000      0.00000     -0.01005      0.00000     -0.01005      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.75468      0.00000      0.00000      0.00000      2.27864      0.00000      0.00000      0.00000      0.02572      0.00000      0.00000      0.00000     -0.00889      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000      0.00000     -0.01005      0.00000     -0.01005 \n     0.03888      0.14588      0.00000      0.00000      0.00000     -0.38944      0.00000      0.00000      0.00000      0.68413      0.00000      0.00000      0.00000     -0.51511      0.00000      0.00000      0.00000     -0.01266      0.00000      0.00000     -0.01266      0.00000     -0.01266     -0.03075      0.00000      0.00000     -0.03075      0.00000     -0.03075      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00741      0.00000      0.00000      0.00000      0.02572      0.00000      0.00000      0.00000      0.00032      0.00000      0.00000      0.00000     -0.00011      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000     -0.00010      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00741      0.00000      0.00000      0.00000      0.02572      0.00000      0.00000      0.00000      0.00032      0.00000      0.00000      0.00000     -0.00011      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00000     -0.00010      0.00000     -0.00010      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00741      0.00000      0.00000      0.00000      0.02572      0.00000      0.00000      0.00000      0.00032      0.00000      0.00000      0.00000     -0.00011      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00000     -0.00010      0.00000     -0.00010 \n    -0.02062     -0.09020      0.00000      0.00000      0.00000      0.28202      0.00000      0.00000      0.00000     -0.51511      0.00000      0.00000      0.00000      0.40938      0.00000      0.00000      0.00000      0.00888      0.00000      0.00000      0.00888      0.00000      0.00888      0.01984      0.00000      0.00000      0.01984      0.00000      0.01984      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00234      0.00000      0.00000      0.00000     -0.00889      0.00000      0.00000      0.00000     -0.00011      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00004      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00234      0.00000      0.00000      0.00000     -0.00889      0.00000      0.00000      0.00000     -0.00011      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00004      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00234      0.00000      0.00000      0.00000     -0.00889      0.00000      0.00000      0.00000     -0.00011      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00004 \n     0.02561      0.03127      0.00000      0.00000      0.00000     -0.00249      0.00000      0.00000      0.00000     -0.01266      0.00000      0.00000      0.00000      0.00888      0.00000      0.00000      0.00000      0.52700      0.00000      0.00000     -0.26215      0.00000     -0.26215      0.33269      0.00000      0.00000     -0.16489      0.00000     -0.16488      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.57831      0.00000      0.00000      0.00000      0.00000      0.00000      0.99517      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.57831      0.00000      0.00000      0.00000      0.00000      0.00000      0.99517      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02561      0.03127      0.00000      0.00000      0.00000     -0.00249      0.00000      0.00000      0.00000     -0.01266      0.00000      0.00000      0.00000      0.00888      0.00000      0.00000      0.00000     -0.26215      0.00000      0.00000      0.52700      0.00000     -0.26215     -0.16488      0.00000      0.00000      0.33270      0.00000     -0.16489      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.57831      0.00000      0.00000      0.00000      0.00000      0.00000      0.99517      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02561      0.03127      0.00000      0.00000      0.00000     -0.00249      0.00000      0.00000      0.00000     -0.01266      0.00000      0.00000      0.00000      0.00888      0.00000      0.00000      0.00000     -0.26215      0.00000      0.00000     -0.26215      0.00000      0.52700     -0.16489      0.00000      0.00000     -0.16489      0.00000      0.33270      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00589      0.00924      0.00000      0.00000      0.00000      0.00890      0.00000      0.00000      0.00000     -0.03075      0.00000      0.00000      0.00000      0.01984      0.00000      0.00000      0.00000      0.33269      0.00000      0.00000     -0.16488      0.00000     -0.16489      0.21123      0.00000      0.00000     -0.10252      0.00000     -0.10252      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.99517      0.00000      0.00000      0.00000      0.00000      0.00000      0.62751      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.99517      0.00000      0.00000      0.00000      0.00000      0.00000      0.62751      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00589      0.00924      0.00000      0.00000      0.00000      0.00890      0.00000      0.00000      0.00000     -0.03075      0.00000      0.00000      0.00000      0.01984      0.00000      0.00000      0.00000     -0.16489      0.00000      0.00000      0.33270      0.00000     -0.16489     -0.10252      0.00000      0.00000      0.21123      0.00000     -0.10252      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.99517      0.00000      0.00000      0.00000      0.00000      0.00000      0.62751      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00589      0.00924      0.00000      0.00000      0.00000      0.00890      0.00000      0.00000      0.00000     -0.03075      0.00000      0.00000      0.00000      0.01984      0.00000      0.00000      0.00000     -0.16488      0.00000      0.00000     -0.16489      0.00000      0.33270     -0.10252      0.00000      0.00000     -0.10252      0.00000      0.21123      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009 \n     0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009 \n     0.00000      0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00451      0.00000      0.00000      0.00000     -0.01005      0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00009      0.00000      0.00009 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.98418      0.00316      0.00316      0.00316      0.00316      0.00316      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -233.61520    -26.84563    -23.04318    -23.04318    -23.04318     -3.08628     -2.00068     -2.00068     -2.00068     -0.25761     -0.25761     -0.25761     -0.25761     -0.25761     -0.19375     -0.05051     -0.05051     -0.05051      0.06839      0.14041      0.14041      0.14041      0.76430      1.20771      1.20771      1.20771      1.20771      1.20771      1.32505      1.32505      1.32505      2.04847      2.04847      2.04847      2.04847      2.04847      2.04847      2.04847     16.12533 \n   </alphaeps>\n   <betaeps>\n  -233.61340    -26.76584    -22.98153    -22.98153    -22.98153     -2.90004     -1.81847     -1.81847     -1.81847     -0.16114     -0.09213     -0.09213     -0.09213     -0.09213     -0.09213     -0.04169     -0.04169     -0.04169      0.08343      0.15890      0.15890      0.15890      0.82918      1.32824      1.32824      1.32824      1.32824      1.32824      1.43347      1.43347      1.43347      2.17114      2.17114      2.17114      2.17114      2.17114      2.17114      2.17114     16.27730 \n   </betaeps>\n   <alphavectors>\n     0.99609      0.30160     -0.00000     -0.00000     -0.00000     -0.11297      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.02822     -0.00000     -0.00000      0.00000      0.00989     -0.00000      0.00000      0.00000     -0.05533      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.14833 \n    -0.01302      1.03446     -0.00000     -0.00000     -0.00000     -0.44686      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.11793     -0.00000     -0.00000      0.00000      0.11777     -0.00000      0.00000      0.00000     -0.13523      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.28205 \n     0.00000      0.00000     -0.00000      0.99432     -0.00000      0.00000     -0.00000     -0.00000     -0.37054      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.05924     -0.00000      0.00000     -0.00000      0.00000      0.06774      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.26170     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.99432      0.00000      0.00000     -0.00000      0.00000     -0.37054     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05924      0.00000      0.00000      0.06774      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.26170     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.99432     -0.00000     -0.37054      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.05924     -0.00000      0.00000     -0.00000      0.06774     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.26170     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.02220      0.05945     -0.00000     -0.00000     -0.00000      1.07337     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.34827      0.00000      0.00000     -0.00000     -0.07280      0.00000     -0.00000     -0.00000      0.89295      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     17.72550 \n     0.00000      0.00000     -0.00000      0.01747      0.00000     -0.00000      0.00000      0.00000      1.06962      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00149     -0.00000      0.00000     -0.00000      0.00000      0.45572     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.25169      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.01747     -0.00000     -0.00000      0.00000     -0.00000      1.06962      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00149     -0.00000      0.00000      0.45572     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.25169      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.01747      0.00000      1.06962     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00149     -0.00000     -0.00000     -0.00000      0.45572      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.25169     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00139      0.00652     -0.00000     -0.00000     -0.00000     -0.00380      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.62715     -0.00000     -0.00000      0.00000      1.81424     -0.00000      0.00000      0.00000      2.66261      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30205 \n     0.00000      0.00000     -0.00000      0.00094      0.00000     -0.00000      0.00000      0.00000      0.00827      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.47100     -0.00000      0.00000     -0.00000      0.00000      1.61246     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.96204      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00094     -0.00000     -0.00000      0.00000     -0.00000      0.00827     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.47100      0.00000      0.00000      1.61246     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.96204      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00094      0.00000      0.00827     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.47100     -0.00000      0.00000     -0.00000      1.61246      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.96204      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00056      0.00263     -0.00000     -0.00000     -0.00000     -0.00175      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.37708      0.00000      0.00000     -0.00000      1.92794     -0.00000      0.00000      0.00000      1.17340      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.16329 \n    -0.00000     -0.00000      0.00000     -0.00046     -0.00000      0.00000     -0.00000     -0.00000     -0.00288     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.64242      0.00000     -0.00000      0.00000     -0.00000     -1.35996      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.41468     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00046     -0.00000     -0.00000      0.00000     -0.00000     -0.00288      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.64242     -0.00000     -0.00000     -1.35996      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.41468     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00046     -0.00000     -0.00288      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.64242      0.00000     -0.00000      0.00000     -1.35996     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.41468     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00828      0.01540     -0.00000     -0.00000     -0.00000     -0.00252      0.00000      0.00000     -0.00000     -0.51043     -0.51383     -0.00000     -0.00000      0.00000     -0.01609      0.00000      0.00000     -0.00000     -0.06218      0.00000     -0.00000     -0.00000      0.02090      0.09598     -0.81304     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      7.97798 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.25447     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.41801     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.25447     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.41801      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00828      0.01540     -0.00000     -0.00000     -0.00000     -0.00252      0.00000      0.00000     -0.00000      0.70021     -0.18513     -0.00000     -0.00000      0.00000     -0.01609      0.00000      0.00000     -0.00000     -0.06218      0.00000     -0.00000     -0.00000      0.02090      0.65613      0.48964      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      7.97798 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.25447     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.41801      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00828      0.01540     -0.00000     -0.00000     -0.00000     -0.00252      0.00000      0.00000     -0.00000     -0.18978      0.69896     -0.00000     -0.00000      0.00000     -0.01609      0.00000      0.00000     -0.00000     -0.06218      0.00000     -0.00000     -0.00000      0.02090     -0.75211      0.32340      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      7.97798 \n     0.00153      0.00584     -0.00000     -0.00000     -0.00000     -0.00212      0.00000      0.00000     -0.00000     -0.32173     -0.32388     -0.00000     -0.00000      0.00000     -0.04371      0.00000      0.00000     -0.00000      0.00524      0.00000      0.00000     -0.00000      1.01578     -0.11643      0.98633      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.42212 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.79072      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.72024      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.79072      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.72024     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00153      0.00584     -0.00000     -0.00000     -0.00000     -0.00212      0.00000      0.00000     -0.00000      0.44136     -0.11669     -0.00000     -0.00000      0.00000     -0.04371      0.00000      0.00000     -0.00000      0.00524      0.00000      0.00000     -0.00000      1.01578     -0.79597     -0.59400     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.42212 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.79072      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.72024     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00153      0.00584     -0.00000     -0.00000     -0.00000     -0.00212      0.00000      0.00000     -0.00000     -0.11962      0.44057     -0.00000     -0.00000      0.00000     -0.04371      0.00000      0.00000     -0.00000      0.00524      0.00000      0.00000     -0.00000      1.01578      0.91240     -0.39233     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.42212 \n    -0.00000     -0.00000      0.00000     -0.00451     -0.00000      0.00000     -0.00000     -0.00000     -0.00711     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05176      0.00000     -0.00000      0.00000     -0.00000     -0.27979      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.15522     -0.00000     -0.00000     -0.98549     -0.00000     -0.16975     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00451      0.00000      0.00000     -0.00000      0.00000     -0.00711     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.05176      0.00000     -0.00000     -0.27979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.15522      0.00000     -0.00000     -0.00000      0.29483      0.00000      2.43168      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00451     -0.00000     -0.00711      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05176     -0.00000      0.00000     -0.00000     -0.27979     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.15522     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      2.28536     -0.88156     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00451     -0.00000      0.00000     -0.00000     -0.00000     -0.00711     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.05176      0.00000     -0.00000      0.00000     -0.00000     -0.27979      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.15522      0.00000      0.00000      1.80695     -0.00000     -1.65377      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      3.87298      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00451     -0.00000      0.00000     -0.00000     -0.00000     -0.00711     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05176      0.00000     -0.00000      0.00000     -0.00000     -0.27979      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.15522      0.00000      0.00000      1.14952      0.00000      2.16301      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00451      0.00000      0.00000     -0.00000      0.00000     -0.00711     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.05176      0.00000     -0.00000     -0.27979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.15522     -0.00000      0.00000      0.00000     -0.85853     -0.00000     -0.51276      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00451     -0.00000     -0.00711      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05176     -0.00000      0.00000     -0.00000     -0.27979     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.15522      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.28223      2.43318     -0.00000 \n    -0.00000     -0.00000     -0.00451      0.00000      0.00000     -0.00000      0.00000     -0.00711     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.05176      0.00000     -0.00000     -0.27979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.15522     -0.00000      0.00000     -0.00000      2.28076     -0.00000     -0.89339      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00451     -0.00000     -0.00711      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05176     -0.00000      0.00000     -0.00000     -0.27979     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.15522     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.85586     -0.51721     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99610      0.30176      0.00000      0.00000      0.00000     -0.11224     -0.00000     -0.00000      0.00000      0.02551      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.01062      0.00000      0.00000     -0.00000     -0.05737     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.14821 \n    -0.01300      1.03487      0.00000      0.00000      0.00000     -0.44479     -0.00000     -0.00000      0.00000      0.10293      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.12444      0.00000      0.00000     -0.00000     -0.14827     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.28166 \n    -0.00000     -0.00000     -0.00000      0.99522      0.00000      0.00000      0.00000     -0.36645      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05141     -0.00000     -0.00000      0.00000      0.00000      0.06665     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.26593     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.99522     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.36645      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.05141     -0.00000      0.00000      0.06665      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.26593     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.99522      0.00000     -0.36645      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.05141     -0.00000      0.00000     -0.00000      0.06665      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.26593     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.02219      0.05113      0.00000      0.00000      0.00000      1.05594      0.00000      0.00000     -0.00000     -0.30233      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.06790      0.00000     -0.00000      0.00000      0.87111     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     17.72853 \n    -0.00000     -0.00000     -0.00000      0.01459     -0.00000     -0.00000     -0.00000      1.06491     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01903      0.00000      0.00000     -0.00000     -0.00000      0.48362      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.24511      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.01459      0.00000      0.00000      0.00000      0.00000      0.00000      1.06491     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.01903     -0.00000     -0.00000      0.48362     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.24511     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.01459     -0.00000      1.06491     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.01903      0.00000      0.00000      0.00000      0.48362     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.24511      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00139      0.00574      0.00000      0.00000      0.00000     -0.00566     -0.00000     -0.00000      0.00000      0.54347      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.97261      0.00000      0.00000     -0.00000      2.56726     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.29687 \n    -0.00000     -0.00000     -0.00000      0.00052     -0.00000     -0.00000     -0.00000      0.01582     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.36117      0.00000      0.00000     -0.00000     -0.00000      1.67108      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.90788      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00052      0.00000      0.00000      0.00000      0.00000      0.00000      0.01582     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.36117     -0.00000     -0.00000      1.67108     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.90788      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00052     -0.00000      0.01582     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.36117      0.00000      0.00000      0.00000      1.67108     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.90788      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00056      0.00232      0.00000      0.00000      0.00000     -0.00261     -0.00000     -0.00000      0.00000     -0.52102      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.92843      0.00000      0.00000     -0.00000      1.11645     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.16098 \n     0.00000      0.00000      0.00000     -0.00026      0.00000      0.00000      0.00000     -0.00544      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.73823     -0.00000     -0.00000      0.00000      0.00000     -1.31849     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.38827     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00026     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00544     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.73823     -0.00000      0.00000     -1.31849      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.38827     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00026      0.00000     -0.00544      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.73823     -0.00000     -0.00000     -0.00000     -1.31849      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.38827     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00828      0.01267      0.00000      0.00000      0.00000     -0.00842     -0.00000     -0.00000      0.00000     -0.00527     -0.36393      0.59441      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.06026     -0.00000     -0.00000      0.00000      0.00513      0.18794     -0.82081      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      7.97804 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.20719      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.45847     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.20719      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.45847      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00828      0.01267      0.00000      0.00000      0.00000     -0.00842     -0.00000     -0.00000      0.00000     -0.00527      0.69674      0.01797      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.06026     -0.00000     -0.00000      0.00000      0.00513     -0.80481      0.24765     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      7.97804 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.20719      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.45847     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00828      0.01267      0.00000      0.00000      0.00000     -0.00842     -0.00000     -0.00000      0.00000     -0.00527     -0.33281     -0.61238      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.06026     -0.00000     -0.00000      0.00000      0.00513      0.61687      0.57316      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      7.97804 \n     0.00152      0.00512      0.00000      0.00000      0.00000     -0.00629     -0.00000     -0.00000      0.00000     -0.00646     -0.25529      0.41697      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.04227      0.00000      0.00000     -0.00000      1.01484     -0.21820      0.95298     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.42448 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.84682     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.69332      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.84682     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.69332     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00152      0.00512      0.00000      0.00000      0.00000     -0.00629     -0.00000     -0.00000      0.00000     -0.00646      0.48875      0.01260      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.04227      0.00000      0.00000     -0.00000      1.01484      0.93440     -0.28752      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.42448 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.84682     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.69332      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00152      0.00512      0.00000      0.00000      0.00000     -0.00629     -0.00000     -0.00000      0.00000     -0.00646     -0.23346     -0.42957      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.04227      0.00000      0.00000     -0.00000      1.01484     -0.71621     -0.66546     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.42448 \n     0.00000      0.00000      0.00000     -0.00347      0.00000      0.00000      0.00000     -0.00217      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.04875     -0.00000     -0.00000      0.00000      0.00000     -0.31658     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.14584     -0.00000      0.00000     -0.99743      0.00000     -0.07161      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00347     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04875      0.00000      0.00000     -0.31658      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.14584      0.00000     -0.00000      0.00000      0.88970     -0.00000      2.28220      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00347      0.00000     -0.00217      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.04875     -0.00000     -0.00000     -0.00000     -0.31658      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.14584      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.99943     -1.41502     -0.00000 \n     0.00000      0.00000      0.00000     -0.00347      0.00000      0.00000      0.00000     -0.00217      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.04875     -0.00000     -0.00000      0.00000      0.00000     -0.31658     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.14584      0.00000     -0.00000      1.63482      0.00000     -1.82410      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      3.87298     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00347      0.00000      0.00000      0.00000     -0.00217      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.04875     -0.00000     -0.00000      0.00000      0.00000     -0.31658     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.14584      0.00000     -0.00000      1.35748     -0.00000      2.03894      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00347     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00217      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.04875      0.00000      0.00000     -0.31658      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.14584     -0.00000      0.00000     -0.00000     -0.95900      0.00000     -0.28340      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00347      0.00000     -0.00217      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.04875     -0.00000     -0.00000     -0.00000     -0.31658      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.14584      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.87023      2.28969     -0.00000 \n    -0.00000      0.00000     -0.00347     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04875      0.00000      0.00000     -0.31658      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.14584      0.00000     -0.00000      0.00000      1.98731      0.00000     -1.43200      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00347      0.00000     -0.00217      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.04875     -0.00000     -0.00000     -0.00000     -0.31658      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.14584     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.95655     -0.29156     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Fe\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.19552      0.70963      0.00000      0.00000      0.00000     -0.19269      0.00000      0.00000      0.00000      0.03802      0.00000      0.00000      0.00000     -0.02090      0.00000      0.00000      0.00000      0.02107      0.00000      0.00000      0.02107      0.00000      0.02107      0.00577      0.00000      0.00000      0.00577      0.00000      0.00577      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.70963      2.56991      0.00000      0.00000      0.00000     -0.93524      0.00000      0.00000      0.00000      0.14149      0.00000      0.00000      0.00000     -0.09192      0.00000      0.00000      0.00000      0.02276      0.00000      0.00000      0.02276      0.00000      0.02276      0.00899      0.00000      0.00000      0.00899      0.00000      0.00899      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.25724      0.00000      0.00000      0.00000     -0.76338      0.00000      0.00000      0.00000     -0.00547      0.00000      0.00000      0.00000      0.00135      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00495      0.00000      0.00000     -0.00495      0.00000     -0.00495      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25724      0.00000      0.00000      0.00000     -0.76338      0.00000      0.00000      0.00000     -0.00547      0.00000      0.00000      0.00000      0.00135      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000      0.00000     -0.00495      0.00000     -0.00495      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25724      0.00000      0.00000      0.00000     -0.76338      0.00000      0.00000      0.00000     -0.00547      0.00000      0.00000      0.00000      0.00135      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000      0.00000     -0.00495      0.00000     -0.00495 \n    -0.19269     -0.93524      0.00000      0.00000      0.00000      2.46887      0.00000      0.00000      0.00000     -0.36774      0.00000      0.00000      0.00000      0.27954      0.00000      0.00000      0.00000     -0.00615      0.00000      0.00000     -0.00615      0.00000     -0.00615      0.00655      0.00000      0.00000      0.00655      0.00000      0.00655      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.76338      0.00000      0.00000      0.00000      2.27050      0.00000      0.00000      0.00000      0.01971      0.00000      0.00000      0.00000     -0.00541      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000     -0.00542      0.00000     -0.00542      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.76338      0.00000      0.00000      0.00000      2.27050      0.00000      0.00000      0.00000      0.01971      0.00000      0.00000      0.00000     -0.00541      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000      0.00000     -0.00542      0.00000     -0.00542      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.76338      0.00000      0.00000      0.00000      2.27050      0.00000      0.00000      0.00000      0.01971      0.00000      0.00000      0.00000     -0.00541      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000      0.00000     -0.00542      0.00000     -0.00542 \n     0.03802      0.14149      0.00000      0.00000      0.00000     -0.36774      0.00000      0.00000      0.00000      0.65268      0.00000      0.00000      0.00000     -0.51787      0.00000      0.00000      0.00000     -0.00985      0.00000      0.00000     -0.00985      0.00000     -0.00985     -0.02805      0.00000      0.00000     -0.02805      0.00000     -0.02805      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00547      0.00000      0.00000      0.00000      0.01971      0.00000      0.00000      0.00000      0.00018      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000     -0.00004      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00547      0.00000      0.00000      0.00000      0.01971      0.00000      0.00000      0.00000      0.00018      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00000     -0.00004      0.00000     -0.00004      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00547      0.00000      0.00000      0.00000      0.01971      0.00000      0.00000      0.00000      0.00018      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00000     -0.00004      0.00000     -0.00004 \n    -0.02090     -0.09192      0.00000      0.00000      0.00000      0.27954      0.00000      0.00000      0.00000     -0.51787      0.00000      0.00000      0.00000      0.42270      0.00000      0.00000      0.00000      0.00757      0.00000      0.00000      0.00757      0.00000      0.00757      0.02067      0.00000      0.00000      0.02067      0.00000      0.02067      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00135      0.00000      0.00000      0.00000     -0.00541      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00135      0.00000      0.00000      0.00000     -0.00541      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00135      0.00000      0.00000      0.00000     -0.00541      0.00000      0.00000      0.00000     -0.00005      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001 \n     0.02107      0.02276      0.00000      0.00000      0.00000     -0.00615      0.00000      0.00000      0.00000     -0.00985      0.00000      0.00000      0.00000      0.00757      0.00000      0.00000      0.00000      0.64324      0.00000      0.00000     -0.32080      0.00000     -0.32081      0.40026      0.00000      0.00000     -0.19910      0.00000     -0.19910      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.92809      0.00000      0.00000      0.00000      0.00000      0.00000      1.19871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.92809      0.00000      0.00000      0.00000      0.00000      0.00000      1.19871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02107      0.02276      0.00000      0.00000      0.00000     -0.00615      0.00000      0.00000      0.00000     -0.00985      0.00000      0.00000      0.00000      0.00757      0.00000      0.00000      0.00000     -0.32080      0.00000      0.00000      0.64324      0.00000     -0.32080     -0.19910      0.00000      0.00000      0.40026      0.00000     -0.19910      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.92809      0.00000      0.00000      0.00000      0.00000      0.00000      1.19871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02107      0.02276      0.00000      0.00000      0.00000     -0.00615      0.00000      0.00000      0.00000     -0.00985      0.00000      0.00000      0.00000      0.00757      0.00000      0.00000      0.00000     -0.32081      0.00000      0.00000     -0.32080      0.00000      0.64325     -0.19910      0.00000      0.00000     -0.19910      0.00000      0.40026      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00577      0.00899      0.00000      0.00000      0.00000      0.00655      0.00000      0.00000      0.00000     -0.02805      0.00000      0.00000      0.00000      0.02067      0.00000      0.00000      0.00000      0.40026      0.00000      0.00000     -0.19910      0.00000     -0.19910      0.25026      0.00000      0.00000     -0.12277      0.00000     -0.12277      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19871      0.00000      0.00000      0.00000      0.00000      0.00000      0.74606      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19871      0.00000      0.00000      0.00000      0.00000      0.00000      0.74606      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00577      0.00899      0.00000      0.00000      0.00000      0.00655      0.00000      0.00000      0.00000     -0.02805      0.00000      0.00000      0.00000      0.02067      0.00000      0.00000      0.00000     -0.19910      0.00000      0.00000      0.40026      0.00000     -0.19910     -0.12277      0.00000      0.00000      0.25026      0.00000     -0.12277      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19871      0.00000      0.00000      0.00000      0.00000      0.00000      0.74606      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00577      0.00899      0.00000      0.00000      0.00000      0.00655      0.00000      0.00000      0.00000     -0.02805      0.00000      0.00000      0.00000      0.02067      0.00000      0.00000      0.00000     -0.19910      0.00000      0.00000     -0.19910      0.00000      0.40026     -0.12277      0.00000      0.00000     -0.12277      0.00000      0.25026      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00005      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00005      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00005 \n     0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00005      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00005      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00005      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00005 \n     0.00000      0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00005      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00495      0.00000      0.00000      0.00000     -0.00542      0.00000      0.00000      0.00000     -0.00004      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00005      0.00000      0.00005 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.96395      0.20721      0.20721      0.20721      0.20721      0.20721      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -254.14780    -29.54467    -25.53093    -25.53093    -25.53093     -3.35172     -2.17829     -2.17829     -2.17829     -0.26749     -0.26749     -0.26749     -0.26749     -0.26749     -0.19512     -0.04611     -0.04611     -0.04611      0.07962      0.16592      0.16592      0.16592      0.84705      1.28148      1.28148      1.28148      1.33179      1.33179      1.33179      1.33179      1.33179      2.10760      2.10760      2.10760      2.10760      2.10760      2.10760      2.10760     20.09184 \n   </alphaeps>\n   <betaeps>\n  -254.14620    -29.47439    -25.47684    -25.47684    -25.47684     -3.20013     -2.03016     -2.03016     -2.03016     -0.17008     -0.13310     -0.13310     -0.13310     -0.13310     -0.13310     -0.03949     -0.03949     -0.03949      0.09147      0.18062      0.18062      0.18062      0.89750      1.35712      1.35712      1.35712      1.42727      1.42727      1.42727      1.42727      1.42727      2.19518      2.19518      2.19518      2.19518      2.19518      2.19518      2.19518     20.21117 \n   </betaeps>\n   <alphavectors>\n     0.99607      0.30316      0.00000     -0.00000     -0.00000     -0.11413     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.02762     -0.00000      0.00000     -0.00000      0.00999     -0.00000      0.00000     -0.00000     -0.05566      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.17822 \n    -0.01308      1.03458      0.00000     -0.00000     -0.00000     -0.45034     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.11506     -0.00000      0.00000     -0.00000      0.11954      0.00000      0.00000     -0.00000     -0.13523      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.48750 \n    -0.00000      0.00000      0.00000     -0.00000      0.99487      0.00000      0.00000     -0.00000     -0.37339     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05921      0.00000      0.00000      0.00000      0.08202     -0.00000     -0.00000      0.00000     -0.22779      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.99487      0.00000     -0.00000     -0.00000     -0.37339      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05921      0.00000     -0.00000     -0.00000      0.08202      0.00000     -0.00000      0.00000     -0.22779      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.99487     -0.00000     -0.00000      0.00000     -0.37339      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.05921      0.00000     -0.00000     -0.00000      0.08202      0.00000     -0.00000     -0.00000     -0.22779     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.01991      0.04659      0.00000     -0.00000     -0.00000      1.07269      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.33087      0.00000     -0.00000      0.00000     -0.05222      0.00000     -0.00000      0.00000      0.89897     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     18.71760 \n    -0.00000      0.00000      0.00000     -0.00000      0.01545     -0.00000     -0.00000      0.00000      1.06778     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04638      0.00000      0.00000      0.00000      0.33002      0.00000     -0.00000     -0.00000      1.09967     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.01545     -0.00000      0.00000      0.00000      1.06778     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.04638      0.00000     -0.00000     -0.00000      0.33002     -0.00000      0.00000     -0.00000      1.09967      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.01545      0.00000      0.00000     -0.00000      1.06778      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.04638      0.00000     -0.00000     -0.00000      0.33002     -0.00000      0.00000      0.00000      1.09967     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00150      0.00633      0.00000     -0.00000     -0.00000     -0.00389     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.60635     -0.00000      0.00000     -0.00000      1.82199      0.00000      0.00000     -0.00000      2.60571     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.18731 \n    -0.00000      0.00000      0.00000     -0.00000      0.00082     -0.00000     -0.00000      0.00000      0.00702     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.41527      0.00000      0.00000      0.00000      1.67848      0.00000     -0.00000     -0.00000      1.07539      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00082     -0.00000      0.00000      0.00000      0.00702      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.41527      0.00000     -0.00000     -0.00000      1.67848     -0.00000      0.00000     -0.00000      1.07539      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00082      0.00000      0.00000     -0.00000      0.00702      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.41527      0.00000     -0.00000     -0.00000      1.67848     -0.00000      0.00000      0.00000      1.07539     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00060      0.00256      0.00000     -0.00000     -0.00000     -0.00182     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.41011      0.00000     -0.00000      0.00000      1.90208      0.00000      0.00000     -0.00000      1.13249     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.11907 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00032      0.00000      0.00000     -0.00000     -0.00183      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.69500     -0.00000     -0.00000     -0.00000     -1.33665     -0.00000      0.00000      0.00000     -0.43900     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00032      0.00000     -0.00000     -0.00000     -0.00183      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.69500     -0.00000      0.00000      0.00000     -1.33665      0.00000     -0.00000      0.00000     -0.43900     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00032     -0.00000     -0.00000      0.00000     -0.00183     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.69500     -0.00000      0.00000      0.00000     -1.33665      0.00000     -0.00000     -0.00000     -0.43900      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00726      0.01016      0.00000     -0.00000     -0.00000     -0.00334     -0.00000      0.00000     -0.00000     -0.09230      0.00000      0.00000      0.00000      0.72747     -0.01236      0.00000     -0.00000      0.00000     -0.05257     -0.00000     -0.00000      0.00000      0.02590     -0.00000      0.00000     -0.00000      0.10550      0.00000      0.00000     -0.00000     -0.79765     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      8.42812 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.27012      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.39360     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.27012     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.39360      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00726      0.01016      0.00000     -0.00000     -0.00000     -0.00334     -0.00000      0.00000     -0.00000     -0.58386      0.00000      0.00000      0.00000     -0.44367     -0.01236      0.00000     -0.00000      0.00000     -0.05257     -0.00000     -0.00000      0.00000      0.02590     -0.00000      0.00000     -0.00000      0.63803      0.00000      0.00000     -0.00000      0.49018      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      8.42812 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.27012      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.39360     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00726      0.01016      0.00000     -0.00000     -0.00000     -0.00334     -0.00000      0.00000     -0.00000      0.67616      0.00000      0.00000      0.00000     -0.28381     -0.01236      0.00000     -0.00000      0.00000     -0.05257     -0.00000     -0.00000      0.00000      0.02590     -0.00000      0.00000     -0.00000     -0.74353     -0.00000     -0.00000      0.00000      0.30746     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      8.42812 \n     0.00151      0.00530      0.00000     -0.00000     -0.00000     -0.00254     -0.00000      0.00000     -0.00000     -0.05655      0.00000      0.00000      0.00000      0.44571     -0.03676      0.00000     -0.00000      0.00000      0.01342      0.00000      0.00000     -0.00000      1.00983     -0.00000     -0.00000     -0.00000     -0.13001     -0.00000     -0.00000      0.00000      0.98303      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.51745 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.77818      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.71748     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.77818      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.71748     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00151      0.00530      0.00000     -0.00000     -0.00000     -0.00254     -0.00000      0.00000     -0.00000     -0.35772      0.00000      0.00000      0.00000     -0.27183     -0.03676      0.00000     -0.00000      0.00000      0.01342      0.00000      0.00000     -0.00000      1.00983     -0.00000     -0.00000     -0.00000     -0.78632     -0.00000     -0.00000      0.00000     -0.60411     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.51745 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.77818     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.71748      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00151      0.00530      0.00000     -0.00000     -0.00000     -0.00254     -0.00000      0.00000     -0.00000      0.41427      0.00000      0.00000      0.00000     -0.17388     -0.03676      0.00000     -0.00000      0.00000      0.01342      0.00000      0.00000     -0.00000      1.00983     -0.00000     -0.00000     -0.00000      0.91633      0.00000      0.00000     -0.00000     -0.37892      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.51745 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00376      0.00000      0.00000     -0.00000     -0.00490      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.04558     -0.00000     -0.00000     -0.00000     -0.31967     -0.00000      0.00000      0.00000     -1.17184     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.27376      0.00000     -0.00000     -0.00000     -0.96180      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00376      0.00000     -0.00000     -0.00000     -0.00490     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04558     -0.00000      0.00000      0.00000     -0.31967      0.00000     -0.00000      0.00000     -1.17184      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.15417      0.00000      0.00000     -0.00000      2.44463     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00376      0.00000      0.00000      0.00000     -0.00490      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04558      0.00000     -0.00000      0.00000     -0.31967     -0.00000      0.00000     -0.00000     -1.17184      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.30152      0.00000      0.00000      0.00000      2.43086      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00376      0.00000      0.00000     -0.00000     -0.00490      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.04558      0.00000      0.00000      0.00000     -0.31967      0.00000     -0.00000     -0.00000     -1.17184      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.45187     -0.00000      0.00000      0.00000      1.97283      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      3.87298     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00376      0.00000      0.00000     -0.00000     -0.00490      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.04558      0.00000      0.00000      0.00000     -0.31967      0.00000     -0.00000     -0.00000     -1.17184      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      2.27315     -0.00000      0.00000      0.00000      0.91256      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00376      0.00000     -0.00000     -0.00000     -0.00490      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.04558     -0.00000      0.00000      0.00000     -0.31967     -0.00000     -0.00000      0.00000     -1.17184     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.75046     -0.00000     -0.00000      0.00000     -0.66092      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00376      0.00000      0.00000      0.00000     -0.00490     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.04558     -0.00000      0.00000      0.00000     -0.31967      0.00000     -0.00000     -0.00000     -1.17184     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      2.27829     -0.00000     -0.00000     -0.00000     -0.89966     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00376      0.00000     -0.00000     -0.00000     -0.00490     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04558     -0.00000      0.00000      0.00000     -0.31967     -0.00000      0.00000      0.00000     -1.17184     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.40555     -0.00000     -0.00000      0.00000     -0.46188      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00376      0.00000      0.00000      0.00000     -0.00490     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.04558     -0.00000      0.00000      0.00000     -0.31967      0.00000     -0.00000      0.00000     -1.17184     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.85994     -0.00000     -0.00000     -0.00000     -0.51040      0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99607      0.30328     -0.00000      0.00000      0.00000     -0.11357      0.00000      0.00000     -0.00000      0.02577      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.01059     -0.00000      0.00000      0.00000     -0.05718     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.17811 \n    -0.01307      1.03495     -0.00000      0.00000      0.00000     -0.44888      0.00000      0.00000     -0.00000      0.10463      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.12464     -0.00000      0.00000      0.00000     -0.14476     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.48714 \n     0.00000     -0.00000      0.00000     -0.00000      0.99552      0.00000     -0.00000     -0.00000     -0.37013     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05317      0.00000      0.00000      0.00000      0.08099     -0.00000     -0.00000     -0.00000     -0.23210     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.99552     -0.00000     -0.00000      0.00000     -0.37013     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05317     -0.00000     -0.00000      0.00000      0.08099     -0.00000     -0.00000     -0.00000     -0.23210      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.99552     -0.00000     -0.00000     -0.00000     -0.37013     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05317     -0.00000      0.00000      0.00000      0.08099      0.00000     -0.00000     -0.00000     -0.23210     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.01991      0.04151     -0.00000      0.00000      0.00000      1.05707     -0.00000     -0.00000      0.00000     -0.29982     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.04847      0.00000     -0.00000     -0.00000      0.88498      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     18.71970 \n     0.00000     -0.00000      0.00000     -0.00000      0.01345     -0.00000      0.00000      0.00000      1.06298      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.05356     -0.00000     -0.00000     -0.00000      0.34908      0.00000     -0.00000      0.00000      1.09813      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.01345      0.00000      0.00000     -0.00000      1.06298      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.05356     -0.00000     -0.00000      0.00000      0.34908      0.00000      0.00000      0.00000      1.09813      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.01345      0.00000      0.00000      0.00000      1.06298      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.05356     -0.00000      0.00000      0.00000      0.34908     -0.00000     -0.00000      0.00000      1.09813     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00150      0.00571     -0.00000      0.00000      0.00000     -0.00607      0.00000      0.00000     -0.00000      0.54364      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.93238     -0.00000      0.00000      0.00000      2.53941      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.18417 \n     0.00000     -0.00000      0.00000     -0.00000      0.00058     -0.00000      0.00000      0.00000      0.01147      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.34047     -0.00000     -0.00000     -0.00000      1.72438      0.00000     -0.00000      0.00000      1.02797      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00058      0.00000      0.00000     -0.00000      0.01147     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34047      0.00000     -0.00000      0.00000      1.72438      0.00000      0.00000      0.00000      1.02797      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00058     -0.00000     -0.00000      0.00000      0.01147      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.34047     -0.00000      0.00000      0.00000      1.72438     -0.00000     -0.00000      0.00000      1.02797     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00060      0.00231     -0.00000      0.00000      0.00000     -0.00278      0.00000      0.00000     -0.00000     -0.51381     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.89986     -0.00000      0.00000      0.00000      1.09339      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.11767 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00022      0.00000     -0.00000     -0.00000     -0.00324     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.75851      0.00000     -0.00000      0.00000     -1.30913     -0.00000      0.00000     -0.00000     -0.41618     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00022     -0.00000     -0.00000      0.00000     -0.00324      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.75851     -0.00000      0.00000     -0.00000     -1.30913     -0.00000     -0.00000     -0.00000     -0.41618     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00022      0.00000      0.00000     -0.00000     -0.00324     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.75851      0.00000     -0.00000     -0.00000     -1.30913      0.00000      0.00000     -0.00000     -0.41618      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00726      0.00864     -0.00000      0.00000      0.00000     -0.00869      0.00000      0.00000     -0.00000     -0.00487     -0.00000     -0.11909      0.00000     -0.00000      0.70169     -0.00000      0.00000     -0.00000     -0.05077      0.00000     -0.00000     -0.00000      0.01516     -0.00000      0.00000     -0.00000      0.00000      0.15535     -0.00000     -0.80896      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      8.42816 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.23274      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.42676      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.23274      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.42676      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00726      0.00864     -0.00000      0.00000      0.00000     -0.00869      0.00000      0.00000     -0.00000     -0.00487     -0.00000     -0.54814      0.00000     -0.00000     -0.45398     -0.00000      0.00000     -0.00000     -0.05077      0.00000     -0.00000     -0.00000      0.01516     -0.00000      0.00000     -0.00000      0.00000      0.62290     -0.00000      0.53902     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      8.42816 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.23274     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.42676      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00726      0.00864     -0.00000      0.00000      0.00000     -0.00869      0.00000      0.00000     -0.00000     -0.00487     -0.00000      0.66723      0.00000     -0.00000     -0.24771     -0.00000      0.00000     -0.00000     -0.05077      0.00000     -0.00000     -0.00000      0.01516     -0.00000      0.00000     -0.00000     -0.00000     -0.77826      0.00000      0.26994     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      8.42816 \n     0.00151      0.00478     -0.00000      0.00000      0.00000     -0.00627      0.00000      0.00000     -0.00000     -0.01120     -0.00000     -0.07955      0.00000     -0.00000      0.46870     -0.00000      0.00000     -0.00000      0.03932     -0.00000      0.00000      0.00000      1.00898     -0.00000     -0.00000     -0.00000     -0.00000     -0.18470      0.00000      0.96176     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.51893 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.82342      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.69626      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.82342     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.69626      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00151      0.00478     -0.00000      0.00000      0.00000     -0.00627      0.00000      0.00000     -0.00000     -0.01120     -0.00000     -0.36613      0.00000     -0.00000     -0.30324     -0.00000      0.00000     -0.00000      0.03932     -0.00000      0.00000      0.00000      1.00898     -0.00000     -0.00000     -0.00000     -0.00000     -0.74056      0.00000     -0.64083      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.51893 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.82342     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.69626     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00151      0.00478     -0.00000      0.00000      0.00000     -0.00627      0.00000      0.00000     -0.00000     -0.01120     -0.00000      0.44568      0.00000     -0.00000     -0.16546     -0.00000      0.00000     -0.00000      0.03932     -0.00000      0.00000      0.00000      1.00898     -0.00000     -0.00000     -0.00000      0.00000      0.92526     -0.00000     -0.32093      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.51893 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00308      0.00000     -0.00000     -0.00000     -0.00008     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.04407      0.00000      0.00000      0.00000     -0.35100      0.00000      0.00000     -0.00000     -1.16291     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.52760      0.00000     -0.84949     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00308     -0.00000     -0.00000      0.00000     -0.00008      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.04407      0.00000      0.00000     -0.00000     -0.35100     -0.00000     -0.00000     -0.00000     -1.16291      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.34814     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.42462     -0.00000 \n    -0.00000     -0.00000     -0.00308      0.00000      0.00000     -0.00000     -0.00008     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.04407      0.00000     -0.00000     -0.00000     -0.35100     -0.00000     -0.00000     -0.00000     -1.16291      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.20532      0.00000      0.00000      2.44087     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00308      0.00000     -0.00000     -0.00000     -0.00008     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.04407      0.00000      0.00000      0.00000     -0.35100     -0.00000      0.00000      0.00000     -1.16291     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.85362     -0.00000      2.29594     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      3.87298     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00308      0.00000     -0.00000     -0.00000     -0.00008     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.04407     -0.00000      0.00000     -0.00000     -0.35100     -0.00000      0.00000      0.00000     -1.16291      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      2.43644     -0.00000      0.25253     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00308      0.00000     -0.00000      0.00000     -0.00008     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.04407      0.00000      0.00000     -0.00000     -0.35100     -0.00000     -0.00000     -0.00000     -1.16291     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.69551      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.71852     -0.00000 \n    -0.00000     -0.00000     -0.00308      0.00000      0.00000     -0.00000     -0.00008     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.04407     -0.00000      0.00000     -0.00000     -0.35100      0.00000      0.00000     -0.00000     -1.16291     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      2.31203     -0.00000     -0.00000     -0.80902     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00308      0.00000     -0.00000      0.00000     -0.00008      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.04407      0.00000      0.00000     -0.00000     -0.35100     -0.00000     -0.00000     -0.00000     -1.16291     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      2.43467      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.26907     -0.00000 \n    -0.00000     -0.00000     -0.00308      0.00000      0.00000     -0.00000     -0.00008     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.04407     -0.00000      0.00000     -0.00000     -0.35100      0.00000      0.00000     -0.00000     -1.16291     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.83912     -0.00000     -0.00000     -0.54395     -0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Co\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.19763      0.71354      0.00000      0.00000      0.00000     -0.20478      0.00000      0.00000      0.00000      0.03619      0.00000      0.00000      0.00000     -0.02017      0.00000      0.00000      0.00000      0.01630      0.00000      0.00000      0.01630      0.00000      0.01630      0.00586      0.00000      0.00000      0.00586      0.00000      0.00586      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.71354      2.57203      0.00000      0.00000      0.00000     -0.95422      0.00000      0.00000      0.00000      0.13252      0.00000      0.00000      0.00000     -0.08835      0.00000      0.00000      0.00000      0.01510      0.00000      0.00000      0.01510      0.00000      0.01510      0.00971      0.00000      0.00000      0.00971      0.00000      0.00971      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.26228      0.00000      0.00000      0.00000     -0.76946      0.00000      0.00000      0.00000     -0.00382      0.00000      0.00000      0.00000      0.00078      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00635      0.00000      0.00000     -0.00635      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26228      0.00000      0.00000      0.00000     -0.76946      0.00000      0.00000      0.00000     -0.00382      0.00000      0.00000      0.00000      0.00078      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00000     -0.00635      0.00000     -0.00635      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26228      0.00000      0.00000      0.00000     -0.76946      0.00000      0.00000      0.00000     -0.00382      0.00000      0.00000      0.00000      0.00078      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00000     -0.00635      0.00000     -0.00635 \n    -0.20478     -0.95422      0.00000      0.00000      0.00000      2.44104      0.00000      0.00000      0.00000     -0.33832      0.00000      0.00000      0.00000      0.26475      0.00000      0.00000      0.00000     -0.01026      0.00000      0.00000     -0.01026      0.00000     -0.01026      0.00213      0.00000      0.00000      0.00213      0.00000      0.00213      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.76946      0.00000      0.00000      0.00000      2.26069      0.00000      0.00000      0.00000      0.01524      0.00000      0.00000      0.00000     -0.00391      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00099      0.00000      0.00099      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.76946      0.00000      0.00000      0.00000      2.26069      0.00000      0.00000      0.00000      0.01524      0.00000      0.00000      0.00000     -0.00391      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00000      0.00099      0.00000      0.00099      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.76946      0.00000      0.00000      0.00000      2.26069      0.00000      0.00000      0.00000      0.01524      0.00000      0.00000      0.00000     -0.00391      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00000      0.00099      0.00000      0.00099 \n     0.03619      0.13252      0.00000      0.00000      0.00000     -0.33832      0.00000      0.00000      0.00000      0.61524      0.00000      0.00000      0.00000     -0.50519      0.00000      0.00000      0.00000     -0.00621      0.00000      0.00000     -0.00621      0.00000     -0.00621     -0.02327      0.00000      0.00000     -0.02327      0.00000     -0.02327      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00382      0.00000      0.00000      0.00000      0.01524      0.00000      0.00000      0.00000      0.00011      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00382      0.00000      0.00000      0.00000      0.01524      0.00000      0.00000      0.00000      0.00011      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00382      0.00000      0.00000      0.00000      0.01524      0.00000      0.00000      0.00000      0.00011      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001 \n    -0.02017     -0.08835      0.00000      0.00000      0.00000      0.26475      0.00000      0.00000      0.00000     -0.50519      0.00000      0.00000      0.00000      0.42144      0.00000      0.00000      0.00000      0.00508      0.00000      0.00000      0.00508      0.00000      0.00508      0.01852      0.00000      0.00000      0.01852      0.00000      0.01852      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00078      0.00000      0.00000      0.00000     -0.00391      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00078      0.00000      0.00000      0.00000     -0.00391      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00078      0.00000      0.00000      0.00000     -0.00391      0.00000      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.01630      0.01510      0.00000      0.00000      0.00000     -0.01026      0.00000      0.00000      0.00000     -0.00621      0.00000      0.00000      0.00000      0.00508      0.00000      0.00000      0.00000      0.75974      0.00000      0.00000     -0.37943      0.00000     -0.37943      0.47319      0.00000      0.00000     -0.23599      0.00000     -0.23599      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.27837      0.00000      0.00000      0.00000      0.00000      0.00000      1.41835      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.27837      0.00000      0.00000      0.00000      0.00000      0.00000      1.41835      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01630      0.01510      0.00000      0.00000      0.00000     -0.01026      0.00000      0.00000      0.00000     -0.00621      0.00000      0.00000      0.00000      0.00508      0.00000      0.00000      0.00000     -0.37943      0.00000      0.00000      0.75975      0.00000     -0.37944     -0.23599      0.00000      0.00000      0.47319      0.00000     -0.23599      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.27837      0.00000      0.00000      0.00000      0.00000      0.00000      1.41835      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01630      0.01510      0.00000      0.00000      0.00000     -0.01026      0.00000      0.00000      0.00000     -0.00621      0.00000      0.00000      0.00000      0.00508      0.00000      0.00000      0.00000     -0.37943      0.00000      0.00000     -0.37944      0.00000      0.75975     -0.23599      0.00000      0.00000     -0.23599      0.00000      0.47319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00586      0.00971      0.00000      0.00000      0.00000      0.00213      0.00000      0.00000      0.00000     -0.02327      0.00000      0.00000      0.00000      0.01852      0.00000      0.00000      0.00000      0.47319      0.00000      0.00000     -0.23599      0.00000     -0.23599      0.29562      0.00000      0.00000     -0.14620      0.00000     -0.14620      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.41835      0.00000      0.00000      0.00000      0.00000      0.00000      0.88363      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.41835      0.00000      0.00000      0.00000      0.00000      0.00000      0.88363      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00586      0.00971      0.00000      0.00000      0.00000      0.00213      0.00000      0.00000      0.00000     -0.02327      0.00000      0.00000      0.00000      0.01852      0.00000      0.00000      0.00000     -0.23599      0.00000      0.00000      0.47319      0.00000     -0.23599     -0.14620      0.00000      0.00000      0.29562      0.00000     -0.14620      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.41835      0.00000      0.00000      0.00000      0.00000      0.00000      0.88363      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00586      0.00971      0.00000      0.00000      0.00000      0.00213      0.00000      0.00000      0.00000     -0.02327      0.00000      0.00000      0.00000      0.01852      0.00000      0.00000      0.00000     -0.23599      0.00000      0.00000     -0.23599      0.00000      0.47319     -0.14620      0.00000      0.00000     -0.14620      0.00000      0.29562      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003 \n     0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003 \n     0.00000      0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00635      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.88497      0.42301      0.42301      0.42301      0.42301      0.42301      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -275.52110    -32.33234    -28.10662    -28.10662    -28.10662     -3.59897     -2.33602     -2.33602     -2.33602     -0.25389     -0.25389     -0.25389     -0.25389     -0.25389     -0.19296     -0.04456     -0.04456     -0.04456      0.08843      0.15065      0.15065      0.15065      0.93984      1.29795      1.29795      1.29795      1.49879      1.49879      1.49879      1.49879      1.49879      2.17480      2.17480      2.17480      2.17480      2.17480      2.17480      2.17480     25.66898 \n   </alphaeps>\n   <betaeps>\n  -275.51970    -32.27681    -28.06401    -28.06401    -28.06401     -3.48657     -2.22617     -2.22617     -2.22617     -0.17348     -0.15375     -0.15375     -0.15375     -0.15375     -0.15375     -0.03777     -0.03777     -0.03777      0.09807      0.16207      0.16207      0.16207      0.97843      1.34934      1.34934      1.34934      1.57028      1.57028      1.57028      1.57028      1.57028      2.23394      2.23394      2.23394      2.23394      2.23394      2.23394      2.23394     25.75496 \n   </betaeps>\n   <alphavectors>\n     0.99602      0.30473      0.00000     -0.00000     -0.00000     -0.11514     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.02697     -0.00000      0.00000     -0.00000      0.01070      0.00000     -0.00000     -0.00000     -0.05619      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.21537 \n    -0.01328      1.03437      0.00000     -0.00000     -0.00000     -0.45286     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.11100     -0.00000      0.00000     -0.00000      0.11846      0.00000     -0.00000     -0.00000     -0.14526      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.74937 \n     0.00000      0.00000      0.00000     -0.00000      0.99525      0.00000      0.00000     -0.00000     -0.37553      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05918      0.00000      0.00000      0.00000      0.08005     -0.00000      0.00000     -0.00000     -0.20592      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99525      0.00000     -0.00000     -0.00000     -0.37553     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.05918      0.00000      0.00000     -0.00000      0.08005     -0.00000      0.00000     -0.00000     -0.20592     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.99525     -0.00000     -0.00000      0.00000     -0.37553     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05918     -0.00000      0.00000     -0.00000      0.08005     -0.00000      0.00000     -0.00000     -0.20592     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.01715      0.03533      0.00000     -0.00000     -0.00000      1.06958      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.31303      0.00000     -0.00000      0.00000     -0.04214     -0.00000      0.00000      0.00000      0.88303     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     20.17196 \n     0.00000      0.00000      0.00000     -0.00000      0.01401     -0.00000     -0.00000      0.00000      1.06505     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.12465     -0.00000     -0.00000     -0.00000     -0.00978      0.00000     -0.00000      0.00000      0.80906     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.01401     -0.00000      0.00000      0.00000      1.06505      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.12465     -0.00000     -0.00000      0.00000     -0.00978      0.00000     -0.00000      0.00000      0.80906     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.01401      0.00000      0.00000     -0.00000      1.06505      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.12465      0.00000     -0.00000      0.00000     -0.00978      0.00000     -0.00000      0.00000      0.80906     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00154      0.00596      0.00000     -0.00000     -0.00000     -0.00432     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.59457     -0.00000      0.00000     -0.00000      1.81793      0.00000     -0.00000     -0.00000      2.46373     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.04108 \n     0.00000      0.00000      0.00000     -0.00000      0.00085     -0.00000     -0.00000      0.00000      0.00615      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.41112      0.00000      0.00000      0.00000      1.51989      0.00000     -0.00000      0.00000      1.07628     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00085     -0.00000      0.00000      0.00000      0.00615     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.41112      0.00000      0.00000     -0.00000      1.51989      0.00000     -0.00000      0.00000      1.07628     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00085      0.00000      0.00000     -0.00000      0.00615      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.41112     -0.00000      0.00000     -0.00000      1.51989      0.00000     -0.00000      0.00000      1.07628      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00063      0.00245      0.00000     -0.00000     -0.00000     -0.00201     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.43613      0.00000     -0.00000      0.00000      1.86996      0.00000     -0.00000     -0.00000      1.06893     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06075 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00033      0.00000      0.00000     -0.00000     -0.00151      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.67134     -0.00000     -0.00000     -0.00000     -1.32603     -0.00000      0.00000     -0.00000     -0.46495      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00033      0.00000     -0.00000     -0.00000     -0.00151      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.67134     -0.00000     -0.00000      0.00000     -1.32603     -0.00000      0.00000     -0.00000     -0.46495     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00033     -0.00000     -0.00000      0.00000     -0.00151     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.67134      0.00000     -0.00000      0.00000     -1.32603     -0.00000      0.00000     -0.00000     -0.46495      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00602      0.00533      0.00000     -0.00000     -0.00000     -0.00470     -0.00000      0.00000     -0.00000      0.04283      0.73366     -0.00000      0.00000      0.00000     -0.00787      0.00000      0.00000      0.00000     -0.04017     -0.00000     -0.00000      0.00000      0.02778     -0.00000      0.00000      0.00000     -0.04651     -0.79837     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      9.07179 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.27291     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.38516     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.27291      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.38516     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00602      0.00533      0.00000     -0.00000     -0.00000     -0.00470     -0.00000      0.00000     -0.00000      0.61396     -0.40392      0.00000     -0.00000     -0.00000     -0.00787     -0.00000      0.00000     -0.00000     -0.04017      0.00000      0.00000     -0.00000      0.02778     -0.00000      0.00000     -0.00000     -0.66815      0.43946      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      9.07179 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.27291      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.38516      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00602      0.00533      0.00000     -0.00000     -0.00000     -0.00470     -0.00000      0.00000     -0.00000     -0.65679     -0.32974     -0.00000      0.00000      0.00000     -0.00787      0.00000     -0.00000      0.00000     -0.04017     -0.00000     -0.00000      0.00000      0.02778      0.00000     -0.00000      0.00000      0.71466      0.35891     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      9.07179 \n     0.00148      0.00481      0.00000     -0.00000     -0.00000     -0.00362     -0.00000      0.00000     -0.00000      0.02620      0.44875     -0.00000      0.00000      0.00000     -0.02861      0.00000      0.00000      0.00000      0.01816     -0.00000     -0.00000      0.00000      0.97778     -0.00000      0.00000      0.00000      0.05750      0.98706      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.66551 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.77858     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.71253      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.77858      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.71253     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00148      0.00481      0.00000     -0.00000     -0.00000     -0.00362     -0.00000      0.00000     -0.00000      0.37553     -0.24706      0.00000     -0.00000     -0.00000     -0.02861     -0.00000      0.00000     -0.00000      0.01816      0.00000      0.00000     -0.00000      0.97778     -0.00000      0.00000     -0.00000      0.82607     -0.54333     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.66551 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.77858     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.71253      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00148      0.00481      0.00000     -0.00000     -0.00000     -0.00362     -0.00000      0.00000     -0.00000     -0.40173     -0.20169     -0.00000      0.00000      0.00000     -0.02861      0.00000     -0.00000      0.00000      0.01816     -0.00000     -0.00000      0.00000      0.97778      0.00000     -0.00000      0.00000     -0.88357     -0.44373      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.66551 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00320      0.00000      0.00000     -0.00000     -0.00153     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00007      0.00000     -0.00000     -0.00000     -0.12608     -0.00000      0.00000     -0.00000     -1.04936      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.94946     -0.31389     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00320      0.00000     -0.00000     -0.00000     -0.00153     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00007     -0.00000     -0.00000      0.00000     -0.12608     -0.00000      0.00000     -0.00000     -1.04936     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.54680     -0.00000     -0.00000     -0.00000      2.38768     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00320     -0.00000     -0.00000      0.00000     -0.00153     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00007      0.00000     -0.00000     -0.00000     -0.12608     -0.00000      0.00000     -0.00000     -1.04936     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.69163      0.00000     -0.00000     -0.00000      2.34982     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00320      0.00000      0.00000     -0.00000     -0.00153     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00007      0.00000     -0.00000     -0.00000     -0.12608     -0.00000      0.00000     -0.00000     -1.04936     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.81634      2.30946     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      3.87298      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00320      0.00000      0.00000     -0.00000     -0.00153     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00007      0.00000     -0.00000     -0.00000     -0.12608     -0.00000      0.00000     -0.00000     -1.04936     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.03203     -1.36778     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00320      0.00000     -0.00000     -0.00000     -0.00153     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00007     -0.00000     -0.00000      0.00000     -0.12608     -0.00000      0.00000     -0.00000     -1.04936      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.90732      0.00000      0.00000      0.00000     -0.42044      0.00000     -0.00000 \n     0.00000      0.00000     -0.00320     -0.00000     -0.00000      0.00000     -0.00153     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00007      0.00000     -0.00000     -0.00000     -0.12608     -0.00000      0.00000     -0.00000     -1.04936     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      2.10229     -0.00000      0.00000      0.00000     -1.25712     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00320      0.00000     -0.00000     -0.00000     -0.00153     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00007     -0.00000     -0.00000      0.00000     -0.12608     -0.00000      0.00000     -0.00000     -1.04936     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.17516      0.00000      0.00000      0.00000     -1.12636     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00320     -0.00000     -0.00000      0.00000     -0.00153     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00007      0.00000     -0.00000     -0.00000     -0.12608     -0.00000      0.00000     -0.00000     -1.04936      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.93131     -0.00000      0.00000      0.00000     -0.36423     -0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99602      0.30483     -0.00000     -0.00000     -0.00000     -0.11476      0.00000     -0.00000      0.00000      0.02575      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.01117     -0.00000      0.00000      0.00000     -0.05720      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.21529 \n    -0.01326      1.03469     -0.00000     -0.00000     -0.00000     -0.45191      0.00000     -0.00000      0.00000      0.10385      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.12198      0.00000      0.00000      0.00000     -0.15143      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.74910 \n    -0.00000      0.00000     -0.00000     -0.00000      0.99568     -0.00000      0.00000     -0.00000     -0.37331     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05448     -0.00000     -0.00000     -0.00000      0.08043      0.00000      0.00000      0.00000     -0.20901      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.99568     -0.00000      0.00000     -0.00000     -0.37331     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05448     -0.00000     -0.00000     -0.00000      0.08043     -0.00000     -0.00000     -0.00000     -0.20901      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.99568     -0.00000     -0.00000     -0.00000     -0.37331      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.05448     -0.00000      0.00000      0.00000      0.08043      0.00000      0.00000     -0.00000     -0.20901      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.01715      0.03286     -0.00000     -0.00000     -0.00000      1.05805     -0.00000      0.00000     -0.00000     -0.29433     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.04080      0.00000     -0.00000     -0.00000      0.87599     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     20.17317 \n    -0.00000      0.00000     -0.00000     -0.00000      0.01274      0.00000     -0.00000      0.00000      1.06113      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.11963      0.00000      0.00000      0.00000     -0.00584     -0.00000     -0.00000      0.00000      0.81500     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.01274      0.00000     -0.00000      0.00000      1.06113      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11963      0.00000      0.00000     -0.00000     -0.00584      0.00000      0.00000      0.00000      0.81500      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.01274      0.00000      0.00000      0.00000      1.06113     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.11963      0.00000     -0.00000     -0.00000     -0.00584     -0.00000     -0.00000      0.00000      0.81500      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00154      0.00554     -0.00000     -0.00000     -0.00000     -0.00606      0.00000     -0.00000      0.00000      0.54369      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.89001      0.00000      0.00000      0.00000      2.42089     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03954 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00070      0.00000     -0.00000      0.00000      0.00817     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.35042     -0.00000     -0.00000     -0.00000      1.55493     -0.00000     -0.00000      0.00000      1.04730      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00070      0.00000     -0.00000      0.00000      0.00817      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.35042      0.00000     -0.00000     -0.00000      1.55493      0.00000      0.00000      0.00000      1.04730      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00070      0.00000      0.00000      0.00000      0.00817     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.35042      0.00000     -0.00000     -0.00000      1.55493     -0.00000     -0.00000      0.00000      1.04730      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00063      0.00227     -0.00000     -0.00000     -0.00000     -0.00278      0.00000     -0.00000      0.00000     -0.51114     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.86534      0.00000      0.00000      0.00000      1.04350     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.06005 \n     0.00000     -0.00000      0.00000      0.00000     -0.00027     -0.00000      0.00000     -0.00000     -0.00216     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.72752      0.00000      0.00000      0.00000     -1.30132      0.00000      0.00000     -0.00000     -0.45001     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00027     -0.00000      0.00000     -0.00000     -0.00216     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.72752     -0.00000      0.00000      0.00000     -1.30132     -0.00000     -0.00000     -0.00000     -0.45001     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00027     -0.00000     -0.00000     -0.00000     -0.00216      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.72752     -0.00000      0.00000      0.00000     -1.30132      0.00000      0.00000     -0.00000     -0.45001     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00602      0.00474     -0.00000     -0.00000     -0.00000     -0.00865      0.00000     -0.00000      0.00000     -0.00349     -0.00000      0.00000     -0.00000      0.04214      0.71888     -0.00000      0.00000     -0.00000     -0.03891     -0.00000     -0.00000     -0.00000      0.02154     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.04751     -0.81168      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      9.07181 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.24728     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.40828      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.24728     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.40828     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00602      0.00474     -0.00000     -0.00000     -0.00000     -0.00865      0.00000     -0.00000      0.00000     -0.00349     -0.00000      0.00000     -0.00000      0.60150     -0.39594     -0.00000      0.00000     -0.00000     -0.03891     -0.00000     -0.00000     -0.00000      0.02154     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.67918      0.44699      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      9.07181 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.24728     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.40828      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00602      0.00474     -0.00000     -0.00000     -0.00000     -0.00865      0.00000     -0.00000      0.00000     -0.00349     -0.00000      0.00000     -0.00000     -0.64364     -0.32295     -0.00000      0.00000     -0.00000     -0.03891     -0.00000     -0.00000     -0.00000      0.02154     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.72669      0.36470      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      9.07181 \n     0.00148      0.00448     -0.00000     -0.00000     -0.00000     -0.00640      0.00000     -0.00000      0.00000     -0.01324     -0.00000      0.00000     -0.00000      0.02736      0.46678     -0.00000      0.00000     -0.00000      0.03473      0.00000      0.00000      0.00000      0.97714     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05728      0.97864      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.66627 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.80987     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.69796     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.80987      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.69796     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00148      0.00448     -0.00000     -0.00000     -0.00000     -0.00640      0.00000     -0.00000      0.00000     -0.01324     -0.00000      0.00000     -0.00000      0.39056     -0.25709     -0.00000      0.00000     -0.00000      0.03473      0.00000      0.00000      0.00000      0.97714     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.81889     -0.53893      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.66627 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.80987      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.69796      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00148      0.00448     -0.00000     -0.00000     -0.00000     -0.00640      0.00000     -0.00000      0.00000     -0.01324     -0.00000      0.00000     -0.00000     -0.41792     -0.20969     -0.00000      0.00000     -0.00000      0.03473      0.00000      0.00000      0.00000      0.97714     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.87617     -0.43971      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.66627 \n     0.00000     -0.00000      0.00000      0.00000     -0.00280      0.00000     -0.00000      0.00000      0.00254      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00393      0.00000      0.00000      0.00000     -0.14347      0.00000      0.00000     -0.00000     -1.04712     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.03440      0.00000     -0.00000     -0.99941     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00280     -0.00000     -0.00000      0.00000      0.00254     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00393     -0.00000     -0.00000      0.00000     -0.14347     -0.00000     -0.00000     -0.00000     -1.04712      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.29182      0.00000     -0.00000      0.00000      2.08115     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00280     -0.00000     -0.00000      0.00000      0.00254      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00393     -0.00000      0.00000      0.00000     -0.14347      0.00000      0.00000     -0.00000     -1.04712      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.31477      0.00000      2.06673     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00280      0.00000     -0.00000      0.00000      0.00254      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00393      0.00000      0.00000      0.00000     -0.14347      0.00000      0.00000     -0.00000     -1.04712      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.88375     -0.00000      0.00000      1.56572      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      3.87298      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00280      0.00000     -0.00000      0.00000      0.00254      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00393      0.00000      0.00000      0.00000     -0.14347      0.00000      0.00000     -0.00000     -1.04712     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.98694     -0.00000      0.00000      1.43250      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00280     -0.00000     -0.00000      0.00000      0.00254     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00393     -0.00000     -0.00000      0.00000     -0.14347     -0.00000     -0.00000     -0.00000     -1.04712     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.34873     -0.00000      0.00000     -0.00000     -0.93722     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00280     -0.00000     -0.00000      0.00000      0.00254      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00393     -0.00000      0.00000      0.00000     -0.14347      0.00000      0.00000     -0.00000     -1.04712      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      2.32980      0.00000      0.75634     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00280     -0.00000     -0.00000      0.00000      0.00254     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00393     -0.00000     -0.00000      0.00000     -0.14347     -0.00000     -0.00000     -0.00000     -1.04712      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.33802      0.00000     -0.00000      0.00000      0.73051     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00280     -0.00000     -0.00000      0.00000      0.00254      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00393     -0.00000      0.00000      0.00000     -0.14347      0.00000      0.00000     -0.00000     -1.04712     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.33834     -0.00000     -0.94102      0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ni\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.19930      0.71626      0.00000      0.00000      0.00000     -0.21983      0.00000      0.00000      0.00000      0.03363      0.00000      0.00000      0.00000     -0.01979      0.00000      0.00000      0.00000      0.01007      0.00000      0.00000      0.01007      0.00000      0.01007      0.00565      0.00000      0.00000      0.00565      0.00000      0.00565      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.71626      2.57222      0.00000      0.00000      0.00000     -0.97764      0.00000      0.00000      0.00000      0.12145      0.00000      0.00000      0.00000     -0.08639      0.00000      0.00000      0.00000      0.00515      0.00000      0.00000      0.00515      0.00000      0.00515      0.00979      0.00000      0.00000      0.00979      0.00000      0.00979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.26680      0.00000      0.00000      0.00000     -0.77606      0.00000      0.00000      0.00000     -0.00326      0.00000      0.00000      0.00000      0.00058      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00682      0.00000      0.00000     -0.00682      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26680      0.00000      0.00000      0.00000     -0.77606      0.00000      0.00000      0.00000     -0.00326      0.00000      0.00000      0.00000      0.00058      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00000     -0.00682      0.00000     -0.00682      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26680      0.00000      0.00000      0.00000     -0.77606      0.00000      0.00000      0.00000     -0.00326      0.00000      0.00000      0.00000      0.00058      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00000     -0.00682      0.00000     -0.00682 \n    -0.21983     -0.97764      0.00000      0.00000      0.00000      2.42112      0.00000      0.00000      0.00000     -0.30599      0.00000      0.00000      0.00000      0.25509      0.00000      0.00000      0.00000     -0.01236      0.00000      0.00000     -0.01236      0.00000     -0.01236     -0.00154      0.00000      0.00000     -0.00154      0.00000     -0.00154      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.77606      0.00000      0.00000      0.00000      2.25997      0.00000      0.00000      0.00000      0.01371      0.00000      0.00000      0.00000     -0.00327      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00438      0.00000      0.00438      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.77606      0.00000      0.00000      0.00000      2.25997      0.00000      0.00000      0.00000      0.01371      0.00000      0.00000      0.00000     -0.00327      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00000      0.00438      0.00000      0.00438      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.77606      0.00000      0.00000      0.00000      2.25997      0.00000      0.00000      0.00000      0.01371      0.00000      0.00000      0.00000     -0.00327      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00000      0.00438      0.00000      0.00438 \n     0.03363      0.12145      0.00000      0.00000      0.00000     -0.30599      0.00000      0.00000      0.00000      0.56099      0.00000      0.00000      0.00000     -0.49320      0.00000      0.00000      0.00000     -0.00370      0.00000      0.00000     -0.00370      0.00000     -0.00370     -0.01848      0.00000      0.00000     -0.01848      0.00000     -0.01848      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00326      0.00000      0.00000      0.00000      0.01371      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00002      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00326      0.00000      0.00000      0.00000      0.01371      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00002      0.00000      0.00002      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00326      0.00000      0.00000      0.00000      0.01371      0.00000      0.00000      0.00000      0.00008      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000      0.00002      0.00000      0.00002 \n    -0.01979     -0.08639      0.00000      0.00000      0.00000      0.25509      0.00000      0.00000      0.00000     -0.49320      0.00000      0.00000      0.00000      0.43703      0.00000      0.00000      0.00000      0.00329      0.00000      0.00000      0.00329      0.00000      0.00329      0.01616      0.00000      0.00000      0.01616      0.00000      0.01616      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00058      0.00000      0.00000      0.00000     -0.00327      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000     -0.00001      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00058      0.00000      0.00000      0.00000     -0.00327      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000     -0.00001      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00058      0.00000      0.00000      0.00000     -0.00327      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000     -0.00001 \n     0.01007      0.00515      0.00000      0.00000      0.00000     -0.01236      0.00000      0.00000      0.00000     -0.00370      0.00000      0.00000      0.00000      0.00329      0.00000      0.00000      0.00000      0.87645      0.00000      0.00000     -0.43798      0.00000     -0.43798      0.54588      0.00000      0.00000     -0.27262      0.00000     -0.27261      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.62887      0.00000      0.00000      0.00000      0.00000      0.00000      1.63697      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.62887      0.00000      0.00000      0.00000      0.00000      0.00000      1.63697      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01007      0.00515      0.00000      0.00000      0.00000     -0.01236      0.00000      0.00000      0.00000     -0.00370      0.00000      0.00000      0.00000      0.00329      0.00000      0.00000      0.00000     -0.43798      0.00000      0.00000      0.87645      0.00000     -0.43799     -0.27261      0.00000      0.00000      0.54588      0.00000     -0.27261      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.62887      0.00000      0.00000      0.00000      0.00000      0.00000      1.63697      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01007      0.00515      0.00000      0.00000      0.00000     -0.01236      0.00000      0.00000      0.00000     -0.00370      0.00000      0.00000      0.00000      0.00329      0.00000      0.00000      0.00000     -0.43798      0.00000      0.00000     -0.43799      0.00000      0.87645     -0.27261      0.00000      0.00000     -0.27261      0.00000      0.54587      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00565      0.00979      0.00000      0.00000      0.00000     -0.00154      0.00000      0.00000      0.00000     -0.01848      0.00000      0.00000      0.00000      0.01616      0.00000      0.00000      0.00000      0.54588      0.00000      0.00000     -0.27261      0.00000     -0.27261      0.34061      0.00000      0.00000     -0.16921      0.00000     -0.16921      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.63697      0.00000      0.00000      0.00000      0.00000      0.00000      1.01961      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.63697      0.00000      0.00000      0.00000      0.00000      0.00000      1.01961      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00565      0.00979      0.00000      0.00000      0.00000     -0.00154      0.00000      0.00000      0.00000     -0.01848      0.00000      0.00000      0.00000      0.01616      0.00000      0.00000      0.00000     -0.27262      0.00000      0.00000      0.54588      0.00000     -0.27261     -0.16921      0.00000      0.00000      0.34061      0.00000     -0.16921      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.63697      0.00000      0.00000      0.00000      0.00000      0.00000      1.01961      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00565      0.00979      0.00000      0.00000      0.00000     -0.00154      0.00000      0.00000      0.00000     -0.01848      0.00000      0.00000      0.00000      0.01616      0.00000      0.00000      0.00000     -0.27261      0.00000      0.00000     -0.27261      0.00000      0.54587     -0.16921      0.00000      0.00000     -0.16921      0.00000      0.34060      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003 \n     0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003 \n     0.00000      0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00682      0.00000      0.00000      0.00000      0.00438      0.00000      0.00000      0.00000      0.00002      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00000      0.00000      0.00000      0.00003      0.00000      0.00003 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.80888      0.63822      0.63822      0.63822      0.63822      0.63822      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -297.75250    -35.22955    -30.79050    -30.79050    -30.79050     -3.84712     -2.49223     -2.49223     -2.49223     -0.23294     -0.23294     -0.23294     -0.23294     -0.23294     -0.19063     -0.04035     -0.04035     -0.04035      0.09906      0.16609      0.16609      0.16609      1.04734      1.30792      1.30792      1.30792      1.68502      1.68502      1.68502      1.68502      1.68502      2.23940      2.23940      2.23940      2.23940      2.23940      2.23940      2.23940     32.29070 \n   </alphaeps>\n   <betaeps>\n  -297.75140    -35.19216    -30.76187    -30.76187    -30.76187     -3.77533     -2.42199     -2.42199     -2.42199     -0.17568     -0.16832     -0.16832     -0.16832     -0.16832     -0.16832     -0.03393     -0.03393     -0.03393      0.10683      0.17546      0.17546      0.17546      1.07435      1.33926      1.33926      1.33926      1.73240      1.73240      1.73240      1.73240      1.73240      2.27562      2.27562      2.27562      2.27562      2.27562      2.27562      2.27562     32.34414 \n   </betaeps>\n   <alphavectors>\n     0.99596      0.30605      0.00000     -0.00000      0.00000     -0.11597      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02625      0.00000      0.00000     -0.00000      0.01127      0.00000     -0.00000      0.00000     -0.05725      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.25387 \n    -0.01357      1.03394      0.00000     -0.00000      0.00000     -0.45484      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.10705      0.00000      0.00000     -0.00000      0.11923      0.00000     -0.00000      0.00000     -0.15377      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      2.02094 \n     0.00000     -0.00000     -0.00000      0.00000      0.99564      0.00000      0.00000      0.00000     -0.37726     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05593     -0.00000     -0.00000     -0.00000      0.08180     -0.00000      0.00000     -0.00000     -0.18532      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99564      0.00000      0.00000      0.00000     -0.37726      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.05593     -0.00000      0.00000     -0.00000      0.08180      0.00000     -0.00000     -0.00000     -0.18532      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.99564      0.00000     -0.00000      0.00000     -0.37726     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.05593     -0.00000     -0.00000     -0.00000      0.08180      0.00000      0.00000     -0.00000     -0.18532      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.01351      0.02254      0.00000     -0.00000      0.00000      1.06750     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.29737      0.00000     -0.00000      0.00000     -0.03069      0.00000      0.00000     -0.00000      0.88200      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     21.61491 \n     0.00000     -0.00000     -0.00000      0.00000      0.01271     -0.00000     -0.00000     -0.00000      1.06403      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.12698      0.00000      0.00000      0.00000     -0.04393      0.00000     -0.00000      0.00000      0.72326     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.01271     -0.00000     -0.00000     -0.00000      1.06403     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.12698      0.00000     -0.00000      0.00000     -0.04393     -0.00000      0.00000      0.00000      0.72326     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.01271     -0.00000      0.00000     -0.00000      1.06403      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.12698      0.00000      0.00000      0.00000     -0.04393     -0.00000     -0.00000      0.00000      0.72326     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00154      0.00543      0.00000     -0.00000      0.00000     -0.00459      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.57397     -0.00000      0.00000     -0.00000      1.81402      0.00000     -0.00000      0.00000      2.33299      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.09950 \n     0.00000     -0.00000     -0.00000      0.00000      0.00084     -0.00000     -0.00000     -0.00000      0.00604      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.36522     -0.00000     -0.00000     -0.00000      1.51009      0.00000     -0.00000      0.00000      1.14594     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00084     -0.00000     -0.00000     -0.00000      0.00604      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.36522      0.00000      0.00000     -0.00000      1.51009     -0.00000      0.00000      0.00000      1.14594      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00084     -0.00000      0.00000     -0.00000      0.00604      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.36522     -0.00000     -0.00000      0.00000      1.51009      0.00000      0.00000     -0.00000      1.14594     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00065      0.00228      0.00000     -0.00000      0.00000     -0.00218     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.46829     -0.00000     -0.00000      0.00000      1.83984      0.00000     -0.00000      0.00000      1.01367     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00438 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00030      0.00000      0.00000      0.00000     -0.00141     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.70805      0.00000      0.00000      0.00000     -1.29561     -0.00000      0.00000     -0.00000     -0.48784      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00030     -0.00000      0.00000      0.00000     -0.00141      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.70805     -0.00000     -0.00000      0.00000     -1.29561      0.00000     -0.00000     -0.00000     -0.48784     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00030      0.00000     -0.00000      0.00000     -0.00141     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.70805     -0.00000     -0.00000      0.00000     -1.29561     -0.00000     -0.00000      0.00000     -0.48784      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00438     -0.00007     -0.00000      0.00000     -0.00000     -0.00560     -0.00000     -0.00000     -0.00000     -0.36732      0.63623      0.00000      0.00000     -0.00000     -0.00471      0.00000     -0.00000     -0.00000     -0.03044      0.00000     -0.00000      0.00000      0.02906     -0.00000     -0.00000      0.00000      0.39880     -0.69075     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      9.70777 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.27245      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.38149     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.27245     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.38149     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00438     -0.00007     -0.00000      0.00000     -0.00000     -0.00560     -0.00000     -0.00000     -0.00000     -0.36733     -0.63622      0.00000      0.00000     -0.00000     -0.00471      0.00000     -0.00000     -0.00000     -0.03044      0.00000     -0.00000      0.00000      0.02906     -0.00000     -0.00000      0.00000      0.39880      0.69074      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      9.70777 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.27245      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.38149      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00438     -0.00007     -0.00000      0.00000     -0.00000     -0.00560     -0.00000     -0.00000     -0.00000      0.73465     -0.00000     -0.00000     -0.00000      0.00000     -0.00471     -0.00000      0.00000      0.00000     -0.03044     -0.00000      0.00000     -0.00000      0.02906      0.00000      0.00000     -0.00000     -0.79760      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      9.70777 \n     0.00139      0.00415      0.00000     -0.00000      0.00000     -0.00456      0.00000     -0.00000     -0.00000     -0.22571      0.39094      0.00000      0.00000     -0.00000     -0.02167      0.00000     -0.00000     -0.00000      0.02063      0.00000     -0.00000      0.00000      0.94868     -0.00000     -0.00000      0.00000     -0.49297      0.85386      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.82399 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.78187     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.70772      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.78187     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.70772     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00139      0.00415      0.00000     -0.00000      0.00000     -0.00456     -0.00000     -0.00000     -0.00000     -0.22571     -0.39094      0.00000      0.00000     -0.00000     -0.02167      0.00000     -0.00000     -0.00000      0.02063      0.00000     -0.00000      0.00000      0.94868     -0.00000     -0.00000      0.00000     -0.49298     -0.85386     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.82399 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.78187     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.70772      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00139      0.00415      0.00000     -0.00000      0.00000     -0.00456      0.00000     -0.00000     -0.00000      0.45141     -0.00000     -0.00000     -0.00000      0.00000     -0.02167     -0.00000      0.00000      0.00000      0.02063     -0.00000      0.00000     -0.00000      0.94868      0.00000      0.00000     -0.00000      0.98595     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.82399 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00274     -0.00000     -0.00000     -0.00000      0.00084     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00936     -0.00000      0.00000      0.00000     -0.10542     -0.00000      0.00000     -0.00000     -1.03865     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.62008      0.00000     -0.78453      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00274     -0.00000     -0.00000     -0.00000      0.00084      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00936     -0.00000     -0.00000      0.00000     -0.10542      0.00000     -0.00000     -0.00000     -1.03865     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.58906      0.00000      2.37760     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00274      0.00000     -0.00000     -0.00000      0.00084      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00936     -0.00000     -0.00000      0.00000     -0.10542     -0.00000     -0.00000      0.00000     -1.03865      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.49999      0.00000     -0.00000      0.00000      0.00000      1.93650     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00274     -0.00000     -0.00000     -0.00000      0.00084     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00936     -0.00000      0.00000      0.00000     -0.10542     -0.00000      0.00000     -0.00000     -1.03865     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.58912     -0.00000      2.37759      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      3.87298     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00274     -0.00000     -0.00000     -0.00000      0.00084     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00936      0.00000      0.00000      0.00000     -0.10542      0.00000      0.00000     -0.00000     -1.03865      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.44937      0.00000     -0.02399     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00274     -0.00000     -0.00000     -0.00000      0.00084      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00936     -0.00000     -0.00000      0.00000     -0.10542      0.00000     -0.00000     -0.00000     -1.03865     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.62010     -0.00000     -0.78452     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00274      0.00000     -0.00000     -0.00000      0.00084      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00936     -0.00000     -0.00000      0.00000     -0.10542     -0.00000     -0.00000      0.00000     -1.03865      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.50001      0.00000     -0.00000      0.00000      0.00000     -1.93649     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00274      0.00000     -0.00000     -0.00000      0.00084      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00936     -0.00000     -0.00000      0.00000     -0.10542      0.00000     -0.00000     -0.00000     -1.03865      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      2.44937     -0.00000     -0.02404      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00274      0.00000     -0.00000     -0.00000      0.00084      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00936     -0.00000     -0.00000      0.00000     -0.10542     -0.00000     -0.00000      0.00000     -1.03865      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99596      0.30611     -0.00000     -0.00000     -0.00000     -0.11574      0.00000      0.00000      0.00000      0.02555     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01162      0.00000     -0.00000     -0.00000     -0.05780      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.25382 \n    -0.01356      1.03420     -0.00000     -0.00000     -0.00000     -0.45431      0.00000      0.00000      0.00000      0.10260     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.12150      0.00000      0.00000     -0.00000     -0.15715      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      2.02076 \n    -0.00000      0.00000     -0.00000      0.99589      0.00000     -0.00000     -0.00000     -0.00000     -0.37600      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05277      0.00000      0.00000     -0.00000      0.08240     -0.00000     -0.00000     -0.00000     -0.18722     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.99589     -0.00000      0.00000     -0.37600      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.05277      0.00000     -0.00000     -0.00000      0.08240      0.00000      0.00000      0.00000     -0.18722      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.99589     -0.00000     -0.00000     -0.00000     -0.37600     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.05277      0.00000      0.00000      0.00000      0.08240     -0.00000     -0.00000      0.00000     -0.18722     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.01351      0.02176     -0.00000     -0.00000     -0.00000      1.06050      0.00000     -0.00000     -0.00000     -0.28807      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.03087     -0.00000      0.00000      0.00000      0.87917     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     21.61549 \n    -0.00000      0.00000     -0.00000      0.01200     -0.00000      0.00000      0.00000      0.00000      1.06184     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.12349     -0.00000     -0.00000      0.00000     -0.04294      0.00000      0.00000      0.00000      0.72715      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.01200      0.00000     -0.00000      1.06184      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.12349      0.00000     -0.00000      0.00000     -0.04294     -0.00000     -0.00000     -0.00000      0.72715     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.01200      0.00000      0.00000      0.00000      1.06184      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.12349     -0.00000     -0.00000     -0.00000     -0.04294      0.00000      0.00000     -0.00000      0.72715      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00154      0.00519     -0.00000     -0.00000     -0.00000     -0.00570      0.00000      0.00000      0.00000      0.53490     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.85584      0.00000      0.00000     -0.00000      2.30923      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.10013 \n    -0.00000      0.00000     -0.00000      0.00076     -0.00000      0.00000      0.00000      0.00000      0.00684     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.32045      0.00000     -0.00000     -0.00000      1.53312      0.00000     -0.00000      0.00000      1.12862      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00076      0.00000     -0.00000      0.00684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.32045      0.00000     -0.00000     -0.00000      1.53312     -0.00000     -0.00000      0.00000      1.12862     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00076     -0.00000     -0.00000      0.00000      0.00684      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.32045      0.00000      0.00000      0.00000      1.53312     -0.00000     -0.00000      0.00000      1.12862     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00065      0.00217     -0.00000     -0.00000     -0.00000     -0.00268     -0.00000      0.00000      0.00000     -0.51880      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.83432     -0.00000      0.00000     -0.00000      0.99897     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00409 \n     0.00000     -0.00000      0.00000     -0.00028      0.00000     -0.00000     -0.00000     -0.00000     -0.00166      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.74838     -0.00000     -0.00000      0.00000     -1.27627     -0.00000     -0.00000     -0.00000     -0.47853     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00028     -0.00000      0.00000     -0.00166     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.74838     -0.00000      0.00000     -0.00000     -1.27627      0.00000      0.00000      0.00000     -0.47853     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00028      0.00000      0.00000     -0.00000     -0.00166     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.74838      0.00000      0.00000      0.00000     -1.27627     -0.00000     -0.00000      0.00000     -0.47853     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00438     -0.00012      0.00000      0.00000      0.00000     -0.00799     -0.00000      0.00000      0.00000     -0.00249      0.00000     -0.00000      0.62890      0.00000     -0.36311      0.00000      0.00000      0.00000     -0.02972     -0.00000     -0.00000      0.00000      0.02607     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.69741      0.00000      0.40266      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      9.70778 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.25782     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.39482      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.25782      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.39482     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00438     -0.00012      0.00000      0.00000      0.00000     -0.00799      0.00000      0.00000      0.00000     -0.00249      0.00000     -0.00000     -0.62892     -0.00000     -0.36309      0.00000      0.00000      0.00000     -0.02972     -0.00000     -0.00000      0.00000      0.02607     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.69742     -0.00000      0.40264      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      9.70778 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.25782     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.39482     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00438     -0.00012      0.00000      0.00000      0.00000     -0.00799      0.00000      0.00000      0.00000     -0.00249      0.00000     -0.00000      0.00001      0.00000      0.72620     -0.00000     -0.00000     -0.00000     -0.02972      0.00000      0.00000     -0.00000      0.02607      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00001      0.00000     -0.80530      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      9.70778 \n     0.00139      0.00398     -0.00000     -0.00000     -0.00000     -0.00627     -0.00000      0.00000      0.00000     -0.01421      0.00000     -0.00000      0.39991      0.00000     -0.23090      0.00000      0.00000      0.00000      0.02989     -0.00000     -0.00000      0.00000      0.94828     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.84969     -0.00000     -0.49058      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.82432 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.79983     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.69939      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.79983     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.69939     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00139      0.00398     -0.00000     -0.00000     -0.00000     -0.00627      0.00000      0.00000      0.00000     -0.01421      0.00000     -0.00000     -0.39992     -0.00000     -0.23088      0.00000      0.00000      0.00000      0.02989     -0.00000     -0.00000      0.00000      0.94828     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.84970      0.00000     -0.49056     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.82432 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.79983      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.69939     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00139      0.00398     -0.00000     -0.00000     -0.00000     -0.00627      0.00000      0.00000      0.00000     -0.01421      0.00000     -0.00000      0.00001      0.00000      0.46178     -0.00000     -0.00000     -0.00000      0.02989      0.00000      0.00000     -0.00000      0.94828     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00001     -0.00000      0.98114      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.82432 \n     0.00000     -0.00000      0.00000     -0.00253     -0.00000      0.00000      0.00000      0.00000      0.00334      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00761      0.00000     -0.00000      0.00000     -0.11574     -0.00000     -0.00000     -0.00000     -1.03756     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.61541     -0.00000     -0.78821      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00253      0.00000     -0.00000      0.00334     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00761     -0.00000      0.00000     -0.00000     -0.11574      0.00000      0.00000      0.00000     -1.03756     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.60322      0.00000     -0.00000      0.00000      2.37405      0.00000 \n    -0.00000     -0.00000     -0.00253      0.00000      0.00000      0.00000      0.00334      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00761      0.00000      0.00000     -0.00000     -0.11574     -0.00000     -0.00000      0.00000     -1.03756     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.93649     -0.00000      0.00000      1.50000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00253     -0.00000      0.00000      0.00000      0.00000      0.00334      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00761      0.00000     -0.00000      0.00000     -0.11574     -0.00000     -0.00000     -0.00000     -1.03756     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.60323      0.00000      2.37405      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      3.87298      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00253     -0.00000      0.00000      0.00000      0.00000      0.00334      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00761     -0.00000     -0.00000      0.00000     -0.11574     -0.00000     -0.00000     -0.00000     -1.03756     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.44947     -0.00000     -0.00943     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00253      0.00000     -0.00000      0.00334     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00761     -0.00000      0.00000     -0.00000     -0.11574      0.00000      0.00000      0.00000     -1.03756     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.61542     -0.00000      0.00000     -0.00000     -0.78820      0.00000 \n    -0.00000     -0.00000     -0.00253      0.00000      0.00000      0.00000      0.00334      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00761      0.00000      0.00000     -0.00000     -0.11574     -0.00000     -0.00000      0.00000     -1.03756     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.93650      0.00000     -0.00000      1.50000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00253      0.00000     -0.00000      0.00334     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00761     -0.00000      0.00000     -0.00000     -0.11574      0.00000      0.00000      0.00000     -1.03756      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      2.44947     -0.00000      0.00000     -0.00000     -0.00945      0.00000 \n    -0.00000     -0.00000     -0.00253     -0.00000     -0.00000      0.00000      0.00334      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00761      0.00000      0.00000     -0.00000     -0.11574     -0.00000     -0.00000      0.00000     -1.03756     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.00000      0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cu\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.20084      0.71857      0.00000      0.00000      0.00000     -0.23450      0.00000      0.00000      0.00000      0.03138      0.00000      0.00000      0.00000     -0.01957      0.00000      0.00000      0.00000      0.00402      0.00000      0.00000      0.00402      0.00000      0.00402      0.00527      0.00000      0.00000      0.00527      0.00000      0.00527      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.71857      2.57219      0.00000      0.00000      0.00000     -0.99821      0.00000      0.00000      0.00000      0.11216      0.00000      0.00000      0.00000     -0.08473      0.00000      0.00000      0.00000     -0.00349      0.00000      0.00000     -0.00349      0.00000     -0.00349      0.00970      0.00000      0.00000      0.00970      0.00000      0.00970      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.27098      0.00000      0.00000      0.00000     -0.78224      0.00000      0.00000      0.00000     -0.00278      0.00000      0.00000      0.00000      0.00044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00728      0.00000      0.00000     -0.00728      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.27098      0.00000      0.00000      0.00000     -0.78224      0.00000      0.00000      0.00000     -0.00278      0.00000      0.00000      0.00000      0.00044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00000     -0.00728      0.00000     -0.00728      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.27098      0.00000      0.00000      0.00000     -0.78224      0.00000      0.00000      0.00000     -0.00278      0.00000      0.00000      0.00000      0.00044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00000     -0.00728      0.00000     -0.00728 \n    -0.23450     -0.99821      0.00000      0.00000      0.00000      2.40616      0.00000      0.00000      0.00000     -0.28065      0.00000      0.00000      0.00000      0.24718      0.00000      0.00000      0.00000     -0.01354      0.00000      0.00000     -0.01354      0.00000     -0.01354     -0.00470      0.00000      0.00000     -0.00470      0.00000     -0.00470      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.78224      0.00000      0.00000      0.00000      2.26020      0.00000      0.00000      0.00000      0.01222      0.00000      0.00000      0.00000     -0.00273      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00738      0.00000      0.00738      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.78224      0.00000      0.00000      0.00000      2.26020      0.00000      0.00000      0.00000      0.01222      0.00000      0.00000      0.00000     -0.00273      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00000      0.00738      0.00000      0.00738      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.78224      0.00000      0.00000      0.00000      2.26020      0.00000      0.00000      0.00000      0.01222      0.00000      0.00000      0.00000     -0.00273      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00000      0.00738      0.00000      0.00738 \n     0.03138      0.11216      0.00000      0.00000      0.00000     -0.28065      0.00000      0.00000      0.00000      0.51705      0.00000      0.00000      0.00000     -0.48324      0.00000      0.00000      0.00000     -0.00211      0.00000      0.00000     -0.00211      0.00000     -0.00211     -0.01463      0.00000      0.00000     -0.01463      0.00000     -0.01463      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00278      0.00000      0.00000      0.00000      0.01222      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00004      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00278      0.00000      0.00000      0.00000      0.01222      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00004      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00278      0.00000      0.00000      0.00000      0.01222      0.00000      0.00000      0.00000      0.00007      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00004 \n    -0.01957     -0.08473      0.00000      0.00000      0.00000      0.24718      0.00000      0.00000      0.00000     -0.48324      0.00000      0.00000      0.00000      0.45303      0.00000      0.00000      0.00000      0.00201      0.00000      0.00000      0.00201      0.00000      0.00201      0.01380      0.00000      0.00000      0.01380      0.00000      0.01380      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00044      0.00000      0.00000      0.00000     -0.00273      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000     -0.00001      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00044      0.00000      0.00000      0.00000     -0.00273      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000     -0.00001      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00044      0.00000      0.00000      0.00000     -0.00273      0.00000      0.00000      0.00000     -0.00002      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000     -0.00001 \n     0.00402     -0.00349      0.00000      0.00000      0.00000     -0.01354      0.00000      0.00000      0.00000     -0.00211      0.00000      0.00000      0.00000      0.00201      0.00000      0.00000      0.00000      0.99580      0.00000      0.00000     -0.49766      0.00000     -0.49766      0.61683      0.00000      0.00000     -0.30824      0.00000     -0.30824      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.98695      0.00000      0.00000      0.00000      0.00000      0.00000      1.85015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.98695      0.00000      0.00000      0.00000      0.00000      0.00000      1.85015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00402     -0.00349      0.00000      0.00000      0.00000     -0.01354      0.00000      0.00000      0.00000     -0.00211      0.00000      0.00000      0.00000      0.00201      0.00000      0.00000      0.00000     -0.49766      0.00000      0.00000      0.99581      0.00000     -0.49766     -0.30824      0.00000      0.00000      0.61683      0.00000     -0.30824      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.98695      0.00000      0.00000      0.00000      0.00000      0.00000      1.85015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00402     -0.00349      0.00000      0.00000      0.00000     -0.01354      0.00000      0.00000      0.00000     -0.00211      0.00000      0.00000      0.00000      0.00201      0.00000      0.00000      0.00000     -0.49766      0.00000      0.00000     -0.49766      0.00000      0.99579     -0.30824      0.00000      0.00000     -0.30824      0.00000      0.61683      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00527      0.00970      0.00000      0.00000      0.00000     -0.00470      0.00000      0.00000      0.00000     -0.01463      0.00000      0.00000      0.00000      0.01380      0.00000      0.00000      0.00000      0.61683      0.00000      0.00000     -0.30824      0.00000     -0.30824      0.38253      0.00000      0.00000     -0.19049      0.00000     -0.19049      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.85015      0.00000      0.00000      0.00000      0.00000      0.00000      1.14604      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.85015      0.00000      0.00000      0.00000      0.00000      0.00000      1.14604      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00527      0.00970      0.00000      0.00000      0.00000     -0.00470      0.00000      0.00000      0.00000     -0.01463      0.00000      0.00000      0.00000      0.01380      0.00000      0.00000      0.00000     -0.30824      0.00000      0.00000      0.61683      0.00000     -0.30824     -0.19049      0.00000      0.00000      0.38253      0.00000     -0.19049      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.85015      0.00000      0.00000      0.00000      0.00000      0.00000      1.14604      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00527      0.00970      0.00000      0.00000      0.00000     -0.00470      0.00000      0.00000      0.00000     -0.01463      0.00000      0.00000      0.00000      0.01380      0.00000      0.00000      0.00000     -0.30824      0.00000      0.00000     -0.30824      0.00000      0.61683     -0.19049      0.00000      0.00000     -0.19049      0.00000      0.38253      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00004      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00004      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00004 \n     0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00004      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00004      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00004      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00004 \n     0.00000      0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00004      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00728      0.00000      0.00000      0.00000      0.00738      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00000      0.00000      0.00000      0.00004      0.00000      0.00004 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.85005      0.85005      0.85005      0.85005      0.85005      0.74977      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -320.84790    -38.24426    -33.59036    -33.59036    -33.59036     -4.10406     -2.65453     -2.65453     -2.65453     -0.21150     -0.21150     -0.21150     -0.21150     -0.21150     -0.18920     -0.03657     -0.03657     -0.03657      0.10950      0.18218      0.18218      0.18218      1.15413      1.32514      1.32514      1.32514      1.87175      1.87175      1.87175      1.87175      1.87175      2.29807      2.29807      2.29807      2.29807      2.29807      2.29807      2.29807     39.17965 \n   </alphaeps>\n   <betaeps>\n  -320.84720    -38.22771    -33.57768    -33.57768    -33.57768     -4.07360     -2.62463     -2.62463     -2.62463     -0.18335     -0.18335     -0.18335     -0.18335     -0.18335     -0.17822     -0.03041     -0.03041     -0.03041      0.11527      0.18937      0.18937      0.18937      1.16900      1.34060      1.34060      1.34060      1.89443      1.89443      1.89443      1.89443      1.89443      2.31564      2.31564      2.31564      2.31564      2.31564      2.31564      2.31564     39.20216 \n   </betaeps>\n   <alphavectors>\n     0.99590      0.30727      0.00000      0.00000     -0.00000     -0.11671     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.02560     -0.00000     -0.00000     -0.00000      0.01176     -0.00000      0.00000      0.00000     -0.05796      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.28785 \n    -0.01393      1.03355      0.00000      0.00000     -0.00000     -0.45654     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.10342     -0.00000     -0.00000     -0.00000      0.11973     -0.00000      0.00000      0.00000     -0.15981      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.25946 \n    -0.00000      0.00000      0.00000      0.00000      0.99599     -0.00000      0.00000      0.00000     -0.37891      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.05297     -0.00000     -0.00000     -0.00000      0.08351     -0.00000      0.00000     -0.00000     -0.16628     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.99599      0.00000     -0.00000     -0.00000     -0.37891     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05297     -0.00000      0.00000      0.00000      0.08351      0.00000      0.00000     -0.00000     -0.16628      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.99599     -0.00000      0.00000      0.00000     -0.37891     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05297      0.00000     -0.00000     -0.00000      0.08351      0.00000     -0.00000     -0.00000     -0.16628      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00964      0.01185      0.00000      0.00000     -0.00000      1.06554      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.28470     -0.00000      0.00000      0.00000     -0.02138     -0.00000      0.00000      0.00000      0.88296      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     22.70043 \n    -0.00000      0.00000      0.00000      0.00000      0.01161      0.00000     -0.00000     -0.00000      1.06335     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.12681      0.00000      0.00000      0.00000     -0.07200      0.00000     -0.00000      0.00000      0.64755      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.01161      0.00000     -0.00000     -0.00000      1.06335      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.12681      0.00000     -0.00000     -0.00000     -0.07200     -0.00000     -0.00000     -0.00000      0.64755     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.01161      0.00000     -0.00000     -0.00000      1.06335      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.12681     -0.00000      0.00000      0.00000     -0.07200     -0.00000      0.00000      0.00000      0.64755     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00149      0.00486      0.00000      0.00000     -0.00000     -0.00495      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.55452     -0.00000     -0.00000     -0.00000      1.80962     -0.00000      0.00000      0.00000      2.22836      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.21697 \n    -0.00000      0.00000      0.00000      0.00000      0.00080      0.00000     -0.00000     -0.00000      0.00567      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.32654     -0.00000     -0.00000     -0.00000      1.50469      0.00000     -0.00000      0.00000      1.22091      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00080      0.00000     -0.00000     -0.00000      0.00567      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.32654     -0.00000      0.00000      0.00000      1.50469      0.00000      0.00000      0.00000      1.22091     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00080      0.00000     -0.00000     -0.00000      0.00567      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.32654      0.00000     -0.00000     -0.00000      1.50469     -0.00000      0.00000      0.00000      1.22091     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00064      0.00207      0.00000      0.00000     -0.00000     -0.00238      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.49646     -0.00000      0.00000      0.00000      1.81124     -0.00000      0.00000      0.00000      0.96704     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.04396 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00027     -0.00000      0.00000      0.00000     -0.00125     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.73954      0.00000      0.00000      0.00000     -1.26639     -0.00000      0.00000     -0.00000     -0.51008     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00027     -0.00000      0.00000      0.00000     -0.00125     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.73954     -0.00000      0.00000      0.00000     -1.26639     -0.00000     -0.00000     -0.00000     -0.51008      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00027      0.00000      0.00000      0.00000     -0.00125     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.73954     -0.00000      0.00000      0.00000     -1.26639      0.00000     -0.00000     -0.00000     -0.51008      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00265     -0.00453     -0.00000     -0.00000      0.00000     -0.00638      0.00000     -0.00000      0.00000     -0.36557      0.00000      0.00000      0.00000      0.63751     -0.00259      0.00000      0.00000      0.00000     -0.02235     -0.00000     -0.00000      0.00000      0.03187      0.00000     -0.00000      0.00000      0.39542      0.00000     -0.00000      0.00000     -0.68955      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     10.19131 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.27287     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.37678      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.27287     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.37678     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00265     -0.00453      0.00000     -0.00000      0.00000     -0.00638     -0.00000     -0.00000      0.00000      0.73489     -0.00000     -0.00000      0.00000     -0.00216     -0.00259     -0.00000     -0.00000     -0.00000     -0.02235      0.00000      0.00000     -0.00000      0.03187     -0.00000      0.00000      0.00000     -0.79488     -0.00000      0.00000     -0.00000      0.00233      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     10.19131 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.27287      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.37678      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00265     -0.00453     -0.00000     -0.00000      0.00000     -0.00638     -0.00000     -0.00000      0.00000     -0.36931      0.00000      0.00000     -0.00000     -0.63535     -0.00259      0.00000      0.00000      0.00000     -0.02235     -0.00000     -0.00000      0.00000      0.03187      0.00000     -0.00000     -0.00000      0.39946      0.00000     -0.00000     -0.00000      0.68722      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     10.19131 \n     0.00124      0.00349      0.00000      0.00000     -0.00000     -0.00554      0.00000     -0.00000      0.00000     -0.22525      0.00000      0.00000      0.00000      0.39281     -0.01611      0.00000      0.00000      0.00000      0.02372     -0.00000     -0.00000      0.00000      0.92635      0.00000     -0.00000      0.00000     -0.48914     -0.00000      0.00000     -0.00000      0.85299     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.95198 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.78430     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.70311      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.78430     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.70311      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00124      0.00349     -0.00000      0.00000     -0.00000     -0.00554      0.00000     -0.00000      0.00000      0.45281     -0.00000     -0.00000      0.00000     -0.00133     -0.01611     -0.00000     -0.00000     -0.00000      0.02372      0.00000      0.00000     -0.00000      0.92635     -0.00000      0.00000      0.00000      0.98329      0.00000     -0.00000      0.00000     -0.00289      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.95198 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.78430      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.70311      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00124      0.00349      0.00000      0.00000     -0.00000     -0.00554     -0.00000     -0.00000      0.00000     -0.22756      0.00000      0.00000     -0.00000     -0.39148     -0.01611      0.00000      0.00000      0.00000      0.02372     -0.00000     -0.00000      0.00000      0.92635      0.00000     -0.00000     -0.00000     -0.49414     -0.00000      0.00000      0.00000     -0.85011     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.95198 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00236      0.00000     -0.00000     -0.00000      0.00305     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.01515      0.00000      0.00000      0.00000     -0.09462     -0.00000      0.00000     -0.00000     -1.04033     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.61107      0.00000     -0.00000     -0.79158     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00236     -0.00000      0.00000      0.00000      0.00305      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.01515     -0.00000      0.00000     -0.00000     -0.09462     -0.00000     -0.00000      0.00000     -1.04033      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.48725     -0.00000     -0.00000      0.00000      1.94630     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00236     -0.00000     -0.00000     -0.00000      0.00305     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.01515      0.00000      0.00000      0.00000     -0.09462      0.00000     -0.00000     -0.00000     -1.04033     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.60849     -0.00000     -0.00000      0.00000     -0.00000      2.37271     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00236      0.00000     -0.00000     -0.00000      0.00305     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.01515      0.00000      0.00000      0.00000     -0.09462     -0.00000      0.00000     -0.00000     -1.04033      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.44949     -0.00000      0.00000      0.00404     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      3.87298     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00236      0.00000     -0.00000     -0.00000      0.00305     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.01515      0.00000      0.00000      0.00000     -0.09462     -0.00000      0.00000     -0.00000     -1.04033     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.61628     -0.00000      0.00000      2.37070     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00236     -0.00000      0.00000      0.00000      0.00305      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.01515     -0.00000      0.00000     -0.00000     -0.09462     -0.00000     -0.00000      0.00000     -1.04033      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.99998      0.00000      0.00000     -0.00000     -0.00657      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00236     -0.00000     -0.00000     -0.00000      0.00305     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.01515      0.00000      0.00000      0.00000     -0.09462      0.00000     -0.00000     -0.00000     -1.04033      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      2.44949      0.00000      0.00000     -0.00000      0.00000     -0.00400     -0.00000 \n    -0.00000      0.00000     -0.00236     -0.00000      0.00000      0.00000      0.00305      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01515     -0.00000      0.00000     -0.00000     -0.09462     -0.00000     -0.00000      0.00000     -1.04033      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.51269     -0.00000     -0.00000     -0.00000     -1.92660      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00236     -0.00000     -0.00000     -0.00000      0.00305     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.01515      0.00000      0.00000      0.00000     -0.09462      0.00000     -0.00000     -0.00000     -1.04033     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.61366      0.00000      0.00000     -0.00000      0.00000     -0.78957     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99590      0.30730     -0.00000      0.00000     -0.00000     -0.11663      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.02534     -0.00000     -0.00000      0.00000      0.01199     -0.00000      0.00000      0.00000     -0.05813     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.28783 \n    -0.01392      1.03367     -0.00000      0.00000     -0.00000     -0.45637      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.10134     -0.00000     -0.00000      0.00000      0.12098     -0.00000      0.00000      0.00000     -0.16091     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      2.25939 \n    -0.00000      0.00000     -0.00000      0.00000      0.99608     -0.00000      0.00000      0.00000     -0.37847      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.05104     -0.00000      0.00000      0.00000      0.08422      0.00000      0.00000     -0.00000     -0.16697      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.99608     -0.00000      0.00000      0.00000     -0.37847     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.05104      0.00000      0.00000      0.00000      0.08422      0.00000     -0.00000      0.00000     -0.16697      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.99608      0.00000     -0.00000      0.00000     -0.37847      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05104      0.00000     -0.00000     -0.00000      0.08422      0.00000      0.00000     -0.00000     -0.16697      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00964      0.01179     -0.00000      0.00000     -0.00000      1.06279     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.28228      0.00000      0.00000     -0.00000     -0.02252      0.00000     -0.00000     -0.00000      0.88232      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     22.70061 \n    -0.00000      0.00000     -0.00000      0.00000      0.01134      0.00000     -0.00000     -0.00000      1.06265     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.12485      0.00000     -0.00000     -0.00000     -0.07293     -0.00000     -0.00000      0.00000      0.64899      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.01134      0.00000     -0.00000     -0.00000      1.06265      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.12485     -0.00000     -0.00000     -0.00000     -0.07293     -0.00000      0.00000     -0.00000      0.64899     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.01134     -0.00000      0.00000     -0.00000      1.06265     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.12485     -0.00000      0.00000      0.00000     -0.07293     -0.00000     -0.00000      0.00000      0.64899     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00149      0.00477     -0.00000      0.00000     -0.00000     -0.00544      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.52854      0.00000     -0.00000      0.00000      1.82766      0.00000      0.00000      0.00000      2.21992     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.21711 \n    -0.00000      0.00000     -0.00000      0.00000      0.00077      0.00000     -0.00000     -0.00000      0.00581      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.29439     -0.00000      0.00000      0.00000      1.51662     -0.00000     -0.00000      0.00000      1.21432      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00077      0.00000     -0.00000     -0.00000      0.00581      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.29439      0.00000      0.00000      0.00000      1.51662      0.00000     -0.00000     -0.00000      1.21432     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00077      0.00000      0.00000     -0.00000      0.00581     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.29439      0.00000     -0.00000     -0.00000      1.51662     -0.00000     -0.00000      0.00000      1.21432     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00064      0.00203     -0.00000      0.00000     -0.00000     -0.00260     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.52485     -0.00000      0.00000     -0.00000      1.80654      0.00000     -0.00000     -0.00000      0.96080      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.04403 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00026     -0.00000      0.00000      0.00000     -0.00131     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.76704      0.00000     -0.00000     -0.00000     -1.25160      0.00000      0.00000     -0.00000     -0.50596     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00026     -0.00000      0.00000      0.00000     -0.00131     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.76704      0.00000      0.00000      0.00000     -1.25160     -0.00000      0.00000     -0.00000     -0.50596      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00026     -0.00000     -0.00000      0.00000     -0.00131     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.76704     -0.00000      0.00000      0.00000     -1.25160      0.00000      0.00000     -0.00000     -0.50596      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00265     -0.00444      0.00000     -0.00000      0.00000     -0.00734      0.00000      0.00000      0.00000     -0.36418     -0.00000     -0.00000      0.00000      0.63508     -0.00180     -0.00000      0.00000      0.00000     -0.02207     -0.00000      0.00000      0.00000      0.03108     -0.00000      0.00000      0.00000      0.39670      0.00000      0.00000     -0.69179     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     10.19132 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.26801     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.38125     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.26801      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.38125     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00265     -0.00444      0.00000     -0.00000      0.00000     -0.00734      0.00000      0.00000      0.00000      0.73208      0.00000      0.00000     -0.00000     -0.00215     -0.00180      0.00000     -0.00000     -0.00000     -0.02207      0.00000     -0.00000     -0.00000      0.03108      0.00000     -0.00000     -0.00000     -0.79746     -0.00000     -0.00000      0.00234      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     10.19132 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.26801     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.38125      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00265     -0.00444      0.00000     -0.00000      0.00000     -0.00734     -0.00000      0.00000      0.00000     -0.36790     -0.00000     -0.00000      0.00000     -0.63292     -0.00180     -0.00000      0.00000      0.00000     -0.02207     -0.00000      0.00000      0.00000      0.03108     -0.00000      0.00000      0.00000      0.40076      0.00000      0.00000      0.68945      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     10.19132 \n     0.00124      0.00343     -0.00000      0.00000     -0.00000     -0.00619     -0.00000      0.00000      0.00000     -0.22698     -0.00000     -0.00000      0.00000      0.39582     -0.01462     -0.00000      0.00000      0.00000      0.02721     -0.00000      0.00000      0.00000      0.92620     -0.00000      0.00000      0.00000     -0.48835     -0.00000     -0.00000      0.85160      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.95206 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.79030     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.70033      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.79030      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.70033      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00124      0.00343     -0.00000      0.00000     -0.00000     -0.00619      0.00000      0.00000      0.00000      0.45628      0.00000      0.00000     -0.00000     -0.00134     -0.01462      0.00000     -0.00000     -0.00000      0.02721      0.00000     -0.00000     -0.00000      0.92620      0.00000     -0.00000      0.00000      0.98168      0.00000      0.00000     -0.00288     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.95206 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.79030     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.70033     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00124      0.00343     -0.00000      0.00000     -0.00000     -0.00619     -0.00000      0.00000      0.00000     -0.22930     -0.00000     -0.00000      0.00000     -0.39448     -0.01462     -0.00000      0.00000      0.00000      0.02721     -0.00000      0.00000      0.00000      0.92620     -0.00000      0.00000      0.00000     -0.49334     -0.00000     -0.00000     -0.84872     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.95206 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00229      0.00000     -0.00000     -0.00000      0.00394     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01588     -0.00000     -0.00000     -0.00000     -0.09852      0.00000      0.00000     -0.00000     -1.03995     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.61107      0.00000     -0.00000     -0.79158     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00229     -0.00000      0.00000     -0.00000      0.00394      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.01588      0.00000      0.00000     -0.00000     -0.09852     -0.00000      0.00000     -0.00000     -1.03995      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.48725      0.00000     -0.00000     -0.00000      1.94630     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00229     -0.00000      0.00000     -0.00000      0.00394      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.01588      0.00000      0.00000      0.00000     -0.09852      0.00000      0.00000     -0.00000     -1.03995     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.60850     -0.00000      0.00000     -0.00000      0.00000      2.37271      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00229      0.00000     -0.00000     -0.00000      0.00394     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01588      0.00000     -0.00000     -0.00000     -0.09852      0.00000      0.00000     -0.00000     -1.03995      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      2.44949     -0.00000      0.00000      0.00404      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      3.87298      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00229      0.00000     -0.00000     -0.00000      0.00394     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01588     -0.00000     -0.00000     -0.00000     -0.09852      0.00000      0.00000     -0.00000     -1.03995     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.61628     -0.00000      0.00000      2.37069     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00229     -0.00000      0.00000     -0.00000      0.00394      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.01588      0.00000      0.00000     -0.00000     -0.09852     -0.00000      0.00000     -0.00000     -1.03995      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.99998     -0.00000      0.00000      0.00000     -0.00657     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00229     -0.00000      0.00000     -0.00000      0.00394      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.01588      0.00000      0.00000      0.00000     -0.09852      0.00000      0.00000     -0.00000     -1.03995      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      2.44949      0.00000     -0.00000      0.00000     -0.00000     -0.00400      0.00000 \n    -0.00000     -0.00000     -0.00229     -0.00000      0.00000     -0.00000      0.00394      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.01588      0.00000      0.00000     -0.00000     -0.09852     -0.00000      0.00000     -0.00000     -1.03995      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.51269      0.00000     -0.00000     -0.00000     -1.92660      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00229     -0.00000      0.00000     -0.00000      0.00394      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.01588      0.00000      0.00000      0.00000     -0.09852      0.00000      0.00000     -0.00000     -1.03995     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.61366      0.00000     -0.00000      0.00000     -0.00000     -0.78957      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Zn\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.20244      0.72152      0.00000      0.00000      0.00000     -0.25556      0.00000      0.00000      0.00000      0.03635      0.00000      0.00000      0.00000     -0.02097      0.00000      0.00000      0.00000     -0.00341      0.00000      0.00000     -0.00341      0.00000     -0.00341      0.00366      0.00000      0.00000      0.00366      0.00000      0.00366      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.72152      2.57709      0.00000      0.00000      0.00000     -1.03848      0.00000      0.00000      0.00000      0.13506      0.00000      0.00000      0.00000     -0.09149      0.00000      0.00000      0.00000     -0.01424      0.00000      0.00000     -0.01424      0.00000     -0.01424      0.00513      0.00000      0.00000      0.00513      0.00000      0.00513      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.27585      0.00000      0.00000      0.00000     -0.79130      0.00000      0.00000      0.00000     -0.00211      0.00000      0.00000      0.00000      0.00028      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00522      0.00000      0.00000     -0.00522      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.27585      0.00000      0.00000      0.00000     -0.79130      0.00000      0.00000      0.00000     -0.00211      0.00000      0.00000      0.00000      0.00028      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00000     -0.00522      0.00000     -0.00522      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.27585      0.00000      0.00000      0.00000     -0.79130      0.00000      0.00000      0.00000     -0.00211      0.00000      0.00000      0.00000      0.00028      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00000     -0.00522      0.00000     -0.00522 \n    -0.25556     -1.03848      0.00000      0.00000      0.00000      2.44533      0.00000      0.00000      0.00000     -0.33888      0.00000      0.00000      0.00000      0.25701      0.00000      0.00000      0.00000     -0.01093      0.00000      0.00000     -0.01093      0.00000     -0.01093      0.00279      0.00000      0.00000      0.00279      0.00000      0.00279      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.79130      0.00000      0.00000      0.00000      2.27145      0.00000      0.00000      0.00000      0.01014      0.00000      0.00000      0.00000     -0.00214      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00307      0.00000      0.00307      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.79130      0.00000      0.00000      0.00000      2.27145      0.00000      0.00000      0.00000      0.01014      0.00000      0.00000      0.00000     -0.00214      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00000      0.00307      0.00000      0.00307      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.79130      0.00000      0.00000      0.00000      2.27145      0.00000      0.00000      0.00000      0.01014      0.00000      0.00000      0.00000     -0.00214      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00000      0.00307      0.00000      0.00307 \n     0.03635      0.13506      0.00000      0.00000      0.00000     -0.33888      0.00000      0.00000      0.00000      0.67987      0.00000      0.00000      0.00000     -0.53714      0.00000      0.00000      0.00000     -0.00338      0.00000      0.00000     -0.00338      0.00000     -0.00338     -0.02442      0.00000      0.00000     -0.02442      0.00000     -0.02442      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00211      0.00000      0.00000      0.00000      0.01014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00211      0.00000      0.00000      0.00000      0.01014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00211      0.00000      0.00000      0.00000      0.01014      0.00000      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001 \n    -0.02097     -0.09149      0.00000      0.00000      0.00000      0.25701      0.00000      0.00000      0.00000     -0.53714      0.00000      0.00000      0.00000      0.42449      0.00000      0.00000      0.00000      0.00263      0.00000      0.00000      0.00263      0.00000      0.00263      0.01937      0.00000      0.00000      0.01937      0.00000      0.01937      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00028      0.00000      0.00000      0.00000     -0.00214      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00028      0.00000      0.00000      0.00000     -0.00214      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00028      0.00000      0.00000      0.00000     -0.00214      0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00341     -0.01424      0.00000      0.00000      0.00000     -0.01093      0.00000      0.00000      0.00000     -0.00338      0.00000      0.00000      0.00000      0.00263      0.00000      0.00000      0.00000      1.10812      0.00000      0.00000     -0.55368      0.00000     -0.55368      0.65817      0.00000      0.00000     -0.32890      0.00000     -0.32889      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.32361      0.00000      0.00000      0.00000      0.00000      0.00000      1.97414      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.32361      0.00000      0.00000      0.00000      0.00000      0.00000      1.97414      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00341     -0.01424      0.00000      0.00000      0.00000     -0.01093      0.00000      0.00000      0.00000     -0.00338      0.00000      0.00000      0.00000      0.00263      0.00000      0.00000      0.00000     -0.55368      0.00000      0.00000      1.10812      0.00000     -0.55368     -0.32890      0.00000      0.00000      0.65817      0.00000     -0.32890      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.32361      0.00000      0.00000      0.00000      0.00000      0.00000      1.97414      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00341     -0.01424      0.00000      0.00000      0.00000     -0.01093      0.00000      0.00000      0.00000     -0.00338      0.00000      0.00000      0.00000      0.00263      0.00000      0.00000      0.00000     -0.55368      0.00000      0.00000     -0.55368      0.00000      1.10813     -0.32890      0.00000      0.00000     -0.32891      0.00000      0.65816      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00366      0.00513      0.00000      0.00000      0.00000      0.00279      0.00000      0.00000      0.00000     -0.02442      0.00000      0.00000      0.00000      0.01937      0.00000      0.00000      0.00000      0.65817      0.00000      0.00000     -0.32890      0.00000     -0.32890      0.39180      0.00000      0.00000     -0.19450      0.00000     -0.19449      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.97414      0.00000      0.00000      0.00000      0.00000      0.00000      1.17259      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.97414      0.00000      0.00000      0.00000      0.00000      0.00000      1.17259      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00366      0.00513      0.00000      0.00000      0.00000      0.00279      0.00000      0.00000      0.00000     -0.02442      0.00000      0.00000      0.00000      0.01937      0.00000      0.00000      0.00000     -0.32890      0.00000      0.00000      0.65817      0.00000     -0.32891     -0.19450      0.00000      0.00000      0.39180      0.00000     -0.19450      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.97414      0.00000      0.00000      0.00000      0.00000      0.00000      1.17259      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00366      0.00513      0.00000      0.00000      0.00000      0.00279      0.00000      0.00000      0.00000     -0.02442      0.00000      0.00000      0.00000      0.01937      0.00000      0.00000      0.00000     -0.32889      0.00000      0.00000     -0.32890      0.00000      0.65816     -0.19449      0.00000      0.00000     -0.19450      0.00000      0.39179      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001 \n     0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001 \n     0.00000      0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00522      0.00000      0.00000      0.00000      0.00307      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00001      0.00000      0.00001 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -344.91310    -41.49150    -36.61976    -36.61976    -36.61976     -4.47349     -2.92432     -2.92432     -2.92432     -0.28095     -0.28095     -0.28095     -0.28095     -0.28095     -0.20469     -0.03860     -0.03860     -0.03860      0.11147      0.18660      0.18660      0.18660      1.23329      1.31256      1.31256      1.31256      2.01696      2.01696      2.01696      2.01696      2.01696      2.31033      2.31033      2.31033      2.31033      2.31033      2.31033      2.31033     47.10851 \n   </alphaeps>\n   <betaeps>\n  -344.91310    -41.49150    -36.61976    -36.61976    -36.61976     -4.47349     -2.92432     -2.92432     -2.92432     -0.28095     -0.28095     -0.28095     -0.28095     -0.28095     -0.20469     -0.03860     -0.03860     -0.03860      0.11147      0.18660      0.18660      0.18660      1.23329      1.31256      1.31256      1.31256      2.01696      2.01696      2.01696      2.01696      2.01696      2.31033      2.31033      2.31033      2.31033      2.31033      2.31033      2.31033     47.10851 \n   </betaeps>\n   <alphavectors>\n     0.99582      0.30836     -0.00000      0.00000      0.00000     -0.11751      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.02580     -0.00000     -0.00000     -0.00000      0.01184      0.00000      0.00000      0.00000     -0.05813      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.32417 \n    -0.01442      1.03294     -0.00000      0.00000      0.00000     -0.45856      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.10532     -0.00000     -0.00000     -0.00000      0.11733      0.00000      0.00000      0.00000     -0.16306      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.50721 \n    -0.00000     -0.00000      0.00000     -0.00000      0.99628      0.00000     -0.00000      0.00000     -0.38125      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05338      0.00000      0.00000     -0.00000     -0.00000      0.08259      0.00000     -0.00000      0.00000     -0.14703      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.99628      0.00000      0.00000     -0.00000     -0.38125      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.05338     -0.00000      0.08259     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.14703      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.99628     -0.00000     -0.00000     -0.00000     -0.38125     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05338     -0.00000     -0.00000     -0.00000     -0.00000      0.08259     -0.00000     -0.14703     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00491      0.00076     -0.00000      0.00000      0.00000      1.06878     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.28346      0.00000      0.00000      0.00000     -0.01310     -0.00000     -0.00000      0.00000      0.88987     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     23.84392 \n    -0.00000     -0.00000      0.00000     -0.00000      0.01067     -0.00000      0.00000     -0.00000      1.06565     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.12778      0.00000      0.00000      0.00000      0.00000     -0.08472     -0.00000      0.00000     -0.00000      0.58305      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.01067     -0.00000     -0.00000      0.00000      1.06565     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.12778      0.00000     -0.08472      0.00000      0.00000     -0.00000      0.00000      0.00000      0.58305      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.01067      0.00000      0.00000      0.00000      1.06565      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.12778      0.00000      0.00000      0.00000      0.00000     -0.08472      0.00000      0.58305     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00138      0.00421     -0.00000      0.00000      0.00000     -0.00392      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.58301     -0.00000     -0.00000     -0.00000      1.74949      0.00000      0.00000      0.00000      2.13946     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.33467 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00076     -0.00000      0.00000     -0.00000      0.00475     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.34232      0.00000      0.00000     -0.00000     -0.00000      1.46603     -0.00000      0.00000     -0.00000      1.31191      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00076      0.00000      0.00000     -0.00000      0.00475      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.34232     -0.00000      1.46603      0.00000      0.00000     -0.00000      0.00000      0.00000      1.31191     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00076      0.00000      0.00000      0.00000      0.00475      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.34232     -0.00000     -0.00000     -0.00000     -0.00000      1.46603      0.00000      1.31191     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00061      0.00183     -0.00000      0.00000      0.00000     -0.00195      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.46069      0.00000      0.00000      0.00000      1.79042      0.00000      0.00000      0.00000      0.93709     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.09452 \n     0.00000      0.00000     -0.00000      0.00000     -0.00024      0.00000     -0.00000      0.00000     -0.00100      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.72048     -0.00000     -0.00000      0.00000      0.00000     -1.26163      0.00000     -0.00000      0.00000     -0.54212     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00024     -0.00000     -0.00000      0.00000     -0.00100     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.72048      0.00000     -1.26163     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.54212     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00024     -0.00000     -0.00000     -0.00000     -0.00100     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.72048      0.00000      0.00000      0.00000      0.00000     -1.26163     -0.00000     -0.54212      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00052     -0.00920      0.00000     -0.00000     -0.00000     -0.00587      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.74386     -0.00000      0.02465     -0.00287      0.00000      0.00000      0.00000     -0.01554     -0.00000     -0.00000     -0.00000      0.03781     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.75636      0.20900     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     10.69234 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.28911      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.35915      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.28911      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.35915      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00052     -0.00920      0.00000     -0.00000     -0.00000     -0.00587      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.39328     -0.00000      0.63187     -0.00287      0.00000      0.00000      0.00000     -0.01554     -0.00000     -0.00000     -0.00000      0.03781     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.19718     -0.75953      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     10.69234 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.28911     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.35915      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00052     -0.00920      0.00000     -0.00000     -0.00000     -0.00587      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.35058     -0.00000     -0.65653     -0.00287      0.00000      0.00000      0.00000     -0.01554     -0.00000     -0.00000     -0.00000      0.03781     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.55918      0.55052      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     10.69234 \n     0.00103      0.00274     -0.00000      0.00000      0.00000     -0.00427      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.44183      0.00000      0.01464     -0.02099      0.00000      0.00000      0.00000      0.01316      0.00000      0.00000      0.00000      0.89999     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.95139     -0.26290      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.09981 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.76570     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.70961      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.76570     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.70961      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00103      0.00274     -0.00000      0.00000      0.00000     -0.00427      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.23360      0.00000      0.37532     -0.02099      0.00000      0.00000      0.00000      0.01316      0.00000      0.00000      0.00000      0.89999     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.24802      0.95538     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.09981 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.76570      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.70961      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00103      0.00274     -0.00000      0.00000      0.00000     -0.00427      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.20823      0.00000     -0.38996     -0.02099      0.00000      0.00000      0.00000      0.01316      0.00000      0.00000      0.00000      0.89999     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.70337     -0.69248     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.09981 \n     0.00000      0.00000     -0.00000      0.00000     -0.00206      0.00000     -0.00000      0.00000      0.00146      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.02383     -0.00000     -0.00000      0.00000      0.00000     -0.07155      0.00000     -0.00000      0.00000     -1.04619     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.99491     -0.00000     -0.10082     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00206      0.00000      0.00000     -0.00000      0.00146      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.02383     -0.00000     -0.07155     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04619     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.38178     -0.00000     -0.57196      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00206     -0.00000     -0.00000      0.00000      0.00146     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02383     -0.00000     -0.00000     -0.00000     -0.00000     -0.07155     -0.00000     -1.04619      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.78222     -0.00000      0.00000     -0.00000      0.00000     -1.68039      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00206      0.00000     -0.00000      0.00000      0.00146     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.02383     -0.00000     -0.00000      0.00000      0.00000     -0.07155      0.00000     -0.00000      0.00000     -1.04619     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.68759     -0.00000     -1.77540      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      3.87298      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00206      0.00000     -0.00000      0.00000      0.00146     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.02383     -0.00000     -0.00000      0.00000      0.00000     -0.07155      0.00000     -0.00000      0.00000     -1.04619     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.29713      0.00000      2.07785     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00206      0.00000      0.00000     -0.00000      0.00146      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.02383     -0.00000     -0.07155     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04619     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.78004     -0.00000     -0.62572     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00206     -0.00000     -0.00000      0.00000      0.00146     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02383     -0.00000     -0.00000     -0.00000     -0.00000     -0.07155     -0.00000     -1.04619      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.18148      0.00000     -0.00000      0.00000     -0.00000      2.14572      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00206      0.00000      0.00000     -0.00000      0.00146      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.02383     -0.00000     -0.07155     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04619      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.04164      0.00000      2.44914     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00206     -0.00000     -0.00000      0.00000      0.00146     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02383     -0.00000     -0.00000     -0.00000     -0.00000     -0.07155     -0.00000     -1.04619      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.98790     -0.00000      0.00000     -0.00000      0.00000     -0.15511      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99582      0.30836     -0.00000      0.00000      0.00000     -0.11751     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.02580      0.00000     -0.00000      0.00000      0.01184     -0.00000     -0.00000     -0.00000     -0.05813      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.32417 \n    -0.01442      1.03294     -0.00000      0.00000      0.00000     -0.45856     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.10532      0.00000     -0.00000      0.00000      0.11733     -0.00000     -0.00000     -0.00000     -0.16306      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      2.50721 \n    -0.00000     -0.00000      0.00000      0.99628      0.00000      0.00000      0.00000     -0.38125     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05338      0.00000     -0.00000     -0.00000      0.08259     -0.00000      0.00000     -0.14703     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.99628     -0.00000     -0.00000     -0.00000     -0.38125     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.05338     -0.00000      0.00000      0.08259     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.14703     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.99628      0.00000      0.00000      0.00000     -0.38125     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.05338      0.00000      0.00000      0.00000      0.00000      0.08259     -0.00000     -0.00000     -0.14703     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00491      0.00076     -0.00000      0.00000      0.00000      1.06878      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.28346     -0.00000      0.00000     -0.00000     -0.01310      0.00000      0.00000      0.00000      0.88987     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     23.84392 \n    -0.00000     -0.00000      0.00000      0.01067     -0.00000     -0.00000     -0.00000      1.06565      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.12778      0.00000      0.00000     -0.00000     -0.08472      0.00000     -0.00000      0.58305     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.01067      0.00000      0.00000      0.00000      1.06565     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.12778      0.00000     -0.00000     -0.08472      0.00000      0.00000     -0.00000      0.00000      0.00000      0.58305      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.01067     -0.00000     -0.00000     -0.00000      1.06565      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.12778     -0.00000     -0.00000     -0.00000     -0.00000     -0.08472      0.00000      0.00000      0.58305     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00138      0.00421     -0.00000      0.00000      0.00000     -0.00392     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.58301      0.00000     -0.00000     -0.00000      1.74949     -0.00000     -0.00000     -0.00000      2.13946     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.33467 \n    -0.00000     -0.00000      0.00000      0.00076     -0.00000      0.00000      0.00000      0.00475     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.34232      0.00000     -0.00000     -0.00000      1.46603      0.00000     -0.00000      1.31191     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00076      0.00000      0.00000      0.00000      0.00475     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.34232     -0.00000     -0.00000      1.46603      0.00000      0.00000     -0.00000      0.00000      0.00000      1.31191     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00076      0.00000      0.00000     -0.00000      0.00475      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.34232     -0.00000     -0.00000      0.00000      0.00000      1.46603      0.00000      0.00000      1.31191     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00061      0.00183     -0.00000      0.00000      0.00000     -0.00195     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.46069     -0.00000      0.00000      0.00000      1.79042      0.00000     -0.00000     -0.00000      0.93709     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.09452 \n     0.00000      0.00000     -0.00000     -0.00024     -0.00000     -0.00000     -0.00000     -0.00100      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.72048     -0.00000      0.00000      0.00000     -1.26163     -0.00000      0.00000     -0.54212      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00024     -0.00000     -0.00000     -0.00000     -0.00100      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.72048      0.00000      0.00000     -1.26163     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.54212      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00024     -0.00000     -0.00000      0.00000     -0.00100     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.72048     -0.00000     -0.00000     -0.00000     -0.00000     -1.26163     -0.00000     -0.00000     -0.54212      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00052     -0.00920      0.00000     -0.00000     -0.00000     -0.00587     -0.00000     -0.00000      0.00000      0.73284      0.00000      0.00000      0.00000     -0.12992     -0.00287     -0.00000      0.00000      0.00000     -0.01554      0.00000      0.00000      0.00000      0.03781     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.76936      0.15439     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     10.69234 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.28911     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.35915      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.28911      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.35915     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00052     -0.00920      0.00000     -0.00000     -0.00000     -0.00587     -0.00000     -0.00000      0.00000     -0.47893      0.00000      0.00000      0.00000     -0.56970     -0.00287     -0.00000      0.00000      0.00000     -0.01554      0.00000      0.00000      0.00000      0.03781     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.25097     -0.74349      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     10.69234 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.28911     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.35915      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00052     -0.00920      0.00000     -0.00000     -0.00000     -0.00587     -0.00000     -0.00000      0.00000     -0.25391      0.00000      0.00000      0.00000      0.69962     -0.00287     -0.00000      0.00000      0.00000     -0.01554      0.00000      0.00000      0.00000      0.03781     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.51839      0.58909     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     10.69234 \n     0.00103      0.00274     -0.00000      0.00000      0.00000     -0.00427     -0.00000     -0.00000      0.00000      0.43529      0.00000      0.00000      0.00000     -0.07717     -0.02099     -0.00000      0.00000      0.00000      0.01316      0.00000     -0.00000      0.00000      0.89999     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.96775     -0.19421     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.09981 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.76570      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.70961      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.76570     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.70961     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00103      0.00274     -0.00000      0.00000      0.00000     -0.00427     -0.00000     -0.00000      0.00000     -0.28447      0.00000      0.00000      0.00000     -0.33839     -0.02099     -0.00000      0.00000      0.00000      0.01316      0.00000     -0.00000      0.00000      0.89999     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.31569      0.93520     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.09981 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.76570      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.70961      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00103      0.00274     -0.00000      0.00000      0.00000     -0.00427     -0.00000     -0.00000      0.00000     -0.15081      0.00000      0.00000      0.00000      0.41555     -0.02099     -0.00000      0.00000      0.00000      0.01316      0.00000     -0.00000      0.00000      0.89999     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.65206     -0.74099      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.09981 \n     0.00000      0.00000     -0.00000     -0.00206      0.00000      0.00000      0.00000      0.00146     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02383     -0.00000     -0.00000      0.00000     -0.07155     -0.00000      0.00000     -1.04619     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.99878     -0.00000      0.04940     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00206      0.00000      0.00000      0.00000      0.00146      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.02383     -0.00000      0.00000     -0.07155     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04619      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.75550      0.00000     -1.70828      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00206     -0.00000     -0.00000     -0.00000      0.00146     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.02383      0.00000      0.00000      0.00000      0.00000     -0.07155     -0.00000     -0.00000     -1.04619     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.79057     -0.00000      0.00000      0.00000      0.00000     -1.67149     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00206      0.00000      0.00000      0.00000      0.00146     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02383     -0.00000     -0.00000      0.00000     -0.07155     -0.00000      0.00000     -1.04619      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.59383     -0.00000      1.86003      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      3.87298     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00206      0.00000      0.00000      0.00000      0.00146     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02383     -0.00000     -0.00000      0.00000     -0.07155     -0.00000      0.00000     -1.04619      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.40250      0.00000     -2.00823      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00206      0.00000      0.00000      0.00000      0.00146      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.02383     -0.00000      0.00000     -0.07155     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04619     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.99022      0.00000     -0.13951     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00206     -0.00000     -0.00000     -0.00000      0.00146     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.02383      0.00000      0.00000      0.00000      0.00000     -0.07155     -0.00000     -0.00000     -1.04619      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.17077      0.00000     -0.00000     -0.00000     -0.00000      2.15158     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00206      0.00000      0.00000      0.00000      0.00146      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.02383     -0.00000      0.00000     -0.07155     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04619     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.21517     -0.00000      2.12682     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00206     -0.00000     -0.00000     -0.00000      0.00146     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.02383      0.00000      0.00000      0.00000      0.00000     -0.07155     -0.00000     -0.00000     -1.04619      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.98711     -0.00000      0.00000      0.00000      0.00000     -0.16003     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Al\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.13074     -0.54425      0.00000      0.00000      0.00000     -0.02558      0.00000      0.00000      0.00000      0.06934      0.00000      0.00000      0.00000      0.03654      0.00000      0.00000      0.03654      0.00000      0.03654 \n    -0.54425      2.26610      0.00000      0.00000      0.00000     -0.24261      0.00000      0.00000      0.00000     -0.26999      0.00000      0.00000      0.00000     -0.04869      0.00000      0.00000     -0.04869      0.00000     -0.04869 \n     0.00000      0.00000      1.98019      0.00000      0.00000      0.00000      0.02893      0.00000      0.00000      0.00000     -0.05767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.98019      0.00000      0.00000      0.00000      0.02893      0.00000      0.00000      0.00000     -0.05767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.98019      0.00000      0.00000      0.00000      0.02893      0.00000      0.00000      0.00000     -0.05767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02558     -0.24261      0.00000      0.00000      0.00000      1.20741      0.00000      0.00000      0.00000      0.55769      0.00000      0.00000      0.00000     -0.04830      0.00000      0.00000     -0.04829      0.00000     -0.04829 \n     0.00000      0.00000      0.02893      0.00000      0.00000      0.00000      0.11343      0.00000      0.00000      0.00000      0.10276      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02893      0.00000      0.00000      0.00000      0.11343      0.00000      0.00000      0.00000      0.10276      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02893      0.00000      0.00000      0.00000      0.11343      0.00000      0.00000      0.00000      0.10276      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06934     -0.26999      0.00000      0.00000      0.00000      0.55769      0.00000      0.00000      0.00000      0.26974      0.00000      0.00000      0.00000     -0.01769      0.00000      0.00000     -0.01769      0.00000     -0.01769 \n     0.00000      0.00000     -0.05767      0.00000      0.00000      0.00000      0.10276      0.00000      0.00000      0.00000      0.09667      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05767      0.00000      0.00000      0.00000      0.10276      0.00000      0.00000      0.00000      0.09667      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05767      0.00000      0.00000      0.00000      0.10276      0.00000      0.00000      0.00000      0.09667      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03654     -0.04869      0.00000      0.00000      0.00000     -0.04830      0.00000      0.00000      0.00000     -0.01769      0.00000      0.00000      0.00000      0.00372      0.00000      0.00000      0.00372      0.00000      0.00372 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03654     -0.04869      0.00000      0.00000      0.00000     -0.04829      0.00000      0.00000      0.00000     -0.01769      0.00000      0.00000      0.00000      0.00372      0.00000      0.00000      0.00372      0.00000      0.00372 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03654     -0.04869      0.00000      0.00000      0.00000     -0.04829      0.00000      0.00000      0.00000     -0.01769      0.00000      0.00000      0.00000      0.00372      0.00000      0.00000      0.00372      0.00000      0.00372 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33334      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -55.14982     -3.92830     -2.55899     -2.55899     -2.55899     -0.29475     -0.10944     -0.10944     -0.10944      0.08964      0.15355      0.15355      0.15355      0.40862      0.40862      0.40862      0.40862      0.40862      1.96736 \n   </alphaeps>\n   <betaeps>\n   -55.14805     -3.92593     -2.55604     -2.55604     -2.55604     -0.26998     -0.08619     -0.08619     -0.08619      0.10600      0.16984      0.16984      0.16984      0.43523      0.43523      0.43523      0.43523      0.43523      1.98468 \n   </betaeps>\n   <alphavectors>\n     0.99628     -0.26198     -0.00000     -0.00000     -0.00000      0.06429      0.00000      0.00000     -0.00000      0.06083      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.14368 \n     0.01471      1.01915      0.00000      0.00000      0.00000     -0.30608     -0.00000     -0.00000      0.00000     -0.08934     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.58004 \n     0.00000     -0.00000      0.99145      0.00000     -0.00000      0.00000     -0.20233     -0.00000      0.00000     -0.00000     -0.26090     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.99145     -0.00000      0.00000      0.00000     -0.20233     -0.00000      0.00000      0.00000      0.00000     -0.26090      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.99145      0.00000     -0.00000     -0.00000     -0.20233      0.00000      0.00000     -0.26090     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.03289      0.11317     -0.00000      0.00000      0.00000      0.76037      0.00000      0.00000     -0.00000      1.92166      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      7.63371 \n     0.00000     -0.00000      0.03480      0.00000     -0.00000      0.00000      0.57728      0.00000     -0.00000     -0.00000      1.26214      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.03480      0.00000     -0.00000     -0.00000      0.57728      0.00000     -0.00000     -0.00000     -0.00000      1.26214      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.03480     -0.00000      0.00000      0.00000      0.57728     -0.00000     -0.00000      1.26214      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00527     -0.02249     -0.00000     -0.00000     -0.00000      0.36489     -0.00000      0.00000     -0.00000     -1.81798     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.84712 \n    -0.00000      0.00000     -0.01098     -0.00000      0.00000     -0.00000      0.53787      0.00000     -0.00000     -0.00000     -1.23298     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.01098      0.00000     -0.00000     -0.00000      0.53787     -0.00000      0.00000      0.00000      0.00000     -1.23298      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.01098      0.00000      0.00000      0.00000      0.53787      0.00000      0.00000     -1.23298     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.01164     -0.03207      0.00000     -0.00000     -0.00000     -0.02204     -0.00000     -0.00000      0.00000     -0.08368     -0.00000     -0.00000     -0.00000      1.00000     -0.00000      0.00000      0.00000     -0.00000     -3.08521 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000 \n     0.01164     -0.03207      0.00000     -0.00000     -0.00000     -0.02204     -0.00000     -0.00000      0.00000     -0.08368     -0.00000     -0.00000     -0.00000     -0.50000      0.00000     -0.00000      0.86603     -0.00000     -3.08521 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000 \n     0.01164     -0.03207     -0.00000     -0.00000     -0.00000     -0.02204      0.00000     -0.00000      0.00000     -0.08368      0.00000     -0.00000     -0.00000     -0.50000      0.00000     -0.00000     -0.86603      0.00000     -3.08521 \n   </alphavectors>\n   <betavectors>\n     0.99629     -0.26203     -0.00000     -0.00000      0.00000      0.06438     -0.00000      0.00000     -0.00000      0.06129     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.14334 \n     0.01469      1.01936      0.00000      0.00000     -0.00000     -0.30695     -0.00000     -0.00000      0.00000     -0.09136      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.57890 \n     0.00000      0.00000      0.00000      0.00000      0.99175      0.00000     -0.00000     -0.00000     -0.19662     -0.00000     -0.00000      0.00000     -0.26412     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.99175      0.00000     -0.00000     -0.00000     -0.19662      0.00000     -0.00000      0.00000     -0.00000     -0.26412      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.99175     -0.00000      0.00000      0.00000     -0.19662      0.00000     -0.00000     -0.26412      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.03284      0.11171      0.00000      0.00000      0.00000      0.77576      0.00000      0.00000     -0.00000      1.94188     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      7.62707 \n     0.00000      0.00000      0.00000      0.00000      0.03364      0.00000     -0.00000     -0.00000      0.55300      0.00000      0.00000     -0.00000      1.27299      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.03364     -0.00000      0.00000      0.00000      0.55300     -0.00000      0.00000     -0.00000      0.00000      1.27299     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.03364      0.00000     -0.00000     -0.00000      0.55300     -0.00000      0.00000      1.27299     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00527     -0.02210     -0.00000     -0.00000     -0.00000      0.36816      0.00000      0.00000      0.00000     -1.81882      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.84391 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.01060     -0.00000      0.00000      0.00000      0.56139      0.00000      0.00000     -0.00000     -1.22245      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.01060      0.00000      0.00000     -0.00000      0.56139      0.00000     -0.00000      0.00000     -0.00000     -1.22245      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.01060      0.00000     -0.00000     -0.00000      0.56139      0.00000     -0.00000     -1.22245     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.01162     -0.03181     -0.00000     -0.00000     -0.00000     -0.03041     -0.00000     -0.00000      0.00000     -0.09096      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.00000     -3.08494 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000 \n     0.01162     -0.03181     -0.00000     -0.00000      0.00000     -0.03040     -0.00000     -0.00000     -0.00000     -0.09096      0.00000     -0.00000      0.00000      0.86603     -0.00000      0.00000      0.00000     -0.50000     -3.08493 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000 \n     0.01162     -0.03181     -0.00000     -0.00000      0.00000     -0.03040     -0.00000     -0.00000      0.00000     -0.09096      0.00000     -0.00000      0.00000     -0.86603      0.00000     -0.00000     -0.00000     -0.50000     -3.08493 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Si\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.13876     -0.56584      0.00000      0.00000      0.00000     -0.02244      0.00000      0.00000      0.00000      0.07827      0.00000      0.00000      0.00000      0.03852      0.00000      0.00000      0.03852      0.00000      0.03852 \n    -0.56584      2.30149      0.00000      0.00000      0.00000     -0.26476      0.00000      0.00000      0.00000     -0.29525      0.00000      0.00000      0.00000     -0.05148      0.00000      0.00000     -0.05148      0.00000     -0.05148 \n     0.00000      0.00000      1.99987      0.00000      0.00000      0.00000     -0.03222      0.00000      0.00000      0.00000     -0.09602      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.99987      0.00000      0.00000      0.00000     -0.03222      0.00000      0.00000      0.00000     -0.09602      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.99987      0.00000      0.00000      0.00000     -0.03222      0.00000      0.00000      0.00000     -0.09602      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02244     -0.26476      0.00000      0.00000      0.00000      1.18485      0.00000      0.00000      0.00000      0.55303      0.00000      0.00000      0.00000     -0.03965      0.00000      0.00000     -0.03965      0.00000     -0.03965 \n     0.00000      0.00000     -0.03222      0.00000      0.00000      0.00000      0.27707      0.00000      0.00000      0.00000      0.20364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.03222      0.00000      0.00000      0.00000      0.27707      0.00000      0.00000      0.00000      0.20364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.03222      0.00000      0.00000      0.00000      0.27707      0.00000      0.00000      0.00000      0.20364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07827     -0.29525      0.00000      0.00000      0.00000      0.55303      0.00000      0.00000      0.00000      0.27235      0.00000      0.00000      0.00000     -0.01345      0.00000      0.00000     -0.01345      0.00000     -0.01345 \n     0.00000      0.00000     -0.09602      0.00000      0.00000      0.00000      0.20364      0.00000      0.00000      0.00000      0.15229      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.09602      0.00000      0.00000      0.00000      0.20364      0.00000      0.00000      0.00000      0.15229      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.09602      0.00000      0.00000      0.00000      0.20364      0.00000      0.00000      0.00000      0.15229      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03852     -0.05148      0.00000      0.00000      0.00000     -0.03965      0.00000      0.00000      0.00000     -0.01345      0.00000      0.00000      0.00000      0.00328      0.00000      0.00000      0.00328      0.00000      0.00328 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03852     -0.05148      0.00000      0.00000      0.00000     -0.03965      0.00000      0.00000      0.00000     -0.01345      0.00000      0.00000      0.00000      0.00328      0.00000      0.00000      0.00328      0.00000      0.00328 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03852     -0.05148      0.00000      0.00000      0.00000     -0.03965      0.00000      0.00000      0.00000     -0.01345      0.00000      0.00000      0.00000      0.00328      0.00000      0.00000      0.00328      0.00000      0.00328 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66667      0.66667      0.66667      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -65.17093     -5.06441     -3.50625     -3.50625     -3.50625     -0.41410     -0.16724     -0.16724     -0.16724      0.13254      0.20385      0.20385      0.20385      0.50393      0.50393      0.50393      0.50393      0.50393      2.79092 \n   </alphaeps>\n   <betaeps>\n   -65.16539     -5.05734     -3.49758     -3.49758     -3.49758     -0.35832     -0.11629     -0.11629     -0.11629      0.16589      0.23729      0.23729      0.23729      0.56491      0.56491      0.56491      0.56491      0.56491      2.83040 \n   </betaeps>\n   <alphavectors>\n     0.99605     -0.26820     -0.00000     -0.00000     -0.00000      0.07293      0.00000      0.00000      0.00000      0.07114     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.16558 \n     0.01490      1.01940     -0.00000      0.00000      0.00000     -0.33277     -0.00000     -0.00000     -0.00000     -0.08881      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.57272 \n     0.00000     -0.00000     -0.00000     -0.00000      0.99038      0.00000     -0.00000      0.00000     -0.23552      0.00000      0.00000     -0.27741     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.99038      0.00000      0.00000     -0.00000     -0.23552      0.00000      0.00000      0.00000     -0.27741     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.99038     -0.00000      0.00000     -0.00000     -0.23552      0.00000     -0.00000     -0.00000     -0.00000     -0.27741      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.03482      0.12026     -0.00000      0.00000      0.00000      0.75302      0.00000      0.00000      0.00000      1.89116     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      8.08124 \n     0.00000     -0.00000     -0.00000     -0.00000      0.03567     -0.00000      0.00000     -0.00000      0.64188     -0.00000     -0.00000      1.24533      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.03567      0.00000      0.00000     -0.00000      0.64188     -0.00000     -0.00000      0.00000      1.24533      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.03567      0.00000     -0.00000      0.00000      0.64188     -0.00000      0.00000      0.00000      0.00000      1.24533     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00578     -0.02510      0.00000     -0.00000     -0.00000      0.35965     -0.00000      0.00000      0.00000     -1.82978      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.93442 \n    -0.00000      0.00000      0.00000      0.00000     -0.01096     -0.00000      0.00000     -0.00000      0.47760      0.00000      0.00000     -1.26129      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.01096     -0.00000     -0.00000      0.00000      0.47760     -0.00000     -0.00000     -0.00000     -1.26129     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01096      0.00000     -0.00000      0.00000      0.47760      0.00000     -0.00000     -0.00000     -0.00000     -1.26129      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.01221     -0.03236      0.00000     -0.00000     -0.00000     -0.01384     -0.00000     -0.00000     -0.00000     -0.06563     -0.00000     -0.00000      0.00000     -0.50000     -0.00000      0.00000      0.86603     -0.00000     -3.24397 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000 \n     0.01221     -0.03236     -0.00000     -0.00000     -0.00000     -0.01384     -0.00000     -0.00000     -0.00000     -0.06563     -0.00000     -0.00000      0.00000      1.00000      0.00000     -0.00000      0.00000     -0.00000     -3.24397 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000 \n     0.01221     -0.03236     -0.00000     -0.00000     -0.00000     -0.01384      0.00000     -0.00000     -0.00000     -0.06563      0.00000     -0.00000      0.00000     -0.50000     -0.00000      0.00000     -0.86603      0.00000     -3.24397 \n   </alphavectors>\n   <betavectors>\n     0.99606     -0.26832      0.00000     -0.00000     -0.00000      0.07255     -0.00000      0.00000      0.00000      0.07232     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.16499 \n     0.01487      1.01987     -0.00000      0.00000      0.00000     -0.33316      0.00000     -0.00000     -0.00000     -0.09380      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.57086 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.99098      0.00000     -0.00000     -0.22377      0.00000     -0.00000     -0.00000     -0.28492     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.99098      0.00000      0.00000     -0.00000     -0.22377      0.00000     -0.00000      0.00000     -0.28492      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.99098      0.00000      0.00000      0.00000     -0.00000     -0.22377      0.00000     -0.00000      0.00000     -0.28492      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.03470      0.11723     -0.00000      0.00000      0.00000      0.76628     -0.00000     -0.00000      0.00000      1.92534     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      8.07197 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.03354     -0.00000      0.00000      0.59506     -0.00000      0.00000      0.00000      1.26842      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.03354      0.00000      0.00000     -0.00000      0.59506     -0.00000      0.00000      0.00000      1.26842     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.03354     -0.00000     -0.00000     -0.00000      0.00000      0.59506     -0.00000      0.00000     -0.00000      1.26842     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00576     -0.02425      0.00000     -0.00000     -0.00000      0.37646      0.00000     -0.00000      0.00000     -1.82854      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.93026 \n     0.00000      0.00000      0.00000      0.00000     -0.01027      0.00000      0.00000      0.52427      0.00000     -0.00000     -0.00000     -1.24262      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.01027     -0.00000     -0.00000      0.00000      0.52427     -0.00000      0.00000      0.00000     -1.24262      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.01027     -0.00000     -0.00000     -0.00000      0.00000      0.52427      0.00000     -0.00000      0.00000     -1.24262     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.01216     -0.03185     -0.00000     -0.00000     -0.00000     -0.02709     -0.00000      0.00000     -0.00000     -0.07610     -0.00000      0.00000     -0.00000     -0.50000     -0.00000      0.00000      0.86603     -0.00000     -3.24367 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000 \n     0.01216     -0.03185     -0.00000     -0.00000     -0.00000     -0.02709      0.00000      0.00000     -0.00000     -0.07610     -0.00000      0.00000     -0.00000      1.00000      0.00000     -0.00000      0.00000     -0.00000     -3.24367 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000 \n     0.01216     -0.03185      0.00000     -0.00000     -0.00000     -0.02709      0.00000      0.00000     -0.00000     -0.07610      0.00000      0.00000     -0.00000     -0.50000     -0.00000      0.00000     -0.86603      0.00000     -3.24367 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"P\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.14573     -0.58285      0.00000      0.00000      0.00000     -0.00725      0.00000      0.00000      0.00000      0.07640      0.00000      0.00000      0.00000      0.03804      0.00000      0.00000      0.03804      0.00000      0.03804 \n    -0.58285      2.33220      0.00000      0.00000      0.00000     -0.31898      0.00000      0.00000      0.00000     -0.29686      0.00000      0.00000      0.00000     -0.05188      0.00000      0.00000     -0.05188      0.00000     -0.05188 \n     0.00000      0.00000      2.03206      0.00000      0.00000      0.00000     -0.11960      0.00000      0.00000      0.00000     -0.12894      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.03206      0.00000      0.00000      0.00000     -0.11960      0.00000      0.00000      0.00000     -0.12894      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.03206      0.00000      0.00000      0.00000     -0.11960      0.00000      0.00000      0.00000     -0.12894      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00725     -0.31898      0.00000      0.00000      0.00000      1.22325      0.00000      0.00000      0.00000      0.54497      0.00000      0.00000      0.00000     -0.03563      0.00000      0.00000     -0.03563      0.00000     -0.03563 \n     0.00000      0.00000     -0.11960      0.00000      0.00000      0.00000      0.49019      0.00000      0.00000      0.00000      0.29549      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.11960      0.00000      0.00000      0.00000      0.49019      0.00000      0.00000      0.00000      0.29549      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.11960      0.00000      0.00000      0.00000      0.49019      0.00000      0.00000      0.00000      0.29549      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07640     -0.29686      0.00000      0.00000      0.00000      0.54497      0.00000      0.00000      0.00000      0.25464      0.00000      0.00000      0.00000     -0.01147      0.00000      0.00000     -0.01147      0.00000     -0.01147 \n     0.00000      0.00000     -0.12894      0.00000      0.00000      0.00000      0.29549      0.00000      0.00000      0.00000      0.17973      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.12894      0.00000      0.00000      0.00000      0.29549      0.00000      0.00000      0.00000      0.17973      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.12894      0.00000      0.00000      0.00000      0.29549      0.00000      0.00000      0.00000      0.17973      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03804     -0.05188      0.00000      0.00000      0.00000     -0.03563      0.00000      0.00000      0.00000     -0.01147      0.00000      0.00000      0.00000      0.00308      0.00000      0.00000      0.00308      0.00000      0.00308 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03804     -0.05188      0.00000      0.00000      0.00000     -0.03563      0.00000      0.00000      0.00000     -0.01147      0.00000      0.00000      0.00000      0.00308      0.00000      0.00000      0.00308      0.00000      0.00308 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03804     -0.05188      0.00000      0.00000      0.00000     -0.03563      0.00000      0.00000      0.00000     -0.01147      0.00000      0.00000      0.00000      0.00308      0.00000      0.00000      0.00308      0.00000      0.00308 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -76.04710     -6.31719     -4.56706     -4.56706     -4.56706     -0.53680     -0.22737     -0.22737     -0.22737      0.17821      0.25399      0.25399      0.25399      0.56654      0.56654      0.56654      0.56654      0.56654      3.28073 \n   </alphaeps>\n   <betaeps>\n   -76.03575     -6.30331     -4.55018     -4.55018     -4.55018     -0.44597     -0.14506     -0.14506     -0.14506      0.22978      0.30496      0.30496      0.30496      0.66709      0.66709      0.66709      0.66709      0.66709      3.34706 \n   </betaeps>\n   <alphavectors>\n     0.99572     -0.27406      0.00000     -0.00000     -0.00000      0.07937      0.00000      0.00000      0.00000      0.07376      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.17369 \n     0.01621      1.01819     -0.00000      0.00000      0.00000     -0.35794     -0.00000     -0.00000     -0.00000     -0.09641     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.68028 \n    -0.00000      0.00000      0.99065     -0.00000     -0.00000      0.00000      0.00000     -0.26011      0.00000      0.00000      0.00000     -0.28399      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.99065     -0.00000      0.00000     -0.26011      0.00000      0.00000      0.00000     -0.28399      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.99065     -0.00000     -0.00000     -0.00000     -0.26011      0.00000      0.00000      0.00000     -0.28399      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.03315      0.11819     -0.00000      0.00000      0.00000      0.76922      0.00000      0.00000      0.00000      1.71751      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      7.15329 \n    -0.00000      0.00000      0.03276     -0.00000     -0.00000     -0.00000     -0.00000      0.69873     -0.00000     -0.00000     -0.00000      1.21920      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.03276      0.00000     -0.00000      0.69873     -0.00000     -0.00000     -0.00000      1.21920      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.03276      0.00000      0.00000      0.00000      0.69873     -0.00000     -0.00000     -0.00000      1.21920     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00448     -0.02131      0.00000     -0.00000     -0.00000      0.33979      0.00000      0.00000      0.00000     -1.81232     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.53363 \n     0.00000     -0.00000     -0.00991      0.00000      0.00000     -0.00000     -0.00000      0.42374      0.00000      0.00000      0.00000     -1.27704      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00991     -0.00000      0.00000      0.42374      0.00000      0.00000      0.00000     -1.27704     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00991     -0.00000     -0.00000     -0.00000      0.42374      0.00000      0.00000      0.00000     -1.27704      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.01176     -0.03240      0.00000     -0.00000     -0.00000     -0.00934     -0.00000     -0.00000     -0.00000      0.00224     -0.00000     -0.00000      0.00000     -0.38861      0.92140     -0.00000      0.00000      0.00000     -2.95899 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000 \n     0.01176     -0.03240      0.00000     -0.00000     -0.00000     -0.00934     -0.00000     -0.00000     -0.00000      0.00224     -0.00000     -0.00000      0.00000     -0.60365     -0.79725      0.00000     -0.00000     -0.00000     -2.95899 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000 \n     0.01176     -0.03240      0.00000     -0.00000     -0.00000     -0.00934     -0.00000     -0.00000     -0.00000      0.00224     -0.00000     -0.00000      0.00000      0.99226     -0.12415     -0.00000      0.00000      0.00000     -2.95899 \n   </alphavectors>\n   <betavectors>\n     0.99573     -0.27427      0.00000      0.00000     -0.00000      0.07848      0.00000      0.00000     -0.00000      0.07538      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.17298 \n     0.01615      1.01905     -0.00000     -0.00000      0.00000     -0.35830     -0.00000     -0.00000      0.00000     -0.10380     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.67771 \n     0.00000      0.00000      0.99147      0.00000     -0.00000      0.00000      0.00000     -0.24362     -0.00000      0.00000     -0.29552      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.99147     -0.00000      0.00000     -0.24362      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.29552     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.99147     -0.00000     -0.00000     -0.00000     -0.24362     -0.00000     -0.00000     -0.29552      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.03296      0.11307     -0.00000     -0.00000      0.00000      0.77628      0.00000      0.00000     -0.00000      1.74673      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      7.14553 \n     0.00000      0.00000      0.02995     -0.00000      0.00000     -0.00000     -0.00000      0.63563      0.00000     -0.00000      1.25332      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.02995      0.00000     -0.00000      0.63563     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.25332      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.02995      0.00000      0.00000      0.00000      0.63563      0.00000      0.00000      1.25332      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00446     -0.02006      0.00000      0.00000     -0.00000      0.37187      0.00000      0.00000     -0.00000     -1.80649     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.53208 \n    -0.00000     -0.00000     -0.00898      0.00000     -0.00000     -0.00000     -0.00000      0.48837     -0.00000      0.00000     -1.25376     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00898     -0.00000      0.00000      0.48837      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.25376     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00898      0.00000      0.00000      0.00000      0.48837     -0.00000     -0.00000     -1.25376     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.01169     -0.03138      0.00000      0.00000     -0.00000     -0.02614     -0.00000     -0.00000      0.00000     -0.00398     -0.00000     -0.00000     -0.00000     -0.27870      0.96038     -0.00000     -0.00000      0.00000     -2.95889 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000 \n     0.01169     -0.03138      0.00000      0.00000     -0.00000     -0.02614     -0.00000     -0.00000      0.00000     -0.00398     -0.00000     -0.00000     -0.00000      0.97106     -0.23883      0.00000      0.00000     -0.00000     -2.95889 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000 \n     0.01169     -0.03138      0.00000      0.00000     -0.00000     -0.02614     -0.00000     -0.00000      0.00000     -0.00398     -0.00000     -0.00000     -0.00000     -0.69236     -0.72155      0.00000      0.00000     -0.00000     -2.95889 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"S\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.15307     -0.59923      0.00000      0.00000      0.00000      0.01467      0.00000      0.00000      0.00000      0.07048      0.00000      0.00000      0.00000      0.03495      0.00000      0.00000      0.03495      0.00000      0.03495 \n    -0.59923      2.35740      0.00000      0.00000      0.00000     -0.38872      0.00000      0.00000      0.00000     -0.27912      0.00000      0.00000      0.00000     -0.04826      0.00000      0.00000     -0.04826      0.00000     -0.04826 \n     0.00000      0.00000      2.06361      0.00000      0.00000      0.00000     -0.20753      0.00000      0.00000      0.00000     -0.16525      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.06361      0.00000      0.00000      0.00000     -0.20753      0.00000      0.00000      0.00000     -0.16524      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.06361      0.00000      0.00000      0.00000     -0.20753      0.00000      0.00000      0.00000     -0.16524      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01467     -0.38872      0.00000      0.00000      0.00000      1.33835      0.00000      0.00000      0.00000      0.50802      0.00000      0.00000      0.00000     -0.02987      0.00000      0.00000     -0.02987      0.00000     -0.02987 \n     0.00000      0.00000     -0.20753      0.00000      0.00000      0.00000      0.72461      0.00000      0.00000      0.00000      0.38600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.20753      0.00000      0.00000      0.00000      0.72461      0.00000      0.00000      0.00000      0.38599      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.20753      0.00000      0.00000      0.00000      0.72461      0.00000      0.00000      0.00000      0.38599      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07048     -0.27912      0.00000      0.00000      0.00000      0.50802      0.00000      0.00000      0.00000      0.20130      0.00000      0.00000      0.00000     -0.00780      0.00000      0.00000     -0.00780      0.00000     -0.00780 \n     0.00000      0.00000     -0.16525      0.00000      0.00000      0.00000      0.38600      0.00000      0.00000      0.00000      0.20798      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.16524      0.00000      0.00000      0.00000      0.38599      0.00000      0.00000      0.00000      0.20798      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.16524      0.00000      0.00000      0.00000      0.38599      0.00000      0.00000      0.00000      0.20798      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03495     -0.04826      0.00000      0.00000      0.00000     -0.02987      0.00000      0.00000      0.00000     -0.00780      0.00000      0.00000      0.00000      0.00235      0.00000      0.00000      0.00235      0.00000      0.00235 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03495     -0.04826      0.00000      0.00000      0.00000     -0.02987      0.00000      0.00000      0.00000     -0.00780      0.00000      0.00000      0.00000      0.00235      0.00000      0.00000      0.00235      0.00000      0.00235 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03495     -0.04826      0.00000      0.00000      0.00000     -0.02987      0.00000      0.00000      0.00000     -0.00780      0.00000      0.00000      0.00000      0.00235      0.00000      0.00000      0.00235      0.00000      0.00235 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33334      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -87.78595     -7.69790     -5.75186     -5.75186     -5.75186     -0.65164     -0.27944     -0.27944     -0.27944      0.21425      0.29666      0.29666      0.29666      0.64904      0.64904      0.64904      0.64904      0.64904      3.72468 \n   </alphaeps>\n   <betaeps>\n   -87.77587     -7.68619     -5.73764     -5.73764     -5.73764     -0.58855     -0.22274     -0.22274     -0.22274      0.24733      0.32939      0.32939      0.32939      0.71899      0.71899      0.71899      0.71899      0.71899      3.77250 \n   </betaeps>\n   <alphavectors>\n     0.99560     -0.27963     -0.00000     -0.00000      0.00000      0.08451      0.00000     -0.00000     -0.00000     -0.07303      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.17281 \n     0.01686      1.01650      0.00000      0.00000     -0.00000     -0.38029     -0.00000      0.00000      0.00000      0.11653     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.77991 \n     0.00000      0.00000      0.00000      0.00000      0.98985     -0.00000     -0.00000     -0.00000     -0.28049      0.00000      0.00000     -0.00000     -0.28685      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.98985      0.00000     -0.00000      0.00000     -0.28049     -0.00000     -0.00000     -0.00000     -0.28685      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.98985     -0.00000     -0.00000      0.00000     -0.28049      0.00000      0.00000     -0.00000     -0.28685      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.02963      0.11377      0.00000      0.00000      0.00000      0.81135      0.00000     -0.00000     -0.00000     -1.55624      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      6.37575 \n     0.00000      0.00000      0.00000      0.00000      0.03376     -0.00000     -0.00000     -0.00000      0.74511     -0.00000     -0.00000      0.00000      1.15752     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.03376     -0.00000      0.00000     -0.00000      0.74511      0.00000      0.00000      0.00000      1.15752     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.03376      0.00000      0.00000     -0.00000      0.74511     -0.00000     -0.00000      0.00000      1.15752     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00333     -0.01938     -0.00000     -0.00000      0.00000      0.30481      0.00000     -0.00000      0.00000      1.75800     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.27875 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00994      0.00000      0.00000      0.00000      0.38458     -0.00000     -0.00000      0.00000     -1.25448     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00994      0.00000      0.00000     -0.00000      0.38458     -0.00000     -0.00000     -0.00000     -1.25448     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00994      0.00000     -0.00000     -0.00000      0.38458      0.00000      0.00000     -0.00000     -1.25448      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.01057     -0.02953     -0.00000     -0.00000      0.00000     -0.00988     -0.00000      0.00000      0.00000     -0.04258      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.00000     -2.69466 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000 \n     0.01057     -0.02953     -0.00000     -0.00000     -0.00000     -0.00988     -0.00000      0.00000      0.00000     -0.04258      0.00000     -0.00000      0.00000      0.86603      0.00000     -0.00000     -0.00000     -0.50000     -2.69466 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000 \n     0.01057     -0.02953     -0.00000     -0.00000     -0.00000     -0.00988     -0.00000      0.00000     -0.00000     -0.04258      0.00000     -0.00000      0.00000     -0.86603     -0.00000      0.00000      0.00000     -0.50000     -2.69466 \n   </alphavectors>\n   <betavectors>\n     0.99561     -0.27977      0.00000     -0.00000     -0.00000      0.08371     -0.00000     -0.00000     -0.00000     -0.07402     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.17248 \n     0.01681      1.01716     -0.00000      0.00000      0.00000     -0.37990      0.00000      0.00000      0.00000      0.12118      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.77853 \n     0.00000      0.00000      0.99034      0.00000      0.00000     -0.00000     -0.27034      0.00000     -0.00000     -0.00000     -0.29480     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.99034     -0.00000     -0.00000     -0.00000     -0.27034     -0.00000      0.00000      0.00000     -0.29480     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.99034     -0.00000      0.00000     -0.00000     -0.27034     -0.00000     -0.00000     -0.00000     -0.29480     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.02950      0.11032     -0.00000      0.00000      0.00000      0.80821     -0.00000     -0.00000     -0.00000     -1.56737     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      6.37348 \n     0.00000      0.00000      0.03219      0.00000      0.00000     -0.00000      0.70833     -0.00000      0.00000     -0.00000      1.18043      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.03219      0.00000      0.00000      0.00000      0.70833      0.00000     -0.00000     -0.00000      1.18043      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.03219      0.00000     -0.00000      0.00000      0.70833      0.00000      0.00000      0.00000      1.18043      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00332     -0.01865      0.00000     -0.00000     -0.00000      0.32810      0.00000     -0.00000     -0.00000      1.75367      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.27967 \n    -0.00000     -0.00000     -0.00943     -0.00000     -0.00000      0.00000      0.42387     -0.00000      0.00000     -0.00000     -1.24175     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00943      0.00000     -0.00000      0.00000      0.42387     -0.00000      0.00000      0.00000     -1.24175      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00943     -0.00000     -0.00000      0.00000      0.42387     -0.00000     -0.00000     -0.00000     -1.24175     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.01052     -0.02877      0.00000     -0.00000     -0.00000     -0.01818     -0.00000      0.00000      0.00000     -0.04239      0.00000     -0.00000      0.00000      1.00000      0.00000     -0.00000      0.00000     -0.00000     -2.69463 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000 \n     0.01052     -0.02877     -0.00000     -0.00000     -0.00000     -0.01818      0.00000      0.00000      0.00000     -0.04239     -0.00000     -0.00000      0.00000     -0.50000     -0.00000      0.00000      0.86603     -0.00000     -2.69463 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000 \n     0.01052     -0.02877     -0.00000     -0.00000     -0.00000     -0.01818     -0.00000      0.00000      0.00000     -0.04239      0.00000     -0.00000      0.00000     -0.50000     -0.00000      0.00000     -0.86603      0.00000     -2.69463 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cl\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.15973     -0.61504      0.00000      0.00000      0.00000      0.03338      0.00000      0.00000      0.00000      0.06889      0.00000      0.00000      0.00000      0.03141      0.00000      0.00000      0.03141      0.00000      0.03141 \n    -0.61504      2.38294      0.00000      0.00000      0.00000     -0.43017      0.00000      0.00000      0.00000     -0.28401      0.00000      0.00000      0.00000     -0.04389      0.00000      0.00000     -0.04389      0.00000     -0.04389 \n     0.00000      0.00000      2.10315      0.00000      0.00000      0.00000     -0.30353      0.00000      0.00000      0.00000     -0.20621      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.10315      0.00000      0.00000      0.00000     -0.30353      0.00000      0.00000      0.00000     -0.20622      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.10315      0.00000      0.00000      0.00000     -0.30353      0.00000      0.00000      0.00000     -0.20621      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03338     -0.43017      0.00000      0.00000      0.00000      1.32867      0.00000      0.00000      0.00000      0.51603      0.00000      0.00000      0.00000     -0.02661      0.00000      0.00000     -0.02661      0.00000     -0.02661 \n     0.00000      0.00000     -0.30353      0.00000      0.00000      0.00000      0.94134      0.00000      0.00000      0.00000      0.48156      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.30353      0.00000      0.00000      0.00000      0.94135      0.00000      0.00000      0.00000      0.48157      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.30353      0.00000      0.00000      0.00000      0.94134      0.00000      0.00000      0.00000      0.48156      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06889     -0.28401      0.00000      0.00000      0.00000      0.51603      0.00000      0.00000      0.00000      0.20689      0.00000      0.00000      0.00000     -0.00740      0.00000      0.00000     -0.00740      0.00000     -0.00740 \n     0.00000      0.00000     -0.20621      0.00000      0.00000      0.00000      0.48156      0.00000      0.00000      0.00000      0.24790      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.20622      0.00000      0.00000      0.00000      0.48157      0.00000      0.00000      0.00000      0.24790      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.20621      0.00000      0.00000      0.00000      0.48156      0.00000      0.00000      0.00000      0.24790      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03141     -0.04389      0.00000      0.00000      0.00000     -0.02661      0.00000      0.00000      0.00000     -0.00740      0.00000      0.00000      0.00000      0.00193      0.00000      0.00000      0.00193      0.00000      0.00193 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03141     -0.04389      0.00000      0.00000      0.00000     -0.02661      0.00000      0.00000      0.00000     -0.00740      0.00000      0.00000      0.00000      0.00193      0.00000      0.00000      0.00193      0.00000      0.00193 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03141     -0.04389      0.00000      0.00000      0.00000     -0.02661      0.00000      0.00000      0.00000     -0.00740      0.00000      0.00000      0.00000      0.00193      0.00000      0.00000      0.00193      0.00000      0.00193 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66668      0.66666      0.66666      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -100.37090     -9.18980     -7.04432     -7.04432     -7.04432     -0.76379     -0.32767     -0.32767     -0.32767      0.28308      0.37513      0.37514      0.37514      0.74742      0.74742      0.74742      0.74742      0.74742      4.04775 \n   </alphaeps>\n   <betaeps>\n  -100.36460     -9.18283     -7.03585     -7.03585     -7.03585     -0.73112     -0.29828     -0.29828     -0.29828      0.29959      0.39156      0.39156      0.39156      0.78338      0.78338      0.78338      0.78338      0.78338      4.07318 \n   </betaeps>\n   <alphavectors>\n     0.99551     -0.28447     -0.00000     -0.00000     -0.00000      0.08892      0.00000      0.00000      0.00000     -0.07486     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.17403 \n     0.01705      1.01678      0.00000      0.00000      0.00000     -0.39640     -0.00000     -0.00000     -0.00000      0.11318      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.80731 \n    -0.00000     -0.00000      0.00000     -0.00000      0.98980      0.00000     -0.00000      0.00000     -0.29503      0.00000      0.00000     -0.00000     -0.29747     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.98980     -0.00000     -0.00000     -0.00000     -0.29503      0.00000      0.00000     -0.00000     -0.29747      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.98980      0.00000      0.00000     -0.00000     -0.29503     -0.00000     -0.00000     -0.00000     -0.29747     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.02561      0.10457     -0.00000      0.00000      0.00000      0.80985      0.00000      0.00000      0.00000     -1.45295     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      5.52081 \n    -0.00000     -0.00000      0.00000     -0.00000      0.03234      0.00000      0.00000     -0.00000      0.75697     -0.00000     -0.00000      0.00000      1.14431      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.03234     -0.00000     -0.00000     -0.00000      0.75697     -0.00000     -0.00000     -0.00000      1.14431     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.03234     -0.00000     -0.00000      0.00000      0.75697      0.00000      0.00000      0.00000      1.14431     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00184     -0.01465      0.00000     -0.00000     -0.00000      0.31546      0.00000      0.00000      0.00000      1.75377     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.07705 \n     0.00000      0.00000     -0.00000      0.00000     -0.00914     -0.00000      0.00000     -0.00000      0.37865      0.00000      0.00000     -0.00000     -1.24466     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00914      0.00000      0.00000      0.00000      0.37865     -0.00000     -0.00000      0.00000     -1.24466      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00914     -0.00000     -0.00000      0.00000      0.37865     -0.00000     -0.00000     -0.00000     -1.24466     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00929     -0.02689      0.00000     -0.00000     -0.00000     -0.01115     -0.00000     -0.00000     -0.00000     -0.08898      0.00000      0.00000     -0.00000     -0.50000     -0.00000     -0.00000      0.86603     -0.00000     -2.44148 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000 \n     0.00929     -0.02689      0.00000     -0.00000     -0.00000     -0.01115     -0.00000     -0.00000     -0.00000     -0.08898      0.00000      0.00000     -0.00000      1.00000      0.00000      0.00000     -0.00000      0.00000     -2.44148 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00929     -0.02689      0.00000     -0.00000     -0.00000     -0.01115      0.00000     -0.00000     -0.00000     -0.08898     -0.00000      0.00000     -0.00000     -0.50000     -0.00000     -0.00000     -0.86603      0.00000     -2.44148 \n   </alphavectors>\n   <betavectors>\n     0.99552     -0.28455     -0.00000      0.00000      0.00000      0.08848      0.00000      0.00000     -0.00000     -0.07527     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.17392 \n     0.01702      1.01712     -0.00000     -0.00000     -0.00000     -0.39605     -0.00000     -0.00000      0.00000      0.11508      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.80679 \n    -0.00000      0.00000      0.00000      0.99002     -0.00000     -0.00000     -0.00000      0.00000     -0.29050      0.00000     -0.00000      0.00000     -0.30118     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.99002     -0.00000      0.00000     -0.00000     -0.29050      0.00000      0.00000     -0.00000     -0.30118      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.99002      0.00000     -0.00000     -0.29050     -0.00000      0.00000     -0.00000     -0.30118     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.02555      0.10294     -0.00000     -0.00000     -0.00000      0.80621      0.00000      0.00000     -0.00000     -1.45529     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      5.52076 \n    -0.00000      0.00000      0.00000      0.03166      0.00000      0.00000      0.00000     -0.00000      0.74124     -0.00000      0.00000     -0.00000      1.15458     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.03166     -0.00000      0.00000     -0.00000      0.74124     -0.00000     -0.00000     -0.00000      1.15458     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.03166     -0.00000      0.00000      0.74124      0.00000     -0.00000      0.00000      1.15458      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00183     -0.01436      0.00000      0.00000      0.00000      0.32703     -0.00000      0.00000     -0.00000      1.75171     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.07576 \n     0.00000     -0.00000     -0.00000     -0.00892      0.00000     -0.00000      0.00000     -0.00000      0.39565      0.00000     -0.00000      0.00000     -1.23936      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00892      0.00000     -0.00000      0.00000      0.39565     -0.00000     -0.00000      0.00000     -1.23936      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00892      0.00000      0.00000      0.39565     -0.00000      0.00000     -0.00000     -1.23936     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00927     -0.02651      0.00000      0.00000      0.00000     -0.01434     -0.00000      0.00000      0.00000     -0.09022     -0.00000     -0.00000     -0.00000     -0.50000     -0.00000     -0.00000      0.86603      0.00000     -2.44142 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000 \n     0.00927     -0.02651     -0.00000      0.00000      0.00000     -0.01434      0.00000      0.00000      0.00000     -0.09022      0.00000     -0.00000     -0.00000      1.00000      0.00000      0.00000     -0.00000      0.00000     -2.44142 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000 \n     0.00927     -0.02651      0.00000      0.00000      0.00000     -0.01434      0.00000      0.00000      0.00000     -0.09022      0.00000     -0.00000     -0.00000     -0.50000     -0.00000     -0.00000     -0.86603     -0.00000     -2.44142 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ar\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.16557     -0.62884      0.00000      0.00000      0.00000      0.04792      0.00000      0.00000      0.00000      0.07064      0.00000      0.00000      0.00000      0.02771      0.00000      0.00000      0.02771      0.00000      0.02771 \n    -0.62884      2.40137      0.00000      0.00000      0.00000     -0.44735      0.00000      0.00000      0.00000     -0.30000      0.00000      0.00000      0.00000     -0.03860      0.00000      0.00000     -0.03860      0.00000     -0.03860 \n     0.00000      0.00000      2.14481      0.00000      0.00000      0.00000     -0.39836      0.00000      0.00000      0.00000     -0.25244      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.14481      0.00000      0.00000      0.00000     -0.39836      0.00000      0.00000      0.00000     -0.25244      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.14481      0.00000      0.00000      0.00000     -0.39836      0.00000      0.00000      0.00000     -0.25244      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.04792     -0.44735      0.00000      0.00000      0.00000      1.26865      0.00000      0.00000      0.00000      0.54066      0.00000      0.00000      0.00000     -0.02527      0.00000      0.00000     -0.02527      0.00000     -0.02527 \n     0.00000      0.00000     -0.39836      0.00000      0.00000      0.00000      1.14497      0.00000      0.00000      0.00000      0.58077      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.39836      0.00000      0.00000      0.00000      1.14497      0.00000      0.00000      0.00000      0.58077      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.39836      0.00000      0.00000      0.00000      1.14497      0.00000      0.00000      0.00000      0.58077      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07064     -0.30000      0.00000      0.00000      0.00000      0.54066      0.00000      0.00000      0.00000      0.23595      0.00000      0.00000      0.00000     -0.00829      0.00000      0.00000     -0.00829      0.00000     -0.00829 \n     0.00000      0.00000     -0.25244      0.00000      0.00000      0.00000      0.58077      0.00000      0.00000      0.00000      0.29585      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.25244      0.00000      0.00000      0.00000      0.58077      0.00000      0.00000      0.00000      0.29585      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.25244      0.00000      0.00000      0.00000      0.58077      0.00000      0.00000      0.00000      0.29585      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02771     -0.03860      0.00000      0.00000      0.00000     -0.02527      0.00000      0.00000      0.00000     -0.00829      0.00000      0.00000      0.00000      0.00163      0.00000      0.00000      0.00163      0.00000      0.00163 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02771     -0.03860      0.00000      0.00000      0.00000     -0.02527      0.00000      0.00000      0.00000     -0.00829      0.00000      0.00000      0.00000      0.00163      0.00000      0.00000      0.00163      0.00000      0.00163 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02771     -0.03860      0.00000      0.00000      0.00000     -0.02527      0.00000      0.00000      0.00000     -0.00829      0.00000      0.00000      0.00000      0.00163      0.00000      0.00000      0.00163      0.00000      0.00163 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -113.80100    -10.79438     -8.44585     -8.44585     -8.44585     -0.87578     -0.37404     -0.37404     -0.37404      0.37333      0.47858      0.47858      0.47858      0.85977      0.85977      0.85977      0.85977      0.85977      4.30306 \n   </alphaeps>\n   <betaeps>\n  -113.80100    -10.79438     -8.44585     -8.44585     -8.44585     -0.87578     -0.37404     -0.37404     -0.37404      0.37333      0.47858      0.47858      0.47858      0.85977      0.85977      0.85977      0.85977      0.85977      4.30306 \n   </betaeps>\n   <alphavectors>\n     0.99543     -0.28861      0.00000      0.00000      0.00000      0.09279     -0.00000     -0.00000     -0.00000     -0.07762     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.17404 \n     0.01702      1.01752     -0.00000     -0.00000     -0.00000     -0.40626      0.00000      0.00000      0.00000      0.09695      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.79225 \n    -0.00000      0.00000      0.98943      0.00000      0.00000     -0.00000     -0.30567      0.00000      0.00000     -0.00000     -0.00000     -0.30974     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.98943      0.00000     -0.00000      0.00000     -0.30567     -0.00000      0.00000     -0.30974      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.98943     -0.00000      0.00000      0.00000     -0.30567     -0.00000      0.00000      0.00000     -0.30974      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02174      0.09609     -0.00000     -0.00000     -0.00000      0.79033     -0.00000     -0.00000     -0.00000     -1.38156     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      4.72189 \n    -0.00000      0.00000      0.03223     -0.00000     -0.00000      0.00000      0.75594     -0.00000     -0.00000      0.00000      0.00000      1.14808     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.03223     -0.00000      0.00000     -0.00000      0.75594     -0.00000     -0.00000      1.14808      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.03223      0.00000     -0.00000     -0.00000      0.75594      0.00000      0.00000     -0.00000      1.14808     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00048     -0.01035      0.00000      0.00000      0.00000      0.34332     -0.00000     -0.00000     -0.00000      1.77708      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.42246 \n     0.00000     -0.00000     -0.00878      0.00000      0.00000      0.00000      0.38451      0.00000      0.00000     -0.00000     -0.00000     -1.23937      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00878     -0.00000      0.00000     -0.00000      0.38451      0.00000      0.00000     -1.23937     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00878     -0.00000      0.00000      0.00000      0.38451     -0.00000     -0.00000      0.00000     -1.23937      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00809     -0.02422      0.00000      0.00000      0.00000     -0.01282      0.00000      0.00000      0.00000     -0.13557     -0.00000      0.00000      0.00000     -0.70524     -0.00000     -0.70896      0.00000     -0.00000     -2.21998 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000 \n     0.00809     -0.02422      0.00000      0.00000      0.00000     -0.01282      0.00000      0.00000      0.00000     -0.13557     -0.00000      0.00000      0.00000      0.96660      0.00000     -0.25628      0.00000     -0.00000     -2.21998 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000 \n     0.00809     -0.02422      0.00000      0.00000      0.00000     -0.01282      0.00000      0.00000      0.00000     -0.13557     -0.00000      0.00000      0.00000     -0.26136     -0.00000      0.96524     -0.00000      0.00000     -2.21998 \n   </alphavectors>\n   <betavectors>\n     0.99543     -0.28861     -0.00000      0.00000      0.00000      0.09279     -0.00000     -0.00000      0.00000     -0.07762     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.17404 \n     0.01702      1.01752      0.00000     -0.00000     -0.00000     -0.40626      0.00000      0.00000     -0.00000      0.09695      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.79225 \n    -0.00000     -0.00000      0.98943     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.30567     -0.00000     -0.00000     -0.30974     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.98943      0.00000     -0.00000     -0.30567      0.00000     -0.00000      0.00000     -0.30974      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.98943     -0.00000      0.00000     -0.30567     -0.00000     -0.00000     -0.00000      0.00000     -0.30974     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.02174      0.09609      0.00000     -0.00000     -0.00000      0.79033     -0.00000     -0.00000      0.00000     -1.38156     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      4.72189 \n    -0.00000     -0.00000      0.03223      0.00000      0.00000     -0.00000      0.00000      0.00000      0.75594      0.00000      0.00000      1.14808     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.03223     -0.00000      0.00000      0.75594     -0.00000      0.00000     -0.00000      1.14808      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.03223      0.00000     -0.00000      0.75594      0.00000      0.00000      0.00000     -0.00000      1.14808     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00048     -0.01035     -0.00000      0.00000      0.00000      0.34332     -0.00000     -0.00000      0.00000      1.77708      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.42246 \n     0.00000      0.00000     -0.00878     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.38451     -0.00000     -0.00000     -1.23937      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00878      0.00000     -0.00000      0.38451      0.00000     -0.00000      0.00000     -1.23937     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00878     -0.00000      0.00000      0.38451     -0.00000     -0.00000     -0.00000      0.00000     -1.23937      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00809     -0.02422     -0.00000      0.00000      0.00000     -0.01282      0.00000      0.00000     -0.00000     -0.13557     -0.00000      0.00000      0.00000     -0.70781     -0.00000     -0.70640      0.00000     -0.00000     -2.21998 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000 \n     0.00809     -0.02422     -0.00000      0.00000      0.00000     -0.01282      0.00000      0.00000     -0.00000     -0.13557     -0.00000      0.00000      0.00000      0.96567      0.00000     -0.25978     -0.00000      0.00000     -2.21998 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000 \n     0.00809     -0.02422     -0.00000      0.00000      0.00000     -0.01282      0.00000      0.00000     -0.00000     -0.13557     -0.00000      0.00000      0.00000     -0.25786     -0.00000      0.96618      0.00000      0.00000     -2.21998 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"K\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.17023     -0.64681      0.00000      0.00000      0.00000     -0.19181      0.00000      0.00000      0.00000     -0.02209      0.00000      0.00000      0.00000     -0.00273      0.00000      0.00000      0.00000      0.00418      0.00000      0.00000      0.00418      0.00000      0.00418 \n    -0.64681      2.46355      0.00000      0.00000      0.00000      0.84879      0.00000      0.00000      0.00000      0.07966      0.00000      0.00000      0.00000      0.02234      0.00000      0.00000      0.00000     -0.00777      0.00000      0.00000     -0.00777      0.00000     -0.00777 \n     0.00000      0.00000      2.18926      0.00000      0.00000      0.00000     -0.64208      0.00000      0.00000      0.00000     -0.01509      0.00000      0.00000      0.00000      0.00745      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.18926      0.00000      0.00000      0.00000     -0.64208      0.00000      0.00000      0.00000     -0.01509      0.00000      0.00000      0.00000      0.00745      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.18926      0.00000      0.00000      0.00000     -0.64208      0.00000      0.00000      0.00000     -0.01509      0.00000      0.00000      0.00000      0.00745      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.19181      0.84879      0.00000      0.00000      0.00000      2.34895      0.00000      0.00000      0.00000      0.17216      0.00000      0.00000      0.00000      0.08656      0.00000      0.00000      0.00000      0.00797      0.00000      0.00000      0.00797      0.00000      0.00797 \n     0.00000      0.00000     -0.64208      0.00000      0.00000      0.00000      2.18089      0.00000      0.00000      0.00000      0.02272      0.00000      0.00000      0.00000     -0.01033      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.64208      0.00000      0.00000      0.00000      2.18089      0.00000      0.00000      0.00000      0.02272      0.00000      0.00000      0.00000     -0.01033      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.64208      0.00000      0.00000      0.00000      2.18089      0.00000      0.00000      0.00000      0.02272      0.00000      0.00000      0.00000     -0.01033      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02209      0.07966      0.00000      0.00000      0.00000      0.17216      0.00000      0.00000      0.00000      0.43742      0.00000      0.00000      0.00000      0.20721      0.00000      0.00000      0.00000      0.02702      0.00000      0.00000      0.02702      0.00000      0.02702 \n     0.00000      0.00000     -0.01509      0.00000      0.00000      0.00000      0.02272      0.00000      0.00000      0.00000      0.00331      0.00000      0.00000      0.00000      0.00235      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01509      0.00000      0.00000      0.00000      0.02272      0.00000      0.00000      0.00000      0.00331      0.00000      0.00000      0.00000      0.00235      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01509      0.00000      0.00000      0.00000      0.02272      0.00000      0.00000      0.00000      0.00331      0.00000      0.00000      0.00000      0.00235      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00273      0.02234      0.00000      0.00000      0.00000      0.08656      0.00000      0.00000      0.00000      0.20721      0.00000      0.00000      0.00000      0.09831      0.00000      0.00000      0.00000      0.01289      0.00000      0.00000      0.01289      0.00000      0.01289 \n     0.00000      0.00000      0.00745      0.00000      0.00000      0.00000     -0.01033      0.00000      0.00000      0.00000      0.00235      0.00000      0.00000      0.00000      0.00212      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00745      0.00000      0.00000      0.00000     -0.01033      0.00000      0.00000      0.00000      0.00235      0.00000      0.00000      0.00000      0.00212      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00745      0.00000      0.00000      0.00000     -0.01033      0.00000      0.00000      0.00000      0.00235      0.00000      0.00000      0.00000      0.00212      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00418     -0.00777      0.00000      0.00000      0.00000      0.00797      0.00000      0.00000      0.00000      0.02702      0.00000      0.00000      0.00000      0.01289      0.00000      0.00000      0.00000      0.00174      0.00000      0.00000      0.00174      0.00000      0.00174 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00418     -0.00777      0.00000      0.00000      0.00000      0.00797      0.00000      0.00000      0.00000      0.02702      0.00000      0.00000      0.00000      0.01289      0.00000      0.00000      0.00000      0.00174      0.00000      0.00000      0.00174      0.00000      0.00174 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00418     -0.00777      0.00000      0.00000      0.00000      0.00797      0.00000      0.00000      0.00000      0.02702      0.00000      0.00000      0.00000      0.01289      0.00000      0.00000      0.00000      0.00174      0.00000      0.00000      0.00174      0.00000      0.00174 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.97373      0.00876      0.00876      0.00876      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -128.37250    -12.83864    -10.28379    -10.28379    -10.28379     -1.28595     -0.69682     -0.69682     -0.69682     -0.09689     -0.03588     -0.03588     -0.03588      0.01934      0.04042      0.04042      0.04042      0.20594      0.20594      0.20594      0.20594      0.20594      0.30594 \n   </alphaeps>\n   <betaeps>\n  -128.37190    -12.83802    -10.28320    -10.28320    -10.28320     -1.28417     -0.69419     -0.69419     -0.69419     -0.07530     -0.02076     -0.02076     -0.02076      0.02871      0.05142      0.05142      0.05142      0.22418      0.22418      0.22418      0.22418      0.22418      0.32068 \n   </betaeps>\n   <alphavectors>\n     0.99630     -0.28766      0.00000     -0.00000     -0.00000     -0.09748     -0.00000      0.00000      0.00000     -0.02209     -0.00000     -0.00000     -0.00000      0.00907      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.04752 \n     0.01367      1.02864     -0.00000      0.00000      0.00000      0.41064      0.00000     -0.00000     -0.00000      0.09835      0.00000      0.00000      0.00000     -0.10419     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.14512 \n     0.00000     -0.00000      0.00000     -0.00000      0.99521     -0.00000     -0.00000      0.00000     -0.32260     -0.00000     -0.00000     -0.00000      0.05126     -0.00000      0.05519     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.99521      0.00000      0.00000     -0.32260      0.00000      0.00000     -0.00000      0.05126     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05519     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.99521     -0.00000     -0.00000     -0.00000      0.00000     -0.32260     -0.00000     -0.00000     -0.00000      0.05126     -0.00000     -0.00000     -0.00000      0.05519      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00354     -0.02615      0.00000     -0.00000     -0.00000      1.06633      0.00000     -0.00000     -0.00000      0.27041      0.00000      0.00000      0.00000      0.08762      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.80622 \n     0.00000     -0.00000      0.00000     -0.00000      0.01605      0.00000      0.00000     -0.00000      1.04336      0.00000      0.00000      0.00000     -0.20635      0.00000     -0.25168     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.01605     -0.00000     -0.00000      1.04336      0.00000      0.00000      0.00000     -0.20635     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.25168     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.01605      0.00000      0.00000      0.00000      0.00000      1.04336      0.00000      0.00000      0.00000     -0.20635      0.00000      0.00000      0.00000     -0.25168      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00164      0.00827     -0.00000      0.00000      0.00000     -0.00200     -0.00000      0.00000      0.00000      0.67013      0.00000      0.00000      0.00000     -1.91529     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.52402 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00400      0.00000      0.00000     -0.00000      0.01470     -0.00000     -0.00000     -0.00000      0.58489     -0.00000      1.66002      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00400      0.00000     -0.00000      0.01470     -0.00000      0.00000     -0.00000      0.58489      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.66002      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00400     -0.00000     -0.00000      0.00000      0.00000      0.01470     -0.00000     -0.00000     -0.00000      0.58489     -0.00000     -0.00000     -0.00000      1.66002     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00090     -0.00444      0.00000     -0.00000     -0.00000      0.00137      0.00000     -0.00000     -0.00000      0.31767      0.00000      0.00000      0.00000      2.16523      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.38310 \n     0.00000     -0.00000      0.00000     -0.00000      0.00216      0.00000      0.00000     -0.00000     -0.00614      0.00000      0.00000      0.00000      0.48538      0.00000     -1.64678     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00216      0.00000      0.00000     -0.00614      0.00000     -0.00000     -0.00000      0.48538     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.64678      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00216      0.00000      0.00000     -0.00000     -0.00000     -0.00614      0.00000     -0.00000     -0.00000      0.48538      0.00000      0.00000      0.00000     -1.64678      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00092     -0.00512      0.00000     -0.00000     -0.00000     -0.00197     -0.00000      0.00000      0.00000      0.04153      0.00000      0.00000      0.00000     -0.07024     -0.00000     -0.00000     -0.00000     -0.68310     -0.73032     -0.00000     -0.00000      0.00000     -0.84579 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000 \n     0.00092     -0.00512      0.00000     -0.00000     -0.00000     -0.00197     -0.00000      0.00000      0.00000      0.04153      0.00000      0.00000      0.00000     -0.07024     -0.00000     -0.00000     -0.00000     -0.29093      0.95674      0.00000      0.00000     -0.00000     -0.84579 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000 \n     0.00092     -0.00512      0.00000     -0.00000     -0.00000     -0.00197     -0.00000      0.00000      0.00000      0.04153      0.00000      0.00000      0.00000     -0.07024     -0.00000     -0.00000     -0.00000      0.97403     -0.22642     -0.00000     -0.00000      0.00000     -0.84579 \n   </alphavectors>\n   <betavectors>\n     0.99630     -0.28767     -0.00000      0.00000     -0.00000     -0.09756      0.00000      0.00000     -0.00000     -0.02179      0.00000      0.00000     -0.00000     -0.00981      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.04734 \n     0.01367      1.02865      0.00000     -0.00000      0.00000      0.41099     -0.00000     -0.00000      0.00000      0.09254     -0.00000     -0.00000      0.00000      0.10809     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.14502 \n     0.00000     -0.00000     -0.00000      0.00000      0.99522      0.00000      0.00000     -0.00000     -0.32289     -0.00000      0.04324      0.00000      0.00000      0.00000      0.06002      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.99522     -0.00000      0.00000     -0.00000     -0.32289     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.04324     -0.00000      0.00000      0.00000      0.06002     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99522     -0.00000     -0.00000      0.00000     -0.32289     -0.00000      0.00000     -0.00000      0.04324     -0.00000      0.00000     -0.00000      0.06002     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00354     -0.02612     -0.00000      0.00000     -0.00000      1.06738     -0.00000     -0.00000      0.00000      0.28098     -0.00000     -0.00000      0.00000     -0.08028      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.80196 \n     0.00000     -0.00000     -0.00000      0.00000      0.01603     -0.00000      0.00000      0.00000      1.04470      0.00000     -0.17114     -0.00000      0.00000     -0.00000     -0.27173      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.01603      0.00000     -0.00000      0.00000      1.04470     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.17114      0.00000     -0.00000     -0.00000     -0.27173      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.01603      0.00000      0.00000     -0.00000      1.04470      0.00000     -0.00000      0.00000     -0.17114      0.00000     -0.00000      0.00000     -0.27173     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00164      0.00826      0.00000     -0.00000      0.00000     -0.00160      0.00000      0.00000     -0.00000      0.52954     -0.00000     -0.00000      0.00000      1.97837     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      2.50873 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00400     -0.00000      0.00000      0.00000      0.00820     -0.00000      0.37724      0.00000     -0.00000      0.00000      1.71919     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00400     -0.00000      0.00000     -0.00000      0.00820      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.37724     -0.00000      0.00000      0.00000      1.71919     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00400     -0.00000      0.00000     -0.00000      0.00820      0.00000      0.00000     -0.00000      0.37724     -0.00000      0.00000     -0.00000      1.71919      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00090     -0.00444     -0.00000      0.00000     -0.00000      0.00114     -0.00000     -0.00000      0.00000      0.46134     -0.00000     -0.00000      0.00000     -2.15591      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.35696 \n     0.00000     -0.00000     -0.00000      0.00000      0.00215     -0.00000      0.00000      0.00000     -0.00298      0.00000      0.68337     -0.00000      0.00000     -0.00000     -1.57496      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00215      0.00000     -0.00000      0.00000     -0.00298     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.68337      0.00000     -0.00000     -0.00000     -1.57496      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00215      0.00000     -0.00000      0.00000     -0.00298     -0.00000      0.00000     -0.00000      0.68337      0.00000     -0.00000      0.00000     -1.57496     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00092     -0.00511     -0.00000      0.00000     -0.00000     -0.00107      0.00000      0.00000     -0.00000      0.04479     -0.00000     -0.00000      0.00000      0.06397     -0.00000      0.00000      0.00000     -0.69150     -0.72238     -0.00000      0.00000      0.00000     -0.84612 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000 \n     0.00092     -0.00511     -0.00000      0.00000     -0.00000     -0.00107      0.00000      0.00000     -0.00000      0.04479     -0.00000     -0.00000      0.00000      0.06397     -0.00000      0.00000      0.00000     -0.27985      0.96004      0.00000     -0.00000     -0.00000     -0.84612 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000      0.00000 \n     0.00092     -0.00511     -0.00000      0.00000     -0.00000     -0.00107      0.00000      0.00000     -0.00000      0.04479     -0.00000     -0.00000      0.00000      0.06397     -0.00000      0.00000      0.00000      0.97135     -0.23766      0.00000     -0.00000     -0.00000     -0.84612 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ca\" basis=\"6-31g*\">\n   <guessdensitymatrix>\n     2.17622      0.66500      0.00000      0.00000      0.00000     -0.21474      0.00000      0.00000      0.00000     -0.04654      0.00000      0.00000      0.00000     -0.01684      0.00000      0.00000      0.00000      0.00604      0.00000      0.00000      0.00604      0.00000      0.00604 \n     0.66500      2.51620      0.00000      0.00000      0.00000     -0.94266      0.00000      0.00000      0.00000     -0.17918      0.00000      0.00000      0.00000     -0.08249      0.00000      0.00000      0.00000      0.01295      0.00000      0.00000      0.01295      0.00000      0.01295 \n     0.00000      0.00000      2.21466      0.00000      0.00000      0.00000     -0.69599      0.00000      0.00000      0.00000     -0.01719      0.00000      0.00000      0.00000      0.00844      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.21466      0.00000      0.00000      0.00000     -0.69599      0.00000      0.00000      0.00000     -0.01719      0.00000      0.00000      0.00000      0.00844      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.21466      0.00000      0.00000      0.00000     -0.69599      0.00000      0.00000      0.00000     -0.01719      0.00000      0.00000      0.00000      0.00844      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.21474     -0.94266      0.00000      0.00000      0.00000      2.50024      0.00000      0.00000      0.00000      0.42488      0.00000      0.00000      0.00000      0.25008      0.00000      0.00000      0.00000      0.00265      0.00000      0.00000      0.00265      0.00000      0.00265 \n     0.00000      0.00000     -0.69599      0.00000      0.00000      0.00000      2.22202      0.00000      0.00000      0.00000      0.01642      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.69599      0.00000      0.00000      0.00000      2.22202      0.00000      0.00000      0.00000      0.01642      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.69599      0.00000      0.00000      0.00000      2.22202      0.00000      0.00000      0.00000      0.01642      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04654     -0.17918      0.00000      0.00000      0.00000      0.42488      0.00000      0.00000      0.00000      0.76648      0.00000      0.00000      0.00000      0.49204      0.00000      0.00000      0.00000      0.03523      0.00000      0.00000      0.03523      0.00000      0.03523 \n     0.00000      0.00000     -0.01719      0.00000      0.00000      0.00000      0.01642      0.00000      0.00000      0.00000      0.00036      0.00000      0.00000      0.00000      0.00014      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01719      0.00000      0.00000      0.00000      0.01642      0.00000      0.00000      0.00000      0.00036      0.00000      0.00000      0.00000      0.00014      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01719      0.00000      0.00000      0.00000      0.01642      0.00000      0.00000      0.00000      0.00036      0.00000      0.00000      0.00000      0.00014      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01684     -0.08249      0.00000      0.00000      0.00000      0.25008      0.00000      0.00000      0.00000      0.49204      0.00000      0.00000      0.00000      0.31638      0.00000      0.00000      0.00000      0.02296      0.00000      0.00000      0.02296      0.00000      0.02296 \n     0.00000      0.00000      0.00844      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000      0.00014      0.00000      0.00000      0.00000      0.00034      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00844      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000      0.00014      0.00000      0.00000      0.00000      0.00034      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00844      0.00000      0.00000      0.00000     -0.00568      0.00000      0.00000      0.00000      0.00014      0.00000      0.00000      0.00000      0.00034      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00604      0.01295      0.00000      0.00000      0.00000      0.00265      0.00000      0.00000      0.00000      0.03523      0.00000      0.00000      0.00000      0.02296      0.00000      0.00000      0.00000      0.00185      0.00000      0.00000      0.00185      0.00000      0.00185 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00604      0.01295      0.00000      0.00000      0.00000      0.00265      0.00000      0.00000      0.00000      0.03523      0.00000      0.00000      0.00000      0.02296      0.00000      0.00000      0.00000      0.00185      0.00000      0.00000      0.00185      0.00000      0.00185 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00604      0.01295      0.00000      0.00000      0.00000      0.00265      0.00000      0.00000      0.00000      0.03523      0.00000      0.00000      0.00000      0.02296      0.00000      0.00000      0.00000      0.00185      0.00000      0.00000      0.00185      0.00000      0.00185 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99881      0.00040      0.00040      0.00040      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99881      0.00040      0.00040      0.00040      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -143.90000    -15.05400    -12.29357    -12.29357    -12.29357     -1.71538     -1.03815     -1.03815     -1.03815     -0.14238     -0.05195     -0.05195     -0.05195      0.03505      0.09403      0.09403      0.09403      0.14276      0.14276      0.14276      0.14276      0.14276      0.34324 \n   </alphaeps>\n   <betaeps>\n  -143.90000    -15.05400    -12.29357    -12.29357    -12.29357     -1.71538     -1.03815     -1.03815     -1.03815     -0.14238     -0.05195     -0.05195     -0.05195      0.03505      0.09403      0.09403      0.09403      0.14276      0.14276      0.14276      0.14276      0.14276      0.34324 \n   </betaeps>\n   <alphavectors>\n     0.99621      0.29060      0.00000      0.00000      0.00000     -0.10253      0.00000      0.00000     -0.00000     -0.02675      0.00000     -0.00000     -0.00000     -0.00763     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.03926 \n    -0.01386      1.02917      0.00000      0.00000      0.00000     -0.43003      0.00000      0.00000     -0.00000     -0.11751      0.00000     -0.00000     -0.00000     -0.13713      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.02548 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.99445      0.00000     -0.00000     -0.00000     -0.34409     -0.00000      0.07415      0.00000     -0.00000      0.00000      0.11247      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.99445      0.00000     -0.00000      0.00000     -0.34409     -0.00000     -0.00000     -0.00000     -0.00000      0.07415     -0.00000      0.00000      0.11247     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.99445      0.00000      0.00000     -0.00000     -0.34409     -0.00000      0.00000     -0.00000     -0.00000      0.07415     -0.00000      0.00000      0.00000      0.00000      0.11247      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00342      0.02605      0.00000      0.00000      0.00000      1.06984     -0.00000     -0.00000      0.00000      0.32403     -0.00000      0.00000      0.00000     -0.18909      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.84594 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.01474     -0.00000      0.00000      0.00000      1.05394     -0.00000     -0.04470      0.00000     -0.00000      0.00000      0.30476      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.01474     -0.00000      0.00000     -0.00000      1.05394     -0.00000      0.00000     -0.00000      0.00000     -0.04470     -0.00000      0.00000      0.30476     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.01474     -0.00000     -0.00000      0.00000      1.05394     -0.00000      0.00000     -0.00000     -0.00000     -0.04470     -0.00000      0.00000     -0.00000      0.00000      0.30476     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00217     -0.01164     -0.00000     -0.00000     -0.00000      0.01154     -0.00000     -0.00000      0.00000      0.61921     -0.00000      0.00000      0.00000      2.56174     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      4.99357 \n     0.00000      0.00000      0.00000      0.00000     -0.00593     -0.00000      0.00000      0.00000      0.00788     -0.00000      0.46004     -0.00000     -0.00000      0.00000      1.47755     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00593      0.00000     -0.00000     -0.00000      0.00788     -0.00000     -0.00000      0.00000     -0.00000      0.46004     -0.00000      0.00000      1.47755      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00593      0.00000      0.00000      0.00000      0.00788     -0.00000      0.00000     -0.00000      0.00000      0.46004     -0.00000      0.00000     -0.00000      0.00000      1.47755     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00074      0.00381      0.00000      0.00000      0.00000     -0.00360      0.00000      0.00000     -0.00000      0.39793     -0.00000      0.00000      0.00000     -2.32843      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.87254 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00328      0.00000     -0.00000     -0.00000     -0.00273      0.00000      0.61575      0.00000      0.00000     -0.00000     -1.41174      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00328     -0.00000      0.00000      0.00000     -0.00273      0.00000     -0.00000      0.00000     -0.00000      0.61575      0.00000     -0.00000     -1.41174     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00328     -0.00000     -0.00000     -0.00000     -0.00273      0.00000     -0.00000      0.00000     -0.00000      0.61575      0.00000     -0.00000      0.00000     -0.00000     -1.41174      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00115      0.00640      0.00000      0.00000      0.00000     -0.00762      0.00000      0.00000     -0.00000      0.02875     -0.00000      0.00000      0.00000     -0.19161      0.00000     -0.00000      0.00000     -0.19909     -0.00000      0.00000      0.00000      0.97998     -1.72892 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000 \n     0.00115      0.00640      0.00000      0.00000      0.00000     -0.00762      0.00000      0.00000     -0.00000      0.02875     -0.00000      0.00000      0.00000     -0.19161      0.00000     -0.00000      0.00000      0.94823      0.00000     -0.00000     -0.00000     -0.31757     -1.72892 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000 \n     0.00115      0.00640      0.00000      0.00000      0.00000     -0.00762      0.00000      0.00000     -0.00000      0.02875     -0.00000      0.00000      0.00000     -0.19161      0.00000     -0.00000      0.00000     -0.74914     -0.00000      0.00000      0.00000     -0.66241     -1.72892 \n   </alphavectors>\n   <betavectors>\n     0.99621      0.29060     -0.00000     -0.00000      0.00000     -0.10253      0.00000     -0.00000     -0.00000     -0.02675     -0.00000      0.00000      0.00000     -0.00763     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.03926 \n    -0.01386      1.02917     -0.00000     -0.00000      0.00000     -0.43003      0.00000     -0.00000     -0.00000     -0.11751     -0.00000      0.00000      0.00000     -0.13713     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.02548 \n    -0.00000     -0.00000      0.00000      0.00000      0.99445      0.00000     -0.00000      0.00000     -0.34409     -0.00000      0.07415      0.00000      0.00000      0.00000      0.11247      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.99445     -0.00000     -0.00000     -0.34409     -0.00000     -0.00000     -0.00000     -0.00000      0.07415     -0.00000      0.00000     -0.00000      0.11247      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.99445      0.00000     -0.00000      0.00000      0.00000     -0.34409     -0.00000      0.00000     -0.00000     -0.00000      0.07415     -0.00000     -0.00000      0.00000      0.11247      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00342      0.02605     -0.00000     -0.00000      0.00000      1.06984     -0.00000      0.00000      0.00000      0.32403      0.00000     -0.00000     -0.00000     -0.18909      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.84594 \n    -0.00000     -0.00000      0.00000      0.00000      0.01474     -0.00000      0.00000     -0.00000      1.05394     -0.00000     -0.04470      0.00000      0.00000      0.00000      0.30476      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.01474      0.00000      0.00000      1.05394     -0.00000     -0.00000     -0.00000     -0.00000     -0.04470      0.00000      0.00000     -0.00000      0.30476      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.01474     -0.00000      0.00000     -0.00000      0.00000      1.05394     -0.00000      0.00000      0.00000     -0.00000     -0.04470     -0.00000      0.00000      0.00000      0.30476     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00217     -0.01164      0.00000      0.00000     -0.00000      0.01154     -0.00000      0.00000      0.00000      0.61921      0.00000     -0.00000     -0.00000      2.56174     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      4.99357 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00593     -0.00000      0.00000     -0.00000      0.00788     -0.00000      0.46004      0.00000      0.00000      0.00000      1.47755     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00593     -0.00000     -0.00000      0.00788      0.00000     -0.00000     -0.00000     -0.00000      0.46004      0.00000      0.00000     -0.00000      1.47755     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00593      0.00000     -0.00000     -0.00000     -0.00000      0.00788     -0.00000      0.00000      0.00000     -0.00000      0.46004     -0.00000      0.00000      0.00000      1.47755     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00074      0.00381     -0.00000     -0.00000      0.00000     -0.00360      0.00000     -0.00000     -0.00000      0.39793      0.00000     -0.00000     -0.00000     -2.32843      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.87254 \n    -0.00000     -0.00000      0.00000      0.00000      0.00328      0.00000     -0.00000      0.00000     -0.00273      0.00000      0.61575     -0.00000     -0.00000     -0.00000     -1.41174      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00328      0.00000      0.00000     -0.00273     -0.00000      0.00000      0.00000      0.00000      0.61575     -0.00000     -0.00000      0.00000     -1.41174      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00328     -0.00000      0.00000     -0.00000      0.00000     -0.00273     -0.00000     -0.00000     -0.00000      0.00000      0.61575      0.00000     -0.00000     -0.00000     -1.41174      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00115      0.00640     -0.00000     -0.00000      0.00000     -0.00762      0.00000     -0.00000     -0.00000      0.02875      0.00000     -0.00000     -0.00000     -0.19161      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.97248     -0.23299     -1.72892 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00115      0.00640     -0.00000     -0.00000      0.00000     -0.00762      0.00000     -0.00000     -0.00000      0.02875      0.00000     -0.00000     -0.00000     -0.19161      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.28446      0.95869     -1.72892 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00115      0.00640     -0.00000     -0.00000      0.00000     -0.00762      0.00000     -0.00000     -0.00000      0.02875      0.00000     -0.00000     -0.00000     -0.19161      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.68802     -0.72569     -1.72892 \n   </betavectors>\n</atomicguess>\n"
  },
  {
    "path": "src/madness/chem/AC.cc",
    "content": "/*\n * AC.cc\n *\n *  Created on: Dec 15, 2016\n *      Author: msahre\n */\n#include \"AC.h\"\n\nnamespace madness{\n\ndouble slater_radius(int atomic_number){\n\tconst double ang2b = 0.52917721092;\n\tif(atomic_number == 1){return 0.35/ang2b;}\n\telse if (atomic_number == 2) {return 0.35/ang2b;}\n\telse if (atomic_number == 3) {return 1.45/ang2b;}\n\telse if (atomic_number == 4) {return 1.05/ang2b;}\n\telse if (atomic_number == 5) {return 0.85/ang2b;}\n\telse if (atomic_number == 6) {return 0.70/ang2b;}\n\telse if (atomic_number == 7) {return 0.65/ang2b;}\n\telse if (atomic_number == 8) {return 0.60/ang2b;}\n\telse if (atomic_number == 9) {return 0.50/ang2b;}\n\telse if (atomic_number == 10) {return 1.60/ang2b;}\n\telse if (atomic_number == 11) {return 1.80/ang2b;}\n\telse if (atomic_number == 12) {return 1.50/ang2b;}\n\telse if (atomic_number == 13) {return 1.25/ang2b;}\n\telse if (atomic_number == 14) {return 1.10/ang2b;}\n\telse if (atomic_number == 15) {return 1.00/ang2b;}\n\telse if (atomic_number == 16) {return 1.00/ang2b;}\n\telse if (atomic_number == 17) {return 1.00/ang2b;}\n\telse if (atomic_number == 18) {return 0.71/ang2b;}\n\telse if (atomic_number == 19) {return 2.20/ang2b;}\n\telse if (atomic_number == 20) {return 1.80/ang2b;}\n\telse{\n\t\tMADNESS_EXCEPTION(\"Slater radius for element does not exist!\",1);\n\t}\n}\n\nstd::vector<atom_information<3> >make_atom_vec(const Molecule& molecule, double R1_, double R2_) {\n\tstd::vector< atom_information<3> > atom_vec;\n\tfor(const auto& x:molecule.get_atoms()){\n\t\tatom_information<3> tmp;\n\t\ttmp.coord = x.get_coords();\n\t\ttmp.charge = x.get_atomic_number();\n\t\ttmp.R1 = R1_*slater_radius(x.get_atomic_number());\n\t\ttmp.R2 = R2_*slater_radius(x.get_atomic_number());\n\n\t\tatom_vec.push_back(tmp);\n\t}\n\treturn atom_vec;\n}\n\n} // end namespace madness\n"
  },
  {
    "path": "src/madness/chem/AC.h",
    "content": "/*\n * AC.h\n *\n *  Created on: Dec 13, 2016\n *      Author: msahre\n */\n\n#ifndef SRC_APPS_CHEM_AC_H_\n#define SRC_APPS_CHEM_AC_H_\n\n#include <madness/world/MADworld.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/funcplot.h>\n#include <exception>\n#include <iterator>\n#include <list>\n#include<madness/chem/SCF.h>\n\nnamespace madness {\n\n\n\n/// Needed information about atom to compute asymptotic correction\ntemplate<unsigned long int NDIM>\nstruct atom_information{\n\n\t/// Coordinates of nucleus\n\tVector<double,NDIM> coord;\n\n\t/// Interval boundaries, in which exchange correlation potential (<R1) and 1/r potential (>R2) are used\n\tdouble R1;\n\tdouble R2;\n\n\t/// Nuclear charge\n\tint charge;\n\n\t/// Computes the distance between electron and nucleus\n\t/// @param[in] elec: position of electron\n\t/// @param[in] nuc: position of nucleus\n\t/// @param[out] distance: distance between electron and nucleus\n\tdouble get_distance(Vector<double,NDIM> elec, Vector<double,NDIM> nuc) const{\n\t\tdouble distance = 0.0;\n\t\tfor(unsigned i = 0; i < NDIM; i++){\n\t\t\tdistance += (elec[i]-nuc[i])*(elec[i]-nuc[i]);\n\t\t}\n\t\tdistance = sqrt(distance);\n\n\t\treturn distance;\n\t}\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar &  coord& R1&  R2& charge;\n    }\n\n};\n\n/// Creates vector of atom_information for the given molecule\n/// @param[in] molecule: the molecule\n/// @param[out] : the vector containing the atom_information for each atom in the molecule\nstd::vector<atom_information<3> > make_atom_vec(const Molecule& molecule, double R1_,double R2_);\n\n/// collection of slater radii needed to calculate R1 and R2; The Journal of Chemical Physics 41, 3199 (1964); doi: 10.1063/1.1725697\n/// @param[in] atomic_number: atomic_number of atom\n/// @param[out] : slater radius corresponding to atomic_number\ndouble slater_radius(int atomic_number);\n\n\n\n\n/// Contains all the parameters for the asymptotic correction\ntemplate<unsigned long int NDIM>\nstruct ACParameters{\n\tstd::vector< atom_information<NDIM> > atoms_;\n\tbool use_mult_; /// set true to use multipole approximation\n\tdouble e_ion_; /// ionisation energy of corresponding ion without ac\n\tdouble eh_; /// energy of the homo without ac\n\tdouble R1_; /// lower boundary interpolation area\n\tdouble R2_; /// upper boundary for interpolation area\n\tdouble dft_coefficient_; /// dft coefficient for hybrid functionals (=1.0 for non hybrid)\n\tint num_elec_; /// number of electrons\n\tstd::string interpolation_scheme_; /// scheme for interpolation between xc-functional and 1/r-potential\n\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & atoms_ & e_ion_ & eh_ & R1_ & R2_ & dft_coefficient_ & num_elec_ & interpolation_scheme_;\n    }\n\n\tACParameters(){\n\t\tuse_mult_ = false;\n\t\te_ion_ = 0.0;\n\t\teh_ = 0.0;\n\t\tR1_ = 3.0;\n\t\tR2_ = 4.0;\n\t\tinterpolation_scheme_ = \"linear\";\n\t\tnum_elec_=-1;\n\t\tdft_coefficient_=0.0;\n\t}\n\n\tbool initialize(Molecule molecule, std::string ac_data, double dft_coeff, double tot_charge){\n\t\tif(ac_data==\"none\"){\n\t\t\treturn false;\n\t\t}else{\n\t\tdft_coefficient_ = dft_coeff;\n\n\t\tstd::stringstream sac_data(ac_data);\n\t\tstd::string word;\n\n\t\twhile (sac_data >> word) {\n\t\t\tstd::transform(word.begin(), word.end(), word.begin(), ::toupper);\n\t\t\tif(word==\"MULT\"){\n\t\t\t\tuse_mult_ = true;\n\t\t\t} else if(word == \"EION\") {\n\t\t\t\tsac_data >> e_ion_;\n\t\t\t} else if(word == \"EHOMO\"){\n\t\t\t\tsac_data >> eh_;\n\t\t\t} else if(word == \"R1\"){\n\t\t\t\tsac_data >> R1_;\n\t\t\t} else if(word == \"R2\"){\n\t\t\t\tsac_data >> R2_;\n\t\t\t} else if(word == \"INTERPOL\"){\n\t\t\t\tsac_data >> interpolation_scheme_;\n\t\t\t} else {\n\t\t\t\tstd::cout << \"Invalid entry in ac line\\n\";\n\t\t\t\t//MADNESS_ASSERT(\"Invalid ac_data!\\n\", 1);\n\t\t\t}\n\t\t}\n\t\tatoms_ = make_atom_vec(molecule, R1_, R2_);\n\t\tnum_elec_ = molecule.total_nuclear_charge() - tot_charge;\n\t\treturn true;\n\t\t}\n\t}\n\n\tACParameters(const ACParameters &other)\n\t: atoms_(other.atoms_), use_mult_(other.use_mult_), e_ion_(other.e_ion_),\n\t  eh_(other.eh_), R1_(other.R1_), R2_(other.R2_), dft_coefficient_(other.dft_coefficient_),\n\t  num_elec_(other.num_elec_), interpolation_scheme_(other.interpolation_scheme_) {}\n\n\tvoid print(World& world){\n\t\tif(world.rank()==0){\n\t\tstd::cout << \"\\nAsymptotic correction parameters\\n\";\n\t\tstd::cout << \"---------------------------------------\\n\";\n\t\tstd::cout << \"Atom vector is not empty: \" << !atoms_.empty() << \"\\n\";\n\t\tstd::cout << \"Using multipole approximation: \" << use_mult_ << \"\\n\";\n\t\tstd::cout << \"Number of electrons = \" << num_elec_ << \"\\n\";\n\t\tstd::cout << \"Ionisation energy = \" << e_ion_ << \"\\n\";\n\t\tstd::cout << \"E(HOMO) = \" << eh_ << \"\\n\";\n\t\tstd::cout << \"R1 = \" << R1_ << \"\\n\";\n\t\tstd::cout << \"R2 = \" << R2_ << \"\\n\";\n\t\tstd::cout << \"DFT coefficient = \" << dft_coefficient_ << \"\\n\";\n\t\tstd::cout << \"Interpolation scheme = \" << interpolation_scheme_ << \"\\n\";\n\t\t}\n\t}\n\n\tvoid check(World& world){\n\t\tif(atoms_.empty()) { MADNESS_EXCEPTION(\"Failed to initialize AC object!\",1); }\n\t\telse if(num_elec_ <0) { MADNESS_EXCEPTION(\"Negative number of electrons!\",1); }\n\t\telse if(e_ion_ < 0) { MADNESS_EXCEPTION(\"Ionisation energy is negative!\",1); }\n\t\telse if(eh_>0) { MADNESS_EXCEPTION(\"Energy of homo is positive!\",1); }\n\t\telse if(R1_ == 0.0 or R2_ == 0.0) std::cout << \"\\n\\nWARNING: R1 or R2 is zero!\\n\\n\";\n\t\telse if(interpolation_scheme_ != \"linear\" and interpolation_scheme_ != \"constant\") std::cout << \"\\n\\nWARNING: Unknown interpolation scheme, using linear interpolation instead\\n\\n!\";\n\t\telse if(world.rank()==0) std::cout << \"AC object was initialized succesfully!\\n\\n\";\n\t}\n\n};\n\n/// Functor for the correction factor, which is multiplied with the exchange correlation potential\ntemplate<unsigned long int NDIM>\nclass int_factor_functor : public FunctionFunctorInterface<double,NDIM>{\n\npublic:\n\tint_factor_functor(){}\n\t//int_factor_functor(std::vector<atom_information<NDIM> > atoms, std::string interpolation): atoms(atoms), intpol_scheme(interpolation){}\n\n\tint_factor_functor(const ACParameters<NDIM>& ac_param) : ac_param_(ac_param) {}\n\n\t//int_factor_functor(std::string interpolation) : intpol_scheme(interpolation) {}\n\n\n\n\t/// Computes correction factor for exchange correlation potential\n\t/// @param[in] r: position of the electron\n\t/// @param[out] : correction factor for exchange correlation potential at position r\n\tdouble operator ()(const Vector<double, NDIM> &r)const{\n\n\t\t// distance between electron and nuclues\n\t\tdouble d = 0.0;\n\n\t\tbool inside_R1 = false;\n\t\tstd::vector<atom_information<NDIM> > between;\n\n\t\t// get position of electron relative to nuclei, to compute right correction factor\n\t\tfor(const auto& x:ac_param_.atoms_){\n\t\t\td = get_distance(r, x.coord);\n\t\t\t// check if d<R1 for at least one nucleus\n\t\t\tif(d<x.R1) {\n\t\t\t\tinside_R1 = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// push_back index of nucleus for which electron is inbetween\n\t\t\tif(x.R1 < d and d < x.R2) {\n\t\t\t\tbetween.push_back(x);\n\t\t\t}\n\t\t}\n\n\t\t// compute correction factor\n\t\t// at least for one nucleus r<R1\n\t\tif(inside_R1){\n\t\t\treturn 1.0;}\n\t\t// all nuclei r>R2\n\t\telse if(between.empty()){\n\t\t\treturn 0.0;}\n\t\t// for N nuclei R1<r<R2\n\t\telse {\n\t\t\treturn int_factor(r, between);\n\t\t}\n\t}\n\n\t/// Computes correction factor for the exchange correlation potential if electron position is between R1 and R2\n\t/// @param[in] r: position of electron\n\t/// @param[in] between: vector of the atom_information of all atoms for that electron position is between R1 and R2\n\t/// @param[out] int_factor: correction factor\n\tdouble int_factor(const Vector<double, NDIM> &r, std::vector<atom_information<NDIM> > between) const{\n\t\t// Do not forget to add interpolation scheme to ACparameters check()\n\t\tif(ac_param_.interpolation_scheme_==\"constant\"){\n\t\t\treturn 0.5;\n\t\t}\n\t\telse{\n\t\t\tdouble int_factor = 0.0;\n\t\t\tfor(const auto& x:between){\n\t\t\t\t// linear interpolation scheme between R1 and R2\n\t\t\t\tint_factor += (- get_distance(r,x.coord) + x.R2)/(x.R2-x.R1);\n\t\t\t\t//int_factor += 0.5*(erf(-(get_distance(r, x.coord)-5.0))+1.0);\n\t\t\t}\n\t\t\tint_factor = int_factor/(double(between.size()));\n\t\t\treturn int_factor;\n\t\t}\n\t}\n\nprivate:\n\t/// Computes the distance between electron and nucleus\n\t/// @param[in] elec: position of electron\n\t/// @param[in] nuc: position of nucleus\n\t/// @param[out] distance: distance between electron and nucleus\n\tdouble get_distance(Vector<double,NDIM> elec, Vector<double,NDIM> nuc) const{\n\t\tdouble distance = 0.0;\n\t\tfor(unsigned i = 0; i < NDIM; i++){\n\t\t\tdistance += (elec[i]-nuc[i])*(elec[i]-nuc[i]);\n\t\t}\n\t\tdistance = sqrt(distance);\n\n\t\treturn distance;\n\t}\n\n\t/// Parameter for the asymtotic correction\n\tconst ACParameters<NDIM> &ac_param_;\n\n};\n\n/// Functor for the 1/r potential to induce the correct asymptotic behaviour of the exchange correlation potential\ntemplate<unsigned long int NDIM>\nclass lr_pot_functor : public FunctionFunctorInterface<double,NDIM>{\n\npublic:\n\tlr_pot_functor(){}\n\t//lr_pot_functor(std::vector<atom_information<NDIM> > atoms, double dft_coeff_, std::string interpolation): atoms(atoms), dft_coeff(dft_coeff_), intpol_scheme(interpolation){}\n\n\tlr_pot_functor(const ACParameters<NDIM> & ac_param): ac_param_(ac_param){}\n\n\t/// Computes 1/r potential weighted by a correction factor\n\t/// @param[in] r: position of the electron (density)\n\t/// @param[out]: 1/r potential weighted by a correction factor\n\tdouble operator ()(const Vector<double, NDIM> &r)const{\n\t\t// distance between electron and nuclues\n\t\tdouble d = 0.0;\n\t\tbool inside_R1 = false;\n\t\tstd::vector<atom_information<NDIM> > between;\n\n\t\t// get position of electron relative to nuclei, to compute right correction factor\n\t\tfor(const auto& x:ac_param_.atoms_){\n\n\t\t\td = get_distance(r, x.coord);\n\t\t\t// check if d<R1 for at least one nucleus\n\t\t\tif(d<x.R1) {\n\t\t\t\tinside_R1 = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// push_back index of nucleus for which electron is inbetween\n\t\t\tif(x.R1 < d and d < x.R2) {\n\t\t\t\tbetween.push_back(x);\n\t\t\t}\n\n\t\t}\n\n\t\t// compute correction factor\n\t\t// at least for one nucleus r<R1\n\t\tif(inside_R1){return 0.0;} // return 0.0;\n\n\t\t// all nuclei r>R2\n\t\telse if(between.empty()){return 1.0*potential(r);} // 1.0*potential(r)+E_ion+E_homo\n\n\t\t// for N nuclei R1<r<R2\n\t\telse {return (int_factor(r, between))*potential(r);}\n\t}\n\nprivate:\n\t/// Computes the distance between electron and nucleus\n\t/// @param[in] elec: position of electron\n\t/// @param[in] nuc: position of nucleus\n\t/// @param[out] distance: distance between electron and nucleus\n\tdouble get_distance(Vector<double,NDIM> elec, Vector<double,NDIM> nuc) const{\n\t\tdouble distance = 0.0;\n\t\tfor(unsigned i = 0; i < NDIM; i++){\n\t\t\tdistance += (elec[i]-nuc[i])*(elec[i]-nuc[i]);\n\t\t}\n\t\tdistance = sqrt(distance);\n\n\t\treturn distance;\n\t}\n\n\t/// Multipole approximation of the 1/r potential for electron coordinate > R1 for all nuclei\n\t/// @param[in] r: coordinate of the electron\n\t/// @param[out] : potential at given coordinate r\n\tdouble potential(const Vector<double, NDIM> &r) const{\n\t\tdouble pot = 0.0;\n\t\tfor(const auto& x:ac_param_.atoms_){\n\t\t\tpot += double(x.charge)/get_distance(r, x.coord);\n\t\t}\n\t\treturn (-ac_param_.dft_coefficient_*pot/ac_param_.num_elec_);\n\t}\n\n\t/// Computes correction factor for the 1/r potential if electron position is between R1 and R2\n\t/// @param[in] r: position of electron\n\t/// @param[in] between: vector of the atom_information of all atoms for that electron position is between R1 and R2\n\t/// @param[out] int_factor: correction factor\n\tdouble int_factor(const Vector<double, NDIM> &r, std::vector<atom_information<NDIM> > between) const{\n\t\tint_factor_functor<NDIM> interpolation(ac_param_);\n\t\tdouble int_factor = interpolation.int_factor(r, between);\n\t\treturn (1.0 - int_factor);\n\t}\n\n\t/// Parameter for the asymtotic correction\n\tconst ACParameters<NDIM> &ac_param_;\n};\n\n/// computes the corrected exchange correlation potential using the multipole approximation\n\ntemplate<unsigned long int NDIM>\nstruct UnaryOpStructure {\n\n\tUnaryOpStructure(const std::shared_ptr<FunctionFunctorInterface<double,NDIM> > f_, const std::shared_ptr<FunctionFunctorInterface<double,NDIM> > f2_) :\n\t\tf(f_), f2(f2_),\n\t\tcdata(FunctionCommonData<double,NDIM>::get(FunctionDefaults<NDIM>::get_k())){};\n\n\t/// computes the corrected potential (weighting with correction factor and adding of 1/r potential)\n\t/// @param[in] t: uncorrected exchange correlation potential\n\t/// @param[out] t: corrected exchange correlation potential\n    void operator()(const Key<NDIM>& key, Tensor<double>& t) const {\n        Tensor<double> intpol(t.ndim(),t.dims());//madness::copy(t);\n        Tensor<double> lrpot(t.ndim(),t.dims());\n        const Tensor<double>& qp =cdata.quad_x;\n        fcube(key,(*f),qp,intpol);\n        fcube(key,(*f2),qp,lrpot);\n\n        // multiply xc-functional with interpolation factor\n        t.emul(intpol);\n        // add 1/r correction to xc-functional\n        t= t + lrpot;\n    }\n    /// shared pointer to object of int_factor_functor\n    std::shared_ptr<FunctionFunctorInterface<double,NDIM> > f;\n    /// shared pointer to object of lr_pot_functor\n    std::shared_ptr<FunctionFunctorInterface<double,NDIM> > f2;\n    FunctionCommonData<double,NDIM> cdata;\n    template <typename Archive> void serialize(Archive& ar) {}\n};\n\n/// computes the corrected exchange correlation potential using the hartree potential\n\ntemplate<unsigned long int NDIM>\nstruct BinaryOpStructure {\n\t/// necessary to compile the program without getting a strange error i dont understand\n\tBinaryOpStructure(): f(NULL), cdata(FunctionCommonData<double,NDIM>::get(FunctionDefaults<NDIM>::get_k())) {}\n\n\tBinaryOpStructure(const std::shared_ptr<FunctionFunctorInterface<double,NDIM> > f_) :\n\t\tf(f_),\n\t\tcdata(FunctionCommonData<double,NDIM>::get(FunctionDefaults<NDIM>::get_k())){};\n\n\tBinaryOpStructure(const BinaryOpStructure<NDIM> &other) : f(other.f), cdata(other.cdata) {}\n\n\t/// computes the corrected potential (weighting with correction factor and adding of 1/r potential)\n\t/// @param[in] t: uncorrected exchange correlation potential\n\t/// @param[out] t: corrected exchange correlation potential\n    void operator()(const Key<NDIM>& key, Tensor<double>& result, const Tensor<double>& vxc, const Tensor<double>& vhartree) const {\n\n    \tif(f.get()==NULL) MADNESS_EXCEPTION(\"NULL Pointer in BinaryOpStructure of AC\",1);\n\n    \tTensor<double> intpol(result.ndim(),result.dims());//madness::copy(t);\n        Tensor<double> lrpot(result.ndim(),result.dims());\n        const Tensor<double>& qp =cdata.quad_x;\n        fcube(key,(*f),qp,intpol);\n\n        // exchange correlation potential weighted by correction factor\n        Tensor<double> tmp1 = madness::copy(vxc).emul(intpol);\n        // hartree potential pot weighted by correction factor\n        Tensor<double> tmp2 = madness::copy(vhartree).emul(intpol);\n        Tensor<double> tmp3 = madness::copy(vhartree);\n        // corrected potential\n        result = tmp1 - tmp2 + tmp3;\n    }\n\n    /// shared pointer to object of int_factor_functor\n    std::shared_ptr<FunctionFunctorInterface<double,NDIM> > f;\n    FunctionCommonData<double,NDIM> cdata;\n    template <typename Archive> void serialize(Archive& ar) {}\n};\n\n/// Asymptotic correction for DFT. In the correction the xc-potential is replaced by an 1/r term far away from the nuclei\n/// to give the correct asymptotic behavior. Close to the nuclei the standard xc-potential is used. The transition between\n/// the different potentials is achieved via a linear interpolation.\n/// for more information see: Molecular Physics, Vol. 103, No. 2–3, 20 January–10 February 2005, 413–424;\n/// The Journal of Chemical Physics 109, 10180 (1998); doi: 10.1063/1.477711;\n/// Molecular Physics, 1999, VOL.97, No. 7, 859-868\ntemplate<unsigned long int NDIM>\nclass AC{\nprivate:\n\n\t/// Parameter for the asymtotic correction\n\tACParameters<NDIM> ac_param_;\n\tbool initialized_=false;\n\tdouble shift()const{return (-ac_param_.e_ion_-ac_param_.eh_);}\n\npublic:\n    bool initialized()const{return initialized_;}\n    AC() = default;\n\n   AC(const ACParameters<NDIM>& ac_param): ac_param_(ac_param) {}\n\n   AC(World &world, std::shared_ptr<SCF> calc){\n\t   if(world.rank()==0){\n\t\t   initialized_=ac_param_.initialize(calc->molecule, calc->param.ac_data(), 1.0-calc->xc.hf_exchange_coefficient(), calc->param.charge());\n\t   }\n\t   world.gop.broadcast_serializable(initialized_,0);\n\t   world.gop.broadcast_serializable(ac_param_, 0);\n//\t   ac_param_.print(world);\n\t   if(calc->param.ac_data()!=\"none\") ac_param_.check(world);\n   }\n\n   AC(const AC& other): ac_param_(other.ac_param_){}\n\n   /// /// correction of the exchange correlation potential using the multipole approximation to describe asymptotic behaviour\n   /// @param[in] xc_functional: uncorrected (standard) exchange correlation potential\n   /// @param[out] : corrected exchange correlation potential\n   Function<double,NDIM> apply(Function<double,NDIM> xc_functional)const{\n\t   MADNESS_ASSERT(initialized());\n\t   std::cout << \"Apply AC Scheme with multipole approximation\\n\";\n\t   // fast return\n\t   if(ac_param_.atoms_.empty()){\n\t\t   std::cout << \"OR NOT -- EMPTY VECTOR ATOMS!!!\\n\";\n\t\t   return xc_functional;\n\t   }\n\n\t   if(ac_param_.dft_coefficient_ < 0.0) { MADNESS_EXCEPTION(\"DFT coefficient is negative!\",1); }\n\t   if(ac_param_.dft_coefficient_ == 0.0) { MADNESS_EXCEPTION(\"DFT coefficient is zero. This is no DFT calculation!\\n\",1); }\n\n\t   // shift of the exchange correlation potential to get the correct asymptotic behaviour\n\t   xc_functional = xc_functional + shift();\n\t   // pointer on interpolation factor and long range potential (1/r pot)\n\t   std::shared_ptr<FunctionFunctorInterface<double, NDIM> > int_ptr(new int_factor_functor<NDIM>(ac_param_));\n\t   std::shared_ptr<FunctionFunctorInterface<double, NDIM> > lr_pot_ptr(new lr_pot_functor<NDIM>(ac_param_));\n\n\t\t// compute interpolation and long range potential\n\t\tUnaryOpStructure<NDIM> U_total(int_ptr,lr_pot_ptr);\n\n\t\t// apply correction on xc functional\n\t\txc_functional.template unaryop<UnaryOpStructure<NDIM> >(U_total);\n\t\t//plot_plane( xc_functional, \"test_total\");\n\t\treturn xc_functional;\n   }\n\n   /// correction of the exchange correlation potential using the hartree potential to describe asymptotic behaviour\n   /// @param[in] xc_functional: uncorrected (standard) exchange correlation potential\n   /// @param[in] v_hartree: potential to describe asymptotic behaviour\n   /// @param[out] : corrected exchange correlation potential\n   Function<double,NDIM> apply(Function<double,NDIM> xc_functional, const Function<double,NDIM> v_hartree)const{\n\t   MADNESS_ASSERT(initialized());\n\t   if(ac_param_.use_mult_) return apply(xc_functional);\n\t   //else return apply_potential(xc_functional, v_hartree);\n\t   std::cout << \"Apply AC Scheme with hartree potential\\n\";\n\t   // fast return\n\t   if(ac_param_.atoms_.empty()){\n\t\t   std::cout << \"OR NOT -- EMPTY VECTOR ATOMS!!!\\n\";\n\t\t   return xc_functional;\n\t   }\n\t   // shift of the exchange correlation potential to get the correct asymptotic behaviour\n\t   xc_functional = xc_functional + shift();\n\n\t   // pointer on interpolation factor and long range potential\n\t   std::shared_ptr<FunctionFunctorInterface<double, NDIM> > int_ptr(new int_factor_functor<NDIM>(ac_param_));\n\n\t   // compute interpolation and long range potential\n\t   BinaryOpStructure<NDIM> U_total(int_ptr);\n\t   xc_functional = binary_op<double,double,BinaryOpStructure<NDIM>,NDIM >(xc_functional, v_hartree, U_total);\n\n\t   return xc_functional;\n   }\n\n};\n\n}// end namespace\n\n#endif /* SRC_APPS_CHEM_AC_H_ */\n"
  },
  {
    "path": "src/madness/chem/Applications.hpp",
    "content": "#pragma once\n\n#include <madness/chem/InputWriter.hpp>\n#include <madness/chem/ParameterManager.hpp>\n#include <madness/chem/PathManager.hpp>\n#include <madness/chem/Results.h>\n\nnamespace madness {\n  // Scoped CWD: changes the current directory to the given one, and restores when\n  // the object goes out of scope\n  struct ScopedCWD {\n    std::filesystem::path old_cwd;\n    explicit ScopedCWD(std::filesystem::path const& new_dir) {\n      old_cwd = std::filesystem::current_path();\n      std::filesystem::current_path(new_dir);\n    }\n    ~ScopedCWD() { std::filesystem::current_path(old_cwd); }\n  };\n\n\n  /// common interface for any underlying MADNESS app\n  class Application {\n  public:\n    explicit Application(const Params& p) : params_(p) {}\n    virtual ~Application() = default;\n\n    // run: write all outputs under the given directory\n    virtual void run(const std::filesystem::path& workdir) = 0;\n\n    // optional hook to return a JSON fragment of this app's main results\n    [[nodiscard]] virtual nlohmann::json results() const = 0;\n\n    // get the parameters used for this application\n    [[nodiscard]] virtual const QCCalculationParametersBase& get_parameters() const = 0;\n\n    virtual void print_parameters(World& world) const {\n      std::string tag= get_parameters().get_tag();\n      if (world.rank() == 0) get_parameters().print(tag,\"end\");\n    }\n\n    // get the working directory for this application\n    [[nodiscard]] path get_workdir() const {\n      return workdir_;\n    }\n\n    /// check if this calculation has a json with results\n    [[nodiscard]] virtual bool has_results(std::string filename) const {\n      // check if the results file exists\n      // return std::filesystem::exists(workdir_ / filename);\n      return std::filesystem::exists( filename);\n    }\n\n    [[nodiscard]] virtual bool verify_results(const nlohmann::json& j) const {\n      // check if some key parameters of the calculation match:\n      // molecule, box size, nmo_alpha, nmo_beta\n      Molecule mol1 = params_.get<Molecule>();\n      Molecule mol2;\n      mol2.from_json(j[\"molecule\"]);\n      if (not (mol1 == mol2)) {\n        print(\"molecule mismatch\");\n        mol1.print();\n        mol2.print();\n        return false;\n      }\n      return true;\n    }\n\n    /// read the results from a json file\n    [[nodiscard]] virtual nlohmann::json read_results(std::string filename) const {\n      if (has_results(filename)) {\n        std::cout << \"Found checkpoint file: \" << filename << std::endl;\n        // std::ifstream ifs(workdir_ / filename);\n        std::ifstream ifs( filename);\n        nlohmann::json j;\n        ifs >> j;\n        ifs.close();\n        if (not verify_results(j)) {\n          std::string msg= \"Results file \" + filename + \" does not match the parameters of the calculation\";\n          print(msg);\n          return nlohmann::json(); // return empty json\n        }\n        return j;\n      } else {\n        std::string msg= \"Results file \" + filename + \" does not exist in \" + workdir_.string();\n        MADNESS_EXCEPTION(msg.c_str(), 1);\n      }\n      return nlohmann::json();\n    }\n\n    /// check if the wavefunctions are already computed\n    [[nodiscard]] virtual bool has_wavefunctions(std::string filename) const {\n      return std::filesystem::exists(workdir_ / filename);\n    }\n\n    /// read the wavefunctions from a file\n    [[nodiscard]] virtual std::vector<double> read_wavefunctions(std::string filename) const {\n      if (has_wavefunctions(filename)) {\n        std::ifstream ifs(workdir_ / filename);\n        std::vector<double> wfs;\n        double value;\n        while (ifs >> value) {\n          wfs.push_back(value);\n        }\n        ifs.close();\n        return wfs;\n      } else {\n        std::string msg= \"Wavefunction file \" + filename + \" does not exist in \" + workdir_.string();\n        MADNESS_EXCEPTION(msg.c_str(), 1);\n      }\n      return {};\n    }\n\n    /// check if this calculation needs to be redone\n    [[nodiscard]] virtual bool needs_redo() const {\n      // read json and check if the results are already there\n      if (std::filesystem::exists(workdir_ / \"results.json\")) {\n        std::ifstream ifs(workdir_ / \"results.json\");\n        nlohmann::json j;\n        ifs >> j;\n        ifs.close();\n        // check if the results are already there\n        return !j.contains(\"energy\") || !j[\"energy\"].is_number();\n      }\n      // by default, we assume that the calculation needs to be redone\n      return true;\n    }\n\n  protected:\n    const Params params_;\n    path workdir_;\n    nlohmann::json results_;\n  };\n\n\n  template <typename Library, typename ScfT = SCF>\n  class SCFApplication : public Application, public ScfT, public std::enable_shared_from_this<SCFApplication<Library,ScfT>> {\n  public:\n\n    /// SCF ctor\n    template <typename T = ScfT, std::enable_if_t<std::is_same_v<T, Nemo>, int> = 0>\n    explicit SCFApplication(World& w, const Params& p)\n        : Application(p), ScfT(w,p.get<CalculationParameters>(), p.get<Nemo::NemoCalculationParameters>(), p.get<Molecule>()), world_(w) {}\n\n    /// Nemo ctor\n    template <typename T = ScfT, std::enable_if_t<std::is_same_v<T, SCF>, int> = 0>\n    explicit SCFApplication(World& w, const Params& p)\n        : Application(p), ScfT(w,p.get<CalculationParameters>(), p.get<Molecule>()), world_(w) {}\n\n    std::shared_ptr<const SCF> get_scf() const {\n      return std::dynamic_pointer_cast<const SCF>(this->shared_from_this());\n    }\n\n    bool constexpr is_nemo() const {\n      return std::is_same_v<ScfT, Nemo>;\n    }\n\n    std::shared_ptr<const Nemo> get_nemo() const {\n      auto return_ptr= std::dynamic_pointer_cast<const Nemo>(this->shared_from_this());\n      if (!return_ptr) {\n        MADNESS_EXCEPTION(\"Could not cast SCFApplication to Nemo\", 1);\n      }\n      return return_ptr;\n    }\n\n    std::shared_ptr<Nemo> get_nemo() {\n      auto return_ptr= std::dynamic_pointer_cast<Nemo>(this->shared_from_this());\n      if (!return_ptr) {\n        MADNESS_EXCEPTION(\"Could not cast SCFApplication to Nemo\", 1);\n      }\n      return return_ptr;\n    }\n\n    void print_parameters(World& world) const override {\n      std::string tag= get_parameters().get_tag();\n      if (world.rank() == 0) {\n        if constexpr (std::is_same_v<ScfT, SCF>) { // SCF\n          get_parameters().print(\"dft\",\"end\");\n        } else {  // Nemo\n          get_parameters().print(\"dft\");\n          get_nemo()->get_nemo_param().print();\n          print(\"end\");\n        }\n      }\n    }\n\n    const QCCalculationParametersBase& get_parameters() const override {\n      if (is_nemo()) {\n        return get_nemo()->get_calc_param();\n      } else {\n        return get_scf()->param;\n      }\n    }\n\n    void run(const std::filesystem::path& workdir) override {\n      // 1) set up a namedspaced directory for this run\n      std::string label= is_nemo() ? \"nemo\" : Library::label();\n      PathManager pm(workdir, label.c_str());\n      pm.create();\n      workdir_=pm.dir();\n      world_.gop.fence();\n      {\n        ScopedCWD scwd(pm.dir());\n        if (world_.rank() == 0) {\n          std::cout << \"Running SCF in \" << pm.dir() << std::endl;\n        }\n\n        auto scfParams = params_.get<CalculationParameters>();\n        bool needEnergy = true;\n        bool needDipole = scfParams.dipole();\n        bool needGradient = scfParams.derivatives();\n        bool needWavefunctions = true;\n\n        // 2) define the \"checkpoint\" file\n        auto ckpt = params_.get<CalculationParameters>().prefix()+\".calc_info.json\";\n        nlohmann::json j;\n        if (has_results(ckpt)) j=read_results(ckpt);\n\n        [[maybe_unused]] bool ok = true;\n        if (needEnergy && !j.contains(\"energy\")) ok = false;\n        if (needDipole && !j.contains(\"dipole\")) ok = false;\n        if (needGradient && !j.contains(\"gradient\")) ok = false;\n        if (needWavefunctions) {\n          try {\n            double thresh=scfParams.protocol().back();\n            if constexpr (std::is_same_v<ScfT, Nemo>) this->set_protocol(scfParams.econv());\n            if constexpr (std::is_same_v<ScfT, SCF>) SCF::set_protocol<3>(world_,thresh);\n            this->load_mos(world_);\n          } catch (...) {\n            // if we cannot load MOs, we need to recompute them\n            ok = false;\n          }\n        }\n\n        if (ok) {\n          energy_ = j[\"energy\"];\n          if (needDipole) dipole_ = tensor_from_json<double>(j[\"dipole\"]);\n          if (needGradient) gradient_ = tensor_from_json<double>(j[\"gradient\"]);\n          return;\n        }\n\n        // we could dump params_ to JSON and pass as argv if desired…\n        MetaDataResults metadata(world_);\n        if constexpr (std::is_same_v<ScfT, SCF>) {\n          results_ = Library::run_scf(world_, params_, pm.dir());\n        } else if constexpr (std::is_same_v<ScfT, Nemo>) {\n          results_ = Library::run_nemo(this->get_nemo());\n        } else {\n          MADNESS_CHECK_THROW(\"unknown SCF type\", 1);\n        }\n        results_[\"metadata\"] = metadata.to_json();\n\n        // legacy\n        PropertyResults properties= results_[\"properties\"];\n        energy_ = properties.energy;\n        dipole_ = properties.dipole;\n        gradient_ = properties.gradient;\n\n      }\n    }\n\n    nlohmann::json results() const override {\n      return results_;\n    }\n\n  private:\n    World& world_;\n    double energy_;\n\n    std::optional<Tensor<double>> dipole_;\n    std::optional<Tensor<double>> gradient_;\n    std::optional<real_function_3d> density_;\n  };\n\n  /**\n   * @brief Wrapper application to run the molresponse workflow\n   *        via the molresponse_lib::run_response function.\n   */\n  template <typename Library>\n  class ResponseApplication : public Application {\n  public:\n    /**\n     * @param world   MADNESS world communicator\n     * @param params  Unified Params containing ResponseParameters & Molecule\n     * @param indir   Directory of precomputed ground-state (SCF) outputs\n     */\n    ResponseApplication(World& world, Params params, std::filesystem::path indir)\n        : Application(std::move(params)),\n          world_(world),\n          indir_(std::move(indir)) {}\n\n\n    const QCCalculationParametersBase& get_parameters() const override {\n      return params_.get<ResponseParameters>();\n    }\n    /**\n     * @brief Execute response + property workflow, writing into workdir/response\n     */\n    void run(const std::filesystem::path& workdir) override {\n      // create a namespaced subdirectory for response outputs\n      PathManager pm(workdir, Library::label());\n      pm.create();\n      {\n        ScopedCWD scwd(pm.dir());\n\n        auto res = Library::run_response(world_, params_, indir_, pm.dir());\n\n        metadata_ = std::move(res.metadata);\n        properties_ = std::move(res.properties);\n      }\n    }\n\n    /**\n     * @brief Return a JSON fragment summarizing results\n     */\n    [[nodiscard]] nlohmann::json results() const override {\n      return {{\"type\", \"response\"},\n              {\"metadata\", metadata_},\n              {\"properties\", properties_}};\n    }\n\n  private:\n    World& world_;\n    std::filesystem::path indir_;\n    nlohmann::json metadata_;\n    nlohmann::json properties_;\n  };\n\n  template <typename Library, typename SCFApplicationT>\n  class CC2Application : public Application, public CC2 {\n  public:\n    explicit CC2Application(World& w, const Params& p, const SCFApplicationT& reference)\n        : Application(p), \n          CC2(w, p.get<CCParameters>(), p.get<TDHFParameters>(), reference.get_nemo()),\n          world_(w), reference_(reference) {\n    }\n\n    const QCCalculationParametersBase& get_parameters() const override {\n      return parameters; // CCParameters\n    }\n\n    void run(const std::filesystem::path& workdir) override {\n      // 1) set up a namedspaced directory for this run\n      PathManager pm(workdir, Library::label());\n      pm.create();\n      world_.gop.fence();\n      {\n        ScopedCWD scwd(pm.dir());\n        if (world_.rank() == 0) {\n          std::cout << \"Running CC2 in \" << pm.dir() << std::endl;\n        }\n\n        // 2) define the \"checkpoint\" file\n        std::string label=Library::label();\n        auto ckpt = label + \"_results.json\";\n        print(\"cc checkpoint file\",ckpt);\n        if (std::filesystem::exists(ckpt)) {\n          if (world_.rank() == 0) {\n            std::cout << \"Found checkpoint file: \" << ckpt << std::endl;\n          }\n          // read the checkpoint file\n          std::ifstream ifs(ckpt);\n          ifs >> results_;\n          ifs.close();\n\n          // bool ok = true;\n          // bool needEnergy = true;\n          // if (needEnergy && !results_.contains(\"energy\")) ok = false;\n\n        }\n\n        auto rel = std::filesystem::relative(reference_.get_workdir(), pm.dir());\n        if (world.rank() == 0) {\n          std::cout << \"Running cc2 calculation in: \" << pm.dir() << std::endl;\n          std::cout << \"Ground state archive: \" << reference_.get_workdir() << std::endl;\n          std::cout << \"Relative path: \" << rel << std::endl;\n        }\n\n        results_=this->solve();\n\n      }\n    }\n\n    nlohmann::json results() const override {\n      return results_;\n    }\n\n  private:\n    World& world_;\n    const Application& reference_;\n  };\n\n\n\n  template<typename SCFApplicationT>\n  class TDHFApplication : public Application, public TDHF {\n  public:\n    explicit TDHFApplication(World& w, const Params& p, const SCFApplicationT& reference)\n        : Application(p), \n          TDHF(w, p.get<TDHFParameters>(), reference.get_nemo()),\n          world_(w), reference_(reference) {\n    }\n\n\n    const QCCalculationParametersBase& get_parameters() const override {\n      return TDHF::get_parameters(); // TDHFParameters\n    }\n\n    void run(const std::filesystem::path& workdir) override {\n      // 1) set up a namedspaced directory for this run\n      PathManager pm(workdir, \"tdhf\");\n      pm.create();\n      world_.gop.fence();\n      {\n        ScopedCWD scwd(pm.dir());\n        if (world_.rank() == 0) {\n          std::cout << \"Running CIS in \" << pm.dir() << std::endl;\n        }\n\n        // we could dump params_ to JSON and pass as argv if desired…\n        try {\n          const double time_scf_start = wall_time();\n          this->prepare_calculation();\n          const double time_scf_end = wall_time();\n          if (world_.rank() == 0) printf(\" at time %.1f\\n\", wall_time());\n\n          const double time_cis_start = wall_time();\n          std::vector<CC_vecfunction> roots = this->solve_cis();\n          const double time_cis_end = wall_time();\n          if (world_.rank() == 0) printf(\" at time %.1f\\n\", wall_time());\n\n          if (world_.rank() == 0) {\n            std::cout << std::setfill(' ');\n            std::cout << \"\\n\\n\\n\";\n            std::cout << \"--------------------------------------------------\\n\";\n            std::cout << \"MRA-CIS ended \\n\";\n            std::cout << \"--------------------------------------------------\\n\";\n            std::cout << std::setw(25) << \"time scf\" << \" = \" << time_scf_end - time_scf_start << \"\\n\";\n            std::cout << std::setw(25) << \"time cis\" << \" = \" << time_cis_end - time_cis_start << \"\\n\";\n            std::cout << \"--------------------------------------------------\\n\";\n          }\n          auto j=this->analyze(roots);\n          // funnel through CISResults to make sure we have the right format\n          CISResults results(j);\n          results_= results.to_json();\n\n        } catch (std::exception& e) {\n          print(\"Caught exception: \", e.what());\n        }\n      }\n    }\n\n    nlohmann::json results() const override {\n      return results_;\n    }\n\n  private:\n    World& world_;\n    const Application& reference_;\n\n  };\n\n\n\n  template<typename SCFApplicationT>\n  class OEPApplication : public Application, public OEP {\n  public:\n    explicit OEPApplication(World& w, const Params& p, const SCFApplicationT& reference)\n        : Application(p), \n          OEP(w, p.get<OEP_Parameters>(), reference.get_nemo()),\n          world_(w), reference_(reference) {\n    }\n\n    const QCCalculationParametersBase& get_parameters() const override {\n      return oep_param; // OEP_Parameters\n    }\n\n    void run(const std::filesystem::path& workdir) override {\n      // 1) set up a namedspaced directory for this run\n      PathManager pm(workdir, \"oep\");\n      pm.create();\n      world_.gop.fence();\n      {\n        ScopedCWD scwd(pm.dir());\n        if (world_.rank() == 0) {\n          std::cout << \"Running OEP in \" << pm.dir() << std::endl;\n        }\n\n        // 2) define the \"checkpoint\" file\n        std::string label=\"oep\";\n        auto ckpt = label + \"_results.json\";\n        print(\"cc checkpoint file\",ckpt);\n        if (std::filesystem::exists(ckpt)) {\n          if (world_.rank() == 0) {\n            std::cout << \"Found checkpoint file: \" << ckpt << std::endl;\n          }\n          // read the checkpoint file\n          std::ifstream ifs(ckpt);\n          nlohmann::json j;\n          ifs >> j;\n          ifs.close();\n\n        }\n\n        // we could dump params_ to JSON and pass as argv if desired…\n        try {\n          const double time_scf_start = wall_time();\n          this->value();\n          const double time_scf_end = wall_time();\n          if (world_.rank() == 0) printf(\" at time %.1f\\n\", wall_time());\n\n          if (world_.rank() == 0) {\n            std::cout << std::setfill(' ');\n            std::cout << \"\\n\\n\\n\";\n            std::cout << \"--------------------------------------------------\\n\";\n            std::cout << \"MRA-OEP ended \\n\";\n            std::cout << \"--------------------------------------------------\\n\";\n            std::cout << std::setw(25) << \"time scf\" << \" = \" << time_scf_end - time_scf_start << \"\\n\";\n            std::cout << \"--------------------------------------------------\\n\";\n          }\n        } catch (std::exception& e) {\n          print(\"Caught exception: \", e.what());\n        }\n        // nlohmann::json results;\n        results_=this->analyze();\n      }\n    }\n\n    nlohmann::json results() const override {\n      return results_;\n    }\n\n  private:\n    World& world_;\n    const Application& reference_;\n\n    double energy_;\n    std::optional<Tensor<double>> dipole_;\n    std::optional<Tensor<double>> gradient_;\n    std::optional<real_function_3d> density_;\n  };\n\n}\n\n\n"
  },
  {
    "path": "src/madness/chem/BSHApply.h",
    "content": "/*\n * BSHApply.h\n *\n *  Created on: Feb 26, 2020\n *      Author: fbischoff\n */\n\n#ifndef SRC_APPS_CHEM_BSHAPPLY_H_\n#define SRC_APPS_CHEM_BSHAPPLY_H_\n\n#include<madness/chem/MolecularOrbitals.h>\n#include<madness/world/MADworld.h>\n\nnamespace madness {\n\n/// apply the BSH operator on a vector of functions with corresponding potentials\n\n/// this class\n///  - constructs the bsh operator with the appropriate exponents\n///  - performs a level shift if necessary\n///  - adds coupling terms:  ( T - fock(i,i) ) psi_i  = -V psi_i + \\sum_{j\\neq i} psi_j fock(j,i)\n/// TODO: adding a level shift seems to make the operation less precise, why??\ntemplate<typename T, std::size_t NDIM>\nclass BSHApply {\n\npublic:\n\tenum return_value {update, residual};\n\tWorld& world;\n\tdouble levelshift=0.0;\n\tdouble lo=1.e-6;\n\tdouble bshtol=1.e-5;\n\tbool printme=false;\n\tbool destroy_Vpsi=false;\n\tFunction<double,NDIM> metric;\n\treturn_value ret_value=residual;\t\t// return the new orbitals/functions or the residuals\n\npublic:\n\tBSHApply(World& world) : world(world),\n\t\t\tmetric() {\n\t\tbshtol = FunctionDefaults <NDIM> ::get_thresh();\n\t\tprintme = printme and world.rank()==0;\n\t}\n\n\n\t/// apply the BSH operator on the vector of functions and respective potentials\n\n\t/// @param[in]\teps\t\torbital energies or the square fock matrix\n\t/// @param[in]\tVpsi\tvector of functions V*MOs\n\t/// @return\t\tan MO structure holding the residuals and the orbital energy updates\n\tstd::tuple<std::vector<Function<T,NDIM> >, Tensor<double> > operator()(\n\t\t\tconst std::vector<Function<T,NDIM> > psi,\n\t\t\tconst Tensor<T> eps,\n\t\t\tconst std::vector<Function<T,NDIM> >& Vpsi1) const {\n\n\t\tdouble cpu0=cpu_time();\n\t\tstd::vector<Function<T,NDIM> > Vpsi=copy(world,Vpsi1);\n\n\t\t// add coupling between the functions (i.e. in case of localized orbitals)\n\t\t// ( T + V ) \\psi_i\t= \\sum_j \\psi_j F_{ji}\n\t\t// ( T - F_{ii}) \\psi_i = -V \\psi_i + \\sum_{j\\neq i} \\psi_jF_{ji}\n\t\t// no coupling means F_{ij} =\\eps_i \\delta_{ij}, and the coupling term vanishes\n\t\tVpsi-=add_coupling_and_levelshift(psi,eps);\n\n\t    std::vector < std::shared_ptr<SeparatedConvolution<double,NDIM> > > ops(psi.size());\n\t    for (int i=0; i<eps.dim(0); ++i) {\n\t    \tT e_i= (eps.ndim()==2) ? eps(i,i) : eps(i);\n\t    \tif (printme) print(\"orbital energy for the BSH operator\",e_i);\n\t    \tops[i]=std::shared_ptr<SeparatedConvolution<double,NDIM> >(\n\t    \t\t\tBSHOperatorPtr<NDIM>(world, sqrt(-2.0*eps_in_green(e_i)), lo, bshtol));\n\t    \tops[i]->destructive()=true;\n\t    }\n\n\t    const std::vector<Function<T,NDIM> > tmp = apply(world,ops,-2.0*Vpsi);\n\t    const std::vector<Function<T,NDIM> > res=truncate(psi-tmp,FunctionDefaults<NDIM>::get_thresh()*0.1);\n\t    const std::vector<Function<T,NDIM> > bra_res=make_bra(res);\n\n\t    // update eps\n\t    Tensor<double> norms=real(inner(world,make_bra(tmp),tmp));\n\t    Tensor<T> rnorms=inner(world,bra_res,res);\n\t    for (int i=0; i<norms.size(); ++i) {\n\t    \tnorms(i)=sqrt(norms(i));\n\t    \trnorms(i)=sqrt(rnorms(i));\n\t    }\n\t    if (printme) {\n\t    \tprint(\"norm2(tmp)\",norms);\n\t    \tprint(\"norm2(res)\",rnorms);\n\t    }\n\n\t    Tensor<T> in=inner(world,Vpsi,bra_res);\t// no shift here!\n\t    Tensor<double> delta_eps(psi.size());\n\t    for (size_t i=0; i<psi.size(); ++i) delta_eps(i)=std::real(in(i))/(norms[i]*norms[i]);\n\n\t    if (printme) print(\"orbital energy update\",delta_eps);\n\t    double cpu1=cpu_time();\n\t    if (printme) printf(\"time in BSHApply()  %8.4fs\\n\",cpu1-cpu0);\n\n\t\tif (ret_value==update) return std::make_tuple(tmp,delta_eps);\n\t\telse if (ret_value==residual) return std::make_tuple(res,delta_eps);\n\t\telse {\n\t\t\tMADNESS_EXCEPTION(\"unknown return value in BSHApply\",1);\n\t\t}\n\t}\n\n\n\t/// apply the BSH operator on the vector of functions and respective potentials\n\n\t/// @param[in]\targ\t\tthe MO structure holding MOs and orbital energies\n\t/// @param[in]\tVpsi\tvector of functions V*MOs\n\t/// @return\t\tan MO structure holding the residuals and the orbital energy updates\n\tMolecularOrbitals<T,NDIM> operator()(const MolecularOrbitals<T,NDIM>& arg,\n\t\t\tconst std::vector<Function<T,NDIM> >& Vpsi) const {\n\t\tstd::tuple<std::vector<Function<T,NDIM>, Tensor<T> > > result;\n\t\tresult=this->operator()(arg.get_mos(),arg.get_eps(),Vpsi);\n\t\treturn result;\n\t}\n\n\tstd::vector<Function<T,NDIM> > make_bra(const std::vector<Function<T,NDIM> >& rhs) const {\n\t\tif (metric.is_initialized()) return metric*rhs;\n\t\treturn rhs;\n\t}\n\n\t/// limit the orbital energy (diagonal fock matrix element) entering the Green's function parameter mu\n\tdouble eps_in_green(const T eps) const {\n\n    \tif (std::imag(eps)>1.e-12)\n    \t\tMADNESS_EXCEPTION(\"complex orbital energies in BSHApply\",1);\n\t\treturn std::min(-0.05,std::real(eps)+levelshift);\n\t}\n\n\tstd::vector<Function<T,NDIM> > add_coupling_and_levelshift(const std::vector<Function<T,NDIM> > psi,\n\t\t\tconst Tensor<T> fock1) const {\n\n\t\t// check dimensions\n   \t    bool consistent=(psi.size()==size_t(fock1.dim(0)));\n\t\tif ((fock1.ndim()==2) and not (psi.size()==size_t(fock1.dim(1)))) consistent=false;\n\n\t\tif (not consistent) {\n\t\t\tprint(\"Fock matrix dimensions\",fock1.ndim(), fock1.dim(0), fock1.dim(1));\n\t\t\tprint(\"number of orbitals\",psi.size());\n\t\t\tMADNESS_EXCEPTION(\"confused Fock matrix/orbital energies in BSHApply - 1\",1);\n\t\t}\n\n        bool do_coupling=(fock1.ndim()==2);\n\n\t\t// subtract the BSH energy (aka Fock diagonal elements) from the rhs\n\t\t// ( T - fock(i,i) ) psi_i  = -V psi_i + \\sum_{j\\neq i} psi_j fock(j,i)\n\t\t// if there is no level shift and the orbital energies are large enough the\n\t\t// diagonal should simply vanish.\n\t\tif (do_coupling) {\n\t\t\tTensor<T> fock=copy(fock1);\n\t\t\tfor (int i=0; i<fock.dim(0); ++i) {\n\t\t\t\tfock(i,i)-=eps_in_green(fock(i,i));\n\t\t\t}\n\t\t\tif (printme) {\n\t\t\t\tprint(\"coupling fock matrix\");\n\t\t\t\tprint(fock);\n\t\t\t}\n\t\t\treturn transform(world, psi, fock);\n\n\t\t} else  {\n\t\t\tstd::vector<T> eps(psi.size());\n\t\t\tif (fock1.ndim()==1)\n\t\t\t\tfor (int i=0; i<fock1.dim(0); ++i) eps[i]=fock1(i)-eps_in_green(fock1(i));\n\t\t\tif (fock1.ndim()==2)\n\t\t\t\tfor (int i=0; i<fock1.dim(0); ++i) eps[i]=fock1(i,i)-eps_in_green(fock1(i,i));\n\n\t\t\tstd::vector<Function<T,NDIM> > result=copy(world,psi);\n\t\t\tscale(world,result,eps);\n\t\t\treturn result;\n\t\t}\n\n\t}\n\n};\n} // namespace madness\n\n\n#endif /* SRC_APPS_CHEM_BSHAPPLY_H_ */\n"
  },
  {
    "path": "src/madness/chem/CC2.cc",
    "content": "/*\n * CC2.cc\n *\n *  Created on: Aug 17, 2015\n *      Author: kottmanj\n */\n\n\n#include<madness/chem/CC2.h>\n#include<madness/chem/Results.h>\n#include<madness/mra/commandlineparser.h>\n#include \"MolecularOrbitals.h\"\n#include \"localizer.h\"\n#include <timing_utilities.h>\n\n#include \"memory_measurement.h\"\n\nnamespace madness {\n\n/// solve the CC2 ground state equations, returns the correlation energy\nnlohmann::json CC2::solve() {\n    if (parameters.test()) CCOPS.test();\n\n    if (world.rank()==0) {\n        print_header1(\"Starting the correlated treatment\");\n        std::cout << std::fixed << std::setprecision(1) << \"\\nstarting calculation at time \" << wall_time() << std::endl;\n    }\n    const CalcType ctype = parameters.calc_type();\n\n    // fill in results here\n    std::map<std::string,CC2Results> results;\n\n    Tensor<double> fmat=nemo->compute_fock_matrix(nemo->get_calc()->amo,nemo->get_calc()->aocc);\n    long nfrozen=Localizer::determine_frozen_orbitals(fmat);\n    parameters.set_derived_value<long>(\"freeze\",nfrozen);\n    if (not check_core_valence_separation(fmat)) enforce_core_valence_separation(fmat);\n\n    MolecularOrbitals<double, 3> dummy_mo(nemo->get_calc()->amo, nemo->get_calc()->aeps);\n    dummy_mo.print_frozen_orbitals(parameters.freeze());\n    if (world.rank()==0) {\n        std::cout << std::fixed << std::setprecision(1) << \"\\nenforcing core-value separation at time \" << wall_time() << std::endl;\n    }\n\n    CCOPS.reset_nemo(nemo);\n    CCOPS.get_potentials.parameters=parameters;\n    CCOPS.update_intermediates(CCOPS.mo_ket());\n\n    // info keep information on the MOs and the molecular coordinates\n    Info info;\n    info=CCOPS.update_info(parameters,nemo);\n    info.intermediate_potentials=CCIntermediatePotentials(parameters);\n\n    // check if all pair functions have been loaded or computed\n    auto all_pairs_exist = [](const Pairs<CCPair>& pairs) {\n        for (const auto& p : pairs.allpairs) {\n            if (p.second.functions.size()==0) return false;\n            if (not p.second.function().is_initialized()) return false;\n            if (not p.second.constant_part.is_initialized()) return false;\n        }\n        return true;\n    };\n\n    // doubles for ground state\n    Pairs<CCPair> mp2pairs, cc2pairs;\n    // singles for ground state\n    CC_vecfunction cc2singles(PARTICLE);\n\n    // Pairs structure to vector if necessary\n    const std::size_t nfreeze=parameters.freeze();\n    const int nocc=CCOPS.mo_ket().size();\n    triangular_map=PairVectorMap::triangular_map(nfreeze,nocc);\n\n    double mp2_energy=0.0, cc2_energy=0.0, mp3_energy=0.0;\n\n    bool need_tdhf=parameters.response();\n    bool need_mp2=(ctype==CT_MP2 or ctype==CT_CISPD or ctype==CT_ADC2 or ctype==CT_MP3);\n    bool need_cc2=(ctype==CT_LRCC2 or ctype==CT_CC2);\n\n    // check for restart data for CC2, otherwise use MP2 as guess\n    if (need_cc2) {\n        initialize_pairs(cc2pairs, GROUND_STATE, CT_CC2, cc2singles, CC_vecfunction(RESPONSE), 0, info);\n        if (not all_pairs_exist(cc2pairs)) need_mp2=true;\n    }\n\n    if (need_tdhf) {\n        tdhf->prepare_calculation();\n        MADNESS_CHECK(tdhf->get_parameters().freeze()==parameters.freeze());\n        auto roots=tdhf->solve_cis();\n        tdhf->analyze(roots);\n    }\n\n    if (need_mp2) {\n        bool restarted=initialize_pairs(mp2pairs, GROUND_STATE, CT_MP2, CC_vecfunction(PARTICLE), CC_vecfunction(RESPONSE), 0, info);\n        if (restarted and parameters.no_compute_mp2()) {\n            mp2_energy=compute_mp2_energy(mp2pairs,info,\"MP2 correlation energy\");\n        } else {\n            mp2_energy = solve_mp2_coupled(mp2pairs, info);\n            output_calc_info_schema(\"mp2\",mp2_energy);\n            output.section(assign_name(CT_MP2) + \" Calculation Ended !\");\n            if (world.rank() == 0) {\n                printf_msg_energy_time(\"MP2 correlation energy\",mp2_energy,wall_time());\n\t        }\n        }\n        CC2Results mp2results(parameters.freeze(),\"mp2\");\n        mp2results.set_energies(nemo->get_calc()->current_energy, mp2_energy);\n        results[\"mp2\"]=mp2results;\n    }\n\n    if (need_cc2) {\n        if (world.rank()==0) print_header2(\"computing the CC2 correlation energy\");\n        // check if singles or/and doubles to restart are there\n        cc2singles=initialize_singles(world,CT_CC2, PARTICLE);\n\n        // use mp2 as cc2 guess\n        if (not all_pairs_exist(cc2pairs)) {\n            if (world.rank()==0) print(\"could not find CC2 pairs -- using MP2 as guess\");\n            for (auto& tmp:mp2pairs.allpairs) {\n                const size_t i = tmp.second.i;\n                const size_t j = tmp.second.j;\n                cc2pairs(i, j).update_u(tmp.second.function());\n            }\n        }\n\n        if (parameters.no_compute_cc2()) {\n            if (world.rank()==0) print(\"found no_compute_cc2 key -- no recomputation of singles or doubles or energy\");\n            cc2_energy = compute_cc2_energy(cc2singles, cc2pairs, info, \"CC2 correlation energy\");\n        } else {\n            cc2_energy = solve_cc2(cc2singles, cc2pairs, info);\n            output_calc_info_schema(\"cc2\",cc2_energy);\n        }\n\n        if (world.rank() == 0) {\n            printf_msg_energy_time(\"CC2 correlation energy\",cc2_energy,wall_time());\n            std::cout << std::fixed << std::setprecision(10) << \" CC2 Correlation Energy =\" << cc2_energy << \"\\n\";\n        }\n\n        CC2Results cc2results(parameters.freeze(),\"cc2\");\n        cc2results.set_energies(nemo->get_calc()->current_energy, cc2_energy);\n        results[\"cc2\"]=cc2results;\n        if (world.rank()==0) print_header2(\"end computing the CC2 correlation energy\");\n    }\n\n    if (ctype == CT_LRCCS) {\n        ;   // we're good\n    } else if (ctype == CT_MP2) {\n        ;   // we're good\n    } else if (ctype == CT_MP3) {\n        mp2_energy=compute_mp2_energy(mp2pairs, info, \"MP2 correlation energy\");\n        mp3_energy=compute_mp3(mp2pairs, info);\n        double hf_energy=nemo->get_calc()->current_energy;\n        if (world.rank()==0) {\n            printf_msg_energy_time(\"MP3 energy contribution\",mp3_energy,wall_time());\n            printf(\"final hf/mp2/mp3/total energy %12.8f %12.8f %12.8f %12.8f\\n\",\n                    hf_energy,mp2_energy,mp3_energy,hf_energy+mp2_energy+mp3_energy);\n            output_calc_info_schema(\"mp3\",mp3_energy);\n        }\n        CC2Results mp3results(parameters.freeze(),\"mp3\");\n        mp3results.set_energies(nemo->get_calc()->current_energy+ mp2_energy,mp3_energy);\n        results[\"mp3\"]=mp3results;\n\n    } else if (ctype == CT_CC2) {\n        ;   // we're good\n    } else if (ctype == CT_CISPD) {\n        CCTimer time(world, \"whole CIS(D) Calculation\");\n\n        auto vccs = solve_ccs();\n\n        CCTimer time_cispd(world, \"Time CIS(D) Response\");\n        std::vector<std::pair<double, double> > cispd_results;\n\n        for (size_t k = 0; k < parameters.excitations().size(); k++) {\n\n            CC_vecfunction& ccs = vccs[k];\n            const size_t excitation = parameters.excitations()[k];\n            CCTimer time_ex(world, \"CIS(D) for Excitation \" + std::to_string(int(excitation)));\n\n            // check the convergence of the cis function (also needed to store the ccs potential) and to recalulate the excitation energy\n            iterate_ccs_singles(ccs, info);\n\n            Pairs<CCPair> cispd;\n            initialize_pairs(cispd, EXCITED_STATE, CT_CISPD, CC_vecfunction(PARTICLE), ccs, excitation, info);\n\n            const double ccs_omega = ccs.omega;\n            const double cispd_omega = solve_cispd(cispd, mp2pairs, ccs);\n\n            cispd_results.push_back(std::make_pair(ccs_omega, cispd_omega));\n            time_ex.info();\n        }\n\n        output.section(\"CIS(D) Calculation Ended\");\n        for (size_t i = 0; i < cispd_results.size(); i++) {\n            if (world.rank() == 0) {\n                std::cout << std::fixed << std::setprecision(10) << \"\\n\"\n                          << \"--------------------------------\\n\"\n                          << \"Excitation \" << parameters.excitations()[i] << \"\\n\"\n                          << \"CIS   =\" << cispd_results[i].first << \"\\n\"\n                          << \"CIS(D)=\" << cispd_results[i].second << \"\\n\"\n                          << \"Delta =\" << cispd_results[i].second - cispd_results[i].first << \"\\n\"\n                          << \"--------------------------------\\n\";\n            }\n        }\n        time_cispd.info();\n        time.info();\n\n    } else if (ctype == CT_ADC2) {\n        // we will never need the GS singles, but we use the CC2 potential functions so we initialize all gs singles potentials to zero\n        CCOPS.update_intermediates(\n                CC_vecfunction(zero_functions<double, 3>(world, CCOPS.get_active_mo_ket().size()), PARTICLE,\n                               parameters.freeze()));\n        output.section(\"ADC(2) Calculation\");\n        CCTimer time(world, \"Whole ADC(2) Calculation\");\n\n        auto vccs = solve_ccs();\n\n        CCTimer time_ex(world, \"ADC(2) Calculation\");\n        output.section(\"ADC(2): Calculating ADC(2) Correction to CIS\");\n        std::vector<std::vector<double> > adc2_results;\n        for (size_t k = 0; k < parameters.excitations().size(); k++) {\n\n            CC_vecfunction& ccs = vccs[k];\n            const size_t excitation = parameters.excitations()[k];\n            CCTimer time_ex(world, \"ADC(2) for Excitation \" + std::to_string(int(excitation)));\n\n            // check the convergence of the cis function (also needed to store the ccs potential) and to recalulate the excitation energy\n            CC_vecfunction dummy = copy(ccs);\n            iterate_ccs_singles(dummy, CCOPS.info);\n            ccs.omega = dummy.omega; // will be overwritten soon\n            output(\"Changes not stored!\");\n\n            Pairs<CCPair> xpairs;\n            const bool restart = initialize_pairs(xpairs, EXCITED_STATE, CT_ADC2, CC_vecfunction(PARTICLE), ccs, excitation, CCOPS.info);\n\n            // if no restart: Calculate CIS(D) as first guess\n            const double ccs_omega = ccs.omega;\n            double cispd_omega = 0.0;\n            if (not restart) {\n                output.section(\"No Restart-Pairs found: Calculating CIS(D) as first Guess\");\n                Pairs<CCPair> cispd;\n                initialize_pairs(cispd, EXCITED_STATE, CT_CISPD, CC_vecfunction(PARTICLE), ccs, excitation, CCOPS.info);\n                cispd_omega = solve_cispd(cispd, mp2pairs, ccs);\n                for (auto& tmp:cispd.allpairs) {\n                    const size_t i = tmp.first.first;\n                    const size_t j = tmp.first.second;\n                    xpairs(i, j).update_u(cispd(i, j).function());\n                }\n            }\n\n            iterate_adc2_singles(mp2pairs, ccs, xpairs, CCOPS.info);\n            for (size_t iter = 0; iter < 10; iter++) {\n                bool dconv = iterate_adc2_pairs(xpairs, ccs);\n                bool sconv = iterate_adc2_singles(mp2pairs, ccs, xpairs, CCOPS.info);\n                if (sconv and dconv) {\n                    output(\"ADC(2) Converged\");\n                    break;\n                } else output(\"Not yet converged\");\n            }\n\n            output.section(\"ADC(2) For Excitation \" + std::to_string(int(excitation)) + \" ended\");\n            const double adc2_omega = ccs.omega;\n            std::vector<double> resulti;\n            resulti.push_back(ccs_omega);\n            resulti.push_back(cispd_omega);\n            resulti.push_back(adc2_omega);\n            adc2_results.push_back(resulti);\n            if (world.rank() == 0)\n                std::cout << std::fixed << std::setprecision(10)\n                          << std::setfill(' ') << std::setw(12) << \"CIS\" << std::setw(12) << \"CIS(D)\" << std::setw(12)\n                          << \"ADC(2)\" << \"\\n\"\n                          << ccs_omega << \", \" << cispd_omega << \", \" << adc2_omega << \"\\n\";\n\n\n            time_ex.info();\n        }\n\n        output.section(\"ADC(2) Ended!\");\n        if (world.rank() == 0)\n            std::cout << std::fixed << std::setprecision(10)\n                      << std::setfill(' ') << std::setw(12) << \"CIS\" << std::setw(12) << \"CIS(D)\" << std::setw(12)\n                      << \"ADC(2)\" << \"\\n\";\n        for (size_t i = 0; i < adc2_results.size(); i++) {\n            if (world.rank() == 0)\n                std::cout << std::fixed << std::setprecision(10)\n                          << adc2_results[i][0] << \", \" << adc2_results[i][1] << \", \" << adc2_results[i][2] << \"\\n\";\n        }\n\n\n        time_ex.info();\n\n        time.info();\n    } else if (ctype == CT_LRCC2) {\n        CCTimer time(world, \"Whole LRCC2 Calculation\");\n\n        // if (world.rank() == 0) print_header3(\"reiterating CCS\");\n        auto vccs = solve_ccs();\n        // iterate_ccs_singles(vccs[0], info);\n        // if (world.rank() == 0) print_header3(\"end reiterating CCS\");\n\n        // for solving the LRCC2 equations we need converged CC2 singles and the applied potential\n        bool need_reiterate_cc2=(cc2singles.size()==0)\n                or (not info.intermediate_potentials.potential_exists(cc2singles, POT_singles_));\n        if (need_reiterate_cc2) {\n            if (world.rank()==0) print_header3(\"reiterating CC2 singles for intermediate potentials\");\n            // print_header1(\"skipping reiteration of CC2 singles for the potential\");\n            iterate_cc2_singles(world, cc2singles, cc2pairs, info);\n            if (world.rank()==0) print_header3(\"end reiterating CC2 singles\");\n        }\n\n\n        for (size_t iexcitation = 0; iexcitation < vccs.size(); iexcitation++) {\n            if (world.rank() == 0)\n                print_header1(\"Solving LRCC2 for excitation \" + std::to_string(iexcitation)\n                    + \" with omega \" + std::to_string(vccs[iexcitation].omega));\n            auto [a,b,c] = solve_lrcc2(cc2pairs,cc2singles,vccs[iexcitation],iexcitation,info);\n            CISResults::excitation_info exinfo;\n            exinfo.omega = c;\n            results[\"cc2\"].excitations.push_back(exinfo);\n       }\n\n    } else MADNESS_EXCEPTION((\"Unknown Calculation Type: \" + assign_name(ctype)).c_str(), 1);\n    print(\"results of the CC2 calculation\");\n    for (auto& res:results) {\n        print(res.first,\": \",res.second.to_json());\n    }\n    // turn map into json vector\n    nlohmann::json results_json;\n    results_json[\"tasks\"] = nlohmann::json::array();\n    for (const auto& res:results) {\n        results_json[\"tasks\"].push_back(res.second.to_json());\n    }\n    return results_json[\"tasks\"];\n\n}\n\nvoid CC2::output_calc_info_schema(const std::string model, const double& energy) const {\n    if (world.rank()==0) {\n        nlohmann::json j;\n        j[\"model\"]=model;\n        j[\"driver\"]=\"energy\";\n        j[\"return_energy\"]=energy;\n        j[model]=energy;\n        update_schema(nemo->get_calc_param().prefix()+\".calc_info\", j);\n    }\n}\n\n\nbool CC2::check_core_valence_separation(const Tensor<double>& fmat) const {\n\n    MolecularOrbitals<double, 3> mos(nemo->get_calc()->amo, nemo->get_calc()->aeps, {}, nemo->get_calc()->aocc, {});\n    mos.recompute_localize_sets();\n    return Localizer::check_core_valence_separation(fmat, mos.get_localize_sets(),true);\n}\n\n\nTensor<double> CC2::enforce_core_valence_separation(const Tensor<double>& fmat) {\n\n    if (nemo->get_calc_param().localize_method()==\"canon\") {\n        auto nmo=nemo->get_calc()->amo.size();\n        Tensor<double> fmat1(nmo,nmo);\n        for (size_t i=0; i<nmo; ++i) fmat1(i,i)=nemo->get_calc()->aeps(i);\n        return fmat1;\n    }\n\n    Localizer localizer(world,nemo->get_calc()->aobasis,nemo->get_calc()->molecule,nemo->get_calc()->ao);\n    localizer.set_enforce_core_valence_separation(true).set_method(nemo->get_calc_param().localize_method());\n    localizer.set_metric(nemo->R);\n\n    Tensor<double> fock = copy(fmat);\n    MolecularOrbitals<double,3> lmo;\n\n    // localization can be noisy -- to avoid unnecessary program crashes we try to localize the orbitals several times\n    for (int i=0; i<3; ++i) {\n        MolecularOrbitals<double, 3> mos(nemo->get_calc()->amo, nemo->get_calc()->aeps, {}, nemo->get_calc()->aocc, {});\n        mos.recompute_localize_sets();\n        lmo=localizer.localize(mos,fock,i==0);\n\n        // recompute fock matrix -- should be block diagonal\n        // need to write orbitals back for recalculating the Fock matrix\n        nemo->get_calc()->amo=lmo.get_mos();\n        nemo->get_calc()->aeps=lmo.get_eps();\n        MADNESS_CHECK(size_t(nemo->get_calc()->aeps.size())==nemo->get_calc()->amo.size());\n        fock = nemo->compute_fock_matrix(nemo->get_calc()->amo, nemo->get_calc()->aocc);\n\n        bool success=Localizer::check_core_valence_separation(fock,lmo.get_localize_sets());\n        if (success) {\n            if (world.rank()==0) print(\"localization succeeded\");\n            break;\n        } else {\n            if (world.rank()==0) print(\"localization failed, retrying\");\n        }\n    }\n\n    if (world.rank() == 0  and parameters.debug() and nemo->get_calc_param().nalpha() < 10) {\n        print(\"localized fock matrix\");\n        print(fock);\n    }\n\n    MADNESS_CHECK(Localizer::check_core_valence_separation(fock,lmo.get_localize_sets()));\n\n    return fock;\n\n};\n\n// Solve the CCS equations for the ground state (debug potential and check HF convergence)\nstd::vector<CC_vecfunction> CC2::solve_ccs() const {\n    std::vector<CC_vecfunction> excitations=tdhf->get_converged_roots();\n\n    // return only those functions which are demanded\n    std::vector<CC_vecfunction> result;\n    for (const auto& x:parameters.excitations()) {\n        if (int(excitations.size()) - 1 < int(x))\n            MADNESS_EXCEPTION(\"Not Enough CIS Vectors to solve for the demanded CC2 vector\", 1);\n        result.push_back(excitations[x]);\n    }\n    // if (world.rank()==0) print_header3(\"Solution of the CCS equations\");\n    // tdhf->analyze(result);\n    return result;\n}\n\ndouble CC2::solve_mp2_coupled(Pairs<CCPair>& doubles, Info& info) {\n\n    if (world.rank()==0) print_header2(\" computing the MP1 wave function\");\n    CC_vecfunction dummy_singles(PARTICLE);\n\n    // fast return if there are no correlated electrons\n    if (doubles.allpairs.size()==0) {\n        if (world.rank()==0) print(\"no doubles found -- returning zero MP2 energy\");\n        return 0.0;\n    }\n\n    // make vector holding CCPairs for partitioner of MacroTask\n    std::vector<CCPair> pair_vec=Pairs<CCPair>::pairs2vector(doubles,triangular_map);\n\n    // read constant part from file\n    if (parameters.no_compute_mp2_constantpart()) {\n        if (world.rank()==0) print(\"Skipping MP2 constant part calculation\");\n        for (auto& c : pair_vec) {\n            MADNESS_CHECK_THROW(c.constant_part.is_initialized(), \"could not find constant part\");\n            // constant part is zero-order guess for pair.function\n            if (not c.function_exists()) c.update_u(c.constant_part);\n        }\n\n    } else {\n\n        if (world.rank()==0) {\n            std::cout << std::fixed << std::setprecision(1) << \"\\nStarting constant part at time \" << wall_time() << std::endl;\n        }\n        MacroTaskConstantPart t;\n        MacroTask task(world, t);\n        std::vector<Function<double,3>> gs_singles, ex_singles;         // dummy vectors\n        std::vector<real_function_6d> result_vec = task(pair_vec, gs_singles, ex_singles, info) ;\n\n        if (world.rank()==0) {\n            std::cout << std::fixed << std::setprecision(1) << \"\\nFinished constant part at time \" << wall_time() << std::endl;\n            std::cout << std::fixed << std::setprecision(1) << \"\\nStarting saving pairs and energy calculation at time \" << wall_time() << std::endl;\n        }\n        load_balance(world, result_vec);\n\n        // transform vector back to Pairs structure\n        for (size_t i = 0; i < pair_vec.size(); i++) {\n            auto& pair=pair_vec[i];\n            pair.constant_part = result_vec[i];\n            pair.constant_part.truncate().reduce_rank();\n            pair.constant_part.print_size(\"constant_part\");\n\n            // initialize pair function to constant part\n            pair.update_u(pair.constant_part);\n            save(pair.constant_part, pair.name() + \"_const\");\n\n        }\n    }\n\n\n    timer t1_energy(world);\n    double total_energy=compute_mp2_energy(pair_vec,info,\"initial MP2 energy\");\n    t1_energy.end(\"compute energy\");\n\n    auto solver= nonlinear_vector_solver<double,6>(world,pair_vec.size());\n    solver.set_maxsub(parameters.kain_subspace());\n    solver.do_print = (world.rank() == 0);\n\n\n    for (size_t iter = 0; iter < parameters.iter_max_6D(); iter++) {\n        if (world.rank()==0) print_header3(\"Starting iteration \" + std::to_string(int(iter)) + \" of MP2\");\n\n        timer t_iter(world);\n        // compute the coupling between the pair functions\n        Pairs<real_function_6d> coupling=compute_local_coupling(pair_vec, info);\n        auto coupling_vec=Pairs<real_function_6d>::pairs2vector(coupling,triangular_map);\n        if (parameters.debug()) print_size(world, coupling_vec, \"couplingvector\");\n        t_iter.tag(\"compute coupling\");\n\n        MacroTaskIteratePair t;\n        MacroTask task1(world, t);\n        CC_vecfunction dummy_singles1(PARTICLE);\n        const std::size_t maxiter=1;   // this needs to be 1, why??\n        coupling_vec=change_tree_state(coupling_vec, reconstructed);\n        for (auto& p : pair_vec) p.function().reconstruct();\n        auto unew = task1(pair_vec, coupling_vec, dummy_singles1, dummy_singles1, info, maxiter);\n        t_iter.tag(\"compute update\");\n\n        std::vector<real_function_6d> u;\n        for (auto p : pair_vec) u.push_back(p.function());\n        auto residual=truncate(u-unew,parameters.tight_thresh_6D());\n\n        // some statistics\n        auto [rmsrnorm, maxrnorm]=CCPotentials::residual_stats(residual);\n\n        if (parameters.debug()) {\n            CCSize sz;\n            sz.add(u);\n            sz.print(world,\"size of u\");\n            print_size(world,u,\"u\");\n\n            sz.add(unew,residual,pair_vec,coupling_vec);\n            for (const auto& r : solver.get_rlist()) sz.add(r);\n            for (const auto& uu : solver.get_ulist()) sz.add(uu);\n            sz.print(world,\"sizes before KAIN\");\n            task1.get_taskq()->cloud.print_size(world);\n        }\n        // update the pair functions\n        std::string use_kain;\n        if (parameters.kain()) {\n            use_kain=\"with KAIN\";\n            std::vector<real_function_6d> kain_update = solver.update(u, residual);\n            MADNESS_CHECK_THROW(solver.get_rlist()[0][0].is_reconstructed(),\"solver functions are not reconstructed\");\n            MADNESS_CHECK_THROW(solver.get_ulist()[0][0].is_reconstructed(),\"solver functions are not reconstructed\");\n            truncate(kain_update);\n            for (size_t i=0; i<pair_vec.size(); ++i) {\n                kain_update[i].reduce_rank();\n                if (parameters.debug()) kain_update[i].print_size(\"Kain-Update-Function\");\n                pair_vec[i].update_u(kain_update[i]);\n            }\n        } else {\n            use_kain=\"without KAIN\";\n            truncate(unew);\n            for (size_t i=0; i<pair_vec.size(); ++i)  pair_vec[i].update_u(unew[i]);\n        }\n        t_iter.tag(\"update pairs \"+use_kain);\n\n        // calculate energy and error and update pairs\n        double old_energy = total_energy;\n        for (auto& p : pair_vec) p.reconstruct();\n        total_energy=compute_mp2_energy(pair_vec,info);\n        t_iter.tag(\"compute energy\");\n\n\t\tif (world.rank()==0) {\n\t\t    double delta=old_energy - total_energy;\n\t\t    CCPotentials::print_convergence(\"MP2 doubles\",rmsrnorm,maxrnorm,delta,iter);\n\t\t\tprintf(\"finished MP2 iteration %2d at time %8.1fs with energy  %12.8f\\n\",\n\t\t\t\t\tint(iter), wall_time(), total_energy);\n\t\t}\n\n        bool converged = ((std::abs(old_energy - total_energy) < parameters.econv())\n                          and (maxrnorm < parameters.dconv_6D()));\n\n        // save latest iteration\n        if (world.rank()==0) print(\"saving latest iteration of MP2 to file\"+pair_vec.front().basename()+\"_XX\");\n        for (const auto& pair : pair_vec) {\n            save(pair.constant_part, pair.name() + \"_const\");\n            save(pair.function(), pair.name());\n        }\n        MemoryMeasurer::measure_and_print(world);\n        //print pair energies if converged\n        if (converged) {\n            if (world.rank() == 0) std::cout << \"\\nPairs converged!\\n\";\n            break;\n        }\n    }\n    if (world.rank()==0) {\n        std::cout << std::fixed << std::setprecision(1) << \"\\nFinished final energy calculation at time \" << wall_time() << std::endl;\n        print_header2(\"end computing the MP1 wave function\");\n    }\n\n    doubles=Pairs<CCPair>::vector2pairs(pair_vec,triangular_map);\n    return total_energy;\n}\n\n\n/// add the coupling terms for local MP2\n\n/// @return \\sum_{k\\neq i} f_ki |u_kj> + \\sum_{l\\neq j} f_lj |u_il>\nPairs<real_function_6d> CC2::compute_local_coupling(const Pairs<real_function_6d>& pairs, const Info& info) {\n\n    const int nmo = info.mo_ket.size();\n    World& world=pairs.allpairs.begin()->second.world();\n\n    // temporarily make all N^2 pair functions\n    typedef std::map<std::pair<int, int>, real_function_6d> pairsT;\n    pairsT quadratic;\n    for (int k = info.parameters.freeze(); k < nmo; ++k) {\n        for (int l = info.parameters.freeze(); l < nmo; ++l) {\n            if (l >= k) {\n                quadratic[std::make_pair(k, l)] = pairs(k, l);\n            } else {\n                quadratic[std::make_pair(k, l)] = swap_particles(pairs(l, k));\n            }\n        }\n    }\n\n    // for (auto& q: quadratic) q.second.compress(false);\n    // world.gop.fence();\n\n    // the coupling matrix is the Fock matrix, skipping diagonal elements\n    // Tensor<double> fock1 = nemo->compute_fock_matrix(nemo->get_calc()->amo, nemo->get_calc()->aocc);\n    Tensor<double> fock1 = copy(info.fock);\n    for (int k = 0; k < nmo; ++k) {\n        if (fock1(k, k) > 0.0) MADNESS_EXCEPTION(\"positive orbital energies\", 1);\n        fock1(k, k) = 0.0;\n    }\n\n    Pairs<real_function_6d> coupling;\n    for (int i = info.parameters.freeze(); i < nmo; ++i) {\n        for (int j = i; j < nmo; ++j) {\n            coupling.insert(i, j, real_factory_6d(world));\n        }\n    }\n\n    for (int i = info.parameters.freeze(); i < nmo; ++i) {\n        for (int j = i; j < nmo; ++j) {\n            for (int k = info.parameters.freeze(); k < nmo; ++k) {\n                if (fock1(k, i) != 0.0) {\n                    coupling(i, j).gaxpy(1.0, quadratic[std::make_pair(k, j)], fock1(k, i), false);\n                }\n            }\n\n            for (int l = info.parameters.freeze(); l < nmo; ++l) {\n                if (fock1(l, j) != 0.0) {\n                    coupling(i, j).gaxpy(1.0, quadratic[std::make_pair(i, l)], fock1(l, j), false);\n                }\n            }\n            world.gop.fence();\n            const double thresh = FunctionDefaults<6>::get_thresh();\n            coupling(i, j).truncate(thresh * 0.1).reduce_rank();\n        }\n    }\n    world.gop.fence();\n    for (auto& q: coupling.allpairs) q.second.reconstruct(false);\n    world.gop.fence();\n    return coupling;\n}\n\ndouble\nCC2::solve_cispd(Pairs<CCPair>& cispd, const Pairs<CCPair>& mp2, const CC_vecfunction& ccs) {\n    output.section(\"Solve CIS(D) for CIS Excitation energy \" + std::to_string(double(ccs.omega)));\n    MADNESS_ASSERT(ccs.type == RESPONSE);\n    CCOPS.update_intermediates(ccs);\n\n    for (auto& pairs:cispd.allpairs) {\n        CCPair& pair = pairs.second;\n        pair.bsh_eps = CCOPS.get_epsilon(pair.i, pair.j) + ccs.omega;\n        if (size_t(parameters.only_pair().first) == pair.i and size_t(parameters.only_pair().second) == pair.j) {\n            output(\"Found only_pair exception\");\n            update_constant_part_cispd(ccs, pair);\n            iterate_pair(pair, ccs);\n        } else if (parameters.no_compute_cispd()) output(\"Found no_compute_cispd key\");\n        else {\n            update_constant_part_cispd(ccs, pair);\n            iterate_pair(pair, ccs);\n        }\n        // test consitency of the two approaches\n        if (parameters.debug() and parameters.thresh_6D() > 1.e-4)\n            CCOPS.test_pair_consistency(pair.functions[0], pair.i, pair.j, ccs);\n    }\n\n    const double diff = CCOPS.compute_cispd_energy(ccs, mp2, cispd);\n    CC_vecfunction empty(zero_functions<double, 3>(world, ccs.size()), PARTICLE, parameters.freeze());\n    const double omega_cc2 = CCOPS.compute_cc2_excitation_energy(empty, ccs, mp2, cispd);\n    output.section(\"CIS(D) Calculation for CIS Excitation \" + std::to_string(double(ccs.omega)) + \" ended\");\n    if (world.rank() == 0) {\n        std::cout << std::fixed << std::setprecision(10)\n                  << \"CIS   =\" << ccs.omega << \"\\n\"\n                  << \"CIS(D)=\" << ccs.omega + diff << \"\\n\"\n                  << \"Diff  =\" << diff\n                  << \"\\nomega_cc2 =\" << omega_cc2 << \"\\n\\n\\n\";\n    }\n\n    return ccs.omega + diff;\n}\n\nbool\nCC2::iterate_adc2_pairs(Pairs<CCPair>& cispd, const CC_vecfunction& ccs) {\n    output.section(\"Solve ADC(2) for Excitation energy \" + std::to_string(double(ccs.omega)));\n    MADNESS_ASSERT(ccs.type == RESPONSE);\n    CCOPS.update_intermediates(ccs);\n\n    bool conv = true;\n    for (auto& pairs:cispd.allpairs) {\n        CCPair& pair = pairs.second;\n        pair.bsh_eps = CCOPS.get_epsilon(pair.i, pair.j) + ccs.omega;\n        update_constant_part_adc2(ccs, pair);\n        conv = iterate_pair(pair, ccs);\n    }\n\n    return conv;\n}\n\nbool\nCC2::iterate_lrcc2_pairs(World& world, const CC_vecfunction& cc2_s,\n                         const CC_vecfunction lrcc2_s, Pairs<CCPair>& lrcc2_d, const Info& info) {\n    // output.section(\"Solve LRCC2 for Excitation energy \" + std::to_string(double(lrcc2_s.omega)));\n    if (world.rank()==0) {\n        print_header3(\"Solving LRCC2 doubles equations\");\n        print(\"starting at time \",wall_time());\n        print(\"using macrotasks with redirected output\");\n    }\n    MADNESS_ASSERT(lrcc2_s.type == RESPONSE);\n\n    auto triangular_map=PairVectorMap::triangular_map(info.parameters.freeze(),info.mo_ket.size());\n    auto pair_vec=Pairs<CCPair>::pairs2vector(lrcc2_d,triangular_map);\n\n    for (auto& p: pair_vec) p.reconstruct();\n    info.reconstruct();\n    cc2_s.reconstruct();\n    lrcc2_s.reconstruct();\n\n    // make new constant part\n    MacroTaskConstantPart tc;\n    MacroTask task(world, tc);\n    auto cp = task(pair_vec, cc2_s.get_vecfunction(), lrcc2_s.get_vecfunction(), info) ;\n    print_size(world,cp,\"constant part in iter\");\n\n    for (size_t i=0; i<pair_vec.size(); ++i) {\n        pair_vec[i].constant_part=cp[i];\n        save(pair_vec[i].constant_part, pair_vec[i].name() + \"_const\");\n    }\n\n    // if no function has been computed so far use the constant part (first iteration)\n    // for (auto& pair : pair_vec) if (not pair.function_exists()) pair.update_u(pair.constant_part);\n    for (auto& pair : pair_vec) if (not pair.function_exists()) pair.update_u(real_factory_6d(world));\n\n    for (const auto& p : pair_vec) p.constant_part.print_size(\"constant_part before iter\");\n    for (const auto& p : pair_vec) p.function().print_size(\"u before iter\");\n\n    // compute the coupling between the pair functions\n    if (world.rank()==0) print(\"computing local coupling in the universe\");\n    Pairs<real_function_6d> coupling=compute_local_coupling(pair_vec, info);\n    auto coupling_vec=Pairs<real_function_6d>::pairs2vector(coupling,triangular_map);\n    reconstruct(world,coupling_vec);\n    for (auto& p : pair_vec) p.reconstruct();\n\n    if (info.parameters.debug()) print_size(world, coupling_vec, \"couplingvector\");\n\n    if (info.parameters.debug()) {\n        CCSize sz;\n        sz.add(pair_vec,coupling_vec);\n        sz.print(world,\"sizes before KAIN\");\n    }\n    // iterate the pair\n    MacroTaskIteratePair t1;\n    MacroTask task1(world, t1);\n    // temporary fix: create dummy functions to that the cloud is not confused\n    // real_function_6d tmp=real_factory_6d(world).functor([](const coord_6d& r){return 0.0;});\n    // std::vector<real_function_6d> vdummy_6d(pair_vec.size(),tmp);         // dummy vectors\n    const std::size_t maxiter=1;\n    auto unew = task1(pair_vec, coupling_vec, cc2_s, lrcc2_s, info, maxiter);\n\n    for (const auto& u : unew) u.print_size(\"u after iter\");\n    // get some statistics\n    std::vector<Function<double,6>> uold;\n    for (const auto & p : pair_vec) uold.push_back(p.function());\n    auto residual=uold-unew;\n    double nold=norm2(world,uold);\n    double nnew=norm2(world,unew);\n    print(\"norm(old), norm(new) \",nold,nnew);\n    auto [rmsrnorm, rmsrmax] = CCPotentials::residual_stats(residual);\n    if (world.rank()==0) CCPotentials::print_convergence(\"LRCC2 doubles\",rmsrnorm, rmsrmax,0,0);\n\n    // update the pair functions\n    reconstruct(world,unew);        // saves a lot of memory!\n    for (size_t i=0; i<pair_vec.size(); ++i) pair_vec[i].update_u(unew[i]);\n    lrcc2_d=Pairs<CCPair>::vector2pairs(pair_vec,triangular_map);\n\n    // save latest iteration\n    if (world.rank()==0) print(\"saving latest iteration of LRCC2 to file\");\n    for (const auto& pair : pair_vec) {\n        save(pair.constant_part, pair.name() + \"_const\");\n        save(pair.function(), pair.name());\n    }\n\n    return (rmsrnorm<info.parameters.dconv_6D());\n}\n\ndouble CC2::compute_cc2_energy(const CC_vecfunction& singles, const Pairs<CCPair>& pairs, const Info& info,\n    const std::string msg) {\n    auto triangular_map=PairVectorMap::triangular_map(info.parameters.freeze(),info.mo_ket.size());\n    const auto& pair_vec = Pairs<CCPair>::pairs2vector(pairs,triangular_map);\n    return CC2::compute_cc2_energy(singles,pair_vec,info,msg);\n}\n\ndouble CC2::compute_cc2_energy(const CC_vecfunction& singles, const std::vector<CCPair>& pair_vec,\n    const Info& info, const std::string msg) {\n\n    World& world=pair_vec.front().world();\n    for (const auto& p : pair_vec) p.reconstruct();\n\n    MacroTaskComputeCorrelationEnergy t;\n    MacroTask task1(world, t);\n\n    auto pair_energies=task1(pair_vec, singles, info);\n    // pair_energies is now scattered over the universe\n\n    double total_energy=0.0;\n    for ( auto& pair_energy : pair_energies) {\n        double pe=pair_energy.get();\n        total_energy += pe;\n        if (world.rank()==0 and info.parameters.debug()) printf(\"pair energy for pair %12.8f\\n\", pe);\n    }\n    // pair_energy.get() invokes a broadcast from rank 0 to all other ranks\n\n    if (not msg.empty() and world.rank()==0) printf_msg_energy_time(msg, total_energy, wall_time());\n    return total_energy;\n}\n\ndouble CC2::compute_mp2_energy(const Pairs<CCPair>& pairs, const Info& info, const std::string msg) {\n    CC_vecfunction dummy_singles(PARTICLE);\n    return compute_cc2_energy(dummy_singles, pairs, info, msg);\n}\n\ndouble CC2::compute_mp2_energy(const std::vector<CCPair>& pairs, const Info& info, const std::string msg) {\n    CC_vecfunction dummy_singles(PARTICLE);\n    return compute_cc2_energy(dummy_singles, pairs, info, msg);\n}\n\ndouble\nCC2::solve_cc2(CC_vecfunction& singles, Pairs<CCPair>& doubles, Info& info) const\n{\n\n    output.section(\"Solving CC2 Ground State\");\n    if (singles.size()==0) singles=initialize_singles_to_zero(world,CT_CC2, PARTICLE, info);\n\n    MADNESS_ASSERT(singles.type == PARTICLE);\n    CCTimer time(world, \"CC2 Ground State\");\n\n    if (world.rank()==0) print(\"computing CC2 energy\");\n    double omega = CCPotentials::compute_cc2_correlation_energy(world, singles, doubles, info, \"initial CC2 energy\");\n\n    CC_vecfunction ex_singles_dummy;\n\n    // first singles iteration\n    output.section(\"Initialize Singles to the Doubles\");\n\n    // given the doubles, we can solve the singles equations\n    iterate_cc2_singles(world, singles, doubles, info);\n    omega = CCPotentials::compute_cc2_correlation_energy(world, singles, doubles, info, \"CC2 energy with converged singles\");\n\n    for (size_t iter = 0; iter < parameters.iter_max(); iter++) {\n        CCTimer time_miter(world, \"Macroiteration \" + std::to_string(int(iter)) + \" of CC2\");\n        output.section(\"Macroiteration \" + std::to_string(int(iter)) + \" of CC2\");\n\n        if (world.rank()==0) print(\"computing the constant part via macrotasks -- output redirected\");\n        timer timer1(world);\n\n        std::vector<CCPair> pair_vec=Pairs<CCPair>::pairs2vector(doubles,triangular_map);\n        for (auto& p : pair_vec) p.reconstruct();\n        MacroTaskConstantPart t;\n        MacroTask task(world, t);\n        std::vector<real_function_6d> constant_part_vec = task(pair_vec, singles.get_vecfunction(),\n            ex_singles_dummy.get_vecfunction(), info) ;\n        for (size_t i=0; i<pair_vec.size(); ++i) pair_vec[i].constant_part=constant_part_vec[i];\n\n        if (parameters.debug()) {\n            for (auto& pair: pair_vec) pair.constant_part.print_size(\"size of constant part macrotask \"+pair.name());\n        }\n\n        timer1.tag(\"computing constant part via macrotasks\");\n\n\n        // compute the coupling between the pair functions\n        if (world.rank()==0) print(\"computing local coupling in the universe\");\n        Pairs<real_function_6d> coupling=compute_local_coupling(pair_vec, info);\n        auto coupling_vec=Pairs<real_function_6d>::pairs2vector(coupling,triangular_map);\n        timer1.tag(\"computing local coupling\");\n\n        if (world.rank()==0) print(\"update the pair functions via macrotasks -- output redirected\");\n        MacroTaskIteratePair t1;\n        MacroTask task1(world, t1);\n        CC_vecfunction dummy_ex_singles;\n        std::vector<real_function_3d> vdummy_3d;         // dummy vectors\n        const std::size_t maxiter=1;\n        for (auto& p : pair_vec) p.reconstruct();\n        for (auto& p : coupling_vec) p.reconstruct();\n        info.reconstruct();\n        auto unew = task1(pair_vec, coupling_vec, singles, dummy_ex_singles,\n            info, maxiter);\n\n\n        std::vector<real_function_6d> u_old;\n        for (auto p : pair_vec) u_old.push_back(p.function());\n\n        auto residual=u_old-unew;\n        timer1.tag(\"computing pair function update via macrotasks\");\n\n        for (size_t i=0; i<pair_vec.size(); ++i) pair_vec[i].update_u(unew[i]);\n        doubles=Pairs<CCPair>::vector2pairs(pair_vec,triangular_map);\n\n        // save latest iteration\n        if (world.rank()==0) print(\"saving latest iteration to file\");\n        for (const auto& pair : pair_vec) {\n            pair.reconstruct();\n            save(pair.constant_part, pair.name() + \"_const\");\n            save(pair.function(), pair.name());\n            singles.save_restartdata(world,CC2::singles_name(CT_CC2,singles.type));\n        }\n        timer1.tag(\"saving cc2 singles and doubles\");\n\n        auto [rmsrnorm,maxrnorm]=CCPotentials::residual_stats(residual);\n        bool doubles_converged=maxrnorm<parameters.dconv_6D();\n\n        // check if singles converged\n        const bool singles_converged = iterate_cc2_singles(world, singles, doubles, info);\n        timer1.tag(\"computing cc2 singles\");\n\n        // check if energy converged\n        const double omega_new = CCPotentials::compute_cc2_correlation_energy(world, singles, doubles, info);\n        timer1.tag(\"computing cc2 energy\");\n        const double delta = omega_new - omega;\n        const bool omega_converged(delta < parameters.econv());\n        omega = omega_new;\n        if (world.rank() == 0)\n            std::cout << std::fixed << std::setprecision(10) << \"Current Correlation Energy = \" << omega << \"\\n\";\n        if (world.rank() == 0)\n            std::cout << std::fixed << std::setprecision(10) << \"Difference                  = \" << delta << \"\\n\";\n\n        if (world.rank()==0) {\n            CCPotentials::print_convergence(\"CC2\",rmsrnorm,maxrnorm,delta,iter);\n            printf(\"finished CC2 iteration %2d at time %8.1fs with energy  %12.8f\\n\",\n                    int(iter), wall_time(), omega);\n        }\n        if (doubles_converged and singles_converged and omega_converged) break;\n\n        time_miter.info();\n    }\n    omega = CCPotentials::compute_cc2_correlation_energy(world, singles, doubles, info);\n    output.section(\"CC2 Iterations Eneded\");\n\n    if (world.rank() == 0)\n        std::cout << std::fixed << std::setprecision(10) << \"Current Correlation Energy = \" << omega << \"\\n\";\n    time.info();\n    return omega;\n\n}\n\n\n/// solve the excited state LR-CC2 equations for a given excitation\n\n/// @param[in] gs_doubles: the ground state doubles\n/// @param[in] gs_singles: the ground state singles\n/// @param[in] cis: the CIS singles\n/// @param[in] excitation: the excitation number\n/// @return a tuple with the excited state doubles, the excited state singles and the excitation energy\nstd::tuple<Pairs<CCPair>, CC_vecfunction, double>\nCC2::solve_lrcc2(Pairs<CCPair>& gs_doubles, const CC_vecfunction& gs_singles, const CC_vecfunction& cis,\n    const std::size_t excitation, Info& info) const {\n\n    CCTimer time(world, \"Whole LRCC2 Calculation\");\n\n    /// read LRCC2 singles from file or use the CIS vectors as guess\n    auto ex_singles=initialize_singles(world,CT_LRCC2,RESPONSE, excitation);\n    bool found_singles=(not (ex_singles.get_vecfunction().empty()));\n    // if (not found_singles) {\n        if (world.rank()==0) print(\"using CIS vectors as guess for the LRCC2 singles\");\n        ex_singles = copy(cis);\n        iterate_ccs_singles(ex_singles, info);\n\n        std::string filename=singles_name(CT_LRCC2,ex_singles.type,excitation);\n        if (world.rank()==0) print(\"saving singles to disk\",filename);\n        ex_singles.save_restartdata(world,filename);\n    // }\n\n    Pairs<CCPair> ex_doubles;\n    bool found_lrcc2d = initialize_pairs(ex_doubles, EXCITED_STATE, CT_LRCC2, gs_singles, ex_singles, excitation, info);\n\n    if ((not found_singles) and found_lrcc2d) {\n        iterate_lrcc2_singles(world, gs_singles, gs_doubles, ex_singles, ex_doubles, info);\n\n        std::string filename1=singles_name(CT_LRCC2,ex_singles.type,excitation);\n        if (world.rank()==0) print(\"saving singles to disk\",filename1);\n        ex_singles.save_restartdata(world,filename1);\n    }\n\n    if (not info.parameters.no_compute_lrcc2()) {\n        for (size_t iter = 0; iter < parameters.iter_max(); iter++) {\n            if (world.rank()==0) print_header2(\"Macroiteration \" + std::to_string(int(iter)) + \" of LRCC2 for excitation energy \"+std::to_string(ex_singles.omega));\n\n            bool dconv = iterate_lrcc2_pairs(world, gs_singles, ex_singles, ex_doubles, info);\n            bool sconv = iterate_lrcc2_singles(world, gs_singles, gs_doubles, ex_singles, ex_doubles, info);\n\n            std::string filename=singles_name(CT_LRCC2,ex_singles.type,excitation);\n            if (world.rank()==0) print(\"saving singles to disk\",filename);\n            ex_singles.save_restartdata(world,filename);\n\n\t\t    if (world.rank()==0) {\n\t\t        // double delta=old_energy - total_energy;\n\t\t        // CCPotentials::print_convergence(\"MP2 doubles\",rmsrnorm,maxrnorm,delta,iter);\n\t\t    \tprintf(\"finished LRCC2 iteration %2d at time %8.1fs with excitation energy  %12.8f\\n\",\n\t\t    \t\t\tint(iter), wall_time(), ex_singles.omega);\n\t\t    }\n\n            if (sconv and dconv) break;\n        }\n    }\n\n    // std::tuple<Pairs<CCPair>, CC_vecfunction, double>\n\n    auto result=std::make_tuple(ex_doubles, ex_singles, ex_singles.omega);\n\n    const double omega_cc2 = ex_singles.omega;\n\n    std::vector<std::pair<std::string, std::pair<double, double>>> timings;\n    std::vector<std::pair<std::string, std::pair<double, double>>> results_ex;\n\n    const std::string msg = \"Excitation \" + std::to_string(int(excitation));\n    results_ex.push_back(std::make_pair(msg, std::make_pair(cis.omega, omega_cc2)));\n\n\n    timings.push_back(std::make_pair(\"Whole LRCC2\", time.current_time(true)));\n    output.section(\"LRCC2 Finished\");\n\n    output(\"Response Results:\");\n    for (const auto& res : results_ex) {\n        output << std::scientific << std::setprecision(10) << std::setw(20);\n\n        output << assign_name(CT_LRCCS)+\" excitation energy for root \"\n            << std::fixed << std::setprecision(1) << excitation << \": \"\n            << std::fixed << std::setprecision(10) << res.second.first << \" Eh         \"\n            << res.second.first * constants::hartree_electron_volt_relationship << \" eV   \"\n            << \"\\n\";\n        output << assign_name(CT_LRCC2)+\" excitation energy for root \"\n            << std::fixed << std::setprecision(1) << excitation << \": \"\n            << std::fixed << std::setprecision(10) << res.second.second << \" Eh         \"\n            << res.second.second * constants::hartree_electron_volt_relationship << \" eV   \"\n            << \"\\n\";\n        output << std::scientific;\n    }\n    output(\"\\nTimings\");\n    for (const auto& time : timings) {\n        if (world.rank() == 0)\n            std::cout << std::scientific << std::setprecision(2)\n                << std::setfill(' ') << std::setw(15) << time.first\n                << \": \" << time.second.first << \" (Wall), \" << time.second.second << \" (CPU)\" << \"\\n\";\n    }\n\n    return result;\n};\n\nbool CC2::iterate_pair(CCPair& pair, const CC_vecfunction& singles) const {\n    output.section(\"Iterate Pair \" + pair.name());\n    if (pair.ctype == CT_CC2) MADNESS_ASSERT(singles.type == PARTICLE);\n    if (pair.ctype == CT_CISPD) MADNESS_ASSERT(singles.type == RESPONSE);\n    if (pair.ctype == CT_MP2) MADNESS_ASSERT(singles.get_vecfunction().empty());\n    if (pair.ctype == CT_ADC2)MADNESS_ASSERT(singles.type == RESPONSE);\n\n    real_function_6d constant_part = pair.constant_part;\n    constant_part.truncate().reduce_rank();\n    pair.function().truncate().reduce_rank();\n\n    output.subsection(\"Converge pair \" + pair.name() + \" on constant singles potential\");\n\n    double bsh_eps = pair.bsh_eps; //CCOPS.get_epsilon(pair.i,pair.j)+omega;\n    real_convolution_6d G = BSHOperator<6>(world, sqrt(-2.0 * bsh_eps), parameters.lo(), parameters.thresh_bsh_6D());\n    G.destructive() = true;\n\n    NonlinearSolverND<6> solver(parameters.kain_subspace());\n    solver.do_print = (world.rank() == 0);\n\n    bool converged = false;\n\n    double omega = 0.0;\n    Info info;\n    info.mo_bra=CCOPS.mo_bra_.get_vecfunction();\n    info.parameters=parameters;\n    if (pair.type == GROUND_STATE) omega = CCOPS.compute_pair_correlation_energy(world, pair,singles, info);\n    if (pair.type == EXCITED_STATE) omega = CCOPS.compute_excited_pair_energy(world, pair, singles, info);\n\n    if (world.rank() == 0)\n        std::cout << \"Correlation Energy of Pair \" << pair.name() << \" =\" << std::fixed << std::setprecision(10)\n                  << omega << \"\\n\";\n\n    for (size_t iter = 0; iter < parameters.iter_max_6D(); iter++) {\n        output.subsection(assign_name(pair.ctype) + \"-Microiteration\");\n        CCTimer timer_mp2(world, \"MP2-Microiteration of pair \" + pair.name());\n\n\n        CCTimer timer_mp2_potential(world, \"MP2-Potential of pair \" + pair.name());\n        real_function_6d mp2_potential = -2.0 * CCOPS.fock_residue_6d(pair);\n        if (parameters.debug()) mp2_potential.print_size(assign_name(pair.ctype) + \" Potential\");\n        mp2_potential.truncate().reduce_rank();\n        timer_mp2_potential.info(true, mp2_potential.norm2());\n\n        CCTimer timer_G(world, \"Apply Greens Operator on MP2-Potential of pair \" + pair.name());\n        const real_function_6d GVmp2 = G(mp2_potential);\n        timer_G.info(true, GVmp2.norm2());\n\n        CCTimer timer_addup(world, \"Add constant parts and update pair \" + pair.name());\n        real_function_6d unew = GVmp2 + constant_part;\n        unew.print_size(\"unew\");\n        unew = CCOPS.apply_Q12t(unew, CCOPS.mo_ket());\n        unew.print_size(\"Q12unew\");\n        //unew.truncate().reduce_rank(); // already done in Q12 application at the end\n        if (parameters.debug())unew.print_size(\"truncated-unew\");\n        const real_function_6d residue = pair.function() - unew;\n        const double error = residue.norm2();\n        if (parameters.kain()) {\n            output(\"Update with KAIN\");\n            real_function_6d kain_update = copy(solver.update(pair.function(), residue));\n            kain_update = CCOPS.apply_Q12t(kain_update, CCOPS.mo_ket());\n            kain_update.truncate().reduce_rank();\n            kain_update.print_size(\"Kain-Update-Function\");\n            pair.update_u(copy(kain_update));\n        } else {\n            output(\"Update without KAIN\");\n            pair.update_u(unew);\n        }\n\n        timer_addup.info(true, pair.function().norm2());\n\n        double omega_new = 0.0;\n        double delta = 0.0;\n        if (pair.type == GROUND_STATE) omega_new = CCOPS.compute_pair_correlation_energy(world, pair, singles, info);\n        else if (pair.type == EXCITED_STATE) omega_new = CCOPS.compute_excited_pair_energy(world, pair, singles, info);\n        delta = omega - omega_new;\n\n        const double current_norm = pair.function().norm2();\n\n        omega = omega_new;\n        if (world.rank() == 0) {\n            std::cout << std::fixed\n                      << std::setw(50) << std::setfill('#')\n                      << \"\\n\" << \"Iteration \" << iter << \" of pair \" << pair.name()\n                      << std::setprecision(4) << \"||u|| = \" << current_norm\n                      << \"\\n\" << std::setprecision(10) << \"error = \" << error << \"\\nomega = \" << omega << \"\\ndelta = \"\n                      << delta << \"\\n\"\n                      << std::setw(50) << std::setfill('#') << \"\\n\";\n        }\n\n\n        output(\"\\n--Iteration \" + stringify(iter) + \" ended--\");\n        save(pair.function(), pair.name());\n        timer_mp2.info();\n        if (fabs(error) < parameters.dconv_6D()) {\n            output(pair.name() + \" converged!\");\n            if (fabs(delta) < parameters.econv_pairs()) {\n                converged = true;\n                break;\n            } else output(\"Energy not yet converged\");\n        } else output(\"Convergence for pair \" + pair.name() + \" not reached yet\");\n    }\n\n    return converged;\n}\n\n\nbool CC2::iterate_singles(World& world, CC_vecfunction& singles, const CC_vecfunction singles2,\n    const Pairs<CCPair>& gs_doubles, const Pairs<CCPair>& ex_doubles, const CalcType ctype, const std::size_t maxiter,\n    Info& info) {\n    CCMessenger output(world);\n    if (world.rank()==0) print_header2(\"Iterating Singles for \"+assign_name(ctype));\n    CCTimer time_all(world, \"Overall Iteration of \" + assign_name(ctype) + \"-Singles\");\n    if (singles.size()==0) singles=initialize_singles_to_zero(world,ctype, singles.type, info);\n\n    // consistency checks\n    switch (ctype) {\n    case CT_CC2:\n        if (singles.type != PARTICLE)\n            output.warning(\"iterate_singles: CC2 demanded but singles are not of type PARTICLE\");\n        break;\n    case CT_MP2: MADNESS_EXCEPTION(\"Demanded Singles Calculation for MP2 ????\", 1);\n        break;\n    case CT_LRCC2:\n        if (singles.type != RESPONSE or singles2.type != PARTICLE)\n            output.warning(\"iterate_singles: CC2_response_ singles have wrong types\");\n        break;\n    case CT_LRCCS:\n        if (singles.type != RESPONSE)\n            output.warning(\"iterate_singles: CCS_response_ singles have wrong types\");\n        break;\n    case CT_CISPD: MADNESS_EXCEPTION(\"Demanded Singles Calculation for CIS(D)\", 1);\n        break;\n    case CT_ADC2:\n        MADNESS_ASSERT(singles.type == RESPONSE);\n        break;\n    case CT_TEST: MADNESS_EXCEPTION(\"Iterate Singles not implemented for Experimental calculation\", 1);\n        break;\n    default: MADNESS_EXCEPTION(\n            (\"Unknown calculation type in iterate singles: \" + assign_name(ctype)).c_str(), 1);\n    }\n\n    CC_vecfunction old_singles(singles);\n    for (auto& tmp : singles.functions)\n        old_singles(tmp.first).function = copy(tmp.second.function);\n    double old_omega=0.0;\n\n    for (auto& p : gs_doubles.allpairs) p.second.reconstruct();\n    for (auto& p : ex_doubles.allpairs) p.second.reconstruct();\n    info.reconstruct();\n\n    // KAIN solver\n    typedef vector_function_allocator<double, 3> allocT;\n    typedef XNonlinearSolver<std::vector<Function<double, 3> >, double, allocT> solverT;\n    solverT solver(allocT(world, singles.size()));\n    solver.do_print = ((world.rank() == 0) and info.parameters.debug());\n\n    if (info.parameters.debug()) print_size(world, singles.get_vecfunction(), \"singles before iter\");\n\n    for (size_t iter = 0; iter < maxiter; iter++) {\n        double omega = 0.0;\n        if (ctype == CT_LRCC2) omega = singles.omega;\n        else if (ctype == CT_LRCCS) omega = singles.omega;\n        else if (ctype == CT_ADC2) omega = singles.omega;\n        if ((world.rank()==0) and info.parameters.debug()) print(\"omega \" ,omega);\n\n        // get potentials using macrotasks\n        CCTimer time_V(world, assign_name(ctype) + \"-Singles Potential\");\n        vector_real_function_3d V;\n        if (ctype == CT_CC2)\n            V = CCPotentials::get_CC2_singles_potential_gs(world, singles, gs_doubles, info);\n        else if (ctype == CT_LRCC2)\n            V = CCPotentials::get_CC2_singles_potential_ex(world, singles2, gs_doubles, singles, ex_doubles, info);\n        else if (ctype == CT_LRCCS)\n            V = CCPotentials::get_CCS_potential_ex(world,singles,false, info);\n        else if (ctype == CT_ADC2)\n            V = CCPotentials::get_ADC2_singles_potential(world, gs_doubles, singles, ex_doubles, info);\n        else MADNESS_EXCEPTION(\"iterate singles: unknown type\", 1);\n\n        if (info.parameters.debug()) madness::print_size(world, V, \"final V in iterate_singles w/o coupling\");\n\n        // add local coupling\n        V-=compute_local_coupling(singles.get_vecfunction(),info);\n        truncate(world, V);\n        time_V.info(info.parameters.debug(), norm2(world, V));\n\n        if (info.parameters.debug()) madness::print_size(world, V, \"final V in iterate_singles with coupling\");\n\n        // update excitation energy\n        if (ctype==CT_LRCC2 or ctype==CT_LRCCS or ctype==CT_ADC2) {\n            old_omega=omega;\n            omega = CCPotentials::compute_cis_expectation_value(world, singles, V, info.parameters.debug(), info);\n            singles.omega = omega;\n        }\n        if (world.rank()==0 and info.parameters.debug())\n            print(\"omega entering the update in the singles\" ,omega);\n\n        // make bsh operators\n        scale(world, V, -2.0); // moved to BSHApply\n        std::vector<std::shared_ptr<SeparatedConvolution<double, 3> > > G(singles.size());\n        for (size_t i = 0; i < G.size(); i++) {\n            const double bsh_eps = info.orbital_energies[i + info.parameters.freeze()] + omega;\n            G[i] = std::shared_ptr<SeparatedConvolution<double, 3> >(\n                BSHOperatorPtr3D(world, sqrt(-2.0 * bsh_eps), info.parameters.lo(), info.parameters.thresh_bsh_3D()));\n        }\n        world.gop.fence();\n\n        // apply bsh operators\n        CCTimer time_applyG(world, \"Apply G-Operators\");\n        vector_real_function_3d GV = apply<SeparatedConvolution<double, 3>, double, 3>(world, G, V);\n        world.gop.fence();\n        time_applyG.info(info.parameters.debug());\n\n        // apply Q-Projector to result\n        QProjector<double,3> Q(info.mo_bra,info.mo_ket);\n        GV = Q(GV);\n\n        // Normalize Singles if it is excited state\n        if (ctype == CT_LRCCS or ctype == CT_LRCC2 or ctype == CT_ADC2) {\n            if (info.parameters.debug()) print(\"Normalizing new singles\");\n            const double norm=inner(GV,info.R_square*GV);\n            scale(world, GV, 1.0 / norm);\n        } else {\n            if (info.parameters.debug()) print(\"Singles not normalized\");\n        }\n\n        // residual\n        const vector_real_function_3d residual = sub(world, singles.get_vecfunction(), GV);\n\n        // information\n        const Tensor<double> R2xinnerx = inner(world, info.R_square*singles.get_vecfunction(),\n                                               singles.get_vecfunction());\n        const Tensor<double> R2GVinnerGV = inner(world, info.R_square*GV, GV);\n        const Tensor<double> R2rinnerr = inner(world, info.R_square*residual, residual);\n        //const double R2vector_error = sqrt(R2rinnerr.sum());\n        auto [rmsresidual, maxresidual]=CCPotentials::residual_stats(residual);\n\n        // print information\n        if (info.parameters.debug() and (world.rank()==0)) {\n            std::cout << \"\\n\\n-----Results of current interation:-----\\n\";\n            std::cout << \"\\nName: ||\" << singles.name(0) << \"||, ||GV\" << singles.name(0) << \", ||residual||\" << \"\\n\";\n            std::cout << singles.name(0) << \": \" << std::scientific << std::setprecision(info.parameters.output_prec())\n                << sqrt(R2xinnerx.sum()) << \", \" << sqrt(R2GVinnerGV.sum()) << \", \" << sqrt(R2rinnerr.sum())\n                << \"\\n----------------------------------------\\n\";\n            for (size_t i = 0; i < GV.size(); i++) {\n                std::cout << singles(i + info.parameters.freeze()).name() << \": \" << std::scientific\n                    << std::setprecision(info.parameters.output_prec())\n                    << sqrt(R2xinnerx(i)) << \", \" << sqrt(R2GVinnerGV(i)) << \", \" << sqrt(R2rinnerr(i))\n                    << \"\\n\";\n            }\n            std::cout << \"\\n----------------------------------------\\n\\n\";\n        }\n\n        // make second order update (only for response)\n        if (ctype == CT_LRCC2 or ctype == CT_LRCCS) {\n            double Rtmp = inner(world, info.R_square*residual, V).sum();\n            double Rtmp2 = inner(world, info.R_square*GV, GV).sum();\n            const double Rdelta = (0.5 * Rtmp / Rtmp2);\n            if (info.parameters.debug() and (world.rank() == 0)) std::cout << \"omega, second-order update (FYI): \" << std::fixed\n                << std::setprecision(info.parameters.output_prec() + 2) << omega << \", \" << Rdelta << \"\\n\\n\";\n        }\n\n        // update singles\n        singles.omega = omega;\n        vector_real_function_3d new_singles = truncate(GV);\n        if (info.parameters.kain()) new_singles = solver.update(singles.get_vecfunction(), residual);\n        if (info.parameters.debug()) print_size(world, new_singles, \"new_singles\");\n        // if (ctype == CT_LRCCS or ctype == CT_LRCC2 or ctype == CT_ADC2) Nemo::normalize(new_singles, info.R);\n        // if (info.parameters.debug()) print_size(world, new_singles, \"new_singles normalized\");\n        reconstruct(world,new_singles);\n\n        for (size_t i = 0; i < GV.size(); i++) {\n            singles(i + info.parameters.freeze()).function = copy(new_singles[i]);\n        }\n\n        // update regularization terms of the doubles\n        // -- not necessary here as the regularization terms are updated in the macrotasks..\n        // if (ctype==CT_CC2) update_reg_residues_gs(world, singles,gs_doubles, info);\n        // else if(ctype==CT_LRCC2) update_reg_residues_ex(world, singles2,singles,ex_doubles, info);\n\n        if (world.rank()==0) CCPotentials::print_convergence(singles.name(0),rmsresidual,\n                                                             maxresidual,omega-old_omega,iter);\n        // print out the size of all functions in here\n        if (info.parameters.debug()) {\n            CCSize sz;\n\n            auto triangular_map=PairVectorMap::triangular_map(info.parameters.freeze(),info.mo_ket.size());\n            auto vec1=Pairs<CCPair>::pairs2vector(gs_doubles,triangular_map);\n            auto vec2=Pairs<CCPair>::pairs2vector(ex_doubles,triangular_map);\n\n            sz.add(residual,GV,new_singles,singles.get_vecfunction(),singles.get_vecfunction(),singles2.get_vecfunction(),vec1,vec2);\n            for (const auto& r : solver.get_rlist()) sz.add(r);\n            for (const auto& uu : solver.get_ulist()) sz.add(uu);\n            sz.print(world,\"sizes at the end of iter\");\n        }\n        // time.info();\n        bool converged = ((std::abs(omega - old_omega) < info.parameters.econv())\n                          and (maxresidual < info.parameters.dconv_6D()));\n        if (converged) break;\n        if (ctype == CT_LRCCS) break; // for CCS just one iteration to check convergence\n    } // end of iterations\n\n    if (world.rank()==0) print_header2(\"Singles iterations ended\");\n    time_all.info();\n\n    // Assign the overall changes\n    bool no_change = true;\n    for (auto& tmp : singles.functions) {\n        const double change = (tmp.second.function - old_singles(tmp.first).function).norm2();\n        tmp.second.current_error = change;\n        if (change > info.parameters.dconv_3D()) no_change = false;\n    }\n\n    if (info.parameters.debug() and (world.rank() == 0)) {\n        std::cout << \"Change in Singles functions after all the Microiterations\" << std::endl;\n        for (auto& tmp : singles.functions)\n            std::cout << \"Change of \" << tmp.second.name() << \" = \" << tmp.second.current_error << std::endl;\n    }\n\n    // update regularization terms of the doubles\n    // -- not necessary here as the regularization terms are updated in the macrotasks..\n    // if (ctype == CT_CC2) update_reg_residues_gs(world, singles, gs_doubles, info);\n    // else if (ctype == CT_LRCC2) update_reg_residues_ex(world, singles2, singles, ex_doubles, info);\n\n    if (no_change) output(\"Change of Singles was below  = \" + std::to_string(info.parameters.dconv_3D()) + \"!\");\n\n    return no_change;\n}\n\nCC_vecfunction\nCC2::initialize_singles(World& world, const CalcType& ctype, const FuncType type, const int ex) {\n\n    MADNESS_CHECK_THROW((type==PARTICLE) or (ex>=0), \"Invalid type/excitation combination in initialize_singles\");\n    std::string fname=singles_name(ctype,type,ex);\n    if (world.rank()==0) print(\"initializing singles from file:\",fname);\n    CC_vecfunction singles(type);\n    try {\n        singles=CC_vecfunction::load_restartdata(world,fname);\n        if (world.rank()==0) print(\" .. singles found on file\");\n    } catch (...) {\n        if (world.rank()==0) print(\" .. singles not found on file\");\n    }\n\n    return singles;\n}\n\nCC_vecfunction\nCC2::initialize_singles_to_zero(World& world, const CalcType& ctype, const FuncType type, const Info& info) {\n    CC_vecfunction singles(type);\n    for (size_t i = info.parameters.freeze(); i < info.mo_ket.size(); i++) {\n        real_function_3d tmpi = real_factory_3d(world);\n        CCFunction<double,3> single_i(tmpi, i, type);\n        singles.insert(i,single_i);\n    }\n    return singles;\n}\n\n\nbool\nCC2::initialize_pairs(Pairs<CCPair>& pairs, const CCState ftype, const CalcType ctype,\n            const CC_vecfunction& gs_singles, const CC_vecfunction& ex_singles,\n            const size_t excitation, const Info& info) const {\n\n    MADNESS_ASSERT(gs_singles.type == PARTICLE);\n    MADNESS_ASSERT(ex_singles.type == RESPONSE);\n    MADNESS_ASSERT(pairs.empty());\n\n    auto builder=CCPairBuilder(world,info);\n    builder.set_gs_singles(gs_singles).set_ex_singles(ex_singles).set_ctype(ctype);\n\n    std::string name1 = CCPair(0, 0, ftype, ctype).name();\n    if (world.rank()==0) print(\"initializing doubles\",assign_name(ftype), \" --- reading from file(s)\",name1);\n\n    for (size_t i = parameters.freeze(); i < CCOPS.mo_ket().size(); i++) {\n        for (size_t j = i; j < CCOPS.mo_ket().size(); j++) {\n            CCPair pair=builder.make_bare_pair_from_file(i,j);\n            pairs.insert(i, j, pair);\n        }\n    }\n    // it's a restarted calculation if all pairs are found on disk\n    bool restarted=std::all_of(pairs.allpairs.begin(),pairs.allpairs.end(),\n        [](const auto& datum){return datum.second.functions.size()>0 && datum.second.function().is_initialized();});\n\n    return restarted;\n}\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/CC2.h",
    "content": "/*\n * CC2.h\n *\n *  Created on: Aug 17, 2015\n *      Author: kottmanj\n */\n\n#ifndef CC2_H_\n#define CC2_H_\n\n#include<madness/chem/projector.h>\n#include<madness/chem/SCF.h>\n#include<madness/chem/nemo.h>\n#include<madness/chem/CCPotentials.h>\n#include<madness/chem/mp3.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/vmra.h>\n#include <madness/mra/lbdeux.h>\n#include <madness/misc/ran.h>\n#include<madness/chem/TDHF.h>\n#include <madness/mra/nonlinsol.h>\n\n#include \"BSHApply.h\"\n\nnamespace madness {\n\nclass CC2 : public OptimizationTargetInterface, public QCPropertyInterface {\npublic:\n\n    CC2(World& world, const CCParameters& cc_param, const TDHFParameters& tdhf_param,\n        const std::shared_ptr<const Nemo> nemo)\n            : world(world),\n              parameters(cc_param),\n              nemo(nemo),\n              tdhf(new TDHF(world, tdhf_param, nemo)),\n              CCOPS(world, nemo, parameters),\n              output(CCOPS.output) {\n        initialize();\n    }\n\n    CC2(World& world_, const commandlineparser& parser, const std::shared_ptr<Nemo> nemo_)\n            : world(world_),\n              parameters(world_,parser),\n              nemo(nemo_),\n              tdhf(new TDHF(world, parser, nemo)),\n              CCOPS(world, nemo, parameters),\n              output(CCOPS.output) {\n        initialize();\n    }\n\n    void initialize() {\n        output.section(\"CC2 Class has been initialized with the following parameters\");\n        // set the threshholds\n        // Set Protocoll\n        output(\"Set Protocol 3D\");\n        nemo->get_calc()->set_protocol<3>(world, parameters.thresh_3D());\n        output(\"Set Protocol 6D\");\n        nemo->get_calc()->set_protocol<6>(world, parameters.thresh_6D());\n\n        FunctionDefaults<3>::set_thresh(parameters.thresh_3D());\n        FunctionDefaults<6>::set_thresh(parameters.thresh_6D());\n        // Make sure that k is the same in 3d and 6d functions\n        FunctionDefaults<6>::set_k(FunctionDefaults<3>::get_k());\n        // by default SCF sets the truncate_mode to 1\n        FunctionDefaults<3>::set_truncate_mode(3);\n        FunctionDefaults<6>::set_truncate_mode(3);\n        // set initial level to 3 (important to avoid undersampling issues)\n        // the \"real initial level\" is then 2 since the initial level gets substracted by one if refine is true (which is the default)\n        FunctionDefaults<6>::set_initial_level(2);\n        FunctionDefaults<3>::set_initial_level(2);\n        FunctionDefaults<6>::set_special_level(\n                FunctionDefaults<6>::set_length_scale(parameters.dmin(), FunctionDefaults<6>::get_k()));\n        FunctionDefaults<3>::set_special_level(\n                FunctionDefaults<3>::set_length_scale(parameters.dmin(), FunctionDefaults<3>::get_k()));\n        parameters.information(world);\n        parameters.sanity_check(world);\n    }\n\n    virtual ~CC2() {}\n\n\n    double value() {\n        return value(nemo->molecule().get_all_coords());\n    }\n\n    double value(const Tensor<double>& x) {\n        solve();\n        return 0.0;\n    }\n\n    void output_calc_info_schema(const std::string model, const double& energy) const;\n\n\n    std::string name() const {return \"CC2\";};\n\n    static void help() {\n        print_header2(\"help page for CC2\");\n        print(\"The CC2 code computes correlated ground and excited state energies:\\n\");\n        print(\" - MP2 ground state\");\n        print(\" - CC2 ground and excited states\");\n        print(\" - ADC(2) and CIS(D) excited states\\n\");\n        print(\"You need a SCF reference calculation from the nemo program. If there no such calculation can\");\n        print(\"be found CC2 will perform its own. If excited states are requested also a CIS calculation is \");\n        print(\"necessary.\\n\");\n        print(\"Note that for correlated calculations the k parameter must be chosen small, typically k=5 or k=6 \");\n        print(\"because the curse of dimensions make higher k extremely expensive\\n\");\n        print(\"You can print all available calculation parameters by running\\n\");\n        print(\"cc2 --print_parameters\\n\");\n        print(\"You can perform a simple MP2 calculation by running\\n\");\n        print(\"cc2 --geometry=h2o.xyz\\n\");\n        print(\"provided you have an xyz file in your directory.\\n\");\n\n    }\n\n    static void print_parameters() {\n        CCParameters param;\n        print(\"\\ndefault parameters for the cc2 program are\\n\");\n        param.print(\"cc2\",\"end\");\n        print(\"\\n\\nthe molecular geometry must be specified in a separate block:\");\n        Molecule::print_parameters();\n    }\n\n    virtual bool selftest() {\n        return true;\n    };\n    void\n    plot(const real_function_3d& f, const std::string& msg = \"unspecified function\") const {\n        plot_plane(world, f, msg);\n        output(\"Plotted \" + msg);\n    }\n\n    /// The World\n    World& world;\n    /// Structure holds all the parameters used in the CC2 calculation\n    CCParameters parameters;\n    /// The SCF Calculation\n    std::shared_ptr<const Nemo> nemo;\n    /// The excited state cis calculation\n    std::shared_ptr<TDHF> tdhf;\n    /// The CC Operator Class\n    CCPotentials CCOPS;\n    /// Formated Output (same as used in CC2Potentials structure)\n    CCMessenger& output;\n    /// map Pair struct to vector\n    PairVectorMap triangular_map;\n\n    /// solve the CC2 ground state equations, returns the correlation energy\n    nlohmann::json solve();\n\n\n    std::vector<CC_vecfunction>\n    solve_ccs() const;\n\n    /// compute the MP2 correlation energy\n    static double compute_mp2_energy(const Pairs<CCPair>& pairs, const Info& info, const std::string msg=\"\");\n    static double compute_mp2_energy(const std::vector<CCPair>& pairs, const Info& info, const std::string msg=\"\");\n\n    /// compute the CC2 correlation energy\n    static double compute_cc2_energy(const CC_vecfunction& singles, const Pairs<CCPair>& pairs,\n        const Info& info, const std::string msg=\"\");\n    static double compute_cc2_energy(const CC_vecfunction& singles, const std::vector<CCPair>& pairs,\n        const Info& info, const std::string msg=\"\");\n\n    double compute_mp3(const Pairs<CCPair>& mp2pairs, const Info& info) const {\n\n        MP3 mp3(world, info);\n        double mp3_contribution=mp3.mp3_energy_contribution_macrotask_driver(mp2pairs);\n        return mp3_contribution;\n    }\n\n    double\n    solve_cc2(CC_vecfunction& tau, Pairs<CCPair>& u, Info& info) const;\n\n    /// solve the excited state LR-CC2 equations for a given excitation\n\n    /// @param[in] gs_doubles: the ground state doubles\n    /// @param[in] gs_singles: the ground state singles\n    /// @param[in] cis: the CIS singles\n    /// @param[in] excitation: the excitation number\n    /// @return a tuple with the excited state doubles, the excited state singles and the excitation energy\n    std::tuple<Pairs<CCPair>, CC_vecfunction, double>\n    solve_lrcc2(Pairs<CCPair>& gs_doubles, const CC_vecfunction& gs_singles, const CC_vecfunction& cis,\n        const std::size_t excitation, Info& info) const;\n\n    double\n    solve_cispd(Pairs<CCPair>& doubles, const Pairs<CCPair>& mp2_pairs, const CC_vecfunction& cis_singles);\n\n    /// convencience function to iterate the CC2 ground state singles,\n    /// makes the right call on the iterate_singles functions\n    static bool\n    iterate_cc2_singles(World& world, CC_vecfunction& singles, Pairs<CCPair>& doubles, Info& info) {\n        // CCOPS.clear_potentials(singles);\n        info.intermediate_potentials.clear_all();\n        Pairs<CCPair> empty;\n        return iterate_singles(world, singles, CC_vecfunction(RESPONSE), doubles,\n                               empty, CT_CC2, info.parameters.iter_max_3D(), info);\n    }\n\n    bool\n    iterate_adc2_singles(Pairs<CCPair>& mp2, CC_vecfunction& singles, Pairs<CCPair>& x, Info& info) {\n        MADNESS_ASSERT(singles.type == RESPONSE);\n        // CCOPS.clear_potentials(singles);\n        info.intermediate_potentials.clear_response();\n        return iterate_singles(world, singles, CC_vecfunction(UNDEFINED), mp2, x, CT_ADC2, parameters.iter_max_3D(), info);\n    }\n\n    static bool\n    iterate_lrcc2_singles(World& world, const CC_vecfunction& cc2_s, Pairs<CCPair>& cc2_d, CC_vecfunction& lrcc2_s, Pairs<CCPair> lrcc2_d, Info& info) {\n        MADNESS_ASSERT(cc2_s.type == PARTICLE);\n        MADNESS_ASSERT(lrcc2_s.type == RESPONSE);\n        info.intermediate_potentials.clear_response();\n        // CCOPS.clear_potentials(lrcc2_s);\n        return iterate_singles(world, lrcc2_s, cc2_s, cc2_d, lrcc2_d,\n                               CT_LRCC2, info.parameters.iter_max_3D(), info);\n    }\n\n    /// convenience function to iterate the CCS Response singles,\n    /// makes the right call on the iterate_singles functions\n    bool\n    iterate_ccs_singles(CC_vecfunction& x, Info& info) const {\n        Pairs<CCPair> empty;\n        // CCOPS.clear_potentials(x);\n        info.intermediate_potentials.clear_response();\n        return iterate_singles(world, x, CC_vecfunction(PARTICLE), empty, empty, CT_LRCCS, info.parameters.iter_max_3D(), info);\n    }\n\n    /// Iterates the singles equations for CCS, CC2, LRCC2\n    /// The corresponding regulairzation tails of the doubles are updated in every iteration (therefore doubles are not marked as const)\n    /// @param[in] : singles, the singles that are iterated\n    /// @param[in] : singles2, additional set of singles for potential (in LRCC2 this are the Ground State singles)\n    /// @param[in] : gs_doubles, Ground State doubles (Needed for CC2 and LRCC2)\n    /// @param[in] : ex_doubles, Excited State doubles (Needed for LRCC2)\n    /// @param[in] : ctype: the calculation type: CCS, CC2, CC2_response_\n    /// @param[in] : maxiter: maxmial number of iterations\n    /// @param[out]: true if the overall change of the singles is below 10*donv_6D\n    static bool\n    iterate_singles(World& world, CC_vecfunction& singles, const CC_vecfunction singles2, const Pairs<CCPair>& gs_doubles,\n                    const Pairs<CCPair>& ex_doubles, const CalcType ctype, const std::size_t maxiter, Info& info);\n\n    /// return the file name for singles\n    static std::string singles_name(const CalcType& ctype, const FuncType& type, int ex=-1) {\n        std::string fname=assign_name(ctype)+\"_\"+madness::name(type,ex);\n        return fname;\n    }\n\n    /// read singles from file or initialize new ones\n\n    /// type: PARTICLE (cc2) or RESPONSE (lrcc2)\n    /// default_to_zero: if true, initialize with zero functions, otherwise return empty vector\n    /// ex: if type is RESPONSE, the excitation number\n    static CC_vecfunction\n    initialize_singles(World&, const CalcType& ctype, const FuncType type, int ex=-1);\n\n    static CC_vecfunction\n    initialize_singles_to_zero(World& world, const CalcType& ctype, const FuncType type, const Info& info);\n\n    /// read pairs from file or initialize new ones\n    bool initialize_pairs(Pairs<CCPair>& pairs, const CCState ftype, const CalcType ctype, const CC_vecfunction& tau,\n                          const CC_vecfunction& x, const size_t extitation, const Info& info) const;\n\n    /// Iterates a pair of the CC2 doubles equations\n    bool\n    iterate_pair(CCPair& pair, const CC_vecfunction& singles = CC_vecfunction(UNDEFINED)) const;\n\n    bool\n    iterate_adc2_pairs(Pairs<CCPair>& cispd, const CC_vecfunction& ccs);\n\n    static bool\n    iterate_lrcc2_pairs(World& world, const CC_vecfunction& cc2_s, const CC_vecfunction lrcc2_s,\n                        Pairs<CCPair>& lrcc2_d, const Info& info);\n\n    bool update_constant_part_cispd(const CC_vecfunction& ccs, CCPair& pair) {\n        MADNESS_ASSERT(pair.ctype == CT_CISPD);\n        MADNESS_ASSERT(pair.type == EXCITED_STATE);\n        MADNESS_ASSERT(pair.bsh_eps == CCOPS.get_epsilon(pair.i, pair.j) + ccs.omega);\n        if (pair.constant_part.is_initialized()) return false; // the CIS(D) constant part does not change because there is no singles iteration (like MP2)\n        // make screening Operator\n        real_convolution_6d Gscreen = BSHOperator<6>(world, sqrt(-2.0 * pair.bsh_eps), parameters.lo(),\n                                                     parameters.thresh_bsh_6D());\n        Gscreen.modified() = true;\n\n        if (parameters.QtAnsatz()) pair.constant_part = CCOPS.make_constant_part_cispd_Qt(pair, ccs, &Gscreen);\n        else pair.constant_part = CCOPS.make_constant_part_cispd(pair, ccs, &Gscreen);\n        save(pair.constant_part, pair.name() + \"_const\");\n        return true;\n\n    }\n\n    bool update_constant_part_adc2(const CC_vecfunction& ccs, CCPair& pair) {\n        std::cout << assign_name(pair.ctype);\n        MADNESS_ASSERT(pair.ctype == CT_ADC2);\n        MADNESS_ASSERT(pair.type == EXCITED_STATE);\n        MADNESS_ASSERT(pair.bsh_eps == CCOPS.get_epsilon(pair.i, pair.j) + ccs.omega);\n        // make screening Operator\n        real_convolution_6d Gscreen = BSHOperator<6>(world, sqrt(-2.0 * pair.bsh_eps), parameters.lo(),\n                                                     parameters.thresh_bsh_6D());\n        Gscreen.modified() = true;\n\n        if (parameters.QtAnsatz()) pair.constant_part = CCOPS.make_constant_part_cispd_Qt(pair, ccs, &Gscreen);\n        else pair.constant_part = CCOPS.make_constant_part_cispd(pair, ccs, &Gscreen);\n        save(pair.constant_part, pair.name() + \"_const\");\n        return true;\n\n    }\n\n    /// forward to the other function (converting CCPair to real_function)\n    static Pairs<real_function_6d> compute_local_coupling(const std::vector<CCPair> &vpairs, const Info& info) {\n        // create new pairs structure\n        Pairs<CCPair> pairs;\n        for (auto& tmp_pair : vpairs) pairs.insert(tmp_pair.i, tmp_pair.j, tmp_pair);\n        auto ccpair2function = [](const CCPair& a) {return a.function();};\n        return compute_local_coupling(pairs.convert<real_function_6d>(pairs,ccpair2function), info);\n    };\n\n    /// compute the coupling of singles function if orbitals are localized\n\n    /// @return the coupling terms c_i = -\\sum_(j\\neq i) f_ij |\\phi_j>  (for whatever phi is)\n    static std::vector<real_function_3d> compute_local_coupling(const std::vector<real_function_3d>& singles,\n        const Info& info) {\n\n        MADNESS_CHECK_THROW(singles.size()>0,\"compute_local_coupling: singles vector is empty\");\n        World& world=singles.front().world();\n        auto active=Slice(info.parameters.freeze(),-1);\n        Tensor<double> Fact=info.fock(active,active);\n        for (int i=0; i<Fact.dim(0); ++i) Fact(i,i)=0.0;\n        vector_real_function_3d fock_coupling = madness::transform(world, singles, Fact);\n        return fock_coupling;\n    }\n\n    /// add the coupling terms for local MP2\n\n    /// \\sum_{k\\neq i} f_ki |u_kj> + \\sum_{l\\neq j} f_lj |u_il>\n    static Pairs<real_function_6d> compute_local_coupling(const Pairs<real_function_6d>& pairs, const Info& info);\n\n\n    double solve_mp2_coupled(Pairs<CCPair> &doubles, Info& info);\n\n    bool check_core_valence_separation(const Tensor<double>& fmat) const;\n\n    /// make sure the orbitals are block diagonalized\n\n    /// changes the orbitals in member variable nemo\n    /// will throw if the fock matrix is not block diagonal\n    /// @return     the new fock matrix\n    Tensor<double> enforce_core_valence_separation(const Tensor<double>& fmat);\n};\n\n\n} /* namespace madness */\n\n#endif /* CC2_H_ */\n"
  },
  {
    "path": "src/madness/chem/CCLib.hpp",
    "content": "#pragma once\n\n#include <filesystem>\n#include <madness/chem/InputWriter.hpp>\n#include <madness/chem/ParameterManager.hpp>\n\nstruct cc_lib {\n  // -----------------------------------------------------------------------------\n  // Container for structured JSON fragments produced by the workflow\n  // -----------------------------------------------------------------------------\n  static constexpr char const* label() { return \"cc2\"; }\n};  // namespace molresponse_lib\n"
  },
  {
    "path": "src/madness/chem/CCParameters.h",
    "content": "//\n// Created by Florian Bischoff on 04.06.25.\n//\n\n#ifndef CCPARAMETER_H\n#define CCPARAMETER_H\n\n#include <madness/mra/QCCalculationParametersBase.h>\n#include <madness/mra/commandlineparser.h>\n#include <madness/world/world.h>\n\nnamespace madness {\n    /// Calculation Types used by CC2\n    enum CalcType {\n        CT_UNDEFINED, CT_MP2, CT_MP3, CT_CC2, CT_LRCCS, CT_LRCC2, CT_CISPD, CT_ADC2, CT_TDHF, CT_TEST\n    };\n\n    /// Calculation TDHFParameters for CC2 and TDA calculations\n    /// Maybe merge this with calculation_parameters of SCF at some point, or split into TDA and CC\n    struct CCParameters : public QCCalculationParametersBase {\n        static constexpr char const* tag = \"cc2\";\n\n\n        CCParameters() {\n            initialize_parameters();\n        };\n\n        /// copy constructor\n        CCParameters(const CCParameters& other) =default;\n\n        /// ctor reading out the input file\n        CCParameters(World& world, const commandlineparser& parser) {\n            initialize_parameters();\n            read_input_and_commandline_options(world,parser,\"cc2\");\n            set_derived_values();\n        };\n        std::string get_tag() const override {\n            return std::string(tag);\n        }\n\n\n        void initialize_parameters() {\n            double thresh=1.e-3;\n            double thresh_operators=1.e-6;\n            initialize < std::string > (\"calc_type\", \"mp2\", \"the calculation type\", {\"mp2\", \"mp3\", \"cc2\", \"cis\", \"lrcc2\", \"cispd\", \"adc2\", \"test\"});\n            initialize < double > (\"lo\", 1.e-7, \"the finest length scale to be resolved by 6D operators\");\n            initialize < double > (\"dmin\", 1.0, \"defines the depth of the special level\");\n            initialize < double > (\"thresh_6d\", thresh, \"threshold for the 6D wave function\");\n            initialize < double > (\"tight_thresh_6d\", 0.1*thresh, \"tight threshold for the 6D wave function\");\n            initialize < double > (\"thresh_3d\", 0.01*thresh, \"threshold for the 3D reference wave function\");\n            initialize < double > (\"tight_thresh_3d\", 0.001*thresh, \"tight threshold for the 3D reference wave function\");\n            initialize < double > (\"thresh_bsh_3d\", thresh_operators, \"threshold for BSH operators\");\n            initialize < double > (\"thresh_bsh_6d\", thresh_operators, \"threshold for BSH operators\");\n            initialize < double > (\"thresh_poisson\", thresh_operators, \"threshold for Poisson operators\");\n            initialize < double > (\"thresh_f12\", thresh_operators, \"threshold for Poisson operators\");\n            initialize < double > (\"thresh_Ue\", thresh_operators, \"ue threshold\");\n            initialize < double > (\"econv\", thresh, \"overal convergence threshold \");\n            initialize < double > (\"econv_pairs\", 0.1*thresh, \"convergence threshold for pairs\");\n            initialize < double > (\"dconv_3d\", 0.3*thresh, \"convergence for cc singles\");\n            initialize < double > (\"dconv_6d\", 3.0*thresh, \"convergence for cc doubles\");\n            initialize < std::size_t > (\"iter_max\", 10, \"max iterations\");\n            initialize < std::size_t > (\"iter_max_3d\", 10, \"max iterations for singles\");\n            initialize < std::size_t > (\"iter_max_6d\", 10, \"max iterations for doubles\");\n            initialize < std::pair<int, int>> (\"only_pair\", {-1, -1}, \"compute only a single pair\");\n            initialize < bool > (\"restart\", false, \"restart\");\n            initialize < bool > (\"no_compute\", false, \"no compute\");\n            initialize < bool > (\"no_compute_gs\", false, \"no compute\");\n            initialize < bool > (\"no_compute_mp2_constantpart\", false, \"no compute\");\n            initialize < bool > (\"no_compute_response\", false, \"no compute\");\n            initialize < bool > (\"no_compute_mp2\", false, \"no compute\");\n            initialize < bool > (\"no_compute_cc2\", false, \"no compute\");\n            initialize < bool > (\"no_compute_cispd\", false, \"no compute\");\n            initialize < bool > (\"no_compute_lrcc2\", false, \"no compute\");\n            initialize < double > (\"corrfac_gamma\", 1.0, \"exponent for the correlation factor\");\n            initialize < std::size_t > (\"output_prec\", 8, \"for formatted output\");\n            initialize < bool > (\"debug\", false, \"\");\n            initialize < bool > (\"plot\", false, \"\");\n            initialize < bool > (\"kain\", true, \"\");\n            initialize < std::size_t > (\"kain_subspace\", 3, \"\");\n            initialize < long > (\"freeze\", -1, \"number of frozen orbitals: -1: automatic\");\n            initialize < bool > (\"test\", false, \"\");\n            // choose if Q for the constant part of MP2 and related calculations should be decomposed: GQV or GV - GO12V\n            initialize < bool > (\"decompose_Q\", true, \"always true\",{true});\n            // if true the ansatz for the CC2 ground state pairs is |tau_ij> = |u_ij> + Qtf12|titj>, with Qt = Q - |tau><phi|\n            // if false the ansatz is the same with normal Q projector\n            // the response ansatz is the corresponding response of the gs ansatz\n            initialize < bool > (\"QtAnsatz\", true, \"always true\",{true});\n            // a vector containing the excitations which shall be optizmized later (with CIS(D) or CC2)\n            initialize < std::vector<size_t>>\n            (\"excitations\", {}, \"vector containing the excitations\");\n        }\n\n        void set_derived_values();\n\n        CalcType calc_type() const {\n            std::string value = get<std::string>(\"calc_type\");\n            if (value == \"mp2\") return CT_MP2;\n            if (value == \"mp3\") return CT_MP3;\n            if (value == \"cc2\") return CT_CC2;\n            if (value == \"cis\") return CT_LRCCS;\n            if (value == \"lrcc2\") return CT_LRCC2;\n            if (value == \"cispd\") return CT_CISPD;\n            if (value == \"adc2\") return CT_ADC2;\n            if (value == \"test\") return CT_TEST;\n            MADNESS_EXCEPTION(\"faulty CalcType\", 1);\n        }\n\n        bool response() const {return calc_type()==CT_ADC2 or calc_type()==CT_CISPD or calc_type()==CT_LRCC2 or calc_type()==CT_LRCCS;}\n        double lo() const { return get<double>(\"lo\"); }\n\n        double dmin() const { return get<double>(\"dmin\"); }\n\n        double thresh_3D() const { return get<double>(\"thresh_3d\"); }\n\n        double tight_thresh_3D() const { return get<double>(\"tight_thresh_3d\"); }\n\n        double thresh_6D() const { return get<double>(\"thresh_6d\"); }\n\n        double tight_thresh_6D() const { return get<double>(\"tight_thresh_6d\"); }\n\n        double thresh_bsh_3D() const { return get<double>(\"thresh_bsh_3d\"); }\n\n        double thresh_bsh_6D() const { return get<double>(\"thresh_bsh_6d\"); }\n\n        double thresh_poisson() const { return get<double>(\"thresh_poisson\"); }\n\n        double thresh_f12() const { return get<double>(\"thresh_f12\"); }\n\n        double thresh_Ue() const { return get<double>(\"thresh_ue\"); }\n\n        double econv() const { return get<double>(\"econv\"); }\n\n        double econv_pairs() const { return get<double>(\"econv_pairs\"); }\n\n        double dconv_3D() const { return get<double>(\"dconv_3d\"); }\n\n        double dconv_6D() const { return get<double>(\"dconv_6d\"); }\n\n        std::size_t iter_max() const { return get<std::size_t>(\"iter_max\"); }\n\n        std::size_t iter_max_3D() const { return get<std::size_t>(\"iter_max_3d\"); }\n\n        std::size_t iter_max_6D() const { return get<std::size_t>(\"iter_max_6d\"); }\n\n        std::pair<int, int> only_pair() const { return get<std::pair<int, int>>(\"only_pair\"); }\n\n        bool restart() const { return get<bool>(\"restart\"); }\n\n        bool no_compute() const { return get<bool>(\"no_compute\"); }\n\n        bool no_compute_gs() const { return get<bool>(\"no_compute_gs\"); }\n\n        bool no_compute_mp2_constantpart() const { return get<bool>(\"no_compute_mp2_constantpart\"); }\n\n        bool no_compute_response() const { return get<bool>(\"no_compute_response\"); }\n\n        bool no_compute_mp2() const { return get<bool>(\"no_compute_mp2\"); }\n\n        bool no_compute_cc2() const { return get<bool>(\"no_compute_cc2\"); }\n\n        bool no_compute_cispd() const { return get<bool>(\"no_compute_cispd\"); }\n\n        bool no_compute_lrcc2() const { return get<bool>(\"no_compute_lrcc2\"); }\n\n        bool debug() const { return get<bool>(\"debug\"); }\n\n        bool plot() const { return get<bool>(\"plot\"); }\n\n        bool kain() const { return get<bool>(\"kain\"); }\n\n        bool test() const { return get<bool>(\"test\"); }\n\n        bool decompose_Q() const { return get<bool>(\"decompose_q\"); }\n\n        bool QtAnsatz() const { return get<bool>(\"qtansatz\"); }\n\n        std::size_t output_prec() const { return get<std::size_t>(\"output_prec\"); }\n\n        std::size_t kain_subspace() const { return get<std::size_t>(\"kain_subspace\"); }\n\n        long freeze() const { return get<long>(\"freeze\"); }\n\n        std::vector<std::size_t> excitations() const { return get<std::vector<std::size_t>>(\"excitations\"); }\n\n        double gamma() const {return get<double>(\"corrfac_gamma\");}\n\n        /// print out the parameters\n        void information(World& world) const;\n\n        /// check if parameters are set correct\n        void sanity_check(World& world) const;\n\n        void error(World& world, const std::string& msg) const {\n            if (world.rank() == 0)\n                std::cout << \"\\n\\n\\n\\n\\n!!!!!!!!!\\n\\nERROR IN CC_PARAMETERS:\\n    ERROR MESSAGE IS: \" << msg\n                          << \"\\n\\n\\n!!!!!!!!\" << std::endl;\n            MADNESS_EXCEPTION(\"ERROR IN CC_PARAMETERS\", 1);\n        }\n\n        size_t warning(World& world, const std::string& msg) const {\n            if (world.rank() == 0) std::cout << \"WARNING IN CC_PARAMETERS!: \" << msg << std::endl;\n            return 1;\n        }\n\n    };\n} // namespace madness\n\n#endif //CCPARAMETER_H\n"
  },
  {
    "path": "src/madness/chem/CCPotentials.cc",
    "content": "/*\n * CCPotentials.cc\n *\n *  Created on: 4 Jan 2017\n *      Author: kottmanj\n */\n\n#include \"CCPotentials.h\"\n#include \"memory_measurement.h\"\n\n\nnamespace madness {\n\n// some functors used by tests\nstatic double functor_x(const coord_3d& r) { return r[0]; }\n\nstatic double functor_y(const coord_3d& r) { return r[1]; }\n\nstatic double functor_r2(const coord_3d& r) { return (r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); }\n\nCCPotentials::CCPotentials(World& world_,  std::shared_ptr<const Nemo> nemo, const CCParameters& param)\n        : world(world_),\n          nemo_(nemo),\n          parameters(param),\n          corrfac(world, param.gamma(), 1.e-7, nemo->get_calc()->molecule),\n          get_potentials(param),\n          output(world) {\n    g12=std::shared_ptr<CCConvolutionOperator<double,3>>(new CCConvolutionOperator<double,3>(world,OpType::OT_G12,param));\n    f12=std::shared_ptr<CCConvolutionOperator<double,3>>(new CCConvolutionOperator<double,3>(world,OpType::OT_F12,param));\n    output.debug = parameters.debug();\n}\n\nmadness::CC_vecfunction\nCCPotentials::make_mo_bra(const Nemo& nemo) const {\n    vector_real_function_3d tmp = mul(world, nemo.ncf->square(), nemo.get_calc()->amo);\n    set_thresh(world, tmp, parameters.thresh_3D());\n    truncate(world, tmp);\n    reconstruct(world, tmp);\n    CC_vecfunction mo_bra(tmp, HOLE);\n    return mo_bra;\n}\n\nmadness::CC_vecfunction\nCCPotentials::make_mo_ket(const Nemo& nemo) const {\n    vector_real_function_3d tmp = nemo.get_calc()->amo;\n    set_thresh(world, tmp, parameters.thresh_3D());\n    truncate(world, tmp);\n    reconstruct(world, tmp);\n    CC_vecfunction mo_ket(tmp, HOLE);\n    return mo_ket;\n}\n\nstd::vector<double>\nCCPotentials::init_orbital_energies(const Nemo& nemo) const {\n    std::vector<double> eps;\n    if (world.rank() == 0) std::cout << \"SCF Orbital Energies are:\\n\";\n\n    for (size_t i = 0; i < mo_ket_.size(); i++) {\n        eps.push_back(nemo.get_calc()->aeps(i));\n        if (world.rank() == 0) std::cout << nemo.get_calc()->aeps(i);\n    }\n    if (world.rank() == 0) std::cout << \"\\n\" << std::endl;\n\n    return eps;\n}\n\nCCPair CCPotentials::make_pair_mp2(World& world, const real_function_6d& u, const size_t i, const size_t j,\n                                   const Info& info, const bool compute_Q12_f12_ij) {\n    timer t(world, true);\n\n    // first term is the 6d function u, then follows Q12 f12 |ij>\n    std::vector<CCPairFunction<double,6>> functions;\n    functions+=CCPairFunction<double,6>(u);\n\n    // the terms Q12 f12 |ij>\n    if (compute_Q12_f12_ij) {\n        auto phi=info.mo_ket;\n        auto phi_bra=info.mo_bra;\n        StrongOrthogonalityProjector<double,3> Q12(world);\n        Q12.set_spaces(phi_bra,phi,phi_bra,phi);\n        auto f12=CCConvolutionOperatorPtr<double,3>(world,OT_F12,info.parameters);\n        CCPairFunction<double,6> fij(f12, phi[i], phi[j]);\n        std::vector<CCPairFunction<double,6>> tmp=Q12(std::vector<CCPairFunction<double,6>>(1,fij));\n        functions+=tmp;\n    } else {\n        if (world.rank()==0) print(\"skipping the computation of Q12 f12 |ij> in make_pair_mp2\");\n    }\n\n    auto pair=CCPair(i,j,GROUND_STATE,CT_MP2,functions);\n    pair.bsh_eps=get_epsilon(i,j,info);\n    t.end(\"make_pair_mp2\");\n    return pair;\n}\n\nCCPair CCPotentials::make_pair_cc2(World& world, const real_function_6d& u, const CC_vecfunction& gs_singles, const size_t i,\n                                   const size_t j, const Info& info, bool compute_Q12_f12) {\n\n    // first term is the 6d function u, then follows Q12 f12 |t_i t_j>\n    std::vector<CCPairFunction<double,6>> functions;\n    functions+=CCPairFunction<double,6>(u);\n\n    // construct Q12 f12 |ij>\n    if (compute_Q12_f12) {\n        timer t1(world);\n        auto phi=info.mo_ket;\n        auto phi_bra=info.mo_bra;\n        auto t=make_full_t_intermediate(gs_singles,info).get_vecfunction();\n        StrongOrthogonalityProjector<double,3> Q12(world);\n        Q12.set_spaces(phi_bra,t,phi_bra,t);\n\n        auto f12=CCConvolutionOperatorPtr<double,3>(world,OT_F12,info.parameters);\n        CCPairFunction<double,6> fij(f12, t[i], t[j]);\n        std::vector<CCPairFunction<double,6>> tmp=Q12(std::vector<CCPairFunction<double,6>>(1,fij));\n        functions+=tmp;\n        t1.tag(\"make low-rank parts in make_pair_cc2\");\n    } else {\n        if (world.rank()==0) print(\"skipping the computation of Q12 f12 |ij> in make_pair_cc2\");\n    }\n\n    auto pair=CCPair(i,j,GROUND_STATE,CT_CC2,functions);\n    pair.bsh_eps=get_epsilon(i,j,info);\n    return pair;\n}\n\n/// follow eq. (23) of Kottmann, JCTC 13, 5956 (2017)\nCCPair CCPotentials::make_pair_lrcc2(World& world, const CalcType& ctype, const real_function_6d& u,\n    const CC_vecfunction& gs_singles, const CC_vecfunction& ex_singles, const size_t i, const size_t j, const Info& info,\n    const bool compute_Q12_f12) {\n    MADNESS_ASSERT(gs_singles.type == PARTICLE || gs_singles.type == HOLE);\n    MADNESS_ASSERT(ex_singles.type == RESPONSE);\n    MADNESS_ASSERT(ctype == CT_CISPD || ctype == CT_LRCC2 || ctype == CT_ADC2);\n    MADNESS_ASSERT(!(i < size_t(info.parameters.freeze())));\n    MADNESS_ASSERT(!(j < size_t(info.parameters.freeze())));\n\n    typedef CCPairFunction<double,6> cpT;\n    auto functions=std::vector<cpT>(1,cpT(u));\n\n    if (compute_Q12_f12) {\n        timer t1(world);\n        // compute the t intermediates for active orbitals only -- they go into the ansatz\n        const auto t = CC_vecfunction(info.get_active_mo_ket()+gs_singles.get_vecfunction(),MIXED,info.parameters.freeze());\n        MADNESS_ASSERT(t.size() == (info.mo_ket.size()-info.parameters.freeze()));\n\n        // compute the t intermediates for all orbitals -- they go into the projector\n        const CC_vecfunction pt = copy(make_full_t_intermediate(gs_singles,info));\n        MADNESS_ASSERT(pt.size() == info.mo_ket.size());\n\n        auto f12=CCConvolutionOperatorPtr<double,3>(world,OT_F12,info.parameters);\n\n        // set up projectors -- they project out the occupied space from the response pair function\n\n        // dQ12t = -(Qt(1) Ox(2) + Ox(1) Qt(2))      eq. (22) of the excited state paper\n        QProjector<double,3> Qt(info.mo_bra,pt.get_vecfunction());\n        Projector<double,3> Ox(info.get_active_mo_bra(),ex_singles.get_vecfunction());  // this works on active orbitals only\n        auto dQt_1 = outer(Qt,Ox);\n        auto dQt_2 = outer(Ox,Qt);\n\n        StrongOrthogonalityProjector<double,3> Q12t(world); // eq. (21) of the ground state paper\n        Q12t.set_spaces(info.mo_bra,pt.get_vecfunction(),info.mo_bra,pt.get_vecfunction());\n\n\n        auto f_xt=std::vector<cpT>(1,cpT(f12, ex_singles(i), t(j)));\n        auto f_tx=std::vector<cpT>(1,cpT(f12, t(i), ex_singles(j)));\n        auto f_tt=std::vector<cpT>(1,cpT(f12, t(i), t(j)));\n\n        functions+=(Q12t(f_xt) + Q12t(f_tx) - dQt_1(f_tt) -dQt_2(f_tt));     // note the sign change in the last two terms\n        t1.tag(\"make low-rank parts in make_pair_lrcc2\");\n        functions=consolidate(functions);\n        t1.tag(\"consolidate low-rank parts in make_pair_lrcc2\");\n    }\n\n    CCPair pair(i, j, EXCITED_STATE, ctype, functions);\n    MADNESS_ASSERT(ex_singles.omega != 0.0);\n    const double bsh_eps = get_epsilon(i, j, info) + ex_singles.omega;\n    pair.bsh_eps = bsh_eps;\n    return pair;\n}\n\nmadness::CCPair\nCCPotentials::make_pair_gs(const real_function_6d& u, const CC_vecfunction& tau, const size_t i, const size_t j) const {\n    CCTimer time(world, \"make pair u\" + std::to_string(int(i)) + std::to_string(int(j)));\n    MADNESS_ASSERT(tau.type == PARTICLE || tau.type == HOLE);\n    // for  MP2: tau is empty or Hole states, the function will give back mo_ket_\n    // for freeze!=0 the function will give back (mo0,mo1,...,t_freeze,t_freeze+1,...)\n    const CC_vecfunction t = make_t_intermediate(tau,parameters);\n    // functions for the projector\n    CC_vecfunction pt;\n    if (!parameters.QtAnsatz()) pt = mo_ket_;\n    else {\n        pt = make_full_t_intermediate(tau);\n    }\n    std::vector<CCPairFunction<double,6>> functions;\n    CCPairFunction<double,6> u_part(u);\n    functions.push_back(u_part);\n    if (parameters.decompose_Q()) {\n        CCPairFunction<double,6> f_part(f12, t(i), t(j));\n        functions.push_back(f_part);\n        CCPairFunction<double,6> Ot1 = apply_Ot(f_part, pt, 1);\n        CCPairFunction<double,6> Ot2 = apply_Ot(f_part, pt, 2);\n        CCPairFunction<double,6> PQ = apply_Qt(Ot1, pt, 2, 0.5);\n        CCPairFunction<double,6> QP = apply_Qt(Ot2, pt, 1, 0.5);\n        // assign signs\n        PQ.invert_sign();\n        QP.invert_sign();\n        functions.push_back(PQ);\n        functions.push_back(QP);\n    } else {\n        MADNESS_EXCEPTION(\"always use decoposition of Q\",1);\n        // TODO: turn this into separated form, needed (only?) in the energy computation\n        real_function_6d ftt = make_f_xy(t(i), t(j));\n        real_function_6d Qftt = apply_Q12t(ftt, pt);\n        Qftt.truncate();\n        CCPairFunction<double,6> residual(Qftt);\n        functions.push_back(residual);\n    }\n    CalcType ctype = CT_CC2;\n    if (t.type == HOLE) ctype = CT_MP2;\n\n    CCPair pair(i, j, GROUND_STATE, ctype, functions);\n    if (ctype == CT_CC2 && parameters.QtAnsatz()) MADNESS_ASSERT(pt.type == MIXED);\n\n    if (ctype == CT_CC2 && !parameters.QtAnsatz()) MADNESS_ASSERT(pt.type == HOLE);\n\n    if (parameters.decompose_Q()) MADNESS_ASSERT(functions.size() == 4);\n//    else\n//        MADNESS_ASSERT(functions.size() == 2);\n\n    const double bsh_eps = get_epsilon(i, j);\n    pair.bsh_eps = bsh_eps;\n    time.info();\n    return pair;\n}\n\nmadness::CCPair\nCCPotentials::make_pair_ex(const real_function_6d& u, const CC_vecfunction& tau, const CC_vecfunction& x,\n                           const size_t i, const size_t j, const CalcType ctype) const {\n    MADNESS_ASSERT(tau.type == PARTICLE || tau.type == HOLE);\n    MADNESS_ASSERT(x.type == RESPONSE);\n    MADNESS_ASSERT(ctype == CT_CISPD || ctype == CT_LRCC2 || ctype == CT_ADC2);\n    MADNESS_ASSERT(!(i < size_t(parameters.freeze())));\n    MADNESS_ASSERT(!(j < size_t(parameters.freeze())));\n    // for  CIS(D): tau is empty or Hole states, the function will give back mo_ket_\n    // for freeze!=0 the function will give back (mo0,mo1,...,t_freeze,t_freeze+1,...)\n    const CC_vecfunction t = copy(make_t_intermediate(tau,parameters));\n    // functions for the projector\n    CC_vecfunction pt;\n    if (!parameters.QtAnsatz()) pt = copy(mo_ket_);\n    else {\n        pt = copy(make_full_t_intermediate(tau));\n    }\n    MADNESS_ASSERT(pt.size() == mo_ket_.size());\n    std::vector<CCPairFunction<double,6>> functions;\n    CCPairFunction<double,6> u_part(u);\n    functions.push_back(u_part);\n    if (parameters.decompose_Q()) {\n        CCPairFunction<double,6> f_xt(f12, x(i), t(j));\n        functions.push_back(f_xt);\n        CCPairFunction<double,6> f_tx(f12, t(i), x(j));\n        functions.push_back(f_tx);\n        {\n            CCPairFunction<double,6> Ot1_xt = apply_Ot(f_xt, pt, 1);     // O1t(f|xt>)\n            CCPairFunction<double,6> OtQt_xt = apply_Qt(Ot1_xt, pt, 2, 0.5);     // O1t(1-0.5*O2t)f|xt>\n            functions.push_back(OtQt_xt.invert_sign());     // - \"\n        }\n        {\n            CCPairFunction<double,6> Ot2_xt = apply_Ot(f_xt, pt, 2);     // O2t(f|xt>)\n            CCPairFunction<double,6> QtOt_xt = apply_Qt(Ot2_xt, pt, 1, 0.5);     // (1-0.5*O1t)O2t(f|xt>)\n            functions.push_back(QtOt_xt.invert_sign());     // - \"\n        }\n        {\n            CCPairFunction<double,6> Ot1_tx = apply_Ot(f_tx, pt, 1);     // O1t(f|tx>)\n            CCPairFunction<double,6> OtQt_tx = apply_Qt(Ot1_tx, pt, 2, 0.5);     // O1t(1-0.5*O2t)f|tx>\n            functions.push_back(OtQt_tx.invert_sign());     // - \"\n        }\n        {\n            CCPairFunction<double,6> Ot2_tx = apply_Ot(f_tx, pt, 2);     // O2t(f|tx>)\n            CCPairFunction<double,6> QtOt_tx = apply_Qt(Ot2_tx, pt, 1, 0.5);     // (1-0.5*O1t)O2t(f|tx>)\n            functions.push_back(QtOt_tx.invert_sign());     // - \"\n        }\n        if (parameters.QtAnsatz()) {\n            CCPairFunction<double,6> ftt(f12, t(i), t(j));     // f|tt>\n            CCPairFunction<double,6> O1x_tt = apply_Ot(ftt, x, 1);     // O1x(f|tt>)\n            CCPairFunction<double,6> OxQt_tt = apply_Qt(O1x_tt, pt, 2);     // O1xQt(f|tt>)\n            functions.push_back(OxQt_tt.invert_sign());     // - \"\n            CCPairFunction<double,6> O2x_tt = apply_Ot(ftt, x, 2);     // O2x(f|tt>)\n            CCPairFunction<double,6> QtOx_tt = apply_Qt(O2x_tt, pt, 1);     // Q1tO2x(f|tt>)\n            functions.push_back(QtOx_tt.invert_sign());     // - \"\n        }\n    } else {\n        // use 6D residuals: Qt*f*|xitj+tixj> - (QtOx+OxQt)|titj> or without QtAnsatz: Qf|xitj+tixj>\n        if (parameters.QtAnsatz()) {\n            real_function_6d ftx = make_f_xy(t(i), x(j));\n            real_function_6d fxt = make_f_xy(x(i), t(j));\n            real_function_6d tmp = ftx + fxt;\n            real_function_6d function_part = apply_Q12t(tmp, pt);\n            real_function_6d ftt = make_f_xy(t(i), t(j));\n            Projector<double, 3> Ox(x.get_vecfunction());\n            Projector<double, 3> Ot(pt.get_vecfunction());\n            real_function_6d O1x = Ox(ftt, 1);\n            real_function_6d O2x = Ox(ftt, 2);\n            real_function_6d OtOx = Ot(O2x, 1);\n            real_function_6d OxOt = Ot(O1x, 2);\n            real_function_6d projector_part = (O1x - OxOt + O2x - OtOx);\n            real_function_6d residual = function_part - projector_part;\n            CCPairFunction<double,6> res(residual);\n            functions.push_back(res);\n        } else {\n            real_function_6d ftx = make_f_xy(t(i), x(j));\n            real_function_6d fxt = make_f_xy(x(i), t(j));\n            real_function_6d tmp = ftx + fxt;\n            real_function_6d residual = apply_Q12t(tmp, mo_ket_);\n            residual.truncate();\n            CCPairFunction<double,6> res(residual);\n            functions.push_back(res);\n        }\n    }\n    CCPair pair(i, j, EXCITED_STATE, ctype, functions);\n    if (parameters.decompose_Q()) {\n        if (parameters.QtAnsatz()) MADNESS_ASSERT(functions.size() == 9);\n        else\n            MADNESS_ASSERT(functions.size() == 7);\n    } else\n        MADNESS_ASSERT(functions.size() == 2);\n    functions=consolidate(functions);\n    MADNESS_ASSERT(functions.size() == 3);\n\n    MADNESS_ASSERT(x.omega != 0.0);\n    const double bsh_eps = get_epsilon(i, j) + x.omega;\n    pair.bsh_eps = bsh_eps;\n    return pair;\n}\n\ndouble\nCCPotentials::compute_pair_correlation_energy(World& world, const CCPair& u,\n                                              const CC_vecfunction& singles, const Info& info) {\n\n    CCTimer timer(world, \"Compute Correlation Energy\");\n    MADNESS_ASSERT(u.type == GROUND_STATE);\n    if (singles.functions.empty()) MADNESS_ASSERT(u.ctype == CT_MP2);\n\n    const bool print_details=(world.rank()==0 and info.parameters.debug());\n    double result = 0.0;\n    const CCFunction<double,3>& mobi = info.mo_bra[u.i];\n    const CCFunction<double,3>& mobj = info.mo_bra[u.j];\n    const bool symmetric = (u.i == u.j);\n\n    // bra is 2*direct - exchange or < 2 ij - ji| g | tau_{ij}>\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,info.parameters);\n    auto bra=CCPairFunction<double,6>(g12,{2.0*mobi.function,mobj.function},{mobj.function,-1.0*mobi.function});\n    double fac= (symmetric) ? 1.0 : 2.0;\n    result = fac* inner({bra},u.functions);\n\n    // for (size_t mm = 0; mm < u.functions.size(); mm++) {\n//        double tmp = 0.0;\n//        const double part1 = make_xy_op_u(mobi, mobj, *g12, u.functions[mm]);\n//        if (symmetric) tmp = part1;\n//        else     //if(world.rank()==0) std::cout << std::fixed << std::setprecision(10) << part1 << \"\\n\";\n//        {\n//            const double part2 = make_xy_op_u(mobj, mobi, *g12, u.functions[mm]);\n//            tmp = 2.0 * (2.0 * part1 - part2);     // non symmetric pairs -> offdiagonal -> count twice\n//        }\n//        result += tmp;\n//        if (print_details)\n//            std::cout << std::setfill(' ') << std::setw(15) << \"from \" + u.functions[mm].name() + \"=\"\n//                      << std::setfill(' ') << std::fixed << std::setprecision(10) << tmp << \"\\n\";\n    // }\n    if (u.ctype == CT_CC2 && !singles.get_vecfunction().empty()) {\n        MADNESS_ASSERT(singles.type == PARTICLE);\n        const double omega_s = 2.0 * mobi.inner((*g12)(mobj, singles(u.j)) * singles(u.i).function) -\n                               mobi.inner((*g12)(mobj, singles(u.i)) * singles(u.j).function);\n        if (print_details)\n            std::cout << std::setw(15) << \"from singles=\" << std::setfill(' ') << std::fixed << std::setprecision(10)\n                      << omega_s << \"\\n\\n\";\n\n        result += omega_s;\n    }\n    // if (world.rank() == 0) std::cout << \"------------\\n\" << std::fixed << std::setprecision(10) << result << \"\\n\\n\";\n\n    timer.info(info.parameters.debug());\n    return result;\n}\n\ndouble\nCCPotentials::compute_cc2_correlation_energy(World& world, const CC_vecfunction& singles, const Pairs<CCPair>& doubles, const Info& info, const std::string msg)\n{\n    auto triangular_map=PairVectorMap::triangular_map(info.parameters.freeze(),info.mo_ket.size());\n    std::vector<CCPair> pair_vec=Pairs<CCPair>::pairs2vector(doubles,triangular_map);\n    MacroTaskComputeCorrelationEnergy t;\n    MacroTask task1(world, t);\n    auto pair_energies=task1(pair_vec, singles, info);\n    // pair_energies is now scattered over the universe\n\n    double total_energy=0.0;\n    for ( auto& pair_energy : pair_energies) total_energy += pair_energy.get();\n    // pair_energy.get() invokes a broadcast from rank 0 to all other ranks\n\n    if (not msg.empty() and world.rank()==0) printf(\"%s %12.8f\\n\", msg.c_str(), total_energy);\n    return total_energy;\n//    MADNESS_ASSERT(singles.type == PARTICLE);\n//    CCTimer time(world, \"Computing CC2 Correlation Energy\");\n//    // output.section(\"Computing CC2 Correlation Energy\");\n//    double result = 0.0;\n//    for (const auto& tmp : doubles.allpairs) {\n//        const size_t i = tmp.second.i;\n//        const size_t j = tmp.second.j;\n//        const double omega = compute_pair_correlation_energy(world, tmp.second, singles, info);\n//        result += omega;\n//        if (world.rank() == 0)\n//            std::cout << std::fixed << \"omega  \" << i << j << \" =\" << std::setprecision(10) << omega << \"\\n\";\n//    }\n//    if (world.rank() == 0) std::cout << std::fixed << \"sum      \" << \" =\" << std::setprecision(10) << result << \"\\n\";\n//\n//    time.info();\n//    return result;\n}\n\ndouble\nCCPotentials::compute_kinetic_energy(World& world, const vector_real_function_3d& xbra, const vector_real_function_3d& xket)\n{\n    Kinetic<double, 3> T(world);\n    double kinetic = 0.0;\n    for (size_t k = 0; k < xket.size(); k++)\n        kinetic += T(xbra[k], xket[k]);\n    return kinetic;\n}\n\n\ndouble\nCCPotentials::compute_cis_expectation_value(World& world, const CC_vecfunction& x,\n                                            const vector_real_function_3d& V, const bool print, const Info& info)\n{\n    // following eq. (34) of the CIS paper Kottmann et al, PCCP, 17, 31453, (2015)\n    // doi: https://doi.org/10.1039/C5CP00345H\n    // the expectation value of the CIS wave function is computed by projecting the\n    // CIS wave function onto eq. (22)\n    // the potential V must contain the coupling term when using localized orbitals\n    const vector_real_function_3d xbra = info.R_square*(x.get_vecfunction());\n    const vector_real_function_3d xket = x.get_vecfunction();\n    const double kinetic = compute_kinetic_energy(world, xbra, xket);\n    const double norm = sqrt(inner(world, xbra, xket).sum());\n    double eps = 0.0;\n    for (size_t k = 0; k < xket.size(); k++)\n        eps -= info.orbital_energies[k + info.parameters.freeze()] * xbra[k].inner(xket[k]);\n    double potential = inner(world, xbra, V).sum();\n    const double result = 1.0 / (norm * norm) * (potential + kinetic + eps);\n    if (world.rank() == 0 && print) {\n        std::cout << \"CCS Expectation Value:\\n--------\\n\";\n        std::cout << \"Kinetic-Energy  =\" << std::fixed << std::setprecision(8) << kinetic << \"\\n\";\n        std::cout << \"Potential-Energy=\" << std::fixed << std::setprecision(8) << potential << \"\\n\";\n        std::cout << \"ei*<xi|xi>      =\" << std::fixed << std::setprecision(8) << eps << \"\\n\";\n        std::cout << \"||x||           =\" << std::fixed << std::setprecision(8) << norm << \"\\n\";\n        std::cout << \"Expectationvalue=\" << std::fixed << std::setprecision(8) << result << \"\\n--------\\n\";\n    }\n    return result;\n}\n\ndouble\nCCPotentials::compute_excited_pair_energy(World& world, const CCPair& d, const CC_vecfunction& x, const Info& info) {\n    // const CC_vecfunction xbra(make_bra(x), RESPONSE, info.parameters.freeze());\n    // for (const auto& f: d.functions) f.print_size(\"doubles functions in ex pair energy\");\n    MADNESS_CHECK_THROW(x.type == RESPONSE, \"x must be of type RESPONSE\");\n    MADNESS_CHECK_THROW(x.size()==info.get_active_mo_bra().size(), \"x must have the same size as the active space\");\n    const CC_vecfunction xbra(info.R_square*x.get_vecfunction(), RESPONSE, info.parameters.freeze());\n    const CCFunction<double,3>& xbi = xbra(d.i);\n    const CCFunction<double,3>& mobj = info.mo_bra[d.j];\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OT_G12,info.parameters);\n    double result = 0.0;\n    double s2b = 2.0 * make_xy_op_u(xbi, mobj, *g12, d.functions) - make_xy_op_u(mobj, xbi, *g12, d.functions);\n    double s2c = 0.0;\n    for (const auto& ktmp : x.functions) {\n        const size_t k = ktmp.first;\n        // const real_function_3d j_igk = (*g12)(info.mo_bra[d.i], info.mo_ket[k]) * info.mo_bra[d.j].function;\n        const real_function_3d j_igk = (*g12)(info.mo_bra[d.i]* info.mo_ket[k]) * info.mo_bra[d.j];\n        s2c -= 2.0 * make_xy_u(xbra(k), j_igk, d.functions) - make_xy_u(j_igk, xbra(k), d.functions);\n    }\n    result = s2b + s2c;\n    if (world.rank() == 0) {\n        std::cout << std::fixed << std::setprecision(10) << \"\\nExcited Pair Energy: \" << \"S2b=\" << s2b << \", S2c=\"\n                  << s2c << \", Both=\" << result << \"\\n\\n\";\n    }\n    return result;\n}\n\ndouble\nCCPotentials::compute_cispd_energy(const CC_vecfunction& x, const Pairs<CCPair> mp2, const Pairs<CCPair> cispd) const {\n    MADNESS_ASSERT(x.type == RESPONSE);\n    output.section(\"Compute CIS(D) Energy\");\n    const CC_vecfunction xbra(make_bra(x), RESPONSE, parameters.freeze());\n    double s2b = 0.0;\n    double s2c = 0.0;\n    double s4a = 0.0;\n    double s4b = 0.0;\n    double s4c = 0.0;\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : x.functions) {\n            // s2b part: <xi|s2b_i>\n            const size_t k = ktmp.first;\n            s2b += 2.0 * make_xy_op_u(xbra(i), mo_bra_(k), *g12, get_pair_function(cispd, i, k)) -\n                   make_xy_op_u(mo_bra_(k), xbra(i), *g12, get_pair_function(cispd, i, k));\n            const real_function_3d kgi = (*g12)(mo_bra_(k), mo_ket_(i));\n            const real_function_3d kgxi = (*g12)(mo_bra_(k), x(i));\n            const real_function_3d kgxk = (*g12)(mo_bra_(k), x(k));\n            for (const auto& ltmp : x.functions) {\n                // s2c part: <xi|s2c_i>\n                const size_t l = ltmp.first;\n                const real_function_3d k_lgxk = mo_bra_(k).function * (*g12)(mo_bra_(l), x(k));\n                const real_function_3d l_kgxk = mo_bra_(l).function * kgxk;\n                const real_function_3d l_kgi = mo_bra_(l).function * kgi;\n                const real_function_3d l_kgxi = mo_bra_(l).function * kgxi;\n                s2c += 2.0 * make_xy_u(xbra(i), l_kgi, get_pair_function(cispd, k, l)) -\n                       make_xy_u(l_kgi, xbra(i), get_pair_function(cispd, k, l));\n                const double xil = xbra(i).function.inner(x(l).function);\n                s4a += xil * (2.0 * make_xy_op_u(mo_bra_(l), mo_bra_(k), *g12, get_pair_function(mp2, i, k)) -\n                              make_xy_op_u(mo_bra_(k), mo_bra_(l), *g12, get_pair_function(mp2, i, k)));\n                s4b += 2.0 * make_xy_u(xbra(i), l_kgxi, get_pair_function(mp2, k, l)) -\n                       make_xy_u(l_kgxi, xbra(i), get_pair_function(mp2, k, l));\n                s4c += 4.0 * make_xy_u(xbra(i), l_kgxk, get_pair_function(mp2, i, l)) -\n                       2.0 * make_xy_u(l_kgxk, xbra(i), get_pair_function(mp2, i, l)) -\n                       2.0 * make_xy_u(xbra(i), k_lgxk, get_pair_function(mp2, i, l))\n                       + make_xy_u(k_lgxk, xbra(i), get_pair_function(mp2, i, l));\n            }\n        }\n    }\n    const double result = s2b - s2c - s4a - s4b + s4c;\n    if (world.rank() == 0) {\n        std::cout << std::fixed << std::setprecision(10) << \"CIS(D) Correction\\n\" << \"s2b =\" << s2b << \"\\n\" << \"s2c =\"\n                  << -s2c << \"\\n\" << \"s4a =\" << -s4a << \"\\n\" << \"s4b =\" << -s4b << \"\\n\" << \"s4c =\"\n                  << s4c << \"\\n\" << \"-----------------\\n\" << \"sum =\" << result << \"\\n\";\n    }\n    return result;\n}\n\ndouble\nCCPotentials::compute_cc2_excitation_energy(const CC_vecfunction& stau, const CC_vecfunction& sx,\n                                            const Pairs<CCPair> dtau, const Pairs<CCPair> dx) const {\n    vector_real_function_3d tmp = mul(world, nemo_->ncf->square(), sx.get_vecfunction());\n    truncate(world, tmp);\n    CC_vecfunction xbra(tmp, RESPONSE, parameters.freeze());\n    const double xbrax = inner(world, xbra.get_vecfunction(), sx.get_vecfunction()).sum();\n    double result = potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s3a_);\n    result += potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s3b_);\n    result += potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s3c_);\n    result += potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s5b_);\n    result += potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s5c_);\n    result += potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s6_);\n    result += potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s2b_);\n    result += potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s2c_);\n    result += potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s4a_);\n    result += potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s4b_);\n    result += potential_energy_ex(world, xbra, stau, dtau, sx, dx, POT_s4c_);\n    return 1.0 / xbrax * result;\n}\n\nmadness::real_function_6d\nCCPotentials::fock_residue_6d(const CCPair& u) const {\n    if (u.function().norm2() == 0.0) {\n        output(\"Pair-Function is zero so this is the first iteration ... skipping Fock residue\");\n        return real_factory_6d(world);\n    }\n    // make the special points for the cusps in the nuclear potential\n    std::vector<Vector<double, 3> > sp3d = nemo_->get_calc()->molecule.get_all_coords_vec();\n    std::vector<Vector<double, 6> > sp6d;\n    for (size_t i = 0; i < sp3d.size(); i++) {\n        Vector<double, 6> tmp;\n        for (size_t j = 0; j < 3; j++) {\n            tmp[j] = sp3d[i][j];\n            tmp[j + 3] = sp3d[i][j];\n        }\n        sp6d.push_back(tmp);\n    }\n    // make the coulomb and local Un part with the composite factory\n    real_function_3d hartree_potential = real_factory_3d(world);\n    for (const auto& tmp : mo_ket_.functions)\n        hartree_potential += (*g12)(mo_bra_(tmp.first), mo_ket_(tmp.first));\n    real_function_3d local_part = (2.0 * hartree_potential + nemo_->ncf->U2());\n    if (parameters.debug()) local_part.print_size(\"vlocal\");\n\n    if (parameters.debug()) u.function().print_size(u.name());\n\n    // Contruct the BSH operator in order to screen\n    double bsh_eps = u.bsh_eps;\n    real_convolution_6d op_mod = BSHOperator<6>(world, sqrt(-2.0 * bsh_eps), parameters.lo(), parameters.thresh_bsh_6D());\n    op_mod.modified() = true;\n    // Make the CompositeFactory\n    real_function_6d vphi = CompositeFactory<double, 6, 3>(world).ket(copy(u.function())).V_for_particle1(\n            copy(local_part)).V_for_particle2(copy(local_part)).special_points(sp6d);\n    // Screening procedure\n    vphi.fill_nuclear_cuspy_tree(op_mod, 0);\n    if (parameters.debug()) vphi.print_size(\"vlocal|u>\");\n\n    vphi.truncate().reduce_rank();\n    if (parameters.debug()) vphi.print_size(\"vlocal|u>\");\n\n    real_function_6d Un1 = real_factory_6d(world);\n    real_function_6d Un2 = real_factory_6d(world);\n    for (int axis = 0; axis < 3; ++axis) {\n        real_derivative_6d D = free_space_derivative<double, 6>(world, axis);\n        const real_function_6d Du = D(u.function()).truncate();\n        const real_function_3d U1_axis = nemo_->ncf->U1(axis);\n        double tight_thresh = parameters.thresh_6D();\n        real_function_6d x = CompositeFactory<double, 6, 3>(world).ket(copy(Du)).V_for_particle1(copy(U1_axis)).thresh(\n                tight_thresh).special_points(sp6d);\n        x.fill_nuclear_cuspy_tree(op_mod, 1);\n        if (x.norm2() < tight_thresh) x.print_size(\"Un_axis_\" + stringify(axis));\n\n        if (x.norm2() < tight_thresh) output.warning(\"||Un|u>|| is below the threshold\");\n\n        Un1 += x;\n        Un1.truncate().reduce_rank();\n        if (parameters.debug()) Un1.print_size(\"Un1\");\n    }\n    if (u.i == u.j) {\n        output(u.name() + \" is a diagonal pair: Exploting permutation symmetry\");\n        Un2 = swap_particles(Un1);\n    } else {\n        for (int axis = 3; axis < 6; ++axis) {\n            real_derivative_6d D = free_space_derivative<double, 6>(world, axis);\n            const real_function_6d Du = D(u.function()).truncate();\n            const real_function_3d U1_axis = nemo_->ncf->U1(axis % 3);\n            double tight_thresh = parameters.thresh_6D();\n            real_function_6d x = CompositeFactory<double, 6, 3>(world).ket(copy(Du)).V_for_particle2(\n                    copy(U1_axis)).thresh(tight_thresh).special_points(sp6d);\n            x.fill_nuclear_cuspy_tree(op_mod, 2);\n            if (x.norm2() < tight_thresh) x.print_size(\"Un_axis_\" + stringify(axis));\n\n            if (x.norm2() < tight_thresh) output.warning(\"||Un|u>|| is below the threshold\");\n\n            Un2 += x;\n            Un2.truncate().reduce_rank();\n            if (parameters.debug()) Un2.print_size(\"Un2\");\n        }\n    }\n    vphi += (Un1 + Un2);\n    vphi.truncate().reduce_rank();\n    if (parameters.debug()) vphi.print_size(\"(Un + J1 + J2)|u>\");\n\n    // Exchange Part\n    vphi = (vphi - K(u.function(), u.i == u.j)).truncate().reduce_rank();\n    if (parameters.debug()) vphi.print_size(\"Fock-Residue\");\n\n    return vphi;\n}\n\n\nmadness::real_function_6d\nCCPotentials::fock_residue_6d_macrotask(World& world, const CCPair& u, const CCParameters& parameters,\n                                        const std::vector< madness::Vector<double,3> >& all_coords_vec,\n                                        const std::vector<real_function_3d>& mo_ket,\n                                        const std::vector<real_function_3d>& mo_bra,\n                                        const std::vector<real_function_3d>& U1,\n                                        const real_function_3d& U2) {\n    if (u.function().norm2() == 0.0) {\n        print(\"Pair-Function is zero so this is the first iteration ... skipping Fock residue\\n\");\n        return real_factory_6d(world);\n    }\n    // make the special points for the cusps in the nuclear potential\n    std::vector<Vector<double, 3> > sp3d = all_coords_vec;\n    std::vector<Vector<double, 6> > sp6d;\n    for (size_t i = 0; i < sp3d.size(); i++) {\n        Vector<double, 6> tmp;\n        for (size_t j = 0; j < 3; j++) {\n            tmp[j] = sp3d[i][j];\n            tmp[j + 3] = sp3d[i][j];\n        }\n        sp6d.push_back(tmp);\n    }\n    // make the coulomb and local Un part with the composite factory\n    real_convolution_3d g12 = CoulombOperator(world, parameters.lo(), parameters.thresh_poisson());\n    real_function_3d hartree_potential = g12(dot(world, mo_bra, mo_ket));\n    //for (int i = 0; i < mo_ket.size(); i++)\n    //    hartree_potential += g12(mo_bra[i], mo_ket[i]);\n    real_function_3d local_part = (2.0 * hartree_potential + U2);\n    if (parameters.debug()) local_part.print_size(\"vlocal\");\n\n    if (parameters.debug()) u.function().print_size(u.name());\n\n    // Contruct the BSH operator in order to screen\n    double bsh_eps = u.bsh_eps;\n    real_convolution_6d op_mod = BSHOperator<6>(world, sqrt(-2.0 * bsh_eps), parameters.lo(), parameters.thresh_bsh_6D());\n    op_mod.modified() = true;\n    // Make the CompositeFactory\n    real_function_6d vphi = CompositeFactory<double, 6, 3>(world).ket(copy(u.function())).V_for_particle1(\n            copy(local_part)).V_for_particle2(copy(local_part)).special_points(sp6d);\n    // Screening procedure\n    vphi.fill_nuclear_cuspy_tree(op_mod, 0);\n    if (parameters.debug()) vphi.print_size(\"vlocal|u>\");\n\n    vphi.truncate().reduce_rank();\n    if (parameters.debug()) vphi.print_size(\"vlocal|u>\");\n\n    real_function_6d Un1 = real_factory_6d(world);\n    real_function_6d Un2 = real_factory_6d(world);\n    for (int axis = 0; axis < 3; ++axis) {\n        real_derivative_6d D = free_space_derivative<double, 6>(world, axis);\n        const real_function_6d Du = D(u.function()).truncate();\n        const real_function_3d U1_axis = U1[axis];\n        double tight_thresh = parameters.thresh_6D();\n        real_function_6d x = CompositeFactory<double, 6, 3>(world).ket(copy(Du)).V_for_particle1(copy(U1_axis)).thresh(\n                tight_thresh).special_points(sp6d);\n        x.fill_nuclear_cuspy_tree(op_mod, 1);\n\n        if (parameters.debug()) x.print_size(\"Un_axis_\" + stringify(axis));\n        Un1 += x;\n    }\n    if (parameters.debug()) Un1.print_size(\"Un1\");\n\n    if (u.i == u.j) {\n        print(u.name() + \" is a diagonal pair: Exploting permutation symmetry\\n\");\n        Un2 = madness::swap_particles<double>(Un1);\n    } else {\n        for (int axis = 3; axis < 6; ++axis) {\n            real_derivative_6d D = free_space_derivative<double, 6>(world, axis);\n            const real_function_6d Du = D(u.function()).truncate();\n            const real_function_3d U1_axis = U1[axis % 3];\n            double tight_thresh = parameters.thresh_6D();\n            real_function_6d x = CompositeFactory<double, 6, 3>(world).ket(copy(Du)).V_for_particle2(\n                    copy(U1_axis)).thresh(tight_thresh).special_points(sp6d);\n            x.fill_nuclear_cuspy_tree(op_mod, 2);\n            if (parameters.debug()) x.print_size(\"Un_axis_\" + stringify(axis));\n            Un2 += x;\n        }\n        if (parameters.debug()) Un2.print_size(\"Un2\");\n    }\n    vphi += (Un1 + Un2);\n    if (parameters.debug()) vphi.print_size(\"before truncation (Un + J1 + J2)|u>\");\n    vphi.truncate().reduce_rank();\n    if (parameters.debug()) vphi.print_size(\"(Un + J1 + J2)|u>\");\n\n    // Exchange Part\n    vphi = (vphi - K_macrotask(world, mo_ket, mo_bra, u.function(), u.i == u.j, parameters)).truncate().reduce_rank();\n    if (parameters.debug()) vphi.print_size(\"Fock-Residue\");\n\n    return vphi;\n}\n\n/// the constant part is the contribution to the doubles that are independent of the doubles\n\n/// CC-equations from Kottmann et al., JCTC 13, 5956 (2017)\n/// MP2:\n///    cp = G Q g~ |ij>\n///    g~ = Ue - KffK\n/// GS-CC2: eqs. (6,7)\n///   cp  = G Qt g~ |t_i t_j>\n///    g~ = Ue - KffK - Fock_commutator - reduced_Fock\n/// LRCC2: eqs. (24-29)\n///   cp  = G d(Qt g~ d|t_i t_j>)\n///       = G (Qt g~ d|t_i t_j> + Qt dg~ |t_i t_j> + dQt g~ |t_i t_j>)\nmadness::real_function_6d\nCCPotentials::make_constant_part_macrotask(World& world, const CCPair& pair,\n            const CC_vecfunction& gs_singles, const CC_vecfunction& ex_singles,\n            const Info& info) {\n    const CalcType targetstate=pair.ctype;\n    const auto& parameters=info.parameters;\n    std::string msg=\"compute constant part of pair \"+std::to_string(pair.i) + \" \" + std::to_string(pair.j);\n    print_header3(msg);\n    timer t1(world);\n    // construct the projectors\n    // Q12 = (1-|i><i|)  (1-|j><j|)\n    StrongOrthogonalityProjector<double, 3> Q12(world);\n    Q12.set_spaces(info.mo_bra,info.mo_ket,info.mo_bra,info.mo_ket);\n\n    // Q12t = (1-|t_i><i|)(1-|t_j><j|)\n    StrongOrthogonalityProjector<double, 3> Q12t(world);\n\n    // t1-transformed orbitals\n    CC_vecfunction t(MIXED);\n    if (targetstate==CT_CC2 or targetstate==CT_LRCC2) {\n        t=CCPotentials::make_full_t_intermediate(gs_singles,info);\n        Q12t.set_spaces(info.mo_bra,t.get_vecfunction(),info.mo_bra,t.get_vecfunction());\n    }\n\n\n    // dQ12t = -(Qt(1) Ox(2) + Ox(1) Qt(2))      eq. (22)\n    QProjector<double,3> Qt;\n    Projector<double,3> Ox;\n    if (targetstate==CT_LRCC2) {\n        Qt.set_spaces(info.mo_bra,t.get_vecfunction());\n        Ox.set_spaces(info.get_active_mo_bra(),ex_singles.get_vecfunction());\n    }\n    auto dQt_1 = outer(Qt,Ox);\n    auto dQt_2 = outer(Ox,Qt);\n\n    std::size_t i=pair.i;\n    std::size_t j=pair.j;\n    auto phi = [&](size_t i) { return CCFunction<double,3>(info.mo_ket[i],i,HOLE); };\n    // auto t = [&](size_t i) { return CCFunction<double,3>(info.mo_ket[i]+gs_singles(i).function); };\n    auto x = [&](size_t i) { return ex_singles(i); };\n\n    // save memory:\n    // split application of the BSH operator into high-rank, local part U|ij>, and\n    // low-rank, delocalized part (-O1 -O2 +O1O2) U|ij> by splitting the SO operator\n    auto apply_in_separated_form = [](const StrongOrthogonalityProjector<double,3>& Q,\n        const std::vector<CCPairFunction<double,6>>& ccp) {\n\n        std::vector<CCPairFunction<double,6>> result;\n        for (const auto& cc : ccp) {\n            if (cc.is_pure()) {\n                auto [left,right]=Q.get_vectors_for_outer_product(cc.get_function());\n                result.push_back(cc);\n                result.push_back(CCPairFunction<double,6>(left,right));\n            } else if (cc.is_decomposed()) {\n                result.push_back(Q(cc));\n            }\n        }\n        return result;\n    };\n\n    auto GG = BSHOperator<6>(world, sqrt(-2.0 * pair.bsh_eps), parameters.lo(), parameters.thresh_bsh_6D());\n    GG.destructive() = true;\n    GG.print_timings=false;\n\n    // compute all 6d potentials without applying the SO projector\n    std::vector<CCPairFunction<double,6>> V;\n    if (targetstate==CT_MP2) {\n        std::vector<std::string> argument={\"Ue\",\"KffK\"};\n        auto Vreg=apply_Vreg(world,phi(i),phi(j),gs_singles,ex_singles,info,argument,pair.bsh_eps);\n        V=consolidate(apply_in_separated_form(Q12,Vreg));\n    } else if (targetstate==CT_CC2) {       // Eq. (42) of Kottmann, JCTC 13, 5945 (2017)\n        std::vector<std::string> argument={\"Ue\",\"KffK\",\"comm_F_Qt_f12\",\"reduced_Fock\"};\n        auto Vreg=apply_Vreg(world,t(i),t(j),gs_singles,ex_singles,info,argument,pair.bsh_eps);\n        V=consolidate(Q12t(Vreg));\n    } else if (targetstate==CT_LRCC2) {\n        // Eq. (25) of Kottmann, JCTC 13, 5956 (2017)\n        // eq. (25) Q12t (g~ - omega f12) (|x_i t_j> + |t_i x_j> )\n        // note the term omega f12 is included in the reduced_Fock term, see eq. (34)\n        if (1)\n        {\n            print_header3(\"Q12t g~ |x_i t_j + t_i x_j>\");\n            std::vector<std::string> argument={\"Ue\",\"KffK\",\"comm_F_Qt_f12\",\"reduced_Fock\"};\n            auto Vreg=apply_Vreg(world,x(i),t(j),gs_singles,ex_singles,info,argument,pair.bsh_eps);\n            Vreg+=apply_Vreg(world,t(i),x(j),gs_singles,ex_singles,info,argument,pair.bsh_eps);\n            V=consolidate(apply_in_separated_form(Q12t,Vreg));\n            // apply_G_and_print(V,\"functional response\");\n        }\n\n        if (0) {\n            print_header3(\"[F12,Qt] f12 |x_i t_j + t_i x_j>\");\n            std::vector<std::string> argument={\"comm_F_Qt_f12\"};\n            auto Vreg=apply_Vreg(world,x(i),t(j),gs_singles,ex_singles,info,argument,pair.bsh_eps);\n            Vreg+=apply_Vreg(world,t(i),x(j),gs_singles,ex_singles,info,argument,pair.bsh_eps);\n            // auto Q12V=Q12t(Vreg);\n            // apply_G_and_print(Q12V,\"commutator response in old terminology: Q12V direct\");\n        }\n\n        // eq. (29) first term: dQt g~ |t_i t_j>\n        if (1) {\n            print_header3(\"dQt g~ |t_i t_j> \");\n            const std::vector<std::string> argument={\"Ue\",\"KffK\",\"comm_F_Qt_f12\",\"reduced_Fock\"};\n            // const std::vector<std::string> argument={\"Ue\",\"KffK\",\"reduced_Fock\"};\n            auto Vreg1=apply_Vreg(world,t(i),t(j),gs_singles,ex_singles,info,argument,pair.bsh_eps);\n\n            auto tmp=consolidate(dQt_1(Vreg1) + dQt_2(Vreg1));\n            V-=tmp;\n\n            // MADNESS_CHECK_THROW(tmp.size()==1,\"tmp size is incorrect\");\n            // for (auto& t : tmp) t.print_size(\"dQt g~ |t_i t_j>\");\n            // apply_G_and_print(tmp,\"projector response\");\n        }\n\n\n        // eq. (29) second term = eq. (31): [F12, dQt] f12 |t_i t_j> + omega dQ12t f12 |t_i t_j>\n        if (1) {\n            print_header3(\"[F12, dQt] f12 |t_i t_j>\");\n            const std::vector<std::string> argument={\"comm_F_dQt_f12\"};\n            auto tmp=apply_Vreg(world,t(i),t(j),gs_singles,ex_singles,info,argument,pair.bsh_eps);\n            tmp=consolidate(tmp);\n            V+=tmp;\n            // apply_G_and_print(tmp,\"commutator projector response\");\n        }\n    }\n\n    V=consolidate(V);\n    MADNESS_CHECK(V.size()==2);     // term 1: 6d, hi-rank, local; term 2: 3d, low-rank, delocalized\n    t1.end(\"finished computing potential for constant part\");\n\n    // the Green's function\n    auto G = BSHOperator<6>(world, sqrt(-2.0 * pair.bsh_eps), parameters.lo(), parameters.thresh_bsh_6D());\n    G.destructive() = true;\n\n    real_function_6d GV=real_factory_6d(world).empty();\n    for (const auto& vv : V) GV+= (G(vv)).get_function();      // note V is destroyed here\n    GV=-2.0*Q12(GV).truncate().reduce_rank();\n\n    GV.print_size(\"GVreg\");\n    t1.end(\"finished applying G on potential for constant part\");\n    return GV;\n}\n\n\n\n\nmadness::real_function_6d\nCCPotentials::make_constant_part_mp2_macrotask(World& world, const CCPair& pair,\n                                               const std::vector<real_function_3d>& mo_ket,\n                                               const std::vector<real_function_3d>& mo_bra,\n                                               const CCParameters& parameters, const real_function_3d& Rsquare,\n                                               const std::vector<real_function_3d>& U1,\n                                               const std::vector<std::string> argument) {\n    MADNESS_ASSERT(pair.ctype == CT_MP2);\n    MADNESS_ASSERT(pair.type == GROUND_STATE);\n    const std::string i_name = \"phi\" + stringify(pair.i);\n    const std::string j_name = \"phi\" + stringify(pair.j);\n    const double epsilon = pair.bsh_eps;\n    const FuncType i_type = HOLE;\n    const FuncType j_type = HOLE;\n\n    // load constant part if available\n    //if (parameters.no_compute_mp2_constantpart()) {\n    //    pair.constant_part=real_factory_6d(world);\n    //    load(pair.constant_part,pair.name()+\"_const\");\n    //}\n    //if (pair.constant_part.is_initialized()) return false;\n\n    // make screening Operator\n    real_convolution_6d Gscreen = BSHOperator<6>(world, sqrt(-2.0 * epsilon),\n                                                 parameters.lo(), parameters.thresh_bsh_6D());\n    Gscreen.modified() = true;\n\n    print(\"\\nCalculating Constant Part of MP2 pair \" + i_name + j_name);\n    CCTimer time(world, \"Calculating Constant Part of MP2\");\n    MADNESS_ASSERT(i_type == HOLE);\n    MADNESS_ASSERT(j_type == HOLE);\n    real_function_6d V = apply_Vreg_macrotask(world, mo_ket, mo_bra, parameters, Rsquare,\n                                              U1, pair.i, pair.j, i_type, j_type, argument, &Gscreen);\n    if (parameters.debug()) V.print_size(\"Vreg\");\n\n    //MADNESS_ASSERT(t.type == HOLE || t.type == MIXED);\n    MADNESS_ASSERT(mo_ket.size() == mo_bra.size());\n    StrongOrthogonalityProjector<double, 3> Q(world);\n    Q.set_spaces(mo_bra, mo_ket, mo_bra, mo_ket);\n\n    //    V = Q(V);\n    //\n    //    V.print_size(\"QVreg\");\n    real_convolution_6d G = BSHOperator<6>(world, sqrt(-2.0 * epsilon), parameters.lo(),\n                                           parameters.thresh_bsh_6D());\n    G.destructive() = true;\n    //    real_function_6d GV = -2.0 * G(V);\n\n    // save memory:\n    // split application of the BSH operator into high-rank, local part U|ij>, and\n    // low-rank, delocalized part (-O1 -O2 +O1O2) U|ij> by splitting the SO operator\n\n    // delocalized part\n    auto [left,right]=Q.get_vectors_for_outer_product(V);\n    real_function_6d GV1=-2.0*G(left,right);\n    GV1.truncate();\n\n    // local part\n    real_function_6d GV = -2.0 * G(V);      // note V is destroyed here\n    GV.truncate();\n\n    GV+=GV1;\n    GV.truncate();\n    if (parameters.debug()) GV.print_size(\"GVreg\");\n    //MADNESS_ASSERT(t.type == HOLE || t.type == MIXED);\n    MADNESS_ASSERT(mo_ket.size() == mo_bra.size());\n    GV = Q(GV);\n\n    GV.print_size(\"GVreg\");\n    time.info();\n\n    return GV;\n}\n\nreal_function_6d\nCCPotentials::update_pair_mp2_macrotask(World& world, const CCPair& pair, const CCParameters& parameters,\n                                             const std::vector< madness::Vector<double,3> >& all_coords_vec,\n                                             const std::vector<real_function_3d>& mo_ket,\n                                             const std::vector<real_function_3d>& mo_bra,\n                                             const std::vector<real_function_3d>& U1,\n                                             const real_function_3d& U2, const real_function_6d& mp2_coupling) {\n\n    if (world.rank()==0) print(assign_name(pair.ctype) + \"-Microiteration\\n\");\n    CCTimer timer_mp2(world, \"MP2-Microiteration of pair \" + pair.name());\n\n    if (parameters.debug()) mp2_coupling.print_size(\"coupling in macrotask\");\n\n    double bsh_eps = pair.bsh_eps;\n    real_convolution_6d G = BSHOperator<6>(world, sqrt(-2.0 * bsh_eps), parameters.lo(), parameters.thresh_bsh_6D());\n    G.destructive() = true;\n\n    CCTimer timer_mp2_potential(world, \"MP2-Potential of pair \" + pair.name());\n    real_function_6d mp2_potential = -2.0 * CCPotentials::fock_residue_6d_macrotask(world, pair, parameters,\n                                                                                all_coords_vec, mo_ket, mo_bra, U1, U2);\n    // add coupling, note sign and factor\n    //real_function_6d coupling = mp2_coupling(pair.i, pair.j);\n    mp2_potential += 2.0 * mp2_coupling;\n\n    if (parameters.debug()) mp2_potential.print_size(assign_name(pair.ctype) + \" Potential\");\n    mp2_potential.truncate().reduce_rank();\n    timer_mp2_potential.info(true, mp2_potential.norm2());\n\n    CCTimer timer_G(world, \"Apply Greens Operator on MP2-Potential of pair \" + pair.name());\n    const real_function_6d GVmp2 = G(mp2_potential);\n    if (parameters.debug()) GVmp2.print_size(\"GVmp2\");\n    timer_G.info(true, GVmp2.norm2());\n\n    //CCTimer timer_addup(world, \"Add constant parts and update pair \" + pair.name());\n    real_function_6d unew = GVmp2 + pair.constant_part;\n    if (parameters.debug()) unew.print_size(\"unew\");\n\n    StrongOrthogonalityProjector<double, 3> Q(world);\n    Q.set_spaces(mo_bra, mo_ket, mo_bra, mo_ket);\n    unew = Q(unew);\n\n    if (parameters.debug())unew.print_size(\"Q12(unew)\");\n    timer_mp2.info();\n\n    real_function_6d residue = (pair.function() - unew);\n    // if (parameters.debug()) residue.print_size(\"bsh residual\");\n    residue.truncate(FunctionDefaults<6>::get_thresh()*0.1);\n    if (parameters.debug()) residue.print_size(\"bsh residual, truncated\");\n\n    // return residue;\n    return unew;\n}\n\n\nCCPair CCPotentials::iterate_pair_macrotask(World& world,\n                                            const CCPair& pair,\n                                            const CC_vecfunction& gs_singles,\n                                            const CC_vecfunction& ex_singles,\n                                            const real_function_6d& coupling,\n                                            const Info& info,\n                                            const long maxiter) {\n    if (world.rank()==0) print_header2(\"Iterate Pair \" + pair.name());\n    if (pair.ctype == CT_CC2) MADNESS_ASSERT(gs_singles.type == PARTICLE);\n    if (pair.ctype == CT_CISPD) MADNESS_ASSERT(ex_singles.type == RESPONSE);\n    if (pair.ctype == CT_MP2) MADNESS_ASSERT(gs_singles.get_vecfunction().empty());\n    if (pair.ctype == CT_MP2) MADNESS_ASSERT(ex_singles.get_vecfunction().empty());\n    if (pair.ctype == CT_ADC2)MADNESS_ASSERT(ex_singles.type == RESPONSE);\n\n    real_function_6d constant_part = pair.constant_part;\n    constant_part.truncate().reduce_rank();\n    pair.function().truncate().reduce_rank();\n\n    StrongOrthogonalityProjector<double,3> Q12(world);\n    Q12.set_spaces(info.mo_bra,info.mo_ket,info.mo_bra,info.mo_ket);\n\n    double bsh_eps = pair.bsh_eps; //CCOPS.get_epsilon(pair.i,pair.j)+omega;\n    real_convolution_6d G = BSHOperator<6>(world, sqrt(-2.0 * bsh_eps), info.parameters.lo(), info.parameters.thresh_bsh_6D());\n    G.destructive() = true;\n\n    NonlinearSolverND<6> solver(info.parameters.kain_subspace());\n    solver.do_print = (world.rank() == 0);\n\n    CCPair result=pair;\n\n    // only the u-part of omega\n    double omega_partial=0.0;\n    if (result.ctype == CT_MP2) omega_partial = CCPotentials::compute_pair_correlation_energy(world, result, gs_singles, info);\n    else if (result.type == EXCITED_STATE) omega_partial = CCPotentials::compute_excited_pair_energy(world, result, ex_singles, info);\n\n    for (size_t iter = 0; iter < size_t(maxiter); iter++) {\n        if (world.rank()==0) print_header3(assign_name(result.ctype) + \"-Microiteration\");\n        CCTimer timer_mp2(world, \"MP2-Microiteration of pair \" + result.name());\n\n\n        CCTimer timer_mp2_potential(world, \"MP2-Potential of pair \" + result.name());\n        // real_function_6d mp2_potential = -2.0 * CCOPS.fock_residue_6d(result);\n        real_function_6d mp2_potential = -2.0 * fock_residue_6d_macrotask(world,result,info.parameters,\n                                                                           info.molecular_coordinates,info.mo_ket,info.mo_bra,\n                                                                           info.U1,info.U2);\n        mp2_potential += 2.0 * coupling;\n\n        if (info.parameters.debug()) mp2_potential.print_size(assign_name(result.ctype) + \" Potential\");\n        mp2_potential.truncate().reduce_rank();\n        timer_mp2_potential.info(true, mp2_potential.norm2());\n\n        CCTimer timer_G(world, \"Apply Greens Operator on MP2-Potential of pair \" + result.name());\n        const real_function_6d GVmp2 = G(mp2_potential);\n        if (info.parameters.debug()) GVmp2.print_size(\"GVmp2\");\n        timer_G.info(true, GVmp2.norm2());\n\n        CCTimer timer_addup(world, \"Add constant parts and update pair \" + result.name());\n        real_function_6d unew = Q12(GVmp2 + constant_part);\n        if (info.parameters.debug()) unew.print_size(\"Q12(unew)\");\n\n        const real_function_6d residual =  result.function() - unew;\n        double rmsresidual=residual.norm2();\n\n        if (info.parameters.kain()) {\n\n            real_function_6d kain_update = copy(solver.update(result.function(), residual));\n            // kain_update = CCOPS.apply_Q12t(kain_update, CCOPS.mo_ket());\n            kain_update = Q12(kain_update);\n            if (info.parameters.debug()) kain_update.print_size(\"Kain-Update-Function\");\n            result.update_u(copy(kain_update));\n        } else {\n            result.update_u(unew);\n        }\n\n        timer_addup.info(true, result.function().norm2());\n\n        double omega_new = 0.0;\n        if (result.ctype == CT_MP2) omega_new = CCPotentials::compute_pair_correlation_energy(world, result, gs_singles, info);\n        else if (result.type == EXCITED_STATE) omega_new = CCPotentials::compute_excited_pair_energy(world, result, ex_singles, info);\n        double delta = omega_partial - omega_new;\n        omega_partial = omega_new;\n\n        if (world.rank()==0)\n            print_convergence(pair.name(),rmsresidual,rmsresidual,delta,iter);\n\n        // output(\"\\n--Iteration \" + stringify(iter) + \" ended--\");\n        // save(result.function(), result.name());\n        // timer_mp2.info();\n        bool converged=(rmsresidual < info.parameters.dconv_6D())  and (fabs(delta) < info.parameters.econv_pairs());\n        if (converged) {\n            if (world.rank()==0) print(\"Iteration converged after\",iter,\"iterations\");\n            break;\n        } else {\n            if (world.rank()==0) print(\"Iteration not converged after\",iter,\"iterations\");\n        }\n    }\n    return result;\n}\n\n\nmadness::real_function_6d\nCCPotentials::make_constant_part_cispd(const CCPair& u, const CC_vecfunction& x,\n                                       const real_convolution_6d *Gscreen) const {\n    output.section(\"Make Constant Part of \" + assign_name(u.ctype) + \" for pair \" + u.name() + \": Q-Ansatz\");\n    CCTimer time(world, \"Constant Part\");\n    MADNESS_ASSERT(u.ctype == CT_CISPD || u.ctype == CT_ADC2);\n    const size_t i = u.i;\n    const size_t j = u.j;\n    const CCFunction<double,3>& xi = x(i);\n    const CCFunction<double,3>& xj = x(j);\n    const CCFunction<double,3>& moi = mo_ket_(i);\n    const CCFunction<double,3>& moj = mo_ket_(j);\n    const bool symmetric = (i == j);\n    MADNESS_ASSERT(x.type == RESPONSE);\n    MADNESS_ASSERT(u.bsh_eps == get_epsilon(i, j) + x.omega);\n    //MADNESS_ASSERT(not parameters.QtAnsatz());\n    if (parameters.QtAnsatz()) output.warning(\"Demanded Constant Part with Q Ansatz, but parameter QtAnsatz is true\");\n\n    // timers\n    CCTimer time_fr(world, \"Functional Response\");\n    CCTimer time_cr(world, \"Coulomb Response\");\n    real_function_6d GV;\n    real_convolution_6d G = BSHOperator<6>(world, sqrt(-2.0 * u.bsh_eps), parameters.lo(), parameters.thresh_bsh_6D());\n    G.destructive() = true;\n    {\n        time_fr.start();\n        real_function_6d V;\n        const real_function_6d Vxm = apply_Vreg(xi, moj, Gscreen);\n        if (symmetric) V = Vxm;\n        else V = Vxm + apply_Vreg(moi, xj, Gscreen);\n\n        print_size(V, \"Vreg\", parameters.debug());\n        V = apply_Q12t(V, mo_ket_);\n        print_size(V, \"QVreg\");\n        const real_function_6d GVtmp = -2.0 * apply_G(V, G);\n        if (symmetric) GV = GVtmp + swap_particles(GVtmp);\n        else GV = GVtmp;\n\n        time_fr.stop();\n    }     // now the response of the CC2 coupling potential\n    // - (O1xQ2 + Q1O2x)g12|ij>\n    real_function_6d GVcc;\n    {\n        time_cr.start();\n        const CCPairFunction<double,6> gij(g12, moi, moj);\n        const CCPairFunction<double,6> O1x_gij = apply_Ot(gij, x, 1);\n        const CCPairFunction<double,6> OQ_part = apply_Qt(O1x_gij, mo_ket_, 2);\n        const real_function_6d GOQ = -2.0 * apply_G(OQ_part, G);\n        if (symmetric) GVcc = GOQ + swap_particles(GOQ);\n        else {\n            const CCPairFunction<double,6> O2x_gij = apply_Ot(gij, x, 2);\n            const CCPairFunction<double,6> QO_part = apply_Qt(O2x_gij, mo_ket_, 1);\n            const real_function_6d GQO = -2.0 * apply_G(QO_part, G);\n            GVcc = GOQ + GQO;\n        }\n        time_cr.stop();\n    }\n    real_function_6d result = GV - GVcc;\n    if (parameters.debug()) print_size(result, \"constant-part\", parameters.debug());\n\n    result = apply_Q12t(result, mo_ket_);\n    if (parameters.debug()) result.print_size(\"QConstant-Part\");\n\n    time_fr.info(true, GV.norm2());\n    time_cr.info(true, GVcc.norm2());\n    time.info(true, result.norm2());\n    return result;\n}\n\nmadness::real_function_6d\nCCPotentials::make_constant_part_cispd_Qt(const CCPair& u, const CC_vecfunction& x,\n                                          const real_convolution_6d *Gscreen) const {\n    output.section(\"Make Constant Part of \" + assign_name(u.ctype) + \" for pair \" + u.name() + \": Qt-Ansatz\");\n    CCTimer time(world, \"Constant Part\");\n    MADNESS_ASSERT(u.ctype == CT_CISPD || u.ctype == CT_ADC2);\n    const size_t i = u.i;\n    const size_t j = u.j;\n    const CCFunction<double,3>& xi = x(i);\n    const CCFunction<double,3>& xj = x(j);\n    const CCFunction<double,3>& moi = mo_ket_(i);\n    const CCFunction<double,3>& moj = mo_ket_(j);\n    const bool symmetric = (i == j);\n    MADNESS_ASSERT(x.type == RESPONSE);\n    MADNESS_ASSERT(u.bsh_eps == get_epsilon(i, j) + x.omega);\n    //MADNESS_ASSERT(parameters.QtAnsatz());\n    if (!parameters.QtAnsatz()) output.warning(\"Demanded Constant Part with Qt Ansatz, but parameter QtAnsatz is false\");\n\n    CCTimer time_FR(world, \"Functional Response\");\n    CCTimer time_PR(world, \"Projector Response\");\n    CCTimer time_CFR(world, \"Commutator Functional Response\");\n    CCTimer time_CPR(world, \"Commutator Projector Response\");\n    real_function_6d FR;\n    real_function_6d PR;\n    real_function_6d CFR;\n    real_function_6d CPR;\n    real_convolution_6d G = BSHOperator<6>(world, sqrt(-2.0 * u.bsh_eps), parameters.lo(), parameters.thresh_bsh_6D());\n    G.destructive() = true;\n    // Response of the Projector from Q12tf12|titj> --> (-O1x - O2x + O1xO2 + O1O2x)Vreg|ij> = -(O1xQ+QO2x)Vreg|ij>\n    {\n        time_PR.start();\n        // here is an inconsistency: The Vreg potential will apply (F-ei) to the two hole states but we have here (F-eij-omega)\n        // in the future this part here is supposed to be entirely 3D and not use the 6D apply_Vreg function, so right now this is a workaround\n        // however, we have to add the missing -omega*f12|ij>\n        real_function_6d Vtmp = apply_Vreg(moi, moj, Gscreen);\n        real_function_6d f12omegaij = make_f_xy(moi, moj);\n        f12omegaij.scale(x.omega);\n        f12omegaij.print_size(\"omega*f12|ij>\");\n        Vtmp = Vtmp - f12omegaij;\n        Vtmp.truncate().reduce_rank();\n        if (parameters.debug()) Vtmp.print_size(\"Vreg-omega*f12|ij>\");\n\n        const CCPairFunction<double,6> V(Vtmp);\n        const CCPairFunction<double,6> O1x_V = apply_Ot(V, x, 1);\n        const CCPairFunction<double,6> O1xQ2_V = apply_Qt(O1x_V, mo_ket_, 2);\n        const real_function_6d GOQ = -2.0 * apply_G(O1xQ2_V, G);\n        if (symmetric) PR = GOQ + swap_particles(GOQ);\n        else {\n            const CCPairFunction<double,6> O2x_V = apply_Ot(V, x, 2);\n            const CCPairFunction<double,6> Q1O2x_V = apply_Qt(O2x_V, mo_ket_, 1);\n            const real_function_6d GQO = -2.0 * apply_G(Q1O2x_V, G);\n            PR = GOQ + GQO;\n        }\n        time_PR.stop();\n    }        //      print_size(GQR,\"projector-response\",parameters.debug());\n    //      GQR = apply_Qt(GQR,mo_ket_);\n    //      print_size(GQR,\"projector-response\",parameters.debug());\n    //      time_QR.info(true,GQR.norm2());\n    // function response\n    {\n        time_FR.start();\n        real_function_6d V;\n        const real_function_6d Vxm = apply_Vreg(xi, moj, Gscreen);\n        if (symmetric) V = Vxm;\n        else V = Vxm + apply_Vreg(moi, xj, Gscreen);\n\n        print_size(V, \"Vreg\", parameters.debug());\n        V = apply_Q12t(V, mo_ket_);\n        print_size(V, \"QVreg\");\n        const real_function_6d GVtmp = -2.0 * apply_G(V, G);\n        if (symmetric) FR = GVtmp + swap_particles(GVtmp);\n        else FR = GVtmp;\n\n        time_FR.stop();\n    }\n    //      print_size(GV,\"GVreg\",parameters.debug());\n    //      GV=apply_Qt(GV,mo_ket_);\n    //      print_size(GV,\"GVreg\",parameters.debug());\n    //      time_GV.info(true,GV.norm2());\n    {\n        time_CFR.start();\n        CFR = real_factory_6d(world);\n        time_CFR.stop();\n    }     // make Commutator Projector response Response: [F,d/dtau(Qt)] part of d/dtau{([F,Qt])f12|xitj + tixj>}\n    // {-O1x[F,Q2t] - Q1t[F,O2x] - [F,O1x]Q2t - [F,Q1t]O2x , used d/dtau(Qt) = -Ox\n    //  O1x[F,O2t] - Q1t[F,O2x] - [F,O1x]Q2t + [F,O1t]O2x ,  used [F,Qt] = -[F,Ot]\n    //  -O1x*O2Vt + Q1t*(O2Vx - omega*O2x) + (O1Vx-omega*O1x)Q2t - O1Vt*O2x , used [F,Ot] = -OVt and [F,Ox] = -(OVx - omega*Ox)\n    // part1 = 01xO2Vt*f12|titj>\n    // part2 = (O1Vx-omega*O1x)Q2t*f12|titj>\n    // and then the same for 1 and 2 switched\n    // }f12|titj>\n    // Vt is zero for CIS(D) since there are no ground state singles\n    CCTimer time_cpr(world, \"Commutator-Projector Response\");\n    {\n        time_CPR.start();\n        const vector_real_function_3d Vxtmp = sub(world, get_potentials(x, POT_singles_,true),\n                                                  x.omega * x.get_vecfunction());\n        const CC_vecfunction Vx(Vxtmp, UNDEFINED, parameters.freeze());\n        CCPairFunction<double,6> ftt(f12, moi, moj);\n        real_function_6d tmp1;\n        real_function_6d tmp2;\n        {\n            CCPairFunction<double,6> OVx = apply_Ot(ftt, Vx, 1);\n            CCPairFunction<double,6> OVxQt = apply_Qt(OVx, mo_ket_, 2);\n            real_function_6d part2 = -2.0 * apply_G(OVxQt, G);\n            tmp1 = part2;\n        }\n        if (symmetric) tmp2 = swap_particles(tmp1);\n        else {\n            CCPairFunction<double,6> OVx = apply_Ot(ftt, Vx, 2);\n            CCPairFunction<double,6> OVxQt = apply_Qt(OVx, mo_ket_, 1);\n            real_function_6d part2 = -2.0 * apply_G(OVxQt, G);\n            tmp2 = part2;\n        }\n        CPR = tmp1 + tmp2;\n        time_CPR.stop();\n    }\n    real_function_6d result = FR - PR + CFR + CPR;\n    print_size(result, \"constant-part\", parameters.debug());\n    result = apply_Q12t(result, mo_ket_);\n    print_size(result, \"constant-part\", parameters.debug());\n    output.section(\"Constant Term for Pair \" + u.name() + \" ended\");\n    time_FR.info(true, FR.norm2());\n    time_PR.info(true, PR.norm2());\n    time_CFR.info(true, CFR.norm2());\n    time_CPR.info(true, CPR.norm2());\n    result.print_size(\"Constant Term\");\n    time.info(true, result.norm2());\n    return result;\n}\n\nmadness::real_function_6d\nCCPotentials::apply_Vreg(const CCFunction<double,3>& ti, const CCFunction<double,3>& tj, const real_convolution_6d *Gscreen) const {\n    output(\"Applying Vreg to |\" + ti.name() + tj.name() + \">\");\n    CCTimer timer(world, \"Vreg|\" + ti.name() + tj.name() + \">\");\n    CCTimer time_f(world, \"F-Part\");\n    const real_function_6d F_part = apply_reduced_F1(ti, tj, Gscreen);\n    time_f.stop();\n    CCTimer time_u(world, \"U-Part\");\n    const real_function_6d U_part = apply_transformed_Ue(ti, tj, Gscreen);\n    time_u.stop();\n    CCTimer time_k(world, \"K-Part\");\n    const real_function_6d K_part = apply_exchange_commutator(ti, tj);     // maybe use screening later\n    time_k.stop();\n    const real_function_6d result = F_part + U_part - K_part;\n    if (parameters.debug()) F_part.print_size(\"F-Part\");\n\n    if (parameters.debug()) U_part.print_size(\"U-Part\");\n\n    if (parameters.debug()) K_part.print_size(\"K-Part\");\n\n    time_f.info(true, F_part.norm2());\n    time_u.info(true, U_part.norm2());\n    time_k.info(true, K_part.norm2());\n    if (parameters.debug()) result.print_size(\"Vreg|\" + ti.name() + tj.name() + \">\");\n\n    timer.info(true, result.norm2());\n    return result;\n}\n\n\n/// Apply the Regularization potential\n\n/// four terms can be calculated\n/// \\f$ V_{reg} = [ U_e - [K,f12] + f12(F12-eij) + [F,Qt] ]|titj> \\f$\n///   - Ue = [T,f12]\n///   - [K,f12]\n///   - [F12,Q12t] f12 or  [F12,dQ12t] f12\n///   - f12 (F - e_ij - omega) or f12 (F - e_ij)\n///  the last terms are computed using the converged singles potential, i.e. we assume that the following equation holds\n///  (see Kottmann et al., JCTC 13, 5945 (2017) eqs (30), (31), (44)\n///  (see Kottmann et al., JCTC 13, 5956 (2017) eqs (17), (19), (32)\n///  CC2:   (F - e_i ) |t_i t_j> = | Vtau >\n///  LRCC2: (F - e_i - omega) |x_i> = | Vx >\n/// @param[in] ti first function in the ket, for MP2 it is the Orbital, for CC2 the relaxed Orbital t_i=\\phi_i + \\tau_i\n/// @param[in] tj second function in the ket ...\n/// @param[in] gs_singles the converged ground state singles: with   (F - e_i ) |t_i t_j> = | Vtau >\n/// @param[in] ex_singles the converged excited state singles: with (F - e_i - omega) |x_i> = | Vx >\n/// @param[in] info Info structure holding the applied singles potentials Vtau and Vx and reference orbitals\n/// @param[out] the regularization potential (unprojected), see equation above\nstd::vector<CCPairFunction<double,6>>\n    CCPotentials::apply_Vreg(World& world, const CCFunction<double,3>& ti, const CCFunction<double,3>& tj,\n                          const CC_vecfunction& gs_singles, const CC_vecfunction& ex_singles,\n                          const Info& info, const std::vector<std::string>& argument, const double bsh_eps) {\n\n    const auto parameters=info.parameters;\n    if (parameters.debug() and (world.rank()==0)) {\n        print(\"computing the following terms in constant_part for pair: (\",ti.name(),\",\", tj.name(),\"):\" , argument);\n    }\n\n    real_convolution_6d Gscreen = BSHOperator<6>(world, sqrt(-2.0 * bsh_eps),\n                                                 parameters.lo(), parameters.thresh_bsh_6D());\n    Gscreen.modified() = true;\n\n    auto exists=[&](const std::string term) {\n        return std::find(argument.begin(), argument.end(), term) != argument.end();\n    };\n\n    // calculate the regularized potential\n    real_function_6d V=real_factory_6d(world);\n    std::vector<CCPairFunction<double,6>> V_lowrank;\n    if (exists(\"Ue\")) V += apply_Ue(world,ti,tj,info,&Gscreen);\n    if (exists(\"KffK\")) V -= apply_KffK(world,ti,tj,info,&Gscreen);\n    if (exists(\"reduced_Fock\")) V += apply_reduced_F(world,ti,tj,info,&Gscreen);\n    if (exists(\"comm_F_Qt_f12\")) {\n        V_lowrank += apply_commutator_F_Qt_f12(world,ti,tj,gs_singles,ex_singles,info,&Gscreen);\n    }\n    if (exists(\"comm_F_dQt_f12\")) {\n        V_lowrank += apply_commutator_F_dQt_f12(world,ti,tj,gs_singles,ex_singles,info,&Gscreen);\n    }\n    V.truncate().reduce_rank();\n    if (parameters.debug()) {\n        V.print_size(\"Vreg -- pure component\");\n        print(\"V_lowrank.size()\",V_lowrank.size());\n    }\n\n    std::vector<CCPairFunction<double, 6>> result;\n    if (V.tree_size()>0) result+=CCPairFunction<double,6>(V);\n    result+=V_lowrank;\n    return result;\n\n}\n\nmadness::real_function_6d\nCCPotentials::apply_Vreg_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                                   const std::vector<real_function_3d>& mo_bra,\n                                   const CCParameters& parameters, const real_function_3d& Rsquare,\n                                   const std::vector<real_function_3d>& U1, const size_t& i, const size_t& j,\n                                   const FuncType& x_type, const FuncType& y_type, const std::vector<std::string> argument,\n                                   const real_convolution_6d *Gscreen) {\n    const real_function_3d& x_ket = mo_ket[i];\n    const real_function_3d& y_ket = mo_ket[j];\n    const real_function_3d& x_bra = mo_bra[i];\n    const real_function_3d& y_bra = mo_bra[j];\n\n    const std::string x_name = \"phi\" + stringify(i);\n    const std::string y_name = \"phi\" + stringify(j);\n\n    // print(\"Applying Vreg to |\" + x_name + y_name + \">\\n\");\n    CCTimer timer(world, \"Vreg|\" + x_name + y_name + \">\");\n    //CCTimer time_f(world, \"F-Part\");\n    //const real_function_6d F_part = apply_reduced_F(ti, tj, Gscreen);\n    //time_f.stop();\n    real_function_6d result = real_factory_6d(world);\n    bool do_Ue=std::find(argument.begin(), argument.end(), \"Ue\") != argument.end();\n    bool do_KffK=std::find(argument.begin(), argument.end(), \"KffK\") != argument.end();\n    bool do_f12phi=std::find(argument.begin(), argument.end(), \"f12phi\") != argument.end();\n    MADNESS_CHECK(do_Ue or do_KffK or do_f12phi);\n    MADNESS_CHECK(do_f12phi xor (do_Ue or do_KffK));\n    if (do_Ue) {\n        CCTimer time_u(world, \"U-Part\");\n        const real_function_6d U_part = apply_transformed_Ue_macrotask(world, mo_ket, parameters, Rsquare,\n                                                                       U1, i, j, x_type, y_type, Gscreen);\n        if (parameters.debug()) U_part.print_size(\"U-Part\");\n        result+=U_part;\n        time_u.stop();\n        time_u.info(true, U_part.norm2());\n    }\n    if (do_KffK) {\n        CCTimer time_k(world, \"K-Part\");\n        const real_function_6d K_part = apply_exchange_commutator_macrotask(world, mo_ket, mo_bra, Rsquare,\n                                                                            i, j, parameters, x_type, y_type, Gscreen);\n        if (parameters.debug()) K_part.print_size(\"K-Part\");\n        result-=K_part;\n        time_k.stop();\n        time_k.info(true, K_part.norm2());\n    }\n    if (do_f12phi) {\n        CCTimer time_f(world, \"f12phi-Part\");\n        const real_function_6d f12phi = make_f_xy_macrotask(world, x_ket, y_ket, x_bra, y_bra, i, j, parameters, x_type, y_type, Gscreen);\n        if (parameters.debug()) f12phi.print_size(\"f12phi-Part\");\n        result+=f12phi;\n        time_f.stop();\n        time_f.info(true, f12phi.norm2());\n    }\n\n    if (parameters.debug()) result.print_size(\"Vreg|\" + x_name + y_name + \">\");\n\n    timer.info(true, result.norm2());\n    return result;\n}\n\nmadness::real_function_6d\nCCPotentials::apply_reduced_F1(const CCFunction<double,3>& ti, const CCFunction<double,3>& tj, const real_convolution_6d *Gscreen) const {\n    //CC_Timer time(world,\"(F-eij)|\"+ti.name()+tj.name()+\">\");\n    // get singles potential\n    const bool symmetric = (ti.type == tj.type && ti.i == tj.i);\n    const real_function_3d Vti = get_potentials(ti, POT_singles_,true);\n    const real_function_3d Vtj = get_potentials(tj, POT_singles_,true);\n    const real_function_6d Vt = make_f_xy(Vti, tj, Gscreen);\n    real_function_6d tV;\n    if (symmetric) tV = swap_particles(Vt);\n    else tV = make_f_xy(ti, Vtj, Gscreen);\n\n    const real_function_6d result = -1.0 * (Vt + tV);\n    //result.print_size(\"(F-eij)|\"+ti.name()+tj.name()+\">\");\n    //time.info();\n    return result;\n}\n\n/// compute the reduced Fock term, either with or without the omega term\n/// using Eqs (33) and (34) of Kottmann et al., JCTC 13, 5956 (2017)\n/// f12 (F12 - e_ij) |ti tj>\n/// f12 (F12 - e_ij - omega) |ti xj>\nmadness::real_function_6d\nCCPotentials::apply_reduced_F(World& world, const CCFunction<double,3>& ti, const CCFunction<double,3>& tj,\n                              const Info& info, const real_convolution_6d *Gscreen) {\n    //CC_Timer time(world,\"(F-eij)|\"+ti.name()+tj.name()+\">\");\n    // get singles potential\n    const bool symmetric = (ti == tj);\n    const real_function_3d Vti = info.intermediate_potentials(ti, POT_singles_,true);\n    const real_function_3d Vtj = info.intermediate_potentials(tj, POT_singles_,true);\n    const real_function_6d Vt = make_f_xy(world, Vti, tj, info, Gscreen);\n    real_function_6d tV;\n    if (symmetric) tV = madness::swap_particles(Vt);\n    else tV = make_f_xy(world, ti, Vtj, info, Gscreen);\n\n    const real_function_6d result = -1.0 * (Vt + tV);\n    return result;\n}\n\nmadness::real_function_6d\nCCPotentials::apply_transformed_Ue(const CCFunction<double,3>& x, const CCFunction<double,3>& y, const real_convolution_6d *Gscreen) const {\n    if (parameters.debug()) output(\"\\nComputing Ue|\" + x.name() + y.name() + \">\\n\");\n\n    const bool symmetric = (x.type == y.type && x.i == y.i);\n    CCTimer time_Ue(world, \"Ue|\" + x.name() + y.name() + \">\");\n    double tight_thresh = parameters.thresh_6D();     // right now this is the std. thresh\n    // check if screening operator is in modified NS Form\n    if (Gscreen != NULL) {\n        if (!Gscreen->modified()) error(\"Demanded Screening for Ue but given BSH Operator is not in modified NS form\");\n    }\n    if (parameters.debug()) output(\"Applying transformed Ue to \" + x.name() + y.name());\n\n    if (parameters.debug() && symmetric) output(\"Exploiting Pair Symmetry\");\n\n    real_function_6d Uxy = real_factory_6d(world);\n    Uxy.set_thresh(tight_thresh);\n    // Apply the untransformed U Potential\n    Uxy = corrfac.apply_U(x.function, y.function, *Gscreen, symmetric);\n    Uxy.set_thresh(tight_thresh);\n    // Apply the double commutator R^{-1}[[T,f,R]\n    for (size_t axis = 0; axis < 3; axis++) {\n        // Make the local parts of the Nuclear and electronic U potentials\n        const real_function_3d Un_local = nemo_->ncf->U1(axis);\n        const real_function_3d Un_local_x = (Un_local * x.function).truncate();\n        real_function_3d Un_local_y;\n        if (symmetric) Un_local_y = copy(Un_local_x);\n        else Un_local_y = (Un_local * y.function).truncate();\n\n        const real_function_6d Ue_local = corrfac.U1(axis);\n        // Now add the Un_local_x part to the first particle of the Ue_local potential\n        real_function_6d UeUnx = CompositeFactory<double, 6, 3>(world).g12(Ue_local).particle1(Un_local_x).particle2(\n                copy(y.function)).thresh(tight_thresh);\n        // Fill the Tree where it will be necessary\n        UeUnx.fill_cuspy_tree(*Gscreen);\n        // Set back the thresh\n        UeUnx.set_thresh(FunctionDefaults<6>::get_thresh());\n        print_size(UeUnx, \"UeUnx\", parameters.debug());\n        // Now add the Un_local_y part to the second particle of the Ue_local potential\n        real_function_6d UeUny;\n        if (symmetric) UeUny = -1.0 * swap_particles(UeUnx);     // Ue_local is antisymmetric\n        else {\n            UeUny = CompositeFactory<double, 6, 3>(world).g12(Ue_local).particle1(copy(x.function)).particle2(\n                    Un_local_y).thresh(tight_thresh);\n            // Fill the Tree were it will be necessary\n            UeUny.fill_cuspy_tree(*Gscreen);\n            // Set back the thresh\n            UeUny.set_thresh(FunctionDefaults<6>::get_thresh());\n        }\n        print_size(UeUny, \"UeUny\", parameters.debug());\n        // Construct the double commutator part and add it to the Ue part\n        real_function_6d diff = (UeUnx - UeUny).scale(-1.0);\n        diff.truncate();\n        Uxy = (Uxy + diff).truncate();\n    }\n    if (parameters.debug()) time_Ue.info();\n\n    // sanity check: <xy|R2 [T,g12] |xy> = <xy |R2 U |xy> - <xy|R2 g12 | xy> = 0\n    CCTimer time_sane(world, \"Ue-Sanity-Check\");\n    real_function_6d tmp = CompositeFactory<double, 6, 3>(world).particle1(\n            copy(x.function * nemo_->ncf->square())).particle2(copy(y.function * nemo_->ncf->square()));\n    const double a = inner(Uxy, tmp);\n    const real_function_3d xx = (x.function * x.function * nemo_->ncf->square());\n    const real_function_3d yy = (y.function * y.function * nemo_->ncf->square());\n    const real_function_3d gxx = (*g12)(xx);\n    const double aa = inner(yy, gxx);\n    const double error = std::fabs(a - aa);\n    const double diff = a - aa;\n    time_sane.info(parameters.debug(), error);\n    if (world.rank() == 0) {\n        std::cout << std::fixed << std::setprecision(10) << \"<\" << x.name() + y.name() << \"|U_R|\" << x.name() + y.name()\n                  << \"> =\" << a << \", <\" << x.name() + y.name() << \"|g12|\" << x.name() + y.name()\n                  << \"> =\" << aa << \", diff=\" << error << \"\\n\";\n        //printf(\"<xy| U_R |xy>  %12.8f\\n\",a);\n        //printf(\"<xy|1/r12|xy>  %12.8f\\n\",aa);\n        if (error > FunctionDefaults<6>::get_thresh() * 10.0) output.warning(\"Ue Potential plain wrong!\");\n        else if (error > FunctionDefaults<6>::get_thresh()) output.warning(\"Ue Potential wrong!!!!\");\n        else output(\"Ue seems to be sane, diff=\" + std::to_string(diff));\n    }\n    return Uxy;\n}\n\n\nmadness::real_function_6d\nCCPotentials::apply_Ue(World& world, const CCFunction<double,3>& phi_i, const CCFunction<double,3>& phi_j,\n        const Info& info, const real_convolution_6d *Gscreen) {\n\n    const std::string x_name = phi_i.name();\n    const std::string y_name = phi_j.name();\n    const auto& parameters=info.parameters;\n\n    if (parameters.debug()) print(\"Computing Ue|\" + x_name + y_name + \">\");\n\n    real_function_3d x_function=phi_i.function;\n    real_function_3d y_function=phi_j.function;\n    CorrelationFactor corrfac(world, parameters.gamma(), 1.e-7, parameters.lo());\n\n    const bool symmetric = (phi_i.type == phi_j.type && phi_i.i == phi_j.i);\n    CCTimer time_Ue(world, \"Ue|\" + x_name + y_name + \">\");\n    double tight_thresh = parameters.thresh_6D();     // right now this is the std. thresh\n    // check if screening operator is in modified NS Form\n    if (Gscreen != NULL) {\n        if (!Gscreen->modified()) error(\"Demanded Screening for Ue but given BSH Operator is not in modified NS form\");\n    }\n    if (parameters.debug()) print(\"Applying transformed Ue to \\n\" + x_name + y_name);\n\n    if (parameters.debug() && symmetric) print(\"Exploiting Pair Symmetry\\n\");\n\n    real_function_6d Uxy = real_factory_6d(world);\n    Uxy.set_thresh(tight_thresh);\n    // Apply the untransformed U Potential\n    Uxy = corrfac.apply_U(x_function, y_function, *Gscreen, symmetric);\n    Uxy.set_thresh(tight_thresh);\n    // Apply the double commutator R^{-1}[[T,f,R]\n    for (size_t axis = 0; axis < 3; axis++) {\n        // Make the local parts of the Nuclear and electronic U potentials\n        const real_function_3d Un_local = info.U1[axis];\n        const real_function_3d Un_local_x = (Un_local * x_function).truncate();\n        real_function_3d Un_local_y;\n        if (symmetric) Un_local_y = copy(Un_local_x);\n        else Un_local_y = (Un_local * y_function).truncate();\n\n        const real_function_6d Ue_local = corrfac.U1(axis);\n        // Now add the Un_local_x part to the first particle of the Ue_local potential\n        real_function_6d UeUnx = CompositeFactory<double, 6, 3>(world).g12(Ue_local).particle1(Un_local_x).particle2(\n                copy(y_function)).thresh(tight_thresh);\n        // Fill the Tree where it will be necessary\n        UeUnx.fill_cuspy_tree(*Gscreen);\n        // Set back the thresh\n        UeUnx.set_thresh(FunctionDefaults<6>::get_thresh());\n//        print_size(UeUnx, \"UeUnx\", parameters.debug());\n        // Now add the Un_local_y part to the second particle of the Ue_local potential\n        real_function_6d UeUny;\n        if (symmetric) UeUny = -1.0 * madness::swap_particles(UeUnx);     // Ue_local is antisymmetric\n        else {\n            UeUny = CompositeFactory<double, 6, 3>(world).g12(Ue_local).particle1(copy(x_function)).particle2(\n                    Un_local_y).thresh(tight_thresh);\n            // Fill the Tree were it will be necessary\n            UeUny.fill_cuspy_tree(*Gscreen);\n            // Set back the thresh\n            UeUny.set_thresh(FunctionDefaults<6>::get_thresh());\n        }\n//        print_size(UeUny, \"UeUny\", parameters.debug());\n        // Construct the double commutator part and add it to the Ue part\n        real_function_6d diff = (UeUnx - UeUny).scale(-1.0);\n        diff.truncate();\n        Uxy = (Uxy + diff).truncate();\n    }\n    if (parameters.debug()) time_Ue.info();\n\n    // sanity check: <xy|R2 [T,g12] |xy> = <xy |R2 U |xy> - <xy|R2 g12 | xy> = 0\n    CCTimer time_sane(world, \"Ue-Sanity-Check\");\n    real_function_6d tmp = CompositeFactory<double, 6, 3>(world).particle1(\n            copy(x_function * info.R_square)).particle2(copy(y_function * info.R_square));\n    const double a = inner(Uxy, tmp);\n    const real_function_3d xx = (x_function * x_function * info.R_square);\n    const real_function_3d yy = (y_function * y_function * info.R_square);\n//    const real_function_3d gxx = g12(xx);\n    real_convolution_3d poisson= CoulombOperator(world,parameters.lo(),parameters.thresh_3D());\n    const real_function_3d gxx= poisson(xx);\n\n    const double aa = inner(yy, gxx);\n    const double error = std::fabs(a - aa);\n    const double diff = a - aa;\n    time_sane.info(parameters.debug(), error);\n    if (world.rank() == 0) {\n        std::cout << std::fixed << std::setprecision(10) << \"<\" << x_name + y_name << \"|U_R|\" << x_name + y_name\n                  << \"> =\" << a << \", <\" << x_name + y_name << \"|g12|\" << x_name + y_name\n                  << \"> =\" << aa << \", diff=\" << error << \"\\n\";\n        //printf(\"<xy| U_R |xy>  %12.8f\\n\",a);\n        //printf(\"<xy|1/r12|xy>  %12.8f\\n\",aa);\n        if (error > FunctionDefaults<6>::get_thresh() * 10.0) std::cout << (\"Ue Potential plain wrong!\\n\");\n        else if (error > FunctionDefaults<6>::get_thresh()) std::cout << (\"Ue Potential wrong!!!!\\n\");\n        else std::cout << (\"Ue seems to be sane, diff=\" + std::to_string(diff)) << std::endl;\n    }\n    return Uxy;\n}\n\nmadness::real_function_6d\nCCPotentials::apply_transformed_Ue_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                                             const CCParameters& parameters, const real_function_3d& Rsquare,\n                                             const std::vector<real_function_3d>& U1, const size_t& i, const size_t& j,\n                                             const FuncType& x_type, const FuncType& y_type, const real_convolution_6d *Gscreen) {\n    const std::string x_name = \"phi\" + stringify(i);\n    const std::string y_name = \"phi\" + stringify(j);\n\n    if (parameters.debug()) print(\"Computing Ue|\" + x_name + y_name + \">\");\n\n    real_function_3d x_function=mo_ket[i];\n    real_function_3d y_function=mo_ket[j];\n    CorrelationFactor corrfac(world, parameters.gamma(), 1.e-7, parameters.lo());\n\n    const bool symmetric = (x_type == y_type && i == j);\n    CCTimer time_Ue(world, \"Ue|\" + x_name + y_name + \">\");\n    double tight_thresh = parameters.thresh_6D();     // right now this is the std. thresh\n    // check if screening operator is in modified NS Form\n    if (Gscreen != NULL) {\n        if (!Gscreen->modified()) error(\"Demanded Screening for Ue but given BSH Operator is not in modified NS form\");\n    }\n    if (parameters.debug()) print(\"Applying transformed Ue to \\n\" + x_name + y_name);\n\n    if (parameters.debug() && symmetric) print(\"Exploiting Pair Symmetry\\n\");\n\n    real_function_6d Uxy = real_factory_6d(world);\n    Uxy.set_thresh(tight_thresh);\n    // Apply the untransformed U Potential\n    Uxy = corrfac.apply_U(x_function, y_function, *Gscreen, symmetric);\n    Uxy.set_thresh(tight_thresh);\n    // Apply the double commutator R^{-1}[[T,f,R]\n    for (size_t axis = 0; axis < 3; axis++) {\n        // Make the local parts of the Nuclear and electronic U potentials\n        const real_function_3d Un_local = U1[axis];\n        const real_function_3d Un_local_x = (Un_local * x_function).truncate();\n        real_function_3d Un_local_y;\n        if (symmetric) Un_local_y = copy(Un_local_x);\n        else Un_local_y = (Un_local * y_function).truncate();\n\n        const real_function_6d Ue_local = corrfac.U1(axis);\n        // Now add the Un_local_x part to the first particle of the Ue_local potential\n        real_function_6d UeUnx = CompositeFactory<double, 6, 3>(world).g12(Ue_local).particle1(Un_local_x).particle2(\n                copy(y_function)).thresh(tight_thresh);\n        // Fill the Tree where it will be necessary\n        UeUnx.fill_cuspy_tree(*Gscreen);\n        // Set back the thresh\n        UeUnx.set_thresh(FunctionDefaults<6>::get_thresh());\n//        print_size(UeUnx, \"UeUnx\", parameters.debug());\n        // Now add the Un_local_y part to the second particle of the Ue_local potential\n        real_function_6d UeUny;\n        if (symmetric) UeUny = -1.0 * madness::swap_particles(UeUnx);     // Ue_local is antisymmetric\n        else {\n            UeUny = CompositeFactory<double, 6, 3>(world).g12(Ue_local).particle1(copy(x_function)).particle2(\n                    Un_local_y).thresh(tight_thresh);\n            // Fill the Tree were it will be necessary\n            UeUny.fill_cuspy_tree(*Gscreen);\n            // Set back the thresh\n            UeUny.set_thresh(FunctionDefaults<6>::get_thresh());\n        }\n//        print_size(UeUny, \"UeUny\", parameters.debug());\n        // Construct the double commutator part and add it to the Ue part\n        real_function_6d diff = (UeUnx - UeUny).scale(-1.0);\n        diff.truncate();\n        Uxy = (Uxy + diff).truncate();\n    }\n    if (parameters.debug()) time_Ue.info();\n\n    // sanity check: <xy|R2 [T,g12] |xy> = <xy |R2 U |xy> - <xy|R2 g12 | xy> = 0\n    CCTimer time_sane(world, \"Ue-Sanity-Check\");\n    real_function_6d tmp = CompositeFactory<double, 6, 3>(world).particle1(\n            copy(x_function * Rsquare)).particle2(copy(y_function * Rsquare));\n    const double a = inner(Uxy, tmp);\n    const real_function_3d xx = (x_function * x_function * Rsquare);\n    const real_function_3d yy = (y_function * y_function * Rsquare);\n//    const real_function_3d gxx = g12(xx);\n    real_convolution_3d poisson= CoulombOperator(world,parameters.lo(),parameters.thresh_3D());\n    const real_function_3d gxx= poisson(xx);\n\n    const double aa = inner(yy, gxx);\n    const double error = std::fabs(a - aa);\n    const double diff = a - aa;\n    time_sane.info(parameters.debug(), error);\n    if (world.rank() == 0) {\n        std::cout << std::fixed << std::setprecision(10) << \"<\" << x_name + y_name << \"|U_R|\" << x_name + y_name\n                  << \"> =\" << a << \", <\" << x_name + y_name << \"|g12|\" << x_name + y_name\n                  << \"> =\" << aa << \", diff=\" << error << \"\\n\";\n        //printf(\"<xy| U_R |xy>  %12.8f\\n\",a);\n        //printf(\"<xy|1/r12|xy>  %12.8f\\n\",aa);\n        if (error > FunctionDefaults<6>::get_thresh() * 10.0) std::cout << (\"Ue Potential plain wrong!\\n\");\n        else if (error > FunctionDefaults<6>::get_thresh()) std::cout << (\"Ue Potential wrong!!!!\\n\");\n        else std::cout << (\"Ue seems to be sane, diff=\" + std::to_string(diff)) << std::endl;\n    }\n    return Uxy;\n}\n\n\n/// calculate [F,Qt] f12 |rhs>\n\n/// From Eqs. (42) - (44) of Kottmann et al. JCTC 13, 5945 (2017)\n/// and eq. (30) of Kottmann et al. JCTC 13, 5956 (2017)\n/// [F,Qt] = [F1,Q1t]Q2t + Q1t [F2,Q2t]\n/// and [F1,Q1t] = - [F1,O1t] = - (F-e_k) |tk><k| = - (F-e_k) |tauk><k| = |Vk><k|\n/// commutator is applied to f12|titj>\n/// @return the commutator [F,Qt] f12 |phi_i phi_j>\nmadness::CCPairFunction<double,6>\nCCPotentials::apply_commutator_F_Qt_f12(World& world, const CCFunction<double,3>& phi_i, const CCFunction<double,3>& phi_j,\n                                                  const CC_vecfunction& gs_singles, const CC_vecfunction& ex_singles,\n                                                  const Info& info, const real_convolution_6d *Gscreen) {\n    const auto& parameters=info.parameters;\n\n    // if ground-state use Eqs (43)-(44) of Kottmann et al. JCTC 13, 5945 (2017)\n    auto f12=CCConvolutionOperatorPtr<double,3>(world,OT_F12,parameters);\n    auto ftt=std::vector<CCPairFunction<double,6>>({CCPairFunction<double,6>(f12, phi_i.function, phi_j.function)});\n\n    const vector_real_function_3d Vtau=info.intermediate_potentials(gs_singles, POT_singles_,true);\n    Projector<double,3> OVtau(info.get_active_mo_bra(),Vtau);\n    QProjector<double,3> Qt(info.get_active_mo_bra(),gs_singles.get_vecfunction());\n\n    auto p1=outer(OVtau,Qt);\n    auto p2=outer(Qt,OVtau);\n\n    // result=Qt2(Ov1(ftt)) + Qt1(Ov2(ftt));\n    auto result=p1(ftt) + p2(ftt);\n\n    result=consolidate(result,{});     // will collect similar terms only\n    MADNESS_CHECK_THROW(result.size()==1 and result[0].is_decomposed(),\"apply_Fock_commutator should return a single CCPairFunction\");\n    return result[0];\n}\n\n/// calculate [F,dQt] f12 |rhs>\n\n/// Using eq. (31) of Kottmann et al. JCTC 13, 5956 (2017)\n/// note that we leave the omega dQ12t term out, as it cancels with eq. (29)\n/// @return [F,Qt] f12 |rhs> - omega dQ12 f12 |phi_i phi_j>\nmadness::CCPairFunction<double,6>\nCCPotentials::apply_commutator_F_dQt_f12(World& world, const CCFunction<double,3>& phi_i, const CCFunction<double,3>& phi_j,\n                                                  const CC_vecfunction& gs_singles, const CC_vecfunction& ex_singles,\n                                                  const Info& info, const real_convolution_6d *Gscreen) {\n    const auto& parameters=info.parameters;\n\n    auto f12=CCConvolutionOperatorPtr<double,3>(world,OT_F12,parameters);\n    auto ftt=std::vector<CCPairFunction<double,6>>({CCPairFunction<double,6>(f12, phi_i.function, phi_j.function)});\n\n    auto t=CCPotentials::make_active_t_intermediate(gs_singles,info);\n    const vector_real_function_3d Vtau=info.intermediate_potentials(gs_singles, POT_singles_,true);\n    const vector_real_function_3d Vx=info.intermediate_potentials(ex_singles, POT_singles_,true);\n    auto bra=info.get_active_mo_bra();\n\n    Projector<double,3> OVtau(bra,Vtau);\n    Projector<double,3> Ox(bra,ex_singles.get_vecfunction());\n    Projector<double,3> OVx(bra,Vx);\n    QProjector<double,3> Qt(bra,t.get_vecfunction());\n\n    auto OvxQt=outer(OVx,Qt);\n    auto QtOvx=outer(Qt,OVx);\n    auto OxOvt=outer(Ox,OVtau);\n    auto OvtOx=outer(OVtau,Ox);\n\n    auto result=OvxQt(ftt) + QtOvx(ftt) - OxOvt(ftt) - OvtOx(ftt);\n    result=consolidate(result);     // will collect similar terms only\n    MADNESS_CHECK_THROW(result.size()==1 and result[0].is_decomposed(),\"apply_Fock_commutator should return a single CCPairFunction\");\n    return result[0];\n}\n\n\nmadness::real_function_6d\nCCPotentials::apply_KffK(World& world, const CCFunction<double,3>& phi_i, const CCFunction<double,3>& phi_j,\n                                                  const Info& info, const real_convolution_6d *Gscreen) {\n    real_function_3d x_ket = phi_i.function;\n    real_function_3d y_ket = phi_j.function;\n    real_function_3d x_bra = (info.R_square*phi_i.function).truncate();\n    real_function_3d y_bra = (info.R_square*phi_j.function).truncate();\n    const std::string x_name = phi_i.name();\n    const std::string y_name = phi_j.name();\n\n    const auto& parameters=info.parameters;\n\n    //apply Kf\n    if (parameters.debug()) print(\"\\nComputing [K,f]|\" + x_name + y_name + \">\\n\");\n\n    CCTimer time(world, \"[K,f]|\" + x_name + y_name + \">\");\n    CCTimer part1_time(world, \"Kf\" + x_name + y_name + \">\");\n\n    bool symmetric_kf = false;\n    if ((phi_i.type == phi_j.type) && (phi_i.i == phi_j.i)) symmetric_kf = true;\n\n    // First make the 6D function f12|x,y>\n    real_function_6d f12xy = make_f_xy_macrotask(world, x_ket, y_ket, x_bra, y_bra, phi_i.i, phi_j.i,\n        parameters, phi_i.type, phi_j.type, Gscreen);\n    f12xy.truncate().reduce_rank();\n    // Apply the Exchange Operator\n    real_function_6d Kfxy = K_macrotask(world, info.mo_ket, info.mo_bra, f12xy, symmetric_kf, parameters);\n\n    if (parameters.debug()) part1_time.info();\n\n    //apply fk\n    CCTimer part2_time(world, \"fK\" + x_name + y_name + \">\");\n\n    const bool symmetric_fk = (phi_i==phi_j);\n    const real_function_3d Kx = K_macrotask(world, info.mo_ket, info.mo_bra, x_ket, parameters);\n    const FuncType Kx_type = UNDEFINED;\n    const real_function_6d fKphi0b = make_f_xy_macrotask(world, Kx, y_ket, x_bra, y_bra, phi_i.i, phi_j.i,\n        parameters, Kx_type, phi_j.type, Gscreen);\n    real_function_6d fKphi0a;\n    if (symmetric_fk) fKphi0a = madness::swap_particles(fKphi0b);\n    else {\n        real_function_3d Ky = K_macrotask(world, info.mo_ket, info.mo_bra, y_ket, parameters);\n        const FuncType Ky_type = UNDEFINED;\n        fKphi0a = make_f_xy_macrotask(world, x_ket, Ky, x_bra, y_bra, phi_i.i, phi_j.i,\n            parameters, phi_i.type, Ky_type, Gscreen);\n    }\n    const real_function_6d fKxy = (fKphi0a + fKphi0b);\n\n    if (parameters.debug()) part2_time.info();\n\n    //final result\n    Kfxy.print_size(\"Kf\" + x_name + y_name);\n    Kfxy.set_thresh(parameters.thresh_6D());\n    Kfxy.truncate().reduce_rank();\n    Kfxy.print_size(\"Kf after truncation\" + x_name + y_name);\n    fKxy.print_size(\"fK\" + x_name + y_name);\n    real_function_6d result = (Kfxy - fKxy);\n    result.set_thresh(parameters.thresh_6D());\n    result.print_size(\"[K,f]\" + x_name + y_name);\n    result.truncate().reduce_rank();\n    result.print_size(\"[K,f]\" + x_name + y_name);\n\n    //sanity check\n    CCTimer sanity(world, \"[K,f] sanity check\");\n    // make the <xy| bra state which is <xy|R2\n    const real_function_3d brax = (x_ket * info.R_square);\n    const real_function_3d bray = (y_ket * info.R_square);\n    real_function_3d xres = result.project_out(brax, 0);\n    const double test = bray.inner(xres);\n    const double diff = test;\n    if (world.rank() == 0) {\n        std::cout << std::fixed << std::setprecision(10)\n                  << \"<\" << x_name << y_name << \"[K,f]\" << x_name << y_name << \"> =\" << test << \"\\n\";\n    }\n    if (world.rank() == 0 && fabs(diff) > parameters.thresh_6D()) print(\"Exchange Commutator Plain Wrong\");\n    else print(\"Exchange Commutator seems to be sane, diff=\" + std::to_string(diff));\n\n    if (parameters.debug()) sanity.info(diff);\n\n    if (parameters.debug()) print(\"\\n\");\n\n    return result;\n}\n\n\nmadness::real_function_6d\nCCPotentials::apply_exchange_commutator_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                                                  const std::vector<real_function_3d>& mo_bra, const real_function_3d& Rsquare,\n                                                  const size_t& i, const size_t& j, const CCParameters& parameters,\n                                                  const FuncType& x_type, const FuncType& y_type,\n                                                  const real_convolution_6d *Gscreen) {\n    real_function_3d x_ket = mo_ket[i];\n    real_function_3d y_ket = mo_ket[j];\n    real_function_3d x_bra = mo_bra[i];\n    real_function_3d y_bra = mo_bra[j];\n    const std::string x_name = \"phi\" + stringify(i);\n    const std::string y_name = \"phi\" + stringify(j);\n\n    //apply Kf\n    if (parameters.debug()) print(\"\\nComputing [K,f]|\" + x_name + y_name + \">\\n\");\n\n    CCTimer time(world, \"[K,f]|\" + x_name + y_name + \">\");\n    CCTimer part1_time(world, \"Kf\" + x_name + y_name + \">\");\n\n    bool symmetric_kf = false;\n    if ((x_type == y_type) && (i == j)) symmetric_kf = true;\n\n    // First make the 6D function f12|x,y>\n    real_function_6d f12xy = make_f_xy_macrotask(world, x_ket, y_ket, x_bra, y_bra, i, j, parameters, x_type, y_type, Gscreen);\n    f12xy.truncate().reduce_rank();\n    // Apply the Exchange Operator\n    real_function_6d Kfxy = K_macrotask(world, mo_ket, mo_bra, f12xy, symmetric_kf, parameters);\n\n    if (parameters.debug()) part1_time.info();\n\n    //apply fk\n    CCTimer part2_time(world, \"fK\" + x_name + y_name + \">\");\n\n    const bool symmetric_fk = (x_type == y_type && i == j);\n    const real_function_3d Kx = K_macrotask(world, mo_ket, mo_bra, x_ket, parameters);\n    const FuncType Kx_type = UNDEFINED;\n    const real_function_6d fKphi0b = make_f_xy_macrotask(world, Kx, y_ket, x_bra, y_bra, i, j, parameters, Kx_type, y_type, Gscreen);\n    real_function_6d fKphi0a;\n    if (symmetric_fk) fKphi0a = madness::swap_particles(fKphi0b);\n    else {\n        real_function_3d Ky = K_macrotask(world, mo_ket, mo_bra, y_ket, parameters);\n        const FuncType Ky_type = UNDEFINED;\n        fKphi0a = make_f_xy_macrotask(world, x_ket, Ky, x_bra, y_bra, i, j, parameters, x_type, Ky_type, Gscreen);\n    }\n    const real_function_6d fKxy = (fKphi0a + fKphi0b);\n\n    if (parameters.debug()) part2_time.info();\n\n    //final result\n    Kfxy.print_size(\"Kf\" + x_name + y_name);\n    Kfxy.set_thresh(parameters.thresh_6D());\n    Kfxy.truncate().reduce_rank();\n    Kfxy.print_size(\"Kf after truncation\" + x_name + y_name);\n    fKxy.print_size(\"fK\" + x_name + y_name);\n    real_function_6d result = (Kfxy - fKxy);\n    result.set_thresh(parameters.thresh_6D());\n    result.print_size(\"[K,f]\" + x_name + y_name);\n    result.truncate().reduce_rank();\n    result.print_size(\"[K,f]\" + x_name + y_name);\n\n    //sanity check\n    CCTimer sanity(world, \"[K,f] sanity check\");\n    // make the <xy| bra state which is <xy|R2\n    const real_function_3d brax = (x_ket * Rsquare);\n    const real_function_3d bray = (y_ket * Rsquare);\n    real_function_3d xres = result.project_out(brax, 0);\n    const double test = bray.inner(xres);\n    const double diff = test;\n    if (world.rank() == 0) {\n        std::cout << std::fixed << std::setprecision(10)\n                  << \"<\" << x_name << y_name << \"[K,f]\" << x_name << y_name << \"> =\" << test << \"\\n\";\n    }\n    if (world.rank() == 0 && fabs(diff) > parameters.thresh_6D()) print(\"Exchange Commutator Plain Wrong\");\n    else print(\"Exchange Commutator seems to be sane, diff=\" + std::to_string(diff));\n\n    if (parameters.debug()) sanity.info(diff);\n\n    if (parameters.debug()) print(\"\\n\");\n\n    return result;\n}\n\n\nmadness::real_function_6d\nCCPotentials::apply_exchange_commutator(const CCFunction<double,3>& x, const CCFunction<double,3>& y,\n                                        const real_convolution_6d *Gscreen) const {\n    real_function_6d result = apply_exchange_commutator1(x, y, Gscreen);\n    {\n        CCTimer sanity(world, \"[K,f] sanity check\");\n        // make the <xy| bra state which is <xy|R2\n        const real_function_3d brax = (x.function * nemo_->ncf->square()).truncate();\n        const real_function_3d bray = (y.function * nemo_->ncf->square()).truncate();\n        real_function_3d xres = result.project_out(brax, 0);\n        const double test = bray.inner(xres);\n        const double diff = test;\n        if (world.rank() == 0) {\n            std::cout << std::fixed << std::setprecision(10)\n                      <<     //\t  << \"<\" << x.name() << y.name() << \"|fK|\" << x.name() << y.name() << \"> =\" << xyfKxy << \", \"\n                      //\t  << \"<\" << x.name() << y.name() << \"|Kf|\" << x.name() << y.name() << \"> =\" << xyKfxy << \", diff=\" << diff << \"\\n\";\n                      \"<\" << x.name() << y.name() << \"[K,f]\" << x.name() << y.name() << \"> =\" << test << \"\\n\";\n        }\n        if (world.rank() == 0 && fabs(diff) > parameters.thresh_6D()) output.warning(\"Exchange Commutator Plain Wrong\");\n        else output(\"Exchange Commutator seems to be sane, diff=\" + std::to_string(diff));\n\n        if (parameters.debug()) sanity.info(diff);\n    }\n    if (parameters.debug()) output(\"\\n\");\n\n    return result;\n}\n\nmadness::real_function_6d\nCCPotentials::apply_exchange_commutator1(const CCFunction<double,3>& x, const CCFunction<double,3>& y,\n                                         const real_convolution_6d *Gscreen) const {\n    if (parameters.debug()) output(\"\\nComputing [K,f]|\" + x.name() + y.name() + \">\\n\");\n\n    CCTimer time(world, \"[K,f]|\" + x.name() + y.name() + \">\");\n    // make first part of commutator\n    CCTimer part1_time(world, \"Kf\" + x.name() + y.name() + \">\");\n    real_function_6d Kfxy = apply_Kf(x, y);\n    if (parameters.debug()) part1_time.info();\n\n    // make the second part of the commutator\n    CCTimer part2_time(world, \"fK\" + x.name() + y.name() + \">\");\n    real_function_6d fKxy = apply_fK(x, y, Gscreen);\n    if (parameters.debug()) part2_time.info();\n\n    Kfxy.print_size(\"Kf\" + x.name() + y.name());\n    fKxy.print_size(\"fK\" + x.name() + y.name());\n    real_function_6d result = (Kfxy - fKxy);\n    result.set_thresh(parameters.thresh_6D());\n    result.print_size(\"[K,f]\" + x.name() + y.name());\n    result.truncate().reduce_rank();\n    result.print_size(\"[K,f]\" + x.name() + y.name());\n    return result;\n}\n\ndouble\nCCPotentials::make_xy_gf_ab(const CCFunction<double,3>& x, const CCFunction<double,3>& y, const CCFunction<double,3>& a, const CCFunction<double,3>& b) const {\n    const real_function_3d xa = (x.function * a.function).truncate();\n    const real_function_3d x_gf_a = apply_gf(world, xa, info);\n    const double result = y.function.inner(x_gf_a * b.function);\n    return result;\n}\n\nmadness::real_function_3d\nCCPotentials::apply_gf(World& world, const real_function_3d& f, const Info& info) {\n    // std::shared_ptr<real_convolution_3d> fBSH = std::shared_ptr<real_convolution_3d>(\n            // BSHOperatorPtr3D(world, info.parameters.gamma(), info.parameters.lo(), info.parameters.thresh_poisson()));\n    auto fg=CCConvolutionOperator<double,3>(world,OpType::OT_FG12,info.parameters);\n\n    // double bsh_prefactor = 4.0 * constants::pi;\n    // double prefactor = 1.0 / (2.0 * info.parameters.gamma());\n    return fg(f).truncate();\n    // return prefactor * ((*g12)(f) - bsh_prefactor * (*fBSH)(f)).truncate();\n}\n\ndouble\nCCPotentials::make_xy_u(const CCFunction<double,3>& x, const CCFunction<double,3>& y, const std::vector<CCPairFunction<double,6>>& u) {\n    double result = 0.0;\n    for (size_t mm = 0; mm < u.size(); mm++) {\n        result += u[mm].make_xy_u(x, y);\n    }\n    return result;\n}\n\ndouble\nCCPotentials::make_xy_op_u(const CCFunction<double,3>& x, const CCFunction<double,3>& y, const CCConvolutionOperator<double,3>& op,\n                           const CCPairFunction<double,6>& u) {\n    auto ket=CCPairFunction<double,6>(x.f(),y.f());\n    auto bra=std::make_shared<CCConvolutionOperator<double,3>>(op)*u;\n    return inner(bra,ket);\n}\n\ndouble\nCCPotentials::make_xy_op_u(const CCFunction<double,3>& x, const CCFunction<double,3>& y, const CCConvolutionOperator<double,3>& op,\n                           const std::vector<CCPairFunction<double,6>>& u) {\n    double result = 0.0;\n    for (size_t mm = 0; mm < u.size(); mm++) {\n        const double tmp = make_xy_op_u(x, y, op, u[mm]);\n        result += tmp;\n    }\n    return result;\n}\n\ndouble\nCCPotentials::make_xy_op_ab(const CCFunction<double,3>& x, const CCFunction<double,3>& y, const CCConvolutionOperator<double,3>& op,\n                            const CCFunction<double,3>& a, const CCFunction<double,3>& b) const {\n    double result = 0.0;\n    if (x.type == HOLE) {\n        real_function_3d xopa = op(x, a);\n        result = y.function.inner(xopa * b.function);\n    } else {\n        real_function_3d yopb = op(y, b);\n        result = x.function.inner(yopb * a.function);\n    }\n    return result;\n}\n\nstd::vector<CCPairFunction<double,6>>\nCCPotentials::get_pair_function(const Pairs<CCPair>& pairs, const size_t i, const size_t j) {\n    if (i > j) {\n        return swap_particles(pairs(j, i).functions);\n    } else {\n        return pairs(i, j).functions;\n    }\n}\n\nmadness::real_function_3d\nCCPotentials::apply_s2b_operation(World& world, const CCFunction<double,3>& bra, const CCPairFunction<double,6>& u,\n    const size_t particle, const Info& info) {\n    real_function_3d result;\n    auto g12=std::shared_ptr<CCConvolutionOperator<double,3>>(new CCConvolutionOperator<double,3>(world,OpType::OT_G12,info.parameters));\n\n    MADNESS_ASSERT(particle == 1 || particle == 2);\n    if (u.is_pure()) {\n        result = u.dirac_convolution(bra, *g12, particle);\n    } else if (u.is_decomposed_no_op()) {\n        result = u.dirac_convolution(bra, *g12, particle);\n    } else if (u.is_op_decomposed()) {\n        // retunrns <x|g12f12|x(1)y(2)>_particle\n        std::array<int,3> p1={0,1,2};\n        std::array<int,3> p2={3,4,5};\n        auto p = (particle == 1) ? p1 : p2;\n        result=inner(g12*u,bra.f(),p,p1);\n    } else MADNESS_EXCEPTION(\"apply_s2b_operation: unknown type\", 1)\n    return result;\n}\n\ndouble\nCCPotentials::overlap(const CCPair& x) const {\n    if (world.rank() == 0 && parameters.debug()) std::cout << \"Norms of \" << x.name() << \"\\n\";\n\n    const size_t size = x.functions.size();\n    double result = 0.0;\n    for (size_t i = 0; i < size; i++) {\n        for (size_t j = i; j < size; j++) {\n            double factor = 1.0;\n            if (i != j) factor = 2.0;     // count off diagonal elements twice since we reach only the upper triangle\n\n            double tmp = overlap(x.functions[i], x.functions[j]);\n            result += factor * tmp;\n            if (world.rank() == 0 && parameters.debug())\n                std::cout << std::fixed << std::setprecision(4) << \"<\" << x.functions[i].name() << \"|\"\n                          << x.functions[j].name() << \"> =\" << tmp << \"\\n\";\n        }\n    }\n    return result;\n}\n\nmadness::vector_real_function_3d\nCCPotentials::apply_projector(const CC_vecfunction& f, const CC_vecfunction& ket_) const {\n    // construct the bra state from mos\n    vector_real_function_3d ket = copy(world, ket_.get_vecfunction());\n    vector_real_function_3d bra = copy(world, get_mo_bra(ket_));\n    MADNESS_ASSERT(ket.size() == bra.size());\n    // built projector\n    Projector<double, 3> O(bra, ket);\n    // apply projector\n    vector_real_function_3d Of = O(f.get_vecfunction());\n    return Of;\n}\n\nmadness::real_function_6d\nCCPotentials::apply_Q12t(const real_function_6d& f, const CC_vecfunction& t) const {\n    MADNESS_ASSERT(t.type == HOLE || t.type == MIXED);\n    MADNESS_ASSERT(t.size() == mo_bra_.size());\n    StrongOrthogonalityProjector<double, 3> Q(world);\n    Q.set_spaces(mo_bra_.get_vecfunction(), t.get_vecfunction(), mo_bra_.get_vecfunction(), t.get_vecfunction());\n    return Q(f);\n}\n\nmadness::CCPairFunction<double,6>\nCCPotentials::apply_Qt(const CCPairFunction<double,6>& f, const CC_vecfunction& t, const size_t particle, const double c) const {\n    MADNESS_ASSERT(particle == 1 || particle == 2);\n    MADNESS_ASSERT(f.is_decomposed_no_op());     // pure type is not needed and op_deomposed type can not be because the result would be (1-Ot)f12|xy> = f12|xy> - \\sum_a|a1a2> a subtraction with different types\n    if (particle == 1) {\n        CCPairFunction<double,6> result(apply_Qt(f.get_a(), t, c), f.get_b());\n        return result;\n    } else {\n        CCPairFunction<double,6> result(f.get_a(), apply_Qt(f.get_b(), t, c));\n        return result;\n    }\n}\n\nmadness::vector_real_function_3d\nCCPotentials::apply_Qt(const CC_vecfunction& f, const CC_vecfunction& ket_, const double c) const {\n    vector_real_function_3d ket = ket_.get_vecfunction();\n    vector_real_function_3d bra = get_mo_bra(ket_);\n    Projector<double, 3> O(bra, ket);\n    vector_real_function_3d Of = O(f.get_vecfunction());\n    vector_real_function_3d scaled_of = c * Of;\n    const vector_real_function_3d result = sub(world, f.get_vecfunction(), scaled_of);\n    return result;\n}\n\nmadness::CCPairFunction<double,6>\nCCPotentials::apply_Ot(const CCPairFunction<double,6>& f, const CC_vecfunction& t, const size_t particle) const {\n    MADNESS_ASSERT(particle == 1 || particle == 2);\n    // get the right bra\n    CC_vecfunction mbra;\n    if (t.size() == mo_bra_.size()) mbra = CC_vecfunction(copy(world, mo_bra_.get_vecfunction()), HOLE);\n    else mbra = CC_vecfunction(copy(world, get_active_mo_bra()), HOLE, parameters.freeze());\n    Projector<double,3> O(mbra.get_vecfunction(), t.get_vecfunction());\n    O.set_particle(particle-1); // shift particle index\n    return O(f);\n\n    MADNESS_ASSERT(mbra.size() == t.size());\n    if (f.is_pure()) {\n        vector_real_function_3d projected;\n        for (const auto& ktmp : t.functions) {\n            const CCFunction<double,3>& bra = mbra(ktmp.first);\n            const real_function_3d kf = f.project_out(bra, particle);\n            projected.push_back(kf);\n        }\n        if (particle == 1) {\n            return CCPairFunction<double,6>(copy(world, t.get_vecfunction()), projected);\n        } else {\n            return CCPairFunction<double,6>(projected, copy(world, t.get_vecfunction()));\n        }\n\n    } else if (f.is_decomposed_no_op()) {\n        if (particle == 1) return CCPairFunction<double,6>(apply_projector(f.get_a(), t), f.get_b());\n        else return CCPairFunction<double,6>(f.get_a(), apply_projector(f.get_b(), t));\n    } else if (f.is_op_decomposed()) {\n        if (particle == 1) {\n            const vector_real_function_3d a = copy(world, t.get_vecfunction());\n//            const vector_real_function_3d b = mul(world, f.get_b()[0], f.op->operator()(mbra, f.get_a()[0]));\n            const vector_real_function_3d b = mul(world, f.get_b()[0], f.decomposed().get_operator_ptr()->operator()(mbra, f.get_a()[0]));\n            return CCPairFunction<double,6>(a, b);\n        } else {\n            const vector_real_function_3d a = mul(world, f.get_a()[0], f.decomposed().get_operator_ptr()->operator()(mbra, f.get_b()[0]));\n            const vector_real_function_3d b = copy(world, t.get_vecfunction());\n            return CCPairFunction<double,6>(a, b);\n        }\n    } else MADNESS_EXCEPTION(\"Should not end up here\", 1)\n\n    ;\n    return CCPairFunction<double,6>(vector_real_function_3d(), vector_real_function_3d());\n}\n\nmadness::real_function_6d\nCCPotentials::apply_G(const CCPairFunction<double,6>& u, const real_convolution_6d& G) const {\n    CCTimer time(world, \"Applying G on \" + u.name());\n    return apply(G,u).get_function();\n}\n\nmadness::vector_real_function_3d\nCCPotentials::get_CC2_singles_potential_gs(World& world, const CC_vecfunction& singles,\n                                           const Pairs<CCPair>& doubles, Info& info)\n{\n    CCTimer time(world, \"CC2 Singles potential\");\n    Projector<double,3> Otau(info.get_active_mo_bra(), singles.get_vecfunction());\n    QProjector<double,3> Q(info.mo_bra, info.mo_ket);\n\n    auto triangular_map=PairVectorMap::triangular_map(info.parameters.freeze(),info.mo_ket.size());\n    auto doubles_vec=Pairs<CCPair>::pairs2vector(doubles,triangular_map);\n\n    // compute the individual diagrams\n    // CC2 Singles potential: Q(S4c) + Qt(ccs+s2b+s2c)\n    //\n    // s2b and s2c return the potential and an intermediate which needs to be stored\n\n    for (auto& p : doubles.allpairs) p.second.reconstruct();\n\n    // set up taskq\n    MacroTaskSinglesPotentialGs taskgs;\n    taskgs.partitioner->min_batch_size=2;\n    taskgs.partitioner->max_batch_size=2;\n    int printlevel=(info.parameters.debug()) ? 3 : 0;\n    auto taskq=std::shared_ptr<MacroTaskQ>(new MacroTaskQ(MacroTaskQFactory(world).set_printlevel(printlevel)));\n    MacroTask<MacroTaskSinglesPotentialGs> mtaskgs(world,taskgs,taskq);\n\n    // compute applied potentials and intermediates\n    // partition macrotasks over active orbitals\n    std::vector<int> result_index(singles.size());\n    for (size_t i=0; i<result_index.size(); ++i) result_index[i]=i+info.parameters.freeze();\n    // print_header1(\"not clearing intermediate potentials\");\n    // info.intermediate_potentials.clear_all();\n\n    auto [fock_residue, dum1] = mtaskgs(result_index, singles, doubles_vec, int(POT_F3D_), info);\n    auto [Vccs, dum2] = mtaskgs(result_index, singles, doubles_vec, int(POT_ccs_), info);\n    auto [Vs2b, imed_s2b] = mtaskgs(result_index, singles, doubles_vec, int(POT_s2b_), info);\n    auto [Vs2c, imed_s2c] = mtaskgs(result_index, singles, doubles_vec, int(POT_s2c_), info);\n    auto [Vs4b, dum4] = mtaskgs(result_index, singles, doubles_vec, int(POT_s4b_), info);\n    auto [Vs4c, dum5] = mtaskgs(result_index, singles, doubles_vec, int(POT_s4c_), info);\n    if (info.parameters.debug()) taskq->print_taskq();\n    taskq->run_all();\n\n    // give some information about diagrams\n    if (info.parameters.debug()) {\n        if (world.rank()==0) print_header3(\"intermediate potentials in CC2 singles potential ground state\");\n        madness::print_size(world,fock_residue, \"Fock residue\");\n        madness::print_size(world,Vccs, \"ccs potential\");\n        madness::print_size(world,Vs2b, \"s2b potential\");\n        madness::print_size(world,Vs2c, \"s2c potential\");\n        madness::print_size(world,Vs4b, \"s4b potential\");\n        madness::print_size(world,Vs4c, \"s4c potential\");\n        madness::print_size(world,imed_s2b, \"s2b intermediate\");\n        madness::print_size(world,imed_s2c, \"s2c intermediate\");\n    }\n\n    vector_real_function_3d Vs4a = Otau(Vs2b);     // need to subtract\n    // vector_real_function_3d unprojected = add(world, Vccs, add(world, Vs2b, add(world, Vs2c, add(world, Vs4b,\n                                                             // sub(world, Vs4c, Vs4a)))));\n    vector_real_function_3d unprojected = Vccs + Vs2b + Vs2c + Vs4b + Vs4c - Vs4a;\n    // vector_real_function_3d potential = apply_Qt(unprojected, mo_ket_);\n    vector_real_function_3d potential = truncate(Q(unprojected));\n\n    if (info.parameters.debug()) {\n        madness::print_size(world,Vs4a, \"s4a potential\");\n        madness::print_size(world,unprojected, \"unprojected potential\");\n        madness::print_size(world,potential, \"final potential w/o fock\");\n    }\n\n    // store intermediates\n    info.intermediate_potentials.insert(copy(world, potential), singles, POT_singles_);\n    auto some_elements_are_assigned = [](const vector_real_function_3d& vec) {\n        for (const auto& v : vec) if (v.is_initialized()) return true;\n        return false;\n    };\n    if (some_elements_are_assigned(imed_s2b)) info.intermediate_potentials.insert(imed_s2b, singles, POT_s2b_);\n    if (some_elements_are_assigned(imed_s2c)) info.intermediate_potentials.insert(imed_s2c, singles, POT_s2c_);\n\n    time.info(info.parameters.debug(), norm2(world, potential));\n    const vector_real_function_3d result  = potential+ fock_residue;\n    return result;\n}\n\nmadness::vector_real_function_3d\nCCPotentials::get_CCS_potential_ex(World& world, const CC_vecfunction& x, const bool print, Info& info) {\n    if (x.type != RESPONSE) error(\"get_CCS_response_potential: Wrong type of input singles\");\n\n    std::vector<CCPair> empty_doubles;\n    CC_vecfunction empty_singles(PARTICLE);\n\n    // set up taskq\n    MacroTaskSinglesPotentialEx task;\n    int printlevel=(info.parameters.debug()) ? 3 : 0;\n    auto taskq=std::shared_ptr<MacroTaskQ>(new MacroTaskQ(MacroTaskQFactory(world).set_printlevel(printlevel)));\n    MacroTask<MacroTaskSinglesPotentialEx> mtask(world,task,taskq);\n    std::vector<int> result_index(x.size());\n    for (size_t i=0; i<result_index.size(); ++i) result_index[i]=i+info.parameters.freeze();\n\n    // run tasks\n    auto [fock_residue, dummy1]=mtask(result_index,empty_singles,empty_doubles,x,empty_doubles,int(POT_F3D_),info);\n    auto [potential, dummy2]=mtask(result_index,empty_singles,empty_doubles,x,empty_doubles,int(POT_cis_),info);\n    if (info.parameters.debug()) taskq->print_taskq();\n    taskq->run_all();\n\n    // const vector_real_function_3d fock_residue = potential_singles_ex(world, empty_singles, empty_doubles, x,\n                                                                      // empty_doubles, POT_F3D_, info);\n    // vector_real_function_3d potential = potential_singles_ex(world, empty_singles, empty_doubles, x, empty_doubles, POT_cis_, info);\n    // the fock residue does not get projected, but all the rest\n    QProjector<double,3> Q(info.mo_bra, info.mo_ket);\n    // potential = apply_Qt(potential, mo_ket_);\n    potential=Q(potential);\n    truncate(world, potential);\n    info.intermediate_potentials.insert(copy(world, potential), x, POT_singles_);\n    vector_real_function_3d result = add(world, fock_residue, potential);\n    truncate(world, result);\n    return result;\n}\n\nmadness::vector_real_function_3d\nCCPotentials::get_CC2_singles_potential_ex(World& world, const CC_vecfunction& gs_singles,\n                                           const Pairs<CCPair>& gs_doubles, const CC_vecfunction& ex_singles,\n                                           const Pairs<CCPair>& ex_doubles, Info& info) {\n    MADNESS_ASSERT(gs_singles.type == PARTICLE);\n    MADNESS_ASSERT(ex_singles.type == RESPONSE);\n    Projector<double,3> Ox(info.get_active_mo_bra(),ex_singles.get_vecfunction());\n    Projector<double,3> Ot(info.get_active_mo_bra(),gs_singles.get_vecfunction());\n\n    auto triangular_map=PairVectorMap::triangular_map(info.parameters.freeze(),info.mo_ket.size());\n    auto gs_doubles_vec=Pairs<CCPair>::pairs2vector(gs_doubles,triangular_map);\n    auto ex_doubles_vec=Pairs<CCPair>::pairs2vector(ex_doubles,triangular_map);\n\n    // set up taskq\n    int printlevel=(info.parameters.debug()) ? 3 : 0;\n    auto taskq=std::shared_ptr<MacroTaskQ>(new MacroTaskQ(MacroTaskQFactory(world).set_printlevel(printlevel)));\n    MacroTaskSinglesPotentialGs taskgs;\n    MacroTask<MacroTaskSinglesPotentialGs> mtaskgs(world,taskgs,taskq);\n    MacroTaskSinglesPotentialEx taskex;\n    MacroTask<MacroTaskSinglesPotentialEx> mtaskex(world,taskex,taskq);\n\n    info.reconstruct();\n    for (auto& p : gs_doubles.allpairs) p.second.reconstruct();\n    for (auto& p : ex_doubles.allpairs) p.second.reconstruct();\n    gs_singles.reconstruct();\n    ex_singles.reconstruct();\n\n    std::vector<int> result_index(ex_singles.size());\n    for (size_t i=0; i<result_index.size(); ++i) result_index[i]=i+info.parameters.freeze();\n    auto [fock_residue, dum1] = mtaskex(result_index, gs_singles, gs_doubles_vec, ex_singles, ex_doubles_vec, int(POT_F3D_), info);\n    auto [Vccs, dum2] = mtaskex(result_index, gs_singles, gs_doubles_vec, ex_singles, ex_doubles_vec, int(POT_ccs_), info);\n    auto [Vs2b, imed_s2b] = mtaskex(result_index, gs_singles, gs_doubles_vec, ex_singles, ex_doubles_vec, int(POT_s2b_), info);\n    auto [Vs2c, imed_s2c] = mtaskex(result_index, gs_singles, gs_doubles_vec, ex_singles, ex_doubles_vec, int(POT_s2c_), info);\n    auto [Vs4b, dum4] = mtaskex(result_index, gs_singles, gs_doubles_vec, ex_singles, ex_doubles_vec, int(POT_s4b_), info);\n    auto [Vs4c, dum5] = mtaskex(result_index, gs_singles, gs_doubles_vec, ex_singles, ex_doubles_vec, int(POT_s4c_), info);\n    // make low scaling s4a potential\n    // -Otau(s2b_response) + -Ox(s2b_gs)\n    // maybe store full s2b potential of gs\n    // both need to be subtracted\n    auto [s2b_gs, dum6] = mtaskgs(result_index, gs_singles, gs_doubles_vec, int(POT_s2b_), info);\n    // vector_real_function_3d Vs4a =\n            // -1.0 * add(world, apply_projector(s2b_gs, ex_singles), apply_projector(Vs2b, gs_singles));\n    if (info.parameters.debug()) taskq->print_taskq();\n    taskq->run_all();\n\n\n    vector_real_function_3d Vs4a = -1.0 * (Ox(s2b_gs)+ Ot(Vs2b));\n    vector_real_function_3d unprojected = Vccs + Vs2b + Vs2c + Vs4a + Vs4b + Vs4c;\n    // vector_real_function_3d unprojected = add(world, Vccs, add(world, Vs2b, add(world, Vs2c, add(world, Vs4a,\n                                                                                                 // add(world, Vs4b, Vs4c)))));\n    QProjector<double,3> Q(info.mo_bra, info.mo_ket);\n    // vector_real_function_3d potential = apply_Qt(unprojected, mo_ket_);\n    vector_real_function_3d potential = Q(unprojected);\n    if (info.parameters.debug()) {\n        CCTimer timer(world, \"potential energy of F3D\");\n\n        print(\"fock residue\");\n        timer.info(true, norm2(world, fock_residue));\n\n        if (world.rank()==0) print_header3(\"intermediate potentials in CC2 singles potential excited state\");\n        madness::print_size(world,fock_residue,\"fock_residue\");\n        madness::print_size(world,Vccs,\"Vccs\");\n        madness::print_size(world,Vs2b,\"Vs2b\");\n        madness::print_size(world,Vs2c,\"Vs2c\");\n        madness::print_size(world,Vs4a,\"Vs4a\");\n        madness::print_size(world,Vs4b,\"Vs4b\");\n        madness::print_size(world,Vs4c,\"Vs4c\");\n        madness::print_size(world,s2b_gs,\"s2b_gs\");\n        madness::print_size(world,imed_s2b,\"imed_s2b\");\n        madness::print_size(world,imed_s2c,\"imed_s2c\");\n        madness::print_size(world,unprojected,\"unprojected\");\n        madness::print_size(world,potential,\"potential w/o fock residue\");\n\n        vector_real_function_3d xbra = info.R_square* ex_singles.get_vecfunction();\n        const double ccs = inner(world, xbra, Vccs).sum();\n        const double s2b = inner(world, xbra, Vs2b).sum();\n        const double s2c = inner(world, xbra, Vs2c).sum();\n        const double s4a = inner(world, xbra, Vs4a).sum();\n        const double s4b = inner(world, xbra, Vs4b).sum();\n        const double s4c = inner(world, xbra, Vs4c).sum();\n        if (world.rank()==0) std::cout << std::fixed << std::setprecision(10) << \"functional response energies:\" << \"\\n<x|ccs>=\" << ccs\n                  << \"\\n<x|S2b>=\" << s2b << \"\\n<x|S2c>=\" << s2c << \"\\n<x|s4a>=\" << s4a << \"\\n<x|s4b>=\" << s4b << \"\\n<x|s4c>=\" << s4c << \"\\n\";\n    }\n\n    // storing potentials\n    info.intermediate_potentials.insert(copy(world, potential), ex_singles, POT_singles_);\n    auto some_elements_are_assigned = [](const vector_real_function_3d& vec) {\n        for (const auto& v : vec) if (v.is_initialized()) return true;\n        return false;\n    };\n    if (some_elements_are_assigned(imed_s2b)) info.intermediate_potentials.insert(imed_s2b, ex_singles, POT_s2b_);\n    if (some_elements_are_assigned(imed_s2c)) info.intermediate_potentials.insert(imed_s2c, ex_singles, POT_s2c_);\n\n    vector_real_function_3d result = truncate(fock_residue+ potential);\n    return result;\n}\n\nmadness::vector_real_function_3d\nCCPotentials::get_ADC2_singles_potential(World& world, const Pairs<CCPair>& gs_doubles,\n                                         CC_vecfunction& ex_singles, const Pairs<CCPair>& response_doubles,\n                                         Info& info) {\n    MADNESS_ASSERT(ex_singles.type == RESPONSE);\n    vector_real_function_3d zero = zero_functions<double, 3>(world, info.get_active_mo_ket().size());\n    CC_vecfunction tau(zero, PARTICLE, info.parameters.freeze());\n    const vector_real_function_3d result = get_CC2_singles_potential_ex(world, tau, gs_doubles, ex_singles, response_doubles, info);\n    return result;\n}\n\ndouble\nCCPotentials::potential_energy_gs(World& world, const CC_vecfunction& bra,\n                                  const CC_vecfunction& singles, const Pairs<CCPair>& doubles, const PotentialType& name) const {\n    // sanity check\n    MADNESS_ASSERT(singles.type == PARTICLE);\n    CCTimer timer(world, \"potential energy of \" + assign_name(name));\n    double result = 0.0;\n    if (name == POT_s3a_) {\n        result = x_s3a(bra, singles);\n    } else if (name == POT_s3b_) {\n        result = x_s3b(bra, singles);\n    } else if (name == POT_s3c_) {\n        result = x_s3c(bra, singles);\n    } else if (name == POT_s5b_) {\n        result = x_s5b(bra, singles, singles);\n    } else if (name == POT_s5c_) {\n        result = x_s5c(bra, singles, singles);\n    } else if (name == POT_s6_) {\n        result = x_s6(bra, singles, singles, singles);\n    } else if (name == POT_F3D_) {\n        result = x_s3a(bra, singles) - compute_kinetic_energy(world, bra.get_vecfunction(), singles.get_vecfunction());\n    } else if (name == POT_ccs_) {\n        result = x_s3c(bra, singles) + x_s5b(bra, singles, singles) + x_s5c(bra, singles, singles) +\n                 x_s6(bra, singles, singles, singles);\n    } else if (name == POT_s2b_) {\n        result = x_s2b(bra, doubles);\n    } else if (name == POT_s2c_) {\n        result = x_s2c(bra, doubles);\n    } else if (name == POT_s4a_) {\n        result = x_s4a(bra, singles, doubles);\n    } else if (name == POT_s4b_) {\n        result = x_s4b(bra, singles, doubles);\n    } else if (name == POT_s4c_) {\n        result = x_s4c(bra, singles, doubles);\n    }\n\n    const std::pair<double, double> time = timer.current_time();\n    if (result == 0.0) output.warning(\"Result of <x\" + assign_name(name) + \"> is zero!\");\n\n    if (world.rank() == 0) {\n        std::cout << std::fixed << std::setprecision(10) << \"<x|\" << assign_name(name) << \">=\" << result << \", \"\n                  << time.first << \" (wall), \" << time.second << \" (cpu)\" << \"\\n\";\n    }\n    return result;\n}\n\n/// @param[in]  result_index corresponds to external lines in the diagram\nstd::tuple<madness::vector_real_function_3d, madness::vector_real_function_3d>\nCCPotentials::potential_singles_gs(World& world, const std::vector<int>& result_index, const CC_vecfunction& singles,\n                                   const Pairs<CCPair>& doubles, const PotentialType& name, const Info& info)\n{\n    MADNESS_ASSERT(singles.type == PARTICLE);\n    vector_real_function_3d result, intermediate;\n    CCTimer timer(world, \"Singles-Potential:\" + assign_name(name));\n\n    // collect all singles that correspond to external lines\n    std::vector<CCFunction<double,3>> singles_tmp;\n    for (int i : result_index) singles_tmp.push_back(singles(i));\n    const CC_vecfunction singles_external(singles_tmp);\n    const CC_vecfunction t_external = make_active_t_intermediate(singles_external,info);\n\n    auto ctype=doubles.allpairs.begin()->second.ctype;\n    auto builder=CCPairBuilder(world,info).set_gs_singles(singles).set_ctype(ctype);\n\n    if (name == POT_F3D_) {\n        result = fock_residue_closed_shell(world, singles_external, info);\n    } else if (name == POT_ccs_) {  // or S3c\n        // this term corresponds to the diagrams S3c, S5b, S5c and S6, see eq. (28) of the GS paper\n        const CC_vecfunction t = make_active_t_intermediate(singles,info);\n        QProjector<double,3> Qt(info.get_active_mo_bra(),t.get_vecfunction());\n        result = Qt(ccs_unprojected(world, t_external, singles, info));\n        // result = apply_Qt(ccs_unprojected(world, t, singles, info), t);\n        // this is not the full t projector, but the potential will be projected afterward and this will include th frozen mos\n    } else if (name == POT_s2b_) {\n        //\t// calculate the s2b potential and afterwards the s4a potential from the s2b potential\n        //\t// because:  Qt(S2b) = S2b + S4a\n        //\tvecfuncT result_s2b= s2b(singles,doubles);\n        //\t// some information\n        //\tif(world.rank()==0) std::cout <<\"||\" << assign_name(pot_s2b_) << \"||=\" << norm2(world,result_s2b) << \", \"\n        //\t    << get_size(world,result_s2b) << \" (GB), \" << timer.current_time().first << \"s (wall), \" << timer.current_time().second << \"s (cpu)\\n\";\n        //\t// get s4a from s2b\n        //\tvecfuncT result_s4a= s4a_from_s2b(result_s2b,singles);\n        //\t// some information\n        //\tif(world.rank()==0) std::cout <<\"||\" << assign_name(pot_s4a_) << \"||=\" << norm2(world,result_s4a) << \", \"\n        //\t    << get_size(world,result_s4a) << \" (GB), \" << timer.current_time().first << \"s (wall), \" << timer.current_time().second << \"s (cpu)\\n\";\n        //\tresult = add(world,result_s2b,result_s4a);\n        // returns the s2b potential (unprojected)\n        std::tie(result,intermediate) = s2b(world, result_index, singles, doubles, builder, info);\n    } else if (name == POT_s2c_) {\n        std::tie(result,intermediate) = s2c(world, result_index, singles, doubles, builder, info);\n    } else if (name == POT_s4a_) {\n        error(\"potential_singles: Demanded s4a potential -> this is calculated along with the s2b potential\");\n    } else if (name == POT_s4b_) {\n        result = s4b(world, result_index, singles, doubles, builder, info);\n    } else if (name == POT_s4c_) {\n        result = s4c(world, result_index, singles, doubles, builder, info);\n    } else MADNESS_EXCEPTION((\"potential_singles: Unknown potential \" + assign_name(name)).c_str(), 1)\n\n    madness::print_size(world,result,\"result of \"+assign_name(name));\n    madness::print_size(world,intermediate,\"intermediate of \"+assign_name(name));\n\n    const double size = get_size(world, result);\n    const double norm = norm2(world, result);\n    const std::pair<double, double> time = timer.current_time();\n    if (world.rank() == 0) {\n        std::cout << \"||\" << assign_name(name) << \"||=\" << std::fixed << std::setprecision(6) << norm << std::scientific\n                  << std::setprecision(1) << \", \" << size << \" (GB), \" << time.first\n                  << \"s (wall), \" << time.second << \"s (cpu)\\n\";\n    }\n    truncate(world, result);\n    return std::make_tuple(result,intermediate);\n}\n\ndouble\nCCPotentials::potential_energy_ex(World& world, const CC_vecfunction& bra,\n                                  const CC_vecfunction& singles_gs, const Pairs<CCPair>& doubles_gs,\n                                  const CC_vecfunction& singles_ex,\n                                  const Pairs<CCPair>& doubles_ex, const PotentialType& name) const {\n    // sanity check\n    MADNESS_ASSERT(singles_gs.type == PARTICLE);\n    MADNESS_ASSERT(singles_ex.type == RESPONSE);\n    CCTimer timer(world, \"potential energy of \" + assign_name(name));\n    double result = 0.0;\n    if (name == POT_s3a_) {\n        result = x_s3a(bra, singles_ex);\n    } else if (name == POT_s3b_) {\n        result = x_s3b(bra, singles_ex);\n    } else if (name == POT_s3c_) {\n        result = x_s3c(bra, singles_ex);\n    } else if (name == POT_s5b_) {\n        result = x_s5b(bra, singles_ex, singles_gs) + x_s5b(bra, singles_gs, singles_ex);\n    } else if (name == POT_s5c_) {\n        result = x_s5c(bra, singles_ex, singles_gs) + x_s5c(bra, singles_ex, singles_gs);\n    } else if (name == POT_s6_) {\n        result = x_s6(bra, singles_ex, singles_gs, singles_gs) + x_s6(bra, singles_gs, singles_ex, singles_gs) +\n                 x_s6(bra, singles_gs, singles_gs, singles_ex);\n    } else if (name == POT_F3D_) {\n        result = x_s3a(bra, singles_ex) - compute_kinetic_energy(world, bra.get_vecfunction(), singles_ex.get_vecfunction());\n    } else if (name == POT_ccs_) {\n        result = x_s3c(bra, singles_ex) + x_s5b(bra, singles_ex, singles_gs) + x_s5c(bra, singles_ex, singles_gs) +\n                 x_s6(bra, singles_ex, singles_gs, singles_gs) + x_s5b(bra, singles_gs, singles_ex)\n                 + x_s5c(bra, singles_gs, singles_ex) + x_s6(bra, singles_gs, singles_ex, singles_gs) +\n                 x_s6(bra, singles_gs, singles_gs, singles_ex);\n    } else if (name == POT_s2b_) {\n        result = x_s2b(bra, doubles_ex);\n    } else if (name == POT_s2c_) {\n        result = x_s2c(bra, doubles_ex);\n    } else if (name == POT_s4a_) {\n        result = x_s4a(bra, singles_gs, doubles_ex) + x_s4a(bra, singles_ex, doubles_gs);\n    } else if (name == POT_s4b_) {\n        result = x_s4b(bra, singles_gs, doubles_ex) + x_s4b(bra, singles_ex, doubles_gs);\n    } else if (name == POT_s4c_) {\n        result = x_s4c(bra, singles_gs, doubles_ex) + x_s4c(bra, singles_ex, doubles_gs);\n    }\n\n    const std::pair<double, double> time = timer.current_time();\n    if (result == 0.0) output.warning(\"Result of <x\" + assign_name(name) + \"> is zero!\");\n\n    if (world.rank() == 0) {\n        std::cout << std::fixed << std::setprecision(10) << \"<x|\" << assign_name(name) << \">=\" << result << \", \"\n                  << time.first << \" (wall), \" << time.second << \" (cpu)\" << \"\\n\";\n    }\n    return result;\n}\n\nstd::tuple<madness::vector_real_function_3d, madness::vector_real_function_3d>\nCCPotentials::potential_singles_ex(World& world, const std::vector<int> result_index,\n                                   const CC_vecfunction& singles_gs,\n                                   const Pairs<CCPair>& doubles_gs, const CC_vecfunction& singles_ex,\n                                   const Pairs<CCPair>& doubles_ex, const PotentialType& name, const Info& info)\n{\n    // sanity check\n    MADNESS_ASSERT(singles_gs.type == PARTICLE);\n    MADNESS_ASSERT(singles_ex.type == RESPONSE);\n\n    // gs depends on es:  CC2 -> LRCC2; MP2 -> ADC(2), etc\n    auto ctype_ex=doubles_ex.allpairs.begin()->second.ctype;\n    auto builder_ex=CCPairBuilder(world,info).set_gs_singles(singles_gs).set_ex_singles(singles_ex).set_ctype(ctype_ex);\n\n    auto ctype_gs=doubles_gs.allpairs.begin()->second.ctype;\n    auto builder_gs=CCPairBuilder(world,info).set_gs_singles(singles_gs).set_ex_singles(singles_ex).set_ctype(ctype_gs);\n\n    vector_real_function_3d result, intermediate;\n\n    // collect all singles that correspond to external lines\n    auto get_batch_of_external_singles = [](const CC_vecfunction& singles, const std::vector<int>& result_index) {\n        std::vector<CCFunction<double,3>> singles_tmp;\n        for (int i : result_index) singles_tmp.push_back(singles(i));\n        return CC_vecfunction(singles_tmp);\n    };\n\n    const CC_vecfunction singles_ex_external=get_batch_of_external_singles(singles_ex,result_index);\n\n    Projector<double,3> Ox(info.get_active_mo_bra(),singles_ex.get_vecfunction());\n\n    CCTimer timer(world, \"timer-ex-potential\");\n    if (name == POT_F3D_) {\n        result = fock_residue_closed_shell(world, singles_ex_external, info);\n    } else if (name == POT_ccs_) {\n        const CC_vecfunction singles_gs_external=get_batch_of_external_singles(singles_gs,result_index);\n        const CC_vecfunction t_gs_external = make_active_t_intermediate(singles_gs_external,info);\n        // this is the functional derivative of the GS terms S3c + S5b + S5c + S6 = Qt(S3c^(t_i))\n        // see Tab. 3 line 2 and Eq. (19) of the excited state paper\n        const CC_vecfunction t = make_active_t_intermediate(singles_gs,info);\n        QProjector<double,3> Qt(info.get_active_mo_bra(),t.get_vecfunction());\n        // part1 + part2 correspond to eq. (19) third term: Qt(dS5b(t_i))  (missing superscript t_i in the equation seems a typo)\n        // ccs_unprojected corresponds to Tab 3 line 2 first diagram\n        vector_real_function_3d part1 = Qt(ccs_unprojected(world, t_gs_external, singles_ex, info));\n        // ccs_unprojected corresponds to Tab 3 line 2 second diagram\n        vector_real_function_3d part2 = Qt(ccs_unprojected(world, singles_ex_external, singles_gs, info));\n        // corresponds to eq. (19) second but last term: dQt S5b(t_i) = -Ox(S5b(ti))\n        vector_real_function_3d part3 = Ox(ccs_unprojected(world, t_gs_external, singles_gs, info));\n        result=part1 + part2 - part3;\n    } else if (name == POT_s2b_) {\n        std::tie(result, intermediate) = s2b(world, result_index, singles_ex, doubles_ex, builder_ex, info);\n    } else if (name == POT_s2c_) {\n        std::tie(result, intermediate) = s2c(world, result_index, singles_ex, doubles_ex, builder_ex, info);\n    } else if (name == POT_s4a_) {\n        error(\"potential_singles: Demanded s4a potential -> this is calculated from the s2b potential\");\n    } else if (name == POT_s4b_) {\n        vector_real_function_3d s4b_part1 = s4b(world, result_index, singles_gs, doubles_ex, builder_ex, info);\n        vector_real_function_3d s4b_part2 = s4b(world, result_index, singles_ex, doubles_gs, builder_gs, info);\n        result = add(world, s4b_part1, s4b_part2);\n    } else if (name == POT_s4c_) {\n        vector_real_function_3d s4c_part1 = s4c(world, result_index, singles_gs, doubles_ex, builder_ex, info);\n        vector_real_function_3d s4c_part2 = s4c(world, result_index, singles_ex, doubles_gs, builder_gs, info);\n        result = add(world, s4c_part1, s4c_part2);\n    } else if (name == POT_cis_) {\n        CC_vecfunction orbitals(info.mo_ket,HOLE);\n        const CC_vecfunction orbitals_external=get_batch_of_external_singles(orbitals,result_index);\n        result = ccs_unprojected(world, orbitals_external, singles_ex, info);\n    } else MADNESS_EXCEPTION((\"potential_singles: Unknown potential \" + assign_name(name)).c_str(), 1)\n\n    const double size = get_size(world, result);\n    const double norm = norm2(world, result);\n    const std::pair<double, double> time = timer.current_time();\n    if (world.rank() == 0) {\n        std::cout << \"||\" << assign_name(name) << \"||=\" << std::fixed << std::setprecision(6) << norm << \", \"\n                  << std::scientific << std::setprecision(1) << size << \" (GB), \" << time.first\n                  << \"s (wall), \" << time.second << \"s (cpu)\\n\";\n    }\n    if (result.empty()) MADNESS_EXCEPTION(\"Result is empty\", 1);\n    truncate(world, result);\n    return std::make_tuple(result, intermediate);\n}\n\nmadness::vector_real_function_3d\nCCPotentials::fock_residue_closed_shell(World& world, const CC_vecfunction& singles, const Info& info)\n{\n    auto g12=CCConvolutionOperator<double,3>(world,OT_G12,info.parameters);\n    CCTimer timer_J(world, \"J\");\n    real_function_3d density=dot(world, info.mo_bra,info.mo_ket);\n    real_function_3d hartree_potential=g12(density);\n    vector_real_function_3d J = hartree_potential* singles.get_vecfunction();\n    truncate(world, J);\n    scale(world, J, 2.0);\n    timer_J.info(true, norm2(world, J));\n    CCTimer timer_K(world, \"K\");\n    vector_real_function_3d vK;\n    for (const auto& tmpi : singles.functions) {\n        const CCFunction<double,3>& taui = tmpi.second;\n        const real_function_3d Ki = K(world, taui, info);\n        vK.push_back(Ki);\n    }\n    scale(world, vK, -1.0);\n    timer_K.info(true, norm2(world, vK));\n    // apply nuclear potential\n    auto ncf=std::shared_ptr<AdhocNuclearCorrelationFactor>(new AdhocNuclearCorrelationFactor(world, info.U2, info.U1));\n    Nuclear<double, 3> Uop(world, ncf);\n    vector_real_function_3d Upot = Uop(singles.get_vecfunction());\n    vector_real_function_3d KU = add(world, vK, Upot);\n    return add(world, J, KU);\n}\n\nmadness::real_function_6d\nCCPotentials::K(const real_function_6d& u, const bool symmetric) const {\n    real_function_6d result = real_factory_6d(world).compressed();\n    // K(1) Part\n    result += apply_K(u, 1);\n    // K(2) Part\n    if (symmetric) {\n        result += swap_particles(result);\n    } else result += apply_K(u, 2);\n\n    result.print_size(\"K|u>\");\n    return (result.truncate(parameters.tight_thresh_6D()));\n}\n\nmadness::real_function_6d\nCCPotentials::K_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                          const std::vector<real_function_3d>& mo_bra, const real_function_6d& u,\n                          const bool symmetric, const CCParameters& parameters) {\n    real_function_6d result = real_factory_6d(world).compressed();\n    // K(1) Part\n    result += apply_K_macrotask(world, mo_ket, mo_bra, u, 1, parameters);\n    // K(2) Part\n    if (symmetric) {\n        result += madness::swap_particles(result);\n    } else result += apply_K_macrotask(world, mo_ket, mo_bra, u, 2, parameters);\n\n    if (parameters.debug()) result.print_size(\"K|u>\");\n    return (result.truncate(parameters.tight_thresh_6D()));\n}\n\nmadness::real_function_3d\nCCPotentials::K(World& world, const CCFunction<double,3>& f, const Info& info) {\n    auto g12=CCConvolutionOperator<double,3>(world,OT_G12,info.parameters);\n    real_function_3d result = real_factory_3d(world);\n    for (size_t k = 0; k < info.mo_ket.size(); k++) {\n        result += ((g12)(info.mo_bra[k] * f.f()).truncate()) *info.mo_ket[k];\n    }\n    return result;\n}\n\nmadness::real_function_3d\nCCPotentials::K_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                          const std::vector<real_function_3d>& mo_bra, const real_function_3d& f,\n                          const CCParameters& parameters) {\n    real_function_3d result = real_factory_3d(world);\n    real_convolution_3d g12 = CoulombOperator(world, parameters.lo(), parameters.thresh_poisson());\n    for (size_t k = 0; k < mo_ket.size(); k++) {\n        result += ((g12)(mo_bra[k] * f).truncate()) * mo_ket[k];\n    }\n    return result;\n}\n\nmadness::real_function_6d\nCCPotentials::apply_K(const real_function_6d& u, const size_t& particle) const {\n    MADNESS_ASSERT(particle == 1 || particle == 2);\n    //poisson->particle()=particle;\n    real_function_6d result = real_factory_6d(world).compressed();\n    for (size_t k = 0; k < mo_ket_.size(); k++) {\n        real_function_6d copyu = copy(u);\n        real_function_6d X = (multiply(copyu, copy(mo_bra_(k).function), particle)).truncate();\n        //      real_function_6d Y=(*poisson)(X);\n        real_function_6d Y = (*g12)(X, particle);     // overwrite X to save space\n        result += (multiply(copy(Y), copy(mo_ket_(k).function),\n                            particle)).truncate();     // this will destroy X, but I d not intend to use it again so I choose here to save this copy\n    }\n    return result;\n}\n\nmadness::real_function_6d\nCCPotentials::apply_K_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                                const std::vector<real_function_3d>& mo_bra,\n                                const real_function_6d& u, const size_t& particle, const CCParameters& parameters) {\n    MADNESS_ASSERT(particle == 1 || particle == 2);\n    real_function_6d result = real_factory_6d(world);\n    real_convolution_3d g12 = CoulombOperator(world, parameters.lo(), parameters.thresh_poisson());\n    g12.particle() = particle;\n    g12.destructive()=true;\n    std::size_t batchsize=3;\n\n\n    for (std::size_t kbatch=0; kbatch < mo_ket.size(); kbatch+=batchsize) {\n        for (std::size_t k = kbatch; k < std::min(kbatch+batchsize,mo_ket.size()); k++) {\n            real_function_6d copyu = copy(u);\n            real_function_6d X = (multiply(copyu, copy(mo_bra[k]), particle)).truncate();\n            real_function_6d Y = g12(X);     // overwrite X to save space\n            auto tmp=(multiply(copy(Y), copy(mo_ket[k]),particle)).truncate();     // this will destroy X, but I d not intend to use it again so I choose here to save this copy\n            result += tmp;\n        }\n        result.truncate(parameters.tight_thresh_6D()).reduce_rank(parameters.tight_thresh_6D());\n    }\n    return result.truncate(parameters.tight_thresh_3D()*3.0).reduce_rank(parameters.tight_thresh_6D()*3.0);\n}\n\nmadness::real_function_6d\nCCPotentials::apply_Kf(const CCFunction<double,3>& x, const CCFunction<double,3>& y) const {\n    bool symmetric = false;\n    if ((x.type == y.type) && (x.i == y.i)) symmetric = true;\n\n    // First make the 6D function f12|x,y>\n    real_function_6d f12xy = make_f_xy(x, y);\n    f12xy.truncate().reduce_rank();\n    // Apply the Exchange Operator\n    real_function_6d result = K(f12xy, symmetric);\n    return result;\n}\n\nmadness::real_function_6d\nCCPotentials::apply_fK(const CCFunction<double,3>& x, const CCFunction<double,3>& y, const real_convolution_6d *Gscreen) const {\n    const bool symmetric = (x.type == y.type && x.i == y.i);\n    const real_function_3d Kx = K(world, x, info);\n    const real_function_6d fKphi0b = make_f_xy(CCFunction<double,3>(Kx, x.i, UNDEFINED), y, Gscreen);\n    real_function_6d fKphi0a;\n    if (symmetric) fKphi0a = swap_particles(fKphi0b);\n    else {\n        real_function_3d Ky = K(world, y, info);\n        fKphi0a = make_f_xy(x, CCFunction<double,3>(Ky, y.i, UNDEFINED), Gscreen);\n    }\n    const real_function_6d fKphi0 = (fKphi0a + fKphi0b);\n    return fKphi0;\n}\n\nmadness::real_function_6d\nCCPotentials::make_f_xy(const CCFunction<double,3>& x, const CCFunction<double,3>& y, const real_convolution_6d *Gscreen) const {\n    std::string screen = \"\";\n    if (Gscreen != NULL) screen = \"screened \";\n\n    CCTimer timer(world, \"Making \" + screen + \"f|\" + x.name() + \",\" + y.name() + \"> \");\n    real_function_6d fxy = CompositeFactory<double, 6, 3>(world).g12(corrfac.f()).particle1(copy(x.function)).particle2(\n            copy(y.function));\n    if (Gscreen == NULL) fxy.fill_tree().truncate().reduce_rank();\n    else fxy.fill_cuspy_tree(*Gscreen).truncate().reduce_rank();\n\n    timer.info(parameters.debug(), fxy.norm2());\n    if (x.type != UNDEFINED && y.type != UNDEFINED) {\n        CCTimer timer_db(world, \"f|xy> sanity check\");\n        const double test1 = (mo_bra_(y.i).function).inner(fxy.project_out(mo_bra_(x.i).function, 0));\n        const double test2 = (mo_bra_(y.i).function).inner((*f12)(mo_bra_(x.i), x) * y.function);\n        const double sanity = test1 - test2;\n        if (fabs(sanity) > FunctionDefaults<6>::get_thresh()) {\n            if (world.rank() == 0)\n                std::cout << std::fixed << std::setprecision(6) << \"test1=\" << test1 << \"\\ntest2=\" << test2 << \"\\ndiff=\"\n                          << sanity << \"\\n\";\n\n            output.warning(\"make f|xy> not accurate!\");\n        }\n        timer_db.info(parameters.debug(), sanity);\n    }\n    return fxy;\n}\n\nmadness::real_function_6d\nCCPotentials::make_f_xy(World& world, const CCFunction<double,3>& phi_i, const CCFunction<double,3>& phi_j,\n                        const Info& info, const real_convolution_6d *Gscreen) {\n    const auto& parameters=info.parameters;\n    CorrelationFactor corrfac(world, parameters.gamma(), 1.e-7, parameters.lo());\n\n    real_function_6d fxy = CompositeFactory<double, 6, 3>(world).g12(corrfac.f()).\n                                                    particle1(copy(phi_i.function)).particle2(copy(phi_j.function));\n    if (Gscreen == NULL) fxy.fill_tree().truncate().reduce_rank();\n    else fxy.fill_cuspy_tree(*Gscreen).truncate().reduce_rank();\n    return fxy;\n}\n\n\nmadness::real_function_6d\nCCPotentials::make_f_xy_macrotask(World& world, const real_function_3d& x_ket, const real_function_3d& y_ket,\n                                  const real_function_3d& x_bra, const real_function_3d& y_bra,\n                                  const size_t& i, const size_t& j, const CCParameters& parameters,\n                                  const FuncType& x_type, const FuncType& y_type,\n                                  const real_convolution_6d *Gscreen){\n    CorrelationFactor corrfac(world, parameters.gamma(), 1.e-7, parameters.lo());\n    const std::string x_name = \"phi\" + stringify(i);\n    const std::string y_name = \"phi\" + stringify(j);\n\n    std::string screen = \"\";\n    if (Gscreen != NULL) screen = \"screened \";\n\n    CCTimer timer(world, \"Making \" + screen + \"f|\" + x_name + \",\" + y_name + \"> \");\n    real_function_6d fxy = CompositeFactory<double, 6, 3>(world).g12(corrfac.f()).\n                                                    particle1(copy(x_ket)).particle2(copy(y_ket));\n    if (Gscreen == NULL) fxy.fill_tree().truncate().reduce_rank();\n    else fxy.fill_cuspy_tree(*Gscreen).truncate().reduce_rank();\n\n    timer.info(parameters.debug(), fxy.norm2());\n    if (x_type != UNDEFINED && y_type != UNDEFINED) {\n        CCTimer timer_db(world, \"f|xy> sanity check\");\n        //const double fourpi = 4.0 * constants::pi;\n       // const double lo = 1.e-6;\n        //const double bsh_eps = 1.e-7;\n        real_convolution_3d slaterf12 = SlaterF12Operator(world, corrfac.gamma(),\n                                                          parameters.lo(), parameters.thresh_poisson());\n        const double test1 = y_bra.inner(fxy.project_out(x_bra, 0));\n        const double test2 = y_bra.inner(slaterf12(x_bra * x_ket) * y_ket);\n        const double sanity = test1 - test2;\n        if (fabs(sanity) > FunctionDefaults<6>::get_thresh()) {\n            if (world.rank() == 0)\n                std::cout << std::fixed << std::setprecision(6) << \"test1=\" << test1\n                          << \"\\ntest2=\" << test2 << \"\\ndiff=\" << sanity << \"\\n\";\n            std::cout << (\"make f|xy> not accurate!\\n\");\n        }\n        timer_db.info(parameters.debug(), sanity);\n    }\n    return fxy;\n}\n\n/// the S3c or ccs potential\n\n/// the open line index is i, the summed-over index is k\n/// @param[in]  ti  (a subset of) the singles corresponding to external lines\n/// @param[in]  tk  the singles corresponding to the summed-over lines\nmadness::vector_real_function_3d\nCCPotentials::ccs_unprojected(World& world, const CC_vecfunction& ti, const CC_vecfunction& tk, const Info& info) {\n    MADNESS_CHECK_THROW(tk.size()==info.get_active_mo_ket().size(),\"ccs_unprojected: tk.size() != info.get_active_mo_ket().size()\");\n    auto g12=CCConvolutionOperator<double,3>(world,OT_G12,info.parameters);\n    vector_real_function_3d result;\n    for (const auto& itmp : ti.functions) {\n\n        // direct term\n        real_function_3d kgtk = real_factory_3d(world);\n        for (const auto& ktmp : tk.functions)\n            kgtk += (g12)(info.mo_bra[ktmp.first], ktmp.second);\n        const real_function_3d kgtk_ti = kgtk * ti(itmp.first).function;\n        real_function_3d kgti_tk = real_factory_3d(world);\n\n        // exchange term\n        for (const auto& ktmp : tk.functions)\n            kgti_tk += (g12)(info.mo_bra[ktmp.first], ti(itmp.first)) * tk(ktmp.first).function;\n        const real_function_3d resulti = 2.0 * kgtk_ti - kgti_tk;\n        result.push_back(resulti);\n    }\n    return result;\n}\n\ndouble\nCCPotentials::x_s3a(const CC_vecfunction& x, const CC_vecfunction& t) const {\n    MADNESS_ASSERT(x.size() == t.size());\n    Nuclear<double, 3> Uop(world, nemo_.get());\n    vector_real_function_3d Ut = Uop(t.get_vecfunction());\n    const double nuc = inner(world, x.get_vecfunction(), Ut).sum();\n    double pot = 0.0;\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : mo_ket_.functions) {\n            // unfrozen summation !!!!!! important !!!!\n            const size_t k = ktmp.first;\n            const double gpart = make_xy_op_ab(x(i), mo_bra_(k), *g12, t(i), mo_ket_(k));\n            const double xpart = make_xy_op_ab(x(i), mo_bra_(k), *g12, mo_ket_(k), t(i));\n            pot += (2.0 * gpart - xpart);\n        }\n    }\n    double kinetic = compute_kinetic_energy(world, x.get_vecfunction(), t.get_vecfunction());\n    return kinetic + pot + nuc;\n}\n\ndouble\nCCPotentials::x_s3b(const CC_vecfunction& x, const CC_vecfunction& t) const {\n    MADNESS_ASSERT(x.size() == t.size());\n    const size_t freeze = x.functions.cbegin()->first;\n    Tensor<double> overlap = inner(world, x.get_vecfunction(), t.get_vecfunction());\n    double result = 0.0;\n    for (int i = 0; i < overlap.size(); i++) {\n        result += get_orbital_energies()[i + freeze] * overlap(i);\n    }\n    return -1.0 * result;\n}\n\ndouble\nCCPotentials::x_s3c(const CC_vecfunction& x, const CC_vecfunction& t) const {\n    MADNESS_ASSERT(x.size() == t.size());\n    double result = 0.0;\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : t.functions) {\n            const size_t k = ktmp.first;\n            result += (2.0 * make_xy_op_ab(x(i), mo_bra_(k), *g12, mo_ket_(i), t(k)) -\n                       make_xy_op_ab(x(i), mo_bra_(k), *g12, t(k), mo_ket_(i)));\n        }\n    }\n    return result;\n}\n\ndouble\nCCPotentials::x_s5b(const CC_vecfunction& x, const CC_vecfunction& t1, const CC_vecfunction& t2) const {\n    MADNESS_ASSERT(x.size() == t1.size());\n    MADNESS_ASSERT(t1.size() == t2.size());\n    double result = 0.0;\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : t1.functions) {\n            const size_t k = ktmp.first;\n            result += (2.0 * make_xy_op_ab(x(i), mo_bra_(k), *g12, t1(i), t2(k)) -\n                       make_xy_op_ab(x(i), mo_bra_(k), *g12, t2(k), t1(i)));\n        }\n    }\n    return result;\n}\n\ndouble\nCCPotentials::x_s5c(const CC_vecfunction& x, const CC_vecfunction& t1, const CC_vecfunction& t2) const {\n    MADNESS_ASSERT(x.size() == t1.size());\n    MADNESS_ASSERT(t1.size() == t2.size());\n    double result = 0.0;\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : t1.functions) {\n            const size_t k = ktmp.first;\n            for (const auto& ltmp : t2.functions) {\n                const size_t l = ltmp.first;\n                result += (2.0 * make_xy_op_ab(mo_bra_(l), mo_bra_(k), *g12, mo_ket_(i), t1(k)) -\n                           make_xy_op_ab(mo_bra_(l), mo_bra_(k), *g12, t1(k), mo_ket_(i))) *\n                          x(i).function.inner(t2(l).function);\n            }\n        }\n    }\n    return -1.0 * result;\n}\n\ndouble\nCCPotentials::x_s6(const CC_vecfunction& x, const CC_vecfunction& t1, const CC_vecfunction& t2,\n                   const CC_vecfunction& t3) const {\n    MADNESS_ASSERT(x.size() == t1.size());\n    MADNESS_ASSERT(t1.size() == t2.size());\n    double result = 0.0;\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : t1.functions) {\n            const size_t k = ktmp.first;\n            for (const auto& ltmp : t2.functions) {\n                const size_t l = ltmp.first;\n                result += (2.0 * make_xy_op_ab(mo_bra_(l), mo_bra_(k), *g12, t3(i), t1(k)) -\n                           make_xy_op_ab(mo_bra_(l), mo_bra_(k), *g12, t1(k), t3(i))) *\n                          x(i).function.inner(t2(l).function);\n            }\n        }\n    }\n    return -1.0 * result;\n}\n\ndouble\nCCPotentials::x_s2b(const CC_vecfunction& x, const Pairs<CCPair>& u) const {\n    double result = 0.0;\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : x.functions) {\n            const size_t k = ktmp.first;\n            result += (2.0 * make_xy_op_u(x(i), mo_bra_(k), *g12, get_pair_function(u, i, k)) -\n                       make_xy_op_u(mo_bra_(k), x(i), *g12, get_pair_function(u, i, k)));\n        }\n    }\n    return result;\n}\n\ndouble\nCCPotentials::x_s2c(const CC_vecfunction& x, const Pairs<CCPair>& u) const {\n    double result = 0.0;\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : x.functions) {\n            const size_t k = ktmp.first;\n            const real_function_3d kgi = (*g12)(mo_bra_(k), mo_ket_(i));\n            for (const auto& ltmp : x.functions) {\n                const size_t l = ltmp.first;\n                real_function_3d l_kgi = (mo_bra_(l).function * kgi).truncate();\n                result += 2.0 * make_xy_u(x(i), l_kgi, get_pair_function(u, k, l)) -\n                          make_xy_u(l_kgi, x(i), get_pair_function(u, k, l));\n            }\n        }\n    }\n    return -1.0 * result;\n}\n\ndouble\nCCPotentials::x_s4a(const CC_vecfunction& x, const CC_vecfunction& t, const Pairs<CCPair>& u) const {\n    double result = 0.0;\n    MADNESS_ASSERT(x.size() == t.size());\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : x.functions) {\n            const size_t k = ktmp.first;\n            for (const auto& ltmp : x.functions) {\n                const size_t l = ltmp.first;\n                result += (2.0 * make_xy_op_u(mo_bra_(l), mo_bra_(k), *g12, get_pair_function(u, i, k)) -\n                           make_xy_op_u(mo_bra_(k), mo_bra_(l), *g12, get_pair_function(u, i, k))) *\n                          x(i).function.inner(t(l).function);\n            }\n        }\n    }\n    return -1.0 * result;\n}\n\ndouble\nCCPotentials::x_s4b(const CC_vecfunction& x, const CC_vecfunction& t, const Pairs<CCPair>& u) const {\n    double result = 0.0;\n    MADNESS_ASSERT(x.size() == t.size());\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : x.functions) {\n            const size_t k = ktmp.first;\n            const real_function_3d kgti = (*g12)(mo_bra_(k), t(i));\n            for (const auto& ltmp : x.functions) {\n                const size_t l = ltmp.first;\n                real_function_3d l_kgti = (mo_bra_(l).function * kgti).truncate();\n                result += 2.0 * make_xy_u(x(i), l_kgti, get_pair_function(u, k, l)) -\n                          make_xy_u(l_kgti, x(i), get_pair_function(u, k, l));\n            }\n        }\n    }\n    return -1.0 * result;\n}\n\ndouble\nCCPotentials::x_s4c(const CC_vecfunction& x, const CC_vecfunction& t, const Pairs<CCPair>& u) const {\n    double result = 0.0;\n    MADNESS_ASSERT(x.size() == t.size());\n    for (const auto& itmp : x.functions) {\n        const size_t i = itmp.first;\n        for (const auto& ktmp : x.functions) {\n            const size_t k = ktmp.first;\n            const real_function_3d kgtk = (*g12)(mo_bra_(k), t(k));\n            for (const auto& ltmp : x.functions) {\n                const size_t l = ltmp.first;\n                const real_function_3d lgtk = (*g12)(mo_bra_(l), t(k));\n                const real_function_3d k_lgtk = (mo_bra_(k).function * lgtk).truncate();\n                const real_function_3d l_kgtk = (mo_bra_(l).function * kgtk).truncate();\n                result += (4.0 * make_xy_u(x(i), l_kgtk, get_pair_function(u, i, l)) -\n                           2.0 * make_xy_u(l_kgtk, x(i), get_pair_function(u, i, l)) -\n                           2.0 * make_xy_u(x(i), k_lgtk, get_pair_function(u, i, l))\n                           + 1.0 * make_xy_u(k_lgtk, x(i), get_pair_function(u, i, l)));\n            }\n        }\n    }\n    return result;\n}\n\nstd::tuple<madness::vector_real_function_3d, madness::vector_real_function_3d>\nCCPotentials::s2b(World& world, const std::vector<int> external_indices, const CC_vecfunction& singles,\n                  const Pairs<CCPair>& doubles, const CCPairBuilder& builder, const Info& info)\n{\n    vector_real_function_3d result;\n    // auto builder=PairBuilder(world,info).set_gs_singles(singles);\n\n    // which \"external_indices\" refers to a subset of the full external indices (active orbitals) only (through Macrotasks),\n    // the intermediates result_u is stored as the full vector [nfreeze,nocc)\n    vector_real_function_3d result_u = info.intermediate_potentials(singles, POT_s2b_,false);\n    vector_real_function_3d result_u_return;\n    bool recalc_u_part = false;\n    if (result_u.empty()) recalc_u_part = true;\n\n    // for (const auto& itmp : singles.functions) {\n    for (const int i : external_indices) {\n        real_function_3d resulti_u = real_factory_3d(world);\n        real_function_3d resulti_r = real_factory_3d(world);\n        for (const auto& ktmp : singles.functions) {\n            const size_t k = ktmp.first;\n            // next line might swap particles 1 and 2\n            std::vector<CCPairFunction<double,6>> uik1 = get_pair_function(doubles, i, k);\n            // make a ful pair function using the pure 6D part uik and complete with the rest\n            CCPair pair_ik=builder.complete_pair_with_low_rank_parts(builder.make_pair(i,k,uik1));\n            std::vector<CCPairFunction<double,6>> uik = pair_ik.functions;\n\n            // check if the first function in the vector is really the pure 6D part\n            MADNESS_ASSERT(uik[0].is_pure());\n            if (recalc_u_part) {\n                resulti_u += 2.0 * apply_s2b_operation(world, info.mo_bra[k], uik[0], 2, info);     //2.0*uik[0].dirac_convolution(mo_bra_(k),g12,2);\n                resulti_u -= apply_s2b_operation(world, info.mo_bra[k], uik[0], 1, info);     //uik[0].dirac_convolution(mo_bra_(k),g12,1);\n            } else {\n                resulti_u = result_u[i - info.parameters.freeze()];\n            }\n            for (size_t mm = 1; mm < uik.size(); mm++) {\n                resulti_r += 2.0 * apply_s2b_operation(world, info.mo_bra[k], uik[mm], 2, info);     //2.0*uik[mm].dirac_convolution(mo_bra_(k),g12,2);\n                resulti_r -= apply_s2b_operation(world, info.mo_bra[k], uik[mm], 1, info);     //uik[mm].dirac_convolution(mo_bra_(k),g12,1);\n            }\n        }\n        result.push_back(resulti_r + resulti_u);\n\n        // if the intermediates have been recomputed, return them so they can be stored outside macrotask,\n        // otherwise return an empty vector (see 2 lines below);\n        // if (recalc_u_part) result_u.push_back(resulti_u);\n        result_u_return.push_back(resulti_u);\n    }\n    return std::make_tuple(result,result_u_return);;\n}\n\nstd::tuple<madness::vector_real_function_3d, madness::vector_real_function_3d>\nCCPotentials::s2c(World& world, const std::vector<int> external_index, const CC_vecfunction& singles,\n                  const Pairs<CCPair>& doubles1, const CCPairBuilder& builder, const Info& info) {\n    vector_real_function_3d result;\n    // auto builder=PairBuilder(world,info).set_gs_singles(singles);\n\n    // see if we can skip the recalculation of the pure 6D part since this does not change during the singles iteration\n    vector_real_function_3d result_u = info.intermediate_potentials(singles, POT_s2c_,false);\n    vector_real_function_3d result_u_return;\n    bool recalc_u_part = false;\n    if (result_u.empty()) recalc_u_part = true;\n    auto g12=CCConvolutionOperator<double,3>(world,OT_G12,info.parameters);\n\n    // add the regularization terms Q12 f12 |xy>  to the pair\n    Pairs<CCPair> doubles=doubles1;\n    for (auto& itmp : doubles.allpairs) {\n        auto& pair=itmp.second;\n        pair=builder.complete_pair_with_low_rank_parts(pair);\n    }\n\n    // for (const auto& itmp : singles.functions) {\n    for (const int i : external_index) {\n        // const size_t i = itmp.first;\n        real_function_3d resulti_u = real_factory_3d(world);\n        real_function_3d resulti_r = real_factory_3d(world);\n        for (const auto& ktmp : singles.functions) {\n            const size_t k = ktmp.first;\n            const real_function_3d kgi = (g12)(info.mo_bra[k], info.mo_ket[i]);\n            for (const auto& ltmp : singles.functions) {\n                const size_t l = ltmp.first;\n                const real_function_3d l_kgi = info.mo_bra[l] * kgi;\n                std::vector<CCPairFunction<double,6>> ukl = get_pair_function(doubles, k, l);\n                // check if the first function in the vector is really the pure 6D part\n                MADNESS_ASSERT(ukl[0].is_pure());\n                if (recalc_u_part) {\n                    resulti_u += -2.0 * ukl[0].project_out(l_kgi, 2);\n                    resulti_u += ukl[0].project_out(l_kgi, 1);\n                } else {\n                    resulti_u = result_u[i - info.parameters.freeze()];\n                }\n                for (size_t mm = 1; mm < ukl.size(); mm++) {\n                    resulti_r += -2.0 * ukl[mm].project_out(l_kgi, 2);\n                    resulti_r += ukl[mm].project_out(l_kgi, 1);\n                }\n            }\n        }\n        result.push_back(resulti_r + resulti_u);\n\n        // if the intermediates have been recomputed, return them so they can be stored outside macrotask,\n        // otherwise return an empty vector\n        if (recalc_u_part) result_u.push_back(resulti_u);\n        result_u_return.push_back(resulti_u);\n    }\n\n    return std::make_tuple(result,result_u_return);\n}\n\nmadness::vector_real_function_3d\nCCPotentials::s4a_from_s2b(const vector_real_function_3d& s2b, const CC_vecfunction& singles) const {\n    MADNESS_ASSERT(singles.type == PARTICLE || singles.type == RESPONSE);\n    if (s2b.empty()) output.warning(\"S2b-potential is empty --> S4a will be zero\");\n\n    vector_real_function_3d result;\n    for (size_t i = 0; i < s2b.size(); i++) {\n        real_function_3d resulti = real_factory_3d(world);\n        const Tensor<double> ls2bi = inner(world, s2b[i], get_active_mo_bra());\n        for (const auto& ltmp : singles.functions) {\n            resulti -= ls2bi[ltmp.first - parameters.freeze()] * singles(ltmp.first).function;\n        }\n        result.push_back(resulti);\n    }\n    if (parameters.debug()) {\n        vector_real_function_3d s4a_2 = apply_projector(s2b, singles);\n        scale(world, s4a_2, -1.0);\n        vector_real_function_3d diff = sub(world, result, s4a_2);\n        if (world.rank() == 0)\n            std::cout << std::fixed << std::setprecision(5) << \"||S4a||=\" << norm2(world, result) << \", ||S4a||=\"\n                      << norm2(world, s4a_2) << \", ||diff||=\" << norm2(world, diff) << \"\\n\";\n    }\n    // make shure the unprojected S2b potential was used\n    if (norm2(world, result) == 0.0) output.warning(\"S4a potential is zero!! Was the s2b potential Q-projected ?\");\n\n    return result;\n}\n\nmadness::vector_real_function_3d\nCCPotentials::s4b(World& world, const std::vector<int> external_index, const CC_vecfunction& singles, const Pairs<CCPair>& doubles, const CCPairBuilder& builder, const Info& info)\n{\n    auto g12=CCConvolutionOperator<double,3>(world,OT_G12,info.parameters);\n    vector_real_function_3d result;\n    const vector_real_function_3d active_mo_bra = info.get_active_mo_bra();\n    // for (const auto& itmp : singles.functions) {\n        // const size_t i = itmp.first;\n    for (const std::size_t i : external_index) {\n        real_function_3d resulti = real_factory_3d(world);\n        for (const auto& ktmp : singles.functions) {\n            const size_t k = ktmp.first;\n            const real_function_3d kgi = (g12)(info.mo_bra[k], singles(i));\n            vector_real_function_3d l_kgi = mul_sparse(world, kgi, active_mo_bra, info.parameters.thresh_3D());\n            truncate(world, l_kgi);\n            for (const auto& ltmp : singles.functions) {\n                const size_t l = ltmp.first;\n                // const std::vector<CCPairFunction<double,6>> ukl = get_pair_function(doubles, k, l);\n            // make a ful pair function using the pure 6D part uik and complete with the rest\n            std::vector<CCPairFunction<double,6>> ukl1 = get_pair_function(doubles, k, l);\n            CCPair pair_kl=builder.complete_pair_with_low_rank_parts(builder.make_pair(k,l,ukl1));\n            std::vector<CCPairFunction<double,6>> ukl = pair_kl.functions;\n\n                for (size_t mm = 0; mm < ukl.size(); mm++) {\n                    resulti += -2.0 * ukl[mm].project_out(l_kgi[l - info.parameters.freeze()], 2);\n                    resulti += ukl[mm].project_out(l_kgi[l - info.parameters.freeze()], 1);\n                }\n            }\n        }\n        result.push_back(resulti);\n    }\n    return result;\n}\n\nmadness::vector_real_function_3d\nCCPotentials::s4c(World& world, const std::vector<int> external_index, const CC_vecfunction& singles, const Pairs<CCPair>& doubles, const CCPairBuilder& builder, const Info& info)\n{\n    vector_real_function_3d result;\n    auto g12=CCConvolutionOperator<double,3>(world,OT_G12,info.parameters);\n    const vector_real_function_3d active_mo_bra = info.get_active_mo_bra();\n    // for (const auto& itmp : singles.functions) {\n        // const size_t i = itmp.first;\n    for (const std::size_t i : external_index) {\n        real_function_3d resulti = real_factory_3d(world);\n        real_function_3d part1 = real_factory_3d(world);\n        real_function_3d part2 = real_factory_3d(world);\n        real_function_3d part3 = real_factory_3d(world);\n        real_function_3d part4 = real_factory_3d(world);\n        real_function_3d kgtauk = real_factory_3d(world);\n        for (const auto& ktmp : singles.functions) {\n            const size_t k = ktmp.first;\n            kgtauk += (g12)(info.mo_bra[k], singles(k));\n        }\n        vector_real_function_3d l_kgtauk = mul(world, kgtauk, active_mo_bra);\n        truncate(world, l_kgtauk);\n        for (const auto& ltmp : singles.functions) {\n            const size_t l = ltmp.first;\n//            const std::vector<CCPairFunction<double,6>> uil = get_pair_function(doubles, i, l);\n\n            // make a ful pair function using the pure 6D part uik and complete with the rest\n            std::vector<CCPairFunction<double,6>> uil1 = get_pair_function(doubles, i, l);\n            CCPair pair_il=builder.complete_pair_with_low_rank_parts(builder.make_pair(i,l,uil1));\n            std::vector<CCPairFunction<double,6>> uil = pair_il.functions;\n\n            for (size_t mm = 0; mm < uil.size(); mm++) {\n                part1 += uil[mm].project_out(l_kgtauk[l - info.parameters.freeze()], 2);\n                part2 += uil[mm].project_out(l_kgtauk[l - info.parameters.freeze()], 1);\n            }\n            for (const auto& ktmp : singles.functions) {\n                const size_t k = ktmp.first;\n                const real_function_3d k_lgtauk = (info.mo_bra[k] * (g12)(info.mo_bra[l], singles(k))).truncate();\n                for (size_t mm = 0; mm < uil.size(); mm++) {\n                    part3 += uil[mm].project_out(k_lgtauk, 2);\n                    part4 += uil[mm].project_out(k_lgtauk, 1);\n                }\n            }\n        }\n        resulti = 4.0 * part1 - 2.0 * part2 - 2.0 * part3 + part4;\n        result.push_back(resulti);\n    }\n    return result;\n}\n\n/// Plotting (convenience)\nvoid CCPotentials::plot(const vector_real_function_3d& f, const std::string& msg) const {\n    CCTimer plot_time(world, \"plotting \" + std::to_string(f.size()) + \" functions: \" + msg);\n    for (size_t k = 0; k < f.size(); k++) plot(f[k], msg + \"_\" + std::to_string(k));\n    plot_time.info();\n}\n\n/// Plotting (convenience)\nvoid CCPotentials::plot(const real_function_3d& f, const std::string& msg, const bool doprint) const {\n    CCTimer plot_time(world, \"plotting \" + msg);\n    plot_plane(world, f, msg);\n    plot_time.info(doprint);\n}\n\n/// makes the t intermediates\n/// t_i = mo_ket_(i) + factor*tau(i)\n/// if factor!=1 then we can not use intermediates and set the type to UNDEFINED\nCC_vecfunction CCPotentials::make_t_intermediate(const CC_vecfunction& tau, const CCParameters& parameters) const {\n\n    FuncType returntype = MIXED;\n\n    if (tau.type == HOLE) {\n        // output(\"make_t_intermediate: returning hole states\");\n        return CC_vecfunction(get_active_mo_ket(), HOLE, parameters.freeze());\n    }\n    if (tau.size() == 0) {\n        output(\"make_t_intermediate: empty tau-> returning hole states\");\n        return CC_vecfunction(get_active_mo_ket(), HOLE, parameters.freeze());\n    }\n\n    CC_vecfunction result(returntype);\n    for (const auto& itmp:tau.functions) {\n        const size_t i = itmp.first;\n        CCFunction<double,3> t(mo_ket_(i).function + tau(i).function, i, MIXED);\n        result.insert(i, t);\n\n    }\n    return result;\n}\n\n/// makes the t intermediates\n/// t_i = mo_ket_(i) + factor*tau(i)\n/// if the core is frozen the core ti will just be mo_ket_\nCC_vecfunction CCPotentials::make_full_t_intermediate(const CC_vecfunction& tau) const {\n    FuncType returntype = MIXED;\n\n    if (tau.type == HOLE) {\n        output(\"make_t_intermediate: returning hole states\");\n        return mo_ket_;\n    }\n    if (tau.size() == 0) {\n        output(\"make_t_intermediate: empty tau-> returning hole states\");\n        return mo_ket_;\n    }\n\n    CC_vecfunction result(returntype);\n    for (size_t i = 0; i < mo_ket_.size(); i++) {\n        if (int(i) < parameters.freeze()) {\n            result.insert(i, mo_ket_(i));\n        } else {\n            CCFunction<double,3> t(mo_ket_(i).function + tau(i).function, i, MIXED);\n            result.insert(i, t);\n        }\n    }\n    return result;\n}\n\n/// makes the t intermediates\n\n/// t_i = mo_ket_(i) + tau(i)\n/// if the core is frozen the core ti will just be mo_ket_\nCC_vecfunction CCPotentials::make_full_t_intermediate(const CC_vecfunction& tau, const Info& info) {\n\n    if (tau.type == HOLE or tau.size()==0) return CC_vecfunction(info.mo_ket,HOLE);\n\n    CC_vecfunction result(MIXED);\n    for (size_t i = 0; i < info.mo_ket.size(); i++) {\n        if (int(i) < info.parameters.freeze()) {\n            result.insert(i, CCFunction<double,3>(info.mo_ket[i],i,MIXED));\n        } else {\n            CCFunction<double,3> t(info.mo_ket[i] + tau(i).function, i, MIXED);\n            result.insert(i, t);\n        }\n    }\n    return result;\n}\n\n/// makes the t intermediates\n\n/// t_i = mo_ket_(i) + tau(i)\n/// skip frozen core orbitals\nCC_vecfunction CCPotentials::make_active_t_intermediate(const CC_vecfunction& tau, const Info& info) {\n\n    if (tau.type == HOLE or tau.size()==0) return CC_vecfunction(info.mo_ket,HOLE);\n\n    CC_vecfunction result(MIXED);\n    // for (size_t i = info.parameters.freeze(); i < info.mo_ket.size(); i++) {\n    for (const auto& tmp : tau.functions) {\n        const int i=tmp.first;\n        CCFunction<double,3> t(info.mo_ket[i] + tmp.second.function, i, MIXED);\n        result.insert(i, t);\n    }\n    return result;\n}\n\n\n/// makes the t intermediates\n/// t_i = mo_ket_(i) + tau\n/// i = tau.i\nCCFunction<double,3> CCPotentials::make_t_intermediate(const CCFunction<double,3>& tau) const {\n    MADNESS_ASSERT(tau.type == PARTICLE);\n    const CCFunction<double,3> t(mo_ket_(tau.i).function + tau.function, tau.i, MIXED);\n    return t;\n}\n\n\n/// forms the regularized functions from Q and Qt Ansatz for CIS(D) where tau=0 and t=mo so that Qt=Q\nvoid CCPotentials::test_pair_consistency(const CCPairFunction<double,6>& u, const size_t i, const size_t j,\n                                         const CC_vecfunction& x) const {\n    if (parameters.QtAnsatz()) {\n        // u(QAnsatz) = u(QtAnsatz) - OxQftt - QOxftt\n        std::vector<CCPairFunction<double,6>> v1;\n        v1.push_back(u);\n        std::vector<CCPairFunction<double,6>> v2;\n        v2.push_back(u);\n        CCPairFunction<double,6> ftt(f12, mo_ket_(i), mo_ket_(j));\n        CCPairFunction<double,6> O1xftt = apply_Ot(ftt, x, 1);\n        CCPairFunction<double,6> OxQftt = apply_Qt(O1xftt, mo_ket_, 2);\n        CCPairFunction<double,6> OxQ = OxQftt.invert_sign();\n        v2.push_back(OxQ);\n        CCPairFunction<double,6> O2xftt = apply_Ot(ftt, x, 2);\n        CCPairFunction<double,6> QOxftt = apply_Qt(O2xftt, mo_ket_, 1);\n        CCPairFunction<double,6> QOx = QOxftt.invert_sign();\n        v2.push_back(QOx);\n\n        CCPair p1(i, j, EXCITED_STATE, CT_CISPD, v1);\n        CCPair p2(i, j, EXCITED_STATE, CT_CISPD, v2);\n        double norm2_u1 = overlap(p1);\n        double norm2_u2 = overlap(p2);\n\n        if (world.rank() == 0)\n            std::cout << std::fixed << std::setprecision(10) << \"||u(QtAnsatz)||**2=\" << norm2_u1\n                      << \"\\n||u(QAnsatz)||**2=\" << norm2_u2 << \"\\n\";\n\n    } else {\n        // u(QtAnsatz) = u(QAnsatz) + OxQftt - QOxftt\n        std::vector<CCPairFunction<double,6>> v1;\n        v1.push_back(u);\n        std::vector<CCPairFunction<double,6>> v2;\n        v2.push_back(u);\n        CCPairFunction<double,6> ftt(f12, mo_ket_(i), mo_ket_(j));\n        CCPairFunction<double,6> O1xftt = apply_Ot(ftt, x, 1);\n        CCPairFunction<double,6> OxQftt = apply_Qt(O1xftt, mo_ket_, 2);\n        v2.push_back(OxQftt);\n        CCPairFunction<double,6> O2xftt = apply_Ot(ftt, x, 2);\n        CCPairFunction<double,6> QOxftt = apply_Qt(O2xftt, mo_ket_, 1);\n        v2.push_back(QOxftt);\n\n        CCPair p1(i, j, EXCITED_STATE, CT_CISPD, v1);\n        CCPair p2(i, j, EXCITED_STATE, CT_CISPD, v2);\n        double norm2_u1 = overlap(p1);\n        double norm2_u2 = overlap(p2);\n\n        if (world.rank() == 0)\n            std::cout << std::fixed << std::setprecision(10) << \"||u(QAnsatz)||**2=\" << norm2_u1\n                      << \"\\n||u(QtAnsatz)||**2=\" << norm2_u2 << \"\\n\";\n    }\n\n}\n\nbool CCPotentials::test_compare_pairs(const CCPair& pair1, const CCPair& pair2) const {\n    bool result = true;\n    // test overlap\n    double ovlp_1 = overlap(pair1);\n    double ovlp_2 = overlap(pair2);\n    double diff = ovlp_1 - ovlp_2;\n    if (world.rank() == 0)\n        std::cout << std::fixed << std::setprecision(10)\n                  << \"||\" << pair1.name() << \"||**2 =\" << ovlp_1 << \"\\n\"\n                  << \"||\" << pair2.name() << \"||**2 =\" << ovlp_2 << \"\\n\";\n    if (fabs(diff) > parameters.thresh_6D()) {\n        output.warning(\"Test Failed, diff=\" + std::to_string(diff));\n        result = false;\n    } else output(\"Test Passed, diff=\" + std::to_string(diff));\n\n    // test energy integration <ij|Qf|ij>\n    double energy_1 = make_xy_op_u(mo_bra_(pair1.i), mo_bra_(pair1.j), *g12, pair1.functions);\n    double energy_2 = make_xy_op_u(mo_bra_(pair2.i), mo_bra_(pair2.j), *g12, pair2.functions);\n    double diff_energy = energy_1 - energy_2;\n    if (world.rank() == 0)\n        std::cout << std::fixed << std::setprecision(10)\n                  << \"<ij|g|\" << pair1.name() << \"> =\" << energy_1 << \"\\n\"\n                  << \"<ij|g|\" << pair2.name() << \"> =\" << energy_2 << \"\\n\";\n    if (fabs(diff_energy) > parameters.thresh_6D()) {\n        output.warning(\"Test Failed, diff=\" + std::to_string(diff_energy));\n        result = false;\n    } else output(\"Test Passed, diff=\" + std::to_string(diff_energy));\n\n\n    // make full 6D pair and compare\n    real_function_6d pair1_6D = make_6D_pair(pair1);\n    real_function_6d pair2_6D = make_6D_pair(pair2);\n    real_function_6d pair_diff = pair1_6D - pair2_6D;\n    pair1_6D.print_size(pair1.name() + \"_6D\");\n    pair2_6D.print_size(pair2.name() + \"_6D\");\n    pair_diff.print_size(\"diff\");\n    if (pair_diff.norm2() > parameters.thresh_6D()) {\n        result = false;\n        output.warning(\"Test Failed, difference of pairs is not zero\");\n    } else output(\"Test Passed\");\n\n    return result;\n}\n\n// make a single 6D functions of the pair\nreal_function_6d CCPotentials::make_6D_pair(const CCPair& pair) const {\n    std::vector<CCPairFunction<double,6>> functions = pair.functions;\n    real_function_6d result = real_factory_6d(world);\n    for (const auto& f:functions) {\n        if (f.is_pure()) result += f.pure().get_function();\n        else if (f.is_decomposed_no_op()) {\n            for (size_t i = 0; i < f.get_a().size(); i++) {\n                real_function_6d ab = CompositeFactory<double, 6, 3>(world).particle1(copy(f.get_a()[i])).particle2(\n                        copy(f.get_b()[i]));\n                ab.fill_tree().truncate().reduce_rank();\n                result += ab;\n            }\n        } else if (f.is_op_decomposed()) {\n            MADNESS_ASSERT(f.get_operator().type() == OpType::OT_F12);\n            real_function_6d fxy = make_f_xy(f.get_a()[0], f.get_b()[0]);\n            result += fxy;\n        } else MADNESS_EXCEPTION(\"Unknown type of CCPairFunction<double,6>\", 1);\n    }\n    return result;\n}\n\nvoid CCPotentials::test_pairs() {\n\n    {\n        output.section(\"Testing GS Reg Tails\");\n        CCTimer time(world, \"Testing GS Reg Tails\");\n        bool regrestest = true;\n        std::vector<size_t> testorbs;\n        // make test with homo and core orbitals\n        real_function_6d u = real_factory_6d(world);\n        if (mo_ket_.size() - parameters.freeze() == 1) testorbs.push_back(mo_ket_.size() - 1);\n        else {\n            testorbs.push_back(parameters.freeze());\n            testorbs.push_back(mo_ket_.size() - 1);\n        }\n        const CC_vecfunction t(get_active_mo_ket(), HOLE, parameters.freeze());\n        for (const auto i:testorbs) {\n            for (const auto j:testorbs) {\n                CCPair rr_3D = (make_pair_gs(u, mo_ket_, i, j));\n                real_function_6d rr_tmp = make_f_xy(t(i), t(j));\n                real_function_6d rr_6D0 = apply_Q12t(rr_tmp, mo_ket_);\n                CCPairFunction<double,6> rr_6D1(rr_6D0);\n                std::vector<CCPairFunction<double,6>> rr_6D2(1, rr_6D1);\n                CCPair rr_6D(i, j, GROUND_STATE, CT_CC2, rr_6D2);\n                regrestest = test_compare_pairs(rr_3D, rr_6D);\n            }\n        }\n        if (regrestest) output(\"All Tests Passed\");\n        else output.warning(\"NOT all Tests Passed\");\n        time.info();\n    }\n\n    {\n        output.section(\"Testing ES Reg Tails\");\n        CCTimer time(world, \"Testing GS Reg Tails\");\n        real_function_3d xf = real_factory_3d(world).f(functor_r2);\n        vector_real_function_3d xmo = mul(world, xf, get_active_mo_ket());\n        xmo = apply_Qt(xmo, mo_ket_);\n        const double norm = norm2(world, xmo);\n        scale(world, xmo, 1 / norm);\n        CC_vecfunction x(xmo, RESPONSE, parameters.freeze());\n        const double omega = -0.9 * get_orbital_energies()[mo_ket_.size() - 1];\n        x.omega = omega;\n        bool regrestest = true;\n        std::vector<size_t> testorbs;\n        // make test with homo and core orbitals\n        real_function_6d u = real_factory_6d(world);\n        if (mo_ket_.size() - parameters.freeze() == 1) testorbs.push_back(mo_ket_.size() - 1);\n        else {\n            testorbs.push_back(parameters.freeze());\n            testorbs.push_back(mo_ket_.size() - 1);\n        }\n        const CC_vecfunction t(get_active_mo_ket(), HOLE, parameters.freeze());\n        for (const auto i:testorbs) {\n            for (const auto j:testorbs) {\n                CCPair rr_3D = (make_pair_ex(u, mo_ket_, x, i, j, CT_CISPD));\n                real_function_6d rr_6D0;\n                {\n                    real_function_6d rr_ftx = make_f_xy(x(i), t(j));\n                    real_function_6d rr_fxt = make_f_xy(t(i), x(j));\n                    real_function_6d rr_f = rr_ftx + rr_fxt;\n                    rr_6D0 = apply_Q12t(rr_f, mo_ket_);\n                    if (parameters.QtAnsatz()) {\n                        MADNESS_EXCEPTION(\"No Test for QtAnsatz right now\", 1);\n                    }\n                }\n                CCPairFunction<double,6> rr_6D1(rr_6D0);\n                std::vector<CCPairFunction<double,6>> rr_6D2(1, rr_6D1);\n                CCPair rr_6D(i, j, GROUND_STATE, CT_MP2, rr_6D2);\n                regrestest = test_compare_pairs(rr_3D, rr_6D);\n            }\n        }\n        if (regrestest) output(\"All Tests Passed\");\n        else output.warning(\"NOT all Tests Passed\");\n        time.info();\n    }\n\n}\n\nvoid CCPotentials::test_singles_potential(Info& info) const {\n\n    output(\"Test LRCC2 Singles Potential with empty doubles and compare to CIS\");\n    {\n        vector_real_function_3d emptyv = zero_functions<double, 3>(world, get_active_mo_ket().size());\n        real_function_3d r = real_factory_3d(world).f(functor_y);\n        const CC_vecfunction gs_singles(emptyv, PARTICLE, parameters.freeze());\n        CC_vecfunction ex_singles(apply_Qt(mul(world, r, get_active_mo_ket()), mo_ket_), RESPONSE, parameters.freeze());\n        std::vector<CCPair> gs_doubles;\n        std::vector<CCPair> ex_doubles;\n\n        // set up taskq\n        auto taskq=std::shared_ptr<MacroTaskQ>(new MacroTaskQ(MacroTaskQFactory(world)));\n        MacroTaskSinglesPotentialEx taskex;\n        MacroTask<MacroTaskSinglesPotentialEx> mtaskex(world,taskex,taskq);\n\n        std::vector<int> result_index(ex_singles.size());\n        auto [cis_potential, dummy1] = mtaskex(result_index, gs_singles, gs_doubles, ex_singles, ex_doubles, int(POT_cis_), info);\n        auto [ccs_potential, dummy2] = mtaskex(result_index, gs_singles, gs_doubles, ex_singles, ex_doubles, int(POT_ccs_), info);\n        taskq->print_taskq();\n        taskq->run_all();\n        vector_real_function_3d diff = sub(world, cis_potential, ccs_potential);\n        const double d = norm2(world, diff);\n        madness::print_size<double, 3>(world, diff, \"difference in potentials\");\n        if (world.rank() == 0) std::cout << \"||difference|| = \" << d << \"\\n\";\n\n    }\n\n    // Make functions\n    real_function_3d x = real_factory_3d(world).f(functor_x);\n    real_function_3d r = real_factory_3d(world).f(functor_y);\n    const CC_vecfunction gs_singles(apply_Qt(mul(world, x, get_active_mo_ket()), mo_ket_), PARTICLE, parameters.freeze());\n    CC_vecfunction ex_singles(apply_Qt(mul(world, r, get_active_mo_ket()), mo_ket_), RESPONSE, parameters.freeze());\n    ex_singles.omega = -0.9 * get_orbital_energies().back();\n    Pairs<CCPair> gs_doubles;\n    Pairs<CCPair> ex_doubles;\n    for (size_t i = parameters.freeze(); i < mo_ket_.size(); i++) {\n        for (size_t j = i; j < mo_ket_.size(); j++) {\n            real_function_6d tmp = real_factory_6d(world);// make_f_xy(gs_singles(i),gs_singles(j));\n            real_function_6d tmpx = real_factory_6d(world);//make_f_xy(ex_singles(i),ex_singles(j));\n            CCPair ptmp = make_pair_gs(tmp, gs_singles, i, j);\n            CCPair xtmp = make_pair_ex(tmpx, gs_singles, ex_singles, i, j, CT_LRCC2);\n            gs_doubles.insert(i, j, ptmp);\n            ex_doubles.insert(i, j, xtmp);\n        }\n    }\n\n    std::vector<PotentialType> pots = {POT_ccs_, POT_F3D_, POT_s2b_, POT_s2c_, POT_s4b_, POT_s4c_};\n\n    output.section(\"Testing of CC2 Singles Ground State Potential\");\n    CCTimer time_gs(world, \"CC2 Singles GS Test\");\n\n    vector_real_function_3d tmp = mul(world, nemo_->ncf->square(), ex_singles.get_vecfunction());\n    truncate(world, tmp);\n    const CC_vecfunction xbra(tmp, RESPONSE, parameters.freeze());\n    std::vector<int> result_index(ex_singles.size());\n\n    for (const auto pot:pots) {\n        const auto [potential, intermediate] = potential_singles_gs(world, result_index, gs_singles, gs_doubles, pot, info);\n        const double xpot1 = inner(world, xbra.get_vecfunction(), potential).sum();\n        const double xpot2 = potential_energy_gs(world, xbra, gs_singles, gs_doubles, pot);\n        const double diff = xpot1 - xpot2;\n        if (world.rank() == 0)\n            std::cout << std::fixed << std::setprecision(10) <<\n                      \"Testing of Potential \" << assign_name(pot) << \":\" <<\n                      std::setw(10) << \"\\n<x|\" + assign_name(pot) + \"> = \" << xpot1 <<\n                      std::setw(10) << \"\\n<x|\" + assign_name(pot) + \"> = \" << xpot2 <<\n                      std::setw(10) << \"\\ndiff = \" << diff << \"\\n\";\n        if (fabs(diff) > parameters.thresh_6D()) output.warning(\"Test Failed\");\n        else output(\"Test Passed\");\n        if (pot == POT_s2b_) {\n            const vector_real_function_3d pot_s4a = -1.0 * apply_projector(potential, gs_singles);\n            const double xxpot1 = inner(world, xbra.get_vecfunction(), pot_s4a).sum();\n            const double xxpot2 = potential_energy_gs(world, xbra, gs_singles, gs_doubles, POT_s4a_);\n            const double xdiff = xxpot1 - xxpot2;\n            if (world.rank() == 0)\n                std::cout <<\n                          std::setw(10) << \"\\n<x|\" + assign_name(POT_s4a_) + \"> = \" << xxpot1 <<\n                          std::setw(10) << \"\\n<x|\" + assign_name(POT_s4a_) + \"> = \" << xxpot2 <<\n                          std::setw(10) << \"\\ndiff = \" << xdiff << \"\\n\";\n            if (fabs(xdiff) > parameters.thresh_6D()) output.warning(\"Test Failed\");\n            else output(\"Test Passed\");\n        }\n    }\n\n    time_gs.info();\n\n    output.section(\"Testing of CC2 Singles Response Potential\");\n    CCTimer time_ex(world, \"CC2 Singles Response Test\");\n    std::vector<int> result_index_ex(ex_singles.size());\n\n    for (const auto pot:pots) {\n        const auto [potential, dummy1] = potential_singles_ex(world, result_index_ex, gs_singles, gs_doubles, ex_singles,\n                                                                       ex_doubles, pot, info);\n        const double xpot1 = inner(world, xbra.get_vecfunction(), potential).sum();\n        const double xpot2 = potential_energy_ex(world, xbra, gs_singles, gs_doubles, ex_singles, ex_doubles, pot);\n        const double diff = xpot1 - xpot2;\n        if (world.rank() == 0)\n            std::cout << std::fixed << std::setprecision(10) <<\n                      \"Testing of Response Potential \" << assign_name(pot) << \":\" <<\n                      std::setw(10) << \"\\n<x|\" + assign_name(pot) + \"> = \" << xpot1 <<\n                      std::setw(10) << \"\\n<x|\" + assign_name(pot) + \"> = \" << xpot2 <<\n                      std::setw(10) << \"\\ndiff = \" << diff << \"\\n\";\n        if (fabs(diff) > parameters.thresh_6D()) output.warning(\"Test Failed\");\n        else output(\"Test Passed\");\n        if (pot == POT_s2b_) {\n            const auto [potential_gs, dummy2] = potential_singles_gs(world, result_index, gs_singles, gs_doubles, pot, info);\n            const vector_real_function_3d pot_s4a = -1.0 * add(world, apply_projector(potential, gs_singles),\n                                                               apply_projector(potential_gs, ex_singles));\n            const double xxpot1 = inner(world, xbra.get_vecfunction(), pot_s4a).sum();\n            const double xxpot2 = potential_energy_ex(world, xbra, gs_singles, gs_doubles, ex_singles, ex_doubles, POT_s4a_);\n            const double xdiff = xxpot1 - xxpot2;\n            if (world.rank() == 0)\n                std::cout <<\n                          std::setw(10) << \"\\n<x|\" + assign_name(POT_s4a_) + \"> = \" << xxpot1 <<\n                          std::setw(10) << \"\\n<x|\" + assign_name(POT_s4a_) + \"> = \" << xxpot2 <<\n                          std::setw(10) << \"\\ndiff = \" << xdiff << \"\\n\";\n            if (fabs(xdiff) > parameters.thresh_6D()) output.warning(\"Test Failed\");\n            else output(\"Test Passed\");\n        }\n    }\n\n    time_ex.info();\n}\n\nvoid CCPotentials::test() {\n    output.section(\"Testing enums\");\n    CalcType test2 = CT_MP2;\n    FuncType test4 = HOLE;\n    CCState test5 = GROUND_STATE;\n    PotentialType test6 = POT_F3D_;\n    assign_name(test2);\n    assign_name(test4);\n    assign_name(test5);\n    assign_name(test6);\n\n    test_singles_potential(info);\n    output.section(\"Testing Scalar Multiplication\");\n    {\n        CC_vecfunction test = mo_ket_ * 2.0;\n        double norma = norm2(world, mo_ket_.get_vecfunction());\n        double normb = norm2(world, test.get_vecfunction());\n        if (2.0 * norma == normb) output(\"Test Passed\");\n        else output.warning(\"Test Failed: Norm1 = \" + std::to_string(norma) + \", Norm2 = \" + std::to_string(normb));\n    }\n    {\n        CCFunction<double,3> mo = mo_ket_(0);\n        CCFunction<double,3> mo1 = mo * 2.0;\n        double norma = mo.function.norm2();\n        double normb = mo1.function.norm2();\n        if (2.0 * norma == normb) output(\"Test Passed\");\n        else output.warning(\"Test Failed: Norm1 = \" + std::to_string(norma) + \", Norm2 = \" + std::to_string(normb));\n    }\n\n    test_pairs();\n    output.section(\"Testing destructiveness of project out function\");\n    {\n        real_function_3d bra = mo_bra_(mo_bra_.size() - 1).function;\n        real_function_6d ftt = make_f_xy(mo_ket_(mo_ket_.size() - 1), mo_ket_(mo_ket_.size() - 1));\n        ftt.print_size(\"f|homo,homo>\");\n        bra.print_size(\"<homo|\");\n        real_function_3d test1 = ftt.project_out(bra, 0);\n        test1.print_size(\"<homo|f12|homo,homo>_1\");\n        ftt.print_size(\"f|homo,homo>\");\n        bra.print_size(\"<homo|\");\n        real_function_3d test2 = ftt.project_out(bra, 1);\n        test2.print_size(\"<homo|f12|homo,homo>_2\");\n        ftt.print_size(\"f|homo,homo>\");\n        bra.print_size(\"<homo|\");\n    }\n\n\n    output.section(\"Testing Overlaps of CCPairFunction<double,6>\");\n    // f^2 = 1/(4y^2)(1 - 2*f2(y) + f2(2y)) , f2(2y) =f2(y)^2\n    const double y = parameters.gamma();\n    SeparatedConvolution<double, 3> f = SlaterF12Operator(world, y, parameters.lo(), parameters.thresh_bsh_3D());\n    SeparatedConvolution<double, 3> f2 = SlaterOperator(world, y, parameters.lo(), parameters.thresh_bsh_3D());\n    SeparatedConvolution<double, 3> ff = SlaterOperator(world, 2.0 * y, parameters.lo(), parameters.thresh_bsh_3D());\n\n    real_function_3d a = mo_ket_(0).function;\n    real_function_3d b = mo_ket_(0).function;\n    real_function_6d fab_6d = CompositeFactory<double, 6, 3>(world).g12(corrfac.f()).particle1(copy(a)).particle2(\n            copy(b));\n    fab_6d.fill_tree().truncate().reduce_rank();\n    {\n        real_function_3d aR = mo_bra_(0).function;\n        real_function_3d bR = mo_bra_(0).function;\n        real_function_6d ab_6d = CompositeFactory<double, 6, 3>(world).particle1(copy(a)).particle2(copy(b));\n        ab_6d.fill_tree().truncate().reduce_rank();\n\n        const real_function_3d aa = (aR * a).truncate();\n        const real_function_3d bb = (bR * b).truncate();\n        const real_function_3d af2a = f2(aa);\n        const real_function_3d affa = ff(aa);\n        const real_function_3d afa = f(aa);\n\n        bool passed_lo = true;\n        bool passed_hi = true;\n        const double lo = parameters.thresh_6D();\n        const double hi = parameters.thresh_3D();\n        {\n            CCPairFunction<double,6> fab(f12, a, b);\n            const double test1 = overlap(fab, fab);\n            const double prefactor = 1.0 / (4 * y * y);\n            const double test2 = prefactor * (aR.inner(a) * bR.inner(b) - 2.0 * bb.inner(af2a) + bb.inner(affa));\n            const double diff = test1 - test2;\n            if (fabs(diff) > lo) passed_lo = false;\n            if (fabs(diff) > hi) passed_hi = false;\n\n\n            if (world.rank() == 0)\n                std::cout << \"Overlap Test 1 : \" << std::fixed << std::setprecision(10) << \"result=\" << test1\n                          << \", test=\" << test2 << \", diff=\" << diff << \"\\n\";\n        }\n        {\n            CCPairFunction<double,6> ab(mo_ket_.get_vecfunction(), mo_ket_.get_vecfunction());\n            const double test1 = overlap(ab, ab);\n            const double test2 = double(mo_ket_.size()); // mos are normed\n            const double diff = test1 - test2;\n            if (world.rank() == 0)\n                std::cout << \"Overlap Test 2 : \" << std::fixed << std::setprecision(10) << \"result=\" << test1\n                          << \", test=\" << test2 << \", diff=\" << diff << \"\\n\";\n            if (fabs(diff) > lo) passed_lo = false;\n            if (fabs(diff) > hi) passed_hi = false;\n        }\n        {\n            CCPairFunction<double,6> ab(ab_6d);\n            const double test1 = overlap(ab, ab);\n            const double test2 = double(mo_ket_.size()); // mos are normed\n            const double diff = test1 - test2;\n            if (world.rank() == 0)\n                std::cout << \"Overlap Test 3 : \" << std::fixed << std::setprecision(10) << \"result=\" << test1\n                          << \", test=\" << test2 << \", diff=\" << diff << \"\\n\";\n            if (fabs(diff) > lo) passed_lo = false;\n            if (fabs(diff) > hi) passed_hi = false;\n        }\n        {\n            CCPairFunction<double,6> ab1(mo_ket_.get_vecfunction(), mo_ket_.get_vecfunction());\n            CCPairFunction<double,6> ab2(ab_6d);\n            const double test1 = overlap(ab1, ab2);\n            const double test2 = double(mo_ket_.size()); // mos are normed\n            const double diff = test1 - test2;\n            if (world.rank() == 0)\n                std::cout << \"Overlap Test 4 : \" << std::fixed << std::setprecision(10) << \"result=\" << test1\n                          << \", test=\" << test2 << \", diff=\" << diff << \"\\n\";\n            if (fabs(diff) > lo) passed_lo = false;\n            if (fabs(diff) > hi) passed_hi = false;\n        }\n        {\n            // the next tests evaulate <ab|f|ab> in different ways\n            CCPairFunction<double,6> fab(fab_6d);\n            CCPairFunction<double,6> ab2(mo_ket_.get_vecfunction(), mo_ket_.get_vecfunction());\n            const double test1 = overlap(fab, ab2);\n            const double test2 = bb.inner(afa);\n            const double diff = test1 - test2;\n            if (world.rank() == 0)\n                std::cout << \"Overlap Test 5 : \" << std::fixed << std::setprecision(10) << \"result=\" << test1\n                          << \", test=\" << test2 << \", diff=\" << diff << \"\\n\";\n            if (fabs(diff) > lo) passed_lo = false;\n            if (fabs(diff) > hi) passed_hi = false;\n        }\n        {\n            CCPairFunction<double,6> fab(fab_6d);\n            CCPairFunction<double,6> ab2(ab_6d);\n            const double test1 = overlap(fab, ab2);\n            const double test2 = bb.inner(afa);\n            const double diff = test1 - test2;\n            if (world.rank() == 0)\n                std::cout << \"Overlap Test 6 : \" << std::fixed << std::setprecision(10) << \"result=\" << test1\n                          << \", test=\" << test2 << \", diff=\" << diff << \"\\n\";\n            if (fabs(diff) > lo) passed_lo = false;\n            if (fabs(diff) > hi) passed_hi = false;\n        }\n        {\n            CCPairFunction<double,6> fab(f12, a, b);\n            CCPairFunction<double,6> ab2(ab_6d);\n            const double test1 = overlap(fab, ab2);\n            const double test2 = bb.inner(afa);\n            const double diff = test1 - test2;\n            if (world.rank() == 0)\n                std::cout << \"Overlap Test 7 : \" << std::fixed << std::setprecision(10) << \"result=\" << test1\n                          << \", test=\" << test2 << \", diff=\" << diff << \"\\n\";\n            if (fabs(diff) > lo) passed_lo = false;\n            if (fabs(diff) > hi) passed_hi = false;\n        }\n        {\n            CCPairFunction<double,6> fab(f12, a, b);\n            CCPairFunction<double,6> ab2(mo_ket_.get_vecfunction(), mo_ket_.get_vecfunction());\n            const double test1 = overlap(fab, ab2);\n            const double test2 = bb.inner(afa);\n            const double diff = test1 - test2;\n            if (world.rank() == 0)\n                std::cout << \"Overlap Test 8 : \" << std::fixed << std::setprecision(10) << \"result=\" << test1\n                          << \", test=\" << test2 << \", diff=\" << diff << \"\\n\";\n            if (fabs(diff) > lo) passed_lo = false;\n            if (fabs(diff) > hi) passed_hi = false;\n        }\n        output.section(\"Overlap Testing Ended\");\n        if (not passed_lo) output.warning(\"There were Complications!\");\n        if (not passed_hi) output.warning(\"A bit shaky  ... Expected at the pure 6D level\");\n\n\n    }\n}\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/CCPotentials.h",
    "content": "/*\n * CCPotentials.h\n *\n *  Created on: 4 Jan 2017\n *      Author: kottmanj\n */\n\n#ifndef SRC_APPS_CHEM_CCPOTENTIALS_H_\n#define SRC_APPS_CHEM_CCPOTENTIALS_H_\n\n#include<madness/chem/ccpairfunction.h>\n#include<madness/chem/CCStructures.h>\n#include<madness/chem/nemo.h>\n#include<madness/chem/projector.h>\n#include<madness/chem/SCFOperators.h>\n#include<madness/chem/electronic_correlation_factor.h>\n\nnamespace madness {\n/// Class which calculates all types of CC2 Potentials\nclass CCPotentials {\npublic:\n    CCPotentials(World& world_, const std::shared_ptr<const Nemo> nemo, const CCParameters& param);\n\n    void reset_nemo(const std::shared_ptr<const Nemo> nemo) {\n        nemo_ = nemo;\n        mo_ket_ = (make_mo_ket(*nemo));\n        mo_bra_ = (make_mo_bra(*nemo));\n        orbital_energies_ = init_orbital_energies(*nemo);\n    };\n\n    Info update_info(const CCParameters& parameters, const std::shared_ptr<const Nemo> nemo) const {\n        Info info;\n        info.mo_bra = mo_bra().get_vecfunction();\n        info.mo_ket = mo_ket().get_vecfunction();\n        info.molecular_coordinates = nemo->get_calc()->molecule.get_all_coords_vec();\n        info.parameters = parameters;\n        info.R_square = nemo->R_square;\n        info.R = nemo->R;\n        info.U1 = nemo->ncf->U1vec();\n        info.U2 = nemo->ncf->U2();\n        info.intermediate_potentials = get_potentials;\n        info.orbital_energies = orbital_energies_;\n        info.fock=nemo->compute_fock_matrix(nemo->get_calc()->amo, nemo->get_calc()->aocc);\n        return info;\n    }\n\n    virtual\n    ~CCPotentials() {};\n\n    /// forms the regularized functions from Q and Qt Ansatz for CIS(D) where tau=0 and t=mo so that Qt=Q\n    void test_pair_consistency(const CCPairFunction<double, 6>& u, const size_t i, const size_t j,\n                               const CC_vecfunction& x) const;\n\n    bool test_compare_pairs(const CCPair& pair1, const CCPair& pair2) const;\n\n    void test_pairs();\n\n    void test_singles_potential(Info& info) const;\n\n    void test();\n\n    /// Returns the full 6D function from a CCPair structure (only recommended for debug purposes)\n    real_function_6d make_6D_pair(const CCPair& pair) const;\n\n    /// Function to load a function from disc\n    /// @param[in] f the function which will be loaded\n    /// @param[in] name of the file in which the function was stored\n    /// @param do_print\n    /// @return true or false depending on if the data was found on disc\n    template <typename T, size_t NDIM>\n    bool load_function(Function<T, NDIM>& f, const std::string name, bool do_print) const {\n        bool exists = archive::ParallelInputArchive<\n            archive::BinaryFstreamInputArchive>::exists(world, name.c_str());\n        if (exists) {\n            if ((world.rank() == 0) and do_print) print(\"loading function\", name);\n            archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, name.c_str());\n            ar & f;\n            if (do_print) f.print_size(name);\n            if (f.is_compressed()) {\n                if (world.rank()==0 and do_print) print(\"function is compressed -- reconstructing\");\n                f.change_tree_state(reconstructed);\n                if (do_print) f.print_size(name+\" reconstructed\");\n                save(f, name);\n            }\n            f.set_thresh(FunctionDefaults<NDIM>::get_thresh());\n            f.truncate();\n            f.print_size(name);\n            return true;\n        } else {\n            if ((world.rank()==0) and do_print) print(\"could not find function\",name);\n        }\n        return false;\n    }\n\n    /// Plotting (convenience)\n    void plot(const vector_real_function_3d& f, const std::string& msg) const;\n\n    /// Plotting (convenience)\n    void plot(const real_function_3d& f, const std::string& msg, const bool doprint = true) const;\n\n    /// print size of a function\n    template <size_t NDIM>\n    void print_size(const Function<double, NDIM>& f, const std::string& msg, const bool print = true) const {\n        if (print) f.print_size(msg);\n    }\n\n    /// returns a vector of all orbital energies\n    std::vector<double> get_orbital_energies() const { return orbital_energies_; }\n\n    /// returns epsilon_i + epsilon_j (needed for bsh operator of pairs)\n    double get_epsilon(const size_t i, const size_t j) const {\n        return orbital_energies_[i] + orbital_energies_[j];\n    }\n\n    /// returns epsilon_i + epsilon_j (needed for bsh operator of pairs)\n    static double get_epsilon(const size_t i, const size_t j, const Info& info) {\n        return info.orbital_energies[i] + info.orbital_energies[j];\n    }\n\n    /// returns a vector of all active mos without nuclear correlation factor (nemos)\n    vector_real_function_3d get_active_mo_ket() const {\n        vector_real_function_3d result;\n        for (size_t i = parameters.freeze(); i < mo_ket_.size(); i++) result.push_back(mo_ket_(i).function);\n        return result;\n    }\n\n    /// returns a vector of all active mos multiplied with the squared nuclear currelation factor: mo_bra = R^2*mo_ket\n    vector_real_function_3d get_active_mo_bra() const {\n        vector_real_function_3d result;\n        for (size_t i = parameters.freeze(); i < mo_bra_.size(); i++) result.push_back(mo_bra_(i).function);\n        return result;\n    }\n\n    /// get the corresponding mo bra vectors to a ket vector\n    vector_real_function_3d get_mo_bra(const CC_vecfunction& ket) const {\n        vector_real_function_3d result;\n        for (const auto& ktmp : ket.functions) {\n            result.push_back(mo_bra_(ktmp.first).function);\n        }\n        return result;\n    }\n\n    /// returns a specific mo\n    CCFunction<double, 3> mo_ket(const size_t& i) const {\n        return mo_ket_(i);\n    }\n\n    // returns constant mo_ket_\n    CC_vecfunction mo_ket() const {\n        return mo_ket_;\n    }\n\n    /// returns a specific mo multiplied with the squared nuclear correlation factor\n    CCFunction<double, 3> mo_bra(const size_t& i) const {\n        return mo_bra_(i);\n    }\n\n    // returns constant mo_bra_\n    CC_vecfunction mo_bra() const {\n        return mo_bra_;\n    }\n\n    /// make bra element: R^2|t>\n    vector_real_function_3d make_bra(const CC_vecfunction& t) const {\n        return make_bra(t.get_vecfunction());\n    }\n\n    vector_real_function_3d make_bra(const vector_real_function_3d& t) const {\n        vector_real_function_3d bra = mul(world, nemo_->ncf->square(), t);\n        truncate(world, bra);\n        return bra;\n    }\n\n    /// makes the t intermediates\n    /// t_i = mo_ket_(i) + factor*tau(i)\n    /// if factor!=1 then we can not use intermediates and set the type to UNDEFINED\n    CC_vecfunction make_t_intermediate(const CC_vecfunction& tau, const CCParameters& parameters) const;\n\n    /// makes the t intermediates\n    /// t_i = mo_ket_(i) + factor*tau(i)\n    /// if the core is frozen the core ti will just be mo_ket_\n    CC_vecfunction make_full_t_intermediate(const CC_vecfunction& tau) const;\n\n    /// makes the t intermediates\n    /// t_i = mo_ket_(i) + tau(i)\n    /// if the core is frozen the core ti will just be mo_ket_\n    static CC_vecfunction make_full_t_intermediate(const CC_vecfunction& tau, const Info& info);\n\n    /// makes the t intermediates\n\n    /// t_i = mo_ket_(i) + tau(i)\n    /// skip frozen orbitals\n    static CC_vecfunction make_active_t_intermediate(const CC_vecfunction& tau, const Info& info);\n\n    /// makes the t intermediates\n    /// t_i = mo_ket_(i) + tau\n    /// i = tau.i\n    CCFunction<double, 3> make_t_intermediate(const CCFunction<double, 3>& tau) const;\n\nprivate:\n    /// Helper function to initialize the const mo_bra and ket elements adn orbital energies\n    CC_vecfunction\n    make_mo_bra(const Nemo& nemo) const;\n\n    /// Helper function to initialize the const mo_bra and ket elements\n    CC_vecfunction\n    make_mo_ket(const Nemo& nemo) const;\n\n    /// Transfers Eigenvalues of HF MOs from Nemo (Tensor Format) to std::vector<double> format\n    std::vector<double>\n    init_orbital_energies(const Nemo& nemo) const;\n\npublic:\n    /// return the regularized MP2 ansatz: |\\tau_ij> = |u_ij> + Q12 f12 |ij>\n    static CCPair make_pair_mp2(World& world, const real_function_6d& u, const size_t i, const size_t j,\n                                const Info& info, bool compute_Q12_f12_ij);\n\n    /// return the regularized CC2 ansatz: |\\tau_ij> = |u_ij> + Q12t f12 |t_i t_j>\n    static CCPair make_pair_cc2(World& world, const real_function_6d& u,\n                                const CC_vecfunction& gs_singles, const size_t i, const size_t j, const Info& info, const bool compute_Q12_f12_ij);\n\n    /// return the regularized CC2 ansatz: |x_ij> = |u_ij> + Q12t f12 |t_i t_j> + ?????\n    static CCPair make_pair_lrcc2(World& world, const CalcType& ctype,\n                                  const real_function_6d& u, const CC_vecfunction& gs_singles,\n                                  const CC_vecfunction& ex_singles, const size_t i, const size_t j, const Info& info,\n                                  const bool compute_Q12_f12);\n\n    // Pair functions\n\n    /// creates pair functions for ground states\n    /// the full pair-functions is: pair = u + Qt12f12|titj>\n    /// this is decomposed in different types of CCPairFunction\n    /// the CC_Pair2 class holds an vector of CCPairFunction\n    /// we use: Qt12 = 1 - Ot1 - Ot2 + Ot12 = 1 - Ot1(1-0.5*Ot2) - Ot2(1-0.5O*t1)\n    /// depending on parameters.QtAnsatz we use the t functions also in the projector\n    /// functions[0] = u , the pure 6D part\n    /// functions[1] = f12|titj>\n    /// functions[2] = -Ot1(1-0.5*Ot2)f12|titj>\n    /// functions[3] = -(1-0.5*Ot1)Ot2f12|titj>\n    CCPair\n    make_pair_gs(const real_function_6d& u, const CC_vecfunction& tau, const size_t i, const size_t j) const;\n\n    /// creates pair functions for Excited states\n    /// the full pair-functions is: pair = u + Qt12f12|xitj> + Qt12f12|tixj> - OxQtf12|titj> - QtOxf12|titj>\n    /// the old Ansatz (not QtAnsatz) was: pair = u + Q12f12|xitj> + Q12f12|tixj>\n    /// this is decomposed in different types of CCPairFunction\n    /// the CC_Pair2 class holds an vector of CCPairFunction\n    /// we use: Qt12 = 1 - Ot1 - Ot2 + Ot12 = 1 - Ot1(1-0.5*Ot2) - Ot2(1-0.5O*t1)\n    /// functions[0] = u , the pure 6D part\n    /// functions[1] = f12|xitj>\n    /// functions[2] = f12|tixj>\n    /// functions[3] = -Ot1(1-0.5*Ot2)f12|xitj>\n    /// functions[4] = -(1-0.5*Ot1)Ot2f12|xitj>\n    /// functions[5] = -Ot1(1-0.5*Ot2)f12|tixj>\n    /// functions[6] = -(1-0.5*Ot1)Ot2f12|tixj>\n    /// functions[7] = -OxQtf12|titj> only for QtAnsatz\n    /// functions[8] = -QtOxf12|titj> only for QtAnsatz\n    CCPair\n    make_pair_ex(const real_function_6d& u, const CC_vecfunction& tau, const CC_vecfunction& x, const size_t i,\n                 const size_t j, const CalcType ctype) const;\n\n    // Energy operations\n\n    /// Compute pair correlation energies of MP2 or CC2 Ground State\n    // Off diagonal pair energies are multiplied with 2.0 to acount for their permuted partners\n    /// @param[in] u the Pair_function\n    /// @param[in] singles the Singles (for MP2 give empty function) for the energy contribution over disconnected doubles\n    /// @param[out] 2*<ij|g|u> - <ji|g|u> , where i and j are determined by u (see CC_Pair class)\n    static double\n    compute_pair_correlation_energy(World& world,\n                                    const CCPair& u,\n                                    const CC_vecfunction& singles,\n                                    const Info& info);\n\n    /// Compute CC2 correlation energy\n    /// @param[in] The Pair_function\n    /// @param[out] \\sum_{ij} 2*<ij|g|u> - <ji|g|u> + 2*<ij|g|\\tau_i\\tau_j> - <ji|g|\\tau_i\\tau_j> , where i and j are determined by u (see CC_Pair class)\n    /// since we do not compute all pairs (symmetry reasons) the off diagonal pair energies are conted twice\n    /// the cc2 pair functions are dependent on the doubles (see CC_Pair structure, and make_pair function) so make shure they are updated\n    /// @param world\n    /// @param info\n    static double\n    compute_cc2_correlation_energy(World& world, const CC_vecfunction& singles, const Pairs<CCPair>& doubles,\n                                   const Info& info, const std::string msg=\"\");\n\n\n    static double\n    compute_kinetic_energy(World& world, const vector_real_function_3d& xbra, const vector_real_function_3d& xket);\n\n    /// compute the expectation value excitation energy using the CIS/CCS/CC2 singles\n    static double\n    compute_cis_expectation_value(World& world, const CC_vecfunction& x,\n                                  const vector_real_function_3d& V, const bool print, const Info& info);\n\n    /// Something like a pair energy for CIS(D)/LRCC2 to estimate energy convergence\n    /// calculates the response part of s2b and s2c which are independent of the mp2 amplitudes\n    static double\n    compute_excited_pair_energy(World& world, const CCPair& d, const CC_vecfunction& x, const Info& info);\n\n    /// Compute the CIS(D) Energy Correction to CIS\n    double\n    compute_cispd_energy(const CC_vecfunction& x, const Pairs<CCPair> mp2, const Pairs<CCPair> cispd) const;\n\n    /// Compute the CC2 Excitation Energy\n    double\n    compute_cc2_excitation_energy(const CC_vecfunction& stau, const CC_vecfunction& sx, const Pairs<CCPair> dtau,\n                                  const Pairs<CCPair> dx) const;\n\n    // 6D operations\n\n    /// The 6D Fock residue on the cusp free pair function u_{ij}(1,2) is: (2J - Kn - Un)|u_{ij}>\n    real_function_6d\n    fock_residue_6d(const CCPair& u) const;\n\n    /// Static function for the 6D Fock residue for use in macrotask\n    static madness::real_function_6d\n    fock_residue_6d_macrotask(World& world, const CCPair& u, const CCParameters& parameters,\n                              const std::vector<madness::Vector<double, 3>>& all_coords_vec,\n                              const std::vector<real_function_3d>& mo_ket,\n                              const std::vector<real_function_3d>& mo_bra,\n                              const std::vector<real_function_3d>& U1,\n                              const real_function_3d& U2);\n\n    /// Static version of make_constant_part_mp2 to be called from macrotask.\n    static madness::real_function_6d\n    make_constant_part_mp2_macrotask(World& world, const CCPair& pair, const std::vector<real_function_3d>& mo_ket,\n                                     const std::vector<real_function_3d>& mo_bra,\n                                     const CCParameters& parameters, const real_function_3d& Rsquare,\n                                     const std::vector<real_function_3d>& U1,\n                                     const std::vector<std::string> argument);\n\n    /// Compute the constant part of MP2, CC2 or LR-CC2\n    ///\n    /// depending on pair.calc_type different terms are included in the constant part.\n    /// @param[in] pair         the (empty) pair function, determines the terms in the constant part, contains some bookkeeping information (bsh_eps, i, j)\n    /// @param[in] gs_singles   the ground-state singles for CC2 (used for the T1-transformed SO projector), may be left empty for MP2\n    /// @param[in] ex_singles   the excited-state singles for CC2 (used for the T1-transformed SO projector), may be left empty for MP2 and GS-CC2\n    /// @param[in] info         the Info object, containing the some basic quantities (MOs, parameters, etc)\n    /// @return            the constant part of the MP2, CC2 or LR-CC2: G(Q12(g~|titj>))\n    static madness::real_function_6d\n    make_constant_part_macrotask(World& world, const CCPair& pair,\n                                 const CC_vecfunction& gs_singles, const CC_vecfunction& ex_singles,\n                                 const Info& info);\n\n\n    /// Static function to iterate the mp2 pairs from macrotask\n    static madness::real_function_6d\n    update_pair_mp2_macrotask(World& world, const CCPair& pair, const CCParameters& parameters,\n                              const std::vector<madness::Vector<double, 3>>& all_coords_vec,\n                              const std::vector<real_function_3d>& mo_ket,\n                              const std::vector<real_function_3d>& mo_bra,\n                              const std::vector<real_function_3d>& U1,\n                              const real_function_3d& U2, const real_function_6d& mp2_coupling);\n\n\n    /// iterate a pair for MP2, CC2, LRCC2 on constant singles\n    static CCPair iterate_pair_macrotask(World& world,\n                                         const CCPair& pair, const CC_vecfunction& gs_singles,\n                                         const CC_vecfunction& ex_singles,\n                                         const real_function_6d& coupling, const Info& info, const long maxiter);\n\n\n    /// Function evaluates the consant part of the Excited state for CIS(D) if the Q Ansatz is used\n    real_function_6d\n    make_constant_part_cispd(const CCPair& u, const CC_vecfunction& x,\n                             const real_convolution_6d* Gscreen = NULL) const;\n\n    /// Function evaluates the consant part of the Excited state for CIS(D) if the Qt Ansatz is used\n    real_function_6d\n    make_constant_part_cispd_Qt(const CCPair& u, const CC_vecfunction& x,\n                                const real_convolution_6d* Gscreen = NULL) const;\n\n    /// Apply the Regularization potential\n    /// \\f$ V_{reg} = [ U_e - [K,f12] + f12(F12-eij) ]|titj> \\f$\n    /// @param[in] ti, first function in the ket, for MP2 it is the Orbital, for CC2 the relaxed Orbital t_i=\\phi_i + \\tau_i\n    /// @param[in] tj, second function in the ket ...\n    /// @param[in] pointer to bsh operator (in order to screen)\n    /// @param[out] the regularization potential (unprojected), see equation above\n    real_function_6d\n    apply_Vreg(const CCFunction<double, 3>& ti, const CCFunction<double, 3>& tj,\n               const real_convolution_6d* Gscreen = NULL) const;\n\n    /// Apply the Regularization potential\n    /// \\f$ V_{reg} = [ U_e - [K,f12] + f12(F12-eij) + [F,Qt] ]|titj> \\f$\n    /// @param[in] ti, first function in the ket, for MP2 it is the Orbital, for CC2 the relaxed Orbital t_i=\\phi_i + \\tau_i\n    /// @param[in] tj, second function in the ket ...\n    /// @param[in] pointer to bsh operator (in order to screen)\n    /// @param[out] the regularization potential (unprojected), see equation above\n    std::vector<CCPairFunction<double, 6>>\n    static apply_Vreg(World& world, const CCFunction<double, 3>& ti, const CCFunction<double, 3>& tj,\n                      const CC_vecfunction& gs_singles, const CC_vecfunction& ex_singles,\n                      const Info& info, const std::vector<std::string>& argument, const double bsh_eps);\n\n    /// Static version of apply_Vreg to be used from a macrotask. Will eventually replace former.\n    madness::real_function_6d\n    static\n    apply_Vreg_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                         const std::vector<real_function_3d>& mo_bra,\n                         const CCParameters& parameters, const real_function_3d& Rsquare,\n                         const std::vector<real_function_3d>& U1, const size_t& i, const size_t& j,\n                         const FuncType& x_type, const FuncType& y_type,\n                         const std::vector<std::string> argument,\n                         const real_convolution_6d* Gscreen = NULL);\n\n    /// evaluates: \\f$ (F(1)-ei)|ti> (x) |tj> + |ti> (x) (F(2)-ej)|tj> \\f$ with the help of the singles potential\n    /// singles equation is: (F-ei)|ti> = - V(ti)\n    /// response singles equation: (F-ei-omega)|xi> = - V(xi)\n    /// response:  \\f$ (F12-ei-ej-omega)|xitj> = (F1 - ei - omega)|xi> (x) |tj> + |xi> (x) (F2-ej)|tj> \\f$\n    /// so in both cases the result will be: |V(ti),tj> + |ti,V(tj)>\n    /// @param[in] ti, first function in the ket, for MP2 it is the Orbital, for CC2 the relaxed Orbital t_i=\\phi_i + \\tau_i\n    /// @param[in] tj, second function in the ket ...\n    /// @param[in] pointer to bsh operator (in order to screen)\n    real_function_6d\n    apply_reduced_F1(const CCFunction<double, 3>& ti, const CCFunction<double, 3>& tj,\n                     const real_convolution_6d* Gscreen = NULL) const;\n\n    /// evaluates: \\f$ (F(1)-ei)|ti> (x) |tj> + |ti> (x) (F(2)-ej)|tj> \\f$ with the help of the singles potential\n    /// singles equation is: (F-ei)|ti> = - V(ti)\n    /// response singles equation: (F-ei-omega)|xi> = - V(xi)\n    /// response:  \\f$ (F12-ei-ej-omega)|xitj> = (F1 - ei - omega)|xi> (x) |tj> + |xi> (x) (F2-ej)|tj> \\f$\n    /// so in both cases the result will be: |V(ti),tj> + |ti,V(tj)>\n    /// @param[in] ti, first function in the ket, for MP2 it is the Orbital, for CC2 the relaxed Orbital t_i=\\phi_i + \\tau_i\n    /// @param[in] tj, second function in the ket ...\n    /// @param[in] pointer to bsh operator (in order to screen)\n    real_function_6d\n    static apply_reduced_F(World& world, const CCFunction<double, 3>& ti, const CCFunction<double, 3>& tj,\n                           const Info& info, const real_convolution_6d* Gscreen = NULL);\n\n    /// Apply Ue on a tensor product of two 3d functions: Ue(1,2) |x(1)y(2)> (will be either |ij> or |\\tau_i\\tau_j> or mixed forms)\n    /// The Transformed electronic regularization potential (Kutzelnigg) is R_{12}^{-1} U_e R_{12} with R_{12} = R_1*R_2\n    /// It is represented as: R_{12}^{-1} U_e R_{12} = U_e + R^-1[Ue,R]\n    /// where R^-1[Ue,R] = R^-1 [[T,f],R] (see: Regularizing the molecular potential in electronic structure calculations. II. Many-body\n    /// methods, F.A.Bischoff)\n    /// The double commutator can be evaluated as follows:  R^-1[[T,f],R] = -Ue_{local}(1,2)*(Un_{local}(1) - Un_{local}(2))\n    /// @param[in] x the 3D function for particle 1\n    /// @param[in] y the 3D function for particle 2\n    /// @param[in] The BSH operator to screen: Has to be in NS form, Gscreen->modified == true\n    /// @return  R^-1U_eR|x,y> the transformed electronic smoothing potential applied on |x,y> :\n    real_function_6d\n    apply_transformed_Ue(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n                         const real_convolution_6d* Gscreen = NULL) const;\n\n    /// Static version of apply_transformed_Ue for the use in a macrotask.\n    /// Will eventually replace the former.\n    real_function_6d\n    static apply_transformed_Ue_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                                          const CCParameters& parameters, const real_function_3d& Rsquare,\n                                          const std::vector<real_function_3d>& U1, const size_t& i, const size_t& j,\n                                          const FuncType& x_type, const FuncType& y_type,\n                                          const real_convolution_6d* Gscreen = NULL);\n\n    real_function_6d\n    static apply_Ue(World& world, const CCFunction<double, 3>& phi_i, const CCFunction<double, 3>& phi_j,\n                    const Info& info, const real_convolution_6d* Gscreen);\n\n\n    static real_function_6d\n    apply_KffK(World& world, const CCFunction<double, 3>& phi_i, const CCFunction<double, 3>& phi_j,\n               const Info& info, const real_convolution_6d* Gscreen);\n    static CCPairFunction<double, 6>\n    apply_commutator_F_Qt_f12(World& world, const CCFunction<double, 3>& phi_i, const CCFunction<double, 3>& phi_j,\n                              const CC_vecfunction& gs_singles, const CC_vecfunction& ex_singles,\n                              const Info& info, const real_convolution_6d* Gscreen);\n\n    static CCPairFunction<double, 6>\n    apply_commutator_F_dQt_f12(World& world, const CCFunction<double, 3>& phi_i, const CCFunction<double, 3>& phi_j,\n                               const CC_vecfunction& gs_singles, const CC_vecfunction& ex_singles,\n                               const Info& info, const real_convolution_6d* Gscreen);\n\n    /// Apply Ue on a tensor product of two 3d functions: Ue(1,2) |x(1)y(2)> (will be either |ij> or |\\tau_i\\tau_j> or mixed forms)\n    /// The Transformed electronic regularization potential (Kutzelnigg) is R_{12}^{-1} U_e R_{12} with R_{12} = R_1*R_2\n    /// It is represented as: R_{12}^{-1} U_e R_{12} = U_e + R^-1[Ue,R]\n    /// where R^-1[Ue,R] = R^-1 [[T,f],R] (see: Regularizing the molecular potential in electronic structure calculations. II. Many-body\n    /// methods, F.A.Bischoff)\n    /// The double commutator can be evaluated as follows:  R^-1[[T,f],R] = -Ue_{local}(1,2)*(Un_{local}(1) - Un_{local}(2))\n    /// @param[in] x the 3D function for particle 1\n    /// @param[in] y the 3D function for particle 2\n    /// @param[in] Gscreen pointer to the BSH operator in order to screen, has to be in modified NS form, Gscreen->modified==true\n    /// the f12K|xy> part will be screened with the BSH while the Kf12|xy> can not be screened with the BSH operator but maybe with the coulomb\n    /// @return  R^-1U_eR|x,y> the transformed electronic smoothing potential applied on |x,y> :\n    real_function_6d\n    apply_exchange_commutator(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n                              const real_convolution_6d* Gscreen = NULL) const;\n\n    real_function_6d\n    static apply_exchange_commutator_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                                               const std::vector<real_function_3d>& mo_bra,\n                                               const real_function_3d& Rsquare,\n                                               const size_t& i, const size_t& j, const CCParameters& parameters,\n                                               const FuncType& x_type, const FuncType& y_type,\n                                               const real_convolution_6d* Gscreen = NULL);\n\n    /// This applies the exchange commutator, see apply_exchange_commutator function for information\n    real_function_6d\n    apply_exchange_commutator1(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n                               const real_convolution_6d* Gscreen = NULL) const;\n\n    /// Helper Function which performs the operation \\f$ <xy|g12f12|ab> \\f$\n    /// @param[in] function x, if nuclear correlation is used make sure this is the correct bra function\n    /// @param[in] function y, if nuclear correlation is used make sure this is the correct bra function\n    /// @param[in] function a,\n    /// @param[in] function b,\n    double\n    make_xy_gf_ab(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y, const CCFunction<double, 3>& a,\n                  const CCFunction<double, 3>& b) const;\n\n    double make_xy_ff_ab(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n                         const CCFunction<double, 3>& a, const CCFunction<double, 3>& b) const {\n        error(\"xy_ff_ab not yet implemented\");\n        return 0.0;\n    }\n\n    /// apply the operator gf = 1/(2\\gamma)*(Coulomb - 4\\pi*BSH_\\gamma)\n    /// works only if f = (1-exp(-\\gamma*r12))/(2\\gamma)\n    static real_function_3d\n    apply_gf(World& world, const real_function_3d& f, const Info& info);\n\n    /// returns <xy|op|u>\n    /// loops over every entry in the vector and accumulates results\n    /// helper function for CIS(D) energy\n    static double\n    make_xy_op_u(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n                 const CCConvolutionOperator<double, 3>& op,\n                 const std::vector<CCPairFunction<double, 6>>& u);\n\n    /// returns <xy|u> for a vector of CCPairFunction\n    /// the result is accumulated for every vercotr\n    /// helper functions for CIS(D) energy\n    static double\n    make_xy_u(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n              const std::vector<CCPairFunction<double, 6>>& u);\n\n    /// Functions which operate with the CCPairFunction structure\n    /// @param[in] function x, if nuclear correlation is used make sure this is the correct bra function\n    /// @param[in] function y, if nuclear correlation is used make sure this is the correct bra function\n    /// @param[in] CCPairFunction u,\n    static double\n    make_xy_op_u(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n                 const CCConvolutionOperator<double, 3>& op,\n                 const CCPairFunction<double, 6>& u);\n\n    /// Helper Function which returns\n    /// @return <xy|op|ab>\n    /// @param[in] function x, if nuclear correlation is used make sure this is the correct bra function\n    /// @param[in] function y, if nuclear correlation is used make sure this is the correct bra function\n    /// @param[in] function a,\n    /// @param[in] function b,\n    double\n    make_xy_op_ab(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n                  const CCConvolutionOperator<double, 3>& op, const CCFunction<double, 3>& a,\n                  const CCFunction<double, 3>& b) const;\n\n    /// get the correct pair function as vector of CCPairFunction functions\n    /// @param[in] The pair functions\n    /// @param[out] The demanded pair function as vector of CCPairFunction functions (includes regularization tails)\n    static std::vector<CCPairFunction<double, 6>>\n    get_pair_function(const Pairs<CCPair>& pairs, const size_t i, const size_t j);\n\n\n    /// returns <a|g12|u>_2\n    static real_function_3d\n    apply_s2b_operation(World& world, const CCFunction<double, 3>& bra, const CCPairFunction<double, 6>& u,\n                        const size_t particle, const Info& info);\n\n    /// dummy to avoid confusion and for convenience\n    real_function_6d swap_particles(const real_function_6d& f) const {\n        return madness::swap_particles<double>(f);\n    }\n\n    /// swap the particles of the CCPairFunction and return a new vector of swapped functions\n    static std::vector<CCPairFunction<double, 6>> swap_particles(const std::vector<CCPairFunction<double, 6>>& f) {\n        std::vector<CCPairFunction<double, 6>> swapped;\n        for (size_t i = 0; i < f.size(); i++) swapped.push_back(f[i].swap_particles());\n        return swapped;\n    }\n\n    /// Calculate the Overlap between two CCPairFunction <f1|f2>\n    /// @param[in] 6D function 1\n    /// @param[in] 6D function 2\n    double\n    overlap(const CCPairFunction<double, 6>& f1, const CCPairFunction<double, 6>& f2) const {\n        return inner(f1, f2, nemo_->ncf->square());\n    };\n\n    /// Computes the squared norm of the pair function <x|x>\n    /// including all regularization tails\n    /// means: if  x = u + f12|mn> + |ab> --> <x|x> = <u|u> + <u|f12|mn> + <u|ab> + ....\n    double\n    overlap(const CCPair& x) const;\n\n    // Projectors\n\n    /// Apply a projector to a CC_vecfunction\n    /// result: \\f$ P(tau)f[i] = \\sum_k tau[k]*<k|f[i]>   \\f$\n    /// ket state of the projector can vary\n    /// bra state are always MOs\n    vector_real_function_3d\n    apply_projector(const CC_vecfunction& f, const CC_vecfunction& ket_) const;\n\n    /// Apply Qt projector on 6D function\n    real_function_6d\n    apply_Q12t(const real_function_6d& f, const CC_vecfunction& t) const;\n\n\n    /// Apply the Q projector to a CC_vecfunction\n    /// result: \\f$ 1-c*P(tau)f[i] = 1 - c*\\sum_k tau[k]*<k|f[i]> \\f$\n    /// ket state of the projector can vary\n    /// bra state are always MOs\n    /// the factor c is usually 1 or 1/2\n    vector_real_function_3d\n    apply_Qt(const CC_vecfunction& f, const CC_vecfunction& ket_, const double c = 1.0) const;\n\n    /// Apply the Qt projector on a CCPairFunction\n    /// works in principle like apply_Ot\n    CCPairFunction<double, 6>\n    apply_Qt(const CCPairFunction<double, 6>& f, const CC_vecfunction& t, const size_t particle,\n             const double c = 1.0) const;\n\n    /// Apply Ot projector on decomposed or op_decomposed 6D function\n    /// The function does not work with type==pure right now (not needed)\n    /// for CCPairFunction type==decomposed_ : f = \\sum_k |c_k,d_k> where c and d are stored as vectors\n    /// then the result is \\sum_k |a_k,b_k> with a,b stored as vectors and\n    /// \\f$ a_k = t_k \\f$\n    /// \\f$ b_k = Ot(d_k) or vise versa for particle==2\n    /// for CCPairFunction type == op_decomposd the function si f=op|xy> and we have for particle==1\n    /// \\f$ a_k = t_k \\f$\n    /// \\f$ b_k = <mo_k|op|x>*y \\f$\n    CCPairFunction<double, 6>\n    apply_Ot(const CCPairFunction<double, 6>& f, const CC_vecfunction& t, const size_t particle) const;\n\n    /// Apply the Greens Operator to a CCPairFunction\n    /// For CCPairFunction only type pure and type decomposed is supported\n    /// for the op_decomposed type a pure function can be constructed (not needed therefore not implemented yet)\n    real_function_6d\n    apply_G(const CCPairFunction<double, 6>& u, const real_convolution_6d& G) const;\n\n    /// Apply BSH Operator and count time\n    real_function_6d apply_G(const real_function_6d& f, const real_convolution_6d& G) const {\n        CCTimer time(world, \"Apply Greens Operator\");\n        const real_function_6d result = G(f);\n        time.info(true, result.norm2());\n        return result;\n    }\n\n\n    // Coupled Cluster Singles potentials which work with CCPairFunction pairs\n    // notation follows Shavit & Bartlett Many-Body Methods ...\n\n    /// Calculates the CC2 singles potential for the ground state: result = Fock_residue + V\n    /// the V part is stored in the intermediate_potentials structure\n    static vector_real_function_3d\n    get_CC2_singles_potential_gs(World& world, const CC_vecfunction& singles, const Pairs<CCPair>& doubles,\n                                 Info& info);\n\n    /// Calculates the CCS/CIS singles potential for the excited state: result = Fock_residue + V\n    /// the V part is stored in the intermediate_potentials structure\n    /// the expectation value is calculated and updated\n    static vector_real_function_3d\n    get_CCS_potential_ex(World& world, const CC_vecfunction& x, const bool print, Info& info);\n\n    /// Calculates the CC2 singles potential for the Excited state: result = Fock_residue + V\n    /// the V part is stored in the intermediate_potentials structure\n    static vector_real_function_3d\n    get_CC2_singles_potential_ex(World& world, const CC_vecfunction& gs_singles,\n                                 const Pairs<CCPair>& gs_doubles, const CC_vecfunction& ex_singles,\n                                 const Pairs<CCPair>& response_doubles, Info& info);\n\n    /// Calculates the CC2 singles potential for the Excited state: result = Fock_residue + V\n    /// the V part is stored in the intermediate_potentials structure\n    static vector_real_function_3d\n    get_ADC2_singles_potential(World& world, const Pairs<CCPair>& gs_doubles,\n                               CC_vecfunction& ex_singles, const Pairs<CCPair>& response_doubles, Info& info);\n\n    /// The potential manager for the ground state potential\n    /// CC2 singles potential parts of the ground state\n    /// Genereal function which evaluates a CC_singles potential\n    /// @param[in] Bra vectorfunction to contract the potential\n    /// @param[in] Singles of the Ground State\n    /// @param[in] Doubles of the Ground State\n    /// @param[in] Name of the potential\n    /// @param[out] the potential (without Q application)\n    /// @param world\n    double\n    potential_energy_gs(World& world, const CC_vecfunction& bra, const CC_vecfunction& singles,\n                        const Pairs<CCPair>& doubles, const PotentialType& name) const;\n\n    /// The potential manager for the ground state potential\n    /// CC2 singles potential parts of the ground state\n    /// General function which evaluates a CC_singles potential\n    /// @param[in] result_index corresponds to indices of external lines in the diagram\n    /// @param[in] Singles of the Ground State\n    /// @param[in] Doubles of the Ground State\n    /// @param[in] Name of the potential\n    /// @param[out] the potential (without Q application)\n    /// @param world\n    static std::tuple<madness::vector_real_function_3d, madness::vector_real_function_3d>\n    potential_singles_gs(World& world, const std::vector<int>& result_index, const CC_vecfunction& singles,\n                         const Pairs<CCPair>& doubles,\n                         const PotentialType& name, const Info& info);\n\n    /// The integra manager for the excited state potential\n    /// CC2 singles potential parts of the ground state\n    /// Genereal function which evaluates a CC_singles potential\n    /// @param[in] The bra element\n    /// @param[in] Singles of the Ground State\n    /// @param[in] Doubles of the Ground State\n    /// @param[in] Singles of the Excited State\n    /// @param[in] Doubles of the Excited State\n    /// @param[in] Name of the potential\n    /// @param[out] the potential (without Q application)\n    /// @param world\n    double\n    potential_energy_ex(World& world, const CC_vecfunction& bra, const CC_vecfunction& singles_gs,\n                        const Pairs<CCPair>& doubles_gs, const CC_vecfunction& singles_ex,\n                        const Pairs<CCPair>& doubles_ex, const PotentialType& name) const;\n\n    /// The potential manager for the excited state potential\n    /// CC2 singles potential parts of the ground state\n    /// Genereal function which evaluates a CC_singles potential\n    /// @param[in] result_index dummy vector for partitioning the macrotasks, must have the length of the singles vector\n    /// @param[in] Singles of the Ground State\n    /// @param[in] Doubles of the Ground State\n    /// @param[in] Singles of the Excited State\n    /// @param[in] Doubles of the Excited State\n    /// @param[in] Name of the potential\n    /// @param[out] the potential (without Q application)\n    /// @param world\n    static std::tuple<madness::vector_real_function_3d, madness::vector_real_function_3d>\n    potential_singles_ex(World& world, const std::vector<int> result_index, const CC_vecfunction& singles_gs,\n                         const Pairs<CCPair>& doubles_gs, const CC_vecfunction& singles_ex,\n                         const Pairs<CCPair>& doubles_ex, const PotentialType& name, const Info& info);\n\n    /// The Fock operator is partitioned into F = T + Vn + R\n    /// the fock residue R= 2J-K+Un for closed shell is computed here\n    /// J_i = \\sum_k <k|r12|k> |tau_i>\n    /// K_i = \\sum_k <k|r12|tau_i> |k>\n    static vector_real_function_3d\n    fock_residue_closed_shell(World& world, const CC_vecfunction& singles, const Info& info);\n\n    /// the K operator runs over ALL orbitals (also the frozen ones)\n    static real_function_3d\n    K(World& world, const CCFunction<double, 3>& f, const Info& info);\n\n    /// static version of k above for access from macrotask. will eventually replace former.\n    real_function_3d\n    static K_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                       const std::vector<real_function_3d>& mo_bra, const real_function_3d& f,\n                       const CCParameters& parameters);\n\n    /// Exchange Operator on Pair function: -(K(1)+K(2))u(1,2)\n    /// if i==j in uij then the symmetry will be exploited\n    /// !!!!Prefactor (-1) is not included here!!!!\n    real_function_6d\n    K(const real_function_6d& u, const bool symmetric) const;\n\n    /// static version of k above for access from macrotask. will eventually replace former.\n    real_function_6d\n    static K_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                       const std::vector<real_function_3d>& mo_bra,\n                       const real_function_6d& u, const bool symmetric, const CCParameters& parameters);\n\n    /// Exchange Operator on Pair function: -(K(1)+K(2))u(1,2)\n    /// K(1)u(1,2) = \\sum_k <k(3)|g13|u(3,2)> |k(1)>\n    /// 1. X(3,2) = bra_k(3)*u(3,2)\n    /// 2. Y(1,2) = \\int X(3,2) g13 d3\n    /// 3. result = Y(1,2)*ket_k(1)\n    /// !!!!Prefactor (-1) is not included here!!!!\n    real_function_6d\n    apply_K(const real_function_6d& u, const size_t& particle) const;\n\n    /// Static version of apply_K above for access from macrotask. Will eventually replace former.\n    real_function_6d\n    static apply_K_macrotask(World& world, const std::vector<real_function_3d>& mo_ket,\n                             const std::vector<real_function_3d>& mo_bra,\n                             const real_function_6d& u, const size_t& particle, const CCParameters& parameters);\n\n    /// Apply the Exchange operator on a tensor product multiplied with f12\n    /// !!! Prefactor of (-1) is not inclued in K here !!!!\n    real_function_6d\n    apply_Kf(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y) const;\n\n    /// Apply fK on a tensor product of two 3D functions\n    /// fK|xy> = fK_1|xy> + fK_2|xy>\n    /// @param[in] x, the first 3D function in |xy>, structure holds index i and type (HOLE, PARTICLE, MIXED, UNDEFINED)\n    /// @param[in] y, the second 3D function in |xy>  structure holds index i and type (HOLE, PARTICLE, MIXED, UNDEFINED)\n    /// @param[in] BSH operator to screen, has to be in modified NS form, Gscreen->modified()==true;\n    real_function_6d\n    apply_fK(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n             const real_convolution_6d* Gscreen = NULL) const;\n\n    /// Creates a 6D function with the correlation factor and two given CCFunctions\n    real_function_6d\n    make_f_xy(const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n              const real_convolution_6d* Gscreen = NULL) const;\n\n    /// Creates a 6D function with the correlation factor and two given CCFunctions\n    real_function_6d\n    static make_f_xy(World& world, const CCFunction<double, 3>& x, const CCFunction<double, 3>& y,\n                     const Info& info, const real_convolution_6d* Gscreen = NULL);\n\n    real_function_6d\n    static make_f_xy_macrotask(World& world, const real_function_3d& x_ket, const real_function_3d& y_ket,\n                               const real_function_3d& x_bra, const real_function_3d& y_bra,\n                               const size_t& i, const size_t& j, const CCParameters& parameters,\n                               const FuncType& x_type, const FuncType& y_type,\n                               const real_convolution_6d* Gscreen = NULL);\n\n    /// unprojected ccs (S3c) potential\n    /// returns 2kgtk|ti> - kgti|tk>\n    /// the ccs potential: ti = ti and tk = tauk\n    static vector_real_function_3d\n    ccs_unprojected(World& world, const CC_vecfunction& ti, const CC_vecfunction& tk, const Info& info);\n\n    /// return RMS norm and max norm of residuals\n    template <typename T, std::size_t NDIM>\n    static std::pair<double, double> residual_stats(const std::vector<Function<T, NDIM>>& residual) {\n        if (residual.size() == 0) return std::make_pair(0.0, 0.0);\n        World& world = residual.front().world();\n        auto errors = norm2s(world, residual);\n        double rnorm = 0.0, maxrnorm = 0.0;\n        for (double& e : errors) {\n            maxrnorm = std::max(maxrnorm, e);\n            rnorm += e * e;\n        }\n        rnorm = sqrt(rnorm / errors.size());\n        return std::make_pair(rnorm, maxrnorm);\n    }\n\n    static void print_convergence(const std::string name, const double rmsresidual, const double maxresidual,\n                                  const double energy_diff, const int iteration) {\n        const std::size_t bufsize = 255;\n        char msg[bufsize];\n        std::snprintf(msg, bufsize,\n                      \"convergence of %s in iteration %2d at time %8.1fs: rms/max residual, energy change %.1e %.1e %.1e\",\n                      name.c_str(), iteration, wall_time(), rmsresidual, maxresidual,energy_diff);\n        print(msg);\n    }\n\n    // integrals from singles potentials\n\n    /// <xi|T|ti> + <xi|Vn|ti> + 2.0*<xi,k|g|ti,k> - <xi,k|g|k,ti>\n    double\n    x_s3a(const CC_vecfunction& x, const CC_vecfunction& t) const;\n\n    /// -<xi|e_i|ti>\n    double\n    x_s3b(const CC_vecfunction& x, const CC_vecfunction& t) const;\n\n    /// 2<xik|g|itk> - <xik|g|tki>\n    double\n    x_s3c(const CC_vecfunction& x, const CC_vecfunction& t) const;\n\n    /// 2<xik|g|t1it2k> - <xik|g|t2kt1i>\n    double\n    x_s5b(const CC_vecfunction& x, const CC_vecfunction& t1, const CC_vecfunction& t2) const;\n\n    /// -(2<lk|g|it1k> - <lk|g|t1ki>)* <xi|t2l>\n    double\n    x_s5c(const CC_vecfunction& x, const CC_vecfunction& t1, const CC_vecfunction& t2) const;\n\n    /// -(2<lk|g|t3i,t1k> - <lk|g|t1k,t3i>)* <xi|t2l>\n    double\n    x_s6(const CC_vecfunction& x, const CC_vecfunction& t1, const CC_vecfunction& t2,\n         const CC_vecfunction& t3) const;\n\n    /// 2.0 <xik|g|uik>- <kxi|g|uik>\n    double\n    x_s2b(const CC_vecfunction& x, const Pairs<CCPair>& u) const;\n\n    /// -( 2.0 <xi,k|(l_g_i)(2)|ukl> - <k,xi,(l_g_i)(1)|ukl> )\n    double\n    x_s2c(const CC_vecfunction& x, const Pairs<CCPair>& u) const;\n\n    /// -( <lk|g|uik> - <kl|g|uik> )*<xi|tl>\n    double\n    x_s4a(const CC_vecfunction& x, const CC_vecfunction& t, const Pairs<CCPair>& u) const;\n\n    /// -( 2.0 <xi,k|(l_g_ti)(2)|ukl> - <k,xi,(l_g_ti)(1)|ukl> )\n    double\n    x_s4b(const CC_vecfunction& x, const CC_vecfunction& t, const Pairs<CCPair>& u) const;\n\n    /// 4.0 <xil|(k_g_tk)|uil> - 2.0 <lxi|(k_g_tk)|uil> - 2.0 <xik|(l_g_tk)|uil> + <kxi|(l_g_tk)|uil>\n    double\n    x_s4c(const CC_vecfunction& x, const CC_vecfunction& t, const Pairs<CCPair>& u) const;\n\n    /// result: \\sum_k( 2<k|g|uik>_2 - <k|g|uik>_1 )\n\n    /// singles are not needed explicitly but to determine if it is response or ground state\n    /// function return a vector of size 2*singles, the first half being the s2b potential, the second half\n    /// an intermediate that will be stored by the caller in the info structure\n    ///@param world\n    ///@param external_indices\n    ///@param[in] singles:CC_vecfunction fof type response or particle (depending on this the correct intermediates will be used) the functions themselves are not needed\n    ///@param[in] doubles:Pairs of CC_Pairs (GS or Response)\n    ///@param builder\n    ///@param info\n    ///@param[out] \\f$ \\sum_k( 2<k|g|uik>_2 - <k|g|uik>_1 ) \\f$\n    /// Q-Projector is not applied, sign is correct\n    /// if the s2b potential has already been calculated it will be loaded from the intermediate_potentials structure\n    static std::tuple<madness::vector_real_function_3d, madness::vector_real_function_3d>\n    s2b(World& world, std::vector<int> external_indices, const CC_vecfunction& singles, const Pairs<CCPair>& doubles, const\n        CCPairBuilder& builder, const Info& info);\n\n    /// result: -\\sum_k( <l|kgi|ukl>_2 - <l|kgi|ukl>_1)\n\n    /// singles are not needed explicitly but to determine if it is response or ground state\n    /// function return a vector of size 2*singles, the first half being the s2c potential, the second half\n    /// an intermediate that will be stored by the caller in the info structure\n    ///@param world\n    ///@param external_index\n    ///@param[in] singles:CC_vecfunction fof type response or particle (depending on this the correct intermediates will be used) the functions themselves are not needed\n    ///@param[in] doubles:Pairs of CC_Pairs (GS or Response)\n    ///@param builder\n    ///@param info\n    ///@param[out] \\f$ -\\sum_k( <l|kgi|ukl>_2 - <l|kgi|ukl>_1) \\f$\n    /// Q-Projector is not applied, sign is correct\n    static std::tuple<vector<Function<double, 3>>, vector<Function<double, 3>>>\n    s2c(World& world, std::vector<int> external_index, const CC_vecfunction& singles, const Pairs<CCPair>& doubles, const\n        CCPairBuilder& builder, const Info& info);\n\n    /// the S4a potential can be calcualted from the S2b potential\n    /// result is \\f$ s4a_i = - <l|s2b_i>*|tau_l> \\f$\n    vector_real_function_3d\n    s4a_from_s2b(const vector_real_function_3d& s2b, const CC_vecfunction& singles) const;\n\n    // result: -\\sum_k( <l|kgtaui|ukl>_2 - <l|kgtaui|ukl>_1) | kgtaui = <k|g|taui>\n    ///@param world\n    ///@param external_index\n    ///@param[in] singles:CC_vecfunction fof type response or particle (depending on this the correct intermediates will be used) the functions themselves are not needed\n    ///@param[in] doubles:Pairs of CC_Pairs (GS or Response)\n    ///@param info\n    ///@param[out] \\f$ -( <l|kgtaui|ukl>_2 - <l|kgtaui|ukl>_1) | kgtaui = <k|g|taui> | taui=singles_i \\f$\n    /// Q-Projector is not applied, sign is correct\n    static vector_real_function_3d\n    s4b(World& world, std::vector<int> external_index, const CC_vecfunction& singles, const Pairs<CCPair>& doubles,\n        const CCPairBuilder& builder, const Info& info);\n\n\n    ///@param world\n    ///@param external_index\n    ///@param[in] singles:CC_vecfunction fof type response or particle (depending on this the correct intermediates will be used) the functions themselves are not needed\n    ///@param[in] doubles:Pairs of CC_Pairs (GS or Response)\n    ///@param info\n    ///@param[out] \\f$ ( 4<l|kgtauk|uil>_2 - 2<l|kgtauk|uil>_1 - 2<k|lgtauk|uil>_2 + <k|lgtauk|uil>_1 ) \\f$\n    /// Q-Projector is not applied, sign is correct\n    static vector_real_function_3d\n    s4c(World& world, std::vector<int> external_index, const CC_vecfunction& singles, const Pairs<CCPair>& doubles,\n        const CCPairBuilder& builder, const Info& info);\n\n    // update the intermediates\n    void update_intermediates(const CC_vecfunction& t) {\n        g12->update_elements(mo_bra_, t);\n        //        g12.sanity();\n        f12->update_elements(mo_bra_, t);\n        //        f12.sanity();\n    }\n\n    /// clear stored potentials\n    /// if a response function is given only the response potentials are cleared (the GS potentials dont change anymore)\n    void clear_potentials(const CC_vecfunction& t) const {\n        if (t.type == RESPONSE) {\n            output(\"Clearing Response Singles-Potentials\");\n            get_potentials.clear_response();\n        }\n        else {\n            output(\"Clearing all stored Singles-Potentials\");\n            get_potentials.clear_all();\n        }\n    }\n\npublic:\n    // member variables\n    /// MPI World\n    World& world;\n    /// the nemo structure which holds the nuclear correlation factor and all other functions from the reference calculation\n    std::shared_ptr<const Nemo> nemo_;\n    /// CC_Parameters: All parameters (see class description)\n    const CCParameters& parameters;\n    /// ket functions of the reference determinant\n    CC_vecfunction mo_ket_;\n    /// bra function of the reference determinant: bra = R2*ket, with R^2 beiing the squared nuclear correlation factor\n    CC_vecfunction mo_bra_;\n    /// orbital energies\n    std::vector<double> orbital_energies_;\n    /// the coulomb operator with all intermediates\npublic:\n    std::shared_ptr<CCConvolutionOperator<double, 3>> g12;\n    /// the f12 operator with all intermediates\n    std::shared_ptr<CCConvolutionOperator<double, 3>> f12;\n    /// the correlation factor, holds necessary regularized potentials\n    CorrelationFactor corrfac;\n    /// Manager for stored intermediate potentials which are s2c, s2b and the whole singles potentials without fock-residue for GS and EX state\n    mutable CCIntermediatePotentials get_potentials;\n    /// POD for basis and intermediates\n    Info info;\n\npublic:\n    /// Messenger structure for formated output and to store warnings\n    CCMessenger output;\n};\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_CCPOTENTIALS_H_ */\n"
  },
  {
    "path": "src/madness/chem/CCStructures.cc",
    "content": "/*\n * CCStructures.cc\n *\n *  Created on: Jan 4, 2017\n *      Author: kottmanj\n */\n\n#include\"CCStructures.h\"\n#include<madness/chem/CCPotentials.h>\n\nnamespace madness {\n\nvoid\nCCMessenger::output(const std::string& msg) const {\n    if (scientific) std::cout << std::scientific;\n    else std::cout << std::fixed;\n\n    std::cout << std::setprecision(output_prec);\n    if (world.rank() == 0) std::cout << msg << std::endl;\n}\n\nvoid\nCCMessenger::section(const std::string& msg) const {\n    if (world.rank() == 0) {\n        std::cout << \"\\n\" << std::setw(msg.size() + 10) << std::setfill('*') << \"\\n\";\n        std::cout << std::setfill(' ');\n        output(msg);\n        std::cout << std::setw(msg.size() + 10) << std::setfill('*') << \"\\n\\n\";\n        std::cout << std::setfill(' ');\n    }\n}\n\nvoid\nCCMessenger::subsection(const std::string& msg) const {\n    if (world.rank() == 0) {\n        std::cout << \"\\n\" << std::setw(msg.size() + 5) << std::setfill('-') << \"\\n\";\n        std::cout << std::setfill(' ');\n        output(msg);\n        std::cout << std::setw(msg.size() + 5) << std::setfill('-') << \"\\n\";\n        std::cout << std::setfill(' ');\n    }\n}\n\nvoid\nCCMessenger::warning(const std::string& msg) const {\n    std::string tmp = \"!!!!!WARNING:\" + msg + \"!!!!!!\";\n    output(tmp);\n    warnings.push_back(msg);\n}\n\nvoid\nCCTimer::info(const bool debug, const double norm) {\n    if (debug == true) {\n        update_time();\n        std::string s_norm = \"\";\n        if (norm != 12345.6789) s_norm = \", ||result||=\" + std::to_string(norm);\n\n        if (world.rank() == 0) {\n            std::cout << std::setfill(' ') << std::scientific << std::setprecision(2)\n                      << \"Timer: \" << time_wall << \" (Wall), \" << time_cpu << \" (CPU)\" << s_norm\n                      << \", (\" + operation + \")\" << \"\\n\";\n        }\n    }\n}\n\n\n\nvoid\nCC_vecfunction::print_size(const std::string& msg) const {\n    if (functions.size() == 0) {\n        std::cout << \"CC_vecfunction \" << msg << \" is empty\\n\";\n    } else {\n        std::string msg2;\n        if (msg == \"!?not assigned!?\") msg2 = \"\";\n        else msg2 = \"_(\" + msg + \")\";\n\n        for (auto x : functions) {\n            x.second.function.print_size(x.second.name() + msg2);\n        }\n    }\n}\n\nvoid\nCCPair::info() const {\n    if (constant_part.world().rank() == 0) {\n        std::cout << \"\\nInformation about electron pair: \" << name() << \"\\n\";\n    }\n    constant_part.print_size(\"ConstantPart\");\n    for (size_t k = 0; k < functions.size(); k++)\n        functions[k].print_size();\n    if (constant_part.world().rank() == 0) {\n        std::cout << \"\\n\";\n    }\n}\n\nmadness::vector_real_function_3d\nCCIntermediatePotentials::get_potential(const PotentialType& ptype, const FuncType& ftype, const bool throw_if_empty) const {\n    vector_real_function_3d result;\n    if (parameters.debug()) print(\"Getting \" , assign_name(ptype) , \" for \" , madness::name(ftype,0));\n    if (ptype == POT_singles_ and (ftype == PARTICLE or ftype == MIXED)) result= current_singles_potential_gs_;\n    else if (ptype == POT_singles_ and ftype == RESPONSE) result= current_singles_potential_ex_;\n    else if (ptype == POT_s2b_ and ftype == PARTICLE) result= current_s2b_potential_gs_;\n    else if (ptype == POT_s2b_ and ftype == RESPONSE) result= current_s2b_potential_ex_;\n    else if (ptype == POT_s2c_ and ftype == PARTICLE) result= current_s2c_potential_gs_;\n    else if (ptype == POT_s2c_ and ftype == RESPONSE) result= current_s2c_potential_ex_;\n    else {\n        MADNESS_EXCEPTION(\"unknown potential in CCIntermediatePotentials::get_potential\", 1);\n    }\n    if (result.empty() and throw_if_empty) {\n        std::string errmsg=\"CCIntermediatePotential was not computed/stored \"+assign_name(ptype) + \" \" +assign_name(ftype);\n        errmsg+=\"\\n --> you might need to iterate the corresponding singles\";\n        print(errmsg);\n        MADNESS_EXCEPTION(errmsg.c_str(),1);\n    }\n\n    if (not result.empty() and parameters.debug()) {\n        World& world=result.front().world();\n        if (parameters.debug()) print_size(world,result, \"potential\");\n    }\n    return result;\n}\n\n\nmadness::vector_real_function_3d\nCCIntermediatePotentials::operator()(const CC_vecfunction& f, const PotentialType& type,\n    const bool throw_if_empty) const {\n    return get_potential(type,f.type,throw_if_empty);\n}\n\nmadness::real_function_3d\nCCIntermediatePotentials::operator()(const CCFunction<double,3>& f, const PotentialType& type,\n    const bool throw_if_empty) const {\n    vector_real_function_3d result=get_potential(type,f.type,throw_if_empty);\n    long iact=f.i-parameters.freeze();  // active index\n    MADNESS_CHECK_THROW(size_t(iact)<result.size(),\"potential not found for active occupied index iact\");\n    return result[iact];\n}\n\nvoid\nCCIntermediatePotentials::insert(const vector_real_function_3d& potential, const CC_vecfunction& f,\n                                 const PotentialType& type) {\n    World& world=potential.front().world();\n    if (world.rank()==0) output(\"Storing potential: \" + assign_name(type) + \" for \" + f.name(0));\n    if (parameters.debug()) {\n        print_size(world, potential, \"potential\");\n    }\n    MADNESS_ASSERT(!potential.empty());\n    if (type == POT_singles_ && (f.type == PARTICLE || f.type == MIXED)) current_singles_potential_gs_ = potential;\n    else if (type == POT_singles_ && f.type == RESPONSE) current_singles_potential_ex_ = potential;\n    else if (type == POT_s2b_ && f.type == PARTICLE) current_s2b_potential_gs_ = potential;\n    else if (type == POT_s2b_ && f.type == RESPONSE) current_s2b_potential_ex_ = potential;\n    else if (type == POT_s2c_ && f.type == PARTICLE) {\n        current_s2c_potential_gs_ = potential;\n    } else if (type == POT_s2c_ && f.type == RESPONSE) {\n        current_s2c_potential_ex_ = potential;\n    }\n}\n\nvoid CCParameters::set_derived_values() {\n    if (not kain()) set_derived_value(\"kain_subspace\",std::size_t(0));\n\n    if (response()==true) set_derived_value(\"excitations\",std::vector<std::size_t>({0}));\n\n    // set all parameters that were not explicitly given\n    set_derived_value(\"tight_thresh_6d\",thresh_6D()*0.1);\n    set_derived_value(\"thresh_3d\",thresh_6D()*0.01);\n    set_derived_value(\"tight_thresh_3d\",thresh_3D()*0.1);\n    set_derived_value(\"thresh_ue\",tight_thresh_6D());\n    set_derived_value(\"dconv_6d\",3.0*thresh_6D());\n    set_derived_value(\"dconv_3d\",0.3*thresh_6D());\n    set_derived_value(\"econv\",0.1*dconv_6D());\n    set_derived_value(\"econv_pairs\",econv());\n\n\n    set_derived_value(\"no_compute_gs\",no_compute());\n    set_derived_value(\"no_compute_mp2\",no_compute() and no_compute_gs());\n    set_derived_value(\"no_compute_cc2\",no_compute() and no_compute_gs());\n    set_derived_value(\"no_compute_cispd\",no_compute() and no_compute_response());\n    set_derived_value(\"no_compute_response\",no_compute());\n    set_derived_value(\"restart\",no_compute() == true and restart() == false);\n\n    if (thresh_3D() < 1.1e-1) set_derived_value(\"output_prec\",std::size_t(3));\n    if (thresh_3D() < 1.1e-2) set_derived_value(\"output_prec\",std::size_t(4));\n    if (thresh_3D() < 1.1e-3) set_derived_value(\"output_prec\",std::size_t(5));\n    if (thresh_3D() < 1.1e-4) set_derived_value(\"output_prec\",std::size_t(6));\n    if (thresh_3D() < 1.1e-5) set_derived_value(\"output_prec\",std::size_t(7));\n    if (thresh_3D() < 1.1e-6) set_derived_value(\"output_prec\",std::size_t(8));\n    std::cout.precision(output_prec());\n}\n\nvoid CCParameters::information(World& world) const {\n    if (world.rank()==0) {\n//        print(\"cc2\",\"end\");\n        if (calc_type() != CT_LRCCS and calc_type() != CT_TDHF) {\n            std::cout << \"The Ansatz for the Pair functions |tau_ij> is: \";\n            if (QtAnsatz()) std::cout << \"(Qt)f12|titj> and response: (Qt)f12(|tixj> + |xitj>) - (OxQt + QtOx)f12|titj>\";\n            else std::cout << \"Qf12|titj> and response: Qf12(|xitj> + |tixj>)\" << std::endl;\n        }\n    }\n}\n\nvoid CCParameters::sanity_check(World& world) const {\n    size_t warnings = 0;\n    if (FunctionDefaults<3>::get_thresh() > 0.01 * FunctionDefaults<6>::get_thresh())\n        warnings += warning(world, \"3D Thresh is too low, should be 0.01*6D_thresh\");\n    if (FunctionDefaults<3>::get_thresh() > 0.1 * FunctionDefaults<6>::get_thresh())\n        warnings += warning(world, \"3D Thresh is way too low, should be 0.01*6D_thresh\");\n    if (FunctionDefaults<3>::get_cell_min_width() != FunctionDefaults<6>::get_cell_min_width())\n        warnings += warning(world, \"3D and 6D Cell sizes differ\");\n    if (FunctionDefaults<3>::get_k() != FunctionDefaults<6>::get_k())\n        warnings += warning(world, \"k-values of 3D and 6D differ \");\n    if (FunctionDefaults<3>::get_truncate_mode() != 3) warnings += warning(world, \"3D Truncate mode is not 3\");\n    if (FunctionDefaults<6>::get_truncate_mode() != 3) warnings += warning(world, \"6D Truncate mode is not 3\");\n    if (dconv_3D() < FunctionDefaults<3>::get_thresh())\n        warnings += warning(world, \"Demanded higher convergence than threshold for 3D\");\n    if (dconv_6D() < FunctionDefaults<6>::get_thresh())\n        warnings += warning(world, \"Demanded higher convergence than threshold for 6D\");\n    if (thresh_3D() != FunctionDefaults<3>::get_thresh())\n        warnings += warning(world, \"3D thresh set unequal 3D thresh demanded\");\n    if (thresh_6D() != FunctionDefaults<6>::get_thresh())\n        warnings += warning(world, \"6D thresh set unequal 6D thresh demanded\");\n    if (econv() < FunctionDefaults<3>::get_thresh())\n        warnings += warning(world, \"Demanded higher energy convergence than threshold for 3D\");\n    if (econv() < FunctionDefaults<6>::get_thresh())\n        warnings += warning(world, \"Demanded higher energy convergence than threshold for 6D\");\n    if (econv() < 0.1 * FunctionDefaults<3>::get_thresh())\n        warnings += warning(world,\n                            \"Demanded higher energy convergence than threshold for 3D (more than factor 10 difference)\");\n    if (econv() < 0.1 * FunctionDefaults<6>::get_thresh())\n        warnings += warning(world,\n                            \"Demanded higher energy convergence than threshold for 6D (more than factor 10 difference)\");\n    // Check if the 6D thresholds are not too high\n    if (thresh_6D() < 1.e-3) warnings += warning(world, \"thresh_6D is smaller than 1.e-3\");\n    if (thresh_6D() < tight_thresh_6D()) warnings += warning(world, \"tight_thresh_6D is larger than thresh_6D\");\n    if (thresh_6D() < tight_thresh_3D()) warnings += warning(world, \"tight_thresh_3D is larger than thresh_3D\");\n    if (thresh_6D() < 1.e-3) warnings += warning(world, \"thresh_6D is smaller than 1.e-3\");\n    if (thresh_Ue() < 1.e-4) warnings += warning(world, \"thresh_Ue is smaller than 1.e-4\");\n    if (thresh_Ue() > 1.e-4) warnings += warning(world, \"thresh_Ue is larger than 1.e-4\");\n    if (thresh_3D() > 0.01 * thresh_6D())\n        warnings += warning(world, \"Demanded 6D thresh is to precise compared with the 3D thresh\");\n    if (thresh_3D() > 0.1 * thresh_6D())\n        warnings += warning(world, \"Demanded 6D thresh is to precise compared with the 3D thresh\");\n    if (kain() and kain_subspace() == 0)\n        warnings += warning(world, \"Demanded Kain solver but the size of the iterative subspace is set to zero\");\n    if (warnings > 0) {\n        if (world.rank() == 0) std::cout << warnings << \"Warnings in parameters sanity check!\\n\\n\";\n    } else {\n        if (world.rank() == 0) std::cout << \"Sanity check for parameters passed\\n\\n\" << std::endl;\n    }\n    if (restart() == false and no_compute() == true) {\n        warnings += warning(world, \"no_compute flag detected but no restart flag\");\n    }\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,NDIM>\nCCConvolutionOperator<T,NDIM>::operator()(const CCFunction<T,NDIM>& bra, const CCFunction<T,NDIM>& ket, const bool use_im) const {\n    Function<T,NDIM> result;\n    if (not use_im) {\n        if (world.rank() == 0)\n            std::cout << \"Recalculating <\" << bra.name() << \"|\" << name() << \"|\" << ket.name()\n                      << \">\\n\";\n        result = ((*op)(bra.function * ket.function)).truncate();\n    } else if (bra.type == HOLE and ket.type == HOLE and not imH.allpairs.empty()) result = imH(bra.i, ket.i);\n    else if (bra.type == HOLE and ket.type == RESPONSE and not imR.allpairs.empty()) result = imR(bra.i, ket.i);\n    else if (bra.type == HOLE and ket.type == PARTICLE and not imP.allpairs.empty()) result = imP(bra.i, ket.i);\n    else if (bra.type == HOLE and ket.type == MIXED and (not imP.allpairs.empty() and not imH.allpairs.empty()))\n        result = (imH(bra.i, ket.i) + imP(bra.i, ket.i));\n    else {\n        //if(world.rank()==0) std::cout <<\"No Intermediate found for <\" << bra.name()<<\"|\"<<assign_name(operator_type) <<\"|\"<<ket.name() <<\"> ... recalculate \\n\";\n        MADNESS_ASSERT(op);\n        result = ((*op)(bra.function * ket.function)).truncate();\n    }\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,2*NDIM> CCConvolutionOperator<T,NDIM>::operator()(const Function<T,2*NDIM>& u, const size_t particle) const {\n    MADNESS_CHECK(particle == 1 or particle == 2);\n    MADNESS_CHECK(op);\n    op->particle() = particle;\n    return (*op)(u);\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,NDIM>\nCCConvolutionOperator<T,NDIM>::operator()(const CCFunction<T,NDIM>& bra, const Function<T,2*NDIM>& u, const size_t particle) const {\n    MADNESS_CHECK(particle == 1 or particle == 2);\n    MADNESS_CHECK(op);\n    const Function<T,2*NDIM> tmp = multiply(copy(u), copy(bra.function), particle);\n    op->particle() = particle;\n    const Function<T,2*NDIM> g_tmp = (*op)(tmp);\n    const Function<T,NDIM> result = g_tmp.dirac_convolution();\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nvoid CCConvolutionOperator<T,NDIM>::update_elements(const CC_vecfunction& bra, const CC_vecfunction& ket) {\n    if constexpr (NDIM==3) {\n        const std::string operation_name = \"<\" + assign_name(bra.type) + \"|\" + name() + \"|\" + assign_name(ket.type) + \">\";\n        if (world.rank() == 0)\n            std::cout << \"updating operator elements: \" << operation_name << \" (\" << bra.size() << \"x\" << ket.size() << \")\"\n                      << std::endl;\n        if (bra.type != HOLE)\n            error(\"Can not create intermediate of type \" + operation_name + \" , bra-element has to be of type HOLE\");\n        op.reset(init_op(type(), parameters));\n        intermediateT<T,NDIM> xim;\n        for (auto tmpk : bra.functions) {\n            const CCFunction<T,NDIM>& k = tmpk.second;\n            for (auto tmpl : ket.functions) {\n                const CCFunction<T,NDIM>& l = tmpl.second;\n                Function<T,NDIM> kl = (bra(k).function * l.function);\n                Function<T,NDIM> result = ((*op)(kl)).truncate();\n                result.reconstruct(); // for sparse multiplication\n                xim.insert(k.i, l.i, result);\n            }\n        }\n        if (ket.type == HOLE) imH = xim;\n        else if (ket.type == PARTICLE) imP = xim;\n        else if (ket.type == RESPONSE) imR = xim;\n        else error(\"Can not create intermediate of type <\" + assign_name(bra.type) + \"|op|\" + assign_name(ket.type) + \">\");\n    } else {\n        std::string msg=\"update_elements not implemented for NDIM=\"+std::to_string(NDIM);\n        MADNESS_EXCEPTION(msg.c_str(),1);\n    }\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nvoid CCConvolutionOperator<T,NDIM>::clear_intermediates(const FuncType& type) {\n    if (world.rank() == 0)\n        std::cout << \"Deleting all <HOLE|\" << name() << \"|\" << assign_name(type) << \"> intermediates \\n\";\n    switch (type) {\n        case HOLE : {\n            imH.allpairs.clear();\n            break;\n        }\n        case PARTICLE: {\n            imP.allpairs.clear();\n            break;\n        }\n        case RESPONSE: {\n            imR.allpairs.clear();\n            break;\n        }\n        default:\n            error(\"intermediates for \" + assign_name(type) + \" are not defined\");\n    }\n}\n\ntemplate<typename T, std::size_t NDIM>\nsize_t CCConvolutionOperator<T,NDIM>::info() const {\n    const size_t size_imH = size_of(imH);\n    const size_t size_imP = size_of(imP);\n    const size_t size_imR = size_of(imR);\n    if (world.rank() == 0) {\n        std::cout << \"Size of \" << name() << \" intermediates:\\n\";\n        std::cout << std::setw(5) << \"(\" << imH.allpairs.size() << \") x <H|\" + name() + \"H>=\" << std::scientific\n                  << std::setprecision(1) << size_imH << \" (Gbyte)\\n\";\n        std::cout << std::setw(5) << \"(\" << imP.allpairs.size() << \") x <H|\" + name() + \"P>=\" << std::scientific\n                  << std::setprecision(1) << size_imH << \" (Gbyte)\\n\";\n        std::cout << std::setw(5) << \"(\" << imR.allpairs.size() << \") x <H|\" + name() + \"R>=\" << std::scientific\n                  << std::setprecision(1) << size_imH << \" (Gbyte)\\n\";\n    }\n    return size_imH + size_imP + size_imR;\n}\n\ntemplate<typename T, std::size_t NDIM>\nSeparatedConvolution<T, NDIM> *\nCCConvolutionOperator<T,NDIM>::init_op(const OpType& type, const CCConvolutionOperator<T,NDIM>::Parameters& parameters) const {\n    bool debug=false;\n    bool printme=(world.rank()==0) and debug;\n    if (printme) print(\"init_op: creating\",type,\"with thresh, lo, gamma\",parameters.thresh_op,parameters.lo,parameters.gamma);\n    return new SeparatedConvolution<T,NDIM>(world,OperatorInfo(parameters.gamma,parameters.lo,parameters.thresh_op,type));\n}\n\n/// Assigns strings to enums for formated output\nstd::string\nassign_name(const CCState& input) {\n    switch (input) {\n        case GROUND_STATE:\n            return \"Ground State\";\n        case EXCITED_STATE:\n            return \"Excited State\";\n        default: {\n            MADNESS_EXCEPTION(\"Unvalid enum assignement!\", 1);\n            return \"undefined\";\n        }\n    }\n    MADNESS_EXCEPTION(\"assign_name:pairtype, should not end up here\", 1);\n    return \"unknown pairtype\";\n}\n\n/// Assigns enum to string\nCalcType\nassign_calctype(const std::string name) {\n    if (name == \"mp2\") return CT_MP2;\n    else if (name == \"cc2\") return CT_CC2;\n    else if (name == \"lrcc2\" or name == \"cc2_response\") return CT_LRCC2;\n    else if (name == \"cispd\") return CT_CISPD;\n    else if (name == \"cis\" or name == \"ccs\" or name == \"ccs_response\" or name == \"lrccs\") return CT_LRCCS;\n    else if (name == \"experimental\") return CT_TEST;\n    else if (name == \"adc2\" or name == \"adc(2)\") return CT_ADC2;\n    else if (name == \"tdhf\") return CT_TDHF;\n    else {\n        std::string msg = \"CALCULATION OF TYPE: \" + name + \" IS NOT KNOWN!!!!\";\n        MADNESS_EXCEPTION(msg.c_str(), 1);\n    }\n}\n\n/// Assigns strings to enums for formated output\nstd::string\nassign_name(const CalcType& inp) {\n    switch (inp) {\n        case CT_CC2:\n            return \"CC2\";\n        case CT_MP2:\n            return \"MP2\";\n        case CT_LRCC2:\n            return \"LRCC2\";\n        case CT_CISPD:\n            return \"CISpD\";\n        case CT_LRCCS:\n            return \"LRCCS\";\n        case CT_ADC2:\n            return \"ADC2\";\n        case CT_TDHF:\n            return \"TDHF\";\n        case CT_TEST:\n            return \"experimental\";\n        default: {\n            MADNESS_EXCEPTION(\"Unvalid enum assignement!\", 1);\n            return \"undefined\";\n        }\n    }\n    return \"unknown\";\n}\n\n/// Assigns strings to enums for formated output\nstd::string\nassign_name(const PotentialType& inp) {\n    switch (inp) {\n        case POT_F3D_:\n            return \"F3D\";\n        case POT_s3a_:\n            return \"s3a\";\n        case POT_s3b_:\n            return \"s3b\";\n        case POT_s3c_:\n            return \"s3c\";\n        case POT_s5a_:\n            return \"s5a\";\n        case POT_s5b_:\n            return \"s5b\";\n        case POT_s5c_:\n            return \"s5c\";\n        case POT_s6_:\n            return \"s6\";\n        case POT_s2b_:\n            return \"s2b\";\n        case POT_s2c_:\n            return \"s2c\";\n        case POT_s4a_:\n            return \"s4a\";\n        case POT_s4b_:\n            return \"s4b\";\n        case POT_s4c_:\n            return \"s4c\";\n        case POT_ccs_:\n            return \"ccs\";\n        case POT_cis_:\n            return \"cis-potential\";\n        case POT_singles_:\n            return \"singles potential\";\n        default: {\n            MADNESS_EXCEPTION(\"Unvalid enum assignement!\", 1);\n            return \"undefined\";\n        }\n    }\n    return \"undefined\";\n}\n\n/// Assigns strings to enums for formated output\nstd::string\nassign_name(const FuncType& inp) {\n    switch (inp) {\n        case HOLE:\n            return \"Hole\";\n        case PARTICLE:\n            return \"Particle\";\n        case MIXED:\n            return \"Mixed\";\n        case RESPONSE:\n            return \"Response\";\n        case UNDEFINED:\n            return \"Undefined\";\n        default: {\n            MADNESS_EXCEPTION(\"Unvalid enum assignement!\", 1);\n            return \"undefined\";\n        }\n    }\n    return \"???\";\n}\n\n/// make a CCPair without the 6d function and some bookkeeping information\nCCPair CCPairBuilder::make_bare_pair(const int i, const int j) const {\n    MADNESS_ASSERT(i>=info.parameters.freeze() && size_t(i) < info.mo_bra.size());\n    MADNESS_ASSERT(j>=info.parameters.freeze() && size_t(j) < info.mo_ket.size());\n\n    CCPair pair(i, j, cc_state(ctype), ctype);\n    pair.bsh_eps=CCPotentials::get_epsilon(i,j,info);\n    if (cc_state(ctype)==EXCITED_STATE) {\n        MADNESS_ASSERT(ex_singles.omega != 0.0);\n        pair.bsh_eps += ex_singles.omega;\n    }\n    return pair;\n}\n\n/// make a CCPair with the given function\nCCPair CCPairBuilder::make_pair(const int i, const int j, const std::vector<CCPairFunction<double,6>>& u) const {\n    CCPair pair=make_bare_pair(i,j);\n    // a lot of logic depends on the first function being the 6d function!\n    if (u.size()>0) MADNESS_CHECK_THROW(u.front().is_pure(),\"missing pure 6d function in CCPairBuilder::make_pair\");\n    pair.functions+=u;\n    return pair;\n}\n\n/// make a CCPair with the 6d function only and some bookkeeping information\nCCPair CCPairBuilder::make_bare_pair_from_file(const int i, const int j) const {\n    CCPair pair=make_bare_pair(i,j);\n\n    // load the 6d function u and the constant part from file\n    std::string name = pair.name();\n    real_function_6d utmp=load_function<double,6>(name, info.parameters.debug());\n    real_function_6d const_part=load_function<double,6>(name + \"_const\", info.parameters.debug());\n\n    // first term is the 6d function u, then follows Q12 f12 |ij>, which is added later\n    if (utmp.is_initialized()) pair.functions+=CCPairFunction<double,6>(utmp);\n    if (const_part.is_initialized()) pair.constant_part = const_part;\n\n    return pair;\n}\n\n\nCCPair CCPairBuilder::complete_pair_with_low_rank_parts(const CCPair& pair) const {\n    CCPair result=pair;\n\n    // a lot of logic depends on the first function being the 6d function!\n//    if (result.functions.size()==0) {\n//        real_function_6d f;\n//        result.functions.push_back(CCPairFunction<double,6>(f));\n//    }\n    MADNESS_CHECK_THROW(result.functions.size()==1,\"missing pure 6d function in CCPairBuilder::complete_pair_with_low_rank_parts\");\n    MADNESS_CHECK_THROW(result.functions.front().is_pure(),\"pure 6d function not pure in CCPairBuilder::complete_pair_with_low_rank_parts\");\n    long nact=info.get_active_mo_bra().size();\n    if (result.ctype==CT_MP2) {\n        // nothing to do\n    } else if (result.ctype==CT_CC2) {\n        MADNESS_CHECK_THROW(gs_singles.size()==size_t(nact),\"missing gs_singles for completing the CC2 pair function\");\n    } else if (result.ctype==CT_LRCC2) {\n        MADNESS_CHECK_THROW(gs_singles.size()==size_t(nact),\"missing gs_singles for completing the LRCC2 pair function\");\n        MADNESS_CHECK_THROW(ex_singles.size()==size_t(nact),\"missing ex_singles for completing the LRCC2 pair function\");\n    } else {\n        print(\"unknown ctype in complete_pair_with_low_rank_parts\",assign_name(result.ctype));\n        MADNESS_EXCEPTION(\"unknown ctype\",1);\n    }\n\n    timer t1(world);\n    auto phi=info.mo_ket;\n    auto phi_bra=info.mo_bra;\n    StrongOrthogonalityProjector<double,3> Q12(world);\n    auto f12=CCConvolutionOperatorPtr<double,3>(world,OT_F12,info.parameters);\n\n    if (result.ctype==CT_MP2) {\n        // ansatz is Q12 f12 |ij>\n        Q12.set_spaces(phi_bra,phi,phi_bra,phi);\n        CCPairFunction<double,6> fij(f12, phi[result.i], phi[result.j]);\n        std::vector<CCPairFunction<double,6>> tmp=Q12(std::vector<CCPairFunction<double,6>>(1,fij));\n        result.functions+=tmp;\n\n    } else if (result.ctype==CT_CC2) {\n        // ansatz is Qt12 f12 |t_i t_j>\n        auto t=CCPotentials::make_full_t_intermediate(gs_singles,info).get_vecfunction();\n        Q12.set_spaces(phi_bra,t,phi_bra,t);\n\n        CCPairFunction<double,6> fij(f12, t[result.i], t[result.j]);\n        std::vector<CCPairFunction<double,6>> tmp=Q12(std::vector<CCPairFunction<double,6>>(1,fij));\n        result.functions+=tmp;\n    } else if (result.ctype==CT_LRCC2) {\n        // ansatz is Qt12 f12 ( |t_i x_j> + |x_i t_j> ) - dQt12 f12 |t_i t_j>\n        result=CCPotentials::make_pair_lrcc2(world,result.ctype,result.function(),gs_singles,ex_singles,result.i,result.j,info, true);\n    } else {\n        MADNESS_EXCEPTION(\"unknown ctype\",1);\n    }\n    t1.tag(\"make low-rank parts in make_pair_cc2 for pair(\"+stringify(result.i)+stringify(result.j)+\")\");\n    return result;\n}\n\nstd::vector<real_function_6d>\n//MacroTaskMp2ConstantPart::operator() (const std::vector<CCPair>& pair, const std::vector<real_function_3d>& mo_ket,\n//                                      const std::vector<real_function_3d>& mo_bra, const CCParameters& parameters,\n//                                      const real_function_3d& Rsquare, const std::vector<real_function_3d>& U1,\n//                                      const std::vector<std::string>& argument) const {\nMacroTaskMp2ConstantPart::operator() (const std::vector<CCPair>& pair, const Info& info,\n                                      const std::vector<std::string>& argument) const {\n    World& world =info.mo_ket[0].world();\n    resultT result = zero_functions_compressed<double, 6>(world, pair.size());\n    for (size_t i = 0; i < pair.size(); i++) {\n        result[i] = CCPotentials::make_constant_part_mp2_macrotask(world, pair[i], info.mo_ket, info.mo_bra,\n                                    info.parameters, info.R_square, info.U1, argument);\n    }\n    return result;\n}\n\nstd::vector<real_function_6d>\nMacroTaskConstantPart::operator() (const std::vector<CCPair>& pair,\n                                   const std::vector<Function<double,3>> & gs_singles,\n                                   const std::vector<Function<double,3>> & ex_singles,\n                                   const Info& info) const {\n\n    World& world =info.mo_ket[0].world();\n    CC_vecfunction singles(gs_singles, PARTICLE, info.parameters.freeze());\n    CC_vecfunction exsingles(ex_singles, RESPONSE, info.parameters.freeze());\n\n\n    resultT result = zero_functions_compressed<double, 6>(world, pair.size());\n    for (size_t i = 0; i < pair.size(); i++) {\n        result[i] = CCPotentials::make_constant_part_macrotask(world, pair[i], singles, exsingles, info);\n    }\n    return result;\n}\n\n\nstd::vector<real_function_6d>\nMacroTaskMp2UpdatePair::operator() (const std::vector<CCPair> &pair,\n                                    const std::vector<real_function_6d> &mp2_coupling,\n                                    const std::vector<madness::Vector<double, 3>> &all_coords_vec,\n                                    const Info& info) const {\n    World& world = info.mo_ket[0].world();\n    resultT result = zero_functions_compressed<double, 6>(world, pair.size());\n    print(\"in MacroTaskMp2UpdatePair::operator()\", \"pair.size()=\", pair.size(), \"batch=\", this->batch);\n\n    for (size_t i = 0; i < pair.size(); i++) {\n        print(\"in loop of batch\",this->batch);\n        //(i, j) -> j*(j+1) + i\n        result[i] = CCPotentials::update_pair_mp2_macrotask(world, pair[i], info.parameters, all_coords_vec, info.mo_ket,\n                                                            info.mo_bra, info.U1, info.U2, mp2_coupling[i]);\n    }\n    return result;\n}\n\nstd::vector<real_function_6d>\nMacroTaskIteratePair::operator()(const std::vector<CCPair>& pair,\n        const std::vector<real_function_6d>& local_coupling,\n        const CC_vecfunction& gs_singles,\n        const CC_vecfunction& ex_singles,\n        const Info& info,\n        const std::size_t& maxiter) const {\n    World& world = info.mo_ket[0].world();\n    resultT result = zero_functions_compressed<double, 6>(world, pair.size());\n\n    for (size_t i = 0; i < pair.size(); i++) {\n        result[i]=  CCPotentials::iterate_pair_macrotask(world, pair[i], gs_singles, ex_singles,\n            local_coupling[i], info, maxiter).function();\n    }\n    return result;\n\n}\n\n/// convenience function\n\n\nstd::tuple<std::vector<real_function_3d>, std::vector<real_function_3d>>\nMacroTaskSinglesPotentialEx::operator()(const std::vector<int>& result_index,\n                                      const CC_vecfunction& singles_gs,\n                                      const std::vector<CCPair>& doubles_gs,\n                                      const CC_vecfunction& singles_ex,\n                                      const std::vector<CCPair>& doubles_ex,\n                                      const int& name,\n                                      const Info& info) {\n    World& world=singles_ex.get_vecfunction().front().world();\n\n    auto triangular_map=PairVectorMap::triangular_map(info.parameters.freeze(),info.mo_ket.size());\n    auto doubles_gs1=Pairs<CCPair>::vector2pairs(doubles_gs,triangular_map);\n    auto doubles_ex1=Pairs<CCPair>::vector2pairs(doubles_ex,triangular_map);\n\n//    // the doubles currently only contain the full 6d function -> complete it with the Q12 f12 |ti tj> part\n//    for (auto& x : doubles_gs1.allpairs) {\n//        auto& tau=x.second;\n//        MADNESS_CHECK_THROW(tau.functions.size()==1,\"doubles in MacroTaskSinglesPotentialsEx should only contain one function\");\n//        bool compute_Q12_F12=(PotentialType(name)==POT_s2b_ or PotentialType(name)==POT_s2c_);\n//        x.second=CCPotentials::make_pair_cc2(world,tau.function(),singles_gs,tau.i,tau.j, info, compute_Q12_F12);\n//    }\n//    // the doubles currently only contain the full 6d function -> complete it with the Q12 f12 |ti tj> part\n//    for (auto& x : doubles_ex1.allpairs) {\n//        auto& tau=x.second;\n//        MADNESS_CHECK_THROW(tau.functions.size()==1,\"doubles in MacroTaskSinglesPotentialsEx should only contain one function\");\n//        x.second=tau=CCPotentials::make_pair_lrcc2(world,tau.ctype,tau.function(),singles_gs,singles_ex,tau.i,tau.j, info, true);\n//    }\n\n    resultT result=CCPotentials::potential_singles_ex(world,\n                result_index,\n                singles_gs,\n                doubles_gs1,\n                singles_ex,\n                doubles_ex1,\n                PotentialType(name),\n                info);\n    // if the second element of the tuple is empty, fill it with empty functions\n    // to that \"insert_batch\" is not confused\n    if (std::get<1>(result).empty()) std::get<1>(result)=zero_functions<double,3>(world,result_index.size());\n    return result;\n}\n\nstd::tuple<std::vector<real_function_3d>, std::vector<real_function_3d>>\nMacroTaskSinglesPotentialGs::operator()(const std::vector<int>& result_index,\n                                      const CC_vecfunction& singles_gs,\n                                      const std::vector<CCPair>& doubles_gs,\n                                      const int& name,\n                                      const Info& info) {\n    World& world=singles_gs.get_vecfunction().front().world();\n    auto triangular_map=PairVectorMap::triangular_map(info.parameters.freeze(),info.mo_ket.size());\n    auto doubles_gs1=Pairs<CCPair>::vector2pairs(doubles_gs,triangular_map);\n\n//    // the doubles currently only contain the full 6d function -> complete it with the Q12 f12 |ti tj> part\n//    for (auto& x : doubles_gs1.allpairs) {\n//        auto& tau=x.second;\n//        MADNESS_CHECK_THROW(tau.functions.size()==1,\"doubles in MacroTaskSinglesPotentialsGS should only contain one function\");\n//        bool compute_Q12_F12=(PotentialType(name)==POT_s2b_ or PotentialType(name)==POT_s2c_);\n//        tau=CCPotentials::make_pair_cc2(world,tau.function(),singles_gs,tau.i,tau.j,info, compute_Q12_F12);\n//    }\n\n    resultT result=CCPotentials::potential_singles_gs(world, result_index,\n                singles_gs, doubles_gs1, PotentialType(name), info);\n\n    // if the second element of the tuple is empty, fill it with empty functions\n    // to that \"insert_batch\" is not confused\n    auto& intermediate=std::get<1>(result);\n    if (intermediate.empty()) intermediate=zero_functions<double,3>(world,result_index.size());\n    // if (intermediate.empty()) intermediate.resize(result_index.size());\n    MADNESS_CHECK_THROW(std::get<0>(result).size()==std::get<1>(result).size(),\"result size mismatch 1 in MacroTaskSinglesPotentialGS\");\n    MADNESS_CHECK_THROW(std::get<0>(result).size()==result_index.size(),\"result size mismatch 2 in MacroTaskSinglesPotentialGS\");\n    return result;\n\n}\n\nstd::vector<ScalarResult<double>>\nMacroTaskComputeCorrelationEnergy::operator()(const std::vector<CCPair>& pairs,\n                                                  const CC_vecfunction& singles_gs,\n                                                  const Info& info) const {\n     World &world = pairs[0].function().world();\n     auto result=scalar_result_vector<double>(world,pairs.size());\n     CalcType ctype=pairs[0].ctype;\n     for (size_t i=0; i<pairs.size(); ++i) {\n         if (ctype==CT_MP2) {\n             // when serialized the Qf12 |ij> part is not stored in the cloud, so recompute it here\n             auto pair=CCPotentials::make_pair_mp2(world,pairs[i].function(),pairs[i].i,pairs[i].j,info, true);\n             result[i]=CCPotentials::compute_pair_correlation_energy(world,pair,singles_gs,info);\n        } else if (ctype==CT_CC2) {\n             auto pair=CCPotentials::make_pair_cc2(world,pairs[i].function(),singles_gs,pairs[i].i,pairs[i].j,info, true);\n             result[i]=CCPotentials::compute_pair_correlation_energy(world,pair,singles_gs,info);\n        } else {\n             MADNESS_EXCEPTION(\"MacroTaskComputeCorrelationEnergy: unknown ctype\",1);\n        }\n     }\n    return result;\n}\n\ntemplate class CCConvolutionOperator<double,3>;\ntemplate class CCConvolutionOperator<double,2>;\ntemplate class CCConvolutionOperator<double,1>;\n\ntemplate class CCFunction<double,3>;\ntemplate class CCFunction<double,2>;\ntemplate class CCFunction<double,1>;\n\n}// end namespace madness\n\n\n"
  },
  {
    "path": "src/madness/chem/CCStructures.h",
    "content": "/*\n * CCStructures.h\n *\n *  Created on: Sep 3, 2015\n *      Author: kottmanj\n */\n\n\n/// File holds all helper structures necessary for the CC_Operator and CC2 class\n#ifndef CCSTRUCTURES_H_\n#define CCSTRUCTURES_H_\n\n#include <madness/mra/mra.h>\n#include<madness/mra/commandlineparser.h>\n#include<madness/chem/ccpairfunction.h>\n#include<madness/chem/CCParameters.h>\n#include <algorithm>\n#include <iomanip>\n#include <iostream>\n#include <madness/mra/macrotaskq.h>\n\n#include \"lowrankfunction.h\"\n\nnamespace madness {\n\n/// Type of Pairs used by CC_Pair2 class\nenum CCState {\n    CCSTATE_UNDEFINED, GROUND_STATE, EXCITED_STATE\n};\n\n/// CC2 Singles Potentials\nenum PotentialType {\n    POT_UNDEFINED,\n    POT_F3D_,\n    POT_s3a_,\n    POT_s3b_,\n    POT_s3c_,\n    POT_s5a_,\n    POT_s5b_,\n    POT_s5c_,\n    POT_s2b_,\n    POT_s2c_,\n    POT_s4a_,\n    POT_s4b_,\n    POT_s4c_,\n    POT_s6_,\n    POT_ccs_,\n    POT_cis_,\n    POT_singles_\n};\n\n/// Assigns strings to enums for formated output\nstd::string\nassign_name(const CCState& input);\n\n/// Assigns enum to string\nCalcType\nassign_calctype(const std::string name);\n\n/// Assigns strings to enums for formated output\nstd::string\nassign_name(const CalcType& inp);\n\n/// Assigns strings to enums for formated output\nstd::string\nassign_name(const PotentialType& inp);\n\n/// Assigns strings to enums for formated output\nstd::string\nassign_name(const FuncType& inp);\n\n/// check memory usage using getrusage\ninline void print_memory_usage(const World& world) {\n    long mem=get_memory_usage();\n    std::string hostname=get_hostname();\n    std::stringstream ss;\n    ss << \"memory usage of process \"<< world.rank()<< \" on \"<< hostname<< \": \"<< mem/1024/1024<<\"MB\";\n    std::string msg=ss.str();\n    auto memusage=world.gop.concat0(std::vector<std::string>(1,msg));\n    std::sort(memusage.begin(),memusage.end());\n    if (world.rank()==0) for (const auto& msg : memusage) print(msg);\n}\n\n// Little structure for formated output and to collect warnings\n// much room to improve\nstruct CCMessenger {\n    CCMessenger(World& world) : world(world), output_prec(10), scientific(true), debug(false), os(std::cout) {}\n\n    World& world;\n    size_t output_prec;\n    bool scientific;\n    bool debug;\n\n    void operator()(const std::string& msg) const { output(msg); }\n\n    void debug_output(const std::string& msg) const {\n        if (debug) output(msg);\n    }\n\n    void\n    output(const std::string& msg) const;\n\n    void\n    section(const std::string& msg) const;\n\n    void\n    subsection(const std::string& msg) const;\n\n    void\n    warning(const std::string& msg) const;\n\n    void print_warnings() const {\n        for (const auto& x:warnings) if (world.rank() == 0) std::cout << x << \"\\n\";\n    }\n\n    template<class T>\n    CCMessenger operator<<(const T& t) const {\n        using madness::operators::operator<<;\n        if (world.rank() == 0) os << t;\n        return *this;\n    }\n\n    /// collect all warnings that occur to print out at the end of the job\n    mutable std::vector<std::string> warnings;\n    /// output stream\n    std::ostream& os;\n};\n\n\n/// Timer Structure\nstruct CCTimer {\n    /// TDA_TIMER constructor\n    /// @param[in] world the world\n    /// @param[in] msg\ta string that contains the desired printout when info function is called\n    CCTimer(World& world, std::string msg) : world(world), start_wall(wall_time()), start_cpu(cpu_time()),\n                                             operation(msg), end_wall(0.0), end_cpu(0.0), time_wall(-1.0),\n                                             time_cpu(-1.0) {}\n\n    World& world;\n    double start_wall;\n    double start_cpu;\n    std::string operation;\n    double end_wall;\n    double end_cpu;\n    double time_wall;\n    double time_cpu;\n\n    void update_time() {\n        time_wall = wall_time() - start_wall;\n        time_cpu = cpu_time() - start_cpu;\n    }\n\npublic:\n    /// print out information about the passed time since the CC_TIMER object was created\n    void\n    info(const bool debug = true, const double norm = 12345.6789);\n\n    CCTimer start() {\n        start_wall = wall_time();\n        start_cpu = cpu_time();\n        return *this;\n    }\n\n    CCTimer stop() {\n        end_wall = wall_time();\n        end_cpu = cpu_time();\n        time_wall = end_wall - start_wall;\n        time_cpu = end_cpu - start_cpu;\n        return *this;\n    }\n\n    double reset() {\n        stop();\n        double wtime=time_wall;\n        start();\n        return wtime;\n    }\n\n\n    double get_wall_time_diff() const { return end_wall; }\n\n    double get_cpu_time_diff() const { return end_cpu; }\n\n    std::pair<double, double> current_time(bool printout = false) {\n        if (time_wall < 0.0 or time_cpu < 0.0) stop();\n        return std::make_pair(time_wall, time_cpu);\n    }\n\n    void print() {\n        print(current_time());\n    }\n\n    void print() const {\n        print(std::make_pair(time_wall, time_cpu));\n    }\n\n    void print(const std::pair<double, double>& times) const {\n        if (world.rank() == 0) {\n            std::cout << std::setfill(' ') << std::scientific << std::setprecision(2)\n                      << \"Timer: \" << times.first << \" (Wall), \" << times.second << \" (CPU)\" << \", (\" + operation + \")\"\n                      << \"\\n\";\n        }\n    }\n};\n\nstruct PairVectorMap {\n\n    std::vector<std::pair<int, int>> map; ///< maps pair index (i,j) to vector index k\n    PairVectorMap() = default;\n    PairVectorMap(const std::vector<std::pair<int, int>> map1) : map(map1) {}\n\n    static PairVectorMap triangular_map(const int nfreeze, const int nocc) {\n        std::vector<std::pair<int, int>> map; ///< maps pair index (i,j) to vector index k\n        for (int i=nfreeze; i<nocc; ++i) {\n            for (int j=i; j<nocc; ++j) {\n                map.push_back(std::make_pair(i,j));\n            }\n        }\n        return PairVectorMap(map);\n    }\n\n    static PairVectorMap quadratic_map(const int nfreeze, const int nocc) {\n        std::vector<std::pair<int, int>> map; ///< maps pair index (i,j) to vector index k\n        for (int i=nfreeze; i<nocc; ++i) {\n            for (int j=nfreeze; j<nocc; ++j) {\n                map.push_back(std::make_pair(i,j));\n            }\n        }\n        return PairVectorMap(map);\n    }\n\n    void print(const std::string msg=\"PairVectorMap\") const {\n        madness::print(msg);\n        madness::print(\"vector element <-> pair index\");\n        for (size_t i=0; i<map.size(); ++i) {\n            madness::print(i, \" <-> \",map[i]);\n        }\n    }\n\n};\n\n/// POD holding all electron pairs with easy access\n/// Similar strucutre than the Pair structure from MP2 but with some additional features (merge at some point)\n/// This structure will also be used for intermediates\ntemplate<typename T>\nstruct Pairs {\n\n    typedef std::map<std::pair<int, int>, T> pairmapT;\n    pairmapT allpairs;\n\n    /// convert Pairs<T> to another type\n\n    /// opT op takes an object of T and returns the result type\n    template<typename R, typename opT>\n    Pairs<R> convert(const Pairs<T> arg, const opT op) const {\n        Pairs<R> result;\n        for (auto& p : arg.allpairs) {\n            int i=p.first.first;\n            int j=p.first.second;\n            result.insert(i,j,op(p.second));\n        }\n        return result;\n    }\n\n    static Pairs vector2pairs(const std::vector<T>& argument, const PairVectorMap map) {\n        Pairs<T> pairs;\n        for (size_t i=0; i<argument.size(); ++i) {\n            pairs.insert(map.map[i].first,map.map[i].second,argument[i]);\n        }\n        return pairs;\n    }\n\n    static std::vector<T> pairs2vector(const Pairs<T>& argument, const PairVectorMap map) {\n        std::vector<T> vector;\n        for (size_t i=0; i<argument.allpairs.size(); ++i) {\n            vector.push_back(argument(map.map[i].first,map.map[i].second));\n        }\n        return vector;\n    }\n\n    /// getter\n    const T& operator()(int i, int j) const {\n        return allpairs.at(std::make_pair(i, j));\n    }\n\n    /// getter\n    // at instead of [] operator bc [] inserts new element if nothing is found while at throws out of range error\n    // back to before\n    T& operator()(int i, int j) {\n        // return allpairs.at(std::make_pair(i, j));\n        return allpairs[std::make_pair(i, j)];\n    }\n\n    /// setter\n    /// can NOT replace elements (for this construct new pair map and swap the content)\n    void insert(int i, int j, const T& pair) {\n        std::pair<int, int> key = std::make_pair(i, j);\n        allpairs.insert(std::make_pair(key, pair));\n    }\n\n    /// swap the contant of the pairmap\n    void swap(Pairs<T>& other) {\n        allpairs.swap(other.allpairs);\n    }\n\n    bool empty() const {\n        if (allpairs.size() == 0) return true;\n        else return false;\n    }\n};\n\n/// f12 and g12 intermediates of the form <f1|op|f2> (with op=f12 or op=g12) will be saved using the pair structure\ntemplate <typename T, std::size_t NDIM>\nusing intermediateT = Pairs<Function<T,NDIM>>;\n\n/// Returns the size of an intermediate\n//double\n//size_of(const intermediateT& im);\n/// Returns the size of an intermediate\ntemplate<typename T, std::size_t NDIM>\ndouble\nsize_of(const intermediateT<T,NDIM>& im) {\n    double size = 0.0;\n    for (const auto& tmp : im.allpairs) {\n        size += get_size<T, NDIM>(tmp.second);\n    }\n    return size;\n}\n\n\n\n// structure for CC Vectorfunction\n/// A helper structure which holds a map of functions\nstruct CC_vecfunction : public archive::ParallelSerializableObject {\n\n    CC_vecfunction() : type(UNDEFINED), omega(0.0), current_error(99.9), delta(0.0) {}\n\n    CC_vecfunction(const FuncType type_) : type(type_), omega(0.0), current_error(99.9), delta(0.0) {}\n\n    CC_vecfunction(const vector_real_function_3d& v) : type(UNDEFINED), omega(0.0), current_error(99.9), delta(0.0) {\n        for (size_t i = 0; i < v.size(); i++) {\n            CCFunction<double,3> tmp(v[i], i, type);\n            functions.insert(std::make_pair(i, tmp));\n        }\n    }\n\n    CC_vecfunction(const std::vector<CCFunction<double,3>>& v) : type(UNDEFINED), omega(0.0), current_error(99.9), delta(0.0) {\n        for (size_t i = 0; i < v.size(); i++) {\n            functions.insert(std::make_pair(v[i].i, v[i]));\n        }\n    }\n\n    CC_vecfunction(const vector_real_function_3d& v, const FuncType& type) : type(type), omega(0.0),\n                                                                             current_error(99.9), delta(0.0) {\n        for (size_t i = 0; i < v.size(); i++) {\n            CCFunction<double,3> tmp(v[i], i, type);\n            functions.insert(std::make_pair(i, tmp));\n        }\n    }\n\n    CC_vecfunction(const vector_real_function_3d& v, const FuncType& type, const size_t& freeze) : type(type),\n                                                                                                   omega(0.0),\n                                                                                                   current_error(99.9),\n                                                                                                   delta(0.0) {\n        for (size_t i = 0; i < v.size(); i++) {\n            CCFunction<double,3> tmp(v[i], freeze + i, type);\n            functions.insert(std::make_pair(freeze + i, tmp));\n        }\n    }\n\n    CC_vecfunction(const std::vector<CCFunction<double,3>>& v, const FuncType type_)\n            : type(type_), omega(0.0), current_error(99.9), delta(0.0) {\n        for (auto x:v) functions.insert(std::make_pair(x.i, x));\n    }\n\n    /// copy ctor (shallow)\n    CC_vecfunction(const CC_vecfunction& other)\n            : functions(other.functions), type(other.type), omega(other.omega),\n              current_error(other.current_error),\n              delta(other.delta), irrep(other.irrep) {\n    }\n\n    /// assignment operator, shallow wrt the functions\n//    CC_vecfunction& operator=(const CC_vecfunction& other) = default;\n    CC_vecfunction& operator=(const CC_vecfunction& other) {\n        if (this == &other) return *this;\n        functions = other.functions;\n        type = other.type;\n        omega = other.omega;\n        current_error = other.current_error;\n        delta = other.delta;\n        irrep = other.irrep;\n        return *this;\n    }\n\n\n    /// returns a deep copy (void shallow copy errors)\n    friend CC_vecfunction\n    copy(const CC_vecfunction& other) {\n        CC_vecfunction tmp=other;\n        tmp.functions.clear();\n        for (const auto& x : other.functions) {\n            tmp.functions.insert(std::make_pair(x.first, copy(x.second)));\n        }\n        return tmp;\n    }\n\n    void reconstruct() const {\n        for (auto& x : functions) x.second.function.reconstruct();\n    }\n\n//madness::CC_vecfunction\n//CC_vecfunction::copy() const {\n//    std::vector<CCFunction<double,3>> vn;\n//    for (auto x : functions) {\n//        const CCFunction<double,3> fn(madness::copy(x.second.function), x.second.i, x.second.type);\n//        vn.push_back(fn);\n//    }\n//    CC_vecfunction result(vn, type);\n//    result.irrep = irrep;\n//    return result;\n//}\n//\n\n    static CC_vecfunction load_restartdata(World& world, std::string filename) {\n        archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, filename.c_str());\n        CC_vecfunction tmp;\n        ar & tmp;\n        return tmp;\n    }\n\n    void save_restartdata(World& world, std::string filename) const {\n        archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, filename.c_str());\n        ar & *this;\n    }\n\n    template<typename Archive>\n    void serialize(const Archive& ar) {\n        typedef std::vector<std::pair<std::size_t, CCFunction<double,3>>> CC_functionvec;\n\n        auto map2vector = [] (const CC_functionmap& map) {\n            return CC_functionvec(map.begin(), map.end());\n        };\n        auto vector2map = [] (const CC_functionvec& vec) {\n            return CC_functionmap(vec.begin(), vec.end());\n        };\n\n        ar & type & omega & current_error & delta & irrep ;\n        if (ar.is_input_archive) {\n\t    std::size_t size=0; // set to zero to silence compiler warning\n            ar & size;\n            CC_functionvec tmp(size);\n\n            for (auto& t : tmp) ar & t.first & t.second;\n            functions=vector2map(tmp);\n        } else if (ar.is_output_archive) {\n            auto tmp=map2vector(functions);\n            ar & tmp.size();\n            for (auto& t : tmp) ar & t.first & t.second;\n        }\n    }\n\n    hashT hash() const {\n        hashT hashval = std::hash<FuncType>{}(type);\n        for (const auto& f : functions) hash_combine(hashval, hash_value(f.second.f().get_impl()->id()));\n\n        return hashval;\n    }\n\n    typedef std::map<std::size_t, CCFunction<double,3>> CC_functionmap;\n    CC_functionmap functions;\n\n    FuncType type;\n    double omega; /// excitation energy\n    double current_error;\n    double delta; // Last difference in Energy\n    std::string irrep = \"null\";    /// excitation irrep (direct product of x function and corresponding orbital)\n\n    std::string\n    name(const int ex) const {\n        return madness::name(type,ex);\n    };\n\n    bool is_converged(const double econv, const double dconv) const {\n        return (current_error<dconv) and (std::fabs(delta)<econv);\n    }\n\n    /// getter\n    const CCFunction<double,3>& operator()(const CCFunction<double,3>& i) const {\n        return functions.find(i.i)->second;\n    }\n\n    /// getter\n    const CCFunction<double,3>& operator()(const size_t& i) const {\n        return functions.find(i)->second;\n    }\n\n    /// getter\n    CCFunction<double,3>& operator()(const CCFunction<double,3>& i) {\n        return functions[i.i];\n    }\n\n    /// getter\n    CCFunction<double,3>& operator()(const size_t& i) {\n        return functions[i];\n    }\n\n    /// setter\n    void insert(const size_t& i, const CCFunction<double,3>& f) {\n        functions.insert(std::make_pair(i, f));\n    }\n\n    /// setter\n    void set_functions(const vector_real_function_3d& v, const FuncType& type, const size_t& freeze) {\n        functions.clear();\n        for (size_t i = 0; i < v.size(); i++) {\n            CCFunction<double,3> tmp(v[i], freeze + i, type);\n            functions.insert(std::make_pair(freeze + i, tmp));\n        }\n    }\n\n    /// Returns all the functions of the map as vector\n    vector_real_function_3d get_vecfunction() const {\n        vector_real_function_3d tmp;\n        for (auto x:functions) tmp.push_back(x.second.function);\n        return tmp;\n    }\n\n    /// Get the size vector (number of functions in the map)\n    size_t size() const {\n        return functions.size();\n    }\n\n    /// Print the memory of which is used by all the functions in the map\n    void\n    print_size(const std::string& msg = \"!?not assigned!?\") const;\n\n    /// scalar multiplication\n    CC_vecfunction operator*(const double& fac) const {\n        vector_real_function_3d vnew = fac * get_vecfunction();\n        const size_t freeze = functions.cbegin()->first;\n        return CC_vecfunction(vnew, type, freeze);\n    }\n\n    /// scaling (inplace)\n    void scale(const double& factor) {\n        for (auto& ktmp:functions) {\n            ktmp.second.function.scale(factor);\n        }\n    }\n\n    /// operator needed for sort operation (sorted by omega values)\n    bool operator<(const CC_vecfunction& b) const { return omega < b.omega; }\n\n    // plotting\n    void plot(const std::string& msg = \"\") const {\n        for (auto& ktmp:functions) {\n            ktmp.second.plot(msg);\n        }\n    }\npublic:\n    NLOHMANN_DEFINE_TYPE_INTRUSIVE(CC_vecfunction, omega, irrep, current_error)\n\n};\n\n/// Helper Structure that carries out operations on CC_functions\n/// The structure can hold intermediates for g12 and f12 of type : <mo_bra_k|op|type> with type=HOLE,PARTICLE or RESPONSE\n/// some 6D operations are also included\n/// The structure does not know if nuclear correlation facors are used, so the corresponding bra states have to be prepared beforehand\ntemplate<typename T=double, std::size_t NDIM=3>\nclass CCConvolutionOperator {\npublic:\n\n    /// parameter class\n    struct Parameters {\n        Parameters() {};\n\n        Parameters(const Parameters& other) :\n                thresh_op(other.thresh_op),\n                lo(other.lo),\n                freeze(other.freeze),\n                gamma(other.gamma) {\n        }\n\n        Parameters(const CCParameters& param) : thresh_op(param.thresh_poisson()), lo(param.lo()),\n                                                freeze(param.freeze()),\n                                                gamma(param.gamma()) {};\n        double thresh_op = FunctionDefaults<3>::get_thresh();\n        double lo = 1.e-6;\n        int freeze = 0;\n        double gamma = 1.0; /// f12 exponent\n\n        template<typename archiveT>\n        void serialize(archiveT& ar) {\n            ar & thresh_op & lo & freeze & gamma;\n        }\n    };\n\n\n    /// @param[in] world\n    /// @param[in] optype: the operatortype (can be g12_ or f12_)\n    /// @param[in] param: the parameters of the current CC-Calculation (including function and operator thresholds and the exponent for f12)\n    CCConvolutionOperator(World& world, const OpType type, Parameters param) : parameters(param), world(world),\n                                                                               op(init_op(type, parameters)) {\n    }\n\n    CCConvolutionOperator(const CCConvolutionOperator& other) = default;\n\n    static inline\n    std::shared_ptr<CCConvolutionOperator> CCConvolutionOperatorPtr(World& world, const OpType type, Parameters param) {\n        return std::shared_ptr<CCConvolutionOperator>(new CCConvolutionOperator(world, type, param));\n    }\n\nprotected:\n\n    friend CCConvolutionOperator combine(const CCConvolutionOperator& a, const CCConvolutionOperator& b) {\n        auto info= SeparatedConvolution<T,NDIM>::combine_OT((*a.get_op()),(*b.get_op()));\n        Parameters param;\n        param.gamma=info.mu;\n        param.thresh_op=info.thresh;\n        param.lo=info.lo;\n        param.freeze=a.parameters.freeze;\n        return CCConvolutionOperator(a.world, info.type, param);\n    }\n\n    friend std::shared_ptr<CCConvolutionOperator> combine(const std::shared_ptr<CCConvolutionOperator>& a,\n                                         const std::shared_ptr<CCConvolutionOperator>& b) {\n        if (a and (not b)) return a;\n        if ((not a) and b) return b;\n        if ((not a) and (not b)) return nullptr;\n        return std::shared_ptr<CCConvolutionOperator>(new CCConvolutionOperator(combine(*a,*b)));\n    }\n\npublic:\n    /// @param[in] f: a 3D function\n    /// @param[out] the convolution op(f), no intermediates are used\n    Function<T,NDIM> operator()(const Function<T,NDIM>& f) const {\n        if (op) return ((*op)(f)).truncate();\n        return f;\n    }\n\n    /// @param[in] bra a CC_vecfunction\n    /// @param[in] ket a CC_function\n    /// @param[out] vector[i] = <bra[i]|op|ket>\n    std::vector<Function<T,NDIM>> operator()(const CC_vecfunction& bra, const CCFunction<T,NDIM>& ket) const {\n        MADNESS_CHECK(op);\n        std::vector<Function<T, NDIM>> result;\n        if constexpr (NDIM == 3) {\n            if (bra.type == HOLE) {\n                for (const auto& ktmp: bra.functions) {\n                    const CCFunction<T, NDIM>& brai = ktmp.second;\n                    const Function<T, NDIM> tmpi = this->operator()(brai, ket);\n                    result.push_back(tmpi);\n                }\n            } else {\n                std::vector<Function<T, NDIM>> tmp = mul(world, ket.function, bra.get_vecfunction());\n                result = apply(world, (*op), tmp);\n                truncate(world, result);\n            }\n        } else {\n            MADNESS_EXCEPTION(\"not implemented\", 1);\n        }\n\n        return result;\n    }\n\n    // @param[in] f: a vector of 3D functions\n    // @param[out] the convolution of op with each function, no intermeditates are used\n    std::vector<Function<T,NDIM>> operator()(const std::vector<Function<T,NDIM>>& f) const {\n        MADNESS_CHECK(op);\n        return apply<T,T,NDIM,NDIM>(world, (*op), f);\n    }\n\n    // @param[in] bra: a 3D CC_function, if nuclear-correlation factors are used they have to be applied before\n    // @param[in] ket: a 3D CC_function,\n    // @param[in] use_im: default is true, if false then no intermediates are used\n    // @param[out] the convolution <bra|op|ket> = op(bra*ket), if intermediates were calculated before the operator uses them\n    Function<T,NDIM> operator()(const CCFunction<T,NDIM>& bra, const CCFunction<T,NDIM>& ket, const bool use_im = true) const;\n\n    // @param[in] u: a 6D-function\n    // @param[out] the convolution \\int g(r,r') u(r,r') dr' (if particle==2) and g(r,r') u(r',r) dr' (if particle==1)\n    // @param[in] particle: specifies on which particle of u the operator will act (particle ==1 or particle==2)\n    Function<T,2*NDIM> operator()(const Function<T,2*NDIM>& u, const size_t particle) const;\n\n    // @param[in] bra: a 3D-CC_function, if nuclear-correlation factors are used they have to be applied before\n    // @param[in] u: a 6D-function\n    // @param[in] particle: specifies on which particle of u the operator will act (particle ==1 or particle==2)\n    // @param[out] the convolution <bra|g12|u>_particle\n    Function<T,NDIM> operator()(const CCFunction<T,NDIM>& bra, const Function<T,2*NDIM>& u, const size_t particle) const;\n\n    /// @param[in] bra: a vector of CC_functions, the type has to be HOLE\n    /// @param[in] ket: a vector of CC_functions, the type can be HOLE,PARTICLE,RESPONSE\n    /// updates intermediates of the type <bra|op|ket>\n    void update_elements(const CC_vecfunction& bra, const CC_vecfunction& ket);\n\n    /// @param[out] prints the name of the operator (convenience) which is g12 or f12 or maybe other things like gf in the future\n    std::string name() const {\n        std::stringstream ss;\n        ss << type();\n        return ss.str();\n    }\n\n    /// @param[in] the type of which intermediates will be deleted\n    /// e.g if(type==HOLE) then all intermediates of type <mo_bra_k|op|HOLE> will be deleted\n    void clear_intermediates(const FuncType& type);\n\n    /// prints out information (operatorname, number of stored intermediates ...)\n    size_t info() const;\n\n    friend hashT hash_value(CCConvolutionOperator<T,NDIM>& op) {\n        hashT h = 0;\n        hash_combine(h, op.parameters.thresh_op);\n        hash_combine(h, op.parameters.lo);\n        hash_combine(h, op.parameters.freeze);\n        hash_combine(h, op.parameters.gamma);\n        hash_combine(h, int(op.type()));\n        return h;\n    }\n\n    /// sanity check .. doens not do so much\n    void sanity() const { print_intermediate(HOLE); }\n\n    /// @param[in] type: the type of intermediates which will be printed, can be HOLE,PARTICLE or RESPONSE\n    void print_intermediate(const FuncType type) const {\n        if (type == HOLE)\n            for (const auto& tmp:imH.allpairs)\n                tmp.second.print_size(\"<H\" + std::to_string(tmp.first.first) + \"|\" + name() + \"|H\" +\n                                      std::to_string(tmp.first.second) + \"> intermediate\");\n        else if (type == PARTICLE)\n            for (const auto& tmp:imP.allpairs)\n                tmp.second.print_size(\"<H\" + std::to_string(tmp.first.first) + \"|\" + name() + \"|P\" +\n                                      std::to_string(tmp.first.second) + \"> intermediate\");\n        else if (type == RESPONSE)\n            for (const auto& tmp:imR.allpairs)\n                tmp.second.print_size(\"<H\" + std::to_string(tmp.first.first) + \"|\" + name() + \"|R\" +\n                                      std::to_string(tmp.first.second) + \"> intermediate\");\n    }\n\n    /// create a TwoElectronFactory with the operatorkernel\n    TwoElectronFactory<T,2*NDIM> get_kernel() const {\n        auto factory=TwoElectronFactory<T,2*NDIM>(world);\n        factory.set_info(op->info);\n        return factory;\n    }\n\n    OpType type() const { return get_op()->info.type; }\n\n    const Parameters parameters;\n\n    std::shared_ptr<SeparatedConvolution<T,NDIM>> get_op() const {return op;};\n\nprivate:\n    /// the world\n    World& world;\n\n    /// @param[in] optype: can be f12_ or g12_ depending on which operator shall be intitialzied\n    /// @param[in] parameters: parameters (thresholds etc)\n    /// initializes the operators\n    SeparatedConvolution<T,NDIM> *init_op(const OpType& type, const Parameters& parameters) const;\n\n    std::shared_ptr<SeparatedConvolution<T,NDIM>> op;\n    intermediateT<T,NDIM> imH;\n    intermediateT<T,NDIM> imP;\n    intermediateT<T,NDIM> imR;\n\n    /// @param[in] msg: output message\n    /// the function will throw an MADNESS_EXCEPTION\n    void error(const std::string& msg) const {\n        if (world.rank() == 0)\n            std::cout << \"\\n\\n!!!!ERROR in CCConvolutionOperator \" << name() << \": \" << msg\n                      << \"!!!!!\\n\\n\" << std::endl;\n        MADNESS_EXCEPTION(msg.c_str(), 1);\n    }\npublic:\n};\n\ntemplate<typename T, std::size_t NDIM>\nstd::shared_ptr<CCConvolutionOperator<T,NDIM>> CCConvolutionOperatorPtr(World& world, const OpType type,\n                                                                       typename CCConvolutionOperator<T,NDIM>::Parameters param) {\n    return std::shared_ptr<CCConvolutionOperator<T,NDIM>>(new CCConvolutionOperator<T,NDIM>(world,type,param));\n}\n\n/// little helper structure which manages the stored singles potentials\nstruct CCIntermediatePotentials {\n    CCIntermediatePotentials() = default;\n    CCIntermediatePotentials(const CCParameters& p) : parameters(p) {};\n    CCIntermediatePotentials(const CCIntermediatePotentials& other) = default;\n    CCIntermediatePotentials& operator=(const CCIntermediatePotentials& other) = default;\n\n    /// check if the intermediate potential exists\n    bool potential_exists(const CC_vecfunction& f, const PotentialType& type) const {\n        return potential_exists(type,f.type);\n    }\n\n    /// check if the intermediate potential exists\n    bool potential_exists(const PotentialType& type,const FuncType& ftype) const {\n        bool exists=get_potential(type,ftype,false).size()>0;\n        return exists;\n    }\n\n    /// return a vector of the intermediate potentials\n\n    /// @param[in] ptype: the potential type (POT_SINGLES, POT_S2B, ..)\n    /// @param[in] ftype: the function type (HOLE, PARTICLE, RESPONSE)\n    vector_real_function_3d\n    get_potential(const PotentialType& ptype, const FuncType& ftype, const bool throw_if_empty) const;\n\n    /// fetches the correct stored potential or throws an exception\n    vector_real_function_3d\n    operator()(const CC_vecfunction& f, const PotentialType& type, const bool throw_if_empty) const;\n\n    /// fetch the potential for a single function\n    Function<double,3>\n    operator()(const CCFunction<double,3>& f, const PotentialType& type, const bool throw_if_empty) const;\n\n    void reconstruct() const {\n        madness::reconstruct(current_s2b_potential_ex_);\n        madness::reconstruct(current_s2b_potential_gs_);\n        madness::reconstruct(current_s2c_potential_ex_);\n        madness::reconstruct(current_s2c_potential_gs_);\n        madness::reconstruct(current_singles_potential_ex_);\n        madness::reconstruct(current_singles_potential_gs_);\n        madness::reconstruct(unprojected_cc2_projector_response_);\n    }\n\n    /// deltes all stored potentials\n    void clear_all() {\n        current_singles_potential_gs_.clear();\n        current_singles_potential_ex_.clear();\n        current_s2b_potential_gs_.clear();\n        current_s2b_potential_ex_.clear();\n        current_s2c_potential_gs_.clear();\n        current_s2c_potential_ex_.clear();\n    }\n\n    /// clears only potentials of the response\n    void clear_response() {\n        current_singles_potential_ex_.clear();\n        current_s2b_potential_ex_.clear();\n        current_s2c_potential_ex_.clear();\n    }\n\n    /// insert potential\n    void\n    insert(const vector_real_function_3d& potential, const CC_vecfunction& f, const PotentialType& type);\n\n    Recordlist<Cloud::keyT> cloud_store(World& world, Cloud& cloud) const {\n        Recordlist<Cloud::keyT> records;\n        records+=cloud.store(world,parameters);\n        records+=cloud.store(world,current_s2b_potential_ex_);\n        records+=cloud.store(world,current_s2b_potential_gs_);\n        records+=cloud.store(world,current_s2c_potential_ex_);\n        records+=cloud.store(world,current_s2c_potential_gs_);\n        records+=cloud.store(world,current_singles_potential_ex_);\n        records+=cloud.store(world,current_singles_potential_gs_);\n        records+=cloud.store(world,unprojected_cc2_projector_response_);\n        return records;\n    }\n\n    void cloud_load(World& world, const Cloud& cloud, Recordlist<Cloud::keyT>& recordlist) {\n        parameters=cloud.forward_load<CCParameters>(world,recordlist);\n        current_s2b_potential_ex_=cloud.forward_load<vector_real_function_3d>(world,recordlist);\n        current_s2b_potential_gs_=cloud.forward_load<vector_real_function_3d>(world,recordlist);\n        current_s2c_potential_ex_=cloud.forward_load<vector_real_function_3d>(world,recordlist);\n        current_s2c_potential_gs_=cloud.forward_load<vector_real_function_3d>(world,recordlist);\n        current_singles_potential_ex_=cloud.forward_load<vector_real_function_3d>(world,recordlist);\n        current_singles_potential_gs_=cloud.forward_load<vector_real_function_3d>(world,recordlist);\n        unprojected_cc2_projector_response_=cloud.forward_load<vector_real_function_3d>(world,recordlist);\n    }\n\n    friend hashT hash_value(const CCIntermediatePotentials& ip) {\n        auto hash_vector_of_functions =[](const vector_real_function_3d& v) {\n            hashT h;\n            for (const auto& f : v) {\n                hash_combine(h, hash_value(f.get_impl()->id()));\n            }\n            return h;\n        };\n        hashT h;\n        hash_combine(h, hash_vector_of_functions(ip.current_s2b_potential_ex_));\n        hash_combine(h, hash_vector_of_functions(ip.current_s2b_potential_gs_));\n        hash_combine(h, hash_vector_of_functions(ip.current_s2c_potential_ex_));\n        hash_combine(h, hash_vector_of_functions(ip.current_s2c_potential_gs_));\n        hash_combine(h, hash_vector_of_functions(ip.current_singles_potential_ex_));\n        hash_combine(h, hash_vector_of_functions(ip.current_singles_potential_gs_));\n        hash_combine(h, hash_vector_of_functions(ip.unprojected_cc2_projector_response_));\n        return h;\n    }\n\n    CCParameters parameters;\nprivate:\n    // World& world;\n    /// whole ground state singles potential without fock-residue\n    vector_real_function_3d current_singles_potential_gs_;\n    /// whole excited state singles potential without fock-residue\n    vector_real_function_3d current_singles_potential_ex_;\n    /// s2b_potential for the pure 6D-part of the ground-state (expensive and constant during singles iterations)\n    vector_real_function_3d current_s2b_potential_gs_;\n    /// s2b_potential for the pure 6D-part of the excited-state (expensive and constant during singles iterations)\n    vector_real_function_3d current_s2b_potential_ex_;\n    /// s2c_potential for the pure 6D-part of the ground-state (expensive and constant during singles iterations)\n    vector_real_function_3d current_s2c_potential_gs_;\n    /// s2c_potential for the pure 6D-part of the excited_state (expensive and constant during singles iterations)\n    vector_real_function_3d current_s2c_potential_ex_;\n    /// unprojected S3c + S5c + S2b + S2c potential of CC2 singles\n    /// for the projector response of the CC2 singles potential\n    vector_real_function_3d unprojected_cc2_projector_response_;\n\n    /// structured output\n    void output(const std::string& msg) const {\n        if (parameters.debug())\n            std::cout << \"Intermediate Potential Manager: \" << msg << \"\\n\";\n    }\n};\n\n/// POD holding some basic functions and some intermediates for the CC2 calculation\n\n/// the class is cloud-serializable and can be used in MacroTasks\nstruct Info {\n    std::vector<Function<double,3>> mo_ket;\n    std::vector<Function<double,3>> mo_bra;\n    std::vector<madness::Vector<double,3>> molecular_coordinates;\n    CCParameters parameters;\n    std::vector<double> orbital_energies;\n    Tensor<double> fock;\n    CCIntermediatePotentials intermediate_potentials;\n    Function<double,3> R_square, U2, R;;\n    std::vector<Function<double,3>> U1;\n\n    vector_real_function_3d get_active_mo_ket() const {\n        vector_real_function_3d result;\n        for (size_t i = parameters.freeze(); i < mo_ket.size(); i++) result.push_back(mo_ket[i]);\n        return result;\n    }\n\n    vector_real_function_3d get_active_mo_bra() const {\n        vector_real_function_3d result;\n        for (size_t i = parameters.freeze(); i < mo_bra.size(); i++) result.push_back(mo_bra[i]);\n        return result;\n    }\n\n    void reconstruct() const {\n        madness::reconstruct(mo_bra);\n        madness::reconstruct(mo_ket);\n        R_square.reconstruct();\n        madness::reconstruct(U1);\n        U2.reconstruct();\n        intermediate_potentials.reconstruct();\n\n    }\n\n    /// customized function to store this to the cloud\n\n    /// functions and constant_part can be very large and we want to split them and store them in different records\n    Recordlist<Cloud::keyT> cloud_store(World& world, Cloud& cloud) const {\n        Recordlist<Cloud::keyT> records;\n        records+=cloud.store(world,mo_bra);\n        records+=cloud.store(world,mo_ket);\n        records+=cloud.store(world,parameters);\n        records+=cloud.store(world,orbital_energies);\n        records+=cloud.store(world,fock);\n        records+=cloud.store(world,intermediate_potentials);\n        records+=cloud.store(world,R_square);\n        records+=cloud.store(world,molecular_coordinates);\n        records+=cloud.store(world,U2);\n        records+=cloud.store(world,U1);\n        return records;\n    }\n\n    /// customized function to load this from the cloud\n\n    /// functions and constant_part can be very large and we want to split them and store them in different records\n    /// @param[inout] recordlist: containing the keys of the member variables -> will be reduced by the keys which are used\n    void cloud_load(World& world, const Cloud& cloud, Recordlist<Cloud::keyT>& recordlist) {\n        // load bookkeeping stuff in a vector\n        mo_bra=cloud.forward_load<std::vector<Function<double,3>>>(world,recordlist);\n        mo_ket=cloud.forward_load<std::vector<Function<double,3>>>(world,recordlist);\n        parameters=cloud.forward_load<CCParameters>(world,recordlist);\n        orbital_energies=cloud.forward_load<std::vector<double>>(world,recordlist);\n        fock=cloud.forward_load<Tensor<double>>(world,recordlist);\n        intermediate_potentials=cloud.forward_load<CCIntermediatePotentials>(world,recordlist);\n        R_square=cloud.forward_load<Function<double,3>>(world,recordlist);\n        molecular_coordinates=cloud.forward_load<std::vector<madness::Vector<double,3>>>(world,recordlist);\n        U2=cloud.forward_load<Function<double,3>>(world,recordlist);\n        U1=cloud.forward_load<std::vector<Function<double,3>>>(world,recordlist);\n    }\n\n};\n\n\nclass CCPair : public archive::ParallelSerializableObject {\npublic:\n    CCPair() = default;\n\n    CCPair(const size_t ii, const size_t jj, const CCState t, const CalcType c)\n    : type(t), ctype(c), i(ii), j(jj), bsh_eps(12345.6789) {};\n\n    CCPair(const size_t ii, const size_t jj, const CCState t, const CalcType c,\n        const std::vector<CCPairFunction<double,6>>& f)\n            : type(t), ctype(c), i(ii), j(jj), functions(f), bsh_eps(12345.6789) {};\n\n    CCPair(const CCPair& other) : type(other.type), ctype(other.ctype), i(other.i), j(other.j),\n                                  functions(other.functions), constant_part(other.constant_part),\n                                  bsh_eps(other.bsh_eps) {};\n\n    CCState type;\n    CalcType ctype;\n    size_t i;\n    size_t j;\n\n    /// customized function to store this to the cloud\n\n    /// functions and constant_part can be very large and we want to split them and store them in different records\n    /// *NOTE* only the 6d function and the constant part are stored in the cloud, not the 3d functions *NOTE*\n    Recordlist<Cloud::keyT> cloud_store(World& world, Cloud& cloud) const {\n        // save bookkeeping stuff in a vector\n        std::vector<unsigned char> v;\n        archive::VectorOutputArchive arout(v);\n        bool function_is_assigned=(functions.size()>0 && functions[0].is_assigned());\n        arout & type & ctype & i & j & bsh_eps & function_is_assigned & constant_part.is_initialized();\n\n        Recordlist<Cloud::keyT> records;\n        records+=cloud.store(world,v);\n        if (function_is_assigned) records+=cloud.store(world,functions[0]);\n        if (constant_part.is_initialized()) records+=cloud.store(world,constant_part);\n        return records;\n   }\n\n    /// customized function to load this from the cloud\n\n    /// functions and constant_part can be very large and we want to split them and store them in different records\n    /// @param[inout] recordlist: containing the keys of the member variables -> will be reduced by the keys which are used\n    void cloud_load(World& world, const Cloud& cloud, Recordlist<Cloud::keyT>& recordlist) {\n        // load bookkeeping stuff in a vector\n        std::vector<unsigned char> v=cloud.forward_load<std::vector<unsigned char>>(world,recordlist);\n        archive::VectorInputArchive arin(v);\n        bool function_is_assigned = false, constant_part_is_initialized=false;\n        arin & type & ctype & i & j & bsh_eps & function_is_assigned & constant_part_is_initialized;\n        functions.clear();\n        constant_part.clear();\n\n        if (function_is_assigned) functions.emplace_back(cloud.forward_load<CCPairFunction<double,6>>(world,recordlist));\n        if (constant_part_is_initialized) constant_part=cloud.forward_load<real_function_6d>(world,recordlist);\n   }\n\n    /// return the world of the function\n    World& world() const {\n        MADNESS_CHECK_THROW(function_exists(), \"no function assigned in CCPair::world()\");\n        return function().world();\n    }\n\n    /// check if the pair has a function assigned\n    bool function_exists() const {\n        return (functions.size()>0 and functions[0].is_assigned() and functions[0].is_pure());\n    }\n\n    /// gives back the pure 6D part of the pair function\n    real_function_6d function() const {\n        MADNESS_CHECK_THROW(not functions.empty(), \"no function assigned in CCPair::function()\");\n        MADNESS_CHECK_THROW(functions[0].is_pure(),\"function is not pure in CCPair::function()\");\n        return functions[0].get_function();\n    }\n\n    /// updates the pure 6D part of the pair function\n    void update_u(const real_function_6d& u) {\n        // print(\"updating u(\",i,j,\")\");\n        CCPairFunction tmp(u);\n        if (functions.size() == 0) functions.push_back(tmp);\n        else { //(functions.size() > 1) {\n            MADNESS_CHECK_THROW(functions[0].is_pure(),\"function is not pure in CCPair::update_u()\");\n            functions[0]=tmp;\n        }\n    }\n\n    template<typename Archive>\n    void serialize(const Archive& ar) {\n        size_t f_size = functions.size();\n        bool fexist = (f_size > 0) && (functions[0].get_function().is_initialized());\n        bool cexist = constant_part.is_initialized();\n        ar & type & ctype & i & j & bsh_eps & fexist & cexist & f_size;\n        if constexpr (Archive::is_input_archive) {\n            if (fexist) {\n                real_function_6d func;\n                ar & func;\n                CCPairFunction f1(func);\n                functions.push_back(f1);\n            }\n        } else {\n            if (fexist) ar & functions[0].get_function();\n        }\n        if (cexist) ar & constant_part;\n    }\n\n    /// reconstruct constant part and all functions\n    void reconstruct() const {\n        constant_part.reconstruct();\n        for (auto& f : functions) {\n            if (f.is_assigned() and f.is_pure()) f.get_function().reconstruct();\n        }\n    }\n\n    bool load_pair(World& world, const bool verbose=false) {\n        std::string fname=this->name();\n        if (verbose and world.rank()==0) print(\"loading pair from file\", fname);\n        bool exists = archive::ParallelInputArchive<archive::BinaryFstreamInputArchive>::exists(world, fname.c_str());\n        if (exists) {\n            archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, fname.c_str(), 1);\n            ar & *this;\n            if (functions[0].get_function().is_initialized()) functions[0].get_function().set_thresh(FunctionDefaults<6>::get_thresh());\n            if (constant_part.is_initialized()) constant_part.set_thresh(FunctionDefaults<6>::get_thresh());\n        }\n        return exists;\n    }\n\n    void store_pair(World& world, const bool verbose=false) {\n        std::string fname =this->name();\n        if (verbose and world.rank()==0) print(\"loading pair from file\", fname);\n        this->reconstruct();\n        archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, fname.c_str(), 1);\n        ar & *this;\n    }\n\n    hashT hash() const {\n        hashT hash_i = std::hash<std::size_t>{}(i);\n        hash_combine(hash_i, std::hash<std::size_t>{}(j));\n        if (constant_part.is_initialized()) {\n            hash_combine(hash_i, hash_value(constant_part.get_impl()->id()));\n        }\n        return hash_i;\n    }\n\n    /// the functions which belong to the pair\n    std::vector<CCPairFunction<double,6>> functions;\n\n    /// the constant part\n    real_function_6d constant_part;\n\n    /// Energy for the BSH Operator\n    /// Ground State: e_i + e_j\n    /// Excited State: e_i + e_j + omega\n    /// default to positive value to make sure this is set somewhere\n    double bsh_eps=1.0;\n\n    /// return the base name like \"MP2_pair_u\" or \"CC2_pair_x\"\n    std::string basename() const {\n        std::string name = \"???\";\n        if (type == GROUND_STATE) name = assign_name(ctype) + \"_pair_u\";\n        if (type == EXCITED_STATE) name = assign_name(ctype) + \"_pair_x\";\n        return name;\n\n    }\n    std::string name() const {\n        return basename() +\"_\" + stringify(i) + stringify(j);\n    }\n\n    void\n    info() const;\n\n};\n\n/// build an MP2 or CC2 or LRCC2 etc pair, possibly including the lo-rank parts\nclass CCPairBuilder {\npublic:\n    CCPairBuilder(World& world, const Info& info) : world(world), info(info) {};\n\n    /// provide ground-state singles, needed for CC2 and LRCC2 wave function ansatz\n    CCPairBuilder& set_gs_singles(const CC_vecfunction& gs) {\n        gs_singles = gs;\n        return *this;\n    }\n\n    /// provide excited state singles, needed for CC2 and LRCC2 wave function ansatz\n    CCPairBuilder& set_ex_singles(const CC_vecfunction& ex) {\n        ex_singles = ex;\n        return *this;\n    }\n\n    CCPairBuilder& set_ctype(const CalcType& type) {\n        ctype = type;\n        return *this;\n    }\n\n    /// make a CCPair without the 6d function and some bookkeeping information\n    CCPair make_bare_pair(const int i, const int j) const;\n\n    /// make a CCPair with the 6d function only and some bookkeeping information\n    CCPair make_bare_pair_from_file(const int i, const int j) const;\n\n    /// make a CCPair\n    CCPair make_pair(const int i, const int j, const std::vector<CCPairFunction<double,6>>& u) const;\n\n    inline static CCState cc_state(const CalcType& type) {\n        if (type==CT_MP2 or type==CT_CC2 or type==CT_MP3) return GROUND_STATE;\n        else if (type==CT_LRCC2 or type==CT_ADC2 or type==CT_CISPD) return EXCITED_STATE;\n        else {\n            MADNESS_EXCEPTION(\"unknown cc-state\",1);\n        }\n    }\n\n    /// make a CCPair with the 6d function only and some bookkeeping information\n    Pairs<CCPair> make_all_bare_pairs() const {\n        Pairs<CCPair> pairs;\n        for (size_t i = info.parameters.freeze(); i < info.mo_bra.size(); i++) {\n            for (size_t j = info.parameters.freeze(); j < info.mo_ket.size(); j++) {\n                pairs.insert(i,j,make_bare_pair(i, j));\n            }\n        }\n        return pairs;\n    }\n\n    /// complete the given pair with the low-rank parts\n\n    /// will use pair's ctype, while builder's ctype is ignored\n    CCPair complete_pair_with_low_rank_parts(const CCPair& pair) const;\n\n\n    /// Function to load a function from disk\n\n    /// @param[in] name of the file in which the function was stored\n    /// @param do_print\n    /// @return the function, possibly not initialized if not found on disk\n    template <typename T, size_t NDIM>\n    Function<T,NDIM> load_function(const std::string name, bool do_print) const {\n        Function<T,NDIM> f;\n        bool exists = archive::ParallelInputArchive<\n            archive::BinaryFstreamInputArchive>::exists(world, name.c_str());\n        if (exists) {\n            if ((world.rank() == 0) and do_print) print(\"loading function\", name);\n            archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, name.c_str());\n            ar & f;\n            if (do_print) f.print_size(name);\n            if (f.is_compressed()) {\n                if (world.rank()==0 and do_print) print(\"function is compressed -- reconstructing\");\n                f.change_tree_state(reconstructed);\n                if (do_print) f.print_size(name+\" reconstructed\");\n                save(f, name);\n            }\n            f.set_thresh(FunctionDefaults<NDIM>::get_thresh());\n            f.truncate();\n            f.print_size(name);\n        } else {\n            if ((world.rank()==0) and do_print) print(\"could not find function\",name);\n        }\n        return f;\n    }\n\n    World& world;\n    const Info& info;\n    CC_vecfunction gs_singles, ex_singles;\n    CalcType ctype=CT_UNDEFINED;\n\n};\n\n\n/// print accumulated size of all functions\nstruct CCSize {\n    double size_local=0;\n\n    CCSize() = default;\n\n    template<typename T, std::size_t NDIM>\n    void add_helper(const std::vector<Function<T,NDIM>>& v) {\n        if (v.size()>0) size_local+=get_size_local(v.front().world(),v);\n    }\n\n    void add_helper(const std::vector<CCPair>& vp) {\n        if (vp.empty()) return;\n        for (const auto& p : vp) {\n            size_local+=get_size(p.constant_part);\n            if (p.function_exists()) size_local+=get_size_local(p.function());\n        }\n    }\n\n    /// variadic template parameters to add the size of all functions and pairs\n    template<typename... Args>\n    void add(const Args&... args) {\n        (add_helper(args), ...);\n    }\n\n    void print(World& world, const std::string msg=\"\") const {\n        double size_global=size_local;\n        world.gop.sum(size_global);\n        if (msg.size()>0 and world.rank()==0) madness::print(msg);\n        world.gop.fence();\n        madness::print(\"size of all functions on rank\",world.rank(),size_local);\n        world.gop.fence();\n        if (world.rank()==0) madness::print(\"total size of all functions\",size_global);\n\n    }\n};\n\n\nclass MacroTaskMp2ConstantPart : public MacroTaskOperationBase {\n\n    class ConstantPartPartitioner : public MacroTaskPartitioner {\n    public:\n        ConstantPartPartitioner() {};\n\n        partitionT do_partitioning(const std::size_t& vsize1, const std::size_t& vsize2,\n                                   const std::string policy) const override {\n            partitionT p;\n            for (size_t i = 0; i < vsize1; i++) {\n                Batch batch(Batch_1D(i,i+1), Batch_1D(i,i+1));\n                p.push_back(std::make_pair(batch,1.0));\n            }\n            return p;\n        }\n    };\n\npublic:\n    MacroTaskMp2ConstantPart(){partitioner.reset(new ConstantPartPartitioner());}\n\n    // typedef std::tuple<const std::vector<CCPair>&, const std::vector<Function<double,3>>&,\n            // const std::vector<Function<double,3>>&, const CCParameters&, const Function<double,3>&,\n            // const std::vector<Function<double,3>>&, const std::vector<std::string>& > argtupleT;\n    typedef std::tuple<const std::vector<CCPair>&, const madness::Info&, const std::vector<std::string>& > argtupleT;\n\n    using resultT = std::vector<real_function_6d>;\n\n    resultT allocator(World& world, const argtupleT& argtuple) const {\n        std::size_t n = std::get<0>(argtuple).size();\n        resultT result = zero_functions_auto_tree_state<double, 6>(world, n);\n        return result;\n    }\n\n//    resultT operator() (const std::vector<CCPair>& pair, const std::vector<Function<double,3>>& mo_ket,\n//                        const std::vector<Function<double,3>>& mo_bra, const CCParameters& parameters,\n//                        const Function<double,3>& Rsquare, const std::vector<Function<double,3>>& U1,\n//                        const std::vector<std::string>& argument) const;\n    resultT operator() (const std::vector<CCPair>& pair, const Info& info, const std::vector<std::string>& argument) const;\n};\n\n/// compute the \"constant\" part of MP2, CC2, or LR-CC2\n///\n/// the constant part is\n/// result = G [F,f] |ij>  for MP2\n/// result = G [F,f] |t_i t_j>  for CC2\n/// result = G [F,f] |t_i x_j> + |x_i t_j>  for LR-CC2\nclass MacroTaskConstantPart : public MacroTaskOperationBase {\n\n    class ConstantPartPartitioner : public MacroTaskPartitioner {\n    public:\n        ConstantPartPartitioner() {};\n\n        partitionT do_partitioning(const std::size_t& vsize1, const std::size_t& vsize2,\n                                   const std::string policy) const override {\n            partitionT p;\n            for (size_t i = 0; i < vsize1; i++) {\n                Batch batch(Batch_1D(i,i+1), Batch_1D(i,i+1));\n                p.push_back(std::make_pair(batch,1.0));\n            }\n            return p;\n        }\n    };\n\npublic:\n    MacroTaskConstantPart()  {\n        partitioner.reset(new ConstantPartPartitioner());\n        name=\"ConstantPart\";\n    }\n\n    // typedef std::tuple<const std::vector<CCPair>&, const std::vector<Function<double,3>>&,\n    // const std::vector<Function<double,3>>&, const CCParameters&, const Function<double,3>&,\n    // const std::vector<Function<double,3>>&, const std::vector<std::string>& > argtupleT;\n    typedef std::tuple<const std::vector<CCPair>&,\n                       const std::vector<Function<double,3>>&, const std::vector<Function<double,3>>&,\n                       const madness::Info&> argtupleT;\n\n    using resultT = std::vector<real_function_6d>;\n\n    resultT allocator(World& world, const argtupleT& argtuple) const {\n        std::size_t n = std::get<0>(argtuple).size();\n        resultT result = zero_functions_auto_tree_state<double, 6>(world, n);\n        return result;\n    }\n    resultT operator() (const std::vector<CCPair>& pair,\n        const std::vector<Function<double,3>>& gs_singles,\n        const std::vector<Function<double,3>>& ex_singles,\n        const Info& info) const;\n};\n\nclass MacroTaskMp2UpdatePair : public MacroTaskOperationBase {\n\n    class UpdatePairPartitioner : public MacroTaskPartitioner {\n    public :\n        UpdatePairPartitioner() {\n            set_dimension(2);\n        }\n\n        partitionT do_partitioning(const std::size_t& vsize1, const std::size_t& vsize2,\n                                   const std::string policy) const override {\n            partitionT p;\n            for (size_t i = 0; i < vsize1; i++) {\n                Batch batch(Batch_1D(i, i+1), Batch_1D(i, i+1), Batch_1D(i,i+1));\n                p.push_back(std::make_pair(batch, 1.0));\n            }\n            return p;\n        }\n    };\npublic:\n    MacroTaskMp2UpdatePair() {\n        partitioner.reset(new UpdatePairPartitioner());\n        name=\"MP2UpdatePair\";\n    }\n\n    // typedef std::tuple<const std::vector<CCPair>&, const std::vector<real_function_6d>&, const CCParameters&,\n                        // const std::vector< madness::Vector<double,3> >&,\n                       // const std::vector<Function<double,3>>&, const std::vector<Function<double,3>>&,\n                       // const std::vector<Function<double,3>>&, const Function<double,3>&> argtupleT;\n    typedef std::tuple<const std::vector<CCPair>&, const std::vector<real_function_6d>&,\n                    const std::vector<madness::Vector<double,3>>&, const Info& > argtupleT;\n\n    using resultT = std::vector<real_function_6d>;\n\n    resultT allocator(World& world, const argtupleT& argtuple) const {\n        std::size_t n = std::get<0>(argtuple).size();\n        resultT result = zero_functions_auto_tree_state<double, 6>(world, n);\n        return result;\n    }\n\n//    resultT operator() (const std::vector<CCPair>& pair, const std::vector<real_function_6d>& mp2_coupling, const CCParameters& parameters,\n//                        const std::vector< madness::Vector<double,3> >& all_coords_vec,\n//                        const std::vector<Function<double,3>>& mo_ket, const std::vector<Function<double,3>>& mo_bra,\n//                        const std::vector<Function<double,3>>& U1, const Function<double,3>& U2) const;\n    resultT operator() (const std::vector<CCPair>& pair, const std::vector<real_function_6d>& mp2_coupling,\n                        const std::vector< madness::Vector<double,3> >& all_coords_vec, const Info& info) const;\n};\n\n\nclass MacroTaskIteratePair : public MacroTaskOperationBase {\n\n    class IteratePairPartitioner : public MacroTaskPartitioner {\n    public :\n        IteratePairPartitioner() = default;\n\n        partitionT do_partitioning(const std::size_t& vsize1, const std::size_t& vsize2,\n                                   const std::string policy) const override {\n            partitionT p;\n            for (size_t i = 0; i < vsize1; i++) {\n                Batch batch(Batch_1D(i, i+1), Batch_1D(i, i+1), Batch_1D(i,i+1));\n                p.push_back(std::make_pair(batch,1.0));\n            }\n            return p;\n        }\n    };\npublic:\n    MacroTaskIteratePair() {\n        partitioner.reset(new IteratePairPartitioner());\n        name=\"IteratePair\";\n    }\n\n    typedef std::tuple<\n        const std::vector<CCPair>&,      // pair\n        const std::vector<real_function_6d>&,   // local coupling\n        const CC_vecfunction&,          // gs singles\n        const CC_vecfunction&,          // ex singles\n        const Info&,\n        const std::size_t&\n        > argtupleT;\n\n    using resultT = std::vector<real_function_6d>;\n\n    resultT allocator(World& world, const argtupleT& argtuple) const {\n        std::size_t n = std::get<0>(argtuple).size();\n        resultT result = zero_functions_auto_tree_state<double, 6>(world, n);\n        return result;\n    }\n\n    /// iterate a given pair of the MP2, CC2 or LRCC2 calculation\n\n    /// will *NOT* compute the local coupling,\n    /// will apply the Fock operators (J-K+V)|pair> and use\n    /// the (excited) singles vectors to update the pair\n    /// @param[in] pair: the pair which will be updated\n    /// @param[in] gs_singles: the ground state singles, may be dummy for MP2\n    /// @param[in] ex_singles: the excited state singles, may be dummy for MP2, CC2\n    /// @param[in] all_coords_vec: the coordinates of the atoms\n    /// @param[in] info: the info structure\n    /// @param[in] maxiter: the maximal number of iterations\n    resultT operator() (const std::vector<CCPair>& pair,\n        const std::vector<real_function_6d>& local_coupling,\n        const CC_vecfunction& gs_singles,\n        const CC_vecfunction& ex_singles,\n        const Info& info,\n        const std::size_t& maxiter) const;\n};\n\n\nclass MacroTaskSinglesPotentialEx : public MacroTaskOperationBase {\npublic:\n    std::string basename=\"SinglesPotentialEx\";\n    MacroTaskSinglesPotentialEx() {\n        name=\"SinglesPotentialEx\";\n        partitioner->max_batch_size=2;\n        partitioner->min_batch_size=2;\n    }\n\n    typedef std::tuple<\n        const std::vector<int>&,    // result_index,\n        const CC_vecfunction&,      // singles_gs,\n        const std::vector<CCPair>&,       // doubles_gs,\n        const CC_vecfunction&,      // singles_ex,\n        const std::vector<CCPair>&,       // doubles_ex,\n        const int&,       // name,\n        const Info&                 // info\n    > argtupleT;\n\n    using resultT = std::tuple<std::vector<real_function_3d>,std::vector<real_function_3d>>;\n\n    resultT allocator(World& world, const argtupleT& argtuple) const {\n        std::size_t n = std::get<0>(argtuple).size();\n        std::vector<real_function_3d> result = zero_functions_auto_tree_state<double, 3>(world, n);\n        std::vector<real_function_3d> intermediate = zero_functions_auto_tree_state<double, 3>(world, n);\n        const_cast<std::string&>(name) =basename+\"_\"+assign_name(PotentialType(std::get<5>(argtuple)));\n        return std::make_tuple(result,intermediate);\n    }\n\n    resultT operator() (const std::vector<int>& result_index,\n                        const CC_vecfunction& singles_gs,\n                        const std::vector<CCPair>& doubles_gs,\n                        const CC_vecfunction& singles_ex,\n                        const std::vector<CCPair>& doubles_ex,\n                        const int& name,\n                        const Info& info);\n};\n\nclass MacroTaskSinglesPotentialGs : public MacroTaskOperationBase {\npublic:\n    std::string basename=\"SinglesPotentialGs\";\n    MacroTaskSinglesPotentialGs() {\n        name=\"SinglesPotentialGs\";\n    }\n\n    typedef std::tuple<\n        const std::vector<int>&,    // result_index,\n        const CC_vecfunction&,      // singles_gs,\n        const std::vector<CCPair>&,       // doubles_gs,\n        const int&,       // name,\n        const Info&                 // info\n    > argtupleT;\n\n    /// first vector is the potential, second is an intermediate (if applicable, e.g. for s2b and s2c potentials)\n    using resultT = std::tuple<std::vector<real_function_3d>,std::vector<real_function_3d>>;\n\n    /// allocate the result and set the name of this task\n    resultT allocator(World& world, const argtupleT& argtuple) const {\n        std::size_t n = std::get<0>(argtuple).size();\n        std::vector<real_function_3d> result = zero_functions_auto_tree_state<double, 3>(world, n);\n        std::vector<real_function_3d> intermediate = zero_functions_auto_tree_state<double, 3>(world, n);\n        const_cast<std::string&>(name) =basename+\"_\"+assign_name(PotentialType(std::get<3>(argtuple)));\n        return std::make_tuple(result,intermediate);\n    }\n\n    resultT operator() (const std::vector<int>& result_index,\n                        const CC_vecfunction& singles_gs,\n                        const std::vector<CCPair>& doubles_gs,\n                        const int& name,\n                        const Info& info);\n};\n\n\nclass MacroTaskComputeCorrelationEnergy : public MacroTaskOperationBase {\npublic:\n    std::string basename=\"CorrelationEnergy\";\n    MacroTaskComputeCorrelationEnergy() {\n        name=\"CorrelationEnergy\";\n    }\n\n    typedef std::tuple<\n        const std::vector<CCPair>&,\n        const CC_vecfunction&,\n        const Info&\n    > argtupleT;\n\n    /// first vector is the potential, second is an intermediate (if applicable, e.g. for s2b and s2c potentials)\n    typedef std::vector<ScalarResult<double>> resultT;\n\n\n    /// allocate the result and set the name of this task\n    resultT allocator(World &world, const argtupleT &argtuple) const {\n        std::size_t n = std::get<0>(argtuple).size();\n        return scalar_result_vector<double>(world,n);\n    }\n\n    resultT operator() (const std::vector<CCPair>& pairs,\n                        const CC_vecfunction& singles_gs,\n                        const Info& info) const;\n};\n\n}//namespace madness\n\n#endif /* CCSTRUCTURES_H_ */\n"
  },
  {
    "path": "src/madness/chem/CMakeLists.txt",
    "content": "# src/apps/chem\n\nadd_definitions(-DMRA_CHEMDATA_DIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\")\n\n# Set the CHEM sources and header files\nset(MADCHEM_HEADERS\n    AC.h\n    atomutil.h\n    basis.h\n    BSHApply.h\n    CalculationParameters.h\n    CC2.h\n    mp3.h\n    ccpairfunction.h\n    CCPotentials.h\n    CCStructures.h\n    CCParameters.h\n    corepotential.h\n    correlationfactor.h\n    diamagneticpotentialfactor.h\n    distpm.h\n    electronic_correlation_factor.h\n    ESInterface.h\n    exchangeoperator.h\n    gaussian.h\n    gth_pseudopotential.h\n    GuessFactory.h\n    IntegratorXX.h\n    localizer.h\n    lowrankfunction.h\n    masks_and_boxes.h\n    molecularbasis.h\n    molecular_functors.h\n    molecular_optimizer.h\n    MolecularOrbitals.h\n    molecule.h\n    molopt.h\n    mp2.h\n    nemo.h\n    NWChem.h\n    oep.h\n    pcm.h\n    PNOF12Potentials.h\n    PNOGuessFunctions.h\n    PNO.h\n    PNOParameters.h\n    PNOStructures.h\n    PNOTensors.h\n    pointgroupoperator.h\n    pointgroupsymmetry.h\n    polynomial.h\n    potentialmanager.h\n    ParameterManager.hpp\n    ResponseParameters.hpp\n    PathManager.hpp\n    MolresponseLib.hpp\n    Applications.hpp\n    Drivers.hpp\n    SCFTargetAdapter.hpp\n    InputWriter.hpp\n    CCLib.hpp\n    MoldftLib.hpp\n    projector.h\n    Results.h\n    QCPropertyInterface.h\n    SAP.h\n    SCF.h\n    SCFOperators.h\n    SCFProtocol.h\n    TDHF.h\n    vibanal.h\n    write_test_input.h\n    xcfunctional.h\n    zcis.h\n    znemo.h\n)\nset(MADCHEM_SOURCES\n    AC.cc\n    atomutil.cc\n    CC2.cc\n    mp3.cc\n    ccpairfunction.cc\n    CCPotentials.cc\n    CCStructures.cc\n    corepotential.cc\n    correlationfactor.cc\n    diamagneticpotentialfactor.cc\n    distpm.cc\n    exchangeoperator.cc\n    gaussian.cc\n    gth_pseudopotential.cc\n    GuessFactory.cc\n    lda.cc\n    localizer.cc\n    molecularbasis.cc\n    MolecularOrbitals.cc\n    molecule.cc\n    mp2.cc\n    nemo.cc\n    NWChem.cc\n    InputWriter.cpp\n    oep.cc\n    pcm.cc\n    pointgroupsymmetry.cc\n    potentialmanager.cc\n    polynomial.cc\n    SAP.cc\n    SCF.cc\n    SCFOperators.cc\n    TDHF.cc\n    vibanal.cc\n    zcis.cc\n    znemo.cc\n    PNO.cpp  PNOF12Potentials.cpp  PNOGuessFunctions.cpp  PNOParameters.cpp  PNOStructures.cpp\n)\nif(TARGET Libxc::xc)\n  list(APPEND MADCHEM_SOURCES xcfunctional_libxc.cc)\nelse()\n  list(APPEND MADCHEM_SOURCES xcfunctional_ldaonly.cc)\nendif()\n\n# Create the MADchem library\nadd_mad_library(chem MADCHEM_SOURCES MADCHEM_HEADERS \"mra\" \"madness/chem/\")\n\n  # N.B. MADchem too flaky for unity builds\n  set_target_properties(MADchem-obj PROPERTIES UNITY_BUILD FALSE)\n\n  set(targetname MADchem)\n\n  # Add dependencies for MADchem\n  target_include_directories(${targetname} PUBLIC\n      $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/apps/>)\n  if (TARGET Libxc::xc)\n    target_link_libraries(${targetname} PUBLIC Libxc::xc)\n  endif ()\n\n  if (PCM_FOUND)\n    target_include_directories(${targetname} PUBLIC ${PCM_INCLUDE_DIRS})\n    target_link_libraries(${targetname} PUBLIC ${PCM_LIBRARIES})\n  endif ()\n\n  if (INTEGRATORXX_FOUND)\n    target_include_directories(${targetname} PUBLIC ${INTEGRATORXX_INCLUDE_DIRS})\n    target_link_libraries(${targetname} PUBLIC ${INTEGRATORXX_LIBRARIES})\n  endif ()\n\n  if (BOOST_FOUND)\n    target_link_libraries(${targetname} PUBLIC Boost::headers)\n  endif ()\n\n# Add executables\nif (NOT MADNESS_BUILD_LIBRARIES_ONLY)\n  add_mad_executable(plotxc \"plotxc.cc;xcfunctional.h\" \"MADchem\")\nendif()\n\n# Install files\ninstall(FILES sto-3g sto-6g 6-31g coredata/mcp coredata/mcp2 coredata/mcp_guess structure_library\n    DESTINATION \"${MADNESS_INSTALL_DATADIR}\"\n    COMPONENT chem)\n\n# Add unit tests    \nif(BUILD_TESTING)\n  \n  SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)\n  # The list of unit test source files\n  set(CHEM_TEST_SOURCES_SHORT test_pointgroupsymmetry.cc test_masks_and_boxes.cc\n  test_qc.cc test_MolecularOrbitals.cc test_BSHApply.cc test_projector.cc)\n  set(CHEM_TEST_SOURCES_LONG test_localizer.cc test_ccpairfunction.cc test_low_rank_function.cc)\n  if (TARGET Libxc::xc)\n    list(APPEND CHEM_TEST_SOURCES_SHORT test_dft.cc )\n    list(APPEND CHEM_TEST_SOURCES_LONG test_SCFOperators.cc)\n  endif(TARGET Libxc::xc)\n  if (INTEGRATORXX_FOUND)\n    list(APPEND CHEM_TEST_SOURCES_SHORT test_IntegratorXX.cc )\n  endif(INTEGRATORXX_FOUND)\n\n  add_unittests(chem \"${CHEM_TEST_SOURCES_SHORT}\" \"MADchem;MADgtest\" \"unittests;short\")\n  add_unittests(chem \"${CHEM_TEST_SOURCES_LONG}\" \"MADchem;MADgtest\" \"unittests;long\")\n\n  # Create other test executables not included in the unit tests ... consider these executables (unlike unit tests)\n  if (NOT MADNESS_BUILD_LIBRARIES_ONLY)\n    set(CHEM_OTHER_TESTS testxc benchmark_exchange_operator)\n    foreach(_test ${CHEM_OTHER_TESTS})\n      add_mad_executable(${_test} \"${_test}.cc\" \"MADchem\")\n    endforeach()\n  endif()\n\nendif()\n"
  },
  {
    "path": "src/madness/chem/CalculationParameters.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n */\n\n/// \\file CalculationParameters\n/// \\brief solution parameters for SCF calculations\n\n\n\n#ifndef MADNESS_CHEM_CALCULATIONPARAMETERS_H__INCLUDED\n#define MADNESS_CHEM_CALCULATIONPARAMETERS_H__INCLUDED\n\n#include<madness/chem/molecule.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/mra/QCCalculationParametersBase.h>\n#include<madness/mra/commandlineparser.h>\n\n\nnamespace madness {\n\nstruct CalculationParameters : public QCCalculationParametersBase {\n  static constexpr char const* tag = \"dft\";\n\n\tCalculationParameters(const CalculationParameters& other) = default;\n\n\tCalculationParameters(World& world, const commandlineparser& parser) : CalculationParameters() {\n\t\tread_input_and_commandline_options(world, parser, \"dft\");\n        // convenience option -- needs to be moved to the MolecularOptimizer class\n        if (parser.key_exists(\"optimize\")) set_user_defined_value(\"gopt\",true);\n\t\tstd::string inputfile=parser.value(\"input\");\n\t\tstd::string prefix=commandlineparser::remove_extension(commandlineparser::base_name(inputfile));\n\t\tif (prefix!=\"input\") set_derived_value(\"prefix\",prefix);\n    }\n\n\t/// ctor reading out the input file\n\tCalculationParameters() {\n\t\tinitialize<std::string>(\"prefix\",\"mad\",\"prefixes your output/restart/json/plot/etc files\");\n\t\tinitialize<double>(\"charge\",0.0,\"total molecular charge\");\n\t\tinitialize<std::string> (\"xc\",\"hf\",\"XC input line\");\n\t\tinitialize<std::string> (\"hfexalg\",\"multiworld_row\",\"hf exchange algorithm\",{\"multiworld\",\"multiworld_row\",\"fetch_compute\",\"smallmem\",\"largemem\"});\n\t\tinitialize<std::vector<std::string>>(\"memory\",{\"storefunction\",\"nodereplicated\",\"distributed\"},\"memory algorithm for storing functions (storing,cloud,target)\");\n\t\tinitialize<double>(\"smear\",0.0,\"smearing parameter\");\n\t\tinitialize<double>(\"econv\",1.e-5,\"energy convergence\");\n\t\tinitialize<double>(\"dconv\",1.e-4,\"density convergence\");\n\t\tinitialize<std::vector<std::string> >(\"convergence_criteria\",{\"bsh_residual\",\"total_energy\"},\"possible values are: bsh_residual, total_energy, each_energy, density\");\n\t\tinitialize<int>   (\"k\",-1,\"polynomial order\");\n\t\tinitialize<double>(\"l\",20,\"user coordinates box size\");\n\t\tinitialize<std::string>(\"deriv\",\"abgv\",\"derivative method\",{\"abgv\",\"bspline\",\"ble\"});\n\t\tinitialize<std::string>(\"dft_deriv\",\"abgv\",\"derivative method for gga potentials\",{\"abgv\",\"bspline\",\"ble\"});\n\t\tinitialize<double>(\"maxrotn\",0.25,\"step restriction used in autoshift algorithm\");\n\t\tinitialize<int>   (\"nvalpha\",0,\"number of alpha virtuals to compute\");\n\t\tinitialize<int>   (\"nvbeta\",0,\"number of beta virtuals to compute\");\n\t\tinitialize<int>   (\"nopen\",0,\"number of unpaired electrons = nalpha-nbeta\");\n\t\tinitialize<int>   (\"maxiter\",25,\"maximum number of iterations\");\n\t\tinitialize<int>   (\"nio\",1,\"no. of io servers to use\");\n\t\tinitialize<bool>  (\"spin_restricted\",true,\"true if spin restricted\");\n\t\tinitialize<int>   (\"plotlo\",0,\"range of MOs to print (for both spins if polarized\");\n\t\tinitialize<int>   (\"plothi\",-1,\"range of MOs to print (for both spins if polarized\");\n\t\tinitialize<bool>  (\"plotdens\",false,\"If true print the density at convergence\");\n\t\tinitialize<bool>  (\"plotcoul\",false,\"If true plot the total coulomb potential at convergence\");\n\t\tinitialize<std::string> (\"localize\",\"new\",\"localization method\",{\"pm\",\"boys\",\"new\",\"canon\"});\n\t\tinitialize<std::string> (\"pointgroup\",\"c1\",\"use point (sub) group symmetry if not localized\",{\"c1\",\"c2\",\"ci\",\"cs\",\"c2v\",\"c2h\",\"d2\",\"d2h\"});\n\t\tinitialize<bool>  (\"restart\",false,\"if true restart from orbitals on disk\");\n\t\tinitialize<bool>  (\"restartao\",false,\"if true restart from orbitals projected into AO basis (STO3G) on disk\");\n\t\tinitialize<bool>  (\"no_compute\",false,\"if true use orbitals on disk, set value to computed\");\n\t\tinitialize<bool>  (\"save\",true,\"if true save orbitals to disk\");\n\t\tinitialize<int>   (\"maxsub\",10,\"size of iterative subspace ... set to 0 or 1 to disable\");\n\t\tinitialize<double> (\"orbitalshift\",0.0,\"scf orbital shift: shift the occ orbitals to lower energies\");\n\t\tinitialize<int>    (\"npt_plot\",101,\"no. of points to use in each dim for plots\");\n//\t\tinitialize<Tensor<double> > (\"plot_cell\",Tensor<double>(),\"lo hi in each dimension for plotting (default is all space)\");\n\t\tinitialize<std::vector<double> > (\"plot_cell\",std::vector<double>(),\"lo hi in each dimension for plotting (default is all space)\");\n\t\tinitialize<std::string> (\"aobasis\",\"6-31g\",\"AO basis used for initial guess (6-31gss, 6-31g, 3-21g, sto-6g, sto-3g)\");\n\t\tinitialize<bool> (\"derivatives\",false,\"if true calculate nuclear derivatives\");\n\t\tinitialize<bool> (\"dipole\",false,\"if true calculate dipole moment\");\n\t\tinitialize<bool> (\"conv_only_dens\",false,\"if true remove bsh_residual from convergence criteria (deprecated)\");\n\t\tinitialize<bool> (\"psp_calc\",false,\"pseudopotential calculation for all atoms\");\n\t\tinitialize<std::string> (\"pcm_data\",\"none\",\"do a PCM (solvent) calculation\");\n\t\tinitialize<std::string> (\"ac_data\",\"none\",\"do a calculation with asymptotic correction (see ACParameters class in chem/AC.h for details)\");\n\t\tinitialize<bool> (\"pure_ae\",true,\"pure all electron calculation with no pseudo-atoms\");\n\t\tinitialize<int>  (\"print_level\",3,\"0: no output; 1: final energy; 2: iterations; 3: timings; 10: debug\");\n\t\tinitialize<std::string>  (\"molecular_structure\",\"inputfile\",\"where to read the molecule from: inputfile or name from the library\");\n\n\t\t// Next list inferred parameters\n\t\tinitialize<int> (\"nalpha\",-1,\"number of alpha spin electrons\");\n\t\tinitialize<int> (\"nbeta\",-1,\"number of beta  spin electrons\");\n\t\tinitialize<int> (\"nmo_alpha\",-1,\"number of alpha spin molecular orbitals\");\n\t\tinitialize<int> (\"nmo_beta\",-1,\"number of beta spin molecular orbitals\");\n\t\tinitialize<double> (\"lo\",1.e-10,\"smallest length scale we need to resolve\");\n\t\tinitialize<std::vector<double> > (\"protocol\",{1.e-4,1.e-6},\"calculation protocol\");\n\n\t\t// geometry optimization parameters\n\t\t// @TODO: need to be moved to molecular optimizer class\n\t\tinitialize<bool> (\"gopt\",false,\"geometry optimizer\");\n\t\tinitialize<double> (\"gtol\",1.e-4,\"geometry tolerance\");\n\t\tinitialize<bool> (\"gtest\",false,\"geometry tolerance\");\n\t\tinitialize<double> (\"gval\",1.e-5,\"value precision\");\n\t\tinitialize<double> (\"gprec\",1.e-4,\"gradient precision\");\n\t\tinitialize<int> (\"gmaxiter\",20,\"optimization maxiter\");\n\t\tinitialize<bool> (\"ginitial_hessian\",false,\"compute inital hessian for optimization\");\n\t\tinitialize<std::string> (\"algopt\",\"bfgs\",\"algorithm used for optimization\",{\"bfgs\",\"cg\"});\n\t\tinitialize<int> (\"nv_factor\",1,\"factor to multiply number of virtual orbitals with when automatically decreasing nvirt\");\n\t\tinitialize<int> (\"vnucextra\",2,\"load balance parameter for nuclear pot\");\n\t\tinitialize<int> (\"loadbalparts\",2,\"??\");\n\n          //Keyword to use nwchem output for initial guess\n          initialize<std::string> (\"nwfile\",\"none\",\"Base name of nwchem output files (.out and .movecs extensions) to read from\");\n\n\t}\n\n\tstd::string get_tag() const override {\n\t\treturn tag;\n\t}\n\n\tpublic:\n\tusing QCCalculationParametersBase::read_input_and_commandline_options;\n\n    std::string prefix() const {return get<std::string>(\"prefix\");}\n\n\tdouble econv() const {return get<double>(\"econv\");}\n\tdouble dconv() const {return get<double>(\"dconv\");}\n\n\tbool converge_density() const {\n\t\tstd::vector<std::string> criteria=get<std::vector<std::string> >(\"convergence_criteria\");\n\t\treturn std::find(criteria.begin(),criteria.end(),\"density\")!=criteria.end();\n\t}\n\tbool converge_bsh_residual() const {\n\t\tstd::vector<std::string> criteria=get<std::vector<std::string> >(\"convergence_criteria\");\n\t\treturn std::find(criteria.begin(),criteria.end(),\"bsh_residual\")!=criteria.end();\n\t}\n\tbool converge_total_energy() const {\n\t\tstd::vector<std::string> criteria=get<std::vector<std::string> >(\"convergence_criteria\");\n\t\treturn std::find(criteria.begin(),criteria.end(),\"total_energy\")!=criteria.end();\n\t}\n\tbool converge_each_energy() const {\n\t\tstd::vector<std::string> criteria=get<std::vector<std::string> >(\"convergence_criteria\");\n\t\treturn std::find(criteria.begin(),criteria.end(),\"each_energy\")!=criteria.end();\n\t}\n\n\tint nopen() const {return get<int>(\"nopen\");}\n\tint nalpha() const {return get<int>(\"nalpha\");}\n\tint nbeta() const {return get<int>(\"nbeta\");}\n\n\tint nvalpha() const {return get<int>(\"nvalpha\");}\n\tint nvbeta() const {return get<int>(\"nvbeta\");}\n\tint nv_factor() const {return get<int>(\"nv_factor\");}\n\n\tint nmo_alpha() const {return get<int>(\"nmo_alpha\");}\n\tint nmo_beta() const {return get<int>(\"nmo_beta\");}\n\n\tbool have_beta() const {return (nbeta()>0) and (not spin_restricted());}\n\n\tbool spin_restricted() const {return get<bool>(\"spin_restricted\");}\n\tbool no_compute() const {return get<bool>(\"no_compute\");}\n\n\tdouble lo() const {return get<double>(\"lo\");}\n\tdouble L() const {return get<double>(\"l\");}\n\tint k() const {return get<int>(\"k\");}\n\n\tstd::string localize_method() const {return get<std::string>(\"localize\");}\n\tbool do_localize() const {return (localize_method()!=\"canon\");}\n\tbool localize_pm() const {return (localize_method()==\"pm\");}\n\n\tstd::string pointgroup() const {return get<std::string>(\"pointgroup\");}\n\tbool do_symmetry() const {return (pointgroup()!=\"c1\");}\n\tdouble charge() const {return get<double>(\"charge\");}\n\tint print_level() const {return get<int>(\"print_level\");}\n\n\tint maxiter() const {return get<int>(\"maxiter\");}\n\tdouble orbitalshift() const {return get<double>(\"orbitalshift\");}\n\n\tstd::string deriv() const {return get<std::string>(\"deriv\");}\n\tstd::string dft_deriv() const {return get<std::string>(\"dft_deriv\");}\n\tstd::string pcm_data() const {return get<std::string>(\"pcm_data\");}\n\tstd::string ac_data() const {return get<std::string>(\"ac_data\");}\n\tstd::string xc() const {return get<std::string>(\"xc\");}\n    std::string hfexalg() const {return get<std::string>(\"hfexalg\");}\n\n\tstd::vector<std::string> memory() const {return get<std::vector<std::string>>(\"memory\");}\n\n\tstd::string aobasis() const {return get<std::string>(\"aobasis\");}\n\n\tstd::vector<double> protocol() const {return get<std::vector<double> >(\"protocol\");}\n\tbool save() const {return get<bool>(\"save\");}\n\tbool restart() const {return get<bool>(\"restart\");}\n\tbool restartao() const {return get<bool>(\"restartao\");}\n\tbool restart_cphf() const {return get<bool>(\"restart_cphf\");}\n\n\tint maxsub() const {return get<int>(\"maxsub\");}\n\tdouble maxrotn() const {return get<double>(\"maxrotn\");}\n\n\tint vnucextra() const {return get<int>(\"vnucextra\");}\n\tint loadbalparts() const {return get<int>(\"loadbalparts\");}\n\n\n\tbool derivatives() const {return get<bool>(\"derivatives\");}\n\tbool dipole() const {return get<bool>(\"dipole\");}\n\n\tbool gopt() const {return get<bool>(\"gopt\");}\n\tstd::string algopt() const {return get<std::string>(\"algopt\");}\n\tint gmaxiter() const {return get<int>(\"gmaxiter\");}\n\tdouble gtol() const {return get<double>(\"gtol\");}\n\tdouble gval() const {return get<double>(\"gval\");}\n\tdouble gprec() const {return get<double>(\"gprec\");}\n\tbool ginitial_hessian() const {return get<bool>(\"ginitial_hessian\");}\n\n     std::string nwfile() const {return get<std::string>(\"nwfile\");}\n\n\tTensor<double> plot_cell() const {\n\t\tstd::vector<double> vcell=get<std::vector<double> >(\"plot_cell\");\n\t\tif (vcell.size()==0) return Tensor<double>();\n\t\tTensor<double> cell(3,2);\n\t\tcell(0,0)=vcell[0];\n\t\tcell(0,1)=vcell[1];\n\t\tcell(1,0)=vcell[2];\n\t\tcell(1,1)=vcell[3];\n\t\tcell(2,0)=vcell[4];\n\t\tcell(2,1)=vcell[5];\n\t\treturn cell;\n\t}\n\n\n\tvoid set_derived_values(const Molecule& molecule) {\n\n        for (size_t iatom = 0; iatom < molecule.natom(); iatom++) {\n            if (molecule.get_pseudo_atom(iatom)){\n                set_derived_value(\"pure_ae\",false);\n                continue;\n            }\n        }\n        set_derived_value(\"aobasis\",molecule.guess_file());;\n        const int n_core = molecule.n_core_orb_all();\n\n\n        std::vector<double> proto=get<std::vector<double> >(\"protocol\");\n\t// No ... The accuracy of computation is INDEPENDENT of the convergence requirement\n\t// --- actually need more precision than convergence threshold in order to have\n\t// variational principle working and for robust convergence\n        //proto.back()=get<double>(\"econv\");\n\tset_derived_value(\"protocol\",proto);\n\t// No ... the energy is variational!  Don't need more accuracy in dconv --- in fact the opposite is true.\n\t// set_derived_value(\"dconv\",sqrt(get<double>(\"econv\"))*0.1);\n\n        double z = molecule.total_nuclear_charge();\n        const double charge=get<double>(\"charge\");\n        int nelec = int(z - charge - n_core*2);\n        if (fabs(nelec+charge+n_core*2-z) > 1e-6) {\n            error(\"non-integer number of electrons?\", nelec+charge+n_core*2-z);\n        }\n\n        set_derived_value(\"nalpha\",(nelec + nopen())/2);\n        set_derived_value(\"nbeta\",(nelec - nopen())/2);\n\n        if (nalpha() < 0) error(\"negative number of alpha electrons?\", nalpha());\n        if (nbeta() < 0) error(\"negative number of beta electrons?\", nbeta());\n        if ((nalpha()+nbeta()) != nelec) error(\"nalpha+nbeta != nelec\", nalpha()+nbeta());\n        if (nalpha() != nbeta()) set_derived_value(\"spin_restricted\",false);\n\n        set_derived_value(\"nmo_alpha\",nalpha() + nvalpha());\n        set_derived_value(\"nmo_beta\",nbeta() + nvbeta());\n\n        // Unless overridden by the user use a cell big enough to\n        // have exp(-sqrt(2*I)*r) decay to 1e-6 with I=1ev=0.037Eh\n        // --> need 50 a.u. either side of the molecule\n        set_derived_value(\"l\",molecule.bounding_cube() + 50.0);\n\n        //set_derived_value(\"lo\",molecule.smallest_length_scale());\n\n        // set highest possible point group for symmetry\n        if (do_localize()) set_derived_value(\"pointgroup\",std::string(\"c1\"));\n        else set_derived_value(\"pointgroup\",molecule.get_pointgroup());\n\n        // above two lines will not override user input, so check input is sane\n        if (do_localize() and do_symmetry()) {\n        \terror(\"\\n\\nsymmetry and localization cannot be used at the same time\\n\"\n        \t\t\t\"switch from local to canonical orbitals (keyword canon)\\n\\n\");\n        }\n\n        //NWChem interface doesn't support geometry optimization\n        if (get<bool>(\"gopt\") && nwfile() != \"none\") error(\"NWchem initialization only supports single point energy calculations.\");\n\n        //NWChem only supports Boys localization (or canonical)\n        if (nwfile() != \"none\") {\n             set_derived_value(\"localize\",std::string(\"boys\"));\n             //Error if user requested something other than Boys\n             if(localize_method() != \"boys\" and localize_method() != \"canon\") error(\"NWchem initialization only supports Boys localization\");\n        }\n\t}\n};\n\n\n} // namespace madness\n\n#endif /* MADNESS_CHEM_CALCULATIONPARAMETERS_H__INCLUDED */\n"
  },
  {
    "path": "src/madness/chem/Drivers.hpp",
    "content": "\n#pragma once\n\n// Workflow.hpp\n// Defines the Driver interface, a generic SinglePointDriver, and the Workflow\n// class\n\n#include <filesystem>\n#include <fstream>\n#include <iomanip>\n#include <madness/external/nlohmann_json/json.hpp>\n#include <memory>\n#include <vector>\n\n#include <madness/chem/Applications.hpp>  // Interface for SCFApplication / ResponseApplication\n#include <madness/chem/SCFTargetAdapter.hpp>  // SCFTarget\n\nnamespace qcapp {\n\n/**\n * @brief Abstract base class for all drivers that encapsulate one or more\n * Applications.\n */\nclass Driver {\n public:\n  virtual ~Driver() = default;\n\n  virtual void print_parameters(World& world) const =0;\n\n  /**\n   * @brief Execute the driver, writing outputs under the given directory.\n   * @param workdir Base directory for this driver's outputs.\n   */\n  virtual void execute(const std::filesystem::path& workdir) = 0;\n\n  /**\n   * @brief Return a JSON summary of results produced by this driver.\n   */\n  [[nodiscard]] virtual nlohmann::json summary() const = 0;\n};\n\n/**\n * @brief Runs a single Application (e.g. SCF or Response) in its own\n * subdirectory.\n */\nclass SinglePointDriver : public Driver {\n public:\n  explicit SinglePointDriver(std::shared_ptr<Application> app) : app_(app) {}\n\n  void print_parameters(World& world) const override {\n    app_->print_parameters(world);\n  }\n\n  void execute(const std::filesystem::path& workdir) override {\n    // Create workdir for this application\n    std::filesystem::create_directories(workdir);\n\n    // Delegate to the Application\n    app_->run(workdir);\n    result_ = app_->results();\n  }\n\n  nlohmann::json summary() const override {\n    return result_;\n  }\n\n private:\n  std::shared_ptr<Application> app_;\n  nlohmann::json result_;\n};\n\nclass OptimizeDriver : public Driver {\n public:\n  OptimizeDriver(World& w,\n                 std::function<std::unique_ptr<Application>(Params)> factory,\n                 Params p)\n      : world_(w), factory_(std::move(factory)), params_(std::move(p)) {}\n\n    void print_parameters(World& world) const override {\n      params_.print_all();\n    }\n\n  void execute(const std::filesystem::path& workdir) override {\n    // 1) make our single \"opt\" folder\n    std::filesystem::create_directories(workdir);\n    PathManager pm(workdir, \"opt\");\n    pm.create();\n\n    // 2) switch into it\n    ScopedCWD guard(pm.dir());\n    if (world_.rank() == 0)\n      std::cout << \"Running geometry optimization in \" << pm.dir() << \"\\n\";\n\n    // 3) build MolOpt from Params\n    auto& op = params_.get<OptimizationParameters>();\n    MolOpt optimizer(op.get_maxiter(), 0.1, op.get_value_precision(),\n                     op.get_geometry_tolerence(), 1e-3, 1e-5,\n                     op.get_gradient_precision(), 1, op.get_algopt());\n    // seed the Hessian\n    optimizer.initialize_hessian(params_.get<Molecule>());\n\n    // 4) build our target adaptor\n    SCFTarget target(world_, factory_, params_);\n\n    // 5) run the optimization\n    auto mol0 = params_.get<Molecule>();\n    auto mol_opt = optimizer.optimize(mol0, target);\n\n    // 6) update params (if you plan further drivers)\n    params_.set(mol_opt);\n\n    // 7) record final results\n    summary_ = {\n        {\"type\", \"optimization\"}, {\"final_energy\", target.last_energy}\n        // you could add geometry, gradient norms, etc.\n    };\n\n    // 8) optionally dump optimized geometry\n    if (world_.rank() == 0) {\n      auto geom_j = mol_opt.to_json();\n      std::ofstream f(\"optimized_geometry.json\");\n      f << std::setw(2) << geom_j << \"\\n\";\n    }\n  }\n\n  nlohmann::json summary() const override { return summary_; }\n\n private:\n  World& world_;\n  std::function<std::unique_ptr<Application>(Params)> factory_;\n  Params params_;\n  nlohmann::json summary_;\n};\n\n/**\n * @brief Orchestrates multiple drivers in sequence and writes a global\n * output.json.\n */\nclass Workflow {\n public:\n  explicit Workflow(World& world) : world_(world) {}\n\n  /**\n   * @brief Add a driver to the workflow.\n   * @param driver Unique pointer to a Driver instance.\n   */\n  void addDriver(std::unique_ptr<Driver> driver) {\n    drivers_.push_back(std::move(driver));\n  }\n\n  void print_parameters(World& world) const {\n      for (const auto& d : drivers_) d->print_parameters(world);\n  }\n\n  /**\n   * @brief Run all added drivers under the top-level directory, then emit\n   * output.json.\n   * @param topDir Root directory for the entire workflow.\n   * @param outputfile Name of the output file to write the aggregated results.\n   */\n  void run(const std::string prefix) {\n    std::filesystem::path topDir=prefix;\n    if (world_.rank() == 0) std::filesystem::create_directories(topDir);\n    world_.gop.fence();\n    nlohmann::json all;\n    all[\"tasks\"] = nlohmann::json::array();\n\n    for (size_t i = 0; i < drivers_.size(); ++i) {\n      auto taskDir = topDir / (\"task_\" + std::to_string(i));\n      drivers_[i]->execute(taskDir);\n      auto current_output= drivers_[i]->summary();\n\n      // write out the current output to a file (only rank 0)\n      if (world_.rank() == 0) {\n        std::ofstream ofs(taskDir / \"output.json\");\n        ofs << std::setw(4) << current_output;\n        ofs.close();\n      }\n      // Ensure all ranks are synchronized after task output write\n      world_.gop.fence();\n\n      /// append current output to all\n      if (current_output.is_array()) {\n        for (const auto& item : current_output) {\n          all[\"tasks\"].push_back(item);\n        }\n      } else {\n        all[\"tasks\"].push_back(current_output);\n      }\n\n      // Write out aggregate results (only rank 0)\n      if (world_.rank() == 0) {\n        std::string outputfile = prefix + \".calc_info.json\";\n        std::ofstream ofs( outputfile);\n        ofs << std::setw(4) << all;\n        ofs.close();\n      }\n      // Ensure all ranks are synchronized after aggregate JSON write\n      world_.gop.fence();\n    }\n\n  }\n\n private:\n  World& world_;\n  std::vector<std::unique_ptr<Driver>> drivers_;\n};\n\n}  // namespace qcapp\n"
  },
  {
    "path": "src/madness/chem/ESInterface.h",
    "content": "/* This file is a part of Slymer, which is distributed under the Creative\n   Commons Attribution-NonCommercial 4.0 International Public License.\n\n   (c) 2017 Stony Brook University. */\n\n/**\n * \\file ESInterface/ESInterface.h\n * \\brief API and helper routines for interfacing with electronic structure codes.\n *\n * Provides a common (abstract) framework for extracting information from\n * external electronic structure calculations.\n */\n\n#ifndef __ESInterface_ESInterface_h__\n#define __ESInterface_ESInterface_h__\n\n#include <madness/mra/mra.h>\n#include <array>\n#include <bitset>\n#include <functional>\n#include <ostream>\n#include <string>\n#include<madness/chem/basis.h>\n\nnamespace slymer {\n\n/// An atom (symbol and position).\nstruct Atom {\n  std::string symbol; ///< The atom's symbol.\n  std::array<double, 3> position; ///< The atom's location, in angstroms.\n};\n\n/// A set of atoms.\nusing Atoms = std::vector<Atom>;\n\nnamespace Properties {\n  /**\n   * \\brief Different properties that can be read from electronic structure codes.\n   *\n   * C-style bitflags via (\\c std::bitset) are used for specifying the properties.\n   *\n   * Some properties might require reading others, and this framework is designed\n   * to facilitate reading multiple properties in one go through the output file(s).\n   */\n  using Properties = std::bitset<5>;\n\n  constexpr Properties None = 0; ///< No properties.\n  constexpr Properties Basis = 1 << 0; ///< The basis set.\n  constexpr Properties Atoms = 1 << 1; ///< The atoms & positions.\n  constexpr Properties Energies = 1 << 2; ///< The MO energies.\n  constexpr Properties MOs = 1 << 3; ///< The MO vector coefficients.\n  constexpr Properties Occupancies = 1 << 4; ///< MO occupancies.\n} // namespace Properties\n\n/// Abstract base class for interfacing with electronic structure codes.\nclass ES_Interface {\nprotected:\n  Properties::Properties my_properties; ///< The properties that have been read.\n  BasisSet my_basis_set; ///< The basis set.\n  Atoms my_atoms; ///< The atoms (symbols and positions, in angstroms).\n  unsigned int my_lineardeps; ///< Number of linear dependencies in the basis\n  madness::Tensor<double> my_energies; ///< Alpha molecular orbital energies \n  madness::Tensor<double> my_MOs; ///< Alpha molecular orbital expansions coefficients. Column is the MO, row is the basis function.\n  madness::Tensor<double> my_occupancies; ///< Alpha molecular orbital occupancies.\n  madness::Tensor<double> my_beta_energies; ///< Beta molecular orbital energies \n  madness::Tensor<double> my_beta_MOs; ///< Beta molecular orbital expansions coefficients. Column is the MO, row is the basis function.\n  madness::Tensor<double> my_beta_occupancies; ///< Beta molecular orbital occupancies.\n \npublic:\n  std::reference_wrapper<std::ostream> err; ///< Output stream for messages.\n  const Properties::Properties &properties; ///< Publically accessible list of read properties.\n  const BasisSet &basis_set; ///< Publicly accessible basis set.\n  const Atoms &atoms; ///< Publically accessible list of atoms.\n  const unsigned int &lineardeps; ///< Publically accessible number of linear dependencies\n  const madness::Tensor<double> &energies; ///< Publically accessible list of alpha MO energies.\n  const madness::Tensor<double> &MOs; ///< Publically accessible alpha MO expansions coefficients. Column is the MO, row is the basis function.\n  const madness::Tensor<double> &occupancies; ///< Publically accessible list of alpha MO occupancies (in eV).\n  const madness::Tensor<double> &beta_energies; ///< Publically accessible list of beta MO energies (in eV).\n  const madness::Tensor<double> &beta_MOs; ///< Publically accessible beta MO expansions coefficients. Column is the MO, row is the basis function.\n  const madness::Tensor<double> &beta_occupancies; ///< Publically accessible list of beta MO occupancies (in eV).\n\n\n  /// No default constructor.\n  ES_Interface() = delete;\n\n  /**\n   * \\brief Move constructor.\n   *\n   * \\param[in] es The existing interface to move.\n   */\n  ES_Interface(ES_Interface &&es)\n    : my_properties{std::move(es.my_properties)}, my_lineardeps{std::move(es.lineardeps)}, my_energies{std::move(es.my_energies)},\n      my_MOs{std::move(es.my_MOs)}, my_occupancies{std::move(es.my_occupancies)},\n      my_beta_energies{std::move(es.my_beta_energies)}, my_beta_MOs{std::move(es.my_beta_MOs)},\n      my_beta_occupancies{std::move(es.my_beta_occupancies)}, err(es.err), properties(my_properties), \n      basis_set(my_basis_set), atoms(my_atoms), lineardeps(my_lineardeps), energies(my_energies), MOs(my_MOs), occupancies(my_occupancies),\n      beta_energies(my_beta_energies), beta_MOs(my_beta_MOs), beta_occupancies(my_beta_occupancies)\n  {}\n\n  /**\n   * \\brief Copy constructor.\n   *\n   * \\param[in] es The existing interface to copy.\n   */\n  ES_Interface(const ES_Interface &es)\n    : my_properties{es.my_properties}, my_lineardeps{es.lineardeps}, my_energies{es.my_energies},\n      my_MOs{es.my_MOs}, my_occupancies{es.my_occupancies}, my_beta_energies{es.my_beta_energies},\n      my_beta_MOs{es.my_beta_MOs}, my_beta_occupancies{es.my_occupancies},\n      err(es.err), properties(my_properties), basis_set(my_basis_set), atoms(my_atoms), lineardeps(my_lineardeps),\n      energies(my_energies), MOs(my_MOs), occupancies(my_occupancies), beta_energies(my_beta_energies),\n      beta_MOs(my_beta_MOs), beta_occupancies(my_beta_occupancies)\n  {}\n\n  /** \n   * \\brief Constructor that sets the error/warning stream and the references.\n   *\n   * \\param[in,out] err_ Output stream for messages. This can be updated later.\n   */\n  ES_Interface(std::ostream &err_)\n    : my_properties{Properties::None}, my_lineardeps(0), my_energies(1), my_MOs(1, 1),\n      my_occupancies(1), my_beta_energies(1), my_beta_MOs(1,1), my_beta_occupancies(1),\n      err(err_), properties(my_properties), basis_set(my_basis_set), atoms(my_atoms), \n      lineardeps(my_lineardeps), energies(my_energies), MOs(my_MOs), occupancies(my_occupancies), \n      beta_energies(my_beta_energies), beta_MOs(my_beta_MOs), beta_occupancies(my_beta_occupancies)\n  {}\n\n  virtual ~ES_Interface() = default;\n\nprotected:\n  /// Reset the interface.\n  void reset() {\n    my_properties = Properties::None;\n    my_basis_set.clear();\n    my_atoms.clear();\n    my_lineardeps = 0;\n    my_energies.reshape(1);\n    my_MOs.reshape(1, 1);\n    my_occupancies.reshape(1);\n    my_beta_energies.reshape(1);\n    my_beta_MOs.reshape(1, 1);\n    my_beta_occupancies.reshape(1);\n  }\n\npublic:\n  /** \n   * \\brief Read the specified properties and store them in the member variables.\n   *\n   * \\param[in] props The properties to be read, using a bit flag combination.\n   */\n  virtual void read(Properties::Properties props) = 0;\n\n};\n\n} // namespace slymer\n\n#endif\n"
  },
  {
    "path": "src/madness/chem/GuessFactory.cc",
    "content": "/*\n * guessfactory.cc\n *\n *  Created on: Sep 27, 2018\n *      Author: kottmanj\n */\n\n#include \"GuessFactory.h\"\n\nnamespace madness {\nnamespace guessfactory{\n\n/// compute the centroid of a function i.e. c[xi]=<f|xi|f>/<f|f> i.e. position expectation value\ncoord_3d compute_centroid(const real_function_3d& f) {\n\tcoord_3d result(0.0);\n\treal_function_3d density = f * f;\n\tconst double integral = density.trace();\n\tfor (size_t x = 0; x < 3; ++x) {\n\t\tconst auto mf = PolynomialFunctor(x);\n\t\treal_function_3d m = real_factory_3d(f.world()).functor(mf);\n\t\tresult[x] = (m * density).trace() / integral;\n\t}\n\treturn result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<coord_3d> compute_centroids(const std::vector<Function<T,NDIM> > & vf){\n\tstd::vector<coord_3d> results(vf.size());\n\tif(vf.empty()) return results;\n\n\tWorld& world=vf.front().world();\n\tconst std::vector<double> denom=norm2s(world,vf);\n\tstd::vector<Tensor<double> >nums(3);\n\tfor (size_t x = 0; x < 3; ++x) {\n\t\tconst auto mf = PolynomialFunctor(x);\n\t\treal_function_3d m = real_factory_3d(world).functor(mf);\n\t\tnums[x]=real(inner(world,vf,m*vf));\n\t}\n\n\t// create correct data structure\n\tfor(size_t i=0;i<vf.size();++i){\n\t\tfor(size_t x=0;x<3;++x){\n\t\t\tresults[i][x]=(nums[x][i]/(denom[i]*denom[i]));\n\t\t}\n\t}\n\n\treturn results;\n}\n\n\n\n/// excite a vector of functions with a specific excitation operator\n/// @param[in/out] vf the function which gets excited, exop*f on return\n/// @param[in] exop_input , the excitation operator defined by a string (see the polynomial_functor class for details)\n/// @return exop*vf i.e. result[i]=exop*vf[i]\nvector_real_function_3d apply_polynomial_exop(vector_real_function_3d& vf, const std::string& exop_input, std::vector<coord_3d> centers, const bool& fence) {\n\tif (vf.empty())\n\t\treturn vf;\n\n\t//recompute centers if necessary\n\tif (centers.empty())\n\t\tcenters = compute_centroids(vf);\n\n\tExopUnaryOpStructure exop(std::make_shared<PolynomialFunctor>(PolynomialFunctor(exop_input)));\n\tfor (auto& f : vf) {\n\t\tf.unaryop(exop, false);\n\t}\n\tif (fence)\n\t\tvf.front().world().gop.fence();\n\n\treturn vf;\n}\n\n/// convenience wrapper\nreal_function_3d apply_polynomial_exop(real_function_3d& f, const std::string& exop_input, coord_3d center, const bool& fence) {\n\tvector_real_function_3d vf(1, f);\n\tstd::vector<coord_3d> centers(1, center);\n\treturn apply_polynomial_exop(vf, exop_input, centers, fence).front();\n}\n\n///// excite a vector of functions with a specific excitation operator\n///// @param[in/out] vf the function which gets excited, exop*f on return\n///// @param[in] exop_input, the excitation operator defined by a string (see the polynomial_functor class for details)\n///// @param[in] the centers of the vf functions, if none were given they are recomputed\n///// @return exop*vf i.e. result[i]=exop*vf[i]\n//template<typename T, std::size_t NDIM>\n//std::vector<Function<T,NDIM> > apply_trigonometric_exop(std::vector<Function<T,NDIM> >& vf,\n//\t\tconst std::string& exop_input, std::vector<coord_3d> centers, const bool& fence) {\n//\tif (vf.empty())\n//\t\treturn vf;\n//\n//\t//recompute centers if necessary\n//\tif (centers.empty())\n//\t\tcenters = compute_centroids(vf);\n//\n//\tExopUnaryOpStructure exop(std::make_shared<PolynomialTrigonometricsFunctor>(PolynomialTrigonometricsFunctor(exop_input)));\n//\tfor (auto& f : vf) {\n//\t\tf.unaryop(exop, false);\n//\t}\n//\tif (fence)\n//\t\tvf.front().world().gop.fence();\n//\n//\treturn vf;\n//}\n//\n///// convenience wrapper\n//template<typename T, std::size_t NDIM>\n//Function<T,NDIM> apply_trigonometric_exop(Function<T,NDIM>& f, const std::string& exop_input, coord_3d center, const bool& fence) {\n//\tstd::vector<Function<T,NDIM> > vf(1, f);\n//\tstd::vector<coord_3d> centers(1, center);\n//\treturn apply_trigonometric_exop(vf, exop_input, centers, fence).front();\n//}\n\nvoid PolynomialFunctor::test() {\n\tstd::cout << \"Test polynomial functor \" << \"\\n input string is \" << input_string_ << std::endl;\n\tfor(const auto& mono : data_){\n\t\tfor(const auto entry : mono){\n\t\t\tstd::cout << entry << \",\";\n\t\t}\n\t\tstd::cout << \"\\n\";\n\t}\n}\n\nvoid ExopUnaryOpStructure::operator ()(const Key<3>& key, Tensor<double>& t) const {\n\tTensor<double> exop(t.ndim(), t.dims());\n\tconst Tensor<double>& qp = cdata.quad_x;\n\tfcube(key, (*exfunc), qp, exop);\n\tt.emul(exop);\n}\n\nvoid ExopUnaryOpStructure::operator ()(const Key<3>& key, Tensor<double_complex>& t) const {\n\tTensor<double> exop(t.ndim(), t.dims());\n\tconst Tensor<double>& qp = cdata.quad_x;\n\tfcube(key, (*exfunc), qp, exop);\n\tt.emul(exop);\n}\n\ndouble PolynomialFunctor::operator ()(const coord_3d& rr) const {\n\tcoord_3d r;\n\tr[0] = rr[0] - center[0];\n\tr[1] = rr[1] - center[1];\n\tr[2] = rr[2] - center[2];\n\treturn dampf(r) * compute_value(r);\n}\n\n\n\ndouble PolynomialFunctor::compute_value(const coord_3d& r) const {\n\tdouble result = 0.0;\n\tfor (size_t i = 0; i < data_.size(); i++) {\n\t\tif (data_[i].size() != 4) MADNESS_EXCEPTION(\"ERROR in polynomial exop functor, data is faulty\", 1);\n\t\tresult += (data_[i][3] * pow(r[0], data_[i][0]) * pow(r[1], data_[i][1]) * pow(r[2], data_[i][2]));\n\t}\n\n\treturn result;\n}\n\nstd::vector<std::vector<double> > PolynomialFunctor::read_string(const std::string string) const\n{\n\tstd::stringstream line(string);\n\tstd::string name;\n\tsize_t counter = 0;\n\tstd::vector<double> current_data = vector_factory(0.0, 0.0, 0.0, 1.0);\n\tstd::vector<std::vector<double> > read_data;\n\twhile (line >> name) {\n\t\tif (name == \"c\")\n\t\tline >> current_data[3];\n\t\telse\n\t\tif (name == \"x\")\n\t\tline >> current_data[0];\n\t\telse\n\t\tif (name == \"y\")\n\t\tline >> current_data[1];\n\t\telse\n\t\tif (name == \"z\")\n\t\tline >> current_data[2];\n\t\telse\n\t\tif (name == \",\") {\n\t\t\tcounter++;\n\t\t\tread_data.push_back(current_data);\n\t\t\tcurrent_data = vector_factory(0.0, 0.0, 0.0, 1.0);\n\t\t}\n\t}\n\t// dont forget the last read polynomial\n\tread_data.push_back(current_data);\n\treturn read_data;\n}\n\ndouble PolynomialTrigonometricsFunctor::compute_value(const coord_3d& r) const {\n       double result = 0.0;\n       for (size_t i = 0; i < data_.size(); i++) {\n       \tif (data_[i].size() != 4) MADNESS_EXCEPTION(\"ERROR in polynomial exop functor, data is faulty\", 1);\n       \tresult += (data_[i][3] * pow(sin(r[0]), data_[i][0]) * pow(sin(r[1]), data_[i][1]) * pow(sin(r[2]), data_[i][2]));\n       }\n       throw \"CONTROL REACHES END OF NON-VOID FUNCTION JUST GUESSING THAT RESULT IS SUPPOSED TO BE RETURNED!\";\n       return result; \n}\n\ndouble GaussFunctor::operator ()(const coord_3d& rr) const {\n\tcoord_3d r;\n\tr[0] = rr[0] - center[0];\n\tr[1] = rr[1] - center[1];\n\tr[2] = rr[2] - center[2];\n\tif (width_ <= 0.0)\n\t\treturn 1.0;\n\telse {\n\t\tconst double prefactor = 0.06349363593424097 / (width_ * width_ * width_);\n\t\tconst double exponent = 0.5 / (width_ * width_);\n\t\treturn prefactor * exp(-exponent * (r[0] * r[0] + r[1] * r[1] + r[2] * r[2]));\n\t}\n\treturn 1.0;\n}\n\ndouble PlaneWaveFunctor::operator ()(const coord_3d& r) const {\n    //SPLITCOORD(x, y, z, r);\n\tdouble result = 1.0;\n\tfor (int i = 0; i < 3; ++i) {\n\t\tresult = result * (*this)(r[i], i);\n\t}\n\treturn result;\n}\n\ndouble PlaneWaveFunctor::operator ()(const double& x, const int& dim) const {\n\tconst double argument = (2.0 * n[dim]) * M_PI / L[dim];\n\tif (cosinus[dim]) {\n\t\treturn cos(argument * x);\n\t} else {\n\t\treturn sin(argument * x);\n\t}\n}\n\nstd::string PlaneWaveFunctor::name(const bool& compact) const {\n\tstd::string result = \"\";\n\tfor (size_t i = 0; i < 3; ++i) {\n\t\tif (compact && n[i] > 0) {\n\t\t\tif (cosinus[i])\n\t\t\t\tresult += \"c_\" + std::to_string(n[i]) + \"_\";\n\t\t\telse\n\t\t\t\tresult += \"s_\" + std::to_string(n[i]) + \"_\";\n\t\t} else if (n[i] > 0) {\n\t\t\tif (cosinus[i])\n\t\t\t\tresult += \"cos(n=\" + std::to_string(n[i]) + \" l=\" + std::to_string(L[i]) + \")\";\n\t\t\telse\n\t\t\t\tresult += \"sin(n=\" + std::to_string(n[i]) + \" l=\" + std::to_string(L[i]) + \")\";\n\t\t} else\n\t\t\tresult += \"0\";\n\t}\n\treturn result;\n}\n\n/// Makes an excitation operator string based on predefined keywords\nstd::vector<std::string>make_predefined_exop_strings(const std::string what){\n\tstd::vector<std::string> exop_strings;\n\tif (what == \"dipole\") {\n\t\texop_strings.resize(3);\n\t\texop_strings[0] = \"x 1.0\";\n\t\texop_strings[1] = \"y 1.0\";\n\t\texop_strings[2] = \"z 1.0\";\n\t} else if (what == \"x\") {\n\t\texop_strings.resize(1);\n\t\texop_strings[0] = \"x 1.0\";\n\t} else if (what == \"y\") {\n\t\texop_strings.resize(1);\n\t\texop_strings[0] = \"y 1.0\";\n\t} else if (what == \"z\") {\n\t\texop_strings.resize(1);\n\t\texop_strings[0] = \"z 1.0\";\n\t} else if (what == \"r2\") {\n\t\texop_strings.resize(1);\n\t\texop_strings[0] = \"x 2.0 , y 2.0 , z 2.0\";\n\t} else if (what == \"quadrupole\") {\n\t\texop_strings.resize(9);\n\t\texop_strings[0] = \"x 1.0\";\n\t\texop_strings[1] = \"y 1.0\";\n\t\texop_strings[2] = \"z 1.0\";\n\t\texop_strings[3] = \"x 2.0\";\n\t\texop_strings[4] = \"y 2.0\";\n\t\texop_strings[5] = \"z 2.0\";\n\t\texop_strings[6] = \"x 1.0 y 1.0\";\n\t\texop_strings[7] = \"x 1.0 z 1.0\";\n\t\texop_strings[8] = \"y 1.0 z 1.0\";\n\t} else if (what == \"dipole+\") {\n\t\texop_strings.resize(4);\n\t\texop_strings[0] = \"x 1.0\";\n\t\texop_strings[1] = \"y 1.0\";\n\t\texop_strings[2] = \"z 1.0\";\n\t\texop_strings[3] = \"x 2.0 , y 2.0 , z 2.0\";\n\t} else if (what == \"dipole+diffuse\") {\n\t\texop_strings.resize(4);\n\t\texop_strings[0] = \"x 3.0 , x 1.0 y 2.0 , x 1.0 z 2.0\";\n\t\texop_strings[1] = \"x 2.0 y 1.0 , y 3.0 , y 1.0 z 2.0\";\n\t\texop_strings[2] = \"x 2.0 z 1.0 , y 2.0 z 1.0 , z 3.0\";\n\t\texop_strings[3] = \"x 4.0 , y 4.0 , z 4.0, x 2.0 y 2.0, x 2.0 z 2.0, y 2.0 z 2.0\";\n\t} else if (what == \"dipole+diffuse_big\") {\n\t\texop_strings.resize(8);\n\t\texop_strings[0] = \"x 1.0\";\n\t\texop_strings[1] = \"y 1.0\";\n\t\texop_strings[2] = \"z 1.0\";\n\t\texop_strings[3] = \"x 2.0 , y 2.0 , z 2.0\";\n\t\texop_strings[4] = \"x 3.0 , x 1.0 y 2.0 , x 1.0 z 2.0\";\n\t\texop_strings[5] = \"x 2.0 y 1.0 , y 3.0 ,y 1.0 z 2.0\";\n\t\texop_strings[6] = \"x 2.0 z 1.0 , y 2.0 z 1.0 , z 3.0\";\n\t\texop_strings[7] = \"x 4.0 , 4 2.0 , 4 2.0, x 2.0 y 2.0, x 2.0 z 2.0, y 2.0 z 2.0\";\n\t} else if (what == \"c2v\") {\n\t\texop_strings.resize(4);\n\t\texop_strings[0] = \"z 1.0 , z 3.0 , x 2.0 z 1.0 , y 2.0 z 1.0 , x 2.0 , y 2.0 , z 2.0 , x 4.0 , y 4.0 , z 4.0 , x 2.0 y 2.0 , x 2.0 z 2.0 , y 2.0 z 2.0\";\n\t\texop_strings[1] = \"x 1.0 y 1.0 , x 3.0 y 1.0 , x 1.0 y 3.0 , x 1.0 y 1.0 z 1.0 , x 1.0 y 1.0 z 2.0\";\n\t\texop_strings[2] = \"x 1.0 , x 1.0 z 1.0 , x 1.0 z 2.0 , x 3.0 , x 3.0 z 1.0 , x 1.0 z 3.0 , x 1.0 y 2.0 , x 1.0 y 2.0 z 1.0\";\n\t\texop_strings[3] = \"y 1.0 , y 1.0 z 1.0 , y 1.0 z 2.0 , y 3.0 z 1.0 , y 1.0 z 3.0 , y 3.0, x 2.0 y 1.0 , x 2.0 y 1.0 z 1.0 \";\n\t} else if (what == \"water_first\") {\n\t\texop_strings.resize(1);\n\t\texop_strings[0] = \"x 1.0 y 1.0, x 1.0 y 1.0 z 1.0\";\n\t} else if (what == \"c2v_big\") {\n\t\texop_strings.resize(8);\n\t\texop_strings[0] = \"z 1.0 , z 3.0 , x 2.0 z 1.0 , y 2.0 z 1.0\";\n\t\texop_strings[1] = \"x 2.0 , y 2.0 , z 2.0 , x 4.0 , y 4.0 , z 4.0 , x 2.0 y 2.0 , x 2.0 z 2.0 , y 2.0 z 2.0\";\n\t\texop_strings[2] = \"x 1.0 y 1.0 , x 3.0 y 1.0 , x 1.0 y 3.0\";\n\t\texop_strings[3] = \"x 1.0 y 1.0 z 1.0 , x 1.0 y 1.0 z 2.0\";\n\t\texop_strings[4] = \"x 1.0 , x 1.0 z 1.0 , x 1.0 z 2.0 , x 3.0 , x 3.0 z 1.0 , x 1.0 z 3.0\";\n\t\texop_strings[5] = \"x 1.0 y 2.0 , x 1.0 y 2.0 z 1.0\";\n\t\texop_strings[6] = \"y 1.0 , y 1.0 z 1.0 , y 1.0 z 2.0 , y 3.0 z 1.0 , y 1.0 z 3.0 , y 3.0\";\n\t\texop_strings[7] = \"x 2.0 y 1.0 , x 2.0 y 1.0 z 1.0\";\n\t} else if (what == \"auto-1\") {\n\t\texop_strings = guessfactory::make_auto_polynom_strings(1);\n\t} else if (what == \"auto-2\") {\n\t\texop_strings = guessfactory::make_auto_polynom_strings(2);\n\t} else if (what == \"auto-3\" or what == \"octopole\") {\n\t\texop_strings = guessfactory::make_auto_polynom_strings(3);\n\t} else if (what == \"auto-4\") {\n\t\texop_strings = guessfactory::make_auto_polynom_strings(4);\n\t} else if (what == \"auto-5\") {\n\t\texop_strings = guessfactory::make_auto_polynom_strings(5);\n\t} else if (what == \"auto-6\") {\n\t\texop_strings = guessfactory::make_auto_polynom_strings(6);\n\t} else if (what == \"auto-7\") {\n\t\texop_strings = guessfactory::make_auto_polynom_strings(7);\n\t} else if (what == \"auto-8\") {\n\t\texop_strings = guessfactory::make_auto_polynom_strings(8);\n\t} else if (what == \"auto-9\") {\n\t\texop_strings = guessfactory::make_auto_polynom_strings(9);\n\t} else\n\t\tstd::cout << \"Keyword \" << what << \" is not known\" << std::endl;\n\n\treturn exop_strings;\n}\n\n/// Makes an automated excitation operator string for the excitation operators needed to create virtuals from the reference orbitals\nstd::vector<std::string> make_auto_polynom_strings(const size_t order){\n\tstd::vector<std::string> exop_strings;\n\tfor (size_t i = 0; i < order + 1; i++) {\n\t\tfor (size_t j = 0; j < order + 1; j++) {\n\t\t\tfor (size_t k = 0; k < order + 1; k++) {\n\t\t\t\tif (i + j + k > order)\n\t\t\t\t\tMADNESS_ASSERT(i + j + k > order); // do nothing\n\t\t\t\telse if (i == 0 && j == 0 && k == 0)\n\t\t\t\t\tMADNESS_ASSERT(i == 0); // do nothing\n\t\t\t\telse {\n\t\t\t\t\tif (i == 0 && j != 0 && k != 0)\n\t\t\t\t\t\texop_strings.push_back(\" y \" + madness::stringify(j) + \" z \" + madness::stringify(k));\n\t\t\t\t\telse if (j == 0 && i != 0 && k != 0)\n\t\t\t\t\t\texop_strings.push_back(\"x \" + madness::stringify(i) + \" z \" + madness::stringify(k));\n\t\t\t\t\telse if (k == 0 && i != 0 && j != 0)\n\t\t\t\t\t\texop_strings.push_back(\"x \" + madness::stringify(i) + \" y \" + madness::stringify(j));\n\t\t\t\t\telse if (i == 0 && j == 0)\n\t\t\t\t\t\texop_strings.push_back(\" z \" + madness::stringify(k));\n\t\t\t\t\telse if (i == 0 && k == 0)\n\t\t\t\t\t\texop_strings.push_back(\" y \" + madness::stringify(j));\n\t\t\t\t\telse if (j == 0 && k == 0)\n\t\t\t\t\t\texop_strings.push_back(\"x \" + madness::stringify(i));\n\t\t\t\t\telse\n\t\t\t\t\t\texop_strings.push_back(\"x \" + madness::stringify(i) + \" y \" + madness::stringify(j) + \" z \" + madness::stringify(k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn exop_strings;\n}\n\n\n// explicit instantiation\ntemplate std::vector<coord_3d> compute_centroids(const std::vector<Function<double,3> > & vf);\ntemplate std::vector<coord_3d> compute_centroids(const std::vector<Function<double_complex,3> > & vf);\n\n\n\n} /* namespace guessfactory */\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/GuessFactory.h",
    "content": "/*\n * GuessFactory.h\n *\n *  Created on: Sep 27, 2018\n *      Author: kottmanj\n *\n *  Guess Factory for TDHF which can be used standalone for other purposes\n */\n\n#ifndef SRC_APPS_CHEM_GUESSFACTORY_H_\n#define SRC_APPS_CHEM_GUESSFACTORY_H_\n\n#include <madness.h>\n\nnamespace madness {\n\n// avoid confusion with other projects which may use similar generic names\nnamespace guessfactory{\n\n// convenience macros\n#define SPLITCOORD(x,y,z,r) double x=r[0]-origin[0]; double y=r[1]-origin[1];double z=r[2]-origin[2];\n\n/// compute the centroid of a function i.e. c[xi]=<f|xi|f>/<f|f> i.e. position expectation value\ncoord_3d compute_centroid(const real_function_3d& f);\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<coord_3d> compute_centroids(const std::vector<Function<T,NDIM> > & vf);\n\n/// little helper for coord (Vector<3>) and Tensor data formats\ntemplate<typename T, size_t NDIM>\nVector<T,NDIM> tensor_to_coord(const Tensor<T>& t) {\n\tVector<T,NDIM> result;\n\tMADNESS_ASSERT(size_t(t.size()) >= NDIM);\n\tfor (size_t i = 0; i < NDIM; ++i)\n\t\tresult[i] = t[i];\n\treturn result;\n}\n\n\n\n/// create excitation operators with unaryop (faster as explicit construction and multiplication)\n/// Guess function do not need to be perfectly refined\nclass ExopUnaryOpStructure {\npublic:\n\tExopUnaryOpStructure(const std::shared_ptr<FunctionFunctorInterface<double, 3> >& f) :\n\t\t\texfunc(f), cdata(FunctionCommonData<double, 3>::get(FunctionDefaults<3>::get_k())) {\n\t}\n\n\t/// multiplies the target function by the excitation operator defined by exfunc\n\tvoid operator ()(const Key<3>& key, Tensor<double>& t) const;\n\tvoid operator ()(const Key<3>& key, Tensor<double_complex>& t) const;\n    /// shared pointer to object of excitation operator\n    std::shared_ptr<FunctionFunctorInterface<double,3> >  exfunc;\n    FunctionCommonData<double,3> cdata;\n    template <typename Archive> void serialize(Archive& ar) {}\n};\n\n/// creates a plane-wave: sin (or cos) with argument (npi/L*x)\nclass PlaneWaveFunctor : public FunctionFunctorInterface<double,3> {\npublic:\n\tPlaneWaveFunctor(std::vector<double> vn,std::vector<bool> vc, const coord_3d& c) : L(FunctionDefaults<3>::get_cell_width()), n(vn), cosinus(vc), origin(c) {}\n\n\ttypedef double resultT;\n\n    /// for explicit construction of this plane-wave function\n\tdouble operator ()(const coord_3d& r) const;\n    /// operator for the 1D plane waves\n\tdouble operator ()(const double& x, const int& dim) const;\n    /// in case this is needed at some point\n    double operator()(const coord_1d & x, const int& dim)const{\n    \treturn (*this)(x[0],dim);\n    }\n\n\tstd::string name(const bool& compact = false) const;\n\n    const Tensor<double> L;\n    const std::vector<double> n;\n    const std::vector<bool> cosinus;\n    const coord_3d origin;\n\n\n};\n\n/// GaussFunctor to let the exciation operators go to zero at the boundaries\n/// totally symmetric\nclass GaussFunctor : public FunctionFunctorInterface<double,3> {\npublic:\n\tGaussFunctor();\n\tGaussFunctor(const double& width): width_(width){\n\t\tMADNESS_ASSERT(not(width<0.0));\n\t}\n\tGaussFunctor(const double& width, const coord_3d c): width_(width), center(c){\n\t\tMADNESS_ASSERT(not(width<0.0));\n\t}\n\tGaussFunctor(const double& width, const Tensor<double> c): width_(width), center(tensor_to_coord<double,3>(c)){\n\t\tMADNESS_ASSERT(not(width<0.0));\n\t}\n\tconst double width_;\n\tconst coord_3d center=coord_3d();\n\n\t/// explicit construction\n\tdouble operator ()(const coord_3d& rr) const;\n\n\n};\n\n/// Project a general 3D polynomial to the MRA Grid\nclass PolynomialFunctor : public FunctionFunctorInterface<double,3> {\npublic :\n\t/// simple xyz moments constructor\n\tPolynomialFunctor(const int& axis): input_string_(axis_to_string(axis)), data_(read_string(axis_to_string(axis))), dampf(0.0) {}\n\t// general polynomials or sums of polynomials\n\tPolynomialFunctor(const std::string input, const double& damp_width=0.0, const coord_3d& c=coord_3d()) : input_string_(input), data_(read_string(input)), dampf(damp_width), center(c) {}\n\tPolynomialFunctor(const std::string input,const double& damp_width, const Tensor<double>& c) : input_string_(input), data_(read_string(input)), dampf(damp_width), center(tensor_to_coord<double,3>(c)) {}\n\n\t/// construction by coordinates\n\tdouble operator ()(const coord_3d& rr) const;\n\n\t/// create the value of the polynomial according to the data in the data_ structure\n\tdouble compute_value(const coord_3d& r) const;\n\n\t/// convert a given axis to the appropriate input string\n\tstd::string axis_to_string(const int& axis)const{\n\t\tstd::string result;\n\t\tif(axis==0) result=\"x 1.0\";\n\t\telse if(axis==1) result=\"y 1.0\";\n\t\telse if (axis==2) result=\"z 1.0\";\n\t\telse MADNESS_EXCEPTION(\"polynomial functor only defined up to 3 dimensions\",1);\n\t\treturn result;\n\t}\n\nprotected:\n\tconst std::string input_string_;\n\t/// The data for the construction of the polynomial chain\n\t/// every entry of data_ is vector containing the threee exponents and the coefficient of a monomial dx^ay^bz^c , data_[i] = (a,b,c,d)\n\tconst std::vector<std::vector<double>> data_;\n\t/// damping function\n\tGaussFunctor dampf;\n\tcoord_3d center=coord_3d();\npublic:\n\tstd::vector<std::vector<double> > read_string(const std::string string) const;\n\tvoid test();\n\tstd::vector<std::vector<double> > give_data(){return data_;}\n};\n\n/// instead of x,y,z use sin(x), sin(y), sin(z)\n/// shows the same transformation behaviour but does not grow unbounded with larger x,y,z values\nclass PolynomialTrigonometricsFunctor : public PolynomialFunctor {\npublic:\n\t/// c++11 constructor inheritance\n\tusing PolynomialFunctor::PolynomialFunctor;\n\t// overload\n\t/// create the value of the polynomial according to the data in the data_ structure\n\t/// instead of x,y,z use sin(x), sin(y), sin(z)\n\tdouble compute_value(const coord_3d& r) const;\n};\n\n\n\n/// excite a vector of functions with a specific excitation operator\n/// @param[in/out] vf the function which gets excited, exop*f on return\n/// @param[in] exop_input , the excitation operator defined by a string (see the polynomial_functor class for details)\n/// @return exop*vf i.e. result[i]=exop*vf[i]\nvector_real_function_3d apply_polynomial_exop(vector_real_function_3d& vf, const std::string& exop_input, std::vector<coord_3d> centers = std::vector<coord_3d>(), const bool& fence = false);\n/// convenience wrapper\nreal_function_3d apply_polynomial_exop(real_function_3d& f, const std::string& exop_input, coord_3d center = coord_3d(), const bool& fence = false);\n\n/// excite a vector of functions with a specific excitation operator\n/// @param[in/out] vf the function which gets excited, exop*f on return\n/// @param[in] exop_input, the excitation operator defined by a string (see the polynomial_functor class for details)\n/// @param[in] the centers of the vf functions, if none were given they are recomputed\n/// @return exop*vf i.e. result[i]=exop*vf[i]\n//template<typename T, std::size_t NDIM>\n//std::vector<Function<T,NDIM> > apply_trigonometric_exop(std::vector<Function<T,NDIM> >& vf,\n//\t\tconst std::string& exop_input, std::vector<coord_3d> centers = std::vector<coord_3d>(), const bool& fence = false);\n/// excite a vector of functions with a specific excitation operator\n/// @param[in/out] vf the function which gets excited, exop*f on return\n/// @param[in] exop_input, the excitation operator defined by a string (see the polynomial_functor class for details)\n/// @param[in] the centers of the vf functions, if none were given they are recomputed\n/// @return exop*vf i.e. result[i]=exop*vf[i]\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T,NDIM> > apply_trigonometric_exop(std::vector<Function<T,NDIM> >& vf,\n\t\tconst std::string& exop_input, std::vector<coord_3d> centers, const bool& fence) {\n\tif (vf.empty()) return vf;\n\n\t//recompute centers if necessary\n\tif (centers.empty()) centers = compute_centroids(vf);\n\n\tExopUnaryOpStructure exop(std::make_shared<PolynomialTrigonometricsFunctor>(PolynomialTrigonometricsFunctor(exop_input)));\n\tfor (auto& f : vf) f.unaryop(exop, false);\n\tif (fence) vf.front().world().gop.fence();\n\treturn vf;\n}\n\n\n/// convenience wrapper\ntemplate<typename T, std::size_t NDIM>\nFunction<T,NDIM> apply_trigonometric_exop(Function<T,NDIM>& f, const std::string& exop_input, coord_3d center, const bool& fence) {\n\tstd::vector<Function<T,NDIM> > vf(1, f);\n\tstd::vector<coord_3d> centers(1, center);\n\treturn apply_trigonometric_exop(vf, exop_input, centers, fence).front();\n}\n//template<typename T, std::size_t NDIM>\n//std::vector<Function<T,NDIM> > apply_trigonometric_exop(Function<T,NDIM>& f, const std::string& exop_input, coord_3d center = coord_3d(), const bool& fence = false);\n\n\n/// Makes an excitation operator string based on predefined keywords\nstd::vector<std::string> make_predefined_exop_strings(const std::string what);\n/// Makes an automated excitation operator string for the excitation operators needed to create virtuals from the reference orbitals\nstd::vector<std::string> make_auto_polynom_strings(const size_t order);\n\n\n} /* namespace guessfactory */\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_GUESSFACTORY_H_ */\n"
  },
  {
    "path": "src/madness/chem/InputWriter.cpp",
    "content": "#include <madness/chem/InputWriter.hpp>\n\nusing path = std::filesystem::path;\nusing json = nlohmann::json;\nusing commandlineparser = madness::commandlineparser;\n\nvoid write_molecule_json_to_input_file(const json& molecule_json,\n                                       std::ostream& output_stream) {\n  output_stream << \"molecule\" << std::endl;\n  // first write the parameters\n  auto parameters1 = molecule_json[\"parameters\"];\n  auto parameters = parameters1[\"parameters\"];\n  for (auto& [key, value] : parameters.items()) {\n    output_stream << \"    \" << key << \" \" << value << std::endl;\n  }\n\n  // grab the geometry and symbols as two separate arrays\n  std::vector<std::string> symbols;\n  std::vector<std::vector<double>> geometry;\n\n  auto coords = molecule_json[\"geometry\"];\n  auto symbols_json = molecule_json[\"symbols\"];\n\n  auto n = symbols_json.size();\n  std::vector<std::pair<std::string, std::vector<double>>> lines(n);\n\n  for (size_t i = 0; i < n; i++) {\n    symbols.push_back(symbols_json[i]);\n    geometry.push_back(coords[i]);\n  }\n\n  for (size_t i = 0; i < n; i++) {\n    output_stream << \"    \" << symbols[i] << \" \" << geometry[i][0] << \" \"\n                  << geometry[i][1] << \" \" << geometry[i][2] << std::endl;\n  }\n  output_stream << \"end\" << std::endl << std::endl;\n}\n\nvoid write_json_to_input_file(const json& input_json,\n                              const std::vector<std::string>& keys,\n                              std::ostream& output_stream) {\n  for (const auto& key : keys) {\n    if (input_json.find(key) == input_json.end()) {\n      throw std::runtime_error(\"Key not found in input json\");\n    }\n\n    output_stream << key << std::endl;\n    // for each key within the block write the key value pair to the file line\n    // by line\n    for (auto& [key, value] : input_json[key].items()) {\n      output_stream << \"    \" << key << \" \" << value << std::endl;\n    }\n    output_stream << \"end\" << std::endl << std::endl;\n  }\n}\n\nvoid write_moldft_input(const json& input_json, std::ostream& out) {\n  write_json_to_input_file(input_json, {\"dft\"}, out);\n  write_molecule_json_to_input_file(input_json[\"molecule\"], out);\n}\n\nvoid write_response_input(const json& input_json, std::ostream& out) {\n  write_json_to_input_file(input_json, {\"response\"}, out);\n}\n"
  },
  {
    "path": "src/madness/chem/InputWriter.hpp",
    "content": "#pragma once\n#include <madchem.h>\n#include <madness/external/nlohmann_json/json.hpp>\n\n/// Write out the “molecule” block from a JSON object, in MADNESS .inp format\nvoid write_molecule_json_to_input_file(nlohmann::json const& molecule_json,\n                                       std::ostream& output_stream);\n\n/// Write out named blocks (by key) from a JSON object, in MADNESS .inp format\nvoid write_json_to_input_file(nlohmann::json const& input_json,\n                              std::vector<std::string> const& keys,\n                              std::ostream& output_stream);\n\n/// Top‐level writer of the DFT (.dft) section + molecule block\nvoid write_moldft_input(nlohmann::json const& input_json, std::ostream& out);\n\n/// Top‐level writer of the response section\nvoid write_response_input(nlohmann::json const& input_json, std::ostream& out);\n"
  },
  {
    "path": "src/madness/chem/IntegratorXX.h",
    "content": "//\n// Created by Florian Bischoff on 4/11/24.\n//\n\n#ifndef INTEGRATORXX_H\n#define INTEGRATORXX_H\n\n#include<madness/world/world.h> // for madness::print\n#include<madness/world/vector.h>\n\n#ifdef MADNESS_HAS_INTEGRATORXX\n#ifndef INTEGRATORXX_INCLUDED\n#define INTEGRATORXX_INCLUDED\n#include <integratorxx/generators/impl/impl.hpp>\n#endif\n#endif\n\n\n/// Builder for a molecular integration grid, using IntegratorXX\n///\n/// usage:\n///     GridBuilder builder;\n///     builder.set_nradial(nrad);\n///     builder.set_origin(gridcenter);\n///     builder.set_angular_order(order);\n///     builder.make_grid();\n///     std::vector<Vector<double,3>> points=builder.get_points();\n/// see test_IntegratorXX.cc for an example\nclass GridBuilder {\nprivate:\n    typedef std::array<double,3> pointT;\n    bool debug=false;\n    std::vector<pointT> points;         // final grid points (after make_grid())\n    madness::Vector<double,3> origin={0,0,0}; // origin/center of the grid\n    std::size_t nradial=25; // the number of radial quadrature points\n    std::size_t nangular=0; // to be set from angular order, depending on angular_scheme\n    std::size_t angular_order=7; // a quadrature of a give order will integrate a spherical harmonic of that order exactly\n    std::string radial_scheme=\"TA\";\n    std::string angular_scheme=\"LebedevLaikov\";\n#ifdef MADNESS_HAS_INTEGRATORXX\n    IntegratorXX::SphericalGridFactory::spherical_grid_ptr grid;\n#else\n    struct dummygrid {\n        std::vector<pointT> points() const {return std::vector<pointT>();};\n        std::vector<double> weights() const {return std::vector<double>();}\n    };\n    std::shared_ptr<dummygrid> grid;\n#endif\n\npublic:\n    GridBuilder() {\n#ifndef MADNESS_HAS_INTEGRATORXX\n        madness::print(\"\\nno GridBuilder without IntegratorXX\\n\");\n        MADNESS_EXCEPTION(\"no GridBuilder without IntegratorXX\",1);\n#endif\n    }\n\n    /// a quadrature of a give order will integrate a spherical harmonic of that order exactly\n    void set_angular_order(const std::size_t order) {\n        angular_order=order;\n    }\n\n    /// a quadrature of a give order will integrate a spherical harmonic of that order exactly\n    std::size_t get_angular_order() const {\n        return angular_order;\n    }\n\n    /// number of radial gridpoints on the interval [0,\\inf)\n    void set_nradial(const std::size_t nradial1) {\n        nradial=nradial1;\n    }\n\n    /// number of radial gridpoints on the interval [0,\\inf)\n    std::size_t get_nradial() const {\n        return nradial;\n    }\n\n    /// the origin/center of the grid\n    void set_origin(const madness::Vector<double,3>& o) {\n        origin=o;\n    }\n\n    void make_grid() {\n        set_angular_points_from_order(angular_order);\n        if (debug) {\n            madness::print(\"generating grid with nradial=\",nradial,\"nangular=\",nangular,\n                \"angular_order=\",angular_order,\"npoints=\",nradial*nangular);\n        }\n\n#ifdef MADNESS_HAS_INTEGRATORXX\n        auto radial_quadrature=IntegratorXX::radial_from_string(\"MuraKnowles\");\n        auto radial_traits=IntegratorXX::make_radial_traits(radial_quadrature,nradial,1.0);\n        auto angular_quadrature=IntegratorXX::angular_from_string(\"LebedevLaikov\");\n        IntegratorXX::UnprunedSphericalGridSpecification unp{\n            radial_quadrature, *radial_traits,\n            angular_quadrature, nangular\n          };\n\n        auto pruning_spec = IntegratorXX::robust_psi4_pruning_scheme(unp);\n        grid=IntegratorXX::SphericalGridFactory::generate_grid(pruning_spec);\n#endif\n    }\n\n    /// get the grid points\n    std::vector<madness::Vector<double,3>> get_points() const {\n        MADNESS_CHECK_THROW(grid.get(),\"grid not initialized\");\n        auto points0=grid->points();\n        std::vector<madness::Vector<double,3>> points;\n        for (auto p : points0) points.push_back(madness::Vector<double,3>(p)+origin);\n        return points;\n    }\n\n    std::vector<double> get_weights() const {\n        MADNESS_CHECK_THROW(grid.get(),\"grid not initialized\");\n        return grid->weights();\n    }\n\nprivate:\n    /// number of angular gridpoints, derived from the angular order\n    void set_angular_points_from_order(const std::size_t order) {\n#ifdef MADNESS_HAS_INTEGRATORXX\n        // this is stupid: why have a runtime switch for the angular scheme if the traits are templated???\n        if (angular_scheme==\"LebedevLaikov\") {\n            using traits=IntegratorXX::quadrature_traits< IntegratorXX::LebedevLaikov<double>>;\n            int nextorder=traits::next_algebraic_order(order);\n            nangular = traits::npts_by_algebraic_order(nextorder);\n        } else if (angular_scheme==\"AhrensBeylkin\") {\n            using traits=IntegratorXX::quadrature_traits< IntegratorXX::AhrensBeylkin<double>>;\n            int nextorder=traits::next_algebraic_order(order);\n            nangular = traits::npts_by_algebraic_order(nextorder);\n        } else {\n            MADNESS_EXCEPTION(\"unknown angular quadrature scheme\",1);\n        }\n#endif\n    }\n};\n\n\n\n#endif //INTEGRATORXX_H\n"
  },
  {
    "path": "src/madness/chem/MoldftLib.hpp",
    "content": "#pragma once\n#include <madness/chem/SCF.h>\n#include <madness/chem/InputWriter.hpp>\n#include <madness/chem/ParameterManager.hpp>\n#if defined(HAVE_SYS_TYPES_H) && defined(HAVE_SYS_STAT_H) && \\\n    defined(HAVE_UNISTD_H)\n\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n#endif\n\nstruct moldft_lib {\n\n  static constexpr char const* label() { return \"moldft\"; }\n\n  static nlohmann::json run_nemo(std::shared_ptr<Nemo> nemo) {\n\n    nemo->value();\n    PropertyResults pr=nemo->analyze();\n\n    ConvergenceResults cr;\n    cr.set_converged_thresh(nemo->get_calc()->converged_for_thresh);\n    cr.set_converged_dconv(nemo->get_calc()->converged_for_dconv);\n\n    SCFResults sr;\n    sr.aeps = nemo->get_calc()->aeps;\n    sr.beps = nemo->get_calc()->beps;\n    sr.properties=pr;\n    sr.scf_total_energy= nemo->get_calc()->current_energy;\n\n    // nlohmann::json results;\n    nlohmann::json results;\n    results=sr.to_json();\n    results[\"convergence_info\"]=cr.to_json();\n\n    return results;\n  }\n\n  // params get's changed by SCF constructor\n  inline static nlohmann::json run_scf(World& world, const Params& params,\n                                const std::filesystem::path& outdir) {\n    const auto moldft_params = params.get<CalculationParameters>();\n    const auto& molecule = params.get<Molecule>();\n\n    auto archive_name = moldft_params.prefix() + \".restartdata\";\n    auto restart_path = path(archive_name) / \".00000\";\n\n    world.gop.fence();\n    // save the input file so we can read it back in and get derived parameters\n    if (world.rank() == 0) {\n      json moldft_input_json = {};\n      moldft_input_json[\"dft\"] = moldft_params.to_json_if_precedence(\"defined\");\n      moldft_input_json[\"molecule\"] = molecule.to_json_if_precedence(\"defined\");\n      // print(\"moldft_input_json: \", moldft_input_json.dump(4));\n      std::ofstream ofs(\"moldft.in\");\n      write_json_to_input_file(moldft_input_json, {\"dft\"}, ofs);\n      molecule.print_defined_only(ofs);\n      // write_moldft_input(moldft_input_json, ofs);\n      ofs.close();\n    }\n    world.gop.fence();\n    commandlineparser parser;\n    parser.set_keyval(\"input\", \"moldft.in\");\n    if (world.rank() == 0) ::print(\"input filename: \", parser.value(\"input\"));\n\n    FunctionDefaults<3>::set_pmap(pmapT(new LevelPmap<Key<3>>(world)));\n\n    std::cout.precision(6);\n    SCF calc(world, parser);\n    // SCF& calc=dynamic_cast<SCF&>(*this);\n    // read moldft.in file used\n\n    // redirect any log files into outdir if needed…\n    // Warm and fuzzy for the user\n    if (world.rank() == 0) {\n      print(\"\\n\\n\");\n      print(\" MADNESS Hartree-Fock and Density Functional Theory Program\");\n      print(\" ----------------------------------------------------------\\n\");\n      print(\"\\n\");\n      calc.molecule.print();\n      print(\"\\n\");\n      calc.param.print(\"dft\");\n    }\n    // Come up with an initial OK data map\n    if (world.size() > 1) {\n      calc.set_protocol<3>(world, 1e-4);\n      calc.make_nuclear_potential(world);\n      calc.initial_load_bal(world);\n    }\n    // vama\n    calc.set_protocol<3>(world, calc.param.protocol()[0]);\n\n    MolecularEnergy E(world, calc);\n    double energy = E.value(calc.molecule.get_all_coords().flat());\n    if (world.rank() == 0 && calc.param.print_level() > 0)\n      E.output_calc_info_schema();\n\n    functionT rho = calc.make_density(world, calc.aocc, calc.amo);\n    functionT brho = rho;\n    if (calc.param.nbeta() != 0 && !calc.param.spin_restricted())\n      brho = calc.make_density(world, calc.bocc, calc.bmo);\n    rho.gaxpy(1.0, brho, 1.0);\n\n    // optionally compute gradient, dipole, etc.\n    Tensor<double> grad;\n    if (calc.param.derivatives()) {\n      grad = calc.derivatives(world, rho);\n      calc.e_data.add_gradient(grad);\n    }\n\n    tensorT dip;\n    if (calc.param.dipole())\n      dip = calc.dipole(world, calc.make_density(world, calc.aocc, calc.amo));\n\n    calc.do_plots(world);\n\n    ConvergenceResults cr;\n    cr.set_converged_thresh(calc.converged_for_thresh);\n    cr.set_converged_dconv(calc.converged_for_dconv);\n    PropertyResults pr;\n    pr.energy = energy;\n    pr.dipole = dip;\n    pr.gradient = grad;\n    SCFResults sr;\n    sr.aeps = calc.aeps;\n    sr.beps = calc.beps;\n    sr.properties=pr;\n\n    nlohmann::json results=sr.to_json();\n    results[\"convergence_info\"]=cr.to_json();\n    return results;\n  }\n};  // namespace moldft_lib\n"
  },
  {
    "path": "src/madness/chem/MolecularOrbitals.cc",
    "content": "/*\n * MolecularOrbitals.cpp\n *\n *  Created on: 11 Jul 2019\n *      Author: fbischoff\n */\n\n#include<madness/chem/MolecularOrbitals.h>\n#include<madness/chem/molecule.h>\n#include <madness/world/world.h>\n#include <madness/world/parallel_archive.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/chem/SCF.h>\n#include<madness/chem/pointgroupsymmetry.h>\n\n#include<madness/mra/mra.h>\n#include<madness/mra/funcplot.h>\n\nusing namespace madness;\n\nnamespace madness {\n\ntemplate<typename T, std::size_t NDIM>\nMolecularOrbitals<T,NDIM>& MolecularOrbitals<T,NDIM>::recompute_irreps(const std::string pointgroup,\n                                                 const Function<typename Tensor<T>::scalar_type,NDIM>& metric) {\n    projector_irrep symmetry_projector(pointgroup);\n    mo=symmetry_projector(mo,metric,irreps);\n    print(\"in recompute_irreps\",irreps);\n    return *this;\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nvoid MolecularOrbitals<T,NDIM>::write_to(std::vector<Function<T,NDIM> >& mo_out, Tensor<double>& eps_out,\n\t\tstd::vector<std::string>& irrep_out, Tensor<double>& occ_out, std::vector<int>& set_out) const {\n\tif (mo.size()>0) {\n\t\tWorld& world=mo.front().world();\n\t\tmo_out=copy(world,mo);\n\t\teps_out=eps;\n\t\tirrep_out=irreps;\n\t\tocc_out=occ;\n\t\tset_out=localize_sets;\n\t} else {\n\t\tmo_out.clear();\n\t\teps_out.clear();\n\t\tirrep_out.clear();\n\t\tocc_out.clear();\n\t\tset_out.clear();\n\t}\n}\n\ntemplate<typename T, std::size_t NDIM>\nvoid MolecularOrbitals<T,NDIM>::post_process_mos(World& world, const double thresh, const int k) {\n\tif (mo[0].k() != k) {\n\t\treconstruct(world, mo);\n\t\tfor (unsigned int i = 0; i < mo.size(); ++i)\n\t\t\tmo[i] = madness::project(mo[i], k, thresh, false);\n\t\tworld.gop.fence();\n\t}\n\tset_thresh(world,mo,thresh);\n}\n\n\n/// @param[in] cubefile_header  header of the cube file, from molecule::cubefile_header()\ntemplate<typename T, std::size_t NDIM>\nvoid MolecularOrbitals<T,NDIM>::print_cubefiles(const std::string name, const std::vector<std::string> cubefile_header) const {\n    if (get_mos().size()==0) return;\n    if constexpr (std::is_same<T,double_complex>::value) return;\n    World& world=get_mos().front().world();\n    for (size_t i=0; i<get_mos().size(); ++i) {\n        std::string filename=name+\"_\"+std::to_string(i)+\".cube\";\n        if constexpr (std::is_same<T,double>::value)\n            plot_cubefile<3>(world,get_mos()[i],filename,cubefile_header);\n    }\n}\n\n\n/// save MOs in the AO projection for geometry restart\n\n/// compute the aos in MRA projection as:\n/// std::vector<Function<double,3> > aos=SCF::project_ao_basis_only(world, calc.aobasis, calc.molecule);\ntemplate<typename T, std::size_t NDIM>\nvoid MolecularOrbitals<T,NDIM>::save_restartaodata(World& world, const Molecule& molecule,\n\t\tconst MolecularOrbitals<T,NDIM>& amo, const MolecularOrbitals<T,NDIM>& bmo,\n\t\tconst AtomicBasisSet& aobasis) {\n\n\tstd::vector<Function<double,3> > aos=SCF::project_ao_basis_only(world, aobasis,molecule);\n\n\tTensor<T> Saoamo = matrix_inner(world, aos, amo.get_mos());\n\tTensor<T> Saobmo = (bmo.get_mos().size()>0) ? matrix_inner(world, aos, bmo.get_mos()) : Tensor<T>();\n\tif (world.rank() == 0) {\n\t\tarchive::BinaryFstreamOutputArchive arao(\"restartaodata\");\n\t\tarao << aobasis << Saoamo << amo.get_eps() << amo.get_occ() << amo.get_localize_sets();\n\t\tif (Saobmo.size()>0) arao << Saobmo << bmo.get_eps() << bmo.get_occ() << bmo.get_localize_sets();\n\t}\n}\n\n\n/// uses AO-projection as a restart guess\n\n/// @return amo and bmo\ntemplate<typename T, std::size_t NDIM>\nstd::pair<MolecularOrbitals<T,NDIM>, MolecularOrbitals<T,NDIM> >\nMolecularOrbitals<T,NDIM>::read_restartaodata(World& world,\n\t\tconst Molecule& molecule, const bool have_beta) {\n\n\tarchive::BinaryFstreamInputArchive arao(\"restartaodata\");\n\n\tTensor<T> Saomo;\n\tTensor<double> eps, occ;\n\tstd::vector<int> localize_set;\n\tstd::vector<std::string> irrep;\n\tstd::vector<Function<T,NDIM> > dummy_mo;\n\tAtomicBasisSet aobasis;\n\n\tMolecularOrbitals<T,NDIM> amo, bmo;\n\n\ttry {\n\t\t// read alpha orbitals\n\t\tarao >> aobasis >> Saomo >> eps >> occ >> localize_set;\n\t\tprint(\"reading from aobasis\",aobasis.get_name());\n\t\tstd::vector<Function<double,3> > aos1=SCF::project_ao_basis_only(world, aobasis,molecule);\n\n\t\tamo=MolecularOrbitals<T,NDIM>(dummy_mo,eps,irrep,occ,localize_set);\n\t\tamo.project_ao(world,Saomo,aos1);\n\n\t\tif (have_beta) {\n\t\t\tarao >> Saomo >> eps >> occ >> localize_set;\n\t\t\tbmo=MolecularOrbitals<T,NDIM>(dummy_mo,eps,irrep,occ,localize_set);\n\t\t\tbmo.project_ao(world,Saomo,aos1);\n\t\t}\n\n\t} catch (...) {\n\t\tthrow std::runtime_error(\"failed to read restartdata\");\n\t}\n\treturn std::make_pair(amo,bmo);\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nvoid MolecularOrbitals<T,NDIM>::project_ao(World& world, const Tensor<T>& Saomo,\n\t\tconst std::vector<real_function_3d>& aos) {\n\n\tTensor<double> Saoao=matrix_inner(world, aos, aos);\n\n\tTensor<T> c;\n\tgesvp(world, convert<T>(Saoao), Saomo, c);\n\tmo = transform(world, aos, c, 0.0, true);\n\ttruncate(world, mo);\n\tmo=orthonormalize_symmetric(mo);\n\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Vector<typename Tensor<T>::scalar_type,3> > MolecularOrbitals<T,NDIM>::compute_center(\n        const Function<typename Tensor<T>::scalar_type,NDIM> metric2) const {\n    using resultT= typename Tensor<T>::scalar_type;\n    int nmo = mo.size();\n    auto result=std::vector<Vector<resultT,3>>(nmo);\n    if (nmo==0) return result;\n    World& world=mo.front().world();\n    Tensor<T> dip(3, nmo);\n    double vtol=FunctionDefaults<3>::get_thresh()*0.1;\n    {\n        for (int axis = 0; axis < 3; ++axis) {\n            // dipole functor\n            auto dipole = [&axis](const Vector<double,3>& r) {return r[axis];};\n            real_function_3d fdip = real_factory_3d (world).functor(dipole).initial_level(4);\n            fdip=fdip*metric2;\n            dip(axis, _) = inner(world, mo, mul_sparse(world, fdip, mo, vtol));\n        }\n    }\n    for (int i=0; i<nmo; ++i) {\n        for (int axis=0; axis<3; ++axis) {\n            result[i][axis]=std::real(dip(axis,i));\n        }\n    }\n    return result;\n}\n\n\ntemplate class MolecularOrbitals<double,3>;\ntemplate class MolecularOrbitals<double_complex,3>;\n\n\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/MolecularOrbitals.h",
    "content": "/*\n * MolecularOrbitals.h\n *\n *  Created on: 11 Jul 2019\n *      Author: fbischoff\n */\n\n#ifndef SRC_APPS_CHEM_MOLECULARORBITALS_H_\n#define SRC_APPS_CHEM_MOLECULARORBITALS_H_\n\n#include<vector>\n#include<madness/tensor/tensor.h>\n#include <madness/world/parallel_archive.h>\n#include<madness/chem/molecule.h>\n#include<stdio.h>\n\nnamespace madness {\n\ntemplate<typename T, std::size_t NDIM> class Function;\n//class World;\nclass AtomicBasisSet;\n\ntemplate<typename T, std::size_t NDIM>\nclass MolecularOrbitals : public archive::ParallelSerializableObject {\npublic:\n\n    MolecularOrbitals(const MolecularOrbitals<T,NDIM>& other) = default;\n\n\tMolecularOrbitals() = default;\n\n    MolecularOrbitals(const std::vector<Function<T,NDIM> >& mo)\n            : mo(mo), eps(), irreps(), occ(), localize_sets() {\n    }\n\n    MolecularOrbitals(const std::vector<Function<T,NDIM> >& mo, const Tensor<double>& eps)\n            : mo(mo), eps(eps), irreps(), occ(), localize_sets() {\n    }\n\n\tMolecularOrbitals(const std::vector<Function<T,NDIM> >& mo, const Tensor<double>& eps,\n\t\t\tconst std::vector<std::string>& irrep, const Tensor<double>& occ,\n\t\t\tconst std::vector<int>& set)\n\t\t\t: mo(mo), eps(eps), irreps(irrep), occ(occ), localize_sets(set) {\n\t}\n\n    MolecularOrbitals get_subset(const int iset) const {\n        auto slices = convert_set_to_slice(localize_sets);\n        auto s=slices[iset];\n        MolecularOrbitals result;\n        MADNESS_CHECK(mo.size()>=size_t(s.end+1));\n//        result.mo.assign(mo.begin()+s.start,mo.begin()+s.end+1);\n        for (int i=s.start; i<s.end+1; ++i) result.mo.push_back(copy(mo[i]));\n        if (eps.size()>0) result.eps=copy(eps(s));\n        if (irreps.size()>0) result.irreps.assign(irreps.begin()+s.start,irreps.begin()+s.end+1);\n        if (occ.size()>0) result.occ=copy(occ(s));\n        if (localize_sets.size()>0) result.localize_sets.assign(localize_sets.begin()+s.start,localize_sets.begin()+s.end+1);\n\n        return result;\n    }\n\n    std::size_t size() const {\n        return mo.size();\n    }\n\n\tstd::vector<Function<T,NDIM> > get_mos() const {\n\t\treturn mo;\n\t}\n\n\t[[nodiscard]] Tensor<double> get_eps() const {\n\t\treturn eps;\n\t}\n\n\t[[nodiscard]] std::vector<std::string> get_irreps() const {\n\t\treturn irreps;\n\t}\n\n\tstd::vector<int> get_localize_sets() const {\n\t\treturn localize_sets;\n\t}\n\n\tTensor<double> get_occ() const {\n\t\treturn occ;\n\t}\n\n\t/// setters will always invalidate all other member variables\n\tMolecularOrbitals& set_mos(const std::vector<Function<T,NDIM> >& mo_new) {\n\t\tinvalidate_all();\n\t\tmo=mo_new;\n        return *this;\n\t}\n\n\t/// updates will keep other member variables\n\tMolecularOrbitals& update_mos(const std::vector<Function<T,NDIM> >& mo_new) {\n\t\tmo=mo_new;\n        return *this;\n\t}\n\n\tMolecularOrbitals& update_occ(const Tensor<double>& occ_new) {\n\t\tocc=occ_new;\n        return *this;\n\t}\n\n    /// updates will keep other member variables\n    MolecularOrbitals& update_localize_set(const std::vector<int>& set) {\n        localize_sets=set;\n        return *this;\n    }\n\n\t/// updates will keep other member variables\n\tMolecularOrbitals& update_mos_and_eps(const std::vector<Function<T,NDIM> >& mo_new,\n\t\t\tconst Tensor<double>& eps_new) {\n\t\tmo=mo_new;\n\t\teps=copy(eps_new);\n        return *this;\n\t}\n\n\tMolecularOrbitals& recompute_irreps(const std::string pointgroup,\n                       const Function<typename Tensor<T>::scalar_type,NDIM>& metric);\n\n    /// group orbitals into sets of similar orbital energies for localization\n\tMolecularOrbitals& recompute_localize_sets(const double bandwidth=1.5) {\n        set_all_orbitals_occupied();\n        std::size_t nmo = mo.size();\n        std::vector<int> set = std::vector<int>(static_cast<size_t>(nmo), 0);\n        for (size_t i = 1; i < nmo; ++i) {\n            set[i] = set[i - 1];\n            // Only the new/boys localizers can tolerate not separating out the core orbitals\n            if (eps(i) - eps(i - 1) > bandwidth || get_occ()(i) != 1.0) ++(set[i]);\n        }\n        update_localize_set(set);\n        return *this;\n\t}\n\n    static std::vector<Slice> convert_set_to_slice(const std::vector<int>& localized_set) {\n        std::vector<Slice> blocks;\n        long ilo=0;\n        for (size_t i=1; i<localized_set.size(); ++i) {\n            if (not (localized_set[i]==localized_set[i-1])) {\n                blocks.push_back(Slice(ilo, i-1));\n                ilo=i;\n            }\n        }\n        // add final block\n        blocks.push_back(Slice(ilo,localized_set.size()-1));\n        return blocks;\n    }\n\n\n    MolecularOrbitals& set_all_orbitals_occupied() {\n        occ=Tensor<double>(mo.size());\n        occ=1.0;\n        return *this;\n    }\n\n\tvoid invalidate_all() {\n\t\tinvalidate_mos();\n\t\tinvalidate_eps();\n\t\tinvalidate_irreps();\n\t\tinvalidate_occ();\n\t\tinvalidate_localize_sets();\n\t}\n\n\tvoid invalidate_mos() {\n\t\tmo.clear();\n\t}\n\n\tvoid invalidate_eps() {\n\t\teps.clear();\n\t}\n\n\tvoid invalidate_irreps() {\n\t\tirreps.clear();\n\t}\n\n\tvoid invalidate_occ() {\n\t\tocc.clear();\n\t}\n\n\tvoid invalidate_localize_sets() {\n\t\tlocalize_sets.clear();\n\t}\n\n\tvoid pretty_print(std::string message, std::vector<std::string> flags=std::vector<std::string>()) const {\n\t    print(message);\n        if (flags.size()==0) flags.resize(mo.size());\n        std::vector<std::string> irreps=get_irreps();\n        if (irreps.size()==0) irreps=std::vector<std::string>(mo.size(),\"unknown\");\n\t    print(\"orbital #   irrep   energy    occupation  localize_set\");\n        for (int i=mo.size()-1; i>=0; --i) {\n//            double n=get_mos()[i].norm2();\n            constexpr std::size_t bufsize=1024;\n            char buf[bufsize];\n            snprintf(buf,bufsize,\"%5d %10s %12.8f  %6.2f  %8d  %15s\", i, irreps[i].c_str(),get_eps()[i],\n                   get_occ()[i],get_localize_sets()[i], flags[i].c_str());\n            cout << std::string(buf) <<endl;\n\t    }\n\t}\n\n\n    void print_frozen_orbitals(const long freeze) const {\n\n        World& world=mo.front().world();\n        MolecularOrbitals<T, 3> dummy_mo(*this);\n        dummy_mo.recompute_localize_sets();\n        if (world.rank() == 0) {\n            auto flags=std::vector<std::string>(dummy_mo.get_mos().size(),\"active\");\n            for (int i=0; i<freeze; ++i) flags[i]=\"frozen\";\n            dummy_mo.pretty_print(\"diagonal Fock matrix elements with core/valence separation for freezing\",flags);\n            print(\"\\nfreezing orbitals: \", freeze,\"\\n\");\n        }\n\n    }\n\n\n    /// @param[in] cubefile_header  header of the cube file, from molecule::cubefile_header()\n    void print_cubefiles(const std::string name, const std::vector<std::string> cubefile_header) const;\n\n\ttemplate <typename Archive>\n\tvoid serialize (Archive& ar) {\n\t\tstd::size_t nmo=mo.size();\n\t\tar & nmo;\n\t\tif (nmo!=mo.size()) mo.resize(nmo);\n\t\tfor (auto& m : mo) ar & m;\n\t\tar & eps & irreps & occ & localize_sets;\n\t\tif (ar.is_input_archive) {\n\t\t    if (irreps.size()==0) irreps=std::vector<std::string>(nmo,\"unknown\");\n            if (localize_sets.size()==0) localize_sets=std::vector<int>(nmo,0);\n            if (occ.size()==0) occ=Tensor<double>(nmo);\n            if (eps.size()==0) eps=Tensor<double>(nmo);\n\t\t}\n\t}\n\n\tfriend bool similar(const MolecularOrbitals& mo1, const MolecularOrbitals& mo2, const double thresh=1.e-6) {\n\n\t\tif (mo1.mo.size()!=mo2.mo.size()) return false;\n\t\tif (mo1.mo.size()==0) return true;\n\n\t\tWorld& world=mo1.mo.front().world();\n\t\tbool similar=((mo1.eps-mo2.eps).normf()<thresh);\n\t\tsimilar=similar and (norm2(world,mo1.mo-mo2.mo)<thresh);\n\t\tsimilar=similar and (mo1.irreps==mo2.irreps);\n\t\tsimilar=similar and (mo1.localize_sets==mo2.localize_sets);\n\t\treturn similar;\n\t}\n\n\tvoid write_to(std::vector<Function<T,NDIM> >& mo_out, Tensor<double>& eps_out,\n\t\t\tstd::vector<std::string>& irrep_out, Tensor<double>& occ_out, std::vector<int>& set_out) const;\n\n\t/// reads amo and bmo from the restartdata file\n\n\t/// @return amo and bmo\n\tstd::pair<MolecularOrbitals<T,NDIM>, MolecularOrbitals<T,NDIM> >\n\tstatic read_restartdata(World& world, const std::string filename, const Molecule& molecule,\n\t\t\tconst std::size_t nmo_alpha, const std::size_t nmo_beta) {\n        /*\n         * save and load from SCF.cc now contain the following extra variables\n         * To read Molecular Orbitals properly we need to take care of this data\n         * even if it is unused.\n         *\n         *\n            unsigned int version;\n            double L;\n            int k;\n            Molecule molecule;\n            std::string xc;\n\n*/\n\t\tbool spinrestricted = false;\n        double L=0;\n        int k1=0;                    // Ignored for restarting, used in response only\n        unsigned int version = 4;  // UPDATE THIS IF YOU CHANGE ANYTHING\n\t//        unsigned int archive_version;\n\t\tdouble current_energy=0, converged_to_thresh=0;\n        std::string xc, localize_method;\n\n\n\t\tarchive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, filename.c_str());\n        ar & version;\n\t\tar & current_energy & spinrestricted;\n        ar & L& k1& molecule& xc & localize_method & converged_to_thresh;\n\n\t\tMolecularOrbitals<T,NDIM> amo, bmo;\n\t\tamo.load_mos(ar, molecule, nmo_alpha);\n\t\tbool have_beta=(not spinrestricted) and (nmo_beta>0);\n\t\tif (have_beta) {\n\t\t\tbmo.load_mos(ar,molecule,nmo_beta);\n\t\t}\n\t\treturn std::make_pair(amo,bmo);\n\t}\n\n\t/// reads amo and bmo from the restartdata file\n\n\t/// @return amo and bmo\n\tvoid static save_restartdata(World& world, const std::string filename, const Molecule& molecule,\n\t\t\tconst MolecularOrbitals<T,NDIM>& amo, const MolecularOrbitals<T,NDIM>& bmo) {\n        // TODO there is a good chance that this needs to be modified if it is intended to be read by SCF save/load\n\t\tbool spinrestricted = false;\n        unsigned int version=4;\n\t\tdouble current_energy=0.0, converged_to_thresh=1.e10;\n        double L=0;\n        std::string xc, localize_method;\n        int k1=0;                    // Ignored for restarting, used in response only\n\t\tarchive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, filename.c_str());\n        ar & version;\n        ar & current_energy & spinrestricted;\n        ar & L& k1& molecule& xc & localize_method & converged_to_thresh;\n\n\t\tamo.save_mos(ar,molecule);\n\t\tbmo.save_mos(ar,molecule);\n\t}\n\n\t/// legacy code\n    void load_mos(archive::ParallelInputArchive<>& ar, const Molecule& molecule, const std::size_t nmo_from_input) {\n\n\t\tunsigned int nmo = 0;\n\n\t\tar & nmo;\n\t\tMADNESS_ASSERT(nmo >= nmo_from_input);\n\t\tar & eps & occ & localize_sets;\n\t\tmo.resize(nmo);\n\t\tfor (unsigned int i = 0; i < mo.size(); ++i)\n\t\t\tar & mo[i];\n\t\tunsigned int n_core = molecule.n_core_orb_all();\n\t\tif (nmo > nmo_from_input) {\n\t\t\tlocalize_sets = vector<int>(localize_sets.begin() + n_core,\n\t\t\t\t\tlocalize_sets.begin() + n_core + nmo_from_input);\n\t\t\tmo = std::vector<Function<T,NDIM> >(mo.begin() + n_core,\n\t\t\t\t\tmo.begin() + n_core + nmo_from_input);\n\t\t\teps = copy(eps(Slice(n_core, n_core + nmo_from_input - 1)));\n\t\t\tocc = copy(occ(Slice(n_core, n_core + nmo_from_input - 1)));\n\t\t}\n\t}\n\n\t/// legacy code\n        void save_mos(archive::ParallelOutputArchive<>& ar, const Molecule& molecule) const {\n\n\t\tunsigned int nmo=mo.size();\n\n\t\tar & nmo;\n\t\tar & eps & occ & localize_sets;\n\t\tfor (unsigned int i = 0; i < mo.size(); ++i)\n\t\t\tar & mo[i];\n\t\t//unsigned int n_core = molecule.n_core_orb_all();\n\t}\n\n\tvoid post_process_mos(World& world, const double thresh, const int k);\n\n\n\t/// save MOs in the AO projection for geometry restart\n\n\t/// compute the aos in MRA projection as:\n\tstatic void save_restartaodata(World& world, const Molecule& molecule,\n\t\t\tconst MolecularOrbitals<T,NDIM>& amo, const MolecularOrbitals<T,NDIM>& bmo,\n\t\t\tconst AtomicBasisSet& aobasis);\n\n\t/// uses AO-projection as a restart guess\n\n\t/// @return amo and bmo\n\tstd::pair<MolecularOrbitals<T,NDIM>, MolecularOrbitals<T,NDIM> >\n\tstatic read_restartaodata(World& world,\n\t\t\tconst Molecule& molecule, const bool have_beta);\n\n\tvoid project_ao(World& world, const Tensor<T>& Saomo, const std::vector<Function<double,3> >& aos);\n\n    std::vector<Vector<typename Tensor<T>::scalar_type,3>> compute_center(\n            const Function<typename Tensor<T>::scalar_type,NDIM> metric2=Function<typename Tensor<T>::scalar_type,NDIM>()) const;\n\nprivate:\n\tstd::vector<Function<T,NDIM> > mo;\n\tTensor<double> eps;\n\tstd::vector<std::string> irreps;\n\tTensor<double> occ;\n\tstd::vector<int> localize_sets;\n\n};\n\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_MOLECULARORBITALS_H_ */\n"
  },
  {
    "path": "src/madness/chem/MolresponseLib.hpp",
    "content": "#pragma once\n\n#include <filesystem>\n\n#include <apps/molresponse_v2/GroundStateData.hpp>\n#include <madness/chem/InputWriter.hpp>\n#include <madness/chem/ParameterManager.hpp>\n#include <apps/molresponse_v2/PropertyManager.hpp>\n#include <apps/molresponse_v2/ResponseDebugLogger.hpp>\n#include <apps/molresponse_v2/ResponseManager.hpp>\n#include <apps/molresponse_v2/ResponseMetaData.hpp>\n#include <apps/molresponse_v2/StateGenerator.hpp>\n\nstruct molresponse_lib {\n  // -----------------------------------------------------------------------------\n  // Container for structured JSON fragments produced by the workflow\n  // -----------------------------------------------------------------------------\n  struct Results {\n    nlohmann::json metadata;    // convergence metadata per state\n    nlohmann::json properties;  // computed α, β, Raman property tables\n\n    std::optional<nlohmann::json>\n        debug_log;  // debug log of response calculations\n  };\n  static constexpr char const* label() { return \"molresponse\"; }\n\n  /**\n   * @brief Run the full molecular response & property workflow.\n   *\n   * @param world      The MADNESS world communicator\n   * @param params     Unified parameters containing response and molecule info\n   * @param indir      Path to ground-state calculation directory\n   * @param outdir     Directory where all outputs will be written\n   * @return Results   Structured JSON fragments: metadata + properties\n   */\n  inline static Results run_response(World& world, const Params& params,\n                                     const std::filesystem::path& indir,\n                                     const std::filesystem::path& outdir) {\n    // --- configure the ground-state archive location ---\n    auto rp = params.get<ResponseParameters>();\n    const auto& gp = params.get<CalculationParameters>();\n    const auto& molecule = params.get<Molecule>();\n\n    if (world.rank() == 0) {\n      json response_input_json = {};\n      response_input_json[\"response\"] = rp.to_json_if_precedence(\"defined\");\n      print(\"response_input_json: \", response_input_json.dump(4));\n      std::ofstream ofs(\"response.in\");\n      write_json_to_input_file(response_input_json, {\"response\"}, ofs);\n      ofs.close();\n    }\n    world.gop.fence();\n    commandlineparser parser;\n    parser.set_keyval(\"input\", \"response.in\");\n    if (world.rank() == 0) ::print(\"input filename: \", parser.value(\"input\"));\n\n    auto response_params = ResponseParameters(world, parser);\n    rp = response_params;\n\n    auto rel = std::filesystem::relative(indir, outdir);\n    auto prox = std::filesystem::proximate(indir, outdir);\n    auto prefix = std::filesystem::path(indir).stem().string();\n    if (world.rank() == 0) {\n      std::cout << \"Running response calculation in: \" << outdir << std::endl;\n      std::cout << \"Ground state archive: \" << indir << std::endl;\n      std::cout << \"Relative path: \" << rel << std::endl;\n      std::cout << \"Proximate path: \" << prox << std::endl;\n    }\n\n    std::string archive_name = \"moldft.restartdata\";\n    std::string archive_file = archive_name + \".00000\";\n    std::string fock_json_file = prox / \"moldft.fock.json\";\n    auto relative_archive = prox / archive_name;\n\n    // initialize ground-state data and response manager\n    GroundStateData ground(world, relative_archive.string(), molecule);\n    ResponseManager rm(world, gp);\n\n    // generate response states\n    StateGenerator state_generator(molecule, gp.protocol(),\n                                   ground.isSpinRestricted(), rp);\n    auto generated_states = state_generator.generateStates();\n    if (world.rank() == 0)\n      GeneratedStateData::print_generated_state_map(generated_states.state_map);\n    world.gop.fence();\n\n    // initialize metadata\n    std::string meta_file = \"response_metadata.json\";\n\n    ResponseMetadata metadata(world, meta_file);\n    metadata.initialize_states(generated_states.states);\n    if (world.rank() == 0) metadata.print_summary();\n    world.gop.fence();\n\n    // debug logger\n    ResponseDebugLogger debug_logger(\"response_log.json\", true);\n\n    // loop over thresholds\n    for (double thresh : gp.protocol()) {\n      rm.setProtocol(world, ground.getL(), thresh);\n      ground.prepareOrbitals(world, FunctionDefaults<3>::get_k(), thresh);\n      ground.computePreliminaries(world, *rm.getCoulombOp(), rm.getVtol(),\n                                  fock_json_file);\n      if (world.rank() == 0)\n        madness::print(\"hamiltonian:\\n\", ground.Hamiltonian);\n\n      for (auto& state : generated_states.states) {\n        //     if (state.is_converged || state.current_threshold() != thresh)\n        //     continue;\n\n        computeFrequencyLoop(world, rm, state, ground, metadata, debug_logger);\n\n        if (debug_logger.enabled()) debug_logger.write_to_disk();\n        // Check if we reached final protocol or should advance\n        if (state.at_final_threshold()) {\n          if (world.rank() == 0) {\n            madness::print(\"✓ Final convergence reached for\",\n                           state.description());\n          }\n        } else {\n          state.advance_threshold();\n          if (world.rank() == 0) {\n            madness::print(\"→ Converged at thresh\", thresh,\n                           \"→ advancing to next protocol for\",\n                           state.description());\n          }\n        }\n      }\n      /*if (state.at_final_threshold()) {*/\n      /*  state.is_converged = true;*/\n      /*  if (world.rank() == 0) madness::print(\"✓ Final convergence reached\n       * for\", state.description());*/\n      /*} else {*/\n      /*  state.advance_threshold();*/\n      /*  if (world.rank() == 0) madness::print(\"→ advancing to next protocol\n       * for\", state.description());*/\n      /*}*/\n    }\n\n    // compute requested properties\n    PropertyManager properties(world, \"properties.json\");\n    std::string dip_dirs = rp.dipole_directions();\n    std::string nuc_dirs = rp.nuclear_directions();\n\n    for (auto const& prop : rp.requested_properties()) {\n      if (prop == \"polarizability\") {\n        if (world.rank() == 0)\n          madness::print(\"▶️ Computing polarizability α...\");\n        compute_alpha(world, generated_states.state_map, ground,\n                      rp.dipole_frequencies(), rp.dipole_directions(),\n                      properties);\n        properties.save();\n\n      } else if (prop == \"hyperpolarizability\") {\n        if (world.rank() == 0)\n          madness::print(\"▶️ Computing hyperpolarizability β...\");\n\n        compute_hyperpolarizability(world, ground, rp.dipole_frequencies(),\n                                    dip_dirs, properties);\n        properties.save();\n\n      } else if (prop == \"raman\") {\n        auto nuclear_dirs = rp.nuclear_directions();\n        auto dipole_dirs = rp.dipole_directions();\n        if (world.rank() == 0) madness::print(\"▶️ Computing Raman response...\");\n        // compute_Raman(world, ground, rp.dipole_frequencies(), dipole_dirs,\n        // properties);\n        properties.save();\n      }\n      if (world.rank() == 0) {\n        properties.print_table();\n      }\n    }\n\n    // global inner-product contributions\n    auto contribs = global_inner_contributions();\n    if (world.rank() == 0 && !contribs.empty()) {\n      std::ofstream out(\"all_inner_contributions.json\");\n      out << std::setw(2) << contribs << std::endl;\n      madness::print(\"📂 Wrote all inner‐product contributions\");\n    }\n\n    // finalize & stats\n    if (world.rank() == 0)\n      madness::print(\n          \"\\n✅ Molecular response & property calculation complete.\");\n    world.gop.fence();\n    world.gop.fence();\n    print_stats(world);\n\n    // aggregate JSON results\n    Results results;\n    results.metadata = metadata.to_json();\n    results.properties = properties.to_json();\n    results.debug_log = debug_logger.to_json();\n    return results;\n  }\n\n};  // namespace molresponse_lib\n"
  },
  {
    "path": "src/madness/chem/NWChem.cc",
    "content": "/* This file is a part of Slymer, which is distributed under the Creative\n   Commons Attribution-NonCommercial 4.0 International Public License.\n\n   (c) 2017 Stony Brook University. */\n\n/**\n * \\file ESInterface/NWChem.cc\n * \\brief Implementation of the interface for NWChem.\n */\n\n#include <madness/mra/mra.h>\n#include \"NWChem.h\"\n#include <cstdint>\n#include <fstream>\n#include <list>\n#include <map>\n#include <iostream>\n#include <regex>\n#include <stdexcept>\n#include \"gaussian.h\"\n\nnamespace slymer {\n\n// helper functions\n\nvoid NWChem_Interface::read(Properties::Properties props) {\n  // figure out which properties we need to read:\n  // 1) Work out dependencies (for instance, basis needs atoms).\n  // 2) Omit ones that are already read. That is, we need properties that are\n  //    specified in props (post step 1), but not already read (in my_properties).\n  //    ... bitwise and props with (not my_properties) -- has to be requested and\n  //    not read.\n\n  // basis requires atoms\n  if((props & Properties::Basis).any())\n    props |= Properties::Atoms;\n\n  // if we're doing the MO expansion coefficients, we might as well do the\n  // energies\n  if((props & Properties::MOs).any())\n    props |= Properties::Energies;\n\n  // skip things we've already read\n  props &= ~my_properties;\n\n  // do we need to open and read fname.out?\n  if((props & Properties::Atoms).any() ||\n     (props & Properties::Basis).any()) {\n\n    // open the NWChem log file: fname.out\n    std::ifstream in(fname + \".out\");\n    if(!in)\n      throw std::invalid_argument(\"Cannot open \" + fname + \".out for reading.\");\n\n    if((props & Properties::Atoms).any())\n      read_atoms(in);\n    if((props & Properties::Basis).any())\n      read_basis_set(in);\n\n    in.close();\n  }\n\n  // do we need to open and read fname.movecs?\n  if((props & Properties::Energies).any() ||\n     (props & Properties::MOs).any() ||\n     (props & Properties::Occupancies).any()) {\n\n    // open the NWChem movecs file: fname.movecs\n    // this file is binary\n    std::ifstream in(fname + \".movecs\", std::ios::binary);\n    if(!in)\n      throw std::invalid_argument(\"Cannot open \" + fname + \".movecs for reading.\");\n    in.unsetf(std::ios::skipws);\n\n    read_movecs(props, in);\n\n    in.close();\n  }\n}\n\nvoid NWChem_Interface::read_atoms(std::istream &in) {\n  my_atoms.clear();\n\n  // state variables\n  std::string line; // current line of the NWChem output\n  bool reading = false; // are we in the block of text where we can read basis functions?\n  double unitcf = 1.; // Conversion factor to go from units in the NWChem file to a.u. \n\n  // regex search strings\n  std::regex startline{R\"(Geometry)\"},\n             unitline{R\"(Output coordinates in (a.u.|angstroms|nanometer|picometer|.+) \\(scale)\"},\n             atomline{R\"([[:digit:]]+[[:space:]]+([[:alpha:]]+)[[:space:]]+[^[:space:]]+[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]]+))\"},\n             doneline{R\"(Atomic Mass)\"};\n  std::smatch matches;\n\n  // note that NWChem outputs the orbitals by atom type, listing ang. momentum, exponents, and coefficients\n  while(std::getline(in, line)) {\n    // is this the start of the basis function output?\n    if(!reading && std::regex_search(line, startline)) {\n      reading = true;\n    }\n\n    // in what units are the atomic positions?\n    else if(reading && std::regex_search(line, matches, unitline)) {\n      bool doprint = true;\n      if(matches[1] == \"angstroms\")\n        unitcf = 1./0.529177;\n      else if(matches[1] == \"a.u.\")\n        unitcf = 1.0;\n      else if(matches[1] == \"nanometer\")\n        unitcf = 10./0.529177;\n      else if(matches[1] == \"picometer\")\n        unitcf = 0.01/0.529177;\n      else {\n        err.get() << \"Unknown units: \" << matches[1] << \". Assuming angstroms.\" << std::endl;\n        unitcf = 1.0/0.529177;\n        doprint = false;\n      }\n      if(doprint)\n        err.get() << \"\\nNWChem used \" << matches[1] << \".\\nConversion to a.u. is \"\n          << unitcf << '.' << \"\\nUnits have been converted to a.u.\" << std::endl;\n    }\n\n    // does this line have an atomic position?\n    else if(reading && std::regex_search(line, matches, atomline)) { \n      Atom addme;\n      addme.symbol = matches[1];\n\n      // Get symbol's case correct. First is capitalized, second is lower if exists\n      addme.symbol[0] = std::toupper(addme.symbol[0]);\n      if(addme.symbol.length() > 1) addme.symbol[1] = std::tolower(addme.symbol[1]);\n\n      addme.position = {{std::stod(matches[2]) * unitcf, std::stod(matches[3]) * unitcf, std::stod(matches[4]) * unitcf}};\n      my_atoms.emplace_back(std::move(addme));\n      err.get() << matches[1] << \" at (\" << addme.position[0] << \", \" << addme.position[1] << \", \" << addme.position[2] << \").\" << std::endl;\n    }\n\n    // are we done?\n    else if(reading && std::regex_search(line, doneline)) {\n      break;\n    }\n  }\n\n  my_properties = my_properties | Properties::Atoms;\n}\n\n\n\n// helper functions and data types for reading the basis set\n\n/**\n * \\brief Store information on a shell of basis functions as it's being read.\n *\n * Used when reading the basis functions.\n */\nstruct BasisShell {\n  char type; ///< Type of basis function.\n  std::vector<double> coeffs, ///< Expansion coefficient for each primitive.\n                      exps; ///< Exponent for each primitive.\n};\n\nstatic std::ostream &operator<< (std::ostream &out, const BasisShell &bs) {\n  out << \"Type \" << bs.type << \", exps = [ \";\n  for(auto ex : bs.exps)\n    out << ex << ' ';\n  out << \"], coeffs = [ \";\n  for(auto coeff : bs.coeffs)\n    out << coeff << ' ';\n  out << \"]\";\n  return out;\n}\n\nvoid NWChem_Interface::read_basis_set(std::istream &in) {\n  my_basis_set.clear();\n  // First we have to read the basis functions (and types) that are on each atom\n\n  // state variables\n  std::string line; // current line of the NWChem output\n  bool reading = false; // are we in the block of text where we can read basis functions?\n  bool reading_lindeps = false; // can we read the linear deps in this text?\n  bool spherical = true; // are we using spherical orbitals (true) or Cartesian (false)?\n  std::string curatom; // Symbol of the current atom being read.\n  unsigned curnum = 1; // The current basis function number (for the symbol) being read.\n  BasisShell curfunc; // The current basis function being read.\n  std::map<std::string, std::list<BasisShell>> basisperatom; // List of basis functions for the given symbol (map key).\n  std::list<BasisShell> basiscuratom; // List of basis functions for the current atom.\n\n  // regex search strings\n  std::regex startline{R\"(Basis.*(cartesian|spherical))\"},\n             newatomline{R\"(([[:alpha:]]+)[[:space:]]+\\(([[:alpha:]]+)\\))\"},\n             orbitalline{R\"(([[:digit:]]+)[[:space:]]+([[:alpha:]]+)[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]]+))\"},\n             lineardepline{R\"( !! The overlap matrix has *([\\d]+))\"},\n             almostdoneline{R\"(Summary)\"},\n             doneline{R\"(Superposition)\"};\n\n  std::smatch matches;\n\n  // note that NWChem outputs the orbitals by atom type, listing ang. momentum, exponents, and coefficients\n  while(std::getline(in, line)) {\n    // is this the start of the basis function output?\n    if(!reading && std::regex_search(line, matches, startline)) {\n      reading = true; // we're now in the basis function block\n\n      // determine the type of basis function being used\n      if(matches[1] == \"cartesian\")\n        spherical = false;\n      else if(matches[1] == \"spherical\")\n        spherical = true;\n\n      err.get() << \"Using \" << (spherical ? \"spherical\" : \"Cartesian\") << \" orbitals.\" << std::endl; \n    }\n\n    // Are we done reading orbitals?\n    else if(reading && std::regex_search(line, almostdoneline)) {\n      if(curatom.length() > 0) {\n        err.get() << \"   Function \" << curnum << \": \" << curfunc << std::endl;\n        basiscuratom.emplace_back(std::move(curfunc));\n        basisperatom.emplace(std::move(curatom), std::move(basiscuratom));\n      }\n      reading = false;\n      reading_lindeps = true; // Only thing left to find \n    }\n\n    // Is this the start of a new atom?\n    else if(reading && std::regex_search(line, matches, newatomline)) {\n      // if this isn't the first symbol, store the previous symbol's basis and reset\n      if(curatom.length() > 0) {\n        err.get() << \"   Function \" << curnum << \": \" << curfunc << std::endl;\n\n        basiscuratom.emplace_back(std::move(curfunc));\n        basisperatom.emplace(std::move(curatom), std::move(basiscuratom));\n      }\n\n      curatom = matches[1];\n\n      // Get symbol's case correct. First is capitalized, second is lower if exists\n      curatom[0] = std::toupper(curatom[0]);\n      if(curatom.length() > 1) curatom[1] = std::tolower(curatom[1]);\n\n      curnum = 1;\n      err.get() << \"Reading basis for \" << curatom << \" (\" << matches[2] << \").\" << std::endl;\n    }\n\n    // Is this the line containing linear dependencies? \n    else if(reading_lindeps && std::regex_search(line, matches, lineardepline)) {\n      err.get() << \"Found \" << matches[1] << \" linear dependencies in the basis.\"\n      << std::endl;\n      line = matches[1].str(); \n      my_lineardeps = static_cast<unsigned int>(std::stoi(matches[1]));\n    }\n\n    else if(reading_lindeps && std::regex_search(line, matches, doneline)) {\n      reading_lindeps = false;\n      break; // all done\n    }\n\n    else if(reading && std::regex_search(line, matches, orbitalline)) {\n      // this line is an uncontracted orbital shell\n      const unsigned func = std::stoul(matches[1]);\n      if(func == curnum + 1) {\n        // store the old basis function and prepare to start reading a new one\n        err.get() << \"   Function \" << curnum << \": \" << curfunc << std::endl;\n        basiscuratom.emplace_back(std::move(curfunc));\n        ++curnum;\n      }\n\n      if(func == curnum) {\n        // add a new primitive (uncontracted Gaussian) to this overall shell\n        const std::string type = matches[2];\n        if(curfunc.exps.size() == 0)\n          // first one. set the type\n          curfunc.type = type[0];\n        else if(curfunc.type != type[0])\n          throw std::runtime_error(\"Inconsistent orbital types while reading NWChem basis set.\");\n\n        curfunc.exps.push_back(std::stod(matches[3]));\n        curfunc.coeffs.push_back(std::stod(matches[4]));\n      }\n      else\n        throw std::runtime_error(\"Inconsistent basis function counting while reading NWChem basis set.\");\n    }\n  }\n\n  // now we need to go through the atoms in the calculation and create the basis\n  // functions centered on each.\n  err.get() << \"Processing basis functions for each atom.\" << std::endl;\n\n  for(const Atom &atom : atoms) {\n    unsigned nfunc = 0;\n\n    err.get() << \"Atom: \" << atom.symbol << \" at (\" << atom.position[0] <<\n      \", \" << atom.position[1] << \", \" << atom.position[2] << \"): \";\n\n    // add the basis functions for this atom type, centered at this location\n    for(const BasisShell &bs : basisperatom[atom.symbol]) {\n      // S Cartesian and Spherical\n      if(bs.type == 'S') {\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::s, atom.position, bs.exps,\n            bs.coeffs));\n        ++nfunc;\n      }\n      // P Cartesian and Spherical\n      else if(bs.type == 'P') {\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::px, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::py, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::pz, atom.position, bs.exps,\n            bs.coeffs));\n        nfunc += 3;\n      }\n      // D Cartesian\n      else if(bs.type == 'D' && !spherical) {\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::dxx, atom.position, bs.exps,\n            bs.coeffs));\n\n        std::unique_ptr<GaussianFunction> dxy(\n          new GaussianFunction(GaussianType::dxy, atom.position, bs.exps,\n            bs.coeffs));\n        dxy->operator*=(sqrt(1./3.));\n        gaussians.emplace_back(std::move(dxy));\n \n        std::unique_ptr<GaussianFunction> dxz(\n          new GaussianFunction(GaussianType::dxz, atom.position, bs.exps,\n            bs.coeffs));\n        dxz->operator*=(sqrt(1./3.));\n        gaussians.emplace_back(std::move(dxz));\n \n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::dyy, atom.position, bs.exps,\n            bs.coeffs));\n\n        std::unique_ptr<GaussianFunction> dyz(\n          new GaussianFunction(GaussianType::dyz, atom.position, bs.exps,\n            bs.coeffs));\n        dyz->operator*=(sqrt(1./3.));\n        gaussians.emplace_back(std::move(dyz));\n \n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::dzz, atom.position, bs.exps,\n            bs.coeffs));\n \n        nfunc += 6;\n      }\n      // D Spherical\n      else if(bs.type == 'D' && spherical) {\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::dxy, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::dyz, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::dzzmrr, atom.position, bs.exps,\n            bs.coeffs));\n\n        std::unique_ptr<GaussianFunction> dxz(\n          new GaussianFunction(GaussianType::dxz, atom.position, bs.exps,\n            bs.coeffs));\n        dxz->operator*=(-1.);\n        gaussians.emplace_back(std::move(dxz));\n\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::dxxmyy, atom.position, bs.exps,\n            bs.coeffs));\n        nfunc += 5;\n      }\n      // F Cartesian\n      else if(bs.type == 'F' && !spherical) {\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::fxxx, atom.position, bs.exps,\n            bs.coeffs));\n        \n        std::unique_ptr<GaussianFunction> fxxy(\n          new GaussianFunction(GaussianType::fxxy, atom.position, bs.exps,\n            bs.coeffs));\n        fxxy->operator*=(sqrt(0.2));\n        gaussians.emplace_back(std::move(fxxy));\n\n        std::unique_ptr<GaussianFunction> fxxz(\n          new GaussianFunction(GaussianType::fxxz, atom.position, bs.exps,\n            bs.coeffs));\n        fxxz->operator*=(sqrt(0.2));\n        gaussians.emplace_back(std::move(fxxz));\n\n        std::unique_ptr<GaussianFunction> fxyy(\n          new GaussianFunction(GaussianType::fxyy, atom.position, bs.exps,\n            bs.coeffs));\n        fxyy->operator*=(sqrt(0.2));\n        gaussians.emplace_back(std::move(fxyy));\n\n        std::unique_ptr<GaussianFunction> fxyz(\n          new GaussianFunction(GaussianType::fxyz, atom.position, bs.exps,\n            bs.coeffs));\n        fxyz->operator*=(sqrt(1./15.));\n        gaussians.emplace_back(std::move(fxyz));\n\n        std::unique_ptr<GaussianFunction> fxzz(\n          new GaussianFunction(GaussianType::fxzz, atom.position, bs.exps,\n            bs.coeffs));\n        fxzz->operator*=(sqrt(0.2));\n        gaussians.emplace_back(std::move(fxzz));\n\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::fyyy, atom.position, bs.exps,\n            bs.coeffs));\n\n        std::unique_ptr<GaussianFunction> fyyz(\n          new GaussianFunction(GaussianType::fyyz, atom.position, bs.exps,\n            bs.coeffs));\n        fyyz->operator*=(sqrt(0.2));\n        gaussians.emplace_back(std::move(fyyz));\n\n        std::unique_ptr<GaussianFunction> fyzz(\n          new GaussianFunction(GaussianType::fyzz, atom.position, bs.exps,\n            bs.coeffs));\n        fyzz->operator*=(sqrt(0.2));\n        gaussians.emplace_back(std::move(fyzz));\n\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::fzzz, atom.position, bs.exps,\n            bs.coeffs));\n\n        nfunc += 10;\n      }\n      // F Spherical\n      else if(bs.type == 'F' && spherical) {\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::fxxymyyy, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::fxyz, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::fyzzmrry, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::fzzzmrrz, atom.position, bs.exps,\n            bs.coeffs));\n\n        std::unique_ptr<GaussianFunction> fxzzmrrx(\n          new GaussianFunction(GaussianType::fxzzmrrx, atom.position, bs.exps,\n            bs.coeffs));\n        fxzzmrrx->operator*=(-1.);\n        gaussians.emplace_back(std::move(fxzzmrrx));\n\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::fxxzmyyz, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::fxyymxxx, atom.position, bs.exps,\n            bs.coeffs));\n        nfunc += 7;\n      }\n      // G Cartesian\n      else if(bs.type == 'G' && !spherical) {\n        // Each shell is normalized with same value inside NWChem\n        const double norm = 16./sqrt(105.);\n\n        std::unique_ptr<GaussianFunction> gxxxx(\n          new GaussianFunction(GaussianType::gxxxx, atom.position, bs.exps,\n            bs.coeffs));\n        //gxxxx->operator*=(norm*sqrt(105.)/16.);\n        gaussians.emplace_back(std::move(gxxxx));\n\n        std::unique_ptr<GaussianFunction> gxxxy(\n          new GaussianFunction(GaussianType::gxxxy, atom.position, bs.exps,\n            bs.coeffs));\n        gxxxy->operator*=(norm*sqrt(15.)/16.);\n        gaussians.emplace_back(std::move(gxxxy));\n\n        std::unique_ptr<GaussianFunction> gxxxz(\n          new GaussianFunction(GaussianType::gxxxz, atom.position, bs.exps,\n            bs.coeffs));\n        gxxxz->operator*=(norm*sqrt(15.)/16.);\n        gaussians.emplace_back(std::move(gxxxz));\n\n        std::unique_ptr<GaussianFunction> gxxyy(\n          new GaussianFunction(GaussianType::gxxyy, atom.position, bs.exps,\n            bs.coeffs));\n        gxxyy->operator*=(norm*3./16.);\n        gaussians.emplace_back(std::move(gxxyy));\n\n        std::unique_ptr<GaussianFunction> gxxyz(\n          new GaussianFunction(GaussianType::gxxyz, atom.position, bs.exps,\n            bs.coeffs));\n        gxxyz->operator*=(norm*sqrt(3.)/16.);\n        gaussians.emplace_back(std::move(gxxyz));\n\n        std::unique_ptr<GaussianFunction> gxxzz(\n          new GaussianFunction(GaussianType::gxxzz, atom.position, bs.exps,\n            bs.coeffs));\n        gxxzz->operator*=(norm*3./16.);\n        gaussians.emplace_back(std::move(gxxzz));\n\n        std::unique_ptr<GaussianFunction> gxyyy(\n          new GaussianFunction(GaussianType::gxyyy, atom.position, bs.exps,\n            bs.coeffs));\n        gxyyy->operator*=(norm*sqrt(15.)/16.);\n        gaussians.emplace_back(std::move(gxyyy));\n\n        std::unique_ptr<GaussianFunction> gxyyz(\n          new GaussianFunction(GaussianType::gxyyz, atom.position, bs.exps,\n            bs.coeffs));\n        gxyyz->operator*=(norm*sqrt(3.)/16.);\n        gaussians.emplace_back(std::move(gxyyz));\n\n        std::unique_ptr<GaussianFunction> gxyzz(\n          new GaussianFunction(GaussianType::gxyzz, atom.position, bs.exps,\n            bs.coeffs));\n        gxyzz->operator*=(norm*sqrt(3.)/16.);\n        gaussians.emplace_back(std::move(gxyzz));\n\n        std::unique_ptr<GaussianFunction> gxzzz(\n          new GaussianFunction(GaussianType::gxzzz, atom.position, bs.exps,\n            bs.coeffs));\n        gxzzz->operator*=(norm*sqrt(15.)/16.);\n        gaussians.emplace_back(std::move(gxzzz));\n\n        std::unique_ptr<GaussianFunction> gyyyy(\n          new GaussianFunction(GaussianType::gyyyy, atom.position, bs.exps,\n            bs.coeffs));\n        // gyyyy->operator*=(norm*sqrt(105.)/16.);\n        gaussians.emplace_back(std::move(gyyyy));\n\n        std::unique_ptr<GaussianFunction> gyyyz(\n          new GaussianFunction(GaussianType::gyyyz, atom.position, bs.exps,\n            bs.coeffs));\n        gyyyz->operator*=(norm*sqrt(15.)/16.);\n        gaussians.emplace_back(std::move(gyyyz));\n\n        std::unique_ptr<GaussianFunction> gyyzz(\n          new GaussianFunction(GaussianType::gyyzz, atom.position, bs.exps,\n            bs.coeffs));\n        gyyzz->operator*=(norm*3./16.);\n        gaussians.emplace_back(std::move(gyyzz));\n\n        std::unique_ptr<GaussianFunction> gyzzz(\n          new GaussianFunction(GaussianType::gyzzz, atom.position, bs.exps,\n            bs.coeffs));\n        gyzzz->operator*=(norm*sqrt(15.)/16.);\n        gaussians.emplace_back(std::move(gyzzz));\n\n        std::unique_ptr<GaussianFunction> gzzzz(\n          new GaussianFunction(GaussianType::gzzzz, atom.position, bs.exps,\n            bs.coeffs));\n        // gzzzz->operator*=(norm*sqrt(105.)/16.);\n        gaussians.emplace_back(std::move(gzzzz));\n        nfunc += 15;\n      }\n      // G Spherical\n      else if(bs.type == 'G' && spherical) {\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::gxydx2my2, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::gyzdx2my2, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::gxydz2mr2, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::gyzdz2mr2, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::gzero, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::gxzdz2mr2, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::gx2my2dz2mr2, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::gxzdx2my2, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::gx4mx2y2py4, atom.position, bs.exps,\n            bs.coeffs));\n        nfunc += 9;\n      }\n      // H Cartesian\n      else if(bs.type == 'H' && !spherical) {\n        // Each shell is normalized with same value inside NWChem\n        const double norm = 32./(3.*sqrt(105.));\n\n        std::unique_ptr<GaussianFunction> hxxxxx(\n          new GaussianFunction(GaussianType::hxxxxx, atom.position, bs.exps,\n            bs.coeffs));\n        // hxxxxx->operator*=(norm*(3.*sqrt(105.)/32.));\n        gaussians.emplace_back(std::move(hxxxxx));\n\n        std::unique_ptr<GaussianFunction> hxxxxy(\n          new GaussianFunction(GaussianType::hxxxxy, atom.position, bs.exps,\n            bs.coeffs));\n        hxxxxy->operator*=(norm*(sqrt(105.)/32.));\n        gaussians.emplace_back(std::move(hxxxxy));\n\n        std::unique_ptr<GaussianFunction> hxxxxz(\n          new GaussianFunction(GaussianType::hxxxxz, atom.position, bs.exps,\n            bs.coeffs));\n        hxxxxz->operator*=(norm*(sqrt(105.)/32.));\n        gaussians.emplace_back(std::move(hxxxxz));\n\n        std::unique_ptr<GaussianFunction> hxxxyy(\n          new GaussianFunction(GaussianType::hxxxyy, atom.position, bs.exps,\n            bs.coeffs));\n        hxxxyy->operator*=(norm*(3.*sqrt(5.)/32.));\n        gaussians.emplace_back(std::move(hxxxyy));\n\n        std::unique_ptr<GaussianFunction> hxxxyz(\n          new GaussianFunction(GaussianType::hxxxyz, atom.position, bs.exps,\n            bs.coeffs));\n        hxxxyz->operator*=(norm*(sqrt(15.)/32.));\n        gaussians.emplace_back(std::move(hxxxyz));\n\n        std::unique_ptr<GaussianFunction> hxxxzz(\n          new GaussianFunction(GaussianType::hxxxzz, atom.position, bs.exps,\n            bs.coeffs));\n        hxxxzz->operator*=(norm*(3.*sqrt(5.)/32.));\n        gaussians.emplace_back(std::move(hxxxzz));\n\n        std::unique_ptr<GaussianFunction> hxxyyy(\n          new GaussianFunction(GaussianType::hxxyyy, atom.position, bs.exps,\n            bs.coeffs));\n        hxxyyy->operator*=(norm*(3.*sqrt(5.)/32.));\n        gaussians.emplace_back(std::move(hxxyyy));\n\n        std::unique_ptr<GaussianFunction> hxxyyz(\n          new GaussianFunction(GaussianType::hxxyyz, atom.position, bs.exps,\n            bs.coeffs));\n        hxxyyz->operator*=(norm*(3./32.));\n        gaussians.emplace_back(std::move(hxxyyz));\n\n        std::unique_ptr<GaussianFunction> hxxyzz(\n          new GaussianFunction(GaussianType::hxxyzz, atom.position, bs.exps,\n            bs.coeffs));\n        hxxyzz->operator*=(norm*(3./32.));\n        gaussians.emplace_back(std::move(hxxyzz));\n\n        std::unique_ptr<GaussianFunction> hxxzzz(\n          new GaussianFunction(GaussianType::hxxzzz, atom.position, bs.exps,\n            bs.coeffs));\n        hxxzzz->operator*=(norm*(3.*sqrt(5.)/32.));\n        gaussians.emplace_back(std::move(hxxzzz));\n\n        std::unique_ptr<GaussianFunction> hxyyyy(\n          new GaussianFunction(GaussianType::hxyyyy, atom.position, bs.exps,\n            bs.coeffs));\n        hxyyyy->operator*=(norm*(sqrt(105.)/32.));\n        gaussians.emplace_back(std::move(hxyyyy));\n\n        std::unique_ptr<GaussianFunction> hxyyyz(\n          new GaussianFunction(GaussianType::hxyyyz, atom.position, bs.exps,\n            bs.coeffs));\n        hxyyyz->operator*=(norm*(sqrt(15.)/32.));\n        gaussians.emplace_back(std::move(hxyyyz));\n\n        std::unique_ptr<GaussianFunction> hxyyzz(\n          new GaussianFunction(GaussianType::hxyyzz, atom.position, bs.exps,\n            bs.coeffs));\n        hxyyzz->operator*=(norm*(3./32.));\n        gaussians.emplace_back(std::move(hxyyzz));\n\n        std::unique_ptr<GaussianFunction> hxyzzz(\n          new GaussianFunction(GaussianType::hxyzzz, atom.position, bs.exps,\n            bs.coeffs));\n        hxyzzz->operator*=(norm*(sqrt(15.)/32.));\n        gaussians.emplace_back(std::move(hxyzzz));\n\n        std::unique_ptr<GaussianFunction> hxzzzz(\n          new GaussianFunction(GaussianType::hxzzzz, atom.position, bs.exps,\n            bs.coeffs));\n        hxzzzz->operator*=(norm*(sqrt(105.)/32.));\n        gaussians.emplace_back(std::move(hxzzzz));\n\n        std::unique_ptr<GaussianFunction> hyyyyy(\n          new GaussianFunction(GaussianType::hyyyyy, atom.position, bs.exps,\n            bs.coeffs));\n        // hyyyyy->operator*=(norm*(3.*sqrt(105.)/32.));\n        gaussians.emplace_back(std::move(hyyyyy));\n\n        std::unique_ptr<GaussianFunction> hyyyyz(\n          new GaussianFunction(GaussianType::hyyyyz, atom.position, bs.exps,\n            bs.coeffs));\n        hyyyyz->operator*=(norm*sqrt(105.)/32.);\n        gaussians.emplace_back(std::move(hyyyyz));\n\n        std::unique_ptr<GaussianFunction> hyyyzz(\n          new GaussianFunction(GaussianType::hyyyzz, atom.position, bs.exps,\n            bs.coeffs));\n        hyyyzz->operator*=(norm*(3.*sqrt(5.)/32.));\n        gaussians.emplace_back(std::move(hyyyzz));\n\n        std::unique_ptr<GaussianFunction> hyyzzz(\n          new GaussianFunction(GaussianType::hyyzzz, atom.position, bs.exps,\n            bs.coeffs));\n        hyyzzz->operator*=(norm*(3.*sqrt(5.)/32.));\n        gaussians.emplace_back(std::move(hyyzzz));\n\n        std::unique_ptr<GaussianFunction> hyzzzz(\n          new GaussianFunction(GaussianType::hyzzzz, atom.position, bs.exps,\n            bs.coeffs));\n        hyzzzz->operator*=(norm*sqrt(105.)/32.);\n        gaussians.emplace_back(std::move(hyzzzz));\n\n        std::unique_ptr<GaussianFunction> hzzzzz(\n          new GaussianFunction(GaussianType::hzzzzz, atom.position, bs.exps,\n            bs.coeffs));\n        // hzzzzz->operator*=(norm*(3.*sqrt(105.)/32.));\n        gaussians.emplace_back(std::move(hzzzzz));\n\n        nfunc += 21;\n      }\n      // H Spherical\n      else if(bs.type == 'H' && spherical) {\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hm5, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hm4, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hm3, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hm2, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hm1, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hzero, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hp1, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hp2, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hp3, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hp4, atom.position, bs.exps,\n            bs.coeffs));\n        gaussians.emplace_back(\n          new GaussianFunction(GaussianType::hp5, atom.position, bs.exps,\n            bs.coeffs));\n        nfunc += 11;\n      }\n      else\n        throw std::runtime_error(std::string(\"Unknown or unimplemented shell type: \") + bs.type);\n    }\n\n    err.get() << nfunc << \" basis functions.\" << std::endl;\n  }\n\n  unsigned size = gaussians.size();\n  for(unsigned j = 0; j < size; ++j) {\n    // add a {reference to the basis function} to the basis set vector\n    my_basis_set.emplace_back(std::ref(*gaussians[j].get()));\n  }\n  \n  my_properties = my_properties | Properties::Basis;\n}\n\n\n\n// helper routine for read_movecs\n\n/**\n * \\brief Read bytes from a binary file into the specified type.\n *\n * Attempts to account for the endian-ness of the binary data. This should\n * hopefully make the routine more robust to running NWChem jobs on one\n * machine and processing the files on another.\n *\n * \\tparam T Type of data to be read (only really need the size).\n * \\param [in,out] in The input stream.\n * \\param [in] swap Change the endian-ness of the read data?\n * \\return The read data, in the requested type.\n */\ntemplate<typename T>\nstatic T read_endian(std::istream &in, const bool swap) {\n  T ret;\n  char * const ptr = reinterpret_cast<char *>(&ret);\n  const unsigned bytes = sizeof(T);\n\n  if(swap) {\n    // need to swap the endian-ness of the data\n    // read byte-by-byte, in reverse order\n    for(unsigned j = 0; j < bytes; ++j)\n      in.read(ptr + (bytes - j - 1), 1);\n  }\n  else\n    // use the data as-is\n    in.read(ptr, bytes);\n\n  return ret;\n}\n\nvoid NWChem_Interface::read_movecs(const Properties::Properties props,\n  std::istream &in)\n{\n  int32_t num[2];\n  bool swap_endian = false;\n  unsigned nsets, nbasis;\n  const std::runtime_error errmess(\"Error reading NWChem movecs file.\");\n\n  // what properties are we storing? (all will be read from the movecs file)\n  const bool do_occupancies = (props & Properties::Occupancies).any();\n  const bool do_energies = (props & Properties::Energies).any();\n  const bool do_MOs = (props & Properties::MOs).any();\n\n  // temporary storage places (in case errors pop up while/after reading)\n  madness::Tensor<double> temp_occupancies, temp_energies;\n  madness::Tensor<double> temp_MOs;\n\n  // this function is based on the mov2asc program\n  // https://github.com/jeffhammond/nwchem/blob/master/contrib/mov2asc/mov2asc.F\n\n  // every write statement in fortran puts a 4-byte integer before and after\n  // the data. this integer contains the size of the data. the num array here\n  // is used to read these values.\n\n  // read the header information\n  // first up is a FORTRAN integer (4 bytes) telling the number of characters\n  // this should be 142 = 3*32 + 20 + 26 or 110 = 2*32 + 20 + 26\n  num[0] = read_endian<int32_t>(in, false);\n  if(num[0] != 142 && num[0] != 110) {\n    // try the other endian-ness\n    err.get() << \"Unable to read header. Trying opposite endian-ness.\" << std::endl;\n    char * const ptr = reinterpret_cast<char *>(num);\n    std::swap(ptr[0], ptr[3]);\n    std::swap(ptr[1], ptr[2]); // all four of these chars make up num[0]\n    swap_endian = true;\n    if(num[0] != 142 && num[0] != 110) {\n      err.get() << \"Still unable to read header. Abort.\" << std::endl;\n      throw errmess;\n    }\n    else\n      err.get() << \"Using opposite endian-ness for the remainder of this read.\" << std::endl;\n  }\n  // basissum, geomsum, bqsum, scftype20, and date. bqsum may be skipped\n  in.seekg(num[0], std::ios_base::cur);\n  // bookend for the length of the above strings combined\n  num[1] = read_endian<int32_t>(in, swap_endian);\n  if(num[1] != num[0]) {\n    err.get() << \"Error reading header (basissum, ..., date).\" << std::endl;\n    throw errmess;\n  }\n\n  // for whatever reason the scftype20 is repeated, with bookends (now = 20)\n  num[0] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] != 20) {\n    err.get() << \"Error reading header (scftype20).\" << std::endl;\n    throw errmess;\n  }\n  // scftype20\n  in.seekg(20, std::ios_base::cur);\n  num[0] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] != 20) {\n    err.get() << \"Error reading header (scftype20).\" << std::endl;\n    throw errmess;\n  }\n  \n  // size of the title (lentit)\n  num[0] = read_endian<int32_t>(in, swap_endian);\n  // lentit. don't check size explicitly, it's probably either 4 or 8\n  // depending on the fortran compiler/environment\n  in.seekg(num[0], std::ios_base::cur);\n  num[1] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] != num[1]) {\n    err.get() << \"Error reading header (lentit).\" << std::endl;\n    throw errmess;\n  }\n\n  // read the title itself\n  num[0] = read_endian<int32_t>(in, swap_endian);\n  // the title. varying length\n  in.seekg(num[0], std::ios_base::cur);\n  num[1] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] != num[1]) {\n    err.get() << \"Error reading title of NWChem job in header.\" << std::endl;\n    throw errmess;\n  }\n\n  // length of the basis set name (lenbas)\n  num[0] = read_endian<int32_t>(in, swap_endian);\n  // lentit. don't check size explicitly, it's probably either 4 or 8\n  // depending on the fortran compiler/environment\n  in.seekg(num[0], std::ios_base::cur);\n  num[1] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] != num[1]) {\n    err.get() << \"Error reading header (lenbas).\" << std::endl;\n    throw errmess;\n  }\n\n  // read the basis name itself\n  num[0] = read_endian<int32_t>(in, swap_endian);\n  // the title. varying length\n  in.seekg(num[0], std::ios_base::cur);\n  num[1] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] != num[1]) {\n    err.get() << \"Error reading basis set name in header.\" << std::endl;\n    throw errmess;\n  }\n\n  // the number of MO sets (nsets)\n  num[0] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] == 4) {\n    int32_t temp;\n    temp = read_endian<int32_t>(in, swap_endian);\n    nsets = static_cast<unsigned>(temp);\n  }\n  else if(num[0] == 8) {\n    int64_t temp;\n    temp = read_endian<int64_t>(in, swap_endian);\n    nsets = static_cast<unsigned>(temp);\n  }\n  else {\n    err.get() << \"Unknown or unimplemented integer type for the number of sets in header.\" << std::endl;\n    throw errmess;\n  }\n  num[1] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] != num[1]) {\n    err.get() << \"Error reading number of sets in header.\" << std::endl;\n    throw errmess;\n  }\n  if(nsets > 2) {\n    err.get() << \"The read_MOs basis has only been tested for movecs files that have a one or two sets.\\n\" <<\n      \"The results from this function need to be verified before use (\" << nsets << \" sets).\\n\"\n      \"Only the last two sets will be kept.\" << std::endl;\n  }\n\n  // size of the basis set (NBF in the mov2asc script)\n  num[0] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] == 4) {\n    int32_t temp;\n    temp = read_endian<int32_t>(in, swap_endian);\n    nbasis = static_cast<unsigned>(temp);\n  }\n  else if(num[0] == 8) {\n    int64_t temp;\n    temp = read_endian<int64_t>(in, swap_endian);\n    nbasis = static_cast<unsigned>(temp);\n  }\n  else {\n    err.get() << \"Unknown or unimplemented integer type for basis set size in header.\" << std::endl;\n    throw errmess;\n  }\n  num[1] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] != num[1]) {\n    err.get() << \"Error reading basis set size in header.\" << std::endl;\n    throw errmess;\n  }\n  // make sure this agrees with any information we've already read\n  if((properties & Properties::Basis) != Properties::None && nbasis != basis_set.size()) {\n    err.get() << \"The number of basis functions in read_MOs does not match the number of \" <<\n      \"basis functions read\\nfrom the NWChem log file. Use the following results with caution.\"\n      << std::endl;\n    throw errmess;\n  }\n\n  // read the number of vectors in each set (nmo)\n  //std::vector<unsigned> nmo(nsets);\n  //for(unsigned j = 0; j < nsets; ++j) {\n  //  num[0] = read_endian<int32_t>(in, swap_endian);\n  //  if(num[0] == 4) {\n  //    int32_t temp;\n  //    temp = read_endian<int32_t>(in, swap_endian);\n  //    nmo[j] = static_cast<unsigned>(temp);\n  //  }\n  //  else if(num[0] == 8) {\n  //    int64_t temp;\n  //    temp = read_endian<int64_t>(in, swap_endian);\n  //    nmo[j] = static_cast<unsigned>(temp);\n  //  }\n  //  else {\n  //    err.get() << \"Unknown or unimplemented integer type for nmo[\" << j << \"] in header.\" << std::endl;\n  //    throw errmess;\n  //  }\n  //  num[1] = read_endian<int32_t>(in, swap_endian);\n  //  if(num[0] != num[1]) {\n  //    err.get() << \"Error reading nmo[\" << j << \"] in header.\" << std::endl;\n  //    throw errmess;\n  //  }\n  //}\n  \n  // Fix ?\n  std::vector<unsigned> nmo(nsets);\n  num[0] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] == 4) {\n    int32_t temp;\n    temp = read_endian<int32_t>(in, swap_endian);\n    nmo[0] = static_cast<unsigned>(temp) + my_lineardeps;\n  }\n  if(num[0] == 8) {\n    int64_t temp;\n    temp = read_endian<int64_t>(in, swap_endian);\n    nmo[0] = static_cast<unsigned>(temp) + my_lineardeps;\n  } \n  else if(num[0] > 8) {\n    int64_t temp;\n    for(unsigned j = 0; j < nsets; ++j) { \n      temp = read_endian<int64_t>(in, swap_endian);\n      nmo[j] = static_cast<unsigned>(temp) + my_lineardeps;\n    }\n  }\n  num[1] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] != num[1]) {\n    err.get() << \"Error reading nmo sizes in header.\" << std::endl;\n    throw errmess;\n  }\n \n  // go through the sets\n  for(unsigned set = 0; set < nsets; ++set) { \n    // Doing this inside so that temp variables get reset correctly\n    // allocate space to store the occupation numbers, the eigenvalues, and the\n    // eigenvectors (MO vectors), as desired by the request\n    if(do_occupancies) {\n      madness::Tensor<double> one(nmo[set]);\n      temp_occupancies = copy(one);\n    }\n    if(do_energies) {\n      madness::Tensor<double> two(nmo[set]);\n      temp_energies = copy(two);\n    }\n    if(do_MOs) {\n      madness::Tensor<double> three(nmo[set], nmo[set]);\n      temp_MOs = copy(three);\n    }\n\n    // first read the occupancies\n    // number of bits bookend (8 for double * nmo[set]);\n    num[0] = read_endian<int32_t>(in, swap_endian);\n    if(num[0] != static_cast<int>(8*nmo[set])) {\n      err.get() << \"Unexpected number of occupancies for set \" << set << '.' << std::endl\n        << \"Read \" << num[0] << \" but expected \" << static_cast<int>(8*nmo[set]) << std::endl;\n      throw errmess;\n    }\n    if(do_occupancies)\n      for(unsigned j = 0; j < nmo[set]; ++j)\n        temp_occupancies[j] = read_endian<double>(in, swap_endian);     \n    else\n      in.seekg(num[0], std::ios_base::cur); // just buzz past them.\n    num[1] = read_endian<int32_t>(in, swap_endian);\n    if(num[0] != num[1]) {\n      err.get() << \"Error reading occupancies for set \" << set << '.' << std::endl\n        << \"Read \" << num[1] << \" but expected \" << num[0] << std::endl;\n      throw errmess;\n    }\n\n    // next up are the eigenvalues (energies)\n    // number of bits bookend (8 for double * nmo[set]);\n    num[0] = read_endian<int32_t>(in, swap_endian);\n    if(num[0] != static_cast<int>(8*nmo[set])) {\n      err.get() << \"Unexpected number of energies for set \" << set << '.'\n        << std::endl;\n      throw errmess;\n    }\n    if(do_energies)\n      for(unsigned j = 0; j < nmo[set]; ++j)\n        // NWChem reports energies in Hartrees\n        temp_energies[j] = read_endian<double>(in, swap_endian);\n    else\n      in.seekg(num[0], std::ios_base::cur); // just buzz past them.\n    num[1] = read_endian<int32_t>(in, swap_endian);\n    if(num[0] != num[1]) {\n      err.get() << \"Error reading energies for set \" << set << '.' << std::endl;\n      throw errmess;\n    }\n\n    // finally, read the MO vectors, which were written vector-by-vector\n    for(unsigned mo = 0; mo < nmo[set] - my_lineardeps; ++mo) {\n      // bookend size of the vector\n      num[0] = read_endian<int32_t>(in, swap_endian);\n      if(num[0] != static_cast<int>(8*nbasis)) {\n        err.get() << \"Unexpected number of coefficients in MO \" << mo << \" of set \"\n          << set << '.' << std::endl << \"Read \" << nmo[0] << \" but expected \" <<\n          static_cast<int>(8*nbasis) << std::endl;\n        throw errmess;\n      }\n      if(do_MOs)\n        for(unsigned coeff = 0; coeff < nbasis; ++coeff)\n          temp_MOs(coeff, mo) = read_endian<double>(in, swap_endian);\n      else\n        in.seekg(num[0], std::ios_base::cur); // just buzz past the MO\n      // bookend size of the vector\n      num[1] = read_endian<int32_t>(in, swap_endian);\n      if(num[0] != static_cast<int>(num[1])) {\n        err.get() << \"Error reading coefficients of MO \" << mo << \" of set \"\n          << set << '.' << std::endl << \"Read \" << nmo[0] << \" but expected \"\n          << num[1] << std::endl;\n        throw errmess;\n      }\n    }\n\n    // move/swap the placeholders into the class's storage space\n    // ALPHA\n    if(do_occupancies && set == 0) {\n      my_occupancies = std::move(temp_occupancies); \n      my_properties = my_properties | Properties::Occupancies;\n    }\n    if(do_energies && set == 0) {\n      my_energies = std::move(temp_energies);\n      my_properties = my_properties | Properties::Energies;\n    }\n    if(do_MOs && set == 0) { \n      my_MOs = std::move(temp_MOs);\n      my_properties = my_properties | Properties::MOs;\n    }\n\n    // move/swap the placeholders into the class's storage space\n    // BETA\n    if(do_occupancies && set == 1) {\n      my_beta_occupancies = std::move(temp_occupancies); \n      my_properties = my_properties | Properties::Occupancies;\n    }\n    if(do_energies && set == 1) {\n      my_beta_energies = std::move(temp_energies);\n      my_properties = my_properties | Properties::Energies;\n    }\n    if(do_MOs && set == 1) {  \n      my_beta_MOs = std::move(temp_MOs);\n      my_properties = my_properties | Properties::MOs;\n    }\n  }\n\n  // at the very end of the movecs file is the total energy and nuclear repulsion\n  // energy of the system\n  num[0] = read_endian<int32_t>(in, swap_endian);\n  if(num[0] != 16) {\n    err.get() << \"Unexpected size reading the footer.\" << std::endl;\n    throw errmess;\n  }\n  read_endian<double>(in, swap_endian); // total energy\n  read_endian<double>(in, swap_endian); // nuclear repulsion\n  num[1] = read_endian<int32_t>(in, swap_endian);\n  if(num[1] != 16) {\n    err.get() << \"Error reading the footer.\" << std::endl;\n    throw errmess;\n  }\n}\n\n} // namespace slymer\n"
  },
  {
    "path": "src/madness/chem/NWChem.h",
    "content": "/* This file is a part of Slymer, which is distributed under the Creative\n   Commons Attribution-NonCommercial 4.0 International Public License.\n\n   (c) 2017 Stony Brook University. */\n\n/**\n * \\file ESInterface/NWChem.h\n * \\brief API and helper routines for interfacing with NWChem.\n */\n\n#ifndef __ESInterface_NWChem_h__\n#define __ESInterface_NWChem_h__\n\n#include <iostream>\n#include <memory>\n#include<madness/chem/ESInterface.h>\n#include<madness/chem/gaussian.h>\n\nnamespace slymer {\n\n/// Class for interfacing with NWChem (tested on version 6.6).\nclass NWChem_Interface : public ES_Interface {\nprotected:\n  /// The base file name of the NWChem output.\n  std::string my_fname;\n\n  /// Storage for the actual basis functions.\n  std::vector<std::unique_ptr<GaussianFunction>> gaussians;\n\npublic:\n  NWChem_Interface() = delete;\n\n  /// Publically-accessible version of the file name.\n  const std::string &fname;\n\n  /**\n   * \\brief Wrap the output of a NWChem computation.\n   *\n   * The parameter is the base file name (potentially including path) for the\n   * NWChem output files. For example, the NWChem log file will be fname.out,\n   * the molecular orbitals file will be fname.movecs, etc.\n   *\n   * \\param[in] fname_ Base file name for the NWChem computation.\n   * \\param[in,out] err_ Output stream for error or warning messages.\n   */\n  NWChem_Interface(const std::string &fname_, std::ostream &err_)\n    : ES_Interface(err_), my_fname(fname_), gaussians(0), fname(my_fname) {}\n\n  /**\n   * \\brief Changes the base file name.\n   *\n   * \\param[in] fname_ The new base file name for the NWChem computation.\n   */\n  void reset(const std::string &fname_) {\n    ES_Interface::reset();\n    my_fname = fname_;\n    gaussians.clear();\n  }\n\n  /** \n   * \\brief Read the specified properties and store them in the member variables.\n   *\n   * \\throw std::invalid_argument if the NWChem logfile (fname.out) cannot be\n   *    opened.\n   * \\throw std::runtime_error if there is an error reading the NWChem output\n   *    file.\n   *\n   * \\param[in] props The properties to be read, using a bit flag combination.\n   */\n  virtual void read(Properties::Properties props) override;\n\nprotected:\n  /**\n   * \\brief Extract and store the atom types and positions.\n   *\n   * \\param[in,out] in The stream containing the NWChem output file.\n   */\n  void read_atoms(std::istream &in);\n\n  /**\n   * \\brief Extract and store the basis set.\n   *\n   * \\todo Reading Cartesian-type d and f shells has not been tested.\n   * \\note Only shells of type s, p, d, f, g and h are implemented.\n   *\n   * \\param[in,out] in The stream containing the NWChem output file.\n   */\n  void read_basis_set(std::istream &in);\n\n  /**\n   * \\brief Read the NWChem movecs file containing occupation numbers,\n   *    MO energies, and MO coefficients.\n   *\n   * \\param[in] props Properties to store from the read (from the list above).\n   * \\param[in,out] in The stream for the NWChem output movecs file.\n   */\n  void read_movecs(const Properties::Properties props, std::istream &in);\n};\n\n} // namespace slymer\n\n#endif\n"
  },
  {
    "path": "src/madness/chem/PNO.cpp",
    "content": "/*\n * PNO.cpp\n *\n *  Created on: Oct 22, 2018\n *      Author: kottmanj\n */\n\n#include<madness/chem/PNO.h>\n\nnamespace madness {\n\nmadness::PairEnergies PNO::compute_projected_mp2_energies(PNOPairs& pairs) const {\n\tdouble total = 0.0;\n\tPAIRLOOP(it)\n\t{\n\t\tdouble es = 0.0;\n\t\tdouble et = 0.0;\n\t\tif(pairs.pno_ij[it.ij()].size()>0){\n\t\t\tconst auto& t=pairs.t_ij;\n\t\t\t// make gijab tensors\n\t\t\tconst vector_real_function_3d& pno = pairs.pno_ij[it.ij()];\n\t\t\tconst real_function_3d& moi = f12.acmos[it.i()];\n\t\t\tconst real_function_3d& moj = f12.acmos[it.j()];\n\t\t\tconst Tensor<double> tijab = t[it.ij()];\n\t\t\tconst Tensor<double> ts = tijab + transpose(tijab);\n\t\t\tconst Tensor<double> tt = tijab - transpose(tijab);\n\t\t\tTensor<double> gijab = matrix_inner(world, moi * pno, apply(world, *poisson, moj * pno));\n\n\t\t\tdouble sfactor = 1.0;\n\t\t\tif (it.diagonal())\n\t\t\t\tsfactor = 0.5;\n\t\t\tconst double tfactor = 3.0;\n\n\t\t\tfor (size_t a = 0; a < pno.size(); ++a) {\n\t\t\t\tfor (size_t b = 0; b < pno.size(); ++b) {\n\t\t\t\t\tes += sfactor * (ts(a, b) * gijab(a, b));\n\t\t\t\t\tet += tfactor * (tt(a, b) * gijab(a, b));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tpairs.energies.eijs[it.ij()] = es;\n\t\tpairs.energies.eijt[it.ij()] = et;\n\t\ttotal += (es + et);\n\n\t}\n\tpairs.energies.energy = total;\n\tpairs.energies.update();\n\treturn pairs.energies;\n}\n\nvoid PNO::solve(std::vector<PNOPairs>& all_pairs) const {\n\t// set target thresh for correlation computation\n\t// in general it can be (much?) lower than that of the HF\n\t// the importance of each PNO is roughly proportional to its norm times the square root of the density\n\t// (hard to be more precise ... the energy contribution of PNO ~ Lowdin's formula for the increments\n\t//  in He (n+1/2)^{-6} ... will change when F12 added)\n\tFunctionDefaults < 3 > ::set_thresh(param.thresh());\n\tparam.print(\"PNO Parameters\\npno\",\"end\");\n\tif (param.f12()){\n\t\tf12.param.print(\"F12 Parameters\\nf12\", \"end\");\n\t}\n\tif (param.debug()) {\n\t\tprint(\"ElectronPairIterator will iterate the pairs: pair_ij, i , j , ij\");\n\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t  //const size_t ij = it.ij();\n\t\t  //const size_t i = it.i();\n\t\t  //const size_t j = it.j();\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << it.name() << \", \" << it.i() << \", \" << it.j() << \", \" << it.ij() << \"\\n\";\n\t\t}\n\t\tprint(\"OrbitalIterator iterates\");\n\t\tfor (OrbitalIterator kit = oit(); kit; ++kit) {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << kit.i() << \"\\n\";\n\t\t}\n\t}\n\n\tif (param.cispd().empty()){\n\t\tif(all_pairs.empty()){\n\t\t\tPNOPairs mp2(MP2_PAIRTYPE,f12.acmos.size());\n\t\t\tsolve_mp2(mp2);\n\t\t\tall_pairs.push_back(mp2);\n\t\t}\n\t\telse{\n\t\t\tsolve_mp2(all_pairs);\n\t\t}\n\t}else solve_cispd(all_pairs);\n}\n\nvector_real_function_3d PNO::guess_virtuals(const vector_real_function_3d& f, const GuessType& inpgt) const {\n\tstd::string test = std::to_string(inpgt);\n\tGuessType guesstype = inpgt;\n\tif (guesstype == UNKNOWN_GUESSTYPE)\n\t\tguesstype = param.guesstype();\n\n\tif (guesstype == FROM_FILE_GUESSTYPE)\n\t\treturn (basis.guess_contracted_virtuals_from_file());\n\telse if (guesstype == PARTIAL_WAVE_GUESSTYPE)\n\t\treturn (basis.guess_virtuals_internal(param.partial_wave()));\n\telse if (guesstype == PREDEFINED_GUESSTYPE)\n\t\treturn basis.predefined_guess(param.predefined_guess());\n\telse if (guesstype == SCF_GUESSTYPE)\n\t\treturn Q(nemo.get_calc()->ao);\n\telse if (guesstype == EXOP_GUESSTYPE)\n\t\treturn Q(basis.guess_with_exop(f, param.exop(),param.exop_trigo()));\n\telse if (guesstype == EMPTY_GUESSTYPE)\n\t\treturn vector_real_function_3d();\n\telse if (guesstype == PSI4_GUESSTYPE){\n\t\treturn Q(basis.guess_with_psi4(nemo.get_calc()->amo));\n\t}\n\telse\n\t\tMADNESS_EXCEPTION((\"unknown guesstype\" + std::to_string(guesstype)).c_str(), 1);\n\n\tMADNESS_EXCEPTION((\"unknown guesstype\" + std::to_string(guesstype)).c_str(), 1);\n\treturn vector_real_function_3d();\n}\n\nPairEnergies PNO::compute_cispd_correction_es(const vector_real_function_3d& xcis, PNOPairs& pairs) const {\n\tTIMER(timer);\n\tMADNESS_ASSERT(pairs.type==CISPD_PAIRTYPE);\n\tdouble s2b = 0.0;\n\tdouble s2c = 0.0;\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tconst Tensor<double> t = (2.0 * pairs.t_ij[it.ij()] - transpose(pairs.t_ij[it.ij()]));\n\t\tconst real_function_3d moi = f12.acmos[it.i()];\n\t\tconst real_function_3d moj = f12.acmos[it.j()];\n\t\tconst real_function_3d xi = xcis[it.i()];\n\t\tconst real_function_3d xj = xcis[it.j()];\n\t\tconst auto& pno=pairs.pno_ij[it.ij()];\n\t\tdouble factor = 1.0;\n\t\tif (it.diagonal())\n\t\t\tfactor = 0.5;\n\n\t\tdouble s2b_ij = 0.0;\n\t\tdouble s2c_ij = 0.0;\n\t\tif(pno.empty()){\n\t\t\tmsg << pairs.name(it) << \" is empty: no contribution\\n\";\n\t\t}else{\n\t\t\t{\n\t\t\t\tTensor<double> gijab;\n\t\t\t\tif (it.diagonal())\n\t\t\t\t\tgijab = 2.0 * matrix_inner(world, apply(world, *poisson, xi * pno), moj * pno); // <xij|g|ab> + <ixj|g|ab> tensor\n\t\t\t\telse\n\t\t\t\t\tgijab = matrix_inner(world, apply(world, *poisson, xi * pno), moj * pno) + matrix_inner(world, moi * pno, apply(world, *poisson, xj * pno));\n\n\t\t\t\tfor (size_t a = 0; a < pno.size(); ++a) {\n\t\t\t\t\tfor (size_t b = 0; b < pno.size(); ++b) {\n\t\t\t\t\t\ts2b_ij += (t(a, b) * gijab(a, b));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t{\n\t\t\t\t// transform pnos according to transposed(Ox)|a>, Ox=|xk><k| -> transposed(Ox)=|k><x_k|\n\t\t\t\tProjector<double, 3> Oxt(xcis, f12.acmos);\n\t\t\t\tconst vector_real_function_3d tpno = Oxt(pno);\n\t\t\t\tTensor<double> gijab;\n\t\t\t\tif (it.diagonal())\n\t\t\t\t\tgijab = 2.0 * matrix_inner(world, apply(world, *poisson, moi * tpno), moj * pno);\n\t\t\t\telse\n\t\t\t\t\tgijab = matrix_inner(world, apply(world, *poisson, moi * tpno), moj * pno) + matrix_inner(world, moi * pno, apply(world, *poisson, moj * tpno));\n\n\t\t\t\tfor (size_t a = 0; a < pno.size(); ++a) {\n\t\t\t\t\tfor (size_t b = 0; b < pno.size(); ++b) {\n\t\t\t\t\t\ts2c_ij -= (t(a, b) * gijab(a, b));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\ts2b += factor * (s2b_ij);\n\t\ts2c += factor * (s2c_ij);\n\t\tpairs.energies.eijt[it.ij()]=factor*(s2b_ij+s2c_ij);\n\t}\n\tmsg << \"---------------------\\n\";\n\tmsg << \"CIS(D) ES Correction:\\n\";\n\tmsg << \"S2b=\" << s2b << \"\\n\";\n\tmsg << \"S2c=\" << s2c << \"\\n\";\n\tmsg << \"tot=\" << s2b+s2c << \"\\n\";\n\tmsg << \"---------------------\\n\";\n\tpairs.energies.update();\n\ttimer.stop().print(\"CIS(D) Correction ES\");\n\treturn pairs.energies;\n}\n\nPairEnergies PNO::compute_cispd_correction_gs(const vector_real_function_3d& xcis,const PNOPairs& pairs) const {\n\tMADNESS_ASSERT(pairs.type==MP2_PAIRTYPE);\n\t// compute GS part of CIS(D) energy\n\tMyTimer timer = MyTimer(world).start();\n\tdouble s4a = 0.0;\n\tdouble s4b = 0.0;\n\tdouble s4c = 0.0;\n\tPairEnergies energies(pairs.npairs);\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tconst size_t i = it.i();\n\t\tconst size_t j = it.j();\n\t\tconst size_t ij = it.ij();\n\t\tconst real_function_3d& moi = f12.acmos[i];\n\t\tconst real_function_3d& moj = f12.acmos[j];\n\t\tconst vector_real_function_3d& acmos = f12.acmos;\n\t\tconst vector_real_function_3d& pno = pairs.pno_ij[ij];\n\t\tconst Tensor<double>& t2=pairs.t_ij[ij];\n\t\tconst real_function_3d& xi = xcis[i];\n\t\tconst real_function_3d& xj = xcis[j];\n\n\t\tdouble s4b_ij = 0.0;\n\t\tdouble s4a_ij = 0.0;\n\t\tdouble s4c_ij = 0.0;\n\t\tif(pno.empty()){\n\t\t\tmsg << pairs.name(it) << \" empty: no contribution\\n\";\n\t\t}else{\n\t\t\t// j*<i|g|xk> intermediate\n\t\t\tconst vector_real_function_3d igx_j = apply(world, *poisson, moi * xcis) * moj;\n\t\t\t// Integrals <i,j|g|xk,b> : kxb matrix\n\t\t\tconst Tensor<double> ijgxb = matrix_inner(world, igx_j, pno);\n\t\t\t// intermediates needed for all parts\n\t\t\tvector_real_function_3d iga = apply(world, (*poisson), (moi * pno));\n\t\t\tvector_real_function_3d jgb = apply(world, (*poisson), (moj * pno)); // simplify later\n\t\t\tconst Tensor<double> Sia = inner(world, xi, pno);\n\t\t\tconst Tensor<double> Sjb = inner(world, xj, pno); // simplify later\n\t\t\t// 2tijab-tijba part\n\t\t\tconst Tensor<double> t = (2.0 * t2 - transpose(t2));\n\n\t\t\t{\n\t\t\t\t// transformed a\n\t\t\t\tvector_real_function_3d tpno;\n\t\t\t\tfor (size_t a = 0; a < pno.size(); ++a) {\n\t\t\t\t\tconst Tensor<double> Ska = inner(world, pno[a], xcis);\n\t\t\t\t\treal_function_3d ta = real_factory_3d(world);\n\t\t\t\t\tfor (size_t k = 0; k < size_t(Ska.size()); ++k)\n\t\t\t\t\t\tta += Ska(k) * xcis[k];\n\t\t\t\t\ttpno.push_back(ta);\n\t\t\t\t}\n\t\t\t\tMADNESS_ASSERT(tpno.size() == pno.size());\n\t\t\t\tTensor<double> gijab;\n\t\t\t\t{\n\t\t\t\t\tconst vector_real_function_3d ita = moi * tpno;\n\t\t\t\t\tconst Tensor<double> tmp1 = matrix_inner(world, ita, jgb);\n\t\t\t\t\tconst vector_real_function_3d jtb = moj * tpno;\n\t\t\t\t\tconst Tensor<double> tmp2 = matrix_inner(world, iga, jtb);\n\t\t\t\t\tgijab = (tmp1 + tmp2);\n\t\t\t\t}\n\t\t\t\tfor (size_t a = 0; a < pno.size(); ++a) {\n\t\t\t\t\tfor (size_t b = 0; b < pno.size(); ++b) {\n\t\t\t\t\t\ts4a_ij -= (t(a, b) * gijab(a, b));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//\t\t\t\tstd::cout << it.name()<< \"s4a_ij=\" << s4a_ij << \"\\ndb1=\" << db1 << \"\\ndb2=\" << db2 <<\"\\n\";\n\n\t\t\t{\n\t\t\t\tconst Tensor<double> Sik = inner(world, xi, xcis);\n\t\t\t\treal_function_3d ti = real_factory_3d(world);\n\t\t\t\tfor (size_t k = 0; k < size_t(Sik.size()); ++k)\n\t\t\t\t\tti += Sik(k) * acmos[k];\n\t\t\t\treal_function_3d tj = real_factory_3d(world);\n\t\t\t\tif (it.diagonal())\n\t\t\t\t\ttj = ti;\n\t\t\t\telse {\n\t\t\t\t\tconst Tensor<double> Sjk = inner(world, xj, xcis);\n\t\t\t\t\tfor (size_t k = 0; k < size_t(Sjk.size()); ++k)\n\t\t\t\t\t\ttj += Sjk(k) * acmos[k];\n\t\t\t\t}\n\t\t\t\t// transformed gijab with i=Sik_k or/and j=Sjk_k\n\t\t\t\tTensor<double> gijab;\n\t\t\t\t{\n\t\t\t\t\tvector_real_function_3d tia = ti * pno;\n\t\t\t\t\tconst Tensor<double> tmp1 = matrix_inner(world, tia, jgb);\n\t\t\t\t\tvector_real_function_3d tjb = tj * pno;\n\t\t\t\t\tconst Tensor<double> tmp2 = matrix_inner(world, iga, tjb);\n\t\t\t\t\tgijab = (tmp1 + tmp2);\n\t\t\t\t}\n\t\t\t\tMADNESS_ASSERT(size_t(gijab.size()) == pno.size() * pno.size());\n\t\t\t\tfor (size_t a = 0; a < pno.size(); ++a) {\n\t\t\t\t\tfor (size_t b = 0; b < pno.size(); ++b) {\n\t\t\t\t\t\ts4b_ij -= (t(a, b) * gijab(a, b));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t{\n\t\t\t\tTensor<double> gjb(pno.size()); // sum_k 2<kj|g|xk,b>-<jk|g|xk,b>\n\t\t\t\tTensor<double> gia(pno.size()); // sum_k 2<ki|g|xk,a>-<ik|g|xk,a>\n\t\t\t\treal_function_3d im_kxk = real_factory_3d(world);\n\t\t\t\tfor (size_t k = 0; k < acmos.size(); ++k) {\n\t\t\t\t\tim_kxk += acmos[k] * xcis[k];\n\t\t\t\t\tgjb -= inner(world, (*poisson)(moj * xcis[k]), acmos[k] * pno);\n\t\t\t\t\tgia -= inner(world, (*poisson)(moi * xcis[k]), acmos[k] * pno);\n\t\t\t\t}\n\t\t\t\tgjb += 2 * inner(world, im_kxk, jgb);\n\t\t\t\tgia += 2 * inner(world, im_kxk, iga);\n\t\t\t\tfor (size_t a = 0; a < pno.size(); ++a) {\n\t\t\t\t\tfor (size_t b = 0; b < pno.size(); ++b) {\n\t\t\t\t\t\ts4c_ij += (t(a, b) * (Sia(a) * gjb(b) + Sjb(b) * gia(a)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tdouble factor = 1.0;\n\t\tif (it.diagonal()) factor = 0.5;\n\t\ts4a += s4a_ij * factor;\n\t\ts4b += s4b_ij * factor;\n\t\ts4c += s4c_ij * factor;\n\t\tenergies.eijs[ij]=factor*(s4a_ij+s4b_ij+s4c_ij);\n\t}\n\tmsg << \"---------------------\\n\";\n\tmsg << \"CIS(D) GS Correction:\\n\";\n\tmsg << \"S4a=\" << s4a << \"\\n\";\n\tmsg << \"S4b=\" << s4b << \"\\n\";\n\tmsg << \"S4c=\" << s4c << \"\\n\";\n\tmsg << \"tot=\" << s4a+s4b+s4c << \"\\n\";\n\tmsg << \"---------------------\\n\";\n\tenergies.update();\n\ttimer.stop().print(\"CIS(D) Correction GS\");\n\treturn energies;\n}\n\nPairEnergies PNO::compute_cispd_f12_correction_gs(const vector_real_function_3d& xcis, PairEnergies& energies) const {\n\tif (param.f12() == false) return energies;\n\n\tMyTimer timer = MyTimer(world).start();\n\tdouble s4a_f12 = 0.0;\n\tdouble s4b_f12 = 0.0;\n\tdouble s4c_f12 = 0.0;\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tconst size_t i = it.i();\n\t\tconst size_t j = it.j();\n\t\tconst size_t ij = it.ij();\n\t\tconst real_function_3d& moi = f12.acmos[i];\n\t\tconst real_function_3d& moj = f12.acmos[j];\n\t\tconst vector_real_function_3d& acmos = f12.acmos;\n\t\tconst real_function_3d& xi = xcis[i];\n\t\tconst real_function_3d& xj = xcis[j];\n\n\t\tdouble s4a_f12_ij = 0.0;\n\t\tdouble s4b_f12_ij = 0.0;\n\t\tdouble s4c_f12_ij = 0.0;\n\n\t\t// intermediates\n\t\tconst Tensor<double> Sik = inner(world, xi, xcis);\n\t\treal_function_3d ti = real_factory_3d(world);\n\t\tfor (size_t k = 0; k < size_t(Sik.size()); ++k)\n\t\t\tti += Sik(k) * acmos[k];\n\t\treal_function_3d tj = real_factory_3d(world);\n\t\tif (it.diagonal())\n\t\t\ttj = ti;\n\t\telse {\n\t\t\tconst Tensor<double> Sjk = inner(world, xj, xcis);\n\t\t\tfor (size_t k = 0; k < size_t(Sjk.size()); ++k)\n\t\t\t\ttj += Sjk(k) * acmos[k];\n\t\t}\n\t\treal_function_3d im_kxk = real_factory_3d(world);\n\t\tfor (size_t k = 0; k < acmos.size(); ++k)\n\t\t\tim_kxk += acmos[k] * xcis[k];\n\n\t\t{\n\t\t\t// 2.0<xk,yk|f|ij> - <yk,xk|f|ij> , yk = Q(igxk*j) and similar for ij -> ji\n\t\t\tif (it.diagonal()) {\n\t\t\t\tconst vector_real_function_3d yk = Q(apply(world, *poisson, moi * xcis) * moj);\n\t\t\t\ts4a_f12_ij = -2.0 * (madness::inner(world, apply(world, *f12.fop, xcis * moi), yk * moj).sum());\n\t\t\t} else {\n\t\t\t\t{\n\t\t\t\t\tconst vector_real_function_3d yk = Q(apply(world, *poisson, moi * xcis) * moj);\n\t\t\t\t\ts4a_f12_ij = -1.0 * (2.0 * madness::inner(world, apply(world, *f12.fop, xcis * moi), yk * moj).sum() - madness::inner(world, apply(world, *f12.fop, xcis * moj), yk * moi).sum());\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t\tconst vector_real_function_3d ykx = Q(apply(world, *poisson, moj * xcis) * moi);\n\t\t\t\t\ts4a_f12_ij += -1.0\n\t\t\t\t\t\t\t* (2.0 * madness::inner(world, apply(world, *f12.fop, xcis * moj), ykx * moi).sum() - madness::inner(world, apply(world, *f12.fop, xcis * moi), ykx * moj).sum());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t{\n\t\t\t// here we have 2.0*(<ti,j|gQf|ij> + <tj,i|gQf|ji>) - (<ti,j|gQf|ji> + <j,ti|gQf|ij>)\n\t\t\tif (it.diagonal()) {\n\t\t\t\ts4b_f12_ij = -2.0 * (f12.compute_fQg_integral(moi, moj, ti, moj));\n\t\t\t} else\n\t\t\t\ts4b_f12_ij = -1.0\n\t\t\t\t* (2.0 * (f12.compute_fQg_integral(moi, moj, ti, moj) + f12.compute_fQg_integral(moj, moi, tj, moi))\n\t\t\t\t\t\t- (f12.compute_fQg_integral(moj, moi, ti, moj) + f12.compute_fQg_integral(moi, moj, tj, moi)));\n\t\t}\n\n\t\t{\n\t\t\t// similar than s4a\n\t\t\tdouble part1 = 0.0;\n\t\t\t{\n\t\t\t\tconst real_function_3d yj = Q((*poisson)(im_kxk) * moj);\n\t\t\t\tif (it.diagonal())\n\t\t\t\t\tpart1 = 2.0 * madness::inner((*f12.fop)(xi * moi), yj * moj);\n\t\t\t\telse {\n\t\t\t\t\tconst real_function_3d yi = Q((*poisson)(im_kxk) * moi);\n\t\t\t\t\tpart1 = 2.0 * (madness::inner((*f12.fop)(xi * moi), yj * moj) + madness::inner((*f12.fop)(xj * moj), yi * moi))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t- (madness::inner((*f12.fop)(xi * moj), yj * moi) + madness::inner((*f12.fop)(xj * moi), yi * moj));\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble part2 = 0.0;\n\t\t\t{\n\t\t\t\treal_function_3d jgxk_k = real_factory_3d(world);\n\t\t\t\tfor (size_t k = 0; k < acmos.size(); ++k)\n\t\t\t\t\tjgxk_k += (*poisson)(moj * xcis[k]) * acmos[k];\n\t\t\t\tconst real_function_3d yj = Q(jgxk_k);\n\t\t\t\tif (it.diagonal())\n\t\t\t\t\tpart2 = 2.0 * madness::inner((*f12.fop)(xi * moi), yj * moj);\n\t\t\t\telse {\n\t\t\t\t\treal_function_3d igxk_k = real_factory_3d(world);\n\t\t\t\t\tfor (size_t k = 0; k < acmos.size(); ++k)\n\t\t\t\t\t\tigxk_k += (*poisson)(moi * xcis[k]) * acmos[k];\n\t\t\t\t\tconst real_function_3d yi = Q(igxk_k);\n\t\t\t\t\tpart2 = 2.0 * (madness::inner((*f12.fop)(xi * moi), yj * moj) + madness::inner((*f12.fop)(xj * moj), yi * moi))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t- (madness::inner((*f12.fop)(xi * moj), yj * moi) + madness::inner((*f12.fop)(xj * moi), yi * moj));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//std::cout << \"part1 = \" << part1 << \"\\npart2=\" << part2 << \"\\n\";\n\t\t\ts4c_f12_ij = 2.0 * part1 - part2;\n\t\t}\n\t\tdouble factor = 1.0;\n\t\tif (it.diagonal())\n\t\t\tfactor = 0.5;\n\n\t\ts4a_f12 += s4a_f12_ij * factor;\n\t\ts4b_f12 += s4b_f12_ij * factor;\n\t\ts4c_f12 += s4c_f12_ij * factor;\n\t\tenergies.eijs_f12[ij]=factor*(s4a_f12_ij+s4b_f12_ij+s4c_f12_ij);\n\t}\n\n\tmsg << \"-------------------------\\n\";\n\tmsg << \"CIS(D) GS Correction F12:\\n\";\n\tmsg << \"S4a_f12=\" << s4a_f12 << \"\\n\";\n\tmsg << \"S4b_f12=\" << s4b_f12 << \"\\n\";\n\tmsg << \"S4c_f12=\" << s4c_f12 << \"\\n\";\n\tmsg << \"tot_f12=\" << s4a_f12+s4b_f12+s4c_f12 << \"\\n\";\n\tmsg << \"-------------------------\\n\";\n\ttimer.stop().print(\"CIS(D) F12-Correction GS\");\n\n\treturn energies;\n}\n\nPNOPairs PNO::solve_mp2(PNOPairs& mp2) const {\n\tmsg.section(\"Solve PNO-MP2\");\n\tconst size_t nocc=pit().nocc();\n\t//const size_t npairs=pit().npairs();\n\tif(mp2.npairs==0) mp2 = PNOPairs(MP2_PAIRTYPE,nocc);\n\t// compute f12 energies before\n\tif(param.f12() and f12.param.energytype()==PROJECTED_ENERGYTYPE){\n\t\tPairEnergies f12_energies=f12.compute_projected_f12_energies();\n\t\tconst double old=mp2.energies.energy_f12;\n\t\tmp2.energies.eijs_f12=f12_energies.eijs_f12;\n\t\tmp2.energies.eijt_f12=f12_energies.eijt_f12;\n\t\tmp2.energies.update();\n\t\tf12.print_pair_energies(f12_energies.eijs_f12,f12_energies.eijt_f12,\"MP2 F12 Energies\",mp2.type);\n\t\tmsg << \"difference to old f12 energy = \" << mp2.energies.energy_f12-old << \"\\n\";\n\t}\n\tmp2 = iterate_pairs(mp2);\n\tconst std::valarray<vector_real_function_3d>& pno_ij = mp2.pno_ij;\n\tif (param.f12() and f12.param.energytype() == HYLLERAAS_ENERGYTYPE) {\n\t        //const PairEnergies& energies_from_solve = mp2.energies;\n\t\t//const std::valarray<Tensor<double> >& t2_ij = mp2.t_ij;\n\t\t// compute energies (or just print them)\n\t\tPairEnergies pair_energies = mp2.energies;\n\t\tMyTimer timef12 = MyTimer(world).start();\n\t\tPairEnergies ef12(f12.npairs());\n\t\tef12 = f12.compute_f12_energies(pno_ij);\n\t\tf12.print_pair_energies(pair_energies.eijs, pair_energies.eijt, \"Regularized Energies\");\n\t\tf12.print_f12_energies(ef12, \"F12 Energies\");\n\t\tstd::valarray<double> est(f12.npairs());\n\t\tstd::valarray<double> ett(f12.npairs());\n\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\test[it.ij()] = pair_energies.eijs[it.ij()] + ef12.eijs_f12[it.ij()];\n\t\t\tett[it.ij()] = pair_energies.eijt[it.ij()] + ef12.eijt_f12[it.ij()];\n\t\t}\n\t\tf12.print_pair_energies(est, ett, \"Total Energies\");\n\t\ttimef12.stop().print(\"Compute F12 Energies (total time)\");\n\t\tif (world.rank() == 0) {\n\t\t\tstd::cout << \"\\n\\n\";\n\t\t\tstd::cout << \"------------------------------------\\n\";\n\t\t\tstd::cout << \"MP2 Energy=\" << pair_energies.energy << \"\\n\";\n\t\t\tstd::cout << \"F12 Energy=\" << ef12.energy_f12 << \"\\n\";\n\t\t\tstd::cout << \"Sum Energy=\" << pair_energies.energy + ef12.energy_f12 << \"\\n\";\n\t\t\tstd::cout << \"------------------------------------\\n\";\n\t\t\tstd::cout << \"\\n\\n\";\n\t\t}\n\t\tpair_energies.eijs_f12 = ef12.eijs_f12;\n\t\tpair_energies.eijt_f12 = ef12.eijt_f12;\n\t\tpair_energies.energy_f12 = ef12.energy_f12;\n\t\tmp2.energies=pair_energies;\n\t} else {\n\t\tf12.print_pair_energies(mp2, \"Final MP2 Energies\");\n\t}\n\t// rank information\n\tstd::pair<size_t, size_t> av_rank = get_average_rank(pno_ij);\n\tif (world.rank() == 0)\n\t\tstd::cout << \"Average | Max Rank: \" << av_rank.first << \" | \" << av_rank.second << \"\\n\";\n\n\tmp2.energies.update();\n\treturn mp2;\n}\n\nstd::vector<PNOPairs> PNO::solve_cispd(std::vector<PNOPairs>& result) const {\n\tif(result.empty()){\n\t\tPNOPairs mp2(MP2_PAIRTYPE,f12.acmos.size());\n\t\tresult.push_back(mp2);\n\t}else MADNESS_ASSERT(result.size()>1);\n\tMyTimer timer_solve_cispd = MyTimer(world).start();\n\tconst size_t nocc=pit().nocc();\n\t//const size_t npairs=pit().npairs();\n\tmsg.section(\"Solve PNO-CIS(D)\");\n\n\t// 1. get CIS vectors\n\tMyTimer timer_read_cis = MyTimer(world).start();\n\tstd::vector<CISData> cis_result;\n\tfor (const auto& cispd : param.cispd()) {\n\t\t// contains excitation number and cis excitation energy\n\t\tconst size_t ex = cispd.first;\n\t\tconst double omega = cispd.second;\n\t\tif (world.rank() == 0)\n\t\t\tstd::cout << \"Looking for CIS vectors with omega=\" << omega << \", (ex=\" << ex << \")\\n\";\n\n\t\tvector_real_function_3d xvec;\n\t\tfor (size_t i = 0; i < nocc; ++i) {\n\t\t\tconst size_t ii = i + param.freeze(); // this is how the CIS module stores them (easier for me so I dont have to rename)\n\t\t\tconst std::string name = std::to_string(ex) + \"_\" + \"x\" + std::to_string(ii);\n\t\t\treal_function_3d tmp = real_factory_3d(world);\n\t\t\tload(tmp, name);\n\t\t\txvec.push_back(tmp);\n\t\t}\n\t\tMADNESS_ASSERT(xvec.size() == nocc);\n\t\tCISData tmpcis(ex,omega,xvec);\n\t\tcis_result.push_back(tmpcis);\n\t}\n\ttimer_read_cis.stop().print(\"read cis vectors\");\n\t// 2. solve MP2\n\tMyTimer time_mp2 = MyTimer(world).start();\n\tif(result.empty()){\n\t\tPNOPairs mp2(MP2_PAIRTYPE,f12.acmos.size());\n\t\tsolve_mp2(mp2);\n\t\tresult.push_back(mp2);\n\t}else{\n\t\tsolve_mp2(result[0]);\n\t}\n\tPNOPairs& mp2=result[0];\n\tdouble mp2_energy = mp2.energies.total_energy();\n\n\t//const std::valarray<Tensor<double> >& t2_mp2_ij = mp2.t_ij;\n\tconst std::valarray<vector_real_function_3d>& pno_mp2_ij = mp2.pno_ij;\n\ttime_mp2.stop().print(\"MRA-PNO-MP2 Calculation\");\n\t// 4. solve CIS(D) doubles\n\tsize_t count = 1;\n\tstd::vector<std::pair<double, double> > exenergies; // store CIS and CIS(D) energies\n\tstd::vector<std::pair<size_t, size_t> > av_ranks_cispd; // store average and max ranks\n\n\tfor (const auto& x : cis_result) {\n\t        //const double omega_cis = x.omega;\n\t\tconst vector_real_function_3d xcis = x.x;\n\t\t//double omega_gs = 0.0;\n\t\tPairEnergies cispd_energies(mp2.npairs);\n\t\tif (param.no_compute() == MP2_PAIRTYPE || param.no_compute() == ALL_PAIRTYPE) {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"no compute keyword for MP2: skipping CIS(D)-GS part\\n\";\n\t\t} else {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"\\n\\nComputung GS part of CIS(D) energy:\\n\\n\";\n\n\t\t\tcispd_energies = compute_cispd_correction_gs(xcis, mp2);\n\t\t\tif (param.f12()){\n\t\t\t\tcispd_energies=compute_cispd_f12_correction_gs(xcis,cispd_energies);\n\t\t\t}\n\t\t\tcispd_energies.update();\n\t\t\t//omega_gs = cispd_energies.total_energy();\n\t\t}\n\n\t\tif (param.f12()){\n\t\t\tcispd_energies=compute_cispd_f12_correction_es(xcis,cispd_energies);\n\t\t}\n\t\tcispd_energies.update();\n\n\t\tMyTimer timer_cispd = MyTimer(world).start();\n\t\tPNOPairs cispd(CISPD_PAIRTYPE,nocc,x);\n\t\tif(result.size()>count) cispd=result[count];\n\t\telse cispd=PNOPairs(CISPD_PAIRTYPE,nocc,x);\n\n\t\tcispd.energies=cispd_energies;\n\t\tf12.print_pair_energies(cispd,\"CIS(D) with full GS Correction and F12 Parts of ES \" + std::to_string(x.number));\n\t\tcispd = iterate_pairs(cispd);\n\t\ttimer_cispd.stop().print(\"compute CIS(D) doubles\");\n\n\t\t//const double cispd_energy_ex = cispd.energies.energy;\n\t\t//const std::valarray<Tensor<double> >& t2_cispd_ij = cispd.t_ij;\n\t\tconst std::valarray<vector_real_function_3d>& pno_cispd_ij = cispd.pno_ij;\n\n\t\t// (re)-compute CIS(D) part of the energy (s2b and s2c)\n\t\tcispd.energies=compute_cispd_correction_es(xcis, cispd);\n\n\t\t// print result\n\t\tf12.print_pair_energies(cispd,\"CIS(D) Correction\");\n\n\t\tif (world.rank() == 0) {\n\t\t\tstd::cout << \"\\n\\n\\n\";\n\t\t\tstd::cout << \"\\n================CIS(D) Excitation \"+std::to_string(x.number)+\"================\\n\";\n\t\t\tstd::cout << \"MP2 correlation energy  = \" << mp2_energy << \"\\n\";\n\t\t\tstd::cout << std::setw(12) << \"CIS\"  << \" | \" << std::setw(12) << \"CIS(D)\" << \" | \" << std::setw(12) << \"delta\" << \" | \" <<  \"\\n\";\n\t\t\tstd::cout << std::scientific << std::setprecision(5);\n\t\t\tstd::cout << std::setw(12) << cispd.cis.omega  << \" | \" << std::setw(12) << cispd.cis.omega+cispd.energies.total_energy() << \" | \" << std::setw(12) << cispd.energies.total_energy() << \" | \\n\";\n\t\t\tstd::cout << \"\\n=================================================\\n\";\n\t\t\tstd::cout << \"\\n\\n\\n\";\n\t\t}\n\n\n\t\tav_ranks_cispd.push_back(get_average_rank(pno_cispd_ij));\n\t\texenergies.push_back(std::make_pair(cispd.cis.omega,cispd.cis.omega+cispd.energies.total_energy()));\n\t\tresult.push_back(cispd);\n\t\t++count;\n\t}\n\tif (world.rank() == 0 and exenergies.size()>1) {\n\t\tstd::cout << \"\\n\\n\\n\";\n\t\tstd::cout << \"\\n================CIS(D) finished==================\\n\";\n\t\tstd::cout << \"MP2 correlation energy  = \" << mp2_energy << \"\\n\";\n\t\tstd::cout << std::setw(12) << \"CIS\"  << \" | \" << std::setw(12) << \"CIS(D)\" << \" | \" << std::setw(12) << \"delta\" << \" | \" <<  \"\\n\";\n\t\tstd::cout << std::scientific << std::setprecision(5);\n\t\tfor(const auto& o:exenergies)\n\t\t\tstd::cout << std::setw(12)<< o.first  << \" | \" << std::setw(12) << o.second << \" | \" << std::setw(12) << o.second-o.first  << \" | \\n\";\n\t\tstd::cout << \"\\n=================================================\\n\";\n\t\tstd::cout << \"\\n\\n\\n\";\n\t}\n\tconst std::pair<size_t, size_t> av_rank_mp2 = get_average_rank(pno_mp2_ij);\n\tif (world.rank() == 0) {\n\t\tstd::cout << std::setw(12)<< \"Average | Max Rank MP2    : \" << std::setw(3) << av_rank_mp2.first << \" | \" << std::setw(3)<< av_rank_mp2.second << \"\\n\";\n\t\tfor (const auto& rank : av_ranks_cispd)\n\t\t\tstd::cout <<             \"Average | Max Rank CIS(D) : \" << std::setw(3) << rank.first << \" | \" << std::setw(3) << rank.second << \"\\n\";\n\t}\n\ttimer_solve_cispd.stop().print(\"solve_cispd\");\n\treturn result;\n}\n\nstd::pair<size_t, size_t> PNO::get_average_rank(const std::valarray<vector_real_function_3d>& va) const {\n\tsize_t sum = 0;\n\tsize_t vectors = va.size();\n\tsize_t max = 0;\n\tif (vectors == 0)\n\t\treturn std::make_pair(0, 0); // failsafe\n\n\tfor (const auto& v : va) {\n\t\tsum += v.size();\n\t\tmax = std::max(max, v.size());\n\t}\n\treturn std::make_pair(sum / vectors, max);\n}\nPNOPairs PNO::truncate_pairs(PNOPairs& pairs) const {\n\tTIMER(timer);\n\tconst double thresh=param.thresh();\n\t// truncating with less fences due to shallow copy\n\tvector_real_function_3d all=pairs.extract(pairs.pno_ij);\n\tall=append(all,pairs.extract(pairs.Kpno_ij));\n\tall=append(all,pairs.extract(pairs.W_ij_i));\n\t//all=append(all,pairs.extract(pairs.W_ij_j)); -> will lead to race condition for diagonal pairs\n\tPAIRLOOP(it){\n\t\tif(not it.diagonal()) all=append(all,pairs.W_ij_j[it.ij()]);\n\t}\n\n\tif(all.empty()) return pairs;\n\t//const double size_0 = get_size(world,all);\n\tcompress(world,all);\n\ttruncate(world,all,thresh);\n\n\tpairs.update_meminfo();\n\tmsg << pairs.meminfo << \"\\n\";\n\n\ttimer.stop().print(\"truncate\");\n\treturn pairs;\n}\n\n/// freeze pairs which do not contribute significantly\n/// frozen pairs will not be further optimized\nPNOPairs PNO::freeze_insignificant_pairs(PNOPairs& pairs)const{\n\tpairs.energies.update();\n\tPAIRLOOP(it){\n\t\tconst size_t i=it.i()+param.freeze();\n\t\tconst size_t j=it.j()+param.freeze();\n\t\tbool freeze=false;\n\t\tconst double threshold = std::min(param.thresh()*0.1,param.econv_pairs());\n\t\tif(fabs(pairs.energies.eij[it.ij()])<threshold) freeze=true;\n\n\t\tif(freeze){\n\t\t\tmsg << \"freeze pair \" << pairs.name(it) << \" (not further optimized: Energy below \" << threshold << \")\\n\";\n\t\t\tpairs.frozen_ij[it.ij()]=true;\n\t\t}\n\n\t\t// now check if the pair should be frozen anyway (demanded by parameter)\n\t\t// freeze pairs when demanded (but not when not yet initialized and pre-optimized\n\t\t// i.e. freeze if demanded and the pair was restarted\n\t\tif(not freeze){\n\t\t\tfor(const auto orb: param.freeze_pairs_of_orbital()){\n\t\t\t  if(it.i()==size_t(orb) or it.j()==size_t(orb)) freeze=true;\n\t\t\t}\n\t\t\tfor(const auto& pair: param.freeze_pairs()){\n\t\t\t  if(it.i()==size_t(pair.first) and it.j()==size_t(pair.second)) freeze=true;\n\t\t\t  if(it.j()==size_t(pair.first) and it.i()==size_t(pair.second)) freeze=true;\n\t\t\t}\n\n\t\t\t// if a whitelist exists this means that all pairs which are not on that list should be frozen no matter what the other parameters say\n\t\t\tif(param.active_pairs_of_orbital().size()>0){\n\t\t\t\tfreeze=true;\n\t\t\t\tfor(const auto orb: param.active_pairs_of_orbital()){\n\t\t\t\t  if(i==size_t(orb) or j==size_t(orb)) freeze=false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(freeze){\n\t\t\t\tmsg << \"freeze pair \" << pairs.name(it) << \" demanded by parameters \" << \"\\n\";\n\t\t\t\tpairs.frozen_ij[it.ij()]=true;\n\t\t\t}\n\n\t\t}\n\n\n\n\t}\n\treturn pairs;\n}\n\nPNOPairs PNO::truncate_pair_ranks(PNOPairs& pairs) const {\n\t// take care this does not truncate intermediates\n\tstd::valarray<vector_real_function_3d>& result = pairs.pno_ij;\n\tif (pairs.maxranks_ij.max() > 0) {\n\t\tPAIRLOOP(it){\n\t\t\tconst int maxrank=pairs.maxranks_ij[it.ij()];\n\t\t\tconst vector_real_function_3d& tmp = pairs.pno_ij[it.ij()];\n\t\t\tif (tmp.size() < size_t(maxrank) or maxrank<0) continue; // fast cont.\n\t\t\tvector_real_function_3d tr_tmp;\n\t\t\tfor (size_t i = 0; i < size_t(maxrank); ++i) tr_tmp.push_back(tmp[tmp.size() - 1 - i]);\n\t\t\tresult[it.ij()] = tr_tmp;\n\t\t\tmsg << it.name() << \" truncated to rank \" << maxrank << \"\\n\";\n\t\t\tif(tr_tmp.size()!=tmp.size()) pairs.clear_intermediates(it);\n\t\t}\n\t} else msg << \"all maxranks below 0 ... no truncation\\n\";\n\tpairs.pno_ij=result;\n\treturn pairs;\n}\n\nPNOPairs PNO::initialize_pairs(PNOPairs& pairs, const GuessType& inpgt) const {\n\tTIMER(timer);\n\t// convenience\n\tconst PairType& pt=pairs.type;\n\tconst size_t npairs=pit().npairs();\n\tstd::valarray<vector_real_function_3d>& pno_ij=pairs.pno_ij;\n\tbool do_cispd = (pt==CISPD_PAIRTYPE);\n\n\t// determine if the function was speficifally called or if the parameters should be used\n\tGuessType guesstype = inpgt;\n\tif (guesstype == UNKNOWN_GUESSTYPE) guesstype = param.guesstype();\n\n\t// determine of restart or other options for the speficfic pair type where demanded\n\tconst bool restart = (param.restart() == pt || param.restart() == ALL_PAIRTYPE);\n\t//const bool no_opt = (param.no_opt() == pt || param.no_opt() == ALL_PAIRTYPE);\n\tconst bool no_guess = (param.no_guess() == pt || param.no_guess() == ALL_PAIRTYPE || guesstype == EMPTY_GUESSTYPE);\n\tconst bool pair_specific_guess = (guesstype == EXOP_GUESSTYPE);\n\n\t// 0. look for restart options\n\tif (restart) {\n\t\tmsg << \"Restart demanded for \" << pt << \" pairs\\n\";\n\t\tpairs=load_pnos(pairs);\n\t}\n\n\t// 1. compute initial guess for the virtuals\n\tif (no_guess == false and pair_specific_guess == false) {\n\t\tvector_real_function_3d virtuals;\n\t\t// use all MOs to seed the guess virtuals\n\t\tvector_real_function_3d init_mos = nemo.get_calc()->amo; // only needed for GT_EXOP\n\t\tif (not pairs.cis.x.empty())\n\t\t\tinit_mos = append(init_mos, pairs.cis.x);\n\t\tvirtuals = guess_virtuals(init_mos);\n\n\t\t//for(size_t i=0;i<virtuals.size();++i)plot_plane(world,virtuals[i],\"guess_virtuals_\"+std::to_string(i));\n\t\tif (not virtuals.empty()) {\n\t\t\tvirtuals = Q(virtuals);\n\t\t\tvirtuals = orthonormalize_rrcd(virtuals,0.1*param.thresh());\n\t\t\tTIMER(timer);\n\t\t\tPAIRLOOP(it){\n\t\t\t\tif(param.diagonal() and not it.diagonal()) continue;\n\t\t\t\tvector_real_function_3d& pno = pno_ij[it.ij()];\n\t\t\t\tif (not pno.empty()) {\n\t\t\t\t\tmsg << it.name() << \": pnos not empty ... project out and assemble\\n\";\n\t\t\t\t\tQProjector<double, 3> Qpno( pno, pno);\n\t\t\t\t\tpno = append(pno, Qpno(virtuals));\n\t\t\t\t} else\n\t\t\t\t\tpno = append(pno, virtuals);\n\t\t\t}\n\t\t\ttimer.stop().print(\"project restarted pnos out of guess\");\n\t\t}else msg << \"virtuals are empty\\n\";\n\n\n\t} else if (no_guess == false) {\n\t\t// use just the MOs corresponding to the specific pairs to seed the virtual guess\n\t\tmsg<< \"Demanded the pair-specific exop guess\\n\";\n\t\tTIMER(timer);\n\t\tPAIRLOOP(it)\n\t\t{\n\t\t\tif(param.diagonal() and not it.diagonal()) continue;\n\t\t\tvector_real_function_3d& pno = pno_ij[it.ij()];\n\t\t\tvector_real_function_3d pair_mo;\n\t\t\tpair_mo.push_back(nemo.get_calc()->amo[it.i() + param.freeze()]);\n\t\t\tif (not it.diagonal())\n\t\t\t\tpair_mo.push_back(nemo.get_calc()->amo[it.j() + param.freeze()]);\n\t\t\tif (do_cispd) {\n\t\t\t\tconst double normi = pairs.cis.x[it.i()].norm2(); // cis vector contains only active orbitals\n\t\t\t\tconst real_function_3d xi = (1.0 / normi) * pairs.cis.x[it.i()];\n\t\t\t\tpair_mo.push_back(xi);\n\t\t\t\tif (not it.diagonal()) {\n\t\t\t\t  //const double normj = pairs.cis.x[it.j()].norm2(); // cis vector contains only active orbitals\n\t\t\t\t\tconst real_function_3d xj = (1.0 / normi) * pairs.cis.x[it.j()];\n\t\t\t\t\tpair_mo.push_back(xj);\n\t\t\t\t}\n\t\t\t}\n\t\t\tvector_real_function_3d virtij = guess_virtuals(pair_mo, guesstype);\n\t\t\tif (not pno.empty()) {\n\t\t\t\tQProjector<double, 3> Qpno( pno, pno);\n\t\t\t\tvirtij = Qpno(virtij);\n\t\t\t}\n\n\t\t\tmsg << \"Created \" << virtij.size() << \" virtuals for \" << it.name() << \"\\n\";\n\t\t\tpno = append(pno, virtij);\n\t\t}\n\t\ttimer.stop().print(\"Pair specific exop guess\");\n\t} else msg<< \"no guess was explicitly demanded for \" << pt << \"\\n\\n\";\n\n\tTIMER(timerQ);\n\tPAIRLOOP(it)\n\t{\n\t\tif (not pno_ij[it.ij()].empty()) pno_ij[it.ij()] = Q(pno_ij[it.ij()]);\n\t}\n\tpairs=orthonormalize_cholesky(pairs);\n\ttimerQ.stop().print(\"apply Q and orthonormalize PNOs\");\n\n\tmsg << \"Created Guess:\\n\";\n\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tmsg << it.name() << \" with \" << pno_ij[it.ij()].size() << \" guess functions\\n\";\n\t}\n\tTIMER(trt)\n\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tif(param.diagonal() and not it.diagonal()) continue;\n\t\tconst double size1 = get_size(world, pno_ij[it.ij()]);\n\t\ttruncate(world, pno_ij[it.ij()], param.thresh());\n\t\tconst double size2 = get_size(world, pno_ij[it.ij()]);\n\t\tif (world.rank() == 0)\n\t\t\tstd::cout << \"guess \" << it.name() << \" size: \" << size1 << \" | \" << size2 << \" Gbyte (after truncation)\\n\";\n\t}\n\ttrt.stop().print(\"truncate guess\");\n\n\tpairs.pno_ij=pno_ij;\n\n\t// initialize maxranks and frozen pairs\n\tpairs.frozen_ij=std::valarray<bool>(false,npairs);\n\tpairs.maxranks_ij=std::valarray<int>(param.maxrank(),npairs);\n\t// init amplitudes as empty tensors\n\tpairs.t_ij=std::valarray<Tensor<double> >(npairs);\n\n\t// erase off-diagonal pairs and adapt maxranks\n\t// if diagonal approximation is demanded\n\tif(param.diagonal()){\n\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\tif(not it.diagonal()){\n\t\t\t\tpairs.maxranks_ij[it.ij()]=0;\n\t\t\t\tpairs.frozen_ij[it.ij()] = true;\n\t\t\t\tpairs.pno_ij[it.ij()]=vecfuncT();\n\t\t\t}\n\t\t}\n\t}\n\n\n\ttimer.stop().print(\"Initialize Pairs\");\n\tpairs.verify();\n\n\treturn pairs;\n}\n\n\n\nPNOPairs PNO::compute_fluctuation_potential(const ElectronPairIterator& it, PNOPairs& pairs) const {\n\tconst size_t i = it.i();\n\tconst size_t j = it.j();\n\tconst auto pno=pairs.pno_ij[it.ij()];\n\tconst real_function_3d& moi = f12.acmos[i];\n\tconst real_function_3d& moj = f12.acmos[j];\n\tvector_real_function_3d& W_ij_i=pairs.W_ij_i[it.ij()];\n\tvector_real_function_3d& W_ij_j=pairs.W_ij_j[it.ij()];\n\tif(pno.empty()) return pairs;\n\n\tif (param.f12()) {\n\t\t// for f12 reuse the Kpno intermediate for both W potentials\n\t\tconst vector_real_function_3d& Kpno=pairs.Kpno_ij[it.ij()];\n\t\tW_ij_i = compute_Vreg_aj_i(i, j, pno, Kpno);\n\t\tif (it.diagonal())\n\t\t\tW_ij_j = W_ij_i;\n\t\telse\n\t\t\tW_ij_j = compute_Vreg_aj_i(j, i, pno, Kpno);\n\t} else {\n\t\tW_ij_i = compute_V_aj_i(moi, moj, pno, Q);\n\t\tif (it.diagonal())\n\t\t\tW_ij_j = W_ij_i;\n\t\telse\n\t\t\tW_ij_j = compute_V_aj_i(moj, moi, pno, Q);\n\t}\n\treturn pairs;\n}\n\nPNOPairs PNO::compute_cispd_fluctuation_potential(const ElectronPairIterator& it, PNOPairs& pairs) const {\n  //const size_t ij = it.ij();\n\tconst size_t i = it.i();\n\tconst size_t j = it.j();\n\tconst auto& pno=pairs.pno_ij[it.ij()];\n\tconst auto& cis=pairs.cis.x;\n\tconst auto& Vx=pairs.cis.Vx;\n\tconst real_function_3d& moi = f12.acmos[i];\n\tconst real_function_3d& moj = f12.acmos[j];\n\tvector_real_function_3d& W_ij_i=pairs.W_ij_i[it.ij()];\n\tvector_real_function_3d& W_ij_j=pairs.W_ij_j[it.ij()];\n\tif(pno.empty()) return pairs;\n\n\tProjector<double, 3> Ox(f12.acmos, cis); // adjoint Ox projector\n\tProjector<double, 3> Oxt(cis, f12.acmos); // adjoint Ox projector\n\tconst real_function_3d& Vxi = Vx[i];\n\tconst real_function_3d& Vxj = Vx[j];\n\tif (param.f12()) {\n\t\tconst real_function_3d& xi = cis[i];\n\t\tconst real_function_3d& xj = cis[j];\n\t\tconst auto& Kpno=pairs.Kpno_ij[it.ij()];\n\n\t\t// avoid double computation in off-diag pairs\n\t\tTIMER(ktimer);\n\t\tconst vector_real_function_3d Ox_pno = Oxt(pno);\n\t\tconst auto KOx_pno = K(Ox_pno);\n\t\tktimer.stop().print(\"K(Ox(pno))\");\n\n\t\tW_ij_i = compute_Vreg_aj_i(xi, moj, pno, Q, Kpno)\n\t\t\t\t\t\t\t\t\t\t+ compute_Vreg_aj_i(moi, xj, pno, Q, Kpno)\n\t\t\t\t\t\t\t\t\t\t- compute_Vreg_aj_i(moi, moj, Ox_pno, Q, KOx_pno) // can not use Kpno here (would need K(Ox_pno)\n\t\t\t\t\t\t\t\t\t\t- compute_Vreg_aj_i(moi, moj, pno, Ox, Kpno)\n\t\t\t\t\t\t\t\t\t\t- compute_Vreg_aj_i_fock_residue(Vxi, moj, pno)\n\t\t\t\t\t\t\t\t\t\t- compute_Vreg_aj_i_fock_residue(moi, Vxj, pno)\n\t\t\t\t\t\t\t\t\t\t+ compute_Vreg_aj_i_commutator_response(moi, moj, pno, Vx);\n\t\t//truncate(world,W_ij_i[ij],param.thresh);\n\t\tif (it.diagonal())\n\t\t\tW_ij_j = W_ij_i;\n\t\telse {\n\t\t\tW_ij_j = compute_Vreg_aj_i(xj, moi, pno, Q, Kpno)\n\t\t\t\t\t\t\t\t\t\t\t+ compute_Vreg_aj_i(moj, xi, pno, Q, Kpno)\n\t\t\t\t\t\t\t\t\t\t\t- compute_Vreg_aj_i(moj, moi, Ox_pno, Q, KOx_pno) // can not use Kpno here (would need K(Ox_pno)\n\t\t\t\t\t\t\t\t\t\t\t- compute_Vreg_aj_i(moj, moi, pno, Ox, Kpno)\n\t\t\t\t\t\t\t\t\t\t\t- compute_Vreg_aj_i_fock_residue(Vxj, moi, pno)\n\t\t\t\t\t\t\t\t\t\t\t- compute_Vreg_aj_i_fock_residue(moj, Vxi, pno)\n\t\t\t\t\t\t\t\t\t\t\t+ compute_Vreg_aj_i_commutator_response(moj, moi, pno, Vx);\n\t\t\t//truncate(world,W_ij_j[ij],param.thresh);\n\t\t}\n\t} else {\n\t\tconst vector_real_function_3d Ox_pno = Oxt(pno);\n\t\tconst real_function_3d& xi = cis[i];\n\t\tconst real_function_3d& xj = cis[j];\n\t\tW_ij_i = compute_V_aj_i(xi, moj, pno, Q) + compute_V_aj_i(moi, xj, pno, Q) - compute_V_aj_i(moi, moj, Ox_pno, Q) - compute_V_aj_i(moi, moj, pno, Ox);\n\t\tif (it.diagonal())\n\t\t\tW_ij_j = W_ij_i;\n\t\telse {\n\t\t\tW_ij_j = compute_V_aj_i(xj, moi, pno, Q) + compute_V_aj_i(moj, xi, pno, Q) - compute_V_aj_i(moj, moi, Ox_pno, Q) - compute_V_aj_i(moj, moi, pno, Ox);\n\t\t}\n\t}\n\treturn pairs;\n}\n\nPNOPairs PNO::iterate_pairs(PNOPairs & pairs) const {\n\tmsg.section(\"Iterate Pairs\");\n\tif (param.adaptive_solver() == pairs.type or param.adaptive_solver() == ALL_PAIRTYPE){\n\t\tif(param.guesstype() != EXOP_GUESSTYPE){\n\t\t\tmsg << \"demanded adaptive_solver=\" << param.adaptive_solver() << \" and guesstype=\" << param.guesstype() << \" change one of them!\\n\";\n\t\t\tMADNESS_EXCEPTION(\"adaptive solver only works for guesstype = exop, deactivate adaptive_solver for the demanded guesstype\",1)\n\t\t}\n\t\treturn adaptive_solver(pairs);\n\t}\n\n\tmsg.section(\"Standard Solver\");\n\tif(pairs.empty() or pairs.npairs==0){\n\t\tmsg.output(\"Initializing Pairs:\");\n\t\tpairs = initialize_pairs(pairs,param.guesstype());\n\t\t// set the maxranks to maxrank (or to pno_ij size if there was a restart)\n\t\tPAIRLOOP(it) pairs.maxranks_ij[it.ij()] = param.maxrank();\n\t\tprint_ranks(pairs);\n\t}\n\telse{\n\t\tmsg.warning(\"Standard solver expects empty pairs!\");\n\t\tMADNESS_EXCEPTION(\"Standard solver expects empty pairs\",1);\n\t}\n\n\tpairs = iterate_pairs_internal(pairs, param.maxiter_micro(), param.econv_micro());\n\n\treturn pairs;\n}\n\n\nPNOPairs PNO::adaptive_solver(PNOPairs& pairs)const{\n\tmsg.section(\"Adaptive Solver\");\n\tif(pairs.empty() or pairs.npairs==0){\n\t\tmsg.output(\"Initializing empty Pairs:\");\n\t\tpairs = initialize_pairs(pairs,EMPTY_GUESSTYPE);\n\t}\n\telse{\n\t\tmsg.output(\"Set back intermediates of pairs:\");\n\t\tPAIRLOOP(it) pairs.frozen_ij[it.ij()]=false;\n\t\tPAIRLOOP(it) pairs.clear_intermediates(it);\n\t}\n\n\tdouble energy = pairs.energies.total_energy();\n\n\t// set the maxranks to zero (or to pno_ij size if there was a restart)\n\tPAIRLOOP(it) pairs.maxranks_ij[it.ij()] = pairs.pno_ij[it.ij()].size();\n\n\t// find out how many virtuals are created for diagonal pairs (this is used to get the same growing for all pairs)\n\tint rank_increase = (madness::guessfactory::make_predefined_exop_strings(param.exop())).size();\n\tif(param.rank_increase()>0) rank_increase=param.rank_increase();\n\n\t// setup the adaptive protocol\n\tstd::vector<std::string> multipoles(param.maxiter_macro(),param.exop());\n\tif(param.exop()==\"multipole\"){\n\t\t// multipole protocol needs at least 3 macroiterions therefore the +2\n\t\tmultipoles=std::vector<std::string>(param.maxiter_macro()+2,\"octopole\");\n\t\tmultipoles[0]=\"dipole+\";\n\t\tmultipoles[1]=\"quadrupole\";\n\t\tmultipoles = std::vector<std::string>(multipoles.begin(), multipoles.begin()+param.maxiter_macro());\n\t}else if(param.exop()==\"octopole\"){\n\t\t// fix that stupid name in madness TDHF at one point\n\t\tstd::vector<std::string> multipoles(param.maxiter_macro(),\"octopole\");\n\t}\n\n\tmsg << \"Guess protocol for adaptively growing ranks is: \" << multipoles << \"\\n\";\n\n\tfor (size_t i = 0; i < size_t(param.maxiter_macro()); ++i) {\n\n\t\t// fast return if possible\n\t\tif(param.exop()==\"none\" and i>0){\n\t\t\tmsg << \"exop=none ... no further macroiterations needed\\n\";\n\t\t\tbreak;\n\t\t}\n\n\t\tif (i>0){\n\t\t\tbool maxrank_reached=true;\n\t\t\tPAIRLOOP(it)\n\t\t\t{\n\t\t\t  const bool frozen = pairs.frozen_ij[it.ij()];\n\t\t\t  if (not frozen and pairs.pno_ij[it.ij()].size() < size_t(param.maxrank())) maxrank_reached = false;\n\t\t\t}\n\t\t\tif (maxrank_reached){\n\t\t\t\tmsg << \"Maximum Rank of\" << param.maxrank() << \" reached for all non-frozen pairs, no need to iterate further\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (world.rank() == 0)\n\t\t\tstd::cout << \"\\n\\n--------Adaptive Solver Macroiteration \" << i << \" from max \" << param.maxiter_macro() << \" ----------\\n\\n\";\n\n\t\tif(param.exop()!=\"none\"){\n\t\t\tpairs = grow_rank(pairs,multipoles[i]);\n\t\t}\n\t\telse {\n\t\t\tmsg << \"no growing of ranks demadned\\n\";\n\t\t}\n\n\t\tPAIRLOOP(it) pairs.maxranks_ij[it.ij()] += rank_increase;\n\t\t// never exceed the global maxrank parameter\n\t\tPAIRLOOP(it) pairs.maxranks_ij[it.ij()] = std::min(pairs.maxranks_ij[it.ij()], param.maxrank());\n\n\t\tconst PairEnergies oldE=pairs.energies;\n\t\tpairs = iterate_pairs_internal(pairs, param.maxiter_micro(), param.econv_micro());\n\t\tconst double deltaE = pairs.energies.total_energy()-energy;\n\t\tenergy = pairs.energies.total_energy();\n\n\t\t// test convergence of individual pairs\n\t\tbool all_pairs_converged=true;\n\t\tdouble maxdE=0.0;\n\t\tsize_t maxij=0;\n\t\tPAIRLOOP(it){\n\t\t\tconst double dE=pairs.energies.eij[it.ij()]-oldE.eij[it.ij()];\n\t\t\tif(fabs(dE)>maxdE){\n\t\t\t\tmaxdE=dE;\n\t\t\t\tmaxij=it.ij();\n\t\t\t}\n\t\t\tif(fabs(dE)>param.econv_pairs()) all_pairs_converged=false;\n\t\t\telse{\n\t\t\t\tmsg << pairs.name(it) << \" converged!\";\n\t\t\t\tpairs.frozen_ij[it.ij()]=true;\n\t\t\t}\n\t\t}\n\t\tmsg << \"\\n\\n\\nAdaptive Sovler:\" <<\n\t\t\t\t\"\\n Current Energy=\" << energy <<\n\t\t\t\t\"\\n DeltaE        =\" << deltaE <<\n\t\t\t\t\"\\n max dE (pair) =\" << maxdE << \" (\" << maxij << \")\" <<\n\t\t\t\t\"\\n all_pairs_conv=\" << all_pairs_converged << \"\\n\\n\\n\";\n\t\tif (fabs(deltaE) < param.econv_macro()) {\n\t\t\tmsg<< \"\\n\\ndeltaE below threshold Macroiterations converged!\\n\\n\";\n\t\t\tbreak;\n\t\t}else if(all_pairs_converged){\n\t\t\tmsg << \"\\n\\nall pairs converged but deltaE above given threshold -> check your parameters\\n\\n\";\n\t\t\tbreak;\n\t\t}else msg << \"\\n\\nnot converged yet\\n\\n\";\n\t\tif (i == size_t(param.maxiter_macro()))\n\t\t\tmsg << \"Maximum number of Macroiterations reached\\n\";\n\n\t\t// do not further optimize and grow ranks of pairs which do not really contribute\n\t\tpairs=freeze_insignificant_pairs(pairs);\n\t}\n\treturn pairs;\n}\n\nPNOPairs PNO::iterate_pairs_internal(PNOPairs& pairs, const int maxiter, const double econv) const {\n\tMyTimer timer_solve = MyTimer(world).start();\n\n\tpairs.verify();\n\t// convenience\n\tconst PairType& pt=pairs.type;\n\tconst CISData& cis=pairs.cis;\n\tconst std::valarray<int>& maxrank=pairs.maxranks_ij;\n\tstd::valarray<vector_real_function_3d>& pno_ij=pairs.pno_ij;\n\tstd::valarray<Tensor<double> >& t2_ij=pairs.t_ij; // ij -> amplitudes in PNO basis\n\tstd::valarray<vector_real_function_3d>& W_ij_i=pairs.W_ij_i; // fluctuation potential\n\tstd::valarray<vector_real_function_3d>& W_ij_j=pairs.W_ij_j; // fluctuation potential\n\tstd::valarray<Tensor<double> >& W_ij=pairs.W_ij; // ij -> <ij|W|ab>\n\t//std::valarray<Tensor<double> >& F_ij=pairs.F_ij; // ij -> Fock matrix in PNO basis\n\tPNOTensors::Tensor_IJ_IK<double>& S_ij_ik=pairs.S_ij_ik; // f12.pit().tridx(ij,ik) -> <a_ij|b_ik>\n\tPNOTensors::Tensor_IJ_KJ<double>& S_ij_kj=pairs.S_ij_kj; // f12.pit().tridx(ij,kj) -> <a_ij|b_kj>\n\t// see if this is the CIS(D) solver\n\n\tbool do_cispd = false;\n\tif (pt == CISPD_PAIRTYPE) do_cispd = true;\n\t// assign parameters\n\tbool no_compute = (param.no_compute() == pt || param.no_compute() == ALL_PAIRTYPE);\n\tbool restart = (param.restart() == pt || param.restart() == ALL_PAIRTYPE);\n\tbool no_opt = (param.no_opt() == pt || param.no_opt() == ALL_PAIRTYPE);\n\tbool no_opt_in_first_iteration = param.no_opt_in_first_iteration();\n\tif (no_opt_in_first_iteration) msg << \"no optimization in first iteration!\\n\";\n\n\tdouble omega = cis.omega;\n\tif (do_cispd) {\n\t\tTIMER(timerX);\n\t\tpairs.cis.Vx = compute_CIS_potentials(cis.x);\n\t\tpairs.cis.Kx = K(cis.x);\n\t\tMADNESS_ASSERT(cis.Vx.size() == cis.x.size() && cis.x.size() == f12.acmos.size());\n\t\tif (omega == 0.0)\n\t\t\tMADNESS_EXCEPTION((\"could not find omega for cis excitation number \" + std::to_string(cis.number)).c_str(), 1);\n\t\tmsg<< \"CIS excitation energy is \" << omega << \"\\n\";\n\t\ttimerX.stop().print(\"compute CIS intermediates\\n\");\n\t}\n\n\tif(econv<0){\n\t\tno_compute=false;\n\t\trestart=true;\n\t\tno_opt=true;\n\t\tno_opt_in_first_iteration=true;\n\t}\n\n\t// information about the current iteration cycle\n\tmsg << \"SolveInternal: Parameters are assigned as\\n\";\n\tmsg << \"no_compute        = \" << no_compute << \"\\n\";\n\tmsg << \"no_opt            = \" << no_opt << \"\\n\";\n\tmsg << \"restart           = \" << restart << \"\\n\";\n\tmsg << \"do_cispd          = \" << do_cispd << \"\\n\";\n\tmsg << \"econv             =\"  << econv <<\"\\n\";\n\tmsg << \"maxrank (min,max) = (\" << maxrank.min() << \",\" << maxrank.max() << \")\\n\";\n\n\tif (do_cispd && world.rank() == 0)\n\t\tstd::cout << \"Solving CIS(D) doubles\\n\";\n\telse if (world.rank() == 0)\n\t\tstd::cout << \"Solving MP2 doubles\\n\";\n\n\t// occupied orbitals\n\tconst vector_real_function_3d& amo = nemo.get_calc()->amo;\n\t// compute the occ-occ block of the Fock matrix\n\tvector_real_function_3d actmo;\n\tfor (size_t i = param.freeze(); i < amo.size(); ++i)\n\t\tactmo.push_back(amo[i]);\n\tTensor<double> fmat = F(actmo, actmo);\n\n\tauto econverged = false;\n\tauto dconverged = false;\n\tauto energy = pairs.energies.total_energy();\n\n\t//const auto nocc_act = amo.size() - param.freeze();\n\t//auto npairs = nocc_act * (nocc_act + 1) / 2; // # of {i>=j} pairs\n\n\tsize_t iter = 0;\n\tbool converged = false;\n\tif (no_compute) {\n\t\tprint(\"Found no_compute keyword!\\n\");\n\t}\n\tstd::valarray<Tensor<double> > rdm_evals_ij(f12.npairs());\n\twhile (((iter < size_t(maxiter))) and (no_compute == false)) {\n\t\tTIMER(timer_iter);\n\t\tprint_ranks(pairs);\n\n\t\tauto last_iter_energy = energy;\n\t\tS_ij_ik.reset();\n\t\tS_ij_kj.reset();\n\n\t\t// determines if the W_ij matrix should be computed directly\n\t\tbool no_opt_in_this_iteration=false;\n\t\tif(no_opt) no_opt_in_this_iteration=true;\n\t\tif(iter==0 and no_opt_in_first_iteration) no_opt_in_this_iteration=true;\n\t\tif(converged) no_opt_in_this_iteration=true;\n\t\tif(iter==size_t(maxiter-1)) no_opt_in_this_iteration=true;\n\n\t\t// if the key word is not set everything else does not matter at all\n\t\tif(no_opt_in_first_iteration==false) no_opt_in_this_iteration=false;\n\n\t\tif(no_opt_in_this_iteration) msg << \"iter \"<<std::setfill(' ')<<std::setw(2) << iter <<  \" no opt in this iteration\\n\";\n\n\n\t\ttruncate_pairs(pairs);\n\n\t\t// 1 Compute K intermediate and Fock matrices\n\t\tif(no_opt_in_this_iteration){\n\t\t\tmsg << \"no opt in this iteration: K intermediate is neither computed nor stored\\n\";\n\t\t\t// do not store K intermediate (not needed and large in first iteration\n\t\t\tTIMER(timer2);\n\t\t\tPAIRLOOP(it){\n\t\t\t\tconst size_t ij=it.ij();\n\t\t\t\tif(pairs.pno_ij[ij].empty()) pairs.F_ij[ij]=Tensor<double>(std::vector<long>(2,0));\n\t\t\t\telse if(pairs.frozen_ij[it.ij()]){\n\t\t\t\t\tMADNESS_ASSERT(pairs.F_ij[it.ij()].ndim()==2);\n\t\t\t\t\tMADNESS_ASSERT(size_t(pairs.F_ij[it.ij()].dim(0))==pairs.pno_ij[it.ij()].size());\n\t\t\t\t\tmsg << \"frozen pair \" + pairs.name(it)<< \", no recomputation of F_ij\\n\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tpairs.F_ij[ij]=F(pno_ij[ij],pno_ij[ij]);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\ttimer2.stop().print(\"compute Fock matrices\");\n\t\t}else{\n\t\t\tTIMER(timer1);\n\t\t\tvector_real_function_3d allP=pairs.extract(pno_ij);\n\t\t\t// apply K to max 500 functions at a time\n\t\t\tint chunk=param.chunk();\n\t\t\tvector_real_function_3d allK;\n\t\t\tauto allPit =allP.begin();\n\t\t\twhile(allK.size()<allP.size()){\n\t\t\t\tMADNESS_ASSERT(allPit!=allP.end());\n\t\t\t\tconst auto dist=(std::distance(allPit,allP.end()));\n\t\t\t\tif(dist<chunk) chunk=dist;\n\t\t\t\tconst auto tmp=vector_real_function_3d(allPit,allPit+chunk);\n\t\t\t\tvector_real_function_3d Ktmp=K(tmp);\n\t\t\t\tallK.insert(allK.end(),Ktmp.begin(),Ktmp.end());\n\t\t\t\tallPit+=chunk;\n\t\t\t\tconst double allKs=get_size(world,allK);\n\t\t\t\tmsg << \"wall time=\" << wall_time()  << \" chunk=\" << chunk << \" allK.size()=\" << allK.size() << \" memory=\" << allKs << \" GB\\n\";\n\t\t\t}\n\t\t\tpairs.Kpno_ij=pairs.reassemble(allK);\n\t\t\ttimer1.stop().print(\"compute KPNO\");\n\n\t\t\tTIMER(timerj);\n\t\t\tvector_real_function_3d allJ;\n\t\t\tallPit =allP.begin();\n\t\t\twhile(allJ.size()<allP.size()){\n\t\t\t\tMADNESS_ASSERT(allPit!=allP.end());\n\t\t\t\tconst auto dist=(std::distance(allPit,allP.end()));\n\t\t\t\tif(dist<chunk) chunk=dist;\n\t\t\t\tconst auto tmp=vector_real_function_3d(allPit,allPit+chunk);\n\t\t\t\tvector_real_function_3d Jtmp=J(tmp);\n\t\t\t\tallJ.insert(allJ.end(),Jtmp.begin(),Jtmp.end());\n\t\t\t\tallPit+=chunk;\n\t\t\t\tconst double allJs=get_size(world,allJ);\n\t\t\t\tmsg << \"wall time=\" << wall_time()  << \" chunk=\" << chunk << \" allJ.size()=\" << allJ.size() << \" memory=\" << allJs << \" GB\\n\";\n\t\t\t}\n\t\t\tconst auto Jpno_ij=pairs.reassemble(allJ);\n\t\t\ttimerj.stop().print(\"compute JPNO\");\n\n\n\t\t\tTIMER(timer2);\n\t\t\tPAIRLOOP(it){\n\t\t\t\tconst size_t ij=it.ij();\n\t\t\t\tif(pairs.pno_ij[it.ij()].empty()){\n\t\t\t\t\tpairs.F_ij[it.ij()]=Tensor<double>(std::vector<long>(2,0));\n\t\t\t\t}\n\t\t\t\telse if(pairs.frozen_ij[it.ij()]){\n\t\t\t\t\tif(pairs.F_ij[it.ij()].size()==0) pairs.F_ij[it.ij()]=F(pairs.pno_ij[it.ij()],pairs.pno_ij[it.ij()]);\n\t\t\t\t\telse{\n\t\t\t\t\t  MADNESS_ASSERT(pairs.F_ij[it.ij()].dim(0)==pairs.F_ij[it.ij()].dim(1));\n\t\t\t\t\t  MADNESS_ASSERT(size_t(pairs.F_ij[it.ij()].dim(0))==pairs.pno_ij[it.ij()].size());\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(pno_ij[ij].size()>0){\n\t\t\t\t\tTensor<double> tmat=T(pno_ij[ij],pno_ij[ij]);\n\t\t\t\t\tTensor<double> vmat=V(pno_ij[ij],pno_ij[ij]);\n\t\t\t\t\tTensor<double> jmat=matrix_inner(world,pno_ij[ij],Jpno_ij[ij]);\n\t\t\t\t\tTensor<double> kmat=matrix_inner(world,pno_ij[ij],pairs.Kpno_ij[ij]);\n\t\t\t\t\tpairs.F_ij[ij]=tmat+vmat+jmat-kmat;\n\t\t\t\t}\n\t\t\t\telse pairs.F_ij[ij]=Tensor<double>(std::vector<long>(2,0));\n\t\t\t}\n\t\t\ttimer2.stop().print(\"compute Fock matrices\");\n\t\t}\n\n\t\t// 2. (optional) canonicalize PNOs\n\n\t\tif (param.canonicalize_pno()) {\n\t\t\tTIMER(timer2);\n\t\t\tcanonicalize(pairs);\n\t\t\ttimer2.stop().print(\"Canonicalize\");\n\t\t}\n\n\t\ttruncate_pairs(pairs);\n\n\n\t\t// 3.a compute fluctuation potential for each pair\n\t\t// in the first iteration: No optimization just pno truncation\n\t\t// so no explicit fluctuation potential needed\n\t\tif (no_opt_in_this_iteration==false) {\n\n\t\t\tupdate_fluctuation_potentials(pairs);\n\n\t\t\t// 3.b compute fluctuation integrals for each pair\n\t\t\tTIMER(timer3b);\n\t\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\t\tconst size_t ij = it.ij();\n\t\t\t\t//const size_t i = it.i();\n\t\t\t\t//const size_t j = it.j();\n\t\t\t\tif(pno_ij[ij].empty()){\n\t\t\t\t\tW_ij[ij]=Tensor<double>(std::vector<long>(2,0));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// make sure the matrix has been calculated in the first iteration\n\t\t\t\tif (pairs.frozen_ij[it.ij()]) {\n\t\t\t\t\tif(pairs.W_ij[ij].size()==0 and do_cispd) pairs.W_ij[ij]=compute_cispd_fluctuation_matrix(it, pairs);\n\t\t\t\t\telse if(pairs.W_ij[ij].size()==0) pairs.W_ij[ij]=compute_fluctuation_matrix(it, pno_ij[it.ij()], pairs.Kpno_ij[it.ij()]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// evaluate as average of <a|i W_jb> and <j W_ia| b>\n\t\t\t\tW_ij[ij] = 0.5 * (matrix_inner(world, pno_ij[ij], W_ij_i[ij]) + matrix_inner(world, W_ij_j[ij], pno_ij[ij]));\n\n\t\t\t}\n\t\t\ttimer3b.stop().print(\"Fluctuation Matrix\");\n\n\t\t} else {\n\n\t\t\t// for cases without optimization it is cheaper to calculate the fluctuation matrix directly (since then no potentials are needed)\n\t\t\t// in the first iteration this is done for various reasons like\n\t\t\t// 1. The guess is usually the largest and some functions will be gone in the next iterations\n\t\t\t// 2. If some pairs are frozen the matrix is computed here in the first iteration and is then kept\n\t\t\tTIMER(timer3c);\n\t\t\t// no matrix routine yet, we have do to the expensive thing\n\t\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\t\tif(pno_ij[it.ij()].size()>0){\n\t\t\t\t\tif(pairs.frozen_ij[it.ij()]){\n\t\t\t\t\t\tMADNESS_ASSERT(pairs.W_ij[it.ij()].ndim()==2);\n\t\t\t\t\t\tMADNESS_ASSERT(size_t(pairs.W_ij[it.ij()].dim(0))==pairs.pno_ij[it.ij()].size());\n\t\t\t\t\t\tmsg << pairs.name(it) << \" frozen pair: no recomputation of fluctuation matrix\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(pairs.W_ij[it.ij()].size()>0){\n\t\t\t\t\t\tMADNESS_ASSERT(pairs.W_ij[it.ij()].ndim()==2);\n\t\t\t\t\t\tMADNESS_ASSERT(size_t(pairs.W_ij[it.ij()].dim(0))==pairs.pno_ij[it.ij()].size());\n\t\t\t\t\t\tmsg <<  pairs.name(it) << \" fluctuation matrix already computed\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(do_cispd) W_ij[it.ij()] = compute_cispd_fluctuation_matrix(it, pairs);\n\t\t\t\t\telse W_ij[it.ij()]=compute_fluctuation_matrix(it, pno_ij[it.ij()], pairs.Kpno_ij[it.ij()]);\n\t\t\t\t}\n\t\t\t\telse W_ij[it.ij()] = Tensor<double>(std::vector<long>(2,0));\n\t\t\t}\n\n\t\t\ttimer3c.stop().print(\"Whole Direct Fluctuation Matrix\");\n\t\t}\n\n\t\tpairs.update_meminfo();\n\t\tmsg << pairs.meminfo << \"\\n\";\n\t\ttruncate_pairs(pairs);\n\n\t\t// 3.d compute PNO overlaps\n\t\tTIMER(timer3d);\n\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\tconst size_t ij = it.ij();\n\t\t\tconst size_t i = it.i();\n\t\t\tconst size_t j = it.j();\n\t\t\tfor (OrbitalIterator kit = oit(); kit; ++kit) {\n\t\t\t\tconst size_t k = kit.i();\n\t\t\t\tif (not S_ij_kj.is_initialized(i, j, k)) {\n\t\t\t\t\tconst auto kj = f12.pit().tridx(k, j);\n\t\t\t\t\tTensor<double> s_ij_kj(std::vector<long>(2,0));\n\t\t\t\t\tif(not(pno_ij[ij].empty() or pno_ij[kj].empty())){\n\t\t\t\t\t\ts_ij_kj = matrix_inner(world, pno_ij[ij], pno_ij[kj], false);\n\t\t\t\t\t}\n\t\t\t\t\tS_ij_kj.set(i, j, k, s_ij_kj);\n\t\t\t\t}\n\t\t\t\tif (not S_ij_ik.is_initialized(i, j, k)) {\n\t\t\t\t\tconst auto ik = f12.pit().tridx(i, k);\n\t\t\t\t\tTensor<double> s_ij_ik(std::vector<long>(2,0));\n\t\t\t\t\tif(not(pno_ij[ij].empty() or pno_ij[ik].empty())){\n\t\t\t\t\t\ts_ij_ik= matrix_inner(world, pno_ij[ij], pno_ij[ik], false);\n\t\t\t\t\t}\n\t\t\t\t\tS_ij_ik.set(i, j, k, s_ij_ik);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\ttimer3d.stop().print(\"PNO Overlaps\");\n\n\t\t// 3. solve for the amplitudes\n\t\tTIMER(timer3);\n\t\tt_solve(pairs,fmat);\n\t\tenergy=pairs.energies.total_energy();\n\n\t\ttimer3.stop().print(\"Solve Amplitudes\");\n\n\t\t// 4. compute the energy -> done in the T solver loop\n\n\t\t// 5. check convergence\n\t\teconverged = (std::abs(last_iter_energy - energy) < econv);\n\t\tconst double delta_energy = std::abs(last_iter_energy - energy);\n\n\t\tbool do_compression = true;\n\n\t\t// 6. compress the amplitudes\n\t\tif (do_compression) {\n\t\t\tTIMER(timer6);\n\t\t\tif (iter == 0 or (iter == 1 and no_opt_in_first_iteration)) {\n\t\t\t\tmsg << \"No optimization untill now: Compressing pno ranks with tighter threshold\\n\";\n\t\t\t\tmsg << param.tpno_tight() << \" instead of \" << param.tpno() << \"\\n\";\n\t\t\t\trdm_evals_ij = pno_compress(pairs,param.tpno_tight());\n\t\t\t} else {\n\t\t\t\trdm_evals_ij = pno_compress(pairs,param.tpno());\n\t\t\t}\n\t\t\tpairs.rdm_evals_ij = rdm_evals_ij;\n\n\t\t\t// test if ampltides are transformed correctly\n\t\t\t//PairEnergies edb=compute_projected_mp2_energies(t2_ij, pno_ij);\n\t\t\t//f12.print_pair_energies(edb.eijs,edb.eijt,std::to_string(energytype()) + \" MP2 pair energies after compression:\");\n\t\t\ttimer6.stop().print(\"PNO Compression\");\n\t\t} else if (world.rank() == 0)\n\t\t\tstd::cout << \"Convergence reached or last iteration. No compression\\n\";\n\n\t\tprint_ranks(pairs);\n\t\tsave_pnos(pairs);\n\t\t// see if we can stop\n\t\tif (iter == size_t(maxiter - 1)) {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"exiting: Last iteration\\n\";\n\t\t\tbreak;\n\t\t}\n\t\tif (no_opt) {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"exiting: Found no_opt keyword\\n\";\n\t\t\tbreak;\n\t\t}\n\t\tif (converged) {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"exiting: Iterations converged\\n\";\n\t\t\tbreak;\n\t\t}\n\n\t\t// update PNOs, unless converged\n\t\tbool do_optimization = true;\n\t\tif (no_opt_in_this_iteration){\n\t\t\tdo_optimization = false;\n\t\t}\n\t\tif (do_optimization) {\n\n\t\t\ttruncate_pairs(pairs);\n\n\t\t\t// 8. update the PNO subspaces\n\t\t\tdconverged = update_pno(pairs, rdm_evals_ij,fmat);\n\n\t\t\t// 9. Orthonormalize\n\t\t\tpairs = orthonormalize_cholesky(pairs);\n\n\t\t} else {\n\t\t\tif (world.rank() == 0) {\n\t\t\t\tstd::cout << \"PNO optimization not performed \";\n\t\t\t\tif (iter == 0)\n\t\t\t\t\tstd::cout << \"in the first iteration\\n\";\n\t\t\t\telse if (no_opt)\n\t\t\t\t\tstd::cout << \"since no_opt keyword was given\\n\";\n\t\t\t\telse if (econverged and dconverged)\n\t\t\t\t\tstd::cout << \"since the PNOs are already converged\\n\";\n\t\t\t\telse if (iter == size_t(param.maxiter() - 1))\n\t\t\t\t\tstd::cout << \"since this is the last iteration\\n\";\n\t\t\t\telse\n\t\t\t\t\tstd::cout << \"for unknown reasons ... should not happen!!!!!!!\\n\";\n\t\t\t}\n\t\t}\n\n\t\tif ((no_opt_in_first_iteration and iter<2) and (no_opt==false)) {\n\t\t\tmsg << \"Set back econverged since there was no optimization in the first iteration\\n\";\n\t\t\teconverged = false; // since there is no optimization in iteration 0\n\t\t\tconverged=false;\n\t\t}\n\t\tsave_pnos(pairs);\n\t\t++iter;\n\t\tif ((econverged == true) and (dconverged == true)) {\n\t\t\tconverged = true;\n\t\t\tprint(\"\\n\\nCONVERGED!\");\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"energy change = \" << delta_energy << \"\\n\\n\";\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"re-entering loop to compute the correct amplitudes and energies\\n\";\n\t\t} else {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"\\n\\n\" << \"No convergence yet. Energy change = \" << delta_energy << \"\\n\\n\";\n\t\t}\n\t\ttimer_iter.stop().print(\"Whole Iteration \" + std::to_string(iter));\n\t}\n\tif (no_compute == true) {\n\t\tfor (ElectronPairIterator it = pit(); it; ++it)\n\t\t\tt2_ij[it.ij()] = madness::Tensor<double>(pno_ij[it.ij()].size(), pno_ij[it.ij()].size());\n\t}\n\t// give information about the rank\n\t{\n\t\tif (world.rank() == 0)\n\t\t\tstd::cout << \"PNO ranks:\\n\";\n\n\t\tdouble average_rank = 0.0;\n\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"PNO Rank for pair \" << it.name() << \" = \" << pno_ij[it.ij()].size() << \"\\n\";\n\n\t\t\taverage_rank += pno_ij[it.ij()].size();\n\t\t}\n\t\taverage_rank = average_rank / double(pno_ij.size());\n\t\tif (world.rank() == 0)\n\t\t\tstd::cout << \"average rank \" << average_rank << \"\\n\";\n\t}\n\n\ttimer_solve.stop().print(\"PNO::solve\");\n\tmsg.subsection(\"ITERATE-PAIRS-INTERNAL-ENDED\");\n\n\tpairs.t_ij=t2_ij;\n\tpairs.pno_ij=pno_ij;\n\treturn pairs;\n}\n\nPNOPairs PNO::grow_rank(PNOPairs& pairs, std::string exop)const{\n\tmsg << \"Growing ranks with exop=\" << exop << \"\\n\";\n\tbool no_need=true;\n\tPAIRLOOP(it)\n\t{\n\t  if (pairs.pno_ij[it.ij()].size() < size_t(param.maxrank())) no_need = false;\n\t}\n\tif (no_need) {\n\t\tmsg << \"maxrank reached for all pairs, no need to grow ranks\\n\";\n\t} else {\n\t\tTIMER(timer);\n\t\tPAIRLOOP(it)\n\t\t{\n\t\t  if (pairs.pno_ij[it.ij()].size() >= size_t(param.maxrank())) {\n\t\t\t\tmsg << \"maxrank reached for \" << it.name() << \" no further growing\\n\";\n\t\t\t\tcontinue;\n\t\t\t} else if (pairs.frozen_ij[it.ij()]) {\n\t\t\t\tmsg << it.name() << \" is frozen: no growing\\n\";\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tvector_real_function_3d pair_mo;\n\t\t\t\tpair_mo.push_back(nemo.get_calc()->amo[it.i() + param.freeze()]);\n\t\t\t\tif (not it.diagonal())\n\t\t\t\t\tpair_mo.push_back(nemo.get_calc()->amo[it.j() + param.freeze()]);\n\t\t\t\tbool do_cispd = true;\n\t\t\t\tif (pairs.cis.x.empty())\n\t\t\t\t\tdo_cispd = false;\n\t\t\t\tif (do_cispd) {\n\t\t\t\t\tconst double normi = pairs.cis.x[it.i()].norm2(); // cis vector contains only active orbitals\n\t\t\t\t\tconst real_function_3d xi = (1.0 / normi) * pairs.cis.x[it.i()];\n\t\t\t\t\tpair_mo.push_back(xi);\n\t\t\t\t\tif (not it.diagonal()) {\n\t\t\t\t\t        //const double normj = pairs.cis.x[it.j()].norm2(); // cis vector contains only active orbitals\n\t\t\t\t\t\tconst real_function_3d xj = (1.0 / normi) * pairs.cis.x[it.j()];\n\t\t\t\t\t\tpair_mo.push_back(xj);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvector_real_function_3d virtij = Q(basis.guess_with_exop(pair_mo, exop,param.exop_trigo()));// guess_virtuals(pair_mo, EXOP_TYPE);\n\t\t\t\t// project out already existing pno pairs\n\t\t\t\tif (not pairs.pno_ij[it.ij()].empty()) {\n\t\t\t\t\tQProjector<double, 3> Qpno(pairs.pno_ij[it.ij()], pairs.pno_ij[it.ij()]);\n\t\t\t\t\tvirtij = Qpno(virtij);\n\n\t\t\t\t}\n\n\t\t\t\tmsg << \"Created \" << virtij.size() << \" virtuals for \" << it.name() << \"\\n\";\n\t\t\t\tpairs.pno_ij[it.ij()] = append(pairs.pno_ij[it.ij()], virtij);\n\n\t\t\t\t// delete all intermediates and potentials\n\t\t\t\tMADNESS_ASSERT(pairs.frozen_ij[it.ij()]==false);\n\t\t\t\tpairs.clear_intermediates(it);\n\t\t\t}\n\t\t}\n\t\tpairs=orthonormalize_cholesky(pairs);\n\t\ttimer.stop().print(\"grow PNO subspace\");\n\t}\n\n\treturn pairs;\n}\n\nPNOPairs PNO::orthonormalize_cholesky(PNOPairs& pairs) const {\n\tTIMER(timer);\n\tstd::valarray<vector_real_function_3d> result(pairs.pno_ij.size());\n\tstd::valarray<Tensor<double> > U_ij(pairs.pno_ij.size());\n\tPAIRLOOP(it)\n\t{\n\t\tauto& pno=pairs.pno_ij[it.ij()];\n\t\tif(pairs.frozen_ij[it.ij()]){\n\t\t\tmsg << \"frozen pair: no orthonormalization\\n\";\n\t\t\tTensor<double> unit(pno.size(),pno.size());\n\t\t\tfor(size_t x=0;x<pno.size();++x) unit(x,x)=1.0;\n\t\t\tU_ij[it.ij()]=unit;\n\t\t\tcontinue;\n\t\t}\n\t\telse if(pno.empty()){\n\t\t\tpairs.t_ij[it.ij()]=Tensor<double>(std::vector<long>(2,0));\n\t\t\tpairs.W_ij[it.ij()]=Tensor<double>(std::vector<long>(2,0));\n\t\t\tpairs.F_ij[it.ij()]=Tensor<double>(std::vector<long>(2,0));\n\t\t\tU_ij[it.ij()]=Tensor<double>(std::vector<long>(2,0));\n\t\t}\n\t\telse {\n\t\t\tint rank=0;\n\t\t\tconst double tol=FunctionDefaults<3>::get_thresh()*0.1;\n\t\t\tTensor<integer> piv;\n\t\t\tauto ovlp=matrix_inner(world,pno,pno);\n\t\t\tmadness::rr_cholesky(ovlp,tol,piv,rank); // destroys ovlp and gives back Upper ∆ Matrix from CCD\n\n\t\t\t// rearrange and truncate the functions according to the pivoting of the rr_cholesky\n\t\t\tvector_real_function_3d pp(rank);\n\t\t\tvector_real_function_3d pk(rank);\n\t\t\tvector_real_function_3d pw1(rank);\n\t\t\tvector_real_function_3d pw2(rank);\n\t\t\tfor(integer i=0;i<rank;++i){\n\t\t\t\tpp[i] =pairs.pno_ij[it.ij()][piv[i]];\n\t\t\t\tif(not pairs.Kpno_ij[it.ij()].empty()) pk[i] =pairs.Kpno_ij[it.ij()][piv[i]];\n\t\t\t\tif(not pairs.W_ij_i[it.ij()].empty())  pw1[i]=pairs.W_ij_i[it.ij()][piv[i]];\n\t\t\t\tif(not pairs.W_ij_j[it.ij()].empty())  pw2[i]=pairs.W_ij_j[it.ij()][piv[i]];\n\t\t\t}\n\t\t\tpairs.pno_ij[it.ij()] =pp;\n\t\t\tif(not pairs.Kpno_ij[it.ij()].empty())pairs.Kpno_ij[it.ij()]=pk;\n\t\t\tif(not pairs.W_ij_i[it.ij()].empty())pairs.W_ij_i[it.ij()] =pw1;\n\t\t\tif(not pairs.W_ij_j[it.ij()].empty())pairs.W_ij_j[it.ij()] =pw2;\n\t\t\tovlp=ovlp(Slice(0,rank-1),Slice(0,rank-1));\n\n\t\t\tTensor<double> L = transpose(ovlp);\n\t\t\tTensor<double> Linv = inverse(L);\n\t\t\tTensor<double> U = transpose(Linv);\n\t\t\tU_ij[it.ij()]=U;\n\n\t\t\tif(size_t(rank)<pno.size()) msg << \"RRCD: truncate ranks of \" << std::setw(25) << pairs.name(it) << \" from \" << std::setw(3) << pno.size() <<  \" to \" << std::setw(3) << rank << \"\\n\";\n\t\t}\n\t}\n\ttimer.stop().print(\"RRCD\");\n\tpairs=transform_pairs(pairs,U_ij);\n\treturn pairs;\n}\n\nPairEnergies PNO::compute_cispd_f12_correction_es(const vector_real_function_3d& xcis, PairEnergies& energies) const {\n\tTIMER(timer);\n\tdouble s2b_f12 = 0.0;\n\tdouble s2c_f12 = 0.0;\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tconst real_function_3d moi = f12.acmos[it.i()];\n\t\tconst real_function_3d moj = f12.acmos[it.j()];\n\t\tconst real_function_3d xi = xcis[it.i()];\n\t\tconst real_function_3d xj = xcis[it.j()];\n\t\tdouble factor = 1.0;\n\t\tif (it.diagonal())\n\t\t\tfactor = 0.5;\n\n\t\tdouble s2b_f12_ij = 0.0;\n\t\t{\n\t\t\t// functional part |ph> + |hp>\n\t\t\tif (it.diagonal())\n\t\t\t\ts2b_f12_ij += 2.0 * (f12.compute_fQg_integral(xi, moj, xi, moj) + f12.compute_fQg_integral(moi, xj, xi, moj));\n\t\t\telse\n\t\t\t\ts2b_f12_ij += 2.0 * (f12.compute_fQg_integral(xi, moj, xi, moj) + f12.compute_fQg_integral(moi, xj, xi, moj))\n\t\t\t\t+ 2.0 * (f12.compute_fQg_integral(xj, moi, xj, moi) + f12.compute_fQg_integral(moj, xi, xj, moi))\n\t\t\t\t- 1.0 * (f12.compute_fQg_integral(xi, moj, xj, moi) + f12.compute_fQg_integral(moi, xj, xj, moi))\n\t\t\t\t- 1.0 * (f12.compute_fQg_integral(xj, moi, xi, moj) + f12.compute_fQg_integral(moj, xi, xi, moj));\n\n\t\t\t// projector-response part: OxQ + QOx\n\t\t\tif (it.diagonal()) {\n\t\t\t\tvector_real_function_3d p1 = Q(apply(world, *f12.fop, f12.acmos * moj) * moi);\n\t\t\t\tvector_real_function_3d p2 = xcis;\n\t\t\t\tconst double pr_part = 2.0 * (madness::inner(world, xi * p1, apply(world, *poisson, p2 * moj)).sum() + madness::inner(world, xi * p2, apply(world, *poisson, p1 * moj)).sum());\n\t\t\t\ts2b_f12_ij -= pr_part;\n\t\t\t} else {\n\t\t\t\tvector_real_function_3d p1i = Q(apply(world, *f12.fop, f12.acmos * moj) * moi);\n\t\t\t\tvector_real_function_3d p1j = Q(apply(world, *f12.fop, f12.acmos * moi) * moj);\n\t\t\t\tvector_real_function_3d p2 = xcis;\n\t\t\t\ts2b_f12_ij -= 2.0\n\t\t\t\t\t\t* (madness::inner(world, xi * p1i, apply(world, *poisson, p2 * moj)).sum() + madness::inner(world, xj * p1j, apply(world, *poisson, p2 * moi)).sum()\n\t\t\t\t\t\t\t\t+ madness::inner(world, xi * p2, apply(world, *poisson, p1j * moj)).sum() + madness::inner(world, xj * p2, apply(world, *poisson, p1i * moi)).sum())\n\t\t\t\t\t\t\t\t- 1.0\n\t\t\t\t\t\t\t\t* (madness::inner(world, moj * p1i, apply(world, *poisson, p2 * xi)).sum() + madness::inner(world, moi * p1j, apply(world, *poisson, p2 * xj)).sum()\n\t\t\t\t\t\t\t\t\t\t+ madness::inner(world, moj * p2, apply(world, *poisson, p1j * xi)).sum() + madness::inner(world, moi * p2, apply(world, *poisson, p1i * xj)).sum());\n\t\t\t}\n\t\t}\n\t\tdouble s2c_f12_ij = 0.0;\n\t\t{\n\t\t\t// transform pnos according to transposed(Ox)|a>, Ox=|xk><k| -> transposed(Ox)=|k><x_k|\n\t\t\tProjector<double, 3> Oxt(xcis, f12.acmos);\n\t\t\t//double pr_part = 0.0;\n\t\t\tif (it.diagonal()) {\n\t\t\t\tconst vector_real_function_3d& p1 = xcis;\n\t\t\t\tconst vector_real_function_3d p2 = Q(apply(world, *poisson, moi * f12.acmos) * moj);\n\t\t\t\ts2c_f12_ij -= 2.0 * (madness::inner(world, p1 * xi, apply(world, *f12.fop, p2 * moj)).sum() + madness::inner(world, apply(world, *f12.fop, p1 * moi), p2 * xj).sum());\n\t\t\t\t//const double tmp = s2c_f12_ij;\n\t\t\t\t// projector response\n\t\t\t\t//Projector<double,3> Oxt(xcis,f12.acmos);\n\t\t\t\tconst vector_real_function_3d Oxtp1 = Oxt(p1);\n\t\t\t\tconst vector_real_function_3d Oxtp2 = Oxt(p2);\n\t\t\t\ts2c_f12_ij += 2.0 * (madness::inner(world, Oxtp1 * moi, apply(world, *f12.fop, p2 * moj)).sum() + madness::inner(world, apply(world, *f12.fop, p1 * moi), Oxtp2 * moj).sum());\n\t\t\t} else {\n\t\t\t\tconst vector_real_function_3d& p1 = xcis;\n\t\t\t\tconst vector_real_function_3d p2j = Q(apply(world, *poisson, moi * f12.acmos) * moj);\n\t\t\t\tconst vector_real_function_3d p2i = Q(apply(world, *poisson, moj * f12.acmos) * moi);\n\t\t\t\ts2c_f12_ij -= 2.0 * (madness::inner(world, p1 * xi, apply(world, *f12.fop, p2j * moj)).sum() + madness::inner(world, apply(world, *f12.fop, p1 * moi), p2j * xj).sum())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ 2.0 * (madness::inner(world, p1 * xj, apply(world, *f12.fop, p2i * moi)).sum() + madness::inner(world, apply(world, *f12.fop, p1 * moj), p2i * xi).sum())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t- 1.0 * (madness::inner(world, p2j * xi, apply(world, *f12.fop, p1 * moj)).sum() + madness::inner(world, apply(world, *f12.fop, p2j * moi), p1 * xj).sum())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t- 1.0 * (madness::inner(world, p2i * xj, apply(world, *f12.fop, p1 * moi)).sum() + madness::inner(world, apply(world, *f12.fop, p2i * moj), p1 * xi).sum());\n\t\t\t\t;\n\t\t\t\t// projector response\n\t\t\t\t//Projector<double,3> Oxt(xcis,f12.acmos);\n\t\t\t\tconst vector_real_function_3d Op1 = Oxt(p1);\n\t\t\t\tconst vector_real_function_3d Op2j = Oxt(p2j);\n\t\t\t\tconst vector_real_function_3d Op2i = Oxt(p2i);\n\t\t\t\ts2c_f12_ij += 2.0 * (inner(world, Op1 * moi, apply(world, *f12.fop, p2j * moj)).sum() + inner(world, p1 * moi, apply(world, *f12.fop, Op2j * moj)).sum());\n\t\t\t\ts2c_f12_ij -= 1.0 * (inner(world, Op1 * moj, apply(world, *f12.fop, p2j * moi)).sum() + inner(world, p1 * moj, apply(world, *f12.fop, Op2j * moi)).sum());\n\t\t\t\t// conjugated pair\n\t\t\t\ts2c_f12_ij += 2.0 * (inner(world, Op1 * moj, apply(world, *f12.fop, p2i * moi)).sum() + inner(world, p1 * moj, apply(world, *f12.fop, Op2i * moi)).sum());\n\t\t\t\ts2c_f12_ij -= 1.0 * (inner(world, Op1 * moi, apply(world, *f12.fop, p2i * moj)).sum() + inner(world, p1 * moi, apply(world, *f12.fop, Op2i * moj)).sum());\n\t\t\t}\n\t\t}\n\t\ts2b_f12 += factor * (s2b_f12_ij);\n\t\ts2c_f12 += factor * (s2c_f12_ij);\n\t\tenergies.eijt_f12[it.ij()]=factor*(s2b_f12_ij+s2c_f12_ij);\n\t}\n\tmsg << \"---------------------\\n\";\n\tmsg << \"CIS(D) ES Correction:\\n\";\n\tmsg << \"S2b_f12=\" << s2b_f12 << \"\\n\";\n\tmsg << \"S2c_f12=\" << s2c_f12 << \"\\n\";\n\tmsg << \"tot_f12=\" << s2b_f12+s2c_f12 << \"\\n\";\n\tmsg << \"---------------------\\n\";\n\tenergies.update();\n\ttimer.stop().print(\"CIS(D) F12-Correction ES\");\n\treturn energies;\n}\n\nmadness::PairEnergies PNO::t_solve(PNOPairs& pairs, const Tensor<double>& F_occ,\n\t\tconst double R_convergence_threshold, const size_t max_niter) const {\n\n\t// convenience assignement\n\tauto& t2_ij=pairs.t_ij;\n\tconst auto& F_ij=pairs.F_ij;\n\tconst auto& W_ij=pairs.W_ij;\n\tconst auto& S_ij_ik=pairs.S_ij_ik;\n\tconst auto& S_ij_kj=pairs.S_ij_kj;\n\t//const auto& pno_ij=pairs.pno_ij;\n\t//const auto& nocc_act=pairs.nocc;\n\tdouble omega=0.0;\n\tif(pairs.type==CISPD_PAIRTYPE) omega=pairs.cis.omega;\n\tdouble energy=0.0;\n\n\t//\tconst auto npno_total = std::accumulate(std::begin(W_ij), std::end(W_ij), 0.0, [](size_t partial_sum, const Tensor<double>& elem) {\n\t//\t\treturn partial_sum + elem.size();\n\t//\t});\n\t//  do consistency check while at it\n\tauto npno_total=0;\n\tPAIRLOOP(it){\n\t\tnpno_total+=pairs.W_ij[it.ij()].size();\n\t\tMADNESS_ASSERT(W_ij[it.ij()].ndim()==2);\n\t\tMADNESS_ASSERT(W_ij[it.ij()].dim(0)==W_ij[it.ij()].dim(1));\n\t\tMADNESS_ASSERT(size_t(W_ij[it.ij()].dim(0))==pairs.pno_ij[it.ij()].size());\n\t}\n\n\tsize_t tdim = 0;\n\tfor (const auto& t : W_ij) tdim += (t.dim(0) * t.dim(0));\n\tvalarray_allocator valloc(tdim);\n\tXNonlinearSolver<std::valarray<double>, double, valarray_allocator> kain(valloc, true);\n\tkain.do_print = true;\n\tkain.set_maxsub(param.kain_subspace());\n\tconst auto npairs = t2_ij.size();\n\tstd::valarray<double> energy_ij_s(npairs); // singlet pair energies\n\tstd::valarray<double> energy_ij_t(npairs); // triplet pair energies\n\tbool converged = false;\n\tauto iter = 0;\n\twhile (!converged && size_t(iter) < max_niter) {\n\t\tstd::valarray<Tensor<double> > R_ij(npairs); // ij -> <ij|R|ab>\n\t\tauto flatten = [npno_total](const std::valarray<Tensor<double> >& arr) {\n\t\t\tstd::valarray<double> flattened_arr(npno_total);\n\t\t\tauto iter = std::begin(flattened_arr);\n\t\t\tfor (const auto& tensor: arr) {\n\t\t\t\tstd::copy(tensor.ptr(), tensor.ptr() + tensor.size(), iter);\n\t\t\t\titer += tensor.size();\n\t\t\t}\n\t\t\treturn flattened_arr;\n\t\t};\n\t\tauto unflatten = [&t2_ij,&pairs](const std::valarray<double>& flattened_arr) {\n\t\t\tstd::valarray<Tensor<double> > arr(t2_ij.size());\n\t\t\tauto iter = std::begin(flattened_arr);\n\t\t\tfor (size_t ij = 0;ij != t2_ij.size();++ij) {\n\t\t\t\tconst auto npno = pairs.pno_ij[ij].size();\n\t\t\t\tarr[ij]=Tensor<double>(std::vector<long>(2,npno)); // this constructor also works for npno=0\n\t\t\t\tconst auto npno2 = npno * npno;\n\t\t\t\tstd::copy(iter, iter + npno2, arr[ij].ptr());\n\t\t\t\titer += npno2;\n\t\t\t}\n\t\t\treturn arr;\n\t\t};\n\t\tauto kain_update_t2 = [&kain, &t2_ij, &R_ij, &flatten, &unflatten]() {\n\t\t\tauto t2_ij_flattened = flatten(t2_ij);\n\t\t\tauto R_ij_flattened = flatten(R_ij);\n\t\t\tauto new_t2_ij_flattened = kain.update(t2_ij_flattened, R_ij_flattened);\n\t\t\tt2_ij = unflatten(new_t2_ij_flattened);\n\t\t};\n\t\tauto R_norm2 = 0.0;\n\t\t// W + F_vv terms deal with 1 pair at a time\n\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\tif(pairs.frozen_ij[it.ij()]){\n\t\t\t\tMADNESS_ASSERT(pairs.t_ij[it.ij()].ndim()==2);\n\t\t\t\tMADNESS_ASSERT(pairs.t_ij[it.ij()].dim(0)==pairs.t_ij[it.ij()].dim(1));\n\t\t\t\tMADNESS_ASSERT(size_t(pairs.t_ij[it.ij()].dim(0))==pairs.pno_ij[it.ij()].size());\n\t\t\t\tR_ij[it.ij()]=Tensor<double>(std::vector<long>(2,pairs.pno_ij[it.ij()].size()));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst size_t ij = it.ij();\n\t\t\t//const size_t i = it.i();\n\t\t\t//const size_t j = it.j();\n\t\t\tconst auto npno = W_ij[ij].dim(0);\n\t\t\tif(npno==0){\n\t\t\t\tt2_ij[ij]=Tensor<double>(std::vector<long>(2,0));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// zero out the amplitudes if this is the first iteration\n\t\t\tif (iter == 0)\n\t\t\t\tt2_ij[ij] = Tensor<double>(npno, npno);\n\t\t\tR_ij[ij] = W_ij[ij] + inner(F_ij[ij], t2_ij[ij]) + inner(t2_ij[ij], F_ij[ij]);\n\t\t}\n\t\t// F_oo terms couple pairs\n\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\tif(W_ij[it.ij()].size()==0) continue;\n\t\t\tconst size_t ij = it.ij();\n\t\t\tconst size_t i = it.i();\n\t\t\tconst size_t j = it.j();\n\t\t\tif(pairs.frozen_ij[it.ij()]){\n\t\t\t\tR_ij[ij]=Tensor<double>(std::vector<long>(2,pairs.pno_ij[it.ij()].size()));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (OrbitalIterator kit = oit(); kit; ++kit) {\n\t\t\t\tconst size_t k = kit.i();\n\t\t\t\tconst auto ik = f12.pit().tridx(i, k);\n\t\t\t\tconst auto swap_ik = i < k;\n\t\t\t\tconst auto T_ik = swap_ik ? t2_ij[ik].swapdim(0, 1) : t2_ij[ik];\n\t\t\t\tconst auto kj = f12.pit().tridx(k, j);\n\t\t\t\tconst auto swap_kj = k < j;\n\t\t\t\tconst auto T_kj = swap_kj ? t2_ij[kj].swapdim(0, 1) : t2_ij[kj];\n\t\t\t\tauto s_ij_ik = S_ij_ik.get(i, j, k);\n\t\t\t\tauto s_ij_kj = S_ij_kj.get(i, j, k);\n\t\t\t\tif(s_ij_ik.size()>0 or T_ik.size()>0) R_ij[ij]-= F_occ(k, j) * inner(inner(s_ij_ik, T_ik), s_ij_ik.swapdim(0, 1));\n\t\t\t\tif(s_ij_kj.size()>0 or T_kj.size()>0) R_ij[ij]-= F_occ(i, k) * inner(inner(s_ij_kj, T_kj), s_ij_kj.swapdim(0, 1));\n\t\t\t}\n\t\t\tR_ij[ij] -= omega * t2_ij[it.ij()];\n\t\t\t// keep track of the residual norm\n\t\t\tconst auto R_ij_norm = R_ij[ij].normf();\n\t\t\tR_norm2 += R_ij_norm * R_ij_norm;\n\t\t}\n\t\tconverged = (R_norm2 <= R_convergence_threshold * R_convergence_threshold);\n\t\t// energy evaluation\n\t\t{\n\t\t\tenergy = 0.0;\n\t\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\t\tif(pairs.frozen_ij[it.ij()]) continue;\n\t\t\t\tconst size_t ij = it.ij();\n\t\t\t\tconst size_t i = it.i();\n\t\t\t\tconst size_t j = it.j();\n\t\t\t\tconst auto perm_ij_factor = i == j ? 1 : 2;\n\t\t\t\tauto& tpno = t2_ij[ij];\n\t\t\t\tconst auto npno = tpno.dim(0);\n\t\t\t\tif(npno==0) continue;\n\t\t\t\tauto& rpno = R_ij[ij];\n\t\t\t\tconst auto& wpno = W_ij[ij];\n\t\t\t\tconst auto& fpno = F_ij[ij];\n\t\t\t\tdouble eps_s = 0.0, eps_t = 0.0; // singlet + triplet pair energies\n\t\t\t\tfor (size_t a = 0; a != size_t(npno); ++a) {\n\t\t\t\t\tfor (size_t b = 0; b <= a; ++b) {\n\t\t\t\t\t\tconst auto perm_ab_factor = a == b ? 1 : 2;\n\t\t\t\t\t\tconst auto t_ab_s = (tpno(a, b) + tpno(b, a)) / 2;\n\t\t\t\t\t\tconst auto wr_ab_s = ((wpno(a, b) + wpno(b, a)) + (rpno(a, b) + rpno(b, a))) / 2;\n\t\t\t\t\t\teps_s += perm_ij_factor * perm_ab_factor * t_ab_s * wr_ab_s;\n\t\t\t\t\t\tif (i != j && a != b) {\n\t\t\t\t\t\t\tconst auto t_ab_t = (tpno(a, b) - tpno(b, a)) / 2;\n\t\t\t\t\t\t\tconst auto wr_ab_t = ((wpno(a, b) - wpno(b, a)) + (rpno(a, b) - rpno(b, a))) / 2;\n\t\t\t\t\t\t\teps_t += 3 * perm_ij_factor * perm_ab_factor * t_ab_t * wr_ab_t;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if we calculated CIS(D) we have ( 1/(1+dij) instead of 2/(1+dij))\n\t\t\t\tdouble factor = 1.0;\n\t\t\t\tif (omega > 0.0)\n\t\t\t\t\tfactor = 0.5;\n\n\t\t\t\tenergy += factor * (eps_s + eps_t);\n\t\t\t\tenergy_ij_s[ij] = factor * eps_s;\n\t\t\t\tenergy_ij_t[ij] = factor * eps_t;\n\t\t\t\t// Jacobi step on first iteration, KAIN afterwards\n\t\t\t\tfor (size_t a = 0; a != size_t(npno); ++a) {\n\t\t\t\t  for (size_t b = 0; b != size_t(npno); ++b) {\n\t\t\t\t\t\tconst auto denom = (F_occ(i, i) + F_occ(j, j) + omega - fpno(a, a) - fpno(b, b));\n\t\t\t\t\t\trpno(a, b) = rpno(a, b) / denom; // rescale residue for kain update\n\t\t\t\t\t\tif (iter == 0 || !(param.kain())) {\n\t\t\t\t\t\t\ttpno(a, b) += rpno(a, b);\n\t\t\t\t\t\t} // jacobi update, += is correct\n\t\t\t\t\t} // b\n\t\t\t\t} // a\n\t\t\t} // it\n\t\t\tif (iter != 0 && param.kain()) {\n\t\t\t\tkain_update_t2();\n\t\t\t}\n\t\t\tif (param.debug()) {\n\t\t\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\t\t\tif (world.rank() == 0)\n\t\t\t\t\t\tstd::cout << it.name() << \" amplitudes after iter=\" << iter << \"\\n\" << t2_ij[it.ij()] << \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (omega > 0.0)\n\t\t\t\tenergy *= 0.5;\n\n\t\t\tif (world.rank() == 0)\n\t\t\t\tprint(\"t_iter = \", iter, \" Hylleraas energy = \", energy, \" ||R||_F = \", sqrt(R_norm2), \" conv = \", (converged ? \"yes\" : \"no\"));\n\t\t}\n\t\t++iter;\n\t\tif (!converged && iter == param.maxiter_t() && R_norm2 > 1.0)\n\t\t\tthrow \"MP1 equations did not converge at all\";\n\t} // T solver loop\n\tif (!converged) {\n\t\tif (false) {\n\t\t\tthrow \"MP1 equations did not converge\";\n\t\t} else {\n\t\t\tif (world.rank() == 0) {\n\t\t\t\tstd::cout << \"!!!No convergence in ampltiudes!!!: try to proceed\\n\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif(pairs.type==MP2_PAIRTYPE and energytype()==HYLLERAAS_ENERGYTYPE){\n\t\tpairs.energies.energy = energy;\n\t\tpairs.energies.eijs = energy_ij_s;\n\t\tpairs.energies.eijt = energy_ij_t;\n\t\tf12.print_pair_energies(pairs,\"Hylleraas MP2 Energies\");\n\t}else if(pairs.type==CISPD_PAIRTYPE){\n\t\tpairs.energies=compute_cispd_correction_es(pairs.cis.x,pairs);\n\t\tf12.print_pair_energies(pairs,\"CIS(D) Correction\");\n\t}else if(pairs.type==MP2_PAIRTYPE){\n\t\tpairs.energies=compute_projected_mp2_energies(pairs);\n\t\tf12.print_pair_energies(pairs,\"Projected MP2 Energies\");\n\t}else msg.warning(\"unknown pairtype in t_solve\\n\");\n\tpairs.energies.update();\n\treturn pairs.energies;\n}\n\nstd::valarray<Tensor<double> > PNO::pno_compress(PNOPairs& pairs, const double tpno) const {\n\n\tTIMER(timer);\n\n\t// convenience assigmenet\n\tauto& t2_ij=pairs.t_ij;\n\tauto& pno_ij=pairs.pno_ij;\n\t//auto& W_ij_i=pairs.W_ij_i;\n\t//auto& W_ij_j=pairs.W_ij_j;\n\t//auto& W_ij=pairs.W_ij;\n\t//auto& S_ij_ik=pairs.S_ij_ik;\n\t//auto& S_ij_kj=pairs.S_ij_kj;\n\tconst auto& nocc_act=pairs.nocc;\n\tconst auto& maxranks=pairs.maxranks_ij;\n\n\tconst auto npairs = PNOTensors::ntri(nocc_act);\n\tstd::valarray<Tensor<double> > evals_ij(npairs);\n\tstd::valarray<Tensor<double> > U_ij(npairs); // \"unitary\" rotations for each pair\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tconst size_t ij = it.ij();\n\t\tconst size_t i = it.i();\n\t\tconst size_t j = it.j();\n\t\tif(pno_ij[ij].empty()) continue;\n\t\tconst int maxrank = maxranks[it.ij()];\n\t\tif (pairs.frozen_ij[it.ij()]) {\n\t\t\tmsg << it.name() << \" is frozen: no pno-compression\" << \"\\n\";\n\t\t\tconst int pno_size = pno_ij[it.ij()].size();\n\t\t\tU_ij[ij] = Tensor<double>(pno_size, pno_size);\n\t\t\tU_ij[ij] = 0.0;\n\t\t\tfor (int x = 0; x < pno_size; ++x)\n\t\t\t\tU_ij[ij](x, x) = 1.0;\n\t\t\tcontinue;\n\t\t}\n\t\t// to be consistent with other codes defining density here as in\n\t\t// Eq. 23, JCP 138 034106 (2013)\n\t\tconst auto delta_ij = i == j ? 1. : 0.;\n\t\tconst auto& T = t2_ij[ij];\n\t\tconst auto T_t = T.swapdim(0, 1);\n\t\tconst auto T_tilde = 4 * T - 2 * T_t;\n\t\tconst auto T_tilde_t = T_tilde.swapdim(0, 1);\n\t\tauto Dij = (inner(T_tilde_t, T) + inner(T_tilde, T_t)) / (1 + delta_ij);\n\t\tconst auto n = Dij.dim(0);\n\t\t// compute PNOs\n\t\tTensor<double> U, evals;\n\t\tsyev(Dij, U, evals);\n\t\tif (world.rank() == 0) print(it.name() + \": density evals:\\n\", evals);\n\n\t\t// truncate PNOs\n\t\tsize_t npno = 0;\n\t\tfor (long k = n - 1; k >= 0; --k) {\n\t\t\tif (evals(k) > tpno)\n\t\t\t\t++npno;\n\t\t}\n\t\tif (tpno < 0) {\n\t\t\tmsg << \"tpno<0: no truncation\\n\";\n\t\t\tnpno = n;\n\t\t}\n\t\tif (npno > size_t(maxrank) and maxrank>0)\n\t\t\tnpno = maxrank;\n\n\t\tif (npno != size_t(n) && world.rank() == 0)\n\t\t\tprint(it.name() + \": # of PNOs reduced from \", n, \" to \", npno, \" maxrank=\", maxrank);\n\n\t\tbool emptypair = false;\n\t\tif (npno == 0)\n\t\t\temptypair = true;\n\n\t\tTensor<double> U_tr;\n\t\tif (!emptypair)\n\t\t\tU_tr = U(_, Slice(n - npno, -1, 1));\n\n\t\tTensor<double> r_tr;\n\t\tif (!emptypair)\n\t\t\tr_tr = evals(Slice(n - npno, -1, 1));\n\n\t\tevals_ij[ij] = r_tr;\n\t\tU_ij[ij] = U_tr;\n\n\t} // it\n\t// NOW rotate all pnos and intermediates\n\ttimer.stop().print(\"compress PNOs\");\n\t// has its own timer\n\ttransform_pairs(pairs,U_ij);\n\n\n\treturn evals_ij;\n}\n\nPNOPairs PNO::transform_pairs(PNOPairs& pairs, const std::valarray<Tensor<double> >& U_ij) const {\n\t// compress all functions to avoid fences\n\tTIMER(timer0);\n\tauto allf = pairs.extract(pairs.pno_ij);\n\tallf = append(allf, pairs.extract(pairs.Kpno_ij));\n\tallf = append(allf, pairs.extract(pairs.W_ij_i));\n\tallf = append(allf, pairs.extract(pairs.W_ij_j));\n\tcompress(world, allf);\n\ttimer0.stop().print(\"MRA compress\");\n\tTIMER(time);\n\tPAIRLOOP(it)\n\t{\n\t\tconst size_t ij = it.ij();\n\t\tconst auto& U = U_ij[ij];\n\t\tif (U.size() == 0) {\n\t\t\tpairs.W_ij_i[ij] = vector_real_function_3d();\n\t\t\tpairs.W_ij_j[ij] = vector_real_function_3d();\n\t\t\tpairs.pno_ij[ij] = vector_real_function_3d();\n\t\t\tpairs.pno_ij[ij] = vector_real_function_3d();\n\t\t\tpairs.Kpno_ij[ij] = vector_real_function_3d();\n\t\t\tpairs.F_ij[ij] = Tensor<double>(std::vector<long>(2, 0));\n\t\t\tpairs.t_ij[ij] = Tensor<double>(std::vector<long>(2, 0));\n\t\t\tpairs.W_ij[ij] = Tensor<double>(std::vector<long>(2, 0));\n\t\t} else {\n\t\t\tif (pairs.F_ij[ij].size() > 0)\n\t\t\t\tpairs.F_ij[ij] = inner(inner(U.swapdim(0, 1), pairs.F_ij[ij]), U);\n\t\t\tif (pairs.t_ij[ij].size() > 0)\n\t\t\t\tpairs.t_ij[ij] = inner(inner(U.swapdim(0, 1), pairs.t_ij[ij]), U);\n\t\t\tif (pairs.W_ij[ij].size() > 0)\n\t\t\t\tpairs.W_ij[ij] = inner(inner(U.swapdim(0, 1), pairs.W_ij[ij]), U);\n\t\t\tif (pairs.W_ij_i[ij].size() > 0)\n\t\t\t\tpairs.W_ij_i[ij] = transform(world, pairs.W_ij_i[ij], U);\n\t\t\tif (pairs.W_ij_j[ij].size() > 0)\n\t\t\t\tpairs.W_ij_j[ij] = transform(world, pairs.W_ij_j[ij], U);\n\t\t\tif (pairs.pno_ij[ij].size() > 0)\n\t\t\t\tpairs.pno_ij[ij] = transform(world, pairs.pno_ij[ij], U);\n\t\t\tif (pairs.Kpno_ij[ij].size() > 0)\n\t\t\t\tpairs.Kpno_ij[ij] = transform(world, pairs.Kpno_ij[ij], U);\n\t\t}\n\t\tconst double thresh = FunctionDefaults<3>::get_thresh();\n\t\ttruncate(pairs.pno_ij[ij], thresh);\n\t\ttruncate(pairs.W_ij_i[ij], thresh);\n\t\ttruncate(pairs.W_ij_j[ij], thresh);\n\t\ttruncate(pairs.Kpno_ij[ij], thresh);\n\t}\n\t// rotate overlaps\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tconst size_t ij = it.ij();\n\t\tconst size_t i = it.i();\n\t\tconst size_t j = it.j();\n\t\tauto& S_ij_kj = pairs.S_ij_kj;\n\t\tauto& S_ij_ik = pairs.S_ij_ik;\n\t\tfor (OrbitalIterator kit = oit(); kit; ++kit) {\n\t\t\tconst size_t k = kit.i();\n\t\t\t{\n\t\t\t\tconst auto kj = f12.pit().tridx(k, j);\n\t\t\t\t//const auto ijk = f12.pit().tridx(ij, kj);\n\t\t\t\t//const auto swap_ij_kj = ij < kj;\n\t\t\t\tif (U_ij[kj].size() == 0 || U_ij[ij].size() == 0) {\n\t\t\t\t\tS_ij_kj.set(i, j, k, Tensor<double>(std::vector<long>(2, 0)));\n\t\t\t\t} else if (S_ij_kj.is_unique(i, j, k)) {\n\t\t\t\t\tif (!S_ij_kj.is_initialized(i, j, k))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tS_ij_kj.set(i, j, k, inner(inner(U_ij[ij].swapdim(0, 1), S_ij_kj.get(i, j, k)), U_ij[kj]));\n\t\t\t\t}\n\t\t\t}\n\t\t\t{\n\t\t\t\tconst auto ik = f12.pit().tridx(i, k);\n\t\t\t\t//const auto ijk = f12.pit().tridx(ij, ik);\n\t\t\t\t//const auto swap_ij_ik = ij < ik;\n\t\t\t\tif (U_ij[ik].size() == 0 || U_ij[ij].size() == 0) {\n\t\t\t\t\tS_ij_ik.set(i, j, k, Tensor<double>(std::vector<long>(2, 0)));\n\t\t\t\t} else if (S_ij_ik.is_unique(i, j, k)) {\n\t\t\t\t\tif (!S_ij_ik.is_initialized(i, j, k))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tS_ij_ik.set(i, j, k, inner(inner(U_ij[ij].swapdim(0, 1), S_ij_ik.get(i, j, k)), U_ij[ik]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\ttime.stop().print(\"Transform Pairs\");\n\treturn pairs;\n}\n\n/// Print information about the PNO rank of all pairs (i.e. the number of PNO functions)\nvoid PNO::print_ranks(const PNOPairs& pairs)const{\n\tmsg <<\"Information About All Pairs:\\n\";\n\tsize_t sum=0;\n\tsize_t maxi=0;\n\tsize_t s=0;\n\tPAIRLOOP(it){\n\t\tconst std::string name=pairs.name(it);\n\t\tmsg << name << std::setw(std::max(0,int(20-name.size())))  <<  \" \" <<\" number=\"<<it.ij()<<\" \";\n\t\tconst size_t rank= pairs.pno_ij[it.ij()].size();\n\t\tmsg<<\"rank=\" <<std::setw(3) <<rank<<\" frozen=\" << pairs.frozen_ij[it.ij()] << \"\\n\";\n\t\tmaxi=std::max(maxi,rank);\n\t\tsum+=rank;\n\t\t++s;\n\t}\n\t//const size_t lr=maxi;\n\tconst double ar=double(sum)/double(s);\n\tmsg << \"number of pairs=\"  << s << \"\\n\";\n\tmsg << \"average rank   =\"  << sum/s << \" (\"<<ar<<\")\" << \"\\n\";\n\tmsg << \"largest rank   =\"  << maxi << \"\\n\";\n\n}\n\nbool PNO::update_pno(PNOPairs& pairs, const std::valarray<Tensor<double> >& rdm_evals_ij, const Tensor<double>& F_occ) const {\n\tTIMER(timer);\n\t// convenience assignement\n\tconst auto nocc_act = pairs.nocc;\n\tauto& pno_ij=pairs.pno_ij;\n\tauto& W_ij_i=pairs.W_ij_i;\n\tauto& W_ij_j=pairs.W_ij_j;\n\t//auto& W_ij=pairs.W_ij;\n\tauto& F_ij=pairs.F_ij;\n\tauto& t2_ij=pairs.t_ij;\n\tauto& S_ij_ik=pairs.S_ij_ik;\n\tauto& S_ij_kj=pairs.S_ij_kj;\n\tconst double omega=pairs.cis.omega;\n\tif(pairs.type!=CISPD_PAIRTYPE) MADNESS_ASSERT(omega==0.0);\n\n\tbool converged = true;\n\t// compute densities between coupled pairs\n\tPNOTensors::Tensor_IJ_IK<double> D_ij_ik(nocc_act); // f12.pit().tridx(ij,ik) -> D_{a_ij,b_ik}\n\tPNOTensors::Tensor_IJ_KJ<double> D_ij_kj(nocc_act); // f12.pit().tridx(ij,kj) -> D_{a_ij,b_kj}\n\t{\n\t\tTIMER(time);\n\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\tconst size_t ij = it.ij();\n\t\t\tconst size_t i = it.i();\n\t\t\tconst size_t j = it.j();\n\t\t\tconst auto& T_ij = t2_ij[ij];\n\t\t\tif (T_ij.normf() == 0.0)\n\t\t\t\tcontinue;\n\n\t\t\tconst auto Tt_ij = 4 * T_ij - 2 * T_ij.swapdim(0, 1);\n\t\t\tfor (OrbitalIterator kit = oit(); kit; ++kit) {\n\t\t\t\tconst size_t k = kit.i();\n\t\t\t\t// D_ij_kj\n\t\t\t\tconst auto kj = f12.pit().tridx(k, j);\n\t\t\t\tif (t2_ij[kj].size() == 0.0) {\n\t\t\t\t\tD_ij_kj.set(i, j, k, Tensor<double>(std::vector<long>(2,0)));\n\t\t\t\t} else if (!D_ij_kj.is_initialized(i, j, k)) {\n\t\t\t\t\tconst auto swap_kj = k < j;\n\t\t\t\t\tconst auto T_kj = swap_kj ? t2_ij[kj].swapdim(0, 1) : t2_ij[kj];\n\t\t\t\t\tconst auto s_ij_kj = S_ij_kj.get(i, j, k);\n\t\t\t\t\tconst auto d_ij_kj = inner(inner(Tt_ij.swapdim(0, 1), s_ij_kj), T_kj) + inner(inner(Tt_ij, s_ij_kj), T_kj.swapdim(0, 1));\n\t\t\t\t\tif (param.debug() && world.rank() == 0)\n\t\t\t\t\t\tprint(\"D{i,j}{k,j} (i=\", i, \",j=\", j, \",k=\", k, \"):\", d_ij_kj);\n\n\t\t\t\t\tD_ij_kj.set(i, j, k, d_ij_kj);\n\t\t\t\t}\n\n\t\t\t\t// D_ij_ik\n\t\t\t\tconst auto ik = f12.pit().tridx(i, k);\n\t\t\t\tif (t2_ij[ik].size() == 0.0) {\n\t\t\t\t\tD_ij_ik.set(i, j, k, Tensor<double>(std::vector<long>(2,0)));\n\t\t\t\t} else if (!D_ij_ik.is_initialized(i, j, k)) {\n\t\t\t\t\tconst auto ik = f12.pit().tridx(i, k);\n\t\t\t\t\tconst auto swap_ik = i < k;\n\t\t\t\t\tconst auto T_ik = swap_ik ? t2_ij[ik].swapdim(0, 1) : t2_ij[ik];\n\t\t\t\t\tconst auto s_ij_ik = S_ij_ik.get(i, j, k);\n\t\t\t\t\tconst auto d_ij_ik = inner(inner(Tt_ij.swapdim(0, 1), s_ij_ik), T_ik) + inner(inner(Tt_ij, s_ij_ik), T_ik.swapdim(0, 1));\n\t\t\t\t\tif (param.debug() && world.rank() == 0)\n\t\t\t\t\t\tprint(\"D{i,j}{i,k} (i=\", i, \",j=\", j, \",k=\", k, \"):\", d_ij_ik);\n\n\t\t\t\t\tD_ij_ik.set(i, j, k, d_ij_ik);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttime.stop().print(\"compute densities for G application\");\n\t}\n\n\t// for each pair assemble the potentials\n\tvector_real_function_3d allVP;\n\tstd::vector<poperatorT> allG;\n\t{\n\t\tTIMER(timer2);\n\n\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\tconst size_t ij = it.ij();\n\t\t\tconst size_t i = it.i();\n\t\t\tconst size_t j = it.j();\n\t\t\tconst auto& pno = pno_ij[ij];\n\n\t\t\tif (pairs.frozen_ij[it.ij()]) {\n\t\t\t\tmsg << it.name() << \" is frozen: no optimization\" << \"\\n\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (pno.empty()){\n\t\t\t\tmsg << it.name() << \" is empty: no optimization\" << \"\\n\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst auto npno = pno.size();\n\t\t\t// compute density and energy density\n\t\t\tconst auto& T = t2_ij[ij];\n\t\t\tif (T.normf() == 0.0)\n\t\t\t\tcontinue;\n\n\t\t\tconst auto FT = inner(F_ij[ij], T);\n\t\t\tconst auto T_t = T.swapdim(0, 1);\n\t\t\t// (T F)^\\dagger = F^\\dagger T^\\dagger = F T^\\dagger\n\t\t\tconst auto TF_t = inner(F_ij[ij], T_t);\n\t\t\tconst auto T_tilde = 4 * T - 2 * T_t;\n\t\t\tconst auto T_tilde_t = T_tilde.swapdim(0, 1);\n\t\t\tauto Dij = inner(T_tilde_t, T) + inner(T_tilde, T_t);\n\t\t\tauto Eij = inner(T_tilde_t, FT) + inner(T_tilde, TF_t);\n\t\t\t//        print(\"pair {\", i, \",\", j, \"}: density:\\n\", Dij);\n\t\t\t//        print(\"pair {\", i, \",\", j, \"}: energy density:\\n\", Eij);\n\t\t\t// compute (J-K+V) | a >  (J here = 2J in the notes)\n\t\t\t//vector_real_function_3d Ja = J(pno);\n\t\t\t//vector_real_function_3d Ka = K(pno);\n\t\t\t//vector_real_function_3d Va = V(pno);\n\t\t\t//vector_real_function_3d JKVa = add(world, sub(world, Ja, Ka), Va);\n\t\t\t//truncate(world, JKVa, param.thresh);\n\t\t\t//const auto JKVa=J(pno_ij[ij])+V(pno_ij[ij])-pairs.Kpno_ij[ij];\n\t\t\t// this will contain all contributions to apply Green's function to\n\t\t\tvector_real_function_3d Vphi(npno);\n\t\t\tTensor<double> Vphi_energy(npno);\n\t\t\t// compute Vphi and matching Green's function energy\n\t\t\tfor (size_t e = 0; e != npno; ++e) {\n\t\t\t\tif (omega == 0.0)\n\t\t\t\t\tVphi_energy(e) = -1 * ((Eij(e, e) / Dij(e, e)) - F_occ(i, i) - F_occ(j, j));\n\t\t\t\telse {\n\t\t\t\t\tVphi_energy(e) = -1 * (((Eij(e, e)) / Dij(e, e)) - F_occ(i, i) - F_occ(j, j) - omega);\n\t\t\t\t}\n\t\t\t\t// QW terms\n\t\t\t\tfor (size_t b = 0; b != npno; ++b) {\n\t\t\t\t\tif (b == 0)\n\t\t\t\t\t\tVphi[e] = T_tilde(e, b) * W_ij_i[ij][b] + T_tilde(b, e) * W_ij_j[ij][b];\n\t\t\t\t\telse\n\t\t\t\t\t\tVphi[e] += T_tilde(e, b) * W_ij_i[ij][b] + T_tilde(b, e) * W_ij_j[ij][b];\n\t\t\t\t}\n\t\t\t\t// Fock terms\n\t\t\t\tif (nocc_act != 1) {\n\t\t\t\t\t// need to include pair-pair terms if more than 1 pair\n\t\t\t\t\tfor (size_t k = 0; k != nocc_act; ++k) {\n\t\t\t\t\t\t// ik\n\t\t\t\t\t\tif (k != j) {\n\t\t\t\t\t\t\tconst auto ik = f12.pit().tridx(i, k);\n\t\t\t\t\t\t\tconst auto& pno_ik = pno_ij[ik];\n\t\t\t\t\t\t\tconst auto d_ij_ik = D_ij_ik.get(i, j, k);\n\t\t\t\t\t\t\tfor (size_t c = 0; c != pno_ik.size(); ++c) {\n\t\t\t\t\t\t\t\tVphi[e] -= pno_ik[c] * (d_ij_ik(e, c) * F_occ(k, j));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// kj\n\t\t\t\t\t\tif (k != i) {\n\t\t\t\t\t\t\tconst auto kj = f12.pit().tridx(k, j);\n\t\t\t\t\t\t\tconst auto& pno_kj = pno_ij[kj];\n\t\t\t\t\t\t\tconst auto d_ij_kj = D_ij_kj.get(i, j, k);\n\t\t\t\t\t\t\tfor (size_t c = 0; c != pno_kj.size(); ++c) {\n\t\t\t\t\t\t\t\tVphi[e] -= pno_kj[c] * (d_ij_kj(e, c) * F_occ(i, k));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (size_t c = 0; c != npno; ++c) {\n\t\t\t\t\tif (c != e) {\n\t\t\t\t\t\tVphi[e] += Eij(e, c) * pno[c];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tVphi[e] *= 1 / Dij(e, e);\n\t\t\t\t// diag term\n\t\t\t\t//Vphi[e] += JKVa[e];\n\t\t\t}\n\n\t\t\tallVP=append(allVP,Vphi);\n\t\t\tstd::vector<poperatorT> bsh3 = make_bsh_operators(world, Vphi_energy);\n\t\t\tallG.insert(allG.end(),bsh3.begin(),bsh3.end());\n\n\t\t\t// set back all matrices for pairs which will be optimized\n\t\t\tpairs.t_ij[ij]=Tensor<double>(std::vector<long>(2,0));\n\t\t\tpairs.W_ij[ij]=Tensor<double>(std::vector<long>(2,0));\n\t\t\tpairs.F_ij[ij]=Tensor<double>(std::vector<long>(2,0));\n\t\t}\n\t\ttimer2.stop().print(\"Prepare for G application\");\n\t}\n\tif(K.type != \"neglect\"){\n\t\t// compute J potetial and add it with the precomputed K potential\n\t\tTIMER(timerK);\n\t\tconst auto allK=pairs.extract(pairs.Kpno_ij);\n\t\tallVP -= allK;\n\t\ttimerK.stop().print(\"add K\");\n\t}\n\tTIMER(timer3);\n\t// clear intermediates (for frozen pairs the matrices will stay to avoid recomputation)\n\tPAIRLOOP(it) pairs.clear_intermediates(it);\n\tdouble tmps=get_size(world,allVP);\n\tmsg << \"size of all Vpsi potentials (without Vnuc and J) \" << tmps << \" GB \\n\";\n\tvector_real_function_3d allP=pairs.extract(pairs.pno_ij);\n\tvector_real_function_3d newP;\n\tsize_t chunk=param.chunk();\n\tauto itVP=allVP.begin();\n\tauto itP=allP.begin();\n\tauto itG=allG.begin();\n\tstd::vector<double> allR;\n\twhile(allR.size()<allP.size()){\n\t\tconst auto dist=std::distance(itVP,allVP.end());\n\t\tif(chunk>size_t(dist)) chunk=dist;\n\t\t// include the nuclear potential\n\t\tauto Vtmp=vector_real_function_3d(itVP,itVP+chunk);\n\t\tVtmp+=(V(vector_real_function_3d(itP,itP+chunk)));\n\t\tVtmp+=(J(vector_real_function_3d(itP,itP+chunk)));\n\t\t{\n\t\t\tdouble tmps=get_size(world,Vtmp);\n\t\t\tmsg << \"time=\" << wall_time() << \" chunk=\" << chunk <<  \" Vpsi+Vnuc+J=\" << tmps << \" GB\\n\";\n\t\t}\n\t\ttruncate(world,Vtmp);\n\t\t{\n\t\t\tdouble tmps=get_size(world,Vtmp);\n\t\t\tmsg << \"time=\" << wall_time() << \" chunk=\" << chunk <<  \" Vpsi+Vnuc+J=\" << tmps << \" GB (after truncation)\\n\";\n\t\t}\n\t\tscale(world,Vtmp,-2.0);\n\t\tauto G=std::vector<poperatorT>(itG,itG+chunk);\n\t\tauto Gtmp=Q(apply(world,G,Vtmp));\n\t\tVtmp.clear();\n\t\tauto Rnorm = norm2s<double,3>(world, Gtmp-vector_real_function_3d(itP,itP+chunk));\n\t\tnewP.insert(newP.end(), Gtmp.begin(), Gtmp.end());\n\t\t// keep the norms\n\t\tallR.insert(allR.end(), Rnorm.begin(), Rnorm.end());\n\t\titVP+=chunk;\n\t\titP+=chunk;\n\t\titG+=chunk;\n\t}\n\n\ttimer3.stop().print(\"Apply G to all\");\n\n\n\tTIMER(timer4);\n\t// reassemble without overwriting frozen pairs\n\tpairs.pno_ij=pairs.reassemble(newP,pairs.pno_ij);\n\tpairs.S_ij_ik.reset();\n\tpairs.S_ij_kj.reset();\n\ttimer4.stop().print(\"apply Q and update\");\n\t// print some detailed information about the errors\n\tauto iterr=allR.begin();\n\tPAIRLOOP(it){\n\t\tconst size_t ij = it.ij();\n\t\tconst size_t ps=pno_ij[ij].size();\n\t\tif (pairs.frozen_ij[it.ij()]) continue;\n\t\tif (ps==0) continue;\n\t\tMADNESS_ASSERT(iterr!=allR.end());\n\t\tconst auto errij=std::vector<double>(iterr,iterr+ps);\n\t\tmsg << pairs.name(it) << \" residual norms:\\n\";\n\t\tmsg << errij << \"\\n\";\n\t\tmsg << pairs.name(it) << \" scaled residual norms:\\n\";\n\t\tstd::vector<double> scerrij(errij.size());\n\t\tfor(size_t a=0;a<scerrij.size();++a) scerrij[a]=errij[a]*sqrt(rdm_evals_ij[ij](a));\n\t\tmsg << scerrij << \"\\n\";\n\t\titerr+=ps;\n\t\tif(*std::max_element(scerrij.begin(),scerrij.end())>param.dconv()) converged=false;\n\t}\n\n\ttimer.stop().print(\"update all PNOs\");\n\treturn converged;\n}\n\nstd::vector<PNO::poperatorT> PNO::make_bsh_operators(World& world, const tensorT& evals) const\n{\n\tPROFILE_MEMBER_FUNC (SCF);\n\t//int nmo = evals.dim(0);\n\tstd::vector<poperatorT> ops(evals.size());\n\tdouble tol = param.op_thresh();\n\tfor (int i = 0;i < evals.size();++i) {\n\t\tdouble eps = evals(i);\n\t\tif (eps > 0) {\n\t\t\tMADNESS_EXCEPTION(\"Positive Eigenvalue for BSH Operator?????\", 1);\n\t\t}\n\t\tops[i] = poperatorT(BSHOperatorPtr3D(world, sqrt(-2.0 * eps), nemo.get_calc()->param.lo(), tol));\n\t}\n\treturn ops;\n}\n\nvector_real_function_3d PNO::compute_CIS_potentials(const vector_real_function_3d& xcis) const {\n\treal_function_3d tH = real_factory_3d(world);\n\tfor (size_t i = 0; i < xcis.size(); ++i) {\n\t\ttH += f12.acmos[i] * xcis[i];\n\t}\n\tconst vector_real_function_3d J = (*poisson)(tH) * f12.acmos;\n\tvector_real_function_3d K;\n\tfor (size_t i = 0; i < xcis.size(); ++i) {\n\t\treal_function_3d Ki = real_factory_3d(world);\n\t\tfor (size_t j = 0; j < xcis.size(); ++j)\n\t\t\tKi += (*poisson)(f12.acmos[j] * f12.acmos[i]) * xcis[j];\n\t\tK.push_back(Ki);\n\t}\n\tvector_real_function_3d result = Q(2.0 * J - K);\n\ttruncate(world, result, param.thresh());\n\treturn result;\n}\n\nTensor<double> PNO::compute_fluctuation_matrix(const ElectronPairIterator& it, const vector_real_function_3d& pnos, const vector_real_function_3d& Kpnos_in) const {\n\tif (param.f12()) {\n\t\tvector_real_function_3d Kpnos = Kpnos_in;\n\t\tif (Kpnos_in.empty())\n\t\t\tKpnos = K(pnos);\n\n\t\tconst double sizetmp = get_size(world, Kpnos);\n\t\tif (world.rank() == 0)\n\t\t\tstd::cout << \"Kpnos Intermediate:\" << sizetmp << \" Gbyte\\n\";\n\n\t\treturn (f12.compute_regularized_fluctuation_matrix(it, pnos, Kpnos));\n\t} else {\n\t\tconst vector_real_function_3d vi = mul(world, f12.acmos[it.i()], pnos, false);\n\t\tvector_real_function_3d vj;\n\t\tif (it.diagonal())\n\t\t\tvj = vi;\n\t\telse\n\t\t\tvj = mul(world, f12.acmos[it.j()], pnos, false);\n\n\t\tworld.gop.fence();\n\t\tconst vector_real_function_3d gvi = apply(world, *poisson, vi);\n\t\treturn transpose(matrix_inner(world, vj, gvi));\n\t}\n}\n\nTensor<double> PNO::compute_cispd_fluctuation_matrix(const ElectronPairIterator& it, PNOPairs& pairs) const {\n\tTIMER(timer);\n\tTensor<double> result;\n\t// get intermediates\n\tvector_real_function_3d& pnos = pairs.pno_ij[it.ij()];\n\tvector_real_function_3d& Kpnos = pairs.Kpno_ij[it.ij()];\n\tif(Kpnos.empty()){\n\t\tTIMER(timerK);\n\t\tconst auto Kp=K(pnos);\n\t\tKpnos=Kp;\n\t\ttimerK.stop().print(\"recompute Kpno\");\n\t}\n\tstd::pair<vector_real_function_3d, vector_real_function_3d> empty = std::make_pair(vector_real_function_3d(), vector_real_function_3d());\n\tconst real_function_3d xi = pairs.cis.x[it.i()];\n\tconst real_function_3d xj = pairs.cis.x[it.j()];\n\tconst real_function_3d Kxi = pairs.cis.Kx[it.i()];\n\tconst real_function_3d Kxj = pairs.cis.Kx[it.j()];\n\tconst real_function_3d Vxi = pairs.cis.Vx[it.i()];\n\tconst real_function_3d Vxj = pairs.cis.Vx[it.j()];\n\tconst real_function_3d moi = f12.acmos[it.i()];\n\tconst real_function_3d moj = f12.acmos[it.j()];\n\tconst real_function_3d Ki = f12.acKmos[it.i()];\n\tconst real_function_3d Kj = f12.acKmos[it.j()];\n\tconst auto& x=pairs.cis.x;\n\tconst auto& Vx=pairs.cis.Vx;\n\tif (param.f12()) {\n\n\t\tTIMER(time1);\n\t\t// xo part\n\t\tconst auto PNO=std::make_pair(pnos,Kpnos);\n\t\tTensor<double> xo_part = (f12.compute_regularized_fluctuation_matrix(PNO, empty, std::make_pair(xi, Kxi), std::make_pair(moj, Kj)));\n\t\t// ox part\n\t\tTensor<double> ox_part;\n\t\tif (it.diagonal())\n\t\t\tox_part = transpose(xo_part);\n\t\telse\n\t\t\tox_part = (f12.compute_regularized_fluctuation_matrix(PNO, empty, std::make_pair(moi, Ki), std::make_pair(xj, Kxj)));\n\t\ttime1.stop().print(\"CIS(D)-Wij: xo/ox\").start();\n\n\t\t// fock residue\n\t\tTensor<double> fr_xo_part = (f12.compute_xyab_integrals(Vxi, moj, pnos, pnos, f12.fop));\n\t\tTensor<double> fr_ox_part;\n\t\tif (it.diagonal())\n\t\t\tfr_ox_part = transpose(fr_xo_part);\n\t\telse\n\t\t\tfr_ox_part = (f12.compute_xyab_integrals(moi, Vxj, pnos, pnos, f12.fop));\n\t\ttime1.stop().print(\"CIS(D)-Wij: fr\").start();\n\n\t\t// projector response\n\t\tTensor<double> pr_part_1(pnos.size(), pnos.size());\n\t\tTensor<double> pr_part_2(pnos.size(), pnos.size());\n\t\t{\n\t\t\tconst Tensor<double> xpno = matrix_inner(world, x, pnos);\n\t\t\tTensor<double> im1 = (f12.compute_regularized_fluctuation_matrix(std::make_pair(f12.acmos, f12.acKmos), PNO, std::make_pair(moi, Ki), std::make_pair(moj, Kj)));\n\t\t\tTensor<double> im2;\n\t\t\tif (it.diagonal())\n\t\t\t\tim2 = transpose(im1);\n\t\t\telse\n\t\t\t\tim2 = (f12.compute_regularized_fluctuation_matrix(PNO, std::make_pair(f12.acmos, f12.acKmos), std::make_pair(moi, Ki), std::make_pair(moj, Kj)));\n\t\t\tfor (size_t a = 0; a < pnos.size(); ++a) {\n\t\t\t\tfor (size_t b = 0; b < pnos.size(); ++b) {\n\t\t\t\t\tfor (size_t k = 0; k < f12.acmos.size(); ++k) {\n\t\t\t\t\t\t// projector response\n\t\t\t\t\t\tpr_part_1(a, b) += xpno(k, a) * im1(k, b);\n\t\t\t\t\t\tpr_part_2(a, b) += xpno(k, b) * im2(a, k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttime1.stop().print(\"CIS(D)-Wij: pr\").start();\n\t\t// commutator response\n\t\tTensor<double> cr_part(pnos.size(), pnos.size());\n\t\t{\n\t\t\tconst Tensor<double> Vxpno = matrix_inner(world, Vx, pnos);\n\t\t\tTensor<double> im1 = (f12.compute_xyab_integrals(moi, moj, f12.acmos, pnos, f12.fop));\n\t\t\tTensor<double> im2;\n\t\t\tif (it.diagonal())\n\t\t\t\tim2 = transpose(im1);\n\t\t\telse\n\t\t\t\tim2 = (f12.compute_xyab_integrals(moi, moj, pnos, f12.acmos, f12.fop));\n\t\t\tfor (size_t a = 0; a < pnos.size(); ++a) {\n\t\t\t\tfor (size_t b = 0; b < pnos.size(); ++b) {\n\t\t\t\t\tfor (size_t k = 0; k < f12.acmos.size(); ++k) {\n\t\t\t\t\t\t// commutator response\n\t\t\t\t\t\tcr_part(a, b) += Vxpno(k, a) * im1(k, b);\n\t\t\t\t\t\tcr_part(a, b) += Vxpno(k, b) * im2(a, k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttime1.stop().print(\"CIS(D)-Wij: cr\").start();\n\t\tresult = xo_part - fr_xo_part + ox_part - fr_ox_part - (pr_part_1 + pr_part_2) + cr_part;\n\t} else {\n\t\tTIMER(time1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// xo part\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTensor<double> xo_part = (f12.compute_xyab_integrals(xi, moj, pnos, pnos, poisson));\n\t\t// ox part\n\t\tTensor<double> ox_part = (f12.compute_xyab_integrals(moi, xj, pnos, pnos, poisson));\n\t\ttime1.stop().print(\"CIS(D)-Wij: xo/ox\").start();\n\t\t// projector response\n\t\tTensor<double> pr_part(pnos.size(), pnos.size());\n\t\t{\n\t\t\tconst Tensor<double> xpno = matrix_inner(world, x, pnos);\n\t\t\tTensor<double> im1 = (f12.compute_xyab_integrals(moi, moj, f12.acmos, pnos, poisson));\n\t\t\tTensor<double> im2 = (f12.compute_xyab_integrals(moi, moj, pnos, f12.acmos, poisson));\n\t\t\tfor (size_t a = 0; a < pnos.size(); ++a) {\n\t\t\t\tfor (size_t b = 0; b < pnos.size(); ++b) {\n\t\t\t\t\tfor (size_t k = 0; k < f12.acmos.size(); ++k) {\n\t\t\t\t\t\t// projector response\n\t\t\t\t\t\tpr_part(a, b) += xpno(k, a) * im1(k, b);\n\t\t\t\t\t\tpr_part(a, b) += xpno(k, b) * im2(a, k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttime1.stop().print(\"CIS(D)-Wij: pr\").start();\n\t\tresult = (xo_part + ox_part - pr_part);\n\t\tKpnos.clear();\n\t}\n\ttimer.stop().print(\"CIS(D)-Wij: total\");\n\tpairs.W_ij[it.ij()]=result;\n\treturn result;\n}\n\nvoid PNO::canonicalize(PNOPairs& pairs)const{\n\tpairs.rdm_evals_ij = std::valarray<Tensor<double> >(); // make clear that they are not valid anymore\n\t// diagonalize all Fock matrices\n\tstd::valarray<Tensor<double> > U_ij(Tensor<double>(std::vector<long>(2,0)),pairs.npairs);\n\tPAIRLOOP(it){\n\t\tconst size_t n=pairs.pno_ij[it.ij()].size();\n\t\tif(n==0) continue;\n\n\t\tTensor<double> U, evals;\n\t\tsyev(pairs.F_ij[it.ij()], U, evals);\n\t\t// F is laster transformed in transform_pairs\n\t\tU_ij[it.ij()]=U;\n\t}\n\t// transform all pairs and potenials\n\ttransform_pairs(pairs, U_ij);\n}\n\nvoid PNO::save_pnos(const PNOPairs& pairs) const {\n\tTIMER(timer);\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tstd::string name = pairs.name(it);\n\t\tsave_function(pairs.pno_ij[it.ij()], name);\n\t}\n\ttimer.stop().print(\"save pnos on disc\");\n}\n\nPNOPairs PNO::load_pnos(PNOPairs& pairs) const {\n\tMADNESS_ASSERT(pairs.pno_ij.size() == pit().npairs());\n\tstd::valarray<vector_real_function_3d>& pno_ij = pairs.pno_ij;\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tvector_real_function_3d tmp;\n\t\tstd::string name = pairs.name(it);\n\t\ttry {\n\t\t\tload_function(world, tmp, name);\n\t\t\tmsg << \"Found PNOs for \" << name << \" with rank \" << tmp.size()\n\t\t\t\t\t<< \"\\n\";\n\t\t} catch (...) {\n\t\t\tmsg << \"failed to find PNO \" << name\n\t\t\t\t\t<< \" initialize as zero function\\nn\";\n\t\t}\n\t\tpno_ij[it.ij()] = tmp;\n\t}\n\treturn pairs;\n}\n\nvoid PNO::update_fluctuation_potentials(PNOPairs& pairs) const {\n\tTIMER(timer);\n\tPAIRLOOP(it)\n\t{\n\t\tif (pairs.frozen_ij[it.ij()]) {\n\t\t\tmsg << pairs.name(it) << \" is frozen: potential not computed\\n\";\n\t\t\tcontinue;\n\t\t}\n\t\tstd::pair<vector_real_function_3d, vector_real_function_3d> W;\n\t\tif (pairs.type == CISPD_PAIRTYPE)\n\t\t\tcompute_cispd_fluctuation_potential(it, pairs);\n\t\telse\n\t\t\tcompute_fluctuation_potential(it, pairs);\n\t}\n\ttimer.stop().print(\"Fluctuation Potentials\");\n}\n\n/// the terms are expanded as follows:\n/// Q (-J1 +K1) | i(1) >  < a(2) | j(2) >\n///  +  Q | i(1) > < a(2) | -J(2) + K(2) | j(2) >\n///  +  i(1) * \\int \\dr2 1/|r12| a(2) j(2)\n/// the first line is zero due to orthogonality of a and j, the second line is zero due to action of Q on i\ntemplate<typename projector>\nvector_real_function_3d PNO::compute_V_aj_i(\n\t\tconst real_function_3d& moi, const real_function_3d& moj,\n\t\tconst vector_real_function_3d& virtuals, const projector& Qpr) const {\n\tMADNESS_ASSERT(not param.f12());\n\tconst vector_real_function_3d aj = mul(world, moj, virtuals); // multiply a \\times j\n\tvector_real_function_3d gaj = apply(world, *poisson, aj); // \\int \\dr2 aj(2)/r12\n\tvector_real_function_3d Vaj_i = mul(world, moi, gaj);\n\tvector_real_function_3d Vaj_i1 = Qpr(Vaj_i);\n\ttruncate(world, Vaj_i1, param.thresh());\n\treturn Vaj_i1;\n}\n\n// used by CIS(D) (could also be used by MP2)\ntemplate<typename projector>\nvector_real_function_3d PNO::compute_Vreg_aj_i(\n\t\tconst real_function_3d& moi, const real_function_3d& moj,\n\t\tconst vector_real_function_3d& virtuals, const projector& Qpr,\n\t\tconst vector_real_function_3d& Kpno) const {\n\tMyTimer time = MyTimer(world).start();\n\tMADNESS_ASSERT(param.f12());\n\tconst real_function_3d Ki = K(moi); // can be much faster with intermediates of Ki and Kxi\n\tconst real_function_3d Kj = K(moj);\n\tvector_real_function_3d tmp = f12.apply_regularized_potential(moj, moi, Kj,\n\t\t\tKi, virtuals, Kpno);\n\tvector_real_function_3d Vaj_i = Qpr(tmp);\n\t//truncate(world,Vaj_i,param.thresh);\n\ttime.stop().print(\"compute_Vreg_aj_i\");\n\treturn Vaj_i;\n}\n\nvector_real_function_3d PNO::compute_Vreg_aj_i(const size_t& i,\n\t\tconst size_t& j, const vector_real_function_3d& virtuals,\n\t\tconst vector_real_function_3d& Kpno) const {\n\tMADNESS_ASSERT(param.f12());\n\tconst real_function_3d& moi = f12.acmos[i];\n\tconst real_function_3d& moj = f12.acmos[j];\n\tconst real_function_3d& Ki = f12.acKmos[i];\n\tconst real_function_3d& Kj = f12.acKmos[j];\n\tvector_real_function_3d tmp = f12.apply_regularized_potential(moj, moi, Kj,\n\t\t\tKi, virtuals, Kpno);\n\tvector_real_function_3d Vaj_i = Q(tmp);\n\ttruncate(world, Vaj_i, param.thresh());\n\treturn Vaj_i;\n}\n\nvector_real_function_3d PNO::compute_Vreg_aj_i_fock_residue(\n\t\tconst real_function_3d& ket1, const real_function_3d& ket2,\n\t\tconst vector_real_function_3d& virtuals) const {\n\tMyTimer time = MyTimer(world).start();\n\tconst vector_real_function_3d result = Q(\n\t\t\tapply(world, *f12.fop, ket2 * virtuals) * ket1);\n\ttime.stop().print(\"compute_Vreg_aj_i_fock_residue\");\n\treturn result;\n}\n\nvector_real_function_3d PNO::compute_Vreg_aj_i_commutator_response(\n\t\tconst real_function_3d& moi, const real_function_3d& moj,\n\t\tconst vector_real_function_3d& virtuals,\n\t\tconst vector_real_function_3d& Vx) const {\n\tMyTimer time = MyTimer(world).start();\n\tProjector<double, 3> OVx(f12.acmos, Vx);\n\tProjector<double, 3> OVxt(Vx, f12.acmos);\n\tconst vector_real_function_3d part1 = OVx(\n\t\t\tapply(world, *f12.fop, virtuals * moj) * moi);\n\tconst vector_real_function_3d part2 = Q(\n\t\t\tapply(world, *f12.fop, OVxt(virtuals) * moj) * moi);\n\ttime.stop().print(\"compute_Vreg_aj_i_commutator_response\");\n\treturn (part1 + part2);\n}\n\nvoid PNO::check_orthonormality(const vector_real_function_3d& v) const {\n\tTensor<double> ovlp = matrix_inner(world, v, v);\n\tfor (int i = 0; i < ovlp.dim(0); ++i)\n\t\tovlp(i, i) -= 1.0;\n\tdouble error = ovlp.normf() / ovlp.size();\n\tif (error > 1.e-14 && world.rank() == 0)\n\t\tprint(\"orthonormality error: \", error);\n}\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/PNO.h",
    "content": "/*\n * PNO.h\n *\n *  Created on: Oct 22, 2018\n *      Author: kottmanj\n */\n\n#ifndef PAPER_CODE_PNO_H_\n#define PAPER_CODE_PNO_H_\n\n// convenience macro\n#define PAIRLOOP(it) for(ElectronPairIterator it=pit();it;++it)\n#define TIMER(timer) MyTimer timer=MyTimer(world).start();\n\n#include<madness/chem/PNOF12Potentials.h>\n#include <madness/world/worldmem.h>\n\n#include<madness/chem/CC2.h>\n#include<madness/chem/QCPropertyInterface.h>\n#include<madness/chem/molecule.h>\n#include<madness/chem/PNOTensors.h>\n\nnamespace madness {\n// needed to plot cubefiles with madness\nextern std::vector<std::string> cubefile_header(std::string filename=\"input\", const bool& no_orient=false);\n\nclass PNO : public QCPropertyInterface {\npublic:\n\ttypedef std::shared_ptr<operatorT> poperatorT;\n\tPNO(World& world, const Nemo& nemo, const PNOParameters& parameters, const F12Parameters& paramf12)\n\t: world(world),\n\t  param(parameters),\n\t  nemo(nemo),\n\t  J(world, &nemo),\n\t  K(ParametrizedExchange(world, nemo, parameters.exchange())),\n\t  T(world),\n\t  V(world, nemo.ncf),\n\t  F(world, &nemo),\n\t  Q( nemo.get_calc()->amo),\n\t  basis(world,nemo.get_calc()->molecule,8),\n\t  f12(world,nemo,basis,paramf12),\n\t  msg(world)\n\t{\n\t\tpoisson = std::shared_ptr<real_convolution_3d>(CoulombOperatorPtr(\n\t\t\t\tworld, nemo.get_calc()->param.lo(),param.op_thresh()));\n\t\tMADNESS_ASSERT(param.freeze() == f12.param.freeze());\n\t}\n\n    std::string name() const {return \"PNO\";};\n\n    static void help() {\n        print_header2(\"help page for PNO\");\n        print(\"The PNO code computes MP2 energies using pair natural orbitals\");\n        print(\"You can print all available calculation parameters by running\\n\");\n        print(\"pno --print_parameters\\n\");\n        print(\"You can perform a simple calculation by running\\n\");\n        print(\"pno --geometry=h2o.xyz\\n\");\n        print(\"provided you have an xyz file in your directory.\");\n\n    }\n\n    static void print_parameters() {\n        PNOParameters param;\n        print(\"default parameters for the pno program are\\n\");\n        param.print(\"pno\", \"end\");\n\n        F12Parameters f12param(param);\n        print(\"\\n\\nadditional parameters for the correlation factor are\\n\");\n        f12param.print(\"f12\", \"end\");\n\n        print(\"\\n\\nthe molecular geometry must be specified in a separate block:\");\n        Molecule::print_parameters();\n    }\n\n    virtual bool selftest() {\n        return true;\n    };\n\n\t/// Compute the projected MP2 energies: 2<ij|g|uij> - <ji|g|uij> for all pairs\n\t/// gives back the PairEnergies structure with all singlet and triplet energies\n\tPairEnergies compute_projected_mp2_energies(PNOPairs& pairs)const;\n\n\t/// solves whatever was specified in input\n\t/// will call solve_mp2, solve_cispd etc\n\tvoid solve()const{\n\t\tstd::vector<PNOPairs> dummy;\n\t\tsolve(dummy);\n\t}\n\t/// Solve for the PairType that is given\n\tvoid solve(std::vector<PNOPairs>& all_pairs) const;\n\n\t/// interfaces the BasisFunctions class\n\t/// guesses a set of virtuals depending on the guesstype and what was specified in the parameters\n\tvector_real_function_3d guess_virtuals(const vector_real_function_3d& f = vector_real_function_3d(), const GuessType& inpgt = UNKNOWN_GUESSTYPE) const;\n\n\t/// convenience\n\tPNOPairs orthonormalize_cholesky(PNOPairs& pairs) const;\n\n\t/// only the f12 part of the excited state correction of CIS(D) (namely the terms s2b and s2c)\n\tPairEnergies compute_cispd_f12_correction_es(const vector_real_function_3d& xcis, PairEnergies& energies) const;\n\t/// excited state correction of CIS(D) (namely the terms s2b and s2c)\n\t/// f12 part is excluded (no need to recompute after every iteration)\n\tPairEnergies compute_cispd_correction_es(const vector_real_function_3d& xcis, PNOPairs& pairs) const;\n\n\t/// ground state correction of CIS(D) (s4a, s4b, s4c)\n\t/// f12 is excluded to avoid recomputation in iterations\n\tPairEnergies compute_cispd_correction_gs(const vector_real_function_3d& xcis,const PNOPairs& pairs) const;\n\n\t/// The f12 part of the ground state correction of CIS(D) (s4a, s4b, s4c)\n\tPairEnergies compute_cispd_f12_correction_gs(const vector_real_function_3d& xcis, PairEnergies& energies) const;\n\n\t/// solve PNO-MP2 equations\n\tvoid solve_mp2(std::vector<PNOPairs>& pairs)const{\n\t\tif(pairs.empty()){\n\t\t\tPNOPairs mp2(MP2_PAIRTYPE,f12.acmos.size());\n\t\t\tsolve_mp2(mp2);\n\t\t\tpairs.push_back(mp2);\n\t\t}else{\n\t\t\tsolve_mp2(pairs.front());\n\t\t}\n\t}\n\tPNOPairs solve_mp2(PNOPairs& pairs) const;\n\t/// solve the PNO-CIS(D) equations\n\tstd::vector<PNOPairs> solve_cispd(std::vector<PNOPairs>& pairs) const;\n\n\t/// compute the average and the maximum rank of a set of PNOs\n\tstd::pair<size_t, size_t> get_average_rank(const std::valarray<vector_real_function_3d>& va) const;\n\n\t/// change the state of insignificant pairs to frozen\n\t/// This is based on:\n\t/// 1. External Parameters (are some pairs demanded to be frozen)\n\t/// 2. Energies (if the current energy is significantly below the MRA threshold there is no point in further optimizing)\n\t/// 3. Spatial overlapp (if the norm of the product of the originating MOs is small: i.e. if ||(phi_i)*(phi_j)||_2 is small then pair_ij is insignificant)\n\tPNOPairs freeze_insignificant_pairs(PNOPairs& pairs)const;\n\n\t/// Do MRA truncation on all pairs\n\t/// pairs are extracted into one large vector and then compressed and truncated\n\t/// this saves time since there are less fences\n\tPNOPairs truncate_pairs(PNOPairs& pairs) const;\n\n\t/// Truncate the ranks of pairs to the given maxrank\n\tPNOPairs truncate_pair_ranks(PNOPairs& pairs) const;\n\n\t// small helper function to keep track of all keywords which mess with the guess\n\tbool is_guess_from_scratch(const PairType& ct)const{\n\t\tif(param.restart()==ALL_PAIRTYPE) return false;\n\t\telse if(param.restart()==ct) return false;\n\t\telse return true;\n\t}\n\n\t/// save PNOs on disc\n\tvoid save_pnos(const PNOPairs& pairs) const;\n\n\t/// load PNOs from disc\n\tPNOPairs load_pnos(PNOPairs& pairs) const;\n\n\t/// Initialize PNO pairs\n\t/// If the guesstype is the default (UNKNOWN_GUESSTYPE) this will take the guess type from the parameters\n\tPNOPairs initialize_pairs(PNOPairs& pairs, const GuessType& inpgt = UNKNOWN_GUESSTYPE) const;\n\n\t/// compute all fluctuation potentials and store them in the pair structure\n\tvoid update_fluctuation_potentials(PNOPairs& pairs) const;\n\t/// Compute the MP2 fluctuation potential of a speficif pair\n\tPNOPairs compute_fluctuation_potential(const ElectronPairIterator& it, PNOPairs& pairs) const;\n\t/// Compute the CIS(D) fluctuation potential of a specific pair\n \tPNOPairs compute_cispd_fluctuation_potential(const ElectronPairIterator& it, PNOPairs& pairs) const;\n \t/// Iterate the pairs\n \t/// The type of iteration depends on the parameters and the type of PNOPairs structure\n \t/// This will call iterate_pairs_internal at some point\n \t/// Depending on the parameters the pairs will be iterated adaptively or just once with one initial guess\n\tPNOPairs iterate_pairs(PNOPairs& pairs) const;\n\t/// Solve with adaptive solver descriped in the JPC paper\n\tPNOPairs adaptive_solver(PNOPairs& pairs) const;\n\t/// The actual function which interates the pairs\n\t/// Guess functions have to be created before\n\tPNOPairs iterate_pairs_internal(PNOPairs& pairs, const int maxiter, const double econv) const;\n\n\t/// Grow the rank of pairs by creating guess functions and adding them\n\t/// The type of guess is controlled by the parameters\n\tPNOPairs grow_rank(PNOPairs& pairs, std::string exop) const;\n\n\t/// convenience\n\tEnergyType energytype()const{return ( (param.f12() and f12.param.energytype()==PROJECTED_ENERGYTYPE) ? PROJECTED_ENERGYTYPE : HYLLERAAS_ENERGYTYPE);}\n\n\t/// solve the MP2 and CIS(D) amplitude equations\n\tPairEnergies t_solve(PNOPairs& pairs, const Tensor<double>& F_occ,\n\t\t\tconst double R_convergence_threshold = 1e-6, const size_t max_niter = 100) const;\n\n\t/// Compress the PNOs -> lose all PNOs which eigenvalue is below tpno\n\tstd::valarray<Tensor<double> > pno_compress(PNOPairs& pairs, const double tpno) const;\n\n\t/// transform the pnos and all the intermediates/potentials and matrices stored in the PNOPair structure\n\tPNOPairs transform_pairs(PNOPairs& pairs, const std::valarray<Tensor<double> >& U_ij) const;\n\n\t/// Print information about the PNO rank of all pairs (i.e. the number of PNO functions)\n\tvoid print_ranks(const PNOPairs& pairs)const;\n\n\t/// Update all PNOs: i.e. compute Fock-residue potential (V+2J-K, K is reused if Kpno_ij intermeidate in pairs is initialized) and apply the Green's function\n\t/// The fluctuation potentials have to be precomputed and stored in the pairs structure\n\tbool update_pno(PNOPairs& pairs, const std::valarray<Tensor<double> >& rdm_evals_ij,const Tensor<double>& F_occ) const;\n\n\t/// Convenience function to initialize all bsh operators\n\tstd::vector<poperatorT> make_bsh_operators(World& world, const tensorT& evals) const;\n\n\t/// get the CIS potentials without Fock residue, i.e Q(2tJ - 2tK)|i> , with transformed K and J\n\tvector_real_function_3d compute_CIS_potentials(const vector_real_function_3d& xcis) const;\n\n\n\t/// the terms are expanded as follows:\n\t/// Q (-J1 +K1) | i(1) >  < a(2) | j(2) >\n\t///  +  Q | i(1) > < a(2) | -J(2) + K(2) | j(2) >\n\t///  +  i(1) * \\int \\dr2 1/|r12| a(2) j(2)\n\t/// the first line is zero due to orthogonality of a and j, the second line is zero due to action of Q on i\n\ttemplate<typename projector>\n\tvector_real_function_3d compute_V_aj_i(const real_function_3d& moi,\n\t\t\tconst real_function_3d& moj,\n\t\t\tconst vector_real_function_3d& virtuals,\n\t\t\tconst projector& Qpr) const;\n\n\t// not used by CIS(D) -> can still use K intermediates\n\tvector_real_function_3d compute_Vreg_aj_i(const size_t& i, const size_t& j,\n\t\t\tconst vector_real_function_3d& virtuals,\n\t\t\tconst vector_real_function_3d& Kpno) const;\n\n\t// used by CIS(D) (could also be used by MP2)\n\ttemplate<typename projector>\n\tvector_real_function_3d compute_Vreg_aj_i(const real_function_3d& moi,\n\t\t\tconst real_function_3d& moj,\n\t\t\tconst vector_real_function_3d& virtuals, const projector& Qpr,\n\t\t\tconst vector_real_function_3d& Kpno =\n\t\t\t\t\tvector_real_function_3d()) const;\n\n\t// the Fock residue of the regularized potential for CIS(D) (vanishes for MP2)\n\t// the minus sign is not included here\n\t// this only evalues one part (has to be called twice: -compute_Vreg_aj_i_fock_residue(Vxi,moj) - compute_Vreg_aj_i_fock_residue(moi,Vxj)\n\t// returns <a|Qf12|ket1ket2> = Q(<a|f12|ket2>*|ket1>\n\tvector_real_function_3d compute_Vreg_aj_i_fock_residue(\n\t\t\tconst real_function_3d& ket1, const real_function_3d& ket2,\n\t\t\tconst vector_real_function_3d& virtuals) const;\n\t// returns <a|(OVxQ + QOVx)f|ij>_2 = OVx(<a|f12|j>*|i>) + Q(<a|OVxf12|j>*|i>), can apply Q global since QOVx=OVx\n\t// use also <ta| = <a|OVx = (OVx^t|a>)^t\n\tvector_real_function_3d compute_Vreg_aj_i_commutator_response(\n\t\t\tconst real_function_3d& moi, const real_function_3d& moj,\n\t\t\tconst vector_real_function_3d& virtuals,\n\t\t\tconst vector_real_function_3d& Vx) const;\n\n\n\n\t// compute Fluctuation Matrix without fluctuation potential (save memory in first iteration)\n\tTensor<double> compute_fluctuation_matrix(const ElectronPairIterator& it, const vector_real_function_3d& pnos, const vector_real_function_3d& Kpnos_in = vector_real_function_3d()) const;\n\n\tTensor<double> compute_cispd_fluctuation_matrix(const ElectronPairIterator& it, PNOPairs& pairs) const;\n\n\tvoid check_orthonormality(const vector_real_function_3d& v) const;\n\n\n\t/// \\param[in,out] A on input = real symmetric matrix, on output = diagonal\n\t/// matrix of eigenvalues (from smallest to largest) \\param[in,out] v on input\n\t/// = basis in which input A is represented, on output = the eigenbasis of A\n\tvoid canonicalize(PNOPairs& v) const;\n\npublic:\n\tWorld& world;\n\tPNOParameters param;  ///< calculation parameters\n\tNemo nemo;\n\tCoulomb<double,3> J;\n\tParametrizedExchange K;\n\tKinetic<double, 3> T;\n\tNuclear<double,3> V;\n\tFock<double,3> F;\n\tQProjector<double, 3> Q;\n\tstd::shared_ptr<real_convolution_3d> poisson;\n\tBasisFunctions basis; ///< class which holds all methods to read or create guess functions for PNO or CABS\n\tF12Potentials f12;\n\t/// convenience\n\tsize_t nocc()const{return nemo.get_calc()->amo.size();}\n\tsize_t nact()const{return nemo.get_calc()->amo.size()-param.freeze();}\n\tElectronPairIterator pit()const{ return f12.pit();} /// convenience\n\tOrbitalIterator oit()const{return OrbitalIterator(nemo.get_calc()->amo.size(),param.freeze());}\n\tCCMessenger msg;\n};\n\n\n\n} /* namespace madness */\n\n#endif /* PAPER_CODE_PNO_H_ */\n"
  },
  {
    "path": "src/madness/chem/PNOF12Potentials.cpp",
    "content": "/*\n * F12Potentials.cc\n *\n *  Created on: Aug 4, 2017\n *      Author: kottmanj\n */\n\n#include<madness/chem/PNOF12Potentials.h>\n\nnamespace madness {\n\n/// Factory function generating operator for convolution with grad(e^{-\\gamma*r}) in 3D\n\n/// Returns a 3-vector containing the convolution operator for the\n/// x, y, and z components of grad(e^{-\\gamma*r})\n/// maybe move to madness library (operator.h) at some point\nstatic\ninline\nstd::vector< std::shared_ptr< SeparatedConvolution<double,3> > >\nGradSlaterOperator(World& world,\n\t\tdouble gamma,\n\t\tdouble lo,\n\t\tdouble eps,\n\t\tconst BoundaryConditions<3>& bc=FunctionDefaults<3>::get_bc(),\n\t\tint k=FunctionDefaults<3>::get_k())\n\t\t{\n\ttypedef SeparatedConvolution<double,3> real_convolution_3d;\n\ttypedef std::shared_ptr<real_convolution_3d> real_convolution_3d_ptr;\n\tconst double pi = constants::pi;\n\tconst Tensor<double> width = FunctionDefaults<3>::get_cell_width();\n\tdouble hi = width.normf(); // Diagonal width of cell\n\tconst bool isperiodicsum = (bc(0,0)==BC_PERIODIC);\n\tif (isperiodicsum) hi *= 100; // Extend range for periodic summation\n\n\tGFit<double,3> fit=GFit<double,3>::SlaterFit(gamma,lo,hi,eps,false);\n\tTensor<double> coeff=fit.coeffs();\n\tTensor<double> expnt=fit.exponents();\n\n\tif (bc(0,0) == BC_PERIODIC) {\n\t\tfit.truncate_periodic_expansion(coeff, expnt, width.max(), true);\n\t}\n\n\tint rank = coeff.dim(0);\n\n\tstd::vector<real_convolution_3d_ptr> gradG(3);\n  const auto lattice_ranges = bc.lattice_range();\n\n\tfor (int dir=0; dir<3; dir++) {\n\t\tstd::vector< ConvolutionND<double,3> > ops(rank);\n\t\tfor (int mu=0; mu<rank; mu++) {\n\t\t\t// We cache the normalized operator so the factor is the value we must multiply\n\t\t\t// by to recover the coeff we want.\n\t\t\tdouble c = std::pow(sqrt(expnt(mu)/pi),3); // Normalization coeff\n\t\t\tops[mu].setfac(coeff(mu)/c/width[dir]);\n\n\t\t\tfor (int d=0; d<3; d++) {\n\t\t\t\tif (d != dir)\n\t\t\t\t\tops[mu].setop(d,GaussianConvolution1DCache<double>::get(k, expnt(mu)*width[d]*width[d], 0, lattice_ranges[dir]));\n\t\t\t}\n\t\t\tops[mu].setop(dir,GaussianConvolution1DCache<double>::get(k, expnt(mu)*width[dir]*width[dir], 1, lattice_ranges[dir]));\n\t\t}\n\t\tgradG[dir] = real_convolution_3d_ptr(new SeparatedConvolution<double,3>(world, ops));\n\t}\n\n\treturn gradG;\n\t\t}\n\n\nF12Potentials::F12Potentials(World& world,const Nemo& nemo, const BasisFunctions& basis, const F12Parameters& pp) :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tworld(world),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnemo(nemo),basis(basis),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tparam(pp),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmos(nemo.get_calc()->amo),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tacmos(initialize_active_mos(nemo)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tK(ParametrizedExchange(world, nemo, pp.exchange())),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tQ(nemo.get_calc()->amo) {\n\tconst double lo = 1.e-6;\n\tconst double eps = param.op_thresh();\n\tcoulombop = std::shared_ptr < real_convolution_3d > (CoulombOperatorPtr(world, lo, eps));\n\tbshop = std::shared_ptr < real_convolution_3d > (BSHOperatorPtr3D(world, param.gamma(), lo, eps));\n\tbshop_sq = std::shared_ptr < real_convolution_3d > (BSHOperatorPtr3D(world, param.gamma() * 2.0, lo, eps));\n\tfop = std::shared_ptr < real_convolution_3d > (SlaterF12OperatorPtr(world, param.gamma(), lo, eps));\n\tslaterop = std::shared_ptr < real_convolution_3d > (SlaterF12OperatorPtr(world, param.gamma(), lo, eps));\n\tslaterop_sq = std::shared_ptr < real_convolution_3d > (SlaterF12OperatorPtr(world, param.gamma() * 2.0, lo, eps));\n\tfop = std::shared_ptr < real_convolution_3d > (SlaterF12OperatorPtr(world, param.gamma(), lo, eps));\n\n\t//test\n\t{\n\t\tMyTimer time = MyTimer(world).start();\n\t\treal_convolution_3d slater = SlaterOperator(world, param.gamma(), lo, eps);\n\t\treal_convolution_3d slater_sq = SlaterOperator(world, param.gamma() * 2.0, lo, eps);\n\t\tconst real_function_3d mo = nemo.get_calc()->amo.front();\n\t\tconst real_function_3d momo = (mo * mo).truncate();\n\t\tconst double test1 = slater(momo).norm2();\n\t\tconst double test2 = (*slaterop)(momo).norm2();\n\t\tconst double test3 = (*fop)(momo).norm2();\n\t\tconst double test4 = (momo).trace() * pow(FunctionDefaults < 3 > ::get_cell_min_width(), 3.0);\n\t\tconst double factor = 1.0 / (param.gamma() * 2.0);\n\t\tMADNESS_ASSERT((test1 - test2) < 0.1 * FunctionDefaults < 3 > ::get_thresh());\n\t\tMADNESS_ASSERT(test3 - factor * (test4 - test2) < 0.1 * FunctionDefaults < 3 > ::get_thresh());\n\t\tif (world.rank() == 0)\n\t\t\tstd::cout << \"F12 Operators initialized right\\n\";\n\t\ttime.stop().print(\"Testing F12 Operators\");\n\n\t\tMyTimer timeK = MyTimer(world).start();\n\t\tMADNESS_ASSERT(acmos.size()==nemo.get_calc()->amo.size()-param.freeze());\n\t\tacKmos = K(acmos);\n\t\ttimeK.stop().print(\"Initializing (active) Exchange Orbitals\");\n\n\t\t// give information on the used memory\n\t\tconst double size_m=get_size(world,acmos);\n\t\tconst double size_k=get_size(world,acKmos);\n\t\tif(world.rank()==0) std::cout << \"Size of active mos and their exchange potentials:\\n\"\n\t\t\t\t<< \"K(acmos)=\" << size_k << \" Gbyte\\n\"\n\t\t\t\t<< \"acmos   =\" << size_m << \" Gbyte\\n\";\n\n\t}\n\n\tgradop = gradient_operator<double, 3>(world);\n\tslatergradop = GradSlaterOperator(world, param.gamma(), lo, eps);\n\tslatergradop_sq = GradSlaterOperator(world, param.gamma() * 2.0, lo, eps);\n\n}\n\nTensor<double> F12Potentials::compute_xyab_integrals(const real_function_3d& x, const real_function_3d& y, const vector_real_function_3d& a, const vector_real_function_3d& b, const std::shared_ptr<real_convolution_3d>& op,\n\t\tconst bool diagonal) const {\n\tconst double muleps=0.0;\n\tvector_real_function_3d iv = mul_sparse(world, x, a,  muleps);\n\ttruncate(world, iv);\n\tvector_real_function_3d jv;\n\tif (diagonal)\n\t\tjv = iv;\n\telse {\n\t\tjv = mul_sparse(world, y, b,  muleps);\n\t\ttruncate(world, jv);\n\t}\n\tvector_real_function_3d opiv;\n\tif (op != NULL)\n\t\topiv = apply(world, *op, iv);\n\telse\n\t\topiv = iv;\n\n\tTensor<double> result_ij = matrix_inner(world, opiv, jv, diagonal);\n\treturn result_ij;\n}\n\nPairEnergies F12Potentials::compute_f12_pair_energy(const std::valarray<vector_real_function_3d>& pnos, const std::valarray<vector_real_function_3d>& cabs) const {\n\t// F12 is used to regularize\n\t// so here we compute the f12 part which is missing from the regularized mp2 energies\n\tif(world.rank()==0) std::cout << \"Computing F12 Energy (Ansatz 2)\\n\";\n\tstd::valarray<vector_real_function_3d> abs(pnos.size());\n\tif(cabs.size()!=pnos.size()){\n\t\tif(world.rank()==0) std::cout << \"No CABS given using only the PNOs as ABS\\n\";\n\t\tabs = pnos;\n\t}\n\telse{\n\t\tfor(ElectronPairIterator it=pit();it;++it){\n\t\t\tvector_real_function_3d tmp = pnos[it.ij()];\n\t\t\tfor(const auto& x:cabs[it.ij()]) tmp.push_back(x);\n\t\t\tabs[it.ij()]=tmp;\n\t\t\tif(world.rank()==0) std::cout << \"Constructing ABS for pair \"\n\t\t\t\t\t<< it.name() << \" from \" << pnos[it.ij()].size() << \" PNOs and \"\n\t\t\t\t\t<< cabs[it.ij()].size() << \" CABS functions\\n\";\n\t\t}\n\t}\n\treturn compute_f12_pair_energies(abs);\n}\n\nPairEnergies F12Potentials::compute_f12_correction(const std::valarray<vector_real_function_3d>& pnos,const std::valarray<vector_real_function_3d>& abs) const {\n\n\tPairEnergies result(npairs());\n\n\tconst std::valarray<double> fQg = compute_fQg_integrals();\n\tstd::valarray<double> fQU;\n\tif (!param.abs_u())\n\t\tfQU = compute_fQU_integrals();\n\n\tstd::valarray < Tensor<double> > fijab = compute_fijab_integrals(pnos);\n\tstd::valarray < Tensor<double> > gijab = compute_gijab_integrals(pnos);\n\n\tstd::valarray < Tensor<double> > cijab_abs = compute_cijab_integrals(abs);\n\tstd::valarray < Tensor<double> > cijab = compute_cijab_integrals(pnos);\n\tstd::valarray < Tensor<double> > fijab_abs = compute_fijab_integrals(abs);\n\n\tstd::valarray<double> es(npairs()); // singlet f12 energies\n\tstd::valarray<double> et(npairs()); // triplet f12 energies\n\tstd::valarray<double> eij(npairs());// total f12 energies\n\tstd::valarray<double> esg(npairs()); // singlet f12 energies: fQg part\n\tstd::valarray<double> esu(npairs()); // singlet f12 energies: fQU part\n\tstd::valarray<double> esc(npairs()); // singlet f12 energies: Commutator part\n\tstd::valarray<double> etg(npairs()); // triplet f12 energies: fQg part\n\tstd::valarray<double> etu(npairs()); // triplet f12 energies: fQU part\n\tstd::valarray<double> etc(npairs()); // triplet f12 energies: Commutator part\n\t// same for the V12 part of the projector\n\tstd::valarray<double> esvg(npairs()); // singlet f12 energies: fQg part\n\tstd::valarray<double> esvu(npairs()); // singlet f12 energies: fQU part\n\tstd::valarray<double> esvc(npairs()); // singlet f12 energies: Commutator part\n\tstd::valarray<double> etvg(npairs()); // triplet f12 energies: fQg part\n\tstd::valarray<double> etvu(npairs()); // triplet f12 energies: fQU part\n\tstd::valarray<double> etvc(npairs()); // triplet f12 energies: Commutator part\n\tdouble est=0.0;\n\tdouble ett=0.0;\n\tfor (ElectronPairIterator it=pit(); it; ++it) {\n\t\tconst double fvg = inner(fijab[it.ij()], gijab[it.ij()]);\n\t\tconst double gij = fQg[it.ij()];\n\t\tdouble gji = 0.0;\n\t\tdouble Uij = 0.0;\n\t\tdouble Uji = 0.0;\n\t\tdouble fvu = 0.0;\n\t\tdouble fvux = 0.0;\n\t\tdouble fvgx = 0.0;\n\t\tdouble cij =0.0;\n\t\tdouble fvc =0.0;\n\t\tdouble cji = 0.0;\n\t\tdouble fvcx =0.0;\n\t\tTensor<double> uijab = compute_uijab_integrals(it.i(), it.j(), pnos[it.ij()]);\n\t\tfvu = inner(fijab[it.ij()], uijab);\n\t\tTensor<double> uijab_abs;\n\t\tif(param.abs_u()){\n\t\t\tuijab_abs = compute_uijab_integrals(it.i(),it.j(),abs[it.ij()]);\n\t\t\tUij = inner(fijab_abs[it.ij()],uijab_abs);\n\t\t}\n\t\telse{\n\t\t\tUij = fQU[it.ij()];\n\t\t}\n\t\tif(param.abs_c()){\n\t\t\t// neglect if there is no abs\n\t\t\tcij =0.0;\n\t\t\tfvc =0.0;\n\t\t}\n\t\telse{\n\t\t\tcij = inner(fijab_abs[it.ij()],cijab_abs[it.ij()]);\n\t\t\tfvc = inner(fijab[it.ij()],cijab[it.ij()]);\n\t\t}\n\t\tif (it.diagonal()) {\n\n\t\t\t// additional information\n\t\t\tesg[it.ij()]=gij;\n\t\t\tesu[it.ij()]=Uij;\n\t\t\tesc[it.ij()]=cij;\n\t\t\tetg[it.ij()]=0.0;\n\t\t\tetu[it.ij()]=0.0;\n\t\t\tetc[it.ij()]=0.0;\n\t\t\tesvg[it.ij()]= -1.0*(fvg);\n\t\t\tesvu[it.ij()]= -1.0*(fvu);\n\t\t\tesvc[it.ij()]= -1.0*(fvc);\n\t\t\tetvg[it.ij()]=0.0;\n\t\t\tetvu[it.ij()]=0.0;\n\t\t\tetvc[it.ij()]=0.0;\n\n\t\t\tes[it.ij()] = gij-fvg + Uij-fvu - cij + fvc;\n\t\t\tet[it.ij()] = 0.0;\n\t\t} else {\n\n\t\t\tif(param.abs_c()){\n\t\t\t\t// neglect if there is no abs\n\t\t\t\tcij =0.0;\n\t\t\t\tfvc =0.0;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcji  = inner(fijab_abs[it.ij()],transpose(cijab_abs[it.ij()]));\n\t\t\t\tfvcx = inner(fijab[it.ij()],transpose(cijab[it.ij()]));\n\t\t\t}\n\t\t\tTensor<double> gjiab = transpose(gijab[it.ij()].reshape(pnos[it.ij()].size(), pnos[it.ij()].size()));\n\t\t\tfvgx = inner(fijab[it.ij()], gjiab);\n\t\t\tgji = fQg[it.ij() + it.npairs()];\n\n\t\t\tTensor<double> ujiab = transpose(uijab.reshape(pnos[it.ij()].size(), pnos[it.ij()].size()));\n\t\t\tfvux = inner(fijab[it.ij()], ujiab);\n\t\t\tif (param.abs_u()) {\n\t\t\t\tUij = inner(fijab_abs[it.ij()],transpose(uijab_abs));\n\t\t\t}else{\n\t\t\t\tUij = fQU[it.ij() + it.npairs()];\n\t\t\t}\n\n\t\t\t// additional information factor 1/2 missing because ij <-> ji pairs\n\t\t\tesg[it.ij()]=gij+gji;\n\t\t\tesu[it.ij()]=Uij+Uji;\n\t\t\tesc[it.ij()]=cij+cji;\n\t\t\tetg[it.ij()]=3.0*(gij-gji);\n\t\t\tetu[it.ij()]=3.0*(Uij-Uji);\n\t\t\tetc[it.ij()]=3.0*(cij-cji);\n\t\t\tesvg[it.ij()]= -1.0*(fvg + fvgx);\n\t\t\tesvu[it.ij()]= -1.0*(fvu + fvux);\n\t\t\tesvc[it.ij()]= -1.0*(fvc + fvcx);\n\t\t\tetvg[it.ij()]= -1.0*(fvg - fvgx);\n\t\t\tetvu[it.ij()]= -1.0*(fvu - fvux);\n\t\t\tetvc[it.ij()]= -1.0*(fvc - fvcx);\n\t\t\t// real singlet and triplet energies\n\t\t\tes[it.ij()] = ((gij-fvg + gji-fvgx) + (Uij-fvu + Uji-fvux) - (cij - fvc + cji - fvcx));\n\t\t\tet[it.ij()] = 3.0* ((gij-fvg - gji+fvgx) + (Uij-fvu - Uji+fvux) - (cij - fvc - cji + fvcx));\n\t\t}\n\t\test += es[it.ij()];\n\t\tett += et[it.ij()];\n\t\teij[it.ij()] = es[it.ij()] + et[it.ij()];\n\n\t}\n\n\t// information about the different parts\n\tprint_pair_energies(esg,etg  ,\"fQg energy\");\n\tprint_pair_energies(esu,etu  ,\"fQU energy\");\n\tprint_pair_energies(esc,etc  ,\"fQc energy\");\n\tprint_pair_energies(esvg,etvg,\"fVg energy\");\n\tprint_pair_energies(esvu,etvu,\"fVU energy\");\n\tprint_pair_energies(esvc,etvc,\"fVc energy\");\n\n\n\t// the real deal\n\tprint_pair_energies(es,et,\"F12 energy\");\n\n\tresult.eijs_f12 = es;\n\tresult.eijt_f12 = et;\n\tresult.energy_f12=est+ett;\n\n\treturn result;\n\n}\n\nPairEnergies F12Potentials::compute_f12_pair_energies(const std::valarray<vector_real_function_3d>& abs) const {\n\n\tPairEnergies result(npairs());\n\n\tconst std::valarray<double> fQg = compute_fQg_integrals();\n\tconst std::valarray<double> fQU= compute_fQU_integrals();\\\n\t//const vector_real_function_3d Kmos = K(mos);\n\tconst std::valarray<double> fQc= compute_fQc_integrals(acKmos,abs);\n\tdouble energy=0.0;\n\t//std::valarray < Tensor<double> > fijab = compute_fijab_integrals(abs);\n\t//std::valarray < Tensor<double> > cijab = compute_cijab_integrals(abs);\n\tstd::valarray<double> es(npairs()); // singlet f12 energies\n\tstd::valarray<double> et(npairs()); // triplet f12 energies\n\n\tstd::valarray<double> esg(npairs()); // singlet f12 energies: fQg part\n\tstd::valarray<double> esu(npairs()); // singlet f12 energies: fQU part\n\tstd::valarray<double> esc(npairs()); // singlet f12 energies: Commutator part\n\tstd::valarray<double> etg(npairs()); // triplet f12 energies: fQg part\n\tstd::valarray<double> etu(npairs()); // triplet f12 energies: fQU part\n\tstd::valarray<double> etc(npairs()); // triplet f12 energies: Commutator part\n\n\tfor (ElectronPairIterator it=pit(); it; ++it) {\n\t\tconst double cij = fQc[it.ij()];\n\t\tconst double gij = fQg[it.ij()];\n\t\tconst double Uij = fQU[it.ij()];\n\t\t//double fvu = 0.0;\n\t\t//double fvux= 0.0;\n\t\tdouble cji = fQc[it.ij()+it.npairs()];\n\t\tdouble gji = fQg[it.ij()+it.npairs()];\n\t\tdouble Uji = fQU[it.ij()+it.npairs()];\n\t\tif (it.diagonal()) {\n\t\t\t// additional information\n\t\t\tesg[it.ij()]=gij;\n\t\t\tesu[it.ij()]=Uij;\n\t\t\tesc[it.ij()]=cij;\n\t\t\tetg[it.ij()]=0.0;\n\t\t\tetu[it.ij()]=0.0;\n\t\t\tetc[it.ij()]=0.0;\n\t\t\t// singlet and triplet energies\n\t\t\tes[it.ij()] = gij+ Uij - cij;\n\t\t\tet[it.ij()] = 0.0;\n\t\t} else {\n\t\t\t// additional information\n\t\t\tesg[it.ij()]=gij+gji;\n\t\t\tesu[it.ij()]=Uij+Uji;\n\t\t\tesc[it.ij()]=cij+cji;\n\t\t\tetg[it.ij()]=3.0*(gij-gji);\n\t\t\tetu[it.ij()]=3.0*(Uij-Uji);\n\t\t\tetc[it.ij()]=3.0*(cij-cji);\n\t\t\t// singlet and triplet energies\n\t\t\tes[it.ij()] = ((gij + gji) + (Uij + Uji) - (cij + cji));\n\t\t\tet[it.ij()] = 3.0*((gij - gji) + (Uij - Uji) - (cij - cji));\n\t\t}\n\t\tenergy+= es[it.ij()] + et[it.ij()];\n\t}\n\n\n\t// information about the different parts\n\tprint_pair_energies(esg,etg  ,\"fQg energy\");\n\tprint_pair_energies(esu,etu  ,\"fQU energy\");\n\tprint_pair_energies(esc,etc  ,\"fQc energy\");\n\n\t// the real deal\n\tprint_pair_energies(es,et,\"F12 energy\");\n\tresult.eijs_f12=es;\n\tresult.eijt_f12=et;\n\tresult.energy_f12=energy;\n\n\treturn result;\n}\n\nvoid F12Potentials::print_pair_energies(const std::valarray<double>& es, const std::valarray<double>& et, const std::string& msg, const PairType& type) const{\n  //double est = 0.0;\n  //double ett = 0.0;\n  //double est_f12 = 0.0;\n  //double ett_f12 = 0.0;\n\tif (world.rank() == 0) {\n\t\tstd::cout << std::setfill(' ');\n\t\tstd::cout << std::scientific << std::setprecision(5);\n\t\tdouble est = 0.0, ett = 0.0; // total singlet and triplet energies\n\t\tprint(\"=======================================================\");\n\t\tprint(\"\\n\" + msg + \"\\n\");\n\t\tprint(\"=======================================================\");\n\t\tif(type==CISPD_PAIRTYPE)\n\t\t\tstd::cout << \" \"  << std::setw(4) << \"i\" << \" \" << std::setw(4) << \"j\" << \" \" << std::setw(12) << \"CORR GS\" << \" \" << std::setw(12) << \"CORR ES\" << \" \" << std::setw(12) << \"Total\" << \"\\n\";\n\t\telse\n\t\t\tstd::cout << \" \"  << std::setw(4) << \"i\" << \" \" << std::setw(4) << \"j\" << \" \" << std::setw(12) << \"singlet\" << \" \" << std::setw(12) << \"triplet\" << \" \" << std::setw(12) << \"Total\" << \"\\n\";\n\t\tprint(\"=======================================================\");\n\t\tfor (ElectronPairIterator it=pit(); it; ++it) {\n\t\t\tstd::cout << std::setfill(' ') << std::fixed   << \" \"\n\t\t\t\t\t<< std::setw(4) << it.i()+param.freeze() <<\" \"\n\t\t\t\t\t<< std::setw(4) << it.j()+param.freeze() <<\" \"\n\t\t\t\t\t<< std::scientific << std::setprecision(5) <<  \" \"\n\t\t\t\t\t<< std::setw(12)<<  es[it.ij()]  <<   \" \"\n\t\t\t\t\t<< std::setw(12)<<  et[it.ij()]  <<  \" \"\n\t\t\t\t\t<< std::setw(12)<<  (es[it.ij()] + et[it.ij()]) << \"\\n\";\n\t\t\test += es[it.ij()];\n\t\t\tett += et[it.ij()];\n\t\t}\n\t\tprint(\"=======================================================\");\n\t\tif(type==CISPD_PAIRTYPE){\n\t\t\tstd::cout <<msg + \" (Sum GS) : \" << std::setw(12)<< est << \"\\n\";\n\t\t\tstd::cout <<msg + \" (Sum ES) : \" << std::setw(12)<< ett << \"\\n\";\n\t\t\tstd::cout <<msg + \" (∆CIS(D)): \" << std::setw(12)<< est + ett  << \"\\n\";\n\t\t}else{\n\t\t\tstd::cout <<msg + \" (singlet): \" << std::setw(12)<< est << \"\\n\";\n\t\t\tstd::cout <<msg + \" (triplet): \" << std::setw(12)<< ett << \"\\n\";\n\t\t\tstd::cout <<msg + \" (total)  : \" << std::setw(12)<< est + ett  << \"\\n\";\n\t\t}\n\t\tprint(\"=======================================================\");\n\t}\n}\n\n\nvector_real_function_3d F12Potentials::apply_regularized_potential(const real_function_3d& ket1, const real_function_3d& ket2,const real_function_3d Ki, const real_function_3d& Kj, const vector_real_function_3d& bra,const vector_real_function_3d& Kpno) const {\n  //const double muleps = 0.0;//FunctionDefaults < 3 > ::get_thresh();\n\n\tMyTimer timeU = MyTimer(world).start();\n\tconst vector_real_function_3d Uepart = convolve_with_U(bra, ket1, ket2);\n\ttimeU.stop().print(\"Vreg:Ue\");\n\n\tMyTimer timeK2 = MyTimer(world).start();\n\tvector_real_function_3d comm = zero_functions<double,3>(world,Uepart.size());\n\tif(param.exchange()==\"full\"){\n\t\t// K1 part\n\t\tvector_real_function_3d Kv = Kpno;\n\t\tif(Kv.empty()){\n\t\t\tMyTimer tk=MyTimer(world).start();\n\t\t\tKv=K(bra);\n\t\t\ttk.stop().print(\"recompute Kv\");\n\t\t}\n\t\tconst vector_real_function_3d Kvi = Kv*ket1;\n\t\tconst vector_real_function_3d vKi = bra*Ki;\n\t\tvector_real_function_3d difftmp=Kvi-vKi;\n\t\t//truncate(world,difftmp);\n\t\tconst vector_real_function_3d KffK1 = apply(world,*fop,difftmp)*ket2; // saves application of 1 f12 convolution\n\n\t\t// K2 part\n\t\tconst vector_real_function_3d vi = bra*ket1;\n\t\tconst vector_real_function_3d fvi = apply(world,*fop,vi);\n\t\tconst vector_real_function_3d KffK2 = K(fvi*ket2)-fvi*Kj; // not faster\n\n\t\tcomm=KffK1+KffK2;\n\t}else if (world.rank()==0){\n\t\tstd::cout << \"exchange is \" << param.exchange() << \" neglecting [K,f] part\\n\";\n\t}\n\ttimeK2.stop().print(\"Vreg:K2\");\n\t//\tconst double err = norm2(world,((K1f - fK1 + K2f - fK2) - test));\n\t//\tstd::cout << \"error=\" << err << \"\\n\";\n\tvector_real_function_3d result = Uepart - comm;//(K1f - fK1 + K2f - fK2);\n\ttruncate(world,result);\n\n\n\treturn result;\n\n\tMADNESS_EXCEPTION(\"should not end up here\", 1);\n}\n\n/// Ue part is not really faster than with the fluctuation potential but saves memory\n/// [K,f] part is faster as over the fluctuation potential\nTensor<double> F12Potentials::compute_regularized_fluctuation_matrix(const ElectronPairIterator& it, const vector_real_function_3d& pnos, const vector_real_function_3d& Kpnos)const{\n\tconst real_function_3d& Ki=acKmos[it.i()];\n\tconst real_function_3d& Kj=acKmos[it.j()];\n\tconst real_function_3d& moi=acmos[it.i()];\n\tconst real_function_3d& moj=acmos[it.j()];\n\n\n\tMyTimer timeIm = MyTimer(world).start();\n\tconst vector_real_function_3d vj = mul(world,moj,pnos,false);\n\tvector_real_function_3d vi;\n\tif(it.diagonal()) vi=vj;\n\telse vi = mul(world,moi,pnos,false);\n\tconst vector_real_function_3d di=grad(moi); // move to intermediates\n\tconst vector_real_function_3d dj=grad(moj); // move to intermediates\n\tworld.gop.fence();\n\ttimeIm.stop().print(\"Wij: Intermediates\");\n\n\tTensor<double> Uepart(pnos.size(),pnos.size());\n\tMyTimer timeU = MyTimer(world).start();\n\tif(false){\n\t\t// use this untill bug is fixed\n\t\tUepart=matrix_inner(world,pnos,convolve_with_U(pnos,moi,moj),it.diagonal());\n\t\t//Uepart = 0.5*(matrix_inner(world,pnos,convolve_with_U(pnos,moi,moj),it.diagonal()) + matrix_inner(world,pnos,convolve_with_U(pnos,moj,moi),it.diagonal()));\n\t}else{\n\t\t// for the local part there is currently no cheaper option\n\t\tconst vector_real_function_3d ul = convolve_with_local_U(vi);\n\t\tTensor<double> Uel=matrix_inner(world,vj,ul);\n\n\t\tif(it.diagonal()){\n\t\t\tconst vector_real_function_3d di=grad(moi); // move to intermediates\n\n\t\t\tTensor<double> Uenl(pnos.size(),pnos.size());\n\t\t\tfor(size_t axis=0;axis<3;++axis){\n\t\t\t\tconst vector_real_function_3d ket=convolve_with_gradslater(vj,axis);\n\t\t\t\tconst vector_real_function_3d bra=mul(world,di[axis],pnos,false);\n\t\t\t\tUenl += matrix_inner(world,bra,ket);\n\t\t\t}\n\n\t\t\tconst double prefactor = 1.0 / (2.0 * (param.gamma()));\n\t\t\tUenl = prefactor*(Uenl+transpose(Uenl));\n\n\t\t\tUepart = Uel + Uenl;\n\n\t\t}else{\n\n\t\t\tMyTimer timer_nl=MyTimer(world).start();\n\t\t\tTensor<double> Uenl1(pnos.size(),pnos.size());\n\t\t\tTensor<double> Uenl2(pnos.size(),pnos.size());\n\t\t\tfor(size_t axis=0;axis<3;++axis){\n\t\t\t\tconst vector_real_function_3d ket=convolve_with_gradslater(vj,axis);\n\t\t\t\tconst vector_real_function_3d bra=mul(world,di[axis],pnos);\n\t\t\t\tUenl1 += matrix_inner(world,bra,ket);\n\t\t\t\tconst vector_real_function_3d ket2=convolve_with_gradslater(vi,axis);\n\t\t\t\tconst vector_real_function_3d bra2=mul(world,dj[axis],pnos);\n\t\t\t\tUenl2 += matrix_inner(world,bra2,ket2);\n\t\t\t}\n\t\t\ttimer_nl.stop().print(\"Wij: Ueij nonloc\");\n\n\t\t\tconst double prefactor = 1.0 / (2.0 * (param.gamma()));\n\t\t\tTensor<double> Uenl = prefactor*(transpose(Uenl1)+Uenl2);\n\n\t\t\tUepart = Uel + Uenl;\n\t\t}\n\t}\n\ttimeU.stop().print(\"Wij: Ueij\");\n\n\n\tTensor<double> Kpart(pnos.size(),pnos.size());\n\tMyTimer timeK = MyTimer(world).start();\n\t{\n\t\tif(it.diagonal()){\n\t\t\tconst vector_real_function_3d vKi = mul(world,Ki,pnos,false);\n\t\t\tconst vector_real_function_3d iKv = mul(world,moi,Kpnos,false);\n\t\t\tworld.gop.fence();\n\t\t\t// K1 part\n\t\t\tvector_real_function_3d ket1=apply(world,*fop,(iKv-vKi));\n\t\t\tTensor<double> K1 = matrix_inner(world,vj,ket1);\n\t\t\tKpart = K1+transpose(K1);\n\n\t\t}else{\n\t\t\tconst vector_real_function_3d vKi = mul(world,Ki,pnos,false);\n\t\t\tconst vector_real_function_3d iKv = mul(world,moi,Kpnos,false);\n\t\t\tconst vector_real_function_3d vKj = mul(world,Kj,pnos,false);\n\t\t\tconst vector_real_function_3d jKv = mul(world,moj,Kpnos,false);\n\t\t\tworld.gop.fence();\n\t\t\t// K1 part\n\t\t\tvector_real_function_3d ket1=apply(world,*fop,(iKv-vKi));\n\t\t\tTensor<double> K1 = matrix_inner(world,vj,ket1);\n\t\t\tket1.clear();\n\t\t\t// K2 part\n\t\t\tvector_real_function_3d ket2=apply(world,*fop,(jKv-vKj));\n\t\t\tTensor<double> K2 = matrix_inner(world,vi,ket2);\n\t\t\tket2.clear();\n\t\t\tKpart = K1+transpose(K2);\n\t\t}\n\t}\n\ttimeK.stop().print(\"Wij: Kij\");\n\treturn transpose(Uepart-Kpart); // we computed <ba|ij> instead of <ab|ij> (historical reasons)\n}\nTensor<double> F12Potentials::compute_regularized_fluctuation_matrix(const std::pair<vector_real_function_3d,vector_real_function_3d> & KPNOA, const std::pair<vector_real_function_3d,vector_real_function_3d> & KPNOB, const std::pair<real_function_3d,real_function_3d>& MKI, const std::pair<real_function_3d,real_function_3d> MKJ)const{\n\n\tconst vector_real_function_3d& a=KPNOA.first;\n\tconst vector_real_function_3d& Ka=KPNOA.second;\n\tbool same_pnos=false;\n\tvector_real_function_3d b=KPNOB.first;\n\tvector_real_function_3d Kb=KPNOB.second;\n\tif(KPNOB.first.empty()){\n\t\tsame_pnos=true;\n\t\tb=a;\n\t\tKb=Ka;\n\t}\n\tconst real_function_3d& moi=MKI.first;\n\tconst real_function_3d& Ki=MKI.second;\n\treal_function_3d moj=MKJ.first;\n\treal_function_3d Kj=MKJ.second;\n\tbool diagonal=false;\n\tif(MKJ.first.is_initialized()==false){\n\t\tdiagonal=true;\n\t\tmoj=moi;\n\t\tKj=Ki;\n\t}\n\n\tMyTimer timeIm = MyTimer(world).start();\n\tconst vector_real_function_3d bj = mul(world,moj,b,false);\n\tvector_real_function_3d ai;\n\tif(diagonal and same_pnos) ai=bj;\n\telse ai = mul(world,moi,a,false);\n\tconst vector_real_function_3d di=grad(moi);\n\tvector_real_function_3d dj;\n\tif(diagonal and same_pnos) dj=di;\n\telse dj=grad(moj);\n\tworld.gop.fence();\n\ttimeIm.stop().print(\"Wij: Intermediates\");\n\n\tTensor<double> Uepart(a.size(),b.size());\n\tMyTimer timeU = MyTimer(world).start();\n\t{\n\t\t// for the local part there is currently no cheaper option\n\t\tconst vector_real_function_3d ul = convolve_with_local_U(ai);\n\t\tTensor<double> Uel=matrix_inner(world,bj,ul);\n\n\t\tif(diagonal and same_pnos){\n\t\t\tconst vector_real_function_3d& pnos=a;\n\t\t\t//const vector_real_function_3d& vi=ai;\n\t\t\tconst vector_real_function_3d& vj=bj;\n\t\t\tTensor<double> Uenl(pnos.size(),pnos.size());\n\t\t\tfor(size_t axis=0;axis<3;++axis){\n\t\t\t\tconst vector_real_function_3d ket=convolve_with_gradslater(vj,axis);\n\t\t\t\tconst vector_real_function_3d bra=mul(world,di[axis],pnos,false);\n\t\t\t\tUenl += matrix_inner(world,bra,ket);\n\t\t\t}\n\n\t\t\tconst double prefactor = 1.0 / (2.0 * (param.gamma()));\n\t\t\tUenl = prefactor*(Uenl+transpose(Uenl));\n\n\t\t\tUepart = Uel + Uenl;\n\n\t\t}else{\n\n\t\t\tMyTimer timer_nl=MyTimer(world).start();\n\t\t\tTensor<double> Uenl1(a.size(),b.size());\n\t\t\tTensor<double> Uenl2(b.size(),a.size());\n\t\t\tfor(size_t axis=0;axis<3;++axis){\n\t\t\t\tconst vector_real_function_3d ket=convolve_with_gradslater(bj,axis);\n\t\t\t\tconst vector_real_function_3d bra=mul(world,di[axis],a);\n\t\t\t\tUenl1 += matrix_inner(world,bra,ket);\n\t\t\t\tconst vector_real_function_3d ket2=convolve_with_gradslater(ai,axis);\n\t\t\t\tconst vector_real_function_3d bra2=mul(world,dj[axis],b);\n\t\t\t\tUenl2 += matrix_inner(world,bra2,ket2);\n\t\t\t}\n\t\t\ttimer_nl.stop().print(\"Wij: Ueij nonloc\");\n\n\t\t\tconst double prefactor = 1.0 / (2.0 * (param.gamma()));\n\t\t\tTensor<double> Uenl = prefactor*(transpose(Uenl1)+Uenl2);\n\n\t\t\tUepart = Uel + Uenl;\n\t\t}\n\t}\n\ttimeU.stop().print(\"Wij: Ueij\");\n\n\tTensor<double> Kpart(a.size(),b.size());\n\tMyTimer timeK = MyTimer(world).start();\n\t{\n\t\tif(diagonal and same_pnos){\n\t\t\tconst vector_real_function_3d aKi = mul(world,Ki,a,false);\n\t\t\tconst vector_real_function_3d iKa = mul(world,moi,Ka,false);\n\t\t\tworld.gop.fence();\n\t\t\t// K1 part\n\t\t\tvector_real_function_3d ket1=apply(world,*fop,(iKa-aKi))*(-1.0/(2.0*param.gamma()));\n\t\t\tTensor<double> K1 = matrix_inner(world,bj,ket1);\n\t\t\tKpart = K1+transpose(K1);\n\n\t\t}else{\n\t\t\tconst vector_real_function_3d aKi = mul(world,Ki,a,false);\n\t\t\tconst vector_real_function_3d iKa = mul(world,moi,Ka,false);\n\t\t\tconst vector_real_function_3d bKj = mul(world,Kj,b,false);\n\t\t\tconst vector_real_function_3d jKb = mul(world,moj,Kb,false);\n\t\t\tworld.gop.fence();\n\t\t\t// K1 part\n\t\t\tvector_real_function_3d ket1=apply(world,*fop,(iKa-aKi));\n\t\t\tTensor<double> K1 = matrix_inner(world,bj,ket1);\n\t\t\tket1.clear();\n\t\t\t// K2 part\n\t\t\tvector_real_function_3d ket2=apply(world,*fop,(jKb-bKj));\n\t\t\tTensor<double> K2 = matrix_inner(world,ai,ket2);\n\t\t\tket2.clear();\n\t\t\tKpart = K1+transpose(K2);\n\t\t}\n\t}\n\ttimeK.stop().print(\"Wij: Kij\");\n\treturn transpose(Uepart-Kpart); // this whole routine computed the <ba|op|ij> matrix\n}\n\nstd::valarray<Tensor<double> > F12Potentials::compute_ijab_integrals(const std::valarray<vector_real_function_3d>& functions, const std::shared_ptr<real_convolution_3d>& op) const {\n\tif(functions.size()!=npairs()) return std::valarray<Tensor<double> >();\n\tstd::valarray < Tensor<double> > result(npairs());\n\tfor (ElectronPairIterator it=pit(); it; ++it) {\n\t\tresult[it.ij()] = compute_xyab_integrals(acmos[it.i()], acmos[it.j()], functions[it.ij()], functions[it.ij()], op, it.diagonal());\n\t}\n\treturn result;\n}\n\nstd::valarray<double> F12Potentials::compute_fQg_integrals() const {\n\t// first npair are the <ij|fQg|ij> second the <ij|fQg|ji>\n\tstd::valarray<double> result(2 * npairs());\n\tconst double muleps = 0.0;\n\tfor (ElectronPairIterator it=pit(); it; ++it) {\n\t\tconst size_t i = it.i();\n\t\tconst size_t j = it.j();\n\t\tconst size_t ij = it.ij();\n\t\tconst size_t ji = it.ij() + it.npairs();\n\t\tvector_real_function_3d fim = apply(world, *fop, mul_sparse(world, acmos[i], mos, muleps)); // all mos !\n\t\ttruncate(world, fim);\n\t\tvector_real_function_3d gim = apply(world, *coulombop, mul_sparse(world, acmos[i], mos, muleps)); // all mos !\n\t\ttruncate(world, gim);\n\t\tvector_real_function_3d jfim = mul_sparse(world, acmos[j], fim, muleps);\n\t\tvector_real_function_3d jgim = mul_sparse(world, acmos[j], gim, muleps);\n\t\ttruncate(world, jfim);\n\t\ttruncate(world, jgim);\n\t\tconst double ijfO1gij = madness::inner(jfim, jgim);\n\t\tTensor<double> ijfmn = matrix_inner(world, jfim, mos); // all mos !\n\t\tTensor<double> ijgmn = matrix_inner(world, jgim, mos); // all mos !\n\t\tconst double ijfO12gij = inner(ijfmn, ijgmn);\n\t\tif (it.diagonal()) {\n\t\t\tconst real_function_3d ii = (acmos[i] * acmos[i]).truncate();\n\t\t\tconst double ijfgij = madness::inner(ii, convolve_with_fg(ii));\n\t\t\tconst double result_ij = ijfgij - 2.0 * ijfO1gij + ijfO12gij;\n\t\t\t//std::cout << \"\\npart1=\" << ijfgij << \"\\npart2=\" <<(ijfO1gij-0.5*ijfO12gij) << \"\\npart3=\" << (ijfO1gij-0.5*ijfO12gij) << \"\\ndbpart=\" <<ijfO1gij  << \"\\ndbpart2=\" << 0.5*ijfO12gij <<  \"\\n\";\n\t\t\tresult[ij] = result_ij;\n\t\t\tresult[ji] = result_ij;\n\t\t} else {\n\t\t\tconst real_function_3d ii = (acmos[i] * acmos[i]).truncate();\n\t\t\tconst real_function_3d jj = (acmos[j] * acmos[j]).truncate();\n\t\t\tconst double ijfgij = madness::inner(ii, convolve_with_fg(jj));\n\t\t\tvector_real_function_3d fjm = apply(world, *fop, mul_sparse(world, acmos[j], mos,  muleps));// all mos !\n\t\t\tvector_real_function_3d gjm = apply(world, *coulombop, mul_sparse(world, acmos[j], mos,  muleps));// all mos !\n\t\t\tvector_real_function_3d ifjm = mul_sparse(world, acmos[i], fjm,  muleps);\n\t\t\tvector_real_function_3d igjm = mul_sparse(world, acmos[i], gjm,  muleps);\n\t\t\tconst double ijfO2gij = madness::inner(ifjm, igjm);\n\t\t\tconst double result_ij = ijfgij - ijfO1gij - ijfO2gij + ijfO12gij;\n\t\t\tresult[ij] = result_ij;\n\t\t\tconst real_function_3d mos_ij = (acmos[i] * acmos[j]).truncate();\n\t\t\tconst double ijfgji = madness::inner(mos_ij, convolve_with_fg(mos_ij));\n\t\t\tconst double ijfO1gji = madness::inner(jfim, igjm);\n\t\t\tdouble ijfO2gji = madness::inner(ifjm, jgim);\n\t\t\tconst double ijfO12gji = inner(ijfmn, transpose(ijgmn));\n\t\t\tdouble result_ji = ijfgji - ijfO1gji - ijfO2gji + ijfO12gji;\n\t\t\tresult[ji] = result_ji;\n\t\t}\n\t}\n\treturn result;\n}\n\nstd::valarray<double> F12Potentials::compute_fQU_integrals() const {\n\t// first npair are the <ij|fQg|ij> second the <ij|fQg|ji>\n\tstd::valarray<double> result(2.0 * npairs());\n\tconst double muleps=0.0;\n\tfor (ElectronPairIterator it=pit(); it; ++it) {\n\t\tconst size_t i = it.i();\n\t\tconst size_t j = it.j();\n\t\tconst size_t ij = it.ij();\n\t\tconst size_t ji = it.ij() + it.npairs();\n\t\tvector_real_function_3d fim = apply(world, *fop, mul_sparse(world, acmos[i], mos, muleps));\n\t\ttruncate(world, fim);\n\t\tvector_real_function_3d jfim = mul_sparse(world, acmos[j], fim, muleps);\n\t\tvector_real_function_3d jUim = convolve_with_U(mos, acmos[i], acmos[j]);\n\t\ttruncate(world, jfim);\n\t\ttruncate(world, jUim);\n\t\tconst double ijfO1Uij = madness::inner(jfim, jUim);\n\t\tTensor<double> ijfmn = matrix_inner(world, jfim, mos);\n\t\tTensor<double> ijUmn = matrix_inner(world, jUim, mos);\n\t\tconst double ijfO12Uij = inner(ijfmn, ijUmn);\n\t\tconst double ijfUij = madness::inner(acmos[j],convolve_with_fU(acmos[i], acmos[i], acmos[j]));\n\t\tif (it.diagonal()) {\n\t\t\tconst double result_ij = ijfUij - 2.0 * ijfO1Uij + ijfO12Uij;\n\t\t\tresult[ij] = result_ij;\n\t\t\tresult[ji] = result_ij;\n\t\t\tif(param.debug() and world.rank()==0){\n\t\t\t\tstd::cout << \"fQU debug for pair \" << it.ij() << \"=(\" << it.i() << \",\" << it.j() << \")\\n\";\n\t\t\t\tstd::cout << \"ijfUij   =\" << ijfUij  <<\"\\n\";\n\t\t\t\tstd::cout << \"ijfO1Uij =\" << ijfO1Uij <<\"\\n\";\n\t\t\t\tstd::cout << \"ijfO12Uij=\" << ijfO12Uij<<\"\\n\";\n\t\t\t}\n\t\t} else {\n\t\t\tvector_real_function_3d fjm = apply(world, *fop, mul_sparse(world, acmos[j], mos, muleps));\n\t\t\tvector_real_function_3d ifjm = mul_sparse(world, acmos[i], fjm, muleps);\n\t\t\tvector_real_function_3d iUjm = convolve_with_U(mos, acmos[j], acmos[i]);\n\t\t\tconst double ijfO2Uij = madness::inner(ifjm, iUjm);\n\t\t\tconst double result_ij = ijfUij - ijfO1Uij - ijfO2Uij + ijfO12Uij;\n\t\t\tresult[ij] = result_ij;\n\t\t\tconst double ijfUji = madness::inner(acmos[j], convolve_with_fU(acmos[i], acmos[j], acmos[i]));\n\t\t\tconst double ijfO1Uji = madness::inner(jfim, iUjm);\n\t\t\tconst double ijfO2Uji = madness::inner(ifjm, jUim);\n\t\t\tconst double ijfO12Uji = inner(ijfmn, transpose(ijUmn));\n\t\t\tdouble result_ji = ijfUji - ijfO1Uji - ijfO2Uji + ijfO12Uji;\n\t\t\tresult[ji] = result_ji;\n\t\t\tif(param.debug() and world.rank()==0){\n\t\t\t\tstd::cout << \"fQU debug for pair \" << it.ij() << \"=(\" << it.i() << \",\" << it.j() << \")\\n\";\n\t\t\t\tstd::cout << \"ijfUij   =\" << ijfUij   <<\"\\n\";\n\t\t\t\tstd::cout << \"ijfO1Uij =\" << ijfO1Uij <<\"\\n\";\n\t\t\t\tstd::cout << \"ijfO2Uij =\" << ijfO2Uij <<\"\\n\";\n\t\t\t\tstd::cout << \"ijfO12Uij=\" << ijfO12Uij<<\"\\n\";\n\t\t\t}\n\t\t}\n\t}\n\treturn result;\n}\n\n/// Compute the <ab|[f,K]|ij> integrals\nstd::valarray<Tensor<double> > F12Potentials::compute_cijab_integrals(const std::valarray<vector_real_function_3d>& functions) const {\n\n\tif(functions.size()!=npairs()) return std::valarray<Tensor<double> >();\n\n\t//vector_real_function_3d Kmos = K(mos);\n\n\tstd::valarray < Tensor<double> > result(2.0*npairs());\n\n\tfor (ElectronPairIterator it=pit(); it; ++it) {\n\t\tresult[it.ij()]=compute_cijab_integrals(it.i(),it.j(), acKmos[it.i()], acKmos[it.j()],functions[it.ij()]);\n\t\tresult[it.ij()+npairs()]=compute_cijab_integrals(it.j(),it.i(), acKmos[it.j()], acKmos[it.i()],functions[it.ij()]);\n\t}\n\treturn result;\n}\nTensor<double> F12Potentials::compute_cijab_integrals(const size_t &i, const size_t& j, const real_function_3d& Ki, const real_function_3d& Kj , const vector_real_function_3d& functions)const{\n\tconst Tensor<double> fK1 = compute_xyab_integrals(Ki, acmos[j], functions, functions, fop, false); // never symmetric since Ki!=i\n\tconst Tensor<double> fK2 = compute_xyab_integrals(acmos[i], Kj, functions, functions, fop, false);\n\n\tconst vector_real_function_3d Kv = K(functions);\n\n\tconst Tensor<double> K1f = compute_xyab_integrals(acmos[i], acmos[j], Kv, functions, fop);\n\tconst Tensor<double> K2f = compute_xyab_integrals(acmos[i], acmos[j], functions, Kv, fop);\n\n\tconst Tensor<double> result_ij =  K1f + K2f - fK1 - fK2;\n\n\treturn result_ij;\n}\n\nreal_function_3d F12Potentials::convolve_with_U(const real_function_3d& bra, const real_function_3d& ket1, const real_function_3d& ket2, const bool symmetric) const {\n\tconst real_function_3d local_part = convolve_with_local_U((bra * ket1).truncate()) * ket2;\n\tconst real_function_3d nonlocal_part = convolve_with_nonlocal_U(bra, ket1, ket2, symmetric);\n\tconst real_function_3d result = (local_part + nonlocal_part).truncate();\n\treturn result;\n}\nvector_real_function_3d F12Potentials::convolve_with_U(const vector_real_function_3d& bra, const real_function_3d& ket1, const real_function_3d& ket2, const bool symmetric) const {\n\tconst double muleps=0.0;\n\tMyTimer time_local=MyTimer(world).start();\n\tconst vector_real_function_3d braket1 = mul_sparse(world, ket1, bra, muleps);\n\tconst vector_real_function_3d ul = convolve_with_local_U(braket1);\n\tconst vector_real_function_3d local_part = mul_sparse(world, ket2, ul, muleps);\n\ttime_local.stop().print(\"Ue: local\");\n\n\tMyTimer time_nonlocal=MyTimer(world).start();\n\tconst vector_real_function_3d nonlocal_part = convolve_with_nonlocal_U(bra, ket1, ket2, symmetric);\n\ttime_nonlocal.stop().print(\"Ue: non-local\");\n\tvector_real_function_3d result = (local_part + nonlocal_part);\n\ttruncate(world, result);\n\treturn result;\n}\n\nvector_real_function_3d F12Potentials::convolve_with_local_U(const vector_real_function_3d& functions) const {\n\tconst double factor1 = 2.0 * param.gamma();\n\tconst vector_real_function_3d part1 = factor1 * convolve_with_fg(functions);\n\tconst double factor2 = param.gamma() / 2.0;\n\tconst vector_real_function_3d part2 = factor2 * convolve_with_slater_potential(functions);\n\tvector_real_function_3d result = (part1 + part2);\n\ttruncate(world, result);\n\treturn result;\n}\n\n/// @return \\f$ \\int dx2 f12*g12*f(2)  \\f$\n/// @param[in] function: function on which f*g operator is applied\n/// right now we use: fg = 1/(2*gamma)*(g - 4*pi*G(gamma))\n/// todo: implement fg operator (may be cheaper)\nreal_function_3d F12Potentials::convolve_with_fg(const real_function_3d& function) const {\n\tconst double prefactor = 1.0 / (2.0 * param.gamma());\n\tconst double bshfactor = 4.0 * constants::pi;\n\tconst real_function_3d result = prefactor * ((*coulombop)(function) - bshfactor * (*bshop)(function)).truncate();\n\treturn result;\n}\nvector_real_function_3d F12Potentials::convolve_with_fg(const vector_real_function_3d& functions) const {\n\tconst double prefactor = 1.0 / (2.0 * param.gamma());\n\tconst double bshfactor = 4.0 * constants::pi;\n\tconst vector_real_function_3d gpart = apply(world, *coulombop, functions);\n\tconst vector_real_function_3d bshpart = apply(world, *bshop, functions);\n\tvector_real_function_3d result = prefactor *( gpart - bshfactor * bshpart);\n\ttruncate(world, result);\n\treturn result;\n}\n\n/// @return \\f$ -1.0/2.0*<bra(1)|e^{-gamma*r_{12}}/r_{12}* \\vec{r_{12}}\\cdot (\\nabla_1 - \\nabla_2)[axis]|ket1,ket2>_1  \\f$\n/// @param[in] bra: no derivatives (for nemo-style orbitals this should be multiplied with R^2 beforehand)\n/// @param[in] ket1: this is the part (for electron 1) where the derivative operators will partially act on and over which the integration variable will run\n/// @param[in] ket2: this is the part (for electron 2) where the derivative operators will partially act on, no integration over this variable\n/// @param[in] symmetric: if ket1 and ket2 are the same functions (little speedup because the gradient has to be calculated only once)\n/// @param[in] squared: factor for gamma: a*\\gamma. Default is just 1.0. if true then a=2\n/// We use the following relations:\n///   1.0/2.0*e^{-\\gamma*r_{12}}*\\vec{r_{12}}/r_{12}\n///=  1.0/(2.0*\\gamma) \\nabla_2(e^{-\\gamma*r_{12}})\n///= -1.0/(2.0*\\gamma) \\nabla_1(e^{-\\gamma*r_{12}})\n///= -1.0/(2.0*\\gamma) \\nabla_{12}(e^{-\\gamma*r_{12}} )\n/// so we can use the gradient of the SlaterOperator Grad(e^{-\\gamma*r}\n/// with this we have\n/// \\f$ -1.0/2.0*<bra|e^{-gamma*r12}/r12* \\vec{r12}\\cdot (\\nabla_1 - \\nabla_2)[axis]|ket>\n/// =    1.0/(2.0*\\gamma)*<bra|Grad(e^{-\\gamma*r_{12}})\\cdot (\\nabla_1 - \\nabla_2)[axis]|ket1,ket2>_{particle}   \\f$\n/// todo: Partial integration may lead to more efficient scheme without the Gradient of the SlaterOperator\nreal_function_3d F12Potentials::convolve_with_nonlocal_U(const real_function_3d& bra, const real_function_3d& ket1, const real_function_3d& ket2, const bool symmetric, const bool& squared) const {\n\tvector_real_function_3d dummy(1, bra);\n\treturn convolve_with_nonlocal_U(dummy, ket1, ket2, symmetric, squared).front();\n}\n\nvector_real_function_3d F12Potentials::convolve_with_nonlocal_U(const vector_real_function_3d& bra, const real_function_3d& ket1, const real_function_3d& ket2, const bool symmetric, const bool& squared) const {\n\tconst double muleps=0.0;\n\tdouble factor = 1.0;\n\tif (squared)\n\t\tfactor = 2.0;\n\tconst double prefactor = 1.0 / (2.0 * (param.gamma() * factor));\n\n\tconst std::vector<std::shared_ptr<Derivative<double, 3> > >& D = gradop;\n\n\t// make gradient of ket1 and ket2\n\tstd::vector < real_function_3d > Dket1 = zero_functions<double, 3>(world, 3);\n\tstd::vector < real_function_3d > Dket2 = zero_functions<double, 3>(world, 3);\n\tfor (size_t axis = 0; axis < 3; ++axis) {\n\t\tDket1[axis] = (*D[axis])(ket1);\n\t\tif (symmetric)\n\t\t\tDket2[axis] = Dket1[axis];\n\t\telse\n\t\t\tDket2[axis] = (*D[axis])(ket2);\n\t}\n\n\t// part1: <bra|Dsop|Dket1>*|ket2>\n\tvector_real_function_3d part1 = zero_functions<double, 3>(world, bra.size());\n\tfor (size_t axis = 0; axis < 3; ++axis) {\n\t\tvector_real_function_3d braDket1 = mul_sparse(world, Dket1[axis], bra,  muleps);\n\t\tvector_real_function_3d tmp1 = convolve_with_gradslater(braDket1, axis, squared);\n\t\tvector_real_function_3d tmp2 = mul_sparse(world, ket2, tmp1, muleps);\n\t\tpart1 += tmp2;\n\t}\n\n\t// part2: <bra|Dsop|ket1>*|Dket2>\n\tvector_real_function_3d part2 = zero_functions<double, 3>(world, bra.size());\n\tvector_real_function_3d braket1 = mul_sparse(world, ket1, bra,  muleps);\n\tfor (size_t axis = 0; axis < 3; ++axis) {\n\t\tvector_real_function_3d tmp1 = convolve_with_gradslater(braket1, axis, squared);\n\t\tvector_real_function_3d tmp2 = mul_sparse(world, Dket2[axis], tmp1,  muleps);\n\t\tpart2 += tmp2;\n\t}\n\n\tvector_real_function_3d result = prefactor * (part1 - part2);\n\ttruncate(world, result);\n\treturn (-1.0) * result; // check sign -> correct since it should be -part1+part2\n}\n\nvector_real_function_3d F12Potentials::convolve_with_fU(const vector_real_function_3d& bra, const real_function_3d& ket1, const real_function_3d& ket2, const bool symmetric) const {\n\tconst double prefactor = 1.0 / (2.0 * param.gamma());\n\tconst double muleps=0.0;\n\tvector_real_function_3d result = zero_functions<double, 3>(world, bra.size());\n\t// local part\n\t{\n\t\tconst vector_real_function_3d ket1bras = mul_sparse(world, ket1, bra,  muleps);\n\t\tconst double bshfactor = 4.0 * constants::pi;\n\t\tconst vector_real_function_3d part1 = convolve_with_local_U(ket1bras);\n\t\tconst vector_real_function_3d part2 = apply(world, *bshop, ket1bras);\n\t\tconst vector_real_function_3d part3 = apply(world, *bshop_sq, ket1bras);\n\t\tconst vector_real_function_3d part4 = apply(world, *slaterop_sq, ket1bras);\n\t\tconst vector_real_function_3d local_part = part1 - bshfactor * part2 + bshfactor * part3 - param.gamma() / 2.0 * part4;\n\t\tresult += mul_sparse(world, ket2, local_part,  muleps);\n\t\tif(param.debug()){\n\t\t\tconst double db1 = norm2(world,part1);\n\t\t\tconst double db2 = norm2(world,part2);\n\t\t\tconst double db3 = norm2(world,part3);\n\t\t\tconst double db4 = norm2(world,part4);\n\t\t\tif(world.rank()==0) std::cout << \"convolve_with_fU norm of local parts:\\n\" << db1 << \", \" << db2 << \", \" << db3 << \", \" << db4 << \"\\n\";\n\t\t}\n\t}\n\t// nonlocal part\n\t{\n\t\tconst vector_real_function_3d part1 = convolve_with_nonlocal_U(bra, ket1, ket2, symmetric, false);\n\t\tconst vector_real_function_3d part2 = convolve_with_nonlocal_U(bra, ket1, ket2, symmetric, true);\n\t\tconst vector_real_function_3d nonlocal_part = (part1 - part2);\n\t\tresult += nonlocal_part;\n\t\tif(param.debug()){\n\t\t\tconst double db1 = norm2(world,part1);\n\t\t\tconst double db2 = norm2(world,part2);\n\t\t\tif(world.rank()==0) std::cout << \"convolve_with_fU norm of nonlocal parts:\\n\" << db1 << \", \" << db2 << \"\\n\";\n\t\t}\n\t}\n\tscale(world, result, prefactor);\n\ttruncate(world, result);\n\treturn result;\n}\n\nstd::valarray<double> F12Potentials::compute_fQc_integrals(\n\t\tconst vector_real_function_3d& Kmos,\n\t\tconst std::valarray<vector_real_function_3d>& functions) const {\n\t//if(functions.size()!=npairs()) return std::valarray<double>();\n\tstd::valarray<double> result(2.0 * npairs());\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tstd::pair<double, double> rij = compute_fQc_integrals_ij(Kmos,\n\t\t\t\tfunctions[it.ij()], it);\n\t\tresult[it.ij()] = rij.first;\n\t\tresult[it.ij() + it.npairs()] = rij.second;\n\t}\n\treturn result;\n}\n\nstd::pair<double, double> F12Potentials::compute_fQc_integrals_ij(\n\t\tconst vector_real_function_3d& Kmos,\n\t\tconst vector_real_function_3d& functions,\n\t\tconst ElectronPairIterator& it,\n\t\tconst bool& use_no_intermediates) const {\n\tconst vector_real_function_3d& v = functions;\n\tconst real_function_3d& moi = acmos[it.i()];\n\tconst real_function_3d& moj = acmos[it.j()];\n\tconst real_function_3d& Ki = acKmos[it.i()];\n\tconst real_function_3d& Kj = acKmos[it.j()];\n\tif (use_no_intermediates) {\n\t\t// alternative with flexible: Q12=OxQ or QOx -> more accurate this way\n\t\t// additionally no large intermediates are calculated\n\t\t// in the long run it is probably better to use intermediates but restricted to small blocks\n\t\t// so just feed the virtuals in chunks\n\t\t// keeping this code to debug and to compare performance\n\t\tif (world.rank() == 0)\n\t\t\tstd::cout\n\t\t\t<< \"!!!fQc is calculated without intermediates! Is this by choice?\\n\";\n\n\t\t// Part 1 K1, Q12=OxQ, ij part\n\t\t// <j|(ifx)*Q*((Kxfi)-(xfKi))|j>\n\t\t// ji part\n\t\t// <i|(jfx)*Q*((Kxfi)-(xfKi))|j> or  <j|(ifx)*Q*((Kxfj)-(xfKj))|i>\n\t\t// Part 2 K2, Q12=QOx, ij part\n\t\t// <i|(jfx)*Q*((Kxfj)-(xfKj))|i>\n\t\t// ji part\n\t\t// <j|(ifx)*Q*((Kxfj)-(xfKj))|i> or <i|(jfx)*Q*((Kxfi)-(xfKi))|j>\n\t\tdouble result1_ij = 0.0;\n\t\tdouble result1_ji = 0.0;\n\t\tdouble result2_ij = 0.0;\n\t\tdouble result2_ji = 0.0;\n\t\tfor (const auto& x : v) {\n\t\t\tconst real_function_3d braijx = Q((*fop)(moi * x) * moj);\n\t\t\tconst real_function_3d ket1 = ((*fop)((K(x) * moi - x * Ki)) * moj);\n\t\t\tconst double ijpart = madness::inner(braijx, ket1);\n\t\t\tresult1_ij += ijpart;\n\t\t\tif (it.diagonal()) {\n\t\t\t\t// in that case all parts are the same\n\t\t\t\tresult2_ij += ijpart;\n\t\t\t\tresult1_ji += ijpart;\n\t\t\t\tresult2_ji += ijpart;\n\t\t\t} else {\n\t\t\t\tconst real_function_3d brajix = Q((*fop)(moj * x) * moi);\n\t\t\t\tresult1_ji += madness::inner(brajix, ket1);\n\t\t\t\tconst real_function_3d ket2 = ((*fop)((K(x) * moj - x * Kj))\n\t\t\t\t\t\t* moi);\n\t\t\t\tresult2_ij += madness::inner(brajix, ket2); //braji is correct\n\t\t\t\tresult2_ji += madness::inner(braijx, ket2); //braij is correct\n\t\t\t}\n\t\t}\n\t\tif (param.debug()) {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"fQc_1_ij=\" << result1_ij << \"\\n\" << \"fQc_1_ji=\"\n\t\t\t\t<< result1_ji << \"\\n\" << \"fQc_2_ij=\" << result2_ij\n\t\t\t\t<< \"\\n\" << \"fQc_2_ji=\" << result2_ji << \"\\n\";\n\t\t}\n\t\tif (it.diagonal())\n\t\t\tMADNESS_ASSERT(\n\t\t\t\t\tresult1_ij == result2_ij && result1_ij == result1_ji\n\t\t\t\t\t&& result1_ji == result2_ji);\n\n\t\tconst double resultij = result1_ij + result2_ij;\n\t\tconst double resultji = result1_ji + result2_ji;\n\t\treturn std::make_pair(resultij, resultji);\n\t} else {\n\t\t// like before but with intermediates, less fences, should be faster\n\t\t// calulate intermediates\n\t\tconst vector_real_function_3d Kv = K(v);\n\t\t{\n\t\t\tconst double tmpsize = get_size(world, Kv);\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"Kv intermediate: \" << tmpsize << \" Gbyte\\n\";\n\t\t}\n\t\tconst vector_real_function_3d braij = Q(\n\t\t\t\tapply(world, *fop, moi * v) * moj);\n\t\t{\n\t\t\tconst double tmpsize = get_size(world, braij);\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"Q(braij) intermediate: \" << tmpsize << \" Gbyte\\n\";\n\t\t}            // Part 1 K1, Q12=OxQ, ij part\n\t\t// <j|(ifx)*Q*((Kxfi)-(xfKi))|j>\n\t\t// ji part\n\t\t// <i|(jfx)*Q*((Kxfi)-(xfKi))|j> or  <j|(ifx)*Q*((Kxfj)-(xfKj))|i>\n\t\t// Part 2 K2, Q12=QOx, ij part\n\t\t// <i|(jfx)*Q*((Kxfj)-(xfKj))|i>\n\t\t// ji part\n\t\t// <j|(ifx)*Q*((Kxfj)-(xfKj))|i> or <i|(jfx)*Q*((Kxfi)-(xfKi))|j>\n\t\tdouble result1_ij = 0.0;\n\t\tdouble result1_ji = 0.0;\n\t\tdouble result2_ij = 0.0;\n\t\tdouble result2_ji = 0.0;\n\t\tif (it.diagonal()) {\n\t\t\tconst vector_real_function_3d Kvi = mul(world, moi, Kv, false);\n\t\t\tconst vector_real_function_3d vKi = mul(world, Ki, v, false);\n\t\t\tworld.gop.fence();\n\t\t\tconst double tmpsize1 = get_size(world, braij);\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"Kvi intermediate: \" << tmpsize1 << \" Gbyte\\n\";\n\n\t\t\tconst double tmpsize2 = get_size(world, braij);\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"vKi intermediate: \" << tmpsize2 << \" Gbyte\\n\";\n\n\t\t\tconst vector_real_function_3d ket1 = (apply(world, *fop, Kvi - vKi))\n\t\t\t\t\t\t\t\t\t\t\t* moj;\n\t\t\tresult1_ij = madness::inner(braij, ket1);\n\t\t\tresult2_ij = result1_ij;\n\t\t\tresult1_ji = result1_ij;\n\t\t\tresult2_ji = result1_ij;\n\t\t} else {\n\t\t\tconst vector_real_function_3d braji = Q(\n\t\t\t\t\tapply(world, *fop, moj * v) * moi);\n\t\t\t{\n\t\t\t\tconst double tmpsize = get_size(world, braij);\n\t\t\t\tif (world.rank() == 0)\n\t\t\t\t\tstd::cout << \"Q(braij) intermediate: \" << tmpsize\n\t\t\t\t\t<< \" Gbyte\\n\";\n\t\t\t}\n\t\t\tconst vector_real_function_3d Kvi = mul(world, moi, Kv, false);\n\t\t\tconst vector_real_function_3d vKi = mul(world, Ki, v, false);\n\t\t\tconst vector_real_function_3d Kvj = mul(world, moj, Kv, false);\n\t\t\tconst vector_real_function_3d vKj = mul(world, Kj, v, false);\n\t\t\tworld.gop.fence(); //important fence\n\t\t\tconst double tmpsize1 = get_size(world, Kvi);\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"Kvi intermediate: \" << tmpsize1 << \" Gbyte\\n\";\n\n\t\t\tconst double tmpsize2 = get_size(world, vKi);\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"vKi intermediate: \" << tmpsize2 << \" Gbyte\\n\";\n\n\t\t\tconst double tmpsize3 = get_size(world, Kvj);\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"Kvj intermediate: \" << tmpsize3 << \" Gbyte\\n\";\n\n\t\t\tconst double tmpsize4 = get_size(world, vKj);\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"vKj intermediate: \" << tmpsize4 << \" Gbyte\\n\";\n\n\t\t\tconst vector_real_function_3d ket1 = (apply(world, *fop, Kvi - vKi))\n\t\t\t\t\t\t\t\t\t\t\t* moj;\n\t\t\tconst vector_real_function_3d ket2 = (apply(world, *fop, Kvj - vKj))\n\t\t\t\t\t\t\t\t\t\t\t* moi;\n\t\t\tresult1_ij = madness::inner(braij, ket1);\n\t\t\tresult2_ij = madness::inner(braji, ket2); // braji is correct\n\t\t\tresult1_ji = madness::inner(braji, ket1);\n\t\t\tresult2_ji = madness::inner(braij, ket2); // braij is correct\n\t\t}\n\t\tif (param.debug()) {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tstd::cout << \"fQc_1_ij=\" << result1_ij << \"\\n\" << \"fQc_1_ji=\"\n\t\t\t\t<< result1_ji << \"\\n\" << \"fQc_2_ij=\" << result2_ij\n\t\t\t\t<< \"\\n\" << \"fQc_2_ji=\" << result2_ji << \"\\n\";\n\t\t}\n\t\tif (it.diagonal())\n\t\t\tMADNESS_ASSERT(\n\t\t\t\t\tresult1_ij == result2_ij && result1_ij == result1_ji\n\t\t\t\t\t&& result1_ji == result2_ji);\n\n\t\tconst double resultij = result1_ij + result2_ij;\n\t\tconst double resultji = result1_ji + result2_ji;\n\t\treturn std::make_pair(resultij, resultji);\n\t}\n}\n\nvoid F12Potentials::print_pair_energies(const PNOPairs& pairs,\n\t\tconst std::string& msg) const {\n\tstd::cout << std::scientific << std::setprecision(5) << std::setfill(' ');\n\tprint_pair_energies(pairs.energies.eijs, pairs.energies.eijt, msg,\n\t\t\tpairs.type);\n\tif (world.rank() == 0 && pairs.type == CISPD_PAIRTYPE) {\n\t\tstd::cout << \"-------------------------------------------\\n\";\n\t\tstd::cout << \"GS correction reg=\" << std::setw(12)\n\t\t<< pairs.energies.eijs.sum() << \"\\n\";\n\t\tstd::cout << \"GS correction f12=\" << std::setw(12)\n\t\t<< pairs.energies.eijs_f12.sum() << \"\\n\";\n\t\tstd::cout << \"GS correction tot=\" << std::setw(12)\n\t\t<< pairs.energies.eijs.sum() + pairs.energies.eijs_f12.sum()\n\t\t<< \"\\n\";\n\t\tstd::cout << \"ES correction reg=\" << std::setw(12)\n\t\t<< pairs.energies.eijt.sum() << \"\\n\";\n\t\tstd::cout << \"ES correction f12=\" << std::setw(12)\n\t\t<< pairs.energies.eijt_f12.sum() << \"\\n\";\n\t\tstd::cout << \"ES correction tot=\" << std::setw(12)\n\t\t<< pairs.energies.eijt.sum() + pairs.energies.eijt_f12.sum()\n\t\t<< \"\\n\";\n\t\tstd::cout << \"-------------------------------------------\\n\";\n\t\tstd::cout << \"∆CIS(D) reg      =\" << std::setw(12)\n\t\t<< pairs.energies.energy << \"\\n\";\n\t\tstd::cout << \"∆CIS(D) f12      =\" << std::setw(12)\n\t\t<< pairs.energies.energy_f12 << \"\\n\";\n\t\t;\n\t\tstd::cout << \"∆CIS(D) tot      =\" << std::setw(12)\n\t\t<< pairs.energies.total_energy() << \"\\n\";\n\t\t;\n\t\tstd::cout << \"-------------------------------------------\\n\";\n\t} else if (world.rank() == 0) {\n\t\tstd::cout << \"-------------------------------------------\\n\";\n\t\tstd::cout << std::scientific << std::setprecision(5);\n\t\tstd::cout << \"Total Reg Energy  =\" << std::setw(12)\n\t\t<< pairs.energies.energy << \"\\n\";\n\t\tstd::cout << \"Total F12 Energy  =\" << std::setw(12)\n\t\t<< pairs.energies.energy_f12 << \"\\n\";\n\t\t;\n\t\tstd::cout << \"Sum Energies Total=\" << std::setw(12)\n\t\t<< pairs.energies.total_energy() << \"\\n\";\n\t\t;\n\t\tstd::cout << \"-------------------------------------------\\n\";\n\t}\n}\n\ndouble F12Potentials::compute_fQg_integral(const real_function_3d bra1,\n\t\tconst real_function_3d& bra2, const real_function_3d& ket1,\n\t\tconst real_function_3d& ket2, const bool& diagonal) const {\n\tProjector<double, 3> O(mos);\n\tconst double part1 = madness::inner(bra1 * ket1,\n\t\t\tconvolve_with_fg(bra2 * ket2));\n\tdouble part2 = 0.0;\n\tdouble part3 = 0.0;\n\t{\n\t\tvector_real_function_3d O1gij;\n\t\tfor (const auto& k : mos)\n\t\t\tO1gij.push_back((*coulombop)(k * ket1) * ket2);\n\t\tvector_real_function_3d O1q2gij = O1gij - 0.5 * O(O1gij); // this is particle 2, particle 1 is just acmos\n\t\tconst vector_real_function_3d& p2 = O1q2gij;\n\t\tconst vector_real_function_3d& p1 = mos;\n\t\tMADNESS_ASSERT(p1.size() == p2.size());\n\t\t// convolute\n\t\tpart2 =\n\t\t\t\tmadness::inner(world, bra2 * p2, apply(world, *fop, bra1 * p1)).sum();\n\t}\n\tif (!diagonal) {\n\t\tvector_real_function_3d O2gij;\n\t\tfor (const auto& k : mos)\n\t\t\tO2gij.push_back((*coulombop)(k * ket2) * ket1);\n\t\tvector_real_function_3d q1O2gij = O2gij - 0.5 * O(O2gij); // this is particle 1, particle 2 is just acmos\n\t\tconst vector_real_function_3d& p1 = q1O2gij;\n\t\tconst vector_real_function_3d& p2 = mos;\n\t\tMADNESS_ASSERT(p1.size() == p2.size());\n\t\t// convolute\n\t\tpart3 =\n\t\t\t\tmadness::inner(world, bra1 * p1, apply(world, *fop, bra2 * p2)).sum();\n\t} else\n\t\tpart3 = part2;\n\n\t//std::cout << \"\\npart1=\" << part1 << \"\\npart2=\" << part2 << \"\\npart3=\" << part3 << \"\\n\";\n\treturn part1 - part2 - part3;\n}\n\nPairEnergies F12Potentials::compute_f12_energies() const {\n\tif (world.rank() == 0)\n\t\tstd::cout << \"computing \" << (param.energytype()) << \" f12 energies\\n\";\n\n\tswitch (param.energytype()) {\n\tcase PROJECTED_ENERGYTYPE:\n\t\treturn compute_projected_f12_energies();\n\tcase HYLLERAAS_ENERGYTYPE: {\n\t\tif (world.rank() == 0)\n\t\t\tstd::cout << \"!!!WARNING no PNOS were given!!!\\n\";\n\t\tstd::valarray<vector_real_function_3d> pnos(\n\t\t\t\tzero_functions<double, 3>(world, 1), npairs());\n\t\treturn compute_hylleraas_f12_energies(pnos);\n\t}\n\tdefault: {\n\t\tMADNESS_EXCEPTION(\"should not end up here\", 1);\n\t\treturn PairEnergies(0);\n\t}\n\t}\n}\n\nPairEnergies F12Potentials::compute_f12_energies(\n\t\tconst std::valarray<vector_real_function_3d>& pnos) const {\n\tif (world.rank() == 0)\n\t\tstd::cout << \"computing \" << (param.energytype()) << \" f12 energies\\n\";\n\n\tswitch (param.energytype()) {\n\tcase PROJECTED_ENERGYTYPE:\n\t\treturn compute_projected_f12_energies();\n\tcase HYLLERAAS_ENERGYTYPE:\n\t\treturn compute_hylleraas_f12_energies(pnos);\n\tdefault: {\n\t\tMADNESS_EXCEPTION(\"should not end up here\", 1);\n\t\treturn PairEnergies(0); // silence compiler\n\t}\n\t}\n}\n\nPairEnergies F12Potentials::compute_projected_f12_energies() const {\n\tMyTimer time = MyTimer(world).start();\n\tstd::valarray<double> fQg = compute_fQg_integrals();\n\tstd::valarray<double> es(npairs());\n\tstd::valarray<double> et(npairs());\n\tdouble energy = 0.0;\n\tdouble check = 0.0;\n\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\tdouble sfactor = 1.0;\n\t\tif (it.diagonal())\n\t\t\tsfactor = 0.5;\n\n\t\tconst double tfactor = 3.0;\n\t\tes[it.ij()] = sfactor * (fQg[it.ij()] + fQg[it.ij() + npairs()]);\n\t\tet[it.ij()] = tfactor * (fQg[it.ij()] - fQg[it.ij() + npairs()]);\n\t\tcheck += sfactor * 2.0\n\t\t\t\t* (2.0 * (fQg[it.ij()]) - fQg[it.ij() + npairs()]);\n\t}\n\tenergy = es.sum() + et.sum();\n\tMADNESS_ASSERT(fabs(check - energy) < 1.e-5);\n\tPairEnergies result(npairs());\n\tresult.eijs_f12 = es;\n\tresult.eijt_f12 = et;\n\tresult.energy_f12 = energy;\n\tresult.update();\n\ttime.stop().print(\"compute_projected_f12_energies\");\n\treturn result;\n}\n\nstd::vector<real_function_3d> F12Potentials::read_cabs_from_file(const std::string& filename)const{\n\tMyTimer time_1 = MyTimer(world).start();\n\tif(world.rank()==0) std::cout <<\"Reading CABS from external file:\" << filename << \"\\n\";\n\t// Read CABS Exponents from file\n\tstd::map<std::string, std::vector<std::vector<double> > > exponents =\n\t\t\tbasis.read_basis_from_file(param.auxbas_file(),\n\t\t\t\t\tnemo.get_calc()->molecule.get_atoms());\n\tif(world.rank()==0) std::cout << \"Exponents from file:\" << param.auxbas_file() << \"\\n\";\n\tfor (const auto& x : exponents) {\n\t\tif (world.rank() == 0) {\n\t\t\tstd::cout << x.first << \" Exponents\\n\";\n\t\t\tfor (size_t l = 0; l < x.second.size(); ++l) {\n\t\t\t\tstd::cout << \"l=\" << l << \"\\n\";\n                                using madness::operators::operator<<;\n\t\t\t\tstd::cout << x.second[l] << \"\\n\";\n\t\t\t}\n\t\t}\n\t}\n\ttime_1.stop().print(\"Read Exponents From File\");\n\t// make CABS virtuals\n\tvector_real_function_3d cabsf;\n\tMyTimer time_2 = MyTimer(world).start();\n\tfor (const madness::Atom& atom : nemo.get_calc()->molecule.get_atoms()) {\n\t\tstd::vector<std::vector<double> > exp_atom = exponents.at(\n\t\t\t\tatomic_number_to_symbol(atom.atomic_number));\n\t\tfor (size_t l = 0; l < exp_atom.size(); ++l) {\n\t\t\tfor (const double e : exp_atom[l]) {\n\t\t\t\tcabsf = append(cabsf,\n\t\t\t\t\t\tbasis.guess_virtual_gaussian_shell(atom, l, e));\n\t\t\t}\n\t\t}\n\t}\n\ttime_2.stop().print(\"Creating CABS Basis\");\n\tMyTimer time_3 = MyTimer(world).start();\n\tcabsf = Q(cabsf);\n\ttime_3.stop().print(\"Apply Q\");\n\tprint_size(world, cabsf, \"cabs functions\");\n\treturn cabsf;\n}\n\nPairEnergies F12Potentials::compute_hylleraas_f12_energies(\n\t\tconst std::valarray<vector_real_function_3d>& pnos) const {\n\tMyTimer time = MyTimer(world).start();\n\n\tstd::valarray<vector_real_function_3d> abs_ij(pnos.size());\n\tvector_real_function_3d cabs;\n\tif (param.auxbas_file() != \"none\"){\n\t\tcabs = read_cabs_from_file(param.auxbas_file());\n\t}else if (param.get<std::string>(\"auxbas\") != \"none\"){\n\t\tcabs = basis.guess_virtuals_internal(param.auxbas());\n\t}\n\tif (not cabs.empty()){\n\t\tMyTimer time2 = MyTimer(world).start();\n\t\t// project out pnos from cabs\n\t\tcabs = Q(cabs);\n\t\tcabs = orthonormalize_rrcd(cabs,0.1 * param.thresh());\n\t\tfor (ElectronPairIterator it = pit(); it; ++it) {\n\t\t\t// right now this will make the same guess for all pairs\n\t\t\t//const vector_real_function_3d tmp=guess_virtuals(param.abs);\n\t\t\tQProjector<double, 3> Qpno( pnos[it.ij()]);\n\t\t\tconst vector_real_function_3d tmp = Qpno(cabs);\n\t\t\tabs_ij[it.ij()] = tmp;\n\t\t}\n\t\ttime2.stop().print(\"Make pair specific ABS from PNOS and \" + std::to_string(cabs.size()) + \" functions\");\n\t}\n\tPairEnergies result = compute_f12_pair_energy(pnos, abs_ij);\n\ttime.stop().print(\"compute hylleraas f12 energy (total) \");\n\treturn result;\n}\n\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/PNOF12Potentials.h",
    "content": "/*\n * F12Potentials.h\n *\n *  Created on: Aug 4, 2017\n *      Author: kottmanj\n */\n\n#ifndef F12POTENTIALS_H_\n#define F12POTENTIALS_H_\n\n#include<madness/chem/PNOGuessFunctions.h>\n#include<madness/chem/PNOParameters.h>\n#include<madness/chem/PNOStructures.h>\n\nnamespace madness {\n\n/// Class that provides all necessary F12 Potentials and Integrals\nclass F12Potentials {\n\npublic:\n\tWorld& world;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t///< MPI Communicator\n\tconst Nemo& nemo;\t\t\t\t\t\t\t\t\t\t\t\t\t\t///< all SCF data\n\tconst BasisFunctions& basis;\t\t\t\t\t\t\t\t\t\t\t///< all methods to create basis functions\n\tF12Parameters param;\t\t\t\t\t\t\t\t\t\t\t\t\t///< parameters\n\tstd::shared_ptr<real_convolution_3d> fop;\t\t\t\t\t\t\t\t///< operator for convolutions with the correlation factor: f12 = 1/(2*\\gamma)*(1-exp(-\\gamma*r_{12}))\n\tstd::shared_ptr<real_convolution_3d> slaterop;\t\t\t\t\t\t\t///< operator for convolutions with the slater factor exp(-\\gamma*r_{12})\n\tstd::shared_ptr<real_convolution_3d> slaterop_sq;\t\t\t\t\t\t///< operator for convolutions with the slater factor exp(-2.0*\\gamma*r_{12})\n\tstd::shared_ptr<real_convolution_3d> coulombop;\t\t\t\t\t\t\t///< operator for convolutions with the coulomb operator\n\tstd::shared_ptr<real_convolution_3d> bshop;   \t\t\t\t\t\t\t///< operator for convolutions with the bsh operator (parametrized with the exponent of the corrfac: gamma)\n\tstd::shared_ptr<real_convolution_3d> bshop_sq;   \t\t\t\t\t\t///< operator for convolutions with the bsh operator (parametrized with the exponent of the corrfac: 2*gamma)\n\tstd::vector< std::shared_ptr< real_derivative_3d > > gradop;\t\t\t///< Gradient Operator\n\tstd::vector< std::shared_ptr< real_convolution_3d > > slatergradop; \t/// Convolution with the gradient of the slater operator\n\tstd::vector< std::shared_ptr< real_convolution_3d > > slatergradop_sq;  /// Convolution with the gradient of the squared (\\gamma*2) slater operator\n\tvector_real_function_3d mos;\t\t\t\t\t\t\t\t\t\t\t///< all molecular orbitals (needed for Q projection parts)\n\tvector_real_function_3d acmos;\t\t\t\t\t\t\t\t\t\t\t///< Active Molecular Orbitals\n\tvector_real_function_3d acKmos; \t\t\t\t\t\t\t\t\t\t///< Intermediate for K(active_mos) (takes approx. as much memory than the mos itself. Since #mos<<<#PNOs this should not be a problem\n\tParametrizedExchange K;\t\t\t\t\t\t\t\t\t\t\t\t\t///< Exchange Operator\n\tQProjector<double, 3> Q;\t\t\t\t\t\t\t\t\t\t\t\t///< Projector on virtual space: Q = 1-|k><k|\n\n\n\tF12Potentials(World& world, const Nemo& nemo,const BasisFunctions& basis,const F12Parameters& pp);\n\n\tvector_real_function_3d initialize_active_mos(const madness::Nemo& nemo)const{\n\t\tvector_real_function_3d ac;\n\t\tconst vector_real_function_3d& mos=nemo.get_calc()->amo;\n\t\tfor(size_t i=param.freeze();i<mos.size();++i) ac.push_back(mos[i]);\n\t\tMADNESS_ASSERT(ac.size()==mos.size()-param.freeze());\n\t\treturn ac;\n\t}\n\n\t/// Convenience: Get number of pairs\n\tsize_t npairs()const{\n\t\tconst size_t n=acmos.size();//mos.size()-param.freeze();\n\t\treturn n*(n+1)/2;\n\t}\n\n\n\t/// Convenience: Get electron pair iterator\n\tElectronPairIterator pit()const{ return ElectronPairIterator(acmos.size()+param.freeze(),param.freeze());}\n\n\t/// apply the regularized potential\n\t/// \\f$ result = <bra|Ue-[f,K]|ket1,ket2> \\f$\n\t/// \\f$ <bra|Ue|ket1,ket2> \\f$\n\t/// \\f$ <bra|[f,K]|ket1,ket2> = <bra[f,K1]|ket1,ket2> + <bra[f,K2]|ket1,ket2> \\f$\n\t/// \\f$ <bra|[f,K1]|ket1,ket2> = <bra|f|K(ket1)>*|ket2> - <K(bra)|f|ket1>*|ket2>\n\t/// \\f$ <bra|[f,K2]|ket1,ket2> = <bra|f|ket1>*|K(ket2)> - |K(<bra|f|ket1>*ket2)>\n\tvector_real_function_3d apply_regularized_potential(const real_function_3d& moi, const real_function_3d& moj,const real_function_3d Ki, const real_function_3d& Kj,\n\t\t\tconst vector_real_function_3d& bra, const vector_real_function_3d& Kpno) const;\n\n\t/// compute <ab|g|ij> with the regularized coulomb operator g\n\tTensor<double> compute_regularized_fluctuation_matrix(const ElectronPairIterator& it, const vector_real_function_3d& pnos, const vector_real_function_3d& Kpnos)const;\n\tTensor<double> compute_regularized_fluctuation_matrix(const std::pair<vector_real_function_3d,vector_real_function_3d> & KPNOA,const std::pair<vector_real_function_3d,vector_real_function_3d> & KPNOB, const std::pair<real_function_3d,real_function_3d>& MKI, const std::pair<real_function_3d,real_function_3d> MKJ)const;\n\n\t/// Compute the <ij|op|ab> integrals\n\tstd::valarray<Tensor<double> > compute_ijab_integrals(\n\t\t\tconst std::valarray<vector_real_function_3d>& functions,\n\t\t\tconst std::shared_ptr<real_convolution_3d>& op) const;\n\n\t/// Compute the <xy|op|ab> integrals, op==NULL pointer means overlap: <xy|ab>\n\tTensor<double> compute_xyab_integrals(const real_function_3d& x, const real_function_3d& y, const vector_real_function_3d& a, const vector_real_function_3d& b, const std::shared_ptr<real_convolution_3d>& op,\n\t\t\tconst bool diagonal = false) const;\n\n\t/// Compute the <ij|g|ab> integrals\n\tstd::valarray<Tensor<double> > compute_gijab_integrals(const std::valarray<vector_real_function_3d>& functions)const{\n\t\treturn compute_ijab_integrals(functions,coulombop);\n\t}\n\n\t/// Compute the <ij|f|ab> integrals\n\tstd::valarray<Tensor<double> > compute_fijab_integrals(const std::valarray<vector_real_function_3d>& functions)const{\n\t\treturn compute_ijab_integrals(functions,fop);\n\t}\n\tTensor<double> compute_fijab_integrals(const size_t &i, const size_t& j,const vector_real_function_3d& functions)const{\n\t\treturn compute_xyab_integrals(acmos[i], acmos[j], functions, functions, fop, i==j);\n\t}\n\n\t/// Compute the <ij|fQg|ij> and |ij|fQg|ji> integrals\n\tstd::valarray<double> compute_fQg_integrals() const;\n\n\t/// Compute the <ij|fQU|ij> and |ij|fQU|ji> integrals\n\tstd::valarray<double> compute_fQU_integrals() const;\n\n\t/// Compute the fQc integrals with ABS used as: Q12 = Q*|a><a|\n\t/// K1f: <i|fja|x>, with fja = <a|f|j> and x=QK(<a|f|j>*i)\n\t/// K2f: <i|fja|y>, with y = Q(<Ka|f|j>*i\n\t/// fK2: <i|fja|z>, with z = Q(<a|f|Kj>*i) (note: actually no abs needed for fK1)\n\t/// fK1: <i|fja|w>, with w = Q(<a|f|j>*Ki)\n\tstd::valarray<double> compute_fQc_integrals(\n\t\t\tconst vector_real_function_3d& Kmos,\n\t\t\tconst std::valarray<vector_real_function_3d>& functions) const;\n\tstd::pair<double, double> compute_fQc_integrals_ij(\n\t\t\tconst vector_real_function_3d& Kmos,\n\t\t\tconst vector_real_function_3d& functions,\n\t\t\tconst ElectronPairIterator& it,\n\t\t\tconst bool& use_no_intermediates = false) const;\n\n\n\t/// Compute the <ab|[f,K]|ij> integrals\n\tstd::valarray<Tensor<double> > compute_cijab_integrals(const std::valarray<vector_real_function_3d>& functions) const;\n\tTensor<double> compute_cijab_integrals(const size_t &i, const size_t& j, const real_function_3d& Ki, const real_function_3d& Kj , const vector_real_function_3d& functions)const;\n\n\t/// Compute the <ab|Ue|ij> Integrals\n\tTensor<double> compute_uijab_integrals(const size_t&i, const size_t&j, const vector_real_function_3d& functions)const{\n\t\tconst vector_real_function_3d vUij = convolve_with_U(functions,acmos[i],acmos[j]);\n\t\tconst Tensor<double> result = matrix_inner(world,functions,vUij);\n\t\treturn result;\n\t}\n\n\t/// convenience for formated printing\n\t/// @param[in] es: singlet pair energies\n\t/// @param[in] et: triplet pair energies\n\tvoid print_pair_energies(const PNOPairs& pairs,\n\t\t\tconst std::string& msg = \"\") const;\n\tvoid print_pair_energies(const std::valarray<double>& es, const std::valarray<double>& et, const std::string& msg = \"\",const PairType& type=UNKNOWN_PAIRTYPE) const;\n\n\t/// print_f12_energies with PairEnergies POD\n\tvoid print_f12_energies(const PairEnergies& pe, const std::string& msg=\"\")const{\n\t\tprint_pair_energies(pe.eijs_f12,pe.eijt_f12,msg);\n\t}\n\n\t// compute the f12 energy of the MP2 equivalent of CIS(D) correction which is the S2b and S2c part\n\t// we do not use hylleras type right now, but in analogy to 6D MRA just the f12Q12g12 part (this might not be completely correct)\n\t// result: (2<xij| + <jxi)( f12Q12g12|x_i,j> + f12Q12g12|ix_j> - fQOxg|ij> - fOxQg|ij>\n\tPairEnergies compute_cispd_f12_energies(const vector_real_function_3d xcis)const{\n\t\tPairEnergies result(npairs());\n\t\tdouble f12_energy=0.0;\n\t\tfor(ElectronPairIterator it=pit();it;++it){\n\t\t\tconst real_function_3d& moi=acmos[it.i()];\n\t\t\tconst real_function_3d& moj=acmos[it.j()];\n\t\t\tconst real_function_3d& xi=xcis[it.i()];\n\t\t\tconst real_function_3d& xj=xcis[it.j()];\n\n\n\t\t\t// part 1. S2b part\n\t\t\tdouble part1=0.0;\n\t\t\tif(it.diagonal()){\n\t\t\t\tpart1 = 2.0*(compute_fQg_integral(xi,moj,xi,moj)+ compute_fQg_integral(xi,moj,moi,xj)); // this is the |xi,j> + |i,xj> part\n\t\t\t\t// now the Ox part: -(O1x+O2x)|ij>\n\t\t\t\tvector_real_function_3d p1,p2;\n\t\t\t\tp1 = apply(world,*fop,acmos*moj)*moi;\n\t\t\t\tp1=append(p1,xcis);\n\t\t\t\tp2 = xcis;\n\t\t\t\tp2=append(p2,apply(world,*fop,acmos*moi)*moj);\n\t\t\t\tpart1 -= 2.0*(madness::inner(world,xi*p1,apply(world,*coulombop,p2*moj)).sum());\n\t\t\t}\n\t\t\telse{\n\t\t\t\tMADNESS_EXCEPTION(\"Still wrong ... also part2 \",1);\n\t\t\t\tpart1 = 2.0*(compute_fQg_integral(moi,moj,xi,moj) + compute_fQg_integral(moi,moj,moi,xj) - compute_fQg_integral(moj,moi,xi,moj) + compute_fQg_integral(moj,moi,moi,xj)) ;\n\t\t\t}\n\n\t\t\t// part2: S2c part\n\t\t\tdouble part2=0.0;\n\t\t\tif(it.diagonal()){\n\n\t\t\t\tconst vector_real_function_3d p1=xcis;\n\t\t\t\tconst vector_real_function_3d p2=Q(apply(world,*coulombop,moi*acmos)*moj);\n\t\t\t\tpart2 = 2.0*( madness::inner(world,p1*xi,apply(world,*fop,p2*moj)).sum() + madness::inner(world,p1*moi,apply(world,*fop,p2*xj)).sum()  ); // |xi,j> + |i,xj> part\n\n\t\t\t\t// now projector part\n\t\t\t\t// transform mos: |ti> = sum_k |k> <x_k|x_i> = Ox^t|x>\n\t\t\t\tProjector<double,3> Oxt(xcis,acmos);\n\t\t\t\t// OQ part\n\t\t\t\tvector_real_function_3d pp1=Oxt(p1);\n\t\t\t\tvector_real_function_3d pp2=p2;\n\t\t\t\t// QO part\n\t\t\t\tpp1=append(pp1,p1);\n\t\t\t\tpp2=append(pp2,Oxt(p2));\n\t\t\t\tpart2 -= 2.0*( madness::inner(world,p1*moi,apply(world,*fop,p2*moj))).sum();\n\t\t\t}else{\n\t\t\t\tMADNESS_EXCEPTION(\"Still wrong ... also part1 \",1);\n\t\t\t\t// use this intermediates and avoid calculating them twice\n\t\t\t\tconst vector_real_function_3d fi=apply(world,*fop,moi*acmos);\n\t\t\t\tconst vector_real_function_3d fj=apply(world,*fop,moj*acmos);\n\t\t\t\t{\n\t\t\t\t        //const vector_real_function_3d& p1=acmos;\n\t\t\t\t\tconst vector_real_function_3d& p2=Q(apply(world,*coulombop,moi*acmos)*moj);\n\t\t\t\t\tpart2 += 2.0*madness::inner(world,fi,moj*p2).sum() - madness::inner(world,fj,moi*p2).sum();\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t\tconst vector_real_function_3d& p1=Q(apply(world,*coulombop,moj*acmos)*moi);\n\t\t\t\t\t// const vector_real_function_3d& p2=acmos;\n\t\t\t\t\tpart2 += 2.0*madness::inner(world,moi*p1,fj).sum() - madness::inner(world,moj*p1,fi).sum();\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble factor=1.0;\n\t\t\tif(it.diagonal()) factor=0.5; // cancels the factor 2 above ... probably stupid to implement that way\n\t\t\tconst double result_ij = factor*(part1 - part2);\n\n\t\t\tstd::cout << \"\\npart1=\" << part1 << \"\\npart2=\" << part2 << \"\\n\";\n\n\t\t\tf12_energy += result_ij;\n\t\t}\n\t\tresult.energy_f12=f12_energy;\n\t\treturn result;\n\t}\n\n\n\t// efficient computation using Q12 = 1 - O1 - O2 + O12 = 1 - O1q2 - q1O2 and q1 = 1 - 0.5*O1\n\tdouble compute_fQg_integral(const real_function_3d bra1,\n\t\t\tconst real_function_3d& bra2, const real_function_3d& ket1,\n\t\t\tconst real_function_3d& ket2, const bool& diagonal = false) const;\n\n\t// Call the correct functions depending which parameters are set\n\tPairEnergies compute_f12_energies(\n\t\t\tconst std::valarray<vector_real_function_3d>& pnos) const;\n\tPairEnergies compute_f12_energies() const;\n\n\t/// return 2.0 <ij|fQg|ij> - <ji|fQg|ij> as well as singlet and triplets\n\tPairEnergies compute_projected_f12_energies() const;\n\n\tstd::vector<real_function_3d> read_cabs_from_file(const std::string& filename)const;\n\n\tPairEnergies compute_hylleraas_f12_energies(\n\t\t\tconst std::valarray<vector_real_function_3d>& pnos) const;\n\n\n\tPairEnergies compute_f12_pair_energy(const std::valarray<vector_real_function_3d>& pnos, const std::valarray<vector_real_function_3d>& abs) const;\n\n\t/// Compute the f12 pair energy if Ansatz 2 is used\n\t/// This means: Regularized MRA-PNO-MP2-F12 calculation\n\t/// We use RI for the integrals with the exchange commutator\n\t/// in two steps: 1. PNOs as approx for Q, 2. Correction with ABS set (either auto generated or from file)\n\t/// EF12 =<ij|(fQg + fQU - fQ[f,K])(2|ij> - |ji>)\n\tPairEnergies compute_f12_pair_energies(const std::valarray<vector_real_function_3d>& abs) const;\n\n\t/// Compute the f12 pair energy if Ansatz 1 is used\n\t/// This means: Normal MRA-PNO-MP2 calculation + F12 Correction\n\t/// Old Code\n\t/// Currently: Neglect Commutator if no abs is given\n\t/// if abs_u is true then fQU part is also neglected (RI with PNOs as virtuals: fQU ~= fVU => fQU - fVU ~= 0)\n\t/// EF12 = <ij|(fQg-fVg + fUg - fVg)|2ij-ji>\n\tPairEnergies compute_f12_correction(\n\t\t\tconst std::valarray<vector_real_function_3d>& pnos, const std::valarray<vector_real_function_3d>& abs) const;\n\n\t/// Compute the applied Ue potential\n\t/// \\f$ <bra|Ue|ket1,ket2>_1 =  <bra|Ulocal|ket1,ket2> + <bra|Unlocal|ket1,ket2> \\f$\n\treal_function_3d convolve_with_U(const real_function_3d& bra,\n\t\t\tconst real_function_3d& ket1, const real_function_3d& ket2,\n\t\t\tconst bool symmetric = false) const;\n\tvector_real_function_3d convolve_with_U(const vector_real_function_3d& bra,\n\t\t\tconst real_function_3d& ket1, const real_function_3d& ket2,\n\t\t\tconst bool symmetric = false) const;\n\n\t/// @return \\f$ \\int dr2 (1-e^{-gamma*r12})/r12 + gamma/2* e^{-\\gamma*r12} *function(r2)  \\f$\n\t/// we use: 1-e^{-gamma*r12})/r12 = 2*gamma*f12*g12\n\treal_function_3d convolve_with_local_U(\n\t\t\tconst real_function_3d& function) const{\n\t\tvector_real_function_3d dummy(1,function);\n\t\treturn convolve_with_local_U(dummy).front();\n\t}\n\n\tvector_real_function_3d convolve_with_local_U(const vector_real_function_3d& functions)const;\n\n\t/// @return convolution with the slater potential which is\n\t/// \\f$ V_{slater} = \\exp{(-\\gamma*r_{12})}  \\f$\n\t/// @param[in] function -> operator is applied onto this funciton\n\t/// if nemo-style orbitals are used the bra element has to be multiplied with R^2 beforehand\n\tvector_real_function_3d convolve_with_slater_potential(const vector_real_function_3d& functions)const{\n\t\treturn apply(world,*slaterop,functions);\n\t}\n\n\n\t/// @return \\f$ \\int dx2 f12*g12*f(2)  \\f$\n\t/// @param[in] function: function on which f*g operator is applied\n\t/// right now we use: fg = 1/(2*gamma)*(g - 4*pi*G(gamma))\n\t/// todo: implement fg operator directly (may be cheaper)\n\treal_function_3d convolve_with_fg(const real_function_3d& function)const;\n\tvector_real_function_3d convolve_with_fg(const vector_real_function_3d& functions)const;\n\n\t/// @return \\f$ -1.0/2.0*<bra(1)|e^{-gamma*r_{12}}/r_{12}* \\vec{r_{12}}\\cdot (\\nabla_1 - \\nabla_2)[axis]|ket1,ket2>_1  \\f$\n\t/// @param[in] bra: no derivatives (for nemo-style orbitals this should be multiplied with R^2 beforehand)\n\t/// @param[in] ket1: this is the part (for electron 1) where the derivative operators will partially act on and over which the integration variable will run\n\t/// @param[in] ket2: this is the part (for electron 2) where the derivative operators will partially act on, no integration over this variable\n\t/// @param[in] symmetric: if ket1 and ket2 are the same functions (little speedup because the gradient has to be calculated only once)\n\t/// @param[in] squared: factor for gamma: a*\\gamma. Default is just 1.0. if true then a=2\n\t/// We use the following relations:\n\t///   1.0/2.0*e^{-\\gamma*r_{12}}*\\vec{r_{12}}/r_{12}\n\t///=  1.0/(2.0*\\gamma) \\nabla_2(e^{-\\gamma*r_{12}})\n\t///= -1.0/(2.0*\\gamma) \\nabla_1(e^{-\\gamma*r_{12}})\n\t///= -1.0/(2.0*\\gamma) \\nabla_{12}(e^{-\\gamma*r_{12}} )\n\t/// so we can use the gradient of the SlaterOperator Grad(e^{-\\gamma*r}\n\t/// with this we have\n\t/// \\f$ -1.0/2.0*<bra|e^{-gamma*r12}/r12* \\vec{r12}\\cdot (\\nabla_1 - \\nabla_2)[axis]|ket>\n\t/// =    1.0/(2.0*\\gamma)*<bra|Grad(e^{-\\gamma*r_{12}})\\cdot (\\nabla_1 - \\nabla_2)[axis]|ket1,ket2>_{particle}   \\f$\n\t/// todo: Partial integration may lead to more efficient scheme without the Gradient of the SlaterOperator\n\treal_function_3d convolve_with_nonlocal_U(const real_function_3d& bra, const real_function_3d& ket1,const real_function_3d& ket2, const bool symmetric=false, const bool& squared=false)const;\n\tvector_real_function_3d convolve_with_nonlocal_U(const vector_real_function_3d& bra, const real_function_3d& ket1,const real_function_3d& ket2, const bool symmetric=false, const bool& squared=false)const;\n\n\t/// Convolution with f*U\n\t/// This breaks apart into the convolution with:\n\t/// \\f$ f*U = 1/(2\\gamma)*(U - e^{-\\gamma*r_{12}} \\f$\n\t/// local part: (could be further simplified by combining the BSH Operators of Ulocal the expression below)\n\t/// \\f$ f*U^{\\mbox{loc}} =  1/(2\\gamma)*(U^{\\mbox{loc}} - 4\\pi*G(\\gamma) + 4\\pi*G(2\\gamma) - \\gamma/2 (e^{-2\\gamma*r_{12}} )\n\t/// nonlocal part:\n\t/// \\f$ f*U^{\\mbox{nloc}} = 1/(2\\gamma)*(U^{\\mbox{nloc}}(\\gamma) - U^{\\mbox{nloc}}(2\\gamma))\n\tvector_real_function_3d convolve_with_fU(const vector_real_function_3d& bra, const real_function_3d& ket1,\n\t\t\tconst real_function_3d& ket2, const bool symmetric = false) const;\n\treal_function_3d convolve_with_fU(const real_function_3d& bra,const real_function_3d& ket1,\n\t\t\tconst real_function_3d& ket2, const bool symmetric = false) const{\n\t\tvector_real_function_3d dummy(1,bra);\n\t\treturn convolve_with_fU(dummy,ket1,ket2,symmetric).front();\n\t}\n\n\t/// convolve with the gradient of the slater potential or the squared slater potential\n\tvector_real_function_3d convolve_with_gradslater(const vector_real_function_3d functions, const size_t axis, const bool& squared=false)const{\n\t\tif(squared){\n\t\t\treturn apply(world,*slatergradop_sq[axis],functions);\n\t\t}else{\n\t\t\treturn apply(world,*slatergradop[axis],functions);\n\t\t}\n\n\t}\n\n\t/// Inner product for X_ab Tensors. Convenience\n\tdouble inner(const Tensor<double>&A, const Tensor<double>&B)const{\n\t\treturn A.trace(B);\n\t}\n\n\n};\n\n} /* namespace madness */\n\n#endif /* F12POTENTIALS_H_ */\n"
  },
  {
    "path": "src/madness/chem/PNOGuessFunctions.cpp",
    "content": "/*\n * BasisFunctions.cc\n *\n *  Created on: Apr 18, 2018\n *      Author: kottmanj\n */\n\n#include <PNOGuessFunctions.h>\n#include <cmath>\n#ifdef MADNESS_HAS_BOOST\n#include <boost/math/special_functions/legendre.hpp>\n#endif\n\nnamespace madness {\n\n vector_real_function_3d BasisFunctions::guess_virtuals_from_file() const {\n\tMyTimer time_1 = MyTimer(world).start();\n\t// Read Exponents from file\n\tstd::map<std::string, std::vector<std::vector<double> > > exponents = read_basis_from_file(\"bas\", molecule.get_atoms());\n\tprint(\"Exponents from file bas:\");\n\tfor (const auto& x : exponents) {\n\t\tif (world.rank() == 0) {\n\t\t\tstd::cout << x.first << \" Exponents\\n\";\n\t\t\tfor (size_t l = 0; l < x.second.size(); ++l) {\n\t\t\t\tstd::cout << \"l=\" << l << \"\\n\";\n                                using madness::operators::operator<<;\n\t\t\t\tstd::cout << x.second[l] << \"\\n\";\n\t\t\t}\n\t\t}\n\t}\n\ttime_1.stop().print(\"Read Exponents From File\");\n\tvector_real_function_3d virtuals;\n\tMyTimer time_2 = MyTimer(world).start();\n\tfor (const madness::Atom& atom : molecule.get_atoms()) {\n\t\tstd::vector<std::vector<double> > exp_atom = exponents.at(atomic_number_to_symbol(atom.atomic_number));\n\t\tfor (size_t l = 0; l < exp_atom.size(); ++l) {\n\t\t\tfor (const double e : exp_atom[l]) {\n\t\t\t\tvirtuals=append(virtuals, guess_virtual_gaussian_shell(atom, l, e));\n\t\t\t}\n\t\t}\n\t}\n\ttime_2.stop().print(\"Creating Guess Basis\");\n\treturn virtuals;\n}\n\n vector_real_function_3d BasisFunctions::guess_virtuals_internal(const std::map<std::string, std::vector<int> > guess_map) const {\n\tvector_real_function_3d virtuals;\n\tfor (size_t i = 0; i < molecule.natom(); ++i) {\n\t\t// get the partial wave basis for the atom\n\t\tconst Atom& atom = molecule.get_atom(i);\n\t\tconst std::string symbol = atomic_number_to_symbol(atom.atomic_number);\n\t\tstd::vector<int> pw_guess;\n\t\tif (guess_map.find(symbol) != guess_map.end()) {\n\t\t\tpw_guess = guess_map.find(symbol)->second;\n\t\t} else {\n\t\t\tif (world.rank() == 0)\n\t\t\t\tprint(\"symbol\", symbol);\n\n\t\t\t//if (world.rank() == 0) print(\"pw_guess\",param.pw_guess);\n\t\t\tMADNESS_EXCEPTION(\"could not find basis for atom\", 1);\n\t\t}\n\t\tif (world.rank() == 0) {\n\t\t\tprint(\"working on atom\", symbol);\n\t\t\tprint(\"pw_guess\", pw_guess);\n\t\t}\n\t\tfor (size_t l = 0; l < pw_guess.size(); ++l) {\n\t\t\tfor (int i = 0; i < pw_guess[l]; ++i) {\n\t\t\t\tdouble e = double(pw_guess[l]) / (double(i + 1.0));\n\t\t\t\tvirtuals=append(virtuals, guess_virtual_gaussian_shell(atom, l, e));\n\t\t\t\tif (world.rank() == 0)\n\t\t\t\t\tprint(\"l,e\", l, e);\n\n\t\t\t\tif (world.rank() == 0)\n\t\t\t\t\tprint(\"virtuals.size() = \", virtuals.size());\n\t\t\t}\n\t\t}\n\t}\n\tif (world.rank() == 0)\n\t\tprint(\"number of guess virtuals: \", virtuals.size());\n\n\t// plot guess\n\tfor (std::size_t i = 0; i < virtuals.size(); ++i) {\n\t\tstd::string name = \"virtuals\" + stringify(i);\n\t\tplot_plane(world, virtuals[i], name);\n\t}\n\treturn virtuals;\n}\n\n vector_real_function_3d BasisFunctions::guess_virtual_gaussian_shell(const Atom& atom, const int l, const double e) const {\n\tvector_real_function_3d virtuals;\n\tauto gg = make_solidharmonic_guess(atom, l, e);\n\tfor (std::size_t m = 0; m < gg.size(); ++m) {\n\t\tvirtuals.push_back(real_factory_3d(world).functor(gg[m]).truncate_on_project());\n\t}\n\tnormalize(world, virtuals);\n\treturn virtuals;\n}\n\n std::vector<std::vector<double> > BasisFunctions::read_basis_from_file(const std::string& filename, const std::string& atom) const {\n\tstd::ifstream f(filename.c_str());\n\tposition_stream(f, atom);\n\tstd::string s;\n\tstd::string str_pw_guess, symbol;\n\tstd::vector<std::vector<double> > result(8);\n\tstd::size_t stars = 0;\n\twhile (f >> s) {\n\t\tif (s == \"*\") {\n\t\t\t++stars;\n\t\t\tif (stars == 2)\n\t\t\t\tbreak;\n\t\t}\n\t\tif (s == \"s\" || s == \"p\" || s == \"d\" || s == \"f\" || s == \"g\" || s == \"h\" || s == \"i\" || s == \"k\") {\n\t\t\tdouble exponent;\n\t\t\tf >> exponent;\n\t\t\tresult[lqtoint(s)].push_back(exponent);\n\t\t}\n\t}\n\treturn result;\n}\n\n std::map<std::string, std::vector<std::vector<double> > > BasisFunctions::read_basis_from_file(const std::string& filename, const std::vector<madness::Atom> atoms) const {\n\tstd::map<std::string, std::vector<std::vector<double> > > cabs_exponents;\n\tfor (const madness::Atom& atom : atoms) {\n\t\tconst std::string symbol = atomic_number_to_symbol(atom.atomic_number);\n\t\tif (cabs_exponents.find(symbol) == cabs_exponents.end()) {\n\t\t\tstd::vector<std::vector<double> > tmpbas = read_basis_from_file(filename, symbol);\n\t\t\tcabs_exponents[symbol] = tmpbas;\n\t\t}\n\t}\n\treturn cabs_exponents;\n}\n\n size_t BasisFunctions::lqtoint(const std::string& l) const {\n\tif (l == \"s\")\n\t\treturn 0;\n\telse if (l == \"p\")\n\t\treturn 1;\n\telse if (l == \"d\")\n\t\treturn 2;\n\telse if (l == \"f\")\n\t\treturn 3;\n\telse if (l == \"g\")\n\t\treturn 4;\n\telse if (l == \"h\")\n\t\treturn 5;\n\telse if (l == \"i\")\n\t\treturn 6;\n\telse if (l == \"k\")\n\t\treturn 7;\n\telse {\n\t\tMADNESS_EXCEPTION((\"l-quantum number:\" + l + \" not supported\").c_str(), 1);\n\t\treturn 99999999;\n\t}\n\n\tMADNESS_EXCEPTION(\"Should not end up here\", 1);\n}\n\n\n\n double BasisFunctions::SolidHarmonicGaussian::operator ()(const coord_3d& xyz) const {\n#ifdef MADNESS_HAS_BOOST\n        static const int64_t fac[] = { 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000 };\n\tstatic const auto sqrt_2 = 1.41421356237309504880168872421;\n\tdouble xx = xyz[0] - x;\n\tdouble yy = xyz[1] - y;\n\tdouble zz = xyz[2] - z;\n\tconst double r2 = (xx * xx + yy * yy + zz * zz);\n\tconst double r = std::sqrt(r2);\n\tconst double cos_theta = zz / r;\n\tconst double sin_theta = std::sqrt(1 - cos_theta * cos_theta);\n\tconst double cos_phi = xx / (r * sin_theta);\n\tconst double phi = (yy > 0 ? 1.0 : -1.0) * std::acos(cos_phi);\n\tconst auto abs_m = std::abs(m);\n\tassert(size_t(l + abs_m) <= (sizeof(fac) / sizeof(int64_t) - 1));\n\t// wrong sign for m < 0\n\t//const auto P_l_m = boost::math::assoc_legendre(l, abs_m, cos_theta);\n\tconst auto P_l_m = boost::math::legendre_p(l, abs_m, cos_theta);\n\t// this excludes sqrt((2l+1)/4pi) since that gets cancelled by its inverse in the definition of the solid harmonics\n\t// this also excludes (-1)^m since that is also included in the real spherical harmonics phase\n\tconst auto Y_normconst = std::sqrt(static_cast<double>(fac[l - m]) / static_cast<double>(fac[l + m]));\n\t// (-1)^m was cancelled in Y_normconst\n\tconst auto real_azimuthal_prefactor = (m != 0) ? sqrt_2 * (m > 0 ? std::cos(m * phi) : std::sin(abs_m * phi)) : 1.0;\n\treturn pow(r, l) * (Y_normconst * real_azimuthal_prefactor * P_l_m) * exp(-exponent * r2);\n#else\n\tMADNESS_EXCEPTION(\"can not create SolidHarmonicGaussian without boost.math library, compile MADNESS with boost by using cmake flag -D ENABLE_BOOST=ON \",1);\n\treturn 0.0;\n#endif\n\n\n}\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/PNOGuessFunctions.h",
    "content": "/*\n * BasisFunctions.h\n *\n *  Created on: Apr 18, 2018\n *      Author: kottmanj\n */\n\n#ifndef PAPER_CODE_BASISFUNCTIONS_H_\n#define PAPER_CODE_BASISFUNCTIONS_H_\n\n\n#include <exception>\n#include <stdlib.h>\n#include <cassert>\n#include <cmath>\n#include <numeric>\n#include <valarray>\n#include <stdio.h>\n#include <madness.h>\n#include<madness/chem/PNOStructures.h>\n#include<madness/chem/projector.h>\n#include<madness/chem/GuessFactory.h>\n#include<madness/chem/molecule.h>\n\n#include <tuple>\n\n\nnamespace madness {\n\n\n/// class which provides guess functions for pnos and cabs basis sets\n/// the guess functions are not orthonormalized or Q-projected\nclass BasisFunctions{\npublic:\n\ttypedef std::vector<std::tuple<int, std::vector<double>, std::vector<double> > > cbfT;\n\tBasisFunctions(World& world,const Molecule& mol, const size_t& l): world(world), molecule(mol), lmax(l) {}\n\tWorld& world;\n\tconst Molecule& molecule;\n\tconst size_t lmax;\n\n\t// print out a basis of contracted orbitals\n\tvoid print_contracted_basis(std::map<std::string, cbfT >& molbas)const{\n\t\tfor(const auto& tmp:molbas){\n\t\tcbfT abf=tmp.second;\n\t\tfor(const auto& bf:abf){\n\t\t\tconst int type = std::get<0>(bf);\n\t\t\tconst std::vector<double> ex=std::get<1>(bf);\n\t\t\tconst std::vector<double> c=std::get<2>(bf);\n\t\t\tstd::cout << ex.size() << \" \" << type << \"\\n\";\n\t\t\tfor(size_t k=0;k<ex.size();++k) std::cout << ex[k] << \"  \" << c[k] << \"\\n\";\n\n\t\t}\n\t\t}\n\t}\n\n\tvector_real_function_3d guess_virtuals_from_file() const;\n\tvector_real_function_3d guess_contracted_virtuals_from_file() const {\n\t\tMyTimer time_1 = MyTimer(world).start();\n\t\t// Read Exponents from file\n\t\tstd::map<std::string, cbfT > molbas = read_contracted_basis_from_file(\"bas\", molecule.get_atoms());\n\t\tprint(\"Exponents from file bas:\");\n\t\tprint_contracted_basis(molbas);\n\t\ttime_1.stop().print(\"Read Exponents From File\");\n\t\tvector_real_function_3d virtuals;\n\n\t\tMyTimer time_2 = MyTimer(world).start();\n\t\tfor (const madness::Atom& atom : molecule.get_atoms()) {\n\t\t\tcbfT abf = molbas.at(atomic_number_to_symbol(atom.atomic_number));\n\t\t\tfor(const auto& bf:abf){\n\t\t\tconst int type = std::get<0>(bf);\n\t\t\tconst std::vector<double> ex=std::get<1>(bf);\n\t\t\tconst std::vector<double> c=std::get<2>(bf);\n\t\t\tMADNESS_ASSERT(ex.size()==c.size());\n\t\t\tvector_real_function_3d contracted_function;\n\t\t\tfor(size_t k=0;k<ex.size();++k){\n\t\t\t\tvector_real_function_3d gshell = guess_virtual_gaussian_shell(atom, type, ex[k]);\n\t\t\t\tprint_size(world,gshell,\"ex=\"+std::to_string(ex[k]));\n\t\t\t\tnormalize(world,gshell);\n\t\t\t\ttruncate(world,gshell,FunctionDefaults<3>::get_thresh());\n\t\t\t\tprint_size(world,gshell,\"ex=\"+std::to_string(ex[k]));\n\t\t\t\tif(contracted_function.empty()) contracted_function=c[k]*gshell;\n\t\t\t\telse contracted_function += c[k]*gshell;\n\t\t\t}\n\t\t\tnormalize(world,contracted_function);\n\t\t\tvirtuals=append(virtuals,contracted_function);\n\n\t\t\t}\n//\t\t\tfor (size_t l = 0; l < exp_atom.size(); ++l) {\n//\t\t\t\tfor (const double e : exp_atom[l]) {\n//\t\t\t\t\tvirtuals=append(virtuals, guess_virtual_gaussian_shell(atom, l, e));\n//\t\t\t\t}\n//\t\t\t}\n\t\t}\n\t\ttime_2.stop().print(\"Creating Contracted Guess Basis\");\n\t\treturn virtuals;\n\t}\n\n\tvector_real_function_3d guess_with_psi4(const vector_real_function_3d& mos)const{\n\t\tMADNESS_EXCEPTION(\"Not there for new madness version\",1);\n\t}\n\n\t/// make guess virtuals by exciting with polynomials: v = poly*f\n\tvector_real_function_3d guess_with_exop(const vector_real_function_3d& f, const std::string& type=\"dipole+\", const bool trigo=true)const{\n\t\tif(world.rank()==0) std::cout << \"Create guess functions by multiplying plane-waves to \" << f.size() << \" functions \\n\";\n\t\tMADNESS_ASSERT(not f.empty());\n\n\t\tstd::vector<coord_3d> centers = guessfactory::compute_centroids(f);\n\t\tstd::vector<std::string> exop_list =  guessfactory::make_predefined_exop_strings(type);\n\n\n\n\t\t// make the list with seeds and excitation operators\n\t\tstd::vector<std::pair<vector_real_function_3d,std::string> > init_list;\n\n\t\tfor(const auto& exop:exop_list){\n\t\t\tvector_real_function_3d cs=copy(world,f,false);\n\t\t\tinit_list.push_back(std::make_pair(cs,exop));\n\t\t}\n\t\tworld.gop.fence();\n\n\t\tvector_real_function_3d virtuals;\n\t\tif(trigo) for(auto& it:init_list) virtuals=append(virtuals, guessfactory::apply_trigonometric_exop(it.first,it.second,centers,false));\n\t\telse for(auto& it:init_list){\n\t\t\tif(world.rank()==0) std::cout << \"polynomial guess!\\n\";\n\t\t\tvirtuals=append(virtuals, guessfactory::apply_polynomial_exop(it.first,it.second,centers,false));\n\t\t}\n\t\tworld.gop.fence();\n\n\t\treturn (virtuals);\n\t}\n\n\tvector_real_function_3d guess_virtuals_internal(const std::map<std::string, std::vector<int> > guess_map) const;\n\tvector_real_function_3d predefined_guess(const std::string name)const{\n\t\t// determine start zeta value\n\t\tsize_t start=0;\n\t\tbool empty=false;\n\t\tif(name==\"pvdz\") start=2;\n\t\telse if(name==\"pvtz\") start=3;\n\t\telse if(name==\"pvqz\") start=4;\n\t\telse if(name==\"pv5z\") start=5;\n\t\telse if(name==\"pv6z\") start=6;\n\t\telse if(name==\"pv7z\") start=7;\n\t\telse if(name==\"zero\" or name==\"0\" or name==\"void\" or name==\"none\" or name==\"empty\") empty=true;\n\t\telse MADNESS_EXCEPTION((\"unknown predefined guess:\"+name).c_str(),1);\n\n\t\tstd::map<std::string, std::vector<int> > guess_map;\n\t\tfor(const auto& atom :molecule.get_atoms()){// (int i = 0; i < nemo.molecule().natom(); ++i) {\n\t\t\tconst std::string symbol = atomic_number_to_symbol(atom.atomic_number);\n\t\t\tconst std::size_t n=atom.atomic_number;\n\t\t\tif(empty) guess_map[symbol]=std::vector<int>(lmax,0);\n\t\t\telse{\n\t\t\t\tif(n<3) guess_map[symbol]=fill_peterson(start); // first row\n\t\t\t\telse if(n<11) guess_map[symbol]=fill_peterson(start+1); // first row\n\t\t\t\telse if(n<19) guess_map[symbol]=fill_peterson(start+2); // third row\n\t\t\t\telse MADNESS_EXCEPTION(\"Predefined guesses only up to third row\",1);\n\t\t\t}\n\n\t\t}\n\t\treturn guess_virtuals_internal(guess_map);\n\t}\n\n\t// helper to fill up l numbers (Peterson Style)\n\tstd::vector<int> fill_peterson(const size_t& s)const{\n\t\tstd::vector<int> result(lmax,0);\n\t\tfor(size_t i=0;i<lmax;i++){\n\t\t\tconst int tmp=(s-i);\n\t\t\tif(tmp>0) result[i]=tmp;\n\t\t\telse result[i]=0;\n\t\t}\n\t\treturn result;\n\t}\n\n\t// helper to get vectors of right size\n\tstd::vector<int> fill_up(std::vector<int> v)const{\n\t\tstd::vector<int> result(lmax,0);\n\t\tfor(size_t i=0;i<(lmax>v.size() ? v.size() : lmax);++i) result[i]=v[i];\n\t\treturn result;\n\t}\n\n\t/// return a shell of l-quantum l and exponent e, including all cartesian\n\t/// components\n\tvector_real_function_3d guess_virtual_gaussian_shell(const Atom& atom, const int l, const double e) const;\n\n\t/// read external CABS\n\tstd::map<std::string, std::vector<std::vector<double> > > read_basis_from_file(const std::string& filename, const std::vector<madness::Atom> atoms) const;\n\tstd::vector<std::vector<double> > read_basis_from_file(const std::string& filename, const std::string& atom) const;\n\n\n\n\n\tstd::map<std::string, cbfT > read_contracted_basis_from_file(const std::string& filename, const std::vector<madness::Atom> atoms) const {\n\t\tstd::map<std::string, cbfT > molbas;\n\t\tfor (const madness::Atom& atom : atoms) {\n\t\t\tconst std::string symbol = atomic_number_to_symbol(atom.atomic_number);\n\t\t\tif (molbas.find(symbol) == molbas.end()) {\n\t\t\t\tcbfT tmpbas = read_contracted_basis_from_file(filename, symbol);\n\t\t\t\tmolbas[symbol] = tmpbas;\n\t\t\t}\n\t\t}\n\t\treturn molbas;\n\t}\n\n\tcbfT read_contracted_basis_from_file(const std::string& filename, const std::string& atom) const {\n\t\tstd::ifstream f(filename.c_str());\n\t\tposition_stream(f, atom);\n\t\tstd::string s;\n\t\tint n=-1;\n\t\tstd::string str_pw_guess, symbol;\n\t\tcbfT result;\n\t\tstd::size_t stars = 0;\n\t\twhile (f >> s) {\n\t\t\tif (s == \"*\") {\n\t\t\t\tf>>n; // initial step\n\t\t\t\t++stars;\n\t\t\t\tif (stars == 2)\n\t\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tn=std::stoi(s);\n\t\t\t\tMADNESS_ASSERT(n>0);\n\t\t\t}\n\t\t\tif(n>0){\n\t\t\t\tf>>s;\n\t\t\t\tif (s == \"s\" || s == \"p\" || s == \"d\" || s == \"f\" || s == \"g\" || s == \"h\" || s == \"i\" || s == \"k\") {\n\t\t\t\t\tstd::vector<double> exponents;\n\t\t\t\t\tstd::vector<double> coeff;\n\t\t\t\t\tfor(int i=0;i<n;++i){\n\t\t\t\t\t\tdouble ex,c;\n\t\t\t\t\t\tf>>ex;\n\t\t\t\t\t\tf>>c;\n\t\t\t\t\t\texponents.push_back(ex);\n\t\t\t\t\t\tcoeff.push_back(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tresult.push_back(std::make_tuple(lqtoint(s),exponents,coeff));\n\t\t\t\t} else MADNESS_EXCEPTION(\"UNKNOWN ANGULAR QUANTUM NUMBER\",1);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/// little helper function for l-quantum numbers\n\tsize_t lqtoint(const std::string& l) const;\n\n\tclass CartesianGaussian : public FunctionFunctorInterface<double, 3> {\n\tpublic:\n\t\tCartesianGaussian(const Atom& atom, const double e, const int i, const int j, const int k);\n\n\t\tdouble x, y, z;   ///< origin\n\t\tdouble exponent;  ///< exponent\n\t\tint i, j, k;      ///< cartesian exponents\n\n\t\tdouble operator()(const coord_3d& xyz) const {\n\t\t\tdouble xx = xyz[0] - x;\n\t\t\tdouble yy = xyz[1] - y;\n\t\t\tdouble zz = xyz[2] - z;\n\t\t\tconst double e = exponent * (xx * xx + yy * yy + zz * zz);\n\t\t\treturn pow(xx, i) * pow(yy, j) * pow(zz, k) * exp(-e);\n\t\t}\n\t};\n\n\t/// make a set of Cartesian Gaussian functions located on atom\n\n\t/// @param[in]  atom    where the Cartesian Gaussian function is located\n\t/// @param[in]  l       the l-quantum number\n\t/// @param[in]  exponent    exponent of the Cartesian Gaussian function\n\tstd::vector<CartesianGaussian> make_cartesian_guess(const Atom& atom, int l,\n\t\t\tconst double exponent) {\n\t\tstd::vector<CartesianGaussian> gg;\n\n\t\t// loop over all Cartesian components of l\n\t\tfor (int kx = l; kx >= 0; kx--) {\n\t\t\tfor (int ky = l - kx; ky >= 0; ky--) {\n\t\t\t\tint kz = l - kx - ky;\n\t\t\t\tgg.push_back(CartesianGaussian(atom, exponent, kx, ky, kz));\n\t\t\t}\n\t\t}\n\n\t\treturn gg;\n\t}\n\n\t/// real solid harmonic Gaussian\n\t/// \\note see https://en.wikipedia.org/wiki/Spherical_harmonics and https://en.wikipedia.org/wiki/Solid_harmonics\n\tclass SolidHarmonicGaussian : public FunctionFunctorInterface<double, 3> {\n\tpublic:\n\t\tSolidHarmonicGaussian(const Atom& atom, const double e, int l, int m)\n\t: x(atom.x), y(atom.y), z(atom.z), exponent(e), Z(atom.atomic_number), l(l), m(m) {}\n\n\t\tdouble x, y, z;   ///< origin\n\t\tdouble exponent;  ///< exponent\n\t\tdouble Z;\n\t\tint l, m;         ///< (real) solid harmonic quanta\n\n\t\ttemplate <typename T> int sgn(T val) const {\n\t\t\treturn (T(0) < val) - (val < T(0));\n\t\t}\n\n\t\tdouble operator ()(const coord_3d& xyz) const;\n\n\t\tstd::vector<coord_3d> special_points() const final {\n\t\t\tcoord_3d coord;\n\t\t\tcoord[0]=x;\n\t\t\tcoord[1]=y;\n\t\t\tcoord[2]=z;\n\t\t\treturn std::vector<coord_3d>(1,coord);\n\t\t}\n\n\t\tLevel special_level() const final {\n\t\t\tconst double width = 1.0/sqrt(2.0*exponent); //  with width of the gaussian\n\t\t\tconst int level = FunctionDefaults<3>::set_length_scale(width); // length scale for special points (center)\n\t\t\treturn level;\n\t\t}\n\t};\n\n\t/// make a set of Cartesian Gaussian functions located on atom\n\n\t/// @param[in]  atom    where the Cartesian Gaussian function is located\n\t/// @param[in]  l       the l-quantum number\n\t/// @param[in]  exponent    exponent of the Cartesian Gaussian function\n\tstd::vector<SolidHarmonicGaussian> make_solidharmonic_guess(const Atom& atom, int l,\n\t\t\tconst double exponent)const {\n\t\tstd::vector<SolidHarmonicGaussian> gg;\n\n\t\t// loop over all angular components of l\n\t\tfor(int m=-l; m<=l; ++m) {\n\t\t\tgg.push_back(SolidHarmonicGaussian(atom, exponent, l, m));\n\t\t}\n\n\t\treturn gg;\n\t}\n\n};\n\n}// namespace madness\n\n#endif /* PAPER_CODE_BASISFUNCTIONS_H_ */\n"
  },
  {
    "path": "src/madness/chem/PNOParameters.cpp",
    "content": "/*\n * PNOParameters.cpp\n *\n *  Created on: Sep. 9, 2019\n *      Author: jsk\n */\n\n#include <PNOParameters.h>\n\nnamespace madness {\n\nstd::ostream& operator << (std::ostream& os, const PairType& en){\n switch(en){\n case(UNKNOWN_PAIRTYPE):{ os << \"unknown\"; break;}\n case(MP2_PAIRTYPE):{ os << \"mp2\"; break;}\n case(CISPD_PAIRTYPE):{ os << \"cispd\"; break;}\n case(ALL_PAIRTYPE):{ os << \"all\"; break;}\n case(NONE_PAIRTYPE):{ os << \"none\"; break;}\n default :{ os << \"undefined enum in PairType\"; break;}\n}\nreturn os;\n}\n\nstd::istream& operator >> (std::istream& is, PairType& en){\n        std::string s;\n        is>>s;\n        std::transform(s.begin(), s.end(), s.begin(), ::toupper);\n        if(s==\"UNKNOWN_PAIRTYPE\") en=UNKNOWN_PAIRTYPE;\n        else if(s==\"MP2\") en=MP2_PAIRTYPE;\n        else if(s==\"CISPD\") en=CISPD_PAIRTYPE;\n        else if(s==\"ALL\") en=ALL_PAIRTYPE;\n        else if(s==\"NONE\") en=NONE_PAIRTYPE;\n        else MADNESS_EXCEPTION((\"unknown string to PairType conversion for s=\"+s).c_str(),1);\n        return is;\n}\nstd::ostream& operator << (std::ostream& os, const EnergyType& en){\n         switch(en){\n         case(UNKNOWN_ENERGYTYPE):{ os << \"unknown\"; break;}\n         case(PROJECTED_ENERGYTYPE):{ os << \"projected\"; break;}\n         case(HYLLERAAS_ENERGYTYPE):{ os << \"hylleraas\"; break;}\n         default :{ os << \"undefined enum in EnergyType\"; break;}\n        }\n        return os;\n}\nstd::istream& operator >> (std::istream& is, EnergyType& en){\n        std::string s;\n        is>>s;\n        std::transform(s.begin(), s.end(), s.begin(), ::toupper);\n        if(s==\"UNKNOWN_ENERGYTYPE\") en=UNKNOWN_ENERGYTYPE;\n        else if(s==\"PROJECTED\") en=PROJECTED_ENERGYTYPE;\n        else if(s==\"HYLLERAAS\") en=HYLLERAAS_ENERGYTYPE;\n        else MADNESS_EXCEPTION((\"unknown string to EnergyType conversion for s=\"+s).c_str(),1);\n        return is;\n}\nstd::ostream& operator << (std::ostream& os, const GuessType& en){\n         switch(en){\n         case(UNKNOWN_GUESSTYPE):{ os << \"unknown\"; break;}\n         case(PARTIAL_WAVE_GUESSTYPE):{ os << \"partial_wave\"; break;}\n         case(FROM_FILE_GUESSTYPE):{ os << \"from_file\"; break;}\n         case(PREDEFINED_GUESSTYPE):{ os << \"predefined\"; break;}\n         case(SCF_GUESSTYPE):{ os << \"scf\"; break;}\n         case(EXOP_GUESSTYPE):{ os << \"exop\"; break;}\n         case(EMPTY_GUESSTYPE):{ os << \"empty\"; break;}\n         case(PSI4_GUESSTYPE):{ os << \"psi4\"; break;}\n         default :{ os << \"undefined enum in GuessType\"; break;}\n        }\n        return os;\n}\n\nstd::istream& operator >> (std::istream& is, GuessType& en){\n\tstd::string s;\n\tis>>s;\n\tstd::transform(s.begin(), s.end(), s.begin(), ::toupper);\n\tif (s==\"UNKNOWN\") en = UNKNOWN_GUESSTYPE;\n\telse if (s==\"PARTIAL_WAVE\") en= PARTIAL_WAVE_GUESSTYPE;\n\telse if (s==\"FROM_FILE\") en= FROM_FILE_GUESSTYPE;\n\telse if (s==\"PREDEFINED\") en= PREDEFINED_GUESSTYPE;\n\telse if (s==\"SCF\") en= SCF_GUESSTYPE;\n\telse if (s==\"PARTIAL_WAVE\") en= PARTIAL_WAVE_GUESSTYPE;\n\telse if (s==\"EXOP\") en= EXOP_GUESSTYPE;\n\telse if (s==\"EMPTY\") en= EMPTY_GUESSTYPE;\n\telse if (s==\"PSI4\") en= PSI4_GUESSTYPE;\n\telse MADNESS_EXCEPTION((\"unknown string to GuessType conversion for s=\"+s).c_str(),1);\n\treturn is;\n\n}\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/PNOParameters.h",
    "content": "/*\n * PNOParameters.h\n *\n *  Created on: Sep. 9, 2019\n *      Author: jsk\n */\n\n#ifndef PNOPARAMETERS_H_\n#define PNOPARAMETERS_H_\n\n#include <vector>\n#include <map>\n#include<madness/chem/CalculationParameters.h>\n\nnamespace madness {\n\nenum PairType{MP2_PAIRTYPE,CISPD_PAIRTYPE,ALL_PAIRTYPE,NONE_PAIRTYPE,UNKNOWN_PAIRTYPE};\ninline std::string type(const PairType& n){ return \"PairType\";}\nstd::ostream& operator << (std::ostream& os, const PairType& en);\nstd::istream& operator >> (std::istream& os, PairType& en);\nenum EnergyType{PROJECTED_ENERGYTYPE,HYLLERAAS_ENERGYTYPE,UNKNOWN_ENERGYTYPE};\ninline std::string type(const EnergyType& n){ return \"EnergyType\";}\nstd::ostream& operator << (std::ostream& os, const EnergyType& en);\nstd::istream& operator >> (std::istream& os, EnergyType& en);\nenum GuessType{PARTIAL_WAVE_GUESSTYPE,FROM_FILE_GUESSTYPE,PREDEFINED_GUESSTYPE,SCF_GUESSTYPE,EXOP_GUESSTYPE,EMPTY_GUESSTYPE,PSI4_GUESSTYPE,UNKNOWN_GUESSTYPE};\ninline std::string type(const GuessType& n){ return \"GuessType\";}\nstd::ostream& operator << (std::ostream& os, const GuessType& en);\nstd::istream& operator >> (std::istream& is, GuessType& en);\n\nclass PNOParameters: public QCCalculationParametersBase {\npublic:\n\n\n\tstd::string get_tag() const override {\n\t\treturn std::string(\"pno\");\n\t}\n\n\ttemplate<typename T>\n\tT assign_from_string(const std::string& string)const{\n\t\tT result;\n\t\tstd::stringstream ss(string);\n\t\tss >> result;\n\t\treturn result;\n\t}\n\n\tPNOParameters() : QCCalculationParametersBase(){\n\t\tinitialize_pno_parameters();\n\t}\n\n\tPNOParameters(const QCCalculationParametersBase& param) : QCCalculationParametersBase(param){\n\t\tinitialize_pno_parameters();\n\t}\n\n\tPNOParameters(World& world, const commandlineparser& parser, const std::string& TAG=\"pno\") : QCCalculationParametersBase(){\n\t\tinitialize_pno_parameters();\n\t\tQCCalculationParametersBase::read_input_and_commandline_options(world,parser,TAG);\n\t}\n\n\tPNOParameters(World& world, const commandlineparser& parser, const Molecule& molecule, const std::string& TAG=\"pno\") : QCCalculationParametersBase(){\n\t\tinitialize_pno_parameters();\n\t\tQCCalculationParametersBase::read_input_and_commandline_options(world,parser,TAG);\n\t\tset_derived_values(molecule);\n\t}\n\n\tvoid initialize_pno_parameters() {\n\t\tinitialize<int>(\"rank_increase\", 15 , \"maximum rank to increase in every macroiteration\");\n\t\tinitialize<int>(\"chunk\", 100 , \"chunk of functions operated on in parallel when G or K is applied (prevent memory shortage)\");\n\t\tinitialize<bool>(\"debug\",false, \"debug mode\");\n\t\tinitialize<std::size_t>(\"freeze\",0, \"frozen core approximation\");\n\t\tinitialize<int>(\"maxrank\", 999, \"maximal pno rank for all pairs\");\n\t\tinitialize<std::string>(\"guesstype\",\"exop\", \"the guesstype: exop (recommended, multiply polynomial excitation operators onto the occupied orbitals), empty (don't compute a guess), scf (use the ao basis from the SCF solver), partial_wave (create s,p,d ..., type functions and place on atoms), predefined (same as partial_wave but for predefined sets) \");\n\t\tinitialize<std::string>(\"exop\", \"multipole\", \"this string defines which excitation operators can be used, use 'dipole', 'dipole+', 'quadrupole', 'ocopole', or 'multipole', need to set guesstype to 'exop' which is the default \");\n\t\tinitialize<bool>(\"exop_trigo\", true, \"use trigonometric excitation operators ( x --> sin(x) \");\n\t\tinitialize<std::string>(\"partial_wave\", \"\", \"atom centered partial wave guess of format like 'h-2s1p-o-3s2p1d', need to set guesstype to 'partial_wave' and adaptive_solver to 'none' \");\n\t\tinitialize<std::string>(\"predefined\", \"\", \"predefined partial wave guesses of type pvxz with x=d,t,q,5,6, need to set guesstype to 'predefined' and adaptive_solver to 'none'\");\n\t\tinitialize<int>(\"maxiter_t\",100, \"maximal number of iterations in the amplitude solver\");\n\t\tinitialize<int>(\"maxiter_micro\",10, \"Maximum of iterations for every cycle in the adaptive solver\");\n\t\tinitialize<int>(\"maxiter_macro\",10, \"Maximum of iterations of cycles in the adaptive solver\");\n\t\tinitialize<double>(\"tpno\", 1.e-8, \"PNO cutoff threshold\");\n\t\tinitialize<double>(\"tpno_tight\",1.e-10, \"PNO cutoff for the first iteration\");\n\t\tinitialize<bool>(\"canonicalize_pno\",true, \"canonicalize the pnos before the amplitude solver\");\n\t\tinitialize<double>(\"thresh\", 1.e-3, \"MRA threshold\");\n\t\tinitialize<double>(\"econv_micro\",1.e-3, \"Energy convergence for microiterations (Greens function based optimization) in adaptive solver\");\n\t\tinitialize<double>(\"econv_pairs\",1.e-4, \"ENergy convergence for individual pairs in adaptive solver. Converged pairs are frozen automatically\");\n\t\tinitialize<double>(\"econv_macro\",1.e-3, \"Energy convergence for macroiterations in adaptive solver, no effect if adaptive_solver is deactivated\");\n\t\tinitialize<double>(\"dconv\",1.e-1, \"convergence of every PNO in the Green's function solver\");\n\t\tinitialize<double>(\"op_thresh\",1.e-6, \"MRA operator thresh\");\n\t\tinitialize<std::string>(\"restart\",\"none\", \"restart pairs of this type, use 'mp2', 'cispd', 'all' or 'none' \");\n\t\tinitialize<std::string>(\"no_compute\",\"none\", \"do not compute the pairs of this type, use 'mp2', 'cispd', 'all' or 'none' \");\n\t\tinitialize<std::string>(\"no_opt\",\"none\", \"do not optimize the pnos of this type, use 'mp2', 'cispd', 'all' or 'none' \");\n\t\tinitialize<std::string>(\"no_guess\",\"none\", \"guess for this type will be empty, use 'mp2', 'cispd', 'all' or 'none' \");\n\t\tinitialize<std::string>(\"adaptive_solver\",\"all\", \"Use adaptive solver for those pairs, use 'mp2', 'cispd', 'all' or 'none', works only in combination with guesstype 'exop' \");\n\t\tinitialize<bool>(\"kain\", true, \"use KAIN solver in amplitude solver\");\n\t\tinitialize<std::size_t>(\"kain_subspace\", 5 , \"subspace size of the KAIN solver (amplitudes)\");\n\t\tinitialize<bool>(\"f12\",true, \"use explicit correlation\");\n\t\tinitialize<int> (\"cispd_number\", -1, \"CIS(D) excitation numbers, to read in correct functions\" );\n\t\tinitialize<double> (\"cispd_energy\", 0.0, \"CIS energy\" );\n\t\tinitialize<std::string> (\"freeze_pairs\", \"none\", \"frozen pairs will not be optimized: Expected format 'a b c d' will freeze pairs ab and cd\");\n\t\tinitialize<std::vector<int> >(\"freeze_pairs_of_orbital\",std::vector<int>(), \" All pairs which originate from this orbital will not be optimized\");\n\t\tinitialize<std::vector<int> >(\"active_pairs_of_orbital\",std::vector<int>(), \" All pairs which originate from this orbital will not be frozen all other pairs will, if this vector is not empty\");\n\t\tinitialize<bool>(\"no_opt_in_first_iteration\", false, \"Do not optimize in the first iteration (then the potentials do not have to be evaluated, use this for large guesses)\");\n\t\tinitialize<std::string>(\"exchange\", \"full\", \"approximate exchange with 'neglect' or xc functional -> same syntax as moldft\");\n\t\tinitialize<bool>(\"save_pnos\",true, \"Save the OBS-PNOs to a file, before and after orthonormalization.\");\n\t\tinitialize<bool>(\"diagonal\", false, \"Compute only diagonal PNOs\");\n\t}\n\n\tvoid set_derived_values(const Molecule& molecule) {\n\n\t\t// auto determine freeze parameter for the first two shells\n\t\t// deactivate by setting freeze 0 or any other value in the input file\n\t\tsize_t freeze = 0;\n\t\tfor(const Atom& atom: molecule.get_atoms()){\n\t\t\tif (atom.atomic_number < 3){\n\t\t\t\t// no frozen core for H and He\n\t\t\t}else if(atom.atomic_number < 11){\n\t\t\t\tfreeze += 1;\n\t\t\t}else if(atom.atomic_number < 19){\n\t\t\t\tfreeze += 5;\n\t\t\t}\n\t\t\t// beyond this point the parameter is better set manually\n\t\t}\n\t\tset_derived_value(\"freeze\", freeze);\n\n\t\tset_derived_value(\"no_guess\", get<std::string >(\"no_compute\"));\n\t\tset_derived_value(\"restart\", get<std::string>(\"no_compute\"));\n\t\tset_derived_value(\"tpno_tight\", 0.01*tpno());\n\n\t\t// set default values for adaptive solver\n\t\tif(adaptive_solver()){\n\t\t\tconst std::string gt = \"exop\";\n\t\t\tconst std::string ex = \"multipole\";\n\t\t\tset_derived_value(\"guesstype\", gt);\n\t\t\tset_derived_value(\"exop\", ex);\n\t\t\tset_derived_value(\"econv_macro\", thresh());\n\t\t\tset_derived_value(\"econv_micro\", thresh());\n\t\t\tset_derived_value(\"econv_pairs\", 0.1*thresh());\n\t\t}\n\n\t}\n\n\tstd::vector<std::pair<int,int> > freeze_pairs()const{\n\t\tconst std::string str=get<std::string >(\"freeze_pairs\");\n\t\tstd::vector<std::pair<int,int> > result;\n\t\tif (str==\"none\"){\n\t\t\treturn result;\n\t\t}\n\t\tstd::stringstream ss(str);\n\t\tint i,j;\n\t\twhile(ss>>i){\n\t\t\tss>>j;\n\t\t\tresult.push_back(std::make_pair(i,j));\n\t\t}\n\t\treturn result;\n\t}\n\tbool diagonal()const {return get<bool>(\"diagonal\");}\n\tbool save_pnos()const { return get<bool >(\"save_pnos\");}\n\tstd::string exchange()const {return get<std::string>(\"exchange\");}\n\tbool exop_trigo()const { return get<bool >(\"exop_trigo\");}\n\tint rank_increase()const { return get<int >(\"rank_increase\");}\n\tint chunk()const { return get<int >(\"chunk\");}\n\tstd::vector<std::vector<double> > protocol()const { return get<std::vector<std::vector<double> > >(\"protocol\");}\n\tbool debug()const { return get<bool >(\"debug\");}\n\tstd::size_t freeze()const { return get<std::size_t >(\"freeze\");}\n\tint maxrank()const { return get<int >(\"maxrank\");}\n\tGuessType guesstype()const { return assign_from_string<GuessType>(get<std::string >(\"guesstype\"));}\n\tstd::string exop()const { return get<std::string >(\"exop\");}\n\tstd::map<std::string, std::vector<int> >partial_wave(const std::string& key = \"partial_wave\")const {\n\t\t// return format atom-name, vector of numbers giving S, P, D, ... functions\n\t\tstd::string str=get<std::string >(key);\n\t\tstd::transform(str.begin(), str.end(), str.begin(), ::tolower);\n\t\t// madness parameter format does not allow blancs so we use '-' and transform them here\n\t\tstd::replace(str.begin(), str.end(), '-', ' ');\n\t\t// expected input format: atom-name-3s2p1d atom-name-XsYpZd...\n\t\tstd::stringstream ss(str);\n\t\tstd::string symbol, pw_string;\n\t\tstd::map<std::string, std::vector<int> > result;\n\t\twhile(ss>>symbol){\n\t\t\tss>>pw_string;\n\t\t\tstd::vector<int> numbers(pw_string.size()/2);\n\t\t\tstd::vector<char> control = {'s', 'p', 'd', 'f', 'g', 'h', 'i', 'k'};\n\t\t\tfor (size_t i=0; i<pw_string.size()/2; ++i){\n\t\t\t\tchar l = pw_string[2*i+1];\n\t\t\t\tchar n = pw_string[2*i];\n\t\t\t\tMADNESS_ASSERT(l==control[i]);\n\t\t\t\tnumbers[i]=(n-'0'); // need to convert ascii to int\n\t\t\t}\n\t\t\tresult[symbol] = numbers;\n\t\t}\n\t\treturn result;\n\t}\n\tstd::string predefined_guess()const{ return get<std::string >(\"predefined\");}\n\tint maxiter()const { return maxiter_micro();}\n\tint maxiter_t()const { return get<int >(\"maxiter_t\");}\n\tdouble tpno()const { return get<double >(\"tpno\");}\n\tdouble tpno_tight()const { return get<double >(\"tpno_tight\");}\n\tbool canonicalize_pno()const { return get<bool >(\"canonicalize_pno\");}\n\tdouble thresh()const { return get<double >(\"thresh\");}\n\tdouble dconv()const { return get<double >(\"dconv\");}\n\tdouble op_thresh()const { return get<double >(\"op_thresh\");}\n\tPairType restart()const {return assign_from_string<PairType>(get<std::string >(\"restart\"));}\n\tPairType no_compute()const { return assign_from_string<PairType>(get<std::string >(\"no_compute\"));}\n\tPairType no_opt()const { return assign_from_string<PairType>(get<std::string >(\"no_opt\"));}\n\tPairType no_guess()const { return assign_from_string<PairType>(get<std::string >(\"no_guess\"));}\n\tbool kain()const { return get<bool >(\"kain\");}\n\tstd::size_t kain_subspace()const { return get<std::size_t >(\"kain_subspace\");}\n\tbool f12()const { return get<bool >(\"f12\");}\n\tstd::vector<std::pair<int,double> > cispd()const {\n\t\t// workaround new madness data format, can only do one excitation energy each run for now\n\t\tconst int number = get<int >(\"cispd_number\");\n\t\tconst double energy = get<double >(\"cispd_energy\");\n\t\tif (number < 0){\n\t\t\treturn std::vector<std::pair<int,double> >();\n\t\t}\n\t\telse{\n\t\t\treturn std::vector<std::pair<int,double> >(1,std::make_pair(number, energy));\n\t\t}\n\t}\n\tstd::vector<int> freeze_pairs_of_orbital()const { return get<std::vector<int> >(\"freeze_pairs_of_orbital\");}\n\tstd::vector<int> active_pairs_of_orbital()const { return get<std::vector<int> >(\"active_pairs_of_orbital\");}\n\tPairType adaptive_solver()const { return assign_from_string<PairType>(get<std::string >(\"adaptive_solver\"));}\n\tdouble econv()const { return econv_micro();}\n\tdouble econv_pairs()const { return get<double >(\"econv_pairs\");}\n\tdouble econv_micro()const { return get<double >(\"econv_micro\");}\n\tdouble econv_macro()const { return get<double >(\"econv_macro\");}\n\tint maxiter_micro()const { return get<int >(\"maxiter_micro\");}\n\tint maxiter_macro()const { return get<int >(\"maxiter_macro\");}\n\tbool no_opt_in_first_iteration()const { return get<bool >(\"no_opt_in_first_iteration\");}\n\n\n};\n\nclass F12Parameters: public PNOParameters {\npublic:\n\tF12Parameters(const PNOParameters& param) : PNOParameters(param){\n\t\tinitialize_f12_parameters();\n\t}\n\n\tF12Parameters(World& world, const commandlineparser& parser, const PNOParameters& param, const std::string& TAG=\"pno\") : PNOParameters(param){\n\t\tinitialize_f12_parameters();\n\t\tQCCalculationParametersBase::read_input_and_commandline_options(world,parser,TAG);\n\t}\n\n\tstd::string get_tag() const override {\n\t\treturn std::string(\"f12\");\n\t}\n\n\n\tvoid initialize_f12_parameters() {\n\t\tinitialize<bool>(\"abs_c\",true, \" use auxilliary basis on f12Q[Kf12] part of energy (only if energytype is HYLLERAAS_ENERGYTYPE). If switched off the part neglected!\");\n\t\tinitialize<bool>(\"abs_u\",false, \" use auxilliary basis on f12QUe part of energy (only if energytype is HYLLERAAS_ENERGYTYPE). If switched off the part is computed in full (recommended) \");\n\t\tinitialize<double>(\"cabs_thresh\",1.e-4, \" thresh for auxbasis part in f12 energy \");\n\t\tinitialize<std::string>(\"energytype\", \"projected\", \" the energytype is 'projected' or 'hylleraas' functional projected energies do not need auxilliary bases for the evaluation of the f12 energy. It's recommended to use projected_energies! For Hylleraas type you need to specify an auxbas from file OR internal\");\n\t\tinitialize<double>(\"gamma\",1.4, \"The f12 length scale\");\n\t\tinitialize<std::string>(\"auxbas\", \"none\", \"atom centered partial wave guess of format like 'h-2s1p-o-3s2p1d' \");\n\t\tinitialize<std::string>(\"auxbas_file\", \"none\", \" use external comp. aux. basis in addition to the pnos as auxbasis. Give the filename as parameter. Give the auxbas in turbomole format. Don't use contractions. If a file is specified the auxbas parameter has no effect\");\n\t}\n\n\tbool f12()const { return get<bool >(\"f12\");}\n\tbool abs_c()const { return get<bool >(\"abs_c\");}\n\tbool abs_u()const { return get<bool >(\"abs_u\");}\n\tdouble cabs_thresh()const { return get<double >(\"cabs_thresh\");}\n\tstd::string auxbas_file()const {\n\t\treturn get<std::string >(\"auxbas_file\");\n\t}\n\tEnergyType energytype()const {\n\t\tstd::string key = get<std::string>(\"energytype\");\n\t\tstd::transform(key.begin(), key.end(), key.begin(), ::tolower);\n\t\tstd::stringstream ss(key);\n\t\tEnergyType result = UNKNOWN_ENERGYTYPE;\n\t\tss >> result;\n\t\tMADNESS_ASSERT(result != UNKNOWN_ENERGYTYPE);\n\t\treturn result;\n\t}\n\tdouble gamma()const { return get<double >(\"gamma\");}\n\tstd::map<std::string,std::vector<int> > auxbas()const {\n\t\treturn partial_wave(\"auxbas\");\n\t}\n\n\tvoid set_derived_values() {\n\t\tif(energytype() == HYLLERAAS_ENERGYTYPE) set_derived_value(\"abs_c\", true);\n\t\tif(energytype() == HYLLERAAS_ENERGYTYPE) set_derived_value(\"abs_u\", false);\n\t\tset_derived_value(\"cabs_thresh\", thresh());\n\t}\n\n};\n\n} /* namespace madness */\n\n#endif /* PNOPARAMETERS_H_ */\n"
  },
  {
    "path": "src/madness/chem/PNOStructures.cpp",
    "content": "/*\n * PNOStructures.cpp\n *\n *  Created on: Oct 24, 2018\n *      Author: kottmanj\n */\n\n#include <PNOStructures.h>\n\nnamespace madness {\n\n/// inner product for std::valarray\ndouble inner(const std::valarray<double>& bra, const std::valarray<double>& ket) {\n\tassert(bra.size() == ket.size());\n\tconst auto n = bra.size();\n\tdouble result = 0;\n\tconst auto* bra_data = &bra[0];\n\tconst auto* ket_data = &ket[0];\n\tfor (size_t i = 0; i != n; ++i, ++bra_data, ++ket_data)\n\t\tresult += *bra_data * *ket_data;\n\treturn result;\n}\n\nPairEnergies PairEnergies::operator +=(const PairEnergies& right) {\n\tMADNESS_ASSERT(eijs.size() == right.eijs.size());\n\tMADNESS_ASSERT(eijt.size() == right.eijt.size());\n\tMADNESS_ASSERT(eijs_f12.size() == right.eijs_f12.size());\n\tMADNESS_ASSERT(eijt_f12.size() == right.eijt_f12.size());\n\tMADNESS_ASSERT(eij.size() == right.eij.size());\n\teijs += right.eijs;\n\teijt += right.eijs;\n\teijs_f12 += right.eijs_f12;\n\teijt_f12 += right.eijt_f12;\n\teij += right.eij;\n\tenergy += right.energy;\n\tenergy_f12 += right.energy_f12;\n\treturn *this;\n}\n\nPairEnergies PairEnergies::operator +(const PairEnergies& right) const {\n\tPairEnergies result(eij.size());\n\tMADNESS_ASSERT(result.eijs.size() == right.eijs.size());\n\tMADNESS_ASSERT(result.eijt.size() == right.eijt.size());\n\tMADNESS_ASSERT(result.eijs_f12.size() == right.eijs_f12.size());\n\tMADNESS_ASSERT(result.eijt_f12.size() == right.eijt_f12.size());\n\tMADNESS_ASSERT(result.eij.size() == right.eij.size());\n\tresult.eijs = eijs + right.eijs;\n\tresult.eijt = eijt + right.eijt;\n\tresult.eijs_f12 = eijs_f12 + right.eijs_f12;\n\tresult.eijt_f12 = eijt_f12 + right.eijt_f12;\n\tresult.eij = eij + right.eij;\n\tresult.energy = energy + right.energy;\n\tresult.energy_f12 = energy_f12 + right.energy_f12;\n\treturn result;\n}\n\nElectronPairIterator& ElectronPairIterator::operator ++() {\n\tif (finished_)\n\t\treturn *this;\n\telse {\n\t\tif (j_ < i_)\n\t\t\t++j_;\n\t\telse if (i_ < (stop_ - 1)) {\n\t\t\t++i_;\n\t\t\tj_ = start_;\n\t\t} else\n\t\t\tfinished_ = true;\n\t}\n\t++ij_;\n\t// check consistency with pno-mp2.cc code\n\tif (!finished_)\n\t\tMADNESS_ASSERT(ij_ == tridx(i_, j_)); //-offset_);\n\n\treturn *this;\n}\n\nbool PNOPairs::is_consistent(std::string& errm) const {\n\tif (npairs!=nocc*(nocc+1)/2) {\n\t\terrm = \"PNOPairs: size inconsistency between nocc and npairs\";\n\t\treturn false;\n\t}\n\tif (pno_ij.size() != npairs) {\n\t\terrm = \"PNOPairs: size inconsistency between pno_ij and npairs\";\n\t\treturn false;\n\t}\n\tif (pno_ij.size() != t_ij.size()) {\n\t\terrm = \"PNOPairs: size inconsistency between pno_ij and t_ij\";\n\t\treturn false;\n\t}\n\tif (pno_ij.size() != frozen_ij.size()) {\n\t\terrm = \"PNOPairs: size inconsistency between pno_ij and frozen_ij\";\n\t\treturn false;\n\t}\n\tif (pno_ij.size() != maxranks_ij.size()) {\n\t\terrm = \"PNOPairs: size inconsistency between pno_ij and maxranks_ij\";\n\t\treturn false;\n\t}\n\tif (type == UNKNOWN_PAIRTYPE) {\n\t\terrm = \"PNOPair: pairtype is not determined\";\n\t\treturn false;\n\t}\n\tif (type == CISPD_PAIRTYPE && !cis.initialized()) {\n\t\terrm = \"PNOPair: CIS(D) pairtype but CIS was not initialized\";\n\t\treturn false;\n\t}\n\tif (type != CISPD_PAIRTYPE && cis.initialized()) {\n\t\terrm = \"PNOPair: CIS initialized but pairtype is not CIS(D)\";\n\t\treturn false;\n\t}\n\tif (pno_ij.size() != Kpno_ij.size()) {\n\t\terrm = \"PNOPairs: size inconsistency between pno_ij and Kpno_ij\";\n\t\treturn false;\n\t}\n\tif (pno_ij.size() != W_ij.size()) {\n\t\terrm = \"PNOPairs: size inconsistency between pno_ij and W_ij\";\n\t\treturn false;\n\t}\n\tif (pno_ij.size() != F_ij.size()) {\n\t\terrm = \"PNOPairs: size inconsistency between pno_ij and F_ij\";\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nvecfuncT ParametrizedExchange::operator ()(const vecfuncT& vket,\n\t\tconst double& mul_tol) const {\n\tif (type == \"neglect\") {\n\t\treturn zero_functions<double, 3>(world, vket.size());\n\t} else if (type == \"full\") {\n//\t\treturn K(vket, mul_tol);\n        print(\"set mul_tol =0\");\n\t\treturn K(vket);\n\n\t} else {\n\t\t// Occupation numbers\n\t\tconst Tensor<double> occ = nemo.get_calc()->get_aocc();\n\t\t// Closed shell full density of the nemo orbitals (without any nuclear cusps)\n\t\tconst real_function_3d nemo_density = 2.0\n\t\t\t\t* nemo.make_density(occ, nemo.get_calc()->amo);\n\t\t// Real Alpha density (with nuclear cusps)\n\t\tconst real_function_3d alpha_density = 0.5 * nemo.R_square\n\t\t\t\t* nemo_density;\n\t\tstd::string xc_data = type;\n\t\txc_data = xc_data.erase(0, xc_data.find_first_not_of(\" \"));\n\t\txc_data = xc_data.erase(xc_data.find_last_not_of(\" \") + 1);\n\t\tconst XCOperator<double,3> xc(world, xc_data,\n\t\t\t\t!nemo.get_calc()->param.spin_restricted(), alpha_density,\n\t\t\t\talpha_density);\n\t\treal_function_3d xc_pot = xc.make_xc_potential();\n\t\treturn xc_pot * vket;\n\t}\n}\n\nvoid PNOPairs::initialize(const std::size_t& nocc) {\n\tconst size_t n = nocc * (nocc + 1) / 2;\n\tpno_ij = std::valarray<vector_real_function_3d>(n);\n\tt_ij = std::valarray<Tensor<double> >(\n\t\t\tTensor<double>(std::vector<long>(2, 0)), n);\n\tW_ij = std::valarray<Tensor<double> >(\n\t\t\tTensor<double>(std::vector<long>(2, 0)), n);\n\tF_ij = std::valarray<Tensor<double> >(\n\t\t\tTensor<double>(std::vector<long>(2, 0)), n);\n\tmaxranks_ij = std::valarray<int>(-1, n);\n\tfrozen_ij = std::valarray<bool>(false, n);\n\tenergies = PairEnergies(n);\n\tKpno_ij = std::valarray<vector_real_function_3d>(n);\n\tW_ij_i = std::valarray<vector_real_function_3d>(n);\n\tW_ij_j = std::valarray<vector_real_function_3d>(n);\n}\n\nPNOPairs PNOPairs::operator =(const PNOPairs& other) {\n\tMADNESS_ASSERT(type == other.type);\n\tpno_ij = other.pno_ij;\n\tt_ij = other.t_ij;\n\tfrozen_ij = other.frozen_ij;\n\tmaxranks_ij = other.maxranks_ij;\n\tenergies = other.energies;\n\treturn *this;\n}\n\nstd::string PNOPairs::name(\n\t\tconst ElectronPairIterator& it) const {\n\tstd::string pre;\n\tstd::stringstream ss;\n\tss << type;\n\tss >> pre;\n\treturn pre + \"_\" + it.name();\n}\n\nvector_real_function_3d PNOPairs::extract(const vfT& vf) const {\n\tvector_real_function_3d result;\n\tfor (size_t ij = 0; ij < pno_ij.size(); ++ij) {\n\t\tif (frozen_ij[ij])\n\t\t\tcontinue;\n\t\telse\n\t\t\tresult = append(result, vf[ij]);\n\t}\n\treturn result;\n}\n\nPNOPairs::vfT PNOPairs::reassemble(\n\t\tconst vector_real_function_3d& v, vfT& result) const {\n\tMADNESS_ASSERT(result.size() == npairs);\n\tif (v.empty())\n\t\treturn result;\n\n\tauto itv = v.begin();\n\tfor (size_t ij = 0; ij < pno_ij.size(); ++ij) {\n\t\tif (frozen_ij[ij])\n\t\t\tcontinue;\n\n\t\tconst auto& x = pno_ij[ij];\n\t\tMADNESS_ASSERT(itv < v.end());\n\t\tresult[ij] = vector_real_function_3d(itv, itv + x.size());\n\t\titv += x.size();\n\t}\n\tMADNESS_ASSERT(result.size() == npairs);\n\treturn result;\n}\n\nvoid PNOPairs::clear_intermediates(const ElectronPairIterator& it) {\n\tS_ij_ik.reset();\n\tS_ij_kj.reset();\n\tKpno_ij[it.ij()].clear();\n\tW_ij_i[it.ij()].clear();\n\tW_ij_j[it.ij()].clear();\n\tif (frozen_ij[it.ij()] == false)\n\t\tW_ij[it.ij()] = Tensor<double>(std::vector<long>(2, 0));\n\n\tif (frozen_ij[it.ij()] == false)\n\t\tF_ij[it.ij()] = Tensor<double>(std::vector<long>(2, 0));\n\n\tif (frozen_ij[it.ij()] == false)\n\t\tt_ij[it.ij()] = Tensor<double>(std::vector<long>(2, 0));\n\n\tupdate_meminfo();\n}\n\nPNOPairs::MemInfo PNOPairs::update_meminfo() const {\n\tmeminfo = MemInfo();\n\tif (pno_ij.size() > 0 && pno_ij[0].size() > 0\n\t\t\t&& pno_ij[0][0].is_initialized()) {\n\t\tWorld& world = pno_ij[0][0].world();\n\t\tmeminfo.pno = get_size(world, extract(pno_ij));\n\t\tmeminfo.Kpno = get_size(world, extract(Kpno_ij));\n\t\tmeminfo.W = get_size(world, extract(W_ij_i))\n\t\t\t\t+ get_size(world, extract(W_ij_j));\n\t}\n\treturn meminfo;\n}\n\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/PNOStructures.h",
    "content": "/*\n * PNOStructures.h\n *\n *  Created on: Oct 24, 2018\n *      Author: kottmanj\n */\n\n#ifndef PAPER_CODE_PNOSTRUCTURES_H_\n#define PAPER_CODE_PNOSTRUCTURES_H_\n\n#include <valarray>\n#include <string>\n\n#include<madness/chem/PNOParameters.h>\n#include<madness/chem/PNOTensors.h>\n#include <madness/world/madness_exception.h>\n#include <madness.h>\n\n/// this block needs to be known before nonlinsol.h is included (happens when nemo is included)\n/// better move this to nonlinsol.h\nnamespace madness {\n/// inner product for std::valarray\ndouble inner(const std::valarray<double>& bra, const std::valarray<double>& ket);\n// KAIN allocator for std::valarray\nstruct valarray_allocator{\n\tconst size_t dim;\n\n\tvalarray_allocator(const size_t& indim) : dim(indim)  {};\n\n\tstd::valarray<double> operator()(){\n\t\treturn std::valarray<double>(dim);\n\t}\n\tvalarray_allocator operator=(const valarray_allocator &other){\n\t\tvalarray_allocator tmp(other.dim);\n\t\treturn tmp;\n\t}\n\n};\n}\n\n\n#include<madness/chem/nemo.h>\nnamespace madness {\n\nclass ParametrizedExchange {\npublic:\n\tParametrizedExchange(World & world, const Nemo& nemo_, const std::string& type_):\n\tworld(world),\n\tnemo(nemo_),\n\ttype(type_),\n\tK(Exchange<double,3>(world, &nemo, 0))\n\t{\n\n\t}\n\n\tWorld& world;\n\tconst Nemo& nemo;\n\tconst std::string type;\n\tExchange<double,3> K;\n\n    real_function_3d operator()(const real_function_3d& ket) const {\n        vecfuncT vket(1,ket);\n        vecfuncT vKket=this->operator()(vket);\n        return vKket[0];\n    }\n\n\tvecfuncT operator ()(const vecfuncT& vket,\n\t\t\tconst double& mul_tol = 0.0) const;\n\n\n\n};\n\n/// Timer structure\nstruct MyTimer{\n\tWorld& world;\n\tmutable double wstart_, cstart_;\n\tmutable double wstop_, cstop_;\n\tmutable double wtime_, ctime_;\n\tmutable std::string msg_;\n\n\tMyTimer(World& world): world(world), wstart_(-1.0),cstart_(-1.0),wstop_(-1.0),cstop_(-1.0),wtime_(-1.0),ctime_(-1.0){}\n\tMyTimer start()const{\n\t\tworld.gop.fence();\n\t\twstart_ = wall_time();\n\t\tcstart_ = cpu_time();\n\t\treturn *this;\n\t}\n\tMyTimer stop(){\n\t\twstop_ = wall_time();\n\t\tcstop_ = cpu_time();\n\t\twtime_ = wstop_ - wstart_;\n\t\tctime_ = cstop_ - cstart_;\n\t\treturn *this;\n\t}\n\tMyTimer print(const std::string& msg)const{\n\t\tmsg_=msg;\n\t\tif(world.rank()==0){\n\t\t\tprintf(\"timer: %40.40s %8.2fs %8.2fs \\n\", msg.c_str(), wtime_, ctime_);\n\t\t}\n\t\treturn *this;\n\t}\n\tMyTimer print()const{\n\t\tif(world.rank()==0){\n\t\t\tprintf(\"timer: %40.40s %8.2fs %8.2fs \\n\", msg_.c_str(), wtime_, ctime_);\n\t\t}\n\t\treturn *this;\n\t}\n};\n\n/// POD structure for energies\nstruct PairEnergies{\n\tPairEnergies(){}\n\tPairEnergies(const size_t& npairs): eijs(npairs),eijt(npairs),eijs_f12(npairs),eijt_f12(npairs),eij(npairs),energy(0.0),energy_f12(0.0){}\n\n\tstd::valarray<double> eijs; ///< singlet pair energies (for CIS(D) the GS Part)\n\tstd::valarray<double> eijt; ///< triplet pair energies (for CIS(D) the ES Part)\n\tstd::valarray<double> eijs_f12; ///< singlet f12 pair energies (for CIS(D) the GS Part)\n\tstd::valarray<double> eijt_f12; ///< triplet f12 pair energies (for CIS(D) the ES Part)\n\tstd::valarray<double> eij; ///< total pair energies\n\tdouble energy=0.0; ///<total correlation energy (regularized Energy for f12 calculation)\n\tdouble energy_f12=0.0; ///< total f12 correlation energy\n\tdouble total_energy()const{return energy+energy_f12;}\n\n\tPairEnergies operator +=(const PairEnergies& right);\n\n\tPairEnergies operator +(const PairEnergies& right) const;\n\n\tvoid update(){\n\t\tenergy=0.0;\n\t\tenergy_f12=0.0;\n\t\tfor(size_t ij=0;ij<eij.size();++ij){\n\t\t\tconst double ereg_ij=eijs[ij]+eijt[ij];\n\t\t\tconst double ef12_ij=eijs_f12[ij]+eijt_f12[ij];\n\t\t\tenergy+=ereg_ij;\n\t\t\tenergy_f12+=ef12_ij;\n\t\t\teij[ij]=ereg_ij+ef12_ij;\n\t\t}\n\t}\n};\n\n/// iterates the third index for pair coupling\nstruct OrbitalIterator{\nprivate:\n\tsize_t i_;\n\tconst size_t start_;\n\tconst size_t stop_;\n\tbool finished_;\n\tconst size_t freeze_;\npublic:\n\tsize_t i()const {return i_;}\n\n\tOrbitalIterator(const size_t &nocc, const size_t &freeze): i_(0), start_(0),stop_(nocc-freeze),finished_(false),freeze_(freeze) {}\n\n\toperator bool() const{ return !finished_;}\n\n\tOrbitalIterator& operator ++(){\n\t\tif(i_<(stop_-1)) ++i_;\n\t\telse finished_=true;\n\t\treturn *this;\n\t}\n\n\t// gives real index (if some orbtials are frozen)\n\tstd::string name()const {return std::to_string(i_+start_);}\n\n        size_t freeze() const {return freeze_;} // mostly to con the compiler that freeze_ is used\n};\n\n/// Iterator over pairs\n/// iterates (i,j) from i=start to i<stop and j=i to j<stop\n/// iterates like the pno-mp2.cc code\n/// For frozen orbitals iteration goes from 0 to nocc-freeze !!! (consistency with pno-mp2.cc code)\n/// The name() function gives back the \"real\" pair number\nstruct ElectronPairIterator{\n\n\tElectronPairIterator(const size_t& nocc, const size_t& freeze):\n\t\tstop_(nocc-freeze),\n\t\tfreeze_(freeze)\n\t{MADNESS_ASSERT(start_<stop_);}\n\n\t/// check if iteration has to proceed\n\toperator bool() const {\n\t\treturn !finished_;\n\t}\n\n\t/// Gives the number of the pair in the valarray of pno-mp2.cc file\n\ttemplate <typename Int>\n\tsize_t tridx(Int row, Int col) {\n\t\tsize_t result= (row < col) ? (row + col * (col + 1) / 2)\n\t\t\t\t: (col + row * (row + 1) / 2);\n\t\treturn result;//-offset_;\n\t}\n\n\t/// pre-increment operator\n\tElectronPairIterator& operator ++();\n\n\t/// number of active occupied orbitals\n\tsize_t nocc()const{\n\t\treturn (stop_-start_);\n\t}\n\n\t/// total number of pairs n * (n + 1) / 2;\n\tsize_t npairs()const{\n\t\tconst size_t n=stop_-start_;\n\t\treturn n*(n+1)/2;\n\t}\n\n\t/// Gives back \"pairij\" (for frozen core i and j are the true indices corresponding to the reference with all orbitals)\n\tstd::string name()const{\n\t\tstd::string name=\"pair\"+ std::to_string(i_+freeze_) + std::to_string(j_+freeze_);\n\t\treturn name;\n\t}\n\n\tsize_t i()const{ return i_;}\n\tsize_t j()const{ return j_;}\n\tsize_t start()const{ return start_;}\n\tsize_t stop()const{ return stop_;}\n\tsize_t ij()const{return ij_;}\n\tbool finished()const{return finished_;}\n\tbool diagonal()const{return (i_==j_);}\n\nprivate:\n\tsize_t i_=0;\t///< current pair index i\n\tsize_t j_=0;\t///< current pair index j\n\tconst size_t start_=0; ///< start value for i and j (usually 0)\n\tconst size_t stop_=0;  ///< stop value for i and j (usually number of occ orbitals or occ-nfreeze for frozen core)\n\tconst size_t freeze_=0; ///< number of frozen orbitals (just to print the correct name)\n\tsize_t ij_=0;\t///< pair number starting from 00 => 0\n\tbool finished_=false; ///< true if all pairs where iterated\n};\n\n/// POD for CIS excitation\nstruct CISData{\n\tCISData(){}\n\tCISData(const size_t& n, const double& o, const vector_real_function_3d& f) : x(f),number(n),omega(o){}\n\tvector_real_function_3d x=vector_real_function_3d();\n\tvector_real_function_3d Kx=vector_real_function_3d();\n\tvector_real_function_3d Vx=vector_real_function_3d();\n\tint number=-1;\n\tdouble omega=0.0;\n\tbool initialized()const{return (number>=0 and omega>0.0 and x.size()>0);}\n};\n\n/// POD for PNO code\nstruct PNOPairs{\n\n\tstruct MemInfo{\n\t\tdouble pno;\n\t\tdouble Kpno;\n\t\tdouble W;\n\t\tfriend std::ostream& operator <<(std::ostream& os, const MemInfo& mi){\n\t\t\tos << \"PNOPairs Memory Information\\n\";\n\t\t\tos << \"Total: \" << std::fixed << mi.pno + mi.Kpno + mi.W << \" GB \\n\";\n\t\t\tos << \"PNO  : \" << std::fixed << mi.pno << \" GB \\n\";\n\t\t\tos << \"KPNO : \" << std::fixed << mi.Kpno << \" GB \\n\";\n\t\t\tos << \"W    : \" << std::fixed << mi.W << \" GB \\n\";\n\t\t\treturn os;\n\t\t}\n\t};\n\n\ttypedef std::valarray<vector_real_function_3d> vfT ;\n\tPNOPairs(const PairType& t, const size_t& n) :  type(t), nocc(n), npairs(n*(n+1)/2) , S_ij_ik(n), S_ij_kj(n) {initialize(n);}\n\tPNOPairs(const PairType& t, const size_t& n, const CISData& c): type(t), nocc(n), npairs(n*(n+1)/2), cis(c), S_ij_ik(n), S_ij_kj(n)\n\t{\n\t\tinitialize(n);\n\t\tconst size_t n2=cis.x.size();\n\t\tMADNESS_ASSERT(nocc==n);\n\t\tMADNESS_ASSERT(n==n2);\n\t}\n\n\tvoid initialize(const std::size_t& nocc);\n\n\tconst PairType type;\t\t\t\t\t\t\t///< type (i.e. MP2_PAIRTYPE, CISPD_PAIRTYPE, later CCSD etc\n\tconst size_t nocc;\t\t\t\t\t\t\t\t///< number of active occupied orbitals\n\tconst size_t npairs;\t\t\t\t\t\t\t///< number of Pairs\n\tCISData cis;\t\t\t\t\t\t\t\t\t///< CIS excitation structure\n\tvfT pno_ij;\t\t\t\t\t\t\t\t\t\t///< the PNOs for all Pairs\n\tstd::valarray<Tensor<double> > rdm_evals_ij;   \t        ///< PNO eigenvalues\n\tstd::valarray<Tensor<double> > t_ij;\t\t\t///< the amplitudes for all Pairs\n\tstd::valarray<Tensor<double> > F_ij;\t\t\t///< Fock matrices of the PNOs\n\tstd::valarray<Tensor<double> > W_ij;\t\t\t///< Fluctuation matrix\n\tstd::valarray<int> maxranks_ij;\t\t\t\t\t///< maxranks for all pairs, negative->unlimited\n\tstd::valarray<bool> frozen_ij;\t\t\t\t\t///< if true then pairs are frozen and not optimized (but still contribute to energy -> not frozen core)\n\tPairEnergies energies;\t\t\t\t\t\t\t///< all Pair Energies\n\tvfT Kpno_ij; \t\t\t\t\t\t\t\t\t///< Exchange Intermediate\n\tvfT W_ij_i;\t\t\t\t\t\t\t\t\t\t///< Fluctuation Potential\n\tvfT W_ij_j;\t\t\t\t\t\t\t\t\t\t///< Fluctuation Potential\n        PNOTensors::Tensor_IJ_IK<double> S_ij_ik;\t\t\t\t\t///< PNO overlaps\n        PNOTensors::Tensor_IJ_KJ<double> S_ij_kj;\t\t\t\t\t///< PNO overlaps\n\tmutable MemInfo meminfo;\t\t\t\t\t\t///< information about the used memory\n\n\t/// check if all pairs are empty\n\tbool empty()const{\n\t\tbool empty=true;\n\t\tfor(const auto& p:pno_ij) empty=(empty and p.empty());\n\t\treturn empty;\n\t}\n\n\t/// consistency check\n\tbool is_consistent(std::string& errm) const;\n\t/// throes exception if consistency check fails fails\n\tvoid verify()const{\n\t\tstd::string errm=\"\";\n\t\tif(not is_consistent(errm)) MADNESS_EXCEPTION(errm.c_str(),1);\n\t}\n\t// need explicit assignment operator bc of const members\n\tPNOPairs operator =(const PNOPairs& other);\n\n\t// name the pair to store and load on disc\n\tstd::string name(const ElectronPairIterator& it) const;\n\n\t// rearrange a valarray to a big vector according to the pair structure of this\n\t// only return unfrozen pairs\n\tvector_real_function_3d extract(const vfT& vf) const;\n\t// reassemble big vector into valarray pair structure of this\n\t// the inverted operation to extract\n\tvfT reassemble(const vector_real_function_3d& v){\n\t\tvfT result(npairs);\n\t\treturn reassemble(v,result);\n\t}\n\tvfT reassemble(const vector_real_function_3d& v, vfT& result) const;\n\n\tvoid clear_intermediates(const ElectronPairIterator& it);\n\n\tMemInfo update_meminfo() const;\n\n\n\n};\n\n\n} /* namespace madness */\n\n#endif /* PAPER_CODE_PNOSTRUCTURES_H_ */\n"
  },
  {
    "path": "src/madness/chem/PNOTensors.h",
    "content": "/*\n * PNOmadness::Tensors.h\n *\n *  Created on: Oct 22, 2018\n *      Author: kottmanj\n */\n\n#ifndef PAPER_CODE_PNOTENSORS_H_\n#define PAPER_CODE_PNOTENSORS_H_\n\n#include <stdio.h>\n#include <valarray>\n#include <madness.h>\n\n\nnamespace PNOTensors {\n  /// index in packed lower triangle matrix, row >= col\n  template <typename Int>\n    size_t tridx(Int row, Int col) {\n    return (row < col) ? (row + col * (col + 1) / 2)\n      : (col + row * (row + 1) / 2);\n  }\n  \n  /// # of elements in lower triangle matrix\n  template <typename Int>\n    size_t ntri(Int n) {\n    return n * (n + 1) / 2;\n  }\n  \n  /// stores pairs of pairs that share first index (i.e. {ij} and {ik}, where i >= j) as a 3-index tensor:\n  /// case 1 -- i >= j, i >= k: only need j >= k, or ij >= ik; store as {{ij},k}\n  /// case 2 -- i >= j, k > i: can also be found at Tensor_IJ_JK(k,i,j)\n  template <typename T>\n    class Tensor_IJ_IK {\n  public:\n  Tensor_IJ_IK(size_t n) : n_(n), data_(ntri(n) * n) {\n      reset();\n    }\n    ~Tensor_IJ_IK() = default;\n    \n    std::tuple<size_t,bool> ijk(size_t i, size_t j, size_t k) const {\n      assert(i < size_t(n_));\n      assert(j < size_t(n_));\n      assert(k < size_t(n_));\n      assert(i >= j);\n      if (i >= k) {\n\treturn j >= k ? std::make_tuple(tridx(i,j) * n_ + k,false) : std::make_tuple(tridx(i,k) * n_ + j, true);\n      }\n      else  // i < k\n\treturn std::make_tuple(tridx(i,j) * n_ + k,false);\n    }\n    \n    bool is_unique(size_t i, size_t j, size_t k) const {\n      assert(i < size_t(n_));\n      assert(j < size_t(n_));\n      assert(k < size_t(n_));\n      assert(i >= j);\n      if (i < k)\n\treturn true;\n      else\n\treturn j >= k;\n    }\n    \n    bool is_initialized(size_t i, size_t j, size_t k) const {\n      assert(i < size_t(n_));\n      assert(j < size_t(n_));\n      assert(k < size_t(n_));\n      assert(i >= j);\n      size_t ijk;\n      std::tie(ijk,std::ignore) = this->ijk(i,j,k);\n      return data_[ijk].size() != 0;\n    }\n    madness::Tensor<T> get(size_t i, size_t j, size_t k) const {\n      assert(i < size_t(n_));\n      assert(j < size_t(n_));\n      assert(k < size_t(n_));\n      assert(i >= j);\n      size_t ijk; bool swap;\n      std::tie(ijk, swap) = this->ijk(i,j,k);\n      return swap ? data_[ijk].swapdim(0,1) : data_[ijk];\n    }\n    void set(size_t i, size_t j, size_t k, const madness::Tensor<T>& t) {\n      assert(i < size_t(n_));\n      assert(j < size_t(n_));\n      assert(k < size_t(n_));\n      assert(i >= j);\n      size_t ijk; bool swap;\n      std::tie(ijk, swap) = this->ijk(i,j,k);\n      data_[ijk] = swap ? t.swapdim(0,1) : t;\n    }\n    \n    void reset() {\n      std::fill(std::begin(data_), std::end(data_), madness::Tensor<T>());\n    }\n    \n  private:\n    int n_;\n    std::valarray<madness::Tensor<T>> data_;\n  };\n  \n  /// stores pairs of pairs that share second index (i.e. {ij} and {kj}, where i >= j) as a 3-index tensor:\n  /// case 1 -- i >= j, j >= k: store as {{ij},k}\n  /// case 2 -- i >= j, k > j: only need i >= k, or ij >= kj; store as {{ij},k}\n  template <typename T>\n    class Tensor_IJ_KJ {\n  public:\n  Tensor_IJ_KJ(size_t n) : n_(n), data_(ntri(n) * n) {\n      reset();\n    }\n    ~Tensor_IJ_KJ() = default;\n    \n    std::tuple<size_t,bool> ijk(size_t i, size_t j, size_t k) const {\n      assert(i < size_t(n_));\n      assert(j < size_t(n_));\n      assert(k < size_t(n_));\n      assert(i >= j);\n      if (k > j)\n\treturn i >= k ? std::make_tuple(tridx(i,j) * n_ + k,false) : std::make_tuple(tridx(k,j) * n_ + i, true);\n      else\n\treturn std::make_tuple(tridx(i,j) * n_ + k,false);\n    }\n    bool is_unique(size_t i, size_t j, size_t k) const {\n      assert(i < size_t(n_));\n      assert(j < size_t(n_));\n      assert(k < size_t(n_));\n      assert(i >= j);\n      if (k <= j)\n\treturn true;\n      else\n\treturn (i >= k);\n    }\n    bool is_initialized(size_t i, size_t j, size_t k) const {\n      assert(i < size_t(n_));\n      assert(j < size_t(n_));\n      assert(k < size_t(n_));\n      assert(i >= j);\n      \n      size_t ijk;\n      std::tie(ijk, std::ignore) = this->ijk(i, j, k);\n      return data_[ijk].size() != 0;\n    }\n    madness::Tensor<T> get(size_t i, size_t j, size_t k) const {\n      assert(i < size_t(n_));\n      assert(j < size_t(n_));\n      assert(k < size_t(n_));\n      assert(i >= j);\n      size_t ijk;\n      bool swap;\n      std::tie(ijk, swap) = this->ijk(i,j,k);\n      return swap ? data_[ijk].swapdim(0,1) : data_[ijk];\n    }\n    void set(size_t i, size_t j, size_t k, const madness::Tensor<T>& t) {\n      assert(i < size_t(n_));\n      assert(j < size_t(n_));\n      assert(k < size_t(n_));\n      assert(i >= j);\n      size_t ijk;\n      bool swap;\n      std::tie(ijk, swap) = this->ijk(i,j,k);\n      data_[ijk] = swap ? t.swapdim(0,1) : t;\n    }\n    \n    void reset() {\n      std::fill(std::begin(data_), std::end(data_), madness::Tensor<T>());\n    }\n    \n  private:\n    int n_;\n    std::valarray<madness::Tensor<T>> data_;\n  };\n  \n}  // was anonymous namespace --- now PNOTensors\n\n#endif /* PAPER_CODE_PNOTENSORS_H_ */\n"
  },
  {
    "path": "src/madness/chem/ParameterManager.hpp",
    "content": "#pragma once\n#include <madness/chem/CalculationParameters.h>\n#include <madness/chem/CCParameters.h>\n#include <madness/mra/QCCalculationParametersBase.h>\n#include <madness/chem/oep.h>\n#include <madness/chem/TDHF.h>\n\n#include <madness/chem/ResponseParameters.hpp>\n\nusing namespace madness;\nusing path = std::filesystem::path;\n\nstruct OptimizationParameters : public QCCalculationParametersBase {\n  static constexpr char const *tag = \"optimization\";\n  OptimizationParameters(const OptimizationParameters &other) = default;\n\n  OptimizationParameters(World &world, const commandlineparser &parser)\n      : OptimizationParameters() {\n    read_input_and_commandline_options(world, parser, tag);\n  }\n  OptimizationParameters() {\n    initialize<int>(\"maxiter\", 20, \"optimization maxiter\");\n\n    initialize<bool>(\"initial_hessian\", false,\n                     \"compute inital hessian for optimization\");\n    initialize<std::string>(\"algopt\", \"bfgs\", \"algorithm used for optimization\",\n                            {\"bfgs\", \"cg\"});\n    initialize<double>(\"value_precision\", 1.e-5, \"value precision\");\n    initialize<double>(\"gradient_precision\", 1.e-4, \"gradient precision\");\n    initialize<bool>(\"geometry_tolerence\", false, \"geometry tolerance\");\n  }\n\n  std::string get_tag() const override {\n    return std::string(tag);\n  }\n\n\n  using QCCalculationParametersBase::read_input_and_commandline_options;\n\n  void print() const {\n    madness::print(\"------------Optimization Parameters---------------\");\n    madness::print(\"Maxiter: \", get<int>(\"maxiter\"));\n    madness::print(\"Initial Hessian: \", get<bool>(\"initial_hessian\"));\n    madness::print(\"Algorithm: \", get<std::string>(\"algopt\"));\n    madness::print(\"Value Precision: \", get<double>(\"value_precision\"));\n    madness::print(\"Gradient Precision: \", get<double>(\"gradient_precision\"));\n    madness::print(\"Geometry Tolerance: \", get<bool>(\"geometry_tolerence\"));\n    madness::print(\"-------------------------------------------\");\n  }\n\n  [[nodiscard]] std::string get_method() const {\n    return get<std::string>(\"method\");\n  }\n  [[nodiscard]] int get_maxiter() const { return get<int>(\"maxiter\"); }\n  [[nodiscard]] bool get_initial_hessian() const {\n    return get<bool>(\"initial_hessian\");\n  }\n  [[nodiscard]] std::string get_algopt() const {\n    return get<std::string>(\"algopt\");\n  }\n  [[nodiscard]] double get_value_precision() const {\n    return get<double>(\"value_precision\");\n  }\n  [[nodiscard]] double get_gradient_precision() const {\n    return get<double>(\"gradient_precision\");\n  }\n  [[nodiscard]] bool get_geometry_tolerence() const {\n    return get<bool>(\"geometry_tolerence\");\n  }\n};\n\ntemplate <typename... Groups>\nclass ParameterManager {\n  World &world_;\n  std::tuple<Groups...> groups_;\n  commandlineparser parser_;\n  nlohmann::json all_input_json_;\n\n\n  // helper to invoke each group’s JSON export:\n  template <typename G>\n  void addGroupJson() {\n    auto const &g = std::get<G>(groups_);\n    auto j = g.to_json_if_precedence(\"defined\");\n    if (world_.rank() == 0) {\n      madness::print(\"Group: \", G::tag, \" JSON: \", j.dump(4));\n    }\n    if (!j.is_null()) all_input_json_[G::tag] = j;\n  }\n\n public:\n  ParameterManager() : world_(World::get_default()) {}\n\n  /// \"Master\" ctor: takes any single intput file, JSON or plain-text\n  // ParameterManager(World &w, const path &filename) : world_(w) {\n  ParameterManager(World &w, const commandlineparser& parser) : world_(w), parser_(parser) {\n    // parser_.set_keyval(\"input\", filename);\n    const path& filename= parser_.value(\"input\");\n\n    if (is_json_file(filename)) {\n      auto j = read_json_file(filename);\n      initFromJson(j);\n    } else {\n      // plain-text file\n      initFromText(filename);\n    }\n    set_derived_values();\n  }\n\n  /// here comes some logic for the calculation, e.g. the number of electrons derived from the molecule\n  void set_derived_values() {\n    this->get<CalculationParameters>().set_derived_values(this->get<Molecule>());\n  }\n\n  /// dump out the merged JSON\n  [[nodiscard]] nlohmann::json const &getAllInputJson() const {\n    return all_input_json_;\n  }\n\n  /// access a particular group by type:\n  template <typename G>\n  G const &get() const {\n    return std::get<G>(groups_);\n  }\n  template <typename G>\n  G &get() {\n    return std::get<G>(groups_);\n  }\n  template <typename G>\n  void set(G const &g) {\n    std::get<G>(groups_) = g;\n  }\n\n  /// pretty-print everything\n  void print_all() const { (print_group_if_defined<Groups>(), ...); }\n\n private:\n  void initFromJson(nlohmann::json const &j) {\n    (\n        [&] {\n          if (j.contains(Groups::tag)) {\n            if (world_.rank() == 0) {\n              madness::print(\"Group: \", Groups::tag,\n                             \" JSON: \", j.at(Groups::tag).dump(4));\n            }\n            std::get<Groups>(groups_).from_json(j.at(Groups::tag));\n          }\n        }(),\n        ...);\n    all_input_json_ = j;\n  }\n  // 1) read from a plain-text “.inp” file\n  void initFromText(const path &filename) {\n    // parser_.set_keyval(\"input\", filename);\n    // invoke each group’s file+CLI parser:\n    ((void)(std::get<Groups>(groups_) = Groups(world_, parser_)), ...);\n\n    // collect JSON for any defined keys:\n    ((void)addGroupJson<Groups>(), ...);\n  }\n\n  template <typename G>\n  void print_group_if_defined() const {\n    auto const &g = std::get<G>(groups_);\n    // grab only the user-defined values:\n    auto j = g.to_json_if_precedence(\"defined\");\n    // json.empty() is true if no user-defined values\n    if (!j.empty()) {\n      g.print();\n    }\n  }\n  static bool is_json_file(const path &f) {\n    std::ifstream input_file_stream(f);\n    bool is_json = json::accept(input_file_stream);\n    input_file_stream.close();\n    return is_json;\n  }\n  static json read_json_file(const path &input_file) {\n    std::ifstream input_file_stream(input_file);\n    auto j = json::parse(input_file_stream);\n    input_file_stream.close();\n    return j;\n  }\n};\n\n// Define a concrete aliased ParameterManager type\nusing Params = ParameterManager<CalculationParameters,\n                                ResponseParameters,\n                                Nemo::NemoCalculationParameters,\n                                OptimizationParameters,\n                                OEP_Parameters,\n                                TDHFParameters,\n                                CCParameters,\n                                Molecule>;\n"
  },
  {
    "path": "src/madness/chem/PathManager.hpp",
    "content": "#pragma once\n#include <filesystem>\n\nnamespace madness {\n  struct PathManager {\n    std::filesystem::path baseDir;\n    std::string label;\n\n    PathManager(std::filesystem::path base, std::string lbl) : baseDir(std::move(base)), label(std::move(lbl)) {}\n\n    std::filesystem::path dir() const { return baseDir / label; }\n\n    void create() const {\n      std::error_code ec;\n      std::filesystem::create_directories(dir(), ec);\n      if (ec) throw std::runtime_error(\"Could not create \" + dir().string());\n    }\n\n    std::filesystem::path file(std::string const& name) const { return dir() / name; }\n  };\n}"
  },
  {
    "path": "src/madness/chem/QCPropertyInterface.h",
    "content": "#ifndef MADNESS_QCPROPERTYINTERFACE_H\n#define MADNESS_QCPROPERTYINTERFACE_H\n\n#include <madness/mra/mra.h>\n#include<madness/chem/molecule.h>\n//class NuclearCorrelationFactor;\n\nnamespace madness {\n\n/// class implementing properties of QC models\nclass QCPropertyInterface {\n\n  virtual std::string name() const = 0;\n\n  virtual bool selftest() = 0;\n\n  virtual Tensor<double> nuclear_derivative(\n      const real_function_3d &density, const Molecule &molecule,\n      const std::shared_ptr<NuclearCorrelationFactor> ncf = 0) const {\n    print(\"nuclear_derivative not implemented in \", name());\n    MADNESS_EXCEPTION(\"feature not implemented\", 1);\n    return Tensor<double>();\n  }\n\n  virtual real_function_3d density() const {\n    print(\"density not implemented in \", name());\n    MADNESS_EXCEPTION(\"feature not implemented\", 1);\n  }\n\n  virtual real_function_3d no_cusp_density() const {\n    print(\"no_cusp_density not implemented in \", name());\n    MADNESS_EXCEPTION(\"feature not implemented\", 1);\n  }\n\n  virtual real_function_3d spindensity(const int spin) const {\n    MADNESS_ASSERT(spin == 0 or spin == 1); // alpha or beta\n    print(\"spindensity not implemented in \", name());\n    MADNESS_EXCEPTION(\"feature not implemented\", 1);\n  }\n\n  virtual real_function_3d no_cusp_spindensity(const int spin) const {\n    MADNESS_ASSERT(spin == 0 or spin == 1); // alpha or beta\n    print(\"no_cusp_spindensity not implemented in \", name());\n    MADNESS_EXCEPTION(\"feature not implemented\", 1);\n  }\n\n  virtual std::vector<double> multipole_moment(\n      const real_function_3d &density, const int l, const Molecule &molecule,\n      const std::shared_ptr<NuclearCorrelationFactor> ncf = 0) const {\n    print(\"dipole moment not implemented in \", name());\n    MADNESS_EXCEPTION(\"feature not implemented\", 1);\n  }\n};\n\n}  // namespace madness\n\n#endif //MADNESS_QCPROPERTYINTERFACE_H\n"
  },
  {
    "path": "src/madness/chem/ResponseParameters.hpp",
    "content": "#pragma once\n#include <madness/mra/QCCalculationParametersBase.h>\n\nusing namespace madness;\n\nstruct ResponseParameters : public QCCalculationParametersBase {\n  static constexpr char const *tag = \"response\";\n  ResponseParameters(const ResponseParameters &other) = default;\n  ResponseParameters(World &world, const commandlineparser &parser) : ResponseParameters() {\n    read_input_and_commandline_options(world, parser, tag);\n    set_derived_properties();\n    validate_user_specified_properties();\n  }\n  ResponseParameters() {\n    initialize<std::string>(\"prefix\", \"response\", \"prefixes your output/restart/json/plot/etc files\");\n    initialize<std::string>(\"fock_json_file\", \"moldft.fock.json\", \"data file for fock matrix\");\n    initialize<std::string>(\"archive\", \"../moldft.restartdata\", \"file to read ground parameters from\");\n    initialize<bool>(\"nwchem\", false, \"Using nwchem files for intelligent starting guess\");\n    initialize<std::string>(\"nwchem_dir\", \"none\", \"Root name of nwchem files for intelligent starting guess\");\n    initialize<int>(\"print_level\", 3, \"0: no output; 1: final energy; 2: iterations; 3: timings; 10: debug\");\n    initialize<size_t>(\"maxiter\", 5, \"maximum number of iterations\");\n    initialize<bool>(\"kain\", false, \"Turn on Krylov Accelarated Inexact Newton Solver\");\n    initialize<double>(\"maxrotn\", .50, \"Max orbital rotation per iteration\");\n    initialize<double>(\"maxbsh\", 10, \"Max bsh residual\");\n    initialize<size_t>(\"maxsub\", 8, \"size of iterative subspace ... set to 0 or 1 to disable\");\n    initialize<std::string>(\"xc\", \"hf\", \"XC input line\");\n    initialize<std::string>(\"hfexalg\", \"multiworld_row\",\n                            \"hf exchange algorithm: choose from multiworld \"\n                            \"(default), multiworld_row, smallmem, largemem\");\n    initialize<double>(\"dconv\", 1e-6, \"density convergence\");\n    initialize<bool>(\"step_restrict\", true, \"Toggles step restriction\");\n    initialize<std::vector<std::string>>(\"requested_properties\", {\"polarizability\"},\n                                         \"properties to calculate (polarizability, hyperpolarizability, \"\n                                         \"Raman.)\");\n    //** if properites are requested, then one should specify directions,\n    // frequencies, and atom_indices(for nuclear response) */\n    initialize<bool>(\"property\", false, \"Compute properties\");\n    initialize<bool>(\"dipole\", false, \"Compute linear dipole response\");\n    initialize<std::vector<double>>(\"dipole.frequencies\", {0.0}, \"frequencies for dipole response\");\n    initialize<std::string>(\"dipole.directions\", \"xyz\", \"directions for dipole response\");\n    initialize<bool>(\"nuclear\", false, \"Compute nuclear response\");\n    initialize<std::string>(\"nuclear.directions\", \"xyz\", \"directions for nuclear response\");\n    initialize<std::vector<double>>(\"nuclear.frequencies\", {0.0}, \"frequencies for nuclear response\");\n    initialize<std::vector<int>>(\"nuclear.atom_indices\", {0}, \"atom indices for nuclear response\");\n    initialize<bool>(\"quadratic\", false, \"Compute quadratic response properties from defined perturbations\");\n    initialize<std::string>(\"localize\", \"canon\", \"localization method\", {\"pm\", \"boys\", \"new\", \"canon\"});\n  }\n\n  std::string get_tag() const override { return std::string(tag); }\n\n public:\n  using QCCalculationParametersBase::read_input_and_commandline_options;\n\n  [[nodiscard]] std::string prefix() const { return get<std::string>(\"prefix\"); }\n  [[nodiscard]] std::string fock_json_file() const { return get<std::string>(\"fock_json_file\"); }\n  [[nodiscard]] std::string localize() const { return get<std::string>(\"localize\"); }\n  [[nodiscard]] std::string archive() const { return get<std::string>(\"archive\"); }\n  [[nodiscard]] std::string nwchem_dir() const { return get<std::string>(\"nwchem_dir\"); }\n  [[nodiscard]] bool nwchem() const { return get<bool>(\"nwchem\"); }\n  [[nodiscard]] int print_level() const { return get<int>(\"print_level\"); }\n  [[nodiscard]] bool step_restrict() const { return get<bool>(\"step_restrict\"); }\n  [[nodiscard]] size_t maxiter() const { return get<size_t>(\"maxiter\"); }\n  [[nodiscard]] double dconv() const { return get<double>(\"dconv\"); }\n  [[nodiscard]] bool quadratic() const { return get<bool>(\"quadratic\"); }\n  [[nodiscard]] bool kain() const { return get<bool>(\"kain\"); }\n  [[nodiscard]] size_t maxsub() const { return get<size_t>(\"maxsub\"); }\n  [[nodiscard]] std::string deriv() const { return get<std::string>(\"deriv\"); }\n  [[nodiscard]] std::string dft_deriv() const { return get<std::string>(\"dft_deriv\"); }\n  [[nodiscard]] std::string xc() const { return get<std::string>(\"xc\"); }\n  [[nodiscard]] std::string hfexalg() const { return get<std::string>(\"hfexalg\"); }\n  [[nodiscard]] double maxrotn() const { return get<double>(\"maxrotn\"); }\n  [[nodiscard]] bool property() const { return get<bool>(\"property\"); }\n  [[nodiscard]] std::vector<std::string> requested_properties() const {\n    return get<std::vector<std::string>>(\"requested_properties\");\n  }\n  [[nodiscard]] bool dipole() const { return get<bool>(\"dipole\"); }\n  [[nodiscard]] std::vector<double> dipole_frequencies() const {\n    return get<std::vector<double>>(\"dipole.frequencies\");\n  }\n  [[nodiscard]] std::string dipole_directions() const { return get<std::string>(\"dipole.directions\"); }\n  [[nodiscard]] bool nuclear() const { return get<bool>(\"nuclear\"); }\n  [[nodiscard]] std::vector<double> nuclear_frequencies() const {\n    return get<std::vector<double>>(\"nuclear.frequencies\");\n  }\n  [[nodiscard]] std::string nuclear_directions() const { return get<std::string>(\"nuclear.directions\"); }\n  [[nodiscard]] std::vector<int> nuclear_atom_indices() const { return get<std::vector<int>>(\"nuclear.atom_indices\"); }\n  [[nodiscard]] bool first_order() const { return get<bool>(\"first_order\"); }\n  [[nodiscard]] bool second_order() const { return get<bool>(\"second_order\"); }\n  [[nodiscard]] bool third_order() const { return get<bool>(\"third_order\"); }\n\n private:\n  void validate_user_specified_properties() {\n    // only validate if the user explicitly set requested_properties\n    if (property()) {\n      auto props = requested_properties();\n      for (auto const &prop : props) {\n        if (prop == \"polarizability\" || prop == \"hyperpolarizability\") {\n          if (!is_user_defined(\"dipole.frequencies\") || !is_user_defined(\"dipole.directions\"))\n            throw std::runtime_error(\"When requesting '\" + prop +\n                                     \"', you must also set dipole.frequencies \"\n                                     \"and dipole.directions.\");\n        }\n        if (prop == \"raman\") {\n          if (!is_user_defined(\"dipole.frequencies\") || !is_user_defined(\"dipole.directions\") ||\n              !is_user_defined(\"nuclear.frequencies\") || !is_user_defined(\"nuclear.directions\") ||\n              !is_user_defined(\"nuclear.atom_indices\"))\n            throw std::runtime_error(\n                \"When requesting 'raman', you must set both dipole.* and \"\n                \"nuclear.* parameters.\");\n        }\n      }\n    }\n  }\n\n  void set_derived_properties() {\n    // only override if user did NOT explicitly set requested_properties\n\n    std::vector<std::string> props;\n    if (!property()) {\n      bool dip = dipole();\n      bool nuc = nuclear();\n      bool quad = quadratic();\n\n      if (quad) {\n        // quadratic response\n        if (dip && nuc) {\n          // both nuclear & dipole kicks → Raman\n          props = {\"raman\"};\n        } else {\n          // any pure quadratic dipole perturbations → α & β\n          props = {\"polarizability\", \"hyperpolarizability\"};\n        }\n      } else {\n        // linear response only\n        if (dip) {\n          props.push_back(\"polarizability\");\n        }\n        // you could add a nuclear‐only property here if desired:\n        // if (nuc) props.push_back(\"nuclear_response\");\n      }\n    }\n    if (!props.empty()) {\n      // set_derived_value will only apply if precedence < derived\n      set_derived_value(\"requested_properties\", props);\n    }\n  }\n};\n"
  },
  {
    "path": "src/madness/chem/Results.h",
    "content": "//\n// Created by Florian Bischoff on 08.07.25.\n//\n\n#ifndef RESULTS_H\n#define RESULTS_H\n\n#include <madness/external/nlohmann_json/json.hpp>\n#include <madness/tensor/tensor_json.hpp>\n#include<string>\n\n//* base and derived classes for holding results of a calculation\nnamespace madness {\n\n    class ResultsBase {\n\n    public:\n        ResultsBase() = default;\n        virtual ~ResultsBase() = default;\n\n        /// serialize the results to a JSON object\n        virtual nlohmann::json to_json() const = 0;\n\n        virtual std::string key() const = 0;\n    };\n\n    /// holds metadata of the calculation\n\n    /// create right before the calculation starts, stop() must be called after the calculation is finished\n    class MetaDataResults : public ResultsBase {\n    public:\n\n        MetaDataResults(World& world) {\n            time_begin=wall_time();\n            mpi_size= world.size();\n        }\n\n        double time_begin=0.0;\n        double time_end=0.0;\n        std::string finished_at=\"\";\n        std::string git_hash=\"\";\n        long mpi_size=-1;\n\n        std::string key() const override {return \"metadata\"; }\n\n        void stop() {\n            time_end=wall_time();\n            finished_at=time_tag();\n        }\n\n        nlohmann::json to_json() const override {\n            nlohmann::json j;\n            // compute timing on-the-fly unless they have been set\n            if (time_end==0.0) {\n                j[\"elapsed_time\"] = wall_time() - time_begin;\n                j[\"finished_at\"] = time_tag();\n            } else {\n                j[\"elapsed_time\"] = time_end - time_begin;\n                j[\"finished_at\"] = finished_at;\n            }\n            j[\"git_hash\"] = git_hash;\n            j[\"host\"] = std::string(HOST_SYSTEM);\n            j[\"nthreads\"] = ThreadPool::size();\n            j[\"mpi_size\"] = mpi_size;\n            return j;\n        }\n\n    private:\n        /// borrowed from Adrian's MolDFTLib\n        std::string time_tag() const {\n            auto print_time = std::chrono::system_clock::now();\n            auto in_time_t = std::chrono::system_clock::to_time_t(print_time);\n            std::stringstream ss;\n            ss << std::put_time(std::localtime(&in_time_t), \"%Y-%m-%d %X\");\n            return ss.str();\n        }\n    };\n\n    /// holds convergence results of the calculation\n    class ConvergenceResults : public ResultsBase {\n        double converged_for_thresh = 1.e10;\n        double converged_for_dconv = 1.e10;\n\n    public:\n        ConvergenceResults() = default;\n\n        /// construct from JSON\n        ConvergenceResults(const nlohmann::json& j) {\n            converged_for_thresh = j.value(\"converged_for_thresh\", 1.e10);\n            converged_for_dconv = j.value(\"converged_for_dconv\", 1.e10);\n        }\n\n        /// assignment operator from JSON\n        ConvergenceResults& operator=(const nlohmann::json& j) {\n            converged_for_thresh = j.value(\"converged_for_thresh\", 1.e10);\n            converged_for_dconv = j.value(\"converged_for_dconv\", 1.e10);\n            return *this;\n        }\n\n        std::string key() const override {return \"convergence\"; }\n\n        ConvergenceResults& set_converged_thresh(double thresh) {\n            converged_for_thresh = thresh;\n            return *this;\n        }\n\n        ConvergenceResults& set_converged_dconv(double dconv) {\n            converged_for_dconv = dconv;\n            return *this;\n        }\n\n        nlohmann::json to_json() const override {\n            nlohmann::json j;\n            j[\"converged_for_thresh\"] = converged_for_thresh;\n            j[\"converged_for_dconv\"] = converged_for_dconv;\n            return j;\n        }\n    };\n\n    class PropertyResults : public ResultsBase {\n    public:\n        PropertyResults() = default;\n\n        /// construct from JSON\n        PropertyResults(const nlohmann::json& j) {\n            energy= j.value(\"energy\", 0.0);\n            if (j.count(\"dipole\")==1) dipole = tensor_from_json<double>(j[\"dipole\"]);\n            if (j.count(\"gradient\")==1) gradient= tensor_from_json<double>(j[\"gradient\"]);\n        }\n\n        double energy = 0.0;\n        Tensor<double> dipole;\n        Tensor<double> gradient;\n\n        std::string key() const override {return \"properties\"; }\n\n        nlohmann::json to_json() const override {\n            nlohmann::json j;\n            j[\"energy\"] = energy;\n            j[\"dipole\"] = tensor_to_json(dipole);\n            j[\"gradient\"] = tensor_to_json(gradient);\n            return j;\n        }\n\n    };\n\n    class SCFResults: public ResultsBase {\n    public:\n        Tensor<double> aeps;\n        Tensor<double> beps;\n        Tensor<double> afock;\n        Tensor<double> bfock;\n        std::string model=\"scf\"; // model used for the SCF calculation\n        double scf_total_energy=0.0; // total energy of the SCF calculation\n        PropertyResults properties;\n\n        SCFResults() = default;\n\n        /// construct from JSON\n        SCFResults(const nlohmann::json& j) {\n            if (j.count(\"scf_eigenvalues_a\")>0)\n                aeps = tensor_from_json<double>(j[\"scf_eigenvalues_a\"]);\n            if (j.count(\"scf_eigenvalues_b\") > 0)\n                beps = tensor_from_json<double>(j[\"scf_eigenvalues_b\"]);\n            if (j.count(\"scf_fock_b\") > 0)\n                bfock = tensor_from_json<double>(j[\"scf_fock_b\"]);\n            if (j.count(\"scf_fock_b\") > 0)\n                bfock = tensor_from_json<double>(j[\"scf_fock_b\"]);\n            if (j.count(\"scf_total_energy\") > 0)\n                scf_total_energy = j[\"scf_total_energy\"];\n\n            if (j.count(\"properties\") > 0) {\n                properties = PropertyResults(j[\"properties\"]);\n            } else {\n                properties = PropertyResults();\n            }\n        }\n\n        std::string key() const override {return model; }\n\n        nlohmann::json to_json() const override {\n            nlohmann::json j;\n            j[\"scf_eigenvalues_a\"] = tensor_to_json(aeps);\n            j[\"scf_fock_a\"] = tensor_to_json(afock);\n            if (beps.size() > 0) j[\"scf_eigenvalues_b\"] = tensor_to_json(beps);\n            if (bfock.size() > 0) j[\"scf_fock_b\"] = tensor_to_json(bfock);\n            j[\"model\"] = model;\n            j[\"scf_total_energy\"] = scf_total_energy;\n            j[\"properties\"] = properties.to_json();\n            return j;\n        }\n    };\n\n    class CISResults: public ResultsBase {\n    public:\n        struct excitation_info {\n            std::string irrep; // irreducible representation\n            double omega; // excitation energy in Hartree\n            double current_error; // error in the excitation energy\n            double oscillator_strength_length; // oscillator strength\n            double oscillator_strength_velocity; // oscillator strength\n        };\n        std::vector<excitation_info> excitations;\n        long nfreeze=-1;\n        std::string model=\"unknown\";\n\n        std::string key() const override {return model; }\n\n        CISResults() = default;\n\n        /// construct from JSON\n        CISResults(const nlohmann::json& j) {\n            if (j.count(\"excitations\") > 0) {\n                for (const auto& ex : j[\"excitations\"]) {\n                    excitation_info ei;\n                    ei.irrep = ex.value(\"irrep\", \"\");\n                    ei.omega = ex.value(\"omega\", 0.0);\n                    ei.current_error = ex.value(\"current_error\", 0.0);\n                    ei.oscillator_strength_length = ex.value(\"oscillator_strength_length\", 0.0);\n                    ei.oscillator_strength_velocity = ex.value(\"oscillator_strength_velocity\", 0.0);\n                    excitations.push_back(ei);\n                }\n            }\n            nfreeze = j.value(\"nfreeze\", -1);\n            model= j.value(\"model\", \"unknown\");\n        }\n\n        /// constructor with nfreeze and model\n        CISResults(long nfreeze, const std::string& model) : nfreeze(nfreeze), model(model) {}\n\n        nlohmann::json to_json() const override {\n            nlohmann::json j;\n            for (const auto& ex : excitations) {\n                nlohmann::json ex_json;\n                ex_json[\"irrep\"] = ex.irrep;\n                ex_json[\"omega\"] = ex.omega;\n                ex_json[\"current_error\"] = ex.current_error;\n                ex_json[\"oscillator_strength_length\"] = ex.oscillator_strength_length;\n                ex_json[\"oscillator_strength_velocity\"] = ex.oscillator_strength_velocity;\n                j[\"excitations\"].push_back(ex_json);\n            }\n            j[\"nfreeze\"] = nfreeze;\n            j[\"model\"] = model;\n            return j;\n        }\n\n    };\n\n    class CC2Results: public CISResults {\n    public:\n        CC2Results() : CISResults() {\n            model=\"mp2\";\n        }\n\n        /// construct from JSON\n        CC2Results(const nlohmann::json& j) : CISResults(j) {\n            properties = PropertyResults(j.value(\"properties\", nlohmann::json{}));\n            model = j.value(\"model\", \"mp2\");\n            correlation_energy = j.value(\"correlation_energy\", 0.0);\n            total_energy = j.value(model+\"_total_energy\", 0.0);\n        }\n\n        /// constructor with nfreeze and model\n        CC2Results(long nfreeze, const std::string& model) : CISResults(nfreeze,model) {}\n\n        nlohmann::json to_json() const override {\n            nlohmann::json j;\n            j = CISResults::to_json();\n            j[\"properties\"] = properties.to_json();\n            j[\"model\"] = model;\n            j[\"correlation_energy\"] = correlation_energy;\n            j[model+\"_correlation_energy\"] = correlation_energy;\n            j[model+\"_total_energy\"] = total_energy;\n            return j;\n        }\n\n        CC2Results& set_energies(const double scf_energy, const double corr_energy) {\n            this->correlation_energy = corr_energy;\n            this->total_energy = scf_energy + corr_energy;\n            return *this;\n        }\n\n        /// setters with chaining\n        CC2Results& set_correlation_energy(const double corr_energy) {\n            correlation_energy= corr_energy;\n            return *this;\n        }\n        CC2Results& set_total_energy(const double total_energy) {\n            this->total_energy = total_energy;\n            return *this;\n        }\n        CC2Results& set_properties(const PropertyResults& props) {\n            properties = props;\n            return *this;\n        }\n        CC2Results& set_model(const std::string& model) {\n            this->model = model;\n            return *this;\n        }\n\n        PropertyResults properties; // properties of the correlated calculation\n        double correlation_energy = 0.0; // correlation energy of the correlated calculation\n        double total_energy = 0.0; // total energy of the correlated calculation\n\n    };\n\n    class ZnemoResults: public SCFResults {\n    public:\n\n        double B=0.0; // B value for the Znemo calculation\n\n        ZnemoResults() = default;\n        /// construct from JSON\n        ZnemoResults(const nlohmann::json& j) : SCFResults(j) {\n            B = j.value(\"B\", 0.0);\n        }\n\n        nlohmann::json to_json() const override {\n            nlohmann::json j;\n            j = SCFResults::to_json();\n            j[\"B\"] = B;\n            return j;\n        }\n\n    };\n\n    class OEPResults: public SCFResults {\n    public:\n        double drho=0.0; // delta rho =difference to reference (=HF?) density\n        double devir14=0.0; // diagnostic parameter\n        double devir17=0.0; // diagnostic parameter\n        double Ex_vir=0.0; // local exchange energy\n        double Ex_conv=0.0; //\n        double Ex_HF=0.0; // HF exchange energy\n        double E_kin_HF=0.0;\n        double E_kin_KS=0.0; // kinetic energy of the KS reference\n        double Econv=0.0; // final energy using conventional method\n\n        OEPResults() = default;\n\n        /// construct from JSON\n        explicit OEPResults(const nlohmann::json& j) : SCFResults(j) {\n            model = j.value(\"model\", \"oaep\");\n            drho = j.value(\"drho\", 0.0);\n            devir14 = j.value(\"dvir14\", 0.0);\n            devir17 = j.value(\"dvir17\", 0.0);\n            Ex_vir = j.value(\"Ex_vir\", 0.0);\n            Ex_conv = j.value(\"Ex_conv\", 0.0);\n            Ex_HF = j.value(\"Ex_HF\", 0.0);\n            E_kin_HF = j.value(\"E_kin_HF\", 0.0);\n            E_kin_KS = j.value(\"E_kin_KS\", 0.0);\n            Econv = j.value(\"Econv\", 0.0);\n        }\n\n        nlohmann::json to_json() const override {\n            nlohmann::json j;\n            j = SCFResults::to_json();\n            j[\"model\"] = model;\n            j[\"drho\"] = drho;\n            j[\"devir14\"] = devir14;\n            j[\"devir17\"] = devir17;\n            j[\"Ex_vir\"] = Ex_vir;\n            j[\"Ex_conv\"] = Ex_conv;\n            j[\"Ex_HF\"] = Ex_HF;\n            j[\"E_kin_HF\"] = E_kin_HF;\n            j[\"E_kin_KS\"] = E_kin_KS;\n            j[\"Econv\"] = Econv;\n            return j;\n        }\n\n    };\n\n    class ResponseResults: public ResultsBase {\n        virtual nlohmann::json to_json() const {\n            MADNESS_EXCEPTION(\"to_json not implemented for ConvergenceResults\", 1);\n        }\n\n    };\n\n\n}\n#endif //RESULTS_H\n"
  },
  {
    "path": "src/madness/chem/SAP.cc",
    "content": "//\n// Created by Jonathon Misiewicz on 2/10/25.\n//\n\n#include <madness/chem/SAP.h>\n\nnamespace madness {\n\n// Generated from psi4's psi4/libfock/sap.cc file.\n// Contains SAP potentials on a grid for atoms 1-118.\n// ...which obligates us to include the following:\n\n/*\n  Copyright (c) 2019, Susi Lehtola\n  All rights reserved.\n\n  Redistribution and use in source and binary forms, with or without\n  modification, are permitted provided that the following conditions are met:\n  * Redistributions of source code must retain the above copyright\n  notice, this list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright\n  notice, this list of conditions and the following disclaimer in the\n  documentation and/or other materials provided with the distribution.\n  * Neither the name of the <organization> nor the\n  names of its contributors may be used to endorse or promote products\n  derived from this software without specific prior written permission.\n\n  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n  \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n  COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n  SUCH DAMAGE.\n*/\n\nstd::vector<double> grid( {0.00000000000000e+00, 7.74564534039568e-10, 2.47256327461087e-08, 1.86997862087340e-07, 7.83531011839395e-07,\n                          2.37369448442132e-06, 5.85385578447464e-06, 1.25192693640128e-05, 2.41120079015646e-05, 4.28530598081574e-05,\n                          7.14571735608571e-05, 1.13129528705579e-04, 1.71543841230856e-04, 2.50802052874775e-04, 3.55376294767219e-04,\n                          4.90034340610786e-04, 6.59750258771429e-04, 8.69602422403842e-04, 1.12466142949409e-03, 1.42987080942386e-03,\n                          1.78992364014940e-03, 2.20913836324745e-03, 2.69133715810767e-03, 3.23973021906902e-03, 3.85680917042725e-03,\n                          4.54425265659531e-03, 5.30284686331574e-03, 6.13242336803442e-03, 7.03181629276860e-03, 7.99884025229928e-03,\n                          9.03029006708050e-03, 1.01219626578657e-02, 1.12687009724886e-02, 1.24644592296948e-02, 1.37023882155871e-02,\n                          1.49749388498821e-02, 1.62739817657269e-02, 1.75909402310371e-02, 1.89169333923840e-02, 2.02429265537309e-02,\n                          2.15598850190411e-02, 2.28589279348859e-02, 2.41314785691809e-02, 2.53694075550732e-02, 2.65651658122794e-02,\n                          2.77119041269022e-02, 2.88035767176875e-02, 2.98350265324687e-02, 3.08020504919994e-02, 3.17014434167336e-02,\n                          3.25310199214522e-02, 3.32896141281727e-02, 3.39770576143407e-02, 3.45941365656990e-02, 3.51425296266603e-02,\n                          3.56247284215205e-02, 3.60439431446186e-02, 3.64039959753441e-02, 3.67092053552739e-02, 3.69642643623641e-02,\n                          3.71741165259965e-02, 3.73438324441572e-02, 3.74784904900007e-02, 3.75830647318932e-02, 3.76623229435371e-02,\n                          3.77207372560624e-02, 3.77624096112071e-02, 3.77910137249598e-02, 3.78097547768664e-02, 3.78213475154040e-02,\n                          3.78280129289835e-02, 3.78314930902835e-02, 3.78330832537561e-02, 3.78336797869059e-02, 3.78338420591352e-02,\n                          3.78338660102034e-02, 3.78338692887670e-02, 3.78339467173722e-02, 3.78344713082705e-02, 3.78363997704733e-02,\n                          3.78415404238543e-02, 3.78527910300104e-02, 3.78743388654655e-02, 3.79118156730933e-02, 3.79724014263881e-02,\n                          3.80648723179728e-02, 3.81995899976738e-02, 3.83884307919462e-02, 3.86446553881524e-02, 3.89827212156132e-02,\n                          3.94180414519212e-02, 3.99666961805422e-02, 4.06451026796855e-02, 4.14696530921280e-02, 4.24563287754274e-02,\n                          4.36203014320401e-02, 4.49755316463183e-02, 4.65343756946706e-02, 4.83072114386611e-02, 5.03020937588608e-02,\n                          5.25244493483274e-02, 5.49768197749344e-02, 5.76586605651183e-02, 6.05662026884007e-02, 6.36923812686800e-02,\n                          6.70268346561297e-02, 7.05559752077735e-02, 7.42631312932333e-02, 7.81287582138778e-02, 8.21307139477169e-02,\n                          8.62445939566306e-02, 9.04441177619647e-02, 9.47015586503668e-02, 9.89882067501835e-02, 1.03274854850000e-01,\n                          1.07532295738402e-01, 1.11731819543736e-01, 1.15845699552650e-01, 1.19847655286489e-01, 1.23713282207134e-01,\n                          1.27420438292594e-01, 1.30949578844237e-01, 1.34284032231687e-01, 1.37410210811966e-01, 1.40317752935249e-01,\n                          1.42999593725433e-01, 1.45451964152040e-01, 1.47674319741506e-01, 1.49669202061706e-01, 1.51442037805696e-01,\n                          1.53000881854049e-01, 1.54356112068327e-01, 1.55520084724940e-01, 1.56506760408239e-01, 1.57331310820682e-01,\n                          1.58009717319825e-01, 1.58558372048446e-01, 1.58993692284754e-01, 1.59331758112215e-01, 1.59587982708421e-01,\n                          1.59776823502693e-01, 1.59911541182394e-01, 1.60004012073979e-01, 1.60064597827274e-01, 1.60102074634902e-01,\n                          1.60123622470357e-01, 1.60134873076513e-01, 1.60140013729894e-01, 1.60141942192096e-01, 1.60142466782995e-01,\n                          1.60142544211600e-01, 1.60142551561710e-01, 1.60142701413062e-01, 1.60143716679379e-01, 1.60147448926215e-01,\n                          1.60157397883103e-01, 1.60179171729209e-01, 1.60220874304751e-01, 1.60293404996033e-01, 1.60410659555492e-01,\n                          1.60589622976194e-01, 1.60850348663762e-01, 1.61215821451274e-01, 1.61711705392906e-01, 1.62365980655838e-01,\n                          1.63208477113433e-01, 1.64270315334478e-01, 1.65583268477170e-01, 1.67179061053879e-01, 1.69088622564332e-01,\n                          1.71341315543301e-01, 1.73964158589697e-01, 1.76981065407121e-01, 1.80412120776561e-01, 1.84272913700736e-01,\n                          1.88573946723051e-01, 1.93320138663612e-01, 1.98510435776210e-01, 2.04137543672572e-01, 2.10187789353851e-01,\n                          2.16641119414426e-01, 2.23471237026998e-01, 2.30645876773227e-01, 2.38127212845837e-01, 2.45872392711143e-01,\n                          2.53834185077787e-01, 2.61961728055316e-01, 2.70201360784824e-01, 2.78497519653254e-01, 2.86793678521684e-01,\n                          2.95033311251191e-01, 3.03160854228721e-01, 3.11122646595364e-01, 3.18867826460670e-01, 3.26349162533280e-01,\n                          3.33523802279509e-01, 3.40353919892081e-01, 3.46807249952656e-01, 3.52857495633936e-01, 3.58484603530297e-01,\n                          3.63674900642895e-01, 3.68421092583456e-01, 3.72722125605771e-01, 3.76582918529946e-01, 3.80013973899386e-01,\n                          3.83030880716811e-01, 3.85653723763206e-01, 3.87906416742175e-01, 3.89815978252628e-01, 3.91411770829337e-01,\n                          3.92724723972029e-01, 3.93786562193074e-01, 3.94629058650669e-01, 3.95283333913601e-01, 3.95779217855233e-01,\n                          3.96144690642745e-01, 3.96405416330313e-01, 3.96584379751016e-01, 3.96701634310474e-01, 3.96774165001756e-01,\n                          3.96815867577298e-01, 3.96837641423404e-01, 3.96847590380292e-01, 3.96851322627128e-01, 3.96852337893446e-01,\n                          3.96852487744797e-01, 3.96852501080501e-01, 3.96852763595511e-01, 3.96854542175721e-01, 3.96861080460548e-01,\n                          3.96878509402610e-01, 3.96916653612757e-01, 3.96989709691015e-01, 3.97116771576032e-01, 3.97322182348883e-01,\n                          3.97635696933973e-01, 3.98092445611658e-01, 3.98732694042811e-01, 3.99601401444597e-01, 4.00747584484612e-01,\n                          4.02223500212562e-01, 4.04083666765013e-01, 4.06383745508240e-01, 4.09179312589000e-01, 4.12524551422180e-01,\n                          4.16470900356858e-01, 4.21065691550599e-01, 4.26350817893211e-01, 4.32361464629548e-01, 4.39124941137697e-01,\n                          4.46659646152579e-01, 4.54974196640938e-01, 4.64066746612100e-01, 4.73924517493193e-01, 4.84523556430928e-01,\n                          4.95828733144949e-01, 5.07793979903267e-01, 5.20362772980513e-01, 5.33468847761119e-01, 5.47037133628609e-01,\n                          5.60984889100643e-01, 5.75223012480244e-01, 5.89657498736383e-01, 6.04191009524582e-01, 6.18724520312781e-01,\n                          6.33159006568921e-01, 6.47397129948521e-01, 6.61344885420555e-01, 6.74913171288045e-01, 6.88019246068651e-01,\n                          7.00588039145897e-01, 7.12553285904216e-01, 7.23858462618236e-01, 7.34457501555971e-01, 7.44315272437064e-01,\n                          7.53407822408226e-01, 7.61722372896585e-01, 7.69257077911467e-01, 7.76020554419616e-01, 7.82031201155953e-01,\n                          7.87316327498565e-01, 7.91911118692306e-01, 7.95857467626984e-01, 7.99202706460164e-01, 8.01998273540924e-01,\n                          8.04298352284151e-01, 8.06158518836602e-01, 8.07634434564552e-01, 8.08780617604567e-01, 8.09649325006353e-01,\n                          8.10289573437506e-01, 8.10746322115191e-01, 8.11059836700281e-01, 8.11265247473132e-01, 8.11392309358149e-01,\n                          8.11465365436407e-01, 8.11503509646554e-01, 8.11520938588616e-01, 8.11527476873443e-01, 8.11529255453653e-01,\n                          8.11529517968663e-01, 8.11529541176345e-01, 8.11529996288764e-01, 8.11533079746512e-01, 8.11544414925490e-01,\n                          8.11574630828117e-01, 8.11640760013437e-01, 8.11767414594025e-01, 8.11987697014585e-01, 8.12343809961018e-01,\n                          8.12887338428862e-01, 8.13679186466493e-01, 8.14789161138720e-01, 8.16295206552722e-01, 8.18282301065180e-01,\n                          8.20841040761609e-01, 8.24065941688939e-01, 8.28053501868532e-01, 8.32900071579870e-01, 8.38699586575474e-01,\n                          8.45541223590310e-01, 8.53507040609252e-01, 8.62669665762836e-01, 8.73090098389325e-01, 8.84815683732401e-01,\n                          8.97878318988171e-01, 9.12292943068421e-01, 9.28056355648415e-01, 9.45146402996031e-01, 9.63521558948635e-01,\n                          9.83120919457849e-01, 1.00386461862596e+00, 1.02565466339202e+00, 1.04837617327936e+00, 1.07189900117812e+00,\n                          1.09607970128622e+00, 1.12076380133619e+00, 1.14578832833438e+00, 1.17098453044675e+00, 1.19618073255911e+00,\n                          1.22120525955731e+00, 1.24588935960728e+00, 1.27007005971537e+00, 1.29359288761414e+00, 1.31631439750148e+00,\n                          1.33810444226754e+00, 1.35884814143565e+00, 1.37844750194486e+00, 1.39682265789747e+00, 1.41391270524508e+00,\n                          1.42967611782508e+00, 1.44409074190533e+00, 1.45715337716110e+00, 1.46887896250417e+00, 1.47929939513066e+00,\n                          1.48846202028425e+00, 1.49642783730319e+00, 1.50326947431802e+00, 1.50906898931363e+00, 1.51391555902497e+00,\n                          1.51790311920456e+00, 1.52112802013189e+00, 1.52368675982832e+00, 1.52567385434078e+00, 1.52717989975478e+00,\n                          1.52828987442701e+00, 1.52908172246464e+00, 1.52962525093248e+00, 1.52998136387891e+00, 1.53020164629947e+00,\n                          1.53032830088006e+00, 1.53039443006538e+00, 1.53042464596801e+00, 1.53043598114699e+00, 1.53043906460474e+00,\n                          1.53043951971715e+00, 1.53043956057345e+00, 1.53044036881866e+00, 1.53044584480621e+00, 1.53046597522602e+00,\n                          1.53051963638178e+00, 1.53063707680903e+00, 1.53086200575658e+00, 1.53125321066044e+00, 1.53188564029607e+00,\n                          1.53285090571065e+00, 1.53425716788373e+00, 1.53622839887814e+00, 1.53890302152796e+00, 1.54243195096192e+00,\n                          1.54697607896990e+00, 1.55270325889653e+00, 1.55978486392298e+00, 1.56839200485204e+00, 1.57869150446938e+00,\n                          1.59084173390576e+00, 1.60498842193063e+00, 1.62126055060600e+00, 1.63976645013905e+00, 1.66059020209859e+00,\n                          1.68378845349035e+00, 1.70938773469079e+00, 1.73738236216545e+00, 1.76773299256309e+00, 1.80036587856233e+00,\n                          1.83517285918360e+00, 1.87201209863831e+00, 1.91070956866812e+00, 1.95106125024279e+00, 1.99283601194713e+00,\n                          2.03577910489527e+00, 2.07961619803354e+00, 2.12405786366203e+00, 2.16880441129773e+00, 2.21355095893343e+00,\n                          2.25799262456193e+00, 2.30182971770019e+00, 2.34477281064834e+00, 2.38654757235268e+00, 2.42689925392735e+00,\n                          2.46559672395716e+00, 2.50243596341186e+00, 2.53724294403314e+00, 2.56987583003238e+00, 2.60022646043001e+00,\n                          2.62822108790467e+00, 2.65382036910512e+00, 2.67701862049687e+00, 2.69784237245642e+00, 2.71634827198947e+00,\n                          2.73262040066483e+00, 2.74676708868971e+00, 2.75891731812608e+00, 2.76921681774343e+00, 2.77782395867248e+00,\n                          2.78490556369893e+00, 2.79063274362556e+00, 2.79517687163354e+00, 2.79870580106750e+00, 2.80138042371732e+00,\n                          2.80335165471173e+00, 2.80475791688482e+00, 2.80572318229939e+00, 2.80635561193503e+00, 2.80674681683888e+00,\n                          2.80697174578644e+00, 2.80708918621368e+00, 2.80714284736945e+00, 2.80716297778926e+00, 2.80716845377681e+00,\n                          2.80716926202201e+00, 2.80716933652781e+00, 2.80717083214942e+00, 2.80718096521951e+00, 2.80721821566121e+00,\n                          2.80731751323041e+00, 2.80753483148951e+00, 2.80795105244894e+00, 2.80867495963022e+00, 2.80984524239094e+00,\n                          2.81163142287735e+00, 2.81423364814557e+00, 2.81788132295423e+00, 2.82283059256804e+00, 2.82936071868432e+00,\n                          2.83776942436573e+00, 2.84836731472069e+00, 2.86147150815776e+00, 2.87739863756603e+00, 2.89645740105067e+00,\n                          2.91894085730732e+00, 2.94511867090741e+00, 2.97522951738903e+00, 3.00947385695645e+00, 3.04800727879293e+00,\n                          3.09093460564947e+00, 3.13830493080142e+00, 3.19010773712238e+00, 3.24627022150018e+00, 3.30665591781433e+00,\n                          3.37106467900872e+00, 3.43923404429894e+00, 3.51084198217487e+00, 3.58551096454407e+00, 3.66281329305810e+00,\n                          3.74227756629515e+00, 3.82339614690749e+00, 3.90563346187864e+00, 3.98843494737088e+00, 4.07123643286313e+00,\n                          4.15347374783428e+00, 4.23459232844661e+00, 4.31405660168366e+00, 4.39135893019769e+00, 4.46602791256689e+00,\n                          4.53763585044283e+00, 4.60580521573305e+00, 4.67021397692744e+00, 4.73059967324159e+00, 4.78676215761938e+00,\n                          4.83856496394034e+00, 4.88593528909229e+00, 4.92886261594884e+00, 4.96739603778531e+00, 5.00164037735273e+00,\n                          5.03175122383435e+00, 5.05792903743445e+00, 5.08041249369110e+00, 5.09947125717573e+00, 5.11539838658400e+00,\n                          5.12850258002107e+00, 5.13910047037603e+00, 5.14750917605745e+00, 5.15403930217373e+00, 5.15898857178754e+00,\n                          5.16263624659620e+00, 5.16523847186442e+00, 5.16702465235083e+00, 5.16819493511155e+00, 5.16891884229283e+00,\n                          5.16933506325225e+00, 5.16955238151135e+00, 5.16965167908056e+00, 5.16968892952225e+00, 5.16969906259234e+00,\n                          5.16970055821395e+00, 5.16970070074519e+00, 5.16970361247163e+00, 5.16972333987315e+00, 5.16979586028538e+00,\n                          5.16998917613145e+00, 5.17041225862441e+00, 5.17122257158139e+00, 5.17263189841936e+00, 5.17491024424232e+00,\n                          5.17838764046389e+00, 5.18345374010175e+00, 5.19055515605250e+00, 5.20019056052898e+00, 5.21290362959218e+00,\n                          5.22927398050981e+00, 5.24990630974935e+00, 5.27541799408998e+00, 5.30642546508522e+00, 5.34352970658452e+00,\n                          5.38730125510908e+00, 5.43826510271255e+00, 5.49688591095665e+00, 5.56355394250644e+00, 5.63857210361471e+00,\n                          5.72214446673726e+00, 5.81436660831299e+00, 5.91521805324665e+00, 6.02455706599185e+00, 6.14211796971732e+00,\n                          6.26751111140535e+00, 6.40022552357701e+00, 6.53963426446189e+00, 6.68500234967725e+00, 6.83549712169932e+00,\n                          6.99020084039182e+00, 7.14812522029963e+00, 7.30822758986854e+00, 7.46942830557509e+00, 7.63062902128164e+00,\n                          7.79073139085055e+00, 7.94865577075836e+00, 8.10335948945085e+00, 8.25385426147293e+00, 8.39922234668829e+00,\n                          8.53863108757317e+00, 8.67134549974483e+00, 8.79673864143286e+00, 8.91429954515833e+00, 9.02363855790353e+00,\n                          9.12449000283719e+00, 9.21671214441292e+00, 9.30028450753547e+00, 9.37530266864374e+00, 9.44197070019353e+00,\n                          9.50059150843763e+00, 9.55155535604110e+00, 9.59532690456566e+00, 9.63243114606496e+00, 9.66343861706020e+00,\n                          9.68895030140082e+00, 9.70958263064037e+00, 9.72595298155800e+00, 9.73866605062120e+00, 9.74830145509768e+00,\n                          9.75540287104843e+00, 9.76046897068629e+00, 9.76394636690786e+00, 9.76622471273082e+00, 9.76763403956879e+00,\n                          9.76844435252577e+00, 9.76886743501873e+00, 9.76906075086480e+00, 9.76913327127703e+00, 9.76915299867855e+00,\n                          9.76915591040499e+00, 9.76915619860098e+00, 9.76916219846504e+00, 9.76920284848150e+00, 9.76935228306099e+00,\n                          9.76975062707579e+00, 9.77062242513200e+00, 9.77229214503906e+00, 9.77519618483832e+00, 9.77989091339106e+00,\n                          9.78705638895934e+00, 9.79749552527532e+00, 9.81212860682633e+00, 9.83198319082184e+00, 9.85817956879146e+00,\n                          9.89191209222870e+00, 9.93442679048652e+00, 9.98699582179647e+00, 1.00508893966709e+01, 1.01273458942923e+01,\n                          1.02175409544910e+01, 1.03225563687840e+01, 1.04433496124935e+01, 1.05807248555829e+01, 1.07353062625751e+01,\n                          1.09075143424092e+01, 1.10975460386012e+01, 1.13053591604470e+01, 1.15306616495989e+01, 1.17729060559758e+01,\n                          1.20312894658455e+01, 1.23047589865396e+01, 1.25920227503353e+01, 1.28915662583656e+01, 1.32016737478116e+01,\n                          1.35204541357752e+01, 1.38458709746296e+01, 1.41757757494884e+01, 1.45079437615262e+01, 1.48401117735640e+01,\n                          1.51700165484228e+01, 1.54954333872772e+01, 1.58142137752408e+01, 1.61243212646868e+01, 1.64238647727170e+01,\n                          1.67111285365127e+01, 1.69845980572069e+01, 1.72429814670766e+01, 1.74852258734535e+01, 1.77105283626053e+01,\n                          1.79183414844512e+01, 1.81083731806431e+01, 1.82805812604773e+01, 1.84351626674695e+01, 1.85725379105589e+01,\n                          1.86933311542684e+01, 1.87983465685614e+01, 1.88885416287600e+01, 1.89649981263815e+01, 1.90288917012559e+01,\n                          1.90814607325659e+01, 1.91239754308237e+01, 1.91577079542609e+01, 1.91839043322306e+01, 1.92037589162261e+01,\n                          1.92183919977771e+01, 1.92288311340931e+01, 1.92359966096613e+01, 1.92406913382141e+01, 1.92435953780133e+01,\n                          1.92452650979204e+01, 1.92461368959766e+01, 1.92465352399914e+01, 1.92466846745709e+01, 1.92467253245873e+01,\n                          1.92467313244514e+01, 1.92467319433609e+01, 1.92467450814034e+01, 1.92468340936939e+01, 1.92471613140832e+01,\n                          1.92480335772770e+01, 1.92499425738442e+01, 1.92535987985263e+01, 1.92599578423078e+01, 1.92702379990799e+01,\n                          1.92859284083041e+01, 1.93087872289342e+01, 1.93408296294082e+01, 1.93843056757497e+01, 1.94416684964889e+01,\n                          1.95155333909890e+01, 1.96086288188291e+01, 1.97237404546042e+01, 1.98636497079429e+01, 2.00310682866674e+01,\n                          2.02285705167748e+01, 2.04585252224186e+01, 2.07230290096769e+01, 2.10238427883022e+01, 2.13623333059298e+01,\n                          2.17394213608060e+01, 2.21555382047478e+01, 2.26105914517851e+01, 2.31039415749319e+01, 2.36343898099582e+01,\n                          2.42001779979100e+01, 2.47990005951181e+01, 2.54280287686536e+01, 2.60839461849717e+01, 2.67629957981511e+01,\n                          2.74610366597973e+01, 2.81736095129742e+01, 2.88960097044501e+01, 2.96233657592419e+01, 3.03507218140337e+01,\n                          3.10731220055095e+01, 3.17856948586865e+01, 3.24837357203327e+01, 3.31627853335120e+01, 3.38187027498302e+01,\n                          3.44477309233657e+01, 3.50465535205737e+01, 3.56123417085256e+01, 3.61427899435518e+01, 3.66361400666986e+01,\n                          3.70911933137359e+01, 3.75073101576777e+01, 3.78843982125540e+01, 3.82228887301816e+01, 3.85237025088068e+01,\n                          3.87882062960652e+01, 3.90181610017090e+01, 3.92156632318163e+01, 3.93830818105409e+01, 3.95229910638796e+01,\n                          3.96381026996546e+01, 3.97311981274948e+01, 3.98050630219949e+01, 3.98624258427341e+01, 3.99059018890755e+01,\n                          3.99379442895496e+01, 3.99608031101797e+01, 3.99764935194039e+01, 3.99867736761760e+01, 3.99931327199574e+01,\n                          3.99967889446395e+01, 3.99986979412068e+01, 3.99995702044006e+01, 3.99998974247898e+01, 3.99999864370804e+01,\n                          3.99999995751228e+01});\n\nstd::vector<CubicInterpolationTable<double>> SAPCharges = {\nmadness::CubicInterpolationTable<double>(grid, {1.00000000000000e+00,  9.99999999790540e-01,  9.99999993313632e-01,  9.99999949431552e-01,\n                                                9.99999788115312e-01,  9.99999358097193e-01,  9.99998416971188e-01,  9.99996614441852e-01,\n                                                9.99993479326044e-01,  9.99988410796813e-01,  9.99980674227977e-01,  9.99969401856535e-01,\n                                                9.99953598333122e-01,  9.99932151083708e-01,  9.99903845264262e-01,  9.99867382958964e-01,\n                                                9.99821406156240e-01,  9.99764522938550e-01,  9.99695336243635e-01,  9.99612474497642e-01,\n                                                9.99514623383729e-01,  9.99400557992063e-01,  9.99269174596246e-01,  9.99119521314499e-01,\n                                                9.98950826938776e-01,  9.98762527248958e-01,  9.98554288170773e-01,  9.98326025184220e-01,\n                                                9.98077918444355e-01,  9.97810423139133e-01,  9.97524274681505e-01,  9.97220488416910e-01,\n                                                9.96900353624600e-01,  9.96565421703067e-01,  9.96217488556306e-01,  9.95858571337571e-01,\n                                                9.95490879857821e-01,  9.95116783122789e-01,  9.94738771619841e-01,  9.94359416126472e-01,\n                                                9.93981323949044e-01,  9.93607093615610e-01,  9.93239269133338e-01,  9.92880294973227e-01,\n                                                9.92532472958147e-01,  9.92197922202115e-01,  9.91878543178888e-01,  9.91575986888032e-01,\n                                                9.91291629940400e-01,  9.91026556208043e-01,  9.90781545482897e-01,  9.90557069372290e-01,\n                                                9.90353294435974e-01,  9.90170092347772e-01,  9.90007056653587e-01,  9.89863525504099e-01,\n                                                9.89738609571696e-01,  9.89631224222556e-01,  9.89540124910079e-01,  9.89463944687503e-01,\n                                                9.89401232706345e-01,  9.89350492572491e-01,  9.89310219471413e-01,  9.89278935044972e-01,\n                                                9.89255219100647e-01,  9.89237737355285e-01,  9.89225264554894e-01,  9.89216702464576e-01,\n                                                9.89211092383947e-01,  9.89207622008622e-01,  9.89205626623656e-01,  9.89204584776351e-01,\n                                                9.89204108730238e-01,  9.89203930146078e-01,  9.89203881566590e-01,  9.89203874396350e-01,\n                                                9.89203873414845e-01,  9.89203850235011e-01,  9.89203693187906e-01,  9.89203115861331e-01,\n                                                9.89201576883739e-01,  9.89198208681626e-01,  9.89191757453891e-01,  9.89180536468371e-01,\n                                                9.89162394339989e-01,  9.89134699446608e-01,  9.89094341101192e-01,  9.89037747553913e-01,\n                                                9.88960920373675e-01,  9.88859484282343e-01,  9.88728751110135e-01,  9.88563796224394e-01,\n                                                9.88359545564899e-01,  9.88110871295954e-01,  9.87812694047368e-01,  9.87460089742692e-01,\n                                                9.87048399076242e-01,  9.86573337769823e-01,  9.86031105785810e-01,  9.85418493671339e-01,\n                                                9.84732984145031e-01,  9.83972846912486e-01,  9.83137224524744e-01,  9.82226206904253e-01,\n                                                9.81240891996892e-01,  9.80183429913809e-01,  9.79057047951266e-01,  9.77866054061298e-01,\n                                                9.76615816718322e-01,  9.75312719696004e-01,  9.73964091022580e-01,  9.72578106288398e-01,\n                                                9.71163667485349e-01,  9.69730259599867e-01,  9.68287788188899e-01,  9.66846402072326e-01,\n                                                9.65416306014440e-01,  9.64007568793376e-01,  9.62629932340155e-01,  9.61292627655994e-01,\n                                                9.60004202993572e-01,  9.58772369336270e-01,  9.57603867562447e-01,  9.56504360880955e-01,\n                                                9.55478355214582e-01,  9.54529149235639e-01,  9.53658814765648e-01,  9.52868207277736e-01,\n                                                9.52157005319322e-01,  9.51523776831321e-01,  9.50966069600242e-01,  9.50480522457612e-01,\n                                                9.50062993348802e-01,  9.49708700037774e-01,  9.49412368998763e-01,  9.49168387969669e-01,\n                                                9.48970957700549e-01,  9.48814238616062e-01,  9.48692488411544e-01,  9.48600187004515e-01,\n                                                9.48532145750196e-01,  9.48483598383361e-01,  9.48450271750842e-01,  9.48428435031300e-01,\n                                                9.48414926784007e-01,  9.48407159810667e-01,  9.48403104439453e-01,  9.48401251435797e-01,\n                                                9.48400556298657e-01,  9.48400367203416e-01,  9.48400339293315e-01,  9.48400336643876e-01,\n                                                9.48400282628093e-01,  9.48399916662524e-01,  9.48398571324079e-01,  9.48394985066612e-01,\n                                                9.48387136228384e-01,  9.48372103225717e-01,  9.48345955893161e-01,  9.48303681923522e-01,\n                                                9.48239151223584e-01,  9.48145119783019e-01,  9.48013273411897e-01,  9.47834310497361e-01,\n                                                9.47598061821630e-01,  9.47293644523555e-01,  9.46909646512691e-01,  9.46434337077344e-01,\n                                                9.45855899062131e-01,  9.45162677797574e-01,  9.44343441893065e-01,  9.43387650988362e-01,\n                                                9.42285725525110e-01,  9.41029313484043e-01,  9.39611548792564e-01,  9.38027295733089e-01,\n                                                9.36273373209055e-01,  9.34348752231148e-01,  9.32254719586146e-01,  9.29995000481684e-01,\n                                                9.27575833159314e-01,  9.25005989148420e-01,  9.22296734060951e-01,  9.19461725603820e-01,\n                                                9.16516847743278e-01,  9.13479982557630e-01,  9.10370724072832e-01,  9.07210041072662e-01,\n                                                9.04019898292719e-01,  9.00822847353322e-01,  8.97641600117209e-01,  8.94498597793687e-01,\n                                                8.91415589039954e-01,  8.88413229584165e-01,  8.85510714616157e-01,  8.82725453496669e-01,\n                                                8.80072794374945e-01,  8.77565804224948e-01,  8.75215107741246e-01,  8.73028786578729e-01,\n                                                8.71012338645555e-01,  8.69168695604714e-01,  8.67498295417341e-01,  8.65999205661200e-01,\n                                                8.64667292458114e-01,  8.63496429117011e-01,  8.62478738018409e-01,  8.61604858811278e-01,\n                                                8.60864235652994e-01,  8.60245415995663e-01,  8.59736353314129e-01,  8.59324706194997e-01,\n                                                8.58998126377246e-01,  8.58744528667522e-01,  8.58552336156778e-01,  8.58410694842260e-01,\n                                                8.58309652603983e-01,  8.58240298482511e-01,  8.58194859331220e-01,  8.58166752139828e-01,\n                                                8.58150591609988e-01,  8.58142153867933e-01,  8.58138298482223e-01,  8.58136852175872e-01,\n                                                8.58136458743772e-01,  8.58136400673956e-01,  8.58136395506156e-01,  8.58136293777358e-01,\n                                                8.58135604548940e-01,  8.58133070859724e-01,  8.58126316877393e-01,  8.58111535459414e-01,\n                                                8.58083225387172e-01,  8.58033988024666e-01,  8.57954391492413e-01,  8.57832908560270e-01,\n                                                8.57655932400123e-01,  8.57407872156986e-01,  8.57071328056636e-01,  8.56627343534077e-01,\n                                                8.56055729704343e-01,  8.55335455463712e-01,  8.54445094651830e-01,  8.53363320052175e-01,\n                                                8.52069432567351e-01,  8.50543912665226e-01,  8.48768980128195e-01,  8.46729147228841e-01,\n                                                8.44411749698366e-01,  8.41807439284042e-01,  8.38910621393254e-01,  8.35719821430891e-01,\n                                                8.32237964129018e-01,  8.28472551628015e-01,  8.24435728450461e-01,  8.20144224890102e-01,\n                                                8.15619174678720e-01,  8.10885807914427e-01,  8.05973025818683e-01,  8.00912869509921e-01,\n                                                7.95739900156931e-01,  7.90490512134567e-01,  7.85202203757724e-01,  7.79912831564055e-01,\n                                                7.74659873870008e-01,  7.69479727533658e-01,  7.64407058772100e-01,  7.59474224862845e-01,\n                                                7.54710779026111e-01,  7.50143066155939e-01,  7.45793912710776e-01,  7.41682410271967e-01,\n                                                7.37823789212301e-01,  7.34229376662073e-01,  7.30906631499689e-01,  7.27859248336416e-01,\n                                                7.25087322270334e-01,  7.22587566387974e-01,  7.20353574425979e-01,  7.18376121516963e-01,\n                                                7.16643496408670e-01,  7.15141858874070e-01,  7.13855616171664e-01,  7.12767812357436e-01,\n                                                7.11860524015567e-01,  7.11115255615864e-01,  7.10513327295628e-01,  7.10036247488597e-01,\n                                                7.09666062573522e-01,  7.09385675673369e-01,  7.09179126972127e-01,  7.09031828476612e-01,\n                                                7.08930747055830e-01,  7.08864530831428e-01,  7.08823575532237e-01,  7.08800029201531e-01,\n                                                7.08787735575645e-01,  7.08782118443550e-01,  7.08780011251583e-01,  7.08779438043163e-01,\n                                                7.08779353438761e-01,  7.08779345959296e-01,  7.08779199283856e-01,  7.08778205535960e-01,\n                                                7.08774552410482e-01,  7.08764814495441e-01,  7.08743503186002e-01,  7.08702689017195e-01,\n                                                7.08631711391562e-01,  7.08516988808567e-01,  7.08341940544239e-01,  7.08087028251289e-01,\n                                                7.07729923106438e-01,  7.07245800878027e-01,  7.06607763595423e-01,  7.05787382378217e-01,\n                                                7.04755351480968e-01,  7.03482238837032e-01,  7.01939313511165e-01,  7.00099425719574e-01,\n                                                6.97937910722369e-01,  6.95433484249811e-01,  6.92569094527709e-01,  6.89332694761111e-01,\n                                                6.85717900440588e-01,  6.81724498317170e-01,  6.77358778514502e-01,  6.72633668021509e-01,\n                                                6.67568652546015e-01,  6.62189483984850e-01,  6.56527681917805e-01,  6.50619848703137e-01,\n                                                6.44506827972043e-01,  6.38232744630939e-01,  6.31843970076954e-01,  6.25388058685370e-01,\n                                                6.18912700576028e-01,  6.12464731440663e-01,  6.06089233400806e-01,  5.99828752309069e-01,\n                                                5.93722647570977e-01,  5.87806581396317e-01,  5.82112146192627e-01,  5.76666622165948e-01,\n                                                5.71492852409100e-01,  5.66609219893515e-01,  5.62029709683259e-01,  5.57764040056991e-01,\n                                                5.53817847673218e-01,  5.50192914046812e-01,  5.46887423050674e-01,  5.43896241606761e-01,\n                                                5.41211217950961e-01,  5.38821493688015e-01,  5.36713827206016e-01,  5.34872926861755e-01,\n                                                5.33281792689907e-01,  5.31922065275352e-01,  5.30774379927899e-01,  5.29818723499681e-01,\n                                                5.29034790188221e-01,  5.28402331582943e-01,  5.27901495155522e-01,  5.27513144480612e-01,\n                                                5.27219153812507e-01,  5.27002669329587e-01,  5.26848329463894e-01,  5.26742437298864e-01,\n                                                5.26673079049078e-01,  5.26630184098186e-01,  5.26605523894273e-01,  5.26592649084105e-01,\n                                                5.26586766485831e-01,  5.26584559721556e-01,  5.26583959428303e-01,  5.26583870826281e-01,\n                                                5.26583862872312e-01,  5.26583705521899e-01,  5.26582639450517e-01,  5.26578720471546e-01,\n                                                5.26568274006193e-01,  5.26545412647872e-01,  5.26501632234053e-01,  5.26425503428844e-01,\n                                                5.26302474345393e-01,  5.26114797978260e-01,  5.25841596018760e-01,  5.25459067790575e-01,\n                                                5.24940849355446e-01,  5.24258523117360e-01,  5.23382272398407e-01,  5.22281668504918e-01,\n                                                5.20926569962445e-01,  5.19288105295286e-01,  5.17339702594177e-01,  5.15058121968135e-01,\n                                                5.12424441734797e-01,  5.09424946789192e-01,  5.06051868785014e-01,  5.02303933056477e-01,\n                                                4.98186676666371e-01,  4.93712515129061e-01,  4.88900551224068e-01,  4.83776136412817e-01,\n                                                4.78370211921861e-01,  4.72718470731391e-01,  4.66860391916023e-01,  4.60838203940902e-01,\n                                                4.54695833233983e-01,  4.48477889011121e-01,  4.42228725980651e-01,  4.35991614724750e-01,\n                                                4.29808036953549e-01,  4.23717111044170e-01,  4.17755143538058e-01,  4.11955295298503e-01,\n                                                4.06347347017745e-01,  4.00957547447137e-01,  3.95808528531653e-01,  3.90919273845508e-01,\n                                                3.86305129639604e-01,  3.81977850830854e-01,  3.77945676967768e-01,  3.74213435357345e-01,\n                                                3.70782670053128e-01,  3.67651796312835e-01,  3.64816280529975e-01,  3.62268845643458e-01,\n                                                3.59999701742114e-01,  3.57996801094379e-01,  3.56246116208161e-01,  3.54731938800279e-01,\n                                                3.53437196753485e-01,  3.52343785282190e-01,  3.51432907640477e-01,  3.50685419822802e-01,\n                                                3.50082172876901e-01,  3.49604345729352e-01,  3.49233760884675e-01,  3.48953175067557e-01,\n                                                3.48746536897564e-01,  3.48599204064609e-01,  3.48498113237627e-01,  3.48431897086970e-01,\n                                                3.48390944301113e-01,  3.48367400268647e-01,  3.48355108090105e-01,  3.48349491675805e-01,\n                                                3.48347384762248e-01,  3.48346811630424e-01,  3.48346727037359e-01,  3.48346719239387e-01,\n                                                3.48346562703765e-01,  3.48345502152477e-01,  3.48341603462528e-01,  3.48331211053900e-01,\n                                                3.48308467863608e-01,  3.48264913242720e-01,  3.48189175486267e-01,  3.48066774118755e-01,\n                                                3.47880045172373e-01,  3.47608200373938e-01,  3.47227528218256e-01,  3.46711741155158e-01,\n                                                3.46032468391994e-01,  3.45159888036437e-01,  3.44063485544829e-01,  3.42712917964366e-01,\n                                                3.41078955755829e-01,  3.39134466768633e-01,  3.36855401082055e-01,  3.34221731837678e-01,\n                                                3.31218306657363e-01,  3.27835567251086e-01,  3.24070101387513e-01,  3.19925000998674e-01,\n                                                3.15410011779194e-01,  3.10541471837384e-01,  3.05342048305496e-01,  2.99840290103507e-01,\n                                                2.94070021557284e-01,  2.88069605205461e-01,  2.81881103372881e-01,  2.75549367788787e-01,\n                                                2.69121085592385e-01,  2.62643809174532e-01,  2.56164996714705e-01,  2.49731089810745e-01,\n                                                2.43386653776031e-01,  2.37173604414610e-01,  2.31130541937951e-01,  2.25292208019768e-01,\n                                                2.19689076020054e-01,  2.14347077674633e-01,  2.09287462746761e-01,  2.04526781994089e-01,\n                                                2.00076978914762e-01,  1.95945572480801e-01,  1.92135911574273e-01,  1.88647482009556e-01,\n                                                1.85476248572588e-01,  1.82615017047739e-01,  1.80053804308735e-01,  1.77780207814755e-01,\n                                                1.75779768927903e-01,  1.74036327086473e-01,  1.72532363852277e-01,  1.71249337109860e-01,\n                                                1.70168006220616e-01,  1.69268748783482e-01,  1.68531868938816e-01,  1.67937896027075e-01,\n                                                1.67467871058894e-01,  1.67103617059003e-01,  1.66827988099128e-01,  1.66625090900136e-01,\n                                                1.66480472392488e-01,  1.66381266661843e-01,  1.66316295305783e-01,  1.66276116365435e-01,\n                                                1.66253018598457e-01,  1.66240959811535e-01,  1.66235450127334e-01,  1.66233383266731e-01,\n                                                1.66232821031681e-01,  1.66232738047007e-01,  1.66232730138652e-01,  1.66232568581405e-01,\n                                                1.66231474009297e-01,  1.66227450276528e-01,  1.66216724713397e-01,  1.66193253253633e-01,\n                                                1.66148307094743e-01,  1.66070159413903e-01,  1.65943889761968e-01,  1.65751322616994e-01,\n                                                1.65471114927852e-01,  1.65079004979401e-01,  1.64548231207548e-01,  1.63850124376579e-01,\n                                                1.62954869611769e-01,  1.61832426152929e-01,  1.60453582595942e-01,  1.58791114329713e-01,\n                                                1.56820998638915e-01,  1.54523632547381e-01,  1.51884990099907e-01,  1.48897650645452e-01,\n                                                1.45561628926795e-01,  1.41884942297413e-01,  1.37883860686077e-01,  1.33582800999888e-01,\n                                                1.29013848847717e-01,  1.24215915426977e-01,  1.19233564106024e-01,  1.14115567048588e-01,\n                                                1.08913274269087e-01,  1.03678892996465e-01,  9.84637819770476e-02,  9.33168622392341e-02,\n                                                8.82832331070225e-02,  8.34030615118251e-02,  7.87107866723638e-02,  7.42346543793636e-02,\n                                                6.99965688343311e-02,  6.60122280828112e-02,  6.22914934169647e-02,  5.88389344379752e-02,\n                                                5.56544894565250e-02,  5.27341844681709e-02,  5.00708615155111e-02,  4.76548771681355e-02,\n                                                4.54747425901496e-02,  4.35176870147789e-02,  4.17701355804130e-02,  4.02180999477364e-02,\n                                                3.88474857671823e-02,  3.76443249769927e-02,  3.65949432984738e-02,  3.56860744327466e-02,\n                                                3.49049326353676e-02,  3.42392548063765e-02,  3.36773221931638e-02,  3.32079704238121e-02,\n                                                3.28205949898890e-02,  3.25051575714161e-02,  3.22521968178028e-02,  3.20528454367721e-02,\n                                                3.18988537708867e-02,  3.17826185354252e-02,  3.16972141315143e-02,  3.16364230093091e-02,\n                                                3.15947609975750e-02,  3.15674933730132e-02,  3.15506377163116e-02,  3.15409502556864e-02,\n                                                3.15358933601307e-02,  3.15335830127306e-02,  3.15327163523875e-02,  3.15324806026613e-02,\n                                                3.15324458066006e-02,  3.15324423625687e-02,  3.15323706624069e-02,  3.15318848867641e-02,\n                                                3.15300991765803e-02,  3.15253395318628e-02,  3.15149252105877e-02,  3.14949883730791e-02,\n                                                3.14603425486013e-02,  3.14044114256822e-02,  3.13192303230468e-02,  3.11955330328435e-02,\n                                                3.10229359668034e-02,  3.07902290522832e-02,  3.04857780503039e-02,  3.00980355347359e-02,\n                                                2.96161476777308e-02,  2.90306317460367e-02,  2.83340859615145e-02,  2.75218808760512e-02,\n                                                2.65927718957334e-02,  2.55493684683711e-02,  2.43983988293198e-02,  2.31507213396172e-02,\n                                                2.18210542432321e-02,  2.04274233367376e-02,  1.89903581576728e-02,  1.75318972334192e-02,\n                                                1.60744867083719e-02,  1.46398700019137e-02,  1.32480664731981e-02,  1.19165241956751e-02,\n                                                1.06595081905859e-02,  9.48775514661471e-03,  8.40839406390870e-03,  7.42510446644284e-03,\n                                                6.53846356466181e-03,  5.74642281670079e-03,  5.04485258016840e-03,  4.42809935748623e-03,\n                                                3.88951112366409e-03,  3.42189978321572e-03,  3.01792349997465e-03,  2.67038351195814e-03,\n                                                2.37243887436545e-03,  2.11774810246812e-03,  1.90054946041585e-03,  1.71569255404502e-03,\n                                                1.55863365329001e-03,  1.42540612611908e-03,  1.31257563928466e-03,  1.21718759267664e-03,\n                                                1.13671201053245e-03,  1.06898923464183e-03,  1.01217845964452e-03,  9.64710354178444e-04,\n                                                9.25244516557400e-04,  8.92632141633709e-04,  8.65883957248847e-04,  8.44143234867922e-04,\n                                                8.26663512574211e-04,  8.12790585115630e-04,  8.01948285597542e-04,  7.93627573592359e-04,\n                                                7.87378434478958e-04,  7.82804079978661e-04,  7.79556925660896e-04,  7.77335816732228e-04,\n                                                7.75883986881221e-04,  7.74987271596528e-04,  7.74472158651673e-04,  7.74203341938784e-04,\n                                                7.74080544449829e-04,  7.74034483253749e-04,  7.74021953905302e-04,  7.74020104614692e-04,\n                                                7.74019913854396e-04,  7.74015864466793e-04,  7.73988429787265e-04,  7.73887584759048e-04,\n                                                7.73618828502687e-04,  7.73030964147825e-04,  7.71906290497726e-04,  7.69954088954861e-04,\n                                                7.66808496426186e-04,  7.62032050183770e-04,  7.55126294174846e-04,  7.45550744012502e-04,\n                                                7.32751105700813e-04,  7.16196833335792e-04,  6.95426851391789e-04,  6.70100617262692e-04,\n                                                6.40049861317049e-04,  6.05324673220720e-04,  5.66226584474472e-04,  5.23321429638401e-04,\n                                                4.77426417949900e-04,  4.29569063955193e-04,  3.80920016863961e-04,  3.32706551878226e-04,\n                                                2.86117423200283e-04,  2.42211853977659e-04,  2.01844995322831e-04,  1.65619242529447e-04,\n                                                1.33866064439880e-04,  1.06657649845299e-04,  8.38429439028454e-05,  6.50995031518109e-05,\n                                                4.99915320782973e-05,  3.80254425305093e-05,  2.86967653128078e-05,  2.15253281747874e-05,\n                                                1.60783073277493e-05,  1.19824459323681e-05,  8.92746560365865e-06,  6.66298275531219e-06,\n                                                4.99142658216822e-06,  3.75936816243705e-06,  2.84901304026253e-06,  2.17063228979963e-06,\n                                                1.65614121672153e-06,  1.25414630869347e-06,  9.26837509407363e-07,  6.48311710427230e-07,\n                                                4.02506077468168e-07,  -8.88178419700125e-16, -1.11022302462516e-15, -8.88178419700125e-16,\n                                                -8.88178419700125e-16, -8.88178419700125e-16, -1.11022302462516e-15, -8.88178419700125e-16,\n                                                -8.88178419700125e-16, -8.88178419700125e-16, -8.88178419700125e-16, -8.88178419700125e-16,\n                                                -8.88178419700125e-16, -8.88178419700125e-16, -8.88178419700125e-16, -1.11022302462516e-15,\n                                                -1.11022302462516e-15, -1.11022302462516e-15, -8.88178419700125e-16, -8.88178419700125e-16,\n                                                -1.11022302462516e-15, -8.88178419700125e-16, -1.11022302462516e-15, -8.88178419700125e-16,\n                                                -8.88178419700125e-16, -1.11022302462516e-15, -1.11022302462516e-15}),\nmadness::CubicInterpolationTable<double>(grid, {2.00000000000000e+00, 1.99999999861130e+00, 1.99999995567000e+00, 1.99999966473589e+00, 1.99999859522456e+00,\n                                                1.99999574424811e+00, 1.99998950469230e+00, 1.99997755418647e+00, 1.99995676899546e+00, 1.99992316611187e+00,\n                                                1.99987187597367e+00, 1.99979714730769e+00, 1.99969238463361e+00, 1.99955021799133e+00, 1.99936260350945e+00,\n                                                1.99912095254712e+00, 1.99881628634154e+00, 1.99843941240383e+00, 1.99798111833997e+00, 1.99743237834083e+00,\n                                                1.99678456728695e+00, 1.99602967724381e+00, 1.99516053107261e+00, 1.99417098793720e+00, 1.99305613563563e+00,\n                                                1.99181246491481e+00, 1.99043802122940e+00, 1.98893252977935e+00, 1.98729749010496e+00, 1.98553623704017e+00,\n                                                1.98365396543087e+00, 1.98165771672293e+00, 1.97955632631744e+00, 1.97736033147547e+00, 1.97508184052126e+00,\n                                                1.97273436511807e+00, 1.97033261844690e+00, 1.96789228316337e+00, 1.96542975399888e+00, 1.96296186076069e+00,\n                                                1.96050557822614e+00, 1.95807772997763e+00, 1.95569469355522e+00, 1.95337211439217e+00, 1.95112463583497e+00,\n                                                1.94896565213957e+00, 1.94690709069343e+00, 1.94495922886616e+00, 1.94313054987361e+00, 1.94142764089170e+00,\n                                                1.93985513542009e+00, 1.93841570061613e+00, 1.93711006904015e+00, 1.93593711301461e+00, 1.93489395863863e+00,\n                                                1.93397613545061e+00, 1.93317775682055e+00, 1.93249172540541e+00, 1.93190995743076e+00, 1.93142361918290e+00,\n                                                1.93102336891238e+00, 1.93069959736282e+00, 1.93044266034303e+00, 1.93024309714339e+00, 1.93009182914610e+00,\n                                                1.92998033367078e+00, 1.92990078891197e+00, 1.92984618673656e+00, 1.92981041109073e+00, 1.92978828079132e+00,\n                                                1.92977555651761e+00, 1.92976891285057e+00, 1.92976587720160e+00, 1.92976473840827e+00, 1.92976442862730e+00,\n                                                1.92976438290423e+00, 1.92976437664538e+00, 1.92976422883258e+00, 1.92976322737743e+00, 1.92975954589687e+00,\n                                                1.92974973222570e+00, 1.92972825425348e+00, 1.92968711756240e+00, 1.92961556860411e+00, 1.92949989449221e+00,\n                                                1.92932332747505e+00, 1.92906605890926e+00, 1.92870536421020e+00, 1.92821583695648e+00, 1.92756972721100e+00,\n                                                1.92673737631893e+00, 1.92568773805304e+00, 1.92438897405901e+00, 1.92280911012008e+00, 1.92091673877062e+00,\n                                                1.91868175315370e+00, 1.91607609661495e+00, 1.91307451221604e+00, 1.90965527601419e+00, 1.90580089750955e+00,\n                                                1.90149877010500e+00, 1.89674175383171e+00, 1.89152867214033e+00, 1.88586470448340e+00, 1.87976165699988e+00,\n                                                1.87323809512580e+00, 1.86631932460198e+00, 1.85903721122098e+00, 1.85142983469613e+00, 1.84354097802977e+00,\n                                                1.83541946034697e+00, 1.82711832787718e+00, 1.81869392409578e+00, 1.81020486547883e+00, 1.80171095345748e+00,\n                                                1.79327205568947e+00, 1.78494699055789e+00, 1.77679244788921e+00, 1.76886197642718e+00, 1.76120506489526e+00,\n                                                1.75386633888273e+00, 1.74688489068047e+00, 1.74029375392772e+00, 1.73411952981928e+00, 1.72838216689132e+00,\n                                                1.72309489220374e+00, 1.71826428813382e+00, 1.71389050599137e+00, 1.70996760521227e+00, 1.70648400490673e+00,\n                                                1.70342303294623e+00, 1.70076355649151e+00, 1.69848067683479e+00, 1.69654647062448e+00, 1.69493075895777e+00,\n                                                1.69360188549187e+00, 1.69252748468077e+00, 1.69167522154492e+00, 1.69101348507815e+00, 1.69051201852872e+00,\n                                                1.69014247138457e+00, 1.68987885994012e+00, 1.68969792579768e+00, 1.68957938450087e+00, 1.68950605963375e+00,\n                                                1.68946390104723e+00, 1.68944188928522e+00, 1.68943183165981e+00, 1.68942805865368e+00, 1.68942703230041e+00,\n                                                1.68942688081267e+00, 1.68942686643231e+00, 1.68942657325072e+00, 1.68942458690023e+00, 1.68941728483424e+00,\n                                                1.68939781996541e+00, 1.68935522034886e+00, 1.68927363228465e+00, 1.68913173524325e+00, 1.68890235240480e+00,\n                                                1.68855227535199e+00, 1.68804231568194e+00, 1.68732759012812e+00, 1.68635803934787e+00, 1.68507917398672e+00,\n                                                1.68343303513748e+00, 1.68135935002845e+00, 1.67879685784136e+00, 1.67568477508427e+00, 1.67196436499309e+00,\n                                                1.66758057103532e+00, 1.66248367074768e+00, 1.65663090287763e+00, 1.64998801820292e+00, 1.64253070266478e+00,\n                                                1.63424582089620e+00, 1.62513242931149e+00, 1.61520251117768e+00, 1.60448139201828e+00, 1.59300780266365e+00,\n                                                1.58083356932431e+00, 1.56802292489988e+00, 1.55465145257716e+00, 1.54080469044687e+00, 1.52657644292581e+00,\n                                                1.51206685966863e+00, 1.49738035397985e+00, 1.48262343942912e+00, 1.46790256486485e+00, 1.45332202432802e+00,\n                                                1.43898201005504e+00, 1.42497686484471e+00, 1.41139357585465e+00, 1.39831053679013e+00, 1.38579659077508e+00,\n                                                1.37391035304807e+00, 1.36269980178654e+00, 1.35220211725932e+00, 1.34244374423312e+00, 1.33344064992007e+00,\n                                                1.32519874934545e+00, 1.31771447130447e+00, 1.31097544047709e+00, 1.30496125420921e+00, 1.29964433544001e+00,\n                                                1.29499084585293e+00, 1.29096164526399e+00, 1.28751328437744e+00, 1.28459901829942e+00, 1.28216982768245e+00,\n                                                1.28017543325014e+00, 1.27856528796453e+00, 1.27728952953769e+00, 1.27629987465542e+00, 1.27555043546331e+00,\n                                                1.27499843880837e+00, 1.27460482961044e+00, 1.27433474165113e+00, 1.27415782201510e+00, 1.27404839930630e+00,\n                                                1.27398549041783e+00, 1.27395264581657e+00, 1.27393763873463e+00, 1.27393200904192e+00, 1.27393047762729e+00,\n                                                1.27393025159364e+00, 1.27393023147825e+00, 1.27392983550446e+00, 1.27392715272419e+00, 1.27391729054643e+00,\n                                                1.27389100165001e+00, 1.27383346928983e+00, 1.27372328888319e+00, 1.27353168719557e+00, 1.27322201590778e+00,\n                                                1.27274955106579e+00, 1.27206162370697e+00, 1.27109809957848e+00, 1.26979221706501e+00, 1.26807178203456e+00,\n                                                1.26586070622493e+00, 1.26308086214571e+00, 1.25965421259485e+00, 1.25550515736181e+00, 1.25056302431961e+00,\n                                                1.24476461791418e+00, 1.23805672621156e+00, 1.23039847941957e+00, 1.22176344940350e+00, 1.21214138227969e+00,\n                                                1.20153946553399e+00, 1.18998304767068e+00, 1.17751575194429e+00, 1.16419895531706e+00, 1.15011063768147e+00,\n                                                1.13534364211766e+00, 1.12000342151711e+00, 1.10420537709793e+00, 1.08807191719859e+00, 1.07172937797866e+00,\n                                                1.05530495003244e+00, 1.03892374643887e+00, 1.02270612968373e+00, 1.00676538948886e+00, 9.91205833830158e-01,\n                                                9.76121324495727e-01, 9.61594259378746e-01, 9.47694978683590e-01, 9.34481552923731e-01, 9.21999897720677e-01,\n                                                9.10284153904494e-01, 8.99357270576745e-01, 8.89231732527114e-01, 8.79910380403313e-01, 8.71387281019647e-01,\n                                                8.63648614978422e-01, 8.56673558403935e-01, 8.50435144324591e-01, 8.44901096595241e-01, 8.40034634948236e-01,\n                                                8.35795253688702e-01, 8.32139478730636e-01, 8.29021608228599e-01, 8.26394441192615e-01, 8.24209996435393e-01,\n                                                8.22420221290491e-01, 8.20977686090790e-01, 8.19836256765949e-01, 8.18951734470123e-01, 8.18282448240383e-01,\n                                                8.17789784628071e-01, 8.17438637292579e-01, 8.17197759864055e-01, 8.17040007024502e-01, 8.16942451664908e-01,\n                                                8.16886369974501e-01, 8.16857091134944e-01, 8.16843713587006e-01, 8.16838695238588e-01, 8.16837330129128e-01,\n                                                8.16837128641940e-01, 8.16837110829437e-01, 8.16836761518881e-01, 8.16834394892135e-01, 8.16825694976809e-01,\n                                                8.16802504618735e-01, 8.16751755228684e-01, 8.16654572280804e-01, 8.16485595993985e-01, 8.16212554316850e-01,\n                                                8.15796122455802e-01, 8.15190099194325e-01, 8.14341924461564e-01, 8.13193554284566e-01, 8.11682697760757e-01,\n                                                8.09744405627522e-01, 8.07312981414453e-01, 8.04324164632136e-01, 8.00717512223557e-01, 7.96438881486561e-01,\n                                                7.91442897335212e-01, 7.85695271904706e-01, 7.79174837906547e-01, 7.71875161147205e-01, 7.63805613660914e-01,\n                                                7.54991817076899e-01, 7.45475404654755e-01, 7.35313096767688e-01, 7.24575134012771e-01, 7.13343159274357e-01,\n                                                7.01707679589803e-01, 6.89765265978742e-01, 6.77615661463712e-01, 6.65358963364961e-01, 6.53093026841755e-01,\n                                                6.40911205768805e-01, 6.28900508905645e-01, 6.17140208983494e-01, 6.05700904526714e-01, 5.94644002675030e-01,\n                                                5.84021568300957e-01, 5.73876471138567e-01, 5.64242757935500e-01, 5.55146179316791e-01, 5.46604809077666e-01,\n                                                5.38629704852473e-01, 5.31225571591560e-01, 5.24391401474302e-01, 5.18121074736115e-01, 5.12403914798053e-01,\n                                                5.07225197853544e-01, 5.02566621759467e-01, 4.98406741937177e-01, 4.94721383327516e-01, 4.91484037584360e-01,\n                                                4.88666253922909e-01, 4.86238030600781e-01, 4.84168212089698e-01, 4.82424894740863e-01, 4.80975841280601e-01,\n                                                4.79788901908474e-01, 4.78832437226150e-01, 4.78075735832021e-01, 4.77489417317457e-01, 4.77045809746046e-01,\n                                                4.76719289633034e-01, 4.76486572092670e-01, 4.76326939271549e-01, 4.76222396465976e-01, 4.76157747394103e-01,\n                                                4.76120582852958e-01, 4.76101180267292e-01, 4.76092315214982e-01, 4.76088989651964e-01, 4.76088085020469e-01,\n                                                4.76087951498838e-01, 4.76087939512353e-01, 4.76087702388202e-01, 4.76086095840026e-01, 4.76080190041457e-01,\n                                                4.76064447677004e-01, 4.76029997552595e-01, 4.75964027784021e-01, 4.75849325637423e-01, 4.75663989689230e-01,\n                                                4.75381338159431e-01, 4.74970034615543e-01, 4.74394448181099e-01, 4.73615259302780e-01, 4.72590313499000e-01,\n                                                4.71275714016818e-01, 4.69627130036870e-01, 4.67601280595852e-01, 4.65157536980550e-01, 4.62259569845839e-01,\n                                                4.58876954052674e-01, 4.54986636704296e-01, 4.50574174286855e-01, 4.45634654598754e-01, 4.40173238415189e-01,\n                                                4.34205283162074e-01, 4.27756043321101e-01, 4.20859975770596e-01, 4.13559708271658e-01, 4.05904751777239e-01,\n                                                3.97950049407490e-01, 3.89754455887509e-01, 3.81379232055208e-01, 3.72886622427806e-01, 3.64338563405645e-01,\n                                                3.55795549200125e-01, 3.47315665000668e-01, 3.38953784046747e-01, 3.30760917621935e-01, 3.22783703898684e-01,\n                                                3.15064021703872e-01, 3.07638717105628e-01, 3.00539432896783e-01, 2.93792532665046e-01, 2.87419111800023e-01,\n                                                2.81435087534833e-01, 2.75851359281435e-01, 2.70674029532192e-01, 2.65904674871828e-01, 2.61540656455425e-01,\n                                                2.57575459778957e-01, 2.53999054663998e-01, 2.50798267944096e-01, 2.47957163153194e-01, 2.45457423330488e-01,\n                                                2.43278734642919e-01, 2.41399169703526e-01, 2.39795570111309e-01, 2.38443927805868e-01, 2.37319764336781e-01,\n                                                2.36398506174559e-01, 2.35655852869821e-01, 2.35068133369902e-01, 2.34612644317681e-01, 2.34267962878488e-01,\n                                                2.34014225743544e-01, 2.33833365584645e-01, 2.33709296478617e-01, 2.33628040716801e-01, 2.33577790937777e-01,\n                                                2.33548903584505e-01, 2.33533822154039e-01, 2.33526931408679e-01, 2.33524346465916e-01, 2.33523643300104e-01,\n                                                2.33523539514350e-01, 2.33523529947156e-01, 2.33523337896378e-01, 2.33522036726166e-01, 2.33517253517753e-01,\n                                                2.33504503477859e-01, 2.33476601532945e-01, 2.33423170589909e-01, 2.33330268186576e-01, 2.33180152010933e-01,\n                                                2.32951203213232e-01, 2.32618024270421e-01, 2.32151725006905e-01, 2.31520405826038e-01, 2.30689840916607e-01,\n                                                2.29624355968980e-01, 2.28287884808161e-01, 2.26645177684690e-01, 2.24663121478040e-01, 2.22312119824690e-01,\n                                                2.19567470507167e-01, 2.16410669753204e-01, 2.12830569703696e-01, 2.08824317179842e-01, 2.04398009448166e-01,\n                                                1.99567015750358e-01, 1.94355931121124e-01, 1.88798150155910e-01, 1.82935071293138e-01, 1.76814965095068e-01,\n                                                1.70491561209166e-01, 1.64022426527135e-01, 1.57467220056995e-01, 1.50885916970789e-01, 1.44337094381977e-01,\n                                                1.37876364426194e-01, 1.31555026691112e-01, 1.25418993272491e-01, 1.19508017696956e-01, 1.13855236011732e-01,\n                                                1.08487006881398e-01, 1.03423019580015e-01, 9.86766257114624e-02, 9.42553429410000e-02, 9.01614768321857e-02,\n                                                8.63928093079012e-02, 8.29433081662789e-02, 7.98038202135085e-02, 7.69627197152676e-02, 7.44064930026689e-02,\n                                                7.21202484487962e-02, 7.00881481860118e-02, 6.82937636342216e-02, 6.67203611175062e-02, 6.53511266504285e-02,\n                                                6.41693405383297e-02, 6.31585129504355e-02, 6.23024912842811e-02, 6.15855491250992e-02, 6.09924650768376e-02,\n                                                6.05085978502951e-02, 6.01199618781787e-02, 5.98133055245214e-02, 5.95761918060149e-02, 5.93970795846495e-02,\n                                                5.92654015576000e-02, 5.91716341777291e-02, 5.91073539734386e-02, 5.90652746455618e-02, 5.90392597977014e-02,\n                                                5.90243071486172e-02, 5.90165014769868e-02, 5.90129352200555e-02, 5.90115974293739e-02, 5.90112335212150e-02,\n                                                5.90111798092541e-02, 5.90111746905606e-02, 5.90110701224520e-02, 5.90103616618527e-02, 5.90077573414454e-02,\n                                                5.90008156072703e-02, 5.89856259627379e-02, 5.89565442939204e-02, 5.89059970492454e-02, 5.88243690962340e-02,\n                                                5.86999906162311e-02, 5.85192383546891e-02, 5.82667653231435e-02, 5.79258700044056e-02, 5.74790106619221e-02,\n                                                5.69084621152223e-02, 5.61971012852758e-02, 5.53292943984749e-02, 5.42918440156712e-02, 5.30749396717329e-02,\n                                                5.16730440089543e-02, 5.00856392402984e-02, 4.83177588171761e-02, 4.63802379178835e-02, 4.42896343469485e-02,\n                                                4.20677977269164e-02, 3.97410969837024e-02, 3.73393502073709e-02, 3.48945323068650e-02, 3.24393597445987e-02,\n                                                3.00058642219780e-02, 2.76240664110878e-02, 2.53208468339912e-02, 2.31190861478865e-02, 2.10371154983919e-02,\n                                                1.90884842077326e-02, 1.72820216672995e-02, 1.56221466567297e-02, 1.41093625590802e-02, 1.27408714832318e-02,\n                                                1.15112430434421e-02, 1.04130823924142e-02, 9.43765456166790e-03, 8.57543584449028e-03, 7.81657594079954e-03,\n                                                7.15126558369583e-03, 6.57001274118896e-03, 6.06383612901573e-03, 5.62438795433318e-03, 5.24401901618332e-03,\n                                                4.91579906363682e-03, 4.63350417069175e-03, 4.39158125637462e-03, 4.18509808101941e-03, 4.00968530389201e-03,\n                                                3.86147562172501e-03, 3.73704368081706e-03, 3.63334937543192e-03, 3.54768628952584e-03, 3.47763636863818e-03,\n                                                3.42103138104610e-03, 3.37592130244913e-03, 3.34054940531736e-03, 3.31333353249530e-03, 3.29285277601832e-03,\n                                                3.27783856810093e-03, 3.26716903106039e-03, 3.25986533931388e-03, 3.25508883126568e-03, 3.25213767838273e-03,\n                                                3.25044207112790e-03, 3.24955710496289e-03, 3.24915282364469e-03, 3.24900117460891e-03, 3.24895992341756e-03,\n                                                3.24895383486501e-03, 3.24895323223551e-03, 3.24894068631232e-03, 3.24885568698585e-03, 3.24854323770296e-03,\n                                                3.24771049498840e-03, 3.24588872938714e-03, 3.24240240198526e-03, 3.23634768920722e-03, 3.22658321454683e-03,\n                                                3.21173615243331e-03, 3.19022709317984e-03, 3.16031688726026e-03, 3.12017788932106e-03, 3.06799039081951e-03,\n                                                3.00206245201395e-03, 2.92096787961404e-03, 2.82369305345997e-03, 2.70977927807636e-03, 2.57944417257039e-03,\n                                                2.43366429337200e-03, 2.27420258864752e-03, 2.10356890156271e-03, 1.92490940068657e-03, 1.74183054018284e-03,\n                                                1.55817323315954e-03, 1.37776126939149e-03, 1.20415269603336e-03, 1.04042271581406e-03, 8.89001576263038e-04,\n                                                7.51582026645270e-04, 6.29100143323624e-04, 5.21782881167221e-04, 4.29247520436160e-04, 3.50633488118479e-04,\n                                                2.84746238918832e-04, 2.30195547343159e-04, 1.85515555443772e-04, 1.49259709838256e-04, 1.20068848666888e-04,\n                                                9.67142770476048e-05, 7.81196146570906e-05, 6.33660019457860e-05, 5.16854491170449e-05, 4.24469033073471e-05,\n                                                3.51389266526336e-05, 2.93517539582400e-05, 2.47602696632487e-05, 2.11085477783701e-05, 1.81962112046907e-05,\n                                                1.58667929157641e-05, 1.39982038158681e-05, 1.24952014821655e-05, 1.12835239447495e-05, 1.03052676214688e-05,\n                                                9.51517736669238e-06, 8.87766970913972e-06, 8.36450743246786e-06, 7.95305157619275e-06, 7.62498200446160e-06,\n                                                7.36535782053238e-06, 7.16190562188856e-06, 7.00446212653638e-06, 6.88453383523857e-06, 6.79495667910146e-06,\n                                                6.72964389369923e-06, 6.68340816112334e-06, 6.65184110237860e-06, 6.63123253530351e-06, 6.61851356631438e-06,\n                                                6.61121057610181e-06, 6.60740040236973e-06, 6.60566010557417e-06, 6.60500735727432e-06, 6.60482980330279e-06,\n                                                6.60480359715443e-06, 6.60480090042270e-06, 6.60474371838582e-06, 6.60435631405498e-06, 6.60293235887899e-06,\n                                                6.59913803380263e-06, 6.59084143195265e-06, 6.57497994738243e-06, 6.54748255524140e-06, 6.50326909834575e-06,\n                                                6.43635338226645e-06, 6.34007880018217e-06, 6.20751145108400e-06, 6.03200313098462e-06, 5.80791273763204e-06,\n                                                5.53143926729227e-06, 5.20147624594181e-06, 4.82035468185593e-06, 4.39431298482340e-06, 3.93353367056370e-06,\n                                                3.45163129122916e-06, 2.96456733783756e-06, 2.48909346289850e-06, 2.04095446032504e-06, 1.63317607060343e-06,\n                                                1.27478149059002e-06, 9.70205029204863e-07, 7.19511414226659e-07, 5.19322131520283e-07, 3.64150564369226e-07,\n                                                2.47716835932721e-07, 2.88657986402541e-15, 2.66453525910038e-15, 2.66453525910038e-15, 2.66453525910038e-15,\n                                                2.44249065417534e-15, 2.66453525910038e-15, 2.88657986402541e-15, 2.44249065417534e-15, 2.66453525910038e-15,\n                                                2.44249065417534e-15, 2.88657986402541e-15, 2.66453525910038e-15, 2.66453525910038e-15, 2.66453525910038e-15,\n                                                2.66453525910038e-15, 2.66453525910038e-15, 2.88657986402541e-15, 2.66453525910038e-15, 2.66453525910038e-15,\n                                                2.66453525910038e-15, 2.66453525910038e-15, 2.66453525910038e-15, 2.66453525910038e-15, 2.66453525910038e-15,\n                                                2.88657986402541e-15, 2.66453525910038e-15, 2.88657986402541e-15, 2.66453525910038e-15, 2.66453525910038e-15,\n                                                2.66453525910038e-15, 2.66453525910038e-15, 2.66453525910038e-15, 2.66453525910038e-15, 2.44249065417534e-15,\n                                                2.66453525910038e-15, 2.44249065417534e-15, 2.88657986402541e-15, 2.66453525910038e-15, 2.66453525910038e-15,\n                                                2.66453525910038e-15, 2.44249065417534e-15, 2.66453525910038e-15, 2.66453525910038e-15, 2.66453525910038e-15,\n                                                2.66453525910038e-15}),\nmadness::CubicInterpolationTable<double>(grid, {3.00000000000000e+00, 2.99999999747243e+00, 2.99999991931493e+00, 2.99999938978553e+00, 2.99999744316665e+00,\n                                                2.99999225409717e+00, 2.99998089744703e+00, 2.99995914619302e+00, 2.99992131460086e+00, 2.99986015263404e+00,\n                                                2.99976679594029e+00, 2.99963077406773e+00, 2.99944007779730e+00, 2.99918128471172e+00, 2.99883974042095e+00,\n                                                2.99839979128873e+00, 2.99784506310819e+00, 2.99715877899280e+00, 2.99632410880758e+00, 2.99532454176872e+00,\n                                                2.99414427337824e+00, 2.99276859761116e+00, 2.99118429520204e+00, 2.98938000895136e+00, 2.98734659715765e+00,\n                                                2.98507745655645e+00, 2.98256880650520e+00, 2.97981992660349e+00, 2.97683334050650e+00, 2.97361493941506e+00,\n                                                2.97017403965134e+00, 2.96652336989455e+00, 2.96267898508267e+00, 2.95866010568797e+00, 2.95448888302181e+00,\n                                                2.95019009336284e+00, 2.94579076594916e+00, 2.94131975212192e+00, 2.93680724503592e+00, 2.93228426123999e+00,\n                                                2.92778209696364e+00, 2.92333177303542e+00, 2.91896348293789e+00, 2.91470605854415e+00, 2.91058646758364e+00,\n                                                2.90662935588400e+00, 2.90285664599074e+00, 2.89928720195571e+00, 2.89593656799698e+00, 2.89281678646038e+00,\n                                                2.88993629814662e+00, 2.88729992569133e+00, 2.88490893837202e+00, 2.88276119452960e+00, 2.88085135578483e+00,\n                                                2.87917116544491e+00, 2.87770978196668e+00, 2.87645415709819e+00, 2.87538944738001e+00, 2.87449944706683e+00,\n                                                2.87376703023717e+00, 2.87317458989588e+00, 2.87270446223588e+00, 2.87233932489817e+00, 2.87206255903196e+00,\n                                                2.87185856618073e+00, 2.87171303246836e+00, 2.87161313419203e+00, 2.87154768069741e+00, 2.87150719226904e+00,\n                                                2.87148391266488e+00, 2.87147175780746e+00, 2.87146620396865e+00, 2.87146412050219e+00, 2.87146355374599e+00,\n                                                2.87146347009386e+00, 2.87146345864306e+00, 2.87146318821387e+00, 2.87146135601332e+00, 2.87145462060586e+00,\n                                                2.87143666614118e+00, 2.87139737150249e+00, 2.87132211093206e+00, 2.87119121140140e+00, 2.87097958720320e+00,\n                                                2.87065656682437e+00, 2.87018592132107e+00, 2.86952609739824e+00, 2.86863065245564e+00, 2.86744888325904e+00,\n                                                2.86592663485922e+00, 2.86400727209027e+00, 2.86163279252239e+00, 2.85874505710513e+00, 2.85528711278085e+00,\n                                                2.85120457983436e+00, 2.84644707536571e+00, 2.84096964271734e+00, 2.83473415471854e+00, 2.82771065615327e+00,\n                                                2.81987860806521e+00, 2.81122799379629e+00, 2.80176024466122e+00, 2.79148894269010e+00, 2.78044025974834e+00,\n                                                2.76865309724169e+00, 2.75617889890315e+00, 2.74308112077091e+00, 2.72943435684694e+00, 2.71532313506027e+00,\n                                                2.70084041469708e+00, 2.68608583189263e+00, 2.67116375266490e+00, 2.65618120212768e+00, 2.64124574320263e+00,\n                                                2.62646337811436e+00, 2.61193654147395e+00, 2.59776224554322e+00, 2.58403042734267e+00, 2.57082253478275e+00,\n                                                2.55821037611963e+00, 2.54625524477446e+00, 2.53500732069240e+00, 2.52450534045278e+00, 2.51477652149327e+00,\n                                                2.50583672104241e+00, 2.49769080743513e+00, 2.49033322005212e+00, 2.48374869375012e+00, 2.47791312390865e+00,\n                                                2.47279454872826e+00, 2.46835422587720e+00, 2.46454778080096e+00, 2.46132640389600e+00, 2.45863807332274e+00,\n                                                2.45642877960006e+00, 2.45464372745913e+00, 2.45322848995146e+00, 2.45213008973026e+00, 2.45129798296300e+00,\n                                                2.45068492265252e+00, 2.45024768034926e+00, 2.44994760835951e+00, 2.44975102855124e+00, 2.44962943861138e+00,\n                                                2.44955953193871e+00, 2.44952303304113e+00, 2.44950635609325e+00, 2.44950009994580e+00, 2.44949839811741e+00,\n                                                2.44949814693095e+00, 2.44949812308642e+00, 2.44949763695311e+00, 2.44949434332693e+00, 2.44948223558737e+00,\n                                                2.44944996063524e+00, 2.44937932686077e+00, 2.44924405154886e+00, 2.44900879668997e+00, 2.44862853559232e+00,\n                                                2.44804828514632e+00, 2.44720323006258e+00, 2.44601925585515e+00, 2.44441389674768e+00, 2.44229769306763e+00,\n                                                2.43957594016042e+00, 2.43615079759082e+00, 2.43192371367483e+00, 2.42679810655260e+00, 2.42068222948429e+00,\n                                                2.41349213530440e+00, 2.40515464357089e+00, 2.39561020457762e+00, 2.38481554791527e+00, 2.37274600069322e+00,\n                                                2.35939736303681e+00, 2.34478723721173e+00, 2.32895572263613e+00, 2.31196541253774e+00, 2.29390065869889e+00,\n                                                2.27486610718543e+00, 2.25498454768608e+00, 2.23439415872613e+00, 2.21324526671821e+00, 2.19169676481996e+00,\n                                                2.16991235483848e+00, 2.14805678013514e+00, 2.12629220935985e+00, 2.10477491116962e+00, 2.08365233147318e+00,\n                                                2.06306065066821e+00, 2.04312286257674e+00, 2.02394738286440e+00, 2.00562716548943e+00, 1.98823928305429e+00,\n                                                1.97184491168645e+00, 1.95648965317573e+00, 1.94220412572523e+00, 1.92900475853247e+00, 1.91689473298088e+00,\n                                                1.90586502295837e+00, 1.89589549735122e+00, 1.88695605795795e+00, 1.87900779509040e+00, 1.87200415042017e+00,\n                                                1.86589208189051e+00, 1.86061322865844e+00, 1.85610507514517e+00, 1.85230211257114e+00, 1.84913699415295e+00,\n                                                1.84654167683749e+00, 1.84444853848927e+00, 1.84279145530999e+00, 1.84150682043569e+00, 1.84053448158628e+00,\n                                                1.83981857373428e+00, 1.83930822232397e+00, 1.83895809379719e+00, 1.83872877311458e+00, 1.83858695249754e+00,\n                                                1.83850542151232e+00, 1.83846285550879e+00, 1.83844340686858e+00, 1.83843611103135e+00, 1.83843412638853e+00,\n                                                1.83843383345947e+00, 1.83843380739087e+00, 1.83843329422743e+00, 1.83842981747320e+00, 1.83841703661055e+00,\n                                                1.83838296793550e+00, 1.83830841156551e+00, 1.83816563521445e+00, 1.83791737102927e+00, 1.83751617746186e+00,\n                                                1.83690421294368e+00, 1.83601346145443e+00, 1.83476644117689e+00, 1.83307741550911e+00, 1.83085411007618e+00,\n                                                1.82799991965080e+00, 1.82441656512182e+00, 1.82000713352940e+00, 1.81467940511020e+00, 1.80834934238867e+00,\n                                                1.80094459036603e+00, 1.79240781697006e+00, 1.78269971239679e+00, 1.77180146771029e+00, 1.75971656913487e+00,\n                                                1.74647177561150e+00, 1.73211719239939e+00, 1.71672540986609e+00, 1.70038973935984e+00, 1.68322164103034e+00,\n                                                1.66534749484781e+00, 1.64690490941828e+00, 1.62803878848007e+00, 1.60889737947575e+00, 1.58962851243008e+00,\n                                                1.57037620343732e+00, 1.55127775054787e+00, 1.53246139723710e+00, 1.51404458661019e+00, 1.49613278382244e+00,\n                                                1.47881880897063e+00, 1.46218259997541e+00, 1.44629131474942e+00, 1.43119968263060e+00, 1.41695052400986e+00,\n                                                1.40357537124159e+00, 1.39109514036609e+00, 1.37952081948057e+00, 1.36885415405824e+00, 1.35908832115369e+00,\n                                                1.35020859289961e+00, 1.34219299511874e+00, 1.33501296965540e+00, 1.32863404970704e+00, 1.32301655654844e+00,\n                                                1.31811632405336e+00, 1.31388545469883e+00, 1.31027310755187e+00, 1.30722631527940e+00, 1.30469082364112e+00,\n                                                1.30261194335941e+00, 1.30093540086281e+00, 1.29960817134392e+00, 1.29857927505809e+00, 1.29780051602558e+00,\n                                                1.29722714148816e+00, 1.29681840077603e+00, 1.29653798376833e+00, 1.29635432189975e+00, 1.29624073859929e+00,\n                                                1.29617544096912e+00, 1.29614135015309e+00, 1.29612577387620e+00, 1.29611993069291e+00, 1.29611834120689e+00,\n                                                1.29611810660214e+00, 1.29611808586187e+00, 1.29611767913662e+00, 1.29611492351605e+00, 1.29610479360549e+00,\n                                                1.29607779130681e+00, 1.29601869907896e+00, 1.29590553668499e+00, 1.29570876601104e+00, 1.29539078507944e+00,\n                                                1.29490574816911e+00, 1.29419974349240e+00, 1.29321135249325e+00, 1.29187260481049e+00, 1.29011032967409e+00,\n                                                1.28784788764060e+00, 1.28500724628260e+00, 1.28151134055648e+00, 1.27728663470175e+00, 1.27226578006762e+00,\n                                                1.26639024520506e+00, 1.25961278409093e+00, 1.25189960829005e+00, 1.24323214101377e+00, 1.23360825557430e+00,\n                                                1.22304293581911e+00, 1.21156833790096e+00, 1.19923327579549e+00, 1.18610219129821e+00, 1.17225369737022e+00,\n                                                1.15777879798381e+00, 1.14277888701414e+00, 1.12736361513780e+00, 1.11164869158317e+00, 1.09575366292997e+00,\n                                                1.07979969017051e+00, 1.06390733294886e+00, 1.04819434905933e+00, 1.03277352786404e+00, 1.01775059541628e+00,\n                                                1.00322225163936e+00, 9.89274419570460e-01, 9.75980797215547e-01, 9.63401799320076e-01, 9.51583957529539e-01,\n                                                9.40559814733371e-01, 9.30348307991977e-01, 9.20955591729387e-01, 9.12376216611378e-01, 9.04594555880271e-01,\n                                                8.97586362958906e-01, 8.91320351408014e-01, 8.85759707433918e-01, 8.80863471082109e-01, 8.76587749828198e-01,\n                                                8.72886753257100e-01, 8.69713657194849e-01, 8.67021318878538e-01, 8.64762871619711e-01, 8.62892228833804e-01,\n                                                8.61364524550503e-01, 8.60136511938298e-01, 8.59166934219431e-01, 8.58416874687982e-01, 8.57850085246358e-01,\n                                                8.57433286625062e-01, 8.57136428744727e-01, 8.56932896832721e-01, 8.56799648048143e-01, 8.56717264444238e-01,\n                                                8.56669910879792e-01, 8.56645190612759e-01, 8.56633896303441e-01, 8.56629659512717e-01, 8.56628507011845e-01,\n                                                8.56628336905455e-01, 8.56628321634690e-01, 8.56628019538965e-01, 8.56625972804262e-01, 8.56618448914972e-01,\n                                                8.56598393940966e-01, 8.56554508954106e-01, 8.56470482476405e-01, 8.56324417697169e-01, 8.56088493866982e-01,\n                                                8.55728901668700e-01, 8.55206091518424e-01, 8.54475370462990e-01, 8.53487876330209e-01, 8.52191945863221e-01,\n                                                8.50534875816154e-01, 8.48465051926646e-01, 8.45934390402255e-01, 8.42901000832989e-01, 8.39331939853025e-01,\n                                                8.35205884027706e-01, 8.30515512324190e-01, 8.25269359004881e-01, 8.19492885096231e-01, 8.13228531352161e-01,\n                                                8.06534569638396e-01, 7.99482672492429e-01, 7.92154273717078e-01, 7.84635982312255e-01, 7.77014503625016e-01,\n                                                7.69371663758735e-01, 7.61780171863367e-01, 7.54300656921413e-01, 7.46980290640095e-01, 7.39853012573865e-01,\n                                                7.32941091422177e-01, 7.26257563873988e-01, 7.19809028092318e-01, 7.13598324723590e-01, 7.07626772007201e-01,\n                                                7.01895780674231e-01, 6.96407816313136e-01, 6.91166778460538e-01, 6.86177921879874e-01, 6.81447463318950e-01,\n                                                6.76982008465283e-01, 6.72787910768173e-01, 6.68870645591229e-01, 6.65234255870104e-01, 6.61880902299064e-01,\n                                                6.58810533214453e-01, 6.56020676664195e-01, 6.53506348874825e-01, 6.51260068443315e-01, 6.49271963101986e-01,\n                                                6.47529954988991e-01, 6.46020010354578e-01, 6.44726440084746e-01, 6.43632238035444e-01, 6.42719444780367e-01,\n                                                6.41969524920280e-01, 6.41363746585095e-01, 6.40883552226207e-01, 6.40510910310158e-01, 6.40228638153803e-01,\n                                                6.40020686945837e-01, 6.39872381023461e-01, 6.39770604738378e-01, 6.39703931751420e-01, 6.39662693314231e-01,\n                                                6.39638983982146e-01, 6.39626605189402e-01, 6.39620949128905e-01, 6.39618827331129e-01, 6.39618250149346e-01,\n                                                6.39618164958475e-01, 6.39618157105397e-01, 6.39617999463534e-01, 6.39616931416397e-01, 6.39613005157260e-01,\n                                                6.39602539154425e-01, 6.39579634372839e-01, 6.39535768245888e-01, 6.39459482395038e-01, 6.39336178020594e-01,\n                                                6.39148030478276e-01, 6.38874031769610e-01, 6.38490166443421e-01, 6.37969722663076e-01, 6.37283735902945e-01,\n                                                6.36401557933270e-01, 6.35291538587865e-01, 6.33921802582332e-01, 6.32261098801651e-01, 6.30279695522520e-01,\n                                                6.27950292448542e-01, 6.25248919473818e-01, 6.22155792656967e-01, 6.18656099495652e-01, 6.14740687497418e-01,\n                                                6.10406631555539e-01, 6.05657656503160e-01, 6.00504391891811e-01, 5.94964437678184e-01, 5.89062223591850e-01,\n                                                5.82828652681457e-01, 5.76300531150708e-01, 5.69519801077877e-01, 5.62532607799126e-01, 5.55388246890712e-01,\n                                                5.48138044298866e-01, 5.40834225674531e-01, 5.33528827147600e-01, 5.26272690699200e-01, 5.19114574947242e-01,\n                                                5.12100398864168e-01, 5.05272623776204e-01, 4.98669769402584e-01, 4.92326053348775e-01, 4.86271140315195e-01,\n                                                4.80529986751667e-01, 4.75122767950157e-01, 4.70064876774368e-01, 4.65366985664760e-01, 4.61035165741083e-01,\n                                                4.57071058485529e-01, 4.53472096545358e-01, 4.50231770682640e-01, 4.47339939919903e-01, 4.44783181597748e-01,\n                                                4.42545177475151e-01, 4.40607131243698e-01, 4.38948211951724e-01, 4.37546016889526e-01, 4.36377046518102e-01,\n                                                4.35417183082826e-01, 4.34642163703257e-01, 4.34028038043743e-01, 4.33551600226012e-01, 4.33190784521782e-01,\n                                                4.32925014627726e-01, 4.32735497024435e-01, 4.32605450075517e-01, 4.32520262120789e-01, 4.32467573812219e-01,\n                                                4.32437282254405e-01, 4.32421467037597e-01, 4.32414240867340e-01, 4.32411530070549e-01, 4.32410792667071e-01,\n                                                4.32410683827824e-01, 4.32410673455555e-01, 4.32410461563720e-01, 4.32409025965643e-01, 4.32403748559471e-01,\n                                                4.32389680964596e-01, 4.32358894541574e-01, 4.32299935487696e-01, 4.32197407165786e-01, 4.32031699415111e-01,\n                                                4.31778881771805e-01, 4.31410774169350e-01, 4.30895204631562e-01, 4.30196458534796e-01, 4.29275918061435e-01,\n                                                4.28092883439154e-01, 4.26605559549800e-01, 4.24772182779058e-01, 4.22552254066176e-01, 4.19907835722632e-01,\n                                                4.16804862609695e-01, 4.13214413654044e-01, 4.09113888306808e-01, 4.04488035007619e-01, 3.99329785131137e-01,\n                                                3.93640855805446e-01, 3.87432097325610e-01, 3.80723574103589e-01, 3.73544380506163e-01, 3.65932203110647e-01,\n                                                3.57932648100221e-01, 3.49598356883389e-01, 3.40987935570695e-01, 3.32164726181821e-01, 3.23195450799241e-01,\n                                                3.14148765058286e-01, 3.05093764047862e-01, 2.96098490540685e-01, 2.87228500498386e-01, 2.78545542037878e-01,\n                                                2.70106400182759e-01, 2.61961950507176e-01, 2.54156451103769e-01, 2.46727085958680e-01, 2.39703756011237e-01,\n                                                2.33109099051410e-01, 2.26958707814264e-01, 2.21261508103198e-01, 2.16020255702221e-01, 2.11232111785543e-01,\n                                                2.06889260642722e-01, 2.02979539753151e-01, 1.99487059501148e-01, 1.96392797187241e-01, 1.93675156730782e-01,\n                                                1.91310491070185e-01, 1.89273588462722e-01, 1.87538126564909e-01, 1.86077099384483e-01, 1.84863222095291e-01,\n                                                1.83869317536382e-01, 1.83068686268400e-01, 1.82435459654774e-01, 1.81944932899651e-01, 1.81573872620943e-01,\n                                                1.81300791640163e-01, 1.81106182448902e-01, 1.80972700409090e-01, 1.80885288220555e-01, 1.80831234517418e-01,\n                                                1.80800161525975e-01, 1.80783939355417e-01, 1.80776527478709e-01, 1.80773747054889e-01, 1.80772990714745e-01,\n                                                1.80772879080618e-01, 1.80772868031331e-01, 1.80772637999754e-01, 1.80771079506172e-01, 1.80765350381795e-01,\n                                                1.80750079122769e-01, 1.80716660797492e-01, 1.80652670101788e-01, 1.80541419149725e-01, 1.80361687003687e-01,\n                                                1.80087647071941e-01, 1.79689016818625e-01, 1.79131451093666e-01, 1.78377195116544e-01, 1.77386005133352e-01,\n                                                1.76116333606076e-01, 1.74526761396865e-01, 1.72577642100102e-01, 1.70232904248551e-01, 1.67461936872899e-01,\n                                                1.64241464599843e-01, 1.60557302311653e-01, 1.56405868816923e-01, 1.51795336532782e-01, 1.46746302172206e-01,\n                                                1.41291883566155e-01, 1.35477180605897e-01, 1.29358082786203e-01, 1.22999458806945e-01, 1.16472819817172e-01,\n                                                1.09853600091689e-01, 1.03218239464355e-01, 9.66412738217288e-02, 9.01926390241625e-02, 8.39353691607814e-02,\n                                                7.79238255590626e-02, 7.22025353827251e-02, 6.68056568009412e-02, 6.17570304797805e-02, 5.70707317428947e-02,\n                                                5.27520085301414e-02, 4.87984783188993e-02, 4.52014605831108e-02, 4.19473362866709e-02, 3.90188477393481e-02,\n                                                3.63962766293664e-02, 3.40584618843285e-02, 3.19836399675211e-02, 3.01501069882506e-02, 2.85367140770827e-02,\n                                                2.71232150228240e-02, 2.58904889046661e-02, 2.48206613802640e-02, 2.38971473900267e-02, 2.31046360680116e-02,\n                                                2.24290361094699e-02, 2.18573970500477e-02, 2.13778190803366e-02, 2.09793613098039e-02, 2.06519559005218e-02,\n                                                2.03863332425356e-02, 2.01739613217082e-02, 2.00070006070350e-02, 1.98782741435437e-02, 1.97812510938395e-02,\n                                                1.97100407676829e-02, 1.96593932704374e-02, 1.96247023425951e-02, 1.96020057922399e-02, 1.95879791502693e-02,\n                                                1.95799187784034e-02, 1.95757115687201e-02, 1.95737894952113e-02, 1.95730684971522e-02, 1.95728723717923e-02,\n                                                1.95728434242306e-02, 1.95728404381819e-02, 1.95727770512990e-02, 1.95723476005614e-02, 1.95707689648685e-02,\n                                                1.95665614443619e-02, 1.95573561417217e-02, 1.95397374313515e-02, 1.95091313218367e-02, 1.94597521372994e-02,\n                                                1.93846214918354e-02, 1.92756743671194e-02, 1.91239664006959e-02, 1.89199933444022e-02, 1.86541272411924e-02,\n                                                1.83171637038000e-02, 1.79009608749454e-02, 1.73991341923716e-02, 1.68077539926506e-02, 1.61259782735517e-02,\n                                                1.53565442404093e-02, 1.45060431777417e-02, 1.35849162882309e-02, 1.26071349677481e-02, 1.15895652973337e-02,\n                                                1.05510581968087e-02, 9.51134642967455e-03, 8.48985964669025e-03, 7.50458250181607e-03, 6.57107531366741e-03,\n                                                5.70175252023031e-03, 4.90547577559486e-03, 4.18747312693268e-03, 3.54955170879778e-03, 2.99053698688079e-03,\n                                                2.50685302309028e-03, 2.09315788320019e-03, 1.74296323970902e-03, 1.44918982847608e-03, 1.20463183069353e-03,\n                                                1.00231806760442e-03, 8.35766737132815e-04, 6.99137837117725e-04, 5.87296591953557e-04, 4.95810348887904e-04,\n                                                4.20905511065328e-04, 3.59407173958548e-04, 3.08674757270921e-04, 2.66538095652358e-04, 2.31234518259349e-04,\n                                                2.01348024400083e-04, 1.75753240297727e-04, 1.53566640249903e-04, 1.34105535902762e-04, 1.16853343178125e-04,\n                                                1.01429004283560e-04, 8.75591471589665e-05, 7.50526945325625e-05, 6.37783748969056e-05, 5.36457052930928e-05,\n                                                4.45897253662508e-05, 3.65593774644957e-05, 2.95091418807125e-05, 2.33933957827226e-05, 1.81629361470925e-05,\n                                                1.37631444454556e-05, 1.01333410720272e-05, 7.20696195699588e-06, 4.91227736487687e-06, 3.17345529277091e-06,\n                                                1.91184343600881e-06, 1.04740219075694e-06, 5.00269235814699e-07, 3.55271367880050e-15, 3.10862446895044e-15,\n                                                3.55271367880050e-15}),\nmadness::CubicInterpolationTable<double>(grid, {4.00000000000000e+00, 3.99999999605415e+00, 3.99999987404061e+00, 3.99999904737954e+00, 3.99999600846548e+00,\n                                                3.99998790767862e+00, 3.99997017850440e+00, 3.99993622194787e+00, 3.99987716161266e+00, 3.99978167863362e+00,\n                                                3.99963593318148e+00, 3.99942357658884e+00, 3.99912585538294e+00, 3.99872180576044e+00, 3.99818853441244e+00,\n                                                3.99750157920176e+00, 3.99663534109162e+00, 3.99556357698168e+00, 3.99425994175276e+00, 3.99269856685004e+00,\n                                                3.99085466211341e+00, 3.98870512723515e+00, 3.98622915911632e+00, 3.98340884143378e+00, 3.98022970285926e+00,\n                                                3.97668123055899e+00, 3.97275732585257e+00, 3.96845668926685e+00, 3.96378312276803e+00, 3.95874573779955e+00,\n                                                3.95335905900956e+00, 3.94764301532160e+00, 3.94162281234804e+00, 3.93532868307833e+00, 3.92879551723309e+00,\n                                                3.92206237353466e+00, 3.91517188321463e+00, 3.90816955712792e+00, 3.90110301261821e+00, 3.89402113953678e+00,\n                                                3.88697322734532e+00, 3.88000807687500e+00, 3.87317312098188e+00, 3.86651357801446e+00, 3.86007166074674e+00,\n                                                3.85388586133681e+00, 3.84799033009966e+00, 3.84241436260434e+00, 3.83718200600109e+00, 3.83231179172175e+00,\n                                                3.82781659792632e+00, 3.82370364141354e+00, 3.81997459526897e+00, 3.81662582535959e+00, 3.81364873594842e+00,\n                                                3.81103021222805e+00, 3.80875314548145e+00, 3.80679702489008e+00, 3.80513857873701e+00, 3.80375244691307e+00,\n                                                3.80261186623734e+00, 3.80168935016088e+00, 3.80095734493536e+00, 3.80038884529187e+00, 3.79995795407008e+00,\n                                                3.79964037203441e+00, 3.79941380626819e+00, 3.79925828799143e+00, 3.79915639333795e+00, 3.79909336347733e+00,\n                                                3.79905712339846e+00, 3.79903820160211e+00, 3.79902955580096e+00, 3.79902631241779e+00, 3.79902543013472e+00,\n                                                3.79902529991143e+00, 3.79902528208570e+00, 3.79902486110206e+00, 3.79902200887180e+00, 3.79901152370859e+00,\n                                                3.79898357362879e+00, 3.79892240310520e+00, 3.79880524481800e+00, 3.79860147610944e+00, 3.79827205261129e+00,\n                                                3.79776924332425e+00, 3.79703668258315e+00, 3.79600974518110e+00, 3.79461624182477e+00, 3.79277742342990e+00,\n                                                3.79040927488279e+00, 3.78742407204399e+00, 3.78373217006638e+00, 3.77924398646725e+00, 3.77387213855759e+00,\n                                                3.76753369134115e+00, 3.76015246831156e+00, 3.75166137319903e+00, 3.74200466536435e+00, 3.73114012530272e+00,\n                                                3.71904104019785e+00, 3.70569793378080e+00, 3.69111996144354e+00, 3.67533589236789e+00, 3.65839460694057e+00,\n                                                3.64036505098925e+00, 3.62133560859179e+00, 3.60141288152593e+00, 3.58071989393039e+00, 3.55939377269101e+00,\n                                                3.53758298424853e+00, 3.51544423379742e+00, 3.49313915059938e+00, 3.47083089169910e+00, 3.44868079518869e+00,\n                                                3.42684520397272e+00, 3.40547256337964e+00, 3.38470087325889e+00, 3.36465554999524e+00, 3.34544772867595e+00,\n                                                3.32717301258809e+00, 3.30991065784595e+00, 3.29372316613497e+00, 3.27865624855353e+00, 3.26473911805016e+00,\n                                                3.25198506631195e+00, 3.24039228224894e+00, 3.22994487244450e+00, 3.22061404814258e+00, 3.21235944768370e+00,\n                                                3.20513056712643e+00, 3.19886827465058e+00, 3.19350638599282e+00, 3.18897327857434e+00, 3.18519352127487e+00,\n                                                3.18208949526022e+00, 3.17958297925452e+00, 3.17759667059494e+00, 3.17605561176164e+00, 3.17488849125620e+00,\n                                                3.17402878805347e+00, 3.17341573062168e+00, 3.17299504481076e+00, 3.17271946973486e+00, 3.17254902696990e+00,\n                                                3.17245103568321e+00, 3.17239987434998e+00, 3.17237649807443e+00, 3.17236772878762e+00, 3.17236534332533e+00,\n                                                3.17236499123596e+00, 3.17236495781297e+00, 3.17236427639747e+00, 3.17235965970773e+00, 3.17234268827603e+00,\n                                                3.17229744873264e+00, 3.17219844341559e+00, 3.17200883760629e+00, 3.17167911533104e+00, 3.17114620677114e+00,\n                                                3.17033314115040e+00, 3.16914926823481e+00, 3.16749107890390e+00, 3.16524364025153e+00, 3.16228264305662e+00,\n                                                3.15847703913109e+00, 3.15369222317303e+00, 3.14779368881397e+00, 3.14065106237796e+00, 3.13214239163819e+00,\n                                                3.12215854206693e+00, 3.11060753154639e+00, 3.09741861834177e+00, 3.08254594864298e+00, 3.06597157151677e+00,\n                                                3.04770764281485e+00, 3.02779766696942e+00, 3.00631666707056e+00, 2.98337022796217e+00, 2.95909242119765e+00,\n                                                2.93364268953089e+00, 2.90720183564961e+00, 2.87996731790066e+00, 2.85214809810190e+00, 2.82395930814628e+00,\n                                                2.79561700056985e+00, 2.76733322427492e+00, 2.73931162385990e+00, 2.71174370548814e+00, 2.68480585111423e+00,\n                                                2.65865710334179e+00, 2.63343769126277e+00, 2.60926822751592e+00, 2.58624948051571e+00, 2.56446261328993e+00,\n                                                2.54396977992912e+00, 2.52481497954909e+00, 2.50702508272377e+00, 2.49061096347906e+00, 2.47556868853121e+00,\n                                                2.46188073254762e+00, 2.44951720254579e+00, 2.43843706549936e+00, 2.42858938066069e+00, 2.41991454224956e+00,\n                                                2.41234553941654e+00, 2.40580923927507e+00, 2.40022769583537e+00, 2.39551948337005e+00, 2.39160104756772e+00,\n                                                2.38838806222798e+00, 2.38579677364264e+00, 2.38374530960898e+00, 2.38215492563565e+00, 2.38095115771540e+00,\n                                                2.38006484939195e+00, 2.37943302100762e+00, 2.37899955114111e+00, 2.37871564435254e+00, 2.37854006531125e+00,\n                                                2.37843912690242e+00, 2.37838642856668e+00, 2.37836235040115e+00, 2.37835331787253e+00, 2.37835086080786e+00,\n                                                2.37835049815034e+00, 2.37835046587641e+00, 2.37834983056019e+00, 2.37834552620367e+00, 2.37832970299895e+00,\n                                                2.37828752464547e+00, 2.37819522089143e+00, 2.37801845789476e+00, 2.37771109601247e+00, 2.37721439920724e+00,\n                                                2.37645675369153e+00, 2.37535394494332e+00, 2.37381003081849e+00, 2.37171883307143e+00, 2.36896604923619e+00,\n                                                2.36543196097951e+00, 2.36099468386304e+00, 2.35553386803530e+00, 2.34893472191340e+00, 2.34109219474080e+00,\n                                                2.33191512328488e+00, 2.32133012763508e+00, 2.30928503566951e+00, 2.29575162884783e+00, 2.28072753522676e+00,\n                                                2.26423714800575e+00, 2.24633151549254e+00, 2.22708722426018e+00, 2.20660437249114e+00, 2.18500379539271e+00,\n                                                2.16242375043834e+00, 2.13901629106939e+00, 2.11494355140556e+00, 2.09037413397193e+00, 2.06547974400226e+00,\n                                                2.04043215674393e+00, 2.01540054837310e+00, 1.99054917540954e+00, 1.96603535785400e+00, 1.94200770990277e+00,\n                                                1.91860456753825e+00, 1.89595258007801e+00, 1.87416545667158e+00, 1.85334288225019e+00, 1.83356963505402e+00,\n                                                1.81491494604644e+00, 1.79743213815958e+00, 1.78115857162860e+00, 1.76611590369418e+00, 1.75231065065109e+00,\n                                                1.73973502154643e+00, 1.72836797888178e+00, 1.71817647417114e+00, 1.70911680536451e+00, 1.70113604789114e+00,\n                                                1.69417351950915e+00, 1.68816224908335e+00, 1.68303042885020e+00, 1.67870283717301e+00, 1.67510222339872e+00,\n                                                1.67215064800283e+00, 1.66977077009004e+00, 1.66788707122438e+00, 1.66642700041414e+00, 1.66532202084588e+00,\n                                                1.66450853553566e+00, 1.66392866715396e+00, 1.66353086735541e+00, 1.66327033321051e+00, 1.66310921273846e+00,\n                                                1.66301658779258e+00, 1.66296823018904e+00, 1.66294613542117e+00, 1.66293784694663e+00, 1.66293559228396e+00,\n                                                1.66293525950060e+00, 1.66293523008084e+00, 1.66293465314713e+00, 1.66293074434131e+00, 1.66291637523106e+00,\n                                                1.66287807302292e+00, 1.66279425244046e+00, 1.66263373697267e+00, 1.66235463359259e+00, 1.66190362068944e+00,\n                                                1.66121570372254e+00, 1.66021448633975e+00, 1.65881299560060e+00, 1.65691508769297e+00, 1.65441744448044e+00,\n                                                1.65121215103307e+00, 1.64718982008459e+00, 1.64224320172248e+00, 1.63627118660301e+00, 1.62918307993519e+00,\n                                                1.62090299278237e+00, 1.61137416801957e+00, 1.60056303123300e+00, 1.58846273225354e+00, 1.57509592142979e+00,\n                                                1.56051648831319e+00, 1.54480998486824e+00, 1.52809247191537e+00, 1.51050758366478e+00, 1.49222172138480e+00,\n                                                1.47341747835571e+00, 1.45428565945851e+00, 1.43501655100688e+00, 1.41579134245045e+00, 1.39677470387492e+00,\n                                                1.37810940600055e+00, 1.35991352620557e+00, 1.34228029915556e+00, 1.32528019084918e+00, 1.30896444378303e+00,\n                                                1.29336923460813e+00, 1.27851968991665e+00, 1.26443324106202e+00, 1.25112206817645e+00, 1.23859461232850e+00,\n                                                1.22685628717417e+00, 1.21590959535412e+00, 1.20575386763008e+00, 1.19638481754406e+00, 1.18779406172455e+00,\n                                                1.17996871023248e+00, 1.17289109073192e+00, 1.16653863823770e+00, 1.16088395915786e+00, 1.15589506313545e+00,\n                                                1.15153574700963e+00, 1.14776611023923e+00, 1.14454317880954e+00, 1.14182161380134e+00, 1.13955448064649e+00,\n                                                1.13769405516738e+00, 1.13619264259917e+00, 1.13500338591429e+00, 1.13408104001826e+00, 1.13338268893580e+00,\n                                                1.13286838414239e+00, 1.13250168387810e+00, 1.13225007571662e+00, 1.13208526788920e+00, 1.13198333883967e+00,\n                                                1.13192473909085e+00, 1.13189414454704e+00, 1.13188016560297e+00, 1.13187492161127e+00, 1.13187349511771e+00,\n                                                1.13187328457022e+00, 1.13187326566898e+00, 1.13187289175272e+00, 1.13187035841626e+00, 1.13186104562085e+00,\n                                                1.13183622126136e+00, 1.13178189443675e+00, 1.13167785466797e+00, 1.13149693675929e+00, 1.13120454707049e+00,\n                                                1.13075848229041e+00, 1.13010906604615e+00, 1.12919962140402e+00, 1.12796728804823e+00, 1.12634418129414e+00,\n                                                1.12425887601204e+00, 1.12163818236948e+00, 1.11840916302106e+00, 1.11450132460532e+00, 1.10984890227101e+00,\n                                                1.10439314667725e+00, 1.09808452023916e+00, 1.09088471393247e+00, 1.08276840675865e+00, 1.07372470448345e+00,\n                                                1.06375820909279e+00, 1.05288968246518e+00, 1.04115627557208e+00, 1.02861129907370e+00, 1.01532351578640e+00,\n                                                1.00137594456545e+00, 9.86864182303927e-01, 9.71894277078010e-01, 9.56580218635157e-01, 9.41041147064626e-01,\n                                                9.25398409749081e-01, 9.09772614235970e-01, 8.94280826470929e-01, 8.79034049184483e-01, 8.64135086665949e-01,\n                                                8.49676864623753e-01, 8.35741233287499e-01, 8.22398244010564e-01, 8.09705858709155e-01, 7.97710030004099e-01,\n                                                7.86445078525673e-01, 7.75934291584890e-01, 7.66190672402112e-01, 7.57217778977819e-01, 7.49010604183963e-01,\n                                                7.41556461782845e-01, 7.34835855375603e-01, 7.28823317796618e-01, 7.23488216715373e-01, 7.18795528050619e-01,\n                                                7.14706582352585e-01, 7.11179790821626e-01, 7.08171357430773e-01, 7.05635982054755e-01, 7.03527556928996e-01,\n                                                7.01799855511165e-01, 7.00407209229267e-01, 6.99305164001134e-01, 6.98451105117649e-01, 6.97804836394359e-01,\n                                                6.97329097676511e-01, 6.96990004039400e-01, 6.96757390491095e-01, 6.96605047696059e-01, 6.96510837130110e-01,\n                                                6.96456677981236e-01, 6.96428402770559e-01, 6.96415483763579e-01, 6.96410637425600e-01, 6.96409319106763e-01,\n                                                6.96409124525760e-01, 6.96409106588865e-01, 6.96408746525644e-01, 6.96406307048369e-01, 6.96397339332019e-01,\n                                                6.96373435154899e-01, 6.96321123793062e-01, 6.96220950262595e-01, 6.96046775766503e-01, 6.95765338937260e-01,\n                                                6.95336113608391e-01, 6.94711494805272e-01, 6.93837338654595e-01, 6.92653873156494e-01, 6.91096984520703e-01,\n                                                6.89099867590133e-01, 6.86595008774368e-01, 6.83516446535376e-01, 6.79802229199989e-01, 6.75396964888420e-01,\n                                                6.70254336499208e-01, 6.64339439272822e-01, 6.57630792801836e-01, 6.50121886295027e-01, 6.41822137138563e-01,\n                                                6.32757178298487e-01, 6.22968437670123e-01, 6.12512027614545e-01, 6.01457019226937e-01, 5.89883225931177e-01,\n                                                5.77878657662755e-01, 5.65536824840997e-01, 5.52954068222732e-01, 5.40227067911786e-01, 5.27450647031363e-01,\n                                                5.14715939948778e-01, 5.02108949280310e-01, 4.89709477003032e-01, 4.77590387359861e-01, 4.65817144475924e-01,\n                                                4.54447564634212e-01, 4.43531729024533e-01, 4.33112013701915e-01, 4.23223205872732e-01, 4.13892686752960e-01,\n                                                4.05140669573558e-01, 3.96980486422186e-01, 3.89418919914494e-01, 3.82456576037777e-01, 3.76088293862212e-01,\n                                                3.70303586980296e-01, 3.65087111047711e-01, 3.60419151890407e-01, 3.56276129290408e-01, 3.52631112569747e-01,\n                                                3.49454345177762e-01, 3.46713776365710e-01, 3.44375598469391e-01, 3.42404788167833e-01, 3.40765649298036e-01,\n                                                3.39422353437631e-01, 3.38339472662801e-01, 3.37482496858956e-01, 3.36818325958602e-01, 3.36315725768920e-01,\n                                                3.35945734877621e-01, 3.35682009692151e-01, 3.35501095109638e-01, 3.35382609685893e-01, 3.35309336435185e-01,\n                                                3.35267213426401e-01, 3.35245221951767e-01, 3.35235173986873e-01, 3.35231404668003e-01, 3.35230379323734e-01,\n                                                3.35230227985134e-01, 3.35230213562721e-01, 3.35229918931836e-01, 3.35227922767684e-01, 3.35220584708661e-01,\n                                                3.35201024533534e-01, 3.35158219578359e-01, 3.35076250668745e-01, 3.34933730140804e-01, 3.34703443752109e-01,\n                                                3.34352236035734e-01, 3.33841165427953e-01, 3.33125950668941e-01, 3.32157722863361e-01, 3.30884087617913e-01,\n                                                3.29250488524480e-01, 3.27201847028129e-01, 3.24684435063261e-01, 3.21647917039075e-01, 3.18047478669937e-01,\n                                                3.13845944035403e-01, 3.09015771440020e-01, 3.03540815084177e-01, 2.97417744432387e-01, 2.90657026586349e-01,\n                                                2.83283397946627e-01, 2.75335778135212e-01, 2.66866609313754e-01, 2.57940635529712e-01, 2.48633167826342e-01,\n                                                2.39027910239215e-01, 2.29214448254445e-01, 2.19285523312010e-01, 2.09334232485160e-01, 1.99451299213186e-01,\n                                                1.89722556839495e-01, 1.80226770705715e-01, 1.71033897388009e-01, 1.62203843966858e-01, 1.53785750181538e-01,\n                                                1.45817776846815e-01, 1.38327349631163e-01, 1.31331781685484e-01, 1.24839183470183e-01, 1.18849563513592e-01,\n                                                1.13356028361951e-01, 1.08346001350999e-01, 1.03802395400469e-01, 9.97046923061213e-02, 9.60298979393328e-02,\n                                                9.27533579240150e-02, 8.98494309106113e-02, 8.72920261862853e-02, 8.50550191071839e-02, 8.31125620093234e-02,\n                                                8.14393102604138e-02, 8.00105833903308e-02, 7.88024801846969e-02, 7.77919645875369e-02, 7.69569365195979e-02,\n                                                7.62762985149279e-02, 7.57300256165716e-02, 7.52992424457140e-02, 7.49663079582792e-02, 7.47149053200644e-02,\n                                                7.45301317513141e-02, 7.43985812797403e-02, 7.43084122238997e-02, 7.42493909754547e-02, 7.42129042557855e-02,\n                                                7.41919334084851e-02, 7.41809863007226e-02, 7.41759848339703e-02, 7.41741086689083e-02, 7.41735983119760e-02,\n                                                7.41735229845601e-02, 7.41735155288290e-02, 7.41733603104069e-02, 7.41723086894850e-02, 7.41684429204428e-02,\n                                                7.41581389731056e-02, 7.41355929615972e-02, 7.40924296907464e-02, 7.40174154443372e-02, 7.38962987132656e-02,\n                                                7.37118039859914e-02, 7.34438041453722e-02, 7.30696953505454e-02, 7.25649933516550e-02, 7.19041609187943e-02,\n                                                7.10616617595403e-02, 7.00132168996994e-02, 6.87372158810091e-02, 6.72162092711033e-02, 6.54383840059087e-02,\n                                                6.33989030393813e-02, 6.11009801389848e-02, 5.85565635830521e-02, 5.57865218522346e-02, 5.28202607885908e-02,\n                                                4.96947527951401e-02, 4.64530189727825e-02, 4.31421664859455e-02, 3.98111363716933e-02, 3.65083523980516e-02,\n                                                3.32794728953054e-02, 3.01654323520868e-02, 2.72009204894053e-02, 2.44133903952299e-02, 2.18226238265764e-02,\n                                                1.94408212820973e-02, 1.72731356645754e-02, 1.53185368831488e-02, 1.35708823537195e-02, 1.20200732413576e-02,\n                                                1.06531940809522e-02, 9.45555856606894e-03, 8.41161147486824e-03, 7.50566179750489e-03, 6.72244268637856e-03,\n                                                6.04750892115380e-03, 5.46749224828469e-03, 4.97023985437695e-03, 4.54486226160400e-03, 4.18171514464349e-03,\n                                                3.87233609287563e-03, 3.60935323418143e-03, 3.38637868479363e-03, 3.19789640365720e-03, 3.03915129093602e-03,\n                                                2.90604418911977e-03, 2.79503571451478e-03, 2.70306050800251e-03, 2.62745251866603e-03, 2.56588128107627e-03,\n                                                2.51629874363735e-03, 2.47689596070266e-03, 2.44606879543419e-03, 2.42239164270019e-03, 2.40459805278226e-03,\n                                                2.39156702078347e-03, 2.38231361848484e-03, 2.37598260295258e-03, 2.37184365475951e-03, 2.36928698773298e-03,\n                                                2.36781823277443e-03, 2.36705172192053e-03, 2.36670156790986e-03, 2.36657022455722e-03, 2.36653449706647e-03,\n                                                2.36652922380287e-03, 2.36652867985976e-03, 2.36651713334446e-03, 2.36643890537147e-03, 2.36615135153873e-03,\n                                                2.36538499582917e-03, 2.36370864270397e-03, 2.36050128020748e-03, 2.35493319571400e-03, 2.34595926556880e-03,\n                                                2.33232789089488e-03, 2.31260932861499e-03, 2.28524694105658e-03, 2.24863386462060e-03, 2.20121552158137e-03,\n                                                2.14161514787925e-03, 2.06877521125692e-03, 1.98210272874810e-03, 1.88160193793818e-03, 1.76797473835322e-03,\n                                                1.64266910720201e-03, 1.50785934383135e-03, 1.36634982107564e-03, 1.22140513092406e-03, 1.07652211892928e-03,\n                                                9.35170451028977e-04, 8.00535100543343e-04, 6.75294452415542e-04, 5.61461317844181e-04, 4.60302720906913e-04,\n                                                3.72340890055334e-04, 2.97425628421610e-04, 2.34859314162339e-04, 1.83550980787484e-04, 1.42175175562365e-04,\n                                                1.09314437101826e-04, 8.35710827629121e-05, 6.36433957432736e-05, 4.83703060094598e-05, 3.67534374254852e-05,\n                                                2.79640405076442e-05, 2.13372956485713e-05, 1.63534251012010e-05, 1.26078928754936e-05, 9.77947326319395e-06,\n                                                7.60801815413714e-06, 5.88793204370219e-06, 4.47176098727908e-06, 3.27146395440181e-06, 2.24904094547895e-06,\n                                                1.39747220906372e-06, 7.17654774273768e-07, 8.88178419700125e-16, 1.33226762955019e-15, 1.33226762955019e-15,\n                                                1.33226762955019e-15, 8.88178419700125e-16, 1.33226762955019e-15, 8.88178419700125e-16, 1.33226762955019e-15,\n                                                8.88178419700125e-16, 1.77635683940025e-15, 1.33226762955019e-15, 8.88178419700125e-16, 1.33226762955019e-15,\n                                                1.33226762955019e-15, 4.44089209850063e-16, 1.33226762955019e-15, 8.88178419700125e-16, 1.33226762955019e-15,\n                                                1.77635683940025e-15, 1.33226762955019e-15, 8.88178419700125e-16, 8.88178419700125e-16, 1.33226762955019e-15,\n                                                8.88178419700125e-16}),\nmadness::CubicInterpolationTable<double>(grid, {5.00000000000000e+00,  4.99999999443460e+00,  4.99999982234144e+00,  4.99999865638295e+00,\n                                                4.99999437016659e+00,  4.99998294445980e+00,  4.99995793842473e+00,  4.99991004444904e+00,\n                                                4.99982674256862e+00,  4.99969206737856e+00,  4.99948649682064e+00,  4.99918696845142e+00,\n                                                4.99876702488922e+00,  4.99819708627174e+00,  4.99744484388955e+00,  4.99647576583797e+00,\n                                                4.99525370266855e+00,  4.99374157869611e+00,  4.99190215285637e+00,  4.98969883178715e+00,\n                                                4.98709651704904e+00,  4.98406246799837e+00,  4.98056716164582e+00,  4.97658513075374e+00,\n                                                4.97209576135143e+00,  4.96708403074329e+00,  4.96154116698570e+00,  4.95546521082781e+00,\n                                                4.94886146142860e+00,  4.94174278800206e+00,  4.93412979113255e+00,  4.92605080003599e+00,\n                                                4.91754169563409e+00,  4.90864555395904e+00,  4.89941210998716e+00,  4.88989704825612e+00,\n                                                4.88016113318737e+00,  4.87026919848583e+00,  4.86028902087134e+00,  4.85029010829948e+00,\n                                                4.84034243641576e+00,  4.83051516903866e+00,  4.82087539889306e+00,  4.81148694365883e+00,\n                                                4.80240922981684e+00,  4.79369629301001e+00,  4.78539591898637e+00,  4.77754894396835e+00,\n                                                4.77018872779680e+00,  4.76334080769040e+00,  4.75702273515137e+00,  4.75124409358625e+00,\n                                                4.74600668969281e+00,  4.74130490764204e+00,  4.73712621157243e+00,  4.73345177891265e+00,\n                                                4.73025724454563e+00,  4.72751353381667e+00,  4.72518776087024e+00,  4.72324416778671e+00,\n                                                4.72164507950043e+00,  4.72035184953970e+00,  4.71932577225687e+00,  4.71852893842771e+00,\n                                                4.71792501288939e+00,  4.71747991523408e+00,  4.71716238743703e+00,  4.71694443560663e+00,\n                                                4.71680163671538e+00,  4.71671330510137e+00,  4.71666251760850e+00,  4.71663600033958e+00,\n                                                4.71662388401033e+00,  4.71661933869705e+00,  4.71661810225598e+00,  4.71661791975967e+00,\n                                                4.71661789477849e+00,  4.71661730480752e+00,  4.71661330766210e+00,  4.71659861365426e+00,\n                                                4.71655944422166e+00,  4.71647371981879e+00,  4.71630953561661e+00,  4.71602398125911e+00,\n                                                4.71556235113312e+00,  4.71485778052169e+00,  4.71383133099119e+00,  4.71239253582926e+00,\n                                                4.71044040377131e+00,  4.70786486710845e+00,  4.70454864899848e+00,  4.70036951472230e+00,\n                                                4.69520286285862e+00,  4.68892460473450e+00,  4.68141427360260e+00,  4.67255829811305e+00,\n                                                4.66225336701758e+00,  4.65040980304720e+00,  4.63695485336401e+00,  4.62183579244129e+00,\n                                                4.60502272209186e+00,  4.58651094491238e+00,  4.56632278449238e+00,  4.54450873127447e+00,\n                                                4.52114780928167e+00,  4.49634708712639e+00,  4.47024029609720e+00,  4.44298556605169e+00,\n                                                4.41476234196770e+00,  4.38576759484837e+00,  4.35621148453677e+00,  4.32631266390327e+00,\n                                                4.29629343041674e+00,  4.26637493097432e+00,  4.23677260991608e+00,  4.20769206117867e+00,\n                                                4.17932540765812e+00,  4.15184828875991e+00,  4.12541749536291e+00,  4.10016925382396e+00,\n                                                4.07621812988809e+00,  4.05365650087908e+00,  4.03255453057826e+00,  4.01296057504988e+00,\n                                                3.99490194797850e+00,  3.97838597913854e+00,  3.96340130763901e+00,  3.94991936092985e+00,\n                                                3.93789597984219e+00,  3.92727315811664e+00,  3.91798087125401e+00,  3.90993897373126e+00,\n                                                3.90305914557526e+00,  3.89724686913302e+00,  3.89240341495942e+00,  3.88842781254474e+00,\n                                                3.88521877770211e+00,  3.88267656445453e+00,  3.88070470583103e+00,  3.87921160568349e+00,\n                                                3.87811194295988e+00,  3.87732785117141e+00,  3.87678983925876e+00,  3.87643742569860e+00,\n                                                3.87621946531093e+00,  3.87609415747410e+00,  3.87602873483572e+00,  3.87599884254242e+00,\n                                                3.87598762888703e+00,  3.87598457849859e+00,  3.87598412826756e+00,  3.87598408552823e+00,\n                                                3.87598321417452e+00,  3.87597731062789e+00,  3.87595560860941e+00,  3.87589775932987e+00,\n                                                3.87577115929061e+00,  3.87552871156304e+00,  3.87510711325674e+00,  3.87442575291890e+00,\n                                                3.87338629106174e+00,  3.87187298427041e+00,  3.86975379758855e+00,  3.86688233026665e+00,\n                                                3.86310055578504e+00,  3.85824234796182e+00,  3.85213773106930e+00,  3.84461775400634e+00,\n                                                3.83551984824205e+00,  3.82469348876197e+00,  3.81200593964243e+00,  3.79734783479699e+00,\n                                                3.78063832392737e+00,  3.76182950788459e+00,  3.74090990019449e+00,  3.71790668504963e+00,\n                                                3.69288659742719e+00,  3.66595532644536e+00,  3.63725543391182e+00,  3.60696287855058e+00,\n                                                3.57528233259135e+00,  3.54244156023343e+00,  3.50868518672412e+00,  3.47426821491062e+00,\n                                                3.43944963988962e+00,  3.40448647355363e+00,  3.36962842590755e+00,  3.33511340895306e+00,\n                                                3.30116394320305e+00,  3.26798446742249e+00,  3.23575948757782e+00,  3.20465245634103e+00,\n                                                3.17480525121733e+00,  3.14633811555055e+00,  3.11934993810032e+00,  3.09391876825012e+00,\n                                                3.07010248984653e+00,  3.04793960265087e+00,  3.02745008315608e+00,  3.00863631423431e+00,\n                                                2.99148408513262e+00,  2.97596367005175e+00,  2.96203099580703e+00,  2.94962890798211e+00,\n                                                2.93868854160603e+00,  2.92913079758938e+00,  2.92086792058217e+00,  2.91380516798325e+00,\n                                                2.90784255380041e+00,  2.90287664511624e+00,  2.89880238323189e+00,  2.89551489635223e+00,\n                                                2.89291126621252e+00,  2.89089220765243e+00,  2.88936361816537e+00,  2.88823795421919e+00,\n                                                2.88743539292196e+00,  2.88688474154379e+00,  2.88652406350494e+00,  2.88630099753411e+00,\n                                                2.88617275645231e+00,  2.88610580296320e+00,  2.88607521134107e+00,  2.88606373536424e+00,\n                                                2.88606061361998e+00,  2.88606015285706e+00,  2.88606011185244e+00,  2.88605930467165e+00,\n                                                2.88605383590626e+00,  2.88603373219508e+00,  2.88598014345771e+00,  2.88586286772207e+00,\n                                                2.88563827795716e+00,  2.88524773729681e+00,  2.88461658097899e+00,  2.88365373372698e+00,\n                                                2.88225201942464e+00,  2.88028920480695e+00,  2.87762979944804e+00,  2.87412760969813e+00,\n                                                2.86962901397764e+00,  2.86397689134336e+00,  2.85701509593025e+00,  2.84859332941860e+00,\n                                                2.83857222597991e+00,  2.82682843402107e+00,  2.81325946156548e+00,  2.79778805172144e+00,\n                                                2.78036587410989e+00,  2.76097635733356e+00,  2.73963654316593e+00,  2.71639790835282e+00,\n                                                2.69134616546195e+00,  2.66460010995524e+00,  2.63630961784552e+00,  2.60665291186512e+00,\n                                                2.57583320437470e+00,  2.54407479868443e+00,  2.51161869866672e+00,  2.47871775398720e+00,\n                                                2.44563136874039e+00,  2.41261983366122e+00,  2.37993840659038e+00,  2.34783135162497e+00,\n                                                2.31652623291036e+00,  2.28622881659968e+00,  2.25711893829133e+00,  2.22934762913860e+00,\n                                                2.20303566692273e+00,  2.17827355396187e+00,  2.15512275980166e+00,  2.13361794081206e+00,\n                                                2.11376978546385e+00,  2.09556813765990e+00,  2.07898510747245e+00,  2.06397796533387e+00,\n                                                2.05049170784761e+00,  2.03846126279173e+00,  2.02781335817205e+00,  2.01846811370495e+00,\n                                                2.01034042627922e+00,  2.00334121934343e+00,  1.99737861545409e+00,  1.99235907600846e+00,\n                                                1.98818853570249e+00,  1.98477354346912e+00,  1.98202240762026e+00,  1.97984633111664e+00,\n                                                1.97816051351568e+00,  1.97688518927837e+00,  1.97594656781216e+00,  1.97527763894677e+00,\n                                                1.97481880850721e+00,  1.97451833220802e+00,  1.97433252205676e+00,  1.97422570747353e+00,\n                                                1.97416994289752e+00,  1.97414446411871e+00,  1.97413490623271e+00,  1.97413230626386e+00,\n                                                1.97413192251419e+00,  1.97413188858875e+00,  1.97413122329682e+00,  1.97412671585471e+00,\n                                                1.97411014614961e+00,  1.97406597838942e+00,  1.97396932334961e+00,  1.97378423662783e+00,\n                                                1.97346242944892e+00,  1.97294246493117e+00,  1.97214950793485e+00,  1.97099568932600e+00,\n                                                1.96938113395599e+00,  1.96719568395927e+00,  1.96432132335055e+00,  1.96063527520522e+00,\n                                                1.95601369888680e+00,  1.95033586342537e+00,  1.94348861791727e+00,  1.93537092673742e+00,\n                                                1.92589819475985e+00,  1.91500608568080e+00,  1.90265354519254e+00,  1.88882478824639e+00,\n                                                1.87353009856642e+00,  1.85680541257698e+00,  1.83871080155408e+00,  1.81932809776102e+00,\n                                                1.79875800117934e+00,  1.77711702766219e+00,  1.75453460781698e+00,  1.73115053196492e+00,\n                                                1.70711279310091e+00,  1.68257574823311e+00,  1.65769843362711e+00,  1.63264284809756e+00,\n                                                1.60757205612113e+00,  1.58264803864702e+00,  1.55802930715873e+00,  1.53386837193426e+00,\n                                                1.51030920352080e+00,  1.48748484236273e+00,  1.46551529881223e+00,  1.44450585287599e+00,\n                                                1.42454582003957e+00,  1.40570780543110e+00,  1.38804743013463e+00,  1.37160348453368e+00,\n                                                1.35639844550256e+00,  1.34243928647058e+00,  1.32971851004806e+00,  1.31821533963658e+00,\n                                                1.30789701679879e+00,  1.29872016294567e+00,  1.29063217536124e+00,  1.28357263747528e+00,\n                                                1.27747473084072e+00,  1.27226664112481e+00,  1.26787295257686e+00,  1.26421602515479e+00,\n                                                1.26121734624136e+00,  1.25879884525469e+00,  1.25688415513022e+00,  1.25539980031495e+00,\n                                                1.25427628722790e+00,  1.25344907067621e+00,  1.25285936891590e+00,  1.25245480118266e+00,\n                                                1.25218982467629e+00,  1.25202595305317e+00,  1.25193174517666e+00,  1.25188256076543e+00,\n                                                1.25186008813656e+00,  1.25185165789944e+00,  1.25184936467260e+00,  1.25184902619720e+00,\n                                                1.25184899581163e+00,  1.25184839470525e+00,  1.25184432212537e+00,  1.25182935095544e+00,\n                                                1.25178944380873e+00,  1.25170211050952e+00,  1.25153486643328e+00,  1.25124405775360e+00,\n                                                1.25077411465511e+00,  1.25005728757894e+00,  1.24901391390481e+00,  1.24755325229469e+00,\n                                                1.24557490834002e+00,  1.24297085741742e+00,  1.23962804833579e+00,  1.23543154451612e+00,\n                                                1.23026812878093e+00,  1.22403026474368e+00,  1.21662027438103e+00,  1.20795456034957e+00,\n                                                1.19796767610992e+00,  1.18661603026812e+00,  1.17388100695157e+00,  1.15977129427429e+00,\n                                                1.14432423995389e+00,  1.12760609759505e+00,  1.10971108798332e+00,  1.09075927370839e+00,\n                                                1.07089332695003e+00,  1.05027435154034e+00,  1.02907699231249e+00,  1.00748411810463e+00,\n                                                9.85681392162636e-01,  9.63852040980198e-01,  9.42172100133975e-01,  9.20806358235134e-01,\n                                                8.99905146152782e-01,  8.79602038504760e-01,  8.60012458299479e-01,  8.41233111909049e-01,\n                                                8.23342135575650e-01,  8.06399808308272e-01,  7.90449678183215e-01,  7.75519956405108e-01,\n                                                7.61625051568168e-01,  7.48767140768334e-01,  7.36937700498490e-01,  7.26118945512929e-01,\n                                                7.16285146048707e-01,  7.07403811895283e-01,  6.99436745528429e-01,  6.92340976102452e-01,\n                                                6.86069592042127e-01,  6.80572492912892e-01,  6.75797081781897e-01,  6.71688917946384e-01,\n                                                6.68192347139051e-01,  6.65251122480937e-01,  6.62809024843769e-01,  6.60810486184255e-01,\n                                                6.59201214103715e-01,  6.57928810667685e-01,  6.56943373714634e-01,  6.56198064825301e-01,\n                                                6.55649625136962e-01,  6.55258818548547e-01,  6.54990781769779e-01,  6.54815262205065e-01,\n                                                6.54706727778718e-01,  6.54644337310379e-01,  6.54611765617801e-01,  6.54596883743040e-01,\n                                                6.54591301102846e-01,  6.54589782495471e-01,  6.54589558352425e-01,  6.54589537690437e-01,\n                                                6.54589122924098e-01,  6.54586312828374e-01,  6.54575982727830e-01,  6.54548447306647e-01,\n                                                6.54488190943361e-01,  6.54372809014795e-01,  6.54172209599837e-01,  6.53848123733710e-01,\n                                                6.53353970438762e-01,  6.52635119171740e-01,  6.51629585777150e-01,  6.50269187115478e-01,\n                                                6.48481162994618e-01,  6.46190251106151e-01,  6.43321171427443e-01,  6.39801442233041e-01,\n                                                6.35564413078810e-01,  6.30552364869574e-01,  6.24719498459426e-01,  6.18034616654654e-01,\n                                                6.10483304954373e-01,  6.02069437175503e-01,  5.92815873844584e-01,  5.82764281051661e-01,\n                                                5.71974069030424e-01,  5.60520524024275e-01,  5.48492273817082e-01,  5.35988277279563e-01,\n                                                5.23114554847719e-01,  5.09980877650958e-01,  4.96697610271128e-01,  4.83372861900883e-01,\n                                                4.70110051236312e-01,  4.57005940225721e-01,  4.44149147652878e-01,  4.31619119638637e-01,\n                                                4.19485511804779e-01,  4.07807926032249e-01,  3.96635941059390e-01,  3.86009377815785e-01,\n                                                3.75958744942248e-01,  3.66505815706270e-01,  3.57664293548249e-01,  3.49440529432504e-01,\n                                                3.41834259997115e-01,  3.34839341264057e-01,  3.28444458407643e-01,  3.22633797710080e-01,\n                                                3.17387672197943e-01,  3.12683097349669e-01,  3.08494317492521e-01,  3.04793286906229e-01,\n                                                3.01550112113919e-01,  2.98733463321479e-01,  2.96310963471183e-01,  2.94249562956797e-01,\n                                                2.92515906797941e-01,  2.91076699119310e-01,  2.89899067287057e-01,  2.88950925213569e-01,\n                                                2.88201332373833e-01,  2.87620842221484e-01,  2.87181831195517e-01,  2.86858797601898e-01,\n                                                2.86628618534611e-01,  2.86470752807784e-01,  2.86367378667768e-01,  2.86303456816941e-01,\n                                                2.86266711894982e-01,  2.86247528834964e-01,  2.86238764187722e-01,  2.86235476306612e-01,\n                                                2.86234581927067e-01,  2.86234449918660e-01,  2.86234437338394e-01,  2.86234180340215e-01,\n                                                2.86232439144799e-01,  2.86226038402157e-01,  2.86208976955294e-01,  2.86171641354185e-01,\n                                                2.86100150544781e-01,  2.85975862882217e-01,  2.85775076122016e-01,  2.85468950168402e-01,\n                                                2.85023680414327e-01,  2.84400945613683e-01,  2.83558647434749e-01,  2.82451948316754e-01,\n                                                2.81034599474952e-01,  2.79260531921864e-01,  2.77085661013662e-01,  2.74469831011961e-01,\n                                                2.71378803074521e-01,  2.67786171214984e-01,  2.63675079583495e-01,  2.59039614005385e-01,\n                                                2.53885753087868e-01,  2.48231789716063e-01,  2.42108170765931e-01,  2.35556747771377e-01,\n                                                2.28629479005964e-01,  2.21386668169254e-01,  2.13894861028971e-01,  2.06224544553109e-01,\n                                                1.98447800758335e-01,  1.90636059490749e-01,  1.82858072718036e-01,  1.75178201579575e-01,\n                                                1.67655071411452e-01,  1.60340614328836e-01,  1.53279487963220e-01,  1.46508835378494e-01,\n                                                1.40058336064069e-01,  1.33950490735279e-01,  1.28201081942335e-01,  1.22819756249791e-01,\n                                                1.17810680128461e-01,  1.13173229223221e-01,  1.08902678339428e-01,  1.04990866782742e-01,\n                                                1.01426820352502e-01,  9.81973172548569e-02,  9.52873904610705e-02,  9.26807635890539e-02,\n                                                9.03602212244223e-02,  8.83079177069774e-02,  8.65056307809295e-02,  8.49349681464320e-02,\n                                                8.35775358785726e-02,  8.24150779376138e-02,  8.14295956371867e-02,  8.06034550358872e-02,\n                                                7.99194888566239e-02,  7.93610978162409e-02,  7.89123542799670e-02,  7.85581090716292e-02,\n                                                7.82841002145895e-02,  7.80770604999468e-02,  7.79248192234308e-02,  7.78163923292770e-02,\n                                                7.77420546448599e-02,  7.76933879355175e-02,  7.76632991525572e-02,  7.76460044297744e-02,\n                                                7.76369759945661e-02,  7.76328510491284e-02,  7.76313036754663e-02,  7.76308827556900e-02,\n                                                7.76308206289356e-02,  7.76308144797753e-02,  7.76306864623919e-02,  7.76298191301636e-02,\n                                                7.76266307907090e-02,  7.76181323519261e-02,  7.75995362817445e-02,  7.75639323723700e-02,\n                                                7.75020474998396e-02,  7.74021072697577e-02,  7.72498179903103e-02,  7.70284872490929e-02,\n                                                7.67192997722752e-02,  7.63017614370192e-02,  7.57543175957203e-02,  7.50551418165095e-02,\n                                                7.41830777644212e-02,  7.31187008870950e-02,  7.18454492118612e-02,  7.03507560097458e-02,\n                                                6.86271039652020e-02,  6.66729135821624e-02,  6.44931802482986e-02,  6.20997861045707e-02,\n                                                5.95114346260743e-02,  5.67531859474801e-02,  5.38556062414770e-02,  5.08535805624275e-02,\n                                                4.77848707918405e-02,  4.46885243677544e-02,  4.16032521714991e-02,  3.85658937321871e-02,\n                                                3.56100750845760e-02,  3.27651412347905e-02,  3.00554147095609e-02,  2.74997983627747e-02,\n                                                2.51117088580148e-02,  2.28993007835081e-02,  2.08659227487082e-02,  1.90107371513744e-02,\n                                                1.73294342396915e-02,  1.58149771243181e-02,  1.44583253227974e-02,  1.32490978488926e-02,\n                                                1.21761506363187e-02,  1.12280555864519e-02,  1.03934787707258e-02,  9.66146290721870e-03,\n                                                9.02162421346908e-03,  8.46427643602965e-03,  7.98049573655835e-03,  7.56213968814290e-03,\n                                                7.20183239190408e-03,  6.89292607063496e-03,  6.62944772920682e-03,  6.40603777535187e-03,\n                                                6.21788596572515e-03,  6.06066871840305e-03,  5.93049071598273e-03,  5.82383279363707e-03,\n                                                5.73750733173917e-03,  5.66862171787719e-03,  5.61454987814525e-03,  5.57291138313420e-03,\n                                                5.54155720503502e-03,  5.51856084562274e-03,  5.50221328661493e-03,  5.49102005267610e-03,\n                                                5.48369863902476e-03,  5.47917464718761e-03,  5.47657518884570e-03,  5.47521843975574e-03,\n                                                5.47459862176325e-03,  5.47436612149710e-03,  5.47430287719042e-03,  5.47429354251427e-03,\n                                                5.47429257961252e-03,  5.47427213946072e-03,  5.47413365623939e-03,  5.47362460433742e-03,\n                                                5.47226786680088e-03,  5.46929973475851e-03,  5.46361944702323e-03,  5.45375401044446e-03,\n                                                5.43784270326064e-03,  5.41364629551211e-03,  5.37858636789768e-03,  5.32981984360692e-03,\n                                                5.26435260371461e-03,  5.17919351217699e-03,  5.07154615029393e-03,  4.93903013655039e-03,\n                                                4.77991755054497e-03,  4.59336359933538e-03,  4.37960557737416e-03,  4.14010191176661e-03,\n                                                3.87758505424074e-03,  3.59600898470713e-03,  3.30038388653175e-03,  2.99650560677023e-03,\n                                                2.69060314490055e-03,  2.38894040360993e-03,  2.09741596332780e-03,  1.82120516377182e-03,\n                                                1.56448240919715e-03,  1.33024982212504e-03,  1.12028320707847e-03,  9.35189855540308e-04,\n                                                7.74557318631963e-04,  6.37160841257867e-04,  5.21192976321139e-04,  4.24483780270712e-04,\n                                                3.44691930876273e-04,  2.79460081156202e-04,  2.26535225975155e-04,  1.83854951602669e-04,\n                                                1.49597896031750e-04,  1.22198431286691e-04,  1.00333125828911e-04,  8.28939189698730e-05,\n                                                6.89624286485113e-05,  5.77906464949152e-05,  4.87832922484444e-05,  4.14749830213168e-05,\n                                                3.55017104176625e-05,  3.05733657093299e-05,  2.64548787427543e-05,  2.29577773129819e-05,\n                                                1.99375306948468e-05,  1.72903052622075e-05,  1.49459155851517e-05,  1.28580316864912e-05,\n                                                1.09947544721933e-05,  9.33198160346649e-06,  7.85006384784737e-06,  6.53273997919257e-06,\n                                                5.36692606090128e-06,  4.34237581892205e-06,  3.45091203790560e-06,  2.68539985537330e-06,\n                                                2.03877089788307e-06,  1.50332059067892e-06,  1.07034844720744e-06,  7.30095467638137e-07,\n                                                4.71883534025608e-07,  -4.44089209850063e-15, -3.55271367880050e-15, -4.44089209850063e-15,\n                                                -3.55271367880050e-15, -3.55271367880050e-15, -3.55271367880050e-15}),\nmadness::CubicInterpolationTable<double>(grid, {6.00000000000000e+00,  5.99999999255551e+00,  5.99999976235719e+00,  5.99999820272699e+00,\n                                                5.99999246932105e+00,  5.99997718585584e+00,  5.99994373679305e+00,  5.99987967180828e+00,\n                                                5.99976824339727e+00,  5.99958809480365e+00,  5.99931311073467e+00,  5.99891243825131e+00,\n                                                5.99835067998936e+00,  5.99758825671410e+00,  5.99658193135611e+00,  5.99528548231842e+00,\n                                                5.99365051014328e+00,  5.99162735867469e+00,  5.98916612967273e+00,  5.98621776836746e+00,\n                                                5.98273519655223e+00,  5.97867446932109e+00,  5.97399593124235e+00,  5.96866534743701e+00,\n                                                5.96265498456428e+00,  5.95594461607458e+00,  5.94852242536600e+00,  5.94038577989616e+00,\n                                                5.93154184918944e+00,  5.92200804043499e+00,  5.91181222738454e+00,  5.90099275184731e+00,\n                                                5.88959818240750e+00,  5.87768682202803e+00,  5.86532596469742e+00,  5.85259091076258e+00,\n                                                5.83956376044439e+00,  5.82633201454039e+00,  5.81298701976495e+00,  5.79962230293257e+00,\n                                                5.78633184278237e+00,  5.77320833040681e+00,  5.76034146893928e+00,  5.74781636053991e+00,\n                                                5.73571202412896e+00,  5.72410008120141e+00,  5.71304363991733e+00,  5.70259639999517e+00,\n                                                5.69280199318507e+00,  5.68369356662485e+00,  5.67529360944079e+00,  5.66761401670660e+00,\n                                                5.66065637938473e+00,  5.65441248414516e+00,  5.64886500294392e+00,  5.64398834888317e+00,\n                                                5.63974967210553e+00,  5.63610996725182e+00,  5.63302526231483e+00,  5.63044785756078e+00,\n                                                5.62832758259765e+00,  5.62661303969373e+00,  5.62525280214337e+00,  5.62419653788373e+00,\n                                                5.62339603071229e+00,  5.62280607433689e+00,  5.62238521807117e+00,  5.62209634719890e+00,\n                                                5.62190708576495e+00,  5.62179001467843e+00,  5.62172270338050e+00,  5.62168755877201e+00,\n                                                5.62167150044320e+00,  5.62166547633412e+00,  5.62166383762326e+00,  5.62166359575271e+00,\n                                                5.62166356264404e+00,  5.62166278072909e+00,  5.62165748313418e+00,  5.62163800852475e+00,\n                                                5.62158609567357e+00,  5.62147248215463e+00,  5.62125488521185e+00,  5.62087644019056e+00,\n                                                5.62026465942933e+00,  5.61933096035265e+00,  5.61797079608111e+00,  5.61606440565046e+00,\n                                                5.61347818443274e+00,  5.61006665913586e+00,  5.60567503633520e+00,  5.60014227923128e+00,\n                                                5.59330465433897e+00,  5.58499967784915e+00,  5.57507037984373e+00,  5.56336979248547e+00,\n                                                5.54976555481127e+00,  5.53414451123118e+00,  5.51641716345879e+00,  5.49652181771307e+00,\n                                                5.47442825332280e+00,  5.45014072919482e+00,  5.42370014545695e+00,  5.39518519313496e+00,\n                                                5.36471235775039e+00,  5.33243469360879e+00,  5.29853935164124e+00,  5.26324391930279e+00,\n                                                5.22679170823637e+00,  5.18944619516377e+00,  5.15148487530767e+00,  5.11319281920440e+00,\n                                                5.07485622984731e+00,  5.03675627814276e+00,  4.99916345445542e+00,  4.96233261882250e+00,\n                                                4.92649886972490e+00,  4.89187428855304e+00,  4.85864556039791e+00,  4.82697242598621e+00,\n                                                4.79698688680022e+00,  4.76879306601931e+00,  4.74246762063644e+00,  4.71806060262579e+00,\n                                                4.69559667655078e+00,  4.67507661465214e+00,  4.65647900569913e+00,  4.63976212868279e+00,\n                                                4.62486595531238e+00,  4.61171425534006e+00,  4.60021678555714e+00,  4.59027154683828e+00,\n                                                4.58176709410448e+00,  4.57458488198114e+00,  4.56860162483377e+00,  4.56369164445134e+00,\n                                                4.55972917264807e+00,  4.55659057021837e+00,  4.55415641873973e+00,  4.55231343834306e+00,\n                                                4.55095618332677e+00,  4.54998846878994e+00,  4.54932448552202e+00,  4.54888956721164e+00,\n                                                4.54862058339524e+00,  4.54846594301736e+00,  4.54838520639954e+00,  4.54834831707972e+00,\n                                                4.54833447860737e+00,  4.54833071420594e+00,  4.54833015858813e+00,  4.54833010584468e+00,\n                                                4.54832903053091e+00,  4.54832174512677e+00,  4.54829496328349e+00,  4.54822357328304e+00,\n                                                4.54806734085870e+00,  4.54776814797974e+00,  4.54724788317516e+00,  4.54640708855278e+00,\n                                                4.54512445630661e+00,  4.54325725225107e+00,  4.54064272453613e+00,  4.53710053086919e+00,\n                                                4.53243618617542e+00,  4.52644549403983e+00,  4.51891987965477e+00,  4.50965249055788e+00,\n                                                4.49844487662400e+00,  4.48511400628925e+00,  4.46949932673598e+00,  4.45146953755216e+00,\n                                                4.43092872638649e+00,  4.40782151719788e+00,  4.38213691139219e+00,  4.35391056161333e+00,\n                                                4.32322530594060e+00,  4.29020990129995e+00,  4.25503601930186e+00,  4.21791369224710e+00,\n                                                4.17908550670559e+00,  4.13881992263427e+00,  4.09740413673239e+00,  4.05513690475835e+00,\n                                                4.01232169104237e+00,  3.96926043338608e+00,  3.92624811186382e+00,  3.88356820673825e+00,\n                                                3.84148903867725e+00,  3.80026091480664e+00,  3.76011396253318e+00,  3.72125651951662e+00,\n                                                3.68387395792074e+00,  3.64812784642002e+00,  3.61415538573961e+00,  3.58206908500451e+00,\n                                                3.55195667125841e+00,  3.52388124026221e+00,  3.49788166275138e+00,  3.47397325834092e+00,\n                                                3.45214874194137e+00,  3.43237943785591e+00,  3.41461674717798e+00,  3.39879384635559e+00,\n                                                3.38482758951428e+00,  3.37262058418378e+00,  3.36206340874497e+00,  3.35303693926963e+00,\n                                                3.34541475259483e+00,  3.33906557085573e+00,  3.33385571006768e+00,  3.32965149185277e+00,\n                                                3.32632157351910e+00,  3.32373914810489e+00,  3.32178396346098e+00,  3.32034410869663e+00,\n                                                3.31931751794228e+00,  3.31861314575789e+00,  3.31815177573880e+00,  3.31786643376597e+00,\n                                                3.31770238948101e+00,  3.31761674329472e+00,  3.31757761077959e+00,  3.31756293081161e+00,\n                                                3.31755893750339e+00,  3.31755834809942e+00,  3.31755829564667e+00,  3.31755726310793e+00,\n                                                3.31755026750978e+00,  3.31752455100669e+00,  3.31745600067925e+00,  3.31730598213624e+00,\n                                                3.31701868700229e+00,  3.31651910440055e+00,  3.31571171604125e+00,  3.31448000213863e+00,\n                                                3.31268683030249e+00,  3.31017578074961e+00,  3.30677343758256e+00,  3.30229264664209e+00,\n                                                3.29653670523508e+00,  3.28930440837337e+00,  3.28039583158169e+00,  3.26961868452946e+00,\n                                                3.25679502638825e+00,  3.24176809714092e+00,  3.22440899311599e+00,  3.20462290272002e+00,\n                                                3.18235462060058e+00,  3.15759307364831e+00,  3.13037461637492e+00,  3.10078488130428e+00,\n                                                3.06895899848463e+00,  3.03508002788148e+00,  2.99937548703984e+00,  2.96211191920988e+00,\n                                                2.92358755306089e+00,  2.88412326804087e+00,  2.84405229547826e+00,  2.80370932161575e+00,\n                                                2.76341985126495e+00,  2.72349076168879e+00,  2.68420286658653e+00,  2.64580601533137e+00,\n                                                2.60851683862257e+00,  2.57251883379197e+00,  2.53796417729214e+00,  2.50497652633724e+00,\n                                                2.47365412485358e+00,  2.44407270427575e+00,  2.41628789022966e+00,  2.39033702671949e+00,\n                                                2.36624047352417e+00,  2.34400251183642e+00,  2.32361201814625e+00,  2.30504305497502e+00,\n                                                2.28825549687506e+00,  2.27319577432751e+00,  2.25979778481257e+00,  2.24798399307232e+00,\n                                                2.23766672218825e+00,  2.22874962269250e+00,  2.22112929702484e+00,  2.21469704972046e+00,\n                                                2.20934072855016e+00,  2.20494661764241e+00,  2.20140134002152e+00,  2.19859372397463e+00,\n                                                2.19641658543390e+00,  2.19476837749612e+00,  2.19355465870222e+00,  2.19268933411870e+00,\n                                                2.19209562783424e+00,  2.19170675227123e+00,  2.19146624857966e+00,  2.19132798300020e+00,\n                                                2.19125579595317e+00,  2.19122281310561e+00,  2.19121044010248e+00,  2.19120707434579e+00,\n                                                2.19120657756716e+00,  2.19120653364937e+00,  2.19120567240327e+00,  2.19119983733798e+00,\n                                                2.19117838707651e+00,  2.19112120898347e+00,  2.19099607829968e+00,  2.19075644639878e+00,\n                                                2.19033975055264e+00,  2.18966632910335e+00,  2.18863901579602e+00,  2.18714347439030e+00,\n                                                2.18504931843088e+00,  2.18221204003624e+00,  2.17847574479521e+00,  2.17367665695472e+00,\n                                                2.16764732063063e+00,  2.16022138067929e+00,  2.15123878450409e+00,  2.14055120810069e+00,\n                                                2.12802748140457e+00,  2.11355877443926e+00,  2.09706331009964e+00,  2.07849039192746e+00,\n                                                2.05782357270004e+00,  2.03508283576287e+00,  2.01032570813293e+00,  1.98364726594865e+00,\n                                                1.95517902579571e+00,  1.92508674138755e+00,  1.89356714946165e+00,  1.86084373825717e+00,\n                                                1.82716165113317e+00,  1.79278188656044e+00,  1.75797500814022e+00,  1.72301462469583e+00,\n                                                1.68817093010117e+00,  1.65370459700591e+00,  1.61986129452435e+00,  1.58686704951387e+00,\n                                                1.55492460140172e+00,  1.52421082164244e+00,  1.49487519133761e+00,  1.46703926331442e+00,\n                                                1.44079698414856e+00,  1.41621572000600e+00,  1.39333781748840e+00,  1.37218253432819e+00,\n                                                1.35274819087256e+00,  1.33501441744838e+00,  1.31894440077241e+00,  1.30448706109937e+00,\n                                                1.29157911818646e+00,  1.28014702667886e+00,  1.27010877924039e+00,  1.26137558833431e+00,\n                                                1.25385346511104e+00,  1.24744471679774e+00,  1.24204938291839e+00,  1.23756662633585e+00,\n                                                1.23389608831639e+00,  1.23093920844151e+00,  1.22860050113365e+00,  1.22678877172353e+00,\n                                                1.22541824722976e+00,  1.22440959111744e+00,  1.22369076787075e+00,  1.22319772266755e+00,\n                                                1.22287484394190e+00,  1.22267518204931e+00,  1.22256040522892e+00,  1.22250048397885e+00,\n                                                1.22247310605710e+00,  1.22246283574928e+00,  1.22246004198558e+00,  1.22245962963224e+00,\n                                                1.22245959261452e+00,  1.22245886030673e+00,  1.22245389882406e+00,  1.22243566004332e+00,\n                                                1.22238704333617e+00,  1.22228065287953e+00,  1.22207692548682e+00,  1.22172271399845e+00,\n                                                1.22115040778380e+00,  1.22027766731578e+00,  1.21900784267963e+00,  1.21723113448681e+00,\n                                                1.21482653808422e+00,  1.21166458650049e+00,  1.20761087319100e+00,  1.20253029228497e+00,\n                                                1.19629188301864e+00,  1.18877410928146e+00,  1.17987034927659e+00,  1.16949432022165e+00,\n                                                1.15758512575972e+00,  1.14411159644730e+00,  1.12907560258556e+00,  1.11251405794291e+00,\n                                                1.09449940351934e+00,  1.07513845921687e+00,  1.05456965037851e+00,  1.03295874379489e+00,\n                                                1.01049334930869e+00,  9.87376543277124e-01,  9.63820035577585e-01,  9.40037323820117e-01,\n                                                9.16237254618625e-01,  8.92618346796375e-01,  8.69364135937083e-01,  8.46639688282800e-01,\n                                                8.24589320139257e-01,  8.03335460331891e-01,  7.82978517536381e-01,  7.63597566191261e-01,\n                                                7.45251644087230e-01,  7.27981457770244e-01,  7.11811312512786e-01,  6.96751115019954e-01,\n                                                6.82798332995371e-01,  6.69939831246189e-01,  6.58153535806897e-01,  6.47409903793247e-01,\n                                                6.37673196789099e-01,  6.28902569810768e-01,  6.21052997068657e-01,  6.14076060830071e-01,\n                                                6.07920631642385e-01,  6.02533467831792e-01,  5.97859760200357e-01,  5.93843644676345e-01,\n                                                5.90428701658475e-01,  5.87558456162686e-01,  5.85176887807536e-01,  5.83228954330165e-01,\n                                                5.81661126899040e-01,  5.80421930214756e-01,  5.79462475541046e-01,  5.78736970691282e-01,\n                                                5.78203187922552e-01,  5.77822868939781e-01,  5.77562045994822e-01,  5.77391259479482e-01,\n                                                5.77285655421612e-01,  5.77224950718164e-01,  5.77193259463995e-01,  5.77178779941224e-01,\n                                                5.77173348248865e-01,  5.77171870704067e-01,  5.77171652621813e-01,  5.77171632518523e-01,\n                                                5.77171228967428e-01,  5.77168494857515e-01,  5.77158444101909e-01,  5.77131653412094e-01,\n                                                5.77073027384123e-01,  5.76960769691725e-01,  5.76765609441899e-01,  5.76450331038528e-01,\n                                                5.75969654566798e-01,  5.75270510618764e-01,  5.74292747170571e-01,  5.72970295017107e-01,\n                                                5.71232800970256e-01,  5.69007713687641e-01,  5.66222775750621e-01,  5.62808838943833e-01,\n                                                5.58702880692408e-01,  5.53851062936394e-01,  5.48211646154100e-01,  5.41757556866343e-01,\n                                                5.34478411930278e-01,  5.26381830183622e-01,  5.17493911060573e-01,  5.07858826262789e-01,\n                                                4.97537546409888e-01,  4.86605799456616e-01,  4.75151420869471e-01,  4.63271298355514e-01,\n                                                4.51068131363845e-01,  4.38647217363888e-01,  4.26113447184363e-01,  4.13568647689651e-01,\n                                                4.01109360153622e-01,  3.88825094514619e-01,  3.76797058836662e-01,  3.65097332716345e-01,\n                                                3.53788433591865e-01,  3.42923214714899e-01,  3.32545030811620e-01,  3.22688109871401e-01,\n                                                3.13378075028622e-01,  3.04632567604051e-01,  2.96461930011338e-01,  2.88869914785863e-01,\n                                                2.81854393118945e-01,  2.75408042817497e-01,  2.69519001490410e-01,  2.64171475966716e-01,\n                                                2.59346303471260e-01,  2.55021463917481e-01,  2.51172545815470e-01,  2.47773170723004e-01,\n                                                2.44795382871699e-01,  2.42210011567319e-01,  2.39987014191096e-01,  2.38095807135543e-01,\n                                                2.36505590838301e-01,  2.35185673310012e-01,  2.34105794303950e-01,  2.33236449702317e-01,\n                                                2.32549212987805e-01,  2.32017048046253e-01,  2.31614605234465e-01,  2.31318490865446e-01,\n                                                2.31107499199284e-01,  2.30962795816469e-01,  2.30868041955034e-01,  2.30809450994304e-01,\n                                                2.30775770662403e-01,  2.30758187553272e-01,  2.30750153927375e-01,  2.30747140276082e-01,\n                                                2.30746320493552e-01,  2.30746199495503e-01,  2.30746187964513e-01,  2.30745952401653e-01,\n                                                2.30744356433434e-01,  2.30738489557452e-01,  2.30722851173310e-01,  2.30688629759045e-01,\n                                                2.30623102410992e-01,  2.30509183446138e-01,  2.30325150395315e-01,  2.30044575000297e-01,\n                                                2.29636485115040e-01,  2.29065779869693e-01,  2.28293914191112e-01,  2.27279858995966e-01,\n                                                2.25981329604421e-01,  2.24356257223910e-01,  2.22364457522623e-01,  2.19969428007633e-01,\n                                                2.17140184629041e-01,  2.13853030834894e-01,  2.10093142444753e-01,  2.05855851982393e-01,\n                                                2.01147528187446e-01,  1.95985970336485e-01,  1.90400270871577e-01,  1.84430140045832e-01,\n                                                1.78124728076378e-01,  1.71541018573517e-01,  1.64741897354928e-01,  1.57794020113364e-01,\n                                                1.50765609532310e-01,  1.43724307846643e-01,  1.36735196419265e-01,  1.29859072361254e-01,\n                                                1.23151046518892e-01,  1.16659500049768e-01,  1.10425410636123e-01,  1.04482035937555e-01,\n                                                9.88549224596751e-02,  9.35621934340674e-02,  8.86150599520041e-02,  8.40184954274390e-02,\n                                                7.97720140384834e-02,  7.58704983214065e-02,  7.23050285382802e-02,  6.90636756796748e-02,\n                                                6.61322299105951e-02,  6.34948459942466e-02,  6.11345960371690e-02,  5.90339273462286e-02,\n                                                5.71750290625870e-02,  5.55401155218282e-02,  5.41116371006405e-02,  5.28724308462669e-02,\n                                                5.18058236728542e-02,  5.08957005703659e-02,  5.01265493013880e-02,  4.94834916204407e-02,\n                                                4.89523092709163e-02,  4.85194710074488e-02,  4.81721647580997e-02,  4.78983368821169e-02,\n                                                4.76867384018238e-02,  4.75269762038382e-02,  4.74095656285787e-02,  4.73259797018990e-02,\n                                                4.72686895908296e-02,  4.72311907336316e-02,  4.72080095041116e-02,  4.71946861730581e-02,\n                                                4.71877312301991e-02,  4.71845536960558e-02,  4.71833617315891e-02,  4.71830374919673e-02,\n                                                4.71829896350098e-02,  4.71829848982388e-02,  4.71828862849986e-02,  4.71822181702057e-02,\n                                                4.71797621758627e-02,  4.71732159059952e-02,  4.71588921387598e-02,  4.71314703114221e-02,\n                                                4.70838144924981e-02,  4.70068731092237e-02,  4.68896766714808e-02,  4.67194500347352e-02,\n                                                4.64818546478281e-02,  4.61613729459485e-02,  4.57418408613064e-02,  4.52071248771899e-02,\n                                                4.45419271503109e-02,  4.37326866282284e-02,  4.27685272250882e-02,  4.16421881906031e-02,\n                                                4.03508595938025e-02,  3.88968403055898e-02,  3.72879395689685e-02,  3.55375577070234e-02,\n                                                3.36644066108054e-02,  3.16918642700976e-02,  2.96469957453249e-02,  2.75593102356435e-02,\n                                                2.54593544498265e-02,  2.33772612399452e-02,  2.13413761658341e-02,  1.93770726786804e-02,\n                                                1.75058410939428e-02,  1.57447019469057e-02,  1.41059565021306e-02,  1.25972520028821e-02,\n                                                1.12219114623633e-02,  9.97946026419338e-03,  8.86627524486272e-03,  7.87628508508131e-03,\n                                                7.00166127724522e-03,  6.23345363742267e-03,  5.56214033731628e-03,  4.97807734049616e-03,\n                                                4.47184437203330e-03,  4.03449346599594e-03,  3.65771178976182e-03,  3.33391332935928e-03,\n                                                3.05627475613246e-03,  2.81872997539612e-03,  2.61593603280641e-03,  2.44322074590464e-03,\n                                                2.29652009004955e-03,  2.17231130438478e-03,  2.06754601095938e-03,  1.97958632990414e-03,\n                                                1.90614594438365e-03,  1.84523725929164e-03,  1.79512518045222e-03,  1.75428760165808e-03,\n                                                1.72138239742026e-03,  1.69522053632054e-03,  1.67474480688057e-03,  1.65901355022857e-03,\n                                                1.64718870546210e-03,  1.63852739352954e-03,  1.63237620295043e-03,  1.62816730752358e-03,\n                                                1.62541555334439e-03,  1.62371570671827e-03,  1.62273915671030e-03,  1.62222951053348e-03,\n                                                1.62199669485652e-03,  1.62190936507667e-03,  1.62188560996057e-03,  1.62188210378034e-03,\n                                                1.62188174210698e-03,  1.62187406462788e-03,  1.62182204946326e-03,  1.62163084942879e-03,\n                                                1.62112128184333e-03,  1.62000662055206e-03,  1.61787388260759e-03,  1.61417119615592e-03,\n                                                1.60820318216004e-03,  1.59913661051814e-03,  1.58601876878262e-03,  1.56781083710023e-03,\n                                                1.54343790711220e-03,  1.51185595109382e-03,  1.47213396243639e-03,  1.42354672950873e-03,\n                                                1.36567057619885e-03,  1.29847145877005e-03,  1.22237281203574e-03,  1.13829031496149e-03,\n                                                1.04762295335981e-03,  9.52194604167289e-04,  8.54147384686144e-04,  7.55796000771802e-04,\n                                                6.59459553721931e-04,  5.67291907840328e-04,  4.81132460811828e-04,  4.02395668621658e-04,\n                                                3.32010780872416e-04,  2.70414654640838e-04,  2.17592241475550e-04,  1.73153035649243e-04,\n                                                1.36428335929750e-04,  1.06573746410987e-04,  8.26635385706709e-05,  6.37676327048808e-05,\n                                                4.90070859706648e-05,  3.75888400876434e-05,  2.88237031709215e-05,  2.21322331519502e-05,\n                                                1.70417433347225e-05,  1.31758705448348e-05,  1.02381256574802e-05,  7.99303765219861e-06,\n                                                6.25072082005573e-06,  4.85960884866188e-06,  3.70685525119541e-06,  2.72035617854272e-06,\n                                                1.86556709458330e-06,  1.13430043668927e-06,  5.25808190765531e-07,  -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.33226762955019e-14, -1.33226762955019e-14,\n                                                -1.33226762955019e-14, -1.24344978758018e-14, -1.33226762955019e-14, -1.33226762955019e-14,\n                                                -1.33226762955019e-14, -1.33226762955019e-14, -1.24344978758018e-14, -1.24344978758018e-14,\n                                                -1.33226762955019e-14, -1.42108547152020e-14, -1.42108547152020e-14, -1.33226762955019e-14,\n                                                -1.42108547152020e-14, -1.33226762955019e-14, -1.33226762955019e-14, -1.33226762955019e-14,\n                                                -1.33226762955019e-14, -1.33226762955019e-14, -1.33226762955019e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.00000000000000e+00,  6.99999999042170e+00,  6.99999969424166e+00,  6.99999768757480e+00,\n                                                6.99999031080250e+00,  6.99997064663138e+00,  6.99992761002097e+00,  6.99984518189671e+00,\n                                                6.99970181407772e+00,  6.99947002745933e+00,  6.99911621939565e+00,  6.99860068967333e+00,\n                                                6.99787788773676e+00,  6.99689687721903e+00,  6.99560200764706e+00,  6.99393377768839e+00,\n                                                6.99182986969330e+00,  6.98922633167345e+00,  6.98605888025533e+00,  6.98226429644318e+00,\n                                                6.97778188501137e+00,  6.97255496772933e+00,  6.96653238008976e+00,  6.95966994048271e+00,\n                                                6.95193185966008e+00,  6.94329205685284e+00,  6.93373534722330e+00,  6.92325846384325e+00,\n                                                6.91187087663362e+00,  6.89959537131383e+00,  6.88646835399723e+00,  6.87253985209649e+00,\n                                                6.85787318988521e+00,  6.84254432729082e+00,  6.82664086281396e+00,  6.81026071511362e+00,\n                                                6.79351051177181e+00,  6.77650372696281e+00,  6.75935862114547e+00,  6.74219604459327e+00,\n                                                6.72513717196972e+00,  6.70830123697429e+00,  6.69180333439590e+00,  6.67575235208419e+00,\n                                                6.66024908798187e+00,  6.64538459818128e+00,  6.63123881174146e+00,  6.61787943744270e+00,\n                                                6.60536117736688e+00,  6.59372525262189e+00,  6.58299923796418e+00,  6.57319719464519e+00,\n                                                6.56432008452138e+00,  6.55635644323877e+00,  6.54928328599661e+00,  6.54306721586372e+00,\n                                                6.53766570173459e+00,  6.53302849068054e+00,  6.52909911763164e+00,  6.52581647402814e+00,\n                                                6.52311639635969e+00,  6.52093323544976e+00,  6.51920136803705e+00,  6.51785661374563e+00,\n                                                6.51683752298451e+00,  6.51608650470386e+00,  6.51555076723720e+00,  6.51518305060555e+00,\n                                                6.51494213452878e+00,  6.51479311281728e+00,  6.51470743160541e+00,  6.51466269581778e+00,\n                                                6.51464225510215e+00,  6.51463458699266e+00,  6.51463250107233e+00,  6.51463219319454e+00,\n                                                6.51463215105042e+00,  6.51463115574843e+00,  6.51462441242454e+00,  6.51459962315519e+00,\n                                                6.51453354331623e+00,  6.51438892540862e+00,  6.51411195027157e+00,  6.51363024269812e+00,\n                                                6.51285155317817e+00,  6.51166317013917e+00,  6.50993210803812e+00,  6.50750609645153e+00,\n                                                6.50421537445522e+00,  6.49987527367374e+00,  6.49428955296353e+00,  6.48725442817207e+00,\n                                                6.47856322187382e+00,  6.46801154008938e+00,  6.45540286497473e+00,  6.44055443326938e+00,\n                                                6.42330324894416e+00,  6.40351205463678e+00,  6.38107506097945e+00,  6.35592320838213e+00,\n                                                6.32802871665003e+00,  6.29740866982937e+00,  6.26412739316862e+00,  6.22829741129435e+00,\n                                                6.19007883421540e+00,  6.14967709919325e+00,  6.10733909590434e+00,  6.06334780963102e+00,\n                                                6.01801571981833e+00,  5.97167727624475e+00,  5.92468083141307e+00,  5.87738042888394e+00,\n                                                5.83012783180041e+00,  5.78326512779337e+00,  5.73711817412524e+00,  5.69199106113590e+00,\n                                                5.64816168406305e+00,  5.60587843298016e+00,  5.56535794510350e+00,  5.52678381697339e+00,\n                                                5.49030614675691e+00,  5.45604176733045e+00,  5.42407503537170e+00,  5.39445905612964e+00,\n                                                5.36721724355805e+00,  5.34234513734715e+00,  5.31981241917823e+00,  5.29956508829729e+00,\n                                                5.28152777015947e+00,  5.26560614104130e+00,  5.25168945626628e+00,  5.23965317049445e+00,\n                                                5.22936163603229e+00,  5.22067086007319e+00,  5.21343129496909e+00,  5.20749062786338e+00,\n                                                5.20269652808788e+00,  5.19889930342989e+00,  5.19595441046729e+00,  5.19372476033980e+00,\n                                                5.19208276015639e+00,  5.19091203215711e+00,  5.19010875797177e+00,  5.18958260382596e+00,\n                                                5.18925719405685e+00,  5.18907011429080e+00,  5.18897244136878e+00,  5.18892781370708e+00,\n                                                5.18891107231478e+00,  5.18890651824867e+00,  5.18890584607800e+00,  5.18890578227047e+00,\n                                                5.18890448138638e+00,  5.18889566771138e+00,  5.18886326780116e+00,  5.18877690223830e+00,\n                                                5.18858789687911e+00,  5.18822594265558e+00,  5.18759654392972e+00,  5.18657938287371e+00,\n                                                5.18502771243399e+00,  5.18276887191012e+00,  5.17960599543763e+00,  5.17532095298887e+00,\n                                                5.16967852442105e+00,  5.16243175877983e+00,  5.15332841376918e+00,  5.14211830574926e+00,\n                                                5.12856133228604e+00,  5.11243586241836e+00,  5.09354713131398e+00,  5.07173523381799e+00,\n                                                5.04688229370889e+00,  5.01891839937372e+00,  4.98782594667706e+00,  4.95364211659042e+00,\n                                                4.91645933402781e+00,  4.87642369499961e+00,  4.83373149634196e+00,  4.78862413754151e+00,\n                                                4.74138176922832e+00,  4.69231612312712e+00,  4.64176296604478e+00,  4.59007457729738e+00,\n                                                4.53761256539436e+00,  4.48474123327357e+00,  4.43182159247981e+00,  4.37920603452393e+00,\n                                                4.32723360592917e+00,  4.27622580789757e+00,  4.22648284943121e+00,  4.17828031454465e+00,\n                                                4.13186624639234e+00,  4.08745868982342e+00,  4.04524375808834e+00,  4.00537429331636e+00,\n                                                3.96796917399727e+00,  3.93311329113565e+00,  3.90085817617364e+00,  3.87122322692657e+00,\n                                                3.84419744966602e+00,  3.81974162001699e+00,  3.79779076296584e+00,  3.77825686065164e+00,\n                                                3.76103171175230e+00,  3.74598988382720e+00,  3.73299171619557e+00,  3.72188634323684e+00,\n                                                3.71251471511316e+00,  3.70471259470317e+00,  3.69831350672822e+00,  3.69315160891358e+00,\n                                                3.68906444709342e+00,  3.68589554802008e+00,  3.68349679674831e+00,  3.68173054107703e+00,\n                                                3.68047136457670e+00,  3.67960747276773e+00,  3.67904164420222e+00,  3.67869170929434e+00,\n                                                3.67849053413825e+00,  3.67838550335099e+00,  3.67833751409368e+00,  3.67831951169511e+00,\n                                                3.67831461460890e+00,  3.67831389180934e+00,  3.67831382748533e+00,  3.67831256125954e+00,\n                                                3.67830398240106e+00,  3.67827244572240e+00,  3.67818838138067e+00,  3.67800441301409e+00,\n                                                3.67765210840513e+00,  3.67703950038825e+00,  3.67604950440526e+00,  3.67453934562861e+00,\n                                                3.67234109168494e+00,  3.66926336513417e+00,  3.66509428133674e+00,  3.65960562077125e+00,\n                                                3.65255819944380e+00,  3.64370834685373e+00,  3.63281533926128e+00,  3.61964956913926e+00,\n                                                3.60400116319534e+00,  3.58568869564413e+00,  3.56456758559945e+00,  3.54053772328667e+00,\n                                                3.51354984587130e+00,  3.48361018819145e+00,  3.45078297678183e+00,  3.41519042921494e+00,\n                                                3.37701007586740e+00,  3.33646944139480e+00,  3.29383839570486e+00,  3.24941977166003e+00,\n                                                3.20353908679638e+00,  3.15653432601797e+00,  3.10874668636344e+00,  3.06051294720893e+00,\n                                                3.01215976622773e+00,  2.96399981615777e+00,  2.91632937790973e+00,  2.86942686063505e+00,\n                                                2.82355173683203e+00,  2.77894351576391e+00,  2.73582056304036e+00,  2.69437874603133e+00,\n                                                2.65479000562843e+00,  2.61720101328032e+00,  2.58173207645027e+00,  2.54847642354400e+00,\n                                                2.51749995003003e+00,  2.48884145629221e+00,  2.46251336456917e+00,  2.43850287176340e+00,\n                                                2.41677347757934e+00,  2.39726682150819e+00,  2.37990476453296e+00,  2.36459165872617e+00,\n                                                2.35121675712613e+00,  2.33965672502102e+00,  2.32977822041741e+00,  2.32144051514358e+00,\n                                                2.31449812851914e+00,  2.30880344313657e+00,  2.30420926777051e+00,  2.30057130674716e+00,\n                                                2.29775048938051e+00,  2.29561510842423e+00,  2.29404271388602e+00,  2.29292170877588e+00,\n                                                2.29215259689040e+00,  2.29164883972051e+00,  2.29133728981592e+00,  2.29115818094260e+00,\n                                                2.29106467037127e+00,  2.29102194471073e+00,  2.29100591685526e+00,  2.29100155689136e+00,\n                                                2.29100091336987e+00,  2.29100085647926e+00,  2.29099974083072e+00,  2.29099218215342e+00,\n                                                2.29096439574159e+00,  2.29089032802634e+00,  2.29072823597656e+00,  2.29041782308458e+00,\n                                                2.28987805244362e+00,  2.28900574696789e+00,  2.28767507438319e+00,  2.28573799920843e+00,\n                                                2.28302576424484e+00,  2.27935143872544e+00,  2.27451353813637e+00,  2.26830068126224e+00,\n                                                2.26049720358197e+00,  2.25088959423100e+00,  2.23927356905947e+00,  2.22546153868493e+00,\n                                                2.20929018247580e+00,  2.19062780196581e+00,  2.16938110475566e+00,  2.14550106601342e+00,\n                                                2.11898753144484e+00,  2.08989226394095e+00,  2.05832019574235e+00,  2.02442872763948e+00,\n                                                1.98842501414206e+00,  1.95056128483130e+00,  1.91112837111418e+00,  1.87044772541902e+00,\n                                                1.82886232509746e+00,  1.78672693338468e+00,  1.74439823335368e+00,  1.70222535034822e+00,\n                                                1.66054123231219e+00,  1.61965527094581e+00,  1.57984743089755e+00,  1.54136402424866e+00,\n                                                1.50441513927838e+00,  1.46917361990396e+00,  1.43577540526567e+00,  1.40432098269971e+00,\n                                                1.37487768202013e+00,  1.34748254097993e+00,  1.32214549493809e+00,  1.29885268107894e+00,\n                                                1.27756969219582e+00,  1.25824466128003e+00,  1.24081110161147e+00,  1.22519046489104e+00,\n                                                1.21129441068411e+00,  1.19902680359268e+00,  1.18828547039464e+00,  1.17896375856314e+00,\n                                                1.17095194099818e+00,  1.16413851041661e+00,  1.15841140159446e+00,  1.15365917143353e+00,\n                                                1.14977215650355e+00,  1.14664361615212e+00,  1.14417085734977e+00,  1.14225632602836e+00,\n                                                1.14080863964492e+00,  1.13974352786619e+00,  1.13898464329821e+00,  1.13846420255638e+00,\n                                                1.13812341989600e+00,  1.13791270100595e+00,  1.13779157300174e+00,  1.13772833745408e+00,\n                                                1.13769944556601e+00,  1.13768860737599e+00,  1.13768565914012e+00,  1.13768522398721e+00,\n                                                1.13768518492272e+00,  1.13768441212479e+00,  1.13767917631984e+00,  1.13765992916851e+00,\n                                                1.13760862503112e+00,  1.13749635581457e+00,  1.13728137991272e+00,  1.13690763850915e+00,\n                                                1.13630385081653e+00,  1.13538327702212e+00,  1.13404423181913e+00,  1.13217141991132e+00,\n                                                1.12963814508112e+00,  1.12630941389656e+00,  1.12204591236041e+00,  1.11670877873190e+00,\n                                                1.11016503038963e+00,  1.10229343140347e+00,  1.09299051737791e+00,  1.08217643412848e+00,\n                                                1.06980020699149e+00,  1.05584404784225e+00,  1.04032633483645e+00,  1.02330296904143e+00,\n                                                1.00486692039499e+00,  9.85145914296859e-01,  9.64298365059448e-01,  9.42507814606894e-01,\n                                                9.19976264087671e-01,  8.96916874641118e-01,  8.73546549420857e-01,  8.50078888377491e-01,\n                                                8.26717935488587e-01,  8.03653028127115e-01,  7.81054928034671e-01,  7.59073282071915e-01,\n                                                7.37835345315912e-01,  7.17445810893269e-01,  6.97987535701249e-01,  6.79522928482116e-01,\n                                                6.62095771660630e-01,  6.45733273415998e-01,  6.30448183433940e-01,  6.16240847263944e-01,\n                                                6.03101114470400e-01,  5.91010051084554e-01,  5.79941435362563e-01,  5.69863037118163e-01,\n                                                5.60737695485799e-01,  5.52524218962869e-01,  5.45178136226797e-01,  5.38652327703351e-01,\n                                                5.32897567159790e-01,  5.27863000449828e-01,  5.23496585455804e-01,  5.19745513575249e-01,\n                                                5.16556628968282e-01,  5.13876857324296e-01,  5.11653651198648e-01,  5.09835454101982e-01,\n                                                5.08372180625317e-01,  5.07215705135983e-01,  5.06320347218176e-01,  5.05643338331732e-01,\n                                                5.05145251409239e-01,  5.04790373566812e-01,  5.04547001966490e-01,  5.04387644237106e-01,\n                                                5.04289107709047e-01,  5.04232465883140e-01,  5.04202895744545e-01,  5.04189385360407e-01,\n                                                5.04184317222722e-01,  5.04182938573355e-01,  5.04182735087852e-01,  5.04182716330120e-01,\n                                                5.04182339789638e-01,  5.04179788680256e-01,  5.04170410648712e-01,  5.04145413153934e-01,\n                                                5.04090711284817e-01,  5.03985968041736e-01,  5.03803873026515e-01,  5.03509704915970e-01,\n                                                5.03061221937288e-01,  5.02408921724519e-01,  5.01496706008746e-01,  5.00262975058689e-01,\n                                                4.98642160296307e-01,  4.96566680263504e-01,  4.93969275276029e-01,  4.90785641177076e-01,\n                                                4.86957245675661e-01,  4.82434176415853e-01,  4.77177843821429e-01,  4.71163349716487e-01,\n                                                4.64381339500413e-01,  4.56839183649780e-01,  4.48561382504655e-01,  4.39589151834949e-01,\n                                                4.29979217442411e-01,  4.19801915050366e-01,  4.09138747181624e-01,  3.98079584155538e-01,\n                                                3.86719708150104e-01,  3.75156888290604e-01,  3.63488645581806e-01,  3.51809826195498e-01,\n                                                3.40210557695655e-01,  3.28774621685088e-01,  3.17578242447824e-01,  3.06689266422421e-01,\n                                                2.96166691714427e-01,  2.86060498930129e-01,  2.76411732374763e-01,  2.67252782099272e-01,\n                                                2.58607820770870e-01,  2.50493353769597e-01,  2.42918845645027e-01,  2.35887390831031e-01,\n                                                2.29396401249399e-01,  2.23438288153369e-01,  2.18001120282614e-01,  2.13069245085896e-01,\n                                                2.08623864322379e-01,  2.04643559640281e-01,  2.01104767594497e-01,  1.97982206849133e-01,\n                                                1.95249262885441e-01,  1.92878337305662e-01,  1.90841169736953e-01,  1.89109140392259e-01,\n                                                1.87653560579427e-01,  1.86445956955794e-01,  1.85458353237721e-01,  1.84663550568832e-01,\n                                                1.84035405036855e-01,  1.83549098139806e-01,  1.83181393578043e-01,  1.82910871817998e-01,\n                                                1.82718132630682e-01,  1.82585955393844e-01,  1.82499407428199e-01,  1.82445892000821e-01,\n                                                1.82415129773680e-01,  1.82399070229628e-01,  1.82391732744943e-01,  1.82388980242153e-01,\n                                                1.82388231498529e-01,  1.82388120985678e-01,  1.82388110453918e-01,  1.82387895303996e-01,\n                                                1.82386437636466e-01,  1.82381079169168e-01,  1.82366796021448e-01,  1.82335540537008e-01,\n                                                1.82275693407253e-01,  1.82171652728899e-01,  1.82003586533805e-01,  1.81747374937094e-01,\n                                                1.81374766720650e-01,  1.80853772088120e-01,  1.80149307620043e-01,  1.79224100349145e-01,\n                                                1.78039844888369e-01,  1.76558590709345e-01,  1.74744316715220e-01,  1.72564628717168e-01,\n                                                1.69992494632790e-01,  1.67007915083573e-01,  1.63599416668019e-01,  1.59765254252737e-01,\n                                                1.55514218918912e-01,  1.50865970027509e-01,  1.45850841808454e-01,  1.40509113895339e-01,\n                                                1.34889777085005e-01,  1.29048865560518e-01,  1.23047460390612e-01,  1.16949492742228e-01,\n                                                1.10819486707990e-01,  1.04720380285931e-01,  9.87115496620330e-02,  9.28471386001597e-02,\n                                                8.71747644285668e-02,  8.17346383508459e-02,  7.65591042274059e-02,  7.16725698663403e-02,\n                                                6.70917808091591e-02,  6.28263701913845e-02,  5.88796099979989e-02,  5.52492883928783e-02,\n                                                5.19286434533397e-02,  4.89072937833654e-02,  4.61721191743836e-02,  4.37080579510294e-02,\n                                                4.14988004575703e-02,  3.95273693311111e-02,  3.77765862375670e-02,  3.62294314603391e-02,\n                                                3.48693072540263e-02,  3.36802185036964e-02,  3.26468853416593e-02,  3.17548023512604e-02,\n                                                3.09902581739019e-02,  3.03403280078216e-02,  2.97928498514626e-02,  2.93363935418220e-02,\n                                                2.89602297606395e-02,  2.86543042871452e-02,  2.84092209082516e-02,  2.82162345965480e-02,\n                                                2.80672548823748e-02,  2.79548578389885e-02,  2.78723038384436e-02,  2.78135572911022e-02,\n                                                2.77733040134835e-02,  2.77469617159598e-02,  2.77306793689336e-02,  2.77213218609393e-02,\n                                                2.77164373337433e-02,  2.77142057664612e-02,  2.77133686630764e-02,  2.77131409539191e-02,\n                                                2.77131073446428e-02,  2.77131040180754e-02,  2.77130347633845e-02,  2.77125655565227e-02,\n                                                2.77108407603111e-02,  2.77062435311706e-02,  2.76961848618607e-02,  2.76769299423147e-02,\n                                                2.76434724842805e-02,  2.75894687858242e-02,  2.75072443721740e-02,  2.73878865328143e-02,\n                                                2.72214353322848e-02,  2.69971829951805e-02,  2.67040863138908e-02,  2.63312884997564e-02,\n                                                2.58687357298051e-02,  2.53078601881809e-02,  2.46422870586658e-02,  2.38685098095059e-02,\n                                                2.29864688547359e-02,  2.19999659989583e-02,  2.09168531859394e-02,  1.97489500086903e-02,\n                                                1.85116694986904e-02,  1.72233632108458e-02,  1.59044301114939e-02,  1.45762637793903e-02,\n                                                1.32601335605536e-02,  1.19761035462274e-02,  1.07420869153279e-02,  9.57311348426160e-03,\n                                                8.48085899109563e-03,  7.47345109672182e-03,  6.55553504661821e-03,  5.72855623785795e-03,\n                                                4.99120065020886e-03,  4.33992820012197e-03,  3.76953756825404e-03,  3.27371146428490e-03,\n                                                2.84550540437500e-03,  2.47775775290471e-03,  2.16341171126988e-03,  1.89574999128439e-03,\n                                                1.66854996144039e-03,  1.47617145019741e-03,  1.31359148907251e-03,  1.17640034736777e-03,\n                                                1.06077163262164e-03,  9.63416666769135e-04,  8.81530606942960e-04,  8.12735489302163e-04,\n                                                7.55023749715811e-04,  7.06704672829517e-04,  6.66355385371631e-04,  6.32777287323805e-04,\n                                                6.04958199908801e-04,  5.82040060690403e-04,  5.63291741125127e-04,  5.48086468339370e-04,\n                                                5.35883333890652e-04,  5.26212407037541e-04,  5.18663002574193e-04,  5.12874671981578e-04,\n                                                5.08530493252835e-04,  5.05352235502521e-04,  5.03096975684514e-04,  5.01554752138311e-04,\n                                                5.00546857860051e-04,  4.99924408904562e-04,  4.99566871489776e-04,  4.99380294296081e-04,\n                                                4.99295066078709e-04,  4.99263097339053e-04,  4.99254401376881e-04,  4.99253117884457e-04,\n                                                4.99252985493470e-04,  4.99250175192145e-04,  4.99231135384193e-04,  4.99161148860949e-04,\n                                                4.98974635274152e-04,  4.98566682016310e-04,  4.97786272511291e-04,  4.96431851590984e-04,\n                                                4.94250025607101e-04,  4.90938342782243e-04,  4.86153175907056e-04,  4.79523654585812e-04,\n                                                4.70672279923257e-04,  4.59242226487078e-04,  4.44930365019580e-04,  4.27523777547734e-04,\n                                                4.06936151304826e-04,  3.83239221308784e-04,  3.56683768305111e-04,  3.27704960386477e-04,\n                                                2.96908315605471e-04,  2.65035242518863e-04,  2.32910588505497e-04,  2.01378132720365e-04,\n                                                1.71232567091728e-04,  1.43157427732632e-04,  1.17677369702029e-04,  9.51304673710851e-05,\n                                                7.56627085509720e-05,  5.92434167971945e-05,  4.56974634328589e-05,  3.47478418083469e-05,\n                                                2.60605345898668e-05,  1.92833342813614e-05,  1.40726079900233e-05,  1.01072871272478e-05,\n                                                7.09542144416986e-06,  4.78070078191450e-06,  2.94982755555395e-06,  1.42030307870300e-06,\n                                                4.25020101779694e-07,  1.14625612379626e-06,  1.29078058197507e-06,  1.18276968219533e-06,\n                                                9.62799927783919e-07,  7.29447163116959e-07,  5.46620114505458e-07,  4.40515750987913e-07,\n                                                3.96883973685647e-07,  3.72815823546091e-07,  -3.55271367880050e-15, -2.66453525910038e-15,\n                                                -2.66453525910038e-15, -3.55271367880050e-15, -3.55271367880050e-15, -2.66453525910038e-15,\n                                                -3.55271367880050e-15, -3.55271367880050e-15, -2.66453525910038e-15, -3.55271367880050e-15,\n                                                -3.55271367880050e-15, -3.55271367880050e-15, -3.55271367880050e-15, -2.66453525910038e-15,\n                                                -2.66453525910038e-15, -2.66453525910038e-15, -3.55271367880050e-15, -2.66453525910038e-15,\n                                                -2.66453525910038e-15, -2.66453525910038e-15, -3.55271367880050e-15, -2.66453525910038e-15,\n                                                -2.66453525910038e-15, -2.66453525910038e-15, -2.66453525910038e-15}),\nmadness::CubicInterpolationTable<double>(grid, {8.00000000000000e+00, 7.99999998803532e+00, 7.99999961806357e+00, 7.99999711144612e+00, 7.99998789678865e+00,\n                                                7.99996333338373e+00, 7.99990957437837e+00, 7.99980660950971e+00, 7.99962752162554e+00, 7.99933798444915e+00,\n                                                7.99889602140933e+00, 7.99825203715234e+00, 7.99734912494731e+00, 7.99612364497637e+00, 7.99450606084900e+00,\n                                                7.99242201493322e+00, 7.98979361750802e+00, 7.98654092044464e+00, 7.98258354310242e+00, 7.97784241620205e+00,\n                                                7.97224160829709e+00, 7.96571019868340e+00, 7.95818415971975e+00, 7.94960821019926e+00, 7.93993759939072e+00,\n                                                7.92913977868979e+00, 7.91719591480519e+00, 7.90410219567003e+00, 7.88987087865293e+00, 7.87453103109027e+00,\n                                                7.85812891654624e+00, 7.84072798717038e+00, 7.82240845330472e+00, 7.80326641585019e+00, 7.78341256407784e+00,\n                                                7.76297046037558e+00, 7.74207445237055e+00, 7.72086727038647e+00, 7.69949738282326e+00, 7.67811619262968e+00,\n                                                7.65687516386360e+00, 7.63592296818273e+00, 7.61540273725255e+00, 7.59544949917082e+00, 7.57618786604268e+00,\n                                                7.55773002688342e+00, 7.54017408615806e+00, 7.52360277444572e+00, 7.50808254470110e+00, 7.49366305589330e+00,\n                                                7.48037703571144e+00, 7.46824050560321e+00, 7.45725334455822e+00, 7.44740016255783e+00, 7.43865145023426e+00,\n                                                7.43096496776258e+00, 7.42428733314125e+00, 7.41855576765898e+00, 7.41369995443664e+00, 7.40964396449113e+00,\n                                                7.40630820387662e+00, 7.40361133524818e+00, 7.40147212781602e+00, 7.39981119125928e+00, 7.39855255186544e+00,\n                                                7.39762503301866e+00, 7.39696340718072e+00, 7.39650929262276e+00, 7.39621177523621e+00, 7.39602774357876e+00,\n                                                7.39592193364620e+00, 7.39586668842353e+00, 7.39584144576232e+00, 7.39583197626141e+00, 7.39582940031745e+00,\n                                                7.39582902011315e+00, 7.39582896806854e+00, 7.39582773895068e+00, 7.39581941148965e+00, 7.39578879876211e+00,\n                                                7.39570719570263e+00, 7.39552860550993e+00, 7.39518656901391e+00, 7.39459171804601e+00, 7.39363015568696e+00,\n                                                7.39216274560721e+00, 7.39002536993650e+00, 7.38703019062529e+00, 7.38296792360158e+00, 7.37761110875566e+00,\n                                                7.37071833246209e+00, 7.36203933337021e+00, 7.35132089662480e+00, 7.33831341611470e+00, 7.32277797792477e+00,\n                                                7.30449378979668e+00, 7.28326575027210e+00, 7.25893191748622e+00, 7.23137060325713e+00, 7.20050678744570e+00,\n                                                7.16631752711386e+00, 7.12883603288768e+00, 7.08815410916193e+00, 7.04442271117923e+00, 6.99785046199278e+00,\n                                                6.94870009136550e+00, 6.89728289604365e+00, 6.84395146089809e+00, 6.78909100519337e+00, 6.73310981094427e+00,\n                                                6.67642923872241e+00, 6.61947383512112e+00, 6.56266198792189e+00, 6.50639749932053e+00, 6.45106233854552e+00,\n                                                6.39701071873248e+00, 6.34456453369197e+00, 6.29401009945231e+00, 6.24559607975003e+00, 6.19953243579927e+00,\n                                                6.15599022653206e+00, 6.11510209120241e+00, 6.07696326564158e+00, 6.04163301035356e+00, 6.00913635770843e+00,\n                                                5.97946611270859e+00, 5.95258506459128e+00, 5.92842838360307e+00, 5.90690618835739e+00, 5.88790627465661e+00,\n                                                5.87129699730312e+00, 5.85693029317263e+00, 5.84464482763430e+00, 5.83426923818624e+00, 5.82562543978292e+00,\n                                                5.81853194656540e+00, 5.81280715534382e+00, 5.80827252798575e+00, 5.80475560356985e+00, 5.80209276745790e+00,\n                                                5.80013170390411e+00, 5.79873346188611e+00, 5.79777407071878e+00, 5.79714565265011e+00, 5.79675699370309e+00,\n                                                5.79653355090681e+00, 5.79641689290585e+00, 5.79636359073622e+00, 5.79634359522542e+00, 5.79633815595914e+00,\n                                                5.79633735313474e+00, 5.79633727692457e+00, 5.79633572318004e+00, 5.79632519633883e+00, 5.79628649865572e+00,\n                                                5.79618334559866e+00, 5.79595760150359e+00, 5.79552528929429e+00, 5.79477354083660e+00, 5.79355863915524e+00,\n                                                5.79170528548430e+00, 5.78900720152344e+00, 5.78522914844901e+00, 5.78011040715436e+00, 5.77336971713221e+00,\n                                                5.76471161343717e+00, 5.75383403271821e+00, 5.74043698269717e+00, 5.72423198921306e+00, 5.70495195785381e+00,\n                                                5.68236102199574e+00, 5.65626390561209e+00, 5.62651431710491e+00, 5.59302191726330e+00, 5.55575747389028e+00,\n                                                5.51475592557004e+00, 5.47011721857581e+00, 5.42200493855808e+00, 5.37064291211752e+00, 5.31631008097675e+00,\n                                                5.25933403460981e+00, 5.20008361482515e+00, 5.13896097768263e+00, 5.07639342563182e+00, 5.01282522674263e+00,\n                                                4.94870954388087e+00, 4.88450052849685e+00, 4.82064560724308e+00, 4.75757800845969e+00, 4.69570962958756e+00,\n                                                4.63542441462343e+00, 4.57707246651049e+00, 4.52096513934253e+00, 4.46737132626799e+00, 4.41651508263771e+00,\n                                                4.36857461619653e+00, 4.32368256174087e+00, 4.28192736187462e+00, 4.24335551615743e+00, 4.20797444427698e+00,\n                                                4.17575572982307e+00, 4.14663855733534e+00, 4.12053321184978e+00, 4.09732456454331e+00, 4.07687551195945e+00,\n                                                4.05903036600396e+00, 4.04361820737771e+00, 4.03045621852434e+00, 4.01935300659137e+00, 4.01011191545904e+00,\n                                                4.00253431131172e+00, 3.99642281071461e+00, 3.99158440544247e+00, 3.98783342573859e+00, 3.98499427433276e+00,\n                                                3.98290385824485e+00, 3.98141364473267e+00, 3.98039127201348e+00, 3.97972165457682e+00, 3.97930753663269e+00,\n                                                3.97906946477145e+00, 3.97894517120676e+00, 3.97888838077060e+00, 3.97886707676915e+00, 3.97886128156910e+00,\n                                                3.97886042620989e+00, 3.97886035008902e+00, 3.97885885164061e+00, 3.97884869944237e+00, 3.97881137904000e+00,\n                                                3.97871189771944e+00, 3.97849419121908e+00, 3.97807727997165e+00, 3.97735233897535e+00, 3.97618083258212e+00,\n                                                3.97439385001051e+00, 3.97179275747700e+00, 3.96815125619331e+00, 3.96321889961137e+00, 3.95672607600183e+00,\n                                                3.94839040233848e+00, 3.93792440253374e+00, 3.92504425927215e+00, 3.90947933834756e+00, 3.89098209453239e+00,\n                                                3.86933788833808e+00, 3.84437418573975e+00, 3.81596859175991e+00, 3.78405519721535e+00, 3.74862880613362e+00,\n                                                3.70974676196562e+00, 3.66752829399661e+00, 3.62215153581119e+00, 3.57384858521512e+00, 3.52289913301319e+00,\n                                                3.46962324786573e+00, 3.41437385168911e+00, 3.35752927403837e+00, 3.29948608356325e+00, 3.24065222083296e+00,\n                                                3.18144034906217e+00, 3.12226131835790e+00, 3.06351769365605e+00, 3.00559739272073e+00, 2.94886757839383e+00,\n                                                2.89366901680020e+00, 2.84031113427831e+00, 2.78906798031177e+00, 2.74017524308812e+00, 2.69382838522489e+00,\n                                                2.65018188627313e+00, 2.60934950879928e+00, 2.57140545401082e+00, 2.53638624387949e+00, 2.50429315839871e+00,\n                                                2.47509506526764e+00, 2.44873149994371e+00, 2.42511588146973e+00, 2.40413877910241e+00, 2.38567117280051e+00,\n                                                2.36956767438491e+00, 2.35566969400704e+00, 2.34380854772374e+00, 2.33380850651035e+00, 2.32548978559381e+00,\n                                                2.31867146665671e+00, 2.31317433567823e+00, 2.30882360755527e+00, 2.30545149686867e+00, 2.30289958383917e+00,\n                                                2.30102091707800e+00, 2.29968179129290e+00, 2.29876313937334e+00, 2.29816148450005e+00, 2.29778940887694e+00,\n                                                2.29757551069716e+00, 2.29746383899536e+00, 2.29741281582622e+00, 2.29739367536355e+00, 2.29738846870207e+00,\n                                                2.29738770021005e+00, 2.29738763227140e+00, 2.29738629996640e+00, 2.29737727341579e+00, 2.29734409103796e+00,\n                                                2.29725564036168e+00, 2.29706207512190e+00, 2.29669140098102e+00, 2.29604687832324e+00, 2.29500538068565e+00,\n                                                2.29341683534805e+00, 2.29110485668020e+00, 2.28786866085252e+00, 2.28348632015696e+00, 2.27771937449237e+00,\n                                                2.27031876538323e+00, 2.26103199432358e+00, 2.24961133399775e+00, 2.23582284159077e+00, 2.21945584335206e+00,\n                                                2.20033248577819e+00, 2.17831688924761e+00, 2.15332340301898e+00, 2.12532345397950e+00, 2.09435051164630e+00,\n                                                2.06050276238781e+00, 2.02394319682925e+00, 1.98489696176163e+00, 1.94364600249415e+00, 1.90052120947283e+00,\n                                                1.85589246609385e+00, 1.81015715282617e+00, 1.76372777670218e+00, 1.71701944985820e+00, 1.67043792839430e+00,\n                                                1.62436884494222e+00, 1.57916863588285e+00, 1.53515749545065e+00, 1.49261450626494e+00, 1.45177492129390e+00,\n                                                1.41282942427342e+00, 1.37592508632439e+00, 1.34116767097062e+00, 1.30862491644152e+00, 1.27833043661567e+00,\n                                                1.25028792095354e+00, 1.22447536920326e+00, 1.20084915924858e+00, 1.17934780869754e+00, 1.15989534737878e+00,\n                                                1.14240426567451e+00, 1.12677804124275e+00, 1.11291327417393e+00, 1.10070147884731e+00, 1.09003059099368e+00,\n                                                1.08078625215128e+00, 1.07285293216782e+00, 1.06611494483361e+00, 1.06045740312383e+00, 1.05576714972374e+00,\n                                                1.05193368625667e+00, 1.04885011164207e+00, 1.04641406700651e+00, 1.04452867231146e+00, 1.04310342912705e+00,\n                                                1.04205505552767e+00, 1.04130821357358e+00, 1.04079608776343e+00, 1.04046077442860e+00, 1.04025344722429e+00,\n                                                1.04013427225723e+00, 1.04007205728572e+00, 1.04004363191615e+00, 1.04003296876710e+00, 1.04003006814980e+00,\n                                                1.04002964002541e+00, 1.04002960159189e+00, 1.04002884127614e+00, 1.04002369004227e+00, 1.04000475381927e+00,\n                                                1.03995427878009e+00, 1.03984382543222e+00, 1.03963233252697e+00, 1.03926466493799e+00, 1.03867073932626e+00,\n                                                1.03776532000470e+00, 1.03644857264034e+00, 1.03460745235184e+00, 1.03211798220670e+00, 1.02884844526132e+00,\n                                                1.02466346632372e+00, 1.01942889857102e+00, 1.01301735756336e+00, 1.00531416659638e+00, 9.96223401272774e-01,\n                                                9.85673658601950e-01, 9.73623138874463e-01, 9.60063628087001e-01, 9.45023012558767e-01, 9.28566047658352e-01,\n                                                9.10793234018759e-01, 8.91837814343670e-01, 8.71861072601271e-01, 8.51046272331695e-01, 8.29591689916207e-01,\n                                                8.07703264988022e-01, 7.85587395293657e-01, 7.63444349084937e-01, 7.41462666012284e-01, 7.19814785860303e-01,\n                                                6.98654004476265e-01, 6.78112727564769e-01, 6.58301890437967e-01, 6.39311343378814e-01, 6.21210969238448e-01,\n                                                6.04052297987359e-01, 5.87870404493577e-01, 5.72685911911979e-01, 5.58506965420097e-01, 5.45331083034916e-01,\n                                                5.33146827484114e-01, 5.21935273280560e-01, 5.11671265650582e-01, 5.02324483338515e-01, 4.93860326726684e-01,\n                                                4.86240657562250e-01, 4.79424418193157e-01, 4.73368157685020e-01, 4.68026490338948e-01, 4.63352509505111e-01,\n                                                4.59298176510960e-01, 4.55814701155266e-01, 4.52852926616782e-01, 4.50363727801933e-01, 4.48298428122456e-01,\n                                                4.46609235497561e-01, 4.45249694116898e-01, 4.44175144342027e-01, 4.43343179283824e-01, 4.42714083328665e-01,\n                                                4.42251235466964e-01, 4.41921458950360e-01, 4.41695298756494e-01, 4.41547209667029e-01, 4.41455640443441e-01,\n                                                4.41403003467133e-01, 4.41375524029917e-01, 4.41362968860894e-01, 4.41358259050319e-01, 4.41356977873948e-01,\n                                                4.41356788775230e-01, 4.41356771343703e-01, 4.41356421425298e-01, 4.41354050683694e-01, 4.41345335692771e-01,\n                                                4.41322105540880e-01, 4.41271271052665e-01, 4.41173932752072e-01, 4.41004710130902e-01, 4.40731334182659e-01,\n                                                4.40314544006100e-01, 4.39708325575520e-01, 4.38860525228715e-01, 4.37713860648137e-01, 4.36207336877326e-01,\n                                                4.34278053504328e-01, 4.31863361729952e-01, 4.28903298038329e-01, 4.25343187461965e-01, 4.21136278223257e-01,\n                                                4.16246246013837e-01, 4.10649395610490e-01, 4.04336394141054e-01, 3.97313396075138e-01, 3.89602463731006e-01,\n                                                3.81241244136958e-01, 3.72281925990859e-01, 3.62789560308932e-01, 3.52839876677877e-01, 3.42516757652153e-01,\n                                                3.31909544141704e-01, 3.21110335808852e-01, 3.10211426844703e-01, 2.99302985048195e-01, 2.88471047032971e-01,\n                                                2.77795869612468e-01, 2.67350650061881e-01, 2.57200607197094e-01, 2.47402400718411e-01, 2.38003856869692e-01,\n                                                2.29043962769517e-01, 2.20553088601661e-01, 2.12553395433095e-01, 2.05059386379842e-01, 1.98078560051774e-01,\n                                                1.91612127668548e-01, 1.85655758914004e-01, 1.80200326345774e-01, 1.75232623742150e-01, 1.70736039801944e-01,\n                                                1.66691174729007e-01, 1.63076393059897e-01, 1.59868311314535e-01, 1.57042223427161e-01, 1.54572470294801e-01,\n                                                1.52432762088558e-01, 1.50596463202795e-01, 1.49036849918773e-01, 1.47727350126771e-01, 1.46641772916673e-01,\n                                                1.45754533676621e-01, 1.45040877726724e-01, 1.44477102678537e-01, 1.44040776885792e-01, 1.43710948776100e-01,\n                                                1.43468339752476e-01, 1.43295511920082e-01, 1.43177001267029e-01, 1.43099407177937e-01, 1.43051430274062e-01,\n                                                1.43023852461053e-01, 1.43009455559000e-01, 1.43002877769921e-01, 1.43000410258534e-01, 1.42999739039800e-01,\n                                                1.42999639969472e-01, 1.42999630528173e-01, 1.42999437654935e-01, 1.42998130915402e-01, 1.42993327277852e-01,\n                                                1.42980523121503e-01, 1.42952504469802e-01, 1.42898856630991e-01, 1.42805597726612e-01, 1.42654960846745e-01,\n                                                1.42425349583045e-01, 1.42091490808192e-01, 1.41624805969876e-01, 1.40994016964408e-01, 1.40165994061060e-01,\n                                                1.39106840865161e-01, 1.37783194937440e-01, 1.36163703117666e-01, 1.34220609323393e-01, 1.31931371891669e-01,\n                                                1.29280210291450e-01, 1.26259470381019e-01, 1.22870696151401e-01, 1.19125306036117e-01, 1.15044793925927e-01,\n                                                1.10660407821680e-01, 1.06012299665522e-01, 1.01148183971847e-01, 9.61215852987261e-02, 9.09897902061703e-02,\n                                                8.58116437715495e-02, 8.06453410582337e-02, 7.55463591321108e-02, 7.05656562823131e-02, 6.57482348553193e-02,\n                                                6.11321267448925e-02, 5.67478209559997e-02, 5.26181155335799e-02, 4.87583454452158e-02, 4.51769163161133e-02,\n                                                4.18760622555876e-02, 3.88527439244584e-02, 3.60996088598080e-02, 3.36059476030739e-02, 3.13585938821648e-02,\n                                                2.93427327046967e-02, 2.75425949371506e-02, 2.59420295811106e-02, 2.45249549033151e-02, 2.32756967051531e-02,\n                                                2.21792265471237e-02, 2.12213150950715e-02, 2.03886164299796e-02, 1.96686986566510e-02, 1.90500348893758e-02,\n                                                1.85219670237489e-02, 1.80746528655096e-02, 1.76990053349062e-02, 1.73866306842827e-02, 1.71297709938614e-02,\n                                                1.69212546531536e-02, 1.67544570888154e-02, 1.66232726617253e-02, 1.65220974357307e-02, 1.64458214415033e-02,\n                                                1.63898281585801e-02, 1.63499982611288e-02, 1.63227142605642e-02, 1.63048625603759e-02, 1.62938296235691e-02,\n                                                1.62874894208089e-02, 1.62841800293325e-02, 1.62826681158554e-02, 1.62821009731937e-02, 1.62819466993103e-02,\n                                                1.62819239289043e-02, 1.62819216751444e-02, 1.62818747548519e-02, 1.62815568660690e-02, 1.62803883196458e-02,\n                                                1.62772737601218e-02, 1.62704594299612e-02, 1.62574160950220e-02, 1.62347552745050e-02, 1.61981874220984e-02,\n                                                1.61425316578026e-02, 1.60617871366560e-02, 1.59492756277357e-02, 1.57978627794471e-02, 1.56002613389177e-02,\n                                                1.53494129546585e-02, 1.50389361837524e-02, 1.46636175525394e-02, 1.42199112310610e-02, 1.37064029388663e-02,\n                                                1.31241873699119e-02, 1.24771079683006e-02, 1.17718149957300e-02, 1.10176130286028e-02, 1.02260912088772e-02,\n                                                9.41055591092255e-03, 8.58531174912880e-03, 7.76485823308093e-03, 6.96308160796022e-03, 6.19252186718455e-03,\n                                                5.46378335753328e-03, 4.78513610638487e-03, 4.16232823869045e-03, 3.59860272038848e-03, 3.09488882755282e-03,\n                                                2.65012337020920e-03, 2.26165000034140e-03, 1.92564629482561e-03, 1.63753588820459e-03, 1.39235434007023e-03,\n                                                1.18505019271886e-03, 1.01071457906876e-03, 8.64742061444268e-04, 7.42931231513033e-04, 6.41536125470132e-04,\n                                                5.57279698975677e-04, 4.87339707611945e-04, 4.29316186528972e-04, 3.81188490659490e-04, 3.41268343958312e-04,\n                                                3.08153476048290e-04, 2.80684482111049e-04, 2.57905986581264e-04, 2.39032300454411e-04, 2.23417457594799e-04,\n                                                2.10529490678901e-04, 1.99928784269332e-04, 1.91250225356931e-04, 1.84188721314982e-04, 1.78487565894336e-04,\n                                                1.73929144540175e-04, 1.70327551941796e-04, 1.67522792825281e-04, 1.65376311478838e-04, 1.63767635539713e-04,\n                                                1.62591933925427e-04, 1.61758292762215e-04, 1.61188517587618e-04, 1.60816280424747e-04, 1.60586447659483e-04,\n                                                1.60454448320024e-04, 1.60385570927346e-04, 1.60354108987626e-04, 1.60342307935046e-04, 1.60339097895701e-04,\n                                                1.60338624105805e-04, 1.60338575246222e-04, 1.60337538192223e-04, 1.60330512165352e-04, 1.60304686239066e-04,\n                                                1.60235862944447e-04, 1.60085341934568e-04, 1.59797447876642e-04, 1.59297958793658e-04, 1.58493759873757e-04,\n                                                1.57274111467487e-04, 1.55513951170860e-04, 1.53079612678297e-04, 1.49837199293401e-04, 1.45663565001009e-04,\n                                                1.40459420688188e-04, 1.34163526620767e-04, 1.26766339818118e-04, 1.18320999993315e-04, 1.08949344348019e-04,\n                                                9.88409173769966e-05, 8.82437860338925e-05, 7.74473267233233e-05, 6.67587599654240e-05, 5.64766388331250e-05,\n                                                4.68652701313133e-05, 3.81338479931159e-05, 3.04229583170113e-05, 2.37995335767849e-05, 1.82599665432548e-05,\n                                                1.37403451550000e-05, 1.01324146379866e-05, 7.30310650887134e-06, 5.11377686329695e-06, 3.43346843489911e-06,\n                                                2.14013537114255e-06, 1.10089877924935e-06, 4.44089209850063e-15, 9.11463979846872e-07, 1.26501061803452e-06,\n                                                1.46691245284103e-06, 1.54249262340755e-06, 1.49428214601954e-06, 1.33687655701209e-06, 1.10537952213718e-06,\n                                                8.49088976018209e-07, 6.17939349467633e-07, 4.47689126659156e-07, 5.32907051820075e-15, 4.44089209850063e-15,\n                                                4.44089209850063e-15, 3.55271367880050e-15, 3.55271367880050e-15, 5.32907051820075e-15, 3.55271367880050e-15,\n                                                4.44089209850063e-15, 4.44089209850063e-15, 4.44089209850063e-15, 4.44089209850063e-15, 4.44089209850063e-15,\n                                                4.44089209850063e-15, 4.44089209850063e-15, 4.44089209850063e-15, 4.44089209850063e-15, 4.44089209850063e-15,\n                                                3.55271367880050e-15, 3.55271367880050e-15, 4.44089209850063e-15, 3.55271367880050e-15, 4.44089209850063e-15,\n                                                4.44089209850063e-15, 4.44089209850063e-15, 4.44089209850063e-15, 4.44089209850063e-15, 4.44089209850063e-15,\n                                                4.44089209850063e-15}),\nmadness::CubicInterpolationTable<double>(grid, {9.00000000000000e+00, 8.99999998539759e+00, 8.99999953386218e+00, 8.99999647463787e+00, 8.99998522852366e+00,\n                                                8.99995524988204e+00, 8.99988963916049e+00, 8.99976397452639e+00, 8.99954540432775e+00, 8.99919203381906e+00,\n                                                8.99865263024346e+00, 8.99786666033512e+00, 8.99676466405247e+00, 8.99526895836255e+00, 8.99329465564677e+00,\n                                                8.99075097321045e+00, 8.98754280376165e+00, 8.98357251172758e+00, 8.97874191684766e+00, 8.97295442435768e+00,\n                                                8.96611725980629e+00, 8.95814376553988e+00, 8.94895571455015e+00, 8.93848559519519e+00, 8.92667881702230e+00,\n                                                8.91349578363390e+00, 8.89891377376511e+00, 8.88292856740245e+00, 8.86555575108911e+00, 8.84683163686408e+00,\n                                                8.82681373377662e+00, 8.80558072042763e+00, 8.78323188175450e+00, 8.75988599282816e+00, 8.73567965559511e+00,\n                                                8.71076511951829e+00, 8.68530764184418e+00, 8.65948246558463e+00, 8.63347151132811e+00, 8.60745989125445e+00,\n                                                8.58163235944183e+00, 8.55616981165545e+00, 8.53124594087573e+00, 8.50702414295273e+00, 8.48365475137276e+00,\n                                                8.46127266270962e+00, 8.43999539634368e+00, 8.41992161467784e+00, 8.40113011425634e+00, 8.38367928445223e+00,\n                                                8.36760701895640e+00, 8.35293105612790e+00, 8.33964971710809e+00, 8.32774300510051e+00, 8.31717402498015e+00,\n                                                8.30789067905071e+00, 8.29982759202466e+00, 8.29290821596909e+00, 8.28704706396691e+00, 8.28215201962215e+00,\n                                                8.27812666841614e+00, 8.27487259648700e+00, 8.27229160287674e+00, 8.27028777288213e+00, 8.26876936303437e+00,\n                                                8.26765045253093e+00, 8.26685232168094e+00, 8.26630452504044e+00, 8.26594563525165e+00, 8.26572364292413e+00,\n                                                8.26559600790032e+00, 8.26552936758511e+00, 8.26549891831427e+00, 8.26548749561853e+00, 8.26548438835672e+00,\n                                                8.26548392973096e+00, 8.26548386695156e+00, 8.26548238431423e+00, 8.26547233922158e+00, 8.26543541230078e+00,\n                                                8.26533697793767e+00, 8.26512155293676e+00, 8.26470897371573e+00, 8.26399144942804e+00, 8.26283161728787e+00,\n                                                8.26106170230797e+00, 8.25848385695086e+00, 8.25487172716384e+00, 8.24997326033564e+00, 8.24351473838270e+00,\n                                                8.23520598596492e+00, 8.22474667011899e+00, 8.21183357342288e+00, 8.19616868773678e+00, 8.17746793874098e+00,\n                                                8.15547031194687e+00, 8.12994710819621e+00, 8.10071101196800e+00, 8.06762461256341e+00, 8.03060798285229e+00,\n                                                7.98964490183778e+00, 7.94478731628982e+00, 7.89615768259956e+00, 7.84394891840110e+00, 7.78842182337784e+00,\n                                                7.72989999085332e+00, 7.66876240929286e+00, 7.60543412343181e+00, 7.54037546496668e+00, 7.47407045285867e+00,\n                                                7.40701499143722e+00, 7.33970545906817e+00, 7.27262818985532e+00, 7.20625022236214e+00, 7.14101154352164e+00,\n                                                7.07731891347768e+00, 7.01554123501493e+00, 6.95600634033954e+00, 6.89899901235439e+00, 6.84476003532036e+00,\n                                                6.79348607472783e+00, 6.74533020994927e+00, 6.70040297717543e+00, 6.65877381678120e+00, 6.62047285310029e+00,\n                                                6.58549296223340e+00, 6.55379210350648e+00, 6.52529590249927e+00, 6.49990047903568e+00, 6.47747551343365e+00,\n                                                6.45786753998647e+00, 6.44090344929272e+00, 6.42639417166920e+00, 6.41413850329194e+00, 6.40392702561893e+00,\n                                                6.39554605771739e+00, 6.38878157102157e+00, 6.38342298749678e+00, 6.37926677591575e+00, 6.37611975768255e+00,\n                                                6.37380203399554e+00, 6.37214945059258e+00, 6.37101552509759e+00, 6.37027277502270e+00, 6.36981340138650e+00,\n                                                6.36954930298280e+00, 6.36941141860238e+00, 6.36934841781312e+00, 6.36932478399721e+00, 6.36931835502201e+00,\n                                                6.36931740611859e+00, 6.36931731604149e+00, 6.36931547958319e+00, 6.36930303731467e+00, 6.36925729831893e+00,\n                                                6.36913537571404e+00, 6.36886855495493e+00, 6.36835757614261e+00, 6.36746902617936e+00, 6.36603301787776e+00,\n                                                6.36384231090223e+00, 6.36065300212124e+00, 6.35618687848264e+00, 6.35013548164841e+00, 6.34216587843975e+00,\n                                                6.33192806371703e+00, 6.31906384334237e+00, 6.30321695725799e+00, 6.28404411198824e+00, 6.26122650618704e+00,\n                                                6.23448136245877e+00, 6.20357293476168e+00, 6.16832245356419e+00, 6.12861650774138e+00, 6.08441344468773e+00,\n                                                6.03574749276179e+00, 5.98273045963520e+00, 5.92555101650876e+00, 5.86447171837400e+00, 5.79982401325728e+00,\n                                                5.73200154494577e+00, 5.66145205263488e+00, 5.58866813019649e+00, 5.51417705264966e+00, 5.43852983914292e+00,\n                                                5.36228972762034e+00, 5.28602029892965e+00, 5.21027359736301e+00, 5.13557871667868e+00, 5.06243140649812e+00,\n                                                4.99128525663283e+00, 4.92254491163415e+00, 4.85656156580149e+00, 4.79363073589824e+00, 4.73399206858298e+00,\n                                                4.67783076878307e+00, 4.62528016366149e+00, 4.57642494105505e+00, 4.53130469288586e+00, 4.48991751513577e+00,\n                                                4.45222353328522e+00, 4.41814831482267e+00, 4.38758619089815e+00, 4.36040353945252e+00, 4.33644208915431e+00,\n                                                4.31552229522798e+00, 4.29744682158367e+00, 4.28200414339354e+00, 4.26897226335835e+00, 4.25812251496188e+00,\n                                                4.24922340782060e+00, 4.24204445426486e+00, 4.23635990294782e+00, 4.23195229505695e+00, 4.22861575217241e+00,\n                                                4.22615890256499e+00, 4.22440735524879e+00, 4.22320563868995e+00, 4.22241853370427e+00, 4.22193174737081e+00,\n                                                4.22165189598134e+00, 4.22150578903488e+00, 4.22143903172384e+00, 4.22141398877755e+00, 4.22140717649139e+00,\n                                                4.22140617101231e+00, 4.22140608153184e+00, 4.22140432009808e+00, 4.22139238613467e+00, 4.22134851576444e+00,\n                                                4.22123157455274e+00, 4.22097565709285e+00, 4.22048556569352e+00, 4.21963335879202e+00, 4.21825614332097e+00,\n                                                4.21615526556112e+00, 4.21309703012743e+00, 4.20881504416908e+00, 4.20301424093100e+00, 4.19537658122039e+00,\n                                                4.18556836183816e+00, 4.17324897735460e+00, 4.15808088903259e+00, 4.13974045867258e+00, 4.11792921529836e+00,\n                                                4.09238505110272e+00, 4.06289280311319e+00, 4.02929368030997e+00, 3.99149304938672e+00, 3.94946619492942e+00,\n                                                3.90326181027518e+00, 3.85300313273479e+00, 3.79888678453345e+00, 3.74117949367215e+00, 3.68021293195529e+00,\n                                                3.61637692172522e+00, 3.55011124556300e+00, 3.48189627087830e+00, 3.41224259879281e+00, 3.34167997699532e+00,\n                                                3.27074577555330e+00, 3.19997339487852e+00, 3.12988103145172e+00, 3.06096124752528e+00, 2.99367176360420e+00,\n                                                2.92842781726738e+00, 2.86559631995324e+00, 2.80549191243917e+00, 2.74837488919339e+00, 2.69445084816194e+00,\n                                                2.64387183714374e+00, 2.59673871582677e+00, 2.55310443337997e+00, 2.51297793068482e+00, 2.47632840693118e+00,\n                                                2.44308973468329e+00, 2.41316485834051e+00, 2.38643006202624e+00, 2.36273903968918e+00, 2.34192673946624e+00,\n                                                2.32381298437662e+00, 2.30820589154925e+00, 2.29490512264883e+00, 2.28370499981385e+00, 2.27439751556623e+00,\n                                                2.26677525343631e+00, 2.26063422033027e+00, 2.25577657393996e+00, 2.25201321077525e+00, 2.24916616461808e+00,\n                                                2.24707075307288e+00, 2.24557740279096e+00, 2.24455308278284e+00, 2.24388228035867e+00, 2.24346746541983e+00,\n                                                2.24322900527352e+00, 2.24310451259227e+00, 2.24304763200096e+00, 2.24302629431234e+00, 2.24302048996113e+00,\n                                                2.24301963325168e+00, 2.24301955751416e+00, 2.24301807227020e+00, 2.24300800954288e+00, 2.24297101817886e+00,\n                                                2.24287241498130e+00, 2.24265663544625e+00, 2.24224343455374e+00, 2.24152500845957e+00, 2.24036419995778e+00,\n                                                2.23859394035904e+00, 2.23601806536021e+00, 2.23241361927739e+00, 2.22753472719501e+00, 2.22111806509462e+00,\n                                                2.21288989195190e+00, 2.20257452505446e+00, 2.18990404275677e+00, 2.17462889273749e+00, 2.15652897662725e+00,\n                                                2.13542468424304e+00, 2.11118727494326e+00, 2.08374796262671e+00, 2.05310506628061e+00, 2.01932864828620e+00,\n                                                1.98256218142518e+00, 1.94302095948155e+00, 1.90098718454396e+00, 1.85680190793726e+00, 1.81085424628956e+00,\n                                                1.76356851149614e+00, 1.71539005621306e+00, 1.66677072369052e+00, 1.61815479084397e+00, 1.56996620746616e+00,\n                                                1.52259777585527e+00, 1.47640270722245e+00, 1.43168876280407e+00, 1.38871496748545e+00, 1.34769069605742e+00,\n                                                1.30877679306892e+00, 1.27208830343548e+00, 1.23769836077637e+00, 1.20564279567528e+00, 1.17592507475306e+00,\n                                                1.14852125061336e+00, 1.12338468043644e+00, 1.10045034769256e+00, 1.07963869048432e+00, 1.06085889760599e+00,\n                                                1.04401167809595e+00, 1.02899154214863e+00, 1.01568865210102e+00, 1.00399031368471e+00, 9.93782181799277e-01,\n                                                9.84949253512040e-01, 9.77376715322531e-01, 9.70950703119939e-01, 9.65559022595482e-01, 9.61091865827104e-01,\n                                                9.57442546891295e-01, 9.54508266202581e-01, 9.52190900389844e-01, 9.50397802504163e-01, 9.49042586880159e-01,\n                                                9.48045864719470e-01, 9.47335891046276e-01, 9.46849081573108e-01, 9.46530359453265e-01, 9.46333296836594e-01,\n                                                9.46220024223990e-01, 9.46160891171644e-01, 9.46133874038148e-01, 9.46123739180294e-01, 9.46120982272255e-01,\n                                                9.46120575359096e-01, 9.46120538829751e-01, 9.46119816183558e-01, 9.46114920167263e-01, 9.46096922162988e-01,\n                                                9.46048948162030e-01, 9.45943968739529e-01, 9.45742960833861e-01, 9.45393532299114e-01, 9.44829100704982e-01,\n                                                9.43968717347429e-01, 9.42717623484596e-01, 9.40968615332292e-01, 9.38604273992725e-01, 9.35500083250263e-01,\n                                                9.31528410172445e-01, 9.26563260800934e-01, 9.20485648768185e-01, 9.13189334567985e-01, 9.04586616837554e-01,\n                                                8.94613796272420e-01, 8.83235900485138e-01, 8.70450265577524e-01, 8.56288624592480e-01, 8.40817454851846e-01,\n                                                8.24136477790256e-01, 8.06375370491125e-01, 7.87688915897929e-01, 7.68250964516067e-01, 7.48247682713780e-01,\n                                                7.27870606855573e-01, 7.07310003930841e-01, 6.86748964397516e-01, 6.66358537055098e-01, 6.46294079645171e-01,\n                                                6.26692864039461e-01, 6.07672859330002e-01, 5.89332531616190e-01, 5.71751450283221e-01, 5.54991475106789e-01,\n                                                5.39098310062355e-01, 5.24103239505049e-01, 5.10024901556662e-01, 4.96870994624516e-01, 4.84639850674084e-01,\n                                                4.73321840140112e-01, 4.62900597079734e-01, 4.53354069624558e-01, 4.44655411070020e-01, 4.36773732472995e-01,\n                                                4.29674739821708e-01, 4.23321278888164e-01, 4.17673809665065e-01, 4.12690830415986e-01, 4.08329269161406e-01,\n                                                4.04544858025611e-01, 4.01292503299510e-01, 3.98526661293403e-01, 3.96201727012427e-01, 3.94272439366929e-01,\n                                                3.92694303063468e-01, 3.91424023607851e-01, 3.90419948154825e-01, 3.89642501480214e-01, 3.89054603387383e-01,\n                                                3.88622051656334e-01, 3.88313853440859e-01, 3.88102487997346e-01, 3.87964084879775e-01, 3.87878504238460e-01,\n                                                3.87829309476905e-01, 3.87803627004651e-01, 3.87791892842356e-01, 3.87787491013054e-01, 3.87786293614425e-01,\n                                                3.87786116881104e-01, 3.87786100589445e-01, 3.87785773552627e-01, 3.87783557836485e-01, 3.87775412725867e-01,\n                                                3.87753701591135e-01, 3.87706191056802e-01, 3.87615217077551e-01, 3.87457057536489e-01, 3.87201550323512e-01,\n                                                3.86811994680636e-01, 3.86245371007295e-01, 3.85452909135587e-01, 3.84381026054488e-01, 3.82972640074323e-01,\n                                                3.81168848834047e-01, 3.78910933528985e-01, 3.76142622563359e-01, 3.72812517097387e-01, 3.68876552480307e-01,\n                                                3.64300347978517e-01, 3.59061287221442e-01, 3.53150177130903e-01, 3.46572355482843e-01, 3.39348155578998e-01,\n                                                3.31512686689427e-01, 3.23114944445297e-01, 3.14216318536158e-01, 3.04888608707463e-01, 2.95211689009793e-01,\n                                                2.85270972373818e-01, 2.75154823857457e-01, 2.64952054747809e-01, 2.54749605742024e-01, 2.44630500276008e-01,\n                                                2.34672122324785e-01, 2.24944848867780e-01, 2.15511046591731e-01, 2.06424425302224e-01, 1.97729726559340e-01,\n                                                1.89462714884224e-01, 1.81650430346378e-01, 1.74311655481347e-01, 1.67457546425959e-01, 1.61092377937127e-01,\n                                                1.55214354436293e-01, 1.49816444025822e-01, 1.44887198995423e-01, 1.40411534004711e-01, 1.36371441204282e-01,\n                                                1.32746629423270e-01, 1.29515081712070e-01, 1.26653531641351e-01, 1.24137863625542e-01, 1.21943446088178e-01,\n                                                1.20045408540172e-01, 1.18418874686006e-01, 1.17039163634379e-01, 1.15881970318860e-01, 1.14923534497036e-01,\n                                                1.14140805372431e-01, 1.13511606164769e-01, 1.13014800047132e-01, 1.12630455990221e-01, 1.12340010423438e-01,\n                                                1.12126418448518e-01, 1.11974286803411e-01, 1.11869980005009e-01, 1.11801691166697e-01, 1.11759469883717e-01,\n                                                1.11735201220183e-01, 1.11722532061695e-01, 1.11716743708744e-01, 1.11714572344665e-01, 1.11713981685421e-01,\n                                                1.11713894505513e-01, 1.11713886197359e-01, 1.11713716472789e-01, 1.11712566568970e-01, 1.11708339477449e-01,\n                                                1.11697072191472e-01, 1.11672416995466e-01, 1.11625210777605e-01, 1.11543154533946e-01, 1.11410625813532e-01,\n                                                1.11208647233658e-01, 1.10915033718678e-01, 1.10504738955642e-01, 1.09950416821709e-01, 1.09223205420955e-01,\n                                                1.08293729358170e-01, 1.07133299960029e-01, 1.05715274006004e-01, 1.04016510642575e-01, 1.02018845825043e-01,\n                                                9.97104867948337e-02, 9.70872189557124e-02, 9.41533169875477e-02, 9.09220631741192e-02, 8.74157993048907e-02,\n                                                8.36654728849400e-02, 7.97096805934370e-02, 7.55932572200599e-02, 7.13655010059195e-02, 6.70781607308033e-02,\n                                                6.27833312923105e-02, 5.85314099960641e-02, 5.43692547496271e-02, 5.03386597118034e-02, 4.64752276763090e-02,\n                                                4.28076768893035e-02, 3.93575787991658e-02, 3.61394874670378e-02, 3.31613946709179e-02, 3.04254289276553e-02,\n                                                2.79287117125904e-02, 2.56642885528233e-02, 2.36220639322759e-02, 2.17896842484109e-02, 2.01533297415430e-02,\n                                                1.86983922386759e-02, 1.74100292658199e-02, 1.62735958274691e-02, 1.52749627556172e-02, 1.44007352332185e-02,\n                                                1.36383873844785e-02, 1.29763292797431e-02, 1.24039219006402e-02, 1.19114540505052e-02, 1.14900932671329e-02,\n                                                1.11318207772282e-02, 1.08293585989898e-02, 1.05760951429072e-02, 1.03660141121686e-02, 1.01936301555536e-02,\n                                                1.00539335496954e-02, 9.94234515151327e-03, 9.85468193915118e-03, 9.78713263790176e-03, 9.73624220896419e-03,\n                                                9.69890338124202e-03, 9.67235295642155e-03, 9.65417034451299e-03, 9.64227571386900e-03, 9.63492527490395e-03,\n                                                9.63070154965173e-03, 9.62849697813262e-03, 9.62748982673922e-03, 9.62711203140820e-03, 9.62700926398874e-03,\n                                                9.62699409580736e-03, 9.62699259449629e-03, 9.62696133924901e-03, 9.62674958270249e-03, 9.62597117868391e-03,\n                                                9.62389651155782e-03, 9.61935753425180e-03, 9.61067013921912e-03, 9.59557922602805e-03, 9.57123264679005e-03,\n                                                9.53419099043806e-03, 9.48048058438111e-03, 9.40569672935254e-03, 9.30516258093483e-03, 9.17414583828169e-03,\n                                                9.00813025572056e-03, 8.80313203092875e-03, 8.55604286900125e-03, 8.26497302902496e-03, 7.92956047605564e-03,\n                                                7.55120823031419e-03, 7.13321289729762e-03, 6.68075437926419e-03, 6.20073004299826e-03, 5.70143487814789e-03,\n                                                5.19210974209372e-03, 4.68239898550493e-03, 4.18177274318765e-03, 3.69897491932214e-03, 3.24155400953074e-03,\n                                                2.81552107205130e-03, 2.42515998842663e-03, 2.07299347959911e-03, 1.75988828332407e-03, 1.48526789631198e-03,\n                                                1.24739338636104e-03, 1.04367229089064e-03, 8.70961190724273e-04, 7.25836721986894e-04, 6.04819860495098e-04,\n                                                5.04547212218043e-04, 4.21889817710408e-04, 3.54024645691453e-04, 2.98466908420281e-04, 2.53072824170530e-04,\n                                                2.16022495660440e-04, 1.85791278116909e-04, 1.61115866664119e-04, 1.40959104419025e-04, 1.24475831761117e-04,\n                                                1.10981137135369e-04, 9.99218874664365e-05, 9.08520656182077e-05, 8.34120513726333e-05, 7.73115983196959e-05,\n                                                7.23160050952742e-05, 6.82349112928193e-05, 6.49132196421931e-05, 6.22237645782064e-05, 6.00614439001390e-05,\n                                                5.83385848003104e-05, 5.69813411726017e-05, 5.59269363815673e-05, 5.51215859356802e-05, 5.45189584464367e-05,\n                                                5.40790566478933e-05, 5.37674192138127e-05, 5.35545579829488e-05, 5.34155552163185e-05, 5.33297540297184e-05,\n                                                5.32804844333157e-05, 5.32547779492631e-05, 5.32430362536473e-05, 5.32386321570044e-05, 5.32374341908337e-05,\n                                                5.32372573776030e-05, 5.32372391361946e-05, 5.32368519028381e-05, 5.32342284085274e-05, 5.32245852173929e-05,\n                                                5.31988880663192e-05, 5.31426913408239e-05, 5.30352242975596e-05, 5.28488267299565e-05, 5.25488660567675e-05,\n                                                5.20942947659364e-05, 5.14390196322267e-05, 5.05342366707850e-05, 4.93318210015303e-05, 4.77887347241079e-05,\n                                                4.58722244527365e-05, 4.35653375010503e-05, 4.08720324767131e-05, 3.78209642999394e-05, 3.44669735632408e-05,\n                                                3.08894906737578e-05, 2.71875199260307e-05, 2.34715555293974e-05, 1.98535420992130e-05, 1.64365625483498e-05,\n                                                1.33060332139223e-05, 1.05236638621165e-05, 8.12446450559889e-06, 6.11617614332260e-06, 4.48032247390984e-06,\n                                                3.17485153011887e-06, 2.13913780378050e-06, 1.30015030030961e-06, 5.62367665324359e-07, 3.93898005768278e-07,\n                                                7.53179447698926e-07, 9.32630012329128e-07, 1.05193918997770e-06, 1.16145082706964e-06, 1.26986636672655e-06,\n                                                1.35273153034632e-06, 1.37332050620387e-06, 1.30590894364957e-06, 1.14987896182583e-06, 9.31045539331876e-07,\n                                                6.92517572176143e-07, 4.80317902784577e-07, 3.55271367880050e-15, 1.77635683940025e-15, 1.77635683940025e-15,\n                                                1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15, 3.55271367880050e-15,\n                                                1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15,\n                                                1.77635683940025e-15, 1.77635683940025e-15, 3.55271367880050e-15, 3.55271367880050e-15, 3.55271367880050e-15,\n                                                1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15,\n                                                1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15, 1.77635683940025e-15,\n                                                1.77635683940025e-15}),\nmadness::CubicInterpolationTable<double>(grid, {1.00000000000000e+01,  9.99999998250934e+00, 9.99999944166351e+00, 9.99999577734680e+00, 9.99998230683186e+00,\n                                                9.99994639862363e+00,  9.99986781052609e+00, 9.99971729011807e+00, 9.99945548755225e+00, 9.99903222065445e+00,\n                                                9.99838612107945e+00,  9.99744467825465e+00, 9.99612468557279e+00, 9.99433308137917e+00, 9.99196816632438e+00,\n                                                9.98892116913533e+00,  9.98507812516516e+00, 9.98032202637655e+00, 9.97453519759456e+00, 9.96760185155812e+00,\n                                                9.95941077388369e+00,  9.94985808775026e+00, 9.93885004612363e+00, 9.92630579602032e+00, 9.91216005437410e+00,\n                                                9.89636562871325e+00,  9.87889570886179e+00, 9.85974584955845e+00, 9.83893555994199e+00, 9.81650941609028e+00,\n                                                9.79253761880886e+00,  9.76711593166074e+00, 9.74036495399414e+00, 9.71242870966105e+00, 9.68347256248978e+00,\n                                                9.65368050189955e+00,  9.62325187345717e+00, 9.59239765681803e+00, 9.56133641493750e+00, 9.53029005199074e+00,\n                                                9.49947952233579e+00,  9.46912062928401e+00, 9.43942004142838e+00, 9.41057163745995e+00, 9.38275326974227e+00,\n                                                9.35612401442639e+00,  9.33082195339454e+00, 9.30696251227447e+00, 9.28463736016815e+00, 9.26391386112298e+00,\n                                                9.24483505485678e+00,  9.22742013461761e+00, 9.21166538288268e+00, 9.19754552033733e+00, 9.18501541966686e+00,\n                                                9.17401213265225e+00,  9.16445717650931e+00, 9.15625902312030e+00, 9.14931573270193e+00, 9.14351767159666e+00,\n                                                9.13875025244608e+00,  9.13489663426304e+00, 9.13184032016041e+00, 9.12946759200794e+00, 9.12766972432115e+00,\n                                                9.12634492440129e+00,  9.12539995220709e+00, 9.12475138159199e+00, 9.12432647421505e+00, 9.12406364835105e+00,\n                                                9.12391253662222e+00,  9.12383363892298e+00, 9.12379758905436e+00, 9.12378406536522e+00, 9.12378038658077e+00,\n                                                9.12377984359941e+00,  9.12377976927292e+00, 9.12377801393232e+00, 9.12376612123539e+00, 9.12372240233252e+00,\n                                                9.12360586309060e+00,  9.12335081626784e+00, 9.12286235752564e+00, 9.12201288127614e+00, 9.12063978821531e+00,\n                                                9.11854450881737e+00,  9.11549293624534e+00, 9.11121732824265e+00, 9.10541970087438e+00, 9.09777669786485e+00,\n                                                9.08794587816194e+00,  9.07557332157941e+00, 9.06030240795542e+00, 9.04178357882164e+00, 9.01968484136874e+00,\n                                                8.99370272189601e+00,  8.96357332027175e+00, 8.92908306058444e+00, 8.89007868159116e+00, 8.84647597275152e+00,\n                                                8.79826674944108e+00,  8.74552358710238e+00, 8.68840190899204e+00, 8.62713915009668e+00, 8.56205089578582e+00,\n                                                8.49352410243276e+00,  8.42200772407347e+00, 8.34800126475391e+00, 8.27204192212761e+00, 8.19469106295961e+00,\n                                                8.11652076628503e+00,  8.03810108970070e+00, 7.95998857561832e+00, 7.88271634238158e+00, 7.80678592747923e+00,\n                                                7.73266089109570e+00,  7.66076206517062e+00, 7.59146425418719e+00, 7.52509415859316e+00, 7.46192929296051e+00,\n                                                7.40219769783952e+00,  7.34607828502149e+00, 7.29370170025133e+00, 7.24515162772242e+00, 7.20046649248719e+00,\n                                                7.15964153859703e+00,  7.12263127279605e+00, 7.08935226758505e+00, 7.05968631551859e+00, 7.03348392063947e+00,\n                                                7.01056810450906e+00,  6.99073849438520e+00, 6.97377565036057e+00, 6.95944557709655e+00, 6.94750435450157e+00,\n                                                6.93770281071449e+00,  6.92979115061593e+00, 6.92352344451457e+00, 6.91866187546918e+00, 6.91498064076236e+00,\n                                                6.91226940411734e+00,  6.91033620093101e+00, 6.90900970938844e+00, 6.90814081577552e+00, 6.90760342217994e+00,\n                                                6.90729446825942e+00,  6.90713316473822e+00, 6.90705946343169e+00, 6.90703181546317e+00, 6.90702429453933e+00,\n                                                6.90702318446651e+00,  6.90702307908999e+00, 6.90702093071280e+00, 6.90700637514799e+00, 6.90695286745347e+00,\n                                                6.90681023636455e+00,  6.90649809566894e+00, 6.90590032404121e+00, 6.90486084153501e+00, 6.90318088851257e+00,\n                                                6.90061798626951e+00,  6.89688672627976e+00, 6.89166149456763e+00, 6.88458118679056e+00, 6.87525590618458e+00,\n                                                6.86327555969884e+00,  6.84822017838957e+00, 6.82967168992529e+00, 6.80722677023107e+00, 6.78051030703324e+00,\n                                                6.74918893157821e+00,  6.71298402785331e+00, 6.67168362132729e+00, 6.62515258738018e+00, 6.57334070236772e+00,\n                                                6.51628817878709e+00,  6.45412846383860e+00, 6.38708821674437e+00, 6.31548449411952e+00, 6.23971925156080e+00,\n                                                6.16027131405401e+00,  6.07768599478551e+00, 5.99256258154475e+00, 5.90553999464328e+00, 5.81728106863748e+00,\n                                                5.72845610993761e+00,  5.63972658315667e+00, 5.55172990253675e+00, 5.46506627523608e+00, 5.38028832651190e+00,\n                                                5.29789386642783e+00,  5.21832172878490e+00, 5.14195024324192e+00, 5.06909768082969e+00, 5.00002397005584e+00,\n                                                4.93493308333934e+00,  4.87397567489390e+00, 4.81725174330875e+00, 4.76481324807745e+00, 4.71666670983495e+00,\n                                                4.67277587144513e+00,  4.63306450515536e+00, 4.59741943608274e+00, 4.56569382771266e+00, 4.53771074949433e+00,\n                                                4.51326702418425e+00,  4.49213733434034e+00, 4.47407855259662e+00, 4.45883424773923e+00, 4.44613930698566e+00,\n                                                4.43572460357941e+00,  4.42732162781991e+00, 4.42066698948267e+00, 4.41550669118785e+00, 4.41160006678588e+00,\n                                                4.40872327738406e+00,  4.40667226117398e+00, 4.40526504232520e+00, 4.40434331901439e+00, 4.40377327079170e+00,\n                                                4.40344555008811e+00,  4.40327445046709e+00, 4.40319627366457e+00, 4.40316694685142e+00, 4.40315896924759e+00,\n                                                4.40315779176999e+00,  4.40315768698288e+00, 4.40315562423598e+00, 4.40314164883150e+00, 4.40309027390475e+00,\n                                                4.40295332827606e+00,  4.40265363151443e+00, 4.40207969704032e+00, 4.40108168485762e+00, 4.39946880540560e+00,\n                                                4.39700835208907e+00,  4.39342651036127e+00, 4.38841105328979e+00, 4.38161598467332e+00, 4.37266812880608e+00,\n                                                4.36117558993168e+00,  4.34673791529906e+00, 4.32895769719695e+00, 4.30745324805645e+00, 4.28187188809631e+00,\n                                                4.25190330824528e+00,  4.21729242339532e+00, 4.17785112119336e+00, 4.13346834349984e+00, 4.08411800877516e+00,\n                                                4.02986438500057e+00,  3.97086464104615e+00, 3.90736842615885e+00, 3.83971444312687e+00, 3.76832408838137e+00,\n                                                3.69369233619786e+00,  3.61637615147080e+00, 3.53698083054275e+00, 3.45614478872393e+00, 3.37452342350829e+00,\n                                                3.29277276457193e+00,  3.21153365535941e+00, 3.13141718252044e+00, 3.05299197571118e+00, 2.97677385062851e+00,\n                                                2.90321808185431e+00,  2.83271439364231e+00, 2.76558457052234e+00, 2.70208243520430e+00, 2.64239583107262e+00,\n                                                2.58665018490314e+00,  2.53491320964836e+00, 2.48720032957919e+00, 2.44348046042502e+00, 2.40368184451677e+00,\n                                                2.36769771536522e+00,  2.33539163952433e+00, 2.30660245013660e+00, 2.28114874252064e+00, 2.25883294564321e+00,\n                                                2.23944501382675e+00,  2.22276580107059e+00, 2.20857018705096e+00, 2.19663002075344e+00, 2.18671693657357e+00,\n                                                2.17860508055321e+00,  2.17207376327292e+00, 2.16691003293855e+00, 2.16291113954260e+00, 2.15988684072694e+00,\n                                                2.15766148400256e+00,  2.15607578982728e+00, 2.15498825675084e+00, 2.15427611385349e+00, 2.15383575681234e+00,\n                                                2.15358262126156e+00,  2.15345046923982e+00, 2.15339008961324e+00, 2.15336743940963e+00, 2.15336127803138e+00,\n                                                2.15336036862582e+00,  2.15336028822970e+00, 2.15335871162869e+00, 2.15334802995091e+00, 2.15330876336321e+00,\n                                                2.15320409605124e+00,  2.15297504939180e+00, 2.15253645585364e+00, 2.15177392017577e+00, 2.15054194884174e+00,\n                                                2.14866342106972e+00,  2.14593056102470e+00, 2.14210754736587e+00, 2.13693485790994e+00, 2.13013538999180e+00,\n                                                2.12142231839345e+00,  2.11050855231472e+00, 2.09711753393501e+00, 2.08099499073583e+00, 2.06192112300873e+00,\n                                                2.03972259143476e+00,  2.01428358408157e+00, 1.98555520462605e+00, 1.95356244869412e+00, 1.91840813224319e+00,\n                                                1.88027330620891e+00,  1.83941392650157e+00, 1.79615382858156e+00, 1.75087435268215e+00, 1.70400124478688e+00,\n                                                1.65598968447090e+00,  1.60730843378650e+00, 1.55842414262782e+00, 1.50978678142254e+00, 1.46181701331436e+00,\n                                                1.41489609039432e+00,  1.36935859556010e+00, 1.32548808869231e+00, 1.28351548416815e+00, 1.24361980846617e+00,\n                                                1.20593087280042e+00,  1.17053334658792e+00, 1.13747172475675e+00, 1.10675573179321e+00, 1.07836578241650e+00,\n                                                1.05225820811849e+00,  1.02837004845033e+00, 1.00662328733390e+00, 9.86928482819719e-01, 9.69187791616507e-01,\n                                                9.53297427620431e-01,  9.39149618224693e-01, 9.26634135725990e-01, 9.15639486148407e-01, 9.06053836556897e-01,\n                                                8.97765756321638e-01,  8.90664839267538e-01, 8.84642263232966e-01, 8.79591331974481e-01, 8.75408032074342e-01,\n                                                8.71991624909521e-01,  8.69245281178351e-01, 8.67076753357916e-01, 8.65399070265246e-01, 8.64131228178330e-01,\n                                                8.63198845334015e-01,  8.62534741620570e-01, 8.62079403365630e-01, 8.61781294524732e-01, 8.61596980272063e-01,\n                                                8.61491036655202e-01,  8.61435729985127e-01, 8.61410461154065e-01, 8.61400982144291e-01, 8.61398403642788e-01,\n                                                8.61398023062053e-01,  8.61397988896618e-01, 8.61397313014802e-01, 8.61392733833798e-01, 8.61375900545838e-01,\n                                                8.61331031222230e-01,  8.61232846164343e-01, 8.61044849719834e-01, 8.60718046466818e-01, 8.60190178593186e-01,\n                                                8.59385571262065e-01,  8.58215669352616e-01, 8.56580339119507e-01, 8.54369988686242e-01, 8.51468528890143e-01,\n                                                8.47757148983028e-01,  8.43118820233290e-01, 8.37443367578539e-01, 8.30632871499722e-01, 8.22607088883512e-01,\n                                                8.13308524913054e-01,  8.02706760773042e-01, 7.90801655148755e-01, 7.77625097450219e-01, 7.63241096572477e-01,\n                                                7.47744131527771e-01,  7.31255852224773e-01, 7.13920377403795e-01, 6.95898568489881e-01, 6.77361742914108e-01,\n                                                6.58485316423681e-01,  6.39442829829632e-01, 6.20400730868525e-01, 6.01514163723817e-01, 5.82923888364540e-01,\n                                                5.64754329419738e-01,  5.47112655320118e-01, 5.30088721582871e-01, 5.13755679028518e-01, 4.98171044329585e-01,\n                                                4.83378049017492e-01,  4.69407115141593e-01, 4.56277343092786e-01, 4.43997933428848e-01, 4.32569495892476e-01,\n                                                4.21985223343418e-01,  4.12231925822892e-01, 4.03290931273290e-01, 3.95138865892331e-01, 3.87748330139612e-01,\n                                                3.81088487288665e-01,  3.75125581083870e-01, 3.69823398147314e-01, 3.65143689630219e-01, 3.61046565343768e-01,\n                                                3.57490872221307e-01,  3.54434567371980e-01, 3.51835094083107e-01, 3.49649766837361e-01, 3.47836168706754e-01,\n                                                3.46352561410681e-01,  3.45158304995039e-01, 3.44214280685323e-01, 3.43483307223639e-01, 3.42930538184220e-01,\n                                                3.42523825642978e-01,  3.42234034394140e-01, 3.42035290839107e-01, 3.41905151808559e-01, 3.41824680899753e-01,\n                                                3.41778423284989e-01,  3.41754274139914e-01, 3.41743240538220e-01, 3.41739101508653e-01, 3.41737975597480e-01,\n                                                3.41737809415537e-01,  3.41737794096527e-01, 3.41737486584547e-01, 3.41735403151603e-01, 3.41727744320890e-01,\n                                                3.41707329375243e-01,  3.41662655242034e-01, 3.41577112249430e-01, 3.41428393923341e-01, 3.41188137334669e-01,\n                                                3.40821829369400e-01,  3.40289011844678e-01, 3.39543813562512e-01, 3.38535829027345e-01, 3.37211350641255e-01,\n                                                3.35514943141972e-01,  3.33391326008558e-01, 3.30787502685098e-01, 3.27655047089927e-01, 3.23952431416096e-01,\n                                                3.19647258854758e-01,  3.14718254812512e-01, 3.09156873826113e-01, 3.02968398310474e-01, 2.96172438669108e-01,\n                                                2.88802788706874e-01,  2.80906640168949e-01, 2.72543209029237e-01, 2.63781867683731e-01, 2.54699906932917e-01,\n                                                2.45380067437287e-01,  2.35907982553440e-01, 2.26369665356907e-01, 2.16849155453410e-01, 2.07426419138210e-01,\n                                                1.98175572266377e-01,  1.89163470726232e-01, 1.80448689867358e-01, 1.72080892435689e-01, 1.64100565199025e-01,\n                                                1.56539088196944e-01,  1.49419088083118e-01, 1.42755018850867e-01, 1.36553909546459e-01, 1.30816219192006e-01,\n                                                1.25536743489800e-01,  1.20705525098948e-01, 1.16308728345498e-01, 1.12329449127447e-01, 1.08748440602335e-01,\n                                                1.05544744291969e-01,  1.02696224030826e-01, 1.00180006464216e-01, 9.79728364952805e-02, 9.60513592421428e-02,\n                                                9.43923418366595e-02,  9.29728489530035e-02, 9.17703854889282e-02, 9.07630185225674e-02, 8.99294887125528e-02,\n                                                8.92493188721879e-02,  8.87029247031563e-02, 8.82717297999527e-02, 8.79382842193444e-02, 8.76863833400989e-02,\n                                                8.75011815996309e-02,  8.73692941477966e-02, 8.72788786243159e-02, 8.72196892102242e-02, 8.71830958214250e-02,\n                                                8.71620627279412e-02,  8.71510828546196e-02, 8.71460663559507e-02, 8.71441845420193e-02, 8.71436726475245e-02,\n                                                8.71435970931351e-02,  8.71435898928787e-02, 8.71434428012456e-02, 8.71424462388557e-02, 8.71387828459351e-02,\n                                                8.71290181679889e-02,  8.71076513650788e-02, 8.70667427065328e-02, 8.69956376355994e-02, 8.68808080141221e-02,\n                                                8.67058318184188e-02,  8.64515324079704e-02, 8.60962967077512e-02, 8.56165873466566e-02, 8.49876561801910e-02,\n                                                8.41844551811253e-02,  8.31827253892836e-02, 8.19602261473680e-02, 8.04980467111172e-02, 7.87819228280355e-02,\n                                                7.68034649923841e-02,  7.45611960318762e-02, 7.20612964008946e-02, 6.93179680428599e-02, 6.63533523926372e-02,\n                                                6.31969735178011e-02,  5.98847200329118e-02, 5.64574241015201e-02, 5.29591365237447e-02, 4.94352277149730e-02,\n                                                4.59304607083055e-02,  4.24871817467061e-02, 3.91437568488620e-02, 3.59333518566096e-02, 3.28831138638517e-02,\n                                                3.00137695849418e-02,  2.73396170153450e-02, 2.48688553744643e-02, 2.26041776579518e-02, 2.05435409590642e-02,\n                                                1.86810310088816e-02,  1.70077468047776e-02, 1.55126457970276e-02, 1.41833069387562e-02, 1.30065854933878e-02,\n                                                1.19691480726196e-02,  1.10578879529957e-02, 1.02602289762093e-02, 9.56433146524915e-03, 8.95921608090156e-03,\n                                                8.43482202940216e-03,  7.98201514447072e-03, 7.59255966115191e-03, 7.25906541400967e-03, 6.97492004171529e-03,\n                                                6.73421376296446e-03,  6.53166250928727e-03, 6.36253369517803e-03, 6.22257766432455e-03, 6.10796683697146e-03,\n                                                6.01524375107587e-03,  5.94127849321602e-03, 5.88323541840552e-03, 5.83854853818799e-03, 5.80490450662552e-03,\n                                                5.78023176048426e-03,  5.76269408966468e-03, 5.75068674663903e-03, 5.74283316710122e-03, 5.73798047680008e-03,\n                                                5.73519219643970e-03,  5.73373690785495e-03, 5.73307207607954e-03, 5.73282269116326e-03, 5.73275485396962e-03,\n                                                5.73274484139930e-03,  5.73274385037870e-03, 5.73272321865836e-03, 5.73258343745486e-03, 5.73206961324502e-03,\n                                                5.73070014844035e-03,  5.72770413238111e-03, 5.72197032591326e-03, 5.71201145279332e-03, 5.69594814516172e-03,\n                                                5.67151749509875e-03,  5.63611149467569e-03, 5.58685038469342e-03, 5.52069472868588e-03, 5.43459757248499e-03,\n                                                5.32569416647277e-03,  5.19152149568924e-03, 5.03025371960852e-03, 4.84093342532965e-03, 4.62367357890514e-03,\n                                                4.37980265805749e-03,  4.11192699055540e-03, 3.82389061061872e-03, 3.52062387276497e-03, 3.20788637679392e-03,\n                                                2.89192513106507e-03,  2.57908232804915e-03, 2.27539569283763e-03, 1.98623601400172e-03, 1.71602059686649e-03,\n                                                1.46802915281441e-03,  1.24433269321855e-03, 1.04582973682632e-03, 8.72370787561749e-04, 7.22943771487294e-04,\n                                                5.95890586088998e-04,  4.89127318850535e-04, 4.00346379631600e-04, 3.27185989460688e-04, 2.67359785446786e-04,\n                                                2.18745787035957e-04,  1.79438921223962e-04, 1.47774215163210e-04, 1.22328537619509e-04, 1.01907936651102e-04,\n                                                8.55261424508313e-05,  7.23785010094957e-05, 6.18146913993201e-05, 5.33127688004953e-05, 4.64560925905744e-05,\n                                                4.09136491246187e-05,  3.64235210152941e-05, 3.27790028986641e-05, 2.98169883219401e-05, 2.74084402072106e-05,\n                                                2.54508009316368e-05,  2.38621075094869e-05, 2.25764806280893e-05, 2.15406447789945e-05, 2.07112059804615e-05,\n                                                2.00525067146629e-05,  1.95349464391370e-05, 1.91336897099603e-05, 1.88276946531118e-05, 1.85989989240909e-05,\n                                                1.84322059251230e-05,  1.83141218847993e-05, 1.82335021445823e-05, 1.81808718551224e-05, 1.81483915113745e-05,\n                                                1.81297425250193e-05,  1.81200130295878e-05, 1.81155691283408e-05, 1.81139023247567e-05, 1.81134489380952e-05,\n                                                1.81133820191803e-05,  1.81133751233631e-05, 1.81132287799812e-05, 1.81122373152931e-05, 1.81085930126557e-05,\n                                                1.80988819877825e-05,  1.80776465690258e-05, 1.80370429987420e-05, 1.79666354291896e-05, 1.78533796777458e-05,\n                                                1.76818614541219e-05,  1.74348591635010e-05, 1.70942941775110e-05, 1.66426042120804e-05, 1.60645215530053e-05,\n                                                1.53491546672768e-05,  1.44921636024975e-05, 1.34977035859407e-05, 1.23797185125341e-05, 1.11621438332321e-05,\n                                                9.87767875315626e-06,  8.56504899715560e-06, 7.26508968185158e-06, 6.01642687669823e-06, 4.85180807530128e-06,\n                                                3.79595584298897e-06,  2.86504720570235e-06, 2.06675112579546e-06, 1.39873070637009e-06, 8.42611232343415e-07,\n                                                3.39615423783357e-07,  3.31065965752941e-07, 6.09860792977202e-07, 7.88273828433717e-07, 9.09509932256469e-07,\n                                                9.85229627659123e-07,  1.03285577779388e-06, 1.08024741152235e-06, 1.15018498370034e-06, 1.23974994004072e-06,\n                                                1.31690084792524e-06,  1.33859438911088e-06, 1.27432535990124e-06, 1.12069961311079e-06, 9.02773368949283e-07,\n                                                6.64455891197235e-07,  4.53415841761284e-07, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                -1.77635683940025e-15, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00,  0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00,  0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, -1.77635683940025e-15,\n                                                -1.77635683940025e-15, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00,  0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {1.10000000000000e+01, 1.09999999798369e+01, 1.09999993563541e+01, 1.09999951321587e+01, 1.09999796034539e+01,\n                                                1.09999382087388e+01, 1.09998476129043e+01, 1.09996740937500e+01, 1.09993722883691e+01, 1.09988843453436e+01,\n                                                1.09981395157033e+01, 1.09970542017119e+01, 1.09955324684013e+01, 1.09934670091143e+01, 1.09907405438194e+01,\n                                                1.09872276182567e+01, 1.09827967634684e+01, 1.09773129691377e+01, 1.09706404202205e+01, 1.09626454440937e+01,\n                                                1.09531996140216e+01, 1.09421829531418e+01, 1.09294871803600e+01, 1.09150189347303e+01, 1.08987029077632e+01,\n                                                1.08804848040082e+01, 1.08603340403250e+01, 1.08382460853082e+01, 1.08142443346718e+01, 1.07883814184127e+01,\n                                                1.07607398433054e+01, 1.07314318909294e+01, 1.07005987170726e+01, 1.06684086317212e+01, 1.06350545774730e+01,\n                                                1.06007508647243e+01, 1.05657292605766e+01, 1.05302345614641e+01, 1.04945198040302e+01, 1.04588412828950e+01,\n                                                1.04234535469982e+01, 1.03886045387754e+01, 1.03545310241585e+01, 1.03214544385937e+01, 1.02895772475858e+01,\n                                                1.02590798922647e+01, 1.02301183633511e+01, 1.02028224223344e+01, 1.01772944677245e+01, 1.01536090273355e+01,\n                                                1.01318128446432e+01, 1.01119255178777e+01, 1.00939406440036e+01, 1.00778274153238e+01, 1.00635326133960e+01,\n                                                1.00509829426322e+01, 1.00400876439144e+01, 1.00307413265316e+01, 1.00228269546539e+01, 1.00162189225172e+01,\n                                                1.00107861507305e+01, 1.00063951349870e+01, 1.00029128783287e+01, 1.00002096393774e+01, 9.99816143190832e+00,\n                                                9.99665221604762e+00, 9.99557572831810e+00, 9.99483690670746e+00, 9.99435287770566e+00, 9.99405348454380e+00,\n                                                9.99388134924341e+00, 9.99379147505322e+00, 9.99375040986857e+00, 9.99373500475046e+00, 9.99373081417069e+00,\n                                                9.99373019564938e+00, 9.99373011098254e+00, 9.99372811143775e+00, 9.99371456422277e+00, 9.99366476315483e+00,\n                                                9.99353201123445e+00, 9.99324148407484e+00, 9.99268507897817e+00, 9.99171745201550e+00, 9.99015341903126e+00,\n                                                9.98776686622874e+00, 9.98429128189012e+00, 9.97942198277766e+00, 9.97282006686618e+00, 9.96411807842506e+00,\n                                                9.95292732236779e+00, 9.93884671245033e+00, 9.92147298234038e+00, 9.90041202949388e+00, 9.87529109870117e+00,\n                                                9.84577144506426e+00, 9.81156104644620e+00, 9.77242686721860e+00, 9.72820611634833e+00, 9.67881590546737e+00,\n                                                9.62426071136905e+00, 9.56463709712688e+00, 9.50013525720962e+00, 9.43103712619629e+00, 9.35771101743659e+00,\n                                                9.28060301393650e+00, 9.20022558573391e+00, 9.11714411933281e+00, 9.03196218306967e+00, 8.94530639721276e+00,\n                                                8.85781172547868e+00, 8.77010786914814e+00, 8.68280725340524e+00, 8.59649488221954e+00, 8.51172013662985e+00,\n                                                8.42899042795399e+00, 8.34876650724524e+00, 8.27145917817065e+00, 8.19742715521691e+00, 8.12697583914270e+00,\n                                                8.06035683106015e+00, 7.99776806095764e+00, 7.93935445507347e+00, 7.88520910310033e+00, 7.83537490883838e+00,\n                                                7.78984671790427e+00, 7.74857391650336e+00, 7.71146348961414e+00, 7.67838351827499e+00, 7.64916708610457e+00,\n                                                7.62361655578881e+00, 7.60150816726356e+00, 7.58259690046218e+00, 7.56662153640677e+00, 7.55330984088283e+00,\n                                                7.54238378506163e+00, 7.53356470771525e+00, 7.52657831494053e+00, 7.52115940662683e+00, 7.51705621540629e+00,\n                                                7.51403424456134e+00, 7.51187949714548e+00, 7.51040099985262e+00, 7.50943254195947e+00, 7.50883357151102e+00,\n                                                7.50848921691891e+00, 7.50830943102919e+00, 7.50822728496956e+00, 7.50819646908159e+00, 7.50818808640676e+00,\n                                                7.50818684914129e+00, 7.50818673169069e+00, 7.50818433715148e+00, 7.50816811380414e+00, 7.50810847518446e+00,\n                                                7.50794950145245e+00, 7.50760159605568e+00, 7.50693533371213e+00, 7.50577675456417e+00, 7.50390433467863e+00,\n                                                7.50104783388427e+00, 7.49688918633947e+00, 7.49106555469176e+00, 7.48317461257036e+00, 7.47278205028136e+00,\n                                                7.45943121404692e+00, 7.44265469107202e+00, 7.42198754496721e+00, 7.39698179546410e+00, 7.36722163260776e+00,\n                                                7.33233877019891e+00, 7.29202728772009e+00, 7.24605729342095e+00, 7.19428676774173e+00, 7.13667101296019e+00,\n                                                7.07326923183961e+00, 7.00424787034710e+00, 6.92988047285453e+00, 6.85054390576514e+00, 6.76671091409079e+00,\n                                                6.67893910713543e+00, 6.58785665374424e+00, 6.49414522403453e+00, 6.39852102927883e+00, 6.30171512155689e+00,\n                                                6.20445431516569e+00, 6.10744407544481e+00, 6.01135443626423e+00, 5.91680950223922e+00, 5.82438050548859e+00,\n                                                5.73458189179951e+00, 5.64786963388632e+00, 5.56464094160496e+00, 5.48523470214600e+00, 5.40993223428563e+00,\n                                                5.33895818329893e+00, 5.27248155835895e+00, 5.21061700561300e+00, 5.15342643080607e+00, 5.10092106124752e+00,\n                                                5.05306399375729e+00, 5.00977323167555e+00, 4.97092518029828e+00, 4.93635854940632e+00, 4.90587860250012e+00,\n                                                4.87926169129667e+00, 4.85626001682531e+00, 4.83660656145747e+00, 4.82002013688493e+00, 4.80621049011687e+00,\n                                                4.79488340284510e+00, 4.78574570982257e+00, 4.77851015067888e+00, 4.77289995871212e+00, 4.76865308160852e+00,\n                                                4.76552592455883e+00, 4.76329650730823e+00, 4.76176693420906e+00, 4.76076509063300e+00, 4.76014549977279e+00,\n                                                4.75978929994576e+00, 4.75960333251915e+00, 4.75951836269070e+00, 4.75948648761093e+00, 4.75947781681980e+00,\n                                                4.75947653702932e+00, 4.75947642313709e+00, 4.75947418115494e+00, 4.75945899140827e+00, 4.75940315247681e+00,\n                                                4.75925430780101e+00, 4.75892857204480e+00, 4.75830477660212e+00, 4.75722007714581e+00, 4.75546714549563e+00,\n                                                4.75279314347919e+00, 4.74890064567878e+00, 4.74345063816405e+00, 4.73606766854021e+00, 4.72634715645703e+00,\n                                                4.71386479196876e+00, 4.69818785267450e+00, 4.67888816288117e+00, 4.65555630545675e+00, 4.62781658850609e+00,\n                                                4.59534217510553e+00, 4.55786971583595e+00, 4.51521278983616e+00, 4.46727346629091e+00, 4.41405134614399e+00,\n                                                4.35564953088912e+00, 4.29227708651794e+00, 4.22424772050469e+00, 4.15197456332434e+00, 4.07596113934504e+00,\n                                                3.99678881962658e+00, 3.91510126163042e+00, 3.83158654223156e+00, 3.74695785888162e+00, 3.66193378501370e+00,\n                                                3.57721909890147e+00, 3.49348714884778e+00, 3.41136457415346e+00, 3.33141898747348e+00, 3.25414996767844e+00,\n                                                3.17998344626788e+00, 3.10926932647223e+00, 3.04228197733668e+00, 2.97922311008482e+00, 2.92022647491273e+00,\n                                                2.86536380780390e+00, 2.81465149730998e+00, 2.76805751568185e+00, 2.72550825216704e+00, 2.68689498545248e+00,\n                                                2.65207982687064e+00, 2.62090104919252e+00, 2.59317778377689e+00, 2.56871412019069e+00, 2.54730267757677e+00,\n                                                2.52872773751920e+00, 2.51276803597409e+00, 2.49919930919234e+00, 2.48779667760730e+00, 2.47833693442120e+00,\n                                                2.47060078400847e+00, 2.46437505110045e+00, 2.45945485684176e+00, 2.45564573402033e+00, 2.45276563283232e+00,\n                                                2.45064675207917e+00, 2.44913712007556e+00, 2.44810184573729e+00, 2.44742396374852e+00, 2.44700480818645e+00,\n                                                2.44676386568780e+00, 2.44663808078677e+00, 2.44658061063525e+00, 2.44655905192228e+00, 2.44655318746030e+00,\n                                                2.44655232187912e+00, 2.44655224535730e+00, 2.44655074473304e+00, 2.44654057781179e+00, 2.44650320356688e+00,\n                                                2.44640358087863e+00, 2.44618557594209e+00, 2.44576813508506e+00, 2.44504240428810e+00, 2.44386997351360e+00,\n                                                2.44208241862680e+00, 2.43948230237546e+00, 2.43584577368831e+00, 2.43092686618703e+00, 2.42446353758031e+00,\n                                                2.41618540849965e+00, 2.40582305220759e+00, 2.39311855928833e+00, 2.37783696245217e+00, 2.35977796930394e+00,\n                                                2.33878733277022e+00, 2.31476710958644e+00, 2.28768403609816e+00, 2.25757530296532e+00, 2.22455114384096e+00,\n                                                2.18879386454874e+00, 2.15055321291419e+00, 2.11013829724486e+00, 2.06790656644370e+00, 2.02425062630807e+00,\n                                                1.97958384781520e+00, 1.93432579815303e+00, 1.88888848438753e+00, 1.84366425206505e+00, 1.79901595264047e+00,\n                                                1.75526972162536e+00, 1.71271043462465e+00, 1.67157966757175e+00, 1.63207580667813e+00, 1.59435584553195e+00,\n                                                1.55853837065387e+00, 1.52470726128286e+00, 1.49291569654439e+00, 1.46319015395572e+00, 1.43553417983442e+00,\n                                                1.40993180120571e+00, 1.38635052198505e+00, 1.36474390012989e+00, 1.34505373751517e+00, 1.32721193337175e+00,\n                                                1.31114205927292e+00, 1.29676071300310e+00, 1.28397870372350e+00, 1.27270211423761e+00, 1.26283327940267e+00,\n                                                1.25427171349755e+00, 1.24691501366868e+00, 1.24065976109457e+00, 1.23540243578495e+00, 1.23104035458968e+00,\n                                                1.22747263486404e+00, 1.22460117840868e+00, 1.22233166211508e+00, 1.22057451375129e+00, 1.21924584419836e+00,\n                                                1.21826830190952e+00, 1.21757181206209e+00, 1.21709416229721e+00, 1.21678139935014e+00, 1.21658800623961e+00,\n                                                1.21647683769212e+00, 1.21641880154558e+00, 1.21639228523078e+00, 1.21638233818800e+00, 1.21637963236462e+00,\n                                                1.21637923299124e+00, 1.21637919713876e+00, 1.21637848788251e+00, 1.21637368258066e+00, 1.21635601798652e+00,\n                                                1.21630893222902e+00, 1.21620589414075e+00, 1.21600859429656e+00, 1.21566558337828e+00, 1.21511144190895e+00,\n                                                1.21426656275383e+00, 1.21303762219084e+00, 1.21131880441353e+00, 1.20899382548124e+00, 1.20593877373386e+00,\n                                                1.20202574325776e+00, 1.19712718548105e+00, 1.19112084399151e+00, 1.18389507439447e+00, 1.17535429207116e+00,\n                                                1.16542424526808e+00, 1.15405678829843e+00, 1.14123383697944e+00, 1.12697022875006e+00, 1.11131528035026e+00,\n                                                1.09435292742277e+00, 1.07620042899477e+00, 1.05700570981695e+00, 1.03694348169515e+00, 1.01621032449312e+00,\n                                                9.95018920875287e-01, 9.73591637789543e-01, 9.52153649839536e-01, 9.30925822456798e-01, 9.10117625323688e-01,\n                                                8.89920422632233e-01, 8.70501562055960e-01, 8.51999720726408e-01, 8.34521925704880e-01, 8.18142528183069e-01,\n                                                8.02904187742270e-01, 7.88820663020662e-01, 7.75880974832745e-01, 7.64054366597810e-01, 7.53295463615117e-01,\n                                                7.43549117320422e-01, 7.34754574179801e-01, 7.26848782706547e-01, 7.19768805919994e-01, 7.13453417687591e-01,\n                                                7.07844024692529e-01, 7.02885078192132e-01, 6.98524133534729e-01, 6.94711693000444e-01, 6.91400938744318e-01,\n                                                6.88547433897458e-01, 6.86108844690297e-01, 6.84044716110943e-01, 6.82316318095923e-01, 6.80886567902593e-01,\n                                                6.79720026242352e-01, 6.78782959103163e-01, 6.78043453258610e-01, 6.77471570749343e-01, 6.77039525829638e-01,\n                                                6.76721866860225e-01, 6.76495645379907e-01, 6.76340555147922e-01, 6.76239025370213e-01, 6.76176254619437e-01,\n                                                6.76140175069447e-01, 6.76121340437842e-01, 6.76112735228720e-01, 6.76109507196895e-01, 6.76108629101448e-01,\n                                                6.76108499496671e-01, 6.76108487549424e-01, 6.76108247721878e-01, 6.76106622862482e-01, 6.76100649819816e-01,\n                                                6.76084728744096e-01, 6.76049890237378e-01, 6.75983187096223e-01, 6.75867242188085e-01, 6.75679984866258e-01,\n                                                6.75394608734377e-01, 6.74979782367240e-01, 6.74400140275289e-01, 6.73617072306074e-01, 6.72589814337773e-01,\n                                                6.71276820743335e-01, 6.69637370155627e-01, 6.67633322825436e-01, 6.65230914762015e-01, 6.62402447299250e-01,\n                                                6.59127718292387e-01, 6.55395049838225e-01, 6.51201801422618e-01, 6.46554315751573e-01, 6.41467319554099e-01,\n                                                6.35962879359539e-01, 6.30069075142611e-01, 6.23818586743697e-01, 6.17247380079998e-01, 6.10393634204820e-01,\n                                                6.03296979051471e-01, 5.95998036869393e-01, 5.88538197684157e-01, 5.80959524019887e-01, 5.73304676247732e-01,\n                                                5.65616771658032e-01, 5.57939126483536e-01, 5.50314868481658e-01, 5.42786438965839e-01, 5.35395022559157e-01,\n                                                5.28179949997821e-01, 5.21178116601217e-01, 5.14423450390645e-01, 5.07946452992524e-01, 5.01773826161315e-01,\n                                                4.95928188553270e-01, 4.90427881768875e-01, 4.85286861435531e-01, 4.80514667642536e-01, 4.76116468712229e-01,\n                                                4.72093172531022e-01, 4.68441600069593e-01, 4.65154716049859e-01, 4.62221911850250e-01, 4.59629335645046e-01,\n                                                4.57360264457918e-01, 4.55395512303699e-01, 4.53713867933729e-01, 4.52292554930265e-01, 4.51107706064059e-01,\n                                                4.50134842994945e-01, 4.49349351628545e-01, 4.48726942822478e-01, 4.48244087746794e-01, 4.47878417127141e-01,\n                                                4.47609073904863e-01, 4.47417009585939e-01, 4.47285215742356e-01, 4.47198883764703e-01, 4.47145487998224e-01,\n                                                4.47114789748227e-01, 4.47098762208933e-01, 4.47091439028485e-01, 4.47088691840099e-01, 4.47087944537250e-01,\n                                                4.47087834236878e-01, 4.47087823725365e-01, 4.47087608988962e-01, 4.47086154118573e-01, 4.47080805865943e-01,\n                                                4.47066549425108e-01, 4.47035349741116e-01, 4.46975599334037e-01, 4.46871695126198e-01, 4.46703764336549e-01,\n                                                4.46447556661797e-01, 4.46074516566785e-01, 4.45552045378813e-01, 4.44843957831299e-01, 4.43911131579549e-01,\n                                                4.42712340958765e-01, 4.41205257973664e-01, 4.39347594514885e-01, 4.37098350644558e-01, 4.34419125267620e-01,\n                                                4.31275438555238e-01, 4.27638011099754e-01, 4.23483943811302e-01, 4.18797745544421e-01, 4.13572162406975e-01,\n                                                4.07808773101184e-01, 4.01518327352594e-01, 3.94720817953528e-01, 3.87445289508257e-01, 3.79729397190674e-01,\n                                                3.71618735903134e-01, 3.63165964214781e-01, 3.54429749284751e-01, 3.45473560139844e-01, 3.36364338722143e-01,\n                                                3.27171082040056e-01, 3.17963374548839e-01, 3.08809916474473e-01, 2.99777099322082e-01, 2.90927682238335e-01,\n                                                2.82319620667058e-01, 2.74005091263046e-01, 2.66029744874039e-01, 2.58432204105649e-01, 2.51243805649406e-01,\n                                                2.44488572334083e-01, 2.38183387521763e-01, 2.32338336118854e-01, 2.26957172473378e-01, 2.22037875494472e-01,\n                                                2.17573254700239e-01, 2.13551576569847e-01, 2.09957187488451e-01, 2.06771116771948e-01, 2.03971649970850e-01,\n                                                2.01534868330857e-01, 1.99435154602892e-01, 1.97645668212729e-01, 1.96138794143687e-01, 1.94886569901175e-01,\n                                                1.93861093848742e-01, 1.93034916325566e-01, 1.92381412600058e-01, 1.91875134218636e-01, 1.91492132991044e-01,\n                                                1.91210249995180e-01, 1.91009360807259e-01, 1.90871567813501e-01, 1.90781330997519e-01, 1.90725529994507e-01,\n                                                1.90693452347929e-01, 1.90676705618795e-01, 1.90669054058253e-01, 1.90666183719349e-01, 1.90665402919990e-01,\n                                                1.90665287675726e-01, 1.90665276269117e-01, 1.90665038798539e-01, 1.90663429904546e-01, 1.90657515501604e-01,\n                                                1.90641750347776e-01, 1.90607251094230e-01, 1.90541190094059e-01, 1.90426338247821e-01, 1.90240784445404e-01,\n                                                1.89957858140847e-01, 1.89546279761302e-01, 1.88970560370791e-01, 1.88191666616859e-01, 1.87167958894602e-01,\n                                                1.85856399475133e-01, 1.84214012979123e-01, 1.82199564342344e-01, 1.79775400087552e-01, 1.76909378529301e-01,\n                                                1.73576795195876e-01, 1.69762193348673e-01, 1.65460938392796e-01, 1.60680431692143e-01, 1.55440846169167e-01,\n                                                1.49775284899095e-01, 1.43729295500021e-01, 1.37359716704157e-01, 1.30732886258135e-01, 1.23922296201942e-01,\n                                                1.17005835683313e-01, 1.10062804914548e-01, 1.03170909391721e-01, 9.64034460788454e-02, 8.98268715923543e-02,\n                                                8.34988994311452e-02, 7.74672156583893e-02, 7.17688391187163e-02, 6.64300925478862e-02, 6.14671024984386e-02,\n                                                5.68867136690692e-02, 5.26876884489145e-02, 4.88620637518231e-02, 4.53965509375607e-02, 4.22738862666368e-02,\n                                                3.94740644371225e-02, 3.69754125902677e-02, 3.47554841414919e-02, 3.27917694448434e-02, 3.10622331714328e-02,\n                                                2.95456966319954e-02, 2.82220877870820e-02, 2.70725832339469e-02, 2.60796659082398e-02, 2.52271203551295e-02,\n                                                2.44999848126710e-02, 2.38844764432660e-02, 2.33679031252780e-02, 2.29385724303199e-02, 2.25857058271330e-02,\n                                                2.22993637826878e-02, 2.20703852630795e-02, 2.18903431601358e-02, 2.17515153870735e-02, 2.16468698233179e-02,\n                                                2.15700599895978e-02, 2.15154273566078e-02, 2.14780055895361e-02, 2.14535218465794e-02, 2.14383904921185e-02,\n                                                2.14296952262867e-02, 2.14251566044990e-02, 2.14230831197071e-02, 2.14223053242559e-02, 2.14220937488356e-02,\n                                                2.14220625208856e-02, 2.14220592996046e-02, 2.14219909192579e-02, 2.14215276373455e-02, 2.14198246389206e-02,\n                                                2.14152856455705e-02, 2.14053550878610e-02, 2.13863480599290e-02, 2.13533296334205e-02, 2.13000568124198e-02,\n                                                2.12189980396111e-02, 2.11014460396193e-02, 2.09377390360608e-02, 2.07176020470126e-02, 2.04306131858214e-02,\n                                                2.00667891495812e-02, 1.96172694792782e-02, 1.90750617478450e-02, 1.84357916806945e-02, 1.76983864813618e-02,\n                                                1.68656101428830e-02, 1.59443700669524e-02, 1.49457276624538e-02, 1.38845724542875e-02, 1.27789574207355e-02,\n                                                1.16491375394290e-02, 1.05163962226982e-02, 9.40177702686285e-03, 8.32485362883340e-03, 7.30266584649897e-03,\n                                                6.34892424665701e-03, 5.47354578941217e-03, 4.68253598931234e-03, 3.97818788788484e-03, 3.35953214196039e-03,\n                                                2.82295080843653e-03, 2.36286225995386e-03, 1.97239533395788e-03, 1.64399311129415e-03, 1.36991340805892e-03,\n                                                1.14261603506094e-03, 9.55040821231989e-04, 8.00785645903801e-04, 6.74195457060378e-04, 5.70376815502982e-04,\n                                                4.85158565703969e-04, 4.15023363556699e-04, 3.57032157756620e-04, 3.08754357769558e-04, 2.68205759356377e-04,\n                                                2.33790466383610e-04, 2.04243748918032e-04, 1.78576676399089e-04, 1.56025888887967e-04, 1.36011121270485e-04,\n                                                1.18100454042036e-04, 1.01981187418332e-04, 8.74339968497395e-05, 7.43091953427921e-05, 6.25052934921655e-05,\n                                                5.19507318550438e-05, 4.25895255116160e-05, 3.43709777066437e-05, 2.72430323509099e-05, 2.11484974865783e-05,\n                                                1.60233134316456e-05, 1.17961640153652e-05, 8.38892120924584e-06, 5.71759325396215e-06, 3.69358234308947e-06,\n                                                2.22514831449416e-06, 1.21903310201787e-06, 5.82242225988239e-07, 1.24344978758018e-14, 1.06581410364015e-14,\n                                                1.24344978758018e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.20000000000000e+01, 1.19999999770285e+01, 1.19999992667040e+01, 1.19999944541424e+01, 1.19999767625233e+01,\n                                                1.19999296021361e+01, 1.19998263875745e+01, 1.19996286993871e+01, 1.19992848555285e+01, 1.19987289447977e+01,\n                                                1.19978803595968e+01, 1.19966438494860e+01, 1.19949101009125e+01, 1.19925568330108e+01, 1.19894503853278e+01,\n                                                1.19854477614291e+01, 1.19803990830841e+01, 1.19741504032455e+01, 1.19665468220851e+01, 1.19574358482012e+01,\n                                                1.19466709457035e+01, 1.19341152058874e+01, 1.19196450783408e+01, 1.19031540896118e+01, 1.18845564676963e+01,\n                                                1.18637905781367e+01, 1.18408220640341e+01, 1.18156465702209e+01, 1.17882919242450e+01, 1.17588196467595e+01,\n                                                1.17273256739353e+01, 1.16939401959913e+01, 1.16588265487287e+01, 1.16221791371662e+01, 1.15842204186190e+01,\n                                                1.15451970223466e+01, 1.15053751293548e+01, 1.14650352745487e+01, 1.14244667606780e+01, 1.13839618873655e+01,\n                                                1.13438101985709e+01, 1.13042929392959e+01, 1.12656778895770e+01, 1.12282147139983e+01, 1.11921309314758e+01,\n                                                1.11576285760851e+01, 1.11248815878260e+01, 1.10940339442855e+01, 1.10651985211815e+01, 1.10384566520376e+01,\n                                                1.10138583444059e+01, 1.09914231014100e+01, 1.09711412919337e+01, 1.09529760095519e+01, 1.09368653583315e+01,\n                                                1.09227251021895e+01, 1.09104516130283e+01, 1.08999250511148e+01, 1.08910127090535e+01, 1.08835724484056e+01,\n                                                1.08774561558241e+01, 1.08725131439553e+01, 1.08685934217624e+01, 1.08655507598397e+01, 1.08632454791079e+01,\n                                                1.08615468963041e+01, 1.08603353670653e+01, 1.08595038771181e+01, 1.08589591439617e+01, 1.08586222050967e+01,\n                                                1.08584284838519e+01, 1.08583273395943e+01, 1.08582811249636e+01, 1.08582637881010e+01, 1.08582590720389e+01,\n                                                1.08582583759575e+01, 1.08582582806738e+01, 1.08582560303941e+01, 1.08582407844148e+01, 1.08581847385338e+01,\n                                                1.08580353404208e+01, 1.08577083844203e+01, 1.08570822173556e+01, 1.08559932850817e+01, 1.08542332209328e+01,\n                                                1.08515476443768e+01, 1.08476368008590e+01, 1.08421581316312e+01, 1.08347308150001e+01, 1.08249422677487e+01,\n                                                1.08123565375324e+01, 1.07965244539346e+01, 1.07769953376153e+01, 1.07533299934867e+01, 1.07251146351149e+01,\n                                                1.06919753044211e+01, 1.06535922661383e+01, 1.06097137767220e+01, 1.05601685633554e+01, 1.05048763155923e+01,\n                                                1.04438555077515e+01, 1.03772279506935e+01, 1.03052196265206e+01, 1.02281575864440e+01, 1.01464629725988e+01,\n                                                1.00606405262199e+01, 9.97126522483497e+00, 9.87896690644751e+00, 9.78441385470812e+00, 9.68829631901147e+00,\n                                                9.59131083236312e+00, 9.49414599311148e+00, 9.39747013341833e+00, 9.30192105105775e+00, 9.20809776977022e+00,\n                                                9.11655414231089e+00, 9.02779402907728e+00, 8.94226776853674e+00, 8.86036968771096e+00, 8.78243646085253e+00,\n                                                8.70874619182497e+00, 8.63951815480029e+00, 8.57491316952594e+00, 8.51503460898056e+00, 8.45993004124501e+00,\n                                                8.40959349927832e+00, 8.36396835812674e+00, 8.32295078404836e+00, 8.28639370737220e+00, 8.25411126186881e+00,\n                                                8.22588362760493e+00, 8.20146221034368e+00, 8.18057508692025e+00, 8.16293264132977e+00, 8.14823330977053e+00,\n                                                8.13616934457378e+00, 8.12643249747835e+00, 8.11871951324985e+00, 8.11273731668427e+00, 8.10820777113639e+00,\n                                                8.10487188630206e+00, 8.10249335816102e+00, 8.10086133539579e+00, 8.09979232433338e+00, 8.09913116803266e+00,\n                                                8.09875106355148e+00, 8.09855261323052e+00, 8.09846193929126e+00, 8.09842792430984e+00, 8.09841867140483e+00,\n                                                8.09841730569524e+00, 8.09841717605175e+00, 8.09841453292852e+00, 8.09839662538998e+00, 8.09833079553787e+00,\n                                                8.09815531850336e+00, 8.09777129730185e+00, 8.09703587373698e+00, 8.09575703788258e+00, 8.09369029215757e+00,\n                                                8.09053739462842e+00, 8.08594736774874e+00, 8.07951991043032e+00, 8.07081129015332e+00, 8.05934271534686e+00,\n                                                8.04461109545609e+00, 8.02610198808013e+00, 8.00330441324703e+00, 7.97572709127359e+00, 7.94291554242666e+00,\n                                                7.90446938501597e+00, 7.86005909457420e+00, 7.80944144883398e+00, 7.75247288522965e+00, 7.68912003849919e+00,\n                                                7.61946680117001e+00, 7.54371735583001e+00, 7.46219476845334e+00, 7.37533492074022e+00, 7.28367581843627e+00,\n                                                7.18784265823658e+00, 7.08852945560015e+00, 6.98647846629289e+00, 6.88245896032528e+00, 6.77724699585261e+00,\n                                                6.67160760947665e+00, 6.56628031567216e+00, 6.46196813952764e+00, 6.35932980159623e+00, 6.25897430228984e+00,\n                                                6.16145707706636e+00, 6.06727705696558e+00, 5.97687424960421e+00, 5.89062773103769e+00, 5.80885413062125e+00,\n                                                5.73180677535088e+00, 5.65967565379920e+00, 5.59258829788469e+00, 5.53061159910549e+00, 5.47375450106604e+00,\n                                                5.42197145675258e+00, 5.37516651142955e+00, 5.33319786762005e+00, 5.29588280113709e+00, 5.26300281919985e+00,\n                                                5.23430897652858e+00, 5.20952728764537e+00, 5.18836418986847e+00, 5.17051201986362e+00, 5.15565446681971e+00,\n                                                5.14347195827252e+00, 5.13364692213277e+00, 5.12586885297474e+00, 5.11983909476763e+00, 5.11527523861911e+00,\n                                                5.11191502510413e+00, 5.10951963822137e+00, 5.10787628313656e+00, 5.10679995304052e+00, 5.10613431128447e+00,\n                                                5.10575164233036e+00, 5.10555185724907e+00, 5.10546057438893e+00, 5.10542633113270e+00, 5.10541701614579e+00,\n                                                5.10541564127357e+00, 5.10541551891974e+00, 5.10541311037016e+00, 5.10539679210963e+00, 5.10533680471618e+00,\n                                                5.10517690233510e+00, 5.10482696996045e+00, 5.10415684621085e+00, 5.10299161623012e+00, 5.10110861932736e+00,\n                                                5.09823639188619e+00, 5.09405573520591e+00, 5.08820305682984e+00, 5.08027607894986e+00, 5.06984193562081e+00,\n                                                5.05644759014678e+00, 5.03963239566826e+00, 5.01894249903680e+00, 4.99394665692969e+00, 4.96425290312576e+00,\n                                                4.92952538836655e+00, 4.88950062161541e+00, 4.84400228558043e+00, 4.79295378988009e+00, 4.73638776900997e+00,\n                                                4.67445183270129e+00, 4.60741003329795e+00, 4.53563972486698e+00, 4.45962374424821e+00, 4.37993813213879e+00,\n                                                4.29723591287279e+00, 4.21222773802882e+00, 4.12566043947930e+00, 4.03829469961380e+00, 3.95088310403439e+00,\n                                                3.86414978177513e+00, 3.77877266421017e+00, 3.69536912837512e+00, 3.61448546951702e+00, 3.53659031416682e+00,\n                                                3.46207178013624e+00, 3.39123794595312e+00, 3.32432002841607e+00, 3.26147758786909e+00, 3.20280507877521e+00,\n                                                3.14833912200326e+00, 3.09806597471877e+00, 3.05192879370321e+00, 3.00983441106002e+00, 2.97165945483531e+00,\n                                                2.93725574315549e+00, 2.90645495544900e+00, 2.87907263786917e+00, 2.85491163403837e+00, 2.83376504969446e+00,\n                                                2.81541886408144e+00, 2.79965429514854e+00, 2.78625001251904e+00, 2.77498427396548e+00, 2.76563703954003e+00,\n                                                2.75799209401052e+00, 2.75183918413471e+00, 2.74697615382075e+00, 2.74321103864776e+00, 2.74036406285981e+00,\n                                                2.73826946805729e+00, 2.73677709449203e+00, 2.73575363392136e+00, 2.73508347774381e+00, 2.73466909543967e+00,\n                                                2.73443089540725e+00, 2.73430654183170e+00, 2.73424972555285e+00, 2.73422841211200e+00, 2.73422261436828e+00,\n                                                2.73422175863450e+00, 2.73422168298325e+00, 2.73422019943103e+00, 2.73421014817406e+00, 2.73417319910331e+00,\n                                                2.73407470962000e+00, 2.73385918389664e+00, 2.73344648804361e+00, 2.73272899948132e+00, 2.73156986509228e+00,\n                                                2.72980253674999e+00, 2.72723174077665e+00, 2.72363601488573e+00, 2.71877190694265e+00, 2.71237986971557e+00,\n                                                2.70419180173398e+00, 2.69394007653793e+00, 2.68136777536287e+00, 2.66623970112625e+00, 2.64835361907284e+00,\n                                                2.62755106038209e+00, 2.60372696019012e+00, 2.57683740016800e+00, 2.54690480181334e+00, 2.51402007405272e+00,\n                                                2.47834144890977e+00, 2.44009001935143e+00, 2.39954228957027e+00, 2.35702031863960e+00, 2.31288024308762e+00,\n                                                2.26750007092302e+00, 2.22126763367508e+00, 2.17456946885020e+00, 2.12778120699202e+00, 2.08125979344905e+00,\n                                                2.03533762866137e+00, 1.99031850194766e+00, 1.94647505020949e+00, 1.90404740620042e+00, 1.86324270606242e+00,\n                                                1.82423518469559e+00, 1.78716667495361e+00, 1.75214741665360e+00, 1.71925715286411e+00, 1.68854653141952e+00,\n                                                1.66003883652275e+00, 1.63373205478024e+00, 1.60960124387214e+00, 1.58760113380158e+00, 1.56766886175745e+00,\n                                                1.54972672897004e+00, 1.53368487309125e+00, 1.51944376960206e+00, 1.50689650482350e+00, 1.49593079487048e+00,\n                                                1.48643075383181e+00, 1.47827843685780e+00, 1.47135519791559e+00, 1.46554290759889e+00, 1.46072507454941e+00,\n                                                1.45678790637193e+00, 1.45362133424736e+00, 1.45112001159560e+00, 1.44918428280346e+00, 1.44772110470267e+00,\n                                                1.44664489241285e+00, 1.44587825333756e+00, 1.44535256917812e+00, 1.44500838611365e+00, 1.44479557769945e+00,\n                                                1.44467325309667e+00, 1.44460939417193e+00, 1.44458021776722e+00, 1.44456927289525e+00, 1.44456629564403e+00,\n                                                1.44456585620869e+00, 1.44456581675976e+00, 1.44456503635667e+00, 1.44455974902935e+00, 1.44454031253164e+00,\n                                                1.44448850409126e+00, 1.44437513337658e+00, 1.44415805623957e+00, 1.44378068664540e+00, 1.44317110434673e+00,\n                                                1.44224185504925e+00, 1.44089053571259e+00, 1.43900124729773e+00, 1.43644697754648e+00, 1.43309294440526e+00,\n                                                1.42880088453204e+00, 1.42343421051939e+00, 1.41686388663990e+00, 1.40897479007223e+00, 1.39967223914672e+00,\n                                                1.38888829084129e+00, 1.37658734702341e+00, 1.36277057448786e+00, 1.34747865012277e+00, 1.33079240205307e+00,\n                                                1.31283104149226e+00, 1.29374787480562e+00, 1.27372364694841e+00, 1.25295797353328e+00, 1.23165962207008e+00,\n                                                1.21003663331976e+00, 1.18828735460496e+00, 1.16659333533719e+00, 1.14511471331509e+00, 1.12398826946837e+00,\n                                                1.10332786877411e+00, 1.08322665869953e+00, 1.06376023995989e+00, 1.04499006324651e+00, 1.02696648537220e+00,\n                                                1.00973115769586e+00, 9.93318645327305e-01, 9.77757342376844e-01, 9.63069842539415e-01, 9.49272954426428e-01,\n                                                9.36377536944962e-01, 9.24388292530395e-01, 9.13303611771202e-01, 9.03115522536762e-01, 8.93809765294286e-01,\n                                                8.85365995100532e-01, 8.77758098659841e-01, 8.70954609683638e-01, 8.64919205207160e-01, 8.59611267441474e-01,\n                                                8.54986498568877e-01, 8.50997578541859e-01, 8.47594857778219e-01, 8.44727077369253e-01, 8.42342109006301e-01,\n                                                8.40387705437838e-01, 8.38812250170440e-01, 8.37565492669695e-01, 8.36599252881463e-01, 8.35868076857961e-01,\n                                                8.35329823979343e-01, 8.34946165988777e-01, 8.34682978992921e-01, 8.34510611796006e-01, 8.34404017386399e-01,\n                                                8.34342738914636e-01, 8.34310746821348e-01, 8.34296129550390e-01, 8.34290646136639e-01, 8.34289154517904e-01,\n                                                8.34288934358202e-01, 8.34288914063407e-01, 8.34288506667978e-01, 8.34285746508394e-01, 8.34275599935548e-01,\n                                                8.34248553402826e-01, 8.34189365290650e-01, 8.34076022795148e-01, 8.33878949964316e-01, 8.33560510309706e-01,\n                                                8.33074844070454e-01, 8.32368075482218e-01, 8.31378918436078e-01, 8.30039698771458e-01, 8.28277797335504e-01,\n                                                8.26017499426715e-01, 8.23182213503602e-01, 8.19696996079269e-01, 8.15491292454665e-01, 8.10501777107536e-01,\n                                                8.04675156406477e-01, 7.97970783111005e-01, 7.90362929490326e-01, 7.81842575344108e-01, 7.72418588827206e-01,\n                                                7.62118210509456e-01, 7.50986792270098e-01, 7.39086789531733e-01, 7.26496054665169e-01, 7.13305527395319e-01,\n                                                6.99616460427912e-01, 6.85537350613179e-01, 6.71180763288929e-01, 6.56660236789650e-01, 6.42087434677189e-01,\n                                                6.27569677380901e-01, 6.13207937968658e-01, 5.99095335980786e-01, 5.85316116209949e-01, 5.71945062159664e-01,\n                                                5.59047270232121e-01, 5.46678201085532e-01, 5.34883927115722e-01, 5.23701506104780e-01, 5.13159426685828e-01,\n                                                5.03278087770354e-01, 4.94070288847601e-01, 4.85541719649724e-01, 4.77691445688681e-01, 4.70512390959930e-01,\n                                                4.63991821415197e-01, 4.58111833463768e-01, 4.52849851487935e-01, 4.48179137660189e-01, 4.44069316505079e-01,\n                                                4.40486915747496e-01, 4.37395923996123e-01, 4.34758364637666e-01, 4.32534883877894e-01, 4.30685349118496e-01,\n                                                4.29169451829729e-01, 4.27947306865770e-01, 4.26980037934381e-01, 4.26230336882698e-01, 4.25662982824978e-01,\n                                                4.25245306136119e-01, 4.24947582151896e-01, 4.24743340176487e-01, 4.24609575145068e-01, 4.24526851979897e-01,\n                                                4.24479296180044e-01, 4.24454468290449e-01, 4.24443124342199e-01, 4.24438868854915e-01, 4.24437711261021e-01,\n                                                4.24437540402655e-01, 4.24437524120027e-01, 4.24437191487415e-01, 4.24434937856176e-01, 4.24426653323808e-01,\n                                                4.24404570220517e-01, 4.24356244011724e-01, 4.24263701672931e-01, 4.24102795210040e-01, 4.23842795857434e-01,\n                                                4.23446261780320e-01, 4.22869208280680e-01, 4.22061603841744e-01, 4.20968207080849e-01, 4.19529748158745e-01,\n                                                4.17684443058551e-01, 4.15369810549489e-01, 4.12524740424022e-01, 4.09091739358832e-01, 4.05019259851288e-01,\n                                                4.00264000965079e-01, 3.94793059962501e-01, 3.88585813625541e-01, 3.81635418306729e-01, 3.73949837997648e-01,\n                                                3.65552337722828e-01, 3.56481411786605e-01, 3.46790148744635e-01, 3.36545063909098e-01, 3.25824453641726e-01,\n                                                3.14716343383912e-01, 3.03316114564302e-01, 2.91723906032409e-01, 2.80041894744514e-01, 2.68371567917420e-01,\n                                                2.56811103053629e-01, 2.45452970493742e-01, 2.34381863047490e-01, 2.23673037723954e-01, 2.13391126576234e-01,\n                                                2.03589440123457e-01, 1.94309751926516e-01, 1.85582521133190e-01, 1.77427484873638e-01, 1.69854536537967e-01,\n                                                1.62864799796674e-01, 1.56451810847674e-01, 1.50602730885586e-01, 1.45299524810167e-01, 1.40520058352262e-01,\n                                                1.36239082079870e-01, 1.32429085661855e-01, 1.29061018379041e-01, 1.26104881739415e-01, 1.23530207110880e-01,\n                                                1.21306435716349e-01, 1.19403220464653e-01, 1.17790669295328e-01, 1.16439548377469e-01, 1.15321460982207e-01,\n                                                1.14409014479548e-01, 1.13675984006104e-01, 1.13097477212644e-01, 1.12650100423682e-01, 1.12312122810657e-01,\n                                                1.12063632060348e-01, 1.11886672736482e-01, 1.11765357250601e-01, 1.11685939161555e-01, 1.11636839400493e-01,\n                                                1.11608617860457e-01, 1.11593885398324e-01, 1.11587154408598e-01, 1.11584629445694e-01, 1.11583942600582e-01,\n                                                1.11583841223899e-01, 1.11583831189872e-01, 1.11583622294740e-01, 1.11582207007151e-01, 1.11577004375103e-01,\n                                                1.11563136950410e-01, 1.11532792906964e-01, 1.11474697584402e-01, 1.11373722988498e-01, 1.11210665204144e-01,\n                                                1.10962220893681e-01, 1.10601194103575e-01, 1.10096962272520e-01, 1.09416224311971e-01, 1.08524042724142e-01,\n                                                1.07385175136152e-01, 1.05965668255074e-01, 1.04234659949306e-01, 1.02166304962244e-01, 9.97417098991669e-02,\n                                                9.69507378657859e-02, 9.37935273404236e-02, 9.02815682840270e-02, 8.64381948550363e-02, 8.22983900904646e-02,\n                                                7.79078523196546e-02, 7.33213412563369e-02, 6.86003957442605e-02, 6.38105847272765e-02, 5.90185072392480e-02,\n                                                5.42887866788391e-02, 4.96813037026609e-02, 4.52488803487867e-02, 4.10355706905072e-02, 3.70756401548071e-02,\n                                                3.33932387144529e-02, 3.00027042470159e-02, 2.69093804911620e-02, 2.41108040499913e-02, 2.15981071257900e-02,\n                                                1.93574937520928e-02, 1.73716715878030e-02, 1.56211525346457e-02, 1.40853678108588e-02, 1.27435723416145e-02,\n                                                1.15755368033401e-02, 1.05620423906849e-02, 9.68520361647052e-03, 8.92864922844261e-03, 8.27759198101141e-03,\n                                                7.71881588492995e-03, 7.24060585217323e-03, 6.83264028528008e-03, 6.48586279123009e-03, 6.19234523856349e-03,\n                                                5.94515101797022e-03, 5.73820465662322e-03, 5.56617182930452e-03, 5.42435221574422e-03, 5.30858647011101e-03,\n                                                5.21517769137247e-03, 5.14082711942798e-03, 5.08258325799993e-03, 5.03780319053071e-03, 5.00412448628218e-03,\n                                                4.97944578796350e-03, 4.96191394434042e-03, 4.94991542425183e-03, 4.94206974460454e-03, 4.93722277831310e-03,\n                                                4.93443807829763e-03, 4.93298474290427e-03, 4.93232082271788e-03, 4.93207178286781e-03, 4.93200403983707e-03,\n                                                4.93199404117206e-03, 4.93199300976066e-03, 4.93197111523713e-03, 4.93182277896054e-03, 4.93127751415123e-03,\n                                                4.92982430743538e-03, 4.92664536506382e-03, 4.92056253742668e-03, 4.91000078840820e-03, 4.89297397852795e-03,\n                                                4.86709908852490e-03, 4.82964547914300e-03, 4.77762541639848e-03, 4.70793039843365e-03, 4.61751437092595e-03,\n                                                4.50361949838118e-03, 4.36403295125309e-03, 4.19735491640871e-03, 4.00325011692715e-03, 3.78264944476747e-03,\n                                                3.53786696847713e-03, 3.27260231548543e-03, 2.99180994390902e-03, 2.70143421582070e-03, 2.40802978868970e-03,\n                                                2.11830659590362e-03, 1.83865310832054e-03, 1.57469701319712e-03, 1.33095722385335e-03, 1.11062605342838e-03,\n                                                9.15498561143480e-04, 7.46042143420667e-04, 6.01578491545851e-04, 4.80536515635066e-04, 3.80731385098088e-04,\n                                                2.99631264280009e-04, 2.34586233402112e-04, 1.83007790486300e-04, 1.42497313445844e-04, 1.10926385962884e-04,\n                                                8.64734072063555e-05, 6.76231848348863e-05, 5.31403900225769e-05, 4.20309803086383e-05, 3.35041181251938e-05,\n                                                2.69403957435799e-05, 2.18647405425543e-05, 1.79195804737020e-05, 1.48368124985865e-05, 1.24118058568712e-05,\n                                                1.04841956556356e-05, 8.92735579149928e-06, 7.64407673337075e-06, 6.56389538988833e-06, 5.63889147287000e-06,\n                                                4.83765141545689e-06, 4.13901781293191e-06, 3.52733136743666e-06, 2.98983977842227e-06, 2.51586979160834e-06,\n                                                2.09685801166870e-06, 1.72644718787751e-06, 1.40026799400061e-06, 1.11540815517230e-06, 8.69757947441485e-07,\n                                                6.61425751502520e-07, 4.88332739578823e-07, 3.55271367880050e-15, 5.32907051820075e-15, 5.32907051820075e-15,\n                                                3.55271367880050e-15, 3.55271367880050e-15, 5.32907051820075e-15, 3.55271367880050e-15, 3.55271367880050e-15,\n                                                5.32907051820075e-15}),\nmadness::CubicInterpolationTable<double>(grid, {1.30000000000000e+01, 1.29999999741662e+01, 1.29999991753326e+01, 1.29999937631078e+01,  1.29999738670448e+01,\n                                                1.29999208302766e+01, 1.29998047546752e+01, 1.29995824332835e+01, 1.29991957433968e+01,  1.29985705587985e+01,\n                                                1.29976162229038e+01, 1.29962256066835e+01, 1.29942757571629e+01, 1.29916291249823e+01,  1.29881353439310e+01,\n                                                1.29836335223535e+01, 1.29779549964057e+01, 1.29709264884479e+01, 1.29623736100182e+01,  1.29521246469119e+01,\n                                                1.29400145625160e+01, 1.29258891530624e+01, 1.29096092832700e+01, 1.28910551217954e+01,  1.28701302827066e+01,\n                                                1.28467657626817e+01, 1.28209235459383e+01, 1.27925997332417e+01, 1.27618270416147e+01,  1.27286765214427e+01,\n                                                1.26932583506256e+01, 1.26557215927790e+01, 1.26162528477498e+01, 1.25750737751929e+01,  1.25324375311010e+01,\n                                                1.24886242171982e+01, 1.24439354978980e+01, 1.23986885836022e+01, 1.23532098084641e+01,  1.23078280432792e+01,\n                                                1.22628681799589e+01, 1.22186449050263e+01, 1.21754569491140e+01, 1.21335819616534e+01,  1.20932721190648e+01,\n                                                1.20547505345674e+01, 1.20182085011801e+01, 1.19838035685128e+01, 1.19516584294566e+01,  1.19218605748853e+01,\n                                                1.18944626623207e+01, 1.18694835371013e+01, 1.18469098406455e+01, 1.18266981386569e+01,  1.18087775014461e+01,\n                                                1.17930524680818e+01, 1.17794063252382e+01, 1.17677046300991e+01, 1.17577989044931e+01,  1.17495304247963e+01,\n                                                1.17427340294569e+01, 1.17372418637888e+01, 1.17328869805361e+01, 1.17295067151836e+01,  1.17269457575821e+01,\n                                                1.17250588465315e+01, 1.17237130217150e+01, 1.17227893778158e+01, 1.17221842785689e+01,  1.17218100035330e+01,\n                                                1.17215948169609e+01, 1.17214824656542e+01, 1.17214311303814e+01, 1.17214118725812e+01,  1.17214066339769e+01,\n                                                1.17214058607693e+01, 1.17214057549280e+01, 1.17214032553163e+01, 1.17213863200774e+01,  1.17213240643296e+01,\n                                                1.17211581132217e+01, 1.17207949325657e+01, 1.17200993954322e+01, 1.17188898420504e+01,  1.17169348597982e+01,\n                                                1.17139519748782e+01, 1.17096084069000e+01, 1.17035239912897e+01, 1.16952763215068e+01,  1.16844081029587e+01,\n                                                1.16704366430261e+01, 1.16528653267241e+01, 1.16311968452933e+01, 1.16049478556619e+01,  1.15736646529243e+01,\n                                                1.15369393378240e+01, 1.14944258615039e+01, 1.14458552395187e+01, 1.13910491604678e+01,  1.13299311902720e+01,\n                                                1.12625348115021e+01, 1.11890076552308e+01, 1.11096114877443e+01, 1.10247177975122e+01,  1.09347991620173e+01,\n                                                1.08404169160753e+01, 1.07422059412060e+01, 1.06408576004987e+01, 1.05371019213872e+01,  1.04316900700413e+01,\n                                                1.03253779827180e+01, 1.02189117608195e+01, 1.01130151492345e+01, 1.00083791530950e+01,  9.90565364590646e+00,\n                                                9.80544070282575e+00, 9.70828935700175e+00, 9.61469150795026e+00, 9.52507878267084e+00,  9.43982023447428e+00,\n                                                9.35922083794187e+00, 9.28352078668194e+00, 9.21289561917194e+00, 9.14745719093406e+00,  9.08725548763752e+00,\n                                                9.03228124390585e+00, 8.98246930544955e+00, 8.93770265307311e+00, 8.89781699780075e+00,  8.86260585546656e+00,\n                                                8.83182601347416e+00, 8.80520330840475e+00, 8.78243863760040e+00, 8.76321412870238e+00,  8.74719938756941e+00,\n                                                8.73405773736947e+00, 8.72345235116087e+00, 8.71505216876017e+00, 8.70853747821323e+00,  8.70360503481025e+00,\n                                                8.69997258813625e+00, 8.69738269150902e+00, 8.69560567913548e+00, 8.69444171456551e+00,  8.69372183902151e+00,\n                                                8.69330797879720e+00, 8.69309190551410e+00, 8.69299317962987e+00, 8.69295614410726e+00,  8.69294606954383e+00,\n                                                8.69294458255925e+00, 8.69294444140342e+00, 8.69294156357096e+00, 8.69292206584606e+00,  8.69285039034860e+00,\n                                                8.69265933133801e+00, 8.69224121123160e+00, 8.69144049134680e+00, 8.69004812706788e+00,  8.68779794948093e+00,\n                                                8.68436532269103e+00, 8.67936828546858e+00, 8.67237133424553e+00, 8.66289193831191e+00,  8.65040979446902e+00,\n                                                8.63437872596017e+00, 8.61424101008788e+00, 8.58944378430517e+00, 8.55945703862452e+00,  8.52379256255892e+00,\n                                                8.48202308887815e+00, 8.43380077587340e+00, 8.37887410502708e+00, 8.31710225058180e+00,  8.24846600914693e+00,\n                                                8.17307447040358e+00, 8.09116677774717e+00, 8.00310858791134e+00, 7.90938320503324e+00,  7.81057783002370e+00,\n                                                7.70736588078113e+00, 7.60048679976900e+00, 7.49072503539067e+00, 7.37888984555679e+00,  7.26579719847842e+00,\n                                                7.15225443675598e+00, 7.03904772285974e+00, 6.92693180153579e+00, 6.81662141633601e+00,  6.70878379608165e+00,\n                                                6.60403187764416e+00, 6.50291821811283e+00, 6.40592976604721e+00, 6.31348375943277e+00,  6.22592500155970e+00,\n                                                6.14352467132887e+00, 6.06648069629782e+00, 5.99491959317611e+00, 5.92889958585861e+00,  5.86841475581323e+00,\n                                                5.81339996317544e+00, 5.76373629196051e+00, 5.71925680911637e+00, 5.67975247420713e+00,  5.64497808528352e+00,\n                                                5.61465819012841e+00, 5.58849292610784e+00, 5.56616377403442e+00, 5.54733922129956e+00,  5.53168032800060e+00,\n                                                5.51884617885930e+00, 5.50849918607406e+00, 5.50031018694389e+00, 5.49396325835079e+00,  5.48916015106287e+00,\n                                                5.48562423303079e+00, 5.48310382451532e+00, 5.48137481036485e+00, 5.48024242654827e+00,  5.47954213872763e+00,\n                                                5.47913955897596e+00, 5.47892938076719e+00, 5.47883334968155e+00, 5.47879732527971e+00,  5.47878752578535e+00,\n                                                5.47878607940110e+00, 5.47878595068322e+00, 5.47878341685653e+00, 5.47876624983119e+00,  5.47870314237944e+00,\n                                                5.47853492376649e+00, 5.47816679506415e+00, 5.47746183674488e+00, 5.47623607163884e+00,  5.47425534796287e+00,\n                                                5.47123428466268e+00, 5.46683749135716e+00, 5.46068323343440e+00, 5.45234965480023e+00,  5.44138359254533e+00,\n                                                5.42731191709395e+00, 5.40965520844942e+00, 5.38794343741606e+00, 5.36173316724281e+00,  5.33062563665524e+00,\n                                                5.29428494334355e+00, 5.25245543314373e+00, 5.20497733026371e+00, 5.15179963256702e+00,  5.09298935480154e+00,\n                                                5.02873633890136e+00, 4.95935306517504e+00, 4.88526918472638e+00, 4.80702083603857e+00,  4.72523518137238e+00,\n                                                4.64061096605168e+00, 4.55389622395156e+00, 4.46586448312752e+00, 4.37729093152185e+00,  4.28892996461023e+00,\n                                                4.20149535657408e+00, 4.11564399848930e+00, 4.03196377389937e+00, 3.95096574668887e+00,  3.87308047053031e+00,\n                                                3.79865793531835e+00, 3.72797046940673e+00, 3.66121782410024e+00, 3.59853366933268e+00,  3.53999280593772e+00,\n                                                3.48561852413101e+00, 3.43538968363506e+00, 3.38924723634081e+00, 3.34710004188922e+00,  3.30882993119314e+00,\n                                                3.27429604969539e+00, 3.24333856239264e+00, 3.21578183025992e+00, 3.19143717768438e+00,  3.17010536780832e+00,\n                                                3.15157889151716e+00, 3.13564415941274e+00, 3.12208366671906e+00, 3.11067818011203e+00,  3.10120897385377e+00,\n                                                3.09346012099039e+00, 3.08722082434241e+00, 3.08228775227999e+00, 3.07846732668540e+00,  3.07557789604988e+00,\n                                                3.07345171635948e+00, 3.07193665723005e+00, 3.07089755134840e+00, 3.07021711196851e+00,  3.06979635581763e+00,\n                                                3.06955448657802e+00, 3.06942821593011e+00, 3.06937052340181e+00, 3.06934888119724e+00,  3.06934299401688e+00,\n                                                3.06934212508226e+00, 3.06934204826398e+00, 3.06934054182586e+00, 3.06933033550995e+00,  3.06929281637306e+00,\n                                                3.06919280689469e+00, 3.06897395262866e+00, 3.06855487428219e+00, 3.06782626166733e+00,  3.06664908111200e+00,\n                                                3.06485405960864e+00, 3.06224259472999e+00, 3.05858921466971e+00, 3.05364567282026e+00,  3.04714670179309e+00,\n                                                3.03881737015698e+00, 3.02838188188772e+00, 3.01557353827718e+00, 3.00014545452874e+00,  2.98188150311291e+00,\n                                                2.96060686158337e+00, 2.93619749362029e+00, 2.90858790577119e+00, 2.87777660907417e+00,  2.84382887398767e+00,\n                                                2.80687658496510e+00, 2.76711525058102e+00, 2.72479846972847e+00, 2.68023035463057e+00,  2.63375653369831e+00,\n                                                2.58575438248157e+00, 2.53662306020374e+00, 2.48677378513701e+00, 2.43662060386489e+00,  2.38657174458310e+00,\n                                                2.33702153612844e+00, 2.28834284948742e+00, 2.24088007948809e+00, 2.19494280602367e+00,  2.15080040872541e+00,\n                                                2.10867799932620e+00, 2.06875403444228e+00, 2.03115985886675e+00, 1.99598122495410e+00,  1.96326159024268e+00,\n                                                1.93300678030463e+00, 1.90519047271015e+00, 1.87975993593932e+00, 1.85664153376713e+00,  1.83574564564345e+00,\n                                                1.81697081354151e+00, 1.80020706960810e+00, 1.78533850575309e+00, 1.77224521032521e+00,  1.76080472321934e+00,\n                                                1.75089315923062e+00, 1.74238613093372e+00, 1.73515957564641e+00, 1.72909056222182e+00,  1.72405812605186e+00,\n                                                1.71994415642809e+00, 1.71663433981980e+00, 1.71401914565626e+00, 1.71199482764698e+00,  1.71046440340332e+00,\n                                                1.70933856813109e+00, 1.70853649454480e+00, 1.70798647102792e+00, 1.70762633346121e+00,  1.70740365290968e+00,\n                                                1.70727565109858e+00, 1.70720882766156e+00, 1.70717829663277e+00, 1.70716684357610e+00,  1.70716372808457e+00,\n                                                1.70716326824518e+00, 1.70716322696455e+00, 1.70716241032539e+00, 1.70715687749224e+00,  1.70713653847134e+00,\n                                                1.70708232409896e+00, 1.70696368736668e+00, 1.70673652250454e+00, 1.70634160184795e+00,  1.70570362945718e+00,\n                                                1.70473100805379e+00, 1.70331640956168e+00, 1.70133822612086e+00, 1.69866295428499e+00,  1.69514852695722e+00,\n                                                1.69064855340695e+00, 1.68501735761726e+00, 1.67811562267453e+00, 1.66981636142119e+00,  1.66001085296138e+00,\n                                                1.64861412629651e+00, 1.63556955352471e+00, 1.62085215101573e+00, 1.60447028646016e+00,  1.58646564935784e+00,\n                                                1.56691154300232e+00, 1.54590976191880e+00, 1.52358648477329e+00, 1.50008769658587e+00,  1.47557463172682e+00,\n                                                1.45021960694961e+00, 1.42420242905937e+00, 1.39770737099578e+00, 1.37092056745825e+00,  1.34402761969227e+00,\n                                                1.31721122119282e+00, 1.29064869796540e+00, 1.26450946156899e+00, 1.23895246519627e+00,  1.21412380948003e+00,\n                                                1.19015465810231e+00, 1.16715959926403e+00, 1.14523554086317e+00, 1.12446116990531e+00,  1.10489695299706e+00,\n                                                1.08658561312050e+00, 1.06955299194522e+00, 1.05380919657313e+00, 1.03934993221641e+00,  1.02615793410862e+00,\n                                                1.01420442904021e+00, 1.00345057591080e+00, 9.93848853035839e-01, 9.85344375934467e-01,  9.77876142009547e-01,\n                                                9.71378207545891e-01, 9.65780807840943e-01, 9.61011433347650e-01, 9.56995873911202e-01,  9.53659240067177e-01,\n                                                9.50926965536324e-01, 9.48725789129004e-01, 9.46984707903255e-01, 9.45635887245258e-01,  9.44615508170603e-01,\n                                                9.43864528125616e-01, 9.43329329340200e-01, 9.42962228640626e-01, 9.42721824686243e-01,  9.42573162765450e-01,\n                                                9.42487703298195e-01, 9.42443087603959e-01, 9.42422702747043e-01, 9.42415055751765e-01,  9.42412975590088e-01,\n                                                9.42412668562815e-01, 9.42412640260381e-01, 9.42412072120561e-01, 9.42408222898010e-01,  9.42394072873196e-01,\n                                                9.42356355058216e-01, 9.42273815393571e-01, 9.42115760648639e-01, 9.41840960279574e-01,  9.41396965945390e-01,\n                                                9.40719908964818e-01, 9.39734830571760e-01, 9.38356590942096e-01, 9.36491389066147e-01,  9.34038905255498e-01,\n                                                9.30895050538480e-01, 9.26955272407119e-01, 9.22118325481396e-01, 9.16290371161635e-01,  9.09389226136184e-01,\n                                                9.01348540760255e-01, 8.92121660584372e-01, 8.81684913426568e-01, 8.70040075156981e-01,  8.57215802683667e-01,\n                                                8.43267882551091e-01, 8.28278224677581e-01, 8.12352626015089e-01, 7.95617428117907e-01,  7.78215283658691e-01,\n                                                7.60300317756446e-01, 7.42033010810028e-01, 7.23575134983548e-01, 7.05085046860223e-01,  6.86713580045589e-01,\n                                                6.68600703978440e-01, 6.50873031228791e-01, 6.33642176850532e-01, 6.17003908862040e-01,  6.01037983644625e-01,\n                                                5.85808534948391e-01, 5.71364878057873e-01, 5.57742597368264e-01, 5.44964801415938e-01,  5.33043449924515e-01,\n                                                5.21980679231570e-01, 5.11770073205090e-01, 5.02397845088520e-01, 4.93843911028749e-01,  4.86082848245610e-01,\n                                                4.79084740084803e-01, 4.72815916885484e-01, 4.67239606055161e-01, 4.62316507330916e-01,  4.58005310230584e-01,\n                                                4.54263170426154e-01, 4.51046160425102e-01, 4.48309707709047e-01, 4.46009030517533e-01,  4.44099577938234e-01,\n                                                4.42537477044448e-01, 4.41279985702900e-01, 4.40285945585432e-01, 4.39516226111619e-01,  4.38934146796463e-01,\n                                                4.38505863043513e-01, 4.38200699041563e-01, 4.37991411262162e-01, 4.37854367193488e-01,  4.37769626352550e-01,\n                                                4.37720914145094e-01, 4.37695483537810e-01, 4.37683864438323e-01, 4.37679505770404e-01,  4.37678320112472e-01,\n                                                4.37678145112042e-01, 4.37678128434678e-01, 4.37677787738266e-01, 4.37675479476976e-01,  4.37666994169552e-01,\n                                                4.37644376263883e-01, 4.37594881632892e-01, 4.37500109210021e-01, 4.37335348333841e-01,  4.37069182861164e-01,\n                                                4.36663392079153e-01, 4.36073185923767e-01, 4.35247806743991e-01, 4.34131520486744e-01,  4.32665005515949e-01,\n                                                4.30787126593581e-01, 4.28437054942481e-01, 4.25556664035371e-01, 4.22093097419122e-01,  4.18001373414029e-01,\n                                                4.13246866814033e-01, 4.07807494898186e-01, 4.01675438547828e-01, 3.94858251610470e-01,  3.87379252657164e-01,\n                                                3.79277149522757e-01, 3.70604912083573e-01, 3.61427974169839e-01, 3.51821902363454e-01,  3.41869709919962e-01,\n                                                3.31659013078234e-01, 3.21279223075681e-01, 3.10818942498663e-01, 3.00363694518763e-01,  2.89994065378947e-01,\n                                                2.79784291919817e-01, 2.69801283672729e-01, 2.60104037646668e-01, 2.50743385260691e-01,  2.41762004205015e-01,\n                                                2.33194630726800e-01, 2.25068416386408e-01, 2.17403384237652e-01, 2.10212949960875e-01,  2.03504482148606e-01,\n                                                1.97279882210891e-01, 1.91536168513734e-01, 1.86266052072037e-01, 1.81458493133350e-01,  1.77099229895052e-01,\n                                                1.73171272723817e-01, 1.69655359669511e-01, 1.66530371675023e-01, 1.63773708463786e-01,  1.61361628391868e-01,\n                                                1.59269557361364e-01, 1.57472373043392e-01, 1.55944671060530e-01, 1.54661019412591e-01,  1.53596206346510e-01,\n                                                1.52725485181499e-01, 1.52024817465765e-01, 1.51471113459044e-01, 1.51042466528956e-01,  1.50718375848264e-01,\n                                                1.50479950001403e-01, 1.50310082937150e-01, 1.50193593272839e-01, 1.50117318329162e-01,  1.50070155442720e-01,\n                                                1.50043044978608e-01, 1.50028891891962e-01, 1.50022425462412e-01, 1.50019999719076e-01,  1.50019339861627e-01,\n                                                1.50019242468177e-01, 1.50019232828402e-01, 1.50019032140985e-01, 1.50017672459265e-01,  1.50012674201006e-01,\n                                                1.49999351260197e-01, 1.49970197276049e-01, 1.49914375195852e-01, 1.49817335442350e-01,  1.49660588172106e-01,\n                                                1.49421655024339e-01, 1.49074224753061e-01, 1.48588534375458e-01, 1.47931992062269e-01,  1.47070049150173e-01,\n                                                1.45967315884491e-01, 1.44588898836936e-01, 1.42901918132395e-01, 1.40877141224784e-01,  1.38490649332088e-01,\n                                                1.35725435679435e-01, 1.32572824450987e-01, 1.29033598445357e-01, 1.25118733507179e-01,  1.20849659092331e-01,\n                                                1.16257995455939e-01, 1.11384756149199e-01, 1.06279045997821e-01, 1.00996325290081e-01,  9.55963463791978e-02,\n                                                9.01408956269716e-02, 8.46914886857775e-02, 7.93071686929920e-02, 7.40425445658275e-02,  6.89461814071297e-02,\n                                                6.40594199580651e-02, 5.94156614056889e-02, 5.50401128037077e-02, 5.09499518959462e-02,  4.71548422054546e-02,\n                                                4.36577121449808e-02, 4.04557059959707e-02, 3.75412185941233e-02, 3.49029370022151e-02,  3.25268284041123e-02,\n                                                3.03970310802217e-02, 2.84966223148793e-02, 2.68082518593982e-02, 2.53146412872720e-02,  2.39989580063220e-02,\n                                                2.28450780559122e-02, 2.18377546028172e-02, 2.09627098556080e-02, 2.02066675389645e-02,  1.95573416228587e-02,\n                                                1.90033950889568e-02, 1.85343804227536e-02, 1.81406714253605e-02, 1.78133939424541e-02,  1.75443612512147e-02,\n                                                1.73260181350887e-02, 1.71513961025980e-02, 1.70140807630172e-02, 1.69081910626456e-02,  1.68283689327797e-02,\n                                                1.67697769398281e-02, 1.67281008052775e-02, 1.66995532214980e-02, 1.66808752601622e-02,  1.66693318613813e-02,\n                                                1.66626983831470e-02, 1.66592359303888e-02, 1.66576540944927e-02, 1.66570607235474e-02,  1.66568993151248e-02,\n                                                1.66568754916838e-02, 1.66568730342096e-02, 1.66568208677340e-02, 1.66564674359613e-02,  1.66551682397920e-02,\n                                                1.66517054932562e-02, 1.66441295561555e-02, 1.66296291534156e-02, 1.66044391709086e-02,  1.65637960939709e-02,\n                                                1.65019523724030e-02, 1.64122616431648e-02, 1.62873461615742e-02, 1.61193552607219e-02,  1.59003185271871e-02,\n                                                1.56225892583510e-02, 1.52793627448293e-02, 1.48652407834309e-02, 1.43768001739470e-02,  1.38131111693358e-02,\n                                                1.31761448155014e-02, 1.24710086664575e-02, 1.17059605190324e-02, 1.08921700001687e-02,  1.00432263059673e-02,\n                                                9.17442313711447e-03, 8.30188327090298e-03, 7.44160922416981e-03, 6.60855816672701e-03,  5.81583608506087e-03,\n                                                5.07408857085956e-03, 4.39113667759017e-03, 3.77187124650291e-03, 3.21838429683652e-03,  2.73028800453901e-03,\n                                                2.30515575971602e-03, 1.93901811817554e-03, 1.62685708637866e-03, 1.36305905697398e-03,  1.14180272569087e-03,\n                                                9.57369302213351e-04, 8.04369112595182e-04, 6.77885134553691e-04, 5.73542454223031e-04,  4.87521101753430e-04,\n                                                4.16533691291576e-04, 3.57786316728337e-04, 3.08933562537916e-04, 2.68031417681058e-04,  2.33488868197185e-04,\n                                                2.04019527574317e-04, 1.78595906902501e-04, 1.56408635641370e-04, 1.36831239018420e-04,  1.19389444089180e-04,\n                                                1.03733507771153e-04, 8.96126557261567e-05, 7.68516187310553e-05, 6.53297987600610e-05,  5.49636257840547e-05,\n                                                4.56923721312563e-05, 3.74673369343270e-05, 3.02440538888504e-05, 2.39770447851839e-05,  1.86166095961227e-05,\n                                                1.41071713084528e-05, 1.03867534910762e-05, 7.38724410709324e-06, 5.03517965810829e-06,  3.25286154989612e-06,\n                                                1.95968440230843e-06, 1.07361261392214e-06, 5.12788249196205e-07, -1.77635683940025e-15, 1.77635683940025e-15,\n                                                -1.77635683940025e-15}),\nmadness::CubicInterpolationTable<double>(grid, {1.40000000000000e+01, 1.39999999711788e+01, 1.39999990799714e+01, 1.39999930418986e+01, 1.39999708451325e+01,\n                                                1.39999116753839e+01, 1.39997821771393e+01, 1.39995341468479e+01, 1.39991027397948e+01, 1.39984052557468e+01,\n                                                1.39973405496996e+01, 1.39957890940769e+01, 1.39936136985864e+01, 1.39906608747483e+01, 1.39867628149912e+01,\n                                                1.39817399420952e+01, 1.39754039742523e+01, 1.39675614442038e+01, 1.39580176072961e+01, 1.39465806716726e+01,\n                                                1.39330662824721e+01, 1.39173021887858e+01, 1.38991330152980e+01, 1.38784250486586e+01, 1.38550709314578e+01,\n                                                1.38289941354089e+01, 1.38001530627893e+01, 1.37685446054843e+01, 1.37342069790134e+01, 1.36972216494740e+01,\n                                                1.36577141880489e+01, 1.36158539222001e+01, 1.35718523039199e+01, 1.35259599797245e+01, 1.34784626184894e+01,\n                                                1.34296756244333e+01, 1.33799379260570e+01, 1.33296050811574e+01, 1.32790419686830e+01, 1.32286153482225e+01,\n                                                1.31786865580155e+01, 1.31296045954744e+01, 1.30816997848156e+01, 1.30352781897385e+01, 1.29906168803002e+01,\n                                                1.29479601166064e+01, 1.29075164709223e+01, 1.28694568762258e+01, 1.28339135637830e+01, 1.28009798346583e+01,\n                                                1.27707105991283e+01, 1.27431236122429e+01, 1.27182013316601e+01, 1.26958933238311e+01, 1.26761191453376e+01,\n                                                1.26587716267172e+01, 1.26437204858364e+01, 1.26308161965307e+01, 1.26198940358620e+01, 1.26107782302674e+01,\n                                                1.26032861175774e+01, 1.25972322390058e+01, 1.25924322734299e+01, 1.25887067262600e+01, 1.25858842875110e+01,\n                                                1.25838047787804e+01, 1.25823216169421e+01, 1.25813037335146e+01, 1.25806369026537e+01, 1.25802244471327e+01,\n                                                1.25799873099082e+01, 1.25798634981901e+01, 1.25798069265166e+01, 1.25797857043546e+01, 1.25797799313955e+01,\n                                                1.25797790793182e+01, 1.25797789626809e+01, 1.25797762081007e+01, 1.25797575454159e+01, 1.25796889394281e+01,\n                                                1.25795060611739e+01, 1.25791058372016e+01, 1.25783393627804e+01, 1.25770064648050e+01, 1.25748521677202e+01,\n                                                1.25715652782996e+01, 1.25667792616958e+01, 1.25600755306520e+01, 1.25509892109625e+01, 1.25390173782349e+01,\n                                                1.25236296831985e+01, 1.25042811950278e+01, 1.24804271946098e+01, 1.24515395430363e+01, 1.24171241364817e+01,\n                                                1.23767388406716e+01, 1.23300111834889e+01, 1.22766549850531e+01, 1.22164850386123e+01, 1.21494289449822e+01,\n                                                1.20755352706520e+01, 1.19949773617471e+01, 1.19080524059852e+01, 1.18151756762233e+01, 1.17168702743998e+01,\n                                                1.16137530689888e+01, 1.15065178217140e+01, 1.13959166778574e+01, 1.12827412189857e+01, 1.11678041482601e+01,\n                                                1.10519224289177e+01, 1.09359023812461e+01, 1.08205269263142e+01, 1.07065449027517e+01, 1.05946622132355e+01,\n                                                1.04855344915328e+01, 1.03797610057675e+01, 1.02778795983405e+01, 1.01803625698104e+01, 1.00876135085724e+01,\n                                                9.99996512707147e+00, 9.91767817994804e+00, 9.84094151507478e+00, 9.76987325923474e+00, 9.70452308377950e+00,\n                                                9.64487544719209e+00, 9.59085368044240e+00, 9.54232476995964e+00, 9.49910469899052e+00, 9.46096422487242e+00,\n                                                9.42763499035694e+00, 9.39881588563239e+00, 9.37417959015739e+00, 9.35337922803504e+00, 9.33605506748826e+00,\n                                                9.32184118544349e+00, 9.31037200452202e+00, 9.30128859449058e+00, 9.29424461610801e+00, 9.28891177479916e+00,\n                                                9.28498464677669e+00, 9.28218474265776e+00, 9.28026368416729e+00, 9.27900538833176e+00, 9.27822718005715e+00,\n                                                9.27777978687639e+00, 9.27754620711398e+00, 9.27743948254512e+00, 9.27739944646732e+00, 9.27738855568272e+00,\n                                                9.27738694822570e+00, 9.27738679563371e+00, 9.27738368464525e+00, 9.27736260725787e+00, 9.27728512480987e+00,\n                                                9.27707858703025e+00, 9.27662659419373e+00, 9.27576101232203e+00, 9.27425587861390e+00, 9.27182350575582e+00,\n                                                9.26811305973085e+00, 9.26271184315138e+00, 9.25514946104096e+00, 9.24490497420334e+00, 9.23141705328769e+00,\n                                                9.21409703239492e+00, 9.19234462503556e+00, 9.16556591106845e+00, 9.13319303803596e+00, 9.09470491454812e+00,\n                                                9.04964802033133e+00, 8.99765633255998e+00, 8.93846928791365e+00, 8.87194668269855e+00, 8.79807947937105e+00,\n                                                8.71699565798264e+00, 8.62896054310406e+00, 8.53437145413837e+00, 8.43374704222851e+00, 8.32771221710784e+00,\n                                                8.21698001478551e+00, 8.10233198104330e+00, 7.98459855960549e+00, 7.86464059082536e+00, 7.74333247398621e+00,\n                                                7.62154701624596e+00, 7.50014165348462e+00, 7.37994565576512e+00, 7.26174808156083e+00, 7.14628650495194e+00,\n                                                7.03423678288065e+00, 6.92620426903225e+00, 6.82271688841457e+00, 6.72422038202336e+00, 6.63107586000266e+00,\n                                                6.54355961465659e+00, 6.46186498162508e+00, 6.38610592241826e+00, 6.31632194236710e+00, 6.25248395085554e+00,\n                                                6.19450070415491e+00, 6.14222553109889e+00, 6.09546311435946e+00, 6.05397617359796e+00, 6.01749196273565e+00,\n                                                5.98570854660039e+00, 5.95830085957915e+00, 5.93492657011820e+00, 5.91523178101822e+00, 5.89885658861432e+00,\n                                                5.88544050695842e+00, 5.87462773929810e+00, 5.86607225193357e+00, 5.85944257838563e+00, 5.85442625797487e+00,\n                                                5.85073379523978e+00, 5.84810201733981e+00, 5.84629670714017e+00, 5.84511440058011e+00, 5.84438325774290e+00,\n                                                5.84396294641856e+00, 5.84374351276081e+00, 5.84364325324758e+00, 5.84360564269154e+00, 5.84359541173186e+00,\n                                                5.84359390166449e+00, 5.84359376727927e+00, 5.84359112189041e+00, 5.84357319902074e+00, 5.84350731309233e+00,\n                                                5.84333168874969e+00, 5.84294735618320e+00, 5.84221137853029e+00, 5.84093171122916e+00, 5.83886397647195e+00,\n                                                5.83571041501476e+00, 5.83112124845474e+00, 5.82469864247534e+00, 5.81600339998210e+00, 5.80456442769833e+00,\n                                                5.78989090769180e+00, 5.77148696642566e+00, 5.74886847210647e+00, 5.72158141462225e+00, 5.68922114402628e+00,\n                                                5.65145158010356e+00, 5.60802337661126e+00, 5.55878994984200e+00, 5.50372028142204e+00, 5.44290749492477e+00,\n                                                5.37657239326332e+00, 5.30506142745267e+00, 5.22883893345037e+00, 5.14847389493542e+00, 5.06462192548338e+00,\n                                                4.97800356344817e+00, 4.88938028398992e+00, 4.79952980876391e+00, 4.70922230518878e+00, 4.61919890888453e+00,\n                                                4.53015369725918e+00, 4.44271983585994e+00, 4.35746017338775e+00, 4.27486213989430e+00, 4.19533645917298e+00,\n                                                4.11921895501620e+00, 4.04677462312948e+00, 3.97820314605361e+00, 3.91364512198408e+00, 3.85318842676534e+00,\n                                                3.79687429834545e+00, 3.74470289697627e+00, 3.69663823353556e+00, 3.65261246297322e+00, 3.61252960854223e+00,\n                                                3.57626881935108e+00, 3.54368727612526e+00, 3.51462285590077e+00, 3.48889665282184e+00, 3.46631543462581e+00,\n                                                3.44667409610788e+00, 3.42975815343614e+00, 3.41534630693797e+00, 3.40321308451584e+00, 3.39313156260692e+00,\n                                                3.38487614619933e+00, 3.37822537388075e+00, 3.37296469870530e+00, 3.36888918170748e+00, 3.36580602331729e+00,\n                                                3.36353684996815e+00, 3.36191966995341e+00, 3.36081041489264e+00, 3.36008399138758e+00, 3.35963478142007e+00,\n                                                3.35937654906328e+00, 3.35924173394406e+00, 3.35918013704532e+00, 3.35915703012307e+00, 3.35915074449894e+00,\n                                                3.35914981675467e+00, 3.35914973473731e+00, 3.35914812634303e+00, 3.35913722925586e+00, 3.35909717072129e+00,\n                                                3.35899039176139e+00, 3.35875672072441e+00, 3.35830925911074e+00, 3.35753126468354e+00, 3.35627420811900e+00,\n                                                3.35435716800824e+00, 3.35156771179555e+00, 3.34766438325014e+00, 3.34238087606224e+00, 3.33543191444861e+00,\n                                                3.32652078322225e+00, 3.31534835243347e+00, 3.30162333011122e+00, 3.28507335999234e+00, 3.26545647284031e+00,\n                                                3.24257231631337e+00, 3.21627254584563e+00, 3.18646977065314e+00, 3.15314452021217e+00, 3.11634982196513e+00,\n                                                3.07621314315615e+00, 3.03293562122610e+00, 2.98678865669261e+00, 2.93810804340253e+00, 2.88728585197258e+00,\n                                                2.83476027465644e+00, 2.78100362040765e+00, 2.72650867171575e+00, 2.67177373260892e+00, 2.61728693326373e+00,\n                                                2.56351067682721e+00, 2.51086741598364e+00, 2.45972808364929e+00, 2.41040434504613e+00, 2.36314535323844e+00,\n                                                2.31813898113997e+00, 2.27551678225357e+00, 2.23536142403092e+00, 2.19771517295211e+00, 2.16258817980906e+00,\n                                                2.12996569711939e+00, 2.09981380209087e+00, 2.07208357437822e+00, 2.04671392729695e+00, 2.02363341067884e+00,\n                                                2.00276132314805e+00, 1.98400843094896e+00, 1.96727752387412e+00, 1.95246396945360e+00, 1.93945636661082e+00,\n                                                1.92813735371569e+00, 1.91838459289768e+00, 1.91007192998533e+00, 1.90307071437876e+00, 1.89725125278383e+00,\n                                                1.89248436303016e+00, 1.88864298794068e+00, 1.88560382388788e+00, 1.88324891424803e+00, 1.88146715477642e+00,\n                                                1.88015565646671e+00, 1.87922091223810e+00, 1.87857971721960e+00, 1.87815979867729e+00, 1.87790012070264e+00,\n                                                1.87775084031215e+00, 1.87767290500548e+00, 1.87763729629322e+00, 1.87762393832860e+00, 1.87762030464709e+00,\n                                                1.87761976832363e+00, 1.87761972017687e+00, 1.87761876770763e+00, 1.87761231459942e+00, 1.87758859245686e+00,\n                                                1.87752535920816e+00, 1.87738698125235e+00, 1.87712199566633e+00, 1.87666126091603e+00, 1.87591679865000e+00,\n                                                1.87478142155502e+00, 1.87312923110802e+00, 1.87081705201421e+00, 1.86768684464608e+00, 1.86356910074074e+00,\n                                                1.85828717994173e+00, 1.85166248639081e+00, 1.84352031905525e+00, 1.83369616337947e+00, 1.82204213435504e+00,\n                                                1.80843324264060e+00, 1.79277314528399e+00, 1.77499906626065e+00, 1.75508562824226e+00, 1.73304741691425e+00,\n                                                1.70894018780608e+00, 1.68286070607238e+00, 1.65494526890468e+00, 1.62536699406117e+00, 1.59433197277834e+00,\n                                                1.56207439517681e+00, 1.52885077640767e+00, 1.49493345117105e+00, 1.46060356098436e+00, 1.42614382017961e+00,\n                                                1.39183139476954e+00, 1.35793124592979e+00, 1.32469026705783e+00, 1.29233248057152e+00, 1.26105546764120e+00,\n                                                1.23102809666375e+00, 1.20238951152772e+00, 1.17524925286333e+00, 1.14968832355004e+00, 1.12576097690097e+00,\n                                                1.10349700021417e+00, 1.08290428240631e+00, 1.06397148527951e+00, 1.04667067664895e+00, 1.03095982414857e+00,\n                                                1.01678508664627e+00, 1.00408287306538e+00, 9.92781664659740e-01, 9.82803616114875e-01, 9.74065963636441e-01,\n                                                9.66482275208765e-01, 9.59963580379828e-01, 9.54419415181984e-01, 9.49758812991686e-01, 9.45891265052168e-01,\n                                                9.42727665753257e-01, 9.40181248273738e-01, 9.38168506526885e-01, 9.36610090191703e-01, 9.35431651631758e-01,\n                                                9.34564617322380e-01, 9.33946852550632e-01, 9.33523186988605e-01, 9.33245770430890e-01, 9.33074232449886e-01,\n                                                9.32975626629297e-01, 9.32924148835886e-01, 9.32900628967550e-01, 9.32891805975991e-01, 9.32889405919978e-01,\n                                                9.32889051677160e-01, 9.32889019022296e-01, 9.32888363512397e-01, 9.32883922349461e-01, 9.32867596360847e-01,\n                                                9.32824078775992e-01, 9.32728849250930e-01, 9.32546502609476e-01, 9.32229491910741e-01, 9.31717364290533e-01,\n                                                9.30936565920653e-01, 9.29800887630602e-01, 9.28212613002257e-01, 9.26064413670131e-01, 9.23242009980591e-01,\n                                                9.19627577704574e-01, 9.15103833121888e-01, 9.09558671323476e-01, 9.02890170044289e-01, 8.95011710039686e-01,\n                                                8.85856911137111e-01, 8.75384049827172e-01, 8.63579618439914e-01, 8.50460714336862e-01, 8.36076013003611e-01,\n                                                8.20505178953960e-01, 8.03856694393380e-01, 7.86264223494589e-01, 7.67881762029512e-01, 7.48877929390872e-01,\n                                                7.29429827061235e-01, 7.09716904961233e-01, 6.89915243819614e-01, 6.70192585310508e-01, 6.50704336486079e-01,\n                                                6.31590658698597e-01, 6.12974641041490e-01, 5.94961467941410e-01, 5.77638427869289e-01, 5.61075577197705e-01,\n                                                5.45326867030317e-01, 5.30431555194053e-01, 5.16415753097878e-01, 5.03293990765901e-01, 4.91070717383232e-01,\n                                                4.79741685304736e-01, 4.69295190597169e-01, 4.59713162181133e-01, 4.50972104866361e-01, 4.43043909942411e-01,\n                                                4.35896551607728e-01, 4.29494689462427e-01, 4.23800197445262e-01, 4.18772638620725e-01, 4.14369703550285e-01,\n                                                4.10547627855026e-01, 4.07261602104326e-01, 4.04466184377606e-01, 4.02115722745759e-01, 4.00164791520318e-01,\n                                                3.98568641476940e-01, 3.97283660486051e-01, 3.96267837249008e-01, 3.95481217364967e-01, 3.94886337997630e-01,\n                                                3.94448625233734e-01, 3.94136737061434e-01, 3.93922834921181e-01, 3.93782768079813e-01, 3.93696157624049e-01,\n                                                3.93646370521662e-01, 3.93620378707180e-01, 3.93608503184023e-01, 3.93604048322169e-01, 3.93602836497097e-01,\n                                                3.93602657634451e-01, 3.93602640589027e-01, 3.93602292373524e-01, 3.93599933169279e-01, 3.93591260590084e-01,\n                                                3.93568143485986e-01, 3.93517556368076e-01, 3.93420691688675e-01, 3.93252292316163e-01, 3.92980245933384e-01,\n                                                3.92565481932804e-01, 3.91962208689497e-01, 3.91118523593979e-01, 3.89977418546703e-01, 3.88478188546054e-01,\n                                                3.86558229836997e-01, 3.84155187008853e-01, 3.81209376845701e-01, 3.77666383473025e-01, 3.73479688589148e-01,\n                                                3.68613177403201e-01, 3.63043350466898e-01, 3.56761077960297e-01, 3.49772757998393e-01, 3.42100782871313e-01,\n                                                3.33783272178829e-01, 3.24873092228085e-01, 3.15436238223459e-01, 3.05549701707994e-01, 2.95298974850313e-01,\n                                                2.84775353486639e-01, 2.74073193965899e-01, 2.63287259234163e-01, 2.52510262925131e-01, 2.41830691840878e-01,\n                                                2.31330960923135e-01, 2.21085932447142e-01, 2.11161812797972e-01, 2.01615424883791e-01, 1.92493840887805e-01,\n                                                1.83834347981922e-01, 1.75664708821994e-01, 1.68003669687899e-01, 1.60861662834852e-01, 1.54241646673999e-01,\n                                                1.48140028097867e-01, 1.42547615414927e-01, 1.37450557324541e-01, 1.32831232233107e-01, 1.28669061974657e-01,\n                                                1.24941233718163e-01, 1.21623322769324e-01, 1.18689816591514e-01, 1.16114546396824e-01, 1.13871037004731e-01,\n                                                1.11932788386472e-01, 1.10273503550196e-01, 1.08867277366805e-01, 1.07688759799895e-01, 1.06713305002504e-01,\n                                                1.05917115096480e-01, 1.05277384379182e-01, 1.04772446434502e-01, 1.04381923394591e-01, 1.04086873639186e-01,\n                                                1.03869931752740e-01, 1.03715432777300e-01, 1.03609511843990e-01, 1.03540170211977e-01, 1.03497299585314e-01,\n                                                1.03472658225172e-01, 1.03459794662855e-01, 1.03453917525695e-01, 1.03451712862144e-01, 1.03451113145256e-01,\n                                                1.03451024628482e-01, 1.03451015867300e-01, 1.03450833471078e-01, 1.03449597716327e-01, 1.03445055048269e-01,\n                                                1.03432946709120e-01, 1.03406451690526e-01, 1.03355725063706e-01, 1.03267556406752e-01, 1.03125174178439e-01,\n                                                1.02908222820545e-01, 1.02592939282291e-01, 1.02152553506068e-01, 1.01557932063962e-01, 1.00778474571962e-01,\n                                                9.97832580738294e-02, 9.85424052467145e-02, 9.70286288804445e-02, 9.52188795012745e-02, 9.30959981702166e-02,\n                                                9.06502561256914e-02, 8.78806511546575e-02, 8.47958311265824e-02, 8.14145306338645e-02, 7.77654378729995e-02,\n                                                7.38864540578810e-02, 6.98233624953222e-02, 6.56279824894579e-02, 6.13559366813252e-02, 5.70642014488865e-02,\n                                                5.28086321939139e-02, 4.86416550710977e-02, 4.46102939087716e-02, 4.07546593885346e-02, 3.71069736893563e-02,\n                                                3.36911461333766e-02, 3.05228622409803e-02, 2.76101067345937e-02, 2.49540144356395e-02, 2.25499326305592e-02,\n                                                2.03885826007113e-02, 1.84572230449440e-02, 1.67407397042680e-02, 1.52226093909071e-02, 1.38857093901485e-02,\n                                                1.27129625292870e-02, 1.16878229380895e-02, 1.07946174733122e-02, 1.00187634265314e-02, 9.34688531661187e-03,\n                                                8.76685323147441e-03, 8.26776322337075e-03, 7.83987743252723e-03, 7.47453848971524e-03, 7.16406971774042e-03,\n                                                6.90166993661734e-03, 6.68130937341616e-03, 6.49763129548475e-03, 6.34586248685309e-03, 6.22173450811658e-03,\n                                                6.12141674909594e-03, 6.04146153277618e-03, 5.97876090465910e-03, 5.93051420733737e-03, 5.89420508106819e-03,\n                                                5.86758615079930e-03, 5.84866937484207e-03, 5.83571986354769e-03, 5.82725094816894e-03, 5.82201840223640e-03,\n                                                5.81901198638413e-03, 5.81744288209052e-03, 5.81672606310768e-03, 5.81645717860368e-03, 5.81638403729912e-03,\n                                                5.81637324185991e-03, 5.81637212827424e-03, 5.81634848945711e-03, 5.81618833530051e-03, 5.81559962607159e-03,\n                                                5.81403060762931e-03, 5.81059818949647e-03, 5.80402983147010e-03, 5.79262344911768e-03, 5.77423071340633e-03,\n                                                5.74626994422012e-03, 5.70577525153126e-03, 5.64948823311440e-03, 5.57399692237937e-03, 5.47592337752079e-03,\n                                                5.35215609043149e-03, 5.20011640994333e-03, 5.01804007169149e-03, 4.80524695591988e-03, 4.56236612881789e-03,\n                                                4.29148108402622e-03, 3.99616365868560e-03, 3.68137524069745e-03, 3.35323003332633e-03, 3.01863498658506e-03,\n                                                2.68484076722331e-03, 2.35895346993331e-03, 2.04746403623091e-03, 1.75584981608168e-03, 1.48829108655057e-03,\n                                                1.24752734138944e-03, 1.03485737871800e-03, 8.50267081290212e-04, 6.92652280752881e-04, 5.60094021725632e-04,\n                                                4.50142376239526e-04, 3.60073478564260e-04, 2.87099808108593e-04, 2.28529388877519e-04, 1.81878648986000e-04,\n                                                1.44944199439223e-04, 1.15835645202012e-04, 9.29721441860210e-05, 7.50520635701690e-05, 6.10119477091331e-05,\n                                                4.99900683479382e-05, 4.12998914516294e-05, 3.44078733736097e-05, 2.89074689252544e-05, 2.44880442057394e-05,\n                                                2.09055000937042e-05, 1.79626665559596e-05, 1.55014152181110e-05, 1.34013126888988e-05, 1.15776498610387e-05,\n                                                9.97520811196750e-06, 8.55891692452815e-06, 7.30482985744629e-06, 6.19406557333946e-06, 5.21023225807937e-06,\n                                                4.33918549980206e-06, 3.56952225644136e-06, 2.89272273157337e-06, 2.30263501066474e-06, 1.79453396320639e-06,\n                                                1.36413752294118e-06, 1.00685783799292e-06, 7.17386170023815e-07, 4.89575507245377e-07, 1.77635683940025e-14,\n                                                1.59872115546023e-14, 1.59872115546023e-14, 1.77635683940025e-14, 1.77635683940025e-14, 1.59872115546023e-14,\n                                                1.59872115546023e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.50000000000000e+01,  1.49999999680712e+01,  1.49999989807688e+01,  1.49999922916374e+01,\n                                                1.49999677014900e+01,  1.49999021517067e+01,  1.49997586901066e+01,  1.49994839152313e+01,\n                                                1.49990059894632e+01,  1.49982332928837e+01,  1.49970537689349e+01,  1.49953349907826e+01,\n                                                1.49929249549923e+01,  1.49896535880104e+01,  1.49853349322626e+01,  1.49797699634972e+01,\n                                                1.49727499799717e+01,  1.49640604972689e+01,  1.49534855792341e+01,  1.49408125342758e+01,\n                                                1.49258369049333e+01,  1.49083676746973e+01,  1.48882326072609e+01,  1.48652836181388e+01,\n                                                1.48394020567484e+01,  1.48105037502856e+01,  1.47785436326416e+01,  1.47435197574208e+01,\n                                                1.47054764798840e+01,  1.46645065941295e+01,  1.46207522332606e+01,  1.45744043832791e+01,\n                                                1.45257009243177e+01,  1.44749231905980e+01,  1.44223911255524e+01,  1.43684571917995e+01,\n                                                1.43134992681024e+01,  1.42579128195498e+01,  1.42021026581351e+01,  1.41464746170260e+01,\n                                                1.40914274446664e+01,  1.40373451886000e+01,  1.39845902893893e+01,  1.39334975486685e+01,\n                                                1.38843690783035e+01,  1.38374702848052e+01,  1.37930268980038e+01,  1.37512230173726e+01,\n                                                1.37122001236278e+01,  1.36760569865444e+01,  1.36428503907434e+01,  1.36125965976024e+01,\n                                                1.35852734614332e+01,  1.35608231198747e+01,  1.35391551806098e+01,  1.35201503280070e+01,\n                                                1.35036642734893e+01,  1.34895319721350e+01,  1.34775720253452e+01,  1.34675911857680e+01,\n                                                1.34593888766654e+01,  1.34527616342699e+01,  1.34475073791953e+01,  1.34434294223984e+01,\n                                                1.34403401131929e+01,  1.34380640419032e+01,  1.34364407181991e+01,  1.34353266580209e+01,\n                                                1.34345968270800e+01,  1.34341454067407e+01,  1.34338858680065e+01,  1.34337503605049e+01,\n                                                1.34336884448912e+01,  1.34336652180261e+01,  1.34336588997386e+01,  1.34336579671720e+01,\n                                                1.34336578395168e+01,  1.34336548247321e+01,  1.34336343991261e+01,  1.34335593124908e+01,\n                                                1.34333591594980e+01,  1.34329211316453e+01,  1.34320822638747e+01,  1.34306234907944e+01,\n                                                1.34282657931601e+01,  1.34246686755203e+01,  1.34194311694473e+01,  1.34120955019026e+01,\n                                                1.34021535033260e+01,  1.33890557535517e+01,  1.33722233747334e+01,  1.33510622787728e+01,\n                                                1.33249795626711e+01,  1.32934016200412e+01,  1.32557934035628e+01,  1.32116781370160e+01,\n                                                1.31606566465692e+01,  1.31024253748871e+01,  1.30367920799706e+01,  1.29636882289279e+01,\n                                                1.28831771993026e+01,  1.27954576122818e+01,  1.27008614406906e+01,  1.25998469342090e+01,\n                                                1.24929868349317e+01,  1.23809527519976e+01,  1.22644968561411e+01,  1.21444321906697e+01,\n                                                1.20216128521398e+01,  1.18969150874988e+01,  1.17712200351325e+01,  1.16453984772244e+01,\n                                                1.15202976449879e+01,  1.13967298856368e+01,  1.12754628902152e+01,  1.11572111911398e+01,\n                                                1.10426287356323e+01,  1.09323024778315e+01,  1.08267470584505e+01,  1.07264007185795e+01,\n                                                1.06316226063786e+01,  1.05426915867074e+01,  1.04598065757074e+01,  1.03830883237601e+01,\n                                                1.03125824871807e+01,  1.02482637778705e+01,  1.01900409653247e+01,  1.01377625212002e+01,\n                                                1.00912227317170e+01,  1.00501681450412e+01,  1.00143042592260e+01,  9.98330238473926e+00,\n                                                9.95680663131960e+00,  9.93444097203251e+00,  9.91581632998310e+00,  9.90053761818898e+00,\n                                                9.88821064393782e+00,  9.87844876881106e+00,  9.87087919743584e+00,  9.86514875452915e+00,\n                                                9.86092900303109e+00,  9.85792055760838e+00,  9.85585645838590e+00,  9.85450448952044e+00,\n                                                9.85366835548447e+00,  9.85318766326956e+00,  9.85293669914312e+00,  9.85282203168202e+00,\n                                                9.85277901597819e+00,  9.85276731466562e+00,  9.85276558757647e+00,  9.85276542362809e+00,\n                                                9.85276208110990e+00,  9.85273943507823e+00,  9.85265618618295e+00,  9.85243427759499e+00,\n                                                9.85194864826642e+00,  9.85101865670968e+00,  9.84940153973275e+00,  9.84678824112093e+00,\n                                                9.84280190991844e+00,  9.83699932312844e+00,  9.82887542864657e+00,  9.81787112607665e+00,\n                                                9.80338430140008e+00,  9.78478400365979e+00,  9.76142749806043e+00,  9.73267975409062e+00,\n                                                9.69793473772744e+00,  9.65663768642100e+00,  9.60830737188444e+00,  9.55255722044735e+00,\n                                                9.48911408911431e+00,  9.41783351484276e+00,  9.33871039101849e+00,  9.25188429660949e+00,\n                                                9.15763910833139e+00,  9.05639702911216e+00,  8.94870768957526e+00,  8.83523341101589e+00,\n                                                8.71673194420408e+00,  8.59403795225796e+00,  8.46804421221112e+00,  8.33968308684370e+00,\n                                                8.20990843028975e+00,  8.07967787392398e+00,  7.94993544237545e+00,  7.82159462568977e+00,\n                                                7.69552227498747e+00,  7.57252388299869e+00,  7.45333088366173e+00,  7.33859053720193e+00,\n                                                7.22885878559283e+00,  7.12459622020922e+00,  7.02616705483000e+00,  6.93384078766128e+00,\n                                                6.84779609220314e+00,  6.76812640665063e+00,  6.69484668877336e+00,  6.62790085272513e+00,\n                                                6.56716948739151e+00,  6.51247755469040e+00,  6.46360186578606e+00,  6.42027822270054e+00,\n                                                6.38220818570012e+00,  6.34906548003455e+00,  6.32050208873096e+00,  6.29615409262868e+00,\n                                                6.27564731724253e+00,  6.25860283152331e+00,  6.24464231959986e+00,  6.23339331668891e+00,\n                                                6.22449426808433e+00,  6.21759933890155e+00,  6.21238287523246e+00,  6.20854339733158e+00,\n                                                6.20580699459606e+00,  6.20392999183718e+00,  6.20270076717565e+00,  6.20194062334951e+00,\n                                                6.20150364487030e+00,  6.20127551106050e+00,  6.20117127674231e+00,  6.20113217515899e+00,\n                                                6.20112153860932e+00,  6.20111996867793e+00,  6.20111982896524e+00,  6.20111707870459e+00,\n                                                6.20109844531779e+00,  6.20102994752316e+00,  6.20084736144113e+00,  6.20044779600279e+00,\n                                                6.19968265601453e+00,  6.19835230780644e+00,  6.19620274676804e+00,  6.19292454615131e+00,\n                                                6.18815433756159e+00,  6.18147902953288e+00,  6.17244290506488e+00,  6.16055764631510e+00,\n                                                6.14531521120013e+00,  6.12620333231044e+00,  6.10272322772708e+00,  6.07440891589268e+00,\n                                                6.04084732806006e+00,  6.00169823244670e+00,  5.95671284799991e+00,  5.90574995767805e+00,\n                                                5.84878835430479e+00,  5.78593458327397e+00,  5.71742519242366e+00,  5.64362305298672e+00,\n                                                5.56500775270635e+00,  5.48216054198272e+00,  5.39574478129704e+00,  5.30648323118746e+00,\n                                                5.21513378632278e+00,  5.12246533998900e+00,  5.02923535806298e+00,  4.93617045775518e+00,\n                                                4.84395087198782e+00,  4.75319920269890e+00,  4.66447340042406e+00,  4.57826351978137e+00,\n                                                4.49499153666259e+00,  4.41501339114129e+00,  4.33862243124471e+00,  4.26605354674629e+00,\n                                                4.19748745768483e+00,  4.13305481696051e+00,  4.07283996476569e+00,  4.01688431148260e+00,\n                                                3.96518941507185e+00,  3.91771986061538e+00,  3.87440605339655e+00,  3.83514701637429e+00,\n                                                3.79981325178773e+00,  3.76824969576637e+00,  3.74027877091344e+00,  3.71570352735281e+00,\n                                                3.69431085682116e+00,  3.67587476417035e+00,  3.66015968256773e+00,  3.64692381955955e+00,\n                                                3.63592251881196e+00,  3.62691161583091e+00,  3.61965075553021e+00,  3.61390662635563e+00,\n                                                3.60945605158234e+00,  3.60608886545301e+00,  3.60361049204305e+00,  3.60184413984089e+00,\n                                                3.60063252621961e+00,  3.59983905380890e+00,  3.59934837511809e+00,  3.59906630180852e+00,\n                                                3.59891903940371e+00,  3.59885175520107e+00,  3.59882651476893e+00,  3.59881964877782e+00,\n                                                3.59881863537258e+00,  3.59881854578235e+00,  3.59881678888091e+00,  3.59880488563611e+00,\n                                                3.59876112836287e+00,  3.59864448994847e+00,  3.59838924186316e+00,  3.59790045811297e+00,\n                                                3.59705060572408e+00,  3.59567741201467e+00,  3.59358318577628e+00,  3.59053575056682e+00,\n                                                3.58627111982129e+00,  3.58049800141949e+00,  3.57290416032413e+00,  3.56316459008687e+00,\n                                                3.55095134811045e+00,  3.53594479955092e+00,  3.51784589824713e+00,  3.49638902081140e+00,\n                                                3.47135477441664e+00,  3.44258213156630e+00,  3.40997921433944e+00,  3.37353205839291e+00,\n                                                3.33331072898924e+00,  3.28947222925080e+00,  3.24225972898903e+00,  3.19199775645759e+00,\n                                                3.13908315938641e+00,  3.08397189682245e+00,  3.02716211008454e+00,  2.96917444348283e+00,\n                                                2.91053116912384e+00,  2.85173614517236e+00,  2.79325777934834e+00,  2.73551680893045e+00,\n                                                2.67887985195054e+00,  2.62365856267594e+00,  2.57011320513421e+00,  2.51845886334728e+00,\n                                                2.46887245965232e+00,  2.42149915090809e+00,  2.37645728330100e+00,  2.33384167728557e+00,\n                                                2.29372544000108e+00,  2.25616072263798e+00,  2.22117888728274e+00,  2.18879048465054e+00,\n                                                2.15898533195722e+00,  2.13173286308907e+00,  2.10698282579886e+00,  2.08466633197342e+00,\n                                                2.06469722634990e+00,  2.04697372077554e+00,  2.03138023808900e+00,  2.01778941528216e+00,\n                                                2.00606422447319e+00,  1.99606017867885e+00,  1.98762759520644e+00,  1.98061389172354e+00,\n                                                1.97486588867911e+00,  1.97023208738292e+00,  1.96656488676783e+00,  1.96372269494382e+00,\n                                                1.96157188543240e+00,  1.95998854366468e+00,  1.95885994792653e+00,  1.95808573110951e+00,\n                                                1.95757867565978e+00,  1.95726510389412e+00,  1.95708483887567e+00,  1.95699072649768e+00,\n                                                1.95694772627886e+00,  1.95693159549378e+00,  1.95692720753682e+00,  1.95692655988385e+00,\n                                                1.95692650174284e+00,  1.95692535156086e+00,  1.95691755891992e+00,  1.95688891251450e+00,\n                                                1.95681255299801e+00,  1.95664544857315e+00,  1.95632544855032e+00,  1.95576904386732e+00,\n                                                1.95486995547045e+00,  1.95349866144475e+00,  1.95150296016856e+00,  1.94870964740767e+00,\n                                                1.94492735789899e+00,  1.93995058470003e+00,  1.93356484141217e+00,  1.92555287380614e+00,\n                                                1.91570176078656e+00,  1.90381067450582e+00,  1.88969900206141e+00,  1.87321447390034e+00,\n                                                1.85424090394955e+00,  1.83270512922220e+00,  1.80858274533324e+00,  1.78190226935151e+00,\n                                                1.75274742099674e+00,  1.72125729481068e+00,  1.68762429729409e+00,  1.65208984209514e+00,\n                                                1.61493793008385e+00,  1.57648688319574e+00,  1.53707963985173e+00,  1.49707313918134e+00,\n                                                1.45682740252627e+00,  1.41669494753701e+00,  1.37701113379726e+00,  1.33808594132841e+00,\n                                                1.30019753768109e+00,  1.26358781703030e+00,  1.22845992048503e+00,  1.19497759336091e+00,\n                                                1.16326611883436e+00,  1.13341449623624e+00,  1.10547850609234e+00,  1.07948431634692e+00,\n                                                1.05543232475616e+00,  1.03330098986424e+00,  1.01305046690129e+00,  9.94625927211120e-01,\n                                                9.77960494947283e-01,  9.62977779817674e-01,  9.49594018703849e-01,  9.37719862537481e-01,\n                                                9.27261859207151e-01,  9.18123690153628e-01,  9.10207219353634e-01,  9.03413410062658e-01,\n                                                8.97643158194080e-01,  8.92798082500430e-01,  8.88781301532365e-01,  8.85498216288759e-01,\n                                                8.82857306086080e-01,  8.80770934012991e-01,  8.79156147971251e-01,  8.77935454335509e-01,\n                                                8.77037534283247e-01,  8.76397868377946e-01,  8.75959233424187e-01,  8.75672037141641e-01,\n                                                8.75494460762649e-01,  8.75392386911939e-01,  8.75339099494425e-01,  8.75314753022209e-01,\n                                                8.75305619979940e-01,  8.75303135586101e-01,  8.75302768895319e-01,  8.75302735092978e-01,\n                                                8.75302056548785e-01,  8.75297459328173e-01,  8.75280559700695e-01,  8.75235513355749e-01,\n                                                8.75136939954919e-01,  8.74948196202395e-01,  8.74620082169333e-01,  8.74090065700610e-01,\n                                                8.73282108861575e-01,  8.72107176370807e-01,  8.70464496032220e-01,  8.68243622314624e-01,\n                                                8.65327323728204e-01,  8.61595270812067e-01,  8.56928444424476e-01,  8.51214116125732e-01,\n                                                8.44351179197691e-01,  8.36255538633601e-01,  8.26865211964924e-01,  8.16144761733753e-01,\n                                                8.04088685344126e-01,  7.90723435957489e-01,  7.76107840154831e-01,  7.60331807885429e-01,\n                                                7.43513383675078e-01,  7.25794345008064e-01,  7.07334691356904e-01,  6.88306464467381e-01,\n                                                6.68887382566044e-01,  6.49254753225849e-01,  6.29580057581773e-01,  6.10024487534497e-01,\n                                                5.90735588103435e-01,  5.71845030485825e-01,  5.53467435239060e-01,  5.35700090299287e-01,\n                                                5.18623368739501e-01,  5.02301643172094e-01,  4.86784510075404e-01,  4.72108168827512e-01,\n                                                4.58296838029478e-01,  4.45364128829640e-01,  4.33314326933639e-01,  4.22143559711225e-01,\n                                                4.11840842077913e-01,  4.02389005626146e-01,  3.93765521355352e-01,  3.85943228921121e-01,\n                                                3.78890985971122e-01,  3.72574250862234e-01,  3.66955611469233e-01,  3.61995272176838e-01,\n                                                3.57651510530493e-01,  3.53881114300711e-01,  3.50639808726058e-01,  3.47882682280654e-01,\n                                                3.45564617353201e-01,  3.43640729691066e-01,  3.42066817408149e-01,  3.40799816920198e-01,\n                                                3.39798259573696e-01,  3.39022719250826e-01,  3.38436238170427e-01,  3.38004715768989e-01,\n                                                3.37697244205877e-01,  3.37486373890931e-01,  3.37348293578099e-01,  3.37262911986144e-01,\n                                                3.37213831453848e-01,  3.37188208560395e-01,  3.37176501606651e-01,  3.37172109982033e-01,\n                                                3.37170915359120e-01,  3.37170739035482e-01,  3.37170722232022e-01,  3.37170378959541e-01,\n                                                3.37168053245062e-01,  3.37159503778715e-01,  3.37136714855339e-01,  3.37086845988969e-01,\n                                                3.36991356985887e-01,  3.36825350363588e-01,  3.36557172492178e-01,  3.36148313806001e-01,\n                                                3.35553645907904e-01,  3.34722028115809e-01,  3.33597306636989e-01,  3.32119714917759e-01,\n                                                3.30227663118407e-01,  3.27859878270139e-01,  3.24957825820944e-01,  3.21468310655737e-01,\n                                                3.17346125229490e-01,  3.12556588952424e-01,  3.07077811218059e-01,  3.00902514261281e-01,\n                                                2.94039273112435e-01,  2.86513067235612e-01,  2.78365088082335e-01,  2.69651802605955e-01,\n                                                2.60443327665309e-01,  2.50821217688523e-01,  2.40875803340842e-01,  2.30703240145688e-01,\n                                                2.20402433318624e-01,  2.10072000363091e-01,  1.99807418733716e-01,  1.89698484434695e-01,\n                                                1.79827180664541e-01,  1.70266025103940e-01,  1.61076931768021e-01,  1.52310590436944e-01,\n                                                1.44006335831110e-01,  1.36192452302986e-01,  1.28886839943609e-01,  1.22097955962008e-01,\n                                                1.15825941302491e-01,  1.10063846017580e-01,  1.04798876417842e-01,  1.00013600529874e-01,\n                                                9.56870638897218e-02,  9.17957833817713e-02,  8.83146013153020e-02,  8.52173943042871e-02,\n                                                8.24776413298167e-02,  8.00688625408199e-02,  7.79649450713809e-02,  7.61403747562373e-02,\n                                                7.45703935003714e-02,  7.32311015852325e-02,  7.20995227074468e-02,  7.11536473208891e-02,\n                                                7.03724671102091e-02,  6.97360103438136e-02,  6.92253845951036e-02,  6.88228300357210e-02,\n                                                6.85117833519282e-02,  6.82769494804791e-02,  6.81043759703730e-02,  6.79815230050114e-02,\n                                                6.78973210861464e-02,  6.78422081557386e-02,  6.78081385158968e-02,  6.77885572282282e-02,\n                                                6.77783355896029e-02,  6.77736655942613e-02,  6.77719137753385e-02,  6.77714372435503e-02,\n                                                6.77713669086533e-02,  6.77713599470700e-02,  6.77712150161707e-02,  6.77702330946257e-02,\n                                                6.77666235464933e-02,  6.77570025794711e-02,  6.77359512000173e-02,  6.76956501222197e-02,\n                                                6.76256126055446e-02,  6.75125378395656e-02,  6.73403089918985e-02,  6.70901605356615e-02,\n                                                6.67410378888729e-02,  6.62701675477262e-02,  6.56538467099193e-02,  6.48684471745504e-02,\n                                                6.38916090683335e-02,  6.27035766498594e-02,  6.12886032059361e-02,  5.96363281538448e-02,\n                                                5.77430110605892e-02,  5.56124988480917e-02,  5.32568078848783e-02,  5.06962243418130e-02,\n                                                4.79588640326085e-02,  4.50796838819638e-02,  4.20989951102300e-02,  3.90605849360615e-02,\n                                                3.60096000551700e-02,  3.29903733991017e-02,  3.00443806164239e-02,  2.72084933594403e-02,\n                                                2.45136562416999e-02,  2.19840603845221e-02,  1.96368279980046e-02,  1.74821686818305e-02,\n                                                1.55239264614799e-02,  1.37604112567473e-02,  1.21854002921999e-02,  1.07892016952427e-02,\n                                                9.55969003864610e-03,  8.48324700063685e-03,  7.54556508808868e-03,  6.73229496669947e-03,\n                                                6.02953516700566e-03,  5.42417590076560e-03,  4.90411659034784e-03,  4.45838029324008e-03,\n                                                4.07714856031660e-03,  3.75173845226406e-03,  3.47454037241945e-03,  3.23893180559587e-03,\n                                                3.03917854323643e-03,  2.87033187505514e-03,  2.72812768138664e-03,  2.60889136309927e-03,\n                                                2.50945102297884e-03,  2.42706018229910e-03,  2.35933051124881e-03,  2.30417450901754e-03,\n                                                2.25975772208642e-03,  2.22445986863029e-03,  2.19684408435938e-03,  2.17563338182281e-03,\n                                                2.15969330431598e-03,  2.14801965782740e-03,  2.13973013076441e-03,  2.13405857680726e-03,\n                                                2.13035075443990e-03,  2.12806039709967e-03,  2.12674463155871e-03,  2.12605796244070e-03,\n                                                2.12574428134893e-03,  2.12562661904769e-03,  2.12559461302320e-03,  2.12558988903488e-03,\n                                                2.12558940174112e-03,  2.12557905761734e-03,  2.12550897587960e-03,  2.12525136633523e-03,\n                                                2.12456481471790e-03,  2.12306302775467e-03,  2.12018966193739e-03,  2.11520140528876e-03,\n                                                2.10716196455429e-03,  2.09495006769522e-03,  2.07728483847625e-03,  2.05277169605367e-03,\n                                                2.01997101352269e-03,  1.97748990566815e-03,  1.92409460063026e-03,  1.85883699903933e-03,\n                                                1.78118467148458e-03,  1.69113948080302e-03,  1.58932732096950e-03,  1.47704130813509e-03,\n                                                1.35622405749558e-03,  1.22938169271869e-03,  1.09943223732856e-03,  9.69502244272391e-04,\n                                                8.42695393348691e-04,  7.21862733833234e-04,  6.09404510916178e-04,  5.07127870292834e-04,\n                                                4.16174663504520e-04,  3.37021698030071e-04,  2.69544825874490e-04,  2.13130159595565e-04,\n                                                1.66811253606625e-04,  1.29410396221274e-04,  9.96651663918158e-05,  7.63278110866850e-05,\n                                                5.82334728083111e-05,  4.43410338473171e-05,  3.37540919019830e-05,  2.57280834272677e-05,\n                                                1.96653311714812e-05,  1.50976950692439e-05,  1.16594774617340e-05,  9.05892214930759e-06,\n                                                7.05887286400753e-06,  5.47156763275325e-06,  4.16222190757765e-06,  3.05025840141582e-06,\n                                                2.10088596652724e-06,  1.30802505182714e-06,  6.74540872935836e-07,  -3.55271367880050e-15,\n                                                -3.55271367880050e-15, -5.32907051820075e-15, -5.32907051820075e-15, -5.32907051820075e-15,\n                                                -3.55271367880050e-15, -7.10542735760100e-15, -5.32907051820075e-15, -5.32907051820075e-15,\n                                                -3.55271367880050e-15, -5.32907051820075e-15, -3.55271367880050e-15, -5.32907051820075e-15,\n                                                -7.10542735760100e-15, -7.10542735760100e-15, -5.32907051820075e-15, -5.32907051820075e-15,\n                                                -3.55271367880050e-15, -7.10542735760100e-15, -3.55271367880050e-15, -3.55271367880050e-15,\n                                                -5.32907051820075e-15, -3.55271367880050e-15, -5.32907051820075e-15}),\nmadness::CubicInterpolationTable<double>(grid, {1.60000000000000e+01, 1.59999999648447e+01, 1.59999988777740e+01,  1.59999915126958e+01,\n                                                1.59999644376749e+01, 1.59998922639646e+01, 1.59997343052159e+01,  1.59994317633250e+01,\n                                                1.59989055403424e+01, 1.59980547554117e+01, 1.59967560226870e+01,  1.59948635217443e+01,\n                                                1.59922098675046e+01, 1.59886077635899e+01, 1.59838524027873e+01,  1.59777245620762e+01,\n                                                1.59699943282165e+01, 1.59604253831822e+01, 1.59487797758805e+01,  1.59348231057847e+01,\n                                                1.59183300427454e+01, 1.58990901023375e+01, 1.58769135849282e+01,  1.58516375674466e+01,\n                                                1.58231318096016e+01, 1.57913044032404e+01, 1.57561069592450e+01,  1.57175390972960e+01,\n                                                1.56756519873670e+01, 1.56305506948037e+01, 1.55823951081148e+01,  1.55313992816512e+01,\n                                                1.54778291015899e+01, 1.54219982765690e+01, 1.53642627543326e+01,  1.53050137618044e+01,\n                                                1.52446697474260e+01, 1.51836675628558e+01, 1.51224532511254e+01,  1.50614728089842e+01,\n                                                1.50011632651132e+01, 1.49419443687910e+01, 1.48842111228131e+01,  1.48283273277779e+01,\n                                                1.47746202393025e+01, 1.47233763808051e+01, 1.46748385057441e+01,  1.46292036662065e+01,\n                                                1.45866223193953e+01, 1.45471983885033e+01, 1.45109901875893e+01,  1.44780121189651e+01,\n                                                1.44482370539381e+01, 1.44215993114914e+01, 1.43979981530683e+01,  1.43773017139783e+01,\n                                                1.43593512924902e+01, 1.43439659162756e+01, 1.43309471027489e+01,  1.43200837255176e+01,\n                                                1.43111568943322e+01, 1.43039447514557e+01, 1.42982270841258e+01,  1.42937896516366e+01,\n                                                1.42904281272385e+01, 1.42879515601327e+01, 1.42861852716400e+01,  1.42849731122286e+01,\n                                                1.42841790222632e+01, 1.42836878586084e+01, 1.42834054708441e+01,  1.42832580339241e+01,\n                                                1.42831906676228e+01, 1.42831653960105e+01, 1.42831585215016e+01,  1.42831575068379e+01,\n                                                1.42831573679447e+01, 1.42831540877580e+01, 1.42831318640165e+01,  1.42830501672853e+01,\n                                                1.42828323945128e+01, 1.42823558077706e+01, 1.42814431011201e+01,  1.42798559404010e+01,\n                                                1.42772907846534e+01, 1.42733772558776e+01, 1.42676792742435e+01,  1.42596991165052e+01,\n                                                1.42488844839631e+01, 1.42346385808881e+01, 1.42163331035574e+01,  1.41933239235072e+01,\n                                                1.41649691169170e+01, 1.41306488472793e+01, 1.40897864550006e+01,  1.40418699532010e+01,\n                                                1.39864729867773e+01, 1.39232742012624e+01, 1.38520739146895e+01,  1.37728070180693e+01,\n                                                1.36855511731063e+01, 1.35905296416126e+01, 1.34881084599499e+01,  1.33787881265445e+01,\n                                                1.32631904382744e+01, 1.31420415148071e+01, 1.30161523147458e+01,  1.28863980235958e+01,\n                                                1.27536975706621e+01, 1.26189942444288e+01, 1.24832379950899e+01,  1.23473696280711e+01,\n                                                1.22123067870726e+01, 1.20789314553025e+01, 1.19480786845758e+01,  1.18205263676731e+01,\n                                                1.16969860427427e+01, 1.15780948904520e+01, 1.14644091951658e+01,  1.13563995571167e+01,\n                                                1.12544480637724e+01, 1.11588474854203e+01, 1.10698023980859e+01,  1.09874320002638e+01,\n                                                1.09117743071785e+01, 1.08427913851198e+01, 1.07803753186992e+01,  1.07243546656289e+01,\n                                                1.06745012255002e+01, 1.06305370142806e+01, 1.05921413850119e+01,  1.05589582640556e+01,\n                                                1.05306034822732e+01, 1.05066721752997e+01, 1.04867462109379e+01,  1.04704015790038e+01,\n                                                1.04572156535528e+01, 1.04467742126300e+01, 1.04386780793631e+01,  1.04325492327317e+01,\n                                                1.04280362286185e+01, 1.04248187731732e+01, 1.04226113018281e+01,  1.04211654385248e+01,\n                                                1.04202712400662e+01, 1.04197571685010e+01, 1.04194887779040e+01,  1.04193661482721e+01,\n                                                1.04193201457037e+01, 1.04193076318935e+01, 1.04193057848815e+01,  1.04193056095491e+01,\n                                                1.04193020349385e+01, 1.04192778164496e+01, 1.04191887870820e+01,  1.04189514702361e+01,\n                                                1.04184321221329e+01, 1.04174375620632e+01, 1.04157081817023e+01,  1.04129134940474e+01,\n                                                1.04086505455121e+01, 1.04024454672082e+01, 1.03937583780700e+01,  1.03819917674431e+01,\n                                                1.03665023729666e+01, 1.03466164279417e+01, 1.03216479811329e+01,  1.02909197959588e+01,\n                                                1.02537861257604e+01, 1.02096564539440e+01, 1.01580191051592e+01,  1.00984635044770e+01,\n                                                1.00306998170633e+01, 9.95457477089667e+00, 9.87008267034136e+00,  9.77737094944604e+00,\n                                                9.67674005978935e+00, 9.56863797023644e+00, 9.45364997800511e+00,  9.33248479380206e+00,\n                                                9.20595791003801e+00, 9.07497310524636e+00, 8.94050267119924e+00,  8.80356670282679e+00,\n                                                8.66521167565521e+00, 8.52648859228804e+00, 8.38843116802698e+00,  8.25203475137851e+00,\n                                                8.11823683570697e+00, 7.98790004433388e+00, 7.86179834494541e+00,  7.74060699917295e+00,\n                                                7.62489643691307e+00, 7.51512992605435e+00, 7.41166463961989e+00,  7.31475553655810e+00,\n                                                7.22456138033857e+00, 7.14115221392455e+00, 7.06451767178256e+00,  6.99457561559297e+00,\n                                                6.93118070693490e+00, 6.87413265805007e+00, 6.82318401694610e+00,  6.77804743726381e+00,\n                                                6.73840245292583e+00, 6.70390182252887e+00, 6.67417753090943e+00,  6.64884653867883e+00,\n                                                6.62751635863811e+00, 6.60979051473054e+00, 6.59527390829705e+00,  6.58357808137894e+00,\n                                                6.57432633098242e+00, 6.56715859470152e+00, 6.56173599977580e+00,  6.55774494707060e+00,\n                                                6.55490059062716e+00, 6.55294957365328e+00, 6.55167189355796e+00,  6.55088179135926e+00,\n                                                6.55042759303791e+00, 6.55019046985984e+00, 6.55008212843986e+00,  6.55004148617561e+00,\n                                                6.55003043052665e+00, 6.55002879873720e+00, 6.55002865351958e+00,  6.55002579489387e+00,\n                                                6.55000642732081e+00, 6.54993523062386e+00, 6.54974545059722e+00,  6.54933014310206e+00,\n                                                6.54853486175879e+00, 6.54715211800382e+00, 6.54491792680483e+00,  6.54151073131888e+00,\n                                                6.53655297000595e+00, 6.52961550349586e+00, 6.52022504867617e+00,  6.50787466765745e+00,\n                                                6.49203722543866e+00, 6.47218156211803e+00, 6.44779092860620e+00,  6.41838302059015e+00,\n                                                6.38353073218567e+00, 6.34288256242241e+00, 6.29618147250875e+00,  6.24328093857832e+00,\n                                                6.18415699859710e+00, 6.11891526987167e+00, 6.04779221775216e+00,  5.97115037100569e+00,\n                                                5.88946766896397e+00, 5.80332163521174e+00, 5.71336953506557e+00,  5.62032602044206e+00,\n                                                5.52493993894502e+00, 5.42797195260686e+00, 5.33017437903563e+00,  5.23227427373643e+00,\n                                                5.13496028658629e+00, 5.03887333209605e+00, 4.94460069278648e+00,  4.85267288771263e+00,\n                                                4.76356251220137e+00, 4.67768428418191e+00, 4.59539568214266e+00,  4.51699777709181e+00,\n                                                4.44273608913219e+00, 4.37280148990989e+00, 4.30733129400693e+00,  4.24641072513382e+00,\n                                                4.19007491620560e+00, 4.13831152941431e+00, 4.09106399225645e+00,  4.04823526455716e+00,\n                                                4.00969199766516e+00, 3.97526892695307e+00, 3.94477334940704e+00,  3.91798956985974e+00,\n                                                3.89468324048569e+00, 3.87460555789269e+00, 3.85749731302760e+00,  3.84309280737973e+00,\n                                                3.83112365403006e+00, 3.82132247564302e+00, 3.81342649650504e+00,  3.80718100567644e+00,\n                                                3.80234264673452e+00, 3.79868246962087e+00, 3.79598866442970e+00,  3.79406888761699e+00,\n                                                3.79275208937681e+00, 3.79188975734110e+00, 3.79135650603761e+00,  3.79104996267052e+00,\n                                                3.79088992613211e+00, 3.79081680565161e+00, 3.79078937588342e+00,  3.79078191434485e+00,\n                                                3.79078081303824e+00, 3.79078071567708e+00, 3.79077880638451e+00,  3.79076587067173e+00,\n                                                3.79071831800212e+00, 3.79059156295485e+00, 3.79031417740545e+00,  3.78978300749758e+00,\n                                                3.78885947570532e+00, 3.78736727841308e+00, 3.78509167669132e+00,  3.78178055889057e+00,\n                                                3.77714742396661e+00, 3.77087638946681e+00, 3.76262926376815e+00,  3.75205463581150e+00,\n                                                3.73879882686431e+00, 3.72251842034718e+00, 3.70289394331073e+00,  3.67964412569312e+00,\n                                                3.65254002258930e+00, 3.62141816407295e+00, 3.58619181235856e+00,  3.54685937608227e+00,\n                                                3.50350907994413e+00, 3.45631914444770e+00, 3.40555302647617e+00,  3.35154972680517e+00,\n                                                3.29470976866059e+00, 3.23547811046856e+00, 3.17432581887585e+00,  3.11173259544737e+00,\n                                                3.04817206452332e+00, 2.98410107502579e+00, 2.91995331953567e+00,  2.85613663609263e+00,\n                                                2.79303272953972e+00, 2.73099788168753e+00, 2.67036347143728e+00,  2.61143561867472e+00,\n                                                2.55449378982188e+00, 2.49978860488086e+00, 2.44753930100229e+00,  2.39793134691318e+00,\n                                                2.35111461837642e+00, 2.30720239923004e+00, 2.26627131703977e+00,  2.22836219040298e+00,\n                                                2.19348167222006e+00, 2.16160452224413e+00, 2.13267632722625e+00,  2.10661649852680e+00,\n                                                2.08332140503864e+00, 2.06266753470862e+00, 2.04451461390084e+00,  2.02870864553655e+00,\n                                                2.01508485154827e+00, 2.00347052145763e+00, 1.99368777677878e+00,  1.98555626125782e+00,\n                                                1.97889576104951e+00, 1.97352874852790e+00, 1.96928283043236e+00,  1.96599306740992e+00,\n                                                1.96350411957883e+00, 1.96167216313500e+00, 1.96036651754002e+00,  1.95947092231705e+00,\n                                                1.95888440728534e+00, 1.95852171000529e+00, 1.95831320861375e+00,  1.95820435602217e+00,\n                                                1.95815462127036e+00, 1.95813596419293e+00, 1.95813088902919e+00,  1.95813013994615e+00,\n                                                1.95813007269958e+00, 1.95812874238571e+00, 1.95811972933011e+00,  1.95808659663296e+00,\n                                                1.95799827893716e+00, 1.95780500751283e+00, 1.95743490675746e+00,  1.95679141468120e+00,\n                                                1.95575167254998e+00, 1.95416601944751e+00, 1.95185871383750e+00,  1.94862998341422e+00,\n                                                1.94425947361859e+00, 1.93851112156464e+00, 1.93113942416810e+00,  1.92189699701243e+00,\n                                                1.91054323603326e+00, 1.89685380192580e+00, 1.88063055407013e+00,  1.86171147543698e+00,\n                                                1.83998006227273e+00, 1.81537361246733e+00, 1.78788984362876e+00,  1.75759131334671e+00,\n                                                1.72460720428974e+00, 1.68913217593171e+00, 1.65142216783599e+00,  1.61178725508492e+00,\n                                                1.57058188616381e+00, 1.52819305273763e+00, 1.48502712124817e+00,  1.44149617146272e+00,\n                                                1.39800471758859e+00, 1.35493762624197e+00, 1.31264990029897e+00,  1.27145879028079e+00,\n                                                1.23163845666915e+00, 1.19341717137840e+00, 1.15697684437994e+00,  1.12245451280017e+00,\n                                                1.08994534376028e+00, 1.05950667687297e+00, 1.03116265745617e+00,  1.00490907238143e+00,\n                                                9.80718081276963e-01, 9.58542622547133e-01, 9.38320355705239e-01,  9.19977072049138e-01,\n                                                9.03429561478939e-01, 8.88587963759246e-01, 8.75357659090824e-01,  8.63640767776584e-01,\n                                                8.53337334644863e-01, 8.44346273181717e-01, 8.36566139084253e-01,  8.29895794762411e-01,\n                                                8.24235016316099e-01, 8.19485083460547e-01, 8.15549381274234e-01,  8.12334030871369e-01,\n                                                8.09748554484930e-01, 8.07706569347975e-01, 8.06126494606620e-01,  8.04932246780465e-01,\n                                                8.04053892527058e-01, 8.03428223158134e-01, 8.02999213879938e-01,  8.02718332288846e-01,\n                                                8.02544665205005e-01, 8.02444840161050e-01, 8.02392727214691e-01,  8.02368917457363e-01,\n                                                8.02359985769828e-01, 8.02357556150721e-01, 8.02357197544623e-01,  8.02357164487546e-01,\n                                                8.02356500903732e-01, 8.02352005042954e-01, 8.02335478040956e-01,  8.02291425101796e-01,\n                                                8.02195026369368e-01, 8.02010449756292e-01, 8.01689589876746e-01,  8.01171318023252e-01,\n                                                8.00381327962612e-01, 7.99232658854546e-01, 7.97626966809272e-01,  7.95456597230586e-01,\n                                                7.92607478214014e-01, 7.88962809078516e-01, 7.84407457786175e-01,  7.78832909526948e-01,\n                                                7.72142532412989e-01, 7.64256854615718e-01, 7.55118492407030e-01,  7.44696343149215e-01,\n                                                7.32988672201559e-01, 7.20024784145163e-01, 7.05865075579256e-01,  6.90599409282548e-01,\n                                                6.74343909906343e-01, 6.57236436272884e-01, 6.39431110554263e-01,  6.21092360214163e-01,\n                                                6.02388943680985e-01, 5.83488385861711e-01, 5.64552156503494e-01,  5.45731802712746e-01,\n                                                5.27166119273732e-01, 5.08979327147316e-01, 4.91280145834343e-01,  4.74161595278117e-01,\n                                                4.57701346195062e-01, 4.41962447242707e-01, 4.26994283735095e-01,  4.12833656223500e-01,\n                                                3.99505900607318e-01, 3.87025999710920e-01, 3.75399657358775e-01,  3.64624319920150e-01,\n                                                3.54690138384298e-01, 3.45580868091371e-01, 3.37274705049689e-01,  3.29745058694925e-01,\n                                                3.22961261861924e-01, 3.16889220040814e-01, 3.11492003703684e-01,  3.06730389414852e-01,\n                                                3.02563357266388e-01, 2.98948553590405e-01, 2.95842728618760e-01,  2.93202158605194e-01,\n                                                2.90983060811005e-01, 2.89142007706321e-01, 2.87636343876725e-01,  2.86424605660940e-01,\n                                                2.85466939761852e-01, 2.84725513302071e-01, 2.84164904389854e-01,  2.83752459562239e-01,\n                                                2.83458602775045e-01, 2.83257080128966e-01, 2.83125125364380e-01,  2.83043533308534e-01,\n                                                2.82996631773498e-01, 2.82972146626301e-01, 2.82960959544097e-01,  2.82956762945435e-01,\n                                                2.82955621374702e-01, 2.82955452881469e-01, 2.82955436824233e-01,  2.82955108796253e-01,\n                                                2.82952886365786e-01, 2.82944716586575e-01, 2.82922939801820e-01,  2.82875286139047e-01,\n                                                2.82784040141056e-01, 2.82625414099957e-01, 2.82369170486849e-01,  2.81978533230420e-01,\n                                                2.81410425507518e-01, 2.80616066912545e-01, 2.79541954022726e-01,  2.78131234285532e-01,\n                                                2.76325463113356e-01, 2.74066708186437e-01, 2.71299934467798e-01,  2.67975570838297e-01,\n                                                2.64052128297156e-01, 2.59498714903344e-01, 2.54297278736393e-01,  2.48444411002398e-01,\n                                                2.41952559121490e-01, 2.34850533898330e-01, 2.27183242789053e-01,  2.19010637768964e-01,\n                                                2.10405925087173e-01, 2.01453138916239e-01, 1.92244226164961e-01,  1.82875821679820e-01,\n                                                1.73445909583970e-01, 1.64050567003148e-01, 1.54780971603911e-01,  1.45720826041659e-01,\n                                                1.36944313458676e-01, 1.28514652430722e-01, 1.20483271792784e-01,  1.12889580358503e-01,\n                                                1.05761268020100e-01, 9.91150463170296e-02, 9.29577199798555e-02,  8.72874761916265e-02,\n                                                8.20952838817544e-02, 7.73663087755434e-02, 7.30812682128619e-02,  6.92176700504028e-02,\n                                                6.57508998688154e-02, 6.26551384884930e-02, 5.99041064362886e-02,  5.74716431106062e-02,\n                                                5.53321360582100e-02, 5.34608204107005e-02, 5.18339706961619e-02,  5.04290075371117e-02,\n                                                4.92245407127889e-02, 4.82003681471941e-02, 4.73374479226454e-02,  4.66178576475365e-02,\n                                                4.60247525845148e-02, 4.55423309740830e-02, 4.51558120452162e-02,  4.48514293600990e-02,\n                                                4.46164394764548e-02, 4.44391435260538e-02, 4.43089173126801e-02,  4.42162440383598e-02,\n                                                4.41527428673929e-02, 4.41111862931276e-02, 4.40854996895688e-02,  4.40707374570444e-02,\n                                                4.40630316954884e-02, 4.40595112014037e-02, 4.40581905962443e-02,  4.40578313646913e-02,\n                                                4.40577783430509e-02, 4.40577730950924e-02, 4.40576638396326e-02,  4.40569236238364e-02,\n                                                4.40542026023589e-02, 4.40469500501628e-02, 4.40310815281766e-02,  4.40007048607516e-02,\n                                                4.39479216500391e-02, 4.38627227980124e-02, 4.37329981430157e-02,  4.35446810574280e-02,\n                                                4.32820476887539e-02, 4.29281863579423e-02, 4.24656444609646e-02,  4.18772474266724e-02,\n                                                4.11470669096623e-02, 4.02614944431683e-02, 3.92103543837745e-02,  3.79879694076539e-02,\n                                                3.65940771356126e-02, 3.50344919064458e-02, 3.33214147675083e-02,  3.14733191064800e-02,\n                                                2.95143780478355e-02, 2.74734487455301e-02, 2.53826812083346e-02,  2.32758667983912e-02,\n                                                2.11866755855006e-02, 1.91469458360398e-02, 1.71851801907259e-02,  1.53253730735887e-02,\n                                                1.35862482281439e-02, 1.19809324236630e-02, 1.05170405157189e-02,  9.19710606065038e-03,\n                                                8.01926555586263e-03, 6.97809454119636e-03, 6.06549850303040e-03,  5.27157693911029e-03,\n                                                4.58540044787448e-03, 3.99566392147754e-03, 3.49120029200911e-03,  3.06135635679539e-03,\n                                                2.69624382104716e-03, 2.38688498234829e-03, 2.12527459710898e-03,  1.90437894246820e-03,\n                                                1.71809114487154e-03, 1.56115912486321e-03, 1.42909926535140e-03,  1.31810541982524e-03,\n                                                1.22495958683899e-03, 1.14694794414305e-03, 1.08178416452098e-03,  1.02754090408830e-03,\n                                                9.82589768742770e-04, 9.45549672712431e-04, 9.15243194073767e-04,  8.90660303648261e-04,\n                                                8.70928716743435e-04, 8.55290084313509e-04, 8.43081263207424e-04,  8.33719944052902e-04,\n                                                8.26693944272705e-04, 8.21553487744708e-04, 8.17905799001650e-04,  8.15411350899353e-04,\n                                                8.13781131379088e-04, 8.12774344893796e-04, 8.12196040298474e-04,  8.11894257463308e-04,\n                                                8.11756403322761e-04, 8.11704694802629e-04, 8.11690629332062e-04,  8.11688553318035e-04,\n                                                8.11688339169336e-04, 8.11683793333629e-04, 8.11652995254875e-04,  8.11539787639148e-04,\n                                                8.11238089774236e-04, 8.10578196970724e-04, 8.09315823111945e-04,  8.07124918258850e-04,\n                                                8.03595547104408e-04, 7.98238351887193e-04, 7.90497246518029e-04,  7.79771868197443e-04,\n                                                7.65450807790558e-04, 7.46955631163004e-04, 7.23794143965506e-04,  6.95619327121477e-04,\n                                                6.62288147813328e-04, 6.23912497092149e-04, 5.80893432243101e-04,  5.33930328634469e-04,\n                                                4.83998886201320e-04, 4.32296170254531e-04, 3.80156389367059e-04,  3.28946768991756e-04,\n                                                2.79957227514060e-04, 2.34299335652111e-04, 1.92828615119822e-04,  1.56099892695494e-04,\n                                                1.24359273600660e-04, 9.75698516398893e-05, 7.54629758485947e-05,  5.76037723138967e-05,\n                                                4.34591717013433e-05, 3.24588183531205e-05, 2.40431214830750e-05,  1.76968495573249e-05,\n                                                1.29694510473399e-05, 9.48406105294453e-06, 6.93689083242077e-06,  5.08911059604600e-06,\n                                                3.75489260306949e-06, 2.79026023974893e-06, 2.08564075165896e-06,  1.56109583926423e-06,\n                                                1.16084944146166e-06, 8.45607289079453e-07, 5.84835888162161e-07,  0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,  0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,  0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,  0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,  -3.55271367880050e-15,\n                                                0.00000000000000e+00, 0.00000000000000e+00, -3.55271367880050e-15, 0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, -3.55271367880050e-15, 0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {1.70000000000000e+01, 1.69999999615002e+01, 1.69999987710096e+01, 1.69999907052448e+01, 1.69999610544034e+01,\n                                                1.69998820143264e+01, 1.69997090278160e+01, 1.69993777025681e+01, 1.69988014144644e+01, 1.69978696824881e+01,\n                                                1.69964473762530e+01, 1.69943747903485e+01, 1.69914685929233e+01, 1.69875236308203e+01, 1.69823155517509e+01,\n                                                1.69756041867958e+01, 1.69671376247117e+01, 1.69566569030384e+01, 1.69439012387167e+01, 1.69286137206213e+01,\n                                                1.69105473849758e+01, 1.68894715885023e+01, 1.68651785801862e+01, 1.68374901487430e+01, 1.68062641894484e+01,\n                                                1.67714009938328e+01, 1.67328490245476e+01, 1.66906099034047e+01, 1.66447423220060e+01, 1.65953645895818e+01,\n                                                1.65426555670270e+01, 1.64868538009071e+01, 1.64282547626776e+01, 1.63672062081601e+01, 1.63041017885876e+01,\n                                                1.62393731540125e+01, 1.61734808801289e+01, 1.61069046110834e+01, 1.60401328384866e+01, 1.59736527302566e+01,\n                                                1.59079403862386e+01, 1.58434518381149e+01, 1.57806150380166e+01, 1.57198230026737e+01, 1.56614282058628e+01,\n                                                1.56057382472670e+01, 1.55530127741467e+01, 1.55034615946323e+01, 1.54572438972817e+01, 1.54144684787919e+01,\n                                                1.53751948776929e+01, 1.53394353135770e+01, 1.53071573362483e+01, 1.52782870948779e+01, 1.52527131421667e+01,\n                                                1.52302906915912e+01, 1.52108462465300e+01, 1.51941825183939e+01, 1.51800835471631e+01, 1.51683199325853e+01,\n                                                1.51586540785564e+01, 1.51508453478217e+01, 1.51446550200954e+01, 1.51398509449382e+01, 1.51362117820705e+01,\n                                                1.51335307268697e+01, 1.51316186279712e+01, 1.51303064172540e+01, 1.51294467898073e+01, 1.51289150922205e+01,\n                                                1.51286094009201e+01, 1.51284497972945e+01, 1.51283768718885e+01, 1.51283495148582e+01, 1.51283420730645e+01,\n                                                1.51283409746707e+01, 1.51283408243161e+01, 1.51283372734483e+01, 1.51283132158060e+01, 1.51282247775037e+01,\n                                                1.51279890345020e+01, 1.51274731219990e+01, 1.51264851081192e+01, 1.51247670072277e+01, 1.51219902703006e+01,\n                                                1.51177540455005e+01, 1.51115864493408e+01, 1.51029490248228e+01, 1.50912444847767e+01, 1.50758277437907e+01,\n                                                1.50560201288386e+01, 1.50311265264666e+01, 1.50004550741611e+01, 1.49633388383584e+01, 1.49191587475627e+01,\n                                                1.48673668767369e+01, 1.48075090251320e+01, 1.47392454175577e+01, 1.46623683182674e+01, 1.45768154081438e+01,\n                                                1.44826779643152e+01, 1.43802032043619e+01, 1.42697905959304e+01, 1.41519824368911e+01, 1.40274495047445e+01,\n                                                1.38969729690231e+01, 1.37614239800163e+01, 1.36217423482837e+01, 1.34789155185025e+01, 1.33339586756642e+01,\n                                                1.31878963960875e+01, 1.30417458762053e+01, 1.28965015265297e+01, 1.27531206519219e+01, 1.26125100430182e+01,\n                                                1.24755135178714e+01, 1.23429006875146e+01, 1.22153573835027e+01, 1.20934782183427e+01, 1.19777616390871e+01,\n                                                1.18686076182270e+01, 1.17663178739411e+01, 1.16710982959202e+01, 1.15830631224719e+01, 1.15022403833820e+01,\n                                                1.14285781740612e+01, 1.13619514259916e+01, 1.13021689512301e+01, 1.12489806384980e+01, 1.12020847513168e+01,\n                                                1.11611353214840e+01, 1.11257496473401e+01, 1.10955159020524e+01, 1.10700008391249e+01, 1.10487575562024e+01,\n                                                1.10313332483932e+01, 1.10172768522258e+01, 1.10061464536963e+01, 1.09975163109825e+01, 1.09909833263004e+01,\n                                                1.09861727937668e+01, 1.09827432522802e+01, 1.09803902850377e+01, 1.09788491303620e+01, 1.09778960012074e+01,\n                                                1.09773480514660e+01, 1.09770619737330e+01, 1.09769312627767e+01, 1.09768822286365e+01, 1.09768688901664e+01,\n                                                1.09768669214364e+01, 1.09768667345496e+01, 1.09768629243723e+01, 1.09768371098868e+01, 1.09767422135025e+01,\n                                                1.09764892576194e+01, 1.09759356852615e+01, 1.09748755869938e+01, 1.09730322518561e+01, 1.09700534277138e+01,\n                                                1.09655096372645e+01, 1.09588958453508e+01, 1.09496367052169e+01, 1.09370955194554e+01, 1.09205869299583e+01,\n                                                1.08993931969050e+01, 1.08727837403590e+01, 1.08400374056474e+01, 1.08004666884442e+01, 1.07534429378323e+01,\n                                                1.06984213730019e+01, 1.06349646337909e+01, 1.05627635694076e+01, 1.04816540786933e+01, 1.03916290574792e+01,\n                                                1.02928448652141e+01, 1.01856221428688e+01, 1.00704412193321e+01, 9.94793265051232e+00, 9.81886358672231e+00,\n                                                9.68412065709870e+00, 9.54468995433223e+00, 9.40163459665427e+00, 9.25607032701166e+00, 9.10913972079885e+00,\n                                                8.96198578415801e+00, 8.81572595340295e+00, 8.67142765732256e+00, 8.53008660771522e+00, 8.39260881715744e+00,\n                                                8.25979703375296e+00, 8.13234189164051e+00, 8.01081767642223e+00, 7.89568226096203e+00, 7.78728052216801e+00,\n                                                7.68585042049670e+00, 7.59153090504278e+00, 7.50437087629557e+00, 7.42433856637839e+00, 7.35133085283972e+00,\n                                                7.28518218140720e+00, 7.22567291717658e+00, 7.17253706157040e+00, 7.12546935958605e+00, 7.08413187863100e+00,\n                                                7.04816016984602e+00, 7.01716912991603e+00, 6.99075867098604e+00, 6.96851928316894e+00, 6.95003754242822e+00,\n                                                6.93490157994569e+00, 6.92270649059048e+00, 6.91305962063415e+00, 6.90558564104973e+00, 6.89993128504515e+00,\n                                                6.89576960910804e+00, 6.89280362755582e+00, 6.89076917255287e+00, 6.88943684514259e+00, 6.88861294748933e+00,\n                                                6.88813932073763e+00, 6.88789205434119e+00, 6.88777907844038e+00, 6.88773669762874e+00, 6.88772516905334e+00,\n                                                6.88772346746096e+00, 6.88772331603138e+00, 6.88772033512244e+00, 6.88770013906350e+00, 6.88762589677950e+00,\n                                                6.88742799844889e+00, 6.88699492481628e+00, 6.88616562138184e+00, 6.88472371973969e+00, 6.88239393182606e+00,\n                                                6.87884092145256e+00, 6.87367092571595e+00, 6.86643634959339e+00, 6.85664348259423e+00, 6.84376337993364e+00,\n                                                6.82724580804851e+00, 6.80653597548154e+00, 6.78109356134243e+00, 6.75041332806606e+00, 6.71404638389886e+00,\n                                                6.67162097088973e+00, 6.62286152763922e+00, 6.56760474411424e+00, 6.50581141435853e+00, 6.43757311596621e+00,\n                                                6.36311309895610e+00, 6.28278122537882e+00, 6.19704331608653e+00, 6.10646576563972e+00, 6.01169670473791e+00,\n                                                5.91344525196445e+00, 5.81246045487774e+00, 5.70951136156597e+00, 5.60536931632121e+00, 5.50079310382595e+00,\n                                                5.39651706661160e+00, 5.29324188638667e+00, 5.19162742965466e+00, 5.09228695557401e+00, 4.99578206925685e+00,\n                                                4.90261803431180e+00, 4.81323936074844e+00, 4.72802587172706e+00, 4.64728964731845e+00, 4.57127329707665e+00,\n                                                4.50014991990139e+00, 4.43402490627135e+00, 4.37293949039918e+00, 4.31687573973262e+00, 4.26576253001018e+00,\n                                                4.21948201707301e+00, 4.17787617072298e+00, 4.14075304873865e+00, 4.10789262246685e+00, 4.07905208755164e+00,\n                                                4.05397068538806e+00, 4.03237411651659e+00, 4.01397864923945e+00, 3.99849502276740e+00, 3.98563222286297e+00,\n                                                3.97510117696455e+00, 3.96661838115295e+00, 3.95990943735429e+00, 3.95471244882825e+00, 3.95078119733999e+00,\n                                                3.94788800792771e+00, 3.94582619787387e+00, 3.94441200593237e+00, 3.94348590610803e+00, 3.94291322678748e+00,\n                                                3.94258401962053e+00, 3.94241215151920e+00, 3.94233362532415e+00, 3.94230416772207e+00, 3.94229615456694e+00,\n                                                3.94229497184300e+00, 3.94229486728413e+00, 3.94229281684154e+00, 3.94227892481970e+00, 3.94222785670349e+00,\n                                                3.94209173112467e+00, 3.94179384021343e+00, 3.94122340703866e+00, 3.94023161780158e+00, 3.93862915635436e+00,\n                                                3.93618545522664e+00, 3.93262985656360e+00, 3.92765484292797e+00, 3.92092144603757e+00, 3.91206686592425e+00,\n                                                3.90071423006620e+00, 3.88648429101328e+00, 3.86900870528070e+00, 3.84794436448282e+00, 3.82298807665042e+00,\n                                                3.79389074297170e+00, 3.76047007092909e+00, 3.72262084201859e+00, 3.68032184454874e+00, 3.63363881488786e+00,\n                                                3.58272310764517e+00, 3.52780630263935e+00, 3.46919147222176e+00, 3.40724225416242e+00, 3.34237107369742e+00,\n                                                3.27502775197396e+00, 3.20568934287639e+00, 3.13485148040743e+00, 3.06302098301937e+00, 2.99070912176763e+00,\n                                                2.91842490004418e+00, 2.84666788617877e+00, 2.77592047670860e+00, 2.70663981418671e+00, 2.63924983411748e+00,\n                                                2.57413402057764e+00, 2.51162941211444e+00, 2.45202225687310e+00, 2.39554552068035e+00, 2.34237825266405e+00,\n                                                2.29264664536159e+00, 2.24642650943271e+00, 2.20374682185631e+00, 2.16459399525736e+00, 2.12891654330184e+00,\n                                                2.09662986946059e+00, 2.06762097119817e+00, 2.04175291844194e+00, 2.01886902657673e+00, 1.99879669553762e+00,\n                                                1.98135092552058e+00, 1.96633754584280e+00, 1.95355620721699e+00, 1.94280319057672e+00, 1.93387407947328e+00,\n                                                1.92656633006882e+00, 1.92068175510384e+00, 1.91602891817764e+00, 1.91242541446387e+00, 1.90969999566801e+00,\n                                                1.90769448245675e+00, 1.90626539821983e+00, 1.90528525485030e+00, 1.90464342466244e+00, 1.90424654240623e+00,\n                                                1.90401839678856e+00, 1.90389929067616e+00, 1.90384487158495e+00, 1.90382445734377e+00, 1.90381890419772e+00,\n                                                1.90381808456581e+00, 1.90381801098594e+00, 1.90381655538290e+00, 1.90380669348214e+00, 1.90377044045138e+00,\n                                                1.90367380594429e+00, 1.90346233770753e+00, 1.90305740445388e+00, 1.90235339023005e+00, 1.90121596742146e+00,\n                                                1.89948160840346e+00, 1.89695848354468e+00, 1.89342887184223e+00, 1.88865317572153e+00, 1.88237557974090e+00,\n                                                1.87433132168235e+00, 1.86425545350446e+00, 1.85189286145593e+00, 1.83700919521684e+00, 1.81940223461756e+00,\n                                                1.79891311175335e+00, 1.77543672084993e+00, 1.74893060351443e+00, 1.71942160735103e+00, 1.68700969215941e+00,\n                                                1.65186840483929e+00, 1.61424175796283e+00, 1.57443751375124e+00, 1.53281717027196e+00, 1.48978323658838e+00,\n                                                1.44576463034926e+00, 1.40120119889873e+00, 1.35652842683929e+00, 1.31216333829790e+00, 1.26849243916106e+00,\n                                                1.22586229936175e+00, 1.18457308643388e+00, 1.14487507169933e+00, 1.10696787788043e+00, 1.07100204876276e+00,\n                                                1.03708241047037e+00, 1.00527265860240e+00, 9.75600633715381e-01, 9.48063821018366e-01, 9.22634708733561e-01,\n                                                8.99265745523934e-01, 8.77893737127540e-01, 8.58443607275376e-01, 8.40831514115983e-01, 8.24967360319686e-01,\n                                                8.10756764738887e-01, 7.98102579125434e-01, 7.86906038448951e-01, 7.77067631057793e-01, 7.68487767940524e-01,\n                                                7.61067320666459e-01, 7.54708086555350e-01, 7.49313228073049e-01, 7.44787721822657e-01, 7.41038841023972e-01,\n                                                7.37976684179397e-01, 7.35514751847848e-01, 7.33570563299608e-01, 7.32066295614562e-01, 7.30929419921701e-01,\n                                                7.30093303420290e-01, 7.29497742027416e-01, 7.29089387329939e-01, 7.28822033183949e-01, 7.28656731779331e-01,\n                                                7.28561715992321e-01, 7.28512113859715e-01, 7.28489451302085e-01, 7.28480949966837e-01, 7.28478637413808e-01,\n                                                7.28478296086415e-01, 7.28478264622126e-01, 7.28477633011760e-01, 7.28473353775460e-01, 7.28457623103242e-01,\n                                                7.28415692850664e-01, 7.28323939381813e-01, 7.28148258297665e-01, 7.27842865599822e-01, 7.27349586838862e-01,\n                                                7.26597715860510e-01, 7.25504521558637e-01, 7.23976471577302e-01, 7.21911222918944e-01, 7.19200398009121e-01,\n                                                7.15733119184065e-01, 7.11400215105783e-01, 7.06098942461686e-01, 6.99737992072073e-01, 6.92242480118505e-01,\n                                                6.83558574858843e-01, 6.73657389530689e-01, 6.62537793427031e-01, 6.50227860255512e-01, 6.36784782951295e-01,\n                                                6.22293225377362e-01, 6.06862234421421e-01, 5.90620977219238e-01, 5.73713674685234e-01, 5.56294157380652e-01,\n                                                5.38520466299030e-01, 5.20549864283470e-01, 5.02534528349752e-01, 4.84618079793488e-01, 4.66932998692464e-01,\n                                                4.49598879027715e-01, 4.32721419612633e-01, 4.16392015976506e-01, 4.00687814624252e-01, 3.85672105413697e-01,\n                                                3.71394951134473e-01, 3.57893978171020e-01, 3.45195273420426e-01, 3.33314348202034e-01, 3.22257139724563e-01,\n                                                3.12021026085031e-01, 3.02595833568102e-01, 2.93964816861152e-01, 2.86105594885456e-01, 2.78991027874927e-01,\n                                                2.72590025212367e-01, 2.66868278106653e-01, 2.61788916024123e-01, 2.57313090387232e-01, 2.53400492987222e-01,\n                                                2.50009819491503e-01, 2.47099190148155e-01, 2.44626540209079e-01, 2.42549991728765e-01, 2.40828216362804e-01,\n                                                2.39420795788103e-01, 2.38288582663149e-01, 2.37394060964327e-01, 2.36701700432473e-01, 2.36178296112154e-01,\n                                                2.35793280918223e-01, 2.35518997122526e-01, 2.35330911838933e-01, 2.35207762108928e-01, 2.35131617038697e-01,\n                                                2.35087847470979e-01, 2.35064997635593e-01, 2.35054557773438e-01, 2.35050641488076e-01, 2.35049576169860e-01,\n                                                2.35049418931350e-01, 2.35049403946689e-01, 2.35049097829794e-01, 2.35047023850523e-01, 2.35039399798605e-01,\n                                                2.35019077761024e-01, 2.34974607972546e-01, 2.34889460224881e-01, 2.34741441441159e-01, 2.34502348289141e-01,\n                                                2.34137893567976e-01, 2.33607943554471e-01, 2.32867099256989e-01, 2.31865646226424e-01, 2.30550883996955e-01,\n                                                2.28868826624939e-01, 2.26766240212807e-01, 2.24192952895077e-01, 2.21104339943945e-01, 2.17463855060654e-01,\n                                                2.13245453076180e-01, 2.08435733946040e-01, 2.03035637215823e-01, 1.97061532640440e-01, 1.90545586682120e-01,\n                                                1.83535333930411e-01, 1.76092442446418e-01, 1.68290726294249e-01, 1.60213520013968e-01, 1.51950581722399e-01,\n                                                1.43594728264123e-01, 1.35238423524967e-01, 1.26970537993511e-01, 1.18873474608758e-01, 1.11020815884995e-01,\n                                                1.03475595281090e-01, 9.62892381596809e-02, 8.95011612634384e-02, 8.31389705983376e-02, 7.72191605816772e-02,\n                                                7.17481947639946e-02, 6.67238405731858e-02, 6.21366355940687e-02, 5.79713777814597e-02, 5.42085530103300e-02,\n                                                5.08256368914282e-02, 4.77982308278442e-02, 4.51010127278941e-02, 4.27084994017477e-02, 4.05956300225441e-02,\n                                                3.87381882935074e-02, 3.71130856761077e-02, 3.56985299308228e-02, 3.44741030631113e-02, 3.34207712388412e-02,\n                                                3.25208468922469e-02, 3.17579205042193e-02, 3.11167766536755e-02, 3.05833061009295e-02, 3.01444229318051e-02,\n                                                2.97879932047067e-02, 2.95027791104552e-02, 2.92784003848929e-02, 2.91053126343748e-02, 2.89748003905004e-02,\n                                                2.88789811716050e-02, 2.88108156710507e-02, 2.87641184875760e-02, 2.87335636105048e-02, 2.87146791830502e-02,\n                                                2.87038268553026e-02, 2.86981622217120e-02, 2.86955742913975e-02, 2.86946035159090e-02, 2.86943394458312e-02,\n                                                2.86943004697982e-02, 2.86942966120414e-02, 2.86942162987387e-02, 2.86936721693891e-02, 2.86916719689359e-02,\n                                                2.86863407572184e-02, 2.86746765155819e-02, 2.86523495311890e-02, 2.86135584751008e-02, 2.85509577164262e-02,\n                                                2.84556719560918e-02, 2.83174150389804e-02, 2.81247289359712e-02, 2.78653554194257e-02, 2.75267460219126e-02,\n                                                2.70967049390762e-02, 2.65641446973852e-02, 2.59199166202499e-02, 2.51576593944982e-02, 2.42745923717607e-02,\n                                                2.32721693189646e-02, 2.21565068745271e-02, 2.09385128198356e-02, 1.96336634514154e-02, 1.82614152579141e-02,\n                                                1.68442793539647e-02, 1.54066309512473e-02, 1.39733627270822e-02, 1.25685131422095e-02, 1.12140039249802e-02,\n                                                9.92860422299202e-03, 8.72720556878548e-03, 7.62044835095210e-03, 6.61469509972434e-03, 5.71230641131493e-03,\n                                                4.91214752935321e-03, 4.21024023357219e-03, 3.60047536219454e-03, 3.07531306181730e-03, 2.62641627918470e-03,\n                                                2.24518343680558e-03, 1.92316496938361e-03, 1.65236334720831e-03, 1.42542682596059e-03, 1.23575377626750e-03,\n                                                1.07752756483848e-03, 9.45701994929493e-04, 8.35954845921805e-04, 7.44623117959975e-04, 6.68629520941266e-04,\n                                                6.05406586789314e-04, 5.52822796649366e-04, 5.09113875654776e-04, 4.72821341464424e-04, 4.42739256705238e-04,\n                                                4.17869087588230e-04, 3.97381882457637e-04, 3.80586753468748e-04, 3.66904740122465e-04, 3.55847332745185e-04,\n                                                3.46999082594834e-04, 3.40003784874199e-04, 3.34553731736520e-04, 3.30381540006641e-04, 3.27254083845929e-04,\n                                                3.24968101953260e-04, 3.23347088951209e-04, 3.22239115675416e-04, 3.21515253336457e-04, 3.21068308355876e-04,\n                                                3.20811613548244e-04, 3.20677669421343e-04, 3.20616486064296e-04, 3.20593536795144e-04, 3.20587294297070e-04,\n                                                3.20586372925646e-04, 3.20586277872792e-04, 3.20584260098400e-04, 3.20570589689595e-04, 3.20520340522989e-04,\n                                                3.20386430896491e-04, 3.20093556535284e-04, 3.19533369925296e-04, 3.18561396401407e-04, 3.16996307034856e-04,\n                                                3.14622288911437e-04, 3.11195312718837e-04, 3.06454029630032e-04, 3.00135759502496e-04, 2.91997500074359e-04,\n                                                2.81841071391398e-04, 2.69540463786910e-04, 2.55068337345676e-04, 2.38517689794548e-04, 2.20114309289698e-04,\n                                                2.00216090721739e-04, 1.79296811644747e-04, 1.57914448543295e-04, 1.36667110151478e-04, 1.16142394993801e-04,\n                                                9.68675724735135e-05, 7.92678441641215e-05, 6.36380981156037e-05, 5.01307850342414e-05, 3.87599402777994e-05,\n                                                2.94196727672613e-05, 2.19143093183050e-05, 1.59956318448451e-05, 1.13996684767415e-05, 7.87294942838912e-06,\n                                                5.17929910159864e-06, 3.08238533008875e-06, 1.27034896024725e-06, 1.10332964098347e-06, 2.03815046262434e-06,\n                                                2.52662630018108e-06, 2.71988431777004e-06, 2.65389672193805e-06, 2.37217012610813e-06, 1.95007815406711e-06,\n                                                1.48508880215559e-06, 1.07204694188567e-06, 7.75738200786691e-07, 6.08182798345069e-07, 5.25367926940135e-07,\n                                                4.63862765087697e-07, 3.85902076516231e-07, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                7.10542735760100e-15}),\nmadness::CubicInterpolationTable<double>(grid, {1.80000000000000e+01,  1.79999999580379e+01,  1.79999986604880e+01,  1.79999898693784e+01,\n                                                1.79999575520692e+01,  1.79998714039856e+01,  1.79996828608500e+01,  1.79993217392546e+01,\n                                                1.79986936239514e+01,  1.79976780956575e+01,  1.79961278655611e+01,  1.79938688534852e+01,\n                                                1.79907012175435e+01,  1.79864013159532e+01,  1.79807245582745e+01,  1.79734090852047e+01,\n                                                1.79641802040025e+01,  1.79527555004787e+01,  1.79388505468884e+01,  1.79221851253182e+01,\n                                                1.79024898845853e+01,  1.78795133410984e+01,  1.78530291168870e+01,  1.78228432789314e+01,\n                                                1.77888016034830e+01,  1.77507965409356e+01,  1.77087736080453e+01,  1.76627368944211e+01,\n                                                1.76127533497308e+01,  1.75589555263085e+01,  1.75015424947311e+01,  1.74407787282670e+01,\n                                                1.73769908607570e+01,  1.73105623508934e+01,  1.72419262196095e+01,  1.71715561506656e+01,\n                                                1.70999563432520e+01,  1.70276505691189e+01,  1.69551709103700e+01,  1.68830466383935e+01,\n                                                1.68117936452839e+01,  1.67419047658905e+01,  1.66738412422701e+01,  1.66080254934744e+01,\n                                                1.65448352711525e+01,  1.64845992116224e+01,  1.64275937411696e+01,  1.63740412540052e+01,\n                                                1.63241094601349e+01,  1.62779117905975e+01,  1.62355087467405e+01,  1.61969100850261e+01,\n                                                1.61620777362676e+01,  1.61309293658126e+01,  1.61033424872973e+01,  1.60791590462083e+01,\n                                                1.60581903901828e+01,  1.60402225408482e+01,  1.60250216775183e+01,  1.60123397369827e+01,\n                                                1.60019200268815e+01,  1.59935027438187e+01,  1.59868302824915e+01,  1.59816522197371e+01,\n                                                1.59777298584063e+01,  1.59748402210540e+01,  1.59727793929986e+01,  1.59713651284505e+01,\n                                                1.59704386518982e+01,  1.59698656092018e+01,  1.59695361480223e+01,  1.59693641342191e+01,\n                                                1.59692855384641e+01,  1.59692560542844e+01,  1.59692480338538e+01,  1.59692468500544e+01,\n                                                1.59692466880090e+01,  1.59692428610436e+01,  1.59692169328022e+01,  1.59691216180234e+01,\n                                                1.59688675451954e+01,  1.59683115200168e+01,  1.59672466920806e+01,  1.59653950312831e+01,\n                                                1.59624024807275e+01,  1.59578371062907e+01,  1.59511905070021e+01,  1.59418826815653e+01,\n                                                1.59292704611808e+01,  1.59126595141220e+01,  1.58913198011257e+01,  1.58645042119669e+01,\n                                                1.58314699440346e+01,  1.57915019975653e+01,  1.57439379675508e+01,  1.56881931227680e+01,\n                                                1.56237845983178e+01,  1.55503534173172e+01,  1.54676830331749e+01,  1.53757131791128e+01,\n                                                1.52745480492741e+01,  1.51644582173352e+01,  1.50458761941041e+01,  1.49193860710961e+01,\n                                                1.47857082025147e+01,  1.46456802470348e+01,  1.45002360471109e+01,  1.43503837363947e+01,\n                                                1.41971841639479e+01,  1.40417302922493e+01,  1.38851277843012e+01,  1.37284766641059e+01,\n                                                1.35728537996701e+01,  1.34192960408716e+01,  1.32687840964225e+01,  1.31222275474880e+01,\n                                                1.29804516412016e+01,  1.28441865815549e+01,  1.27140598994758e+01,  1.25905921792936e+01,\n                                                1.24741960452824e+01,  1.23651779837537e+01,  1.22637423754257e+01,  1.21699970651348e+01,\n                                                1.20839598747745e+01,  1.20055656158989e+01,  1.19346733247593e+01,  1.18710735850492e+01,\n                                                1.18144959037631e+01,  1.17646161616926e+01,  1.17210641800085e+01,  1.16834314388551e+01,\n                                                1.16512789626888e+01,  1.16241453575039e+01,  1.16015549519474e+01,  1.15830259607599e+01,\n                                                1.15680785571747e+01,  1.15562427127031e+01,  1.15470656399018e+01,  1.15401186580270e+01,\n                                                1.15350032945771e+01,  1.15313564389204e+01,  1.15288543782766e+01,  1.15272155712854e+01,\n                                                1.15262020494733e+01,  1.15256193804473e+01,  1.15253151762624e+01,  1.15251761832133e+01,\n                                                1.15251240421795e+01,  1.15251098585595e+01,  1.15251077650870e+01,  1.15251075663588e+01,\n                                                1.15251035147617e+01,  1.15250760646234e+01,  1.15249751554340e+01,  1.15247061718323e+01,\n                                                1.15241175242807e+01,  1.15229902569425e+01,  1.15210301271091e+01,  1.15178625661997e+01,\n                                                1.15130308907251e+01,  1.15059980777031e+01,  1.14961523463645e+01,  1.14828166896517e+01,\n                                                1.14652623689611e+01,  1.14427262205085e+01,  1.14144314228578e+01,  1.13796111502085e+01,\n                                                1.13375343003309e+01,  1.12875322628992e+01,  1.12290255133772e+01,  1.11615487125843e+01,\n                                                1.10847729923795e+01,  1.09985242313891e+01,  1.09027963680118e+01,  1.07977591303231e+01,\n                                                1.06837599277657e+01,  1.05613199796366e+01,  1.04311249943492e+01,  1.02940108420553e+01,\n                                                1.01509447107256e+01,  1.00030022683896e+01,  9.85134144221669e+00,  9.69717360524942e+00,\n                                                9.54173321498720e+00,  9.38624720549074e+00,  9.23190560578085e+00,  9.07983486728137e+00,\n                                                8.93107520059867e+00,  8.78656286787324e+00,  8.64711791401700e+00,  8.51343733126080e+00,\n                                                8.38609321596780e+00,  8.26553515256297e+00,  8.15209587464718e+00,  8.04599920656621e+00,\n                                                7.94736935641157e+00,  7.85624077802491e+00,  7.77256800693492e+00,  7.69623506986283e+00,\n                                                7.62706424481120e+00,  7.56482409394426e+00,  7.50923679838999e+00,  7.45998489324034e+00,\n                                                7.41671753697910e+00,  7.37905645880636e+00,  7.34660171661340e+00,  7.31893737377191e+00,\n                                                7.29563716943483e+00,  7.27627021861409e+00,  7.26040673794961e+00,  7.24762375329947e+00,\n                                                7.23751070825067e+00,  7.22967486044304e+00,  7.22374632720758e+00,  7.21938262529553e+00,\n                                                7.21627254295328e+00,  7.21413918729577e+00,  7.21274206613641e+00,  7.21187809055758e+00,\n                                                7.21138142105220e+00,  7.21112212370201e+00,  7.21100365063118e+00,  7.21095920762058e+00,\n                                                7.21094711807510e+00,  7.21094533368464e+00,  7.21094517488662e+00,  7.21094204892903e+00,\n                                                7.21092087014330e+00,  7.21084301523902e+00,  7.21063548689192e+00,  7.21018133770997e+00,\n                                                7.20931167018035e+00,  7.20779956907502e+00,  7.20535630403255e+00,  7.20163011597088e+00,\n                                                7.19620786599863e+00,  7.18861977232002e+00,  7.17834738141583e+00,  7.16483480756035e+00,\n                                                7.14750312525038e+00,  7.12576761284711e+00,  7.09905732972674e+00,  7.06683627846053e+00,\n                                                7.02862518112532e+00,  6.98402271479451e+00,  6.93272493934717e+00,  6.87454164341968e+00,\n                                                6.80940845616228e+00,  6.73739383288548e+00,  6.65870040970384e+00,  6.57366069905227e+00,\n                                                6.48272760409520e+00,  6.38646068919594e+00,  6.28550947691806e+00,  6.18059518567992e+00,\n                                                6.07249224477963e+00,  5.96201063826881e+00,  5.84997969638519e+00,  5.73723347092570e+00,\n                                                5.62459741439947e+00,  5.51287583765363e+00,  5.40283961460025e+00,  5.29521384247743e+00,\n                                                5.19066558647264e+00,  5.08979230868037e+00,  4.99311194024207e+00,  4.90105565900754e+00,\n                                                4.81396421871948e+00,  4.73208818970640e+00,  4.65559186737610e+00,  4.58456007467651e+00,\n                                                4.51900677734188e+00,  4.45888439825370e+00,  4.40409291208143e+00,  4.35448811791917e+00,\n                                                4.30988881630807e+00,  4.27008288190227e+00,  4.23483239272245e+00,  4.20387805534977e+00,\n                                                4.17694317501851e+00,  4.15373738691679e+00,  4.13396031229510e+00,  4.11730524519199e+00,\n                                                4.10346292106119e+00,  4.09212537097419e+00,  4.08298982535844e+00,  4.07576259925248e+00,\n                                                4.07016286644180e+00,  4.06592621241998e+00,  4.06280784602818e+00,  4.06058534715898e+00,\n                                                4.05906083331666e+00,  4.05806244108104e+00,  4.05744503914306e+00,  4.05709011653482e+00,\n                                                4.05690482138390e+00,  4.05682015996835e+00,  4.05678840078623e+00,  4.05677976154108e+00,\n                                                4.05677848640740e+00,  4.05677837367904e+00,  4.05677616302912e+00,  4.05676118557647e+00,\n                                                4.05670612726279e+00,  4.05655936498265e+00,  4.05623819438799e+00,  4.05562317198944e+00,\n                                                4.05455382336943e+00,  4.05282595581268e+00,  4.05019079620748e+00,  4.04635614952915e+00,\n                                                4.04098973417738e+00,  4.03372479200146e+00,  4.02416798776011e+00,  4.01190950192001e+00,\n                                                3.99653508286536e+00,  3.97763966614028e+00,  3.95484200259134e+00,  3.92779958490939e+00,\n                                                3.89622304995104e+00,  3.85988919183992e+00,  3.81865177387356e+00,  3.77244948852642e+00,\n                                                3.72131067465175e+00,  3.66535472083248e+00,  3.60479039886937e+00,  3.53991160570729e+00,\n                                                3.47109108508194e+00,  3.39877263425083e+00,  3.32346211596101e+00,  3.24571737733466e+00,\n                                                3.16613702408496e+00,  3.08534797993990e+00,  3.00399189019359e+00,  2.92271065974227e+00,\n                                                2.84213166936383e+00,  2.76285340680008e+00,  2.68543232456473e+00,  2.61037167648305e+00,\n                                                2.53811290874886e+00,  2.46902993201266e+00,  2.40342633025205e+00,  2.34153531603076e+00,\n                                                2.28352205234920e+00,  2.22948784394037e+00,  2.17947565575212e+00,  2.13347643278870e+00,\n                                                2.09143575691740e+00,  2.05326046471066e+00,  2.01882494967138e+00,  1.98797696954759e+00,\n                                                1.96054286618664e+00,  1.93633217654568e+00,  1.91514166709981e+00,  1.89675886012280e+00,\n                                                1.88096514063243e+00,  1.86753853935602e+00,  1.85625628232638e+00,  1.84689718414725e+00,\n                                                1.83924394200117e+00,  1.83308536346578e+00,  1.82821853544513e+00,  1.82445091622635e+00,\n                                                1.82160230993092e+00,  1.81950666432945e+00,  1.81801362067171e+00,  1.81698973892046e+00,\n                                                1.81631932403917e+00,  1.81590478857826e+00,  1.81566650287152e+00,  1.81554210525685e+00,\n                                                1.81548526901403e+00,  1.81546394810957e+00,  1.81545814833798e+00,  1.81545729230498e+00,\n                                                1.81545721545731e+00,  1.81545569520894e+00,  1.81544539533360e+00,  1.81540753236893e+00,\n                                                1.81530660719073e+00,  1.81508575309374e+00,  1.81466286076486e+00,  1.81392766551162e+00,\n                                                1.81273997988886e+00,  1.81092925061642e+00,  1.80829560838691e+00,  1.80461255774074e+00,\n                                                1.79963141619077e+00,  1.79308755233379e+00,  1.78470838857783e+00,  1.77422302493892e+00,\n                                                1.76137320955285e+00,  1.74592523710044e+00,  1.72768221100509e+00,  1.70649597600697e+00,\n                                                1.68227793435781e+00,  1.65500792175568e+00,  1.62474035597797e+00,  1.59160699342318e+00,\n                                                1.55581583792626e+00,  1.51764603091149e+00,  1.47743888686560e+00,  1.43558558551256e+00,\n                                                1.39251234652789e+00,  1.34866414860670e+00,  1.30448817556150e+00,  1.26041815838538e+00,\n                                                1.21686063654234e+00,  1.17418390898319e+00,  1.13271012732478e+00,  1.09271064989175e+00,\n                                                1.05440447300284e+00,  1.01795932078934e+00,  9.83494826384092e-01,  9.51087177874662e-01,\n                                                9.20774620327549e-01,  8.92563280072281e-01,  8.66432885850550e-01,  8.42342081643601e-01,\n                                                8.20233140966597e-01,  8.00035991072097e-01,  7.81671532433879e-01,  7.65054293235444e-01,\n                                                7.50094492563100e-01,  7.36699603417392e-01,  7.24775511794647e-01,  7.14227364942424e-01,\n                                                7.04960193734294e-01,  6.96879383359615e-01,  6.89891054788522e-01,  6.83902407682812e-01,\n                                                6.78822064021883e-01,  6.74560440829570e-01,  6.71030170002226e-01,  6.68146573300383e-01,\n                                                6.65828191086366e-01,  6.63997354488590e-01,  6.62580782599360e-01,  6.61510179425338e-01,\n                                                6.60722800035650e-01,  6.60161952119083e-01,  6.59777398320934e-01,  6.59525626483006e-01,\n                                                6.59369959247179e-01,  6.59280481156259e-01,  6.59233769911584e-01,  6.59212428158646e-01,\n                                                6.59204422292184e-01,  6.59202244517665e-01,  6.59201923083270e-01,  6.59201893452757e-01,\n                                                6.59201298653429e-01,  6.59197268816353e-01,  6.59182454946581e-01,  6.59142968433898e-01,\n                                                6.59056562427068e-01,  6.58891120061767e-01,  6.58603525350514e-01,  6.58138993449164e-01,\n                                                6.57430937020447e-01,  6.56401442310496e-01,  6.54962419498101e-01,  6.53017473781919e-01,\n                                                6.50464513793821e-01,  6.47199070643399e-01,  6.43118244586230e-01,  6.38125130156642e-01,\n                                                6.32133501097876e-01,  6.25072473187021e-01,  6.16890817825691e-01,  6.07560583897083e-01,\n                                                5.97079709097876e-01,  5.85473368437981e-01,  5.72793912838183e-01,  5.59119382387518e-01,\n                                                5.44550717726782e-01,  5.29207917021878e-01,  5.13225474858068e-01,  4.96747479755705e-01,\n                                                4.79922735589454e-01,  4.62900216231784e-01,  4.45825077575520e-01,  4.28835355673886e-01,\n                                                4.12059391672347e-01,  3.95613955860654e-01,  3.79602999881428e-01,  3.64116946654242e-01,\n                                                3.49232426183352e-01,  3.35012374608777e-01,  3.21506426736658e-01,  3.08751544030173e-01,\n                                                2.96772828350694e-01,  2.85584476432724e-01,  2.75190832299575e-01,  2.65587496193856e-01,\n                                                2.56762450538467e-01,  2.48697166852921e-01,  2.41367662699876e-01,  2.34745484384376e-01,\n                                                2.28798598708501e-01,  2.23492184902938e-01,  2.18789325251652e-01,  2.14651599357484e-01,\n                                                2.11039592090682e-01,  2.07913328811088e-01,  2.05232653390365e-01,  2.02957564931186e-01,\n                                                2.01048528016784e-01,  1.99466769025918e-01,  1.98174567765090e-01,  1.97135549697052e-01,\n                                                1.96314979712373e-01,  1.95680054055082e-01,  1.95200183033766e-01,  1.94847253870471e-01,\n                                                1.94595860755118e-01,  1.94423488099915e-01,  1.94310633238043e-01,  1.94240856372289e-01,\n                                                1.94200748317247e-01,  1.94179810245465e-01,  1.94170243912207e-01,  1.94166655322270e-01,\n                                                1.94165679145591e-01,  1.94165535064204e-01,  1.94165521333396e-01,  1.94165240831229e-01,\n                                                1.94163340395725e-01,  1.94156354312867e-01,  1.94137732895655e-01,  1.94096985021019e-01,\n                                                1.94018965749631e-01,  1.93883345217074e-01,  1.93664295689214e-01,  1.93330434033257e-01,\n                                                1.92845055842280e-01,  1.92166693767025e-01,  1.91250024854604e-01,  1.90047138623129e-01,\n                                                1.88509158426758e-01,  1.86588183397696e-01,  1.84239487997278e-01,  1.81423883353343e-01,\n                                                1.78110112744079e-01,  1.74277127387501e-01,  1.69916073017387e-01,  1.65031816952581e-01,\n                                                1.59643862421511e-01,  1.53786532446492e-01,  1.47508357563215e-01,  1.40870665303943e-01,\n                                                1.33945437826977e-01,  1.26812569275248e-01,  1.19556708355930e-01,  1.12263907441360e-01,\n                                                1.05018312667227e-01,  9.78991185206226e-02,  9.09779770409784e-02,  8.43170008318843e-02,\n                                                7.79674377177777e-02,  7.19690312701466e-02,  6.63500234470114e-02,  6.11277095091012e-02,\n                                                5.63094250011567e-02,  5.18938309562813e-02,  4.78723651471782e-02,  4.42307409275138e-02,\n                                                4.09503968223923e-02,  3.80098253253358e-02,  3.53857347200019e-02,  3.30540205232772e-02,\n                                                3.09905417697927e-02,  2.91717112187762e-02,  2.75749177847509e-02,  2.61788046735170e-02,\n                                                2.49634286770828e-02,  2.39103257358693e-02,  2.30025060254100e-02,  2.22243991351299e-02,\n                                                2.15617668706400e-02,  2.10015981556424e-02,  2.05319976239089e-02,  2.01420768620650e-02,\n                                                1.98218549053344e-02,  1.95621724788140e-02,  1.93546225795593e-02,  1.91914982808044e-02,\n                                                1.90657570988044e-02,  1.89709999103904e-02,  1.89014612830718e-02,  1.88520072317324e-02,\n                                                1.88181358993873e-02,  1.87959765147490e-02,  1.87822822192665e-02,  1.87744129587060e-02,\n                                                1.87703055393982e-02,  1.87684290639076e-02,  1.87677251717240e-02,  1.87675336996200e-02,\n                                                1.87675054388698e-02,  1.87675026416869e-02,  1.87674444081090e-02,  1.87670498712187e-02,\n                                                1.87655995745146e-02,  1.87617340971364e-02,  1.87532770354935e-02,  1.87370901009949e-02,\n                                                1.87089701246670e-02,  1.86635991719797e-02,  1.85945603170516e-02,  1.84944323361336e-02,\n                                                1.83549759244528e-02,  1.81674212158853e-02,  1.79228606701365e-02,  1.76127423590877e-02,\n                                                1.72294464422009e-02,  1.67669130515620e-02,  1.62212746972621e-02,  1.55914332980309e-02,\n                                                1.48795142172169e-02,  1.40911303468805e-02,  1.32354005340680e-02,  1.23246889332336e-02,\n                                                1.13740632799946e-02,  1.04005062538022e-02,  9.42194884164138e-03,  8.45622120008471e-03,\n                                                7.52002931384510e-03,  6.62806179105857e-03,  5.79231100783772e-03,  5.02166061024312e-03,\n                                                4.32175364216647e-03,  3.69511955141988e-03,  3.14151017727937e-03,  2.65837822640336e-03,\n                                                2.24142745360467e-03,  1.88517002695221e-03,  1.58344009841116e-03,  1.32982969223860e-03,\n                                                1.11803025781398e-03,  9.42077966275434e-04,  7.96511408445610e-04,  6.76456271257564e-04,\n                                                5.77653446615756e-04,  4.96446225870528e-04,  4.29740205838414e-04,  3.74947220734612e-04,\n                                                3.29922302771735e-04,  2.92900308288324e-04,  2.62436466915261e-04,  2.37352998755824e-04,\n                                                2.16692428345766e-04,  1.99677416787836e-04,  1.85676660066747e-04,  1.74176362293110e-04,\n                                                1.64756763428642e-04,  1.57073125276241e-04,  1.50840508766237e-04,  1.45821671022617e-04,\n                                                1.41817482820272e-04,  1.38659381903494e-04,  1.36203489688569e-04,  1.34326101953519e-04,\n                                                1.32920312982066e-04,  1.31893558091178e-04,  1.31165873227701e-04,  1.30668682370327e-04,\n                                                1.30343937886579e-04,  1.30143457717224e-04,  1.30028326378095e-04,  1.29968253624213e-04,\n                                                1.29940814140639e-04,  1.29930521985955e-04,  1.29927722394285e-04,  1.29927309181710e-04,\n                                                1.29927266570462e-04,  1.29926362184563e-04,  1.29920234989811e-04,  1.29897713115668e-04,\n                                                1.29837696071888e-04,  1.29706441533983e-04,  1.29455422918312e-04,  1.29019991177870e-04,\n                                                1.28319139705013e-04,  1.27256731072833e-04,  1.25724573038610e-04,  1.23607693463867e-04,\n                                                1.20792022382687e-04,  1.17174412718413e-04,  1.12674510031496e-04,  1.07247446688774e-04,\n                                                1.00895773549325e-04,  9.36785985423683e-05,  8.57157656604102e-05,  7.71852593466349e-05,\n                                                6.83129539247318e-05,  5.93552629020166e-05,  5.05768621934521e-05,  4.22269433215661e-05,\n                                                3.45178400706914e-05,  2.76090729336431e-05,  2.15981474980254e-05,  1.65177374888970e-05,\n                                                1.23382956367379e-05,  8.97603610638953e-06,  6.30724700556584e-06,  4.18784708955400e-06,\n                                                2.46788971125511e-06,  9.47883311397391e-07,  9.16052524502220e-07,  1.57033402103934e-06,\n                                                1.94184666568731e-06,  2.22873596200657e-06,  2.47646187645501e-06,  2.65047703607024e-06,\n                                                2.68825952787211e-06,  2.54743378746980e-06,  2.23353340800259e-06,  1.80205361033359e-06,\n                                                1.33996466189501e-06,  9.37061379602255e-07,  6.56324605330383e-07,  5.07256281423452e-07,\n                                                4.39080679370818e-07,  3.83801982195564e-07,  -1.42108547152020e-14, -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.90000000000000e+01, 1.89999999547145e+01, 1.89999985543982e+01, 1.89999890670298e+01, 1.89999541901758e+01,\n                                                1.89998612191029e+01, 1.89996577430973e+01, 1.89992680197255e+01, 1.89985901546084e+01, 1.89974941876537e+01,\n                                                1.89958211568034e+01, 1.89933831787791e+01, 1.89899645549404e+01, 1.89853238812932e+01, 1.89791971169031e+01,\n                                                1.89713015461241e+01, 1.89613405580213e+01, 1.89490091608655e+01, 1.89340001489139e+01, 1.89160108396823e+01,\n                                                1.88947502982000e+01, 1.88699469554897e+01, 1.88413565074938e+01, 1.88087699455575e+01, 1.87720215211550e+01,\n                                                1.87309963904862e+01, 1.86856376274152e+01, 1.86359522473742e+01, 1.85820158626501e+01, 1.85239756015647e+01,\n                                                1.84620509768847e+01, 1.83965324825124e+01, 1.83277778252625e+01, 1.82562058471841e+01, 1.81822883461271e+01,\n                                                1.81065401397049e+01, 1.80295078243167e+01, 1.79517577452625e+01, 1.78738637116282e+01, 1.77963949627193e+01,\n                                                1.77199048293043e+01, 1.76449204444200e+01, 1.75719337579817e+01, 1.75013940090959e+01, 1.74337017194946e+01,\n                                                1.73692041972829e+01, 1.73081924851322e+01, 1.72508996510789e+01, 1.71975003009051e+01, 1.71481111850808e+01,\n                                                1.71027927763630e+01, 1.70615517024761e+01, 1.70243439285236e+01, 1.69910785933912e+01, 1.69616224117074e+01,\n                                                1.69358045570162e+01, 1.69134219424113e+01, 1.68942448122183e+01, 1.68780225529970e+01, 1.68644896250610e+01,\n                                                1.68533715079185e+01, 1.68443905456858e+01, 1.68372715727717e+01, 1.68317471970733e+01, 1.68275626185329e+01,\n                                                1.68244798659002e+01, 1.68222813444027e+01, 1.68207726018365e+01, 1.68197842401254e+01, 1.68191729230370e+01,\n                                                1.68188214575828e+01, 1.68186379554780e+01, 1.68185541106033e+01, 1.68185226572943e+01, 1.68185141012126e+01,\n                                                1.68185128383522e+01, 1.68185126654844e+01, 1.68185085829321e+01, 1.68184809230549e+01, 1.68183792426481e+01,\n                                                1.68181082017647e+01, 1.68175150442984e+01, 1.68163791108155e+01, 1.68144038194795e+01, 1.68112115097430e+01,\n                                                1.68063414950193e+01, 1.67992516116994e+01, 1.67893234786654e+01, 1.67758715895478e+01, 1.67581562455660e+01,\n                                                1.67354001972732e+01, 1.67068086982251e+01, 1.66715924845219e+01, 1.66289929869415e+01, 1.65783088674597e+01,\n                                                1.65189227662161e+01, 1.64503269730124e+01, 1.63721466313684e+01, 1.62841590797036e+01, 1.61863080673332e+01,\n                                                1.60787118727408e+01, 1.59616647914604e+01, 1.58356320082385e+01, 1.57012384437940e+01, 1.55592526671836e+01,\n                                                1.54105672879179e+01, 1.52561773165850e+01, 1.50971577961908e+01, 1.49346416160972e+01, 1.47697979437885e+01,\n                                                1.46038112930764e+01, 1.44378610215058e+01, 1.42731010848645e+01, 1.41106401525427e+01, 1.39515225916850e+01,\n                                                1.37967111905955e+01, 1.36470726489063e+01, 1.35033667260396e+01, 1.33662395402999e+01, 1.32362209820641e+01,\n                                                1.31137257194494e+01, 1.29990569687813e+01, 1.28924121236162e+01, 1.27938894477808e+01, 1.27034952551547e+01,\n                                                1.26211512351690e+01, 1.25467017791161e+01, 1.24799212938471e+01, 1.24205215580164e+01, 1.23681591966689e+01,\n                                                1.23224433401616e+01, 1.22829435073762e+01, 1.22491977202031e+01, 1.22207208213713e+01, 1.21970129332145e+01,\n                                                1.21775679619550e+01, 1.21618820214445e+01, 1.21494616231257e+01, 1.21398314568569e+01, 1.21325415719613e+01,\n                                                1.21271737613014e+01, 1.21233469548380e+01, 1.21207214440036e+01, 1.21190017844224e+01, 1.21179382612958e+01,\n                                                1.21173268474536e+01, 1.21170076361667e+01, 1.21168617863132e+01, 1.21168070730658e+01, 1.21167921897423e+01,\n                                                1.21167899929951e+01, 1.21167897844633e+01, 1.21167855329937e+01, 1.21167567286918e+01, 1.21166508414847e+01,\n                                                1.21163685885517e+01, 1.21157509025909e+01, 1.21145680278153e+01, 1.21125112105407e+01, 1.21091874155511e+01,\n                                                1.21041174560998e+01, 1.20967378691399e+01, 1.20864067913367e+01, 1.20724139882307e+01, 1.20539950523581e+01,\n                                                1.20303496129099e+01, 1.20006631913955e+01, 1.19641321035005e+01, 1.19199905637279e+01, 1.18675389213624e+01,\n                                                1.18061717745025e+01, 1.17354046052611e+01, 1.16548975796514e+01, 1.15644752715791e+01, 1.14641412916462e+01,\n                                                1.13540870945560e+01, 1.12346945538788e+01, 1.11065321797518e+01, 1.09703450841206e+01, 1.08270389745017e+01,\n                                                1.06776586190335e+01, 1.05233614230494e+01, 1.03653870220807e+01, 1.02050241162616e+01, 1.00435760871881e+01,\n                                                9.88232716297044e+00, 9.72251094854473e+00, 9.56528297156679e+00, 9.41169851867306e+00, 9.26269651252159e+00,\n                                                9.11908959816639e+00, 8.98156006437303e+00, 8.85066079929621e+00, 8.72682021528668e+00, 8.61034998286350e+00,\n                                                8.50145446708351e+00, 8.40024091966534e+00, 8.30672969974834e+00, 8.22086403132819e+00, 8.14251902269421e+00,\n                                                8.07150985176975e+00, 8.00759915222994e+00, 7.95050371898848e+00, 7.89990069430942e+00, 7.85543340631241e+00,\n                                                7.81671701920108e+00, 7.78334412718447e+00, 7.75489038801167e+00, 7.73092025172747e+00, 7.71099279866325e+00,\n                                                7.69466765984157e+00, 7.68151095446505e+00, 7.67110114443655e+00, 7.66303467645095e+00, 7.65693125974441e+00,\n                                                7.65243861371040e+00, 7.64923651570881e+00, 7.64703998646255e+00, 7.64560146872840e+00, 7.64471188387294e+00,\n                                                7.64420048910574e+00, 7.64393350312452e+00, 7.64381151689080e+00, 7.64376575594499e+00, 7.64375330788668e+00,\n                                                7.64375147058039e+00, 7.64375130707324e+00, 7.64374808841576e+00, 7.64372628157315e+00, 7.64364611784312e+00,\n                                                7.64343243484346e+00, 7.64296481548783e+00, 7.64206934763863e+00, 7.64051236913749e+00, 7.63799654222903e+00,\n                                                7.63415957510174e+00, 7.62857587079352e+00, 7.62076132781962e+00, 7.61018143475564e+00, 7.59626268575951e+00,\n                                                7.57840719160826e+00, 7.55601017220179e+00, 7.52847979955104e+00, 7.49525863124763e+00, 7.45584565798697e+00,\n                                                7.40981781638436e+00, 7.35684972458649e+00, 7.29673041458257e+00, 7.22937598271095e+00, 7.15483736139602e+00,\n                                                7.07330280898813e+00, 6.98509517258945e+00, 6.89066443039140e+00, 6.79057638364045e+00, 6.68549856867544e+00,\n                                                6.57618444862817e+00, 6.46345672063779e+00, 6.34819019329741e+00, 6.23129426102093e+00, 6.11369467360521e+00,\n                                                5.99631421635754e+00, 5.88005217274741e+00, 5.76576302453122e+00, 5.65423559746678e+00, 5.54617450139677e+00,\n                                                5.44218592658084e+00, 5.34276944920466e+00, 5.24831652581989e+00, 5.15911513840160e+00, 5.07535902205290e+00,\n                                                4.99715939428298e+00, 4.92455718608533e+00, 4.85753429036913e+00, 4.79602302421304e+00, 4.73991361340904e+00,\n                                                4.68905992536939e+00, 4.64328388181999e+00, 4.60237902290306e+00, 4.56611363595421e+00, 4.53423376256568e+00,\n                                                4.50646629395002e+00, 4.48252227559684e+00, 4.46210047319021e+00, 4.44489120102697e+00, 4.43058037735259e+00,\n                                                4.41885374364430e+00, 4.40940116359193e+00, 4.40192090048593e+00, 4.39612375835443e+00, 4.39173696286339e+00,\n                                                4.38850765358882e+00, 4.38620586079014e+00, 4.38462684805640e+00, 4.38359271750722e+00, 4.38295319635722e+00,\n                                                4.38258555169932e+00, 4.38239361283899e+00, 4.38230591548036e+00, 4.38227301735012e+00, 4.38226406827771e+00,\n                                                4.38226274741397e+00, 4.38226263064282e+00, 4.38226034071231e+00, 4.38224482611804e+00, 4.38218779315624e+00,\n                                                4.38203576673839e+00, 4.38170307341970e+00, 4.38106597486349e+00, 4.37995820821368e+00, 4.37816817339172e+00,\n                                                4.37543798671707e+00, 4.37146459179516e+00, 4.36590307754271e+00, 4.35837229439930e+00, 4.34846277885443e+00,\n                                                4.33574689128801e+00, 4.31979094453094e+00, 4.30016895758175e+00, 4.27647752375081e+00, 4.24835115388529e+00,\n                                                4.21547736509530e+00, 4.17761075390337e+00, 4.13458533268382e+00, 4.08632451862270e+00, 4.03284832710558e+00,\n                                                3.97427750344815e+00, 3.91083448952870e+00, 3.84284123502069e+00, 3.77071391872805e+00, 3.69495466435843e+00,\n                                                3.61614035852759e+00, 3.53490875122753e+00, 3.45194216561468e+00, 3.36794935621571e+00, 3.28364629017405e+00,\n                                                3.19973682337540e+00, 3.11689434336815e+00, 3.03574541783615e+00, 2.95685631812938e+00, 2.88072301106594e+00,\n                                                2.80776487911972e+00, 2.73832209567560e+00, 2.67265629717841e+00, 2.61095399004110e+00, 2.55333201979141e+00,\n                                                2.49984440829624e+00, 2.45048991495704e+00, 2.40521977651150e+00, 2.36394520406884e+00, 2.32654434521840e+00,\n                                                2.29286853880147e+00, 2.26274779122782e+00, 2.23599548200675e+00, 2.21241236210405e+00, 2.19178994383330e+00,\n                                                2.17391339843427e+00, 2.15856408080173e+00, 2.14552179333358e+00, 2.13456688545794e+00, 2.12548226449866e+00,\n                                                2.11805536917926e+00, 2.11208013103147e+00, 2.10735892291747e+00, 2.10370446939638e+00, 2.10094167232537e+00,\n                                                2.09890928834329e+00, 2.09746138398665e+00, 2.09646849002601e+00, 2.09581837958816e+00, 2.09541640456102e+00,\n                                                2.09518534086720e+00, 2.09506471408636e+00, 2.09500960083526e+00, 2.09498892629525e+00, 2.09498330235147e+00,\n                                                2.09498247227033e+00, 2.09498239775241e+00, 2.09498092359255e+00, 2.09497093597439e+00, 2.09493422090876e+00,\n                                                2.09483635567435e+00, 2.09462219852592e+00, 2.09421213293793e+00, 2.09349924747678e+00, 2.09234763094686e+00,\n                                                2.09059195894292e+00, 2.08803853814434e+00, 2.08446795323135e+00, 2.07963942238608e+00, 2.07329690575205e+00,\n                                                2.06517692358981e+00, 2.05501792700149e+00, 2.04257092826503e+00, 2.02761094960704e+00, 2.00994870373719e+00,\n                                                1.98944179643818e+00, 1.96600466336523e+00, 1.93961644175281e+00, 1.91032604988699e+00, 1.87825391047153e+00,\n                                                1.84359000246629e+00, 1.80658823810917e+00, 1.76755750140808e+00, 1.72685000492320e+00, 1.68484787438984e+00,\n                                                1.64194901461241e+00, 1.59855332135587e+00, 1.55505018256977e+00, 1.51180798256683e+00, 1.46916602826925e+00,\n                                                1.42742900990486e+00, 1.38686383924085e+00, 1.34769851295986e+00, 1.31012254417326e+00, 1.27428848848726e+00,\n                                                1.24031414390204e+00, 1.20828509880744e+00, 1.17825741087614e+00, 1.15026029805916e+00, 1.12429879596374e+00,\n                                                1.10035637789770e+00, 1.07839754723395e+00, 1.05837040442499e+00, 1.04020917324316e+00, 1.02383665231236e+00,\n                                                1.00916654578186e+00, 9.96105624569765e-01, 9.84555677070766e-01, 9.74415223178507e-01, 9.65580984253464e-01,\n                                                9.57949120491293e-01, 9.51416262938981e-01, 9.45880378186711e-01, 9.41241508692226e-01, 9.37402430882745e-01,\n                                                9.34269267413107e-01, 9.31752080434187e-01, 9.29765460833877e-01, 9.28229115587875e-01, 9.27068442971127e-01,\n                                                9.26215074655296e-01, 9.25607355655455e-01, 9.25190728402882e-01, 9.24917986280189e-01, 9.24749364756686e-01,\n                                                9.24652444436049e-01, 9.24601849186367e-01, 9.24578733144322e-01, 9.24570061736567e-01, 9.24567702923952e-01,\n                                                9.24567354768897e-01, 9.24567322675220e-01, 9.24566678430676e-01, 9.24562313599676e-01, 9.24546268326893e-01,\n                                                9.24503499884356e-01, 9.24409914187606e-01, 9.24230732338724e-01, 9.23919277394976e-01, 9.23416269403237e-01,\n                                                9.22649718933926e-01, 9.21535508376685e-01, 9.19978742956744e-01, 9.17875936402911e-01, 9.15118066399348e-01,\n                                                9.11594490358212e-01, 9.07197652345854e-01, 9.01828439165030e-01, 8.95401962227954e-01, 8.87853459045974e-01,\n                                                8.79143932930393e-01, 8.69265091829380e-01, 8.58243117016908e-01, 8.46140798707296e-01, 8.33057626850614e-01,\n                                                8.19127529196596e-01, 8.04514112450089e-01, 7.89403490111802e-01, 7.73995066769739e-01, 7.58490967527816e-01,\n                                                7.43085098317714e-01, 7.27953016253515e-01, 7.13243791408111e-01, 6.99074798995913e-01, 6.85529914930605e-01,\n                                                6.72661005643224e-01, 6.60492065321449e-01, 6.49025006777734e-01, 6.38246026911311e-01, 6.28131619538280e-01,\n                                                6.18653604291218e-01, 6.09782869962622e-01, 6.01491809257087e-01, 5.93755608257467e-01, 5.86552645686709e-01,\n                                                5.79864274914886e-01, 5.73674233419570e-01, 5.67967874731217e-01, 5.62731364107560e-01, 5.57950931118242e-01,\n                                                5.53612234085907e-01, 5.49699863416976e-01, 5.46196991910175e-01, 5.43085168143083e-01, 5.40344242016143e-01,\n                                                5.37952407814597e-01, 5.35886348473891e-01, 5.34121464221819e-01, 5.32632168847130e-01, 5.31392237165232e-01,\n                                                5.30375187640427e-01, 5.29554684517080e-01, 5.28904944220734e-01, 5.28401131269078e-01, 5.28019729560967e-01,\n                                                5.27738875772712e-01, 5.27538642760394e-01, 5.27401262400165e-01, 5.27311279219958e-01, 5.27255628472695e-01,\n                                                5.27223634918403e-01, 5.27206931428157e-01, 5.27199299471938e-01, 5.27196436462717e-01, 5.27195657654882e-01,\n                                                5.27195542704483e-01, 5.27195531749825e-01, 5.27195307960621e-01, 5.27193791757245e-01, 5.27188218054118e-01,\n                                                5.27173360768362e-01, 5.27140846775389e-01, 5.27078581703197e-01, 5.26970311946421e-01, 5.26795345264162e-01,\n                                                5.26528449836949e-01, 5.26139948373256e-01, 5.25596019343347e-01, 5.24859211209662e-01, 5.23889167242107e-01,\n                                                5.22643548038978e-01, 5.21079126566462e-01, 5.19153017347353e-01, 5.16823988996563e-01, 5.14053799723623e-01,\n                                                5.10808490861223e-01, 5.07059575512422e-01, 5.02785068387659e-01, 4.97970317554035e-01, 4.92608616381215e-01,\n                                                4.86701590907177e-01, 4.80259370969719e-01, 4.73300560949856e-01, 4.65852027930918e-01, 4.57948523183198e-01,\n                                                4.49632149546893e-01, 4.40951684617286e-01, 4.31961768803735e-01, 4.22721968529302e-01, 4.13295727684201e-01,\n                                                4.03749224490895e-01, 3.94150155881945e-01, 3.84566477087727e-01, 3.75065129910300e-01, 3.65710798251154e-01,\n                                                3.56564732668541e-01, 3.47683685873751e-01, 3.39118997366551e-01, 3.30915857820244e-01, 3.23112773122155e-01,\n                                                3.15741235546490e-01, 3.08825597054845e-01, 3.02383128756642e-01, 2.96424242286978e-01, 2.90952843880724e-01,\n                                                2.85966790277698e-01, 2.81458416859032e-01, 2.77415111860616e-01, 2.73819915282377e-01, 2.70652126371662e-01,\n                                                2.67887908589994e-01, 2.65500885234822e-01, 2.63462722045329e-01, 2.61743695026407e-01, 2.60313242400017e-01,\n                                                2.59140499193617e-01, 2.58194811752926e-01, 2.57446227734128e-01, 2.56865955223539e-01, 2.56426782877540e-01,\n                                                2.56103451659083e-01, 2.55872968092696e-01, 2.55714849109864e-01, 2.55611289564023e-01, 2.55547245321598e-01,\n                                                2.55510427365653e-01, 2.55491205400823e-01, 2.55482422800853e-01, 2.55479128156452e-01, 2.55478231934433e-01,\n                                                2.55478099653978e-01, 2.55478086561165e-01, 2.55477813986030e-01, 2.55475967252348e-01, 2.55469178509109e-01,\n                                                2.55451082558704e-01, 2.55411481772740e-01, 2.55335648271654e-01, 2.55203794282437e-01, 2.54990739889500e-01,\n                                                2.54665805299744e-01, 2.54192951870465e-01, 2.53531192016808e-01, 2.52635282232443e-01, 2.51456705400525e-01,\n                                                2.49944938083217e-01, 2.48048985526520e-01, 2.45719151951807e-01, 2.42908996870014e-01, 2.39577410479864e-01,\n                                                2.35690723792654e-01, 2.31224753296136e-01, 2.26166667287224e-01, 2.20516553246558e-01, 2.14288564774950e-01,\n                                                2.07511534736824e-01, 2.00228960272348e-01, 1.92498296521435e-01, 1.84389539207043e-01, 1.75983129572785e-01,\n                                                1.67367273963656e-01, 1.58634827571635e-01, 1.49879939041337e-01, 1.41194681440147e-01, 1.32665899480983e-01,\n                                                1.24372480779673e-01, 1.16383213094036e-01, 1.08755327046310e-01, 1.01533754626118e-01, 9.47510681221431e-02,\n                                                8.84280106316595e-02, 8.25744933282557e-02, 7.71909178924517e-02, 7.22696832942589e-02, 6.77967505684833e-02,\n                                                6.37531624238825e-02, 6.01164416306119e-02, 5.68618191201793e-02, 5.39632667906105e-02, 5.13943295535633e-02,\n                                                4.91287656574890e-02, 4.71410139982993e-02, 4.54065126697998e-02, 4.39018952907269e-02, 4.26050915645568e-02,\n                                                4.14953568669212e-02, 4.05532530377535e-02, 3.97605994340005e-02, 3.91004099736065e-02, 3.85568285537516e-02,\n                                                3.81150719572609e-02, 3.77613862291426e-02, 3.74830195574347e-02, 3.72682119832000e-02, 3.71061998664111e-02,\n                                                3.69872310368855e-02, 3.69025850570779e-02, 3.68445921004934e-02, 3.68066436595100e-02, 3.67831886464671e-02,\n                                                3.67697093923134e-02, 3.67626734713511e-02, 3.67594590353022e-02, 3.67582532434554e-02, 3.67579252439434e-02,\n                                                3.67578768320875e-02, 3.67578718382191e-02, 3.67577658298899e-02, 3.67570476146746e-02, 3.67544074817836e-02,\n                                                3.67473706418195e-02, 3.67319746724348e-02, 3.67025048060157e-02, 3.66513041757415e-02, 3.65686783237358e-02,\n                                                3.64429153588723e-02, 3.62604442294625e-02, 3.60061524895805e-02, 3.56638804175553e-02, 3.52170992385794e-02,\n                                                3.46497667865719e-02, 3.39473342768422e-02, 3.30978541508493e-02, 3.20931137604425e-02, 3.09296968968766e-02,\n                                                2.96098597305452e-02, 2.81421046892092e-02, 2.65413492665765e-02, 2.48286185208677e-02, 2.30302384503105e-02,\n                                                2.11765669110768e-02, 1.93003601602477e-02, 1.74349254276578e-02, 1.56122426279239e-02, 1.38612440975585e-02,\n                                                1.22064180608632e-02, 1.06668535059029e-02, 9.25578076781974e-03, 7.98059596204581e-03, 6.84330095148056e-03,\n                                                5.84125276497005e-03, 4.96810054356800e-03, 4.21479157515137e-03, 3.57054476848617e-03, 3.02371414685609e-03,\n                                                2.56249304863942e-03, 2.17543953047183e-03, 1.85183144401435e-03, 1.58187995533865e-03, 1.35683777142859e-03,\n                                                1.16903332634877e-03, 1.01185152957228e-03, 8.79674079364179e-04, 7.67791518082817e-04, 6.72301723856350e-04,\n                                                5.90009267831704e-04, 5.18334494760353e-04, 4.55233290093560e-04, 3.99123250858224e-04, 3.48811740618515e-04,\n                                                3.03424522105189e-04, 2.62337042727268e-04, 2.25111806830824e-04, 1.91444516250527e-04, 1.61119989947167e-04,\n                                                1.33977452552614e-04, 1.09884084189105e-04, 8.87156086477603e-05, 7.03428178887577e-05, 5.46230461715425e-05,\n                                                4.13956557849815e-05, 3.04806244066924e-05, 2.16793906062662e-05, 1.47772400502788e-05, 9.54668375641177e-06,\n                                                5.75145960368673e-06, 3.15095466874027e-06, 1.50499068141130e-06, 5.79058326621862e-07, 0.00000000000000e+00,\n                                                3.55271367880050e-15}),\nmadness::CubicInterpolationTable<double>(grid, {2.00000000000000e+01, 1.99999999513119e+01, 1.99999984457798e+01, 1.99999882455575e+01, 1.99999507481523e+01,\n                                                1.99998507914632e+01, 1.99996320266477e+01, 1.99992130197006e+01, 1.99984842187050e+01, 1.99973058949943e+01,\n                                                1.99955071342349e+01, 1.99928859194599e+01, 1.99892103144423e+01, 1.99842207247950e+01, 1.99776331880598e+01,\n                                                1.99691436245881e+01, 1.99584329691442e+01, 1.99451730984600e+01, 1.99290334703952e+01, 1.99096883921419e+01,\n                                                1.98868248329813e+01, 1.98601506858502e+01, 1.98294033566254e+01, 1.97943585180605e+01, 1.97548388079648e+01,\n                                                1.97107221842680e+01, 1.96619495833656e+01, 1.96085314760804e+01, 1.95505528920272e+01, 1.94881765002345e+01,\n                                                1.94216433983668e+01, 1.93512713740982e+01, 1.92774505511829e+01, 1.92006365034312e+01, 1.91213410915842e+01,\n                                                1.90401214297403e+01, 1.89575675014427e+01, 1.88742890089874e+01, 1.87909020490833e+01, 1.87080161676875e+01,\n                                                1.86262222670085e+01, 1.85460817324813e+01, 1.84681170321487e+01, 1.83928039289925e+01, 1.83205653487597e+01,\n                                                1.82517668680824e+01, 1.81867137325177e+01, 1.81256492805427e+01, 1.80687546342333e+01, 1.80161495158011e+01,\n                                                1.79678940565791e+01, 1.79239914770449e+01, 1.78843915294897e+01, 1.78489946064061e+01, 1.78176564259572e+01,\n                                                1.77901932102236e+01, 1.77663872722012e+01, 1.77459929241372e+01, 1.77287426135086e+01, 1.77143531847689e+01,\n                                                1.77025321560855e+01, 1.76929838918879e+01, 1.76854155453961e+01, 1.76795426415725e+01, 1.76750941711422e+01,\n                                                1.76718170712715e+01, 1.76694799786433e+01, 1.76678761561739e+01, 1.76668255152043e+01, 1.76661756800420e+01,\n                                                1.76658020702382e+01, 1.76656070067055e+01, 1.76655178793002e+01, 1.76654844443286e+01, 1.76654753491863e+01,\n                                                1.76654740067617e+01, 1.76654738230027e+01, 1.76654694832367e+01, 1.76654400807021e+01, 1.76653319941518e+01,\n                                                1.76650438772221e+01, 1.76644133511746e+01, 1.76632058597771e+01, 1.76611061517338e+01, 1.76577128134998e+01,\n                                                1.76525362249644e+01, 1.76450002488137e+01, 1.76344478866529e+01, 1.76201510361684e+01, 1.76013243592037e+01,\n                                                1.75771431175593e+01, 1.75467646509538e+01, 1.75093529625636e+01, 1.74641056490967e+01, 1.74102821775023e+01,\n                                                1.73472322897105e+01, 1.72744231391367e+01, 1.71914636645729e+01, 1.70981247282299e+01, 1.69943537191581e+01,\n                                                1.68802826666592e+01, 1.67562294041866e+01, 1.66226919156565e+01, 1.64803365881054e+01, 1.63299815718334e+01,\n                                                1.61725767061717e+01, 1.60091814457933e+01, 1.58409419319549e+01, 1.56690678887506e+01, 1.54948095413151e+01,\n                                                1.53194344230198e+01, 1.51442038921909e+01, 1.49703494484452e+01, 1.47990494304264e+01, 1.46314071884035e+01,\n                                                1.44684321198115e+01, 1.43110248673793e+01, 1.41599674994328e+01, 1.40159187801580e+01, 1.38794139433235e+01,\n                                                1.37508679218477e+01, 1.36305808490465e+01, 1.35187447910281e+01, 1.34154509691767e+01, 1.33206970565479e+01,\n                                                1.32343943947677e+01, 1.31563751455342e+01, 1.30863994700705e+01, 1.30241628464187e+01, 1.29693036155078e+01,\n                                                1.29214108129155e+01, 1.28800323059980e+01, 1.28446832206091e+01, 1.28148546089293e+01, 1.27900222792994e+01,\n                                                1.27696556796700e+01, 1.27532266983526e+01, 1.27402182201361e+01, 1.27301322542696e+01, 1.27224974355074e+01,\n                                                1.27168756926036e+01, 1.27128678822286e+01, 1.27101182014653e+01, 1.27083172191304e+01, 1.27072034044194e+01,\n                                                1.27065630790613e+01, 1.27062287736918e+01, 1.27060760273037e+01, 1.27060187269404e+01, 1.27060031398598e+01,\n                                                1.27060008392396e+01, 1.27060006208473e+01, 1.27059961683473e+01, 1.27059660020371e+01, 1.27058551079765e+01,\n                                                1.27055595088661e+01, 1.27049126164221e+01, 1.27036738127168e+01, 1.27015197501521e+01, 1.26980388227982e+01,\n                                                1.26927292169518e+01, 1.26850008903808e+01, 1.26741817506199e+01, 1.26595281951984e+01, 1.26402400343569e+01,\n                                                1.26154796363691e+01, 1.25843949191462e+01, 1.25461455686764e+01, 1.24999316126463e+01, 1.24450232416299e+01,\n                                                1.23807905808496e+01, 1.23067320028355e+01, 1.22224995580910e+01, 1.21279201950949e+01, 1.20230116312287e+01,\n                                                1.19079919931516e+01, 1.17832826307755e+01, 1.16495037918819e+01, 1.15074631140813e+01, 1.13581371625278e+01,\n                                                1.12026465461788e+01, 1.10422255054228e+01, 1.08781872707847e+01, 1.07118868942395e+01, 1.05446835662761e+01,\n                                                1.03779045628851e+01, 1.02128128553020e+01, 1.00505800531114e+01, 9.89226578863828e+00, 9.73880398272103e+00,\n                                                9.59099577212732e+00, 9.44950832878416e+00, 9.31487842896395e+00, 9.18751946172555e+00, 9.06773058499876e+00,\n                                                8.95570690071707e+00, 8.85154976993285e+00, 8.75527666832778e+00, 8.66683024636673e+00, 8.58608647680383e+00,\n                                                8.51286193168622e+00, 8.44692033086822e+00, 8.38797855244004e+00, 8.33571230461613e+00, 8.28976164126322e+00,\n                                                8.24973647031933e+00, 8.21522216395794e+00, 8.18578533668049e+00, 8.16097981543332e+00, 8.14035278567537e+00,\n                                                8.12345105968536e+00, 8.10982737879958e+00, 8.09904663049612e+00, 8.09069183546777e+00, 8.08436974056958e+00,\n                                                8.07971584242585e+00, 8.07639866502356e+00, 8.07412312383918e+00, 8.07263282928165e+00, 8.07171121295116e+00,\n                                                8.07118139995947e+00, 8.07090479704568e+00, 8.07077841653694e+00, 8.07073100711141e+00, 8.07071811062331e+00,\n                                                8.07071620712959e+00, 8.07071603773224e+00, 8.07071270312521e+00, 8.07069011070538e+00, 8.07060705908012e+00,\n                                                8.07038567777984e+00, 8.06990120970312e+00, 8.06897347002119e+00, 8.06736035639772e+00, 8.06475376225017e+00,\n                                                8.06077821574137e+00, 8.05499252683170e+00, 8.04689466601995e+00, 8.03593001378510e+00, 8.02150300263578e+00,\n                                                8.00299202045592e+00, 7.97976725599453e+00, 7.95121095349455e+00, 7.91673932060628e+00, 7.87582512723175e+00,\n                                                7.82801987437810e+00, 7.77297433480069e+00, 7.71045629950097e+00, 7.64036452108255e+00, 7.56273812042177e+00,\n                                                7.47776108447530e+00, 7.38576187147742e+00, 7.28720847817359e+00, 7.18269953339771e+00, 7.07295200675249e+00,\n                                                6.95878595267781e+00, 6.84110641147204e+00, 6.72088229900301e+00, 6.59912202907120e+00, 6.47684591165669e+00,\n                                                6.35505613278677e+00, 6.23470620814219e+00, 6.11667281884828e+00, 6.00173334951851e+00, 5.89055185670195e+00,\n                                                5.78367463270294e+00, 5.68153453292665e+00, 5.58446158192039e+00, 5.49269664165483e+00, 5.40640520681411e+00,\n                                                5.32568934162420e+00, 5.25059689164326e+00, 5.18112800741791e+00, 5.11723954522793e+00, 5.05884808970699e+00,\n                                                5.00583228937558e+00, 4.95803503183928e+00, 4.91526579996164e+00, 4.87730339225064e+00, 4.84389907683060e+00,\n                                                4.81478017675376e+00, 4.78965404484528e+00, 4.76821236700206e+00, 4.75013572389495e+00, 4.73509833536426e+00,\n                                                4.72277290546684e+00, 4.71283547764338e+00, 4.70497019915152e+00, 4.69887388322536e+00, 4.69426024841237e+00,\n                                                4.69086370933268e+00, 4.68844259355268e+00, 4.68678166666956e+00, 4.68569386265218e+00, 4.68502113877546e+00,\n                                                4.68463440315424e+00, 4.68443249631101e+00, 4.68434024432086e+00, 4.68430563756233e+00, 4.68429622369887e+00,\n                                                4.68429483423286e+00, 4.68429471139692e+00, 4.68429230253319e+00, 4.68427598214736e+00, 4.68421598698805e+00,\n                                                4.68405606426635e+00, 4.68370608920396e+00, 4.68303589069326e+00, 4.68187055251779e+00, 4.67998743903454e+00,\n                                                4.67711517144423e+00, 4.67293475044218e+00, 4.66708297887011e+00, 4.65915827945915e+00, 4.64872892412631e+00,\n                                                4.63534359083251e+00, 4.61854404331208e+00, 4.59787959397476e+00, 4.57292287161126e+00, 4.54328628778711e+00,\n                                                4.50863849529679e+00, 4.46872007330273e+00, 4.42335766559370e+00, 4.37247584085058e+00, 4.31610602803414e+00,\n                                                4.25439199165886e+00, 4.18759143754554e+00, 4.11607347450807e+00, 4.04031180773124e+00, 3.96087372012336e+00,\n                                                3.87840512206929e+00, 3.79361221739250e+00, 3.70724062123188e+00, 3.62005302942059e+00, 3.53280672336386e+00,\n                                                3.44623225029756e+00, 3.36101452029195e+00, 3.27777731525921e+00, 3.19707184993205e+00, 3.11936961966432e+00,\n                                                3.04505937956674e+00, 2.97444777858899e+00, 2.90776295510921e+00, 2.84516029813727e+00, 2.78672958024989e+00,\n                                                2.73250275065515e+00, 2.68246180908835e+00, 2.63654633429701e+00, 2.59466039105869e+00, 2.55667867112663e+00,\n                                                2.52245182802397e+00, 2.49181104125624e+00, 2.46457189453891e+00, 2.44053767952994e+00, 2.41950224645389e+00,\n                                                2.40125252066698e+00, 2.38557079350355e+00, 2.37223687951335e+00, 2.36103021241514e+00, 2.35173193010878e+00,\n                                                2.34412697592582e+00, 2.33800621988081e+00, 2.33316858100075e+00, 2.32942311097567e+00, 2.32659098161401e+00,\n                                                2.32450730514109e+00, 2.32302270835731e+00, 2.32200457989250e+00, 2.32133791463214e+00, 2.32092569068610e+00,\n                                                2.32068873127506e+00, 2.32056502535177e+00, 2.32050850497600e+00, 2.32048730253625e+00, 2.32048153498730e+00,\n                                                2.32048068371020e+00, 2.32048060728948e+00, 2.32047909548714e+00, 2.32046885283294e+00, 2.32043120018808e+00,\n                                                2.32033083540597e+00, 2.32011120650707e+00, 2.31969065591479e+00, 2.31895951831801e+00, 2.31777835141640e+00,\n                                                2.31597747321139e+00, 2.31335796761444e+00, 2.30969429682158e+00, 2.30473861860785e+00, 2.29822684449845e+00,\n                                                2.28988638763943e+00, 2.27944543738714e+00, 2.26664346603246e+00, 2.25124253201702e+00, 2.23303880932441e+00,\n                                                2.21187366461635e+00, 2.18764354405346e+00, 2.16030794033581e+00, 2.12989480011683e+00, 2.09650290377532e+00,\n                                                2.06030098993846e+00, 2.02152367727222e+00, 1.98046451526556e+00, 1.93746672901426e+00, 1.89291237109167e+00,\n                                                1.84721063332959e+00, 1.80078600315323e+00, 1.75406679869454e+00, 1.70747442967049e+00, 1.66141356026824e+00,\n                                                1.61626324193120e+00, 1.57236906209177e+00, 1.53003641290458e+00, 1.48952508470300e+00, 1.45104547532701e+00,\n                                                1.41475672179313e+00, 1.38076697079012e+00, 1.34913581389149e+00, 1.31987866698806e+00, 1.29297263981145e+00,\n                                                1.26836328567029e+00, 1.24597158065263e+00, 1.22570055392137e+00, 1.20744114283888e+00, 1.19107703085463e+00,\n                                                1.17648839893118e+00, 1.16355465482274e+00, 1.15215628862164e+00, 1.14217604127477e+00, 1.13349957623155e+00,\n                                                1.12601582577632e+00, 1.11961715393841e+00, 1.11419944503290e+00, 1.10966219557080e+00, 1.10590865973336e+00,\n                                                1.10284607545993e+00, 1.10038597922903e+00, 1.09844460228155e+00, 1.09694332882843e+00, 1.09580918737385e+00,\n                                                1.09497533955701e+00, 1.09438152693171e+00, 1.09397443499228e+00, 1.09370793560642e+00, 1.09354317376803e+00,\n                                                1.09344847195457e+00, 1.09339903483905e+00, 1.09337644792890e+00, 1.09336797501204e+00, 1.09336567019332e+00,\n                                                1.09336533000764e+00, 1.09336529864860e+00, 1.09336466915099e+00, 1.09336040423225e+00, 1.09334472624069e+00,\n                                                1.09330293678283e+00, 1.09321149330335e+00, 1.09303641302025e+00, 1.09273208740641e+00, 1.09224059299203e+00,\n                                                1.09149158584804e+00, 1.09040286484000e+00, 1.08888167890450e+00, 1.08682683211826e+00, 1.08413160350562e+00,\n                                                1.08068744408393e+00, 1.07638834195030e+00, 1.07113566150972e+00, 1.06484317423738e+00, 1.05744191954065e+00,\n                                                1.04888448296875e+00, 1.03914827380413e+00, 1.02823744001546e+00, 1.01618318146555e+00, 1.00304240325460e+00,\n                                                9.88894863689485e-01, 9.73839174027571e-01, 9.57988152419290e-01, 9.41464083827977e-01, 9.24394376616640e-01,\n                                                9.06907952651903e-01, 8.89132506881744e-01, 8.71192581871185e-01, 8.53208270891567e-01, 8.35294312739872e-01,\n                                                8.17559366167636e-01, 8.00105324116593e-01, 7.83026613483504e-01, 7.66409496643675e-01, 7.50331431479680e-01,\n                                                7.34860555778859e-01, 7.20055347496761e-01, 7.05964486141184e-01, 6.92626913074498e-01, 6.80072067026977e-01,\n                                                6.68320258680751e-01, 6.57383144677176e-01, 6.47264264727795e-01, 6.37959612897738e-01, 6.29458223023036e-01,\n                                                6.21742756735248e-01, 6.14790089587625e-01, 6.08571895851714e-01, 6.03055235675424e-01, 5.98203149700165e-01,\n                                                5.93975266250951e-01, 5.90328425155366e-01, 5.87217320384131e-01, 5.84595161254125e-01, 5.82414349077421e-01,\n                                                5.80627163049524e-01, 5.79186446029976e-01, 5.78046277880027e-01, 5.77162621408494e-01, 5.76493923967284e-01,\n                                                5.76001656551917e-01, 5.75650772082042e-01, 5.75410065484117e-01, 5.75252420311390e-01, 5.75154929858261e-01,\n                                                5.75098884899500e-01, 5.75069625067773e-01, 5.75056256165951e-01, 5.75051241054727e-01, 5.75049876825275e-01,\n                                                5.75049675467948e-01, 5.75049656278804e-01, 5.75049264269843e-01, 5.75046608355986e-01, 5.75036845003300e-01,\n                                                5.75010820008888e-01, 5.74953867579634e-01, 5.74844806956953e-01, 5.74655181188000e-01, 5.74348780227300e-01,\n                                                5.73881487458284e-01, 5.73201484247335e-01, 5.72249840376312e-01, 5.70961508162288e-01, 5.69266723911319e-01,\n                                                5.67092801583897e-01, 5.64366280332521e-01, 5.61015360954151e-01, 5.56972538365045e-01, 5.52177311042552e-01,\n                                                5.46578827809753e-01, 5.40138321369263e-01, 5.32831180034904e-01, 5.24648526109271e-01, 5.15598201025174e-01,\n                                                5.05705100777828e-01, 4.95010854900237e-01, 4.83572891188160e-01, 4.71462969231769e-01, 4.58765292710840e-01,\n                                                4.45574320544790e-01, 4.31992391410734e-01, 4.18127259492532e-01, 4.04089618400242e-01, 3.89990671798909e-01,\n                                                3.75939798062547e-01, 3.62042353420179e-01, 3.48397661292179e-01, 3.35097240250033e-01, 3.22223324287545e-01,\n                                                3.09847723277446e-01, 2.98031057487805e-01, 2.86822379315680e-01, 2.76259171281968e-01, 2.66367685849804e-01,\n                                                2.57163573382325e-01, 2.48652731952482e-01, 2.40832307674847e-01, 2.33691776301583e-01, 2.27214044599588e-01,\n                                                2.21376521600067e-01, 2.16152123227001e-01, 2.11510187351191e-01, 2.07417288675796e-01, 2.03837953178276e-01,\n                                                2.00735279662034e-01, 1.98071481183973e-01, 1.95808361831769e-01, 1.93907744791534e-01, 1.92331866233843e-01,\n                                                1.91043746667464e-01, 1.90007547512124e-01, 1.89188916180367e-01, 1.88555318389302e-01, 1.88076352178346e-01,\n                                                1.87724034577180e-01, 1.87473049366485e-01, 1.87300943123780e-01, 1.87188256851066e-01, 1.87118581916025e-01,\n                                                1.87078531654539e-01, 1.87057623522495e-01, 1.87048070815617e-01, 1.87044487328787e-01, 1.87043512539457e-01,\n                                                1.87043368662813e-01, 1.87043354422237e-01, 1.87043057952295e-01, 1.87041049333036e-01, 1.87033665559184e-01,\n                                                1.87013984074103e-01, 1.86970916420833e-01, 1.86888455087693e-01, 1.86745111634835e-01, 1.86513584861938e-01,\n                                                1.86160698126198e-01, 1.85647643932537e-01, 1.84930570321956e-01, 1.83961536016135e-01, 1.82689848508414e-01,\n                                                1.81063780498022e-01, 1.79032635092643e-01, 1.76549099826172e-01, 1.73571795613459e-01, 1.70067892288568e-01,\n                                                1.66015631356633e-01, 1.61406573739225e-01, 1.56247380506304e-01, 1.50560942262310e-01, 1.44386701075661e-01,\n                                                1.37780058517556e-01, 1.30810832458206e-01, 1.23560808252314e-01, 1.16120517914236e-01, 1.08585462334062e-01,\n                                                1.01052054143068e-01, 9.36135916613452e-02, 8.63565707287925e-02, 7.93576004804528e-02, 7.26811173121469e-02,\n                                                6.63780000132626e-02, 6.04850929701080e-02, 5.50255578732255e-02, 5.00099086820640e-02, 4.54375458060099e-02,\n                                                4.12985941560855e-02, 3.75758619530977e-02, 3.42467661644648e-02, 3.12851084965935e-02, 2.86626259850422e-02,\n                                                2.63502770659123e-02, 2.43192542820587e-02, 2.25417370875718e-02, 2.09914126585176e-02, 1.96438002487334e-02,\n                                                1.84764169604534e-02, 1.74688214273324e-02, 1.66025682668582e-02, 1.58611013986381e-02, 1.52296092741118e-02,\n                                                1.46948602564336e-02, 1.42450321172980e-02, 1.38695459912164e-02, 1.35589121381514e-02, 1.33045924315738e-02,\n                                                1.30988825039218e-02, 1.29348148344981e-02, 1.28060826684120e-02, 1.27069834510216e-02, 1.26323794287053e-02,\n                                                1.25776722133430e-02, 1.25387874681344e-02, 1.25121654891913e-02, 1.24947533686779e-02, 1.24839946497097e-02,\n                                                1.24778129088661e-02, 1.24745864847284e-02, 1.24731125335664e-02, 1.24725596405852e-02, 1.24724092437845e-02,\n                                                1.24723870456549e-02, 1.24723847558315e-02, 1.24723361480505e-02, 1.24720068276929e-02, 1.24707962783752e-02,\n                                                1.24675699141008e-02, 1.24605117112857e-02, 1.24470044295073e-02, 1.24235464819833e-02, 1.23857161798355e-02,\n                                                1.23281956627714e-02, 1.22448677056362e-02, 1.21289979316828e-02, 1.19735118630437e-02, 1.17713698925570e-02,\n                                                1.15160332279096e-02, 1.12020003737499e-02, 1.08253779711802e-02, 1.03844341109536e-02, 9.88006986678513e-03,\n                                                9.31613955340893e-03, 8.69955552824209e-03, 8.04013118970914e-03, 7.35014563663583e-03, 6.64365160794134e-03,\n                                                5.93558831206309e-03, 5.24079436546643e-03, 4.57303532692421e-03, 3.94415981467944e-03, 3.36347697358619e-03,\n                                                2.83741049468844e-03, 2.36943938635648e-03, 1.96029409267240e-03, 1.60834735295623e-03, 1.31012621798021e-03,\n                                                1.06087261952226e-03, 8.55089041284174e-04, 6.87018432326880e-04, 5.51022799179179e-04, 4.41844429733607e-04,\n                                                3.54756153257085e-04, 2.85625562899128e-04, 2.30924312795366e-04, 1.87705653491577e-04, 1.53559702592787e-04,\n                                                1.26548699221019e-04, 1.05128238676144e-04, 8.80681407551265e-05, 7.43874247568499e-05, 6.33089022237243e-05,\n                                                5.42275914092727e-05, 4.66829084899700e-05, 4.03292351052187e-05, 3.49067832559058e-05, 3.02178732489722e-05,\n                                                2.61114689195097e-05, 2.24745635080126e-05, 1.92266369900551e-05, 1.63140130169381e-05, 1.37030928186732e-05,\n                                                1.13732183528725e-05, 9.31045021346222e-06, 7.50310331198989e-06, 5.93915135027601e-06, 4.60509230038042e-06,\n                                                3.48570335972909e-06, 2.56420711508554e-06, 1.82255867997583e-06, 1.24173039139919e-06, 8.01972582564758e-07,\n                                                4.83071023182902e-07, 7.10542735760100e-15, 1.06581410364015e-14, 1.06581410364015e-14, 7.10542735760100e-15,\n                                                7.10542735760100e-15}),\nmadness::CubicInterpolationTable<double>(grid, {2.10000000000000e+01, 2.09999999477096e+01,  2.09999983307872e+01,  2.09999873758774e+01,\n                                                2.09999471041350e+01, 2.09998397518822e+01,  2.09996048010440e+01,  2.09991547920486e+01,\n                                                2.09983720661017e+01, 2.09971065527996e+01,  2.09951746843552e+01,  2.09923594811841e+01,\n                                                2.09884118175697e+01, 2.09830528431089e+01,  2.09759775081261e+01,  2.09668591211731e+01,\n                                                2.09553548550774e+01, 2.09411121141870e+01,  2.09237756770387e+01,  2.09029955312647e+01,\n                                                2.08784353152459e+01, 2.08497812674266e+01,  2.08167515539077e+01,  2.07791057953044e+01,\n                                                2.07366545466393e+01, 2.06892684063467e+01,  2.06368863545362e+01,  2.05795228623119e+01,\n                                                2.05172732896672e+01, 2.04503171128251e+01,  2.03789185999678e+01,  2.03034246852411e+01,\n                                                2.02242599633173e+01, 2.01419189211715e+01,  2.00569557159456e+01,  1.99699719735419e+01,\n                                                1.98816032019405e+01, 1.97925044739846e+01,  1.97033360337119e+01,  1.96147494244531e+01,\n                                                1.95273746390124e+01, 1.94418086692461e+01,  1.93586057016968e+01,  1.92782690827539e+01,\n                                                1.92012450720443e+01, 1.91279183225285e+01,  1.90586089716006e+01,  1.89935711972727e+01,\n                                                1.89329930828485e+01, 1.88769976368448e+01,  1.88256448268086e+01,  1.87789345012801e+01,\n                                                1.87368100897235e+01, 1.86991629832261e+01,  1.86658375076541e+01,  1.86366364051703e+01,\n                                                1.86113267396498e+01, 1.85896461371693e+01,  1.85713092652946e+01,  1.85560144454976e+01,\n                                                1.85434502829398e+01, 1.85333021884030e+01,  1.85252586596202e+01,  1.85190171849044e+01,\n                                                1.85142896318635e+01, 1.85108069889482e+01,  1.85083233381426e+01,  1.85066189533989e+01,\n                                                1.85055024411799e+01, 1.85048118660247e+01,  1.85044148343452e+01,  1.85042075423591e+01,\n                                                1.85041128276442e+01, 1.85040772966753e+01,  1.85040676313705e+01,  1.85040662047911e+01,\n                                                1.85040660095125e+01, 1.85040613976924e+01,  1.85040301519546e+01,  1.85039152896415e+01,\n                                                1.85036091113803e+01, 1.85029390603975e+01,  1.85016558810952e+01,  1.84994245732746e+01,\n                                                1.84958185941409e+01, 1.84903177077088e+01,  1.84823098163493e+01,  1.84710970266021e+01,\n                                                1.84559060952068e+01, 1.84359032663931e+01,  1.84102133443206e+01,  1.83779426445890e+01,\n                                                1.83382052394205e+01, 1.82901516614051e+01,  1.82329989765046e+01,  1.81660609027287e+01,\n                                                1.80887764698905e+01, 1.80007356287728e+01,  1.79017002670085e+01,  1.77916193069860e+01,\n                                                1.76706369576170e+01, 1.75390937388093e+01,  1.73975205223458e+01,  1.72466264248940e+01,\n                                                1.70872818226151e+01, 1.69204979288867e+01,  1.67474042451759e+01,  1.65692248073153e+01,\n                                                1.63872536429227e+01, 1.62028294261678e+01,  1.60173091543267e+01,  1.58320408841363e+01,\n                                                1.56483361133838e+01, 1.54674430678211e+01,  1.52905226468681e+01,  1.51186288199804e+01,\n                                                1.49526947585067e+01, 1.47935250928754e+01,  1.46417937320488e+01,  1.44980459991838e+01,\n                                                1.43627035925499e+01, 1.42360710380694e+01,  1.41183426899731e+01,  1.40096097691564e+01,\n                                                1.39098672752565e+01, 1.38190208202500e+01,  1.37368935211189e+01,  1.36632330964633e+01,\n                                                1.35977192774936e+01, 1.35399715967387e+01,  1.34895575735819e+01,  1.34460012795028e+01,\n                                                1.34087922368183e+01, 1.33773945797160e+01,  1.33512563824770e+01,  1.33298190353183e+01,\n                                                1.33125265231372e+01, 1.32988344379157e+01,  1.32882185339342e+01,  1.32801826190165e+01,\n                                                1.32742655675324e+01, 1.32700472440945e+01,  1.32671531422855e+01,  1.32652575707527e+01,\n                                                1.32640852589008e+01, 1.32634113043762e+01,  1.32630594418068e+01,  1.32628986734475e+01,\n                                                1.32628383637753e+01, 1.32628219580906e+01,  1.32628195366463e+01,  1.32628193067844e+01,\n                                                1.32628146204476e+01, 1.32627828698603e+01,  1.32626661518624e+01,  1.32623550285223e+01,\n                                                1.32616741629440e+01, 1.32603703014637e+01,  1.32581031180443e+01,  1.32544393980772e+01,\n                                                1.32488509919176e+01, 1.32407169074959e+01,  1.32293298287243e+01,  1.32139072342057e+01,\n                                                1.31936071422593e+01, 1.31675483201896e+01,  1.31348345702511e+01,  1.30945824514672e+01,\n                                                1.30459515331131e+01, 1.29881760274820e+01,  1.29205964461052e+01,  1.28426897936645e+01,\n                                                1.27540967786896e+01, 1.26546445875317e+01,  1.25443639297066e+01,  1.24234992972679e+01,\n                                                1.22925116636080e+01, 1.21520731615732e+01,  1.20030536269914e+01,  1.18464992854995e+01,\n                                                1.16836043109983e+01, 1.15156764844656e+01,  1.13440986863983e+01,  1.11702883827089e+01,\n                                                1.09956575145709e+01, 1.08215751965003e+01,  1.06493353309378e+01,  1.04801306929125e+01,\n                                                1.03150343148535e+01, 1.01549882337312e+01,  1.00007989765697e+01,  9.85313865359066e+00,\n                                                9.71255025137956e+00, 9.57945567154752e+00,  9.45416520238654e+00,  9.33688737711318e+00,\n                                                9.22773849217494e+00, 9.12675137202617e+00,  9.03388323040271e+00,  8.94902267087283e+00,\n                                                8.87199598800253e+00, 8.80257298436156e+00,  8.74047252399685e+00,  8.68536801740230e+00,\n                                                8.63689299152262e+00, 8.59464685182248e+00,  8.55820089831990e+00,  8.52710461640516e+00,\n                                                8.50089222649157e+00, 8.47908944318819e+00,  8.46122036377748e+00,  8.44681437692453e+00,\n                                                8.43541295618629e+00, 8.42657618028699e+00,  8.41988880509764e+00,  8.41496570282627e+00,\n                                                8.41145648392660e+00, 8.40904912796463e+00,  8.40747247162868e+00,  8.40649743474123e+00,\n                                                8.40593690705004e+00, 8.40564426737191e+00,  8.40551055932236e+00,  8.40546040104921e+00,\n                                                8.40544675680468e+00, 8.40544474294357e+00,  8.40544456372430e+00,  8.40544103577168e+00,\n                                                8.40541713340542e+00, 8.40532926625478e+00,  8.40509504834936e+00,  8.40458248675063e+00,\n                                                8.40360094106921e+00, 8.40189424728797e+00,  8.39913637307438e+00,  8.39492993926464e+00,\n                                                8.38880789820246e+00, 8.38023859734169e+00,  8.36863436872633e+00,  8.35336366547372e+00,\n                                                8.33376661204552e+00, 8.30917364786504e+00,  8.27892673272020e+00,  8.24240236449653e+00,\n                                                8.19903545993555e+00, 8.14834299726806e+00,  8.08994624573339e+00,  8.02359043389709e+00,\n                                                7.94916084341506e+00, 7.86669454171999e+00,  7.77638724451385e+00,  7.67859506436051e+00,\n                                                7.57383108641769e+00, 7.46275676722192e+00,  7.34616807989132e+00,  7.22497621146998e+00,\n                                                7.10018262314898e+00, 6.97284862324535e+00,  6.84406042568109e+00,  6.71489191106017e+00,\n                                                6.58636859070653e+00, 6.45943695967716e+00,  6.33494293460390e+00,  6.21362130705407e+00,\n                                                6.09609568037918e+00, 5.98288618506463e+00,  5.87442120028619e+00,  5.77104954862105e+00,\n                                                5.67305077111260e+00, 5.58064248038242e+00,  5.49398491246495e+00,  5.41318343419402e+00,\n                                                5.33828994617888e+00, 5.26930400727107e+00,  5.20617426021401e+00,  5.14880047906532e+00,\n                                                5.09703635021449e+00, 5.05069296037338e+00,  5.00954289128551e+00,  4.97332479550974e+00,\n                                                4.94174833196139e+00, 4.91449935808459e+00,  4.89124529606488e+00,  4.87164060623443e+00,\n                                                4.85533230833621e+00, 4.84196548996770e+00,  4.83118873263345e+00,  4.82265937191996e+00,\n                                                4.81604849249043e+00, 4.81104554412307e+00,  4.80736245485472e+00,  4.80473711383718e+00,\n                                                4.80293610136679e+00, 4.80175655738693e+00,  4.80102710230928e+00,  4.80060775408309e+00,\n                                                4.80038882116123e+00, 4.80028878996150e+00,  4.80025126497659e+00,  4.80024105728704e+00,\n                                                4.80023955065404e+00, 4.80023941745993e+00,  4.80023680546833e+00,  4.80021910886383e+00,\n                                                4.80015405461656e+00, 4.79998064651176e+00,  4.79960116048018e+00,  4.79887445054235e+00,\n                                                4.79761085611680e+00, 4.79556898184886e+00,  4.79245459716250e+00,  4.78792187094669e+00,\n                                                4.78157711273207e+00, 4.77298513075761e+00,  4.76167823559784e+00,  4.74716781353064e+00,\n                                                4.72895826756316e+00, 4.70656298080774e+00,  4.67952180560936e+00,  4.64741943488245e+00,\n                                                4.60990388390077e+00, 4.56670421535499e+00,  4.51764658915336e+00,  4.46266771813724e+00,\n                                                4.40182486422521e+00, 4.33530161657615e+00,  4.26340885436818e+00,  4.18658051353055e+00,\n                                                4.10536405106606e+00, 4.02040582907736e+00,  3.93243200757981e+00,  3.84222590760787e+00,\n                                                3.75060313462027e+00, 3.65838597996335e+00,  3.56637869577412e+00,  3.47534513980623e+00,\n                                                3.38599001798701e+00, 3.29894455442607e+00,  3.21475695561181e+00,  3.13388758038202e+00,\n                                                3.05670834402540e+00, 2.98350561638371e+00,  2.91448573623211e+00,  2.84978224890968e+00,\n                                                2.78946405492462e+00, 2.73354379946888e+00,  2.68198600202555e+00,  2.63471459331069e+00,\n                                                2.59161967453339e+00, 2.55256343152234e+00,  2.51738522139738e+00,  2.48590590502719e+00,\n                                                2.45793153001148e+00, 2.43325648250952e+00,  2.41166622742104e+00,  2.39293974946479e+00,\n                                                2.37685179549029e+00, 2.36317500265100e+00,  2.35168197884080e+00,  2.34214738163718e+00,\n                                                2.33435002042241e+00, 2.32807498403403e+00,  2.32311577415474e+00,  2.31927640387514e+00,\n                                                2.31637340282107e+00, 2.31423765634003e+00,  2.31271599775914e+00,  2.31167247060834e+00,\n                                                2.31098918241069e+00, 2.31056668305196e+00,  2.31032381810418e+00,  2.31019702948220e+00,\n                                                2.31013910071552e+00, 2.31011736995907e+00,  2.31011145869699e+00,  2.31011058620820e+00,\n                                                2.31011050788326e+00, 2.31010895841063e+00,  2.31009846053622e+00,  2.31005986969859e+00,\n                                                2.30995700422124e+00, 2.30973190353649e+00,  2.30930087736242e+00,  2.30855153372637e+00,\n                                                2.30734097078455e+00, 2.30549531213412e+00,  2.30281075355549e+00,  2.29905626549834e+00,\n                                                2.29397805436461e+00, 2.28730582164411e+00,  2.27876077013424e+00,  2.26806519123154e+00,\n                                                2.25495333186377e+00, 2.23918309496655e+00,  2.22054799001740e+00,  2.19888864071885e+00,\n                                                2.17410309740817e+00, 2.14615521108017e+00,  2.11508041500872e+00,  2.08098842745627e+00,\n                                                2.04406261871045e+00, 2.00455604772169e+00,  1.96278442919758e+00,  1.91911650224326e+00,\n                                                1.87396240768703e+00, 1.82776073302431e+00,  1.78096486387814e+00,  1.73402922029944e+00,\n                                                1.68739589409499e+00, 1.64148217052781e+00,  1.59666942211205e+00,  1.55329388194671e+00,\n                                                1.51163979380118e+00, 1.47193534709732e+00,  1.43435161069527e+00,  1.39900439564570e+00,\n                                                1.36595866202562e+00, 1.33523481815382e+00,  1.30681610986590e+00,  1.28065629262754e+00,\n                                                1.25668690362927e+00, 1.23482365520556e+00,  1.21497169586446e+00,  1.19702968285713e+00,\n                                                1.18089275388760e+00, 1.16645456959227e+00,  1.15360863144026e+00,  1.14224907665782e+00,\n                                                1.13227112777550e+00, 1.12357134141561e+00,  1.11604776687969e+00,  1.10960009423041e+00,\n                                                1.10412984553834e+00, 1.09954064184222e+00,  1.09573856144410e+00,  1.09263259150405e+00,\n                                                1.09013516369147e+00, 1.08816275532486e+00,  1.08663652971834e+00,  1.08548298334519e+00,\n                                                1.08463456311384e+00, 1.08403021482022e+00,  1.08361582397082e+00,  1.08334451284541e+00,\n                                                1.08317676287846e+00, 1.08308033894859e+00,  1.08303000150368e+00,  1.08300700294492e+00,\n                                                1.08299837555906e+00, 1.08299602871674e+00,  1.08299568232830e+00,  1.08299565039746e+00,\n                                                1.08299500942185e+00, 1.08299066673428e+00,  1.08297470280323e+00,  1.08293215072803e+00,\n                                                1.08283903621097e+00, 1.08266074776869e+00,  1.08235081836489e+00,  1.08185020029783e+00,\n                                                1.08108711476579e+00, 1.07997755365789e+00,  1.07842650066704e+00,  1.07632991840668e+00,\n                                                1.07357751483000e+00, 1.07005625420140e+00,  1.06565451581273e+00,  1.06026673157802e+00,\n                                                1.05379825951098e+00, 1.04617018552295e+00,  1.03732370489654e+00,  1.02722373068182e+00,\n                                                1.01586141843966e+00, 1.00325538645737e+00,  9.89451538284637e-01,  9.74521540041199e-01,\n                                                9.58560141457447e-01, 9.41681630326695e-01,  9.24015756814555e-01,  9.05703453369046e-01,\n                                                8.86892619896450e-01, 8.67734165116421e-01,  8.48378418022875e-01,  8.28971965643603e-01,\n                                                8.09654940675816e-01, 7.90558770149008e-01,  7.71804393282771e-01,  7.53500952659998e-01,\n                                                7.35744951756736e-01, 7.18619853540488e-01,  7.02196073331230e-01,  6.86531300027312e-01,\n                                                6.71671067770230e-01, 6.57649497379957e-01,  6.44490133048357e-01,  6.32206812532949e-01,\n                                                6.20804525300031e-01, 6.10280229702227e-01,  6.00623615070962e-01,  5.91817806272228e-01,\n                                                5.83840016424656e-01, 5.76662158365028e-01,  5.70251427666378e-01,  5.64570870262440e-01,\n                                                5.59579946636394e-01, 5.55235102569767e-01,  5.51490353935858e-01,  5.48297890145282e-01,\n                                                5.45608697710506e-01, 5.43373202060639e-01,  5.41541922287724e-01,  5.40066130058531e-01,\n                                                5.38898500646724e-01, 5.37993741137207e-01,  5.37309178562236e-01,  5.36805289281354e-01,\n                                                5.36446150517932e-01, 5.36199795757103e-01,  5.36038457746205e-01,  5.35938686071635e-01,\n                                                5.35881330554652e-01, 5.35851386759536e-01,  5.35837705409961e-01,  5.35832573098617e-01,\n                                                5.35831176988818e-01, 5.35830970926057e-01,  5.35830951288485e-01,  5.35830550118852e-01,\n                                                5.35827832140988e-01, 5.35817840648154e-01,  5.35791207621312e-01,  5.35732925062817e-01,\n                                                5.35621319132471e-01, 5.35427273460055e-01,  5.35113745947257e-01,  5.34635620627839e-01,\n                                                5.33939931906254e-01, 5.32966491681918e-01,  5.31648939344869e-01,  5.29916219402239e-01,\n                                                5.27694471002725e-01, 5.24909288068198e-01,  5.21488279367937e-01,  5.17363827153051e-01,\n                                                5.12475914545405e-01, 5.06774870186202e-01,  5.00223868230179e-01,  4.92801026275185e-01,\n                                                4.84500964963896e-01, 4.75335729729156e-01,  4.65335023350075e-01,  4.54545750923440e-01,\n                                                4.43030928525904e-01, 4.30868045818904e-01,  4.18146996210332e-01,  4.04967694857220e-01,\n                                                3.91437497744331e-01, 3.77668520234909e-01,  3.63774937673835e-01,  3.49870339209190e-01,\n                                                3.36065201246981e-01, 3.22464547568131e-01,  3.09165865171035e-01,  2.96257343551829e-01,\n                                                2.83816496652268e-01, 2.71909209717254e-01,  2.60589229133142e-01,  2.49898085381645e-01,\n                                                2.39865411885162e-01, 2.30509599773342e-01,  2.21838713276441e-01,  2.13851583725909e-01,\n                                                2.06539001637797e-01, 1.99884934549459e-01,  1.93867711045236e-01,  1.88461126509491e-01,\n                                                1.83635441610758e-01, 1.79358258835482e-01,  1.75595274559079e-01,  1.72310913643642e-01,\n                                                1.69468860240407e-01, 1.67032502467293e-01,  1.64965310203744e-01,  1.63231164759949e-01,\n                                                1.61794657032196e-01, 1.60621367362495e-01,  1.59678136090186e-01,  1.58933329125801e-01,\n                                                1.58357098196529e-01, 1.57921631093092e-01,  1.57601383640579e-01,  1.57373282512484e-01,\n                                                1.57216886615853e-01, 1.57114494697037e-01,  1.57051188034448e-01,  1.57014799457748e-01,\n                                                1.56995803217658e-01, 1.56987124107108e-01,  1.56983868342412e-01,  1.56982982702019e-01,\n                                                1.56982851983585e-01, 1.56982839045384e-01,  1.56982569689088e-01,  1.56980744769186e-01,\n                                                1.56974036299712e-01, 1.56956154975170e-01,  1.56917027167584e-01,  1.56842112022741e-01,\n                                                1.56711894304806e-01, 1.56501589837138e-01,  1.56181101305119e-01,  1.55715261753787e-01,\n                                                1.55064399980652e-01, 1.54185254737470e-01,  1.53032251900900e-01,  1.51559139667100e-01,\n                                                1.49720951229508e-01, 1.47476233200337e-01,  1.44789443351165e-01,  1.41633386467518e-01,\n                                                1.37991526744408e-01, 1.33859994401593e-01,  1.29249098316311e-01,  1.24184169865245e-01,\n                                                1.18705598411523e-01, 1.12867975756181e-01,  1.06738341691759e-01,  1.00393608150405e-01,\n                                                9.39173247715033e-02, 8.73960217187282e-02,  8.09154143772979e-02,  7.45567702650831e-02,\n                                                6.83937174372815e-02, 6.24897186513564e-02,  5.68963555253816e-02,  5.16524750556648e-02,\n                                                4.67841616503613e-02, 4.23054239520759e-02,  3.82194356081520e-02,  3.45201459313529e-02,\n                                                3.11940782081699e-02, 2.82221547661514e-02,  2.55814215355130e-02,  2.32465834313054e-02,\n                                                2.11912993770120e-02, 1.93892180236759e-02,  1.78147600236294e-02,  1.64436696186385e-02,\n                                                1.52533680128997e-02, 1.42231448882271e-02,  1.33342240695740e-02,  1.25697362717929e-02,\n                                                1.19146273203690e-02, 1.13555251953734e-02,  1.08805843421607e-02,  1.04793212961667e-02,\n                                                1.01424519460238e-02, 9.86173773010890e-03,  9.62984566321978e-03,  9.44022521668231e-03,\n                                                9.28700360697476e-03, 9.16489987416469e-03,  9.06915716276657e-03,  8.99549179478143e-03,\n                                                8.94005702168243e-03, 8.89941876172529e-03,  8.87054019482036e-03,  8.85077183386329e-03,\n                                                8.83784365045059e-03, 8.82985602102693e-03,  8.82526667303196e-03,  8.82287141599392e-03,\n                                                8.82177718503030e-03, 8.82136673062561e-03,  8.82125507984810e-03,  8.82123860052886e-03,\n                                                8.82123690062997e-03, 8.82120081579529e-03,  8.82095633929580e-03,  8.82005767087080e-03,\n                                                8.81766255838556e-03, 8.81242298088480e-03,  8.80239648166281e-03,  8.78498506929404e-03,\n                                                8.75690994282508e-03, 8.71423157250462e-03,  8.65242536976041e-03,  8.56652264674906e-03,\n                                                8.45132406844584e-03, 8.30168769509854e-03,  8.11288565836321e-03,  7.88101272967268e-03,\n                                                7.60341754103067e-03, 7.27911494082178e-03,  6.90912865118776e-03,  6.49671015194997e-03,\n                                                6.04738527748694e-03, 5.56879576086544e-03,  5.07032805944263e-03,  4.56255276019490e-03,\n                                                4.05652889442365e-03, 3.56305171348836e-03,  3.09193381727724e-03,  2.65140468296465e-03,\n                                                2.24769337062369e-03, 1.88482829235070e-03,  1.56465381305892e-03,  1.28703361869498e-03,\n                                                1.05019045702193e-03, 8.51122703899421e-04,  6.86038920481025e-04,  5.50759713597415e-04,\n                                                4.41049892621947e-04, 3.52861699482787e-04,  2.82489110695394e-04,  2.26648882698299e-04,\n                                                1.82510703513827e-04, 1.47695009129478e-04,  1.20247779683780e-04,  9.85954929753063e-05,\n                                                8.14851131458738e-05, 6.79200089876986e-05,  5.71049225683851e-05,  4.84072614561626e-05,\n                                                4.13320421017715e-05, 3.55018013316055e-05,  3.06346932177348e-05,  2.65204893139526e-05,\n                                                2.29989844058309e-05, 1.99450915019384e-05,  1.72612469100386e-05,  1.48743270393936e-05,\n                                                1.27334229276244e-05, 1.08062628605410e-05,  9.07413410899949e-06,  7.52642632662059e-06,\n                                                6.15604501774669e-06, 4.95635994468557e-06,  3.91967206780919e-06,  3.03677095203625e-06,\n                                                2.29707091747855e-06, 1.68893753027533e-06,  1.19999696579498e-06,  8.17365030769679e-07,\n                                                5.27811362616148e-07, -3.55271367880050e-15, -3.55271367880050e-15, -3.55271367880050e-15,\n                                                0.00000000000000e+00, -3.55271367880050e-15, -3.55271367880050e-15}),\nmadness::CubicInterpolationTable<double>(grid, {2.20000000000000e+01, 2.19999999439843e+01, 2.19999982118689e+01, 2.19999864765076e+01, 2.19999433357162e+01,\n                                                2.19998283354241e+01, 2.19995766459858e+01, 2.19990945765339e+01, 2.19982560845652e+01, 2.19969004047030e+01,\n                                                2.19948308833317e+01, 2.19918150666579e+01, 2.19875860512583e+01, 2.19818450711172e+01, 2.19742652662632e+01,\n                                                2.19644965575007e+01, 2.19521715404101e+01, 2.19369123089988e+01, 2.19183381222431e+01, 2.18960738301673e+01,\n                                                2.18697589732953e+01, 2.18390574529835e+01, 2.18036676342631e+01, 2.17633326846390e+01, 2.17178508742110e+01,\n                                                2.16670854731050e+01, 2.16109737959827e+01, 2.15495348787024e+01, 2.14828752478698e+01, 2.14111922750826e+01,\n                                                2.13347747013690e+01, 2.12540000703218e+01, 2.11693290064358e+01, 2.10812964948742e+01, 2.09905005322694e+01,\n                                                2.08975886977123e+01, 2.08032433170158e+01, 2.07081659493276e+01, 2.06130619119019e+01, 2.05186254851708e+01,\n                                                2.04255263224992e+01, 2.03343974471362e+01, 2.02458250726562e+01, 2.01603403491203e+01, 2.00784130265837e+01,\n                                                2.00004469460472e+01, 1.99267772159836e+01, 1.98576689067795e+01, 1.97933170901560e+01, 1.97338480593583e+01,\n                                                1.96793215824216e+01, 1.96297340599505e+01, 1.95850224767321e+01, 1.95450690506629e+01, 1.95097064916150e+01,\n                                                1.94787237866337e+01, 1.94518724265843e+01, 1.94288729838106e+01, 1.94094219416203e+01, 1.93931986657035e+01,\n                                                1.93798723962836e+01, 1.93691091292676e+01, 1.93605782462883e+01, 1.93539587485867e+01, 1.93489449492980e+01,\n                                                1.93452514837484e+01, 1.93426175083872e+01, 1.93408099761261e+01, 1.93396258988462e+01, 1.93388935359517e+01,\n                                                1.93384724799802e+01, 1.93382526450060e+01, 1.93381521992636e+01, 1.93381145183832e+01, 1.93381042682499e+01,\n                                                1.93381027553509e+01, 1.93381025482564e+01, 1.93380976573843e+01, 1.93380645210310e+01, 1.93379427086623e+01,\n                                                1.93376180044610e+01, 1.93369074117226e+01, 1.93355465970441e+01, 1.93331803023396e+01, 1.93293562066591e+01,\n                                                1.93235226649597e+01, 1.93150306827316e+01, 1.93031403976534e+01, 1.92870322256652e+01, 1.92658226831169e+01,\n                                                1.92385847150986e+01, 1.92043721422119e+01, 1.91622475883147e+01, 1.91113129810440e+01, 1.90507414441984e+01,\n                                                1.89798091547590e+01, 1.88979255553376e+01, 1.88046602396538e+01, 1.86997649080565e+01, 1.85831890527193e+01,\n                                                1.84550884795872e+01, 1.83158263650457e+01, 1.81659671903272e+01, 1.80062644700223e+01, 1.78376435604580e+01,\n                                                1.76611809039665e+01, 1.74780808217892e+01, 1.72896505035935e+01, 1.70972733450904e+01, 1.69023804926827e+01,\n                                                1.67064205573720e+01, 1.65108280053941e+01, 1.63169915532297e+01, 1.61262246347388e+01, 1.59397402706244e+01,\n                                                1.57586322305260e+01, 1.55838633373097e+01, 1.54162605156476e+01, 1.52565152016682e+01, 1.51051873006380e+01,\n                                                1.49627110107975e+01, 1.48294013122669e+01, 1.47054604837595e+01, 1.45909844648512e+01, 1.44859691531060e+01,\n                                                1.43903168295085e+01, 1.43038428995359e+01, 1.42262830796861e+01, 1.41573010918849e+01, 1.40964968720966e+01,\n                                                1.40434152604468e+01, 1.39975551152998e+01, 1.39583787769177e+01, 1.39253217916356e+01, 1.38978027909070e+01,\n                                                1.38752333993800e+01, 1.38570280227996e+01, 1.38426133420056e+01, 1.38314373166477e+01, 1.38229774848784e+01,\n                                                1.38167483364849e+01, 1.38123075393375e+01, 1.38092608143751e+01, 1.38072652831486e+01, 1.38060311534607e+01,\n                                                1.38053216609575e+01, 1.38049512446913e+01, 1.38047819990701e+01, 1.38047185092966e+01, 1.38047012385484e+01,\n                                                1.38046986894225e+01, 1.38046984474402e+01, 1.38046935139952e+01, 1.38046600892165e+01, 1.38045372167510e+01,\n                                                1.38042096881451e+01, 1.38034929214917e+01, 1.38021203107075e+01, 1.37997335890539e+01, 1.37958767102536e+01,\n                                                1.37899937016839e+01, 1.37814308805037e+01, 1.37694437373397e+01, 1.37532086749777e+01, 1.37318396344258e+01,\n                                                1.37044094442289e+01, 1.36699754931527e+01, 1.36276090608549e+01, 1.35764273635993e+01, 1.35156271073395e+01,\n                                                1.34445181177020e+01, 1.33625554638476e+01, 1.32693684325352e+01, 1.31647847501910e+01, 1.30488485919006e+01,\n                                                1.29218311455090e+01, 1.27842328037019e+01, 1.26367764309493e+01, 1.24803915982605e+01, 1.23161902008411e+01,\n                                                1.21454344614640e+01, 1.19694989342594e+01, 1.17898286814760e+01, 1.16078961963833e+01, 1.14251597892283e+01,\n                                                1.12430259784170e+01, 1.10628179384039e+01, 1.08857513218469e+01, 1.07129179226630e+01, 1.05452768253645e+01,\n                                                1.03836520244643e+01, 1.02287350801231e+01, 1.00810912281352e+01, 9.94116745454693e+00, 9.80930131022729e+00,\n                                                9.68572959509560e+00, 9.57059640665794e+00, 9.46396036340073e+00, 9.36580104647805e+00, 9.27602484389227e+00,\n                                                9.19447043990480e+00, 9.12091418960239e+00, 9.05507557844205e+00, 8.99662291054506e+00, 8.94517931281700e+00,\n                                                8.90032909308103e+00, 8.86162445187537e+00, 8.82859251797245e+00, 8.80074265375560e+00, 8.77757395495547e+00,\n                                                8.75858284753849e+00, 8.74327066191452e+00, 8.73115104178365e+00, 8.72175702376848e+00, 8.71464760707891e+00,\n                                                8.70941362260365e+00, 8.70568271045410e+00, 8.70312322580965e+00, 8.70144691562637e+00, 8.70041024292923e+00,\n                                                8.69981427944386e+00, 8.69950313870454e+00, 8.69936097727995e+00, 8.69930764783986e+00, 8.69929314095971e+00,\n                                                8.69929099977533e+00, 8.69929080922520e+00, 8.69928705822316e+00, 8.69926164466420e+00, 8.69916822220878e+00,\n                                                8.69891919589613e+00, 8.69837422643920e+00, 8.69733061575664e+00, 8.69551599021283e+00, 8.69258366917338e+00,\n                                                8.68811107105735e+00, 8.68160146191746e+00, 8.67248928605929e+00, 8.66014922728651e+00, 8.64390902714490e+00,\n                                                8.62306593017098e+00, 8.59690643777719e+00, 8.56472884086022e+00, 8.52586778280628e+00, 8.47971990223563e+00,\n                                                8.42576944514720e+00, 8.36361264386432e+00, 8.29297965111813e+00, 8.21375289126838e+00, 8.12598082604849e+00,\n                                                8.02988629033926e+00, 7.92586869035971e+00, 7.81449944807001e+00, 7.69651014852191e+00, 7.57277300331168e+00,\n                                                7.44427364995514e+00, 7.31207712348941e+00, 7.17728907798053e+00, 7.04101572982899e+00, 6.90432696674148e+00,\n                                                6.76822696942860e+00, 6.63363523490549e+00, 6.50137845348810e+00, 6.37219122273379e+00, 6.24672205100809e+00,\n                                                6.12554094591095e+00, 6.00914584510630e+00, 5.89796657923618e+00, 5.79236633812680e+00, 5.69264140780867e+00,\n                                                5.59902022235859e+00, 5.51166267398019e+00, 5.43066033453031e+00, 5.35603791369287e+00, 5.28775600374876e+00,\n                                                5.22571497462440e+00, 5.16975978591599e+00, 5.11968545686928e+00, 5.07524295705120e+00, 5.03614532730530e+00,\n                                                5.00207389485965e+00, 4.97268449597752e+00, 4.94761365717045e+00, 4.92648470864306e+00, 4.90891381119514e+00,\n                                                4.89451587218690e+00, 4.88291031056740e+00, 4.87372660924686e+00, 4.86660956936178e+00, 4.86122415918414e+00,\n                                                4.85725983403801e+00, 4.85443419534741e+00, 4.85249585864060e+00, 4.85122641270605e+00, 4.85044137476653e+00,\n                                                4.84999007812807e+00, 4.84975446705928e+00, 4.84964681588838e+00, 4.84960643245585e+00, 4.84959544720554e+00,\n                                                4.84959382580642e+00, 4.84959368246640e+00, 4.84959087150934e+00, 4.84957182689006e+00, 4.84950181727985e+00,\n                                                4.84931520062680e+00, 4.84890681120761e+00, 4.84812476008013e+00, 4.84676496523517e+00, 4.84456770864788e+00,\n                                                4.84121649385944e+00, 4.83633944564748e+00, 4.82951344766080e+00, 4.82027114924453e+00, 4.80811088449694e+00,\n                                                4.79250943224727e+00, 4.77293740552437e+00, 4.74887689748060e+00, 4.71984083617560e+00, 4.68539332559846e+00,\n                                                4.64517009025278e+00, 4.59889801235453e+00, 4.54641267062198e+00, 4.48767277235757e+00, 4.42277042793147e+00,\n                                                4.35193635768667e+00, 4.27553935069839e+00, 4.19407961196231e+00, 4.10817602921922e+00, 4.01854783857360e+00,\n                                                3.92599162832363e+00, 3.83135503684843e+00, 3.73550880986545e+00, 3.63931902854653e+00, 3.54362126882811e+00,\n                                                3.44919820364476e+00, 3.35676175047143e+00, 3.26694036261135e+00, 3.18027154413869e+00, 3.09719921077542e+00,\n                                                3.01807517761168e+00, 2.94316385617880e+00, 2.87264918575533e+00, 2.80664288229568e+00, 2.74519322596800e+00,\n                                                2.68829378566753e+00, 2.63589166225641e+00, 2.58789499772551e+00, 2.54417963178394e+00, 2.50459488659634e+00,\n                                                2.46896852699876e+00, 2.43711098350221e+00, 2.40881894570644e+00, 2.38387844070594e+00, 2.36206750949732e+00,\n                                                2.34315858745569e+00, 2.32692068438765e+00, 2.31312144626613e+00, 2.30152916477907e+00, 2.29191478243762e+00,\n                                                2.28405392051848e+00, 2.27772893520923e+00, 2.27273098500749e+00, 2.26886207103551e+00, 2.26593699301742e+00,\n                                                2.26378514880447e+00, 2.26225209594043e+00, 2.26120079089236e+00, 2.26051242576732e+00, 2.26008679349717e+00,\n                                                2.25984212984737e+00, 2.25971440284028e+00, 2.25965604547740e+00, 2.25963415396555e+00, 2.25962819897655e+00,\n                                                2.25962732003384e+00, 2.25962724112953e+00, 2.25962568019529e+00, 2.25961510466881e+00, 2.25957622840298e+00,\n                                                2.25947260230203e+00, 2.25924583814360e+00, 2.25881163055771e+00, 2.25805676799815e+00, 2.25683732146170e+00,\n                                                2.25497819536203e+00, 2.25227421393642e+00, 2.24849289323377e+00, 2.24337900705735e+00, 2.23666098987565e+00,\n                                                2.22805912744314e+00, 2.21729536710967e+00, 2.20410443999301e+00, 2.18824583765690e+00, 2.16951604368106e+00,\n                                                2.14776030665471e+00, 2.12288317779463e+00, 2.09485704229895e+00, 2.06372795912290e+00, 2.02961828718879e+00,\n                                                1.99272580113512e+00, 1.95331925837021e+00, 1.91173063670294e+00, 1.86834448541903e+00, 1.82358500026687e+00,\n                                                1.77790153857946e+00, 1.73175334463841e+00, 1.68559427569776e+00, 1.63985832043505e+00, 1.59494668363929e+00,\n                                                1.55121715468558e+00, 1.50897635337867e+00, 1.46847523365379e+00, 1.42990792958256e+00, 1.39341369150596e+00,\n                                                1.35908135132741e+00, 1.32695554403950e+00, 1.29704383950308e+00, 1.26932400480702e+00, 1.24375078651005e+00,\n                                                1.22026181839801e+00, 1.19878247142517e+00, 1.17922963253731e+00, 1.16151451330204e+00, 1.14554464982326e+00,\n                                                1.13122527402805e+00, 1.11846022763900e+00, 1.10715256692787e+00, 1.09720497809830e+00, 1.08852009557334e+00,\n                                                1.08100079130777e+00, 1.07455048326191e+00, 1.06907349501313e+00, 1.06447548532896e+00, 1.06066395551162e+00,\n                                                1.05754883273940e+00, 1.05504311902892e+00, 1.05306358765500e+00, 1.05153150196986e+00, 1.05037332583354e+00,\n                                                1.04952139068599e+00, 1.04891448207148e+00, 1.04849830851719e+00, 1.04822581827359e+00, 1.04805733454292e+00,\n                                                1.04796048720806e+00, 1.04790992825435e+00, 1.04788682838295e+00, 1.04787816297447e+00, 1.04787580578750e+00,\n                                                1.04787545787216e+00, 1.04787542580058e+00, 1.04787478199945e+00, 1.04787042016731e+00, 1.04785438583916e+00,\n                                                1.04781164596012e+00, 1.04771811967303e+00, 1.04753903970960e+00, 1.04722772468350e+00, 1.04672484255908e+00,\n                                                1.04595824450188e+00, 1.04484344401462e+00, 1.04328480590105e+00, 1.04117749011308e+00, 1.03841016422353e+00,\n                                                1.03486845360573e+00, 1.03043904097165e+00, 1.02501426024437e+00, 1.01849696074424e+00, 1.01080535642425e+00,\n                                                1.00187753335657e+00, 9.91675278376359e-01, 9.80186920784035e-01, 9.67428948875035e-01, 9.53446267062425e-01,\n                                                9.38311082724898e-01, 9.22120534823101e-01, 9.04993278875185e-01, 8.87065310493895e-01, 8.68485336846756e-01,\n                                                8.49409996119153e-01, 8.29999189973698e-01, 8.10411745578502e-01, 7.90801571944481e-01, 7.71314425325190e-01,\n                                                7.52085351455833e-01, 7.33236827803850e-01, 7.14877586707590e-01, 6.97102061996201e-01, 6.79990370565896e-01,\n                                                6.63608719720635e-01, 6.48010122864399e-01, 6.33235310234230e-01, 6.19313735572145e-01, 6.06264600347444e-01,\n                                                5.94097840363112e-01, 5.82815041813461e-01, 5.72410272669703e-01, 5.62870829441199e-01, 5.54177908747633e-01,\n                                                5.46307218334562e-01, 5.39229544128787e-01, 5.32911289677937e-01, 5.27315002721231e-01, 5.22399901327347e-01,\n                                                5.18122409395602e-01, 5.14436708528557e-01, 5.11295310394164e-01, 5.08649650687410e-01, 5.06450702655542e-01,\n                                                5.04649604888240e-01, 5.03198294778713e-01, 5.02050135882303e-01, 5.01160524544453e-01, 5.00487458878677e-01,\n                                                4.99992051692473e-01, 4.99638968500161e-01, 4.99396772478011e-01, 4.99238160173068e-01, 4.99140074928157e-01,\n                                                4.99083689178853e-01, 4.99054251758928e-01, 4.99040801792123e-01, 4.99035756283003e-01, 4.99034383785755e-01,\n                                                4.99034181208163e-01, 4.99034161902728e-01, 4.99033767518142e-01, 4.99031095510194e-01, 4.99021273010403e-01,\n                                                4.98995090478175e-01, 4.98937793923798e-01, 4.98828076721811e-01, 4.98637316854094e-01, 4.98329103536722e-01,\n                                                4.97859094632926e-01, 4.97175242196736e-01, 4.96218416843199e-01, 4.94923451234840e-01, 4.93220607795056e-01,\n                                                4.91037455243227e-01, 4.88301112913369e-01, 4.84940792367979e-01, 4.80890535098105e-01, 4.76092016829497e-01,\n                                                4.70497267623333e-01, 4.64071147071838e-01, 4.56793418942837e-01, 4.48660291053240e-01, 4.39685322536285e-01,\n                                                4.29899647586630e-01, 4.19351515458182e-01, 4.08105193309773e-01, 3.96239314831405e-01, 3.83844779616755e-01,\n                                                3.71022315911841e-01, 3.57879816116913e-01, 3.44529545779096e-01, 3.31085318278692e-01, 3.17659722449875e-01,\n                                                3.04361489348434e-01, 2.91293084753750e-01, 2.78548611669994e-01, 2.66212098236853e-01, 2.54356229070176e-01,\n                                                2.43041552708764e-01, 2.32316167479823e-01, 2.22215857033419e-01, 2.12764619477387e-01, 2.03975513941572e-01,\n                                                1.95851737377190e-01, 1.88387842602335e-01, 1.81571014783788e-01, 1.75382335581322e-01, 1.69797979654629e-01,\n                                                1.64790304882061e-01, 1.60328813638916e-01, 1.56380976561110e-01, 1.52912921652394e-01, 1.49890000104232e-01,\n                                                1.47277245839664e-01, 1.45039748821858e-01, 1.43142962944058e-01, 1.41552968240248e-01, 1.40236704622815e-01,\n                                                1.39162190753659e-01, 1.38298737361129e-01, 1.37617159693772e-01, 1.37089989208953e-01, 1.36691680375854e-01,\n                                                1.36398804943720e-01, 1.36190223455852e-01, 1.36047222370767e-01, 1.35953604982081e-01, 1.35895725393191e-01,\n                                                1.35862456973868e-01, 1.35845089774470e-01, 1.35837154994583e-01, 1.35834178455394e-01, 1.35833368771237e-01,\n                                                1.35833249263793e-01, 1.35833237435229e-01, 1.35832991180131e-01, 1.35831322774226e-01, 1.35825189666484e-01,\n                                                1.35808842042842e-01, 1.35773070690821e-01, 1.35704583515942e-01, 1.35585543950995e-01, 1.35393305958537e-01,\n                                                1.35100381536915e-01, 1.34674676527474e-01, 1.34080027729507e-01, 1.33277067394669e-01, 1.32224428767600e-01,\n                                                1.30880287574904e-01, 1.29204209117304e-01, 1.27159239829666e-01, 1.24714148061745e-01, 1.21845684940517e-01,\n                                                1.18540707184838e-01, 1.14797985006497e-01, 1.10629515026194e-01, 1.06061174691419e-01, 1.01132593127954e-01,\n                                                9.58961727382110e-02, 9.04152715443907e-02, 8.47616399638866e-02, 7.90122862713218e-02, 7.32460101991741e-02,\n                                                6.75398829426932e-02, 6.19659569631352e-02, 5.65884587655887e-02, 5.14616569469801e-02, 4.66285164520102e-02,\n                                                4.21201615836146e-02, 3.79560886002253e-02, 3.41450047945280e-02, 3.06861313323061e-02, 2.75707932195104e-02,\n                                                2.47841284654662e-02, 2.23067737758882e-02, 2.01164187494633e-02, 1.81891577910882e-02, 1.65006034932631e-02,\n                                                1.50267537098685e-02, 1.37446254791449e-02, 1.26326823721072e-02, 1.16710887392451e-02, 1.08418261550760e-02,\n                                                1.01287056580830e-02, 9.51730555551933e-03, 8.99485974864689e-03, 8.55011656158666e-03, 8.17318344523343e-03,\n                                                7.85536893707217e-03, 7.58902997079858e-03, 7.36743002080331e-03, 7.18461155420869e-03, 7.03528474077686e-03,\n                                                6.91473322080327e-03, 6.81873684501255e-03, 6.74351058849965e-03, 6.68565824385325e-03, 6.64213898881627e-03,\n                                                6.61024450148417e-03, 6.58758398037662e-03, 6.57207424658068e-03, 6.56193208843803e-03, 6.55566617145809e-03,\n                                                6.55206617576454e-03, 6.55018731596968e-03, 6.54932900063088e-03, 6.54900704137518e-03, 6.54891946295777e-03,\n                                                6.54890653665419e-03, 6.54890520326035e-03, 6.54887689851691e-03, 6.54868513263551e-03, 6.54798022492287e-03,\n                                                6.54610153731383e-03, 6.54199178775272e-03, 6.53412768335571e-03, 6.52047243839959e-03, 6.49845686658068e-03,\n                                                6.46499680709667e-03, 6.41655523313744e-03, 6.34925694291866e-03, 6.25906163642398e-03, 6.14199689757555e-03,\n                                                5.99444585281361e-03, 5.81347526778586e-03, 5.59717946470784e-03, 5.34500537208871e-03, 5.05801661646998e-03,\n                                                4.73905248284723e-03, 4.39274306543069e-03, 4.02535601723031e-03, 3.64447199600448e-03, 3.25851188750903e-03,\n                                                2.87616397597290e-03, 2.50577762020399e-03, 2.15479702998778e-03, 1.82930252888625e-03, 1.53370876831715e-03,\n                                                1.27064400364318e-03, 1.04100711845589e-03, 8.44174394607933e-04, 6.78309665435251e-04, 5.40722177323261e-04,\n                                                4.28218230389632e-04, 3.37405592340190e-04, 2.64930016268039e-04, 2.07643075405883e-04, 1.62711712807351e-04,\n                                                1.27679832779393e-04, 1.00486867772531e-04, 7.94471362297600e-05, 6.32007879062257e-05, 5.06557259321028e-05,\n                                                4.09396037674981e-05, 3.33688889888606e-05, 2.74269589759513e-05, 2.27373715091517e-05, 1.90257694363538e-05,\n                                                1.60780946067973e-05, 1.37119977239308e-05, 1.17714824163784e-05, 1.01358498305615e-05, 8.72473978574817e-06,\n                                                7.49123225673998e-06, 6.40845020072334e-06, 5.45799075624132e-06, 4.62383157540103e-06, 3.89079997020758e-06,\n                                                3.24522105543679e-06, 2.67592812619455e-06, 2.17474877928225e-06, 1.73623704569081e-06, 1.35683241708762e-06,\n                                                1.03382299698751e-06, 7.64461834279473e-07, 5.45416877884008e-07, 1.06581410364015e-14, 1.42108547152020e-14,\n                                                1.77635683940025e-14, 1.42108547152020e-14, 1.77635683940025e-14, 1.42108547152020e-14, 1.77635683940025e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {2.30000000000000e+01,  2.29999999401464e+01,  2.29999980893540e+01,  2.29999855499374e+01,\n                                                2.29999394533254e+01,  2.29998165736857e+01,  2.29995476393951e+01,  2.29990325398028e+01,\n                                                2.29981365950550e+01,  2.29966880211283e+01,  2.29944766823397e+01,  2.29912541817607e+01,\n                                                2.29867352989530e+01,  2.29806007473227e+01,  2.29725011931370e+01,  2.29620624571739e+01,\n                                                2.29488918091086e+01,  2.29325852631267e+01,  2.29127357875058e+01,  2.28889423451617e+01,\n                                                2.28608196786729e+01,  2.28280087338345e+01,  2.27901875736356e+01,  2.27470825668903e+01,\n                                                2.26984795457692e+01,  2.26442345244648e+01,  2.25842834741327e+01,  2.25186505782332e+01,\n                                                2.24474543688029e+01,  2.23709111845472e+01,  2.22893355031386e+01,  2.22031368776018e+01,\n                                                2.21128134324994e+01,  2.20189421222456e+01,  2.19221661889794e+01,  2.18231804501834e+01,\n                                                2.17227151731577e+01,  2.16215193424187e+01,  2.15203440977026e+01,  2.14199270264786e+01,\n                                                2.13209778555627e+01,  2.12241659247732e+01,  2.11301096637306e+01,  2.10393681486020e+01,\n                                                2.09524347002592e+01,  2.08697324038239e+01,  2.07916113810823e+01,  2.07183476269467e+01,\n                                                2.06501432219878e+01,  2.05871277475370e+01,  2.05293607510759e+01,  2.04768351321166e+01,\n                                                2.04294813386642e+01,  2.03871722793167e+01,  2.03497288650884e+01,  2.03169260980347e+01,\n                                                2.02884996213065e+01,  2.02641526383407e+01,  2.02435630987113e+01,  2.02263910360950e+01,\n                                                2.02122859312493e+01,  2.02008939613139e+01,  2.01918649875506e+01,  2.01848591281436e+01,\n                                                2.01795527620779e+01,  2.01756438152863e+01,  2.01728561917903e+01,  2.01709432306097e+01,\n                                                2.01696900934870e+01,  2.01689150182047e+01,  2.01684694062959e+01,  2.01682367507481e+01,\n                                                2.01681304471430e+01,  2.01680905687701e+01,  2.01680797208650e+01,  2.01680781197361e+01,\n                                                2.01680779005642e+01,  2.01680727244642e+01,  2.01680376556528e+01,  2.01679087394089e+01,\n                                                2.01675650992338e+01,  2.01668130673499e+01,  2.01653728985301e+01,  2.01628686275042e+01,\n                                                2.01588215822270e+01,  2.01526480080092e+01,  2.01436611857411e+01,  2.01310783344192e+01,\n                                                2.01140324665637e+01,  2.00915892083450e+01,  2.00627684000510e+01,  2.00265700566684e+01,\n                                                1.99820039982569e+01,  1.99281221684832e+01,  1.98640523693882e+01,  1.97890318837993e+01,\n                                                1.97024392760818e+01,  1.96038226051035e+01,  1.94929223949112e+01,  1.93696880154559e+01,\n                                                1.92342866198010e+01,  1.90871044092369e+01,  1.89287406470805e+01,  1.87599953762075e+01,\n                                                1.85818520800939e+01,  1.83954564838323e+01,  1.82020923447632e+01,  1.80031545807875e+01,\n                                                1.78001196758575e+01,  1.75945132519602e+01,  1.73878751624462e+01,  1.71817233683560e+01,\n                                                1.69775188588184e+01,  1.67766344600811e+01,  1.65803301403179e+01,  1.63897363262476e+01,\n                                                1.62058452076666e+01,  1.60295086370744e+01,  1.58614405101621e+01,  1.57022215436056e+01,\n                                                1.55523049178287e+01,  1.54120219670268e+01,  1.52815876956250e+01,  1.51611062576813e+01,\n                                                1.50505766655267e+01,  1.49498989729786e+01,  1.48588810896640e+01,  1.47772462856296e+01,\n                                                1.47046413696408e+01,  1.46406454781566e+01,  1.45847793899576e+01,  1.45365152740350e+01,\n                                                1.44952867760013e+01,  1.44604993438272e+01,  1.44315406832299e+01,  1.44077912155674e+01,\n                                                1.43886343879864e+01,  1.43734666597722e+01,  1.43617069641771e+01,  1.43528054254992e+01,\n                                                1.43462511005989e+01,  1.43415785153633e+01,  1.43383727817586e+01,  1.43362731106516e+01,\n                                                1.43349745787581e+01,  1.43342280628355e+01,  1.43338383174299e+01,  1.43336602402617e+01,\n                                                1.43335934374855e+01,  1.43335752655218e+01,  1.43335725833784e+01,  1.43335723287691e+01,\n                                                1.43335671378890e+01,  1.43335319689529e+01,  1.43334026848225e+01,  1.43330580653979e+01,\n                                                1.43323038975588e+01,  1.43308596653677e+01,  1.43283484133324e+01,  1.43242903136742e+01,\n                                                1.43181004177114e+01,  1.43090910052091e+01,  1.42964788555436e+01,  1.42793976420458e+01,\n                                                1.42569154885598e+01,  1.42280575212736e+01,  1.41918330011800e+01,  1.41472663424653e+01,\n                                                1.40934310272465e+01,  1.40294851421322e+01,  1.39547070162127e+01,  1.38685292622740e+01,\n                                                1.37705694370116e+01,  1.36606555564797e+01,  1.35388448348653e+01,  1.34054342562269e+01,\n                                                1.32609619371001e+01,  1.31061986921131e+01,  1.29421297738891e+01,  1.27699274105693e+01,\n                                                1.25909154717473e+01,  1.24065282833488e+01,  1.22182661790521e+01,  1.20276507050400e+01,\n                                                1.18361823949090e+01,  1.16453036688232e+01,  1.14563687283618e+01,  1.12706214302781e+01,\n                                                1.10891811864031e+01,  1.09130361138017e+01,  1.07430420731854e+01,  1.05799259466317e+01,\n                                                1.04242915121099e+01,  1.02766265108111e+01,  1.01373098806450e+01,  1.00066185469870e+01,\n                                                9.88473353787885e+00,  9.77174547295334e+00,  9.66765964358566e+00,  9.57240096412188e+00,\n                                                9.48581905650424e+00,  9.40769366623522e+00,  9.33774052711517e+00,  9.27561771798434e+00,\n                                                9.22093249880906e+00,  9.17324857848769e+00,  9.13209374882820e+00,  9.09696781129776e+00,\n                                                9.06735071821923e+00,  9.04271084267533e+00,  9.02251327862747e+00,  9.00622805439556e+00,\n                                                8.99333812049033e+00,  8.98334695002111e+00,  8.97578557031019e+00,  8.97021883166571e+00,\n                                                8.96625071663000e+00,  8.96352850255909e+00,  8.96174561298479e+00,  8.96064302841095e+00,\n                                                8.96000917327795e+00,  8.95967825001454e+00,  8.95952704986698e+00,  8.95947032970210e+00,\n                                                8.95945490046375e+00,  8.95945262314128e+00,  8.95945242047582e+00,  8.95944843098228e+00,\n                                                8.95942140161025e+00,  8.95932203928357e+00,  8.95905717967413e+00,  8.95847756054744e+00,\n                                                8.95736759587318e+00,  8.95543759358260e+00,  8.95231882919282e+00,  8.94756185004625e+00,\n                                                8.94063833534276e+00,  8.93094676870506e+00,  8.91782208559927e+00,  8.90054933159398e+00,\n                                                8.87838120621015e+00,  8.85055917279059e+00,  8.81633759537307e+00,  8.77501013357491e+00,\n                                                8.72593740606223e+00,  8.66857474473995e+00,  8.60249872528815e+00,  8.52743108692259e+00,\n                                                8.44325864524919e+00,  8.35004784643209e+00,  8.24805269801405e+00,  8.13771495016194e+00,\n                                                8.01965564076289e+00,  7.89465755823799e+00,  7.76363893566493e+00,  7.62761981880369e+00,\n                                                7.48768390763861e+00,  7.34493985120724e+00,  7.20048640774093e+00,  7.05538513406808e+00,\n                                                6.91064239707528e+00,  6.76720015130176e+00,  6.62593302158325e+00,  6.48764843815459e+00,\n                                                6.35308697406646e+00,  6.22292119160577e+00,  6.09775260117277e+00,  5.97810730989972e+00,\n                                                5.86443140767923e+00,  5.75708715794043e+00,  5.65635079478476e+00,  5.56241235123506e+00,\n                                                5.47537758395211e+00,  5.39527178804346e+00,  5.32204513348001e+00,  5.25557909311538e+00,\n                                                5.19569354717526e+00,  5.14215421227037e+00,  5.09468012913227e+00,  5.05295103272399e+00,\n                                                5.01661450781512e+00,  4.98529289486861e+00,  4.95858995197421e+00,  4.93609729861874e+00,\n                                                4.91740066851043e+00,  4.90208598502860e+00,  4.88974524845954e+00,  4.87998219364853e+00,\n                                                4.87241764467821e+00,  4.86669446401798e+00,  4.86248197105189e+00,  4.85947969194637e+00,\n                                                4.85742030139960e+00,  4.85607162769348e+00,  4.85523761521094e+00,  4.85475817162262e+00,\n                                                4.85450786778977e+00,  4.85439350394002e+00,  4.85435060244155e+00,  4.85433893222489e+00,\n                                                4.85433720972649e+00,  4.85433705744878e+00,  4.85433407121996e+00,  4.85431383911578e+00,\n                                                4.85423946429209e+00,  4.85404121240119e+00,  4.85360736370290e+00,  4.85277657093006e+00,\n                                                4.85133206377774e+00,  4.84899802337070e+00,  4.84543842799304e+00,  4.84025863989348e+00,\n                                                4.83300995599398e+00,  4.82319727637597e+00,  4.81028994789191e+00,  4.79373571268899e+00,\n                                                4.77297753276846e+00,  4.74747287627425e+00,  4.71671484832039e+00,  4.68025434307429e+00,\n                                                4.63772220298446e+00,  4.58885021684132e+00,  4.53348969327187e+00,  4.47162633185962e+00,\n                                                4.40339019878798e+00,  4.32905981046128e+00,  4.24905964079352e+00,  4.16395078680594e+00,\n                                                4.07441502719989e+00,  3.98123304516975e+00,  3.88525809834769e+00,  3.78738683445080e+00,\n                                                3.68852920376939e+00,  3.58957946176521e+00,  3.49139007302329e+00,  3.39474994783581e+00,\n                                                3.30036792677947e+00,  3.20886186067111e+00,  3.12075309975961e+00,  3.03646577746173e+00,\n                                                2.95632999233976e+00,  2.88058786692462e+00,  2.80940147506640e+00,  2.74286174436342e+00,\n                                                2.68099761395905e+00,  2.62378492097847e+00,  2.57115467103715e+00,  2.52300050138197e+00,\n                                                2.47918526208440e+00,  2.43954672221896e+00,  2.40390245983360e+00,  2.37205402421109e+00,\n                                                2.34379047350302e+00,  2.31889139581952e+00,  2.29712952092522e+00,  2.27827302480667e+00,\n                                                2.26208762132328e+00,  2.24833852405812e+00,  2.23679234726130e+00,  2.22721899746474e+00,\n                                                2.21939358730202e+00,  2.21309838105206e+00,  2.20812475860469e+00,  2.20427516240047e+00,\n                                                2.20136497209920e+00,  2.19922423596340e+00,  2.19769917770565e+00,  2.19665339396462e+00,\n                                                2.19596866121823e+00,  2.19554528174123e+00,  2.19530191540711e+00,  2.19517486634906e+00,\n                                                2.19511681889130e+00,  2.19509504365897e+00,  2.19508912030301e+00,  2.19508824602936e+00,\n                                                2.19508816754420e+00,  2.19508661490190e+00,  2.19507609555616e+00,  2.19503742584174e+00,\n                                                2.19493435052339e+00,  2.19470879271530e+00,  2.19427689917453e+00,  2.19352607245976e+00,\n                                                2.19231318032628e+00,  2.19046412940076e+00,  2.18777498004871e+00,  2.18401475656066e+00,\n                                                2.17893006504660e+00,  2.17225156517436e+00,  2.16370224772896e+00,  2.15300734828369e+00,\n                                                2.13990558361823e+00,  2.12416124347409e+00,  2.10557652320027e+00,  2.08400336438135e+00,\n                                                2.05935400319987e+00,  2.03160942914911e+00,  2.00082504062816e+00,  1.96713294773853e+00,\n                                                1.93074060169943e+00,  1.89192569884894e+00,  1.85102758349949e+00,  1.80843562778501e+00,\n                                                1.76457527603337e+00,  1.71989259521346e+00,  1.67483826961065e+00,  1.62985201734595e+00,\n                                                1.58534838422043e+00,  1.54170477520557e+00,  1.49925240324625e+00,  1.45827056799369e+00,\n                                                1.41898434640503e+00,  1.38156543180220e+00,  1.34613556148368e+00,  1.31277178169824e+00,\n                                                1.28151274139799e+00,  1.25236527505065e+00,  1.22531069264520e+00,  1.20031039172275e+00,\n                                                1.17731059623973e+00,  1.15624618031806e+00,  1.13704363946291e+00,  1.11962332982888e+00,\n                                                1.10390111771379e+00,  1.08978957903373e+00,  1.07719887306806e+00,  1.06603739425438e+00,\n                                                1.05621228514880e+00,  1.04762987523218e+00,  1.04019609474912e+00,  1.03381689997892e+00,\n                                                1.02839873561626e+00,  1.02384905057731e+00,  1.02007687496291e+00,  1.01699345773062e+00,\n                                                1.01451295671434e+00,  1.01255316506872e+00,  1.01103625127553e+00,  1.00988948393625e+00,\n                                                1.00904590815906e+00,  1.00844493789040e+00,  1.00803282840990e+00,  1.00776299561155e+00,\n                                                1.00759615362223e+00,  1.00750024950990e+00,  1.00745018282496e+00,  1.00742730783451e+00,\n                                                1.00741872678007e+00,  1.00741639253881e+00,  1.00741604801019e+00,  1.00741601625080e+00,\n                                                1.00741537871662e+00,  1.00741105934345e+00,  1.00739518109063e+00,  1.00735285718740e+00,\n                                                1.00726024093006e+00,  1.00708290254595e+00,  1.00677461228072e+00,  1.00627660865245e+00,\n                                                1.00551742959361e+00,  1.00441337988383e+00,  1.00286969818070e+00,  1.00078246817356e+00,\n                                                9.98041288356006e-01,  9.94532672169164e-01,  9.90144095287153e-01,  9.84768542776155e-01,\n                                                9.78309342061959e-01,  9.70685007283691e-01,  9.61833777677914e-01,  9.51717517875259e-01,\n                                                9.40324669278120e-01,  9.27672001437941e-01,  9.13805005872369e-01,  8.98796890362572e-01,\n                                                8.82746252929891e-01,  8.65773623837022e-01,  8.48017146636714e-01,  8.29627717223545e-01,\n                                                8.10763911846955e-01,  7.91587015691622e-01,  7.72256420614529e-01,  7.52925602150611e-01,\n                                                7.33738819158543e-01,  7.14828610437241e-01,  6.96314096527814e-01,  6.78300036647745e-01,\n                                                6.60876544758125e-01,  6.44119338472066e-01,  6.28090381259920e-01,  6.12838781206708e-01,\n                                                5.98401825274077e-01,  5.84806052067691e-01,  5.72068293614283e-01,  5.60196643325543e-01,\n                                                5.49191330123580e-01,  5.39045496031306e-01,  5.29745886104447e-01,  5.21273466048736e-01,\n                                                5.13603985382137e-01,  5.06708503837334e-01,  5.00553896979735e-01,  4.95103354573054e-01,\n                                                4.90316882574859e-01,  4.86151817026713e-01,  4.82563355559048e-01,  4.79505109691882e-01,\n                                                4.76929678478744e-01,  4.74789241241282e-01,  4.73036164167500e-01,  4.71623612471259e-01,\n                                                4.70506156784168e-01,  4.69640359688164e-01,  4.68985326046283e-01,  4.68503199304209e-01,\n                                                4.68159585438926e-01,  4.67923886881493e-01,  4.67769530607146e-01,  4.67674077628715e-01,\n                                                4.67619205198947e-01,  4.67590557876250e-01,  4.67577468913237e-01,  4.67572558829399e-01,\n                                                4.67571223171134e-01,  4.67571026030900e-01,  4.67571007243642e-01,  4.67570623444690e-01,\n                                                4.67568023155895e-01,  4.67558464302780e-01,  4.67532984551710e-01,  4.67477225996014e-01,\n                                                4.67370454166325e-01,  4.67184816078838e-01,  4.66884880260643e-01,  4.66427499273973e-01,\n                                                4.65762031372194e-01,  4.64830951493067e-01,  4.63570871681714e-01,  4.61913976241767e-01,\n                                                4.59789856889049e-01,  4.57127708150896e-01,  4.53858814499199e-01,  4.49919230726010e-01,\n                                                4.45252529499879e-01,  4.39812469233821e-01,  4.33565425672029e-01,  4.26492435252573e-01,\n                                                4.18590718573860e-01,  4.09874586689000e-01,  4.00375677171258e-01,  3.90142514569963e-01,\n                                                3.79239434043768e-01,  3.67744941846976e-01,  3.55749608899085e-01,  3.43353604211963e-01,\n                                                3.30663976690108e-01,  3.17791791339946e-01,  3.04849223250734e-01,  2.91946711744309e-01,\n                                                2.79190277026856e-01,  2.66679099599820e-01,  2.54503455027258e-01,  2.42743080836782e-01,\n                                                2.31466027926540e-01,  2.20728017884493e-01,  2.10572293975464e-01,  2.01029921824411e-01,\n                                                1.92120470153089e-01,  1.83852985076559e-01,  1.76227164447294e-01,  1.69234640915079e-01,\n                                                1.62860291926012e-01,  1.57083509378278e-01,  1.51879378587338e-01,  1.47219733416907e-01,\n                                                1.43074070274263e-01,  1.39410317111469e-01,  1.36195464112674e-01,  1.33396070289173e-01,\n                                                1.30978664932982e-01,  1.28910065134903e-01,  1.27157630758184e-01,  1.25689476781371e-01,\n                                                1.24474660171561e-01,  1.23483354780472e-01,  1.22687023508561e-01,  1.22058592482748e-01,\n                                                1.21572627558454e-01,  1.21205509397353e-01,  1.20935599974867e-01,  1.20743390882673e-01,\n                                                1.20611622392079e-01,  1.20525362025990e-01,  1.20472032340313e-01,  1.20441379620214e-01,\n                                                1.20425378038934e-01,  1.20418067218353e-01,  1.20415324747377e-01,  1.20414578735403e-01,\n                                                1.20414468625842e-01,  1.20414457727453e-01,  1.20414230837490e-01,  1.20412693633028e-01,\n                                                1.20407042833079e-01,  1.20391980844701e-01,  1.20359022971368e-01,  1.20295923551147e-01,\n                                                1.20186252102993e-01,  1.20009152156246e-01,  1.19739316808886e-01,  1.19347215149105e-01,\n                                                1.18799601144879e-01,  1.18060330011705e-01,  1.17091495097643e-01,  1.15854880102184e-01,\n                                                1.14313696865018e-01,  1.12434548988148e-01,  1.10189528451027e-01,  1.07558319734135e-01,\n                                                1.04530158504385e-01,  1.01105474985722e-01,  9.72970509266702e-02,  9.31305375845071e-02,\n                                                8.86442221029462e-02,  8.38879895812035e-02,  7.89215028120154e-02,  7.38117023544262e-02,\n                                                6.86298050591887e-02,  6.34480375057400e-02,  5.83363719342884e-02,  5.33595301744114e-02,\n                                                4.85744855343313e-02,  4.40286294399748e-02,  3.97586895153523e-02,  3.57904019957473e-02,\n                                                3.21388666628124e-02,  2.88094566536117e-02,  2.57991236562418e-02,  2.30979313789526e-02,\n                                                2.06906629648174e-02,  1.85583749982250e-02,  1.66798049973274e-02,  1.50325745950575e-02,\n                                                1.35941623277382e-02,  1.23426452941402e-02,  1.12572268905460e-02,  1.03185786913613e-02,\n                                                9.50902948107668e-03,  8.81263494679629e-03,  8.21515909452586e-03,  7.70399433448787e-03,\n                                                7.26804238837886e-03,  6.89757340727581e-03,  6.58407638497138e-03,  6.32011031482094e-03,\n                                                6.09916261325694e-03,  5.91551906851251e-03,  5.76414786753787e-03,  5.64059899407354e-03,\n                                                5.54091936017187e-03,  5.46158333242275e-03,  5.39943776217910e-03,  5.35166017167299e-03,\n                                                5.31572835988214e-03,  5.28939937021633e-03,  5.27069552245507e-03,  5.25789507843655e-03,\n                                                5.24952510907895e-03,  5.24435427384873e-03,  5.24138351394754e-03,  5.23983307697051e-03,\n                                                5.23912479904354e-03,  5.23885912049238e-03,  5.23878685146073e-03,  5.23877618477897e-03,\n                                                5.23877508447157e-03,  5.23875172741484e-03,  5.23859348243150e-03,  5.23801179467753e-03,\n                                                5.23646151711432e-03,  5.23307023565778e-03,  5.22658112895158e-03,  5.21531403143882e-03,\n                                                5.19715033733448e-03,  5.16954830341021e-03,  5.12959581296357e-03,  5.07410727116664e-03,\n                                                4.99976948691483e-03,  4.90333769626261e-03,  4.78187706550415e-03,  4.63303727202913e-03,\n                                                4.45533889358174e-03,  4.24844182342810e-03,  4.01335983160678e-03,  3.75258399333589e-03,\n                                                3.47008290086848e-03,  3.17116012540097e-03,  2.86216830129860e-03,  2.55010147714430e-03,\n                                                2.24210849273021e-03,  1.94498515483588e-03,  1.66470804581920e-03,  1.40606643741847e-03,\n                                                1.17243240472220e-03,  9.65686558341616e-04,  7.86292578560222e-04,  6.33492447150275e-04,\n                                                5.05579546931756e-04,  4.00201210084106e-04,  3.14646964231002e-04,  2.46092230575812e-04,\n                                                1.91784746085943e-04,  1.49175479940311e-04,  1.16001929757914e-04,  9.03298822443332e-05,\n                                                7.05566562686499e-05,  5.53818512152304e-05,  4.37603457967839e-05,  3.48566299486208e-05,\n                                                2.80113911550472e-05,  2.27176073686053e-05,  1.85974998920813e-05,  1.53749699478567e-05,\n                                                1.28444968297003e-05,  1.08437287664742e-05,  9.23815858300259e-06,  7.91873353378492e-06,\n                                                6.80466557057002e-06,  5.84329320574284e-06,  5.00442329354200e-06,  4.27140924941227e-06,\n                                                3.63281461446263e-06,  3.07745510852442e-06,  2.59329144469689e-06,  2.16870651570389e-06,\n                                                1.79419268064862e-06,  1.46319710481180e-06,  1.17189539494689e-06,  9.18293761031919e-07,\n                                                7.01185943086102e-07,  5.19324817815914e-07,  -2.48689957516035e-14, -2.48689957516035e-14,\n                                                -2.48689957516035e-14, -2.48689957516035e-14, -2.13162820728030e-14, -2.13162820728030e-14,\n                                                -2.13162820728030e-14, -2.13162820728030e-14, -2.13162820728030e-14}),\nmadness::CubicInterpolationTable<double>(grid, {2.40000000000000e+01, 2.39999999361989e+01, 2.39999979633438e+01,  2.39999845969319e+01, 2.39999354601687e+01,\n                                                2.39998044763790e+01, 2.39995178052233e+01, 2.39989687330786e+01,  2.39980136962261e+01, 2.39964695774100e+01,\n                                                2.39941123737494e+01, 2.39906772893723e+01, 2.39858602625627e+01,  2.39793208980064e+01, 2.39706867431430e+01,\n                                                2.39595588261822e+01, 2.39455183630653e+01, 2.39281345403714e+01,  2.39069732869371e+01, 2.38816069520700e+01,\n                                                2.38516248039105e+01, 2.38166442384433e+01, 2.37763225404996e+01,  2.37303689599663e+01, 2.36785567634503e+01,\n                                                2.36207348060522e+01, 2.35568380593883e+01, 2.34868964547758e+01,  2.34110413785675e+01, 2.33295092080156e+01,\n                                                2.32426414076611e+01, 2.31508809107583e+01, 2.30547647661218e+01,  2.29549133057586e+01, 2.28520163458319e+01,\n                                                2.27468171386461e+01, 2.26400949214093e+01, 2.25326469469728e+01,  2.24252708355913e+01, 2.23187479705555e+01,\n                                                2.22138284980735e+01, 2.21112183096351e+01, 2.20115682077885e+01,  2.19154653025817e+01, 2.18234265671695e+01,\n                                                2.17358944010432e+01, 2.16532340056636e+01, 2.15757323634743e+01,  2.15035986189082e+01, 2.14369656804974e+01,\n                                                2.13758928890819e+01, 2.13203696227007e+01, 2.12703197302485e+01,  2.12256067013399e+01, 2.11860394883333e+01,\n                                                2.11513788983602e+01, 2.11213444693332e+01, 2.10956217354434e+01,  2.10738697759560e+01, 2.10557289276285e+01,\n                                                2.10408285272737e+01, 2.10287945383738e+01, 2.10192569056664e+01,  2.10118564756376e+01, 2.10062513200784e+01,\n                                                2.10021223052191e+01, 2.09991777610607e+01, 2.09971571245259e+01,  2.09958334556558e+01, 2.09950147574752e+01,\n                                                2.09945440661084e+01, 2.09942983166424e+01, 2.09941860302767e+01,  2.09941439075570e+01, 2.09941324491345e+01,\n                                                2.09941307578945e+01, 2.09941305263877e+01, 2.09941250589781e+01,  2.09940880165049e+01, 2.09939518449158e+01,\n                                                2.09935888649935e+01, 2.09927945102692e+01, 2.09912732947465e+01,  2.09886281034557e+01, 2.09843533488656e+01,\n                                                2.09778324763055e+01, 2.09683402261058e+01, 2.09550499616697e+01,  2.09370462430636e+01, 2.09133426577107e+01,\n                                                2.08829047088215e+01, 2.08446773082816e+01, 2.07976161304601e+01,  2.07407217720575e+01, 2.06730753563400e+01,\n                                                2.05938739547436e+01, 2.05024640214607e+01, 2.03983709981087e+01,  2.02813233901517e+01, 2.01512699658300e+01,\n                                                2.00083892625863e+01, 1.98530912327036e+01, 1.96860114953921e+01,  1.95079991365595e+01, 1.93200991800027e+01,\n                                                1.91235306938913e+01, 1.89196610715162e+01, 1.87099765523662e+01,  1.84960488333130e+01, 1.82794979279239e+01,\n                                                1.80619523279112e+01, 1.78450087361674e+01, 1.76301946104084e+01,  1.74189368793166e+01, 1.72125392144178e+01,\n                                                1.70121684783338e+01, 1.68188491618997e+01, 1.66334634800867e+01,  1.64567546076409e+01, 1.62893311011857e+01,\n                                                1.61316714277063e+01, 1.59841282979208e+01, 1.58469329858929e+01,  1.57201999946542e+01, 1.56039323965214e+01,\n                                                1.54980280493971e+01, 1.54022867510282e+01, 1.53164182864212e+01,  1.52400512617709e+01, 1.51727425950127e+01,\n                                                1.51139875345779e+01, 1.50632300898930e+01, 1.50198737685181e+01,  1.49832925186813e+01, 1.49528417693990e+01,\n                                                1.49278694436228e+01, 1.49077267954117e+01, 1.48917788938749e+01,  1.48794145491340e+01, 1.48700554534047e+01,\n                                                1.48631642976453e+01, 1.48582516243164e+01, 1.48548811916831e+01,  1.48526736554095e+01, 1.48513084181229e+01,\n                                                1.48505235549375e+01, 1.48501137893024e+01, 1.48499265648397e+01,  1.48498563306159e+01, 1.48498372252170e+01,\n                                                1.48498344053006e+01, 1.48498341376128e+01, 1.48498286800941e+01,  1.48497917046450e+01, 1.48496557796283e+01,\n                                                1.48492934583988e+01, 1.48485005524182e+01, 1.48469821390478e+01,  1.48443419072231e+01, 1.48400754007903e+01,\n                                                1.48335676665131e+01, 1.48240957447838e+01, 1.48108363470956e+01,  1.47928789360895e+01, 1.47692442536128e+01,\n                                                1.47389081255199e+01, 1.47008301105321e+01, 1.46539862635490e+01,  1.45974049688729e+01, 1.45302044908528e+01,\n                                                1.44516306183653e+01, 1.43610925760985e+01, 1.42581952670121e+01,  1.41427659170670e+01, 1.40148733282543e+01,\n                                                1.38748382162633e+01, 1.37232335186075e+01, 1.35608741075405e+01,  1.33887960192057e+01, 1.32082260837496e+01,\n                                                1.30205436445036e+01, 1.28272367854796e+01, 1.26298560201289e+01,  1.24299686124754e+01, 1.22291165308481e+01,\n                                                1.20287804761063e+01, 1.18303515667480e+01, 1.16351112565450e+01,  1.14442190892698e+01, 1.12587071248511e+01,\n                                                1.10794794102304e+01, 1.09073147478743e+01, 1.07428711928917e+01,  1.05866910909036e+01, 1.04392059360644e+01,\n                                                1.03007407729422e+01, 1.01715182087398e+01, 1.00516623057820e+01,  9.94120268997673e+00, 9.84007916987771e+00,\n                                                9.74814705814405e+00, 9.66518326740180e+00, 9.59089314958035e+00,  9.52491797972662e+00, 9.46684295497905e+00,\n                                                9.41620557899681e+00, 9.37250431884159e+00, 9.33520744217311e+00,  9.30376195778836e+00, 9.27760258648243e+00,\n                                                9.25616068056200e+00, 9.23887299095794e+00, 9.22519015467550e+00,  9.21458474720143e+00, 9.20655871950903e+00,\n                                                9.20065002202111e+00, 9.19643821191427e+00, 9.19354884782272e+00,  9.19165649823550e+00, 9.19048622611220e+00,\n                                                9.18981346052773e+00, 9.18946222342183e+00, 9.18930174192199e+00,  9.18924154003545e+00, 9.18922516368759e+00,\n                                                9.18922274657386e+00, 9.18922253146799e+00, 9.18921829708325e+00,  9.18918960854078e+00, 9.18908414698013e+00,\n                                                9.18880302945252e+00, 9.18818783230095e+00, 9.18700973924089e+00,  9.18496128550988e+00, 9.18165113770050e+00,\n                                                9.17660231005902e+00, 9.16925416646648e+00, 9.15896848579851e+00,  9.14503976927224e+00, 9.12670983525904e+00,\n                                                9.10318657625948e+00, 9.07366654522503e+00, 9.03736080084598e+00,  8.99352318656859e+00, 8.94147996382580e+00,\n                                                8.88065948690887e+00, 8.81062041539805e+00, 8.73107682783188e+00,  8.64191854330323e+00, 8.54322499621701e+00,\n                                                8.43527117873438e+00, 8.31852452414381e+00, 8.19363222705088e+00,  8.06139943272430e+00, 7.92275992757976e+00,\n                                                7.77874219821062e+00, 7.63043459275038e+00, 7.47895337849253e+00,  7.32541653652285e+00, 7.17092440141319e+00,\n                                                7.01654637502916e+00, 6.86331163018575e+00, 6.71220137917711e+00,  6.56414084460483e+00, 6.41999011596993e+00,\n                                                6.28053411451304e+00, 6.14647258469327e+00, 6.01841127578250e+00,  5.89685534190310e+00, 5.78220562704756e+00,\n                                                5.67475806943721e+00, 5.57470607222892e+00, 5.48214540784279e+00,  5.39708106897601e+00, 5.31943543850624e+00,\n                                                5.24905719531850e+00, 5.18573047171376e+00, 5.12918390140356e+00,  5.07909932242044e+00, 5.03512001105949e+00,\n                                                4.99685841226449e+00, 4.96390339493140e+00, 4.93582709737665e+00,  4.91219144106819e+00, 4.89255438344674e+00,\n                                                4.87647595785753e+00, 4.86352411521304e+00, 4.85328034303728e+00,  4.84534499788413e+00, 4.83934225130095e+00,\n                                                4.83492452146490e+00, 4.83177624545672e+00, 4.82961684290387e+00,  4.82820273123874e+00, 4.82732827560335e+00,\n                                                4.82682559078075e+00, 4.82656315570305e+00, 4.82644324962070e+00,  4.82639826914192e+00, 4.82638603340189e+00,\n                                                4.82638422743377e+00, 4.82638406777691e+00, 4.82638093684006e+00,  4.82635972432541e+00, 4.82628174552503e+00,\n                                                4.82607388764620e+00, 4.82561902099758e+00, 4.82474799365162e+00,  4.82323357241753e+00, 4.82078667768883e+00,\n                                                4.81705523983575e+00, 4.81162597452751e+00, 4.80402932640292e+00,  4.79374775712900e+00, 4.78022744829168e+00,\n                                                4.76289334739895e+00, 4.74116730614733e+00, 4.71448884884016e+00,  4.68233787632700e+00, 4.64425837413964e+00,\n                                                4.59988197529911e+00, 4.54895005534611e+00, 4.49133293813201e+00,  4.42704479322362e+00, 4.35625293184517e+00,\n                                                4.27928047106840e+00, 4.19660173406223e+00, 4.10883026729469e+00,  4.01669994158702e+00, 3.92104020006495e+00,\n                                                3.82274704534699e+00, 3.72275174205243e+00, 3.62198938497387e+00,  3.52136941503888e+00, 3.42174986284008e+00,\n                                                3.32391661321955e+00, 3.22856839562087e+00, 3.13630760781838e+00,  3.04763656107775e+00, 2.96295835342028e+00,\n                                                2.88258136117350e+00, 2.80672628103838e+00, 2.73553472441005e+00,  2.66907851889230e+00, 2.60736906419335e+00,\n                                                2.55036628399530e+00, 2.49798688718924e+00, 2.45011178879626e+00,  2.40659264080986e+00, 2.36725749048546e+00,\n                                                2.33191562563350e+00, 2.30036169086812e+00, 2.27237917178565e+00,  2.24774334998619e+00, 2.22622383312154e+00,\n                                                2.20758676175615e+00, 2.19159678893201e+00, 2.17801891876476e+00,  2.16662027703592e+00, 2.15717186971718e+00,\n                                                2.14945036517568e+00, 2.14323991337672e+00, 2.13833399200488e+00,  2.13453724663280e+00, 2.13166727160523e+00,\n                                                2.12955626189249e+00, 2.12805245532777e+00, 2.12702128051805e+00,  2.12634612890088e+00, 2.12592867984412e+00,\n                                                2.12568872459746e+00, 2.12556345692311e+00, 2.12550622350584e+00,  2.12548475366625e+00, 2.12547891338622e+00,\n                                                2.12547805137447e+00, 2.12547797399008e+00, 2.12547644312401e+00,  2.12546607131666e+00, 2.12542794398724e+00,\n                                                2.12532631460855e+00, 2.12510392191643e+00, 2.12467809268053e+00,  2.12393782037916e+00, 2.12274200988486e+00,\n                                                2.12091907589046e+00, 2.11826807355184e+00, 2.11456151766210e+00,  2.10955000511278e+00, 2.10296868868327e+00,\n                                                2.09454555480050e+00, 2.08401133414666e+00, 2.07111072748767e+00,  2.05561447164341e+00, 2.03733161987426e+00,\n                                                2.01612128917552e+00, 1.99190305718202e+00, 1.96466519337731e+00,  1.93446999478643e+00, 1.90145566523832e+00,\n                                                1.86583441640994e+00, 1.82788675369707e+00, 1.78795220940350e+00,  1.74641706825927e+00, 1.70369986910157e+00,\n                                                1.66023564195914e+00, 1.61645993797049e+00, 1.57279371990009e+00,  1.52963009497856e+00, 1.48732368636367e+00,\n                                                1.44618316447408e+00, 1.40646712407713e+00, 1.36838314608178e+00,  1.33208958261776e+00, 1.29769940039978e+00,\n                                                1.26528533669636e+00, 1.23488565946332e+00, 1.20650994743583e+00,  1.18014447386809e+00, 1.15575694817131e+00,\n                                                1.13330051419739e+00, 1.11271700888086e+00, 1.09393954968592e+00,  1.07689455087786e+00, 1.06150327698731e+00,\n                                                1.04768303637654e+00, 1.03534810576987e+00, 1.02441046264968e+00,  1.01478038905468e+00, 1.00636699853364e+00,\n                                                9.99078727879049e-01, 9.92823826426157e-01, 9.87510867657662e-01,  9.83049300152995e-01, 9.79350047256851e-01,\n                                                9.76326157079853e-01, 9.73893496634439e-01, 9.71971476272493e-01,  9.70483783486532e-01, 9.69359099024061e-01,\n                                                9.68531763644076e-01, 9.67942361186722e-01, 9.67538183303201e-01,  9.67273543404243e-01, 9.67109912116005e-01,\n                                                9.67015853526664e-01, 9.66966750280879e-01, 9.66944315473171e-01,  9.66935899543142e-01, 9.66933610219414e-01,\n                                                9.66933272320510e-01, 9.66933241172271e-01, 9.66932615906082e-01,  9.66928379650017e-01, 9.66912806939604e-01,\n                                                9.66871297462728e-01, 9.66780463367254e-01, 9.66606537308031e-01,  9.66304178830757e-01, 9.65815756468910e-01,\n                                                9.65071181735311e-01, 9.63988367001079e-01, 9.62474369474197e-01,  9.60427265306237e-01, 9.57738768784036e-01,\n                                                9.54297570162019e-01, 9.49993312353534e-01, 9.44721064379159e-01,  9.38386084074118e-01, 9.30908602763960e-01,\n                                                9.22228320874900e-01, 9.12308286144402e-01, 9.01137843169906e-01,  8.88734397555616e-01, 8.75143826497489e-01,\n                                                8.60439480296225e-01, 8.44719841069747e-01, 8.28105019053513e-01,  8.10732358267739e-01, 7.92751481615841e-01,\n                                                7.74319126380824e-01, 7.55594106147743e-01, 7.36732690273548e-01,  7.17884625514873e-01, 6.99189945632405e-01,\n                                                6.80776632998924e-01, 6.62759120015174e-01, 6.45237554698440e-01,  6.28297709306857e-01, 6.12011385750311e-01,\n                                                5.96437166306668e-01, 5.81621369631279e-01, 5.67599095216696e-01,  5.54395268644015e-01, 5.42025629922044e-01,\n                                                5.30497633938300e-01, 5.19811253170069e-01, 5.09959687518016e-01,  5.00929994843535e-01, 4.92703659676859e-01,\n                                                4.85257118059518e-01, 4.78562254962416e-01, 4.72586888263500e-01,  4.67295250592940e-01, 4.62648477828026e-01,\n                                                4.58605110742532e-01, 4.55121614211620e-01, 4.52152916290657e-01,  4.49652967272630e-01, 4.47575316382832e-01,\n                                                4.45873701074955e-01, 4.44502641023320e-01, 4.43418026020652e-01,  4.42577684313207e-01, 4.41941915693114e-01,\n                                                4.41473972183019e-01, 4.41140468618268e-01, 4.40911706019193e-01,  4.40761892422021e-01, 4.40669248765602e-01,\n                                                4.40615991367249e-01, 4.40588187222101e-01, 4.40575483510582e-01,  4.40570717947349e-01, 4.40569421602142e-01,\n                                                4.40569230264433e-01, 4.40569212030148e-01, 4.40568839527739e-01,  4.40566315774554e-01, 4.40557038272772e-01,\n                                                4.40532308488105e-01, 4.40478191149960e-01, 4.40374562197007e-01,  4.40194388813811e-01, 4.39903283309746e-01,\n                                                4.39459370279820e-01, 4.38813502749948e-01, 4.37909856811903e-01,  4.36686924482768e-01, 4.35078910217598e-01,\n                                                4.33017517131130e-01, 4.30434084763181e-01, 4.27262012389420e-01,  4.23439372841678e-01, 4.18911595041987e-01,\n                                                4.13634073132620e-01, 4.07574550303504e-01, 4.00715129276630e-01,  3.93053780051581e-01, 3.84605247517332e-01,\n                                                3.75401302884747e-01, 3.65490327755861e-01, 3.54936261756862e-01,  3.43816978956582e-01, 3.32222182200759e-01,\n                                                3.20250918371798e-01, 3.08008824106242e-01, 2.95605214201363e-01,  2.83150126545667e-01, 2.70751438648126e-01,\n                                                2.58512170250526e-01, 2.46528081232505e-01, 2.34885661248612e-01,  2.23660585899065e-01, 2.12916684593413e-01,\n                                                2.02705430650834e-01, 1.93065928987139e-01, 1.84025345554854e-01,  1.75599699216693e-01, 1.67794923033025e-01,\n                                                1.60608098341044e-01, 1.54028770287368e-01, 1.48040265450597e-01,  1.42620948263165e-01, 1.37745370630782e-01,\n                                                1.33385286415571e-01, 1.29510517854886e-01, 1.26089673692665e-01,  1.23090728472334e-01, 1.20481479122596e-01,\n                                                1.18229898934249e-01, 1.16304410669546e-01, 1.14674100288443e-01,  1.13308891024801e-01, 1.12179694669422e-01,\n                                                1.11258553247563e-01, 1.10518780122337e-01, 1.09935105203466e-01,  1.09483824680112e-01, 1.09142951806280e-01,\n                                                1.08892362010842e-01, 1.08713923209834e-01, 1.08591600834767e-01,  1.08511526846069e-01, 1.08462022866458e-01,\n                                                1.08433569435213e-01, 1.08418716048320e-01, 1.08411929839789e-01,  1.08409384167715e-01, 1.08408691689693e-01,\n                                                1.08408589481623e-01, 1.08408579365314e-01, 1.08408368757051e-01,  1.08406941863308e-01, 1.08401696573772e-01,\n                                                1.08387715501117e-01, 1.08357123052492e-01, 1.08298553193983e-01,  1.08196757095747e-01, 1.08032381517244e-01,\n                                                1.07781950256271e-01, 1.07418081210810e-01, 1.06909969281883e-01,  1.06224159062730e-01, 1.05325619728735e-01,\n                                                1.04179116910853e-01, 1.02750852509757e-01, 1.01010314368125e-01,  9.89322457299870e-02, 9.64986130697625e-02,\n                                                9.37004248686506e-02, 9.05392385373069e-02, 8.70281929790764e-02,  8.31924240287343e-02, 7.90687605866758e-02,\n                                                7.47046588247429e-02, 7.01564047980980e-02, 6.54866932007927e-02,  6.07617606879636e-02, 5.60483047435341e-02,\n                                                5.14104442222276e-02, 4.69069705020821e-02, 4.25890994237079e-02,  3.84988704021509e-02, 3.46682611839455e-02,\n                                                3.11190075143841e-02, 2.78630484033329e-02, 2.49034683815736e-02,  2.22357821790808e-02, 1.98494040454591e-02,\n                                                1.77291592703952e-02, 1.58567231296587e-02, 1.42119058742800e-02,  1.27737357581914e-02, 1.15213213236878e-02,\n                                                1.04344969089674e-02, 9.49427092632860e-03, 8.68310541671491e-03,  7.98505894924517e-03, 7.38582457194781e-03,\n                                                6.87269162956028e-03, 6.43445601751935e-03, 6.06129873780858e-03,  5.74464808516595e-03, 5.47703678779499e-03,\n                                                5.25196211037837e-03, 5.06375430722628e-03, 4.90745681697646e-03,  4.77872011239100e-03, 4.67371004734929e-03,\n                                                4.58903077158013e-03, 4.52166171709933e-03, 4.46890772380826e-03,  4.42836101448307e-03, 4.39787342578057e-03,\n                                                4.37553704964699e-03, 4.35967125176973e-03, 4.34881393262998e-03,  4.34171490369550e-03, 4.33732938093812e-03,\n                                                4.33480985082468e-03, 4.33349492487523e-03, 4.33289423753180e-03,  4.33266891728223e-03, 4.33260762643783e-03,\n                                                4.33259858010260e-03, 4.33259764692906e-03, 4.33257783778274e-03,  4.33244363009422e-03, 4.33195030120004e-03,\n                                                4.33063551907509e-03, 4.32775942677210e-03, 4.32225625326055e-03,  4.31270146426854e-03, 4.29729931687461e-03,\n                                                4.27389648859489e-03, 4.24002789030808e-03, 4.19300042282345e-03,  4.13001883361730e-03, 4.04835457242214e-03,\n                                                3.94555343510916e-03, 3.81967101063907e-03, 3.66951722935127e-03,  3.49488397603537e-03, 3.29672459846364e-03,\n                                                3.07725319263952e-03, 2.83993637883739e-03, 2.58936147698563e-03,  2.33098159399958e-03, 2.07075753091956e-03,\n                                                1.81473472280658e-03, 1.56860641143908e-03, 1.33731851244079e-03,  1.12476561562502e-03, 9.33612094055292e-04,\n                                                7.65250581221011e-04, 6.19887004681630e-04, 4.96722413043216e-04,  3.94191480452832e-04, 3.10217583844974e-04,\n                                                2.42452731054499e-04, 1.88482365544473e-04, 1.45984992105497e-04,  1.12842612324471e-04, 8.72021569620074e-05,\n                                                6.74935991966663e-05, 5.24171507940707e-05, 4.09157070784261e-05,  3.21454478111605e-05, 2.54485051307540e-05,\n                                                2.03240542333560e-05, 1.63947704976408e-05, 1.33726417139712e-05,  1.10325423534618e-05, 9.19803295929000e-06,\n                                                7.73578296175970e-06, 6.55101757729426e-06, 5.57921591948229e-06,  4.77502812046282e-06, 4.10274900985996e-06,\n                                                3.53163376942689e-06, 3.03581010996368e-06, 2.59597728202721e-06,  2.20018534236033e-06, 1.84276203185618e-06,\n                                                1.52202333936202e-06, 1.23789056516443e-06, 9.90196344474725e-07,  7.77891074221770e-07, 5.98953043606798e-07,\n                                                4.50663726780931e-07, 0.00000000000000e+00, -3.55271367880050e-15, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00, 3.55271367880050e-15, 0.00000000000000e+00,  0.00000000000000e+00, 3.55271367880050e-15,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {2.50000000000000e+01, 2.49999999320317e+01, 2.49999978303180e+01, 2.49999835908679e+01, 2.49999312446937e+01,\n                                                2.49997917055585e+01, 2.49994863100511e+01, 2.49989013739859e+01, 2.49978839552557e+01, 2.49962389726140e+01,\n                                                2.49937277844217e+01, 2.49900682838772e+01, 2.49849365209674e+01, 2.49779698199970e+01, 2.49687713285968e+01,\n                                                2.49569159122943e+01, 2.49419572991068e+01, 2.49234363797383e+01, 2.49008905763076e+01, 2.48738641984535e+01,\n                                                2.48419197002468e+01, 2.48046497242205e+01, 2.47616897618922e+01, 2.47127311706016e+01, 2.46575341694913e+01,\n                                                2.45959403074319e+01, 2.45278837753406e+01, 2.44534008522130e+01, 2.43726367550608e+01, 2.42858492272950e+01,\n                                                2.41934083543061e+01, 2.40957923290794e+01, 2.39935791787800e+01, 2.38874347678606e+01, 2.37780976726416e+01,\n                                                2.36663617387651e+01, 2.35530572600841e+01, 2.34390317448873e+01, 2.33251311688307e+01, 2.32121824732134e+01,\n                                                2.31009778802757e+01, 2.29922613941911e+01, 2.28867176641530e+01, 2.27849632240554e+01, 2.26875400025582e+01,\n                                                2.25949109202506e+01, 2.25074573530210e+01, 2.24254782343291e+01, 2.23491905839521e+01, 2.22787312773318e+01,\n                                                2.22141598999366e+01, 2.21554625592544e+01, 2.21025565495844e+01, 2.20552957799725e+01, 2.20134768831196e+01,\n                                                2.19768459234773e+01, 2.19451056171478e+01, 2.19179229659986e+01, 2.18949371950678e+01, 2.18757678673873e+01,\n                                                2.18600230353129e+01, 2.18473072738370e+01, 2.18372294306589e+01, 2.18294099213922e+01, 2.18234873974335e+01,\n                                                2.18191246196782e+01, 2.18160133840572e+01, 2.18138783649557e+01, 2.18124797696429e+01, 2.18116147300319e+01,\n                                                2.18111173961181e+01, 2.18108577366017e+01, 2.18107390945643e+01, 2.18106945876039e+01, 2.18106824806092e+01,\n                                                2.18106806936414e+01, 2.18106804490307e+01, 2.18106746721537e+01, 2.18106355329958e+01, 2.18104916538125e+01,\n                                                2.18101081285861e+01, 2.18092688125478e+01, 2.18076614967879e+01, 2.18048665953978e+01, 2.18003499202281e+01,\n                                                2.17934600554890e+01, 2.17834307648689e+01, 2.17693887594575e+01, 2.17503670166954e+01, 2.17253236609695e+01,\n                                                2.16931661904836e+01, 2.16527805629642e+01, 2.16030643425260e+01, 2.15429627792301e+01, 2.14715063706813e+01,\n                                                2.13878481824561e+01, 2.12912990317763e+01, 2.11813586197098e+01, 2.10577408740315e+01, 2.09203921521693e+01,\n                                                2.07695015190710e+01, 2.06055029685759e+01, 2.04290700592438e+01, 2.02411038300126e+01, 2.00427149311331e+01,\n                                                1.98352006418914e+01, 1.96200169934278e+01, 1.93987458644167e+01, 1.91730570150114e+01, 1.89446657887992e+01,\n                                                1.87152885319631e+01, 1.84865991282561e+01, 1.82601906735154e+01, 1.80375456731046e+01, 1.78200163336507e+01,\n                                                1.76088142914115e+01, 1.74050074301710e+01, 1.72095208626862e+01, 1.70231396143115e+01, 1.68465115521435e+01,\n                                                1.66801500996377e+01, 1.65244369397770e+01, 1.63796251781583e+01, 1.62458434134940e+01, 1.61231009946062e+01,\n                                                1.60112945487902e+01, 1.59102157132655e+01, 1.58195599112791e+01, 1.57389359814807e+01, 1.56678764755253e+01,\n                                                1.56058484647903e+01, 1.55522647264824e+01, 1.55064952014375e+01, 1.54678786249746e+01, 1.54357342268362e+01,\n                                                1.54093733781934e+01, 1.53881110365283e+01, 1.53712768076944e+01, 1.53582254137657e+01, 1.53483463304548e+01,\n                                                1.53410723433514e+01, 1.53358867714215e+01, 1.53323291212724e+01, 1.53299989672342e+01, 1.53285578994561e+01,\n                                                1.53277294425667e+01, 1.53272969174662e+01, 1.53270992941018e+01, 1.53270251589050e+01, 1.53270049923482e+01,\n                                                1.53270020158071e+01, 1.53270017332513e+01, 1.53269959726095e+01, 1.53269569434595e+01, 1.53268134688656e+01,\n                                                1.53264310235741e+01, 1.53255940782971e+01, 1.53239913310022e+01, 1.53212044624222e+01, 1.53167010074673e+01,\n                                                1.53098318788602e+01, 1.52998340068690e+01, 1.52858384601436e+01, 1.52668842775220e+01, 1.52419380608650e+01,\n                                                1.52099191498390e+01, 1.51697299224254e+01, 1.51202904489110e+01, 1.50605763899100e+01, 1.49896586962666e+01,\n                                                1.49067433718629e+01, 1.48112093329191e+01, 1.47026422710403e+01, 1.45808624288726e+01, 1.44459443473507e+01,\n                                                1.42982269564270e+01, 1.41383128640352e+01, 1.39670563468341e+01, 1.37855403368187e+01, 1.35950435746060e+01,\n                                                1.33969999691146e+01, 1.31929529374470e+01, 1.29845079605647e+01, 1.27732866683085e+01, 1.25608854142919e+01,\n                                                1.23488405590899e+01, 1.21386016786120e+01, 1.19315128417881e+01, 1.17288011563185e+01, 1.15315711218252e+01,\n                                                1.13408030384124e+01, 1.11573537887186e+01, 1.09819586601048e+01, 1.08152333719711e+01, 1.06576759842283e+01,\n                                                1.05096687746688e+01, 1.03714804202422e+01, 1.02432688881972e+01, 1.01250853708906e+01, 1.00168794425057e+01,\n                                                9.91850544129682e+00, 9.82972993788915e+00, 9.75024006566644e+00, 9.67965246653299e+00, 9.61752263029570e+00,\n                                                9.56335445678111e+00, 9.51660992532963e+00, 9.47671880085504e+00, 9.44308833083157e+00, 9.41511289144833e+00,\n                                                9.39218352640845e+00, 9.37369729370144e+00, 9.35906630043781e+00, 9.34772626980513e+00, 9.33914445308573e+00,\n                                                9.33282667820790e+00, 9.32832331802942e+00, 9.32523396865857e+00, 9.32321065130545e+00, 9.32195938963476e+00,\n                                                9.32124006616094e+00, 9.32086452252801e+00, 9.32069293537774e+00, 9.32062856741107e+00, 9.32061105779150e+00,\n                                                9.32060847340936e+00, 9.32060824341778e+00, 9.32060371600638e+00, 9.32057304216873e+00, 9.32046028250694e+00,\n                                                9.32015971133514e+00, 9.31950194245955e+00, 9.31824232750296e+00, 9.31605213168804e+00, 9.31251295856042e+00,\n                                                9.30711485413576e+00, 9.29925846619935e+00, 9.28826155802824e+00, 9.27337006918596e+00, 9.25377377187244e+00,\n                                                9.22862638505686e+00, 9.19706978031698e+00, 9.15826164892345e+00, 9.11140571181618e+00, 9.05578326169658e+00,\n                                                8.99078455397204e+00, 8.91593833973032e+00, 8.83093769282501e+00, 8.73566026426801e+00, 8.63018124852342e+00,\n                                                8.51477772205990e+00, 8.38992365946625e+00, 8.25627584669547e+00, 8.11465200002139e+00, 7.96600343930866e+00,\n                                                7.81138533220755e+00, 7.65192752448429e+00, 7.48880820817038e+00, 7.32323138024608e+00, 7.15640769281757e+00,\n                                                6.98953739601223e+00, 6.82379389939212e+00, 6.66030696024093e+00, 6.50014533242367e+00, 6.34429950616957e+00,\n                                                6.19366567288720e+00, 6.04903216698921e+00, 5.91106942079069e+00, 5.78032404849518e+00, 5.65721719302069e+00,\n                                                5.54204683736098e+00, 5.43499346696867e+00, 5.33612829415580e+00, 5.24542321016360e+00, 5.16276168705402e+00,\n                                                5.08794997479459e+00, 5.02072809527856e+00, 4.96078029722077e+00, 4.90774478451273e+00, 4.86122265396164e+00,\n                                                4.82078607089893e+00, 4.78598577201657e+00, 4.75635801605784e+00, 4.73143110850519e+00, 4.71073161094139e+00,\n                                                4.69379031450093e+00, 4.68014801509216e+00, 4.66936108113774e+00, 4.66100675754862e+00, 4.65468810726109e+00,\n                                                4.65003845809154e+00, 4.64672520122302e+00, 4.64445278055291e+00, 4.64296472031622e+00, 4.64204456136472e+00,\n                                                4.64151561238240e+00, 4.64123946815273e+00, 4.64111329895487e+00, 4.64106596907999e+00, 4.64105309425808e+00,\n                                                4.64105119396321e+00, 4.64105102596738e+00, 4.64104773150011e+00, 4.64102541105146e+00, 4.64094335949845e+00,\n                                                4.64072464615447e+00, 4.64024602765017e+00, 4.63932953206283e+00, 4.63773610188269e+00, 4.63516167062468e+00,\n                                                4.63123603040302e+00, 4.62552481876454e+00, 4.61753490390502e+00, 4.60672336890090e+00, 4.59251017964100e+00,\n                                                4.57429446246251e+00, 4.55147411546785e+00, 4.52346823776669e+00, 4.48974159640846e+00, 4.44983008210700e+00,\n                                                4.40336585947081e+00, 4.35010072783099e+00, 4.28992610937470e+00, 4.22288810433994e+00, 4.14919622314991e+00,\n                                                4.06922473371895e+00, 3.98350604059847e+00, 3.89271610935678e+00, 3.79765260812701e+00, 3.69920708163055e+00,\n                                                3.59833301406603e+00, 3.49601199449389e+00, 3.39322031352702e+00, 3.29089817320068e+00, 3.18992330769351e+00,\n                                                3.09109025662875e+00, 2.99509589662437e+00, 2.90253121770814e+00, 2.81387881140272e+00, 2.72951516959226e+00,\n                                                2.64971669585188e+00, 2.57466829075716e+00, 2.50447345540792e+00, 2.43916501917961e+00, 2.37871579595386e+00,\n                                                2.32304867351374e+00, 2.27204582059990e+00, 2.22555684364295e+00, 2.18340583754987e+00, 2.14539735494208e+00,\n                                                2.11132137151859e+00, 2.08095735797189e+00, 2.05407758667136e+00, 2.03044980846306e+00, 2.00983943444342e+00,\n                                                1.99201135138036e+00, 1.97673148874646e+00, 1.96376824079112e+00, 1.95289382920664e+00, 1.94388567122230e+00,\n                                                1.93652779501555e+00, 1.93061232000685e+00, 1.92594099501495e+00, 1.92232676374138e+00, 1.91959530613983e+00,\n                                                1.91758648745443e+00, 1.91615563548568e+00, 1.91517456204457e+00, 1.91453224716369e+00, 1.91413511440288e+00,\n                                                1.91390684179913e+00, 1.91378767432616e+00, 1.91373322832593e+00, 1.91371280417257e+00, 1.91370724834738e+00,\n                                                1.91370642832066e+00, 1.91370635470536e+00, 1.91370489840158e+00, 1.91369503176654e+00, 1.91365876153163e+00,\n                                                1.91356208269737e+00, 1.91335052522755e+00, 1.91294545086208e+00, 1.91224128434013e+00, 1.91110386489798e+00,\n                                                1.90937010346754e+00, 1.90684912356277e+00, 1.90332504303779e+00, 1.89856151286175e+00, 1.89230806165602e+00,\n                                                1.88430819720821e+00, 1.87430908884734e+00, 1.86207250348380e+00, 1.84738650602148e+00, 1.83007728098908e+00,\n                                                1.81002031061186e+00, 1.78715008038525e+00, 1.76146749808051e+00, 1.73304431852396e+00, 1.70202406348010e+00,\n                                                1.66861919707877e+00, 1.63310463197509e+00, 1.59580796031304e+00, 1.55709708544600e+00, 1.51736614022870e+00,\n                                                1.47702069248795e+00, 1.43646324950268e+00, 1.39607998624842e+00, 1.35622945291679e+00, 1.31723378937040e+00,\n                                                1.27937271579133e+00, 1.24288030984494e+00, 1.20794435027031e+00, 1.17470782924922e+00, 1.14327212673105e+00,\n                                                1.11370130299520e+00, 1.08602699319622e+00, 1.06025346257247e+00, 1.03636248240602e+00, 1.01431779466947e+00,\n                                                9.94069032206561e-01, 9.75555042112873e-01, 9.58706619400658e-01, 9.43448697057327e-01, 9.29702060695796e-01,\n                                                9.17384665451969e-01, 9.06412633690728e-01, 8.96701007744458e-01, 8.88164324716588e-01, 8.80717071880902e-01,\n                                                8.74274072285615e-01, 8.68750841254542e-01, 8.64063945712338e-01, 8.60131389644504e-01, 8.56873040495639e-01,\n                                                8.54211102903747e-01, 8.52070637938322e-01, 8.50380118135934e-01, 8.49072001398206e-01, 8.48083300609915e-01,\n                                                8.47356121072650e-01, 8.46838134942132e-01, 8.46482961135827e-01, 8.46250420827243e-01, 8.46106642653830e-01,\n                                                8.46023997906244e-01, 8.45980853793407e-01, 8.45961141780791e-01, 8.45953747268119e-01, 8.45951735794952e-01,\n                                                8.45951438906226e-01, 8.45951411538383e-01, 8.45950862159661e-01, 8.45947140052147e-01, 8.45933457403902e-01,\n                                                8.45896986121033e-01, 8.45817177899598e-01, 8.45664367362023e-01, 8.45398727870361e-01, 8.44969650239324e-01,\n                                                8.44315614351331e-01, 8.43364620645310e-01, 8.42035240070967e-01, 8.40238324612653e-01, 8.37879393441337e-01,\n                                                8.34861670699130e-01, 8.31089700183604e-01, 8.26473402597539e-01, 8.20932378285750e-01, 8.14400200982885e-01,\n                                                8.06828406372247e-01, 7.98189863626558e-01, 7.88481236716088e-01, 7.77724298545831e-01, 7.65965951800659e-01,\n                                                7.53276925640399e-01, 7.39749241391511e-01, 7.25492654840647e-01, 7.10630370696737e-01, 6.95294374306954e-01,\n                                                6.79620732163698e-01, 6.63745179161200e-01, 6.47799246133410e-01, 6.31907098581081e-01, 6.16183169912901e-01,\n                                                6.00730591478211e-01, 5.85640355509316e-01, 5.70991100536261e-01, 5.56849383152581e-01, 5.43270293614356e-01,\n                                                5.30298282027179e-01, 5.17968082057067e-01, 5.06305645166012e-01, 4.95329025777576e-01, 4.85049182988895e-01,\n                                                4.75470685198495e-01, 4.66592319303341e-01, 4.58407615964457e-01, 4.50905307591675e-01, 4.44069737269729e-01,\n                                                4.37881236028442e-01, 4.32316483701982e-01, 4.27348865924568e-01, 4.22948837082416e-01, 4.19084296534095e-01,\n                                                4.15720983176254e-01, 4.12822891399959e-01, 4.10352709532429e-01, 4.08272279871664e-01, 4.06543077317846e-01,\n                                                4.05126701369532e-01, 4.03985373937036e-01, 4.03082433147528e-01, 4.02382811243772e-01, 4.01853483008583e-01,\n                                                4.01463870079851e-01, 4.01186186231712e-01, 4.00995709312667e-01, 4.00870967103835e-01, 4.00793826860170e-01,\n                                                4.00749481606145e-01, 4.00726330177669e-01, 4.00715752279257e-01, 4.00711784173573e-01, 4.00710704755365e-01,\n                                                4.00710545435597e-01, 4.00710530252592e-01, 4.00710220083738e-01, 4.00708118648463e-01, 4.00700393615580e-01,\n                                                4.00679802016960e-01, 4.00634740358115e-01, 4.00548451663667e-01, 4.00398425467785e-01, 4.00156025252464e-01,\n                                                3.99786375802126e-01, 3.99248539723267e-01, 3.98496007123804e-01, 3.97477514245093e-01, 3.96138194900939e-01,\n                                                3.94421052471845e-01, 3.92268720127099e-01, 3.89625453954537e-01, 3.86439279802520e-01, 3.82664192816495e-01,\n                                                3.78262292374824e-01, 3.73205727816430e-01, 3.67478334550373e-01, 3.61076856711669e-01, 3.54011680150847e-01,\n                                                3.46307034703258e-01, 3.38000662321786e-01, 3.29142982358249e-01, 3.19795812642656e-01, 3.10030722756000e-01,\n                                                2.99927104286311e-01, 2.89570044269837e-01, 2.79048085798252e-01, 2.68450956868637e-01, 2.57867346449562e-01,\n                                                2.47382805080207e-01, 2.37077844335900e-01, 2.27026302932963e-01, 2.17294035440389e-01, 2.07937962178871e-01,\n                                                1.99005497134287e-01, 1.90534347046871e-01, 1.82552652275163e-01, 1.75079421381923e-01, 1.68125198616838e-01,\n                                                1.61692897404922e-01, 1.55778733310438e-01, 1.50373195633222e-01, 1.45462006264268e-01, 1.41027026031718e-01,\n                                                1.37047080998332e-01, 1.33498692804498e-01, 1.30356707327767e-01, 1.27594824158820e-01, 1.25186035501763e-01,\n                                                1.23102987147657e-01, 1.21318276332456e-01, 1.19804701821906e-01, 1.18535480735961e-01, 1.17484444707888e-01,\n                                                1.16626225244744e-01, 1.15936434895016e-01, 1.15391847314132e-01, 1.14970575827279e-01, 1.14652246886838e-01,\n                                                1.14418162155857e-01, 1.14251441025456e-01, 1.14137134343718e-01, 1.14062300070994e-01, 1.14016032470097e-01,\n                                                1.13989438189890e-01, 1.13975555028190e-01, 1.13969212027850e-01, 1.13966832602980e-01, 1.13966185346772e-01,\n                                                1.13966089813292e-01, 1.13966080357613e-01, 1.13965883502853e-01, 1.13964549789461e-01, 1.13959647016589e-01,\n                                                1.13946578781761e-01, 1.13917983113566e-01, 1.13863233716703e-01, 1.13768070137066e-01, 1.13614384170770e-01,\n                                                1.13380190648567e-01, 1.13039810502968e-01, 1.12564291724421e-01, 1.11922088311033e-01, 1.11080007594964e-01,\n                                                1.10004421712173e-01, 1.08662719388160e-01, 1.07024950385874e-01, 1.05065588634929e-01, 1.02765313981791e-01,\n                                                1.00112690277534e-01, 9.71056032446533e-02, 9.37523192260770e-02, 9.00720386522238e-02, 8.60948473510916e-02,\n                                                8.18610138180738e-02, 7.74196376709959e-02, 7.28267175039825e-02, 6.81427670010457e-02, 6.34301575290870e-02,\n                                                5.87503955036048e-02, 5.41615482949425e-02, 4.97160120344020e-02, 4.54587716087680e-02, 4.14262445402152e-02,\n                                                3.76457358079918e-02, 3.41354697142080e-02, 3.09051156698850e-02, 2.79566923444214e-02, 2.52857206275756e-02,\n                                                2.28824988114269e-02, 2.07333894592310e-02, 1.88220314504868e-02, 1.71304174851983e-02, 1.56398027607274e-02,\n                                                1.43314321110175e-02, 1.31870896374799e-02, 1.21894866655410e-02, 1.13225109677231e-02, 1.05713630637219e-02,\n                                                9.92260489246632e-03, 9.36414351206238e-03, 8.88516903848924e-03, 8.47606268674284e-03, 8.12828782739317e-03,\n                                                7.83427431473527e-03, 7.58730384310624e-03, 7.38140177978508e-03, 7.21123896438414e-03, 7.07204547264695e-03,\n                                                6.95953729432475e-03, 6.86985613329227e-03, 6.79952194750655e-03, 6.74539730832180e-03, 6.70466214824827e-03,\n                                                6.67479701247942e-03, 6.65357257758004e-03, 6.63904299209506e-03, 6.62954055420073e-03, 6.62366937841341e-03,\n                                                6.62029600835012e-03, 6.61853537727808e-03, 6.61773106099162e-03, 6.61742935531606e-03, 6.61734728605268e-03,\n                                                6.61733517287288e-03, 6.61733392341191e-03, 6.61730740076294e-03, 6.61712770849832e-03, 6.61646717890818e-03,\n                                                6.61470674299025e-03, 6.61085556063057e-03, 6.60348578682601e-03, 6.59068751112457e-03, 6.57004986594956e-03,\n                                                6.53867521371865e-03, 6.49323382804212e-03, 6.43006610669872e-03, 6.34533757067146e-03, 6.23524824971966e-03,\n                                                6.09629227624353e-03, 5.92555574393216e-03, 5.72103184228823e-03, 5.48192332193764e-03, 5.20889545370196e-03,\n                                                4.90424010497392e-03, 4.57191542880153e-03, 4.21743704388078e-03, 3.84761489915064e-03, 3.47015260850014e-03,\n                                                3.09314841393871e-03, 2.72455382758707e-03, 2.37165309519938e-03, 2.04062226104895e-03, 1.73621257927081e-03,\n                                                1.46158364204041e-03, 1.21829143753160e-03, 1.00641809863333e-03, 8.24813519940903e-04, 6.71404623460603e-04,\n                                                5.43519436565276e-04, 4.38176853318595e-04, 3.52312586144876e-04, 2.82940623133499e-04, 2.27270415471992e-04,\n                                                1.82797937121393e-04, 1.47366844828412e-04, 1.19178358559680e-04, 9.67401424283310e-05, 7.87829272184126e-05,\n                                                6.42040160663271e-05, 5.20829030499215e-05, 4.17582315890286e-05, 3.29033988251126e-05, 2.55303974086019e-05,\n                                                1.98580444958907e-05, 1.59695820229899e-05, 1.34487001872685e-05, 1.16088543151704e-05, 1.00345995441842e-05,\n                                                8.63513495374946e-06, 7.41529067127544e-06, 6.34786166031631e-06, 5.38827507767792e-06, 4.51736322304441e-06,\n                                                3.74251071022513e-06, 3.07323596615561e-06, 2.50463720519178e-06, 2.01977622893423e-06, 1.60127170900637e-06,\n                                                1.23869437018698e-06, 9.28295960989090e-07, 6.69276005282882e-07, 4.60574820948523e-07, 3.55271367880050e-15,\n                                                3.55271367880050e-15, 7.10542735760100e-15, 3.55271367880050e-15, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                7.10542735760100e-15}),\nmadness::CubicInterpolationTable<double>(grid, {2.60000000000000e+01, 2.59999999278606e+01, 2.59999976971690e+01, 2.59999825838727e+01, 2.59999270253160e+01,\n                                                2.59997789229103e+01, 2.59994547856853e+01, 2.59988339523561e+01, 2.59977540934968e+01, 2.59960081521684e+01,\n                                                2.59933428330351e+01, 2.59894586995787e+01, 2.59840118900609e+01, 2.59766174193894e+01, 2.59668539998277e+01,\n                                                2.59542702914775e+01, 2.59383924847098e+01, 2.59187331194886e+01, 2.58948010556248e+01, 2.58661125147733e+01,\n                                                2.58322031082866e+01, 2.57926407333452e+01, 2.57470391542370e+01, 2.56950719835629e+01, 2.56364866459276e+01,\n                                                2.55711177611753e+01, 2.54988992515028e+01, 2.54198743879747e+01, 2.53342029767845e+01, 2.52421649649343e+01,\n                                                2.51441599243926e+01, 2.50407021401654e+01, 2.49324113502399e+01, 2.48199995208874e+01, 2.47042543423704e+01,\n                                                2.45860203565046e+01, 2.44661787513813e+01, 2.43456268708122e+01, 2.42252583962303e+01, 2.41059449911056e+01,\n                                                2.39885199850322e+01, 2.38737644503486e+01, 2.37623958174629e+01, 2.36550590061735e+01, 2.35523199292253e+01,\n                                                2.34546611518708e+01, 2.33624794610820e+01, 2.32760851000589e+01, 2.31957024463582e+01, 2.31214719447657e+01,\n                                                2.30534531405686e+01, 2.29916286893892e+01, 2.29359092429293e+01, 2.28861391245801e+01, 2.28421027149886e+01,\n                                                2.28035314663110e+01, 2.27701114564254e+01, 2.27414913823693e+01, 2.27172908772945e+01, 2.26971090188551e+01,\n                                                2.26805328807130e+01, 2.26671459642808e+01, 2.26565363364431e+01, 2.26483042922084e+01, 2.26420693603298e+01,\n                                                2.26374764758820e+01, 2.26342011572444e+01, 2.26319535460923e+01, 2.26304811974888e+01, 2.26295705421409e+01,\n                                                2.26290469829320e+01, 2.26287736312229e+01, 2.26286487330581e+01, 2.26286018792000e+01, 2.26285891337914e+01,\n                                                2.26285872525950e+01, 2.26285869950858e+01, 2.26285809135884e+01, 2.26285397105853e+01, 2.26283882445301e+01,\n                                                2.26279844958067e+01, 2.26271009227536e+01, 2.26254088556952e+01, 2.26224665904013e+01, 2.26177117877474e+01,\n                                                2.26104587206049e+01, 2.25999008254436e+01, 2.25851189059468e+01, 2.25650951895509e+01, 2.25387332467644e+01,\n                                                2.25048835422588e+01, 2.24623740968254e+01, 2.24100454095701e+01, 2.23467884403158e+01, 2.22715841157821e+01,\n                                                2.21835425448722e+01, 2.20819399624505e+01, 2.19662514218388e+01, 2.18361774637961e+01, 2.16916634098248e+01,\n                                                2.15329105133643e+01, 2.13603788464067e+01, 2.11747823476708e+01, 2.09770767552473e+01, 2.07684411008155e+01,\n                                                2.05502531021277e+01, 2.03240583823562e+01, 2.00915333347341e+01, 1.98544419890816e+01, 1.96145885139074e+01,\n                                                1.93737686270271e+01, 1.91337243825860e+01, 1.88961067244030e+01, 1.86624485854854e+01, 1.84341487801752e+01,\n                                                1.82124646209503e+01, 1.79985100310554e+01, 1.77932561154882e+01, 1.75975322172141e+01, 1.74120267228240e+01,\n                                                1.72372877908038e+01, 1.70737245939279e+01, 1.69216096830710e+01, 1.67810828751750e+01, 1.66521568067537e+01,\n                                                1.65347240764763e+01, 1.64285657650765e+01, 1.63333610663433e+01, 1.62486977679052e+01, 1.61740833589039e+01,\n                                                1.61089565908709e+01, 1.60526993621654e+01, 1.60046488258844e+01, 1.59641096325431e+01, 1.59303662124195e+01,\n                                                1.59026949813700e+01, 1.58803763228580e+01, 1.58627061633912e+01, 1.58490069242172e+01, 1.58386376043352e+01,\n                                                1.58310027332926e+01, 1.58255599304001e+01, 1.58218258221035e+01, 1.58193801019053e+01, 1.58178675664483e+01,\n                                                1.58169980246175e+01, 1.58165440500197e+01, 1.58163366263272e+01, 1.58162588147091e+01, 1.58162376480783e+01,\n                                                1.58162345239286e+01, 1.58162342273606e+01, 1.58162281810446e+01, 1.58161872164134e+01, 1.58160366268363e+01,\n                                                1.58156352160013e+01, 1.58147567670728e+01, 1.58130745428931e+01, 1.58101494870422e+01, 1.58054227483467e+01,\n                                                1.57982130939380e+01, 1.57877197004441e+01, 1.57730307094269e+01, 1.57531377911984e+01, 1.57269567716249e+01,\n                                                1.56933541342674e+01, 1.56511789162204e+01, 1.55992991794466e+01, 1.55366418784558e+01, 1.54622345867278e+01,\n                                                1.53752472219164e+01, 1.52750316607598e+01, 1.51611569957659e+01, 1.50334381907371e+01, 1.48919560687784e+01,\n                                                1.47370669341369e+01, 1.45694006955011e+01, 1.43898471113549e+01, 1.41995306760001e+01, 1.39997756271830e+01,\n                                                1.37920634617492e+01, 1.35779860469037e+01, 1.33591977687672e+01, 1.31373700704797e+01, 1.29141511859145e+01,\n                                                1.26911329589878e+01, 1.24698255260145e+01, 1.22516395478358e+01, 1.20378748160789e+01, 1.18297135660668e+01,\n                                                1.16282167533951e+01, 1.14343218380687e+01, 1.12488411392234e+01, 1.10724604095617e+01, 1.09057377771815e+01,\n                                                1.07491035077179e+01, 1.06028611155550e+01, 1.04671902316859e+01, 1.03421513973297e+01, 1.02276926912157e+01,\n                                                1.01236578923448e+01, 1.00297957708316e+01, 9.94577008999122e+00, 9.87116996789069e+00, 9.80552034902816e+00,\n                                                9.74829244207445e+00, 9.69891406386614e+00, 9.65677988173874e+00, 9.62126156467002e+00, 9.59171784371999e+00,\n                                                9.56750445189486e+00, 9.54798387129873e+00, 9.53253476901736e+00, 9.52056095919290e+00, 9.51149969257516e+00,\n                                                9.50482905067838e+00, 9.50007421255756e+00, 9.49681236990648e+00, 9.49467609107044e+00, 9.49335497563467e+00,\n                                                9.49259549610054e+00, 9.49219898823089e+00, 9.49201782254070e+00, 9.49194986136424e+00, 9.49193137430743e+00,\n                                                9.49192864565770e+00, 9.49192840282734e+00, 9.49192362268295e+00, 9.49189123654546e+00, 9.49177218233789e+00,\n                                                9.49145483259922e+00, 9.49076034617373e+00, 9.48943042011964e+00, 9.48711797585320e+00, 9.48338127871122e+00,\n                                                9.47768194720228e+00, 9.46938725042115e+00, 9.45777701065441e+00, 9.44205531367379e+00, 9.42136707321373e+00,\n                                                9.39481929328159e+00, 9.36150662189658e+00, 9.32054049903625e+00, 9.27108088456453e+00, 9.21236923215885e+00,\n                                                9.14376108523877e+00, 9.06475645191554e+00, 8.97502601720660e+00, 8.87443132636161e+00, 8.76303737431113e+00,\n                                                8.64111659395479e+00, 8.50914403289524e+00, 8.36778444719076e+00, 8.21787293185288e+00, 8.06039130290768e+00,\n                                                7.89644253221050e+00, 7.72722505707922e+00, 7.55400791131106e+00, 7.37810669891288e+00, 7.20085982185967e+00,\n                                                7.02360428536116e+00, 6.84765080385288e+00, 6.67425859093189e+00, 6.50461084786519e+00, 6.33979234460611e+00,\n                                                6.18077052089841e+00, 6.02838125494526e+00, 5.88331996438098e+00, 5.74613815400687e+00, 5.61724502361494e+00,\n                                                5.49691337339897e+00, 5.38528882569341e+00, 5.28240131527039e+00, 5.18817785774049e+00, 5.10245574774325e+00,\n                                                5.02499552622495e+00, 4.95549325587258e+00, 4.89359183127888e+00, 4.83889121031345e+00, 4.79095757786718e+00,\n                                                4.74933154076980e+00, 4.71353550518953e+00, 4.68308040931439e+00, 4.65747197972883e+00, 4.63621665512957e+00,\n                                                4.61882728137339e+00, 4.60482863270499e+00, 4.59376276060533e+00, 4.58519411905892e+00, 4.57871436786544e+00,\n                                                4.57394671809187e+00, 4.57054965925653e+00, 4.56821989864842e+00, 4.56669435028455e+00, 4.56575103390896e+00,\n                                                4.56520878121944e+00, 4.56492569401448e+00, 4.56479635314376e+00, 4.56474783356678e+00, 4.56473463512667e+00,\n                                                4.56473268706677e+00, 4.56473251484828e+00, 4.56472913757286e+00, 4.56470625609423e+00, 4.56462214224712e+00,\n                                                4.56439793244042e+00, 4.56390728940594e+00, 4.56296778204675e+00, 4.56133438625618e+00, 4.55869549959613e+00,\n                                                4.55467184801257e+00, 4.54881863556603e+00, 4.54063123865112e+00, 4.52955466387797e+00, 4.51499686434298e+00,\n                                                4.49634583631244e+00, 4.47299019666404e+00, 4.44434267736852e+00, 4.40986568207964e+00, 4.36909775577888e+00,\n                                                4.32167955375303e+00, 4.26737769901664e+00, 4.20610482731732e+00, 4.13793417180374e+00, 4.06310726027723e+00,\n                                                3.98203369374964e+00, 3.89528252869004e+00, 3.80356545212053e+00, 3.70771264760210e+00, 3.60864291157945e+00,\n                                                3.50733009959188e+00, 3.40476828057234e+00, 3.30193800710444e+00, 3.19977586702805e+00, 3.09914901111637e+00,\n                                                3.00083573427632e+00, 2.90551252449416e+00, 2.81374738203140e+00, 2.72599872612699e+00, 2.64261888871691e+00,\n                                                2.56386104996388e+00, 2.48988847550717e+00, 2.42078502993917e+00, 2.35656611977080e+00, 2.29718942143550e+00,\n                                                2.24256494534909e+00, 2.19256415718067e+00, 2.14702801424591e+00, 2.10577387782389e+00, 2.06860133515320e+00,\n                                                2.03529701360777e+00, 2.00563849985189e+00, 1.97939749350005e+00, 1.95634233164094e+00, 1.93624002008262e+00,\n                                                1.91885790100897e+00, 1.90396507597339e+00, 1.89133368849554e+00, 1.88074015252114e+00, 1.87196639219648e+00,\n                                                1.86480113545729e+00, 1.85904127969281e+00, 1.85449332330791e+00, 1.85097483368083e+00, 1.84831590126990e+00,\n                                                1.84636051295931e+00, 1.84496776652777e+00, 1.84401284343152e+00, 1.84338765949164e+00, 1.84300112252873e+00,\n                                                1.84277894179781e+00, 1.84266295493034e+00, 1.84260996219760e+00, 1.84259008321869e+00, 1.84258467569452e+00,\n                                                1.84258387755673e+00, 1.84258380590644e+00, 1.84258238847574e+00, 1.84257278521160e+00, 1.84253748315738e+00,\n                                                1.84244338514784e+00, 1.84223747580286e+00, 1.84184321847493e+00, 1.84115786350288e+00, 1.84005085020344e+00,\n                                                1.83836348516317e+00, 1.83591007257541e+00, 1.83248065221942e+00, 1.82784546030554e+00, 1.82176116166049e+00,\n                                                1.81397880480696e+00, 1.80425332473651e+00, 1.79235426767056e+00, 1.77807725067504e+00, 1.76125551602744e+00,\n                                                1.74177081989385e+00, 1.71956283255045e+00, 1.69463624475252e+00, 1.66706488445871e+00, 1.63699234890307e+00,\n                                                1.60462893226020e+00, 1.57024494789439e+00, 1.53416086605954e+00, 1.49673497049436e+00, 1.45834944394961e+00,\n                                                1.41939589861112e+00, 1.38026136331722e+00, 1.34131563159885e+00, 1.30290068229216e+00, 1.26532263667795e+00,\n                                                1.22884644678519e+00, 1.19369325300631e+00, 1.16004013530127e+00, 1.12802183178603e+00, 1.09773392021797e+00,\n                                                1.06923694824059e+00, 1.04256104367883e+00, 1.01771061753677e+00, 9.94668869797167e-01, 9.73401905035956e-01,\n                                                9.53862349954697e-01, 9.35992432489584e-01, 9.19726531021162e-01, 9.04993234199974e-01, 8.91716970281557e-01,\n                                                8.79819273194297e-01, 8.69219754034823e-01, 8.59836843808431e-01, 8.51588367808027e-01, 8.44392005233111e-01,\n                                                8.38165680194496e-01, 8.32827922500623e-01, 8.28298228739460e-01, 8.24497446206500e-01, 8.21348194205125e-01,\n                                                8.18775329205884e-01, 8.16706452411779e-01, 8.15072450642596e-01, 8.13808054423959e-01, 8.12852391123062e-01,\n                                                8.12149506329298e-01, 8.11648823834069e-01, 8.11305513840427e-01, 8.11080740607704e-01, 8.10941764597395e-01,\n                                                8.10861880109712e-01, 8.10820176954287e-01, 8.10801123293448e-01, 8.10793975745824e-01, 8.10792031452632e-01,\n                                                8.10791744479495e-01, 8.10791718025705e-01, 8.10791186995335e-01, 8.10787589200153e-01, 8.10774363529294e-01,\n                                                8.10739110320064e-01, 8.10661967517166e-01, 8.10514260403494e-01, 8.10257492145613e-01, 8.09842742964001e-01,\n                                                8.09210545503603e-01, 8.08291301042384e-01, 8.07006293091813e-01, 8.05269339062065e-01, 8.02989094629609e-01,\n                                                8.00071987854917e-01, 7.96425711253871e-01, 7.91963142609539e-01, 7.86606504785940e-01, 7.80291519284678e-01,\n                                                7.72971267663536e-01, 7.64619459233430e-01, 7.55232820575241e-01, 7.44832375831887e-01, 7.33463473703019e-01,\n                                                7.21194528208443e-01, 7.08114560742533e-01, 6.94329743172261e-01, 6.79959229155436e-01, 6.65130611363178e-01,\n                                                6.49975350607598e-01, 6.34624491154856e-01, 6.19204913174464e-01, 6.03836290674046e-01, 5.88628834855236e-01,\n                                                5.73681820726797e-01, 5.59082828103691e-01, 5.44907582036718e-01, 5.31220253626994e-01, 5.18074078195788e-01,\n                                                5.05512159720826e-01, 4.93568352956402e-01, 4.82268142251424e-01, 4.71629464022513e-01, 4.61663444644778e-01,\n                                                4.52375045155701e-01, 4.43763617933321e-01, 4.35823388752283e-01, 4.28543881333720e-01, 4.21910301955823e-01,\n                                                4.15903900130409e-01, 4.10502318811798e-01, 4.05679944823930e-01, 4.01408267596441e-01, 3.97656252059257e-01,\n                                                3.94390729641739e-01, 3.91576809635126e-01, 3.89178311549042e-01, 3.87158217385117e-01, 3.85479140876392e-01,\n                                                3.84103808683356e-01, 3.82995546354138e-01, 3.82118759670966e-01, 3.81439399992086e-01, 3.80925400559157e-01,\n                                                3.80547069677995e-01, 3.80277426372562e-01, 3.80092464684044e-01, 3.79971334293721e-01, 3.79896427560254e-01,\n                                                3.79853366264101e-01, 3.79830885151630e-01, 3.79820613520284e-01, 3.79816760304994e-01, 3.79815712139674e-01,\n                                                3.79815557432764e-01, 3.79815542689354e-01, 3.79815241500960e-01, 3.79813200909481e-01, 3.79805699542796e-01,\n                                                3.79785704140538e-01, 3.79741947163712e-01, 3.79658156788338e-01, 3.79512474243178e-01, 3.79277091985077e-01,\n                                                3.78918144230777e-01, 3.78395878246280e-01, 3.77665129716970e-01, 3.76676117606767e-01, 3.75375562403139e-01,\n                                                3.73708116125886e-01, 3.71618073137856e-01, 3.69051308640199e-01, 3.65957368700695e-01, 3.62291614545711e-01,\n                                                3.58017307958498e-01, 3.53107517217001e-01, 3.47546726482399e-01, 3.41332046748949e-01, 3.34473952165183e-01,\n                                                3.26996498493152e-01, 3.18937016043410e-01, 3.10345302674254e-01, 3.01282369401431e-01, 2.91818809791863e-01,\n                                                2.82032874816725e-01, 2.72008339201111e-01, 2.61832246231400e-01, 2.51592617676842e-01, 2.41376214805065e-01,\n                                                2.31266434726649e-01, 2.21341421753319e-01, 2.11672464237203e-01, 2.02322732432460e-01, 1.93346392630318e-01,\n                                                1.84788108942929e-01, 1.76682919413615e-01, 1.69056450649720e-01, 1.61925417496491e-01, 1.55298343029411e-01,\n                                                1.49176429815117e-01, 1.43554515413484e-01, 1.38422052164007e-01, 1.33764061755290e-01, 1.29562027230605e-01,\n                                                1.25794697461451e-01, 1.22438790597023e-01, 1.19469592828295e-01, 1.16861456606884e-01, 1.14588208130964e-01,\n                                                1.12623477554251e-01, 1.10940967199838e-01, 1.09514673335315e-01, 1.08319076065385e-01, 1.07329309897043e-01,\n                                                1.06521324795725e-01, 1.05872044338696e-01, 1.05359524140809e-01, 1.04963110333969e-01, 1.04663594772692e-01,\n                                                1.04443361045622e-01, 1.04286513492788e-01, 1.04178980404008e-01, 1.04108582478016e-01, 1.04065058444132e-01,\n                                                1.04040041394622e-01, 1.04026981675563e-01, 1.04021014909804e-01, 1.04018776622990e-01, 1.04018167759708e-01,\n                                                1.04018077892949e-01, 1.04018068998144e-01, 1.04017883820148e-01, 1.04016629218421e-01, 1.04012017266452e-01,\n                                                1.03999724238573e-01, 1.03972825016601e-01, 1.03921324228814e-01, 1.03831809104435e-01, 1.03687250114898e-01,\n                                                1.03466976368445e-01, 1.03146852616607e-01, 1.02699682595876e-01, 1.02095858155373e-01, 1.01304264211709e-01,\n                                                1.00293435358633e-01, 9.90329408672252e-02, 9.74949515884838e-02, 9.56559166456081e-02, 9.34982525199963e-02,\n                                                9.10119257842155e-02, 8.81957973734657e-02, 8.50585948314162e-02, 8.16193924336162e-02, 7.79075087967165e-02,\n                                                7.39617764578355e-02, 6.98291941562843e-02, 6.55630337820376e-02, 6.12205319448265e-02, 5.68603421267575e-02,\n                                                5.25399498412042e-02, 4.83132554094929e-02, 4.42285061990866e-02, 4.03267161206742e-02, 3.66406521782672e-02,\n                                                3.31944052783193e-02, 3.00035047250020e-02, 2.70754904051600e-02, 2.44108280676301e-02, 2.20040423577039e-02,\n                                                1.98449474002906e-02, 1.79198716985098e-02, 1.62127979926510e-02, 1.47063647580161e-02, 1.33827004516611e-02,\n                                                1.22240820650070e-02, 1.12134249441347e-02, 1.03346211312356e-02, 9.57274918081552e-03, 8.91418035045533e-03,\n                                                8.34660526151509e-03, 7.85900261426775e-03, 7.44156825121678e-03, 7.08561945683783e-03, 6.78348621804403e-03,\n                                                6.52839837662000e-03, 6.31437520559075e-03, 6.13612194205615e-03, 5.98893621081587e-03, 5.86862604912142e-03,\n                                                5.77144032655852e-03, 5.69401165461514e-03, 5.63331131408873e-03, 5.58661523955450e-03, 5.55147967022762e-03,\n                                                5.52572471227819e-03, 5.50742378265312e-03, 5.49489674405734e-03, 5.48670451708588e-03, 5.48164307953058e-03,\n                                                5.47873502961593e-03, 5.47721727991402e-03, 5.47652392497966e-03, 5.47626384259914e-03, 5.47619309568503e-03,\n                                                5.47618265364846e-03, 5.47618157652607e-03, 5.47615871176177e-03, 5.47600380187774e-03, 5.47543437101083e-03,\n                                                5.47391674039233e-03, 5.47059677714046e-03, 5.46424376013022e-03, 5.45321178356772e-03, 5.43542398655461e-03,\n                                                5.40838572391422e-03, 5.36923324911953e-03, 5.31482413492768e-03, 5.24187403940957e-03, 5.14714111653802e-03,\n                                                5.02765415232886e-03, 4.88097352504013e-03, 4.70546601023614e-03, 4.50056654962339e-03, 4.26699417548448e-03,\n                                                4.00688736944232e-03, 3.72382800073012e-03, 3.42273348229227e-03, 3.10961323830483e-03, 2.79120555964951e-03,\n                                                2.47453053565039e-03, 2.16640957139091e-03, 1.87300843699845e-03, 1.59945729850719e-03, 1.34958872345337e-03,\n                                                1.12581618100549e-03, 9.29154715727520e-04, 7.59365535763834e-04, 6.15189962012153e-04, 4.94628343883363e-04,\n                                                3.95219076658293e-04, 3.14283083799438e-04, 2.49117087196993e-04, 1.97136702244194e-04, 1.55978851264393e-04,\n                                                1.23569329510076e-04, 9.81528145906907e-05, 7.82813677560057e-05, 6.27690765853117e-05, 5.06366550077075e-05,\n                                                4.10744502303828e-05, 3.34371521439891e-05, 2.72574876021281e-05, 2.22471270419078e-05, 1.82531906105510e-05,\n                                                1.51644494117420e-05, 1.28172150759553e-05, 1.09882939618444e-05, 9.47702673315121e-06, 8.16718398155558e-06,\n                                                7.01420065141178e-06, 6.00187543753350e-06, 5.11537482239532e-06, 4.33735848304195e-06, 3.65245375277823e-06,\n                                                3.04902040682009e-06, 2.51786689986488e-06, 2.05120023366590e-06, 1.64279013148416e-06, 1.28828855139318e-06,\n                                                9.84868023579111e-07, 7.30325947273514e-07, 5.22201656139032e-07, 3.90798504668055e-14, 3.90798504668055e-14,\n                                                4.26325641456060e-14, 3.90798504668055e-14, 3.90798504668055e-14, 3.90798504668055e-14, 3.90798504668055e-14,\n                                                3.55271367880050e-14}),\nmadness::CubicInterpolationTable<double>(grid, {2.70000000000000e+01, 2.69999999235835e+01, 2.69999975606326e+01, 2.69999815512590e+01, 2.69999226985952e+01,\n                                                2.69997658150634e+01, 2.69994224593111e+01, 2.69987648154237e+01, 2.69976209277531e+01, 2.69957714587848e+01,\n                                                2.69929480862195e+01, 2.69888336020316e+01, 2.69830637245914e+01, 2.69752305893173e+01, 2.69648878478944e+01,\n                                                2.69515572839927e+01, 2.69347368456884e+01, 2.69139099993673e+01, 2.68885563208536e+01, 2.68581632471106e+01,\n                                                2.68222389036364e+01, 2.67803258858529e+01, 2.67320157977601e+01, 2.66769642353799e+01, 2.66149057539074e+01,\n                                                2.65456681955730e+01, 2.64691856097305e+01, 2.63855089026062e+01, 2.62948133442861e+01, 2.61974021570250e+01,\n                                                2.60937056162678e+01, 2.59842753971499e+01, 2.58697742583472e+01, 2.57509615226238e+01, 2.56286751368401e+01,\n                                                2.55038113289168e+01, 2.53773029971753e+01, 2.52500979616093e+01, 2.51231380906283e+01, 2.49973401200356e+01,\n                                                2.48735787410019e+01, 2.47526722881719e+01, 2.46353711388234e+01, 2.45223487596574e+01, 2.44141952181845e+01,\n                                                2.43114129094798e+01, 2.42144142277714e+01, 2.41235209235807e+01, 2.40389649179702e+01, 2.39608903844145e+01,\n                                                2.38893569472281e+01, 2.38243438777455e+01, 2.37657551927104e+01, 2.37134255728377e+01, 2.36671270238819e+01,\n                                                2.36265761991504e+01, 2.35914422928992e+01, 2.35613554001612e+01, 2.35359152219338e+01, 2.35146999768782e+01,\n                                                2.34972753633057e+01, 2.34832033997794e+01, 2.34720509606513e+01, 2.34633978157383e+01, 2.34568439824102e+01,\n                                                2.34520162046512e+01, 2.34485733878419e+01, 2.34462108402595e+01, 2.34446632022697e+01, 2.34437059809603e+01,\n                                                2.34431556500987e+01, 2.34428683209280e+01, 2.34427370362892e+01, 2.34426877866351e+01, 2.34426743895112e+01,\n                                                2.34426724121229e+01, 2.34426721414463e+01, 2.34426657489817e+01, 2.34426224391322e+01, 2.34424632281268e+01,\n                                                2.34420388345176e+01, 2.34411100821984e+01, 2.34393314974207e+01, 2.34362387957795e+01, 2.34312408980840e+01,\n                                                2.34236170452647e+01, 2.34125194947814e+01, 2.33969821648884e+01, 2.33759354383058e+01, 2.33482271342690e+01,\n                                                2.33126494022722e+01, 2.32679709832994e+01, 2.32129739356163e+01, 2.31464935549621e+01, 2.30674598694592e+01,\n                                                2.29749388068361e+01, 2.28681709728685e+01, 2.27466060002190e+01, 2.26099306618247e+01, 2.24580893881752e+01,\n                                                2.22912964206528e+01, 2.21100394490503e+01, 2.19150750568428e+01, 2.17074164857042e+01, 2.14883140810599e+01,\n                                                2.12592284164696e+01, 2.10217958343289e+01, 2.07777864038983e+01, 2.05290553749793e+01, 2.02774909594836e+01,\n                                                2.00249629939933e+01, 1.97732776981272e+01, 1.95241426588129e+01, 1.92791435953787e+01, 1.90397315555926e+01,\n                                                1.88072172681410e+01, 1.85827690510366e+01, 1.83674116424452e+01, 1.81620247743598e+01, 1.79673415284030e+01,\n                                                1.77839471652516e+01, 1.76122792335157e+01, 1.74526295453100e+01, 1.73051482710105e+01, 1.71698501028159e+01,\n                                                1.70466222335393e+01, 1.69352338025422e+01, 1.68353464524589e+01, 1.67465256857168e+01, 1.66682527783241e+01,\n                                                1.65999370770396e+01, 1.65409285604910e+01, 1.64905305780930e+01, 1.64480126913000e+01, 1.64126235320639e+01,\n                                                1.63836035678124e+01, 1.63601976264681e+01, 1.63416669950760e+01, 1.63273008675253e+01, 1.63164268862223e+01,\n                                                1.63084205041356e+01, 1.63027128910285e+01, 1.62987971230917e+01, 1.62962324291849e+01, 1.62946463183826e+01,\n                                                1.62937344798303e+01, 1.62932584230530e+01, 1.62930409099493e+01, 1.62929593134639e+01, 1.62929371172593e+01,\n                                                1.62929338411467e+01, 1.62929335301533e+01, 1.62929271897363e+01, 1.62928842325311e+01, 1.62927263180916e+01,\n                                                1.62923053822490e+01, 1.62913842052787e+01, 1.62896201592962e+01, 1.62865528381357e+01, 1.62815962239256e+01,\n                                                1.62740359847774e+01, 1.62630324191875e+01, 1.62476294543190e+01, 1.62267699560030e+01, 1.61993174083386e+01,\n                                                1.61640837644222e+01, 1.61198629577687e+01, 1.60654692057074e+01, 1.59997788504662e+01, 1.59217740993691e+01,\n                                                1.58305866790528e+01, 1.57255391512982e+01, 1.56061814927672e+01, 1.54723205578439e+01, 1.53240402567042e+01,\n                                                1.51617107122485e+01, 1.49859853140962e+01, 1.47977854421026e+01, 1.45982736239708e+01, 1.43888169149412e+01,\n                                                1.41709431964814e+01, 1.39462937232315e+01, 1.37165754634826e+01, 1.34835165053496e+01, 1.32488270661523e+01,\n                                                1.30141675810709e+01, 1.27811241741061e+01, 1.25511907714021e+01, 1.23257564082353e+01, 1.21060960197959e+01,\n                                                1.18933631885882e+01, 1.16885838343489e+01, 1.14926504897316e+01, 1.13063174037195e+01, 1.11301970936305e+01,\n                                                1.09647590500032e+01, 1.08103311110450e+01, 1.06671036690363e+01, 1.05351364878961e+01, 1.04143676177106e+01,\n                                                1.03046237520427e+01, 1.02056313883046e+01, 1.01170282763075e+01, 1.00383748142930e+01, 9.96916522157653e+00,\n                                                9.90883844846093e+00, 9.85678886422101e+00, 9.81237679487585e+00, 9.77493897430930e+00, 9.74379893750256e+00,\n                                                9.71827733463016e+00, 9.69770208876942e+00, 9.68141826504077e+00, 9.66879747050505e+00, 9.65924656627979e+00,\n                                                9.65221544936077e+00, 9.64720365392800e+00, 9.64376553184375e+00, 9.64151379978733e+00, 9.64012128485616e+00,\n                                                9.63932075899577e+00, 9.63890282161874e+00, 9.63871186469492e+00, 9.63864023050247e+00, 9.63862074429756e+00,\n                                                9.63861786817570e+00, 9.63861761222138e+00, 9.63861257373015e+00, 9.63857843725686e+00, 9.63845294866121e+00,\n                                                9.63811844744756e+00, 9.63738642666210e+00, 9.63598462249989e+00, 9.63354719621078e+00, 9.62960853393990e+00,\n                                                9.62360114449861e+00, 9.61485807341351e+00, 9.60262016446650e+00, 9.58604837707264e+00, 9.56424120012302e+00,\n                                                9.53625698460694e+00, 9.50114074848374e+00, 9.45795469609335e+00, 9.40581135910873e+00, 9.34390793610038e+00,\n                                                9.27156012392645e+00, 9.18823354664566e+00, 9.09357085159638e+00, 8.98741270826213e+00, 8.86981134372070e+00,\n                                                8.74103586701248e+00, 8.60156939895383e+00, 8.45209879031458e+00, 8.29349829399799e+00, 8.12680879216717e+00,\n                                                7.95321400749010e+00, 7.77401464540067e+00, 7.59060085171041e+00, 7.40442299085275e+00, 7.21696072677462e+00,\n                                                7.02969072498850e+00, 6.84405383825342e+00, 6.66142316444399e+00, 6.48307467541758e+00, 6.31016210719270e+00,\n                                                6.14369748228412e+00, 5.98453809639569e+00, 5.83338017389701e+00, 5.69075880451164e+00, 5.55705330851003e+00,\n                                                5.43249688564871e+00, 5.31718928869219e+00, 5.21111129998038e+00, 5.11413993736349e+00, 5.02606352830508e+00,\n                                                4.94659602731755e+00, 4.87539018088217e+00, 4.81204934502904e+00, 4.75613792282654e+00, 4.70719050858986e+00,\n                                                4.66471990410871e+00, 4.62822421395449e+00, 4.59719323763752e+00, 4.57111436207163e+00, 4.54947812434544e+00,\n                                                4.53178356775144e+00, 4.51754345865519e+00, 4.50628937313798e+00, 4.49757660527715e+00, 4.49098879802503e+00,\n                                                4.48614215704505e+00, 4.48268908095996e+00, 4.48032103060901e+00, 4.47877046612373e+00, 4.47781170344726e+00,\n                                                4.47726057937737e+00, 4.47697286303806e+00, 4.47684140765423e+00, 4.47679209494366e+00, 4.47677868076078e+00,\n                                                4.47677670085803e+00, 4.47677652582447e+00, 4.47677309334451e+00, 4.47674983785371e+00, 4.47666434919910e+00,\n                                                4.47643647543418e+00, 4.47593781784280e+00, 4.47498297668811e+00, 4.47332296233523e+00, 4.47064117916578e+00,\n                                                4.46655237774046e+00, 4.46060494534732e+00, 4.45228685546925e+00, 4.44103551110019e+00, 4.42625158476048e+00,\n                                                4.40731677265351e+00, 4.38361514093184e+00, 4.35455745613105e+00, 4.31960757705514e+00, 4.27830966968836e+00,\n                                                4.23031472717987e+00, 4.17540467680298e+00, 4.11351227918402e+00, 4.04473511017266e+00, 3.96934218648130e+00,\n                                                3.88777225443008e+00, 3.80062338014424e+00, 3.70863420217483e+00, 3.61265795004895e+00, 3.51363099562947e+00,\n                                                3.41253819123365e+00, 3.31037748407953e+00, 3.20812624519591e+00, 3.10671142589948e+00, 3.00698511668720e+00,\n                                                2.90970642546041e+00, 2.81552991969418e+00, 2.72500028488925e+00, 2.63855240543927e+00, 2.55651580346034e+00,\n                                                2.47912227100576e+00, 2.40651557077610e+00, 2.33876221631244e+00, 2.27586252990938e+00, 2.21776137747150e+00,\n                                                2.16435816787324e+00, 2.11551586522805e+00, 2.07106889041970e+00, 2.03082988422328e+00, 1.99459537264198e+00,\n                                                1.96215042112093e+00, 1.93327239323336e+00, 1.90773394552762e+00, 1.88530539670333e+00, 1.86575660844876e+00,\n                                                1.84885850870735e+00, 1.83438437693946e+00, 1.82211099588434e+00, 1.81181975603003e+00, 1.80329777806021e+00,\n                                                1.79633909564058e+00, 1.79074591686827e+00, 1.78632995857955e+00, 1.78291382474463e+00, 1.78033237977797e+00,\n                                                1.77843405120089e+00, 1.77708198503975e+00, 1.77615497265827e+00, 1.77554806997199e+00, 1.77517283914968e+00,\n                                                1.77495715829440e+00, 1.77484456493828e+00, 1.77479312272671e+00, 1.77477382540148e+00, 1.77476857610117e+00,\n                                                1.77476780131690e+00, 1.77476773176308e+00, 1.77476635580643e+00, 1.77475703353486e+00, 1.77472276443581e+00,\n                                                1.77463141988100e+00, 1.77443153627980e+00, 1.77404881849428e+00, 1.77338352938507e+00, 1.77230894381808e+00,\n                                                1.77067104603540e+00, 1.76828964300405e+00, 1.76496104685142e+00, 1.76046243990631e+00, 1.75455797005740e+00,\n                                                1.74700652833507e+00, 1.73757103516011e+00, 1.72602891268405e+00, 1.71218326091659e+00, 1.69587410431767e+00,\n                                                1.67698895741971e+00, 1.65547189823999e+00, 1.63133035837216e+00, 1.60463895111586e+00, 1.57553986249222e+00,\n                                                1.54423960735456e+00, 1.51100227241255e+00, 1.47613968861484e+00, 1.43999925354150e+00, 1.40295032265782e+00,\n                                                1.36537018147391e+00, 1.32763059031929e+00, 1.29008576809571e+00, 1.25306247411542e+00, 1.21685259104909e+00,\n                                                1.18170834430959e+00, 1.14784004903721e+00, 1.11541608275428e+00, 1.08456465572678e+00, 1.05537689526085e+00,\n                                                1.02791076637406e+00, 1.00219540369051e+00, 9.78235509241166e-01, 9.56015560601593e-01, 9.35503659990268e-01,\n                                                9.16654929159417e-01, 8.99414413386733e-01, 8.83719500354790e-01, 8.69501888025642e-01, 8.56689152544440e-01,\n                                                8.45205975608703e-01, 8.34975093144479e-01, 8.25918025539618e-01, 8.17955645563202e-01, 8.11008634453305e-01,\n                                                8.04997870121472e-01, 7.99844784378291e-01, 7.95471718729765e-01, 7.91802300731064e-01, 7.88761855176375e-01,\n                                                7.86277856633063e-01, 7.84280422130223e-01, 7.82702835402350e-01, 7.81482087265623e-01, 7.80559410837995e-01,\n                                                7.79880785805883e-01, 7.79397383177017e-01, 7.79065921247081e-01, 7.78848905019803e-01, 7.78714725041169e-01,\n                                                7.78637597321801e-01, 7.78597333310518e-01, 7.78578937175162e-01, 7.78572036282977e-01, 7.78570159085568e-01,\n                                                7.78569882015617e-01, 7.78569856474714e-01, 7.78569343769718e-01, 7.78565870131107e-01, 7.78553100865558e-01,\n                                                7.78519064208290e-01, 7.78444583510328e-01, 7.78301973537957e-01, 7.78054065786037e-01, 7.77653628242849e-01,\n                                                7.77043244807256e-01, 7.76155716717515e-01, 7.74915040551516e-01, 7.73238002047837e-01, 7.71036399902673e-01,\n                                                7.68219877468233e-01, 7.64699293191573e-01, 7.60390505258520e-01, 7.55218387485908e-01, 7.49120839830692e-01,\n                                                7.42052517477823e-01, 7.33987987000333e-01, 7.24924034239621e-01, 7.14880899785072e-01, 7.03902301770640e-01,\n                                                6.92054213261645e-01, 6.79422478549967e-01, 6.66109462230612e-01, 6.52230010740013e-01, 6.37907055981007e-01,\n                                                6.23267199163219e-01, 6.08436581773422e-01, 5.93537287740645e-01, 5.78684438604455e-01, 5.63984055455251e-01,\n                                                5.49531680025513e-01, 5.35411681922465e-01, 5.21697134903523e-01, 5.08450123485662e-01, 4.95722339763965e-01,\n                                                4.83555844450606e-01, 4.71983890097913e-01, 4.61031732573041e-01, 4.50717384385698e-01, 4.41052287147706e-01,\n                                                4.32041898520666e-01, 4.23686201096750e-01, 4.15980147356482e-01, 4.08914057318839e-01, 4.02473985089696e-01,\n                                                3.96642068472492e-01, 3.91396873111930e-01, 3.86713739951428e-01, 3.82565142440335e-01, 3.78921058019305e-01,\n                                                3.75749356866592e-01, 3.73016209542811e-01, 3.70686513845307e-01, 3.68724339726370e-01, 3.67093389453700e-01,\n                                                3.65757468283721e-01, 3.64680958843682e-01, 3.63829290307216e-01, 3.63169391480596e-01, 3.62670115298524e-01,\n                                                3.62302621165199e-01, 3.62040701245181e-01, 3.61861037337032e-01, 3.61743376403989e-01, 3.61670615162964e-01,\n                                                3.61628787232558e-01, 3.61606950025163e-01, 3.61596972594107e-01, 3.61593229742656e-01, 3.61592211598904e-01,\n                                                3.61592061323108e-01, 3.61592047001984e-01, 3.61591754440227e-01, 3.61589772295385e-01, 3.61582485782836e-01,\n                                                3.61563063088486e-01, 3.61520559396094e-01, 3.61439168931557e-01, 3.61297658980256e-01, 3.61069018409481e-01,\n                                                3.60720351313173e-01, 3.60213043378881e-01, 3.59503223669410e-01, 3.58542536869855e-01, 3.57279229944641e-01,\n                                                3.55659542182824e-01, 3.53629368958856e-01, 3.51136148157206e-01, 3.48130895947161e-01, 3.44570298105769e-01,\n                                                3.40418747526090e-01, 3.35650211002314e-01, 3.30249811156303e-01, 3.24215023283436e-01, 3.17556410856678e-01,\n                                                3.10297854464761e-01, 3.02476262818402e-01, 2.94140786620996e-01, 2.85351582936144e-01, 2.76178197296336e-01,\n                                                2.66697643261629e-01, 2.56992266029872e-01, 2.47147480129012e-01, 2.37249472774849e-01, 2.27382964537277e-01,\n                                                2.17629116644201e-01, 2.08063667975580e-01, 1.98755373125689e-01, 1.89764795371005e-01, 1.81143485876870e-01,\n                                                1.72933555190177e-01, 1.65167617934237e-01, 1.57869069620496e-01, 1.51052637974356e-01, 1.44725141454852e-01,\n                                                1.38886384904602e-01, 1.33530125691191e-01, 1.28645051845226e-01, 1.24215724835981e-01, 1.20223452076939e-01,\n                                                1.16647066607094e-01, 1.13463602613571e-01, 1.10648864901361e-01, 1.08177897776937e-01, 1.06025364057565e-01,\n                                                1.04165848186312e-01, 1.02574098960140e-01, 1.01225227438103e-01, 1.00094874468674e-01, 9.91593602241139e-02,\n                                                9.83958254093835e-02, 9.77823706648380e-02, 9.72981973457188e-02, 9.69237495727526e-02, 9.66408544408104e-02,\n                                                9.64328547617406e-02, 9.62847268906515e-02, 9.61831751777140e-02, 9.61166944701155e-02, 9.60755928529444e-02,\n                                                9.60519683735122e-02, 9.60396356786006e-02, 9.60340010909420e-02, 9.60318874147497e-02, 9.60313124485026e-02,\n                                                9.60312275848736e-02, 9.60312191852637e-02, 9.60310443166392e-02, 9.60298595622930e-02, 9.60255043744027e-02,\n                                                9.60138957677295e-02, 9.59884942958453e-02, 9.59398615374667e-02, 9.58553328720733e-02, 9.57188304552190e-02,\n                                                9.55108422559441e-02, 9.52085929972419e-02, 9.47864308430759e-02, 9.42164486154837e-02, 9.34693492209533e-02,\n                                                9.25155511653202e-02, 9.13265114721717e-02, 8.98762207368868e-02, 8.81428001669953e-02, 8.61101059997402e-02,\n                                                8.37692262044278e-02, 8.11197418672656e-02, 7.81706249481111e-02, 7.49406580843974e-02, 7.14582919515969e-02,\n                                                6.77609001335853e-02, 6.38934465606056e-02, 5.99066398801291e-02, 5.58547044820585e-02, 5.17929408131899e-02,\n                                                4.77752709390309e-02, 4.38519648388933e-02, 4.00677184680234e-02, 3.64602102109401e-02, 3.30592054048040e-02,\n                                                2.98862183244175e-02, 2.69546863897396e-02, 2.42705694029084e-02, 2.18332612736454e-02, 1.96366935221093e-02,\n                                                1.76705165904707e-02, 1.59212625504068e-02, 1.43734163810549e-02, 1.30103481450661e-02, 1.18150816372591e-02,\n                                                1.07708942385436e-02, 9.86175683467749e-03, 9.07263178003248e-03, 8.38965163632466e-03, 7.80020273179716e-03,\n                                                7.29293648361917e-03, 6.85772885735147e-03, 6.48560509292651e-03, 6.16864347603396e-03, 5.89986882388516e-03,\n                                                5.67314364798932e-03, 5.48306270376031e-03, 5.32485482631273e-03, 5.19429454175224e-03, 5.08762487086045e-03,\n                                                5.00149193189614e-03, 4.93289132328911e-03, 4.87912576178928e-03, 4.83777302370569e-03, 4.80666286817311e-03,\n                                                4.78386131426944e-03, 4.76766041326471e-03, 4.75657152514231e-03, 4.74932009387885e-03, 4.74484002995723e-03,\n                                                4.74226604917760e-03, 4.74092266641790e-03, 4.74030897037991e-03, 4.74007876906413e-03, 4.74001615035036e-03,\n                                                4.74000690802256e-03, 4.74000595463764e-03, 4.73998571641232e-03, 4.73984860152399e-03, 4.73934458374003e-03,\n                                                4.73800129580937e-03, 4.73506275260860e-03, 4.72943972313900e-03, 4.71967570788934e-03, 4.70393326936502e-03,\n                                                4.68000621704334e-03, 4.64536356108169e-03, 4.59723083150010e-03, 4.53271287856438e-03, 4.44895924974276e-03,\n                                                4.34336848259420e-03, 4.21382130867443e-03, 4.05892545792952e-03, 3.87824766270839e-03, 3.67250323129298e-03,\n                                                3.44367202960072e-03, 3.19501343272321e-03, 2.93096248346814e-03, 2.65690446503797e-03, 2.37884315639647e-03,\n                                                2.10299573504003e-03, 1.83536071385859e-03, 1.58131117138538e-03, 1.34526221620845e-03, 1.13044961343434e-03,\n                                                9.38838271316911e-04, 7.71158604685240e-04, 6.27049831329884e-04, 5.05275791599757e-04, 4.03973538389835e-04,\n                                                3.20898407647263e-04, 2.53639634244962e-04, 1.99793515346158e-04, 1.57091638151030e-04, 1.23486820264418e-04,\n                                                9.72001443741988e-05, 7.67327466348888e-05, 6.08490280491480e-05, 4.85428595844439e-05, 3.90007942883130e-05,\n                                                3.15726842430308e-05, 2.57517445021449e-05, 2.11584030154199e-05, 1.75194699210124e-05, 1.46375713221403e-05,\n                                                1.23557516609196e-05, 1.05330972779427e-05, 9.04367313836474e-06, 7.78978965243482e-06, 6.70869741270508e-06,\n                                                5.76503821747565e-06, 4.93767338483053e-06, 4.21058803468100e-06, 3.56990393868273e-06, 3.00393418584122e-06,\n                                                2.50344494290289e-06, 2.06142001601961e-06, 1.67264908412790e-06, 1.33332594742797e-06, 1.04059921568478e-06,\n                                                7.92056713549982e-07, 5.85243981277017e-07, 4.17331211366445e-07, 1.42108547152020e-14, 1.77635683940025e-14,\n                                                1.77635683940025e-14, 1.77635683940025e-14, 1.42108547152020e-14, 1.77635683940025e-14, 1.42108547152020e-14,\n                                                1.77635683940025e-14}),\nmadness::CubicInterpolationTable<double>(grid, {2.80000000000000e+01,  2.79999999192005e+01,  2.79999974207183e+01,  2.79999804930975e+01,\n                                                2.79999182648271e+01,  2.79997523829140e+01,  2.79993893331384e+01,  2.79986939679153e+01,\n                                                2.79974844671277e+01,  2.79955289086422e+01,  2.79925435709555e+01,  2.79881930339594e+01,\n                                                2.79820920893707e+01,  2.79738094246201e+01,  2.79628730073998e+01,  2.79487770759810e+01,\n                                                2.79309906338598e+01,  2.79089673538420e+01,  2.78821568096236e+01,  2.78500169613243e+01,\n                                                2.78120278114071e+01,  2.77677061048772e+01,  2.77166208622272e+01,  2.76584094030512e+01,\n                                                2.75927933520628e+01,  2.75195939400040e+01,  2.74387457533396e+01,  2.73503079878270e+01,\n                                                2.72544722580206e+01,  2.71515661308304e+01,  2.70420517893303e+01,  2.69265195721595e+01,\n                                                2.68056765316207e+01,  2.66803305538806e+01,  2.65513709293952e+01,  2.64197465028189e+01,\n                                                2.62864426408006e+01,  2.61524582288641e+01,  2.60187837634768e+01,  2.58863813774456e+01,\n                                                2.57561673687420e+01,  2.56289975361034e+01,  2.55056553921742e+01,  2.53868431468705e+01,\n                                                2.52731752373843e+01,  2.51651741230521e+01,  2.50632680521022e+01,  2.49677905285629e+01,\n                                                2.48789812468197e+01,  2.47969883062357e+01,  2.47218715600537e+01,  2.46536069862049e+01,\n                                                2.45920919903563e+01,  2.45371515634001e+01,  2.44885452177861e+01,  2.44459746213921e+01,\n                                                2.44090918359507e+01,  2.43775080512280e+01,  2.43508026878979e+01,  2.43285327229383e+01,\n                                                2.43102420729206e+01,  2.42954708543030e+01,  2.42837643272663e+01,  2.42746813222389e+01,\n                                                2.42678019473572e+01,  2.42627343817869e+01,  2.42591205747664e+01,  2.42566406936386e+01,\n                                                2.42550161956323e+01,  2.42540114367814e+01,  2.42534337756334e+01,  2.42531321773231e+01,\n                                                2.42529943729355e+01,  2.42529426774887e+01,  2.42529286150489e+01,  2.42529265394614e+01,\n                                                2.42529262553427e+01,  2.42529195454213e+01,  2.42528740847582e+01,  2.42527069671734e+01,\n                                                2.42522614978244e+01,  2.42512866232768e+01,  2.42494197147059e+01,  2.42461734353518e+01,\n                                                2.42409273637580e+01,  2.42329249724110e+01,  2.42212764694380e+01,  2.42049678888671e+01,\n                                                2.41828766516386e+01,  2.41537936054589e+01,  2.41164512812340e+01,  2.40695577789557e+01,\n                                                2.40118353287117e+01,  2.39420621881985e+01,  2.38591161764512e+01,  2.37620178571742e+01,\n                                                2.36499712337876e+01,  2.35223998564108e+01,  2.33789764985360e+01,  2.32196450218866e+01,\n                                                2.30446336329162e+01,  2.28544593036781e+01,  2.26499235159172e+01,  2.24320995647494e+01,\n                                                2.22023114355111e+01,  2.19621039589081e+01,  2.17132039620461e+01,  2.14574728968091e+01,\n                                                2.11968530785316e+01,  2.09333117424763e+01,  2.06687885756736e+01,  2.04051521306875e+01,\n                                                2.01441683009837e+01,  1.98874807508373e+01,  1.96366004135694e+01,  1.93929000512578e+01,\n                                                1.91576104832434e+01,  1.89318166547947e+01,  1.87164532815588e+01,  1.85123007905781e+01,\n                                                1.83199825818447e+01,  1.81399644504267e+01,  1.79725566086423e+01,  1.78179183418146e+01,\n                                                1.76760650327036e+01,  1.75468771296129e+01,  1.74301105931741e+01,  1.73254083986375e+01,\n                                                1.72323127544856e+01,  1.71502777924498e+01,  1.70786825671618e+01,  1.70168442640158e+01,\n                                                1.69640315471834e+01,  1.69194779870264e+01,  1.68823954914321e+01,  1.68519876345177e+01,\n                                                1.68274627351132e+01,  1.68080464929430e+01,  1.67929939487346e+01,  1.67816005012560e+01,\n                                                1.67732116943242e+01,  1.67672314837611e+01,  1.67631287102628e+01,  1.67604415397381e+01,\n                                                1.67587796866462e+01,  1.67578243054094e+01,  1.67573255158937e+01,  1.67570976161207e+01,\n                                                1.67570121232543e+01,  1.67569888671413e+01,  1.67569854345884e+01,  1.67569851087446e+01,\n                                                1.67569784655614e+01,  1.67569334570741e+01,  1.67567680019529e+01,  1.67563269657935e+01,\n                                                1.67553618016592e+01,  1.67535135222268e+01,  1.67502997410088e+01,  1.67451064690880e+01,\n                                                1.67371852914732e+01,  1.67256564647854e+01,  1.67095183642253e+01,  1.66876635506250e+01,\n                                                1.66589015173649e+01,  1.66219879057578e+01,  1.65756596467299e+01,  1.65186751059358e+01,\n                                                1.64498578989872e+01,  1.63681426339871e+01,  1.62726204699503e+01,  1.61625820982205e+01,\n                                                1.60375556083508e+01,  1.58973367365176e+01,  1.57420092518320e+01,  1.55719537371193e+01,\n                                                1.53878437641970e+01,  1.51906294115017e+01,  1.49815091401417e+01,  1.47618921012028e+01,\n                                                1.45333538256772e+01,  1.42975887786243e+01,  1.40563633129942e+01,  1.38114720953023e+01,\n                                                1.35647001695390e+01,  1.33177916619514e+01,  1.30724249615223e+01,  1.28301932959681e+01,\n                                                1.25925891496657e+01,  1.23609910054356e+01,  1.21366513633697e+01,  1.19206857052049e+01,\n                                                1.17140627805851e+01,  1.15175970608379e+01,  1.13319443022380e+01,  1.11576008891460e+01,\n                                                1.09949071203703e+01,  1.08440540562262e+01,  1.07050931359867e+01,  1.05779476000181e+01,\n                                                1.04624248040328e+01,  1.03582287211220e+01,  1.02649721946645e+01,  1.01821887526524e+01,\n                                                1.01093439766188e+01,  1.00458465241986e+01,  9.99105894270080e+00,  9.94430840010206e+00,\n                                                9.90489741806795e+00,  9.87211463369162e+00,  9.84524555290110e+00,  9.82358319568797e+00,\n                                                9.80643847604253e+00,  9.79315011121683e+00,  9.78309381863409e+00,  9.77569053701543e+00,\n                                                9.77041340318814e+00,  9.76679322885519e+00,  9.76442225251402e+00,  9.76295598955825e+00,\n                                                9.76211306585085e+00,  9.76167299295961e+00,  9.76147192213248e+00,  9.76139649386508e+00,\n                                                9.76137597557973e+00,  9.76137294712496e+00,  9.76137267761409e+00,  9.76136737226067e+00,\n                                                9.76133142775792e+00,  9.76119929267125e+00,  9.76084707448026e+00,  9.76007628116909e+00,\n                                                9.75860022545174e+00,  9.75603368278551e+00,  9.75188635466538e+00,  9.74556063973274e+00,\n                                                9.73635414930148e+00,  9.72346731104166e+00,  9.70601627402257e+00,  9.68305115064221e+00,\n                                                9.65357940053977e+00,  9.61659387941819e+00,  9.57110475215818e+00,  9.51617412651722e+00,\n                                                9.45095193529676e+00,  9.37471132660724e+00,  9.28688166627953e+00,  9.18707726466720e+00,\n                                                9.07512014838333e+00,  8.95105561037056e+00,  8.81515984564437e+00,  8.66793961799922e+00,\n                                                8.51012446988790e+00,  8.34265235236544e+00,  8.16664964401950e+00,  7.98340638138570e+00,\n                                                7.79434727615345e+00,  7.60099893088516e+00,  7.40495372840693e+00,  7.20783119237215e+00,\n                                                7.01123810362922e+00,  6.81672913454628e+00,  6.62577005335038e+00,  6.43970553886923e+00,\n                                                6.25973331485102e+00,  6.08688573234801e+00,  5.92201922178982e+00,  5.76581133728380e+00,\n                                                5.61876453408248e+00,  5.48121542234460e+00,  5.35334804601461e+00,  5.23520972658325e+00,\n                                                5.12672814559581e+00,  5.02772856570890e+00,  4.93795035872230e+00,  4.85706228042209e+00,\n                                                4.78467617840736e+00,  4.72035902421192e+00,  4.66364331843228e+00,  4.61403602747202e+00,\n                                                4.57102627723600e+00,  4.53409205895363e+00,  4.50270620210473e+00,  4.47634184572530e+00,\n                                                4.45447759816841e+00,  4.43660252210241e+00,  4.42222102115191e+00,  4.41085764189198e+00,\n                                                4.40206174451266e+00,  4.39541194180840e+00,  4.39052016327037e+00,  4.38703517236019e+00,\n                                                4.38464535291029e+00,  4.38308058610132e+00,  4.38211306217572e+00,  4.38155690897830e+00,\n                                                4.38126656922017e+00,  4.38113391568575e+00,  4.38108415359023e+00,  4.38107061717156e+00,\n                                                4.38106861922734e+00,  4.38106844259883e+00,  4.38106497884124e+00,  4.38104151144590e+00,\n                                                4.38095524389589e+00,  4.38072529455923e+00,  4.38022209806674e+00,  4.37925857753829e+00,\n                                                4.37758351085008e+00,  4.37487750950786e+00,  4.37075201934419e+00,  4.36475172879289e+00,\n                                                4.35636072098738e+00,  4.34501261757057e+00,  4.33010482341146e+00,  4.31101678490421e+00,\n                                                4.28713191949133e+00,  4.25786256918764e+00,  4.22267699604100e+00,  4.18112710409070e+00,\n                                                4.13287528200964e+00,  4.07771856104067e+00,  4.01560822189257e+00,  3.94666310154600e+00,\n                                                3.87117516849225e+00,  3.78960644863719e+00,  3.70257705780222e+00,  3.61084486185355e+00,\n                                                3.51527804768090e+00,  3.41682254175330e+00,  3.31646666032455e+00,  3.21520554823627e+00,\n                                                3.11400783869843e+00,  3.01378657299063e+00,  2.91537583054754e+00,  2.81951383813949e+00,\n                                                2.72683265836199e+00,  2.63785399154872e+00,  2.55299021817795e+00,  2.47254958005652e+00,\n                                                2.39674433438900e+00,  2.32570077965843e+00,  2.25947020124750e+00,  2.19803997486553e+00,\n                                                2.14134426281411e+00,  2.08927391909528e+00,  2.04168537234461e+00,  1.99840837687654e+00,\n                                                1.95925261334343e+00,  1.92401318582280e+00,  1.89247510648207e+00,  1.86441688692631e+00,\n                                                1.83961337073211e+00,  1.81783794748097e+00,  1.79886428704426e+00,  1.78246772556166e+00,\n                                                1.76842642267032e+00,  1.75652239395180e+00,  1.74654250395324e+00,  1.73827948412579e+00,\n                                                1.73153301726897e+00,  1.72611090636408e+00,  1.72183032200535e+00,  1.71851910017093e+00,\n                                                1.71601704215205e+00,  1.71417715245397e+00,  1.71286673967830e+00,  1.71196830079057e+00,\n                                                1.71138011132318e+00,  1.71101645294198e+00,  1.71080742476368e+00,  1.71069830460939e+00,\n                                                1.71064844931072e+00,  1.71062974728777e+00,  1.71062465992380e+00,  1.71062390904097e+00,\n                                                1.71062384163282e+00,  1.71062250812331e+00,  1.71061347343691e+00,  1.71058026152466e+00,\n                                                1.71049173499010e+00,  1.71029801829539e+00,  1.70992710986955e+00,  1.70928235419185e+00,\n                                                1.70824094765726e+00,  1.70665365293619e+00,  1.70434589069495e+00,  1.70112035866094e+00,\n                                                1.69676128929463e+00,  1.69104039269402e+00,  1.68372443706306e+00,  1.67458429548073e+00,\n                                                1.66340514090029e+00,  1.64999731409775e+00,  1.63420724103034e+00,  1.61592766085434e+00,\n                                                1.59510636894231e+00,  1.57175270204716e+00,  1.54594110739907e+00,  1.51781134227128e+00,\n                                                1.48756512776247e+00,  1.45545939799529e+00,  1.42179660177751e+00,  1.38691278410663e+00,\n                                                1.35116436208411e+00,  1.31491458954633e+00,  1.27852067020401e+00,  1.24232234147565e+00,\n                                                1.20663253667179e+00,  1.17173047733501e+00,  1.13785728850977e+00,  1.10521400137376e+00,\n                                                1.07396163422302e+00,  1.04422293594655e+00,  1.01608533507681e+00,  9.89604651705967e-01,\n                                                9.64809182875349e-01,  9.41703847137006e-01,  9.20274155705982e-01,  9.00489854904013e-01,\n                                                8.82308150851721e-01,  8.65676479850169e-01,  8.50534826583925e-01,  8.36817618745872e-01,\n                                                8.24455243175258e-01,  8.13375237436610e-01,  8.03503214021994e-01,  7.94763573717884e-01,\n                                                7.87080061430629e-01,  7.80376212835908e-01,  7.74575734240869e-01,  7.69602851422651e-01,\n                                                7.65382656175863e-01,  7.61841472001915e-01,  7.58907252901576e-01,  7.56510021688413e-01,\n                                                7.54582346769368e-01,  7.53059849154404e-01,  7.51881724849277e-01,  7.50991262109856e-01,\n                                                7.50336328679158e-01,  7.49869801459258e-01,  7.49549910384175e-01,  7.49340469719673e-01,\n                                                7.49210973608335e-01,  7.49136538191419e-01,  7.49097679672349e-01,  7.49079925687802e-01,\n                                                7.49073265683673e-01,  7.49071454013180e-01,  7.49071186614852e-01,  7.49071161965496e-01,\n                                                7.49070667157387e-01,  7.49067314772301e-01,  7.49054991240374e-01,  7.49022142690258e-01,\n                                                7.48950261856351e-01,  7.48812629864474e-01,  7.48573375515214e-01,  7.48186915192406e-01,\n                                                7.47597836285887e-01,  7.46741284267408e-01,  7.45543906028342e-01,  7.43925387315663e-01,\n                                                7.41800597896940e-01,  7.39082323139847e-01,  7.35684515270314e-01,  7.31525944145364e-01,\n                                                7.26534070985871e-01,  7.20648916669848e-01,  7.13826658072470e-01,  7.06042670903535e-01,\n                                                6.97293752995002e-01,  6.87599311435864e-01,  6.77001378041389e-01,  6.65563421860483e-01,\n                                                6.53368041035144e-01,  6.40513722827404e-01,  6.27110944105560e-01,  6.13277933044447e-01,\n                                                5.99136420599638e-01,  5.84807679022770e-01,  5.70409082233034e-01,  5.56051341434891e-01,\n                                                5.41836482647412e-01,  5.27856553283897e-01,  5.14192981917290e-01,  5.00916474005781e-01,\n                                                4.88087307486360e-01,  4.75755893098018e-01,  4.63963480084672e-01,  4.52742912614124e-01,\n                                                4.42119370152945e-01,  4.32111051591093e-01,  4.22729785093242e-01,  4.13981562024581e-01,\n                                                4.05867003739647e-01,  3.98381775329433e-01,  3.91516961865904e-01,  3.85259421635709e-01,\n                                                3.79592128528607e-01,  3.74494513049584e-01,  3.69942808925700e-01,  3.65910410239071e-01,\n                                                3.62368242462221e-01,  3.59285149577094e-01,  3.56628298431829e-01,  3.54363600434180e-01,\n                                                3.52456149442215e-01,  3.50870673205936e-01,  3.49571993931786e-01,  3.48525491556710e-01,\n                                                3.47697561267555e-01,  3.47056054870436e-01,  3.46570694011636e-01,  3.46213442184229e-01,\n                                                3.45958822100666e-01,  3.45784165497260e-01,  3.45669783815865e-01,  3.45599050454553e-01,\n                                                3.45558388281827e-01,  3.45537159684202e-01,  3.45527460327229e-01,  3.45523821790199e-01,\n                                                3.45522832022418e-01,  3.45522685934863e-01,  3.45522672012869e-01,  3.45522387604895e-01,\n                                                3.45520460703039e-01,  3.45513377267828e-01,  3.45494495889877e-01,  3.45453176788144e-01,\n                                                3.45374054699708e-01,  3.45236488671194e-01,  3.45014220379174e-01,  3.44675270750216e-01,\n                                                3.44182101729960e-01,  3.43492065303714e-01,  3.42558154485516e-01,  3.41330060264077e-01,\n                                                3.39755524040598e-01,  3.37781957079059e-01,  3.35358277825577e-01,  3.32436896395276e-01,\n                                                3.28975755605981e-01,  3.24940322660112e-01,  3.20305417889553e-01,  3.15056769093996e-01,\n                                                3.09192192749908e-01,  3.02722325781129e-01,  2.95670860952928e-01,  2.88074271372267e-01,\n                                                2.79981040896004e-01,  2.71450444101959e-01,  2.62550940049511e-01,  2.53358258256100e-01,\n                                                2.43953264327377e-01,  2.34419698081972e-01,  2.24841879880557e-01,  2.15302481236062e-01,\n                                                2.05880452683310e-01,  1.96649193931357e-01,  1.87675037490923e-01,  1.79016097295090e-01,\n                                                1.70721509664990e-01,  1.62831067786904e-01,  1.55375225681542e-01,  1.48375426330659e-01,\n                                                1.41844693299394e-01,  1.35788416890456e-01,  1.30205264502134e-01,  1.25088149441751e-01,\n                                                1.20425201411628e-01,  1.16200693482654e-01,  1.12395892953796e-01,  1.08989815720790e-01,\n                                                1.05959874692434e-01,  1.03282421835079e-01,  1.00933190365630e-01,  9.88876484646752e-02,\n                                                9.71212788152016e-02,  9.56097995422773e-02,  9.43293420132498e-02,  9.32565997331949e-02,\n                                                9.23689604926814e-02,  9.16446312344092e-02,  9.10627620290967e-02,  9.06035723107834e-02,\n                                                9.02484793396070e-02,  8.99802259527824e-02,  8.97830022368851e-02,  8.96425539829266e-02,\n                                                8.95462698004721e-02,  8.94832386357578e-02,  8.94442701538622e-02,  8.94218719216688e-02,\n                                                8.94101794111286e-02,  8.94048373227783e-02,  8.94028333721764e-02,  8.94022882538614e-02,\n                                                8.94022077957075e-02,  8.94021998321470e-02,  8.94020340414059e-02,  8.94009107908893e-02,\n                                                8.93967816951964e-02,  8.93857757489336e-02,  8.93616930913517e-02,  8.93155856627814e-02,\n                                                8.92354474483348e-02,  8.91060381617095e-02,  8.89088652094578e-02,  8.86223488205751e-02,\n                                                8.82221933459668e-02,  8.76819828664850e-02,  8.69740104349788e-02,  8.60703368822371e-02,\n                                                8.49440570762781e-02,  8.35707295801136e-02,  8.19299015089925e-02,  8.00066367321470e-02,\n                                                7.77929359025258e-02,  7.52889250580431e-02,  7.25036894501656e-02,  6.94556435914180e-02,\n                                                6.61723582844012e-02,  6.26898092248354e-02,  5.90510656089407e-02,  5.53044945492900e-02,\n                                                5.15016099713002e-02,  4.76947347967993e-02,  4.39346658654785e-02,  4.02685284463935e-02,\n                                                3.67379815721272e-02,  3.33778910639850e-02,  3.02155314537345e-02,  2.72703200287694e-02,\n                                                2.45540345293271e-02,  2.20714271446241e-02,  1.98211248476383e-02,  1.77966999944630e-02,\n                                                1.59878030395859e-02,  1.43812670811805e-02,  1.29621171175422e-02,  1.17144411347283e-02,\n                                                1.06221022276465e-02,  9.66928889770102e-03,  8.84091366495809e-03,  8.12287829901948e-03,\n                                                7.50222800176203e-03,  6.96721772591857e-03,  6.50731247815273e-03,  6.11314082761538e-03,\n                                                5.77641763984005e-03,  5.48984879841896e-03,  5.24702768280605e-03,  5.04233059711723e-03,\n                                                4.87081623542451e-03,  4.72813260287452e-03,  4.61043353193347e-03,  4.51430596900693e-03,\n                                                4.43670848156330e-03,  4.37492087814206e-03,  4.32650438720827e-03,  4.28927146511526e-03,\n                                                4.26126398298265e-03,  4.24073827555560e-03,  4.22615533609516e-03,  4.21617432845878e-03,\n                                                4.20964757862663e-03,  4.20561531412034e-03,  4.20329863957747e-03,  4.20208955501167e-03,\n                                                4.20153721206162e-03,  4.20133002497280e-03,  4.20127366654555e-03,  4.20126534822174e-03,\n                                                4.20126449014191e-03,  4.20124627512664e-03,  4.20112286758467e-03,  4.20066923683393e-03,\n                                                4.19946024214468e-03,  4.19681549441364e-03,  4.19175472777056e-03,  4.18296727082534e-03,\n                                                4.16879993520780e-03,  4.14726833087542e-03,  4.11609699639470e-03,  4.07279343754041e-03,\n                                                4.01475980238786e-03,  3.93944314041050e-03,  3.84452082098719e-03,  3.72811186684885e-03,\n                                                3.58899827793735e-03,  3.42683397489196e-03,  3.24231429427613e-03,  3.03727769673756e-03,\n                                                2.81471490106711e-03,  2.57866963323039e-03,  2.33402894849277e-03,  2.08621763687944e-03,\n                                                1.84082743530212e-03,  1.60322409150382e-03,  1.37818068409601e-03,  1.16958228581154e-03,\n                                                9.80235280511721e-04,  8.11796698371836e-04,  6.64818817845969e-04,  5.38886804040573e-04,\n                                                4.32816494829069e-04,  3.44877535464860e-04,  2.73012573376974e-04,  2.15032195573173e-04,\n                                                1.68773517405185e-04,  1.32216072493918e-04,  1.03553281046942e-04,  8.12233887970137e-05,\n                                                6.39099308656910e-05,  5.05250799562873e-05,  4.01868544592787e-05,  3.21947015144985e-05,\n                                                2.60028496370523e-05,  2.11909926299825e-05,  1.74355012028116e-05,  1.44859225201799e-05,\n                                                1.21485302315705e-05,  1.02748086696636e-05,  8.75228026586683e-06,  7.49681692369109e-06,\n                                                6.44614819123035e-06,  5.55401061674843e-06,  4.78515375945676e-06,  4.11227836139005e-06,\n                                                3.51511232210555e-06,  2.98023320866037e-06,  2.50011648716963e-06,  2.07118065276291e-06,\n                                                1.69163292440544e-06,  1.35990888594506e-06,  1.07393907455844e-06,  8.31026476078023e-07,\n                                                6.28000897506809e-07,  4.61413332430993e-07,  -1.06581410364015e-14, -7.10542735760100e-15,\n                                                -1.06581410364015e-14, -1.06581410364015e-14, -7.10542735760100e-15, -1.06581410364015e-14,\n                                                -1.06581410364015e-14, -1.06581410364015e-14, -7.10542735760100e-15}),\nmadness::CubicInterpolationTable<double>(grid, {2.90000000000000e+01,  2.89999999147118e+01,  2.89999972774329e+01,  2.89999794094411e+01,\n                                                2.89999137242336e+01,  2.89997386271345e+01,  2.89993554088255e+01,  2.89986214133776e+01,\n                                                2.89973447184518e+01,  2.89952805138818e+01,  2.89921293074908e+01,  2.89875370274266e+01,\n                                                2.89810970330481e+01,  2.89723539965067e+01,  2.89608095794631e+01,  2.89459298074118e+01,\n                                                2.89271540388764e+01,  2.89039054354334e+01,  2.88756028535568e+01,  2.88416740884320e+01,\n                                                2.88015703877631e+01,  2.87547821047104e+01,  2.87008552623184e+01,  2.86394086552557e+01,\n                                                2.85701509297146e+01,  2.84928968848299e+01,  2.84075820670176e+01,  2.83142746257581e+01,\n                                                2.82131834048186e+01,  2.81046613810499e+01,  2.79892038347041e+01,  2.78674410149394e+01,\n                                                2.77401255025911e+01,  2.76081149061000e+01,  2.74723508916818e+01,  2.73338357941682e+01,\n                                                2.71936081521997e+01,  2.70527184595805e+01,  2.69122062475035e+01,  2.67730793512723e+01,\n                                                2.66362959183350e+01,  2.65027494270532e+01,  2.63732567420697e+01,  2.62485490522674e+01,\n                                                2.61292654263983e+01,  2.60159486730148e+01,  2.59090431914579e+01,  2.58088945325673e+01,\n                                                2.57157504354459e+01,  2.56297631571467e+01,  2.55509929567488e+01,  2.54794126291363e+01,\n                                                2.54149130052827e+01,  2.53573093455324e+01,  2.53063485520034e+01,  2.52617171179881e+01,\n                                                2.52230497182610e+01,  2.51899383264486e+01,  2.51619417257777e+01,  2.51385952591347e+01,\n                                                2.51194206449306e+01,  2.51039356682542e+01,  2.50916635437389e+01,  2.50821417389437e+01,\n                                                2.50749300462312e+01,  2.50696176982227e+01,  2.50658293376452e+01,  2.50632296769724e+01,\n                                                2.50615267163175e+01,  2.50604734285603e+01,  2.50598678671205e+01,  2.50595517020561e+01,\n                                                2.50594072419328e+01,  2.50593530496791e+01,  2.50593383080463e+01,  2.50593361322112e+01,\n                                                2.50593358343701e+01,  2.50593288003705e+01,  2.50592811440319e+01,  2.50591059549495e+01,\n                                                2.50586389702410e+01,  2.50576170113234e+01,  2.50556599361744e+01,  2.50522568739613e+01,\n                                                2.50467574466892e+01,  2.50383686073238e+01,  2.50261576274880e+01,  2.50090616395287e+01,\n                                                2.49859039658667e+01,  2.49554172429384e+01,  2.49162730621289e+01,  2.48671175082057e+01,\n                                                2.48066115906009e+01,  2.47334751622718e+01,  2.46465325478351e+01,  2.45447578132113e+01,\n                                                2.44273174645771e+01,  2.42936084175713e+01,  2.41432893513375e+01,  2.39763040269416e+01,\n                                                2.37928957106910e+01,  2.35936123479406e+01,  2.33793024194342e+01,  2.31511013914727e+01,\n                                                2.29104084285295e+01,  2.26588528882138e+01,  2.23982505375990e+01,  2.21305507845548e+01,\n                                                2.18577783800165e+01,  2.15819751601378e+01,  2.13051481685111e+01,  2.10292290625370e+01,\n                                                2.07560464437225e+01,  2.04873092108766e+01,  2.02245968870385e+01,  1.99693527908543e+01,\n                                                1.97228773719101e+01,  1.94863209036063e+01,  1.92606761373164e+01,  1.90467721347747e+01,\n                                                1.88452704320698e+01,  1.86566642552226e+01,  1.84812809903007e+01,  1.83192876885555e+01,\n                                                1.81706991286475e+01,  1.80353878593266e+01,  1.79130956666303e+01,  1.78034460005736e+01,\n                                                1.77059570144751e+01,  1.76200549845929e+01,  1.75450879701298e+01,  1.74803396355479e+01,\n                                                1.74250431873060e+01,  1.73783953788393e+01,  1.73395705164709e+01,  1.73077343616614e+01,\n                                                1.72820577785056e+01,  1.72617299264514e+01,  1.72459707531652e+01,  1.72340425070029e+01,\n                                                1.72252599674209e+01,  1.72189990884860e+01,  1.72147037675459e+01,  1.72118904885578e+01,\n                                                1.72101506462591e+01,  1.72091504303185e+01,  1.72086282334370e+01,  1.72083896387342e+01,\n                                                1.72083001338449e+01,  1.72082757863657e+01,  1.72082721927295e+01,  1.72082718515944e+01,\n                                                1.72082648966590e+01,  1.72082177760078e+01,  1.72080445563940e+01,  1.72075828232976e+01,\n                                                1.72065723661962e+01,  1.72046373521060e+01,  1.72012727598318e+01,  1.71958357941118e+01,\n                                                1.71875429337265e+01,  1.71754731813449e+01,  1.71585779634449e+01,  1.71356979632408e+01,\n                                                1.71055869469801e+01,  1.70669423574221e+01,  1.70184420982515e+01,  1.69587865298153e+01,\n                                                1.68867442615062e+01,  1.68011998926324e+01,  1.67012014654984e+01,  1.65860051030072e+01,\n                                                1.64551141629317e+01,  1.63083103039177e+01,  1.61456741657872e+01,  1.59675939401872e+01,\n                                                1.57747609364104e+01,  1.55681522763251e+01,  1.53490019747379e+01,  1.51187627215301e+01,\n                                                1.48790614965628e+01,  1.46316525471462e+01,  1.43783711333076e+01,  1.41210907982797e+01,\n                                                1.38616858778380e+01,  1.36019997582356e+01,  1.33438183165095e+01,  1.30888472891132e+01,\n                                                1.28386921683259e+01,  1.25948396137099e+01,  1.23586401141603e+01,  1.21312924533289e+01,\n                                                1.19138311062592e+01,  1.17071178138735e+01,  1.15118382135426e+01,  1.13285037088539e+01,\n                                                1.11574580113589e+01,  1.09988872366344e+01,  1.08528322218493e+01,  1.07192018397215e+01,\n                                                1.05977863988523e+01,  1.04882706000151e+01,  1.03902458514152e+01,  1.03032219782749e+01,\n                                                1.02266384867790e+01,  1.01598755805538e+01,  1.01022651088033e+01,  1.00531015746819e+01,\n                                                1.00116532682400e+01,  9.97717352069385e+00,  9.94891201118811e+00,  9.92612599642979e+00,\n                                                9.90809127960528e+00,  9.89411268999074e+00,  9.88353381114385e+00,  9.87574567616244e+00,\n                                                9.87019414556159e+00,  9.86638569842187e+00,  9.86389140098226e+00,  9.86234886773834e+00,\n                                                9.86146209582010e+00,  9.86099913010395e+00,  9.86078759933153e+00,  9.86070824717356e+00,\n                                                9.86068666149446e+00,  9.86068347549459e+00,  9.86068319196334e+00,  9.86067761061684e+00,\n                                                9.86063979622129e+00,  9.86050078722458e+00,  9.86013024581817e+00,  9.85931935313085e+00,\n                                                9.85776650435080e+00,  9.85506642428044e+00,  9.85070328130196e+00,  9.84404832536954e+00,\n                                                9.83436250554387e+00,  9.82080442450306e+00,  9.80244385041210e+00,  9.77828082100125e+00,\n                                                9.74727013542304e+00,  9.70835073841669e+00,  9.66047917058727e+00,  9.60266591235763e+00,\n                                                9.53401312383428e+00,  9.45375202469916e+00,  9.36127801708814e+00,  9.25618167310914e+00,\n                                                9.13827390934309e+00,  9.00760404097851e+00,  8.86446989357312e+00,  8.70941966018365e+00,\n                                                8.54324562379492e+00,  8.36697014527748e+00,  8.18182443577852e+00,  7.98922065687574e+00,\n                                                7.79071794025381e+00,  7.58798310253947e+00,  7.38274719446113e+00,  7.17675951370254e+00,\n                                                6.97174119446057e+00,  6.76934080405496e+00,  6.57109440433478e+00,  6.37839222879958e+00,\n                                                6.19245352986592e+00,  6.01431037638605e+00,  5.84480036976324e+00,  5.68456752752707e+00,\n                                                5.53407004735723e+00,  5.39359335391421e+00,  5.26326674090709e+00,  5.14308201378320e+00,\n                                                5.03291275930808e+00,  4.93253315950955e+00,  4.84163557890555e+00,  4.75984644829527e+00,\n                                                4.68674022217788e+00,  4.62185138872993e+00,  4.56468465901262e+00,  4.51472355935999e+00,\n                                                4.47143770447343e+00,  4.43428904641267e+00,  4.40273738401783e+00,  4.37624538511200e+00,\n                                                4.35428332599828e+00,  4.33633369440764e+00,  4.32189573783445e+00,  4.31048997354492e+00,\n                                                4.30166261381018e+00,  4.29498980434212e+00,  4.29008152945367e+00,  4.28658500749479e+00,\n                                                4.28418738704537e+00,  4.28261755930071e+00,  4.28164692466306e+00,  4.28108898978038e+00,\n                                                4.28079772175477e+00,  4.28066464452853e+00,  4.28061472356293e+00,  4.28060114393448e+00,\n                                                4.28059913961285e+00,  4.28059896242054e+00,  4.28059548760681e+00,  4.28057194530946e+00,\n                                                4.28048540248690e+00,  4.28025471995176e+00,  4.27974992179985e+00,  4.27878334511538e+00,\n                                                4.27710299880814e+00,  4.27438855820705e+00,  4.27025041510669e+00,  4.26423218127245e+00,\n                                                4.25581699416598e+00,  4.24443788308923e+00,  4.22949230971143e+00,  4.21036079100771e+00,\n                                                4.18642924441125e+00,  4.15711437416987e+00,  4.12189106649722e+00,  4.08032041379076e+00,\n                                                4.03207669045707e+00,  3.97697140650930e+00,  3.91497252082606e+00,  3.84621704403983e+00,\n                                                3.77101562094382e+00,  3.68984824379000e+00,  3.60335096575696e+00,  3.51229427954015e+00,\n                                                3.41755459664010e+00,  3.32008089846546e+00,  3.22085903515291e+00,  3.12087626170272e+00,\n                                                3.02108841293562e+00,  2.92239167069245e+00,  2.82560025294090e+00,  2.73143066182524e+00,\n                                                2.64049247144710e+00,  2.55328509900630e+00,  2.47019963247160e+00,  2.39152459459669e+00,\n                                                2.31745448685343e+00,  2.24810003919409e+00,  2.18349924793932e+00,  2.12362847386306e+00,\n                                                2.06841306460986e+00,  2.01773714002264e+00,  1.97145232580015e+00,  1.92938533744423e+00,\n                                                1.89134440443001e+00,  1.85712458779918e+00,  1.82651208737628e+00,  1.79928766172371e+00,\n                                                1.77522929835222e+00,  1.75411427647674e+00,  1.73572076200320e+00,  1.71982906616367e+00,\n                                                1.70622268655664e+00,  1.69468923323547e+00,  1.68502132363778e+00,  1.67701750917368e+00,\n                                                1.67048327381397e+00,  1.66523212177317e+00,  1.66108674827544e+00,  1.65788026552792e+00,\n                                                1.65545743666435e+00,  1.65367585488042e+00,  1.65240699448665e+00,  1.65153705612461e+00,\n                                                1.65096753046581e+00,  1.65061541332759e+00,  1.65041301966919e+00,  1.65030736317295e+00,\n                                                1.65025909041187e+00,  1.65024098204753e+00,  1.65023605617252e+00,  1.65023532912512e+00,\n                                                1.65023526385673e+00,  1.65023397267707e+00,  1.65022522478108e+00,  1.65019306713142e+00,\n                                                1.65010735080239e+00,  1.64991978381108e+00,  1.64956065141303e+00,  1.64893636999554e+00,\n                                                1.64792804362031e+00,  1.64639119341294e+00,  1.64415682452354e+00,  1.64103397710067e+00,\n                                                1.63681386992364e+00,  1.63127568204219e+00,  1.62419392528919e+00,  1.61534723924039e+00,\n                                                1.60452829614661e+00,  1.59155434927517e+00,  1.57627781316872e+00,  1.55859615243470e+00,\n                                                1.53846030178495e+00,  1.51588086521705e+00,  1.49093145816498e+00,  1.46374876097299e+00,\n                                                1.43452912704164e+00,  1.40352190182342e+00,  1.37101991741712e+00,  1.33734788801010e+00,\n                                                1.30284960684678e+00,  1.26787491279136e+00,  1.23276734909108e+00,  1.19785329214691e+00,\n                                                1.16343311219772e+00,  1.12977467745670e+00,  1.09710926597345e+00,  1.06562973697983e+00,\n                                                1.03549065663160e+00,  1.00680998021317e+00,  9.79671860850374e-01,  9.54130172153576e-01,\n                                                9.30212383508046e-01,  9.07923496269721e-01,  8.87249823755052e-01,  8.68162468277742e-01,\n                                                8.50620409096553e-01,  8.34573163702370e-01,  8.19963021314337e-01,  8.06726872997523e-01,\n                                                7.94797679264718e-01,  7.84105625303891e-01,  7.74579017854670e-01,  7.66144977743551e-01,\n                                                7.58729979376181e-01,  7.52260283978792e-01,  7.46662307723309e-01,  7.41862959493616e-01,\n                                                7.37789976226310e-01,  7.34372276653090e-01,  7.31540346997836e-01,  7.29226664848841e-01,\n                                                7.27366160179152e-01,  7.25896705533877e-01,  7.24759621019409e-01,  7.23900174255064e-01,\n                                                7.23268051251640e-01,  7.22817771617045e-01,  7.22509020838466e-01,  7.22306873808694e-01,\n                                                7.22181887237625e-01,  7.22110043914263e-01,  7.22072538572775e-01,  7.22055402836819e-01,\n                                                7.22048974754316e-01,  7.22047226171689e-01,  7.22046968084978e-01,  7.22046944293997e-01,\n                                                7.22046466716598e-01,  7.22043231071687e-01,  7.22031336682019e-01,  7.21999632014054e-01,\n                                                7.21930254266741e-01,  7.21797414944916e-01,  7.21566491835386e-01,  7.21193488281944e-01,\n                                                7.20624920412419e-01,  7.19798190303564e-01,  7.18642495792192e-01,  7.17080313377618e-01,\n                                                7.15029467298333e-01,  7.12405764142865e-01,  7.09126128524204e-01,  7.05112123787881e-01,\n                                                7.00293687302189e-01,  6.94612859841072e-01,  6.88027251788490e-01,  6.80512974407552e-01,\n                                                6.72066779459907e-01,  6.62707198354685e-01,  6.52474550563763e-01,  6.41429792039162e-01,\n                                                6.29652284490607e-01,  6.17236669570460e-01,  6.04289112720512e-01,  5.90923227902909e-01,\n                                                5.77256001111159e-01,  5.63403998986029e-01,  5.49480086939511e-01,  5.35590801057037e-01,\n                                                5.21834433318180e-01,  5.08299812731725e-01,  4.95065704935392e-01,  4.82200714465460e-01,\n                                                4.69763557739238e-01,  4.57803577793765e-01,  4.46361388767492e-01,  4.35469562991383e-01,\n                                                4.25153300788981e-01,  4.15431048332938e-01,  4.06315049437076e-01,  3.97811831823443e-01,\n                                                3.89922637306547e-01,  3.82643809425474e-01,  3.75967152662835e-01,  3.69880275881446e-01,\n                                                3.64366930139727e-01,  3.59407348444137e-01,  3.54978592745663e-01,  3.51054911773517e-01,\n                                                3.47608112090136e-01,  3.44607943885752e-01,  3.42022502291986e-01,  3.39818644177800e-01,\n                                                3.37962419341856e-01,  3.36419513652203e-01,  3.35155700008009e-01,  3.34137291087750e-01,\n                                                3.33331585847507e-01,  3.32707299831519e-01,  3.32234967766251e-01,  3.31887305837054e-01,\n                                                3.31639520670393e-01,  3.31469552490308e-01,  3.31358241239883e-01,  3.31289406629200e-01,\n                                                3.31249835984067e-01,  3.31229177243234e-01,  3.31219738254216e-01,  3.31216197389487e-01,\n                                                3.31215234190879e-01,  3.31215092024870e-01,  3.31215078476593e-01,  3.31214801703222e-01,\n                                                3.31212926526824e-01,  3.31206033238253e-01,  3.31187658709240e-01,  3.31147448772192e-01,\n                                                3.31070450630076e-01,  3.30936577422197e-01,  3.30720275728215e-01,  3.30390424991592e-01,\n                                                3.29910495011880e-01,  3.29238983058897e-01,  3.28330145013197e-01,  3.27135024558757e-01,\n                                                3.25602770472827e-01,  3.23682214629677e-01,  3.21323663325742e-01,  3.18480833619368e-01,\n                                                3.15112846974333e-01,  3.11186177472219e-01,  3.06676444037059e-01,  3.01569937634142e-01,\n                                                2.95864786103074e-01,  2.89571680327860e-01,  2.82714113363635e-01,  2.75328115338450e-01,\n                                                2.67461497588236e-01,  2.59172646417767e-01,  2.50528928333637e-01,  2.41604784299273e-01,\n                                                2.32479601335712e-01,  2.23235456754765e-01,  2.13954834113725e-01,  2.04718410396541e-01,\n                                                1.95603009970458e-01,  1.86679811366865e-01,  1.78012877253423e-01,  1.69658056562710e-01,\n                                                1.61662282334142e-01,  1.54063262090773e-01,  1.46889532561072e-01,  1.40160830010906e-01,\n                                                1.33888713271542e-01,  1.28077369520952e-01,  1.22724532695631e-01,  1.17822449933417e-01,\n                                                1.13358841042320e-01,  1.09317807896023e-01,  1.05680663267471e-01,  1.02426660652711e-01,\n                                                9.95336172323924e-02,  9.69784307776074e-02,  9.47374978572952e-02,  9.27870452026127e-02,\n                                                9.11033887250774e-02,  8.96631357359148e-02,  8.84433456542517e-02,  8.74216631941138e-02,\n                                                8.65764359306240e-02,  8.58868254935565e-02,  8.53329186330036e-02,  8.48958412565572e-02,\n                                                8.45578754569267e-02,  8.43025767373824e-02,  8.41148862945502e-02,  8.39812315004984e-02,\n                                                8.38896067643304e-02,  8.38296268124914e-02,  8.37925451004260e-02,  8.37712314749410e-02,\n                                                8.37601051982553e-02,  8.37550218202914e-02,  8.37531149198298e-02,  8.37525962013999e-02,\n                                                8.37525196398161e-02,  8.37525120619311e-02,  8.37523543003940e-02,  8.37512854487557e-02,\n                                                8.37473563267110e-02,  8.37368834186378e-02,  8.37139672099809e-02,  8.36700933175969e-02,\n                                                8.35938381362062e-02,  8.34707018948109e-02,  8.32830930278270e-02,  8.30104878611415e-02,\n                                                8.26297878349713e-02,  8.21158917958762e-02,  8.14424923505506e-02,  8.05830922636055e-02,\n                                                7.95122193443270e-02,  7.82067969383746e-02,  7.66476037023551e-02,  7.48207334446285e-02,\n                                                7.27189469154901e-02,  7.03427963756909e-02,  6.77014041996102e-02,  6.48127913324998e-02,\n                                                6.17036810097460e-02,  5.84087462725620e-02,  5.49693223611101e-02,  5.14316605805618e-02,\n                                                4.78448508092733e-02,  4.42585774845519e-02,  4.07208922650604e-02,  3.72761822671883e-02,\n                                                3.39634863585196e-02,  3.08152679174185e-02,  2.78566981543911e-02,  2.51054482940063e-02,\n                                                2.25719398667223e-02,  2.02599661665559e-02,  1.81675776587014e-02,  1.62881196917581e-02,\n                                                1.46113196824480e-02,  1.31243389111475e-02,  1.18127267202475e-02,  1.06612382452020e-02,\n                                                9.65449783032568e-03,  8.77750716682613e-03,  8.01600923276524e-03,  7.35672648059804e-03,\n                                                6.78749514102606e-03,  6.29731797193145e-03,  5.87635626382976e-03,  5.51587926518948e-03,\n                                                5.20818606390350e-03,  4.94651181664807e-03,  4.72492734300900e-03,  4.53823864772218e-03,\n                                                4.38189094517583e-03,  4.25188021173284e-03,  4.14467411909669e-03,  4.05714332831764e-03,\n                                                3.98650347154117e-03,  3.93026764903226e-03,  3.88620887071056e-03,  3.85233153878417e-03,\n                                                3.82685078506739e-03,  3.80817824242285e-03,  3.79491265501741e-03,  3.78583363437812e-03,\n                                                3.77989686384694e-03,  3.77622915328857e-03,  3.77412194870885e-03,  3.77302219374798e-03,\n                                                3.77251979697135e-03,  3.77233134520694e-03,  3.77228008313324e-03,  3.77227251701129e-03,\n                                                3.77227173652628e-03,  3.77225516866631e-03,  3.77214292070605e-03,  3.77173031156985e-03,\n                                                3.77063064856031e-03,  3.76822508496844e-03,  3.76362205679470e-03,  3.75562958612718e-03,\n                                                3.74274441258748e-03,  3.72316255468874e-03,  3.69481625319423e-03,  3.65544197465084e-03,\n                                                3.60268288795851e-03,  3.53422665055092e-03,  3.44797529174556e-03,  3.34223859590566e-03,\n                                                3.21593621738359e-03,  3.06878782589948e-03,  2.90146629973620e-03,  2.71568791533028e-03,\n                                                2.51421691678289e-03,  2.30077031992337e-03,  2.07982168005216e-03,  1.85631789939933e-03,\n                                                1.63533801590532e-03,  1.42173398810286e-03,  1.21979798955252e-03,  1.03299720131034e-03,\n                                                8.63805908952742e-04,  7.13648080882479e-04,  5.82945178869920e-04,  4.71248020229353e-04,\n                                                3.77421827867153e-04,  2.99852020262392e-04,  2.36643793467550e-04,  1.85797544496324e-04,\n                                                1.45350440249103e-04,  1.13479677665396e-04,  8.85660796399179e-05,  6.92200324969861e-05,\n                                                5.42767985329817e-05,  4.27741903230583e-05,  3.39282287065146e-05,  2.71151453574703e-05,\n                                                2.18539078638003e-05,  1.77799551082103e-05,  1.46138232359760e-05,  1.21368442798087e-05,\n                                                1.01779226682197e-05,  8.60634436961050e-06,  7.32596883779024e-06,  6.26842086504098e-06,\n                                                5.38455854126596e-06,  4.63658184202131e-06,  3.99379001692068e-06,  3.43185350715203e-06,\n                                                2.93315498822722e-06,  2.48642814071331e-06,  2.08543856672350e-06,  1.72717859925342e-06,\n                                                1.41013885368579e-06,  1.13305779692041e-06,  8.94278095131540e-07,  6.91590706480838e-07,\n                                                5.22340823039258e-07,  -1.06581410364015e-14, -3.55271367880050e-15, -7.10542735760100e-15,\n                                                -1.06581410364015e-14, -7.10542735760100e-15, -3.55271367880050e-15, -3.55271367880050e-15,\n                                                -3.55271367880050e-15, -7.10542735760100e-15, -3.55271367880050e-15}),\nmadness::CubicInterpolationTable<double>(grid, {3.00000000000000e+01, 2.99999999102686e+01, 2.99999971355974e+01, 2.99999783367504e+01, 2.99999092295864e+01,\n                                                2.99997250105435e+01, 2.99993218277452e+01, 2.99985495927850e+01, 2.99972063829996e+01, 2.99950346297794e+01,\n                                                2.99917192280315e+01, 2.99868876392630e+01, 2.99801120007520e+01, 2.99709132013642e+01, 2.99587668459195e+01,\n                                                2.99431110084079e+01, 2.99233556707561e+01, 2.98988937549631e+01, 2.98691136737443e+01, 2.98334133347473e+01,\n                                                2.97912155188916e+01, 2.97419844974956e+01, 2.96852436436867e+01, 2.96205936297470e+01, 2.95477305969568e+01,\n                                                2.94664634677508e+01, 2.93767293843614e+01, 2.92786061518538e+01, 2.91723205791856e+01, 2.90582517748304e+01,\n                                                2.89369287621554e+01, 2.88090222029424e+01, 2.86753304984858e+01, 2.85367610055863e+01, 2.83943074893331e+01,\n                                                2.82490251815857e+01, 2.81020048959700e+01, 2.79543475699851e+01, 2.78071403925970e+01, 2.76614353794232e+01,\n                                                2.75182309313304e+01, 2.73784566048043e+01, 2.72429610694796e+01, 2.71125030486456e+01, 2.69877449351420e+01,\n                                                2.68692487382024e+01, 2.67574740295566e+01, 2.66527776003250e+01, 2.65554145964740e+01, 2.64655409564316e+01,\n                                                2.63832170212963e+01, 2.63084122217361e+01, 2.62410107653783e+01, 2.61808182555750e+01, 2.61275691692415e+01,\n                                                2.60809351105784e+01, 2.60405337412614e+01, 2.60059382680963e+01, 2.59766873478575e+01, 2.59522952475211e+01,\n                                                2.59322620777894e+01, 2.59160839001393e+01, 2.59032624941104e+01, 2.58933145637136e+01, 2.58857801610719e+01,\n                                                2.58802301128826e+01, 2.58762722517635e+01, 2.58735562802445e+01, 2.58717771297140e+01, 2.58706767189804e+01,\n                                                2.58700440656258e+01, 2.58697137558843e+01, 2.58695628328827e+01, 2.58695062161708e+01, 2.58694908150256e+01,\n                                                2.58694885418479e+01, 2.58694882306819e+01, 2.58694808819947e+01, 2.58694310936042e+01, 2.58692480669129e+01,\n                                                2.58687601903211e+01, 2.58676925115727e+01, 2.58656478833942e+01, 2.58620925842238e+01, 2.58563471511333e+01,\n                                                2.58475830837878e+01, 2.58348259777747e+01, 2.58169655114598e+01, 2.57927725303888e+01, 2.57609232365248e+01,\n                                                2.57200301906096e+01, 2.56686794776188e+01, 2.56054729828785e+01, 2.55290743102962e+01, 2.54382564904721e+01,\n                                                2.53319493340381e+01, 2.52092841467674e+01, 2.50696335873541e+01, 2.49126447306530e+01, 2.47382638554608e+01,\n                                                2.45467519961004e+01, 2.43386907221334e+01, 2.41149777941254e+01, 2.38768122516289e+01, 2.36256683024839e+01,\n                                                2.33632575168533e+01, 2.30914797812973e+01, 2.28123654425921e+01, 2.25280135693877e+01, 2.22405330348249e+01,\n                                                2.19519928353486e+01, 2.16643853524768e+01, 2.13796022945321e+01, 2.10994198042364e+01, 2.08254880869382e+01,\n                                                2.05593218994880e+01, 2.03022902727487e+01, 2.00556057212736e+01, 1.98203142524252e+01, 1.95972876693425e+01,\n                                                1.93872192646337e+01, 1.91906233854291e+01, 1.90078387798501e+01, 1.88390352406389e+01, 1.86842228689180e+01,\n                                                1.85432632549572e+01, 1.84158819562758e+01, 1.83016817905454e+01, 1.82001566081942e+01, 1.81107053391589e+01,\n                                                1.80326462052037e+01, 1.79652310489823e+01, 1.79076597553975e+01, 1.78590947352478e+01, 1.78186754126770e+01,\n                                                1.77855326140396e+01, 1.77588027037586e+01, 1.77376412594603e+01, 1.77212360304423e+01, 1.77088188859689e+01,\n                                                1.76996764377146e+01, 1.76931590174193e+01, 1.76886877085724e+01, 1.76857591701054e+01, 1.76839480492611e+01,\n                                                1.76829068569236e+01, 1.76823632671596e+01, 1.76821148979839e+01, 1.76820217263704e+01, 1.76819963814550e+01,\n                                                1.76819926405994e+01, 1.76819922854891e+01, 1.76819850456330e+01, 1.76819359946049e+01, 1.76817556787697e+01,\n                                                1.76812750301209e+01, 1.76802231786648e+01, 1.76782088965931e+01, 1.76747064790202e+01, 1.76690468109951e+01,\n                                                1.76604143030264e+01, 1.76478502876345e+01, 1.76302633447717e+01, 1.76064468506944e+01, 1.75751038110794e+01,\n                                                1.75348787375229e+01, 1.74843959574774e+01, 1.74223033220954e+01, 1.73473198176529e+01, 1.72582851304727e+01,\n                                                1.71542088105451e+01, 1.70343163820341e+01, 1.68980896197642e+01, 1.67452983060490e+01, 1.65760211447637e+01,\n                                                1.63906541565215e+01, 1.61899057876994e+01, 1.59747790625290e+01, 1.57465422605305e+01, 1.55066906335879e+01,\n                                                1.52569023936058e+01, 1.49989924399259e+01, 1.47348669784729e+01, 1.44664813627786e+01, 1.41958023485949e+01,\n                                                1.39247747889023e+01, 1.36552919212875e+01, 1.33891680597546e+01, 1.31281127807655e+01, 1.28737064601037e+01,\n                                                1.26273779556995e+01, 1.23903859413513e+01, 1.21638055567612e+01, 1.19485215592595e+01, 1.17452282283193e+01,\n                                                1.15544352544574e+01, 1.13764781035801e+01, 1.12115310807896e+01, 1.10596214990935e+01, 1.09206438128354e+01,\n                                                1.07943730946503e+01, 1.06804776670235e+01, 1.05785309805677e+01, 1.04880229657062e+01, 1.04083711119818e+01,\n                                                1.03389314945367e+01, 1.02790099050894e+01, 1.02278731756192e+01, 1.01847607162375e+01, 1.01488962268391e+01,\n                                                1.01194994848009e+01, 1.00957980577884e+01, 1.00770387422996e+01, 1.00624984869165e+01, 1.00514945273262e+01,\n                                                1.00433934413778e+01, 1.00376188297785e+01, 1.00336573436177e+01, 1.00310628144519e+01, 1.00294582952752e+01,\n                                                1.00285358887899e+01, 1.00280543189637e+01, 1.00278342878987e+01, 1.00277517470002e+01, 1.00277292939076e+01,\n                                                1.00277259798794e+01, 1.00277256849545e+01, 1.00277198793234e+01, 1.00276805453686e+01, 1.00275359503392e+01,\n                                                1.00271505188370e+01, 1.00263070406369e+01, 1.00246917909101e+01, 1.00218832082528e+01, 1.00173447317058e+01,\n                                                1.00104223435785e+01, 1.00003472922551e+01, 9.98624436777893e+00, 9.96714596172351e+00, 9.94201195215889e+00,\n                                                9.90975520942329e+00, 9.86927222153409e+00, 9.81947800241573e+00, 9.75934409670905e+00, 9.68793816835468e+00,\n                                                9.60446340102299e+00, 9.50829579209827e+00, 9.39901742357617e+00, 9.27644395599506e+00, 9.14064489698398e+00,\n                                                8.99195559338343e+00, 8.83098031423722e+00, 8.65858616514087e+00, 8.47588787037835e+00, 8.28422369815836e+00,\n                                                8.08512305167246e+00, 7.88026658135949e+00, 7.67144013227369e+00, 7.46048439412463e+00, 7.24924266593974e+00,\n                                                7.03950953767382e+00, 6.83298339612387e+00, 6.63122541324084e+00, 6.43562708890277e+00, 6.24738759402755e+00,\n                                                6.06750123737034e+00, 5.89675451017829e+00, 5.73573146689343e+00, 5.58482574648673e+00, 5.44425734272463e+00,\n                                                5.31409226334470e+00, 5.19426342103077e+00, 5.08459140684654e+00, 4.98480414742633e+00, 4.89455479169057e+00,\n                                                4.81343747824454e+00, 4.74100088334022e+00, 4.67675963594726e+00, 4.62020381400336e+00, 4.57080681186737e+00,\n                                                4.52803190274818e+00, 4.49133782071955e+00, 4.46018366305598e+00, 4.43403337182788e+00, 4.41235999946716e+00,\n                                                4.39464990091103e+00, 4.38040692895482e+00, 4.36915664340915e+00, 4.36045048235797e+00, 4.35386978905908e+00,\n                                                4.34902954445536e+00, 4.34558162603757e+00, 4.34321740124039e+00, 4.34166946876482e+00, 4.34071238384348e+00,\n                                                4.34016224158823e+00, 4.33987504285266e+00, 4.33974382510946e+00, 4.33969460173102e+00, 4.33968121186611e+00,\n                                                4.33967923555327e+00, 4.33967906083708e+00, 4.33967563458121e+00, 4.33965242127246e+00, 4.33956708787593e+00,\n                                                4.33933962945023e+00, 4.33884188831753e+00, 4.33788883101098e+00, 4.33623200857032e+00, 4.33355562503788e+00,\n                                                4.32947563361433e+00, 4.32354225945783e+00, 4.31524629930586e+00, 4.30402945667483e+00, 4.28929882451923e+00,\n                                                4.27044541663466e+00, 4.24686637440567e+00, 4.21799014737875e+00, 4.18330358838517e+00, 4.14237955382903e+00,\n                                                4.09490330583132e+00, 4.04069582966471e+00, 3.97973215942293e+00, 3.91215298629447e+00, 3.83826822231066e+00,\n                                                3.75855179018022e+00, 3.67362765199281e+00, 3.58424788796624e+00, 3.49126438169868e+00, 3.39559624981689e+00,\n                                                3.29819548237187e+00, 3.20001328875885e+00, 3.10196937878236e+00, 3.00492590823630e+00, 2.90966717901728e+00,\n                                                2.81688551559665e+00, 2.72717314230541e+00, 2.64101942916892e+00, 2.55881258903562e+00, 2.48084478994448e+00,\n                                                2.40731966234465e+00, 2.33836128690216e+00, 2.27402390161278e+00, 2.21430173211435e+00, 2.15913850406747e+00,\n                                                2.10843633032943e+00, 2.06206377572858e+00, 2.01986299046014e+00, 1.98165587293355e+00, 1.94724927756364e+00,\n                                                1.91643932491297e+00, 1.88901490235709e+00, 1.86476046419858e+00, 1.84345825189990e+00, 1.82489005888020e+00,\n                                                1.80883866123037e+00, 1.79508902686224e+00, 1.78342940207856e+00, 1.77365235730030e+00, 1.76555585361070e+00,\n                                                1.75894436974876e+00, 1.75363010614285e+00, 1.74943425956766e+00, 1.74618834022991e+00, 1.74373548384255e+00,\n                                                1.74193169586782e+00, 1.74064695481457e+00, 1.73976609721480e+00, 1.73918940919368e+00, 1.73883285835054e+00,\n                                                1.73862791434590e+00, 1.73852092593133e+00, 1.73847204451267e+00, 1.73845370780480e+00, 1.73844871981341e+00,\n                                                1.73844798359769e+00, 1.73844791750625e+00, 1.73844661004436e+00, 1.73843775183279e+00, 1.73840518863601e+00,\n                                                1.73831839114913e+00, 1.73812845747113e+00, 1.73776479029001e+00, 1.73713261567168e+00, 1.73611151255093e+00,\n                                                1.73455512241882e+00, 1.73229220257197e+00, 1.72912916761551e+00, 1.72485422617326e+00, 1.71924315713185e+00,\n                                                1.71206667862729e+00, 1.70309924368389e+00, 1.69212895471600e+00, 1.67896813720850e+00, 1.66346396929807e+00,\n                                                1.64550845179427e+00, 1.62504694679405e+00, 1.60208453341355e+00, 1.57668953861560e+00, 1.54899379891277e+00,\n                                                1.51918947875995e+00, 1.48752258304359e+00, 1.45428361321488e+00, 1.41979608491405e+00, 1.38440380996283e+00,\n                                                1.34845792074246e+00, 1.31230457198985e+00, 1.27627410592805e+00, 1.24067224103309e+00, 1.20577358325095e+00,\n                                                1.17181750359208e+00, 1.13900621300400e+00, 1.10750471589455e+00, 1.07744224362835e+00, 1.04891475136547e+00,\n                                                1.02198809011561e+00, 9.96701522669365e-01, 9.73071320907241e-01, 9.51094250979104e-01, 9.30750814852214e-01,\n                                                9.12008168536648e-01, 8.94822678328026e-01, 8.79142107495905e-01, 8.64907448393282e-01, 8.52054430452391e-01,\n                                                8.40514744321222e-01, 8.30217027657451e-01, 8.21087659824421e-01, 8.13051411757641e-01, 8.06031994270285e-01,\n                                                7.99952543580609e-01, 7.94736077282828e-01, 7.90305947646612e-01, 7.86586312239955e-01, 7.83502634604883e-01,\n                                                7.80982220250348e-01, 7.78954785767034e-01, 7.77353051678030e-01, 7.76113343040443e-01, 7.75176176185081e-01,\n                                                7.74486805721764e-01, 7.73995703419725e-01, 7.73658940086165e-01, 7.73438443265213e-01, 7.73302107438269e-01,\n                                                7.73223739200191e-01, 7.73182827201534e-01, 7.73164134921252e-01, 7.73157122922875e-01, 7.73155215500754e-01,\n                                                7.73154933969657e-01, 7.73154908017517e-01, 7.73154387057350e-01, 7.73150857487810e-01, 7.73137882600615e-01,\n                                                7.73103297726884e-01, 7.73027616739729e-01, 7.72882706036459e-01, 7.72630790935501e-01, 7.72223859399951e-01,\n                                                7.71603527178140e-01, 7.70701425113590e-01, 7.69440161317760e-01, 7.67734895725084e-01, 7.65495540132846e-01,\n                                                7.62629561895999e-01, 7.59045324245815e-01, 7.54655843104828e-01, 7.49382784141751e-01, 7.43160471905334e-01,\n                                                7.35939644109784e-01, 7.27690667666987e-01, 7.18405946315382e-01, 7.08101296340288e-01, 6.96816145162643e-01,\n                                                6.84612509724872e-01, 6.71572824635490e-01, 6.57796797924235e-01, 6.43397559055483e-01, 6.28497416932710e-01,\n                                                6.13223558274299e-01, 5.97703989321008e-01, 5.82063963422723e-01, 5.66423055618827e-01, 5.50892957056877e-01,\n                                                5.35575980502742e-01, 5.20564203717491e-01, 5.05939135997636e-01, 4.91771775711918e-01, 4.78122930080918e-01,\n                                                4.65043686879334e-01, 4.52575954313726e-01, 4.40753013658405e-01, 4.29600054484993e-01, 4.19134681667543e-01,\n                                                4.09367395882875e-01, 4.00302055638836e-01, 3.91936330418954e-01, 3.84262153108210e-01, 3.77266177102609e-01,\n                                                3.70930240653532e-01, 3.65231838815287e-01, 3.60144602153447e-01, 3.55638781083801e-01, 3.51681735075370e-01,\n                                                3.48238426596001e-01, 3.45271920233500e-01, 3.42743887586199e-01, 3.40615118082603e-01, 3.38846034784041e-01,\n                                                3.37397212485250e-01, 3.36229893199626e-01, 3.35306491622639e-01, 3.34591080684437e-01, 3.34049845128234e-01,\n                                                3.33651489466771e-01, 3.33367585915397e-01, 3.33172848142212e-01, 3.33045317988596e-01, 3.32966454667996e-01,\n                                                3.32921119217009e-01, 3.32897450933007e-01, 3.32886636905673e-01, 3.32882580224183e-01, 3.32881476711623e-01,\n                                                3.32881313835596e-01, 3.32881298313673e-01, 3.32880981221386e-01, 3.32878832879242e-01, 3.32870935417994e-01,\n                                                3.32849884236889e-01, 3.32803817037757e-01, 3.32715603552320e-01, 3.32562233073581e-01, 3.32314435544404e-01,\n                                                3.31936570099998e-01, 3.31386811931520e-01, 3.30617663275174e-01, 3.29576806316968e-01, 3.28208304045646e-01,\n                                                3.26454139136590e-01, 3.24256060943831e-01, 3.21557687529761e-01, 3.18306785174983e-01, 3.14457624592709e-01,\n                                                3.09973294255489e-01, 3.04827839963586e-01, 2.99008098544171e-01, 2.92515103613074e-01, 2.85364962266858e-01,\n                                                2.77589131399910e-01, 2.69234057910893e-01, 2.60360184848395e-01, 2.51040362429983e-01, 2.41357736628490e-01,\n                                                2.31403217321262e-01, 2.21272651965599e-01, 2.11063848389109e-01, 2.00873600079209e-01, 1.90794867491633e-01,\n                                                1.80914257825108e-01, 1.71309923004568e-01, 1.62049962614866e-01, 1.53191378456956e-01, 1.44779584880247e-01,\n                                                1.36848439161128e-01, 1.29420723438962e-01, 1.22508987141597e-01, 1.16116647645772e-01, 1.10239246546957e-01,\n                                                1.04865767421987e-01, 9.99799356586983e-02, 9.55614389463477e-02, 9.15870258242784e-02, 8.80314573163723e-02,\n                                                8.48683018604248e-02, 8.20705758340239e-02, 7.96112408529090e-02, 7.74635748955745e-02, 7.56014376084657e-02,\n                                                7.39994513636510e-02, 7.26331192559968e-02, 7.14788996601747e-02, 7.05142545613384e-02, 6.97176858957000e-02,\n                                                6.90687708021223e-02, 6.85482031720319e-02, 6.81378453593382e-02, 6.78207905401678e-02, 6.75814331657705e-02,\n                                                6.74055424018185e-02, 6.72803315488437e-02, 6.71945153157800e-02, 6.71383465392452e-02, 6.71036245057230e-02,\n                                                6.70836683660241e-02, 6.70732510816450e-02, 6.70684917080315e-02, 6.70667063624784e-02, 6.70662207108457e-02,\n                                                6.70661490298841e-02, 6.70661419350722e-02, 6.70659942305001e-02, 6.70649935171639e-02, 6.70613148920189e-02,\n                                                6.70515098185902e-02, 6.70300556666383e-02, 6.69889837672955e-02, 6.69176074629263e-02, 6.68023733648369e-02,\n                                                6.66268606246163e-02, 6.63719535972369e-02, 6.60162117070975e-02, 6.55364554044340e-02, 6.49085777136200e-02,\n                                                6.41085763054257e-02, 6.31137812438247e-02, 6.19042295165251e-02, 6.04641112897362e-02, 5.87831878598060e-02,\n                                                5.68580617815186e-02, 5.46931702939304e-02, 5.23013781321922e-02, 4.97040678035283e-02, 4.69306646237015e-02,\n                                                4.40175872898472e-02, 4.10066762839456e-02, 3.79432131805260e-02, 3.48736941308623e-02, 3.18435515300663e-02,\n                                                2.88950232833365e-02, 2.60653478557131e-02, 2.33854191072425e-02, 2.08789757016632e-02, 1.85623359453153e-02,\n                                                1.64446306195210e-02, 1.45284419191469e-02, 1.28107306093845e-02, 1.12839265725277e-02, 9.93706725747856e-03,\n                                                8.75688926869955e-03, 7.72880487495087e-03, 6.83772255579029e-03, 6.06869508009211e-03, 5.40739779501820e-03,\n                                                4.84045299039693e-03, 4.35562370942932e-03, 3.94190322311871e-03, 3.58952587681927e-03, 3.28992240655879e-03,\n                                                3.03563912965643e-03, 2.82023639135076e-03, 2.63817780863462e-03, 2.48471850739662e-03, 2.35579783988626e-03,\n                                                2.24794000047623e-03, 2.15816444818984e-03, 2.08390698438521e-03, 2.02295161622601e-03, 1.97337287203680e-03,\n                                                1.93348794784143e-03, 1.90181789213639e-03, 1.87705692718509e-03, 1.85804892633001e-03, 1.84376999840552e-03,\n                                                1.83331607091120e-03, 1.82589431917179e-03, 1.82081727366423e-03, 1.81749846456469e-03, 1.81544854252991e-03,\n                                                1.81427095014186e-03, 1.81365640440134e-03, 1.81337567355655e-03, 1.81327037146062e-03, 1.81324172765329e-03,\n                                                1.81323749992401e-03, 1.81323706382130e-03, 1.81322780655080e-03, 1.81316508829710e-03, 1.81293454663489e-03,\n                                                1.81232013982680e-03, 1.81097619820036e-03, 1.80840496491541e-03, 1.80394161807840e-03, 1.79674922565809e-03,\n                                                1.78582651800596e-03, 1.77003159402034e-03, 1.74812447658113e-03, 1.71883054808930e-03, 1.68092511131945e-03,\n                                                1.63333653814135e-03, 1.57526181305201e-03, 1.50628418621324e-03, 1.42647889915537e-03, 1.33649058495067e-03,\n                                                1.23756608172698e-03, 1.13152986065046e-03, 1.02069621687662e-03, 9.07722001489475e-04, 7.95414192872101e-04,\n                                                6.86515581254099e-04, 5.83496873819200e-04, 4.88383070724296e-04, 4.02635916504579e-04, 3.27104040398041e-04,\n                                                2.62040581382905e-04, 2.07177401485126e-04, 1.61837610420434e-04, 1.25065193611107e-04, 9.57520386144495e-05,\n                                                7.27475640935893e-05, 5.49427208369480e-05, 4.13264019094584e-05, 3.10168072132910e-05, 2.32726441957709e-05,\n                                                1.74896903857302e-05, 1.31878539946229e-05, 9.99297914816566e-06, 7.61680401240028e-06, 5.83776877860487e-06,\n                                                4.48467155322874e-06, 3.42520131013657e-06, 2.56093328587781e-06, 1.82638236267962e-06, 1.18547130512070e-06,\n                                                6.18478132707878e-07, 7.10542735760100e-15, 3.79942573403014e-07, 4.32931621219268e-07, 3.81272137417454e-07,\n                                                7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 1.06581410364015e-14,\n                                                7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 3.55271367880050e-15, 7.10542735760100e-15,\n                                                3.55271367880050e-15, 7.10542735760100e-15, 3.55271367880050e-15, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                1.06581410364015e-14, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                1.06581410364015e-14}),\nmadness::CubicInterpolationTable<double>(grid, {3.10000000000000e+01, 3.09999999058459e+01, 3.09999969944138e+01, 3.09999772689897e+01, 3.09999047555954e+01,\n                                                3.09997114565259e+01, 3.09992884009557e+01, 3.09984781020680e+01, 3.09970686825645e+01, 3.09947898733467e+01,\n                                                3.09913110266557e+01, 3.09862412192405e+01, 3.09791314584304e+01, 3.09694789501376e+01, 3.09567333483642e+01,\n                                                3.09403048847445e+01, 3.09195742749163e+01, 3.08939043122911e+01, 3.08626530795654e+01, 3.08251887189774e+01,\n                                                3.07809056851076e+01, 3.07292423404591e+01, 3.06696996314618e+01, 3.06018604001470e+01, 3.05254086602900e+01,\n                                                3.04401479299450e+01, 3.03460175128411e+01, 3.02431055123076e+01, 3.01316573893160e+01, 3.00120790666328e+01,\n                                                2.98849339296395e+01, 2.97509335437302e+01, 2.96109224335237e+01, 2.94658577711917e+01, 2.93167852236438e+01,\n                                                2.91648124541175e+01, 2.90110818366450e+01, 2.88567438297164e+01, 2.87029322052528e+01, 2.85507419959591e+01,\n                                                2.84012106681826e+01, 2.82553027009731e+01, 2.81138974916272e+01, 2.79777803310623e+01, 2.78476360987105e+01,\n                                                2.77240453030908e+01, 2.76074821206784e+01, 2.74983141405997e+01, 2.73968035872790e+01, 2.73031098536961e+01,\n                                                2.72172932262100e+01, 2.71393197146120e+01, 2.70690669183553e+01, 2.70063308639481e+01, 2.69508337422559e+01,\n                                                2.69022324608879e+01, 2.68601279084324e+01, 2.68240748060448e+01, 2.67935919993487e+01, 2.67681730211488e+01,\n                                                2.67472967344046e+01, 2.67304378466811e+01, 2.67170770733796e+01, 2.67067107190056e+01, 2.66988594450094e+01,\n                                                2.66930760005494e+01, 2.66889517096960e+01, 2.66861215353582e+01, 2.66842675761991e+01, 2.66831208969306e+01,\n                                                2.66824616429481e+01, 2.66821174450450e+01, 2.66819601763736e+01, 2.66819011791731e+01, 2.66818851304765e+01,\n                                                2.66818827617216e+01, 2.66818824374724e+01, 2.66818747798048e+01, 2.66818228980294e+01, 2.66816321758745e+01,\n                                                2.66811237863167e+01, 2.66800112170390e+01, 2.66778806242360e+01, 2.66741758509646e+01, 2.66681888792060e+01,\n                                                2.66590564036226e+01, 2.66457631105008e+01, 2.66271521055349e+01, 2.66019427459883e+01, 2.65687558852710e+01,\n                                                2.65261462253513e+01, 2.64726410982633e+01, 2.64067845790352e+01, 2.63271854014000e+01, 2.62325667536440e+01,\n                                                2.61218157359450e+01, 2.59940301248520e+01, 2.58485601604369e+01, 2.56850433517626e+01, 2.55034307295134e+01,\n                                                2.53040034379331e+01, 2.50873788936001e+01, 2.48545058308164e+01, 2.46066474423907e+01, 2.43453517962593e+01,\n                                                2.40724092590033e+01, 2.37897982283596e+01, 2.34996229931431e+01, 2.32040500652557e+01, 2.29052503383378e+01,\n                                                2.26053528275537e+01, 2.23064119349337e+01, 2.20103860376453e+01, 2.17191227565840e+01, 2.14343463330779e+01,\n                                                2.11576444105731e+01, 2.08904538000744e+01, 2.06340464261533e+01, 2.03895172419121e+01, 2.01577756613695e+01,\n                                                1.99395413937532e+01, 1.97353448396515e+01, 1.95455316421442e+01, 1.93702706549880e+01, 1.92095644795987e+01,\n                                                1.90632617735791e+01, 1.89310706771996e+01, 1.88125728818046e+01, 1.87072380341712e+01, 1.86144383092988e+01,\n                                                1.85334630807395e+01, 1.84635336716531e+01, 1.84038181860602e+01, 1.83534464056617e+01, 1.83115247012608e+01,\n                                                1.82771508572583e+01, 1.82494286503552e+01, 1.82274819663032e+01, 1.82104681875006e+01, 1.81975905449048e+01,\n                                                1.81881091047498e+01, 1.81813500573815e+01, 1.81767129941941e+01, 1.81736758995230e+01, 1.81717976459621e+01,\n                                                1.81707178607083e+01, 1.81701541224653e+01, 1.81698965473975e+01, 1.81697999223546e+01, 1.81697736380244e+01,\n                                                1.81697697585132e+01, 1.81697693902407e+01, 1.81697618820378e+01, 1.81697110129241e+01, 1.81695240136610e+01,\n                                                1.81690255498090e+01, 1.81679347120523e+01, 1.81658457735805e+01, 1.81622135498788e+01, 1.81563441395494e+01,\n                                                1.81473917551563e+01, 1.81343622601312e+01, 1.81161238980967e+01, 1.80914255201168e+01, 1.80589223706671e+01,\n                                                1.80172091767529e+01, 1.79648598970728e+01, 1.79004730412348e+01, 1.78227209880312e+01, 1.77304012561184e+01,\n                                                1.76224872625819e+01, 1.74981758067385e+01, 1.73569284035072e+01, 1.71985037226197e+01, 1.70229788091575e+01,\n                                                1.68307574777369e+01, 1.66225652502262e+01, 1.63994313498343e+01, 1.61626594183529e+01, 1.59137895923006e+01,\n                                                1.56545551592864e+01, 1.53868370729821e+01, 1.51126190993167e+01, 1.48339454111214e+01, 1.45528812995993e+01,\n                                                1.42714766709086e+01, 1.39917314707870e+01, 1.37155623166885e+01, 1.34447703642225e+01, 1.31810114795172e+01,\n                                                1.29257706499385e+01, 1.26803427967830e+01, 1.24458215737554e+01, 1.22230965400846e+01, 1.20128577637170e+01,\n                                                1.18156059379836e+01, 1.16316657586763e+01, 1.14612005713982e+01, 1.13042269120680e+01, 1.11606282372647e+01,\n                                                1.10301676759072e+01, 1.09124999563902e+01, 1.08071827954973e+01, 1.07136880406261e+01, 1.06314127989994e+01,\n                                                1.05596907113809e+01, 1.04978034563854e+01, 1.04449925116489e+01, 1.04004711480689e+01, 1.03634365883285e+01,\n                                                1.03330822170594e+01, 1.03086096856487e+01, 1.02892407108046e+01, 1.02742283255483e+01, 1.02628673084893e+01,\n                                                1.02545034965505e+01, 1.02485416816758e+01, 1.02444518062160e+01, 1.02417732057352e+01, 1.02401167011095e+01,\n                                                1.02391644113896e+01, 1.02386672407616e+01, 1.02384400817761e+01, 1.02383548669834e+01, 1.02383316865300e+01,\n                                                1.02383282651449e+01, 1.02383279606661e+01, 1.02383219669636e+01, 1.02382813588007e+01, 1.02381320796972e+01,\n                                                1.02377341625510e+01, 1.02368633617434e+01, 1.02351957933126e+01, 1.02322962510450e+01, 1.02276108216187e+01,\n                                                1.02204643669410e+01, 1.02100633681516e+01, 1.01955045226398e+01, 1.01757893414395e+01, 1.01498447999181e+01,\n                                                1.01165498448122e+01, 1.00747672582027e+01, 1.00233800370794e+01, 9.96133109049025e+00, 9.88766472036362e+00,\n                                                9.80156807902161e+00, 9.70241062748047e+00, 9.58977958453792e+00, 9.46350946771993e+00, 9.32370406794359e+00,\n                                                9.17074953200257e+00, 9.00531760307694e+00, 8.82835845287075e+00, 8.64108292250426e+00, 8.44493439945580e+00,\n                                                8.24155103838043e+00, 8.03271961248888e+00, 7.82032293816438e+00, 7.60628346402265e+00, 7.39250612466742e+00,\n                                                7.18082379130005e+00, 6.97294851228084e+00, 6.77043121238420e+00, 6.57463168271916e+00, 6.38669968302984e+00,\n                                                6.20756695984994e+00, 6.03794910776722e+00, 5.87835557022216e+00, 5.72910573419091e+00, 5.59034900716660e+00,\n                                                5.46208692218576e+00, 5.34419562431320e+00, 5.23644747541115e+00, 5.13853090987367e+00, 5.05006803679208e+00,\n                                                4.97062978697283e+00, 4.89974863566154e+00, 4.83692909469275e+00, 4.78165626908596e+00, 4.73340282400386e+00,\n                                                4.69163472003853e+00, 4.65581605832623e+00, 4.62541334041712e+00, 4.59989939759476e+00, 4.57875718530260e+00,\n                                                4.56148357427119e+00, 4.54759320407264e+00, 4.53662240024343e+00, 4.52813309598452e+00, 4.52171664706392e+00,\n                                                4.51699738716921e+00, 4.51363574349496e+00, 4.51133072098340e+00, 4.50982156943501e+00, 4.50888847034961e+00,\n                                                4.50835211803492e+00, 4.50807211902552e+00, 4.50794419092725e+00, 4.50789620161314e+00, 4.50788314744411e+00,\n                                                4.50788122067931e+00, 4.50788105034340e+00, 4.50787770998706e+00, 4.50785507866022e+00, 4.50777188469052e+00,\n                                                4.50755012918931e+00, 4.50706486875672e+00, 4.50613571343802e+00, 4.50452045658113e+00, 4.50191125347972e+00,\n                                                4.49793376128558e+00, 4.49214963312402e+00, 4.48406271124190e+00, 4.47312917286360e+00, 4.45877173521939e+00,\n                                                4.44039781463632e+00, 4.41742125857502e+00, 4.38928694050111e+00, 4.35549715068701e+00, 4.31563837063068e+00,\n                                                4.26940673531531e+00, 4.21663032197441e+00, 4.15728640847399e+00, 4.09151205569168e+00, 4.01960679636734e+00,\n                                                3.94202683235176e+00, 3.85937088945424e+00, 3.77235865852462e+00, 3.68180345026202e+00, 3.58858120166802e+00,\n                                                3.49359821491819e+00, 3.39775995330029e+00, 3.30194288808629e+00, 3.20697085869404e+00, 3.11359678088978e+00,\n                                                3.02248992355022e+00, 2.93422846305720e+00, 2.84929666846014e+00, 2.76808588156562e+00, 2.69089841123752e+00,\n                                                2.61795351752809e+00, 2.54939477179165e+00, 2.48529820498745e+00, 2.42568077389142e+00, 2.37050877445757e+00,\n                                                2.31970591399028e+00, 2.27316082462094e+00, 2.23073386520132e+00, 2.19226311982126e+00, 2.15756955839369e+00,\n                                                2.12646137586101e+00, 2.09873756885706e+00, 2.07419084015051e+00, 2.05260994121945e+00, 2.03378157243003e+00,\n                                                2.01749195993816e+00, 2.00352822042030e+00, 1.99167961089277e+00, 1.98173874282292e+00, 1.97350281882719e+00,\n                                                1.96677492764791e+00, 1.96136540985462e+00, 1.95709328388947e+00, 1.95378770080571e+00, 1.95128937754140e+00,\n                                                1.94945194405617e+00, 1.94814313025399e+00, 1.94724571518433e+00, 1.94665816401159e+00, 1.94629488759533e+00,\n                                                1.94608607458258e+00, 1.94597706548017e+00, 1.94592726062886e+00, 1.94590857748303e+00, 1.94590349524961e+00,\n                                                1.94590274512389e+00, 1.94590267778370e+00, 1.94590134561863e+00, 1.94589232003753e+00, 1.94585914154529e+00,\n                                                1.94577070369684e+00, 1.94557717906313e+00, 1.94520663069330e+00, 1.94456247686830e+00, 1.94352197791175e+00,\n                                                1.94193591288564e+00, 1.93962960662889e+00, 1.93640544801730e+00, 1.93204700226431e+00, 1.92632475794113e+00,\n                                                1.91900345969833e+00, 1.90985086070925e+00, 1.89864759019369e+00, 1.88519768280908e+00, 1.86933917616206e+00,\n                                                1.85095407276813e+00, 1.82997690752072e+00, 1.80640118213259e+00, 1.78028303688491e+00, 1.75174172730286e+00,\n                                                1.72095674334013e+00, 1.68816172007614e+00, 1.65363559891773e+00, 1.61769175958130e+00, 1.58066601365608e+00,\n                                                1.54290440327205e+00, 1.50475167848836e+00, 1.46654115380132e+00, 1.42858640641821e+00, 1.39117502449467e+00,\n                                                1.35456438662530e+00, 1.31897928466978e+00, 1.28461110181544e+00, 1.25161822088393e+00, 1.22012734784085e+00,\n                                                1.19023547270440e+00, 1.16201223780665e+00, 1.13550253052174e+00, 1.11072915874795e+00, 1.08769550138834e+00,\n                                                1.06638805378540e+00, 1.04677881112019e+00, 1.02882745250455e+00, 1.01248330562953e+00, 9.97687086638031e-01,\n                                                9.84372422334332e-01, 9.72467171810312e-01, 9.61894571984271e-01, 9.52574236432739e-01, 9.44423039359016e-01,\n                                                9.37355916758804e-01, 9.31286615023314e-01, 9.26128413593723e-01, 9.21794843096080e-01, 9.18200413921458e-01,\n                                                9.15261362796784e-01, 9.12896416907717e-01, 9.11027567045362e-01, 9.09580833576655e-01, 9.08487002344906e-01,\n                                                9.07682302445629e-01, 9.07108994684087e-01, 9.06715838769422e-01, 9.06458409117072e-01, 9.06299233476471e-01,\n                                                9.06207735197224e-01, 9.06159968303328e-01, 9.06138144003535e-01, 9.06129957082783e-01, 9.06127730053878e-01,\n                                                9.06127401349512e-01, 9.06127371048839e-01, 9.06126762796699e-01, 9.06122641812139e-01, 9.06107492834881e-01,\n                                                9.06067112743624e-01, 9.05978749614558e-01, 9.05809553201042e-01, 9.05515411652857e-01, 9.05040248726895e-01,\n                                                9.04315854269704e-01, 9.03262316562110e-01, 9.01789115887798e-01, 8.99796921913463e-01, 8.97180110927497e-01,\n                                                8.93829981328928e-01, 8.89638597177175e-01, 8.84503132416107e-01, 8.78330527366170e-01, 8.71042211431231e-01,\n                                                8.62578600615102e-01, 8.52903054722336e-01, 8.42004984957462e-01, 8.29901842590949e-01, 8.16639792987232e-01,\n                                                8.02292980416311e-01, 7.86961406270102e-01, 7.70767561656001e-01, 7.53852059099501e-01, 7.36368583656297e-01,\n                                                7.18478522196456e-01, 7.00345628233961e-01, 6.82131041991624e-01, 6.63988920096276e-01, 6.46062848085791e-01,\n                                                6.28483124014970e-01, 6.11364923442721e-01, 5.94807292395107e-01, 5.78892869269588e-01, 5.63688209467227e-01,\n                                                5.49244575752002e-01, 5.35599059531108e-01, 5.22775909644196e-01, 5.10787962348132e-01, 4.99638086115556e-01,\n                                                4.89320575449160e-01, 4.79822447591733e-01, 4.71124613734702e-01, 4.63202911451933e-01, 4.56028997294869e-01,\n                                                4.49571107729518e-01, 4.43794703033831e-01, 4.38663012706986e-01, 4.34137502756091e-01, 4.30178285324800e-01,\n                                                4.26744489897100e-01, 4.23794613076723e-01, 4.21286860976370e-01, 4.19179494763796e-01, 4.17431186074229e-01,\n                                                4.16001384966609e-01, 4.14850699031668e-01, 4.13941278328217e-01, 4.13237197230902e-01, 4.12704821235458e-01,\n                                                4.12313144508310e-01, 4.12034082686343e-01, 4.11842705279042e-01, 4.11717393072578e-01, 4.11639908157465e-01,\n                                                4.11595367466866e-01, 4.11572114790449e-01, 4.11561490810836e-01, 4.11557505447590e-01, 4.11556421337664e-01,\n                                                4.11556261325508e-01, 4.11556246076515e-01, 4.11555934559765e-01, 4.11553823994915e-01, 4.11546065439108e-01,\n                                                4.11525384775434e-01, 4.11480129695491e-01, 4.11393476305946e-01, 4.11242833823291e-01, 4.10999485603110e-01,\n                                                4.10628504053779e-01, 4.10088974835634e-01, 4.09334560900142e-01, 4.08314428024063e-01, 4.06974539338329e-01,\n                                                4.05259306213249e-01, 4.03113556864643e-01, 4.00484753501356e-01, 3.97325356452360e-01, 3.93595203561485e-01,\n                                                3.89263750261936e-01, 3.84312005394548e-01, 3.78734004401544e-01, 3.72537687361508e-01, 3.65745093756175e-01,\n                                                3.58391844715150e-01, 3.50525949425172e-01, 3.42206036006328e-01, 3.33499158740008e-01, 3.24478365092776e-01,\n                                                3.15220213014566e-01, 3.05802411529108e-01, 2.96301720243701e-01, 2.86792194105093e-01, 2.77343808080921e-01,\n                                                2.68021451333830e-01, 2.58884248154590e-01, 2.49985146024390e-01, 2.41370708591827e-01, 2.33081059268606e-01,\n                                                2.25149934540095e-01, 2.17604820208610e-01, 2.10467155234987e-01, 2.03752594980699e-01, 1.97471328451659e-01,\n                                                1.91628443663873e-01, 1.86224333012476e-01, 1.81255127986130e-01, 1.76713150795539e-01, 1.72587370039164e-01,\n                                                1.68863848509318e-01, 1.65526173407670e-01, 1.62555862169388e-01, 1.59932740311035e-01, 1.57635290782778e-01,\n                                                1.55640976874842e-01, 1.53926542570098e-01, 1.52468295228839e-01, 1.51242375618473e-01, 1.50225019621473e-01,\n                                                1.49392814598336e-01, 1.48722951525798e-01, 1.48193471886469e-01, 1.47783506084565e-01, 1.47473498136058e-01,\n                                                1.47245409744439e-01, 1.47082895805262e-01, 1.46971443009356e-01, 1.46898463596621e-01, 1.46853337436490e-01,\n                                                1.46827397393476e-01, 1.46813855228789e-01, 1.46807667901800e-01, 1.46805346854176e-01, 1.46804715475998e-01,\n                                                1.46804622286012e-01, 1.46804613062290e-01, 1.46804421036450e-01, 1.46803120037628e-01, 1.46798337495234e-01,\n                                                1.46785589507139e-01, 1.46757693455182e-01, 1.46704279171878e-01, 1.46611422552070e-01, 1.46461425491566e-01,\n                                                1.46232765771753e-01, 1.45900239418619e-01, 1.45435315415583e-01, 1.44806717662121e-01, 1.43981241054547e-01,\n                                                1.42924797091993e-01, 1.41603669494188e-01, 1.39985942566764e-01, 1.38043045761481e-01, 1.35751339006227e-01,\n                                                1.33093647360841e-01, 1.30060642990234e-01, 1.26651969675471e-01, 1.22877011749402e-01, 1.18755226047799e-01,\n                                                1.14315981600480e-01, 1.09597885555651e-01, 1.04647612433766e-01, 9.95182936965833e-02, 9.42675617828002e-02,\n                                                8.89553730703270e-02, 8.36417538613965e-02, 7.83846195347699e-02, 7.32378081002594e-02, 6.82494462131302e-02,\n                                                6.34607311450068e-02, 5.89051709644863e-02, 5.46082829016221e-02, 5.05877120340941e-02, 4.68537033165646e-02,\n                                                4.34098419821893e-02, 4.02539708428300e-02, 3.73791966194119e-02, 3.47749086111406e-02, 3.24277487586144e-02,\n                                                3.03224896102030e-02, 2.84427935499849e-02, 2.67718413162754e-02, 2.52928294966566e-02, 2.39893451037680e-02,\n                                                2.28456307334213e-02, 2.18467566574354e-02, 2.09787170954208e-02, 2.02284674240047e-02, 1.95839177244856e-02,\n                                                1.90338962374916e-02, 1.85680942661897e-02, 1.81770020287715e-02, 1.78518430055412e-02, 1.75845124991660e-02,\n                                                1.73675244372049e-02, 1.71939688872058e-02, 1.70574813222153e-02, 1.69522233736714e-02, 1.68728736627557e-02,\n                                                1.68146263463917e-02, 1.67731942956557e-02, 1.67448133853547e-02, 1.67262442448113e-02, 1.67147680088782e-02,\n                                                1.67081730947274e-02, 1.67047307620081e-02, 1.67031581159520e-02, 1.67025681919242e-02, 1.67024077210982e-02,\n                                                1.67023840360407e-02, 1.67023815928431e-02, 1.67023297293980e-02, 1.67019783506426e-02, 1.67006867007125e-02,\n                                                1.66972440628328e-02, 1.66897120984366e-02, 1.66752957761851e-02, 1.66502515962250e-02, 1.66098430655630e-02,\n                                                1.65483545730858e-02, 1.64591754454761e-02, 1.63349653912555e-02, 1.61679100501537e-02, 1.59500703199384e-02,\n                                                1.56738211478427e-02, 1.53323646347943e-02, 1.49202893715028e-02, 1.44341344683916e-02, 1.38729050894533e-02,\n                                                1.32384792760263e-02, 1.25358462386806e-02, 1.17731261094178e-02, 1.09613408312761e-02, 1.01139337385376e-02,\n                                                9.24606756776924e-03, 8.37376164476566e-03, 7.51295290348608e-03, 6.67857735000155e-03, 5.88376600974172e-03,\n                                                5.13923257053506e-03, 4.45290182105396e-03, 3.82979356905011e-03, 3.27214221038830e-03, 2.77970399751482e-03,\n                                                2.35018773603457e-03, 1.97974260026967e-03, 1.66344703524146e-03, 1.39575924988833e-03, 1.17090543687937e-03,\n                                                9.83192435086266e-04, 8.27238050444379e-04, 6.98118678315041e-04, 5.91442583552038e-04, 5.03366043396625e-04,\n                                                4.30573797213896e-04, 3.70242333410431e-04, 3.19996873365369e-04, 2.77865772073227e-04, 2.42233072917486e-04,\n                                                2.11790635844977e-04, 1.85492571414869e-04, 1.62514415546156e-04, 1.42217721464277e-04, 1.24119067297812e-04,\n                                                1.07861988471569e-04, 9.31909536383557e-05, 7.99274161948915e-05, 6.79485209573727e-05, 5.71690622983567e-05,\n                                                4.75269777986398e-05, 3.89722917297775e-05, 3.14591541048515e-05, 2.49404865186875e-05, 1.93647134416608e-05,\n                                                1.46740860031969e-05, 1.08041664077518e-05, 7.68411834783933e-06, 5.23753138992333e-06, 3.38358647766768e-06,\n                                                2.03843962864880e-06, 1.11675866776295e-06, 5.33396054436253e-07, 1.06581410364015e-14, 1.42108547152020e-14,\n                                                1.06581410364015e-14}),\nmadness::CubicInterpolationTable<double>(grid, {3.20000000000000e+01, 3.19999999013582e+01, 3.19999968511568e+01, 3.19999761855479e+01, 3.19999002158994e+01,\n                                                3.19996977034515e+01, 3.19992544832409e+01, 3.19984055613417e+01, 3.19969289594911e+01, 3.19945415212429e+01,\n                                                3.19908968271675e+01, 3.19855852977985e+01, 3.19781364976202e+01, 3.19680235976401e+01, 3.19546699139293e+01,\n                                                3.19374574191871e+01, 3.19157371247117e+01, 3.18888412467946e+01, 3.18560970938927e+01, 3.18168426222667e+01,\n                                                3.17704435875018e+01, 3.17163121473472e+01, 3.16539266342039e+01, 3.15828520133131e+01, 3.15027602936242e+01,\n                                                3.14134499004713e+01, 3.13148628058727e+01, 3.12070981019663e+01, 3.10904207453441e+01, 3.09652644209396e+01,\n                                                3.08322278658485e+01, 3.06920645117903e+01, 3.05456658761539e+01, 3.03940396678373e+01, 3.02382839926724e+01,\n                                                3.00795592847368e+01, 2.99190596300007e+01, 2.97579850009973e+01, 2.95975156302170e+01, 2.94387893786570e+01,\n                                                2.92828825704178e+01, 2.91307944201679e+01, 2.89834349146326e+01, 2.88416158374365e+01, 2.87060445449737e+01,\n                                                2.85773200924739e+01, 2.84559313505325e+01, 2.83422568191712e+01, 2.82365659190664e+01, 2.81390216040447e+01,\n                                                2.80496841877889e+01, 2.79685163085725e+01, 2.78953889700093e+01, 2.78300885963203e+01, 2.77723250310966e+01,\n                                                2.77217403922234e+01, 2.76779186751317e+01, 2.76403959737604e+01, 2.76086711649855e+01, 2.75822168790233e+01,\n                                                2.75604905566573e+01, 2.75429453754308e+01, 2.75290408126843e+01, 2.75182526050871e+01, 2.75100818636314e+01,\n                                                2.75040631112046e+01, 2.74997710277020e+01, 2.74968257154599e+01, 2.74948963352051e+01, 2.74937030086206e+01,\n                                                2.74930169362503e+01, 2.74926587364960e+01, 2.74924950702093e+01, 2.74924336730337e+01, 2.74924169714849e+01,\n                                                2.74924145063703e+01, 2.74924141689309e+01, 2.74924061997535e+01, 2.74923522074569e+01, 2.74921537268444e+01,\n                                                2.74916246564067e+01, 2.74904668291505e+01, 2.74882495681148e+01, 2.74843940974819e+01, 2.74781636108104e+01,\n                                                2.74686597138283e+01, 2.74548258507617e+01, 2.74354581777321e+01, 2.74092241507476e+01, 2.73746888377132e+01,\n                                                2.73303486379097e+01, 2.72746717027529e+01, 2.72061439165779e+01, 2.71233188506627e+01, 2.70248696991602e+01,\n                                                2.69096409046445e+01, 2.67766970448338e+01, 2.66253666205701e+01, 2.64552786524244e+01, 2.62663903890706e+01,\n                                                2.60590048238643e+01, 2.58337769604275e+01, 2.55917077962749e+01, 2.53341249364920e+01, 2.50626489982504e+01,\n                                                2.47791460518778e+01, 2.44856685504704e+01, 2.41843900655859e+01, 2.38775413103976e+01, 2.35673548070772e+01,\n                                                2.32560226053878e+01, 2.29456669472229e+01, 2.26383200258729e+01, 2.23359077171595e+01, 2.20402333872278e+01,\n                                                2.17529603253026e+01, 2.14755935576416e+01, 2.12094629713032e+01, 2.09557097676294e+01, 2.07152776578074e+01,\n                                                2.04889093613426e+01, 2.02771482030802e+01, 2.00803440863720e+01, 1.98986628762520e+01, 1.97320982074688e+01,\n                                                1.95804848598554e+01, 1.94435130420246e+01, 1.93207431351788e+01, 1.92116206343271e+01, 1.91154911654271e+01,\n                                                1.90316155485836e+01, 1.89591849226348e+01, 1.88973359527522e+01, 1.88451661191323e+01, 1.88017490404413e+01,\n                                                1.87661497286459e+01, 1.87374396096388e+01, 1.87147110832606e+01, 1.86970913429383e+01, 1.86837551344953e+01,\n                                                1.86739361102412e+01, 1.86669364316275e+01, 1.86621342935399e+01, 1.86589890860123e+01, 1.86570439732591e+01,\n                                                1.86559257521066e+01, 1.86553419472946e+01, 1.86550752037448e+01, 1.86549751393038e+01, 1.86549479193754e+01,\n                                                1.86549439017719e+01, 1.86549435203906e+01, 1.86549357449312e+01, 1.86548830651180e+01, 1.86546894095757e+01,\n                                                1.86541732028635e+01, 1.86530435369969e+01, 1.86508802445827e+01, 1.86471187391712e+01, 1.86410404299500e+01,\n                                                1.86317694459782e+01, 1.86182763088750e+01, 1.85993890581001e+01, 1.85738121444908e+01, 1.85401531521529e+01,\n                                                1.84969570779432e+01, 1.84427474923025e+01, 1.83760734379164e+01, 1.82955604210197e+01, 1.81999633569760e+01,\n                                                1.80882189040401e+01, 1.79594943239718e+01, 1.78132299152569e+01, 1.76491722359563e+01, 1.74673958083459e+01,\n                                                1.72683117775076e+01, 1.70526630273694e+01, 1.68215064230020e+01, 1.65761839709085e+01, 1.63182855603053e+01,\n                                                1.60496063745682e+01, 1.57721019287663e+01, 1.54878430198215e+01, 1.51989718593650e+01, 1.49076596253157e+01,\n                                                1.46160649974978e+01, 1.43262932272834e+01, 1.40403559850252e+01, 1.37601333607098e+01, 1.34873404225129e+01,\n                                                1.32235010835469e+01, 1.29699313822481e+01, 1.27277328214220e+01, 1.24977947191731e+01, 1.22808032651691e+01,\n                                                1.20772545326776e+01, 1.18874690345451e+01, 1.17116061966388e+01, 1.15496779673445e+01, 1.14015614261602e+01,\n                                                1.12670106141665e+01, 1.11456679271260e+01, 1.10370753815396e+01, 1.09406859725215e+01, 1.08558752468244e+01,\n                                                1.07819531403168e+01, 1.07181760803417e+01, 1.06637593222223e+01, 1.06178894653806e+01, 1.05797370695205e+01,\n                                                1.05484692602940e+01, 1.05232621759669e+01, 1.05033130642481e+01, 1.04878517962768e+01, 1.04761515284500e+01,\n                                                1.04675382180391e+01, 1.04613986902372e+01, 1.04571869657340e+01, 1.04544285905335e+01, 1.04527227627855e+01,\n                                                1.04517421221538e+01, 1.04512301512423e+01, 1.04509962302158e+01, 1.04509084788015e+01, 1.04508846083305e+01,\n                                                1.04508810851005e+01, 1.04508807715582e+01, 1.04508745994402e+01, 1.04508327824908e+01, 1.04506790598287e+01,\n                                                1.04502692983134e+01, 1.04493725790672e+01, 1.04476553839768e+01, 1.04446695726452e+01, 1.04398447958571e+01,\n                                                1.04324859368908e+01, 1.04217760981687e+01, 1.04067855465768e+01, 1.03864868844948e+01, 1.03597765152384e+01,\n                                                1.03255022160744e+01, 1.02824963218191e+01, 1.02296136700364e+01, 1.01657730889854e+01, 1.00900008557570e+01,\n                                                1.00014742544377e+01, 9.89956316167537e+00, 9.78386750923456e+00, 9.65424853271442e+00, 9.51085190543728e+00,\n                                                9.35412115414527e+00, 9.18480013237235e+00, 9.00392377255754e+00, 8.81279685266951e+00, 8.61296111513467e+00,\n                                                8.40615177721554e+00, 8.19424525163132e+00, 7.97920068082616e+00, 7.76299855514903e+00, 7.54758009120838e+00,\n                                                7.33479107377491e+00, 7.12633346286044e+00, 6.92372727732495e+00, 6.72828421077890e+00, 6.54109328780261e+00,\n                                                6.36301780662870e+00, 6.19470198031764e+00, 6.03658516263957e+00, 5.88892134129513e+00, 5.75180165868249e+00,\n                                                5.62517800410361e+00, 5.50888612472671e+00, 5.40266714636727e+00, 5.30618681791105e+00, 5.21905215577188e+00,\n                                                5.14082544856045e+00, 5.07103578455698e+00, 5.00918839343583e+00, 4.95477216202034e+00, 4.90726570598247e+00,\n                                                4.86614236847623e+00, 4.83087448340187e+00, 4.80093719332787e+00, 4.77581205564669e+00, 4.75499060914254e+00,\n                                                4.73797800956592e+00, 4.72429677934881e+00, 4.71349065555793e+00, 4.70512846411098e+00, 4.69880789996800e+00,\n                                                4.69415905534398e+00, 4.69084751362386e+00, 4.68857681762784e+00, 4.68709012819247e+00, 4.68617091241429e+00,\n                                                4.68564253863467e+00, 4.68536670427203e+00, 4.68524067883705e+00, 4.68519340324556e+00, 4.68518054322336e+00,\n                                                4.68517864511410e+00, 4.68517847731152e+00, 4.68517518663414e+00, 4.68515289188719e+00, 4.68507093518416e+00,\n                                                4.68485247750065e+00, 4.68437443283504e+00, 4.68345909110358e+00, 4.68186783905124e+00, 4.67929738797297e+00,\n                                                4.67537891183461e+00, 4.66968047911723e+00, 4.66171311316926e+00, 4.65094072472622e+00, 4.63679401373739e+00,\n                                                4.61868822766586e+00, 4.59604439033557e+00, 4.56831329126328e+00, 4.53500117631640e+00, 4.49569574666495e+00,\n                                                4.45009080566974e+00, 4.39800774843377e+00, 4.33941211667797e+00, 4.27442367538348e+00, 4.20331891121241e+00,\n                                                4.12652547307264e+00, 4.04460880154058e+00, 3.95825192610739e+00, 3.86823003565037e+00, 3.77538184850476e+00,\n                                                3.68057996013279e+00, 3.58470221701747e+00, 3.48860579908039e+00, 3.39310517765456e+00, 3.29895456015739e+00,\n                                                3.20683493636483e+00, 3.11734547281077e+00, 3.03099878522671e+00, 2.94821953603712e+00, 2.86934580943201e+00,\n                                                2.79463275854352e+00, 2.72425805788835e+00, 2.65832871197259e+00, 2.59688877219464e+00, 2.53992751640934e+00,\n                                                2.48738766735318e+00, 2.43917327795245e+00, 2.39515699196682e+00, 2.35518648654655e+00, 2.31909000407700e+00,\n                                                2.28668097046199e+00, 2.25776176683057e+00, 2.23212676822298e+00, 2.20956478736676e+00, 2.18986106813522e+00,\n                                                2.17279896652406e+00, 2.15816144147594e+00, 2.14573245715382e+00, 2.13529837476955e+00, 2.12664938739849e+00,\n                                                2.11958102637384e+00, 2.11389574361784e+00, 2.10940455136750e+00, 2.10592868003233e+00, 2.10330119735667e+00,\n                                                2.10136851869813e+00, 2.09999173006996e+00, 2.09904764340758e+00, 2.09842950770675e+00, 2.09804731014041e+00,\n                                                2.09782761732762e+00, 2.09771292740361e+00, 2.09766052680427e+00, 2.09764086988212e+00, 2.09763552275588e+00,\n                                                2.09763473353246e+00, 2.09763466268241e+00, 2.09763326108276e+00, 2.09762376507095e+00, 2.09758885720665e+00,\n                                                2.09749580934144e+00, 2.09729219505866e+00, 2.09690232096706e+00, 2.09622455066772e+00, 2.09512969468246e+00,\n                                                2.09346063698977e+00, 2.09103335962821e+00, 2.08763950540726e+00, 2.08305057894107e+00, 2.07702382248103e+00,\n                                                2.06930971199924e+00, 2.05966090108783e+00, 2.04784230124580e+00, 2.03364183911107e+00, 2.01688129252292e+00,\n                                                1.99742650103186e+00, 1.97519619706976e+00, 1.95016873242395e+00, 1.92238609273518e+00, 1.89195479791677e+00,\n                                                1.85904355879701e+00, 1.82387786359056e+00, 1.78673195492209e+00, 1.74791888129158e+00, 1.70777942975143e+00,\n                                                1.66667075451407e+00, 1.62495542051221e+00, 1.58299141473696e+00, 1.54112348522004e+00, 1.49967598818354e+00,\n                                                1.45894728424422e+00, 1.41920563247368e+00, 1.38068647948230e+00, 1.34359101503930e+00, 1.30808585192506e+00,\n                                                1.27430367674115e+00, 1.24234470750243e+00, 1.21227878474453e+00, 1.18414791910339e+00, 1.15796912275742e+00,\n                                                1.13373736579503e+00, 1.11142852046448e+00, 1.09100218390411e+00, 1.07240430022172e+00, 1.05556953269867e+00,\n                                                1.04042336405034e+00, 1.02688392551311e+00, 1.01486357327387e+00, 1.00427024327980e+00, 9.95008623064095e-01,\n                                                9.86981182444424e-01, 9.80089104436196e-01, 9.74233154122214e-01, 9.69314517146373e-01, 9.65235631532369e-01,\n                                                9.61901027232724e-01, 9.59218177768761e-01, 9.57098358143238e-01, 9.55457493550274e-01, 9.54216974946835e-01,\n                                                9.53304410942746e-01, 9.52654281283337e-01, 9.52208455861928e-01, 9.51916544913654e-01, 9.51736050752938e-01,\n                                                9.51632298794056e-01, 9.51578135057549e-01, 9.51553388143363e-01, 9.51544104874273e-01, 9.51541579614410e-01,\n                                                9.51541206891875e-01, 9.51541172533510e-01, 9.51540482827795e-01, 9.51535809985728e-01, 9.51518632358034e-01,\n                                                9.51472844907300e-01, 9.51372649313782e-01, 9.51180797716098e-01, 9.50847275511748e-01, 9.50308508341354e-01,\n                                                9.49487177088439e-01, 9.48292720333431e-01, 9.46622593508717e-01, 9.44364335101032e-01, 9.41398460039352e-01,\n                                                9.37602157278803e-01, 9.32853712645233e-01, 9.27037511730724e-01, 9.20049406322992e-01, 9.11802159583242e-01,\n                                                9.02230630141670e-01, 8.91296324389039e-01, 8.78990949233089e-01, 8.65338640752427e-01, 8.50396628373705e-01,\n                                                8.34254213631649e-01, 8.17030084859720e-01, 7.98868136832489e-01, 7.79932097702506e-01, 7.60399366106103e-01,\n                                                7.40454515447709e-01, 7.20282923965371e-01, 7.00064940619118e-01, 6.79970908292269e-01, 6.60157252814358e-01,\n                                                6.40763726536537e-01, 6.21911784896781e-01, 6.03703985858107e-01, 5.86224242086626e-01, 5.69538725532254e-01,\n                                                5.53697220450434e-01, 5.38734737742878e-01, 5.24673233523714e-01, 5.11523311049618e-01, 4.99285821851956e-01,\n                                                4.87953315043960e-01, 4.77511311046843e-01, 4.67939396562461e-01, 4.59212151773979e-01, 4.51299929396264e-01,\n                                                4.44169509531303e-01, 4.37784655529580e-01, 4.32106595274117e-01, 4.27094450303386e-01, 4.22705632524945e-01,\n                                                4.18896225271894e-01, 4.15621362272841e-01, 4.12835614789724e-01, 4.10493393721289e-01, 4.08549369867064e-01,\n                                                4.06958911823299e-01, 4.05678537218545e-01, 4.04666369333228e-01, 4.03882587781190e-01, 4.03289859094293e-01,\n                                                4.02853730989612e-01, 4.02542973035619e-01, 4.02329846537814e-01, 4.02190287818399e-01, 4.02103991645241e-01,\n                                                4.02054385233971e-01, 4.02028487759342e-01, 4.02016655341477e-01, 4.02012216650011e-01, 4.02011009223685e-01,\n                                                4.02010831010287e-01, 4.02010814026728e-01, 4.02010467075200e-01, 4.02008116434565e-01, 4.01999475336133e-01,\n                                                4.01976442148360e-01, 4.01926038680124e-01, 4.01829525714685e-01, 4.01661737982490e-01, 4.01390680181375e-01,\n                                                4.00977424500777e-01, 4.00376347402002e-01, 3.99535737862763e-01, 3.98398799521289e-01, 3.96905053927995e-01,\n                                                3.94992130725765e-01, 3.92597903239931e-01, 3.89662896139246e-01, 3.86132858474873e-01, 3.81961364845417e-01,\n                                                3.77112284912478e-01, 3.71561952256275e-01, 3.65300871680564e-01, 3.58334831192586e-01, 3.50685329310902e-01,\n                                                3.42389284898648e-01, 3.33498057425750e-01, 3.24075861333259e-01, 3.14197700847956e-01, 3.03946975899134e-01,\n                                                2.93412914476306e-01, 2.82687974615321e-01, 2.71865335854073e-01, 2.61036572102530e-01, 2.50289571161453e-01,\n                                                2.39706744112269e-01, 2.29363551394922e-01, 2.19327360422593e-01, 2.09656639881331e-01, 2.00400486398966e-01,\n                                                1.91598468938878e-01, 1.83280765166991e-01, 1.75468553187013e-01, 1.68174612904231e-01, 1.61404085203905e-01,\n                                                1.55155334936289e-01, 1.49420865525354e-01, 1.44188238369917e-01, 1.39440958157916e-01, 1.35159294650322e-01,\n                                                1.31321021322151e-01, 1.27902060567564e-01, 1.24877033331998e-01, 1.22219717638966e-01, 1.19903425370499e-01,\n                                                1.17901309849167e-01, 1.16186618377373e-01, 1.14732904104873e-01, 1.13514210635842e-01, 1.12505240882562e-01,\n                                                1.11681519060031e-01, 1.11019551632445e-01, 1.10496989714793e-01, 1.10092792148833e-01, 1.09787385460329e-01,\n                                                1.09562814394383e-01, 1.09402874917770e-01, 1.09293220616856e-01, 1.09221433382061e-01, 1.09177050147434e-01,\n                                                1.09151539153689e-01, 1.09138221554360e-01, 1.09132136961673e-01, 1.09129854474027e-01, 1.09129233587065e-01,\n                                                1.09129141945633e-01, 1.09129132875179e-01, 1.09128944040325e-01, 1.09127664662918e-01, 1.09122961633460e-01,\n                                                1.09110425830540e-01, 1.09082995322172e-01, 1.09030477136990e-01, 1.08939192997706e-01, 1.08791775468415e-01,\n                                                1.08567141821528e-01, 1.08240672757933e-01, 1.07784620874188e-01, 1.07168768338372e-01, 1.06361343599040e-01,\n                                                1.05330192448186e-01, 1.04044179347476e-01, 1.02474771420297e-01, 1.00597731744557e-01, 9.83948234086647e-02,\n                                                9.58554048950404e-02, 9.29777847922040e-02, 8.97702033984800e-02, 8.62513232098117e-02, 8.24501405245748e-02,\n                                                7.84052750233037e-02, 7.41636492051931e-02, 6.97786287051798e-02, 6.53077500033206e-02, 6.08102058289148e-02,\n                                                5.63442838192252e-02, 5.19649564967324e-02, 4.77217997719421e-02, 4.36573762422796e-02, 3.98061651265387e-02,\n                                                3.61940612871905e-02, 3.28384101788011e-02, 2.97485009232794e-02, 2.69264105290894e-02, 2.43680798434696e-02,\n                                                2.20645046057406e-02, 2.00029394140770e-02, 1.81680340621675e-02, 1.65428461458426e-02, 1.51096974502778e-02,\n                                                1.38508619171382e-02, 1.27490886596497e-02, 1.17879742614448e-02, 1.09522048898612e-02, 1.02276914010844e-02,\n                                                9.60162057180014e-03, 9.06244378546006e-03, 8.59982171784779e-03, 8.20454041464913e-03, 7.86841104793012e-03,\n                                                7.58416282381802e-03, 7.34533610203059e-03, 7.14618079964779e-03, 6.98156355442947e-03, 6.84688585440085e-03,\n                                                6.73801432947130e-03, 6.65122357890979e-03, 6.58315121957642e-03, 6.53076424881505e-03, 6.49133530725621e-03,\n                                                6.46242700532440e-03, 6.44188216145380e-03, 6.42781761371225e-03, 6.41861923228504e-03, 6.41293588933323e-03,\n                                                6.40967043063512e-03, 6.40796611761729e-03, 6.40718752864444e-03, 6.40689547337914e-03, 6.40681602918391e-03,\n                                                6.40680430345952e-03, 6.40680309390973e-03, 6.40677741811047e-03, 6.40660346323685e-03, 6.40596402351434e-03,\n                                                6.40425979450754e-03, 6.40053156417508e-03, 6.39339704600772e-03, 6.38100721833368e-03, 6.36102795518312e-03,\n                                                6.33065361151708e-03, 6.28665970990383e-03, 6.22550150866275e-03, 6.14346351197526e-03, 6.03686146599713e-03,\n                                                5.90229283192301e-03, 5.73692427889227e-03, 5.53879608295205e-03, 5.30711476789847e-03, 5.04249875243445e-03,\n                                                4.74713932023363e-03, 4.42484279971112e-03, 4.08093041987811e-03, 3.72198936617707e-03, 3.35548973750122e-03,\n                                                2.98930345584125e-03, 2.63117804534119e-03, 2.28822653266647e-03, 1.96649241082980e-03, 1.67063620222052e-03,\n                                                1.40377061851993e-03, 1.16744892096321e-03, 9.61790031492882e-04, 7.85707454582507e-04, 6.37199267508493e-04,\n                                                5.13654579709311e-04, 4.12138130702289e-04, 3.29627398450327e-04, 2.63191716467048e-04, 2.10115317223369e-04,\n                                                1.67972443790632e-04, 1.34663154710779e-04, 1.08416998131133e-04, 8.77719622423001e-05, 7.15381395615111e-05,\n                                                5.87564643979022e-05, 4.86604027791770e-05, 4.06435120581250e-05, 3.42315912504887e-05, 2.90572634149555e-05,\n                                                2.48367489241730e-05, 2.13503995354358e-05, 1.84282563431282e-05, 1.59401678700988e-05, 1.37887123727864e-05,\n                                                1.19031884118215e-05, 1.02338459129214e-05, 8.74644315373985e-06, 7.41757786570929e-06, 6.23108180874965e-06,\n                                                5.17544426514860e-06, 4.24202715265665e-06, 3.42381501994282e-06, 2.71452141475947e-06, 2.10795829502786e-06,\n                                                1.59762280560471e-06, 1.17646881037103e-06, 8.36827119599093e-07, 5.70434888658156e-07, 3.55271367880050e-14,\n                                                3.55271367880050e-14, 3.55271367880050e-14, 3.55271367880050e-14, 3.55271367880050e-14, 3.19744231092045e-14,\n                                                3.55271367880050e-14}),\nmadness::CubicInterpolationTable<double>(grid, {3.30000000000000e+01, 3.29999998968078e+01, 3.29999967059013e+01, 3.29999750869918e+01, 3.29998956128730e+01,\n                                                3.29996837585144e+01, 3.29992200923421e+01, 3.29983320085481e+01, 3.29967872868557e+01, 3.29942897033435e+01,\n                                                3.29904768461359e+01, 3.29849202178138e+01, 3.29771276382723e+01, 3.29665479041421e+01, 3.29525776201151e+01,\n                                                3.29345700980702e+01, 3.29118462224823e+01, 3.28837072003025e+01, 3.28494491385049e+01, 3.28083794044187e+01,\n                                                3.27598347002266e+01, 3.27032007018349e+01, 3.26379329595580e+01, 3.25635785345490e+01, 3.24797975719295e+01,\n                                                3.23863837319391e+01, 3.22832821732941e+01, 3.21706036723158e+01, 3.20486335202747e+01, 3.19178340958975e+01,\n                                                3.17788404482177e+01, 3.16324487950138e+01, 3.14795984607282e+01, 3.13213483479634e+01, 3.11588494693639e+01,\n                                                3.09933153005197e+01, 3.08259917279135e+01, 3.06581281788393e+01, 3.04909511857515e+01, 3.03256412267985e+01,\n                                                3.01633132695092e+01, 3.00050010845409e+01, 2.98516451279082e+01, 2.97040836260192e+01, 2.95630464304957e+01,\n                                                2.94291512178892e+01, 2.93029016659429e+01, 2.91846873167662e+01, 2.90747849172495e+01, 2.89733610945325e+01,\n                                                2.88804762727031e+01, 2.87960897650372e+01, 2.87200659864309e+01, 2.86521817272487e+01, 2.85921344168110e+01,\n                                                2.85395512857170e+01, 2.84939993137452e+01, 2.84549958259763e+01, 2.84220195752865e+01, 2.83945221254982e+01,\n                                                2.83719393273529e+01, 2.83537026603720e+01, 2.83392501991052e+01, 2.83280369538633e+01, 2.83195443353804e+01,\n                                                2.83132885013155e+01, 2.83088273609982e+01, 2.83057660436847e+01, 2.83037606744271e+01, 2.83025203493329e+01,\n                                                2.83018072566855e+01, 2.83014349496790e+01, 2.83012648376192e+01, 2.83012010224030e+01, 2.83011836630877e+01,\n                                                2.83011811008881e+01, 2.83011807501591e+01, 2.83011724671272e+01, 2.83011163484228e+01, 2.83009100509531e+01,\n                                                2.83003601439712e+01, 2.82991567181090e+01, 2.82968521366521e+01, 2.82928448349788e+01, 2.82863690023769e+01,\n                                                2.82764908934665e+01, 2.82621124040778e+01, 2.82419823954330e+01, 2.82147160466999e+01, 2.81788222474437e+01,\n                                                2.81327387024168e+01, 2.80748740163021e+01, 2.80036555750919e+01, 2.79175815806926e+01, 2.78152751795686e+01,\n                                                2.76955383181878e+01, 2.75574028168896e+01, 2.74001762129447e+01, 2.72234801663803e+01, 2.70272795672605e+01,\n                                                2.68119007982387e+01, 2.65780377694563e+01, 2.63267443526482e+01, 2.60594119306870e+01, 2.57777314257501e+01,\n                                                2.54836408662776e+01, 2.51792623158730e+01, 2.48668349027914e+01, 2.45486520816822e+01, 2.42270097758372e+01,\n                                                2.39041679513641e+01, 2.35823235036887e+01, 2.32635894938299e+01, 2.29499758061750e+01, 2.26433684591171e+01,\n                                                2.23455074665117e+01, 2.20579650239377e+01, 2.17821264266538e+01, 2.15191757444938e+01, 2.12700873811489e+01,\n                                                2.10356236838329e+01, 2.08163380204498e+01, 2.06125823058703e+01, 2.04245178178056e+01, 2.02521282180944e+01,\n                                                2.00952338954323e+01, 1.99535069916131e+01, 1.98264867092696e+01, 1.97135946926651e+01, 1.96141504111618e+01,\n                                                1.95273865573669e+01, 1.94524645056467e+01, 1.93884898716603e+01, 1.93345281801619e+01, 1.92896205959960e+01,\n                                                1.92527996102193e+01, 1.92231045067642e+01, 1.91995963713446e+01, 1.91813723491009e+01, 1.91675788159022e+01,\n                                                1.91574231046423e+01, 1.91501834256327e+01, 1.91452166412630e+01, 1.91419635997623e+01, 1.91399517995573e+01,\n                                                1.91387952409846e+01, 1.91381914209443e+01, 1.91379155323535e+01, 1.91378120373051e+01, 1.91377838841696e+01,\n                                                1.91377797288268e+01, 1.91377793343702e+01, 1.91377712923372e+01, 1.91377168064515e+01, 1.91375165116360e+01,\n                                                1.91369826073675e+01, 1.91358142123968e+01, 1.91335767551073e+01, 1.91296862950846e+01, 1.91233996111081e+01,\n                                                1.91138108164452e+01, 1.90998551625954e+01, 1.90803205527063e+01, 1.90538670898335e+01, 1.90190547189789e+01,\n                                                1.89743786769210e+01, 1.89183120411709e+01, 1.88493541829460e+01, 1.87660834085709e+01, 1.86672115655549e+01,\n                                                1.85516379552024e+01, 1.84184996046858e+01, 1.82672148814268e+01, 1.80975176436797e+01, 1.79094796482731e+01,\n                                                1.77035197688053e+01, 1.74803996432147e+01, 1.72412065290843e+01, 1.69873252029810e+01, 1.67204014812778e+01,\n                                                1.64423001880731e+01, 1.61550600839992e+01, 1.58608474966643e+01, 1.55619094361790e+01, 1.52605262341859e+01,\n                                                1.49589635907276e+01, 1.46594245240420e+01, 1.43640029061929e+01, 1.40746414729362e+01, 1.37930977094782e+01,\n                                                1.35209203689054e+01, 1.32594376837759e+01, 1.30097562542997e+01, 1.27727679857416e+01, 1.25491618384116e+01,\n                                                1.23394375369656e+01, 1.21439193448567e+01, 1.19627690412278e+01, 1.17959980034385e+01, 1.16434786961014e+01,\n                                                1.15049559622947e+01, 1.13800584330607e+01, 1.12683102334379e+01, 1.11691430394859e+01, 1.10819084603785e+01,\n                                                1.10058906828025e+01, 1.09403193076285e+01, 1.08843823139077e+01, 1.08372390883842e+01, 1.07980334508829e+01,\n                                                1.07659065836809e+01, 1.07400097374243e+01, 1.07195165417851e+01, 1.07036347022844e+01, 1.06916168226937e+01,\n                                                1.06827700619925e+01, 1.06764643216586e+01, 1.06721386669381e+01, 1.06693057163101e+01, 1.06675537859373e+01,\n                                                1.06665466475694e+01, 1.06660208443952e+01, 1.06657806037374e+01, 1.06656904816831e+01, 1.06656659663474e+01,\n                                                1.06656623479369e+01, 1.06656620259242e+01, 1.06656556870659e+01, 1.06656127404322e+01, 1.06654548650183e+01,\n                                                1.06650340344622e+01, 1.06641130942954e+01, 1.06623495262957e+01, 1.06592831129604e+01, 1.06543281718025e+01,\n                                                1.06467709755468e+01, 1.06357729010488e+01, 1.06203797450587e+01, 1.05995374963670e+01, 1.05721146509337e+01,\n                                                1.05369308936710e+01, 1.04927916497440e+01, 1.04385276417391e+01, 1.03730381999714e+01, 1.02953366944677e+01,\n                                                1.02045961276980e+01, 1.01001926856779e+01, 9.98174492317399e+00, 9.84914627498670e+00, 9.70258874367812e+00,\n                                                9.54257590812210e+00, 9.36992381806401e+00, 9.18574888425735e+00, 8.99144254486446e+00, 8.78863328576024e+00,\n                                                8.57913749046397e+00, 8.36490152693803e+00, 8.14793832719494e+00, 7.93026233401011e+00, 7.71382693637592e+00,\n                                                7.50046830361290e+00, 7.29185885632071e+00, 7.08947257502579e+00, 6.89456311260760e+00, 6.70815444316507e+00,\n                                                6.53104272891381e+00, 6.36380734318233e+00, 6.20682860318065e+00, 6.06030972240567e+00, 5.92430071970959e+00,\n                                                5.79872242522559e+00, 5.68338920633173e+00, 5.57802951948292e+00, 5.48230382053350e+00, 5.39581970721976e+00,\n                                                5.31814441436808e+00, 5.24881494169350e+00, 5.18734618058041e+00, 5.13323743759981e+00, 5.08597774537028e+00,\n                                                5.04505031940031e+00, 5.00993647283017e+00, 4.98011924623751e+00, 4.95508695099124e+00, 4.93433676443434e+00,\n                                                4.91737845499014e+00, 4.90373825646936e+00, 4.89296285500175e+00, 4.88462340116153e+00, 4.87831941644624e+00,\n                                                4.87368242994923e+00, 4.87037916033199e+00, 4.86811405199179e+00, 4.86663098362311e+00, 4.86571399193116e+00,\n                                                4.86518689144894e+00, 4.86491172031524e+00, 4.86478599756174e+00, 4.86473883545935e+00, 4.86472600630355e+00,\n                                                4.86472411274991e+00, 4.86472394535005e+00, 4.86472066257045e+00, 4.86469842132809e+00, 4.86461666125346e+00,\n                                                4.86439872724723e+00, 4.86392182629291e+00, 4.86300866592270e+00, 4.86142117915519e+00, 4.85885673822700e+00,\n                                                4.85494725206056e+00, 4.84926152018602e+00, 4.84131116601386e+00, 4.83056038112872e+00, 4.81643956733052e+00,\n                                                4.79836275691377e+00, 4.77574842493689e+00, 4.74804299248879e+00, 4.71474598359744e+00, 4.67543548064272e+00,\n                                                4.62979227462622e+00, 4.57762098152883e+00, 4.51886644136013e+00, 4.45362396024127e+00, 4.38214239538264e+00,\n                                                4.30481967844849e+00, 4.22219104911025e+00, 4.13491092754347e+00, 4.04372988764715e+00, 3.94946851744328e+00,\n                                                3.85299002752269e+00, 3.75517330542406e+00, 3.65688777805784e+00, 3.55897103286030e+00, 3.46220976102807e+00,\n                                                3.36732429441911e+00, 3.27495683424584e+00, 3.18566338676568e+00, 3.09990936894495e+00, 3.01806876490263e+00,\n                                                2.94042657065134e+00, 2.86718407318253e+00, 2.79846631939036e+00, 2.73433100041792e+00, 2.67477794948098e+00,\n                                                2.61975853301888e+00, 2.56918437965908e+00, 2.52293509421537e+00, 2.48086480036686e+00, 2.44280751485027e+00,\n                                                2.40858146468839e+00, 2.37799251865683e+00, 2.35083692492739e+00, 2.32690354133533e+00, 2.30597572439230e+00,\n                                                2.28783301630232e+00, 2.27225274085604e+00, 2.25901159160236e+00, 2.24788726987636e+00, 2.23866020602243e+00,\n                                                2.23111537420011e+00, 2.22504418937667e+00, 2.22024645472449e+00, 2.21653230925671e+00, 2.21372411006393e+00,\n                                                2.21165817202470e+00, 2.21018628139491e+00, 2.20917689906046e+00, 2.20851597489034e+00, 2.20810730646452e+00,\n                                                2.20787239280865e+00, 2.20774975544157e+00, 2.20769372340920e+00, 2.20767270418191e+00, 2.20766698647289e+00,\n                                                2.20766614255211e+00, 2.20766606679179e+00, 2.20766456805378e+00, 2.20765441391353e+00, 2.20761708667414e+00,\n                                                2.20751758944785e+00, 2.20729985990522e+00, 2.20688294960532e+00, 2.20615815123149e+00, 2.20498725347842e+00,\n                                                2.20320209840602e+00, 2.20060560450527e+00, 2.19697439500813e+00, 2.19206312916334e+00, 2.18561056903414e+00,\n                                                2.17734732276660e+00, 2.16700508796850e+00, 2.15432708190894e+00, 2.13907920103729e+00, 2.12106131917994e+00,\n                                                2.10011803421054e+00, 2.07614812995748e+00, 2.04911205183674e+00, 2.01903680904580e+00, 1.98601790623616e+00,\n                                                1.95021815051416e+00, 1.91186343983789e+00, 1.87123587602834e+00, 1.82866472501198e+00, 1.78451584895146e+00,\n                                                1.73918025950187e+00, 1.69306240536503e+00, 1.64656873580310e+00, 1.60009699798970e+00, 1.55402664366882e+00,\n                                                1.50871064201160e+00, 1.46446891590484e+00, 1.42158353228422e+00, 1.38029568196337e+00, 1.34080438543668e+00,\n                                                1.30326676791774e+00, 1.26779967032662e+00, 1.23448231172647e+00, 1.20335969694237e+00, 1.17444646980778e+00,\n                                                1.14773094259133e+00, 1.12317907820833e+00, 1.10073825583871e+00, 1.08034070548804e+00, 1.06190654751135e+00,\n                                                1.04534641583001e+00, 1.03056367697735e+00, 1.01745628107270e+00, 1.00591829612690e+00, 9.95841184981437e-01,\n                                                9.87114886080796e-01, 9.79628756502507e-01, 9.73272429368798e-01, 9.67936628884686e-01, 9.63513975562719e-01,\n                                                9.59899802369598e-01, 9.56992990185569e-01, 9.54696818734277e-01, 9.52919817680794e-01, 9.51576592605740e-01,\n                                                9.50588592723641e-01, 9.49884782134134e-01, 9.49402174530832e-01, 9.49086192870176e-01, 9.48890820464477e-01,\n                                                9.48778517945733e-01, 9.48719890903028e-01, 9.48693104862954e-01, 9.48683056678973e-01, 9.48680323346714e-01,\n                                                9.48679919913232e-01, 9.48679882723866e-01, 9.48679136189028e-01, 9.48674078324075e-01, 9.48655485353463e-01,\n                                                9.48605925440141e-01, 9.48497475538275e-01, 9.48289822211279e-01, 9.47928840242717e-01, 9.47345743307082e-01,\n                                                9.46456900357511e-01, 9.45164407247859e-01, 9.43357492273023e-01, 9.40914813355512e-01, 9.37707670458515e-01,\n                                                9.33604107539473e-01, 9.28473814056865e-01, 9.22193659607224e-01, 9.14653612931836e-01, 9.05762717856284e-01,\n                                                8.95454735844638e-01, 8.83693030862752e-01, 8.70474278863888e-01, 8.55830639001447e-01, 8.39830127521417e-01,\n                                                8.22575080754305e-01, 8.04198764918311e-01, 7.84860365300759e-01, 7.64738740775741e-01, 7.44025438569565e-01,\n                                                7.22917512581724e-01, 7.01610670643809e-01, 6.80293197640061e-01, 6.59140978269065e-01, 6.38313797532078e-01,\n                                                6.17952952266343e-01, 5.98180083261177e-01, 5.79097047982586e-01, 5.60786603872167e-01, 5.43313659337286e-01,\n                                                5.26726866356405e-01, 5.11060364904019e-01, 4.96335534868706e-01, 4.82562657218999e-01, 4.69742426932051e-01,\n                                                4.57867292478298e-01, 4.46922619630421e-01, 4.36887691850927e-01, 4.27736567216598e-01, 4.19438814739507e-01,\n                                                4.11960152866882e-01, 4.05263011316087e-01, 3.99307035196131e-01, 3.94049548117252e-01, 3.89445988899340e-01,\n                                                3.85450334531008e-01, 3.82015520062993e-01, 3.79093863963341e-01, 3.76637504970994e-01, 3.74598853578803e-01,\n                                                3.72931057969552e-01, 3.71588480624112e-01, 3.70527178113967e-01, 3.69705373041157e-01, 3.69083903998046e-01,\n                                                3.68626637093421e-01, 3.68300821302256e-01, 3.68077369848997e-01, 3.67931051128110e-01, 3.67840575284113e-01,\n                                                3.67788566366045e-01, 3.67761414679222e-01, 3.67749009227225e-01, 3.67744355575041e-01, 3.67743089674590e-01,\n                                                3.67742902830535e-01, 3.67742885024491e-01, 3.67742521270550e-01, 3.67740056791575e-01, 3.67730997218288e-01,\n                                                3.67706848583602e-01, 3.67654004258199e-01, 3.67552817798398e-01, 3.67376906074256e-01, 3.67092726488657e-01,\n                                                3.66659470982256e-01, 3.66029316795725e-01, 3.65148068292150e-01, 3.63956214085860e-01, 3.62390408013951e-01,\n                                                3.60385360397956e-01, 3.57876097783034e-01, 3.54800516407714e-01, 3.51102120024990e-01, 3.46732800714783e-01,\n                                                3.41655497224828e-01, 3.35846554343050e-01, 3.29297612815488e-01, 3.22016883962434e-01, 3.14029704820314e-01,\n                                                3.05378323536154e-01, 2.96120923674117e-01, 2.86329952078262e-01, 2.76089861036830e-01, 2.65494407336547e-01,\n                                                2.54643667202352e-01, 2.43640928716530e-01, 2.32589615354875e-01, 2.21590379217425e-01, 2.10738482949026e-01,\n                                                2.00121566586098e-01, 1.89817870089925e-01, 1.79894954426153e-01, 1.70408934545492e-01, 1.61404208157855e-01,\n                                                1.52913637090919e-01, 1.44959115750090e-01, 1.37552445757642e-01, 1.30696428305647e-01, 1.24386086044836e-01,\n                                                1.18609933363309e-01, 1.13351225912545e-01, 1.08589135160535e-01, 1.04299809632877e-01, 1.00457299730138e-01,\n                                                9.70343364441035e-02, 9.40029652846732e-02, 9.13350450407364e-02, 8.90026267152351e-02, 8.69782313786018e-02,\n                                                8.52350471481671e-02, 8.37470654122683e-02, 8.24891751320607e-02, 8.14372318729468e-02, 8.05681153922606e-02,\n                                                7.98597863522019e-02, 7.92913492261249e-02, 7.88431249052053e-02, 7.84967330785449e-02, 7.82351813432953e-02,\n                                                7.80429553934709e-02, 7.79061027067982e-02, 7.78123010326723e-02, 7.77509027545236e-02, 7.77129468578792e-02,\n                                                7.76911316984510e-02, 7.76797438760752e-02, 7.76745410642761e-02, 7.76725893711472e-02, 7.76720584690764e-02,\n                                                7.76719801092582e-02, 7.76719723533787e-02, 7.76718108864358e-02, 7.76707169312445e-02, 7.76666955426037e-02,\n                                                7.76559768139862e-02, 7.76325232840662e-02, 7.75876228505510e-02, 7.75095903007568e-02, 7.73836022559209e-02,\n                                                7.71916918507358e-02, 7.69129299245392e-02, 7.65238177260059e-02, 7.59989108730608e-02, 7.53116844251025e-02,\n                                                7.44356336781209e-02, 7.33455846689708e-02, 7.20191633690490e-02, 7.04383453737449e-02, 6.85909819791277e-02,\n                                                6.64721782581452e-02, 6.40853888368369e-02, 6.14431017446364e-02, 5.85670026466403e-02, 5.54875511301702e-02,\n                                                5.22429545480279e-02, 4.88775870861957e-02, 4.54399636324823e-02, 4.19804300527602e-02, 3.85487648757277e-02,\n                                                3.51918961870368e-02, 3.19519200197149e-02, 2.88645657369315e-02, 2.59581970085350e-02, 2.32533736890375e-02,\n                                                2.07629402832552e-02, 1.84925590862619e-02, 1.64415756505534e-02, 1.46040923780291e-02, 1.29701308382835e-02,\n                                                1.15267806850667e-02, 1.02592575922316e-02, 9.15181944375831e-03, 8.18851505811580e-03, 7.35376039046542e-03,\n                                                6.63275226811066e-03, 6.01173929560872e-03, 5.47817437665543e-03, 5.02077441510096e-03, 4.62951128190525e-03,\n                                                4.29555507570001e-03, 4.01118693257985e-03, 3.76969483210843e-03, 3.56526243314192e-03, 3.39285813204526e-03,\n                                                3.24812926756124e-03, 3.12730462419353e-03, 3.02710703387987e-03, 2.94467688831901e-03, 2.87750669276932e-03,\n                                                2.82338634614376e-03, 2.78035853936842e-03, 2.74668345458906e-03, 2.72081177366346e-03, 2.70136484774497e-03,\n                                                2.68712074134925e-03, 2.67700476082666e-03, 2.67008302356686e-03, 2.66555763975873e-03, 2.66276217012518e-03,\n                                                2.66115619399443e-03, 2.66031806063438e-03, 2.65993518612362e-03, 2.65979156888818e-03, 2.65975250267303e-03,\n                                                2.65974673663294e-03, 2.65974614185893e-03, 2.65973351645243e-03, 2.65964797893758e-03, 2.65933355574077e-03,\n                                                2.65849558614661e-03, 2.65666255845076e-03, 2.65315533943067e-03, 2.64706640864887e-03, 2.63725227937783e-03,\n                                                2.62234282891427e-03, 2.60077155450489e-03, 2.57083053460150e-03, 2.53075279663761e-03, 2.47882260133991e-03,\n                                                2.41351071986884e-03, 2.33362723253094e-03, 2.23847921510156e-03, 2.12801581218258e-03, 2.00293988288536e-03,\n                                                1.86476501171740e-03, 1.71580030585261e-03, 1.55905341348728e-03, 1.39805384422687e-03, 1.23661196864333e-03,\n                                                1.07854111689676e-03, 9.27377911168037e-04, 7.86137099538564e-04, 6.57131136854616e-04, 5.41873020779349e-04,\n                                                4.41066452701477e-04, 3.54673771958858e-04, 2.82042112218051e-04, 2.22063154026841e-04, 1.73341532423876e-04,\n                                                1.34350419806140e-04, 1.03558954030802e-04, 7.95239648851975e-05, 6.09464325904696e-05, 4.66991935255123e-05,\n                                                3.58345626025880e-05, 2.75784792833633e-05, 2.13140580385129e-05, 1.65560883118587e-05, 1.29209885884052e-05,\n                                                1.01009792103923e-05, 7.85075388876066e-06, 5.98706339616228e-06, 4.39204156776896e-06, 3.00874751246738e-06,\n                                                1.82331442033501e-06, 8.31044303595263e-07, 1.42108547152020e-14, 5.33025961146905e-07, 4.86405070887486e-07,\n                                                2.13162820728030e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 2.13162820728030e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 2.13162820728030e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {3.40000000000000e+01, 3.39999998921940e+01, 3.39999965586199e+01, 3.39999739731139e+01, 3.39998909456466e+01,\n                                                3.39996696190800e+01, 3.39991852217621e+01, 3.39982574297921e+01, 3.39966436378967e+01, 3.39940343720872e+01,\n                                                3.39900510042563e+01, 3.39842458537439e+01, 3.39761046900535e+01, 3.39650515914631e+01, 3.39504560729892e+01,\n                                                3.39316423787605e+01, 3.39079008389201e+01, 3.38785012141443e+01, 3.38427079786568e+01, 3.37997975050207e+01,\n                                                3.37490770863642e+01, 3.36899056405053e+01, 3.36217157708362e+01, 3.35440366126937e+01, 3.34565165957848e+01,\n                                                3.33589449510462e+01, 3.32512705495178e+01, 3.31336165511698e+01, 3.30062894196196e+01, 3.28697811500528e+01,\n                                                3.27247640458081e+01, 3.25720780036192e+01, 3.24127109348786e+01, 3.22477735539153e+01, 3.20784702087786e+01,\n                                                3.19060676525092e+01, 3.17318636353424e+01, 3.15571569681090e+01, 3.13832203265889e+01, 3.12112766154701e+01,\n                                                3.10424792672113e+01, 3.08778964770107e+01, 3.07184991064453e+01, 3.05651518347396e+01, 3.04186070858912e+01,\n                                                3.02795012861854e+01, 3.01483530792435e+01, 3.00255632162085e+01, 2.99114159252680e+01, 2.98060816341530e+01,\n                                                2.97096209660256e+01, 2.96219899536035e+01, 2.95430464221991e+01, 2.94725574845890e+01, 2.94102080740477e+01,\n                                                2.93556104202133e+01, 2.93083143482520e+01, 2.92678182566250e+01, 2.92335806036261e+01, 2.92050317085906e+01,\n                                                2.91815856512165e+01, 2.91626520330396e+01, 2.91476473502637e+01, 2.91360057185753e+01, 2.91271886899305e+01,\n                                                2.91206939100491e+01, 2.91160623844767e+01, 2.91128841509477e+01, 2.91108021960292e+01, 2.91095145034718e+01,\n                                                2.91087741784550e+01, 2.91083876534708e+01, 2.91082110450477e+01, 2.91081447928130e+01, 2.91081267705688e+01,\n                                                2.91081241105222e+01, 2.91081237463994e+01, 2.91081151470498e+01, 2.91080568852487e+01, 2.91078427095730e+01,\n                                                2.91072718025243e+01, 2.91060224202430e+01, 2.91036298333105e+01, 2.90994695099126e+01, 2.90927464086254e+01,\n                                                2.90824911582393e+01, 2.90675637857840e+01, 2.90466654974345e+01, 2.90183588055194e+01, 2.89810960160268e+01,\n                                                2.89332557389945e+01, 2.88731866643656e+01, 2.87992573791639e+01, 2.87099105268718e+01, 2.86037191816627e+01,\n                                                2.84794429921108e+01, 2.83360814973595e+01, 2.81729220596979e+01, 2.79895800642755e+01, 2.77860293204499e+01,\n                                                2.75626208352232e+01, 2.73200882347939e+01, 2.70595381651818e+01, 2.67824243431838e+01, 2.64905050795637e+01,\n                                                2.61857864186554e+01, 2.58704561773662e+01, 2.55468167645640e+01, 2.52172249388707e+01, 2.48840438004607e+01,\n                                                2.45496074737136e+01, 2.42161946757963e+01, 2.38860057571801e+01, 2.35611390656729e+01, 2.32435652497694e+01,\n                                                2.29351006846309e+01, 2.26373825776491e+01, 2.23518483848483e+01, 2.20797213786819e+01, 2.18220031031354e+01,\n                                                2.15794724498837e+01, 2.13526904021179e+01, 2.11420091636790e+01, 2.09475843610769e+01, 2.07693891743092e+01,\n                                                2.06072295185463e+01, 2.04607596836053e+01, 2.03294980904969e+01, 2.02128430185575e+01, 2.01100882860329e+01,\n                                                2.00204389364527e+01, 1.99430270032877e+01, 1.98769274082675e+01, 1.98211740055607e+01, 1.97747757243602e+01,\n                                                1.97367326942133e+01, 1.97060521673991e+01, 1.96817639866967e+01, 1.96629352904010e+01, 1.96486841043513e+01,\n                                                1.96381914473011e+01, 1.96307115745081e+01, 1.96255800068974e+01, 1.96222190398319e+01, 1.96201404947835e+01,\n                                                1.96189455655382e+01, 1.96183217128339e+01, 1.96180366712184e+01, 1.96179297425650e+01, 1.96179006554067e+01,\n                                                1.96178963622041e+01, 1.96178959546609e+01, 1.96178876458213e+01, 1.96178313522841e+01, 1.96176244123869e+01,\n                                                1.96170727950516e+01, 1.96158656368928e+01, 1.96135539489204e+01, 1.96095344181791e+01, 1.96030391673151e+01,\n                                                1.95931322581853e+01, 1.95787136223502e+01, 1.95585309561902e+01, 1.95311999148509e+01, 1.94952326626188e+01,\n                                                1.94490744789134e+01, 1.93911476801563e+01, 1.93199016136129e+01, 1.92338669419904e+01, 1.91317119169792e+01,\n                                                1.90122979017017e+01, 1.88747311219545e+01, 1.87184075799449e+01, 1.85430483129297e+01, 1.83487227506008e+01,\n                                                1.81358587946404e+01, 1.79052393199802e+01, 1.76579859195996e+01, 1.73955316741527e+01, 1.71195853136360e+01,\n                                                1.68320892082676e+01, 1.65351731805507e+01, 1.62311053624275e+01, 1.59222405972415e+01, 1.56109666351404e+01,\n                                                1.52996488827742e+01, 1.49905756744887e+01, 1.46859074072885e+01, 1.43876336170791e+01, 1.40975415222168e+01,\n                                                1.38171977008772e+01, 1.35479421099930e+01, 1.32908916288649e+01, 1.30469494510485e+01, 1.28168170186247e+01,\n                                                1.26010063094601e+01, 1.23998515186128e+01, 1.22135200815110e+01, 1.20420234320447e+01, 1.18852279570301e+01,\n                                                1.17428664673618e+01, 1.16145503065298e+01, 1.14997820519401e+01, 1.13979686693497e+01, 1.13084349530022e+01,\n                                                1.12304371025536e+01, 1.11631763274547e+01, 1.11058124088175e+01, 1.10574771737266e+01, 1.10172878404621e+01,\n                                                1.09843601743029e+01, 1.09578213561215e+01, 1.09368224164067e+01, 1.09205500337574e+01, 1.09082374476592e+01,\n                                                1.08991741982347e+01, 1.08927143869112e+01, 1.08882831557938e+01, 1.08853811117688e+01, 1.08835864732621e+01,\n                                                1.08825547900610e+01, 1.08820161746235e+01, 1.08817700804738e+01, 1.08816777626595e+01, 1.08816526500320e+01,\n                                                1.08816489434629e+01, 1.08816486136047e+01, 1.08816421203070e+01, 1.08815981273308e+01, 1.08814364055535e+01,\n                                                1.08810053227929e+01, 1.08800619499259e+01, 1.08782554359488e+01, 1.08751143871888e+01, 1.08700389443115e+01,\n                                                1.08622981989340e+01, 1.08510335195598e+01, 1.08352682515792e+01, 1.08139241049543e+01, 1.07858443346543e+01,\n                                                1.07498235465782e+01, 1.07046436270784e+01, 1.06491149088457e+01, 1.05821212724059e+01, 1.05026674733648e+01,\n                                                1.04099266199871e+01, 1.03032854442565e+01, 1.01823848481881e+01, 1.00471531926078e+01, 9.89782994398231e+00,\n                                                9.73497761399861e+00, 9.55948042017843e+00, 9.37252876530892e+00, 9.17558947296530e+00, 8.97036269940902e+00,\n                                                8.75872750501804e+00, 8.54267910052008e+00, 8.32426163464526e+00, 8.10550090022527e+00, 7.88834137905736e+00,\n                                                7.67459157290996e+00, 7.46588063078999e+00, 7.26362802777447e+00, 7.06902668482246e+00, 6.88303865700668e+00,\n                                                6.70640153340284e+00, 6.53964308538299e+00, 6.38310148827360e+00, 6.23694857108666e+00, 6.10121392319726e+00,\n                                                5.97580819389061e+00, 5.86054445923125e+00, 5.75515702462497e+00, 5.65931743524379e+00, 5.57264776274969e+00,\n                                                5.49473142916032e+00, 5.42512193362532e+00, 5.36334988685814e+00, 5.30892875217588e+00, 5.26135965913888e+00,\n                                                5.22013560844634e+00, 5.18474533316235e+00, 5.15467702593082e+00, 5.12942208650572e+00, 5.10847898927352e+00,\n                                                5.09135731670780e+00, 5.07758195237157e+00, 5.06669737728855e+00, 5.05827196805574e+00, 5.05190215634277e+00,\n                                                5.04721628006279e+00, 5.04387793902145e+00, 5.04158866421416e+00, 5.04008972115880e+00, 5.03916289350193e+00,\n                                                5.03863013205459e+00, 5.03835200357036e+00, 5.03822492916420e+00, 5.03817725994313e+00, 5.03816429283241e+00,\n                                                5.03816237891669e+00, 5.03816220971672e+00, 5.03815889163600e+00, 5.03813641121885e+00, 5.03805377184464e+00,\n                                                5.03783349342799e+00, 5.03735145914730e+00, 5.03642845772178e+00, 5.03482382560869e+00, 5.03223158824061e+00,\n                                                5.02827948908748e+00, 5.02253127044366e+00, 5.01449251827521e+00, 5.00362029210470e+00, 4.98933661814483e+00,\n                                                4.97104572275992e+00, 4.94815462505349e+00, 4.92009640457950e+00, 4.88635513889421e+00, 4.84649120504809e+00,\n                                                4.80016540778040e+00, 4.74716028584862e+00, 4.68739699885271e+00, 4.62094643194540e+00, 4.54803356617204e+00,\n                                                4.46903470371958e+00, 4.38446773459046e+00, 4.29497619137423e+00, 4.20130827388386e+00, 4.10429227673481e+00,\n                                                4.00480990952704e+00, 3.90376890221543e+00, 3.80207611580964e+00, 3.70061221460283e+00, 3.60020885232045e+00,\n                                                3.50162927331309e+00, 3.40555316495684e+00, 3.31256642821521e+00, 3.22315620018992e+00, 3.13771098278196e+00,\n                                                3.05652520596180e+00, 2.97980712458930e+00, 2.90768873064358e+00, 2.84023639751465e+00, 2.77746121387820e+00,\n                                                2.71932831319894e+00, 2.66576485763502e+00, 2.61666661929397e+00, 2.57190328734397e+00, 2.53132272136202e+00,\n                                                2.49475439345609e+00, 2.46201224234778e+00, 2.43289712517377e+00, 2.40719901260598e+00, 2.38469903773801e+00,\n                                                2.36517148129291e+00, 2.34838575417676e+00, 2.33410842103528e+00, 2.32210529297054e+00, 2.31214360219345e+00,\n                                                2.30399425517635e+00, 2.29743414369903e+00, 2.29224847562322e+00, 2.28823307037911e+00, 2.28519654941179e+00,\n                                                2.28296234070755e+00, 2.28137041036259e+00, 2.28027863399634e+00, 2.27956372717340e+00, 2.27912166681113e+00,\n                                                2.27886755410432e+00, 2.27873489252183e+00, 2.27867428021011e+00, 2.27865154274049e+00, 2.27864535762586e+00,\n                                                2.27864444471693e+00, 2.27864436276340e+00, 2.27864274150764e+00, 2.27863175729062e+00, 2.27859137858601e+00,\n                                                2.27848374715735e+00, 2.27824821552120e+00, 2.27779720982276e+00, 2.27701311221278e+00, 2.27574635228400e+00,\n                                                2.27381489005396e+00, 2.27100525923463e+00, 2.26707531381737e+00, 2.26175877764307e+00, 2.25477163065457e+00,\n                                                2.24582027410937e+00, 2.23461130099876e+00, 2.22086256314691e+00, 2.20431508458260e+00, 2.18474523877910e+00,\n                                                2.16197650564414e+00, 2.13589007299310e+00, 2.10643356220630e+00, 2.07362724516862e+00, 2.03756727361982e+00,\n                                                1.99842564501645e+00, 1.95644685514914e+00, 1.91194140966017e+00, 1.86527656195239e+00, 1.81686480077208e+00,\n                                                1.76715072327438e+00, 1.71659700033353e+00, 1.66567017215183e+00, 1.61482700261981e+00, 1.56450206644210e+00,\n                                                1.51509714088063e+00, 1.46697282694743e+00, 1.42044264445124e+00, 1.37576965080508e+00, 1.33316544822672e+00,\n                                                1.29279128971961e+00, 1.25476088653323e+00, 1.21914446527155e+00, 1.18597361910378e+00, 1.15524653538564e+00,\n                                                1.12693324837363e+00, 1.10098064685003e+00, 1.07731705029389e+00, 1.05585624468883e+00, 1.03650093453981e+00,\n                                                1.01914561866458e+00, 1.00367893370528e+00, 9.89985532487083e-01, 9.77947576545809e-01, 9.67445925770313e-01,\n                                                9.58361105403519e-01, 9.50574123492480e-01, 9.43967201718195e-01, 9.38424470431748e-01, 9.33832665440299e-01,\n                                                9.30081850215352e-01, 9.27066173251184e-01, 9.24684656811358e-01, 9.22842000843801e-01, 9.21449375058984e-01,\n                                                9.20425163706319e-01, 9.19695622059990e-01, 9.19195401503124e-01, 9.18867901626164e-01, 9.18665412878958e-01,\n                                                9.18549021666927e-01, 9.18488260681748e-01, 9.18460499791003e-01, 9.18450085933607e-01, 9.18447253131838e-01,\n                                                9.18446835016951e-01, 9.18446796474221e-01, 9.18446022772180e-01, 9.18440780847739e-01, 9.18421511288791e-01,\n                                                9.18370148099214e-01, 9.18257753089613e-01, 9.18042549458534e-01, 9.17668453234747e-01, 9.17064202500931e-01,\n                                                9.16143184482117e-01, 9.14804056866153e-01, 9.12932248554533e-01, 9.10402402542751e-01, 9.07081786321648e-01,\n                                                9.02834640902860e-01, 8.97527368445424e-01, 8.91034373903949e-01, 8.83244285404650e-01, 8.74066192312732e-01,\n                                                8.63435473231021e-01, 8.51318753479283e-01, 8.37717546060027e-01, 8.22670199611736e-01, 8.06251901048682e-01,\n                                                7.88572649141308e-01, 7.69773308124662e-01, 7.50020040462672e-01, 7.29497576002515e-01, 7.08401875799211e-01,\n                                                6.86932777431302e-01, 6.65287162512342e-01, 6.43653077871186e-01, 6.22205091784771e-01, 6.01101003205436e-01,\n                                                5.80479871572891e-01, 5.60461217573192e-01, 5.41145171677258e-01, 5.22613318246378e-01, 5.04929991415210e-01,\n                                                4.88143813317706e-01, 4.72289312881571e-01, 4.57388513399785e-01, 4.43452421598451e-01, 4.30482385759177e-01,\n                                                4.18471314528624e-01, 4.07404762446120e-01, 3.97261895183881e-01, 3.88016349561667e-01, 3.79637002824850e-01,\n                                                3.72088664138488e-01, 3.65332699781256e-01, 3.59327602583235e-01, 3.54029515786344e-01, 3.49392721502788e-01,\n                                                3.45370103980969e-01, 3.41913597624973e-01, 3.38974628880131e-01, 3.36504559519611e-01, 3.34455136492572e-01,\n                                                3.32778950385347e-01, 3.31429900881595e-01, 3.30363663649031e-01, 3.29538149162815e-01, 3.28913940462265e-01,\n                                                3.28454694088158e-01, 3.28127486776651e-01, 3.27903090125858e-01, 3.27756156518525e-01, 3.27665302064091e-01,\n                                                3.27613076061752e-01, 3.27585811205445e-01, 3.27573354083768e-01, 3.27568681054721e-01, 3.27567409883876e-01,\n                                                3.27567222261941e-01, 3.27567204381765e-01, 3.27566839113445e-01, 3.27564364374865e-01, 3.27555267094503e-01,\n                                                3.27531018010362e-01, 3.27477954177439e-01, 3.27376348575228e-01, 3.27199711844116e-01, 3.26914370897597e-01,\n                                                3.26479368342717e-01, 3.25846724198648e-01, 3.24962095940997e-01, 3.23765862916694e-01, 3.22194645357918e-01,\n                                                3.20183245801566e-01, 3.17666971863403e-01, 3.14584265478295e-01, 3.10879527829371e-01, 3.06505995549607e-01,\n                                                3.01428497578975e-01, 2.95625908512861e-01, 2.89093117498965e-01, 2.81842353649559e-01, 2.73903748527616e-01,\n                                                2.65325069540374e-01, 2.56170618774640e-01, 2.46519352724071e-01, 2.36462332839004e-01, 2.26099659945667e-01,\n                                                2.15537074617707e-01, 2.04882419794167e-01, 1.94242161879671e-01, 1.83718153403277e-01, 1.73404795505668e-01,\n                                                1.63386723885878e-01, 1.53737099858681e-01, 1.44516542226143e-01, 1.35772689875253e-01, 1.27540343734950e-01,\n                                                1.19842103802227e-01, 1.12689395007017e-01, 1.06083765714828e-01, 1.00018343977084e-01, 9.44793471981882e-02,\n                                                8.94475578684606e-02, 8.48996983927677e-02, 8.08096590978593e-02, 7.71495531094430e-02, 7.38905885632235e-02,\n                                                7.10037618596644e-02, 6.84603852754009e-02, 6.62324684875344e-02, 6.42929769691989e-02, 6.26159913721764e-02,\n                                                6.11767915046215e-02, 5.99518868352931e-02, 5.89190130023809e-02, 5.80571108628618e-02, 5.73463013924851e-02,\n                                                5.67678663787703e-02, 5.63042414542494e-02, 5.59390246988798e-02, 5.56570009117578e-02, 5.54441788435369e-02,\n                                                5.52878363296685e-02, 5.51765665067450e-02, 5.51003172423634e-02, 5.50504156311789e-02, 5.50195699117637e-02,\n                                                5.50018423779548e-02, 5.49925886585712e-02, 5.49883609346793e-02, 5.49867750304713e-02, 5.49863436318248e-02,\n                                                5.49862799584986e-02, 5.49862736562616e-02, 5.49861424521083e-02, 5.49852535315125e-02, 5.49819858683662e-02,\n                                                5.49732762693225e-02, 5.49542195390202e-02, 5.49177389987179e-02, 5.48543471320428e-02, 5.47520180553676e-02,\n                                                5.45961953046756e-02, 5.43699592000948e-02, 5.40543766517914e-02, 5.36290514574276e-02, 5.30728837844805e-02,\n                                                5.23650329125829e-02, 5.14860574623270e-02, 5.04191833529646e-02, 4.91516239760088e-02, 4.76758531665737e-02,\n                                                4.59907140481803e-02, 4.41022405087352e-02, 4.20240769672162e-02, 3.97774083508438e-02, 3.73903550696539e-02,\n                                                3.48968430804888e-02, 3.23350195136811e-02, 2.97453403392964e-02, 2.71684984671268e-02, 2.46433807148563e-02,\n                                                2.22052362882792e-02, 1.98842087461841e-02, 1.77043335829481e-02, 1.56830436670674e-02, 1.38311651903678e-02,\n                                                1.21533368032516e-02, 1.06487506376567e-02, 9.31209852578974e-03, 8.13460875677663e-03, 7.10507421264595e-03,\n                                                6.21079631944355e-03, 5.43839558282855e-03, 4.77446426942407e-03, 4.20605731684986e-03, 3.72103256371759e-03,\n                                                3.30826076553592e-03, 2.95773022158841e-03, 2.66057125224961e-03, 2.40902353390027e-03, 2.19636569904935e-03,\n                                                2.01682265562653e-03, 1.86546237830498e-03, 1.73809071257125e-03, 1.63115003513781e-03, 1.54162541127789e-03,\n                                                1.46696017731074e-03, 1.40498165298197e-03, 1.35383690896873e-03, 1.31193808445573e-03, 1.27791654918497e-03,\n                                                1.25058512782061e-03, 1.22890757906191e-03, 1.21197450948785e-03, 1.19898488767234e-03, 1.18923230592571e-03,\n                                                1.18209511865075e-03, 1.17702957541610e-03, 1.17356507276156e-03, 1.17130068029780e-03, 1.16990216219648e-03,\n                                                1.16909881651850e-03, 1.16867958999478e-03, 1.16848808582404e-03, 1.16841625310826e-03, 1.16839671353830e-03,\n                                                1.16839382955902e-03, 1.16839353207610e-03, 1.16838721721990e-03, 1.16834443393543e-03, 1.16818717062728e-03,\n                                                1.16776806075336e-03, 1.16685133789929e-03, 1.16509757575756e-03, 1.16205361772614e-03, 1.15714943800072e-03,\n                                                1.14970399332037e-03, 1.13894229006917e-03, 1.12402573711279e-03, 1.10409719072635e-03, 1.07834076929691e-03,\n                                                1.04605445296357e-03, 1.00673079538183e-03, 9.60138101397945e-04, 9.06391769163406e-04, 8.46003953377306e-04,\n                                                7.79900098763164e-04, 7.09393790145896e-04, 6.36116797487318e-04, 5.61908435642522e-04, 4.88675959942952e-04,\n                                                4.18243809576779e-04, 3.52212381315553e-04, 2.91845712524719e-04, 2.38002178591046e-04, 1.91114373677692e-04,\n                                                1.51215701890806e-04, 1.18003826720781e-04, 9.09264832955614e-05, 6.92739835486123e-05, 5.22649469303360e-05,\n                                                3.91163963442409e-05, 2.90946397569769e-05, 2.15474494851264e-05, 1.59200043654550e-05, 1.17574951161714e-05,\n                                                8.69767813327371e-06, 6.45760589890187e-06, 4.81916250549830e-06, 3.61649508562323e-06, 2.72555592317758e-06,\n                                                2.05437449096735e-06, 1.53390151069743e-06, 1.11126664847916e-06, 7.46486989555706e-07, 4.08381197303243e-07,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 3.78534906531058e-07, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 7.10542735760100e-15,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {3.50000000000000e+01, 3.49999998875159e+01, 3.49999964092861e+01, 3.49999728437137e+01, 3.49998862133810e+01,\n                                                3.49996552826056e+01, 3.49991498652305e+01, 3.49981818116636e+01, 3.49964979867864e+01, 3.49937754815726e+01,\n                                                3.49896192249915e+01, 3.49835620844272e+01, 3.49750674692732e+01, 3.49635343911334e+01, 3.49483048923761e+01,\n                                                3.49286737375894e+01, 3.49039002702403e+01, 3.48732223632716e+01, 3.48358724230453e+01, 3.47910954188040e+01,\n                                                3.47381688778484e+01, 3.46764246845671e+01, 3.46052723337760e+01, 3.45242230186571e+01, 3.44329136089613e+01,\n                                                3.43311292496763e+01, 3.42188230561439e+01, 3.40961312744274e+01, 3.39633823754729e+01, 3.38210988832766e+01,\n                                                3.36699912787843e+01, 3.35109440029201e+01, 3.33449942993663e+01, 3.31733052739582e+01, 3.29971350011962e+01,\n                                                3.28178037155931e+01, 3.26366610727983e+01, 3.24550551884369e+01, 3.22743047336336e+01, 3.20956748740284e+01,\n                                                3.19203573681591e+01, 3.17494547552377e+01, 3.15839682964466e+01, 3.14247891936444e+01, 3.12726925775512e+01,\n                                                3.11283338033724e+01, 3.09922466809582e+01, 3.08648433684149e+01, 3.07464157503649e+01, 3.06371381922309e+01,\n                                                3.05370716059097e+01, 3.04461687819539e+01, 3.03642809440428e+01, 3.02911654691098e+01, 3.02264946962806e+01,\n                                                3.01698657236398e+01, 3.01208110661532e+01, 3.00788100221350e+01, 3.00433005701384e+01, 3.00136915936703e+01,\n                                                2.99893752084790e+01, 2.99697389475255e+01, 2.99541775436692e+01, 2.99421040413368e+01, 2.99329599677878e+01,\n                                                2.99262243035834e+01, 2.99214210115797e+01, 2.99181249146323e+01, 2.99159657538310e+01, 2.99146303103053e+01,\n                                                2.99138625324688e+01, 2.99134616744197e+01, 2.99132785170509e+01, 2.99132098080725e+01, 2.99131911175336e+01,\n                                                2.99131883588481e+01, 2.99131879812230e+01, 2.99131790629953e+01, 2.99131186407517e+01, 2.99128965231060e+01,\n                                                2.99123044460316e+01, 2.99110087354450e+01, 2.99085274310782e+01, 2.99042128486319e+01, 2.98972404809173e+01,\n                                                2.98866050460354e+01, 2.98711243705696e+01, 2.98494516338732e+01, 2.98200962804931e+01, 2.97814536187796e+01,\n                                                2.97318427589311e+01, 2.96695521090146e+01, 2.95928911648371e+01, 2.95002468390060e+01, 2.93901421320602e+01,\n                                                2.92612946169196e+01, 2.91126720394753e+01, 2.89435423517759e+01, 2.87535156545212e+01, 2.85425757414399e+01,\n                                                2.83110991030706e+01, 2.80598593333654e+01, 2.77900150612601e+01, 2.75030802257728e+01, 2.72008772373433e+01,\n                                                2.68854764476666e+01, 2.65591285949254e+01, 2.62241987957738e+01, 2.58831096069608e+01, 2.55382966319013e+01,\n                                                2.51921750890834e+01, 2.48471123881920e+01, 2.45054015078508e+01, 2.41692322331550e+01, 2.38406603290217e+01,\n                                                2.35215769419989e+01, 2.32136813082185e+01, 2.29184593939806e+01, 2.26371699763275e+01, 2.23708384388895e+01,\n                                                2.21202575737480e+01, 2.18859940896424e+01, 2.16683993205405e+01, 2.14676227128056e+01, 2.12836269258607e+01,\n                                                2.11162037047422e+01, 2.09649899968745e+01, 2.08294840452152e+01, 2.07090613775805e+01, 2.06029907275198e+01,\n                                                2.05104499756417e+01, 2.04305422055836e+01, 2.03623119394719e+01, 2.03047615653710e+01, 2.02568679031556e+01,\n                                                2.02175987828225e+01, 2.01859294365878e+01, 2.01608584386313e+01, 2.01414228690933e+01, 2.01267123366689e+01,\n                                                2.01158814710798e+01, 2.01081604961552e+01, 2.01028635182090e+01, 2.00993942131317e+01, 2.00972486674852e+01,\n                                                2.00960152203012e+01, 2.00953712579793e+01, 2.00950770281632e+01, 2.00949666527066e+01, 2.00949366279350e+01,\n                                                2.00949321963427e+01, 2.00949317756624e+01, 2.00949231989905e+01, 2.00948650908527e+01, 2.00946514803248e+01,\n                                                2.00940820817940e+01, 2.00928360112272e+01, 2.00904498063286e+01, 2.00863007056242e+01, 2.00795960770379e+01,\n                                                2.00693698070042e+01, 2.00544863542593e+01, 2.00336530221923e+01, 2.00054407927657e+01, 1.99683137784303e+01,\n                                                1.99206669772333e+01, 1.98608715622361e+01, 1.97873264160040e+01, 1.96985140688077e+01, 1.95930586684586e+01,\n                                                1.94697831698940e+01, 1.93277626627241e+01, 1.91663707317588e+01, 1.89853160268377e+01, 1.87846668228014e+01,\n                                                1.85648622379931e+01, 1.83267098389804e+01, 1.80713704122475e+01, 1.78003315161216e+01, 1.75153718471421e+01,\n                                                1.72185183769795e+01, 1.69119977296065e+01, 1.65981826694189e+01, 1.62795342913448e+01, 1.59585409243794e+01,\n                                                1.56376559482539e+01, 1.53192382443186e+01, 1.50055000028230e+01, 1.46984662629627e+01, 1.43999486580484e+01,\n                                                1.41115330463922e+01, 1.38345782222424e+01, 1.35702216881573e+01, 1.33193887356049e+01, 1.30828023129766e+01,\n                                                1.28609925960566e+01, 1.26543062498810e+01, 1.24629158862130e+01, 1.22868302683163e+01, 1.21259056024290e+01,\n                                                1.19798579764314e+01, 1.18482767813854e+01, 1.17306388278076e+01, 1.16263228420345e+01, 1.15346240704077e+01,\n                                                1.14547687959343e+01, 1.13859286539793e+01, 1.13272346997001e+01, 1.12777912188920e+01, 1.12366892820232e+01,\n                                                1.12030200207055e+01, 1.11758875627781e+01, 1.11544215050209e+01, 1.11377887406601e+01, 1.11252044016351e+01,\n                                                1.11159416314470e+01, 1.11093398799923e+01, 1.11048114115874e+01, 1.11018457432923e+01, 1.11000117818640e+01,\n                                                1.10989575009486e+01, 1.10984070900968e+01, 1.10981556071254e+01, 1.10980612678752e+01, 1.10980356053773e+01,\n                                                1.10980318176487e+01, 1.10980314805679e+01, 1.10980248450926e+01, 1.10979798888492e+01, 1.10978146261128e+01,\n                                                1.10973741053207e+01, 1.10964100819452e+01, 1.10945640366087e+01, 1.10913542951796e+01, 1.10861679682448e+01,\n                                                1.10782583777762e+01, 1.10667485682371e+01, 1.10506413942015e+01, 1.10288365224837e+01, 1.10001544715133e+01,\n                                                1.09633675270034e+01, 1.09172370216444e+01, 1.08605560586977e+01, 1.07921963174535e+01, 1.07111571356083e+01,\n                                                1.06166146605446e+01, 1.05079685423591e+01, 1.03848834485101e+01, 1.02473226492974e+01, 1.00955710830278e+01,\n                                                9.93024567928306e+00, 9.75229130939799e+00, 9.56296154425831e+00, 9.36378440888524e+00, 9.15651447422116e+00,\n                                                8.94307381615819e+00, 8.72548545153364e+00, 8.50580365621739e+00, 8.28604592048203e+00, 8.06813110096732e+00,\n                                                7.85382758415180e+00, 7.64471409041501e+00, 7.44215431617871e+00, 7.24728517105163e+00, 7.06101713798114e+00,\n                                                6.88404442334894e+00, 6.71686213706937e+00, 6.55978772763833e+00, 6.41298420494246e+00, 6.27648319217385e+00,\n                                                6.15020643387608e+00, 6.03398494895704e+00, 5.92757548894737e+00, 5.83067431199191e+00, 5.74292851032721e+00,\n                                                5.66394525074804e+00, 5.59329933020387e+00, 5.53053943946813e+00, 5.47519348981178e+00, 5.42677330728617e+00,\n                                                5.38477894648150e+00, 5.34870282502196e+00, 5.31803383253916e+00, 5.29226152252119e+00, 5.27088045087550e+00,\n                                                5.25339468032269e+00, 5.23932242484765e+00, 5.22820076444582e+00, 5.21959031934718e+00, 5.21307973747566e+00,\n                                                5.20828982206344e+00, 5.20487711085137e+00, 5.20253671628463e+00, 5.20100424865582e+00, 5.20005667106740e+00,\n                                                5.19951197483070e+00, 5.19922761367551e+00, 5.19909769113717e+00, 5.19904895342300e+00, 5.19903569565054e+00,\n                                                5.19903373883356e+00, 5.19903356584089e+00, 5.19903017338375e+00, 5.19900718905150e+00, 5.19892269717376e+00,\n                                                5.19869748021495e+00, 5.19820463578311e+00, 5.19726092292086e+00, 5.19562024622897e+00, 5.19296967826228e+00,\n                                                5.18892840725974e+00, 5.18304996964994e+00, 5.17482807341418e+00, 5.16370622691239e+00, 5.14909124729961e+00,\n                                                5.13037052682348e+00, 5.10693268559058e+00, 5.07819094817867e+00, 5.04360827371382e+00, 5.00272298170571e+00,\n                                                4.95517339419645e+00, 4.90071990454006e+00, 4.83926292082955e+00, 4.77085533365048e+00, 4.69570851077708e+00,\n                                                4.61419128237597e+00, 4.52682188282279e+00, 4.43425328668862e+00, 4.33725276031877e+00, 4.23667672625623e+00,\n                                                4.13344222795875e+00, 4.02849643760432e+00, 3.92278581393969e+00, 3.81722668406868e+00, 3.71267911382439e+00,\n                                                3.60992581622057e+00, 3.50965741744925e+00, 3.41246465293516e+00, 3.31883714795092e+00, 3.22916759627683e+00,\n                                                3.14375962231595e+00, 3.06283750996149e+00, 2.98655625727918e+00, 2.91501090833785e+00, 2.84824463737641e+00,\n                                                2.78625548134833e+00, 2.72900187837900e+00, 2.67640728086095e+00, 2.62836411658816e+00, 2.58473731972746e+00,\n                                                2.54536758545894e+00, 2.51007444199968e+00, 2.47865919166610e+00, 2.45090774934047e+00, 2.42659339791356e+00,\n                                                2.40547948007125e+00, 2.38732204864841e+00, 2.37187249947393e+00, 2.35888020853547e+00, 2.34809518822438e+00,\n                                                2.33927076541123e+00, 2.33216626810003e+00, 2.32654968899931e+00, 2.32220027550284e+00, 2.31891097840547e+00,\n                                                2.31649067822227e+00, 2.31476609996373e+00, 2.31358332589339e+00, 2.31280882177074e+00, 2.31232990526201e+00,\n                                                2.31205460477587e+00, 2.31191088150904e+00, 2.31184521507867e+00, 2.31182058164375e+00, 2.31181388078146e+00,\n                                                2.31181289174929e+00, 2.31181280296203e+00, 2.31181104651724e+00, 2.31179914637587e+00, 2.31175540065560e+00,\n                                                2.31163879414630e+00, 2.31138362151175e+00, 2.31089500381528e+00, 2.31004550761287e+00, 2.30867307042595e+00,\n                                                2.30658042832575e+00, 2.30353622643861e+00, 2.29927796607280e+00, 2.29351689717013e+00, 2.28594489691858e+00,\n                                                2.27624328171925e+00, 2.26409338086010e+00, 2.24918856150434e+00, 2.23124724658491e+00, 2.21002632551033e+00,\n                                                2.18533424113023e+00, 2.15704296445554e+00, 2.12509805712780e+00, 2.08952607970138e+00, 2.05043873151441e+00,\n                                                2.00803329624306e+00, 1.96258920009328e+00, 1.91446074719615e+00, 1.86406635862598e+00, 1.81187488778959e+00,\n                                                1.75838979655856e+00, 1.70413213423960e+00, 1.64962334678562e+00, 1.59536894174355e+00, 1.54184393894058e+00,\n                                                1.48948085422824e+00, 1.43866071441745e+00, 1.38970731816732e+00, 1.34288467769122e+00, 1.29839733480581e+00,\n                                                1.25639306771636e+00, 1.21696740430429e+00, 1.18016933227056e+00, 1.14600763421628e+00, 1.11445735822151e+00,\n                                                1.08546604164907e+00, 1.05895941971715e+00, 1.03484645707344e+00, 1.01302363141051e+00, 9.93378468999545e-01,\n                                                9.75792382453349e-01, 9.60142893039404e-01, 9.46305336690578e-01, 9.34154158102686e-01, 9.23563894314093e-01,\n                                                9.14409940716162e-01, 9.06569180646507e-01, 8.99920546034245e-01, 8.94345561946217e-01, 8.89728912917747e-01,\n                                                8.85959054034174e-01, 8.82928875192391e-01, 8.80536413183101e-01, 8.78685593651880e-01, 8.77286974171234e-01,\n                                                8.76258451193586e-01, 8.75525888141532e-01, 8.75023619795819e-01, 8.74694789721040e-01, 8.74491482689031e-01,\n                                                8.74374622561689e-01, 8.74313617200293e-01, 8.74285744752420e-01, 8.74275289062346e-01, 8.74272444882592e-01,\n                                                8.74272025088395e-01, 8.74271986390880e-01, 8.74271209581387e-01, 8.74265946604851e-01, 8.74246599675693e-01,\n                                                8.74195030395569e-01, 8.74082185122646e-01, 8.73866122096658e-01, 8.73490540481676e-01, 8.72883913345632e-01,\n                                                8.71959327348925e-01, 8.70615128571558e-01, 8.68736462636953e-01, 8.66197773919765e-01, 8.62866289422790e-01,\n                                                8.58606455566523e-01, 8.53285220911225e-01, 8.46777968584384e-01, 8.38974807057795e-01, 8.29786839260457e-01,\n                                                8.19151963269363e-01, 8.07039729216520e-01, 7.93454800267327e-01, 7.78438647934550e-01, 7.62069251392326e-01,\n                                                7.44458753411173e-01, 7.25749228241988e-01, 7.06106908781528e-01, 6.85715370600782e-01, 6.64768254216668e-01,\n                                                6.43462111899964e-01, 6.21989894176664e-01, 6.00535461202547e-01, 5.79269342363048e-01, 5.58345803735484e-01,\n                                                5.37901143452544e-01, 5.18053036515703e-01, 4.98900699176048e-01, 4.80525634585874e-01, 4.62992745200197e-01,\n                                                4.46351639790876e-01, 4.30638011162621e-01, 4.15875005138197e-01, 4.02074536579264e-01, 3.89238532361588e-01,\n                                                3.77360095296673e-01, 3.66424589451881e-01, 3.56410649045863e-01, 3.47291112629385e-01, 3.39033883437637e-01,\n                                                3.31602716659937e-01, 3.24957935279393e-01, 3.19057077965709e-01, 3.13855484866153e-01, 3.09306829537711e-01,\n                                                3.05363607229296e-01, 3.01977590881300e-01, 2.99100266316948e-01, 2.96683257048556e-01, 2.94678746936867e-01,\n                                                2.93039905770861e-01, 2.91721318924985e-01, 2.90679417931273e-01, 2.89872904459003e-01, 2.89263156230767e-01,\n                                                2.88814600215019e-01, 2.88495036360992e-01, 2.88275894432537e-01, 2.88132407280301e-01, 2.88043686153657e-01,\n                                                2.87992687236986e-01, 2.87966063213972e-01, 2.87953898936337e-01, 2.87949335769994e-01, 2.87948094485110e-01,\n                                                2.87947911274316e-01, 2.87947893814504e-01, 2.87947537133938e-01, 2.87945120579145e-01, 2.87936237196782e-01,\n                                                2.87912558349113e-01, 2.87860742784105e-01, 2.87761528988419e-01, 2.87589055461360e-01, 2.87310453657071e-01,\n                                                2.86885757960555e-01, 2.86268175050445e-01, 2.85404749908380e-01, 2.84237456004767e-01, 2.82704721450493e-01,\n                                                2.80743380328055e-01, 2.78291009118668e-01, 2.75288573526474e-01, 2.71683273946678e-01, 2.67431442603495e-01,\n                                                2.62501317213570e-01, 2.56875500260399e-01, 2.50552914011891e-01, 2.43550081702175e-01, 2.35901604504875e-01,\n                                                2.27659758805686e-01, 2.18893203170495e-01, 2.09684852247563e-01, 2.00129038435570e-01, 1.90328135201611e-01,\n                                                1.80388853699405e-01, 1.70418443836091e-01, 1.60521030892440e-01, 1.50794299606716e-01, 1.41326701355183e-01,\n                                                1.32195310479794e-01, 1.23464398227583e-01, 1.15184733474138e-01, 1.07393564810017e-01, 1.00115194176929e-01,\n                                                9.33620217647757e-02, 8.71359267798297e-02, 8.14298481740039e-02, 7.62294409110567e-02, 7.15147032021619e-02,\n                                                6.72614944707703e-02, 6.34428890892238e-02, 6.00303344484558e-02, 5.69946019165997e-02, 5.43065348544332e-02,\n                                                5.19376089694390e-02, 4.98603272997400e-02, 4.80484757162429e-02, 4.64772658117525e-02, 4.51233911715860e-02,\n                                                4.39650209431122e-02, 4.29817518402018e-02, 4.21545365893863e-02, 4.14656035739256e-02, 4.08983791933935e-02,\n                                                4.04374213012275e-02, 4.00683690515109e-02, 3.97779116184367e-02, 3.95537756005098e-02, 3.93847285623892e-02,\n                                                3.92605941964561e-02, 3.91722731051871e-02, 3.91117623067245e-02, 3.90721663083866e-02, 3.90476929891577e-02,\n                                                3.90336285322519e-02, 3.90262871471450e-02, 3.90229331567014e-02, 3.90216750155687e-02, 3.90213327759952e-02,\n                                                3.90212822623468e-02, 3.90212772626271e-02, 3.90211731751009e-02, 3.90204679730388e-02, 3.90178756693231e-02,\n                                                3.90109662586084e-02, 3.89958488313553e-02, 3.89669111283837e-02, 3.89166319382213e-02, 3.88354846614689e-02,\n                                                3.87119521811314e-02, 3.85326740614431e-02, 3.82827459862511e-02, 3.79461870857583e-02, 3.75065823376488e-02,\n                                                3.69478939153183e-02, 3.62554172696434e-02, 3.54168359840656e-02, 3.44233063856620e-02, 3.32704820758849e-02,\n                                                3.19593743502935e-02, 3.04969413994343e-02, 2.88963107810858e-02, 2.71765674216269e-02, 2.53620818313749e-02,\n                                                2.34814054368115e-02, 2.15658141683974e-02, 1.96476283823870e-02, 1.77584679935663e-02, 1.59276101383909e-02,\n                                                1.41806008513754e-02, 1.25382351006706e-02, 1.10159682791320e-02, 9.62376649307117e-03, 8.36635241428496e-03,\n                                                7.24376565606377e-03, 6.25213571971983e-03, 5.38456185233827e-03, 4.63200481600268e-03, 3.98411582489899e-03,\n                                                3.42995244122335e-03, 2.95855532519340e-03, 2.55938005413725e-03, 2.22259305318318e-03, 1.93924981869031e-03,\n                                                1.70137792139968e-03, 1.50198804126944e-03, 1.33503471369778e-03, 1.19534544514721e-03, 1.07853302910854e-03,\n                                                9.80901844947368e-04, 8.99355230934873e-04, 8.31308133165010e-04, 7.74607290324525e-04, 7.27460054470441e-04,\n                                                6.88372250102987e-04, 6.56094975774124e-04, 6.29579848634876e-04, 6.07941900078401e-04, 5.90429188434882e-04,\n                                                5.76398196528771e-04, 5.65294172510278e-04, 5.56635686152163e-04, 5.50002763873181e-04, 5.45028020830784e-04,\n                                                5.41390235092365e-04, 5.38809823083852e-04, 5.37045691295646e-04, 5.35892966574636e-04, 5.35181150731034e-04,\n                                                5.34772307020148e-04, 5.34558963821041e-04, 5.34461510675044e-04, 5.34424956697421e-04, 5.34415013518696e-04,\n                                                5.34413545935308e-04, 5.34413394561284e-04, 5.34410181359135e-04, 5.34388411928433e-04, 5.34308392339256e-04,\n                                                5.34095144416824e-04, 5.33628735134073e-04, 5.32736572125714e-04, 5.31188425433982e-04, 5.28695131059465e-04,\n                                                5.24912114279630e-04, 5.19448962428726e-04, 5.11886178507837e-04, 5.01799847604900e-04, 4.88794155977246e-04,\n                                                4.72540485553452e-04, 4.52820236290563e-04, 4.29566831485317e-04, 4.02900915865700e-04, 3.73152061406756e-04,\n                                                3.40860842172219e-04, 3.06757229232346e-04, 2.71714808619095e-04, 2.36684744052695e-04, 2.02617641853919e-04,\n                                                1.70384294683856e-04, 1.40706744225838e-04, 1.14109016585928e-04, 9.08929755922827e-05, 7.11403316628889e-05,\n                                                5.47381025270965e-05, 4.14220610878147e-05, 3.08304026930273e-05, 2.25576923824633e-05, 1.61982444524256e-05,\n                                                1.13708472042617e-05, 7.72420644068461e-06, 4.93033959259037e-06, 2.66496370926461e-06, 3.14365074416401e-07,\n                                                1.78648642190637e-06, 2.40745951174404e-06, 2.56195117032121e-06, 2.40715642974010e-06, 2.05873513436927e-06,\n                                                1.63006010467370e-06, 1.22324765072790e-06, 9.09219416200813e-07, 7.09999902426262e-07, 5.96630975735479e-07,\n                                                5.16962103347396e-07, 4.33199744520607e-07, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 7.10542735760100e-15, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                7.10542735760100e-15, 1.42108547152020e-14, 7.10542735760100e-15, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {3.60000000000000e+01, 3.59999998827730e+01, 3.59999962578807e+01, 3.59999716986467e+01, 3.59998814154698e+01,\n                                                3.59996407472547e+01, 3.59991140182179e+01, 3.59981051444763e+01, 3.59963503148692e+01, 3.59935129986450e+01,\n                                                3.59891814530589e+01, 3.59828688223517e+01, 3.59740158432640e+01, 3.59619961092789e+01, 3.59461238037965e+01,\n                                                3.59256637966288e+01, 3.58998440088622e+01, 3.58678699812255e+01, 3.58289416147583e+01, 3.57822720655492e+01,\n                                                3.57271087385168e+01, 3.56627562113631e+01, 3.55886007128146e+01, 3.55041354836136e+01, 3.54089859963554e+01,\n                                                3.53029336608610e+01, 3.51859363744998e+01, 3.50581441737723e+01, 3.49199083677558e+01, 3.47717829095164e+01,\n                                                3.46145173599737e+01, 3.44490415401037e+01, 3.42764427353664e+01, 3.40979369839973e+01, 3.39148364406025e+01,\n                                                3.37285149942483e+01, 3.35403742277636e+01, 3.33518114774280e+01, 3.31641912725819e+01, 3.29788209010867e+01,\n                                                3.27969303494162e+01, 3.26196564711241e+01, 3.24480309774000e+01, 3.22829717195145e+01, 3.21252767223107e+01,\n                                                3.19756204946495e+01, 3.18345522486239e+01, 3.17024957719357e+01, 3.15797507946499e+01, 3.14664957610967e+01,\n                                                3.13627919576342e+01, 3.12685889610610e+01, 3.11837313673556e+01, 3.11079667431000e+01, 3.10409547181557e+01,\n                                                3.09822771117821e+01, 3.09314489575392e+01, 3.08879302659244e+01, 3.08511383380930e+01, 3.08204604195252e+01,\n                                                3.07952664597862e+01, 3.07749217247125e+01, 3.07587989920403e+01, 3.07462900525249e+01, 3.07368162378844e+01,\n                                                3.07298377060940e+01, 3.07248612348281e+01, 3.07214463056630e+01, 3.07192093046657e+01, 3.07178257179730e+01,\n                                                3.07170302618758e+01, 3.07166149530713e+01, 3.07164251929852e+01, 3.07163540070919e+01, 3.07163346427714e+01,\n                                                3.07163317846372e+01, 3.07163313933989e+01, 3.07163221536751e+01, 3.07162595532506e+01, 3.07160294284298e+01,\n                                                3.07154160075316e+01, 3.07140735883630e+01, 3.07115028385793e+01, 3.07070327320354e+01, 3.06998090557167e+01,\n                                                3.06887903264187e+01, 3.06727518325115e+01, 3.06502983488952e+01, 3.06198858467036e+01, 3.05798522202373e+01,\n                                                3.05284566760676e+01, 3.04639269795637e+01, 3.03845132551027e+01, 3.02885465290458e+01, 3.01744997455582e+01,\n                                                3.00410486358298e+01, 2.98871296292603e+01, 2.97119919725252e+01, 2.95152413278166e+01, 2.92968722686714e+01,\n                                                2.90572872044705e+01, 2.87972993829439e+01, 2.85181180100689e+01, 2.82213146707968e+01, 2.79087725476015e+01,\n                                                2.75826232177933e+01, 2.72451788358472e+01, 2.68988683994918e+01, 2.65461843937148e+01, 2.61896412425646e+01,\n                                                2.58317422569101e+01, 2.54749496078979e+01, 2.51216528932352e+01, 2.47741348084447e+01, 2.44345353901317e+01,\n                                                2.41048179955392e+01, 2.37867403601949e+01, 2.34818331625408e+01, 2.31913871608463e+01, 2.29164486789836e+01,\n                                                2.26578222984296e+01, 2.24160791463898e+01, 2.21915690962923e+01, 2.19844353944666e+01, 2.17946305645147e+01,\n                                                2.16219328115430e+01, 2.14659624809627e+01, 2.13261983847228e+01, 2.12019939820260e+01, 2.10925934988692e+01,\n                                                2.09971481060497e+01, 2.09147322650827e+01, 2.08443603103968e+01, 2.07850032757370e+01, 2.07356059015036e+01,\n                                                2.06951036843148e+01, 2.06624397557671e+01, 2.06365813090562e+01, 2.06165352345738e+01, 2.06013625834371e+01,\n                                                2.05901914553390e+01, 2.05822279075195e+01, 2.05767645070888e+01, 2.05731861997099e+01, 2.05709732421019e+01,\n                                                2.05697010403045e+01, 2.05690368447470e+01, 2.05687333702361e+01, 2.05686195267814e+01, 2.05685885586308e+01,\n                                                2.05685839877977e+01, 2.05685835538996e+01, 2.05685747077485e+01, 2.05685147738511e+01, 2.05682944516689e+01,\n                                                2.05677071625707e+01, 2.05664219401452e+01, 2.05639607593893e+01, 2.05596812895306e+01, 2.05527659885643e+01,\n                                                2.05422183753228e+01, 2.05268672043344e+01, 2.05053791133397e+01, 2.04762800953495e+01, 2.04379858509866e+01,\n                                                2.03888406935914e+01, 2.03271642114535e+01, 2.02513043565467e+01, 2.01596950640500e+01, 2.00509159680188e+01,\n                                                1.99237513385379e+01, 1.97772451057964e+01, 1.96107488330709e+01, 1.94239598063215e+01, 1.92169470306404e+01,\n                                                1.89901638065315e+01, 1.87444465725340e+01, 1.84810006555517e+01, 1.82013742595554e+01, 1.79074222957883e+01,\n                                                1.76012615046777e+01, 1.72852179384724e+01, 1.69617676499117e+01, 1.66334717930683e+01, 1.63029084868029e+01,\n                                                1.59726054215078e+01, 1.56449784786098e+01, 1.53222816060911e+01, 1.50065714036723e+01, 1.46996868528264e+01,\n                                                1.44032416675031e+01, 1.41186250667168e+01, 1.38470068046473e+01, 1.35893435673066e+01, 1.33463854777695e+01,\n                                                1.31186827250285e+01, 1.29065929524685e+01, 1.27102900865902e+01, 1.25297749995602e+01, 1.23648880227429e+01,\n                                                1.22153230208998e+01, 1.20806425638471e+01, 1.19602936932437e+01, 1.18536238418580e+01, 1.17598965766550e+01,\n                                                1.16783069657156e+01, 1.16079964835258e+01, 1.15480674523914e+01, 1.14975970624108e+01, 1.14556510187925e+01,\n                                                1.14212968385863e+01, 1.13936167674359e+01, 1.13717202206708e+01, 1.13547555823263e+01, 1.13419211304503e+01,\n                                                1.13324748061029e+01, 1.13257425137183e+01, 1.13211246365742e+01, 1.13181004749343e+01, 1.13162303651313e+01,\n                                                1.13151553119889e+01, 1.13145940589184e+01, 1.13143376226770e+01, 1.13142414253861e+01, 1.13142152574656e+01,\n                                                1.13142113951381e+01, 1.13142110514186e+01, 1.13142042852584e+01, 1.13141584436137e+01, 1.13139899261652e+01,\n                                                1.13135407304038e+01, 1.13125577266268e+01, 1.13106753490129e+01, 1.13074024800967e+01, 1.13021142691010e+01,\n                                                1.12940495774993e+01, 1.12823146762543e+01, 1.12658937137023e+01, 1.12436663155485e+01, 1.12144324554304e+01,\n                                                1.11769444378006e+01, 1.11299454645475e+01, 1.10722138237095e+01, 1.10026112657528e+01, 1.09201336546945e+01,\n                                                1.08239615416558e+01, 1.07135079563457e+01, 1.05884604972925e+01, 1.04488147703719e+01, 1.02948964160873e+01,\n                                                1.01273694075100e+01, 9.94722900635609e+00, 9.75577872514964e+00, 9.55459181517318e+00, 9.34545909294362e+00,\n                                                9.13032619135693e+00, 8.91122439489433e+00, 8.69019990264657e+00, 8.46924650798424e+00, 8.25024622463032e+00,\n                                                8.03492137576991e+00, 7.82480025836365e+00, 7.62119693827359e+00, 7.42520428062454e+00, 7.23769818873161e+00,\n                                                7.05935034174461e+00, 6.89064651076484e+00, 6.73190772994123e+00, 6.58331207882394e+00, 6.44491545122666e+00,\n                                                6.31667031429965e+00, 6.19844200547251e+00, 6.09002252384449e+00, 5.99114203542087e+00, 5.90147844574331e+00,\n                                                5.82066543155564e+00, 5.74829930114841e+00, 5.68394500198856e+00, 5.62714153615368e+00, 5.57740699125488e+00,\n                                                5.53424335124220e+00, 5.49714121672706e+00, 5.46558453463619e+00, 5.43905540810044e+00, 5.41703902638412e+00,\n                                                5.39902871987047e+00, 5.38453110683624e+00, 5.37307125868050e+00, 5.36419777122379e+00, 5.35748759510112e+00,\n                                                5.35255045169256e+00, 5.34903264565360e+00, 5.34662008329784e+00, 5.34504031905283e+00, 5.34406347978041e+00,\n                                                5.34350195732064e+00, 5.34320881029972e+00, 5.34307487318465e+00, 5.34302462942498e+00, 5.34301096196796e+00,\n                                                5.34300894468224e+00, 5.34300876634382e+00, 5.34300526905428e+00, 5.34298157446487e+00, 5.34289447157242e+00,\n                                                5.34266229434393e+00, 5.34215421619795e+00, 5.34118132384373e+00, 5.33948988782231e+00, 5.33675723661608e+00,\n                                                5.33259062531187e+00, 5.32652945989860e+00, 5.31805118334661e+00, 5.30658103784415e+00, 5.29150577863637e+00,\n                                                5.27219122283641e+00, 5.24800327279709e+00, 5.21833176970638e+00, 5.18261623212526e+00, 5.14037225008785e+00,\n                                                5.09121707889567e+00, 5.03489284853992e+00, 4.97128580629673e+00, 4.90044015502489e+00, 4.82256532854512e+00,\n                                                4.73803592754441e+00, 4.64738398328977e+00, 4.55128368613654e+00, 4.45052919560221e+00, 4.34600664489474e+00,\n                                                4.23866197377703e+00, 4.12946674174574e+00, 4.01938448881347e+00, 3.90934035456303e+00, 3.80019636622263e+00,\n                                                3.69273400240154e+00, 3.58764446763673e+00, 3.48552589101322e+00, 3.38688575118394e+00, 3.29214646226488e+00,\n                                                3.20165223643001e+00, 3.11567588299445e+00, 3.03442485194907e+00, 2.95804637248867e+00, 2.88663187212578e+00,\n                                                2.82022098871980e+00, 2.75880546460746e+00, 2.70233311270574e+00, 2.65071192966013e+00, 2.60381433796999e+00,\n                                                2.56148148261470e+00, 2.52352748773904e+00, 2.48974358700821e+00, 2.45990206627444e+00, 2.43375998893433e+00,\n                                                2.41106270483961e+00, 2.39154716759955e+00, 2.37494509975964e+00, 2.36098604977797e+00, 2.34940037947973e+00,\n                                                2.33992220726008e+00, 2.33229231287235e+00, 2.32626098670830e+00, 2.32159078274379e+00, 2.31805911245224e+00,\n                                                2.31546059941889e+00, 2.31360910313771e+00, 2.31233931695408e+00, 2.31150785000250e+00, 2.31099371613325e+00,\n                                                2.31069817328250e+00, 2.31054388287314e+00, 2.31047338850123e+00, 2.31044694398296e+00, 2.31043975046626e+00,\n                                                2.31043868871947e+00, 2.31043859340450e+00, 2.31043670782422e+00, 2.31042393277477e+00, 2.31037697085696e+00,\n                                                2.31025179158461e+00, 2.30997785989453e+00, 2.30945332489851e+00, 2.30854139494132e+00, 2.30706812006234e+00,\n                                                2.30482179529760e+00, 2.30155418333939e+00, 2.29698372710376e+00, 2.29080087557068e+00, 2.28267557443022e+00,\n                                                2.27226687326057e+00, 2.25923447335025e+00, 2.24325188973155e+00, 2.22402073776210e+00, 2.20128549409807e+00,\n                                                2.17484794343088e+00, 2.14458042667549e+00, 2.11043697250726e+00, 2.07246143647590e+00, 2.03079189712562e+00,\n                                                1.98566076445884e+00, 1.93739033137690e+00, 1.88638382356032e+00, 1.83311235024001e+00, 1.77809849397214e+00,\n                                                1.72189756461091e+00, 1.66507774425118e+00, 1.60820043546250e+00, 1.55180207756549e+00, 1.49637851711539e+00,\n                                                1.44237273242715e+00, 1.39016635904238e+00, 1.34007509438442e+00, 1.29234772552696e+00, 1.24716826337923e+00,\n                                                1.20466050201588e+00, 1.16489425709494e+00, 1.12789256025417e+00, 1.09363917475297e+00, 1.06208592520576e+00,\n                                                1.03315947629601e+00, 1.00676733218153e+00, 9.82802946802742e-01, 9.61149928821413e-01, 9.41685392033712e-01,\n                                                9.24282544992238e-01, 9.08812636401230e-01, 8.95146380447542e-01, 8.83154983200377e-01, 8.72710881415621e-01,\n                                                8.63688291443076e-01, 8.55963650468865e-01, 8.49416016276876e-01, 8.43927475761170e-01, 8.39383596891274e-01,\n                                                8.35673943877495e-01, 8.32692661037427e-01, 8.30339117539594e-01, 8.28518593137460e-01, 8.27142974676164e-01,\n                                                8.26131425113410e-01, 8.25410981602033e-01, 8.24917037300224e-01, 8.24593663271024e-01, 8.24393732090059e-01,\n                                                8.24278813260349e-01, 8.24218821581461e-01, 8.24191412327750e-01, 8.24181130403346e-01, 8.24178333492590e-01,\n                                                8.24177920675226e-01, 8.24177882620837e-01, 8.24177118721664e-01, 8.24171943214736e-01, 8.24152917838745e-01,\n                                                8.24102205744275e-01, 8.23991236619115e-01, 8.23778767474046e-01, 8.23409438247189e-01, 8.22812923569096e-01,\n                                                8.21903783108489e-01, 8.20582109823540e-01, 8.18735064234730e-01, 8.16239359229222e-01, 8.12964720069630e-01,\n                                                8.08778285886845e-01, 8.03549842361463e-01, 7.97157684731481e-01, 7.89494814397827e-01, 7.80475084310289e-01,\n                                                7.70038844164070e-01, 7.58157612886585e-01, 7.44837336457529e-01, 7.30119880126743e-01, 7.14082551453231e-01,\n                                                6.96835638338456e-01, 6.78518148122912e-01, 6.59292117898708e-01, 6.39336001626219e-01, 6.18837704014723e-01,\n                                                5.97987816019895e-01, 5.76973519813905e-01, 5.55973493499572e-01, 5.35153986822237e-01, 5.14666088171218e-01,\n                                                4.94644083309872e-01, 4.75204730002176e-01, 4.56447241213262e-01, 4.38453775083033e-01, 4.21290259680141e-01,\n                                                4.05007421148852e-01, 3.89641924204589e-01, 3.75217566994799e-01, 3.61746495283796e-01, 3.49230414167273e-01,\n                                                3.37661781428508e-01, 3.27024968208548e-01, 3.17297372581095e-01, 3.08450471823448e-01, 3.00450800676657e-01,\n                                                2.93260845933361e-01, 2.86839851984404e-01, 2.81144536913644e-01, 2.76129723694829e-01, 2.71748895422022e-01,\n                                                2.67954686836319e-01, 2.64699326405228e-01, 2.61935043729558e-01, 2.59614456101396e-01, 2.57690945738155e-01,\n                                                2.56119035795358e-01, 2.54854769018827e-01, 2.53856088204067e-01, 2.53083212896904e-01, 2.52499002418844e-01,\n                                                2.52069291739502e-01, 2.51763184296010e-01, 2.51553284833015e-01, 2.51415855838303e-01, 2.51330883168848e-01,\n                                                2.51282039840262e-01, 2.51256541401830e-01, 2.51244891452657e-01, 2.51240521235083e-01, 2.51239332437542e-01,\n                                                2.51239156973789e-01, 2.51239140252281e-01, 2.51238798653915e-01, 2.51236484283851e-01, 2.51227976550403e-01,\n                                                2.51205299099439e-01, 2.51155675343661e-01, 2.51060660186496e-01, 2.50895491449818e-01, 2.50628705052591e-01,\n                                                2.50222058081881e-01, 2.49630802366994e-01, 2.48804346510063e-01, 2.47687334930880e-01, 2.46221156918430e-01,\n                                                2.44345876064997e-01, 2.42002540856518e-01, 2.39135801964281e-01, 2.35696723789374e-01, 2.31645641344926e-01,\n                                                2.26954883936749e-01, 2.21611169882053e-01, 2.15617476462725e-01, 2.08994209362331e-01, 2.01779536219931e-01,\n                                                1.94028806867408e-01, 1.85813052788369e-01, 1.77216632915275e-01, 1.68334163848129e-01, 1.59266932065854e-01,\n                                                1.50119027167960e-01, 1.40993454124249e-01, 1.31988476952714e-01, 1.23194417034874e-01, 1.14691080109196e-01,\n                                                1.06545923044656e-01, 9.88130026535146e-02, 9.15326823936553e-02, 8.47320162786858e-02, 7.84256880339029e-02,\n                                                7.26173601209226e-02, 6.73012814743714e-02, 6.24640120665276e-02, 5.80861426512982e-02, 5.41439146029461e-02,\n                                                5.06106733245062e-02, 4.74581158006231e-02, 4.46573161905590e-02, 4.21795317040292e-02, 3.99968041117233e-02,\n                                                3.80823805107084e-02, 3.64109811837636e-02, 3.49589435083928e-02, 3.37042698247956e-02, 3.26266047691561e-02,\n                                                3.17071644528397e-02, 3.09286364647861e-02, 3.02750662764737e-02, 2.97317423900552e-02, 2.92850895534116e-02,\n                                                2.89225765802357e-02, 2.86326427436023e-02, 2.84046443487469e-02, 2.82288209438448e-02, 2.80962787330949e-02,\n                                                2.79989871773978e-02, 2.79297835791255e-02, 2.78823797222714e-02, 2.78513644304468e-02, 2.78321962260435e-02,\n                                                2.78211810905304e-02, 2.78154315539751e-02, 2.78128048530135e-02, 2.78118195369146e-02, 2.78115515117818e-02,\n                                                2.78115119520095e-02, 2.78115080364714e-02, 2.78114265203229e-02, 2.78108742419221e-02, 2.78088440900675e-02,\n                                                2.78034330805426e-02, 2.77915944143885e-02, 2.77689341943201e-02, 2.77295661643819e-02, 2.76660396296009e-02,\n                                                2.75693574146771e-02, 2.74291015996866e-02, 2.72336838787339e-02, 2.69707336900993e-02, 2.66276298277148e-02,\n                                                2.61921694998009e-02, 2.56533528620082e-02, 2.50022419984504e-02, 2.42328333807933e-02, 2.33428653228955e-02,\n                                                2.23344709042834e-02, 2.12145862850548e-02, 1.99950372686928e-02, 1.86922542803103e-02, 1.73266055882522e-02,\n                                                1.59213854626898e-02, 1.45015404225504e-02, 1.30922541680860e-02, 1.17175326682499e-02, 1.03989306129151e-02,\n                                                9.15453882060291e-03, 7.99831346727586e-03, 6.93977985625338e-03, 5.98409503398756e-03, 5.13241325342761e-03,\n                                                4.38247186889384e-03, 3.72930490463830e-03, 3.16599594343359e-03, 2.68439721723723e-03, 2.27576278562225e-03,\n                                                1.93126568640878e-03, 1.64238845965059e-03, 1.40119161223851e-03, 1.20047486351638e-03, 1.03385163138370e-03,\n                                                8.95758809789982e-04, 7.81422344545035e-04, 6.86795595953527e-04, 6.08483275613025e-04, 5.43659936013796e-04,\n                                                4.89989106654320e-04, 4.45547159564796e-04, 4.08754491310503e-04, 3.78315337187018e-04, 3.53166438038954e-04,\n                                                3.32433980062774e-04, 3.15397816649465e-04, 3.01461914823165e-04, 2.90130097994279e-04, 2.80986324042942e-04,\n                                                2.73678862072302e-04, 2.67907799994305e-04, 2.63415358972452e-04, 2.59978531801153e-04, 2.57403609680296e-04,\n                                                2.55522209535286e-04, 2.54188455400595e-04, 2.53277000446417e-04, 2.52681604486327e-04, 2.52314010708687e-04,\n                                                2.52102900304862e-04, 2.51992745290863e-04, 2.51942429088103e-04, 2.51923556085387e-04, 2.51918422399910e-04,\n                                                2.51917664684242e-04, 2.51917586517436e-04, 2.51915927215407e-04, 2.51904685534043e-04, 2.51863363956772e-04,\n                                                2.51753247027864e-04, 2.51512417065669e-04, 2.51051804681879e-04, 2.50252688374530e-04, 2.48966169827725e-04,\n                                                2.47015255872896e-04, 2.44200228010527e-04, 2.40307919277427e-04, 2.35125279424153e-04, 2.28457142135596e-04,\n                                                2.20147393022785e-04, 2.10101826120024e-04, 1.98310008428848e-04, 1.84862686822385e-04, 1.69960973458672e-04,\n                                                1.53914030548208e-04, 1.37123404158501e-04, 1.20054428798255e-04, 1.03197793933418e-04, 8.70266872468051e-05,\n                                                7.19560880497738e-05, 5.83102565272497e-05, 4.63023903591875e-05, 3.60276952733329e-05, 2.74689944248507e-05,\n                                                2.05132195176816e-05, 1.49770806103788e-05, 1.06390586509519e-05, 7.27119866894554e-06, 4.65905404922751e-06,\n                                                2.59150107950745e-06, 7.18444674419061e-07, 1.36287653162981e-06, 2.10818348023167e-06, 2.57038061590720e-06,\n                                                2.85529808508045e-06, 2.95572778696851e-06, 2.85193316784671e-06, 2.55616780009404e-06, 2.12395736554072e-06,\n                                                1.64109463440809e-06, 1.19786594154903e-06, 8.61379049865718e-07, 6.52877808704488e-07, 5.40323533471110e-07,\n                                                4.64808884714785e-07, 3.83301390627366e-07, 2.13162820728030e-14, 2.13162820728030e-14, 2.13162820728030e-14,\n                                                2.84217094304040e-14, 2.84217094304040e-14, 2.13162820728030e-14, 2.84217094304040e-14, 2.13162820728030e-14,\n                                                2.84217094304040e-14, 2.84217094304040e-14, 2.13162820728030e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14, 2.13162820728030e-14, 2.84217094304040e-14, 2.13162820728030e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {3.70000000000000e+01, 3.69999998781642e+01, 3.69999961107602e+01, 3.69999705859854e+01, 3.69998767533393e+01,\n                                                3.69996266232448e+01, 3.69990791856037e+01, 3.69980306466167e+01, 3.69962068207210e+01, 3.69932579396940e+01,\n                                                3.69887560581423e+01, 3.69821951498726e+01, 3.69729939107242e+01, 3.69605012189272e+01, 3.69440041620159e+01,\n                                                3.69227385252096e+01, 3.68959016500854e+01, 3.68626676064509e+01, 3.68222046571438e+01, 3.67736950086134e+01,\n                                                3.67163567980456e+01, 3.66494681412654e+01, 3.65723928379675e+01, 3.64846070081741e+01, 3.63857255523598e+01,\n                                                3.62755269536300e+01, 3.61539746603774e+01, 3.60212331904935e+01, 3.58776772499637e+01, 3.57238925816002e+01,\n                                                3.55606679184407e+01, 3.53889782199269e+01, 3.52099601884335e+01, 3.50248817615054e+01, 3.48351077377286e+01,\n                                                3.46420638578368e+01, 3.44472015257205e+01, 3.42519649720199e+01, 3.40577621304327e+01, 3.38659399215449e+01,\n                                                3.36777641171472e+01, 3.34944035565695e+01, 3.33169182356891e+01, 3.31462506847645e+01, 3.29832200641112e+01,\n                                                3.28285184955193e+01, 3.26827092702246e+01, 3.25462266969580e+01, 3.24193774538195e+01, 3.23023433753568e+01,\n                                                3.21951856409464e+01, 3.20978503381446e+01, 3.20101753633508e+01, 3.19318985998491e+01, 3.18626672861622e+01,\n                                                3.18020484594380e+01, 3.17495403310370e+01, 3.17045844250792e+01, 3.16665782853593e+01, 3.16348885317939e+01,\n                                                3.16088640249185e+01, 3.15878488770182e+01, 3.15711950328992e+01, 3.15582741340644e+01, 3.15484883791757e+01,\n                                                3.15412801029491e+01, 3.15361398163121e+01, 3.15326124832844e+01, 3.15303018542807e+01, 3.15288727301385e+01,\n                                                3.15280510940326e+01, 3.15276221167599e+01, 3.15274261114049e+01, 3.15273525826903e+01, 3.15273325810651e+01,\n                                                3.15273296288660e+01, 3.15273292247516e+01, 3.15273196809366e+01, 3.15272550202537e+01, 3.15270173217568e+01,\n                                                3.15263837126196e+01, 3.15249971140168e+01, 3.15223417631225e+01, 3.15177245589189e+01, 3.15102631991400e+01,\n                                                3.14988819779210e+01, 3.14823159866071e+01, 3.14591242880908e+01, 3.14277124015039e+01, 3.13863641254071e+01,\n                                                3.13332823377435e+01, 3.12666379463653e+01, 3.11846256484049e+01, 3.10855246319261e+01, 3.09677618753609e+01,\n                                                3.08299753285128e+01, 3.06710740368226e+01, 3.04902922039913e+01, 3.02872342334695e+01, 3.00619078733519e+01,\n                                                2.98147426781073e+01, 2.95465912122589e+01, 2.92587111075369e+01, 2.89527277379851e+01, 2.86305801324872e+01,\n                                                2.82944562122484e+01, 2.79467259208543e+01, 2.75898804936205e+01, 2.72264825002740e+01, 2.68591260741255e+01,\n                                                2.64904027661547e+01, 2.61228676497358e+01, 2.57590024231341e+01, 2.54011755520360e+01, 2.50516021412185e+01,\n                                                2.47123073139430e+01, 2.43850964760246e+01, 2.40715345439345e+01, 2.37729346865389e+01, 2.34903558441418e+01,\n                                                2.32246074718781e+01, 2.29762596285279e+01, 2.27456565956979e+01, 2.25329325191300e+01, 2.23380279735622e+01,\n                                                2.21607067595521e+01, 2.20005725814994e+01, 2.18570855042422e+01, 2.17295782405750e+01, 2.16172723979173e+01,\n                                                2.15192948284642e+01, 2.14346942020450e+01, 2.13624578695663e+01, 2.13015290181741e+01, 2.12508240446601e+01,\n                                                2.12092499965966e+01, 2.11757218557233e+01, 2.11491793695819e+01, 2.11286030797825e+01, 2.11130291531834e+01,\n                                                2.11015625999534e+01, 2.10933884634832e+01, 2.10877805935836e+01, 2.10841076667522e+01, 2.10818361938575e+01,\n                                                2.10805303526541e+01, 2.10798485946061e+01, 2.10795370957193e+01, 2.10794202420556e+01, 2.10793884550562e+01,\n                                                2.10793837633628e+01, 2.10793833179918e+01, 2.10793742379340e+01, 2.10793127192863e+01, 2.10790865714299e+01,\n                                                2.10784837534921e+01, 2.10771645479459e+01, 2.10746382906768e+01, 2.10702456685662e+01, 2.10631475273265e+01,\n                                                2.10523210480061e+01, 2.10365640371388e+01, 2.10145079159346e+01, 2.09846397698977e+01, 2.09453335158988e+01,\n                                                2.08948898499981e+01, 2.08315841590466e+01, 2.07537210315380e+01, 2.06596934272314e+01, 2.05480440196222e+01,\n                                                2.04175257856237e+01, 2.02671586651193e+01, 2.00962791236181e+01, 1.99045797699696e+01, 1.96921368033374e+01,\n                                                1.94594239167641e+01, 1.92073122252597e+01, 1.89370566233889e+01, 1.86502695288294e+01, 1.83488831461013e+01,\n                                                1.80351012792914e+01, 1.77113416348222e+01, 1.73801699062273e+01, 1.70442280224205e+01, 1.67061606339941e+01,\n                                                1.63685454819775e+01, 1.60338336847184e+01, 1.57043044891840e+01, 1.53820359579364e+01, 1.50688896776914e+01,\n                                                1.47665053449366e+01, 1.44763007320274e+01, 1.41994737334997e+01, 1.39370049879063e+01, 1.36896610742207e+01,\n                                                1.34579990606159e+01, 1.32423732620729e+01, 1.30429447098883e+01, 1.28596933471544e+01, 1.26924325476227e+01,\n                                                1.25408253064476e+01, 1.24044013789880e+01, 1.22825747089840e+01, 1.21746606347850e+01, 1.20798925402141e+01,\n                                                1.19974377859477e+01, 1.19264128933085e+01, 1.18658980430965e+01, 1.18149509951378e+01, 1.17726205336579e+01,\n                                                1.17379595074104e+01, 1.17100374718134e+01, 1.16879528641579e+01, 1.16708445631916e+01, 1.16579026112893e+01,\n                                                1.16483778199038e+01, 1.16415899440620e+01, 1.16369341039645e+01, 1.16338851531819e+01, 1.16319997425966e+01,\n                                                1.16309159035152e+01, 1.16303500664362e+01, 1.16300915364185e+01, 1.16299945537921e+01, 1.16299681722520e+01,\n                                                1.16299642783951e+01, 1.16299639318696e+01, 1.16299571104754e+01, 1.16299108946197e+01, 1.16297410016555e+01,\n                                                1.16292881402212e+01, 1.16282971190152e+01, 1.16263994054810e+01, 1.16230999248900e+01, 1.16177688570150e+01,\n                                                1.16096391442096e+01, 1.15978103586655e+01, 1.15812594720208e+01, 1.15588589105161e+01, 1.15294020488012e+01,\n                                                1.14916359859726e+01, 1.14443010579303e+01, 1.13861760815678e+01, 1.13161278225595e+01, 1.12331626664038e+01,\n                                                1.11364779997702e+01, 1.10255104313574e+01, 1.08999777564768e+01, 1.07599115530631e+01, 1.06056775366355e+01,\n                                                1.04379813314946e+01, 1.02578581461165e+01, 1.00666459492162e+01, 9.86594305969017e+00, 9.65755246403497e+00,\n                                                9.44341648290045e+00, 9.22554641917023e+00, 9.00595234095444e+00, 8.78657805586550e+00, 8.56924559813363e+00,\n                                                8.35561228474818e+00, 8.14714181750098e+00, 7.94508928985855e+00, 7.75049856759337e+00, 7.56420954616201e+00,\n                                                7.38687233422053e+00, 7.21896544741023e+00, 7.06081550799180e+00, 6.91261657637651e+00, 6.77444793014705e+00,\n                                                6.64628972658711e+00, 6.52803645775433e+00, 6.41950840631928e+00, 6.32046145097240e+00, 6.23059559249951e+00,\n                                                6.14956252401618e+00, 6.07697249440470e+00, 6.01240064291422e+00, 5.95539293064816e+00, 5.90547176436716e+00,\n                                                5.86214139479499e+00, 5.82489316710446e+00, 5.79321069722880e+00, 5.76657503795754e+00, 5.74446988016673e+00,\n                                                5.72638680647430e+00, 5.71183057876938e+00, 5.70032440061425e+00, 5.69141505450500e+00, 5.68467777675551e+00,\n                                                5.67972070350547e+00, 5.67618870359486e+00, 5.67376641034157e+00, 5.67218027585999e+00, 5.67119949825570e+00,\n                                                5.67063571213887e+00, 5.67034138342882e+00, 5.67020690642320e+00, 5.67015646013730e+00, 5.67014273758873e+00,\n                                                5.67014071217162e+00, 5.67014053311436e+00, 5.67013702172777e+00, 5.67011323162924e+00, 5.67002577764162e+00,\n                                                5.66979266457205e+00, 5.66928253861368e+00, 5.66830572542800e+00, 5.66660747412585e+00, 5.66386381601211e+00,\n                                                5.65968043131480e+00, 5.65359488764928e+00, 5.64508255979910e+00, 5.63356644987849e+00, 5.61843098984996e+00,\n                                                5.59903971858967e+00, 5.57475648406907e+00, 5.54496953799720e+00, 5.50911758632705e+00, 5.46671656511801e+00,\n                                                5.41738566465222e+00, 5.36087096353999e+00, 5.29706499091486e+00, 5.22602062907536e+00, 5.14795800776446e+00,\n                                                5.06326342088136e+00, 4.97247980899160e+00, 4.87628898830640e+00, 4.77548655223170e+00, 4.67095117621738e+00,\n                                                4.56361080871851e+00, 4.45440874637573e+00, 4.34427265709077e+00, 4.23408909168310e+00, 4.12468496148639e+00,\n                                                4.01681612748074e+00, 3.91116204754718e+00, 3.80832470787173e+00, 3.70882995502451e+00, 3.61312973489413e+00,\n                                                3.52160437369722e+00, 3.43456464015391e+00, 3.35225373904370e+00, 3.27484955950320e+00, 3.20246748135103e+00,\n                                                3.13516391258611e+00, 3.07294057083390e+00, 3.01574938598279e+00, 2.96349781693606e+00, 2.91605434595753e+00,\n                                                2.87325392950675e+00, 2.83490322919307e+00, 2.80078550499255e+00, 2.77066511261246e+00, 2.74429159926724e+00,\n                                                2.72140343229103e+00, 2.70173142104804e+00, 2.68500190464699e+00, 2.67093977742060e+00, 2.65927141311669e+00,\n                                                2.64972752974450e+00, 2.64204601268394e+00, 2.63597468670696e+00, 2.63127400066398e+00, 2.62771956431531e+00,\n                                                2.62510445744589e+00, 2.62324121889069e+00, 2.62196341874122e+00, 2.62112672140711e+00, 2.62060936017900e+00,\n                                                2.62031196448595e+00, 2.62015670747088e+00, 2.62008577161893e+00, 2.62005916151378e+00, 2.62005192295602e+00,\n                                                2.62005085456137e+00, 2.62005075864960e+00, 2.62004886126325e+00, 2.62003600622812e+00, 2.61998875030536e+00,\n                                                2.61986278756115e+00, 2.61958714246668e+00, 2.61905933071100e+00, 2.61814171687514e+00, 2.61665929405834e+00,\n                                                2.61439910380976e+00, 2.61111150047616e+00, 2.60651343619750e+00, 2.60029389470577e+00, 2.59212152797063e+00,\n                                                2.58165444589195e+00, 2.56855197557360e+00, 2.55248804804538e+00, 2.53316569717924e+00, 2.51033198424167e+00,\n                                                2.48379251296030e+00, 2.45342459751900e+00, 2.41918811215739e+00, 2.38113310421990e+00, 2.33940340264762e+00,\n                                                2.29423569993904e+00, 2.24595391328351e+00, 2.19495901202698e+00, 2.14171489380405e+00, 2.08673125219237e+00,\n                                                2.03054465451111e+00, 1.97369919643386e+00, 1.91672809413590e+00, 1.86013741269235e+00, 1.80439283625131e+00,\n                                                1.74991000901642e+00, 1.69704857718902e+00, 1.64610970127863e+00, 1.59733653301801e+00, 1.55091698740350e+00,\n                                                1.50698809029389e+00, 1.46564122776070e+00, 1.42692773491466e+00, 1.39086440559650e+00, 1.35743865029909e+00,\n                                                1.32661315658434e+00, 1.29833000260801e+00, 1.27251423766138e+00, 1.24907697783778e+00, 1.22791807749793e+00,\n                                                1.20892843645463e+00, 1.19199199597672e+00, 1.17698746899794e+00, 1.16378984415681e+00, 1.15227170032398e+00,\n                                                1.14230436752067e+00, 1.13375897028001e+00, 1.12650738907514e+00, 1.12042317319862e+00, 1.11538243367441e+00,\n                                                1.11126473721305e+00, 1.10795401221311e+00, 1.10533946612715e+00, 1.10331650120812e+00, 1.10178760394692e+00,\n                                                1.10066317361925e+00, 1.09986224835179e+00, 1.09931308380244e+00, 1.09895354036476e+00, 1.09873123977836e+00,\n                                                1.09860346074952e+00, 1.09853675488534e+00, 1.09850627786452e+00, 1.09849484511471e+00, 1.09849173515154e+00,\n                                                1.09849127612829e+00, 1.09849123381454e+00, 1.09849038441349e+00, 1.09848462961919e+00, 1.09846347472796e+00,\n                                                1.09840708617743e+00, 1.09828369452036e+00, 1.09804743571899e+00, 1.09763673918700e+00, 1.09697337249281e+00,\n                                                1.09596225306144e+00, 1.09449213364169e+00, 1.09243725703359e+00, 1.08966005263805e+00, 1.08601490932107e+00,\n                                                1.08135300379664e+00, 1.07552809151738e+00, 1.06840308141361e+00, 1.05985712386322e+00, 1.04979285344869e+00,\n                                                1.03814335687105e+00, 1.02487839419856e+00, 1.01000939782700e+00, 9.93592811922554e-01, 9.75731412503961e-01,\n                                                9.56573355280526e-01, 9.36308822639148e-01, 9.15164272942015e-01, 8.93394432252201e-01, 8.71272317786364e-01,\n                                                8.49077755675232e-01, 8.27085057887544e-01, 8.05550736559887e-01, 7.84702306941867e-01, 7.64729283420671e-01,\n                                                7.45777329260655e-01, 7.27946149892688e-01, 7.11291175413386e-01, 6.95828494543882e-01, 6.81542043791680e-01,\n                                                6.68391843499727e-01, 6.56322135172800e-01, 6.45268546946049e-01, 6.35163781203183e-01, 6.25941669361197e-01,\n                                                6.17539703096242e-01, 6.09900305974378e-01, 6.02971167056509e-01, 5.96704947617148e-01, 5.91058624178999e-01,\n                                                5.85992669551395e-01, 5.81470213649588e-01, 5.77456275178541e-01, 5.73917116194714e-01, 5.70819743539253e-01,\n                                                5.68131562263325e-01, 5.65820174209108e-01, 5.63853307835032e-01, 5.62198861541518e-01, 5.60825040953389e-01,\n                                                5.59700570008133e-01, 5.58794955751061e-01, 5.58078787137305e-01, 5.57524048743105e-01, 5.57104431064047e-01,\n                                                5.56795620069288e-01, 5.56575549970717e-01, 5.56424604842334e-01, 5.56325756858058e-01, 5.56264631528855e-01,\n                                                5.56229493380840e-01, 5.56211148925712e-01, 5.56202767380867e-01, 5.56199623204478e-01, 5.56198767915141e-01,\n                                                5.56198641676325e-01, 5.56198629645898e-01, 5.56198383880130e-01, 5.56196718785017e-01, 5.56190597780713e-01,\n                                                5.56174281902678e-01, 5.56138577397313e-01, 5.56070208166439e-01, 5.55951342145391e-01, 5.55759299756623e-01,\n                                                5.55466471098406e-01, 5.55040465763092e-01, 5.54444514148187e-01, 5.53638130756674e-01, 5.52578037383533e-01,\n                                                5.51219326915025e-01, 5.49516827386192e-01, 5.47426602989589e-01, 5.44907507442666e-01, 5.41922690185515e-01,\n                                                5.38440952163342e-01, 5.34437859014410e-01, 5.29896545962849e-01, 5.24808187176106e-01, 5.19172145377716e-01,\n                                                5.12995855377888e-01, 5.06294518777423e-01, 4.99090691077996e-01, 4.91413827247811e-01, 4.83299823544066e-01,\n                                                4.74790561474400e-01, 4.65933433405638e-01, 4.56780814543293e-01, 4.47389444361193e-01, 4.37819689734390e-01,\n                                                4.28134677658988e-01, 4.18399303078871e-01, 4.08679133670908e-01, 3.99039246581303e-01, 3.89543041227093e-01,\n                                                3.80251077086797e-01, 3.71219985819849e-01, 3.62501503174443e-01, 3.54141658380151e-01, 3.46180147924798e-01,\n                                                3.38649908048616e-01, 3.31576887453814e-01, 3.24980010087394e-01, 3.18871308581706e-01, 3.13256202730756e-01,\n                                                3.08133894421417e-01, 3.03497850443968e-01, 2.99336346958889e-01, 2.95633053306652e-01, 2.92367637495396e-01,\n                                                2.89516380355863e-01, 2.87052789439628e-01, 2.84948206870432e-01, 2.83172407348857e-01, 2.81694183339567e-01,\n                                                2.80481914264442e-01, 2.79504115516929e-01, 2.78729961601748e-01, 2.78129776018851e-01, 2.77675478972149e-01,\n                                                2.77340982874570e-01, 2.77102525162185e-01, 2.76938928258637e-01, 2.76831777697026e-01, 2.76765511370584e-01,\n                                                2.76727415527773e-01, 2.76707526272133e-01, 2.76698438754373e-01, 2.76695029720393e-01, 2.76694102381221e-01,\n                                                2.76693965507931e-01, 2.76693951960532e-01, 2.76693669921421e-01, 2.76691759067688e-01, 2.76684734606803e-01,\n                                                2.76666010277374e-01, 2.76625034084468e-01, 2.76546565691426e-01, 2.76410127027887e-01, 2.76189655670883e-01,\n                                                2.75853388131495e-01, 2.75363996984041e-01, 2.74679001379269e-01, 2.73751464445176e-01, 2.72530983030151e-01,\n                                                2.70964964967142e-01, 2.69000176529687e-01, 2.66584528256644e-01, 2.63669051345033e-01, 2.60210000088783e-01,\n                                                2.56170999317803e-01, 2.51525140586942e-01, 2.46256918267015e-01, 2.40363888196121e-01, 2.33857928892974e-01,\n                                                2.26765990490868e-01, 2.19130231574759e-01, 2.11007470737094e-01, 2.02467918669434e-01, 1.93593206926572e-01,\n                                                1.84473787569978e-01, 1.75205837426731e-01, 1.65887853300013e-01, 1.56617161181892e-01, 1.47486575947795e-01,\n                                                1.38581434372888e-01, 1.29977184722911e-01, 1.21737656626820e-01, 1.13914064943891e-01, 1.06544731672315e-01,\n                                                9.96554502669156e-02, 9.32603737447266e-02, 8.73632845610643e-02, 8.19590997130604e-02, 7.70354754497333e-02,\n                                                7.25743974741988e-02, 6.85536695184936e-02, 6.49482412190849e-02, 6.17313420446450e-02, 5.88754096335862e-02,\n                                                5.63528174379897e-02, 5.41364180651769e-02, 5.21999257313510e-02, 5.05181646419217e-02, 4.90672107987180e-02,\n                                                4.78244535356680e-02, 4.67686006829666e-02, 4.58796481639041e-02, 4.51388313902612e-02, 4.45285722628981e-02,\n                                                4.40324320415257e-02, 4.36350769078686e-02, 4.33222597787051e-02, 4.30808189075336e-02, 4.28986911348090e-02,\n                                                4.27649354141266e-02, 4.26697605638751e-02, 4.26045501635741e-02, 4.25618771909555e-02, 4.25355013845845e-02,\n                                                4.25203433597261e-02, 4.25124310838711e-02, 4.25088162602307e-02, 4.25074602734128e-02, 4.25070914176331e-02,\n                                                4.25070369754934e-02, 4.25070313595768e-02, 4.25069121466706e-02, 4.25061044690835e-02, 4.25031354715770e-02,\n                                                4.24952220651420e-02, 4.24779080854734e-02, 4.24447662796439e-02, 4.23871841200878e-02, 4.22942547682936e-02,\n                                                4.21527967211475e-02, 4.19475267983884e-02, 4.16614099259931e-02, 4.12762042717105e-02, 4.07732104556615e-02,\n                                                4.01342180003113e-02, 3.93426209430245e-02, 3.83846488483783e-02, 3.72506320112294e-02, 3.59361945631917e-02,\n                                                3.44432516903126e-02, 3.27806827142112e-02, 3.09645649220016e-02, 2.90178859523991e-02, 2.69697038590522e-02,\n                                                2.48537880472739e-02, 2.27068416307716e-02, 2.05664646134025e-02, 1.84690561432319e-02, 1.64478644748627e-02,\n                                                1.45313721733515e-02, 1.27421549274658e-02, 1.10962844852480e-02, 9.60327296374430e-03, 8.26649110820199e-03,\n                                                7.08394800140155e-03, 6.04929922170072e-03, 5.15295248065684e-03, 4.38315734474770e-03, 3.72699108498864e-03,\n                                                3.17118125609284e-03, 2.70273563345569e-03, 2.30937989557134e-03, 1.97982829151044e-03, 1.70392627498472e-03,\n                                                1.47270391354937e-03, 1.27836887617860e-03, 1.11425661514630e-03, 9.74749633492422e-04, 8.55177572056220e-04,\n                                                7.51710501646130e-04, 6.61255228493474e-04, 5.81358900944906e-04, 5.10119127689279e-04, 4.46097950089097e-04,\n                                                3.88238324106283e-04, 3.35784203073786e-04, 2.88206867374186e-04, 2.45140148621203e-04, 2.06326146717117e-04,\n                                                1.71571775801738e-04, 1.40715531159685e-04, 1.13603352829728e-04, 9.00722486463224e-05, 6.99402855843800e-05,\n                                                5.30015910058523e-05, 3.90251069859460e-05, 2.77560085706341e-05, 1.89189128789735e-05, 1.22222414233875e-05,\n                                                7.36332115991445e-06, 4.03400492388073e-06, 1.92675916110829e-06, 7.41337004228626e-07, -4.26325641456060e-14,\n                                                -3.55271367880050e-14}),\nmadness::CubicInterpolationTable<double>(grid, {3.80000000000000e+01,  3.79999998735042e+01,  3.79999959620041e+01, 3.79999694609546e+01,\n                                                3.79998720393799e+01,  3.79996123422149e+01,  3.79990439657323e+01, 3.79979553204543e+01,\n                                                3.79960617309335e+01,  3.79930000439405e+01,  3.79883259304890e+01, 3.79815139792387e+01,\n                                                3.79719605973011e+01,  3.79589896684671e+01,  3.79418608769206e+01, 3.79197805922733e+01,\n                                                3.78919152291651e+01,  3.78574070329542e+01,  3.78153922830959e+01, 3.77650219189220e+01,\n                                                3.77054845445890e+01,  3.76360316297596e+01,  3.75560044728591e+01, 3.74648621425575e+01,\n                                                3.73622092012846e+01,  3.72478216152985e+01,  3.71216689637421e+01, 3.69839309694761e+01,\n                                                3.68350065568355e+01,  3.66755141156570e+01,  3.65062823737055e+01, 3.63283321478777e+01,\n                                                3.61428501160049e+01,  3.59511564772243e+01,  3.57546688305978e+01, 3.55548647365360e+01,\n                                                3.53532452394260e+01,  3.51513011897427e+01,  3.49504836165629e+01, 3.47521787845247e+01,\n                                                3.45576880247018e+01,  3.43682120241734e+01,  3.41848390208602e+01, 3.40085362682270e+01,\n                                                3.38401441730224e+01,  3.36803726212668e+01,  3.35297991475057e+01, 3.33888687342081e+01,\n                                                3.32578951303382e+01,  3.31370636422567e+01,  3.30264353782369e+01, 3.29259529279851e+01,\n                                                3.28354474405144e+01,  3.27546470364095e+01,  3.26831864602628e+01, 3.26206178493884e+01,\n                                                3.25664224670957e+01,  3.25200232227499e+01,  3.24807977760470e+01, 3.24480919991152e+01,\n                                                3.24212335475786e+01,  3.23995452716945e+01,  3.23823581828198e+01, 3.23690236808922e+01,\n                                                3.23589247475072e+01,  3.23514858184518e+01,  3.23461810705963e+01, 3.23425408914533e+01,\n                                                3.23401563451537e+01,  3.23386815048009e+01,  3.23378335859694e+01, 3.23373908866165e+01,\n                                                3.23371886115003e+01,  3.23371127307771e+01,  3.23370920893481e+01, 3.23370890427152e+01,\n                                                3.23370886256742e+01,  3.23370787765756e+01,  3.23370120475553e+01, 3.23367667456858e+01,\n                                                3.23361128691676e+01,  3.23346819180219e+01,  3.23319416348438e+01, 3.23271767581676e+01,\n                                                3.23194767888400e+01,  3.23077316698008e+01,  3.22906361493426e+01, 3.22667034210786e+01,\n                                                3.22342883933553e+01,  3.21916206225753e+01,  3.21368465425804e+01, 3.20680801426708e+01,\n                                                3.19834607139265e+01,  3.18812157392904e+01,  3.17597265029301e+01, 3.16175935955640e+01,\n                                                3.14536992337294e+01,  3.12672631940767e+01,  3.10578891481129e+01, 3.08255982170128e+01,\n                                                3.05708466701129e+01,  3.02945250642484e+01,  2.99979371803064e+01, 2.96827592979926e+01,\n                                                2.93509836341336e+01,  2.90048531559653e+01,  2.86467966289581e+01, 2.82793711615308e+01,\n                                                2.79052149809572e+01,  2.75270080776449e+01,  2.71474354714103e+01, 2.67691483600784e+01,\n                                                2.63947213363567e+01,  2.60266072012574e+01,  2.56670930667576e+01, 2.53182618909881e+01,\n                                                2.49819626625446e+01,  2.46597908478041e+01,  2.43530790902406e+01, 2.40628969183055e+01,\n                                                2.37900575345539e+01,  2.35351295874905e+01,  2.32984520299631e+01, 2.30801505769548e+01,\n                                                2.28801547460402e+01,  2.26982148947781e+01,  2.25339190072956e+01, 2.23867092118210e+01,\n                                                2.22558981410705e+01,  2.21406852991019e+01,  2.20401735946398e+01, 2.19533861618515e+01,\n                                                2.18792835297035e+01,  2.18167811299557e+01,  2.17647670576326e+01, 2.17221199205798e+01,\n                                                2.16877265401017e+01,  2.16604991964966e+01,  2.16393920558959e+01, 2.16234163727995e+01,\n                                                2.16116540405501e+01,  2.16032690634191e+01,  2.15975165513274e+01, 2.15937488920041e+01,\n                                                2.15914188339525e+01,  2.15900793131894e+01,  2.15893799716915e+01, 2.15890604388532e+01,\n                                                2.15889405713886e+01,  2.15889079645634e+01,  2.15889031518655e+01, 2.15889026950078e+01,\n                                                2.15888933807641e+01,  2.15888302754754e+01,  2.15885982949939e+01, 2.15879799296897e+01,\n                                                2.15866267004871e+01,  2.15840352891118e+01,  2.15795293799371e+01, 2.15722481808861e+01,\n                                                2.15611425045127e+01,  2.15449791741528e+01,  2.15223543564391e+01, 2.14917161917601e+01,\n                                                2.14513967821664e+01,  2.13996531928037e+01,  2.13347166315151e+01, 2.12548484122933e+01,\n                                                2.11584007224684e+01,  2.10438796619405e+01,  2.09100075822134e+01, 2.07557815055470e+01,\n                                                2.05805244208643e+01,  2.03839265707799e+01,  2.01660744460135e+01, 1.99274660032620e+01,\n                                                1.96690114701569e+01,  1.93920198179571e+01,  1.90981714331942e+01, 1.87894777004569e+01,\n                                                1.84682283157787e+01,  1.81369275502473e+01,  1.77982217286752e+01, 1.74548219003988e+01,\n                                                1.71094274927032e+01,  1.67646576026960e+01,  1.64229955751253e+01, 1.60867496056770e+01,\n                                                1.57580284262376e+01,  1.54387283014061e+01,  1.51305266669890e+01, 1.48348786997811e+01,\n                                                1.45530149899602e+01,  1.42859402369823e+01,  1.40344338871076e+01, 1.37990537991794e+01,\n                                                1.35801436298247e+01,  1.33778440189730e+01,  1.31921071014642e+01, 1.30227135105459e+01,\n                                                1.28692909033819e+01,  1.27313330890663e+01,  1.26082190106054e+01, 1.24992310581927e+01,\n                                                1.24035724195730e+01,  1.23203833696264e+01,  1.22487565469301e+01, 1.21877513539709e+01,\n                                                1.21364076523864e+01,  1.20937589127620e+01,  1.20588449304301e+01, 1.20307241458528e+01,\n                                                1.20084855221092e+01,  1.19912598438913e+01,  1.19782302224508e+01, 1.19686415279326e+01,\n                                                1.19618084314143e+01,  1.19571217282954e+01,  1.19540526343229e+01, 1.19521547945028e+01,\n                                                1.19510638197152e+01,  1.19504942600173e+01,  1.19502340297578e+01, 1.19501364094178e+01,\n                                                1.19501098544141e+01,  1.19501059349546e+01,  1.19501055861507e+01, 1.19500987199054e+01,\n                                                1.19500522001844e+01,  1.19498811902950e+01,  1.19494253524355e+01, 1.19484278218972e+01,\n                                                1.19465176594597e+01,  1.19431965840710e+01,  1.19378307580146e+01, 1.19296483568671e+01,\n                                                1.19177435931157e+01,  1.19010877582509e+01,  1.18785476852786e+01, 1.18489117958584e+01,\n                                                1.18109235732916e+01,  1.17633218932773e+01,  1.17048871599438e+01, 1.16344916605554e+01,\n                                                1.15511520084095e+01,  1.14540810425731e+01,  1.13427361575039e+01, 1.12168608118495e+01,\n                                                1.10765159783923e+01,  1.09220986009332e+01,  1.07543447540993e+01, 1.05743161622159e+01,\n                                                1.03833699818463e+01,  1.01831131906790e+01,  9.97534439409647e+00, 9.76198715336273e+00,\n                                                9.54501983498436e+00,  9.32640729440572e+00,  9.10803934371209e+00, 8.89167994556877e+00,\n                                                8.67892959099776e+00,  8.47120162323261e+00,  8.26971166543370e+00, 8.07547805919099e+00,\n                                                7.88933048760257e+00,  7.71192377906814e+00,  7.54375418607830e+00, 7.38517604765956e+00,\n                                                7.23641748632355e+00,  7.09759449116940e+00,  6.96872328152712e+00, 6.84973117929384e+00,\n                                                6.74046635205648e+00,  6.64070677349668e+00,  6.55016864965672e+00, 6.46851444174071e+00,\n                                                6.39536052160950e+00,  6.33028444485786e+00,  6.27283181804778e+00, 6.22252275854233e+00,\n                                                6.17885798036244e+00,  6.14132457229275e+00,  6.10940155472122e+00, 6.08256530454002e+00,\n                                                6.06029492252686e+00,  6.04207758769952e+00,  6.02741390261424e+00, 6.01582318758433e+00,\n                                                6.00684863553473e+00,  6.00006219758254e+00,  5.99506903677021e+00, 5.99151136717487e+00,\n                                                5.98907149028879e+00,  5.98747385121516e+00,  5.98648596350014e+00, 5.98591809151593e+00,\n                                                5.98562163012003e+00,  5.98548617878799e+00,  5.98543536701727e+00, 5.98542154504973e+00,\n                                                5.98541950495867e+00,  5.98541932460414e+00,  5.98541578777792e+00, 5.98539182532337e+00,\n                                                5.98530373775787e+00,  5.98506893596414e+00,  5.98455511509572e+00, 5.98357122886441e+00,\n                                                5.98186068733861e+00,  5.97909719146824e+00,  5.97488360237325e+00, 5.96875421432175e+00,\n                                                5.96018074622667e+00,  5.94858227552348e+00,  5.93333919988518e+00, 5.91381111973564e+00,\n                                                5.88935828794788e+00,  5.85936598151558e+00,  5.82327083283091e+00, 5.78058784512346e+00,\n                                                5.73093654520595e+00,  5.67406453858884e+00,  5.60986666833637e+00, 5.53839807605011e+00,\n                                                5.45987974948431e+00,  5.37469563343298e+00,  5.28338107628048e+00, 5.18660324632627e+00,\n                                                5.08513508470953e+00,  4.97982519911198e+00,  4.87156662551797e+00, 4.76126739278754e+00,\n                                                4.64982523831351e+00,  4.53810776814546e+00,  4.42693814668883e+00, 4.31708541670085e+00,\n                                                4.20925805700902e+00,  4.10409943043763e+00,  4.00218419935195e+00, 3.90401533741968e+00,\n                                                3.81002182093017e+00,  3.72055732363043e+00,  3.63590025875335e+00, 3.55625537625951e+00,\n                                                3.48175692125540e+00,  3.41247316723120e+00,  3.34841200181775e+00, 3.28952717958908e+00,\n                                                3.23572486012500e+00,  3.18687010212809e+00,  3.14279306453746e+00, 3.10329475427992e+00,\n                                                3.06815224352835e+00,  3.03712334855589e+00,  3.00995081361730e+00, 2.98636607624258e+00,\n                                                2.96609270642210e+00,  2.94884961392933e+00,  2.93435410831903e+00, 2.92232487777933e+00,\n                                                2.91248492866583e+00,  2.90456449970858e+00,  2.89830393595552e+00, 2.89345647981160e+00,\n                                                2.88979091225971e+00,  2.88709395852279e+00,  2.88517236071856e+00, 2.88385451664622e+00,\n                                                2.88299158924109e+00,  2.88245800520068e+00,  2.88215128280842e+00, 2.88199115635936e+00,\n                                                2.88191799560984e+00,  2.88189055086670e+00,  2.88188308526698e+00, 2.88188198336139e+00,\n                                                2.88188188444129e+00,  2.88187992754211e+00,  2.88186666929880e+00, 2.88181793114187e+00,\n                                                2.88168801731876e+00,  2.88140372545136e+00,  2.88085935434351e+00, 2.87991294442941e+00,\n                                                2.87838398150053e+00,  2.87605278673477e+00,  2.87266180063544e+00, 2.86791893897425e+00,\n                                                2.86150314844769e+00,  2.85307221245687e+00,  2.84227274937472e+00, 2.82875220681959e+00,\n                                                2.81217249098194e+00,  2.79222469129487e+00,  2.76864418531938e+00, 2.74122525947964e+00,\n                                                2.70983428389913e+00,  2.67442045891148e+00,  2.63502322633543e+00, 2.59177561965176e+00,\n                                                2.54490310882538e+00,  2.49471785586798e+00,  2.44160869783945e+00, 2.38602756335658e+00,\n                                                2.32847334989427e+00,  2.26947449058434e+00,  2.20957148630819e+00, 2.14930056394952e+00,\n                                                2.08917936804210e+00,  2.02969525133508e+00,  1.97129636654796e+00, 1.91438544315813e+00,\n                                                1.85931590966591e+00,  1.80638991651158e+00,  1.75585782074492e+00, 1.70791877913143e+00,\n                                                1.66272221690832e+00,  1.62037005061416e+00,  1.58091961328198e+00, 1.54438724586662e+00,\n                                                1.51075248667868e+00,  1.47996273158606e+00,  1.45193817785874e+00, 1.42657682601134e+00,\n                                                1.40375930910926e+00,  1.38335334831413e+00,  1.36521768821774e+00, 1.34920543237962e+00,\n                                                1.33516676518853e+00,  1.32295110084621e+00,  1.31240873867929e+00, 1.30339212510134e+00,\n                                                1.29575682826678e+00,  1.28936232514784e+00,  1.28407268610452e+00, 1.27975722232041e+00,\n                                                1.27629113942213e+00,  1.27355621824383e+00,  1.27144152261482e+00, 1.26984411548116e+00,\n                                                1.26866974963983e+00,  1.26783348868011e+00,  1.26726020796608e+00, 1.26688492492031e+00,\n                                                1.26665291235805e+00,  1.26651955763763e+00,  1.26644994300191e+00, 1.26641813745120e+00,\n                                                1.26640620640678e+00,  1.26640296090320e+00,  1.26640248187475e+00, 1.26640243771690e+00,\n                                                1.26640155129734e+00,  1.26639554570399e+00,  1.26637346895014e+00, 1.26631462382969e+00,\n                                                1.26618585997343e+00,  1.26593932787647e+00,  1.26551081325032e+00, 1.26481877452717e+00,\n                                                1.26376420979097e+00,  1.26223147802349e+00,  1.26009018848557e+00, 1.25719824600751e+00,\n                                                1.25340609406368e+00,  1.24856212836677e+00,  1.24251916063257e+00, 1.23514169825651e+00,\n                                                1.22631367876266e+00,  1.21594617107191e+00,  1.20398444690915e+00, 1.19041375701224e+00,\n                                                1.17526314210503e+00,  1.15860669022765e+00,  1.14056183561310e+00, 1.12128458145672e+00,\n                                                1.10096189867567e+00,  1.07980195484063e+00,  1.05802318306728e+00, 1.03584341674367e+00,\n                                                1.01347031466349e+00,  9.91094055425393e-01,  9.68882837189071e-01, 9.46981193792176e-01,\n                                                9.25510672572116e-01,  9.04572126541751e-01,  8.84248798677689e-01, 8.64609489260005e-01,\n                                                8.45711320557655e-01,  8.27601859794150e-01,  8.10320566272679e-01, 7.93899661124307e-01,\n                                                7.78364577933118e-01,  7.63734157035081e-01,  7.50020718639753e-01, 7.37230110221553e-01,\n                                                7.25361785444846e-01,  7.14408942086216e-01,  7.04358726786111e-01, 6.95192503791901e-01,\n                                                6.86886180685704e-01,  6.79410583874237e-01,  6.72731878283969e-01, 6.66812027832535e-01,\n                                                6.61609294989979e-01,  6.57078778686071e-01,  6.53172989825961e-01, 6.49842462773542e-01,\n                                                6.47036399470743e-01,  6.44703340547224e-01,  6.42791855037721e-01, 6.41251237383287e-01,\n                                                6.40032197495948e-01,  6.39087527073023e-01,  6.38372723329155e-01, 6.37846550121530e-01,\n                                                6.37471516292521e-01,  6.37214252088221e-01,  6.37045766788965e-01, 6.36941574156623e-01,\n                                                6.36881676805324e-01,  6.36850405879009e-01,  6.36836118137460e-01, 6.36830758345162e-01,\n                                                6.36829300354798e-01,  6.36829085158595e-01,  6.36829064650613e-01, 6.36828645699680e-01,\n                                                6.36825807250787e-01,  6.36815372892116e-01,  6.36787559335325e-01, 6.36726693153854e-01,\n                                                6.36610139038218e-01,  6.36407487682426e-01,  6.36080049080107e-01, 6.35580693942522e-01,\n                                                6.34854081326502e-01,  6.33837303305675e-01,  6.32460966479066e-01, 6.30650714279525e-01,\n                                                6.28329172868618e-01,  6.25418277114846e-01,  6.21841903061558e-01, 6.17528701951748e-01,\n                                                6.12415002004688e-01,  6.06447622209444e-01,  5.99586431927747e-01, 5.91806494692918e-01,\n                                                5.83099656003725e-01,  5.73475472323373e-01,  5.62961428283131e-01, 5.51602445185161e-01,\n                                                5.39459738700039e-01,  5.26609129373803e-01,  5.13138939762904e-01, 4.99147623057667e-01,\n                                                4.84741260050477e-01,  4.70031038291502e-01,  4.55130796307699e-01, 4.40154685069487e-01,\n                                                4.25214975567449e-01,  4.10420029381449e-01,  3.95872448405058e-01, 3.81667426750873e-01,\n                                                3.67891336637818e-01,  3.54620585178999e-01,  3.41920776737908e-01, 3.29846204942655e-01,\n                                                3.18439681199337e-01,  3.07732686009402e-01,  2.97745809471309e-01, 2.88489431379503e-01,\n                                                2.79964581439117e-01,  2.72163916984475e-01,  2.65072758671266e-01, 2.58670132519718e-01,\n                                                2.52929777644333e-01,  2.47821091241377e-01,  2.43309994400164e-01, 2.39359712925484e-01,\n                                                2.35931475881834e-01,  2.32985140638192e-01,  2.30479756744408e-01, 2.28374082161785e-01,\n                                                2.26627064510652e-01,  2.25198297491048e-01,  2.24048458947429e-01, 2.23139732680565e-01,\n                                                2.22436211562432e-01,  2.21904275262908e-01,  2.21512932377280e-01, 2.21234114301346e-01,\n                                                2.21042907071570e-01,  2.20917707683462e-01,  2.20840293092216e-01, 2.20795793024351e-01,\n                                                2.20772561613330e-01,  2.20761947363059e-01,  2.20757965651742e-01, 2.20756882535419e-01,\n                                                2.20756722669925e-01,  2.20756706846807e-01,  2.20756377430476e-01, 2.20754145594469e-01,\n                                                2.20745941251302e-01,  2.20724072422072e-01,  2.20676217781033e-01, 2.20584588646290e-01,\n                                                2.20425301851542e-01,  2.20168005184320e-01,  2.19775796948582e-01, 2.19205479702133e-01,\n                                                2.18408184072821e-01,  2.17330390429765e-01,  2.15915362875627e-01, 2.14104990728984e-01,\n                                                2.11842007240463e-01,  2.09072524475332e-01,  2.05748788880967e-01, 2.01832026889370e-01,\n                                                1.97295217777373e-01,  1.92125606381772e-01,  1.86326755823707e-01, 1.79919944474115e-01,\n                                                1.72944735301563e-01,  1.65458591036163e-01,  1.57535474291514e-01, 1.49263453791093e-01,\n                                                1.40741428576348e-01,  1.32075170846377e-01,  1.23372962337825e-01, 1.14741146633442e-01,\n                                                1.06279931246092e-01,  9.80797450843838e-02,  9.02183922951920e-02, 8.27591525401914e-02,\n                                                7.57498751333898e-02,  6.92230160584728e-02,  6.31964864105612e-02, 5.76751271641882e-02,\n                                                5.26526013479938e-02,  4.81134982568321e-02,  4.40354689696747e-02, 4.03912501165848e-02,\n                                                3.71504756212104e-02,  3.42812175602774e-02,  3.17512329324501e-02, 2.95289207455838e-02,\n                                                2.75840129192488e-02,  2.58880338055576e-02,  2.44145680994947e-02, 2.31393772177739e-02,\n                                                2.20404014733973e-02,  2.10976808980448e-02,  2.02932223807935e-02, 1.96108355899938e-02,\n                                                1.90359553383530e-02,  1.85554638363215e-02,  1.81575226969386e-02, 1.78314215561244e-02,\n                                                1.75674476566954e-02,  1.73567786094608e-02,  1.71913987011791e-02, 1.70640375141318e-02,\n                                                1.69681282379344e-02,  1.68977819116449e-02,  1.68477729753036e-02, 1.68135309911150e-02,\n                                                1.67911332570512e-02,  1.67772933027308e-02,  1.67693409079419e-02, 1.67651902605002e-02,\n                                                1.67632940737690e-02,  1.67625827936959e-02,  1.67623893125182e-02, 1.67623607552514e-02,\n                                                1.67623578094620e-02,  1.67622952770756e-02,  1.67618716164100e-02, 1.67603142771284e-02,\n                                                1.67561636131310e-02,  1.67470831863810e-02,  1.67297053387117e-02, 1.66995234336440e-02,\n                                                1.66508441730215e-02,  1.65768153068413e-02,  1.64695451118604e-02, 1.63203292180327e-02,\n                                                1.61199966186345e-02,  1.58593790320509e-02,  1.55298956418903e-02, 1.51242288669877e-02,\n                                                1.46370475764996e-02,  1.40657147616210e-02,  1.34109010027572e-02, 1.26770176881550e-02,\n                                                1.18723890713355e-02,  1.10091024754908e-02,  1.01025109241490e-02, 9.17040816219838e-03,\n                                                8.23194490643431e-03,  7.30639757476581e-03,  6.41192724718564e-03, 5.56447059880583e-03,\n                                                4.77688427169909e-03,  4.05842341269391e-03,  3.41458237431880e-03, 2.84727191356637e-03,\n                                                2.35526361470306e-03,  1.93480691810066e-03,  1.58032019984944e-03, 1.28507172305348e-03,\n                                                1.04179062759613e-03,  8.43172582122520e-04,  6.82263020920004e-04, 5.52713359127210e-04,\n                                                4.48916998109894e-04,  3.66045261792181e-04,  3.00015197467474e-04, 2.47423996114549e-04,\n                                                2.05475161678237e-04,  1.71905339676925e-04,  1.44909271263316e-04, 1.23060418061982e-04,\n                                                1.05232496053986e-04,  9.05324570439348e-05,  7.82522985645073e-05, 6.78383122476589e-05,\n                                                5.88696075780604e-05,  5.10376386344547e-05,  4.41233816843578e-05, 3.79738704694432e-05,\n                                                3.24816712833353e-05,  2.75696427323169e-05,  2.31810083377582e-05, 1.92731943045032e-05,\n                                                1.58136263195274e-05,  1.27762994779346e-05,  1.01387189133106e-05, 7.87929904788598e-06,\n                                                5.97542786096028e-06,  4.40229476339482e-06,  3.13242293259464e-06, 2.13574328711275e-06,\n                                                1.38002285865468e-06,  8.31490872599261e-07,  4.55560062562199e-07, -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {3.90000000000000e+01, 3.89999998687325e+01, 3.89999958096804e+01, 3.89999683089415e+01, 3.89998672123623e+01,\n                                                3.89995977186732e+01, 3.89990079011559e+01, 3.89978781876784e+01, 3.89959131613026e+01, 3.89927359627222e+01,\n                                                3.89878854863283e+01, 3.89808164705684e+01, 3.89709024991333e+01, 3.89574418620155e+01, 3.89396661836888e+01,\n                                                3.89167517154752e+01, 3.88878332102426e+01, 3.88520203402341e+01, 3.88084166621911e+01, 3.87561411468079e+01,\n                                                3.86943522351834e+01, 3.86222742300215e+01, 3.85392255561966e+01, 3.84446480440782e+01, 3.83381359455666e+01,\n                                                3.82194629678366e+01, 3.80886053063273e+01, 3.79457585787024e+01, 3.77913467777938e+01, 3.76260218908928e+01,\n                                                3.74506536230996e+01, 3.72663095975817e+01, 3.70742273292147e+01, 3.68757800205158e+01, 3.66724386856969e+01,\n                                                3.64657332098435e+01, 3.62572147101482e+01, 3.60484210644511e+01, 3.58408468287221e+01, 3.56359181073733e+01,\n                                                3.54349723754509e+01, 3.52392428473116e+01, 3.50498467645472e+01, 3.48677769195979e+01, 3.46938957977880e+01,\n                                                3.45289318564517e+01, 3.43734776160498e+01, 3.42279893778849e+01, 3.40927884853429e+01, 3.39680641044613e+01,\n                                                3.38538775197237e+01, 3.37501679326474e+01, 3.36567597255499e+01, 3.35733711205165e+01, 3.34996241304965e+01,\n                                                3.34350556687440e+01, 3.33791296551528e+01, 3.33312499327058e+01, 3.32907737832623e+01, 3.32570258086736e+01,\n                                                3.32293119209800e+01, 3.32069331653242e+01, 3.31891990830535e+01, 3.31754403125493e+01, 3.31650201239478e+01,\n                                                3.31573445931839e+01, 3.31518711421812e+01, 3.31481152061886e+01, 3.31456548359355e+01, 3.31441331001282e+01,\n                                                3.31432582206051e+01, 3.31428014452075e+01, 3.31425927385998e+01, 3.31425144451970e+01, 3.31424931474602e+01,\n                                                3.31424900039577e+01, 3.31424895736565e+01, 3.31424794113995e+01, 3.31424105606883e+01, 3.31421574593142e+01,\n                                                3.31414827926079e+01, 3.31400063448141e+01, 3.31371789384282e+01, 3.31322625797901e+01, 3.31243178452396e+01,\n                                                3.31121994398345e+01, 3.30945607270309e+01, 3.30698678460270e+01, 3.30364237859077e+01, 3.29924024576633e+01,\n                                                3.29358923900611e+01, 3.28649491800230e+01, 3.27776552766898e+01, 3.26721851126763e+01, 3.25468730706177e+01,\n                                                3.24002813422055e+01, 3.22312644358234e+01, 3.20390269178910e+01, 3.18231709004648e+01, 3.15837297936063e+01,\n                                                3.13211850076236e+01, 3.10364628945762e+01, 3.07309107057592e+01, 3.04062530307328e+01, 3.00645337257434e+01,\n                                                2.97080513648915e+01, 2.93392968611121e+01, 2.89608991181622e+01, 2.85755795210670e+01, 2.81861115299344e+01,\n                                                2.77952800203184e+01, 2.74058366840467e+01, 2.70204512274191e+01, 2.66416612424828e+01, 2.62718252030249e+01,\n                                                2.59130828623792e+01, 2.55673259491426e+01, 2.52361802282906e+01, 2.49209983394618e+01, 2.46228616883822e+01,\n                                                2.43425891394852e+01, 2.40807502486463e+01, 2.38376811116342e+01, 2.36135014039726e+01, 2.34081317049211e+01,\n                                                2.32213106393163e+01, 2.30526116945072e+01, 2.29014597722915e+01, 2.27671476365148e+01, 2.26488524430823e+01,\n                                                2.25456525166198e+01, 2.24565444871752e+01, 2.23804608345689e+01, 2.23162878150669e+01, 2.22628836692151e+01,\n                                                2.22190969336977e+01, 2.21837846066738e+01, 2.21558298486409e+01, 2.21341588437538e+01, 2.21177564045025e+01,\n                                                2.21056798804849e+01, 2.20970709336869e+01, 2.20911647707737e+01, 2.20872964780387e+01, 2.20849041852378e+01,\n                                                2.20835288867255e+01, 2.20828108663233e+01, 2.20824827990090e+01, 2.20823597299791e+01, 2.20823262522516e+01,\n                                                2.20823213110104e+01, 2.20823208419504e+01, 2.20823112789307e+01, 2.20822464881505e+01, 2.20820083116597e+01,\n                                                2.20813734303467e+01, 2.20799840576672e+01, 2.20773234325917e+01, 2.20726971770531e+01, 2.20652215115019e+01,\n                                                2.20538192336837e+01, 2.20372242466193e+01, 2.20139952540765e+01, 2.19825390064193e+01, 2.19411431600763e+01,\n                                                2.18880184010299e+01, 2.18213489805259e+01, 2.17393502411315e+01, 2.16403311155002e+01, 2.15227590212246e+01,\n                                                2.13853241304100e+01, 2.12269997426922e+01, 2.10470955011847e+01, 2.08453004911866e+01, 2.06217138231532e+01,\n                                                2.03768610300622e+01, 2.01116953596064e+01, 1.98275836663509e+01, 1.95262770391170e+01, 1.92098666262688e+01,\n                                                1.88807256218998e+01, 1.85414393953037e+01, 1.81947274278097e+01, 1.78433626951572e+01, 1.74900954600731e+01,\n                                                1.71375880578749e+01, 1.67883647909372e+01, 1.64447773154446e+01, 1.61089825499643e+01, 1.57829285631620e+01,\n                                                1.54683444102142e+01, 1.51667317031382e+01, 1.48793576581599e+01, 1.46072506297299e+01, 1.43511994757414e+01,\n                                                1.41117577147306e+01, 1.38892527175059e+01, 1.36837994615467e+01, 1.34953178678971e+01, 1.33235525023813e+01,\n                                                1.31680934282274e+01, 1.30283971734703e+01, 1.29038070432410e+01, 1.27935722958429e+01, 1.26968659642239e+01,\n                                                1.26128013132394e+01, 1.25404470666535e+01, 1.24788416163071e+01, 1.24270064464950e+01, 1.23839589800762e+01,\n                                                1.23487249913389e+01, 1.23203506463918e+01, 1.22979141366383e+01, 1.22805367756622e+01, 1.22673933445148e+01,\n                                                1.22577214034361e+01, 1.22508292461453e+01, 1.22461021604116e+01, 1.22430066774149e+01, 1.22410925413828e+01,\n                                                1.22399922063142e+01, 1.22394177621486e+01, 1.22391553006931e+01, 1.22390568434446e+01, 1.22390300607901e+01,\n                                                1.22390261077301e+01, 1.22390257559360e+01, 1.22390188308283e+01, 1.22389719123133e+01, 1.22387994365143e+01,\n                                                1.22383396918451e+01, 1.22373336152413e+01, 1.22354071009741e+01, 1.22320576362361e+01, 1.22266460504667e+01,\n                                                1.22183941281146e+01, 1.22063887728154e+01, 1.21895933065244e+01, 1.21668663205112e+01, 1.21369882489333e+01,\n                                                1.20986954986283e+01, 1.20507215393433e+01, 1.19918438487114e+01, 1.19209350433338e+01, 1.18370159549632e+01,\n                                                1.17393078874782e+01, 1.16272808856787e+01, 1.15006946358583e+01, 1.13596286727996e+01, 1.12044989473355e+01,\n                                                1.10360585458481e+01, 1.08553814398849e+01, 1.06638295164429e+01, 1.04630046681728e+01, 1.02546892164284e+01,\n                                                1.00407791678699e+01, 9.82321554018124e+00, 9.60391906796228e+00, 9.38473296359769e+00, 9.16737715087425e+00,\n                                                8.95341573620832e+00, 8.74423774210234e+00, 8.54104961570946e+00, 8.34487698732350e+00, 8.15657270915780e+00,\n                                                7.97682833245892e+00, 7.80618674098321e+00, 7.64505444356832e+00, 7.49371282296540e+00, 7.35232827243606e+00,\n                                                7.22096153357955e+00, 7.09957667047197e+00, 6.98805003592024e+00, 6.88617940010332e+00, 6.79369321452865e+00,\n                                                6.71025984244125e+00, 6.63549652949021e+00, 6.56897790993618e+00, 6.51024391719442e+00, 6.45880706035467e+00,\n                                                6.41415911315009e+00, 6.37577732182686e+00, 6.34313026719771e+00, 6.31568351528519e+00, 6.29290516611900e+00,\n                                                6.27427136874019e+00, 6.25927181947384e+00, 6.24741520644281e+00, 6.23823451153976e+00, 6.23129203622543e+00,\n                                                6.22618398336313e+00, 6.22254440678770e+00, 6.22004833541602e+00, 6.21841389022939e+00, 6.21740323984783e+00,\n                                                6.21682228174652e+00, 6.21651898826281e+00, 6.21638041530354e+00, 6.21632843250430e+00, 6.21631429198876e+00,\n                                                6.21631220488069e+00, 6.21631202036964e+00, 6.21630840203181e+00, 6.21628388732468e+00, 6.21619376962709e+00,\n                                                6.21595355629889e+00, 6.21542789268465e+00, 6.21442132719075e+00, 6.21267134938733e+00, 6.20984412238381e+00,\n                                                6.20553331453388e+00, 6.19926240499755e+00, 6.19049078150442e+00, 6.17862385457408e+00, 6.16302726943752e+00,\n                                                6.14304509780768e+00, 6.11802163600576e+00, 6.08732613258105e+00, 6.05037943739053e+00, 6.00668123665551e+00,\n                                                5.95583625677215e+00, 5.89757763316016e+00, 5.83178560167271e+00, 5.75849982787096e+00, 5.67792407920079e+00,\n                                                5.59042257432866e+00, 5.49650817293914e+00, 5.39682349278668e+00, 5.29211688417195e+00, 5.18321574199259e+00,\n                                                5.07099971222333e+00, 4.95637589825408e+00, 4.84025732078147e+00, 4.72354491510424e+00, 4.60711258117798e+00,\n                                                4.49179444794839e+00, 4.37837359766059e+00, 4.26757187091661e+00, 4.16004081789497e+00, 4.05635418641120e+00,\n                                                3.95700244956178e+00, 3.86238978056584e+00, 3.77283365153107e+00, 3.68856695809841e+00, 3.60974233084995e+00,\n                                                3.53643813338418e+00, 3.46866558003646e+00, 3.40637642297074e+00, 3.34947073517124e+00, 3.29780442571339e+00,\n                                                3.25119624284362e+00, 3.20943413157651e+00, 3.17228090545797e+00, 3.13947926248250e+00, 3.11075622268383e+00,\n                                                3.08582709186201e+00, 3.06439906555660e+00, 3.04617458321621e+00, 3.03085452779182e+00, 3.01814134355115e+00,\n                                                3.00774211730766e+00, 2.99937163780174e+00, 2.99275541691323e+00, 2.98763262694315e+00, 2.98375888255954e+00,\n                                                2.98090877618680e+00, 2.97887806334701e+00, 2.97748539094853e+00, 2.97657346729790e+00, 2.97600958743271e+00,\n                                                2.97568545016897e+00, 2.97551623223125e+00, 2.97543891765243e+00, 2.97540991468829e+00, 2.97540202521691e+00,\n                                                2.97540086074884e+00, 2.97540075621239e+00, 2.97539868820707e+00, 2.97538467720563e+00, 2.97533317186372e+00,\n                                                2.97519588199896e+00, 2.97489544915159e+00, 2.97432017114247e+00, 2.97332002952758e+00, 2.97170426390041e+00,\n                                                2.96924072901422e+00, 2.96565725442931e+00, 2.96064519514096e+00, 2.95386530820156e+00, 2.94495600829189e+00,\n                                                2.93354394046409e+00, 2.91925666088268e+00, 2.90173704197435e+00, 2.88065882927776e+00, 2.85574259258517e+00,\n                                                2.82677115844235e+00, 2.79360351242538e+00, 2.75618614432275e+00, 2.71456089744019e+00, 2.66886858276226e+00,\n                                                2.61934792111591e+00, 2.56632975435176e+00, 2.51022687489765e+00, 2.45152020512374e+00, 2.39074235549363e+00,\n                                                2.32845975634284e+00, 2.26525456856752e+00, 2.20170744074881e+00, 2.13838193225542e+00, 2.07581112319051e+00,\n                                                2.01448664770183e+00, 1.95485016960304e+00, 1.89728719426295e+00, 1.84212307228398e+00, 1.78962106632525e+00,\n                                                1.73998237823462e+00, 1.69334803083934e+00, 1.64980244875795e+00, 1.60937849245828e+00, 1.57206359690717e+00,\n                                                1.53780658532727e+00, 1.50652469739320e+00, 1.47811040034547e+00, 1.45243763318821e+00, 1.42936724775131e+00,\n                                                1.40875153137212e+00, 1.39043780358221e+00, 1.37427116088593e+00, 1.36009649545195e+00, 1.34775993773497e+00,\n                                                1.33710987564818e+00, 1.32799769078630e+00, 1.32027833147514e+00, 1.31381081772071e+00, 1.30845874750354e+00,\n                                                1.30409084910487e+00, 1.30058160120591e+00, 1.29781192187488e+00, 1.29566990959874e+00, 1.29405160459908e+00,\n                                                1.29286172722995e+00, 1.29201434276155e+00, 1.29143339870405e+00, 1.29105308223235e+00, 1.29081795114233e+00,\n                                                1.29068280165090e+00, 1.29061224942289e+00, 1.29058001535051e+00, 1.29056792353207e+00, 1.29056463429212e+00,\n                                                1.29056414880819e+00, 1.29056410405526e+00, 1.29056320569010e+00, 1.29055711916196e+00, 1.29053474485956e+00,\n                                                1.29047510640164e+00, 1.29034460541998e+00, 1.29009474296648e+00, 1.28966042566534e+00, 1.28895897815424e+00,\n                                                1.28788998551926e+00, 1.28633608651798e+00, 1.28416482550784e+00, 1.28123164279299e+00, 1.27738403470499e+00,\n                                                1.27246684301728e+00, 1.26632853832658e+00, 1.25882824848582e+00, 1.24984316134603e+00, 1.23927581712228e+00,\n                                                1.22706072062687e+00, 1.21316967054689e+00, 1.19761524275587e+00, 1.18045199009160e+00, 1.16177513046590e+00,\n                                                1.14171676772161e+00, 1.12043998436246e+00, 1.09813140669987e+00, 1.07499301399326e+00, 1.05123400259998e+00,\n                                                1.02706341460780e+00, 1.00268402671229e+00, 9.78287728191667e-01, 9.54052365382999e-01, 9.30139848594465e-01,\n                                                9.06695230101931e-01, 8.83846460602697e-01, 8.61704586304995e-01, 8.40364224007999e-01, 8.19904218916164e-01,\n                                                8.00388435129037e-01, 7.81866650270594e-01, 7.64375530115778e-01, 7.47939655350159e-01, 7.32572568271749e-01,\n                                                7.18277806579877e-01, 7.05049895497901e-01, 6.92875277307607e-01, 6.81733166977004e-01, 6.71596332005862e-01,\n                                                6.62431802507996e-01, 6.54201523195390e-01, 6.46862962207976e-01, 6.40369692896158e-01, 6.34671964129062e-01,\n                                                6.29717272894773e-01, 6.25450950240925e-01, 6.21816768239967e-01, 6.18757571843837e-01, 6.16215935366220e-01,\n                                                6.14134839035685e-01, 6.12458356765110e-01, 6.11132342183865e-01, 6.10105096323473e-01, 6.09327997407441e-01,\n                                                6.08756071245374e-01, 6.08348480013547e-01, 6.08068907892971e-01, 6.07885824206924e-01, 6.07772608303300e-01,\n                                                6.07707525284418e-01, 6.07673547499409e-01, 6.07658023092100e-01, 6.07652199403262e-01, 6.07650615223633e-01,\n                                                6.07650381402209e-01, 6.07650359119276e-01, 6.07649903908232e-01, 6.07646819793679e-01, 6.07635482370853e-01,\n                                                6.07605261797524e-01, 6.07539129040411e-01, 6.07412493097584e-01, 6.07192322794482e-01, 6.06836604958175e-01,\n                                                6.06294188216992e-01, 6.05505057274890e-01, 6.04401074883718e-01, 6.02907216380579e-01, 6.00943303254788e-01,\n                                                5.98426217008686e-01, 5.95272542824169e-01, 5.91401555870512e-01, 5.86738424726398e-01, 5.81217471113000e-01,\n                                                5.74785298759636e-01, 5.67403592665102e-01, 5.59051398007149e-01, 5.49726717659567e-01, 5.39447317231122e-01,\n                                                5.28250691241645e-01, 5.16193214550789e-01, 5.03348568676088e-01, 4.89805582906236e-01, 4.75665657877279e-01,\n                                                4.61039942205169e-01, 4.46046414109013e-01, 4.30806987588383e-01, 4.15444726758295e-01, 4.00081221729714e-01,\n                                                3.84834160820589e-01, 3.69815127926017e-01, 3.55127657123248e-01, 3.40865582917509e-01, 3.27111727619382e-01,\n                                                3.13936962791146e-01, 3.01399668212255e-01, 2.89545591135003e-01, 2.78408084528039e-01, 2.68008679981861e-01,\n                                                2.58357932803698e-01, 2.49456465951589e-01, 2.41296136570767e-01, 2.33861253273126e-01, 2.27129782250159e-01,\n                                                2.21074493717687e-01, 2.15664014978685e-01, 2.10863770813397e-01, 2.06636804698697e-01, 2.02944484742908e-01,\n                                                1.99747105847813e-01, 1.97004404443526e-01, 1.94676004374948e-01, 1.92721812471646e-01, 1.91102380405191e-01,\n                                                1.89779246063672e-01, 1.88715263308403e-01, 1.87874924083808e-01, 1.87224671886447e-01, 1.86733201000187e-01,\n                                                1.86371732069894e-01, 1.86114251841978e-01, 1.85937703480000e-01, 1.85822113878174e-01, 1.85750645824520e-01,\n                                                1.85709565554141e-01, 1.85688119912967e-01, 1.85678321670423e-01, 1.85674646083861e-01, 1.85673646242030e-01,\n                                                1.85673498667725e-01, 1.85673484061169e-01, 1.85673179971893e-01, 1.85671119731531e-01, 1.85663546207309e-01,\n                                                1.85643359027061e-01, 1.85599185228675e-01, 1.85514607626544e-01, 1.85367590629099e-01, 1.85130144306136e-01,\n                                                1.84768268242827e-01, 1.84242215991929e-01, 1.83507117313198e-01, 1.82513987330353e-01, 1.81211137850639e-01,\n                                                1.79545985452705e-01, 1.77467223410062e-01, 1.74927291017951e-01, 1.71885036648987e-01, 1.68308433419497e-01,\n                                                1.64177173394371e-01, 1.59484943206742e-01, 1.54241176289275e-01, 1.48472089263208e-01, 1.42220845288257e-01,\n                                                1.35546745489776e-01, 1.28523427633482e-01, 1.21236141913421e-01, 1.13778266524683e-01, 1.06247307857849e-01,\n                                                9.87406887710307e-02, 9.13516530388350e-02, 8.41655993613912e-02, 7.72571055834987e-02, 7.06878212453645e-02,\n                                                6.45053077285098e-02, 5.87428058053447e-02, 5.34198248774018e-02, 4.85433870322680e-02, 4.41097270273829e-02,\n                                                4.01062455229209e-02, 3.65135320549967e-02, 3.33073086749707e-02, 3.04601867624470e-02, 2.79431712461431e-02,\n                                                2.57268833088418e-02, 2.37825017819446e-02, 2.20824439560943e-02, 2.06008189713387e-02, 1.93136926669126e-02,\n                                                1.81992034662102e-02, 1.72375662288857e-02, 1.64109964623336e-02, 1.57035819593716e-02, 1.51011235878684e-02,\n                                                1.45909620617388e-02, 1.41618032986344e-02, 1.38035514726482e-02, 1.35071560510980e-02, 1.32644768580334e-02,\n                                                1.30681694071981e-02, 1.29115912758877e-02, 1.27887290550959e-02, 1.26941443491333e-02, 1.26229363861583e-02,\n                                                1.25707180491617e-02, 1.25336015756616e-02, 1.25081898458106e-02, 1.24915691212664e-02, 1.24812993283143e-02,\n                                                1.24753984910910e-02, 1.24723186716622e-02, 1.24709116934625e-02, 1.24703839224196e-02, 1.24702403592138e-02,\n                                                1.24702191697139e-02, 1.24702169839139e-02, 1.24701705847272e-02, 1.24698562276464e-02, 1.24687006814455e-02,\n                                                1.24656209086424e-02, 1.24588833824504e-02, 1.24459897167313e-02, 1.24235972321358e-02, 1.23874846530185e-02,\n                                                1.23325746251481e-02, 1.22530255561557e-02, 1.21424046201142e-02, 1.19939507701261e-02, 1.18009305010673e-02,\n                                                1.15570794889308e-02, 1.12571103492485e-02, 1.08972517828221e-02, 1.04757695644579e-02, 9.99340837462626e-03,\n                                                9.45368901724208e-03, 8.86300133281281e-03, 8.23045081929763e-03, 7.56744582677982e-03, 6.88704840921872e-03,\n                                                6.20314905151531e-03, 5.52955572513980e-03, 4.87910384433121e-03, 4.26289119115353e-03, 3.68972050613792e-03,\n                                                3.16579665911121e-03, 2.69468336115608e-03, 2.27748606881306e-03, 1.91320146704044e-03, 1.59916383908865e-03,\n                                                1.33152326923636e-03, 1.10570410683408e-03, 9.16807676617282e-04, 7.59936897274827e-04, 6.30432288325267e-04,\n                                                5.24020511861067e-04, 4.36887985209466e-04, 3.65700130522839e-04, 3.07588062248954e-04, 2.60118891937111e-04,\n                                                2.21257563076449e-04, 1.89322569887906e-04, 1.62937323558765e-04, 1.40981187371381e-04, 1.22545434990684e-04,\n                                                1.06897625592239e-04, 9.34543284003553e-05, 8.17593774371517e-05, 7.14644317127977e-05, 6.23100842958024e-05,\n                                                5.41075643383238e-05, 4.67220268305368e-05, 4.00583401756194e-05, 3.40496707735838e-05, 2.86486008533871e-05,\n                                                2.38202750466598e-05, 1.95371136086919e-05, 1.57747864122371e-05, 1.25092714924335e-05, 9.71487365575285e-06,\n                                                7.36307173099249e-06, 5.42203758868709e-06, 3.85665843083416e-06, 2.62890520019710e-06, 1.69842073205473e-06,\n                                                1.02323961925777e-06, 5.60589391795929e-07, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {4.00000000000000e+01,  3.99999998638797e+01,  3.99999956547694e+01, 3.99999671373616e+01,\n                                                3.99998623033585e+01,  3.99995828467511e+01,  3.99989712240155e+01, 3.99977997447526e+01,\n                                                3.99957620680069e+01,  3.99924673953925e+01,  3.99874375592821e+01, 3.99801071099115e+01,\n                                                3.99698264184791e+01,  3.99558677443968e+01,  3.99374341733219e+01, 3.99136713246305e+01,\n                                                3.98836817519652e+01,  3.98465420076975e+01,  3.98013223888517e+01, 3.97471093944535e+01,\n                                                3.96830308628408e+01,  3.96082835867932e+01,  3.95221629063546e+01, 3.94240933664273e+01,\n                                                3.93136590499603e+01,  3.91906317465201e+01,  3.90549948020592e+01, 3.89069604279963e+01,\n                                                3.87469785014066e+01,  3.85757354766432e+01,  3.83941428901882e+01, 3.82033159446897e+01,\n                                                3.80045436339083e+01,  3.77992526466337e+01,  3.75889677355052e+01, 3.73752712990003e+01,\n                                                3.71597646260587e+01,  3.69440326862124e+01,  3.67296136469729e+01, 3.65179736025860e+01,\n                                                3.63104864159293e+01,  3.61084181748843e+01,  3.59129155628838e+01, 3.57249974158033e+01,\n                                                3.55455488333024e+01,  3.53753173730996e+01,  3.52149110286549e+01, 3.50647978367537e+01,\n                                                3.49253070620830e+01,  3.47966319576708e+01,  3.46788341106856e+01, 3.45718493654583e+01,\n                                                3.44754952829365e+01,  3.43894800585126e+01,  3.43134127846442e+01, 3.42468149134620e+01,\n                                                3.41891327475487e+01,  3.41397507628599e+01,  3.40980055448327e+01, 3.40632000962091e+01,\n                                                3.40346182531484e+01,  3.40115389259705e+01,  3.39932498643532e+01, 3.39790606364397e+01,\n                                                3.39683145096128e+01,  3.39603989299037e+01,  3.39547543187020e+01, 3.39508809403802e+01,\n                                                3.39483436423340e+01,  3.39467743284496e+01,  3.39458720958151e+01, 3.39454010395002e+01,\n                                                3.39451858077941e+01,  3.39451050665970e+01,  3.39450831030003e+01, 3.39450798612182e+01,\n                                                3.39450794174640e+01,  3.39450689374908e+01,  3.39449979342091e+01, 3.39447369198158e+01,\n                                                3.39440411603474e+01,  3.39425185538024e+01,  3.39396027564802e+01, 3.39345327121619e+01,\n                                                3.39263396529401e+01,  3.39138425359093e+01,  3.38956527430509e+01, 3.38701886850577e+01,\n                                                3.38357006951212e+01,  3.37903062606535e+01,  3.37320352126500e+01, 3.36588839805723e+01,\n                                                3.35688774492417e+01,  3.34601363647661e+01,  3.33309476821064e+01, 3.31798347792107e+01,\n                                                3.30056241146050e+01,  3.28075046792685e+01,  3.25850764735455e+01, 3.23383842460042e+01,\n                                                3.20679330122366e+01,  3.17746827684165e+01,  3.14600217563894e+01, 3.11257207544096e+01,\n                                                3.07738744599820e+01,  3.04068384445700e+01,  3.00271696450970e+01, 2.96375745918877e+01,\n                                                2.92408644084088e+01,  2.88399119590352e+01,  2.84376061901846e+01, 2.80368013161211e+01,\n                                                2.76402621341143e+01,  2.72506095024119e+01,  2.68702709508941e+01, 2.65014406342592e+01,\n                                                2.61460510762368e+01,  2.58057571710700e+01,  2.54819312775394e+01, 2.51756672374483e+01,\n                                                2.48877907963754e+01,  2.46188740608107e+01,  2.43692520898712e+01, 2.41390402980018e+01,\n                                                2.39281518935857e+01,  2.37363150153415e+01,  2.35630895262892e+01, 2.34078835937103e+01,\n                                                2.32699702515556e+01,  2.31485041419865e+01,  2.30425385931544e+01, 2.29510431305149e+01,\n                                                2.28729214502812e+01,  2.28070298114704e+01,  2.27521957295447e+01, 2.27072367812182e+01,\n                                                2.26709792584824e+01,  2.26422763434838e+01,  2.26200254189592e+01, 2.26031840866478e+01,\n                                                2.25907844435836e+01,  2.25819451677955e+01,  2.25758809935274e+01, 2.25719092124300e+01,\n                                                2.25694529196815e+01,  2.25680408287717e+01,  2.25673035997755e+01, 2.25669667559767e+01,\n                                                2.25668403945975e+01,  2.25668060212724e+01,  2.25668009478428e+01, 2.25668004662345e+01,\n                                                2.25667906473846e+01,  2.25667241233193e+01,  2.25664795751284e+01, 2.25658277095014e+01,\n                                                2.25644011685848e+01,  2.25616693677088e+01,  2.25569193550750e+01, 2.25492437140978e+01,\n                                                2.25375364384979e+01,  2.25204975882642e+01,  2.24966473629147e+01, 2.24643499875276e+01,\n                                                2.24218474799941e+01,  2.23673029459105e+01,  2.22988525347199e+01, 2.22146646094044e+01,\n                                                2.21130040754229e+01,  2.19922992459416e+01,  2.18512081668102e+01, 2.16886810643338e+01,\n                                                2.15040155720102e+01,  2.12969016599614e+01,  2.10674536970189e+01, 2.08162277262312e+01,\n                                                2.05442227037696e+01,  2.02528650407253e+01,  1.99439763076770e+01, 1.96197245874653e+01,\n                                                1.92825609854811e+01,  1.89351444381236e+01,  1.85802600157000e+01, 1.82207376383688e+01,\n                                                1.78593784307235e+01,  1.74988941462593e+01,  1.71418616069339e+01, 1.67906904001534e+01,\n                                                1.64475997904792e+01,  1.61146006769370e+01,  1.57934799814118e+01, 1.54857869309977e+01,\n                                                1.51928222588796e+01,  1.49156319330711e+01,  1.46550067269558e+01, 1.44114881543957e+01,\n                                                1.41853804097625e+01,  1.39767672577928e+01,  1.37855324306135e+01, 1.36113820077563e+01,\n                                                1.34538674082101e+01,  1.33124079172288e+01,  1.31863120174674e+01, 1.30747971283538e+01,\n                                                1.29770076384530e+01,  1.28920313235248e+01,  1.28189143743825e+01, 1.27566753197836e+01,\n                                                1.27043181318394e+01,  1.26608447581214e+01,  1.26252672491425e+01, 1.25966195547765e+01,\n                                                1.25739689599863e+01,  1.25564270294363e+01,  1.25431598414974e+01, 1.25333972228377e+01,\n                                                1.25264406515243e+01,  1.25216694835390e+01,  1.25185451764455e+01, 1.25166132335155e+01,\n                                                1.25155026680472e+01,  1.25149228846619e+01,  1.25146579841227e+01, 1.25145586119625e+01,\n                                                1.25145315804367e+01,  1.25145275906441e+01,  1.25145272355811e+01, 1.25145202461240e+01,\n                                                1.25144728916380e+01,  1.25142988132451e+01,  1.25138347972764e+01, 1.25128193762200e+01,\n                                                1.25108749783938e+01,  1.25074944520890e+01,  1.25020327646552e+01, 1.24937046415592e+01,\n                                                1.24815888496189e+01,  1.24646397230860e+01,  1.24417063603094e+01, 1.24115596638295e+01,\n                                                1.23729270457357e+01,  1.23245341713365e+01,  1.22651525804167e+01, 1.21936514364409e+01,\n                                                1.21090510578562e+01,  1.20105753466253e+01,  1.18976998243235e+01, 1.17701917981961e+01,\n                                                1.16281392867061e+01,  1.14719657969069e+01,  1.13024288914612e+01, 1.11206016875958e+01,\n                                                1.09278379046530e+01,  1.07257226611526e+01,  1.05160126961627e+01, 1.03005708053572e+01,\n                                                1.00812998163169e+01,  9.86008124310941e+00,  9.63872285544533e+00, 9.41891792501302e+00,\n                                                9.20221715122717e+00,  8.99001256297796e+00,  8.78353136005239e+00, 8.58383691205219e+00,\n                                                8.39183403687994e+00,  8.20827614342446e+00,  8.03377263535725e+00, 7.86879587489673e+00,\n                                                7.71368775838110e+00,  7.56866640278081e+00,  7.43383354088209e+00, 7.30918303828818e+00,\n                                                7.19461061268549e+00,  7.08992450307724e+00,  6.99485661390573e+00, 6.90907359152438e+00,\n                                                6.83218736237759e+00,  6.76376482038539e+00,  6.70333653433261e+00, 6.65040450674333e+00,\n                                                6.60444912779845e+00,  6.56493552524315e+00,  6.53131952078607e+00, 6.50305337768988e+00,\n                                                6.47959147602918e+00,  6.46039599224888e+00,  6.44494259626119e+00, 6.43272611812353e+00,\n                                                6.42326608153669e+00,  6.41611195625700e+00,  6.41084794870552e+00, 6.40709713172077e+00,\n                                                6.40452471197499e+00,  6.40284024754327e+00,  6.40179865778116e+00, 6.40119991106039e+00,\n                                                6.40088732986396e+00,  6.40074451316912e+00,  6.40069093838149e+00, 6.40067636480494e+00,\n                                                6.40067421377791e+00,  6.40067402361608e+00,  6.40067029446437e+00, 6.40064502897617e+00,\n                                                6.40055215131753e+00,  6.40030458086623e+00,  6.39976281596013e+00, 6.39872541299687e+00,\n                                                6.39692180362957e+00,  6.39400788031958e+00,  6.38956476213996e+00, 6.38310111948148e+00,\n                                                6.37405937663976e+00,  6.36182601258796e+00,  6.34574603122012e+00, 6.32514146565146e+00,\n                                                6.29933351655762e+00,  6.26766761189599e+00,  6.22954033696939e+00, 6.18442685538039e+00,\n                                                6.13190717113077e+00,  6.07168942678848e+00,  6.00362845046148e+00, 5.92773800292430e+00,\n                                                5.84419565592101e+00,  5.75333992656978e+00,  5.65566011091106e+00, 5.55178004888037e+00,\n                                                5.44243762677930e+00,  5.32846202359558e+00,  5.21075047896987e+00, 5.09024579582079e+00,\n                                                4.96791510794561e+00,  4.84472989538414e+00,  4.72164699235705e+00, 4.59959042909902e+00,\n                                                4.47943426403569e+00,  4.36198691294621e+00,  4.24797770438077e+00, 4.13804640248612e+00,\n                                                4.03273624684746e+00,  3.93249073566005e+00,  3.83765401891176e+00, 3.74847445620034e+00,\n                                                3.66511068184469e+00,  3.58763942524826e+00,  3.51606434586896e+00, 3.45032523185973e+00,\n                                                3.39030704646994e+00,  3.33584845673015e+00,  3.28674962239953e+00, 3.24277914588880e+00,\n                                                3.20368017969339e+00,  3.16917575604549e+00,  3.13897344652890e+00, 3.11276948125200e+00,\n                                                3.09025246204617e+00,  3.07110679587198e+00,  3.05501595640779e+00, 3.04166565636149e+00,\n                                                3.03074698273346e+00,  3.02195951425590e+00,  3.01501440673167e+00, 3.00963740023803e+00,\n                                                3.00557167441379e+00,  3.00258045645855e+00,  3.00044927288540e+00, 2.99898773179837e+00,\n                                                2.99803072811367e+00,  2.99743897946110e+00,  2.99709882436697e+00, 2.99692124482542e+00,\n                                                2.99684011002270e+00,  2.99680967400305e+00,  2.99680139470983e+00, 2.99680017270502e+00,\n                                                2.99680006300339e+00,  2.99679789281733e+00,  2.99678318952980e+00, 2.99672913932429e+00,\n                                                2.99658506619684e+00,  2.99626979042174e+00,  2.99566609438717e+00, 2.99461655848046e+00,\n                                                2.99292102535069e+00,  2.99033594338288e+00,  2.98657582387819e+00, 2.98131701398351e+00,\n                                                2.97420393103312e+00,  2.96485781669038e+00,  2.95288794671730e+00, 2.93790507440443e+00,\n                                                2.91953669884411e+00,  2.89744354678844e+00,  2.87133645964786e+00, 2.84099271214965e+00,\n                                                2.80627068617144e+00,  2.76712181045024e+00,  2.72359877479179e+00, 2.67585924297701e+00,\n                                                2.62416461029072e+00,  2.56887374780963e+00,  2.51043209704071e+00, 2.44935686603471e+00,\n                                                2.38621937445144e+00,  2.32162575827076e+00,  2.25619725932440e+00, 2.19055120586204e+00,\n                                                2.12528357967508e+00,  2.06095381808854e+00,  1.99807226670390e+00, 1.93709051307234e+00,\n                                                1.87839469756496e+00,  1.82230179743541e+00,  1.76905878523282e+00, 1.71884445170056e+00,\n                                                1.67177355330283e+00,  1.62790281366156e+00,  1.58723820678439e+00, 1.54974290615840e+00,\n                                                1.51534531102152e+00,  1.48394665327751e+00,  1.45542782371324e+00, 1.42965520587716e+00,\n                                                1.40648544439805e+00,  1.38576918459530e+00,  1.36735389510249e+00, 1.35108592636056e+00,\n                                                1.33681197164042e+00,  1.32438009183046e+00,  1.31364044812027e+00, 1.30444586378960e+00,\n                                                1.29665231150149e+00,  1.29011939806630e+00,  1.28471089566950e+00, 1.28029534741983e+00,\n                                                1.27674675585334e+00,  1.27394534577294e+00,  1.27177837768656e+00, 1.27014097547951e+00,\n                                                1.26893692231128e+00,  1.26807937260424e+00,  1.26749142586311e+00, 1.26710651019516e+00,\n                                                1.26686852974999e+00,  1.26673174045460e+00,  1.26666033160564e+00, 1.26662770602294e+00,\n                                                1.26661546731717e+00,  1.26661213811857e+00,  1.26661164673678e+00, 1.26661160144015e+00,\n                                                1.26661069216119e+00,  1.26660453168909e+00,  1.26658188553995e+00, 1.26652152227774e+00,\n                                                1.26638943426411e+00,  1.26613652932922e+00,  1.26569691134572e+00, 1.26498687025258e+00,\n                                                1.26390470330382e+00,  1.26233148554218e+00,  1.26013289400047e+00, 1.25716216177416e+00,\n                                                1.25326419026893e+00,  1.24828077778683e+00,  1.24205683059171e+00, 1.23444731372638e+00,\n                                                1.22532458369520e+00,  1.21458563969784e+00,  1.20215875441622e+00, 1.18800892027914e+00,\n                                                1.17214158970740e+00,  1.15460430589986e+00,  1.13548600809989e+00, 1.11491402961779e+00,\n                                                1.09304905167195e+00,  1.07007848780225e+00,  1.04620891262314e+00, 1.02165819100311e+00,\n                                                9.96647908574339e-01,  9.71396574210736e-01,  9.46113897240615e-01, 9.20996276201862e-01,\n                                                8.96223501308519e-01,  8.71956582414825e-01,  8.48336565630134e-01, 8.25484183193502e-01,\n                                                8.03500179432135e-01,  7.82466160872765e-01,  7.62445826396011e-01, 7.43486443341659e-01,\n                                                7.25620448988174e-01,  7.08867074750771e-01,  6.93233912283951e-01, 6.78718364628523e-01,\n                                                6.65308949156476e-01,  6.52986440038859e-01,  6.41724854702801e-01, 6.31492300589976e-01,\n                                                6.22251705646399e-01,  6.13961459088685e-01,  6.06575989084810e-01, 6.00046302032560e-01,\n                                                5.94320504924482e-01,  5.89344328428368e-01,  5.85061664135488e-01, 5.81415125104236e-01,\n                                                5.78346634419589e-01,  5.75798042019549e-01,  5.73711765549220e-01, 5.72031446577753e-01,\n                                                5.70702609310580e-01,  5.69673305168301e-01,  5.68894723548730e-01, 5.68321747019333e-01,\n                                                5.67913428356157e-01,  5.67633367440806e-01,  5.67449968134831e-01, 5.67336558829851e-01,\n                                                5.67271365245858e-01,  5.67237329916125e-01,  5.67221779257309e-01, 5.67215945727270e-01,\n                                                5.67214358871226e-01,  5.67214124654797e-01,  5.67214102334219e-01, 5.67213646354169e-01,\n                                                5.67210557030101e-01,  5.67199200465325e-01,  5.67168928934379e-01, 5.67102685001444e-01,\n                                                5.66975837460120e-01,  5.66755303301917e-01,  5.66399008416553e-01, 5.65855737461177e-01,\n                                                5.65065419156781e-01,  5.63959885689897e-01,  5.62464132307930e-01, 5.60498084187927e-01,\n                                                5.57978851436083e-01,  5.54823419925626e-01,  5.50951687392448e-01, 5.46289714312280e-01,\n                                                5.40773022754571e-01,  5.34349749887859e-01,  5.26983452340595e-01, 5.18655367980877e-01,\n                                                5.09365974692919e-01,  4.99135739139319e-01,  4.88005015732746e-01, 4.76033127118171e-01,\n                                                4.63296721057119e-01,  4.49887544753309e-01,  4.35909800392047e-01, 4.21477244603985e-01,\n                                                4.06710174887543e-01,  3.91732416695447e-01,  3.76668395715228e-01, 3.61640358403406e-01,\n                                                3.46765793271921e-01,  3.32155104193390e-01,  3.17909590016548e-01, 3.04119785822941e-01,\n                                                2.90864215213539e-01,  2.78208587944107e-01,  2.66205454127345e-01, 2.54894298694708e-01,\n                                                2.44302032589985e-01,  2.34443814660814e-01,  2.25324123459842e-01, 2.16937992395955e-01,\n                                                2.09272324422912e-01,  2.02307212041831e-01,  1.96017202531209e-01, 1.90372464630684e-01,\n                                                1.85339829326530e-01,  1.80883692360950e-01,  1.76966778625967e-01, 1.73550778225888e-01,\n                                                1.70596870612037e-01,  1.68066156985901e-01,  1.65920022456405e-01, 1.64120448620004e-01,\n                                                1.62630294731358e-01,  1.61413561872436e-01,  1.60435649934463e-01, 1.59663612218061e-01,\n                                                1.59066407445621e-01,  1.58615144361917e-01,  1.58283310236548e-01, 1.58046971778880e-01,\n                                                1.57884935452550e-01,  1.57778854039996e-01,  1.57713267543244e-01, 1.57675568970326e-01,\n                                                1.57655888991975e-01,  1.57646897520920e-01,  1.57643524586327e-01, 1.57642607073569e-01,\n                                                1.57642471650874e-01,  1.57642458247047e-01,  1.57642179197218e-01, 1.57640288602977e-01,\n                                                1.57633338719421e-01,  1.57614813963718e-01,  1.57574278480141e-01, 1.57496669219505e-01,\n                                                1.57361771891345e-01,  1.57143918627355e-01,  1.56811947387254e-01, 1.56329462870680e-01,\n                                                1.55655435493024e-01,  1.54745167239277e-01,  1.53551639486352e-01, 1.52027237214483e-01,\n                                                1.50125816278745e-01,  1.47805046602677e-01,  1.45028926687147e-01, 1.41770327519119e-01,\n                                                1.38013391858834e-01,  1.33755593738464e-01,  1.29009258516959e-01, 1.23802360622300e-01,\n                                                1.18178456609961e-01,  1.12195674620232e-01,  1.05924763108355e-01, 9.94462932998985e-02,\n                                                9.28471994601665e-02,  8.62169155225843e-02,  7.96434135714463e-02, 7.32094604088758e-02,\n                                                6.69893801194945e-02,  6.10465472760424e-02,  5.54317476170212e-02, 5.01824451481454e-02,\n                                                4.53229019799082e-02,  4.08650226863330e-02,  3.68097466509596e-02, 3.31487921742522e-02,\n                                                2.98665623245142e-02,  2.69420483057772e-02,  2.43506035419756e-02, 2.20655030036667e-02,\n                                                2.00592413414213e-02,  1.83045561397108e-02,  1.67751872283404e-02, 1.54463993199769e-02,\n                                                1.42953041778071e-02,  1.33010214954439e-02,  1.24447163547146e-02, 1.17095471544815e-02,\n                                                1.10805526891937e-02,  1.05445016187105e-02,  1.00897224990746e-02, 9.70592808885584e-03,\n                                                9.38404387537872e-03,  9.11604767829033e-03,  8.89482475066217e-03, 8.71404093796713e-03,\n                                                8.56803505707404e-03,  8.45173058540638e-03,  8.36056588526191e-03, 8.29044145093150e-03,\n                                                8.23768202457131e-03,  8.19901088904373e-03,  8.17153324078390e-03, 8.15272531134781e-03,\n                                                8.14042587490604e-03,  8.13282696785222e-03,  8.12846105059606e-03, 8.12618243116958e-03,\n                                                8.12514148984889e-03,  8.12475102573273e-03,  8.12464481275299e-03, 8.12462913603440e-03,\n                                                8.12462751894572e-03,  8.12459319196535e-03,  8.12436062508226e-03, 8.12350573668397e-03,\n                                                8.12122731782239e-03,  8.11624308174430e-03,  8.10670543955183e-03, 8.09014367670358e-03,\n                                                8.06344052806907e-03,  8.02285241014289e-03,  7.96408326384324e-03, 7.88242143546114e-03,\n                                                7.77294655837579e-03,  7.63080835845642e-03,  7.45157135919072e-03, 7.23160883740803e-03,\n                                                6.96851710053892e-03,  6.66150916659092e-03,  6.31173796890039e-03, 5.92249638091147e-03,\n                                                5.49924734781371e-03,  5.04945351954689e-03,  4.58220103236329e-03, 4.10764282455744e-03,\n                                                3.63631715081425e-03,  3.17841986304757e-03,  2.74311865524623e-03, 2.33799094170450e-03,\n                                                1.96864567664790e-03,  1.63855848624905e-03,  1.34911638222235e-03, 1.09984003302088e-03,\n                                                8.88732477598353e-04,  7.12694498446353e-04,  5.67947759805065e-04, 4.50415961488204e-04,\n                                                3.56030391749584e-04,  2.80946801829884e-04,  2.21680085843445e-04, 1.75174931179356e-04,\n                                                1.38830647323118e-04,  1.10490631804794e-04,  8.84015193634013e-05, 7.11514416167347e-05,\n                                                5.76069649014244e-05,  4.68711442778158e-05,  3.82702455112849e-05, 3.13475712090394e-05,\n                                                2.58232019021420e-05,  2.14991774853956e-05,  1.81554636426995e-05, 1.55269018264903e-05,\n                                                1.33733924485568e-05,  1.15411062324711e-05,  9.95107362911085e-06, 8.55561892620926e-06,\n                                                7.31524581709664e-06,  6.20053089761541e-06,  5.19699903378523e-06, 4.30122081240825e-06,\n                                                3.51250709940132e-06,  2.82742010426773e-06,  2.23910161167851e-06, 1.73918758861191e-06,\n                                                1.31959991023223e-06,  9.73128386760891e-07,  6.93124270867429e-07, 4.72980957511027e-07,\n                                                0.00000000000000e+00,  -7.10542735760100e-15, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                -7.10542735760100e-15, -7.10542735760100e-15, 0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {4.10000000000000e+01, 4.09999998589562e+01, 4.09999954976028e+01, 4.09999659487221e+01, 4.09998573228736e+01,\n                                                4.09995677582733e+01, 4.09989340127951e+01, 4.09977201595257e+01, 4.09956087743216e+01, 4.09921949164905e+01,\n                                                4.09869831073885e+01, 4.09793874140138e+01, 4.09687346552638e+01, 4.09542706782152e+01, 4.09351696106480e+01,\n                                                4.09105459904666e+01, 4.08794697017584e+01, 4.08409836991876e+01, 4.07941245525127e+01, 4.07379458547358e+01,\n                                                4.06715444682709e+01, 4.05940893959624e+01, 4.05048527394854e+01, 4.04032417617346e+01, 4.02888305595262e+01,\n                                                4.01613893754978e+01, 4.00209092545839e+01, 3.98676196972853e+01, 3.97019972566746e+01, 3.95247636778622e+01,\n                                                3.93368731148090e+01, 3.91394890345207e+01, 3.89339524462367e+01, 3.87217438907540e+01, 3.85044420592620e+01,\n                                                3.82836819292035e+01, 3.80611149423151e+01, 3.78383731152684e+01, 3.76170382137610e+01, 3.73986163847235e+01,\n                                                3.71845180445967e+01, 3.69760424292305e+01, 3.67743660335136e+01, 3.65805341732234e+01, 3.63954550289565e+01,\n                                                3.62198957171249e+01, 3.60544801198103e+01, 3.58996883558212e+01, 3.57558578720863e+01, 3.56231861772795e+01,\n                                                3.55017352392978e+01, 3.53914375404799e+01, 3.52921037441596e+01, 3.52034318842502e+01, 3.51250179521440e+01,\n                                                3.50563677240944e+01, 3.49969096464230e+01, 3.49460085732151e+01, 3.49029801295439e+01, 3.48671054515867e+01,\n                                                3.48376460333247e+01, 3.48138583891382e+01, 3.47950082246515e+01, 3.47803837973064e+01, 3.47693081460563e+01,\n                                                3.47611498786610e+01, 3.47553322270495e+01, 3.47513401168961e+01, 3.47487250466698e+01, 3.47471076325815e+01,\n                                                3.47461777466968e+01, 3.47456922527745e+01, 3.47454704243793e+01, 3.47453872085319e+01, 3.47453645717700e+01,\n                                                3.47453612306301e+01, 3.47453607732752e+01, 3.47453499721000e+01, 3.47452767926312e+01, 3.47450077784038e+01,\n                                                3.47442906947728e+01, 3.47427214231429e+01, 3.47397162655051e+01, 3.47344908507189e+01, 3.47260467463700e+01,\n                                                3.47131667731702e+01, 3.46944198787280e+01, 3.46681762360087e+01, 3.46326329698186e+01, 3.45858505663637e+01,\n                                                3.45257995790152e+01, 3.44504167141956e+01, 3.43576687884466e+01, 3.42456224320098e+01, 3.41125168272755e+01,\n                                                3.39568362618515e+01, 3.37773788780466e+01, 3.35733177219048e+01, 3.33442500420655e+01, 3.30902308292043e+01,\n                                                3.28117870348772e+01, 3.25099101461333e+01, 3.21860271812009e+01, 3.18419535982774e+01, 3.14798350296747e+01,\n                                                3.11020863588036e+01, 3.07113350330478e+01, 3.03103710547781e+01, 2.99021012070626e+01, 2.94895025046660e+01,\n                                                2.90755707378515e+01, 2.86632632574911e+01, 2.82554387466005e+01, 2.78547989542628e+01, 2.74638376537406e+01,\n                                                2.70848007956371e+01, 2.67196597584364e+01, 2.63700975286757e+01, 2.60375060855512e+01, 2.57229924239379e+01,\n                                                2.54273904826904e+01, 2.51512765664116e+01, 2.48949864304049e+01, 2.46586328397369e+01, 2.44421229770777e+01,\n                                                2.42451754925089e+01, 2.40673372502747e+01, 2.39079999560100e+01, 2.37664168813309e+01, 2.36417198781778e+01,\n                                                2.35329368216180e+01, 2.34390095546583e+01, 2.33588123404686e+01, 2.32911707587855e+01, 2.32348809141027e+01,\n                                                2.31887287534385e+01, 2.31515092222816e+01, 2.31220449218589e+01, 2.30992038738618e+01, 2.30819159558067e+01,\n                                                2.30691875469330e+01, 2.30601139257348e+01, 2.30538889890082e+01, 2.30498119196242e+01, 2.30472905145596e+01,\n                                                2.30458409920329e+01, 2.30450842207946e+01, 2.30447384480833e+01, 2.30446087371768e+01, 2.30445734527007e+01,\n                                                2.30445682447872e+01, 2.30445677504126e+01, 2.30445576712896e+01, 2.30444893838384e+01, 2.30442383532977e+01,\n                                                2.30435692084387e+01, 2.30421048540327e+01, 2.30393006422681e+01, 2.30344247267394e+01, 2.30265456476230e+01,\n                                                2.30145281040770e+01, 2.29970377452172e+01, 2.29725556354791e+01, 2.29394028037827e+01, 2.28957749516252e+01,\n                                                2.28397869640044e+01, 2.27695263434396e+01, 2.26831140940861e+01, 2.25787709637944e+01, 2.24548863703032e+01,\n                                                2.23100868695258e+01, 2.21433007441424e+01, 2.19538152545037e+01, 2.17413233163246e+01, 2.15059568133305e+01,\n                                                2.12483043347796e+01, 2.09694117554202e+01, 2.06707647129654e+01, 2.03542527720126e+01, 2.00221161085860e+01,\n                                                1.96768771254726e+01, 1.93212614769692e+01, 1.89581149983798e+01, 1.85903240081657e+01, 1.82207454851172e+01,\n                                                1.78521506884066e+01, 1.74871820170843e+01, 1.71283199908285e+01, 1.67778563340662e+01, 1.64378702183594e+01,\n                                                1.61102067611562e+01, 1.57964587131548e+01, 1.54979531752089e+01, 1.52157450768600e+01, 1.49506183501546e+01,\n                                                1.47030946948232e+01, 1.44734489182697e+01, 1.42617292442931e+01, 1.40677807624675e+01, 1.38912702785652e+01,\n                                                1.37317111222905e+01, 1.35884868646788e+01, 1.34608733061510e+01, 1.33480584582129e+01, 1.32491605254349e+01,\n                                                1.31632440894786e+01, 1.30893348076839e+01, 1.30264329770732e+01, 1.29735262955986e+01, 1.29296020913179e+01,\n                                                1.28936592009542e+01, 1.28647195744062e+01, 1.28418395721760e+01, 1.28241208180706e+01, 1.28107203785036e+01,\n                                                1.28008599696654e+01, 1.27938338506041e+01, 1.27890150477635e+01, 1.27858595762327e+01, 1.27839083736855e+01,\n                                                1.27827867408088e+01, 1.27822011806762e+01, 1.27819336410215e+01, 1.27818332788910e+01, 1.27818059780743e+01,\n                                                1.27818019485351e+01, 1.27818015899349e+01, 1.27817945308484e+01, 1.27817467046171e+01, 1.27815708920999e+01,\n                                                1.27811022540606e+01, 1.27800767200921e+01, 1.27781129639267e+01, 1.27746988017282e+01, 1.27691828258381e+01,\n                                                1.27607720519566e+01, 1.27485362969649e+01, 1.27314198972885e+01, 1.27082612020918e+01, 1.26778200121173e+01,\n                                                1.26388127707462e+01, 1.25899548472465e+01, 1.25300086971351e+01, 1.24578360736403e+01, 1.23724518497594e+01,\n                                                1.22730764629539e+01, 1.21591835983019e+01, 1.20305395703143e+01, 1.18872310309572e+01, 1.17296781810506e+01,\n                                                1.15586316118296e+01, 1.13751522106467e+01, 1.11805751137309e+01, 1.09764602898315e+01, 1.07645337468885e+01,\n                                                1.05466243126961e+01, 1.03246012408006e+01, 1.01003174364423e+01, 9.87556194060394e+00, 9.65202366887575e+00,\n                                                9.43126660813874e+00, 9.21471509593248e+00, 9.00364675322931e+00, 8.79919028029833e+00, 8.60232564659118e+00,\n                                                8.41388502770663e+00, 8.23455386953960e+00, 8.06487236929483e+00, 7.90523820292078e+00, 7.75591139189926e+00,\n                                                7.61702185261144e+00, 7.48857960288904e+00, 7.37048704949775e+00, 7.26255243076373e+00, 7.16450341323439e+00,\n                                                7.07600000305192e+00, 6.99664622957530e+00, 6.92600038010448e+00, 6.86358383053446e+00, 6.80888869103458e+00,\n                                                6.76138456780864e+00, 6.72052475101234e+00, 6.68575210005371e+00, 6.65650483282936e+00, 6.63222235071430e+00,\n                                                6.61235115602038e+00, 6.59635084850674e+00, 6.58370012523974e+00, 6.57390265548724e+00, 6.56649266098155e+00,\n                                                6.56104000341450e+00, 6.55715456696505e+00, 6.55448972514343e+00, 6.55274469862886e+00, 6.55166564337951e+00,\n                                                6.55104535417676e+00, 6.55072152483316e+00, 6.55057356853160e+00, 6.55051806566197e+00, 6.55050296759676e+00,\n                                                6.55050073915618e+00, 6.55050054215060e+00, 6.55049667878988e+00, 6.55047050401387e+00, 6.55037428368568e+00,\n                                                6.55011780266405e+00, 6.54955653597118e+00, 6.54848178006645e+00, 6.54661319892050e+00, 6.54359422432200e+00,\n                                                6.53899072822600e+00, 6.53229334799331e+00, 6.52292378149058e+00, 6.51024526562318e+00, 6.49357729767286e+00,\n                                                6.47221444683233e+00, 6.44544883428711e+00, 6.41259554582055e+00, 6.37301990649470e+00, 6.32616523213014e+00,\n                                                6.27157942907374e+00, 6.20893870042254e+00, 6.13806668713301e+00, 6.05894765941032e+00, 5.97173287156944e+00,\n                                                5.87673984236456e+00, 5.77444500722660e+00, 5.66547075970464e+00, 5.55056822049809e+00, 5.43059707858924e+00,\n                                                5.30650358527836e+00, 5.17929739552458e+00, 5.05002762946697e+00, 4.91975841223776e+00, 4.78954427529582e+00,\n                                                4.66040608548812e+00, 4.53330846053650e+00, 4.40913978874298e+00, 4.28869591569807e+00, 4.17266829318689e+00,\n                                                4.06163697345416e+00, 3.95606837498483e+00, 3.85631733851082e+00, 3.76263269905806e+00, 3.67516544816832e+00,\n                                                3.59397854266338e+00, 3.51905750284941e+00, 3.45032109508686e+00, 3.38763157381481e+00, 3.33080413692110e+00,\n                                                3.27961540649923e+00, 3.23381087479410e+00, 3.19311135009183e+00, 3.15721850165485e+00, 3.12581964100882e+00,\n                                                3.09859189400603e+00, 3.07520591878698e+00, 3.05532931292690e+00, 3.03862983178774e+00, 3.02477851191022e+00,\n                                                3.01345276035446e+00, 3.00433943533164e+00, 2.99713790742714e+00, 2.99156305649639e+00, 2.98734812927743e+00,\n                                                2.98424735918668e+00, 2.98203823461754e+00, 2.98052329677608e+00, 2.97953135333081e+00, 2.97891800969491e+00,\n                                                2.97856544443047e+00, 2.97838138705410e+00, 2.97829729279307e+00, 2.97826574662988e+00, 2.97825716535556e+00,\n                                                2.97825589877915e+00, 2.97825578507623e+00, 2.97825353573452e+00, 2.97823829616000e+00, 2.97818227456835e+00,\n                                                2.97803294692275e+00, 2.97770617416555e+00, 2.97708046923901e+00, 2.97599268847759e+00, 2.97423541875796e+00,\n                                                2.97155632539491e+00, 2.96765970995543e+00, 2.96221049401380e+00, 2.95484078586777e+00, 2.94515909478594e+00,\n                                                2.93276212667430e+00, 2.91724892619933e+00, 2.89823693015902e+00, 2.87537927997566e+00, 2.84838253035230e+00,\n                                                2.81702371563098e+00, 2.78116562748806e+00, 2.74076914730515e+00, 2.69590158512694e+00, 2.64674021059601e+00,\n                                                2.59357050568874e+00, 2.53677908931505e+00, 2.47684170729707e+00, 2.41430708686321e+00, 2.34977776581724e+00,\n                                                2.28388918369459e+00, 2.21728835312182e+00, 2.15061333064472e+00, 2.08447451564624e+00, 2.01943856986061e+00,\n                                                1.95601550755580e+00, 1.89464927951241e+00, 1.83571196583111e+00, 1.77950149618233e+00, 1.72624262592463e+00,\n                                                1.67609071833943e+00, 1.62913773551155e+00, 1.58541974705675e+00, 1.54492524502145e+00, 1.50760360805417e+00,\n                                                1.47337317461240e+00, 1.44212853781202e+00, 1.41374683463810e+00, 1.38809294556348e+00, 1.36502363250953e+00,\n                                                1.34439071872709e+00, 1.32604345630757e+00, 1.30983024255578e+00, 1.29559984345439e+00, 1.28320226820782e+00,\n                                                1.27248941892089e+00, 1.26331561751744e+00, 1.25553809012018e+00, 1.24901746825653e+00, 1.24361834671495e+00,\n                                                1.23920991964656e+00, 1.23566669954416e+00, 1.23286930812229e+00, 1.23070531414619e+00, 1.22907008138932e+00,\n                                                1.22786758074029e+00, 1.22701111466001e+00, 1.22642390023846e+00, 1.22603945932059e+00, 1.22580177054351e+00,\n                                                1.22566514825549e+00, 1.22559382640437e+00, 1.22556124052716e+00, 1.22554901670908e+00, 1.22554569155961e+00,\n                                                1.22554520077544e+00, 1.22554515553390e+00, 1.22554424736080e+00, 1.22553809438041e+00, 1.22551547576296e+00,\n                                                1.22545518582373e+00, 1.22532325793888e+00, 1.22507065837999e+00, 1.22463156741596e+00, 1.22392236731972e+00,\n                                                1.22284145787189e+00, 1.22127001598736e+00, 1.21907380259996e+00, 1.21610609191396e+00, 1.21221175109616e+00,\n                                                1.20723242974346e+00, 1.20101272851846e+00, 1.19340711020978e+00, 1.18428720448656e+00, 1.17354905528450e+00,\n                                                1.16111978618540e+00, 1.14696313386430e+00, 1.13108333817601e+00, 1.11352698628290e+00, 1.09438258106987e+00,\n                                                1.07377782042414e+00, 1.05187480158696e+00, 1.02886356635953e+00, 1.00495454502119e+00, 9.80370518606698e-01,\n                                                9.55338697758208e-01, 9.30083426179493e-01, 9.04819883728514e-01, 8.79749017133584e-01, 8.55053788869164e-01,\n                                                8.30896721243235e-01, 8.07418628358278e-01, 7.84738372166039e-01, 7.62953446509833e-01, 7.42141180804623e-01,\n                                                7.22360359458278e-01, 7.03653071228636e-01, 6.86046631094193e-01, 6.69555451979697e-01, 6.54182780589586e-01,\n                                                6.39922246702135e-01, 6.26759205476816e-01, 6.14671875797860e-01, 6.03632293888474e-01, 5.93607110926186e-01,\n                                                5.84558267395487e-01, 5.76443576923126e-01, 5.69217249792509e-01, 5.62830382394651e-01, 5.57231434366329e-01,\n                                                5.52366710568194e-01, 5.48180860577894e-01, 5.44617404039556e-01, 5.41619285963080e-01, 5.39129461831678e-01,\n                                                5.37091508129329e-01, 5.35450249691245e-01, 5.34152391246309e-01, 5.33147136875357e-01, 5.32386778118074e-01,\n                                                5.31827229408883e-01, 5.31428488668119e-01, 5.31155001414440e-01, 5.30975908790431e-01, 5.30865163371310e-01,\n                                                5.30801501386279e-01, 5.30768265726671e-01, 5.30753080452300e-01, 5.30747383991958e-01, 5.30745834422326e-01,\n                                                5.30745605709306e-01, 5.30745583913188e-01, 5.30745138647347e-01, 5.30742121913647e-01, 5.30731032199661e-01,\n                                                5.30701472001702e-01, 5.30636784838109e-01, 5.30512918828251e-01, 5.30297569990928e-01, 5.29949657068990e-01,\n                                                5.29419177602250e-01, 5.28647490990160e-01, 5.27568066919464e-01, 5.26107725169346e-01, 5.24188374040740e-01,\n                                                5.21729228699108e-01, 5.18649457880471e-01, 5.14871169506350e-01, 5.10322606354762e-01, 5.04941387236265e-01,\n                                                4.98677603345371e-01, 4.91496569725562e-01, 4.83381042656902e-01, 4.74332746738192e-01, 4.64373107874998e-01,\n                                                4.53543153480474e-01, 4.41902609032944e-01, 4.29528279896587e-01, 4.16511850015752e-01, 4.02957249993648e-01,\n                                                3.88977746853421e-01, 3.74692892082486e-01, 3.60225441836718e-01, 3.45698341767203e-01, 3.31231854344445e-01,\n                                                3.16940900027340e-01, 3.02932682354466e-01, 2.89304665864940e-01, 2.76142969505500e-01, 2.63521223658898e-01,\n                                                2.51499915958391e-01, 2.40126222285866e-01, 2.29434289196853e-01, 2.19445907197056e-01, 2.10171494585971e-01,\n                                                2.01611301064574e-01, 1.93756739212908e-01, 1.86591759005552e-01, 1.80094193540242e-01, 1.74237020580208e-01,\n                                                1.68989501993707e-01, 1.64318179828150e-01, 1.60187722287432e-01, 1.56561624567338e-01, 1.53402778098801e-01,\n                                                1.50673927338126e-01, 1.48338036119242e-01, 1.46358586139044e-01, 1.44699828805699e-01, 1.43327008859437e-01,\n                                                1.42206574276493e-01, 1.41306382371795e-01, 1.40595907099907e-01, 1.40046447681627e-01, 1.39631334212190e-01,\n                                                1.39326122163354e-01, 1.39108764956610e-01, 1.38959752261911e-01, 1.38862201470452e-01, 1.38801890887777e-01,\n                                                1.38767225462722e-01, 1.38749129067001e-01, 1.38740861149323e-01, 1.38737759644798e-01, 1.38736915967620e-01,\n                                                1.38736791442902e-01, 1.38736779117750e-01, 1.38736522524134e-01, 1.38734784073975e-01, 1.38728393486218e-01,\n                                                1.38711359593003e-01, 1.38674086750456e-01, 1.38602725549561e-01, 1.38478692745466e-01, 1.38278397001329e-01,\n                                                1.37973208461460e-01, 1.37529710166987e-01, 1.36910266435990e-01, 1.36073935960447e-01, 1.34977744085759e-01,\n                                                1.33578308576233e-01, 1.31833786015896e-01, 1.29706072905854e-01, 1.27163158962475e-01, 1.24181494011168e-01,\n                                                1.20748199345449e-01, 1.16862935300865e-01, 1.12539234732374e-01, 1.07805131478628e-01, 1.02702955743439e-01,\n                                                9.72882332040541e-02, 9.16277061745916e-02, 8.57965840681274e-02, 7.98752146449502e-02, 7.39454341325327e-02,\n                                                6.80868918965061e-02, 6.23736467833851e-02, 5.68712965147569e-02, 5.16348342504784e-02, 4.67073389468169e-02,\n                                                4.21195128404079e-02, 3.78899946559841e-02, 3.40263122808935e-02, 3.05263000111395e-02, 2.73797939154647e-02,\n                                                2.45704306362455e-02, 2.20774033806848e-02, 1.98770662872221e-02, 1.79443177279737e-02, 1.62537290303177e-02,\n                                                1.47804142441004e-02, 1.35006576060022e-02, 1.23923284590290e-02, 1.14351197483202e-02, 1.06106474345751e-02,\n                                                9.90244588385281e-03, 9.29588996044117e-03, 8.77806932400915e-03, 8.33763514440022e-03, 7.96463461171015e-03,\n                                                7.65034448717472e-03, 7.38711157989513e-03, 7.16820539958007e-03, 6.98768622733326e-03, 6.84029034420774e-03,\n                                                6.72133303366707e-03, 6.62662911842915e-03, 6.55243011027551e-03, 6.49537648357779e-03, 6.45246309983349e-03,\n                                                6.42101540945816e-03, 6.39867375822689e-03, 6.38338295737384e-03, 6.37338426656697e-03, 6.36720710463834e-03,\n                                                6.36365814330730e-03, 6.36180593065205e-03, 6.36095979120199e-03, 6.36064239964185e-03, 6.36055606375407e-03,\n                                                6.36054332083802e-03, 6.36054200636238e-03, 6.36051410317151e-03, 6.36032505784101e-03, 6.35963015128027e-03,\n                                                6.35777812394167e-03, 6.35372672415713e-03, 6.34597438344997e-03, 6.33251354891939e-03, 6.31081233439090e-03,\n                                                6.27783222917344e-03, 6.23009019411569e-03, 6.16377302048221e-03, 6.07490971241020e-03, 5.95960333644996e-03,\n                                                5.81431698711299e-03, 5.63619945901905e-03, 5.42342580733646e-03, 5.17551792644610e-03, 4.89360297643771e-03,\n                                                4.58056560939468e-03, 4.24105574409595e-03, 3.88132807593422e-03, 3.50891150961274e-03, 3.13213284822211e-03,\n                                                2.75954408169099e-03, 2.39932063527704e-03, 2.05870434127320e-03, 1.74355788289660e-03, 1.45807871007264e-03,\n                                                1.20469440782500e-03, 9.84133788094255e-04, 7.95643570924653e-04, 6.37303074213946e-04, 5.06381338027495e-04,\n                                                3.99684065882866e-04, 3.13851199052806e-04, 2.45585866103681e-04, 1.91814439205018e-04, 1.49788099761849e-04,\n                                                1.17136640973570e-04, 9.18807153880152e-05, 7.24078296840958e-05, 5.74231969636685e-05, 4.58932256108824e-05,\n                                                3.69981148509169e-05, 3.00989426023079e-05, 2.47121716867582e-05, 2.04811222914714e-05, 1.71414161158623e-05,\n                                                1.44876054122278e-05, 1.23514639867039e-05, 1.05956109024419e-05, 9.11575294537670e-06, 7.84124405583952e-06,\n                                                6.72915590627099e-06, 5.75419056048077e-06, 4.89925822222403e-06, 4.14975797724537e-06, 3.49176143288332e-06,\n                                                2.91256052520339e-06, 2.40178938071267e-06, 1.95198750674308e-06, 1.55830984027716e-06, 1.21765540228580e-06,\n                                                9.27657467286735e-07, 6.85870936933952e-07, 4.89293590533180e-07, 0.00000000000000e+00, 7.10542735760100e-15,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 7.10542735760100e-15, 7.10542735760100e-15, 1.42108547152020e-14,\n                                                7.10542735760100e-15}),\nmadness::CubicInterpolationTable<double>(grid, {4.20000000000000e+01, 4.19999998538849e+01, 4.19999953357154e+01, 4.19999647243806e+01, 4.19998521927946e+01,\n                                                4.19995522165987e+01, 4.19988956839062e+01, 4.19976381839181e+01, 4.19954508764702e+01, 4.19919142539457e+01,\n                                                4.19865150071025e+01, 4.19786461052593e+01, 4.19676101091778e+01, 4.19526256632829e+01, 4.19328370731698e+01,\n                                                4.19073268713129e+01, 4.18751313072551e+01, 4.18352587553926e+01, 4.17867110869359e+01, 4.17285080633598e+01,\n                                                4.16597147311390e+01, 4.15794715920173e+01, 4.14870269709700e+01, 4.13817705234658e+01, 4.12632662782264e+01,\n                                                4.11312831076784e+01, 4.09858201864196e+01, 4.08271249620500e+01, 4.06557015022276e+01, 4.04723078009694e+01,\n                                                4.02779416414655e+01, 4.00738157604860e+01, 3.98613241381551e+01, 3.96420020524576e+01, 3.94174829536164e+01,\n                                                3.91894551820002e+01, 3.89596211226494e+01, 3.87296606838307e+01, 3.85012001686097e+01, 3.82757868356313e+01,\n                                                3.80548688378230e+01, 3.78397798477154e+01, 3.76317275288857e+01, 3.74317850523274e+01, 3.72408850168284e+01,\n                                                3.70598153422416e+01, 3.68892169047849e+01, 3.67295828364689e+01, 3.65812595013827e+01, 3.64444491932695e+01,\n                                                3.63192145862066e+01, 3.62054849316700e+01, 3.61030639472574e+01, 3.60116392962111e+01, 3.59307935181989e+01,\n                                                3.58600162414143e+01, 3.57987174819575e+01, 3.57462418156317e+01, 3.57018831871614e+01, 3.56649001010281e+01,\n                                                3.56345309166998e+01, 3.56100089504098e+01, 3.55905770681725e+01, 3.55755014432684e+01, 3.55640841489150e+01,\n                                                3.55556742658013e+01, 3.55496772064442e+01, 3.55455619947831e+01, 3.55428662898152e+01, 3.55411990049716e+01,\n                                                3.55402404478866e+01, 3.55397399848781e+01, 3.55395113169527e+01, 3.55394255353564e+01, 3.55394022006481e+01,\n                                                3.55393987564928e+01, 3.55393982850365e+01, 3.55393871508349e+01, 3.55393117150674e+01, 3.55390344065072e+01,\n                                                3.55382952136920e+01, 3.55366775589957e+01, 3.55335797509751e+01, 3.55281932444938e+01, 3.55194888486012e+01,\n                                                3.55062119128626e+01, 3.54868873792439e+01, 3.54598353899852e+01, 3.54231978722938e+01, 3.53749761616796e+01,\n                                                3.53130792694110e+01, 3.52353818517804e+01, 3.51397903227248e+01, 3.50243149067281e+01, 3.48871448060248e+01,\n                                                3.47267231033535e+01, 3.45418175728937e+01, 3.43315832471991e+01, 3.40956124224141e+01, 3.38339678968354e+01,\n                                                3.35471959012414e+01, 3.32363167852930e+01, 3.29027943149846e+01, 3.25484880190856e+01, 3.21755960586297e+01,\n                                                3.17865967731857e+01, 3.13841944487826e+01, 3.09712700544826e+01, 3.05508334122630e+01, 3.01259718817493e+01,\n                                                2.96997925616301e+01, 2.92753587031764e+01, 2.88556243917339e+01, 2.84433731881189e+01, 2.80411660767814e+01,\n                                                2.76513023111497e+01, 2.72757944439805e+01, 2.69163567342722e+01, 2.65744046817370e+01, 2.62510627857572e+01,\n                                                2.59471776527292e+01, 2.56633340556935e+01, 2.53998722340615e+01, 2.51569054065669e+01, 2.49343370311479e+01,\n                                                2.47318777307680e+01, 2.45490620202535e+01, 2.43852650534780e+01, 2.42397196090880e+01, 2.41115334868821e+01,\n                                                2.39997074236495e+01, 2.39031535713355e+01, 2.38207145165720e+01, 2.37511827581941e+01, 2.36933204960331e+01,\n                                                2.36458795187292e+01, 2.36076209114460e+01, 2.35773342395327e+01, 2.35538558065784e+01, 2.35360855411652e+01,\n                                                2.35230020421639e+01, 2.35136753128631e+01, 2.35072767430316e+01, 2.35030859562852e+01, 2.35004942263237e+01,\n                                                2.34990042756268e+01, 2.34982263977228e+01, 2.34978709813119e+01, 2.34977376527386e+01, 2.34977013841710e+01,\n                                                2.34976960310078e+01, 2.34976955228450e+01, 2.34976851626132e+01, 2.34976149706120e+01, 2.34973569387913e+01,\n                                                2.34966691314539e+01, 2.34951639365163e+01, 2.34922815173239e+01, 2.34872696205781e+01, 2.34791708192117e+01,\n                                                2.34668181743694e+01, 2.34488401730991e+01, 2.34236756187230e+01, 2.33895988987001e+01, 2.33447557127048e+01,\n                                                2.32872089024829e+01, 2.32149934893570e+01, 2.31261794180686e+01, 2.30189398708089e+01, 2.28916224157056e+01,\n                                                2.27428197640959e+01, 2.25714366026514e+01, 2.23767488912508e+01, 2.21584521889233e+01, 2.19166959571491e+01,\n                                                2.16521013317962e+01, 2.13657605052518e+01, 2.10592166454847e+01, 2.07344243334442e+01, 2.03936920107051e+01,\n                                                2.00396099448434e+01, 1.96749694008820e+01, 1.93026802380907e+01, 1.89256940708767e+01, 1.85469380246880e+01,\n                                                1.81692606472568e+01, 1.77953882286600e+01, 1.74278880868737e+01, 1.70691357488131e+01, 1.67212847343957e+01,\n                                                1.63862396489629e+01, 1.60656345547337e+01, 1.57608187782346e+01, 1.54728516098371e+01, 1.52025062125341e+01,\n                                                1.49502819221807e+01, 1.47164232836432e+01, 1.45009437426621e+01, 1.43036518796079e+01, 1.41241783286750e+01,\n                                                1.39620019501270e+01, 1.38164743014796e+01, 1.36868419030063e+01, 1.35722661639389e+01, 1.34718411071758e+01,\n                                                1.33846092016538e+01, 1.33095756944067e+01, 1.32457218457553e+01, 1.31920174290240e+01, 1.31474327771143e+01,\n                                                1.31109505563048e+01, 1.30815773346225e+01, 1.30583548980498e+01, 1.30403711614359e+01, 1.30267704299543e+01,\n                                                1.30167626979774e+01, 1.30096316306704e+01, 1.30047408630220e+01, 1.30015382727479e+01, 1.29995579362526e+01,\n                                                1.29984195567077e+01, 1.29978252540169e+01, 1.29975537199774e+01, 1.29974518594416e+01, 1.29974241510247e+01,\n                                                1.29974200613247e+01, 1.29974196973706e+01, 1.29974125328924e+01, 1.29973639926182e+01, 1.29971855552387e+01,\n                                                1.29967099205474e+01, 1.29956690759307e+01, 1.29936760032212e+01, 1.29902108754608e+01, 1.29846125688115e+01,\n                                                1.29760762798127e+01, 1.29636579759818e+01, 1.29462862973915e+01, 1.29227823456914e+01, 1.28918875247030e+01,\n                                                1.28522992198044e+01, 1.28027136204836e+01, 1.27418744169486e+01, 1.26686254730031e+01, 1.25819649503815e+01,\n                                                1.24810978109729e+01, 1.23654832435293e+01, 1.22348734453556e+01, 1.20893404214532e+01, 1.19292880989029e+01,\n                                                1.17554480983163e+01, 1.15688588935688e+01, 1.13708296828711e+01, 1.11628918716187e+01, 1.09467423675727e+01,\n                                                1.07241836546081e+01, 1.04970656573314e+01, 1.02672336845448e+01, 1.00364853639441e+01, 9.80653773276483e+00,\n                                                9.57900390931599e+00, 9.35537742414381e+00, 9.13702162436716e+00, 8.92516168721973e+00, 8.72087757842494e+00,\n                                                8.52509746336720e+00, 8.33859221159604e+00, 8.16197234022444e+00, 7.99568879709121e+00, 7.84003842170767e+00,\n                                                7.69517400792765e+00, 7.56111800139770e+00, 7.43777830729308e+00, 7.32496458559394e+00, 7.22240370332251e+00,\n                                                7.12975351277381e+00, 7.04661464056406e+00, 6.97254037606972e+00, 6.90704499210901e+00, 6.84961092873158e+00,\n                                                6.79969526456920e+00, 6.75673583426283e+00, 6.72015725969978e+00, 6.68937706851830e+00, 6.66381198597149e+00,\n                                                6.64288440932855e+00, 6.62602900781773e+00, 6.61269933514038e+00, 6.60237429569499e+00, 6.59456427053151e+00,\n                                                6.58881668605201e+00, 6.58472079914742e+00, 6.58191147808581e+00, 6.58007177955523e+00, 6.57893415821577e+00,\n                                                6.57828019406870e+00, 6.57793878184356e+00, 6.57778279142976e+00, 6.57772427463089e+00, 6.57770835669852e+00,\n                                                6.57770600724707e+00, 6.57770579954351e+00, 6.57770172639076e+00, 6.57767413023981e+00, 6.57757268474140e+00,\n                                                6.57730227498381e+00, 6.57671052381381e+00, 6.57557737966918e+00, 6.57360723953440e+00, 6.57042406124297e+00,\n                                                6.56556989304715e+00, 6.55850720638843e+00, 6.54862534879863e+00, 6.53525132557031e+00, 6.51766496045224e+00,\n                                                6.49511827091739e+00, 6.46685862439281e+00, 6.43215493157969e+00, 6.39032580878531e+00, 6.34076834407357e+00,\n                                                6.28298588347944e+00, 6.21661316724832e+00, 6.14143723504350e+00, 6.05741279937886e+00, 5.96467123261434e+00,\n                                                5.86352285182962e+00, 5.75445270898897e+00, 5.63811048797331e+00, 5.51529530194573e+00, 5.38693617699478e+00,\n                                                5.25406888590152e+00, 5.11780969058572e+00, 4.97932657828659e+00, 4.83980877579885e+00, 4.70043564443008e+00,\n                                                4.56234637355294e+00, 4.42661206814133e+00, 4.29421177465408e+00, 4.16601369390706e+00, 4.04276234547509e+00,\n                                                3.92507187712176e+00, 3.81342516481839e+00, 3.70817791199305e+00, 3.60956667980828e+00, 3.51771967197808e+00,\n                                                3.43266913483487e+00, 3.35436437522402e+00, 3.28268460006045e+00, 3.21745100195387e+00, 3.15843772541976e+00,\n                                                3.10538152949949e+00, 3.05799010672968e+00, 3.01594912421142e+00, 2.97892812335083e+00, 2.94658545606625e+00,\n                                                2.91857245271636e+00, 2.89453701603360e+00, 2.87412682040596e+00, 2.85699227050873e+00, 2.84278934042838e+00,\n                                                2.83118237651191e+00, 2.82184690652861e+00, 2.81447245668910e+00, 2.80876533907578e+00, 2.80445133761152e+00,\n                                                2.80127819326300e+00, 2.79901777086545e+00, 2.79746778233081e+00, 2.79645294481726e+00, 2.79582546748681e+00,\n                                                2.79546478553186e+00, 2.79527649305835e+00, 2.79519046432796e+00, 2.79515819257259e+00, 2.79514941392848e+00,\n                                                2.79514811822103e+00, 2.79514800190297e+00, 2.79514570082696e+00, 2.79513011075209e+00, 2.79507280079051e+00,\n                                                2.79492003964133e+00, 2.79458575689426e+00, 2.79394568533331e+00, 2.79283297059621e+00, 2.79103553436349e+00,\n                                                2.78829547393014e+00, 2.78431076747728e+00, 2.77873952161035e+00, 2.77120693605691e+00, 2.76131506113396e+00,\n                                                2.74865528116167e+00, 2.73282327133931e+00, 2.71343595422559e+00, 2.69014974141503e+00, 2.66267911195050e+00,\n                                                2.63081438455863e+00, 2.59443742255345e+00, 2.55353400238900e+00, 2.50820170374635e+00, 2.45865244800974e+00,\n                                                2.40520920781515e+00, 2.34829689383539e+00, 2.28842793681670e+00, 2.22618355328949e+00, 2.16219204558206e+00,\n                                                2.09710569133717e+00, 2.03157780330292e+00, 1.96624139713286e+00, 1.90169063077394e+00, 1.83846582706668e+00,\n                                                1.77704251683691e+00, 1.71782458902719e+00, 1.66114133789406e+00, 1.60724797012947e+00, 1.55632898056813e+00,\n                                                1.50850372080102e+00, 1.46383346401495e+00, 1.42232930299832e+00, 1.38396029545567e+00, 1.34866137816559e+00,\n                                                1.31634069426317e+00, 1.28688610158549e+00, 1.26017074257978e+00, 1.23605764963305e+00, 1.21440343007627e+00,\n                                                1.19506112258178e+00, 1.17788234391733e+00, 1.16271885612889e+00, 1.14942368357640e+00, 1.13785190077236e+00,\n                                                1.12786119878446e+00, 1.11931232227175e+00, 1.11206945243880e+00, 1.10600059411664e+00, 1.10097800823018e+00,\n                                                1.09687871432043e+00, 1.09358507176172e+00, 1.09098543314535e+00, 1.08897484942555e+00, 1.08745579441931e+00,\n                                                1.08633886678403e+00, 1.08554342133196e+00, 1.08499807902825e+00, 1.08464106657811e+00, 1.08442034213409e+00,\n                                                1.08429347296855e+00, 1.08422724321796e+00, 1.08419698398447e+00, 1.08418563297418e+00, 1.08418254524991e+00,\n                                                1.08418208950920e+00, 1.08418204749805e+00, 1.08418120417131e+00, 1.08417549053449e+00, 1.08415448698955e+00,\n                                                1.08409850223369e+00, 1.08397599610198e+00, 1.08374144019277e+00, 1.08333372687004e+00, 1.08267524028621e+00,\n                                                1.08167170492921e+00, 1.08021292433731e+00, 1.07817451051644e+00, 1.07542067831345e+00, 1.07180813413819e+00,\n                                                1.06719102230758e+00, 1.06142680531084e+00, 1.05438285123233e+00, 1.04594339231301e+00, 1.03601641807038e+00,\n                                                1.02453999290455e+00, 1.01148746061778e+00, 9.96871032082744e-01, 9.80743354590409e-01, 9.63196827568680e-01,\n                                                9.44360641512638e-01, 9.24395745806294e-01, 9.03488161149603e-01, 8.81841209477919e-01, 8.59667313936612e-01,\n                                                8.37180014261286e-01, 8.14586756420219e-01, 7.92082871311990e-01, 7.69846985096059e-01, 7.48037932925570e-01,\n                                                7.26793101887914e-01, 7.06228021817964e-01, 6.86436958662135e-01, 6.67494240991061e-01, 6.49456058253413e-01,\n                                                6.32362499799150e-01, 6.16239647149683e-01, 6.01101580383713e-01, 5.86952206634798e-01, 5.73786860309127e-01,\n                                                5.61593658308794e-01, 5.50354618416257e-01, 5.40046565397589e-01, 5.30641858464669e-01, 5.22108977081736e-01,\n                                                5.14413001390928e-01, 5.07516020297359e-01, 5.01377495726921e-01, 4.95954606620572e-01, 4.91202591380713e-01,\n                                                4.87075102979958e-01, 4.83524586816465e-01, 4.80502687578124e-01, 4.77960687737543e-01, 4.75849976738552e-01,\n                                                4.74122546399485e-01, 4.72731504574050e-01, 4.71631595777687e-01, 4.70779714479612e-01, 4.70135394295326e-01,\n                                                4.69661254631795e-01, 4.69323385657063e-01, 4.69091652955740e-01, 4.68939904975770e-01, 4.68846069343705e-01,\n                                                4.68792128186209e-01, 4.68763967494539e-01, 4.68751100973812e-01, 4.68746274351368e-01, 4.68744961398109e-01,\n                                                4.68744767609145e-01, 4.68744749141244e-01, 4.68744371866684e-01, 4.68741815782941e-01, 4.68732419452209e-01,\n                                                4.68707373079525e-01, 4.68652563739916e-01, 4.68547612752303e-01, 4.68365150438295e-01, 4.68070372472596e-01,\n                                                4.67620920369107e-01, 4.66967125335323e-01, 4.66052648454948e-01, 4.64815539504286e-01, 4.63189720433142e-01,\n                                                4.61106876958048e-01, 4.58498713118423e-01, 4.55299490680822e-01, 4.51448741147807e-01, 4.46894007479607e-01,\n                                                4.41593450977301e-01, 4.35518151464670e-01, 4.28653939806694e-01, 4.21002631981743e-01, 4.12582580783287e-01,\n                                                4.03428518523796e-01, 3.93590723046373e-01, 3.83133590536808e-01, 3.72133734466509e-01, 3.60677746613348e-01,\n                                                3.48859754244543e-01, 3.36778892011772e-01, 3.24536785004248e-01, 3.12235117758910e-01, 2.99973347706526e-01,\n                                                2.87846612125641e-01, 2.75943873629238e-01, 2.64346347002892e-01, 2.53126246004179e-01, 2.42345879828029e-01,\n                                                2.32057114608814e-01, 2.22301196835801e-01, 2.13108915543543e-01, 2.04501061694046e-01, 1.96489128949466e-01,\n                                                1.89076191691932e-01, 1.82257894137621e-01, 1.76023488130454e-01, 1.70356865398304e-01, 1.65237541095294e-01,\n                                                1.60641557726009e-01, 1.56542290662678e-01, 1.52911147392409e-01, 1.49718161717182e-01, 1.46932491064966e-01,\n                                                1.44522829811024e-01, 1.42457754180327e-01, 1.40706015131130e-01, 1.39236794883310e-01, 1.38019940751576e-01,\n                                                1.37026186984798e-01, 1.36227371714746e-01, 1.35596652201933e-01, 1.35108717653715e-01, 1.34739995290978e-01,\n                                                1.34468842342287e-01, 1.34275714488624e-01, 1.34143300143542e-01, 1.34056609918453e-01, 1.34003011679191e-01,\n                                                1.33972203632560e-01, 1.33956120685667e-01, 1.33948772626560e-01, 1.33946016176104e-01, 1.33945266360442e-01,\n                                                1.33945155689425e-01, 1.33945144735463e-01, 1.33944916688549e-01, 1.33943371644541e-01, 1.33937692010910e-01,\n                                                1.33922553050120e-01, 1.33889426153985e-01, 1.33826000849233e-01, 1.33715755849416e-01, 1.33537710554734e-01,\n                                                1.33266389242678e-01, 1.32872029855037e-01, 1.32321066590293e-01, 1.31576909180737e-01, 1.30601030622195e-01,\n                                                1.29354358472220e-01, 1.27798942553859e-01, 1.25899844850672e-01, 1.23627167518535e-01, 1.20958105373745e-01,\n                                                1.17878884001328e-01, 1.14386428336331e-01, 1.10489603642442e-01, 1.06209884722084e-01, 1.01581341593985e-01,\n                                                9.66498798728921e-02, 9.14717378178196e-02, 8.61113127279154e-02, 8.06384581007364e-02, 7.51254498670590e-02,\n                                                6.96438560830117e-02, 6.42615534492990e-02, 5.90401139649614e-02, 5.40327388845014e-02, 4.92828523801379e-02,\n                                                4.48233942855865e-02, 4.06767810673614e-02, 3.68554462311366e-02, 3.33628319982182e-02, 3.01946856083077e-02,\n                                                2.73405146325629e-02, 2.47850720628406e-02, 2.25097680796367e-02, 2.04939356006548e-02, 1.87159062390023e-02,\n                                                1.71538789479229e-02, 1.57865837329183e-02, 1.45937569312125e-02, 1.35564530529635e-02, 1.26572219058971e-02,\n                                                1.18801798359627e-02, 1.12110016696505e-02, 1.06368564772552e-02, 1.01463064299452e-02, 9.72918427883229e-03,\n                                                9.37646155785643e-03, 9.08011659033292e-03, 8.83300880818894e-03, 8.62876379576250e-03, 8.46167182132973e-03,\n                                                8.32660134463481e-03, 8.21892797982571e-03, 8.13447855669125e-03, 8.06948919591832e-03, 8.02057567612025e-03,\n                                                7.98471383432542e-03, 7.95922733666998e-03, 7.94177991617318e-03, 7.93036912820355e-03, 7.92331883299369e-03,\n                                                7.91926797363374e-03, 7.91715374440827e-03, 7.91618789186543e-03, 7.91582559250514e-03, 7.91572704067534e-03,\n                                                7.91571249471446e-03, 7.91571099426847e-03, 7.91567914335900e-03, 7.91546335186410e-03, 7.91467012520286e-03,\n                                                7.91255602526064e-03, 7.90793115051258e-03, 7.89908078399293e-03, 7.88371124893672e-03, 7.85892715650505e-03,\n                                                7.82124832304021e-03, 7.76667523773966e-03, 7.69081150894380e-03, 7.58904958542672e-03, 7.45682168494000e-03,\n                                                7.28991096733722e-03, 7.08480873635153e-03, 6.83909268915528e-03, 6.55179058391298e-03, 6.22368548402363e-03,\n                                                5.85751562968539e-03, 5.45802635761561e-03, 5.03184460603734e-03, 4.58716780411095e-03, 4.13328546670044e-03,\n                                                3.67997868606551e-03, 3.23686402880696e-03, 2.81275885891574e-03, 2.41514195106163e-03, 2.04976705347804e-03,\n                                                1.72046181208430e-03, 1.42911614518937e-03, 1.17583858288839e-03, 9.59240178282528e-04, 7.76794922707325e-04,\n                                                6.25223221426552e-04, 5.00850618486481e-04, 3.99906988086229e-04, 3.18749539900409e-04, 2.54011155448097e-04,\n                                                2.02687411167801e-04, 1.62177592926582e-04, 1.30289850304166e-04, 1.05216266128139e-04, 8.54860592269802e-05,\n                                                6.99120319040958e-05, 5.75476714104184e-05, 4.76622453859932e-05, 3.97207643629827e-05, 3.33432182486604e-05,\n                                                2.82362389540936e-05, 2.41314956781480e-05, 2.07744862947834e-05, 1.79557328934266e-05, 1.55324227861797e-05,\n                                                1.34157335978102e-05, 1.15453367612872e-05, 9.87582990319424e-06, 8.37585131563401e-06, 7.02819735209914e-06,\n                                                5.82529322912251e-06, 4.76279258521117e-06, 3.83535132897350e-06, 3.03557016678724e-06, 2.35471963350165e-06,\n                                                1.78364679470633e-06, 1.31316794238501e-06, 9.34024541265899e-07, 6.36710119295003e-07, 4.11373072495280e-07,\n                                                4.26325641456060e-14, 4.26325641456060e-14, 4.97379915032070e-14, 4.26325641456060e-14, 4.26325641456060e-14,\n                                                4.97379915032070e-14}),\nmadness::CubicInterpolationTable<double>(grid, {4.30000000000000e+01, 4.29999998488178e+01, 4.29999951739633e+01, 4.29999635010614e+01, 4.29998470669984e+01,\n                                                4.29995366878939e+01, 4.29988573869775e+01, 4.29975562765592e+01, 4.29952931097246e+01, 4.29916338234414e+01,\n                                                4.29860472913231e+01, 4.29779053998127e+01, 4.29664864668002e+01, 4.29509819487172e+01, 4.29305063420932e+01,\n                                                4.29041101853033e+01, 4.28707961041756e+01, 4.28295379070793e+01, 4.27793027920327e+01, 4.27190767378652e+01,\n                                                4.26478930648651e+01, 4.25648639255944e+01, 4.24692141051056e+01, 4.23603159929444e+01, 4.22377240075656e+01,\n                                                4.21012062229674e+01, 4.19507706083047e+01, 4.17866832751999e+01, 4.16094765157210e+01, 4.14199452048573e+01,\n                                                4.12191312372224e+01, 4.10082968899020e+01, 4.07888891323362e+01, 4.05624977344086e+01, 4.03308104159851e+01,\n                                                4.00955681942498e+01, 3.98585235813980e+01, 3.96214035056015e+01, 3.93858779504005e+01, 3.91535345002291e+01,\n                                                3.89258583652826e+01, 3.87042170957985e+01, 3.84898490791104e+01, 3.82838549901445e+01, 3.80871915607283e+01,\n                                                3.79006672674404e+01, 3.77249397499831e+01, 3.75605149252051e+01, 3.74077478439868e+01, 3.72668453568121e+01,\n                                                3.71378706275747e+01, 3.70207494852980e+01, 3.69152785479113e+01, 3.68211350024936e+01, 3.67378878872656e+01,\n                                                3.66650106917593e+01, 3.66018950698415e+01, 3.65478654417328e+01, 3.65021942427401e+01, 3.64641175565292e+01,\n                                                3.64328508495558e+01, 3.64076045023064e+01, 3.63875988148993e+01, 3.63720781524516e+01, 3.63603238925615e+01,\n                                                3.63516658460046e+01, 3.63454918442399e+01, 3.63412552244992e+01, 3.63384799948346e+01, 3.63367635260922e+01,\n                                                3.63357766927978e+01, 3.63352614669578e+01, 3.63350260537496e+01, 3.63349377417610e+01, 3.63349137187243e+01,\n                                                3.63349101729732e+01, 3.63349096876099e+01, 3.63348982249711e+01, 3.63348205639980e+01, 3.63345350754103e+01,\n                                                3.63337740781330e+01, 3.63321087073823e+01, 3.63289195269031e+01, 3.63233741526630e+01, 3.63144130640332e+01,\n                                                3.63007446669718e+01, 3.62808505268550e+01, 3.62530014868681e+01, 3.62152851106594e+01, 3.61656445180023e+01,\n                                                3.61019282109352e+01, 3.60219499204622e+01, 3.59235568628111e+01, 3.58047041182917e+01, 3.56635321840612e+01,\n                                                3.54984441529042e+01, 3.53081784720595e+01, 3.50918728745780e+01, 3.48491149207264e+01, 3.45799748102019e+01,\n                                                3.42850170445389e+01, 3.39652894995850e+01, 3.36222915863775e+01, 3.32579267525175e+01, 3.28744470502791e+01,\n                                                3.24743972134545e+01, 3.20605622849941e+01, 3.16359180214041e+01, 3.12035798578682e+01, 3.07667460139550e+01,\n                                                3.03286330865954e+01, 2.98924063512344e+01, 2.94611099678353e+01, 2.90376032882431e+01, 2.86245085163785e+01,\n                                                2.82241728117405e+01, 2.78386454534718e+01, 2.74696686127383e+01, 2.71186789950909e+01, 2.67868171684362e+01,\n                                                2.64749416194540e+01, 2.61836452138998e+01, 2.59132725083633e+01, 2.56639370727651e+01, 2.54355385231509e+01,\n                                                2.52277793029051e+01, 2.50401814124877e+01, 2.48721033246253e+01, 2.47227572873668e+01, 2.45912271535179e+01,\n                                                2.44764868068528e+01, 2.43774191933758e+01, 2.42928359100541e+01, 2.42214972496425e+01, 2.41621325440088e+01,\n                                                2.41134605874854e+01, 2.40742098570708e+01, 2.40431381816060e+01, 2.40190514532651e+01, 2.40008209287853e+01,\n                                                2.39873986416601e+01, 2.39778304457616e+01, 2.39712662392939e+01, 2.39669669768796e+01, 2.39643081653956e+01,\n                                                2.39627796516984e+01, 2.39619816410756e+01, 2.39616170260060e+01, 2.39614802467220e+01, 2.39614430394797e+01,\n                                                2.39614375477701e+01, 2.39614370264555e+01, 2.39614263980884e+01, 2.39613543894347e+01, 2.39610896794615e+01,\n                                                2.39603840710355e+01, 2.39588399209533e+01, 2.39558829060567e+01, 2.39507413119870e+01, 2.39424329530777e+01,\n                                                2.39297607355426e+01, 2.39113177461418e+01, 2.38855025651884e+01, 2.38505452451488e+01, 2.38045440463711e+01,\n                                                2.37455125702110e+01, 2.36714363814787e+01, 2.35803375896421e+01, 2.34703452051915e+01, 2.33397684660776e+01,\n                                                2.31871698118893e+01, 2.30114338402071e+01, 2.28118284603725e+01, 2.25880545816462e+01, 2.23402810186483e+01,\n                                                2.20691618384754e+01, 2.17758341138285e+01, 2.14618950611188e+01, 2.11293589712998e+01, 2.07805962699830e+01,\n                                                2.04182592906098e+01, 2.00452012966754e+01, 1.96643960320934e+01, 1.92788639304566e+01, 1.88916082557702e+01,\n                                                1.85055610626799e+01, 1.81235364941698e+01, 1.77481885008930e+01, 1.73819713652934e+01, 1.70271034205669e+01,\n                                                1.66855359577521e+01, 1.63589298839641e+01, 1.60486422090413e+01, 1.57557232780052e+01, 1.54809243265809e+01,\n                                                1.52247138128322e+01, 1.49873002828693e+01, 1.47686593018614e+01, 1.45685621443046e+01, 1.43866043559295e+01,\n                                                1.42222328356773e+01, 1.40747706274394e+01, 1.39434390830238e+01, 1.38273774219642e+01, 1.37256599608922e+01,\n                                                1.36373114244563e+01, 1.35613207998534e+01, 1.34966541793597e+01, 1.34422669699202e+01, 1.33971157528711e+01,\n                                                1.33601699638622e+01, 1.33304234438223e+01, 1.33069057952079e+01, 1.32886933713676e+01, 1.32749196373718e+01,\n                                                1.32647845740250e+01, 1.32575627578373e+01, 1.32526097417389e+01, 1.32493663854514e+01, 1.32473608393745e+01,\n                                                1.32462079677093e+01, 1.32456060990810e+01, 1.32453311081603e+01, 1.32452279508383e+01, 1.32451998896651e+01,\n                                                1.32451957478990e+01, 1.32451953793114e+01, 1.32451881236220e+01, 1.32451389653798e+01, 1.32449582563002e+01,\n                                                1.32444765662126e+01, 1.32434224701272e+01, 1.32414040216292e+01, 1.32378947724908e+01, 1.32322251734128e+01,\n                                                1.32235801547257e+01, 1.32110036218783e+01, 1.31934104870516e+01, 1.31696066719508e+01, 1.31383172367610e+01,\n                                                1.30982224027262e+01, 1.30480007398561e+01, 1.29863782036858e+01, 1.29121810641866e+01, 1.28243901371600e+01,\n                                                1.27221931858757e+01, 1.26050320046582e+01, 1.24726406252953e+01, 1.23250713856706e+01, 1.21627063163505e+01,\n                                                1.19862524252821e+01, 1.17967209069735e+01, 1.15953919005027e+01, 1.13837679291869e+01, 1.11635202987385e+01,\n                                                1.09364332618607e+01, 1.07043505248842e+01, 1.04691276836978e+01, 1.02325926231160e+01, 9.99651414547751e+00,\n                                                9.76257754086946e+00, 9.53236487046408e+00, 9.30733765018906e+00, 9.08882039060011e+00, 8.87798478551444e+00,\n                                                8.67583574032630e+00, 8.48320132818226e+00, 8.30072877134064e+00, 8.12888764863148e+00, 7.96798010713182e+00,\n                                                7.81815649534190e+00, 7.67943403392895e+00, 7.55171608335935e+00, 7.43481010887820e+00, 7.32844325762153e+00,\n                                                7.23227523855353e+00, 7.14590875005988e+00, 7.06889799012399e+00, 7.00075585948152e+00, 6.94096041040586e+00,\n                                                6.88896097589461e+00, 6.84418428461681e+00, 6.80604075050380e+00, 6.77393102987541e+00, 6.74725286204238e+00,\n                                                6.72540814685250e+00, 6.70781016037846e+00, 6.69389076537426e+00, 6.68310743575222e+00, 6.67494988525740e+00,\n                                                6.66894607177041e+00, 6.66466734248843e+00, 6.66173249341340e+00, 6.65981053995768e+00, 6.65862203364174e+00,\n                                                6.65793881099840e+00, 6.65758212184200e+00, 6.65741915096179e+00, 6.65735801549875e+00, 6.65734138522152e+00,\n                                                6.65733893062929e+00, 6.65733871363071e+00, 6.65733445819931e+00, 6.65730562708089e+00, 6.65719964167046e+00,\n                                                6.65691712985999e+00, 6.65629889204891e+00, 6.65511501671141e+00, 6.65305663551452e+00, 6.64973078502690e+00,\n                                                6.64465881182002e+00, 6.63727871178341e+00, 6.62695172184964e+00, 6.61297337133330e+00, 6.59458904061370e+00,\n                                                6.57101386151049e+00, 6.54145652914677e+00, 6.50514629339236e+00, 6.46136208627843e+00, 6.40946245954274e+00,\n                                                6.34891480086845e+00, 6.27932221416832e+00, 6.20044652002476e+00, 6.11222606114808e+00, 6.01478735232003e+00,\n                                                5.90845002900131e+00, 5.79372494190624e+00, 5.67130554861323e+00, 5.54205294410803e+00, 5.40697498441166e+00,\n                                                5.26720006860695e+00, 5.12394633468504e+00, 4.97848732952527e+00, 4.83211559732254e+00, 4.68610599466920e+00,\n                                                4.54168076092854e+00, 4.39997835253136e+00, 4.26202775650195e+00, 4.12872947323891e+00, 4.00084369944392e+00,\n                                                3.87898557013943e+00, 3.76362674288902e+00, 3.65510220014767e+00, 3.55362093437481e+00, 3.45927915217188e+00,\n                                                3.37207474841944e+00, 3.29192200795590e+00, 3.21866574107747e+00, 3.15209431006962e+00, 3.09195123008443e+00,\n                                                3.03794521441139e+00, 2.98975867688842e+00, 2.94705480479625e+00, 2.90948337957409e+00, 2.87668555687012e+00,\n                                                2.84829782839409e+00, 2.82395538143447e+00, 2.80329505225708e+00, 2.78595804039510e+00, 2.77159251479977e+00,\n                                                2.75985620224976e+00, 2.75041900548089e+00, 2.74296565543247e+00, 2.73719836119209e+00, 2.73283938515704e+00,\n                                                2.72963344206801e+00, 2.72734980108739e+00, 2.72578396161013e+00, 2.72475877682516e+00, 2.72412491400129e+00,\n                                                2.72376056582361e+00, 2.72357036064408e+00, 2.72348345830041e+00, 2.72345085887398e+00, 2.72344199110027e+00,\n                                                2.72344068223763e+00, 2.72344056473862e+00, 2.72343824030015e+00, 2.72342249194504e+00, 2.72336460018646e+00,\n                                                2.72321028862454e+00, 2.72287261509203e+00, 2.72222605840921e+00, 2.72110209300448e+00, 2.71928654515370e+00,\n                                                2.71651902295783e+00, 2.71249469984261e+00, 2.70686869868294e+00, 2.69926326022268e+00, 2.68927777595520e+00,\n                                                2.67650161611600e+00, 2.66052948788933e+00, 2.64097882554657e+00, 2.61750846098840e+00, 2.58983757789126e+00,\n                                                2.55776375108605e+00, 2.52117875414785e+00, 2.48008081854585e+00, 2.43458217203082e+00, 2.38491097820420e+00,\n                                                2.33140722496406e+00, 2.27451262289786e+00, 2.21475511136936e+00, 2.15272905602259e+00, 2.08907258757942e+00,\n                                                2.02444372852689e+00, 1.95949696183003e+00, 1.89486172712758e+00, 1.83112402520989e+00, 1.76881192691790e+00,\n                                                1.70838537620416e+00, 1.65023029844999e+00, 1.59465670890928e+00, 1.54190028131690e+00, 1.49212668902842e+00,\n                                                1.44543796667721e+00, 1.40188014880230e+00, 1.36145150836144e+00, 1.32411082499401e+00, 1.28978524200870e+00,\n                                                1.25837740524684e+00, 1.22977170223832e+00, 1.20383952682676e+00, 1.18044357778750e+00, 1.15944125911304e+00,\n                                                1.14068728679823e+00, 1.12403562601458e+00, 1.10934088795815e+00, 1.09645931156495e+00, 1.08524944516928e+00,\n                                                1.07557262960673e+00, 1.06729336897056e+00, 1.06027965926311e+00, 1.05440332909905e+00, 1.04954043068103e+00,\n                                                1.04557170362908e+00, 1.04238311907402e+00, 1.03986649699663e+00, 1.03792017654317e+00, 1.03644970754095e+00,\n                                                1.03536852234053e+00, 1.03459854108131e+00, 1.03407066106207e+00, 1.03372508241743e+00, 1.03351142775882e+00,\n                                                1.03338862247417e+00, 1.03332451427794e+00, 1.03329522436417e+00, 1.03328423697333e+00, 1.03328124816182e+00,\n                                                1.03328080702042e+00, 1.03328076635506e+00, 1.03327995004363e+00, 1.03327441943897e+00, 1.03325408873063e+00,\n                                                1.03319989744110e+00, 1.03308131591662e+00, 1.03285427475876e+00, 1.03245962545615e+00, 1.03182224254160e+00,\n                                                1.03085087951428e+00, 1.02943888807631e+00, 1.02746589851270e+00, 1.02480053347803e+00, 1.02130418374293e+00,\n                                                1.01683580999254e+00, 1.01125764998704e+00, 1.00444161000327e+00, 9.96276013211364e-01, 9.86672280092627e-01,\n                                                9.75571045110883e-01, 9.62947187955933e-01, 9.48813291466394e-01, 9.33221138440750e-01, 9.16261021085333e-01,\n                                                8.98058842238939e-01, 8.78771208410463e-01, 8.58578917124142e-01, 8.37679392801874e-01, 8.16278703191166e-01,\n                                                7.94583783233179e-01, 7.72795412091142e-01, 7.51102351757034e-01, 7.29676889536378e-01, 7.08671859719274e-01,\n                                                6.88219074763246e-01, 6.68428987883004e-01, 6.49391342658355e-01, 6.31176539220846e-01, 6.13837453802134e-01,\n                                                5.97411479479632e-01, 5.81922601029028e-01, 5.67383367142618e-01, 5.53796672044385e-01, 5.41157301054135e-01,\n                                                5.29453228379488e-01, 5.18666679599129e-01, 5.08774986550080e-01, 4.99751270094713e-01, 4.91564988354355e-01,\n                                                4.84182386300581e-01, 4.77566878691690e-01, 4.71679393460498e-01, 4.66478697618136e-01, 4.61921722993679e-01,\n                                                4.57963904849919e-01, 4.54559542581030e-01, 4.51662188184208e-01, 4.49225064855817e-01, 4.47201514770278e-01,\n                                                4.45545471798880e-01, 4.44211951636035e-01, 4.43157548625095e-01, 4.42340925686189e-01, 4.41723281364034e-01,\n                                                4.41268776368780e-01, 4.40944901299062e-01, 4.40722767675979e-01, 4.40577306066068e-01, 4.40487357904786e-01,\n                                                4.40435651518477e-01, 4.40408657538626e-01, 4.40396324088987e-01, 4.40391697438450e-01, 4.40390438882247e-01,\n                                                4.40390253122168e-01, 4.40390235419429e-01, 4.40389873775757e-01, 4.40387423593421e-01, 4.40378416564158e-01,\n                                                4.40354407900806e-01, 4.40301869433583e-01, 4.40201266943802e-01, 4.40026365158083e-01, 4.39743802871703e-01,\n                                                4.39312979113318e-01, 4.38686288123350e-01, 4.37809734930461e-01, 4.36623953106739e-01, 4.35065630669179e-01,\n                                                4.33069328413900e-01, 4.30569647503091e-01, 4.27503671456122e-01, 4.23813574908856e-01, 4.19449262049149e-01,\n                                                4.14370876789675e-01, 4.08551019611643e-01, 4.01976516268668e-01, 3.94649612150161e-01, 3.86588510546908e-01,\n                                                3.77827227380102e-01, 3.68414790828226e-01, 3.58413862938320e-01, 3.47898894732403e-01, 3.36953943058489e-01,\n                                                3.25670277309008e-01, 3.14143891605482e-01, 3.02473019519823e-01, 2.90755729996576e-01, 2.79087668890142e-01,\n                                                2.67560001503746e-01, 2.56257606107063e-01, 2.45257563510087e-01, 2.34627980277978e-01, 2.24427171214238e-01,\n                                                2.14703210267963e-01, 2.05493839666815e-01, 1.96826707493543e-01, 1.88719886920978e-01, 1.81182618123572e-01,\n                                                1.74216207699459e-01, 1.67815020358866e-01, 1.61967502847084e-01, 1.56657189175810e-01, 1.51863647627920e-01,\n                                                1.47563342153269e-01, 1.43730392439004e-01, 1.40337227230276e-01, 1.37355133876554e-01, 1.34754713362327e-01,\n                                                1.32506254264676e-01, 1.30580041316023e-01, 1.28946614778165e-01, 1.27576995929829e-01, 1.26442891918813e-01,\n                                                1.25516890324207e-01, 1.24772650302170e-01, 1.24185093443373e-01, 1.23730593743957e-01, 1.23387162670305e-01,\n                                                1.23134622445825e-01, 1.22954758631415e-01, 1.22831441972195e-01, 1.22750709426334e-01, 1.22700795263619e-01,\n                                                1.22672105017692e-01, 1.22657127702119e-01, 1.22650284803328e-01, 1.22647717854051e-01, 1.22647019587113e-01,\n                                                1.22646916524580e-01, 1.22646906323688e-01, 1.22646693954700e-01, 1.22645255130642e-01, 1.22639965968411e-01,\n                                                1.22625867827381e-01, 1.22595018569221e-01, 1.22535954559716e-01, 1.22433291841865e-01, 1.22267496031633e-01,\n                                                1.22014851383177e-01, 1.21647659240011e-01, 1.21134693593497e-01, 1.20441935482212e-01, 1.19533597375266e-01,\n                                                1.18373432758744e-01, 1.16926304812452e-01, 1.15159962164732e-01, 1.13046941174524e-01, 1.10566486050793e-01,\n                                                1.07706354337999e-01, 1.04464360319092e-01, 1.00849506979301e-01, 9.68825716052422e-02, 9.25960422831409e-02,\n                                                8.80333513872813e-02, 8.32474135893264e-02, 7.82985432050509e-02, 7.32518900681001e-02, 6.81745851881672e-02,\n                                                6.31328189051388e-02, 5.81890796421618e-02, 5.33997594229518e-02, 4.88132864482580e-02, 4.44688826864095e-02,\n                                                4.03959755840901e-02, 3.66142279871156e-02, 3.31340978138996e-02, 2.99578044013273e-02, 2.70805634321007e-02,\n                                                2.44919552389433e-02, 2.21773079330347e-02, 2.01190019657815e-02, 1.82976312009018e-02, 1.66929830682108e-02,\n                                                1.52848239669936e-02, 1.40534942793238e-02, 1.29803298147877e-02, 1.20479337397015e-02, 1.12403260086182e-02,\n                                                1.05429971461817e-02, 9.94289102160906e-03, 9.42833795238585e-03, 8.98895577847725e-03, 8.61553293522377e-03,\n                                                8.29990429371463e-03, 8.03482774935560e-03, 7.81386724777633e-03, 7.63128610456931e-03, 7.48195303257404e-03,\n                                                7.36126215316091e-03, 7.26506735246346e-03, 7.18963058239552e-03, 7.13158305508443e-03, 7.08789771884710e-03,\n                                                7.05587093958826e-03, 7.03311096363279e-03, 7.01753053276377e-03, 7.00734098702327e-03, 7.00104533546408e-03,\n                                                6.99742809775472e-03, 6.99554019330861e-03, 6.99467773561935e-03, 6.99435422084349e-03, 6.99426621913801e-03,\n                                                6.99425323035996e-03, 6.99425189052505e-03, 6.99422344904121e-03, 6.99403075661564e-03, 6.99332244021633e-03,\n                                                6.99143464619567e-03, 6.98730486567456e-03, 6.97940200986125e-03, 6.96567815913340e-03, 6.94354844799960e-03,\n                                                6.90990653954771e-03, 6.86118368893318e-03, 6.79345898403483e-03, 6.70262641510533e-03, 6.58462046386177e-03,\n                                                6.43569564805802e-03, 6.25274707218892e-03, 6.03364929867922e-03, 5.77758125771766e-03, 5.48529758200544e-03,\n                                                5.15930410833931e-03, 4.80389947059479e-03, 4.42505681755279e-03, 4.03013908830019e-03, 3.62746524615432e-03,\n                                                3.22576889266202e-03, 2.83360944673205e-03, 2.45880501951490e-03, 2.10795292926491e-03, 1.78608924457535e-03,\n                                                1.49651633193315e-03, 1.24080205040400e-03, 1.01893071326487e-03, 8.29567743345194e-04, 6.70389343170541e-04,\n                                                5.38426839703732e-04, 4.30382898152004e-04, 3.42891647079568e-04, 2.72712263338803e-04, 2.16859653022539e-04,\n                                                1.72682420576109e-04, 1.37898055228902e-04, 1.10593000748338e-04, 8.91955433033331e-05, 7.24323367009561e-05,\n                                                5.92809138098005e-05, 4.89273814991975e-05, 4.07318467452455e-05, 3.41985512690712e-05, 2.89469502021689e-05,\n                                                2.46837877000416e-05, 2.11801465042072e-05, 1.82567203808048e-05, 1.57758244441197e-05, 1.36355865123505e-05,\n                                                1.17633474019385e-05, 1.01084941874774e-05, 8.63613225021709e-06, 7.32225294797217e-06, 6.15021075134337e-06,\n                                                5.10815261378639e-06, 4.18717473138486e-06, 3.38004874578246e-06, 2.68035336858929e-06, 2.08187084638212e-06,\n                                                1.57816925394627e-06, 1.16234157587769e-06, 8.26886981997177e-07, 5.63711431311731e-07, 4.97379915032070e-14,\n                                                4.26325641456060e-14, 4.26325641456060e-14, 4.26325641456060e-14, 4.97379915032070e-14, 4.97379915032070e-14,\n                                                4.97379915032070e-14}),\nmadness::CubicInterpolationTable<double>(grid, {4.40000000000000e+01, 4.39999998436061e+01, 4.39999950075971e+01, 4.39999622428466e+01, 4.39998417949876e+01,\n                                                4.39995207162301e+01, 4.39988179976279e+01, 4.39974720328143e+01, 4.39951308428033e+01, 4.39913453941035e+01,\n                                                4.39855662353027e+01, 4.39771435693373e+01, 4.39653307812259e+01, 4.39492913667994e+01, 4.39281091686062e+01,\n                                                4.39008018278394e+01, 4.38663374038115e+01, 4.38236541797104e+01, 4.37716837337062e+01, 4.37093773624070e+01,\n                                                4.36357358472145e+01, 4.35498423089676e+01, 4.34508974839130e+01, 4.33382561993570e+01, 4.32114632081936e+01,\n                                                4.30702859838610e+01, 4.29147417325094e+01, 4.27451158860143e+01, 4.25619697805238e+01, 4.23661360920506e+01,\n                                                4.21587017814909e+01, 4.19409795993195e+01, 4.17144703781712e+01, 4.14808191826916e+01, 4.12417687489967e+01,\n                                                4.09991134980309e+01, 4.07546568255176e+01, 4.05101735151894e+01, 4.02673781851738e+01, 4.00278998380186e+01,\n                                                3.97932619676298e+01, 3.95648673349590e+01, 3.93439864442799e+01, 3.91317488700544e+01, 3.89291368145915e+01,\n                                                3.87369805349345e+01, 3.85559554996982e+01, 3.83865812872227e+01, 3.82292223072765e+01, 3.80840904319112e+01,\n                                                3.79512495798221e+01, 3.78306222369657e+01, 3.77219978334081e+01, 3.76250428437804e+01, 3.75393124399994e+01,\n                                                3.74642634983575e+01, 3.73992687442230e+01, 3.73436318016388e+01, 3.72966028984636e+01, 3.72573949586864e+01,\n                                                3.72251997924069e+01, 3.71992040725355e+01, 3.71786047684080e+01, 3.71626236935917e+01, 3.71505208215276e+01,\n                                                3.71416060311762e+01, 3.71352489675805e+01, 3.71308867401914e+01, 3.71280292346932e+01, 3.71262618804138e+01,\n                                                3.71252457925788e+01, 3.71247152931133e+01, 3.71244729012322e+01, 3.71243819712982e+01, 3.71243572361164e+01,\n                                                3.71243535852541e+01, 3.71243530855026e+01, 3.71243412830626e+01, 3.71242613198900e+01, 3.71239673682374e+01,\n                                                3.71231838120276e+01, 3.71214690740978e+01, 3.71181853591173e+01, 3.71124756184822e+01, 3.71032489503377e+01,\n                                                3.70891755339780e+01, 3.70686920475100e+01, 3.70400183105906e+01, 3.70011856087986e+01, 3.69500767746871e+01,\n                                                3.68844776133981e+01, 3.68021386723736e+01, 3.67008456867184e+01, 3.65784963220650e+01, 3.64331801338323e+01,\n                                                3.62632580153565e+01, 3.60674368637888e+01, 3.58448348077019e+01, 3.55950322224755e+01, 3.53181041297924e+01,\n                                                3.50146307785993e+01, 3.46856855396539e+01, 3.43328025889254e+01, 3.39579302512043e+01, 3.35633776580583e+01,\n                                                3.31517611716310e+01, 3.27259530833209e+01, 3.22890305639236e+01, 3.18442203871740e+01, 3.13948358389478e+01,\n                                                3.09442056185381e+01, 3.04955983889381e+01, 3.00521491174609e+01, 2.96167937014489e+01, 2.91922168759165e+01,\n                                                2.87808159015781e+01, 2.83846799525378e+01, 2.80055831315520e+01, 2.76449879428559e+01, 2.73040558297719e+01,\n                                                2.69836618105193e+01, 2.66844110171865e+01, 2.64066557824160e+01, 2.61505126340985e+01, 2.59158790589916e+01,\n                                                2.57024501745875e+01, 2.55097355499963e+01, 2.53370764057565e+01, 2.51836633587064e+01, 2.50485548025575e+01,\n                                                2.49306959482888e+01, 2.48289384954267e+01, 2.47420608609357e+01, 2.46687888491338e+01, 2.46078165974670e+01,\n                                                2.45578275764325e+01, 2.45175153586466e+01, 2.44856038066363e+01, 2.44608662681882e+01, 2.44421433197952e+01,\n                                                2.44283585703922e+01, 2.44185320353634e+01, 2.44117906187832e+01, 2.44073753013970e+01, 2.44046447214083e+01,\n                                                2.44030749503406e+01, 2.44022554003468e+01, 2.44018809439193e+01, 2.44017404728279e+01, 2.44017022613268e+01,\n                                                2.44016966213908e+01, 2.44016960860055e+01, 2.44016851707688e+01, 2.44016112185356e+01, 2.44013393638164e+01,\n                                                2.44006147105665e+01, 2.43990288836152e+01, 2.43959920611993e+01, 2.43907117083325e+01, 2.43821791512743e+01,\n                                                2.43691650352378e+01, 2.43502245748888e+01, 2.43237133198636e+01, 2.42878138939411e+01, 2.42405738082990e+01,\n                                                2.41799539866253e+01, 2.41038870768972e+01, 2.40103439840354e+01, 2.38974063825044e+01, 2.37633423195089e+01,\n                                                2.36066814693135e+01, 2.34262862165866e+01, 2.32214145838751e+01, 2.29917711016801e+01, 2.27375420542450e+01,\n                                                2.24594121281075e+01, 2.21585603893139e+01, 2.18366348149167e+01, 2.14957063929796e+01, 2.11382060082453e+01,\n                                                2.07668495307478e+01, 2.03845579474965e+01, 1.99943792231026e+01, 1.95994166071125e+01, 1.92027650390289e+01,\n                                                1.88074545329532e+01, 1.84163981863785e+01, 1.80323430675577e+01, 1.76578240130378e+01, 1.72951221939473e+01,\n                                                1.69462313048845e+01, 1.66128340910841e+01, 1.62962908815338e+01, 1.59976403233674e+01, 1.57176111010441e+01,\n                                                1.54566424013771e+01, 1.52149103844222e+01, 1.49923579108000e+01, 1.47887251321624e+01, 1.46035791148254e+01,\n                                                1.44363412922805e+01, 1.42863121233276e+01, 1.41526928058344e+01, 1.40346042368747e+01, 1.39311036209762e+01,\n                                                1.38411992280216e+01, 1.37638638159404e+01, 1.36980471855364e+01, 1.36426882469567e+01, 1.35967268661877e+01,\n                                                1.35591156381383e+01, 1.35288316097706e+01, 1.35048878598013e+01, 1.34863447370516e+01, 1.34723204733196e+01,\n                                                1.34620008238637e+01, 1.34546473535646e+01, 1.34496039825439e+01, 1.34463014324921e+01, 1.34442592728474e+01,\n                                                1.34430853504281e+01, 1.34424724909467e+01, 1.34421924781087e+01, 1.34420874368751e+01, 1.34420588632306e+01,\n                                                1.34420546458248e+01, 1.34420542705058e+01, 1.34420468823079e+01, 1.34419968263011e+01, 1.34418128169339e+01,\n                                                1.34413223294168e+01, 1.34402489799944e+01, 1.34381936575957e+01, 1.34346202798262e+01, 1.34288470192333e+01,\n                                                1.34200438071570e+01, 1.34072368552196e+01, 1.33893208167128e+01, 1.33650790180828e+01, 1.33332119030583e+01,\n                                                1.32923734349854e+01, 1.32412146962588e+01, 1.31784333257864e+01, 1.31028267874521e+01, 1.30133468300134e+01,\n                                                1.29091519688058e+01, 1.27896544928044e+01, 1.26545584778424e+01, 1.25038856496985e+01, 1.23379867283489e+01,\n                                                1.21575370699629e+01, 1.19635168960729e+01, 1.17571779640237e+01, 1.15399999281501e+01, 1.13136405874177e+01,\n                                                1.10798844828004e+01, 1.08405937915121e+01, 1.05976642424651e+01, 1.03529871221791e+01, 1.01084167815268e+01,\n                                                9.86574187330318e+00, 9.62665824040598e+00, 9.39274208083050e+00, 9.16542352447011e+00, 8.94596248838274e+00,\n                                                8.73542985917577e+00, 8.53469705780810e+00, 8.34443575133155e+00, 8.16512739490148e+00, 7.99708030023427e+00,\n                                                7.84045080411670e+00, 7.69526512238745e+00, 7.56143935643919e+00, 7.43879634036733e+00, 7.32707910304562e+00,\n                                                7.22596142590079e+00, 7.13505628429102e+00, 7.05392297586992e+00, 6.98207359929550e+00, 6.91897935836867e+00,\n                                                6.86407699227799e+00, 6.81677549636791e+00, 6.77646320072063e+00, 6.74251520641960e+00, 6.71430113022198e+00,\n                                                6.69119306834849e+00, 6.67257365375579e+00, 6.65784404673857e+00, 6.64643166692807e+00, 6.63779744836189e+00,\n                                                6.63144238167759e+00, 6.62691310188875e+00, 6.62380628910488e+00, 6.62177167415871e+00, 6.62051348109764e+00,\n                                                6.61979019202074e+00, 6.61941258356838e+00, 6.61924005425936e+00, 6.61917533306254e+00, 6.61915772737525e+00,\n                                                6.61915512881441e+00, 6.61915489908829e+00, 6.61915039406394e+00, 6.61911987191506e+00, 6.61900767007475e+00,\n                                                6.61870858736742e+00, 6.61805408365579e+00, 6.61680075134629e+00, 6.61462157318922e+00, 6.61110045415844e+00,\n                                                6.60573048090541e+00, 6.59791631217458e+00, 6.58698102713721e+00, 6.57217764466350e+00, 6.55270536560895e+00,\n                                                6.52773037739620e+00, 6.49641079855833e+00, 6.45792504413937e+00, 6.41150258651616e+00, 6.35645580645612e+00,\n                                                6.29221141774571e+00, 6.21833984400499e+00, 6.13458095266348e+00, 6.04086470890401e+00, 5.93732557447139e+00,\n                                                5.82430979445348e+00, 5.70237503794080e+00, 5.57228215358224e+00, 5.43497907190615e+00, 5.29157717074960e+00,\n                                                5.14332076790014e+00, 4.99155084244542e+00, 4.83766458730744e+00, 4.68307287615491e+00, 4.52915807039244e+00,\n                                                4.37723468693509e+00, 4.22851523631581e+00, 4.08408303802268e+00, 3.94487310942625e+00, 3.81166143178443e+00,\n                                                3.68506215246442e+00, 3.56553169061088e+00, 3.45337833236363e+00, 3.34877574148456e+00, 3.25177884345982e+00,\n                                                3.16234071471587e+00, 3.08032936577942e+00, 3.00554359577529e+00, 2.93772737569422e+00, 2.87658246380116e+00,\n                                                2.82177915574453e+00, 2.77296522151071e+00, 2.72977318478886e+00, 2.69182616425822e+00, 2.65874252848258e+00,\n                                                2.63013962379777e+00, 2.60563682401050e+00, 2.58485812680296e+00, 2.56743448820892e+00, 2.55300604628304e+00,\n                                                2.54122434051224e+00, 2.53175458680661e+00, 2.52427802129852e+00, 2.51849428206021e+00, 2.51412375875195e+00,\n                                                2.51090980864561e+00, 2.50862071569163e+00, 2.50705125902383e+00, 2.50602375940912e+00, 2.50538848650461e+00,\n                                                2.50502333512430e+00, 2.50483271276244e+00, 2.50474562029830e+00, 2.50471294963096e+00, 2.50470406248552e+00,\n                                                2.50470275076395e+00, 2.50470263300828e+00, 2.50470030349273e+00, 2.50468452074539e+00, 2.50462650264510e+00,\n                                                2.50447185497639e+00, 2.50413344930112e+00, 2.50348550357424e+00, 2.50235916357399e+00, 2.50053988763506e+00,\n                                                2.49776693855762e+00, 2.49373527662213e+00, 2.48810011580832e+00, 2.48048434018261e+00, 2.47048886873300e+00,\n                                                2.45770589814479e+00, 2.44173474405584e+00, 2.42219975119983e+00, 2.39876947130090e+00, 2.37117604525212e+00,\n                                                2.33923351226289e+00, 2.30285364630249e+00, 2.26205792863841e+00, 2.21698443135335e+00, 2.16788871607150e+00,\n                                                2.11513832334242e+00, 2.05920099190035e+00, 2.00062733169570e+00, 1.94002919812312e+00, 1.87805540072107e+00,\n                                                1.81536657279398e+00, 1.75261100700187e+00, 1.69040304081342e+00, 1.62930520129908e+00, 1.56981485714415e+00,\n                                                1.51235564778280e+00, 1.45727352715774e+00, 1.40483691690515e+00, 1.35524023353828e+00, 1.30860993928912e+00,\n                                                1.26501225401105e+00, 1.22446173353151e+00, 1.18693004152028e+00, 1.15235439125021e+00, 1.12064528830047e+00,\n                                                1.09169334863635e+00, 1.06537508808611e+00, 1.04155767415930e+00, 1.02010269903188e+00, 1.00086907602518e+00,\n                                                9.83715185349212e-01, 9.68500403100428e-01, 9.55086145059646e-01, 9.43336547560349e-01, 9.33118894519026e-01,\n                                                9.24303884675666e-01, 9.16765817457062e-01, 9.10382760334755e-01, 9.05036745396714e-01, 9.00614028159175e-01,\n                                                8.97005427425725e-01, 8.94106751311121e-01, 8.91819301576945e-01, 8.90050436519871e-01, 8.88714162307302e-01,\n                                                8.87731714463463e-01, 8.87032085774479e-01, 8.86552454715499e-01, 8.86238469913607e-01, 8.86044351167982e-01,\n                                                8.85932775837091e-01, 8.85874530324323e-01, 8.85847919035811e-01, 8.85837936476321e-01, 8.85835221002026e-01,\n                                                8.85834820204572e-01, 8.85834783258204e-01, 8.85834041601406e-01, 8.85829016791313e-01, 8.85810545415623e-01,\n                                                8.85761310257749e-01, 8.85653574260814e-01, 8.85447300346485e-01, 8.85088755318144e-01, 8.84509699293815e-01,\n                                                8.83627264275233e-01, 8.82344623298451e-01, 8.80552540935582e-01, 8.78131872161966e-01, 8.74957035699026e-01,\n                                                8.70900427445392e-01, 8.65837660001930e-01, 8.59653420179484e-01, 8.52247637182366e-01, 8.43541563930351e-01,\n                                                8.33483309855218e-01, 8.22052342803914e-01, 8.09262513905161e-01, 7.95163257908705e-01, 7.79838776887800e-01,\n                                                7.63405209523071e-01, 7.46005993793261e-01, 7.27805815448313e-01, 7.08983668171307e-01, 6.89725613181139e-01,\n                                                6.70217809510618e-01, 6.50640299651116e-01, 6.31161899174771e-01, 6.11936380313857e-01, 5.93099985209072e-01,\n                                                5.74770175967295e-01, 5.57045438386794e-01, 5.40005907601731e-01, 5.23714572826485e-01, 5.08218836014628e-01,\n                                                4.93552235016352e-01, 4.79736185775401e-01, 4.66781642373697e-01, 4.54690613055362e-01, 4.43457502000598e-01,\n                                                4.33070269843540e-01, 4.23511421374918e-01, 4.14758837922335e-01, 4.06786476201866e-01, 3.99564956540829e-01,\n                                                3.93062062570117e-01, 3.87243172720666e-01, 3.82071641739522e-01, 3.77509148291338e-01, 3.73516022642669e-01,\n                                                3.70051566415441e-01, 3.67074374341890e-01, 3.64542665744366e-01, 3.62414631004498e-01, 3.60648795532590e-01,\n                                                3.59204400720266e-01, 3.58041798145280e-01, 3.57122850052583e-01, 3.56411326069498e-01, 3.55873283468618e-01,\n                                                3.55477416320490e-01, 3.55195357805329e-01, 3.55001919951313e-01, 3.54875256222577e-01, 3.54796934678745e-01,\n                                                3.54751912744838e-01, 3.54728408739213e-01, 3.54717669907657e-01, 3.54713641456641e-01, 3.54712545625532e-01,\n                                                3.54712383883339e-01, 3.54712368469471e-01, 3.54712053584635e-01, 3.54709920200243e-01, 3.54702077753970e-01,\n                                                3.54681173442678e-01, 3.54635428781350e-01, 3.54547837271333e-01, 3.54395561782553e-01, 3.54149569878288e-01,\n                                                3.53774544443425e-01, 3.53229104672280e-01, 3.52466367516350e-01, 3.51434870778483e-01, 3.50079865014592e-01,\n                                                3.48344961611993e-01, 3.46174099052490e-01, 3.43513759831822e-01, 3.40315339554678e-01, 3.36537541385674e-01,\n                                                3.32148648141931e-01, 3.27128515639757e-01, 3.21470138070715e-01, 3.15180660537798e-01, 3.08281753802682e-01,\n                                                3.00809317118649e-01, 2.92812529844333e-01, 2.84352323653266e-01, 2.75499387806889e-01, 2.66331845765222e-01,\n                                                2.56932751087874e-01, 2.47387545761029e-01, 2.37781608380871e-01, 2.28197997341660e-01, 2.18715469197761e-01,\n                                                2.09406827467731e-01, 2.00337633877972e-01, 1.91565293034181e-01, 1.83138502937396e-01, 1.75097047751265e-01,\n                                                1.67471896049285e-01, 1.60285557822284e-01, 1.53552647187823e-01, 1.47280595188704e-01, 1.41470458164498e-01,\n                                                1.36117771452014e-01, 1.31213404887937e-01, 1.26744384872168e-01, 1.22694656720675e-01, 1.19045769908951e-01,\n                                                1.15777476965889e-01, 1.12868243811832e-01, 1.10295675015642e-01, 1.08036861708193e-01, 1.06068662774199e-01,\n                                                1.04367931568014e-01, 1.02911700906233e-01, 1.01677338648393e-01, 1.00642684944852e-01, 9.97861803715381e-02,\n                                                9.90869918433361e-02, 9.85251405670198e-02, 9.80816335347185e-02, 9.77385973548763e-02, 9.74794107561223e-02,\n                                                9.72888300648407e-02, 9.71531005059560e-02, 9.70600454309434e-02, 9.69991255979323e-02, 9.69614614127323e-02,\n                                                9.69398125098166e-02, 9.69285110681852e-02, 9.69233476285325e-02, 9.69214106897383e-02, 9.69208837997400e-02,\n                                                9.69208060320312e-02, 9.69207983347573e-02, 9.69206380879015e-02, 9.69195523973596e-02, 9.69155613674886e-02,\n                                                9.69049233876547e-02, 9.68816456787067e-02, 9.68370785319976e-02, 9.67596148392147e-02, 9.66345174342038e-02,\n                                                9.64438975066528e-02, 9.61668671881668e-02, 9.57798874429017e-02, 9.52573276350321e-02, 9.45722447089068e-02,\n                                                9.36973772404244e-02, 9.26063326974003e-02, 9.12749258665073e-02, 8.96826042748771e-02, 8.78138751872868e-02,\n                                                8.56596317296479e-02, 8.32182664638665e-02, 8.04964625110642e-02, 7.75095671471391e-02, 7.42814809314822e-02,\n                                                7.08440349204196e-02, 6.72358752028757e-02, 6.35009220188891e-02, 5.96865134452642e-02, 5.58413748488746e-02,\n                                                5.20135704190210e-02, 4.82485900305605e-02, 4.45877043218701e-02, 4.10666867857543e-02, 3.77149594007022e-02,\n                                                3.45551742261705e-02, 3.16032033982196e-02, 2.88684786421953e-02, 2.63546013349796e-02, 2.40601357764518e-02,\n                                                2.19795003706054e-02, 2.01038813877403e-02, 1.84221088823762e-02, 1.69214512743707e-02, 1.55883016737377e-02,\n                                                1.44087435755083e-02, 1.33689951457754e-02, 1.24557396712106e-02, 1.16563550315121e-02, 1.09590577449410e-02,\n                                                1.03529778366820e-02, 9.82818009682518e-03, 9.37564576882011e-03, 8.98722676357977e-03, 8.65558243680908e-03,\n                                                8.37410699520547e-03, 8.13685382219376e-03, 7.93846148179966e-03, 7.77408486626285e-03, 7.63933387182902e-03,\n                                                7.53022107403467e-03, 7.44311909014073e-03, 7.37472762896374e-03, 7.32204962105243e-03, 7.28237529150277e-03,\n                                                7.25327259617359e-03, 7.23258210987865e-03, 7.21841425632874e-03, 7.20914672381667e-03, 7.20342002617969e-03,\n                                                7.20012943984472e-03, 7.19841194908355e-03, 7.19762732567375e-03, 7.19733300449832e-03, 7.19725294372608e-03,\n                                                7.19724112698117e-03, 7.19723990805221e-03, 7.19721403290663e-03, 7.19703872728417e-03, 7.19639431845565e-03,\n                                                7.19467681604868e-03, 7.19091939740935e-03, 7.18372844495718e-03, 7.17123880600923e-03, 7.15109374785783e-03,\n                                                7.12045584506171e-03, 7.07605545238721e-03, 7.01428308074270e-03, 6.93133046333827e-03, 6.82338198082988e-03,\n                                                6.68685318771622e-03, 6.51866655181266e-03, 6.31654674827331e-03, 6.07931003793993e-03, 5.80711598868788e-03,\n                                                5.50164690532995e-03, 5.16618250068035e-03, 4.80554556185808e-03, 4.42590844168933e-03, 4.03446843314725e-03,\n                                                3.63901937458166e-03, 3.24746327998326e-03, 2.86731567296528e-03, 2.50525921551770e-03, 2.16679190693014e-03,\n                                                1.85600066267710e-03, 1.57547219355081e-03, 1.32633482280653e-03, 1.10841016154239e-03, 9.20443636211132e-04,\n                                                7.60377723274530e-04, 6.25631319522313e-04, 5.13353472726408e-04, 4.20629948479245e-04, 3.44634949598799e-04,\n                                                2.82733082094921e-04, 2.32543131815532e-04, 1.91973618349550e-04, 1.59234311553291e-04, 1.32824680733279e-04,\n                                                1.11503148509939e-04, 9.42469433695692e-05, 8.02146306853047e-05, 6.87186394898731e-05, 5.92066642823852e-05,\n                                                5.12454893097924e-05, 4.45020638082383e-05, 3.87219359083701e-05, 3.37091227038400e-05, 2.93113087082020e-05,\n                                                2.54111422393066e-05, 2.19214200924966e-05, 1.87811318852482e-05, 1.59505264178961e-05, 1.34051226510223e-05,\n                                                1.11296708880104e-05, 9.11315281371117e-06, 7.34537911739608e-06, 5.81513738495687e-06, 4.50948073194013e-06,\n                                                3.41367294964812e-06, 2.51141491247608e-06, 1.78513816706527e-06, 1.21628345084446e-06, 7.85557503490963e-07,\n                                                4.73190361560683e-07, 2.84217094304040e-14, 2.13162820728030e-14, 2.84217094304040e-14, 3.55271367880050e-14,\n                                                3.55271367880050e-14}),\nmadness::CubicInterpolationTable<double>(grid, {4.50000000000000e+01,  4.49999998383991e+01,  4.49999948413797e+01,  4.49999609857566e+01,\n                                                4.49998365276888e+01,  4.49995047588369e+01,  4.49987786434467e+01,  4.49973878641802e+01,\n                                                4.49949687202066e+01,  4.49910572203061e+01,  4.49850856029942e+01,  4.49763824042897e+01,\n                                                4.49641760936821e+01,  4.49476022234496e+01,  4.49257139980220e+01,  4.48974961759291e+01,\n                                                4.48618822645919e+01,  4.48177750409062e+01,  4.47640704943840e+01,  4.46996852956825e+01,\n                                                4.46235877862962e+01,  4.45348322183397e+01,  4.44325955284468e+01,  4.43162153356283e+01,\n                                                4.41852271952099e+01,  4.40393985564527e+01,  4.38787565224512e+01,  4.37036065437407e+01,\n                                                4.35145396751382e+01,  4.33124269725705e+01,  4.30984008758913e+01,  4.28738247985099e+01,\n                                                4.26402533700897e+01,  4.23993866265384e+01,  4.21530217695162e+01,  4.19030059024002e+01,\n                                                4.16511924853539e+01,  4.13994033172617e+01,  4.11493968567197e+01,  4.09028428257551e+01,\n                                                4.06613024245202e+01,  4.04262131704717e+01,  4.01988773366311e+01,  3.99804531254536e+01,\n                                                3.97719479815537e+01,  3.95742137278793e+01,  3.93879434400977e+01,  3.92136701193008e+01,\n                                                3.90517672800331e+01,  3.89024515566622e+01,  3.87657873737558e+01,  3.86416936526040e+01,\n                                                3.85299524566009e+01,  3.84302194237236e+01,  3.83420357971251e+01,  3.82648418415084e+01,\n                                                3.81979914176185e+01,  3.81407674741502e+01,  3.80923982016175e+01,  3.80520735745304e+01,\n                                                3.80189619870271e+01,  3.79922266650349e+01,  3.79710415182672e+01,  3.79546060815487e+01,\n                                                3.79421591906459e+01,  3.79329910460142e+01,  3.79264533407917e+01,  3.79219671680259e+01,\n                                                3.79190284762476e+01,  3.79172109105809e+01,  3.79161659558794e+01,  3.79156203852196e+01,\n                                                3.79153711071653e+01,  3.79152775939867e+01,  3.79152521560994e+01,  3.79152484015192e+01,\n                                                3.79152478875702e+01,  3.79152357498330e+01,  3.79151535149774e+01,  3.79148512124444e+01,\n                                                3.79140453963681e+01,  3.79122819458754e+01,  3.79089049505134e+01,  3.79030330258169e+01,\n                                                3.78935443091608e+01,  3.78790712699044e+01,  3.78580063141110e+01,  3.78285189517586e+01,\n                                                3.77885850009829e+01,  3.77360279104858e+01,  3.76685717775263e+01,  3.75839050284658e+01,\n                                                3.74797530323076e+01,  3.73539571722196e+01,  3.72045571542300e+01,  3.70298726392587e+01,\n                                                3.68285797015526e+01,  3.65997772238008e+01,  3.63430382854114e+01,  3.60584421492023e+01,\n                                                3.57465839480890e+01,  3.54085618207551e+01,  3.50459446963653e+01,  3.46607269954923e+01,\n                                                3.42552775319459e+01,  3.38322878855780e+01,  3.33947212909131e+01,  3.29457590823580e+01,\n                                                3.24887403357166e+01,  3.20270922027075e+01,  3.15642522496070e+01,  3.11035877737725e+01,\n                                                3.06483189928137e+01,  3.02014527135498e+01,  2.97657310843205e+01,  2.93435972589296e+01,\n                                                2.89371771727176e+01,  2.85482747638490e+01,  2.81783770933148e+01,  2.78286658309849e+01,\n                                                2.75000321981314e+01,  2.71930933534561e+01,  2.69082090961768e+01,  2.66454984577724e+01,\n                                                2.64048561966315e+01,  2.61859694161085e+01,  2.59883345625858e+01,  2.58112750029814e+01,\n                                                2.56539592935331e+01,  2.55154201716655e+01,  2.53945742444900e+01,  2.52902423086142e+01,\n                                                2.52011702062563e+01,  2.51260500911980e+01,  2.50635419372743e+01,  2.50122950692453e+01,\n                                                2.49709694330829e+01,  2.49382562556179e+01,  2.49128976799771e+01,  2.48937049119235e+01,\n                                                2.48795743812290e+01,  2.48695014181908e+01,  2.48625909726440e+01,  2.48580649627989e+01,\n                                                2.48552659323416e+01,  2.48536568119750e+01,  2.48528167189495e+01,  2.48524328764349e+01,\n                                                2.48522888843295e+01,  2.48522497150303e+01,  2.48522439337254e+01,  2.48522433849202e+01,\n                                                2.48522321960856e+01,  2.48521563901907e+01,  2.48518777212788e+01,  2.48511349043869e+01,\n                                                2.48495093292547e+01,  2.48463963939206e+01,  2.48409837101139e+01,  2.48322373518497e+01,\n                                                2.48188972191215e+01,  2.47994824537697e+01,  2.47723076535649e+01,  2.47355103610787e+01,\n                                                2.46870899370342e+01,  2.46249574531559e+01,  2.45469956607486e+01,  2.44511274305389e+01,\n                                                2.43353903593007e+01,  2.41980145601115e+01,  2.40375000671676e+01,  2.38526898636906e+01,\n                                                2.36428343410529e+01,  2.34076430597992e+01,  2.31473200401622e+01,  2.28625795039245e+01,\n                                                2.25546400932726e+01,  2.22251971850036e+01,  2.18763749889042e+01,  2.15106624089766e+01,\n                                                2.11308385554403e+01,  2.07398945343295e+01,  2.03409571855780e+01,  1.99372180262930e+01,\n                                                1.95318678485896e+01,  1.91280355490763e+01,  1.87287296000727e+01,  1.83367818975394e+01,\n                                                1.79547955951329e+01,  1.75850999256634e+01,  1.72297153223498e+01,  1.68903313647665e+01,\n                                                1.65682985835636e+01,  1.62646334962757e+01,  1.59800348605404e+01,  1.57149082740189e+01,\n                                                1.54693959759272e+01,  1.52434089213483e+01,  1.50366587408587e+01,  1.48486878883452e+01,\n                                                1.46788969734153e+01,  1.45265688740865e+01,  1.43908896817316e+01,  1.42709668336161e+01,\n                                                1.41658449539673e+01,  1.40745199799397e+01,  1.39959521243882e+01,  1.39290781502477e+01,\n                                                1.38728233231410e+01,  1.38261132853555e+01,  1.37878859665018e+01,  1.37571035217114e+01,\n                                                1.37327641730281e+01,  1.37139137287668e+01,  1.36996564738432e+01,  1.36891650659494e+01,\n                                                1.36816890418815e+01,  1.36765615380456e+01,  1.36732038601239e+01,  1.36711275977164e+01,\n                                                1.36699340666961e+01,  1.36693109689155e+01,  1.36690262779215e+01,  1.36689194817190e+01,\n                                                1.36688904306774e+01,  1.36688861428087e+01,  1.36688857612190e+01,  1.36688782495816e+01,\n                                                1.36688273572524e+01,  1.36686402734506e+01,  1.36681415904262e+01,  1.36670503043531e+01,\n                                                1.36649606273475e+01,  1.36613274947722e+01,  1.36554576224959e+01,  1.36465069272123e+01,\n                                                1.36334850521580e+01,  1.36152676185631e+01,  1.35906166260007e+01,  1.35582091310248e+01,\n                                                1.35166739295292e+01,  1.34646354545158e+01,  1.34007634974720e+01,  1.33238267123119e+01,\n                                                1.32327472349898e+01,  1.31266532405031e+01,  1.30049259658923e+01,  1.28672377540092e+01,\n                                                1.27135780948040e+01,  1.25442654856163e+01,  1.23599441529780e+01,  1.21615661409723e+01,\n                                                1.19503607552827e+01,  1.17277945814630e+01,  1.14955259949652e+01,  1.12553580510829e+01,\n                                                1.10091928437772e+01,  1.07589890225545e+01,  1.05067225383656e+01,  1.02543493790592e+01,\n                                                1.00037685757992e+01,  9.75678442711570e+00,  9.51506858687006e+00,  9.28012476077276e+00,\n                                                9.05326024524724e+00,  8.83556850455347e+00,  8.62792516544075e+00,  8.43099689713510e+00,\n                                                8.24525991790408e+00,  8.07102343946808e+00,  7.90845356321245e+00,  7.75759451238864e+00,\n                                                7.61838580858795e+00,  7.49067541452334e+00,  7.37422968219625e+00,  7.26874120543767e+00,\n                                                7.17383557353244e+00,  7.08907776219333e+00,  7.01397862177792e+00,  6.94800170095486e+00,\n                                                6.89057049508208e+00,  6.84107612191759e+00,  6.79888538233542e+00,  6.76334914033672e+00,\n                                                6.73381093983727e+00,  6.70961575666045e+00,  6.69011875950084e+00,  6.67469392404458e+00,\n                                                6.66274231325242e+00,  6.65369980865526e+00,  6.64704405726040e+00,  6.64230039060625e+00,\n                                                6.63904647972833e+00,  6.63691551380349e+00,  6.63559773075318e+00,  6.63484018311198e+00,\n                                                6.63444468853443e+00,  6.63426398689191e+00,  6.63419619996822e+00,  6.63417776032868e+00,\n                                                6.63417503867823e+00,  6.63417479807033e+00,  6.63417007965022e+00,  6.63413811171434e+00,\n                                                6.63402059501894e+00,  6.63370734494288e+00,  6.63302183671666e+00,  6.63170912869183e+00,\n                                                6.62942670085130e+00,  6.62573871704707e+00,  6.62011418294045e+00,  6.61192941922809e+00,\n                                                6.60047519114600e+00,  6.58496871955079e+00,  6.56457063689203e+00,  6.53840673843335e+00,\n                                                6.50559411789902e+00,  6.46527097986217e+00,  6.41662911189376e+00,  6.35894771012547e+00,\n                                                6.29162701924703e+00,  6.21422010578090e+00,  6.12646105377647e+00,  6.02828795866179e+00,\n                                                5.91985928277158e+00,  5.80156239828791e+00,  5.67401345526970e+00,  5.53804806524137e+00,\n                                                5.39470269652758e+00,  5.24518715934565e+00,  5.09084912789101e+00,  4.93313227748325e+00,\n                                                4.77353023217554e+00,  4.61353900873454e+00,  4.45461088790912e+00,  4.29811256079417e+00,\n                                                4.14528997193417e+00,  3.99724157291347e+00,  3.85490083102525e+00,  3.71902795251319e+00,\n                                                3.59021001137828e+00,  3.46886811441075e+00,  3.35526991952337e+00,  3.24954574701357e+00,\n                                                3.15170663665598e+00,  3.06166294538616e+00,  2.97924238797050e+00,  2.90420674387207e+00,\n                                                2.83626675019046e+00,  2.77509495136516e+00,  2.72033647258827e+00,  2.67161782608661e+00,\n                                                2.62855395356899e+00,  2.59075376257149e+00,  2.55782443786925e+00,  2.52937480934867e+00,\n                                                2.50501804110595e+00,  2.48437387791011e+00,  2.46707064812392e+00,  2.45274717938524e+00,\n                                                2.44105473696492e+00,  2.43165904671341e+00,  2.42424241693905e+00,  2.41850592867640e+00,\n                                                2.41417162403446e+00,  2.41098459012914e+00,  2.40871481375279e+00,  2.40715867115024e+00,\n                                                2.40613991897750e+00,  2.40551006660444e+00,  2.40514803515094e+00,  2.40495904273318e+00,\n                                                2.40487269524620e+00,  2.40484030408469e+00,  2.40483149297530e+00,  2.40483019247664e+00,\n                                                2.40483007572847e+00,  2.40482776614401e+00,  2.40481211843558e+00,  2.40475459679410e+00,\n                                                2.40460127282130e+00,  2.40426576564055e+00,  2.40362337707573e+00,  2.40250672040528e+00,\n                                                2.40070314724796e+00,  2.39795428020679e+00,  2.39395795032219e+00,  2.38837280712234e+00,\n                                                2.38082580316480e+00,  2.37092264370747e+00,  2.35826112869735e+00,  2.34244709864706e+00,\n                                                2.32311243780737e+00,  2.29993430837817e+00,  2.27265452081821e+00,  2.24109772908051e+00,\n                                                2.20518702086066e+00,  2.16495549229819e+00,  2.12055258064815e+00,  2.07224428094970e+00,\n                                                2.02040686860421e+00,  1.96551433496391e+00,  1.90812034112322e+00,  1.84883602053144e+00,\n                                                1.78830533600073e+00,  1.72717986752405e+00,  1.66609485574680e+00,  1.60564807177718e+00,\n                                                1.54638267895420e+00,  1.48877476675568e+00,  1.43322574502593e+00,  1.38005935136809e+00,\n                                                1.32952268948891e+00,  1.28179050223017e+00,  1.23697178961173e+00,  1.19511789307545e+00,\n                                                1.15623125634259e+00,  1.12027421167257e+00,  1.08717730037384e+00,  1.05684679576865e+00,\n                                                1.02917123968798e+00,  1.00402692093500e+00,  9.81282312744312e-01,  9.60801547110243e-01,\n                                                9.42447040661918e-01,  9.26081404468285e-01,  9.11568773870442e-01,  8.98775688734943e-01,\n                                                8.87571643100436e-01,  8.77829408776726e-01,  8.69425221878657e-01,  8.62238905622171e-01,\n                                                8.56153987509238e-01,  8.51057854457252e-01,  8.46841975473076e-01,  8.43402208077087e-01,\n                                                8.40639191854208e-01,  8.38458820391899e-01,  8.36772771760259e-01,  8.35499068054396e-01,\n                                                8.34562626907513e-01,  8.33895762864721e-01,  8.33438594569735e-01,  8.33139315154554e-01,\n                                                8.32954288061906e-01,  8.32847938474274e-01,  8.32792420964566e-01,  8.32767056053349e-01,\n                                                8.32757541041708e-01,  8.32754952750712e-01,  8.32754570725207e-01,  8.32754535509274e-01,\n                                                8.32753828589070e-01,  8.32749039123527e-01,  8.32731432883236e-01,  8.32684503735202e-01,\n                                                8.32581813758047e-01,  8.32385201175228e-01,  8.32043449774517e-01,  8.31491516563069e-01,\n                                                8.30650416473858e-01,  8.29427860856434e-01,  8.27719736232147e-01,  8.25412486991979e-01,\n                                                8.22386426462089e-01,  8.18519942730902e-01,  8.13694489324725e-01,  8.07800160727801e-01,\n                                                8.00741558021976e-01,  7.92443564164124e-01,  7.82856588154644e-01,  7.71960819167340e-01,\n                                                7.59769068383804e-01,  7.46327872687331e-01,  7.31716684518716e-01,  7.16045158446917e-01,\n                                                6.99448740417260e-01,  6.82082939130254e-01,  6.64116782233812e-01,  6.45726013971469e-01,\n                                                6.27086570258612e-01,  6.08368780849801e-01,  5.89732616650032e-01,  5.71324149404852e-01,\n                                                5.53273246508475e-01,  5.35692405289986e-01,  5.18676550083015e-01,  5.02303574024289e-01,\n                                                4.86635401161756e-01,  4.71719364141691e-01,  4.57589728160734e-01,  4.44269233560348e-01,\n                                                4.31770570152601e-01,  4.20097731487388e-01,  4.09247224652766e-01,  3.99209130580005e-01,\n                                                3.89968022155379e-01,  3.81503754255270e-01,  3.73792142765254e-01,  3.66805550172352e-01,\n                                                3.60513394560655e-01,  3.54882597558053e-01,  3.49877985415269e-01,  3.45462656124603e-01,\n                                                3.41598324301749e-01,  3.38245654354026e-01,  3.35364591097104e-01,  3.32914695327311e-01,\n                                                3.30855489816408e-01,  3.29146818739702e-01,  3.27749220715489e-01,  3.26624312534136e-01,\n                                                3.25735177461858e-01,  3.25046748944729e-01,  3.24526177866645e-01,  3.24143169492203e-01,\n                                                3.23870275082037e-01,  3.23683123077785e-01,  3.23560575805594e-01,  3.23484799825195e-01,\n                                                3.23441241233169e-01,  3.23418501193672e-01,  3.23408111417677e-01,  3.23404213908347e-01,\n                                                3.23403153696432e-01,  3.23402997211566e-01,  3.23402982298710e-01,  3.23402677648993e-01,\n                                                3.23400613608825e-01,  3.23393026076907e-01,  3.23372801255594e-01,  3.23328543549614e-01,\n                                                3.23243799385551e-01,  3.23096474357911e-01,  3.22858480779495e-01,  3.22495651918565e-01,\n                                                3.21967957029862e-01,  3.21230046561787e-01,  3.20232148386118e-01,  3.18921322441881e-01,\n                                                3.17243062172516e-01,  3.15143206740252e-01,  3.12570099529196e-01,  3.09476898494538e-01,\n                                                3.05823916282293e-01,  3.01580847299789e-01,  2.96728729606642e-01,  2.91261495116352e-01,\n                                                2.85186983578406e-01,  2.78527332836944e-01,  2.71318705813648e-01,  2.63610367306917e-01,\n                                                2.55463173975230e-01,  2.46947582437230e-01,  2.38141308928363e-01,  2.29126787713327e-01,\n                                                2.19988575295574e-01,  2.10810835985313e-01,  2.01675024926274e-01,  1.92657860457508e-01,\n                                                1.83829651303874e-01,  1.75253017467988e-01,  1.66982018245065e-01,  1.59061677615504e-01,\n                                                1.51527877346489e-01,  1.44407572279043e-01,  1.37719271124240e-01,  1.31473719983823e-01,\n                                                1.25674724679143e-01,  1.20320051282093e-01,  1.15402351037069e-01,  1.10910064954616e-01,\n                                                1.06828273559763e-01,  1.03139467595987e-01,  9.98242251740038e-02,  9.68617893969252e-02,\n                                                9.42305475550853e-02,  9.19084184063479e-02,  8.98731578501994e-02,  8.81025956173573e-02,\n                                                8.65748166576523e-02,  8.52683009474333e-02,  8.41620346534526e-02,  8.32356041374567e-02,\n                                                8.24692823069313e-02,  8.18441144477831e-02,  8.13420080616041e-02,  8.09458285316751e-02,\n                                                8.06394998196325e-02,  8.04081070169076e-02,  8.02379956016424e-02,  8.01168608263936e-02,\n                                                8.00338198934654e-02,  7.99794595240897e-02,  7.99458521920968e-02,  7.99265356059067e-02,\n                                                7.99164518521778e-02,  7.99118447861105e-02,  7.99101165625586e-02,  7.99096464481792e-02,\n                                                7.99095770604410e-02,  7.99095701926049e-02,  7.99094272133161e-02,  7.99084585131098e-02,\n                                                7.99048975507759e-02,  7.98954059632635e-02,  7.98746370559797e-02,  7.98348743730912e-02,\n                                                7.97657650826480e-02,  7.96541689943311e-02,  7.94841449521400e-02,  7.92370964052580e-02,\n                                                7.88920962581585e-02,  7.84264066633042e-02,  7.78162013683712e-02,  7.70374860065246e-02,\n                                                7.60671953266723e-02,  7.48844265959008e-02,  7.34717469992532e-02,  7.18164924727560e-02,\n                                                6.99119593913977e-02,  6.77583824868577e-02,  6.53635954345191e-02,  6.27432866557598e-02,\n                                                5.99207920643039e-02,  5.69264064835622e-02,  5.37962417843829e-02,  5.05707062924188e-02,\n                                                4.72927199194260e-02,  4.40058066609055e-02,  4.07522163463483e-02,  3.75712194016558e-02,\n                                                3.44976935931314e-02,  3.15610847260430e-02,  2.87847802508026e-02,  2.61858921965157e-02,\n                                                2.37754093382421e-02,  2.15586517416284e-02,  1.95359455482773e-02,  1.77034320125458e-02,\n                                                1.60539308245333e-02,  1.45777908990112e-02,  1.32636786026836e-02,  1.20992704906939e-02,\n                                                1.10718327410311e-02,  1.01686817659186e-02,  9.37753006391517e-03,  8.68672847081342e-03,\n                                                8.08542040852700e-03,  7.56362530950128e-03,  7.11226747058191e-03,  6.72316425678332e-03,\n                                                6.38898510217700e-03,  6.10319086991495e-03,  5.85996178110548e-03,  5.65412084437611e-03,\n                                                5.48105820163158e-03,  5.33666013012635e-03,  5.21724492438125e-03,  5.11950677799433e-03,\n                                                5.04046811984438e-03,  4.97744047573434e-03,  4.92799363410512e-03,  4.88993257910408e-03,\n                                                4.86128130098251e-03,  4.84027224927530e-03,  4.82533991781509e-03,  4.81511688440150e-03,\n                                                4.80843059197156e-03,  4.80429925419656e-03,  4.80192548309333e-03,  4.80068654858457e-03,\n                                                4.80012055773216e-03,  4.79990824933907e-03,  4.79985049766896e-03,  4.79984197368566e-03,\n                                                4.79984109448850e-03,  4.79982243192012e-03,  4.79969599194874e-03,  4.79923121127968e-03,\n                                                4.79799247634816e-03,  4.79528254835770e-03,  4.79009659215279e-03,  4.78109030121487e-03,\n                                                4.76656625664162e-03,  4.74448327547350e-03,  4.71249384575856e-03,  4.66801449265830e-03,\n                                                4.60833271842631e-03,  4.53075169139083e-03,  4.43276994693775e-03,  4.31228808432849e-03,\n                                                4.16782825656270e-03,  3.99874607078488e-03,  3.80540968158272e-03,  3.58931896272452e-03,\n                                                3.35314013813104e-03,  3.10063894804102e-03,  2.83650791237733e-03,  2.56609860080914e-03,\n                                                2.29508478436458e-03,  2.02909328061196e-03,  1.77334357093173e-03,  1.53233445699641e-03,\n                                                1.30960809461556e-03,  1.10761161554507e-03,  9.27665857474835e-04,  7.70038677131879e-04,\n                                                6.34105390496131e-04,  5.18562728252903e-04,  4.21652499966285e-04,  3.41356039307072e-04,\n                                                2.75542428589404e-04,  2.22080658616619e-04,  1.78937923095646e-04,  1.44271756177261e-04,\n                                                1.16495493848845e-04,  9.42853964147616e-05,  7.65235423472177e-05,  6.22174158664279e-05,\n                                                5.04614225178557e-05,  4.04753716622963e-05,  3.16891587317514e-05,  2.38021553826684e-05,\n                                                1.67659721839186e-05,  1.06920546301126e-05,  5.71906917201659e-06,  1.82225111444723e-06,\n                                                1.44655011524719e-06,  1.57656127441896e-06,  7.98955696268422e-07,  6.66061019671815e-07,\n                                                1.10761218508060e-06,  1.08610227300687e-06,  7.90731817801316e-07,  -1.42108547152020e-14,\n                                                4.03386138714268e-07,  6.34246603681277e-07,  6.96443912318045e-07,  6.60206509905947e-07,\n                                                5.69885727941255e-07,  4.57360322059230e-07,  -2.13162820728030e-14, -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {4.60000000000000e+01, 4.59999998331279e+01, 4.59999946731121e+01, 4.59999597131612e+01, 4.59998311954216e+01,\n                                                4.59994886046180e+01, 4.59987388038422e+01, 4.59973026573039e+01, 4.59948045976368e+01, 4.59907654911281e+01,\n                                                4.59845990397940e+01, 4.59756118443765e+01, 4.59630071496420e+01, 4.59458922168716e+01, 4.59232892310083e+01,\n                                                4.58941496591631e+01, 4.58573720301703e+01, 4.58118231832526e+01, 4.57563631011346e+01, 4.56898734468187e+01,\n                                                4.56112898047542e+01, 4.55196373372990e+01, 4.54140690882751e+01, 4.52939055301170e+01, 4.51586732537808e+01,\n                                                4.50081400893044e+01, 4.48423435933433e+01, 4.46616099021108e+01, 4.44665605076510e+01, 4.42581055474202e+01,\n                                                4.40374235580318e+01, 4.38059290967153e+01, 4.35652309050672e+01, 4.33170841399150e+01, 4.30633404831342e+01,\n                                                4.28058996536214e+01, 4.25466650930365e+01, 4.22875055811036e+01, 4.20302234828072e+01, 4.17765294355795e+01,\n                                                4.15280226758811e+01, 4.12861759217765e+01, 4.10523237346700e+01, 4.08276534917465e+01, 4.06131984045557e+01,\n                                                4.04098323223803e+01, 4.02182662944775e+01, 4.00390470021627e+01, 3.98725572116607e+01, 3.97190183651886e+01,\n                                                3.95784953532359e+01, 3.94509034255939e+01, 3.93360171234054e+01, 3.92334810593001e+01, 3.91428223380946e+01,\n                                                3.90634643912923e+01, 3.89947419873669e+01, 3.89359171699234e+01, 3.88861958629584e+01, 3.88447448649106e+01,\n                                                3.88107089317402e+01, 3.87832276263700e+01, 3.87614515910008e+01, 3.87445578839859e+01, 3.87317640178988e+01,\n                                                3.87223403433263e+01, 3.87156204460223e+01, 3.87110092644279e+01, 3.87079886899552e+01, 3.87061204822537e+01,\n                                                3.87050464131259e+01, 3.87044856420292e+01, 3.87042294187507e+01, 3.87041333001757e+01, 3.87041071535572e+01,\n                                                3.87041032943698e+01, 3.87041027661015e+01, 3.87040902901919e+01, 3.87040057641733e+01, 3.87036950391511e+01,\n                                                3.87028667723366e+01, 3.87010541916190e+01, 3.86975831162163e+01, 3.86915476175107e+01, 3.86817946075921e+01,\n                                                3.86669185246566e+01, 3.86452671272638e+01, 3.86149591916549e+01, 3.85739146045317e+01, 3.85198969378677e+01,\n                                                3.84505680711897e+01, 3.83635537929485e+01, 3.82565185858843e+01, 3.81272470183946e+01, 3.79737283745380e+01,\n                                                3.77942404178648e+01, 3.75874275700452e+01, 3.73523684023330e+01, 3.70886273746390e+01, 3.67962865084482e+01,\n                                                3.64759544676768e+01, 3.61287534190170e+01, 3.57562874779487e+01, 3.53605991598750e+01, 3.49441204926105e+01,\n                                                3.45096227771402e+01, 3.40601647314920e+01, 3.35990354606230e+01, 3.31296883445003e+01, 3.26556646017458e+01,\n                                                3.21805093276820e+01, 3.17076861488910e+01, 3.12404979496939e+01, 3.07820202177648e+01, 3.03350510999661e+01,\n                                                2.99020792692786e+01, 2.94852680841821e+01, 2.90864528221440e+01, 2.87071471340719e+01, 2.83485551250966e+01,\n                                                2.80115862788459e+01, 2.76968714442585e+01, 2.74047790122056e+01, 2.71354310650653e+01, 2.68887196483028e+01,\n                                                2.66643234368611e+01, 2.64617250380539e+01, 2.62802290739312e+01, 2.61189810829481e+01, 2.59769872051225e+01,\n                                                2.58531345722807e+01, 2.57462123051790e+01, 2.56549330066245e+01, 2.55779546204991e+01, 2.55139024926876e+01,\n                                                2.54613914194280e+01, 2.54190474049068e+01, 2.53855287800158e+01, 2.53595462670605e+01, 2.53398815203141e+01,\n                                                2.53254036383725e+01, 2.53150831382669e+01, 2.53080029077275e+01, 2.53033657123859e+01, 2.53004979273884e+01,\n                                                2.52988492832067e+01, 2.52979885561216e+01, 2.52975952859480e+01, 2.52974477572368e+01, 2.52974076258982e+01,\n                                                2.52974017025985e+01, 2.52974011403141e+01, 2.52973896766702e+01, 2.52973120089059e+01, 2.52970264956339e+01,\n                                                2.52962654347170e+01, 2.52945999356514e+01, 2.52914105514375e+01, 2.52858649544058e+01, 2.52769038590385e+01,\n                                                2.52632362940468e+01, 2.52433451889614e+01, 2.52155040456483e+01, 2.51778051894991e+01, 2.51281997188217e+01,\n                                                2.50645487831184e+01, 2.49846852245872e+01, 2.48864839340554e+01, 2.47679385448860e+01, 2.46272413769216e+01,\n                                                2.44628629199449e+01, 2.42736266874280e+01, 2.40587750449511e+01, 2.38180216829721e+01, 2.35515868187597e+01,\n                                                2.32602120462145e+01, 2.29451530796470e+01, 2.26081504837152e+01, 2.22513807063771e+01, 2.18773919101058e+01,\n                                                2.14890305413420e+01, 2.10893646269442e+01, 2.06816082721421e+01, 2.02690493820874e+01, 1.98549804258850e+01,\n                                                1.94426311642735e+01, 1.90351029527938e+01, 1.86353059195600e+01, 1.82459019841303e+01, 1.78692574887223e+01,\n                                                1.75074088389131e+01, 1.71620432057956e+01, 1.68344945304027e+01, 1.65257533323869e+01, 1.62364875484083e+01,\n                                                1.59670709850645e+01, 1.57176159454451e+01, 1.54880070299736e+01, 1.52779338236009e+01, 1.50869209756959e+01,\n                                                1.49143549151429e+01, 1.47595070374733e+01, 1.46215536214911e+01, 1.44995929856128e+01, 1.43926605065958e+01,\n                                                1.42997421311124e+01, 1.42197869482386e+01, 1.41517192867266e+01, 1.40944506757042e+01, 1.40468918751231e+01,\n                                                1.40079650516972e+01, 1.39766160529536e+01, 1.39518266206132e+01, 1.39326262886816e+01, 1.39181036353205e+01,\n                                                1.39074165047849e+01, 1.38998007900615e+01, 1.38945773709171e+01, 1.38911568367465e+01, 1.38890416875820e+01,\n                                                1.38878257961537e+01, 1.38871910229522e+01, 1.38869009970711e+01, 1.38867921995211e+01, 1.38867626040600e+01,\n                                                1.38867582358360e+01, 1.38867578470953e+01, 1.38867501946885e+01, 1.38866983486231e+01, 1.38865077587452e+01,\n                                                1.38859997294941e+01, 1.38848879878336e+01, 1.38827591297974e+01, 1.38790578418525e+01, 1.38730777605941e+01,\n                                                1.38639587890130e+01, 1.38506916126567e+01, 1.38321300324571e+01, 1.38070115289470e+01, 1.37739861736998e+01,\n                                                1.37316535949468e+01, 1.36786071866947e+01, 1.36134841459638e+01, 1.35350192774204e+01, 1.34420998909124e+01,\n                                                1.33338186292118e+01, 1.32095208058664e+01, 1.30688429053861e+01, 1.29117393689524e+01, 1.27384956707561e+01,\n                                                1.25497269151864e+01, 1.23463625939673e+01, 1.21296194936847e+01, 1.19009657536815e+01, 1.16620794829263e+01,\n                                                1.14148050056637e+01, 1.11611087696802e+01, 1.09030355142612e+01, 1.06426639784085e+01, 1.03820608543277e+01,\n                                                1.01232323361102e+01, 9.86807450589902e+00, 9.61832628422328e+00, 9.37553050513171e+00, 9.14100860806956e+00,\n                                                8.91585204467057e+00, 8.70092965625375e+00, 8.49690673184963e+00, 8.30426971853125e+00, 8.12335102069260e+00,\n                                                7.95435026853486e+00, 7.79735070781796e+00, 7.65233109503838e+00, 7.51917436557191e+00, 7.39767450281788e+00,\n                                                7.28754277431705e+00, 7.18841409432081e+00, 7.09985389711757e+00, 7.02136563642247e+00, 6.95239887095497e+00,\n                                                6.89235783000566e+00, 6.84061034154085e+00, 6.79649701916701e+00, 6.75934062151121e+00, 6.72845550560526e+00,\n                                                6.70315708947159e+00, 6.68277121852876e+00, 6.66664329945124e+00, 6.65414702948362e+00, 6.64469251537837e+00,\n                                                6.63773355027028e+00, 6.63277380406782e+00, 6.62937168691195e+00, 6.62714366761956e+00, 6.62576586948020e+00,\n                                                6.62497382210272e+00, 6.62456031642005e+00, 6.62437138555291e+00, 6.62430051159502e+00, 6.62428123221034e+00,\n                                                6.62427838661537e+00, 6.62427813505016e+00, 6.62427320175224e+00, 6.62423977799077e+00, 6.62411690957344e+00,\n                                                6.62378939413221e+00, 6.62307266833432e+00, 6.62170018195098e+00, 6.61931382108320e+00, 6.61545791329486e+00,\n                                                6.60957730997247e+00, 6.60101998766730e+00, 6.58904453001123e+00, 6.57283273402464e+00, 6.55150741996246e+00,\n                                                6.52415530734822e+00, 6.48985455362848e+00, 6.44770624715002e+00, 6.39686882393743e+00, 6.33659406740367e+00,\n                                                6.26626308541238e+00, 6.18542047211264e+00, 6.09380477663869e+00, 5.99137342864577e+00, 5.87832041117563e+00,\n                                                5.75508521753662e+00, 5.62235197584768e+00, 5.48103807562956e+00, 5.33227219339150e+00, 5.17736228813149e+00,\n                                                5.01775489470425e+00, 4.85498781249568e+00, 4.69063895789915e+00, 4.52627459354600e+00, 4.36340025716666e+00,\n                                                4.20341743792009e+00, 4.04758841605298e+00, 3.89701079509089e+00, 3.75260226354175e+00, 3.61509518210016e+00,\n                                                3.48503983032326e+00, 3.36281463927180e+00, 3.24864150164194e+00, 3.14260425846155e+00, 3.04466865161584e+00,\n                                                2.95470233388524e+00, 2.87249387733569e+00, 2.79777006550730e+00, 2.73021106106540e+00, 2.66946329087058e+00,\n                                                2.61515007997143e+00, 2.56688019843393e+00, 2.52425456836409e+00, 2.48687142272294e+00, 2.45433022203517e+00,\n                                                2.42623462796260e+00, 2.40219481034058e+00, 2.38182933138007e+00, 2.36476681068762e+00, 2.35064752996735e+00,\n                                                2.33912508864393e+00, 2.32986817292515e+00, 2.32256245285810e+00, 2.31691257681314e+00, 2.31264419287076e+00,\n                                                2.30950589418553e+00, 2.30727096278189e+00, 2.30573877514072e+00, 2.30473573430935e+00, 2.30411560703796e+00,\n                                                2.30375916940685e+00, 2.30357309829616e+00, 2.30348808576743e+00, 2.30345619542542e+00, 2.30344752055397e+00,\n                                                2.30344624016384e+00, 2.30344612522086e+00, 2.30344385134769e+00, 2.30342844559062e+00, 2.30337181341895e+00,\n                                                2.30322086068445e+00, 2.30289054410961e+00, 2.30225810080564e+00, 2.30115875349777e+00, 2.29938319564652e+00,\n                                                2.29667716525126e+00, 2.29274340885444e+00, 2.28724630672050e+00, 2.27981936398399e+00, 2.27007565964462e+00,\n                                                2.25762117859063e+00, 2.24207073148586e+00, 2.22306590354732e+00, 2.20029418810096e+00, 2.17350818839788e+00,\n                                                2.14254355476751e+00, 2.10733421042661e+00, 2.06792344957226e+00, 2.02446969192057e+00, 1.97724605024231e+00,\n                                                1.92663338311872e+00, 1.87310710571974e+00, 1.81721863644906e+00, 1.75957287859574e+00, 1.70080349547544e+00,\n                                                1.64154788335561e+00, 1.58242366452448e+00, 1.52400823812366e+00, 1.46682249548789e+00, 1.41131930412952e+00,\n                                                1.35787686607972e+00, 1.30679662543185e+00, 1.25830507858617e+00, 1.21255864662403e+00, 1.16965069844425e+00,\n                                                1.12961984583741e+00, 1.09245873878448e+00, 1.05812274001874e+00, 1.02653802434385e+00, 9.97608808536249e-01,\n                                                9.71223557381769e-01, 9.47260122994990e-01, 9.25589856235916e-01, 9.06080782941132e-01, 8.88599968288553e-01,\n                                                8.73015205254276e-01, 8.59196163019483e-01, 8.47015122845775e-01, 8.36347415887879e-01, 8.27071662170802e-01,\n                                                8.19069894154573e-01, 8.12227632853556e-01, 8.06433969768413e-01, 8.01581693996994e-01, 7.97567490730124e-01,\n                                                7.94292224798276e-01, 7.91661310980324e-01, 7.89585161522368e-01, 7.87979691008566e-01, 7.86766849798035e-01,\n                                                7.85875150207787e-01, 7.85240145021419e-01, 7.84804816195802e-01, 7.84519833108682e-01, 7.84343644365379e-01,\n                                                7.84242374787013e-01, 7.84189509162324e-01, 7.84165355842184e-01, 7.84156295327726e-01, 7.84153830669794e-01,\n                                                7.84153466892228e-01, 7.84153433358433e-01, 7.84152760205188e-01, 7.84148199514554e-01, 7.84131434257610e-01,\n                                                7.84086746728825e-01, 7.83988961802791e-01, 7.83801740382870e-01, 7.83476312169235e-01, 7.82950739766406e-01,\n                                                7.82149808064354e-01, 7.80985630779888e-01, 7.79359056199013e-01, 7.77161932345614e-01, 7.74280254298176e-01,\n                                                7.70598160982068e-01, 7.66002675998273e-01, 7.60389001258645e-01, 7.53666082209399e-01, 7.45762082304587e-01,\n                                                7.36629347967899e-01, 7.26248429353078e-01, 7.14630758785979e-01, 7.01819682157186e-01, 6.87889682528734e-01,\n                                                6.72943812511392e-01, 6.57109536521759e-01, 6.40533346181364e-01, 6.23374625241006e-01, 6.05799287151413e-01,\n                                                5.87973684628459e-01, 5.70059205784588e-01, 5.52207845628843e-01, 5.34558899994884e-01, 5.17236795217414e-01,\n                                                5.00349959255090e-01, 4.83990568188837e-01, 4.68234967446683e-01, 4.53144564532600e-01, 4.38767010552610e-01,\n                                                4.25137521558334e-01, 4.12280228912728e-01, 4.00209484071894e-01, 3.88931073517568e-01, 3.78443322526678e-01,\n                                                3.68738082177856e-01, 3.59801603630352e-01, 3.51615308838191e-01, 3.44156469030644e-01, 3.37398802782978e-01,\n                                                3.31313005235167e-01, 3.25867219550098e-01, 3.21027461295742e-01, 3.16758006131018e-01, 3.13021750880786e-01,\n                                                3.09780557646178e-01, 3.06995589847560e-01, 3.04627647907807e-01, 3.02637510574229e-01, 3.00986285638075e-01,\n                                                2.99635771103908e-01, 2.98548824816358e-01, 2.97689737364934e-01, 2.97024599997137e-01, 2.96521656543632e-01,\n                                                2.96151626263345e-01, 2.95887983284828e-01, 2.95707178130385e-01, 2.95588787747313e-01, 2.95515582525297e-01,\n                                                2.95473501825164e-01, 2.95451533367171e-01, 2.95441496130557e-01, 2.95437730870503e-01, 2.95436706633559e-01,\n                                                2.95436555458529e-01, 2.95436541051707e-01, 2.95436246739314e-01, 2.95434252736122e-01, 2.95426922666046e-01,\n                                                2.95407384132368e-01, 2.95364628293797e-01, 2.95282760169997e-01, 2.95140435928182e-01, 2.94910523153291e-01,\n                                                2.94560019413922e-01, 2.94050262416015e-01, 2.93337460546695e-01, 2.92373564430449e-01, 2.91107487167324e-01,\n                                                2.89486662574184e-01, 2.87458907151503e-01, 2.84974523879690e-01, 2.81988556765832e-01, 2.78463077928215e-01,\n                                                2.74369368282137e-01, 2.69689842950001e-01, 2.64419576795923e-01, 2.58567305517438e-01, 2.52155812510530e-01,\n                                                2.45221657622345e-01, 2.37814255241751e-01, 2.29994359371076e-01, 2.21832056263203e-01, 2.13404396418603e-01,\n                                                2.04792815010165e-01, 1.96080493172069e-01, 1.87349803785480e-01, 1.78679967075091e-01, 1.70145016404696e-01,\n                                                1.61812145865653e-01, 1.53740481031434e-01, 1.45980284757940e-01, 1.38572583044819e-01, 1.31549173346279e-01,\n                                                1.24932960536022e-01, 1.18738554682075e-01, 1.12973059968589e-01, 1.07636985016903e-01, 1.02725210509519e-01,\n                                                9.82279590792672e-02, 9.41317234598671e-02, 9.04201205775976e-02, 8.70746505347455e-02, 8.40753495441859e-02,\n                                                8.14013343717832e-02, 7.90312425297870e-02, 7.69435773347666e-02, 7.51169701374508e-02, 7.35303737790787e-02,\n                                                7.21632018922165e-02, 7.09954282913756e-02, 7.00076596013162e-02, 6.91811926172647e-02, 6.84980658200445e-02,\n                                                6.79411121050393e-02, 6.74940172496221e-02, 6.71413860643781e-02, 6.68688156874921e-02, 6.66629732286452e-02,\n                                                6.65116730937072e-02, 6.64039479508816e-02, 6.63301065366539e-02, 6.62817714020676e-02, 6.62518902657609e-02,\n                                                6.62347158117740e-02, 6.62257504265682e-02, 6.62216543483041e-02, 6.62201178132733e-02, 6.62196998427760e-02,\n                                                6.62196381513596e-02, 6.62196320452821e-02, 6.62195049249590e-02, 6.62186436713981e-02, 6.62154776917419e-02,\n                                                6.62070389634835e-02, 6.61885741136530e-02, 6.61532235960252e-02, 6.60917859064440e-02, 6.59925859607640e-02,\n                                                6.58414678051145e-02, 6.56219320513074e-02, 6.53154369544993e-02, 6.49018779270421e-02, 6.43602526552201e-02,\n                                                6.36695073100100e-02, 6.28095436332785e-02, 6.17623477331719e-02, 6.05131809667299e-02, 5.90517539706212e-02,\n                                                5.73732900540378e-02, 5.54793773260229e-02, 5.33785131357689e-02, 5.10862614268675e-02, 4.86249732566435e-02,\n                                                4.60230604840675e-02, 4.33138577408201e-02, 4.05341519636764e-02, 3.77224952384623e-02, 3.49174396493765e-02,\n                                                3.21558385571024e-02, 2.94713465256251e-02, 2.68932223836273e-02, 2.44455016073175e-02, 2.21465617360082e-02,\n                                                2.00090643035651e-02, 1.80402239920454e-02, 1.62423336004949e-02, 1.46134630033359e-02, 1.31482506872160e-02,\n                                                1.18387154674551e-02, 1.06750305639878e-02, 9.64621913698238e-03, 8.74074684644910e-03, 7.94700112663804e-03,\n                                                7.25365785363863e-03, 6.64994392322882e-03, 6.12580926018325e-03, 5.67202425931868e-03, 5.28021894781716e-03,\n                                                4.94287879774191e-03, 4.65330986509827e-03, 4.40558354431175e-03, 4.19446915292809e-03, 4.01536086815213e-03,\n                                                3.86420407387078e-03, 3.73742481684047e-03, 3.63186482452704e-03, 3.54472350483803e-03, 3.47350759820131e-03,\n                                                3.41598866486237e-03, 3.37016827372594e-03, 3.33425051515235e-03, 3.30662122787118e-03, 3.28583309789821e-03,\n                                                3.27059557267972e-03, 3.25976836590769e-03, 3.25235723114758e-03, 3.24751067006446e-03, 3.24451631899336e-03,\n                                                3.24279592081211e-03, 3.24189802419284e-03, 3.24148783773381e-03, 3.24133397395343e-03, 3.24129212033597e-03,\n                                                3.24128594286321e-03, 3.24128530566981e-03, 3.24127177990619e-03, 3.24118014225405e-03, 3.24084329293584e-03,\n                                                3.23994553289708e-03, 3.23798160109590e-03, 3.23422347808133e-03, 3.22769757769237e-03, 3.21717546692923e-03,\n                                                3.20118174573025e-03, 3.17802298904013e-03, 3.14584144562957e-03, 3.10269621981263e-03, 3.04667268490988e-03,\n                                                2.97601776123457e-03, 2.88929452641895e-03, 2.78554481421622e-03, 2.66444376364916e-03, 2.52642677861559e-03,\n                                                2.37276826720745e-03, 2.20559390326969e-03, 2.02781449726785e-03, 1.84297949131462e-03, 1.65506014931793e-03,\n                                                1.46818433386642e-03, 1.28635359697427e-03, 1.11317683367673e-03, 9.51651881848647e-04, 8.04017874813212e-04,\n                                                6.71689148191490e-04, 5.55269104786760e-04, 4.54632223792828e-04, 3.69055560561549e-04, 2.97377509369312e-04,\n                                                2.38160891989025e-04, 1.89839934641611e-04, 1.50837186602359e-04, 1.19646239504334e-04, 9.48854692879308e-05,\n                                                7.53315750472439e-05, 5.99373809606618e-05, 4.78313520204665e-05, 3.82958293627667e-05, 3.07311239353680e-05,\n                                                2.46253042206490e-05, 1.95493242856060e-05, 1.51776616164057e-05, 1.13114977366990e-05, 7.87751686459615e-06,\n                                                4.89151935312293e-06, 2.38768500082642e-06, 1.42108547152020e-14, 1.20191606356457e-06, 1.13312490412909e-06,\n                                                6.99731522502134e-07, 1.42108547152020e-14, 4.44426284218480e-07, 4.54537030236679e-07, 7.10542735760100e-15,\n                                                7.10542735760100e-15, 7.10542735760100e-15, 4.58992566620964e-07, 4.71009926172883e-07, 4.33402497890256e-07,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 7.10542735760100e-15, 7.10542735760100e-15, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {4.70000000000000e+01,  4.69999998279027e+01,  4.69999945063117e+01,  4.69999584516625e+01,\n                                                4.69998259096489e+01,  4.69994725912492e+01,  4.69986993115684e+01,  4.69972181931393e+01,\n                                                4.69946419051838e+01,  4.69904763026605e+01,  4.69841167108031e+01,  4.69748479825828e+01,\n                                                4.69618483513009e+01,  4.69441970230853e+01,  4.69208854179037e+01,  4.68908319806291e+01,\n                                                4.68529005422757e+01,  4.68059222958250e+01,  4.67487215218655e+01,  4.66801452006206e+01,\n                                                4.65990965162171e+01,  4.65045719448723e+01,  4.63957011036637e+01,  4.62717878584293e+01,\n                                                4.61323504513194e+01,  4.59771577705970e+01,  4.58062585329506e+01,  4.56200002433738e+01,\n                                                4.54190354230875e+01,  4.52043137173910e+01,  4.49770599510467e+01,  4.47387397301690e+01,\n                                                4.44910155039899e+01,  4.42356968475319e+01,  4.39746889658199e+01,  4.37099430519058e+01,\n                                                4.34434112873523e+01,  4.31770081750563e+01,  4.29125787840297e+01,  4.26518735694634e+01,\n                                                4.23965288346508e+01,  4.21480516559562e+01,  4.19078081485266e+01,  4.16770142079426e+01,\n                                                4.14567282045496e+01,  4.12478454307613e+01,  4.10510943394778e+01,  4.08670347367648e+01,\n                                                4.06960581119057e+01,  4.05383902329298e+01,  4.03940960432556e+01,  4.02630867981269e+01,\n                                                4.01451292994817e+01,  4.00398570333792e+01,  3.99467829834860e+01,  3.98653138799803e+01,\n                                                3.97947656366437e+01,  3.97343797223978e+01,  3.96833402025149e+01,  3.96407911677035e+01,\n                                                3.96058542473392e+01,  3.95776458791708e+01,  3.95552939857719e+01,  3.95379536920478e+01,\n                                                3.95248217122059e+01,  3.95151490421002e+01,  3.95082516160705e+01,  3.95035186274381e+01,\n                                                3.95004182684124e+01,  3.94985007166787e+01,  3.94973982794804e+01,  3.94968226976503e+01,\n                                                3.94965597072153e+01,  3.94964610500447e+01,  3.94964342128664e+01,  3.94964302517538e+01,\n                                                3.94964297095334e+01,  3.94964169041221e+01,  3.94963301456853e+01,  3.94960112141296e+01,\n                                                3.94951610722592e+01,  3.94933006213054e+01,  3.94897378793581e+01,  3.94835430051906e+01,\n                                                3.94735324918750e+01,  3.94582637341774e+01,  3.94360410133489e+01,  3.94049337197822e+01,\n                                                3.93628073237189e+01,  3.93073671856324e+01,  3.92362147587211e+01,  3.91469150777347e+01,\n                                                3.90370736701613e+01,  3.89044202043610e+01,  3.87468953564941e+01,  3.85627365999168e+01,\n                                                3.83505579854275e+01,  3.81094186261491e+01,  3.78388747519417e+01,  3.75390111676932e+01,\n                                                3.72104500101564e+01,  3.68543377692862e+01,  3.64723148384392e+01,  3.60664739269373e+01,\n                                                3.56393131593133e+01,  3.51936865446672e+01,  3.47327504493249e+01,  3.42599022478792e+01,\n                                                3.37787079750532e+01,  3.32928191089639e+01,  3.28058827167365e+01,  3.23214521160649e+01,\n                                                3.18429058860725e+01,  3.13733815580207e+01,  3.09157274589666e+01,  3.04724730344028e+01,\n                                                3.00458154179583e+01,  2.96376185252835e+01,  2.92494205834006e+01,  2.88824465159718e+01,\n                                                2.85376225951712e+01,  2.82155918563388e+01,  2.79167296749167e+01,  2.76411594940368e+01,\n                                                2.73887689623942e+01,  2.71592267748497e+01,  2.69520004106012e+01,  2.67663748306841e+01,\n                                                2.66014720880203e+01,  2.64562717417713e+01,  2.63296319482254e+01,  2.62203111040227e+01,\n                                                2.61269899234070e+01,  2.60482938238608e+01,  2.59828154661556e+01,  2.59291372451052e+01,\n                                                2.58858534612431e+01,  2.58515918297867e+01,  2.58250339117067e+01,  2.58049339927363e+01,\n                                                2.57901358989320e+01,  2.57795872291942e+01,  2.57723505106071e+01,  2.57676108430878e+01,\n                                                2.57646796939115e+01,  2.57629946253617e+01,  2.57621148825598e+01,  2.57617129241962e+01,\n                                                2.57615621362850e+01,  2.57615211183689e+01,  2.57615150642123e+01,  2.57615144895059e+01,\n                                                2.57615027726086e+01,  2.57614233890199e+01,  2.57611315682699e+01,  2.57603536945001e+01,\n                                                2.57586514037981e+01,  2.57553915702403e+01,  2.57497234957625e+01,  2.57405645370714e+01,\n                                                2.57265953012196e+01,  2.57062654027312e+01,  2.56778105768662e+01,  2.56392816619044e+01,\n                                                2.55885855776229e+01,  2.55235379255864e+01,  2.54419262219561e+01,  2.53415820665786e+01,\n                                                2.52204597953922e+01,  2.50767184183558e+01,  2.49088029877561e+01,  2.47155210536416e+01,\n                                                2.44961096254421e+01,  2.42502881507661e+01,  2.39782935248137e+01,  2.36808941378627e+01,\n                                                2.33593815055505e+01,  2.30155400511329e+01,  2.26515978472217e+01,  2.22701630352362e+01,\n                                                2.18741515526687e+01,  2.14667112730659e+01,  2.10511458860951e+01,  2.06308396853146e+01,\n                                                2.02091830065329e+01,  1.97894980590101e+01,  1.93749661755524e+01,  1.89685592603389e+01,\n                                                1.85729794720380e+01,  1.81906113322459e+01,  1.78234894325709e+01,  1.74732831085514e+01,\n                                                1.71412974254858e+01,  1.68284880983255e+01,  1.65354868671956e+01,  1.62626334642097e+01,\n                                                1.60100105435338e+01,  1.57774786078028e+01,  1.55647088270863e+01,  1.53712125203069e+01,\n                                                1.51963668224219e+01,  1.50394366276601e+01,  1.48995932669088e+01,  1.47759305683616e+01,\n                                                1.46674790042984e+01,  1.45732185860669e+01,  1.44920910712316e+01,  1.44230119196185e+01,\n                                                1.43648822973862e+01,  1.43166012915853e+01,  1.42770783680851e+01,  1.42452459867850e+01,\n                                                1.42200721822779e+01,  1.42005728283854e+01,  1.41858232345475e+01,  1.41749686745965e+01,\n                                                1.41672334274578e+01,  1.41619279173524e+01,  1.41584535790510e+01,  1.41563051404032e+01,\n                                                1.41550701060640e+01,  1.41544253371548e+01,  1.41541307438366e+01,  1.41540202328321e+01,\n                                                1.41539901712651e+01,  1.41539857342446e+01,  1.41539853393815e+01,  1.41539775664545e+01,\n                                                1.41539249038443e+01,  1.41537313122145e+01,  1.41532152810370e+01,  1.41520860255386e+01,\n                                                1.41499236194384e+01,  1.41461639692977e+01,  1.41400895004979e+01,  1.41308263760385e+01,\n                                                1.41173489906209e+01,  1.40984923520843e+01,  1.40729727565472e+01,  1.40394168615960e+01,\n                                                1.39963988509421e+01,  1.39424848663550e+01,  1.38762832815507e+01,  1.37964987565465e+01,\n                                                1.37019874142553e+01,  1.35918100193526e+01,  1.34652798173891e+01,  1.33220018040672e+01,\n                                                1.31619006989273e+01,  1.29852357892938e+01,  1.27926019984173e+01,  1.25849178327649e+01,\n                                                1.23634020196513e+01,  1.21295413773687e+01,  1.18850525455141e+01,  1.16318395843794e+01,\n                                                1.13719483203723e+01,  1.11075171419806e+01,  1.08407234061840e+01,  1.05737253123696e+01,\n                                                1.03086012027912e+01,  1.00472911018262e+01,  9.79154745320980e+00,  9.54290187156986e+00,\n                                                9.30265170107604e+00,  9.07186536338890e+00,  8.85140112503218e+00,  8.64193193778236e+00,\n                                                8.44396981917023e+00,  8.25788580907236e+00,  8.08392435307766e+00,  7.92221296677155e+00,\n                                                7.77276892473054e+00,  7.63550472806651e+00,  7.51023364890388e+00,  7.39667608036441e+00,\n                                                7.29446694122101e+00,  7.20316407002551e+00,  7.12225738827360e+00,  7.05117857454177e+00,\n                                                6.98931102336159e+00,  6.93599992325128e+00,  6.89056234928425e+00,  6.85229731006878e+00,\n                                                6.82049570973895e+00,  6.79445018199409e+00,  6.77346472931859e+00,  6.75686406278200e+00,\n                                                6.74400249396634e+00,  6.73427218839419e+00,  6.72711055642053e+00,  6.72200653862733e+00,\n                                                6.71850554222288e+00,  6.71621280458808e+00,  6.71479499954259e+00,  6.71397995869105e+00,\n                                                6.71355445023683e+00,  6.71336003563690e+00,  6.71328710461154e+00,  6.71326726566124e+00,\n                                                6.71326433747580e+00,  6.71326407860915e+00,  6.71325900212744e+00,  6.71322460828016e+00,\n                                                6.71309817380676e+00,  6.71276115319944e+00,  6.71202362877634e+00,  6.71061132280028e+00,\n                                                6.70815575374179e+00,  6.70418809044723e+00,  6.69813722183216e+00,  6.68933250707909e+00,\n                                                6.67701159118919e+00,  6.66033355157963e+00,  6.63839747339797e+00,  6.61026632878668e+00,\n                                                6.57499575971775e+00,  6.53166704520163e+00,  6.47942319106723e+00,  6.41750674183861e+00,\n                                                6.34529761241912e+00,  6.26234900579330e+00,  6.16841935093407e+00,  6.06349818427046e+00,\n                                                5.94782402260306e+00,  5.82189254462624e+00,  5.68645381977547e+00,  5.54249790174542e+00,\n                                                5.39122883379707e+00,  5.23402796336197e+00,  5.07240836604388e+00,  4.90796302460524e+00,\n                                                4.74231006142174e+00,  4.57703865333443e+00,  4.41365918054480e+00,  4.25356066605934e+00,\n                                                4.09797772318210e+00,  3.94796818676940e+00,  3.80440153107370e+00,  3.66795723294452e+00,\n                                                3.53913153820294e+00,  3.41825068329481e+00,  3.30548850602494e+00,  3.20088649631017e+00,\n                                                3.10437461590413e+00,  3.01579157787801e+00,  2.93490365689001e+00,  2.86142145319980e+00,\n                                                2.79501432979035e+00,  2.73532247214746e+00,  2.68196668524615e+00,  2.63455615003302e+00,\n                                                2.59269442308027e+00,  2.55598398928177e+00,  2.52402967831532e+00,  2.49644123896789e+00,\n                                                2.47283533710879e+00,  2.45283720710467e+00,  2.43608214545936e+00,  2.42221699122563e+00,\n                                                2.41090169166140e+00,  2.40181100501972e+00,  2.39463634680531e+00,  2.38908774314278e+00,\n                                                2.38489581721121e+00,  2.38181370426683e+00,  2.37961876972470e+00,  2.37811399478937e+00,\n                                                2.37712889614806e+00,  2.37651986021533e+00,  2.37616979720254e+00,  2.37598705369458e+00,\n                                                2.37590356145569e+00,  2.37587224140756e+00,  2.37586372166805e+00,  2.37586246417499e+00,\n                                                2.37586235128754e+00,  2.37586011807780e+00,  2.37584498781982e+00,  2.37578936838813e+00,\n                                                2.37564111506298e+00,  2.37531670514814e+00,  2.37469557023404e+00,  2.37361587712775e+00,\n                                                2.37187205562199e+00,  2.36921437550001e+00,  2.36535086765920e+00,  2.35995185374259e+00,\n                                                2.35265728301094e+00,  2.34308696344430e+00,  2.33085360937630e+00,  2.31557841068034e+00,\n                                                2.29690856909690e+00,  2.27453596812884e+00,  2.24821587830565e+00,  2.21778439271892e+00,\n                                                2.18317318456706e+00,  2.14442021897566e+00,  2.10167525933860e+00,  2.05519938240798e+00,\n                                                2.00535822469229e+00,  1.95260926499348e+00,  1.89748402385054e+00,  1.84056654515538e+00,\n                                                1.78246984604070e+00,  1.72381213445302e+00,  1.66519449291610e+00,  1.60718144192337e+00,\n                                                1.55028538494904e+00,  1.49495547029251e+00,  1.44157095187030e+00,  1.39043874645319e+00,\n                                                1.34179460264785e+00,  1.29580712920325e+00,  1.25258387052907e+00,  1.21217864643972e+00,\n                                                1.17459946542855e+00,  1.13981644967605e+00,  1.10776935207333e+00,  1.07837438279933e+00,\n                                                1.05153018360178e+00,  1.02712288579463e+00,  1.00503026156295e+00,  9.85125029068662e-01,\n                                                9.67277403466234e-01,  9.51357002340224e-01,  9.37234219264042e-01,  9.24781176631733e-01,\n                                                9.13872361403754e-01,  9.04385036975320e-01,  8.96199512410639e-01,  8.89199337642637e-01,\n                                                8.83271480381410e-01,  8.78306527613418e-01,  8.74198941786972e-01,  8.70847389127938e-01,\n                                                8.68155145132199e-01,  8.66030570379749e-01,  8.64387638788017e-01,  8.63146490778924e-01,\n                                                8.62233976158457e-01,  8.61584146386761e-01,  8.61138653836178e-01,  8.60847016888918e-01,\n                                                8.60666714333526e-01,  8.60563080185337e-01,  8.60508980176725e-01,  8.60484262887148e-01,\n                                                8.60474990813238e-01,  8.60472468606488e-01,  8.60472096334860e-01,  8.60472062018061e-01,\n                                                8.60471373146936e-01,  8.60466705965855e-01,  8.60449549245892e-01,  8.60403818275088e-01,\n                                                8.60303750079176e-01,  8.60112156988230e-01,  8.59779129736673e-01,  8.59241284244526e-01,\n                                                8.58421648218766e-01,  8.57230281714287e-01,  8.55565715934603e-01,  8.53317272624416e-01,\n                                                8.50368288653385e-01,  8.46600214558023e-01,  8.41897482327255e-01,  8.36152950792624e-01,\n                                                8.29273645243013e-01,  8.21186424167557e-01,  8.11843146001543e-01,  8.01224888240554e-01,\n                                                7.89344802687708e-01,  7.76249279088276e-01,  7.62017230123661e-01,  7.46757488014858e-01,\n                                                7.30604492312196e-01,  7.13712621024705e-01,  6.96249646077959e-01,  6.78389859933219e-01,\n                                                6.60307415600926e-01,  6.42170352617732e-01,  6.24135662950152e-01,  6.06345605746320e-01,\n                                                5.88925332087101e-01,  5.71981750720205e-01,  5.55603467143499e-01,  5.39861567804465e-01,\n                                                5.24810998144837e-01,  5.10492292048120e-01,  4.96933442173848e-01,  4.84151745966628e-01,\n                                                4.72155511858844e-01,  4.60945557280546e-01,  4.50516469878906e-01,  4.40857633534819e-01,\n                                                4.31954041019331e-01,  4.23786926515596e-01,  4.16334255577695e-01,  4.09571109475330e-01,\n                                                4.03469997218210e-01,  3.98001123431996e-01,  3.93132634784230e-01,  3.88830862513011e-01,\n                                                3.85060574106404e-01,  3.81785243369961e-01,  3.78967344894583e-01,  3.76568676117707e-01,\n                                                3.74550707570123e-01,  3.72874959377540e-01,  3.71503399561114e-01,  3.70398857157667e-01,\n                                                3.69525440735075e-01,  3.68848950648804e-01,  3.68337271553415e-01,  3.67960730442036e-01,\n                                                3.67692405018019e-01,  3.67508367643595e-01,  3.67387851528839e-01,  3.67313328202869e-01,\n                                                3.67270488538828e-01,  3.67248123489404e-01,  3.67237904968363e-01,  3.67234071689538e-01,\n                                                3.67233028948661e-01,  3.67232875042433e-01,  3.67232860375339e-01,  3.67232560745755e-01,\n                                                3.67230530716668e-01,  3.67223068195329e-01,  3.67203176470404e-01,  3.67159647047949e-01,\n                                                3.67076294990348e-01,  3.66931382573206e-01,  3.66697266191473e-01,  3.66340300059072e-01,\n                                                3.65821027562028e-01,  3.65094686120486e-01,  3.64112042986200e-01,  3.62820566586315e-01,\n                                                3.61165920301552e-01,  3.59093743184310e-01,  3.56551656395808e-01,  3.53491407600899e-01,\n                                                3.49871041842917e-01,  3.45656970803113e-01,  3.40825806916740e-01,  3.35365837421222e-01,\n                                                3.29278036646862e-01,  3.22576550484129e-01,  3.15288630003728e-01,  3.07454034943092e-01,\n                                                2.99123965346325e-01,  2.90359605846604e-01,  2.81230379699565e-01,  2.71812009887370e-01,\n                                                2.62184476267095e-01,  2.52429945830627e-01,  2.42630742056299e-01,  2.32867411511940e-01,\n                                                2.23216941368783e-01,  2.13751178447190e-01,  2.04535496152332e-01,  1.95627747880010e-01,\n                                                1.87077533159105e-01,  1.78925786502553e-01,  1.71204680517640e-01,  1.63937816791446e-01,\n                                                1.57140662864364e-01,  1.50821183035085e-01,  1.44980605663761e-01,  1.39614269966920e-01,\n                                                1.34712500186566e-01,  1.30261463183508e-01,  1.26243975529590e-01,  1.22640236742576e-01,\n                                                1.19428475369560e-01,  1.16585503445854e-01,  1.14087182016910e-01,  1.11908805744143e-01,\n                                                1.10025418147963e-01,  1.08412070914085e-01,  1.07044041113163e-01,  1.05897019398064e-01,\n                                                1.04947280492276e-01,  1.04171844814168e-01,  1.03548637140015e-01,  1.03056645038798e-01,\n                                                1.02676076660956e-01,  1.02388514569064e-01,  1.02177059886195e-01,  1.02026459293889e-01,\n                                                1.01923206476165e-01,  1.01855609545723e-01,  1.01813816796451e-01,  1.01789794710662e-01,\n                                                1.01777254349940e-01,  1.01771524859892e-01,  1.01769375579615e-01,  1.01768790927913e-01,\n                                                1.01768704634715e-01,  1.01768696093629e-01,  1.01768518279265e-01,  1.01767313566796e-01,\n                                                1.01762885006771e-01,  1.01751080785981e-01,  1.01725251060365e-01,  1.01675797543606e-01,\n                                                1.01589839692416e-01,  1.01451022290632e-01,  1.01239490006328e-01,  1.00932054323046e-01,\n                                                1.00502576168388e-01,  9.99225825457444e-02,  9.91621265828613e-02,  9.81908870283448e-02,\n                                                9.69794852860062e-02,  9.55009762832830e-02,  9.37324454403310e-02,  9.16566202967957e-02,\n                                                8.92633852969453e-02,  8.65510755807009e-02,  8.35274239889969e-02,  8.02100476403567e-02,\n                                                7.66263875919080e-02,  7.28130563299700e-02,  6.88145997467373e-02,  6.46817371166293e-02,\n                                                6.04691969656201e-02,  5.62333106597706e-02,  5.20295519903797e-02,  4.79102153974154e-02,\n                                                4.39224067005028e-02,  4.01064811995013e-02,  3.64950111070925e-02,  3.31123059366618e-02,\n                                                2.99744544603087e-02,  2.70898124893151e-02,  2.44598316220888e-02,  2.20801116569191e-02,\n                                                1.99415620932015e-02,  1.80315725186730e-02,  1.63351132286564e-02,  1.48357117239257e-02,\n                                                1.35162741405352e-02,  1.23597406864846e-02,  1.13495795140324e-02,  1.04701338873667e-02,\n                                                9.70684347321793e-03,  9.04636293859085e-03,  8.47660076281898e-03,  7.98669919278439e-03,\n                                                7.56697337790513e-03,  7.20882451528126e-03,  6.90463872172842e-03,  6.64768056039122e-03,\n                                                6.43198778760734e-03,  6.25227196060507e-03,  6.10382802070575e-03,  5.98245477210924e-03,\n                                                5.88438724059159e-03,  5.80624114676453e-03,  5.74496911126232e-03,  5.69782768263849e-03,\n                                                5.66235382988367e-03,  5.63634916895950e-03,  5.61786991462299e-03,  5.60522038602329e-03,\n                                                5.59694786791454e-03,  5.59183674987906e-03,  5.58890013052604e-03,  5.58736746265254e-03,\n                                                5.58666729094881e-03,  5.58640465129656e-03,  5.58633320871138e-03,  5.58632266401560e-03,\n                                                5.58632157628836e-03,  5.58629848648451e-03,  5.58614205193209e-03,  5.58556701606960e-03,\n                                                5.58403444358646e-03,  5.58068177547000e-03,  5.57426610567546e-03,  5.56312511615431e-03,\n                                                5.54516096772062e-03,  5.51785326630494e-03,  5.47830767678192e-03,  5.42334641619391e-03,\n                                                5.34964525391501e-03,  5.25391836556821e-03,  5.13314720876679e-03,  4.98484265207111e-03,\n                                                4.80732154790076e-03,  4.59997104395171e-03,  4.36346794587195e-03,  4.09991839253365e-03,\n                                                3.81288674390134e-03,  3.50729278814299e-03,  3.18917255945905e-03,  2.86531789680566e-03,\n                                                2.54282957582319e-03,  2.22863403994467e-03,  1.92902077077406e-03,  1.64925441997354e-03,\n                                                1.39330369864865e-03,  1.16371050118147e-03,  9.61601626947584e-04,  7.86825413626957e-04,\n                                                6.38179668968064e-04,  5.13688095345799e-04,  4.10882014676872e-04,  3.27053018850165e-04,\n                                                2.59457322158596e-04,  2.05467912294921e-04,  1.62679688926914e-04,  1.28973686933875e-04,\n                                                1.02543653760279e-04,  8.18885880349285e-05,  6.57805220427576e-05,  5.32226890115339e-05,\n                                                4.34123596377844e-05,  3.57138103126431e-05,  2.96363019955947e-05,  2.48086525900248e-05,\n                                                2.09488398397184e-05,  1.78358291123004e-05,  1.52914260809212e-05,  1.31730798571539e-05,\n                                                1.13724327874820e-05,  9.81345198169947e-06,  8.44689601819937e-06,  7.24182275035901e-06,\n                                                6.17720758810947e-06,  5.23632544968677e-06,  4.40447227134655e-06,  3.66887658032056e-06,\n                                                3.01924585954794e-06,  2.44794873793808e-06,  1.94957793553385e-06,  1.52011016041342e-06,\n                                                1.15600785477454e-06,  8.53519800614322e-07,  6.08280970482156e-07,  4.15187059843447e-07,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14, -2.13162820728030e-14,\n                                                -2.13162820728030e-14, -2.13162820728030e-14, -2.13162820728030e-14}),\nmadness::CubicInterpolationTable<double>(grid, {4.80000000000000e+01, 4.79999998226485e+01, 4.79999943385885e+01, 4.79999571831846e+01, 4.79998205946331e+01,\n                                                4.79994564892841e+01, 4.79986596007791e+01, 4.79971332615490e+01, 4.79944783121388e+01, 4.79901855126679e+01,\n                                                4.79836317089151e+01, 4.79740798838181e+01, 4.79606831174587e+01, 4.79424924003279e+01, 4.79184682099450e+01,\n                                                4.78874957777533e+01, 4.78484040376704e+01, 4.77999883381036e+01, 4.77410370735710e+01, 4.76703623905205e+01,\n                                                4.75868349781024e+01, 4.74894226147329e+01, 4.73772315886259e+01, 4.72495493878702e+01, 4.71058862758973e+01,\n                                                4.69460127039028e+01, 4.67699891606459e+01, 4.65781851911666e+01, 4.63712850119619e+01, 4.61502783654904e+01,\n                                                4.59164368105261e+01, 4.56712772554183e+01, 4.54165158965180e+01, 4.51540165638908e+01, 4.48857376619808e+01,\n                                                4.46136814384492e+01, 4.43398483742445e+01, 4.40661983047094e+01, 4.37946187160685e+01, 4.35268997275066e+01,\n                                                4.32647146898872e+01, 4.30096051298527e+01, 4.27629688789997e+01, 4.25260505368516e+01, 4.22999337956383e+01,\n                                                4.20855354967780e+01, 4.18836015258391e+01, 4.16947047621125e+01, 4.15192452956706e+01, 4.13574530461790e+01,\n                                                4.12093928066808e+01, 4.10749716276519e+01, 4.09539483731795e+01, 4.08459452288622e+01, 4.07504609157255e+01,\n                                                4.06668853563382e+01, 4.05945155378559e+01, 4.05325723136599e+01, 4.04802178759280e+01, 4.04365736146796e+01,\n                                                4.04007380561572e+01, 4.03718045481956e+01, 4.03488783367693e+01, 4.03310926606953e+01, 4.03176234846676e+01,\n                                                4.03077024978665e+01, 4.03006280287053e+01, 4.02957735669765e+01, 4.02925936424665e+01, 4.02906268823192e+01,\n                                                4.02894961550635e+01, 4.02889058032432e+01, 4.02886360642707e+01, 4.02885348754895e+01, 4.02885073496517e+01,\n                                                4.02885032868944e+01, 4.02885027307602e+01, 4.02884895967538e+01, 4.02884006120419e+01, 4.02880734965364e+01,\n                                                4.02872015398222e+01, 4.02852933504660e+01, 4.02816391946846e+01, 4.02752853852461e+01, 4.02650180819261e+01,\n                                                4.02493577424468e+01, 4.02265652992123e+01, 4.01946609085701e+01, 4.01514558002941e+01, 4.00945973232032e+01,\n                                                4.00216267247841e+01, 3.99300485190104e+01, 3.98174095057066e+01, 3.96813846441706e+01, 3.95198661088370e+01,\n                                                3.93310510409592e+01, 3.91135228654261e+01, 3.88663207340379e+01, 3.85889919418702e+01, 3.82816233557713e+01,\n                                                3.79448501928815e+01, 3.75798436466712e+01, 3.71882819122798e+01, 3.67723106361488e+01, 3.63344976388204e+01,\n                                                3.58777833430383e+01, 3.54054246845399e+01, 3.49209287236039e+01, 3.44279737317068e+01, 3.39303193132895e+01,\n                                                3.34317111365238e+01, 3.29357882721733e+01, 3.24460011756181e+01, 3.19655462828106e+01, 3.14973199862028e+01,\n                                                3.10438915118054e+01, 3.06074917752253e+01, 3.01900140515091e+01, 2.97930222172736e+01, 2.94177630841879e+01,\n                                                2.90651804952642e+01, 2.87359299971389e+01, 2.84303937692083e+01, 2.81486959857798e+01, 2.78907189470548e+01,\n                                                2.76561202512955e+01, 2.74443511212013e+01, 2.72546758410551e+01, 2.70861921598892e+01, 2.69378524793453e+01,\n                                                2.68084856554247e+01, 2.66968192733430e+01, 2.66015022792468e+01, 2.65211278554607e+01, 2.64542564009341e+01,\n                                                2.63994384274185e+01, 2.63552371118153e+01, 2.63202501662050e+01, 2.62931306104810e+01, 2.62726059691497e+01,\n                                                2.62574953732616e+01, 2.62467240380570e+01, 2.62393346114206e+01, 2.62344949491599e+01, 2.62315019686090e+01,\n                                                2.62297813571108e+01, 2.62288830588333e+01, 2.62284726225814e+01, 2.62283186543640e+01, 2.62282767713315e+01,\n                                                2.62282705894856e+01, 2.62282700026581e+01, 2.62282580386377e+01, 2.62281769807598e+01, 2.62278790052215e+01,\n                                                2.62270847256319e+01, 2.62253465341683e+01, 2.62220179577514e+01, 2.62162303745196e+01, 2.62068783536280e+01,\n                                                2.61926147791446e+01, 2.61718567784198e+01, 2.61428032735228e+01, 2.61034646863665e+01, 2.60517049324457e+01,\n                                                2.59852953220172e+01, 2.59019793529505e+01, 2.57995466475099e+01, 2.56759134988302e+01, 2.55292067154808e+01,\n                                                2.53578467645156e+01, 2.51606257053806e+01, 2.49367751744941e+01, 2.46860198207638e+01, 2.44086122015383e+01,\n                                                2.41053463027393e+01, 2.37775485524015e+01, 2.34270473030066e+01, 2.30561238792166e+01, 2.26674498343338e+01,\n                                                2.22640154661815e+01, 2.18490537384603e+01, 2.14259620047679e+01, 2.09982222986619e+01, 2.05693203471796e+01,\n                                                2.01426641954100e+01, 1.97215049374227e+01, 1.93088636276969e+01, 1.89074691671327e+01, 1.85197114442748e+01,\n                                                1.81476124194066e+01, 1.77928156755650e+01, 1.74565928281331e+01, 1.71398635618646e+01, 1.68432251969304e+01,\n                                                1.65669875839132e+01, 1.63112096311476e+01, 1.60757346353714e+01, 1.58602225770896e+01, 1.56641784663236e+01,\n                                                1.54869765672129e+01, 1.53278808464148e+01, 1.51860622886497e+01, 1.50606138423483e+01, 1.49505637498831e+01,\n                                                1.48548879285698e+01, 1.47725219389123e+01, 1.47023729317899e+01, 1.46433318220482e+01, 1.45942857999931e+01,\n                                                1.45541311676980e+01, 1.45217863749884e+01, 1.44962050315349e+01, 1.44763885885891e+01, 1.44613983194776e+01,\n                                                1.44503661856345e+01, 1.44425041582429e+01, 1.44371115771532e+01, 1.44335801696815e+01, 1.44313964210238e+01,\n                                                1.44301410817486e+01, 1.44294857103280e+01, 1.44291862722910e+01, 1.44290739438097e+01, 1.44290433878397e+01,\n                                                1.44290388778461e+01, 1.44290384764889e+01, 1.44290305757251e+01, 1.44289770469978e+01, 1.44287802713791e+01,\n                                                1.44282557524649e+01, 1.44271079197768e+01, 1.44249099285269e+01, 1.44210883716920e+01, 1.44149137812235e+01,\n                                                1.44054977426719e+01, 1.43917973649518e+01, 1.43726277129630e+01, 1.43466826021268e+01, 1.43125638501171e+01,\n                                                1.42688186702828e+01, 1.42139843766803e+01, 1.41466389767438e+01, 1.40654556044098e+01, 1.39692581696513e+01,\n                                                1.38570751653835e+01, 1.37281883814394e+01, 1.35821734146562e+01, 1.34189293788658e+01, 1.32386960837075e+01,\n                                                1.30420580521856e+01, 1.28299358794926e+01, 1.26035663364481e+01, 1.23644730360279e+01, 1.21144292691970e+01,\n                                                1.18554138618619e+01, 1.15895599988982e+01, 1.13190965650454e+01, 1.10462823640615e+01, 1.07733358807173e+01,\n                                                1.05023664254450e+01, 1.02353149350326e+01, 9.97391252082399e+00, 9.71966129156540e+00, 9.47383629656766e+00,\n                                                9.23750233735799e+00, 9.01153718717917e+00, 8.79665388218601e+00, 8.59341788547061e+00, 8.40225822961529e+00,\n                                                8.22347398107474e+00, 8.05723824432169e+00, 7.90360177161277e+00, 7.76249758710485e+00, 7.63374729311104e+00,\n                                                7.51706913536611e+00, 7.41208753912867e+00, 7.31834367039608e+00, 7.23530656869285e+00, 7.16238447681835e+00,\n                                                7.09893610656343e+00, 7.04428169145752e+00, 6.99771376662668e+00, 6.95850767203596e+00, 6.92593179719935e+00,\n                                                6.89925757664539e+00, 6.87776921295174e+00, 6.86077305651668e+00, 6.84760651740189e+00, 6.83764633318724e+00,\n                                                6.83031597542872e+00, 6.82509195204910e+00, 6.82150875788247e+00, 6.81916224245318e+00, 6.81771120240904e+00,\n                                                6.81687706319615e+00, 6.81644158613211e+00, 6.81624261735290e+00, 6.81616797798841e+00, 6.81614767433703e+00,\n                                                6.81614467756297e+00, 6.81614441263278e+00, 6.81613921724186e+00, 6.81610401777404e+00, 6.81597462185646e+00,\n                                                6.81562970791075e+00, 6.81487491309105e+00, 6.81342954750005e+00, 6.81091653527352e+00, 6.80685615694219e+00,\n                                                6.80066413359472e+00, 6.79165454241309e+00, 6.77904797333681e+00, 6.76198521552030e+00, 6.73954658916688e+00,\n                                                6.71077680683208e+00, 6.67471495876483e+00, 6.63042887842049e+00, 6.57705277565903e+00, 6.51382665397770e+00,\n                                                6.44013568864306e+00, 6.35554747199412e+00, 6.25984486682557e+00, 6.15305218109965e+00, 6.03545251437732e+00,\n                                                5.90759444928468e+00, 5.77028678273943e+00, 5.62458070991615e+00, 5.47173976250615e+00, 5.31319879863361e+00,\n                                                5.15051433948517e+00, 4.98530940787532e+00, 4.81921659845951e+00, 4.65382327886289e+00, 4.49062253241845e+00,\n                                                4.33097274101493e+00, 4.17606768913099e+00, 4.02691792076195e+00, 3.88434298413234e+00, 3.74897330758991e+00,\n                                                3.62125985606543e+00, 3.50148944413764e+00, 3.38980359351844e+00, 3.28621904699633e+00, 3.19064840183550e+00,\n                                                3.10291972424083e+00, 3.02279439214297e+00, 2.94998274802120e+00, 2.88415740904237e+00, 2.82496427615762e+00,\n                                                2.77203141426429e+00, 2.72497605390011e+00, 2.68341000383131e+00, 2.64694377463183e+00, 2.61518970493337e+00,\n                                                2.58776436101030e+00, 2.56429045114942e+00, 2.54439846160953e+00, 2.52772818257840e+00, 2.51393025147968e+00,\n                                                2.50266779820497e+00, 2.49361823341479e+00, 2.48647517836815e+00, 2.48095049459065e+00, 2.47677633618375e+00,\n                                                2.47370711896408e+00, 2.47152128102443e+00, 2.47002270040687e+00, 2.46904163831379e+00, 2.46843509061685e+00,\n                                                2.46808645525188e+00, 2.46790445628069e+00, 2.46782130403863e+00, 2.46779011150462e+00, 2.46778162644917e+00,\n                                                2.46778037407530e+00, 2.46778026164740e+00, 2.46777803752888e+00, 2.46776296886300e+00, 2.46770757581639e+00,\n                                                2.46755992569019e+00, 2.46723683453893e+00, 2.46661822014729e+00, 2.46554289439446e+00, 2.46380608912889e+00,\n                                                2.46115901279136e+00, 2.45731072660730e+00, 2.45193259829764e+00, 2.44466552610358e+00, 2.43513001590913e+00,\n                                                2.42293903280467e+00, 2.40771333608846e+00, 2.38909875388362e+00, 2.36678458239096e+00, 2.34052203890006e+00,\n                                                2.31014149907652e+00, 2.27556715200540e+00, 2.23682774872462e+00, 2.19406232285216e+00, 2.14752012195470e+00,\n                                                2.09755447322109e+00, 2.04461085804847e+00, 1.98921001159644e+00, 1.93192731727709e+00, 1.87337006864087e+00,\n                                                1.81415428543808e+00, 1.75488269324075e+00, 1.69612523428094e+00, 1.63840312027344e+00, 1.58217702459146e+00,\n                                                1.52783959777073e+00, 1.47571212314467e+00, 1.42604484026138e+00, 1.37902026919763e+00, 1.33475877156603e+00,\n                                                1.29332557490071e+00, 1.25473854871810e+00, 1.21897613064991e+00, 1.18598493653545e+00, 1.15568672870877e+00,\n                                                1.12798454628370e+00, 1.10276791024492e+00, 1.07991710031623e+00, 1.05930655995081e+00, 1.04080752322706e+00,\n                                                1.02428997715846e+00, 1.00962407944262e+00, 9.96681149062667e-01, 9.85334338741275e-01, 9.75459086506703e-01,\n                                                9.66933430254940e-01, 9.59638255224931e-01, 9.53457530312001e-01, 9.48278575377564e-01, 9.43992388254777e-01,\n                                                9.40494047039884e-01, 9.37683190591713e-01, 9.35464568144106e-01, 9.33748637921177e-01, 9.32452185113014e-01,\n                                                9.31498922086242e-01, 9.30820028836756e-01, 9.30354589915581e-01, 9.30049885655571e-01, 9.29861500504870e-01,\n                                                9.29753219328006e-01, 9.29696693053259e-01, 9.29670867160176e-01, 9.29661179207187e-01, 9.29658543870900e-01,\n                                                9.29658154901574e-01, 9.29658119045548e-01, 9.29657399276088e-01, 9.29652522754125e-01, 9.29634596472951e-01,\n                                                9.29586814119418e-01, 9.29482256445837e-01, 9.29282065173858e-01, 9.28934084690880e-01, 9.28372068316968e-01,\n                                                9.27515547394314e-01, 9.26270458857118e-01, 9.24530616394158e-01, 9.22180087594676e-01, 9.19096500802688e-01,\n                                                9.15155248537481e-01, 9.10234479723265e-01, 9.04220684873486e-01, 8.97014585529220e-01, 8.88536954657326e-01,\n                                                8.78733934238006e-01, 8.67581395954701e-01, 8.55087923301575e-01, 8.41296083771255e-01, 8.26281803068120e-01,\n                                                8.10151833456374e-01, 7.93039500281651e-01, 7.75099084903189e-01, 7.56499331140056e-01, 7.37416626319877e-01,\n                                                7.18028399829329e-01, 6.98507207727111e-01, 6.79015848619990e-01, 6.59703707250294e-01, 6.40704372768752e-01,\n                                                6.22134449366762e-01, 6.04093381810081e-01, 5.86664063431506e-01, 5.69913977944928e-01, 5.53896642211974e-01,\n                                                5.38653154929158e-01, 5.24213705485657e-01, 5.10598948495449e-01, 4.97821195596842e-01, 4.85885412721061e-01,\n                                                4.74790036513049e-01, 4.64527638422503e-01, 4.55085471016247e-01, 4.46445930775106e-01, 4.38586967523342e-01,\n                                                4.31482464813847e-01, 4.25102609588443e-01, 4.19414264168530e-01, 4.14381349494995e-01, 4.09965245521150e-01,\n                                                4.06125212522880e-01, 4.02818835472786e-01, 4.00002492175695e-01, 3.97631844293947e-01, 3.95662348524681e-01,\n                                                3.94049782970662e-01, 3.92750781232429e-01, 3.91723364104465e-01, 3.90927456214271e-01, 3.90325372775735e-01,\n                                                3.89882260109211e-01, 3.89566472957839e-01, 3.89349872074398e-01, 3.89208027152222e-01, 3.89120312902385e-01,\n                                                3.89069889802450e-01, 3.89043565526457e-01, 3.89031538004488e-01, 3.89027026107350e-01, 3.89025798765871e-01,\n                                                3.89025617612987e-01, 3.89025600349271e-01, 3.89025247675015e-01, 3.89022858260688e-01, 3.89014074606344e-01,\n                                                3.88990661265389e-01, 3.88939425072806e-01, 3.88841314397332e-01, 3.88670739030573e-01, 3.88395150992864e-01,\n                                                3.87974924626114e-01, 3.87363571028153e-01, 3.86508316098507e-01, 3.85351062070647e-01, 3.83829738414946e-01,\n                                                3.81880028875905e-01, 3.79437437394486e-01, 3.76439628060218e-01, 3.72828945524745e-01, 3.68554996053774e-01,\n                                                3.63577149783190e-01, 3.57866815791745e-01, 3.51409346175956e-01, 3.44205444206402e-01, 3.36271983084913e-01,\n                                                3.27642181634197e-01, 3.18365125810793e-01, 3.08504664617871e-01, 2.98137741698469e-01, 2.87352247963000e-01,\n                                                2.76244496859789e-01, 2.64916434660876e-01, 2.53472705764572e-01, 2.42017698559444e-01, 2.30652700000199e-01,\n                                                2.19473284359232e-01, 2.08567050949576e-01, 1.98011805328925e-01, 1.87874248995733e-01, 1.78209206540942e-01,\n                                                1.69059380959375e-01, 1.60455592266779e-01, 1.52417426021202e-01, 1.44954199636999e-01, 1.38066146467693e-01,\n                                                1.31745719741033e-01, 1.25978928520581e-01, 1.20746633272368e-01, 1.16025746615875e-01, 1.11790303090764e-01,\n                                                1.08012378529430e-01, 1.04662853801443e-01, 1.01712028785272e-01, 9.91301003779128e-02, 9.68875234242574e-02,\n                                                9.49552760485020e-02, 9.33050514597298e-02, 9.19093973254590e-02, 9.07418216497078e-02, 8.97768810830257e-02,\n                                                8.89902640094817e-02, 8.83588768464776e-02, 8.78609379843738e-02, 8.74760799163852e-02, 8.71854565847983e-02,\n                                                8.69718500198005e-02, 8.68197681617815e-02, 8.67155244852640e-02, 8.66472897615225e-02, 8.66051070034786e-02,\n                                                8.65808622373336e-02, 8.65682060628501e-02, 8.65624237582452e-02, 8.65602546818565e-02, 8.65596646466855e-02,\n                                                8.65595775589583e-02, 8.65595689392222e-02, 8.65593894876895e-02, 8.65581736848782e-02, 8.65537043799094e-02,\n                                                8.65417917355060e-02, 8.65157256784315e-02, 8.64658232011237e-02, 8.63790959939621e-02, 8.62390656515828e-02,\n                                                8.60257552882970e-02, 8.57158868433743e-02, 8.52833114261458e-02, 8.46996943994256e-02, 8.39354663143439e-02,\n                                                8.29610344865870e-02, 8.17482278813841e-02, 8.02719210371379e-02, 7.85117532463957e-02, 7.64538306557441e-02,\n                                                7.40922759191207e-02, 7.14304776131911e-02, 6.84818945077552e-02, 6.52702912689591e-02, 6.18293230529687e-02,\n                                                5.82014442173602e-02, 5.44361849637127e-02, 5.05879100184998e-02, 4.67132346847379e-02, 4.28683153796641e-02,\n                                                3.91062464241685e-02, 3.54747792849466e-02, 3.20145371392826e-02, 2.87578341125894e-02, 2.57281358339867e-02,\n                                                2.29401279878587e-02, 2.04003025550179e-02, 1.81079340622858e-02, 1.60563025718901e-02, 1.42340244289656e-02,\n                                                1.26263711520380e-02, 1.12164851927474e-02, 9.98643261644361e-03, 8.91806221129343e-03, 7.99366492014286e-03,\n                                                7.19644533347719e-03, 6.51082824854399e-03, 5.92262888890360e-03, 5.41911660126004e-03, 4.98900004780722e-03,\n                                                4.62235829476754e-03, 4.31053776382839e-03, 4.04603053705443e-03, 3.82234548667526e-03, 3.63388036149104e-03,\n                                                3.47580031766626e-03, 3.34392634417213e-03, 3.23463550445524e-03, 3.14477381161993e-03, 3.07158179906963e-03,\n                                                3.01263235670035e-03, 2.96578008428838e-03, 2.92912119154209e-03, 2.90096279415053e-03, 2.87980029526125e-03,\n                                                2.86430140175042e-03, 2.85329521954480e-03, 2.84576482077625e-03, 2.84084169585697e-03, 2.83780060748029e-03,\n                                                2.83605355228644e-03, 2.83514179987066e-03, 2.83472529663698e-03, 2.83456906546320e-03, 2.83452656807981e-03,\n                                                2.83452029560038e-03, 2.83451964860149e-03, 2.83450591425805e-03, 2.83441286366326e-03, 2.83407082402931e-03,\n                                                2.83315925756966e-03, 2.83116525818627e-03, 2.82735011627011e-03, 2.82072682094991e-03, 2.81005200533002e-03,\n                                                2.79383644243580e-03, 2.77037852624318e-03, 2.73782490642560e-03, 2.69426124114602e-03, 2.63783358713710e-03,\n                                                2.56689711678604e-03, 2.48018378962911e-03, 2.37697487136046e-03, 2.25725881671224e-03, 2.12185142336097e-03,\n                                                1.97245485195197e-03, 1.81163630681880e-03, 1.64271625827439e-03, 1.46956917577512e-03, 1.29635456725907e-03,\n                                                1.12720940942523e-03, 9.65941371795509e-04, 8.15763104185407e-04, 6.79100698050661e-04, 5.57495929285778e-04,\n                                                4.51605485245921e-04, 3.61285087038254e-04, 2.85735460771264e-04, 2.23682009888648e-04, 1.73560535131401e-04,\n                                                1.33686063030325e-04, 1.02389132536018e-04, 7.81122826225555e-05, 5.94675772447317e-05, 4.52621943196618e-05,\n                                                3.45017447287432e-05, 2.63794846446785e-05, 2.02560157376297e-05, 1.56322163249456e-05, 1.21191782085361e-05,\n                                                9.41085762917737e-06, 7.26632417524797e-06, 5.50524507048067e-06, 4.01001813088442e-06, 2.72127765299501e-06,\n                                                1.61950400467958e-06, 6.87598578963389e-07, 1.42108547152020e-14, 5.56890718428349e-07, 5.11390659596600e-07,\n                                                1.42108547152020e-14, 7.10542735760100e-15, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 7.10542735760100e-15, 1.42108547152020e-14, 7.10542735760100e-15,\n                                                7.10542735760100e-15, 1.42108547152020e-14, 7.10542735760100e-15, 1.42108547152020e-14, 7.10542735760100e-15,\n                                                1.42108547152020e-14, 7.10542735760100e-15, 1.42108547152020e-14, 0.00000000000000e+00, 1.42108547152020e-14,\n                                                7.10542735760100e-15}),\nmadness::CubicInterpolationTable<double>(grid, {4.90000000000000e+01, 4.89999998174124e+01, 4.89999941714428e+01, 4.89999559190740e+01,  4.89998152979154e+01,\n                                                4.89994404427486e+01, 4.89986200266635e+01, 4.89970486221579e+01, 4.89943152815468e+01,  4.89898957213871e+01,\n                                                4.89831483701081e+01, 4.89733144129453e+01, 4.89595218581276e+01, 4.89407935692791e+01,  4.89160591759201e+01,\n                                                4.88841707949971e+01, 4.88439225669830e+01, 4.87940741068755e+01, 4.87333780482703e+01,  4.86606118538711e+01,\n                                                4.85746139079577e+01, 4.84743235392986e+01, 4.83588240309811e+01, 4.82273869049633e+01,  4.80795149468369e+01,\n                                                4.79149807460899e+01, 4.77338571793541e+01, 4.75365364353004e+01, 4.73237349510815e+01,  4.70964829438350e+01,\n                                                4.68560988750627e+01, 4.66041508753847e+01, 4.63424085500460e+01, 4.60727894119270e+01,  4.57973043134294e+01,\n                                                4.55180057017834e+01, 4.52369414815080e+01, 4.49561159990734e+01, 4.46774584464746e+01,  4.44027980333171e+01,\n                                                4.41338447215271e+01, 4.38721741634507e+01, 4.36192156538426e+01, 4.33762422688444e+01,  4.31443627815532e+01,\n                                                4.29245153013365e+01, 4.27174628159900e+01, 4.25237909053827e+01, 4.23439078654310e+01,  4.21780473771841e+01,\n                                                4.20262737259619e+01, 4.18884894576736e+01, 4.17644452743746e+01, 4.16537519229692e+01,  4.15558938124794e+01,\n                                                4.14702440941516e+01, 4.13960809427224e+01, 4.13326047775420e+01, 4.12789561543581e+01,  4.12342340416715e+01,\n                                                4.11975141718242e+01, 4.11678671302479e+01, 4.11443758212603e+01, 4.11261519302236e+01,  4.11123509941149e+01,\n                                                4.11021856991591e+01, 4.10949370475764e+01, 4.10899630768523e+01, 4.10867048739286e+01,  4.10846897016019e+01,\n                                                4.10835311421246e+01, 4.10829262593688e+01, 4.10826498810902e+01, 4.10825462016757e+01,  4.10825179983253e+01,\n                                                4.10825138355685e+01, 4.10825132657459e+01, 4.10824998084631e+01, 4.10824086335118e+01,  4.10820734665292e+01,\n                                                4.10811800481091e+01, 4.10792248932562e+01, 4.10754808041239e+01, 4.10689706348463e+01,  4.10584507063895e+01,\n                                                4.10424051450716e+01, 4.10190522516176e+01, 4.09863637735655e+01, 4.09420976258797e+01,  4.08838441592044e+01,\n                                                4.08090854976232e+01, 4.07152667577631e+01, 4.05998771368022e+01, 4.04605379571598e+01,  4.02950938407982e+01,\n                                                4.01017023432034e+01, 3.98789167353011e+01, 3.96257563782288e+01, 3.93417595700293e+01,  3.90270151527176e+01,\n                                                3.86821716584768e+01, 3.83084259319148e+01, 3.79074958851235e+01, 3.74815829060651e+01,  3.70333277112010e+01,\n                                                3.65657599362447e+01, 3.60822386544154e+01, 3.55863803679454e+01, 3.50819733698131e+01,  3.45728814752905e+01,\n                                                3.40629439244366e+01, 3.35558801257584e+01, 3.30552073043744e+01, 3.25641765313472e+01,  3.20857291166127e+01,\n                                                3.16224720668955e+01, 3.11766690354055e+01, 3.07502422329164e+01, 3.03447809995816e+01,  2.99615537435229e+01,\n                                                2.96015212434249e+01, 2.92653504764736e+01, 2.89534289299991e+01, 2.86658797293499e+01,  2.84025779480124e+01,\n                                                2.81631683056835e+01, 2.79470842491741e+01, 2.77535682466269e+01, 2.75816930466210e+01,  2.74303836532689e+01,\n                                                2.72984398149762e+01, 2.71845588824433e+01, 2.70873589331399e+01, 2.70054020697887e+01,  2.69372177757426e+01,\n                                                2.68813261551938e+01, 2.68362608103687e+01, 2.68005910228905e+01, 2.67729428244041e+01,  2.67520184736619e+01,\n                                                2.67366138133249e+01, 2.67256329672273e+01, 2.67180998624833e+01, 2.67131661220237e+01,  2.67101149700121e+01,\n                                                2.67083609199169e+01, 2.67074451649013e+01, 2.67070267528009e+01, 2.67068697926126e+01,  2.67068270956956e+01,\n                                                2.67068207937223e+01, 2.67068201954913e+01, 2.67068079989827e+01, 2.67067253659673e+01,  2.67064216001359e+01,\n                                                2.67056118863554e+01, 2.67038399206098e+01, 2.67004466741553e+01, 2.66945466659545e+01,  2.66850130351080e+01,\n                                                2.66704726023210e+01, 2.66493119676229e+01, 2.66196954864098e+01, 2.65795956716248e+01,  2.65268361639543e+01,\n                                                2.64591468808225e+01, 2.63742303000801e+01, 2.62698370769278e+01, 2.61438483768502e+01,  2.59943614999988e+01,\n                                                2.58197746599138e+01, 2.56188662625445e+01, 2.53908638197836e+01, 2.51354978368700e+01,  2.48530367351183e+01,\n                                                2.45443001653063e+01, 2.42106498786177e+01, 2.38539594099209e+01, 2.34765657336815e+01,  2.30812072087758e+01,\n                                                2.26709521361375e+01, 2.22491211941180e+01, 2.18192055392266e+01, 2.13847813782794e+01,  2.09494219699893e+01,\n                                                2.05166092675185e+01, 2.00896491008007e+01, 1.96715950213608e+01, 1.92651860389424e+01,  1.88728023208135e+01,\n                                                1.84964408356150e+01, 1.81377105040026e+01, 1.77978442742350e+01, 1.74777240949059e+01,  1.71779141719916e+01,\n                                                1.68986981006903e+01, 1.66401162299375e+01, 1.64020006710830e+01, 1.61840064501406e+01,  1.59856382456380e+01,\n                                                1.58062728571459e+01, 1.56451779929113e+01, 1.55015281793294e+01, 1.53744186362000e+01,  1.52628778904067e+01,\n                                                1.51658797687894e+01, 1.50823552561283e+01, 1.50112045491681e+01, 1.49513094936042e+01,  1.49015464613607e+01,\n                                                1.48607996099906e+01, 1.48279743634502e+01, 1.48020108636048e+01, 1.47818970660002e+01,  1.47666810946041e+01,\n                                                1.47554824322188e+01, 1.47475015099367e+01, 1.47420272733179e+01, 1.47384423461443e+01,  1.47362254836278e+01,\n                                                1.47349511023154e+01, 1.47342857878267e+01, 1.47339818063981e+01, 1.47338677734817e+01,  1.47338367538591e+01,\n                                                1.47338321754312e+01, 1.47338317679838e+01, 1.47338237473342e+01, 1.47337694063598e+01,  1.47335696447873e+01,\n                                                1.47330371660505e+01, 1.47318719116288e+01, 1.47296405485616e+01, 1.47257609356040e+01,  1.47194924512950e+01,\n                                                1.47099330112869e+01, 1.46960235163796e+01, 1.46765603358272e+01, 1.46502162199676e+01,  1.46155697322924e+01,\n                                                1.45711428826161e+01, 1.45154461341822e+01, 1.44470293738238e+01, 1.43645368264447e+01,  1.42667633387150e+01,\n                                                1.41527090455124e+01, 1.40216292627544e+01, 1.38730765983017e+01, 1.37069327669507e+01,  1.35234283897970e+01,\n                                                1.33231500164253e+01, 1.31070345149502e+01, 1.28763515828408e+01, 1.26326752534957e+01,  1.23778449056357e+01,\n                                                1.21139157163075e+01, 1.18430983371928e+01, 1.15676885400779e+01, 1.12899900470833e+01,  1.10122371870487e+01,\n                                                1.07365267242043e+01, 1.04647681013108e+01, 1.01986574635711e+01, 9.93967449805353e+00,  9.68909536630405e+00,\n                                                9.44801248831234e+00, 9.21735320561194e+00, 8.99789290878218e+00, 8.79026193604223e+00,  8.59494801814319e+00,\n                                                8.41229693380146e+00, 8.24251375381809e+00, 8.08566620440055e+00, 7.94169076267641e+00,  7.81040138046712e+00,\n                                                7.69150030097679e+00, 7.58459026134040e+00, 7.48918738988449e+00, 7.40473423239099e+00,  7.33061251183872e+00,\n                                                7.26615539545493e+00, 7.21065918401683e+00, 7.16339443811703e+00, 7.12361661154681e+00,  7.09057627648018e+00,\n                                                7.06352900591024e+00, 7.04174493483206e+00, 7.02451796273495e+00, 7.01117449573233e+00,  7.00108156612058e+00,\n                                                6.99365411813309e+00, 6.98836121730059e+00, 6.98473093126172e+00, 6.98235364388820e+00,  6.98088360161213e+00,\n                                                6.98003854803926e+00, 6.97959737560762e+00, 6.97939580523287e+00, 6.97932019002766e+00,  6.97929962093409e+00,\n                                                6.97929658498171e+00, 6.97929631658792e+00, 6.97929105327530e+00, 6.97925539363568e+00,  6.97912430619436e+00,\n                                                6.97877488416214e+00, 6.97801022804548e+00, 6.97654599428995e+00, 6.97400022462021e+00,  6.96988704778352e+00,\n                                                6.96361481489560e+00, 6.95448918133767e+00, 6.94172156933170e+00, 6.92444332237383e+00,  6.90172568379303e+00,\n                                                6.87260548938892e+00, 6.83611615798068e+00, 6.79132320248810e+00, 6.73736308682899e+00,  6.67348384942026e+00,\n                                                6.59908553967698e+00, 6.51375821224863e+00, 6.41731503928209e+00, 6.30981807647482e+00,  6.19159439150523e+00,\n                                                6.06324066140888e+00, 5.92561498024605e+00, 5.77981547586008e+00, 5.62714636370445e+00,  5.46907317112972e+00,\n                                                5.30716990983441e+00, 5.14306179672752e+00, 4.97836757407870e+00, 4.81464545945958e+00,  4.65334624937947e+00,\n                                                4.49577618758214e+00, 4.34307104816154e+00, 4.19618167257751e+00, 4.05587012649436e+00,  3.92271484460237e+00,\n                                                3.79712267379295e+00, 3.67934559922460e+00, 3.56950008137563e+00, 3.46758725451208e+00,  3.37351264500394e+00,\n                                                3.28710448432160e+00, 3.20813006374454e+00, 3.13630987845188e+00, 3.07132953081002e+00,  3.01284951285989e+00,\n                                                2.96051307952373e+00, 2.91395247183824e+00, 2.87279376702467e+00, 2.83666062995279e+00,  2.80517722592153e+00,\n                                                2.77797053232840e+00, 2.75467225938379e+00, 2.73492055891128e+00, 2.71836166613389e+00,  2.70465158264953e+00,\n                                                2.69345787013091e+00, 2.68446158456787e+00, 2.67735934146643e+00, 2.67186546512597e+00,  2.66771414206180e+00,\n                                                2.66466147208524e+00, 2.66248729260923e+00, 2.66099664408199e+00, 2.66002074798829e+00,  2.65941738357025e+00,\n                                                2.65907057423136e+00, 2.65888952743753e+00, 2.65880680998541e+00, 2.65877578051280e+00,  2.65876733980990e+00,\n                                                2.65876609398223e+00, 2.65876598214198e+00, 2.65876376964891e+00, 2.65874877974393e+00,  2.65869367618252e+00,\n                                                2.65854679734733e+00, 2.65822539226928e+00, 2.65760999971299e+00, 2.65654025424588e+00,  2.65481240779319e+00,\n                                                2.65217885673594e+00, 2.64834995495732e+00, 2.64299836195118e+00, 2.63576611087837e+00,  2.62627447422130e+00,\n                                                2.61413654825064e+00, 2.59897227252522e+00, 2.58042535728026e+00, 2.55818133119876e+00,  2.53198567695156e+00,\n                                                2.50166083209131e+00, 2.46712074017957e+00, 2.42838167645646e+00, 2.38556826299638e+00,  2.33891392571963e+00,\n                                                2.28875549887238e+00, 2.23552219723582e+00, 2.17971968398116e+00, 2.12191039388352e+00,  2.06269157195101e+00,\n                                                2.00267262390796e+00, 1.94245334128721e+00, 1.88260437741506e+00, 1.82365104518927e+00,  1.76606112652745e+00,\n                                                1.71023697380149e+00, 1.65651179230593e+00, 1.60514966219466e+00, 1.55634862093765e+00,  1.51024600049207e+00,\n                                                1.46692519585724e+00, 1.42642311503727e+00, 1.38873769472951e+00, 1.35383502806608e+00,  1.32165581152407e+00,\n                                                1.29212095768732e+00, 1.26513632893153e+00, 1.24059662274379e+00, 1.21838848616400e+00,  1.19839296114332e+00,\n                                                1.18048737116165e+00, 1.16454675797827e+00, 1.15044497020924e+00, 1.13805549540329e+00,  1.12725211612103e+00,\n                                                1.11790945906795e+00, 1.10990349489803e+00, 1.10311203490581e+00, 1.09741525935057e+00,  1.09269630050709e+00,\n                                                1.08884189170755e+00, 1.08574308177624e+00, 1.08329600267734e+00, 1.08140266738698e+00,  1.07997176557475e+00,\n                                                1.07891941731575e+00, 1.07816984040240e+00, 1.07765588540459e+00, 1.07731939473447e+00,  1.07711134760478e+00,\n                                                1.07699176158786e+00, 1.07692933283307e+00, 1.07690080997169e+00, 1.07689011028044e+00,  1.07688719972564e+00,\n                                                1.07688677013459e+00, 1.07688673053398e+00, 1.07688593559586e+00, 1.07688054979450e+00,  1.07686075133947e+00,\n                                                1.07680797838901e+00, 1.07669249856725e+00, 1.07647138873963e+00, 1.07608702654314e+00,  1.07546619649273e+00,\n                                                1.07451991363614e+00, 1.07314406375970e+00, 1.07122094727359e+00, 1.06862179002648e+00,  1.06521024477610e+00,\n                                                1.06084684971444e+00, 1.05539433578545e+00, 1.04872358668477e+00, 1.04071996281990e+00,  1.03128961561426e+00,\n                                                1.02036535652379e+00, 1.00791162126944e+00, 9.93928095991087e-01, 9.78451653291010e-01,  9.61556377938791e-01,\n                                                9.43351629740263e-01, 9.23978272052274e-01, 9.03603362277025e-01, 8.82413730937309e-01,  8.60608951292768e-01,\n                                                8.38394214991816e-01, 8.15973584989827e-01, 7.93544007772041e-01, 7.71290350779346e-01,  7.49381606810282e-01,\n                                                7.27968291569276e-01, 7.07180965331972e-01, 6.87129741359804e-01, 6.67904603571806e-01,  6.49576341405222e-01,\n                                                6.32197915534505e-01, 6.15806087848739e-01, 6.00423176658133e-01, 5.86058828373375e-01,  5.72711726171718e-01,\n                                                5.60371182173746e-01, 5.49018581363711e-01, 5.38628662717095e-01, 5.29170636088658e-01,  5.20609142935811e-01,\n                                                5.12905075530021e-01, 5.06016273513531e-01, 4.99898118967721e-01, 4.94504051951850e-01,  4.89786028037138e-01,\n                                                4.85694937920925e-01, 4.82181006924968e-01, 4.79194189190700e-01, 4.76684567798031e-01,  4.74602767967752e-01,\n                                                4.72900386103277e-01, 4.71530432857477e-01, 4.70447783892922e-01, 4.69609627798775e-01,  4.68975897017501e-01,\n                                                4.68509664911458e-01, 4.68177490520517e-01, 4.67949692324858e-01, 4.67800533528354e-01,  4.67708303994407e-01,\n                                                4.67655287841701e-01, 4.67627610566886e-01, 4.67614965033135e-01, 4.67610221328322e-01,  4.67608930932322e-01,\n                                                4.67608740472834e-01, 4.67608722322240e-01, 4.67608351529641e-01, 4.67605839363678e-01,  4.67596604502198e-01,\n                                                4.67571988722455e-01, 4.67518122613903e-01, 4.67414981433208e-01, 4.67235677049572e-01,  4.66946031765531e-01,\n                                                4.66504479069364e-01, 4.65862333907459e-01, 4.64964469350889e-01, 4.63750425937775e-01,  4.62155963055018e-01,\n                                                4.60115037616653e-01, 4.57562164169445e-01, 4.54435074014249e-01, 4.50677552254888e-01,  4.46242295758758e-01,\n                                                4.41093607826588e-01, 4.35209733065975e-01, 4.28584643548696e-01, 4.21229117303668e-01,  4.13171001496124e-01,\n                                                4.04454620280568e-01, 3.95139362919728e-01, 3.85297561004492e-01, 3.75011824171715e-01,  3.64372043323741e-01,\n                                                3.53472284322820e-01, 3.42407783113607e-01, 3.31272219010245e-01, 3.20155393428365e-01,  3.09141385278643e-01,\n                                                2.98307200200099e-01, 2.87721885894967e-01, 2.77446054495904e-01, 2.67531736518769e-01,  2.58022488052831e-01,\n                                                2.48953679932661e-01, 2.40352910390030e-01, 2.32240497028904e-01, 2.24630016892036e-01,  2.17528873262850e-01,\n                                                2.10938874327546e-01, 2.04856812465934e-01, 1.99275034738015e-01, 1.94181996106607e-01,  1.89562787871452e-01,\n                                                1.85399635134374e-01, 1.81672358991179e-01, 1.78358801435820e-01, 1.75435213407532e-01,  1.72876608714795e-01,\n                                                1.70657088453737e-01, 1.68750141793261e-01, 1.67128929499519e-01, 1.65766556276502e-01,  1.64636336948185e-01,\n                                                1.63712059809676e-01, 1.62968248297211e-01, 1.62380419677525e-01, 1.61925336973788e-01,  1.61581248069361e-01,\n                                                1.61328104094792e-01, 1.61147748002172e-01, 1.61024063805257e-01, 1.60943077383870e-01,  1.60893001003558e-01,\n                                                1.60864215697408e-01, 1.60849188229307e-01, 1.60842322296105e-01, 1.60839746686513e-01,  1.60839046061952e-01,\n                                                1.60838942651367e-01, 1.60838932416020e-01, 1.60838719329782e-01, 1.60837275644440e-01,  1.60831968583231e-01,\n                                                1.60817822512158e-01, 1.60786867254586e-01, 1.60727596006929e-01, 1.60624559644717e-01,  1.60458124346540e-01,\n                                                1.60204419319854e-01, 1.59835500302322e-01, 1.59319751560574e-01, 1.58622543385512e-01,  1.57707152760274e-01,\n                                                1.56535941451594e-01, 1.55071768288593e-01, 1.53279591634146e-01, 1.51128195666715e-01,  1.48591952532975e-01,\n                                                1.45652514730365e-01, 1.42300321386195e-01, 1.38535801112575e-01, 1.34370164485517e-01,  1.29825701103634e-01,\n                                                1.24935528199480e-01, 1.19742777073022e-01, 1.14299246406297e-01, 1.08663593612668e-01,  1.02899172652016e-01,\n                                                9.70716554820825e-02, 9.12465914445448e-02, 8.54870622515946e-02, 7.98515790018826e-02,  7.43923426583990e-02,\n                                                6.91539534005017e-02, 6.41726116420003e-02, 5.94758097252850e-02, 5.50824738157232e-02,  5.10034847715843e-02,\n                                                4.72424874221247e-02, 4.37968903592392e-02, 4.06589617859439e-02, 3.78169386200753e-02,  3.52560827800517e-02,\n                                                3.29596373153649e-02, 3.09096532594424e-02, 2.90876740295261e-02, 2.74752769223454e-02,  2.60544804784004e-02,\n                                                2.48080324177877e-02, 2.37195959957361e-02, 2.27738536173803e-02, 2.19565460295925e-02,  2.12544639248478e-02,\n                                                2.06554067876610e-02, 2.01481215941612e-02, 1.97222317408290e-02, 1.93681644381414e-02,  1.90770828062909e-02,\n                                                1.88408270639826e-02, 1.86518674995568e-02, 1.85032703503936e-02, 1.83886762984571e-02,  1.83022900401255e-02,\n                                                1.82388783476100e-02, 1.81937732560371e-02, 1.81628765308304e-02, 1.81426614303604e-02,  1.81301679836352e-02,\n                                                1.81229885337970e-02, 1.81192410960378e-02, 1.81175290621525e-02, 1.81168868517219e-02,  1.81167121579833e-02,\n                                                1.81166863736664e-02, 1.81166837139273e-02, 1.81166272537112e-02, 1.81162447315160e-02,  1.81148386001695e-02,\n                                                1.81110908364417e-02, 1.81028913123882e-02, 1.80871973027124e-02, 1.80599336187228e-02,  1.80159442288641e-02,\n                                                1.79490075309872e-02, 1.78519281360110e-02, 1.77167173967092e-02, 1.75348721955402e-02,  1.72977559917911e-02,\n                                                1.69970774000703e-02, 1.66254497257512e-02, 1.61770007519806e-02, 1.56479873716933e-02,  1.50373569381514e-02,\n                                                1.43471895607377e-02, 1.35829560489640e-02, 1.27535369977210e-02, 1.18709700915574e-02,  1.09499232331771e-02,\n                                                1.00069263064242e-02, 9.05942824369532e-03, 8.12477211356821e-03, 7.21919387834902e-03,  6.35694750467763e-03,\n                                                5.54964057634777e-03, 4.80583370420362e-03, 4.13091928911058e-03, 3.52725735356785e-03,  2.99451535990158e-03,\n                                                2.53014119492434e-03, 2.12989660455776e-03, 1.78839009188891e-03, 1.49956680339614e-03,  1.25713011769335e-03,\n                                                1.05488091251971e-03, 8.86967101372704e-04, 7.48042763710544e-04, 6.33345832447674e-04,  5.38713347594921e-04,\n                                                4.60558165357838e-04, 3.95827699890106e-04, 3.41956508044916e-04, 2.96816426022417e-04,  2.58664717158297e-04,\n                                                2.26091668480422e-04, 1.97970729203689e-04, 1.73414003867833e-04, 1.51733887634009e-04,  1.32409674982625e-04,\n                                                1.15057395127849e-04, 9.94018294520060e-05, 8.52507232806943e-05, 7.24718376403644e-05,  6.09735092211849e-05,\n                                                5.06890349498690e-05, 4.15647843112765e-05, 3.35516473768394e-05, 2.65992845740470e-05,  2.06526129105100e-05,\n                                                1.56499990993098e-05, 1.15226963330883e-05, 8.19514527705678e-06, 5.58584795840034e-06,  3.60860771309035e-06,\n                                                2.17400330626560e-06, 1.19102712403674e-06, 5.68868784966980e-07, -1.42108547152020e-14, -7.10542735760100e-15,\n                                                -1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {5.00000000000000e+01, 4.99999998121301e+01, 4.99999940028207e+01, 4.99999546437973e+01, 4.99998099544109e+01,\n                                                4.99994242544686e+01, 4.99985801029620e+01, 4.99969632350309e+01, 4.99941508104938e+01, 4.99896033691170e+01,\n                                                4.99826607585502e+01, 4.99725421723565e+01, 4.99583503230176e+01, 4.99390796951864e+01, 4.99136287931858e+01,\n                                                4.98808163222349e+01, 4.98394013199057e+01, 4.97881073576357e+01, 4.97256510134539e+01, 4.96507748085635e+01,\n                                                4.95622846276433e+01, 4.94590912471120e+01, 4.93402549624706e+01, 4.92050314894715e+01, 4.90529164481005e+01,\n                                                4.88836850227758e+01, 4.86974230500045e+01, 4.84945459999374e+01, 4.82758031695921e+01, 4.80422658219158e+01,\n                                                4.77952997625414e+01, 4.75365246147570e+01, 4.72677634803998e+01, 4.69909874813171e+01, 4.67082597326619e+01,\n                                                4.64216826537214e+01, 4.61333513765247e+01, 4.58453146576904e+01, 4.55595434304583e+01, 4.52779061789990e+01,\n                                                4.50021497917050e+01, 4.47338844518133e+01, 4.44745713565957e+01, 4.42255124743559e+01, 4.39878420013205e+01,\n                                                4.37625195505958e+01, 4.35503253279661e+01, 4.33518576145836e+01, 4.31675328168254e+01, 4.29975882123793e+01,\n                                                4.28420873730367e+01, 4.27009281183635e+01, 4.25738527697340e+01, 4.24604604321331e+01, 4.23602210209177e+01,\n                                                4.22724907573472e+01, 4.21965288664720e+01, 4.21315152146009e+01, 4.20765686167416e+01, 4.20307655270050e+01,\n                                                4.19931587997961e+01, 4.19627961810997e+01, 4.19387381623937e+01, 4.19200748097037e+01, 4.19059411715633e+01,\n                                                4.18955308757773e+01, 4.18881075484050e+01, 4.18830137304037e+01, 4.18796770275880e+01, 4.18776133061437e+01,\n                                                4.18764268357318e+01, 4.18758073809489e+01, 4.18755243445899e+01, 4.18754181674995e+01, 4.18753892847206e+01,\n                                                4.18753850216816e+01, 4.18753844381318e+01, 4.18753706566586e+01, 4.18752772852746e+01, 4.18749340440487e+01,\n                                                4.18740191032416e+01, 4.18720168501206e+01, 4.18681825734680e+01, 4.18615156026688e+01, 4.18507423360357e+01,\n                                                4.18343104668575e+01, 4.18103955456288e+01, 4.17769207772359e+01, 4.17315906146591e+01, 4.16719382511713e+01,\n                                                4.15953865151862e+01, 4.14993209347110e+01, 4.13811728801138e+01, 4.12385097555582e+01, 4.10691282577818e+01,\n                                                4.08711458563244e+01, 4.06430850230970e+01, 4.03839445754208e+01, 4.00932530876416e+01, 3.97711009365846e+01,\n                                                3.94181501726967e+01, 3.90356244805978e+01, 3.86252838128566e+01, 3.81893885574590e+01, 3.77306559492730e+01,\n                                                3.72522080363378e+01, 3.67575080673719e+01, 3.62502824166748e+01, 3.57344281847160e+01, 3.52139108874289e+01,\n                                                3.46926601338228e+01, 3.41744724631472e+01, 3.36629292724892e+01, 3.31613346984156e+01, 3.26726745904036e+01,\n                                                3.21995944573649e+01, 3.17443922150456e+01, 3.13090209257461e+01, 3.08950972701141e+01, 3.05039127329999e+01,\n                                                3.01364458864785e+01, 2.97933753011745e+01, 2.94750933060435e+01, 2.91817210430588e+01, 2.89131251596860e+01,\n                                                2.86689362295390e+01, 2.84485687444185e+01, 2.82512423671761e+01, 2.80760040942734e+01, 2.79217510225627e+01,\n                                                2.77872535012118e+01, 2.76711785346197e+01, 2.75721133576156e+01, 2.74885891179934e+01, 2.74191045737671e+01,\n                                                2.73621496513723e+01, 2.73162286281700e+01, 2.72798826109663e+01, 2.72517108945381e+01, 2.72303907118816e+01,\n                                                2.72146948408510e+01, 2.72035065175063e+01, 2.71958311294550e+01, 2.71908042241516e+01, 2.71876954654558e+01,\n                                                2.71859083014195e+01, 2.71849752591555e+01, 2.71845489486454e+01, 2.71843890255357e+01, 2.71843455226366e+01,\n                                                2.71843391017021e+01, 2.71843384921785e+01, 2.71843260654387e+01, 2.71842418725792e+01, 2.71839323726740e+01,\n                                                2.71831073745569e+01, 2.71813019624552e+01, 2.71778446738757e+01, 2.71718333323202e+01, 2.71621198549420e+01,\n                                                2.71473052521369e+01, 2.71257458927285e+01, 2.70955718997716e+01, 2.70547182412018e+01, 2.70009686630480e+01,\n                                                2.69320120663886e+01, 2.68455102537741e+01, 2.67391751882849e+01, 2.66108530647951e+01, 2.64586116593149e+01,\n                                                2.62808266920432e+01, 2.60762624242776e+01, 2.58441415303062e+01, 2.55841995626878e+01, 2.52967201563492e+01,\n                                                2.49825485145299e+01, 2.46430825689695e+01, 2.42802431935183e+01, 2.38964264889260e+01, 2.34944419581965e+01,\n                                                2.30774401463016e+01, 2.26488323129893e+01, 2.22122036678097e+01, 2.17712213974987e+01, 2.13295395048167e+01,\n                                                2.08907040478655e+01, 2.04580639375810e+01, 2.00346931969506e+01, 1.96233300478867e+01, 1.92263364312158e+01,\n                                                1.88456790652506e+01, 1.84829305704865e+01, 1.81392871210104e+01, 1.78155978810502e+01, 1.75124012216367e+01,\n                                                1.72299632326186e+01, 1.69683150658985e+01, 1.67272868591407e+01, 1.65065371406977e+01, 1.63055775429697e+01,\n                                                1.61237932849323e+01, 1.59604602328773e+01, 1.58147594656392e+01, 1.56857902287304e+01, 1.55725820296024e+01,\n                                                1.54741064571166e+01, 1.53892891367505e+01, 1.53170220765614e+01, 1.52561765228064e+01, 1.52056163267954e+01,\n                                                1.51642117220863e+01, 1.51308533201755e+01, 1.51044660522041e+01, 1.50840227151852e+01, 1.50685567271755e+01,\n                                                1.50571736610500e+01, 1.50490611155209e+01, 1.50434964981391e+01, 1.50398523397583e+01, 1.50375988324476e+01,\n                                                1.50363033796501e+01, 1.50356270626807e+01, 1.50353180538388e+01, 1.50352021349193e+01, 1.50351706022537e+01,\n                                                1.50351659481017e+01, 1.50351655339153e+01, 1.50351573806093e+01, 1.50351021408650e+01, 1.50348990752782e+01,\n                                                1.50343577889360e+01, 1.50331732576806e+01, 1.50309049710253e+01, 1.50269611284310e+01, 1.50205887804919e+01,\n                                                1.50108707474470e+01, 1.49967300584383e+01, 1.49769425155709e+01, 1.49501577750839e+01, 1.49149290347478e+01,\n                                                1.48697510116998e+01, 1.48131053932398e+01, 1.47435123706472e+01, 1.46595862734704e+01, 1.45600927830024e+01,\n                                                1.44440048081552e+01, 1.43105539429755e+01, 1.41592745557142e+01, 1.39900379947363e+01, 1.38030750701205e+01,\n                                                1.35989857321435e+01, 1.33787355128155e+01, 1.31436386326706e+01, 1.28953276407444e+01, 1.26357092475190e+01,\n                                                1.23669061402174e+01, 1.20911857228005e+01, 1.18108793223223e+01, 1.15282989933557e+01, 1.12456619907765e+01,\n                                                1.09650330755481e+01, 1.06882909136095e+01, 1.04171181511909e+01, 1.01530084780782e+01, 9.89728107799645e+00,\n                                                9.65109406244822e+00, 9.41545225966166e+00, 9.19120877192240e+00, 8.97906242016153e+00, 8.77955415315243e+00,\n                                                8.59306513066907e+00, 8.41981817607991e+00, 8.25988319580874e+00, 8.11318629963413e+00, 7.97952183342697e+00,\n                                                7.85856632968300e+00, 7.74989340799604e+00, 7.65298882415090e+00, 7.56726509355686e+00, 7.49207534537742e+00,\n                                                7.42672626283763e+00, 7.37049011530137e+00, 7.32261598379095e+00, 7.28234032660001e+00, 7.24889703293564e+00,\n                                                7.22152707968953e+00, 7.19948784982205e+00, 7.18206210076819e+00, 7.16856649757614e+00, 7.15835955713314e+00,\n                                                7.15084879454179e+00, 7.14549682655941e+00, 7.14182617404784e+00, 7.13942251734371e+00, 7.13793619466671e+00,\n                                                7.13708179116300e+00, 7.13663574003368e+00, 7.13643194118303e+00, 7.13635549010332e+00, 7.13633469364141e+00,\n                                                7.13633162413029e+00, 7.13633135276976e+00, 7.13632603127789e+00, 7.13628997747283e+00, 7.13615744114956e+00,\n                                                7.13580415778922e+00, 7.13503105561048e+00, 7.13355066334110e+00, 7.13097684614573e+00, 7.12681847732785e+00,\n                                                7.12047762614105e+00, 7.11125279622849e+00, 7.09834767091611e+00, 7.08088569601553e+00, 7.05793064488158e+00,\n                                                7.02851305575806e+00, 6.99166210691814e+00, 6.94644210955489e+00, 6.89199237185613e+00, 6.82756875169096e+00,\n                                                6.75258481148683e+00, 6.66665016632523e+00, 6.56960342786423e+00, 6.46153714414247e+00, 6.34281236329297e+00,\n                                                6.21406093748387e+00, 6.07617443683036e+00, 5.93027952988481e+00, 5.77770082962781e+00, 5.61991337523786e+00,\n                                                5.45848795704308e+00, 5.29503322284621e+00, 5.13113878747638e+00, 4.96832333504296e+00, 4.80799098363613e+00,\n                                                4.65139810064133e+00, 4.49963150643736e+00, 4.35359779713593e+00, 4.21402253341895e+00, 4.08145739377884e+00,\n                                                3.95629310562013e+00, 3.83877600368746e+00, 3.72902633295808e+00, 3.62705680785575e+00, 3.53279036717247e+00,\n                                                3.44607645611403e+00, 3.36670548554996e+00, 3.29442135253828e+00, 3.22893206245364e+00, 3.16991858776746e+00,\n                                                3.11704214990475e+00, 3.06995013433096e+00, 3.02828085641132e+00, 2.99166739354472e+00, 2.95974069106386e+00,\n                                                2.93213213668687e+00, 2.90847578105912e+00, 2.88841035996832e+00, 2.87158124710199e+00, 2.85764243506797e+00,\n                                                2.84625860759726e+00, 2.83710732867702e+00, 2.82988133656359e+00, 2.82429089434390e+00, 2.82006611633714e+00,\n                                                2.81695916359318e+00, 2.81474618426537e+00, 2.81322886741654e+00, 2.81223548278714e+00, 2.81162129416295e+00,\n                                                2.81126825913243e+00, 2.81108396114076e+00, 2.81099975800099e+00, 2.81096817116516e+00, 2.81095957884308e+00,\n                                                2.81095831063663e+00, 2.81095819678740e+00, 2.81095594455126e+00, 2.81094068537908e+00, 2.81088459193229e+00,\n                                                2.81073507419053e+00, 2.81040789273457e+00, 2.80978143314565e+00, 2.80869242770606e+00, 2.80693341366893e+00,\n                                                2.80425221734076e+00, 2.80035374218823e+00, 2.79490430706577e+00, 2.78753871656981e+00, 2.77787013975710e+00,\n                                                2.76550272004584e+00, 2.75004663861518e+00, 2.73113511567934e+00, 2.70844257889296e+00, 2.68170298637029e+00,\n                                                2.65072710126558e+00, 2.61541741518987e+00, 2.57577944255242e+00, 2.53192827660111e+00, 2.48408960914436e+00,\n                                                2.43259484501372e+00, 2.37787044387361e+00, 2.32042213706796e+00, 2.26081513296521e+00, 2.19965178319247e+00,\n                                                2.13754838886221e+00, 2.07511285177323e+00, 2.01292471270224e+00, 1.95151878449389e+00, 1.89137312706541e+00,\n                                                1.83290159551481e+00, 1.77645070543894e+00, 1.72230017856538e+00, 1.67066630619468e+00, 1.62170720714497e+00,\n                                                1.57552913285161e+00, 1.53219313425801e+00, 1.49172159878143e+00, 1.45410434807338e+00, 1.41930413391894e+00,\n                                                1.38726147304519e+00, 1.35789882618372e+00, 1.33112416221476e+00, 1.30683396497523e+00, 1.28491574666511e+00,\n                                                1.26525013323719e+00, 1.24771258668539e+00, 1.23217482796661e+00, 1.21850602258473e+00, 1.20657378835961e+00,\n                                                1.19624508121667e+00, 1.18738700964231e+00, 1.17986762157820e+00, 1.17355669894629e+00, 1.16832658484252e+00,\n                                                1.16405305700727e+00, 1.16061624893490e+00, 1.15790160753894e+00, 1.15580086439073e+00, 1.15421298703385e+00,\n                                                1.15304506858965e+00, 1.15221310858744e+00, 1.15164263626199e+00, 1.15126912978711e+00, 1.15103819102776e+00,\n                                                1.15090544500768e+00, 1.15083614566466e+00, 1.15080448360207e+00, 1.15079260629248e+00, 1.15078937539734e+00,\n                                                1.15078889852477e+00, 1.15078885456562e+00, 1.15078797213517e+00, 1.15078199356115e+00, 1.15076001602305e+00,\n                                                1.15070143452874e+00, 1.15057324331570e+00, 1.15032779143582e+00, 1.14990110379425e+00, 1.14921187961705e+00,\n                                                1.14816127974996e+00, 1.14663360931310e+00, 1.14449798918425e+00, 1.14161108437136e+00, 1.13782091584573e+00,\n                                                1.13297172260844e+00, 1.12690976302683e+00, 1.11948985279385e+00, 1.11058233943427e+00, 1.10008012231791e+00,\n                                                1.08790525760641e+00, 1.07401465478848e+00, 1.05840438794996e+00, 1.04111221702931e+00, 1.02221803971705e+00,\n                                                1.00184216160438e+00, 9.80141460841089e-01, 9.57303709402062e-01, 9.33540471417459e-01, 9.09079109583736e-01,\n                                                8.84154480894665e-01, 8.59000889666774e-01, 8.33844795139740e-01, 8.08898656340602e-01, 7.84356156674200e-01,\n                                                7.60388904613400e-01, 7.37144573033980e-01, 7.14746332058908e-01, 6.93293356822650e-01, 6.72862154256229e-01,\n                                                6.53508448416225e-01, 6.35269384941360e-01, 6.18165853120885e-01, 6.02204770103150e-01, 5.87381218676235e-01,\n                                                5.73680372613104e-01, 5.61079178782812e-01, 5.49547791973175e-01, 5.39050776926523e-01, 5.29548103587160e-01,\n                                                5.20995967498251e-01, 5.13347469192020e-01, 5.06553185623218e-01, 5.00561664233111e-01, 4.95319866825646e-01,\n                                                4.90773586526785e-01, 4.86867856919062e-01, 4.83547368082284e-01, 4.80756899750432e-01, 4.78441777119222e-01,\n                                                4.76548350045611e-01, 4.75024491566039e-01, 4.73820106987894e-01, 4.72887640512660e-01, 4.72182562704738e-01,\n                                                4.71663819426048e-01, 4.71294221384220e-01, 4.71040753402093e-01, 4.70874784014867e-01, 4.70772159014153e-01,\n                                                4.70713166921605e-01, 4.70682369789721e-01, 4.70668298795395e-01, 4.70663020355602e-01, 4.70661584499169e-01,\n                                                4.70661372570028e-01, 4.70661352373405e-01, 4.70660939783016e-01, 4.70658144431525e-01, 4.70647868559603e-01,\n                                                4.70620477901782e-01, 4.70560539413476e-01, 4.70445770327686e-01, 4.70246249384907e-01, 4.69923940732450e-01,\n                                                4.69432579993317e-01, 4.68717969079627e-01, 4.67718719821342e-01, 4.66367474613712e-01, 4.64592613481081e-01,\n                                                4.62320430294241e-01, 4.59477726618267e-01, 4.55994731681415e-01, 4.51808215014736e-01, 4.46864619963499e-01,\n                                                4.41123018239622e-01, 4.34557674710391e-01, 4.27160022919878e-01, 4.18939887510803e-01, 4.09925847564615e-01,\n                                                4.00164708182757e-01, 3.89720126078792e-01, 3.78670506694235e-01, 3.67106344677630e-01, 3.55127209391902e-01,\n                                                3.42838580527506e-01, 3.30348719252463e-01, 3.17765724914075e-01, 3.05194885071252e-01, 2.92736385779136e-01,\n                                                2.80483415202312e-01, 2.68520669120136e-01, 2.56923251066091e-01, 2.45755950212867e-01, 2.35072873675279e-01,\n                                                2.24917404265462e-01, 2.15322448710346e-01, 2.06310934976010e-01, 1.97896511521428e-01, 1.90084397209141e-01,\n                                                1.82872329213005e-01, 1.76251558061040e-01, 1.70207843825807e-01, 1.64722414830599e-01, 1.59772859185523e-01,\n                                                1.55333929029510e-01, 1.51378246646644e-01, 1.47876909951215e-01, 1.44800001736954e-01, 1.42117012316518e-01,\n                                                1.39797188680568e-01, 1.37809825148310e-01, 1.36124510820771e-01, 1.34711348186372e-01, 1.33541155199794e-01,\n                                                1.32585660309459e-01, 1.31817696511284e-01, 1.31211396833535e-01, 1.30742389997202e-01, 1.30387991631075e-01,\n                                                1.30127383620781e-01, 1.29941772164706e-01, 1.29814514066531e-01, 1.29731200799384e-01, 1.29679690924405e-01,\n                                                1.29650083427343e-01, 1.29634627260231e-01, 1.29627565578481e-01, 1.29624916557511e-01, 1.29624195965206e-01,\n                                                1.29624089607503e-01, 1.29624079080472e-01, 1.29623859921494e-01, 1.29622375094492e-01, 1.29616916823259e-01,\n                                                1.29602367920043e-01, 1.29570532283097e-01, 1.29509579635503e-01, 1.29403633794887e-01, 1.29232534890804e-01,\n                                                1.28971806829135e-01, 1.28592861013956e-01, 1.28063464691827e-01, 1.27348496014321e-01, 1.26410996872600e-01,\n                                                1.25213518005552e-01, 1.23719728784408e-01, 1.21896237374997e-01, 1.19714537769838e-01, 1.17152971715534e-01,\n                                                1.14198569990450e-01, 1.10848623360802e-01, 1.07111833053743e-01, 1.03008906708936e-01, 9.85724994541570e-02,\n                                                9.38464493406812e-02, 8.88843174622380e-02, 8.37473088435061e-02, 7.85017122421863e-02, 7.32160466990166e-02,\n                                                6.79581325421879e-02, 6.27923098105612e-02, 5.77770066389576e-02, 5.29628170968977e-02, 4.83911889945716e-02,\n                                                4.40937563220132e-02, 4.00922878724401e-02, 3.63991714817686e-02, 3.30183176882741e-02, 2.99463495478491e-02,\n                                                2.71739456595839e-02, 2.46872175897082e-02, 2.24690259992784e-02, 2.05001669156388e-02, 1.87603864914934e-02,\n                                                1.72292062347026e-02, 1.58865593690578e-02, 1.47132521883364e-02, 1.36912723349170e-02, 1.28039697200251e-02,\n                                                1.20361363521155e-02, 1.13740097027915e-02, 1.08052213304717e-02, 1.03187090247445e-02, 9.90460723483721e-03,\n                                                9.55412731384087e-03, 9.25943629624015e-03, 9.01354057349124e-03, 8.81017891371982e-03, 8.64372772718269e-03,\n                                                8.50912022996653e-03, 8.40178013017123e-03, 8.31756959186691e-03, 8.25275048154595e-03, 8.20395725545353e-03,\n                                                8.16817931056590e-03, 8.14275021996025e-03, 8.12534103454254e-03, 8.11395478417865e-03, 8.10691946451669e-03,\n                                                8.10287714551805e-03, 8.10076735512411e-03, 8.09980352614303e-03, 8.09944198515211e-03, 8.09934363955733e-03,\n                                                8.09932912402900e-03, 8.09932762671650e-03, 8.09929584202962e-03, 8.09908049910746e-03, 8.09828892021613e-03,\n                                                8.09617920312178e-03, 8.09156387174426e-03, 8.08273159702111e-03, 8.06739294593228e-03, 8.04265722346287e-03,\n                                                8.00504852589512e-03, 7.95056970554953e-03, 7.87482250516547e-03, 7.77319005297983e-03, 7.64108368179706e-03,\n                                                7.47424935558172e-03, 7.26912002090785e-03, 7.02318975156402e-03, 6.73537518344602e-03, 6.40632166025767e-03,\n                                                6.03860828056924e-03, 5.63680993489157e-03, 5.20738670020648e-03, 4.75839111854981e-03, 4.29900929882621e-03,\n                                                3.83897788799459e-03, 3.38794020196787e-03, 2.95481608522152e-03, 2.54725834054170e-03, 2.17125397077211e-03,\n                                                1.83090445060685e-03, 1.52839149578199e-03, 1.26410935514798e-03, 1.03692593417293e-03, 8.44524815185821e-04,\n                                                6.83777961150156e-04, 5.51103243068951e-04, 4.42770939280024e-04, 3.55138107124731e-04, 2.84806828588557e-04,\n                                                2.28717044741700e-04, 1.84191776590126e-04, 1.48950203517018e-04, 1.21096507271545e-04, 9.90871897599277e-05,\n                                                8.16813071224942e-05, 6.78839478851501e-05, 5.68959418600912e-05, 4.80777642763996e-05, 4.09260429492520e-05,\n                                                3.50546758198789e-05, 3.01738441166322e-05, 2.60664686422274e-05, 2.25666123583323e-05, 1.95443613435486e-05,\n                                                1.68980881909420e-05, 1.45513844032052e-05, 1.24508913543764e-05, 1.05626876418796e-05, 8.86706455816011e-06,\n                                                7.35287627406933e-06, 6.01278041756359e-06, 4.84006432088790e-06, 3.82704104850973e-06, 2.96457301374176e-06,\n                                                2.24219611055787e-06, 1.64844292527278e-06, 1.17114984021782e-06, 7.97681266817563e-07, 5.15086398422682e-07,\n                                                2.84217094304040e-14, 2.13162820728030e-14, 2.13162820728030e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.13162820728030e-14}),\nmadness::CubicInterpolationTable<double>(grid, {5.10000000000000e+01, 5.09999998068055e+01, 5.09999938328494e+01, 5.09999533583172e+01, 5.09998045681528e+01,\n                                                5.09994079366627e+01, 5.09985398598079e+01, 5.09968771646123e+01, 5.09939850230986e+01, 5.09893086764479e+01,\n                                                5.09821692420760e+01, 5.09717637444074e+01, 5.09571693952096e+01, 5.09373520692187e+01, 5.09111788914869e+01,\n                                                5.08774348830465e+01, 5.08348436951697e+01, 5.07820925725544e+01, 5.07178617705194e+01, 5.06408586386389e+01,\n                                                5.05498563945390e+01, 5.04437371858890e+01, 5.03215383625782e+01, 5.01825000153803e+01, 5.00261109273993e+01,\n                                                4.98521493442700e+01, 4.96607146350366e+01, 4.94522461789758e+01, 4.92275267500182e+01, 4.89876691941041e+01,\n                                                4.87340870584260e+01, 4.84684516786957e+01, 4.81926396883203e+01, 4.79086756945586e+01, 4.76186748480620e+01,\n                                                4.73247892815405e+01, 4.70291611394252e+01, 4.67338834792571e+01, 4.64409690100165e+01, 4.61523256757382e+01,\n                                                4.58697376042159e+01, 4.55948499034523e+01, 4.53291560888229e+01, 4.50739873988632e+01, 4.48305037454134e+01,\n                                                4.45996864227810e+01, 4.43823329089346e+01, 4.41790541279915e+01, 4.39902744500927e+01, 4.38162345449468e+01,\n                                                4.36569970384915e+01, 4.35124547891604e+01, 4.33823415182759e+01, 4.32662444951919e+01, 4.31636189773115e+01,\n                                                4.30738041201762e+01, 4.29960400883907e+01, 4.29294861047180e+01, 4.28732391684405e+01, 4.28263531557103e+01,\n                                                4.27878579876486e+01, 4.27567785214120e+01, 4.27321527907836e+01, 4.27130492013266e+01, 4.26985822753866e+01,\n                                                4.26879265479258e+01, 4.26803282378304e+01, 4.26751143620688e+01, 4.26716990215399e+01, 4.26695866657582e+01,\n                                                4.26683722354245e+01, 4.26677381830405e+01, 4.26674484769164e+01, 4.26673397977668e+01, 4.26673102343671e+01,\n                                                4.26673058708700e+01, 4.26673052735688e+01, 4.26672911673363e+01, 4.26671955956650e+01, 4.26668442660264e+01,\n                                                4.26659077650648e+01, 4.26638583310356e+01, 4.26599337086481e+01, 4.26531096613450e+01, 4.26420826124819e+01,\n                                                4.26252637587662e+01, 4.26007858259651e+01, 4.25665233914066e+01, 4.25201273510253e+01, 4.24590736344896e+01,\n                                                4.23807256532466e+01, 4.22824092013607e+01, 4.21614976366854e+01, 4.20155041941991e+01, 4.18421772987213e+01,\n                                                4.16395938658888e+01, 4.14062449816153e+01, 4.11411082779844e+01, 4.08437020724444e+01, 4.05141181229012e+01,\n                                                4.01530325543927e+01, 3.97616974228357e+01, 3.93419172623630e+01, 3.88960147038917e+01, 3.84267868235696e+01,\n                                                3.79374507321542e+01, 3.74315752015935e+01, 3.69129962172256e+01, 3.63857179098877e+01, 3.58538046392305e+01,\n                                                3.53212730868312e+01, 3.47919938633296e+01, 3.42696102762642e+01, 3.37574784027357e+01, 3.32586287135524e+01,\n                                                3.27757463254286e+01, 3.23111651770450e+01, 3.18668711414091e+01, 3.14445099609786e+01, 3.10453973521595e+01,\n                                                3.06705301004355e+01, 3.03205980549773e+01, 2.99959974729088e+01, 2.96968462171345e+01, 2.94230010658466e+01,\n                                                2.91740770589459e+01, 2.89494685442212e+01, 2.87483714648141e+01, 2.85698064433548e+01, 2.84126423179901e+01,\n                                                2.82756199127240e+01, 2.81573759330495e+01, 2.80564669420654e+01, 2.79713933847818e+01, 2.79006235941191e+01,\n                                                2.78426176426188e+01, 2.77958508129182e+01, 2.77588363614811e+01, 2.77301471568878e+01, 2.77084356976741e+01,\n                                                2.76924519649372e+01, 2.76810585490504e+01, 2.76732425123928e+01, 2.76681235123118e+01, 2.76649578084607e+01,\n                                                2.76631379107049e+01, 2.76621877796753e+01, 2.76617536614379e+01, 2.76615908094240e+01, 2.76615465097960e+01,\n                                                2.76615399712661e+01, 2.76615393505795e+01, 2.76615266962519e+01, 2.76614409614566e+01, 2.76611257933088e+01,\n                                                2.76602856863256e+01, 2.76584472118208e+01, 2.76549266162041e+01, 2.76488052188981e+01, 2.76389139579846e+01,\n                                                2.76238283280759e+01, 2.76018748099959e+01, 2.75711496796183e+01, 2.75295507757364e+01, 2.74748223795756e+01,\n                                                2.74046127965020e+01, 2.73165435346429e+01, 2.72082881682914e+01, 2.70776581047720e+01, 2.69226916177024e+01,\n                                                2.67417417684419e+01, 2.65335583319877e+01, 2.62973587042221e+01, 2.60328831153697e+01, 2.57404303871102e+01,\n                                                2.54208719278551e+01, 2.50756434839446e+01, 2.47067159931115e+01, 2.43165482516911e+01, 2.39080246342135e+01,\n                                                2.34843807632215e+01, 2.30491192470648e+01, 2.26059170957968e+01, 2.21585267731246e+01, 2.17106741196784e+01,\n                                                2.12659580785600e+01, 2.08277584464931e+01, 2.03991580594072e+01, 1.99828846366906e+01, 1.95812752025530e+01,\n                                                1.91962631807002e+01, 1.88293856179285e+01, 1.84818060860957e+01, 1.81543479134204e+01, 1.78475324853754e+01,\n                                                1.75616181963234e+01, 1.72966368885092e+01, 1.70524259556870e+01, 1.68286554654264e+01, 1.66248505275975e+01,\n                                                1.64404096703224e+01, 1.62746202172806e+01, 1.61266716698991e+01, 1.59956679716072e+01, 1.58806393435871e+01,\n                                                1.57805541844661e+01, 1.56943313490075e+01, 1.56208529731271e+01, 1.55589778927014e+01, 1.55075556045201e+01,\n                                                1.54654406317975e+01, 1.54315070787896e+01, 1.54046630876687e+01, 1.53838648476444e+01, 1.53681297555507e+01,\n                                                1.53565482940715e+01, 1.53482941836496e+01, 1.53426323808656e+01, 1.53389245415505e+01, 1.53366316403715e+01,\n                                                1.53353135366524e+01, 1.53346253928875e+01, 1.53343109800628e+01, 1.53341930338870e+01, 1.53341609497551e+01,\n                                                1.53341562142076e+01, 1.53341557927777e+01, 1.53341474968802e+01, 1.53340912910565e+01, 1.53338846740303e+01,\n                                                1.53333339206319e+01, 1.53321286698264e+01, 1.53298206984338e+01, 1.53258078302668e+01, 1.53193238826304e+01,\n                                                1.53094354901909e+01, 1.52950465545930e+01, 1.52749109268599e+01, 1.52476537171661e+01, 1.52118013247016e+01,\n                                                1.51658198794852e+01, 1.51081612935694e+01, 1.50373155570174e+01, 1.49518673336976e+01, 1.48505543840285e+01,\n                                                1.47323249492034e+01, 1.45963910516915e+01, 1.44422747478796e+01, 1.42698447031462e+01, 1.40793409678695e+01,\n                                                1.38713863706873e+01, 1.36469833519963e+01, 1.34074952547950e+01, 1.31546111934466e+01, 1.28902940404157e+01,\n                                                1.26167124095393e+01, 1.23361601943580e+01, 1.20509708842576e+01, 1.17634370122821e+01, 1.14757455077156e+01,\n                                                1.11899361105483e+01, 1.09078833459798e+01, 1.06312959634008e+01, 1.03617243622402e+01, 1.01005673990245e+01,\n                                                9.84907371698436e+00, 9.60833698225483e+00, 9.37928736581602e+00, 9.16268271713418e+00, 8.95910250344222e+00,\n                                                8.76894644991521e+00, 8.59243853886871e+00, 8.42963599123316e+00, 8.28044220613444e+00, 8.14462236304025e+00,\n                                                8.02182040766674e+00, 7.91157633998532e+00, 7.81334300434757e+00, 7.72650187664869e+00, 7.65037760618613e+00,\n                                                7.58425127677035e+00, 7.52737249480989e+00, 7.47897049371154e+00, 7.43826447182045e+00, 7.40447336565006e+00,\n                                                7.37682521242677e+00, 7.35456618692510e+00, 7.33696931752878e+00, 7.32334280497845e+00, 7.31303779296295e+00,\n                                                7.30545537996386e+00, 7.30005262240100e+00, 7.29634726403334e+00, 7.29392093738461e+00, 7.29242061892486e+00,\n                                                7.29155817777215e+00, 7.29110793274138e+00, 7.29090221822771e+00, 7.29082504860811e+00, 7.29080405669455e+00,\n                                                7.29080095833549e+00, 7.29080068442466e+00, 7.29079531292039e+00, 7.29075892028062e+00, 7.29062513846350e+00,\n                                                7.29026853583044e+00, 7.28948817334282e+00, 7.28799389141707e+00, 7.28539596597926e+00, 7.28119875518304e+00,\n                                                7.27479893371800e+00, 7.26548886772780e+00, 7.25246560503280e+00, 7.23484582657773e+00, 7.21168691152484e+00,\n                                                7.18201400078417e+00, 7.14485260060804e+00, 7.09926585847924e+00, 7.04439518971942e+00, 6.97950246992632e+00,\n                                                6.90401158240311e+00, 6.81754677727616e+00, 6.71996512076404e+00, 6.61138034800588e+00, 6.49217572948996e+00,\n                                                6.36300414657924e+00, 6.22477443901168e+00, 6.07862418360732e+00, 5.92588028300347e+00, 5.76800993212893e+00,\n                                                5.60656550679803e+00, 5.44312751040209e+00, 5.27924980099903e+00, 5.11641087218201e+00, 4.95597405327580e+00,\n                                                4.79915829620150e+00, 4.64701994686970e+00, 4.50044477242147e+00, 4.36014869081299e+00, 4.22668519967208e+00,\n                                                4.10045741292956e+00, 3.98173280591251e+00, 3.87065912939873e+00, 3.76728036915077e+00, 3.67155201429062e+00,\n                                                3.58335520689743e+00, 3.50250956258267e+00, 3.42878458842219e+00, 3.36190970340328e+00, 3.30158291146243e+00,\n                                                3.24747820658511e+00, 3.19925181374527e+00, 3.15654739215893e+00, 3.11900034747684e+00, 3.08624141440402e+00,\n                                                3.05789967816403e+00, 3.03360520063972e+00, 3.01299140460232e+00, 2.99569734793932e+00, 2.98136999068667e+00,\n                                                2.96966652290042e+00, 2.96025678318361e+00, 2.95282575843616e+00, 2.94707611768260e+00, 2.94273069927830e+00,\n                                                2.93953484393764e+00, 2.93725844809854e+00, 2.93569760482015e+00, 2.93467570357527e+00, 2.93404387583988e+00,\n                                                2.93368069913549e+00, 2.93349110600469e+00, 2.93340448341018e+00, 2.93337198894331e+00, 2.93336314972265e+00,\n                                                2.93336184507444e+00, 2.93336172795377e+00, 2.93335941099986e+00, 2.93334371335473e+00, 2.93328600802845e+00,\n                                                2.93313219355719e+00, 2.93279560855746e+00, 2.93215113907669e+00, 2.93103081122545e+00, 2.92922116367716e+00,\n                                                2.92646269351447e+00, 2.92245165675286e+00, 2.91684447168841e+00, 2.90926490818742e+00, 2.89931413950145e+00,\n                                                2.88658357910404e+00, 2.87067022369592e+00, 2.85119398400082e+00, 2.82781622669846e+00, 2.80025850339331e+00,\n                                                2.76832024314414e+00, 2.73189407372163e+00, 2.69097744913633e+00, 2.64567942095196e+00, 2.59622170382065e+00,\n                                                2.54293363419306e+00, 2.48624116435919e+00, 2.42665060993870e+00, 2.36472840054853e+00, 2.30107848786022e+00,\n                                                2.23631926837798e+00, 2.17106183282138e+00, 2.10589105846568e+00, 2.04135056946071e+00, 1.97793200547240e+00,\n                                                1.91606848396678e+00, 1.85613172124750e+00, 1.79843204760956e+00, 1.74322050849745e+00, 1.69069233602693e+00,\n                                                1.64099123475694e+00, 1.59421409132361e+00, 1.55041585183696e+00, 1.50961440117681e+00, 1.47179532980618e+00,\n                                                1.43691649987973e+00, 1.40491233696012e+00, 1.37569778628507e+00, 1.34917188801167e+00, 1.32522094497171e+00,\n                                                1.30372127762926e+00, 1.28454158174358e+00, 1.26754492248421e+00, 1.25259041287113e+00, 1.23953463362869e+00,\n                                                1.22823285569965e+00, 1.21854012605354e+00, 1.21031227258743e+00, 1.20340687552572e+00, 1.19768424150482e+00,\n                                                1.19300840324893e+00, 1.18924815322565e+00, 1.18627810480731e+00, 1.18397976021614e+00, 1.18224255189897e+00,\n                                                1.18096481393859e+00, 1.18005463353198e+00, 1.17943053010048e+00, 1.17902191158374e+00, 1.17876926385969e+00,\n                                                1.17862403957164e+00, 1.17854822609554e+00, 1.17851358781956e+00, 1.17850059405350e+00, 1.17849705945741e+00,\n                                                1.17849653775927e+00, 1.17849648966801e+00, 1.17849552428999e+00, 1.17848898373629e+00, 1.17846494033616e+00,\n                                                1.17840085227903e+00, 1.17826061144213e+00, 1.17799208828082e+00, 1.17752529573066e+00, 1.17677129498524e+00,\n                                                1.17562196557792e+00, 1.17395075711865e+00, 1.17161452611337e+00, 1.16845653398182e+00, 1.16431063763409e+00,\n                                                1.15900663926419e+00, 1.15237667758002e+00, 1.14426244249860e+00, 1.13452288780579e+00, 1.12304201413469e+00,\n                                                1.10973621375468e+00, 1.09456062588201e+00, 1.07751396107597e+00, 1.05864132461517e+00, 1.03803470176291e+00,\n                                                1.01583095255168e+00, 9.92207380436085e-01, 9.67375161006615e-01, 9.41571114181713e-01, 9.15048448459537e-01,\n                                                8.88067178791417e-01, 8.60884911424733e-01, 8.33748603507857e-01, 8.06887758278386e-01, 7.80509333034971e-01,\n                                                7.54794445403874e-01, 7.29896790478406e-01, 7.05942547504975e-01, 6.83031470790269e-01, 6.61238826444709e-01,\n                                                6.40617847369931e-01, 6.21202421407126e-01, 6.03009787990544e-01, 5.86043084387796e-01, 5.70293644044817e-01,\n                                                5.55743000743576e-01, 5.42364590719181e-01, 5.30125170708338e-01, 5.18985984916114e-01, 5.08903720651098e-01,\n                                                4.99831293512379e-01, 4.91718500765955e-01, 4.84512577613813e-01, 4.78158686534996e-01, 4.72600365360293e-01,\n                                                4.67779955447241e-01, 4.63639027231544e-01, 4.60118816405377e-01, 4.57160679852407e-01, 4.54706576139017e-01,\n                                                4.52699570789292e-01, 4.51084361835754e-01, 4.49807816413909e-01, 4.48819504727474e-01, 4.48072213875939e-01,\n                                                4.47522421153757e-01, 4.47130704815933e-01, 4.46862070203764e-01, 4.46686170660101e-01, 4.46577405821031e-01,\n                                                4.46514884474659e-01, 4.46482244911891e-01, 4.46467332131668e-01, 4.46461737914753e-01, 4.46460216159835e-01,\n                                                4.46459991552274e-01, 4.46459970147409e-01, 4.46459532874279e-01, 4.46456570294224e-01, 4.46445679682320e-01,\n                                                4.46416650428745e-01, 4.46353126296231e-01, 4.46231491738409e-01, 4.46020036267662e-01, 4.45678450552698e-01,\n                                                4.45157706940961e-01, 4.44400374071904e-01, 4.43341408423954e-01, 4.41909453126947e-01, 4.40028654510257e-01,\n                                                4.37620978691513e-01, 4.34608974333678e-01, 4.30918885529763e-01, 4.26483974622428e-01, 4.21247874489872e-01,\n                                                4.15167760450167e-01, 4.08217120379305e-01, 4.00387913092615e-01, 3.91691941309666e-01, 3.82161323943322e-01,\n                                                3.71848025825990e-01, 3.60822480819650e-01, 3.49171415071467e-01, 3.36995031258915e-01, 3.24403746333005e-01,\n                                                3.11514683898224e-01, 2.98448111842603e-01, 2.85323992688284e-01, 2.72258785193998e-01, 2.59362606155925e-01,\n                                                2.46736833678398e-01, 2.34472207634639e-01, 2.22647458550497e-01, 2.11328471657481e-01, 2.00567968223197e-01,\n                                                1.90405662523965e-01, 1.80868831895097e-01, 1.71973221306772e-01, 1.63724194504688e-01, 1.56118041608011e-01,\n                                                1.49143357775451e-01, 1.42782417844877e-01, 1.37012485907640e-01, 1.31807014655045e-01, 1.27136705280755e-01,\n                                                1.22970413379697e-01, 1.19275898748789e-01, 1.16020426815339e-01, 1.13171236508911e-01, 1.10695893927286e-01,\n                                                1.08562553448380e-01, 1.06740148385477e-01, 1.05198532240536e-01, 1.03908589412391e-01, 1.02842331154783e-01,\n                                                1.01972988911868e-01, 1.01275113128736e-01, 1.00724681479662e-01, 1.00299216418065e-01, 9.99779082750294e-02,\n                                                9.97417370554885e-02, 9.95735838144896e-02, 9.94583212026043e-02, 9.93828725403318e-02, 9.93362296118221e-02,\n                                                9.93094211627579e-02, 9.92954266517145e-02, 9.92890328813303e-02, 9.92866344280756e-02, 9.92859819973262e-02,\n                                                9.92858857001409e-02, 9.92858761688780e-02, 9.92856777405180e-02, 9.92843333674855e-02, 9.92793914341377e-02,\n                                                9.92662190078377e-02, 9.92373963134554e-02, 9.91822159424771e-02, 9.90863148012053e-02, 9.89314686552376e-02,\n                                                9.86955807775871e-02, 9.83528965991525e-02, 9.78744740455468e-02, 9.72289329646472e-02, 9.63834953834777e-02,\n                                                9.53053104265038e-02, 9.39630335520079e-02, 9.23286004555663e-02, 9.03791040784370e-02, 8.80986525601912e-02,\n                                                8.54800617003946e-02, 8.25262229768313e-02, 7.92509922992863e-02, 7.56794686538100e-02, 7.18475760362622e-02,\n                                                6.78009235118822e-02, 6.35929902100258e-02, 5.92827550341681e-02, 5.49319539193078e-02, 5.06021903550788e-02,\n                                                4.63521401963973e-02, 4.22350766500372e-02, 3.82968982492002e-02, 3.45747790205166e-02, 3.10964866279946e-02,\n                                                2.78803427250338e-02, 2.49357402455956e-02, 2.22640917576271e-02, 1.98600639143933e-02, 1.77129541278802e-02,\n                                                1.58080825726046e-02, 1.41280996859834e-02, 1.26541404827947e-02, 1.13667871799450e-02, 1.02468273528302e-02,\n                                                9.27581438765657e-03, 8.43645010113647e-03, 7.71281675122282e-03, 7.09048834714565e-03, 6.55655037522962e-03,\n                                                6.09955397741402e-03, 5.70942638167793e-03, 5.37735492505220e-03, 5.09565794143896e-03, 4.85765234749636e-03,\n                                                4.65752494058336e-03, 4.49021213191259e-03, 4.35129101315113e-03, 4.23688327136063e-03, 4.14357248697428e-03,\n                                                4.06833469432399e-03, 4.00848164341028e-03, 3.96161587506327e-03, 3.92559644137691e-03, 3.89851384736062e-03,\n                                                3.87867256414864e-03, 3.86457929229778e-03, 3.85493506043844e-03, 3.84862925210427e-03, 3.84473377052075e-03,\n                                                3.84249578059581e-03, 3.84132779039703e-03, 3.84079422697425e-03, 3.84059408524706e-03, 3.84053964337738e-03,\n                                                3.84053160792774e-03, 3.84053077905833e-03, 3.84051318420120e-03, 3.84039397844305e-03, 3.83995579466045e-03,\n                                                3.83878798188420e-03, 3.83623339017447e-03, 3.83134539925578e-03, 3.82285876294475e-03, 3.80917859944674e-03,\n                                                3.78839257848540e-03, 3.75831174730479e-03, 3.71654512586872e-03, 3.66061177059152e-03, 3.58809109746261e-03,\n                                                3.49680769338079e-03, 3.38504079331159e-03, 3.25174170753684e-03, 3.09673593050519e-03, 2.92088208454544e-03,\n                                                2.72615903108431e-03, 2.51565686397015e-03, 2.29345761663069e-03, 2.06440650459427e-03, 1.83379199631872e-03,\n                                                1.60696938319660e-03, 1.38897390259274e-03, 1.18417274682514e-03, 9.95999178726947e-04, 8.26797565942172e-04,\n                                                6.77788752305730e-04, 5.49145470181145e-04, 4.40152076230049e-04, 3.49414832861328e-04, 2.75088740060880e-04,\n                                                2.15092525628791e-04, 1.67291664951108e-04, 1.29637848672814e-04, 1.00261431583704e-04, 7.75209597065896e-05,\n                                                6.00195652609159e-05, 4.65994300071770e-05, 3.63220714660883e-05, 2.84377916841549e-05, 2.23480382288699e-05,\n                                                1.75700524707167e-05, 1.37161136208874e-05, 1.04920730237268e-05, 7.70519618242815e-06, 5.26313318260918e-06,\n                                                3.15355670466033e-06, 1.44277312585928e-06, 1.01124599183322e-06, 1.23174262256498e-06, 1.06700076685229e-06,\n                                                7.06201682021401e-07, 2.84217094304040e-14, 2.13162820728030e-14, 3.55271367880050e-14, 2.84217094304040e-14,\n                                                3.55271367880050e-14, 3.55271367880050e-14, 3.92511708469101e-07, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14, 4.26325641456060e-14, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                3.55271367880050e-14, 2.84217094304040e-14, 3.55271367880050e-14, 3.55271367880050e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {5.20000000000000e+01,  5.19999998014392e+01,  5.19999936615447e+01,  5.19999520627523e+01,\n                                                5.19997991396383e+01,  5.19993914908374e+01,  5.19984993009164e+01,  5.19967904188472e+01,\n                                                5.19938179346640e+01,  5.19890116705774e+01,  5.19816738660398e+01,  5.19709792009111e+01,\n                                                5.19559791836269e+01,  5.19356108507096e+01,  5.19087096968146e+01,  5.18740267895843e+01,\n                                                5.18302501142060e+01,  5.17760303095096e+01,  5.17100110455677e+01,  5.16308642754820e+01,\n                                                5.15373303884048e+01,  5.14282628335412e+01,  5.13026760641079e+01,  5.11597947336037e+01,\n                                                5.09991011217417e+01,  5.08203770031128e+01,  5.06237358483457e+01,  5.04096415632976e+01,\n                                                5.01789109983268e+01,  4.99326990951251e+01,  4.96724675105139e+01,  4.93999394815263e+01,\n                                                4.91170451802562e+01,  4.88258625557390e+01,  4.85285585586905e+01,  4.82273347828241e+01,\n                                                4.79243801906831e+01,  4.76218320645754e+01,  4.73217449644050e+01,  4.70260665214777e+01,\n                                                4.67366184527940e+01,  4.64550812107323e+01,  4.61829810549449e+01,  4.59216788663370e+01,\n                                                4.56723605438915e+01,  4.54360292085471e+01,  4.52134996270111e+01,  4.50053952705746e+01,\n                                                4.48121482940797e+01,  4.46340025306817e+01,  4.44710194139708e+01,  4.43230866017141e+01,\n                                                4.41899289988913e+01,  4.40711218541923e+01,  4.39661056147490e+01,  4.38742022479038e+01,\n                                                4.37946327600588e+01,  4.37265356516784e+01,  4.36689860413004e+01,  4.36210151715515e+01,\n                                                4.35816299810309e+01,  4.35498323931157e+01,  4.35246379420741e+01,  4.35050933338190e+01,\n                                                4.34902925278852e+01,  4.34793909325162e+01,  4.34716173285821e+01,  4.34662831815438e+01,\n                                                4.34627890634213e+01,  4.34606279867803e+01,  4.34593855467791e+01,  4.34587368708209e+01,\n                                                4.34584404830643e+01,  4.34583292974035e+01,  4.34582990521720e+01,  4.34582945880379e+01,\n                                                4.34582939769609e+01,  4.34582795453912e+01,  4.34581817695176e+01,  4.34578223370742e+01,\n                                                4.34568642375934e+01,  4.34547675386948e+01,  4.34507524097701e+01,  4.34437710063020e+01,\n                                                4.34324897231130e+01,  4.34152831947706e+01,  4.33902412446097e+01,  4.33551897323779e+01,\n                                                4.33077258938919e+01,  4.32452682768345e+01,  4.31651207367529e+01,  4.30645491642545e+01,\n                                                4.29408686882618e+01,  4.27915380889247e+01,  4.26142571407589e+01,  4.24070617225809e+01,\n                                                4.21684109704708e+01,  4.18972607772939e+01,  4.15931188435403e+01,  4.12560784132876e+01,\n                                                4.08868305482364e+01,  4.04866574776964e+01,  4.00574109901631e+01,  3.96014791113394e+01,\n                                                3.91217417464665e+01,  3.86215131962319e+01,  3.81044685051019e+01,  3.75745524649242e+01,\n                                                3.70358740816596e+01,  3.64925935574870e+01,  3.59488114593738e+01,  3.54084697464134e+01,\n                                                3.48752718755050e+01,  3.43526253160486e+01,  3.38436057978370e+01,  3.33509395956492e+01,\n                                                3.28769986969632e+01,  3.24238037974055e+01,  3.19930312691124e+01,  3.15860218992435e+01,\n                                                3.12037906992116e+01,  3.08470380620763e+01,  3.05161628983334e+01,  3.02112782410319e+01,\n                                                2.99322294258627e+01,  2.96786145588092e+01,  2.94498067334930e+01,  2.92449773953140e+01,\n                                                2.90631203324696e+01,  2.89030759326738e+01,  2.87635555098919e+01,  2.86431656315794e+01,\n                                                2.85404324434875e+01,  2.84538259952786e+01,  2.83817845262265e+01,  2.83227385908702e+01,\n                                                2.82751348049634e+01,  2.82374588867703e+01,  2.82082575705634e+01,  2.81861588893371e+01,\n                                                2.81698902717077e+01,  2.81582938809224e+01,  2.81503386463095e+01,  2.81451285006084e+01,\n                                                2.81419064382137e+01,  2.81400541438410e+01,  2.81390871000031e+01,  2.81386452544254e+01,\n                                                2.81384795036616e+01,  2.81384344155074e+01,  2.81384277605929e+01,  2.81384271288581e+01,\n                                                2.81384142492859e+01,  2.81383269884294e+01,  2.81380062103934e+01,  2.81371511500791e+01,\n                                                2.81352799534715e+01,  2.81316967022091e+01,  2.81254663809101e+01,  2.81153991629380e+01,\n                                                2.81000452861076e+01,  2.80777016432783e+01,  2.80464309968708e+01,  2.80040944121415e+01,\n                                                2.79483970660637e+01,  2.78769470113094e+01,  2.77873257592396e+01,  2.76771687161424e+01,\n                                                2.75442526148846e+01,  2.73865862107477e+01,  2.72024997640035e+01,  2.69907283417952e+01,\n                                                2.67504838735268e+01,  2.64815113031417e+01,  2.61841251529194e+01,  2.58592242845859e+01,\n                                                2.55082843895181e+01,  2.51333293824538e+01,  2.47368839953393e+01,  2.43219102241192e+01,\n                                                2.38917299929920e+01,  2.34499359699717e+01,  2.30002925261554e+01,  2.25466297475504e+01,\n                                                2.20927350185814e+01,  2.16422483505348e+01,  2.11985685217549e+01,  2.07647766703220e+01,\n                                                2.03435821657340e+01,  1.99372928016762e+01,  1.95478082991148e+01,  1.91766334996971e+01,\n                                                1.88249059629688e+01,  1.84934321389603e+01,  1.81827267527162e+01,  1.78930511940210e+01,\n                                                1.76244481697927e+01,  1.73767713058371e+01,  1.71497095440926e+01,  1.69428069628645e+01,\n                                                1.67554790512294e+01,  1.65870265666660e+01,  1.64366479996325e+01,  1.63034514604618e+01,\n                                                1.61864665700954e+01,  1.60846567243579e+01,  1.59969319317386e+01,  1.59221622974116e+01,\n                                                1.58591921313819e+01,  1.58068545831956e+01,  1.57639866388366e+01,  1.57294442510324e+01,\n                                                1.57021173110175e+01,  1.56809441107278e+01,  1.56649248949545e+01,  1.56531340697436e+01,\n                                                1.56447306224670e+01,  1.56389663251128e+01,  1.56351913376696e+01,  1.56328569023924e+01,\n                                                1.56315149187506e+01,  1.56308143069524e+01,  1.56304941972523e+01,  1.56303741139611e+01,\n                                                1.56303414484801e+01,  1.56303366271267e+01,  1.56303361980606e+01,  1.56303277518452e+01,\n                                                1.56302705275941e+01,  1.56300601667093e+01,  1.56294994334641e+01,  1.56282723415308e+01,\n                                                1.56259225399453e+01,  1.56218369230758e+01,  1.56152353792630e+01,  1.56051675286475e+01,\n                                                1.55905172070146e+01,  1.55700153096635e+01,  1.55422613964927e+01,  1.55057541589593e+01,\n                                                1.54589304522433e+01,  1.54002121072908e+01,  1.53280591824730e+01,  1.52410277401974e+01,\n                                                1.51378297055936e+01,  1.50173919567562e+01,  1.48789115743416e+01,  1.47219041761269e+01,\n                                                1.45462424607042e+01,  1.43521824074233e+01,  1.41403749195167e+01,  1.39118609859011e+01,\n                                                1.36680487515910e+01,  1.34106715363860e+01,  1.31417273235821e+01,  1.28634029390717e+01,\n                                                1.25779897911561e+01,  1.22878013156017e+01,  1.19951031149940e+01,  1.17020637507565e+01,\n                                                1.14107278855955e+01,  1.11230068059931e+01,  1.08406774786174e+01,  1.05653816034458e+01,\n                                                1.02986195768752e+01,  1.00417385726820e+01,  9.79591715265830e+00,  9.56215016147166e+00,\n                                                9.34123738232240e+00,  9.13377822697753e+00,  8.94017328952990e+00,  8.76063236275489e+00,\n                                                8.59518770270494e+00,  8.44371094998869e+00,  8.30593209206092e+00,  8.18145906086144e+00,\n                                                8.06979689029694e+00,  7.97036571900662e+00,  7.88251725606087e+00,  7.80554959801303e+00,\n                                                7.73872048268023e+00,  7.68125918911410e+00,  7.63237735281525e+00,  7.59127897198152e+00,\n                                                7.55716984682488e+00,  7.52926663158575e+00,  7.50680559868861e+00,  7.48905112638616e+00,\n                                                7.47530383415904e+00,  7.46490821205889e+00,  7.45725952797916e+00,  7.45180975596902e+00,\n                                                7.44807225283108e+00,  7.44562492087782e+00,  7.44411163104107e+00,  7.44324173940117e+00,\n                                                7.44278760650653e+00,  7.44258011604360e+00,  7.44250228027656e+00,  7.44248110716158e+00,\n                                                7.44247798205782e+00,  7.44247770578261e+00,  7.44247228791220e+00,  7.44243558114005e+00,\n                                                7.44230064461762e+00,  7.44194096456664e+00,  7.44115387028195e+00,  7.43964670786643e+00,\n                                                7.43702641974681e+00,  7.43279316300524e+00,  7.42633857701300e+00,  7.41694926810242e+00,\n                                                7.40381600002133e+00,  7.38604894651919e+00,  7.36269916124435e+00,  7.33278613999570e+00,\n                                                7.29533098970927e+00,  7.24939428754661e+00,  7.19411723619254e+00,  7.12876423680266e+00,\n                                                7.05276456148490e+00,  6.96575047570486e+00,  6.86758900522855e+00,  6.75840462605121e+00,\n                                                6.63859052807685e+00,  6.50880678434145e+00,  6.36996472476202e+00,  6.22319799041523e+00,\n                                                6.06982199886068e+00,  5.91128470686066e+00,  5.74911242338369e+00,  5.58485484073361e+00,\n                                                5.42003332618079e+00,  5.25609586673173e+00,  5.09438101085845e+00,  4.93609190906204e+00,\n                                                4.78228035367466e+00,  4.63383975842456e+00,  4.49150542160775e+00,  4.35586020582993e+00,\n                                                4.22734387695973e+00,  4.10626465612809e+00,  3.99281192107352e+00,  3.88706934195771e+00,\n                                                3.78902799295962e+00,  3.69859913321937e+00,  3.61562642252963e+00,  3.53989736703676e+00,\n                                                3.47115381348376e+00,  3.40910134860713e+00,  3.35341751843384e+00,  3.30375885363745e+00,\n                                                3.25976675970624e+00,  3.22107239290006e+00,  3.18730068719426e+00,  3.15807372071635e+00,\n                                                3.13301361346816e+00,  3.11174513456008e+00,  3.09389817078350e+00,  3.07911017307328e+00,\n                                                3.06702865675840e+00,  3.05731378846862e+00,  3.04964104981930e+00,  3.04370392802599e+00,\n                                                3.03921654881080e+00,  3.03591613964284e+00,  3.03356519351598e+00,  3.03195319661598e+00,\n                                                3.03089778811811e+00,  3.03024523679119e+00,  3.02987014584303e+00,  3.02967433233440e+00,\n                                                3.02958486758215e+00,  3.02955130692126e+00,  3.02954217766971e+00,  3.02954083021356e+00,\n                                                3.02954070924992e+00,  3.02953831627234e+00,  3.02952210355585e+00,  3.02946250477508e+00,\n                                                3.02930364306731e+00,  3.02895601240525e+00,  3.02829038950817e+00,  3.02713327677133e+00,\n                                                3.02526417794093e+00,  3.02241500612486e+00,  3.01827191028579e+00,  3.01247977148635e+00,\n                                                3.00464955287031e+00,  2.99436857780925e+00,  2.98121365258039e+00,  2.96476674351019e+00,\n                                                2.94463267281483e+00,  2.92045803216234e+00,  2.89195025881880e+00,  2.85889561531287e+00,\n                                                2.82117470295539e+00,  2.77877416216502e+00,  2.73179339630813e+00,  2.68044550760225e+00,\n                                                2.62505213195883e+00,  2.56603245045947e+00,  2.50388725466850e+00,  2.43917944927092e+00,\n                                                2.37251269034861e+00,  2.30450991486153e+00,  2.23579330823403e+00,  2.16696684154577e+00,\n                                                2.09860199909917e+00,  2.03122683717324e+00,  1.96531816272240e+00,  1.90129643603763e+00,\n                                                1.83952296394509e+00,  1.78029900275983e+00,  1.72386646961608e+00,  1.67041002171394e+00,\n                                                1.62006028753284e+00,  1.57289802731482e+00,  1.52895897928571e+00,  1.48823913139772e+00,\n                                                1.45070015821985e+00,  1.41627478330813e+00,  1.38487186647926e+00,  1.35638106640800e+00,\n                                                1.33067698421504e+00,  1.30762274645230e+00,  1.28707303133117e+00,  1.26887657756009e+00,\n                                                1.25287824000109e+00,  1.23892067106470e+00,  1.22684571261905e+00,  1.21649558175766e+00,\n                                                1.20771392661496e+00,  1.20034681694059e+00,  1.19424371956059e+00,  1.18925849223418e+00,\n                                                1.18525041174543e+00,  1.18208523433207e+00,  1.17963626976025e+00,  1.17778543554576e+00,\n                                                1.17642424601814e+00,  1.17545468303233e+00,  1.17478989183972e+00,  1.17435464728868e+00,\n                                                1.17408554207640e+00,  1.17393085970926e+00,  1.17385010923302e+00,  1.17381321542228e+00,\n                                                1.17379937556306e+00,  1.17379561081249e+00,  1.17379505514418e+00,  1.17379500392147e+00,\n                                                1.17379397568322e+00,  1.17378700924554e+00,  1.17376140029810e+00,  1.17369313943031e+00,\n                                                1.17354376834432e+00,  1.17325776673254e+00,  1.17276060112407e+00,  1.17195756878280e+00,\n                                                1.17073357011974e+00,  1.16895393837563e+00,  1.16646644083372e+00,  1.16310453643754e+00,\n                                                1.15869192584614e+00,  1.15304835878396e+00,  1.14599657013955e+00,  1.13737010491737e+00,\n                                                1.12702167206806e+00,  1.11483155253629e+00,  1.10071549546303e+00,  1.08463148761567e+00,\n                                                1.06658479196167e+00,  1.04663073291531e+00,  1.02487485947452e+00,  1.00147033243554e+00,\n                                                9.76612635131644e-01,  9.50531966096570e-01,  9.23483899665975e-01,  8.95739062181647e-01,\n                                                8.67572642061226e-01,  8.39254521556022e-01,  8.11040694135926e-01,  7.83166437757608e-01,\n                                                7.55841485189165e-01,  7.29247205578979e-01,  7.03535619262951e-01,  6.78829932303167e-01,\n                                                6.55226206848617e-01,  6.32795773848557e-01,  6.11588032532921e-01,  5.91633348613577e-01,\n                                                5.72945842682131e-01,  5.55525937462122e-01,  5.39362598014947e-01,  5.24435248279268e-01,\n                                                5.10715380059359e-01,  4.98167889018902e-01,  4.86752179894403e-01,  4.76423083699316e-01,\n                                                4.67131626314128e-01,  4.58825682889369e-01,  4.51450547388838e-01,  4.44949442095890e-01,\n                                                4.39263988169813e-01,  4.34334655218734e-01,  4.30101205030091e-01,  4.26503141728467e-01,\n                                                4.23480177430491e-01,  4.20972718771608e-01,  4.18922375458855e-01,  4.17272487367377e-01,\n                                                4.15968661879539e-01,  4.14959308493877e-01,  4.14196153597466e-01,  4.13634715098759e-01,\n                                                4.13234714724219e-01,  4.12960405464915e-01,  4.12780793066226e-01,  4.12669733571349e-01,\n                                                4.12605893579013e-01,  4.12572565724773e-01,  4.12557338495169e-01,  4.12551626323356e-01,\n                                                4.12550072482404e-01,  4.12549843139040e-01,  4.12549821282859e-01,  4.12549374789911e-01,\n                                                4.12546349744837e-01,  4.12535229513466e-01,  4.12505588244819e-01,  4.12440725067853e-01,\n                                                4.12316527365675e-01,  4.12100618590948e-01,  4.11751845967316e-01,  4.11220162633832e-01,\n                                                4.10446955906444e-01,  4.09365866533882e-01,  4.07904131149550e-01,  4.05984459846437e-01,\n                                                4.03527431937043e-01,  4.00454355794743e-01,  3.96690495256472e-01,  3.92168519465244e-01,\n                                                3.86831991171867e-01,  3.80638677469349e-01,  3.73563453649226e-01,  3.65600580526184e-01,\n                                                3.56765170007456e-01,  3.47093710363794e-01,  3.36643594781947e-01,  3.25491674537055e-01,\n                                                3.13731930953949e-01,  3.01472419390350e-01,  2.88831678524204e-01,  2.75934818199616e-01,\n                                                2.62909501325268e-01,  2.49882023877397e-01,  2.36973675911010e-01,  2.24297538410624e-01,\n                                                2.11955837283213e-01,  2.00037937660703e-01,  1.88619020126040e-01,  1.77759437684827e-01,\n                                                1.67504711481698e-01,  1.57886088077355e-01,  1.48921554832995e-01,  1.40617194687088e-01,\n                                                1.32968757830639e-01,  1.25963334377857e-01,  1.19581026774085e-01,  1.13796540466119e-01,\n                                                1.08580633331819e-01,  1.03901386004353e-01,  9.97252746680388e-02,  9.60180440271046e-02,\n                                                9.27453904951179e-02,  8.98734742798410e-02,  8.73692843383793e-02,  8.52008827145099e-02,\n                                                8.33375551408437e-02,  8.17498935471619e-02,  8.04098337224204e-02,  7.92906681942895e-02,\n                                                7.83670506876035e-02,  7.76150045137243e-02,  7.70119430971405e-02,  7.65367067294065e-02,\n                                                7.61696157234866e-02,  7.58925366082011e-02,  7.56889550429776e-02,  7.55440469272344e-02,\n                                                7.54447378718694e-02,  7.53797408768193e-02,  7.53395627243236e-02,  7.53164711670919e-02,\n                                                7.53044172918607e-02,  7.52989102330446e-02,  7.52968444189790e-02,  7.52962824744401e-02,\n                                                7.52961995328505e-02,  7.52961913234813e-02,  7.52960204154718e-02,  7.52948624969534e-02,\n                                                7.52906059919169e-02,  7.52792606794301e-02,  7.52544366476826e-02,  7.52069144564516e-02,\n                                                7.51243317695724e-02,  7.49910139501466e-02,  7.47879781733332e-02,  7.44931414187633e-02,\n                                                7.40817608698947e-02,  7.35271292613078e-02,  7.28015362080612e-02,  7.18774886508484e-02,\n                                                7.07291592682964e-02,  6.93340023191595e-02,  6.76744446650872e-02,  6.57395299679635e-02,\n                                                6.35263716669670e-02,  6.10412610744149e-02,  5.83002857471655e-02,  5.53293430291788e-02,\n                                                5.21634838562122e-02,  4.88455880961709e-02,  4.54244465538594e-02,  4.19523952581429e-02,\n                                                3.84827030459647e-02,  3.50669438404339e-02,  3.17525846164131e-02,  2.85809887265458e-02,\n                                                2.55859776955560e-02,  2.27930229811406e-02,  2.02190649030953e-02,  1.78728907108976e-02,\n                                                1.57559563282419e-02,  1.38635109943976e-02,  1.21858805295787e-02,  1.07097793342916e-02,\n                                                9.41954745967877e-03,  8.29824070138585e-03,  7.32853308546311e-03,  6.49341832078676e-03,\n                                                5.77671756729359e-03,  5.16341460872383e-03,  4.63984684454744e-03,  4.19378276433946e-03,\n                                                3.81441527740378e-03,  3.49229683396857e-03,  3.21923778906807e-03,  2.98818473399365e-03,\n                                                2.79309111900972e-03,  2.62878875178529e-03,  2.49086580089397e-03,  2.37555472022422e-03,\n                                                2.27963190786795e-03,  2.20032978864992e-03,  2.13526125195074e-03,  2.08235589983730e-03,\n                                                2.03980728615960e-03,  2.00603018095080e-03,  1.97962681194497e-03,  1.95936097601646e-03,\n                                                1.94413885559186e-03,  1.93299532105584e-03,  1.92508445856276e-03,  1.91967305090657e-03,\n                                                1.91613577256078e-03,  1.91395094839208e-03,  1.91269587408982e-03,  1.91204089708918e-03,\n                                                1.91174169772523e-03,  1.91162946823198e-03,  1.91159894007598e-03,  1.91159443422606e-03,\n                                                1.91159396943874e-03,  1.91158410304126e-03,  1.91151725795180e-03,  1.91127154705129e-03,\n                                                1.91061671525006e-03,  1.90918435868781e-03,  1.90644400755957e-03,  1.90168721110240e-03,\n                                                1.89402226025948e-03,  1.88238265257468e-03,  1.86555265260324e-03,  1.84221308114729e-03,\n                                                1.81100950286606e-03,  1.77064304102714e-03,  1.71998102674564e-03,  1.65818073001134e-03,\n                                                1.58481499899921e-03,  1.49998460899070e-03,  1.40439963620764e-03,  1.29941242737175e-03,\n                                                1.18698861329136e-03,  1.06961025230845e-03,  9.50115666583429e-04,  8.31491865014300e-04,\n                                                7.16644966850311e-04,  6.08179184297342e-04,  5.08214089336434e-04,  4.18263073591163e-04,\n                                                3.39184758693989e-04,  2.71206372893573e-04,  2.14006721265037e-04,  1.66838655040635e-04,\n                                                1.28668100401796e-04,  9.83087160051355e-05,  7.45369104890869e-05,  5.61792019482255e-05,\n                                                4.21704737973982e-05,  3.15859818300623e-05,  2.36519715599570e-05,  1.77408248092092e-05,\n                                                1.33565671873725e-05,  1.01135783054929e-05,  7.71066930838060e-06,  5.91036673114331e-06,\n                                                4.53168866698661e-06,  3.44481890834913e-06,  2.56094887163272e-06,  1.84420978399658e-06,\n                                                1.36355870239413e-06,  1.21132951846903e-06,  1.18669841953079e-06,  1.08357773598300e-06,\n                                                8.75823559454147e-07,  6.08094048004659e-07,  -1.42108547152020e-14, -2.13162820728030e-14,\n                                                -2.13162820728030e-14, -1.42108547152020e-14, -1.42108547152020e-14, -7.10542735760100e-15,\n                                                -7.10542735760100e-15, -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14,\n                                                -7.10542735760100e-15, -1.42108547152020e-14, -1.42108547152020e-14, -7.10542735760100e-15,\n                                                -1.42108547152020e-14, -2.13162820728030e-14, -7.10542735760100e-15}),\nmadness::CubicInterpolationTable<double>(grid, {5.30000000000000e+01,  5.29999997960310e+01,  5.29999934889052e+01,  5.29999507570926e+01,\n                                                5.29997936688259e+01,  5.29993749168667e+01,  5.29984584259763e+01,  5.29967029970706e+01,\n                                                5.29936495439089e+01,  5.29887123492295e+01,  5.29811746266492e+01,  5.29701885358730e+01,\n                                                5.29547796792097e+01,  5.29338560264994e+01,  5.29062211907446e+01,  5.28705920169736e+01,\n                                                5.28256205446943e+01,  5.27699205282942e+01,  5.27020987911714e+01,  5.26207916669714e+01,\n                                                5.25247065577026e+01,  5.24126681480106e+01,  5.22836680475593e+01,  5.21369156643057e+01,\n                                                5.19718871107807e+01,  5.17883681581442e+01,  5.15864869430224e+01,  5.13667325047787e+01,\n                                                5.11299563526747e+01,  5.08773560139856e+01,  5.06104415965379e+01,  5.03309884006798e+01,\n                                                5.00409801217158e+01,  4.97425478932331e+01,  4.94379102298611e+01,  4.91293179481763e+01,\n                                                4.88190066635280e+01,  4.85091578476400e+01,  4.82018680339845e+01,  4.78991248160558e+01,\n                                                4.76027878905279e+01,  4.73145735016830e+01,  4.70360410910543e+01,  4.67685815481485e+01,\n                                                4.65134070095361e+01,  4.62715425365808e+01,  4.60438201650778e+01,  4.58308757829408e+01,\n                                                4.56331491221669e+01,  4.54508869314845e+01,  4.52841491963345e+01,  4.51328181340094e+01,\n                                                4.49966096235213e+01,  4.48750867189286e+01,  4.47676749178009e+01,  4.46736788898120e+01,\n                                                4.45923003970218e+01,  4.45226571482743e+01,  4.44638023232780e+01,  4.44147444800474e+01,\n                                                4.43744675277088e+01,  4.43419504113767e+01,  4.43161861230524e+01,  4.42961996278807e+01,\n                                                4.42810642834002e+01,  4.42699163343719e+01,  4.42619670898425e+01,  4.42565124333955e+01,\n                                                4.42529393816044e+01,  4.42507294875379e+01,  4.42494589823394e+01,  4.42487956538115e+01,\n                                                4.42484925711730e+01,  4.42483788740307e+01,  4.42483479456152e+01,  4.42483433806446e+01,\n                                                4.42483427557645e+01,  4.42483279982125e+01,  4.42482280137655e+01,  4.42478604624484e+01,\n                                                4.42468807216121e+01,  4.42447366640817e+01,  4.42406308489934e+01,  4.42334917767941e+01,\n                                                4.42219557535460e+01,  4.42043607775742e+01,  4.41787536812263e+01,  4.41429115029180e+01,\n                                                4.40943776979270e+01,  4.40305132917455e+01,  4.39485624180299e+01,  4.38457308619266e+01,\n                                                4.37192752703028e+01,  4.35665996459124e+01,  4.33853547059826e+01,  4.31735348039448e+01,\n                                                4.29295665999950e+01,  4.26523837969814e+01,  4.23414832998664e+01,  4.19969601923222e+01,\n                                                4.16195216016469e+01,  4.12104819355954e+01,  4.07717429577839e+01,  4.03057610737558e+01,\n                                                3.98155016275693e+01,  3.93043777182964e+01,  3.87761708659180e+01,  3.82349334093797e+01,\n                                                3.76848768049830e+01,  3.71302540639581e+01,  3.65752466617696e+01,  3.60238655982703e+01,\n                                                3.54798732671189e+01,  3.49467285704502e+01,  3.44275536648713e+01,  3.39251179181117e+01,\n                                                3.34418335720897e+01,  3.29797581121375e+01,  3.25405998622837e+01,  3.21257251345944e+01,\n                                                3.17361667383748e+01,  3.13726344654642e+01,  3.10355282921192e+01,  3.07249546922272e+01,\n                                                3.04407459448253e+01,  3.01824818952085e+01,  2.99495134226351e+01,  2.97409868829227e+01,\n                                                2.95558689576706e+01,  2.93929715596587e+01,  2.92509766413407e+01,  2.91284608887632e+01,\n                                                2.90239203449198e+01,  2.89357950014895e+01,  2.88624933416264e+01,  2.88024167262840e+01,\n                                                2.87539834086543e+01,  2.87156518498815e+01,  2.86859429067184e+01,  2.86634603790514e+01,\n                                                2.86469093513847e+01,  2.86351117444894e+01,  2.86270185158995e+01,  2.86217180119674e+01,\n                                                2.86184400775159e+01,  2.86165556660410e+01,  2.86155718552782e+01,  2.86151223490044e+01,\n                                                2.86149537244896e+01,  2.86149078546092e+01,  2.86149010843137e+01,  2.86149004416260e+01,\n                                                2.86148873387515e+01,  2.86147985649941e+01,  2.86144722254460e+01,  2.86136023407340e+01,\n                                                2.86116987040939e+01,  2.86080533370109e+01,  2.86017150293109e+01,  2.85914733665356e+01,\n                                                2.85758535426230e+01,  2.85531231076515e+01,  2.85213115807998e+01,  2.84782435378022e+01,\n                                                2.84215853336742e+01,  2.83489050293198e+01,  2.82577443562971e+01,  2.81457007032984e+01,\n                                                2.80105161958037e+01,  2.78501700532257e+01,  2.76629696607311e+01,  2.74476353206365e+01,\n                                                2.72033735869056e+01,  2.69299345412622e+01,  2.66276493692796e+01,  2.62974460396943e+01,\n                                                2.59408425250291e+01,  2.55599184580156e+01,  2.51572670539304e+01,  2.47359294242917e+01,\n                                                2.42993132961626e+01,  2.38510981489066e+01,  2.33951293936333e+01,  2.29353056038747e+01,\n                                                2.24754645986491e+01,  2.20192756484878e+01,  2.15701454762082e+01,  2.11311446590574e+01,\n                                                2.07049586278382e+01,  2.02938642703864e+01,  1.98997299576464e+01,  1.95240343252263e+01,\n                                                1.91678977906693e+01,  1.88321206469858e+01,  1.85172224282352e+01,  1.82234787019946e+01,\n                                                1.79509530826528e+01,  1.76995237321943e+01,  1.74689047102157e+01,  1.72586631828207e+01,\n                                                1.70682337432527e+01,  1.68969310434859e+01,  1.67439617123215e+01,  1.66084362527619e+01,\n                                                1.64893813460723e+01,  1.63857527805266e+01,  1.62964490770132e+01,  1.62203257897716e+01,\n                                                1.61562103991456e+01,  1.61029176657366e+01,  1.60592652686067e+01,  1.60240894980899e+01,\n                                                1.59962607165228e+01,  1.59746982425868e+01,  1.59583842643265e+01,  1.59463763503483e+01,\n                                                1.59378181154370e+01,  1.59319476111179e+01,  1.59281030560634e+01,  1.59257255951448e+01,\n                                                1.59243588757567e+01,  1.59236453495917e+01,  1.59233193391932e+01,  1.59231970423434e+01,\n                                                1.59231637747205e+01,  1.59231588644922e+01,  1.59231584275169e+01,  1.59231498256073e+01,\n                                                1.59230915465058e+01,  1.59228773078862e+01,  1.59223062380783e+01,  1.59210565251085e+01,\n                                                1.59186634026075e+01,  1.59145024537228e+01,  1.59077791627792e+01,  1.58975255787278e+01,\n                                                1.58826048592899e+01,  1.58617243207724e+01,  1.58334574053107e+01,  1.57962746773843e+01,\n                                                1.57485835658872e+01,  1.56887760817399e+01,  1.56152831872790e+01,  1.55266339155343e+01,\n                                                1.54215167942125e+01,  1.52988406857685e+01,  1.51577918655313e+01,  1.49978840490958e+01,\n                                                1.48189981317823e+01,  1.46214085697738e+01,  1.44057935820343e+01,  1.41732267463513e+01,\n                                                1.39251483362318e+01,  1.36633162892571e+01,  1.33897393371777e+01,  1.31065983768135e+01,\n                                                1.28161655159771e+01,  1.25207315474728e+01,  1.22225503860427e+01,  1.19238034923382e+01,\n                                                1.16265808602250e+01,  1.13328708422353e+01,  1.10445506642057e+01,  1.07633723733510e+01,\n                                                1.04909431263205e+01,  1.02287021404205e+01,  9.97789828688406e+00,  9.73957223281069e+00,\n                                                9.51454585423203e+00,  9.30342006116244e+00,  9.10658073212538e+00,  8.92421143280116e+00,\n                                                8.75631106080213e+00,  8.60271445215751e+00,  8.46311418091040e+00,  8.33708214938181e+00,\n                                                8.22408999244514e+00,  8.12352772639713e+00,  8.03472041586166e+00,  7.95694289096002e+00,\n                                                7.88943272010499e+00,  7.83140174003860e+00,  7.78204647757133e+00,  7.74055778126991e+00,\n                                                7.70612992950152e+00,  7.67796940559417e+00,  7.65530344167615e+00,  7.63738833900710e+00,\n                                                7.62351748234327e+00,  7.61302888627920e+00,  7.60531204883170e+00,  7.59981384681018e+00,\n                                                7.59604319215150e+00,  7.59357417977980e+00,  7.59204749481058e+00,  7.59116990691114e+00,\n                                                7.59071175721193e+00,  7.59050243174282e+00,  7.59042390765094e+00,  7.59040254729958e+00,\n                                                7.59039939456030e+00,  7.59039911584195e+00,  7.59039365006093e+00,  7.59035661869103e+00,\n                                                7.59022048896731e+00,  7.58985762869796e+00,  7.58906357670391e+00,  7.58754309756191e+00,\n                                                7.58489967690810e+00,  7.58062909974716e+00,  7.57411773270514e+00,  7.56464608868405e+00,\n                                                7.55139817206202e+00,  7.53347696632640e+00,  7.50992621756166e+00,  7.47975837576687e+00,\n                                                7.44198818007742e+00,  7.39567092494430e+00,  7.33994394885599e+00,  7.27406938826725e+00,\n                                                7.19747579509376e+00,  7.10979589558843e+00,  7.01089764465739e+00,  6.90090586897884e+00,\n                                                6.78021224042103e+00,  6.64947208784336e+00,  6.50958759937829e+00,  6.36167818852639e+00,\n                                                6.20704003995312e+00,  6.04709792348313e+00,  5.88335307817309e+00,  5.71733118258392e+00,\n                                                5.55053409515806e+00,  5.38439823773051e+00,  5.22026137845086e+00,  5.05933838232419e+00,\n                                                4.90270547090572e+00,  4.75129183569014e+00,  4.60587714608815e+00,  4.46709353654413e+00,\n                                                4.33543092215459e+00,  4.21124482326173e+00,  4.09476614716268e+00,  3.98611251153027e+00,\n                                                3.88530070230789e+00,  3.79225979344601e+00,  3.70684438893176e+00,  3.62884743538102e+00,\n                                                3.55801211819857e+00,  3.49404248442328e+00,  3.43661259898488e+00,  3.38537420278128e+00,\n                                                3.33996297402756e+00,  3.30000358553986e+00,  3.26511379892722e+00,  3.23490784867836e+00,\n                                                3.20899935448255e+00,  3.18700396815976e+00,  3.16854191972816e+00,  3.15324058059952e+00,\n                                                3.14073711404525e+00,  3.13068123616641e+00,  3.12273806636647e+00,  3.11659100642740e+00,\n                                                3.11194455348668e+00,  3.10852692634517e+00,  3.10609236832982e+00,  3.10442298473249e+00,\n                                                3.10332997931872e+00,  3.10265417232065e+00,  3.10226571046894e+00,  3.10206291579447e+00,\n                                                3.10197026121007e+00,  3.10193550392009e+00,  3.10192604915521e+00,  3.10192465365391e+00,\n                                                3.10192452837718e+00,  3.10192205007509e+00,  3.10190525927194e+00,  3.10184353537504e+00,\n                                                3.10167900882363e+00,  3.10131898046287e+00,  3.10062961323400e+00,  3.09943120495793e+00,\n                                                3.09749535087970e+00,  3.09454430088194e+00,  3.09025280089123e+00,  3.08425267076576e+00,\n                                                3.07614030076954e+00,  3.06548713566371e+00,  3.05185305328408e+00,  3.03480233369966e+00,\n                                                3.01392166555082e+00,  2.98883936914041e+00,  2.95924476393080e+00,  2.92490641296501e+00,\n                                                2.88568788358253e+00,  2.84155971277143e+00,  2.79260648086730e+00,  2.73902827663179e+00,\n                                                2.68113634317237e+00,  2.61934325615529e+00,  2.55414850775097e+00,  2.48612075448136e+00,\n                                                2.41587816475372e+00,  2.34406825493806e+00,  2.27134837458738e+00,  2.19836767997450e+00,\n                                                2.12575111908855e+00,  2.05408571231681e+00,  1.98390927438659e+00,  1.91570166195921e+00,\n                                                1.84987860072637e+00,  1.78678810213039e+00,  1.72670940069769e+00,  1.66985423206788e+00,\n                                                1.61637015091689e+00,  1.56634548437581e+00,  1.51981545187117e+00,  1.47676896665342e+00,\n                                                1.43715566573830e+00,  1.40089278290709e+00,  1.36787156898614e+00,  1.33796306004271e+00,\n                                                1.31102308537228e+00,  1.28689648520453e+00,  1.26542056893007e+00,  1.24642788760201e+00,\n                                                1.22974842093751e+00,  1.21521129163494e+00,  1.20264612149116e+00,  1.19188413734467e+00,\n                                                1.18275912264199e+00,  1.17510829428799e+00,  1.16877316581024e+00,  1.16360043784643e+00,\n                                                1.15944293648776e+00,  1.15616059996771e+00,  1.15362149550377e+00,  1.15170283175380e+00,\n                                                1.15029191932900e+00,  1.14928702301343e+00,  1.14859804547639e+00,  1.14814698369408e+00,\n                                                1.14786810596324e+00,  1.14770780876225e+00,  1.14762412782098e+00,  1.14758589528128e+00,\n                                                1.14757155325497e+00,  1.14756765190621e+00,  1.14756707607639e+00,  1.14756702299517e+00,\n                                                1.14756595744910e+00,  1.14755873824853e+00,  1.14753220016408e+00,  1.14746146291164e+00,\n                                                1.14730667411222e+00,  1.14701030380231e+00,  1.14649512842857e+00,  1.14566304514565e+00,\n                                                1.14439485869038e+00,  1.14255117903122e+00,  1.13997455315724e+00,  1.13649292309071e+00,\n                                                1.13192444937832e+00,  1.12608366170367e+00,  1.11878879597970e+00,  1.10987005512353e+00,\n                                                1.09917839908212e+00,  1.08659434454439e+00,  1.07203615644459e+00,  1.05546676371230e+00,\n                                                1.03689875019672e+00,  1.01639687053217e+00,  9.94077720572079e-01,  9.70106439107816e-01,\n                                                9.44690603614404e-01,  9.18071768336780e-01,  8.90515334376040e-01,  8.62299599241531e-01,\n                                                8.33704881578974e-01,  8.05003549112051e-01,  7.76451609393703e-01,  7.48282286927193e-01,\n                                                7.20701749827946e-01,  6.93886907692850e-01,  6.67985013713874e-01,  6.43114687183086e-01,\n                                                6.19367929787153e-01,  5.96812729246864e-01,  5.75495907460137e-01,  5.55445955664510e-01,\n                                                5.36675687221397e-01,  5.19184615960825e-01,  5.02961027457665e-01,  4.87983750481561e-01,\n                                                4.74223658339156e-01,  4.61644939061053e-01,  4.50206173989748e-01,  4.39861260359656e-01,\n                                                4.30560207936303e-01,  4.22249834562166e-01,  4.14874381413441e-01,  4.08376066056263e-01,\n                                                4.02695589709801e-01,  3.97772613987499e-01,  3.93546221269368e-01,  3.89955371316397e-01,\n                                                3.86939364465789e-01,  3.84438318602605e-01,  3.82393663114421e-01,  3.80748648378116e-01,\n                                                3.79448864305829e-01,  3.78442756487971e-01,  3.77682123961783e-01,  3.77122579056042e-01,\n                                                3.76723947515345e-01,  3.76450586494869e-01,  3.76271599197494e-01,  3.76160927891959e-01,\n                                                3.76097311620079e-01,  3.76064100727731e-01,  3.76048926975443e-01,  3.76043234870728e-01,\n                                                3.76041686489067e-01,  3.76041457951487e-01,  3.76041436172109e-01,  3.76040991247933e-01,\n                                                3.76037976832038e-01,  3.76026895682266e-01,  3.75997358649400e-01,  3.75932723887047e-01,\n                                                3.75808964765426e-01,  3.75593822253165e-01,  3.75246297700876e-01,  3.74716541489100e-01,\n                                                3.73946190423872e-01,  3.72869200206807e-01,  3.71413206756252e-01,  3.69501429845577e-01,\n                                                3.67055103422693e-01,  3.63996379333493e-01,  3.60251607003875e-01,  3.55754844963265e-01,\n                                                3.50451416794385e-01,  3.44301291203585e-01,  3.37282050381305e-01,  3.29391217966034e-01,\n                                                3.20647749875704e-01,  3.11092546063847e-01,  3.00787912878668e-01,  2.89815985251479e-01,\n                                                2.78276195610871e-01,  2.66281943605854e-01,  2.53956671558086e-01,  2.41429582367239e-01,\n                                                2.28831249285847e-01,  2.16289361949620e-01,  2.03924832167296e-01,  1.91848448193049e-01,\n                                                1.80158219833814e-01,  1.68937501975705e-01,  1.58253925364178e-01,  1.48159106138728e-01,\n                                                1.38689055314195e-01,  1.29865170876400e-01,  1.21695671415587e-01,  1.14177321995463e-01,\n                                                1.07297308810203e-01,  1.01035136043180e-01,  9.53644422990010e-02,  9.02546610856945e-02,\n                                                8.56724766928707e-02,  8.15830509644044e-02,  7.79510164097985e-02,  7.47412462379131e-02,\n                                                7.19194223255073e-02,  6.94524284005240e-02,  6.73085986066297e-02,  6.54578519472508e-02,\n                                                6.38717416373211e-02,  6.25234457361472e-02,  6.13877220606369e-02,  6.04408466085289e-02,\n                                                5.96605507710066e-02,  5.90259686189896e-02,  5.85176016079103e-02,  5.81173042498762e-02,\n                                                5.78082907558723e-02,  5.75751594780414e-02,  5.74039293287072e-02,  5.72820803626968e-02,\n                                                5.71985895094187e-02,  5.71439521065287e-02,  5.71101804318488e-02,  5.70907717826614e-02,\n                                                5.70806406648714e-02,  5.70760121178182e-02,  5.70742758619005e-02,  5.70738035649825e-02,\n                                                5.70737338551979e-02,  5.70737269554868e-02,  5.70735833127145e-02,  5.70726101198389e-02,\n                                                5.70690326802179e-02,  5.70594974638183e-02,  5.70386345649041e-02,  5.69986975802692e-02,\n                                                5.69293030095821e-02,  5.68172936367048e-02,  5.66467525646814e-02,  5.63991955957377e-02,\n                                                5.60539681228533e-02,  5.55888671608997e-02,  5.49809982604685e-02,  5.42078599807496e-02,\n                                                5.32486254095019e-02,  5.20855622543763e-02,  5.07055031656520e-02,  4.91012505594881e-02,\n                                                4.72727807556197e-02,  4.52281063995983e-02,  4.29836685693701e-02,  4.05641629204752e-02,\n                                                3.80017563675281e-02,  3.53347166445701e-02,  3.26055474014453e-02,  2.98587847807639e-02,\n                                                2.71386562741611e-02,  2.44868204087467e-02,  2.19403927652451e-02,  1.95304222937693e-02,\n                                                1.72809197324284e-02,  1.52084686546061e-02,  1.33223816572965e-02,  1.16253099665897e-02,\n                                                1.01141808602208e-02,  8.78132562317546e-03,  7.61566874086839e-03,  6.60387120498029e-03,\n                                                5.73135050976248e-03,  4.98313101310544e-03,  4.34450626531913e-03,  3.80151699153686e-03,\n                                                3.34126361319420e-03,  2.95208068199315e-03,  2.62360339588952e-03,  2.34675503320148e-03,\n                                                2.11368042506876e-03,  1.91764599257738e-03,  1.75292235165614e-03,  1.61466141125288e-03,\n                                                1.49877630791906e-03,  1.40182944022627e-03,  1.32093138181943e-03,  1.25365166554303e-03,\n                                                1.19794134184303e-03,  1.15206667609868e-03,  1.11455314404196e-03,  1.08413882314551e-03,\n                                                1.05973625353784e-03,  1.04040182484511e-03,  1.02531173845222e-03,  1.01374360389173e-03,\n                                                1.00506274875301e-03,  9.98712347382025e-04,  9.94206497850314e-04,  9.91125406947901e-04,\n                                                9.89111884457827e-04,  9.87868415052162e-04,  9.87154170879023e-04,  9.86781452908758e-04,\n                                                9.86611196495346e-04,  9.86547334164811e-04,  9.86529962688110e-04,  9.86527398715964e-04,\n                                                9.86527134230641e-04,  9.86521519784844e-04,  9.86483481845823e-04,  9.86343662148670e-04,\n                                                9.85971044727307e-04,  9.85156039980950e-04,  9.83596967159883e-04,  9.80891221793456e-04,\n                                                9.76532734235036e-04,  9.69917624608740e-04,  9.60360113687386e-04,  9.47120595100159e-04,\n                                                9.29447134339512e-04,  9.06630383710194e-04,  8.78069932326753e-04,  8.43347557292873e-04,\n                                                8.02300049976168e-04,  7.55081855878359e-04,  7.02206464922028e-04,  6.44556102734839e-04,\n                                                5.83352315658203e-04,  5.20085462824227e-04,  4.56408128641783e-04,  3.94004553001537e-04,\n                                                3.34453508507693e-04,  2.79104053298340e-04,  2.28981528287875e-04,  1.84735492808841e-04,\n                                                1.46633471068469e-04,  1.14596342676521e-04,  8.82647201905229e-05,  6.70819206476381e-05,\n                                                5.03787373631326e-05,  3.74480580234149e-05,  2.76024961678445e-05,  2.02136752633919e-05,\n                                                1.47354035462399e-05,  1.07136815472586e-05,  7.78555452285445e-06,  5.66881498542671e-06,\n                                                4.14650106961290e-06,  3.05190437899228e-06,  2.25824796018514e-06,  1.67239567616662e-06,\n                                                1.22845878536282e-06,  8.78925931147023e-07,  5.85355309112856e-07,  -2.84217094304040e-14,\n                                                -1.42108547152020e-14, -2.13162820728030e-14, 4.15732813507930e-07,  4.36778812229477e-07,\n                                                4.06696017307695e-07,  -2.13162820728030e-14, -1.42108547152020e-14, -2.13162820728030e-14,\n                                                -2.13162820728030e-14, -2.13162820728030e-14, -1.42108547152020e-14, -2.13162820728030e-14,\n                                                -2.13162820728030e-14, -2.13162820728030e-14, -2.13162820728030e-14, -2.13162820728030e-14,\n                                                -1.42108547152020e-14, -2.13162820728030e-14, -1.42108547152020e-14, -2.13162820728030e-14,\n                                                -2.84217094304040e-14, -2.84217094304040e-14, -2.13162820728030e-14, -2.13162820728030e-14,\n                                                -1.42108547152020e-14, -2.13162820728030e-14, -2.13162820728030e-14}),\nmadness::CubicInterpolationTable<double>(grid, {5.40000000000000e+01, 5.39999997905809e+01, 5.39999933149266e+01, 5.39999494413054e+01, 5.39997881555779e+01,\n                                                5.39993582143335e+01, 5.39984172339593e+01, 5.39966148970830e+01, 5.39934798465976e+01, 5.39884107048766e+01,\n                                                5.39806715113544e+01, 5.39693917294342e+01, 5.39535708518747e+01, 5.39320875526911e+01, 5.39037133112989e+01,\n                                                5.38671304802815e+01, 5.38209548734513e+01, 5.37637630821063e+01, 5.36941248220162e+01, 5.36106405856160e+01,\n                                                5.35119846312275e+01, 5.33969528158472e+01, 5.32645139622759e+01, 5.31138624280815e+01, 5.29444684969342e+01,\n                                                5.27561224034675e+01, 5.25489675095735e+01, 5.23235185841644e+01, 5.20806623607724e+01, 5.18216394195233e+01,\n                                                5.15480086348816e+01, 5.12615975072484e+01, 5.09644432194552e+01, 5.06587299218678e+01, 5.03467274596493e+01,\n                                                5.00307356519708e+01, 4.97130366339428e+01, 4.93958560746528e+01, 4.90813326525419e+01, 4.87714942455092e+01,\n                                                4.84682389592077e+01, 4.81733193019880e+01, 4.78883283419919e+01, 4.76146873329830e+01, 4.73536348742513e+01,\n                                                4.71062180467060e+01, 4.68732860980754e+01, 4.66554871682053e+01, 4.64532683325739e+01, 4.62668789919025e+01,\n                                                4.60963774225523e+01, 4.59416401653867e+01, 4.58023738740691e+01, 4.56781292478451e+01, 4.55683167102264e+01,\n                                                4.54722235376251e+01, 4.53890321733464e+01, 4.53178394742636e+01, 4.52576766292626e+01, 4.52075294640680e+01,\n                                                4.51663588124899e+01, 4.51331205961700e+01, 4.51067852199973e+01, 4.50863558642101e+01, 4.50708852416004e+01,\n                                                4.50594903928902e+01, 4.50513651177277e+01, 4.50457896838953e+01, 4.50421375227471e+01, 4.50398787025330e+01,\n                                                4.50385800696099e+01, 4.50379020558608e+01, 4.50375922634202e+01, 4.50374760491989e+01, 4.50374444360769e+01,\n                                                4.50374397700450e+01, 4.50374391313311e+01, 4.50374240470702e+01, 4.50373218491274e+01, 4.50369461608406e+01,\n                                                4.50359447304054e+01, 4.50337532086359e+01, 4.50295565050239e+01, 4.50222594118409e+01, 4.50104680782492e+01,\n                                                4.49924837821931e+01, 4.49663102639631e+01, 4.49296756214393e+01, 4.48800693899976e+01, 4.48147949097587e+01,\n                                                4.47310363992014e+01, 4.46259393048742e+01, 4.44967015056312e+01, 4.43406718747776e+01, 4.41554516485436e+01,\n                                                4.39389931770510e+01, 4.36896901750305e+01, 4.34064538236094e+01, 4.30887702397592e+01, 4.27367369320529e+01,\n                                                4.23510784456287e+01, 4.19331435075058e+01, 4.14848865494579e+01, 4.10088351131589e+01, 4.05080421846201e+01,\n                                                3.99860207651907e+01, 3.94466585607709e+01, 3.88941138244628e+01, 3.83326978624477e+01, 3.77667535209622e+01,\n                                                3.72005404943319e+01, 3.66381369826925e+01, 3.60833636716438e+01, 3.55397315072883e+01, 3.50104107157933e+01,\n                                                3.44982159898704e+01, 3.40056021027752e+01, 3.35346651387582e+01, 3.30871463521487e+01, 3.26644375838801e+01,\n                                                3.22675885523324e+01, 3.18973169193810e+01, 3.15540218921541e+01, 3.12378015658886e+01, 3.09484736005880e+01,\n                                                3.06855984087489e+01, 3.04485039048757e+01, 3.02363109847534e+01, 3.00479591522947e+01, 2.98822319833524e+01,\n                                                2.97377823348775e+01, 2.96131573423739e+01, 2.95068232980219e+01, 2.94171904814317e+01, 2.93426379448467e+01,\n                                                2.92815381537217e+01, 2.92322812681106e+01, 2.91932987337390e+01, 2.91630857457263e+01, 2.91402220629385e+01,\n                                                2.91233905957852e+01, 2.91113931718409e+01, 2.91031629063671e+01, 2.90977726698559e+01, 2.90944392497966e+01,\n                                                2.90925229432191e+01, 2.90915224813858e+01, 2.90910653673395e+01, 2.90908938889253e+01, 2.90908472427187e+01,\n                                                2.90908403578392e+01, 2.90908397042744e+01, 2.90908263796401e+01, 2.90907361034322e+01, 2.90904042407866e+01,\n                                                2.90895196340569e+01, 2.90875837813430e+01, 2.90838767269738e+01, 2.90774311769301e+01, 2.90670162688143e+01,\n                                                2.90511323204701e+01, 2.90280177313418e+01, 2.89956689873915e+01, 2.89518743929967e+01, 2.88942616945827e+01,\n                                                2.88203591544633e+01, 2.87276688814870e+01, 2.86137503551937e+01, 2.84763111506886e+01, 2.83133009735231e+01,\n                                                2.81230043679365e+01, 2.79041270059629e+01, 2.76558704321938e+01, 2.73779906209464e+01, 2.70708367018243e+01,\n                                                2.67353675968757e+01, 2.63731458205908e+01, 2.59863089861852e+01, 2.55775203814543e+01, 2.51499003165829e+01,\n                                                2.47069401085107e+01, 2.42524010317261e+01, 2.37902016904480e+01, 2.33242990045581e+01, 2.28585698363133e+01,\n                                                2.23967014484949e+01, 2.19420988235592e+01, 2.14978151605769e+01, 2.10665089045909e+01, 2.06504271531056e+01,\n                                                2.02514120559380e+01, 1.98709245542055e+01, 1.95100788345779e+01, 1.91696811758668e+01, 1.88502681164008e+01,\n                                                1.85521406099310e+01, 1.82753926098783e+01, 1.80199339861409e+01, 1.77855086573105e+01, 1.75717092915237e+01,\n                                                1.73779899816990e+01, 1.72036780821386e+01, 1.70479860537192e+01, 1.69100238221707e+01, 1.67888118782455e+01,\n                                                1.66832951638414e+01, 1.65923576851369e+01, 1.65148377464031e+01, 1.64495436772943e+01, 1.63952699088012e+01,\n                                                1.63508132249246e+01, 1.63149889740735e+01, 1.62866469691016e+01, 1.62646867452538e+01, 1.62480717906527e+01,\n                                                1.62358423239638e+01, 1.62271261767400e+01, 1.62211473494569e+01, 1.62172318531074e+01, 1.62148105218465e+01,\n                                                1.62134185827771e+01, 1.62126918900761e+01, 1.62123598638725e+01, 1.62122353103017e+01, 1.62122014287974e+01,\n                                                1.62121964279616e+01, 1.62121959829229e+01, 1.62121872222837e+01, 1.62121278677682e+01, 1.62119096758393e+01,\n                                                1.62113280681643e+01, 1.62100552943646e+01, 1.62076180115894e+01, 1.62033802801039e+01, 1.61965329218223e+01,\n                                                1.61860901221077e+01, 1.61708940590733e+01, 1.61496281997237e+01, 1.61208396881084e+01, 1.60829709498202e+01,\n                                                1.60344002402785e+01, 1.59734903750502e+01, 1.58986443196772e+01, 1.58083657226414e+01, 1.57013219006616e+01,\n                                                1.55764062873726e+01, 1.54327969823432e+01, 1.52700078143185e+01, 1.50879282671390e+01, 1.48868487203081e+01,\n                                                1.46674677980136e+01, 1.44308793873281e+01, 1.41785383818472e+01, 1.39122066952986e+01, 1.36338844483473e+01,\n                                                1.33457345884741e+01, 1.30500109803171e+01, 1.27489987235811e+01, 1.24449709729964e+01, 1.21401606225823e+01,\n                                                1.18367406622839e+01, 1.15368058001181e+01, 1.12423500642586e+01, 1.09552389203919e+01, 1.06771779811701e+01,\n                                                1.04096823969295e+01, 1.01540512622509e+01, 9.91135031394976e+00, 9.68240453367251e+00, 9.46780061145797e+00,\n                                                9.26789795329513e+00, 9.08284617067790e+00, 8.91260674829259e+00, 8.75697672919466e+00, 8.61561263797064e+00,\n                                                8.48805334679673e+00, 8.37374107530434e+00, 8.27204013875897e+00, 8.18225338936306e+00, 8.10363652591708e+00,\n                                                8.03541058596536e+00, 7.97677299739500e+00, 7.92690757047068e+00, 7.88499377243717e+00, 7.85021555865082e+00,\n                                                7.82176994780686e+00, 7.79887543336163e+00, 7.78078022652933e+00, 7.76677023521575e+00, 7.75617660425900e+00,\n                                                7.74838258098326e+00, 7.74282943094018e+00, 7.73902111496782e+00, 7.73652745162373e+00, 7.73498552775472e+00,\n                                                7.73409918132950e+00, 7.73363645956459e+00, 7.73342504523463e+00, 7.73334573756381e+00, 7.73332416406232e+00,\n                                                7.73332097986260e+00, 7.73332069836300e+00, 7.73331517804027e+00, 7.73327777714432e+00, 7.73314028903307e+00,\n                                                7.73277380802654e+00, 7.73197183328000e+00, 7.73043618548841e+00, 7.72776640005444e+00, 7.72345324678987e+00,\n                                                7.71687700473304e+00, 7.70731107752992e+00, 7.69393145258069e+00, 7.67583236698250e+00, 7.65204832829416e+00,\n                                                7.62158233720058e+00, 7.58343977111332e+00, 7.53666692528056e+00, 7.48039270042744e+00, 7.41387142033123e+00,\n                                                7.33652432215799e+00, 7.24797696105089e+00, 7.14808968481132e+00, 7.03697853043476e+00, 6.91502441113223e+00,\n                                                6.78286929627574e+00, 6.64139917637630e+00, 6.49171482784606e+00, 6.33509257347431e+00, 6.17293817685779e+00,\n                                                6.00673753644406e+00, 5.83800785231014e+00, 5.66825243055342e+00, 5.49892139004508e+00, 5.33137946082918e+00,\n                                                5.16688106221509e+00, 5.00655212988505e+00, 4.85137782902061e+00, 4.70219531612856e+00, 4.55969095465290e+00,\n                                                4.42440165589841e+00, 4.29672014308272e+00, 4.17690385138883e+00, 4.06508692257651e+00, 3.96129445081735e+00,\n                                                3.86545792245324e+00, 3.77743075296571e+00, 3.69700296888360e+00, 3.62391435518001e+00, 3.55786570660768e+00,\n                                                3.49852811022776e+00, 3.44555040187098e+00, 3.39856506935068e+00, 3.35719293049984e+00, 3.32104691531582e+00,\n                                                3.28973524994735e+00, 3.26286429259346e+00, 3.24004121828273e+00, 3.22087669658649e+00, 3.20498765586272e+00,\n                                                3.19200018020010e+00, 3.18155254092748e+00, 3.17329832370562e+00, 3.16690957571099e+00, 3.16207986667363e+00,\n                                                3.15852713429903e+00, 3.15599617065443e+00, 3.15426060285220e+00, 3.15312422956515e+00, 3.15242159438771e+00,\n                                                3.15201770662078e+00, 3.15180685753884e+00, 3.15171052267167e+00, 3.15167438475509e+00, 3.15166455442390e+00,\n                                                3.15166310348972e+00, 3.15166297323668e+00, 3.15166039648997e+00, 3.15164293870853e+00, 3.15157876290777e+00,\n                                                3.15140770031773e+00, 3.15103336716866e+00, 3.15031660138621e+00, 3.14907053686171e+00, 3.14705763091908e+00,\n                                                3.14398895464628e+00, 3.13952603800603e+00, 3.13328552197621e+00, 3.12484679744752e+00, 3.11376269551357e+00,\n                                                3.09957313030824e+00, 3.08182138476164e+00, 3.06007248231747e+00, 3.03393282600805e+00, 3.00307004377872e+00,\n                                                2.96723179715950e+00, 2.92626223236728e+00, 2.88011481357994e+00, 2.82886049304048e+00, 2.77269052870552e+00,\n                                                2.71191371200942e+00, 2.64694824455707e+00, 2.57830892249698e+00, 2.50659058461505e+00, 2.43244892433486e+00,\n                                                2.35657977110747e+00, 2.27969786256826e+00, 2.20251601518626e+00, 2.12572550069255e+00, 2.04997835790515e+00,\n                                                1.97587229372925e+00, 1.90393871954265e+00, 1.83463430549330e+00, 1.76833621448787e+00, 1.70534092360189e+00,\n                                                1.64586629208300e+00, 1.59005633164931e+00, 1.53798800468736e+00, 1.48967933013047e+00, 1.44509810911494e+00,\n                                                1.40417067470997e+00, 1.36679019830169e+00, 1.33282422623484e+00, 1.30212125521184e+00, 1.27451627113158e+00,\n                                                1.24983526718222e+00, 1.22789882182015e+00, 1.20852485795253e+00, 1.19153072523278e+00, 1.17673475250530e+00,\n                                                1.16395741146447e+00, 1.15302221917104e+00, 1.14375648897927e+00, 1.13599201863286e+00, 1.12956578213203e+00,\n                                                1.12432066937426e+00, 1.12010629525383e+00, 1.11677987855881e+00, 1.11420717138576e+00, 1.11226340275974e+00,\n                                                1.11083418661563e+00, 1.10981633513641e+00, 1.10911851435205e+00, 1.10866168026167e+00, 1.10837924050220e+00,\n                                                1.10821689822509e+00, 1.10813215036325e+00, 1.10809343051986e+00, 1.10807890571841e+00, 1.10807495465313e+00,\n                                                1.10807437148537e+00, 1.10807431772773e+00, 1.10807323860320e+00, 1.10806592740884e+00, 1.10803905118138e+00,\n                                                1.10796741283914e+00, 1.10781065342336e+00, 1.10751051449634e+00, 1.10698880218695e+00, 1.10614619829403e+00,\n                                                1.10486206632318e+00, 1.10299539691054e+00, 1.10038702209334e+00, 1.09686319515130e+00, 1.09224057670678e+00,\n                                                1.08633258494258e+00, 1.07895695837350e+00, 1.06994424900576e+00, 1.05914682357191e+00, 1.04644781867245e+00,\n                                                1.03176939463291e+00, 1.01507958677314e+00, 9.96397082498817e-01, 9.75793370463840e-01, 9.53391912700830e-01,\n                                                9.29364264174886e-01, 9.03923372667379e-01, 8.77314589783651e-01, 8.49805162780164e-01, 8.21673115986790e-01,\n                                                7.93196446441073e-01, 7.64643451071059e-01, 7.36264796259654e-01, 7.08287676628359e-01, 6.80912137522583e-01,\n                                                6.54309399829955e-01, 6.28621857607314e-01, 6.03964331367933e-01, 5.80426147946156e-01, 5.58073663977552e-01,\n                                                5.36952930624189e-01, 5.17092289217089e-01, 4.98504773081592e-01, 4.81190259174731e-01, 4.65137360392141e-01,\n                                                4.50325076776437e-01, 4.36724235664350e-01, 4.24298752330657e-01, 4.13006738798778e-01, 4.02801482897161e-01,\n                                                3.93632314668857e-01, 3.85445373972956e-01, 3.78184291710582e-01, 3.71790797164067e-01, 3.66205264796484e-01,\n                                                3.61367214822231e-01, 3.57215782334073e-01, 3.53690169323272e-01, 3.50730092312851e-01, 3.48276235482196e-01,\n                                                3.46270715198962e-01, 3.44657557050979e-01, 3.43383181152717e-01, 3.42396886143149e-01, 3.41651317382691e-01,\n                                                3.41102900883655e-01, 3.40712221894123e-01, 3.40444326120583e-01, 3.40268922488946e-01, 3.40160469100148e-01,\n                                                3.40098128450641e-01, 3.40065583704991e-01, 3.40050714356444e-01, 3.40045136449888e-01, 3.40043619133432e-01,\n                                                3.40043395181041e-01, 3.40043373838618e-01, 3.40042937841041e-01, 3.40039983904589e-01, 3.40029125090489e-01,\n                                                3.40000180775476e-01, 3.39936843428518e-01, 3.39815570035491e-01, 3.39604753429064e-01, 3.39264229299346e-01,\n                                                3.38745174579536e-01, 3.37990450717612e-01, 3.36935439147055e-01, 3.35509403999829e-01, 3.33637396950103e-01,\n                                                3.31242689961925e-01, 3.28249683838045e-01, 3.24587195776992e-01, 3.20191981591734e-01, 3.15012303628130e-01,\n                                                3.09011320754188e-01, 3.02170059096099e-01, 2.94489727026914e-01, 2.85993167882729e-01, 2.76725297732305e-01,\n                                                2.66752448079217e-01, 2.56160616461081e-01, 2.45052712027785e-01, 2.33544959295124e-01, 2.21762684182956e-01,\n                                                2.09835747379920e-01, 1.97893908550625e-01, 1.86062400307605e-01, 1.74457964167900e-01, 1.63185554459545e-01,\n                                                1.52335854687671e-01, 1.41983680377791e-01, 1.32187270353981e-01, 1.22988402532997e-01, 1.14413217333052e-01,\n                                                1.06473596232583e-01, 9.91689265517195e-02, 9.24880850223389e-02, 8.64114887839165e-02, 8.09130884306342e-02,\n                                                7.59622087067129e-02, 7.15251740288849e-02, 6.75666849096999e-02, 6.40509355049872e-02, 6.09424810036074e-02,\n                                                5.82068764103241e-02, 5.58111160407293e-02, 5.37239066813200e-02, 5.19158078968758e-02, 5.03592713602785e-02,\n                                                4.90286081438995e-02, 4.78999092555625e-02, 4.69509407431232e-02, 4.61610306865410e-02, 4.55109614831457e-02,\n                                                4.49828770771887e-02, 4.45602112191352e-02, 4.42276394936343e-02, 4.39710547779839e-02, 4.37775630611554e-02,\n                                                4.36354942740067e-02, 4.35344210661270e-02, 4.34651774216803e-02, 4.34198687045608e-02, 4.33918651777816e-02,\n                                                4.33757721991981e-02, 4.33673720321153e-02, 4.33635343414878e-02, 4.33620947583790e-02, 4.33617031632068e-02,\n                                                4.33616453648185e-02, 4.33616396440613e-02, 4.33615205457158e-02, 4.33607136442973e-02, 4.33577475001883e-02,\n                                                4.33498417006817e-02, 4.33325443727455e-02, 4.32994344724520e-02, 4.32419078428197e-02, 4.31490683541043e-02,\n                                                4.30077476398623e-02, 4.28026780351161e-02, 4.25168420472204e-02, 4.21320166660593e-02, 4.16295207996527e-02,\n                                                4.09911583363751e-02, 4.02003278909646e-02, 3.92432445467463e-02, 3.81101917037583e-02, 3.67966967652436e-02,\n                                                3.53045081140095e-02, 3.36422480024368e-02, 3.18256307842404e-02, 2.98771699717335e-02, 2.78253488669264e-02,\n                                                2.57032918871118e-02, 2.35470376608902e-02, 2.13935692732292e-02, 1.92787912314785e-02, 1.72356497376356e-02,\n                                                1.52925709330205e-02, 1.34723451054626e-02, 1.17915225257690e-02, 1.02603203710814e-02, 8.88298161955703e-03,\n                                                7.65848456729401e-03, 6.58148003360282e-03, 5.64333208256329e-03, 4.83315322993150e-03, 4.13875063961200e-03,\n                                                3.54742942447928e-03, 3.04662748829543e-03, 2.62437967158036e-03, 2.26962546091158e-03, 1.97238407118050e-03,\n                                                1.72382448511144e-03, 1.51625779775344e-03, 1.34307662182209e-03, 1.19866247561617e-03, 1.07827761194557e-03,\n                                                9.77953106058749e-04, 8.94380738586165e-04, 8.24812823317700e-04, 7.66971904859304e-04, 7.18971039511018e-04,\n                                                6.79244756021546e-04, 6.46490381534193e-04, 6.19619041444253e-04, 5.97715331338122e-04, 5.80004501124165e-04,\n                                                5.65826010266335e-04, 5.54612450223146e-04, 5.45872996923435e-04, 5.39180689230534e-04, 5.34162907179336e-04,\n                                                5.30494460271314e-04, 5.27892712817390e-04, 5.26114191615079e-04, 5.24952150563252e-04, 5.24234615689068e-04,\n                                                5.23822498841753e-04, 5.23607451036412e-04, 5.23509220009544e-04, 5.23472374382550e-04, 5.23462351878834e-04,\n                                                5.23460872599912e-04, 5.23460720010860e-04, 5.23457481342859e-04, 5.23435539307116e-04, 5.23354885501703e-04,\n                                                5.23139949152096e-04, 5.22669855762103e-04, 5.21770679142719e-04, 5.20210466518733e-04, 5.17698019642410e-04,\n                                                5.13886605325808e-04, 5.08383862161566e-04, 5.00769064615270e-04, 4.90618483198091e-04, 4.77538746075368e-04,\n                                                4.61206830500771e-04, 4.41413675076774e-04, 4.18106647238403e-04, 3.91424630329595e-04, 3.61718835527824e-04,\n                                                3.29553096385382e-04, 2.95679665711646e-04, 2.60990286705010e-04, 2.26446915277734e-04, 1.93000834705970e-04,\n                                                1.61511781719526e-04, 1.32679137884395e-04, 1.06994987156384e-04, 8.47245082553627e-05, 6.59139857148716e-05,\n                                                5.04220013155532e-05, 3.79660336520260e-05, 2.81751556698850e-05, 2.06398845818967e-05, 1.49524848680471e-05,\n                                                1.07347299547200e-05, 7.65403476066240e-06, 5.43115709916719e-06, 3.84224898652974e-06, 2.71593350475996e-06,\n                                                1.92518420050192e-06, 1.37582110681933e-06, 9.95637272183103e-07, 7.27624268392901e-07, 5.28734346971760e-07,\n                                                3.68501162029133e-07, 7.10542735760100e-15, 7.10542735760100e-15, 0.00000000000000e+00, 3.73950165055703e-07,\n                                                4.45423360417863e-07, 4.66562930512282e-07, 4.41100013404139e-07, 3.79993956300950e-07, 7.10542735760100e-15,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                0.00000000000000e+00, 7.10542735760100e-15, 7.10542735760100e-15, 1.42108547152020e-14, 7.10542735760100e-15,\n                                                0.00000000000000e+00, 1.42108547152020e-14, 7.10542735760100e-15, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                0.00000000000000e+00, 1.42108547152020e-14, 1.42108547152020e-14, 7.10542735760100e-15, 7.10542735760100e-15,\n                                                7.10542735760100e-15}),\nmadness::CubicInterpolationTable<double>(grid, {5.50000000000000e+01, 5.49999997852461e+01, 5.49999931446286e+01, 5.49999481533543e+01, 5.49997827589641e+01,\n                                                5.49993418651373e+01, 5.49983769132951e+01, 5.49965286605012e+01, 5.49933137378546e+01, 5.49881154373559e+01,\n                                                5.49801790270192e+01, 5.49686117484471e+01, 5.49523875271593e+01, 5.49303563448370e+01, 5.49012582031502e+01,\n                                                5.48637416602636e+01, 5.48163870342357e+01, 5.47577345062584e+01, 5.46863174544945e+01, 5.46007013150869e+01,\n                                                5.44995280041120e+01, 5.43815653725478e+01, 5.42457603002170e+01, 5.40912929556347e+01, 5.39176286548516e+01,\n                                                5.37245629220421e+01, 5.35122550809307e+01, 5.32812462064936e+01, 5.30324585945730e+01, 5.27671759041227e+01,\n                                                5.24870054359025e+01, 5.21938261614767e+01, 5.18897276509087e+01, 5.15769456557356e+01, 5.12577997072087e+01,\n                                                5.09346368557150e+01, 5.06097839573125e+01, 5.02855091327341e+01, 4.99639915628241e+01, 4.96472978860180e+01,\n                                                4.93373631968091e+01, 4.90359749164171e+01, 4.87447584171798e+01, 4.84651639924301e+01, 4.81984553660000e+01,\n                                                4.79457002998399e+01, 4.77077639499675e+01, 4.74853054888027e+01, 4.72787782535195e+01, 4.70884333999753e+01,\n                                                4.69143268180782e+01, 4.67563289331021e+01, 4.66141369757205e+01, 4.64872893247738e+01, 4.63751815774588e+01,\n                                                4.62770840534740e+01, 4.61921604751091e+01, 4.61194875774211e+01, 4.60580753923058e+01, 4.60068879227196e+01,\n                                                4.59648638855407e+01, 4.59309371608112e+01, 4.59040565480043e+01, 4.58832044022913e+01, 4.58674137102917e+01,\n                                                4.58557831691745e+01, 4.58474898576388e+01, 4.58417991332669e+01, 4.58380714574709e+01, 4.58357659346243e+01,\n                                                4.58344404523910e+01, 4.58337484209011e+01, 4.58334322236433e+01, 4.58333136067546e+01, 4.58332813400489e+01,\n                                                4.58332765775494e+01, 4.58332759256305e+01, 4.58332605295110e+01, 4.58331562186857e+01, 4.58327727632951e+01,\n                                                4.58317506291951e+01, 4.58295138009153e+01, 4.58252303412266e+01, 4.58177824138492e+01, 4.58057473868126e+01,\n                                                4.57873914979129e+01, 4.57606773764429e+01, 4.57232864454084e+01, 4.56726568412877e+01, 4.56060369526490e+01,\n                                                4.55205539737356e+01, 4.54132959925748e+01, 4.52814051114729e+01, 4.51221779953939e+01, 4.49331691754991e+01,\n                                                4.47122915787857e+01, 4.44579083544188e+01, 4.41689104004798e+01, 4.38447752629369e+01, 4.34856052082665e+01,\n                                                4.30921447186402e+01, 4.26657794469518e+01, 4.22085188599718e+01, 4.17229632433116e+01, 4.12122535001323e+01,\n                                                4.06800010330262e+01, 4.01301962933547e+01, 3.95670982456461e+01, 3.89951115570633e+01, 3.84186617912396e+01,\n                                                3.78420797999747e+01, 3.72695045407576e+01, 3.67048094932494e+01, 3.61515531334392e+01, 3.56129499965570e+01,\n                                                3.50918566787129e+01, 3.45907669314348e+01, 3.41118113661936e+01, 3.36567593838126e+01, 3.32270229084266e+01,\n                                                3.28236627308280e+01, 3.24473985631746e+01, 3.20986234750146e+01, 3.17774226283627e+01, 3.14835955560405e+01,\n                                                3.12166808674709e+01, 3.09759822551243e+01, 3.07605949103204e+01, 3.05694317922409e+01, 3.04012495083971e+01,\n                                                3.02546737923214e+01, 3.01282246874780e+01, 3.00203415772559e+01, 2.99294081625851e+01, 2.98537774045797e+01,\n                                                2.97917963390757e+01, 2.97418305482145e+01, 2.97022879537239e+01, 2.96716414880471e+01, 2.96484501127289e+01,\n                                                2.96313775971254e+01, 2.96192084514691e+01, 2.96108604310444e+01, 2.96053930939811e+01, 2.96020120016708e+01,\n                                                2.96000682922232e+01, 2.95990535247650e+01, 2.95985898746214e+01, 2.95984159443335e+01, 2.95983686311619e+01,\n                                                2.95983616478399e+01, 2.95983609849302e+01, 2.95983474697755e+01, 2.95982559027688e+01, 2.95979192950813e+01,\n                                                2.95970220403594e+01, 2.95950585105992e+01, 2.95912984620080e+01, 2.95847607878217e+01, 2.95741970717986e+01,\n                                                2.95580862904311e+01, 2.95346418607761e+01, 2.95018320046035e+01, 2.94574140665396e+01, 2.93989829561953e+01,\n                                                2.93240332653226e+01, 2.92300338435032e+01, 2.91145127291217e+01, 2.89751493880435e+01, 2.88098703058628e+01,\n                                                2.86169432350997e+01, 2.83950649552459e+01, 2.81434373883318e+01, 2.78618274019027e+01, 2.75506066047195e+01,\n                                                2.72107687496727e+01, 2.68439237407331e+01, 2.64522684065820e+01, 2.60385349830584e+01, 2.56059187202537e+01,\n                                                2.51579865322310e+01, 2.46985695461784e+01, 2.42316439787331e+01, 2.37612067415819e+01, 2.32911539263213e+01,\n                                                2.28251710748000e+01, 2.23666433678422e+01, 2.19185915129360e+01, 2.14836356556743e+01, 2.10639858972508e+01,\n                                                2.06614548315702e+01, 2.02774855488204e+01, 1.99131880291880e+01, 1.95693776224222e+01, 1.92466109534158e+01,\n                                                1.89452165823546e+01, 1.86653196025348e+01, 1.84068607556246e+01, 1.81696114485737e+01, 1.79531863025497e+01,\n                                                1.77570546975104e+01, 1.75805523845005e+01, 1.74228937935522e+01, 1.72831852873813e+01, 1.71604393554401e+01,\n                                                1.70535896111355e+01, 1.69615064160444e+01, 1.68830129663217e+01, 1.68169017002636e+01, 1.67619508965812e+01,\n                                                1.67169413185953e+01, 1.66806727197671e+01, 1.66519799677129e+01, 1.66297484779046e+01, 1.66129285865092e+01,\n                                                1.66005484452729e+01, 1.65917249989362e+01, 1.65856726134054e+01, 1.65817089635117e+01, 1.65792578619211e+01,\n                                                1.65778488115899e+01, 1.65771131863489e+01, 1.65767770790410e+01, 1.65766509945471e+01, 1.65766166965984e+01,\n                                                1.65766116342963e+01, 1.65766111837875e+01, 1.65766023154698e+01, 1.65765422314193e+01, 1.65763213576921e+01,\n                                                1.65757326017079e+01, 1.65744441859415e+01, 1.65719769543415e+01, 1.65676871648329e+01, 1.65607557294992e+01,\n                                                1.65501847980023e+01, 1.65348024840989e+01, 1.65132763901633e+01, 1.64841363696233e+01, 1.64458066642479e+01,\n                                                1.63966471519781e+01, 1.63350029434605e+01, 1.62592609893265e+01, 1.61679117396154e+01, 1.60596132786974e+01,\n                                                1.59332547964855e+01, 1.57880157999092e+01, 1.56234171621856e+01, 1.54393600018380e+01, 1.52361485660653e+01,\n                                                1.50144939271161e+01, 1.47754966273375e+01, 1.45206086431644e+01, 1.42515781124622e+01, 1.39703835279871e+01,\n                                                1.36791662542433e+01, 1.33801698944615e+01, 1.30756917529793e+01, 1.27680465572438e+01, 1.24595380566307e+01,\n                                                1.21524321786596e+01, 1.18489266375888e+01, 1.15511151572066e+01, 1.12609479934736e+01, 1.09801928035779e+01,\n                                                1.07104005663176e+01, 1.04528804494399e+01, 1.02086858671196e+01, 9.97861213018749e+00, 9.76320454214169e+00,\n                                                9.56277477862466e+00, 9.37742294627610e+00, 9.20706275470224e+00, 9.05144759827811e+00, 8.91019587364568e+00,\n                                                8.78281442395484e+00, 8.66871951390726e+00, 8.56725515318936e+00, 8.47770888482823e+00, 8.39932534544405e+00,\n                                                8.33131800340741e+00, 8.27287950912054e+00, 8.22319106849048e+00, 8.18143119240059e+00, 8.14678409429739e+00,\n                                                8.11844791459949e+00, 8.09564285215226e+00, 8.07761918584958e+00, 8.06366507967349e+00, 8.05311398725708e+00,\n                                                8.04535141270936e+00, 8.03982074711366e+00, 8.03602788781777e+00, 8.03354436161280e+00, 8.03200871229594e+00,\n                                                8.03112597488374e+00, 8.03066513786074e+00, 8.03045458480165e+00, 8.03037560024213e+00, 8.03035411463654e+00,\n                                                8.03035094341013e+00, 8.03035066305745e+00, 8.03034516522614e+00, 8.03030791671401e+00, 8.03017098880011e+00,\n                                                8.02980600121426e+00, 8.02900729549302e+00, 8.02747791099252e+00, 8.02481902593640e+00, 8.02052351312265e+00,\n                                                8.01397423915130e+00, 8.00444769323892e+00, 7.99112344897345e+00, 7.97309982043547e+00, 7.94941585564208e+00,\n                                                7.91907950401833e+00, 7.88110139987315e+00, 7.83453323467389e+00, 7.77850917906635e+00, 7.71228831159222e+00,\n                                                7.63529558202075e+00, 7.54715856072229e+00, 7.44773717906529e+00, 7.33714391199791e+00, 7.21575242286887e+00,\n                                                7.08419356256272e+00, 6.94333870934032e+00, 6.79427161066594e+00, 6.63825095897471e+00, 6.47666670859140e+00,\n                                                6.31099347291676e+00, 6.14274417368040e+00, 5.97342651289516e+00, 5.80450398289950e+00, 5.63736226603024e+00,\n                                                5.47328123439278e+00, 5.31341247461272e+00, 5.15876231227183e+00, 5.01018052908417e+00, 4.86835511342044e+00,\n                                                4.73381326609247e+00, 4.60692844848120e+00, 4.48793263269454e+00, 4.37693232415175e+00, 4.27392659211963e+00,\n                                                4.17882536301480e+00, 4.09146656058386e+00, 4.01163117633450e+00, 3.93905586589504e+00, 3.87344307983886e+00,\n                                                3.81446900427802e+00, 3.76178971465571e+00, 3.71504597170716e+00, 3.67386705320551e+00, 3.63787395270971e+00,\n                                                3.60668220871671e+00, 3.57990456505691e+00, 3.55715360921774e+00, 3.53804448866121e+00, 3.52219776382581e+00,\n                                                3.50924241823071e+00, 3.49881900972151e+00, 3.49058291233102e+00, 3.48420756642873e+00, 3.47938762748633e+00,\n                                                3.47584188294913e+00, 3.47331579439814e+00, 3.47158352002131e+00, 3.47044928125488e+00, 3.46974795721908e+00,\n                                                3.46934482012431e+00, 3.46913436206061e+00, 3.46903820564739e+00, 3.46900213464178e+00, 3.46899232250885e+00,\n                                                3.46899087426058e+00, 3.46899074424865e+00, 3.46898817227183e+00, 3.46897074680472e+00, 3.46890668975806e+00,\n                                                3.46873594344095e+00, 3.46836230101680e+00, 3.46764685257489e+00, 3.46640306177670e+00, 3.46439378480586e+00,\n                                                3.46133053617986e+00, 3.45687528729723e+00, 3.45064504369613e+00, 3.44221937542614e+00, 3.43115096247881e+00,\n                                                3.41697905854056e+00, 3.39924557282541e+00, 3.37751323219059e+00, 3.35138503576665e+00, 3.32052398384106e+00,\n                                                3.28467189028564e+00, 3.24366601186740e+00, 3.19745227743125e+00, 3.14609408547656e+00, 3.08977594514542e+00,\n                                                3.02880162313549e+00, 2.96358687111083e+00, 2.89464718728122e+00, 2.82258136996505e+00, 2.74805183403316e+00,\n                                                2.67176279143735e+00, 2.59443746451969e+00, 2.51679552031300e+00, 2.43953188441211e+00, 2.36329799846189e+00,\n                                                2.28868640805181e+00, 2.21621930373405e+00, 2.14634130643880e+00, 2.07941643137943e+00, 2.01572883409730e+00,\n                                                1.95548668644621e+00, 1.89882837946325e+00, 1.84583021135294e+00, 1.79651477794638e+00, 1.75085941153389e+00,\n                                                1.70880417840284e+00, 1.67025911513233e+00, 1.63511053599723e+00, 1.60322636567071e+00, 1.57446053855102e+00,\n                                                1.54865656071789e+00, 1.52565035869299e+00, 1.50527254805731e+00, 1.48735025133797e+00, 1.47170858378420e+00,\n                                                1.45817191138352e+00, 1.44656496983339e+00, 1.43671391711829e+00, 1.42844737605496e+00, 1.42159750655936e+00,\n                                                1.41600113037019e+00, 1.41150091366353e+00, 1.40794659585188e+00, 1.40519623662203e+00, 1.40311743890813e+00,\n                                                1.40158849409413e+00, 1.40049938831756e+00, 1.39975260610696e+00, 1.39926367017115e+00, 1.39896136395072e+00,\n                                                1.39878759602602e+00, 1.39869688166888e+00, 1.39865543539283e+00, 1.39863988776518e+00, 1.39863565846193e+00,\n                                                1.39863503422666e+00, 1.39863497668332e+00, 1.39863382156513e+00, 1.39862599549917e+00, 1.39859722649892e+00,\n                                                1.39852054233324e+00, 1.39835273829737e+00, 1.39803144009817e+00, 1.39747290817441e+00, 1.39657073108410e+00,\n                                                1.39519555526610e+00, 1.39319599250644e+00, 1.39040082967196e+00, 1.38662263218113e+00, 1.38166277836284e+00,\n                                                1.37531788340405e+00, 1.36738746958486e+00, 1.35768261938340e+00, 1.34603522090897e+00, 1.33230729752351e+00,\n                                                1.31639982569224e+00, 1.29826040766823e+00, 1.27788919485117e+00, 1.25534256043905e+00, 1.23073418970947e+00,\n                                                1.20423347147837e+00, 1.17606130130008e+00, 1.14648360675695e+00, 1.11580304332153e+00, 1.08434936639593e+00,\n                                                1.05246896432260e+00, 1.02051396512815e+00, 9.88831250097277e-01, 9.57751666433580e-01, 9.27579760500912e-01,\n                                                8.98584451939129e-01, 8.70991197085580e-01, 8.44976275127657e-01, 8.20663793114299e-01, 7.98125798043216e-01,\n                                                7.77385520650697e-01, 7.58423340929966e-01, 7.41184684523333e-01, 7.25588843208740e-01, 7.11537711857474e-01,\n                                                6.98923622521377e-01, 6.87635753759245e-01, 6.77564906830817e-01, 6.68606698827602e-01, 6.60663392246832e-01,\n                                                6.53644660522914e-01, 6.47467599285683e-01, 6.42056259653316e-01, 6.37340925925479e-01, 6.33257302135405e-01,\n                                                6.29745719612899e-01, 6.26750435156538e-01, 6.24219057287924e-01, 6.22102115194039e-01, 6.20352769470280e-01,\n                                                6.18926653710268e-01, 6.17781829678208e-01, 6.16878834962591e-01, 6.16180799764251e-01, 6.15653608288284e-01,\n                                                6.15266079836999e-01, 6.14990145090964e-01, 6.14800994280664e-01, 6.14677176085991e-01, 6.14600629214344e-01,\n                                                6.14556632659230e-01, 6.14533665476912e-01, 6.14523172262814e-01, 6.14519236006139e-01, 6.14518165259270e-01,\n                                                6.14518007219665e-01, 6.14517992158646e-01, 6.14517684482252e-01, 6.14515599940830e-01, 6.14507937117786e-01,\n                                                6.14487512163990e-01, 6.14442819343282e-01, 6.14357252867059e-01, 6.14208532123698e-01, 6.13968374393032e-01,\n                                                6.13602460457365e-01, 6.13070737358477e-01, 6.12328096512847e-01, 6.11325451856359e-01, 6.10011219341445e-01,\n                                                6.08333164836374e-01, 6.06240543344214e-01, 6.03686402671975e-01, 6.00629877061522e-01, 5.97038261823350e-01,\n                                                5.92888651020168e-01, 5.88168947148176e-01, 5.82878118900844e-01, 5.77025684918411e-01, 5.70630520860611e-01,\n                                                5.63719197917898e-01, 5.56324134256656e-01, 5.48481855247772e-01, 5.40231607823827e-01, 5.31614472464277e-01,\n                                                5.22672991934684e-01, 5.13451222835897e-01, 5.03995041167300e-01, 4.94352508376259e-01, 4.84574125408933e-01,\n                                                4.74712853502268e-01, 4.64823842769761e-01, 4.54963867133976e-01, 4.45190507524984e-01, 4.35561151727505e-01,\n                                                4.26131890544468e-01, 4.16956389757502e-01, 4.08084809545628e-01, 3.99562830673041e-01, 3.91430832101371e-01,\n                                                3.83723249307408e-01, 3.76468127704655e-01, 3.69686872173837e-01, 3.63394182610023e-01, 3.57598157146214e-01,\n                                                3.52300539542007e-01, 3.47497084998551e-01, 3.43178018936129e-01, 3.39328565397793e-01, 3.35929524990327e-01,\n                                                3.32957885939749e-01, 3.30387455330794e-01, 3.28189500480576e-01, 3.26333392407086e-01, 3.24787244403538e-01,\n                                                3.23518538884869e-01, 3.22494735115399e-01, 3.21683849417887e-01, 3.21054998302280e-01, 3.20578893933586e-01,\n                                                3.20228280746029e-01, 3.19978302003037e-01, 3.19806785828604e-01, 3.19694441730675e-01, 3.19624960861361e-01,\n                                                3.19585016094585e-01, 3.19564161278414e-01, 3.19554632529702e-01, 3.19551057965320e-01, 3.19550085596973e-01,\n                                                3.19549942077430e-01, 3.19549927872202e-01, 3.19549632137921e-01, 3.19547628496437e-01, 3.19540262925472e-01,\n                                                3.19520629225480e-01, 3.19477662408580e-01, 3.19395379859571e-01, 3.19252302486028e-01, 3.19021085473786e-01,\n                                                3.18668385187060e-01, 3.18154984935603e-01, 3.17436197448146e-01, 3.16462555614621e-01, 3.15180795132498e-01,\n                                                3.13535122991489e-01, 3.11468754311598e-01, 3.08925687169094e-01, 3.05852671145921e-01, 3.02201311005653e-01,\n                                                2.97930232805328e-01, 2.93007226599627e-01, 2.87411268419319e-01, 2.81134315243989e-01, 2.74182761331780e-01,\n                                                2.66578444030500e-01, 2.58359094099831e-01, 2.49578141990504e-01, 2.40303819615889e-01, 2.30617537968342e-01,\n                                                2.20611573340669e-01, 2.10386154771079e-01, 2.00046105397284e-01, 1.89697241314057e-01, 1.79442763761450e-01,\n                                                1.69379886830853e-01, 1.59596920625745e-01, 1.50170981687261e-01, 1.41166436181244e-01, 1.32634107598236e-01,\n                                                1.24611210789894e-01, 1.17121917341663e-01, 1.10178419283336e-01, 1.03782340626509e-01, 9.79263473188539e-02,\n                                                9.25958216848386e-02, 8.77704920233953e-02, 8.34259366486449e-02, 7.95349101012235e-02, 7.60684646197589e-02,\n                                                7.29968606289830e-02, 7.02902754332086e-02, 6.79193297347496e-02, 6.58554577105122e-02, 6.40711490561614e-02,\n                                                6.25400915297689e-02, 6.12372408740427e-02, 6.01388421869018e-02, 5.92224233045826e-02, 5.84667768791931e-02,\n                                                5.78519437910003e-02, 5.73592064939064e-02, 5.69710969791828e-02, 5.66714203858751e-02, 5.64452920244349e-02,\n                                                5.62791828569615e-02, 5.61609664338079e-02, 5.60799590367296e-02, 5.60269443911281e-02, 5.59941747843880e-02,\n                                                5.59753416914219e-02, 5.59655109112427e-02, 5.59610195556459e-02, 5.59593347592795e-02, 5.59588764600676e-02,\n                                                5.59588088162783e-02, 5.59588018385639e-02, 5.59586537176884e-02, 5.59576501853698e-02, 5.59539612215900e-02,\n                                                5.59441287752875e-02, 5.59226156627730e-02, 5.58814344636787e-02, 5.58098793938200e-02, 5.56943866763291e-02,\n                                                5.55185513412013e-02, 5.52633295603115e-02, 5.49074541631001e-02, 5.44280853391683e-02, 5.38017073156425e-02,\n                                                5.30052640854635e-02, 5.20175030437855e-02, 5.08204659421452e-02, 4.94010347417557e-02, 4.77524101888349e-02,\n                                                4.58753789547899e-02, 4.37792171672839e-02, 4.14820895288202e-02, 3.90108371426976e-02, 3.64001030720189e-02,\n                                                3.36908172821211e-02, 3.09281420331047e-02, 2.81590517762353e-02, 2.54297743297940e-02, 2.27833415001228e-02,\n                                                2.02574821779820e-02, 1.78830416052236e-02, 1.56830363634128e-02, 1.36723697335981e-02, 1.18581516892249e-02,\n                                                1.02405050907208e-02, 8.81370321689445e-03, 7.56747604452812e-03, 6.48833967380824e-03, 5.56083591909129e-03,\n                                                4.76860656137745e-03, 4.09526090329848e-03, 3.52502316538761e-03, 3.04316915060099e-03, 2.63628077876632e-03,\n                                                2.29236065964500e-03, 2.00085281127826e-03, 1.75260830238244e-03, 1.53982000611563e-03, 1.35593663349454e-03,\n                                                1.19555894373491e-03, 1.05432100752267e-03, 9.28762423797025e-04, 8.16198913163646e-04, 7.14597245014659e-04,\n                                                6.22457542554855e-04, 5.38703885922587e-04, 4.62583742468325e-04, 3.93577476003770e-04, 3.31319841926359e-04,\n                                                2.75535211819999e-04, 2.25987299380392e-04, 1.82442862005416e-04, 1.44647747781335e-04, 1.12313026889410e-04,\n                                                8.51088135078726e-05, 6.26636095972799e-05, 4.45674125444384e-05, 3.03772854763906e-05, 1.96245060024580e-05,\n                                                1.18227560221840e-05, 6.47708922940637e-06, 3.09364296668946e-06, 1.19030479339699e-06, 0.00000000000000e+00,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {5.60000000000000e+01, 5.59999997798731e+01, 5.59999929731123e+01, 5.59999468561891e+01,  5.59997773237422e+01,\n                                                5.59993253989738e+01, 5.59983363041486e+01, 5.59964418068607e+01, 5.59931464403293e+01,  5.59878180561304e+01,\n                                                5.59796830157549e+01, 5.59678261784863e+01, 5.59511957170918e+01, 5.59286127117924e+01,  5.58987854564818e+01,\n                                                5.58603284686323e+01, 5.58117863155509e+01, 5.57516625160380e+01, 5.56784538773827e+01,  5.55906905867365e+01,\n                                                5.54869820918056e+01, 5.53660682059755e+01, 5.52268739545985e+01, 5.50685655428084e+01,  5.48906036840078e+01,\n                                                5.46927896781451e+01, 5.44752993781462e+01, 5.42387007543754e+01, 5.39839522065285e+01,  5.37123808986955e+01,\n                                                5.34256428182804e+01, 5.31256684807537e+01, 5.28145997426391e+01, 5.24947237308659e+01,  5.21684093854187e+01,\n                                                5.18380507417162e+01, 5.15060192358064e+01, 5.11746254536553e+01, 5.08460892609235e+01,  5.05225163848616e+01,\n                                                5.02058793289893e+01, 4.98980008675660e+01, 4.96005390639136e+01, 4.93149735253758e+01,  4.90425932290867e+01,\n                                                4.87844865974399e+01, 4.85415345472513e+01, 4.83144070486033e+01, 4.81035634231571e+01,  4.79092563030861e+01,\n                                                4.77315389411748e+01, 4.75702754412087e+01, 4.74251534544921e+01, 4.72956989287268e+01,  4.71812925609714e+01,\n                                                4.70811876669212e+01, 4.69945292173241e+01, 4.69203738037047e+01, 4.68577102823493e+01,  4.68054808143395e+01,\n                                                4.67626019782037e+01, 4.67279855881305e+01, 4.67005588114261e+01, 4.66792831497776e+01,  4.66631718346010e+01,\n                                                4.66513051909387e+01, 4.66428435493936e+01, 4.66370373324195e+01, 4.66332340093604e+01,  4.66308817017589e+01,\n                                                4.66295293229665e+01, 4.66288232490572e+01, 4.66285006357038e+01, 4.66283796119165e+01,  4.66283466904760e+01,\n                                                4.66283418313391e+01, 4.66283411661918e+01, 4.66283254576646e+01, 4.66282190302355e+01,  4.66278277940602e+01,\n                                                4.66267849198173e+01, 4.66245027051450e+01, 4.66201323362016e+01, 4.66125333076412e+01,  4.66002541539829e+01,\n                                                4.65815260073305e+01, 4.65542703056600e+01, 4.65161216997254e+01, 4.64644668092518e+01,  4.63964989278323e+01,\n                                                4.63092880493494e+01, 4.61998646855763e+01, 4.60653148941422e+01, 4.59028828094668e+01,  4.57100758924937e+01,\n                                                4.54847672797944e+01, 4.52252892727752e+01, 4.49305124323031e+01, 4.45999060915570e+01,  4.42335782194037e+01,\n                                                4.38322948424137e+01, 4.33974807000458e+01, 4.29312026759841e+01, 4.24361359058374e+01,  4.19155105218605e+01,\n                                                4.13730364779683e+01, 4.08128058691445e+01, 4.02391762425282e+01, 3.96566429537333e+01,  3.90697116843824e+01,\n                                                3.84827825133384e+01, 3.79000543235326e+01, 3.73254538156498e+01, 3.67625885361862e+01,  3.62147195720633e+01,\n                                                3.56847477959210e+01, 3.51752078576305e+01, 3.46882659163281e+01, 3.42257194371250e+01,  3.37889993143908e+01,\n                                                3.33791755634815e+01, 3.29969677742266e+01, 3.26427607812596e+01, 3.23166250863638e+01,  3.20183408873814e+01,\n                                                3.17474243155074e+01, 3.15031546191229e+01, 3.12846013937067e+01, 3.10906513681555e+01,  3.09200345985571e+01,\n                                                3.07713501412703e+01, 3.06430913788365e+01, 3.05336711796709e+01, 3.04414470151928e+01,  3.03647460609976e+01,\n                                                3.03018901902725e+01, 3.02512206414667e+01, 3.02111220191330e+01, 3.01800451766682e+01,  3.01565284417096e+01,\n                                                3.01392165876840e+01, 3.01268769354751e+01, 3.01184119919245e+01, 3.01128680983185e+01,  3.01094396698771e+01,\n                                                3.01074687506818e+01, 3.01064397783930e+01, 3.01059696381984e+01, 3.01057932733094e+01,  3.01057452978710e+01,\n                                                3.01057382168000e+01, 3.01057375446112e+01, 3.01057238402783e+01, 3.01056309915655e+01,  3.01052896722607e+01,\n                                                3.01043798586308e+01, 3.01023888467179e+01, 3.00985761768984e+01, 3.00919470264284e+01,  3.00812355475309e+01,\n                                                3.00648995227215e+01, 3.00411275568195e+01, 3.00078597960871e+01, 2.99628228265688e+01,  2.99035789275124e+01,\n                                                2.98275892249789e+01, 2.97322895087226e+01, 2.96151765732880e+01, 2.94739019864740e+01,  2.93063692736058e+01,\n                                                2.91108297610509e+01, 2.88859718849114e+01, 2.86309987604690e+01, 2.83456892860317e+01,  2.80304389832599e+01,\n                                                2.76862779980104e+01, 2.73148649570969e+01, 2.69184564631398e+01, 2.64998528224751e+01,  2.60623212842946e+01,\n                                                2.56094989529406e+01, 2.51452789305584e+01, 2.46736851866368e+01, 2.41987437478776e+01,  2.37243593473425e+01,\n                                                2.32542069367107e+01, 2.27916460471824e+01, 2.23396630150731e+01, 2.19008422067159e+01,  2.14773634976032e+01,\n                                                2.10710202527279e+01, 2.06832504788344e+01, 2.03151738008645e+01, 1.99676281810478e+01,  1.96412023249259e+01,\n                                                1.93362619151342e+01, 1.90529696896592e+01, 1.87913006400697e+01, 1.85510541686547e+01,  1.83318650140180e+01,\n                                                1.81332143416641e+01, 1.79544418324094e+01, 1.77947590768367e+01, 1.76532642091724e+01,  1.75289575183550e+01,\n                                                1.74207577278283e+01, 1.73275186807926e+01, 1.72480462453503e+01, 1.71811153203893e+01,  1.71254868544735e+01,\n                                                1.70799247803954e+01, 1.70432127232571e+01, 1.70141702722299e+01, 1.69916685298267e+01,  1.69746445814410e+01,\n                                                1.69621144739074e+01, 1.69531842640222e+01, 1.69470587022114e+01, 1.69430471552924e+01,  1.69405664445082e+01,\n                                                1.69391403764096e+01, 1.69383958676893e+01, 1.69380557017498e+01, 1.69379280947722e+01,  1.69378933826756e+01,\n                                                1.69378882592463e+01, 1.69378878032977e+01, 1.69378788278953e+01, 1.69378180183341e+01,  1.69375944776125e+01,\n                                                1.69369986128557e+01, 1.69356946420236e+01, 1.69331976294652e+01, 1.69288560783386e+01,  1.69218410569556e+01,\n                                                1.69111427708361e+01, 1.68955753968937e+01, 1.68737908505632e+01, 1.68443019393286e+01,  1.68055150481620e+01,\n                                                1.67557720921881e+01, 1.66934009594451e+01, 1.66167730668880e+01, 1.65243659967478e+01,  1.64148285132166e+01,\n                                                1.62870446368366e+01, 1.61401929396787e+01, 1.59737968948611e+01, 1.57877620741189e+01,  1.55823963918415e+01,\n                                                1.53584106478548e+01, 1.51168985074912e+01, 1.48592977567779e+01, 1.45873377195326e+01,  1.43029801186746e+01,\n                                                1.40083611837432e+01, 1.37057407690040e+01, 1.33974602244514e+01, 1.30859065310951e+01,  1.27734777551775e+01,\n                                                1.24625451685282e+01, 1.21554099204749e+01, 1.18542554708674e+01, 1.15610996309528e+01,  1.12777511853764e+01,\n                                                1.10057756339487e+01, 1.07464730692994e+01, 1.05008692481198e+01, 1.02697190880366e+01,  1.00535204871278e+01,\n                                                9.85253565000004e+00, 9.66681696845745e+00, 9.49623479965357e+00, 9.34050503144838e+00,  9.19921496155494e+00,\n                                                9.07184662462976e+00, 8.95779720906351e+00, 8.85639658423266e+00, 8.76692221041587e+00,  8.68861184529817e+00,\n                                                8.62067451723966e+00, 8.56230023015377e+00, 8.51266881795549e+00, 8.47095829330910e+00,  8.43635294671607e+00,\n                                                8.40805135559209e+00, 8.38527436477520e+00, 8.36727300493204e+00, 8.35333622841854e+00,  8.34279826812365e+00,\n                                                8.33504536832858e+00, 8.32952160170340e+00, 8.32573347615293e+00, 8.32325305056826e+00,  8.32171931884546e+00,\n                                                8.32083768384784e+00, 8.32037742238023e+00, 8.32016713229606e+00, 8.32008824638731e+00,  8.32006678761711e+00,\n                                                8.32006362035154e+00, 8.32006334034902e+00, 8.32005784938452e+00, 8.32002064739603e+00,  8.31988389050732e+00,\n                                                8.31951935880694e+00, 8.31872165075428e+00, 8.31719417680524e+00, 8.31453861386079e+00,  8.31024846937655e+00,\n                                                8.30370738307931e+00, 8.29419275106365e+00, 8.28088517350954e+00, 8.26288408385736e+00,  8.23922969652571e+00,\n                                                8.20893110103032e+00, 8.17099993254593e+00, 8.12448857786271e+00, 8.06853136521187e+00,  8.00238668979663e+00,\n                                                7.92547761384226e+00, 7.83742822959095e+00, 7.73809306195681e+00, 7.62757707110313e+00,  7.50624441258461e+00,\n                                                7.37471498814875e+00, 7.23384887557884e+00, 7.08471980712423e+00, 6.92857978944033e+00,  6.76681755435749e+00,\n                                                6.60091369715321e+00, 6.43239510575979e+00, 6.26279074227421e+00, 6.09359022896489e+00,  5.92620624688021e+00,\n                                                5.76194161655263e+00, 5.60196206577054e+00, 5.44727588929062e+00, 5.29872167573478e+00,  5.15696480383829e+00,\n                                                5.02250250387030e+00, 4.89567619759828e+00, 4.77668894753072e+00, 4.66562545798335e+00,  4.56247225043158e+00,\n                                                4.46713623613600e+00, 4.37946067346814e+00, 4.29923819232845e+00, 4.22622106109984e+00,  4.16012913747907e+00,\n                                                4.10065602766170e+00, 4.04747394752890e+00, 4.00023769662507e+00, 3.95858806267876e+00,  3.92215489272301e+00,\n                                                3.89056000321938e+00, 3.86342005431738e+00, 3.84034947744453e+00, 3.82096351549379e+00,  3.80488140684930e+00,\n                                                3.79172971599122e+00, 3.78114578374818e+00, 3.77278124010493e+00, 3.76630549350580e+00,  3.76140908509264e+00,\n                                                3.75780677674788e+00, 3.75524023045291e+00, 3.75348013506196e+00, 3.75232764605335e+00,  3.75161502407609e+00,\n                                                3.75120538802253e+00, 3.75099153582516e+00, 3.75089382835503e+00, 3.75085717545414e+00,  3.75084720502776e+00,\n                                                3.75084573341559e+00, 3.75084560130624e+00, 3.75084298783678e+00, 3.75082528124826e+00,  3.75076019072827e+00,\n                                                3.75058668923346e+00, 3.75020701556096e+00, 3.74948001039338e+00, 3.74821610308378e+00,  3.74617426083657e+00,\n                                                3.74306120279877e+00, 3.73853316120162e+00, 3.73220043086343e+00, 3.72363487716527e+00,  3.71238046234833e+00,\n                                                3.69796669565117e+00, 3.67992471577872e+00, 3.65780548460096e+00, 3.63119932897547e+00,  3.59975584260232e+00,\n                                                3.56320298711032e+00, 3.52136414600766e+00, 3.47417191322924e+00, 3.42167755034365e+00,  3.36405531323357e+00,\n                                                3.30160120112834e+00, 3.23472607684769e+00, 3.16394350389464e+00, 3.08985300826911e+00,  3.01311977695850e+00,\n                                                2.93445203609067e+00, 2.85457749658946e+00, 2.77422029771432e+00, 2.69407980213741e+00,  2.61481239175279e+00,\n                                                2.53701709245094e+00, 2.46122545535126e+00, 2.38789569938833e+00, 2.31741074111491e+00,  2.25007945754933e+00,\n                                                2.18614037812939e+00, 2.12576698372919e+00, 2.06907387944203e+00, 2.01612326286514e+00,  1.96693128723427e+00,\n                                                1.92147408270843e+00, 1.87969332671778e+00, 1.84150133757063e+00, 1.80678570839291e+00,  1.77541351201621e+00,\n                                                1.74723510482074e+00, 1.72208755022311e+00, 1.69979767802057e+00, 1.68018479738116e+00,  1.66306308856343e+00,\n                                                1.64824370893731e+00, 1.63553665924650e+00, 1.62475246328525e+00, 1.61570371617000e+00,  1.60820655223177e+00,\n                                                1.60208207339924e+00, 1.59715776382456e+00, 1.59326889807696e+00, 1.59025993049647e+00,  1.58798583437100e+00,\n                                                1.58631334347603e+00, 1.58512203689733e+00, 1.58430520218148e+00, 1.58377041237699e+00,  1.58343975944199e+00,\n                                                1.58324969916276e+00, 1.58315047994557e+00, 1.58310514800683e+00, 1.58308814277796e+00,  1.58308351697609e+00,\n                                                1.58308283421862e+00, 1.58308277128057e+00, 1.58308150786979e+00, 1.58307294810984e+00,  1.58304148203456e+00,\n                                                1.58295760893144e+00, 1.58277407448988e+00, 1.58242265991758e+00, 1.58181178431704e+00,  1.58082508386918e+00,\n                                                1.57932113212284e+00, 1.57713446065794e+00, 1.57407802318570e+00, 1.56994721300808e+00,  1.56452548859249e+00,\n                                                1.55759158164158e+00, 1.54892815647465e+00, 1.53833166309694e+00, 1.52562298814622e+00,  1.51065837153403e+00,\n                                                1.49333993850593e+00, 1.47362511382379e+00, 1.45153415090216e+00, 1.42715503297401e+00,  1.40064508907754e+00,\n                                                1.37222881488512e+00, 1.34219159830255e+00, 1.31086932842459e+00, 1.27863422300767e+00,  1.24587764430076e+00,\n                                                1.21299115485481e+00, 1.18034750964929e+00, 1.14828355011235e+00, 1.11708690640310e+00,  1.08698793725383e+00,\n                                                1.05815749323524e+00, 1.03071008904282e+00, 1.00471120595198e+00, 9.80186960273933e-01,  9.57134354341882e-01,\n                                                9.35530686775650e-01, 9.15341248945147e-01, 8.96524981632354e-01, 8.79038182968934e-01,  8.62836602454834e-01,\n                                                8.47876345423089e-01, 8.34113995986698e-01, 8.21506294734085e-01, 8.10009618747635e-01,  7.99579429114480e-01,\n                                                7.90169785405638e-01, 7.81732979638548e-01, 7.74219311629764e-01, 7.67577009403198e-01,  7.61752288461068e-01,\n                                                7.56689538979899e-01, 7.52331627980318e-01, 7.48620302663674e-01, 7.45496680461763e-01,  7.42901810424307e-01,\n                                                7.40777289200224e-01, 7.39065913103062e-01, 7.37712345773808e-01, 7.36663779039660e-01,  7.35870563034410e-01,\n                                                7.35286780813183e-01, 7.34870742851442e-01, 7.34585378181954e-01, 7.34398501608318e-01,  7.34282940429793e-01,\n                                                7.34216509273587e-01, 7.34181827686314e-01, 7.34165981716615e-01, 7.34160037400351e-01,  7.34158420407297e-01,\n                                                7.34158181742693e-01, 7.34158158998206e-01, 7.34157694358281e-01, 7.34154546361914e-01,  7.34142974105843e-01,\n                                                7.34112127577013e-01, 7.34044625051389e-01, 7.33915366294632e-01, 7.33690636310619e-01,  7.33327552549703e-01,\n                                                7.32773905816266e-01, 7.31968440438266e-01, 7.30841611067881e-01, 7.29316840135475e-01,  7.27312280080227e-01,\n                                                7.24743057331068e-01, 7.21523941155453e-01, 7.17572342154291e-01, 7.12811506454116e-01,  7.07173738194328e-01,\n                                                7.00603461066741e-01, 6.93059925043954e-01, 6.84519380310306e-01, 6.74976576516997e-01,  6.64445497691801e-01,\n                                                6.52959304293816e-01, 6.40569515594144e-01, 6.27344520032842e-01, 6.13367542750076e-01,  5.98734224879458e-01,\n                                                5.83549977324402e-01, 5.67927263200666e-01, 5.51982940098206e-01, 5.35835759797060e-01,  5.19604084914313e-01,\n                                                5.03403846106650e-01, 4.87346736345749e-01, 4.71538624494578e-01, 4.56078169367764e-01,  4.41055624438178e-01,\n                                                4.26551836741758e-01, 4.12637455323477e-01, 3.99372370222189e-01, 3.86805400553627e-01,  3.74974240444971e-01,\n                                                3.63905657077929e-01, 3.53615919423149e-01, 3.44111422662024e-01, 3.35389464080393e-01,  3.27439122402630e-01,\n                                                3.20242193963146e-01, 3.13774144785434e-01, 3.08005046113550e-01, 3.02900470679184e-01,  2.98422336622231e-01,\n                                                2.94529694448876e-01, 2.91179459009953e-01, 2.88327092849855e-01, 2.85927249351758e-01,  2.83934384052614e-01,\n                                                2.82303340659332e-01, 2.80989915118312e-01, 2.79951397095068e-01, 2.79147083952282e-01,  2.78538758304478e-01,\n                                                2.78091116944339e-01, 2.77772136764050e-01, 2.77553362488973e-01, 2.77410101718480e-01,  2.77321514894567e-01,\n                                                2.77270591217068e-01, 2.77244005904201e-01, 2.77231859183090e-01, 2.77227302581714e-01,  2.77226063080668e-01,\n                                                2.77225880133095e-01, 2.77225862025361e-01, 2.77225485046401e-01, 2.77222930966218e-01,  2.77213542013257e-01,\n                                                2.77188515402841e-01, 2.77133749799560e-01, 2.77028884444107e-01, 2.76846576933970e-01,  2.76552065125728e-01,\n                                                2.76103057636810e-01, 2.75449995007257e-01, 2.74536718533277e-01, 2.73301574832921e-01,  2.71678970222318e-01,\n                                                2.69601369240938e-01, 2.67001706067788e-01, 2.63816146859206e-01, 2.59987106900340e-01,  2.55466391528465e-01,\n                                                2.50218297479805e-01, 2.44222485574006e-01, 2.37476420561734e-01, 2.29997173338390e-01,  2.21822397704152e-01,\n                                                2.13010330450601e-01, 2.03638720182759e-01, 1.93802665104201e-01, 1.83611428254331e-01,  1.73184392286970e-01,\n                                                1.62646403602260e-01, 1.52122824458125e-01, 1.41734649209731e-01, 1.31594038409993e-01,  1.21800579997192e-01,\n                                                1.12438505839982e-01, 1.03574987118840e-01, 9.52595201669837e-02, 8.75243124847458e-02,  8.03855002071572e-02,\n                                                7.38449809677277e-02, 6.78926309596051e-02, 6.25086876740468e-02, 5.76661125063467e-02,  5.33327912323145e-02,\n                                                4.94734770985872e-02, 4.60514246671266e-02, 4.30296986800869e-02, 4.03721693355834e-02,  3.80442234796732e-02,\n                                                3.60132314319301e-02, 3.42488131357825e-02, 3.27229468310719e-02, 3.14099600985998e-02,  3.02864382266819e-02,\n                                                2.93310793578456e-02, 2.85245204202624e-02, 2.78491527924629e-02, 2.72889421433078e-02,  2.68292629480555e-02,\n                                                2.64567547469738e-02, 2.61592042031324e-02, 2.59254543564822e-02, 2.57453401233931e-02,  2.56096470549139e-02,\n                                                2.55100886820969e-02, 2.54392965108678e-02, 2.53908159527825e-02, 2.53591012500607e-02,  2.53395027927965e-02,\n                                                2.53282411014837e-02, 2.53223630716235e-02, 2.53196777137532e-02, 2.53186704019441e-02,  2.53183963942547e-02,\n                                                2.53183559514909e-02, 2.53183517796671e-02, 2.53182632214859e-02, 2.53176632339631e-02,  2.53154577241261e-02,\n                                                2.53095794723848e-02, 2.52967192615330e-02, 2.52721065035857e-02, 2.52293550027787e-02,  2.51603920524275e-02,\n                                                2.50554915122621e-02, 2.49034328584443e-02, 2.46918071577937e-02, 2.44074860820760e-02,  2.40372601815579e-02,\n                                                2.35686369423576e-02, 2.29907678945693e-02, 2.22954488639857e-02, 2.14781116583680e-02,  2.05387038992910e-02,\n                                                1.94823421279153e-02, 1.83196272821178e-02, 1.70665348954202e-02, 1.57438352042831e-02,  1.43760564946547e-02,\n                                                1.29900695844185e-02, 1.16134302237469e-02, 1.02726568251654e-02, 8.99163368983835e-03,  7.79031108520201e-03,\n                                                6.68382675488033e-03, 5.68210869035113e-03, 4.78994972871050e-03, 4.00748394602601e-03,  3.33095268909744e-03,\n                                                2.75362932190859e-03, 2.26677633885686e-03, 1.86053219939453e-03, 1.52466050607813e-03,  1.24913138551364e-03,\n                                                1.02453500865352e-03, 8.42344835540132e-04, 6.95054259757910e-04, 5.76210663950860e-04,  4.80371525213741e-04,\n                                                4.03009694544210e-04, 3.40395889530498e-04, 2.89481654164092e-04, 2.47795654260585e-04,  2.13355153732664e-04,\n                                                1.84588452007972e-04, 1.60264428359369e-04, 1.39428893724869e-04, 1.21349807876925e-04,  1.05472765575598e-04,\n                                                9.13857921389649e-05, 7.87907223980255e-05, 6.74784253007488e-05, 5.73064225335429e-05,  4.81788671606864e-05,\n                                                4.00295728297806e-05, 3.28087067771321e-05, 2.64732460024675e-05, 2.09807716657906e-05,  1.62858794396925e-05,\n                                                1.23384401433668e-05, 9.08306667213310e-06, 6.45932296805540e-06, 4.40237658239084e-06,  2.84392061189465e-06,\n                                                1.71327161524459e-06, 9.38602035205349e-07, 4.48300369271237e-07, -2.13162820728030e-14, -2.13162820728030e-14,\n                                                -1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {5.70000000000000e+01, 5.69999997742135e+01, 5.69999927924467e+01, 5.69999454898285e+01, 5.69997715985871e+01,\n                                                5.69993080544580e+01, 5.69982935288425e+01, 5.69963503204990e+01, 5.69929702199128e+01, 5.69875048158246e+01,\n                                                5.69791605574141e+01, 5.69669987332254e+01, 5.69499403997208e+01, 5.69267762113508e+01, 5.68961810905396e+01,\n                                                5.68567337395644e+01, 5.68069411257242e+01, 5.67452682252308e+01, 5.66701734149383e+01, 5.65801498527235e+01,\n                                                5.64737728806966e+01, 5.63497528457734e+01, 5.62069917596302e+01, 5.60446410249551e+01, 5.58621562660716e+01,\n                                                5.56593444338576e+01, 5.54363981306059e+01, 5.51939127482452e+01, 5.49328835696211e+01, 5.46546822422203e+01,\n                                                5.43610145757166e+01, 5.40538639047029e+01, 5.37354257982722e+01, 5.34080403733454e+01, 5.30741278349875e+01,\n                                                5.27361313545883e+01, 5.23964694285902e+01, 5.20574979203099e+01, 5.17214804855942e+01, 5.13905652604499e+01,\n                                                5.10667655820889e+01, 5.07519429817103e+01, 5.04477914739667e+01, 5.01558229936775e+01, 4.98773544651810e+01,\n                                                4.96134973069054e+01, 4.93651501644576e+01, 4.91329954164090e+01, 4.89174996415362e+01, 4.87189179011853e+01,\n                                                4.85373014570831e+01, 4.83725084377637e+01, 4.82242169650406e+01, 4.80919403128175e+01, 4.79750437506091e+01,\n                                                4.78727627922186e+01, 4.77842226102941e+01, 4.77084583868034e+01, 4.76444363524503e+01, 4.75910752327560e+01,\n                                                4.75472677736355e+01, 4.75119019727763e+01, 4.74838816018242e+01, 4.74621455739857e+01, 4.74456856967957e+01,\n                                                4.74335623540202e+01, 4.74249176862677e+01, 4.74189858878175e+01, 4.74151003068054e+01, 4.74126971250110e+01,\n                                                4.74113154982969e+01, 4.74105941542458e+01, 4.74102645638177e+01, 4.74101409226854e+01, 4.74101072892633e+01,\n                                                4.74101023250393e+01, 4.74101016455071e+01, 4.74100855972566e+01, 4.74099768681569e+01, 4.74095771708643e+01,\n                                                4.74085117429089e+01, 4.74061801726236e+01, 4.74017152918664e+01, 4.73939519379934e+01, 4.73814072753591e+01,\n                                                4.73622742260029e+01, 4.73344293642588e+01, 4.72954563469680e+01, 4.72426855426942e+01, 4.71732499560962e+01,\n                                                4.70841567954633e+01, 4.69723731021232e+01, 4.68349227827201e+01, 4.66689912374435e+01, 4.64720326959990e+01,\n                                                4.62418745624394e+01, 4.59768127897648e+01, 4.56756928102696e+01, 4.53379719496213e+01, 4.49637613282254e+01,\n                                                4.45538473339012e+01, 4.41096939071583e+01, 4.36334264876536e+01, 4.31277968276748e+01, 4.25961263079131e+01,\n                                                4.20422255039592e+01, 4.14702903401958e+01, 4.08847795790414e+01, 4.02902828569749e+01, 3.96913910784894e+01,\n                                                3.90925806027765e+01, 3.84981194270190e+01, 3.79119986607959e+01, 3.73378876495411e+01, 3.67791076005384e+01,\n                                                3.62386172708930e+01, 3.57190051208731e+01, 3.52224845491524e+01, 3.47508913225332e+01, 3.43056841329972e+01,\n                                                3.38879498677882e+01, 3.34984147427476e+01, 3.31374614175918e+01, 3.28051511784911e+01, 3.25012496510775e+01,\n                                                3.22252544097397e+01, 3.19764231506376e+01, 3.17538015749107e+01, 3.15562505935287e+01, 3.13824728099012e+01,\n                                                3.12310384341584e+01, 3.11004108544337e+01, 3.09889720717747e+01, 3.08950481299107e+01, 3.08169345634104e+01,\n                                                3.07529217639945e+01, 3.07013200361978e+01, 3.06604839894831e+01, 3.06288358032186e+01, 3.06048868126084e+01,\n                                                3.05872568062550e+01, 3.05746904066774e+01, 3.05660699285753e+01, 3.05604241774363e+01, 3.05569327610194e+01,\n                                                3.05549256323735e+01, 3.05538777561787e+01, 3.05533989787910e+01, 3.05532193738181e+01, 3.05531705170008e+01,\n                                                3.05531633058402e+01, 3.05531626213023e+01, 3.05531486652008e+01, 3.05530541107227e+01, 3.05527065208986e+01,\n                                                3.05517799927874e+01, 3.05497524037755e+01, 3.05458696926141e+01, 3.05391187652437e+01, 3.05282105311319e+01,\n                                                3.05115744684031e+01, 3.04873659612626e+01, 3.04534874200562e+01, 3.04076238494851e+01, 3.03472930450552e+01,\n                                                3.02699099549859e+01, 3.01728639485353e+01, 3.00536068147228e+01, 2.99097483445334e+01, 2.97391554259887e+01,\n                                                2.95400498325325e+01, 2.93110994461203e+01, 2.90514976387823e+01, 2.87610259887819e+01, 2.84400963802959e+01,\n                                                2.80897696737604e+01, 2.77117493216086e+01, 2.73083493641281e+01, 2.68824371500981e+01, 2.64373520680701e+01,\n                                                2.59768028441837e+01, 2.55047477613526e+01, 2.50252643626795e+01, 2.45424173055786e+01, 2.40601342815425e+01,\n                                                2.35820996457274e+01, 2.31116733557855e+01, 2.26518393083129e+01, 2.22051829668071e+01, 2.17738942802507e+01,\n                                                2.13597891489458e+01, 2.09643415759858e+01, 2.05887191502730e+01, 2.02338162434793e+01, 1.99002816504818e+01,\n                                                1.95885397239547e+01, 1.92988058585208e+01, 1.90310982143818e+01, 1.87852478273563e+01, 1.85609089146455e+01,\n                                                1.83575705314531e+01, 1.81745700358328e+01, 1.80111082717558e+01, 1.78662660681431e+01, 1.77390215629319e+01,\n                                                1.76282679269391e+01, 1.75328311977321e+01, 1.74514880690968e+01, 1.73829835747433e+01, 1.73260486400881e+01,\n                                                1.72794174568281e+01, 1.72418445753729e+01, 1.72121215274306e+01, 1.71890927021222e+01, 1.71716701186342e+01,\n                                                1.71588466783480e+01, 1.71497074481763e+01, 1.71434385298064e+01, 1.71393331086249e+01, 1.71367943498521e+01,\n                                                1.71353349132205e+01, 1.71345729840745e+01, 1.71342248588168e+01, 1.71340942660595e+01, 1.71340587417618e+01,\n                                                1.71340534984534e+01, 1.71340530318364e+01, 1.71340438464257e+01, 1.71339816140307e+01, 1.71337528428724e+01,\n                                                1.71331430360851e+01, 1.71318085554557e+01, 1.71292531206286e+01, 1.71248099965887e+01, 1.71176308704758e+01,\n                                                1.71066823523405e+01, 1.70907509370001e+01, 1.70684571147662e+01, 1.70382790950589e+01, 1.69985862887632e+01,\n                                                1.69476822696290e+01, 1.68838564005982e+01, 1.68054426814180e+01, 1.67108836802890e+01, 1.65987967032400e+01,\n                                                1.64680386964402e+01, 1.63177658540971e+01, 1.61474836292654e+01, 1.59570829633590e+01, 1.57468592412037e+01,\n                                                1.55175119074518e+01, 1.52701248792380e+01, 1.50061305796458e+01, 1.47272628868411e+01, 1.44355055435004e+01,\n                                                1.41330418086868e+01, 1.38222084081404e+01, 1.35054532724679e+01, 1.31852938277001e+01, 1.28642719747373e+01,\n                                                1.25449034845882e+01, 1.22296223966189e+01, 1.19207237843786e+01, 1.16203099008298e+01, 1.13302448411339e+01,\n                                                1.10521216829433e+01, 1.07872441402047e+01, 1.05366227132687e+01, 1.03009836141601e+01, 1.00807876498679e+01,\n                                                9.87625580602542e+00, 9.68739838518670e+00, 9.51404503948541e+00, 9.35587370787827e+00, 9.21243716678960e+00,\n                                                9.08318652427606e+00, 8.96749147771836e+00, 8.86465750013765e+00, 8.77394033325804e+00, 8.69455827172673e+00,\n                                                8.62570275045225e+00, 8.56654772070431e+00, 8.51625823979035e+00, 8.47399861753918e+00, 8.43894036974670e+00,\n                                                8.41027013047027e+00, 8.38719757636342e+00, 8.36896332140459e+00, 8.35484665378108e+00, 8.34417291296610e+00,\n                                                8.33632024878604e+00, 8.33072546962860e+00, 8.32688867689951e+00, 8.32437639873434e+00, 8.32282297708240e+00,\n                                                8.32193002566033e+00, 8.32146385696464e+00, 8.32125086803951e+00, 8.32117096973801e+00, 8.32114923557577e+00,\n                                                8.32114602766305e+00, 8.32114574406712e+00, 8.32114018263430e+00, 8.32110250321537e+00, 8.32096399128349e+00,\n                                                8.32059478160185e+00, 8.31978683752220e+00, 8.31823976656344e+00, 8.31555014365628e+00, 8.31120500121501e+00,\n                                                8.30458012471191e+00, 8.29494374911352e+00, 8.28146616677445e+00, 8.26323561107998e+00, 8.23928055433459e+00,\n                                                8.20859824180121e+00, 8.17018887666337e+00, 8.12309438944279e+00, 8.06644020589565e+00, 7.99947792545053e+00,\n                                                7.92162641027264e+00, 7.83250854379788e+00, 7.73198092267241e+00, 7.62015405029581e+00, 7.49740121479324e+00,\n                                                7.36435511360937e+00, 7.22189232361799e+00, 7.07110675210625e+00, 6.91327406384185e+00, 6.74980961487951e+00,\n                                                6.58222256643332e+00, 6.41206864703504e+00, 6.24090363246449e+00, 6.07023922992339e+00, 5.90150285637689e+00,\n                                                5.73600282675682e+00, 5.57490057393979e+00, 5.41919144582975e+00, 5.26969513067750e+00, 5.12705580881197e+00,\n                                                4.99175093614755e+00, 4.86410651560961e+00, 4.74431615132035e+00, 4.63246123816055e+00, 4.52853019865071e+00,\n                                                4.43243547477989e+00, 4.34402774823246e+00, 4.26310743133329e+00, 4.18943379599443e+00, 4.12273222721845e+00,\n                                                4.06270007429354e+00, 4.00901149648811e+00, 3.96132160964197e+00, 3.91927016134962e+00, 3.88248490384429e+00,\n                                                3.85058479352492e+00, 3.82318311842393e+00, 3.79989063337455e+00, 3.78031876210407e+00, 3.76408290278031e+00,\n                                                3.75080584738882e+00, 3.74012129600573e+00, 3.73167741602933e+00, 3.72514036600835e+00, 3.72019767653755e+00,\n                                                3.71656135952469e+00, 3.71397060441050e+00, 3.71219391748098e+00, 3.71103056920224e+00, 3.71031123444124e+00,\n                                                3.70989774032898e+00, 3.70968187420414e+00, 3.70958324662860e+00, 3.70954624857648e+00, 3.70953618426176e+00,\n                                                3.70953469879191e+00, 3.70953456543853e+00, 3.70953192735891e+00, 3.70951405403396e+00, 3.70944835058805e+00,\n                                                3.70927321537220e+00, 3.70888996692221e+00, 3.70815611785660e+00, 3.70688031593721e+00, 3.70481926765323e+00,\n                                                3.70167695083598e+00, 3.69710640270721e+00, 3.69071432912764e+00, 3.68206870967578e+00, 3.67070946279139e+00,\n                                                3.65616208044130e+00, 3.63795394374475e+00, 3.61563279943440e+00, 3.58878663144611e+00, 3.55706393096445e+00,\n                                                3.52019318648826e+00, 3.47800031769241e+00, 3.43042279068951e+00, 3.37751929120788e+00, 3.31947409118582e+00,\n                                                3.25659560009164e+00, 3.18930900850315e+00, 3.11814336637462e+00, 3.04371385207279e+00, 2.96670034608364e+00,\n                                                2.88782369537782e+00, 2.80782121361312e+00, 2.72742298497576e+00, 2.64733041115206e+00, 2.56819816567709e+00,\n                                                2.49062032717523e+00, 2.41512100732036e+00, 2.34214934039573e+00, 2.27207832734831e+00, 2.20520677788819e+00,\n                                                2.14176348950473e+00, 2.08191283100584e+00, 2.02576102510088e+00, 1.97336260298689e+00, 1.92472668882727e+00,\n                                                1.87982292974246e+00, 1.83858699960506e+00, 1.80092566997062e+00, 1.76672146745574e+00, 1.73583693793568e+00,\n                                                1.70811852853045e+00, 1.68340008962263e+00, 1.66150599731441e+00, 1.64225390323561e+00, 1.62545713146525e+00,\n                                                1.61092675776768e+00, 1.59847342039191e+00, 1.58790892113601e+00, 1.57904767832238e+00, 1.57170808916231e+00,\n                                                1.56571384823881e+00, 1.56089525285292e+00, 1.55709050662347e+00, 1.55414701212608e+00, 1.55192262365868e+00,\n                                                1.55028681443284e+00, 1.54912170029942e+00, 1.54832285574039e+00, 1.54779985793613e+00, 1.54747650124236e+00,\n                                                1.54729063673786e+00, 1.54719360842981e+00, 1.54714927761242e+00, 1.54713264795116e+00, 1.54712812431396e+00,\n                                                1.54712745663581e+00, 1.54712739508781e+00, 1.54712615958070e+00, 1.54711778887293e+00, 1.54708701778614e+00,\n                                                1.54700499736434e+00, 1.54682551796340e+00, 1.54648187116722e+00, 1.54588450970019e+00, 1.54491966752737e+00,\n                                                1.54344910391932e+00, 1.54131113103914e+00, 1.53832306906605e+00, 1.53428524009905e+00, 1.52898655683410e+00,\n                                                1.52221168093097e+00, 1.51374961894778e+00, 1.50340349489694e+00, 1.49100109691924e+00, 1.47640565489144e+00,\n                                                1.45952618273832e+00, 1.44032663138184e+00, 1.41883306126781e+00, 1.39513806889606e+00, 1.36940179697655e+00,\n                                                1.34184902730498e+00, 1.31276210377446e+00, 1.28246976516814e+00, 1.25133238295921e+00, 1.21972457714376e+00,\n                                                1.18801666192257e+00, 1.15655674155430e+00, 1.12565539237836e+00, 1.09557461246311e+00, 1.06652207821972e+00,\n                                                1.03865084606903e+00, 1.01206372284943e+00, 9.86820863225290e-01, 9.62948897072550e-01, 9.40450044863283e-01,\n                                                9.19310110486371e-01, 8.99504763777038e-01, 8.81003985219998e-01, 8.63774861162845e-01, 8.47783077884522e-01,\n                                                8.32993499207795e-01, 8.19370172050633e-01, 8.06876029681277e-01, 7.95472482786735e-01, 7.85119019722089e-01,\n                                                7.75772885335833e-01, 7.67388872329725e-01, 7.59919237123945e-01, 7.53313739826531e-01, 7.47519801695361e-01,\n                                                7.42482770759750e-01, 7.38146285198972e-01, 7.34452723488765e-01, 7.31343729576274e-01, 7.28760800128434e-01,\n                                                7.26645919169890e-01, 7.24942223297475e-01, 7.23594678351432e-01, 7.22550746228677e-01, 7.21761018760397e-01,\n                                                7.21179794562190e-01, 7.20765574781886e-01, 7.20481454924567e-01, 7.20295392534005e-01, 7.20180334435113e-01,\n                                                7.20114192340887e-01, 7.20079661623991e-01, 7.20063884577733e-01, 7.20057966115320e-01, 7.20056356154984e-01,\n                                                7.20056118528397e-01, 7.20056095882818e-01, 7.20055633263712e-01, 7.20052498958552e-01, 7.20040977030372e-01,\n                                                7.20010264638724e-01, 7.19943055575293e-01, 7.19814358475027e-01, 7.19590604097327e-01, 7.19229094186879e-01,\n                                                7.18677841714339e-01, 7.17875847630026e-01, 7.16753851171283e-01, 7.15235577659186e-01, 7.13239488237392e-01,\n                                                7.10681009449694e-01, 7.07475187398074e-01, 7.03539673547859e-01, 6.98797910912539e-01, 6.93182355754132e-01,\n                                                6.86637547205997e-01, 6.79122830938567e-01, 6.70614556680604e-01, 6.61107603373573e-01, 6.50616136586294e-01,\n                                                6.39173564066198e-01, 6.26831718779691e-01, 6.13659356374370e-01, 5.99740099004542e-01, 5.85169985433019e-01,\n                                                5.70054796182383e-01, 5.54507312589216e-01, 5.38644642693882e-01, 5.22585710197156e-01, 5.06448962366946e-01,\n                                                4.90350316543690e-01, 4.74401339246867e-01, 4.58707640214001e-01, 4.43367465380959e-01, 4.28470483637810e-01,\n                                                4.14096776000562e-01, 4.00316046601162e-01, 3.87187078508674e-01, 3.74757452546426e-01, 3.63063535308903e-01,\n                                                3.52130726617069e-01, 3.41973940361747e-01, 3.32598279278777e-01, 3.23999855752177e-01, 3.16166708008538e-01,\n                                                3.09079763646785e-01, 3.02713809161077e-01, 2.97038433407465e-01, 2.92018923268856e-01, 2.87617099728337e-01,\n                                                2.83792091155583e-01, 2.80501047194413e-01, 2.77699800907619e-01, 2.75343488767433e-01, 2.73387137872717e-01,\n                                                2.71786227785633e-01, 2.70497231068859e-01, 2.69478132494768e-01, 2.68688922528327e-01, 2.68092056583669e-01,\n                                                2.67652868184697e-01, 2.67339921903762e-01, 2.67125291063593e-01, 2.66984745783141e-01, 2.66897838994637e-01,\n                                                2.66847881382418e-01, 2.66821800504097e-01, 2.66809884277322e-01, 2.66805414144599e-01, 2.66804198165332e-01,\n                                                2.66804018689527e-01, 2.66804000925426e-01, 2.66803631100359e-01, 2.66801125489025e-01, 2.66791914715320e-01,\n                                                2.66767363085556e-01, 2.66713637068072e-01, 2.66610763035516e-01, 2.66431919677579e-01, 2.66143010145349e-01,\n                                                2.65702558189282e-01, 2.65061970322954e-01, 2.64166201154040e-01, 2.62954850172264e-01, 2.61363704314860e-01,\n                                                2.59326720791115e-01, 2.56778418831082e-01, 2.53656617979672e-01, 2.49905426014564e-01, 2.45478344231955e-01,\n                                                2.40341325257404e-01, 2.34475592791149e-01, 2.27880018036835e-01, 2.20572847951587e-01, 2.12592599101058e-01,\n                                                2.03997969754361e-01, 1.94866682045500e-01, 1.85293243229616e-01, 1.75385704879716e-01, 1.65261592540269e-01,\n                                                1.55043264208430e-01, 1.44853020981948e-01, 1.34808325397969e-01, 1.25017474700485e-01, 1.15576026560767e-01,\n                                                1.06564190369419e-01, 9.80452914206182e-02, 9.00653049730664e-02, 8.26533588295817e-02, 7.58230293854112e-02,\n                                                6.95742136970878e-02, 6.38953492748655e-02, 5.87657690864134e-02, 5.41580136862265e-02, 5.00399666216254e-02,\n                                                4.63767254157901e-02, 4.31321625798518e-02, 4.02701656809157e-02, 3.77555710372093e-02, 3.55548223081001e-02,\n                                                3.36363943070310e-02, 3.19710254811767e-02, 3.05318014354654e-02, 2.92941281947634e-02, 2.82356288508936e-02,\n                                                2.73359917364147e-02, 2.65767928913903e-02, 2.59413106667594e-02, 2.54143459658707e-02, 2.49820578622391e-02,\n                                                2.46318210775343e-02, 2.43521089706960e-02, 2.41324031965462e-02, 2.39631289982825e-02, 2.38356131978321e-02,\n                                                2.37420603762359e-02, 2.36755415554057e-02, 2.36299889702209e-02, 2.36001903121377e-02, 2.35817761503370e-02,\n                                                2.35711950683140e-02, 2.35656723073632e-02, 2.35631492586919e-02, 2.35622028320748e-02, 2.35619453863762e-02,\n                                                2.35619073881210e-02, 2.35619034684618e-02, 2.35618202631613e-02, 2.35612565418606e-02, 2.35591843455936e-02,\n                                                2.35536614207845e-02, 2.35415786412432e-02, 2.35184540177968e-02, 2.34782880825080e-02, 2.34134978886757e-02,\n                                                2.33149492176210e-02, 2.31721078754177e-02, 2.29733299707036e-02, 2.27063064373141e-02, 2.23586675935579e-02,\n                                                2.19187385084183e-02, 2.13764156160465e-02, 2.07241109772056e-02, 1.99576860217121e-02, 1.90772761991767e-02,\n                                                1.80878972850707e-02, 1.69997284420447e-02, 1.58279900246896e-02, 1.45923756504942e-02, 1.33160539120993e-02,\n                                                1.20243165382945e-02, 1.07430051610606e-02, 9.49688625978240e-03, 8.30815456429690e-03, 7.19522614229362e-03,\n                                                6.17193719620701e-03, 5.24720248316868e-03, 4.42512058644695e-03, 3.70545453777993e-03, 3.08437581843179e-03,\n                                                2.55534375942545e-03, 2.11000137724682e-03, 1.73899680933687e-03, 1.43267562999938e-03, 1.18162141821188e-03,\n                                                9.77042937243766e-04, 8.11017229111144e-04, 6.76605236655803e-04, 5.67864945786312e-04, 4.79794699003833e-04,\n                                                4.08240473809940e-04, 3.49792917539560e-04, 3.01687148642316e-04, 2.61708375091985e-04, 2.28103204150898e-04,\n                                                1.99497996810294e-04, 1.74827124077126e-04, 1.53273069770421e-04, 1.34217870574105e-04, 1.17203482325579e-04,\n                                                1.01898379313070e-04, 8.80686217925586e-05, 7.55527565772240e-05, 6.42405639368349e-05, 5.40557449113521e-05,\n                                                4.49424180430924e-05, 3.68550478739849e-05, 2.97512894746887e-05, 2.35872089575651e-05, 1.83143761773863e-05,\n                                                1.38783857366320e-05, 1.02184263042204e-05, 7.26758525360083e-06, 4.95364547958843e-06, 3.20019854171960e-06,\n                                                1.92796116493810e-06, 1.05623406909672e-06, 5.04487992714076e-07, 2.84217094304040e-14, 3.55271367880050e-14,\n                                                2.13162820728030e-14}),\nmadness::CubicInterpolationTable<double>(grid, {5.80000000000000e+01, 5.79999997684782e+01, 5.79999926093646e+01, 5.79999441051917e+01, 5.79997657968535e+01,\n                                                5.79992904779444e+01, 5.79982501813740e+01, 5.79962576103923e+01, 5.79927916422484e+01, 5.79871873851809e+01,\n                                                5.79786311094299e+01, 5.79661602170255e+01, 5.79486682847159e+01, 5.79249151335181e+01, 5.78935418680601e+01,\n                                                5.78530908988047e+01, 5.78020310980961e+01, 5.77387884027772e+01, 5.76617822824464e+01, 5.75694684360629e+01,\n                                                5.74603877492252e+01, 5.73332208632213e+01, 5.71868466783970e+01, 5.70204018590497e+01, 5.68333371703089e+01,\n                                                5.66254655927826e+01, 5.63969969665950e+01, 5.61485546457001e+01, 5.58811713218975e+01, 5.55962635750729e+01,\n                                                5.52955873662431e+01, 5.49811790457515e+01, 5.46552879826466e+01, 5.43203073174940e+01, 5.39787085765280e+01,\n                                                5.36329842251710e+01, 5.32856001444581e+01, 5.29389579985976e+01, 5.25953659501396e+01, 5.22570154078784e+01,\n                                                5.19259614791616e+01, 5.16041053724139e+01, 5.12931778745435e+01, 5.09947239082235e+01, 5.07100888157958e+01,\n                                                5.04404072973267e+01, 5.01865958582919e+01, 4.99493493069075e+01, 4.97291414356947e+01, 4.95262296634421e+01,\n                                                4.93406631827775e+01, 4.91722940706368e+01, 4.90207908420694e+01, 4.88856540104306e+01, 4.87662333113329e+01,\n                                                4.86617463221284e+01, 4.85712982492486e+01, 4.84939026618238e+01, 4.84285029283961e+01, 4.83739940736944e+01,\n                                                4.83292447237257e+01, 4.82931187580524e+01, 4.82644962448843e+01, 4.82422932030823e+01, 4.82254797198662e+01,\n                                                4.82130959573801e+01, 4.82042656075609e+01, 4.81982064038604e+01, 4.81942373696372e+01, 4.81917825741569e+01,\n                                                4.81903712742916e+01, 4.81896344380630e+01, 4.81892977691041e+01, 4.81891714725661e+01, 4.81891371168088e+01,\n                                                4.81891320459697e+01, 4.81891313518434e+01, 4.81891149589294e+01, 4.81890038946881e+01, 4.81885956132331e+01,\n                                                4.81875073035526e+01, 4.81851256597087e+01, 4.81805648918099e+01, 4.81726348197393e+01, 4.81598207774209e+01,\n                                                4.81402769120220e+01, 4.81118342632121e+01, 4.80720247174846e+01, 4.80181215132722e+01, 4.79471963893866e+01,\n                                                4.78561926999655e+01, 4.77420128646206e+01, 4.76016174193605e+01, 4.74321317675646e+01, 4.72309556480645e+01,\n                                                4.69958695537032e+01, 4.67251321104903e+01, 4.64175630003721e+01, 4.60726074423892e+01, 4.56903802486997e+01,\n                                                4.52716893409393e+01, 4.48180394805660e+01, 4.43316163750696e+01, 4.38152497587894e+01, 4.32723528990230e+01,\n                                                4.27068367182632e+01, 4.21229998705964e+01, 4.15254007646794e+01, 4.09187218171911e+01, 4.03076383059904e+01,\n                                                3.96967031484086e+01, 3.90902551023347e+01, 3.84923526358481e+01, 3.79067307789393e+01, 3.73367750977590e+01,\n                                                3.67855061741258e+01, 3.62555693725987e+01, 3.57492272756602e+01, 3.52683547518776e+01, 3.48144382237482e+01,\n                                                3.43885809439886e+01, 3.39915152351719e+01, 3.36236213523886e+01, 3.32849515503184e+01, 3.29752574425474e+01,\n                                                3.26940188424674e+01, 3.24404727506210e+01, 3.22136417340776e+01, 3.20123614378124e+01, 3.18353072951915e+01,\n                                                3.16810206662763e+01, 3.15479346686791e+01, 3.14343999209977e+01, 3.13387103279416e+01, 3.12591289210457e+01,\n                                                3.11939136423618e+01, 3.11413428294298e+01, 3.10997400358687e+01, 3.10674977113309e+01, 3.10430991761629e+01,\n                                                3.10251382686252e+01, 3.10123360233621e+01, 3.10035537639895e+01, 3.09978020618571e+01, 3.09942451250837e+01,\n                                                3.09922003308650e+01, 3.09911327904634e+01, 3.09906450284780e+01, 3.09904620530951e+01, 3.09904122794467e+01,\n                                                3.09904049329639e+01, 3.09904042355802e+01, 3.09903900175831e+01, 3.09902936887271e+01, 3.09899395761548e+01,\n                                                3.09889956611918e+01, 3.09869300235110e+01, 3.09829744523781e+01, 3.09760968452496e+01, 3.09649839283009e+01,\n                                                3.09480357242258e+01, 3.09233730351650e+01, 3.08888589712036e+01, 3.08421352036571e+01, 3.07806731279151e+01,\n                                                3.07018394661408e+01, 3.06029750302111e+01, 3.04814844339581e+01, 3.03349335596296e+01, 3.01611506491527e+01,\n                                                2.99583261336845e+01, 2.97251058666291e+01, 2.94606723896338e+01, 2.91648092766660e+01, 2.88379444133148e+01,\n                                                2.84811691320015e+01, 2.80962312570269e+01, 2.76855011945850e+01, 2.72519112626923e+01, 2.67988696901359e+01,\n                                                2.63301523659216e+01, 2.58497775725903e+01, 2.53618713266688e+01, 2.48705329619825e+01, 2.43797114630739e+01,\n                                                2.38931022103893e+01, 2.34140711395046e+01, 2.29456093231000e+01, 2.24903165682190e+01, 2.20504088138731e+01,\n                                                2.16277417290934e+01, 2.12238423164635e+01, 2.08399413885907e+01, 2.04770019820700e+01, 2.01357413962221e+01,\n                                                1.98166469148029e+01, 1.95199869101119e+01, 1.92458197466693e+01, 1.89940027804579e+01, 1.87642030711111e+01,\n                                                1.85559105427082e+01, 1.83684535492952e+01, 1.82010163018795e+01, 1.80526574300897e+01, 1.79223290147538e+01,\n                                                1.78088956233769e+01, 1.77111531021303e+01, 1.76278470541128e+01, 1.75576910327542e+01, 1.74993845001512e+01,\n                                                1.74516305586997e+01, 1.74131533824955e+01, 1.73827151740402e+01, 1.73591323699351e+01, 1.73412907307600e+01,\n                                                1.73281588859277e+01, 1.73187998714991e+01, 1.73123802021785e+01, 1.73081760593271e+01, 1.73055762529958e+01,\n                                                1.73040817228047e+01, 1.73033014724472e+01, 1.73029449762567e+01, 1.73028112433026e+01, 1.73027748647980e+01,\n                                                1.73027694954106e+01, 1.73027690175735e+01, 1.73027596112931e+01, 1.73026958824765e+01, 1.73024616103598e+01,\n                                                1.73018371403851e+01, 1.73004705714943e+01, 1.72978536905668e+01, 1.72933037323557e+01, 1.72859519903294e+01,\n                                                1.72747402357000e+01, 1.72584258016554e+01, 1.72355960356585e+01, 1.72046925910937e+01, 1.71640456993440e+01,\n                                                1.71119181204507e+01, 1.70465579126844e+01, 1.69662585028506e+01, 1.68694238139273e+01, 1.67546354708292e+01,\n                                                1.66207184393524e+01, 1.64668009659140e+01, 1.62923645152814e+01, 1.60972797140045e+01, 1.58818252567624e+01,\n                                                1.56466883945770e+01, 1.53929478591526e+01, 1.51220424208572e+01, 1.48357299652525e+01, 1.45360422323979e+01,\n                                                1.42252388999331e+01, 1.39057620466011e+01, 1.35801894466595e+01, 1.32511838975248e+01, 1.29214364587764e+01,\n                                                1.25936036892947e+01, 1.22702416565292e+01, 1.19537415459829e+01, 1.16462724369799e+01, 1.13497361386370e+01,\n                                                1.10657372699257e+01, 1.07955696083177e+01, 1.05402176901089e+01, 1.03003711174209e+01, 1.00764481846392e+01,\n                                                9.86862525756138e+00, 9.67686867151872e+00, 9.50096655860381e+00, 9.34055877663366e+00, 9.19516384663466e+00,\n                                                9.06420242182962e+00, 8.94701727197211e+00, 8.84289007313922e+00, 8.75105546743740e+00, 8.67071293051124e+00,\n                                                8.60103698749995e+00, 8.54118627492581e+00, 8.49031187493620e+00, 8.44756526131846e+00, 8.41210610132187e+00,\n                                                8.38311005847211e+00, 8.35977664305030e+00, 8.34133706242493e+00, 8.32706193707829e+00, 8.31626867451134e+00,\n                                                8.30832823691212e+00, 8.30267100376227e+00, 8.29879142057068e+00, 8.29625114110807e+00, 8.29468041220539e+00,\n                                                8.29377751444400e+00, 8.29330615390993e+00, 8.29309079302999e+00, 8.29301000496500e+00, 8.29298802876919e+00,\n                                                8.29298478513296e+00, 8.29298449837886e+00, 8.29297887501365e+00, 8.29294077599660e+00, 8.29280072162180e+00,\n                                                8.29242740069322e+00, 8.29161046097303e+00, 8.29004616888506e+00, 8.28732661892172e+00, 8.28293316171763e+00,\n                                                8.27623469991391e+00, 8.26649145775198e+00, 8.25286474465888e+00, 8.23443308425293e+00, 8.21021484978878e+00,\n                                                8.17919722358192e+00, 8.14037088197688e+00, 8.09276931638361e+00, 8.03551117236816e+00, 7.96784348081347e+00,\n                                                7.88918324241634e+00, 7.79915459129031e+00, 7.69761878008357e+00, 7.58469454710851e+00, 7.46076705044076e+00,\n                                                7.32648443166824e+00, 7.18274209009306e+00, 7.03065575015435e+00, 6.87152522572078e+00, 6.70679129971229e+00,\n                                                6.53798830704422e+00, 6.36669490132449e+00, 6.19448525466201e+00, 6.02288275454253e+00, 5.85331821159362e+00,\n                                                5.68709461622561e+00, 5.52536037840333e+00, 5.36909252108537e+00, 5.21909037654220e+00, 5.07597910168679e+00,\n                                                4.94022113411716e+00, 4.81213293239890e+00, 4.69190418960942e+00, 4.57961712987181e+00, 4.47526425388613e+00,\n                                                4.37876370561985e+00, 4.28997208012310e+00, 4.20869489759177e+00, 4.13469514887806e+00, 4.06770034136856e+00,\n                                                4.00740841660988e+00, 3.95349282909456e+00, 3.90560700161521e+00, 3.86338831880987e+00, 3.82646178671235e+00,\n                                                3.79444346631058e+00, 3.76694377612773e+00, 3.74357074664292e+00, 3.72393329395182e+00, 3.70764455946210e+00,\n                                                3.69432533639826e+00, 3.68360757354677e+00, 3.67513791405086e+00, 3.66858119480737e+00, 3.66362380305337e+00,\n                                                3.65997676394446e+00, 3.65737841885610e+00, 3.65559655065774e+00, 3.65442982028366e+00, 3.65370839844411e+00,\n                                                3.65329370606679e+00, 3.65307721480337e+00, 3.65297830170277e+00, 3.65294119655749e+00, 3.65293110311246e+00,\n                                                3.65292961334308e+00, 3.65292947960373e+00, 3.65292683388854e+00, 3.65290890883277e+00, 3.65284301523820e+00,\n                                                3.65266737330391e+00, 3.65228301666460e+00, 3.65154704816515e+00, 3.65026756955611e+00, 3.64820060302381e+00,\n                                                3.64504931426545e+00, 3.64046582731446e+00, 3.63405588110854e+00, 3.62538650676349e+00, 3.61399679376573e+00,\n                                                3.59941165753196e+00, 3.58115832091743e+00, 3.55878498770111e+00, 3.53188093599913e+00, 3.50009702231200e+00,\n                                                3.46316539704862e+00, 3.42091712527247e+00, 3.37329641131103e+00, 3.32037025902347e+00, 3.26233265964651e+00,\n                                                3.19950276668862e+00, 3.13231695792086e+00, 3.06131515489059e+00, 2.98712222456329e+00, 2.91042568101891e+00,\n                                                2.83195119635830e+00, 2.75243758339652e+00, 2.67261290267085e+00, 2.59317316456966e+00, 2.51476476080203e+00,\n                                                2.43797131274557e+00, 2.36330513477284e+00, 2.29120305461370e+00, 2.22202597715933e+00, 2.15606136498930e+00,\n                                                2.09352774756582e+00, 2.03458043972412e+00, 1.97931780594030e+00, 1.92778759971896e+00, 1.87999309275223e+00,\n                                                1.83589885591667e+00, 1.79543615060178e+00, 1.75850793648758e+00, 1.72499351303701e+00, 1.69475280297415e+00,\n                                                1.66763027193160e+00, 1.64345846971985e+00, 1.62206118005876e+00, 1.60325617691044e+00, 1.58685760333169e+00,\n                                                1.57267800830886e+00, 1.56053009391444e+00, 1.55022823611892e+00, 1.54158984602321e+00, 1.53443663389933e+00,\n                                                1.52859582710058e+00, 1.52390137622653e+00, 1.52019516392251e+00, 1.51732820954054e+00, 1.51516184275256e+00,\n                                                1.51356880205918e+00, 1.51243420162862e+00, 1.51165630321551e+00, 1.51114702966362e+00, 1.51083216268061e+00,\n                                                1.51065117954028e+00, 1.51055669992506e+00, 1.51051353366774e+00, 1.51049734087986e+00, 1.51049293608343e+00,\n                                                1.51049228594596e+00, 1.51049222601488e+00, 1.51049102296601e+00, 1.51048287216790e+00, 1.51045290949777e+00,\n                                                1.51037304405993e+00, 1.51019828100147e+00, 1.50986366738019e+00, 1.50928201722727e+00, 1.50834257554077e+00,\n                                                1.50691078316801e+00, 1.50482930097252e+00, 1.50192043676336e+00, 1.49799008621199e+00, 1.49283324405607e+00,\n                                                1.48624106083270e+00, 1.47800931293965e+00, 1.46794802404127e+00, 1.45589183267282e+00, 1.44171055795756e+00,\n                                                1.42531928962818e+00, 1.40668723825877e+00, 1.38584454374067e+00, 1.36288626841723e+00, 1.33797290615074e+00,\n                                                1.31132692753976e+00, 1.28322516047262e+00, 1.25398717616953e+00, 1.22396030295418e+00, 1.19350238388677e+00,\n                                                1.16296384749440e+00, 1.13267094864331e+00, 1.10291202552114e+00, 1.07392822914185e+00, 1.04590945187670e+00,\n                                                1.01899528457408e+00, 9.93280019633872e-01, 9.68820212182578e-01, 9.45643211015039e-01, 9.23755323167676e-01,\n                                                9.03148728612244e-01, 8.83806744608002e-01, 8.65707429929429e-01, 8.48825765136823e-01, 8.33134752256505e-01,\n                                                8.18605782949042e-01, 8.05208572394761e-01, 7.92910882706330e-01, 7.81678187827886e-01, 7.71473373020662e-01,\n                                                7.62256519359028e-01, 7.53984795736308e-01, 7.46612464350150e-01, 7.40090996893855e-01, 7.34369294666593e-01,\n                                                7.29394004283030e-01, 7.25109920122108e-01, 7.21460464206253e-01, 7.18388233376480e-01, 7.15835602245775e-01,\n                                                7.13745368490486e-01, 7.12061424728702e-01, 7.10729438774564e-01, 7.09697521740935e-01, 7.08916861607861e-01,\n                                                7.08342298788722e-01, 7.07932820184553e-01, 7.07651949416395e-01, 7.07468013465878e-01, 7.07354269810637e-01,\n                                                7.07288883157574e-01, 7.07254746781423e-01, 7.07239149897241e-01, 7.07233299017354e-01, 7.07231707440883e-01,\n                                                7.07231472527695e-01, 7.07231450140696e-01, 7.07230992804149e-01, 7.07227894288756e-01, 7.07216503923831e-01,\n                                                7.07186142202787e-01, 7.07119700427491e-01, 7.06992472217280e-01, 7.06771270506643e-01, 7.06413881712223e-01,\n                                                7.05868905994294e-01, 7.05076027881368e-01, 7.03966753553154e-01, 7.02465638258644e-01, 7.00492008365885e-01,\n                                                6.97962156714986e-01, 6.94791957707437e-01, 6.90899811868128e-01, 6.86209792117587e-01, 6.80654830838002e-01,\n                                                6.74179763902075e-01, 6.66744040620458e-01, 6.58323920674476e-01, 6.48914011154332e-01, 6.38528045930933e-01,\n                                                6.27198869761976e-01, 6.14977652891575e-01, 6.01932420242221e-01, 5.88146025500436e-01, 5.73713729375541e-01,\n                                                5.58740550496765e-01, 5.43338547030885e-01, 5.27624160275877e-01, 5.11715714065332e-01, 4.95731123531527e-01,\n                                                4.79785831637045e-01, 4.63990968159926e-01, 4.48451716314388e-01, 4.33265875581704e-01, 4.18522620882776e-01,\n                                                4.04301471586614e-01, 3.90671493172434e-01, 3.77690755975721e-01, 3.65406068558912e-01, 3.53852989633317e-01,\n                                                3.43056105479803e-01, 3.33029543205008e-01, 3.23777677029341e-01, 3.15295977019417e-01, 3.07571947795843e-01,\n                                                3.00586108189755e-01, 2.94312970279528e-01, 2.88721986096292e-01, 2.83778440957789e-01, 2.79444282539203e-01,\n                                                2.75678883441010e-01, 2.72439741564696e-01, 2.69683126790852e-01, 2.67364684282470e-01, 2.65440004426267e-01,\n                                                2.63865167344299e-01, 2.62597266523130e-01, 2.61594911936669e-01, 2.60818708621848e-01, 2.60231702520450e-01,\n                                                2.59799781989663e-01, 2.59492021082309e-01, 2.59280949759578e-01, 2.59142736739449e-01, 2.59057272671100e-01,\n                                                2.59008144586701e-01, 2.58982496827677e-01, 2.58970778503794e-01, 2.58966382612400e-01, 2.58965186828696e-01,\n                                                2.58965010333718e-01, 2.58964992864648e-01, 2.58964629181833e-01, 2.58962165185210e-01, 2.58953107392628e-01,\n                                                2.58928963562639e-01, 2.58876130046744e-01, 2.58774965421530e-01, 2.58599095237592e-01, 2.58314992485957e-01,\n                                                2.57881877705636e-01, 2.57251980552653e-01, 2.56371199882999e-01, 2.55180190655103e-01, 2.53615892064907e-01,\n                                                2.51613491523571e-01, 2.49108793257967e-01, 2.46040929210380e-01, 2.42355315274445e-01, 2.38006720469990e-01,\n                                                2.32962284023351e-01, 2.27204289648995e-01, 2.20732491964363e-01, 2.13565790962818e-01, 2.05743070067591e-01,\n                                                1.97323053404190e-01, 1.88383098517960e-01, 1.79016919193209e-01, 1.69331323492813e-01, 1.59442145473285e-01,\n                                                1.49469633313174e-01, 1.39533618787560e-01, 1.29748821609581e-01, 1.20220630126703e-01, 1.11041647035741e-01,\n                                                1.02289202585013e-01, 9.40239318221217e-02, 8.62894036390642e-02, 7.91126937828110e-02, 7.25057236798534e-02,\n                                                6.64671478527907e-02, 6.09845646129656e-02, 5.60368423624880e-02, 5.15963891505606e-02, 4.76312373801306e-02,\n                                                4.41068610816728e-02, 4.09876843241364e-02, 3.82382727743149e-02, 3.58242248671630e-02, 3.37127947913558e-02,\n                                                3.18732877892671e-02, 3.02772708307728e-02, 2.88986402974558e-02, 2.77135844505096e-02, 2.67004733571667e-02,\n                                                2.58397034778000e-02, 2.51135188193885e-02, 2.45058257398298e-02, 2.40020142614128e-02, 2.35887951114933e-02,\n                                                2.32540585825802e-02, 2.29867585952306e-02, 2.27768229730714e-02, 2.26150888520706e-02, 2.24932603374910e-02,\n                                                2.24038840270424e-02, 2.23403368935351e-02, 2.22968203343541e-02, 2.22683539993014e-02, 2.22507633232141e-02,\n                                                2.22406554895542e-02, 2.22353797563670e-02, 2.22329695652093e-02, 2.22320654734673e-02, 2.22318195437126e-02,\n                                                2.22317832451822e-02, 2.22317795008564e-02, 2.22317000174783e-02, 2.22311615125719e-02, 2.22291820108182e-02,\n                                                2.22239061484970e-02, 2.22123639215042e-02, 2.21902739936795e-02, 2.21519057539084e-02, 2.20900166908464e-02,\n                                                2.19958839313676e-02, 2.18594500425340e-02, 2.16696022402658e-02, 2.14145996703579e-02, 2.10826542629547e-02,\n                                                2.06626561280103e-02, 2.01450148010522e-02, 1.95225644252446e-02, 1.87914572760661e-02, 1.79519504524848e-02,\n                                                1.70089804762128e-02, 1.59724250826940e-02, 1.48569739977518e-02, 1.36815709956792e-02, 1.24684437253535e-02,\n                                                1.12417971071821e-02, 1.00262991849220e-02, 8.84552369990388e-03, 7.72052295433667e-03, 6.66868498645101e-03,\n                                                5.70298446780981e-03, 4.83167627711367e-03, 4.05841653418548e-03, 3.38274009375539e-03, 2.80078575102749e-03,\n                                                2.30614616749847e-03, 1.89072884870711e-03, 1.54554160059917e-03, 1.26135043023368e-03, 1.02918882485170e-03,\n                                                8.40718071458468e-04, 6.88449262788993e-04, 5.65844361375412e-04, 4.67320767448598e-04, 3.88190471703354e-04,\n                                                3.24566191885367e-04, 2.73259795200431e-04, 2.31685579301200e-04, 1.97769654754154e-04, 1.69863019543470e-04,\n                                                1.46660313092184e-04, 1.27131284671123e-04, 1.10469579844619e-04, 9.60553363142935e-05, 8.34237867195498e-05,\n                                                7.22352996049835e-05, 6.22473301632454e-05, 5.32901776892913e-05, 4.52470596172816e-05, 3.80379051279078e-05,\n                                                3.16063370888742e-05, 2.59096533241632e-05, 2.09116022347189e-05, 1.65775260683176e-05, 1.28713253317869e-05,\n                                                9.75374967993048e-06, 7.18163923352222e-06, 5.10784186502633e-06, 3.48159845486862e-06, 2.24923710590019e-06,\n                                                1.35506278553521e-06, 7.42374155038306e-07, 3.55271367880050e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                3.55271367880050e-14}),\nmadness::CubicInterpolationTable<double>(grid, {5.90000000000000e+01, 5.89999997626763e+01, 5.89999924241561e+01, 5.89999427044735e+01, 5.89997599277372e+01,\n                                                5.89992726972919e+01, 5.89982063304469e+01, 5.89961638234723e+01, 5.89926109903254e+01, 5.89868662671408e+01,\n                                                5.89780955104521e+01, 5.89653119576200e+01, 5.89473813853949e+01, 5.89230324218722e+01, 5.88908719601313e+01,\n                                                5.88494056983604e+01, 5.87970639777961e+01, 5.87322332595081e+01, 5.86532936898403e+01, 5.85586631392433e+01,\n                                                5.84468477438314e+01, 5.83164982544234e+01, 5.81664704112885e+01, 5.79958862457777e+01, 5.78041919251802e+01,\n                                                5.75912068576391e+01, 5.73571586137657e+01, 5.71026990376887e+01, 5.68288987266264e+01, 5.65372195965445e+01,\n                                                5.62294680303034e+01, 5.59077335229588e+01, 5.55743192590458e+01, 5.52316713650845e+01, 5.48823126771915e+01,\n                                                5.45287850508367e+01, 5.41736020179489e+01, 5.38192115098175e+01, 5.34679668500988e+01, 5.31221035117351e+01,\n                                                5.27837192206981e+01, 5.24547556775456e+01, 5.21369811411000e+01, 5.18319740505514e+01, 5.15411085033717e+01,\n                                                5.12655426409962e+01, 5.10062108506483e+01, 5.07638203049990e+01, 5.05388519060717e+01, 5.03315653222446e+01,\n                                                5.01420075845662e+01, 4.99700246451567e+01, 4.98152753516530e+01, 4.96772473968636e+01, 4.95552749105720e+01,\n                                                4.94485574395959e+01, 4.93561801014799e+01, 4.92771346988630e+01, 4.92103415546359e+01, 4.91546717832750e+01,\n                                                4.91089696611456e+01, 4.90720747064066e+01, 4.90428430341101e+01, 4.90201675195773e+01, 4.90029962875126e+01,\n                                                4.89903490489331e+01, 4.89813308350509e+01, 4.89751427275979e+01, 4.89710892580245e+01, 4.89685822411973e+01,\n                                                4.89671409187506e+01, 4.89663884078858e+01, 4.89660445770234e+01, 4.89659155938028e+01, 4.89658805072023e+01,\n                                                4.89658753284922e+01, 4.89658746195999e+01, 4.89658578779627e+01, 4.89657444510746e+01, 4.89653274843429e+01,\n                                                4.89642160233854e+01, 4.89617837159830e+01, 4.89571259306686e+01, 4.89490271737376e+01, 4.89359405701114e+01,\n                                                4.89159810271909e+01, 4.88869334970576e+01, 4.88462774551012e+01, 4.87912282828434e+01, 4.87187956437232e+01,\n                                                4.86258581505379e+01, 4.85092526446047e+01, 4.83658752800731e+01, 4.81927904248649e+01, 4.79873423094893e+01,\n                                                4.77472635992932e+01, 4.74707748948327e+01, 4.71566697916181e+01, 4.68043815679570e+01, 4.64140294722968e+01,\n                                                4.59864442311543e+01, 4.55231730053224e+01, 4.50264632938438e+01, 4.44992238724864e+01, 4.39449601678822e+01,\n                                                4.33676828215452e+01, 4.27717918427247e+01, 4.21619435649230e+01, 4.15429116671881e+01, 4.09194550466648e+01,\n                                                4.02962036088825e+01, 3.96775686472313e+01, 3.90676789511376e+01, 3.84703389372173e+01, 3.78890023390422e+01,\n                                                3.73267548290389e+01, 3.67863009133799e+01, 3.62699533765825e+01, 3.57796261276885e+01, 3.53168325714509e+01,\n                                                3.48826913812887e+01, 3.44779402684271e+01, 3.41029568380464e+01, 3.37577845850176e+01, 3.34421617880097e+01,\n                                                3.31555513930489e+01, 3.28971706212165e+01, 3.26660196910630e+01, 3.24609095412572e+01, 3.22804887280269e+01,\n                                                3.21232697874601e+01, 3.19876553515488e+01, 3.18719642387114e+01, 3.17744576370257e+01, 3.16933653792645e+01,\n                                                3.16269121822097e+01, 3.15733435947347e+01, 3.15309512761680e+01, 3.14980971162822e+01, 3.14732356198344e+01,\n                                                3.14549339209481e+01, 3.14418887735596e+01, 3.14329398889585e+01, 3.14270790619746e+01, 3.14234546415168e+01,\n                                                3.14213710528614e+01, 3.14202832588422e+01, 3.14197862429427e+01, 3.14195997961185e+01, 3.14195490781559e+01,\n                                                3.14195415922943e+01, 3.14195408816797e+01, 3.14195263939363e+01, 3.14194282375132e+01, 3.14190674066611e+01,\n                                                3.14181055836209e+01, 3.14160007565302e+01, 3.14119701405711e+01, 3.14049620535852e+01, 3.13936383101879e+01,\n                                                3.13763685872621e+01, 3.13512380534129e+01, 3.13160693132605e+01, 3.12684593598897e+01, 3.12058317255261e+01,\n                                                3.11255033547411e+01, 3.10247649012568e+01, 3.09009722037904e+01, 3.07516456982043e+01, 3.05745735759247e+01,\n                                                3.03679137285976e+01, 3.01302890540125e+01, 2.98608706355731e+01, 2.95594436791544e+01, 2.92264518428002e+01,\n                                                2.88630165980717e+01, 2.84709293726857e+01, 2.80526153710174e+01, 2.76110692214312e+01, 2.71497641473887e+01,\n                                                2.66725383770906e+01, 2.61834649534797e+01, 2.56867135925037e+01, 2.51864150692284e+01, 2.46865390386743e+01,\n                                                2.41907947523885e+01, 2.37025608816843e+01, 2.32248462503048e+01, 2.27602787372954e+01, 2.23111159936023e+01,\n                                                2.18792696780734e+01, 2.14663349075205e+01, 2.10736182558788e+01, 2.07021602764948e+01, 2.03527513598886e+01,\n                                                2.00259420650438e+01, 1.97220504255818e+01, 1.94411690251773e+01, 1.91831740659335e+01, 1.89477376213248e+01,\n                                                1.87343432039984e+01, 1.85423040047045e+01, 1.83707828006730e+01, 1.82188125470018e+01, 1.80853169124159e+01,\n                                                1.79691303452924e+01, 1.78690175411481e+01, 1.77836923702573e+01, 1.77118364030997e+01, 1.76521171597591e+01,\n                                                1.76032061356657e+01, 1.75637965482771e+01, 1.75326206304297e+01, 1.75084661834364e+01, 1.74901920090879e+01,\n                                                1.74767417735216e+01, 1.74671558235890e+01, 1.74605804814381e+01, 1.74562743862852e+01, 1.74536115316690e+01,\n                                                1.74520807567596e+01, 1.74512815839089e+01, 1.74509164419927e+01, 1.74507794657474e+01, 1.74507422049908e+01,\n                                                1.74507367053849e+01, 1.74507362159592e+01, 1.74507265815575e+01, 1.74506613071879e+01, 1.74504213534898e+01,\n                                                1.74497817387739e+01, 1.74483820273516e+01, 1.74457016797297e+01, 1.74410413686828e+01, 1.74335113106068e+01,\n                                                1.74220275911770e+01, 1.74053173606288e+01, 1.73819336143551e+01, 1.73502800344321e+01, 1.73086460249738e+01,\n                                                1.72552516140962e+01, 1.71883013158550e+01, 1.71060453630895e+01, 1.70068459757970e+01, 1.68892455853725e+01,\n                                                1.67520332883960e+01, 1.65943053809272e+01, 1.64155157769527e+01, 1.62155125972715e+01, 1.59945583325123e+01,\n                                                1.57533327017165e+01, 1.54929193738148e+01, 1.52147795543786e+01, 1.49207163985641e+01, 1.46128338301334e+01,\n                                                1.42934917243534e+01, 1.39652573099497e+01, 1.36308511543522e+01, 1.32930860424631e+01, 1.29547985414106e+01,\n                                                1.26187754199930e+01, 1.22876793643671e+01, 1.19639797418501e+01, 1.16498941128770e+01, 1.13473448880083e+01,\n                                                1.10579334397396e+01, 1.07829316997076e+01, 1.05232893144660e+01, 1.02796531146956e+01, 1.00523950687432e+01,\n                                                9.84164495747756e+00, 9.64732453514743e+00, 9.46918071321170e+00, 9.30681613102540e+00, 9.15971622496499e+00,\n                                                9.02727250371318e+00, 8.90880216108344e+00, 8.80356442247377e+00, 8.71077415769247e+00, 8.62961333655001e+00,\n                                                8.55924088541396e+00, 8.49880144667992e+00, 8.44743346498637e+00, 8.40427693398667e+00, 8.36848104143210e+00,\n                                                8.33921185188184e+00, 8.31566006852269e+00, 8.29704882162861e+00, 8.28264134506104e+00, 8.27174832848569e+00,\n                                                8.26373467644023e+00, 8.25802537041115e+00, 8.25411011995079e+00, 8.25154650514247e+00, 8.24996135480482e+00,\n                                                8.24905016979984e+00, 8.24857448363604e+00, 8.24835714658177e+00, 8.24827561722463e+00, 8.24825343938308e+00,\n                                                8.24825016598449e+00, 8.24824987659926e+00, 8.24824420163628e+00, 8.24820575303966e+00, 8.24806441361741e+00,\n                                                8.24768766756204e+00, 8.24686323375009e+00, 8.24528459614695e+00, 8.24254011974812e+00, 8.23810642986708e+00,\n                                                8.23134671353936e+00, 8.22151455896216e+00, 8.20776386257472e+00, 8.18916518240145e+00, 8.16472868175823e+00,\n                                                8.13343347768083e+00, 8.09426278431075e+00, 8.04624374127071e+00, 7.98849027984499e+00, 7.92024686553133e+00,\n                                                7.84093054072396e+00, 7.75016845887424e+00, 7.64782812550557e+00, 7.53403788812994e+00, 7.40919584634451e+00,\n                                                7.27396622691612e+00, 7.12926327148494e+00, 6.97622366464765e+00, 6.81616933638470e+00, 6.65056300142147e+00,\n                                                6.48095903129170e+00, 6.30895226837572e+00, 6.13612731700512e+00, 5.96401079604463e+00, 5.79402901861253e+00,\n                                                5.62747345143648e+00, 5.46547589784289e+00, 5.30899450802514e+00, 5.15881051001390e+00, 5.01553425873144e+00,\n                                                4.87961819968597e+00, 4.75137391897783e+00, 4.63099064829330e+00, 4.51855323295067e+00, 4.41405837057795e+00,\n                                                4.31742864165334e+00, 4.22852434875930e+00, 4.14715344180230e+00, 4.07307988569433e+00, 4.00603080082855e+00,\n                                                3.94570263966453e+00, 3.89176659561510e+00, 3.84387339139768e+00, 3.80165756583962e+00, 3.76474136564882e+00,\n                                                3.73273834428741e+00, 3.70525676692561e+00, 3.68190291359880e+00, 3.66228435943365e+00, 3.64601329032377e+00,\n                                                3.63270988536623e+00, 3.62200576540656e+00, 3.61354747260561e+00, 3.60699991189901e+00, 3.60204965462022e+00,\n                                                3.59840798035317e+00, 3.59581351783409e+00, 3.59403434132408e+00, 3.59286938628541e+00, 3.59214906729056e+00,\n                                                3.59173501062513e+00, 3.59151885174976e+00, 3.59142009063173e+00, 3.59138304251843e+00, 3.59137296458916e+00,\n                                                3.59137147710994e+00, 3.59137134357621e+00, 3.59136870192820e+00, 3.59135080442957e+00, 3.59128501215744e+00,\n                                                3.59110964046139e+00, 3.59072587599232e+00, 3.58999104448413e+00, 3.58871355223562e+00, 3.58664982069855e+00,\n                                                3.58350352616971e+00, 3.57892743781378e+00, 3.57252810755329e+00, 3.56387359447285e+00, 3.55250429521803e+00,\n                                                3.53794679494673e+00, 3.51973045144171e+00, 3.49740618724634e+00, 3.47056671017283e+00, 3.43886713961705e+00,\n                                                3.40204481969836e+00, 3.35993698660496e+00, 3.31249495756201e+00, 3.25979364120888e+00, 3.20203543531198e+00,\n                                                3.13954796021786e+00, 3.07277554108001e+00, 3.00226485256647e+00, 2.92864562417601e+00, 2.85260771919626e+00,\n                                                2.77487619617391e+00, 2.69618609804689e+00, 2.61725866640673e+00, 2.53878044624418e+00, 2.46138635888808e+00,\n                                                2.38564733505809e+00, 2.31206259242701e+00, 2.24105619188282e+00, 2.17297717721200e+00, 2.10810242806048e+00,\n                                                2.04664133505329e+00, 1.98874150832120e+00, 1.93449490793598e+00, 1.88394398496505e+00, 1.83708760207276e+00,\n                                                1.79388663631153e+00, 1.75426924557247e+00, 1.71813581064821e+00, 1.68536356251291e+00, 1.65581088720378e+00,\n                                                1.62932128375267e+00, 1.60572694339044e+00, 1.58485192386522e+00, 1.56651490929060e+00, 1.55053156869517e+00,\n                                                1.53671654984413e+00, 1.52488516422739e+00, 1.51485483124257e+00, 1.50644635319611e+00, 1.49948508794149e+00,\n                                                1.49380207396681e+00, 1.48923514537520e+00, 1.48563005361256e+00, 1.48284159121283e+00, 1.48073469239061e+00,\n                                                1.47918546794129e+00, 1.47808211920481e+00, 1.47732566895299e+00, 1.47683044656227e+00, 1.47652427071311e+00,\n                                                1.47634828447319e+00, 1.47625641379511e+00, 1.47621443960664e+00, 1.47619869400881e+00, 1.47619441085929e+00,\n                                                1.47619377867666e+00, 1.47619372040072e+00, 1.47619255057644e+00, 1.47618462488020e+00, 1.47615548971040e+00,\n                                                1.47607783010042e+00, 1.47590789452275e+00, 1.47558252641245e+00, 1.47501695524078e+00, 1.47410350402725e+00,\n                                                1.47271137292108e+00, 1.47068765548310e+00, 1.46785972995580e+00, 1.46403913610842e+00, 1.45902699378298e+00,\n                                                1.45262093850576e+00, 1.44462344210303e+00, 1.43485125609492e+00, 1.42314557159494e+00, 1.40938234511692e+00,\n                                                1.39348211231086e+00, 1.37541852009758e+00, 1.35522477023231e+00, 1.33299719989460e+00, 1.30889534026760e+00,\n                                                1.28313800201371e+00, 1.25599524300518e+00, 1.22777647600225e+00, 1.19881545024556e+00, 1.16945333524284e+00,\n                                                1.14002154867333e+00, 1.11082617390713e+00, 1.08213568912067e+00, 1.05417323836705e+00, 1.02711389874176e+00,\n                                                1.00108653721802e+00, 9.76179147725674e-01, 9.52446192784606e-01, 9.29916490018776e-01, 9.08600495593575e-01,\n                                                8.88496287109440e-01, 8.69593986571260e-01, 8.51878693746478e-01, 8.35332190792705e-01, 8.19933747495035e-01,\n                                                8.05660341699124e-01, 7.92486551712834e-01, 7.80384307134014e-01, 7.69322620088275e-01, 7.59267368336587e-01,\n                                                7.50181166494329e-01, 7.42023339515107e-01, 7.34750000200044e-01, 7.28314226435110e-01, 7.22666331434020e-01,\n                                                7.17754219562529e-01, 7.13523820127591e-01, 7.09919591134778e-01, 7.06885084115306e-01, 7.04363559606186e-01,\n                                                7.02298640800542e-01, 7.00634990446552e-01, 6.99318993510978e-01, 6.98299425731136e-01, 6.97528086269116e-01,\n                                                6.96960371556017e-01, 6.96555767337088e-01, 6.96278237090304e-01, 6.96096487482826e-01, 6.95984095324540e-01,\n                                                6.95919485416574e-01, 6.95885754504246e-01, 6.95870342864531e-01, 6.95864561473769e-01, 6.95862988799767e-01,\n                                                6.95862756676547e-01, 6.95862734555440e-01, 6.95862282650474e-01, 6.95859220934565e-01, 6.95847965844763e-01,\n                                                6.95817964688807e-01, 6.95752311856033e-01, 6.95626594008488e-01, 6.95408017091729e-01, 6.95054866002607e-01,\n                                                6.94516344951531e-01, 6.93732841906531e-01, 6.92636652644659e-01, 6.91153187388551e-01, 6.89202664502957e-01,\n                                                6.86702270600676e-01, 6.83568735055630e-01, 6.79721231189220e-01, 6.75084479763058e-01, 6.69591897791882e-01,\n                                                6.63188612764955e-01, 6.55834154464181e-01, 6.47504647356421e-01, 6.38194356878422e-01, 6.27916490327280e-01,\n                                                6.16703211953634e-01, 6.04604894622440e-01, 5.91688688861346e-01, 5.78036536873228e-01, 5.63742788646259e-01,\n                                                5.48911586759850e-01, 5.33654176011588e-01, 5.18086266948210e-01, 5.02325545030175e-01, 4.86489377570898e-01,\n                                                4.70692736853557e-01, 4.55046335940736e-01, 4.39654965956997e-01, 4.24616028188900e-01, 4.10018266127572e-01,\n                                                3.95940715173204e-01, 3.82451895515160e-01, 3.69609273439025e-01, 3.57459007635029e-01, 3.46035982108496e-01,\n                                                3.35364109555535e-01, 3.25456872307569e-01, 3.16318055149573e-01, 3.07942617186114e-01, 3.00317648824389e-01,\n                                                2.93423364136011e-01, 2.87234086942945e-01, 2.81719199288318e-01, 2.76844031909867e-01, 2.72570686621243e-01,\n                                                2.68858789185103e-01, 2.65666177766278e-01, 2.62949536153130e-01, 2.60664982667286e-01, 2.58768625281036e-01,\n                                                2.57217091306288e-01, 2.55968036573911e-01, 2.54980634807787e-01, 2.54216043446462e-01, 2.53637837990063e-01,\n                                                2.53212403510311e-01, 2.52909269626720e-01, 2.52701374275503e-01, 2.52565242092651e-01, 2.52481065169682e-01,\n                                                2.52432677145521e-01, 2.52407415787680e-01, 2.52395874018930e-01, 2.52391544360329e-01, 2.52390366593623e-01,\n                                                2.52390192757915e-01, 2.52390175552073e-01, 2.52389817348913e-01, 2.52387390477878e-01, 2.52378469163631e-01,\n                                                2.52354689140127e-01, 2.52302651833283e-01, 2.52203012148676e-01, 2.52029794177609e-01, 2.51749978986822e-01,\n                                                2.51323408080822e-01, 2.50703044127661e-01, 2.49835625876315e-01, 2.48662745543726e-01, 2.47122363136853e-01,\n                                                2.45150752425992e-01, 2.42684847479048e-01, 2.39664927552077e-01, 2.36037543459922e-01, 2.31758553081633e-01,\n                                                2.26796101025307e-01, 2.21133351910950e-01, 2.14770772641309e-01, 2.07727760532862e-01, 2.00043434554864e-01,\n                                                1.91776448035391e-01, 1.83003742854986e-01, 1.73818244462701e-01, 1.64325587879866e-01, 1.54640057728798e-01,\n                                                1.44880008135495e-01, 1.35163088135251e-01, 1.25601623787901e-01, 1.16298493136831e-01, 1.07343774903534e-01,\n                                                9.88123643412706e-02, 9.07626439049949e-02, 8.32361890685931e-02, 7.62583964878942e-02, 6.98398542679755e-02,\n                                                6.39782377782936e-02, 5.86605085743983e-02, 5.38652130630481e-02, 4.95647134826527e-02, 4.57272279476086e-02,\n                                                4.23186012447658e-02, 3.93037683395505e-02, 3.66479049968405e-02, 3.43172834222543e-02, 3.22798657687855e-02,\n                                                3.05056760397875e-02, 2.89669930592851e-02, 2.76384054967664e-02, 2.64967659284849e-02, 2.55210757694257e-02,\n                                                2.46923274577640e-02, 2.39933250472149e-02, 2.34084996442050e-02, 2.29237320134885e-02, 2.25261911499857e-02,\n                                                2.22041945952043e-02, 2.19470936673289e-02, 2.17451844930139e-02, 2.15896437261804e-02, 2.14724861080882e-02,\n                                                2.13865395907149e-02, 2.13254326705012e-02, 2.12835879227740e-02, 2.12562155430831e-02, 2.12393010079381e-02,\n                                                2.12295817404211e-02, 2.12245088309331e-02, 2.12221913017885e-02, 2.12213219691932e-02, 2.12210854946235e-02,\n                                                2.12210505916417e-02, 2.12210469912719e-02, 2.12209705637321e-02, 2.12204527622930e-02, 2.12185493657060e-02,\n                                                2.12134763488692e-02, 2.12023779278923e-02, 2.11811374959225e-02, 2.11442451423807e-02, 2.10847377639922e-02,\n                                                2.09942299912385e-02, 2.08630553743632e-02, 2.06805363440523e-02, 2.04353971132036e-02, 2.01163247782006e-02,\n                                                1.97126697591017e-02, 1.92152576257456e-02, 1.86172618248719e-02, 1.79150638895322e-02, 1.71090088251304e-02,\n                                                1.62039537859755e-02, 1.52095128541063e-02, 1.41399229042776e-02, 1.30134951208021e-02, 1.18516694301931e-02,\n                                                1.06777465290619e-02, 9.51542329166699e-03, 8.38729112282977e-03, 7.31346531199506e-03, 6.31049405359363e-03,\n                                                5.39065207217959e-03, 4.56166442531014e-03, 3.82684276033274e-03, 3.18556135910342e-03, 2.63396419030215e-03,\n                                                2.16578305772686e-03, 1.77316017688867e-03, 1.44739790113846e-03, 1.17959084207087e-03, 9.61120162571660e-04,\n                                                7.84003636972841e-04, 6.41104314553331e-04, 5.26212926722280e-04, 4.34034615544476e-04, 3.60120372498329e-04,\n                                                3.00779118248329e-04, 2.52989367012901e-04, 2.14312166349373e-04, 1.82801168627122e-04, 1.56911631847834e-04,\n                                                1.35417865394061e-04, 1.17348684923968e-04, 1.01942593502713e-04, 8.86160266659886e-05, 7.69356947785127e-05,\n                                                6.65899777629875e-05, 5.73598045789936e-05, 4.90922811948735e-05, 4.16797698790106e-05, 3.50449650099449e-05,\n                                                2.91307517485961e-05, 2.38931042630952e-05, 1.92957013922523e-05, 1.53056405522989e-05, 1.18901277090799e-05,\n                                                9.01418619747574e-06, 6.63936758371619e-06, 4.72332701662026e-06, 3.22004710540114e-06, 2.08048675176542e-06,\n                                                1.25347604296167e-06, 6.86742012590003e-07, 2.13162820728030e-14, 2.84217094304040e-14, 2.13162820728030e-14,\n                                                2.13162820728030e-14}),\nmadness::CubicInterpolationTable<double>(grid, {6.00000000000000e+01, 5.99999997568110e+01, 5.99999922369241e+01, 5.99999412884519e+01, 5.99997539944988e+01,\n                                                5.99992547223778e+01, 5.99981620004198e+01, 5.99960690118335e+01, 5.99924283644768e+01, 5.99865416400212e+01,\n                                                5.99775540578240e+01, 5.99644544257622e+01, 5.99460804156062e+01, 5.99211291201506e+01, 5.98881728458810e+01,\n                                                5.98456801783051e+01, 5.97920425125232e+01, 5.97256064193328e+01, 5.96447123282088e+01, 5.95477399340233e+01,\n                                                5.94331603526539e+01, 5.92995942808991e+01, 5.91458742696402e+01, 5.89711078390188e+01, 5.87747368313373e+01,\n                                                5.85565874849441e+01, 5.83169055901033e+01, 5.80563719962896e+01, 5.77760956800886e+01, 5.74775842665690e+01,\n                                                5.71626947950686e+01, 5.68335699973810e+01, 5.64925668556990e+01, 5.61421844191787e+01, 5.57849968072674e+01,\n                                                5.54235953568821e+01, 5.50605415207467e+01, 5.46983299702891e+01, 5.43393598481721e+01, 5.39859114760019e+01,\n                                                5.36401260240259e+01, 5.33039864582781e+01, 5.29792991501115e+01, 5.26676765126918e+01, 5.23705216606728e+01,\n                                                5.20890162668827e+01, 5.18241125657059e+01, 5.15765299906163e+01, 5.13467564294493e+01, 5.11350536896803e+01,\n                                                5.09414665583326e+01, 5.07658348075596e+01, 5.06078075789815e+01, 5.04668597079854e+01, 5.03423096691239e+01,\n                                                5.02333389058449e+01, 5.01390123440748e+01, 5.00582998852259e+01, 4.99900986413099e+01, 4.99332556249880e+01,\n                                                4.98865905509381e+01, 4.98489183501229e+01, 4.98190709518872e+01, 4.97959178554799e+01, 4.97783849968009e+01,\n                                                4.97654714211458e+01, 4.97562633006326e+01, 4.97499448866453e+01, 4.97458060623048e+01, 4.97432462552712e+01,\n                                                4.97417745831236e+01, 4.97410062268130e+01, 4.97406551559974e+01, 4.97405234568143e+01, 4.97404876314056e+01,\n                                                4.97404823436489e+01, 4.97404816198297e+01, 4.97404645256687e+01, 4.97403487103847e+01, 4.97399229637172e+01,\n                                                4.97387880991391e+01, 4.97363045758413e+01, 4.97315487149786e+01, 4.97232794320176e+01, 4.97099172883990e+01,\n                                                4.96895375163869e+01, 4.96598784625796e+01, 4.96183665910239e+01, 4.95621587455701e+01, 4.94882017565049e+01,\n                                                4.93933086662879e+01, 4.92742498475771e+01, 4.91278561384267e+01, 4.89511299243850e+01, 4.87413590211291e+01,\n                                                4.84962274832722e+01, 4.82139173402949e+01, 4.78931959257184e+01, 4.75334848863027e+01, 4.71349087416327e+01,\n                                                4.66983222944717e+01, 4.62253165703020e+01, 4.57182021610901e+01, 4.51799676475869e+01, 4.46142105793635e+01,\n                                                4.40250404352814e+01, 4.34169570662232e+01, 4.27947130209589e+01, 4.21631718892316e+01, 4.15271757217138e+01,\n                                                4.08914321875924e+01, 4.02604272045745e+01, 3.96383630335935e+01, 3.90291171606844e+01, 3.84362150293494e+01,\n                                                3.78628101742422e+01, 3.73116678395863e+01, 3.67851513699211e+01, 3.62852131090009e+01, 3.58133923654169e+01,\n                                                3.53708222038909e+01, 3.49582451285427e+01, 3.45760360948804e+01, 3.42242303857754e+01, 3.39025538572705e+01,\n                                                3.36104536386999e+01, 3.33471281617010e+01, 3.31115560885885e+01, 3.29025241759163e+01, 3.27186543425292e+01,\n                                                3.25584302751401e+01, 3.24202238677262e+01, 3.23023217040869e+01, 3.22029516836069e+01, 3.21203097709279e+01,\n                                                3.20525867258730e+01, 3.19979945443662e+01, 3.19547922196040e+01, 3.19213103230939e+01, 3.18959738166170e+01,\n                                                3.18773224482150e+01, 3.18640280661631e+01, 3.18549082102001e+01, 3.18489354110867e+01, 3.18452417457937e+01,\n                                                3.18431183501382e+01, 3.18420097738301e+01, 3.18415032624574e+01, 3.18413132535737e+01, 3.18412615666465e+01,\n                                                3.18412539377678e+01, 3.18412532135769e+01, 3.18412384490458e+01, 3.18411384173484e+01, 3.18407706928401e+01,\n                                                3.18397904942300e+01, 3.18376454546152e+01, 3.18335378343783e+01, 3.18263958598297e+01, 3.18148557817003e+01,\n                                                3.17972561344225e+01, 3.17716455139620e+01, 3.17358049459433e+01, 3.16872855519548e+01, 3.16234617099949e+01,\n                                                3.15415992281003e+01, 3.14389372136802e+01, 3.13127813607598e+01, 3.11606053638489e+01, 3.09801562040659e+01,\n                                                3.07695582654592e+01, 3.05274107512258e+01, 3.02528727727765e+01, 2.99457308084949e+01, 2.96064439251371e+01,\n                                                2.92361631162573e+01, 2.88367222328515e+01, 2.84105992338739e+01, 2.79608479620363e+01, 2.74910025207088e+01,\n                                                2.70049586836218e+01, 2.65068394486422e+01, 2.60008543454691e+01, 2.54911636765713e+01, 2.49817587983924e+01,\n                                                2.44763674913906e+01, 2.39783896625545e+01, 2.34908638780199e+01, 2.30164606566669e+01, 2.25574951330914e+01,\n                                                2.21159502963903e+01, 2.16935026421356e+01, 2.12915443096021e+01, 2.09111988247412e+01, 2.05533305396956e+01,\n                                                2.02185500138557e+01, 1.99072185233393e+01, 1.96194546340088e+01, 1.93551446978495e+01, 1.91139577763795e+01,\n                                                1.88953643530902e+01, 1.86986575547125e+01, 1.85229754906985e+01, 1.83673235914733e+01, 1.82305962642300e+01,\n                                                1.81115976093698e+01, 1.80090612478845e+01, 1.79216694709526e+01, 1.78480719559876e+01, 1.77869042358238e+01,\n                                                1.77368059976681e+01, 1.76964391562257e+01, 1.76645055124680e+01, 1.76397636902514e+01, 1.76210449472581e+01,\n                                                1.76072673914503e+01, 1.75974481042617e+01, 1.75907126798939e+01, 1.75863017367588e+01, 1.75835740400048e+01,\n                                                1.75820059880552e+01, 1.75811873534462e+01, 1.75808133193410e+01, 1.75806730073366e+01, 1.75806348391733e+01,\n                                                1.75806292056361e+01, 1.75806287042915e+01, 1.75806188352643e+01, 1.75805519712737e+01, 1.75803061739843e+01,\n                                                1.75796509825811e+01, 1.75782171828798e+01, 1.75754715556424e+01, 1.75706977337485e+01, 1.75629842411321e+01,\n                                                1.75512207132397e+01, 1.75341031911537e+01, 1.75101492161223e+01, 1.74777232027280e+01, 1.74350722144601e+01,\n                                                1.73803717901662e+01, 1.73117808729708e+01, 1.72275041942538e+01, 1.71258597095153e+01, 1.70053479459913e+01,\n                                                1.68647195112371e+01, 1.67030366633202e+01, 1.65197249053706e+01, 1.63146111655676e+01, 1.60879462979327e+01,\n                                                1.58404112641493e+01, 1.55731080889721e+01, 1.52875380062976e+01, 1.49855696358739e+01, 1.46693993700935e+01,\n                                                1.43415047434689e+01, 1.40045901850719e+01, 1.36615240581597e+01, 1.33152667066169e+01, 1.29687911410481e+01,\n                                                1.26250002720908e+01, 1.22866463555630e+01, 1.19562589192601e+01, 1.16360867140207e+01, 1.13280574304327e+01,\n                                                1.10337565751133e+01, 1.07544245874964e+01, 1.04909694566849e+01, 1.02439910109691e+01, 1.00138127244294e+01,\n                                                9.80051717812909e+00, 9.60398200907095e+00, 9.42391405266688e+00, 9.25988025116411e+00, 9.11133464322999e+00,\n                                                8.97764131437992e+00, 8.85809356896428e+00, 8.75192980682554e+00, 8.65834668888773e+00, 8.57651019341280e+00,\n                                                8.50556512941223e+00, 8.44464360786669e+00, 8.39287288898720e+00, 8.34938293268545e+00, 8.31331388394049e+00,\n                                                8.28382362741706e+00, 8.26009544885884e+00, 8.24134574743410e+00, 8.22683165725487e+00, 8.21585836238599e+00,\n                                                8.20778583274333e+00, 8.20203467289944e+00, 8.19809076540016e+00, 8.19550840641930e+00, 8.19391167390243e+00,\n                                                8.19299383387396e+00, 8.19251467422621e+00, 8.19229575034540e+00, 8.19221362575319e+00, 8.19219128599689e+00,\n                                                8.19218798870013e+00, 8.19218769720219e+00, 8.19218198080798e+00, 8.19214325151155e+00, 8.19200088024959e+00,\n                                                8.19162138401550e+00, 8.19079093316397e+00, 8.18920077856639e+00, 8.18643629389531e+00, 8.18197031863930e+00,\n                                                8.17516146931053e+00, 8.16525804394555e+00, 8.15140805828195e+00, 8.13267579920855e+00, 8.10806504294055e+00,\n                                                8.07654874999141e+00, 8.03710461745005e+00, 7.98875536037099e+00, 7.93061204859109e+00, 7.86191830460261e+00,\n                                                7.78209275019365e+00, 7.69076685805601e+00, 7.58781539271186e+00, 7.47337695660394e+00, 7.34786278831383e+00,\n                                                7.21195282943762e+00, 7.06657907026160e+00, 6.91289715695594e+00, 6.75224805719350e+00, 6.58611215047318e+00,\n                                                6.41605842735409e+00, 6.24369161623591e+00, 6.07060010214605e+00, 5.89830750734060e+00, 5.72823071292287e+00,\n                                                5.56164676542267e+00, 5.39967038570191e+00, 5.24324266810387e+00, 5.09313022310273e+00, 4.94993282535238e+00,\n                                                4.81409691212701e+00, 4.68593218266189e+00, 4.56562898827568e+00, 4.45327492937927e+00, 4.34886982055717e+00,\n                                                4.25233876628128e+00, 4.16354344317450e+00, 4.08229183682234e+00, 4.00834670056568e+00, 3.94143296022420e+00,\n                                                3.88124423216700e+00, 3.82744857862028e+00, 3.77969360112257e+00, 3.73761096738119e+00, 3.70082047097119e+00,\n                                                3.66893372971705e+00, 3.64155763136201e+00, 3.61829763072025e+00, 3.59876098946229e+00, 3.58256002815772e+00,\n                                                3.56931543150418e+00, 3.55865961391289e+00, 3.55024011644725e+00, 3.54372297049498e+00, 3.53879593158224e+00,\n                                                3.53517146136980e+00, 3.53258931966629e+00, 3.53081862313059e+00, 3.52965923416721e+00, 3.52894236220774e+00,\n                                                3.52853028885031e+00, 3.52831516590606e+00, 3.52821687821982e+00, 3.52818000772435e+00, 3.52816997811306e+00,\n                                                3.52816849776556e+00, 3.52816836487201e+00, 3.52816573588940e+00, 3.52814792420177e+00, 3.52808244739794e+00,\n                                                3.52790791676260e+00, 3.52752599363479e+00, 3.52679469119944e+00, 3.52552334443757e+00, 3.52346956819267e+00,\n                                                3.52033851674125e+00, 3.51578474026570e+00, 3.50941689450249e+00, 3.50080548913196e+00, 3.48949374892056e+00,\n                                                3.47501150358129e+00, 3.45689181835753e+00, 3.43468983659756e+00, 3.40800304711107e+00, 3.37649194145390e+00,\n                                                3.33989982491521e+00, 3.29807042717068e+00, 3.25096195676164e+00, 3.19865637836858e+00, 3.14136296657503e+00,\n                                                3.07941558799720e+00, 3.01326365018492e+00, 2.94345718096509e+00, 2.87062700764639e+00, 2.79546143139058e+00,\n                                                2.71868108266693e+00, 2.64101375646565e+00, 2.56317093970597e+00, 2.48582746583010e+00, 2.40960530279640e+00,\n                                                2.33506196811705e+00, 2.26268355078064e+00, 2.19288188431803e+00, 2.12599511632707e+00, 2.06229078294411e+00,\n                                                2.00197051228256e+00, 1.94517561094654e+00, 1.89199297989272e+00, 1.84246100772431e+00, 1.79657526038763e+00,\n                                                1.75429390381436e+00, 1.71554285651834e+00, 1.68022068307974e+00, 1.64820322507006e+00, 1.61934794239019e+00,\n                                                1.59349792006287e+00, 1.57048549132551e+00, 1.55013543875078e+00, 1.53226775748112e+00, 1.51669999245333e+00,\n                                                1.50324918849951e+00, 1.49173351358036e+00, 1.48197362825816e+00, 1.47379387791131e+00, 1.46702337870164e+00,\n                                                1.46149705546969e+00, 1.45705667161759e+00, 1.45355186988625e+00, 1.45084122098403e+00, 1.44879325636988e+00,\n                                                1.44728744399991e+00, 1.44621505303870e+00, 1.44547984650616e+00, 1.44499854013934e+00, 1.44470097136011e+00,\n                                                1.44452993352369e+00, 1.44444064641410e+00, 1.44439985269216e+00, 1.44438454993013e+00, 1.44438038724288e+00,\n                                                1.44437977284024e+00, 1.44437971620329e+00, 1.44437857928009e+00, 1.44437087649337e+00, 1.44434256076244e+00,\n                                                1.44426708547527e+00, 1.44410193023231e+00, 1.44378571702554e+00, 1.44323606627560e+00, 1.44234834659462e+00,\n                                                1.44099547532162e+00, 1.43902892436023e+00, 1.43628107202770e+00, 1.43256901045967e+00, 1.42769986416223e+00,\n                                                1.42147759495290e+00, 1.41371116132085e+00, 1.40422376998782e+00, 1.39286281293440e+00, 1.37950993801258e+00,\n                                                1.36409057299444e+00, 1.34658213110904e+00, 1.32702009038820e+00, 1.30550117729408e+00, 1.28218301206453e+00,\n                                                1.25727980007890e+00, 1.23105398494744e+00, 1.20380420639705e+00, 1.17585039592848e+00, 1.14751732497515e+00,\n                                                1.11911828397619e+00, 1.09094068904852e+00, 1.06323519070512e+00, 1.03620929278608e+00, 1.01002569877136e+00,\n                                                9.84804800002948e-01, 9.60630127832090e-01, 9.37555345581828e-01, 9.15611459751368e-01, 8.94813274932162e-01,\n                                                8.75164550447181e-01, 8.56661707814148e-01, 8.39296213696315e-01, 8.23055908491703e-01, 8.07925589961258e-01,\n                                                7.93887132795511e-01, 7.80919364870662e-01, 7.68997854952147e-01, 7.58094709226768e-01, 7.48178430864463e-01,\n                                                7.39213867873630e-01, 7.31162257186348e-01, 7.23981363800988e-01, 7.17625709824944e-01, 7.12046887020335e-01,\n                                                7.07193946342365e-01, 7.03013857985027e-01, 6.99452035078117e-01, 6.96452913185666e-01, 6.93960576111657e-01,\n                                                6.91919416328339e-01, 6.90274815798915e-01, 6.88973830324755e-01, 6.87965858098764e-01, 6.87203271197298e-01,\n                                                6.86641987590733e-01, 6.86241961148717e-01, 6.85967568249261e-01, 6.85787872052032e-01, 6.85676749234680e-01,\n                                                6.85612868860147e-01, 6.85579518768670e-01, 6.85564281115170e-01, 6.85558564990366e-01, 6.85557010070077e-01,\n                                                6.85556780567254e-01, 6.85556758695860e-01, 6.85556311892370e-01, 6.85553284739534e-01, 6.85542156703754e-01,\n                                                6.85512494200928e-01, 6.85447582368880e-01, 6.85323283115764e-01, 6.85107171550811e-01, 6.84758000850614e-01,\n                                                6.84225542773106e-01, 6.83450846388531e-01, 6.82366949834623e-01, 6.80900067601087e-01, 6.78971257776773e-01,\n                                                6.76498549200922e-01, 6.73399477914970e-01, 6.69593947464037e-01, 6.65007291770813e-01, 6.59573387211893e-01,\n                                                6.53237637653248e-01, 6.45959647757444e-01, 6.37715409550246e-01, 6.28498856076703e-01, 6.18322681820118e-01,\n                                                6.07218387183927e-01, 5.95235566387984e-01, 5.82440516437416e-01, 5.68914291814615e-01, 5.54750359427331e-01,\n                                                5.40052018000189e-01, 5.24929735652243e-01, 5.09498532426761e-01, 4.93875497593557e-01, 4.78177492917936e-01,\n                                                4.62519060850013e-01, 4.47010536440580e-01, 4.31756355579445e-01, 4.16853557589583e-01, 4.02390491963310e-01,\n                                                3.88445750707803e-01, 3.75087354028693e-01, 3.62372215048936e-01, 3.50345898974474e-01, 3.39042675975165e-01,\n                                                3.28485848714521e-01, 3.18688318654708e-01, 3.09653342845316e-01, 3.01375426409145e-01, 2.93841295558799e-01,\n                                                2.87030900850951e-01, 2.80918409026469e-01, 2.75473152495323e-01, 2.70660516721442e-01, 2.66442756155541e-01,\n                                                2.62779738050362e-01, 2.59629619943652e-01, 2.56949470610408e-01, 2.54695845926861e-01, 2.52825330605489e-01,\n                                                2.51295054536762e-01, 2.50063188977158e-01, 2.49089423571654e-01, 2.48335420719499e-01, 2.47765239594330e-01,\n                                                2.47345718665947e-01, 2.47046803210118e-01, 2.46841803282095e-01, 2.46707568087039e-01, 2.46624564569821e-01,\n                                                2.46576851204473e-01, 2.46551942098769e-01, 2.46540561281378e-01, 2.46536292001899e-01, 2.46535130659844e-01,\n                                                2.46534959248393e-01, 2.46534942282480e-01, 2.46534589074692e-01, 2.46532196048058e-01, 2.46523399149972e-01,\n                                                2.46499950778571e-01, 2.46448639305925e-01, 2.46350389763620e-01, 2.46179589521013e-01, 2.45903682716751e-01,\n                                                2.45483076715942e-01, 2.44871401960374e-01, 2.44016162011000e-01, 2.42859802019751e-01, 2.41341210130905e-01,\n                                                2.39397646618514e-01, 2.36967069790268e-01, 2.33990796578993e-01, 2.30416401058626e-01, 2.26200718642119e-01,\n                                                2.21312791115885e-01, 2.15736562215973e-01, 2.09473119627795e-01, 2.02542281263462e-01, 1.94983344738034e-01,\n                                                1.86854860948216e-01, 1.78233355228294e-01, 1.69210999588806e-01, 1.59892330607384e-01, 1.50390199899483e-01,\n                                                1.40821225508738e-01, 1.31301070133887e-01, 1.21939895005163e-01, 1.12838320504849e-01, 1.04084167337355e-01,\n                                                9.57501635915392e-02, 8.78926975299308e-02, 8.05515900329112e-02, 7.37507697290525e-02, 6.74996689689493e-02,\n                                                6.17951249086275e-02, 5.66235659948973e-02, 5.19632844355371e-02, 4.77866316623974e-02, 4.40620178477147e-02,\n                                                4.07556409125931e-02, 3.78329099277792e-02, 3.52595593704450e-02, 3.30024733686258e-02, 3.10302533011750e-02,\n                                                2.93135692694904e-02, 2.78253377239253e-02, 2.65407656164172e-02, 2.54372973324166e-02, 2.44944954803543e-02,\n                                                2.36938811952001e-02, 2.30187544546325e-02, 2.24540102760713e-02, 2.19859626459780e-02, 2.16021846054488e-02,\n                                                2.12913699912392e-02, 2.10432198126256e-02, 2.08483540467270e-02, 2.06982477092623e-02, 2.05851883931345e-02,\n                                                2.05022510914930e-02, 2.04432850881844e-02, 2.04029070694816e-02, 2.03764944347213e-02, 2.03601730835317e-02,\n                                                2.03507947062747e-02, 2.03458997340746e-02, 2.03436634972505e-02, 2.03428246587904e-02, 2.03425964792245e-02,\n                                                2.03425628005718e-02, 2.03425593265010e-02, 2.03424855798531e-02, 2.03419859417693e-02, 2.03401493129505e-02,\n                                                2.03352542540713e-02, 2.03245451863125e-02, 2.03040500162430e-02, 2.02684524404688e-02, 2.02110344439461e-02,\n                                                2.01237066649469e-02, 1.99971454905281e-02, 1.98210548427582e-02, 1.95845663796064e-02, 1.92767831580767e-02,\n                                                1.88874580552181e-02, 1.84077796574442e-02, 1.78312164106202e-02, 1.71543475522569e-02, 1.63775910702455e-02,\n                                                1.55057297813173e-02, 1.45481414328756e-02, 1.35186605810702e-02, 1.24350387613177e-02, 1.13180208841825e-02,\n                                                1.01901116027463e-02, 9.07415482237894e-03, 7.99188184262078e-03, 6.96259115338194e-03, 6.00210327098694e-03,\n                                                5.12209083424153e-03, 4.32982613563127e-03, 3.62832686123227e-03, 3.01682799392466e-03, 2.49147359463819e-03,\n                                                2.04611218872230e-03, 1.67309286901229e-03, 1.36398790859715e-03, 1.11019919209809e-03, 9.03429597926220e-04,\n                                                7.36014059221191e-04, 6.01114176198791e-04, 4.92792056874691e-04, 4.05993474828392e-04, 3.36479192938555e-04,\n                                                2.80738506290845e-04, 2.35902722870662e-04, 1.99660103518795e-04, 1.70168493312417e-04, 1.45967550565729e-04,\n                                                1.25899631399307e-04, 1.09048216593521e-04, 9.46952412874680e-05, 8.22908542943424e-05, 7.14270989945476e-05,\n                                                6.18107622827324e-05, 5.32357943185957e-05, 4.55583758522948e-05, 3.86771911422557e-05, 3.25194165284870e-05,\n                                                2.70312481802648e-05, 2.21712852592759e-05, 1.79054989999372e-05, 1.42032034418094e-05, 1.10339249914659e-05,\n                                                8.36522416847174e-06, 6.16146196819045e-06, 4.38338376795855e-06, 2.98831749745432e-06, 1.93077380572504e-06,\n                                                1.16327827015539e-06, 6.37326223795753e-07, 3.55271367880050e-14, 3.55271367880050e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {6.10000000000000e+01, 6.09999997508840e+01, 6.09999920477237e+01,  6.09999398575428e+01,  6.09997479988798e+01,\n                                                6.09992365584784e+01, 6.09981172043052e+01, 6.09959732033049e+01,  6.09922438183013e+01,  6.09862135990805e+01,\n                                                6.09770069103899e+01, 6.09635878729383e+01, 6.09447657567160e+01,  6.09192057859974e+01,  6.08854453156713e+01,\n                                                6.08419154289752e+01, 6.07869681713293e+01, 6.07189098208185e+01,  6.06360407089754e+01,  6.05367020209265e+01,\n                                                6.04193295946076e+01, 6.02825139220264e+01, 6.01250643471676e+01,  5.99460740104296e+01,  5.97449807081884e+01,\n                                                5.95216179126930e+01, 5.92762501173495e+01, 5.90095876788409e+01,  5.87227784062779e+01,  5.84173759801624e+01,\n                                                5.80952883014022e+01, 5.77587114023440e+01, 5.74100560226724e+01,  5.70518740582964e+01,  5.66867908848722e+01,\n                                                5.63174474233333e+01, 5.59464533369524e+01, 5.55763505333149e+01,  5.52095846508925e+01,  5.48484816520077e+01,\n                                                5.44952269673183e+01, 5.41518455726865e+01, 5.38201825460013e+01,  5.35018846736711e+01,  5.31983842886606e+01,\n                                                5.29108866309075e+01, 5.26403617070830e+01, 5.23875410853302e+01,  5.21529195107322e+01,  5.19367608287914e+01,\n                                                5.17391075188779e+01, 5.15597931412894e+01, 5.13984571167764e+01,  5.12545614081326e+01,  5.11274088037601e+01,\n                                                5.10161625860044e+01, 5.09198673986139e+01, 5.08374711169839e+01,  5.07678474854496e+01,  5.07098192307968e+01,\n                                                5.06621813009589e+01, 5.06237238206259e+01, 5.05932543074269e+01,  5.05696186583698e+01,  5.05517204003824e+01,\n                                                5.05385377042303e+01, 5.05291376899162e+01, 5.05226876046721e+01,  5.05184625310988e+01,  5.05158493804399e+01,\n                                                5.05143470403519e+01, 5.05135626724228e+01, 5.05132042857232e+01,  5.05130698420924e+01,  5.05130332701267e+01,\n                                                5.05130278721798e+01, 5.05130271332770e+01, 5.05130096828951e+01,  5.05128914541649e+01,  5.05124568354727e+01,\n                                                5.05112983217816e+01, 5.05087630452489e+01, 5.05039080794424e+01,  5.04954664793039e+01,  5.04818258979899e+01,\n                                                5.04610214692063e+01, 5.04307444305357e+01, 5.03883676514253e+01,  5.03309887772646e+01,  5.02554910710812e+01,\n                                                5.01586212046707e+01, 5.00370822274922e+01, 4.98876387734501e+01,  4.97072303594142e+01,  4.94930875587471e+01,\n                                                4.92428451312592e+01, 4.89546461050292e+01, 4.86272314939297e+01,  4.82600117181118e+01,  4.78531174442192e+01,\n                                                4.74074287785597e+01, 4.69245819326584e+01, 4.64069516604916e+01,  4.58576068306626e+01,  4.52802368096802e+01,\n                                                4.46790488374409e+01, 4.40586410254857e+01, 4.34238605156328e+01,  4.27796596936819e+01,  4.21309636443054e+01,\n                                                4.14825589591343e+01, 4.08390085967333e+01, 4.02045916171350e+01,  3.95832622135194e+01,  3.89786207898758e+01,\n                                                3.83938910165112e+01, 3.78318998717630e+01, 3.72950610563689e+01,  3.67853643511928e+01,  3.63043737443281e+01,\n                                                3.58532357596877e+01, 3.54326973683670e+01, 3.50431312162647e+01,  3.46845652375526e+01,  3.43567140089274e+01,\n                                                3.40590100198812e+01, 3.37906339343990e+01, 3.35505436147857e+01,  3.33375020857687e+01,  3.31501047823590e+01,\n                                                3.29868064359484e+01, 3.28459478856370e+01, 3.27257830021724e+01,  3.26245058009718e+01,  3.25402777046279e+01,\n                                                3.24712547951520e+01, 3.24156147738140e+01, 3.23715832266392e+01,  3.23374586843533e+01,  3.23116358766191e+01,\n                                                3.22926265218694e+01, 3.22790769746225e+01, 3.22697820778465e+01,  3.22636946409303e+01,  3.22599300821156e+01,\n                                                3.22577659316044e+01, 3.22566360781341e+01, 3.22561198451749e+01,  3.22559261894086e+01,  3.22558735104428e+01,\n                                                3.22558657351414e+01, 3.22558649970510e+01, 3.22558499491410e+01,  3.22557479975132e+01,  3.22553732151886e+01,\n                                                3.22543742034196e+01, 3.22521879936372e+01, 3.22480015351555e+01,  3.22407224838735e+01,  3.22289609167820e+01,\n                                                3.22110234818474e+01, 3.21849213267288e+01, 3.21483928994243e+01,  3.20989423437839e+01,  3.20338936922359e+01,\n                                                3.19504603699626e+01, 3.18458286747210e+01, 3.17172529207391e+01,  3.15621589046666e+01,  3.13782513696574e+01,\n                                                3.11636203336871e+01, 3.09168406310639e+01, 3.06370588806248e+01,  3.03240623700400e+01,  2.99783249947550e+01,\n                                                2.96010263301866e+01, 2.91940410779506e+01, 2.87598975192014e+01,  2.83017053347207e+01,  2.78230553422520e+01,\n                                                2.73278963598804e+01, 2.68203972504650e+01, 2.63048046324193e+01,  2.57853079761269e+01,  2.52659231895989e+01,\n                                                2.47504031261385e+01, 2.42421791342689e+01, 2.37443327718710e+01,  2.32595923217321e+01,  2.27903458258646e+01,\n                                                2.23386615798513e+01, 2.19063083570322e+01, 2.14947704677644e+01,  2.11052561612550e+01,  2.07387008583999e+01,\n                                                2.03957685168343e+01, 2.00768547762523e+01, 1.97820946198112e+01,  1.95113756972699e+01,  1.92643568738370e+01,\n                                                1.90404905074768e+01, 1.88390466011691e+01, 1.86591372082929e+01,  1.84997400166631e+01,  1.83597206303839e+01,\n                                                1.82378535347517e+01, 1.81328420042168e+01, 1.80433373107542e+01,  1.79679575585494e+01,  1.79053063630962e+01,\n                                                1.78539914500342e+01, 1.78126430989999e+01, 1.77799322172920e+01,  1.77545877074993e+01,  1.77354126992516e+01,\n                                                1.77212991530903e+01, 1.77112403180499e+01, 1.77043405363487e+01,  1.76998219389077e+01,  1.76970276619954e+01,\n                                                1.76954213329808e+01, 1.76945827142682e+01, 1.76941995492549e+01,  1.76940558119306e+01,  1.76940167119971e+01,\n                                                1.76940109409327e+01, 1.76940104273491e+01, 1.76940003173966e+01,  1.76939318211032e+01,  1.76936800233102e+01,\n                                                1.76930088368791e+01, 1.76915400330160e+01, 1.76887273707806e+01,  1.76838369811781e+01,  1.76759351019892e+01,\n                                                1.76638841832246e+01, 1.76463482713364e+01, 1.76218084092529e+01,  1.75885885330377e+01,  1.75448919813920e+01,\n                                                1.74888482468289e+01, 1.74185689880580e+01, 1.73322116150165e+01,  1.72280480023368e+01,  1.71045351671030e+01,\n                                                1.69603841769441e+01, 1.67946232710174e+01, 1.66066513132908e+01,  1.63962783427582e+01,  1.61637511196151e+01,\n                                                1.59097630064505e+01, 1.56354489141095e+01, 1.53423669496081e+01,  1.50324685154681e+01,  1.47080579514342e+01,\n                                                1.43717418237388e+01, 1.40263673454971e+01, 1.36749497353116e+01,  1.33205897264851e+01,  1.29663845249290e+01,\n                                                1.26153375333914e+01, 1.22702733677426e+01, 1.19337646468612e+01,  1.16080757347930e+01,  1.12951264217526e+01,\n                                                1.09964760153473e+01, 1.07133260336604e+01, 1.04465380452188e+01,  1.01966623578091e+01,  9.96397317775027e+00,\n                                                9.74850636018984e+00, 9.55009670781603e+00, 9.36841272188258e+00,  9.20298759413819e+00,  9.05324595082423e+00,\n                                                8.91852638413741e+00, 8.79810014193528e+00, 8.69118652744305e+00,  8.59696562949796e+00,  8.51458899913160e+00,\n                                                8.44318883983756e+00, 8.38188620664201e+00, 8.32979862473097e+00,  8.28604744782200e+00,  8.24976518246524e+00,\n                                                8.22010290867360e+00, 8.19623783159972e+00, 8.17738090623556e+00,  8.16278439124965e+00,  8.15174911389528e+00,\n                                                8.14363117053063e+00, 8.13784775140507e+00, 8.13388176756408e+00,  8.13128497378249e+00,  8.12967932387730e+00,\n                                                8.12875636068248e+00, 8.12827452727968e+00, 8.12805438196630e+00,  8.12797179920948e+00,  8.12794933482477e+00,\n                                                8.12794601913325e+00, 8.12794572600913e+00, 8.12793997772469e+00,  8.12790103236995e+00,  8.12775786689534e+00,\n                                                8.12737625389300e+00, 8.12654117212406e+00, 8.12494215481128e+00,  8.12216227671183e+00,  8.11767147229838e+00,\n                                                8.11082486020740e+00, 8.10086670735442e+00, 8.08694057918824e+00,  8.06810606827992e+00,  8.04336225212051e+00,\n                                                8.01167769057007e+00, 7.97202633507108e+00, 7.92342820517724e+00,  7.86499313458415e+00,  7.79596536164252e+00,\n                                                7.71576631747661e+00, 7.62403273251879e+00, 7.52064721215920e+00,  7.40575876616126e+00,  7.27979140853767e+00,\n                                                7.14343981256943e+00, 6.99765199783278e+00, 6.84360000527160e+00,  6.68264035737981e+00,  6.51626672823083e+00,\n                                                6.34605765637288e+00, 6.17362236999335e+00, 6.00054790843242e+00,  5.82835070918230e+00,  5.65843559318616e+00,\n                                                5.49206449384198e+00, 5.33033627647220e+00, 5.17417769445878e+00,  5.02434421061283e+00,  4.88142842276520e+00,\n                                                4.74587340805714e+00, 4.61798846226759e+00, 4.49796528192133e+00,  4.38589335581901e+00,  4.28177397504756e+00,\n                                                4.18553271791767e+00, 4.09703050482312e+00, 4.01607339817169e+00,  3.94242131355992e+00,  3.87579576820239e+00,\n                                                3.81588675657587e+00, 3.76235882550426e+00, 3.71485642165130e+00,  3.67300859700406e+00,  3.63643317429379e+00,\n                                                3.60474048759809e+00, 3.57753681911810e+00, 3.55442764914505e+00,  3.53502082217058e+00,  3.51892970889418e+00,\n                                                3.50577641333883e+00, 3.49519503877833e+00, 3.48683498846772e+00,  3.48036424024904e+00,  3.47547250104676e+00,\n                                                3.47187412099868e+00, 3.46931063001643e+00, 3.46755275379559e+00,  3.46640177263505e+00,  3.46569010473421e+00,\n                                                3.46528102463459e+00, 3.46506746485863e+00, 3.46496989149234e+00,  3.46493328897837e+00,  3.46492333226601e+00,\n                                                3.46492186267825e+00, 3.46492173075064e+00, 3.46491912087662e+00,  3.46490143865349e+00,  3.46483643779052e+00,\n                                                3.46466317595865e+00, 3.46428403018430e+00, 3.46355804904338e+00,  3.46229596334730e+00,  3.46025717501123e+00,\n                                                3.45714903805237e+00, 3.45262872845459e+00, 3.44630796109689e+00,  3.43776074146179e+00,  3.42653422798751e+00,\n                                                3.41216262190559e+00, 3.39418379568123e+00, 3.37215812785113e+00,  3.34568875027752e+00,  3.31444216249331e+00,\n                                                3.27816796296897e+00, 3.23671632708226e+00, 3.19005186012183e+00,  3.13826259291974e+00,  3.08156317216782e+00,\n                                                3.02029171080856e+00, 2.95490026940011e+00, 2.88593948372106e+00,  2.81403837348334e+00,  2.73988079585870e+00,\n                                                2.66418028630359e+00, 2.58765511514981e+00, 2.51100526491430e+00,  2.43489271631581e+00,  2.35992597011179e+00,\n                                                2.28664920264454e+00, 2.21553594180179e+00, 2.14698673503334e+00,  2.08133001472515e+00,  2.01882526590631e+00,\n                                                1.95966764912583e+00, 1.90399338364431e+00, 1.85188539760014e+00,  1.80337895054441e+00,  1.75846709203331e+00,\n                                                1.71710591970448e+00, 1.67921964212096e+00, 1.64470544991831e+00,  1.61343817399626e+00,  1.58527468147506e+00,\n                                                1.56005794304566e+00, 1.53762070563777e+00, 1.51778872140738e+00,  1.50038351257857e+00,  1.48522468444700e+00,\n                                                1.47213182913016e+00, 1.46092608559506e+00, 1.45143143459112e+00,  1.44347580992332e+00,  1.43689210104851e+00,\n                                                1.43151910816017e+00, 1.42720249200419e+00, 1.42379573896658e+00,  1.42116113971507e+00,  1.41917075889130e+00,\n                                                1.41770735581776e+00, 1.41666520335396e+00, 1.41595074494331e+00,  1.41548302906020e+00,  1.41519386565052e+00,\n                                                1.41502766013294e+00, 1.41494089594834e+00, 1.41490125497601e+00,  1.41488638465086e+00,  1.41488233959699e+00,\n                                                1.41488174255679e+00, 1.41488168752035e+00, 1.41488058272555e+00,  1.41487309761342e+00,  1.41484558207576e+00,\n                                                1.41477223979761e+00, 1.41461175252966e+00, 1.41430447881116e+00,  1.41377037314457e+00,  1.41290777638926e+00,\n                                                1.41159323168726e+00, 1.40968247813078e+00, 1.40701276102673e+00,  1.40340656695155e+00,  1.39867683834822e+00,\n                                                1.39263364252398e+00, 1.38509216302372e+00, 1.37588175120903e+00,  1.36485563120032e+00,  1.35190070585509e+00,\n                                                1.33694678300852e+00, 1.31997445015642e+00, 1.30102079300799e+00,  1.28018219842011e+00,  1.25761362172158e+00,\n                                                1.23352394384366e+00, 1.20816739712760e+00, 1.18183148464334e+00,  1.15482231150074e+00,  1.12744870483900e+00,\n                                                1.10000680566743e+00, 1.07276685106965e+00, 1.04596355948016e+00,  1.01979091566862e+00,  9.94401371254575e-01,\n                                                9.69908745493306e-01, 9.46393625121054e-01, 9.23909917333518e-01,  9.02491376977771e-01,  8.82157288008493e-01,\n                                                8.62916886511215e-01, 8.44772457144508e-01, 8.27721262826223e-01,  8.11756576260635e-01,  7.96868099181644e-01,\n                                                7.83042017798799e-01, 7.70260882936356e-01, 7.58503442404162e-01,  7.47744502524895e-01,  7.37954859097314e-01,\n                                                7.29101314507957e-01, 7.21146784323352e-01, 7.14050490231898e-01,  7.07768233836603e-01,  7.02252745445172e-01,\n                                                6.97454102297364e-01, 6.93320210811763e-01, 6.89797347026122e-01,  6.86830748305312e-01,  6.84365247622878e-01,\n                                                6.82345939418141e-01, 6.80718863397203e-01, 6.79431689937608e-01,  6.78434388262751e-01,  6.77679856574322e-01,\n                                                6.77124492155997e-01, 6.76728679340194e-01, 6.76457174335866e-01,  6.76279368332004e-01,  6.76169413981185e-01,\n                                                6.76106205171052e-01, 6.76073205642297e-01, 6.76058128151361e-01,  6.76052472107060e-01,  6.76050933529943e-01,\n                                                6.76050706439320e-01, 6.76050684797815e-01, 6.76050242690501e-01,  6.76047247354660e-01,  6.76036236278506e-01,\n                                                6.76006885523663e-01, 6.75942655825530e-01, 6.75819662484962e-01,  6.75605820489388e-01,  6.75260314202944e-01,\n                                                6.74733438090421e-01, 6.73966850303678e-01, 6.72894273288421e-01,  6.71442663485465e-01,  6.69533854513205e-01,\n                                                6.67086654290706e-01, 6.64019346733660e-01, 6.60252514600629e-01,  6.55712064969123e-01,  6.50332307218804e-01,\n                                                6.44058910606049e-01, 6.36851559633961e-01, 6.28686134154997e-01,  6.19556268696094e-01,  6.09474189969703e-01,\n                                                5.98470788004583e-01, 5.86594937644712e-01, 5.73912145187137e-01,  5.60502641954599e-01,  5.46459076619008e-01,\n                                                5.31883967837047e-01, 5.16887068370828e-01, 5.01582765095115e-01,  4.86087602931605e-01,  4.70517983226998e-01,\n                                                4.54988056384636e-01, 4.39607810067834e-01, 4.24481349435403e-01,  4.09705371982945e-01,  3.95367851127219e-01,\n                                                3.81546953364655e-01, 3.68310218578081e-01, 3.55714029363597e-01,  3.43803383489679e-01,  3.32611966431195e-01,\n                                                3.22162502102429e-01, 3.12467343130592e-01, 3.03529249999045e-01,  2.95342302518023e-01,  2.87892887387315e-01,\n                                                2.81160711120947e-01, 2.75119796750538e-01, 2.69739433788132e-01,  2.64985062329885e-01,  2.60819082657925e-01,\n                                                2.57201590378941e-01, 2.54091043530075e-01, 2.51444872014943e-01,  2.49220041286598e-01,  2.47373581631976e-01,\n                                                2.45863092127145e-01, 2.44647224789176e-01, 2.43686150167392e-01,  2.42942001112887e-01,  2.42379287249229e-01,\n                                                2.41965269183140e-01, 2.41670279109606e-01, 2.41467973426865e-01,  2.41335503397103e-01,  2.41253591738378e-01,\n                                                2.41206506143214e-01, 2.41181924807528e-01, 2.41170693754938e-01,  2.41166480658045e-01,  2.41165334599089e-01,\n                                                2.41165165443384e-01, 2.41165148700752e-01, 2.41164800141128e-01,  2.41162438606608e-01,  2.41153757477321e-01,\n                                                2.41130617706695e-01, 2.41079981618014e-01, 2.40983025588477e-01,  2.40814474999254e-01,  2.40542204832323e-01,\n                                                2.40127148886309e-01, 2.39523558764994e-01, 2.38679649309546e-01,  2.37538658666104e-01,  2.36040337513309e-01,\n                                                2.34122862334075e-01, 2.31725141871465e-01, 2.28789454808819e-01,  2.25264322025282e-01,  2.21107481300201e-01,\n                                                2.16288799775462e-01, 2.10792934159478e-01, 2.04621535096656e-01,  1.97794794545352e-01,  1.90352156721168e-01,\n                                                1.82352055939440e-01, 1.73870608074374e-01, 1.64999262995380e-01,  1.55841516555931e-01,  1.46508872523889e-01,\n                                                1.37116324903225e-01, 1.27777686609171e-01, 1.18601110886132e-01,  1.09685131745699e-01,  1.01115490604549e-01,\n                                                9.29629270159182e-02, 8.52820062067465e-02, 7.81109516002161e-02,  7.14723616948447e-02,  6.53746281617700e-02,\n                                                5.98138403335469e-02, 5.47759590043313e-02, 5.02390638223389e-02,  4.61755153882777e-02,  4.25539170762690e-02,\n                                                3.93408054277415e-02, 3.65020366741931e-02, 3.40038676917445e-02,  3.18137515988184e-02,  2.99008818078406e-02,\n                                                2.82365250035355e-02, 2.67941849520952e-02, 2.55496369294974e-02,  2.44808683426569e-02,  2.35679559211377e-02,\n                                                2.27929044706769e-02, 2.21394670856796e-02, 2.15929621706437e-02,  2.11400986919017e-02,  2.07688177438570e-02,\n                                                2.04681556752107e-02, 2.02281315848225e-02, 2.00396598753585e-02,  1.98944866967921e-02,  1.97851475085500e-02,\n                                                1.97049416635480e-02, 1.96479189224803e-02, 1.96088722005854e-02,  1.95833306826145e-02,  1.95675477339350e-02,\n                                                1.95584787640186e-02, 1.95537452953403e-02, 1.95515828428157e-02,  1.95507716821126e-02,  1.95505510314362e-02,\n                                                1.95505184640368e-02, 1.95505151045765e-02, 1.95504437912462e-02,  1.95499606389902e-02,  1.95481846113950e-02,\n                                                1.95434510744619e-02, 1.95330953988702e-02, 1.95132766542585e-02,  1.94788542534567e-02,  1.94233326087812e-02,\n                                                1.93388909716745e-02, 1.92165167895268e-02, 1.90462600330292e-02,  1.88176218146552e-02,  1.85200821544029e-02,\n                                                1.81437583344319e-02, 1.76801671629576e-02, 1.71230431132940e-02,  1.64691426390320e-02,  1.57189472440038e-02,\n                                                1.48771691241123e-02, 1.39529681028421e-02, 1.29598101269579e-02,  1.19149355945893e-02,  1.08384560283454e-02,\n                                                9.75215195524726e-03, 8.67809275077036e-03, 7.63723019342422e-03,  6.64812413523919e-03,  5.72593883204320e-03,\n                                                4.88180583298714e-03, 4.12259253095471e-03, 3.45105587935279e-03,  2.86630997381110e-03,  2.36450367651031e-03,\n                                                1.93959539304700e-03, 1.58412540729103e-03, 1.28991404374545e-03,  1.04864457399145e-03,  8.52313269021465e-04,\n                                                6.93542750923370e-04, 5.65763930140406e-04, 4.63282791123731e-04,  3.81261220752549e-04,  3.15648702510885e-04,\n                                                2.63097001713675e-04, 2.20874781774683e-04, 1.86784039911458e-04,  1.59075205452552e-04,  1.36362765786657e-04,\n                                                1.17549666107664e-04, 1.01768459188634e-04, 8.83402862399407e-05,  7.67456480090800e-05,  6.65990979342723e-05,\n                                                5.76234385079033e-05, 4.96237301277347e-05, 4.24638762481777e-05,  3.60480846168798e-05,  3.03076447778494e-05,\n                                                2.51919342844076e-05, 2.06621088594261e-05, 1.66863105164339e-05,  1.32358508295738e-05,  1.02822638226030e-05,\n                                                7.79526540384268e-06, 5.74160138455682e-06, 4.08465957235649e-06,  2.78465348202417e-06,  1.79917990550393e-06,\n                                                1.08399203213594e-06, 5.93887079958222e-07, -7.10542735760100e-15, -7.10542735760100e-15, 0.00000000000000e+00,\n                                                -7.10542735760100e-15}),\nmadness::CubicInterpolationTable<double>(grid, {6.20000000000000e+01, 6.19999997448965e+01, 6.19999918565890e+01, 6.19999384120056e+01, 6.19997419419680e+01,\n                                                6.19992182088886e+01, 6.19980719502284e+01, 6.19958764152636e+01, 6.19920573852667e+01, 6.19858822038000e+01,\n                                                6.19764541673362e+01, 6.19627124561861e+01, 6.19434376468746e+01, 6.19172627676736e+01, 6.18826898631813e+01,\n                                                6.18381121316111e+01, 6.17818418724913e+01, 6.17121446765688e+01, 6.16272804046556e+01, 6.15255514067119e+01,\n                                                6.14053579940980e+01, 6.12652603123331e+01, 6.11040444894383e+01, 6.09207894243362e+01, 6.07149291503230e+01,\n                                                6.04863047764574e+01, 6.02351999760034e+01, 5.99623551011606e+01, 5.96689572266864e+01, 5.93566064100516e+01,\n                                                5.90272615924385e+01, 5.86831721467894e+01, 5.83268025134253e+01, 5.79607573532128e+01, 5.75877132776410e+01,\n                                                5.72103609129332e+01, 5.68313584497745e+01, 5.64532955573894e+01, 5.60786650711464e+01, 5.57098393978039e+01,\n                                                5.53490490381158e+01, 5.49983616956877e+01, 5.46596617052224e+01, 5.43346305715685e+01, 5.40247299922267e+01,\n                                                5.37311887637005e+01, 5.34549945593455e+01, 5.31968909434168e+01, 5.29573793941718e+01, 5.27367257111299e+01,\n                                                5.25349700264945e+01, 5.23519396828700e+01, 5.21872643895172e+01, 5.20403932417653e+01, 5.19106133266167e+01,\n                                                5.17970697189077e+01, 5.16987866974332e+01, 5.16146899919866e+01, 5.15436298259485e+01, 5.14844044587183e+01,\n                                                5.14357838685049e+01, 5.13965331565642e+01, 5.13654352047116e+01, 5.13413120835009e+01, 5.13230446927056e+01,\n                                                5.13095901217170e+01, 5.12999962472840e+01, 5.12934131404252e+01, 5.12891009325885e+01, 5.12864338907307e+01,\n                                                5.12849005678267e+01, 5.12841000238641e+01, 5.12837342461529e+01, 5.12835970298907e+01, 5.12835597037012e+01,\n                                                5.12835541944324e+01, 5.12835534402913e+01, 5.12835356300301e+01, 5.12834149630688e+01, 5.12829713812372e+01,\n                                                5.12817889755392e+01, 5.12792014141244e+01, 5.12742463248997e+01, 5.12656306354920e+01, 5.12517087497532e+01,\n                                                5.12304752842049e+01, 5.11995738698905e+01, 5.11563232059540e+01, 5.10977610882027e+01, 5.10207064910472e+01,\n                                                5.09218389326831e+01, 5.07977933092169e+01, 5.06452671969332e+01, 5.04611364062056e+01, 5.02425735060729e+01,\n                                                4.99871633601744e+01, 4.96930096590398e+01, 4.93588271301867e+01, 4.89840154356740e+01, 4.85687122721772e+01,\n                                                4.81138242030479e+01, 4.76210337850640e+01, 4.70927807703783e+01, 4.65322145369085e+01, 4.59431157299342e+01,\n                                                4.53297881299140e+01, 4.46969265169616e+01, 4.40494711451584e+01, 4.33924623622678e+01, 4.27309085388570e+01,\n                                                4.20696767318952e+01, 4.14134096587893e+01, 4.07664666334356e+01, 4.01328820855474e+01, 3.95163342812290e+01,\n                                                3.89201187754010e+01, 3.83471247022362e+01, 3.77998154398532e+01, 3.72802169526668e+01, 3.67899166930864e+01,\n                                                3.63300739472141e+01, 3.59014401895201e+01, 3.55043864729676e+01, 3.51389345501571e+01, 3.48047890500884e+01,\n                                                3.45013690707450e+01, 3.42278385095503e+01, 3.39831351064238e+01, 3.37659985001014e+01, 3.35749976890531e+01,\n                                                3.34085582502762e+01, 3.32649895783534e+01, 3.31425123019115e+01, 3.30392859271402e+01, 3.29534366482118e+01,\n                                                3.28830851498818e+01, 3.28263741087454e+01, 3.27814949813751e+01, 3.27467135583285e+01, 3.27203936733156e+01,\n                                                3.27010183973887e+01, 3.26872080280991e+01, 3.26777342094714e+01, 3.26715295927667e+01, 3.26676925683496e+01,\n                                                3.26654867592055e+01, 3.26643351567237e+01, 3.26638089865869e+01, 3.26636116030626e+01, 3.26635579100581e+01,\n                                                3.26635499850868e+01, 3.26635492327886e+01, 3.26635338952153e+01, 3.26634299810796e+01, 3.26630479844194e+01,\n                                                3.26620297422746e+01, 3.26598014492838e+01, 3.26555344040844e+01, 3.26481152358042e+01, 3.26361272668088e+01,\n                                                3.26178445505118e+01, 3.25912399539548e+01, 3.25540084001158e+01, 3.25036060083829e+01, 3.24373053422849e+01,\n                                                3.23522662740564e+01, 3.22456211115533e+01, 3.21145716408115e+01, 3.19564946882135e+01, 3.17690518024698e+01,\n                                                3.15502978202177e+01, 3.12987825286326e+01, 3.10136394617147e+01, 3.06946560974456e+01, 3.03423203363560e+01,\n                                                2.99578390824073e+01, 2.95431259799538e+01, 2.91007569211528e+01, 2.86338939283519e+01, 2.81461805162147e+01,\n                                                2.76416145568800e+01, 2.71244076165478e+01, 2.65988420166888e+01, 2.60691377065531e+01, 2.55393398420317e+01,\n                                                2.50132346950636e+01, 2.44942967561348e+01, 2.39856647365658e+01, 2.34901398885648e+01, 2.30101976573655e+01,\n                                                2.25480036226772e+01, 2.21054267647285e+01, 2.16840465141918e+01, 2.12851537062675e+01, 2.09097483732083e+01,\n                                                2.05585385591179e+01, 2.02319439027751e+01, 1.99301060853773e+01, 1.96529062098010e+01, 1.93999875594759e+01,\n                                                1.91707814168616e+01, 1.89645337006054e+01, 1.87803308019588e+01, 1.86171237870735e+01, 1.84737508027827e+01,\n                                                1.83489579543930e+01, 1.82414191133018e+01, 1.81497551204659e+01, 1.80725527512047e+01, 1.80083836554274e+01,\n                                                1.79558233224243e+01, 1.79134699614013e+01, 1.78799630484401e+01, 1.78540011733503e+01, 1.78343587302932e+01,\n                                                1.78199009381557e+01, 1.78095966541029e+01, 1.78025284590511e+01, 1.77978995475142e+01, 1.77950370442531e+01,\n                                                1.77933914913602e+01, 1.77925323941016e+01, 1.77921398722379e+01, 1.77919926248305e+01, 1.77919525700688e+01,\n                                                1.77919466580737e+01, 1.77919461319483e+01, 1.77919357751085e+01, 1.77918656061177e+01, 1.77916076593228e+01,\n                                                1.77909200819885e+01, 1.77894154074318e+01, 1.77865340500444e+01, 1.77815242037204e+01, 1.77734292632830e+01,\n                                                1.77610838089961e+01, 1.77431190784172e+01, 1.77179786735371e+01, 1.76839449881897e+01, 1.76391764680048e+01,\n                                                1.75817553189489e+01, 1.75097446634798e+01, 1.74212534319507e+01, 1.73145065270634e+01, 1.71879170988611e+01,\n                                                1.70401572330640e+01, 1.68702231161341e+01, 1.66774909098457e+01, 1.64617601981178e+01, 1.62232828974339e+01,\n                                                1.59627767416099e+01, 1.56814235362420e+01, 1.53808529982030e+01, 1.50631129929448e+01, 1.47306265123090e+01,\n                                                1.43861352565350e+01, 1.40326297524214e+01, 1.36732669034348e+01, 1.33112776459153e+01, 1.29498694702881e+01,\n                                                1.25921302433030e+01, 1.22409404247736e+01, 1.18989001365951e+01, 1.15682757497315e+01, 1.12509681617444e+01,\n                                                1.09485023309392e+01, 1.06620354406471e+01, 1.03923796238296e+01, 1.01400345842391e+01, 9.90522560531949e+00,\n                                                9.68794311983297e+00, 9.48798096468762e+00, 9.30497144146955e+00, 9.13841618694418e+00, 8.98771254796418e+00,\n                                                8.85217563332107e+00, 8.73105650385423e+00, 8.62355710394005e+00, 8.52884257770319e+00, 8.44605159047897e+00,\n                                                8.37430521806768e+00, 8.31271489052414e+00, 8.26038979285158e+00, 8.21644403605799e+00, 8.18000382009318e+00,\n                                                8.15021471616136e+00, 8.12624910138814e+00, 8.10731368660850e+00, 8.09265699218303e+00, 8.08157655220562e+00,\n                                                8.07342556952546e+00, 8.06761870755091e+00, 8.06363669354478e+00, 8.06102942393289e+00, 8.05941730460511e+00,\n                                                8.05849062540798e+00, 8.05800685286644e+00, 8.05778582176126e+00, 8.05770290674843e+00, 8.05768035198533e+00,\n                                                8.05767702295430e+00, 8.05767672865087e+00, 8.05767095724024e+00, 8.05763185520474e+00, 8.05748811379311e+00,\n                                                8.05710496584606e+00, 8.05626652636971e+00, 8.05466108432078e+00, 8.05187005130108e+00, 8.04736126518285e+00,\n                                                8.04048733052790e+00, 8.03048963658855e+00, 8.01650860670127e+00, 7.99760057738576e+00, 7.97276146137105e+00,\n                                                7.94095700382589e+00, 7.90115899659780e+00, 7.85238629144406e+00, 7.79374889240896e+00, 7.72449287377611e+00,\n                                                7.64404344364432e+00, 7.55204323886615e+00, 7.44838296718251e+00, 7.33322184768654e+00, 7.20699593428550e+00,\n                                                7.07041327705333e+00, 6.92443587537368e+00, 6.77024937498108e+00, 6.60922234235480e+00, 6.44285764360763e+00,\n                                                6.27273894606644e+00, 6.10047566814386e+00, 5.92764983282325e+00, 5.75576818375528e+00, 5.58622250239411e+00,\n                                                5.42026023968647e+00, 5.25896638229560e+00, 5.10325611510239e+00, 4.95387663849269e+00, 4.81141574559831e+00,\n                                                4.67631459260758e+00, 4.54888242695112e+00, 4.42931165336645e+00, 4.31769227329357e+00, 4.21402525835817e+00,\n                                                4.11823474903333e+00, 4.03017912408584e+00, 3.94966102470747e+00, 3.87643640157409e+00, 3.81022262809687e+00,\n                                                3.75070571142578e+00, 3.69754663962928e+00, 3.65038692430508e+00, 3.60885342450924e+00, 3.57256256257110e+00,\n                                                3.54112405952225e+00, 3.51414432446514e+00, 3.49122962731094e+00, 3.47198916850773e+00, 3.45603813420631e+00,\n                                                3.44300079291261e+00, 3.43251365258097e+00, 3.42422865810352e+00, 3.41781637121093e+00, 3.41296904093407e+00,\n                                                3.40940344584873e+00, 3.40686337182621e+00, 3.40512158276554e+00, 3.40398114771507e+00, 3.40327600574690e+00,\n                                                3.40287067864895e+00, 3.40265907863729e+00, 3.40256240078550e+00, 3.40252613422319e+00, 3.40251626889910e+00,\n                                                3.40251481280010e+00, 3.40251468208341e+00, 3.40251209616441e+00, 3.40249457624104e+00, 3.40243017202201e+00,\n                                                3.40225850072292e+00, 3.40188283629335e+00, 3.40116352426978e+00, 3.39991304224755e+00, 3.39789302468895e+00,\n                                                3.39481356583136e+00, 3.39033509799697e+00, 3.38407310465565e+00, 3.37560585738908e+00, 3.36448525387463e+00,\n                                                3.35025067422094e+00, 3.33244556583514e+00, 3.31063622160146e+00, 3.28443195180771e+00, 3.25350559622845e+00,\n                                                3.21761311577155e+00, 3.17661088234989e+00, 3.13046928610106e+00, 3.07928142397387e+00, 3.02326592813431e+00,\n                                                2.96276341987051e+00, 2.89822659599757e+00, 2.83020451322919e+00, 2.75932216328356e+00, 2.68625685724814e+00,\n                                                2.61171320034593e+00, 2.53639849620255e+00, 2.46100026142305e+00, 2.38616718069993e+00, 2.31249434769953e+00,\n                                                2.24051309934124e+00, 2.17068524919409e+00, 2.10340113501652e+00, 2.03898066232028e+00, 1.97767645975026e+00,\n                                                1.91967833807898e+00, 1.86511841416883e+00, 1.81407646736419e+00, 1.76658528761014e+00, 1.72263591778255e+00,\n                                                1.68218277349562e+00, 1.64514864704499e+00, 1.61142958585453e+00, 1.58089960232940e+00, 1.55341514151129e+00,\n                                                1.52881921846564e+00, 1.50694514346592e+00, 1.48761977709459e+00, 1.47066629231627e+00, 1.45590645813457e+00,\n                                                1.44316249253649e+00, 1.43225855640721e+00, 1.42302197294075e+00, 1.41528425889618e+00, 1.40888204637847e+00,\n                                                1.40365795888194e+00, 1.39946148556579e+00, 1.39614987550370e+00, 1.39358905114578e+00, 1.39165451939449e+00,\n                                                1.39023224121058e+00, 1.38921940789142e+00, 1.38852506507403e+00, 1.38807052459578e+00, 1.38778950953889e+00,\n                                                1.38762798847485e+00, 1.38754366998537e+00, 1.38750514646865e+00, 1.38749069533923e+00, 1.38748676431673e+00,\n                                                1.38748618410732e+00, 1.38748613062237e+00, 1.38748505697219e+00, 1.38747778286916e+00, 1.38745104302037e+00,\n                                                1.38737976842171e+00, 1.38722380610682e+00, 1.38692519778130e+00, 1.38640615994532e+00, 1.38556791313901e+00,\n                                                1.38429051179207e+00, 1.38243382440795e+00, 1.37983980086623e+00, 1.37633613343154e+00, 1.37174136511043e+00,\n                                                1.36587141958798e+00, 1.35854742049460e+00, 1.34960453787703e+00, 1.33890145519974e+00, 1.32632990484323e+00,\n                                                1.31182359214837e+00, 1.29536573874041e+00, 1.27699444728401e+00, 1.25680514299067e+00, 1.23494949978023e+00,\n                                                1.21163052201111e+00, 1.18709382472974e+00, 1.16161561332317e+00, 1.13548835175257e+00, 1.10900553440666e+00,\n                                                1.08244722206805e+00, 1.05606796053407e+00, 1.03008832731545e+00, 1.00469070819305e+00, 9.80019153776979e-01,\n                                                9.56182513683046e-01, 9.33259658618240e-01, 9.11305539061196e-01, 8.90357039694663e-01, 8.70437947468616e-01,\n                                                8.51562726832107e-01, 8.33739095931065e-01, 8.16969584273608e-01, 8.01252331450861e-01, 7.86581387471223e-01,\n                                                7.72946732568215e-01, 7.60334176180365e-01, 7.48725239234943e-01, 7.38097079603676e-01, 7.28422489764021e-01,\n                                                7.19669976740811e-01, 7.11803924312754e-01, 7.04784833143577e-01, 6.98569633390548e-01, 6.93112064640502e-01,\n                                                6.88363118583325e-01, 6.84271540017029e-01, 6.80784381298736e-01, 6.77847604139018e-01, 6.75406720747993e-01,\n                                                6.73407463934005e-01, 6.71796473041042e-01, 6.70521979846278e-01, 6.69534476008316e-01, 6.68787341655197e-01,\n                                                6.68237413510468e-01, 6.67845470817483e-01, 6.67576618407580e-01, 6.67400548643052e-01, 6.67291667610520e-01,\n                                                6.67229075686919e-01, 6.67196398180721e-01, 6.67181467813641e-01, 6.67175866958800e-01, 6.67174343394386e-01,\n                                                6.67174118519597e-01, 6.67174097089266e-01, 6.67173659295798e-01, 6.67170693186840e-01, 6.67159789549110e-01,\n                                                6.67130725164903e-01, 6.67067122076794e-01, 6.66945328366985e-01, 6.66733571281583e-01, 6.66391431394381e-01,\n                                                6.65869683600818e-01, 6.65110546106163e-01, 6.64048370982414e-01, 6.62610797980953e-01, 6.60720375940585e-01,\n                                                6.58296632703966e-01, 6.55258545264751e-01, 6.51527328517417e-01, 6.47029426536392e-01, 6.41699559158361e-01,\n                                                6.35483653945954e-01, 6.28341484379739e-01, 6.20248843067081e-01, 6.11199105203198e-01, 6.01204080795803e-01,\n                                                5.90294109590928e-01, 5.78517413225917e-01, 5.65938776788599e-01, 5.52637678869914e-01, 5.38706019204007e-01,\n                                                5.24245602732179e-01, 5.09365528596355e-01, 4.94179606078063e-01, 4.78803883839966e-01, 4.63354342493773e-01,\n                                                4.47944771362245e-01, 4.32684833398369e-01, 4.17678318590305e-01, 4.03021592818043e-01, 3.88802260386406e-01,\n                                                3.75098068108088e-01, 3.61976082054689e-01, 3.49492162795869e-01, 3.37690751823537e-01, 3.26604963773782e-01,\n                                                3.16256959850080e-01, 3.06658561151352e-01, 2.97812049026305e-01, 2.89711094319770e-01, 2.82341758343890e-01,\n                                                2.75683514506028e-01, 2.69710249139685e-01, 2.64391211466396e-01, 2.59691894194965e-01, 2.55574836804328e-01,\n                                                2.52000352220875e-01, 2.48927183928593e-01, 2.46313104398979e-01, 2.44115467193900e-01, 2.42291724459292e-01,\n                                                2.40799919181228e-01, 2.39599157991400e-01, 2.38650065995024e-01, 2.37915220571658e-01, 2.37359556865428e-01,\n                                                2.36950734181647e-01, 2.36659450100817e-01, 2.36459688056087e-01, 2.36328884508126e-01, 2.36248003661800e-01,\n                                                2.36201510736485e-01, 2.36177238843844e-01, 2.36166149181976e-01, 2.36161989126224e-01, 2.36160857495790e-01,\n                                                2.36160690469717e-01, 2.36160673937867e-01, 2.36160329766527e-01, 2.36157997963218e-01, 2.36149426129437e-01,\n                                                2.36126577703821e-01, 2.36076579233256e-01, 2.35980844382617e-01, 2.35814417633406e-01, 2.35545580691067e-01,\n                                                2.35135764286532e-01, 2.34539806319241e-01, 2.33706592886591e-01, 2.32580110341900e-01, 2.31100922922423e-01,\n                                                2.29208070898771e-01, 2.26841358483760e-01, 2.23943969650257e-01, 2.20465315320432e-01, 2.16363979919130e-01,\n                                                2.11610602768857e-01, 2.06190504611087e-01, 2.00105856242807e-01, 1.93377189114287e-01, 1.86044070063772e-01,\n                                                1.78164805884798e-01, 1.69815107545091e-01, 1.61085725050988e-01, 1.52079155246398e-01, 1.42905616071445e-01,\n                                                1.33678559541757e-01, 1.24510049252038e-01, 1.15506346324160e-01, 1.06764025407024e-01, 9.83668816135506e-02,\n                                                9.03837993083840e-02, 8.28676488632851e-02, 7.58551743082307e-02, 6.93677479829873e-02, 6.34128079956113e-02,\n                                                5.79857646440942e-02, 5.30721612753737e-02, 4.86498973766132e-02, 4.46913588696560e-02, 4.11653443125317e-02,\n                                                3.80387190192550e-02, 3.52777670953941e-02, 3.28492413702506e-02, 3.07211324060290e-02, 2.88631907734427e-02,\n                                                2.72472429983424e-02, 2.58473427081185e-02, 2.46397962085396e-02, 2.36030974200929e-02, 2.27178018950340e-02,\n                                                2.19663642828465e-02, 2.13329585817235e-02, 2.08032960440150e-02, 2.03644517593489e-02, 2.00047076845280e-02,\n                                                1.97134171326994e-02, 1.94808933739026e-02, 1.92983229491333e-02, 1.91577025077194e-02, 1.90517964314694e-02,\n                                                1.89741112299373e-02, 1.89188817315866e-02, 1.88810635118486e-02, 1.88563258400833e-02, 1.88410397133651e-02,\n                                                1.88322562542993e-02, 1.88276718153944e-02, 1.88255774483608e-02, 1.88247918276616e-02, 1.88245781243737e-02,\n                                                1.88245465823726e-02, 1.88245433287051e-02, 1.88244742607466e-02, 1.88240063209975e-02, 1.88222862139824e-02,\n                                                1.88177017233997e-02, 1.88076721439359e-02, 1.87884775746454e-02, 1.87551395635595e-02, 1.87013677474539e-02,\n                                                1.86195891919638e-02, 1.85010782742907e-02, 1.83362040911277e-02, 1.81148083385381e-02, 1.78267183431728e-02,\n                                                1.74623868248389e-02, 1.70136322811842e-02, 1.64744330558761e-02, 1.58417070496171e-02, 1.51159918263204e-02,\n                                                1.43019314628674e-02, 1.34084814781019e-02, 1.24487644300473e-02, 1.14395460638548e-02, 1.04003510302917e-02,\n                                                9.35229017903083e-03, 8.31671790377442e-03, 7.31386777914622e-03, 6.36162059488754e-03, 5.47453885046423e-03,\n                                                4.66325964173819e-03, 3.93428225229542e-03, 3.29012883942426e-03, 2.72980764530217e-03, 2.24947720592894e-03,\n                                                1.84320180020592e-03, 1.50370160379509e-03, 1.22302814320818e-03, 9.93125496272285e-04, 8.06260821363480e-04,\n                                                6.55321628975969e-04, 5.33986283116406e-04, 4.36784452560346e-04, 3.59075876943393e-04, 2.96982452923089e-04,\n                                                2.47304028988538e-04, 2.07434150190977e-04, 1.75277992461531e-04, 1.49169871825450e-04, 1.27792088839840e-04,\n                                                1.10102562821623e-04, 9.52784221510683e-05, 8.26764295069893e-05, 7.18046307142117e-05, 6.22979540594315e-05,\n                                                5.38936458625017e-05, 4.64067530003831e-05, 3.97081130998345e-05, 3.37069051852268e-05, 2.83381373975544e-05,\n                                                2.35540731310380e-05, 1.93181861760650e-05, 1.56005775764356e-05, 1.23743492892459e-05, 9.61282469091884e-06,\n                                                7.28763527746423e-06, 5.36764520120414e-06, 3.81859041453936e-06, 2.60325060708055e-06, 1.68196867633696e-06,\n                                                1.01337113278532e-06, 5.55195413198817e-07, 2.13162820728030e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.13162820728030e-14}),\nmadness::CubicInterpolationTable<double>(grid, {6.30000000000000e+01, 6.29999997388490e+01, 6.29999916635435e+01, 6.29999369520166e+01, 6.29997358245019e+01,\n                                                6.29991996758463e+01, 6.29980262437086e+01, 6.29957786595130e+01, 6.29918690881068e+01, 6.29855474945835e+01,\n                                                6.29758958960381e+01, 6.29618282821806e+01, 6.29420962478659e+01, 6.29153003017913e+01, 6.28799068238893e+01,\n                                                6.28342707493096e+01, 6.27766642405930e+01, 6.27053118120724e+01, 6.26184324870874e+01, 6.25142894615306e+01,\n                                                6.23912472784845e+01, 6.22478356023415e+01, 6.20828173426869e+01, 6.18952573003915e+01, 6.16845860309086e+01,\n                                                6.14506526811392e+01, 6.11937605734506e+01, 6.09146805301156e+01, 6.06146393050560e+01, 6.02952836306444e+01,\n                                                5.99586236427029e+01, 5.96069620739732e+01, 5.92428169956132e+01, 5.88688457500974e+01, 5.84877761757685e+01,\n                                                5.81023487486514e+01, 5.77152705347738e+01, 5.73291795229087e+01, 5.69466164723809e+01, 5.65700010501445e+01,\n                                                5.62016096296601e+01, 5.58435533328233e+01, 5.54977562574273e+01, 5.51659349192501e+01, 5.48495804752962e+01,\n                                                5.45499452277843e+01, 5.42680343880387e+01, 5.40046033735935e+01, 5.37601602837525e+01, 5.35349728109132e+01,\n                                                5.33290787283807e+01, 5.31422991827906e+01, 5.29742542052014e+01, 5.28243800472181e+01, 5.26919480923025e+01,\n                                                5.25760851696640e+01, 5.24757951149344e+01, 5.23899813947071e+01, 5.23174705585363e+01, 5.22570362165054e+01,\n                                                5.22074231733988e+01, 5.21673712891667e+01, 5.21356385851708e+01, 5.21110230809765e+01, 5.20923828309074e+01,\n                                                5.20786536361894e+01, 5.20688639393449e+01, 5.20621464633453e+01, 5.20577462381002e+01, 5.20550247586487e+01,\n                                                5.20534601387354e+01, 5.20526432546815e+01, 5.20522700109946e+01, 5.20521299939786e+01, 5.20520919059154e+01,\n                                                5.20520862841956e+01, 5.20520855146615e+01, 5.20520673408707e+01, 5.20519442109473e+01, 5.20514915750605e+01,\n                                                5.20502850349929e+01, 5.20476446582177e+01, 5.20425884293642e+01, 5.20337968826121e+01, 5.20195908324276e+01,\n                                                5.19979239608854e+01, 5.19663917970017e+01, 5.19222582970419e+01, 5.18625007610300e+01, 5.17838731612206e+01,\n                                                5.16829870916761e+01, 5.15564084843569e+01, 5.14007670337821e+01, 5.12128740484449e+01, 5.09898433886462e+01,\n                                                5.07292094920414e+01, 5.04290364537479e+01, 5.00880128178128e+01, 4.97055279945592e+01, 4.92817275741898e+01,\n                                                4.88175456352049e+01, 4.83147120662800e+01, 4.77757322262893e+01, 4.72038359847639e+01, 4.66028945322147e+01,\n                                                4.59773068711196e+01, 4.53318628953672e+01, 4.46715946748201e+01, 4.40016299950178e+01, 4.33270611442875e+01,\n                                                4.26528375544124e+01, 4.19836846762906e+01, 4.13240455930070e+01, 4.06780383174395e+01, 4.00494214704754e+01,\n                                                3.94415636958754e+01, 3.88574161692872e+01, 3.82994908905701e+01, 3.77698486356136e+01, 3.72700992556819e+01,\n                                                3.68014144446151e+01, 3.63645506317620e+01, 3.59598783677233e+01, 3.55874146514805e+01, 3.52468556223773e+01,\n                                                3.49376082443659e+01, 3.46588205775322e+01, 3.44094108027525e+01, 3.41880953931595e+01, 3.39934168420389e+01,\n                                                3.38237712774048e+01, 3.36774361882800e+01, 3.35525983839864e+01, 3.34473822082504e+01, 3.33598779286246e+01,\n                                                3.32881701135175e+01, 3.32303656938462e+01, 3.31846212892071e+01, 3.31491692687755e+01, 3.31223419262579e+01,\n                                                3.31025930875848e+01, 3.30885164493979e+01, 3.30788599723898e+01, 3.30725357287529e+01, 3.30686247253824e+01,\n                                                3.30663763876174e+01, 3.30652025819233e+01, 3.30646662670833e+01, 3.30644650779514e+01, 3.30644103497313e+01,\n                                                3.30644022719644e+01, 3.30644015051616e+01, 3.30643858718758e+01, 3.30642799542476e+01, 3.30638905925895e+01,\n                                                3.30628527184661e+01, 3.30605814634108e+01, 3.30562321485375e+01, 3.30486699370816e+01, 3.30364508380430e+01,\n                                                3.30178156295940e+01, 3.29906980987823e+01, 3.29527487348455e+01, 3.29013746304690e+01, 3.28337958070116e+01,\n                                                3.27471174684421e+01, 3.26384168099620e+01, 3.25048419973679e+01, 3.23437198629990e+01, 3.21526678355862e+01,\n                                                3.19297047549772e+01, 3.16733546359656e+01, 3.13827372269423e+01, 3.10576393991660e+01, 3.06985619931411e+01,\n                                                3.03067377109811e+01, 2.98841169737625e+01, 2.94333204143650e+01, 2.89575589368830e+01, 2.84605250644553e+01,\n                                                2.79462624287262e+01, 2.74190232296118e+01, 2.68831255602806e+01, 2.63428228685921e+01, 2.58021960371980e+01,\n                                                2.52650747180154e+01, 2.47349894159621e+01, 2.42151506087318e+01, 2.37084472205368e+01, 2.32174550024651e+01,\n                                                2.27444461307672e+01, 2.22913942033952e+01, 2.18599727801513e+01, 2.14515493730622e+01, 2.10671791895447e+01,\n                                                2.07076033504769e+01, 2.03732549143431e+01, 2.00642736704959e+01, 1.97805283909990e+01, 1.95216438504972e+01,\n                                                1.92870296727729e+01, 1.90759086719403e+01, 1.88873433363846e+01, 1.87202600281257e+01, 1.85734711120621e+01,\n                                                1.84456955497445e+01, 1.83355785599532e+01, 1.82417108616065e+01, 1.81626478554648e+01, 1.80969289219147e+01,\n                                                1.80430968394598e+01, 1.79997171732988e+01, 1.79653973494104e+01, 1.79388050191088e+01, 1.79186852350185e+01,\n                                                1.79038759057082e+01, 1.78933209768810e+01, 1.78860808050610e+01, 1.78813392461046e+01, 1.78784070737257e+01,\n                                                1.78767214676128e+01, 1.78758414588489e+01, 1.78754393823195e+01, 1.78752885506229e+01, 1.78752475208473e+01,\n                                                1.78752414649421e+01, 1.78752409260098e+01, 1.78752303170633e+01, 1.78751584400134e+01, 1.78748942142240e+01,\n                                                1.78741898994870e+01, 1.78726485959947e+01, 1.78696970915789e+01, 1.78645652645051e+01, 1.78562731855559e+01,\n                                                1.78436269805213e+01, 1.78252243946193e+01, 1.77994708194461e+01, 1.77646062745512e+01, 1.77187434567793e+01,\n                                                1.76599164681639e+01, 1.75861392117973e+01, 1.74954717337068e+01, 1.73860920461886e+01, 1.72563702839218e+01,\n                                                1.71049415320811e+01, 1.69307734446664e+01, 1.67332249337513e+01, 1.65120927791289e+01, 1.62676438966698e+01,\n                                                1.60006320077397e+01, 1.57122982972449e+01, 1.54043561067317e+01, 1.50789597403752e+01, 1.47386572882661e+01,\n                                                1.43863274137147e+01, 1.40251007192206e+01, 1.36582677525704e+01, 1.32891777027466e+01, 1.29211338015049e+01,\n                                                1.25572927312957e+01, 1.22005754600101e+01, 1.18535957521257e+01, 1.15186104013768e+01, 1.11974925138074e+01,\n                                                1.08917265370628e+01, 1.06024216699523e+01, 1.03303390662353e+01, 1.00759279006598e+01, 9.83936573927932e+00,\n                                                9.62059949643051e+00, 9.41938430120371e+00, 9.23531861957747e+00, 9.06787484511702e+00, 8.91642521955878e+00,\n                                                8.78026337309576e+00, 8.65862201715253e+00, 8.55068742836429e+00, 8.45561137838227e+00, 8.37252112736271e+00,\n                                                8.30052803484848e+00, 8.23873526480935e+00, 8.18624497873015e+00, 8.14216532417281e+00, 8.10561743667097e+00,\n                                                8.07574258058754e+00, 8.05170946112306e+00, 8.03272164786211e+00, 8.01802496428508e+00, 8.00691462269558e+00,\n                                                7.99874182548086e+00, 7.99291951656569e+00, 7.98892695516781e+00, 7.98631279947599e+00, 7.98469643026706e+00,\n                                                7.98376731088403e+00, 7.98328226523697e+00, 7.98306065264286e+00, 7.98297751952640e+00, 7.98295490543691e+00,\n                                                7.98295156764955e+00, 7.98295127257203e+00, 7.98294548598094e+00, 7.98290628109795e+00, 7.98276216164336e+00,\n                                                7.98237800624364e+00, 7.98153736335693e+00, 7.97992770678167e+00, 7.97712936114215e+00, 7.97260880008412e+00,\n                                                7.96571700478243e+00, 7.95569353002705e+00, 7.94167683825621e+00, 7.92272130541978e+00, 7.89782105605687e+00,\n                                                7.86594043600615e+00, 7.82605048112753e+00, 7.77717020990408e+00, 7.71841099992183e+00, 7.64902176808903e+00,\n                                                7.56843224323747e+00, 7.47629138274265e+00, 7.37249801435207e+00, 7.25722112098271e+00, 7.13090782293362e+00,\n                                                6.99427798888675e+00, 6.84830542057708e+00, 6.69418658281814e+00, 6.53329877972171e+00, 6.36715043645468e+00,\n                                                6.19732670270417e+00, 6.02543393669296e+00, 5.85304672590095e+00, 5.68166088322582e+00, 5.51265524614067e+00,\n                                                5.34726408730932e+00, 5.18656064092317e+00, 5.03145092281405e+00, 4.88267598561590e+00, 4.74082022400540e+00,\n                                                4.60632336510904e+00, 4.47949420287861e+00, 4.36052473332146e+00, 4.24950391275786e+00, 4.14643067462194e+00,\n                                                4.05122607720420e+00, 3.96374455297734e+00, 3.88378424917235e+00, 3.81109644091530e+00, 3.74539399439746e+00,\n                                                3.68635887051607e+00, 3.63364868811499e+00, 3.58690240297355e+00, 3.54574519552314e+00, 3.50979269011861e+00,\n                                                3.47865464741603e+00, 3.45193827734496e+00, 3.42925131348428e+00, 3.41020497169731e+00, 3.39441688865115e+00,\n                                                3.38151410170335e+00, 3.37113609317405e+00, 3.36293788199876e+00, 3.35659310706860e+00, 3.35179701214034e+00,\n                                                3.34826921483265e+00, 3.34575612434848e+00, 3.34403286596897e+00, 3.34290457596221e+00, 3.34220694818153e+00,\n                                                3.34180594201807e+00, 3.34159659822024e+00, 3.34150095131891e+00, 3.34146507151266e+00, 3.34145531139662e+00,\n                                                3.34145387082616e+00, 3.34145374150349e+00, 3.34145118316199e+00, 3.34143385008090e+00, 3.34137013272402e+00,\n                                                3.34120029242500e+00, 3.34082863548873e+00, 3.34011699980515e+00, 3.33887987172643e+00, 3.33688145035546e+00,\n                                                3.33383497216958e+00, 3.32940459315208e+00, 3.32321008823351e+00, 3.31483455797543e+00, 3.30383522035602e+00,\n                                                3.28975720521034e+00, 3.27215006067514e+00, 3.25058643405273e+00, 3.22468212333560e+00, 3.19411643986897e+00,\n                                                3.15865161460147e+00, 3.11814986014387e+00, 3.07258670430374e+00, 3.02205936187659e+00, 2.96678921555931e+00,\n                                                2.90711791632893e+00, 2.84349714763101e+00, 2.77647266586219e+00, 2.70666375961837e+00, 2.63473968837675e+00,\n                                                2.56139490503739e+00, 2.48732489673512e+00, 2.41320428838812e+00, 2.33966847490209e+00, 2.26729954583312e+00,\n                                                2.19661672694679e+00, 2.12807107548018e+00, 2.06204380195392e+00, 1.99884739106254e+00, 1.93872865968797e+00,\n                                                1.88187299021202e+00, 1.82840915965053e+00, 1.77841439175636e+00, 1.73191944102044e+00, 1.68891364363262e+00,\n                                                1.64934993159891e+00, 1.61314981158417e+00, 1.58020828054359e+00, 1.55039860991597e+00, 1.52357689912574e+00,\n                                                1.49958628901868e+00, 1.47826073904483e+00, 1.45942830363948e+00, 1.44291388464373e+00, 1.42854147859583e+00,\n                                                1.41613597307251e+00, 1.40552457067947e+00, 1.39653793136079e+00, 1.38901112416398e+00, 1.38278447047296e+00,\n                                                1.37770434455239e+00, 1.37362397661448e+00, 1.37040428090891e+00, 1.36791470866036e+00, 1.36603410487567e+00,\n                                                1.36465153068583e+00, 1.36366700024610e+00, 1.36299207419288e+00, 1.36255025069886e+00, 1.36227710020667e+00,\n                                                1.36212010035159e+00, 1.36203814230142e+00, 1.36200069727993e+00, 1.36198665072987e+00, 1.36198282976262e+00,\n                                                1.36198226579712e+00, 1.36198221380959e+00, 1.36198117021803e+00, 1.36197409976638e+00, 1.36194810855756e+00,\n                                                1.36187882952735e+00, 1.36172723430847e+00, 1.36143698889305e+00, 1.36093249234194e+00, 1.36011774303414e+00,\n                                                1.35887618103801e+00, 1.35707165372735e+00, 1.35455063917502e+00, 1.35114583208636e+00, 1.34668114456866e+00,\n                                                1.34097809512583e+00, 1.33386345326348e+00, 1.32517787763891e+00, 1.31478514155561e+00, 1.30258139483304e+00,\n                                                1.28850378438807e+00, 1.27253766920827e+00, 1.25472164203230e+00, 1.23514963216804e+00, 1.21396952962497e+00,\n                                                1.19137804982473e+00, 1.16761194482233e+00, 1.14293613030798e+00, 1.11762977261139e+00, 1.09197176704212e+00,\n                                                1.06622722264149e+00, 1.04063645734251e+00, 1.01540758346133e+00, 9.90713111247722e-01, 9.66690289215755e-01,\n                                                9.43444327685050e-01, 9.21053352851210e-01, 8.99573943114639e-01, 8.79046337107525e-01, 8.59498751370587e-01,\n                                                8.40950587348509e-01, 8.23414566692833e-01, 8.06897985230627e-01, 7.91403331259382e-01, 7.76928502924257e-01,\n                                                7.63466814050936e-01, 7.51006922574916e-01, 7.39532765601538e-01, 7.29023546752138e-01, 7.19453795764728e-01,\n                                                7.10793505313831e-01, 7.03008342667829e-01, 6.96059931205745e-01, 6.89906196684404e-01, 6.84501773914775e-01,\n                                                6.79798470224895e-01, 6.75745782257216e-01, 6.72291462071740e-01, 6.69382127188008e-01, 6.66963907193910e-01,\n                                                6.64983117045914e-01, 6.63386944399846e-01, 6.62124135497372e-01, 6.61145661573116e-01, 6.60405345725991e-01,\n                                                6.59860428995714e-01, 6.59472054233447e-01, 6.59205647423335e-01, 6.59031178467757e-01, 6.58923287054783e-01,\n                                                6.58861263919867e-01, 6.58828883330777e-01, 6.58814088618037e-01, 6.58808538650277e-01, 6.58807028928230e-01,\n                                                6.58806806096557e-01, 6.58806784860928e-01, 6.58806351045030e-01, 6.58803411884563e-01, 6.58792607309898e-01,\n                                                6.58763806973198e-01, 6.58700781653991e-01, 6.58580094085941e-01, 6.58370259481401e-01, 6.58031223863247e-01,\n                                                6.57514205386796e-01, 6.56761939218434e-01, 6.55709359022879e-01, 6.54284736397713e-01, 6.52411282550119e-01,\n                                                6.50009193527339e-01, 6.46998091686712e-01, 6.43299783366473e-01, 6.38841218858303e-01, 6.33557510040902e-01,\n                                                6.27394838445461e-01, 6.20313077014202e-01, 6.12287956088203e-01, 6.03312629661396e-01, 5.93398540168081e-01,\n                                                5.82575534553442e-01, 5.70891244262512e-01, 5.58409799005261e-01, 5.45209990831559e-01, 5.31383034924062e-01,\n                                                5.17030083182107e-01, 5.02259636389624e-01, 4.87184974612887e-01, 4.71921690596012e-01, 4.56585375839175e-01,\n                                                4.41289481435390e-01, 4.26143360354608e-01, 4.11250495333903e-01, 3.96706923571600e-01, 3.82599880281376e-01,\n                                                3.69006691734036e-01, 3.55993950183930e-01, 3.43616996258142e-01, 3.31919719999092e-01, 3.20934672849312e-01,\n                                                3.10683463345889e-01, 3.01177392725151e-01, 2.92418275502477e-01, 2.84399385446285e-01, 2.77106468966075e-01,\n                                                2.70518774594812e-01, 2.64610057292899e-01, 2.59349527970791e-01, 2.54702730360165e-01, 2.50632337951494e-01,\n                                                2.47098872354293e-01, 2.44061350695731e-01, 2.41477873435450e-01, 2.39306165357299e-01, 2.37504081790199e-01,\n                                                2.36030089707832e-01, 2.34843729733278e-01, 2.33906060733460e-01, 2.33180084148884e-01, 2.32631140955398e-01,\n                                                2.32227270641275e-01, 2.31939519158452e-01, 2.31742181717770e-01, 2.31612966655476e-01, 2.31533068372499e-01,\n                                                2.31487140374625e-01, 2.31463163439841e-01, 2.31452208550024e-01, 2.31448099052479e-01, 2.31446981175154e-01,\n                                                2.31446816179009e-01, 2.31446799848072e-01, 2.31446459859590e-01, 2.31444156395717e-01, 2.31435688741122e-01,\n                                                2.31413118021955e-01, 2.31363727320186e-01, 2.31269156477083e-01, 2.31104754126676e-01, 2.30839189632405e-01,\n                                                2.30434367336798e-01, 2.29845683869854e-01, 2.29022664936842e-01, 2.27910009674467e-01, 2.26449057127283e-01,\n                                                2.24579669854407e-01, 2.22242503993144e-01, 2.19381604032108e-01, 2.15947225864113e-01, 2.11898756235549e-01,\n                                                2.07207564251256e-01, 2.01859595539744e-01, 1.95857506655869e-01, 1.89222140583198e-01, 1.81993167120126e-01,\n                                                1.74228756154029e-01, 1.66004216631208e-01, 1.57409615669643e-01, 1.48546483581640e-01, 1.39523801202834e-01,\n                                                1.30453543356900e-01, 1.21446103934453e-01, 1.12605943998510e-01, 1.04027779966337e-01, 9.57935667236782e-02,\n                                                8.79704399779726e-02, 8.06096777947758e-02, 7.37466393941233e-02, 6.74015543626467e-02, 6.15809772287434e-02,\n                                                5.62796946040365e-02, 5.14828728651935e-02, 4.71682575408536e-02, 4.33082730357341e-02, 3.98719148691526e-02,\n                                                3.68263693955129e-02, 3.41383332737166e-02, 3.17750342103551e-02, 2.97049750350951e-02, 2.78984356254668e-02,\n                                                2.63277729963889e-02, 2.49675607123052e-02, 2.37946063134515e-02, 2.27878810711033e-02, 2.19283911692187e-02,\n                                                2.11990140917493e-02, 2.05843190270301e-02, 2.00703857043507e-02, 1.96446323143746e-02, 1.92956599884795e-02,\n                                                1.90131186318254e-02, 1.87875966162494e-02, 1.86105348551635e-02, 1.84741640508079e-02, 1.83714624101583e-02,\n                                                1.82961298907642e-02, 1.82425741107792e-02, 1.82059024944934e-02, 1.81819150731286e-02, 1.81670926404323e-02,\n                                                1.81585756534801e-02, 1.81541303063000e-02, 1.81520994844107e-02, 1.81513377005658e-02, 1.81511304813711e-02,\n                                                1.81510998964143e-02, 1.81510967414695e-02, 1.81510297691148e-02, 1.81505760274447e-02, 1.81489081118613e-02,\n                                                1.81444627281664e-02, 1.81347374977037e-02, 1.81161254754088e-02, 1.80837995245682e-02, 1.80316608010358e-02,\n                                                1.79523676148960e-02, 1.78374620501742e-02, 1.76776108840571e-02, 1.74629734012868e-02, 1.71837006190287e-02,\n                                                1.68305576336820e-02, 1.63956435197150e-02, 1.58731628747688e-02, 1.52601825320389e-02, 1.45572902373701e-02,\n                                                1.37690640167492e-02, 1.29042660200653e-02, 1.19756956003485e-02, 1.09996730037949e-02, 9.99517314175336e-03,\n                                                8.98268061284568e-03, 7.98288228155286e-03, 7.01534233748902e-03, 6.09730989625490e-03, 5.24278901227149e-03,\n                                                4.46195934860327e-03, 3.76098124948498e-03, 3.14216260905198e-03, 2.60441768199371e-03, 2.14391846498074e-03,\n                                                1.75483182455594e-03, 1.43004871406305e-03, 1.16183829528893e-03, 9.42388889434653e-04, 7.64220454698261e-04,\n                                                6.20467122338653e-04, 5.05037291382848e-04, 4.12668336970512e-04, 3.38903507348221e-04, 2.80024373843446e-04,\n                                                2.32967668495121e-04, 1.95242129876760e-04, 1.64847910681942e-04, 1.40196398540127e-04, 1.20032088773314e-04,\n                                                1.03363242267562e-04, 8.94077616422351e-05, 7.75549749576498e-05, 6.73381086002678e-05, 5.84107312846527e-05,\n                                                5.05233322414256e-05, 4.35001441942973e-05, 3.72183980417162e-05, 3.15918513607016e-05, 2.65589217747220e-05,\n                                                2.20745043222337e-05, 1.81041783520186e-05, 1.46198211155024e-05, 1.15961568454281e-05, 9.00812944593099e-06,\n                                                6.82910416571758e-06, 5.02986100059388e-06, 3.57825861385663e-06, 2.43939561528350e-06, 1.57609597550845e-06,\n                                                9.49581860254511e-07, 5.20246658197721e-07, 4.26325641456060e-14, 4.26325641456060e-14, 4.26325641456060e-14,\n                                                4.97379915032070e-14}),\nmadness::CubicInterpolationTable<double>(grid, {6.40000000000000e+01, 6.39999997327423e+01, 6.39999914686041e+01, 6.39999354777041e+01, 6.39997296470188e+01,\n                                                6.39991809609791e+01, 6.39979800887597e+01, 6.39956799446372e+01, 6.39916789433545e+01, 6.39852095008145e+01,\n                                                6.39753321454948e+01, 6.39609354285049e+01, 6.39407416773602e+01, 6.39133185604679e+01, 6.38770964418886e+01,\n                                                6.38303916191562e+01, 6.37714357305643e+01, 6.36984118291943e+01, 6.36094977388727e+01, 6.35029171877474e+01,\n                                                6.33769987145968e+01, 6.32302413739131e+01, 6.30613848598505e+01, 6.28694800227833e+01, 6.26539542270473e+01,\n                                                6.24146650558047e+01, 6.21519359417979e+01, 6.18665686380094e+01, 6.15598299717242e+01, 6.12334136254051e+01,\n                                                6.08893810610607e+01, 6.05300883718044e+01, 6.01581071797005e+01, 5.97761474271469e+01, 5.93869881850737e+01,\n                                                5.89934199500641e+01, 5.85981990447555e+01, 5.82040123689479e+01, 5.78134493587380e+01, 5.74289777675452e+01,\n                                                5.70529206346397e+01, 5.66874331608559e+01, 5.63344796677804e+01, 5.59958119222934e+01, 5.56729505875404e+01,\n                                                5.53671713856454e+01, 5.50794969210118e+01, 5.48106943246353e+01, 5.45612782230868e+01, 5.43315181680126e+01,\n                                                5.41214495924053e+01, 5.39308874967755e+01, 5.37594422901822e+01, 5.36065374208505e+01, 5.34714285771263e+01,\n                                                5.33532243100603e+01, 5.32509079358455e+01, 5.31633605398321e+01, 5.30893848430917e+01, 5.30277296221023e+01,\n                                                5.29771143020816e+01, 5.29362532815642e+01, 5.29038794949128e+01, 5.28787666846273e+01, 5.28597498400816e+01,\n                                                5.28457432666238e+01, 5.28357557808805e+01, 5.28289025854175e+01, 5.28244134578239e+01, 5.28216369932882e+01,\n                                                5.28200407615471e+01, 5.28192073730193e+01, 5.28188265882446e+01, 5.28186837422970e+01, 5.28186448846949e+01,\n                                                5.28186391493927e+01, 5.28186383643108e+01, 5.28186198233331e+01, 5.28184942056677e+01, 5.28180324246307e+01,\n                                                5.28168015073550e+01, 5.28141077837075e+01, 5.28089493970654e+01, 5.27999802215969e+01, 5.27854871418727e+01,\n                                                5.27633824879842e+01, 5.27312131915993e+01, 5.26861878946232e+01, 5.26252227578874e+01, 5.25450060436309e+01,\n                                                5.24420806615257e+01, 5.23129427857509e+01, 5.21541534316480e+01, 5.19624586492550e+01, 5.17349129376237e+01,\n                                                5.14689998411014e+01, 5.11627436662133e+01, 5.08148069276281e+01, 5.04245693064641e+01, 4.99921851091825e+01,\n                                                4.95186168764928e+01, 4.90056426382990e+01, 4.84558337506812e+01, 4.78725003421250e+01, 4.72596032554832e+01,\n                                                4.66216353412173e+01, 4.59634801318170e+01, 4.52902604352615e+01, 4.46071912795841e+01, 4.39194498793695e+01,\n                                                4.32320702872326e+01, 4.25498638625705e+01, 4.18773609588845e+01, 4.12187662601364e+01, 4.05779207730057e+01,\n                                                3.99582668851648e+01, 3.93628172211595e+01, 3.87941310830609e+01, 3.82543027062048e+01, 3.77449635490524e+01,\n                                                3.72672977779882e+01, 3.68220676606252e+01, 3.64096446753784e+01, 3.60300426924715e+01, 3.56829508752138e+01,\n                                                3.53677652588180e+01, 3.50836188793450e+01, 3.48294107817597e+01, 3.46038343575070e+01, 3.44054054093311e+01,\n                                                3.42324902312117e+01, 3.40833338816004e+01, 3.39560887327273e+01, 3.38488432909143e+01, 3.37596511915079e+01,\n                                                3.36865601703394e+01, 3.36276407014143e+01, 3.35810138739107e+01, 3.35448779708403e+01, 3.35175331191971e+01,\n                                                3.34974033192548e+01, 3.34830551391266e+01, 3.34732123867102e+01, 3.34667661473769e+01, 3.34627797002185e+01,\n                                                3.34604879917510e+01, 3.34592915432173e+01, 3.34587448828085e+01, 3.34585398127178e+01, 3.34584840287848e+01,\n                                                3.34584757951969e+01, 3.34584750136025e+01, 3.34584590787490e+01, 3.34583511179592e+01, 3.34579542454764e+01,\n                                                3.34568963506635e+01, 3.34545812829074e+01, 3.34501480694754e+01, 3.34424399827792e+01, 3.34299851778866e+01,\n                                                3.34109904994124e+01, 3.33833498817089e+01, 3.33446685024971e+01, 3.32923034604680e+01, 3.32234211998304e+01,\n                                                3.31350711812358e+01, 3.30242744041895e+01, 3.28881243570911e+01, 3.27238968779329e+01, 3.25291643527548e+01,\n                                                3.23019087798688e+01, 3.20406276030181e+01, 3.17444259576298e+01, 3.14130891307926e+01, 3.10471296178951e+01,\n                                                3.06478041643887e+01, 3.02170976318604e+01, 2.97576724867475e+01, 2.92727852406335e+01, 2.87661742267753e+01,\n                                                2.82419263902597e+01, 2.77043337065546e+01, 2.71577516224346e+01, 2.66064717843662e+01, 2.60546189226912e+01,\n                                                2.55060773745218e+01, 2.49644472909069e+01, 2.44330254317752e+01, 2.39148019403719e+01, 2.34124634951578e+01,\n                                                2.29283949081548e+01, 2.24646749145015e+01, 2.20230662941296e+01, 2.16050040793359e+01, 2.12115872507930e+01,\n                                                2.08435786377573e+01, 2.05014153144666e+01, 2.01852288659411e+01, 1.98948727080414e+01, 1.96299528221132e+01,\n                                                1.93898586998415e+01, 1.91737924257305e+01, 1.89807950432846e+01, 1.88097702705524e+01, 1.86595061365613e+01,\n                                                1.85286952673394e+01, 1.84159544874700e+01, 1.83198442365230e+01, 1.82388881045907e+01, 1.81715926045299e+01,\n                                                1.81164671327775e+01, 1.80720439268680e+01, 1.80368977046137e+01, 1.80096645674958e+01, 1.79890596719669e+01,\n                                                1.79738931216938e+01, 1.79630835162733e+01, 1.79556686114969e+01, 1.79508126043405e+01, 1.79478096509403e+01,\n                                                1.79460833530028e+01, 1.79451820995079e+01, 1.79447703161010e+01, 1.79446158430221e+01, 1.79445738227025e+01,\n                                                1.79445676205950e+01, 1.79445670686518e+01, 1.79445562035831e+01, 1.79444825912688e+01, 1.79442119864836e+01,\n                                                1.79434906678339e+01, 1.79419121524482e+01, 1.79388893856964e+01, 1.79336336418869e+01, 1.79251413049670e+01,\n                                                1.79121896128771e+01, 1.78933423263603e+01, 1.78669660982063e+01, 1.78312580459089e+01, 1.77842846469536e+01,\n                                                1.77240315692339e+01, 1.76484634250842e+01, 1.75555917266673e+01, 1.74435485829901e+01, 1.73106630033996e+01,\n                                                1.71555361673985e+01, 1.69771117932591e+01, 1.67747378622584e+01, 1.65482164348016e+01, 1.62978390352858e+01,\n                                                1.60244059002486e+01, 1.57292280650425e+01, 1.54141116692066e+01, 1.50813240293534e+01, 1.47335412060722e+01,\n                                                1.43737773324465e+01, 1.40052971449609e+01, 1.36315149561147e+01, 1.32558853827986e+01, 1.28817929100511e+01,\n                                                1.25124482343649e+01, 1.21507989337814e+01, 1.17994603604649e+01, 1.14606701047213e+01, 1.11362665090326e+01,\n                                                1.08276891065522e+01, 1.05359969620825e+01, 1.02618999091734e+01, 1.00057975726144e+01, 9.76782163943115e+00,\n                                                9.54787781551354e+00, 9.34568500997064e+00, 9.16081032012149e+00, 8.99269922644815e+00, 8.84070100680697e+00,\n                                                8.70408975674162e+00, 8.58208160214943e+00, 8.47384876465041e+00, 8.37853113606619e+00, 8.29524597164937e+00,\n                                                8.22309624440309e+00, 8.16117812671942e+00, 8.10858798528446e+00, 8.06442919165025e+00, 8.02781896375434e+00,\n                                                7.99789536312499e+00, 7.97382447997653e+00, 7.95480774686504e+00, 7.94008923541598e+00, 7.92896271517507e+00,\n                                                7.92077819449088e+00, 7.91494762567085e+00, 7.91094944439523e+00, 7.90833162855412e+00, 7.90671300394749e+00,\n                                                7.90578259079145e+00, 7.90529687050679e+00, 7.90507494985439e+00, 7.90499170120520e+00, 7.90496905569090e+00,\n                                                7.90496571326540e+00, 7.90496541777785e+00, 7.90495962314588e+00, 7.90492036378685e+00, 7.90477604410497e+00,\n                                                7.90439135522183e+00, 7.90354954608301e+00, 7.90193766083492e+00, 7.89913545465054e+00, 7.89460869452626e+00,\n                                                7.88770753746523e+00, 7.87767063890172e+00, 7.86363555750408e+00, 7.84465586522118e+00, 7.81972512285667e+00,\n                                                7.78780752891343e+00, 7.74787459438409e+00, 7.69894665951593e+00, 7.64013749411550e+00, 7.57069967664594e+00,\n                                                7.49006801126272e+00, 7.39789800199394e+00, 7.29409643219830e+00, 7.17884143597484e+00, 7.05259009031299e+00,\n                                                6.91607244484222e+00, 6.77027194033197e+00, 6.61639322858147e+00, 6.45581938501540e+00, 6.29006132044807e+00,\n                                                6.12070279889592e+00, 5.94934481175950e+00, 5.77755308784641e+00, 5.60681216221870e+00, 5.43848864270412e+00,\n                                                5.27380515587459e+00, 5.11382511474452e+00, 4.95944721614991e+00, 4.81140772103814e+00, 4.67028823811732e+00,\n                                                4.53652688100659e+00, 4.41043112399338e+00, 4.29219122574304e+00, 4.18189355836864e+00, 4.07953349540776e+00,\n                                                3.98502767958188e+00, 3.89822555581069e+00, 3.81892007067208e+00, 3.74685744675849e+00, 3.68174595989474e+00,\n                                                3.62326368321751e+00, 3.57106520928499e+00, 3.52478741090003e+00, 3.48405434511167e+00, 3.44848143738601e+00,\n                                                3.41767910152304e+00, 3.39125595514017e+00, 3.36882178156124e+00, 3.34999036867624e+00, 3.33438232610585e+00,\n                                                3.32162794629239e+00, 3.31137013554393e+00, 3.30326740026585e+00, 3.29699683442458e+00, 3.29225701952770e+00,\n                                                3.28877072078792e+00, 3.28628724503390e+00, 3.28458431909616e+00, 3.28346935272442e+00, 3.28277996742504e+00,\n                                                3.28238370067865e+00, 3.28217683151817e+00, 3.28208231535262e+00, 3.28204685973305e+00, 3.28203721500689e+00,\n                                                3.28203579146777e+00, 3.28203566367402e+00, 3.28203313557890e+00, 3.28201600742189e+00, 3.28195304339501e+00,\n                                                3.28178521125422e+00, 3.28141794941266e+00, 3.28071473196986e+00, 3.27949224674715e+00, 3.27751750140615e+00,\n                                                3.27450716916935e+00, 3.27012947057082e+00, 3.26400885086546e+00, 3.25573364324016e+00, 3.24486679599577e+00,\n                                                3.23095958129367e+00, 3.21356799419472e+00, 3.19227130278882e+00, 3.16669194291606e+00, 3.13651569433733e+00,\n                                                3.10151086711713e+00, 3.06154510820468e+00, 3.01659844533594e+00, 2.96677134289056e+00, 2.91228685739356e+00,\n                                                2.85348643028466e+00, 2.79081939929119e+00, 2.72482688371262e+00, 2.65612122755798e+00, 2.58536259183879e+00,\n                                                2.51323451069278e+00, 2.44042022892439e+00, 2.36758142034058e+00, 2.29534048501849e+00, 2.22426711037473e+00,\n                                                2.15486924518299e+00, 2.08758816596270e+00, 2.02279697925987e+00, 1.96080173485855e+00, 1.90184431930204e+00,\n                                                1.84610641957643e+00, 1.79371403796825e+00, 1.74474224272956e+00, 1.69922000828351e+00, 1.65713510626713e+00,\n                                                1.61843904983827e+00, 1.58305208172327e+00, 1.55086815525488e+00, 1.52175981247521e+00, 1.49558283379928e+00,\n                                                1.47218052958868e+00, 1.45138756527923e+00, 1.43303325134152e+00, 1.41694427706377e+00, 1.40294691307582e+00,\n                                                1.39086874449193e+00, 1.38054002078075e+00, 1.37179471926576e+00, 1.36447141792098e+00, 1.35841406235995e+00,\n                                                1.35347269444866e+00, 1.34950418849062e+00, 1.34637301780069e+00, 1.34395205171739e+00, 1.34212336242347e+00,\n                                                1.34077900379677e+00, 1.33982171207507e+00, 1.33916547121785e+00, 1.33873588489789e+00, 1.33847030197531e+00,\n                                                1.33831765249942e+00, 1.33823796567477e+00, 1.33820155838026e+00, 1.33818790111501e+00, 1.33818418604245e+00,\n                                                1.33818363770678e+00, 1.33818358716002e+00, 1.33818257249074e+00, 1.33817569799140e+00, 1.33815042711903e+00,\n                                                1.33808306820255e+00, 1.33793567490905e+00, 1.33765347592924e+00, 1.33716296983258e+00, 1.33637082644820e+00,\n                                                1.33516374040499e+00, 1.33340938124006e+00, 1.33095857220211e+00, 1.32764880049593e+00, 1.32330910971770e+00,\n                                                1.31776634685129e+00, 1.31085263075340e+00, 1.30241378020001e+00, 1.29231829614053e+00, 1.28046634909804e+00,\n                                                1.26679809784999e+00, 1.25130058236319e+00, 1.23401241666468e+00, 1.21502557890727e+00, 1.19448377439996e+00,\n                                                1.17257714048954e+00, 1.14953345924995e+00, 1.12560650647241e+00, 1.10106262044455e+00, 1.07616691834947e+00,\n                                                1.05117071214458e+00, 1.02630150533400e+00, 1.00175649254161e+00, 9.77699838521161e-01, 9.54263355418739e-01,\n                                                9.31549702808177e-01, 9.09637012544039e-01, 8.88583895625068e-01, 8.68434040443681e-01, 8.49219943482474e-01,\n                                                8.30965621009753e-01, 8.13688372607324e-01, 7.97399788804711e-01, 7.82106231516401e-01, 7.67808996660271e-01,\n                                                7.54504322164173e-01, 7.42183352934866e-01, 7.30832129611585e-01, 7.20431634941519e-01, 7.10957910469553e-01,\n                                                7.02382244621447e-01, 6.94671428199356e-01, 6.87788072104439e-01, 6.81690982718337e-01, 6.76335591470554e-01,\n                                                6.71674435914426e-01, 6.67657689749063e-01, 6.64233738537099e-01, 6.61349796406817e-01, 6.58952556912425e-01,\n                                                6.56988868636155e-01, 6.55406423267202e-01, 6.54154441038614e-01, 6.53184335816761e-01, 6.52450340103186e-01,\n                                                6.51910068995456e-01, 6.51525001991338e-01, 6.51260862571796e-01, 6.51087877829561e-01, 6.50980903978279e-01,\n                                                6.50919408223849e-01, 6.50887302938280e-01, 6.50872634005623e-01, 6.50867131220970e-01, 6.50865634333741e-01,\n                                                6.50865413396460e-01, 6.50865392341359e-01, 6.50864962213518e-01, 6.50862048040011e-01, 6.50851335318002e-01,\n                                                6.50822779810611e-01, 6.50760290212510e-01, 6.50640628301090e-01, 6.50432576342567e-01, 6.50096419329692e-01,\n                                                6.49583786683735e-01, 6.48837893447720e-01, 6.47794213552800e-01, 6.46381606182992e-01, 6.44523899490501e-01,\n                                                6.42141913324878e-01, 6.39155874516689e-01, 6.35488146090303e-01, 6.31066158445748e-01, 6.25825400185548e-01,\n                                                6.19712303790003e-01, 6.12686851615592e-01, 6.04724734407178e-01, 5.95818919203658e-01, 5.85980524830617e-01,\n                                                5.75238956798508e-01, 5.63641312630367e-01, 5.51251125385711e-01, 5.38146559501833e-01, 5.24418202719538e-01,\n                                                5.10166607390047e-01, 4.95499724227678e-01, 4.80530345813598e-01, 4.65373643121289e-01, 4.50144844541448e-01,\n                                                4.34957080812389e-01, 4.19919405327768e-01, 4.05134997765813e-01, 3.90699566318212e-01, 3.76699974177910e-01,\n                                                3.63213123406751e-01, 3.50305129626307e-01, 3.38030812700474e-01, 3.26433513014138e-01, 3.15545223321834e-01,\n                                                3.05387006373643e-01, 2.95969652135049e-01, 2.87294517742453e-01, 2.79354489292473e-01, 2.72135006776296e-01,\n                                                2.65615100663155e-01, 2.59768399087584e-01, 2.54564076527195e-01, 2.49967726724790e-01, 2.45942153230196e-01,\n                                                2.42448079541276e-01, 2.39444787010079e-01, 2.36890692356184e-01, 2.34743877928651e-01, 2.32962587079307e-01,\n                                                2.31505694553938e-01, 2.30333158147616e-01, 2.29406453505163e-01, 2.28688989392559e-01, 2.28146496505452e-01,\n                                                2.27747379354270e-01, 2.27463018325153e-01, 2.27268007904748e-01, 2.27140317385754e-01, 2.27061362110327e-01,\n                                                2.27015976295824e-01, 2.26992282443412e-01, 2.26981456899445e-01, 2.26977395924500e-01, 2.26976291246537e-01,\n                                                2.26976128198594e-01, 2.26976112060477e-01, 2.26975776086434e-01, 2.26973499820986e-01, 2.26965132151030e-01,\n                                                2.26942827956847e-01, 2.26894020552081e-01, 2.26800566844538e-01, 2.26638107364600e-01, 2.26375683499953e-01,\n                                                2.25975654077970e-01, 2.25393951845412e-01, 2.24580716140686e-01, 2.23481329792563e-01, 2.22037874801067e-01,\n                                                2.20191001861920e-01, 2.17882183142109e-01, 2.15056286656811e-01, 2.11664375924521e-01, 2.07666603146635e-01,\n                                                2.03035031764735e-01, 1.97756199341512e-01, 1.91833218953086e-01, 1.85287220988030e-01, 1.78157960741977e-01,\n                                                1.70503462080383e-01, 1.62398632873163e-01, 1.53932869950992e-01, 1.45206762623872e-01, 1.36328093801175e-01,\n                                                1.27407413895604e-01, 1.18553512514829e-01, 1.09869126802742e-01, 1.01447199014139e-01, 9.33679323676557e-02,\n                                                8.56968031903449e-02, 7.84835834830133e-02, 7.17623274719728e-02, 6.55521926278624e-02, 5.98589094129167e-02,\n                                                5.46766880677723e-02, 4.99903528695427e-02, 4.57775182754716e-02, 4.20106590797360e-02, 3.86589700518627e-02,\n                                                3.56899528120209e-02, 3.30707043337526e-02, 3.07689100325632e-02, 2.87535642999970e-02, 2.69954532809180e-02,\n                                                2.54674401016786e-02, 2.41445933367288e-02, 2.30041968819492e-02, 2.20256749599699e-02, 2.11904607594136e-02,\n                                                2.04818319285920e-02, 1.98847312352299e-02, 1.93855863805794e-02, 1.89721392674969e-02, 1.86332919218231e-02,\n                                                1.83589736573069e-02, 1.81400318536404e-02, 1.79681467954822e-02, 1.78357693454672e-02, 1.77360787789524e-02,\n                                                1.76629569152169e-02, 1.76109737830146e-02, 1.75753795151437e-02, 1.75520970222252e-02, 1.75377102695293e-02,\n                                                1.75294436548867e-02, 1.75251289954943e-02, 1.75231578792747e-02, 1.75224184919998e-02, 1.75222173651264e-02,\n                                                1.75221876793827e-02, 1.75221846171851e-02, 1.75221196137159e-02, 1.75216792113702e-02, 1.75200603305399e-02,\n                                                1.75157456400257e-02, 1.75063063500360e-02, 1.74882416377358e-02, 1.74568665245758e-02, 1.74062620888691e-02,\n                                                1.73293038690829e-02, 1.72177854030195e-02, 1.70626530256754e-02, 1.68543641889372e-02, 1.65833736591665e-02,\n                                                1.62407394265927e-02, 1.58188232654908e-02, 1.53120410232574e-02, 1.47175976538847e-02, 1.40361257564834e-02,\n                                                1.32721386238259e-02, 1.24342139145597e-02, 1.15348447177581e-02, 1.05899306791670e-02, 9.61792891175151e-03,\n                                                8.63873491846334e-03, 7.67240779747880e-03, 6.73788182292157e-03, 5.85181120372624e-03, 5.02767447882491e-03,\n                                                4.27522336209307e-03, 3.60030651373222e-03, 3.00504306133575e-03, 2.48827515829930e-03, 2.04620213428797e-03,\n                                                1.67309431691365e-03, 1.36199925921687e-03, 1.10537815447742e-03, 8.95635261755956e-04, 7.25521676550045e-04,\n                                                5.88407346839404e-04, 4.78427183537633e-04, 3.90521633079288e-04, 3.20405222367981e-04, 2.64499996283973e-04,\n                                                2.19860496393665e-04, 1.84099372440016e-04, 1.55310382652374e-04, 1.31985841520077e-04, 1.12934209369087e-04,\n                                                9.72094758324715e-05, 8.40605831200492e-05, 7.28994947394312e-05, 6.32790460883825e-05, 5.48715747541451e-05,\n                                                4.74447247782450e-05, 4.08363645831855e-05, 3.49326030644193e-05, 2.96515121007701e-05, 2.49326041696918e-05,\n                                                2.07303718866569e-05, 1.70099092571263e-05, 1.37433173037493e-05, 1.09064611137910e-05, 8.47618636612424e-06,\n                                                6.42823423646632e-06, 4.73597329886388e-06, 3.36989112525998e-06, 2.29767257309277e-06, 1.48466221361332e-06,\n                                                8.94540882256933e-07, 4.90104923756007e-07, 1.42108547152020e-14, 2.84217094304040e-14, 2.13162820728030e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {6.50000000000000e+01, 6.49999997265766e+01, 6.49999912717835e+01, 6.49999339891646e+01, 6.49997234099233e+01,\n                                                6.49991620655125e+01, 6.49979334884035e+01, 6.49955802770993e+01, 6.49914869634574e+01, 6.49848682446164e+01,\n                                                6.49747629525989e+01, 6.49600339535748e+01, 6.49393740239640e+01, 6.49113176733291e+01, 6.48742589010640e+01,\n                                                6.48264749952141e+01, 6.47661566855566e+01, 6.46914451824593e+01, 6.46004767520349e+01, 6.44914353453715e+01,\n                                                6.43626132657532e+01, 6.42124788340511e+01, 6.40397485366928e+01, 6.38434594245129e+01, 6.36230359582754e+01,\n                                                6.33783445526436e+01, 6.31097292036347e+01, 6.28180230415169e+01, 6.25045333420506e+01, 6.21710009909530e+01,\n                                                6.18195388864376e+01, 6.14525564658031e+01, 6.10726788143279e+01, 6.06826683969789e+01, 6.02853555403608e+01,\n                                                5.98835809608384e+01, 5.94801506536404e+01, 5.90778010548165e+01, 5.86791710545859e+01, 5.82867773271031e+01,\n                                                5.79029903577574e+01, 5.75300100539066e+01, 5.71698413741405e+01, 5.68242715246153e+01, 5.64948506759499e+01,\n                                                5.61828778548353e+01, 5.58893929045189e+01, 5.56151745395274e+01, 5.53607438439555e+01, 5.51263722263201e+01,\n                                                5.49120928298159e+01, 5.47177145865528e+01, 5.45428383611470e+01, 5.43868748530735e+01, 5.42490640719571e+01,\n                                                5.41284962611965e+01, 5.40241341408942e+01, 5.39348362946726e+01, 5.38593814570043e+01, 5.37964933827189e+01,\n                                                5.37448659077309e+01, 5.37031877458481e+01, 5.36701665151718e+01, 5.36445514528247e+01, 5.36251542619290e+01,\n                                                5.36108675428036e+01, 5.36006802933668e+01, 5.35936900225097e+01, 5.35891111039951e+01, 5.35862791046544e+01,\n                                                5.35846509449906e+01, 5.35838008869415e+01, 5.35834124856635e+01, 5.35832667824926e+01, 5.35832271476556e+01,\n                                                5.35832212976352e+01, 5.35832204968499e+01, 5.35832015850131e+01, 5.35830734547259e+01, 5.35826024370766e+01,\n                                                5.35813468987768e+01, 5.35785992946146e+01, 5.35733377279771e+01, 5.35641891454892e+01, 5.35494061602133e+01,\n                                                5.35268593316566e+01, 5.34940464981009e+01, 5.34481204157632e+01, 5.33859354647211e+01, 5.33041134940899e+01,\n                                                5.31991279782268e+01, 5.30674045559343e+01, 5.29054347910292e+01, 5.27098987544391e+01, 5.24777909782721e+01,\n                                                5.22065437003340e+01, 5.18941412975391e+01, 5.15392204439913e+01, 5.11411516116699e+01, 5.07000985881013e+01,\n                                                5.02170532012765e+01, 4.96938422540130e+01, 4.91331032847610e+01, 4.85382262588161e+01, 4.79132606542260e+01,\n                                                4.72627917793858e+01, 4.65917954470784e+01, 4.59054843721862e+01, 4.52091609694807e+01, 4.45080887522412e+01,\n                                                4.38073889371349e+01, 4.31119621037001e+01, 4.24264292854627e+01, 4.17550845953607e+01, 4.11018529562789e+01,\n                                                4.04702506222839e+01, 3.98633506754986e+01, 3.92837582624041e+01, 3.87335998804920e+01, 3.82145281802446e+01,\n                                                3.77277403290938e+01, 3.72740057322637e+01, 3.68536985071646e+01, 3.64668311410960e+01, 3.61130873190082e+01,\n                                                3.57918532460262e+01, 3.55022475979072e+01, 3.52431505514094e+01, 3.50132323619844e+01, 3.48109818461888e+01,\n                                                3.46347349986890e+01, 3.44827038693884e+01, 3.43530057449770e+01, 3.42436926057100e+01, 3.41527807475155e+01,\n                                                3.40782803639250e+01, 3.40182247724055e+01, 3.39706988527568e+01, 3.39338661528280e+01, 3.39059940221779e+01,\n                                                3.38854760703252e+01, 3.38708512236148e+01, 3.38608186806682e+01, 3.38542481436583e+01, 3.38501848291942e+01,\n                                                3.38478489317002e+01, 3.38466294131047e+01, 3.38460722119295e+01, 3.38458631876552e+01, 3.38458063280905e+01,\n                                                3.38457979357417e+01, 3.38457971390765e+01, 3.38457808969655e+01, 3.38456708544644e+01, 3.38452663294454e+01,\n                                                3.38441880362023e+01, 3.38418283291192e+01, 3.38373096342323e+01, 3.38294529202265e+01, 3.38167579630123e+01,\n                                                3.37973970340897e+01, 3.37692234645421e+01, 3.37297962680458e+01, 3.36764216098292e+01, 3.36062113513527e+01,\n                                                3.35161581640780e+01, 3.34032257948763e+01, 3.32644520162022e+01, 3.30970606762157e+01, 3.28985781784214e+01,\n                                                3.26669487865352e+01, 3.24006424867991e+01, 3.20987488433031e+01, 3.17610504130269e+01, 3.13880698760456e+01,\n                                                3.09810861048948e+01, 3.05421159882200e+01, 3.00738610017500e+01, 2.95796203132264e+01, 2.90631754972128e+01,\n                                                2.85286553352657e+01, 2.79803920085633e+01, 2.74227814189592e+01, 2.68601597010742e+01, 2.62967049848508e+01,\n                                                2.57363685937186e+01, 2.51828342271983e+01, 2.46394987358613e+01, 2.41094651961521e+01, 2.35955389138312e+01,\n                                                2.31002196529231e+01, 2.26256878329040e+01, 2.21737870572830e+01, 2.17460084437620e+01, 2.13434827458610e+01,\n                                                2.09669842492112e+01, 2.06169470575768e+01, 2.02934912654380e+01, 1.99964548285317e+01, 1.97254269488506e+01,\n                                                1.94797799558848e+01, 1.92586981899723e+01, 1.90612036648021e+01, 1.88861790522331e+01, 1.87323888259813e+01,\n                                                1.85984993798744e+01, 1.84830987628674e+01, 1.83847164571693e+01, 1.83018434223913e+01, 1.82329524542892e+01,\n                                                1.81765187594742e+01, 1.81310405206778e+01, 1.80950591162540e+01, 1.80671785625341e+01, 1.80460836722972e+01,\n                                                1.80305563730682e+01, 1.80194896115391e+01, 1.80118982900126e+01, 1.80069267395213e+01, 1.80038523308870e+01,\n                                                1.80020849545902e+01, 1.80011622548692e+01, 1.80007406725913e+01, 1.80005825236317e+01, 1.80005395033847e+01,\n                                                1.80005331536901e+01, 1.80005325886126e+01, 1.80005214649956e+01, 1.80004461009805e+01, 1.80001690567893e+01,\n                                                1.79994305732915e+01, 1.79978144942940e+01, 1.79947197934831e+01, 1.79893389706442e+01, 1.79806445129312e+01,\n                                                1.79673845293707e+01, 1.79480885412977e+01, 1.79210842234155e+01, 1.78845256134748e+01, 1.78364329208464e+01,\n                                                1.77747435538689e+01, 1.76973733592271e+01, 1.76022863549433e+01, 1.74875705015508e+01, 1.73515163798398e+01,\n                                                1.71926951301171e+01, 1.70100317533858e+01, 1.68028699394994e+01, 1.65710249645818e+01, 1.63148218007758e+01,\n                                                1.60351162526123e+01, 1.57332975211536e+01, 1.54112710323358e+01, 1.50714207392641e+01, 1.47165506575209e+01,\n                                                1.43498063926793e+01, 1.39745790088121e+01, 1.35943956286558e+01, 1.32128032222718e+01, 1.28332535473917e+01,\n                                                1.24589976350512e+01, 1.20929973265561e+01, 1.17378592890624e+01, 1.13957941130768e+01, 1.10686001323562e+01,\n                                                1.07576690785838e+01, 1.04640089788219e+01, 1.01882789608417e+01, 9.93083075759531e+00, 9.69175245441382e+00,\n                                                9.47091110533294e+00, 9.26799199163789e+00, 9.08253331669866e+00, 8.91395592673496e+00, 8.76158819440246e+00,\n                                                8.62468652918917e+00, 8.50245213783420e+00, 8.39404470480741e+00, 8.29859364357027e+00, 8.21520751622738e+00,\n                                                8.14298215129273e+00, 8.08100791554400e+00, 8.02837651897319e+00, 7.98418765138526e+00, 7.94755566442210e+00,\n                                                7.91761642371414e+00, 7.89353436403164e+00, 7.87450968888541e+00, 7.85978556958674e+00, 7.84865512280515e+00,\n                                                7.84046788591500e+00, 7.83463547116396e+00, 7.83063606694397e+00, 7.82801746927724e+00, 7.82639836874419e+00,\n                                                7.82546768460681e+00, 7.82498182360793e+00, 7.82475983883614e+00, 7.82467656616170e+00, 7.82465391411463e+00,\n                                                7.82465057072499e+00, 7.82465027515223e+00, 7.82464447884883e+00, 7.82460520816768e+00, 7.82446084689398e+00,\n                                                7.82407604736864e+00, 7.82323399724069e+00, 7.82162165486955e+00, 7.81881866750531e+00, 7.81429068169764e+00,\n                                                7.80738774228537e+00, 7.79734843754904e+00, 7.78331036165082e+00, 7.76432730760133e+00, 7.73939335362076e+00,\n                                                7.70747365005697e+00, 7.66754125443773e+00, 7.61861881999191e+00, 7.55982336241606e+00, 7.49041177752919e+00,\n                                                7.40982434166999e+00, 7.31772318397388e+00, 7.21402274839987e+00, 7.09890960508213e+00, 6.97284962059759e+00,\n                                                6.83658139982318e+00, 6.69109597152256e+00, 6.53760378851374e+00, 6.37749113831215e+00, 6.21226891917757e+00,\n                                                6.04351735703719e+00, 5.87283055390965e+00, 5.70176469727307e+00, 5.53179326464726e+00, 5.36427163265709e+00,\n                                                5.20041226187288e+00, 5.04127031232536e+00, 4.88773843437061e+00, 4.74054879773785e+00, 4.60028023878943e+00,\n                                                4.46736863041385e+00, 4.34211902239912e+00, 4.22471857214498e+00, 4.11524966104872e+00, 4.01370282902305e+00,\n                                                3.91998927866905e+00, 3.83395274893608e+00, 3.75538058120124e+00, 3.68401382798088e+00, 3.61955629727570e+00,\n                                                3.56168248212344e+00, 3.51004438716584e+00, 3.46427732275840e+00, 3.42400478520594e+00, 3.38884257498652e+00,\n                                                3.35840232204190e+00, 3.33229458909073e+00, 3.31013171235371e+00, 3.29153051647262e+00, 3.27611500929844e+00,\n                                                3.26351912515708e+00, 3.25338954470946e+00, 3.24538857820144e+00, 3.23919705942465e+00, 3.23451716280663e+00,\n                                                3.23107502834078e+00, 3.22862306086018e+00, 3.22694176317444e+00, 3.22584096770311e+00, 3.22516034829520e+00,\n                                                3.22476912167056e+00, 3.22456488408312e+00, 3.22447157034503e+00, 3.22443656580399e+00, 3.22442704378274e+00,\n                                                3.22442563835462e+00, 3.22442551218676e+00, 3.22442301625540e+00, 3.22440610601306e+00, 3.22434394306848e+00,\n                                                3.22417824635667e+00, 3.22381565804029e+00, 3.22312139168863e+00, 3.22191447477266e+00, 3.21996489806555e+00,\n                                                3.21699298158114e+00, 3.21267125219870e+00, 3.20662909188174e+00, 3.19846034634746e+00, 3.18773397230608e+00,\n                                                3.17400764079473e+00, 3.15684400498000e+00, 3.13582909239800e+00, 3.11059201383141e+00, 3.08082492426462e+00,\n                                                3.04630196399273e+00, 3.00689579134782e+00, 2.96259032975919e+00, 2.91348851566907e+00, 2.85981415496717e+00,\n                                                2.80190745416750e+00, 2.74021434324636e+00, 2.67527028356818e+00, 2.60767977837925e+00, 2.53809319753950e+00,\n                                                2.46718273047399e+00, 2.39561925859181e+00, 2.32405169539273e+00, 2.25308992335092e+00, 2.18329193736459e+00,\n                                                2.11515527678888e+00, 2.04911237888027e+00, 1.98552917920103e+00, 1.92470614650645e+00, 1.86688096000467e+00,\n                                                1.81223217417456e+00, 1.76088341273493e+00, 1.71290783090537e+00, 1.66833273929598e+00, 1.62714437058189e+00,\n                                                1.58929279116322e+00, 1.55469693165195e+00, 1.52324965873630e+00, 1.49482276293320e+00, 1.46927171056192e+00,\n                                                1.44644001162116e+00, 1.42616308552772e+00, 1.40827155451645e+00, 1.39259394821323e+00, 1.37895885213677e+00,\n                                                1.36719657074011e+00, 1.35714039900436e+00, 1.34862760563562e+00, 1.34150022767404e+00, 1.33560576377171e+00,\n                                                1.33079783460227e+00, 1.32693685657615e+00, 1.32389075156172e+00, 1.32153569254640e+00, 1.31975686470016e+00,\n                                                1.31844920444675e+00, 1.31751806697662e+00, 1.31687976591237e+00, 1.31646192793748e+00, 1.31620361002874e+00,\n                                                1.31605513691143e+00, 1.31597763043433e+00, 1.31594221933846e+00, 1.31592893577847e+00, 1.31592532236250e+00,\n                                                1.31592478903111e+00, 1.31592473986749e+00, 1.31592375296295e+00, 1.31591706657344e+00, 1.31589248720666e+00,\n                                                1.31582697154425e+00, 1.31568361193372e+00, 1.31540913704399e+00, 1.31493206039782e+00, 1.31416161501693e+00,\n                                                1.31298761682622e+00, 1.31128139842474e+00, 1.30889794280922e+00, 1.30567931761740e+00, 1.30145945892785e+00,\n                                                1.29607027583616e+00, 1.28934894224360e+00, 1.28114611421655e+00, 1.27133466886455e+00, 1.25981841849622e+00,\n                                                1.24654013152079e+00, 1.23148811261627e+00, 1.21470058409460e+00, 1.19626719160360e+00, 1.17632714774514e+00,\n                                                1.15506383190903e+00, 1.13269606781089e+00, 1.10946675637478e+00, 1.08562997153482e+00, 1.06143792627403e+00,\n                                                1.03712928458606e+00, 1.01292007568205e+00, 9.88997985804616e-01, 9.65520176592293e-01, 9.42614176796681e-01,\n                                                9.20380972965077e-01, 8.98899267169114e-01, 8.78229962586488e-01, 8.58420194666891e-01, 8.39506536429752e-01,\n                                                8.21517280778622e-01, 8.04473892018720e-01, 7.88391815069772e-01, 7.73280852447314e-01, 7.59145294024165e-01,\n                                                7.45983938974547e-01, 7.33790101637538e-01, 7.22551653417526e-01, 7.12251124758367e-01, 7.02865874077006e-01,\n                                                6.94368321832926e-01, 6.86726244747874e-01, 6.79903125104218e-01, 6.73858551230936e-01, 6.68548666597218e-01,\n                                                6.63926665743404e-01, 6.59943335309123e-01, 6.56547637611681e-01, 6.53687332644495e-01, 6.51309632149989e-01,\n                                                6.49361876751740e-01, 6.47792224229008e-01, 6.46550334127141e-01, 6.45588031292050e-01, 6.44859928870659e-01,\n                                                6.44323990098670e-01, 6.43942008026485e-01, 6.43679983370134e-01, 6.43508382983242e-01, 6.43402264980026e-01,\n                                                6.43341261142268e-01, 6.43309412649373e-01, 6.43294861040047e-01, 6.43289402266234e-01, 6.43287917350918e-01,\n                                                6.43287698180657e-01, 6.43287677293969e-01, 6.43287250606221e-01, 6.43284359739781e-01, 6.43273732695079e-01,\n                                                6.43245405557678e-01, 6.43183415669199e-01, 6.43064710483642e-01, 6.42858321411055e-01, 6.42524849737143e-01,\n                                                6.42016308749959e-01, 6.41276361612242e-01, 6.40240987135314e-01, 6.38839594197009e-01, 6.36996589014544e-01,\n                                                6.34633377248704e-01, 6.31670755241331e-01, 6.28031613024902e-01, 6.23643838882117e-01, 6.18443285218405e-01,\n                                                6.12376633161787e-01, 6.05403983404685e-01, 5.97501007051250e-01, 5.88660514222980e-01, 5.78893338680160e-01,\n                                                5.68228489559431e-01, 5.56712579868602e-01, 5.44408597607742e-01, 5.31394131344300e-01, 5.17759191414910e-01,\n                                                5.03603777276993e-01, 4.89035331354728e-01, 4.74166194390548e-01, 4.59111144175068e-01, 4.43985067049326e-01,\n                                                4.28900787021107e-01, 4.13967064787229e-01, 3.99286778333163e-01, 3.84955304315255e-01, 3.71059129268986e-01,\n                                                3.57674726021358e-01, 3.44867729588216e-01, 3.32692437171133e-01, 3.21191640209122e-01, 3.10396776155613e-01,\n                                                3.00328367703401e-01, 2.90996700998846e-01, 2.82402684186451e-01, 2.74538824175153e-01, 2.67390262322564e-01,\n                                                2.60935817432241e-01, 2.55148995286291e-01, 2.49998936106962e-01, 2.45451283323703e-01, 2.41468967665980e-01,\n                                                2.38012909162791e-01, 2.35042645742695e-01, 2.32516900714685e-01, 2.30394102629646e-01, 2.28632870173669e-01,\n                                                2.27192472238357e-01, 2.26033269617446e-01, 2.25117140392854e-01, 2.24407886504764e-01, 2.23871614730356e-01,\n                                                2.23477081759455e-01, 2.23195990599933e-01, 2.23003224414313e-01, 2.22877004191602e-01, 2.22798958365146e-01,\n                                                2.22754095438020e-01, 2.22730674592867e-01, 2.22719973791115e-01, 2.22715959611747e-01, 2.22714867663370e-01,\n                                                2.22714706494287e-01, 2.22714690542148e-01, 2.22714358439646e-01, 2.22712108404579e-01, 2.22703837160566e-01,\n                                                2.22681790004970e-01, 2.22633545135110e-01, 2.22541168796013e-01, 2.22380583015038e-01, 2.22121187936906e-01,\n                                                2.21725780639375e-01, 2.21150810785090e-01, 2.20347009280374e-01, 2.19260417915734e-01, 2.17833834542986e-01,\n                                                2.16008668894631e-01, 2.13727178528984e-01, 2.10935023344476e-01, 2.07584042447323e-01, 2.03635121755681e-01,\n                                                1.99060988401527e-01, 1.93848743237893e-01, 1.88001930272151e-01, 1.81541945970110e-01, 1.74508615422127e-01,\n                                                1.66959807875486e-01, 1.58970030151281e-01, 1.50628018862420e-01, 1.42033443568295e-01, 1.33292922345134e-01,\n                                                1.24515626120342e-01, 1.15808796167869e-01, 1.07273511040205e-01, 9.90010111325716e-02, 9.10698243028207e-02,\n                                                8.35438445411540e-02, 7.64714123134240e-02, 6.98853459288387e-02, 6.38037919742089e-02, 5.82317085383721e-02,\n                                                5.31627706974405e-02, 4.85814911146605e-02, 4.44653733179905e-02, 4.07869531367879e-02, 3.75156269049484e-02,\n                                                3.46192068248570e-02, 3.20651798813714e-02, 2.98216745996314e-02, 2.78581592392726e-02, 2.61459064649046e-02,\n                                                2.46582645751801e-02, 2.33707757092674e-02, 2.22611786891349e-02, 2.13093296527518e-02, 2.04970684091990e-02,\n                                                1.98080532016291e-02, 1.92275817143184e-02, 1.87424119060609e-02, 1.83405926371876e-02, 1.80113110278910e-02,\n                                                1.77447609459733e-02, 1.75320348647006e-02, 1.73650394696381e-02, 1.72364337714299e-02, 1.71395870833635e-02,\n                                                1.70685530680004e-02, 1.70180551900074e-02, 1.69834783872602e-02, 1.69608616338905e-02, 1.69468863381468e-02,\n                                                1.69388561746757e-02, 1.69346649363433e-02, 1.69327502058962e-02, 1.69320319698585e-02, 1.69318365965268e-02,\n                                                1.69318077599740e-02, 1.69318047853864e-02, 1.69317416414572e-02, 1.69313138375884e-02, 1.69297412682141e-02,\n                                                1.69255500122745e-02, 1.69163807810264e-02, 1.68988329768638e-02, 1.68683558749478e-02, 1.68192004598495e-02,\n                                                1.67444473819813e-02, 1.66361275641833e-02, 1.64854511861563e-02, 1.62831569954989e-02, 1.60199861567065e-02,\n                                                1.56872725943487e-02, 1.52776252602109e-02, 1.47856583376722e-02, 1.42087058093097e-02, 1.35474409889014e-02,\n                                                1.28063141580412e-02, 1.19937266126584e-02, 1.11218798206778e-02, 1.02062736759052e-02, 9.26487394136188e-03,\n                                                8.31701831290843e-03, 7.38217336221680e-03, 6.47868140282526e-03, 5.62264038697435e-03, 4.82703951054475e-03,\n                                                4.10123210335200e-03, 3.45077415593664e-03, 2.87760264721726e-03, 2.38048378830058e-03, 1.95563568352952e-03,\n                                                1.59742592069279e-03, 1.29905910890216e-03, 1.05319395441938e-03, 8.52454133408287e-04, 6.89815653998949e-04,\n                                                5.58865954417342e-04, 4.53941514550138e-04, 3.70164272212037e-04, 3.03409127440091e-04, 2.50237722212887e-04,\n                                                2.07823947491192e-04, 1.73880185471376e-04, 1.46581675153357e-04, 1.24486448186190e-04, 1.06456086072626e-04,\n                                                9.15879656133711e-05, 7.91665064951985e-05, 6.86320564966536e-05, 5.95591760230718e-05, 5.16359542217515e-05,\n                                                4.46409567160799e-05, 3.84195195834991e-05, 3.28630078882952e-05, 2.78934113708829e-05, 2.34533094243261e-05,\n                                                1.94996424767169e-05, 1.59994630877236e-05, 1.29264677468655e-05, 1.02579027156935e-05, 7.97193325752232e-06,\n                                                6.04568516848758e-06, 4.45405908067187e-06, 3.16925721222105e-06, 2.16085837223545e-06, 1.39625143447120e-06,\n                                                8.41269013562851e-07, 4.60917391365001e-07, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {6.60000000000000e+01, 6.59999997203523e+01, 6.59999910730918e+01, 6.59999324864732e+01, 6.59997171135303e+01,\n                                                6.59991429904006e+01, 6.59978864449935e+01, 6.59954796619321e+01, 6.59912931581091e+01, 6.59845237432171e+01,\n                                                6.59741883460802e+01, 6.59591239028835e+01, 6.59379933566888e+01, 6.59092977413525e+01, 6.58713943447069e+01,\n                                                6.58225210755709e+01, 6.57608273733580e+01, 6.56844122270486e+01, 6.55913699900917e+01, 6.54798445309750e+01,\n                                                6.53480916905528e+01, 6.51945489368359e+01, 6.50179095603690e+01, 6.48171969662585e+01, 6.45918329995452e+01,\n                                                6.43416932980007e+01, 6.40671428651135e+01, 6.37690466408361e+01, 6.34487527056372e+01, 6.31080493802673e+01,\n                                                6.27491010887815e+01, 6.23743705813796e+01, 6.19865363131807e+01, 6.15884132009844e+01, 6.11828828696877e+01,\n                                                6.07728364847979e+01, 6.03611301655799e+01, 5.99505505427832e+01, 5.95437867607075e+01, 5.91434052533502e+01,\n                                                5.87518247159304e+01, 5.83712903534058e+01, 5.80038481251696e+01, 5.76513208134025e+01, 5.73152880556184e+01,\n                                                5.69970720439113e+01, 5.66977297036176e+01, 5.64180512192604e+01, 5.61585640917555e+01, 5.59195416182501e+01,\n                                                5.57010147353380e+01, 5.55027864113797e+01, 5.53244480634052e+01, 5.51653977084894e+01, 5.50248596992761e+01,\n                                                5.49019059426556e+01, 5.47954784835710e+01, 5.47044132793373e+01, 5.46274649149572e+01, 5.45633319308249e+01,\n                                                5.45106823594652e+01, 5.44681790028719e+01, 5.44345039304611e+01, 5.44083816430845e+01, 5.43886003342285e+01,\n                                                5.43740306883675e+01, 5.43636416905671e+01, 5.43565129817100e+01, 5.43518433793739e+01, 5.43489552928484e+01,\n                                                5.43472948876445e+01, 5.43464279942334e+01, 5.43460319006746e+01, 5.43458833118532e+01, 5.43458428920482e+01,\n                                                5.43458369261681e+01, 5.43458361095234e+01, 5.43458168231376e+01, 5.43456861552294e+01, 5.43452058090672e+01,\n                                                5.43439254047607e+01, 5.43411233838979e+01, 5.43357576102232e+01, 5.43264278341183e+01, 5.43113520541820e+01,\n                                                5.42883586393934e+01, 5.42548958376007e+01, 5.42080599478744e+01, 5.41446429295595e+01, 5.40611995200358e+01,\n                                                5.39541330164291e+01, 5.38197977600008e+01, 5.36546151144606e+01, 5.34551984842358e+01, 5.32184818707220e+01,\n                                                5.29418458380070e+01, 5.26232347328584e+01, 5.22612595975356e+01, 5.18552821965352e+01, 5.14054764917542e+01,\n                                                5.09128642945658e+01, 5.03793216379415e+01, 4.98075522376294e+01, 4.92010253102019e+01, 4.85638778613131e+01,\n                                                4.79007862875667e+01, 4.72168174729781e+01, 4.65172734758126e+01, 4.58075445843525e+01, 4.50929823260156e+01,\n                                                4.43787978749522e+01, 4.36699844103867e+01, 4.29712568868193e+01, 4.22870012113932e+01, 4.16212272316004e+01,\n                                                4.09775246971123e+01, 4.03590258567697e+01, 3.97683802380514e+01, 3.92077456815853e+01, 3.86787960670726e+01,\n                                                3.81827425665878e+01, 3.77203633938556e+01, 3.72920372218630e+01, 3.68977769415631e+01, 3.65372621751427e+01,\n                                                3.62098702457340e+01, 3.59147059609432e+01, 3.56506307367553e+01, 3.54162915063234e+01, 3.52101497059833e+01,\n                                                3.50305104992209e+01, 3.48755523093569e+01, 3.47433566693246e+01, 3.46319383393384e+01, 3.45392755730244e+01,\n                                                3.44633403221886e+01, 3.44021280617622e+01, 3.43536867983605e+01, 3.43161447111528e+01, 3.42877357765814e+01,\n                                                3.42668226624270e+01, 3.42519161529113e+01, 3.42416903923710e+01, 3.42349933133577e+01, 3.42308517437164e+01,\n                                                3.42284708593611e+01, 3.42272278541779e+01, 3.42266599219255e+01, 3.42264468720762e+01, 3.42263889174596e+01,\n                                                3.42263803634835e+01, 3.42263795514754e+01, 3.42263629965595e+01, 3.42262508347625e+01, 3.42258385190437e+01,\n                                                3.42247394590860e+01, 3.42223343067425e+01, 3.42177285871237e+01, 3.42097205626051e+01, 3.41967811178185e+01,\n                                                3.41770473274882e+01, 3.41483311873707e+01, 3.41081447152858e+01, 3.40537422256783e+01, 3.39821800139637e+01,\n                                                3.38903929369823e+01, 3.37752864475753e+01, 3.36338415700155e+01, 3.34632291584877e+01, 3.32609286636509e+01,\n                                                3.30248456624315e+01, 3.27534217046431e+01, 3.24457296998648e+01, 3.21015481831325e+01, 3.17214084080022e+01,\n                                                3.13066093653605e+01, 3.08591975739732e+01, 3.03819108911298e+01, 2.98780886352472e+01, 2.93515537987969e+01,\n                                                2.88064765793871e+01, 2.82472311165492e+01, 2.76782583425769e+01, 2.71039466081403e+01, 2.65285381475222e+01,\n                                                2.59560641506158e+01, 2.53903054896344e+01, 2.48347715650958e+01, 2.42926876202095e+01, 2.37669818557862e+01,\n                                                2.32602673923806e+01, 2.27748192146915e+01, 2.23125507414675e+01, 2.18749968073352e+01, 2.14633088679680e+01,\n                                                2.10782648629175e+01, 2.07202921760036e+01, 2.03894993205101e+01, 2.00857112024744e+01, 1.98085037854996e+01,\n                                                1.95572357579721e+01, 1.93310764913057e+01, 1.91290306994422e+01, 1.89499607101106e+01, 1.87926073118276e+01,\n                                                1.86556099647086e+01, 1.85375269189734e+01, 1.84368555568970e+01, 1.83520530884437e+01, 1.82815575839849e+01,\n                                                1.82238092057898e+01, 1.81772713918809e+01, 1.81404516461815e+01, 1.81119214989603e+01, 1.80903351272514e+01,\n                                                1.80744460742168e+01, 1.80631214872033e+01, 1.80553533124571e+01, 1.80502659428441e+01, 1.80471199124249e+01,\n                                                1.80453113634094e+01, 1.80443671686022e+01, 1.80439357652211e+01, 1.80437739320556e+01, 1.80437299096179e+01,\n                                                1.80437234120022e+01, 1.80437228337608e+01, 1.80437114510104e+01, 1.80436343313315e+01, 1.80433508331823e+01,\n                                                1.80425951461683e+01, 1.80409414195567e+01, 1.80377746261972e+01, 1.80322684561899e+01, 1.80233714644267e+01,\n                                                1.80098026069947e+01, 1.79900571739876e+01, 1.79624239357284e+01, 1.79250140395296e+01, 1.78758018026832e+01,\n                                                1.78126770330198e+01, 1.77335078777947e+01, 1.76362124858851e+01, 1.75188370256413e+01, 1.73796369138839e+01,\n                                                1.72171575758407e+01, 1.70303107583397e+01, 1.68184424108392e+01, 1.65813884223529e+01, 1.63195149815382e+01,\n                                                1.60337408945311e+01, 1.57255397496365e+01, 1.53969203470305e+01, 1.50503844311936e+01, 1.46888616847206e+01,\n                                                1.43156233546981e+01, 1.39341778083199e+01, 1.35481535093871e+01, 1.31611768901684e+01, 1.27767537980635e+01,\n                                                1.23981631890269e+01, 1.20283703916921e+01, 1.16699648128077e+01, 1.13251239140856e+01, 1.09956022904070e+01,\n                                                1.06827422667731e+01, 1.03875009384000e+01, 1.01104880768572e+01, 9.85200966710386e+00, 9.61211274832785e+00,\n                                                9.39062839885909e+00, 9.18721087299073e+00, 9.00137189400115e+00, 8.83250985446030e+00, 8.67993416737407e+00,\n                                                8.54288529040355e+00, 8.42055106867267e+00, 8.31208006605167e+00, 8.21659252442547e+00, 8.13318953426337e+00,\n                                                8.06096093343105e+00, 7.99899238088747e+00, 7.94637197862890e+00, 7.90219673782383e+00, 7.86557910240099e+00,\n                                                7.83565365547141e+00, 7.81158404260732e+00, 7.79257005455069e+00, 7.77785472513773e+00, 7.76673122374083e+00,\n                                                7.75854926120547e+00, 7.75272068944946e+00, 7.74872396166595e+00, 7.74610713456141e+00, 7.74448913597895e+00,\n                                                7.74355908774968e+00, 7.74307355944699e+00, 7.74285172684547e+00, 7.74276851128101e+00, 7.74274587477166e+00,\n                                                7.74274253367545e+00, 7.74274223830541e+00, 7.74273644597810e+00, 7.74269720223720e+00, 7.74255294002527e+00,\n                                                7.74216840476591e+00, 7.74132693401078e+00, 7.73971570516584e+00, 7.73691466661101e+00, 7.73238986379646e+00,\n                                                7.72549185977972e+00, 7.71545991169051e+00, 7.70143247847272e+00, 7.68246447690735e+00, 7.65755145101893e+00,\n                                                7.62566046148764e+00, 7.58576703806888e+00, 7.53689699073429e+00, 7.47817128913027e+00, 7.40885166247889e+00,\n                                                7.32838412699270e+00, 7.23643740285767e+00, 7.13293321215402e+00, 7.01806579538684e+00, 6.89230864452215e+00,\n                                                6.75640737143954e+00, 6.61135871767755e+00, 6.45837684660676e+00, 6.29884912383056e+00, 6.13428447958375e+00,\n                                                5.96625806586002e+00, 5.79635618645614e+00, 5.62612531727300e+00, 5.45702841394292e+00, 5.29041067611142e+00,\n                                                5.12747566890840e+00, 4.96927144871260e+00, 4.81668536444202e+00, 4.67044567334187e+00, 4.53112803352260e+00,\n                                                4.39916519091544e+00, 4.27485858298343e+00, 4.15839097552028e+00, 4.04983954249969e+00, 3.94918897523839e+00,\n                                                3.85634429562646e+00, 3.77114309293721e+00, 3.69336694095988e+00, 3.62275180127817e+00, 3.55899728319010e+00,\n                                                3.50177470497181e+00, 3.45073397527626e+00, 3.40550937855941e+00, 3.36572439859188e+00, 3.33099574668570e+00,\n                                                3.30093677624834e+00, 3.27516046437504e+00, 3.25328212693264e+00, 3.23492200872332e+00, 3.21970785751741e+00,\n                                                3.20727755254070e+00, 3.19728181684354e+00, 3.18938700133910e+00, 3.18327788873276e+00, 3.17866043068130e+00,\n                                                3.17526430385613e+00, 3.17284515238190e+00, 3.17118637706213e+00, 3.17010033675043e+00, 3.16942884402676e+00,\n                                                3.16904286475413e+00, 3.16884136687752e+00, 3.16874930496335e+00, 3.16871477002914e+00, 3.16870537575275e+00,\n                                                3.16870398917952e+00, 3.16870386470428e+00, 3.16870140225779e+00, 3.16868471888039e+00, 3.16862338991799e+00,\n                                                3.16845991631634e+00, 3.16810219332299e+00, 3.16741724503256e+00, 3.16622653350520e+00, 3.16430315222039e+00,\n                                                3.16137121120416e+00, 3.15710770724047e+00, 3.15114713688093e+00, 3.14308904139623e+00, 3.13250856144407e+00,\n                                                3.11896991885187e+00, 3.10204253383633e+00, 3.08131923758191e+00, 3.05643577245504e+00, 3.02709051591912e+00,\n                                                2.99306315824224e+00, 2.95423095016599e+00, 2.91058115229278e+00, 2.86221848775148e+00, 2.80936672793330e+00,\n                                                2.75236400649386e+00, 2.69165201202919e+00, 2.62775978607895e+00, 2.56128337003455e+00, 2.49286292394437e+00,\n                                                2.42315912139352e+00, 2.35283057800617e+00, 2.28251380663790e+00, 2.21280675963276e+00, 2.14425649753844e+00,\n                                                2.07735100728419e+00, 2.01251476602125e+00, 1.95010736818729e+00, 1.89042442417959e+00, 1.83369998267226e+00,\n                                                1.78010987946469e+00, 1.72977561419248e+00, 1.68276854498941e+00, 1.63911432858237e+00, 1.59879760047241e+00,\n                                                1.56176689097634e+00, 1.52793972925531e+00, 1.49720782791762e+00, 1.46944219197047e+00, 1.44449797503958e+00,\n                                                1.42221891800678e+00, 1.40244124514798e+00, 1.38499694889651e+00, 1.36971645357677e+00, 1.35643070026985e+00,\n                                                1.34497273296549e+00, 1.33517888809676e+00, 1.32688969639882e+00, 1.31995060054423e+00, 1.31421257757997e+00,\n                                                1.30953273508469e+00, 1.30577492694249e+00, 1.30281041090458e+00, 1.30051854744362e+00, 1.29878751922820e+00,\n                                                1.29751503405045e+00, 1.29660896219677e+00, 1.29598785275299e+00, 1.29558127252049e+00, 1.29532991598894e+00,\n                                                1.29518544459373e+00, 1.29511002726622e+00, 1.29507557069496e+00, 1.29506264520603e+00, 1.29505912919369e+00,\n                                                1.29505861023887e+00, 1.29505856240050e+00, 1.29505760209912e+00, 1.29505109594942e+00, 1.29502717915648e+00,\n                                                1.29496342961991e+00, 1.29482393486508e+00, 1.29455686061037e+00, 1.29409265051504e+00, 1.29334299224466e+00,\n                                                1.29220068948845e+00, 1.29054057866001e+00, 1.28822161721293e+00, 1.28509024182310e+00, 1.28098504362931e+00,\n                                                1.27574273051766e+00, 1.26920524241666e+00, 1.26122775846518e+00, 1.25168719382810e+00, 1.24049064370337e+00,\n                                                1.22758311284116e+00, 1.21295379474394e+00, 1.19664016122292e+00, 1.17872921367125e+00, 1.15935544858952e+00,\n                                                1.13869540357180e+00, 1.11695905514341e+00, 1.09437878482747e+00, 1.07119703109852e+00, 1.04765400006590e+00,\n                                                1.02397682588040e+00, 1.00037131398004e+00, 9.77016909894061e-01, 9.54064937397476e-01, 9.31639604674231e-01,\n                                                9.09840922596615e-01, 8.88748575540916e-01, 8.68425904475274e-01, 8.48923416548928e-01, 8.30281523218900e-01,\n                                                8.12532452035512e-01, 7.95701437479735e-01, 7.79807371590650e-01, 7.64863105145821e-01, 7.50875561406886e-01,\n                                                7.37845780332634e-01, 7.25768967619132e-01, 7.14634588151426e-01, 7.04426519802112e-01, 6.95123269866073e-01,\n                                                6.86698250188854e-01, 6.79120105462488e-01, 6.72353089963309e-01, 6.66357489605460e-01, 6.61090087620124e-01,\n                                                6.56504672949282e-01, 6.52552590367819e-01, 6.49183330417102e-01, 6.46345155534675e-01, 6.43985756454597e-01,\n                                                6.42052930214817e-01, 6.40495268159256e-01, 6.39262839404410e-01, 6.38307852619889e-01, 6.37585276918173e-01,\n                                                6.37053401423344e-01, 6.36674312910699e-01, 6.36414271933063e-01, 6.36243970137400e-01, 6.36138654978495e-01,\n                                                6.36078112598682e-01, 6.36046505000039e-01, 6.36032063450827e-01, 6.36026645963327e-01, 6.36025172278764e-01,\n                                                6.36024954766143e-01, 6.36024934037408e-01, 6.36024510576803e-01, 6.36021641574587e-01, 6.36011094903409e-01,\n                                                6.35982981999561e-01, 6.35921460891325e-01, 6.35803653228521e-01, 6.35598824181969e-01, 6.35267871851852e-01,\n                                                6.34763169856996e-01, 6.34028802196937e-01, 6.33001222156764e-01, 6.31610355738857e-01, 6.29781153793900e-01,\n                                                6.27435575106318e-01, 6.24494955420133e-01, 6.20882686179428e-01, 6.16527094329882e-01, 6.11364384836961e-01,\n                                                6.05341485356263e-01, 5.98418622464820e-01, 5.90571464718337e-01, 5.81792691182613e-01, 5.72092883874049e-01,\n                                                5.61500694662286e-01, 5.50062295081034e-01, 5.37840173172810e-01, 5.24911387000913e-01, 5.11365413447209e-01,\n                                                4.97301740058916e-01, 4.82827337590052e-01, 4.68054126015787e-01, 4.53096514596794e-01, 4.38069065423363e-01,\n                                                4.23084306811944e-01, 4.08250711694564e-01, 3.93670856338915e-01, 3.79439782385589e-01, 3.65643594425549e-01,\n                                                3.52358330536262e-01, 3.39649140703955e-01, 3.27569797064768e-01, 3.16162542213092e-01, 3.05458260960492e-01,\n                                                2.95476940850378e-01, 2.86228370796195e-01, 2.77713017494690e-01, 2.69923016402103e-01, 2.62843217439382e-01,\n                                                2.56452233773402e-01, 2.50723453200209e-01, 2.45625984046328e-01, 2.41125519586731e-01, 2.37185115631632e-01,\n                                                2.33765884447536e-01, 2.30827614210384e-01, 2.28329326689106e-01, 2.26229786995290e-01, 2.24487978319971e-01,\n                                                2.23063552024300e-01, 2.21917259721479e-01, 2.21011369583024e-01, 2.20310064521101e-01, 2.19779815622573e-01,\n                                                2.19389720663131e-01, 2.19111795063355e-01, 2.18921201497366e-01, 2.18796404642362e-01, 2.18719239233209e-01,\n                                                2.18674882500295e-01, 2.18651725946231e-01, 2.18641145904030e-01, 2.18637177026181e-01, 2.18636097400960e-01,\n                                                2.18635938050753e-01, 2.18635922278622e-01, 2.18635593924091e-01, 2.18633369281918e-01, 2.18625191385158e-01,\n                                                2.18603393061230e-01, 2.18555692764397e-01, 2.18464359389756e-01, 2.18305587463732e-01, 2.18049124407557e-01,\n                                                2.17658191498089e-01, 2.17089738689722e-01, 2.16295069343246e-01, 2.15220862773577e-01, 2.13810609166416e-01,\n                                                2.12006452007643e-01, 2.09751407580043e-01, 2.06991900061681e-01, 2.03680516120002e-01, 1.99778847528563e-01,\n                                                1.95260258091679e-01, 1.90112386566241e-01, 1.84339185057453e-01, 1.77962296899111e-01, 1.71021602610821e-01,\n                                                1.63574808637421e-01, 1.55696020127337e-01, 1.47473321711999e-01, 1.39005481351916e-01, 1.30397980983147e-01,\n                                                1.21758651305782e-01, 1.13193234384013e-01, 1.04801207711617e-01, 9.66721736217693e-02, 8.88830520151913e-02,\n                                                8.14962226302214e-02, 7.45586602549224e-02, 6.81020082850239e-02, 6.21434564437067e-02, 5.66872359812436e-02,\n                                                5.17265230294868e-02, 4.72455453517853e-02, 4.32217131074708e-02, 3.96276323378260e-02, 3.64329027809021e-02,\n                                                3.36056429160010e-02, 3.11137205141137e-02, 2.89256942366904e-02, 2.70114905509047e-02, 2.53428512081371e-02,\n                                                2.38935912308591e-02, 2.26397074588363e-02, 2.15593748149701e-02, 2.06328628944021e-02, 1.98424002582698e-02,\n                                                1.91720086052243e-02, 1.86073242028044e-02, 1.81354197745094e-02, 1.77446364927079e-02, 1.74244327677258e-02,\n                                                1.71652540484644e-02, 1.69584257541686e-02, 1.67960696507521e-02, 1.66710424146430e-02, 1.65768937730633e-02,\n                                                1.65078404918120e-02, 1.64587516427588e-02, 1.64251400747446e-02, 1.64031548803933e-02, 1.63895699142529e-02,\n                                                1.63817640600001e-02, 1.63776899047576e-02, 1.63758286644793e-02, 1.63751304934578e-02, 1.63749405782170e-02,\n                                                1.63749125472634e-02, 1.63749096557666e-02, 1.63748482758734e-02, 1.63744324234898e-02, 1.63729037872571e-02,\n                                                1.63688296268134e-02, 1.63599165846477e-02, 1.63428591393426e-02, 1.63132339189076e-02, 1.62654530730748e-02,\n                                                1.61927917957314e-02, 1.60875061334167e-02, 1.59410564302220e-02, 1.57444480587969e-02, 1.54886935112302e-02,\n                                                1.51653879248101e-02, 1.47673739429450e-02, 1.42894528203925e-02, 1.37290795484262e-02, 1.30869643605820e-02,\n                                                1.23674957968944e-02, 1.15789057202420e-02, 1.07331168192957e-02, 9.84524782249707e-03, 8.93279684649428e-03,\n                                                8.01457152408602e-03, 7.10947623019820e-03, 6.23529252759170e-03, 5.40759241555122e-03, 4.63890346651397e-03,\n                                                3.93820436345038e-03, 3.31077718752226e-03, 2.75839001970724e-03, 2.27974078899251e-03, 1.87106876202847e-03,\n                                                1.52683654108898e-03, 1.24039978692281e-03, 1.00460596496532e-03, 8.12287685533875e-04, 6.56634555966207e-04,\n                                                5.31440042607301e-04, 4.31231038817259e-04, 3.51300432043899e-04, 2.87673828836432e-04, 2.37043930766845e-04,\n                                                1.96696752382763e-04, 1.64438502409325e-04, 1.38521111949785e-04, 1.17564334033204e-04, 1.00479381472951e-04,\n                                                8.64039094921054e-05, 7.46551289125819e-05, 6.46996186475235e-05, 5.61321014203031e-05, 4.86553902163678e-05,\n                                                4.20583349551862e-05, 3.61933298904660e-05, 3.09566901961489e-05, 2.62740571486120e-05, 2.20908344630288e-05,\n                                                1.83661975796667e-05, 1.50689825488826e-05, 1.21743432401900e-05, 9.66079574027390e-06, 7.50772564117597e-06,\n                                                5.69354270396616e-06, 4.19456755196279e-06, 2.98458890313213e-06, 2.03493485173567e-06, 1.31487983878742e-06,\n                                                7.92239177371812e-07, 4.34054214792923e-07, 5.68434188608080e-14, 7.10542735760100e-14, 5.68434188608080e-14,\n                                                7.10542735760100e-14}),\nmadness::CubicInterpolationTable<double>(grid, {6.70000000000000e+01,  6.69999997140697e+01,  6.69999908725368e+01, 6.69999309696906e+01,\n                                                6.69997107580935e+01,  6.69991237364121e+01,  6.69978389604253e+01, 6.69953781031898e+01,\n                                                6.69910975351178e+01,  6.69841760104947e+01,  6.69736083490825e+01, 6.69582053130803e+01,\n                                                6.69365997311358e+01,  6.69072588459093e+01,  6.68685028883278e+01, 6.68185300200062e+01,\n                                                6.67554480101779e+01,  6.66773132501500e+01,  6.65821778286008e+01, 6.64681452292419e+01,\n                                                6.63334346074065e+01,  6.61764524630736e+01,  6.59958689064681e+01, 6.57906938532092e+01,\n                                                6.55603468203496e+01,  6.53047130563624e+01,  6.50241790074201e+01, 6.47196418412838e+01,\n                                                6.43924907806791e+01,  6.40445617923747e+01,  6.36780708965791e+01, 6.32955341115303e+01,\n                                                6.28996831650128e+01,  6.24933853635613e+01,  6.20795736943526e+01, 6.16611900327920e+01,\n                                                6.12411411093591e+01,  6.08222644401460e+01,  6.04073002436459e+01, 5.99988655540229e+01,\n                                                5.95994280193424e+01,  5.92112786932350e+01,  5.88365048486105e+01, 5.84769649300285e+01,\n                                                5.81342679633077e+01,  5.78097591490049e+01,  5.75045123420963e+01, 5.72193291060792e+01,\n                                                5.69547433513309e+01,  5.67110303315650e+01,  5.64882188925989e+01, 5.62861061690265e+01,\n                                                5.61042742439855e+01,  5.59421085274804e+01,  5.57988177396510e+01, 5.56734554204177e+01,\n                                                5.55649428562822e+01,  5.54720932482198e+01,  5.53936368631568e+01, 5.53282468288375e+01,\n                                                5.52745651555025e+01,  5.52312285021699e+01,  5.51968931537981e+01, 5.51702586413755e+01,\n                                                5.51500894232217e+01,  5.51352340554480e+01,  5.51246413147733e+01, 5.51173727986642e+01,\n                                                5.51126116152999e+01,  5.51096668865651e+01,  5.51079739166897e+01, 5.51070900212876e+01,\n                                                5.51066861593107e+01,  5.51065346562764e+01,  5.51064934437339e+01, 5.51064873608474e+01,\n                                                5.51064865281861e+01,  5.51064668635440e+01,  5.51063336328972e+01, 5.51058438658857e+01,\n                                                5.51045383494302e+01,  5.51016813731529e+01,  5.50962103605965e+01, 5.50866975960450e+01,\n                                                5.50713261193572e+01,  5.50478816877394e+01,  5.50137624606163e+01, 5.49660077084202e+01,\n                                                5.49013463314917e+01,  5.48162652614629e+01,  5.47070968852823e+01, 5.45701234995216e+01,\n                                                5.44016955417453e+01,  5.41983590931044e+01,  5.39569870975803e+01, 5.36749081166581e+01,\n                                                5.33500263960181e+01,  5.29809275614630e+01,  5.25669651397767e+01, 5.21083238786213e+01,\n                                                5.16060561362387e+01,  5.10620874645840e+01,  5.04791875781543e+01, 4.98609042221124e+01,\n                                                4.92114607639595e+01,  4.85356233722654e+01,  4.78385489701476e+01, 4.71256286786256e+01,\n                                                4.64023414847390e+01,  4.56741289602214e+01,  4.49462952271302e+01, 4.42239294402846e+01,\n                                                4.35118434739244e+01,  4.28145169514510e+01,  4.21360451300542e+01, 4.14800904529542e+01,\n                                                4.08498428603310e+01,  4.02479949243211e+01,  3.96767352931736e+01, 3.91377596107362e+01,\n                                                3.86322945122354e+01,  3.81611289952322e+01,  3.77246483252401e+01, 3.73228675464113e+01,\n                                                3.69554634953909e+01,  3.66218053793945e+01,  3.63209844481428e+01, 3.60518433083156e+01,\n                                                3.58130052649342e+01,  3.56029038973020e+01,  3.54198129547224e+01, 3.52618765893308e+01,\n                                                3.51271399030962e+01,  3.50135797448925e+01,  3.49191356329545e+01, 3.48417405916106e+01,\n                                                3.47793515826303e+01,  3.47299790913267e+01,  3.46917153098473e+01, 3.46627602600263e+01,\n                                                3.46414451298760e+01,  3.46262520727312e+01,  3.46158297438060e+01, 3.46090039283492e+01,\n                                                3.46047827464828e+01,  3.46023560951422e+01,  3.46010891960886e+01, 3.46005103466712e+01,\n                                                3.46002932014393e+01,  3.46002341327816e+01,  3.46002254143755e+01, 3.46002245867584e+01,\n                                                3.46002077136131e+01,  3.46000933957695e+01,  3.45996731542525e+01, 3.45985529674658e+01,\n                                                3.45961015818014e+01,  3.45914073283801e+01,  3.45832453695573e+01, 3.45700571977743e+01,\n                                                3.45499440808007e+01,  3.45206759624948e+01,  3.44797170499535e+01, 3.44242689069993e+01,\n                                                3.43513312962839e+01,  3.42577802481282e+01,  3.41404618874095e+01, 3.39962994553256e+01,\n                                                3.38224097901924e+01,  3.36162243813067e+01,  3.33756091034840e+01, 3.30989760018643e+01,\n                                                3.27853801380839e+01,  3.24345946179391e+01,  3.20471575663826e+01, 3.16243860630156e+01,\n                                                3.11683539676067e+01,  3.06818331924545e+01,  3.01682012532353e+01, 2.96313215730152e+01,\n                                                2.90754064549944e+01,  2.85048750633560e+01,  2.79242193128937e+01, 2.73378887266504e+01,\n                                                2.67502011602306e+01,  2.61652806542594e+01,  2.55870180137424e+01, 2.50190456690678e+01,\n                                                2.44647172333883e+01,  2.39270843480877e+01,  2.34088681456524e+01, 2.29124281280560e+01,\n                                                2.24397351759007e+01,  2.19923560784000e+01,  2.15714542663930e+01, 2.11778068909026e+01,\n                                                2.08118343158967e+01,  2.04736361435719e+01,  2.01630283026858e+01, 1.98795775994470e+01,\n                                                1.96226322594682e+01,  1.93913485745598e+01,  1.91847145767193e+01, 1.90015718461422e+01,\n                                                1.88406363965926e+01,  1.87005193007775e+01,  1.85797474518120e+01, 1.84767846510513e+01,\n                                                1.83900530649599e+01,  1.83179549833192e+01,  1.82588947169813e+01, 1.82113003825719e+01,\n                                                1.81736452303080e+01,  1.81444680832399e+01,  1.81223923801423e+01, 1.81061432601111e+01,\n                                                1.80945621041190e+01,  1.80866179642932e+01,  1.80814153688025e+01, 1.80781980880648e+01,\n                                                1.80763485814691e+01,  1.80753830043566e+01,  1.80749418315076e+01, 1.80747763335233e+01,\n                                                1.80747313141704e+01,  1.80747246694123e+01,  1.80747240780762e+01, 1.80747124375566e+01,\n                                                1.80746335714577e+01,  1.80743436533494e+01,  1.80735708535864e+01, 1.80718796787035e+01,\n                                                1.80686411772497e+01,  1.80630103370642e+01,  1.80539119280877e+01, 1.80400359548345e+01,\n                                                1.80198437539505e+01,  1.79915855797581e+01,  1.79533302378657e+01, 1.79030069315175e+01,\n                                                1.78384589659723e+01,  1.77575083193473e+01,  1.76580293643125e+01, 1.75380292701321e+01,\n                                                1.73957319076675e+01,  1.72296615106594e+01,  1.70387219953636e+01, 1.68222677549561e+01,\n                                                1.65801619208730e+01,  1.63128184639749e+01,  1.60212250126448e+01, 1.57069438383796e+01,\n                                                1.53720891287018e+01,  1.50192795564802e+01,  1.46515664350716e+01, 1.42723395251641e+01,\n                                                1.38852147482267e+01,  1.34939103335769e+01,  1.31021197659339e+01, 1.27133907741298e+01,\n                                                1.23310191604694e+01,  1.19579644952563e+01,  1.15967919249702e+01, 1.12496411421520e+01,\n                                                1.09182205763681e+01,  1.06038226009654e+01,  1.03073542813980e+01, 1.00293779256675e+01,\n                                                9.77015623752963e+00,  9.52969791346604e+00,  9.30780075316358e+00, 9.10409052303591e+00,\n                                                8.91805477217616e+00,  8.74907149268659e+00,  8.59643295388508e+00, 8.45936527345291e+00,\n                                                8.33704438073778e+00,  8.22860903421957e+00,  8.13317151772192e+00, 8.04982658347308e+00,\n                                                7.97765914686568e+00,  7.91575117159613e+00,  7.86318811434161e+00, 7.81906522350880e+00,\n                                                7.78249390565924e+00,  7.75260828621612e+00,  7.72857199995114e+00, 7.70958515514805e+00,\n                                                7.69489132817168e+00,  7.68378436818952e+00,  7.67561473094363e+00, 7.66979502115888e+00,\n                                                7.66580440951441e+00,  7.66319160426300e+00,  7.66157609928842e+00, 7.66064748679764e+00,\n                                                7.66016270870671e+00,  7.65994121902625e+00,  7.65985813212647e+00, 7.65983553061923e+00,\n                                                7.65983219468932e+00,  7.65983189977601e+00,  7.65982611640539e+00, 7.65978693334900e+00,\n                                                7.65964289424328e+00,  7.65925895388430e+00,  7.65841878597307e+00, 7.65681005575021e+00,\n                                                7.65401337332840e+00,  7.64949564070519e+00,  7.64260849426260e+00, 7.63259250736571e+00,\n                                                7.61858773190205e+00,  7.59965099892896e+00,  7.57478014541086e+00, 7.54294497313194e+00,\n                                                7.50312427869159e+00,  7.45434774170596e+00,  7.39574086724889e+00, 7.32657061633989e+00,\n                                                7.24628890956066e+00,  7.15457094225884e+00,  7.05134528067200e+00, 6.93681306063907e+00,\n                                                6.81145428288023e+00,  6.67602013955657e+00,  6.53151142161316e+00, 6.37914422496416e+00,\n                                                6.22030526890637e+00,  6.05650004195847e+00,  5.88929758970506e+00, 5.72027596175271e+00,\n                                                5.55097207557334e+00,  5.38283903111979e+00,  5.21721281745734e+00, 5.05528909258352e+00,\n                                                4.89810954998815e+00,  4.74655653909733e+00,  4.60135419464619e+00, 4.46307432023605e+00,\n                                                4.33214552565502e+00,  4.20886446832456e+00,  4.09340836737849e+00, 3.98584818390002e+00,\n                                                3.88616199283558e+00,  3.79424814406430e+00,  3.70993786030327e+00, 3.63300697477871e+00,\n                                                3.56318658256710e+00,  3.50017246396387e+00,  3.44363322713906e+00, 3.39321720039367e+00,\n                                                3.34855817343218e+00,  3.30928013762954e+00,  3.27500120604721e+00, 3.24533690612159e+00,\n                                                3.21990303404758e+00,  3.19831824294297e+00,  3.18020650990042e+00, 3.16519959274436e+00,\n                                                3.15293954818865e+00,  3.14308134147635e+00,  3.13529553581443e+00, 3.12927101042202e+00,\n                                                3.12471762128418e+00,  3.12136869119399e+00,  3.11898319755196e+00, 3.11734751932006e+00,\n                                                3.11627660934649e+00,  3.11561447483956e+00,  3.11523387585390e+00, 3.11503518704195e+00,\n                                                3.11494440862860e+00,  3.11491035518242e+00,  3.11490109188271e+00, 3.11489972464136e+00,\n                                                3.11489960190159e+00,  3.11489717378704e+00,  3.11488072301381e+00, 3.11482024912934e+00,\n                                                3.11465905485540e+00,  3.11430632013440e+00,  3.11363092505601e+00, 3.11245682687075e+00,\n                                                3.11056029775081e+00,  3.10766932800200e+00,  3.10346548601267e+00, 3.09758849105516e+00,\n                                                3.08964368700975e+00,  3.07921249420204e+00,  3.06586575660862e+00, 3.04917969301513e+00,\n                                                3.02875391275760e+00,  3.00423068968700e+00,  2.97531443290683e+00, 2.94179008878838e+00,\n                                                2.90353909791172e+00,  2.86055155056852e+00,  2.81293335983884e+00, 2.76090760553572e+00,\n                                                2.70480967286805e+00,  2.64507636720188e+00,  2.58222975992743e+00, 2.51685702824875e+00,\n                                                2.44958791531498e+00,  2.38107159754431e+00,  2.31195467739063e+00, 2.24286173708293e+00,\n                                                2.17437944648086e+00,  2.10704469921062e+00,  2.04133674896201e+00, 1.97767291464497e+00,\n                                                1.91640717274854e+00,  1.85783087317867e+00,  1.80217487913593e+00, 1.74961259297125e+00,\n                                                1.70026352750756e+00,  1.65419725984948e+00,  1.61143772364547e+00, 1.57196784163024e+00,\n                                                1.53573448186320e+00,  1.50265366347806e+00,  1.47261587193988e+00, 1.44549129637106e+00,\n                                                1.42113478783385e+00,  1.39939035979107e+00,  1.38009510200797e+00, 1.36308244318366e+00,\n                                                1.34818476166170e+00,  1.33523539712938e+00,  1.32407015356191e+00, 1.31452840355007e+00,\n                                                1.30645390842390e+00,  1.29969546066589e+00,  1.29410743877280e+00, 1.28955034335939e+00,\n                                                1.28589135963593e+00,  1.28300496752398e+00,  1.28077359820414e+00, 1.27908831608900e+00,\n                                                1.27784948915195e+00,  1.27696739907721e+00,  1.27636273646561e+00, 1.27596692563068e+00,\n                                                1.27572222825245e+00,  1.27558158476072e+00,  1.27550816581360e+00, 1.27547462228910e+00,\n                                                1.27546203931071e+00,  1.27545861646908e+00,  1.27545811126605e+00, 1.27545806469534e+00,\n                                                1.27545712984102e+00,  1.27545079609827e+00,  1.27542751308383e+00, 1.27536545290920e+00,\n                                                1.27522965498292e+00,  1.27496965945146e+00,  1.27451775572513e+00, 1.27378797815682e+00,\n                                                1.27267598548030e+00,  1.27105995980307e+00,  1.26880264933767e+00, 1.26575465069749e+00,\n                                                1.26175897600555e+00,  1.25665687352789e+00,  1.25029476740642e+00, 1.24253205613624e+00,\n                                                1.23324936996734e+00,  1.22235674954632e+00,  1.20980109243186e+00, 1.19557214519673e+00,\n                                                1.17970632260089e+00,  1.16228773503794e+00,  1.14344601591020e+00, 1.12335086048397e+00,\n                                                1.10220359115193e+00,  1.08022649396270e+00,  1.05765104172905e+00, 1.03470633118025e+00,\n                                                1.01160903580856e+00,  9.88555889474938e-01,  9.65719225919059e-01, 9.43245533653197e-01,\n                                                9.21256496590331e-01,  8.99851695630218e-01,  8.79112086484454e-01, 8.59103505991058e-01,\n                                                8.39879706129707e-01,  8.21484678972624e-01,  8.03954249986802e-01, 7.87317052043136e-01,\n                                                7.71595050445498e-01,  7.56803790428023e-01,  7.42952507685914e-01, 7.30044200530415e-01,\n                                                7.18075722849264e-01,  7.07037926800965e-01,  6.96915864506494e-01, 6.87689047425579e-01,\n                                                6.79331757984301e-01,  6.71813407741993e-01,  6.65098937885347e-01, 6.59149259735486e-01,\n                                                6.53921734448517e-01,  6.49370691800570e-01,  6.45447987758402e-01, 6.42103599479398e-01,\n                                                6.39286254579247e-01,  6.36944089108425e-01,  6.35025325881116e-01, 6.33478961810653e-01,\n                                                6.32255449966948e-01,  6.31307359438324e-01,  6.30589994021577e-01, 6.30061949536142e-01,\n                                                6.29685589373750e-01,  6.29427418908989e-01,  6.29258341662990e-01, 6.29153783588976e-01,\n                                                6.29093676371156e-01,  6.29062295941168e-01,  6.29047958181445e-01, 6.29042579628035e-01,\n                                                6.29041116534424e-01,  6.29040900584982e-01,  6.29040880005235e-01, 6.29040459587912e-01,\n                                                6.29037611204254e-01,  6.29027140327622e-01,  6.28999229452802e-01, 6.28938150422314e-01,\n                                                6.28821189169685e-01,  6.28617831344812e-01,  6.28289255043768e-01, 6.27788173891318e-01,\n                                                6.27059069159230e-01,  6.26038842336328e-01,  6.24657908398589e-01, 6.22841733914882e-01,\n                                                6.20512802494289e-01,  6.17592963177188e-01,  6.14006086572928e-01, 6.09680921513288e-01,\n                                                6.04554015605061e-01,  5.98572540977955e-01,  5.91696856404866e-01, 5.83902642499041e-01,\n                                                5.75182469547656e-01,  5.65546696683654e-01,  5.55023652540484e-01, 5.43659104789725e-01,\n                                                5.31515081070751e-01,  5.18668148829619e-01,  5.05207290173203e-01, 4.91231516763094e-01,\n                                                4.76847359734762e-01,  4.62166345259860e-01,  4.47302535139741e-01, 4.32370182011240e-01,\n                                                4.17481527151878e-01,  4.02744758890933e-01,  3.88262150563335e-01, 3.74128404627470e-01,\n                                                3.60429238155575e-01,  3.47240248950342e-01,  3.34626097689409e-01, 3.22640029232772e-01,\n                                                3.11323737590882e-01,  3.00707557669440e-01,  2.90810946748010e-01, 2.81643202983176e-01,\n                                                2.73204359002520e-01,  2.65486186368790e-01,  2.58473250627418e-01, 2.52143965289179e-01,\n                                                2.46471604610505e-01,  2.41425247621351e-01,  2.36970638019201e-01, 2.33070955201512e-01,\n                                                2.29687500167927e-01,  2.26780305974543e-01,  2.24308685835368e-01, 2.22231733023520e-01,\n                                                2.20508785745679e-01,  2.19099867562221e-01,  2.17966110165790e-01, 2.17070160909401e-01,\n                                                2.16376572884499e-01,  2.15852171065990e-01,  2.15466384488352e-01, 2.15191531937407e-01,\n                                                2.15003047474681e-01,  2.14879632365083e-01,  2.14803321623833e-01, 2.14759456279182e-01,\n                                                2.14736556285388e-01,  2.14726093470276e-01,  2.14722168568784e-01, 2.14721100906232e-01,\n                                                2.14720943321694e-01,  2.14720927724358e-01,  2.14720603008104e-01, 2.14718403016036e-01,\n                                                2.14710315735886e-01,  2.14688758964471e-01,  2.14641587309174e-01, 2.14551266383751e-01,\n                                                2.14394255232108e-01,  2.14140638367283e-01,  2.13754048797725e-01, 2.13191922015554e-01,\n                                                2.12406116865807e-01,  2.11343931144185e-01,  2.09949526462310e-01, 2.08165757559613e-01,\n                                                2.05936375682327e-01,  2.03208544654359e-01,  1.99935573646528e-01, 1.96079735324602e-01,\n                                                1.91615005899138e-01,  1.86529539168831e-01,  1.80827674710599e-01, 1.74531285307566e-01,\n                                                1.67680293806356e-01,  1.60332236277696e-01,  1.52560815406403e-01, 1.44453471003970e-01,\n                                                1.36108085490520e-01,  1.27629030169160e-01,  1.19122830474922e-01, 1.10693773038463e-01,\n                                                1.02439785570994e-01,  9.44488892007769e-02,  8.67964559427179e-02, 7.95434119748251e-02,\n                                                7.27354251449981e-02,  6.64030183983328e-02,  6.05624728988232e-02, 5.52173338721076e-02,\n                                                5.03603110855835e-02,  4.59753715646229e-02,  4.20398481378612e-02, 3.85264256346574e-02,\n                                                3.54049092209863e-02,  3.26437201673713e-02,  3.02110991135436e-02, 2.80760235446706e-02,\n                                                2.62088643700054e-02,  2.45818170264300e-02,  2.31691469013953e-02, 2.19472887587813e-02,\n                                                2.08948368403838e-02,  1.99924577101740e-02,  1.92227526918032e-02, 1.85700915790505e-02,\n                                                1.80204345658268e-02,  1.75611552217987e-02,  1.71808738613919e-02, 1.68693077613398e-02,\n                                                1.66171422680890e-02,  1.64159248001567e-02,  1.62579819977537e-02, 1.61363587493639e-02,\n                                                1.60447765139651e-02,  1.59776072742517e-02,  1.59298586440570e-02, 1.58971651608653e-02,\n                                                1.58757806694609e-02,  1.58625669604504e-02,  1.58549744543421e-02, 1.58510116605726e-02,\n                                                1.58492012964473e-02,  1.58485222098932e-02,  1.58483374859912e-02, 1.58483102212728e-02,\n                                                1.58483074088025e-02,  1.58482477067423e-02,  1.58478432218203e-02, 1.58463563717248e-02,\n                                                1.58423935842649e-02,  1.58337242106654e-02,  1.58171331572277e-02, 1.57883181750123e-02,\n                                                1.57418446872413e-02,  1.56711728890571e-02,  1.55687728785807e-02, 1.54263428082544e-02,\n                                                1.52351414213285e-02,  1.49864389159831e-02,  1.46720783274503e-02, 1.42851237819173e-02,\n                                                1.38205533914402e-02,  1.32759358603494e-02,  1.26520148509286e-02, 1.19531182359651e-02,\n                                                1.11873146259143e-02,  1.03662594513025e-02,  9.50470699385164e-03, 8.61970908520959e-03,\n                                                7.72956834154570e-03,  6.85265437176952e-03,  6.00621626790598e-03, 5.20532758396541e-03,\n                                                4.46207946555432e-03,  3.78509754278866e-03,  3.17940706450770e-03, 2.64661930239640e-03,\n                                                2.18537096318983e-03,  1.79192481481039e-03,  1.46083663861418e-03, 1.18560783099042e-03,\n                                                9.59266617371668e-04,  7.74844745535574e-04,  6.25734759907459e-04, 5.05925493527570e-04,\n                                                4.10124234392129e-04,  3.33785746420290e-04,  2.73078198461008e-04, 2.24817959875168e-04,\n                                                1.86396407627853e-04,  1.55707494158719e-04,  1.31074610592918e-04, 1.11175001819674e-04,\n                                                9.49662976239551e-05,  8.16240784473621e-05,  7.04966041524813e-05, 6.10753164522748e-05,\n                                                5.29739593275735e-05,  4.59091039886061e-05,  3.96790960337512e-05, 3.41427832921681e-05,\n                                                2.92010012401533e-05,  2.47827567534387e-05,  2.08360949187636e-05, 1.73223059363181e-05,\n                                                1.42119195913892e-05,  1.14814657621309e-05,  9.11064465469735e-06, 7.07996558446666e-06,\n                                                5.36901224279518e-06,  3.95540189401800e-06,  2.81437449700661e-06, 1.91886212519421e-06,\n                                                1.23987163647143e-06,  7.47042705029344e-07,  4.09291089908947e-07, -1.42108547152020e-14,\n                                                -2.84217094304040e-14, -1.42108547152020e-14, -1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {6.80000000000000e+01, 6.79999997077289e+01, 6.79999906701251e+01, 6.79999294388656e+01, 6.79997043438182e+01,\n                                                6.79991043041687e+01, 6.79977910362319e+01, 6.79952756041510e+01, 6.79909001007982e+01, 6.79838250576723e+01,\n                                                6.79730229803226e+01, 6.79572782138060e+01, 6.79351931922787e+01, 6.79052010528336e+01, 6.78655846254212e+01,\n                                                6.78145019579407e+01, 6.77500187713496e+01, 6.76701484850642e+01, 6.75729005734029e+01, 6.74563378361621e+01,\n                                                6.73186425235727e+01, 6.71581900561360e+01, 6.69736273826853e+01, 6.67639510876570e+01, 6.65285786473667e+01,\n                                                6.62674053042326e+01, 6.59808393730889e+01, 6.56698106532819e+01, 6.53357498288637e+01, 6.49805407033962e+01,\n                                                6.46064509452539e+01, 6.42160497837282e+01, 6.38121221200665e+01, 6.33975875989483e+01, 6.29754306568155e+01,\n                                                6.25486441721135e+01, 6.21201860094032e+01, 6.16929452915676e+01, 6.12697141487751e+01, 6.08531610530264e+01,\n                                                6.04458033233841e+01, 6.00499783699187e+01, 5.96678150394675e+01, 5.93012074766063e+01, 5.89517939833902e+01,\n                                                5.86209426005574e+01, 5.83097439713996e+01, 5.80190109755710e+01, 5.77492839624784e+01, 5.75008402477311e+01,\n                                                5.72737067340212e+01, 5.70676748753422e+01, 5.68823175486863e+01, 5.67170076384458e+01, 5.65709382569212e+01,\n                                                5.64431445429143e+01, 5.63325269354126e+01, 5.62378757424461e+01, 5.61578967377717e+01, 5.60912374323747e+01,\n                                                5.60365135902409e+01, 5.59923354920436e+01, 5.59573333991179e+01, 5.59301816363069e+01, 5.59096206991230e+01,\n                                                5.58944768011461e+01, 5.58836783139625e+01, 5.58762686151985e+01, 5.58714149496185e+01, 5.58684130212072e+01,\n                                                5.58666871661311e+01, 5.58657861013811e+01, 5.58653743945167e+01, 5.58652199485828e+01, 5.58651779354991e+01,\n                                                5.58651717344544e+01, 5.58651708856189e+01, 5.58651508389971e+01, 5.58650150203845e+01, 5.58645157397852e+01,\n                                                5.58631848639687e+01, 5.58602723912320e+01, 5.58546951035243e+01, 5.58449975481240e+01, 5.58293274606842e+01,\n                                                5.58054275642579e+01, 5.57706454311123e+01, 5.57219627317439e+01, 5.56560446711493e+01, 5.55693096859592e+01,\n                                                5.54580185289193e+01, 5.53183807192568e+01, 5.51466750634914e+01, 5.49393796904651e+01, 5.46933059921265e+01,\n                                                5.44057302291648e+01, 5.40745164946370e+01, 5.36982252081431e+01, 5.32762020853668e+01, 5.28086431815501e+01,\n                                                5.22966318318216e+01, 5.17421432358004e+01, 5.11480127726309e+01, 5.05178658822384e+01, 4.98560111006204e+01,\n                                                4.91673031355759e+01, 4.84569881173220e+01, 4.77305462414342e+01, 4.69935463469365e+01, 4.62515223601443e+01,\n                                                4.55098744805415e+01, 4.47737911387839e+01, 4.40481838184887e+01, 4.33376273029124e+01, 4.26463022412153e+01,\n                                                4.19779426200415e+01, 4.13357945365741e+01, 4.07225925237252e+01, 4.01405559664263e+01, 3.95914033188424e+01,\n                                                3.90763785448711e+01, 3.85962836229819e+01, 3.81515124814480e+01, 3.77420839603114e+01, 3.73676732059084e+01,\n                                                3.70276418750903e+01, 3.67210677883946e+01, 3.64467745504248e+01, 3.62033614295579e+01, 3.59892336061006e+01,\n                                                3.58026327969107e+01, 3.56416682247455e+01, 3.55043478842430e+01, 3.53886100312337e+01, 3.52923547697464e+01,\n                                                3.52134755271052e+01, 3.51498900977797e+01, 3.50995708134455e+01, 3.50605732754723e+01, 3.50310629827763e+01,\n                                                3.50093391172959e+01, 3.49938547230019e+01, 3.49832325400505e+01, 3.49762758362754e+01, 3.49719737114186e+01,\n                                                3.49695005280635e+01, 3.49682093357337e+01, 3.49676193866613e+01, 3.49673980775889e+01, 3.49673378762678e+01,\n                                                3.49673289906830e+01, 3.49673281471961e+01, 3.49673109505020e+01, 3.49671944405715e+01, 3.49667661407692e+01,\n                                                3.49656244739982e+01, 3.49631260821743e+01, 3.49583418149982e+01, 3.49500233486148e+01, 3.49365822918113e+01,\n                                                3.49160835064840e+01, 3.48862541807596e+01, 3.48445099097372e+01, 3.47879986202150e+01, 3.47136625871351e+01,\n                                                3.46183180103745e+01, 3.44987506542163e+01, 3.43518249329322e+01, 3.41746026237939e+01, 3.39644662048116e+01,\n                                                3.37192407717152e+01, 3.34373077166781e+01, 3.31177029704310e+01, 3.27601927225504e+01, 3.23653202298290e+01,\n                                                3.19344186814279e+01, 3.14695871830341e+01, 3.09736297699314e+01, 3.04499608413979e+01, 2.99024841640782e+01,\n                                                2.93354559648852e+01, 2.87533447607384e+01, 2.81607006299775e+01, 2.75620441872837e+01, 2.69617808436044e+01,\n                                                2.63641400628438e+01, 2.57731338885902e+01, 2.51925257182868e+01, 2.46258003340662e+01, 2.40761296561563e+01,\n                                                2.35463343009608e+01, 2.30388464457113e+01, 2.25556822355943e+01, 2.20984307324790e+01, 2.16682619786744e+01,\n                                                2.12659515536132e+01, 2.08919155345830e+01, 2.05462491429573e+01, 2.02287639983056e+01, 1.99390214064401e+01,\n                                                1.96763612538077e+01, 1.94399273309414e+01, 1.92286903154897e+01, 1.90414695299590e+01, 1.88769542687705e+01,\n                                                1.87337251655916e+01, 1.86102758283744e+01, 1.85050348124805e+01, 1.84163879044194e+01, 1.83427006176331e+01,\n                                                1.82823407334993e+01, 1.82337006436536e+01, 1.81952191631232e+01, 1.81654023946041e+01, 1.81428431436484e+01,\n                                                1.81262383248136e+01, 1.81144037708872e+01, 1.81062858690191e+01, 1.81009695027131e+01, 1.80976818763426e+01,\n                                                1.80957919339282e+01, 1.80948052473977e+01, 1.80943544298750e+01, 1.80941853139043e+01, 1.80941393103775e+01,\n                                                1.80941325203576e+01, 1.80941319160943e+01, 1.80941200211000e+01, 1.80940394309038e+01, 1.80937431749160e+01,\n                                                1.80929534813411e+01, 1.80912253380550e+01, 1.80879160503059e+01, 1.80821621517056e+01, 1.80728649540491e+01,\n                                                1.80586859314596e+01, 1.80380530050754e+01, 1.80091786004280e+01, 1.79700900639217e+01, 1.79186726247955e+01,\n                                                1.78527245629223e+01, 1.77700235967391e+01, 1.76684027686462e+01, 1.75458333315039e+01, 1.74005114046828e+01,\n                                                1.72309445564796e+01, 1.70360340581527e+01, 1.68151483909932e+01, 1.65681836766167e+01, 1.62956070075868e+01,\n                                                1.59984791337269e+01, 1.56784535935684e+01, 1.53377502230396e+01, 1.49791021433731e+01, 1.46056769504100e+01,\n                                                1.42209749197655e+01, 1.38287094299397e+01, 1.34326770900962e+01, 1.30366267084679e+01, 1.26441367601785e+01,\n                                                1.22585101491621e+01, 1.18826928931127e+01, 1.15192203124468e+01, 1.11701909963562e+01, 1.08372658844380e+01,\n                                                1.05216877112265e+01, 1.02243150227520e+01, 9.94566493585003e+00, 9.68595952947836e+00, 9.44517190643722e+00,\n                                                9.22306923231730e+00, 9.01925121423108e+00, 8.83318339561673e+00, 8.66422527853321e+00, 8.51165366904519e+00,\n                                                8.37468183400499e+00, 8.25247512371965e+00, 8.14416370893807e+00, 8.04885303972296e+00, 7.96563257929285e+00,\n                                                7.89358330691839e+00, 7.83178442222755e+00, 7.77931961733225e+00, 7.73528321098387e+00, 7.69878635939322e+00,\n                                                7.66896347191844e+00, 7.64497886876884e+00, 7.62603362602886e+00, 7.61137246574271e+00, 7.60029047136686e+00,\n                                                7.59213934758398e+00, 7.58633290372350e+00, 7.58235142598903e+00, 7.57974461753593e+00, 7.57813282692490e+00,\n                                                7.57720635175416e+00, 7.57672269009658e+00, 7.57650171065148e+00, 7.57641881517928e+00, 7.57639626574692e+00,\n                                                7.57639293750324e+00, 7.57639264326944e+00, 7.57638687322418e+00, 7.57634778045033e+00, 7.57620407325351e+00,\n                                                7.57582101780098e+00, 7.57498278729319e+00, 7.57337777052205e+00, 7.57058755549375e+00, 7.56608030182707e+00,\n                                                7.55920920536251e+00, 7.54921672198717e+00, 7.53524513231397e+00, 7.51635386996830e+00, 7.49154378199145e+00,\n                                                7.45978812690520e+00, 7.42006964570880e+00, 7.37142248536052e+00, 7.31297715885772e+00, 7.24400615971263e+00,\n                                                7.16396739693641e+00, 7.07254236923948e+00, 6.96966603061581e+00, 6.85554565911566e+00, 6.73066672630382e+00,\n                                                6.59578472595830e+00, 6.45190306178993e+00, 6.30023829073760e+00, 6.14217513450910e+00, 5.97921457395712e+00,\n                                                5.81291890735715e+00, 5.64485778751069e+00, 5.47655890353484e+00, 5.30946617050155e+00, 5.14490716614164e+00,\n                                                4.98407033064460e+00, 4.82799137302608e+00, 4.67754759648802e+00, 4.53345853308332e+00, 4.39629130288260e+00,\n                                                4.26646934416580e+00, 4.14428345163136e+00, 4.02990430864345e+00, 3.92339586953199e+00, 3.82472904981320e+00,\n                                                3.73379524841155e+00, 3.65041928767609e+00, 3.57437143214050e+00, 3.50537823887598e+00, 3.44313209410409e+00,\n                                                3.38729939152870e+00, 3.33752739733143e+00, 3.29344991791113e+00, 3.25469193606841e+00, 3.22087340952945e+00,\n                                                3.19161243469280e+00, 3.16652797150356e+00, 3.14524230583554e+00, 3.12738339685086e+00, 3.11258722123696e+00,\n                                                3.10050018639417e+00, 3.09078164276413e+00, 3.08310648375897e+00, 3.07716778246467e+00, 3.07267937983687e+00,\n                                                3.06937831184271e+00, 3.06702694504899e+00, 3.06541468312331e+00, 3.06435911143811e+00, 3.06370646330650e+00,\n                                                3.06333131813044e+00, 3.06313547672340e+00, 3.06304599931850e+00, 3.06301243392643e+00, 3.06300330338932e+00,\n                                                3.06300195574347e+00, 3.06300183476283e+00, 3.06299944144840e+00, 3.06298322645083e+00, 3.06292361930130e+00,\n                                                3.06276473541402e+00, 3.06241705686475e+00, 3.06175134475629e+00, 3.06059408469496e+00, 3.05872476871721e+00,\n                                                3.05587531545852e+00, 3.05173191739863e+00, 3.04593956936193e+00, 3.03810946496490e+00, 3.02782933742841e+00,\n                                                3.01467666187810e+00, 2.99823442829270e+00, 2.97810894715209e+00, 2.95394888396689e+00, 2.92546446539448e+00,\n                                                2.89244559795956e+00, 2.85477753286591e+00, 2.81245273471926e+00, 2.76557779243028e+00, 2.71437454985333e+00,\n                                                2.65917510785125e+00, 2.60041090738443e+00, 2.53859667226348e+00, 2.47431048737802e+00, 2.40817163541186e+00,\n                                                2.34081795541138e+00, 2.27288439800284e+00, 2.20498415411454e+00, 2.13769328541204e+00, 2.07153927079045e+00,\n                                                2.00699339722925e+00, 1.94446654453837e+00, 1.88430769081971e+00, 1.82680440871641e+00, 1.77218470489368e+00,\n                                                1.72061972426225e+00, 1.67222703441104e+00, 1.62707436981333e+00, 1.58518381443037e+00, 1.54653642544849e+00,\n                                                1.51107726355951e+00, 1.47872072519039e+00, 1.44935600210799e+00, 1.42285244995846e+00, 1.39906464257871e+00,\n                                                1.37783692238112e+00, 1.35900731748119e+00, 1.34241076780548e+00, 1.32788167050923e+00, 1.31525580943429e+00,\n                                                1.30437176926260e+00, 1.29507195229216e+00, 1.28720331715269e+00, 1.28061794831831e+00, 1.27517354704887e+00,\n                                                1.27073391185739e+00, 1.26716945241787e+00, 1.26435775692947e+00, 1.26218421077516e+00, 1.26054264496892e+00,\n                                                1.25933597731004e+00, 1.25847679812462e+00, 1.25788784654057e+00, 1.25750232268705e+00, 1.25726398592256e+00,\n                                                1.25712699864003e+00, 1.25705548841491e+00, 1.25702281696726e+00, 1.25701056112955e+00, 1.25700722727757e+00,\n                                                1.25700673520920e+00, 1.25700668984931e+00, 1.25700577930006e+00, 1.25699961022734e+00, 1.25697693254898e+00,\n                                                1.25691648591368e+00, 1.25678421885178e+00, 1.25653098409417e+00, 1.25609083348186e+00, 1.25538004150103e+00,\n                                                1.25429699101633e+00, 1.25272305401695e+00, 1.25052458873698e+00, 1.24755614646509e+00, 1.24366493128581e+00,\n                                                1.23869648018896e+00, 1.23250142885500e+00, 1.22494310386804e+00, 1.21590554455378e+00, 1.20530142250310e+00,\n                                                1.19307921509275e+00, 1.17922892590833e+00, 1.16378565597783e+00, 1.14683043779655e+00, 1.12848796223578e+00,\n                                                1.10892115186505e+00, 1.08832293242642e+00, 1.06690596610466e+00, 1.04489144891701e+00, 1.02249824629227e+00,\n                                                9.99933577680181e-01, 9.77386154599628e-01, 9.55022194934287e-01, 9.32984207284207e-01, 9.11392003460179e-01,\n                                                8.90345154147425e-01, 8.69926077673441e-01, 8.50203099330699e-01, 8.31233054668459e-01, 8.13063250566145e-01,\n                                                7.95732785708054e-01, 7.79273345047272e-01, 7.63709626452197e-01, 7.49059552115355e-01, 7.35334385469059e-01,\n                                                7.22538834922418e-01, 7.10671190373347e-01, 6.99723512383102e-01, 6.89681877810813e-01, 6.80526677808430e-01,\n                                                6.72232961755768e-01, 6.64770821507929e-01, 6.58105812372952e-01, 6.52199409336632e-01, 6.47009498551100e-01,\n                                                6.42490904722280e-01, 6.38595954716592e-01, 6.35275076528870e-01, 6.32477430845569e-01, 6.30151569964539e-01,\n                                                6.28246115981142e-01, 6.26710447130520e-01, 6.25495378217494e-01, 6.24553818426776e-01, 6.23841387744989e-01,\n                                                6.23316971995649e-01, 6.22943196301037e-01, 6.22686797787921e-01, 6.22518880603749e-01, 6.22415039759005e-01,\n                                                6.22355344799658e-01, 6.22324179583401e-01, 6.22309940151510e-01, 6.22304598483439e-01, 6.22303145423444e-01,\n                                                6.22302930954945e-01, 6.22302910516325e-01, 6.22302492982143e-01, 6.22299664132072e-01, 6.22289265061724e-01,\n                                                6.22261545585800e-01, 6.22200885374951e-01, 6.22084726012531e-01, 6.21882762057680e-01, 6.21556436949518e-01,\n                                                6.21058786607549e-01, 6.20334669034037e-01, 6.19321411008940e-01, 6.17949891908481e-01, 6.16146068748151e-01,\n                                                6.13832925182109e-01, 6.10932800622081e-01, 6.07370025213669e-01, 6.03073754740663e-01, 5.97980870427236e-01,\n                                                5.92038786658222e-01, 5.85207999456998e-01, 5.77464213808810e-01, 5.68799910312364e-01, 5.59225250197684e-01,\n                                                5.48768268557438e-01, 5.37474362264433e-01, 5.25405133564917e-01, 5.12636694813764e-01, 4.99257567977708e-01,\n                                                4.85366321220766e-01, 4.71069074943117e-01, 4.56476985812969e-01, 4.41703787100508e-01, 4.26863435160854e-01,\n                                                4.12067891746574e-01, 3.97425063037204e-01, 3.83036917854540e-01, 3.68997815180379e-01, 3.55393078987916e-01,\n                                                3.42297861286525e-01, 3.29776329096248e-01, 3.17881197584725e-01, 3.06653612073333e-01, 2.96123359779003e-01,\n                                                2.86309371964322e-01, 2.77220461798450e-01, 2.68856234503417e-01, 2.61208104645462e-01, 2.54260359900783e-01,\n                                                2.47991219703280e-01, 2.42373849001027e-01, 2.37377300118226e-01, 2.32967367958622e-01, 2.29107354432287e-01,\n                                                2.25758746387015e-01, 2.22881817192146e-01, 2.20436165448703e-01, 2.18381205276941e-01, 2.16676621591915e-01,\n                                                2.15282801130243e-01, 2.14161246205137e-01, 2.13274973727437e-01, 2.12588897433449e-01, 2.12070186971417e-01,\n                                                2.11688593939726e-01, 2.11416732480529e-01, 2.11230300849039e-01, 2.11108230608872e-01, 2.11032751722200e-01,\n                                                2.10989364647915e-01, 2.10966714364986e-01, 2.10956365647235e-01, 2.10952483547999e-01, 2.10951427528741e-01,\n                                                2.10951271662736e-01, 2.10951256235475e-01, 2.10950935060396e-01, 2.10948759060301e-01, 2.10940759977404e-01,\n                                                2.10919438309205e-01, 2.10872781180171e-01, 2.10783445667204e-01, 2.10628148259360e-01, 2.10377301535743e-01,\n                                                2.09994939185847e-01, 2.09438969158299e-01, 2.08661790729792e-01, 2.07611303273907e-01, 2.06232321254461e-01,\n                                                2.04468390652039e-01, 2.02263976508377e-01, 1.99566960302050e-01, 1.96331351278886e-01, 1.92520080578632e-01,\n                                                1.88107714935285e-01, 1.83082902464122e-01, 1.77450351386256e-01, 1.71232147877916e-01, 1.64468244835490e-01,\n                                                1.57216000572362e-01, 1.49548713980465e-01, 1.41553185879076e-01, 1.33326427040558e-01, 1.24971720651729e-01,\n                                                1.16594318088929e-01, 1.08297089914203e-01, 1.00176460420116e-01, 9.23189211583804e-02, 8.47983509796961e-02,\n                                                7.76742779109725e-02, 7.09911165491519e-02, 6.47783191722340e-02, 5.90513024801851e-02, 5.38129628176023e-02,\n                                                4.90555730773679e-02, 4.47628612173077e-02, 4.09120968786425e-02, 3.74760509380820e-02, 3.44247352392131e-02,\n                                                3.17268700782449e-02, 2.93510612024903e-02, 2.72666941380351e-02, 2.54445713095492e-02, 2.38573275237428e-02,\n                                                2.24796634480100e-02, 2.12884364033243e-02, 2.02626446669711e-02, 1.93833368326324e-02, 1.86334725658810e-02,\n                                                1.79977559599678e-02, 1.74624580209155e-02, 1.70152407528832e-02, 1.66449919037746e-02, 1.63416766002911e-02,\n                                                1.60962097495485e-02, 1.59003511028573e-02, 1.57466231760424e-02, 1.56282507447969e-02, 1.55391193618470e-02,\n                                                1.54737492941734e-02, 1.54272804901439e-02, 1.53954637113856e-02, 1.53746528434482e-02, 1.53617936536392e-02,\n                                                1.53544048764047e-02, 1.53505484229868e-02, 1.53487866410558e-02, 1.53481257784449e-02, 1.53479460118007e-02,\n                                                1.53479194787707e-02, 1.53479167418027e-02, 1.53478586419169e-02, 1.53474650118568e-02, 1.53460180637239e-02,\n                                                1.53421616272880e-02, 1.53337249344645e-02, 1.53175792402180e-02, 1.52895379523699e-02, 1.52443128441746e-02,\n                                                1.51755407429448e-02, 1.50758960916448e-02, 1.49373040262759e-02, 1.47512650608661e-02, 1.45092951969445e-02,\n                                                1.42034737608867e-02, 1.38270757587406e-02, 1.33752473466586e-02, 1.28456647329216e-02, 1.22391021799331e-02,\n                                                1.15598281053622e-02, 1.08157535816247e-02, 1.00182771815014e-02, 9.18180367266075e-03, 8.32295754592849e-03,\n                                                7.45955847946789e-03, 6.60946535388973e-03, 5.78941941634525e-03, 5.01401956394432e-03, 4.29494214094461e-03,\n                                                3.64047810825241e-03, 3.05541029344170e-03, 2.54120324991902e-03, 2.09643823349381e-03, 1.71740323342817e-03,\n                                                1.39874533397233e-03, 1.13410679030324e-03, 9.16689435442208e-04, 7.39715550821529e-04, 5.96771389368200e-04,\n                                                4.82031978123132e-04, 3.90376305261952e-04, 3.17412964108144e-04, 2.59445331110442e-04, 2.13406858847520e-04,\n                                                1.76788621033097e-04, 1.47567681665350e-04, 1.24135238564804e-04, 1.05223101030560e-04, 8.98327810290311e-05,\n                                                7.71754227457677e-05, 6.66281509325017e-05, 5.77054183565906e-05, 5.00386130966035e-05, 4.33571876925498e-05,\n                                                3.74685102286776e-05, 3.22376511832090e-05, 2.75698247236278e-05, 2.33972601364485e-05, 1.96704756092458e-05,\n                                                1.63527006975528e-05, 1.34160019058527e-05, 1.08381601364727e-05, 8.59996519864126e-06, 6.68297469985646e-06,\n                                                5.06787577592149e-06, 3.73350570725961e-06, 2.65646596631086e-06, 1.81118809905456e-06, 1.17029377122435e-06,\n                                                7.05119418853428e-07, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14, 4.26325641456060e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {6.90000000000000e+01, 6.89999997013300e+01,  6.89999904658622e+01,  6.89999278940399e+01,\n                                                6.89996978708780e+01, 6.89990846941966e+01,  6.89977426737111e+01,  6.89951721675912e+01,\n                                                6.89907008604961e+01, 6.89834708942511e+01,  6.89724322556462e+01,  6.89563426301557e+01,\n                                                6.89337737781984e+01, 6.89031244178814e+01,  6.88626396352017e+01,  6.88104369991034e+01,\n                                                6.87445398056919e+01, 6.86629181301342e+01,  6.85635384851036e+01,  6.84444226901571e+01,\n                                                6.83037158741213e+01, 6.81397622700527e+01,  6.79511856874168e+01,  6.77369695395407e+01,\n                                                6.74965295484639e+01, 6.72297713291511e+01,  6.69371254816247e+01,  6.66195548261868e+01,\n                                                6.62785318090086e+01, 6.59159882415694e+01,  6.55342434750932e+01,  6.51359198821816e+01,\n                                                6.47238554379540e+01, 6.43010220858266e+01,  6.38704558228702e+01,  6.34352008567810e+01,\n                                                6.29982667443485e+01, 6.25625949657290e+01,  6.21310304144609e+01,  6.17062938312610e+01,\n                                                6.12909528952355e+01, 6.08873918342530e+01,  6.04977812764424e+01,  6.01240510576108e+01,\n                                                5.97678686155835e+01, 5.94306246583436e+01,  5.91134264939399e+01,  5.88170982886868e+01,\n                                                5.85421869002841e+01, 5.82889718493245e+01,  5.80574782733362e+01,  5.78474921194334e+01,\n                                                5.76585771972464e+01, 5.74900939502734e+01,  5.73412199054037e+01,  5.72109717606245e+01,\n                                                5.70982290112298e+01, 5.70017589282699e+01,  5.69202426102599e+01,  5.68523017411838e+01,\n                                                5.67965256096646e+01, 5.67514978785047e+01,  5.67158225429679e+01,  5.66881484829271e+01,\n                                                5.66671920014940e+01, 5.66517567540567e+01,  5.66407505091380e+01,  5.66331982472171e+01,\n                                                5.66282511949427e+01, 5.66251915073714e+01,  5.66234324454130e+01,  5.66225140433584e+01,\n                                                5.66220944148633e+01, 5.66219369972405e+01,  5.66218941757843e+01,  5.66218878554254e+01,\n                                                5.66218869902575e+01, 5.66218665579192e+01,  5.66217281260234e+01,  5.66212192387668e+01,\n                                                5.66198627554966e+01, 5.66168942433386e+01,  5.66112096405776e+01,  5.66013254857323e+01,\n                                                5.65853538638584e+01, 5.65609940406575e+01,  5.65255425021304e+01,  5.64759227481321e+01,\n                                                5.64087356542916e+01, 5.63203304780245e+01,  5.62068956227880e+01,  5.60645671117906e+01,\n                                                5.58895514352980e+01, 5.56782581656538e+01,  5.54274366753495e+01,  5.51343106495767e+01,\n                                                5.47967039873544e+01, 5.44131520969400e+01,  5.39829932572555e+01,  5.35064352581897e+01,\n                                                5.29845927098434e+01, 5.24194904380569e+01,  5.18140290155952e+01,  5.11719106576084e+01,\n                                                5.04975278762696e+01, 4.97958227960973e+01,  4.90721301411636e+01,  4.83320194897357e+01,\n                                                4.75811509972930e+01, 4.68251534946076e+01,  4.60695264657175e+01,  4.53195607709927e+01,\n                                                4.45802698259108e+01, 4.38563245206354e+01,  4.31519904179443e+01,  4.24710716504943e+01,\n                                                4.18168690083694e+01, 4.11921582643174e+01,  4.05991899858977e+01,  4.00397069772925e+01,\n                                                3.95149727331762e+01, 3.90258045404910e+01,  3.85726070107964e+01,  3.81554042576591e+01,\n                                                3.77738706204912e+01, 3.74273605644809e+01,  3.71149384373521e+01,  3.68354085218113e+01,\n                                                3.65873455578848e+01, 3.63691257380436e+01,  3.61789581085192e+01,  3.60149163027822e+01,\n                                                3.58749705411737e+01, 3.57570198201084e+01,  3.56589241683621e+01,  3.55785367647692e+01,\n                                                3.55137355994647e+01, 3.54624542337396e+01,  3.54227110883037e+01,  3.53926365830182e+01,\n                                                3.53704973780180e+01, 3.53547169385482e+01,  3.53438916715501e+01,  3.53368019638842e+01,\n                                                3.53324175876712e+01, 3.53298971201320e+01,  3.53285812418286e+01,  3.53279800136754e+01,\n                                                3.53277544734537e+01, 3.53276931211596e+01,  3.53276840656936e+01,  3.53276832060803e+01,\n                                                3.53276656806072e+01, 3.53275469431546e+01,  3.53271104548036e+01,  3.53259469608183e+01,\n                                                3.53234008029540e+01, 3.53185250668477e+01,  3.53100475626126e+01,  3.52963495318791e+01,\n                                                3.52754588411519e+01, 3.52450592294603e+01,  3.52025168895040e+01,  3.51449252349026e+01,\n                                                3.50691681060703e+01, 3.49720008724917e+01,  3.48501479024614e+01,  3.47004137269451e+01,\n                                                3.45198039916470e+01, 3.43056510729665e+01,  3.40557381552184e+01,  3.37684147636502e+01,\n                                                3.34426963511100e+01, 3.30783406636602e+01,  3.26758943675854e+01,  3.22367049020052e+01,\n                                                3.17628947965097e+01, 3.12572987520256e+01,  3.07233674450797e+01,  3.01650458356423e+01,\n                                                2.95866370040528e+01, 2.89926643148125e+01,  2.83877442230008e+01,  2.77764790007959e+01,\n                                                2.71633735272473e+01, 2.65527743174414e+01,  2.59488239531895e+01,  2.53554217608088e+01,\n                                                2.47761829638469e+01, 2.42143932681206e+01,  2.36729620178296e+01,  2.31543818348532e+01,\n                                                2.26607035864409e+01, 2.21935321395738e+01,  2.17540425745574e+01,  2.13430114299171e+01,\n                                                2.09608553543141e+01, 2.06076704522662e+01,  2.02832682650422e+01,  1.99872070746709e+01,\n                                                1.97188190639411e+01, 1.94772346340398e+01,  1.92614051851388e+01,  1.90701253163667e+01,\n                                                1.89020550011222e+01, 1.87557419862509e+01,  1.86296444783785e+01,  1.85221540885034e+01,\n                                                1.84316189619147e+01, 1.83563669866016e+01,  1.82947289264780e+01,  1.82450612576973e+01,\n                                                1.82057684002564e+01, 1.81753239433851e+01,  1.81522903757533e+01,  1.81353367645127e+01,\n                                                1.81232537928827e+01, 1.81149655730550e+01,  1.81095377037522e+01,  1.81061811390389e+01,\n                                                1.81042515714954e+01, 1.81032441992750e+01,  1.81027839307920e+01,  1.81026112695212e+01,\n                                                1.81025643015944e+01, 1.81025573692313e+01,  1.81025567523005e+01,  1.81025446079446e+01,\n                                                1.81024623282942e+01, 1.81021598617963e+01,  1.81013536140712e+01,  1.80995892464385e+01,\n                                                1.80962106000931e+01, 1.80903361344353e+01,  1.80808441978147e+01,  1.80663683595584e+01,\n                                                1.80453039029363e+01, 1.80158263834534e+01,  1.79759228680549e+01,  1.79234360652730e+01,\n                                                1.78561210217348e+01, 1.77717134019665e+01,  1.76680076138527e+01,  1.75429422434534e+01,\n                                                1.73946894924632e+01, 1.72217446512782e+01,  1.70230111656185e+01,  1.67978766161286e+01,\n                                                1.65462749455030e+01, 1.62687305252722e+01,  1.59663801394375e+01,  1.56409696902602e+01,\n                                                1.52948234705273e+01, 1.49307852991715e+01,  1.45521327532757e+01,  1.41624680909244e+01,\n                                                1.37655919871181e+01, 1.33653684470041e+01,  1.29655906815711e+01,  1.25698578913626e+01,\n                                                1.21814716329982e+01, 1.18033579249259e+01,  1.14380179782262e+01,  1.10875070709727e+01,\n                                                1.07534382407389e+01, 1.04370055714589e+01,  1.01390210447234e+01,  9.85995910112731e+00,\n                                                9.60000393310366e+00, 9.35909576558826e+00,  9.13697366907171e+00,  8.93321357740755e+00,\n                                                8.74726104330730e+00, 8.57845884101580e+00,  8.42606985939786e+00,  8.28929588548712e+00,\n                                                8.16729292402651e+00, 8.05918368406711e+00,  7.96406782248339e+00,  7.88103048353927e+00,\n                                                7.80914961957696e+00, 7.74750252059548e+00,  7.69517191776200e+00,  7.65125195564617e+00,\n                                                7.61485424934708e+00, 7.58511415652193e+00,  7.56119730315930e+00,  7.54230630979092e+00,\n                                                7.52768757689758e+00, 7.51663791043490e+00,  7.50851070670510e+00,  7.50272137568442e+00,\n                                                7.49875166753695e+00, 7.49615258059865e+00,  7.49454557036718e+00,  7.49362184514390e+00,\n                                                7.49313961970080e+00, 7.49291929658677e+00,  7.49283664734526e+00,  7.49281416489532e+00,\n                                                7.49281084653816e+00, 7.49281055317840e+00,  7.49280480027308e+00,  7.49276582362604e+00,\n                                                7.49262254334165e+00, 7.49224062601874e+00,  7.49140488697941e+00,  7.48980464434793e+00,\n                                                7.48702273996653e+00, 7.48252894097624e+00,  7.47567842646927e+00,  7.46571602792930e+00,\n                                                7.45178680724175e+00, 7.43295339706732e+00,  7.40822027328229e+00,  7.37656476448949e+00,\n                                                7.33697413069246e+00, 7.28848748413622e+00,  7.23024072618333e+00,  7.16151210440412e+00,\n                                                7.08176554019873e+00, 6.99068862995021e+00,  6.88822225972319e+00,  6.77457914143655e+00,\n                                                6.65024927814736e+00, 6.51599134699757e+00,  6.37281015330151e+00,  6.22192152810732e+00,\n                                                6.06470716873371e+00, 5.90266281239266e+00,  5.73734365806034e+00,  5.57031101733154e+00,\n                                                5.40308374960908e+00, 5.23709718023507e+00,  5.07367107227424e+00,  4.91398705409750e+00,\n                                                4.75907492680611e+00, 4.60980664116684e+00,  4.46689647377845e+00,  4.33090596677992e+00,\n                                                4.20225239006915e+00, 4.08121971463751e+00,  3.96797127452464e+00,  3.86256342263675e+00,\n                                                3.76495956909280e+00, 3.67504405925823e+00,  3.59263542571448e+00,  3.51749864397291e+00,\n                                                3.44935613298115e+00, 3.38789735814898e+00,  3.33278700472600e+00,  3.28367178309753e+00,\n                                                3.24018599913211e+00, 3.20195607036308e+00,  3.16860419384896e+00,  3.13975137716213e+00,\n                                                3.11502003392114e+00, 3.09403632331866e+00,  3.07643238245331e+00,  3.06184856363875e+00,\n                                                3.04993574852432e+00, 3.04035776888202e+00,  3.03279392236408e+00,  3.02694153257131e+00,\n                                                3.02251846868117e+00, 3.01926551293822e+00,  3.01694844657167e+00,  3.01535971775121e+00,\n                                                3.01431955984573e+00, 3.01367644437714e+00,  3.01330677948297e+00,  3.01311379926150e+00,\n                                                3.01302562915238e+00, 3.01299255417152e+00,  3.01298355703811e+00,  3.01298222908237e+00,\n                                                3.01298210986934e+00, 3.01297975152302e+00,  3.01296377343937e+00,  3.01290503720752e+00,\n                                                3.01274847484405e+00, 3.01240587677599e+00,  3.01174989394870e+00,  3.01060955178296e+00,\n                                                3.00876757582976e+00, 3.00595982777848e+00,  3.00187713793215e+00,  2.99616978610638e+00,\n                                                2.98845481601784e+00, 2.97832625865637e+00,  2.96536818166578e+00,  2.94917027477489e+00,\n                                                2.92934543540873e+00, 2.90554855427216e+00,  2.87749544924596e+00,  2.84498069694926e+00,\n                                                2.80789300727659e+00, 2.76622681475986e+00,  2.72008894557908e+00,  2.66969956232134e+00,\n                                                2.61538706485391e+00, 2.55757718226413e+00,  2.49677705364894e+00,  2.43355558093234e+00,\n                                                2.36852166743419e+00, 2.30230207708487e+00,  2.23552054265045e+00,  2.16877944098124e+00,\n                                                2.10264490142488e+00, 2.03763570741962e+00,  1.97421588315744e+00,  1.91279050326169e+00,\n                                                1.85370406754937e+00, 1.79724074969579e+00,  1.74362592663037e+00,  1.69302856957955e+00,\n                                                1.64556426550806e+00, 1.60129878633759e+00,  1.56025220125458e+00,  1.52240352956262e+00,\n                                                1.48769587615932e+00, 1.45604191108461e+00,  1.42732948270663e+00,  1.40142711600834e+00,\n                                                1.37818915330513e+00, 1.35746034011477e+00,  1.33907972956264e+00,  1.32288385716581e+00,\n                                                1.30870920902302e+00, 1.29639406074017e+00,  1.28577979817352e+00,  1.27671184525077e+00,\n                                                1.26904032240074e+00, 1.26262054607784e+00,  1.25731345981805e+00,  1.25298606368452e+00,\n                                                1.24951188438453e+00, 1.24677150452928e+00,  1.24465314771514e+00,  1.24305329728742e+00,\n                                                1.24187731161000e+00, 1.24103998808752e+00,  1.24046602257839e+00,  1.24009031044483e+00,\n                                                1.23985804019806e+00, 1.23972453999137e+00,  1.23965485016879e+00,  1.23962301044035e+00,\n                                                1.23961106660310e+00, 1.23960781762224e+00,  1.23960733808066e+00,  1.23960729387549e+00,\n                                                1.23960640650645e+00, 1.23960039448254e+00,  1.23957829412308e+00,  1.23951938633867e+00,\n                                                1.23939048666223e+00, 1.23914369950079e+00,  1.23871475708368e+00,  1.23802206915160e+00,\n                                                1.23696661393028e+00, 1.23543280019172e+00,  1.23329041888846e+00,  1.23039777510459e+00,\n                                                1.22660604152593e+00, 1.22176479962668e+00,  1.21572863377588e+00,  1.20836452047921e+00,\n                                                1.19955961959303e+00, 1.18922894225341e+00,  1.17732226274043e+00,  1.16382958375870e+00,\n                                                1.14878448262508e+00, 1.13226478143496e+00,  1.11439020834349e+00,  1.09531704154941e+00,\n                                                1.07523011775190e+00, 1.05433297863415e+00,  1.03283723591878e+00,  1.01095237024649e+00,\n                                                9.88877084969062e-01, 9.66793017394636e-01,  9.44861142692446e-01,  9.23220714855788e-01,\n                                                9.01990203198395e-01, 8.81269484752650e-01,  8.61142555047607e-01,  8.41680172268468e-01,\n                                                8.22942072558462e-01, 8.04978611771489e-01,  7.87831852966505e-01,  7.71536212933512e-01,\n                                                7.56118812849962e-01, 7.41599667522124e-01,  7.27991815759992e-01,  7.15301457793984e-01,\n                                                7.03528134182875e-01, 6.92664958450862e-01,  6.82698902797142e-01,  6.73611130663787e-01,\n                                                6.65377369153546e-01, 6.57968315958712e-01,  6.51350077924306e-01,  6.45484640592372e-01,\n                                                6.40330369537381e-01, 6.35842544811268e-01,  6.31973929374510e-01,  6.28675371093593e-01,\n                                                6.25896435884442e-01, 6.23586067039966e-01,  6.21693262883468e-01,  6.20167761844087e-01,\n                                                6.18960721079077e-01, 6.18025372124663e-01,  6.17317634996127e-01,  6.16796670927314e-01,\n                                                6.16425353750301e-01, 6.16170640908791e-01,  6.16003827332875e-01,  6.15900668826711e-01,\n                                                6.15841366075344e-01, 6.15810405607007e-01,  6.15796259721563e-01,  6.15790953145236e-01,\n                                                6.15789509631000e-01, 6.15789296571435e-01,  6.15789276267066e-01,  6.15788861475849e-01,\n                                                6.15786051209568e-01, 6.15775720453996e-01,  6.15748183070835e-01,  6.15687921318440e-01,\n                                                6.15572524871013e-01, 6.15371887067283e-01,  6.15047703858991e-01,  6.14553317949330e-01,\n                                                6.13833946076156e-01, 6.12827320229897e-01,  6.11464762637070e-01,  6.09672698575935e-01,\n                                                6.07374589962944e-01, 6.04493246384891e-01,  6.00953440171807e-01,  5.96684720776921e-01,\n                                                5.91624294900200e-01, 5.85719816982589e-01,  5.78931924478368e-01,  5.71236357329937e-01,\n                                                5.62625523052688e-01, 5.53109406860742e-01,  5.42715776468754e-01,  5.31489687209273e-01,\n                                                5.19492347015898e-01, 5.06799444740125e-01,  4.93499072984065e-01,  4.79689385090552e-01,\n                                                4.65476116105393e-01, 4.50970074265399e-01,  4.36284680354973e-01,  4.21533605152632e-01,\n                                                4.06828536411439e-01, 3.92277099142717e-01,  3.77980955126475e-01,  3.64034115119011e-01,\n                                                3.50521504390457e-01, 3.37517823956887e-01,  3.25086743392291e-01,  3.13280446457497e-01,\n                                                3.02139530432441e-01, 2.91693237795585e-01,  2.81959978705331e-01,  2.72948087685450e-01,\n                                                2.64656749691326e-01, 2.57077029578696e-01,  2.50192943986406e-01,  2.43982524140179e-01,\n                                                2.38418830194490e-01, 2.33470890662375e-01,  2.29104552784150e-01,  2.25283240313118e-01,\n                                                2.21968623533101e-01, 2.19121212103460e-01,  2.16700884565370e-01,  2.14667369242761e-01,\n                                                2.12980690170284e-01, 2.11601588990149e-01,  2.10491929946770e-01,  2.09615090655532e-01,\n                                                2.08936336718338e-01, 2.08423173966281e-01,  2.08045668546745e-01,  2.07776722573627e-01,\n                                                2.07592291861147e-01, 2.07471532471175e-01,  2.07396864392791e-01,  2.07353943487092e-01,\n                                                2.07331536596129e-01, 2.07321299088449e-01,  2.07317458708303e-01,  2.07316414037692e-01,\n                                                2.07316259846706e-01, 2.07316244585243e-01,  2.07315926861725e-01,  2.07313774246458e-01,\n                                                2.07305861128845e-01, 2.07284768614045e-01,  2.07238612989201e-01,  2.07150237945754e-01,\n                                                2.06996610892844e-01, 2.06748464148077e-01,  2.06370221885010e-01,  2.05820252436084e-01,\n                                                2.05051481614603e-01, 2.04012394764533e-01,  2.02648442044719e-01,  2.00903842182996e-01,\n                                                1.98723754445737e-01, 1.96056757626579e-01,  1.92857540298164e-01,  1.89089671341307e-01,\n                                                1.84728287796588e-01, 1.79762512992909e-01,  1.74197406519866e-01,  1.68055253338437e-01,\n                                                1.61376025415080e-01, 1.54216897006279e-01,  1.46650762666212e-01,  1.38763790425102e-01,\n                                                1.30652133139449e-01, 1.22418007563724e-01,  1.14165420592528e-01,  1.05995863568054e-01,\n                                                9.80043002946616e-02, 9.02757400754268e-02,  8.28826182931408e-02,  7.58831147121981e-02,\n                                                6.93204386476793e-02, 6.32230159017411e-02,  5.76054376582107e-02,  5.24699840876082e-02,\n                                                4.78085171588845e-02, 4.36045448830384e-02,  3.98352863001321e-02,  3.64736049568393e-02,\n                                                3.34897207839049e-02, 3.08526501411706e-02,  2.85313574081698e-02,  2.64956269814576e-02,\n                                                2.47166816772051e-02, 2.31675832366136e-02,  2.18234543945641e-02,  2.06615614667953e-02,\n                                                1.96612931811160e-02, 1.88040667931375e-02,  1.80731873248732e-02,  1.74536806729719e-02,\n                                                1.69321167105494e-02, 1.64964345138543e-02,  1.61357784956095e-02,  1.58403514591328e-02,\n                                                1.56012882924017e-02, 1.54105520938970e-02,  1.52608528693747e-02,  1.51455875081012e-02,\n                                                1.50587985130670e-02, 1.49951479436083e-02,  1.49499022646324e-02,  1.49189233365377e-02,\n                                                1.48986606647696e-02, 1.48861402770848e-02,  1.48789461959637e-02,  1.48751913678069e-02,\n                                                1.48734760139178e-02, 1.48728325671925e-02,  1.48726575380209e-02,  1.48726317042360e-02,\n                                                1.48726290393597e-02, 1.48725724704661e-02,  1.48721892129231e-02,  1.48707803936361e-02,\n                                                1.48670255822765e-02, 1.48588112302548e-02,  1.48430911032449e-02,  1.48157891234888e-02,\n                                                1.47717569034427e-02, 1.47048000360712e-02,  1.46077881908155e-02,  1.44728633242579e-02,\n                                                1.42917568309429e-02, 1.40562193267186e-02,  1.37585554710427e-02,  1.33922410379199e-02,\n                                                1.29525816415565e-02, 1.24373546586014e-02,  1.18473616148549e-02,  1.11868118713545e-02,\n                                                1.04634637385317e-02, 9.68846847686677e-03,  8.87589557059698e-03,  8.04196031147342e-03,\n                                                7.20402000010267e-03, 6.37944389320921e-03,  5.58448551527135e-03,  4.83328789368898e-03,\n                                                4.13713114971870e-03, 3.50399174809013e-03,  2.93843248462622e-03,  2.44179339705397e-03,\n                                                2.01261675616138e-03, 1.64722042595145e-03,  1.34033333904426e-03,  1.08571939956903e-03,\n                                                8.76734494624998e-04, 7.06780086886738e-04,  5.69634579605349e-04,  4.59661100364883e-04,\n                                                3.71907043628994e-04, 3.02122977942076e-04,  2.46731867250105e-04,  2.02773196647854e-04,\n                                                1.67835466939437e-04, 1.39982010296080e-04,  1.17673182970179e-04,  9.96905775707546e-05,\n                                                8.50706070423257e-05, 7.30524076431038e-05,  6.30398364620532e-05,  5.45731929832982e-05,\n                                                4.73056117442638e-05, 4.09812221136008e-05,  3.54147978782748e-05,  3.04739481151728e-05,\n                                                2.60647376535417e-05, 2.21207845072513e-05,  1.85951954136954e-05,  1.54545035258025e-05,\n                                                1.26739572436918e-05, 1.02338066056973e-05,  8.11645185194720e-06,  6.30440149507194e-06,\n                                                4.77897197015409e-06, 3.51961521971589e-06,  2.50372789878384e-06,  1.70679371080951e-06,\n                                                1.10273400366623e-06, 6.64376429426738e-07,  -1.42108547152020e-14, -1.42108547152020e-14,\n                                                0.00000000000000e+00, -1.42108547152020e-14, -1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.00000000000000e+01, 6.99999996948734e+01, 6.99999902597526e+01, 6.99999263352479e+01, 6.99996913394184e+01,\n                                                6.99990649069363e+01, 6.99976938739492e+01, 6.99950677958334e+01, 6.99904998186857e+01, 6.99831135281837e+01,\n                                                6.99718361883162e+01, 6.99553985831357e+01, 6.99323415207762e+01, 6.99010289877451e+01, 6.98596679840404e+01,\n                                                6.98063352355124e+01, 6.97390112381750e+01, 6.96556223522594e+01, 6.95540917836182e+01, 6.94324000778583e+01,\n                                                6.92886550291687e+01, 6.91211695784439e+01, 6.89285444206503e+01, 6.87097499595732e+01, 6.84642004483575e+01,\n                                                6.81918122482019e+01, 6.78930386511962e+01, 6.75688758735244e+01, 6.72208384062160e+01, 6.68509062207125e+01,\n                                                6.64614503694131e+01, 6.60551462910744e+01, 6.56348849362937e+01, 6.52036905215887e+01, 6.47646507416468e+01,\n                                                6.43208614931982e+01, 6.38753846180638e+01, 6.34312147311829e+01, 6.29912503520240e+01, 6.25582653098942e+01,\n                                                6.21348782997828e+01, 6.17235207796175e+01, 6.13264053130553e+01, 6.09454973749819e+01, 6.05824933758225e+01,\n                                                6.02388065201497e+01, 5.99155606814038e+01, 5.96135913208970e+01, 5.93334519155417e+01, 5.90754243713354e+01,\n                                                5.88395322667834e+01, 5.86255562333917e+01, 5.84330511600934e+01, 5.82613651346406e+01, 5.81096601164396e+01,\n                                                5.79769343157673e+01, 5.78620461798418e+01, 5.77637397906224e+01, 5.76806713820082e+01, 5.76114365945129e+01,\n                                                5.75545980071974e+01, 5.75087124214368e+01, 5.74723573208659e+01, 5.74441558992032e+01, 5.74228000357990e+01,\n                                                5.74070706108698e+01, 5.73958545909588e+01, 5.73881583813492e+01, 5.73831170353099e+01, 5.73799990275112e+01,\n                                                5.73782064360847e+01, 5.73772705282987e+01, 5.73768429012156e+01, 5.73766824830341e+01, 5.73766388453521e+01,\n                                                5.73766324045199e+01, 5.73766315228609e+01, 5.73766107010588e+01, 5.73764696304921e+01, 5.73759510432493e+01,\n                                                5.73745687037433e+01, 5.73715436077037e+01, 5.73657506471564e+01, 5.73556780794665e+01, 5.73394019920353e+01,\n                                                5.73145777695072e+01, 5.72784503124770e+01, 5.72278843803967e+01, 5.71594158881258e+01, 5.70693242348483e+01,\n                                                5.69537247684237e+01, 5.68086793106027e+01, 5.66303213681728e+01, 5.64149913745190e+01, 5.61593762375076e+01,\n                                                5.58606468086979e+01, 5.55165867532532e+01, 5.51257066386389e+01, 5.46873376218139e+01, 5.42016995565632e+01,\n                                                5.36699384975784e+01, 5.30941287366994e+01, 5.24772354513571e+01, 5.18230366513230e+01, 5.11360076602833e+01,\n                                                5.04211770307132e+01, 4.96839677003613e+01, 4.89300392333293e+01, 4.81651448549564e+01, 4.73950110447354e+01,\n                                                4.66252397926581e+01, 4.58612273294181e+01, 4.51080909113911e+01, 4.43705979872195e+01, 4.36530981576376e+01,\n                                                4.29594641708111e+01, 4.22930502420001e+01, 4.16566731154508e+01, 4.10526155259528e+01, 4.04826466154640e+01,\n                                                3.99480518620835e+01, 3.94496662267621e+01, 3.89879069015024e+01, 3.85628045418019e+01, 3.81740333356001e+01,\n                                                3.78209407126977e+01, 3.75025773482189e+01, 3.72177277768334e+01, 3.69649416558239e+01, 3.67425655718276e+01,\n                                                3.65487752562968e+01, 3.63816081019572e+01, 3.62389959041611e+01, 3.61187977531083e+01, 3.60188329613124e+01,\n                                                3.59369138265451e+01, 3.58708779146065e+01, 3.58186194145758e+01, 3.57781189894817e+01, 3.57474714349804e+01,\n                                                3.57249103830166e+01, 3.57088292586616e+01, 3.56977977241505e+01, 3.56905729273723e+01, 3.56861050101521e+01,\n                                                3.56835365169988e+01, 3.56821955656261e+01, 3.56815828815240e+01, 3.56813530438036e+01, 3.56812905224878e+01,\n                                                3.56812812944769e+01, 3.56812804184843e+01, 3.56812625590765e+01, 3.56811415591713e+01, 3.56806967538646e+01,\n                                                3.56795110903811e+01, 3.56769164174083e+01, 3.56719477778629e+01, 3.56633087412935e+01, 3.56493497052452e+01,\n                                                3.56280609589997e+01, 3.55970821075401e+01, 3.55537291592565e+01, 3.54950401459985e+01, 3.54178395320651e+01,\n                                                3.53188208576630e+01, 3.51946460543893e+01, 3.50420586994696e+01, 3.48580072117208e+01, 3.46397727393808e+01,\n                                                3.43850953775089e+01, 3.40922915227473e+01, 3.37603547675914e+01, 3.33890328879628e+01, 3.29788743083739e+01,\n                                                3.25312390425661e+01, 3.20482715650572e+01, 3.15328363251026e+01, 3.09884204235879e+01, 3.04190118082817e+01,\n                                                2.98289644015830e+01, 2.92228629401708e+01, 2.86053992589171e+01, 2.79812681414928e+01, 2.73550853633155e+01,\n                                                2.67313246571670e+01, 2.61142659754434e+01, 2.55079463247500e+01, 2.49161073036785e+01, 2.43421393233094e+01,\n                                                2.37890287260505e+01, 2.32593174336126e+01, 2.27550833845682e+01, 2.22779445852303e+01, 2.18290831522815e+01,\n                                                2.14092815624652e+01, 2.10189628591251e+01, 2.06582289290714e+01, 2.03268942171117e+01, 2.00245148206651e+01,\n                                                1.97504142194999e+01, 1.95037071406672e+01, 1.92833227232931e+01, 1.90880276581975e+01, 1.89164495730500e+01,\n                                                1.87671006898399e+01, 1.86384016769455e+01, 1.85287055971135e+01, 1.84363218603758e+01, 1.83595400889065e+01,\n                                                1.82966537695878e+01, 1.82459835059927e+01, 1.82058995920262e+01, 1.81748435283798e+01, 1.81513480065953e+01,\n                                                1.81340548098578e+01, 1.81217300380329e+01, 1.81132760662586e+01, 1.81077396960021e+01, 1.81043160540688e+01,\n                                                1.81023479329059e+01, 1.81013204348694e+01, 1.81008509713395e+01, 1.81006748607870e+01, 1.81006269545812e+01,\n                                                1.81006198837305e+01, 1.81006192544753e+01, 1.81006068675120e+01, 1.81005229441688e+01, 1.81002144354023e+01,\n                                                1.80993920821292e+01, 1.80975924725762e+01, 1.80941463516699e+01, 1.80881546033510e+01, 1.80784732577964e+01,\n                                                1.80637087874966e+01, 1.80422248275536e+01, 1.80121612593860e+01, 1.79714663048907e+01, 1.79179418659751e+01,\n                                                1.78493017991195e+01, 1.77632421404327e+01, 1.76575215199566e+01, 1.75300491749058e+01, 1.73789771602212e+01,\n                                                1.72027926415953e+01, 1.70004056171352e+01, 1.67712271065632e+01, 1.65152328029084e+01, 1.62330074131013e+01,\n                                                1.59257654341349e+01, 1.55953449599812e+01, 1.52441723648702e+01, 1.48751974395108e+01, 1.44918007823864e+01,\n                                                1.40976778340367e+01, 1.36967065575250e+01, 1.32928079207400e+01, 1.28898094995430e+01, 1.24913223144905e+01,\n                                                1.21006393572526e+01, 1.17206614312662e+01, 1.13538524851618e+01, 1.10022232342674e+01, 1.06673391429657e+01,\n                                                1.03503471485071e+01, 1.00520149295619e+01, 9.77277689659314e+00, 9.51278209236855e+00, 9.27194048950525e+00,\n                                                9.04996546205739e+00, 8.84641129664568e+00, 8.66070541129231e+00, 8.49217546878820e+00, 8.34007185877504e+00,\n                                                8.20358614905849e+00, 8.08186613661986e+00, 7.97402810993912e+00, 7.87916689524886e+00, 7.79636421360831e+00,\n                                                7.72469582684138e+00, 7.66323789722702e+00, 7.61107292582458e+00, 7.56729556551597e+00, 7.53101852677885e+00,\n                                                7.50137870806451e+00, 7.47754359125253e+00, 7.45871785017815e+00, 7.44415003195421e+00, 7.43313909265703e+00,\n                                                7.42504050694247e+00, 7.41927163074669e+00, 7.41531598156559e+00, 7.41272611409655e+00, 7.41112481004202e+00,\n                                                7.41020436679036e+00, 7.40972385526327e+00, 7.40950431535001e+00, 7.40942195993009e+00, 7.40939955740825e+00,\n                                                7.40939625084837e+00, 7.40939595853153e+00, 7.40939022607870e+00, 7.40935138800153e+00, 7.40920861712984e+00,\n                                                7.40882805783185e+00, 7.40799529139361e+00, 7.40640074393450e+00, 7.40362875065141e+00, 7.39915098978517e+00,\n                                                7.39232499108470e+00, 7.38239838856854e+00, 7.36851950290269e+00, 7.34975467972143e+00, 7.32511255448326e+00,\n                                                7.29357504834390e+00, 7.25413442442487e+00, 7.20583517196524e+00, 7.14781888367718e+00, 7.07936971930448e+00,\n                                                6.99995759314942e+00, 6.90927597694276e+00, 6.80727125082835e+00, 6.69416091204395e+00, 6.57043866459464e+00,\n                                                6.43686541260999e+00, 6.29444636505555e+00, 6.14439569389111e+00, 5.98809131715629e+00, 5.82702324910497e+00,\n                                                5.66273943899149e+00, 5.49679302229566e+00, 5.33069442205320e+00, 5.16587084966500e+00, 5.00363464330256e+00,\n                                                4.84516077717784e+00, 4.69147298421025e+00, 4.54343737689260e+00, 4.40176222944757e+00, 4.26700261036552e+00,\n                                                4.13956870502552e+00, 4.01973684012567e+00, 3.90766236017906e+00, 3.80339360320846e+00, 3.70688629716506e+00,\n                                                3.61801777517609e+00, 3.53660050241062e+00, 3.46239452289358e+00, 3.39511856325154e+00, 3.33445965947097e+00,\n                                                3.28008128985367e+00, 3.23163009348482e+00, 3.18874132423581e+00, 3.15104323523066e+00, 3.11816061026998e+00,\n                                                3.08971766084996e+00, 3.06534049441642e+00, 3.04465933527432e+00, 3.02731064740682e+00, 3.01293927096204e+00,\n                                                3.00120064349382e+00, 2.99176313511946e+00, 2.98431048550270e+00, 2.97854429202776e+00, 2.97418646487459e+00,\n                                                2.97098153813620e+00, 2.96869870864026e+00, 2.96713346729601e+00, 2.96610869239213e+00, 2.96547509019869e+00,\n                                                2.96511089431826e+00, 2.96492076936403e+00, 2.96483390383848e+00, 2.96480131825005e+00, 2.96479245424308e+00,\n                                                2.96479114593653e+00, 2.96479102848743e+00, 2.96478870503654e+00, 2.96477296337430e+00, 2.96471509624804e+00,\n                                                2.96456085056710e+00, 2.96422332232980e+00, 2.96357704817400e+00, 2.96245358739783e+00, 2.96063889068080e+00,\n                                                2.95787275084547e+00, 2.95385061883525e+00, 2.94822803440924e+00, 2.94062785479048e+00, 2.93065035572272e+00,\n                                                2.91788612191297e+00, 2.90193143807149e+00, 2.88240564735945e+00, 2.85896968159943e+00, 2.83134471852514e+00,\n                                                2.79932972532090e+00, 2.76281654722952e+00, 2.72180123255804e+00, 2.67639047434105e+00, 2.62680239521598e+00,\n                                                2.57336137914477e+00, 2.51648720741025e+00, 2.45667931159964e+00, 2.39449742908320e+00, 2.33054026040186e+00,\n                                                2.26542383099539e+00, 2.19976113719127e+00, 2.13414433620017e+00, 2.06913028744887e+00, 2.00522975640304e+00,\n                                                1.94290014310762e+00, 1.88254126871264e+00, 1.82449358326335e+00, 1.76903814646292e+00, 1.71639784440978e+00,\n                                                1.66673948187011e+00, 1.62017656897382e+00, 1.57677275248942e+00, 1.53654589758260e+00, 1.49947280614694e+00,\n                                                1.46549448549436e+00, 1.43452179192789e+00, 1.40644120231823e+00, 1.38112043663261e+00, 1.35841367228498e+00,\n                                                1.33816614904325e+00, 1.32021804388830e+00, 1.30440757973292e+00, 1.29057340514332e+00, 1.27855633546166e+00,\n                                                1.26820057660953e+00, 1.25935456353103e+00, 1.25187154023433e+00, 1.24560999277780e+00, 1.24043402479008e+00,\n                                                1.23621374063590e+00, 1.23282567651141e+00, 1.23015329614596e+00, 1.22808754646795e+00, 1.22652745035964e+00,\n                                                1.22538069916976e+00, 1.22456419756314e+00, 1.22400450802550e+00, 1.22363814212642e+00, 1.22341165036705e+00,\n                                                1.22328147159701e+00, 1.22321351568372e+00, 1.22318246815168e+00, 1.22317082148797e+00, 1.22316765334492e+00,\n                                                1.22316718573478e+00, 1.22316714262949e+00, 1.22316627733908e+00, 1.22316041490039e+00, 1.22313886442248e+00,\n                                                1.22308142234681e+00, 1.22295572996430e+00, 1.22271508372137e+00, 1.22229681592438e+00, 1.22162136894518e+00,\n                                                1.22059219045707e+00, 1.21909657647831e+00, 1.21700757779475e+00, 1.21418705790062e+00, 1.21048994161161e+00,\n                                                1.20576961937533e+00, 1.19988437256730e+00, 1.19270456382655e+00, 1.18412020351840e+00, 1.17404837462043e+00,\n                                                1.16243989524105e+00, 1.14928454592497e+00, 1.13461421355508e+00, 1.11850342577739e+00, 1.10106697819118e+00,\n                                                1.08245467970784e+00, 1.06284362131434e+00, 1.04242874382307e+00, 1.02141275639217e+00, 9.99996559050714e-01,\n                                                9.78371203506896e-01, 9.56712102376983e-01, 9.35175748199953e-01, 9.13898751097122e-01, 8.92998663657508e-01,\n                                                8.72575901864337e-01, 8.52716093733136e-01, 8.33492340642550e-01, 8.14967084616967e-01, 7.97193470675580e-01,\n                                                7.80216235966719e-01, 7.64072235084711e-01, 7.48790733118000e-01, 7.34393583675825e-01, 7.20895377818849e-01,\n                                                7.08303616096174e-01, 6.96618928150599e-01, 6.85835345677248e-01, 6.75940624478329e-01, 6.66916607838203e-01,\n                                                6.58739623940107e-01, 6.51380912427783e-01, 6.44807077986314e-01, 6.38980571102394e-01, 6.33860197558974e-01,\n                                                6.29401658606213e-01, 6.25558123179928e-01, 6.22280832132489e-01, 6.19519732354007e-01, 6.17224136060457e-01,\n                                                6.15343397592767e-01, 6.13827597003024e-01, 6.12628216725909e-01, 6.11698794988015e-01, 6.10995537549130e-01,\n                                                6.10477868140521e-01, 6.10108897773145e-01, 6.09855794074718e-01, 6.09690034031843e-01, 6.09587526914851e-01,\n                                                6.09528598585570e-01, 6.09497833581301e-01, 6.09483777000918e-01, 6.09478503925359e-01, 6.09477069524075e-01,\n                                                6.09476857809568e-01, 6.09476837633380e-01, 6.09476425460713e-01, 6.09473632935703e-01, 6.09463367397652e-01,\n                                                6.09436003852082e-01, 6.09376122496045e-01, 6.09261454388829e-01, 6.09062082661012e-01, 6.08739944390834e-01,\n                                                6.08248675295130e-01, 6.07533834863204e-01, 6.06533542443600e-01, 6.05179543928671e-01, 6.03398713071343e-01,\n                                                6.01114970561284e-01, 5.98251578006582e-01, 5.94733734205789e-01, 5.90491370083086e-01, 5.85462010086701e-01,\n                                                5.79593546184526e-01, 5.72846760352775e-01, 5.65197436273195e-01, 5.56637922574495e-01, 5.47178047480472e-01,\n                                                5.36845334356670e-01, 5.25684523034556e-01, 5.13756455082742e-01, 5.01136424537478e-01, 4.87912122860095e-01,\n                                                4.74181315126387e-01, 4.60049374768872e-01, 4.45626781529640e-01, 4.31026659114636e-01, 4.16362403249650e-01,\n                                                4.01745433414277e-01, 3.87283094908241e-01, 3.73076740561473e-01, 3.59220028781849e-01, 3.45797481031866e-01,\n                                                3.32883342401004e-01, 3.20540781191326e-01, 3.08821447673822e-01, 2.97765391050433e-01, 2.87401311062666e-01,\n                                                2.77747100539813e-01, 2.68810620465032e-01, 2.60590641418901e-01, 2.53077884658396e-01, 2.46256101583342e-01,\n                                                2.40103140238858e-01, 2.34591959884099e-01, 2.29691567740858e-01, 2.25367864384665e-01, 2.21584394844442e-01,\n                                                2.18303010744663e-01, 2.15484454518219e-01, 2.13088879867584e-01, 2.11076323475794e-01, 2.09407141806878e-01,\n                                                2.08042424104676e-01, 2.06944388861004e-01, 2.06076766558823e-01, 2.05405166887800e-01, 2.04897424335314e-01,\n                                                2.04523912489378e-01, 2.04257814883874e-01, 2.04075339004632e-01, 2.03955860263235e-01, 2.03881984308509e-01,\n                                                2.03839518827436e-01, 2.03817349718506e-01, 2.03807220857541e-01, 2.03803421234880e-01, 2.03802387651322e-01,\n                                                2.03802235096774e-01, 2.03802219997272e-01, 2.03801905645761e-01, 2.03799775876277e-01, 2.03791946742427e-01,\n                                                2.03771078098754e-01, 2.03725412417000e-01, 2.03637975698371e-01, 2.03485980478689e-01, 2.03240471419420e-01,\n                                                2.02866254122355e-01, 2.02322146579618e-01, 2.01561588793552e-01, 2.00533638201449e-01, 1.99184365390479e-01,\n                                                1.97458645360470e-01, 1.95302314139752e-01, 1.92664629646998e-01, 1.89500941167793e-01, 1.85775436641080e-01,\n                                                1.81463805082643e-01, 1.76555627558741e-01, 1.71056299012406e-01, 1.64988289357822e-01, 1.58391578823938e-01,\n                                                1.51323150763901e-01, 1.43855493492083e-01, 1.36074146237561e-01, 1.28074414613195e-01, 1.19957466813602e-01,\n                                                1.11826090440189e-01, 1.03780429747587e-01, 9.59140262330749e-02, 8.83104497984135e-02, 8.10407381048037e-02,\n                                                7.41617693054053e-02, 6.77155929571285e-02, 6.17296508989540e-02, 5.62177467258493e-02, 5.11815766204364e-02,\n                                                4.66126173865149e-02, 4.24941761949214e-02, 3.88034341218031e-02, 3.55133540550696e-02, 3.25943654434724e-02,\n                                                3.00157777496395e-02, 2.77469075174679e-02, 2.57579288923040e-02, 2.40204740793359e-02, 2.25080195366303e-02,\n                                                2.11960971807628e-02, 2.00623691979587e-02, 1.90866017259737e-02, 1.82505679539702e-02, 1.75379059961642e-02,\n                                                1.69339518432707e-02, 1.64255631281236e-02, 1.60009455091057e-02, 1.56494901883377e-02, 1.53616283723892e-02,\n                                                1.51287062444254e-02, 1.49428821403319e-02, 1.47970460169375e-02, 1.46847599104376e-02, 1.46002168880557e-02,\n                                                1.45382150092246e-02, 1.44941420718965e-02, 1.44639664737269e-02, 1.44442294081557e-02, 1.44320338599471e-02,\n                                                1.44250264506667e-02, 1.44213690592778e-02, 1.44196982198110e-02, 1.44190714711812e-02, 1.44189009841966e-02,\n                                                1.44188758208088e-02, 1.44188732251109e-02, 1.44188181242555e-02, 1.44184448127902e-02, 1.44170725547212e-02,\n                                                1.44134151901341e-02, 1.44054140367871e-02, 1.43901019763604e-02, 1.43635088947605e-02, 1.43206204766528e-02,\n                                                1.42554041033094e-02, 1.41609165685423e-02, 1.40295076019186e-02, 1.38531297721158e-02, 1.36237583497234e-02,\n                                                1.33339136424269e-02, 1.29772634208933e-02, 1.25492656139272e-02, 1.20477939713197e-02, 1.14736754652540e-02,\n                                                1.08310619965977e-02, 1.01275642983012e-02, 9.37409502959952e-03, 8.58440046154385e-03, 7.77430201576124e-03,\n                                                6.96071321756619e-03, 6.16053544747786e-03, 5.38955853005518e-03, 4.66149367115065e-03, 3.98724516460902e-03,\n                                                3.37448773824178e-03, 2.82756717832910e-03, 2.34769414099389e-03, 1.93336505721220e-03, 1.58092584607061e-03,\n                                                1.28519389106430e-03, 1.04006631870845e-03, 8.39060924306523e-04, 6.75754799260631e-04, 5.44103233409032e-04,\n                                                4.38638436037309e-04, 3.54563538678576e-04, 2.87768820584233e-04, 2.34800034192517e-04, 1.92802510724732e-04,\n                                                1.59454127242498e-04, 1.32892153203557e-04, 1.11637151547939e-04, 9.45194011023887e-05, 8.06147225773657e-05,\n                                                6.91941905444082e-05, 5.96873390890096e-05, 5.16546627409298e-05, 4.47646681749347e-05, 3.87727824744388e-05,\n                                                3.35018572599211e-05, 2.88252079769791e-05, 2.46529516232386e-05, 2.09216306501503e-05, 1.75865002773890e-05,\n                                                1.46157007634429e-05, 1.19857193539019e-05, 9.67782091265690e-06, 7.67532010570449e-06, 5.96163870625332e-06,\n                                                4.51907422416298e-06, 3.32816635761901e-06, 2.36751787952016e-06, 1.61392996744780e-06, 1.04273235024266e-06,\n                                                6.28225237164770e-07, 2.84217094304040e-14, 1.42108547152020e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.10000000000000e+01,  7.09999996885834e+01,  7.09999900589631e+01, 7.09999248166917e+01,\n                                                7.09996849765481e+01,  7.09990456304101e+01,  7.09976463337023e+01, 7.09949661176182e+01,\n                                                7.09903039642773e+01,  7.09827653804708e+01,  7.09712554901700e+01, 7.09544788630979e+01,\n                                                7.09309461412325e+01,  7.08989874556022e+01,  7.08567726741738e+01, 7.08023386973806e+01,\n                                                7.07336242879106e+01,  7.06485131935073e+01,  7.05448864405872e+01, 7.04206844455859e+01,\n                                                7.02739788247996e+01,  7.01030523891442e+01,  6.99064838738311e+01, 6.96832317949064e+01,\n                                                6.94327099820413e+01,  6.91548464485218e+01,  6.88501178658247e+01, 6.85195542306902e+01,\n                                                6.81647120877597e+01,  6.77876191564996e+01,  6.73906973557476e+01, 6.69766739790283e+01,\n                                                6.65484914527000e+01,  6.61092245911864e+01,  6.56620110479513e+01, 6.52099966899443e+01,\n                                                6.47562939794404e+01,  6.43039490319886e+01,  6.38559123158989e+01, 6.34150089321691e+01,\n                                                6.29839065520019e+01,  6.25650815691735e+01,  6.21607859757273e+01, 6.17730182769563e+01,\n                                                6.14035012979411e+01,  6.10536683842908e+01,  6.07246579370526e+01, 6.04173150546305e+01,\n                                                6.01321985673476e+01,  5.98695918713130e+01,  5.96295164243264e+01, 5.94117472758825e+01,\n                                                5.92158303902789e+01,  5.90411017319866e+01,  5.88867081405172e+01, 5.87516299816862e+01,\n                                                5.86347054733380e+01,  5.85346564799371e+01,  5.84501154697506e+01, 5.83796532379497e+01,\n                                                5.83218069210683e+01,  5.82751077638066e+01,  5.82381080496370e+01, 5.82094065746154e+01,\n                                                5.81876720324888e+01,  5.81716636919720e+01,  5.81602487865612e+01, 5.81524161047209e+01,\n                                                5.81472853631217e+01,  5.81441120651520e+01,  5.81422876864850e+01, 5.81413351826387e+01,\n                                                5.81408999726201e+01,  5.81407367098083e+01,  5.81406922983169e+01, 5.81406857432721e+01,\n                                                5.81406848459790e+01,  5.81406636549523e+01,  5.81405200828381e+01, 5.81399922996948e+01,\n                                                5.81385854476974e+01,  5.81355067087151e+01,  5.81296110233513e+01, 5.81193598408564e+01,\n                                                5.81027951301904e+01,  5.80775306944876e+01,  5.80407625688531e+01, 5.79892998988556e+01,\n                                                5.79196171451858e+01,  5.78279276980205e+01,  5.77102779956712e+01, 5.75626600503049e+01,\n                                                5.73811389698049e+01,  5.71619907723713e+01,  5.69018447088295e+01, 5.65978236242785e+01,\n                                                5.62476757103013e+01,  5.58498912604537e+01,  5.54037985017137e+01, 5.49096329311947e+01,\n                                                5.43685747445941e+01,  5.37827492606217e+01,  5.31551865206435e+01, 5.24897392718478e+01,\n                                                5.17909634460402e+01,  5.10639710099163e+01,  5.03142697091968e+01, 4.95476056605014e+01,\n                                                4.87698218518038e+01,  4.79867390520056e+01,  4.72040578168489e+01, 4.64272744838135e+01,\n                                                4.56616028979129e+01,  4.49118975839816e+01,  4.41825808711060e+01, 4.34775819568926e+01,\n                                                4.28002966224281e+01,  4.21535719215692e+01,  4.15397136368443e+01, 4.09605095145723e+01,\n                                                4.04172602725494e+01,  3.99108124307638e+01,  3.94415901023038e+01, 3.90096253082120e+01,\n                                                3.86145875498033e+01,  3.82558135293617e+01,  3.79323375784507e+01, 3.76429229519398e+01,\n                                                3.73860938788674e+01,  3.71601681619346e+01,  3.69632901346840e+01, 3.67934638490443e+01,\n                                                3.66485864199712e+01,  3.65264814663974e+01,  3.64249325481327e+01, 3.63417164113382e+01,\n                                                3.62746357341967e+01,  3.62215509270746e+01,  3.61804104066113e+01, 3.61492786486749e+01,\n                                                3.61263612466013e+01,  3.61100261707250e+01,  3.60988204507107e+01, 3.60914815862959e+01,\n                                                3.60869431321094e+01,  3.60843340904426e+01,  3.60829719700307e+01, 3.60823496138343e+01,\n                                                3.60821161478121e+01,  3.60820526395135e+01,  3.60820432658260e+01, 3.60820423760047e+01,\n                                                3.60820242346624e+01,  3.60819013246137e+01,  3.60814494974867e+01, 3.60802451169408e+01,\n                                                3.60776094848362e+01,  3.60725624140037e+01,  3.60637870171472e+01, 3.60496076735154e+01,\n                                                3.60279829976002e+01,  3.59965154359992e+01,  3.59524788197244e+01, 3.58928647568735e+01,\n                                                3.58144481271957e+01,  3.57138711128726e+01,  3.55877441703444e+01, 3.54327611501818e+01,\n                                                3.52458244764548e+01,  3.50241750097651e+01,  3.47655200729799e+01, 3.44681522657630e+01,\n                                                3.41310512869936e+01,  3.37539611714571e+01,  3.33374362648916e+01, 3.28828510196408e+01,\n                                                3.23923713387667e+01,  3.18688886415696e+01,  3.13159217515737e+01, 3.07374955087103e+01,\n                                                3.01380078146480e+01,  2.95220977115493e+01,  2.88945254352637e+01, 2.82600712028648e+01,\n                                                2.76234537135201e+01,  2.69892636957448e+01,  2.63619044019573e+01, 2.57455313480378e+01,\n                                                2.51439880443684e+01,  2.45607412051303e+01,  2.39988245929344e+01, 2.34608019726889e+01,\n                                                2.29487556167186e+01,  2.24642996599168e+01,  2.20086113306762e+01, 2.15824705943753e+01,\n                                                2.11863002259922e+01,  2.08202018694199e+01,  2.04839870531310e+01, 2.01772042112191e+01,\n                                                1.98991634191550e+01,  1.96489603035948e+01,  1.94254999988721e+01, 1.92275214774904e+01,\n                                                1.90536222322745e+01,  1.89022831380558e+01,  1.87718933079824e+01, 1.86607748096080e+01,\n                                                1.85672071603495e+01,  1.84894515455021e+01,  1.84257746807105e+01, 1.83744721762956e+01,\n                                                1.83338911648071e+01,  1.83024518425553e+01,  1.82786674691869e+01, 1.82611622840052e+01,\n                                                1.82486867479866e+01,  1.82401295161517e+01,  1.82345255907053e+01, 1.82310602002956e+01,\n                                                1.82290680888950e+01,  1.82280280689823e+01,  1.82275528848323e+01, 1.82273746283955e+01,\n                                                1.82273261384683e+01,  1.82273189814619e+01,  1.82273183445394e+01, 1.82273058066460e+01,\n                                                1.82272208607370e+01,  1.82269085930461e+01,  1.82260762209003e+01, 1.82242546905657e+01,\n                                                1.82207666089659e+01,  1.82147019539821e+01,  1.82049029421015e+01, 1.81899593472850e+01,\n                                                1.81682154388188e+01,  1.81377895105735e+01,  1.80966066800578e+01, 1.80424452178741e+01,\n                                                1.79729961124458e+01,  1.78859348842215e+01,  1.77790038629950e+01, 1.76501022800217e+01,\n                                                1.74973806718963e+01,  1.73193353257234e+01,  1.71148978939555e+01, 1.68835149383877e+01,\n                                                1.66252120739758e+01,  1.63406376100176e+01,  1.60310811683568e+01, 1.56984637539270e+01,\n                                                1.53452972345416e+01,  1.49746132018704e+01,  1.45898636869836e+01, 1.41947989799961e+01,\n                                                1.37933304547675e+01,  1.33893883005196e+01,  1.29867849050871e+01, 1.25890940080740e+01,\n                                                1.21995536653749e+01,  1.18209979132491e+01,  1.14558184184679e+01, 1.11059540471402e+01,\n                                                1.07729037469396e+01,  1.04577567221571e+01,  1.01612335988626e+01, 9.88373290131491e+00,\n                                                9.62537833775141e+00,  9.38606376260081e+00,  9.16549395966808e+00, 8.96322041043816e+00,\n                                                8.77867191971301e+00,  8.61118039535920e+00,  8.46000228988539e+00, 8.32433628649869e+00,\n                                                8.20333781516857e+00,  8.09613095721014e+00,  8.00181826164224e+00, 7.91948896016854e+00,\n                                                7.84822602921545e+00,  7.78711250335085e+00,  7.73523739115696e+00, 7.69170148038386e+00,\n                                                7.65562324402482e+00,  7.62614497464805e+00,  7.60243918420404e+00, 7.58371521511595e+00,\n                                                7.56922592118348e+00,  7.55827419964389e+00,  7.55021909462123e+00, 7.54448115253176e+00,\n                                                7.54054669588776e+00,  7.53797069550732e+00,  7.53637796215379e+00, 7.53546244428522e+00,\n                                                7.53498450369531e+00,  7.53476613833733e+00,  7.53468422351308e+00, 7.53466194084202e+00,\n                                                7.53465865197178e+00,  7.53465836121881e+00,  7.53465265943381e+00, 7.53461402913412e+00,\n                                                7.53447202205108e+00,  7.53409349855362e+00,  7.53326518650398e+00, 7.53167916624075e+00,\n                                                7.52892199089781e+00,  7.52446815043044e+00,  7.51767857866987e+00, 7.50780486750938e+00,\n                                                7.49399976800151e+00,  7.47533439994525e+00,  7.45082233742069e+00, 7.41945037414798e+00,\n                                                7.38021530084512e+00,  7.33216546887736e+00,  7.27444531648415e+00, 7.20634046521582e+00,\n                                                7.12732054153745e+00,  7.03707663328706e+00,  6.93555033214248e+00, 6.82295169048845e+00,\n                                                6.69976413789496e+00,  6.56673540985398e+00,  6.42485473954979e+00, 6.27531781172866e+00,\n                                                6.11948211159756e+00,  5.95881615403911e+00,  5.79484650752799e+00, 5.62910645098849e+00,\n                                                5.46308953218110e+00,  5.29821035444701e+00,  5.13577381445396e+00, 4.97695298305058e+00,\n                                                4.82277504818447e+00,  4.67411429861484e+00,  4.53169098248250e+00, 4.39607491853161e+00,\n                                                4.26769285396676e+00,  4.14683867241679e+00,  4.03368563008310e+00, 3.92829984830672e+00,\n                                                3.83065434241119e+00,  3.74064294149422e+00,  3.65809355985991e+00, 3.58278041229161e+00,\n                                                3.51443490829706e+00,  3.45275509884074e+00,  3.39741366981362e+00, 3.34806457164656e+00,\n                                                3.30434844137426e+00,  3.26589701348726e+00,  3.23233673286738e+00, 3.20329178168528e+00,\n                                                3.17838671690016e+00,  3.15724888978571e+00,  3.13951078671541e+00, 3.12481239356616e+00,\n                                                3.11280364640517e+00,  3.10314699031795e+00,  3.09552002810625e+00, 3.08961820311571e+00,\n                                                3.08515742780482e+00,  3.08187654404453e+00,  3.07953948455837e+00, 3.07793699892650e+00,\n                                                3.07688781299028e+00,  3.07623910717240e+00,  3.07586622600577e+00, 3.07567156591075e+00,\n                                                3.07558262809613e+00,  3.07554926509692e+00,  3.07554018961316e+00, 3.07553885009297e+00,\n                                                3.07553872984178e+00,  3.07553635095785e+00,  3.07552023372706e+00, 3.07546098594919e+00,\n                                                3.07530305978834e+00,  3.07495747605083e+00,  3.07429577135375e+00, 3.07314546643182e+00,\n                                                3.07128735479380e+00,  3.06845490849733e+00,  3.06433608411555e+00, 3.05857777699119e+00,\n                                                3.05079310475796e+00,  3.04057159216647e+00,  3.02749217249020e+00, 3.01113871673874e+00,\n                                                2.99111756021854e+00,  2.96707623706622e+00,  2.93872238830511e+00, 2.90584161681730e+00,\n                                                2.86831296504461e+00,  2.82612072457903e+00,  2.77936147307224e+00, 2.72824557251836e+00,\n                                                2.67309282590398e+00,  2.61432252148374e+00,  2.55243862068777e+00, 2.48801128545068e+00,\n                                                2.42165622251640e+00,  2.35401340214550e+00,  2.28572658179974e+00, 2.21742476884006e+00,\n                                                2.14970636084796e+00,  2.08312629482043e+00,  2.01818619772740e+00, 1.95532731411649e+00,\n                                                1.89492590515992e+00,  1.83729084119916e+00,  1.78266319187765e+00, 1.73121769241827e+00,\n                                                1.68306598431283e+00,  1.63826147684810e+00,  1.59680556931278e+00, 1.55865485280599e+00,\n                                                1.52372882078210e+00,  1.49191759112644e+00,  1.46308918848554e+00, 1.43709603979671e+00,\n                                                1.41378047080482e+00,  1.39297912712540e+00,  1.37452635743341e+00, 1.35825667683336e+00,\n                                                1.34400647374135e+00,  1.33161513884727e+00,  1.32092578811351e+00, 1.31178573161063e+00,\n                                                1.30404681305718e+00,  1.29756571592331e+00,  1.29220430367953e+00, 1.28783003562609e+00,\n                                                1.28431647627947e+00,  1.28154389568587e+00,  1.27939994037135e+00, 1.27778034012097e+00,\n                                                1.27658960473502e+00,  1.27574165776039e+00,  1.27516035132686e+00, 1.27477980785332e+00,\n                                                1.27454454046251e+00,  1.27440931402472e+00,  1.27433872203326e+00, 1.27430646988608e+00,\n                                                1.27429437130229e+00,  1.27429108022342e+00,  1.27429059446814e+00, 1.27429054969018e+00,\n                                                1.27428965082291e+00,  1.27428356089405e+00,  1.27426117410825e+00, 1.27420150251231e+00,\n                                                1.27407092970981e+00,  1.27382093239349e+00,  1.27338638894302e+00, 1.27268459833223e+00,\n                                                1.27161513529394e+00,  1.27006066508152e+00,  1.26788882807820e+00, 1.26495527527115e+00,\n                                                1.26110788510290e+00,  1.25619211720907e+00,  1.25005735932879e+00, 1.24256400554498e+00,\n                                                1.23359087844402e+00,  1.22304249252466e+00,  1.21085557390876e+00, 1.19700422648798e+00,\n                                                1.18150318799186e+00,  1.16440876200423e+00,  1.14581723808136e+00, 1.12586089544571e+00,\n                                                1.10470197984699e+00,  1.08252528966894e+00,  1.05953015079122e+00, 1.03592256584648e+00,\n                                                1.01190819330988e+00,  9.87686583868253e-01,  9.63446839453042e-01, 9.39364630431257e-01,\n                                                9.15600354930248e-01,  8.92298165058193e-01,  8.69585601824625e-01, 8.47573640952561e-01,\n                                                8.26357021602874e-01,  8.06014785754940e-01,  7.86610988192791e-01, 7.68195547908988e-01,\n                                                7.50805209494786e-01,  7.34464576755940e-01,  7.19187176877512e-01, 7.04976514901787e-01,\n                                                6.91827085014964e-01,  6.79725315344101e-01,  6.68650434305945e-01, 6.58575257029241e-01,\n                                                6.49466898718970e-01,  6.41287427534991e-01,  6.33994472682829e-01, 6.27541804349519e-01,\n                                                6.21879901370519e-01,  6.16956520550332e-01,  6.12717278752740e-01, 6.09106255479531e-01,\n                                                6.06066619847070e-01,  6.03541281773104e-01,  6.01473562927268e-01, 5.99807878736073e-01,\n                                                5.98490418656525e-01,  5.97469808290981e-01,  5.96697733977607e-01, 5.96129508532954e-01,\n                                                5.95724556088697e-01,  5.95446794631940e-01,  5.95264896999950e-01, 5.95152414652489e-01,\n                                                5.95087753365490e-01,  5.95053995765426e-01,  5.95038571963102e-01, 5.95032786014769e-01,\n                                                5.95031212101475e-01,  5.95030979795354e-01,  5.95030957656817e-01, 5.95030505395783e-01,\n                                                5.95027441268044e-01,  5.95016177318669e-01,  5.94986152597741e-01, 5.94920448454275e-01,\n                                                5.94794633340484e-01,  5.94575890411988e-01,  5.94222479448987e-01, 5.93683582105271e-01,\n                                                5.92899575143207e-01,  5.91802768751961e-01,  5.90318634776125e-01, 5.88367531393629e-01,\n                                                5.85866905726775e-01,  5.82733924298225e-01,  5.78888444774364e-01, 5.74256204302486e-01,\n                                                5.68772064692851e-01,  5.62383128506625e-01,  5.55051528654360e-01, 5.46756702060748e-01,\n                                                5.37496987406954e-01,  5.27290436386650e-01,  5.16174791758544e-01, 5.04206654823008e-01,\n                                                4.91459929146387e-01,  4.78023676396319e-01,  4.63999547158650e-01, 4.49498952655020e-01,\n                                                4.34640125900174e-01,  4.19545190901118e-01,  4.04337325763137e-01, 3.89138078670996e-01,\n                                                3.74064879690209e-01,  3.59228786502342e-01,  3.44732504749160e-01, 3.30668727619425e-01,\n                                                3.17118838890082e-01,  3.04152015242977e-01,  2.91824746816374e-01, 2.80180771957617e-01,\n                                                2.69251397076573e-01,  2.59056149756177e-01,  2.49603696382806e-01, 2.40892946502086e-01,\n                                                2.32914265195035e-01,  2.25650720954278e-01,  2.19079307921916e-01, 2.13172095731267e-01,\n                                                2.07897275505914e-01,  2.03220085139151e-01,  1.99103609641455e-01, 1.95509462430039e-01,\n                                                1.92398360683441e-01,  1.89730612336746e-01,  1.87466534183329e-01, 1.85566820229525e-01,\n                                                1.83992877322154e-01,  1.82707141570376e-01,  1.81673384653692e-01, 1.80857014194615e-01,\n                                                1.80225367414280e-01,  1.79747992708002e-01,  1.79396909954704e-01, 1.79146837629276e-01,\n                                                1.78975373346461e-01,  1.78863114438442e-01,  1.78793706535785e-01, 1.78753810733497e-01,\n                                                1.78732983516298e-01,  1.78723467842431e-01,  1.78719898258066e-01, 1.78718927251495e-01,\n                                                1.78718783933220e-01,  1.78718769747903e-01,  1.78718474428550e-01, 1.78716473605633e-01,\n                                                1.78709118506688e-01,  1.78689513571740e-01,  1.78646614021289e-01, 1.78564476826622e-01,\n                                                1.78421703936635e-01,  1.78191117799742e-01,  1.77839710088392e-01, 1.77328903944812e-01,\n                                                1.76615166578770e-01,  1.75651001108463e-01,  1.74386332741932e-01, 1.72770283814444e-01,\n                                                1.70753304684297e-01,  1.68289594008257e-01,  1.65339704735729e-01, 1.61873194900167e-01,\n                                                1.57871149733779e-01,  1.53328379300675e-01,  1.48255089260005e-01, 1.42677836169881e-01,\n                                                1.36639615648861e-01,  1.30198991578325e-01,  1.23428253607486e-01, 1.16410680946160e-01,\n                                                1.09237081880266e-01,  1.02001857732418e-01,  9.47988944297009e-02, 8.77176046138288e-02,\n                                                8.08394238343482e-02,  7.42350080930692e-02,  6.79622958188872e-02, 6.20654990504335e-02,\n                                                5.65749917595610e-02,  5.15079818106727e-02,  4.68697966297213e-02, 4.26555851757655e-02,\n                                                3.88522387026171e-02,  3.54403544066031e-02,  3.23961015979535e-02, 2.96928915394972e-02,\n                                                2.73027928543996e-02,  2.51976697255571e-02,  2.33500474898278e-02, 2.17337290339259e-02,\n                                                2.03241963275502e-02,  1.90988359444333e-02,  1.80370272512249e-02, 1.71201287528646e-02,\n                                                1.63313932675351e-02,  1.56558372176079e-02,  1.50800840686998e-02, 1.45921972358138e-02,\n                                                1.41815137769612e-02,  1.38384869370469e-02,  1.35545430125461e-02, 1.33219559655657e-02,\n                                                1.31337415941317e-02,  1.29835717451385e-02,  1.28657079484498e-02, 1.27749528955832e-02,\n                                                1.27066173651684e-02,  1.26564995181724e-02,  1.26208729815289e-02, 1.25964798490088e-02,\n                                                1.25805246891701e-02,  1.25706658823219e-02,  1.25650011001994e-02, 1.25620444586900e-02,\n                                                1.25606937468632e-02,  1.25601870809078e-02,  1.25600492585676e-02, 1.25600289163970e-02,\n                                                1.25600268180364e-02,  1.25599822743823e-02,  1.25596804885930e-02, 1.25585711516862e-02,\n                                                1.25556145239329e-02,  1.25491463355587e-02,  1.25367678631534e-02, 1.25152693630213e-02,\n                                                1.24805964968573e-02,  1.24278707650944e-02,  1.23514756999583e-02, 1.22452199243668e-02,\n                                                1.21025853451897e-02,  1.19170630021728e-02,  1.16825700581842e-02, 1.13939293320300e-02,\n                                                1.10473787594998e-02,  1.06410643540755e-02,  1.01754596373951e-02, 9.65365054162248e-03,\n                                                9.08143043859866e-03,  8.46716674067238e-03,  7.82142754303550e-03, 7.15639028621240e-03,\n                                                6.48508822624194e-03,  5.82057735128672e-03,  5.17511992362074e-03, 4.55947755223463e-03,\n                                                3.98238710921817e-03,  3.45026128873371e-03,  2.96711922928239e-03, 2.53471923848281e-03,\n                                                2.15284204773525e-03,  1.81966321150639e-03,  1.53215731720024e-03, 1.28649038057915e-03,\n                                                1.07837315540849e-03,  9.03360623667027e-04,  7.57089385004406e-04, 6.35447988770466e-04,\n                                                5.34680432380696e-04,  4.51431856930640e-04,  3.82754039648603e-04, 3.26090459083161e-04,\n                                                2.79254367171689e-04,  2.40403220047369e-04,  2.08006729721433e-04, 1.80807287620155e-04,\n                                                1.57777088659827e-04,  1.38079419357950e-04,  1.21039097280118e-04, 1.06121414361837e-04,\n                                                9.29149358057657e-05,  8.11136561793546e-05,  7.04970606903998e-05, 6.09096326940062e-05,\n                                                5.22423778477332e-05,  4.44180875547318e-05,  3.73805680879968e-05, 3.10870140225461e-05,\n                                                2.55024580013696e-05,  2.05955280705439e-05,  1.63351650854793e-05, 1.26882229523062e-05,\n                                                9.61794263787397e-06,  7.08323696585467e-06,  5.03864717416036e-06, 3.43479271691649e-06,\n                                                2.21914341125284e-06,  1.33698299009666e-06,  7.32483499632508e-07, -2.84217094304040e-14,\n                                                -2.84217094304040e-14, -2.84217094304040e-14, -2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.20000000000000e+01, 7.19999996822531e+01, 7.19999898568889e+01, 7.19999232884194e+01, 7.19996785729659e+01,\n                                                7.19990262305430e+01, 7.19975984892561e+01, 7.19948637887328e+01, 7.19901068563575e+01, 7.19824150040369e+01,\n                                                7.19706710733805e+01, 7.19535532507906e+01, 7.19295418170553e+01, 7.18969328284046e+01, 7.18538587805512e+01,\n                                                7.17983164931511e+01, 7.17282027342266e+01, 7.16413583853225e+01, 7.15356220660676e+01, 7.14088938862498e+01,\n                                                7.12592091829446e+01, 7.10848206367766e+01, 7.08842851412321e+01, 7.06565495637850e+01, 7.04010276533765e+01,\n                                                7.01176594817139e+01, 6.98069455110594e+01, 6.94699498687011e+01, 6.91082713828581e+01, 6.87239855973359e+01,\n                                                6.83195652246725e+01, 6.78977892385203e+01, 6.74616513467232e+01, 6.70142768463714e+01, 6.65588534026082e+01,\n                                                6.60985771265403e+01, 6.56366115928048e+01, 6.51760550623838e+01, 6.47199106349809e+01, 6.42710552676009e+01,\n                                                6.38322059770609e+01, 6.34058841876979e+01, 6.29943811567607e+01, 6.25997280839670e+01, 6.22236738202802e+01,\n                                                6.18676715228777e+01, 6.15328739215051e+01, 6.12201357024198e+01, 6.09300211259773e+01, 6.06628152340191e+01,\n                                                6.04185375479746e+01, 6.01969577076182e+01, 5.99976128867584e+01, 5.98198270105427e+01, 5.96627318309088e+01,\n                                                5.95252898550014e+01, 5.94063190188031e+01, 5.93045188875654e+01, 5.92184980614635e+01, 5.91468023744358e+01,\n                                                5.90879433971551e+01, 5.90404266916327e+01, 5.90027792162337e+01, 5.89735752484189e+01, 5.89514601817358e+01,\n                                                5.89351715669673e+01, 5.89235568077196e+01, 5.89155869894303e+01, 5.89103664172863e+01, 5.89071375601556e+01,\n                                                5.89052812396165e+01, 5.89043120589815e+01, 5.89038692291427e+01, 5.89037031078639e+01, 5.89036579187993e+01,\n                                                5.89036512489863e+01, 5.89036503359830e+01, 5.89036287739358e+01, 5.89034826881064e+01, 5.89029456643336e+01,\n                                                5.89015141806202e+01, 5.88983815378088e+01, 5.88923826281286e+01, 5.88819519626017e+01, 5.88650972265310e+01,\n                                                5.88393904410159e+01, 5.88019785417314e+01, 5.87496147974917e+01, 5.86787119307697e+01, 5.85854170294732e+01,\n                                                5.84657073372565e+01, 5.83155048037441e+01, 5.81308059484060e+01, 5.79078222857374e+01, 5.76431254612669e+01,\n                                                5.73337905370365e+01, 5.69775306345929e+01, 5.65728163253604e+01, 5.61189735214814e+01, 5.56162539068121e+01,\n                                                5.50658721309455e+01, 5.44700044899695e+01, 5.38317454351432e+01, 5.31550216924058e+01, 5.24444689965741e+01,\n                                                5.17052822535315e+01, 5.09430542659426e+01, 5.01636189418554e+01, 4.93729112494904e+01, 4.85768490634731e+01,\n                                                4.77812342048828e+01, 4.69916648500407e+01, 4.62134515474036e+01, 4.54515342837383e+01, 4.47104053309551e+01,\n                                                4.39940473953534e+01, 4.33058957272855e+01, 4.26488269681570e+01, 4.20251705058209e+01, 4.14367339908399e+01,\n                                                4.08848347801158e+01, 4.03703319738298e+01, 3.98936570387259e+01, 3.94548432249139e+01, 3.90535547931333e+01,\n                                                3.86891169369043e+01, 3.83605468039283e+01, 3.80665855898629e+01, 3.78057314459618e+01, 3.75762728987674e+01,\n                                                3.73763225479989e+01, 3.72038509077707e+01, 3.70567203298496e+01, 3.69327189673945e+01, 3.68295946974549e+01,\n                                                3.67450888287360e+01, 3.66769692938451e+01, 3.66230628816373e+01, 3.65812859250129e+01, 3.65496727408448e+01,\n                                                3.65264010373526e+01, 3.65098134723392e+01, 3.64984345709904e+01, 3.64909822970147e+01, 3.64863737129908e+01,\n                                                3.64837243569151e+01, 3.64823411897009e+01, 3.64817092172642e+01, 3.64814721438934e+01, 3.64814076543118e+01,\n                                                3.64813981357892e+01, 3.64813972322190e+01, 3.64813788105704e+01, 3.64812540014094e+01, 3.64807951930144e+01,\n                                                3.64795722035078e+01, 3.64768958488680e+01, 3.64717707999310e+01, 3.64628598310969e+01, 3.64484614545722e+01,\n                                                3.64265027951460e+01, 3.63945493597894e+01, 3.63498330528904e+01, 3.62892993378911e+01, 3.62096738109567e+01,\n                                                3.61075476083830e+01, 3.59794800177553e+01, 3.58221154373947e+01, 3.56323105010442e+01, 3.54072658637382e+01,\n                                                3.51446559694796e+01, 3.48427492504401e+01, 3.45005108071167e+01, 3.41176798522774e+01, 3.36948152169650e+01,\n                                                3.32333041256892e+01, 3.27353322772031e+01, 3.22038168804250e+01, 3.16423083014660e+01, 3.10548696860812e+01,\n                                                3.04459464128974e+01, 2.98202375981586e+01, 2.91825795885847e+01, 2.85378466840626e+01, 2.78908684215379e+01,\n                                                2.72463576128476e+01, 2.66088411328457e+01, 2.59825875686606e+01, 2.53715317972346e+01, 2.47792036394248e+01,\n                                                2.42086719703580e+01, 2.36625142055245e+01, 2.31428144571950e+01, 2.26511856621408e+01, 2.21888059300262e+01,\n                                                2.17564590938931e+01, 2.13545727115483e+01, 2.09832509408172e+01, 2.06423027794301e+01, 2.03312674962676e+01,\n                                                2.00494390743452e+01, 1.97958908431018e+01, 1.95695007589927e+01, 1.93689772814876e+01, 1.91928855465308e+01,\n                                                1.90396735038755e+01, 1.89076977657376e+01, 1.87952490291422e+01, 1.87005770268606e+01, 1.86219150029544e+01,\n                                                1.85575036911542e+01, 1.85056147047733e+01, 1.84645731412888e+01, 1.84327790828094e+01, 1.84087275556994e+01,\n                                                1.83910264171537e+01, 1.83784115784802e+01, 1.83697589644399e+01, 1.83640926499170e+01, 1.83605887084884e+01,\n                                                1.83585744459063e+01, 1.83575228645125e+01, 1.83570423986101e+01, 1.83568621609325e+01, 1.83568131320717e+01,\n                                                1.83568058955202e+01, 1.83568052515188e+01, 1.83567925742758e+01, 1.83567066842629e+01, 1.83563909460899e+01,\n                                                1.83555493240201e+01, 1.83537075560704e+01, 1.83501807385484e+01, 1.83440487888797e+01, 1.83341411920233e+01,\n                                                1.83190323544187e+01, 1.82970487661049e+01, 1.82662889771710e+01, 1.82246570983880e+01, 1.81699101113898e+01,\n                                                1.80997187057128e+01, 1.80117406501461e+01, 1.79037048779666e+01, 1.77735035670899e+01, 1.76192885950605e+01,\n                                                1.74395679264220e+01, 1.72332968301282e+01, 1.69999584036820e+01, 1.67396277635897e+01, 1.64530145066533e+01,\n                                                1.61414787154645e+01, 1.58070169447869e+01, 1.54522163467317e+01, 1.50801773817467e+01, 1.46944083090741e+01,\n                                                1.42986975690127e+01, 1.38969728009345e+01, 1.34931570386827e+01, 1.30910331120820e+01, 1.26941262264011e+01,\n                                                1.23056122117135e+01, 1.19282554995412e+01, 1.15643771812747e+01, 1.12158502351415e+01, 1.08841167037937e+01,\n                                                1.05702204987151e+01, 1.02748495339250e+01, 9.99838176017622e+00, 9.74093099397108e+00, 9.50238984682252e+00,\n                                                9.28246829468561e+00, 9.08072735107596e+00, 8.89660790082966e+00, 8.72945507059087e+00, 8.57853864353457e+00,\n                                                8.44307005243007e+00, 8.32221646752544e+00, 8.21511246807243e+00, 8.12086976145360e+00, 8.03858539169025e+00,\n                                                7.96734885410673e+00, 7.90624849925786e+00, 7.85437756304471e+00, 7.81084009997599e+00, 7.77475702373788e+00,\n                                                7.74527237628591e+00, 7.72155985749585e+00, 7.70282955688693e+00, 7.68833474264400e+00, 7.67737848707903e+00,\n                                                7.66931984769968e+00, 7.66357928447131e+00, 7.65964298065440e+00, 7.65706574885874e+00, 7.65547224539796e+00,\n                                                7.65455628184436e+00, 7.65407810771093e+00, 7.65385963544962e+00, 7.65377768049061e+00, 7.65375538689892e+00,\n                                                7.65375209641675e+00, 7.65375180552125e+00, 7.65374610094159e+00, 7.65370745170537e+00, 7.65356537497688e+00,\n                                                7.65318666557833e+00, 7.65235794541047e+00, 7.65077113865438e+00, 7.64801258026937e+00, 7.64355646330235e+00,\n                                                7.63676332024068e+00, 7.62688419735603e+00, 7.61307109606024e+00, 7.59439409725971e+00, 7.56986533177255e+00,\n                                                7.53846959867106e+00, 7.49920096521450e+00, 7.45110412848184e+00, 7.39331872537724e+00, 7.32512421310302e+00,\n                                                7.24598249240633e+00, 7.15557520208567e+00, 7.05383265531262e+00, 6.94095176694861e+00, 6.81740104226853e+00,\n                                                6.68391171379122e+00, 6.54145532261431e+00, 6.39120929625638e+00, 6.23451319997066e+00, 6.07281915353614e+00,\n                                                5.90764026540589e+00, 5.74050077259469e+00, 5.57289093115580e+00, 5.40622873714955e+00, 5.24182950359869e+00,\n                                                5.08088340263615e+00, 4.92444044954716e+00, 4.77340208331864e+00, 4.62851841345456e+00, 4.49039023950714e+00,\n                                                4.35947500888780e+00, 4.23609590998373e+00, 4.12045330007766e+00, 4.01263766742537e+00, 3.91264335376411e+00,\n                                                3.82038233444224e+00, 3.73569746795161e+00, 3.65837477129718e+00, 3.58815443285965e+00, 3.52474042164204e+00,\n                                                3.46780867757087e+00, 3.41701396480613e+00, 3.37199553740950e+00, 3.33238180675004e+00, 3.29779421718783e+00,\n                                                3.26785053585222e+00, 3.24216774821633e+00, 3.22036472728389e+00, 3.20206481327907e+00, 3.18689840484365e+00,\n                                                3.17450562363047e+00, 3.16453907353041e+00, 3.15666667543866e+00, 3.15057452055467e+00, 3.14596965203366e+00,\n                                                3.14258265871098e+00, 3.14016994773837e+00, 3.13851555693286e+00, 3.13743237328644e+00, 3.13676264127731e+00,\n                                                3.13637767215695e+00, 3.13617670106625e+00, 3.13608487970684e+00, 3.13605043499069e+00, 3.13604106525369e+00,\n                                                3.13603968230234e+00, 3.13603955815225e+00, 3.13603710213791e+00, 3.13602046233758e+00, 3.13595929354420e+00,\n                                                3.13579624670324e+00, 3.13543945669510e+00, 3.13475629146528e+00, 3.13356866905821e+00, 3.13165024935488e+00,\n                                                3.12872580404297e+00, 3.12447305368707e+00, 3.11852722465106e+00, 3.11048851017999e+00, 3.09993250948163e+00,\n                                                3.08642356018825e+00, 3.06953067367401e+00, 3.04884553899818e+00, 3.02400180010436e+00, 2.99469456326881e+00,\n                                                2.96069889652979e+00, 2.92188598130424e+00, 2.87823560459827e+00, 2.82984385975884e+00, 2.77692525375109e+00,\n                                                2.71980887148122e+00, 2.65892876843094e+00, 2.59480927882706e+00, 2.52804635965268e+00, 2.45928637487677e+00,\n                                                2.38920382125124e+00, 2.31847940703706e+00, 2.24777965676560e+00, 2.17773889507212e+00, 2.10894413560496e+00,\n                                                2.04192312827603e+00, 1.97713563034682e+00, 1.91496785849938e+00, 1.85573001649428e+00, 1.79965673324804e+00,\n                                                1.74691015806575e+00, 1.69758533858858e+00, 1.65171737541391e+00, 1.60928974324976e+00, 1.57024312659381e+00,\n                                                1.53448415449589e+00, 1.50189352642957e+00, 1.47233317377064e+00, 1.44565226602251e+00, 1.42169201910964e+00,\n                                                1.40028937691311e+00, 1.38127971077911e+00, 1.36449871819444e+00, 1.34978370942237e+00, 1.33697445916502e+00,\n                                                1.32591377769148e+00, 1.31644792859113e+00, 1.30842699233621e+00, 1.30170524826762e+00, 1.29614162329069e+00,\n                                                1.29160023361902e+00, 1.28795102621454e+00, 1.28507050903845e+00, 1.28284254393603e+00, 1.28115916322848e+00,\n                                                1.27992136135543e+00, 1.27903980676014e+00, 1.27843541712305e+00, 1.27803974332450e+00, 1.27779511412531e+00,\n                                                1.27765450408970e+00, 1.27758110094352e+00, 1.27754756425801e+00, 1.27753498378361e+00, 1.27753156161731e+00,\n                                                1.27753105651374e+00, 1.27753100995220e+00, 1.27753007528177e+00, 1.27752374278015e+00, 1.27750046425501e+00,\n                                                1.27743841548491e+00, 1.27730263966318e+00, 1.27704267552245e+00, 1.27659079211070e+00, 1.27586095520370e+00,\n                                                1.27474865196922e+00, 1.27313169684689e+00, 1.27087212766760e+00, 1.26781927133915e+00, 1.26381400807890e+00,\n                                                1.25869418921988e+00, 1.25230106660098e+00, 1.24448647701530e+00, 1.23512040461327e+00, 1.22409843484411e+00,\n                                                1.21134853689908e+00, 1.19683658970639e+00, 1.18057011677213e+00, 1.16259982461966e+00, 1.14301874001190e+00,\n                                                1.12195898711592e+00, 1.09958649759147e+00, 1.07609415854166e+00, 1.05169403565560e+00, 1.02660933989000e+00,\n                                                1.00106673870852e+00, 9.75289473580460e-01, 9.49491574043194e-01, 9.23873294710802e-01, 8.98617772488649e-01,\n                                                8.73888816861069e-01, 8.49829701425818e-01, 8.26562807060952e-01, 8.04189963254970e-01, 7.82793335788284e-01,\n                                                7.62436713173287e-01, 7.43167051770257e-01, 7.25016152058146e-01, 7.08002356940085e-01, 6.92132186248429e-01,\n                                                6.77401847407637e-01, 6.63798587592126e-01, 6.51301875084954e-01, 6.39884415208087e-01, 6.29513018517812e-01,\n                                                6.20149346214149e-01, 6.11750560746060e-01, 6.04269909498967e-01, 5.97657267275736e-01, 5.91859659886822e-01,\n                                                5.86821787141133e-01, 5.82486559226638e-01, 5.78795656051824e-01, 5.75690114632536e-01, 5.73110945067157e-01,\n                                                5.70999771074057e-01, 5.69299486554883e-01, 5.67954915350953e-01, 5.66913457503020e-01, 5.66125702177160e-01,\n                                                5.65545985268969e-01, 5.65132868805080e-01, 5.64849519820356e-01, 5.64663968489967e-01, 5.64549228898926e-01,\n                                                5.64483270759453e-01, 5.64448836328651e-01, 5.64433103332306e-01, 5.64427201403575e-01, 5.64425595941671e-01,\n                                                5.64425358979065e-01, 5.64425336396766e-01, 5.64424875070372e-01, 5.64421749524286e-01, 5.64410259807175e-01,\n                                                5.64379633369100e-01, 5.64312612873437e-01, 5.64184278668478e-01, 5.63961160900575e-01, 5.63600694804947e-01,\n                                                5.63051070500848e-01, 5.62251524455675e-01, 5.61133112142457e-01, 5.59619988645707e-01, 5.57631204621856e-01,\n                                                5.55082998279360e-01, 5.51891530200322e-01, 5.47975968717111e-01, 5.43261792805467e-01, 5.37684142364498e-01,\n                                                5.31191018718232e-01, 5.23746127573418e-01, 5.15331167373944e-01, 5.05947399824635e-01, 4.95616393948282e-01,\n                                                4.84379903609707e-01, 4.72298910764465e-01, 4.59451931229310e-01, 4.45932726479555e-01, 4.31847587940211e-01,\n                                                4.17312359262382e-01, 4.02449342564964e-01, 3.87384205684725e-01, 3.72242978894889e-01, 3.57149208667465e-01,\n                                                3.42221325747431e-01, 3.27570283194021e-01, 3.13297521909305e-01, 2.99493320363453e-01, 2.86235577054981e-01,\n                                                2.73589056994268e-01, 2.61605108679632e-01, 2.50321829524864e-01, 2.39764630312408e-01, 2.29947127305564e-01,\n                                                2.20872276992111e-01, 2.12533664026182e-01, 2.04916857083077e-01, 1.98000758168860e-01, 1.91758886021603e-01,\n                                                1.86160551185225e-01, 1.81171897084155e-01, 1.76756796482834e-01, 1.72877605162924e-01, 1.69495784078364e-01,\n                                                1.66572407624159e-01, 1.64068579190101e-01, 1.61945776223675e-01, 1.60166146008876e-01, 1.58692770709891e-01,\n                                                1.57489916357221e-01, 1.56523275782675e-01, 1.55760210451689e-01, 1.55169991096059e-01, 1.54724032408211e-01,\n                                                1.54396113172851e-01, 1.54162570387598e-01, 1.54002454373952e-01, 1.53897631718650e-01, 1.53832824091396e-01,\n                                                1.53795573421704e-01, 1.53776127327092e-01, 1.53767242728080e-01, 1.53763909886294e-01, 1.53763003279877e-01,\n                                                1.53762869466931e-01, 1.53762856222443e-01, 1.53762580489669e-01, 1.53760712369078e-01, 1.53753845102798e-01,\n                                                1.53735540587661e-01, 1.53695487162508e-01, 1.53618801359130e-01, 1.53485510736175e-01, 1.53270256491879e-01,\n                                                1.52942255845801e-01, 1.52465564004316e-01, 1.51799672375276e-01, 1.50900471954444e-01, 1.49721597001985e-01,\n                                                1.48216143281317e-01, 1.46338727117168e-01, 1.44047817395048e-01, 1.41308234838078e-01, 1.38093675380020e-01,\n                                                1.34389082370049e-01, 1.30192671577390e-01, 1.25517409290140e-01, 1.20391761840281e-01, 1.14859576956292e-01,\n                                                1.08979022434184e-01, 1.02820590750582e-01, 9.64642704607854e-02, 8.99960744717987e-02, 8.35041881698828e-02,\n                                                7.70750447188249e-02, 7.07896423255931e-02, 6.47203866681139e-02, 5.89286757417256e-02, 5.34633550397103e-02,\n                                                4.83600729842806e-02, 4.36414751358001e-02, 3.93181034877728e-02, 3.53898216915809e-02, 3.18475701849792e-02,\n                                                2.86752637083652e-02, 2.58516709742054e-02, 2.33521543426605e-02, 2.11501886758469e-02, 1.92186171201456e-02,\n                                                1.75306335572003e-02, 1.60605051280953e-02, 1.47840635334546e-02, 1.36790018058548e-02, 1.27250155571090e-02,\n                                                1.19038260353506e-02, 1.11991182418336e-02, 1.05964221149719e-02, 1.00829593093863e-02, 9.64747297103941e-03,\n                                                9.28005345089389e-03, 8.97196921744126e-03, 8.71550930244780e-03, 8.50384134970739e-03, 8.33088761044110e-03,\n                                                8.19121991020211e-03, 8.07997358307944e-03, 7.99277953447586e-03, 7.92571289264288e-03, 7.87525610962803e-03,\n                                                7.83827387854785e-03, 7.81199686355194e-03, 7.79401102826682e-03, 7.78224932507499e-03, 7.77498269304999e-03,\n                                                7.77080770009775e-03, 7.76862873111384e-03, 7.76763331420227e-03, 7.76725992679417e-03, 7.76715835898756e-03,\n                                                7.76714336788586e-03, 7.76714182150329e-03, 7.76710899553734e-03, 7.76688659806268e-03, 7.76606909150246e-03,\n                                                7.76389030370694e-03, 7.75912403065604e-03, 7.75000351838173e-03, 7.73416622426737e-03, 7.70863153282164e-03,\n                                                7.66982031387897e-03, 7.61362587870451e-03, 7.53554537737955e-03, 7.43087829820865e-03, 7.29499386217469e-03,\n                                                7.12366143756071e-03, 6.91342785545146e-03, 6.66201368971997e-03, 6.36868906552479e-03, 6.03458103830690e-03,\n                                                5.66286204509936e-03, 5.25877493625160e-03, 4.82946584887145e-03, 4.38362063501074e-03, 3.93093006226763e-03,\n                                                3.48143774840537e-03, 3.04484616999900e-03, 2.62986465709503e-03, 2.24367664202418e-03, 1.89158311138726e-03,\n                                                1.57685016772291e-03, 1.30075739095048e-03, 1.06281630135641e-03, 8.61108773136721e-04, 6.92685835971929e-04,\n                                                5.53968614411815e-04, 4.41104499884659e-04, 3.50250197200808e-04, 2.77773598710951e-04, 2.20382017886323e-04,\n                                                1.75191069004654e-04, 1.39747571083149e-04, 1.12016762301437e-04, 9.03436143602221e-05, 7.33997832611522e-05,\n                                                6.01279628398288e-05, 4.96922150716728e-05, 4.14374606378942e-05, 3.48562346772496e-05, 2.95591232344350e-05,\n                                                2.52478643147924e-05, 2.16930366576662e-05, 1.87178774098129e-05, 1.61874345963042e-05, 1.40009331488500e-05,\n                                                1.20854441973961e-05, 1.03898712495720e-05, 8.87923422965287e-06, 7.52973224393827e-06, 6.32494938201944e-06,\n                                                5.25318270661046e-06, 4.30562290887337e-06, 3.47509694620385e-06, 2.75517540160308e-06, 2.13954201910838e-06,\n                                                1.62157687100262e-06, 1.19412122501217e-06, 8.49391327051308e-07, 5.79003554435076e-07, 0.00000000000000e+00,\n                                                0.00000000000000e+00, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.30000000000000e+01, 7.29999996758860e+01, 7.29999896536367e+01, 7.29999217512378e+01, 7.29996721320530e+01,\n                                                7.29990067175790e+01, 7.29975503658728e+01, 7.29947608632042e+01, 7.29899085989822e+01, 7.29820625838154e+01,\n                                                7.29700832463247e+01, 7.29526222344376e+01, 7.29281292885876e+01, 7.28948661886320e+01, 7.28509278372059e+01,\n                                                7.27942707386154e+01, 7.27227494267554e+01, 7.26341616859009e+01, 7.25263035245820e+01, 7.23970345914683e+01,\n                                                7.22443538654842e+01, 7.20664839176315e+01, 7.18619599361561e+01, 7.16297173936198e+01, 7.13691703098648e+01,\n                                                7.10802712230577e+01, 7.07635447910794e+01, 7.04200896068157e+01, 7.00515469899628e+01, 6.96600403584996e+01,\n                                                6.92480931188664e+01, 6.88185357267440e+01, 6.83744129607417e+01, 6.79189004774172e+01, 6.74552360055976e+01,\n                                                6.69866661759488e+01, 6.65164061637047e+01, 6.60476070025056e+01, 6.55833250669851e+01, 6.51264896909871e+01,\n                                                6.46798675223674e+01, 6.42460250176766e+01, 6.38272924500309e+01, 6.34257333133782e+01, 6.30431220620525e+01,\n                                                6.26809313314049e+01, 6.23403279985428e+01, 6.20221763157920e+01, 6.17270460771356e+01, 6.14552241458496e+01,\n                                                6.12067283024613e+01, 6.09813229526757e+01, 6.07785366123560e+01, 6.05976812478245e+01, 6.04378735530544e+01,\n                                                6.02980581621219e+01, 6.01770326799472e+01, 6.00734742978919e+01, 5.99859676561742e+01, 5.99130335252562e+01,\n                                                5.98531578026523e+01, 5.98048202593742e+01, 5.97665224223825e+01, 5.97368139485301e+01, 5.97143168351542e+01,\n                                                5.96977468264134e+01, 5.96859314156449e+01, 5.96778239139178e+01, 5.96725131530917e+01, 5.96692285153623e+01,\n                                                5.96673401256660e+01, 5.96663542017936e+01, 5.96659037217749e+01, 5.96657347306404e+01, 5.96656887609046e+01,\n                                                5.96656819758661e+01, 5.96656810470901e+01, 5.96656591125441e+01, 5.96655105029846e+01, 5.96649642017670e+01,\n                                                5.96635079882107e+01, 5.96603212268649e+01, 5.96542186818492e+01, 5.96436078190528e+01, 5.96264619046175e+01,\n                                                5.96003110136480e+01, 5.95622527920759e+01, 5.95089844198520e+01, 5.94368566550299e+01, 5.93419500546920e+01,\n                                                5.92201724537646e+01, 5.90673755626711e+01, 5.88794872024932e+01, 5.86526543747420e+01, 5.83833912447862e+01,\n                                                5.80687253747863e+01, 5.77063352565998e+01, 5.72946722960905e+01, 5.68330606729176e+01, 5.63217687322442e+01,\n                                                5.57620457969090e+01, 5.51561189941059e+01, 5.45071466592646e+01, 5.38191287204111e+01, 5.30967799655454e+01,\n                                                5.23453778936499e+01, 5.15706007883119e+01, 5.07783717496628e+01, 4.99747200073779e+01, 4.91656632341702e+01,\n                                                4.83571068480524e+01, 4.75547520055341e+01, 4.67640053864785e+01, 4.59898902505306e+01, 4.52369657664016e+01,\n                                                4.45092653470462e+01, 4.38102620654042e+01, 4.31428619779308e+01, 4.25094190683148e+01, 4.19117623862970e+01,\n                                                4.13512272828573e+01, 4.08286862537693e+01, 4.03445782846838e+01, 3.98989374696443e+01, 3.94914220905156e+01,\n                                                3.91213449451233e+01, 3.87877051237220e+01, 3.84892210062362e+01, 3.82243640771197e+01, 3.79913931761447e+01,\n                                                3.77883889232053e+01, 3.76132881870078e+01, 3.74639185569203e+01, 3.73380328008366e+01, 3.72333432485144e+01,\n                                                3.71475559416007e+01, 3.70784042569489e+01, 3.70236815594984e+01, 3.69812722951798e+01, 3.69491808115145e+01,\n                                                3.69255571095303e+01, 3.69087186973874e+01, 3.68971677413269e+01, 3.68896027957264e+01, 3.68849245382463e+01,\n                                                3.68822351301340e+01, 3.68808310530991e+01, 3.68801895270098e+01, 3.68799488697692e+01, 3.68798834052916e+01,\n                                                3.68798737428764e+01, 3.68798728256469e+01, 3.68798541255162e+01, 3.68797274296036e+01, 3.68792616853795e+01,\n                                                3.68780202080337e+01, 3.68753033959230e+01, 3.68701008764818e+01, 3.68610552182945e+01, 3.68464392351533e+01,\n                                                3.68241487676305e+01, 3.67917126243549e+01, 3.67463210569693e+01, 3.66848736848273e+01, 3.66040471382597e+01,\n                                                3.65003818281623e+01, 3.63703861752543e+01, 3.62106553788759e+01, 3.60180004457309e+01, 3.57895818454782e+01,\n                                                3.55230409575999e+01, 3.52166215905779e+01, 3.48692734689066e+01, 3.44807298726807e+01, 3.40515527362738e+01,\n                                                3.35831405750419e+01, 3.30776976130353e+01, 3.25381662398337e+01, 3.19681289637977e+01, 3.13716895843827e+01,\n                                                3.07533454179903e+01, 3.01178622082911e+01, 2.94701604506461e+01, 2.88152167447887e+01, 2.81579779553576e+01,\n                                                2.75032816356540e+01, 2.68557755256550e+01, 2.62198328892958e+01, 2.55994676050107e+01, 2.49982595412267e+01,\n                                                2.44193026160954e+01, 2.38651833281739e+01, 2.33379888964172e+01, 2.28393364633396e+01, 2.23704119039593e+01,\n                                                2.19320088801309e+01, 2.15245633433221e+01, 2.11481828668464e+01, 2.08026725135163e+01, 2.04875594377065e+01,\n                                                2.02021178342169e+01, 1.99453949507272e+01, 1.97162381470316e+01, 1.95133225768604e+01, 1.93351789594085e+01,\n                                                1.91802209929152e+01, 1.90467721317465e+01, 1.89330916181286e+01, 1.88373997801882e+01, 1.87579026582646e+01,\n                                                1.86928160011269e+01, 1.86403885951657e+01, 1.85989247721502e+01, 1.85668058067122e+01, 1.85425097850270e+01,\n                                                1.85246294205147e+01, 1.85118872261921e+01, 1.85031474369575e+01, 1.84974241133299e+01, 1.84938849499125e+01,\n                                                1.84918504506075e+01, 1.84907883074254e+01, 1.84903030165778e+01, 1.84901209690299e+01, 1.84900714478531e+01,\n                                                1.84900641386373e+01, 1.84900634881693e+01, 1.84900506836305e+01, 1.84899639311803e+01, 1.84896450227469e+01,\n                                                1.84887949510795e+01, 1.84869346972436e+01, 1.84833724994621e+01, 1.84771790934177e+01, 1.84671723552655e+01,\n                                                1.84519127011291e+01, 1.84297104765374e+01, 1.83986463756267e+01, 1.83566056309014e+01, 1.83013262821652e+01,\n                                                1.82304612511390e+01, 1.81416532168180e+01, 1.80326204285197e+01, 1.79012506555988e+01, 1.77456995235450e+01,\n                                                1.75644886096084e+01, 1.73565979574945e+01, 1.71215472083153e+01, 1.68594594164001e+01, 1.65711019029015e+01,\n                                                1.62578992774600e+01, 1.59219151050903e+01, 1.55658006593410e+01, 1.51927117508394e+01, 1.48061975776768e+01,\n                                                1.44100685558434e+01, 1.40082526448081e+01, 1.36046512298065e+01, 1.32030057244943e+01, 1.28067845674773e+01,\n                                                1.24190974282610e+01, 1.20426397698422e+01, 1.16796671707783e+01, 1.13319956877293e+01, 1.10010225164213e+01,\n                                                1.06877604422620e+01, 1.03928799144946e+01, 1.01167536790000e+01, 9.85950034636122e+00, 9.62102468893268e+00,\n                                                9.40105361517815e+00, 9.19916756600556e+00, 9.01482753579857e+00, 8.84739812550625e+00, 8.69616708845243e+00,\n                                                8.56036181633742e+00, 8.43916318649340e+00, 8.33171717464818e+00, 8.23714463211377e+00, 8.15454962430734e+00,\n                                                8.08302671893728e+00, 8.02166758979723e+00, 7.96956726253798e+00, 7.92583027205177e+00, 7.88957692955010e+00,\n                                                7.85994981482175e+00, 7.83612052016193e+00, 7.81729658232061e+00, 7.80272845322617e+00, 7.79171628513220e+00,\n                                                7.78361624701461e+00, 7.77784605165675e+00, 7.77388936077215e+00, 7.77129875071928e+00, 7.76969696352799e+00,\n                                                7.76877623425874e+00, 7.76829557100793e+00, 7.76807596122357e+00, 7.76799357950402e+00, 7.76797116981972e+00,\n                                                7.76796786220237e+00, 7.76796756979203e+00, 7.76796183550573e+00, 7.76792298500023e+00, 7.76778016834852e+00,\n                                                7.76739948630933e+00, 7.76656644766032e+00, 7.76497136511122e+00, 7.76219839820425e+00, 7.75771894801109e+00,\n                                                7.75089009642893e+00, 7.74095874499520e+00, 7.72707202205852e+00, 7.70829436872005e+00, 7.68363146169705e+00,\n                                                7.65206077192859e+00, 7.61256809257073e+00, 7.56418882035567e+00, 7.50605218503711e+00, 7.43742606089788e+00,\n                                                7.35775954748590e+00, 7.26672026510786e+00, 7.16422335497958e+00, 7.05044955667113e+00, 6.92585046421729e+00,\n                                                6.79114008903211e+00, 6.64727307622228e+00, 6.49541117350959e+00, 6.33688064937212e+00, 6.17312411163206e+00,\n                                                6.00565045028719e+00, 5.83598637634124e+00, 5.66563233418476e+00, 5.49602462130171e+00, 5.32850459529764e+00,\n                                                5.16429508446299e+00, 5.00448363864942e+00, 4.85001203885021e+00, 4.70167142730429e+00, 4.56010241456404e+00,\n                                                4.42579949394940e+00, 4.29911903037815e+00, 4.18029001410966e+00, 4.06942671915768e+00, 3.96654241086240e+00,\n                                                3.87156331722687e+00, 3.78434220460611e+00, 3.70467105874418e+00, 3.63229254246119e+00, 3.56691006064412e+00,\n                                                3.50819639778921e+00, 3.45580099678391e+00, 3.40935601945452e+00, 3.36848137291166e+00, 3.33278890584953e+00,\n                                                3.30188598081332e+00, 3.27537861649262e+00, 3.25287437182506e+00, 3.23398511373198e+00, 3.21832977469207e+00,\n                                                3.20553716686160e+00, 3.19524887787405e+00, 3.18712223180947e+00, 3.18083325941262e+00, 3.17607958695615e+00,\n                                                3.17258312572046e+00, 3.17009242616773e+00, 3.16838455425214e+00, 3.16726635281924e+00, 3.16657496855873e+00,\n                                                3.16617755322859e+00, 3.16597008458366e+00, 3.16587529454969e+00, 3.16583973619930e+00, 3.16583006352847e+00,\n                                                3.16582863586481e+00, 3.16582850770081e+00, 3.16582597228081e+00, 3.16580879449727e+00, 3.16574564804576e+00,\n                                                3.16557732968745e+00, 3.16520900407282e+00, 3.16450375053361e+00, 3.16327772813364e+00, 3.16129727543807e+00,\n                                                3.15827825803991e+00, 3.15388796180876e+00, 3.14774979281256e+00, 3.13945097479960e+00, 3.12855332212114e+00,\n                                                3.11460700391264e+00, 3.09716700472961e+00, 3.07581173735225e+00, 3.05016299565071e+00, 3.01990618045254e+00,\n                                                2.98480952850801e+00, 2.94474096573305e+00, 2.89968122744919e+00, 2.84973206256740e+00, 2.79511866544775e+00,\n                                                2.73618593138137e+00, 2.67338865616487e+00, 2.60727632565660e+00, 2.53847359143916e+00, 2.46765783968102e+00,\n                                                2.39553539504351e+00, 2.32281785886424e+00, 2.25019989417892e+00, 2.17833949553226e+00, 2.10784147954391e+00,\n                                                2.03924464949112e+00, 1.97301284535055e+00, 1.90952988683127e+00, 1.84909823461592e+00, 1.79194102058399e+00,\n                                                1.73820693220584e+00, 1.68797729734301e+00, 1.64127462945767e+00, 1.59807188058062e+00, 1.55830171505754e+00,\n                                                1.52186524693089e+00, 1.48863985027147e+00, 1.45848582373627e+00, 1.43125184246233e+00, 1.40677924690537e+00,\n                                                1.38490529499505e+00, 1.36546554468282e+00, 1.34829554658786e+00, 1.33323202000170e+00, 1.32011366790552e+00,\n                                                1.30878176377468e+00, 1.29908061857689e+00, 1.29085801257278e+00, 1.28396565416195e+00, 1.27825970725885e+00,\n                                                1.27360140942167e+00, 1.26985778507861e+00, 1.26690244174597e+00, 1.26461642238282e+00, 1.26288907447478e+00,\n                                                1.26161888672172e+00, 1.26071423800340e+00, 1.26009400118242e+00, 1.25968794661604e+00, 1.25943689697593e+00,\n                                                1.25929259570540e+00, 1.25921726536757e+00, 1.25918284812448e+00, 1.25916993732125e+00, 1.25916642529737e+00,\n                                                1.25916590693100e+00, 1.25916585914689e+00, 1.25916489993423e+00, 1.25915840115564e+00, 1.25913451137910e+00,\n                                                1.25907083324006e+00, 1.25893149159873e+00, 1.25866469854353e+00, 1.25820093977502e+00, 1.25745190965105e+00,\n                                                1.25631032351139e+00, 1.25465073195157e+00, 1.25233144749728e+00, 1.24919766422214e+00, 1.24508580041822e+00,\n                                                1.23982902056841e+00, 1.23326379616753e+00, 1.22523725088645e+00, 1.21561491545981e+00, 1.20428840837387e+00,\n                                                1.19118248062726e+00, 1.17626083754969e+00, 1.15953019432159e+00, 1.14104214098064e+00, 1.12089257982096e+00,\n                                                1.09921873041563e+00, 1.07619394000791e+00, 1.05202074972551e+00, 1.02692281482817e+00, 1.00113633892182e+00,\n                                                9.74901655882078e-01, 9.48455495444875e-01, 9.22024326896505e-01, 8.95819020103971e-01, 8.70030918505933e-01,\n                                                8.44829299009049e-01, 8.20360103999363e-01, 7.96745769751155e-01, 7.74085939818107e-01, 7.52458837845822e-01,\n                                                7.31923078491889e-01, 7.12519714678137e-01, 6.94274350532964e-01, 6.77199187656342e-01, 6.61294912925030e-01,\n                                                6.46552374489147e-01, 6.32954025483116e-01, 6.20475140313360e-01, 6.09084825700549e-01, 5.98746858617318e-01,\n                                                5.89420387278111e-01, 5.81060531078307e-01, 5.73618912423285e-01, 5.67044149009490e-01, 5.61282330196747e-01,\n                                                5.56277496151395e-01, 5.51972133656193e-01, 5.48307697890920e-01, 5.45225165012624e-01, 5.42665615920740e-01,\n                                                5.40570847141240e-01, 5.38884000352411e-01, 5.37550197837703e-01, 5.36517167310024e-01, 5.35735836380979e-01,\n                                                5.35160874746168e-01, 5.34751161196212e-01, 5.34470153049384e-01, 5.34286137634780e-01, 5.34172349004081e-01,\n                                                5.34106937937992e-01, 5.34072789234827e-01, 5.34057186813996e-01, 5.34051333872583e-01, 5.34049741736780e-01,\n                                                5.34049506741098e-01, 5.34049484346241e-01, 5.34049026849132e-01, 5.34045927247220e-01, 5.34034532908549e-01,\n                                                5.34004160751380e-01, 5.33937696930863e-01, 5.33810429544303e-01, 5.33589169230453e-01, 5.33231711302506e-01,\n                                                5.32686691063532e-01, 5.31893879983826e-01, 5.30784962891602e-01, 5.29284823539726e-01, 5.27313346368302e-01,\n                                                5.24787715150950e-01, 5.21625154817528e-01, 5.17746023007220e-01, 5.13077116602261e-01, 5.07555021117398e-01,\n                                                5.01129303943273e-01, 4.93765342526402e-01, 4.85446590388761e-01, 4.76176118966663e-01, 4.65977328736415e-01,\n                                                4.54893791721844e-01, 4.42988258729940e-01, 4.30340927136456e-01, 4.17047109351415e-01, 4.03214463368869e-01,\n                                                3.88959945932342e-01, 3.74406631861675e-01, 3.59680518901470e-01, 3.44907414741058e-01, 3.30209987251081e-01,\n                                                3.15705051621634e-01, 3.01501165957333e-01, 2.87696604644296e-01, 2.74377771215853e-01, 2.61618096423717e-01,\n                                                2.49477442821103e-01, 2.38002007290973e-01, 2.27224682218548e-01, 2.17165809213697e-01, 2.07834240166633e-01,\n                                                1.99228610897251e-01, 1.91338732784374e-01, 1.84147016058887e-01, 1.77629852562291e-01, 1.71758903079251e-01,\n                                                1.66502252455700e-01, 1.61825412730792e-01, 1.57692169185438e-01, 1.54065275875013e-01, 1.50907015675415e-01,\n                                                1.48179645267021e-01, 1.45845748142236e-01, 1.43868519066174e-01, 1.42212001889689e-01, 1.40841299629173e-01,\n                                                1.39722771694139e-01, 1.38824228436491e-01, 1.38115128188844e-01, 1.37566777010420e-01, 1.37152526822689e-01,\n                                                1.36847963817218e-01, 1.36631076236370e-01, 1.36482389066515e-01, 1.36385052951184e-01, 1.36324875714237e-01,\n                                                1.36290287149279e-01, 1.36272230939326e-01, 1.36263981396056e-01, 1.36260886786545e-01, 1.36260044985178e-01,\n                                                1.36259920737345e-01, 1.36259908439570e-01, 1.36259652416484e-01, 1.36257917831941e-01, 1.36251541457668e-01,\n                                                1.36234545476086e-01, 1.36197355722686e-01, 1.36126154108794e-01, 1.36002400270073e-01, 1.35802559274481e-01,\n                                                1.35498073754050e-01, 1.35055618911821e-01, 1.34437675987712e-01, 1.33603452322006e-01, 1.32510162651727e-01,\n                                                1.31114665735382e-01, 1.29375422711789e-01, 1.27254709860694e-01, 1.24720981205257e-01, 1.21751239733044e-01,\n                                                1.18333245221919e-01, 1.14467367735372e-01, 1.10167894574388e-01, 1.05463619274857e-01, 1.00397586000511e-01,\n                                                9.50259297267166e-02, 8.94158361431607e-02, 8.36427355309866e-02, 7.77869295160514e-02, 7.19299153537492e-02,\n                                                6.61507079287986e-02, 6.05224581228327e-02, 5.51096271234712e-02, 4.99659059310318e-02, 4.51329796263593e-02,\n                                                4.06401416945528e-02, 3.65046792913120e-02, 3.27328869112051e-02, 2.93215294047400e-02, 2.62595660922216e-02,\n                                                2.35299616636411e-02, 2.11114396701504e-02, 1.89800729008454e-02, 1.71106447418197e-02, 1.54777514387376e-02,\n                                                1.40566438655298e-02, 1.28238277690826e-02, 1.17574538648881e-02, 1.08375348729339e-02, 1.00460272628879e-02,\n                                                9.36681277795515e-03, 8.78561018440394e-03, 8.28984229420371e-03, 7.86847794583423e-03, 7.51186378890623e-03,\n                                                7.21155662616013e-03, 6.96016376284092e-03, 6.75119624193599e-03, 6.57893789895070e-03, 6.43833172986774e-03,\n                                                6.32488400547970e-03, 6.23458576799862e-03, 6.16385071766956e-03, 6.10946797635847e-03, 6.06856776965969e-03,\n                                                6.03859770053816e-03, 6.01730701077940e-03, 6.00273607372515e-03, 5.99320835792128e-03, 5.98732226362131e-03,\n                                                5.98394056399343e-03, 5.98217565580228e-03, 5.98136940160998e-03, 5.98106697160006e-03, 5.98098470554476e-03,\n                                                5.98097256332153e-03, 5.98097131081943e-03, 5.98094472300659e-03, 5.98076458942387e-03, 5.98010244199543e-03,\n                                                5.97833772728507e-03, 5.97447735233914e-03, 5.96709062966738e-03, 5.95426492814966e-03, 5.93358843399017e-03,\n                                                5.90216747086458e-03, 5.85668640047743e-03, 5.79351768173808e-03, 5.70888761164667e-03, 5.59909907831013e-03,\n                                                5.46080606254407e-03, 5.29132584389913e-03, 5.08896479769305e-03, 4.85332398521621e-03, 4.58554377621567e-03,\n                                                4.28844509964676e-03, 3.96653076427356e-03, 3.62582451946025e-03, 3.27354702973537e-03, 2.91765331543559e-03,\n                                                2.56628028537875e-03, 2.22717005391360e-03, 1.90714034717132e-03, 1.61166581365535e-03, 1.34461523694540e-03,\n                                                1.10816400425051e-03, 9.02874286325073e-04, 7.27912177822532e-04, 5.81355017231999e-04, 4.60535417801111e-04,\n                                                3.62372225623631e-04, 2.83651883719926e-04, 2.21242656223808e-04, 1.72242056223126e-04, 1.34067958597939e-04,\n                                                1.04504398251493e-04, 8.17088412077283e-05, 6.41864599373321e-05, 5.07417518633702e-05, 4.04238043216765e-05,\n                                                3.24806463112282e-05, 2.63283145898185e-05, 2.15283655222720e-05, 1.77627887438803e-05, 1.48007775067072e-05,\n                                                1.24631958442478e-05, 1.05984171483442e-05, 9.07768264823972e-06, 7.80216711859794e-06, 6.70646622324966e-06,\n                                                5.75228781940496e-06, 4.91731832141795e-06, 4.18605814900275e-06, 3.54520311418582e-06, 2.98251310937303e-06,\n                                                2.48721352136272e-06, 2.05061692781783e-06, 1.66638707810307e-06, 1.33029152493691e-06, 1.03955296992808e-06,\n                                                7.92058628462655e-07, 5.85683011422589e-07, 4.17862793256063e-07, 4.26325641456060e-14, 4.26325641456060e-14,\n                                                4.26325641456060e-14, 5.68434188608080e-14, 4.26325641456060e-14, 4.26325641456060e-14, 4.26325641456060e-14,\n                                                4.26325641456060e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.40000000000000e+01, 7.39999996694099e+01, 7.39999894469078e+01, 7.39999201877619e+01, 7.39996655809654e+01,\n                                                7.39989868708381e+01, 7.39975014193270e+01, 7.39946561771358e+01, 7.39897069505101e+01, 7.39817041358894e+01,\n                                                7.39694853659483e+01, 7.39516752971132e+01, 7.39266926089541e+01, 7.38927642223415e+01, 7.38479468106942e+01,\n                                                7.37901558857132e+01, 7.37172030458493e+01, 7.36268422752235e+01, 7.35168262950783e+01, 7.33849736767664e+01,\n                                                7.32292465206958e+01, 7.30478368975236e+01, 7.28392580545120e+01, 7.26024339983490e+01, 7.23367791023246e+01,\n                                                7.20422585733456e+01, 7.17194215354129e+01, 7.13694013279241e+01, 7.09938820054707e+01, 7.05950350448221e+01,\n                                                7.01754346891821e+01, 6.97379630346353e+01, 6.92857161915466e+01, 6.88219206349871e+01, 6.83498648905787e+01,\n                                                6.78728471455204e+01, 6.73941354823991e+01, 6.69169351845588e+01, 6.64443574024641e+01, 6.59793852149261e+01,\n                                                6.55248360148770e+01, 6.50833221027658e+01, 6.46572133142369e+01, 6.42486058214402e+01, 6.38593000258091e+01,\n                                                6.34907884396712e+01, 6.31442525813429e+01, 6.28205668417125e+01, 6.25203071459314e+01, 6.22437627358795e+01,\n                                                6.19909501108774e+01, 6.17616287663209e+01, 6.15553187297742e+01, 6.13713200229001e+01, 6.12087341506137e+01,\n                                                6.10664876145162e+01, 6.09433573207845e+01, 6.08379976317480e+01, 6.07489687053625e+01, 6.06747656783175e+01,\n                                                6.06138481744973e+01, 6.05646695596598e+01, 6.05257053162715e+01, 6.04954798821192e+01, 6.04725912864153e+01,\n                                                6.04557329315672e+01, 6.04437119107565e+01, 6.04354633225661e+01, 6.04300601436741e+01, 6.04267183463998e+01,\n                                                6.04247970947335e+01, 6.04237940136879e+01, 6.04233356943550e+01, 6.04231637624134e+01, 6.04231169927059e+01,\n                                                6.04231100895932e+01, 6.04231091446545e+01, 6.04230868284005e+01, 6.04229356327163e+01, 6.04223798246858e+01,\n                                                6.04208982698745e+01, 6.04176560519353e+01, 6.04114473090444e+01, 6.04006517927155e+01, 6.03832074974680e+01,\n                                                6.03566015120511e+01, 6.03178809674986e+01, 6.02636855564597e+01, 6.01903025213421e+01, 6.00937442144693e+01,\n                                                5.99698473056080e+01, 5.98143914775968e+01, 5.96232340929361e+01, 5.93924559751020e+01, 5.91185123069763e+01,\n                                                5.87983818688743e+01, 5.84297074948164e+01, 5.80109206459168e+01, 5.75413431893004e+01, 5.70212596653424e+01,\n                                                5.64519536287839e+01, 5.58357025779056e+01, 5.51757283096968e+01, 5.44761037591724e+01, 5.37416231150579e+01,\n                                                5.29776477315389e+01, 5.21899438533632e+01, 5.13845275515676e+01, 5.05675271217856e+01, 4.97450652063294e+01,\n                                                4.89231554470609e+01, 4.81076052105471e+01, 4.73039187437153e+01, 4.65172025462680e+01, 4.57520821495418e+01,\n                                                4.50126417863643e+01, 4.43023938655693e+01, 4.36242768073708e+01, 4.29806729997387e+01, 4.23734367568534e+01,\n                                                4.18039246879388e+01, 4.12730250130495e+01, 4.07811856019006e+01, 4.03284419554114e+01, 3.99144463641605e+01,\n                                                3.95384988508385e+01, 3.91995798535836e+01, 3.88963842171985e+01, 3.86273559569199e+01, 3.83907233508547e+01,\n                                                3.81845340872421e+01, 3.80066903529754e+01, 3.78549838504308e+01, 3.77271307532318e+01, 3.76208065622591e+01,\n                                                3.75336807168026e+01, 3.74634506729919e+01, 3.74078750042705e+01, 3.73648049273930e+01, 3.73322135307613e+01,\n                                                3.73082218955183e+01, 3.72911212656161e+01, 3.72793904485646e+01, 3.72717077161263e+01, 3.72669566207937e+01,\n                                                3.72642253411402e+01, 3.72627994042546e+01, 3.72621478904169e+01, 3.72619034864592e+01, 3.72618370027866e+01,\n                                                3.72618271899405e+01, 3.72618262584310e+01, 3.72618072671642e+01, 3.72616785987662e+01, 3.72612056035438e+01,\n                                                3.72599447982106e+01, 3.72571856898689e+01, 3.72519021780320e+01, 3.72427157044925e+01, 3.72278722097114e+01,\n                                                3.72052348123294e+01, 3.71722939220546e+01, 3.71261961827981e+01, 3.70637931766002e+01, 3.69817101589660e+01,\n                                                3.68764342173120e+01, 3.67444201464896e+01, 3.65822110535220e+01, 3.63865693126953e+01, 3.61546121077675e+01,\n                                                3.58839445719937e+01, 3.55727826467563e+01, 3.52200574171456e+01, 3.48254930369457e+01, 3.43896515903295e+01,\n                                                3.39139404527440e+01, 3.34005808779488e+01, 3.28525404024389e+01, 3.22734356785057e+01, 3.16674156853327e+01,\n                                                3.10390369404486e+01, 3.03931415335801e+01, 2.97347453267208e+01, 2.90689382738023e+01, 2.84007933234415e+01,\n                                                2.77352772068827e+01, 2.70771575929144e+01, 2.64309068181377e+01, 2.58006101310146e+01, 2.51898915340871e+01,\n                                                2.46018690305285e+01, 2.40391434433723e+01, 2.35038153733244e+01, 2.29975187273371e+01, 2.25214590377088e+01,\n                                                2.20764489456312e+01, 2.16629383702085e+01, 2.12810404834650e+01, 2.09305559593432e+01, 2.06109976553263e+01,\n                                                2.03216168721990e+01, 2.00614313389806e+01, 1.98292544214427e+01, 1.96237247991779e+01, 1.94433358984117e+01,\n                                                1.92864645696994e+01, 1.91513987452739e+01, 1.90363640226120e+01, 1.89395492584048e+01, 1.88591313084492e+01,\n                                                1.87932990205580e+01, 1.87402764966361e+01, 1.86983455089408e+01, 1.86658668079900e+01, 1.86412999182190e+01,\n                                                1.86232209021266e+01, 1.86103374999088e+01, 1.86015010299171e+01, 1.85957144704082e+01, 1.85921362337208e+01,\n                                                1.85900792834941e+01, 1.85890054224845e+01, 1.85885147784816e+01, 1.85883307229125e+01, 1.85882806555177e+01,\n                                                1.85882732656817e+01, 1.85882726080391e+01, 1.85882596622673e+01, 1.85881719529526e+01, 1.85878495271340e+01,\n                                                1.85869900805606e+01, 1.85851093158147e+01, 1.85815078595774e+01, 1.85752462528222e+01, 1.85651294723604e+01,\n                                                1.85497023682603e+01, 1.85272572839152e+01, 1.84958549320730e+01, 1.84533592973442e+01, 1.83974868942903e+01,\n                                                1.83258701119582e+01, 1.82361336200327e+01, 1.81259819206118e+01, 1.79932951497561e+01, 1.78362292345195e+01,\n                                                1.76533155821724e+01, 1.74435547170294e+01, 1.72064977878815e+01, 1.69423097454586e+01, 1.66518083326978e+01,\n                                                1.63364739348248e+01, 1.59984268779442e+01, 1.56403709692244e+01, 1.52655048592198e+01, 1.48774059383321e+01,\n                                                1.44798945362618e+01, 1.40768886262403e+01, 1.36722604926148e+01, 1.32697065198653e+01, 1.28726393461842e+01,\n                                                1.24841084216111e+01, 1.21067511583723e+01, 1.17427731306891e+01, 1.13939528553850e+01, 1.10616649794565e+01,\n                                                1.07469152914200e+01, 1.04503816325111e+01, 1.01724561027567e+01, 9.91328549177392e+00, 9.67280825738389e+00,\n                                                9.45078742019837e+00, 9.24683938722019e+00, 9.06045902364554e+00, 8.89104137497820e+00, 8.73790041746011e+00,\n                                                8.60028516789380e+00, 8.47739345700808e+00, 8.36838367245699e+00, 8.27238479772093e+00, 8.18850509502785e+00,\n                                                8.11583978997504e+00, 8.05347810482380e+00, 8.00050995420200e+00, 7.95603256295648e+00, 7.91915719511512e+00,\n                                                7.88901610032205e+00, 7.86476969505816e+00, 7.84561390606821e+00, 7.83078751849081e+00, 7.81957929713948e+00,\n                                                7.81133459191913e+00, 7.80546110251741e+00, 7.80143346703551e+00, 7.79879635601884e+00, 7.79716579700609e+00,\n                                                7.79622852236390e+00, 7.79573921965155e+00, 7.79551566213227e+00, 7.79543179943359e+00, 7.79540898688255e+00,\n                                                7.79540561980275e+00, 7.79540532213564e+00, 7.79539948476145e+00, 7.79535993581757e+00, 7.79521455158947e+00,\n                                                7.79482702500346e+00, 7.79397900555279e+00, 7.79235522654598e+00, 7.78953233614178e+00, 7.78497214232245e+00,\n                                                7.77801996696320e+00, 7.76790876330851e+00, 7.75376956249561e+00, 7.73464865451929e+00, 7.70953165605921e+00,\n                                                7.67737425887316e+00, 7.63713898924686e+00, 7.58783676233713e+00, 7.52857142955627e+00, 7.45858495983676e+00,\n                                                7.37730045163907e+00, 7.28435993317306e+00, 7.17965395509076e+00, 7.06334036642502e+00, 6.93585039891741e+00,\n                                                6.79788121699249e+00, 6.65037530756548e+00, 6.49448831733027e+00, 6.33154799528607e+00, 6.16300757572324e+00,\n                                                5.99039711799443e+00, 5.81527599543111e+00, 5.63918901945856e+00, 5.46362781426211e+00, 5.28999825426781e+00,\n                                                5.11959419958912e+00, 4.95357745037300e+00, 4.79296371935435e+00, 4.63861437534746e+00, 4.49123364024403e+00,\n                                                4.35137078707062e+00, 4.21942670357295e+00, 4.09566400437210e+00, 3.98021974686539e+00, 3.87311976423138e+00,\n                                                3.77429367915894e+00, 3.68358978824998e+00, 3.60078918136868e+00, 3.52561865240185e+00, 3.45776214280424e+00,\n                                                3.39687061997225e+00, 3.34257042032458e+00, 3.29447018005850e+00, 3.25216653734039e+00, 3.21524882282147e+00,\n                                                3.18330296607476e+00, 3.15591483869352e+00, 3.13267323447027e+00, 3.11317265658322e+00, 3.09701604373905e+00,\n                                                3.08381752411780e+00, 3.07320524002843e+00, 3.06482423984573e+00, 3.05833938969640e+00, 3.05343821828630e+00,\n                                                3.04983357698460e+00, 3.04726597627440e+00, 3.04550545081325e+00, 3.04435280957942e+00, 3.04364014476145e+00,\n                                                3.04323050183262e+00, 3.04301665119644e+00, 3.04291894561575e+00, 3.04288229361396e+00, 3.04287232345013e+00,\n                                                3.04287085187734e+00, 3.04287071977151e+00, 3.04286810637248e+00, 3.04285040027497e+00, 3.04278531176817e+00,\n                                                3.04261181723946e+00, 3.04223216692940e+00, 3.04150523760858e+00, 3.04024155953452e+00, 3.03820034913444e+00,\n                                                3.03508887738046e+00, 3.03056449008764e+00, 3.02423955929540e+00, 3.01568957253420e+00, 3.00446444844144e+00,\n                                                2.99010299616879e+00, 2.97215021256190e+00, 2.95017684512339e+00, 2.92380036164364e+00, 2.89270619183155e+00,\n                                                2.85666788378235e+00, 2.81556469344756e+00, 2.76939513844343e+00, 2.71828522451651e+00, 2.66249039708110e+00,\n                                                2.60239075672345e+00, 2.53847965370453e+00, 2.47134636830707e+00, 2.40165410898251e+00, 2.33011494429141e+00,\n                                                2.25746347706210e+00, 2.18443105385350e+00, 2.11172209986464e+00, 2.03999382799780e+00, 1.96984015486845e+00,\n                                                1.90178022923817e+00, 1.83625158941405e+00, 1.77360764645817e+00, 1.71411895268376e+00, 1.65797756054175e+00,\n                                                1.60530369970191e+00, 1.55615399116728e+00, 1.51053046616762e+00, 1.46838975178930e+00, 1.42965190991639e+00,\n                                                1.39420855480422e+00, 1.36193001185430e+00, 1.33267140317419e+00, 1.30627764599626e+00, 1.28258742450348e+00,\n                                                1.26143624469935e+00, 1.24265870905857e+00, 1.22609015755422e+00, 1.21156781918160e+00, 1.19893160758528e+00,\n                                                1.18802467918090e+00, 1.17869385455619e+00, 1.17078998537738e+00, 1.16416833029950e+00, 1.15868898486849e+00,\n                                                1.15421739230874e+00, 1.15062494460534e+00, 1.14778966672229e+00, 1.14559696161130e+00, 1.14394038049903e+00,\n                                                1.14272237252501e+00, 1.14185496087892e+00, 1.14126028976706e+00, 1.14087098818253e+00, 1.14063030256516e+00,\n                                                1.14049196060533e+00, 1.14041974186273e+00, 1.14038674640123e+00, 1.14037436896837e+00, 1.14037100203521e+00,\n                                                1.14037050508398e+00, 1.14037045927394e+00, 1.14036953968906e+00, 1.14036330939489e+00, 1.14034040660553e+00,\n                                                1.14027935948931e+00, 1.14014577616952e+00, 1.13989001249351e+00, 1.13944543861982e+00, 1.13872742905363e+00,\n                                                1.13763320304831e+00, 1.13604263936763e+00, 1.13382017625010e+00, 1.13081787856338e+00, 1.12687970470688e+00,\n                                                1.12184693283943e+00, 1.11556460995784e+00, 1.10788877354581e+00, 1.09869407498620e+00, 1.08788132323450e+00,\n                                                1.07538438677548e+00, 1.06117586253595e+00, 1.04527095899427e+00, 1.02772915485781e+00, 1.00865337887318e+00,\n                                                9.88186690461333e-01, 9.66506692356617e-01, 9.43818136175963e-01, 9.20344352712874e-01, 8.96318224243828e-01,\n                                                8.71973406607381e-01, 8.47536413094844e-01, 8.23220014210662e-01, 7.99218219096389e-01, 7.75702917754117e-01,\n                                                7.52822103352202e-01, 7.30699475927480e-01, 7.09435157549493e-01, 6.89107221269452e-01, 6.69773743774144e-01,\n                                                6.51475124364794e-01, 6.34236460474469e-01, 6.18069823508165e-01, 6.02976331335185e-01, 5.88947960391209e-01,\n                                                5.75969078205119e-01, 5.64017705178770e-01, 5.53066532942367e-01, 5.43083736864475e-01, 5.34033624096935e-01,\n                                                5.25877157787818e-01, 5.18572394527453e-01, 5.12074867092778e-01, 5.06337939097605e-01, 5.01313152825475e-01,\n                                                4.96950586584120e-01, 4.93199233414217e-01, 4.90007408822109e-01, 4.87323191247768e-01, 4.85094895107594e-01,\n                                                4.83271572401279e-01, 4.81803535067442e-01, 4.80642886618156e-01, 4.79744048263512e-01, 4.79064261990146e-01,\n                                                4.78564051143366e-01, 4.78207618218477e-01, 4.77963159983744e-01, 4.77803081824845e-01, 4.77704096297089e-01,\n                                                4.77647195149501e-01, 4.77617489275929e-01, 4.77603916794408e-01, 4.77598825349077e-01, 4.77597440358267e-01,\n                                                4.77597235936742e-01, 4.77597216455564e-01, 4.77596818481203e-01, 4.77594122153974e-01, 4.77584210284888e-01,\n                                                4.77557789764603e-01, 4.77499973584969e-01, 4.77389265856658e-01, 4.77196797894422e-01, 4.76885862551200e-01,\n                                                4.76411792433709e-01, 4.75722224302487e-01, 4.74757785405274e-01, 4.73453226148422e-01, 4.71739006011319e-01,\n                                                4.69543315192169e-01, 4.66794483456610e-01, 4.63423691841598e-01, 4.59367865763554e-01, 4.54572594778668e-01,\n                                                4.48994900789501e-01, 4.42605668750517e-01, 4.35391566122433e-01, 4.27356310595897e-01, 4.18521197064535e-01,\n                                                4.08924857594897e-01, 3.98622292544758e-01, 3.87683266747089e-01, 3.76190203515776e-01, 3.64235726967678e-01,\n                                                3.51920000664876e-01, 3.39347993158853e-01, 3.26626776392303e-01, 3.13862938688217e-01, 3.01160175439264e-01,\n                                                2.88617109272678e-01, 2.76325385736797e-01, 2.64368086743218e-01, 2.52818498150219e-01, 2.41739257320873e-01,\n                                                2.31181890654199e-01, 2.21186731447943e-01, 2.11783187832737e-01, 2.02990312105740e-01, 1.94817609217012e-01,\n                                                1.87266014939340e-01, 1.80328973647320e-01, 1.73993550851819e-01, 1.68241525220040e-01, 1.63050417019818e-01,\n                                                1.58394423085667e-01, 1.54245241111525e-01, 1.50572777323006e-01, 1.47345740768358e-01, 1.44532134343024e-01,\n                                                1.42099657238120e-01, 1.40016035953678e-01, 1.38249301605484e-01, 1.36768030276414e-01, 1.35541560933945e-01,\n                                                1.34540202269406e-01, 1.33735436029710e-01, 1.33100120328550e-01, 1.32608692361600e-01, 1.32237366218504e-01,\n                                                1.31964318371544e-01, 1.31769851172976e-01, 1.31636523484531e-01, 1.31549237487292e-01, 1.31495271763015e-01,\n                                                1.31464252786714e-01, 1.31448059813479e-01, 1.31440661504769e-01, 1.31437886207593e-01, 1.31437131265500e-01,\n                                                1.31437019837847e-01, 1.31437008809002e-01, 1.31436779202957e-01, 1.31435223596128e-01, 1.31429505137902e-01,\n                                                1.31414262727134e-01, 1.31380909647049e-01, 1.31317051991871e-01, 1.31206057691699e-01, 1.31026808195372e-01,\n                                                1.30753665879340e-01, 1.30356690035072e-01, 1.29802131602275e-01, 1.29053230320324e-01, 1.28071326454290e-01,\n                                                1.26817281914697e-01, 1.25253182351983e-01, 1.23344263584599e-01, 1.21060974622608e-01, 1.18381058894741e-01,\n                                                1.15291509401899e-01, 1.11790237258944e-01, 1.07887291104518e-01, 1.03605480722408e-01, 9.89802934723940e-02,\n                                                9.40590455417265e-02, 8.88992771987915e-02, 8.35664747430229e-02, 7.81312721111789e-02, 7.26663418010958e-02,\n                                                6.72432187962357e-02, 6.19293065360011e-02, 5.67852893349112e-02, 5.18631248215797e-02, 4.72047212541185e-02,\n                                                4.28413289904483e-02, 3.87936043283190e-02, 3.50722468117795e-02, 3.16790738324215e-02, 2.86083807133224e-02,\n                                                2.58484384879125e-02, 2.33830006334017e-02, 2.11927181698854e-02, 1.92563939563115e-02, 1.75520370051174e-02,\n                                                1.60577031481210e-02, 1.47521279627938e-02, 1.36151712687109e-02, 1.26281002245463e-02, 1.17737410405283e-02,\n                                                1.10365287781491e-02, 1.04024819399342e-02, 9.85912472681605e-03, 9.39537579196781e-03, 9.00141849525937e-03,\n                                                8.66856422395301e-03, 8.38911734281567e-03, 8.15624779818336e-03, 7.96387535230281e-03, 7.80656783963707e-03,\n                                                7.67945464173181e-03, 7.57815565327746e-03, 7.49872525500450e-03, 7.43761015210964e-03, 7.39161935555899e-03,\n                                                7.35790409306958e-03, 7.33394506394802e-03, 7.31754423492248e-03, 7.30681833532287e-03, 7.30019136786098e-03,\n                                                7.29638379388575e-03, 7.29439655660258e-03, 7.29348872201285e-03, 7.29314818627813e-03, 7.29305555459803e-03,\n                                                7.29304188243418e-03, 7.29304047212054e-03, 7.29301053482345e-03, 7.29280770805474e-03, 7.29206213941325e-03,\n                                                7.29007506474488e-03, 7.28572811314621e-03, 7.27740974005542e-03, 7.26296452450015e-03, 7.23967217379595e-03,\n                                                7.20426413698760e-03, 7.15298631121186e-03, 7.08171588861717e-03, 6.98613832975070e-03, 6.86198622891254e-03,\n                                                6.70533517219951e-03, 6.51294275029102e-03, 6.28260651296841e-03, 6.01350643511012e-03, 5.70648968721343e-03,\n                                                5.36425277579156e-03, 4.99138074491157e-03, 4.59421628556811e-03, 4.18055256103855e-03, 3.75916930870801e-03,\n                                                3.33925733451679e-03, 2.92979607556276e-03, 2.53895761225920e-03, 2.17360616360907e-03, 1.83894599307166e-03,\n                                                1.53834696195077e-03, 1.27335095359626e-03, 1.04383843553535e-03, 8.48315293083601e-04, 6.84267683013218e-04,\n                                                5.48529292743183e-04, 4.37613175378715e-04, 3.47978547836192e-04, 2.76225465384528e-04, 2.19227108289033e-04,\n                                                1.74213172485338e-04, 1.38810728884664e-04, 1.11042386350846e-04, 8.92862707928543e-05, 7.22161154271816e-05,\n                                                5.87488687955329e-05, 4.80203028985215e-05, 3.93860416068037e-05, 3.24174150847512e-05, 2.68518109152183e-05,\n                                                2.24894932330244e-05, 1.90964262003490e-05, 1.63987283627876e-05, 1.41593107656490e-05, 1.22319640354362e-05,\n                                                1.05450125005291e-05, 9.05827383235192e-06, 7.73920928054395e-06, 6.56170429635949e-06, 5.50953377853602e-06,\n                                                4.57430408573600e-06, 3.75024448828754e-06, 3.03083872665866e-06, 2.40853893274107e-06, 1.87585028754711e-06,\n                                                1.42603481378956e-06, 1.05297471009180e-06, 7.50613892819274e-07, 5.12470265334741e-07, 2.84217094304040e-14,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.50000000000000e+01,  7.49999996629595e+01,  7.49999892409974e+01,  7.49999186304761e+01,\n                                                7.49996590558134e+01,  7.49989671026640e+01,  7.49974526665126e+01,  7.49945519052862e+01,\n                                                7.49895060994816e+01,  7.49813471042673e+01,  7.49688898448994e+01,  7.49507320898660e+01,\n                                                7.49252615752117e+01,  7.48906704922928e+01,  7.48449774254663e+01,  7.47860570443198e+01,\n                                                7.47116781746766e+01,  7.46195511812532e+01,  7.45073857068124e+01,  7.43729594967026e+01,\n                                                7.42141980834029e+01,  7.40292634219247e+01,  7.38166472839950e+01,  7.35752627480311e+01,\n                                                7.33045251211504e+01,  7.30044128506505e+01,  7.26755000210535e+01,  7.23189550619899e+01,\n                                                7.19365048948200e+01,  7.15303689440796e+01,  7.11031719476934e+01,  7.06578471265359e+01,\n                                                7.01975413263798e+01,  6.97255312700703e+01,  6.92451558259881e+01,  6.87597644482983e+01,\n                                                6.82726779873996e+01,  6.77871559081146e+01,  6.73063640159588e+01,  6.68333388307674e+01,\n                                                6.63709479133091e+01,  6.59218485454335e+01,  6.54884490533191e+01,  6.50728771435191e+01,\n                                                6.46769580990057e+01,  6.43022034354093e+01,  6.39498086816695e+01,  6.36206579712868e+01,\n                                                6.33153331532581e+01,  6.30341257719257e+01,  6.27770510506065e+01,  6.25438636272353e+01,\n                                                6.23340751241530e+01,  6.21469737262598e+01,  6.19816458834393e+01,  6.18370001285563e+01,\n                                                6.17117928654172e+01,  6.16046558570781e+01,  6.15141250404978e+01,  6.14386702070507e+01,\n                                                6.13767250164186e+01,  6.13267167520248e+01,  6.12870951801642e+01,  6.12563598451578e+01,\n                                                6.12330851232796e+01,  6.12159423730716e+01,  6.12037185623273e+01,  6.11953308242224e+01,\n                                                6.11898364964271e+01,  6.11864383248227e+01,  6.11844846627069e+01,  6.11834646602515e+01,\n                                                6.11829986093332e+01,  6.11828237769984e+01,  6.11827762183127e+01,  6.11827691987485e+01,\n                                                6.11827682378692e+01,  6.11827455451528e+01,  6.11825917988844e+01,  6.11820266146932e+01,\n                                                6.11805200669191e+01,  6.11772231547181e+01,  6.11709096743059e+01,  6.11599320452581e+01,\n                                                6.11421934791919e+01,  6.11151386782576e+01,  6.10757649712771e+01,  6.10206553886956e+01,\n                                                6.09460345925877e+01,  6.08478477731486e+01,  6.07218615824347e+01,  6.05637849267521e+01,\n                                                6.03694060647214e+01,  6.01347410994650e+01,  5.98561877854324e+01,  5.95306777497955e+01,\n                                                5.91558198229978e+01,  5.87300271133781e+01,  5.82526205750784e+01,  5.77239019907790e+01,\n                                                5.71451896848482e+01,  5.65188114514539e+01,  5.58480518644354e+01,  5.51370557172654e+01,\n                                                5.43906952689179e+01,  5.36144145715161e+01,  5.28140671570238e+01,  5.19957619940754e+01,\n                                                5.11657267725840e+01,  5.03301892937223e+01,  4.94952707306183e+01,  4.86668824514169e+01,\n                                                4.78506223902687e+01,  4.70516752627721e+01,  4.62747278418326e+01,  4.55239110326988e+01,\n                                                4.48027739774232e+01,  4.41142862757775e+01,  4.34608583397547e+01,  4.28443694689172e+01,\n                                                4.22661968747596e+01,  4.17272433163217e+01,  4.12279639388848e+01,  4.07683938532842e+01,\n                                                4.03481776235468e+01,  3.99666010228412e+01,  3.96226247487461e+01,  3.93149194636372e+01,\n                                                3.90419015091295e+01,  3.88017688070910e+01,  3.85925366771912e+01,  3.84120734852525e+01,\n                                                3.82581361442743e+01,  3.81284055103507e+01,  3.80205216582995e+01,  3.79321189060212e+01,\n                                                3.78608603051106e+01,  3.78044711506742e+01,  3.77607709065955e+01,  3.77277028121087e+01,\n                                                3.77033603469420e+01,  3.76860096972329e+01,  3.76741073902396e+01,  3.76663123548166e+01,\n                                                3.76614918135035e+01,  3.76587206124106e+01,  3.76572738338357e+01,  3.76566127974634e+01,\n                                                3.76563648213074e+01,  3.76562973659134e+01,  3.76562874096434e+01,  3.76562864645190e+01,\n                                                3.76562671956771e+01,  3.76561366466712e+01,  3.76556567382025e+01,  3.76543775052076e+01,\n                                                3.76515780709909e+01,  3.76462173402830e+01,  3.76368966137586e+01,  3.76218362143250e+01,\n                                                3.75988680718271e+01,  3.75654460036367e+01,  3.75186751102103e+01,  3.74553612300908e+01,\n                                                3.73720807262898e+01,  3.72652699793007e+01,  3.71313328410679e+01,  3.69667629944694e+01,\n                                                3.67682767413843e+01,  3.65329503292865e+01,  3.62583546803452e+01,  3.59426794961630e+01,\n                                                3.55848383789246e+01,  3.51845470357515e+01,  3.47423679848061e+01,  3.42597175456354e+01,\n                                                3.37388342040276e+01,  3.31827113807823e+01,  3.25950015834837e+01,  3.19799019808142e+01,\n                                                3.13420326211625e+01,  3.06863171069441e+01,  3.00178715460134e+01,  2.93419021185984e+01,\n                                                2.86636067593186e+01,  2.79880748040762e+01,  2.73201816303555e+01,  2.66644825326070e+01,\n                                                2.60251175370326e+01,  2.54057415091321e+01,  2.48094890566490e+01,  2.42389737218876e+01,\n                                                2.36963117220821e+01,  2.31831569143489e+01,  2.27007362230043e+01,  2.22498803467460e+01,\n                                                2.18310495696350e+01,  2.14443571128164e+01,  2.10895927779339e+01,  2.07662486581105e+01,\n                                                2.04735474257306e+01,  2.02104727351629e+01,  1.99758007869515e+01,  1.97681320277150e+01,\n                                                1.95859221542277e+01,  1.94275118981814e+01,  1.92911553765002e+01,  1.91750470333348e+01,\n                                                1.90773473446349e+01,  1.89962075015390e+01,  1.89297932478215e+01,  1.88763079407747e+01,\n                                                1.88340147589849e+01,  1.88012578194921e+01,  1.87764818140164e+01,  1.87582496492524e+01,\n                                                1.87452574953558e+01,  1.87363466200671e+01,  1.87305114180670e+01,  1.87269031347206e+01,\n                                                1.87248289233822e+01,  1.87237460542107e+01,  1.87232512951478e+01,  1.87230656960140e+01,\n                                                1.87230152087451e+01,  1.87230077569371e+01,  1.87230070937793e+01,  1.87229940394430e+01,\n                                                1.87229055945973e+01,  1.87225804650414e+01,  1.87217138124672e+01,  1.87198172835037e+01,\n                                                1.87161856596599e+01,  1.87098716623894e+01,  1.86996703960823e+01,  1.86841148419348e+01,\n                                                1.86614837008891e+01,  1.86298226908265e+01,  1.85869800966682e+01,  1.85306569210512e+01,\n                                                1.84584713680987e+01,  1.83680366117468e+01,  1.82570498746453e+01,  1.81233898212370e+01,\n                                                1.79652182217833e+01,  1.77810808661700e+01,  1.75700019047186e+01,  1.73315652827378e+01,\n                                                1.70659768331221e+01,  1.67741010116508e+01,  1.64574673064009e+01,  1.61182430966443e+01,\n                                                1.57591721751366e+01,  1.53834811506392e+01,  1.49947592119849e+01,  1.45968197840973e+01,\n                                                1.41935548608567e+01,  1.37887937230911e+01,  1.33861770255703e+01,  1.29890549055120e+01,\n                                                1.26004142556581e+01,  1.22228363317009e+01,  1.18584822230454e+01,  1.15091010595275e+01,\n                                                1.11760544972054e+01,  1.08603510056111e+01,  1.05626844539459e+01,  1.02834729984006e+01,\n                                                1.00228958449116e+01,  9.78092676327365e+00,  9.55736409960042e+00,  9.35185747953619e+00,\n                                                9.16393152595553e+00,  8.99300687877010e+00,  8.83841872526787e+00,  8.69943300082923e+00,\n                                                8.57526042448207e+00,  8.46506857967724e+00,  8.36799231201626e+00,  8.28314276803727e+00,\n                                                8.20961542701197e+00,  8.14649747515591e+00,  8.09287483991793e+00,  8.04783914610002e+00,\n                                                8.01049478177401e+00,  7.97996617663090e+00,  7.95540530448135e+00,  7.93599933084646e+00,\n                                                7.92097824161725e+00,  7.90962221531863e+00,  7.90126844506973e+00,  7.89531708173487e+00,\n                                                7.89123596061532e+00,  7.88856379212575e+00,  7.88691154176337e+00,  7.88596179339702e+00,\n                                                7.88546597730405e+00,  7.88523944354536e+00,  7.88515446432058e+00,  7.88513134804397e+00,\n                                                7.88512793613482e+00,  7.88512763450453e+00,  7.88512171941130e+00,  7.88508164390720e+00,\n                                                7.88493432395542e+00,  7.88454163719049e+00,  7.88368232354428e+00,  7.88203690993483e+00,\n                                                7.87917638154653e+00,  7.87455531385952e+00,  7.86751016231752e+00,  7.85726336338946e+00,\n                                                7.84293381006205e+00,  7.82355410300904e+00,  7.79809472489752e+00,  7.76549492665205e+00,\n                                                7.72469965228322e+00,  7.67470128407598e+00,  7.61458440678929e+00,  7.54357123545310e+00,\n                                                7.46106491162759e+00,  7.36668763964011e+00,  7.26031068988401e+00,  7.14207369445988e+00,\n                                                7.01239140699967e+00,  6.87194713655671e+00,  6.72167327059951e+00,  6.56272049353423e+00,\n                                                6.39641827930542e+00,  6.22422981142282e+00,  6.04770457000465e+00,  5.86843145965169e+00,\n                                                5.68799469339685e+00,  5.50793391885642e+00,  5.32970946827291e+00,  5.15467322912919e+00,\n                                                4.98404544244926e+00,  4.81889763985534e+00,  4.66014181688003e+00,  4.50852574484355e+00,\n                                                4.36463404880614e+00,  4.22889437657811e+00,  4.10158772206751e+00,  3.98286180018147e+00,\n                                                3.87274632496772e+00,  3.77116911177440e+00,  3.67797208036690e+00,  3.59292644238374e+00,\n                                                3.51574657781421e+00,  3.44610231375876e+00,  3.38362949715986e+00,  3.32793889345855e+00,\n                                                3.27862354433540e+00,  3.23526478331522e+00,  3.19743714358063e+00,  3.16471240376971e+00,\n                                                3.13666301020771e+00,  3.11286509240327e+00,  3.09290125629187e+00,  3.07636329951124e+00,\n                                                3.06285494745339e+00,  3.05199466036831e+00,  3.04341851293347e+00,  3.03678310118875e+00,\n                                                3.03176839046927e+00,  3.02808038481881e+00,  3.02545347590130e+00,  3.02365231958946e+00,\n                                                3.02247309219698e+00,  3.02174399558319e+00,  3.02132490970277e+00,  3.02110613006793e+00,\n                                                3.02100617263210e+00,  3.02096867592131e+00,  3.02095847597990e+00,  3.02095697049258e+00,\n                                                3.02095683534220e+00,  3.02095416171359e+00,  3.02093604755510e+00,  3.02086945902046e+00,\n                                                3.02069196633275e+00,  3.02030356799904e+00,  3.01955989225290e+00,  3.01826711417584e+00,\n                                                3.01617892993970e+00,  3.01299592900371e+00,  3.00836769181680e+00,  3.00189790305777e+00,\n                                                2.99315269621232e+00,  2.98167232316324e+00,  2.96698606542049e+00,  2.94863007181704e+00,\n                                                2.92616753116772e+00,  2.89921028964746e+00,  2.86744073544548e+00,  2.83063254074689e+00,\n                                                2.78866871997577e+00,  2.74155547546611e+00,  2.68943048484063e+00,  2.63256464249147e+00,\n                                                2.57135677561769e+00,  2.50632145894858e+00,  2.43807067472899e+00,  2.36729061960754e+00,\n                                                2.29471536919738e+00,  2.22109931969889e+00,  2.14719031459482e+00,  2.07370515111718e+00,\n                                                2.00130879476013e+00,  1.93059817665718e+00,  1.86209097599925e+00,  1.79621935479793e+00,\n                                                1.73332825437289e+00,  1.67367760246539e+00,  1.61744762174041e+00,  1.56474636830542e+00,\n                                                1.51561864903955e+00,  1.47005555071784e+00,  1.42800394144668e+00,  1.38937545483061e+00,\n                                                1.35405462050728e+00,  1.32190594600974e+00,  1.29277987419253e+00,  1.26651763278234e+00,\n                                                1.24295505757101e+00,  1.22192551114101e+00,  1.20326203931974e+00,  1.18679891282468e+00,\n                                                1.17237269644599e+00,  1.15982297643851e+00,  1.14899286138309e+00,  1.13972935451893e+00,\n                                                1.13188367757100e+00,  1.12531160799463e+00,  1.11987387360846e+00,  1.11543663094535e+00,\n                                                1.11187203650250e+00,  1.10905890372943e+00,  1.10688342354482e+00,  1.10523991306948e+00,\n                                                1.10403154685969e+00,  1.10317101797298e+00,  1.10258107332723e+00,  1.10219486938902e+00,\n                                                1.10195610026292e+00,  1.10181886034407e+00,  1.10174721703831e+00,  1.10171448451516e+00,\n                                                1.10170220572221e+00,  1.10169886562174e+00,  1.10169837263096e+00,  1.10169832718601e+00,\n                                                1.10169741492977e+00,  1.10169123428848e+00,  1.10166851403103e+00,  1.10160795349789e+00,\n                                                1.10147543515487e+00,  1.10122171142595e+00,  1.10078068625420e+00,  1.10006841559625e+00,\n                                                1.09898295353452e+00,  1.09740516795638e+00,  1.09520063675321e+00,  1.09222270674195e+00,\n                                                1.08831674810709e+00,  1.08332556412398e+00,  1.07709581975323e+00,  1.06948523875447e+00,\n                                                1.06037019836666e+00,  1.04965323996073e+00,  1.03726993382075e+00,  1.02319450720860e+00,\n                                                1.00744368376996e+00,  9.90078296591534e-01,  9.71202421162914e-01,  9.50960008033064e-01,\n                                                9.29529245811381e-01,  9.07115114802636e-01,  8.83940763401483e-01,  8.60238427130142e-01,\n                                                8.36240603802054e-01,  8.12172105480172e-01,  7.88243451216715e-01,  7.64645874931702e-01,\n                                                7.41548031933831e-01,  7.19094321610356e-01,  6.97404619470646e-01,  6.76575135642580e-01,\n                                                6.56680087114935e-01,  6.37773879641713e-01,  6.19893531439317e-01,  6.03061123251294e-01,\n                                                5.87286117841899e-01,  5.72567448505566e-01,  5.58895325313429e-01,  5.46252746633513e-01,\n                                                5.34616731151658e-01,  5.23959302956897e-01,  5.14248270974861e-01,  5.05447846295880e-01,\n                                                4.97519138897218e-01,  4.90420570746934e-01,  4.84108236698575e-01,  4.78536238869381e-01,\n                                                4.73657014845671e-01,  4.69421675259611e-01,  4.65780362002349e-01,  4.62682634429456e-01,\n                                                4.60077887206722e-01,  4.57915799790115e-01,  4.56146813864223e-01,  4.54722631394048e-01,\n                                                4.53596722386422e-01,  4.52724828193922e-01,  4.52065443468925e-01,  4.51580257947896e-01,\n                                                4.51234538361632e-01,  4.50997431113208e-01,  4.50842168035933e-01,  4.50746160523735e-01,\n                                                4.50690971466400e-01,  4.50662159466077e-01,  4.50648995404435e-01,  4.50644057171786e-01,\n                                                4.50642713858571e-01,  4.50642515588569e-01,  4.50642496693618e-01,  4.50642110695256e-01,\n                                                4.50639495507090e-01,  4.50629881913173e-01,  4.50604256479892e-01,  4.50548180302860e-01,\n                                                4.50440804788883e-01,  4.50254131266746e-01,  4.49952560453582e-01,  4.49492776402082e-01,\n                                                4.48824006408969e-01,  4.47888692050995e-01,  4.46623595483345e-01,  4.44961348040081e-01,\n                                                4.42832424267777e-01,  4.40167494107897e-01,  4.36900070802380e-01,  4.32969335685996e-01,\n                                                4.28322988354864e-01,  4.22919947691085e-01,  4.16732721609705e-01,  4.09749275274564e-01,\n                                                4.01974259952425e-01,  3.93429514762303e-01,  3.84153814587464e-01,  3.74201899979596e-01,\n                                                3.63642879147875e-01,  3.52558130259780e-01,  3.41038850460080e-01,  3.29183397193290e-01,\n                                                3.17094552602100e-01,  3.04876820078277e-01,  2.92633840248058e-01,  2.80465996241830e-01,\n                                                2.68468266257472e-01,  2.56728373528858e-01,  2.45325276652451e-01,  2.34328033643862e-01,\n                                                2.23795059290310e-01,  2.13773777426866e-01,  2.04300649510571e-01,  1.95401541068719e-01,\n                                                1.87092371086550e-01,  1.79379978307040e-01,  1.72263133756871e-01,  1.65733630463265e-01,\n                                                1.59777388246454e-01,  1.54375522097240e-01,  1.49505335260642e-01,  1.45141211174376e-01,\n                                                1.41255390617232e-01,  1.37818630964929e-01,  1.34800752872238e-01,  1.32171085850331e-01,\n                                                1.29898828159881e-01,  1.27953338400090e-01,  1.26304376414296e-01,  1.24922309954385e-01,\n                                                1.23778301243647e-01,  1.22844484448393e-01,  1.22094141398165e-01,  1.21501878973788e-01,\n                                                1.21043807700076e-01,  1.20697717520741e-01,  1.20443243762992e-01,  1.20262014145069e-01,\n                                                1.20137766510666e-01,  1.20056426873504e-01,  1.20006138316199e-01,  1.19977233199677e-01,\n                                                1.19962143809360e-01,  1.19955249727113e-01,  1.19952663581117e-01,  1.19951960092592e-01,\n                                                1.19951856259362e-01,  1.19951845982186e-01,  1.19951632025149e-01,  1.19950182442224e-01,\n                                                1.19944853735262e-01,  1.19930650228454e-01,  1.19899570613057e-01,  1.19840066335129e-01,\n                                                1.19736640779919e-01,  1.19569619511296e-01,  1.19315122903771e-01,  1.18945272405881e-01,\n                                                1.18428659190499e-01,  1.17731097774666e-01,  1.16816676152979e-01,  1.15649097307326e-01,\n                                                1.14193284566184e-01,  1.12417196104360e-01,  1.10293763989901e-01,  1.07802843882411e-01,\n                                                1.04933037027422e-01,  1.01683231324358e-01,  9.80637074733721e-02,  9.40966728721122e-02,\n                                                8.98161213118698e-02,  8.52669690896448e-02,  8.05034832689415e-02,  7.55870879903426e-02,\n                                                7.05837005254040e-02,  6.55608003424248e-02,  6.05844634362995e-02,  5.57165954706420e-02,\n                                                5.10125703456197e-02,  4.65194299579963e-02,  4.22747345164396e-02,  3.83060814398846e-02,\n                                                3.46312452198845e-02,  3.12588391946917e-02,  2.81893679765943e-02,  2.54165273744036e-02,\n                                                2.29286147258136e-02,  2.07099319693924e-02,  1.87420909821157e-02,  1.70051603763142e-02,\n                                                1.54786208607760e-02,  1.41421196683496e-02,  1.29760321324142e-02,  1.19618501353642e-02,\n                                                1.10824235230353e-02,  1.03220827497665e-02,  9.66667018916212e-03,  9.10350483422917e-03,\n                                                8.62130145732465e-03,  8.21006138961877e-03,  7.86094836662699e-03,  7.56615959913631e-03,\n                                                7.31879946876290e-03,  7.11276101057479e-03,  6.94261858549794e-03,  6.80353378315601e-03,\n                                                6.69117554133436e-03,  6.60165463499141e-03,  6.53147200276294e-03,  6.47747979613200e-03,\n                                                6.43685353705337e-03,  6.40707335332991e-03,  6.38591195081517e-03,  6.37142680035652e-03,\n                                                6.36195399165729e-03,  6.35610134817455e-03,  6.35273870427966e-03,  6.35098369410514e-03,\n                                                6.35018195082182e-03,  6.34988121113622e-03,  6.34979940470259e-03,  6.34978733035041e-03,\n                                                6.34978608481163e-03,  6.34975964555906e-03,  6.34958051827539e-03,  6.34892206690552e-03,\n                                                6.34716718045070e-03,  6.34332819220162e-03,  6.33598195997820e-03,  6.32322521130391e-03,\n                                                6.30265625704851e-03,  6.27139012858891e-03,  6.22611471928280e-03,  6.16319511178176e-03,\n                                                6.07883141039167e-03,  5.96927158562721e-03,  5.83107482812295e-03,  5.66141286493860e-03,\n                                                5.45838738362647e-03,  5.22133259987356e-03,  4.95106516024180e-03,  4.65004134049707e-03,\n                                                4.32238591449163e-03,  3.97376910896696e-03,  3.61112697653709e-03,  3.24224352691260e-03,\n                                                2.87523558303349e-03,  2.51799848663836e-03,  2.17767829256843e-03,  1.86023212000919e-03,\n                                                1.57012393893297e-03,  1.31018167229513e-03,  1.08161744081769e-03,  8.84190057306000e-04,\n                                                7.16470744180242e-04,  5.76162444772876e-04,  4.60422663834947e-04,  3.66150331146287e-04,\n                                                2.90215468282895e-04,  2.29628824527595e-04,  1.81659014330648e-04,  1.43904580696130e-04,\n                                                1.14323706867481e-04,  9.12241870310027e-05,  7.32239183065531e-05,  5.92007472590694e-05,\n                                                4.82498847702573e-05,  3.96552038068876e-05,  3.28669094216139e-05,  2.74739805092850e-05,\n                                                2.31678701680949e-05,  1.97059070643490e-05,  1.68873205552700e-05,  1.45468807062343e-05,\n                                                1.25582762109389e-05,  1.08349683500819e-05,  9.32318877744365e-06,  7.99025976050416e-06,\n                                                6.81390920931335e-06,  5.77580225069596e-06,  4.85927765225824e-06,  4.04956449528981e-06,\n                                                3.33464507207282e-06,  2.70563637627674e-06,  2.15637844291905e-06,  1.68247173348846e-06,\n                                                1.28019145506642e-06,  9.45618353398459e-07,  6.74129950084534e-07,  4.60231817100976e-07,\n                                                -1.42108547152020e-14, 0.00000000000000e+00,  -1.42108547152020e-14, -1.42108547152020e-14,\n                                                0.00000000000000e+00,  -1.42108547152020e-14, -1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.60000000000000e+01, 7.59999996563974e+01, 7.59999890315239e+01, 7.59999170462434e+01, 7.59996524177526e+01,\n                                                7.59989469924300e+01, 7.59974030701084e+01, 7.59944458292100e+01, 7.59893017732139e+01, 7.59809838953932e+01,\n                                                7.59682840211494e+01, 7.59497725668160e+01, 7.59238057915871e+01, 7.58885405604181e+01, 7.58419567169992e+01,\n                                                7.57818873952667e+01, 7.57060579305015e+01, 7.56121343488403e+01, 7.54977825230948e+01, 7.53607387428116e+01,\n                                                7.51988914407450e+01, 7.50103720563433e+01, 7.47936506425502e+01, 7.45476292715026e+01, 7.42717242583532e+01,\n                                                7.39659274816770e+01, 7.36308382415851e+01, 7.32676603200633e+01, 7.28781637295180e+01, 7.24646160127954e+01,\n                                                7.20296925434365e+01, 7.15763778426615e+01, 7.11078697937799e+01, 7.06274958918632e+01, 7.01386461649384e+01,\n                                                6.96447224607262e+01, 6.91490997819526e+01, 6.86550932988542e+01, 6.81659249746906e+01, 6.76846860925771e+01,\n                                                6.72142954152184e+01, 6.67574559316261e+01, 6.63166149465025e+01, 6.58939320782303e+01, 6.54912578867926e+01,\n                                                6.51101233862259e+01, 6.47517387251208e+01, 6.44169984599455e+01, 6.41064910434787e+01, 6.38205109293425e+01,\n                                                6.35590725431367e+01, 6.33219259833858e+01, 6.31085746150438e+01, 6.29182947698309e+01, 6.27501576776101e+01,\n                                                6.26030536094041e+01, 6.24757180673859e+01, 6.23667597315423e+01, 6.22746897699453e+01, 6.21979520356387e+01,\n                                                6.21349536034364e+01, 6.20840950421556e+01, 6.20437997726918e+01, 6.20125418329547e+01, 6.19888713613703e+01,\n                                                6.19714371258866e+01, 6.19590054687553e+01, 6.19504751106615e+01, 6.19448873607249e+01, 6.19414314087469e+01,\n                                                6.19394445277992e+01, 6.19384071818720e+01, 6.19379332065216e+01, 6.19377554014495e+01, 6.19377070341064e+01,\n                                                6.19376998951860e+01, 6.19376989179686e+01, 6.19376758393997e+01, 6.19375194789281e+01, 6.19369446847067e+01,\n                                                6.19354125205622e+01, 6.19320595498030e+01, 6.19256387191372e+01, 6.19144744339959e+01, 6.18964342543302e+01,\n                                                6.18689194358563e+01, 6.18288762578586e+01, 6.17728296660731e+01, 6.16969401661546e+01, 6.15970840878411e+01,\n                                                6.14689562862169e+01, 6.13081930818114e+01, 6.11105118492282e+01, 6.08718622837747e+01, 6.05885831779288e+01,\n                                                6.02575576746737e+01, 5.98763594957413e+01, 5.94433825053385e+01, 5.89579460179495e+01, 5.84203684252340e+01,\n                                                5.78320022215422e+01, 5.71952249303901e+01, 5.65133834727607e+01, 5.57906944359104e+01, 5.50321087749867e+01,\n                                                5.42431548932309e+01, 5.34297765011404e+01, 5.25981795285135e+01, 5.17546958529216e+01, 5.09056631709131e+01,\n                                                5.00573139583786e+01, 4.92156657468795e+01, 4.83864107082396e+01, 4.75748114647573e+01, 4.67856160432027e+01,\n                                                4.60230033479594e+01, 4.52905621949094e+01, 4.45912974623371e+01, 4.39276519851628e+01, 4.33015339429888e+01,\n                                                4.27143440714710e+01, 4.21670015207361e+01, 4.16599696501115e+01, 4.11932834631272e+01, 4.07665796718895e+01,\n                                                4.03791294485377e+01, 4.00298732781771e+01, 3.97174570916167e+01, 3.94402689331920e+01, 3.91964756535085e+01,\n                                                3.89840593765554e+01, 3.88008536930126e+01, 3.86445796411223e+01, 3.85128815499966e+01, 3.84033627525195e+01,\n                                                3.83136210486508e+01, 3.82412836393004e+01, 3.81840410792241e+01, 3.81396796355494e+01, 3.81061113048445e+01,\n                                                3.80814006512731e+01, 3.80637875928680e+01, 3.80517052894746e+01, 3.80437923765601e+01, 3.80388989405475e+01,\n                                                3.80360858349607e+01, 3.80346171792518e+01, 3.80339461472163e+01, 3.80336944213710e+01, 3.80336259459734e+01,\n                                                3.80336158391531e+01, 3.80336148797373e+01, 3.80335953195283e+01, 3.80334627964712e+01, 3.80329756312446e+01,\n                                                3.80316770548801e+01, 3.80288352906217e+01, 3.80233935022004e+01, 3.80139318449576e+01, 3.79986437426161e+01,\n                                                3.79753283668682e+01, 3.79414010845346e+01, 3.78939233132019e+01, 3.78296527428835e+01, 3.77451141956059e+01,\n                                                3.76366904799367e+01, 3.75007314531087e+01, 3.73336781659060e+01, 3.71321975145063e+01, 3.68933213839371e+01,\n                                                3.66145830060122e+01, 3.62941423687420e+01, 3.59308922190024e+01, 3.55245367043229e+01, 3.50756361698195e+01,\n                                                3.45856141307146e+01, 3.40567258684919e+01, 3.34919920709545e+01, 3.28951047582455e+01, 3.22703154581850e+01,\n                                                3.16223162445993e+01, 3.09561222483817e+01, 3.02769598683350e+01, 2.95901595874594e+01, 2.89010484741202e+01,\n                                                2.82148376270432e+01, 2.75365049868907e+01, 2.68706820305941e+01, 2.62215589756440e+01, 2.55928223904527e+01,\n                                                2.49876308051265e+01, 2.44086227377715e+01, 2.38579440747760e+01, 2.33372812944273e+01, 2.28478919407294e+01,\n                                                2.23906299172181e+01, 2.19659673949850e+01, 2.15740165370761e+01, 2.12145536102893e+01, 2.08870466105930e+01,\n                                                2.05906861816848e+01, 2.03244187700262e+01, 2.00869806730008e+01, 1.98769317553303e+01, 1.96926879456655e+01,\n                                                1.95325520232985e+01, 1.93947425599850e+01, 1.92774211392723e+01, 1.91787181178681e+01, 1.90967572263866e+01,\n                                                1.90296792493584e+01, 1.89756649016923e+01, 1.89329568575200e+01, 1.88998807132877e+01, 1.88748645034900e+01,\n                                                1.88564562544502e+01, 1.88433389745454e+01, 1.88343424485194e+01, 1.88284512334641e+01, 1.88248083431378e+01,\n                                                1.88227142482897e+01, 1.88216210016347e+01, 1.88211215018130e+01, 1.88209341243862e+01, 1.88208831533907e+01,\n                                                1.88208756301861e+01, 1.88208749606746e+01, 1.88208617812634e+01, 1.88207724890272e+01, 1.88204442445199e+01,\n                                                1.88195692897489e+01, 1.88176545973136e+01, 1.88139882100202e+01, 1.88076138269340e+01, 1.87973151438946e+01,\n                                                1.87816113901676e+01, 1.87587653904497e+01, 1.87268052880571e+01, 1.86835607538117e+01, 1.86267140432461e+01,\n                                                1.85538656310850e+01, 1.84626133437946e+01, 1.83506429497156e+01, 1.82158271005987e+01, 1.80563284241714e+01,\n                                                1.78707015443664e+01, 1.76579879716316e+01, 1.74177972890410e+01, 1.71503679937497e+01, 1.68566018664342e+01,\n                                                1.65380669426112e+01, 1.61969661088066e+01, 1.58360710081288e+01, 1.54586241310215e+01, 1.50682153233220e+01,\n                                                1.46686419370588e+01, 1.42637638812114e+01, 1.38573653906910e+01, 1.34530341786556e+01, 1.30540659119348e+01,\n                                                1.26633981797661e+01, 1.22835740925889e+01, 1.19167321597090e+01, 1.15646167619855e+01, 1.12286026179731e+01,\n                                                1.09097270229466e+01, 1.06087249201939e+01, 1.03260635219953e+01, 1.00619747595498e+01, 9.81648499787129e+00,\n                                                9.58944210117814e+00, 9.38054014833354e+00, 9.18934204351501e+00, 9.01530012105795e+00, 8.85777473107784e+00,\n                                                8.71605076804649e+00, 8.58935216255063e+00, 8.47685446020587e+00, 8.37769571969356e+00, 8.29098604405337e+00,\n                                                8.21581610148367e+00, 8.15126499269687e+00, 8.09640778751540e+00, 8.05032299269160e+00, 8.01210013449767e+00,\n                                                7.98084755081987e+00, 7.95570039450719e+00, 7.93582875813267e+00, 7.92044574552585e+00, 7.90881524283964e+00,\n                                                7.90025908679020e+00, 7.89416329473191e+00, 7.88998301388419e+00, 7.88724586701369e+00, 7.88555341864429e+00,\n                                                7.88458055645530e+00, 7.88407267171507e+00, 7.88384062342944e+00, 7.88375357547281e+00, 7.88372989644697e+00,\n                                                7.88372640147706e+00, 7.88372609250376e+00, 7.88372003341119e+00, 7.88367898228803e+00, 7.88352807582207e+00,\n                                                7.88312582845664e+00, 7.88224559029719e+00, 7.88056009848162e+00, 7.87762985729965e+00, 7.87289607103440e+00,\n                                                7.86567883294167e+00, 7.85518122721915e+00, 7.84049990678530e+00, 7.82064254496677e+00, 7.79455230313211e+00,\n                                                7.76113909627246e+00, 7.71931697595316e+00, 7.66804640601778e+00, 7.60637962529046e+00, 7.53350674091250e+00,\n                                                7.44879976154286e+00, 7.35185155395689e+00, 7.24250677208848e+00, 7.12088221620715e+00, 6.98737483233060e+00,\n                                                6.84265659199195e+00, 6.68765666403311e+00, 6.52353241399449e+00, 6.35163164153772e+00, 6.17344893788238e+00,\n                                                5.99057906361188e+00, 5.80466989240912e+00, 5.61737691942918e+00, 5.43032079921441e+00, 5.24504899863852e+00,\n                                                5.06300245219835e+00, 4.88548801402942e+00, 4.71365739451537e+00, 4.54849305688272e+00, 4.39080120622431e+00,\n                                                4.24121157400860e+00, 4.10018326840004e+00, 3.96801560880212e+00, 3.84486264873880e+00, 3.73075003283877e+00,\n                                                3.62559291528976e+00, 3.52921385112093e+00, 3.44135981307443e+00, 3.36171774435509e+00, 3.28992829985293e+00,\n                                                3.22559763595410e+00, 3.16830727282691e+00, 3.11762217202451e+00, 3.07309725023377e+00, 3.03428259322861e+00,\n                                                3.00072764931102e+00, 2.97198467498373e+00, 2.94761168256375e+00, 2.92717510415892e+00, 2.91025234232283e+00,\n                                                2.89643432769336e+00, 2.88532815073594e+00, 2.87655978112186e+00, 2.86977683721695e+00, 2.86465132270720e+00,\n                                                2.86088221058658e+00, 2.85819772929638e+00, 2.85635719379712e+00, 2.85515222684981e+00, 2.85440723263358e+00,\n                                                2.85397901457775e+00, 2.85375546926144e+00, 2.85365333483436e+00, 2.85361502153792e+00, 2.85360459947287e+00,\n                                                2.85360306120086e+00, 2.85360292310732e+00, 2.85360019125575e+00, 2.85358168263414e+00, 2.85351364410174e+00,\n                                                2.85333228694618e+00, 2.85293543483985e+00, 2.85217558259727e+00, 2.85085471566012e+00, 2.84872124562418e+00,\n                                                2.84546941895729e+00, 2.84074154454834e+00, 2.83413334842272e+00, 2.82520268739439e+00, 2.81348172552923e+00,\n                                                2.79849249038020e+00, 2.77976548002341e+00, 2.75686069769422e+00, 2.72939017172887e+00, 2.69704071073483e+00,\n                                                2.65959539364556e+00, 2.61695215189643e+00, 2.56913781212045e+00, 2.51631616329283e+00, 2.45878899818732e+00,\n                                                2.39698963006423e+00, 2.33146904430802e+00, 2.26287552834829e+00, 2.19192923672689e+00, 2.11939360281148e+00,\n                                                2.04604573989978e+00, 1.97264795550656e+00, 1.89992224905701e+00, 1.82852922771121e+00, 1.75905233404930e+00,\n                                                1.69198771588358e+00, 1.62773955615933e+00, 1.56662027290719e+00, 1.50885472357827e+00, 1.45458740903879e+00,\n                                                1.40389165551819e+00, 1.35677983151119e+00, 1.31321379955932e+00, 1.27311497903790e+00, 1.23637357908750e+00,\n                                                1.20285673086092e+00, 1.17241539278344e+00, 1.14489001569177e+00, 1.12011503596436e+00, 1.09792231712834e+00,\n                                                1.07814368895420e+00, 1.06061274338900e+00, 1.04516604421593e+00, 1.03164389660225e+00, 1.01989080721269e+00,\n                                                1.00975574777321e+00, 1.00109231642088e+00, 9.93758872721358e-01, 9.87618704245065e-01, 9.82540265172389e-01,\n                                                9.78397510559645e-01, 9.75070333706213e-01, 9.72445098729310e-01, 9.70415246367779e-01, 9.68881938774160e-01,\n                                                9.67754699300400e-01, 9.66951996743290e-01, 9.66401720790117e-01, 9.66041496856803e-01, 9.65818794171113e-01,\n                                                9.65690790455966e-01, 9.65623969163602e-01, 9.65593439831352e-01, 9.65581987527074e-01, 9.65578872251129e-01,\n                                                9.65578412443961e-01, 9.65578370057955e-01, 9.65577519206477e-01, 9.65571754590826e-01, 9.65550563677752e-01,\n                                                9.65494079739656e-01, 9.65370482541772e-01, 9.65133842403048e-01, 9.64722521133965e-01, 9.64058247500247e-01,\n                                                9.63045987811284e-01, 9.61574730126387e-01, 9.59519288453734e-01, 9.56743205797210e-01, 9.53102787166415e-01,\n                                                9.48452222814367e-01, 9.42649668559682e-01, 9.35564039506247e-01, 9.27082156918104e-01, 9.17115782017262e-01,\n                                                9.05607995291987e-01, 8.92538355990681e-01, 8.77926319803578e-01, 8.61832509800351e-01, 8.44357619759606e-01,\n                                                8.25638959035672e-01, 8.05844891271008e-01, 7.85167637198498e-01, 7.63815068877776e-01, 7.42002194342376e-01,\n                                                7.19943009792260e-01, 6.97843291046865e-01, 6.75894731464041e-01, 6.54270642305718e-01, 6.33123246017547e-01,\n                                                6.12582438893625e-01, 5.92755792418330e-01, 5.73729506331375e-01, 5.55570016033741e-01, 5.38325981412598e-01,\n                                                5.22030430384774e-01, 5.06702886068950e-01, 4.92351361720949e-01, 4.78974155937394e-01, 4.66561418887636e-01,\n                                                4.55096487745521e-01, 4.44557007060823e-01, 4.34915859438348e-01, 4.26141935766438e-01, 4.18200774380068e-01,\n                                                4.11055096598503e-01, 4.04665263214127e-01, 3.98989673456711e-01, 3.93985125078444e-01, 3.89607151600728e-01,\n                                                3.85810350360572e-01, 3.82548712648472e-01, 3.79775964770431e-01, 3.77445926161940e-01, 3.75512887658886e-01,\n                                                3.73932009694968e-01, 3.72659736637388e-01, 3.71654219859991e-01, 3.70875738719789e-01, 3.70287105617280e-01,\n                                                3.69854039071427e-01, 3.69545487478192e-01, 3.69333886146393e-01, 3.69195331416364e-01, 3.69109658154343e-01,\n                                                3.69060410541252e-01, 3.69034700590646e-01, 3.69022953899460e-01, 3.69018547374395e-01, 3.69017348698804e-01,\n                                                3.69017171777031e-01, 3.69017154916548e-01, 3.69016810479593e-01, 3.69014476876245e-01, 3.69005898418067e-01,\n                                                3.68983032278805e-01, 3.68932994760414e-01, 3.68837184043514e-01, 3.68670621940581e-01, 3.68401556923260e-01,\n                                                3.67991369914961e-01, 3.67394821951763e-01, 3.66560677441370e-01, 3.65432726903563e-01, 3.63951217449355e-01,\n                                                3.62054677102179e-01, 3.59682090615365e-01, 3.56775351281840e-01, 3.53281878507175e-01, 3.49157259208098e-01,\n                                                3.44367747876205e-01, 3.38892450800117e-01, 3.32725028489847e-01, 3.25874778225071e-01, 3.18367003871174e-01,\n                                                3.10242637284659e-01, 3.01557136897955e-01, 2.92378745794608e-01, 2.82786236302684e-01, 2.72866296177028e-01,\n                                                2.62710721641028e-01, 2.52413576938977e-01, 2.42068462686760e-01, 2.31766010879682e-01, 2.21591696991425e-01,\n                                                2.11624031980620e-01, 2.01933170741427e-01, 1.92579949259908e-01, 1.83615340801836e-01, 1.75080302269166e-01,\n                                                1.67005966020895e-01, 1.59414120655924e-01, 1.52317917050453e-01, 1.45722733529027e-01, 1.39627136150835e-01,\n                                                1.34023876004633e-01, 1.28900874107913e-01, 1.24242154852880e-01, 1.20028699830755e-01, 1.16239204361150e-01,\n                                                1.12850728466967e-01, 1.09839241939810e-01, 1.07180069342377e-01, 1.04848245288423e-01, 1.02818793237049e-01,\n                                                1.01066942519665e-01, 9.95682985913220e-02, 9.82989807684902e-02, 9.72357401771262e-02, 9.63560684687224e-02,\n                                                9.56383052362781e-02, 9.50617491499486e-02, 9.46067748060528e-02, 9.42549543342750e-02, 9.39891801247228e-02,\n                                                9.37937828082624e-02, 9.36546370178917e-02, 9.35592465993977e-02, 9.34968008983219e-02, 9.34581945202524e-02,\n                                                9.34360044675060e-02, 9.34244206470112e-02, 9.34191282203756e-02, 9.34171428996535e-02, 9.34166028491177e-02,\n                                                9.34165231389557e-02, 9.34165152494444e-02, 9.34163510000161e-02, 9.34152381920939e-02, 9.34111474844030e-02,\n                                                9.34002438659292e-02, 9.33763851472520e-02, 9.33307065766371e-02, 9.32513141090396e-02, 9.31231100215655e-02,\n                                                9.29277755502511e-02, 9.26439352339230e-02, 9.22475256844990e-02, 9.17123864741711e-02, 9.10110817571734e-02,\n                                                9.01159475039179e-02, 8.90003408161846e-02, 8.76400455930622e-02, 8.60147647423020e-02, 8.41096061248265e-02,\n                                                8.19164512104607e-02, 7.94350860037980e-02, 7.66739767037166e-02, 7.36505899983655e-02, 7.03911900164655e-02,\n                                                6.69300883711372e-02, 6.33083755724471e-02, 5.95722145897639e-02, 5.57708229859486e-02, 5.19543019221800e-02,\n                                                4.81714835624985e-02, 4.44679611344299e-02, 4.08844396852146e-02, 3.74555050156005e-02, 3.42088600307875e-02,\n                                                3.11650291254466e-02, 2.83374887683010e-02, 2.57331508788354e-02, 2.33531071878872e-02, 2.11935374468482e-02,\n                                                1.92466900972477e-02, 1.75018576780275e-02, 1.59462873223220e-02, 1.45659859808234e-02, 1.33463980143773e-02,\n                                                1.22729479256805e-02, 1.13314524849386e-02, 1.05084142647627e-02, 9.79121303058150e-03, 9.16821318413952e-03,\n                                                8.62880526710796e-03, 8.16339808493183e-03, 7.76337587767273e-03, 7.42103256756366e-03, 7.12949274810626e-03,\n                                                6.88262692300157e-03, 6.67496664547684e-03, 6.50162366888196e-03, 6.35821597214203e-03, 6.24080251991188e-03,\n                                                6.14582780055173e-03, 6.07007650521041e-03, 6.01063812877101e-03, 5.96488076595847e-03, 5.93043293545747e-03,\n                                                5.90517189910145e-03, 5.88721666818515e-03, 5.87492372748954e-03, 5.86688347566167e-03, 5.86191549163573e-03,\n                                                5.85906098265809e-03, 5.85757113235275e-03, 5.85689051261795e-03, 5.85663520566015e-03, 5.85656575756843e-03,\n                                                5.85655550725050e-03, 5.85655444989186e-03, 5.85653200472791e-03, 5.85637993746957e-03, 5.85582095304460e-03,\n                                                5.85433114294176e-03, 5.85107193309398e-03, 5.84483476414732e-03, 5.83400268023127e-03, 5.81653376525537e-03,\n                                                5.78997209333920e-03, 5.75149225794291e-03, 5.69798323260784e-03, 5.62617587551983e-03, 5.53281544891604e-03,\n                                                5.41487588287737e-03, 5.26980628063711e-03, 5.09579290576312e-03, 4.89201269328987e-03, 4.65884873838718e-03,\n                                                4.39803601526023e-03, 4.11270834752031e-03, 3.80732621327695e-03, 3.48747889276524e-03, 3.15957180535520e-03,\n                                                2.83042741362749e-03, 2.50684206278606e-03, 2.19514845220203e-03, 1.90083258694074e-03, 1.62824551553342e-03,\n                                                1.38043593062775e-03, 1.15911237924138e-03, 9.64725853918935e-04, 7.96647372737880e-04, 6.53403789158347e-04,\n                                                5.32931760304223e-04, 4.32816184755325e-04, 3.50493094359194e-04, 2.83411330983085e-04, 2.29155329805053e-04,\n                                                1.85531109153203e-04, 1.50614419496264e-04, 1.22761460985998e-04, 1.00590443167903e-04, 8.29500085188783e-05,\n                                                6.88898579142005e-05, 5.76389997490878e-05, 4.85863281198817e-05, 4.12560127927009e-05, 3.52770493066146e-05,\n                                                3.03541414723441e-05, 2.62479606334409e-05, 2.27666072589727e-05, 1.97631975851209e-05, 1.71327082085782e-05,\n                                                1.48046655539247e-05, 1.27328728041221e-05, 1.08855458336166e-05, 9.23845712463844e-06, 7.77160293807810e-06,\n                                                6.46828118533449e-06, 5.31503467016137e-06, 4.30140184448646e-06, 3.41916138779652e-06, 2.66126676251588e-06,\n                                                2.02081393751996e-06, 1.49028946339058e-06, 1.06117926179650e-06, 7.23891673715116e-07, 4.67894565758797e-07,\n                                                2.84217094304040e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.70000000000000e+01, 7.69999996498613e+01, 7.69999888228761e+01, 7.69999154682546e+01, 7.69996458058529e+01,\n                                                7.69989269614462e+01, 7.69973536691209e+01, 7.69943401709573e+01, 7.69890982513342e+01, 7.69806221151707e+01,\n                                                7.69676805773337e+01, 7.69488168065123e+01, 7.69223557035031e+01, 7.68864189376380e+01, 7.68389477536361e+01,\n                                                7.67777339021321e+01, 7.67004593929765e+01, 7.66047460973543e+01, 7.64882163305120e+01, 7.63485651817603e+01,\n                                                7.61836442993145e+01, 7.59915549958661e+01, 7.57707460731519e+01, 7.55201091326489e+01, 7.52390620693443e+01,\n                                                7.49276107473589e+01, 7.45863801495880e+01, 7.42166097181914e+01, 7.38201126478316e+01, 7.33992044499166e+01,\n                                                7.29566107632858e+01, 7.24953668844854e+01, 7.20187211533360e+01, 7.15300513072479e+01, 7.10327981401930e+01,\n                                                7.05304156704346e+01, 7.00263329675455e+01, 6.95239208607352e+01, 6.90264573256372e+01, 6.85370880327087e+01,\n                                                6.80587822663260e+01, 6.75942877571386e+01, 6.71460896481013e+01, 6.67163783160155e+01, 6.63070285844950e+01,\n                                                6.59195901890931e+01, 6.55552873810083e+01, 6.52150248476351e+01, 6.48993975156271e+01, 6.46087027171545e+01,\n                                                6.43429541018053e+01, 6.41018972766007e+01, 6.38850274140472e+01, 6.36916090762040e+01, 6.35206983812237e+01,\n                                                6.33711674779094e+01, 6.32417311420775e+01, 6.31309751827446e+01, 6.30373862459761e+01, 6.29593825233991e+01,\n                                                6.28953448051729e+01, 6.28436472610560e+01, 6.28026872889225e+01, 6.27709137410229e+01, 6.27468528291219e+01,\n                                                6.27291310251264e+01, 6.27164943177189e+01, 6.27078232598301e+01, 6.27021433462506e+01, 6.26986303925374e+01,\n                                                6.26966107405040e+01, 6.26955562848998e+01, 6.26950744919471e+01, 6.26948937542144e+01, 6.26948445891158e+01,\n                                                6.26948373324483e+01, 6.26948363391130e+01, 6.26948128798936e+01, 6.26946539404625e+01, 6.26940696657738e+01,\n                                                6.26925122306484e+01, 6.26891039573209e+01, 6.26825772246492e+01, 6.26712288032973e+01, 6.26528910865192e+01,\n                                                6.26249224790695e+01, 6.25842189188548e+01, 6.25272480876607e+01, 6.24501072663968e+01, 6.23486049644798e+01,\n                                                6.22183653861972e+01, 6.20549535165287e+01, 6.18540171981053e+01, 6.16114411671364e+01, 6.13235067858721e+01,\n                                                6.09870502970255e+01, 6.05996118913958e+01, 6.01595676672969e+01, 5.96662365513131e+01, 5.91199544261348e+01,\n                                                5.85221083442974e+01, 5.78751253957804e+01, 5.71824141894815e+01, 5.64482621382700e+01, 5.56776979112776e+01,\n                                                5.48763335866009e+01, 5.40502028963808e+01, 5.32056090570780e+01, 5.23489885644619e+01, 5.14867888739362e+01,\n                                                5.06253523283373e+01, 4.97707994739571e+01, 4.89289120965258e+01, 4.81050255386118e+01, 4.73039445172453e+01,\n                                                4.65298928433080e+01, 4.57864974998311e+01, 4.50767981772766e+01, 4.44032699130867e+01, 4.37678491665977e+01,\n                                                4.31719589561835e+01, 4.26165330114691e+01, 4.21020407829625e+01, 4.16285150345061e+01, 4.11955827360587e+01,\n                                                4.08024989750306e+01, 4.04481830247475e+01, 4.01312555799373e+01, 3.98500763442147e+01, 3.96027814570142e+01,\n                                                3.93873205435557e+01, 3.92014933862880e+01, 3.90429863233801e+01, 3.89094084835688e+01, 3.87983278869717e+01,\n                                                3.87073073038274e+01, 3.86339395931591e+01, 3.85758820646166e+01, 3.85308892400403e+01, 3.84968432545414e+01,\n                                                3.84717810449755e+01, 3.84539174378772e+01, 3.84416632762087e+01, 3.84336378166281e+01, 3.84286747829637e+01,\n                                                3.84258216684070e+01, 3.84243321252127e+01, 3.84236515496958e+01, 3.84233962437909e+01, 3.84233267945330e+01,\n                                                3.84233165439730e+01, 3.84233155709124e+01, 3.84232957325172e+01, 3.84231613247123e+01, 3.84226672310155e+01,\n                                                3.84213501863725e+01, 3.84184680071699e+01, 3.84129488286079e+01, 3.84033526183694e+01, 3.83878471206219e+01,\n                                                3.83642002369386e+01, 3.83297906352398e+01, 3.82816380487233e+01, 3.82164542348194e+01, 3.81307148656733e+01,\n                                                3.80207516888650e+01, 3.78828631297717e+01, 3.77134401426461e+01, 3.75091026386609e+01, 3.72668403559058e+01,\n                                                3.69841507627978e+01, 3.66591657108372e+01, 3.62907583003852e+01, 3.58786220094064e+01, 3.54233157225543e+01,\n                                                3.49262709316890e+01, 3.43897609004181e+01, 3.38168355477062e+01, 3.32112294434183e+01, 3.25772526352463e+01,\n                                                3.19196741171550e+01, 3.12436051936348e+01, 3.05543853767385e+01, 2.98574685887797e+01, 2.91583049974283e+01,\n                                                2.84622160425736e+01, 2.77742671234133e+01, 2.70991505284004e+01, 2.64410948421581e+01, 2.58038124500231e+01,\n                                                2.51904856991262e+01, 2.46037813824616e+01, 2.40458785934356e+01, 2.35184977232258e+01, 2.30229248978922e+01,\n                                                2.25600320803507e+01, 2.21302960763431e+01, 2.17338198621107e+01, 2.13703582548828e+01, 2.10393482364619e+01,\n                                                2.07399429579778e+01, 2.04710478275040e+01, 2.02313570249513e+01, 2.00193890945115e+01, 1.98335207291989e+01,\n                                                1.96720183326771e+01, 1.95330673298511e+01, 1.94147994593686e+01, 1.93153184123367e+01, 1.92327241965798e+01,\n                                                1.91651365289482e+01, 1.91107174174617e+01, 1.90676929183483e+01, 1.90343738664025e+01, 1.90091752037604e+01,\n                                                1.89906333917312e+01, 1.89774212979408e+01, 1.89683599167283e+01, 1.89624263087786e+01, 1.89587572346382e+01,\n                                                1.89566480986361e+01, 1.89555470026058e+01, 1.89550439171304e+01, 1.89548551947290e+01, 1.89548038578798e+01,\n                                                1.89547962806764e+01, 1.89547956063594e+01, 1.89547823323516e+01, 1.89546923992182e+01, 1.89543617988473e+01,\n                                                1.89534805653024e+01, 1.89515521374708e+01, 1.89478594665010e+01, 1.89414394423520e+01, 1.89310671695565e+01,\n                                                1.89152515596570e+01, 1.88922435978414e+01, 1.88600584476869e+01, 1.88165122418871e+01, 1.87592739339537e+01,\n                                                1.86859319335000e+01, 1.85940744122145e+01, 1.84813811706257e+01, 1.83457238477711e+01, 1.81852701170367e+01,\n                                                1.79985864487224e+01, 1.77847331618049e+01, 1.75433449766347e+01, 1.72746902648741e+01, 1.69797028128353e+01,\n                                                1.66599812793091e+01, 1.63177536823162e+01, 1.59558071183953e+01, 1.55773862655341e+01, 1.51860676227355e+01,\n                                                1.47856193232546e+01, 1.43798581180791e+01, 1.39725152918695e+01, 1.35671216856708e+01, 1.31669189077897e+01,\n                                                1.27747998416663e+01, 1.23932775451389e+01, 1.20244783878772e+01, 1.16701533441453e+01, 1.13317009073950e+01,\n                                                1.10101958943051e+01, 1.07064199654089e+01, 1.04208914339794e+01, 1.01538933910554e+01, 9.90550008512329e+00,\n                                                9.67560184171879e+00, 9.46392875004582e+00, 9.27007310956469e+00, 9.09351041647109e+00, 8.93361858550136e+00,\n                                                8.78969516018115e+00, 8.66097241715931e+00, 8.54663045171262e+00, 8.44580848830307e+00, 8.35761476342998e+00,\n                                                8.28113537185085e+00, 8.21544245951432e+00, 8.15960210058839e+00, 8.11268212479941e+00, 8.07376007524356e+00,\n                                                8.04193138340382e+00, 8.01631775293392e+00, 7.99607565167489e+00, 7.98040472710981e+00, 7.96855588899273e+00,\n                                                7.95983874919659e+00, 7.95362807742175e+00, 7.94936892569244e+00, 7.94658009618590e+00, 7.94485567530612e+00,\n                                                7.94386442903875e+00, 7.94334694526515e+00, 7.94311051089919e+00, 7.94302181753960e+00, 7.94299769092117e+00,\n                                                7.94299412988741e+00, 7.94299381507376e+00, 7.94298764144875e+00, 7.94294581434974e+00, 7.94279205528757e+00,\n                                                7.94238220374037e+00, 7.94148532296219e+00, 7.93976795450592e+00, 7.93678226695245e+00, 7.93195883071265e+00,\n                                                7.92460472761815e+00, 7.91390765472475e+00, 7.89894658503842e+00, 7.87870938072351e+00, 7.85211749633721e+00,\n                                                7.81805754836614e+00, 7.77541906454218e+00, 7.72313718353364e+00, 7.66023849750869e+00, 7.58588768498274e+00,\n                                                7.49943215550560e+00, 7.40044171353092e+00, 7.28874032697900e+00, 7.16442750369869e+00, 7.02788752819184e+00,\n                                                6.87978581397191e+00, 6.72105273815922e+00, 6.55285635568794e+00, 6.37656615807273e+00, 6.19371042969125e+00,\n                                                6.00592975888907e+00, 5.81492899310520e+00, 5.62242956288317e+00, 5.43012379782397e+00, 5.23963268893927e+00,\n                                                5.05246847929523e+00, 4.87000338129913e+00, 4.69344551593525e+00, 4.52382279477351e+00, 4.36197494532509e+00,\n                                                4.20855329984569e+00, 4.06402743338455e+00, 3.92869733765689e+00, 3.80270960153534e+00, 3.68607604023251e+00,\n                                                3.57869334241570e+00, 3.48036253773493e+00, 3.39080737351951e+00, 3.30969098328868e+00, 3.23663049871311e+00,\n                                                3.17120948187593e+00, 3.11298822872986e+00, 3.06151211829810e+00, 3.01631826097925e+00, 2.97694074090570e+00,\n                                                2.94291475949960e+00, 2.91377997715965e+00, 2.88908332314760e+00, 2.86838150475242e+00, 2.85124339925488e+00,\n                                                2.83725245906041e+00, 2.82600920433084e+00, 2.81713382127994e+00, 2.81026883092649e+00, 2.80508174560731e+00,\n                                                2.80126759200810e+00, 2.79855115264328e+00, 2.79668876471752e+00, 2.79546951724700e+00, 2.79471570407367e+00,\n                                                2.79428242048351e+00, 2.79405623180415e+00, 2.79395288989996e+00, 2.79391412368530e+00, 2.79390357842004e+00,\n                                                2.79390202196406e+00, 2.79390188223815e+00, 2.79389911809344e+00, 2.79388039068462e+00, 2.79381154792210e+00,\n                                                2.79362804740546e+00, 2.79322650674240e+00, 2.79245768353795e+00, 2.79112124162445e+00, 2.78896266696765e+00,\n                                                2.78567270000035e+00, 2.78088964065458e+00, 2.77420484504312e+00, 2.76517165447748e+00, 2.75331786563878e+00,\n                                                2.73816165716069e+00, 2.71923063261794e+00, 2.69608333415941e+00, 2.66833224937170e+00, 2.63566701439062e+00,\n                                                2.59787625733796e+00, 2.55486638071413e+00, 2.50667559739775e+00, 2.45348174448719e+00, 2.39560280822488e+00,\n                                                2.33348967430716e+00, 2.26771130969449e+00, 2.19893329639397e+00, 2.12789127407584e+00, 2.05536131328665e+00,\n                                                1.98212946727367e+00, 1.90896271135557e+00, 1.83658319291624e+00, 1.76564724039788e+00, 1.69672999899493e+00,\n                                                1.63031596344931e+00, 1.56679514298321e+00, 1.50646417578260e+00, 1.44953143860670e+00, 1.39612507282237e+00,\n                                                1.34630285286714e+00, 1.30006292584639e+00, 1.25735461611058e+00, 1.21808868247062e+00, 1.18214661043822e+00,\n                                                1.14938869778089e+00, 1.11966083722854e+00, 1.09280001091967e+00, 1.06863858800429e+00, 1.04700756397929e+00,\n                                                1.02773890369619e+00, 1.01066715574035e+00, 9.95630499653842e-01, 9.82471373867227e-01, 9.71036814657850e-01,\n                                                9.61178617308590e-01, 9.52753411320728e-01, 9.45622722762110e-01, 9.39653078864723e-01, 9.34716192833505e-01,\n                                                9.30689250420613e-01, 9.27455304157391e-01, 9.24903766367194e-01, 9.22930978552543e-01, 9.21440822988629e-01,\n                                                9.20345333011866e-01, 9.19565252249853e-01, 9.19030490477226e-01, 9.18680425263091e-01, 9.18464004134705e-01,\n                                                9.18339611272614e-01, 9.18274675049446e-01, 9.18245006993132e-01, 9.18233877778675e-01, 9.18230850390600e-01,\n                                                9.18230403555484e-01, 9.18230362365264e-01, 9.18229535517966e-01, 9.18223933533611e-01, 9.18203340463279e-01,\n                                                9.18148450099380e-01, 9.18028340120372e-01, 9.17798377352398e-01, 9.17398664735344e-01, 9.16753144763007e-01,\n                                                9.15769477179197e-01, 9.14339806743712e-01, 9.12342525045716e-01, 9.09645103314190e-01, 9.06108026204777e-01,\n                                                9.01589786790524e-01, 8.95952811044950e-01, 8.89070071416214e-01, 8.80832034764538e-01, 8.71153486483109e-01,\n                                                8.59979700140613e-01, 8.47291400665014e-01, 8.33108014487067e-01, 8.17488818141840e-01, 8.00531780259973e-01,\n                                                7.82370119123740e-01, 7.63166836028731e-01, 7.43107695465682e-01, 7.22393271778742e-01, 7.01230745055071e-01,\n                                                6.79826099951683e-01, 6.58377271157178e-01, 6.37068613560018e-01, 6.16066886563885e-01, 5.95518762348775e-01,\n                                                5.75549722054490e-01, 5.56264105856101e-01, 5.37746035451931e-01, 5.20060924299500e-01, 5.03257320265277e-01,\n                                                4.87368873730787e-01, 4.72416279369213e-01, 4.58409092479016e-01, 4.45347365199083e-01, 4.33223081635248e-01,\n                                                4.22021393890631e-01, 4.11721674726550e-01, 4.02298409308244e-01, 3.93721950490502e-01, 3.85959161336018e-01,\n                                                3.78973966506408e-01, 3.72727831773346e-01, 3.67180188682767e-01, 3.62288819531813e-01, 3.58010216242732e-01,\n                                                3.54299925261515e-01, 3.51112889065647e-01, 3.48403793040490e-01, 3.46127424244457e-01, 3.44239045872044e-01,\n                                                3.42694788070844e-01, 3.41452052291729e-01, 3.40469922742145e-01, 3.39709575030327e-01, 3.39134669020979e-01,\n                                                3.38711710570294e-01, 3.38410365435223e-01, 3.38203708461776e-01, 3.38068392251330e-01, 3.37984721875827e-01,\n                                                3.37936625720488e-01, 3.37911516933715e-01, 3.37900044919124e-01, 3.37895741434664e-01, 3.37894570788620e-01,\n                                                3.37894398003925e-01, 3.37894381537723e-01, 3.37894045155025e-01, 3.37891766120308e-01, 3.37883388261517e-01,\n                                                3.37861056840893e-01, 3.37812189512320e-01, 3.37718619738837e-01, 3.37555954313217e-01, 3.37293186454360e-01,\n                                                3.36892605273320e-01, 3.36310040158367e-01, 3.35495473471042e-01, 3.34394045414683e-01, 3.32947459757804e-01,\n                                                3.31095777523331e-01, 3.28779558003390e-01, 3.25942274031888e-01, 3.22532894350928e-01, 3.18508494530619e-01,\n                                                3.13836734501720e-01, 3.08498030539795e-01, 3.02487256452125e-01, 2.95814834297914e-01, 2.88507117580906e-01,\n                                                2.80606024649927e-01, 2.72167939836294e-01, 2.63261956620113e-01, 2.53967583766283e-01, 2.44372067160754e-01,\n                                                2.34567495291188e-01, 2.24647855989772e-01, 2.14706199094294e-01, 2.04832037699461e-01, 1.95109093083090e-01,\n                                                1.85613457960841e-01, 1.76412221552454e-01, 1.67562569716523e-01, 1.59111345636475e-01, 1.51095032640086e-01,\n                                                1.43540101963140e-01, 1.36463655535294e-01, 1.29874287557485e-01, 1.23773088508983e-01, 1.18154720414140e-01,\n                                                1.13008501405318e-01, 1.08319449318415e-01, 1.04069246785812e-01, 1.00237102813836e-01, 9.68004972491627e-02,\n                                                9.37358042720575e-02, 9.10187988141899e-02, 8.86250555292492e-02, 8.65302537704480e-02, 8.47104041904316e-02,\n                                                8.31420133645793e-02, 8.18022025278964e-02, 8.06687953467105e-02, 7.97203878159536e-02, 7.89364110430739e-02,\n                                                7.82971949986262e-02, 7.77840384246105e-02, 7.73792871458170e-02, 7.70664201845932e-02, 7.68301405006611e-02,\n                                                7.66564650299131e-02, 7.65328071284586e-02, 7.64480436553328e-02, 7.63925588170764e-02, 7.63582575469997e-02,\n                                                7.63385425346286e-02, 7.63282509171006e-02, 7.63235489107359e-02, 7.63217850773685e-02, 7.63213052767782e-02,\n                                                7.63212344593995e-02, 7.63212274500518e-02, 7.63210815249096e-02, 7.63200928666237e-02, 7.63164585447527e-02,\n                                                7.63067714729289e-02, 7.62855750838440e-02, 7.62449949896791e-02, 7.61744681776406e-02, 7.60605916262165e-02,\n                                                7.58871134033114e-02, 7.56350895470632e-02, 7.52832283371276e-02, 7.48084388591366e-02, 7.41865920744971e-02,\n                                                7.33934893132897e-02, 7.24060152188457e-02, 7.12034305912397e-02, 6.97687372543214e-02, 6.80900250050058e-02,\n                                                6.61616936676239e-02, 6.39854352860141e-02, 6.15708660130139e-02, 5.89357163528206e-02, 5.61055219213529e-02,\n                                                5.31128020253107e-02, 4.99957647995473e-02, 4.67966282551231e-02, 4.35596886913174e-02, 4.03292947873410e-02,\n                                                3.71478929857716e-02, 3.40542965259090e-02, 3.10822992816782e-02, 2.82597119756076e-02, 2.56078496524452e-02,\n                                                2.31414528984288e-02, 2.08689872429346e-02, 1.87932392889678e-02, 1.69121156870915e-02, 1.52195511797117e-02,\n                                                1.37064420635369e-02, 1.23615380485376e-02, 1.11722449134959e-02, 1.01253093279894e-02, 9.20737355369283e-03,\n                                                8.40540050002403e-03, 7.70697874783366e-03, 7.10052299957908e-03, 6.57538831939064e-03, 6.12191689195640e-03,\n                                                5.73143448949054e-03, 5.39621127715861e-03, 5.10939886137862e-03, 4.86495310754265e-03, 4.65755029654247e-03,\n                                                4.48250248757631e-03, 4.33567637540477e-03, 4.21341848677059e-03, 4.11248837161793e-03, 4.03000057950464e-03,\n                                                3.96337564983185e-03, 3.91029997440739e-03, 3.86869410597512e-03, 3.83668881345045e-03, 3.81260791353100e-03,\n                                                3.79495665866614e-03, 3.78241426646753e-03, 3.77382906252421e-03, 3.76821469401989e-03, 3.76474596170340e-03,\n                                                3.76275300644124e-03, 3.76171285833493e-03, 3.76123768688785e-03, 3.76105944677363e-03, 3.76101096236425e-03,\n                                                3.76100380621835e-03, 3.76100306806393e-03, 3.76098739914710e-03, 3.76088124134810e-03, 3.76049101767251e-03,\n                                                3.75945100576303e-03, 3.75717588386237e-03, 3.75282227179241e-03, 3.74526230278605e-03, 3.73307286035640e-03,\n                                                3.71454468373145e-03, 3.68771585752370e-03, 3.65043396050169e-03, 3.60045002653919e-03, 3.53554518281385e-03,\n                                                3.45368722270223e-03, 3.35320955083773e-03, 3.23299937097943e-03, 3.09267656034251e-03, 2.93274063724880e-03,\n                                                2.75466199308028e-03, 2.56089634268619e-03, 2.35480871624816e-03, 2.14050478204797e-03, 1.92258112608101e-03,\n                                                1.70581956398053e-03, 1.49486051311953e-03, 1.29389439172201e-03, 1.10640693841901e-03, 9.35005145578316e-04,\n                                                7.81337565328499e-04, 6.46108920676625e-04, 5.29176486494976e-04, 4.29705917014189e-04, 3.46358064916785e-04,\n                                                2.77477252495828e-04, 2.21256831594019e-04, 1.75869236940684e-04, 1.39560868930744e-04, 1.10720081778481e-04,\n                                                8.79245919520599e-05, 6.99658679934601e-05, 5.58431050450281e-05, 4.47273288273209e-05, 3.59138815468896e-05,\n                                                2.87927811655209e-05, 2.28554812622406e-05, 1.77272267052331e-05, 1.31919416048731e-05, 9.18160593244011e-06,\n                                                5.72565721768115e-06, 2.87005867960488e-06, 4.74763268698553e-07, 1.21045800938191e-06, 1.17090436901890e-06,\n                                                7.02615977843379e-07, 4.26325641456060e-14, 5.21969383271426e-07, 5.34290606424292e-07, 4.26325641456060e-14,\n                                                2.84217094304040e-14, 4.26325641456060e-14, 4.43863555688040e-07, 4.65027667928553e-07, 4.32012456030861e-07,\n                                                4.26325641456060e-14, 2.84217094304040e-14, 2.84217094304040e-14, 4.26325641456060e-14, 4.26325641456060e-14,\n                                                4.26325641456060e-14, 4.26325641456060e-14, 4.26325641456060e-14, 4.26325641456060e-14, 4.26325641456060e-14,\n                                                4.26325641456060e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.80000000000000e+01, 7.79999996432860e+01, 7.79999886129800e+01, 7.79999138808257e+01, 7.79996391543986e+01,\n                                                7.79989068106279e+01, 7.79973039725809e+01, 7.79942338805271e+01, 7.79888935115608e+01, 7.79802581695319e+01,\n                                                7.79670735204490e+01, 7.79478553211345e+01, 7.79208969244811e+01, 7.78842845911998e+01, 7.78359207340304e+01,\n                                                7.77735554732689e+01, 7.76948272417913e+01, 7.75973135138838e+01, 7.74785928341025e+01, 7.73363189309317e+01,\n                                                7.71683065856693e+01, 7.69726270029664e+01, 7.67477078666161e+01, 7.64924305521951e+01, 7.62062148661248e+01,\n                                                7.58890810298854e+01, 7.55416800590492e+01, 7.51652873196758e+01, 7.47617593177053e+01, 7.43334595118661e+01,\n                                                7.38831636628909e+01, 7.34139576479486e+01, 7.29291401165404e+01, 7.24321390510546e+01, 7.19264462362553e+01,\n                                                7.14155683238903e+01, 7.09029890952992e+01, 7.03921357433156e+01, 6.98863428625409e+01, 6.93888108762708e+01,\n                                                6.89025596401352e+01, 6.84303813856571e+01, 6.79747986802114e+01, 6.75380322324891e+01, 6.71219808301972e+01,\n                                                6.67282128308990e+01, 6.63579666858202e+01, 6.60121574503793e+01, 6.56913868245954e+01, 6.53959553119374e+01,\n                                                6.51258760253623e+01, 6.48808902441408e+01, 6.46604850332941e+01, 6.44639131999753e+01, 6.42902157090776e+01,\n                                                6.41382465041571e+01, 6.40066995234851e+01, 6.38941375765777e+01, 6.37990226498494e+01, 6.37197471327219e+01,\n                                                6.36546653909756e+01, 6.36021250595865e+01, 6.35604973837534e+01, 6.35282059079905e+01, 6.35037528040472e+01,\n                                                6.34857421440617e+01, 6.34728994697608e+01, 6.34640870838069e+01, 6.34583145953485e+01, 6.34547443856784e+01,\n                                                6.34526918164456e+01, 6.34516201748910e+01, 6.34511305294887e+01, 6.34509468460235e+01, 6.34508968796135e+01,\n                                                6.34508895046741e+01, 6.34508884951490e+01, 6.34508646535823e+01, 6.34507031236966e+01, 6.34501093262852e+01,\n                                                6.34485265075558e+01, 6.34450626852616e+01, 6.34384295789864e+01, 6.34268962022062e+01, 6.34082596266541e+01,\n                                                6.33798352194745e+01, 6.33384683617543e+01, 6.32805692331172e+01, 6.32021716383327e+01, 6.30990160156075e+01,\n                                                6.29666556861564e+01, 6.28005841079865e+01, 6.25963794660680e+01, 6.23498615015314e+01, 6.20572542168916e+01,\n                                                6.17153471321456e+01, 6.13216471664151e+01, 6.08745129355203e+01, 6.03732631994694e+01, 5.98182513953628e+01,\n                                                5.92108989694631e+01, 5.85536821870785e+01, 5.78500708376950e+01, 5.71044227654706e+01, 5.63218443803302e+01,\n                                                5.55080321728609e+01, 5.46691114758545e+01, 5.38114850452786e+01, 5.29416963941923e+01, 5.20663044935456e+01,\n                                                5.11917619158816e+01, 5.03242908893167e+01, 4.94697602225652e+01, 4.86335752051798e+01, 4.78205954708460e+01,\n                                                4.70350896146733e+01, 4.62807241477196e+01, 4.55605756500731e+01, 4.48771532811026e+01, 4.42324229548024e+01,\n                                                4.36278302300755e+01, 4.30643229051378e+01, 4.25423755406070e+01, 4.20620175142003e+01, 4.16228649734545e+01,\n                                                4.12241560426040e+01, 4.08647881579881e+01, 4.05433563987256e+01, 4.02581919532229e+01, 4.00074002270368e+01,\n                                                3.97888984232647e+01, 3.96004526478029e+01, 3.94397146919809e+01, 3.93042586362102e+01, 3.91916173251202e+01,\n                                                3.90993186151525e+01, 3.90249211163129e+01, 3.89660489643176e+01, 3.89204249881904e+01, 3.88859014989707e+01,\n                                                3.88604878320792e+01, 3.88423737400618e+01, 3.88299477606904e+01, 3.88218097796081e+01, 3.88167771632947e+01,\n                                                3.88138840481991e+01, 3.88123736218649e+01, 3.88116835048392e+01, 3.88114246196124e+01, 3.88113541966948e+01,\n                                                3.88113438024248e+01, 3.88113428157221e+01, 3.88113226991981e+01, 3.88111864070330e+01, 3.88106853862886e+01,\n                                                3.88093498771386e+01, 3.88064272911397e+01, 3.88008307376350e+01, 3.87910999995578e+01, 3.87753771436385e+01,\n                                                3.87513988006374e+01, 3.87165069325497e+01, 3.86676795692086e+01, 3.86015824961256e+01, 3.85146421639777e+01,\n                                                3.84031391395763e+01, 3.82633202283094e+01, 3.80915260077850e+01, 3.78843290074317e+01, 3.76386762846833e+01,\n                                                3.73520288672662e+01, 3.70224896711288e+01, 3.66489112993192e+01, 3.62309757980403e+01, 3.57692401467585e+01,\n                                                3.52651440067648e+01, 3.47209798368171e+01, 3.41398293895001e+01, 3.35254739982160e+01, 3.28822879477484e+01,\n                                                3.22151237464235e+01, 3.15291950948254e+01, 3.08299587138108e+01, 3.01229921366345e+01, 2.94138638522810e+01,\n                                                2.87079965308504e+01, 2.80105321758771e+01, 2.73262150904128e+01, 2.66593087613787e+01, 2.60135543154342e+01,\n                                                2.53921656127623e+01, 2.47978469398102e+01, 2.42328181382235e+01, 2.36988374391817e+01, 2.31972194717285e+01,\n                                                2.27288509142620e+01, 2.22942078480596e+01, 2.18933779420669e+01, 2.15260886641248e+01, 2.11917409296949e+01,\n                                                2.08894464963491e+01, 2.06180670439038e+01, 2.03762530589947e+01, 2.01624811230259e+01, 1.99750887747581e+01,\n                                                1.98123066432138e+01, 1.96722879487445e+01, 1.95531357247303e+01, 1.94529282250578e+01, 1.93697429752584e+01,\n                                                1.93016798268095e+01, 1.92468832146971e+01, 1.92035636265118e+01, 1.91700180930637e+01, 1.91446493284697e+01,\n                                                1.91259830009303e+01, 1.91126825186915e+01, 1.91035606786800e+01, 1.90975875520539e+01, 1.90938940695371e+01,\n                                                1.90917709123341e+01, 1.90906624992191e+01, 1.90901560712482e+01, 1.90899660950813e+01, 1.90899144171888e+01,\n                                                1.90899067896485e+01, 1.90899061108519e+01, 1.90898927486624e+01, 1.90898022180944e+01, 1.90894694216241e+01,\n                                                1.90885823351088e+01, 1.90866411033916e+01, 1.90829239313576e+01, 1.90764613619116e+01, 1.90660204915825e+01,\n                                                1.90501006152123e+01, 1.90269416834247e+01, 1.89945467623407e+01, 1.89507193638311e+01, 1.88931160302768e+01,\n                                                1.88193138862683e+01, 1.87268920066081e+01, 1.86135244175176e+01, 1.84770813990295e+01, 1.83157345762287e+01,\n                                                1.81280601903719e+01, 1.79131340678434e+01, 1.76706113118943e+01, 1.74007837905580e+01, 1.71046092322691e+01,\n                                                1.67837072748798e+01, 1.64403201661470e+01, 1.60772388708096e+01, 1.56976988080979e+01, 1.53052528442220e+01,\n                                                1.49036318889676e+01, 1.44966048906892e+01, 1.40878497720011e+01, 1.36808448322848e+01, 1.32787867207514e+01,\n                                                1.28845369738888e+01, 1.25005951986426e+01, 1.21290940611699e+01, 1.17718097870893e+01, 1.14301819395037e+01,\n                                                1.11053374648459e+01, 1.07981157904812e+01, 1.05090935006756e+01, 1.02386083553099e+01, 9.98678297304032e+00,\n                                                9.75354847461016e+00, 9.53866803794594e+00, 9.34175994300318e+00, 9.16231947697146e+00, 8.99973908922762e+00,\n                                                8.85332638054510e+00, 8.72231978403006e+00, 8.60590205460696e+00, 8.50321187422952e+00, 8.41335398447985e+00,\n                                                8.33540828609048e+00, 8.26843831652734e+00, 8.21149945271678e+00, 8.16364710213459e+00, 8.12394505211155e+00,\n                                                8.09147405060683e+00, 8.06534059598947e+00, 8.04468582215534e+00, 8.02869428255397e+00, 8.01660236692945e+00,\n                                                8.00770603260295e+00, 8.00136750240266e+00, 7.99702057729935e+00, 7.99417423508177e+00, 7.99241423643699e+00,\n                                                7.99140253357240e+00, 7.99087436876583e+00, 7.99063305395460e+00, 7.99054252974025e+00, 7.99051790508200e+00,\n                                                7.99051427053850e+00, 7.99051394922618e+00, 7.99050764816008e+00, 7.99046495762728e+00, 7.99030802446647e+00,\n                                                7.98988971174896e+00, 7.98897431294834e+00, 7.98722147659302e+00, 7.98417409858124e+00, 7.97925092333959e+00,\n                                                7.97174456918523e+00, 7.96082564114397e+00, 7.94555349497281e+00, 7.92489404644252e+00, 7.89774475989384e+00,\n                                                7.86296658762957e+00, 7.81942216898898e+00, 7.76601905693278e+00, 7.70175616609106e+00, 7.62577109817950e+00,\n                                                7.53738558457025e+00, 7.43614608254570e+00, 7.32185664817487e+00, 7.19460162479373e+00, 7.05475641378808e+00,\n                                                6.90298554678186e+00, 6.74022830737324e+00, 6.56767307968826e+00, 6.38672227786878e+00, 6.19895006130439e+00,\n                                                6.00605509790662e+00, 5.80981052302558e+00, 5.61201310100503e+00, 5.41443352616196e+00, 5.21876980114611e+00,\n                                                5.02660561832239e+00, 4.83937552848063e+00, 4.65833833077664e+00, 4.48455955532475e+00, 4.31890321002759e+00,\n                                                4.16203224620385e+00, 4.01441658466651e+00, 3.87634712173630e+00, 3.74795393864214e+00, 3.62922695469769e+00,\n                                                3.52003744787436e+00, 3.42015915453747e+00, 3.32928799318118e+00, 3.24705978660090e+00, 3.17306565040447e+00,\n                                                3.10686495567440e+00, 3.04799595471049e+00, 2.99598428407144e+00, 2.95034963607526e+00, 2.91061092764757e+00,\n                                                2.87629030284826e+00, 2.84691629028700e+00, 2.82202640513765e+00, 2.80116944232104e+00, 2.78390765626712e+00,\n                                                2.76981896642167e+00, 2.75849926897706e+00, 2.74956487684832e+00, 2.74265505454751e+00, 2.73743456537811e+00,\n                                                2.73359610834326e+00, 2.73086249413252e+00, 2.72898839567004e+00, 2.72776151012683e+00, 2.72700298589982e+00,\n                                                2.72656699834585e+00, 2.72633939923674e+00, 2.72623541318850e+00, 2.72619640538055e+00, 2.72618579440054e+00,\n                                                2.72618422824536e+00, 2.72618408764875e+00, 2.72618130627909e+00, 2.72616246217240e+00, 2.72609319046916e+00,\n                                                2.72590854696128e+00, 2.72550450695623e+00, 2.72473090512835e+00, 2.72338617790393e+00, 2.72121427837983e+00,\n                                                2.71790413870224e+00, 2.71309204552867e+00, 2.70636725703920e+00, 2.69728111021233e+00, 2.68535973148373e+00,\n                                                2.67012026400884e+00, 2.65109026053027e+00, 2.62782957409621e+00, 2.59995373541383e+00, 2.56715747536002e+00,\n                                                2.52923678507730e+00, 2.48610775958007e+00, 2.43782049395770e+00, 2.38456652718824e+00, 2.32667876240639e+00,\n                                                2.26462340412375e+00, 2.19898417649466e+00, 2.13043982838973e+00, 2.05973658467622e+00, 1.98765767105520e+00,\n                                                1.91499225336001e+00, 1.84250606625237e+00, 1.77091568373621e+00, 1.70086786907628e+00, 1.63292482420550e+00,\n                                                1.56755553366172e+00, 1.50513284775175e+00, 1.44593553078174e+00, 1.39015423925437e+00, 1.33790029015168e+00,\n                                                1.28921610776344e+00, 1.24408636369139e+00, 1.20244900976857e+00, 1.16420561197751e+00, 1.12923059674047e+00,\n                                                1.09737920000742e+00, 1.06849405406234e+00, 1.04241045388788e+00, 1.01896041648270e+00, 9.97975688013966e-01,\n                                                9.79289871713860e-01, 9.62739850599363e-01, 9.48166669207268e-01, 9.35416022207789e-01, 9.24338478349043e-01,\n                                                9.14789547899872e-01, 9.06629681880233e-01, 8.99724272480057e-01, 8.93943706314005e-01, 8.89163505443960e-01,\n                                                8.85264575279322e-01, 8.82133563466056e-01, 8.79663319793309e-01, 8.77753434278915e-01, 8.76310819425868e-01,\n                                                8.75250293789492e-01, 8.74495118107617e-01, 8.73977432890371e-01, 8.73638547892241e-01, 8.73429039341701e-01,\n                                                8.73308619852637e-01, 8.73245757893045e-01, 8.73217037540343e-01, 8.73206263835002e-01, 8.73203333153356e-01,\n                                                8.73202900591878e-01, 8.73202860717413e-01, 8.73202060282836e-01, 8.73196637247716e-01, 8.73176702003178e-01,\n                                                8.73123565079993e-01, 8.73007292050630e-01, 8.72784675919533e-01, 8.72397734218566e-01, 8.71772842156957e-01,\n                                                8.70820616164352e-01, 8.69436660283370e-01, 8.67503276332002e-01, 8.64892212352757e-01, 8.61468477951249e-01,\n                                                8.57095186937570e-01, 8.51639297851818e-01, 8.44978016893279e-01, 8.37005516492141e-01, 8.27639522577954e-01,\n                                                8.16827254294125e-01, 8.04550181236081e-01, 7.90827110263663e-01, 7.75715231917687e-01, 7.59308937596202e-01,\n                                                7.41736441061732e-01, 7.23154468660894e-01, 7.03741484335069e-01, 6.83690054388492e-01, 6.63199011146048e-01,\n                                                6.42466039051627e-01, 6.21681193881074e-01, 6.01021701562388e-01, 5.80648200058022e-01, 5.60702416937559e-01,\n                                                5.41306139993651e-01, 5.22561250819919e-01, 5.04550552852194e-01, 4.87339128535908e-01, 4.70975992727375e-01,\n                                                4.55495857749597e-01, 4.40920878006693e-01, 4.27262290280680e-01, 4.14521905005060e-01, 4.02693432294839e-01,\n                                                3.91763644946082e-01, 3.81713390902661e-01, 3.72518472176054e-01, 3.64150408110248e-01, 3.56577099977940e-01,\n                                                3.49763412383126e-01, 3.43671685523645e-01, 3.38262191315962e-01, 3.33493545697351e-01, 3.29323088930508e-01,\n                                                3.25707245201173e-01, 3.22601871984929e-01, 3.19962608371938e-01, 3.17745229664425e-01, 3.15906013068528e-01,\n                                                3.14402116253234e-01, 3.13191967087278e-01, 3.12235659211467e-01, 3.11495344534507e-01, 3.10935610563305e-01,\n                                                3.10523828001749e-01, 3.10230452551252e-01, 3.10029264523777e-01, 3.09897530846413e-01, 3.09816076278196e-01,\n                                                3.09769254044937e-01, 3.09744810375690e-01, 3.09733642262287e-01, 3.09729452782250e-01, 3.09728313148227e-01,\n                                                3.09728144940848e-01, 3.09728128910848e-01, 3.09727801439408e-01, 3.09725582779805e-01, 3.09717426866229e-01,\n                                                3.09695687069834e-01, 3.09648114495445e-01, 3.09557024327574e-01, 3.09398670947928e-01, 3.09142872486461e-01,\n                                                3.08752924927560e-01, 3.08185843823011e-01, 3.07392966740807e-01, 3.06320940361644e-01, 3.04913101365557e-01,\n                                                3.03111239190770e-01, 3.00857701573591e-01, 2.98097771929548e-01, 2.94782213993244e-01, 2.90869847925151e-01,\n                                                2.86329998402309e-01, 2.81144644116480e-01, 2.75310103542765e-01, 2.68838115514399e-01, 2.61756213755760e-01,\n                                                2.54107347764872e-01, 2.45948761662873e-01, 2.37350200261062e-01, 2.28391560686035e-01, 2.19160143436838e-01,\n                                                2.09747676301205e-01, 2.00247288192983e-01, 1.90750599590856e-01, 1.81345074739099e-01, 1.72111751291951e-01,\n                                                1.63123428724930e-01, 1.54443360487676e-01, 1.46124459250359e-01, 1.38208992209144e-01, 1.30728716440387e-01,\n                                                1.23705384340852e-01, 1.17151537115902e-01, 1.11071500065620e-01, 1.05462496245167e-01, 1.00315803487661e-01,\n                                                9.56178919804387e-02, 9.13514937421382e-02, 8.74965698269108e-02, 8.40311546267571e-02, 8.09320684044934e-02,\n                                                7.81754987323211e-02, 7.57374587100799e-02, 7.35941348140017e-02, 7.17221402503867e-02, 7.00986910952395e-02,\n                                                6.87017226328805e-02, 6.75099624756257e-02, 6.65029754982243e-02, 6.56611935579861e-02, 6.49659405411569e-02,\n                                                6.43994606066087e-02, 6.39449547041977e-02, 6.35866276422519e-02, 6.33097452962375e-02, 6.31006991268919e-02,\n                                                6.29470731509230e-02, 6.28377070167971e-02, 6.27627479853743e-02, 6.27136844639011e-02, 6.26833542942791e-02,\n                                                6.26659221905044e-02, 6.26568224338371e-02, 6.26526649932231e-02, 6.26511054444023e-02, 6.26506812141088e-02,\n                                                6.26506185987807e-02, 6.26506124012565e-02, 6.26504833771548e-02, 6.26496092257582e-02, 6.26463958403605e-02,\n                                                6.26378308078444e-02, 6.26190898590124e-02, 6.25832117843430e-02, 6.25208604381982e-02, 6.24201938874336e-02,\n                                                6.22668620555942e-02, 6.20441546147390e-02, 6.17333194148841e-02, 6.13140673606267e-02, 6.07652713989495e-02,\n                                                6.00658545679522e-02, 5.91958448974594e-02, 5.81375542622453e-02, 5.68768160239728e-02, 5.54041954549405e-02,\n                                                5.37160712694202e-02, 5.18154800479209e-02, 4.97126212725618e-02, 4.74249409364518e-02, 4.49767457963759e-02,\n                                                4.23983451778014e-02, 3.97247671725438e-02, 3.69941437907215e-02, 3.42458975188151e-02, 3.15188834648836e-02,\n                                                2.88496431973897e-02, 2.62709084051238e-02, 2.38104580691640e-02, 2.14903881303883e-02, 1.93268051532556e-02,\n                                                1.73299124167130e-02, 1.55044236997242e-02, 1.38502197889494e-02, 1.23631558310109e-02, 1.10359323492020e-02,\n                                                9.85895592397412e-03, 8.82113352403735e-03, 7.91056376397137e-03, 7.11510619672140e-03, 6.42282439078201e-03,\n                                                5.82230931034644e-03, 5.30289650809834e-03, 4.85479436486003e-03, 4.46914171966739e-03, 4.13801239866984e-03,\n                                                3.85438206851063e-03, 3.61207017949994e-03, 3.40566707909318e-03, 3.23045399159128e-03, 3.08232157445332e-03,\n                                                2.95769113111533e-03, 2.85344122281117e-03, 2.76684134672678e-03, 2.69549353365051e-03, 2.63728214486036e-03,\n                                                2.59033176914159e-03, 2.55297286697953e-03, 2.52371461587586e-03, 2.50122424301935e-03, 2.48431197159960e-03,\n                                                2.47192056855283e-03, 2.46311837248925e-03, 2.45709462313926e-03, 2.45315591728001e-03, 2.45072269035518e-03,\n                                                2.44932476235249e-03, 2.44859518930696e-03, 2.44826190328240e-03, 2.44813688621548e-03, 2.44810287948383e-03,\n                                                2.44809786022415e-03, 2.44809734246587e-03, 2.44808635233085e-03, 2.44801189377597e-03, 2.44773819419208e-03,\n                                                2.44700874920056e-03, 2.44541307500867e-03, 2.44235984227714e-03, 2.43705860376053e-03, 2.42851279141121e-03,\n                                                2.41552709940152e-03, 2.39673261019391e-03, 2.37063283253747e-03, 2.33567294762338e-03, 2.29033278453983e-03,\n                                                2.23324125281010e-03, 2.16330624526506e-03, 2.07984977103592e-03, 1.98273400695825e-03, 1.87246106962391e-03,\n                                                1.75022872903696e-03, 1.61792693840823e-03, 1.47806631362357e-03, 1.33363903516681e-03, 1.18792352103014e-03,\n                                                1.04425428098409e-03, 9.05785075119070e-04, 7.75274976092533e-04, 6.54922716307738e-04, 5.46265999034290e-04,\n                                                4.50151677867439e-04, 3.66772411382499e-04, 2.95757248011341e-04, 2.36298099750343e-04, 1.87291234439613e-04,\n                                                1.47473194630265e-04, 1.15534811371276e-04, 9.02051515652147e-05, 7.03067320131368e-05, 5.47895022862122e-05,\n                                                4.27505189719568e-05, 3.34405360291612e-05, 2.62545123348445e-05, 2.07062308561490e-05, 1.63964635362390e-05,\n                                                1.29903783232521e-05, 1.02144013993666e-05, 7.86741459535278e-06, 5.82958753625462e-06, 4.05501779709994e-06,\n                                                2.54680669797835e-06, 1.32191706825324e-06, 0.00000000000000e+00, 4.31160501079830e-07, 4.30057781386495e-07,\n                                                0.00000000000000e+00, 1.42108547152020e-14, 0.00000000000000e+00, 1.42108547152020e-14, 0.00000000000000e+00,\n                                                0.00000000000000e+00, 1.42108547152020e-14, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {7.90000000000000e+01, 7.89999996367704e+01, 7.89999884049891e+01, 7.89999123078051e+01, 7.89996325633150e+01,\n                                                7.89988868426971e+01, 7.89972547270416e+01, 7.89941285545211e+01, 7.89886906289225e+01, 7.89798975235356e+01,\n                                                7.89664719633559e+01, 7.89469025377897e+01, 7.89194513306907e+01, 7.88821695040813e+01, 7.88329209758494e+01,\n                                                7.87694145968812e+01, 7.86892456062156e+01, 7.85899474881644e+01, 7.84690554529642e+01, 7.83241823435530e+01,\n                                                7.81531065995619e+01, 7.79538699009557e+01, 7.77248794537846e+01, 7.74650070872012e+01, 7.71736751990258e+01,\n                                                7.68509189885459e+01, 7.64974159907116e+01, 7.61144777741059e+01, 7.57040041706446e+01, 7.52684063176790e+01,\n                                                7.48105095736393e+01, 7.43334496908374e+01, 7.38405748471496e+01, 7.33353625226483e+01, 7.28213548614392e+01,\n                                                7.23021106581507e+01, 7.17811680091039e+01, 7.12620100558682e+01, 7.07480274354451e+01, 7.02424744638599e+01,\n                                                6.97484203789867e+01, 6.92687004559613e+01, 6.88058731124043e+01, 6.83621878839170e+01, 6.79395662401944e+01,\n                                                6.75395941791943e+01, 6.71635236688958e+01, 6.68122796930291e+01, 6.64864704574287e+01, 6.61863994804974e+01,\n                                                6.59120792546852e+01, 6.56632467032873e+01, 6.54393808096885e+01, 6.52397227120013e+01, 6.50632983750480e+01,\n                                                6.49089437624993e+01, 6.47753322732587e+01, 6.46610040844595e+01, 6.45643969510457e+01, 6.44838779385115e+01,\n                                                6.44177755035997e+01, 6.43644112847773e+01, 6.43221309214090e+01, 6.42893331918051e+01, 6.42644967511135e+01,\n                                                6.42462037657082e+01, 6.42331597855141e+01, 6.42242092718624e+01, 6.42183463058219e+01, 6.42147201377106e+01,\n                                                6.42126353973669e+01, 6.42115469594295e+01, 6.42110496395839e+01, 6.42108630771640e+01, 6.42108123276079e+01,\n                                                6.42108048370778e+01, 6.42108038117299e+01, 6.42107795964837e+01, 6.42106155348683e+01, 6.42100124306165e+01,\n                                                6.42084048037742e+01, 6.42048866921029e+01, 6.41981496250312e+01, 6.41864354904131e+01, 6.41675068450790e+01,\n                                                6.41386370074517e+01, 6.40966219749018e+01, 6.40378157792676e+01, 6.39581902776360e+01, 6.38534195288681e+01,\n                                                6.37189878129058e+01, 6.35503190364511e+01, 6.33429238167603e+01, 6.30925590781801e+01, 6.27953936925300e+01,\n                                                6.24481726800229e+01, 6.20483718209908e+01, 6.15943341767844e+01, 6.10853799244642e+01, 6.05218811518010e+01,\n                                                5.99052941981720e+01, 5.92381443757913e+01, 5.85239619832542e+01, 5.77671742895175e+01, 5.69729643935245e+01,\n                                                5.61471123743662e+01, 5.52958346865323e+01, 5.44256333210407e+01, 5.35431581740622e+01, 5.26550780542665e+01,\n                                                5.17679524385344e+01, 5.08881001726125e+01, 5.00214709294039e+01, 4.91735338673527e+01, 4.83491986537590e+01,\n                                                4.75527754489603e+01, 4.67879684079042e+01, 4.60578896559536e+01, 4.53650809081729e+01, 4.47115353419420e+01,\n                                                4.40987182405397e+01, 4.35275882961642e+01, 4.29986220033837e+01, 4.25118424953829e+01, 4.20668527779682e+01,\n                                                4.16628723467788e+01, 4.12987758168976e+01, 4.09731323161992e+01, 4.06842447642669e+01, 4.04301885796827e+01,\n                                                4.02088497066754e+01, 4.00179620738793e+01, 3.98551446872645e+01, 3.97179385355558e+01, 3.96038433787995e+01,\n                                                3.95103543291510e+01, 3.94349979445655e+01, 3.93753673642562e+01, 3.93291558395041e+01, 3.92941878716608e+01,\n                                                3.92684470750727e+01, 3.92500998468957e+01, 3.92375139550051e+01, 3.92292712511790e+01, 3.92241738757876e+01,\n                                                3.92212435333477e+01, 3.92197136717658e+01, 3.92190146747931e+01, 3.92187524584205e+01, 3.92186811293531e+01,\n                                                3.92186706013374e+01, 3.92186696019386e+01, 3.92186492265701e+01, 3.92185111807000e+01, 3.92180037132100e+01,\n                                                3.92166510198617e+01, 3.92136908289914e+01, 3.92080222665669e+01, 3.91981663322141e+01, 3.91822412004155e+01,\n                                                3.91579544100422e+01, 3.91226137838092e+01, 3.90731585796817e+01, 3.90062118674250e+01, 3.89181543996604e+01,\n                                                3.88052192790861e+01, 3.86636055120734e+01, 3.84896071240551e+01, 3.82797529831248e+01, 3.80309509763439e+01,\n                                                3.77406288986452e+01, 3.74068635744233e+01, 3.70284895795623e+01, 3.66051796877676e+01, 3.61374909722294e+01,\n                                                3.56268733364791e+01, 3.50756408613660e+01, 3.44869101538573e+01, 3.38645129834256e+01, 3.32128918932319e+01,\n                                                3.25369864508493e+01, 3.18421144381836e+01, 3.11338479007856e+01, 3.04178810923990e+01, 2.96998886318428e+01,\n                                                2.89853784834995e+01, 2.82795528805439e+01, 2.75871951256938e+01, 2.69125963739263e+01, 2.62595248491474e+01,\n                                                2.56312273651996e+01, 2.50304469182692e+01, 2.44594425616282e+01, 2.39200050966567e+01, 2.34134690860263e+01,\n                                                2.29407253022523e+01, 2.25022378769768e+01, 2.20980685886097e+01, 2.17279084849319e+01, 2.13911153400638e+01,\n                                                2.10867546027905e+01, 2.08136414076197e+01, 2.05703816292111e+01, 2.03554105968616e+01, 2.01670287454601e+01,\n                                                2.00034340393579e+01, 1.98627514096272e+01, 1.97430596829628e+01, 1.96424165684597e+01, 1.95588822355515e+01,\n                                                1.94905418950508e+01, 1.94355276170647e+01, 1.93920394133387e+01, 1.93583654027049e+01, 1.93329006887390e+01,\n                                                1.93141644267605e+01, 1.93008144570933e+01, 1.92916588423497e+01, 1.92856636722303e+01, 1.92819565879118e+01,\n                                                1.92798256218208e+01, 1.92787131348936e+01, 1.92782048462790e+01, 1.92780141722359e+01, 1.92779623045152e+01,\n                                                1.92779546489570e+01, 1.92779539676670e+01, 1.92779405563951e+01, 1.92778496932951e+01, 1.92775156745284e+01,\n                                                1.92766253307895e+01, 1.92746769756400e+01, 1.92709461802317e+01, 1.92644599785643e+01, 1.92539810703070e+01,\n                                                1.92380035325946e+01, 1.92147614468751e+01, 1.91822516523800e+01, 1.91382715118602e+01, 1.90804720799808e+01,\n                                                1.90064263747293e+01, 1.89137115625362e+01, 1.88000028015133e+01, 1.86631753001145e+01, 1.85014099312602e+01,\n                                                1.83132966183062e+01, 1.80979288307357e+01, 1.78549820638503e+01, 1.75847693011646e+01, 1.72882673239517e+01,\n                                                1.69671094379603e+01, 1.66235427290430e+01, 1.62603511793823e+01, 1.58807495254007e+01, 1.54882560860483e+01,\n                                                1.50865553010717e+01, 1.46793618056512e+01, 1.42702971775717e+01, 1.38627880616567e+01, 1.34599906751945e+01,\n                                                1.30647425359198e+01, 1.26795385513158e+01, 1.23065261245392e+01, 1.19475130464976e+01, 1.16039825620773e+01,\n                                                1.12771116245515e+01, 1.09677902836116e+01, 1.06766417347632e+01, 1.04040433984797e+01, 1.01501494598058e+01,\n                                                9.91491484332789e+00, 9.69812001003463e+00, 9.49939556284286e+00, 9.31824558001536e+00, 9.15406882452811e+00,\n                                                9.00617736485540e+00, 8.87381254096577e+00, 8.75615851978279e+00, 8.65235387068957e+00, 8.56150166377540e+00,\n                                                8.48267858265217e+00, 8.41494348284988e+00, 8.35734574113499e+00, 8.30893364580066e+00, 8.26876298060394e+00,\n                                                8.23590585878755e+00, 8.20945977030149e+00, 8.18855671703209e+00, 8.17237223075219e+00, 8.16013400089932e+00,\n                                                8.15112978898691e+00, 8.14471427805788e+00, 8.14031450265284e+00, 8.13743352904842e+00, 8.13565210651470e+00,\n                                                8.13462808505459e+00, 8.13409348825482e+00, 8.13384923448122e+00, 8.13375760773935e+00, 8.13373268316485e+00,\n                                                8.13372900435428e+00, 8.13372867912858e+00, 8.13372230131829e+00, 8.13367909083115e+00, 8.13352024624589e+00,\n                                                8.13309683823904e+00, 8.13217028784524e+00, 8.13039609226126e+00, 8.12731156226162e+00, 8.12232831778502e+00,\n                                                8.11473026076135e+00, 8.10367769043980e+00, 8.08821812541697e+00, 8.06730422568533e+00, 8.03981894746128e+00,\n                                                8.00460770162366e+00, 7.96051682589373e+00, 7.90643714387268e+00, 7.84135081653396e+00, 7.76437916232393e+00,\n                                                7.67482871552870e+00, 7.57223259676022e+00, 7.45638435527077e+00, 7.32736184202527e+00, 7.18553935870050e+00,\n                                                7.03158721044953e+00, 6.86645872903273e+00, 6.69136567482613e+00, 6.50774355576570e+00, 6.31720878186276e+00,\n                                                6.12150975655042e+00, 5.92247409483896e+00, 5.72195424693037e+00, 5.52177392147557e+00, 5.32367778825324e+00,\n                                                5.12928688785132e+00, 4.94006188844480e+00, 4.75727577461355e+00, 4.58199678388250e+00, 4.41508154423747e+00,\n                                                4.25717755541105e+00, 4.10873352214985e+00, 3.97001566158063e+00, 3.84112798246491e+00, 3.72203463589898e+00,\n                                                3.61258270036849e+00, 3.51252411657151e+00, 3.42153586457572e+00, 3.33923782976153e+00, 3.26520810542945e+00,\n                                                3.19899571620094e+00, 3.14013091680295e+00, 3.08813333229132e+00, 3.04251826848525e+00, 3.00280154622124e+00,\n                                                2.96850320981146e+00, 2.93915043680934e+00, 2.91427993891777e+00, 2.89344009703413e+00, 2.87619302022327e+00,\n                                                2.86211666135591e+00, 2.85080706351994e+00, 2.84188075345219e+00, 2.83497724376154e+00, 2.82976155747140e+00,\n                                                2.82592664933829e+00, 2.82319557120860e+00, 2.82132321546614e+00, 2.82009747254500e+00, 2.81933965542645e+00,\n                                                2.81890407454010e+00, 2.81867668779141e+00, 2.81857279878221e+00, 2.81853382737854e+00, 2.81852322630154e+00,\n                                                2.81852166160803e+00, 2.81852152114261e+00, 2.81851874236877e+00, 2.81849991584917e+00, 2.81843070879950e+00,\n                                                2.81824623764628e+00, 2.81784257489537e+00, 2.81706969578279e+00, 2.81572622606750e+00, 2.81355636083272e+00,\n                                                2.81024932908960e+00, 2.80544176955173e+00, 2.79872334543829e+00, 2.78964584570089e+00, 2.77773588329848e+00,\n                                                2.76251109959541e+00, 2.74349951777670e+00, 2.72026136958982e+00, 2.69241237531135e+00, 2.65964712751556e+00,\n                                                2.62176096701154e+00, 2.57866860037107e+00, 2.53041774281341e+00, 2.47719630968938e+00, 2.41933212689841e+00,\n                                                2.35728475145231e+00, 2.29162971813774e+00, 2.22303625990703e+00, 2.15224018139706e+00, 2.08001400165715e+00,\n                                                2.00713666065951e+00, 1.93436498692219e+00, 1.86240878106810e+00, 1.79191085181131e+00, 1.72343273767905e+00,\n                                                1.65744625195534e+00, 1.59433047588873e+00, 1.53437344522803e+00, 1.47777754695741e+00, 1.42466755997924e+00,\n                                                1.37510031036909e+00, 1.32907503416631e+00, 1.28654371238868e+00, 1.24742083221270e+00, 1.21159221065633e+00,\n                                                1.17892267672170e+00, 1.14926253669705e+00, 1.12245284327480e+00, 1.09832955465561e+00, 1.07672670959862e+00,\n                                                1.05747876406430e+00, 1.04042224014756e+00, 1.02539683315464e+00, 1.01224611167085e+00, 1.00081793102341e+00,\n                                                9.90964664478071e-01, 9.82543339909071e-01, 9.75415753102837e-01, 9.69448612509595e-01, 9.64513754182477e-01,\n                                                9.60488449858190e-01, 9.57255815728118e-01, 9.54705314683764e-01, 9.52733331125188e-01, 9.51243785409446e-01,\n                                                9.50148745392639e-01, 9.49368986012288e-01, 9.48834445066225e-01, 9.48484524649089e-01, 9.48268193137224e-01,\n                                                9.48143851819069e-01, 9.48078942513391e-01, 9.48049286757524e-01, 9.48038162157644e-01, 9.48035136024842e-01,\n                                                9.48034689375007e-01, 9.48034648201883e-01, 9.48033821697422e-01, 9.48028222035973e-01, 9.48007637505157e-01,\n                                                9.47952769906664e-01, 9.47832709760362e-01, 9.47602842471682e-01, 9.47203296035539e-01, 9.46558045058524e-01,\n                                                9.45574788940903e-01, 9.44145720185531e-01, 9.42149287132651e-01, 9.39453028679551e-01, 9.35917512014782e-01,\n                                                9.31401335251394e-01, 9.25767065627724e-01, 9.18887875960621e-01, 9.10654528142814e-01, 9.00982248832420e-01,\n                                                8.89816968762645e-01, 8.77140373135376e-01, 8.62973251755790e-01, 8.47376750129158e-01, 8.30451300149093e-01,\n                                                8.12333231092012e-01, 7.93189297187851e-01, 7.73209570712439e-01, 7.52599305657967e-01, 7.31570453112951e-01,\n                                                7.10333497259867e-01, 6.89090188412607e-01, 6.68027598099911e-01, 6.47313739677273e-01, 6.27094815915086e-01,\n                                                6.07493997100960e-01, 5.88611515596668e-01, 5.70525792238527e-01, 5.53295284849938e-01, 5.36960761826876e-01,\n                                                5.21547743382243e-01, 5.07068907975082e-01, 4.93526321247145e-01, 4.80913401316968e-01, 4.69216582214699e-01,\n                                                4.58416673959974e-01, 4.48489942898007e-01, 4.39408950594910e-01, 4.31143195906870e-01, 4.23659605133437e-01,\n                                                4.16922911657068e-01, 4.10895960981364e-01, 4.05539970937525e-01, 4.00814770865011e-01, 3.96679038210038e-01,\n                                                3.93090546341625e-01, 3.90006433378588e-01, 3.87383498280087e-01, 3.85178527183172e-01, 3.83348649815900e-01,\n                                                3.81851722686420e-01, 3.80646732638624e-01, 3.79694211354703e-01, 3.78956648621539e-01, 3.78398889863107e-01,\n                                                3.77988501795613e-01, 3.77696089295569e-01, 3.77495546847214e-01, 3.77364229339534e-01, 3.77283029503431e-01,\n                                                3.77236352797155e-01, 3.77211984839448e-01, 3.77200851258394e-01, 3.77196674722754e-01, 3.77195538608987e-01,\n                                                3.77195370921157e-01, 3.77195354940696e-01, 3.77195028480685e-01, 3.77192816672931e-01, 3.77184685934409e-01,\n                                                3.77163013145235e-01, 3.77115586705514e-01, 3.77024774451741e-01, 3.76866898254590e-01, 3.76611854607987e-01,\n                                                3.76223019469805e-01, 3.75657473050538e-01, 3.74866574910214e-01, 3.73796910250789e-01, 3.72391613493306e-01,\n                                                3.70592054448593e-01, 3.68339845910853e-01, 3.65579100920883e-01, 3.62258836344083e-01, 3.58335391242107e-01,\n                                                3.53774709034084e-01, 3.48554326665919e-01, 3.42664925448716e-01, 3.36111327624721e-01, 3.28912867296154e-01,\n                                                3.21103117931443e-01, 3.12729012845594e-01, 3.03849441189726e-01, 2.94533433402933e-01, 2.84858063776639e-01,\n                                                2.74906194993875e-01, 2.64764174939344e-01, 2.54519576092989e-01, 2.44259048312458e-01, 2.34066340513024e-01,\n                                                2.24020536567465e-01, 2.14194544143041e-01, 2.04653869377992e-01, 1.95455702601549e-01, 1.86648329205028e-01,\n                                                1.78270865365732e-01, 1.70353302078482e-01, 1.62916825109221e-01, 1.55974365319622e-01, 1.49531325022480e-01,\n                                                1.43586422423937e-01, 1.38132597680737e-01, 1.33157929819717e-01, 1.28646522470532e-01, 1.24579326670542e-01,\n                                                1.20934879648047e-01, 1.17689948473497e-01, 1.14820076105630e-01, 1.12300034275023e-01, 1.10104192710764e-01,\n                                                1.08206817479271e-01, 1.06582312829929e-01, 1.05205421146692e-01, 1.04051394634766e-01, 1.03096150465049e-01,\n                                                1.02316418504827e-01, 1.01689887713277e-01, 1.01195354020817e-01, 1.00812869279906e-01, 1.00523887910356e-01,\n                                                1.00311405387970e-01, 1.00160080929726e-01, 1.00056335755937e-01, 9.99884182257205e-02, 9.99464279473443e-02,\n                                                9.99222925609473e-02, 9.99096931222425e-02, 9.99039366561192e-02, 9.99017772589781e-02, 9.99011898554869e-02,\n                                                9.99011031561281e-02, 9.99010945748324e-02, 9.99009159235698e-02, 9.98997055413469e-02, 9.98952561427444e-02,\n                                                9.98833964059713e-02, 9.98574453476238e-02, 9.98077600865912e-02, 9.97214011763390e-02, 9.95819407735183e-02,\n                                                9.93694398143816e-02, 9.90606202879576e-02, 9.86292566192617e-02, 9.80468050196066e-02, 9.72832804357040e-02,\n                                                9.63083767948518e-02, 9.50928075404107e-02, 9.36098207532439e-02, 9.18368182130251e-02, 8.97569833115028e-02,\n                                                8.73608023535581e-02, 8.46473514243513e-02, 8.16252204073606e-02, 7.83129596716776e-02, 7.47389644378131e-02,\n                                                7.09407555908967e-02, 6.69636698655722e-02, 6.28590306646686e-02, 5.86819254971402e-02, 5.44887590063610e-02,\n                                                5.03347748864087e-02, 4.62717414097824e-02, 4.23459732994615e-02, 3.85968207437344e-02, 3.50557013031079e-02,\n                                                3.17456910415501e-02, 2.86816362614957e-02, 2.58707038947250e-02, 2.33132611939624e-02, 2.10039649142004e-02,\n                                                1.89329448255506e-02, 1.70869823727031e-02, 1.54506079681767e-02, 1.40070653186655e-02, 1.27391147448037e-02,\n                                                1.16296672720182e-02, 1.06622561918073e-02, 9.82136268149247e-03, 9.09261749021084e-03, 8.46290256183124e-03,\n                                                7.92037578858640e-03, 7.45443980989080e-03, 7.05567267374363e-03, 6.71573485016097e-03, 6.42726391575366e-03,\n                                                6.18376543290822e-03, 5.97950620721122e-03, 5.80941422512637e-03, 5.66898809637451e-03, 5.55421768649467e-03,\n                                                5.46151674197404e-03, 5.38766761303577e-03, 5.32977761051256e-03, 5.28524605057612e-03, 5.25174063002964e-03,\n                                                5.22718143413670e-03, 5.20973062457131e-03, 5.19778570736662e-03, 5.18997426048884e-03, 5.18514811921023e-03,\n                                                5.18237527178655e-03, 5.18092808979986e-03, 5.18026697324103e-03, 5.18001898383602e-03, 5.17995152644346e-03,\n                                                5.17994156993495e-03, 5.17994054287385e-03, 5.17991874089319e-03, 5.17977103133660e-03, 5.17922806825766e-03,\n                                                5.17778098060262e-03, 5.17461534577990e-03, 5.16855768267988e-03, 5.15803869282649e-03, 5.14107831287447e-03,\n                                                5.11529843737435e-03, 5.07796960793883e-03, 5.02609763272233e-03, 4.95655454341204e-03, 4.86625511504712e-03,\n                                                4.75237515836113e-03, 4.61260108991723e-03, 4.44539253872733e-03, 4.25023218680565e-03, 4.02783139379892e-03,\n                                                3.78025836874940e-03, 3.51095940430923e-03, 3.22465376684988e-03, 2.92709859601814e-03, 2.62473929976181e-03,\n                                                2.32427975301164e-03, 2.03222094432931e-03, 1.75442310379026e-03, 1.49574315646817e-03, 1.25978725894527e-03,\n                                                1.04879983327066e-03, 8.63689554364555e-04, 7.04172905955147e-04, 5.69000579659473e-04, 4.56224100105374e-04,\n                                                3.63461572334245e-04, 2.88131955485937e-04, 2.27642757025137e-04, 1.79529776929144e-04, 1.41553884958512e-04,\n                                                1.11758697514119e-04, 8.84904092828265e-05, 7.03835659834340e-05, 5.63244310569644e-05, 4.54094542021721e-05,\n                                                3.69127163679650e-05, 3.02642271776676e-05, 2.50304709226157e-05, 2.08885464871855e-05, 1.75943792868338e-05,\n                                                1.49540841078988e-05, 1.28074526344335e-05, 1.10244620401545e-05, 9.50762695595131e-06, 8.19178760025352e-06,\n                                                7.03793990908252e-06, 6.02334333166255e-06, 5.13228160059498e-06, 4.35050151281757e-06, 3.66370886695222e-06,\n                                                3.05856374893665e-06, 2.52418105617380e-06, 2.05285400056709e-06, 1.63972687516889e-06, 1.28180178649018e-06,\n                                                9.76816366460298e-07, 7.22365300021011e-07, 5.15398895117869e-07, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {8.00000000000000e+01,  7.99999996302396e+01,  7.99999881965154e+01,  7.99999107311339e+01,\n                                                7.99996259569345e+01,  7.99988668284198e+01,  7.99972053671806e+01,  7.99940229839226e+01,\n                                                7.99884872748700e+01,  7.99795360387876e+01,  7.99658690053609e+01,  7.99459475315545e+01,\n                                                7.99180023563714e+01,  7.98800494571174e+01,  7.98299141623417e+01,  7.97652639543964e+01,\n                                                7.96836507817402e+01,  7.95825640556906e+01,  7.94594955991351e+01,  7.93120173669820e+01,\n                                                7.91378715275121e+01,  7.89350703981657e+01,  7.87020009703188e+01,  7.84375258826582e+01,\n                                                7.81410705432661e+01,  7.78126855592550e+01,  7.74530753599322e+01,  7.70635879700940e+01,\n                                                7.66461666323027e+01,  7.62032700664050e+01,  7.57377729857510e+01,  7.52528607059445e+01,\n                                                7.47519306566353e+01,  7.42385096770673e+01,  7.37161903385790e+01,  7.31885838584130e+01,\n                                                7.26592830688190e+01,  7.21318274864211e+01,  7.16096640594014e+01,  7.10961009755626e+01,\n                                                7.05942564987946e+01,  7.01070083227577e+01,  6.96369499759267e+01,  6.91863591459118e+01,\n                                                6.87571795075842e+01,  6.83510144701625e+01,  6.79691295070301e+01,  6.76124596610220e+01,\n                                                6.72816198337367e+01,  6.69769167431312e+01,  6.66983624036238e+01,  6.64456894708488e+01,\n                                                6.62183688853773e+01,  6.60156301186156e+01,  6.58364841162462e+01,  6.56797488350436e+01,\n                                                6.55440771097772e+01,  6.54279864692697e+01,  6.53298904333120e+01,  6.52481307529430e+01,\n                                                6.51810099976414e+01,  6.51268238414773e+01,  6.50838923578885e+01,  6.50505896039518e+01,\n                                                6.50253707656077e+01,  6.50067961509196e+01,  6.49935513635384e+01,  6.49844630655110e+01,\n                                                6.49785098472745e+01,  6.49748278603169e+01,  6.49727110291854e+01,  6.49716058368216e+01,\n                                                6.49711008617075e+01,  6.49709114275268e+01,  6.49708598967817e+01,  6.49708522909497e+01,\n                                                6.49708512498186e+01,  6.49708266618266e+01,  6.49706600748082e+01,  6.49700476869762e+01,\n                                                6.49684153140436e+01,  6.49648430488276e+01,  6.49580022814702e+01,  6.49461078432199e+01,\n                                                6.49268878653834e+01,  6.48975737297743e+01,  6.48549121878080e+01,  6.47952012908915e+01,\n                                                6.47143511508717e+01,  6.46079696922992e+01,  6.44714724511375e+01,  6.43002141436458e+01,\n                                                6.40896382549476e+01,  6.38354394101745e+01,  6.35337319473119e+01,  6.31812170423625e+01,\n                                                6.27753400051392e+01,  6.23144289491893e+01,  6.17978059185683e+01,  6.12258618511514e+01,\n                                                6.06000878721809e+01,  5.99230579500864e+01,  5.91983623514591e+01,  5.84304973185830e+01,\n                                                5.76247225704977e+01,  5.67869023243113e+01,  5.59233453594241e+01,  5.50406544725967e+01,\n                                                5.41455872616096e+01,  5.32449226642922e+01,  5.23453257662366e+01,  5.14532092056419e+01,\n                                                5.05745999784789e+01,  4.97150280854100e+01,  4.88794516906691e+01,  4.80722226658285e+01,\n                                                4.72970840446984e+01,  4.65571848910636e+01,  4.58551002696304e+01,  4.51928504914555e+01,\n                                                4.45719195913573e+01,  4.39932756490026e+01,  4.34573954108716e+01,  4.29642942004334e+01,\n                                                4.25135606166669e+01,  4.21043946402573e+01,  4.17356475582941e+01,  4.14058623744723e+01,\n                                                4.11133138339383e+01,  4.08560476607853e+01,  4.06319189691897e+01,  4.04386300256465e+01,\n                                                4.02737676143880e+01,  4.01348402174160e+01,  4.00193150976325e+01,  3.99246551998732e+01,\n                                                3.98483555875173e+01,  3.97879789346824e+01,  3.97411894151313e+01,  3.97057841853447e+01,\n                                                3.96797215644083e+01,  3.96611449778906e+01,  3.96484017632283e+01,  3.96400560319413e+01,\n                                                3.96348949455416e+01,  3.96319279781560e+01,  3.96303789957931e+01,  3.96296712625467e+01,\n                                                3.96294057689236e+01,  3.96293335483673e+01,  3.96293228887698e+01,  3.96293218768802e+01,\n                                                3.96293012468551e+01,  3.96291614756532e+01,  3.96286476657186e+01,  3.96272780661825e+01,\n                                                3.96242808787712e+01,  3.96185414721134e+01,  3.96085623658216e+01,  3.95924382271542e+01,\n                                                3.95678479703229e+01,  3.95320658240461e+01,  3.94819928883616e+01,  3.94142101847469e+01,\n                                                3.93250534675829e+01,  3.92107090806219e+01,  3.90673289098448e+01,  3.88911610461029e+01,\n                                                3.86786912199998e+01,  3.84267885547694e+01,  3.81328478986485e+01,  3.77949201826823e+01,\n                                                3.74118221520940e+01,  3.69832176590407e+01,  3.65096646083059e+01,  3.59926245629362e+01,\n                                                3.54344356206429e+01,  3.48382528135238e+01,  3.42079630370814e+01,  3.35480824131649e+01,\n                                                3.28636424755539e+01,  3.21600680403242e+01,  3.14430458174173e+01,  3.07183814704480e+01,\n                                                2.99918462413859e+01,  2.92690220589517e+01,  2.85551618969614e+01,  2.78550836836681e+01,\n                                                2.71731080967888e+01,  2.65130369200620e+01,  2.58781576535846e+01,  2.52712577143351e+01,\n                                                2.46946371198647e+01,  2.41501167609258e+01,  2.36390453525957e+01,  2.31623101318606e+01,\n                                                2.27203552207652e+01,  2.23132091029013e+01,  2.19405203269197e+01,  2.16015990671833e+01,\n                                                2.12954616421243e+01,  2.10208752945889e+01,  2.07764011625019e+01,  2.05604341374392e+01,\n                                                2.03712390337945e+01,  2.02069830687945e+01,  2.00657650461797e+01,  1.99456418483834e+01,\n                                                1.98446528999912e+01,  1.97608432039972e+01,  1.96922854072830e+01,  1.96371011552521e+01,\n                                                1.95934817760228e+01,  1.95597081165299e+01,  1.95341691572218e+01,  1.95153788761806e+01,\n                                                1.95019907309039e+01,  1.94928090855570e+01,  1.94867969367904e+01,  1.94830793800795e+01,\n                                                1.94809424031613e+01,  1.94798267808697e+01,  1.94793170603270e+01,  1.94791258492229e+01,\n                                                1.94790738354183e+01,  1.94790661582988e+01,  1.94790654750900e+01,  1.94790520260465e+01,\n                                                1.94789609070462e+01,  1.94786259476765e+01,  1.94777330975087e+01,  1.94757792615304e+01,\n                                                1.94720379866440e+01,  1.94655336141066e+01,  1.94550254790100e+01,  1.94390036855398e+01,\n                                                1.94156978835073e+01,  1.93831002765826e+01,  1.93390037618501e+01,  1.92810555941924e+01,\n                                                1.92068262608700e+01,  1.91138923363198e+01,  1.89999309888043e+01,  1.88628225882849e+01,\n                                                1.87007566155049e+01,  1.85123349286813e+01,  1.82966655696130e+01,  1.80534398676426e+01,\n                                                1.77829858105777e+01,  1.74862916514015e+01,  1.71649955947260e+01,  1.68213401237270e+01,\n                                                1.64580928818903e+01,  1.60784396106796e+01,  1.56858578869795e+01,  1.52839826513445e+01,\n                                                1.48764752111328e+01,  1.44669062662931e+01,  1.40586606875425e+01,  1.36548678647196e+01,\n                                                1.32583573296755e+01,  1.28716359853032e+01,  1.24968813442864e+01,  1.21359449484839e+01,\n                                                1.17903613363519e+01,  1.14613598836321e+01,  1.11498787493538e+01,  1.08565813640221e+01,\n                                                1.05818761396526e+01,  1.03259395410183e+01,  1.00887417980804e+01,  9.87007384622285e+00,\n                                                9.66957383882503e+00,  9.48675180126965e+00,  9.32101151106916e+00,  9.17166926884610e+00,\n                                                9.03796970090276e+00,  8.91909903407159e+00,  8.81419641420932e+00,  8.72236384735780e+00,\n                                                8.64267527937497e+00,  8.57418523567073e+00,  8.51593734095387e+00,  8.46697293964442e+00,\n                                                8.42633994302601e+00,  8.39310193847277e+00,  8.36634750847182e+00,  8.34519962359468e+00,\n                                                8.32882489691718e+00,  8.31644242206075e+00,  8.30733186817089e+00,  8.30084047770421e+00,\n                                                8.29638861068347e+00,  8.29347350404291e+00,  8.29167096639642e+00,  8.29063480405372e+00,\n                                                8.29009386810031e+00,  8.28984671779671e+00,  8.28975400444727e+00,  8.28972878428732e+00,\n                                                8.28972506184894e+00,  8.28972473276625e+00,  8.28971827931998e+00,  8.28967455638693e+00,\n                                                8.28951382798107e+00,  8.28908539828322e+00,  8.28814785744858e+00,  8.28635261158573e+00,\n                                                8.28323146788507e+00,  8.27818902696193e+00,  8.27050060546516e+00,  8.25931635669733e+00,\n                                                8.24367215467090e+00,  8.22250763541062e+00,  8.19469152887851e+00,  8.15905405435890e+00,\n                                                8.11442569447320e+00,  8.05968113089749e+00,  7.99378656397961e+00,  7.91584811635383e+00,\n                                                7.82515861974849e+00,  7.72123988775905e+00,  7.60387765001670e+00,  7.47314668973191e+00,\n                                                7.32942435669349e+00,  7.17339143482097e+00,  7.00602020339480e+00,  6.82855032018939e+00,\n                                                6.64245379120783e+00,  6.44939076234533e+00,  6.25115822096170e+00,  6.04963399754895e+00,\n                                                5.84671874275399e+00,  5.64427878820045e+00,  5.44409288637341e+00,  5.24780565799993e+00,\n                                                5.05689009353449e+00,  4.87262068162792e+00,  4.69605777951315e+00,  4.52804285587131e+00,\n                                                4.36920338396457e+00,  4.21996555682250e+00,  4.08057268728817e+00,  3.95110713034589e+00,\n                                                3.83151376419860e+00,  3.72162340946838e+00,  3.62117497258522e+00,  3.52983550488540e+00,\n                                                3.44721772942479e+00,  3.37289488020949e+00,  3.30641291729316e+00,  3.24730033086691e+00,\n                                                3.19507583876268e+00,  3.14925432724345e+00,  3.10935139641064e+00,  3.07488685890205e+00,\n                                                3.04538751131231e+00,  3.02038945730148e+00,  2.99944021332921e+00,  2.98210077491574e+00,\n                                                2.96794776527243e+00,  2.95657573094842e+00,  2.94759959289627e+00,  2.94065720850188e+00,\n                                                2.93541195340319e+00,  2.93155519420935e+00,  2.92880849720001e+00,  2.92692540583032e+00,\n                                                2.92569262253529e+00,  2.92493044782903e+00,  2.92449236058656e+00,  2.92426366495275e+00,\n                                                2.92415917782516e+00,  2.92411998203399e+00,  2.92410931991698e+00,  2.92410774621403e+00,\n                                                2.92410760493982e+00,  2.92410481016590e+00,  2.92408587524257e+00,  2.92401626967660e+00,\n                                                2.92383073612739e+00,  2.92342474785248e+00,  2.92264741318006e+00,  2.92129618924622e+00,\n                                                2.91911377509257e+00,  2.91578755840840e+00,  2.91095198000308e+00,  2.90419414183070e+00,\n                                                2.89506290326153e+00,  2.88308157302215e+00,  2.86776410246318e+00,  2.84863441990005e+00,\n                                                2.82524822824122e+00,  2.79721624593019e+00,  2.76422754568296e+00,  2.72607138879610e+00,\n                                                2.68265582078199e+00,  2.63402133569681e+00,  2.58034816160432e+00,  2.52195616792437e+00,\n                                                2.45929701029239e+00,  2.39293883824175e+00,  2.32354459891457e+00,  2.25184557262369e+00,\n                                                2.17861218452447e+00,  2.10462429571717e+00,  2.03064307639798e+00,  1.95738623743125e+00,\n                                                1.88550791287149e+00,  1.81558392859988e+00,  1.74810264315566e+00,  1.68346107127957e+00,\n                                                1.62196563995212e+00,  1.56383669744889e+00,  1.50921579410631e+00,  1.45817476053648e+00,\n                                                1.41072569829171e+00,  1.36683114026690e+00,  1.32641380599833e+00,  1.28936554763156e+00,\n                                                1.25555523897411e+00,  1.22483549241430e+00,  1.19704819201948e+00,  1.17202890575771e+00,\n                                                1.14961028844642e+00,  1.12962461423531e+00,  1.11190558816838e+00,  1.09628958532923e+00,\n                                                1.08261645722331e+00,  1.07073003146408e+00,  1.06047841470175e+00,  1.05171419148834e+00,\n                                                1.04429459423838e+00,  1.03808170203011e+00,  1.03294270886883e+00,  1.02875028529293e+00,\n                                                1.02538304097912e+00,  1.02272608056377e+00,  1.02067163067865e+00,  1.01911970380850e+00,\n                                                1.01797875471843e+00,  1.01716627859372e+00,  1.01660929728638e+00,  1.01624468153631e+00,\n                                                1.01601926275792e+00,  1.01588969758444e+00,  1.01582206107743e+00,  1.01579115926857e+00,\n                                                1.01577956723570e+00,  1.01577641395022e+00,  1.01577594853295e+00,  1.01577590562978e+00,\n                                                1.01577504439702e+00,  1.01576920944670e+00,  1.01574775997717e+00,  1.01569058683097e+00,\n                                                1.01556548136152e+00,  1.01532595286899e+00,  1.01490960925105e+00,  1.01423721957387e+00,\n                                                1.01321258012199e+00,  1.01172330325929e+00,  1.00964263616548e+00,  1.00683238880119e+00,\n                                                1.00314700247256e+00,  9.98438719209233e-01,  9.92563718369439e-01,  9.85388975829395e-01,\n                                                9.76799483875723e-01,  9.66705363017297e-01,  9.55048320557395e-01,  9.41806885384793e-01,\n                                                9.26999890128300e-01,  9.10687787364623e-01,  8.92971569723954e-01,  8.73989294112235e-01,\n                                                8.53910455771484e-01,  8.32928680624391e-01,  8.11253368601484e-01,  7.89101000912780e-01,\n                                                7.66686810755530e-01,  7.44217417362918e-01,  7.21884859895127e-01,  6.99862271506618e-01,\n                                                6.78301237593345e-01,  6.57330713384027e-01,  6.37057253104018e-01,  6.17566233546157e-01,\n                                                5.98923736813660e-01,  5.81178780809054e-01,  5.64365638352768e-01,  5.48506052503370e-01,\n                                                5.33611224316431e-01,  5.19683510731710e-01,  5.06717819063439e-01,  4.94702718692835e-01,\n                                                4.83621310719002e-01,  4.73451904914711e-01,  4.64168553528566e-01,  4.55741486448446e-01,\n                                                4.48137484704375e-01,  4.41320221223947e-01,  4.35250590400273e-01,  4.29887041972080e-01,\n                                                4.25185930041167e-01,  4.21101884550339e-01,  4.17588209841426e-01,  4.14597312620813e-01,\n                                                4.12081159433555e-01,  4.09991761363315e-01,  4.08281681030857e-01,  4.06904554086069e-01,\n                                                4.05815614421542e-01,  4.04972209500002e-01,  4.04334289766368e-01,  4.03864854390221e-01,\n                                                4.03530334820204e-01,  4.03300898021726e-01,  4.03150652910711e-01,  4.03057746372156e-01,\n                                                4.03004339223187e-01,  4.02976457295054e-01,  4.02963718135254e-01,  4.02958939288922e-01,\n                                                4.02957639331774e-01,  4.02957447461020e-01,  4.02957429175913e-01,  4.02957055635767e-01,\n                                                4.02954524853030e-01,  4.02945221529350e-01,  4.02920423063051e-01,  4.02866156177964e-01,\n                                                4.02762243740199e-01,  4.02581586490356e-01,  4.02289723369762e-01,  4.01844712460559e-01,\n                                                4.01197371311753e-01,  4.00291909327819e-01,  3.99066974599108e-01,  3.97457121881629e-01,\n                                                3.95394686750507e-01,  3.92812023550661e-01,  3.89644033223178e-01,  3.85830874409919e-01,\n                                                3.81320721748438e-01,  3.76072414006629e-01,  3.70057826460695e-01,  3.63263809999324e-01,\n                                                3.55693564527698e-01,  3.47367353799513e-01,  3.38322517294657e-01,  3.28612784896393e-01,\n                                                3.18306944738154e-01,  3.07486948591148e-01,  2.96245560751103e-01,  2.84683667115075e-01,\n                                                2.72907364734507e-01,  2.61024952572143e-01,  2.49143943924352e-01,  2.37368219991183e-01,\n                                                2.25795440191305e-01,  2.14514814928535e-01,  2.03605328230566e-01,  1.93134470597400e-01,\n                                                1.83157508538613e-01,  1.73717280606496e-01,  1.64844475068094e-01,  1.56558316106882e-01,\n                                                1.48867566633726e-01,  1.41771747593324e-01,  1.35262475469773e-01,  1.29324829600321e-01,\n                                                1.23938676267485e-01,  1.19079894627660e-01,  1.14721467960933e-01,  1.10834420696847e-01,\n                                                1.07388596059423e-01,  1.04353280447356e-01,  1.01697688767018e-01,  9.93913301052061e-02,\n                                                9.74042757812867e-02,  9.57073524151184e-02,  9.42722816383679e-02,  9.30717858608006e-02,\n                                                9.20796764127800e-02,  9.12709367080566e-02,  9.06218090589590e-02,  9.01098896590469e-02,\n                                                8.97142322681077e-02,  8.94154575126578e-02,  8.91958616833648e-02,  8.90395166645135e-02,\n                                                8.89323513211195e-02,  8.88622043808454e-02,  8.88188395750973e-02,  8.87939154504807e-02,\n                                                8.87809046480754e-02,  8.87749603244004e-02,  8.87727304712485e-02,  8.87721239035102e-02,\n                                                8.87720343756087e-02,  8.87720255143449e-02,  8.87718410346565e-02,  8.87705911655985e-02,\n                                                8.87659966332137e-02,  8.87537502067772e-02,  8.87269538195454e-02,  8.86756532228929e-02,\n                                                8.85864963956919e-02,  8.84425437589016e-02,  8.82232598976174e-02,  8.79047169602813e-02,\n                                                8.74600379191861e-02,  8.68601020474102e-02,  8.60745240419050e-02,  8.50729013725982e-02,\n                                                8.38263016028407e-02,  8.23089336315945e-02,  8.04999163782441e-02,  7.83850290202537e-02,\n                                                7.59583032360496e-02,  7.32233052322755e-02,  7.01939584885594e-02,  6.68947804945645e-02,\n                                                6.33604490531923e-02,  5.96346733484836e-02,  5.57684156269858e-02,  5.18175816148698e-02,\n                                                4.78403606116871e-02,  4.38944389175333e-02,  4.00343250150854e-02,  3.63090086180904e-02,\n                                                3.27601308880787e-02,  2.94207776219508e-02,  2.63149323585026e-02,  2.34575543995419e-02,\n                                                2.08551882294188e-02,  1.85069725534248e-02,  1.64059013752507e-02,  1.45401941768313e-02,\n                                                1.28946523635847e-02,  1.14519083802662e-02,  1.01935061496903e-02,  9.10078178846163e-03,\n                                                8.15553865135143e-03,  7.34052910813432e-03,  6.63976698758972e-03,  6.03870024463049e-03,\n                                                5.52427452342386e-03,  5.08491635748953e-03,  4.71046103517381e-03,  4.39204565645923e-03,\n                                                4.12198334043978e-03,  3.89363038490842e-03,  3.70125468376159e-03,  3.53991093864181e-03,\n                                                3.40532610360356e-03,  3.29379696910337e-03,  3.20210070549365e-03,  3.12741844101083e-03,\n                                                3.06727144888441e-03,  3.01946918088447e-03,  2.98206814244395e-03,  2.95334041473438e-03,\n                                                2.93175046674321e-03,  2.91593876345075e-03,  2.90471057505215e-03,  2.89702834302830e-03,\n                                                2.89200598254524e-03,  2.88890360600647e-03,  2.88712134569380e-03,  2.88619122153477e-03,\n                                                2.88576632608795e-03,  2.88560694698958e-03,  2.88556359333825e-03,  2.88555719448880e-03,\n                                                2.88555653442302e-03,  2.88554252298923e-03,  2.88544759523290e-03,  2.88509865541187e-03,\n                                                2.88416869990726e-03,  2.88213447841201e-03,  2.87824239018164e-03,  2.87148554633632e-03,\n                                                2.86059558149532e-03,  2.84405341314198e-03,  2.82012348024807e-03,  2.78691571833178e-03,\n                                                2.74247829094065e-03,  2.68492158923550e-03,  2.61257008943971e-03,  2.52413348114544e-03,\n                                                2.41888262770829e-03,  2.29681045607322e-03,  2.15875423123180e-03,  2.00645540077460e-03,\n                                                1.84253750353491e-03,  1.67039187701334e-03,  1.49397415104602e-03,  1.31752952175646e-03,\n                                                1.14527831867406e-03,  9.81102024070424e-04,  8.28271159932115e-04,  6.89249548216253e-04,\n                                                5.65595717517908e-04,  4.57964877540462e-04,  3.66198133164630e-04,  2.89473514072824e-04,\n                                                2.26488520382873e-04,  1.75646303176791e-04,  1.35224759659991e-04,  1.03515827021283e-04,\n                                                7.89282412227976e-05,  6.00510596200365e-05,  4.56797261563224e-05,  3.48127321672109e-05,\n                                                2.66324323092704e-05,  2.04835198900355e-05,  1.58554344693584e-05,  1.23652398116292e-05,\n                                                9.73368055667834e-06,  7.75389281670869e-06,  6.26288380090045e-06,  5.12677280539720e-06,\n                                                4.23986000441801e-06,  3.52828907068670e-06,  2.94907273712397e-06,  2.48070685415769e-06,\n                                                2.10884346074636e-06,  1.81537336629845e-06,  1.57690121227461e-06,  1.37054844628892e-06,\n                                                1.18018584771562e-06,  9.98693607812129e-07,  8.26302255063638e-07,  6.67102014517695e-07,\n                                                5.25699377362798e-07,  4.05087405397353e-07,  -5.68434188608080e-14, -7.10542735760100e-14,\n                                                -7.10542735760100e-14, -5.68434188608080e-14, -8.52651282912120e-14, -8.52651282912120e-14,\n                                                -7.10542735760100e-14, -7.10542735760100e-14, -7.10542735760100e-14, -7.10542735760100e-14,\n                                                -7.10542735760100e-14, -7.10542735760100e-14, -5.68434188608080e-14}),\nmadness::CubicInterpolationTable<double>(grid, {8.10000000000000e+01, 8.09999996237372e+01, 8.09999879889459e+01, 8.09999091613005e+01, 8.09996193792041e+01,\n                                                8.09988469009334e+01, 8.09971562213345e+01, 8.09939178709282e+01, 8.09882848018421e+01, 8.09791761189497e+01,\n                                                8.09652686546528e+01, 8.09449966483350e+01, 8.09165596245867e+01, 8.08779385203537e+01, 8.08269202316368e+01,\n                                                8.07611310410854e+01, 8.06780797893251e+01, 8.05752120166552e+01, 8.04499763892245e+01, 8.02999042460817e+01,\n                                                8.01227018118442e+01, 7.99163524349097e+01, 7.96792233514284e+01, 7.94101685185411e+01, 7.91086168756994e+01,\n                                                7.87746349141708e+01, 7.84089543207383e+01, 7.80129597614236e+01, 7.75886378536174e+01, 7.71384946391696e+01,\n                                                7.66654537446606e+01, 7.61727495122547e+01, 7.56638281014389e+01, 7.51422653068770e+01, 7.46117039045951e+01,\n                                                7.40758074881567e+01, 7.35382236723930e+01, 7.30025483427139e+01, 7.24722845352088e+01, 7.19507937496775e+01,\n                                                7.14412423611430e+01, 7.09465493129220e+01, 7.04693420071237e+01, 7.00119251739631e+01, 6.95762638464730e+01,\n                                                6.91639783001103e+01, 6.87763472286756e+01, 6.84143156260182e+01, 6.80785050743509e+01, 6.77692255083487e+01,\n                                                6.74864884827639e+01, 6.72300223981569e+01, 6.69992901667465e+01, 6.67935096230739e+01, 6.66116767521940e+01,\n                                                6.64525916009638e+01, 6.63148865805856e+01, 6.61970567562888e+01, 6.60974916383303e+01, 6.60145079237389e+01,\n                                                6.59463825820663e+01, 6.58913856282819e+01, 6.58478118839221e+01, 6.58140109986193e+01, 6.57884149943790e+01,\n                                                6.57695626104225e+01, 6.57561197717144e+01, 6.57468955819871e+01, 6.57408533520706e+01, 6.57371163138004e+01,\n                                                6.57349678332490e+01, 6.57338461169251e+01, 6.57333335918518e+01, 6.57331413254168e+01, 6.57330890242294e+01,\n                                                6.57330813046817e+01, 6.57330802479846e+01, 6.57330552923747e+01, 6.57328862146955e+01, 6.57322646710030e+01,\n                                                6.57306078924577e+01, 6.57269822189473e+01, 6.57200391790182e+01, 6.57079669214176e+01, 6.56884596303040e+01,\n                                                6.56587073385435e+01, 6.56154082509375e+01, 6.55548052496587e+01, 6.54727476228382e+01, 6.53647781898254e+01,\n                                                6.52262448755851e+01, 6.50524344376600e+01, 6.48387245513351e+01, 6.45807489406769e+01, 6.42745688570255e+01,\n                                                6.39168430825262e+01, 6.35049878391394e+01, 6.30373175112752e+01, 6.25131569531676e+01, 6.19329165186459e+01,\n                                                6.12981222527853e+01, 6.06113965157683e+01, 5.98763890263319e+01, 5.90976644818934e+01, 5.82805589859683e+01,\n                                                5.74310211401523e+01, 5.65554527439124e+01, 5.56605581695485e+01, 5.47532028719669e+01, 5.38402746905540e+01,\n                                                5.29285412745481e+01, 5.20245044760322e+01, 5.11342635356463e+01, 5.02634050237078e+01, 4.94169329891846e+01,\n                                                4.85992400319235e+01, 4.78141079494602e+01, 4.70647225470871e+01, 4.63536913124768e+01, 4.56830598661132e+01,\n                                                4.50543284867114e+01, 4.44684718406226e+01, 4.39259642210097e+01, 4.34268108208949e+01, 4.29705840586853e+01,\n                                                4.25564632257209e+01, 4.21832756815111e+01, 4.18495382128429e+01, 4.15534977193432e+01, 4.12931708956310e+01,\n                                                4.10663829499607e+01, 4.08708056046839e+01, 4.07039946803593e+01, 4.05634275061247e+01, 4.04465402602979e+01,\n                                                4.03507651596600e+01, 4.02735672105709e+01, 4.02124800321634e+01, 4.01651400799074e+01, 4.01293184526252e+01,\n                                                4.01029493707915e+01, 4.00841543789008e+01, 4.00712613561669e+01, 4.00628175194233e+01, 4.00575957660353e+01,\n                                                4.00545939236978e+01, 4.00530267342036e+01, 4.00523106821368e+01, 4.00520420678642e+01, 4.00519689984180e+01,\n                                                4.00519582135263e+01, 4.00519571897428e+01, 4.00519363172298e+01, 4.00517949031402e+01, 4.00512750538329e+01,\n                                                4.00498893559780e+01, 4.00468569399782e+01, 4.00410500747389e+01, 4.00309536835954e+01, 4.00146400515748e+01,\n                                                3.99897608398594e+01, 3.99535582961171e+01, 3.99028971999934e+01, 3.98343185582790e+01, 3.97441153165778e+01,\n                                                3.96284293539683e+01, 3.94833677751689e+01, 3.93051350551771e+01, 3.90901760208369e+01, 3.88353231254843e+01,\n                                                3.85379401926322e+01, 3.81960540167357e+01, 3.78084651670438e+01, 3.73748302597315e+01, 3.68957099503093e+01,\n                                                3.63725798594458e+01, 3.58078051981720e+01, 3.52045832921557e+01, 3.45668605694174e+01, 3.38992309740780e+01,\n                                                3.32068208572281e+01, 3.24951619451976e+01, 3.17700511081055e+01, 3.10373961382307e+01, 3.03030522021468e+01,\n                                                2.95726622015066e+01, 2.88515202922756e+01, 2.81444753315418e+01, 2.74558794522430e+01, 2.67895728714870e+01,\n                                                2.61488880094376e+01, 2.55366575474549e+01, 2.49552188691670e+01, 2.44064154306416e+01, 2.38916000679418e+01,\n                                                2.34116455759663e+01, 2.29669656770711e+01, 2.25575466442330e+01, 2.21829875989917e+01, 2.18425463271064e+01,\n                                                2.15351872665064e+01, 2.12596288080721e+01, 2.10143878667539e+01, 2.07978205582166e+01, 2.06081585847028e+01,\n                                                2.04435415118503e+01, 2.03020454873080e+01, 2.01817091306683e+01, 2.00805573480048e+01, 1.99966237330197e+01,\n                                                1.99279720479109e+01, 1.98727170631263e+01, 1.98290448037251e+01, 1.97952320243502e+01, 1.97696645345428e+01,\n                                                1.97508538376494e+01, 1.97374514426304e+01, 1.97282601670871e+01, 1.97222417750958e+01, 1.97185203827181e+01,\n                                                1.97163812094920e+01, 1.97152644430865e+01, 1.97147542003724e+01, 1.97145627934780e+01, 1.97145107264226e+01,\n                                                1.97145030414438e+01, 1.97145023575356e+01, 1.97144888947241e+01, 1.97143976824499e+01, 1.97140623802971e+01,\n                                                1.97131686171743e+01, 1.97112127871671e+01, 1.97074677086045e+01, 1.97009567687167e+01, 1.96904381456686e+01,\n                                                1.96744006504934e+01, 1.96510726301865e+01, 1.96184451776307e+01, 1.95743105585819e+01, 1.95163162495259e+01,\n                                                1.94420342549749e+01, 1.93490444333735e+01, 1.92350294328385e+01, 1.90978775843843e+01, 1.89357888243336e+01,\n                                                1.87473775615749e+01, 1.85317655438522e+01, 1.82886574039385e+01, 1.80183918716644e+01, 1.77219627746325e+01,\n                                                1.74010059891788e+01, 1.70577513762474e+01, 1.66949421909671e+01, 1.63157280334671e+01, 1.59235404953477e+01,\n                                                1.55219625939530e+01, 1.51146033586052e+01, 1.47049873538667e+01, 1.42964657623275e+01, 1.38921516087348e+01,\n                                                1.34948777582937e+01, 1.31071734118477e+01, 1.27312535697481e+01, 1.23690164283850e+01, 1.20220454271893e+01,\n                                                1.16916148144388e+01, 1.13786992421043e+01, 1.10839884598587e+01, 1.08079076367173e+01, 1.05506426741739e+01,\n                                                1.03121687597811e+01, 1.00922798504411e+01, 9.89061690755051e+00, 9.70669334057035e+00, 9.53991692350607e+00,\n                                                9.38960815302950e+00, 9.25501548045106e+00, 9.13532806508269e+00, 9.02968672823937e+00, 8.93719371530113e+00,\n                                                8.85692176100791e+00, 8.78792283730407e+00, 8.72923685831434e+00, 8.67990052473094e+00, 8.63895640573384e+00,\n                                                8.60546227587386e+00, 8.57850064462933e+00, 8.55718833811878e+00, 8.54068591889234e+00, 8.52820666584721e+00,\n                                                8.51902478788287e+00, 8.51248251739702e+00, 8.50799572730759e+00, 8.50505774013182e+00, 8.50324104943060e+00,\n                                                8.50219674967842e+00, 8.50165156503007e+00, 8.50140247340933e+00, 8.50130903179621e+00, 8.50128361353012e+00,\n                                                8.50127986185160e+00, 8.50127953018395e+00, 8.50127302604525e+00, 8.50122895966307e+00, 8.50106696869605e+00,\n                                                8.50063517342920e+00, 8.49969026690370e+00, 8.49788091400153e+00, 8.49473523537142e+00, 8.48965313241116e+00,\n                                                8.48190417973457e+00, 8.47063175558418e+00, 8.45486397798369e+00, 8.43353184304537e+00, 8.40549470255797e+00,\n                                                8.36957285980662e+00, 8.32458660868426e+00, 8.26940051410064e+00, 8.20297117632826e+00, 8.12439620395710e+00,\n                                                8.03296171865284e+00, 7.92818550842550e+00, 7.80985299372571e+00, 7.67804349326852e+00, 7.53314484495294e+00,\n                                                7.37585517538736e+00, 7.20717141677181e+00, 7.02836494684479e+00, 6.84094541998157e+00, 6.64661446023241e+00,\n                                                6.44721142826664e+00, 6.24465397465335e+00, 6.04087652590192e+00, 5.83777013364814e+00, 5.63712713776998e+00,\n                                                5.44059376128361e+00, 5.24963305329371e+00, 5.06549960588613e+00, 4.88922634798816e+00, 4.72162264951722e+00,\n                                                4.56328211419759e+00, 4.41459789826520e+00, 4.27578318815340e+00, 4.14689456122490e+00, 4.02785625743920e+00,\n                                                3.91848381171461e+00, 3.81850595139557e+00, 3.72758408758651e+00, 3.64532908569952e+00, 3.57131527446946e+00,\n                                                3.50509184526248e+00, 3.44619191556403e+00, 3.39413959673516e+00, 3.34845543112202e+00, 3.30866055991365e+00,\n                                                3.27427996036401e+00, 3.24484505586045e+00, 3.21989595921420e+00, 3.19898356119496e+00, 3.18167162448432e+00,\n                                                3.16753898926083e+00, 3.15618194199092e+00, 3.14721674547008e+00, 3.14028227796594e+00, 3.13504268506360e+00,\n                                                3.13118991227881e+00, 3.12844596229012e+00, 3.12656470980032e+00, 3.12533311070526e+00, 3.12457166034605e+00,\n                                                3.12413398675021e+00, 3.12390550627026e+00, 3.12380111726397e+00, 3.12376195825171e+00, 3.12375130613661e+00,\n                                                3.12374973390983e+00, 3.12374959276815e+00, 3.12374680061571e+00, 3.12372788345110e+00, 3.12365834313525e+00,\n                                                3.12347298326694e+00, 3.12306737380933e+00, 3.12229075971526e+00, 3.12094077352799e+00, 3.11876031867895e+00,\n                                                3.11543699318831e+00, 3.11060541219535e+00, 3.10385274878398e+00, 3.09472773140433e+00, 3.08275319982582e+00,\n                                                3.06744212190061e+00, 3.04831671104606e+00, 3.02492997197257e+00, 2.99688866683294e+00, 2.96387637679960e+00,\n                                                2.92567508674024e+00, 2.88218359783767e+00, 2.83343112165922e+00, 2.77958465644238e+00, 2.72094918893478e+00,\n                                                2.65796036384920e+00, 2.59116994540385e+00, 2.52122506722824e+00, 2.44884283054124e+00, 2.37478218590458e+00,\n                                                2.29981517553377e+00, 2.22469951809666e+00, 2.15015422228250e+00, 2.07683948185726e+00, 2.00534160590232e+00,\n                                                1.93616324072697e+00, 1.86971869723952e+00, 1.80633384434441e+00, 1.74624978361796e+00, 1.68962938748810e+00,\n                                                1.63656575516927e+00, 1.58709170090235e+00, 1.54118951395509e+00, 1.49880039238614e+00, 1.45983312673218e+00,\n                                                1.42417177415399e+00, 1.39168220372486e+00, 1.36221750237340e+00, 1.33562230765786e+00, 1.31173618148249e+00,\n                                                1.29039616369872e+00, 1.27143865240842e+00, 1.25470075425707e+00, 1.24002123750169e+00, 1.22724120634258e+00,\n                                                1.21620459897034e+00, 1.20675859516861e+00, 1.19875400267333e+00, 1.19204567499447e+00, 1.18649299707113e+00,\n                                                1.18196045896424e+00, 1.17831832192448e+00, 1.17544336591195e+00, 1.17321969350351e+00, 1.17153955278620e+00,\n                                                1.17030413208360e+00, 1.16942427297366e+00, 1.16882104566665e+00, 1.16842613279668e+00, 1.16818197405230e+00,\n                                                1.16804163443143e+00, 1.16796837245188e+00, 1.16793490026333e+00, 1.16792234398345e+00, 1.16791892839861e+00,\n                                                1.16791842426643e+00, 1.16791837779446e+00, 1.16791744492157e+00, 1.16791112459850e+00, 1.16788789084225e+00,\n                                                1.16782596140391e+00, 1.16769044670782e+00, 1.16743098254507e+00, 1.16697996826905e+00, 1.16625153527856e+00,\n                                                1.16514137227271e+00, 1.16352753028832e+00, 1.16127231696562e+00, 1.15822536048643e+00, 1.15422787443599e+00,\n                                                1.14911808260344e+00, 1.14273766803103e+00, 1.13493899880137e+00, 1.12559276508351e+00, 1.11459555414235e+00,\n                                                1.10187681222865e+00, 1.08740461458913e+00, 1.07118970297057e+00, 1.05328736047184e+00, 1.03379687020293e+00,\n                                                1.01285852703080e+00, 9.90648409715064e-01, 9.67371337771041e-01, 9.43252599908718e-01, 9.18529125540658e-01,\n                                                8.93440769372631e-01, 8.68222299213642e-01, 8.43096539399227e-01, 8.18268954096339e-01, 7.93923784115407e-01,\n                                                7.70221700578915e-01, 7.47298823691779e-01, 7.25266881010199e-01, 7.04214245610359e-01, 6.84207593834174e-01,\n                                                6.65293945600226e-01, 6.47502887967505e-01, 6.30848826242058e-01, 6.15333150002030e-01, 6.00946239848511e-01,\n                                                5.87669272412313e-01, 5.75475805674188e-01, 5.64333144526159e-01, 5.54203498769070e-01, 5.45044953599927e-01,\n                                                5.36812277203353e-01, 5.29457592231410e-01, 5.22930938416266e-01, 5.17180752789770e-01, 5.12154292293104e-01,\n                                                5.07798021148005e-01, 5.04057982341763e-01, 5.00880169028946e-01, 4.98210907628334e-01, 4.95997259969329e-01,\n                                                4.94187447120453e-01, 4.92731292665923e-01, 4.91580678398293e-01, 4.90690000920011e-01, 4.90016613798730e-01,\n                                                4.89521237003302e-01, 4.89168313641699e-01, 4.88926293744683e-01, 4.88767826100016e-01, 4.88669841923311e-01,\n                                                4.88613518291061e-01, 4.88584114465709e-01, 4.88570680114279e-01, 4.88565640506025e-01, 4.88564269617996e-01,\n                                                4.88564067278062e-01, 4.88564047995283e-01, 4.88563654073531e-01, 4.88560985204956e-01, 4.88551174302401e-01,\n                                                4.88525023118072e-01, 4.88467797369495e-01, 4.88358224203225e-01, 4.88167741193692e-01, 4.87860046111635e-01,\n                                                4.87390996134550e-01, 4.86708902697728e-01, 4.85755262121828e-01, 4.84465950677247e-01, 4.82772894247418e-01,\n                                                4.80606196276312e-01, 4.77896673450360e-01, 4.74578708413148e-01, 4.70593286484160e-01, 4.65891044381394e-01,\n                                                4.60435130064724e-01, 4.54203660824774e-01, 4.47191577024981e-01, 4.39411723875210e-01, 4.30895051583960e-01,\n                                                4.21689899121247e-01, 4.11860408946723e-01, 4.01484197898355e-01, 3.90649471959932e-01, 3.79451811482440e-01,\n                                                3.67990864494445e-01, 3.56367169594662e-01, 3.44679291362098e-01, 3.33021397955804e-01, 3.21481351592226e-01,\n                                                3.10139326506288e-01, 2.99066922708022e-01, 2.88326711573831e-01, 2.77972132310836e-01, 2.68047655125272e-01,\n                                                2.58589134096127e-01, 2.49624286008640e-01, 2.41173246626076e-01, 2.33249169934723e-01, 2.25858846982561e-01,\n                                                2.19003328531471e-01, 2.12678540290653e-01, 2.06875881932248e-01, 2.01582802429456e-01, 1.96783345337622e-01,\n                                                1.92458658971475e-01, 1.88587468202428e-01, 1.85146506743138e-01, 1.82110911082475e-01, 1.79454579397444e-01,\n                                                1.77150500536229e-01, 1.75171059321030e-01, 1.73488324833158e-01, 1.72074327965163e-01, 1.70901333391996e-01,\n                                                1.69942109331330e-01, 1.69170196196049e-01, 1.68560172704389e-01, 1.68087915441802e-01, 1.67730845516687e-01,\n                                                1.67468154054646e-01, 1.67280997036414e-01, 1.67152649548754e-01, 1.67068609957866e-01, 1.67016645819544e-01,\n                                                1.66986775415197e-01, 1.66971181478871e-01, 1.66964056733249e-01, 1.66961384036057e-01, 1.66960657001482e-01,\n                                                1.66960549692860e-01, 1.66960539071681e-01, 1.66960317953183e-01, 1.66958819848261e-01, 1.66953312738556e-01,\n                                                1.66938633439031e-01, 1.66906511363180e-01, 1.66845006052142e-01, 1.66738086302317e-01, 1.66565378889800e-01,\n                                                1.66302114757798e-01, 1.65919299391149e-01, 1.65384131033036e-01, 1.64660684422600e-01, 1.63710867988343e-01,\n                                                1.62495648387036e-01, 1.60976517988900e-01, 1.59117159212059e-01, 1.56885236250574e-01, 1.54254222322706e-01,\n                                                1.51205152281165e-01, 1.47728179591482e-01, 1.43823816090944e-01, 1.39503744256530e-01, 1.34791115009236e-01,\n                                                1.29720277731863e-01, 1.24335930082012e-01, 1.18691719308657e-01, 1.12848369779314e-01, 1.06871449135724e-01,\n                                                1.00828914279703e-01, 9.47885953204235e-02, 8.88157786759081e-02, 8.29710389443221e-02, 7.73084437729352e-02,\n                                                7.18742194269737e-02, 6.67059214563466e-02, 6.18321102065806e-02, 5.72724904427560e-02, 5.30384426229773e-02,\n                                                4.91338531788728e-02, 4.55561432664240e-02, 4.22973986471931e-02, 3.93455150926059e-02, 3.66852907707766e-02,\n                                                3.42994163121659e-02, 3.21693320417893e-02, 3.02759383747997e-02, 2.86001585915443e-02, 2.71233628251224e-02,\n                                                2.58276683061780e-02, 2.46961342314620e-02, 2.37128707033634e-02, 2.28630806883530e-02, 2.21330524361321e-02,\n                                                2.15101177433894e-02, 2.09825891574980e-02, 2.05396869049537e-02, 2.01714641118116e-02, 1.98687368087604e-02,\n                                                1.96230232975267e-02, 1.94264956840300e-02, 1.92719447597796e-02, 1.91527579358421e-02, 1.90629086347229e-02,\n                                                1.89969544618833e-02, 1.89500406627445e-02, 1.89179048742716e-02, 1.88968790317574e-02, 1.88838845067920e-02,\n                                                1.88764171021063e-02, 1.88725193594621e-02, 1.88707386576397e-02, 1.88700706887346e-02, 1.88698889882062e-02,\n                                                1.88698621696801e-02, 1.88698594032672e-02, 1.88698006784875e-02, 1.88694028137206e-02, 1.88679402837550e-02,\n                                                1.88640421997945e-02, 1.88555137939233e-02, 1.88391902820229e-02, 1.88108329699048e-02, 1.87650788866591e-02,\n                                                1.86954565844957e-02, 1.85944814633530e-02, 1.84538433291266e-02, 1.82646960719524e-02, 1.80180536274150e-02,\n                                                1.77052873274448e-02, 1.73187074488794e-02, 1.68521971002349e-02, 1.63018513166264e-02, 1.56665610142852e-02,\n                                                1.49484734892553e-02, 1.41532616037949e-02, 1.32901449606777e-02, 1.23716287344706e-02, 1.14129574912170e-02,\n                                                1.04313178722748e-02, 9.44485919579563e-03, 8.47162814064006e-03, 7.52852721873865e-03, 6.63040381466828e-03,\n                                                5.78935748205822e-03, 5.01432124903545e-03, 4.31093347539502e-03, 3.68167734606573e-03, 3.12623286046687e-03,\n                                                2.64196757511570e-03, 2.22449039202388e-03, 1.86820505571461e-03, 1.56681944962145e-03, 1.31378463407827e-03,\n                                                1.10264899180379e-03, 9.27319355128020e-04, 7.82227841114036e-04, 6.62413364281633e-04, 5.63537677592763e-04,\n                                                4.81861171650166e-04, 4.14200179818636e-04, 3.57878121405975e-04, 3.10674126097865e-04, 2.70769371070401e-04,\n                                                2.36692552363138e-04, 2.07267821480173e-04, 1.81568284176592e-04, 1.58875977632533e-04, 1.38647101664446e-04,\n                                                1.20480623593267e-04, 1.04089119503215e-04, 8.92718542502280e-05, 7.58907929139241e-05, 6.38502662582141e-05,\n                                                5.30806380680815e-05, 4.35258783824111e-05, 3.51346312044143e-05, 2.78542137834847e-05, 2.16269538668712e-05,\n                                                1.63883089498995e-05, 1.20662835740859e-05, 8.58174811924073e-06, 5.84935540359766e-06, 3.77883942803692e-06,\n                                                2.27655890228107e-06, 1.24721208294432e-06, 5.95704335637492e-07, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {8.20000000000000e+01,  8.19999996172030e+01,  8.19999877803589e+01,  8.19999075837716e+01,\n                                                8.19996127692291e+01,  8.19988268757578e+01,  8.19971068345491e+01,  8.19938122425539e+01,\n                                                8.19880813358716e+01,  8.19788144334900e+01,  8.19646653575356e+01,  8.19440410955096e+01,\n                                                8.19151098024188e+01,  8.18758172002862e+01,  8.18239115616781e+01,  8.17569777678368e+01,\n                                                8.16724813480620e+01,  8.15678237799445e+01,  8.14404104116323e+01,  8.12877318583189e+01,\n                                                8.11074583704610e+01,  8.08975443949192e+01,  8.06563375880138e+01,  8.03826835009013e+01,\n                                                8.00760149503331e+01,  7.97364146771185e+01,  7.93646419466077e+01,  7.89621182814703e+01,\n                                                7.85308737435668e+01,  7.80734616185646e+01,  7.75928542645427e+01,  7.70923348504100e+01,\n                                                7.65753981544686e+01,  7.60456690019068e+01,  7.55068406879446e+01,  7.49626297180456e+01,\n                                                7.44167391472242e+01,  7.38728218481514e+01,  7.33344373492634e+01,  7.28050005302244e+01,\n                                                7.22877255943882e+01,  7.17855722089108e+01,  7.13012010663535e+01,  7.08369434827402e+01,\n                                                7.03947856298022e+01,  6.99763646793425e+01,  6.95829727606255e+01,  6.92155651220143e+01,\n                                                6.88747703301464e+01,  6.85609017819424e+01,  6.82739707336091e+01,  6.80137014061435e+01,\n                                                6.77795486865961e+01,  6.75707187224358e+01,  6.73861924533076e+01,  6.72247519125579e+01,\n                                                6.70850089771808e+01,  6.69654361390670e+01,  6.68643987949105e+01,  6.67801884919289e+01,\n                                                6.67110565131281e+01,  6.66552471369409e+01,  6.66110298642397e+01,  6.65767298764061e+01,\n                                                6.65507559779266e+01,  6.65316252921685e+01,  6.65179840244418e+01,  6.65086236848325e+01,\n                                                6.65024922745500e+01,  6.64987000808092e+01,  6.64965198910153e+01,  6.64953816195153e+01,\n                                                6.64948615302240e+01,  6.64946664261861e+01,  6.64946133531016e+01,  6.64946055196235e+01,\n                                                6.64946044473310e+01,  6.64945791234090e+01,  6.64944075503662e+01,  6.64937768335270e+01,\n                                                6.64920956033093e+01,  6.64884164207980e+01,  6.64813709157941e+01,  6.64691205052109e+01,\n                                                6.64493253646241e+01,  6.64191341058578e+01,  6.63751963075992e+01,  6.63136996014250e+01,\n                                                6.62304323767994e+01,  6.61208722905752e+01,  6.59802996311013e+01,  6.58039332190487e+01,\n                                                6.55870850043589e+01,  6.53253279675802e+01,  6.50146705034935e+01,  6.46517292844042e+01,\n                                                6.42338917399634e+01,  6.37594587663706e+01,  6.32277581352628e+01,  6.26392195224788e+01,\n                                                6.19954035779695e+01,  6.12989805825735e+01,  6.05536592496070e+01,  5.97640725437157e+01,\n                                                5.89356333047180e+01,  5.80743755698973e+01,  5.71867958159155e+01,  5.62797018179936e+01,\n                                                5.53600681683782e+01,  5.44348916170975e+01,  5.35110408125778e+01,  5.25951041329040e+01,\n                                                5.16932503679383e+01,  5.08111211557143e+01,  4.99537667023624e+01,  4.91256220529593e+01,\n                                                4.83305099961620e+01,  4.75716548634573e+01,  4.68516973600011e+01,  4.61727081634362e+01,\n                                                4.55362027759348e+01,  4.49431610595874e+01,  4.43940534490287e+01,  4.38888738271267e+01,\n                                                4.34271775920289e+01,  4.30081228617267e+01,  4.26305128936006e+01,  4.22928383176488e+01,\n                                                4.19933184034659e+01,  4.17299411174283e+01,  4.15005020951446e+01,  4.13026428432494e+01,\n                                                4.11338885199873e+01,  4.09916855650284e+01,  4.08734392944913e+01,  4.07765513802966e+01,\n                                                4.06984569201935e+01,  4.06366605973653e+01,  4.05887712440777e+01,  4.05525339775148e+01,\n                                                4.05258589805721e+01,  4.05068459659383e+01,  4.04938033945359e+01,  4.04852616208680e+01,\n                                                4.04799793041771e+01,  4.04769426463080e+01,  4.04753572806507e+01,  4.04746329239006e+01,\n                                                4.04743611942796e+01,  4.04742872773856e+01,  4.04742763674124e+01,  4.04742753317552e+01,\n                                                4.04742542171662e+01,  4.04741111629793e+01,  4.04735852845543e+01,  4.04721835156963e+01,\n                                                4.04691159307841e+01,  4.04632417208532e+01,  4.04530282416725e+01,  4.04365254310748e+01,\n                                                4.04113577368390e+01,  4.03747354664195e+01,  4.03234871156617e+01,  4.02541137011612e+01,\n                                                4.01628653618375e+01,  4.00458394795721e+01,  3.98990982980320e+01,  3.97188025392119e+01,\n                                                3.95013559293307e+01,  3.92435540086322e+01,  3.89427293266363e+01,  3.85968843664597e+01,\n                                                3.82048035550966e+01,  3.77661367087981e+01,  3.72814483161710e+01,  3.67522300387871e+01,\n                                                3.61808772682942e+01,  3.55706337577306e+01,  3.49255102922624e+01,  3.42501832935910e+01,\n                                                3.35498770878729e+01,  3.28302304735669e+01,  3.20971466272100e+01,  3.13566278883079e+01,\n                                                3.06146041290000e+01,  2.98767717855070e+01,  2.91484637204368e+01,  2.84345633538518e+01,\n                                                2.77394624182398e+01,  2.70670488026405e+01,  2.64207067519969e+01,  2.58033167550807e+01,\n                                                2.52172514850949e+01,  2.46643713135825e+01,  2.41460255808430e+01,  2.36630646159535e+01,\n                                                2.32158644936869e+01,  2.28043635161211e+01,  2.24281073939110e+01,  2.20862992912204e+01,\n                                                2.17778510596074e+01,  2.15014327373206e+01,  2.12555183745151e+01,  2.10384272053656e+01,\n                                                2.08483599785306e+01,  2.06834308199275e+01,  2.05416953366276e+01,  2.04211758095228e+01,\n                                                2.03198843087996e+01,  2.02358444440191e+01,  2.01671122683934e+01,  2.01117966267757e+01,\n                                                2.00680789951765e+01,  2.00342326280077e+01,  2.00086406260156e+01,  1.99898123782218e+01,\n                                                1.99763977270999e+01,  1.99671981655778e+01,  1.99611744003725e+01,  1.99574497062499e+01,\n                                                1.99553086422326e+01,  1.99541908908038e+01,  1.99536801985128e+01,  1.99534886230456e+01,\n                                                1.99534365101418e+01,  1.99534288183961e+01,  1.99534281338857e+01,  1.99534146592200e+01,\n                                                1.99533233666377e+01,  1.99529877693487e+01,  1.99520932201527e+01,  1.99501356731503e+01,\n                                                1.99463873189949e+01,  1.99398707223665e+01,  1.99293430623721e+01,  1.99132920298051e+01,\n                                                1.98899448353404e+01,  1.98572915862000e+01,  1.98131239486132e+01,  1.97550894869503e+01,\n                                                1.96807613289243e+01,  1.95877218444520e+01,  1.94736578709955e+01,  1.93364637374265e+01,\n                                                1.91743470417307e+01,  1.89859309769066e+01,  1.87703461598369e+01,  1.85273046033499e+01,\n                                                1.82571488774695e+01,  1.79608707800732e+01,  1.76400960297276e+01,  1.72970344998594e+01,\n                                                1.69343990307860e+01,  1.65552993782733e+01,  1.61631207361197e+01,  1.57613978547622e+01,\n                                                1.53536956077984e+01,  1.49435048517543e+01,  1.45341589786508e+01,  1.41287725012545e+01,\n                                                1.37301993758666e+01,  1.33410064849852e+01,  1.29634572644208e+01,  1.25995017221708e+01,\n                                                1.22507713050976e+01,  1.19185791476275e+01,  1.16039272533205e+01,  1.13075217636412e+01,\n                                                1.10297960298506e+01,  1.07709395589821e+01,  1.05309298535414e+01,  1.03095640679515e+01,\n                                                1.01064881122313e+01,  9.92122190534644e+00,  9.75318048515923e+00,  9.60169137342149e+00,\n                                                9.46600893073992e+00,  9.34532650104578e+00,  9.23878705643014e+00,  9.14549290880730e+00,\n                                                9.06451491250544e+00,  8.99490146434201e+00,  8.93568751590762e+00,  8.88590373796153e+00,\n                                                8.84458590897826e+00,  8.81078453177783e+00,  8.78357461086425e+00,  8.76206544965633e+00,\n                                                8.74541025535319e+00,  8.73281527570646e+00,  8.72354814305254e+00,  8.71694507264485e+00,\n                                                8.71241655918999e+00,  8.70945123989945e+00,  8.70761764405451e+00,  8.70656362507481e+00,\n                                                8.70601336598456e+00,  8.70576195577998e+00,  8.70566764438125e+00,  8.70564198951195e+00,\n                                                8.70563820291126e+00,  8.70563786815633e+00,  8.70563130347442e+00,  8.70558682690296e+00,\n                                                8.70542332803562e+00,  8.70498751325144e+00,  8.70403381006669e+00,  8.70220761034629e+00,\n                                                8.69903263447360e+00,  8.69390317820373e+00,  8.68608197343244e+00,  8.67470433755187e+00,\n                                                8.65878918310065e+00,  8.63725728828251e+00,  8.60895697070171e+00,  8.57269695057145e+00,\n                                                8.52728573882133e+00,  8.47157636199326e+00,  8.40451468309617e+00,  8.32518905898466e+00,\n                                                8.23287866585366e+00,  8.12709759931936e+00,  8.00763186984771e+00,  7.87456668859106e+00,\n                                                7.72830195011282e+00,  7.56955450573061e+00,  7.39934660428648e+00,  7.21898068453559e+00,\n                                                7.03000149288329e+00,  6.83414725999876e+00,  6.63329239565500e+00,  6.42938482269220e+00,\n                                                6.22438159016353e+00,  6.02018666588842e+00,  5.81859469621149e+00,  5.62124397934556e+00,\n                                                5.42958096729365e+00,  5.24483742621310e+00,  5.06802014363622e+00,  4.89991197506583e+00,\n                                                4.74108222490879e+00,  4.59190392997760e+00,  4.45257554742582e+00,  4.32314477010175e+00,\n                                                4.20353259694474e+00,  4.09355626926342e+00,  3.99295016055069e+00,  3.90138412232157e+00,\n                                                3.81847911475373e+00,  3.74382018481361e+00,  3.67696700645001e+00,  3.61746228419197e+00,\n                                                3.56483836078360e+00,  3.51862237657149e+00,  3.47834031475337e+00,  3.44352024009874e+00,\n                                                3.41369500412110e+00,  3.38840464954174e+00,  3.36719870261456e+00,  3.34963849432606e+00,\n                                                3.33529960150318e+00,  3.32377444766722e+00,  3.31467505281043e+00,  3.30763587342835e+00,\n                                                3.30231663182613e+00,  3.29840499978819e+00,  3.29561897883782e+00,  3.29370880960671e+00,\n                                                3.29245824743899e+00,  3.29168506020039e+00,  3.29124063596213e+00,  3.29100863013865e+00,\n                                                3.29090263016835e+00,  3.29086286679461e+00,  3.29085205027540e+00,  3.29085045378284e+00,\n                                                3.29085031046273e+00,  3.29084747521598e+00,  3.29082826607886e+00,  3.29075765240768e+00,\n                                                3.29056943111109e+00,  3.29015755818379e+00,  3.28936894380043e+00,  3.28799807338392e+00,\n                                                3.28578382214701e+00,  3.28240883180514e+00,  3.27750180521764e+00,  3.27064303454434e+00,\n                                                3.26137339695106e+00,  3.24920691632749e+00,  3.23364679211045e+00,  3.21420453786773e+00,\n                                                3.19042156542191e+00,  3.16189222157578e+00,  3.12828697417638e+00,  3.08937420244996e+00,\n                                                3.04503892580743e+00,  2.99529685007343e+00,  2.94030234499817e+00,  2.88034938724167e+00,\n                                                2.81586507047086e+00,  2.74739593061092e+00,  2.67558797355926e+00,  2.60116183829498e+00,\n                                                2.52488491122253e+00,  2.44754238867210e+00,  2.36990925796837e+00,  2.29272495543673e+00,\n                                                2.21667210175576e+00,  2.14236025894904e+00,  2.07031514997007e+00,  2.00097328402363e+00,\n                                                1.93468149134679e+00,  1.87170053736594e+00,  1.81221179011041e+00,  1.75632586498338e+00,\n                                                1.70409224981370e+00,  1.65550908268401e+00,  1.61053246904213e+00,  1.56908494070704e+00,\n                                                1.53106284757732e+00,  1.49634261808103e+00,  1.46478592437327e+00,  1.43624384889300e+00,\n                                                1.41056017961536e+00,  1.38757397180721e+00,  1.36712151225730e+00,  1.34903781345508e+00,\n                                                1.33315775357174e+00,  1.31931696526318e+00,  1.30735256309926e+00,  1.29710378602340e+00,\n                                                1.28841261755709e+00,  1.28112443230251e+00,  1.27508870254684e+00,  1.27015978347369e+00,\n                                                1.26619777989376e+00,  1.26306948199922e+00,  1.26064934311810e+00,  1.25882045965388e+00,\n                                                1.25747550326712e+00,  1.25651754877380e+00,  1.25586073890091e+00,  1.25543072935707e+00,\n                                                1.25516486464562e+00,  1.25501204622887e+00,  1.25493226918755e+00,  1.25489582021221e+00,\n                                                1.25488214723663e+00,  1.25487842788343e+00,  1.25487787891569e+00,  1.25487782831068e+00,\n                                                1.25487681247162e+00,  1.25486993004088e+00,  1.25484462992345e+00,  1.25477719237156e+00,\n                                                1.25462962354081e+00,  1.25434707517771e+00,  1.25385592013605e+00,  1.25306261668344e+00,\n                                                1.25185349536170e+00,  1.25009559762687e+00,  1.24763868064080e+00,  1.24431847202801e+00,\n                                                1.23996120735904e+00,  1.23438940871526e+00,  1.22742876548561e+00,  1.21891586387613e+00,\n                                                1.20870639036141e+00,  1.19668332263436e+00,  1.18276453918961e+00,  1.16690924539348e+00,\n                                                1.14912264541142e+00,  1.12945839255352e+00,  1.10801852019981e+00,  1.08495077332263e+00,\n                                                1.06044349816169e+00,  1.03471847126499e+00,  1.00802222726158e+00,  9.80616554133348e-01,\n                                                9.52768854644916e-01,  9.24743025565917e-01,  8.96791396208386e-01,  8.69148115631589e-01,\n                                                8.42024207360851e-01,  8.15604344012186e-01,  7.90045249972025e-01,  7.65475530456797e-01,\n                                                7.41996655563838e-01,  7.19684797910745e-01,  6.98593226859728e-01,  6.78754992703674e-01,\n                                                6.60185680888361e-01,  6.42886070131183e-01,  6.26844581604971e-01,  6.12039453875866e-01,\n                                                5.98440617038435e-01,  5.86011268494758e-01,  5.74709172558016e-01,  5.64487717891055e-01,\n                                                5.55296772454028e-01,  5.47083376878362e-01,  5.39792315512514e-01,  5.33366600965266e-01,\n                                                5.27747903618803e-01,  5.22876952789758e-01,  5.18693931241216e-01,  5.15138879684216e-01,\n                                                5.12152122765571e-01,  5.09674722809351e-01,  5.07648962286282e-01,  5.06018850709125e-01,\n                                                5.04730646560731e-01,  5.03733380182155e-01,  5.02979359580749e-01,  5.02424638168975e-01,\n                                                5.02029421812239e-01,  5.01758392474969e-01,  5.01580927326415e-01,  5.01471195383616e-01,\n                                                5.01408118449788e-01,  5.01375188936606e-01,  5.01360143702172e-01,  5.01354499801394e-01,\n                                                5.01352964531677e-01,  5.01352737929381e-01,  5.01352716334395e-01,  5.01352275177865e-01,\n                                                5.01349286287478e-01,  5.01338298961969e-01,  5.01309011951435e-01,  5.01244923957159e-01,\n                                                5.01122210429074e-01,  5.00908881407952e-01,  5.00564275002233e-01,  5.00038940236422e-01,\n                                                4.99274960036246e-01,  4.98206758175797e-01,  4.96762421116884e-01,  4.94865545053145e-01,\n                                                4.92437589115568e-01,  4.89400677890899e-01,  4.85680752277062e-01,  4.81210921499638e-01,\n                                                4.75934827094974e-01,  4.69809799377614e-01,  4.62809575882375e-01,  4.54926365251154e-01,\n                                                4.46172081188053e-01,  4.36578636717016e-01,  4.26197271224638e-01,  4.15096969860841e-01,\n                                                4.03362113410296e-01,  3.91089554795755e-01,  3.78385348245473e-01,  3.65361357100269e-01,\n                                                3.52131940478714e-01,  3.38810876169134e-01,  3.25508627563039e-01,  3.12330015597439e-01,\n                                                2.99372318940129e-01,  2.86723799584735e-01,  2.74462635734892e-01,  2.62656236266920e-01,\n                                                2.51360907441381e-01,  2.40621839799914e-01,  2.30473379620520e-01,  2.20939544648573e-01,\n                                                2.12034738884697e-01,  2.03764617278310e-01,  1.96127049434082e-01,  1.89113132607687e-01,\n                                                1.82708208447110e-01,  1.76892844692148e-01,  1.71643751568482e-01,  1.66934611958013e-01,\n                                                1.62736813689321e-01,  1.59020080727529e-01,  1.55753007139296e-01,  1.52903503167693e-01,\n                                                1.50439166471841e-01,  1.48327593606581e-01,  1.46536647272583e-01,  1.45034693956546e-01,\n                                                1.43790824535984e-01,  1.42775067505227e-01,  1.41958600963974e-01,  1.41313965692603e-01,\n                                                1.40815277824132e-01,  1.40438436113229e-01,  1.40161315883120e-01,  1.39963939647060e-01,\n                                                1.39828613328106e-01,  1.39740017033574e-01,  1.39685240467145e-01,  1.39653755172560e-01,\n                                                1.39637318691371e-01,  1.39629809110971e-01,  1.39626992070163e-01,  1.39626225772616e-01,\n                                                1.39626112668921e-01,  1.39626101474192e-01,  1.39625868414527e-01,  1.39624289408715e-01,\n                                                1.39618484931120e-01,  1.39603013206894e-01,  1.39569158192089e-01,  1.39504338934600e-01,\n                                                1.39391671343489e-01,  1.39209714521300e-01,  1.38932434685074e-01,  1.38529419334972e-01,\n                                                1.37966371496105e-01,  1.37205907228577e-01,  1.36208667975666e-01,  1.34934741933392e-01,\n                                                1.33345365440064e-01,  1.31404847392304e-01,  1.29082629089439e-01,  1.26355362075529e-01,\n                                                1.23208861822889e-01,  1.19639780203627e-01,  1.15656838979106e-01,  1.11281483078642e-01,\n                                                1.06547847224306e-01,  1.01501980800677e-01,  9.62003392612161e-02,  9.07076188423446e-02,\n                                                8.50940763465502e-02,  7.94325283484909e-02,  7.37952566194480e-02,  6.82510537178871e-02,\n                                                6.28626231655147e-02,  5.76845052414967e-02,  5.27616388302476e-02,  4.81286011872868e-02,\n                                                4.38095009266988e-02,  3.98184437680982e-02,  3.61604516343021e-02,  3.28326960653982e-02,\n                                                2.98259056826282e-02,  2.71258210704843e-02,  2.47145939794677e-02,  2.25720559705849e-02,\n                                                2.06768099906753e-02,  1.90071235741556e-02,  1.75416225128657e-02,  1.62597982692603e-02,\n                                                1.51423514141840e-02,  1.41713977893829e-02,  1.33305650124100e-02,  1.26050054532953e-02,\n                                                1.19813488991696e-02,  1.14476145569284e-02,  1.09930983828548e-02,  1.06082483093957e-02,\n                                                1.02845369380731e-02,  1.00143387396372e-02,  9.79081672527116e-03,  9.60782186891151e-03,\n                                                9.45980718979911e-03,  9.34175726762021e-03,  9.24913299873253e-03,  9.17783056681287e-03,\n                                                9.12415288078705e-03,  9.08479113685701e-03,  9.05681371348521e-03,  9.03765934070577e-03,\n                                                9.02513142855810e-03,  9.01739060367390e-03,  9.01294288550503e-03,  9.01062149711152e-03,\n                                                9.00956100026917e-03,  9.00916319791634e-03,  9.00905498853888e-03,  9.00903901717243e-03,\n                                                9.00903736965120e-03,  9.00900239683722e-03,  9.00876545425433e-03,  9.00789447655370e-03,\n                                                9.00557314112405e-03,  9.00049483914245e-03,  8.99077649832236e-03,  8.97389877820842e-03,\n                                                8.94668035645907e-03,  8.90529516740912e-03,  8.84534208158527e-03,  8.76197603649587e-03,\n                                                8.65010738472449e-03,  8.50467164252677e-03,  8.32096457946818e-03,  8.09502786600547e-03,\n                                                7.82405915825279e-03,  7.50680922048730e-03,  7.14391985204088e-03,  6.73815273536604e-03,\n                                                6.29446331261363e-03,  5.81988680676204e-03,  5.32322507106642e-03,  4.81455037385103e-03,\n                                                4.30457074639889e-03,  3.80392520590078e-03,  3.32249037231236e-03,  2.86877903897675e-03,\n                                                2.44949576216413e-03,  2.06928792684380e-03,  1.73069947953763e-03,  1.43430602572892e-03,\n                                                1.17898999704380e-03,  9.62305075162817e-04,  7.80878205617341e-04,  6.30802020822330e-04,\n                                                5.07978512260365e-04,  4.08386996994636e-04,  3.28266381856679e-04,  2.64220186451780e-04,\n                                                2.13265400162754e-04,  1.72846905030610e-04,  1.40829491058980e-04,  1.15469045638861e-04,\n                                                9.53630169533426e-05,  7.93881350062975e-05,  6.66409333831552e-05,  5.63941199231976e-05,\n                                                4.80701648797321e-05,  4.12229594815017e-05,  3.55174422708160e-05,  3.07043393803497e-05,\n                                                2.65947598450111e-05,  2.30411744723824e-05,  1.99273763428209e-05,  1.71649049462985e-05,\n                                                1.46912292677825e-05,  1.24663269218672e-05,  1.04670473746182e-05,  8.68058461378496e-06,\n                                                7.09875666871085e-06,  5.71409871952255e-06,  4.51786451094449e-06,  3.49944141930791e-06,\n                                                2.64652990722425e-06,  1.94557635779802e-06,  1.38217932033058e-06,  9.41380903896061e-07,\n                                                6.07862986612417e-07,  -2.84217094304040e-14, -5.68434188608080e-14, -4.26325641456060e-14,\n                                                -4.26325641456060e-14, -2.84217094304040e-14, -2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {8.30000000000000e+01, 8.29999996106404e+01, 8.29999875708700e+01, 8.29999059994221e+01, 8.29996061306745e+01,\n                                                8.29988067639962e+01, 8.29970572342068e+01, 8.29937061573604e+01, 8.29878769897456e+01, 8.29784511828599e+01,\n                                                8.29640594482625e+01, 8.29430814022693e+01, 8.29136536923324e+01, 8.28736866702200e+01, 8.28208898151954e+01,\n                                                8.27528064279011e+01, 8.26668585464823e+01, 8.25604034185708e+01, 8.24308029378354e+01, 8.22755069122192e+01,\n                                                8.20921496112475e+01, 8.18786566696678e+01, 8.16333563582505e+01, 8.13550861121018e+01, 8.10432829795211e+01,\n                                                8.06980463172526e+01, 8.03201632834895e+01, 7.99110924590116e+01, 7.94729074007700e+01, 7.90082085392902e+01,\n                                                7.85200167637492e+01, 7.80116638567083e+01, 7.74866930977644e+01, 7.69487784162941e+01, 7.64016639393502e+01,\n                                                7.58491196087584e+01, 7.52949045468025e+01, 7.47427291743382e+01, 7.41962098317352e+01, 7.36588147447702e+01,\n                                                7.31338055639619e+01, 7.26241820813782e+01, 7.21326376625922e+01, 7.16615297559158e+01, 7.12128654787965e+01,\n                                                7.07882989602646e+01, 7.03891360004089e+01, 7.00163424090973e+01, 6.96705540291261e+01, 6.93520879430777e+01,\n                                                6.90609552440769e+01, 6.87968760252323e+01, 6.85592971330949e+01, 6.83474129663795e+01, 6.81601893304885e+01,\n                                                6.79963901445808e+01, 6.78546066497763e+01, 6.77332886688315e+01, 6.76307773986631e+01, 6.75453391615126e+01,\n                                                6.74751994897295e+01, 6.74185768713101e+01, 6.73737154415239e+01, 6.73389158761651e+01, 6.73125637311810e+01,\n                                                6.72931544882693e+01, 6.72793146115734e+01, 6.72698179996309e+01, 6.72635973292249e+01, 6.72597499308644e+01,\n                                                6.72575380036336e+01, 6.72563831622554e+01, 6.72558555020326e+01, 6.72556575578741e+01, 6.72556037122077e+01,\n                                                6.72555957646981e+01, 6.72555946767962e+01, 6.72555689842354e+01, 6.72553949136153e+01, 6.72547550154941e+01,\n                                                6.72530493119371e+01, 6.72493165731038e+01, 6.72421685127681e+01, 6.72297397933979e+01, 6.72096565546144e+01,\n                                                6.71790259567268e+01, 6.71344489219077e+01, 6.70720578059473e+01, 6.69875800871544e+01, 6.68764282701224e+01,\n                                                6.67338150518105e+01, 6.65548914096001e+01, 6.63349037220469e+01, 6.60693644470161e+01, 6.57542294055681e+01,\n                                                6.53860734822646e+01, 6.49622556306637e+01, 6.44810635031995e+01, 6.39418278872951e+01, 6.33449976758460e+01,\n                                                6.26921678103850e+01, 6.19860560520135e+01, 6.12304297228369e+01, 6.04299899791882e+01, 5.95902268803109e+01,\n                                                5.87172610526122e+01, 5.78176853107930e+01, 5.68984124971285e+01, 5.59665272660454e+01, 5.50291348046377e+01,\n                                                5.40932027519717e+01, 5.31654031187600e+01, 5.22519716852326e+01, 5.13586040453358e+01, 5.04903972392796e+01,\n                                                4.96518306592584e+01, 4.88467701844815e+01, 4.80784800804352e+01, 4.73496345824699e+01, 4.66623287225284e+01,\n                                                4.60180918685474e+01, 4.54179074883680e+01, 4.48622406778428e+01, 4.43510728466546e+01, 4.38839416063638e+01,\n                                                4.34599835182229e+01, 4.30779776699904e+01, 4.27363886961440e+01, 4.24334085413967e+01, 4.21669968223672e+01,\n                                                4.19349200018991e+01, 4.17347897581954e+01, 4.15641009426593e+01, 4.14202694207294e+01, 4.13006699199601e+01,\n                                                4.12026738021152e+01, 4.11236864566452e+01, 4.10611838017089e+01, 4.10127471925682e+01, 4.09760958901910e+01,\n                                                4.09491161476552e+01, 4.09298859382841e+01, 4.09166943835298e+01, 4.09080550419922e+01, 4.09027123897589e+01,\n                                                4.08996410471301e+01, 4.08980375735360e+01, 4.08973049432644e+01, 4.08970301099833e+01, 4.08969553488206e+01,\n                                                4.08969443142352e+01, 4.08969432667489e+01, 4.08969219109921e+01, 4.08967772228608e+01, 4.08962453379343e+01,\n                                                4.08948275583414e+01, 4.08917249363184e+01, 4.08857836337521e+01, 4.08754535037382e+01, 4.08587622181922e+01,\n                                                4.08333071078691e+01, 4.07962666483138e+01, 4.07444331663599e+01, 4.06742678017703e+01, 4.05819779884927e+01,\n                                                4.04636166895470e+01, 4.03152013311425e+01, 4.01328488835891e+01, 3.99129219334685e+01, 3.96521790483200e+01,\n                                                3.93479214718913e+01, 3.89981274613812e+01, 3.86015656444975e+01, 3.81578798304859e+01, 3.76676398099825e+01,\n                                                3.71323556393617e+01, 3.65544562278998e+01, 3.59372359288214e+01, 3.52847743552437e+01, 3.46018341679206e+01,\n                                                3.38937393546122e+01, 3.31662340990671e+01, 3.24253223266437e+01, 3.16770925381642e+01, 3.09275408175392e+01,\n                                                3.01824119711173e+01, 2.94470780979199e+01, 2.87264632504050e+01, 2.80250077255282e+01, 2.73466552846151e+01,\n                                                2.66948465338239e+01, 2.60725094768885e+01, 2.54820474496297e+01, 2.49253302538487e+01, 2.44036951133333e+01,\n                                                2.39179616059490e+01, 2.34684612096311e+01, 2.30550791564450e+01, 2.26773046132298e+01, 2.23342847972949e+01,\n                                                2.20248791408842e+01, 2.17477106109184e+01, 2.15012124136330e+01, 2.12836693313147e+01, 2.10932537303097e+01,\n                                                2.09280568117529e+01, 2.07861159676167e+01, 2.06654391984639e+01, 2.05640274961429e+01, 2.04798959413536e+01,\n                                                2.04110940515832e+01, 2.03557256703897e+01, 2.03119684389379e+01, 2.02780926550283e+01, 2.02524791203180e+01,\n                                                2.02336354170548e+01, 2.02202099525463e+01, 2.02110030701865e+01, 2.02049745530117e+01, 2.02012469370288e+01,\n                                                2.01991041991169e+01, 2.01979855754694e+01, 2.01974744850435e+01, 2.01972827602852e+01, 2.01972306067765e+01,\n                                                2.01972229090378e+01, 2.01972222239941e+01, 2.01972087388298e+01, 2.01971173751231e+01, 2.01967815164408e+01,\n                                                2.01958862709862e+01, 2.01939272028743e+01, 2.01901759456993e+01, 2.01836543321883e+01, 2.01731186477992e+01,\n                                                2.01570555711977e+01, 2.01336912655173e+01, 2.01010148864403e+01, 2.00568174281061e+01, 1.99987462918566e+01,\n                                                1.99243752062553e+01, 1.98312881446710e+01, 1.97171747083215e+01, 1.95799331392884e+01, 1.94177758166476e+01,\n                                                1.92293309305178e+01, 1.90137332193877e+01, 1.87706964076591e+01, 1.85005604906349e+01, 1.82043084225779e+01,\n                                                1.78835490958409e+01, 1.75404666111682e+01, 1.71777393786192e+01, 1.67984360031747e+01, 1.64058975281854e+01,\n                                                1.60036168019390e+01, 1.55951251095082e+01, 1.51838938105693e+01, 1.47732550819371e+01, 1.43663419284201e+01,\n                                                1.39660444902804e+01, 1.35749782090293e+01, 1.31954599094848e+01, 1.28294898557042e+01, 1.24787402559701e+01,\n                                                1.21445522747263e+01, 1.18279435598179e+01, 1.15296267017017e+01, 1.12500368073572e+01, 1.09893646330561e+01,\n                                                1.07475911899928e+01, 1.05245204095581e+01, 1.03198077994345e+01, 1.01329844035961e+01, 9.96347638381245e+00,\n                                                9.81062105356111e+00, 9.67368031219166e+00, 9.55185231562477e+00, 9.44428202643398e+00, 9.35007110037780e+00,\n                                                9.26828742452192e+00, 9.19797452574029e+00, 9.13816100359462e+00, 9.08787009134379e+00, 9.04612939966495e+00,\n                                                9.01198084190835e+00, 8.98449067537136e+00, 8.96275952265350e+00, 8.94593216617348e+00, 8.93320684450747e+00,\n                                                8.92384372876759e+00, 8.91717222740280e+00, 8.91259676347222e+00, 8.90960069213280e+00, 8.90774807756394e+00,\n                                                8.90668312478228e+00, 8.90612715728494e+00, 8.90587313886736e+00, 8.90577784903877e+00, 8.90575192801290e+00,\n                                                8.90574810212807e+00, 8.90574776390022e+00, 8.90574113111286e+00, 8.90569619311745e+00, 8.90553099801211e+00,\n                                                8.90509066172002e+00, 8.90412706352910e+00, 8.90228191447227e+00, 8.89907398802708e+00, 8.89389128166972e+00,\n                                                8.88598884675753e+00, 8.87449296716628e+00, 8.85841226385944e+00, 8.83665613153249e+00, 8.80806065589539e+00,\n                                                8.77142180531143e+00, 8.72553524126005e+00, 8.66924156963806e+00, 8.60147530114909e+00, 8.52131526469186e+00,\n                                                8.42803379502818e+00, 8.32114176627294e+00, 8.20042652035676e+00, 8.06597996839804e+00, 7.91821460981114e+00,\n                                                7.75786587447055e+00, 7.58597998781855e+00, 7.40388743242623e+00, 7.21316299262121e+00, 7.01557429063355e+00,\n                                                6.81302160929128e+00, 6.60747256756308e+00, 6.40089575136614e+00, 6.19519757003802e+00, 5.99216631223463e+00,\n                                                5.79342660310952e+00, 5.60040631524051e+00, 5.41431664753915e+00, 5.23614478749036e+00, 5.06665751711073e+00,\n                                                4.90641344282949e+00, 4.75578125999793e+00, 4.61496155453413e+00, 4.48400999323059e+00, 4.36286023878725e+00,\n                                                4.25134543721320e+00, 4.14921758670060e+00, 4.05616446711895e+00, 3.97182407723393e+00, 3.89579670242735e+00,\n                                                3.82765483882166e+00, 3.76695125173094e+00, 3.71322546549052e+00, 3.66600898104042e+00, 3.62482950521326e+00,\n                                                3.58921445569443e+00, 3.55869397979126e+00, 3.53280369393245e+00, 3.51108731431428e+00, 3.49309930761514e+00,\n                                                3.47840764502301e+00, 3.46659669441750e+00, 3.45727023653076e+00, 3.45005454395131e+00, 3.44460141996935e+00,\n                                                3.44059106061117e+00, 3.43773458061702e+00, 3.43577603477355e+00, 3.43449377110151e+00, 3.43370097184740e+00,\n                                                3.43324527061286e+00, 3.43300737659112e+00, 3.43289868611976e+00, 3.43285791342443e+00, 3.43284682234321e+00,\n                                                3.43284518532576e+00, 3.43284503836770e+00, 3.43284213115187e+00, 3.43282243441232e+00, 3.43275002824409e+00,\n                                                3.43255702866283e+00, 3.43213469783758e+00, 3.43132605250005e+00, 3.42992033924976e+00, 3.42764974907342e+00,\n                                                3.42418874299111e+00, 3.41915634625461e+00, 3.41212172709973e+00, 3.40261329381467e+00, 3.39013140846288e+00,\n                                                3.37416461938086e+00, 3.35420905826064e+00, 3.32979034347731e+00, 3.30048700508225e+00, 3.26595413738481e+00,\n                                                3.22594574053723e+00, 3.18033408349098e+00, 3.12912444989867e+00, 3.07246384047933e+00, 3.01064259783487e+00,\n                                                2.94408846061216e+00, 2.87335318505403e+00, 2.79909251918374e+00, 2.72204090118562e+00, 2.64298271116911e+00,\n                                                2.56272218285901e+00, 2.48205414585749e+00, 2.40173760674907e+00, 2.32247379908397e+00, 2.24488977962820e+00,\n                                                2.16952799736173e+00, 2.09684161545869e+00, 2.02719483161420e+00, 1.96086709838502e+00, 1.89806002192609e+00,\n                                                1.83890578905279e+00, 1.78347617484908e+00, 1.73179144036526e+00, 1.68382867910164e+00, 1.63952937383237e+00,\n                                                1.59880606913215e+00, 1.56154815486538e+00, 1.52762680553053e+00, 1.49689914444758e+00, 1.46921171207461e+00,\n                                                1.44440332177729e+00, 1.42230738801715e+00, 1.40275381253704e+00, 1.38557051372557e+00, 1.37058468243650e+00,\n                                                1.35762384358591e+00, 1.34651679647756e+00, 1.33709449787376e+00, 1.32919094040524e+00, 1.32264406527121e+00,\n                                                1.31729673277722e+00, 1.31299775773789e+00, 1.30960299995732e+00, 1.30697648387886e+00, 1.30499150715556e+00,\n                                                1.30353168644319e+00, 1.30249188117052e+00, 1.30177893317953e+00, 1.30131216237977e+00, 1.30102356590952e+00,\n                                                1.30085768024442e+00, 1.30077108128633e+00, 1.30073151540415e+00, 1.30071667318265e+00, 1.30071263576751e+00,\n                                                1.30071203985453e+00, 1.30071198492202e+00, 1.30071088221297e+00, 1.30070341122681e+00, 1.30067594754006e+00,\n                                                1.30060274288050e+00, 1.30044255375785e+00, 1.30013583940776e+00, 1.29960267010171e+00, 1.29874148889371e+00,\n                                                1.29742887034138e+00, 1.29552041461720e+00, 1.29285289953944e+00, 1.28924778081156e+00, 1.28451607718387e+00,\n                                                1.27846459932194e+00, 1.27090337931082e+00, 1.26165403716631e+00, 1.25055869228109e+00, 1.23748890757055e+00,\n                                                1.22235406207683e+00, 1.20510850439877e+00, 1.18575686137223e+00, 1.16435697271584e+00, 1.14102009024360e+00,\n                                                1.11590820447257e+00, 1.08922861577770e+00, 1.06122611871309e+00, 1.03217338294961e+00, 1.00236026391444e+00,\n                                                9.72082842162465e-01, 9.41632967071044e-01, 9.11288975134468e-01, 8.81308084802683e-01, 8.51920765099337e-01,\n                                                8.23327163810248e-01, 7.95695490451436e-01, 7.69162100633949e-01, 7.43832933672053e-01, 7.19785916171006e-01,\n                                                6.97073954101938e-01, 6.75728182014112e-01, 6.55761205728354e-01, 6.37170150066083e-01, 6.19939394768409e-01,\n                                                6.04042942506155e-01, 5.89446409350330e-01, 5.76108659934093e-01, 5.63983128517989e-01, 5.53018876044632e-01,\n                                                5.43161435025510e-01, 5.34353491425932e-01, 5.26535447685546e-01, 5.19645905063825e-01, 5.13622097462928e-01,\n                                                5.08400303133271e-01, 5.03916255266546e-01, 5.00105567326230e-01, 4.96904183885462e-01, 4.94248862602944e-01,\n                                                4.92077687707138e-01, 4.90330610028565e-01, 4.88950003381035e-01, 4.87881222208117e-01, 4.87073141211766e-01,\n                                                4.86478654526238e-01, 4.86055110229472e-01, 4.85764655854908e-01, 4.85574472223604e-01, 4.85456876338475e-01,\n                                                4.85389279088594e-01, 4.85353989757371e-01, 4.85337866346939e-01, 4.85331817992304e-01, 4.85330172702007e-01,\n                                                4.85329929860924e-01, 4.85329906718405e-01, 4.85329433947697e-01, 4.85326230867443e-01, 4.85314456169547e-01,\n                                                4.85283070406950e-01, 4.85214389820541e-01, 4.85082882750248e-01, 4.84854267382559e-01, 4.84484969462940e-01,\n                                                4.83921997743778e-01, 4.83103291803189e-01, 4.81958589482815e-01, 4.80410847411136e-01, 4.78378226023025e-01,\n                                                4.75776619078161e-01, 4.72522667265778e-01, 4.68537148378900e-01, 4.63748587346345e-01, 4.58096884833665e-01,\n                                                4.51536731200093e-01, 4.44040561207842e-01, 4.35600819860639e-01, 4.26231352959704e-01, 4.15967804044712e-01,\n                                                4.04866983685167e-01, 3.93005265155892e-01, 3.80476138866086e-01, 3.67387115242735e-01, 3.53856195784417e-01,\n                                                3.40008134584650e-01, 3.25970693182185e-01, 3.11871058774898e-01, 2.97832558569382e-01, 2.83971768030668e-01,\n                                                2.70396081239312e-01, 2.57201787364920e-01, 2.44472676342554e-01, 2.32279176795060e-01, 2.20678008699025e-01,\n                                                2.09712312434931e-01, 1.99412196263481e-01, 1.89795628138754e-01, 1.80869587135433e-01, 1.72631385828666e-01,\n                                                1.65070077831302e-01, 1.58167873451319e-01, 1.51901499478186e-01, 1.46243454540013e-01, 1.41163127472893e-01,\n                                                1.36627761211784e-01, 1.32603257812491e-01, 1.29054830765497e-01, 1.25947518578670e-01, 1.23246578784446e-01,\n                                                1.20917784338246e-01, 1.18927645171553e-01, 1.17243576812015e-01, 1.15834035833842e-01, 1.14668638768407e-01,\n                                                1.13718277273250e-01, 1.12955238098593e-01, 1.12353331965025e-01, 1.11888031149888e-01, 1.11536611639480e-01,\n                                                1.11278292406851e-01, 1.11094361951146e-01, 1.10968280863815e-01, 1.10885748962900e-01, 1.10834726459643e-01,\n                                                1.10805400580475e-01, 1.10790091857311e-01, 1.10783097638446e-01, 1.10780473940409e-01, 1.10779760237975e-01,\n                                                1.10779654897271e-01, 1.10779644470909e-01, 1.10779427407564e-01, 1.10777956780268e-01, 1.10772550730999e-01,\n                                                1.10758141203760e-01, 1.10726611457437e-01, 1.10666247958221e-01, 1.10561337068404e-01, 1.10391938853041e-01,\n                                                1.10133872008063e-01, 1.09758944248611e-01, 1.09235460056368e-01, 1.08529030914937e-01, 1.07603700669031e-01,\n                                                1.06423379509920e-01, 1.04953554289565e-01, 1.03163211586420e-01, 1.01026875852085e-01, 9.85266321767853e-02,\n                                                9.56539770085527e-02, 9.24113262754531e-02, 8.88130139932883e-02, 8.48856390385038e-02, 8.06676639144115e-02,\n                                                7.62082339872450e-02, 7.15652620059899e-02, 6.68029008598126e-02, 6.19885960162492e-02, 5.71899569832510e-02,\n                                                5.24717062960178e-02, 4.78929514214883e-02, 4.35049816673683e-02, 3.93497260099025e-02, 3.54589297832035e-02,\n                                                3.18540308057464e-02, 2.85466499028644e-02, 2.55395647116927e-02, 2.28280124746050e-02, 2.04011662399779e-02,\n                                                1.82436451804762e-02, 1.63369475255877e-02, 1.46607275410702e-02, 1.31938706225299e-02, 1.19153489924884e-02,\n                                                1.08048625338171e-02, 9.84328435055204e-03, 9.01293927779534e-03, 8.29774697548658e-03, 7.68326085868409e-03,\n                                                7.15663128484323e-03, 6.70651726146332e-03, 6.32296632977614e-03, 5.99727783094295e-03, 5.72186082882808e-03,\n                                                5.49009470468320e-03, 5.29619785429247e-03, 5.13510794199590e-03, 5.00237569241335e-03, 4.89407312424817e-03,\n                                                4.80671634915097e-03, 4.73720247829590e-03, 4.68275972770016e-03, 4.64090944187490e-03, 4.60943843512496e-03,\n                                                4.58637978704246e-03, 4.57000002916175e-03, 4.55879055249397e-03, 4.55146107098869e-03, 4.54693310558696e-03,\n                                                4.54433171391599e-03, 4.54297405718762e-03, 4.54235384771096e-03, 4.54212120433795e-03, 4.54205792146922e-03,\n                                                4.54204858110074e-03, 4.54204761760479e-03, 4.54202716468899e-03, 4.54188859545468e-03, 4.54137923361486e-03,\n                                                4.54002171804291e-03, 4.53705212736111e-03, 4.53136998035575e-03, 4.52150422728437e-03, 4.50560021026547e-03,\n                                                4.48143338883256e-03, 4.44645607362304e-03, 4.39788305577338e-03, 4.33282039570315e-03, 4.24843832789179e-03,\n                                                4.14218405207123e-03, 4.01202329386763e-03, 3.85669165910940e-03, 3.67592930962246e-03, 3.47066720127032e-03,\n                                                3.24313206519378e-03, 2.99684212750151e-03, 2.73647686054801e-03, 2.46762088764285e-03, 2.19640184133141e-03,\n                                                1.92906052252795e-03, 1.67150481567546e-03, 1.42890310632993e-03, 1.20536705392738e-03, 1.00375858009727e-03,\n                                                8.25635066362906e-04, 6.71324486077651e-04, 5.40103168304995e-04, 4.30436947567614e-04, 3.40243763005788e-04,\n                                                2.67142046254776e-04, 2.08661441547520e-04, 1.62405605479421e-04, 1.26166474899492e-04, 9.79938277936299e-05,\n                                                7.62252175263711e-05, 5.94829309363831e-05, 4.66478607705767e-05, 3.68228428158091e-05, 2.92966640103032e-05,\n                                                2.35140648072729e-05, 1.90503886301485e-05, 1.55869248175122e-05, 1.28855022296648e-05, 1.07649245819630e-05,\n                                                9.08331243465454e-06, 7.72833710982468e-06, 6.61352991926378e-06, 5.67635645154496e-06, 4.87461494458330e-06,\n                                                4.18080524866582e-06, 3.57633247460853e-06, 3.04733306677463e-06, 2.58257001917173e-06, 2.17277779768210e-06,\n                                                1.81060644877107e-06, 1.49059250986738e-06, 1.20892750032908e-06, 9.63024675115776e-07, 7.50995639009489e-07,\n                                                5.71168328633576e-07, 4.21736800149120e-07, 4.26325641456060e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14, 2.84217094304040e-14, 1.42108547152020e-14, 1.42108547152020e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {8.40000000000000e+01, 8.39999996040501e+01, 8.39999873604928e+01, 8.39999044083540e+01, 8.39995994639682e+01,\n                                                8.39987865669451e+01, 8.39970074235044e+01, 8.39935996221849e+01, 8.39876717766329e+01, 8.39780863904642e+01,\n                                                8.39634509658633e+01, 8.39421176304143e+01, 8.39121913880676e+01, 8.38715470672877e+01, 8.38178551867112e+01,\n                                                8.37486172900017e+01, 8.36612117474348e+01, 8.35529514128850e+01, 8.34211545928796e+01, 8.32632302088537e+01,\n                                                8.30767765468953e+01, 8.28596905230211e+01, 8.26102812196502e+01, 8.23273782466540e+01, 8.20104232358913e+01,\n                                                8.16595325202660e+01, 8.12755214548911e+01, 8.08598858669353e+01, 8.04147428452635e+01, 7.99427398553709e+01,\n                                                7.94469461129345e+01, 7.89307418066983e+01, 7.83977186164356e+01, 7.78515996741716e+01, 7.72961802783003e+01,\n                                                7.67352843507158e+01, 7.61727277088680e+01, 7.56122788573507e+01, 7.50576112168797e+01, 7.45122462603008e+01,\n                                                7.39794926455028e+01, 7.34623896598478e+01, 7.29636627327630e+01, 7.24856950338033e+01, 7.20305144927673e+01,\n                                                7.15997923137233e+01, 7.11948482431819e+01, 7.08166589781627e+01, 7.04658679289824e+01, 7.01427960741277e+01,\n                                                6.98474544597464e+01, 6.95795590823652e+01, 6.93385487145574e+01, 6.91236059302030e+01, 6.89336813013303e+01,\n                                                6.87675205256979e+01, 6.86236941034722e+01, 6.85006290914713e+01, 6.83966424013600e+01, 6.83099750571704e+01,\n                                                6.82388267791780e+01, 6.81813902141697e+01, 6.81358840901951e+01, 6.81005845434675e+01, 6.80738538536179e+01,\n                                                6.80541658379116e+01, 6.80401272006142e+01, 6.80304942133190e+01, 6.80241842157610e+01, 6.80202815715042e+01,\n                                                6.80180378831681e+01, 6.80168664595726e+01, 6.80163312227844e+01, 6.80161304363925e+01, 6.80160758175695e+01,\n                                                6.80160677559437e+01, 6.80160666524208e+01, 6.80160405909470e+01, 6.80158640208920e+01, 6.80152149346628e+01,\n                                                6.80134847395899e+01, 6.80096984047511e+01, 6.80024477134519e+01, 6.79898405549189e+01, 6.79694690102984e+01,\n                                                6.79383987638113e+01, 6.78931820576104e+01, 6.78298959542559e+01, 6.77442070167305e+01, 6.76314626160020e+01,\n                                                6.74868079105342e+01, 6.73053261336966e+01, 6.70821982485643e+01, 6.68128764070709e+01, 6.64932641267575e+01,\n                                                6.61198948032479e+01, 6.56900991957118e+01, 6.52021519139296e+01, 6.46553868140598e+01, 6.40502718651753e+01,\n                                                6.33884359761298e+01, 6.26726439777719e+01, 6.19067214961604e+01, 6.10954379321848e+01, 6.02443611978206e+01,\n                                                5.93596997824529e+01, 5.84481445205934e+01, 5.75167148457190e+01, 5.65726060903491e+01, 5.56230310153961e+01,\n                                                5.46750539519275e+01, 5.37354276449079e+01, 5.28104526421913e+01, 5.19058779171928e+01, 5.10268484965900e+01,\n                                                5.01778902292019e+01, 4.93629140777172e+01, 4.85852253273104e+01, 4.78475316702203e+01, 4.71519514635401e+01,\n                                                4.65000263794620e+01, 4.58927418283111e+01, 4.53305561191787e+01, 4.48134371259838e+01, 4.43409040398914e+01,\n                                                4.39120716184442e+01, 4.35256948342030e+01, 4.31802125852484e+01, 4.28737898675423e+01, 4.26043583721627e+01,\n                                                4.23696558135966e+01, 4.21672644371664e+01, 4.19946491397318e+01, 4.18491955172702e+01, 4.17282479678910e+01,\n                                                4.16291477616755e+01, 4.15492707636888e+01, 4.14860642823490e+01, 4.14370823277246e+01, 4.14000184170541e+01,\n                                                4.13727349699224e+01, 4.13532883027507e+01, 4.13399482677520e+01, 4.13312116867757e+01, 4.13258089016856e+01,\n                                                4.13227029906707e+01, 4.13210814698535e+01, 4.13203405937912e+01, 4.13200626672511e+01, 4.13199870646491e+01,\n                                                4.13199759058691e+01, 4.13199748465933e+01, 4.13199532504767e+01, 4.13198069338764e+01, 4.13192690625746e+01,\n                                                4.13178353258787e+01, 4.13146977840330e+01, 4.13086896131297e+01, 4.12982432213338e+01, 4.12813640869597e+01,\n                                                4.12556225094950e+01, 4.12181652289785e+01, 4.11657485055528e+01, 4.10947937036453e+01, 4.10014656444886e+01,\n                                                4.08817729462140e+01, 4.07316882657784e+01, 4.05472848421194e+01, 4.03248841237571e+01, 4.00612077171159e+01,\n                                                3.97535256404017e+01, 3.93997921727194e+01, 3.89987607035819e+01, 3.85500700968719e+01, 3.80542972089383e+01,\n                                                3.75129731107133e+01, 3.69285637086004e+01, 3.63044180144029e+01, 3.56446884197764e+01, 3.49542265586800e+01,\n                                                3.42384562853568e+01, 3.35032238676464e+01, 3.27546272892273e+01, 3.19988328858346e+01, 3.12418960904812e+01,\n                                                3.04896077566843e+01, 2.97473827164461e+01, 2.90201935741626e+01, 2.83125382002191e+01, 2.76284228232356e+01,\n                                                2.69713464371902e+01, 2.63442817026991e+01, 2.57496559744443e+01, 2.51893397954545e+01, 2.46646492564082e+01,\n                                                2.41763651560605e+01, 2.37247681314602e+01, 2.33096862014775e+01, 2.29305499020385e+01, 2.25864501970284e+01,\n                                                2.22761951820032e+01, 2.19983628043626e+01, 2.17513480566106e+01, 2.15334041488025e+01, 2.13426779403983e+01,\n                                                2.11772404004873e+01, 2.10351131047509e+01, 2.09142918222977e+01, 2.08127681517180e+01, 2.07285499820023e+01,\n                                                2.06596813189589e+01, 2.06042617608124e+01, 2.05604656502877e+01, 2.05265606926558e+01, 2.05009256250257e+01,\n                                                2.04820663644147e+01, 2.04686299611005e+01, 2.04594156464035e+01, 2.04533822929923e+01, 2.04496516985802e+01,\n                                                2.04475072527111e+01, 2.04463877386139e+01, 2.04458762416211e+01, 2.04456843643919e+01, 2.04456321694118e+01,\n                                                2.04456244655522e+01, 2.04456237799637e+01, 2.04456102840768e+01, 2.04455188477255e+01, 2.04451827220439e+01,\n                                                2.04442867652521e+01, 2.04423261423463e+01, 2.04385719150155e+01, 2.04320451596506e+01, 2.04215012268015e+01,\n                                                2.04054257117041e+01, 2.03820436067139e+01, 2.03493429069249e+01, 2.03051135904544e+01, 2.02470023499374e+01,\n                                                2.01725826815274e+01, 2.00794389376044e+01, 1.99652617509646e+01, 1.98279509172326e+01, 1.96657205025625e+01,\n                                                1.94771997953331e+01, 1.92615229487088e+01, 1.90183999843909e+01, 1.87481624439397e+01, 1.84517785098180e+01,\n                                                1.81308348721574e+01, 1.77874858029660e+01, 1.74243734157831e+01, 1.70445263430676e+01, 1.66512463728712e+01,\n                                                1.62479933537017e+01, 1.58382776036780e+01, 1.54255663204289e+01, 1.50132067728064e+01, 1.46043654326901e+01,\n                                                1.42019797948863e+01, 1.38087191772779e+01, 1.34269522804300e+01, 1.30587218359017e+01, 1.27057288496777e+01,\n                                                1.23693294670677e+01, 1.20505459649128e+01, 1.17500905939020e+01, 1.14683983913017e+01, 1.12056638549497e+01,\n                                                1.09618768135968e+01, 1.07368543976743e+01, 1.05302678405456e+01, 1.03416642619280e+01, 1.01704843565509e+01,\n                                                1.00160771175434e+01, 9.87771259040240e+00, 9.75459339304831e+00, 9.64586548686293e+00, 9.55062850072038e+00,\n                                                9.46794580009445e+00, 9.39685443644463e+00, 9.33637508247152e+00, 9.28552203492947e+00, 9.24331333467774e+00,\n                                                9.20878100746157e+00, 9.18098136865063e+00, 9.15900526529329e+00, 9.14198805644490e+00, 9.12911906603424e+00,\n                                                9.11965018970272e+00, 9.11290330515787e+00, 9.10827612975808e+00, 9.10524619189482e+00, 9.10337263399366e+00,\n                                                9.10229564149475e+00, 9.10173338836049e+00, 9.10147649802478e+00, 9.10138013084726e+00, 9.10135391675699e+00,\n                                                9.10135004761651e+00, 9.10134970556460e+00, 9.10134299778657e+00, 9.10129755171896e+00, 9.10113048889812e+00,\n                                                9.10068517405222e+00, 9.09971068087467e+00, 9.09784466836963e+00, 9.09460046573068e+00, 9.08935914233790e+00,\n                                                9.08136730796028e+00, 9.06974133077266e+00, 9.05347855717341e+00, 9.03147594609517e+00, 9.00255627282309e+00,\n                                                8.96550170243079e+00, 8.91909408323545e+00, 8.86216078637325e+00, 8.79362435891882e+00, 8.71255372336279e+00,\n                                                8.61821421558710e+00, 8.51011347650525e+00, 8.38804015504851e+00, 8.25209257201131e+00, 8.10269493411467e+00,\n                                                7.94059934730508e+00, 7.76687271434892e+00, 7.58286856735236e+00, 7.39018493351308e+00, 7.19061040394875e+00,\n                                                6.98606158431265e+00, 6.77851592772646e+00, 6.56994443669447e+00, 6.36224873832607e+00, 6.15720652218975e+00,\n                                                5.95642832673325e+00, 5.76132732581146e+00, 5.57310233519921e+00, 5.39273297586602e+00, 5.22098498831792e+00,\n                                                5.05842318566410e+00, 4.90542945233533e+00, 4.76222344884411e+00, 4.62888413785636e+00, 4.50537077076115e+00,\n                                                4.39154246455774e+00, 4.28717589674912e+00, 4.19198093215856e+00, 4.10561418026712e+00, 4.02769058952175e+00,\n                                                3.95779324321768e+00, 3.89548155199373e+00, 3.84029805472777e+00, 3.79177404935979e+00, 3.74943427951125e+00,\n                                                3.71280090075733e+00, 3.68139694044028e+00, 3.65474944586488e+00, 3.63239248740310e+00, 3.61387014623756e+00,\n                                                3.59873957283497e+00, 3.58657415409057e+00, 3.57696677729091e+00, 3.56953313085714e+00, 3.56391493869745e+00,\n                                                3.55978299029120e+00, 3.55683980533510e+00, 3.55482176215388e+00, 3.55350052429411e+00, 3.55268361966436e+00,\n                                                3.55221405975711e+00, 3.55196893012176e+00, 3.55185693360741e+00, 3.55181492069615e+00, 3.55180349224564e+00,\n                                                3.55180180543319e+00, 3.55180165400493e+00, 3.55179865835694e+00, 3.55177836247658e+00, 3.55170375380375e+00,\n                                                3.55150488315731e+00, 3.55106970366691e+00, 3.55023645166764e+00, 3.54878794745605e+00, 3.54644819638889e+00,\n                                                3.54288166926929e+00, 3.53769562525441e+00, 3.53044579781989e+00, 3.52064568079035e+00, 3.50777951474657e+00,\n                                                3.49131887656714e+00, 3.47074251689926e+00, 3.44555878368642e+00, 3.41532963937527e+00, 3.37969496277570e+00,\n                                                3.33839557093113e+00, 3.29129325188784e+00, 3.23838611001968e+00, 3.17981772005672e+00, 3.11587896926686e+00,\n                                                3.04700201715936e+00, 2.97374647001351e+00, 2.89677858320150e+00, 2.81684498242281e+00, 2.73474294313047e+00,\n                                                2.65128959621860e+00, 2.56729246714053e+00, 2.48352347598120e+00, 2.40069796135323e+00, 2.31945954469909e+00,\n                                                2.24037087659228e+00, 2.16390965992809e+00, 2.09046893577326e+00, 2.02036047588396e+00, 1.95382020484175e+00,\n                                                1.89101478363537e+00, 1.83204873158182e+00, 1.77697167789302e+00, 1.72578548796849e+00, 1.67845110293574e+00,\n                                                1.63489498081188e+00, 1.59501505416914e+00, 1.55868613820378e+00, 1.52576474343758e+00, 1.49609327150898e+00,\n                                                1.46950359931142e+00, 1.44582008315466e+00, 1.42486203771139e+00, 1.40644576215149e+00, 1.39038619699697e+00,\n                                                1.37649829968986e+00, 1.36459822510804e+00, 1.35450439008201e+00, 1.34603848929177e+00, 1.33902651473473e+00,\n                                                1.33329981324857e+00, 1.32869619738189e+00, 1.32506110534216e+00, 1.32224878700021e+00, 1.32012347624337e+00,\n                                                1.31856049657105e+00, 1.31744723781995e+00, 1.31668393812886e+00, 1.31618420715502e+00, 1.31587523409388e+00,\n                                                1.31569763667210e+00, 1.31560492392222e+00, 1.31556256478089e+00, 1.31554667474104e+00, 1.31554235229669e+00,\n                                                1.31554171431411e+00, 1.31554165550349e+00, 1.31554047494660e+00, 1.31553247653270e+00, 1.31550307400676e+00,\n                                                1.31542470142934e+00, 1.31525320404607e+00, 1.31492483915999e+00, 1.31435403859247e+00, 1.31343208682219e+00,\n                                                1.31202686978627e+00, 1.30998384425799e+00, 1.30712836110308e+00, 1.30326944153830e+00, 1.29820504837963e+00,\n                                                1.29172881082881e+00, 1.28363805185944e+00, 1.27374283699896e+00, 1.26187562342153e+00, 1.24790095567620e+00,\n                                                1.23172455020567e+00, 1.21330105737285e+00, 1.19263980626894e+00, 1.16980793570241e+00, 1.14493049440230e+00,\n                                                1.11818734083649e+00, 1.08980696125731e+00, 1.06005761711624e+00, 1.02923648949945e+00, 9.97657671692622e-01,\n                                                9.65639944587210e-01, 9.33495242171901e-01, 9.01518582629123e-01, 8.69980028273631e-01, 8.39118980548562e-01,\n                                                8.09140855117548e-01, 7.80215953948940e-01, 7.52480183116830e-01, 7.26037169671812e-01, 7.00961306889141e-01,\n                                                6.77301291728043e-01, 6.55083792262644e-01, 6.34316975721347e-01, 6.14993721932208e-01, 5.97094429896586e-01,\n                                                5.80589390105246e-01, 5.65440740266894e-01, 5.51604049086194e-01, 5.39029585310431e-01, 5.27663331767016e-01,\n                                                5.17447800507981e-01, 5.08322698595691e-01, 5.00225486636538e-01, 4.93091865122025e-01, 4.86856217466993e-01,\n                                                4.81452033366551e-01, 4.76812331472189e-01, 4.72870096067396e-01, 4.69558738073530e-01, 4.66812586110180e-01,\n                                                4.64567408379111e-01, 4.62760960897882e-01, 4.61333552279314e-01, 4.60228610152996e-01, 4.59393229846356e-01,\n                                                4.58778682501460e-01, 4.58340857784734e-01, 4.58040616049033e-01, 4.57844026388301e-01, 4.57722470481286e-01,\n                                                4.57652597253741e-01, 4.57616119843209e-01, 4.57599453632042e-01, 4.57593201661027e-01, 4.57591500982758e-01,\n                                                4.57591249966541e-01, 4.57591226044983e-01, 4.57590737358700e-01, 4.57587426448740e-01, 4.57575255367956e-01,\n                                                4.57542813074255e-01, 4.57471820702125e-01, 4.57335887844167e-01, 4.57099580871912e-01, 4.56717864369892e-01,\n                                                4.56135976062100e-01, 4.55289792548498e-01, 4.54106735674571e-01, 4.52507255180223e-01, 4.50406900454396e-01,\n                                                4.47718961636269e-01, 4.44357618311912e-01, 4.40241485072619e-01, 4.35297391983781e-01, 4.29464191487995e-01,\n                                                4.22696349658082e-01, 4.14967067038489e-01, 4.06270688396674e-01, 3.96624203303048e-01, 3.86067707057464e-01,\n                                                3.74663775442443e-01, 3.62495794973000e-01, 3.49665369935821e-01, 3.36288988257976e-01, 3.22494164641228e-01,\n                                                3.08415291544094e-01, 2.94189421036407e-01, 2.79952179931300e-01, 2.65833993060141e-01, 2.51956759025859e-01,\n                                                2.38431090614853e-01, 2.25354197973189e-01, 2.12808456158783e-01, 2.00860660318824e-01, 1.89561933577551e-01,\n                                                1.78948218003157e-01, 1.69041251253944e-01, 1.59849913444035e-01, 1.51371821713767e-01, 1.43595053556894e-01,\n                                                1.36499892340609e-01, 1.30060506955758e-01, 1.24246499202158e-01, 1.19024274641617e-01, 1.14358213136242e-01,\n                                                1.10211632747408e-01, 1.06547554420516e-01, 1.03329284816894e-01, 1.00520841063243e-01, 9.80872445819472e-02,\n                                                9.59947121316702e-02, 9.42107712953941e-02, 9.27043253900166e-02, 9.14456895419704e-02, 9.04066157793011e-02,\n                                                8.95603206860756e-02, 8.88815246529049e-02, 8.83465072402743e-02, 8.79331788517703e-02, 8.76211650083434e-02,\n                                                8.73918962430764e-02, 8.72286942008742e-02, 8.71168430929288e-02, 8.70436353157373e-02, 8.69983808008215e-02,\n                                                8.69723714212114e-02, 8.69587943485328e-02, 8.69525913667388e-02, 8.69502644941917e-02, 8.69496315359868e-02,\n                                                8.69495381129610e-02, 8.69495288661994e-02, 8.69493363602771e-02, 8.69480321136393e-02, 8.69432377022008e-02,\n                                                8.69304586159814e-02, 8.69024972480759e-02, 8.68489683784048e-02, 8.67559453326123e-02, 8.66057673568434e-02,\n                                                8.63770409212492e-02, 8.60448684634889e-02, 8.55813360083033e-02, 8.49562845077259e-02, 8.41383771556821e-02,\n                                                8.30964553902760e-02, 8.18011498039510e-02, 8.02266800966436e-02, 7.83527435011564e-02, 7.61663583684822e-02,\n                                                7.36635046403507e-02, 7.08503919758954e-02, 6.77441947573953e-02, 6.43731242976457e-02, 6.07757620403504e-02,\n                                                5.69996488751201e-02, 5.30992061890174e-02, 4.91331422191195e-02, 4.51615599611159e-02, 4.12430193002535e-02,\n                                                3.74318093618342e-02, 3.37756564629501e-02, 3.03140339315746e-02, 2.70771630144537e-02, 2.40857123919369e-02,\n                                                2.13511304550309e-02, 1.88764895097080e-02, 1.66576898098469e-02, 1.46848641250159e-02, 1.29438366109582e-02,\n                                                1.14175167844195e-02, 1.00871434105443e-02, 8.93332782618472e-03, 7.93687695714596e-03, 7.07940028300413e-03,\n                                                6.34372133607997e-03, 5.71412352394418e-03, 5.17646352700751e-03, 4.71818487750397e-03, 4.32826106037965e-03,\n                                                3.99709278815408e-03, 3.71637893096022e-03, 3.47897565366395e-03, 3.27875407458578e-03, 3.11046340024745e-03,\n                                                2.96960394604184e-03, 2.85231257386442e-03, 2.75526171027707e-03, 2.67557215050829e-03, 2.61073922446542e-03,\n                                                2.55857152515659e-03, 2.51714118728330e-03, 2.48474457644932e-03, 2.45987215130583e-03, 2.44118616888045e-03,\n                                                2.42750481531573e-03, 2.41779127706820e-03, 2.41114624245142e-03, 2.40680235334878e-03, 2.40411923151385e-03,\n                                                2.40257787882570e-03, 2.40177349476767e-03, 2.40140604289252e-03, 2.40126821158526e-03, 2.40123071931464e-03,\n                                                2.40122518556518e-03, 2.40122461477199e-03, 2.40121249781566e-03, 2.40113040507595e-03, 2.40082864578994e-03,\n                                                2.40002443790388e-03, 2.39826531881704e-03, 2.39489972751983e-03, 2.38905734960326e-03, 2.37964241050292e-03,\n                                                2.36534366139551e-03, 2.34466510282516e-03, 2.31598123527021e-03, 2.27761948758598e-03, 2.22797017477205e-03,\n                                                2.16562074822946e-03, 2.08950637747307e-03, 1.99906359961233e-03, 1.89436888305750e-03, 1.77624082937200e-03,\n                                                1.64628481749673e-03, 1.50686327779681e-03, 1.36098371116589e-03, 1.21210904327995e-03, 1.06390861957095e-03,\n                                                9.19979905575019e-04, 7.83577581799477e-04, 6.57386133113391e-04, 5.43364129725887e-04, 4.42675198826237e-04,\n                                                3.55705649198512e-04, 2.82155439904841e-04, 2.21180195993043e-04, 1.71558158726270e-04, 1.31856880244641e-04,\n                                                1.00579172212178e-04, 7.62752401044509e-05, 5.76166788164301e-05, 4.34362422510048e-05, 3.27428294752963e-05,\n                                                2.47211330304253e-05, 1.87210806785743e-05, 1.42432463974274e-05, 1.09265617851406e-05, 8.51461854267654e-06,\n                                                6.76773655072793e-06, 5.40782826874420e-06, 4.20900941833224e-06, 3.09848270774182e-06, 2.13015347583223e-06,\n                                                1.39051962833037e-06, 9.07606164446406e-07, 6.30550260893870e-07, 5.23893803006104e-07, 5.12091759219402e-07,\n                                                4.91763131549305e-07, 4.43682438344695e-07, 4.26325641456060e-14, 4.26325641456060e-14, 2.84217094304040e-14,\n                                                4.26325641456060e-14, 4.26325641456060e-14, 2.84217094304040e-14, 2.84217094304040e-14, 4.26325641456060e-14,\n                                                4.26325641456060e-14, 4.26325641456060e-14, 4.26325641456060e-14, 2.84217094304040e-14, 4.26325641456060e-14,\n                                                2.84217094304040e-14, 2.84217094304040e-14, 4.26325641456060e-14, 4.26325641456060e-14, 4.26325641456060e-14,\n                                                4.26325641456060e-14}),\nmadness::CubicInterpolationTable<double>(grid, {8.50000000000000e+01, 8.49999995974318e+01, 8.49999871492241e+01, 8.49999028105437e+01, 8.49995927690112e+01,\n                                                8.49987662843042e+01, 8.49969574017020e+01, 8.49934926354447e+01, 8.49874656934850e+01, 8.49777200508858e+01,\n                                                8.49628399013076e+01, 8.49411497656572e+01, 8.49107228679887e+01, 8.48693983599406e+01, 8.48148076317340e+01,\n                                                8.47444102932823e+01, 8.46555408700423e+01, 8.45454676583647e+01, 8.44114652453680e+01, 8.42509015875105e+01,\n                                                8.40613389860045e+01, 8.38406457325044e+01, 8.35871119185262e+01, 8.32995596181197e+01, 8.29774353946751e+01,\n                                                8.26208729100933e+01, 8.22307160097768e+01, 8.18084979426999e+01, 8.13563793539305e+01, 8.08770546253746e+01,\n                                                8.03736410936332e+01, 7.98495671558174e+01, 7.93084728117042e+01, 7.87541305238547e+01, 7.81903871326026e+01,\n                                                7.76211211062320e+01, 7.70502055884830e+01, 7.64814676798669e+01, 7.59186381015868e+01, 7.53652914147744e+01,\n                                                7.48247827956036e+01, 7.43001903789882e+01, 7.37942710706953e+01, 7.33094334040110e+01, 7.28477260540154e+01,\n                                                7.24108374767013e+01, 7.20001016798273e+01, 7.16165065895518e+01, 7.12607034724948e+01, 7.09330173987152e+01,\n                                                7.06334594635938e+01, 7.03617415780659e+01, 7.01172943893561e+01, 6.98992885561552e+01, 6.97066593074406e+01,\n                                                6.95381340050807e+01, 6.93922622985147e+01, 6.92674483790164e+01, 6.91619847860130e+01, 6.90740871714133e+01,\n                                                6.90019293818096e+01, 6.89436781720790e+01, 6.88975268216268e+01, 6.88617268933241e+01, 6.88346173629333e+01,\n                                                6.88146503607262e+01, 6.88004128125507e+01, 6.87906433478012e+01, 6.87842439566583e+01, 6.87802860255946e+01,\n                                                6.87780105526945e+01, 6.87768225346516e+01, 6.87762797157141e+01, 6.87760760849949e+01, 6.87760206924457e+01,\n                                                6.87760125166194e+01, 6.87760113974642e+01, 6.87759849668055e+01, 6.87758058954746e+01, 6.87751476143718e+01,\n                                                6.87733929097671e+01, 6.87695529395898e+01, 6.87621995423620e+01, 6.87494138154338e+01, 6.87287537591395e+01,\n                                                6.86972435572155e+01, 6.86513867483956e+01, 6.85872050844779e+01, 6.85003042084363e+01, 6.83859663749041e+01,\n                                                6.82392692538902e+01, 6.80552284286046e+01, 6.78289595930412e+01, 6.75558547944592e+01, 6.72317654935986e+01,\n                                                6.68531838630457e+01, 6.64174127071765e+01, 6.59227137461163e+01, 6.53684239109570e+01, 6.47550300725444e+01,\n                                                6.40841947775344e+01, 6.33587295535493e+01, 6.25825181138376e+01, 6.17603982880636e+01, 6.08980166189762e+01,\n                                                6.00016708361968e+01, 5.90781514691218e+01, 5.81345858975119e+01, 5.71782804276930e+01, 5.62165541712916e+01,\n                                                5.52565656434997e+01, 5.43051455303356e+01, 5.33686573499162e+01, 5.24529034369794e+01, 5.15630783842247e+01,\n                                                5.07037567319038e+01, 4.98788963444160e+01, 4.90918442647409e+01, 4.83453412016319e+01, 4.76415275303899e+01,\n                                                4.69819555218892e+01, 4.63676108493203e+01, 4.57989436654498e+01, 4.52759073787618e+01, 4.47980022778388e+01,\n                                                4.43643212137062e+01, 4.39735952190364e+01, 4.36242378052285e+01, 4.33143874553114e+01, 4.30419483911758e+01,\n                                                4.28046300132561e+01, 4.25999855229846e+01, 4.24254501973111e+01, 4.22783796431962e+01, 4.21560881608190e+01,\n                                                4.20558871185552e+01, 4.19751230131619e+01, 4.19112146723491e+01, 4.18616888686210e+01, 4.18242134660763e+01,\n                                                4.17966271275690e+01, 4.17769645778365e+01, 4.17634764551011e+01, 4.17546428908268e+01, 4.17491801309177e+01,\n                                                4.17460397422434e+01, 4.17444002215331e+01, 4.17436511212970e+01, 4.17433701096058e+01, 4.17432936677698e+01,\n                                                4.17432823851207e+01, 4.17432813140863e+01, 4.17432594782400e+01, 4.17431115374389e+01, 4.17425676954501e+01,\n                                                4.17411180434566e+01, 4.17379456732059e+01, 4.17318708087665e+01, 4.17213084583095e+01, 4.17042419627394e+01,\n                                                4.16782146567379e+01, 4.16403416192612e+01, 4.15873431223365e+01, 4.15156008325311e+01, 4.14212370285557e+01,\n                                                4.13002160407314e+01, 4.11484657976741e+01, 4.09620158354797e+01, 4.07371464974076e+01, 4.04705425034191e+01,\n                                                4.01594428304926e+01, 3.98017781798288e+01, 3.93962874656235e+01, 3.89426059075860e+01, 3.84413194352378e+01,\n                                                3.78939829366519e+01, 3.73031028142337e+01, 3.66720865209148e+01, 3.60051624815672e+01, 3.53072728805716e+01,\n                                                3.45839401782273e+01, 3.38411080824518e+01, 3.30849613777329e+01, 3.23217367001286e+01, 3.15575441887953e+01,\n                                                3.07982213692633e+01, 3.00492317747983e+01, 2.93156054488042e+01, 2.86019060181423e+01, 2.79122066342454e+01,\n                                                2.72500640963590e+01, 2.66184905432781e+01, 2.60199291144340e+01, 2.54562416659455e+01, 2.49287141569164e+01,\n                                                2.44380811604950e+01, 2.39845671607355e+01, 2.35679399150058e+01, 2.31875703539842e+01, 2.28424939119956e+01,\n                                                2.25314693181676e+01, 2.22530322683350e+01, 2.20055427108095e+01, 2.17872255359819e+01, 2.15962051979261e+01,\n                                                2.14305352295556e+01, 2.12882237939087e+01, 2.11672564071974e+01, 2.10656168347401e+01, 2.09813069482563e+01,\n                                                2.09123660795496e+01, 2.08568901385464e+01, 2.08130505031555e+01, 2.07791124503303e+01, 2.07534526954624e+01,\n                                                2.07345754523758e+01, 2.07211263282197e+01, 2.07119033329692e+01, 2.07058643144725e+01, 2.07021302245555e+01,\n                                                2.06999837719169e+01, 2.06988632109149e+01, 2.06983512357672e+01, 2.06981591791955e+01, 2.06981069354327e+01,\n                                                2.06980992243729e+01, 2.06980985381437e+01, 2.06980850296435e+01, 2.06979935078370e+01, 2.06976570680461e+01,\n                                                2.06967602742041e+01, 2.06947978207023e+01, 2.06910400924059e+01, 2.06845072639196e+01, 2.06739535554620e+01,\n                                                2.06578632195042e+01, 2.06344597332050e+01, 2.06017294701102e+01, 2.05574607701295e+01, 2.04992987736991e+01,\n                                                2.04248156037363e+01, 2.03315944636242e+01, 2.02173250049079e+01, 2.00799059849044e+01, 1.99175499128106e+01,\n                                                1.97288832515205e+01, 1.95130350145954e+01, 1.92697064970480e+01, 1.89992155987943e+01, 1.87025108521448e+01,\n                                                1.83811528171837e+01, 1.80372637315923e+01, 1.76734497461095e+01, 1.72927031168934e+01, 1.68982936786587e+01,\n                                                1.64936592430335e+01, 1.60823030681811e+01, 1.56677035591701e+01, 1.52532377409083e+01, 1.48421169754592e+01,\n                                                1.44373319650238e+01, 1.40416047924404e+01, 1.36573481393777e+01, 1.32866344992702e+01, 1.29311794742450e+01,\n                                                1.25923421079337e+01, 1.22711420565838e+01, 1.19682898397665e+01, 1.16842241866449e+01, 1.14191504150912e+01,\n                                                1.11730754348849e+01, 1.09458372645354e+01, 1.07371289042292e+01, 1.05465175483874e+01, 1.03734604811451e+01,\n                                                1.02173188569873e+01, 1.00773702260845e+01, 9.95282032313651e+00, 9.84281439243783e+00, 9.74644818426350e+00,\n                                                9.66277870292944e+00, 9.59083477856846e+00, 9.52962754090682e+00, 9.47816087239964e+00, 9.43544189862007e+00,\n                                                9.40049153277180e+00, 9.37235503147460e+00, 9.35011244710444e+00, 9.33288878648065e+00, 9.31986361572667e+00,\n                                                9.31027979538536e+00, 9.30345099569176e+00, 9.29876763454114e+00, 9.29570090274454e+00, 9.29380459230299e+00,\n                                                9.29271452041343e+00, 9.29214543896694e+00, 9.29188542878950e+00, 9.29178789126306e+00, 9.29176135881056e+00,\n                                                9.29175744268049e+00, 9.29175709647453e+00, 9.29175030723249e+00, 9.29170430923553e+00, 9.29153521748101e+00,\n                                                9.29108449437366e+00, 9.29009816601246e+00, 9.28820949026385e+00, 9.28492588405260e+00, 9.27962089558562e+00,\n                                                9.27153197535762e+00, 9.25976474185832e+00, 9.24330433368921e+00, 9.22103426772729e+00, 9.19176296422030e+00,\n                                                9.15425774317943e+00, 9.10728564401265e+00, 9.04965989124865e+00, 8.98029026218002e+00, 8.89823506403393e+00,\n                                                8.80275196741957e+00, 8.69334463935022e+00, 8.56980203226477e+00, 8.43222735279173e+00, 8.28105416632499e+00,\n                                                8.11704777661760e+00, 7.94129092059950e+00, 7.75515389048935e+00, 7.56025037418225e+00, 7.35838149973461e+00,\n                                                7.15147165241615e+00, 6.94150044301203e+00, 6.73043558065396e+00, 6.52017122596733e+00, 6.31247565189722e+00,\n                                                6.10895082552365e+00, 5.91100505874888e+00, 5.71983842702893e+00, 5.53643947093509e+00, 5.36159093779975e+00,\n                                                5.19588203536910e+00, 5.03972479211208e+00, 4.89337251440648e+00, 4.75693884372886e+00, 4.63041641560127e+00,\n                                                4.51369452431041e+00, 4.40657547494025e+00, 4.30878947011490e+00, 4.22000796767740e+00, 4.13985549474322e+00,\n                                                4.06791994105623e+00, 4.00376139442416e+00, 3.94691962534809e+00, 3.89692037183913e+00, 3.85328061174805e+00,\n                                                3.81551303290144e+00, 3.78312991785357e+00, 3.75564664977482e+00, 3.73258502059534e+00, 3.71347648487377e+00,\n                                                3.69786545638549e+00, 3.68531269273862e+00, 3.67539876009162e+00, 3.66772751893626e+00, 3.66192952653444e+00,\n                                                3.65766521535767e+00, 3.65462768271695e+00, 3.65254491686824e+00, 3.65118129033515e+00, 3.65033817180503e+00,\n                                                3.64985354213795e+00, 3.64960054491266e+00, 3.64948495367321e+00, 3.64944159226320e+00, 3.64942979698901e+00,\n                                                3.64942805603415e+00, 3.64942789974540e+00, 3.64942480794470e+00, 3.64940386061639e+00, 3.64932685716589e+00,\n                                                3.64912160302815e+00, 3.64867245396483e+00, 3.64781245063807e+00, 3.64631743214125e+00, 3.64390251907727e+00,\n                                                3.64022135441346e+00, 3.63486847352550e+00, 3.62738513057370e+00, 3.61726882258759e+00, 3.60398661277857e+00,\n                                                3.58699215269188e+00, 3.56574603896892e+00, 3.53973882608324e+00, 3.50851567606988e+00, 3.47170129784134e+00,\n                                                3.42902356040608e+00, 3.38033400891037e+00, 3.32562351873790e+00, 3.26503152618952e+00, 3.19884768689288e+00,\n                                                3.12750541708321e+00, 3.05156751542141e+00, 2.97170485613515e+00, 2.88866987120076e+00, 2.80326707077913e+00,\n                                                2.71632307420890e+00, 2.62865847893691e+00, 2.54106340708006e+00, 2.45427785524161e+00, 2.36897720890629e+00,\n                                                2.28576264353990e+00, 2.20515573345439e+00, 2.12759644640006e+00, 2.05344375569310e+00, 1.98297825336479e+00,\n                                                1.91640630663009e+00, 1.85386541216774e+00, 1.79543045578373e+00, 1.74112059502492e+00, 1.69090647584837e+00,\n                                                1.64471749466892e+00, 1.60244883682645e+00, 1.56396806384986e+00, 1.52912107945588e+00, 1.49773736925528e+00,\n                                                1.46963447293359e+00, 1.44462170355669e+00, 1.42250317268744e+00, 1.40308021077598e+00, 1.38615329024940e+00,\n                                                1.37152356542529e+00, 1.35899414081962e+00, 1.34837116964825e+00, 1.33946486917164e+00, 1.33209052057188e+00,\n                                                1.32606949963196e+00, 1.32123036183602e+00, 1.31740998282193e+00, 1.31445473362997e+00, 1.31222165117534e+00,\n                                                1.31057954908789e+00, 1.30941000364361e+00, 1.30860814482473e+00, 1.30808318405590e+00, 1.30775861781215e+00,\n                                                1.30757205947330e+00, 1.30747466936556e+00, 1.30743017334017e+00, 1.30741348172006e+00, 1.30740894123009e+00,\n                                                1.30740827106456e+00, 1.30740820928727e+00, 1.30740696917741e+00, 1.30739856728674e+00, 1.30736768158808e+00,\n                                                1.30728535580496e+00, 1.30710520889792e+00, 1.30676028668708e+00, 1.30616071640529e+00, 1.30519232848826e+00,\n                                                1.30371641177777e+00, 1.30157076375291e+00, 1.29857218030652e+00, 1.29452049332761e+00, 1.28920420299032e+00,\n                                                1.28240766144037e+00, 1.27391964564694e+00, 1.26354301513564e+00, 1.25110499716732e+00, 1.23646749610370e+00,\n                                                1.21953670850763e+00, 1.20027126597076e+00, 1.17868814588469e+00, 1.15486570038631e+00, 1.12894335661760e+00,\n                                                1.10111782245561e+00, 1.07163596025430e+00, 1.04078482376092e+00, 1.00887964153651e+00, 9.76250728826997e-01,\n                                                9.43230386799954e-01, 9.10140791694090e-01, 8.77283698635438e-01, 8.44932518927394e-01, 8.13327022773791e-01,\n                                                7.82670622267901e-01, 7.53129945225936e-01, 7.24836246679942e-01, 6.97888130305486e-01, 6.72355058235652e-01,\n                                                6.48281194171844e-01, 6.25689225955909e-01, 6.04583925546876e-01, 5.84955307887824e-01, 5.66781334006336e-01,\n                                                5.50030163446820e-01, 5.34661997732528e-01, 5.20630574207772e-01, 5.07884373796642e-01, 4.96367602244732e-01,\n                                                4.86020996584486e-01, 4.76782499857620e-01, 4.68587839246510e-01, 4.61371036404287e-01, 4.55064873938582e-01,\n                                                4.49601338304007e-01, 4.44912056260449e-01, 4.40928739024187e-01, 4.37583644863167e-01, 4.34810066918317e-01,\n                                                4.32542848400004e-01, 4.30718922129373e-01, 4.29277865926750e-01, 4.28162459985131e-01, 4.27319227552388e-01,\n                                                4.26698936458919e-01, 4.26257036692348e-01, 4.25954008668427e-01, 4.25755598255463e-01, 4.25632917975292e-01,\n                                                4.25562398929941e-01, 4.25525584514091e-01, 4.25508764361197e-01, 4.25502454647543e-01, 4.25500738262514e-01,\n                                                4.25500484928051e-01, 4.25500460785528e-01, 4.25499967585964e-01, 4.25496626098578e-01, 4.25484342620493e-01,\n                                                4.25451600783276e-01, 4.25379953204498e-01, 4.25242766839162e-01, 4.25004284050601e-01, 4.24619061714708e-01,\n                                                4.24031850239544e-01, 4.23177971550132e-01, 4.21984247712970e-01, 4.20370517647768e-01, 4.18251756270308e-01,\n                                                4.15540777268177e-01, 4.12151457875083e-01, 4.08002373896892e-01, 4.03020680646847e-01, 3.97146027315998e-01,\n                                                3.90334256903827e-01, 3.82560629195766e-01, 3.73822316288013e-01, 3.64139960719172e-01, 3.53558152195191e-01,\n                                                3.42144762116476e-01, 3.29989164316729e-01, 3.17199453677148e-01, 3.03898841881846e-01, 2.90221455973040e-01,\n                                                2.76307789555332e-01, 2.62300060913020e-01, 2.48337720827820e-01, 2.34553329034952e-01, 2.21068984328795e-01,\n                                                2.07993450694715e-01, 1.95420071949002e-01, 1.83425512767130e-01, 1.72069308695171e-01, 1.61394156835385e-01,\n                                                1.51426837418413e-01, 1.42179628285035e-01, 1.33652061215685e-01, 1.25832870606146e-01, 1.18701998768927e-01,\n                                                1.12232544509581e-01, 1.06392568571806e-01, 1.01146697399855e-01, 9.64574925618109e-02, 9.22865752341835e-02,\n                                                8.85955124426658e-02, 8.53464841467684e-02, 8.25027581615956e-02, 8.00290040482707e-02, 7.78914783044229e-02,\n                                                7.60581122346480e-02, 7.44985314485405e-02, 7.31840325446598e-02, 7.20875385700879e-02, 7.11835505594536e-02,\n                                                7.04481080355492e-02, 6.98587669280641e-02, 6.93945990668396e-02, 6.90362133633613e-02, 6.87657951695968e-02,\n                                                6.85671572700102e-02, 6.84257936900821e-02, 6.83289261390314e-02, 6.82655325331041e-02, 6.82263476778218e-02,\n                                                6.82038277431758e-02, 6.81920724732947e-02, 6.81867018878108e-02, 6.81846872757603e-02, 6.81841392599694e-02,\n                                                6.81840583742712e-02, 6.81840503684015e-02, 6.81838836967046e-02, 6.81827544805742e-02, 6.81786034971168e-02,\n                                                6.81675395328796e-02, 6.81433315618847e-02, 6.80969904910711e-02, 6.80164658150346e-02, 6.78864850902841e-02,\n                                                6.76885665420315e-02, 6.74012361830023e-02, 6.70004790563041e-02, 6.64604479739950e-02, 6.57544409354642e-02,\n                                                6.48561393305158e-02, 6.37410731185497e-02, 6.23882478780615e-02, 6.07818350797800e-02, 5.89127959389941e-02,\n                                                5.67802867560800e-02, 5.43926860530064e-02, 5.17680963095160e-02, 4.89342084006950e-02, 4.59274737707318e-02,\n                                                4.27916022477888e-02, 3.95754823246932e-02, 3.63306931299263e-02, 3.31088304392608e-02, 2.99588928737364e-02,\n                                                2.69249640596740e-02, 2.40443837161308e-02, 2.13465333865202e-02, 1.88522832174698e-02, 1.65740686204856e-02,\n                                                1.45165019506805e-02, 1.26773825211615e-02, 1.10489511288563e-02, 9.61924067331665e-03, 8.37339679127069e-03,\n                                                7.29487454502475e-03, 6.36645216704324e-03, 5.57103517591884e-03, 4.89225031067519e-03, 4.31484712191832e-03,\n                                                3.82493582226573e-03, 3.41009438362505e-03, 3.05937763322106e-03, 2.76325794332877e-03, 2.51352238021241e-03,\n                                                2.30314586116265e-03, 2.12615470157118e-03, 1.97749045480577e-03, 1.85288043184073e-03, 1.74871873217342e-03,\n                                                1.66195982072281e-03, 1.59002540833342e-03, 1.53072448478042e-03, 1.48218575122883e-03, 1.44280137095620e-03,\n                                                1.41118084628999e-03, 1.38611384939225e-03, 1.36654089715194e-03, 1.35153081085093e-03, 1.34026392024111e-03,\n                                                1.33201996588639e-03, 1.32616964589261e-03, 1.32216876005486e-03, 1.31955394344629e-03, 1.31793905995892e-03,\n                                                1.31701144940166e-03, 1.31652738124899e-03, 1.31630625860168e-03, 1.31622331629444e-03, 1.31620075475780e-03,\n                                                1.31619742477085e-03, 1.31619708126607e-03, 1.31618978983283e-03, 1.31614039027284e-03, 1.31595880716873e-03,\n                                                1.31547488754791e-03, 1.31441642091090e-03, 1.31239154991647e-03, 1.30887721684303e-03, 1.30321569206160e-03,\n                                                1.29462160820992e-03, 1.28220211892938e-03, 1.26499261229185e-03, 1.24200961296594e-03, 1.21232091484558e-03,\n                                                1.17513052072127e-03, 1.12987276375520e-03, 1.07630646027701e-03, 1.01459683214955e-03, 9.45371196266365e-04,\n                                                8.69735030903485e-04, 7.89238651933033e-04, 7.05791359678187e-04, 6.21528615738498e-04, 5.38646790332109e-04,\n                                                4.59227018126285e-04, 3.85072707999257e-04, 3.17583230796004e-04, 2.57679635623731e-04, 2.05788591202349e-04,\n                                                1.61880478358967e-04, 1.25548996805946e-04, 9.61145080680126e-05, 7.27324338072322e-05, 5.44911797391023e-05,\n                                                4.04902049524480e-05, 2.98955733626372e-05, 2.19740790754486e-05, 1.61086395138454e-05, 1.18010337075702e-05,\n                                                8.66085916584325e-06, 6.37578146722717e-06, 4.75117774101363e-06, 3.88702815712350e-06, 3.77672425599940e-06,\n                                                3.74901607358424e-06, 3.35002070528390e-06, 2.55702462936824e-06, 1.53723139817430e-06, 5.42389201996230e-07,\n                                                7.09255502329142e-07, 7.45455864148425e-07, 5.81819151079799e-07, 5.62554333782828e-07, 6.23449324166359e-07,\n                                                6.00207300749389e-07, 5.11278386738923e-07, 4.10804261719022e-07, 0.00000000000000e+00, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,\n                                                1.42108547152020e-14, 0.00000000000000e+00, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 0.00000000000000e+00, 1.42108547152020e-14, 1.42108547152020e-14, -1.42108547152020e-14,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {8.60000000000000e+01, 8.59999995907854e+01, 8.59999869370578e+01, 8.59999012059445e+01, 8.59995860456077e+01,\n                                                8.59987459154810e+01, 8.59969071673376e+01, 8.59933851940133e+01, 8.59872587342807e+01, 8.59773521534239e+01,\n                                                8.59622262367548e+01, 8.59401777797626e+01, 8.59092480893104e+01, 8.58672404857080e+01, 8.58117470619569e+01,\n                                                8.57401853164674e+01, 8.56498457520796e+01, 8.55379519432551e+01, 8.54017346251957e+01, 8.52385207110759e+01,\n                                                8.50458365162473e+01, 8.48215218027682e+01, 8.45638478683981e+01, 8.42716295388816e+01, 8.39443186526681e+01,\n                                                8.35820665458464e+01, 8.31857458367279e+01, 8.27569273589067e+01, 8.22978153260402e+01, 8.18111509102480e+01,\n                                                8.13000993638926e+01, 8.07681371058784e+01, 8.02189523982685e+01, 7.96563671925143e+01, 7.90842802727005e+01,\n                                                7.85066252413179e+01, 7.79273332004199e+01, 7.73502903324457e+01, 7.67792848292278e+01, 7.62179441228392e+01,\n                                                7.56696693744806e+01, 7.51375769089605e+01, 7.46244545511687e+01, 7.41327359001932e+01, 7.36644903773601e+01,\n                                                7.32214239242839e+01, 7.28048851594389e+01, 7.24158735914470e+01, 7.20550486253600e+01, 7.17227396012823e+01,\n                                                7.14189577389319e+01, 7.11434108541657e+01, 7.08955214000710e+01, 7.06744480162735e+01, 7.04791104692624e+01,\n                                                7.03082176639132e+01, 7.01602982849427e+01, 7.00337335559303e+01, 6.99267915556301e+01, 6.98376624891152e+01,\n                                                6.97644942672395e+01, 6.97054277019837e+01, 6.96586305824509e+01, 6.96223298641719e+01, 6.95948411912345e+01,\n                                                6.95745949840853e+01, 6.95601583713388e+01, 6.95502523246697e+01, 6.95437634719514e+01, 6.95397502122035e+01,\n                                                6.95374429307237e+01, 6.95362383057123e+01, 6.95356878989085e+01, 6.95354814217177e+01, 6.95354252548592e+01,\n                                                6.95354169647465e+01, 6.95354158299471e+01, 6.95353890298254e+01, 6.95352074553335e+01, 6.95345399724300e+01,\n                                                6.95327607398464e+01, 6.95288670940526e+01, 6.95214109141136e+01, 6.95084464863739e+01, 6.94874977073597e+01,\n                                                6.94555472350552e+01, 6.94090498802143e+01, 6.93439720647496e+01, 6.92558585046764e+01, 6.91399263522250e+01,\n                                                6.89911858338605e+01, 6.88045849685636e+01, 6.85751743155174e+01, 6.82982860005113e+01, 6.79697196485328e+01,\n                                                6.75859264407568e+01, 6.71441814242378e+01, 6.66427335362248e+01, 6.60809227463786e+01, 6.54592546258790e+01,\n                                                6.47794250325579e+01, 6.40442918636236e+01, 6.32577967964866e+01, 6.24248464045270e+01, 6.15511667730703e+01,\n                                                6.06431463287742e+01, 5.97076769298556e+01, 5.87519950544647e+01, 5.77835179454755e+01, 5.68096695121526e+01,\n                                                5.58376998127922e+01, 5.48745148790639e+01, 5.39265398845777e+01, 5.29996310508334e+01, 5.20990344651312e+01,\n                                                5.12293756219805e+01, 5.03946608597542e+01, 4.95982793451892e+01, 4.88430040135008e+01, 4.81309957156136e+01,\n                                                4.74638155208088e+01, 4.68424477135926e+01, 4.62673330326718e+01, 4.57384096452239e+01, 4.52551586162207e+01,\n                                                4.48166509321153e+01, 4.44215939762395e+01, 4.40683763042376e+01, 4.37551103706268e+01, 4.34796734053208e+01,\n                                                4.32397469284093e+01, 4.30328554707311e+01, 4.28564049987554e+01, 4.27077213805999e+01, 4.25840890179447e+01,\n                                                4.24827895357174e+01, 4.24011401884096e+01, 4.23365314244035e+01, 4.22864628612804e+01, 4.22485767783038e+01,\n                                                4.22206881386965e+01, 4.22008101235563e+01, 4.21871741975476e+01, 4.21782438355346e+01, 4.21727212152673e+01,\n                                                4.21695464146335e+01, 4.21678889283015e+01, 4.21671316195437e+01, 4.21668475285719e+01, 4.21667702490987e+01,\n                                                4.21667588428162e+01, 4.21667577600456e+01, 4.21667356849258e+01, 4.21665861230142e+01, 4.21660363216975e+01,\n                                                4.21645707846740e+01, 4.21613636522014e+01, 4.21552222207552e+01, 4.21445441309915e+01, 4.21272906269477e+01,\n                                                4.21009781263276e+01, 4.20626901003691e+01, 4.20091108891049e+01, 4.19365825165106e+01, 4.18411847694310e+01,\n                                                4.17188377339841e+01, 4.15654246485402e+01, 4.13769313886312e+01, 4.11495972625557e+01, 4.08800702476748e+01,\n                                                4.05655585723661e+01, 4.02039699116293e+01, 3.97940296580684e+01, 3.93353708997853e+01, 3.88285908363870e+01,\n                                                3.82752710691926e+01, 3.76779618865627e+01, 3.70401325317131e+01, 3.63660898708207e+01, 3.56608669878416e+01,\n                                                3.49300823327479e+01, 3.41797714376253e+01, 3.34161986689511e+01, 3.26456648567422e+01, 3.18743327615167e+01,\n                                                3.11080899449538e+01, 3.03524563615494e+01, 2.96125284333949e+01, 2.88929421698078e+01, 2.81978396304022e+01,\n                                                2.75308322950294e+01, 2.68949646099192e+01, 2.62926861071263e+01, 2.57258402088547e+01, 2.51956741086728e+01,\n                                                2.47028695407335e+01, 2.42475906157673e+01, 2.38295429577073e+01, 2.34480380504288e+01, 2.31020575280894e+01,\n                                                2.27903135561884e+01, 2.25113029901872e+01, 2.22633543622598e+01, 2.20446677873767e+01, 2.18533485655413e+01,\n                                                2.16874356246870e+01, 2.15449260662596e+01, 2.14237970154256e+01, 2.13220258035441e+01, 2.12376092711347e+01,\n                                                2.11685827102977e+01, 2.11130386909481e+01, 2.10691457528617e+01, 2.10351667090788e+01, 2.10094761073767e+01,\n                                                2.09905762457160e+01, 2.09771110435031e+01, 2.09678770393106e+01, 2.09618308196281e+01, 2.09580922798289e+01,\n                                                2.09559432702403e+01, 2.09548213746521e+01, 2.09543087898057e+01, 2.09541165045285e+01, 2.09540641985536e+01,\n                                                2.09540564783115e+01, 2.09540557912652e+01, 2.09540422666790e+01, 2.09539506358892e+01, 2.09536137954793e+01,\n                                                2.09527159338539e+01, 2.09507511441397e+01, 2.09469889440256e+01, 2.09404483461631e+01, 2.09298820992063e+01,\n                                                2.09137726762320e+01, 2.08903414872728e+01, 2.08575725888413e+01, 2.08132518044100e+01, 2.07550216094376e+01,\n                                                2.06804513419701e+01, 2.05871212721047e+01, 2.04727178370395e+01, 2.03351360078219e+01, 2.01725834365976e+01,\n                                                1.99836799252036e+01, 1.97675450774634e+01, 1.95238669742733e+01, 1.92529455301387e+01, 1.89557059443836e+01,\n                                                1.86336802838531e+01, 1.82889584525397e+01, 1.79241131248783e+01, 1.75421059916719e+01, 1.71461842230309e+01,\n                                                1.67397759207116e+01, 1.63263914631681e+01, 1.59095345527908e+01, 1.54926234868309e+01, 1.50789209468074e+01,\n                                                1.46714703965654e+01, 1.42730390882155e+01, 1.38860706239164e+01, 1.35126521192388e+01, 1.31545006024658e+01,\n                                                1.28129701094588e+01, 1.24890764747993e+01, 1.21835333361707e+01, 1.18967918832043e+01, 1.16290783555859e+01,\n                                                1.13804260148427e+01, 1.11507009008203e+01, 1.09396223352555e+01, 1.07467797481433e+01, 1.05716472925087e+01,\n                                                1.04135972809716e+01, 1.02719130192621e+01, 1.01458012740258e+01, 1.00344044265501e+01, 9.93681230095682e+00,\n                                                9.85207366606434e+00, 9.77920744962229e+00, 9.71721374000427e+00, 9.66508466553488e+00, 9.62181522840116e+00,\n                                                9.58641412934351e+00, 9.55791455672401e+00, 9.53538483757157e+00, 9.51793876844914e+00, 9.50474537023433e+00,\n                                                9.49503775213012e+00, 9.48812073386480e+00, 9.48337686633580e+00, 9.48027051243999e+00, 9.47834970107148e+00,\n                                                9.47724554489113e+00, 9.47666911055586e+00, 9.47640574086971e+00, 9.47630694308963e+00, 9.47628006781893e+00,\n                                                9.47627610108965e+00, 9.47627575041042e+00, 9.47626887344651e+00, 9.47622228112218e+00, 9.47605100457766e+00,\n                                                9.47559445777723e+00, 9.47459538519301e+00, 9.47268230575031e+00, 9.46935627076738e+00, 9.46398273158130e+00,\n                                                9.45578928029336e+00, 9.44386996856178e+00, 9.42719680425392e+00, 9.40463885229556e+00, 9.37498910517890e+00,\n                                                9.33699892887040e+00, 9.28941943259839e+00, 9.23104857456778e+00, 9.16078223772759e+00, 9.07766694608186e+00,\n                                                8.98095141114305e+00, 8.87013377183764e+00, 8.74500128355629e+00, 8.60565936921711e+00, 8.45254738915385e+00,\n                                                8.28643921361271e+00, 8.10842766301995e+00, 7.91989306225346e+00, 7.72245744919147e+00, 7.51792725847388e+00,\n                                                7.30822840306155e+00, 7.09533841344209e+00, 6.88122050463244e+00, 6.66776403968107e+00, 6.45673488261492e+00,\n                                                6.24973775297970e+00, 6.04819117310034e+00, 5.85331422608178e+00, 5.66612334774653e+00, 5.48743687278001e+00,\n                                                5.31788502443290e+00, 5.15792335197018e+00, 5.00784810384208e+00, 4.86781251080365e+00, 4.73784333045762e+00,\n                                                4.61785723317122e+00, 4.50767671027087e+00, 4.40704521335765e+00, 4.31564124582698e+00, 4.23309116296939e+00,\n                                                4.15898050824015e+00, 4.09286381206090e+00, 4.03427288681699e+00, 3.98272374805325e+00, 3.93772236363660e+00,\n                                                3.89876947397373e+00, 3.86536473783346e+00, 3.83701044445309e+00, 3.81321499946273e+00, 3.79349634576458e+00,\n                                                3.77738542611296e+00, 3.76442973618454e+00, 3.75419695921636e+00, 3.74627861929004e+00, 3.74029364333994e+00,\n                                                3.73589168503895e+00, 3.73275603954717e+00, 3.73060596869125e+00, 3.72919826244419e+00, 3.72832788431367e+00,\n                                                3.72782758375951e+00, 3.72756640511467e+00, 3.72744707576177e+00, 3.72740231206355e+00, 3.72739013533364e+00,\n                                                3.72738833807676e+00, 3.72738817673368e+00, 3.72738498494489e+00, 3.72736336018346e+00, 3.72728386643186e+00,\n                                                3.72707197417830e+00, 3.72660829833195e+00, 3.72572047666389e+00, 3.72417708866600e+00, 3.72168401590082e+00,\n                                                3.71788364160508e+00, 3.71235726911003e+00, 3.70463109227005e+00, 3.69418596215100e+00, 3.68047104978506e+00,\n                                                3.66292129660972e+00, 3.64097827232023e+00, 3.61411373594925e+00, 3.58185484562607e+00, 3.54380962542503e+00,\n                                                3.49969102538876e+00, 3.44933776033845e+00, 3.39273013820710e+00, 3.32999932805390e+00, 3.26142898260426e+00,\n                                                3.18744879187298e+00, 3.10862032907788e+00, 3.02561634069239e+00, 2.93919528708689e+00, 2.85017332567931e+00,\n                                                2.75939596419325e+00, 2.66771130491392e+00, 2.57594625388437e+00, 2.48488644540824e+00, 2.39526009506726e+00,\n                                                2.30772564588489e+00, 2.22286292569149e+00, 2.14116752915110e+00, 2.06304818552967e+00, 1.98882689863611e+00,\n                                                1.91874161450878e+00, 1.85295109230414e+00, 1.79154155605518e+00, 1.73453462542490e+00, 1.68189598779702e+00,\n                                                1.63354429119097e+00, 1.58935980199001e+00, 1.54919246851416e+00, 1.51286914321028e+00, 1.48019982654884e+00,\n                                                1.45098289290254e+00, 1.42500933612183e+00, 1.40206612809598e+00, 1.38193881838481e+00, 1.36441351996544e+00,\n                                                1.34927842890561e+00, 1.33632501793500e+00, 1.32534902852916e+00, 1.31615136571020e+00, 1.30853897617621e+00,\n                                                1.30232576503708e+00, 1.29733358054330e+00, 1.29339327085370e+00, 1.29034579323334e+00, 1.28804333530019e+00,\n                                                1.28635039126847e+00, 1.28514472468748e+00, 1.28431814382562e+00, 1.28377701707093e+00, 1.28344246346015e+00,\n                                                1.28325016706232e+00, 1.28314978223945e+00, 1.28310391814799e+00, 1.28308671335854e+00, 1.28308203327781e+00,\n                                                1.28308134250911e+00, 1.28308127883257e+00, 1.28308000059758e+00, 1.28307134040686e+00, 1.28303950521982e+00,\n                                                1.28295464883173e+00, 1.28276896569845e+00, 1.28241344838645e+00, 1.28179547638432e+00, 1.28079740874865e+00,\n                                                1.27927635612410e+00, 1.27706530384356e+00, 1.27397574040489e+00, 1.26980190738614e+00, 1.26432672127257e+00,\n                                                1.25732932059054e+00, 1.24859406329655e+00, 1.23792064567263e+00, 1.22513484829605e+00, 1.21009925738977e+00,\n                                                1.19272318692552e+00, 1.17297096615489e+00, 1.15086778350140e+00, 1.12650240643841e+00, 1.10002632866971e+00,\n                                                1.07164921265901e+00, 1.04163086072144e+00, 1.01027031063218e+00, 9.77892955515586e-01, 9.44836781963744e-01,\n                                                9.11438871551113e-01, 8.78023211600990e-01, 8.44890631969278e-01, 8.12311370229267e-01, 7.80520425619500e-01,\n                                                7.49715549701875e-01, 7.20057483278140e-01, 6.91671908426869e-01, 6.64652542922639e-01, 6.39064844940037e-01,\n                                                6.14949891376881e-01, 5.92328113585793e-01, 5.71202694332342e-01, 5.51562532009441e-01, 5.33384753985104e-01,\n                                                5.16636809350331e-01, 5.01278196141897e-01, 4.87261885602564e-01, 4.74535502769882e-01, 4.63042314220004e-01,\n                                                4.52722064106055e-01, 4.43511691071308e-01, 4.35345952186708e-01, 4.28157975809242e-01, 4.21879762699376e-01,\n                                                4.16442653144358e-01, 4.11777776489359e-01, 4.07816497772558e-01, 4.04490873678185e-01, 4.01734126561948e-01,\n                                                3.99481140863671e-01, 3.97668980991739e-01, 3.96237424079416e-01, 3.95129495320830e-01, 3.94291988409549e-01,\n                                                3.93675949432364e-01, 3.93237099889163e-01, 3.92936173656267e-01, 3.92739143889003e-01, 3.92617319060264e-01,\n                                                3.92547292360362e-01, 3.92510735151617e-01, 3.92494032554964e-01, 3.92487766946601e-01, 3.92486062559797e-01,\n                                                3.92485810996249e-01, 3.92485787022508e-01, 3.92485297270696e-01, 3.92481979142687e-01, 3.92469781543582e-01,\n                                                3.92437268685029e-01, 3.92366122508875e-01, 3.92229897495170e-01, 3.91993089967073e-01, 3.91610584601480e-01,\n                                                3.91027540756497e-01, 3.90179778719315e-01, 3.88994718868076e-01, 3.87392912673548e-01, 3.85290181365363e-01,\n                                                3.82600344751609e-01, 3.79238479411470e-01, 3.75124594655276e-01, 3.70187561005423e-01, 3.64369076394411e-01,\n                                                3.57627418033204e-01, 3.49940711042478e-01, 3.41309454505492e-01, 3.31758083859725e-01, 3.21335412926587e-01,\n                                                3.10113882148528e-01, 2.98187631319720e-01, 2.85669503970311e-01, 2.72687166894272e-01, 2.59378585623637e-01,\n                                                2.45887132048651e-01, 2.32356613734353e-01, 2.18926507115185e-01, 2.05727650456950e-01, 1.92878609325362e-01,\n                                                1.80482870122376e-01, 1.68626950318640e-01, 1.57379443245759e-01, 1.46790947750475e-01, 1.36894775613285e-01,\n                                                1.27708287903388e-01, 1.19234688379748e-01, 1.11465097736669e-01, 1.04380744402377e-01, 9.79551314388800e-02,\n                                                9.21560698583619e-02, 8.69475016228449e-02, 8.22910669154453e-02, 7.81473973618318e-02, 7.44771383723304e-02,\n                                                7.12417193244050e-02, 6.84039003234602e-02, 6.59281296276504e-02, 6.37807475419407e-02, 6.19300717081046e-02,\n                                                6.03463961172253e-02, 5.90019325494211e-02, 5.78707189841765e-02, 5.69285151574661e-02, 5.61527010567175e-02,\n                                                5.55221898515867e-02, 5.50173626215980e-02, 5.46200283203149e-02, 5.43134087856458e-02, 5.40821453754745e-02,\n                                                5.39123211068215e-02, 5.37914901485976e-02, 5.37087052856293e-02, 5.36545336169212e-02, 5.36210512904347e-02,\n                                                5.36018094405222e-02, 5.35917655383145e-02, 5.35871768707210e-02, 5.35854555798210e-02, 5.35849873542134e-02,\n                                                5.35849182453632e-02, 5.35849114051103e-02, 5.35847690006221e-02, 5.35838041978707e-02, 5.35802576081608e-02,\n                                                5.35708046802057e-02, 5.35501221409191e-02, 5.35105316133979e-02, 5.34417428059726e-02, 5.33307212705409e-02,\n                                                5.31617081878153e-02, 5.29164208290069e-02, 5.25744608302148e-02, 5.21139516204130e-02, 5.15124148462149e-02,\n                                                5.07478775502364e-02, 4.98001772818810e-02, 4.86524027513440e-02, 4.72923762515052e-02, 4.57140556687250e-02,\n                                                4.39187144245068e-02, 4.19157532399907e-02, 3.97230130589747e-02, 3.73664958917175e-02, 3.48794578003151e-02,\n                                                3.23009092134185e-02, 2.96736317558270e-02, 2.70418851635412e-02, 2.44490205368493e-02, 2.19352285664911e-02,\n                                                1.95356306178240e-02, 1.72788705167335e-02, 1.51862951826018e-02, 1.32717359726371e-02, 1.15418330721724e-02,\n                                                9.99679306630696e-03, 8.63144076366495e-03, 7.43642087806506e-03, 6.39941933255272e-03, 5.50630115856166e-03,\n                                                4.74209509364698e-03, 4.09178788311237e-03, 3.54091955126989e-03, 3.07599197759600e-03, 2.68471619877175e-03,\n                                                2.35612970030274e-03, 2.08061539878202e-03, 1.84985124001003e-03, 1.65671511948062e-03, 1.49516514099446e-03,\n                                                1.36011043886697e-03, 1.24728315121558e-03, 1.15311803007501e-03, 1.07464302149651e-03, 1.00938209872936e-03,\n                                                9.55270506821648e-04, 9.10582005275273e-04, 8.73867366834702e-04, 8.43903157942805e-04, 8.19649680352086e-04,\n                                                8.00216911002849e-04, 7.84837329803167e-04, 7.72844623782021e-04, 7.63657360536740e-04, 7.56766799881348e-04,\n                                                7.51728062937218e-04, 7.48153908517679e-04, 7.45710395705146e-04, 7.44113750045017e-04, 7.43127810963529e-04,\n                                                7.42561520326035e-04, 7.42266018136206e-04, 7.42131035593729e-04, 7.42080404606327e-04, 7.42066632284377e-04,\n                                                7.42064599535297e-04, 7.42064389854136e-04, 7.42059938829698e-04, 7.42029783211251e-04, 7.41918937805508e-04,\n                                                7.41623540662317e-04, 7.40977456345604e-04, 7.39741602217237e-04, 7.37597048669159e-04, 7.34143215694871e-04,\n                                                7.28902739496107e-04, 7.21334709282928e-04, 7.10857838242873e-04, 6.96884579852508e-04, 6.78866105999987e-04,\n                                                6.56346382896800e-04, 6.29021416571618e-04, 5.96797402252491e-04, 5.59839527795702e-04, 5.18602224573783e-04,\n                                                4.73832398768081e-04, 4.26540009414111e-04, 3.77935176885558e-04, 3.29337022435539e-04, 2.82065285148292e-04,\n                                                2.37329836210165e-04, 1.96134232595568e-04, 1.59206985486549e-04, 1.26968886462464e-04, 9.95379563306642e-05,\n                                                7.67670305776846e-05, 5.83040267230217e-05, 4.36623612642961e-05, 3.22891502264611e-05, 2.36218391194143e-05,\n                                                1.71291915194161e-05, 1.23374614986460e-05, 8.84408933643499e-06, 6.32254119636855e-06, 4.52265203421121e-06,\n                                                3.25393753541903e-06, 2.35339791743172e-06, 1.76886564418055e-06, 1.65118949269072e-06, 1.75786784950560e-06,\n                                                1.68755391882769e-06, 1.34728912826176e-06, 7.98892557440922e-07, 2.84217094304040e-14, 5.94224729866255e-07,\n                                                6.41034318960010e-07, 5.70658571064087e-07, 5.40446151831020e-07, 5.34576031441247e-07, 4.76267061344515e-07,\n                                                2.84217094304040e-14, 4.26325641456060e-14, 4.26325641456060e-14, 4.26325641456060e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14, 4.26325641456060e-14, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14, 2.84217094304040e-14, 4.26325641456060e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {8.70000000000000e+01, 8.69999995842496e+01, 8.69999867284225e+01, 8.69998996280506e+01, 8.69995794341001e+01,\n                                                8.69987258856397e+01, 8.69968577689245e+01, 8.69932795402774e+01, 8.69870552178312e+01, 8.69769903736656e+01,\n                                                8.69616227711458e+01, 8.69392219356532e+01, 8.69077977775133e+01, 8.68651183658382e+01, 8.68087371285738e+01,\n                                                8.67360301289223e+01, 8.66442445606251e+01, 8.65305600225087e+01, 8.63921641756245e+01, 8.62263437006145e+01,\n                                                8.60305897722007e+01, 8.58027144990182e+01, 8.55409712769213e+01, 8.52441685574938e+01, 8.49117642560016e+01,\n                                                8.45439280391660e+01, 8.41415617290759e+01, 8.37062738793891e+01, 8.32403120732798e+01, 8.27464637474622e+01,\n                                                8.22279412782554e+01, 8.16882681508849e+01, 8.11311798892573e+01, 8.05605469865484e+01, 7.99803193170693e+01,\n                                                7.93944848151828e+01, 7.88070316667622e+01, 7.82219040240645e+01, 7.76429460640821e+01, 7.70738362028627e+01,\n                                                7.65180194166441e+01, 7.59786479982492e+01, 7.54585386662771e+01, 7.49601484229192e+01, 7.44855661753390e+01,\n                                                7.40365144293877e+01, 7.36143557258619e+01, 7.32201006059802e+01, 7.28544161458574e+01, 7.25176355542382e+01,\n                                                7.22097698501453e+01, 7.19305225280810e+01, 7.16793077423122e+01, 7.14552721469430e+01, 7.12573202255188e+01,\n                                                7.10841427502943e+01, 7.09342479015635e+01, 7.08059945165196e+01, 7.06976268963608e+01, 7.06073105623431e+01,\n                                                7.05331683092175e+01, 7.04733158587693e+01, 7.04258963726585e+01, 7.03891130505807e+01, 7.03612590255935e+01,\n                                                7.03407437810932e+01, 7.03261153592367e+01, 7.03160777117817e+01, 7.03095026614817e+01, 7.03054360922387e+01,\n                                                7.03030981631984e+01, 7.03018775374292e+01, 7.03013198197541e+01, 7.03011106000042e+01, 7.03010536871032e+01,\n                                                7.03010452868762e+01, 7.03010441370037e+01, 7.03010169809066e+01, 7.03008329946346e+01, 7.03001566458604e+01,\n                                                7.02983537807950e+01, 7.02944084193165e+01, 7.02868532107770e+01, 7.02737166125528e+01, 7.02524896706519e+01,\n                                                7.02201150518270e+01, 7.01730006554159e+01, 7.01070596637905e+01, 7.00177782130835e+01, 6.99003109313931e+01,\n                                                6.97496033771586e+01, 6.95605389350675e+01, 6.93281060608248e+01, 6.90475800260286e+01, 6.87147116425454e+01,\n                                                6.83259139806268e+01, 6.78784369557469e+01, 6.73705189742844e+01, 6.68015048156891e+01, 6.61719199741748e+01,\n                                                6.54834942944890e+01, 6.47391322619927e+01, 6.39428334467060e+01, 6.30995729904665e+01, 6.22151563401433e+01,\n                                                6.12960623115343e+01, 6.03492832333813e+01, 5.93821626135381e+01, 5.84022247451239e+01, 5.74169925186405e+01,\n                                                5.64338004764868e+01, 5.54596229949639e+01, 5.45009411663785e+01, 5.35636610081248e+01, 5.26530770658156e+01,\n                                                5.17738627501422e+01, 5.09300689924223e+01, 5.01251220996874e+01, 4.93618214257746e+01, 4.86423422203302e+01,\n                                                4.79682485776880e+01, 4.73405183575327e+01, 4.67595788315896e+01, 4.62253499349952e+01, 4.57372915425507e+01,\n                                                4.52944517310994e+01, 4.48955139850265e+01, 4.45388423266637e+01, 4.42225241684920e+01, 4.39444112092201e+01,\n                                                4.37021589494619e+01, 4.34932654466918e+01, 4.33151098320875e+01, 4.31649909310727e+01, 4.30401661060377e+01,\n                                                4.29378902012176e+01, 4.28554542345374e+01, 4.27902232633725e+01, 4.27396726630924e+01, 4.27014219110237e+01,\n                                                4.26732648755181e+01, 4.26531955798179e+01, 4.26394284497815e+01, 4.26304121650567e+01, 4.26248364112160e+01,\n                                                4.26216310662064e+01, 4.26199576335817e+01, 4.26191930389735e+01, 4.26189062148507e+01, 4.26188281918964e+01,\n                                                4.26188166758776e+01, 4.26188155826901e+01, 4.26187932951927e+01, 4.26186422943953e+01, 4.26180872036305e+01,\n                                                4.26166075672506e+01, 4.26133695805592e+01, 4.26071690667862e+01, 4.25963882548514e+01, 4.25789687847654e+01,\n                                                4.25524032031041e+01, 4.25137469674089e+01, 4.24596526019132e+01, 4.23864270797120e+01, 4.22901126973141e+01,\n                                                4.21665906262550e+01, 4.20117049793128e+01, 4.18214036734052e+01, 4.15918907273129e+01, 4.13197830848589e+01,\n                                                4.10022638422598e+01, 4.06372231454085e+01, 4.02233782419001e+01, 3.97603653464135e+01, 3.92487980241129e+01,\n                                                3.86902893502740e+01, 3.80874375239837e+01, 3.74437761581647e+01, 3.67636907039345e+01, 3.60523018230559e+01,\n                                                3.53153166092907e+01, 3.45588515959149e+01, 3.37892384119991e+01, 3.30128311766964e+01, 3.22358382205917e+01,\n                                                3.14641944010044e+01, 3.07034756964892e+01, 2.99588435101712e+01, 2.92350008643230e+01, 2.85361480383216e+01,\n                                                2.78659356615809e+01, 2.72274218263717e+01, 2.66230428075588e+01, 2.60546048992507e+01, 2.55233002088758e+01,\n                                                2.50297444978016e+01, 2.45740318371675e+01, 2.41557994045157e+01, 2.37742959154434e+01, 2.34284483916726e+01,\n                                                2.31169236242750e+01, 2.28381823473501e+01, 2.25905255228127e+01, 2.23721331394520e+01, 2.21810965478486e+01,\n                                                2.20154456466125e+01, 2.18731722862869e+01, 2.17522511443383e+01, 2.16506591128529e+01, 2.15663939774857e+01,\n                                                2.14974928843012e+01, 2.14420508118022e+01, 2.13982390034509e+01, 2.13643230827858e+01, 2.13386803789185e+01,\n                                                2.13198158440660e+01, 2.13063758549104e+01, 2.12971591617601e+01, 2.12911242859003e+01, 2.12873927637777e+01,\n                                                2.12852477893261e+01, 2.12841280006353e+01, 2.12836163784914e+01, 2.12834244543642e+01, 2.12833722466315e+01,\n                                                2.12833645408898e+01, 2.12833638551339e+01, 2.12833503559499e+01, 2.12832588972642e+01, 2.12829226895334e+01,\n                                                2.12820265144426e+01, 2.12800654158934e+01, 2.12763102856531e+01, 2.12697819849584e+01, 2.12592356201674e+01,\n                                                2.12431565473424e+01, 2.12197695802023e+01, 2.11870626705314e+01, 2.11428259680939e+01, 2.10847066015039e+01,\n                                                2.10102787216511e+01, 2.09171273131852e+01, 2.08029430460994e+01, 2.06656240977783e+01, 2.05033795694183e+01,\n                                                2.03148280422595e+01, 2.00990841938028e+01, 1.98558264477783e+01, 1.95853395421994e+01, 1.92885277370515e+01,\n                                                1.89668970451550e+01, 1.86225080384229e+01, 1.82579039256348e+01, 1.78760210511571e+01, 1.74800900935012e+01,\n                                                1.70735356784079e+01, 1.66598799816159e+01, 1.62426528981017e+01, 1.58253086912674e+01, 1.54111479597694e+01,\n                                                1.50032449312951e+01, 1.46043829822762e+01, 1.42170041144132e+01, 1.38431787210696e+01, 1.34845992526693e+01,\n                                                1.31425963196924e+01, 1.28181709021637e+01, 1.25120340172266e+01, 1.22246460756344e+01, 1.19562511129941e+01,\n                                                1.17069043498753e+01, 1.14764938544215e+01, 1.12647580930781e+01, 1.10713011533957e+01, 1.08956069140590e+01,\n                                                1.07370528379101e+01, 1.05949236006748e+01, 1.04684245066763e+01, 1.03566945550824e+01, 1.02588190440577e+01,\n                                                1.01738416744970e+01, 1.01007761944890e+01, 1.00386176830757e+01, 9.98635359497590e+00, 9.94297467486066e+00,\n                                                9.90748580511105e+00, 9.87891678291705e+00, 9.85633294095572e+00, 9.83884544107671e+00, 9.82562099245315e+00,\n                                                9.81589068355184e+00, 9.80895757841648e+00, 9.80420271728816e+00, 9.80108918194664e+00, 9.79916393681003e+00,\n                                                9.79805723430951e+00, 9.79747947133647e+00, 9.79721549476079e+00, 9.79711646934396e+00, 9.79708953215324e+00,\n                                                9.79708555628480e+00, 9.79708520479763e+00, 9.79707831198952e+00, 9.79703161232068e+00, 9.79685994119698e+00,\n                                                9.79640234282925e+00, 9.79540097011262e+00, 9.79348349022897e+00, 9.79014981720542e+00, 9.78476397150826e+00,\n                                                9.77655183544226e+00, 9.76460551543485e+00, 9.74789491759441e+00, 9.72528696919908e+00, 9.69557265659732e+00,\n                                                9.65750168750961e+00, 9.60982412365159e+00, 9.55133778566874e+00, 9.48093964364635e+00, 9.39767882854122e+00,\n                                                9.30080840217641e+00, 9.18983268075819e+00, 9.06454678890384e+00, 8.92506528221826e+00, 8.77183714746158e+00,\n                                                8.60564527265882e+00, 8.42758954467416e+00, 8.23905401010693e+00, 8.04165991340555e+00, 7.83720774351093e+00,\n                                                7.62761248179400e+00, 7.41483685271324e+00, 7.20082738889927e+00, 6.98745749554074e+00, 6.77648053619721e+00,\n                                                6.56949449407637e+00, 6.36791829129095e+00, 6.17297865980288e+00, 5.98570573879968e+00, 5.80693536489200e+00,\n                                                5.63731622328261e+00, 5.47732045055074e+00, 5.32725672075266e+00, 5.18728516030302e+00, 5.05743357082866e+00,\n                                                4.93761442819113e+00, 4.82764205575300e+00, 4.72724932814050e+00, 4.63610330119272e+00, 4.55381929116983e+00,\n                                                4.47997311255354e+00, 4.41411138529466e+00, 4.35576000032870e+00, 4.30443096307049e+00, 4.25962791143003e+00,\n                                                4.22085063272817e+00, 4.18759889375889e+00, 4.15937586220107e+00, 4.13569134589127e+00, 4.11606501668318e+00,\n                                                4.10002972286451e+00, 4.08713493184723e+00, 4.07695028572930e+00, 4.06906919873464e+00, 4.06311237989814e+00,\n                                                4.05873112914655e+00, 4.05561023241918e+00, 4.05347027344389e+00, 4.05206918711258e+00, 4.05120290178934e+00,\n                                                4.05070495372165e+00, 4.05044500314926e+00, 4.05032623488131e+00, 4.05028168166037e+00, 4.05026956218485e+00,\n                                                4.05026777337859e+00, 4.05026761279416e+00, 4.05026443601298e+00, 4.05024291293010e+00, 4.05016379295289e+00,\n                                                4.04995289699386e+00, 4.04949140125544e+00, 4.04860775376086e+00, 4.04707162154948e+00, 4.04459026752755e+00,\n                                                4.04080775244961e+00, 4.03530733893912e+00, 4.02761742744008e+00, 4.01722126398339e+00, 4.00357051359201e+00,\n                                                3.98610258283084e+00, 3.96426130083252e+00, 3.93752024269327e+00, 3.90540762967419e+00, 3.86753140936374e+00,\n                                                3.82360286007157e+00, 3.77345693657904e+00, 3.71706763246470e+00, 3.65455691119378e+00, 3.58619625313929e+00,\n                                                3.51240053235713e+00, 3.43371468188451e+00, 3.35079430245517e+00, 3.26438188584932e+00, 3.17528056592826e+00,\n                                                3.08432725443539e+00, 2.99236672419538e+00, 2.90022778839511e+00, 2.80870232046234e+00, 2.71852755301595e+00,\n                                                2.63037190716848e+00, 2.54482449721694e+00, 2.46238836841907e+00, 2.38347740853074e+00, 2.30841671349444e+00,\n                                                2.23744600497406e+00, 2.17072553150902e+00, 2.10834377339118e+00, 2.05032623556227e+00, 1.99664465396965e+00,\n                                                1.94722604309207e+00, 1.90196115088781e+00, 1.86071203640165e+00, 1.82331862372760e+00, 1.78960420058145e+00,\n                                                1.75937991466738e+00, 1.73244837664529e+00, 1.70860650893050e+00, 1.68764779052277e+00, 1.66936404533314e+00,\n                                                1.65354690989983e+00, 1.63998909951876e+00, 1.62848557198940e+00, 1.61883466675387e+00, 1.61083927494026e+00,\n                                                1.60430807318303e+00, 1.59905683155181e+00, 1.59490978409708e+00, 1.59170103026834e+00, 1.58927591782920e+00,\n                                                1.58749234403254e+00, 1.58622190282435e+00, 1.58535080258166e+00, 1.58478048182832e+00, 1.58442785946586e+00,\n                                                1.58422517068752e+00, 1.58411935875868e+00, 1.58407101467014e+00, 1.58405287949843e+00, 1.58404794632645e+00,\n                                                1.58404721820185e+00, 1.58404715108176e+00, 1.58404580372125e+00, 1.58403667519136e+00, 1.58400311828599e+00,\n                                                1.58391367201546e+00, 1.58371794193771e+00, 1.58334317548282e+00, 1.58269170389588e+00, 1.58163942447786e+00,\n                                                1.58003549694314e+00, 1.57770342108648e+00, 1.57444364335302e+00, 1.57003780061115e+00, 1.56425464445975e+00,\n                                                1.55685759512670e+00, 1.54761375098245e+00, 1.53630403428868e+00, 1.52273399931599e+00, 1.50674468541526e+00,\n                                                1.48822278988789e+00, 1.46710938945344e+00, 1.44340647616939e+00, 1.41718070453892e+00, 1.38856396595359e+00,\n                                                1.35775069063983e+00, 1.32499208516344e+00, 1.29058779455829e+00, 1.25487568264971e+00, 1.21822051637240e+00,\n                                                1.18100230866865e+00, 1.14360493822396e+00, 1.10640546730220e+00, 1.06976438037069e+00, 1.03401682292971e+00,\n                                                9.99464869239745e-01, 9.66370894268479e-01, 9.34952237645760e-01, 9.05377465565834e-01, 8.77764590678609e-01,\n                                                8.52181546926900e-01, 8.28649023661782e-01, 8.07145480064648e-01, 7.87613865535789e-01, 7.69969351832813e-01,\n                                                7.54107299292642e-01, 7.39910744690889e-01, 7.27256877325829e-01, 7.16022201719866e-01, 7.06086309177763e-01,\n                                                6.97334354721590e-01, 6.89658444072037e-01, 6.82958181223654e-01, 6.77140626023373e-01, 6.72119881190000e-01,\n                                                6.67816485142538e-01, 6.64156741909963e-01, 6.61072078680277e-01, 6.58498487972437e-01, 6.56376085395493e-01,\n                                                6.54648794634255e-01, 6.53264157337262e-01, 6.52173255630828e-01, 6.51330727945108e-01, 6.50694853945339e-01,\n                                                6.50227681185441e-01, 6.49895164469655e-01, 6.49667288828496e-01, 6.49518148546775e-01, 6.49425957840506e-01,\n                                                6.49372973470392e-01, 6.49345315531363e-01, 6.49332679458226e-01, 6.49327939403676e-01, 6.49326650010210e-01,\n                                                6.49326459699012e-01, 6.49326441562565e-01, 6.49326071058979e-01, 6.49323560860040e-01, 6.49314333362696e-01,\n                                                6.49289738235282e-01, 6.49235922509249e-01, 6.49132897669574e-01, 6.48953857627930e-01, 6.48664805658413e-01,\n                                                6.48224551870868e-01, 6.47585142991076e-01, 6.46692779725015e-01, 6.45489260044840e-01, 6.43913955980850e-01,\n                                                6.41906285030814e-01, 6.39408576000122e-01, 6.36369157942482e-01, 6.32745429815571e-01, 6.28506612197583e-01,\n                                                6.23635858621043e-01, 6.18131429684368e-01, 6.12006718720750e-01, 6.05289061616716e-01, 5.98017446607301e-01,\n                                                5.90239426815032e-01, 5.82007683149499e-01, 5.73376745535370e-01, 5.64400333324414e-01, 5.55129629087844e-01,\n                                                5.45612592656184e-01, 5.35894211099176e-01, 5.26017419351405e-01, 5.16024348072989e-01, 5.05957563457699e-01,\n                                                4.95861036785413e-01, 4.85780686417087e-01, 4.75764440133858e-01, 4.65861850004060e-01, 4.56123346550086e-01,\n                                                4.46599244941126e-01, 4.37338619653701e-01, 4.28388153288964e-01, 4.19791046735227e-01, 4.11586056430195e-01,\n                                                4.03806703126918e-01, 3.96480677016001e-01, 3.89629447259480e-01, 3.83268070467125e-01, 3.77405182636679e-01,\n                                                3.72043152577149e-01, 3.67178371558538e-01, 3.62801653365338e-01, 3.58898720388950e-01, 3.55450754139113e-01,\n                                                3.52434991870808e-01, 3.49825354316877e-01, 3.47593092330285e-01, 3.45707442291470e-01, 3.44136281313482e-01,\n                                                3.42846773620280e-01, 3.41805999143588e-01, 3.40981554624918e-01, 3.40342116606507e-01, 3.39857954930309e-01,\n                                                3.39501384990058e-01, 3.39247147190108e-01, 3.39072702973354e-01, 3.38958438426843e-01, 3.38887768811290e-01,\n                                                3.38847140278787e-01, 3.38825928372373e-01, 3.38816236442696e-01, 3.38812600659693e-01, 3.38811611638036e-01,\n                                                3.38811465660513e-01, 3.38811451211996e-01, 3.38811150412738e-01, 3.38809112455166e-01, 3.38801620729527e-01,\n                                                3.38781650708341e-01, 3.38737947662139e-01, 3.38654254384835e-01, 3.38508721360341e-01, 3.38273528963342e-01,\n                                                3.37914747945902e-01, 3.37392460390291e-01, 3.36661158213019e-01, 3.35670429902990e-01, 3.34365938251025e-01,\n                                                3.32690682292338e-01, 3.30586525632668e-01, 3.27995961042603e-01, 3.24864068141494e-01, 3.21140607721460e-01,\n                                                3.16782183382429e-01, 3.11754389219089e-01, 3.06033851808834e-01, 2.99610066197829e-01, 2.92486919684961e-01,\n                                                2.84683795146549e-01, 2.76236149299066e-01, 2.67195473170162e-01, 2.57628564828025e-01, 2.47616080055337e-01,\n                                                2.37250375157814e-01, 2.26632714463960e-01, 2.15869976871005e-01, 2.05071051815651e-01, 1.94343155153263e-01,\n                                                1.83788311051813e-01, 1.73500232649658e-01, 1.63561792914507e-01, 1.54043214371725e-01, 1.45001032498200e-01,\n                                                1.36477814265987e-01, 1.28502550873847e-01, 1.21091599133095e-01, 1.14250022143736e-01, 1.07973175828633e-01,\n                                                1.02248399826607e-01, 9.70566939999173e-02, 9.23742900695146e-02, 8.81740570871727e-02, 8.44267062673367e-02,\n                                                8.11017831347414e-02, 7.81684521661674e-02, 7.55960911536988e-02, 7.33547199696858e-02, 7.14152921121922e-02,\n                                                6.97498782449912e-02, 6.83317697308325e-02, 6.71355275565730e-02, 6.61369985713520e-02, 6.53133169719666e-02,\n                                                6.46429047288848e-02, 6.41054803488998e-02, 6.36820811724448e-02, 6.33551004634541e-02, 6.31083370244454e-02,\n                                                6.29270521265397e-02, 6.27980263360257e-02, 6.27096074726836e-02, 6.26517405195983e-02, 6.26159708216960e-02,\n                                                6.25954132751190e-02, 6.25846822620133e-02, 6.25797796025154e-02, 6.25779405150695e-02, 6.25774402452350e-02,\n                                                6.25773664066998e-02, 6.25773587899516e-02, 6.25771971042184e-02, 6.25761016684265e-02, 6.25720748646614e-02,\n                                                6.25613419142184e-02, 6.25378583407041e-02, 6.24929045085167e-02, 6.24147920390214e-02, 6.22887095238980e-02,\n                                                6.20967374344161e-02, 6.18180633063474e-02, 6.14294266980266e-02, 6.09058174586607e-02, 6.02214390407170e-02,\n                                                5.93509299749968e-02, 5.82708111591472e-02, 5.69610955714808e-02, 5.54069633107872e-02, 5.36003730358914e-02,\n                                                5.15414568331494e-02, 4.92395357414068e-02, 4.67136034246636e-02, 4.39921594222454e-02, 4.11123309029762e-02,\n                                                3.81182979228356e-02, 3.50591218452507e-02, 3.19861560658694e-02, 2.89502776274873e-02, 2.59992053700842e-02,\n                                                2.31751585700835e-02, 2.05130612391002e-02, 1.80394207198162e-02, 1.57719194409367e-02, 1.37196716112271e-02,\n                                                1.18840262285431e-02, 1.02597537495228e-02, 8.83644016239771e-03, 7.59992671146392e-03, 6.53366776286646e-03,\n                                                5.61992130671740e-03, 4.84072541853209e-03, 4.17864420444403e-03, 3.61728923924431e-03, 3.14164072628387e-03,\n                                                2.73820734872743e-03, 2.39507165970565e-03, 2.10186509720245e-03, 1.84970423720188e-03, 1.63110422860768e-03,\n                                                1.43987412107549e-03, 1.27099536582875e-03, 1.12048685633681e-03, 9.85262787779106e-04, 8.62990292858967e-04,\n                                                7.51952286762503e-04, 6.50918926510258e-04, 5.59029896848529e-04, 4.75689465304185e-04, 4.00476209364342e-04,\n                                                3.33068870915554e-04, 2.73188808137093e-04, 2.20558290322970e-04, 1.74872819684424e-04, 1.35785021996071e-04,\n                                                1.02897478157615e-04, 7.57620660039038e-05, 5.38837949051185e-05, 3.67276051633780e-05, 2.37270743070894e-05,\n                                                1.42943769674275e-05, 7.83117506841791e-06, 3.74039520067981e-06, 1.43914839156878e-06, 0.00000000000000e+00,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {8.80000000000000e+01, 8.79999995776849e+01, 8.79999865188650e+01, 8.79998980431815e+01,  8.79995727933659e+01,\n                                                8.79987057672526e+01, 8.79968081521209e+01, 8.79931734193840e+01, 8.79868508013110e+01,  8.79766269933334e+01,\n                                                8.79610166343283e+01, 8.79382618576173e+01, 8.79063410360159e+01, 8.78629868288604e+01,  8.78057138258896e+01,\n                                                8.77318564729373e+01, 8.76386184726941e+01, 8.75231352805125e+01, 8.73825513484836e+01,  8.72141130457320e+01,\n                                                8.70152764065338e+01, 8.67838259836455e+01, 8.65179974716551e+01, 8.62165932381188e+01,  8.58790776183505e+01,\n                                                8.55056389497914e+01, 8.50972085300899e+01, 8.46554327800783e+01, 8.41826026473454e+01,  8.36815516927171e+01,\n                                                8.31555392058935e+01, 8.26081355596469e+01, 8.20431235036340e+01, 8.14644222613608e+01,  8.08760332262012e+01,\n                                                8.02819992591737e+01, 7.96863662325650e+01, 7.90931366820249e+01, 7.85062108370475e+01,  7.79293177812882e+01,\n                                                7.73659457214146e+01, 7.68192822878284e+01, 7.62921726405619e+01, 7.57870970372344e+01,  7.53061640221682e+01,\n                                                7.48511130138763e+01, 7.44233208892449e+01, 7.40238095934473e+01, 7.36532541417625e+01,  7.33119917596167e+01,\n                                                7.30000333057751e+01, 7.27170779123265e+01, 7.24625313406264e+01, 7.22355281367592e+01,  7.20349573688954e+01,\n                                                7.18594915466191e+01, 7.17076182253478e+01, 7.15776737484989e+01, 7.14678785463623e+01,  7.13763733765267e+01,\n                                                7.13012558499735e+01, 7.12406165411807e+01, 7.11925739361688e+01, 7.11553074380308e+01,  7.11270876342007e+01,\n                                                7.11063030416018e+01, 7.10914825909147e+01, 7.10813131928006e+01, 7.10746518471396e+01,  7.10705319080821e+01,\n                                                7.10681632968568e+01, 7.10669266522681e+01, 7.10663616154726e+01, 7.10661496500697e+01,  7.10660919902847e+01,\n                                                7.10660834798192e+01, 7.10660823148566e+01, 7.10660548023824e+01, 7.10658684016100e+01,  7.10651831769668e+01,\n                                                7.10633566527844e+01, 7.10593595174148e+01, 7.10517051691234e+01, 7.10383962081256e+01,  7.10168907952352e+01,\n                                                7.09840915661707e+01, 7.09363594666292e+01, 7.08695543991569e+01, 7.07791038878364e+01,  7.06601000204311e+01,\n                                                7.05074236959258e+01, 7.03158937062981e+01, 7.00804364834377e+01, 6.97962705607353e+01,  6.94590980765381e+01,\n                                                6.90652941267163e+01, 6.86120835887014e+01, 6.80976943430558e+01, 6.75214758616823e+01,  6.68839733251833e+01,\n                                                6.61869502759536e+01, 6.54333575895068e+01, 6.46272528245425e+01, 6.37736802770586e+01,  6.28785259054741e+01,\n                                                6.19483604551175e+01, 6.09902781695078e+01, 6.00117302399767e+01, 5.90203473025224e+01,  5.80237491589866e+01,\n                                                5.70293522003660e+01, 5.60441972247707e+01, 5.50748210156419e+01, 5.41271808940647e+01,  5.32066222324605e+01,\n                                                5.23178684172023e+01, 5.14650159124710e+01, 5.06515278003138e+01, 4.98802284966098e+01,  4.91533058295379e+01,\n                                                4.84723251309660e+01, 4.78382564171247e+01, 4.72515125940443e+01, 4.67119949871429e+01,  4.62191423322548e+01,\n                                                4.57719801448692e+01, 4.53691685236382e+01, 4.50090475264052e+01, 4.46896800705785e+01,  4.44088928027525e+01,\n                                                4.41643155950437e+01, 4.39534203323942e+01, 4.37735595302890e+01, 4.36220051238734e+01,  4.34959875366374e+01,\n                                                4.33927348943703e+01, 4.33095120140351e+01, 4.32436585798239e+01, 4.31926257313958e+01,  4.31540101438172e+01,\n                                                4.31255845864428e+01, 4.31053239187003e+01, 4.30914255211000e+01, 4.30823232717186e+01,  4.30766943582361e+01,\n                                                4.30734584538206e+01, 4.30717690670436e+01, 4.30709971829910e+01, 4.30707076243686e+01,  4.30706288575662e+01,\n                                                4.30706172317571e+01, 4.30706161281474e+01, 4.30705936281677e+01, 4.30704411877744e+01,  4.30698808049504e+01,\n                                                4.30683870622493e+01, 4.30651182060747e+01, 4.30588585806557e+01, 4.30479749952987e+01,  4.30303894756470e+01,\n                                                4.30035706839503e+01, 4.29645460475897e+01, 4.29099362550252e+01, 4.28360132053788e+01,  4.27387816806272e+01,\n                                                4.26140839178205e+01, 4.24577249001567e+01, 4.22656146198278e+01, 4.20339219154547e+01,  4.17592329410869e+01,\n                                                4.14387061233659e+01, 4.10702148690803e+01, 4.06524695180784e+01, 4.01851111945954e+01,  3.96687721756074e+01,\n                                                3.91050997706012e+01, 3.84967428552270e+01, 3.78473014710909e+01, 3.71612400834428e+01,  3.64437649229430e+01,\n                                                3.57006671371331e+01, 3.49381381470928e+01, 3.41625715025240e+01, 3.33803727145529e+01,  3.25977987768288e+01,\n                                                3.18208391952942e+01, 3.10551347591740e+01, 3.03059185875204e+01, 2.95779628924326e+01,  2.88755230968060e+01,\n                                                2.82022815940349e+01, 2.75613002791338e+01, 2.69549918660050e+01, 2.63851163884463e+01,  2.58528039541475e+01,\n                                                2.53586001125674e+01, 2.49025273061285e+01, 2.44841549755113e+01, 2.41026715479540e+01,  2.37569531006330e+01,\n                                                2.34456253566516e+01, 2.31671174098206e+01, 2.29197069524410e+01, 2.27015577234291e+01,  2.25107504318303e+01,\n                                                2.23453086238690e+01, 2.22032209439003e+01, 2.20824610750605e+01, 2.19810063990270e+01,  2.18968561311033e+01,\n                                                2.18280493957103e+01, 2.17726834262023e+01, 2.17289318135920e+01, 2.16950625005186e+01,  2.16694550281805e+01,\n                                                2.16506164033254e+01, 2.16371948672788e+01, 2.16279908249223e+01, 2.16219642306662e+01,  2.16182378284956e+01,\n                                                2.16160957968421e+01, 2.16149775443622e+01, 2.16144666240809e+01, 2.16142749632393e+01,  2.16142228271261e+01,\n                                                2.16142151319552e+01, 2.16142144471400e+01, 2.16142009664743e+01, 2.16141096332521e+01,  2.16137738867294e+01,\n                                                2.16128789409812e+01, 2.16109205324674e+01, 2.16071705526116e+01, 2.16006512041790e+01,  2.15901192968067e+01,\n                                                2.15740622533614e+01, 2.15507072974382e+01, 2.15180450852893e+01, 2.14738686806402e+01,  2.14158282010998e+01,\n                                                2.13415006597555e+01, 2.12484734842102e+01, 2.11344389591751e+01, 2.09972955011067e+01,  2.08352503831626e+01,\n                                                2.06469174843164e+01, 2.04314030662554e+01, 2.01883727086372e+01, 1.99180935228330e+01,  1.96214476605751e+01,\n                                                1.92999157974395e+01, 1.89555323412026e+01, 1.85908170282382e+01, 1.82086896624022e+01,  1.78123754460060e+01,\n                                                1.74053074155436e+01, 1.69910302457803e+01, 1.65731070578800e+01, 1.61550291701087e+01,  1.57401290647013e+01,\n                                                1.53314993342706e+01, 1.49319236766857e+01, 1.45438277485473e+01, 1.41692559169733e+01,  1.38098747770167e+01,\n                                                1.34669981557533e+01, 1.31416243173156e+01, 1.28344758376319e+01, 1.25460354492783e+01,  1.22765750455406e+01,\n                                                1.20261781617423e+01, 1.17947578468236e+01, 1.15820720696480e+01, 1.13877382620734e+01,  1.12112478457546e+01,\n                                                1.10519809631762e+01, 1.09092212586387e+01, 1.07821704164964e+01, 1.06699621880989e+01,  1.05716757454159e+01,\n                                                1.04863483255464e+01, 1.04129872367905e+01, 1.03505813642155e+01, 1.02981123353552e+01,  1.02545654881060e+01,\n                                                1.02189407309635e+01, 1.01902633105168e+01, 1.01675944133174e+01, 1.01500414395027e+01,  1.01367677038551e+01,\n                                                1.01270012551842e+01, 1.01200424641986e+01, 1.01152700183914e+01, 1.01121449821754e+01,  1.01102126309640e+01,\n                                                1.01091018455157e+01, 1.01085219515546e+01, 1.01082570014679e+01, 1.01081576108785e+01,  1.01081305743544e+01,\n                                                1.01081265838246e+01, 1.01081262310413e+01, 1.01081193128155e+01, 1.01080724409399e+01,  1.01079001367936e+01,\n                                                1.01074408512331e+01, 1.01064357872178e+01, 1.01045112421993e+01, 1.01011652958126e+01,  1.00957596479022e+01,\n                                                1.00875173812599e+01, 1.00755273661987e+01, 1.00587559193264e+01, 1.00360661542342e+01,  1.00062451974844e+01,\n                                                9.96803907696693e+00, 9.92019462170620e+00, 9.86150715987293e+00, 9.79087220208888e+00,  9.70733870628767e+00,\n                                                9.61016100967562e+00, 9.49884616122097e+00, 9.37319327003793e+00, 9.23332166238438e+00,  9.07968514981714e+00,\n                                                8.91307055713499e+00, 8.73457980322461e+00, 8.54559618335527e+00, 8.34773692613264e+00,  8.14279540181968e+00,\n                                                7.93267732615736e+00, 7.71933574184071e+00, 7.50470935604554e+00, 7.29066798667429e+00,  7.07896759128487e+00,\n                                                6.87121590518974e+00, 6.66884841809255e+00, 6.47311352651226e+00, 6.28506532274550e+00,  6.10556256011004e+00,\n                                                5.93527267583009e+00, 5.77468011853269e+00, 5.62409843100389e+00, 5.48368551406045e+00,  5.35346130374148e+00,\n                                                5.23332686660142e+00, 5.12308379090817e+00, 5.02245279787839e+00, 4.93109070970365e+00,  4.84860522491854e+00,\n                                                4.77456728344980e+00, 4.70852108641650e+00, 4.64999203432866e+00, 4.59849295700390e+00,  4.55352904396440e+00,\n                                                4.51460186738755e+00, 4.48121284186864e+00, 4.45286640218112e+00, 4.42907311197730e+00,  4.40935284843179e+00,\n                                                4.39323814276844e+00, 4.38027769564759e+00, 4.37004003046545e+00, 4.36211719798310e+00,  4.35612840408079e+00,\n                                                4.35172340089774e+00, 4.34858546224454e+00, 4.34643375865330e+00, 4.34502495662910e+00,  4.34415389033120e+00,\n                                                4.34365319051733e+00, 4.34339180236798e+00, 4.34327237704966e+00, 4.34322757731252e+00,  4.34321539077544e+00,\n                                                4.34321359207094e+00, 4.34321343059788e+00, 4.34321023623809e+00, 4.34318859405494e+00,  4.34310903621670e+00,\n                                                4.34289697280485e+00, 4.34243292072340e+00, 4.34154437215396e+00, 4.33999970010224e+00,  4.33750449815538e+00,\n                                                4.33370074635978e+00, 4.32816917483864e+00, 4.32043514818182e+00, 4.30997830242309e+00,  4.29624601976862e+00,\n                                                4.27867061632458e+00, 4.25668984591968e+00, 4.22977000226167e+00, 4.19743056058245e+00,  4.15926898200733e+00,\n                                                4.11498406375689e+00, 4.06439611371005e+00, 4.00746230738061e+00, 3.94428587357061e+00,  3.87511823900002e+00,\n                                                3.80035388496663e+00, 3.72051833470128e+00, 3.63625028446017e+00, 3.54827931421744e+00,  3.45740081081752e+00,\n                                                3.36444971662554e+00, 3.27027454376297e+00, 3.17571285417169e+00, 3.08156916847439e+00,  2.98859605927011e+00,\n                                                2.89747899339048e+00, 2.80882528094330e+00, 2.72315724554718e+00, 2.64090945702895e+00,  2.56242959908289e+00,\n                                                2.48798232555585e+00, 2.41775532773387e+00, 2.35186680731182e+00, 2.29037361691393e+00,  2.23327946465126e+00,\n                                                2.18054274577382e+00, 2.13208372998236e+00, 2.08779097381976e+00, 2.04752693207845e+00,  2.01113280925267e+00,\n                                                1.97843272781220e+00, 1.94923730377239e+00, 1.92334672094687e+00, 1.90055339057888e+00,  1.88064427712506e+00,\n                                                1.86340296554106e+00, 1.84861154034576e+00, 1.83605234087210e+00, 1.82550964909932e+00,  1.81677135530376e+00,\n                                                1.80963063211635e+00, 1.80388762982099e+00, 1.79935118593292e+00, 1.79584052181691e+00,  1.79318688018884e+00,\n                                                1.79123504166736e+00, 1.78984464778877e+00, 1.78889125332583e+00, 1.78826703304580e+00,  1.78788107720594e+00,\n                                                1.78765922542735e+00, 1.78754340881397e+00, 1.78749049353195e+00, 1.78747064355250e+00,  1.78746524391173e+00,\n                                                1.78746444693731e+00, 1.78746437347050e+00, 1.78746289870656e+00, 1.78745290700076e+00,  1.78741617698485e+00,\n                                                1.78731827248505e+00, 1.78710403238111e+00, 1.78669381932473e+00, 1.78598071308203e+00,  1.78482883542311e+00,\n                                                1.78307299269871e+00, 1.78051981472007e+00, 1.77695054821062e+00, 1.77212562342100e+00,  1.76579104778789e+00,\n                                                1.75768658737746e+00, 1.74755557583943e+00, 1.73515604761420e+00, 1.72027273919841e+00,  1.70272935703214e+00,\n                                                1.68240039424296e+00, 1.65922171209742e+00, 1.63319910148829e+00, 1.60441411109338e+00,  1.57302656506738e+00,\n                                                1.53927337536346e+00, 1.50346345700902e+00, 1.46596875796666e+00, 1.42721161300398e+00,  1.38764883929929e+00,\n                                                1.34775324224368e+00, 1.30799351896380e+00, 1.26881392034450e+00, 1.23061537649590e+00,  1.19373995570649e+00,\n                                                1.15846035039500e+00, 1.12497548481507e+00, 1.09341240139200e+00, 1.06383355432351e+00,  1.03624783373294e+00,\n                                                1.01062328977231e+00, 9.86899666717420e-01, 9.64999356997396e-01, 9.44836023964456e-01,  9.26320722323567e-01,\n                                                9.09365753891706e-01, 8.93886710827459e-01, 8.79803214602902e-01, 8.67038814442097e-01,  8.55520417073947e-01,\n                                                8.45177518064929e-01, 8.35941414682821e-01, 8.27744509507752e-01, 8.20519763440871e-01,  8.14200323206151e-01,\n                                                8.08719327601423e-01, 8.04009884551945e-01, 8.00005204193468e-01, 7.96638869407346e-01,  7.93845222901155e-01,\n                                                7.91559848161668e-01, 7.89720119954239e-01, 7.88265798380706e-01, 7.87139638943685e-01,  7.86287989834435e-01,\n                                                7.85661347078914e-01, 7.85214838556243e-01, 7.84908609513749e-01, 7.84708085206887e-01,  7.84584090721694e-01,\n                                                7.84512813766469e-01, 7.84475602964449e-01, 7.84458601542028e-01, 7.84452223802475e-01,  7.84450488910323e-01,\n                                                7.84450232844151e-01, 7.84450208441299e-01, 7.84449709923521e-01, 7.84446332402240e-01,  7.84433916426678e-01,\n                                                7.84400821145994e-01, 7.84328398776054e-01, 7.84189723649803e-01, 7.83948636397525e-01,  7.83559162825455e-01,\n                                                7.82965365155732e-01, 7.82101678888750e-01, 7.80893779611063e-01, 7.79260008388661e-01,  7.77113360071979e-01,\n                                                7.74364005003690e-01, 7.70922272143551e-01, 7.66701973805212e-01, 7.61623904996142e-01,  7.55619311884672e-01,\n                                                7.48633103011144e-01, 7.40626580790590e-01, 7.31579502809893e-01, 7.21491339708223e-01,  7.10381670286282e-01,\n                                                6.98289732112116e-01, 6.85273214082514e-01, 6.71406426464202e-01, 6.56778010103451e-01,  6.41488351735163e-01,\n                                                6.25646862001545e-01, 6.09369252572904e-01, 5.92774922639222e-01, 5.75984535281606e-01,  5.59117832721810e-01,\n                                                5.42291709049238e-01, 5.25618533750659e-01, 5.09204703199259e-01, 4.93149392395466e-01,  4.77543484897353e-01,\n                                                4.62468671338982e-01, 4.47996720898118e-01, 4.34188940469198e-01, 4.21095839832958e-01,  4.08757017004902e-01,\n                                                3.97201267688956e-01, 3.86446909269523e-01, 3.76502296310733e-01, 3.67366493807964e-01,  3.59030068115572e-01,\n                                                3.51475954042385e-01, 3.44680359575250e-01, 3.38613675928386e-01, 3.33241368727371e-01,  3.28524834742865e-01,\n                                                3.24422216541336e-01, 3.20889173885121e-01, 3.17879615199971e-01, 3.15346394756830e-01,  3.13241981466362e-01,\n                                                3.11519103645509e-01, 3.10131371208328e-01, 3.09033872977366e-01, 3.08183742753172e-01,  3.07540683961392e-01,\n                                                3.07067439603472e-01, 3.06730192256992e-01, 3.06498878269707e-01, 3.06347401183558e-01,  3.06253731775612e-01,\n                                                3.06199885730450e-01, 3.06171774566124e-01, 3.06158930645310e-01, 3.06154112496088e-01,  3.06152801847276e-01,\n                                                3.06152608398449e-01, 3.06152589251340e-01, 3.06152190633583e-01, 3.06149489947188e-01,  3.06139562050419e-01,\n                                                3.06113098783470e-01, 3.06055188939268e-01, 3.05944301399308e-01, 3.05751519423751e-01,  3.05440073169649e-01,\n                                                3.04965216079893e-01, 3.04274487904777e-01, 3.03308401615027e-01, 3.02001582102079e-01,  3.00284370257828e-01,\n                                                2.98084886090052e-01, 2.95331518907574e-01, 2.91955782062260e-01, 2.87895435948911e-01,  2.83097748508567e-01,\n                                                2.77522730641778e-01, 2.71146158404278e-01, 2.63962178362789e-01, 2.55985290439668e-01,  2.47251516769964e-01,\n                                                2.37818597473890e-01, 2.27765105593448e-01, 2.17188442880087e-01, 2.06201762393007e-01,  1.94929956574370e-01,\n                                                1.83504940750922e-01, 1.72060539274369e-01, 1.60727331468479e-01, 1.49627826355641e-01,  1.38872303666147e-01,\n                                                1.28555586651302e-01, 1.18754910418787e-01, 1.09528934221601e-01, 1.00917835461800e-01,  9.29443327952555e-02,\n                                                8.56154257905501e-02, 7.89246124110718e-02, 7.28543502406183e-02, 6.73785556261066e-02,  6.24649776300146e-02,\n                                                5.80773319660608e-02, 5.41771267373576e-02, 5.07251519677396e-02, 4.76826361583562e-02,  4.50120949048483e-02,\n                                                4.26779098198722e-02, 4.06466821955007e-02, 3.88874068283087e-02, 3.73715089382642e-02,  3.60727825843128e-02,\n                                                3.49672635079941e-02, 3.40330636690709e-02, 3.32501893238799e-02, 3.26003595548912e-02,  3.20668377474931e-02,\n                                                3.16342845998605e-02, 3.12886377750772e-02, 3.10170202041320e-02, 3.08076762941454e-02,  3.06499329011984e-02,\n                                                3.05341799447660e-02, 3.04518640491978e-02, 3.03954876813606e-02, 3.03586059746124e-02,  3.03358138070138e-02,\n                                                3.03227166988336e-02, 3.03158806043342e-02, 3.03127575418358e-02, 3.03115860388630e-02,  3.03112673678498e-02,\n                                                3.03112203328908e-02, 3.03112154810634e-02, 3.03111124877375e-02, 3.03104147008924e-02,  3.03078496836235e-02,\n                                                3.03010132188035e-02, 3.02860564981842e-02, 3.02574306505505e-02, 3.02077065378370e-02,  3.01274905846327e-02,\n                                                3.00054601207478e-02, 2.98285432012904e-02, 2.95822666969627e-02, 2.92512910486380e-02,  2.88201390455498e-02,\n                                                2.82741084756992e-02, 2.76003347471345e-02, 2.67889413514695e-02, 2.58341869174643e-02,  2.47354928791310e-02,\n                                                2.34982218317299e-02, 2.21340796828571e-02, 2.06610390778934e-02, 1.91027279987281e-02,  1.74872916662707e-02,\n                                                1.58458085288231e-02, 1.42104089769077e-02, 1.26122942816096e-02, 1.10798716793283e-02,  9.63720438008409e-03,\n                                                8.30292566762125e-03, 7.08969493487643e-03, 6.00419566320909e-03, 5.04760610658650e-03,  4.21642375654585e-03,\n                                                3.50349964975294e-03, 2.89913817462661e-03, 2.39213876959354e-03, 1.97069188449461e-03,  1.62308434013880e-03,\n                                                1.33820832419929e-03, 1.10589441160869e-03, 9.17098829333440e-04, 7.63973552579955e-04,  6.39844170208903e-04,\n                                                5.39121178960045e-04, 4.57173893451568e-04, 3.90195737381305e-04, 3.35081175421692e-04,  2.89321210559024e-04,\n                                                2.50913910008421e-04, 2.18283776433736e-04, 1.90207302253498e-04, 1.65746231417074e-04,  1.44190998668137e-04,\n                                                1.25014723138861e-04, 1.07835648321952e-04, 9.23851082319516e-05, 7.84790698133975e-05,  6.59928567614543e-05,\n                                                5.48396630506431e-05, 4.49535507982546e-05, 3.62771087765168e-05, 2.87533249831995e-05,  2.23208313769874e-05,\n                                                1.69115826054167e-05, 1.24501535765376e-05, 8.85404982398086e-06, 6.03462972037505e-06,  3.89839817671600e-06,\n                                                2.34854023517528e-06, 1.28663356235847e-06, 6.14530179632311e-07, -1.42108547152020e-14, 0.00000000000000e+00,\n                                                -1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {8.90000000000000e+01, 8.89999995709214e+01, 8.89999863029604e+01, 8.89998964103105e+01, 8.89995659515003e+01,\n                                                8.89986850395367e+01, 8.89967570326057e+01, 8.89930640846425e+01, 8.89866401946350e+01, 8.89762526106754e+01,\n                                                8.89603921490729e+01, 8.89372727260654e+01, 8.89048402302165e+01, 8.88607908529103e+01, 8.88025991918237e+01,\n                                                8.87275568477084e+01, 8.86328227591932e+01, 8.85154869555908e+01, 8.83726494304869e+01, 8.82015150724753e+01,\n                                                8.79995037352833e+01, 8.77643715474610e+01, 8.74943358353315e+01, 8.71881924258620e+01, 8.68454118134690e+01,\n                                                8.64662009053072e+01, 8.60515204879779e+01, 8.56030549393133e+01, 8.51231387263769e+01, 8.46146517840090e+01,\n                                                8.40809007325227e+01, 8.35255035182225e+01, 8.29522911724072e+01, 8.23652331372844e+01, 8.17683842337709e+01,\n                                                8.11658444708256e+01, 8.05617197504220e+01, 7.99600732341571e+01, 7.93648631740429e+01, 7.87798709761286e+01,\n                                                7.82086295264344e+01, 7.76543632374243e+01, 7.71199473311930e+01, 7.66078871838509e+01, 7.61203130148340e+01,\n                                                7.56589832162458e+01, 7.52252909203894e+01, 7.48202711282534e+01, 7.44446081089564e+01, 7.40986440612212e+01,\n                                                7.37823902932326e+01, 7.34955418646860e+01, 7.32374961471834e+01, 7.30073753279251e+01, 7.28040525858274e+01,\n                                                7.26261815001234e+01, 7.24722281680402e+01, 7.23405054681628e+01, 7.22292088791713e+01, 7.21364532330734e+01,\n                                                7.20603097425182e+01, 7.19988425957226e+01, 7.19501443670859e+01, 7.19123694558991e+01, 7.18837647491501e+01,\n                                                7.18626967156026e+01, 7.18476741832898e+01, 7.18373661346789e+01, 7.18306139731691e+01, 7.18264378681167e+01,\n                                                7.18240369670288e+01, 7.18227834642240e+01, 7.18222107247709e+01, 7.18219958698352e+01, 7.18219374240273e+01,\n                                                7.18219287975464e+01, 7.18219276167029e+01, 7.18218997291766e+01, 7.18217107873763e+01, 7.18210162217340e+01,\n                                                7.18191647985575e+01, 7.18151131757970e+01, 7.18073544908527e+01, 7.17938641289210e+01, 7.17720656350673e+01,\n                                                7.17388194998876e+01, 7.16904372215949e+01, 7.16227225680813e+01, 7.15310412691343e+01, 7.14104194099882e+01,\n                                                7.12556695476248e+01, 7.10615420472881e+01, 7.08228974057233e+01, 7.05348935039727e+01, 7.01931799595816e+01,\n                                                6.97940901748065e+01, 6.93348204510386e+01, 6.88135848389578e+01, 6.82297345011319e+01, 6.75838317115569e+01,\n                                                6.68776716912641e+01, 6.61142504883078e+01, 6.52976834919674e+01, 6.44330852635838e+01, 6.35264246959461e+01,\n                                                6.25843679578581e+01, 6.16141152237182e+01, 6.06232292137762e+01, 5.96194501244071e+01, 5.86104974586790e+01,\n                                                5.76038727757662e+01, 5.66066883731151e+01, 5.56255442287625e+01, 5.46664584974740e+01, 5.37348377132041e+01,\n                                                5.28354650611366e+01, 5.19724910397248e+01, 5.11494225265344e+01, 5.03691148200331e+01, 4.96337733643516e+01,\n                                                4.89449693166356e+01, 4.83036691481724e+01, 4.77102754037608e+01, 4.71646743948340e+01, 4.66662867452749e+01,\n                                                4.62141177147325e+01, 4.58068054875086e+01, 4.54426667359950e+01, 4.51197395656982e+01, 4.48358244015004e+01,\n                                                4.45885235427372e+01, 4.43752800841041e+01, 4.41934167485459e+01, 4.40401749645378e+01, 4.39127542801616e+01,\n                                                4.38083519617761e+01, 4.37242023894051e+01, 4.36576156447849e+01, 4.36060145019295e+01, 4.35669688854825e+01,\n                                                4.35382267705407e+01, 4.35177404691186e+01, 4.35036872898644e+01, 4.34944836711510e+01, 4.34887920696673e+01,\n                                                4.34855201275792e+01, 4.34838119263830e+01, 4.34830314459798e+01, 4.34827386625877e+01, 4.34826590185714e+01,\n                                                4.34826472632875e+01, 4.34826461473871e+01, 4.34826233968287e+01, 4.34824692587306e+01, 4.34819026350093e+01,\n                                                4.34803922567151e+01, 4.34770869957149e+01, 4.34707576574548e+01, 4.34597528620114e+01, 4.34419714913259e+01,\n                                                4.34148540128794e+01, 4.33753947415435e+01, 4.33201767170506e+01, 4.32454302954093e+01, 4.31471157269252e+01,\n                                                4.30210288914699e+01, 4.28629279915562e+01, 4.26686774273468e+01, 4.24344034208704e+01, 4.21566544105916e+01,\n                                                4.18325580439306e+01, 4.14599660102578e+01, 4.10375781877698e+01, 4.05650386980866e+01, 4.00429983234058e+01,\n                                                3.94731399257252e+01, 3.88581654065968e+01, 3.82017438333993e+01, 3.75084206653050e+01, 3.67834885602760e+01,\n                                                3.60328228825733e+01, 3.52626910972478e+01, 3.44795533852329e+01, 3.36898770886542e+01, 3.28999843247929e+01,\n                                                3.21159395476679e+01, 3.13434687318722e+01, 3.05878935932017e+01, 2.98540669823070e+01, 2.91463055444869e+01,\n                                                2.84683256605365e+01, 2.78231934799716e+01, 2.72132987502024e+01, 2.66403573156721e+01, 2.61054414729628e+01,\n                                                2.56090328952566e+01, 2.51510904667472e+01, 2.47311250308618e+01, 2.43482741801272e+01, 2.40013720931134e+01,\n                                                2.36890114529716e+01, 2.34095962638750e+01, 2.31613857226876e+01, 2.29425301671250e+01, 2.27511005675123e+01,\n                                                2.25851131570504e+01, 2.24425507089991e+01, 2.23213817554659e+01, 2.22195787651026e+01, 2.21351359974379e+01,\n                                                2.20660874545490e+01, 2.20105250705573e+01, 2.19666170249257e+01, 2.19326258439143e+01, 2.19069257729865e+01,\n                                                2.18880187689470e+01, 2.18745483812283e+01, 2.18653107723543e+01, 2.18592621703598e+01, 2.18555221486230e+01,\n                                                2.18533722840685e+01, 2.18522499412354e+01, 2.18517371518385e+01, 2.18515447897948e+01, 2.18514924629345e+01,\n                                                2.18514847396097e+01, 2.18514840522890e+01, 2.18514705223020e+01, 2.18513788549187e+01, 2.18510418799530e+01,\n                                                2.18501436593871e+01, 2.18481780827963e+01, 2.18444143705376e+01, 2.18378711266484e+01, 2.18273005581740e+01,\n                                                2.18111844317637e+01, 2.17877432343847e+01, 2.17549597948031e+01, 2.17106182538110e+01, 2.16523586969406e+01,\n                                                2.15777469535974e+01, 2.14843580215872e+01, 2.13698703397942e+01, 2.12321668014499e+01, 2.10694371296803e+01,\n                                                2.08802752285299e+01, 2.06637646062996e+01, 2.04195451617500e+01, 2.01478556779308e+01, 1.98495483001064e+01,\n                                                1.95260739068662e+01, 1.91794402180655e+01, 1.88121471337317e+01, 1.84271055169298e+01, 1.80275459283271e+01,\n                                                1.76169226141250e+01, 1.71988158791139e+01, 1.67768339718933e+01, 1.63545151015379e+01, 1.59352319657114e+01,\n                                                1.55221045966779e+01, 1.51179302724424e+01, 1.47251390713784e+01, 1.43457792494919e+01, 1.39815296497040e+01,\n                                                1.36337303494992e+01, 1.33034205882354e+01, 1.29913750100753e+01, 1.26981334932778e+01, 1.24240239081752e+01,\n                                                1.21691796228453e+01, 1.19335542917126e+01, 1.17169360059339e+01, 1.15189619777990e+01, 1.13391340839428e+01,\n                                                1.11768350330096e+01, 1.10313446773866e+01, 1.09018559794870e+01, 1.07874902695213e+01, 1.06873116073132e+01,\n                                                1.06003402270936e+01, 1.05255651695846e+01, 1.04619562781614e+01, 1.04084757560477e+01, 1.03640894567326e+01,\n                                                1.03277780205227e+01, 1.02985478877727e+01, 1.02754421252387e+01, 1.02575509070431e+01, 1.02440214059474e+01,\n                                                1.02340667828232e+01, 1.02269739195262e+01, 1.02221095277198e+01, 1.02189242857985e+01, 1.02169547071901e+01,\n                                                1.02158225222648e+01, 1.02152314565966e+01, 1.02149614022356e+01, 1.02148600968844e+01, 1.02148325395012e+01,\n                                                1.02148284720938e+01, 1.02148281125141e+01, 1.02148210610086e+01, 1.02147732861461e+01, 1.02145976625616e+01,\n                                                1.02141295288835e+01, 1.02131051024298e+01, 1.02111434815844e+01, 1.02077330774225e+01, 1.02022232953399e+01,\n                                                1.01938222563083e+01, 1.01816012891779e+01, 1.01645068188790e+01, 1.01413800976120e+01, 1.01109849569266e+01,\n                                                1.00720433852695e+01, 1.00232782580818e+01, 9.96346198306144e+00, 9.89146920891561e+00, 9.80633113889243e+00,\n                                                9.70728846379289e+00, 9.59383956498819e+00, 9.46578051659286e+00, 9.32323360436004e+00, 9.16666161846096e+00,\n                                                8.99686607196054e+00, 8.81496870158226e+00, 8.62237701951780e+00, 8.42073614195785e+00, 8.21187041164832e+00,\n                                                7.99771923439189e+00, 7.78027187986969e+00, 7.56150567426224e+00, 7.34333110070300e+00, 7.12754603581354e+00,\n                                                6.91579999331381e+00, 6.70956812584264e+00, 6.51013405845845e+00, 6.31858042777341e+00, 6.13578614628202e+00,\n                                                5.96242966976035e+00, 5.79899769438460e+00, 5.64579863521175e+00, 5.50297997098474e+00, 5.37054822293986e+00,\n                                                5.24839013097038e+00, 5.13629360186486e+00, 5.03396723623852e+00, 4.94105761802420e+00, 4.85716396672211e+00,\n                                                4.78185011764506e+00, 4.71465405905124e+00, 4.65509540781098e+00, 4.60268126448622e+00, 4.55691088249152e+00,\n                                                4.51727954138755e+00, 4.48328195160464e+00, 4.45441544954075e+00, 4.43018317434175e+00, 4.41009735314074e+00,\n                                                4.39368276061121e+00, 4.38048036145780e+00, 4.37005109141207e+00, 4.36197968462581e+00, 4.35587841496040e+00,\n                                                4.35139058786851e+00, 4.34819360067149e+00, 4.34600138391755e+00, 4.34456604615559e+00, 4.34367856868462e+00,\n                                                4.34316843412195e+00, 4.34290212019691e+00, 4.34278044425407e+00, 4.34273480023047e+00, 4.34272238402706e+00,\n                                                4.34272055142426e+00, 4.34272038690811e+00, 4.34271713234757e+00, 4.34269508229592e+00, 4.34261402509452e+00,\n                                                4.34239796496642e+00, 4.34192516634928e+00, 4.34101986780784e+00, 4.33944606957650e+00, 4.33690379779605e+00,\n                                                4.33302824264373e+00, 4.32739214647164e+00, 4.31951176850758e+00, 4.30885666028654e+00, 4.29486333800604e+00,\n                                                4.27695272676029e+00, 4.25455097840221e+00, 4.22711294352337e+00, 4.19414723753522e+00, 4.15524152447537e+00,\n                                                4.11008640378627e+00, 4.05849618067425e+00, 4.00042487499364e+00, 3.93597609762666e+00, 3.86540588167556e+00,\n                                                3.78911814308391e+00, 3.70765307420713e+00, 3.62166934554442e+00, 3.53192142270359e+00, 3.43923355513743e+00,\n                                                3.34447206629299e+00, 3.24851751410095e+00, 3.15223814878389e+00, 3.05646590828616e+00, 2.96197596955605e+00,\n                                                2.86947060710013e+00, 2.77956779102490e+00, 2.69279459725317e+00, 2.60958513936076e+00, 2.53028241561715e+00,\n                                                2.45514324376165e+00, 2.38434535724004e+00, 2.31799575994232e+00, 2.25613955713459e+00, 2.19876865899359e+00,\n                                                2.14582994848107e+00, 2.09723268362298e+00, 2.05285504508808e+00, 2.01254983637847e+00, 1.97614939965082e+00,\n                                                1.94346983496936e+00, 1.91431461615811e+00, 1.88847769241562e+00, 1.86574615840162e+00, 1.84590257012613e+00,\n                                                1.82872698039337e+00, 1.81399876473945e+00, 1.80149830497808e+00, 1.79100859094007e+00, 1.78231679064307e+00,\n                                                1.77521582465822e+00, 1.76950596236161e+00, 1.76499643728710e+00, 1.76150705763413e+00, 1.75886976810000e+00,\n                                                1.75693010257469e+00, 1.75554845561324e+00, 1.75460109529870e+00, 1.75398084184286e+00, 1.75359734505797e+00,\n                                                1.75337690897477e+00, 1.75326183205723e+00, 1.75320925487969e+00, 1.75318953175618e+00, 1.75318416662527e+00,\n                                                1.75318337474452e+00, 1.75318330174727e+00, 1.75318183640897e+00, 1.75317190856488e+00, 1.75313541333597e+00,\n                                                1.75303813488051e+00, 1.75282526581543e+00, 1.75241768212625e+00, 1.75170915983861e+00, 1.75056472184099e+00,\n                                                1.74882030348846e+00, 1.74628391900757e+00, 1.74273849095466e+00, 1.73794646531081e+00, 1.73165626929261e+00,\n                                                1.72361057404910e+00, 1.71355620056566e+00, 1.70125536023080e+00, 1.68649776378459e+00, 1.66911298162120e+00,\n                                                1.64898231613883e+00, 1.62604937434642e+00, 1.60032852259603e+00, 1.57191047193157e+00, 1.54096437697257e+00,\n                                                1.50773601785141e+00, 1.47254185355655e+00, 1.43575897136979e+00, 1.39781121007198e+00, 1.35915201867481e+00,\n                                                1.32024494557901e+00, 1.28154303105666e+00, 1.24346874300454e+00, 1.20639633315294e+00, 1.17063844635348e+00,\n                                                1.13643837917282e+00, 1.10396857386777e+00, 1.07333493188115e+00, 1.04458562522362e+00, 1.01772253840613e+00,\n                                                9.92713406247006e-01, 9.69503059888908e-01, 9.48022768052894e-01, 9.28197256470781e-01, 9.09949459883208e-01,\n                                                8.93203350058755e-01, 8.77885302580950e-01, 8.63924463096595e-01, 8.51252504483142e-01, 8.39803072969644e-01,\n                                                8.29511130580926e-01, 8.20312326329628e-01, 8.12142472860657e-01, 8.04937167091609e-01, 7.98631569034455e-01,\n                                                7.93160338384510e-01, 7.88457720157041e-01, 7.84457766020267e-01, 7.81094675220274e-01, 7.78303237000372e-01,\n                                                7.76019354570465e-01, 7.74180628737199e-01, 7.72726977271191e-01, 7.71601264142774e-01, 7.70749911186783e-01,\n                                                7.70123463888396e-01, 7.69677083136500e-01, 7.69370936229748e-01, 7.69170463297058e-01, 7.69046499628033e-01,\n                                                7.68975240058850e-01, 7.68938038238275e-01, 7.68921040897752e-01, 7.68914664685894e-01, 7.68912930208998e-01,\n                                                7.68912674204088e-01, 7.68912649807092e-01, 7.68912151408600e-01, 7.68908774695191e-01, 7.68896361684725e-01,\n                                                7.68863274272206e-01, 7.68790868940513e-01, 7.68652225751936e-01, 7.68411191878613e-01, 7.68021798809485e-01,\n                                                7.67428110340418e-01, 7.66564554008838e-01, 7.65356779819655e-01, 7.63723074809462e-01, 7.61576338394889e-01,\n                                                7.58826590672101e-01, 7.55383944637245e-01, 7.51161926715739e-01, 7.46080983534952e-01, 7.40071974134395e-01,\n                                                7.33079424133237e-01, 7.25064318865464e-01, 7.16006239720357e-01, 7.05904700209729e-01, 6.94779608423389e-01,\n                                                6.82670859329150e-01, 6.69637131628207e-01, 6.55754019691898e-01, 6.41111666081144e-01, 6.25812073660569e-01,\n                                                6.09966271087529e-01, 5.93691485559376e-01, 5.77108446264845e-01, 5.60338905042073e-01, 5.43503421807557e-01,\n                                                5.26719426635992e-01, 5.10099543237402e-01, 4.93750143853873e-01, 4.77770104242751e-01, 4.62249736962974e-01,\n                                                4.47269896505276e-01, 4.32901264845810e-01, 4.19203835681387e-01, 4.06226617197134e-01, 3.94007566721498e-01,\n                                                3.82573758258218e-01, 3.71941769024204e-01, 3.62118257192705e-01, 3.53100692662210e-01, 3.44878197264094e-01,\n                                                3.37432450580195e-01, 3.30738621724663e-01, 3.24766294746865e-01, 3.19480364235815e-01, 3.14841886861487e-01,\n                                                3.10808882836483e-01, 3.07337087852048e-01, 3.04380660490821e-01, 3.01892852325082e-01, 2.99826647996724e-01,\n                                                2.98135380851619e-01, 2.96773326616446e-01, 2.95696273675532e-01, 2.94862064286590e-01, 2.94231097103960e-01,\n                                                2.93766778142626e-01, 2.93435905202628e-01, 2.93208970048710e-01, 2.93060363420295e-01, 2.92968470199028e-01,\n                                                2.92915645603784e-01, 2.92888067820869e-01, 2.92875467627539e-01, 2.92870740912349e-01, 2.92869455136142e-01,\n                                                2.92869265358476e-01, 2.92869246574696e-01, 2.92868855521689e-01, 2.92866206087808e-01, 2.92856466604903e-01,\n                                                2.92830505613026e-01, 2.92773695152135e-01, 2.92664913701117e-01, 2.92475796228700e-01, 2.92170278142422e-01,\n                                                2.91704478747860e-01, 2.91026967192877e-01, 2.90079448561386e-01, 2.88797898512001e-01, 2.87114160501673e-01,\n                                                2.84957999470819e-01, 2.82259579817762e-01, 2.78952304337921e-01, 2.74975916283168e-01, 2.70279731490419e-01,\n                                                2.64825835076508e-01, 2.58592051405003e-01, 2.51574480867262e-01, 2.43789396123447e-01, 2.35274306764893e-01,\n                                                2.26088036800263e-01, 2.16309714441294e-01, 2.06036646902433e-01, 1.95381140220789e-01, 1.84466418079694e-01,\n                                                1.73421883634674e-01, 1.62378041468955e-01, 1.51461440152715e-01, 1.40789999695045e-01, 1.30469048923175e-01,\n                                                1.20588319883538e-01, 1.11220041629309e-01, 1.02418161022626e-01, 9.42186111652035e-02, 8.66404634437856e-02,\n                                                7.96877457808307e-02, 7.33516895973736e-02, 6.76131774215634e-02, 6.24451943495075e-02, 5.78151305332710e-02,\n                                                5.36868299269031e-02, 5.00223259026029e-02, 4.67832426869137e-02, 4.39318707967544e-02, 4.14319445614808e-02,\n                                                3.92491614156825e-02, 3.73514875906835e-02, 3.57092949387408e-02, 3.42953705775528e-02, 3.30848362207945e-02,\n                                                3.20550084950213e-02, 3.11852259216323e-02, 3.04566629664151e-02, 2.98521468086363e-02, 2.93559882912859e-02,\n                                                2.89538348372815e-02, 2.86325498723414e-02, 2.83801204196408e-02, 2.81855919849221e-02, 2.80390276395792e-02,\n                                                2.79314863808366e-02, 2.78550144720100e-02, 2.78026426228593e-02, 2.77683816174914e-02, 2.77472093578268e-02,\n                                                2.77350432271533e-02, 2.77286930972593e-02, 2.77257920555485e-02, 2.77247038369239e-02, 2.77244078209833e-02,\n                                                2.77243641298668e-02, 2.77243596229511e-02, 2.77242639517965e-02, 2.77236157732403e-02, 2.77212331149315e-02,\n                                                2.77148827033358e-02, 2.77009894507927e-02, 2.76743993233737e-02, 2.76282123785450e-02, 2.75537054693302e-02,\n                                                2.74403667029901e-02, 2.72760651625532e-02, 2.70473782921243e-02, 2.67400942142757e-02, 2.63398957496435e-02,\n                                                2.58332162556343e-02, 2.52082348300320e-02, 2.44559516519871e-02, 2.35712567136517e-02, 2.25538820287881e-02,\n                                                2.14091146993525e-02, 2.01481518790132e-02, 1.87880027375797e-02, 1.73508874604238e-02, 1.58631447714157e-02,\n                                                1.43537281995521e-02, 1.28524345822143e-02, 1.13880527308510e-02, 9.98663537816924e-03, 8.67007924134100e-03,\n                                                7.45514973597494e-03, 6.35301882734041e-03, 5.36931077361658e-03, 4.50458503462414e-03, 3.75513896085522e-03,\n                                                3.11399070164953e-03, 2.57190574912158e-03, 2.11835484527967e-03, 1.74232879278691e-03, 1.43297634106432e-03,\n                                                1.18006412871807e-03, 9.74276371664473e-04, 8.07377758150096e-04, 6.72263031631815e-04, 5.62918294519932e-04,\n                                                4.74323555479828e-04, 4.02328526604379e-04, 3.43528610159183e-04, 2.95155596631957e-04, 2.54984355066767e-04,\n                                                2.21249872794260e-04, 1.92570078382914e-04, 1.67874681409330e-04, 1.46343260880144e-04, 1.27354893606935e-04,\n                                                1.10448504372584e-04, 9.52907800524372e-05, 8.16483744756624e-05, 6.93626580670070e-05, 5.83269913363438e-05,\n                                                4.84673918776934e-05, 3.97273780805563e-05, 3.20571489993426e-05, 2.54066200824354e-05, 1.97214701103121e-05,\n                                                1.49413021404143e-05, 1.09991675145693e-05, 7.82191770554164e-06, 5.33104714861565e-06, 3.44383360584288e-06,\n                                                2.07467712698417e-06, 1.13659454825665e-06, 5.42866558816968e-07, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {9.00000000000000e+01, 8.99999995640996e+01, 8.99999860851934e+01, 8.99998947633541e+01, 8.99995590506156e+01,\n                                                8.99986641330187e+01, 8.99967054721160e+01, 8.99929538067190e+01, 8.99864277710757e+01, 8.99758749980574e+01,\n                                                8.99597622756672e+01, 8.99362750592930e+01, 8.99033264726964e+01, 8.98585759249567e+01, 8.97994576788168e+01,\n                                                8.97232201269988e+01, 8.96269770736870e+01, 8.95077727620662e+01, 8.93626624003841e+01, 8.91888091299353e+01,\n                                                8.89835964442480e+01, 8.87447519764928e+01, 8.84704747302842e+01, 8.81595541427089e+01, 8.78114670887630e+01,\n                                                8.74264392840967e+01, 8.70054611996027e+01, 8.65502552722719e+01, 8.60631994788019e+01, 8.55472200327096e+01,\n                                                8.50056707777995e+01, 8.44422172211937e+01, 8.38607388656640e+01, 8.32652558347473e+01, 8.26598771071627e+01,\n                                                8.20487607373468e+01, 8.14360735402577e+01, 8.08259399665629e+01, 8.02223765914221e+01, 7.96292170815327e+01,\n                                                7.90500387360077e+01, 7.84881025215078e+01, 7.79463137391692e+01, 7.74272032240842e+01, 7.69329234759613e+01,\n                                                7.64652525920929e+01, 7.60256006743576e+01, 7.56150163745572e+01, 7.52341936442906e+01, 7.48834799142797e+01,\n                                                7.45628870525528e+01, 7.42721060396124e+01, 7.40105257637639e+01, 7.37772558983143e+01, 7.35711535354446e+01,\n                                                7.33908530975399e+01, 7.32347989774360e+01, 7.31012803295581e+01, 7.29884674134900e+01, 7.28944488641593e+01,\n                                                7.28172692241671e+01, 7.27549660272211e+01, 7.27056056749535e+01, 7.26673173123618e+01, 7.26383238895199e+01,\n                                                7.26169696076540e+01, 7.26017429924967e+01, 7.25912949204805e+01, 7.25844510439343e+01, 7.25802182168006e+01,\n                                                7.25777847061645e+01, 7.25765141782416e+01, 7.25759336598724e+01, 7.25757158867970e+01, 7.25756566471843e+01,\n                                                7.25756479035395e+01, 7.25756467066580e+01, 7.25756184403663e+01, 7.25754269323814e+01, 7.25747229332627e+01,\n                                                7.25728463645905e+01, 7.25687397150240e+01, 7.25608756605628e+01, 7.25472021021014e+01, 7.25251076266273e+01,\n                                                7.24914101631685e+01, 7.24423712744221e+01, 7.23737380403775e+01, 7.22808137882817e+01, 7.21585579512773e+01,\n                                                7.20017140696130e+01, 7.18049633987104e+01, 7.15630998234430e+01, 7.12712199112515e+01, 7.09249201130899e+01,\n                                                7.05204914962718e+01, 7.00551011296077e+01, 6.95269485430862e+01, 6.89353858640287e+01, 6.82809917396514e+01,\n                                                6.75655924584378e+01, 6.67922289074385e+01, 6.59650744519739e+01, 6.50893146973112e+01, 6.41710028716645e+01,\n                                                6.32169023083158e+01, 6.22343206332515e+01, 6.12309327513284e+01, 6.02145878764965e+01, 5.91931038386929e+01,\n                                                5.81740662322510e+01, 5.71646591660473e+01, 5.61715480948568e+01, 5.52008157411733e+01, 5.42579338061903e+01,\n                                                5.33477484463890e+01, 5.24744660080609e+01, 5.16416377149675e+01, 5.08521494978079e+01, 5.01082238948351e+01,\n                                                4.94114374984146e+01, 4.87627531854095e+01, 4.81625634636087e+01, 4.76107402438273e+01, 4.71066868012226e+01,\n                                                4.66493889085267e+01, 4.62374634922129e+01, 4.58692043047345e+01, 4.55426248757085e+01, 4.52554994095750e+01,\n                                                4.50054024175954e+01, 4.47897478042597e+01, 4.46058279530854e+01, 4.44508531301526e+01, 4.43219912787772e+01,\n                                                4.42164080337397e+01, 4.41313065493431e+01, 4.40639665212474e+01, 4.40117815973654e+01, 4.39722942294096e+01,\n                                                4.39432269256618e+01, 4.39225088376159e+01, 4.39082966555135e+01, 4.38989889027862e+01, 4.38932329035350e+01,\n                                                4.38899239408567e+01, 4.38881964120786e+01, 4.38874071008581e+01, 4.38871110047401e+01, 4.38870304595839e+01,\n                                                4.38870185712937e+01, 4.38870174427673e+01, 4.38869944347955e+01, 4.38868385526873e+01, 4.38862655178465e+01,\n                                                4.38847380502166e+01, 4.38813953914255e+01, 4.38749944388273e+01, 4.38638651270544e+01, 4.38458825628688e+01,\n                                                4.38184582495439e+01, 4.37785524857127e+01, 4.37227096351778e+01, 4.36471173790421e+01, 4.35476902277012e+01,\n                                                4.34201764581643e+01, 4.32602862610817e+01, 4.30638372952616e+01, 4.28269121836130e+01, 4.25460209363903e+01,\n                                                4.22182600965265e+01, 4.18414598174238e+01, 4.14143102983616e+01, 4.09364600662733e+01, 4.04085803303402e+01,\n                                                3.98323916252484e+01, 3.92106506440723e+01, 3.85470961707689e+01, 3.78463536352567e+01, 3.71137992607856e+01,\n                                                3.63553887644708e+01, 3.55774626701625e+01, 3.47865479581089e+01, 3.39891785189248e+01, 3.31917502757080e+01,\n                                                3.24004127026121e+01, 3.16209850672975e+01, 3.08588812685351e+01, 3.01190330352227e+01, 2.94058119914704e+01,\n                                                2.87229596530554e+01, 2.80735370625310e+01, 2.74599028883179e+01, 2.68837230683803e+01, 2.63460092673858e+01,\n                                                2.58471793188734e+01, 2.53871310280600e+01, 2.49653209403759e+01, 2.45808412448730e+01, 2.42324901352203e+01,\n                                                2.39188331039529e+01, 2.36382544361531e+01, 2.33889994467766e+01, 2.31692087736336e+01, 2.29769463830322e+01,\n                                                2.28102229847769e+01, 2.26670163992725e+01, 2.25452901601660e+01, 2.24430113319806e+01, 2.23581682105291e+01,\n                                                2.22887882746581e+01, 2.22329564814307e+01, 2.21888337491985e+01, 2.21546752593793e+01, 2.21288480340791e+01,\n                                                2.21098471198331e+01, 2.20963096344443e+01, 2.20870259194246e+01, 2.20809470870853e+01, 2.20771883568000e+01,\n                                                2.20750277324320e+01, 2.20738997707706e+01, 2.20733844138021e+01, 2.20731910885281e+01, 2.20731384996415e+01,\n                                                2.20731307376419e+01, 2.20731300468794e+01, 2.20731164491405e+01, 2.20730243227251e+01, 2.20726856602645e+01,\n                                                2.20717829411165e+01, 2.20698075177604e+01, 2.20660249411385e+01, 2.20594488711722e+01, 2.20488251910052e+01,\n                                                2.20326278947679e+01, 2.20090682114601e+01, 2.19761182138740e+01, 2.19315497891525e+01, 2.18729892697341e+01,\n                                                2.17979872106952e+01, 2.17041017536376e+01, 2.15889927845468e+01, 2.14505227740705e+01, 2.12868589410101e+01,\n                                                2.10965704091630e+01, 2.08787135632376e+01, 2.06328990618415e+01, 2.03593350672380e+01, 2.00588431907566e+01,\n                                                1.97328462161168e+01, 1.93833294180719e+01, 1.90127796440741e+01, 1.86241076631466e+01, 1.82205592290461e+01,\n                                                1.78056189704543e+01, 1.73829093782572e+01, 1.69560860879742e+01, 1.65287315572612e+01, 1.61042523156570e+01,\n                                                1.56857887143350e+01, 1.52761477163283e+01, 1.48777664502634e+01, 1.44927073429705e+01, 1.41226779213661e+01,\n                                                1.37690637889493e+01, 1.34329636201700e+01, 1.31152190266588e+01, 1.28164370625797e+01, 1.25370067175351e+01,\n                                                1.22771122373109e+01, 1.20367459368655e+01, 1.18157221740036e+01, 1.16136930529818e+01, 1.14301656146663e+01,\n                                                1.12645198484755e+01, 1.11160267710881e+01, 1.09838659387389e+01, 1.08671419791706e+01, 1.07648999618324e+01,\n                                                1.06761396206186e+01, 1.05998285796249e+01, 1.05349148046876e+01, 1.04803385177999e+01, 1.04350437786849e+01,\n                                                1.03979898701983e+01, 1.03681625341952e+01, 1.03445850037754e+01, 1.03263286773836e+01, 1.03125231900959e+01,\n                                                1.03023655663600e+01, 1.02951280935785e+01, 1.02901645420979e+01, 1.02869143765784e+01, 1.02849046555361e+01,\n                                                1.02837493962432e+01, 1.02831462847045e+01, 1.02828707267206e+01, 1.02827673568084e+01, 1.02827392378182e+01,\n                                                1.02827350875190e+01, 1.02827347206112e+01, 1.02827275253994e+01, 1.02826787769083e+01, 1.02824995742110e+01,\n                                                1.02820219003059e+01, 1.02809765971956e+01, 1.02789750023240e+01, 1.02754951057423e+01, 1.02698730665127e+01,\n                                                1.02613008955135e+01, 1.02488310528194e+01, 1.02313885993989e+01, 1.02077913615912e+01, 1.01767782919401e+01,\n                                                1.01370458282773e+01, 1.00872915641824e+01, 1.00262639652909e+01, 9.95281623509021e+00, 9.86596180919155e+00,\n                                                9.76492841421124e+00, 9.64920725199829e+00, 9.51859374715480e+00, 9.37321649740542e+00, 9.21355163663580e+00,\n                                                9.04042076157617e+00, 8.85497183197771e+00, 8.65864391307102e+00, 8.45311810740745e+00, 8.24025829651724e+00,\n                                                8.02204615530350e+00, 7.80051514630580e+00, 7.57768779831073e+00, 7.35551962874399e+00, 7.13585182444488e+00,\n                                                6.92037356176277e+00, 6.71059389965383e+00, 6.50782266093843e+00, 6.31315959117539e+00, 6.12749116936759e+00,\n                                                5.95149450937201e+00, 5.78564767410180e+00, 5.63024540933263e+00, 5.48541891052861e+00, 5.35115794256564e+00,\n                                                5.22733357401223e+00, 5.11371999609773e+00, 5.01001430190219e+00, 4.91585358281928e+00, 4.83082914340409e+00,\n                                                4.75449797217709e+00, 4.68639181437051e+00, 4.62602428837985e+00, 4.57289650249072e+00, 4.52650159472606e+00,\n                                                4.48632856148639e+00, 4.45186567576506e+00, 4.42260373101142e+00, 4.39803928493880e+00, 4.37767801888330e+00,\n                                                4.36103827209746e+00, 4.34765475634853e+00, 4.33708240495992e+00, 4.32890026350869e+00, 4.32271528903259e+00,\n                                                4.31816589346080e+00, 4.31492504765210e+00, 4.31270275696004e+00, 4.31124772875603e+00, 4.31034807667855e+00,\n                                                4.30983094401850e+00, 4.30956097677304e+00, 4.30943763167036e+00, 4.30939136149901e+00, 4.30937877496933e+00,\n                                                4.30937691722677e+00, 4.30937675045378e+00, 4.30937345124697e+00, 4.30935109871136e+00, 4.30926892956278e+00,\n                                                4.30904990551352e+00, 4.30857062104532e+00, 4.30765290369190e+00, 4.30605751646102e+00, 4.30348037106376e+00,\n                                                4.29955165475499e+00, 4.29383825237932e+00, 4.28584979529752e+00, 4.27504857579204e+00, 4.26086341650156e+00,\n                                                4.24270737175358e+00, 4.21999886272525e+00, 4.19218552518225e+00, 4.15876970594100e+00, 4.11933422528287e+00,\n                                                4.07356678040158e+00, 4.02128125399150e+00, 3.96243425589975e+00, 3.89713548404205e+00, 3.82565092916225e+00,\n                                                3.74839851571144e+00, 3.66593638937709e+00, 3.57894464256498e+00, 3.48820173820280e+00, 3.39455720731698e+00,\n                                                3.29890235131134e+00, 3.20214069618160e+00, 3.10515985037769e+00, 3.00880622922112e+00, 2.91386383336041e+00,\n                                                2.82103791148434e+00, 2.73094391597144e+00, 2.64410171305128e+00, 2.56093459210300e+00, 2.48177228982625e+00,\n                                                2.40685704656238e+00, 2.33635165864075e+00, 2.27034856706173e+00, 2.20887919151153e+00, 2.15192293238675e+00,\n                                                2.09941547804870e+00, 2.05125623780745e+00, 2.00731485660532e+00, 1.96743685279517e+00, 1.93144846363678e+00,\n                                                1.89916079687346e+00, 1.87037338404346e+00, 1.84487722242457e+00, 1.82245738417812e+00, 1.80289526603826e+00,\n                                                1.78597055061570e+00, 1.77146294927260e+00, 1.75915379430019e+00, 1.74882754283028e+00, 1.74027324534201e+00,\n                                                1.73328601751345e+00, 1.72766853611900e+00, 1.72323255899448e+00, 1.71980044757551e+00, 1.71720665019174e+00,\n                                                1.71529908719566e+00, 1.71394036690356e+00, 1.71300875557029e+00, 1.71239882593581e+00, 1.71202171729850e+00,\n                                                1.71180495489790e+00, 1.71169179630213e+00, 1.71164009569662e+00, 1.71162070141767e+00, 1.71161542574160e+00,\n                                                1.71161464706424e+00, 1.71161457528410e+00, 1.71161313437811e+00, 1.71160337206727e+00, 1.71156748536869e+00,\n                                                1.71147182912804e+00, 1.71126251072967e+00, 1.71086172886626e+00, 1.71016504087454e+00, 1.70903974598197e+00,\n                                                1.70732457284468e+00, 1.70483085392208e+00, 1.70134535011442e+00, 1.69663484982586e+00, 1.69045260115132e+00,\n                                                1.68254654056257e+00, 1.67266915668294e+00, 1.66058867941069e+00, 1.64610112493719e+00, 1.62904257402266e+00,\n                                                1.60930093576098e+00, 1.58682637338218e+00, 1.56163955894883e+00, 1.53383698749330e+00, 1.50359271441130e+00,\n                                                1.47115606967451e+00, 1.43684513250751e+00, 1.40103601008408e+00, 1.36414825507735e+00, 1.32662709082757e+00,\n                                                1.28892349479314e+00, 1.25147359358222e+00, 1.21467916306388e+00, 1.17889116903432e+00, 1.14439808705089e+00,\n                                                1.11142014158183e+00, 1.08010969038119e+00, 1.05055698421063e+00, 1.02279974585606e+00, 9.96834649420379e-01,\n                                                9.72628885177244e-01, 9.50130445768764e-01, 9.29276363175674e-01, 9.09998676236711e-01, 8.92228305316223e-01,\n                                                8.75897227113740e-01, 8.60939408361730e-01, 8.47290924699607e-01, 8.34889610512079e-01, 8.23674493262772e-01,\n                                                8.13585182609017e-01, 8.04561318960864e-01, 7.96542139168594e-01, 7.89466185934458e-01, 7.83271168371613e-01,\n                                                7.77893970045810e-01, 7.73270794740483e-01, 7.69337436836537e-01, 7.66029661118594e-01, 7.63283675114934e-01,\n                                                7.61036675309953e-01, 7.59227446589293e-01, 7.57796992169006e-01, 7.56689169233141e-01, 7.55851303860965e-01,\n                                                7.55234757893263e-01, 7.54795420486843e-01, 7.54494098480706e-01, 7.54296782499480e-01, 7.54174769954915e-01,\n                                                7.54104631630554e-01, 7.54068015068043e-01, 7.54051285106485e-01, 7.54045009192794e-01, 7.54043301998976e-01,\n                                                7.54043050020982e-01, 7.54043026007736e-01, 7.54042535448946e-01, 7.54039211850156e-01, 7.54026994087624e-01,\n                                                7.53994427079576e-01, 7.53923160362604e-01, 7.53786696693936e-01, 7.53549449700969e-01, 7.53166168337259e-01,\n                                                7.52581783754067e-01, 7.51731729726785e-01, 7.50542779133525e-01, 7.48934424158307e-01, 7.46820805163452e-01,\n                                                7.44113161694258e-01, 7.40722739548247e-01, 7.36564043071908e-01, 7.31558277006343e-01, 7.25636784394183e-01,\n                                                7.18744264175058e-01, 7.10841550929928e-01, 7.01907763406496e-01, 6.91941676794201e-01, 6.80962239936420e-01,\n                                                6.69008232649006e-01, 6.56137128723060e-01, 6.42423287364608e-01, 6.27955633826829e-01, 6.12835007042349e-01,\n                                                5.97171349600401e-01, 5.81080896661405e-01, 5.64683489412502e-01, 5.48100100166252e-01, 5.31450615756739e-01,\n                                                5.14851889639075e-01, 4.98416046690437e-01, 4.82249011712042e-01, 4.66449233277402e-01, 4.51106585611896e-01,\n                                                4.36301446961764e-01, 4.22103967241341e-01, 4.08573545831487e-01, 3.95758539996223e-01, 3.83696216000274e-01,\n                                                3.72412941237528e-01, 3.61924600080471e-01, 3.52237202144238e-01, 3.43347641709926e-01, 3.35244562382613e-01,\n                                                3.27909281667147e-01, 3.21316735134133e-01, 3.15436407809699e-01, 3.10233229827304e-01, 3.05668422828958e-01,\n                                                3.01700291998344e-01, 2.98284965209817e-01, 2.95377085186445e-01, 2.92930462689100e-01, 2.90898698753580e-01,\n                                                2.89235782182985e-01, 2.87896665336945e-01, 2.86837817262168e-01, 2.86017748931314e-01, 2.85397501332341e-01,\n                                                2.84941083862691e-01, 2.84615848312953e-01, 2.84392782941012e-01, 2.84246711853740e-01, 2.84156387096814e-01,\n                                                2.84104464327754e-01, 2.84077357412770e-01, 2.84064972370473e-01, 2.84060326367111e-01, 2.84059062546604e-01,\n                                                2.84058876009510e-01, 2.84058857546498e-01, 2.84058473171086e-01, 2.84055868978825e-01, 2.84046295810015e-01,\n                                                2.84020778159316e-01, 2.83964937984393e-01, 2.83858014917996e-01, 2.83672129726469e-01, 2.83371837299129e-01,\n                                                2.82914014410792e-01, 2.82248125004713e-01, 2.81316900569266e-01, 2.80057464037441e-01, 2.78402911383424e-01,\n                                                2.76284344986820e-01, 2.73633326800024e-01, 2.70384688158558e-01, 2.66479598462382e-01, 2.61868759623141e-01,\n                                                2.56515560611078e-01, 2.50399000617762e-01, 2.43516174352493e-01, 2.35884112564065e-01, 2.27540788055308e-01,\n                                                2.18545134171166e-01, 2.08975979363686e-01, 1.98929876215274e-01, 1.88517891674266e-01, 1.77861519365749e-01,\n                                                1.67087963649564e-01, 1.56325115587208e-01, 1.45696580548758e-01, 1.35317116765563e-01, 1.25288801065693e-01,\n                                                1.15698157543179e-01, 1.06614379448331e-01, 9.80886610275746e-02, 9.01545517574078e-02, 8.28291644228898e-02,\n                                                7.61150188739208e-02, 7.00022864819090e-02, 6.44712120902540e-02, 5.94945227881993e-02, 5.50396770611741e-02,\n                                                5.10708554066923e-02, 4.75506378721917e-02, 4.44413510781629e-02, 4.17060952808015e-02, 3.93094808337793e-02,\n                                                3.72181141160581e-02, 3.54008772798409e-02, 3.38290458463888e-02, 3.24762848859024e-02, 3.13185595973238e-02,\n                                                3.03339905417204e-02, 2.95026782308270e-02, 2.88065166050586e-02, 2.82290103161387e-02, 2.77551066805728e-02,\n                                                2.73710496363009e-02, 2.70642599315920e-02, 2.68232430326663e-02, 2.66375238106491e-02, 2.64976049663375e-02,\n                                                2.63949444099438e-02, 2.63219455049750e-02, 2.62719532834694e-02, 2.62392495020833e-02, 2.62190397579900e-02,\n                                                2.62074267824346e-02, 2.62013653926090e-02, 2.61985962656297e-02, 2.61975575307076e-02, 2.61972749753170e-02,\n                                                2.61972332709206e-02, 2.61972289689680e-02, 2.61971376482109e-02, 2.61965189440474e-02, 2.61942446327197e-02,\n                                                2.61881830037680e-02, 2.61749215894156e-02, 2.61495409120727e-02, 2.61054553478886e-02, 2.60343398301757e-02,\n                                                2.59261636266501e-02, 2.57693538037103e-02, 2.55511099232706e-02, 2.52578865547122e-02, 2.48760500313665e-02,\n                                                2.43926997756034e-02, 2.37966227005728e-02, 2.30793233456836e-02, 2.22360458888033e-02, 2.12666819571865e-02,\n                                                2.01764461605052e-02, 1.89762051889630e-02, 1.76823700173969e-02, 1.63163045744881e-02, 1.49032638422995e-02,\n                                                1.34709406752194e-02, 1.20477612723846e-02, 1.06611112911139e-02, 9.33568812358487e-03, 8.09215600752111e-03,\n                                                6.94623299987995e-03, 5.90827257298088e-03, 4.98333144024343e-03, 4.17165269391262e-03, 3.46944954850414e-03,\n                                                2.86985509542603e-03, 2.36390767815919e-03, 1.94146564102482e-03, 1.59198155230911e-03, 1.30510452756027e-03,\n                                                1.07111034171226e-03, 8.81177064201211e-04, 7.27529996495946e-04, 6.03479999114143e-04, 5.03380260909125e-04,\n                                                4.22529653675952e-04, 3.57052121046308e-04, 3.03776540832246e-04, 2.60130359578170e-04, 2.24048584044567e-04,\n                                                1.93893580785698e-04, 1.68381923003835e-04, 1.46518324612543e-04, 1.27538870756894e-04, 1.10864851066594e-04,\n                                                9.60661374307392e-05, 8.28313636560551e-05, 7.09421334335048e-05, 6.02497138402214e-05, 5.06541274631900e-05,\n                                                4.20863685661743e-05, 3.44944348285026e-05, 2.78333203880266e-05, 2.20585330481526e-05, 1.71223665006437e-05,\n                                                1.29721096016056e-05, 9.54951060805342e-06, 6.79100971012758e-06, 4.62842987758449e-06, 2.98994659431173e-06,\n                                                1.80124118287495e-06, 9.86795086532766e-07, 4.71318543304733e-07, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {9.10000000000000e+01, 9.09999995572286e+01, 9.09999858658587e+01, 9.09998931045408e+01, 9.09995521000496e+01,\n                                                9.09986430759879e+01, 9.09966535404168e+01, 9.09928427348156e+01, 9.09862138179947e+01, 9.09754946661914e+01,\n                                                9.09591278657186e+01, 9.09352702055477e+01, 9.09018018078811e+01, 9.08563450340593e+01, 9.07962935224042e+01,\n                                                9.07188521516762e+01, 9.06210892808959e+01, 9.05000030682322e+01, 9.03526036712609e+01, 9.01760122776188e+01,\n                                                8.99675758987295e+01, 8.97249936544676e+01, 8.94464463179979e+01, 8.91307171251677e+01, 8.87772895800762e+01,\n                                                8.83864084601956e+01, 8.79590941174514e+01, 8.74971071391262e+01, 8.70028689804066e+01, 8.64793520097613e+01,\n                                                8.59299571552317e+01, 8.53583974383371e+01, 8.47686009874689e+01, 8.41646390283911e+01, 8.35506753722732e+01,\n                                                8.29309269371378e+01, 8.23096222230791e+01, 8.16909474902250e+01, 8.10789777760657e+01, 8.04775987900319e+01,\n                                                7.98904318519489e+01, 7.93207741705897e+01, 7.87715610933166e+01, 7.82453492187692e+01, 7.77443138896368e+01,\n                                                7.72702535806598e+01, 7.68245960023972e+01, 7.64084039700029e+01, 7.60223814663248e+01, 7.56668813436171e+01,\n                                                7.53419160867213e+01, 7.50471725545729e+01, 7.47820310410564e+01, 7.45455885498719e+01, 7.43366859034044e+01,\n                                                7.41539381682226e+01, 7.39957678251382e+01, 7.38604400926560e+01, 7.37460997983798e+01, 7.36508091684119e+01,\n                                                7.35725858667056e+01, 7.35094405689923e+01, 7.34594133078574e+01, 7.34206077870082e+01, 7.33912228439582e+01,\n                                                7.33695802500326e+01, 7.33541480812790e+01, 7.33435589770482e+01, 7.33366227248240e+01, 7.33323327670786e+01,\n                                                7.33298664120470e+01, 7.33285787363995e+01, 7.33279903830956e+01, 7.33277696708660e+01, 7.33277096317321e+01,\n                                                7.33277007700797e+01, 7.33276995570446e+01, 7.33276709092601e+01, 7.33274768166108e+01, 7.33267633160837e+01,\n                                                7.33248614208443e+01, 7.33206993482518e+01, 7.33127291656600e+01, 7.32988710920414e+01, 7.32764785053156e+01,\n                                                7.32423264680932e+01, 7.31926262511798e+01, 7.31230678441295e+01, 7.30288917313539e+01, 7.29049902268845e+01,\n                                                7.27460373732023e+01, 7.25466448335072e+01, 7.23015394070292e+01, 7.20057558865803e+01, 7.16548371034533e+01,\n                                                7.12450313300555e+01, 7.07734759140128e+01, 7.02383553287551e+01, 6.96390220855181e+01, 6.89760706246341e+01,\n                                                6.82513578298380e+01, 6.74679692298117e+01, 6.66301364313031e+01, 6.57431169352819e+01, 6.48130496856743e+01,\n                                                6.38467967554064e+01, 6.28517744075766e+01, 6.18357699263485e+01, 6.08067405439725e+01, 5.97726007592425e+01,\n                                                5.87410190449326e+01, 5.77192517767311e+01, 5.67140322433454e+01, 5.57315112625734e+01, 5.47772291688160e+01,\n                                                5.38560975007123e+01, 5.29723794571895e+01, 5.21296704438479e+01, 5.13308862195698e+01, 5.05782655063083e+01,\n                                                4.98733896858521e+01, 4.92172178253779e+01, 4.86101326062312e+01, 4.80519920644731e+01, 4.75421828150999e+01,\n                                                4.70796718480185e+01, 4.66630554371234e+01, 4.62906048496904e+01, 4.59603092725714e+01, 4.56699167218343e+01,\n                                                4.54169737731493e+01, 4.51988648460691e+01, 4.50128515783621e+01, 4.48561125896960e+01, 4.47257836864499e+01,\n                                                4.46189983157999e+01, 4.45329278457035e+01, 4.44648210354654e+01, 4.44120418784890e+01, 4.43721048559218e+01,\n                                                4.43427065492618e+01, 4.43217525324458e+01, 4.43073785070398e+01, 4.42979647604863e+01, 4.42921432135208e+01,\n                                                4.42887965692427e+01, 4.42870493678035e+01, 4.42862510681028e+01, 4.42859516001152e+01, 4.42858701377305e+01,\n                                                4.42858581140593e+01, 4.42858569726815e+01, 4.42858337027007e+01, 4.42856760454457e+01, 4.42850964850257e+01,\n                                                4.42835516229661e+01, 4.42801708987609e+01, 4.42736970535068e+01, 4.42624410032199e+01, 4.42442536561202e+01,\n                                                4.42165170367236e+01, 4.41761568255731e+01, 4.41196780309583e+01, 4.40432249179888e+01, 4.39426654786880e+01,\n                                                4.38136996049927e+01, 4.36519887347857e+01, 4.34533031444141e+01, 4.32136813896308e+01, 4.29295948446056e+01,\n                                                4.25981090949042e+01, 4.22170333472480e+01, 4.17850492034379e+01, 4.13018111354836e+01, 4.07680126007321e+01,\n                                                4.01854135378810e+01, 3.95568265094317e+01, 3.88860598068502e+01, 3.81778169255057e+01, 3.74375542872537e+01,\n                                                3.66713043249830e+01, 3.58854786890594e+01, 3.50866728218012e+01, 3.42814930085150e+01, 3.34764175984214e+01,\n                                                3.26776895549199e+01, 3.18912267117761e+01, 3.11225354106484e+01, 3.03766214478535e+01, 2.96579029167150e+01,\n                                                2.89701363144093e+01, 2.83163678069873e+01, 2.76989171496066e+01, 2.71193953751179e+01, 2.65787516275364e+01,\n                                                2.60773409034910e+01, 2.56150032841836e+01, 2.51911460292281e+01, 2.48048218766305e+01, 2.44547992821559e+01,\n                                                2.41396225682688e+01, 2.38576617187414e+01, 2.36071527458290e+01, 2.33862302136176e+01, 2.31929537383259e+01,\n                                                2.30253302368687e+01, 2.28813334763439e+01, 2.27589221767988e+01, 2.26560575941698e+01, 2.25707211911920e+01,\n                                                2.25009327064367e+01, 2.24447686617463e+01, 2.24003811094053e+01, 2.23660162158506e+01, 2.23400321135473e+01,\n                                                2.23209153332083e+01, 2.23072950614225e+01, 2.22979544592384e+01, 2.22918383276197e+01, 2.22880565140124e+01,\n                                                2.22858826137632e+01, 2.22847477193674e+01, 2.22842291944262e+01, 2.22840346806798e+01, 2.22839817684945e+01,\n                                                2.22839739587766e+01, 2.22839732637675e+01, 2.22839595824336e+01, 2.22838668896461e+01, 2.22835261450874e+01,\n                                                2.22826178754093e+01, 2.22806303027193e+01, 2.22768244504821e+01, 2.22702078783709e+01, 2.22595186669337e+01,\n                                                2.22432212207776e+01, 2.22195153481357e+01, 2.21863598573697e+01, 2.21415115352808e+01, 2.20825797916158e+01,\n                                                2.20070964402632e+01, 2.19125990435155e+01, 2.17967250198962e+01, 2.16573124119553e+01, 2.14925019886923e+01,\n                                                2.13008344249540e+01, 2.10813358838032e+01, 2.08335856278185e+01, 2.05577604141382e+01, 2.02546523436020e+01,\n                                                1.99256592882054e+01, 1.95727495545749e+01, 1.91984044628931e+01, 1.88055434871950e+01, 1.83974362832297e+01,\n                                                1.79776046650314e+01, 1.75497163740112e+01, 1.71174726438370e+01, 1.66844939550910e+01, 1.62542123748152e+01,\n                                                1.58297820529912e+01, 1.54140187575910e+01, 1.50093735507265e+01, 1.46179370504872e+01, 1.42414636324770e+01,\n                                                1.38814028092891e+01, 1.35389279660372e+01, 1.32149579898567e+01, 1.29101721072245e+01, 1.26250208276782e+01,\n                                                1.23597362855890e+01, 1.21143443320788e+01, 1.18886793894013e+01, 1.16824019493633e+01, 1.14950179164170e+01,\n                                                1.13258987547355e+01, 1.11743014722091e+01, 1.10393877186565e+01, 1.09202415738760e+01, 1.08158858774184e+01,\n                                                1.07252971666506e+01, 1.06474194294907e+01, 1.05811769457558e+01, 1.05254864969696e+01, 1.04792691822487e+01,\n                                                1.04414620013042e+01, 1.04110292675875e+01, 1.03869738071070e+01, 1.03683477923728e+01, 1.03542629662727e+01,\n                                                1.03438999361803e+01, 1.03365161713415e+01, 1.03314523214409e+01, 1.03281364933595e+01, 1.03260861756004e+01,\n                                                1.03249075817190e+01, 1.03242922887254e+01, 1.03240111652317e+01, 1.03239057075528e+01, 1.03238770206439e+01,\n                                                1.03238727865213e+01, 1.03238724122031e+01, 1.03238650716699e+01, 1.03238153386095e+01, 1.03236325165904e+01,\n                                                1.03231451953582e+01, 1.03220787816212e+01, 1.03200367662363e+01, 1.03164866057744e+01, 1.03107510758826e+01,\n                                                1.03020059226524e+01, 1.02892845786979e+01, 1.02714906004256e+01, 1.02474182979599e+01, 1.02157817479415e+01,\n                                                1.01752519882844e+01, 1.01245016924028e+01, 1.00622560258412e+01, 9.98734773918885e+00, 9.89877390772429e+00,\n                                                9.79575116884983e+00, 9.67776592261221e+00, 9.54461583819808e+00, 9.39643922610499e+00, 9.23372943762176e+00,\n                                                9.05733243957934e+00, 8.86842702088452e+00, 8.66848858633315e+00, 8.45923898661067e+00, 8.24258608722614e+00,\n                                                8.02055757050120e+00, 7.79523364529535e+00, 7.56868289169704e+00, 7.34290452906552e+00, 7.11977922473093e+00,\n                                                6.90102945545932e+00, 6.68818962433211e+00, 6.48258569967693e+00, 6.28532398834038e+00, 6.09728858514053e+00,\n                                                5.91914686536127e+00, 5.75136203359722e+00, 5.59421128505306e+00, 5.44780774490845e+00, 5.31212419028843e+00,\n                                                5.18701669682538e+00, 5.07224674100782e+00, 4.96750080798277e+00, 4.87240706875824e+00, 4.78654910623484e+00,\n                                                4.70947694744417e+00, 4.64071580686944e+00, 4.57977299431587e+00, 4.52614342713007e+00, 4.47931414086220e+00,\n                                                4.43876813461742e+00, 4.40398782783762e+00, 4.37445834800171e+00, 4.34967081404653e+00, 4.32912572717331e+00,\n                                                4.31233652818032e+00, 4.29883332844982e+00, 4.28816677116052e+00, 4.27991193213846e+00, 4.27367212864300e+00,\n                                                4.26908247228519e+00, 4.26581298201351e+00, 4.26357106689670e+00, 4.26210319748120e+00, 4.26119560868284e+00,\n                                                4.26067391494874e+00, 4.26040156692017e+00, 4.26027713413416e+00, 4.26023045595402e+00, 4.26021775843782e+00,\n                                                4.26021588431395e+00, 4.26021571607039e+00, 4.26021238777166e+00, 4.26018983813556e+00, 4.26010694444726e+00,\n                                                4.25988598921421e+00, 4.25940247927609e+00, 4.25847667301005e+00, 4.25686722963671e+00, 4.25426739411347e+00,\n                                                4.25030412569858e+00, 4.24454055739660e+00, 4.23648212362249e+00, 4.22558659992937e+00, 4.21127814859025e+00,\n                                                4.19296524944841e+00, 4.17006211809792e+00, 4.14201288711629e+00, 4.10831747949216e+00, 4.06855777947516e+00,\n                                                4.02242245749099e+00, 3.96972868639249e+00, 3.91043903949067e+00, 3.84467210686692e+00, 3.77270579352941e+00,\n                                                3.69497282507925e+00, 3.61204861153027e+00, 3.52463222584176e+00, 3.43352176838926e+00, 3.33958576430869e+00,\n                                                3.24373245808225e+00, 3.14687893062363e+00, 3.04992187895718e+00, 2.95371167822194e+00, 2.85903100235470e+00,\n                                                2.76657883544279e+00, 2.67696020061165e+00, 2.59068142620620e+00, 2.50815032695198e+00, 2.42968035904475e+00,\n                                                2.35549764646191e+00, 2.28574977253530e+00, 2.22051535745577e+00, 2.15981365140603e+00, 2.10361361217383e+00,\n                                                2.05184216083217e+00, 2.00439149011522e+00, 1.96112542533642e+00, 1.92188490938797e+00, 1.88649271302697e+00,\n                                                1.85475747434322e+00, 1.82647716108677e+00, 1.80144203678566e+00, 1.77943720211087e+00, 1.76024477849057e+00,\n                                                1.74364580045854e+00, 1.72942188413850e+00, 1.71735673888062e+00, 1.70723758518825e+00, 1.69885653346003e+00,\n                                                1.69201196450484e+00, 1.68650993496212e+00, 1.68216561008443e+00, 1.67880470468140e+00, 1.67626489246777e+00,\n                                                1.67439712666554e+00, 1.67306680228306e+00, 1.67215468438748e+00, 1.67155752763776e+00, 1.67118832039097e+00,\n                                                1.67097610115096e+00, 1.67086531468176e+00, 1.67081469796325e+00, 1.67079571029467e+00, 1.67079054522712e+00,\n                                                1.67078978287537e+00, 1.67078971260017e+00, 1.67078830190397e+00, 1.67077874426950e+00, 1.67074360998875e+00,\n                                                1.67064995946326e+00, 1.67044503075424e+00, 1.67005265655537e+00, 1.66937059232966e+00, 1.66826894075801e+00,\n                                                1.66658985932121e+00, 1.66414873267961e+00, 1.66073697307661e+00, 1.65612657336419e+00, 1.65007647233223e+00,\n                                                1.64234069710342e+00, 1.63267812276922e+00, 1.62086354102679e+00, 1.60669956938621e+00, 1.59002877830973e+00,\n                                                1.57074528676455e+00, 1.54880499836023e+00, 1.52423363710163e+00, 1.49713180176286e+00, 1.46767638863452e+00,\n                                                1.43611792351699e+00, 1.40277358301873e+00, 1.36801596592919e+00, 1.33225800087416e+00, 1.29593475375353e+00,\n                                                1.25948331977926e+00, 1.22332240128233e+00, 1.18783347762985e+00, 1.15334552177782e+00, 1.12012488604594e+00,\n                                                1.08837125183885e+00, 1.05821955749418e+00, 1.02974685471993e+00, 1.00298237801771e+00, 9.77918905640038e-01,\n                                                9.54523727574028e-01, 9.32748055116477e-01, 9.12534300298745e-01, 8.93821157101527e-01, 8.76546749558003e-01,\n                                                8.60650270667449e-01, 8.46072561572214e-01, 8.32756026428513e-01, 8.20644190915957e-01, 8.09681122143729e-01,\n                                                7.99810850848331e-01, 7.90976878656991e-01, 7.83121813061683e-01, 7.76187147142096e-01, 7.70113185900328e-01,\n                                                7.64839112699448e-01, 7.60303184926755e-01, 7.56443045683739e-01, 7.53196136787864e-01, 7.50500196949233e-01,\n                                                7.48293827330627e-01, 7.46517104757203e-01, 7.45112220730178e-01, 7.44024122366554e-01, 7.43201129733421e-01,\n                                                7.42595503111104e-01, 7.42163933801621e-01, 7.41867933446628e-01, 7.41674099561791e-01, 7.41554239141067e-01,\n                                                7.41485337585090e-01, 7.41449366585314e-01, 7.41432931554328e-01, 7.41426766274060e-01, 7.41425089174712e-01,\n                                                7.41424841638562e-01, 7.41424818048657e-01, 7.41424336137413e-01, 7.41421071126510e-01, 7.41409068731642e-01,\n                                                7.41377075756105e-01, 7.41307064997557e-01, 7.41173005499633e-01, 7.40939935817110e-01, 7.40563396552517e-01,\n                                                7.39989276140705e-01, 7.39154119355405e-01, 7.37985939533601e-01, 7.36405561162840e-01, 7.34328497626777e-01,\n                                                7.31667338744828e-01, 7.28334584921981e-01, 7.24245821867797e-01, 7.19323086774637e-01, 7.13498240227395e-01,\n                                                7.06716135369902e-01, 6.98937373443599e-01, 6.90140456317337e-01, 6.80323191241698e-01, 6.69503265249901e-01,\n                                                6.57717977235677e-01, 6.45023184262044e-01, 6.31491575842048e-01, 6.17210429621153e-01, 6.02279021556953e-01,\n                                                5.86805863822079e-01, 5.70905926739314e-01, 5.54697970913196e-01, 5.38302077362559e-01, 5.21837423007653e-01,\n                                                5.05420312970671e-01, 4.89162455620701e-01, 4.73169454488556e-01, 4.57539492888131e-01, 4.42362198610169e-01,\n                                                4.27717691498628e-01, 4.13675829941312e-01, 4.00295678780097e-01, 3.87625219011198e-01, 3.75701309774911e-01,\n                                                3.64549898361204e-01, 3.54186457921799e-01, 3.44616618644650e-01, 3.35836948653579e-01, 3.27835836883764e-01,\n                                                3.20594431500425e-01, 3.14087593053543e-01, 3.08284830032633e-01, 3.03151194242702e-01, 2.98648123082671e-01,\n                                                2.94734224296278e-01, 2.91366005375721e-01, 2.88498554166722e-01, 2.86086179287338e-01, 2.84083018896183e-01,\n                                                2.82443624472734e-01, 2.81123523051761e-01, 2.80079757314851e-01, 2.79271398627969e-01, 2.78660024058681e-01,\n                                                2.78210145085978e-01, 2.77889573510862e-01, 2.77669709251796e-01, 2.77525735376557e-01, 2.77436707855472e-01,\n                                                2.77385530935035e-01, 2.77358813439605e-01, 2.77346606330767e-01, 2.77342027077083e-01, 2.77340781414168e-01,\n                                                2.77340597557114e-01, 2.77340579359404e-01, 2.77340200506387e-01, 2.77337633729402e-01, 2.77328198103675e-01,\n                                                2.77303047096041e-01, 2.77248009330094e-01, 2.77142623047496e-01, 2.76959410569447e-01, 2.76663438583640e-01,\n                                                2.76212209137114e-01, 2.75555923821514e-01, 2.74638158572984e-01, 2.73396977474633e-01, 2.71766499801103e-01,\n                                                2.69678914535589e-01, 2.67066910630206e-01, 2.63866460132135e-01, 2.60019856701220e-01, 2.55478876698305e-01,\n                                                2.50207897441044e-01, 2.44186781421774e-01, 2.37413320401956e-01, 2.29905033174376e-01, 2.21700128517938e-01,\n                                                2.12857482403635e-01, 2.03455536135536e-01, 1.93590097856912e-01, 1.83371118842146e-01, 1.72918610020474e-01,\n                                                1.62357951941289e-01, 1.51814919834450e-01, 1.41410782185588e-01, 1.31257827780047e-01, 1.21455630468304e-01,\n                                                1.12088278796165e-01, 1.03222691918589e-01, 9.49080307813546e-02, 8.71761114786551e-02, 8.00426494783153e-02,\n                                                7.35091165779949e-02, 6.75649779812915e-02, 6.21900902594348e-02, 5.73570742932930e-02, 5.30335215813551e-02,\n                                                4.91839393484526e-02, 4.57713834354223e-02, 4.27587640931506e-02, 4.01098368544694e-02, 3.77899086430631e-02,\n                                                3.57662993428676e-02, 3.40086028778046e-02, 3.24887912281895e-02, 3.11812013568158e-02, 3.00624400364597e-02,\n                                                2.91112360219898e-02, 2.83082635216658e-02, 2.76359558462502e-02, 2.70783236019980e-02, 2.66207878545970e-02,\n                                                2.62500352656474e-02, 2.59538992041399e-02, 2.57212681897983e-02, 2.55420206907502e-02, 2.54069832723474e-02,\n                                                2.53079074219897e-02, 2.52374591139386e-02, 2.51892144087549e-02, 2.51576541557057e-02, 2.51381512061073e-02,\n                                                2.51269444175506e-02, 2.51210950505367e-02, 2.51184227886370e-02, 2.51174203895630e-02, 2.51171477182197e-02,\n                                                2.51171074727097e-02, 2.51171033212216e-02, 2.51170151949651e-02, 2.51164181336776e-02, 2.51142233809247e-02,\n                                                2.51083738025955e-02, 2.50955763376055e-02, 2.50710837255923e-02, 2.50285410972282e-02, 2.49599155721683e-02,\n                                                2.48555294592450e-02, 2.47042189990196e-02, 2.44936395506414e-02, 2.42107332911559e-02, 2.38423656054607e-02,\n                                                2.33761206573320e-02, 2.28012253928114e-02, 2.21095460776723e-02, 2.12965757177841e-02, 2.03623092000953e-02,\n                                                1.93118915103554e-02, 1.81559284723818e-02, 1.69103728332658e-02, 1.55959414508686e-02, 1.42370775106144e-02,\n                                                1.28605361843057e-02, 1.14937308191827e-02, 1.01630170529035e-02, 8.89210461571110e-03, 7.70076739618730e-03,\n                                                6.60397529445333e-03, 5.61150652644926e-03, 4.72802987145826e-03, 3.95358605175034e-03, 3.28435574516561e-03,\n                                                2.71358345673889e-03, 2.23253146839397e-03, 1.83136201818002e-03, 1.49988111593302e-03, 1.22811444660442e-03,\n                                                1.00671566580957e-03, 8.27224921209790e-04, 6.82201538339200e-04, 5.65255162470635e-04, 4.71000139157240e-04,\n                                                3.94960118839549e-04, 3.33450547501002e-04, 2.83461890546732e-04, 2.42556200433341e-04, 2.08778827769152e-04,\n                                                1.80581157465554e-04, 1.56750615630585e-04, 1.36347633969081e-04, 1.18651522527102e-04, 1.03116551613880e-04,\n                                                8.93372410359916e-05, 7.70201483959454e-05, 6.59594581833289e-05, 5.60149468071813e-05, 4.70922893072157e-05,\n                                                3.91263783114937e-05, 3.20682476342427e-05, 2.58756925717307e-05, 2.05071668517576e-05, 1.59182476551223e-05,\n                                                1.20599173669689e-05, 8.87803149396404e-06, 6.31351608149089e-06, 4.30300227094449e-06, 2.77972556261830e-06,\n                                                1.67459857891572e-06, 9.17415377443831e-07, 4.38181118056491e-07, 2.84217094304040e-14, 4.26325641456060e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {9.20000000000000e+01, 9.19999995501529e+01, 9.19999856399889e+01, 9.19998913963032e+01, 9.19995449423920e+01,\n                                                9.19986213915721e+01, 9.19966000614775e+01, 9.19927283538341e+01, 9.19859934913468e+01, 9.19751030060369e+01,\n                                                9.19584745638053e+01, 9.19342354378259e+01, 9.19002317741145e+01, 9.18540477970322e+01, 9.17930353329022e+01,\n                                                9.17143544831244e+01, 9.16150268517520e+01, 9.14920031924357e+01, 9.13422473264100e+01, 9.11628372840806e+01,\n                                                9.09510825219544e+01, 9.07046527469977e+01, 9.04217098038252e+01, 9.01010302377294e+01, 8.97421038848137e+01,\n                                                8.93451944432708e+01, 8.89113521173594e+01, 8.84423756957714e+01, 8.79407302407407e+01, 8.74094345221513e+01,\n                                                8.68519369991442e+01, 8.62719989615452e+01, 8.56735983218625e+01, 8.50608590184778e+01, 8.44380017182143e+01,\n                                                8.38093044987733e+01, 8.31790598975284e+01, 8.25515181675803e+01, 8.19308146868220e+01, 8.13208888031994e+01,\n                                                8.07254073454088e+01, 8.01477053711631e+01, 7.95907501473526e+01, 7.90571261721987e+01, 7.85490338953372e+01,\n                                                7.80682943733459e+01, 7.76163549055271e+01, 7.71942941218414e+01, 7.68028273164569e+01, 7.64423136728313e+01,\n                                                7.61127668563492e+01, 7.58138698552077e+01, 7.55449943403034e+01, 7.53052243687159e+01, 7.50933839958473e+01,\n                                                7.49080682417425e+01, 7.47476768172111e+01, 7.46104500063323e+01, 7.44945060933568e+01, 7.43978796998850e+01,\n                                                7.43185603603494e+01, 7.42545306155002e+01, 7.42038028540467e+01, 7.41644540925463e+01, 7.41346578636011e+01,\n                                                7.41127123914052e+01, 7.40970642783142e+01, 7.40863270099400e+01, 7.40792937094325e+01, 7.40749437307768e+01,\n                                                7.40724428695503e+01, 7.40711371785212e+01, 7.40705405938319e+01, 7.40703167937241e+01, 7.40702559146123e+01,\n                                                7.40702469289809e+01, 7.40702456989748e+01, 7.40702166503934e+01, 7.40700198422922e+01, 7.40692963595655e+01,\n                                                7.40673678561313e+01, 7.40631475556294e+01, 7.40550658729381e+01, 7.40410139413792e+01, 7.40183081405962e+01,\n                                                7.39836784806389e+01, 7.39332833608182e+01, 7.38627527258971e+01, 7.37672609219992e+01, 7.36416295550856e+01,\n                                                7.34804593470632e+01, 7.32782883811459e+01, 7.30297722925540e+01, 7.27298800059989e+01, 7.23740966972420e+01,\n                                                7.19586239336219e+01, 7.14805656232570e+01, 7.09380877298702e+01, 7.03305400570358e+01, 6.96585302461128e+01,\n                                                6.89239438738983e+01, 6.81299101294447e+01, 6.72807190218496e+01, 6.63817013687928e+01, 6.54390844113336e+01,\n                                                6.44598323161218e+01, 6.34514735062838e+01, 6.24219108034586e+01, 6.13792122115549e+01, 6.03313919554192e+01,\n                                                5.92862059342976e+01, 5.82509897219311e+01, 5.72325536611670e+01, 5.62371270986189e+01, 5.52703292563987e+01,\n                                                5.43371461414633e+01, 5.34419054235839e+01, 5.25882530758877e+01, 5.17791402816078e+01, 5.10168271353509e+01,\n                                                5.03029047851059e+01, 4.96383332538766e+01, 4.90234898155542e+01, 4.84582225078489e+01, 4.79419044269755e+01,\n                                                4.74734860394766e+01, 4.70515442617602e+01, 4.66743281896592e+01, 4.63398020381515e+01, 4.60456861423203e+01,\n                                                4.57894968914537e+01, 4.55685863300789e+01, 4.53801819441874e+01, 4.52214269070309e+01, 4.50894208112529e+01,\n                                                4.49812606734617e+01, 4.48940817693174e+01, 4.48250976479556e+01, 4.47716384930547e+01, 4.47311868555985e+01,\n                                                4.47014096929554e+01, 4.46801856216150e+01, 4.46656263347745e+01, 4.46560912537744e+01, 4.46501946708264e+01,\n                                                4.46468048898944e+01, 4.46450351676945e+01, 4.46442265781773e+01, 4.46439232501412e+01, 4.46438407377314e+01,\n                                                4.46438285590787e+01, 4.46438274029889e+01, 4.46438038330652e+01, 4.46436441436560e+01, 4.46430571128700e+01,\n                                                4.46414923379253e+01, 4.46380680367246e+01, 4.46315107434640e+01, 4.46201095987843e+01, 4.46016878007176e+01,\n                                                4.45735936088499e+01, 4.45327130368512e+01, 4.44755059714275e+01, 4.43980668583238e+01, 4.42962102458268e+01,\n                                                4.41655803440673e+01, 4.40017823551595e+01, 4.38005317211080e+01, 4.35578157548142e+01, 4.32700605586290e+01,\n                                                4.29342949311033e+01, 4.25483023496547e+01, 4.21107522568476e+01, 4.16213027803218e+01, 4.10806684802928e+01,\n                                                4.04906483614786e+01, 3.98541108309423e+01, 3.91749335152841e+01, 3.84578975718495e+01, 3.77085396572282e+01,\n                                                3.69329709370465e+01, 3.61376801238204e+01, 3.53293422460241e+01, 3.45146518341052e+01, 3.37001878401920e+01,\n                                                3.28923038468564e+01, 3.20970295072388e+01, 3.13199717795319e+01, 3.05662141921693e+01, 2.98402222176902e+01,\n                                                2.91457676086975e+01, 2.84858831191169e+01, 2.78628534271152e+01, 2.72782413261749e+01, 2.67329427673155e+01,\n                                                2.62272612906380e+01, 2.57609918355892e+01, 2.53335052426880e+01, 2.49438270967648e+01, 2.45907071375506e+01,\n                                                2.42726777410776e+01, 2.39881016833658e+01, 2.37352104793905e+01, 2.35121351240273e+01, 2.33169311870061e+01,\n                                                2.31476000765199e+01, 2.30021080069270e+01, 2.28784038699249e+01, 2.27744368667047e+01, 2.26881744364106e+01,\n                                                2.26176207234979e+01, 2.25608355656283e+01, 2.25159537551203e+01, 2.24812041325726e+01, 2.24549279153176e+01,\n                                                2.24355955518965e+01, 2.24218213333592e+01, 2.24123749882298e+01, 2.24061895428424e+01, 2.24023648406693e+01,\n                                                2.24001662765723e+01, 2.23990185033409e+01, 2.23984940934775e+01, 2.23982973720165e+01, 2.23982438592720e+01,\n                                                2.23982359609125e+01, 2.23982352580150e+01, 2.23982214213955e+01, 2.23981276765204e+01, 2.23977830643040e+01,\n                                                2.23968644843180e+01, 2.23948543449653e+01, 2.23910052641128e+01, 2.23843134833912e+01, 2.23735026242873e+01,\n                                                2.23570193570039e+01, 2.23330424370083e+01, 2.22995063418404e+01, 2.22541403607066e+01, 2.21945234058273e+01,\n                                                2.21181539997885e+01, 2.20225338518562e+01, 2.19052622188320e+01, 2.17641369585026e+01, 2.15972569886397e+01,\n                                                2.14031199688793e+01, 2.11807086485973e+01, 2.09295596593637e+01, 2.06498096667166e+01, 2.03422156606756e+01,\n                                                2.00081484780129e+01, 1.96495609363880e+01, 1.92689336524038e+01, 1.88692022602365e+01, 1.84536692903012e+01,\n                                                1.80259029831354e+01, 1.75896249707257e+01, 1.71485902881065e+01, 1.67064668667917e+01, 1.62667259355726e+01,\n                                                1.58325564652151e+01, 1.54068132812939e+01, 1.49920001473985e+01, 1.45902799439695e+01, 1.42034988074454e+01,\n                                                1.38332118050944e+01, 1.34807027271718e+01, 1.31469964286939e+01, 1.28328661782310e+01, 1.25388398737355e+01,\n                                                1.22652083931859e+01, 1.20120378547521e+01, 1.17791860538550e+01, 1.15663222836347e+01, 1.13729492338389e+01,\n                                                1.11984256022220e+01, 1.10419882752979e+01, 1.09027732857285e+01, 1.07798351187451e+01, 1.06721642530255e+01,\n                                                1.05787030524899e+01, 1.04983602690229e+01, 1.04300244803169e+01, 1.03725767860319e+01, 1.03249030349186e+01,\n                                                1.02859057703706e+01, 1.02545159756080e+01, 1.02297045845712e+01, 1.02104936117709e+01, 1.01959666539499e+01,\n                                                1.01852784373681e+01, 1.01776630340757e+01, 1.01724403536387e+01, 1.01690205356017e+01, 1.01669059215349e+01,\n                                                1.01656903696725e+01, 1.01650557830262e+01, 1.01647658445016e+01, 1.01646570800647e+01, 1.01646274936436e+01,\n                                                1.01646231267550e+01, 1.01646227406996e+01, 1.01646151699955e+01, 1.01645638774982e+01, 1.01643753229059e+01,\n                                                1.01638727213654e+01, 1.01627728702303e+01, 1.01606668304242e+01, 1.01570053691255e+01, 1.01510900499816e+01,\n                                                1.01420708256524e+01, 1.01289509268511e+01, 1.01105997289465e+01, 1.00857740866256e+01, 1.00531483368398e+01,\n                                                1.00113527659545e+01, 9.95901981791063e+00, 9.89483670396663e+00, 9.81760240076416e+00, 9.72628635405364e+00,\n                                                9.62008562187880e+00, 9.49847678701674e+00, 9.36125883853902e+00, 9.20858344688401e+00, 9.04096968444455e+00,\n                                                8.85930127284303e+00, 8.66480580121450e+00, 8.45901691572867e+00, 8.24372202256706e+00, 8.02089933305406e+00,\n                                                7.79264888717776e+00, 7.56112237930505e+00, 7.32845617162144e+00, 7.09671096069916e+00, 6.86782041520183e+00,\n                                                6.64355000700121e+00, 6.42546641690294e+00, 6.21491736858306e+00, 6.01302144458097e+00, 5.82066720639511e+00,\n                                                5.63852064599725e+00, 5.46703961359809e+00, 5.30649348432365e+00, 5.15698608340462e+00, 5.01847988914470e+00,\n                                                4.89081978881558e+00, 4.77375510027780e+00, 4.66695907420949e+00, 4.57004555090703e+00, 4.48258279672456e+00,\n                                                4.40410477071299e+00, 4.33412018795873e+00, 4.27211978341928e+00, 4.21758216976504e+00, 4.16997864847370e+00,\n                                                4.12877728965431e+00, 4.09344654974012e+00, 4.06345864937875e+00, 4.03829288628106e+00, 4.01743900858838e+00,\n                                                4.00040072304816e+00, 3.98669935947493e+00, 3.97587766020402e+00, 3.96750361303850e+00, 3.96117420170553e+00,\n                                                3.95651891246007e+00, 3.95320281235445e+00, 3.95092900627355e+00, 3.94944028743686e+00, 3.94851981960225e+00,\n                                                3.94799072706870e+00, 3.94771451775742e+00, 3.94758832107514e+00, 3.94754098125414e+00, 3.94752810376103e+00,\n                                                3.94752620307315e+00, 3.94752603244487e+00, 3.94752265697062e+00, 3.94749978771773e+00, 3.94741571915051e+00,\n                                                3.94719163262992e+00, 3.94670127252505e+00, 3.94576235725565e+00, 3.94413014815815e+00, 3.94149360028560e+00,\n                                                3.93747451567688e+00, 3.93163010022165e+00, 3.92345927592918e+00, 3.91241300598696e+00, 3.89790873700812e+00,\n                                                3.87934884317200e+00, 3.85614267172807e+00, 3.82773145260740e+00, 3.79361497574581e+00, 3.75337860166205e+00,\n                                                3.70671890739631e+00, 3.65346613623426e+00, 3.59360166081757e+00, 3.52726890806868e+00, 3.45477662210226e+00,\n                                                3.37659391540490e+00, 3.29333720948715e+00, 3.20574981229952e+00, 3.11467544530106e+00, 3.02102746297230e+00,\n                                                2.92575577241898e+00, 2.82981355278511e+00, 2.73412579841106e+00, 2.63956147699079e+00, 2.54691072162305e+00,\n                                                2.45686799274422e+00, 2.37002159868271e+00, 2.28684941382129e+00, 2.20772014860255e+00, 2.13289916400838e+00,\n                                                2.06255761971403e+00, 1.99678370487607e+00, 1.93559480044048e+00, 1.87894961997877e+00, 1.82675962358373e+00,\n                                                1.77889925171745e+00, 1.73521475003929e+00, 1.69553153329441e+00, 1.65966016057827e+00, 1.62740106968170e+00,\n                                                1.59854825432360e+00, 1.57289207632100e+00, 1.55022139576978e+00, 1.53032518449457e+00, 1.51299376702373e+00,\n                                                1.49801981230108e+00, 1.48519917947857e+00, 1.47433170243121e+00, 1.46522197949760e+00, 1.45768021667442e+00,\n                                                1.45152315363246e+00, 1.44657508243480e+00, 1.44266894916949e+00, 1.43964750972394e+00, 1.43736449380745e+00,\n                                                1.43568571738982e+00, 1.43449007423838e+00, 1.43367033321826e+00, 1.43313367006446e+00, 1.43280187048074e+00,\n                                                1.43261115511386e+00, 1.43251159507562e+00, 1.43246610768527e+00, 1.43244904418516e+00, 1.43244440253628e+00,\n                                                1.43244371743995e+00, 1.43244365428630e+00, 1.43244238654773e+00, 1.43243379746974e+00, 1.43240222367098e+00,\n                                                1.43231806382079e+00, 1.43213390388986e+00, 1.43178129927138e+00, 1.43116837863160e+00, 1.43017843818896e+00,\n                                                1.42866969724244e+00, 1.42647638116557e+00, 1.42341128036293e+00, 1.41926989595902e+00, 1.41383621915375e+00,\n                                                1.40689009763797e+00, 1.39821601999041e+00, 1.38761300444246e+00, 1.37490512571728e+00, 1.35995207336552e+00,\n                                                1.34265903195629e+00, 1.32298513232575e+00, 1.30094976246818e+00, 1.27663615300830e+00, 1.25019185542845e+00,\n                                                1.22182598418472e+00, 1.19180335696365e+00, 1.16043589811215e+00, 1.12807183543724e+00, 1.09508330680288e+00,\n                                                1.06185301184907e+00, 1.02876052803545e+00, 9.96168898427456e-01, 9.64412118062725e-01, 9.33784192888567e-01,\n                                                9.04530479786828e-01, 8.76841973133835e-01, 8.50853023965868e-01, 8.26642646926715e-01, 8.04239138473335e-01,\n                                                7.83627303599587e-01, 7.64757286757231e-01, 7.47553905174939e-01, 7.31925497169414e-01, 7.17771565274177e-01,\n                                                7.04988822013163e-01, 6.93475549465305e-01, 6.83134409016617e-01, 6.73873968558766e-01, 6.65609262036455e-01,\n                                                6.58261684999204e-01, 6.51758485408479e-01, 6.46032051933304e-01, 6.41019145723689e-01, 6.36660173191473e-01,\n                                                6.32898559103111e-01, 6.29680251050090e-01, 6.26953366559761e-01, 6.24667980803153e-01, 6.22776044211491e-01,\n                                                6.21231413816375e-01, 6.19989978653706e-01, 6.19009857357497e-01, 6.18251644666799e-01, 6.17678682778106e-01,\n                                                6.17257333272434e-01, 6.16957225828273e-01, 6.16751461232255e-01, 6.16616748445182e-01, 6.16533458722898e-01,\n                                                6.16485583978843e-01, 6.16460591533979e-01, 6.16449172846956e-01, 6.16444889395012e-01, 6.16443724200920e-01,\n                                                6.16443552221000e-01, 6.16443535831507e-01, 6.16443201015670e-01, 6.16440932599062e-01, 6.16432593809520e-01,\n                                                6.16410366809717e-01, 6.16361729405142e-01, 6.16268605324109e-01, 6.16106731676197e-01, 6.15845288144655e-01,\n                                                6.15446832733952e-01, 6.14867586885296e-01, 6.14058106417630e-01, 6.12964361769698e-01, 6.11529229446560e-01,\n                                                6.09694365480465e-01, 6.07402392063818e-01, 6.04599283929815e-01, 6.01236798176188e-01, 5.97274759214670e-01,\n                                                5.92682999463293e-01, 5.87442774589803e-01, 5.81547522822433e-01, 5.75002916568380e-01, 5.67826248251635e-01,\n                                                5.60045281430178e-01, 5.51696762177940e-01, 5.42824809136988e-01, 5.33479379204678e-01, 5.23714947865670e-01,\n                                                5.13589466696232e-01, 5.03163586600664e-01, 4.92500080827952e-01, 4.81663375028987e-01, 4.70719091586560e-01,\n                                                4.59733534823059e-01, 4.48773072880982e-01, 4.37903402711157e-01, 4.27188711194802e-01, 4.16690765324532e-01,\n                                                4.06467976893708e-01, 3.96574492610384e-01, 3.87059359719700e-01, 3.77965811091627e-01, 3.69330703599076e-01,\n                                                3.61184131021787e-01, 3.53549219362833e-01, 3.46442099982909e-01, 3.39872045662730e-01, 3.33841747439436e-01,\n                                                3.28347706128810e-01, 3.23380711632055e-01, 3.18926384852176e-01, 3.14965760516984e-01, 3.11475893572080e-01,\n                                                3.08430476303556e-01, 3.05800457351040e-01, 3.03554656860541e-01, 3.01660373973220e-01, 3.00083983613774e-01,\n                                                2.98791519243395e-01, 2.97749237109770e-01, 2.96924155867501e-01, 2.96284563598462e-01, 2.95800482574450e-01,\n                                                2.95444080873409e-01, 2.95190019425036e-01, 2.95015723373623e-01, 2.94901567862382e-01, 2.94830970430297e-01,\n                                                2.94790385039562e-01, 2.94769196133799e-01, 2.94759514822161e-01, 2.94755883039954e-01, 2.94754895108269e-01,\n                                                2.94754749291670e-01, 2.94754734859069e-01, 2.94754434391535e-01, 2.94752398682917e-01, 2.94744915250533e-01,\n                                                2.94724967535245e-01, 2.94681314315056e-01, 2.94597720331083e-01, 2.94452372088983e-01, 2.94217510856839e-01,\n                                                2.93859312485623e-01, 2.93338040412166e-01, 2.92608493533663e-01, 2.91620764023833e-01, 2.90321311131223e-01,\n                                                2.88654345299435e-01, 2.86563502596991e-01, 2.83993772821134e-01, 2.80893626492130e-01, 2.77217267361621e-01,\n                                                2.72926919343220e-01, 2.67995041385063e-01, 2.62406352205488e-01, 2.56159540440606e-01, 2.49268536027202e-01,\n                                                2.41763227035676e-01, 2.33689524184825e-01, 2.25108704225903e-01, 2.16096003882981e-01, 2.06738487151284e-01,\n                                                1.97132267250183e-01, 1.87379224453679e-01, 1.77583414168467e-01, 1.67847396955210e-01, 1.58268735967454e-01,\n                                                1.48936893331893e-01, 1.39930716137798e-01, 1.31316640896515e-01, 1.23147672338689e-01, 1.15463119475990e-01,\n                                                1.08289009149559e-01, 1.01639051955132e-01, 9.55160106195621e-02, 8.99133159236669e-02, 8.48167865675151e-02,\n                                                8.02063318755160e-02, 7.60575445988678e-02, 7.23431206441916e-02, 6.90340698968441e-02, 6.61007053104754e-02,\n                                                6.35134151803953e-02, 6.12432359866801e-02, 5.92622509305301e-02, 5.75438431407775e-02, 5.60628334165614e-02,\n                                                5.47955311624975e-02, 5.37197245950978e-02, 5.28146329177872e-02, 5.20608393802178e-02, 5.14402202254729e-02,\n                                                5.09358806518208e-02, 5.05321051825689e-02, 5.02143263217789e-02, 4.99691121562904e-02, 4.97841707253315e-02,\n                                                4.96483666250356e-02, 4.95517435460044e-02, 4.94855453523400e-02, 4.94422279546001e-02, 4.94154546171615e-02,\n                                                4.94000684042391e-02, 4.93920370959557e-02, 4.93883679088043e-02, 4.93869915321170e-02, 4.93866171301391e-02,\n                                                4.93865618694116e-02, 4.93865561690541e-02, 4.93864351635978e-02, 4.93856153415351e-02, 4.93826017061707e-02,\n                                                4.93745693615324e-02, 4.93569953415829e-02, 4.93233564970410e-02, 4.92649130135021e-02, 4.91705996553833e-02,\n                                                4.90270492307019e-02, 4.88187740264152e-02, 4.85285297402385e-02, 4.81378812767446e-02, 4.76279793555676e-02,\n                                                4.69805403394474e-02, 4.61789990632013e-02, 4.52097770311468e-02, 4.40635789967843e-02, 4.27366040385664e-02,\n                                                4.12315383719317e-02, 3.95581922071102e-02, 3.77336570153943e-02, 3.57818953111320e-02, 3.37327315666727e-02,\n                                                3.16202848365208e-02, 2.94809615104441e-02, 2.73511977355980e-02, 2.52651917981268e-02, 2.32528848715106e-02,\n                                                2.13384256190778e-02, 1.95392882005052e-02, 1.78661114382095e-02, 1.63232074949917e-02, 1.49095792274068e-02,\n                                                1.36202162193513e-02, 1.24474295976569e-02, 1.13820333224766e-02, 1.04142619586440e-02, 9.53439996021643e-03,\n                                                8.73315970811461e-03, 8.00187523304885e-03, 7.33258077198684e-03, 6.71802992519588e-03, 6.15169294491125e-03,\n                                                5.62775258499926e-03, 5.14110506038890e-03, 4.68736274176251e-03, 4.26285003898386e-03, 3.86458383104582e-03,\n                                                3.49023361908962e-03, 3.13806172998454e-03, 2.80684776060980e-03, 2.49580283690420e-03, 2.20447871241447e-03,\n                                                1.93267563956567e-03, 1.68035234116815e-03, 1.44754142283432e-03, 1.23427366879980e-03, 1.04051430126617e-03,\n                                                8.66113287600001e-04, 7.10770394050542e-04, 5.74014325266603e-04, 4.55194284896265e-04, 3.53481777111142e-04,\n                                                2.67880391476183e-04, 1.97241539083848e-04, 1.40284487571307e-04, 9.56194672028232e-05, 6.17730283636320e-05,\n                                                3.72152011891558e-05, 2.03883585072617e-05, 9.73807021864559e-06, 3.74680436721064e-06, 9.72452795622303e-07,\n                                                4.26325641456060e-14}),\nmadness::CubicInterpolationTable<double>(grid, {9.30000000000000e+01, 9.29999995431791e+01, 9.29999854173697e+01, 9.29998897126503e+01, 9.29995378877455e+01,\n                                                9.29986000192220e+01, 9.29965473521095e+01, 9.29926156185842e+01, 9.29857763340286e+01, 9.29747169776318e+01,\n                                                9.29578306504939e+01, 9.29332155289582e+01, 9.28986842618959e+01, 9.28517834704910e+01, 9.27898237510341e+01,\n                                                9.27099210509871e+01, 9.26090508789548e+01, 9.24841172770604e+01, 9.23320384574139e+01, 9.21498500578542e+01,\n                                                9.19348247845487e+01, 9.16846037721374e+01, 9.13973307959519e+01, 9.10717765518234e+01, 9.07074379724077e+01,\n                                                9.03045982899294e+01, 8.98643379456125e+01, 8.93884940252432e+01, 8.88795749825395e+01, 8.83406454916220e+01,\n                                                8.77752008453448e+01, 8.71870498191968e+01, 8.65802193556005e+01, 8.59588854486212e+01, 8.53273250462917e+01,\n                                                8.46898767801223e+01, 8.40508964006279e+01, 8.34146969267492e+01, 8.27854723660849e+01, 8.21672136067895e+01,\n                                                8.15636307551752e+01, 8.09780946533663e+01, 8.04136027970528e+01, 7.98727663120536e+01, 7.93578098136052e+01,\n                                                7.88705761915188e+01, 7.84125316641146e+01, 7.79847700281436e+01, 7.75880172586838e+01, 7.72226382862552e+01,\n                                                7.68886474593173e+01, 7.65857235220812e+01, 7.63132293006915e+01, 7.60702358501176e+01, 7.58555505726574e+01,\n                                                7.56677487185488e+01, 7.55052076543471e+01, 7.53661432855740e+01, 7.52486480169130e+01, 7.51507296131345e+01,\n                                                7.50703502860027e+01, 7.50054652828775e+01, 7.49540602014893e+01, 7.49141862136639e+01, 7.48839923594055e+01,\n                                                7.48617540809484e+01, 7.48458972108736e+01, 7.48350167127771e+01, 7.48278895973898e+01, 7.48234815980965e+01,\n                                                7.48209473808202e+01, 7.48196242749431e+01, 7.48190197332696e+01, 7.48187929482229e+01, 7.48187312571355e+01,\n                                                7.48187221516582e+01, 7.48187209052468e+01, 7.48186914692298e+01, 7.48184920362019e+01, 7.48177589040602e+01,\n                                                7.48158046795445e+01, 7.48115280927194e+01, 7.48033386289134e+01, 7.47890993086827e+01, 7.47660907550506e+01,\n                                                7.47309994458678e+01, 7.46799327088678e+01, 7.46084625153141e+01, 7.45116993986726e+01, 7.43843968110535e+01,\n                                                7.42210849020053e+01, 7.40162310729282e+01, 7.37644227885186e+01, 7.34605661274809e+01, 7.31000915810589e+01,\n                                                7.26791568400353e+01, 7.21948349615945e+01, 7.16452756572386e+01, 7.10298278836400e+01, 7.03491139293751e+01,\n                                                6.96050491413714e+01, 6.88008071788658e+01, 6.79407371086487e+01, 6.70302435999180e+01, 6.60756424489189e+01,\n                                                6.50839994849805e+01, 6.40629535840908e+01, 6.30205196570893e+01, 6.19648713625155e+01, 6.09041166839130e+01,\n                                                5.98460933613811e+01, 5.87982118334872e+01, 5.77673563302495e+01, 5.67598318044157e+01, 5.57813326146698e+01,\n                                                5.48369140701345e+01, 5.39309618188818e+01, 5.30671651455599e+01, 5.22485033511604e+01, 5.14772511591663e+01,\n                                                5.07550037013881e+01, 5.00827173118251e+01, 4.94607603540811e+01, 4.88889684075678e+01, 4.83666994907526e+01,\n                                                4.78928867467398e+01, 4.74660875739370e+01, 4.70845292861157e+01, 4.67461520020834e+01, 4.64486496918270e+01,\n                                                4.61895102760441e+01, 4.59660555055605e+01, 4.57754811157949e+01, 4.56148975033725e+01, 4.54813709266124e+01,\n                                                4.53719649955401e+01, 4.52837819934490e+01, 4.52140033658525e+01, 4.51599285326928e+01, 4.51190110378142e+01,\n                                                4.50888909590947e+01, 4.50674224751941e+01, 4.50526955290165e+01, 4.50430506468332e+01, 4.50370861623236e+01,\n                                                4.50336573468594e+01, 4.50318672457320e+01, 4.50310493450553e+01, 4.50307425241046e+01, 4.50306590615394e+01,\n                                                4.50306467426459e+01, 4.50306455732434e+01, 4.50306217319049e+01, 4.50304602036245e+01, 4.50298664130064e+01,\n                                                4.50282836192375e+01, 4.50248198863444e+01, 4.50181870845844e+01, 4.50066546547501e+01, 4.49880207314950e+01,\n                                                4.49596030461774e+01, 4.49182517698869e+01, 4.48603860563577e+01, 4.47820554414599e+01, 4.46790263981845e+01,\n                                                4.45468932044540e+01, 4.43812108671107e+01, 4.41776462263085e+01, 4.39321416723610e+01, 4.36410843354680e+01,\n                                                4.33014723901434e+01, 4.29110694753118e+01, 4.24685383156215e+01, 4.19735454347989e+01, 4.14268301787805e+01,\n                                                4.08302327779405e+01, 4.01866776145021e+01, 3.95001093897008e+01, 3.87753823419312e+01, 3.80181072246060e+01,\n                                                3.72344676658606e+01, 3.64310245826983e+01, 3.56145298957844e+01, 3.47917651111393e+01, 3.39694078462036e+01,\n                                                3.31539172367210e+01, 3.23514249060186e+01, 3.15676235902825e+01, 3.08076558650807e+01, 3.00760139763881e+01,\n                                                2.93764644744638e+01, 2.87120081348956e+01, 2.80848790671411e+01, 2.74965799873183e+01, 2.69479455244650e+01,\n                                                2.64392230138405e+01, 2.59701603285373e+01, 2.55400921434173e+01, 2.51480186955359e+01, 2.47926738302371e+01,\n                                                2.44725814045142e+01, 2.41861007399728e+01, 2.39314627694479e+01, 2.37067989205725e+01, 2.35101647894043e+01,\n                                                2.33395604339516e+01, 2.31929487830964e+01, 2.30682732914271e+01, 2.29634756189642e+01, 2.28765137952004e+01,\n                                                2.28053810433521e+01, 2.27481251914837e+01, 2.27028683803419e+01, 2.26678265939501e+01, 2.26413283920205e+01,\n                                                2.26218321191056e+01, 2.26079408108926e+01, 2.25984140187120e+01, 2.25921758318294e+01, 2.25883184917837e+01,\n                                                2.25861011574556e+01, 2.25849435825292e+01, 2.25844146937467e+01, 2.25842162920167e+01, 2.25841623221916e+01,\n                                                2.25841543563677e+01, 2.25841536474663e+01, 2.25841396926602e+01, 2.25840451470482e+01, 2.25836975911696e+01,\n                                                2.25827711639325e+01, 2.25807438483810e+01, 2.25768618627749e+01, 2.25701128282355e+01, 2.25592093453015e+01,\n                                                2.25425845503297e+01, 2.25184011023320e+01, 2.24845748246818e+01, 2.24388138433487e+01, 2.23786734789023e+01,\n                                                2.23016263368098e+01, 2.22051460055073e+01, 2.20868015665212e+01, 2.19443588531998e+01, 2.17758832277034e+01,\n                                                2.15798377848798e+01, 2.13551705513076e+01, 2.11013846013912e+01, 2.08185861269916e+01, 2.05075072703790e+01,\n                                                2.01695026565618e+01, 1.98065205628590e+01, 1.94210510238005e+01, 1.90160535702023e+01, 1.85948669084960e+01,\n                                                1.81611024728864e+01, 1.77185246706733e+01, 1.72709236743926e+01, 1.68219911998710e+01, 1.63752132552356e+01,\n                                                1.59337929692697e+01, 1.55006098939744e+01, 1.50782121590527e+01, 1.46688297214542e+01, 1.42743946786239e+01,\n                                                1.38965582235920e+01, 1.35367001272616e+01, 1.31959320758445e+01, 1.28750989259323e+01, 1.25747820488386e+01,\n                                                1.22953075039974e+01, 1.20367599509559e+01, 1.17990017161085e+01, 1.15816955552537e+01, 1.13843293691800e+01,\n                                                1.12062412681585e+01, 1.10466437502564e+01, 1.09046462017449e+01, 1.07792753433094e+01, 1.06694935796524e+01,\n                                                1.05742154439638e+01, 1.04923224655482e+01, 1.04226768423091e+01, 1.03641342871326e+01, 1.03155563556943e+01,\n                                                1.02758224683693e+01, 1.02438417243801e+01, 1.02185644841974e+01, 1.01989935775355e+01, 1.01841948891071e+01,\n                                                1.01733069915124e+01, 1.01655494414932e+01, 1.01602293372701e+01, 1.01567457529793e+01, 1.01545917203022e+01,\n                                                1.01533535129836e+01, 1.01527070999837e+01, 1.01524117583196e+01, 1.01523009670465e+01, 1.01522708292831e+01,\n                                                1.01522663810178e+01, 1.01522659877683e+01, 1.01522582759847e+01, 1.01522060276580e+01, 1.01520139594154e+01,\n                                                1.01515019923847e+01, 1.01503816482058e+01, 1.01482363736556e+01, 1.01445067199962e+01, 1.01384812836782e+01,\n                                                1.01292942845232e+01, 1.01159305969794e+01, 1.00972389354013e+01, 1.00719536996509e+01, 1.00387256895349e+01,\n                                                9.99616148076812e+00, 9.94287072033634e+00, 9.87751996351159e+00, 9.79889097930922e+00, 9.70594076034254e+00,\n                                                9.59785987185404e+00, 9.47412536126026e+00, 9.33454432285225e+00, 9.17928445596169e+00, 9.00888861778442e+00,\n                                                8.82427144824817e+00, 8.62669755693300e+00, 8.41774235739103e+00, 8.19923819424133e+00, 7.97320968695863e+00,\n                                                7.74180299441916e+00, 7.50721386252596e+00, 7.27161886984324e+00, 7.03711339236297e+00, 6.80565871971093e+00,\n                                                6.57903972408435e+00, 6.35883367185912e+00, 6.14639019872700e+00, 5.94282204871782e+00, 5.74900577780349e+00,\n                                                5.56559117530101e+00, 5.39301769812067e+00, 5.23153586077339e+00, 5.08123139797361e+00, 4.94205016743322e+00,\n                                                4.81382214478445e+00, 4.69628337152585e+00, 4.58909522925536e+00, 4.49186084010003e+00, 4.40413869450754e+00,\n                                                4.32545378619319e+00, 4.25530661681694e+00, 4.19318045287285e+00, 4.13854720231502e+00, 4.09087224744681e+00,\n                                                4.04961853368586e+00, 4.01425017488853e+00, 3.98423579538546e+00, 3.95905178581424e+00, 3.93818560332853e+00,\n                                                3.92113919667601e+00, 3.90743258387369e+00, 3.89660755673333e+00, 3.88823143513588e+00, 3.88190074812950e+00,\n                                                3.87724468220203e+00, 3.87392811274482e+00, 3.87165402530962e+00, 3.87016514013951e+00, 3.86924457654958e+00,\n                                                3.86871543142861e+00, 3.86843919537642e+00, 3.86831298663915e+00, 3.86826564232226e+00, 3.86825276360867e+00,\n                                                3.86825086274075e+00, 3.86825069209630e+00, 3.86824731630236e+00, 3.86822444488541e+00, 3.86814036839176e+00,\n                                                3.86791626096432e+00, 3.86742585623217e+00, 3.86648685981461e+00, 3.86485452311457e+00, 3.86221780529432e+00,\n                                                3.85819854781755e+00, 3.85235406747326e+00, 3.84418352504156e+00, 3.83313833227089e+00, 3.81863670590006e+00,\n                                                3.80008225575351e+00, 3.77688620551653e+00, 3.74849250371132e+00, 3.71440471781294e+00, 3.67421326006438e+00,\n                                                3.62762122324192e+00, 3.57446696405295e+00, 3.51474160704993e+00, 3.44859987726308e+00, 3.37636309879706e+00,\n                                                3.29851377973117e+00, 3.21568187381979e+00, 3.12862348575473e+00, 3.03819339061991e+00, 2.94531320719160e+00,\n                                                2.85093735897605e+00, 2.75601905783756e+00, 2.66147845102937e+00, 2.56817479520824e+00, 2.47688408680634e+00,\n                                                2.38828303054459e+00, 2.30293962820056e+00, 2.22131009069658e+00, 2.14374128943894e+00, 2.07047762237261e+00,\n                                                2.00167100312815e+00, 1.93739268295460e+00, 1.87764575309373e+00, 1.82237740218136e+00, 1.77149026810739e+00,\n                                                1.72485248258310e+00, 1.68230622877687e+00, 1.64367480200072e+00, 1.60876827770528e+00, 1.57738795618616e+00,\n                                                1.54932978041883e+00, 1.52438692446401e+00, 1.50235173573535e+00, 1.48301719329950e+00, 1.46617802159831e+00,\n                                                1.45163157728719e+00, 1.43917860714063e+00, 1.42862395686848e+00, 1.41977729340097e+00, 1.41245388588301e+00,\n                                                1.40647547272094e+00, 1.40167122345147e+00, 1.39787878535643e+00, 1.39494538647170e+00, 1.39272895009201e+00,\n                                                1.39109916235950e+00, 1.38993842529899e+00, 1.38914262373289e+00, 1.38862163646873e+00, 1.38829953005219e+00,\n                                                1.38811438668810e+00, 1.38801773556170e+00, 1.38797357723708e+00, 1.38795701230893e+00, 1.38795250628309e+00,\n                                                1.38795184120440e+00, 1.38795177989604e+00, 1.38795054919919e+00, 1.38794221108378e+00, 1.38791155983937e+00,\n                                                1.38782985909954e+00, 1.38765108046077e+00, 1.38730878008725e+00, 1.38671377369334e+00, 1.38575277422206e+00,\n                                                1.38428815879490e+00, 1.38215902718876e+00, 1.37918369692876e+00, 1.37516374330895e+00, 1.36988963029353e+00,\n                                                1.36314788679429e+00, 1.35472966307213e+00, 1.34444036077922e+00, 1.33210988117152e+00, 1.31760289950039e+00,\n                                                1.30082847385427e+00, 1.28174825781254e+00, 1.26038262605942e+00, 1.23681414630785e+00, 1.21118802891384e+00,\n                                                1.18370943028621e+00, 1.15463773878236e+00, 1.12427819131122e+00, 1.09297132432454e+00, 1.06108084349901e+00,\n                                                1.02898051597880e+00, 9.97040680933452e-01, 9.65614977020010e-01, 9.35027923019717e-01, 9.05564051947522e-01,\n                                                8.77459342864086e-01, 8.50895648511568e-01, 8.25998620879034e-01, 8.02839280216617e-01, 7.81438916001974e-01,\n                                                7.61776567532081e-01, 7.43798032291267e-01, 7.27425270005170e-01, 7.12565209382319e-01, 6.99117254467112e-01,\n                                                6.86979129577537e-01, 6.76051008731605e-01, 6.66238096103172e-01, 6.57451945999952e-01, 6.49610848910513e-01,\n                                                6.42639590935318e-01, 6.36468844018651e-01, 6.31034384294665e-01, 6.26276278391288e-01, 6.22138129060261e-01,\n                                                6.18566433926645e-01, 6.15510083840405e-01, 6.12920008485446e-01, 6.10748964499521e-01, 6.08951453504687e-01,\n                                                6.07483752621675e-01, 6.06304037135018e-01, 6.05372573237133e-01, 6.04651957777776e-01, 6.04107381481143e-01,\n                                                6.03706892143649e-01, 6.03421634981189e-01, 6.03226048683112e-01, 6.03097997972469e-01, 6.03018826622474e-01,\n                                                6.02973318890704e-01, 6.02949562053126e-01, 6.02938707882714e-01, 6.02934636193552e-01, 6.02933528603401e-01,\n                                                6.02933365125679e-01, 6.02933349546447e-01, 6.02933031282944e-01, 6.02930875010216e-01, 6.02922948462890e-01,\n                                                6.02901820268798e-01, 6.02855587164456e-01, 6.02767066038638e-01, 6.02613192066244e-01, 6.02364664988585e-01,\n                                                6.01985885724332e-01, 6.01435223471142e-01, 6.00665647320014e-01, 5.99625744016663e-01, 5.98261123016968e-01,\n                                                5.96516180548676e-01, 5.94336156960139e-01, 5.91669379713210e-01, 5.88469544315146e-01, 5.84697856014628e-01,\n                                                5.80324845746631e-01, 5.75331692321214e-01, 5.69710932010267e-01, 5.63466511803313e-01, 5.56613230869743e-01,\n                                                5.49175697483733e-01, 5.41186986320852e-01, 5.32687199663783e-01, 5.23722112353923e-01, 5.14342023064216e-01,\n                                                5.04600861270092e-01, 4.94555530187654e-01, 4.84265416596529e-01, 4.73791976029915e-01, 4.63198304687808e-01,\n                                                4.52548630157253e-01, 4.41907682313797e-01, 4.31339935742898e-01, 4.20908740609164e-01, 4.10675377799024e-01,\n                                                4.00698085855680e-01, 3.91031112086537e-01, 3.81723838993452e-01, 3.72820030811326e-01, 3.64357234674145e-01,\n                                                3.56366358259166e-01, 3.48871432348403e-01, 3.41889554195106e-01, 3.35430997196724e-01, 3.29499464995862e-01,\n                                                3.24092464059945e-01, 3.19201767832254e-01, 3.14813947128698e-01, 3.10910944793875e-01, 3.07470676890304e-01,\n                                                3.04467647107828e-01, 3.01873565036004e-01, 2.99657962014422e-01, 2.97788800240951e-01, 2.96233071631207e-01,\n                                                2.94957382696310e-01, 2.93928520663627e-01, 2.93113994510136e-01, 2.92482542843089e-01, 2.92004598980114e-01,\n                                                2.91652702445006e-01, 2.91401845635406e-01, 2.91229744781930e-01, 2.91117025560283e-01, 2.91047315797798e-01,\n                                                2.91007240514872e-01, 2.90986317869226e-01, 2.90976758199875e-01, 2.90973172047629e-01, 2.90972196528159e-01,\n                                                2.90972052543566e-01, 2.90972038292324e-01, 2.90971741599762e-01, 2.90969731467143e-01, 2.90962342051060e-01,\n                                                2.90942644919824e-01, 2.90899539950260e-01, 2.90816995370605e-01, 2.90673470296014e-01, 2.90441551076654e-01,\n                                                2.90087830303676e-01, 2.89573054001366e-01, 2.88852557886017e-01, 2.87877007087701e-01, 2.86593444988981e-01,\n                                                2.84946645594772e-01, 2.82880750131582e-01, 2.80341152728568e-01, 2.77276582728504e-01, 2.73641313385198e-01,\n                                                2.69397409611955e-01, 2.64516912361259e-01, 2.58983845487862e-01, 2.52795923949336e-01, 2.45965841360999e-01,\n                                                2.38522021811093e-01, 2.30508737121880e-01, 2.21985517942556e-01, 2.13025825997164e-01, 2.03715004763794e-01,\n                                                1.94147583750024e-01, 1.84424071494675e-01, 1.74647426266716e-01, 1.64919432025201e-01, 1.55337222658602e-01,\n                                                1.45990185418157e-01, 1.36957435366114e-01, 1.28305992288759e-01, 1.20089719476638e-01, 1.12349011231046e-01,\n                                                1.05111153148115e-01, 9.83912334307178e-02, 9.21934580046866e-02, 8.65127165499189e-02, 8.13362572619099e-02,\n                                                7.66453502043873e-02, 7.24168471499667e-02, 6.86245751375765e-02, 6.52405281081201e-02, 6.22358437594528e-02,\n                                                5.95815702615567e-02, 5.72492396740643e-02, 5.52112724049607e-02, 5.34412407158555e-02, 5.19140200728856e-02,\n                                                5.06058559331990e-02, 4.94943710685618e-02, 4.85585352942195e-02, 4.77786158695039e-02, 4.71361231004721e-02,\n                                                4.66137619517042e-02, 4.61953968568452e-02, 4.58660334796406e-02, 4.56118180013192e-02, 4.54200516919769e-02,\n                                                4.52792161744782e-02, 4.51790030237333e-02, 4.51103402620845e-02, 4.50654079704833e-02, 4.50376356459401e-02,\n                                                4.50216750320749e-02, 4.50133438108367e-02, 4.50095375854573e-02, 4.50081098001505e-02, 4.50077214137110e-02,\n                                                4.50076640888852e-02, 4.50076581756207e-02, 4.50075326504731e-02, 4.50066822069886e-02, 4.50035560030244e-02,\n                                                4.49952235844933e-02, 4.49769928230666e-02, 4.49420960981399e-02, 4.48814647079558e-02, 4.47836139325517e-02,\n                                                4.46346634857093e-02, 4.44185192739326e-02, 4.41172411110529e-02, 4.37116158930877e-02, 4.31819454123996e-02,\n                                                4.25090416533607e-02, 4.16754001081756e-02, 4.06664946736726e-02, 3.94721088535448e-02, 3.80875916205099e-02,\n                                                3.65149078577076e-02, 3.47633485427252e-02, 3.28497795454723e-02, 3.07983424049212e-02, 2.86395742859042e-02,\n                                                2.64089816082702e-02, 2.41451726405728e-02, 2.18877163181759e-02, 1.96749355667265e-02, 1.75418545906467e-02,\n                                                1.55184976431997e-02, 1.36286852270899e-02, 1.18894022605787e-02, 1.03107354944285e-02, 8.89630927909479e-03,\n                                                7.64410145409045e-03, 6.54749991201697e-03, 5.59646282933102e-03, 4.77866387343795e-03, 4.08052970978190e-03,\n                                                3.48810636444341e-03, 2.98772253150048e-03, 2.56645022247426e-03, 2.21239060977041e-03, 1.91482771401752e-03,\n                                                1.66429120444889e-03, 1.45255714313919e-03, 1.27260261707818e-03, 1.11852464287665e-03, 9.85435067036633e-04,\n                                                8.69345264632670e-04, 7.67052325898021e-04, 6.76032493672096e-04, 5.94341862054648e-04, 5.20521990623024e-04,\n                                                4.53509195111224e-04, 3.92548655852920e-04, 3.37116005098892e-04, 2.86848986590371e-04, 2.41490650765286e-04,\n                                                2.00844234385045e-04, 1.64738923103869e-04, 1.33005208084569e-04, 1.05458377106515e-04, 8.18886619100567e-05,\n                                                6.20566203792805e-05, 4.56924458092089e-05, 3.24980730397328e-05, 2.21511749884939e-05, 1.43103865468674e-05,\n                                                8.62132814916095e-06, 4.72320516564650e-06, 2.25594136793461e-06, 8.67992682174190e-07, 2.84217094304040e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {9.40000000000000e+01, 9.39999995361642e+01, 9.39999851934399e+01, 9.39998880190844e+01, 9.39995307915625e+01,\n                                                9.39985785210334e+01, 9.39964943323827e+01, 9.39925022194914e+01, 9.39855578978313e+01, 9.39743286754339e+01,\n                                                9.39571829434370e+01, 9.39321896091186e+01, 9.38971276256807e+01, 9.38495057884557e+01, 9.37865932209861e+01,\n                                                9.37054614610219e+01, 9.36030396638364e+01, 9.34761849158484e+01, 9.33217696103399e+01, 9.31367868415139e+01,\n                                                9.29184724964651e+01, 9.26644391681435e+01, 9.23728126954956e+01, 9.20423581424350e+01, 9.16725798002355e+01,\n                                                9.12637806844161e+01, 9.08170716487160e+01, 9.03343281330378e+01, 8.98181019123760e+01, 8.92715034076518e+01,\n                                                8.86980745874848e+01, 8.81016716678783e+01, 8.74863707925254e+01, 8.68564004492642e+01, 8.62160945317438e+01,\n                                                8.55698529734547e+01, 8.49220953579743e+01, 8.42771977621926e+01, 8.36394127050059e+01, 8.30127821850606e+01,\n                                                8.24010590928161e+01, 8.18076497664804e+01, 8.12355820010308e+01, 8.06874939634532e+01, 8.01656350524960e+01,\n                                                7.96718706429712e+01, 7.92076864270978e+01, 7.87741917613326e+01, 7.83721235240075e+01, 7.80018524695564e+01,\n                                                7.76633935985505e+01, 7.73564213091360e+01, 7.70802894389137e+01, 7.68340558759113e+01, 7.66165111964789e+01,\n                                                7.64262107075355e+01, 7.62615092608343e+01, 7.61205982172552e+01, 7.60015439407827e+01, 7.59023271833518e+01,\n                                                7.58208826834271e+01, 7.57551382501959e+01, 7.57030525522158e+01, 7.56626507859132e+01, 7.56320573766095e+01,\n                                                7.56095248721462e+01, 7.55934582335306e+01, 7.55824338119858e+01, 7.55752124274668e+01, 7.55707461266535e+01,\n                                                7.55681783918664e+01, 7.55668377868496e+01, 7.55662252496796e+01, 7.55659954652469e+01, 7.55659329582538e+01,\n                                                7.55659237323506e+01, 7.55659224694546e+01, 7.55658926441269e+01, 7.55656905734678e+01, 7.55649477452092e+01,\n                                                7.55629676751311e+01, 7.55586345296044e+01, 7.55503367632198e+01, 7.55359091480260e+01, 7.55125963781720e+01,\n                                                7.54770411903790e+01, 7.54252995970640e+01, 7.53528853214738e+01, 7.52548447852381e+01, 7.51258629705453e+01,\n                                                7.49603991300915e+01, 7.47528496581186e+01, 7.44977335270695e+01, 7.41898936504409e+01, 7.38247055099289e+01,\n                                                7.33982825739416e+01, 7.29076666657620e+01, 7.23509908182561e+01, 7.17276026923692e+01, 7.10381388193075e+01,\n                                                7.02845440765896e+01, 6.94700366774001e+01, 6.85990252926160e+01, 6.76769894758577e+01, 6.67103349010275e+01,\n                                                6.57062302161001e+01, 6.46724251545270e+01, 6.36170459968799e+01, 6.25483704537405e+01, 6.14745987365609e+01,\n                                                6.04036501572374e+01, 5.93430116186028e+01, 5.82996442648393e+01, 5.72799319323726e+01, 5.62896464963415e+01,\n                                                5.53339135029096e+01, 5.44171761977351e+01, 5.35431660154332e+01, 5.27148890390622e+01, 5.19346335680387e+01,\n                                                5.12039981760609e+01, 5.05239354992637e+01, 4.98948054004542e+01, 4.93164316530407e+01, 4.87881579168107e+01,\n                                                4.83089006577120e+01, 4.78771982414718e+01, 4.74912564860180e+01, 4.71489915023246e+01, 4.68480708123405e+01,\n                                                4.65859536528225e+01, 4.63599311742251e+01, 4.61671670003463e+01, 4.60047383654625e+01, 4.58696778049483e+01,\n                                                4.57590151453634e+01, 4.56698193214441e+01, 4.55992393444703e+01, 4.55445435678700e+01, 4.55031562541354e+01,\n                                                4.54726903559892e+01, 4.54509753968177e+01, 4.54360793795801e+01, 4.54263237731028e+01, 4.54202908167467e+01,\n                                                4.54168226391092e+01, 4.54150119880589e+01, 4.54141846981078e+01, 4.54138743549412e+01, 4.54137899342503e+01,\n                                                4.54137774739395e+01, 4.54137762911126e+01, 4.54137521760826e+01, 4.54135887935057e+01, 4.54129881863536e+01,\n                                                4.54113872226390e+01, 4.54078837274531e+01, 4.54011747845355e+01, 4.53895099708580e+01, 4.53706621507104e+01,\n                                                4.53419182785011e+01, 4.53000923972039e+01, 4.52415626146997e+01, 4.51623332317669e+01, 4.50581223302107e+01,\n                                                4.49244739785755e+01, 4.47568927879025e+01, 4.45509969189519e+01, 4.43026839375315e+01, 4.40083023282806e+01,\n                                                4.36648202373740e+01, 4.32699823366825e+01, 4.28224457212168e+01, 4.23218864551023e+01, 4.17690695833114e+01,\n                                                4.11658768518772e+01, 4.05152878976721e+01, 3.98213126086956e+01, 3.90888756097407e+01, 3.83236592922313e+01,\n                                                3.75319190271814e+01, 3.67202902025742e+01, 3.58956069733862e+01, 3.50647447442575e+01, 3.42344857214144e+01,\n                                                3.34113970222721e+01, 3.26017098442658e+01, 3.18111957141827e+01, 3.10450461563645e+01, 3.03077690399413e+01,\n                                                2.96031155044942e+01, 2.89340465867646e+01, 2.83027413581835e+01, 2.77106414764541e+01, 2.71585224368800e+01,\n                                                2.66465800704093e+01, 2.61745215797070e+01, 2.57416527376224e+01, 2.53469558324994e+01, 2.49891557739954e+01,\n                                                2.46667740208606e+01, 2.43781714959702e+01, 2.41215824571385e+01, 2.38951415483758e+01, 2.36969061497143e+01,\n                                                2.35248758388701e+01, 2.33770103954488e+01, 2.32512473919973e+01, 2.31455200617977e+01, 2.30577758217511e+01,\n                                                2.29859955581503e+01, 2.29282135479415e+01, 2.28825376841786e+01, 2.28471695014938e+01, 2.28204233591908e+01,\n                                                2.28007440423186e+01, 2.27867219919401e+01, 2.27771053806907e+01, 2.27708083115374e+01, 2.27669145349640e+01,\n                                                2.27646762462709e+01, 2.27635077292525e+01, 2.27629738404755e+01, 2.27627735630002e+01, 2.27627190829197e+01,\n                                                2.27627110417830e+01, 2.27627103261793e+01, 2.27626962394372e+01, 2.27626007999354e+01, 2.27622499579521e+01,\n                                                2.27613147706199e+01, 2.27592682810427e+01, 2.27553495642623e+01, 2.27485366206654e+01, 2.27375297544704e+01,\n                                                2.27207470090672e+01, 2.26963331062548e+01, 2.26621831065391e+01, 2.26159816225759e+01, 2.25552578334165e+01,\n                                                2.24774557378759e+01, 2.23800180583125e+01, 2.22604810149065e+01, 2.21165759437007e+01, 2.19463325919913e+01,\n                                                2.17481780934070e+01, 2.15210253075235e+01, 2.12643445612640e+01, 2.09782138938119e+01, 2.06633445533993e+01,\n                                                2.03210804004877e+01, 1.99533715779108e+01, 1.95627238815616e+01, 1.91521255607978e+01, 1.87249532019281e+01,\n                                                1.82848588990205e+01, 1.78356432277985e+01, 1.73811228620714e+01, 1.69250063619917e+01, 1.64707933792402e+01,\n                                                1.60217084232868e+01, 1.55806709470631e+01, 1.51502933090839e+01, 1.47328924974524e+01, 1.43305025794050e+01,\n                                                1.39448806518907e+01, 1.35775056420320e+01, 1.32295736355245e+01, 1.29019946642533e+01, 1.25953948523286e+01,\n                                                1.23101258054502e+01, 1.20462811770676e+01, 1.18037189959549e+01, 1.15820877075023e+01, 1.13808538354965e+01,\n                                                1.11993294977735e+01, 1.10366985055836e+01, 1.08920402944914e+01, 1.07643513857107e+01, 1.06525644209937e+01,\n                                                1.05555650440530e+01, 1.04722070275154e+01, 1.04013260849063e+01, 1.03417527819282e+01, 1.02923248885752e+01,\n                                                1.02518994091861e+01, 1.02193644049023e+01, 1.01936505940839e+01, 1.01737425918702e+01, 1.01586895402127e+01,\n                                                1.01476147932083e+01, 1.01397242667070e+01, 1.01343130409965e+01, 1.01307698230658e+01, 1.01285789294634e+01,\n                                                1.01273195377348e+01, 1.01266620665831e+01, 1.01263616728192e+01, 1.01262489864036e+01, 1.01262183331226e+01,\n                                                1.01262138087682e+01, 1.01262134087921e+01, 1.01262055650958e+01, 1.01261524230478e+01, 1.01259570694772e+01,\n                                                1.01254363456291e+01, 1.01242968407239e+01, 1.01221148839431e+01, 1.01183214797832e+01, 1.01121931136063e+01,\n                                                1.01028493249392e+01, 1.00892578859598e+01, 1.00702483066131e+01, 1.00445341890512e+01, 1.00107446485371e+01,\n                                                9.96746459004900e+00, 9.91328307847947e+00, 9.84684838440671e+00, 9.76692756950550e+00, 9.67246776302096e+00,\n                                                9.56265566222856e+00, 9.43697136803989e+00, 9.29523254522590e+00, 9.13762516146154e+00, 8.96471775891608e+00,\n                                                8.77745733556817e+00, 8.57714637458132e+00, 8.36540219365970e+00, 8.14410136477339e+00, 7.91531322932457e+00,\n                                                7.68122729538797e+00, 7.44407944467643e+00, 7.20608143088268e+00, 6.96935728510594e+00, 6.73588919937617e+00,\n                                                6.50747446036951e+00, 6.28569417972091e+00, 6.07189391729266e+00, 5.86717573708648e+00, 5.67240068916898e+00,\n                                                5.48820016478017e+00, 5.31499410401733e+00, 5.15301376411682e+00, 5.00232676369110e+00, 4.86286240117234e+00,\n                                                4.73443571861043e+00, 4.61676932091332e+00, 4.50951245474464e+00, 4.41225723434670e+00, 4.32455215590194e+00,\n                                                4.24591318429246e+00, 4.17583275772732e+00, 4.11378706804177e+00, 4.05924196112403e+00, 4.01165777716834e+00,\n                                                3.97049342097729e+00, 3.93520992021362e+00, 3.90527369387644e+00, 3.88015971328990e+00, 3.85935469289586e+00,\n                                                3.84236039838477e+00, 3.82869710646499e+00, 3.81790719614075e+00, 3.80955879880932e+00, 3.80324938738113e+00,\n                                                3.79860914666237e+00, 3.79530394178967e+00, 3.79303769116360e+00, 3.79155395649320e+00, 3.79063658517818e+00,\n                                                3.79010927768400e+00, 3.78983400173067e+00, 3.78970823182851e+00, 3.78966105215942e+00, 3.78964821823644e+00,\n                                                3.78964632397957e+00, 3.78964615392864e+00, 3.78964278987556e+00, 3.78961999800636e+00, 3.78953621396583e+00,\n                                                3.78931288631993e+00, 3.78882418918030e+00, 3.78788846706733e+00, 3.78626183711646e+00, 3.78363437703058e+00,\n                                                3.77962932583030e+00, 3.77380570703193e+00, 3.76566473582216e+00, 3.75466027738959e+00, 3.74021346886208e+00,\n                                                3.72173139376346e+00, 3.69862940649129e+00, 3.67035635909359e+00, 3.63642161291472e+00, 3.59642236750886e+00,\n                                                3.55006956297723e+00, 3.49721046602600e+00, 3.43784608174278e+00, 3.37214176829168e+00, 3.30042986601175e+00,\n                                                3.22320374806360e+00, 3.14110339092537e+00, 3.05489326779640e+00, 2.96543400380462e+00, 2.87364972922587e+00,\n                                                2.78049337691294e+00, 2.68691226671568e+00, 2.59381619807786e+00, 2.50204994764219e+00, 2.41237157763840e+00,\n                                                2.32543735980200e+00, 2.24179348200535e+00, 2.16187411077247e+00, 2.08600490454722e+00, 2.01441075972623e+00,\n                                                1.94722644225455e+00, 1.88450879796410e+00, 1.82624940582869e+00, 1.77238678807510e+00, 1.72281756756063e+00,\n                                                1.67740622343501e+00, 1.63599331287260e+00, 1.59840218683404e+00, 1.56444433120109e+00, 1.53392351938163e+00,\n                                                1.50663898076095e+00, 1.48238778380934e+00, 1.46096661406310e+00, 1.44217310350359e+00, 1.42580684396520e+00,\n                                                1.41167019543529e+00, 1.39956898095215e+00, 1.38931314265703e+00, 1.38071741738210e+00, 1.37360207397246e+00,\n                                                1.36779373771363e+00, 1.36312630963114e+00, 1.35944197042518e+00, 1.35659224123597e+00, 1.35443905745278e+00,\n                                                1.35285579867906e+00, 1.35172820899201e+00, 1.35095513779044e+00, 1.35044903340285e+00, 1.35013612928687e+00,\n                                                1.34995627558104e+00, 1.34986238591523e+00, 1.34981948927502e+00, 1.34980339764023e+00, 1.34979902036089e+00,\n                                                1.34979837428492e+00, 1.34979831472823e+00, 1.34979711919499e+00, 1.34978901931723e+00, 1.34975924384746e+00,\n                                                1.34967987750720e+00, 1.34950620716808e+00, 1.34917368797274e+00, 1.34859568541566e+00, 1.34766215333403e+00,\n                                                1.34623941007510e+00, 1.34417117100773e+00, 1.34128097890894e+00, 1.33737613797715e+00, 1.33225319647482e+00,\n                                                1.32570493387421e+00, 1.31752869169365e+00, 1.30753574966882e+00, 1.29556130396850e+00, 1.28147447160458e+00,\n                                                1.26518764868720e+00, 1.24666451300203e+00, 1.22592600058343e+00, 1.20305370654926e+00, 1.17819035152860e+00,\n                                                1.15153718970265e+00, 1.12334847506224e+00, 1.09392331001754e+00, 1.06359534660179e+00, 1.03272088728055e+00,\n                                                1.00166595594543e+00, 9.70792914425402e-01, 9.40447223198134e-01, 9.10945006774853e-01, 8.82562169124853e-01,\n                                                8.55525857881602e-01, 8.30009021544782e-01, 8.06128580835235e-01, 7.83947340507140e-01, 7.63479275338625e-01,\n                                                7.44697364616258e-01, 7.27542855515580e-01, 7.11934781739515e-01, 6.97778737871531e-01, 6.84974230451374e-01,\n                                                6.73420286656878e-01, 6.63019311929702e-01, 6.53679401419097e-01, 6.45315419898850e-01, 6.37849190363141e-01,\n                                                6.31209102233029e-01, 6.25329393552590e-01, 6.20149297903922e-01, 6.15612188067885e-01, 6.11664800192500e-01,\n                                                6.08256585618079e-01, 6.05339211432252e-01, 6.02866213235117e-01, 6.00792792296758e-01, 5.99075742362984e-01,\n                                                5.97673487299687e-01, 5.96546208474550e-01, 5.95656039537531e-01, 5.94967305665236e-01, 5.94446784195554e-01,\n                                                5.94063963882022e-01, 5.93791280826039e-01, 5.93604310626475e-01, 5.93481898538954e-01, 5.93406212510899e-01,\n                                                5.93362707820958e-01, 5.93339996556836e-01, 5.93329620073050e-01, 5.93325727573443e-01, 5.93324668726510e-01,\n                                                5.93324512443189e-01, 5.93324497549560e-01, 5.93324193292275e-01, 5.93322131913041e-01, 5.93314554193569e-01,\n                                                5.93294355764314e-01, 5.93250157011056e-01, 5.93165530315147e-01, 5.93018423798796e-01, 5.92780821345968e-01,\n                                                5.92418678624455e-01, 5.91892172748885e-01, 5.91156297268654e-01, 5.90161822334878e-01, 5.88856620477117e-01,\n                                                5.87187330633242e-01, 5.85101297868135e-01, 5.82548686956216e-01, 5.79484630748979e-01, 5.75871247272758e-01,\n                                                5.71679351753886e-01, 5.66889708361089e-01, 5.61493713692869e-01, 5.55493475075636e-01, 5.48901329091777e-01,\n                                                5.41738921632216e-01, 5.34036021981763e-01, 5.25829257490400e-01, 5.17160930061266e-01, 5.08078020120749e-01,\n                                                4.98631415012781e-01, 4.88875335656900e-01, 4.78866891994542e-01, 4.68665680123252e-01, 4.58333339806288e-01,\n                                                4.47933012748891e-01, 4.37528670785511e-01, 4.27184311649611e-01, 4.16963043823671e-01, 4.06926099184446e-01,\n                                                3.97131822466775e-01, 3.87634690419986e-01, 3.78484411634830e-01, 3.69725151278033e-01, 3.61394914541307e-01,\n                                                3.53525109925002e-01, 3.46140300134763e-01, 3.39258135931260e-01, 3.32889458007898e-01, 3.27038544702233e-01,\n                                                3.21703479359414e-01, 3.16876610262753e-01, 3.12545077656424e-01, 3.08691385734662e-01, 3.05294001728186e-01,\n                                                3.02327968626457e-01, 2.99765522026448e-01, 2.97576704672849e-01, 2.95729974232728e-01, 2.94192800684655e-01,\n                                                2.92932249508695e-01, 2.91915545864100e-01, 2.91110613433247e-01, 2.90486579924561e-01, 2.90014239690564e-01,\n                                                2.89666462819866e-01, 2.89418539630802e-01, 2.89248449870399e-01, 2.89137047163379e-01, 2.89068151316755e-01,\n                                                2.89028543852041e-01, 2.89007865419947e-01, 2.88998417326980e-01, 2.88994873029750e-01, 2.88993908895804e-01,\n                                                2.88993766591688e-01, 2.88993752506755e-01, 2.88993459276995e-01, 2.88991472604835e-01, 2.88984169430108e-01,\n                                                2.88964702171498e-01, 2.88922100195975e-01, 2.88840518616595e-01, 2.88698667289481e-01, 2.88469450828089e-01,\n                                                2.88119847957120e-01, 2.87611055212508e-01, 2.86898915389742e-01, 2.85934644771018e-01, 2.84665864618930e-01,\n                                                2.83037931485367e-01, 2.80995547568153e-01, 2.78484616971937e-01, 2.75454296924067e-01, 2.71859175655877e-01,\n                                                2.67661491893776e-01, 2.62833295940851e-01, 2.57358440462539e-01, 2.51234281675877e-01, 2.44472970148351e-01,\n                                                2.37102216474327e-01, 2.29165432491058e-01, 2.20721175051025e-01, 2.11841857590258e-01, 2.02611744164713e-01,\n                                                1.93124298212695e-01, 1.83479018203386e-01, 1.73777946347954e-01, 1.64122075555355e-01, 1.54607895898010e-01,\n                                                1.45324310542762e-01, 1.36350112887243e-01, 1.27752157123368e-01, 1.19584283119650e-01, 1.11886984458437e-01,\n                                                1.04687745872113e-01, 9.80019304635533e-02, 9.18340713460140e-02, 8.61794162490384e-02, 8.10255838617735e-02,\n                                                7.63542122625864e-02, 7.21425074220150e-02, 6.83646287958339e-02, 6.49928759610816e-02, 6.19986629269533e-02,\n                                                5.93532842245423e-02, 5.70284891106922e-02, 5.49968877764542e-02, 5.32322171944770e-02, 5.17094951108561e-02,\n                                                5.04050895538626e-02, 4.92967288042081e-02, 4.83634735931560e-02, 4.75856697303954e-02, 4.69448956591805e-02,\n                                                4.64239157332855e-02, 4.60066464094950e-02, 4.56781391221313e-02, 4.54245804394873e-02, 4.52333072892372e-02,\n                                                4.50928326966675e-02, 4.49928757173268e-02, 4.49243881641479e-02, 4.48795703900942e-02, 4.48518687936712e-02,\n                                                4.48359488080996e-02, 4.48276387888171e-02, 4.48238422486327e-02, 4.48224180961887e-02, 4.48220306979294e-02,\n                                                4.48219735189781e-02, 4.48219676207486e-02, 4.48218424149900e-02, 4.48209941352360e-02, 4.48178758848172e-02,\n                                                4.48095646626427e-02, 4.47913802644138e-02, 4.47565722364942e-02, 4.46960947973452e-02, 4.45984920603735e-02,\n                                                4.44499181922708e-02, 4.42343183110410e-02, 4.39337946652074e-02, 4.35291775237090e-02, 4.30008099423560e-02,\n                                                4.23295393375156e-02, 4.14978866286759e-02, 4.04913368875270e-02, 3.92996667430054e-02, 3.79181975260252e-02,\n                                                3.63488447191429e-02, 3.46008294133213e-02, 3.26909309344785e-02, 3.06431939242771e-02, 2.84880565597234e-02,\n                                                2.62609334734378e-02, 2.40003574513992e-02, 2.17458458707966e-02, 1.95356990211621e-02, 1.74049490045292e-02,\n                                                1.53836564967378e-02, 1.34957016859261e-02, 1.17581448692334e-02, 1.01811553659843e-02, 8.76843934061355e-03,\n                                                7.51804950368751e-03, 6.42343778223164e-03, 5.47461377003344e-03, 4.65928970481855e-03, 3.96391885746539e-03,\n                                                3.37456379436674e-03, 2.87756251339033e-03, 2.45999219222881e-03, 2.10995706041217e-03, 1.81674173819601e-03,\n                                                1.57087107076848e-03, 1.36410649616892e-03, 1.18939686774411e-03, 1.04079571335092e-03, 9.13357180138519e-04,\n                                                8.03024024307319e-04, 7.06518421552005e-04, 6.21240400377587e-04, 5.45173106985430e-04, 4.76792009507676e-04,\n                                                4.14976554822033e-04, 3.58925451493519e-04, 3.08078461955574e-04, 2.62047595967374e-04, 2.20559452941416e-04,\n                                                1.83409085835251e-04, 1.50424734584931e-04, 1.21442224326529e-04, 9.62876020338399e-05, 7.47665327196501e-05,\n                                                5.66590154846836e-05, 4.17180867628986e-05, 2.96713556338091e-05, 2.02244448672673e-05, 1.30656591181832e-05,\n                                                7.87144070102386e-06, 4.31237900500037e-06, 2.05971888078693e-06, 7.92494461165916e-07, 9.94759830064140e-14,\n                                                8.52651282912120e-14}),\nmadness::CubicInterpolationTable<double>(grid, {9.50000000000000e+01, 9.49999995291080e+01, 9.49999849681931e+01, 9.49998863155587e+01, 9.49995236536465e+01,\n                                                9.49985568964105e+01, 9.49964410008276e+01, 9.49923881534134e+01, 9.49853381767029e+01, 9.49739380886875e+01,\n                                                9.49565314247019e+01, 9.49311576499251e+01, 9.48955618224597e+01, 9.48472146881252e+01, 9.47833436539746e+01,\n                                                9.47009755912765e+01, 9.45969930432130e+01, 9.44682058956702e+01, 9.43114405130551e+01, 9.41236472948344e+01,\n                                                9.39020252404167e+01, 9.36441584315692e+01, 9.33481549027027e+01, 9.30127743005411e+01, 9.26375285316786e+01,\n                                                9.22227406359563e+01, 9.17695520446427e+01, 9.12798765977057e+01, 9.07563093125109e+01, 9.02020061965364e+01,\n                                                8.96205557423591e+01, 8.90158615776228e+01, 8.83920492429533e+01, 8.77534001841000e+01, 8.71043059224870e+01,\n                                                8.64492284401753e+01, 8.57926517463338e+01, 8.51390152194569e+01, 8.44926297205318e+01, 8.38575879018055e+01,\n                                                8.32376849590032e+01, 8.26363624922193e+01, 8.20566787385751e+01, 8.15012993839196e+01, 8.09724992669412e+01,\n                                                8.04721669088760e+01, 8.00018080184835e+01, 7.95625478811247e+01, 7.91551344745025e+01, 7.87799444307014e+01,\n                                                7.84369933538954e+01, 7.81259511823894e+01, 7.78461626147248e+01, 7.75966722041147e+01, 7.73762535274796e+01,\n                                                7.71834417756168e+01, 7.70165691162028e+01, 7.68738022007111e+01, 7.67531811923549e+01, 7.66526596748844e+01,\n                                                7.65701447630471e+01, 7.65035366828846e+01, 7.64507670350588e+01, 7.64098349091534e+01, 7.63788399927888e+01,\n                                                7.63560118259709e+01, 7.63397343953192e+01, 7.63285653483603e+01, 7.63212492350391e+01, 7.63167243484634e+01,\n                                                7.63141229327702e+01, 7.63127647433111e+01, 7.63121441716702e+01, 7.63119113732311e+01, 7.63118480463552e+01,\n                                                7.63118386994390e+01, 7.63118374199781e+01, 7.63118072034420e+01, 7.63116024822947e+01, 7.63108499106568e+01,\n                                                7.63088438690400e+01, 7.63044538891568e+01, 7.62960472924380e+01, 7.62814304649970e+01, 7.62578119976420e+01,\n                                                7.62217906742013e+01, 7.61693709444489e+01, 7.60960080045603e+01, 7.59966838593826e+01, 7.58660146977334e+01,\n                                                7.56983885414943e+01, 7.54881304403160e+01, 7.52296905374899e+01, 7.49178482437217e+01, 7.45479236851245e+01,\n                                                7.41159857401313e+01, 7.36190445962421e+01, 7.30552161709149e+01, 7.24238463859855e+01, 7.17255856389476e+01,\n                                                7.09624081526542e+01, 7.01375768526571e+01, 6.92555606354959e+01, 6.83219150120585e+01, 6.73431368174693e+01,\n                                                6.63264985292303e+01, 6.52798609177376e+01, 6.42114607133947e+01, 6.31296780523778e+01, 6.20428040904253e+01,\n                                                6.09588398912367e+01, 5.98853508530590e+01, 5.88293782567897e+01, 5.77973879900500e+01, 5.67952315051111e+01,\n                                                5.58281051581542e+01, 5.49005091418966e+01, 5.40162157609724e+01, 5.31782565703322e+01, 5.23889325168832e+01,\n                                                5.16498452428788e+01, 5.09619438430807e+01, 5.03255802191385e+01, 4.97405670702637e+01, 4.92062344438747e+01,\n                                                4.87214827578101e+01, 4.82848317814046e+01, 4.78944660559016e+01, 4.75482776999296e+01, 4.72439076351124e+01,\n                                                4.69787861390395e+01, 4.67501734076712e+01, 4.65552005577345e+01, 4.63909112531601e+01, 4.62543039058418e+01,\n                                                4.61423741783335e+01, 4.60521573031543e+01, 4.59807695335993e+01, 4.59254478634265e+01, 4.58835870106908e+01,\n                                                4.58527725689449e+01, 4.58308092002981e+01, 4.58157427888087e+01, 4.58058755930719e+01, 4.57997736306074e+01,\n                                                4.57962657838865e+01, 4.57944344227476e+01, 4.57935976703567e+01, 4.57932837775299e+01, 4.57931983912479e+01,\n                                                4.57931857884181e+01, 4.57931845920622e+01, 4.57931602012082e+01, 4.57929949498872e+01, 4.57923874730937e+01,\n                                                4.57907681978956e+01, 4.57872246308011e+01, 4.57804389542980e+01, 4.57686407281809e+01, 4.57495773530749e+01,\n                                                4.57205047747373e+01, 4.56782006431200e+01, 4.56190017318688e+01, 4.55388668100511e+01, 4.54334652851446e+01,\n                                                4.52982907756492e+01, 4.51287973351778e+01, 4.49205544057149e+01, 4.46694148579315e+01, 4.43716888712823e+01,\n                                                4.40243151389556e+01, 4.36250201595520e+01, 4.31724563242038e+01, 4.26663101102359e+01, 4.21073727902976e+01,\n                                                4.14975674597995e+01, 4.08399278758702e+01, 4.01385270445876e+01, 3.93983575484900e+01, 3.86251717789226e+01,\n                                                3.78252973539519e+01, 3.70054475670445e+01, 3.61725446660822e+01, 3.53335643366541e+01, 3.44953977310358e+01,\n                                                3.36647202319105e+01, 3.28478581059567e+01, 3.20506531236728e+01, 3.12783349203564e+01, 3.05354159473712e+01,\n                                                2.98256225449920e+01, 2.91518695601375e+01, 2.85162781191194e+01, 2.79202294422064e+01, 2.73644435536389e+01,\n                                                2.68490707131540e+01, 2.63737847772844e+01, 2.59378704873743e+01, 2.55402998852799e+01, 2.51797959450137e+01,\n                                                2.48548836827733e+01, 2.45639303665638e+01, 2.43051770847897e+01, 2.40767640398261e+01, 2.38767517110327e+01,\n                                                2.37031396513595e+01, 2.35538842591883e+01, 2.34269164676165e+01, 2.33201599433183e+01, 2.32315500890370e+01,\n                                                2.31590538898025e+01, 2.31006904238173e+01, 2.30545516687619e+01, 2.30188230722826e+01, 2.29918032254776e+01,\n                                                2.29719218871701e+01, 2.29577555623120e+01, 2.29480398464054e+01, 2.29416778125716e+01, 2.29377438376071e+01,\n                                                2.29354824318073e+01, 2.29343018435387e+01, 2.29337624388426e+01, 2.29335600920804e+01, 2.29335050490966e+01,\n                                                2.29334969248763e+01, 2.29334962018787e+01, 2.29334819695877e+01, 2.29333855439658e+01, 2.29330310768299e+01,\n                                                2.29320862256292e+01, 2.29300185841565e+01, 2.29260593484100e+01, 2.29191759089718e+01, 2.29080550141627e+01,\n                                                2.28910980778190e+01, 2.28664300764028e+01, 2.28319232466994e+01, 2.27852364083604e+01, 2.27238701518489e+01,\n                                                2.26452373274557e+01, 2.25467472533192e+01, 2.24259008842028e+01, 2.22803929567668e+01, 2.21082160120429e+01,\n                                                2.19077603873479e+01, 2.16779039616997e+01, 2.14180857682770e+01, 2.11283585722810e+01, 2.08094170002832e+01,\n                                                2.04625994717372e+01, 2.00898636085620e+01, 1.96937356723815e+01, 1.92772349627733e+01, 1.88437746381620e+01,\n                                                1.83970421605787e+01, 1.79408662947750e+01, 1.74790826708849e+01, 1.70154136874151e+01, 1.65533774822968e+01,\n                                                1.60962333751970e+01, 1.56469603345921e+01, 1.52082562734262e+01, 1.47825436493678e+01, 1.43719709369474e+01,\n                                                1.39784065153813e+01, 1.36034274300006e+01, 1.32483082984922e+01, 1.29140154584606e+01, 1.26012095346750e+01,\n                                                1.23102572638648e+01, 1.20412515157848e+01, 1.17940373317287e+01, 1.15682414384892e+01, 1.13633028825056e+01,\n                                                1.11785029246194e+01, 1.10129929390395e+01, 1.08658196351129e+01, 1.07359473940541e+01, 1.06222778584281e+01,\n                                                1.05236671324622e+01, 1.04389410634118e+01, 1.03669091003294e+01, 1.03063771882946e+01, 1.02561600722573e+01,\n                                                1.02150932708607e+01, 1.01820448501857e+01, 1.01559269919295e+01, 1.01357072207030e+01, 1.01204190407502e+01,\n                                                1.01091716422792e+01, 1.01011582790662e+01, 1.00956628971471e+01, 1.00920646114611e+01, 1.00898396821906e+01,\n                                                1.00885607307915e+01, 1.00878930498925e+01, 1.00875879917047e+01, 1.00874735555826e+01, 1.00874424263465e+01,\n                                                1.00874378317424e+01, 1.00874374255558e+01, 1.00874294600705e+01, 1.00873754928895e+01, 1.00871771061338e+01,\n                                                1.00866482976268e+01, 1.00854911031889e+01, 1.00832752824212e+01, 1.00794230309997e+01, 1.00731996660316e+01,\n                                                1.00637112032953e+01, 1.00499096857444e+01, 1.00306070055028e+01, 1.00044977587670e+01, 9.97019135953497e+00,\n                                                9.92625319769240e+00, 9.87125405854542e+00, 9.80382634400954e+00, 9.72272489479263e+00, 9.62688947832393e+00,\n                                                9.51550537182681e+00, 9.38805804100504e+00, 9.24437779979812e+00, 9.08467062421063e+00, 8.90953203064117e+00,\n                                                8.71994210020738e+00, 8.51724123980760e+00, 8.30308794211263e+00, 8.07940140476356e+00, 7.84829314398411e+00,\n                                                7.61199248794694e+00, 7.37277096695247e+00, 7.13287017675869e+00, 6.89443684717355e+00, 6.65946782733658e+00,\n                                                6.42976670018086e+00, 6.20691286434146e+00, 5.99224316990916e+00, 5.78684550777365e+00, 5.59156309539773e+00,\n                                                5.40700761077323e+00, 5.23357889835164e+00, 5.07148880508718e+00, 4.92078683886523e+00, 4.78138572653138e+00,\n                                                4.65308547302530e+00, 4.53559506262721e+00, 4.42855140467393e+00, 4.33153546503409e+00, 4.24408574025647e+00,\n                                                4.16570934817713e+00, 4.09589105894128e+00, 4.03410060174387e+00, 3.97979857418983e+00, 3.93244126348566e+00,\n                                                3.89148466593869e+00, 3.85638796414398e+00, 3.82661668902635e+00, 3.80164575571517e+00, 3.78096251780040e+00,\n                                                3.76406993450104e+00, 3.75048989128493e+00, 3.73976665903017e+00, 3.73147042313954e+00, 3.72520076578891e+00,\n                                                3.72058994546688e+00, 3.71730579155869e+00, 3.71505402056550e+00, 3.71357978605555e+00, 3.71266829656057e+00,\n                                                3.71214437272444e+00, 3.71187086398247e+00, 3.71174590167921e+00, 3.71169902499189e+00, 3.71168627348946e+00,\n                                                3.71168439139781e+00, 3.71168422243896e+00, 3.71168087999035e+00, 3.71165823449644e+00, 3.71157498857127e+00,\n                                                3.71135309552982e+00, 3.71086753893354e+00, 3.70993783496367e+00, 3.70832168196124e+00, 3.70571118586290e+00,\n                                                3.70173209009002e+00, 3.69594642211136e+00, 3.68785892161299e+00, 3.67692752101485e+00, 3.66257799378565e+00,\n                                                3.64422266091546e+00, 3.62128275186369e+00, 3.59321366740855e+00, 3.55953201761720e+00, 3.51984295306019e+00,\n                                                3.47386602643742e+00, 3.42145767232520e+00, 3.36262842315722e+00, 3.29755321721598e+00, 3.22657359643335e+00,\n                                                3.15019120161919e+00, 3.06905268449361e+00, 2.98392688573402e+00, 2.89567578919045e+00, 2.80522127830031e+00,\n                                                2.71351003572329e+00, 2.62147901027133e+00, 2.53002372114165e+00, 2.43997129893248e+00, 2.35205962183153e+00,\n                                                2.26692326192276e+00, 2.18508629362866e+00, 2.10696141855155e+00, 2.03285439931659e+00, 1.96297251324361e+00,\n                                                1.89743564472006e+00, 1.83628871096639e+00, 1.77951431467240e+00, 1.72704478405620e+00, 1.67877304413386e+00,\n                                                1.63456202170927e+00, 1.59425249565506e+00, 1.55766945359433e+00, 1.52462710830274e+00, 1.49493277183478e+00,\n                                                1.46838979558366e+00, 1.44479977312629e+00, 1.42396418047908e+00, 1.40568560285510e+00, 1.38976867262843e+00,\n                                                1.37602082186163e+00, 1.36425293455397e+00, 1.35427996783402e+00, 1.34592159642509e+00, 1.33900291975154e+00,\n                                                1.33335525533336e+00, 1.32881702547152e+00, 1.32523472703571e+00, 1.32246395726241e+00, 1.32037045300700e+00,\n                                                1.31883108816500e+00, 1.31773476522427e+00, 1.31698313313083e+00, 1.31649106543830e+00, 1.31618684013114e+00,\n                                                1.31601197507193e+00, 1.31592068969532e+00, 1.31587898292295e+00, 1.31586333764002e+00, 1.31585908177838e+00,\n                                                1.31585845362339e+00, 1.31585839571869e+00, 1.31585723334736e+00, 1.31584935814567e+00, 1.31582040859591e+00,\n                                                1.31574324375703e+00, 1.31557439085131e+00, 1.31525109570768e+00, 1.31468912788161e+00, 1.31378149616829e+00,\n                                                1.31239823255750e+00, 1.31038739876698e+00, 1.30757745336736e+00, 1.30378108274282e+00, 1.29880054004940e+00,\n                                                1.29243444962955e+00, 1.28448592085059e+00, 1.27477168161600e+00, 1.26313180099869e+00, 1.24943944179867e+00,\n                                                1.23360999031038e+00, 1.21560887461266e+00, 1.19545742048152e+00, 1.17323620996311e+00, 1.14908559062872e+00,\n                                                1.12320320723234e+00, 1.09583865555922e+00, 1.06728555399188e+00, 1.03787146623412e+00, 1.00794618380830e+00,\n                                                9.77868907868711e-01, 9.47994891700176e-01, 9.18662153524323e-01, 8.90178958496534e-01, 8.62812875218992e-01,\n                                                8.36782271408708e-01, 8.12251042357872e-01, 7.89327104869429e-01, 7.68064746323049e-01, 7.48470385606353e-01,\n                                                7.30510827231853e-01, 7.14122810346524e-01, 6.99222637332468e-01, 6.85714884442618e-01, 6.73499552074674e-01,\n                                                6.62477389389437e-01, 6.52553438533019e-01, 6.43639045993794e-01, 6.35652682767130e-01, 6.28519925859777e-01,\n                                                6.22172913367038e-01, 6.16549522022041e-01, 6.11592449262517e-01, 6.07248322436348e-01, 6.03466910224952e-01,\n                                                6.00200476129856e-01, 5.97403289336555e-01, 5.95031292116559e-01, 5.93041912854474e-01, 5.91394007850980e-01,\n                                                5.90047911767499e-01, 5.88965574897927e-01, 5.88110764695301e-01, 5.87449308766708e-01, 5.86949356712196e-01,\n                                                5.86581638715273e-01, 5.86319699782322e-01, 5.86140090097530e-01, 5.86022494223414e-01, 5.85949784887987e-01,\n                                                5.85907990828076e-01, 5.85886172471945e-01, 5.85876203920648e-01, 5.85872464443426e-01, 5.85871447221606e-01,\n                                                5.85871297082022e-01, 5.85871282773894e-01, 5.85870990477446e-01, 5.85869010133962e-01, 5.85861730300067e-01,\n                                                5.85842325843558e-01, 5.85799864270342e-01, 5.85718562912263e-01, 5.85577234277395e-01, 5.85348957253757e-01,\n                                                5.85001011615688e-01, 5.84495111114407e-01, 5.83787964631497e-01, 5.82832183572563e-01, 5.81577535283245e-01,\n                                                5.79972516086642e-01, 5.77966184505726e-01, 5.75510158564029e-01, 5.72560646509700e-01, 5.69080355673307e-01,\n                                                5.65040117809858e-01, 5.60420087683553e-01, 5.55210416686919e-01, 5.49411369984838e-01, 5.43032931983163e-01,\n                                                5.36094014030141e-01, 5.28621423384891e-01, 5.20648762567646e-01, 5.12215402055318e-01, 5.03365616227555e-01,\n                                                4.94147908868300e-01, 4.84614497783070e-01, 4.74820890810847e-01, 4.64825472376248e-01, 4.54689027899420e-01,\n                                                4.44474155450138e-01, 4.34244541684251e-01, 4.24064105755761e-01, 4.13996036686896e-01, 4.04101765089479e-01,\n                                                3.94439919042711e-01, 3.85065316825504e-01, 3.76028046730553e-01, 3.67372677173620e-01, 3.59137629817567e-01,\n                                                3.51354735811469e-01, 3.44048982039453e-01, 3.37238441995794e-01, 3.30934375800993e-01, 3.25141476754723e-01,\n                                                3.19858237961313e-01, 3.15077411758622e-01, 3.10786536358592e-01, 3.06968507493366e-01, 3.03602177137236e-01,\n                                                3.00662965788277e-01, 2.98123478748735e-01, 2.95954119922953e-01, 2.94123698636511e-01, 2.92600025831192e-01,\n                                                2.91350495812111e-01, 2.90342648749018e-01, 2.89544707647948e-01, 2.88926081853319e-01, 2.88457827628292e-01,\n                                                2.88113055286843e-01, 2.87867271933123e-01, 2.87698649247162e-01, 2.87588206990804e-01, 2.87519904954465e-01,\n                                                2.87480638805874e-01, 2.87460138552433e-01, 2.87450771866403e-01, 2.87447258107022e-01, 2.87446302280046e-01,\n                                                2.87446161201999e-01, 2.87446147238427e-01, 2.87445856535086e-01, 2.87443886979986e-01, 2.87436646727940e-01,\n                                                2.87417347188196e-01, 2.87375112210896e-01, 2.87294233283944e-01, 2.87153603271449e-01, 2.86926359159537e-01,\n                                                2.86579761769005e-01, 2.86075337084242e-01, 2.85369299278770e-01, 2.84413269227912e-01, 2.83155293898531e-01,\n                                                2.81541161277929e-01, 2.79515992462308e-01, 2.77026077472428e-01, 2.74020904888658e-01, 2.70455318352958e-01,\n                                                2.66291716413249e-01, 2.61502197271497e-01, 2.56070537996536e-01, 2.49993890037501e-01, 2.43284070923437e-01,\n                                                2.35968337564643e-01, 2.28089541432226e-01, 2.19705591783949e-01, 2.10888190977698e-01, 2.01720855114246e-01,\n                                                1.92296290715149e-01, 1.82713258003332e-01, 1.73073105409173e-01, 1.63476199054131e-01, 1.54018487271514e-01,\n                                                1.44788429250070e-01, 1.35864479091751e-01, 1.27313257527007e-01, 1.19188472655097e-01, 1.11530579408608e-01,\n                                                1.04367105120659e-01, 9.77135228419286e-02, 9.15745282798781e-02, 8.59455699842613e-02, 8.08144923803695e-02,\n                                                7.61631725500678e-02, 7.19690590430986e-02, 6.82065498237847e-02, 6.48481732367543e-02, 6.18655584413546e-02,\n                                                5.92301991604103e-02, 5.69140267823656e-02, 5.48898164118299e-02, 5.31314532385636e-02, 5.16140875104583e-02,\n                                                5.03142053091921e-02, 4.92096399353699e-02, 4.82795455596516e-02, 4.75043512553981e-02, 4.68657098453349e-02,\n                                                4.63464523141539e-02, 4.59305549564561e-02, 4.56031230207685e-02, 4.53503914564664e-02, 4.51597405693320e-02,\n                                                4.50197220556277e-02, 4.49200891290644e-02, 4.48518233773854e-02, 4.48071506473582e-02, 4.47795386616150e-02,\n                                                4.47636701610605e-02, 4.47553870122164e-02, 4.47516027471977e-02, 4.47501831992696e-02, 4.47497970535125e-02,\n                                                4.47497400594301e-02, 4.47497341802858e-02, 4.47496093793518e-02, 4.47487638423780e-02, 4.47456556741344e-02,\n                                                4.47373713225119e-02, 4.47192457056644e-02, 4.46845501583510e-02, 4.46242680340134e-02, 4.45269802004873e-02,\n                                                4.43788849536872e-02, 4.41639780328984e-02, 4.38644171663896e-02, 4.34610904878525e-02, 4.29343979603516e-02,\n                                                4.22652387993168e-02, 4.14361758377169e-02, 4.04327210986395e-02, 3.92446582948054e-02, 3.78672918264442e-02,\n                                                3.63024934839871e-02, 3.45594131619578e-02, 3.26547331997062e-02, 3.06123798208944e-02, 2.84626581895964e-02,\n                                                2.62408440863311e-02, 2.39853353657367e-02, 2.17355280095859e-02, 1.95296227323496e-02, 1.74025798365989e-02,\n                                                1.53844189885746e-02, 1.34990101034873e-02, 1.17634311491344e-02, 1.01878921758072e-02, 8.77615696698797e-03,\n                                                7.52634610043401e-03, 6.43198327331618e-03, 5.48314834848895e-03, 4.66761831141582e-03, 3.97190317036689e-03,\n                                                3.38211308456948e-03, 2.88462433442760e-03, 2.46654347971287e-03, 2.11599599748524e-03, 1.82228070852375e-03,\n                                                1.57593102557030e-03, 1.36871293955210e-03, 1.19357736646464e-03, 1.04457847128003e-03, 9.16770047780346e-04,\n                                                8.06093564705179e-04, 7.09269155649395e-04, 6.23694578720801e-04, 5.47351076505720e-04, 4.78712853748675e-04,\n                                                4.16658630868483e-04, 3.60386689280290e-04, 3.09336499796586e-04, 2.63119847588200e-04, 2.21463131310884e-04,\n                                                1.84161169670460e-04, 1.51041876520708e-04, 1.21940621099270e-04, 9.66828505255535e-05, 7.50734883183668e-05,\n                                                5.68916579481993e-05, 4.18893969253986e-05, 2.97932052717442e-05, 2.03075031066646e-05, 1.31193189787382e-05,\n                                                7.90376876125265e-06, 4.33009012112961e-06, 2.06817826153838e-06, 7.95749272697321e-07, 7.10542735760100e-14,\n                                                8.52651282912120e-14}),\nmadness::CubicInterpolationTable<double>(grid, {9.60000000000000e+01, 9.59999995220107e+01, 9.59999847416330e+01, 9.59998846021006e+01, 9.59995164741129e+01,\n                                                9.59985351457035e+01, 9.59963873583073e+01, 9.59922734221962e+01, 9.59851171741987e+01, 9.59735452237121e+01,\n                                                9.59558761048284e+01, 9.59301196680728e+01, 9.58939868775762e+01, 9.58449102066307e+01, 9.57800751028158e+01,\n                                                9.56964635150509e+01, 9.55909111167718e+01, 9.54601803498720e+01, 9.53010513415056e+01, 9.51104316472259e+01,\n                                                9.48854833121055e+01, 9.46237619387845e+01, 9.43233578894042e+01, 9.39830256066266e+01, 9.36022848646497e+01,\n                                                9.31814789611067e+01, 9.27217800597036e+01, 9.22251404355621e+01, 9.16941982608255e+01, 9.11321549662523e+01,\n                                                9.05426454221477e+01, 8.99296206541000e+01, 8.92972558177117e+01, 8.86498858037419e+01, 8.79919604568128e+01,\n                                                8.73280045468361e+01, 8.66625670676473e+01, 8.60001508898408e+01, 8.53451249948726e+01, 8.47016322063115e+01,\n                                                8.40735095640716e+01, 8.34642337514278e+01, 8.28768936600949e+01, 8.23141830298669e+01, 8.17784028256918e+01,\n                                                8.12714653781644e+01, 8.07948969367881e+01, 8.03498390574332e+01, 7.99370509851745e+01, 7.95569152598875e+01,\n                                                7.92094480236859e+01, 7.88943146304461e+01, 7.86108504835665e+01, 7.83580866318440e+01, 7.81347794800789e+01,\n                                                7.79394439323866e+01, 7.77703893060070e+01, 7.76257573813090e+01, 7.75035619635675e+01, 7.74017293155784e+01,\n                                                7.73181387801485e+01, 7.72506628570087e+01, 7.71972059416617e+01, 7.71557408865673e+01, 7.71243425195447e+01,\n                                                7.71012172600472e+01, 7.70847280180669e+01, 7.70734136465675e+01, 7.70660023466139e+01, 7.70614185911639e+01,\n                                                7.70587833318163e+01, 7.70574074729495e+01, 7.70567788280170e+01, 7.70565430010087e+01, 7.70564788502886e+01,\n                                                7.70564693817747e+01, 7.70564680856689e+01, 7.70564374760341e+01, 7.70562300915925e+01, 7.70554677294992e+01,\n                                                7.70534355908632e+01, 7.70489885020494e+01, 7.70404725492948e+01, 7.70256655958447e+01, 7.70017399552686e+01,\n                                                7.69652502473054e+01, 7.69121491121864e+01, 7.68378329400294e+01, 7.67372190133406e+01, 7.66048544023891e+01,\n                                                7.64350555608969e+01, 7.62220758508672e+01, 7.59602962411897e+01, 7.56444322909702e+01, 7.52697484112076e+01,\n                                                7.48322685088521e+01, 7.43289707230070e+01, 7.37579534168617e+01, 7.31185603430334e+01, 7.24114554236110e+01,\n                                                7.16386420992184e+01, 7.08034282391779e+01, 6.99103436535855e+01, 6.89650209064765e+01, 6.79740492165941e+01,\n                                                6.69448057377465e+01, 6.58852622297746e+01, 6.48037647791324e+01, 6.37087943464253e+01, 6.26087320370047e+01,\n                                                6.15116612929037e+01, 6.04252284123292e+01, 5.93565581436438e+01, 5.83122014089935e+01, 5.72980909446166e+01,\n                                                5.63194941326200e+01, 5.53809672204900e+01, 5.44863220174975e+01, 5.36386142911093e+01, 5.28401568437932e+01,\n                                                5.20925541800306e+01, 5.13967521625467e+01, 5.07530953821674e+01, 5.01613862529140e+01, 4.96209419617362e+01,\n                                                4.91306474717852e+01, 4.86890043296940e+01, 4.82941759439860e+01, 4.79440303806932e+01, 4.76361817411257e+01,\n                                                4.73680310137856e+01, 4.71368070462278e+01, 4.69396080274334e+01, 4.67734436306161e+01, 4.66352777417609e+01,\n                                                4.65220714849701e+01, 4.64308260486428e+01, 4.63586246197606e+01, 4.63026725567175e+01, 4.62603347882651e+01,\n                                                4.62291693327726e+01, 4.62069558021230e+01, 4.61917177981078e+01, 4.61817382300835e+01, 4.61755667779689e+01,\n                                                4.61720189844293e+01, 4.61701667682724e+01, 4.61693204872392e+01, 4.61690030199200e+01, 4.61689166612923e+01,\n                                                4.61689039149464e+01, 4.61689027049669e+01, 4.61688780363594e+01, 4.61687109032219e+01, 4.61680965087354e+01,\n                                                4.61664587939941e+01, 4.61628748748798e+01, 4.61560119288974e+01, 4.61440793601490e+01, 4.61247989313081e+01,\n                                                4.60953953712057e+01, 4.60526096998367e+01, 4.59927371007650e+01, 4.59116905516545e+01, 4.58050905433151e+01,\n                                                4.56683800470417e+01, 4.54969624412581e+01, 4.52863584496894e+01, 4.50323764057779e+01, 4.47312885296424e+01,\n                                                4.43800046023359e+01, 4.39762336468688e+01, 4.35186240960054e+01, 4.30068734349057e+01, 4.24417993290636e+01,\n                                                4.18253656705892e+01, 4.11606589225276e+01, 4.04518131489933e+01, 3.97038869198987e+01, 3.89227019061856e+01,\n                                                3.81146596001568e+01, 3.72865554722753e+01, 3.64454057660202e+01, 3.55982918528494e+01, 3.47522163840478e+01,\n                                                3.39139611691979e+01, 3.30899411684398e+01, 3.22860586406370e+01, 3.15075701196031e+01, 3.07589820186615e+01,\n                                                3.00439875348939e+01, 2.93654503150182e+01, 2.87254322392202e+01, 2.81252562838330e+01, 2.75655920528603e+01,\n                                                2.70465512744578e+01, 2.65677825618872e+01, 2.61285579429859e+01, 2.57278470614442e+01, 2.53643778515740e+01,\n                                                2.50366845504610e+01, 2.47431450985750e+01, 2.44820104385915e+01, 2.42514281753494e+01, 2.40494627268718e+01,\n                                                2.38741136486173e+01, 2.37233333603168e+01, 2.35950451014830e+01, 2.34871616034978e+01, 2.33976046869848e+01,\n                                                2.33243257591456e+01, 2.32653269842553e+01, 2.32186827244209e+01, 2.31825606961960e+01, 2.31552421662027e+01,\n                                                2.31351404231861e+01, 2.31208167233586e+01, 2.31109929174233e+01, 2.31045600348768e+01, 2.31005822230343e+01,\n                                                2.30982956085531e+01, 2.30971018571004e+01, 2.30965564375846e+01, 2.30963518343826e+01, 2.30962961775857e+01,\n                                                2.30962879627676e+01, 2.30962872317074e+01, 2.30962728407039e+01, 2.30961753397768e+01, 2.30958169196378e+01,\n                                                2.30948615306627e+01, 2.30927708248945e+01, 2.30887674081735e+01, 2.30818071061020e+01, 2.30705618962550e+01,\n                                                2.30534150841005e+01, 2.30284701666255e+01, 2.29935745908006e+01, 2.29463592254560e+01, 2.28842937827146e+01,\n                                                2.28047576254163e+01, 2.27051243892014e+01, 2.25828576868756e+01, 2.24356139560656e+01, 2.22613474164374e+01,\n                                                2.20584113078900e+01, 2.18256492664909e+01, 2.15624709782401e+01, 2.12689071275189e+01, 2.09456399607472e+01,\n                                                2.05940072053785e+01, 2.02159782774571e+01, 1.98141025215095e+01, 1.93914299360172e+01, 1.89514062486751e+01,\n                                                1.84977472684548e+01, 1.80343023076630e+01, 1.75649214730499e+01, 1.70933434246696e+01, 1.66231159180393e+01,\n                                                1.61575516251937e+01, 1.56997110146021e+01, 1.52523980911445e+01, 1.48181559680151e+01, 1.43992554806366e+01,\n                                                1.39976771163091e+01, 1.36150911399882e+01, 1.32528419867797e+01, 1.29119416014425e+01, 1.25930738843923e+01,\n                                                1.22966099563637e+01, 1.20226322315205e+01, 1.17709644517941e+01, 1.15412047455637e+01, 1.13327591765457e+01,\n                                                1.11448738914064e+01, 1.09766646640177e+01, 1.08271432501289e+01, 1.06952404508692e+01, 1.05798261231510e+01,\n                                                1.04797265814215e+01, 1.03937399312350e+01, 1.03206498859644e+01, 1.02592385664604e+01, 1.02082986886081e+01,\n                                                1.01666454209595e+01, 1.01331280568002e+01, 1.01066415034104e+01, 1.00861374562840e+01, 1.00706350073771e+01,\n                                                1.00592303428757e+01, 1.00511051248452e+01, 1.00455331276167e+01, 1.00418847161334e+01, 1.00396288086599e+01,\n                                                1.00383320556950e+01, 1.00376550830439e+01, 1.00373457798960e+01, 1.00372297514266e+01, 1.00371981890413e+01,\n                                                1.00371935305056e+01, 1.00371931186672e+01, 1.00371850423461e+01, 1.00371303242433e+01, 1.00369291771135e+01,\n                                                1.00363930111876e+01, 1.00352197188965e+01, 1.00329730829045e+01, 1.00290672876255e+01, 1.00227574998075e+01,\n                                                1.00131374578468e+01, 9.99914495096714e+00, 9.97957595126937e+00, 9.95310795485346e+00, 9.91833276670062e+00,\n                                                9.87379851089756e+00, 9.81806006187419e+00, 9.74973639410813e+00, 9.66757258368071e+00, 9.57050343866392e+00,\n                                                9.45771508375105e+00, 9.32870038965498e+00, 9.18330403105018e+00, 9.02175326879930e+00, 8.84467132866303e+00,\n                                                8.65307146775933e+00, 8.44833137715726e+00, 8.23214927827327e+00, 8.00648468970158e+00, 7.77348811963152e+00,\n                                                7.53542468259079e+00, 7.29459676552443e+00, 7.05327043133160e+00, 6.81360941456379e+00, 6.57761954591516e+00,\n                                                6.34710541609343e+00, 6.12364014481899e+00, 5.90854826244487e+00, 5.70290091499896e+00, 5.50752187601081e+00,\n                                                5.32300225714553e+00, 5.14972145208458e+00, 4.98787179321089e+00, 4.83748464269161e+00, 4.69845609551632e+00,\n                                                4.57057101870470e+00, 4.45352467320151e+00, 4.34694158895365e+00, 4.25039166358206e+00, 4.16340364142913e+00,\n                                                4.08547623067190e+00, 4.01608716186000e+00, 3.95470050546014e+00, 3.90077256379777e+00, 3.85375664173401e+00,\n                                                3.81310698314098e+00, 3.77828213686486e+00, 3.74874798571578e+00, 3.72398063459501e+00, 3.70346930933059e+00,\n                                                3.68671936715467e+00, 3.67325546489646e+00, 3.66262487456200e+00, 3.65440088134324e+00, 3.64818614996314e+00,\n                                                3.64361590539571e+00, 3.64036074682754e+00, 3.63812890187832e+00, 3.63666773301125e+00, 3.63576432968860e+00,\n                                                3.63524505653176e+00, 3.63497397642423e+00, 3.63485012391212e+00, 3.63480366356647e+00, 3.63479102532106e+00,\n                                                3.63478915994597e+00, 3.63478899248780e+00, 3.63478567972660e+00, 3.63476323537050e+00, 3.63468072886987e+00,\n                                                3.63446080702144e+00, 3.63397956513805e+00, 3.63305812744407e+00, 3.63145635921339e+00, 3.62886913861790e+00,\n                                                3.62492561723205e+00, 3.61919188288343e+00, 3.61117739207138e+00, 3.60034544532130e+00, 3.58612782320138e+00,\n                                                3.56794347442630e+00, 3.54522085128195e+00, 3.51742313568653e+00, 3.48407522132254e+00, 3.44479095830518e+00,\n                                                3.39929888250201e+00, 3.34746450015943e+00, 3.28930722941391e+00, 3.22501034218487e+00, 3.15492270103076e+00,\n                                                3.07955170970392e+00, 2.99954762675806e+00, 2.91568014226191e+00, 2.82880879703758e+00, 2.73984935000477e+00,\n                                                2.64973851101372e+00, 2.55939952011454e+00, 2.46971086578226e+00, 2.38148002094938e+00, 2.29542349202386e+00,\n                                                2.21215380033736e+00, 2.13217333762270e+00, 2.05587444416116e+00, 1.98354461838970e+00, 1.91537551744815e+00,\n                                                1.85147435154812e+00, 1.79187638221748e+00, 1.73655745603993e+00, 1.68544578502915e+00, 1.63843247078896e+00,\n                                                1.59538052365329e+00, 1.55613232776406e+00, 1.52051564136083e+00, 1.48834830273138e+00, 1.45944184746490e+00,\n                                                1.43360424557497e+00, 1.41064195074888e+00, 1.39036142889960e+00, 1.37257030648846e+00, 1.35707825474562e+00,\n                                                1.34369770538387e+00, 1.33224447644508e+00, 1.32253837237806e+00, 1.31440380892816e+00, 1.30767049971577e+00,\n                                                1.30217422675244e+00, 1.29775770142102e+00, 1.29427150600741e+00, 1.29157508956975e+00, 1.28953777692595e+00,\n                                                1.28803973713026e+00, 1.28697284923791e+00, 1.28624139941859e+00, 1.28576254516094e+00, 1.28546648949512e+00,\n                                                1.28529632035723e+00, 1.28520748643949e+00, 1.28516689970525e+00, 1.28515167457860e+00, 1.28514753300882e+00,\n                                                1.28514692172304e+00, 1.28514686537341e+00, 1.28514573421776e+00, 1.28513807050605e+00, 1.28510989840331e+00,\n                                                1.28503480585508e+00, 1.28487048761193e+00, 1.28455587499387e+00, 1.28400900022437e+00, 1.28312574700459e+00,\n                                                1.28177964132817e+00, 1.27982283279418e+00, 1.27708840104968e+00, 1.27339408823138e+00, 1.26854750085947e+00,\n                                                1.26235274037450e+00, 1.25461831121974e+00, 1.24516602546544e+00, 1.23384048622816e+00, 1.22051860722931e+00,\n                                                1.20511853496571e+00, 1.18760730469397e+00, 1.16800659714879e+00, 1.14639607346234e+00, 1.12291393998909e+00,\n                                                1.09775460704577e+00, 1.07116352120336e+00, 1.04342943547491e+00, 1.01487451305920e+00, 9.85842736364532e-01,\n                                                9.56687134586474e-01, 9.27756385653296e-01, 8.99381424697467e-01, 8.71862809352692e-01, 8.45459718272082e-01,\n                                                8.20381518355234e-01, 7.96782738963870e-01, 7.74761982143232e-01, 7.54364799917781e-01, 7.35589996860867e-01,\n                                                7.18398332544112e-01, 7.02722345028931e-01, 6.88476047395980e-01, 6.75563516556863e-01, 6.63885783381403e-01,\n                                                6.53345823412138e-01, 6.43851752611681e-01, 6.35318518881206e-01, 6.27668455642436e-01, 6.20831058736599e-01,\n                                                6.14742296607403e-01, 6.09343694286508e-01, 6.04581362502586e-01, 6.00405083871735e-01, 5.96767521911460e-01,\n                                                5.93623585181589e-01, 5.90929956121585e-01, 5.88644779573713e-01, 5.86727497187013e-01, 5.85138808951555e-01,\n                                                5.83840740583994e-01, 5.82796794371518e-01, 5.81972160761168e-01, 5.81333968102740e-01, 5.80851548376984e-01,\n                                                5.80496697473038e-01, 5.80243909706155e-01, 5.80070567911903e-01, 5.79957072726344e-01, 5.79886897616348e-01,\n                                                5.79846559831452e-01, 5.79825501592737e-01, 5.79815880302164e-01, 5.79812271087405e-01, 5.79811289299471e-01,\n                                                5.79811144389836e-01, 5.79811130580140e-01, 5.79810848465513e-01, 5.79808937104602e-01, 5.79801910847891e-01,\n                                                5.79783182257600e-01, 5.79742199408173e-01, 5.79663728477755e-01, 5.79527317273929e-01, 5.79306975507265e-01,\n                                                5.78971107184159e-01, 5.78482728225339e-01, 5.77799996749249e-01, 5.76877072652167e-01, 5.75665305704760e-01,\n                                                5.74114726736795e-01, 5.72175785525957e-01, 5.69801244801326e-01, 5.66948107763324e-01, 5.63579434025527e-01,\n                                                5.59665893668452e-01, 5.55186927075852e-01, 5.50131420843954e-01, 5.44497872327796e-01, 5.38294085753591e-01,\n                                                5.31536505512548e-01, 5.24249331877627e-01, 5.16463571244444e-01, 5.08216146771929e-01, 4.99549145330533e-01,\n                                                4.90509218465306e-01, 4.81147104599799e-01, 4.71517208054479e-01, 4.61677161223960e-01, 4.51687306194074e-01,\n                                                4.41610053999355e-01, 4.31509105920213e-01, 4.21448545824944e-01, 4.11491832287552e-01, 4.01700732894980e-01,\n                                                3.92134250812120e-01, 3.82847595760893e-01, 3.73891248658893e-01, 3.65310161960579e-01, 3.57143127232888e-01,\n                                                3.49422328959861e-01, 3.42173090511793e-01, 3.35413806108619e-01, 3.29156042683891e-01, 3.23404788596335e-01,\n                                                3.18158822412840e-01, 3.13411174287396e-01, 3.09149654220604e-01, 3.05357424930847e-01, 3.02013601384715e-01,\n                                                2.99093863475662e-01, 2.96571072307529e-01, 2.94415883625888e-01, 2.92597353929736e-01, 2.91083535648497e-01,\n                                                2.89842057602684e-01, 2.88840685997314e-01, 2.88047859727200e-01, 2.87433192126926e-01, 2.86967929799204e-01,\n                                                2.86625358088727e-01, 2.86381142356504e-01, 2.86213594591189e-01, 2.86103856123276e-01, 2.86035989240204e-01,\n                                                2.85996973222737e-01, 2.85976603549059e-01, 2.85967296523467e-01, 2.85963805144348e-01, 2.85962855405288e-01,\n                                                2.85962715225821e-01, 2.85962701351195e-01, 2.85962412499444e-01, 2.85960455488933e-01, 2.85953261351409e-01,\n                                                2.85934084729931e-01, 2.85892118725201e-01, 2.85811754793926e-01, 2.85672019991225e-01, 2.85446221778585e-01,\n                                                2.85101828111863e-01, 2.84600607221151e-01, 2.83899046956847e-01, 2.82949067344830e-01, 2.81699031695453e-01,\n                                                2.80095051027075e-01, 2.78082563710598e-01, 2.75608157400939e-01, 2.72621584060886e-01, 2.69077902013677e-01,\n                                                2.64939662492864e-01, 2.60179043235553e-01, 2.54779819535457e-01, 2.48739055205235e-01, 2.42068393632593e-01,\n                                                2.34794834316233e-01, 2.26960894845519e-01, 2.18624083984878e-01, 2.09855649299953e-01, 2.00738611947642e-01,\n                                                1.91365158734527e-01, 1.81833521426810e-01, 1.72244527333248e-01, 1.62698044263962e-01, 1.53289559221491e-01,\n                                                1.44107119190878e-01, 1.35228824666726e-01, 1.26721007675712e-01, 1.18637155435408e-01, 1.11017569424448e-01,\n                                                1.03889687600812e-01, 9.72689519868624e-02, 9.11600781828810e-02, 8.55585771513176e-02, 8.04523895429838e-02,\n                                                7.58235140356049e-02, 7.16495383976365e-02, 6.79050106623436e-02, 6.45626144319777e-02, 6.15941347856079e-02,\n                                                5.89712185814335e-02, 5.66659450903302e-02, 5.46512304226070e-02, 5.29010929680851e-02, 5.13908079788905e-02,\n                                                5.00969783428786e-02, 4.89975462219689e-02, 4.80717671015896e-02, 4.73001642817508e-02, 4.66644781772914e-02,\n                                                4.61476211335849e-02, 4.57336448945824e-02, 4.54077244682338e-02, 4.51561589928531e-02, 4.49663874209136e-02,\n                                                4.48270145125065e-02, 4.47278408839509e-02, 4.46598897850805e-02, 4.46154229420443e-02, 4.45879382060781e-02,\n                                                4.45721428326920e-02, 4.45638978545020e-02, 4.45601310280352e-02, 4.45587180216194e-02, 4.45583336552886e-02,\n                                                4.45582769238371e-02, 4.45582710717787e-02, 4.45581468459153e-02, 4.45573052051174e-02, 4.45542113589710e-02,\n                                                4.45459651803759e-02, 4.45279230817022e-02, 4.44933873952635e-02, 4.44333829998698e-02, 4.43365433249880e-02,\n                                                4.41891301366439e-02, 4.39752126641508e-02, 4.36770303754344e-02, 4.32755586478919e-02, 4.27512864274036e-02,\n                                                4.20851989060225e-02, 4.12599363126134e-02, 4.02610733676880e-02, 3.90784355525255e-02, 3.77073423244241e-02,\n                                                3.61496491292286e-02, 3.44144551731205e-02, 3.25183571348617e-02, 3.04851626599714e-02, 2.83450302378014e-02,\n                                                2.61330682053824e-02, 2.38874954480366e-02, 2.16475277470778e-02, 1.94511947100580e-02, 1.73333039434169e-02,\n                                                1.53237482282691e-02, 1.34463012405632e-02, 1.17179773346976e-02, 1.01489548068940e-02, 8.74299449969840e-03,\n                                                7.49823824342855e-03, 6.40824976052556e-03, 5.46316216635034e-03, 4.65081374419185e-03, 3.95777932219232e-03,\n                                                3.37023370506984e-03, 2.87461487187102e-03, 2.45808631319733e-03, 2.10882468667251e-03, 1.81617387094946e-03,\n                                                1.57070625114386e-03, 1.36422101857647e-03, 1.18969695506621e-03, 1.04121124836354e-03, 9.13836534124357e-04,\n                                                8.03529781606471e-04, 7.07023968544718e-04, 6.21727307347442e-04, 5.45629160214389e-04, 4.77209734597750e-04,\n                                                4.15352079102149e-04, 3.59257581550310e-04, 3.08367912921881e-04, 2.62296363189307e-04, 2.20770331139875e-04,\n                                                1.83585324748492e-04, 1.50569804986844e-04, 1.21559663170956e-04, 9.63809095395618e-05, 7.48391010318983e-05,\n                                                5.67140750575845e-05, 4.17586630305777e-05, 2.97002328579765e-05, 2.02441361381034e-05, 1.30783836027604e-05,\n                                                7.87910772714895e-06, 4.31657970523247e-06, 2.06172528294246e-06, 7.93266409004900e-07, 0.00000000000000e+00,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {9.70000000000000e+01, 9.69999995148724e+01, 9.69999845137651e+01, 9.69998828787517e+01, 9.69995092531357e+01,\n                                                9.69985132694394e+01, 9.69963334061223e+01, 9.69921580286205e+01, 9.69848948956748e+01, 9.69731500900272e+01,\n                                                9.69552169996927e+01, 9.69290756887051e+01, 9.68924028291836e+01, 9.68425923998329e+01, 9.67767876468637e+01,\n                                                9.66919253422377e+01, 9.65847940334629e+01, 9.64521084767232e+01, 9.62906023555815e+01, 9.60971402347739e+01,\n                                                9.58688471406692e+01, 9.56032502306573e+01, 9.52984223275089e+01, 9.49531128815101e+01, 9.45668497824458e+01,\n                                                9.41399968117609e+01, 9.36737570105481e+01, 9.31701211135443e+01, 9.26317703517330e+01, 9.20619514132770e+01,\n                                                9.14643454059701e+01, 9.08429507550067e+01, 9.02019924710302e+01, 8.95458593986095e+01, 8.88790604118600e+01,\n                                                8.82061837971810e+01, 8.75318440553773e+01, 8.68606076848966e+01, 8.61969015153733e+01, 8.55449180390989e+01,\n                                                8.49085357029591e+01, 8.42912661538709e+01, 8.36962292194602e+01, 8.31261472813433e+01, 8.25833481407229e+01,\n                                                8.20697685964075e+01, 8.15869559406822e+01, 8.11360683122324e+01, 8.07178763632505e+01, 8.03327685487601e+01,\n                                                7.99807614672365e+01, 7.96615157540492e+01, 7.93743573570144e+01, 7.91183036502114e+01, 7.88920936952603e+01,\n                                                7.86942219419518e+01, 7.85229746941906e+01, 7.83764687030637e+01, 7.82526912620370e+01, 7.81495411631149e+01,\n                                                7.80648698314599e+01, 7.79965218994448e+01, 7.79423744219044e+01, 7.79003738853364e+01, 7.78685701368433e+01,\n                                                7.78451463635822e+01, 7.78284442974788e+01, 7.78169839067272e+01, 7.78094769651834e+01, 7.78048340595158e+01,\n                                                7.78021647947800e+01, 7.78007711820687e+01, 7.78001344252656e+01, 7.77998955552157e+01, 7.77998305767147e+01,\n                                                7.77998209860221e+01, 7.77998196731917e+01, 7.77997886685799e+01, 7.77995786081173e+01, 7.77988064087848e+01,\n                                                7.77967480484281e+01, 7.77922435778102e+01, 7.77836177465591e+01, 7.77686197589244e+01, 7.77443854783038e+01,\n                                                7.77074251502006e+01, 7.76536393594056e+01, 7.75783654117254e+01, 7.74764555619100e+01, 7.73423874356282e+01,\n                                                7.71704055786886e+01, 7.69546913179059e+01, 7.66895560955345e+01, 7.63696512607530e+01, 7.59901851385910e+01,\n                                                7.55471362718558e+01, 7.50374503312940e+01, 7.44592076887676e+01, 7.38117495147879e+01, 7.30957529520916e+01,\n                                                7.23132505899645e+01, 7.14675955423725e+01, 7.05633792775642e+01, 6.96063125156311e+01, 6.86030780013238e+01,\n                                                6.75611582351920e+01, 6.64886357000380e+01, 6.53939646074443e+01, 6.42857252214543e+01, 6.31723879316985e+01,\n                                                6.20621196244147e+01, 6.09626502180900e+01, 5.98811912915325e+01, 5.88243815460661e+01, 5.77982363414738e+01,\n                                                5.68080939669384e+01, 5.58585656308579e+01, 5.49535012370627e+01, 5.40959795873511e+01, 5.32883247001888e+01,\n                                                5.25321439047972e+01, 5.18283802849397e+01, 5.11773718656714e+01, 5.05789116032059e+01, 5.00323045632093e+01,\n                                                4.95364207965441e+01, 4.90897439270967e+01, 4.86904162929438e+01, 4.83362817693323e+01, 4.80249273508376e+01,\n                                                4.77537243559714e+01, 4.75198698553154e+01, 4.73204286698892e+01, 4.71523760550322e+01, 4.70126409715812e+01,\n                                                4.68981496411868e+01, 4.68058688815399e+01, 4.67328485232064e+01, 4.66762620331267e+01, 4.66334443257051e+01,\n                                                4.66019256472917e+01, 4.65794603885104e+01, 4.65640497217411e+01, 4.65539570823371e+01, 4.65477157089682e+01,\n                                                4.65441277207421e+01, 4.65422545202339e+01, 4.65413986514823e+01, 4.65410775875121e+01, 4.65409902505113e+01,\n                                                4.65409773597596e+01, 4.65409761360720e+01, 4.65409511879893e+01, 4.65407821613706e+01, 4.65401608063138e+01,\n                                                4.65385045377635e+01, 4.65348800167094e+01, 4.65279393231892e+01, 4.65158715822401e+01, 4.64963727636416e+01,\n                                                4.64666361947335e+01, 4.64233660567086e+01, 4.63628157194859e+01, 4.62808521456351e+01, 4.61730467057331e+01,\n                                                4.60347915665183e+01, 4.58614393512509e+01, 4.56484620965590e+01, 4.53916237719467e+01, 4.50871589721612e+01,\n                                                4.47319490516734e+01, 4.43236861381638e+01, 4.38610152559595e+01, 4.33436452166089e+01, 4.27724199157718e+01,\n                                                4.21493431887799e+01, 4.14775526512615e+01, 4.07612415472512e+01, 4.00055330634806e+01, 3.92163183649986e+01,\n                                                3.84000753898003e+01, 3.75636865330397e+01, 3.67142675561096e+01, 3.58590096210403e+01, 3.50050275233114e+01,\n                                                3.41592056710094e+01, 3.33280397700741e+01, 3.25174819717957e+01, 3.17328044747737e+01, 3.09784977422491e+01,\n                                                3.02582147288240e+01, 2.95747644210110e+01, 2.89301497862159e+01, 2.83256392835128e+01, 2.77618584446404e+01,\n                                                2.72388884857775e+01, 2.67563615113604e+01, 2.63135454471774e+01, 2.59094153832490e+01, 2.55427108688930e+01,\n                                                2.52119806150433e+01, 2.49156170497314e+01, 2.46518834397959e+01, 2.44189360901124e+01, 2.42148436931320e+01,\n                                                2.40376053962415e+01, 2.38851686823413e+01, 2.37554477618986e+01, 2.36463428562257e+01, 2.35557604966663e+01,\n                                                2.34816347532188e+01, 2.34219491234576e+01, 2.33747586505278e+01, 2.33382116971844e+01, 2.33105706868131e+01,\n                                                2.32902310408406e+01, 2.32757375042759e+01, 2.32657970648911e+01, 2.32592877407132e+01, 2.32552626341955e+01,\n                                                2.32529488235608e+01, 2.32517408714061e+01, 2.32511889630479e+01, 2.32509819255885e+01, 2.32509256066080e+01,\n                                                2.32509172940527e+01, 2.32509165542947e+01, 2.32509019920717e+01, 2.32508033311034e+01, 2.32504406464683e+01,\n                                                2.32494738894364e+01, 2.32473583025387e+01, 2.32433072262299e+01, 2.32362640148302e+01, 2.32248847240234e+01,\n                                                2.32075331528072e+01, 2.31822896851289e+01, 2.31469751363780e+01, 2.30991904200363e+01, 2.30363722689814e+01,\n                                                2.29558644516949e+01, 2.28550029258232e+01, 2.27312122247065e+01, 2.25821091824585e+01, 2.24056090225788e+01,\n                                                2.22000280426648e+01, 2.19641767892292e+01, 2.16974378306040e+01, 2.13998229803856e+01, 2.10720059306277e+01,\n                                                2.07153274502526e+01, 2.03317713534644e+01, 1.99239103712111e+01, 1.94948223476127e+01, 1.90479796836974e+01,\n                                                1.85871192626914e+01, 1.81161055204021e+01, 1.76388032762780e+01, 1.71589759874575e+01, 1.66802177595503e+01,\n                                                1.62059164384263e+01, 1.57392360884117e+01, 1.52831046456579e+01, 1.48401966957503e+01, 1.44129086146077e+01,\n                                                1.40033295799782e+01, 1.36132149349737e+01, 1.32439680657008e+01, 1.28966346325157e+01, 1.25719101322562e+01,\n                                                1.22701593830530e+01, 1.19914450576506e+01, 1.17355618556410e+01, 1.15020730790421e+01, 1.12903469728995e+01,\n                                                1.10995909594780e+01, 1.09288826510206e+01, 1.07771971684378e+01, 1.06434307792959e+01, 1.05264211961726e+01,\n                                                1.04249650656176e+01, 1.03378332563208e+01, 1.02637845501873e+01, 1.02015782753876e+01, 1.01499863150008e+01,\n                                                1.01078047935710e+01, 1.00738655991336e+01, 1.00470477509080e+01, 1.00262884830273e+01, 1.00105937919335e+01,\n                                                9.99904809819947e+00, 9.99082260992405e+00, 9.98518194971749e+00, 9.98148862296894e+00, 9.97920496049778e+00,\n                                                9.97789225923097e+00, 9.97720696246829e+00, 9.97689385649915e+00, 9.97677640154659e+00, 9.97674445113152e+00,\n                                                9.97673973532372e+00, 9.97673931842210e+00, 9.97673114281072e+00, 9.97667575200759e+00, 9.97647213205681e+00,\n                                                9.97592937523805e+00, 9.97474166269330e+00, 9.97246742457300e+00, 9.96851367394822e+00, 9.96212649823487e+00,\n                                                9.95238866796595e+00, 9.93822526535374e+00, 9.91841811614806e+00, 9.89162959760945e+00, 9.85643606590349e+00,\n                                                9.81137068031377e+00, 9.75497479815054e+00, 9.68585639455617e+00, 9.60275317418633e+00, 9.50459726388587e+00,\n                                                9.39057770850856e+00, 9.26019655242467e+00, 9.11331419229361e+00, 8.95018002448982e+00, 8.77144522703335e+00,\n                                                8.57815578322069e+00, 8.37172545893722e+00, 8.15389019268223e+00, 7.92664699806596e+00, 7.69218176281815e+00,\n                                                7.45279106791017e+00, 7.21080327161130e+00, 6.96850366513694e+00, 6.72806767100167e+00, 6.49150502017923e+00,\n                                                6.26061677106703e+00, 6.03696600717353e+00, 5.82186209299549e+00, 5.61635748713155e+00, 5.42125535050374e+00,\n                                                5.23712562821557e+00, 5.06432701080873e+00, 4.90303222910283e+00, 4.75325446372584e+00, 4.61487315072578e+00,\n                                                4.48765801364017e+00, 4.37129064874959e+00, 4.26538337821724e+00, 4.16949535396947e+00, 4.08314606097483e+00,\n                                                4.00582646070004e+00, 3.93700806115601e+00, 3.87615021891051e+00, 3.82270598245263e+00, 3.77612678081567e+00,\n                                                3.73586624810862e+00, 3.70138345357142e+00, 3.67214577756377e+00, 3.64763163646020e+00, 3.62733321432927e+00,\n                                                3.61075930783424e+00, 3.59743833508340e+00, 3.58692150194467e+00, 3.57878606397523e+00, 3.57263857231275e+00,\n                                                3.56811795139184e+00, 3.56489822859550e+00, 3.56269072355423e+00, 3.56124550919958e+00, 3.56035197782620e+00,\n                                                3.55983838169026e+00, 3.55957026597211e+00, 3.55944776802195e+00, 3.55940181583672e+00, 3.55938931582493e+00,\n                                                3.55938747085287e+00, 3.55938730522632e+00, 3.55938402869941e+00, 3.55936182983712e+00, 3.55928022581435e+00,\n                                                3.55906270976854e+00, 3.55858673357467e+00, 3.55767538279336e+00, 3.55609116356710e+00, 3.55353232769092e+00,\n                                                3.54963216414865e+00, 3.54396167119728e+00, 3.53603597745790e+00, 3.52532478707293e+00, 3.51126696823880e+00,\n                                                3.49328917729831e+00, 3.47082811279755e+00, 3.44335563970353e+00, 3.41040564335282e+00, 3.37160111097876e+00,\n                                                3.32667965221648e+00, 3.27551551794514e+00, 3.21813620967134e+00, 3.15473201895870e+00, 3.08565729699038e+00,\n                                                3.01142289205666e+00, 2.93267993973986e+00, 2.85019595768865e+00, 2.76482488855019e+00, 2.67747326425602e+00,\n                                                2.58906496745112e+00, 2.50050710636746e+00, 2.41265929679939e+00, 2.32630819220310e+00, 2.24214848408653e+00,\n                                                2.16077089579582e+00, 2.08265700854581e+00, 2.00818017670650e+00, 1.93761137450127e+00, 1.87112859937486e+00,\n                                                1.80882843342678e+00, 1.75073849867972e+00, 1.69682978171502e+00, 1.64702809102937e+00, 1.60122419606056e+00,\n                                                1.55928244413920e+00, 1.52104784109115e+00, 1.48635170814798e+00, 1.45501609836248e+00, 1.42685718214409e+00,\n                                                1.40168780800033e+00, 1.37931942412008e+00, 1.35956351920859e+00, 1.34223271369099e+00, 1.32714160854192e+00,\n                                                1.31410747960879e+00, 1.30295088978238e+00, 1.29349627834016e+00, 1.28557257468913e+00, 1.27901387128394e+00,\n                                                1.27366017692087e+00, 1.26935825674531e+00, 1.26596254955730e+00, 1.26333613722788e+00, 1.26135172642843e+00,\n                                                1.25989259073062e+00, 1.25885341270312e+00, 1.25814096190409e+00, 1.25767454623606e+00, 1.25738618107373e+00,\n                                                1.25722043242592e+00, 1.25713390617456e+00, 1.25709437378011e+00, 1.25707954416428e+00, 1.25707551018226e+00,\n                                                1.25707491477617e+00, 1.25707485989035e+00, 1.25707375811935e+00, 1.25706629349204e+00, 1.25703885323242e+00,\n                                                1.25696571141532e+00, 1.25680566182267e+00, 1.25649922235489e+00, 1.25596655505204e+00, 1.25510624956438e+00,\n                                                1.25379512023098e+00, 1.25188916334278e+00, 1.24922580602927e+00, 1.24562754542572e+00, 1.24090702100565e+00,\n                                                1.23487348109164e+00, 1.22734049740862e+00, 1.21813465533992e+00, 1.20710481469692e+00, 1.19413141438352e+00,\n                                                1.17913520576380e+00, 1.16208476451229e+00, 1.14300216386226e+00, 1.12196629683116e+00, 1.09911350015119e+00,\n                                                1.07463533351905e+00, 1.04877357143323e+00, 1.02181263966705e+00, 9.94069854987615e-01, 9.65883906249246e-01,\n                                                9.37602070246953e-01, 9.09566722032409e-01, 8.82101805892788e-01, 8.55500079869159e-01, 8.30012088376208e-01,\n                                                8.05837868252524e-01, 7.83122259731783e-01, 7.61954327351873e-01, 7.42370839981859e-01, 7.24363151577933e-01,\n                                                7.07886344217258e-01, 6.92869280744702e-01, 6.79224302033205e-01, 6.66855622834348e-01, 6.55665900938587e-01,\n                                                6.45560851214768e-01, 6.36452069599699e-01, 6.28258398155793e-01, 6.20906217367349e-01, 6.14329030812357e-01,\n                                                6.08466645955886e-01, 6.03264180459774e-01, 5.98671052976030e-01, 5.94640058948741e-01, 5.91126587631578e-01,\n                                                5.88088005220825e-01, 5.85483208229945e-01, 5.83272338280864e-01, 5.81416641956594e-01, 5.79878455364408e-01,\n                                                5.78621291221140e-01, 5.77610005666159e-01, 5.76811022062415e-01, 5.76192589448780e-01, 5.75725053949213e-01,\n                                                5.75381122338840e-01, 5.75136098207409e-01, 5.74968072867151e-01, 5.74858055429999e-01, 5.74790029380409e-01,\n                                                5.74750926473115e-01, 5.74730512772362e-01, 5.74721185935559e-01, 5.74717687173944e-01, 5.74716735431323e-01,\n                                                5.74716594956300e-01, 5.74716581569191e-01, 5.74716308087957e-01, 5.74714455219052e-01, 5.74707643975643e-01,\n                                                5.74689488459157e-01, 5.74649759398824e-01, 5.74573688211629e-01, 5.74441445764037e-01, 5.74227829973296e-01,\n                                                5.73902195743443e-01, 5.73428658366126e-01, 5.72766595967195e-01, 5.71871466236317e-01, 5.70695936185459e-01,\n                                                5.69191300486423e-01, 5.67309134932117e-01, 5.65003099667052e-01, 5.62230777159130e-01, 5.58955409294768e-01,\n                                                5.55147393667554e-01, 5.50785416475094e-01, 5.45857139530838e-01, 5.40359416793450e-01, 5.34298080505920e-01,\n                                                5.27687393809273e-01, 5.20549301508922e-01, 5.12912615057601e-01, 5.04812242149455e-01, 4.96288524801528e-01,\n                                                4.87386696993298e-01, 4.78156428373183e-01, 4.68651393934493e-01, 4.58928803582225e-01, 4.49048836632201e-01,\n                                                4.39073947647103e-01, 4.29068034558867e-01, 4.19095482569233e-01, 4.09220115094243e-01, 3.99504095142930e-01,\n                                                3.90006827099512e-01, 3.80783910315373e-01, 3.71886192677550e-01, 3.63358965007507e-01, 3.55241326647942e-01,\n                                                3.47565740150458e-01, 3.40357780048848e-01, 3.33636068749826e-01, 3.27412382809612e-01, 3.21691906062455e-01,\n                                                3.16473602485161e-01, 3.11750681106460e-01, 3.07511127127327e-01, 3.03738276940280e-01, 3.00411419105743e-01,\n                                                2.97506407819412e-01, 2.94996279392350e-01, 2.92851865362550e-01, 2.91042397848244e-01, 2.89536103609791e-01,\n                                                2.88300783116014e-01, 2.87304369945332e-01, 2.86515464381381e-01, 2.85903833416995e-01, 2.85440867883310e-01,\n                                                2.85099986352066e-01, 2.84856975045130e-01, 2.84690253361049e-01, 2.84581055848093e-01, 2.84513523474018e-01,\n                                                2.84474699748642e-01, 2.84454430463725e-01, 2.84445169305400e-01, 2.84441695132529e-01, 2.84440750073955e-01,\n                                                2.84440610585321e-01, 2.84440596779049e-01, 2.84440309350799e-01, 2.84438361984812e-01, 2.84431203301054e-01,\n                                                2.84412121183109e-01, 2.84370361980820e-01, 2.84290394038763e-01, 2.84151347670232e-01, 2.83926661629408e-01,\n                                                2.83583963632680e-01, 2.83085209192549e-01, 2.82387098513809e-01, 2.81441785018046e-01, 2.80197880834166e-01,\n                                                2.78601754105196e-01, 2.76599100228026e-01, 2.74136754433869e-01, 2.71164696982140e-01, 2.67638185463142e-01,\n                                                2.63519932272004e-01, 2.58782230349709e-01, 2.53408918036286e-01, 2.47397065728990e-01, 2.40758264569834e-01,\n                                                2.33519402414771e-01, 2.25722826819876e-01, 2.17425820485360e-01, 2.08699352478291e-01, 1.99626117889991e-01,\n                                                1.90297936196458e-01, 1.80812638508016e-01, 1.71270627839235e-01, 1.61771335390085e-01, 1.52409811783855e-01,\n                                                1.43273680926214e-01, 1.34440646222117e-01, 1.25976679959081e-01, 1.17934956162074e-01, 1.10355516102331e-01,\n                                                1.03265593918820e-01, 9.66804846144811e-02, 9.06048113133266e-02, 8.50340426461003e-02, 7.99561211717617e-02,\n                                                7.53530849557364e-02, 7.12025916064505e-02, 6.74792826290656e-02, 6.41559524571704e-02, 6.12045088482205e-02,\n                                                5.85967285376370e-02, 5.63048241074284e-02, 5.43018454884816e-02, 5.25619432288096e-02, 5.10605215438744e-02,\n                                                4.97743080699848e-02, 4.86813648692106e-02, 4.77610621155975e-02, 4.69940323916660e-02, 4.63621198799729e-02,\n                                                4.58483350907244e-02, 4.54368222193580e-02, 4.51128428520207e-02, 4.48627766158154e-02, 4.46741365985730e-02,\n                                                4.45355950531194e-02, 4.44370131639289e-02, 4.43694675888082e-02, 4.43252661535780e-02, 4.42979454788315e-02,\n                                                4.42822443956032e-02, 4.42740486370639e-02, 4.42703042975694e-02, 4.42688997264611e-02, 4.42685176547286e-02,\n                                                4.42684612619360e-02, 4.42684554448078e-02, 4.42683319605521e-02, 4.42674953441440e-02, 4.42644199676465e-02,\n                                                4.42562230177401e-02, 4.42382886315471e-02, 4.42039591381018e-02, 4.41443130350763e-02, 4.40480517070796e-02,\n                                                4.39015191561367e-02, 4.36888801620086e-02, 4.33924810477038e-02, 4.29934121901567e-02, 4.24722813140335e-02,\n                                                4.18101906267765e-02, 4.09898890293903e-02, 3.99970442330755e-02, 3.88215513619485e-02, 3.74587687487775e-02,\n                                                3.59105534635802e-02, 3.41859642769720e-02, 3.23015129432775e-02, 3.02808782064119e-02, 2.81540494390384e-02,\n                                                2.59559326326411e-02, 2.37245208962520e-02, 2.14987926338779e-02, 1.93165412644447e-02, 1.72123519167684e-02,\n                                                1.52159196531585e-02, 1.33508537572169e-02, 1.16340429605515e-02, 1.00755808275608e-02, 8.67918339757523e-03,\n                                                7.44298413452782e-03, 6.36056951601915e-03, 5.42212011353627e-03, 4.61553952038685e-03, 3.92747910473190e-03,\n                                                3.34419563486676e-03, 2.85220991433732e-03, 2.43876591777337e-03, 2.09211640753892e-03, 1.80167571777190e-03,\n                                                1.55808013262515e-03, 1.35318545154917e-03, 1.18001937508438e-03, 1.03270051589277e-03, 9.06336155466647e-04,\n                                                7.96911981282733e-04, 7.01184466407767e-04, 6.16580646507714e-04, 5.41104537560955e-04, 4.73247368844909e-04,\n                                                4.11900188439063e-04, 3.56270023004868e-04, 3.05802462065685e-04, 2.60113538956830e-04, 2.18932644671099e-04,\n                                                1.82056845176248e-04, 1.49315959816931e-04, 1.20547211182043e-04, 9.55780346174606e-05, 7.42155844051240e-05,\n                                                5.62415097391522e-05, 4.14106804100811e-05, 2.94527187207905e-05, 2.00754189734198e-05, 1.29693835333455e-05,\n                                                7.81343923961231e-06, 4.28060279489273e-06, 2.04454160268597e-06, 7.86654851481217e-07, 1.42108547152020e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {9.80000000000000e+01, 9.79999995076934e+01, 9.79999842845949e+01, 9.79998811455530e+01, 9.79995019908868e+01,\n                                                9.79984912681388e+01, 9.79962791455559e+01, 9.79920419754313e+01, 9.79846713464179e+01, 9.79727526970291e+01,\n                                                9.79545541249652e+01, 9.79280257366398e+01, 9.78908097149425e+01, 9.78402613228711e+01, 9.77734813644505e+01,\n                                                9.76873611813193e+01, 9.75786419403344e+01, 9.74439904719777e+01, 9.72800938118967e+01, 9.70837733893485e+01,\n                                                9.68521171498657e+01, 9.65826238412214e+01, 9.62733488802657e+01, 9.59230369350631e+01, 9.55312242545900e+01,\n                                                9.50982953226516e+01, 9.46254841928014e+01, 9.41148200734682e+01, 9.35690271506236e+01, 9.29913972019457e+01,\n                                                9.23856574390965e+01, 9.17558537043549e+01, 9.11062611254583e+01, 9.04413230304117e+01, 8.97656080380553e+01,\n                                                8.90837686665138e+01, 8.84004854065653e+01, 8.77203884649755e+01, 8.70479621995048e+01, 8.63874482542843e+01,\n                                                8.57427660763548e+01, 8.51174622196004e+01, 8.45146877969138e+01, 8.39371944679705e+01, 8.33873375982382e+01,\n                                                8.28670791047720e+01, 8.23779877996983e+01, 8.19212386866288e+01, 8.14976139368460e+01, 8.11075079063197e+01,\n                                                8.07509375538661e+01, 8.04275586541830e+01, 8.01366875358912e+01, 7.98773277282624e+01, 7.96482007809545e+01,\n                                                7.94477805251319e+01, 7.92743300921735e+01, 7.91259410493443e+01, 7.90005740277512e+01, 7.88961002016631e+01,\n                                                7.88103429353375e+01, 7.87411188547593e+01, 7.86862775402311e+01, 7.86437389847802e+01, 7.86115279349511e+01,\n                                                7.85878042347294e+01, 7.85708883372415e+01, 7.85592812362786e+01, 7.85516782006256e+01, 7.85469758648980e+01,\n                                                7.85442724339001e+01, 7.85428609833560e+01, 7.85422160763077e+01, 7.85419741488208e+01, 7.85419083386229e+01,\n                                                7.85418986251736e+01, 7.85418972955395e+01, 7.85418658940822e+01, 7.85416531449394e+01, 7.85408710618321e+01,\n                                                7.85387863557130e+01, 7.85342242318576e+01, 7.85254880023922e+01, 7.85102980771183e+01, 7.84857536971279e+01,\n                                                7.84483205243945e+01, 7.83938468431404e+01, 7.83176105970822e+01, 7.82143987076736e+01, 7.80786190288020e+01,\n                                                7.79044438559984e+01, 7.76859821287798e+01, 7.74174754036829e+01, 7.70935104525851e+01, 7.67092391333268e+01,\n                                                7.62605942223345e+01, 7.57444884969327e+01, 7.51589839051661e+01, 7.45034186426137e+01, 7.37784828084403e+01,\n                                                7.29862381295964e+01, 7.21300833305201e+01, 7.12146723286731e+01, 7.02457950944520e+01, 6.92302289442629e+01,\n                                                6.81755622118413e+01, 6.70899876319096e+01, 6.59820662149911e+01, 6.48604761419560e+01, 6.37337767831652e+01,\n                                                6.26102199570851e+01, 6.14976221772414e+01, 6.04032851784088e+01, 5.93339379052005e+01, 5.82956793123275e+01,\n                                                5.72939181729022e+01, 5.63333194041656e+01, 5.54177695900362e+01, 5.45503694977787e+01, 5.37334538877911e+01,\n                                                5.29686330448501e+01, 5.22568478598582e+01, 5.15984306151922e+01, 5.09931656563592e+01, 5.04403466368023e+01,\n                                                4.99388291724966e+01, 4.94870791813514e+01, 4.90832179067998e+01, 4.87250648164847e+01, 4.84101794478030e+01,\n                                                4.81359030217686e+01, 4.78994003740599e+01, 4.76977025033502e+01, 4.75277498180276e+01, 4.73864359617551e+01,\n                                                4.72706519032389e+01, 4.71773297803085e+01, 4.71034857965279e+01, 4.70462612915163e+01, 4.70029609602225e+01,\n                                                4.69710870990934e+01, 4.69483687239435e+01, 4.69327844462839e+01, 4.69225781163936e+01, 4.69162664396389e+01,\n                                                4.69126380373024e+01, 4.69107437379603e+01, 4.69098782291997e+01, 4.69095535489653e+01, 4.69094652282564e+01,\n                                                4.69094521923115e+01, 4.69094509548411e+01, 4.69094257257593e+01, 4.69092547953346e+01, 4.69086264417567e+01,\n                                                4.69069515182636e+01, 4.69032861740895e+01, 4.68962673100128e+01, 4.68840636630096e+01, 4.68643452733297e+01,\n                                                4.68342739045866e+01, 4.67905167165652e+01, 4.67292850717559e+01, 4.66463997265228e+01, 4.65373827617088e+01,\n                                                4.63975754154816e+01, 4.62222795049673e+01, 4.60069184298652e+01, 4.57472119695911e+01, 4.54393573978729e+01,\n                                                4.50802080538212e+01, 4.46674396162043e+01, 4.41996940488720e+01, 4.36766915474015e+01, 4.30993017978890e+01,\n                                                4.24695675215618e+01, 4.17906759323440e+01, 4.10668779021784e+01, 4.03033605455479e+01, 3.95060856114254e+01,\n                                                3.86816107616153e+01, 3.78369101752196e+01, 3.69792039127270e+01, 3.61157955152972e+01, 3.52539106628547e+01,\n                                                3.44005307470011e+01, 3.35622230255577e+01, 3.27449784643228e+01, 3.19540739954991e+01, 3.11939751794046e+01,\n                                                3.04682890375716e+01, 2.97797680652153e+01, 2.91303582874183e+01, 2.85212788467326e+01, 2.79531187422745e+01,\n                                                2.74259375415370e+01, 2.69393600536087e+01, 2.64926588511709e+01, 2.60848221625304e+01, 2.57146074322861e+01,\n                                                2.53805825757200e+01, 2.50811577236786e+01, 2.48146103208007e+01, 2.45791060844512e+01, 2.43727177961526e+01,\n                                                2.41934433464782e+01, 2.40392239753123e+01, 2.39079632690279e+01, 2.37975471851540e+01, 2.37058651490951e+01,\n                                                2.36308320815862e+01, 2.35704110522502e+01, 2.35226361059374e+01, 2.34856346752242e+01, 2.34576488814447e+01,\n                                                2.34370549480089e+01, 2.34223799139119e+01, 2.34123148505314e+01, 2.34057238553947e+01, 2.34016482218482e+01,\n                                                2.33993053573950e+01, 2.33980822348488e+01, 2.33975233946302e+01, 2.33973137567286e+01, 2.33972567303589e+01,\n                                                2.33972483133943e+01, 2.33972475643446e+01, 2.33972328192134e+01, 2.33971329190122e+01, 2.33967656787713e+01,\n                                                2.33957867777508e+01, 2.33936446119218e+01, 2.33895426257031e+01, 2.33824108563138e+01, 2.33708883647196e+01,\n                                                2.33533181435307e+01, 2.33277559505448e+01, 2.32919942735586e+01, 2.32436022410561e+01, 2.31799817142545e+01,\n                                                2.30984390070413e+01, 2.29962706916993e+01, 2.28708608136831e+01, 2.27197856609827e+01, 2.25409211592886e+01,\n                                                2.23325471614740e+01, 2.20934425194444e+01, 2.18229649500712e+01, 2.15211103029518e+01, 2.11885467526202e+01,\n                                                2.08266204631830e+01, 2.04373303070335e+01, 2.00232704739650e+01, 1.95875418991736e+01, 1.91336370931218e+01,\n                                                1.86653081892253e+01, 1.81864332214081e+01, 1.77008976337123e+01, 1.72125040358498e+01, 1.67249136829793e+01,\n                                                1.62416125013058e+01, 1.57658882990342e+01, 1.53008067326023e+01, 1.48491798179735e+01, 1.44135280778984e+01,\n                                                1.39960423149288e+01, 1.35985522929210e+01, 1.32225080202974e+01, 1.28689763614064e+01, 1.25386527130604e+01,\n                                                1.22318852773816e+01, 1.19487082978308e+01, 1.16888803929413e+01, 1.14519245420244e+01, 1.12371670453800e+01,\n                                                1.10437736508162e+01, 1.08707818442712e+01, 1.07171289587577e+01, 1.05816762350954e+01, 1.04632292788886e+01,\n                                                1.03605555277458e+01, 1.02723994025018e+01, 1.01974957954100e+01, 1.01345824708165e+01, 1.00824118382486e+01,\n                                                1.00397624185457e+01, 1.00054501724543e+01, 9.97833970844427e+00, 9.95735524221325e+00, 9.94149105386280e+00,\n                                                9.92982108878579e+00, 9.92150728234175e+00, 9.91580616170715e+00, 9.91207329326733e+00, 9.90976519950219e+00,\n                                                9.90843846085723e+00, 9.90774583769340e+00, 9.90742938477338e+00, 9.90731067435169e+00, 9.90727838242690e+00,\n                                                9.90727361621325e+00, 9.90727319485552e+00, 9.90726493185760e+00, 9.90720894900433e+00, 9.90700315271164e+00,\n                                                9.90645459530916e+00, 9.90525419210789e+00, 9.90295566433925e+00, 9.89895971909280e+00, 9.89250446712336e+00,\n                                                9.88266305767905e+00, 9.86834945341744e+00, 9.84833314890102e+00, 9.82126342173777e+00, 9.78570336801680e+00,\n                                                9.74017349504487e+00, 9.68320402331909e+00, 9.61339430866323e+00, 9.52947698538222e+00, 9.43038363256635e+00,\n                                                9.31530808425346e+00, 9.18376306111638e+00, 9.03562571557192e+00, 8.87116804710988e+00, 8.69106900184462e+00,\n                                                8.49640638599712e+00, 8.28862837507262e+00, 8.06950618496752e+00, 7.84107113398252e+00, 7.60554061561986e+00,\n                                                7.36523823800819e+00, 7.12251349979158e+00, 6.87966592575130e+00, 6.63887773490609e+00, 6.40215804599097e+00,\n                                                6.17130049249695e+00, 5.94785501071370e+00, 5.73311352180637e+00, 5.52810829197050e+00, 5.33362098979191e+00,\n                                                5.15019995292390e+00, 4.97818299106201e+00, 4.81772319014190e+00, 4.66881557229722e+00, 4.53132299010085e+00,\n                                                4.40500017257493e+00, 4.28951530815473e+00, 4.18446890611668e+00, 4.08940992176359e+00, 4.00384928300522e+00,\n                                                3.92727104433324e+00, 3.85914144234945e+00, 3.79891615125759e+00, 3.74604604621379e+00, 3.69998178123188e+00,\n                                                3.66017747773122e+00, 3.62609379994117e+00, 3.59720066426192e+00, 3.57297979169597e+00, 3.55292726655375e+00,\n                                                3.53655621234579e+00, 3.52339963930949e+00, 3.51301346018175e+00, 3.50497961495880e+00, 3.49890919515104e+00,\n                                                3.49444541716039e+00, 3.49126626625493e+00, 3.48908661980067e+00, 3.48765966236027e+00, 3.48677742595778e+00,\n                                                3.48627032461937e+00, 3.48600560015099e+00, 3.48588465177764e+00, 3.48583928090622e+00, 3.48582693902719e+00,\n                                                3.48582511739528e+00, 3.48582495386398e+00, 3.48582171878736e+00, 3.48579980075773e+00, 3.48571922911808e+00,\n                                                3.48550446512309e+00, 3.48503451221455e+00, 3.48413469861975e+00, 3.48257054851831e+00, 3.48004416539403e+00,\n                                                3.47619355425964e+00, 3.47059529622629e+00, 3.46277094411967e+00, 3.45219741501269e+00, 3.43832149992879e+00,\n                                                3.42057838343500e+00, 3.39841376706707e+00, 3.37130883481120e+00, 3.33880691645659e+00, 3.30054034126775e+00,\n                                                3.25625568709106e+00, 3.20583547859269e+00, 3.14931442412103e+00, 3.08688853395743e+00, 3.01891593258885e+00,\n                                                2.94590882750433e+00, 2.86851685750112e+00, 2.78750282268365e+00, 2.70371249695064e+00, 2.61804075138848e+00,\n                                                2.53139650610346e+00, 2.44466904369169e+00, 2.35869796215266e+00, 2.27424855814087e+00, 2.19199378440135e+00,\n                                                2.11250321057064e+00, 2.03623873264505e+00, 1.96355621025427e+00, 1.89471182272383e+00, 1.82987174944050e+00,\n                                                1.76912378593603e+00, 1.71248966469639e+00, 1.65993710359125e+00, 1.61139089746658e+00, 1.56674265111630e+00,\n                                                1.52585899096255e+00, 1.48858827139968e+00, 1.45476590744217e+00, 1.42421852577888e+00, 1.39676714474643e+00,\n                                                1.37222958455936e+00, 1.35042228529196e+00, 1.33116168137286e+00, 1.31426525396640e+00, 1.29955235960610e+00,\n                                                1.28684491543596e+00, 1.27596800748853e+00, 1.26675047697678e+00, 1.25902552890484e+00, 1.25263139607075e+00,\n                                                1.24741207895586e+00, 1.24321816792043e+00, 1.23990773898470e+00, 1.23734729916106e+00, 1.23541274302383e+00,\n                                                1.23399027027190e+00, 1.23297720570832e+00, 1.23228265932019e+00, 1.23182796558359e+00, 1.23154684782286e+00,\n                                                1.23138526496807e+00, 1.23130091342060e+00, 1.23126237461713e+00, 1.23124791772365e+00, 1.23124398513039e+00,\n                                                1.23124340468902e+00, 1.23124335118273e+00, 1.23124227710325e+00, 1.23123500008953e+00, 1.23120824950566e+00,\n                                                1.23113694602206e+00, 1.23098091912682e+00, 1.23068218188000e+00, 1.23016290340811e+00, 1.22932422336494e+00,\n                                                1.22804605489802e+00, 1.22618801923737e+00, 1.22359164035674e+00, 1.22008389633429e+00, 1.21548216985252e+00,\n                                                1.20960056072417e+00, 1.20225741919964e+00, 1.19328383615138e+00, 1.18253269704984e+00, 1.16988778841483e+00,\n                                                1.15527235879244e+00, 1.13865650113000e+00, 1.12006275357751e+00, 1.09956941422216e+00, 1.07731122122362e+00,\n                                                1.05347723953420e+00, 1.02830598780088e+00, 1.00207800523506e+00, 9.75106182025499e-01, 9.47724262404577e-01,\n                                                9.20274001275985e-01, 8.93091547842261e-01, 8.66493767234829e-01, 8.40765384366605e-01, 8.16147985593588e-01,\n                                                7.92831946850271e-01, 7.70952176316456e-01, 7.50588129540077e-01, 7.31767942396274e-01, 7.14475894465721e-01,\n                                                6.98661952880371e-01, 6.84251984075161e-01, 6.71157371261458e-01, 6.59283144511008e-01, 6.48534175422668e-01,\n                                                6.38819384035955e-01, 6.30054181454625e-01, 6.22161514263155e-01, 6.15071910711080e-01, 6.08722892493759e-01,\n                                                6.03058045965213e-01, 5.98025968841910e-01, 5.93579237970005e-01, 5.89673486993661e-01, 5.86266640804595e-01,\n                                                5.83318324696819e-01, 5.80789447406758e-01, 5.78641945874111e-01, 5.76838673232047e-01, 5.75343408408543e-01,\n                                                5.74120964495719e-01, 5.73137372872267e-01, 5.72360120426822e-01, 5.71758417862554e-01, 5.71303477875873e-01,\n                                                5.70968783026046e-01, 5.70730324439410e-01, 5.70566794245281e-01, 5.70459716916886e-01, 5.70393507544139e-01,\n                                                5.70355448470181e-01, 5.70335579577659e-01, 5.70326501630163e-01, 5.70323096229345e-01, 5.70322169882544e-01,\n                                                5.70322033155890e-01, 5.70322020125985e-01, 5.70321753942139e-01, 5.70319950513564e-01, 5.70313321009280e-01,\n                                                5.70295649875447e-01, 5.70256980534140e-01, 5.70182937531541e-01, 5.70054218036546e-01, 5.69846285344497e-01,\n                                                5.69529296202063e-01, 5.69068291309549e-01, 5.68423672910072e-01, 5.67551983461968e-01, 5.66406983755101e-01,\n                                                5.64941006985265e-01, 5.63106538105643e-01, 5.60857937993546e-01, 5.58153204417110e-01, 5.54955642862325e-01,\n                                                5.51235316654783e-01, 5.46970162358534e-01, 5.42146693967069e-01, 5.36760273072233e-01, 5.30814981586403e-01,\n                                                5.24323185027583e-01, 5.17304905077950e-01, 5.09787122707564e-01, 5.01803108527199e-01, 4.93391834130534e-01,\n                                                4.84597470589492e-01, 4.75468941143305e-01, 4.66059472933338e-01, 4.56426089284520e-01, 4.46628995858802e-01,\n                                                4.36730834532298e-01, 4.26795801657789e-01, 4.16888647919933e-01, 4.07073592962604e-01, 3.97413198720514e-01,\n                                                3.87967251057347e-01, 3.78791700235780e-01, 3.69937707268846e-01, 3.61450835826318e-01, 3.53370418906479e-01,\n                                                3.45729117129338e-01, 3.38552672699549e-01, 3.31859851279916e-01, 3.25662554409789e-01, 3.19966078459629e-01,\n                                                3.14769492678437e-01, 3.10066108445511e-01, 3.05844013799842e-01, 3.02086650924082e-01, 2.98773418687460e-01,\n                                                2.95880286865142e-01, 2.93380412662117e-01, 2.91244753273730e-01, 2.89442670210263e-01, 2.87942521962435e-01,\n                                                2.86712241411152e-01, 2.85719893409990e-01, 2.84934206492821e-01, 2.84325071006961e-01, 2.83863994467609e-01,\n                                                2.83524503854693e-01, 2.83282484151101e-01, 2.83116442787829e-01, 2.83007690871230e-01, 2.82940434075854e-01,\n                                                2.82901768779155e-01, 2.82881582207793e-01, 2.82872358841857e-01, 2.82868898846203e-01, 2.82867957644186e-01,\n                                                2.82867818724782e-01, 2.82867804974856e-01, 2.82867518719527e-01, 2.82865579300235e-01, 2.82858449829305e-01,\n                                                2.82839445580890e-01, 2.82797856788505e-01, 2.82718215180267e-01, 2.82579736241772e-01, 2.82355967138841e-01,\n                                                2.82014667743169e-01, 2.81517948932645e-01, 2.80822687849493e-01, 2.79881233651196e-01, 2.78642409109423e-01,\n                                                2.77052802986674e-01, 2.75058335458823e-01, 2.72606064216632e-01, 2.69646182806369e-01, 2.66134146026886e-01,\n                                                2.62032840758565e-01, 2.57314705575624e-01, 2.51963690137657e-01, 2.45976937080627e-01, 2.39366066551185e-01,\n                                                2.32157948507236e-01, 2.24394862436313e-01, 2.16133969996307e-01, 2.07446064180274e-01, 1.98413608168480e-01,\n                                                1.89128134794728e-01, 1.79687137467852e-01, 1.70190637144998e-01, 1.60737648450862e-01, 1.51422783533874e-01,\n                                                1.42333220517813e-01, 1.33546225143931e-01, 1.25127355121023e-01, 1.17129406257078e-01, 1.09592088569258e-01,\n                                                1.02542359212038e-01, 9.59952942801863e-02, 8.99553565472786e-02, 8.44179104788481e-02, 7.93708460777651e-02,\n                                                7.47961943985302e-02, 7.06716447170095e-02, 6.69719018062693e-02, 6.36698481415294e-02, 6.07374980478426e-02,\n                                                5.81467478838533e-02, 5.58699383074384e-02, 5.38802520455874e-02, 5.21519742422214e-02, 5.06606433002190e-02,\n                                                4.93831190186143e-02, 4.82975924465023e-02, 4.73835587609415e-02, 4.66217709871870e-02, 4.59941887524735e-02,\n                                                4.54839326405789e-02, 4.50752511872707e-02, 4.47535042041665e-02, 4.45051630158133e-02, 4.43178254424623e-02,\n                                                4.41802410660443e-02, 4.40823405916149e-02, 4.40152620581813e-02, 4.39713663207613e-02, 4.39442346232823e-02,\n                                                4.39286421539151e-02, 4.39205030930765e-02, 4.39167846572985e-02, 4.39153898032600e-02, 4.39150103747608e-02,\n                                                4.39149543721271e-02, 4.39149485952299e-02, 4.39148259652598e-02, 4.39139951367480e-02, 4.39109410364580e-02,\n                                                4.39028007964168e-02, 4.38849904941492e-02, 4.38508985436243e-02, 4.37916652396240e-02, 4.36960703261917e-02,\n                                                4.35505527118494e-02, 4.33393875978823e-02, 4.30450450515991e-02, 4.26487490477996e-02, 4.21312459541099e-02,\n                                                4.14737755391315e-02, 4.06592158759906e-02, 3.96733472516360e-02, 3.85061521033663e-02, 3.71530422882671e-02,\n                                                3.56158869565064e-02, 3.39037095365740e-02, 3.20329355140672e-02, 3.00271060843471e-02, 2.79160250303931e-02,\n                                                2.57343716392739e-02, 2.35198814989417e-02, 2.13112576020222e-02, 1.91460145122875e-02, 1.70584696832066e-02,\n                                                1.50780750899457e-02, 1.32282324766635e-02, 1.15256662053298e-02, 9.98035250546536e-03, 8.59593729433072e-03,\n                                                7.37052810407590e-03, 6.29772420180075e-03, 5.36775062217032e-03, 4.56857933161814e-03, 3.88694628908581e-03,\n                                                3.30920210858210e-03, 2.82196492283049e-03, 2.41257513545179e-03, 2.06937796180284e-03, 1.78187416211983e-03,\n                                                1.54077906194061e-03, 1.33801923296062e-03, 1.16668441108914e-03, 1.02094647284900e-03, 8.95957557361271e-04,\n                                                7.87740456644315e-04, 6.93081800307027e-04, 6.09432676426991e-04, 5.34815867524685e-04, 4.67736863981827e-04,\n                                                4.07097227707709e-04, 3.52111497306851e-04, 3.02230488770761e-04, 2.57073834433186e-04, 2.16373467907260e-04,\n                                                1.79928407931129e-04, 1.47570195039748e-04, 1.19137796090740e-04, 9.44605803567811e-05, 7.33479198800069e-05,\n                                                5.55840055085355e-05, 4.09265739165221e-05, 2.91084132584274e-05, 1.98407389717659e-05, 1.28177740919000e-05,\n                                                7.72210228205950e-06, 4.23056387433007e-06, 2.02064155985227e-06, 7.77459078449283e-07, -1.42108547152020e-14,\n                                                -2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {9.90000000000000e+01, 9.89999995004736e+01, 9.89999840541271e+01, 9.89998794025412e+01, 9.89994946875200e+01,\n                                                9.89984691422676e+01, 9.89962245777570e+01, 9.89919252650856e+01, 9.89844465311602e+01, 9.89723530531286e+01,\n                                                9.89538874946735e+01, 9.89269698340934e+01, 9.88892075685683e+01, 9.88379170251172e+01, 9.87701563257360e+01,\n                                                9.86827711295082e+01, 9.85724549692584e+01, 9.84358265113770e+01, 9.82695259411608e+01, 9.80703314098349e+01,\n                                                9.78352937220585e+01, 9.75618832532275e+01, 9.72481381481147e+01, 9.68927985010319e+01, 9.64954091592505e+01,\n                                                9.60563755199596e+01, 9.55769627744468e+01, 9.50592386087753e+01, 9.45059700525910e+01, 9.39204938038059e+01,\n                                                9.33065830516257e+01, 9.26683310892118e+01, 9.20100634454502e+01, 9.13362784814057e+01, 9.06516052829482e+01,\n                                                8.99607612991810e+01, 8.92684934523811e+01, 8.85794956828209e+01, 8.78983095121061e+01, 8.72292252114555e+01,\n                                                8.65762028580735e+01, 8.59428239221536e+01, 8.53322712178453e+01, 8.47473263628017e+01, 8.41903730273121e+01,\n                                                8.36633988836266e+01, 8.31679947135394e+01, 8.27053526370870e+01, 8.22762664296532e+01, 8.18811363138074e+01,\n                                                8.15199794997893e+01, 8.11924467527755e+01, 8.08978446165347e+01, 8.06351626064793e+01, 8.04031045943509e+01,\n                                                8.02001236320444e+01, 8.00244595230675e+01, 7.98741784999623e+01, 7.97472143841571e+01, 7.96414105879830e+01,\n                                                7.95545622737848e+01, 7.94844579239385e+01, 7.94289195117778e+01, 7.93858404104669e+01, 7.93532201470197e+01,\n                                                7.93291951120513e+01, 7.93120643796849e+01, 7.93003098800935e+01, 7.92926102994579e+01, 7.92878482548380e+01,\n                                                7.92851104972821e+01, 7.92836811252178e+01, 7.92830280296873e+01, 7.92827830304194e+01, 7.92827163846227e+01,\n                                                7.92827065478407e+01, 7.92827052013241e+01, 7.92826734011596e+01, 7.92824579507226e+01, 7.92816659374710e+01,\n                                                7.92795547619908e+01, 7.92749347144292e+01, 7.92660875688633e+01, 7.92507048056326e+01, 7.92258488718878e+01,\n                                                7.91879406372637e+01, 7.91327758406290e+01, 7.90555727858304e+01, 7.89510527548493e+01, 7.88135535009677e+01,\n                                                7.86371747239961e+01, 7.84159526191248e+01, 7.81440584911010e+01, 7.78160141582861e+01, 7.74269146204326e+01,\n                                                7.69726464770567e+01, 7.64500891838006e+01, 7.58572858393437e+01, 7.51935712939016e+01, 7.44596483799165e+01,\n                                                7.36576080080082e+01, 7.27908949385548e+01, 7.18642263649776e+01, 7.08834725781937e+01, 6.98555064004403e+01,\n                                                6.87880222976241e+01, 6.76893226005462e+01, 6.65680737421334e+01, 6.54330506187069e+01, 6.42929016621665e+01,\n                                                6.31559655059712e+01, 6.20301484236353e+01, 6.09228455306240e+01, 5.98408781675340e+01, 5.87904294958145e+01,\n                                                5.77769780804446e+01, 5.68052411809092e+01, 5.58791406799677e+01, 5.50017983749536e+01, 5.41755594687062e+01,\n                                                5.34020374967321e+01, 5.26821718630788e+01, 5.20162899905895e+01, 5.14041684619855e+01, 5.08450901806778e+01,\n                                                5.03378967275204e+01, 4.98810364403286e+01, 4.94726093543176e+01, 4.91104102351553e+01, 4.87919707524854e+01,\n                                                4.85146015611881e+01, 4.82754347807283e+01, 4.80714671245486e+01, 4.78996037279243e+01, 4.77567025362838e+01,\n                                                4.76396189310152e+01, 4.75452500799297e+01, 4.74705783091974e+01, 4.74127126154645e+01, 4.73689272885589e+01,\n                                                4.73366965152901e+01, 4.73137237996330e+01, 4.72979650754596e+01, 4.72876445096355e+01, 4.72812621929040e+01,\n                                                4.72775931832091e+01, 4.72756776842152e+01, 4.72748024893981e+01, 4.72744741756284e+01, 4.72743848665133e+01,\n                                                4.72743716846819e+01, 4.72743704333629e+01, 4.72743449219399e+01, 4.72741720786176e+01, 4.72735366931001e+01,\n                                                4.72718430256113e+01, 4.72681366635718e+01, 4.72610392565324e+01, 4.72486990575917e+01, 4.72287600575665e+01,\n                                                4.71983523143965e+01, 4.71541058074741e+01, 4.70921897244909e+01, 4.70083784527212e+01, 4.68981446421859e+01,\n                                                4.67567785044709e+01, 4.65795310191799e+01, 4.63617770064463e+01, 4.60991922158449e+01, 4.57879368591366e+01,\n                                                4.54248365820359e+01, 4.50075509174701e+01, 4.45347189185259e+01, 4.40060719892369e+01, 4.34225049519184e+01,\n                                                4.27860982537260e+01, 4.21000872767044e+01, 4.13687794006266e+01, 4.05974256803744e+01, 3.97920602899515e+01,\n                                                3.89593243277551e+01, 3.81062883847631e+01, 3.72402805755655e+01, 3.63687177758621e+01, 3.54989334722997e+01,\n                                                3.46379988883422e+01, 3.37925427264930e+01, 3.29685835455041e+01, 3.21713926723485e+01, 3.14054029842163e+01,\n                                                3.06741714164519e+01, 2.99803938186918e+01, 2.93259628587561e+01, 2.87120549583953e+01, 2.81392311949120e+01,\n                                                2.76075390472607e+01, 2.71166055626495e+01, 2.66657166883010e+01, 2.62538811821079e+01, 2.58798801603320e+01,\n                                                2.55423048452347e+01, 2.52395856072572e+01, 2.49700152545412e+01, 2.47317690175131e+01, 2.45229230547720e+01,\n                                                2.43414727242669e+01, 2.41853513914917e+01, 2.40524501940682e+01, 2.39406389264015e+01, 2.38477880155317e+01,\n                                                2.37717914003619e+01, 2.37105899823018e+01, 2.36621951788616e+01, 2.36247119852953e+01, 2.35963608417811e+01,\n                                                2.35754975264702e+01, 2.35606302595651e+01, 2.35504332193915e+01, 2.35437557428946e+01, 2.35396266095291e+01,\n                                                2.35372529829789e+01, 2.35360137983929e+01, 2.35354476189640e+01, 2.35352352278176e+01, 2.35351774524936e+01,\n                                                2.35351689249847e+01, 2.35351681660973e+01, 2.35351532273107e+01, 2.35350520150621e+01, 2.35346799515522e+01,\n                                                2.35336881931253e+01, 2.35315178874426e+01, 2.35273620034013e+01, 2.35201364845301e+01, 2.35084624134650e+01,\n                                                2.34906607874845e+01, 2.34647613596646e+01, 2.34285267542807e+01, 2.33794926729526e+01, 2.33150244303353e+01,\n                                                2.32323892737795e+01, 2.31288429603247e+01, 2.30017279388013e+01, 2.28485793137556e+01, 2.26672336906317e+01,\n                                                2.24559351751476e+01, 2.22134323604982e+01, 2.19390601535622e+01, 2.16328007351050e+01, 2.12953186998850e+01,\n                                                2.09279663621089e+01, 2.05327563884517e+01, 2.01123007071433e+01, 1.96697176745156e+01, 1.92085141570284e+01,\n                                                1.87324547779640e+01, 1.82454346801874e+01, 1.77513715899915e+01, 1.72541262662727e+01, 1.67574499487684e+01,\n                                                1.62649485000483e+01, 1.57800500992972e+01, 1.53059671415855e+01, 1.48456502189500e+01, 1.44017385687906e+01,\n                                                1.39765146397756e+01, 1.35718701754043e+01, 1.31892886397450e+01, 1.28298454521982e+01, 1.24942245434227e+01,\n                                                1.21827477946873e+01, 1.18954130796494e+01, 1.16319366880815e+01, 1.13917965545789e+01, 1.11742736310888e+01,\n                                                1.09784896934975e+01, 1.08034407125796e+01, 1.06480255793446e+01, 1.05110704405914e+01, 1.03913491910580e+01,\n                                                1.02876008167859e+01, 1.01985443249959e+01, 1.01228919592319e+01, 1.00593613086809e+01, 1.00066867954077e+01,\n                                                9.96363087650219e+00, 9.92899514102335e+00, 9.90163132412835e+00, 9.88045211243859e+00, 9.86444148478192e+00,\n                                                9.85266422967801e+00, 9.84427421277573e+00, 9.83852093928576e+00, 9.83475397074291e+00, 9.83242481114453e+00,\n                                                9.83108596994535e+00, 9.83038703053798e+00, 9.83006769221758e+00, 9.82994789947054e+00, 9.82991531313527e+00,\n                                                9.82991050346759e+00, 9.82991007826830e+00, 9.82990173993588e+00, 9.82984524668677e+00, 9.82963757422137e+00,\n                                                9.82908401637185e+00, 9.82787267357183e+00, 9.82555320955635e+00, 9.82152090101799e+00, 9.81500699705443e+00,\n                                                9.80507638585024e+00, 9.79063351140609e+00, 9.77043736307688e+00, 9.74312614268104e+00, 9.70725186880479e+00,\n                                                9.66132468674263e+00, 9.60386601413975e+00, 9.53346889041643e+00, 9.44886306566652e+00, 9.34898154592555e+00,\n                                                9.23302461690459e+00, 9.10051692309402e+00, 8.95135310586853e+00, 8.78582789724335e+00, 8.60464746434292e+00,\n                                                8.40892016350180e+00, 8.20012656154672e+00, 7.98007040291142e+00, 7.75081388550157e+00, 7.51460190539083e+00,\n                                                7.27378066156298e+00, 7.03071611486598e+00, 6.78771733256430e+00, 6.54696887300213e+00, 6.31047525262996e+00,\n                                                6.08001933932729e+00, 5.85713532960193e+00, 5.64309585727075e+00, 5.43891181235409e+00, 5.24534270250506e+00,\n                                                5.06291494523573e+00, 4.89194537722393e+00, 4.73256747865453e+00, 4.58475824382113e+00, 4.44836416223039e+00,\n                                                4.32312529678647e+00, 4.20869688560089e+00, 4.10466822406607e+00, 4.01057880980480e+00, 3.92593187738028e+00,\n                                                3.85020553751842e+00, 3.78286178748722e+00, 3.72335368855856e+00, 3.67113102038928e+00, 3.62564472394008e+00,\n                                                3.58635043538899e+00, 3.55271139385310e+00, 3.52420097607825e+00, 3.50030507238347e+00, 3.48052447129373e+00,\n                                                3.46437736719729e+00, 3.45140204828476e+00, 3.44115976377262e+00, 3.43323771326371e+00, 3.42725205065948e+00,\n                                                3.42285075396322e+00, 3.41971618392903e+00, 3.41756714139707e+00, 3.41616023673433e+00, 3.41529040505074e+00,\n                                                3.41479043618557e+00, 3.41452943579851e+00, 3.41441018905431e+00, 3.41436545653335e+00, 3.41435328830212e+00,\n                                                3.41435149230027e+00, 3.41435133106989e+00, 3.41434814151037e+00, 3.41432653186637e+00, 3.41424709389345e+00,\n                                                3.41403535190339e+00, 3.41357201291139e+00, 3.41268486703207e+00, 3.41114275017533e+00, 3.40865198929600e+00,\n                                                3.40485575443402e+00, 3.39933672949668e+00, 3.39162346981541e+00, 3.38120072234867e+00, 3.36752382916295e+00,\n                                                3.35003710729120e+00, 3.32819579888923e+00, 3.30149082916591e+00, 3.26947522630986e+00, 3.23179069368642e+00,\n                                                3.18819253744132e+00, 3.13857100284598e+00, 3.08296711216796e+00, 3.02158135626483e+00, 2.95477407060713e+00,\n                                                2.88305698672841e+00, 2.80707622112686e+00, 2.72758775087448e+00, 2.64542712613216e+00, 2.56147569110536e+00,\n                                                2.47662585773649e+00, 2.39174796672630e+00, 2.30766098461541e+00, 2.22510876928511e+00, 2.14474296736384e+00,\n                                                2.06711288330278e+00, 1.99266198170591e+00, 1.92173013715863e+00, 1.85456038498195e+00, 1.79130877071765e+00,\n                                                1.73205592873713e+00, 1.67681919747525e+00, 1.62556434325512e+00, 1.57821625928707e+00, 1.53466828425026e+00,\n                                                1.49479001479348e+00, 1.45843365385944e+00, 1.42543904149996e+00, 1.39563756588349e+00, 1.36885516336550e+00,\n                                                1.34491460243797e+00, 1.32363721981284e+00, 1.30484424720295e+00, 1.28835784029937e+00, 1.27400189957609e+00,\n                                                1.26160275610225e+00, 1.25098978329811e+00, 1.24199598571990e+00, 1.23445860669491e+00, 1.22821978656293e+00,\n                                                1.22312729162985e+00, 1.21903532058091e+00, 1.21580538049467e+00, 1.21330720967863e+00, 1.21141971053947e+00,\n                                                1.21003184393403e+00, 1.20904342818079e+00, 1.20836578213638e+00, 1.20792215304340e+00, 1.20764787632636e+00,\n                                                1.20749022570062e+00, 1.20740792693051e+00, 1.20737032601217e+00, 1.20735622094436e+00, 1.20735238405553e+00,\n                                                1.20735181773993e+00, 1.20735176553573e+00, 1.20735071759532e+00, 1.20734361767664e+00, 1.20731751810220e+00,\n                                                1.20724794988786e+00, 1.20709572016644e+00, 1.20680425335155e+00, 1.20629761318777e+00, 1.20547934651650e+00,\n                                                1.20423229190087e+00, 1.20241949298878e+00, 1.19988634228946e+00, 1.19646405013356e+00, 1.19197448092835e+00,\n                                                1.18623632147711e+00, 1.17907244487891e+00, 1.17031821420885e+00, 1.15983034442320e+00, 1.14749582559735e+00,\n                                                1.13324032558096e+00, 1.11703545448117e+00, 1.09890430027630e+00, 1.07892473699619e+00, 1.05723015376688e+00,\n                                                1.03400743200970e+00, 1.00949218018025e+00, 9.83961394511525e-01, 9.57723837294438e-01, 9.31108518265546e-01,\n                                                9.04451755521677e-01, 8.78083412866857e-01, 8.52313078877970e-01, 8.27417149206653e-01, 8.03627927330865e-01,\n                                                7.81125864447219e-01, 7.60035822900804e-01, 7.40427750445448e-01, 7.22321488659759e-01, 7.05694793443215e-01,\n                                                6.90493215099622e-01, 6.76640384645310e-01, 6.64047468180883e-01, 6.52620965256418e-01, 6.42268488113601e-01,\n                                                6.32902545343555e-01, 6.24442606604063e-01, 6.16815842438768e-01, 6.09956946476643e-01, 6.03807397664426e-01,\n                                                5.98314443416797e-01, 5.93430004904548e-01, 5.89109636224009e-01, 5.85311614803899e-01, 5.81996201122010e-01,\n                                                5.79125079300269e-01, 5.76660973414022e-01, 5.74567424535530e-01, 5.72808708312934e-01, 5.71349870528110e-01,\n                                                5.70156857378919e-01, 5.69196717416276e-01, 5.68437852674009e-01, 5.67850297339277e-01, 5.67406003252586e-01,\n                                                5.67079112645843e-01, 5.66846199919567e-01, 5.66686466044374e-01, 5.66581871442480e-01, 5.66517196011759e-01,\n                                                5.66480018274547e-01, 5.66460609366231e-01, 5.66451741554346e-01, 5.66448414977032e-01, 5.66447510071598e-01,\n                                                5.66447376509615e-01, 5.66447363781293e-01, 5.66447103758534e-01, 5.66445342071731e-01, 5.66438866006621e-01,\n                                                5.66421603824097e-01, 5.66383829152386e-01, 5.66311498360122e-01, 5.66185752696924e-01, 5.65982616546833e-01,\n                                                5.65672922124293e-01, 5.65222488385032e-01, 5.64592576576104e-01, 5.63740635325644e-01, 5.62621333329417e-01,\n                                                5.61187857082913e-01, 5.59393425572694e-01, 5.57192945985278e-01, 5.54544708837298e-01, 5.51412003448391e-01,\n                                                5.47764531543294e-01, 5.43579512416699e-01, 5.38842408103534e-01, 5.33547246670679e-01, 5.27696576264503e-01,\n                                                5.21301129242744e-01, 5.14379302957835e-01, 5.06956565110954e-01, 4.99064868344661e-01, 4.90742119478142e-01,\n                                                4.82031706095100e-01, 4.72982048980427e-01, 4.63646130512345e-01, 4.54080947838733e-01, 4.44346851803587e-01,\n                                                4.34506752088325e-01, 4.24625190100443e-01, 4.14767299811956e-01, 4.04997691106814e-01, 3.95379299771704e-01,\n                                                3.85972253192207e-01, 3.76832801344108e-01, 3.68012359029848e-01, 3.59556697904424e-01, 3.51505316417757e-01,\n                                                3.43891003529933e-01, 3.36739599362232e-01, 3.30069944272225e-01, 3.23893998384008e-01, 3.18217107111323e-01,\n                                                3.13038384924155e-01, 3.08351189290818e-01, 3.04143658799063e-01, 3.00399293144565e-01, 2.97097557163880e-01,\n                                                2.94214495640489e-01, 2.91723349643277e-01, 2.89595168270765e-01, 2.87799411666199e-01, 2.86304542013013e-01,\n                                                2.85078599035558e-01, 2.84089755544926e-01, 2.83306847081661e-01, 2.82699868044546e-01, 2.82240425177960e-01,\n                                                2.81902138206235e-01, 2.81660976968141e-01, 2.81495524762519e-01, 2.81387158811739e-01, 2.81320140748136e-01,\n                                                2.81281612707915e-01, 2.81261497799548e-01, 2.81252307177638e-01, 2.81248859465492e-01, 2.81247921604901e-01,\n                                                2.81247783178671e-01, 2.81247769477545e-01, 2.81247484238492e-01, 2.81245551704487e-01, 2.81238447544624e-01,\n                                                2.81219510766633e-01, 2.81178069633413e-01, 2.81098710817233e-01, 2.80960723678533e-01, 2.80737749514557e-01,\n                                                2.80397663148833e-01, 2.79902710981261e-01, 2.79209925155186e-01, 2.78271827375690e-01, 2.77037427768391e-01,\n                                                2.75453513779595e-01, 2.73466211495318e-01, 2.71022787154479e-01, 2.68073640576873e-01, 2.64574425479680e-01,\n                                                2.60488215178512e-01, 2.55787617078099e-01, 2.50456726918429e-01, 2.44492805387338e-01, 2.37907557098737e-01,\n                                                2.30727896956111e-01, 2.22996103592862e-01, 2.14769285668666e-01, 2.06118125188539e-01, 1.97124911836454e-01,\n                                                1.87880940232006e-01, 1.78483401895789e-01, 1.69031957205902e-01, 1.59625210668011e-01, 1.50357327750442e-01,\n                                                1.41315019243905e-01, 1.32575080411414e-01, 1.24202612903048e-01, 1.16249987004068e-01, 1.08756531167856e-01,\n                                                1.01748874839842e-01, 9.52418262700832e-02, 8.92396424618198e-02, 8.37375430365483e-02, 7.87233302444150e-02,\n                                                7.41789987290673e-02, 7.00822457985453e-02, 6.64078213320778e-02, 6.31286826952646e-02, 6.02169420781848e-02,\n                                                5.76446106081505e-02, 5.53841554158083e-02, 5.34088931090650e-02, 5.16932466868525e-02, 5.02128937186512e-02,\n                                                4.89448324709798e-02, 4.78673902734528e-02, 4.69601953014518e-02, 4.62041294771609e-02, 4.55812765769537e-02,\n                                                4.50748760317623e-02, 4.46692894019236e-02, 4.43499831779803e-02, 4.41035284784306e-02, 4.39176154838492e-02,\n                                                4.37810781675552e-02, 4.36839231710735e-02, 4.36173556215067e-02, 4.35737943584229e-02, 4.35468694332144e-02,\n                                                4.35313958073351e-02, 4.35233187847501e-02, 4.35196286927919e-02, 4.35182444711728e-02, 4.35178679349235e-02,\n                                                4.35178123591555e-02, 4.35178066263262e-02, 4.35176849310892e-02, 4.35168604357017e-02, 4.35138296159892e-02,\n                                                4.35057514284125e-02, 4.34880769014114e-02, 4.34542448806212e-02, 4.33954632958802e-02, 4.33005976738059e-02,\n                                                4.31561908621774e-02, 4.29466390722126e-02, 4.26545481178948e-02, 4.22612887520160e-02, 4.17477600063876e-02,\n                                                4.10953536321728e-02, 4.02870911512565e-02, 3.93088789144258e-02, 3.81507986415954e-02, 3.68083253711404e-02,\n                                                3.52833468563318e-02, 3.35848537752526e-02, 3.17291832992765e-02, 2.97397318591521e-02, 2.76461049870846e-02,\n                                                2.54827372260706e-02, 2.32870836871086e-02, 2.10975449528661e-02, 1.89513269281889e-02, 1.68824482757088e-02,\n                                                1.49200870486368e-02, 1.30874084239991e-02, 1.14009465028033e-02, 9.87053848214714e-03, 8.49974341325321e-03,\n                                                7.28663154127673e-03, 6.22480901184019e-03, 5.30454446942485e-03, 4.51388164380262e-03, 3.83964763452127e-03,\n                                                3.26829553300456e-03, 2.78655069033107e-03, 2.38186058018641e-03, 2.04267392676627e-03, 1.75858900993831e-03,\n                                                1.52041084390930e-03, 1.32014650846202e-03, 1.15095633778139e-03, 1.00707287491275e-03, 8.83699547429728e-04,\n                                                7.76901889466330e-04, 6.83501567408484e-04, 6.00977756150201e-04, 5.27375106884165e-04, 4.61215570467743e-04,\n                                                4.01412681981128e-04, 3.47189441086471e-04, 2.98002544042220e-04, 2.53475729351749e-04, 2.13343911170227e-04,\n                                                1.77408459947515e-04, 1.45503008667447e-04, 1.17468626356754e-04, 9.31369798706783e-05, 7.23200516290490e-05,\n                                                5.48050143436285e-05, 4.03529696342275e-05, 2.87004297661042e-05, 1.95626439136731e-05, 1.26381125511443e-05,\n                                                7.61386370129458e-06, 4.17126494767217e-06, 1.99231861586213e-06, 7.66561626619477e-07, 4.26325641456060e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.00000000000000e+02, 9.99999994932134e+01, 9.99999838223660e+01, 9.99998776497482e+01, 9.99994873431687e+01,\n                                                9.99984468922300e+01, 9.99961697037229e+01, 9.99918078997162e+01, 9.99842204540097e+01, 9.99719511656273e+01,\n                                                9.99532171209950e+01, 9.99259080003537e+01, 9.98875964193359e+01, 9.98355595494508e+01, 9.97668125916803e+01,\n                                                9.96781552713306e+01, 9.95662332350235e+01, 9.94276167481362e+01, 9.92588989449277e+01, 9.90568145580005e+01,\n                                                9.88183771930440e+01, 9.85410288917618e+01, 9.82227906609184e+01, 9.78623982276960e+01, 9.74594052721366e+01,\n                                                9.70142383082618e+01, 9.65281937806425e+01, 9.60033778470417e+01, 9.54426002624603e+01, 9.48492424749945e+01,\n                                                9.42271235330283e+01, 9.35803842312032e+01, 9.29134008055787e+01, 9.22307272190173e+01, 9.15370537519006e+01,\n                                                9.08371634650451e+01, 9.01358701103233e+01, 8.94379313318594e+01, 8.87479454105772e+01, 8.80702507187355e+01,\n                                                8.74088476366054e+01, 8.67673526284896e+01, 8.61489806903371e+01, 8.55565441164009e+01, 8.49924556295579e+01,\n                                                8.44587292772473e+01, 8.39569782317123e+01, 8.34884119502384e+01, 8.30538358713959e+01, 8.26536560313777e+01,\n                                                8.22878897715942e+01, 8.19561826935300e+01, 8.16578313894668e+01, 8.13918111937021e+01, 8.11568081374146e+01,\n                                                8.09512543365000e+01, 8.07733661151770e+01, 8.06211842239628e+01, 8.04926155303912e+01, 8.03854755432143e+01,\n                                                8.02975310838968e+01, 8.02265423555652e+01, 8.01703035933438e+01, 8.01266814250308e+01, 8.00936500397881e+01,\n                                                8.00693222651377e+01, 8.00519756963422e+01, 8.00400731109955e+01, 8.00322765353301e+01, 8.00274545034892e+01,\n                                                8.00246822593666e+01, 8.00232348822438e+01, 8.00225735600619e+01, 8.00223254746943e+01, 8.00222579894039e+01,\n                                                8.00222480287144e+01, 8.00222466652366e+01, 8.00222144645062e+01, 8.00219963001836e+01, 8.00211943105005e+01,\n                                                8.00190565422780e+01, 8.00143783010148e+01, 8.00054197223534e+01, 7.99898432223508e+01, 7.99646742827683e+01,\n                                                7.99262887722024e+01, 7.98704296392900e+01, 7.97922552697393e+01, 7.96864209987307e+01, 7.95471941479598e+01,\n                                                7.93686014725305e+01, 7.91446060610157e+01, 7.88693085931933e+01, 7.85371655490737e+01, 7.81432146704347e+01,\n                                                7.76832959623192e+01, 7.71542551290574e+01, 7.65541160035432e+01, 7.58822097446060e+01, 7.51392517367391e+01,\n                                                7.43273621754807e+01, 7.34500323362604e+01, 7.25120435397217e+01, 7.15193474286172e+01, 7.04789131411722e+01,\n                                                6.93985413876707e+01, 6.82866432787866e+01, 6.71519892894443e+01, 6.60034500610866e+01, 6.48497635643927e+01,\n                                                6.36993574887740e+01, 6.25602311575079e+01, 6.14398761345254e+01, 6.03452079770137e+01, 5.92824943217790e+01,\n                                                5.82572826030916e+01, 5.72743409840805e+01, 5.63376253323088e+01, 5.54502776928653e+01, 5.46146535908470e+01,\n                                                5.38323702645451e+01, 5.31043664414989e+01, 5.24309656089698e+01, 5.18119374165830e+01, 5.12465546170794e+01,\n                                                5.07336450671573e+01, 5.02716395536909e+01, 4.98586166997819e+01, 4.94923462001005e+01, 4.91703313912369e+01,\n                                                4.88898518587730e+01, 4.86480065079692e+01, 4.84417573016836e+01, 4.82679736837475e+01, 4.81234775348815e+01,\n                                                4.80050883332581e+01, 4.79096680067493e+01, 4.78341647742658e+01, 4.77756550936940e+01, 4.77313826827021e+01,\n                                                4.76987934757809e+01, 4.76755653433362e+01, 4.76596314382851e+01, 4.76491961573196e+01, 4.76427429049529e+01,\n                                                4.76390331181716e+01, 4.76370963309842e+01, 4.76362114096715e+01, 4.76358794471989e+01, 4.76357891455521e+01,\n                                                4.76357758172253e+01, 4.76357745519997e+01, 4.76357487570572e+01, 4.76355739928529e+01, 4.76349315460484e+01,\n                                                4.76332190563619e+01, 4.76294715054509e+01, 4.76222952284788e+01, 4.76098179106442e+01, 4.75896573883386e+01,\n                                                4.75589118898413e+01, 4.75141740758442e+01, 4.74515708145778e+01, 4.73668299848959e+01, 4.72553746874282e+01,\n                                                4.71124440277690e+01, 4.69332381270406e+01, 4.67130832794032e+01, 4.64476113388568e+01, 4.61329456564635e+01,\n                                                4.57658844075102e+01, 4.53440711369021e+01, 4.48661419520088e+01, 4.43318390947756e+01, 4.37420817248064e+01,\n                                                4.30989868507733e+01, 4.24058368205948e+01, 4.16669948963480e+01, 4.08877767508741e+01, 4.00742914037295e+01,\n                                                3.92332672549738e+01, 3.83718754024507e+01, 3.74975545388411e+01, 3.66178341667113e+01, 3.57401508343520e+01,\n                                                3.48716571857954e+01, 3.40190326751868e+01, 3.31883124011988e+01, 3.23847525937079e+01, 3.16127470162766e+01,\n                                                3.08757999976970e+01, 3.01765522834823e+01, 2.95168483373154e+01, 2.88978297525647e+01, 2.83200392314975e+01,\n                                                2.77835222641772e+01, 2.72879178236978e+01, 2.68325337764516e+01, 2.64164063530912e+01, 2.60383454887391e+01,\n                                                2.56969690894811e+01, 2.53907295554070e+01, 2.51179355368103e+01, 2.48767712529043e+01, 2.46653150091843e+01,\n                                                2.44815579523270e+01, 2.43234236511722e+01, 2.41887887795861e+01, 2.40755049640341e+01, 2.39814217031502e+01,\n                                                2.39044101353219e+01, 2.38423873042967e+01, 2.37933404466196e+01, 2.37553507030828e+01, 2.37266155502660e+01,\n                                                2.37054691710273e+01, 2.36903999471713e+01, 2.36800642731404e+01, 2.36732959614520e+01, 2.36691106381883e+01,\n                                                2.36667047039108e+01, 2.36654486505875e+01, 2.36648747634211e+01, 2.36646594807923e+01, 2.36646009189108e+01,\n                                                2.36645922753075e+01, 2.36645915060885e+01, 2.36645763639236e+01, 2.36644737737547e+01, 2.36640966448300e+01,\n                                                2.36630913836090e+01, 2.36608915260821e+01, 2.36566790417154e+01, 2.36493550787863e+01, 2.36375218542727e+01,\n                                                2.36194773001282e+01, 2.35932239288233e+01, 2.35564931323597e+01, 2.35067857355489e+01, 2.34414290475066e+01,\n                                                2.33576498742240e+01, 2.32526619791699e+01, 2.31237653581423e+01, 2.29684535234101e+01, 2.27845239019047e+01,\n                                                2.25701855887875e+01, 2.23241581858146e+01, 2.20457553578861e+01, 2.17349470453981e+01, 2.13923949101513e+01,\n                                                2.10194565595453e+01, 2.06181555826824e+01, 2.01911169093921e+01, 1.97414709761450e+01, 1.92727355407984e+01,\n                                                1.87886892341995e+01, 1.82932532229937e+01, 1.77903941171008e+01, 1.72840526847335e+01, 1.67780929040690e+01,\n                                                1.62762596314741e+01, 1.57821335627823e+01, 1.52990779327359e+01, 1.48301786762007e+01, 1.43781849893064e+01,\n                                                1.39454588358495e+01, 1.35339403854990e+01, 1.31451330826464e+01, 1.27801085005725e+01, 1.24395283297577e+01,\n                                                1.21236792001405e+01, 1.18325155178217e+01, 1.15657058330706e+01, 1.13226791004133e+01, 1.11026682325018e+01,\n                                                1.09047493645654e+01, 1.07278761067755e+01, 1.05709087157705e+01, 1.04326385634053e+01, 1.03118085481570e+01,\n                                                1.02071302204523e+01, 1.01172984146556e+01, 1.00410041285276e+01, 9.97694628925974e+00, 9.92384291103923e+00,\n                                                9.88044199550978e+00, 9.84553236403637e+00, 9.81795444885675e+00, 9.79661091823458e+00, 9.78047687773643e+00,\n                                                9.76860928440803e+00, 9.76015514044701e+00, 9.75435800342316e+00, 9.75056236371900e+00, 9.74821549565281e+00,\n                                                9.74686648197445e+00, 9.74616223397439e+00, 9.74584047065252e+00, 9.74571976829080e+00, 9.74568693452653e+00,\n                                                9.74568208833912e+00, 9.74568165991130e+00, 9.74567325826627e+00, 9.74561633607114e+00, 9.74540708684958e+00,\n                                                9.74484932667531e+00, 9.74362879088471e+00, 9.74129173534487e+00, 9.73722887925862e+00, 9.73066572105120e+00,\n                                                9.72066024191261e+00, 9.70610895851694e+00, 9.68576216606222e+00, 9.65824899139496e+00, 9.62211252336897e+00,\n                                                9.57585478418139e+00, 9.51799065016517e+00, 9.44710904810455e+00, 9.36193889917998e+00, 9.26141644474276e+00,\n                                                9.14474988111462e+00, 9.01147678453781e+00, 8.86150974779383e+00, 8.69516607192917e+00, 8.51317829630379e+00,\n                                                8.31668376164642e+00, 8.10719314491429e+00, 7.88653976121951e+00, 7.65681313264672e+00, 7.42028162583735e+00,\n                                                7.17930968410977e+00, 6.93627526714437e+00, 6.69349262477239e+00, 6.45314461901560e+00, 6.21722764450463e+00,\n                                                5.98751093268348e+00, 5.76551077025739e+00, 5.55247900260591e+00, 5.34940421273285e+00, 5.15702325351380e+00,\n                                                4.97584043344969e+00, 4.80615162894465e+00, 4.64807086624607e+00, 4.50155737798657e+00, 4.36644167160259e+00,\n                                                4.24244964992376e+00, 4.12922423926216e+00, 4.02634428958274e+00, 3.93334072486823e+00, 3.84971006184414e+00,\n                                                3.77492550451818e+00, 3.70844587793518e+00, 3.64972269815486e+00, 3.59820569265335e+00, 3.55334708892663e+00,\n                                                3.51460498037004e+00, 3.48144605838651e+00, 3.45334796905226e+00, 3.42980151271441e+00, 3.41031285707902e+00,\n                                                3.39440588053894e+00, 3.38162470496711e+00, 3.37153641873022e+00, 3.36373393446193e+00, 3.35783887569559e+00,\n                                                3.35350434536701e+00, 3.35041740073004e+00, 3.34830104592062e+00, 3.34691555667825e+00, 3.34605897156533e+00,\n                                                3.34556661884689e+00, 3.34530959497310e+00, 3.34519216517587e+00, 3.34514811426179e+00, 3.34513613144486e+00,\n                                                3.34513436280979e+00, 3.34513420403616e+00, 3.34513106307796e+00, 3.34510978271547e+00, 3.34503155522094e+00,\n                                                3.34482303995807e+00, 3.34436676276360e+00, 3.34349314177527e+00, 3.34197454701483e+00, 3.33952180997116e+00,\n                                                3.33578360422977e+00, 3.33034910676717e+00, 3.32275430645485e+00, 3.31249223492017e+00, 3.29902724028051e+00,\n                                                3.28181319713410e+00, 3.26031524718893e+00, 3.23403430849194e+00, 3.20253320801821e+00, 3.16546292881935e+00,\n                                                3.12258717694354e+00, 3.07380332593780e+00, 3.01915784028711e+00, 2.95885454456473e+00, 2.89325459128085e+00,\n                                                2.82286764922416e+00, 2.74833461276489e+00, 2.67040292420178e+00, 2.58989630064526e+00, 2.50768116871072e+00,\n                                                2.42463236491143e+00, 2.34160062493750e+00, 2.25938407141338e+00, 2.17870536858264e+00, 2.10019552735713e+00,\n                                                2.02438461683603e+00, 1.95169897002823e+00, 1.88246394504684e+00, 1.81691096943776e+00, 1.75518746760611e+00,\n                                                1.69736832754830e+00, 1.64346775636359e+00, 1.59345064601654e+00, 1.54724286508281e+00, 1.50474016374018e+00,\n                                                1.46581559937981e+00, 1.43032554674883e+00, 1.39811445082830e+00, 1.36901852293848e+00, 1.34286858523402e+00,\n                                                1.31949225052246e+00, 1.29871559565728e+00, 1.28036445658270e+00, 1.26426544670797e+00, 1.25024677978986e+00,\n                                                1.23813896374089e+00, 1.22777542127295e+00, 1.21899308503392e+00, 1.21163300699692e+00, 1.20554101290367e+00,\n                                                1.20056842176589e+00, 1.19657283771130e+00, 1.19341900731871e+00, 1.19097972099588e+00, 1.18913672316062e+00,\n                                                1.18778158434381e+00, 1.18681648009870e+00, 1.18615481776958e+00, 1.18572165333153e+00, 1.18545384674803e+00,\n                                                1.18529991516995e+00, 1.18521955789328e+00, 1.18518284401719e+00, 1.18516907170276e+00, 1.18516532533025e+00,\n                                                1.18516477237465e+00, 1.18516472140200e+00, 1.18516369818366e+00, 1.18515676575984e+00, 1.18513128190430e+00,\n                                                1.18506335489381e+00, 1.18491471651804e+00, 1.18463012607035e+00, 1.18413543931106e+00, 1.18333648004109e+00,\n                                                1.18211885424958e+00, 1.18034884369690e+00, 1.17787550203691e+00, 1.17453404656172e+00, 1.17015058744617e+00,\n                                                1.16454816112781e+00, 1.15755393591951e+00, 1.14900734177083e+00, 1.13876875350152e+00, 1.12672824409486e+00,\n                                                1.11281384090952e+00, 1.09699868121643e+00, 1.07930648689018e+00, 1.05981486383773e+00, 1.03865606973753e+00,\n                                                1.01601506252622e+00, 9.92124814905992e-01, 9.67259033691647e-01, 9.41722547230597e-01, 9.15839729012461e-01,\n                                                8.89941437605046e-01, 8.64351102468163e-01, 8.39370782977980e-01, 8.15268242351209e-01, 7.92266225838290e-01,\n                                                7.70535100730086e-01, 7.50189716804357e-01, 7.31290781951571e-01, 7.13850341200143e-01, 6.97840303825359e-01,\n                                                6.83202578546911e-01, 6.69859344596603e-01, 6.57722264811156e-01, 6.46699898330610e-01, 6.36703038097323e-01,\n                                                6.27648068867416e-01, 6.19458668318245e-01, 6.12066265595914e-01, 6.05409665673179e-01, 5.99434186855177e-01,\n                                                5.94090577150837e-01, 5.89333895094171e-01, 5.85122473023659e-01, 5.81417029249351e-01, 5.78179959093049e-01,\n                                                5.75374810739447e-01, 5.72965937024932e-01, 5.70918305892690e-01, 5.69197448012474e-01, 5.67769518373538e-01,\n                                                5.66601448397364e-01, 5.65661165588196e-01, 5.64917858533377e-01, 5.64342266005710e-01, 5.63906969952598e-01,\n                                                5.63586673346123e-01, 5.63358445303209e-01, 5.63201917689966e-01, 5.63099419683653e-01, 5.63036039529109e-01,\n                                                5.62999605968130e-01, 5.62980585448003e-01, 5.62971895062219e-01, 5.62968635038416e-01, 5.62967748236687e-01,\n                                                5.62967617346743e-01, 5.62967604873066e-01, 5.62967350052332e-01, 5.62965623609472e-01, 5.62959277097704e-01,\n                                                5.62942360201546e-01, 5.62905340900130e-01, 5.62834455658603e-01, 5.62711220463413e-01, 5.62512132901418e-01,\n                                                5.62208594296223e-01, 5.61767078274940e-01, 5.61149566872700e-01, 5.60314266119505e-01, 5.59216598930234e-01,\n                                                5.57810453641366e-01, 5.56049642509720e-01, 5.53889498371035e-01, 5.51288513686515e-01, 5.48209909960377e-01,\n                                                5.44623022708848e-01, 5.40504401844316e-01, 5.35838559912918e-01, 5.30618346567408e-01, 5.24844977756501e-01,\n                                                5.18527790633684e-01, 5.11683819554975e-01, 5.04337289116634e-01, 4.96519098533795e-01, 4.88266335945269e-01,\n                                                4.79621823081771e-01, 4.70633660886648e-01, 4.61354731518355e-01, 4.51842112480193e-01, 4.42156370770221e-01,\n                                                4.32360723306019e-01, 4.22520069254460e-01, 4.12699916842186e-01, 4.02965240156902e-01, 3.93379310025225e-01,\n                                                3.84002547384995e-01, 3.74891447798561e-01, 3.66097622007587e-01, 3.57666990019382e-01, 3.49639155848351e-01,\n                                                3.42046977842884e-01, 3.34916336936388e-01, 3.28266093606842e-01, 3.22108215008285e-01, 3.16448047387425e-01,\n                                                3.11284705752200e-01, 3.06611552566764e-01, 3.02416739424984e-01, 2.98683789423862e-01, 2.95392202504189e-01,\n                                                2.92518070617120e-01, 2.90034693625032e-01, 2.87913189965806e-01, 2.86123098098315e-01, 2.84632965582517e-01,\n                                                2.83410922450116e-01, 2.82425234523814e-01, 2.81644830839483e-01, 2.81039797649726e-01, 2.80581829957029e-01,\n                                                2.80244630425329e-01, 2.80004245073414e-01, 2.79839325495303e-01, 2.79731308539851e-01, 2.79664506365648e-01,\n                                                2.79626102457556e-01, 2.79606052362311e-01, 2.79596891355226e-01, 2.79593454752785e-01, 2.79592519914317e-01,\n                                                2.79592381934137e-01, 2.79592368277193e-01, 2.79592083957283e-01, 2.79590157650645e-01, 2.79583076383432e-01,\n                                                2.79564200630148e-01, 2.79522893055088e-01, 2.79443790045448e-01, 2.79306247840282e-01, 2.79083993032486e-01,\n                                                2.78745004768751e-01, 2.78251652742242e-01, 2.77561110631524e-01, 2.76626058542362e-01, 2.75395679884397e-01,\n                                                2.73816947748529e-01, 2.71836183240012e-01, 2.69400853626067e-01, 2.66461562090001e-01, 2.62974164106680e-01,\n                                                2.58901928924189e-01, 2.54217649477596e-01, 2.48905591553836e-01, 2.42963164631590e-01, 2.36402194224752e-01,\n                                                2.29249680686337e-01, 2.21547944306906e-01, 2.13354082924397e-01, 2.04738706973274e-01, 1.95783967009021e-01,\n                                                1.86580946799538e-01, 1.77226554883305e-01, 1.67820100674234e-01, 1.58459778713350e-01, 1.49239298955351e-01,\n                                                1.40244888064231e-01, 1.31552847517369e-01, 1.23227794787582e-01, 1.15321643498760e-01, 1.07873308110996e-01,\n                                                1.00909058189288e-01, 9.44434035127841e-02, 8.84803672163486e-02, 8.30149991784737e-02, 7.80349925761641e-02,\n                                                7.35222880284141e-02, 6.94545768969448e-02, 6.58066436071465e-02, 6.25515129621164e-02, 5.96613903076104e-02,\n                                                5.71083991921029e-02, 5.48651328579126e-02, 5.29050430673266e-02, 5.12026932637468e-02, 4.97339038078906e-02,\n                                                4.84758158515888e-02, 4.74068980085320e-02, 4.65069168670027e-02, 4.57568889215167e-02, 4.51390279057620e-02,\n                                                4.46366979271602e-02, 4.42343793223330e-02, 4.39176508465096e-02, 4.36731887532460e-02, 4.34887806091240e-02,\n                                                4.33533494276759e-02, 4.32569820076480e-02, 4.31909543168416e-02, 4.31477464370005e-02, 4.31210399768105e-02,\n                                                4.31056919159687e-02, 4.30976804407948e-02, 4.30940202959533e-02, 4.30926473081854e-02, 4.30922738277815e-02,\n                                                4.30922187030660e-02, 4.30922130167204e-02, 4.30920923091520e-02, 4.30912745051302e-02, 4.30882682829150e-02,\n                                                4.30802556582393e-02, 4.30627245882675e-02, 4.30291672063134e-02, 4.29708629124264e-02, 4.28767678916415e-02,\n                                                4.27335348626343e-02, 4.25256879967577e-02, 4.22359767280085e-02, 4.18459272255802e-02, 4.13366003630671e-02,\n                                                4.06895492973263e-02, 3.98879483053207e-02, 3.89178385650979e-02, 3.77694088186331e-02, 3.64382034826320e-02,\n                                                3.49261330358104e-02, 3.32421569424639e-02, 3.14025225656991e-02, 2.94304767187725e-02, 2.73554183129079e-02,\n                                                2.52115253157399e-02, 2.30359573711212e-02, 2.08667950550989e-02, 1.87409161931527e-02, 1.66920203724175e-02,\n                                                1.47489916344625e-02, 1.29347397506763e-02, 1.12655919110978e-02, 9.75123252811727e-03, 8.39512333767800e-03,\n                                                7.19529024128462e-03, 6.14534243220533e-03, 5.23559124287942e-03, 4.45415377913605e-03, 3.78795203411642e-03,\n                                                3.22354703197902e-03, 2.74777799148751e-03, 2.34820674783975e-03, 2.01339296521041e-03, 1.73303965820537e-03,\n                                                1.49804834651945e-03, 1.30051296194722e-03, 1.13367024128763e-03, 9.91818552748214e-04, 8.70217014139030e-04,\n                                                7.64977501134467e-04, 6.72959571929255e-04, 5.91672732511483e-04, 5.19185282428225e-04, 4.54037053131628e-04,\n                                                3.95154667060638e-04, 3.41770418501142e-04, 2.93347465245120e-04, 2.49514029377451e-04, 2.10008243911375e-04,\n                                                1.74633997900742e-04, 1.43227168720728e-04, 1.15631102062252e-04, 9.16799797039403e-05, 7.11886604563006e-05,\n                                                5.39476115477555e-05, 3.97216536640599e-05, 2.82514116634047e-05, 1.92565846077741e-05, 1.24403874508516e-05,\n                                                7.49474342853773e-06, 4.10600469535893e-06, 1.96114837081041e-06, 7.54568560523694e-07, 0.00000000000000e+00,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {1.01000000000000e+02, 1.00999999485913e+02, 1.00999983589315e+02, 1.00999875887201e+02, 1.00999479957948e+02,\n                                                1.00998424518375e+02, 1.00996114524314e+02, 1.00991689881163e+02, 1.00983993118510e+02, 1.00971547040824e+02,\n                                                1.00952543014435e+02, 1.00924840252061e+02, 1.00885976292506e+02, 1.00833188932882e+02, 1.00763450214927e+02,\n                                                1.00673513679843e+02, 1.00559976836974e+02, 1.00419361315105e+02, 1.00248212998390e+02, 1.00043223062047e+02,\n                                                9.98013678564999e+01, 9.95200611297380e+01, 9.91973068846566e+01, 9.88318366859370e+01, 9.84232132761223e+01,\n                                                9.79718844818988e+01, 9.74791781070322e+01, 9.69472387654337e+01, 9.63789188125910e+01, 9.57776442765750e+01,\n                                                9.51472799551799e+01, 9.44920142123540e+01, 9.38162743192259e+01, 9.31246704273381e+01, 9.24219547422824e+01,\n                                                9.17129765962977e+01, 9.10026169237683e+01, 9.02956969889854e+01, 8.95968713917688e+01, 8.89105260846846e+01,\n                                                8.82407014724776e+01, 8.75910491614787e+01, 8.69648168717882e+01, 8.63648483263537e+01, 8.57935860504355e+01,\n                                                8.52530710662129e+01, 8.47449393267020e+01, 8.42704178168250e+01, 8.38303236727040e+01, 8.34250686741251e+01,\n                                                8.30546701636273e+01, 8.27187684208219e+01, 8.24166499198895e+01, 8.21472756492406e+01, 8.19093136405745e+01,\n                                                8.17011749211805e+01, 8.15210521885482e+01, 8.13669605674048e+01, 8.12367798301404e+01, 8.11282974426646e+01,\n                                                8.10392517484274e+01, 8.09673745370270e+01, 8.09104321751151e+01, 8.08662644202978e+01, 8.08328200060169e+01,\n                                                8.08081880872680e+01, 8.07906246807754e+01, 8.07785733226982e+01, 8.07706793020367e+01, 8.07657970046886e+01,\n                                                8.07629901140124e+01, 8.07615246483036e+01, 8.07608550613058e+01, 8.07606038755219e+01, 8.07605355468431e+01,\n                                                8.07605254616713e+01, 8.07605240811536e+01, 8.07604914779992e+01, 8.07602705872009e+01, 8.07594585748043e+01,\n                                                8.07572940904726e+01, 8.07525573855387e+01, 8.07434868568227e+01, 8.07277157212491e+01, 8.07022323236485e+01,\n                                                8.06633673226491e+01, 8.06068106312913e+01, 8.05276604379540e+01, 8.04205058220819e+01, 8.02795433402023e+01,\n                                                8.00987264498036e+01, 7.98719447650389e+01, 7.95932279604052e+01, 7.92569667844198e+01, 7.88581413127773e+01,\n                                                7.83925445327438e+01, 7.78569879681286e+01, 7.72494757807915e+01, 7.65693351182876e+01, 7.58172937782525e+01,\n                                                7.49955013952766e+01, 7.41074962859880e+01, 7.31581247625944e+01, 7.21534207979456e+01, 7.11004505222430e+01,\n                                                7.00071208203710e+01, 6.88819506347725e+01, 6.77338131448180e+01, 6.65716740372886e+01, 6.54043616969121e+01,\n                                                6.42403954241190e+01, 6.30878709419885e+01, 6.19543791255461e+01, 6.08469312259348e+01, 5.97718793034459e+01,\n                                                5.87348385486167e+01, 5.77406265581002e+01, 5.67932319673631e+01, 5.58958164550219e+01, 5.50507459280665e+01,\n                                                5.42596419257226e+01, 5.35234433960011e+01, 5.28424708351543e+01, 5.22164877522956e+01, 5.16447572711595e+01,\n                                                5.11260937370044e+01, 5.06589103143783e+01, 5.02412639211603e+01, 4.98708987420706e+01, 4.95452892674750e+01,\n                                                4.92616834835699e+01, 4.90171465740303e+01, 4.88086052895748e+01, 4.86328929769825e+01, 4.84867951038125e+01,\n                                                4.83670949496775e+01, 4.82706189537504e+01, 4.81942810183631e+01, 4.81351248860851e+01, 4.80903635529432e+01,\n                                                4.80574145741702e+01, 4.80339300787689e+01, 4.80178203474594e+01, 4.80072699303001e+01, 4.80007454825548e+01,\n                                                4.79969947695890e+01, 4.79950366164315e+01, 4.79941419331017e+01, 4.79938063086032e+01, 4.79937150108008e+01,\n                                                4.79937015354436e+01, 4.79937002562608e+01, 4.79936741767635e+01, 4.79934974846641e+01, 4.79928479507947e+01,\n                                                4.79911165702206e+01, 4.79873276802398e+01, 4.79800722461740e+01, 4.79674573115925e+01, 4.79470744664201e+01,\n                                                4.79159900007620e+01, 4.78707591358712e+01, 4.78074662947078e+01, 4.77217927271733e+01, 4.76091118826062e+01,\n                                                4.74646116926846e+01, 4.72834414010547e+01, 4.70608788160955e+01, 4.67925119944586e+01, 4.64744275612144e+01,\n                                                4.61033963409306e+01, 4.56770459084983e+01, 4.51940092280535e+01, 4.46540388596635e+01, 4.40580774283458e+01,\n                                                4.34082774237821e+01, 4.27079672619743e+01, 4.19615659748992e+01, 4.11744551106599e+01, 4.03528213326757e+01,\n                                                3.95034840878446e+01, 3.86337182950748e+01, 3.77510743914219e+01, 3.68631921784460e+01, 3.59776050496711e+01,\n                                                3.51015376880365e+01, 3.42417093339727e+01, 3.34041610248469e+01, 3.25941254687657e+01, 3.18159523778505e+01,\n                                                3.10730926510877e+01, 3.03681351593046e+01, 2.97028828144871e+01, 2.90784514545710e+01, 2.84953757405083e+01,\n                                                2.79537096452367e+01, 2.74531137377684e+01, 2.69929260009186e+01, 2.65722164869316e+01, 2.61898283477355e+01,\n                                                2.58444087354568e+01, 2.55344330673425e+01, 2.52582255831858e+01, 2.50139783449905e+01, 2.47997700812202e+01,\n                                                2.46135856846926e+01, 2.44533367611729e+01, 2.43168833643542e+01, 2.42020568893633e+01, 2.41066839808834e+01,\n                                                2.40286112079168e+01, 2.39657301473044e+01, 2.39160023996462e+01, 2.38774839419784e+01, 2.38483481149188e+01,\n                                                2.38269064631613e+01, 2.38116266110226e+01, 2.38011463694851e+01, 2.37942833430701e+01, 2.37900394333422e+01,\n                                                2.37875998145098e+01, 2.37863261738993e+01, 2.37857442507477e+01, 2.37855259535098e+01, 2.37854665715783e+01,\n                                                2.37854578069372e+01, 2.37854570269467e+01, 2.37854416727435e+01, 2.37853376459822e+01, 2.37849552359701e+01,\n                                                2.37839358971389e+01, 2.37817052302460e+01, 2.37774337389696e+01, 2.37700071522951e+01, 2.37580080333018e+01,\n                                                2.37397103002170e+01, 2.37130881333563e+01, 2.36758404901538e+01, 2.36254320554490e+01, 2.35591508772677e+01,\n                                                2.34741821587025e+01, 2.33676967025736e+01, 2.32369513846084e+01, 2.30793978520989e+01, 2.28927945317032e+01,\n                                                2.26753161184485e+01, 2.24256541252499e+01, 2.21431018666052e+01, 2.18276174461070e+01, 2.14798589233668e+01,\n                                                2.11011869591828e+01, 2.06936321884592e+01, 2.02598278095843e+01, 1.98029126264530e+01, 1.93264153143335e+01,\n                                                1.88341348877315e+01, 1.83300324123485e+01, 1.78181434679559e+01, 1.73025115588152e+01, 1.67871342239483e+01,\n                                                1.62759103876703e+01, 1.57725805598746e+01, 1.52806582902187e+01, 1.48033579058431e+01, 1.43435272524607e+01,\n                                                1.39035942374831e+01, 1.34855333676606e+01, 1.30908547105083e+01, 1.27206141328941e+01, 1.23754410898906e+01,\n                                                1.20555789116617e+01, 1.17609323335526e+01, 1.14911176063668e+01, 1.12455115448776e+01, 1.10232970176968e+01,\n                                                1.08235034438604e+01, 1.06450417306307e+01, 1.04867337274205e+01, 1.03473366942326e+01, 1.02255635250963e+01,\n                                                1.01200995698239e+01, 1.00296168998424e+01, 9.95278679705717e+00, 9.88829113177351e+00, 9.83483315321484e+00,\n                                                9.79114805636274e+00, 9.75601352160851e+00, 9.72826025805736e+00, 9.70678242616218e+00, 9.69054767963705e+00,\n                                                9.67860645895065e+00, 9.67010009668920e+00, 9.66426726425388e+00, 9.66044830233889e+00, 9.65808703345907e+00,\n                                                9.65672974871478e+00, 9.65602118478472e+00, 9.65569745000663e+00, 9.65557600816896e+00, 9.65554297325740e+00,\n                                                9.65553809738134e+00, 9.65553766632887e+00, 9.65552921321402e+00, 9.65547194230952e+00, 9.65526141128767e+00,\n                                                9.65470023501312e+00, 9.65347222676660e+00, 9.65112087435423e+00, 9.64703319896408e+00, 9.64043004169500e+00,\n                                                9.63036380820374e+00, 9.61572465052954e+00, 9.59525594459610e+00, 9.56757969734377e+00, 9.53123215765990e+00,\n                                                9.48470939006462e+00, 9.42652189851702e+00, 9.35525658559717e+00, 9.26964345770413e+00, 9.16862363100262e+00,\n                                                9.05141447487942e+00, 8.91756728396169e+00, 8.76701282482244e+00, 8.60009055485152e+00, 8.41755829175203e+00,\n                                                8.22058057028842e+00, 8.01069571102673e+00, 7.78976351586097e+00, 7.55989722812377e+00, 7.32338469986195e+00,\n                                                7.08260442239465e+00, 6.83994214300019e+00, 6.59771327380619e+00, 6.35809534433041e+00, 6.12307352970052e+00,\n                                                5.89440095839961e+00, 5.67357419080804e+00, 5.46182306685525e+00, 5.26011314580140e+00, 5.06915829115985e+00,\n                                                4.88944064159917e+00, 4.72123524634917e+00, 4.56463695871730e+00, 4.41958766025876e+00, 4.28590241386161e+00,\n                                                4.16329362748843e+00, 4.05139270397241e+00, 3.94976894549504e+00, 3.85794568662027e+00, 3.77541376817651e+00,\n                                                3.70164255595451e+00, 3.63608876794419e+00, 3.57820341086939e+00, 3.52743714614188e+00, 3.48324440971781e+00,\n                                                3.44508660130928e+00, 3.41243463728942e+00, 3.38477112977117e+00, 3.36159241321269e+00, 3.34241059117839e+00,\n                                                3.32675572148879e+00, 3.31417820020235e+00, 3.30425134637555e+00, 3.29657413346114e+00, 3.29077396294285e+00,\n                                                3.28650933486090e+00, 3.28347224145718e+00, 3.28139009676735e+00, 3.28002701800698e+00, 3.27918429403641e+00,\n                                                3.27869991049373e+00, 3.27844704736233e+00, 3.27833151866885e+00, 3.27828818092861e+00, 3.27827639211264e+00,\n                                                3.27827465211173e+00, 3.27827449590866e+00, 3.27827140580254e+00, 3.27825046997043e+00, 3.27817350900717e+00,\n                                                3.27796836986079e+00, 3.27751948126070e+00, 3.27666001048998e+00, 3.27516602362060e+00, 3.27275306090762e+00,\n                                                3.26907554455896e+00, 3.26372942545727e+00, 3.25625843316746e+00, 3.24616420301381e+00, 3.23292040020527e+00,\n                                                3.21599073462740e+00, 3.19485046164142e+00, 3.16901060853969e+00, 3.13804378398224e+00, 3.10161006544045e+00,\n                                                3.05948117565191e+00, 3.01156101469867e+00, 2.95790066218335e+00, 2.89870623505213e+00, 2.83433847942622e+00,\n                                                2.76530365018004e+00, 2.69223601559229e+00, 2.61587311717220e+00, 2.53702560945860e+00, 2.45654400438835e+00,\n                                                2.37528488034155e+00, 2.29407905724277e+00, 2.21370390071823e+00, 2.13486135681110e+00, 2.05816262258729e+00,\n                                                1.98411963151108e+00, 1.91314287699527e+00, 1.84554459315683e+00, 1.78154600475865e+00, 1.72128725644293e+00,\n                                                1.66483870837759e+00, 1.61221249186069e+00, 1.56337349537259e+00, 1.51824924360558e+00, 1.47673839617053e+00,\n                                                1.43871780263427e+00, 1.40404819623265e+00, 1.37257869296123e+00, 1.34415029696061e+00, 1.31859861199581e+00,\n                                                1.29575593705469e+00, 1.27545289382064e+00, 1.25751970351403e+00, 1.24178720515087e+00, 1.22808768830876e+00,\n                                                1.21625560051152e+00, 1.20612818059301e+00, 1.19754606272362e+00, 1.19035388919920e+00, 1.18440096216567e+00,\n                                                1.17954195443838e+00, 1.17563768741981e+00, 1.17255597037745e+00, 1.17017248102138e+00, 1.16837165369802e+00,\n                                                1.16704752995794e+00, 1.16610451803008e+00, 1.16545800383085e+00, 1.16503475714426e+00, 1.16477308261609e+00,\n                                                1.16462267577954e+00, 1.16454415856707e+00, 1.16450828539307e+00, 1.16449482844875e+00, 1.16449116786400e+00,\n                                                1.16449062757047e+00, 1.16449057776505e+00, 1.16448957797725e+00, 1.16448280429840e+00, 1.16445790399679e+00,\n                                                1.16439153245645e+00, 1.16424629783148e+00, 1.16396822460429e+00, 1.16348486706558e+00, 1.16270420735643e+00,\n                                                1.16151447506218e+00, 1.15978502240824e+00, 1.15736837578530e+00, 1.15410355515426e+00, 1.14982070305322e+00,\n                                                1.14434699166756e+00, 1.13751368043398e+00, 1.12916408338329e+00, 1.11916208573976e+00, 1.10740073887145e+00,\n                                                1.09381037996955e+00, 1.07836568536722e+00, 1.06109108623312e+00, 1.04206405481226e+00, 1.02141589884033e+00,\n                                                9.99329861203464e-01, 9.76036486646720e-01, 9.51806366976328e-01, 9.26940503987623e-01, 9.01758647224071e-01,\n                                                8.76586098515133e-01, 8.51739653738150e-01, 8.27513576897644e-01, 8.04166728093421e-01, 7.81912099801374e-01,\n                                                7.60909937960918e-01, 7.41265258427916e-01, 7.23029942323805e-01, 7.06208856356724e-01, 6.90768817440471e-01,\n                                                6.76648893426048e-01, 6.63770571443877e-01, 6.52046661990610e-01, 6.41388286404137e-01, 6.31709760673061e-01,\n                                                6.22931537147522e-01, 6.14981564359567e-01, 6.07795492048012e-01, 6.01316125373714e-01, 5.95492462130295e-01,\n                                                5.90278562104899e-01, 5.85632418365037e-01, 5.81514935245934e-01, 5.77889069327838e-01, 5.74719156135814e-01,\n                                                5.71970423618893e-01, 5.69608680451637e-01, 5.67600160081099e-01, 5.65911498079146e-01, 5.64509819234061e-01,\n                                                5.63362910909746e-01, 5.62439459889802e-01, 5.61709330858022e-01, 5.61143865693367e-01, 5.60716183854652e-01,\n                                                5.60401465362204e-01, 5.60177199347905e-01, 5.60023382958803e-01, 5.59922657644620e-01, 5.59860372581568e-01,\n                                                5.59824568157865e-01, 5.59805875978995e-01, 5.59797335586453e-01, 5.59794131825711e-01, 5.59793260328405e-01,\n                                                5.59793131697361e-01, 5.59793119438964e-01, 5.59792869015922e-01, 5.59791172367525e-01, 5.59784935376840e-01,\n                                                5.59768310374082e-01, 5.59731929622572e-01, 5.59662266316622e-01, 5.59541153065041e-01, 5.59345487055381e-01,\n                                                5.59047149756282e-01, 5.58613166294407e-01, 5.58006124454934e-01, 5.57184864416925e-01, 5.56105436865835e-01,\n                                                5.54722308673163e-01, 5.52989772664944e-01, 5.50863493441057e-01, 5.48302098725827e-01, 5.45268710540782e-01,\n                                                5.41732307891039e-01, 5.37668826352302e-01, 5.33061930205633e-01, 5.27903435271710e-01, 5.22193406716312e-01,\n                                                5.15939994980386e-01, 5.09159094988249e-01, 5.01873913967870e-01, 4.94114513285410e-01, 4.85917357378284e-01,\n                                                4.77324868871946e-01, 4.68384962971129e-01, 4.59150521771207e-01, 4.49678770651587e-01, 4.40030530848716e-01,\n                                                4.30269339482138e-01, 4.20460446076447e-01, 4.10669710001216e-01, 4.00962434945612e-01, 3.91402184286193e-01,\n                                                3.82049625071588e-01, 3.72961448364961e-01, 3.64189409877511e-01, 3.55779527428268e-01, 3.47771461441866e-01,\n                                                3.40198092568357e-01, 3.33085298000867e-01, 3.26451916619561e-01, 3.20309883893941e-01, 3.14664511260219e-01,\n                                                3.09514881677785e-01, 3.04854332998318e-01, 3.00671003062419e-01, 2.96948414289247e-01, 2.93666080129356e-01,\n                                                2.90800120378435e-01, 2.88323876420392e-01, 2.86208520593235e-01, 2.84423655856386e-01, 2.82937902763038e-01,\n                                                2.81719470530277e-01, 2.80736707985440e-01, 2.79958628648714e-01, 2.79355402518789e-01, 2.78898805582770e-01,\n                                                2.78562616958283e-01, 2.78322953113587e-01, 2.78158528942342e-01, 2.78050836642151e-01, 2.77984235319536e-01,\n                                                2.77945946903728e-01, 2.77925957112402e-01, 2.77916823660163e-01, 2.77913397394727e-01, 2.77912465368232e-01,\n                                                2.77912327803080e-01, 2.77912314187205e-01, 2.77912030722504e-01, 2.77910110210144e-01, 2.77903050243552e-01,\n                                                2.77884231272012e-01, 2.77843047972880e-01, 2.77764183006909e-01, 2.77627054888242e-01, 2.77405469694131e-01,\n                                                2.77067503909535e-01, 2.76575642494109e-01, 2.75887191840710e-01, 2.74954981217320e-01, 2.73728358175248e-01,\n                                                2.72154473047593e-01, 2.70179835048907e-01, 2.67752107876163e-01, 2.64822096612193e-01, 2.61345860908023e-01,\n                                                2.57286872827180e-01, 2.52618122509503e-01, 2.47324062251565e-01, 2.41402271191845e-01, 2.34864720248694e-01,\n                                                2.27738522238909e-01, 2.20066067230746e-01, 2.11904469896950e-01, 2.03324294693601e-01, 1.94407575085975e-01,\n                                                1.85245201227815e-01, 1.75933810211205e-01, 1.66572365832977e-01, 1.57258651775280e-01, 1.48085915705053e-01,\n                                                1.39139888219660e-01, 1.30496360883626e-01, 1.22219447816136e-01, 1.14360584943171e-01, 1.06958250976348e-01,\n                                                1.00038334141743e-01, 9.36150254221957e-02, 8.76920955233800e-02, 8.22644082095678e-02, 7.73195336370378e-02,\n                                                7.28393469470348e-02, 6.88015245369797e-02, 6.51808786414705e-02, 6.19504968279045e-02, 5.90826747384483e-02,\n                                                5.65496470369027e-02, 5.43241330712192e-02, 5.23797208161199e-02, 5.06911160697427e-02, 4.92342845607538e-02,\n                                                4.79865134097679e-02, 4.69264159691392e-02, 4.60339009503912e-02, 4.52901232894618e-02, 4.46774306214763e-02,\n                                                4.41793156772263e-02, 4.37803814551643e-02, 4.34663227424466e-02, 4.32239245250656e-02, 4.30410751373245e-02,\n                                                4.29067897591437e-02, 4.28112381829919e-02, 4.27457697385449e-02, 4.27029279377251e-02, 4.26764477931130e-02,\n                                                4.26612298101929e-02, 4.26532862384050e-02, 4.26496571171384e-02, 4.26482957670515e-02, 4.26479254523571e-02,\n                                                4.26478707948803e-02, 4.26478651567521e-02, 4.26477454723226e-02, 4.26469346001568e-02, 4.26439538596668e-02,\n                                                4.26360091547053e-02, 4.26186266991380e-02, 4.25853538312992e-02, 4.25275439960302e-02, 4.24342473094015e-02,\n                                                4.22922303415305e-02, 4.20861498862166e-02, 4.17989042762485e-02, 4.14121808838956e-02, 4.09072085654003e-02,\n                                                4.02657081776425e-02, 3.94710129532143e-02, 3.85093047144238e-02, 3.73708843332423e-02, 3.60513696531655e-02,\n                                                3.45526965108149e-02, 3.28837940340065e-02, 3.10608186075712e-02, 2.91068640000702e-02, 2.70511167238539e-02,\n                                                2.49274900964878e-02, 2.27728381427283e-02, 2.06249095918167e-02, 1.85202411983312e-02, 1.64921999763834e-02,\n                                                1.45693626459575e-02, 1.27743711238821e-02, 1.11233346909927e-02, 9.62577588342128e-03, 8.28505222959564e-03,\n                                                7.09914071428841e-03, 6.06165127811664e-03, 5.16293771562459e-03, 4.39119203886662e-03, 3.73343402587523e-03,\n                                                3.17633647436821e-03, 2.70685689099537e-03, 2.31267618062247e-03, 1.98246973323535e-03, 1.70605000785429e-03,\n                                                1.47441953519944e-03, 1.27976328610657e-03, 1.11539817510220e-03, 9.75691702521431e-04, 8.55961503006597e-04,\n                                                7.52368163361439e-04, 6.61811087269371e-04, 5.81831693565960e-04, 5.10523179428901e-04, 4.46444212286679e-04,\n                                                3.88535204507434e-04, 3.36038241215419e-04, 2.88423280665029e-04, 2.45323257516361e-04, 2.06479684763394e-04,\n                                                1.71699096398470e-04, 1.40819730916064e-04, 1.13687334660995e-04, 9.01387464153913e-05, 6.99918667663724e-05,\n                                                5.30406488792323e-05, 3.90538486243486e-05, 2.77764422804694e-05, 1.89328370368003e-05, 1.22312353880716e-05,\n                                                7.36873907669633e-06, 4.03697301010197e-06, 1.92817680044755e-06, 7.41882473676014e-07, 2.84217094304040e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.02000000000000e+02,  1.01999999478816e+02,  1.01999983362777e+02, 1.01999874173908e+02,\n                                                1.01999472779100e+02,  1.01998402769718e+02,  1.01996060886702e+02, 1.01991575159850e+02,\n                                                1.01983772133127e+02,  1.01971154200811e+02,  1.01951887722865e+02, 1.01923802286282e+02,\n                                                1.01884401316794e+02,  1.01830884312346e+02,  1.01760181328164e+02, 1.01669000975570e+02,\n                                                1.01553893945960e+02,  1.01411334600874e+02,  1.01237822980587e+02, 1.01030008133805e+02,\n                                                1.00784830596313e+02,  1.00499677249286e+02,  1.00172536465970e+02, 9.98021369107836e+01,\n                                                9.93880514600430e+01,  9.89307500439033e+01,  9.84315922535122e+01, 9.78927611725579e+01,\n                                                9.73171513547256e+01,  9.67082326478127e+01,  9.60699145877356e+01, 9.54064319694021e+01,\n                                                9.47222619261026e+01,  9.40220696000807e+01,  9.33106677940051e+01, 9.25929704512048e+01,\n                                                9.18739234838997e+01,  9.11584089412949e+01,  9.04511344200434e+01, 8.97565299911770e+01,\n                                                8.90786728634386e+01,  8.84212470304940e+01,  8.77875306466584e+01, 8.71803968893172e+01,\n                                                8.66023162604016e+01,  8.60553549812821e+01,  8.55411700483095e+01, 8.50610043232957e+01,\n                                                8.46156851494922e+01,  8.42056287918435e+01,  8.38308516228331e+01, 8.34909879504162e+01,\n                                                8.31853138161948e+01,  8.29127758804138e+01,  8.26720245088592e+01, 8.24614502634548e+01,\n                                                8.22792230947129e+01,  8.21233335999178e+01,  8.19916357323736e+01, 8.18818903265171e+01,\n                                                8.17918087518020e+01,  8.17190959391460e+01,  8.16614919524386e+01, 8.16168112184765e+01,\n                                                8.15829784944570e+01,  8.15580606531821e+01,  8.15402934097428e+01, 8.15281022034864e+01,\n                                                8.15201165854203e+01,  8.15151776398704e+01,  8.15123381825091e+01, 8.15108557141734e+01,\n                                                8.15101783585618e+01,  8.15099242585070e+01,  8.15098551370763e+01, 8.15098449348960e+01,\n                                                8.15098435383615e+01,  8.15098105569443e+01,  8.15095871033669e+01, 8.15087656700280e+01,\n                                                8.15065760737270e+01,  8.15017844159417e+01,  8.14926086615698e+01, 8.14766545865854e+01,\n                                                8.14508756414339e+01,  8.14115600179311e+01,  8.13543478359922e+01, 8.12742808093916e+01,\n                                                8.11658859281474e+01,  8.10232935396634e+01,  8.08403886791205e+01, 8.06109925943791e+01,\n                                                8.03290691940774e+01,  7.99889487510085e+01,  7.95855588218872e+01, 7.91146502859315e+01,\n                                                7.85730050367848e+01,  7.79586116550305e+01,  7.72707968397938e+01, 7.65103038122708e+01,\n                                                7.56793141044466e+01,  7.47814149591810e+01,  7.38215188711186e+01, 7.28057423452354e+01,\n                                                7.17412472559164e+01,  7.06360435166654e+01,  6.94987527658583e+01, 6.83383443103861e+01,\n                                                6.71638719123434e+01,  6.59842478963618e+01,  6.48080772434620e+01, 6.36435458509074e+01,\n                                                6.24983362995943e+01,  6.13795459493324e+01,  6.02935998862097e+01, 5.92461685945841e+01,\n                                                5.82421065277416e+01,  5.72854232344668e+01,  5.63792894561580e+01, 5.55260724576563e+01,\n                                                5.47273906267357e+01,  5.39841771314997e+01,  5.32967447540196e+01, 5.26648472523806e+01,\n                                                5.20877355038900e+01,  5.15642086507337e+01,  5.10926614426469e+01, 5.06711291926682e+01,\n                                                5.02973315623944e+01,  4.99687160472177e+01,  4.96825017035504e+01, 4.94357234092640e+01,\n                                                4.92252767692029e+01,  4.90479636357563e+01,  4.89005380759849e+01, 4.87797524609017e+01,\n                                                4.86824031746428e+01,  4.86053752505196e+01,  4.85456850552038e+01, 4.85005199834491e+01,\n                                                4.84672740155585e+01,  4.84435779466364e+01,  4.84273231330767e+01, 4.84166777229419e+01,\n                                                4.84100945399534e+01,  4.84063100649571e+01,  4.84043342863994e+01, 4.84034315502036e+01,\n                                                4.84030929048496e+01,  4.84030007853062e+01,  4.84029871886619e+01, 4.84029858979657e+01,\n                                                4.84029595837357e+01,  4.84027813012945e+01,  4.84021259212486e+01, 4.84003789575945e+01,\n                                                4.83965559678738e+01,  4.83892352419491e+01,  4.83765068056704e+01, 4.83559406227894e+01,\n                                                4.83245766929372e+01,  4.82789394663007e+01,  4.82150785642353e+01, 4.81286371427156e+01,\n                                                4.80149483046438e+01,  4.78691587248942e+01,  4.76863771072068e+01, 4.74618433078038e+01,\n                                                4.71911120597324e+01,  4.68702433891946e+01,  4.64959902348940e+01, 4.60659726669432e+01,\n                                                4.55788276327896e+01,  4.50343234999251e+01,  4.44334300219172e+01, 4.37783370089082e+01,\n                                                4.30724192014622e+01,  4.23201504906629e+01,  4.15269765879363e+01, 4.06991592745105e+01,\n                                                3.98436050722783e+01,  3.89676861244503e+01,  3.80790540928962e+01, 3.71854437966769e+01,\n                                                3.62944654648285e+01,  3.54133920541088e+01,  3.45489567319258e+01, 3.37071804612878e+01,\n                                                3.28932480758282e+01,  3.21114439290974e+01,  3.13651480234830e+01, 3.06568839090000e+01,\n                                                2.99884031736135e+01,  2.93607890875450e+01,  2.87745635290780e+01, 2.82297854034267e+01,\n                                                2.77261337917093e+01,  2.72629737005601e+01,  2.68394057068300e+01, 2.64543027391506e+01,\n                                                2.61063378672473e+01,  2.57940066728395e+01,  2.55156469962195e+01, 2.52694579574498e+01,\n                                                2.50535193728642e+01,  2.48658121234708e+01,  2.47042396798447e+01, 2.45666507932480e+01,\n                                                2.44508632567641e+01,  2.43546885661324e+01,  2.42759572317785e+01, 2.42125443964484e+01,\n                                                2.41623952982463e+01,  2.41235499982337e+01,  2.40941666814009e+01, 2.40725427567775e+01,\n                                                2.40571329416132e+01,  2.40465635266697e+01,  2.40396420900858e+01, 2.40353620553445e+01,\n                                                2.40329016680076e+01,  2.40316171843070e+01,  2.40310303068447e+01, 2.40308101510717e+01,\n                                                2.40307502635734e+01,  2.40307414243117e+01,  2.40307406376805e+01, 2.40307251527542e+01,\n                                                2.40306202403256e+01,  2.40302345745128e+01,  2.40292065569603e+01, 2.40269568971426e+01,\n                                                2.40226490330891e+01,  2.40151591968636e+01,  2.40030578581134e+01, 2.39846041830145e+01,\n                                                2.39577549925734e+01,  2.39201894520601e+01,  2.38693503281151e+01, 2.38025020736008e+01,\n                                                2.37168052212474e+01,  2.36094055924468e+01,  2.34775357011054e+01, 2.33186245378860e+01,\n                                                2.31304107732648e+01,  2.29110534475607e+01,  2.26592335386602e+01, 2.23742394978299e+01,\n                                                2.20560299828807e+01,  2.17052676920795e+01,  2.13233196279294e+01, 2.09122216618431e+01,\n                                                2.04746092538635e+01,  2.00136213903904e+01,  1.95327898984134e+01, 1.90359288413670e+01,\n                                                1.85270364436016e+01,  1.80102148885319e+01,  1.74896044935822e+01, 1.69693227820628e+01,\n                                                1.64533987793329e+01,  1.59456978563372e+01,  1.54498393857907e+01, 1.49691148983415e+01,\n                                                1.45064164571269e+01,  1.40641836505851e+01,  1.36443741706446e+01, 1.32484589118112e+01,\n                                                1.28774390771681e+01,  1.25318805303945e+01,  1.22119596970944e+01, 1.19175154654241e+01,\n                                                1.16481023903763e+01,  1.14030416930294e+01,  1.11814677725512e+01, 1.09823690300281e+01,\n                                                1.08046226525664e+01,  1.06470236079079e+01,  1.05083084800660e+01, 1.03871749791586e+01,\n                                                1.02822980296210e+01,  1.01923433198567e+01,  1.01159791134101e+01, 1.00518869984838e+01,\n                                                9.99877210405801e+00,  9.95537314783057e+00,  9.92047251246785e+00, 9.89290638042917e+00,\n                                                9.87157480225119e+00,  9.85545143728382e+00,  9.84359259794192e+00, 9.83514515610273e+00,\n                                                9.82935283892029e+00,  9.82556045373688e+00,  9.82321563706135e+00, 9.82186781607491e+00,\n                                                9.82116419463759e+00,  9.82084271848089e+00,  9.82072212398764e+00, 9.82068931957971e+00,\n                                                9.82068447772571e+00,  9.82068404968098e+00,  9.82067565554907e+00, 9.82061878426637e+00,\n                                                9.82040972235292e+00,  9.81985246261445e+00,  9.81863302780513e+00, 9.81629810295225e+00,\n                                                9.81223902148800e+00,  9.80568214998432e+00,  9.79568670450928e+00, 9.78115098254729e+00,\n                                                9.76082787512222e+00,  9.73335029868976e+00,  9.69726682363074e+00, 9.65108725525752e+00,\n                                                9.59333724343401e+00,  9.52262018515982e+00,  9.43768380083667e+00, 9.33748790348221e+00,\n                                                9.22126916321820e+00,  9.08859823365826e+00,  8.93942458137268e+00, 8.77410483746043e+00,\n                                                8.59341149916153e+00,  8.39852028930765e+00,  8.19097627799631e+00, 7.97264075326821e+00,\n                                                7.74562253062641e+00,  7.51219867408824e+00,  7.27473030344827e+00, 7.03557923498565e+00,\n                                                6.79703070438289e+00,  6.56122647951138e+00,  6.33011143872780e+00, 6.10539531211477e+00,\n                                                5.88852989255180e+00,  5.68070075369205e+00,  5.48283149464616e+00, 5.29559787322516e+00,\n                                                5.11944893756227e+00,  4.95463238582460e+00,  4.80122177272705e+00, 4.65914370642520e+00,\n                                                4.52820371962179e+00,  4.40810997430212e+00,  4.29849433585012e+00, 4.19893062907100e+00,\n                                                4.10895008312004e+00,  4.02805410570137e+00,  3.95572461680911e+00, 3.89143223075267e+00,\n                                                3.83464260954665e+00,  3.78482132535338e+00,  3.74143756757158e+00, 3.70396701388741e+00,\n                                                3.67189415648186e+00,  3.64471433682840e+00,  3.62193569715174e+00, 3.60308120555854e+00,\n                                                3.58769085696973e+00,  3.57532409530583e+00,  3.56556244620283e+00, 3.55801229654089e+00,\n                                                3.55230771022046e+00,  3.54811313200719e+00,  3.54512580576024e+00, 3.54307772222427e+00,\n                                                3.54173691607264e+00,  3.54090795200069e+00,  3.54043147389957e+00, 3.54018273663139e+00,\n                                                3.54006909273865e+00,  3.54002646199721e+00,  3.54001486549686e+00, 3.54001315388116e+00,\n                                                3.54001300022624e+00,  3.54000996052993e+00,  3.53998936622742e+00, 3.53991366069948e+00,\n                                                3.53971186759372e+00,  3.53927029924016e+00,  3.53842483810620e+00, 3.53695518433807e+00,\n                                                3.53458147039198e+00,  3.53096364756523e+00,  3.52570403720738e+00, 3.51835339658452e+00,\n                                                3.50842075959351e+00,  3.49538716129020e+00,  3.47872313353329e+00, 3.45790956775150e+00,\n                                                3.43246119437109e+00,  3.40195155734577e+00,  3.36603801275562e+00, 3.32448501029511e+00,\n                                                3.27718378632436e+00,  3.22416665876725e+00,  3.16561439727965e+00, 3.10185564356168e+00,\n                                                3.03335803472038e+00,  2.96071145935241e+00,  2.88460464830899e+00, 2.80579695872041e+00,\n                                                2.72508765192997e+00,  2.64328512601932e+00,  2.56117841918974e+00, 2.47951287947146e+00,\n                                                2.39897127318126e+00,  2.32016088538901e+00,  2.24360646748566e+00, 2.16974831430325e+00,\n                                                2.09894437787220e+00,  2.03147517407963e+00,  1.96755029444705e+00, 1.90731554501514e+00,\n                                                1.85086002629585e+00,  1.79822277026742e+00,  1.74939880476886e+00, 1.70434468820454e+00,\n                                                1.66298363956160e+00,  1.62521039333173e+00,  1.59089586256556e+00, 1.55989162669607e+00,\n                                                1.53203420049755e+00,  1.50714900362880e+00,  1.48505394257135e+00, 1.46556253498183e+00,\n                                                1.44848654143702e+00,  1.43363811051371e+00,  1.42083148084716e+00, 1.40988431206382e+00,\n                                                1.40061873246823e+00,  1.39286219498136e+00,  1.38644822575459e+00, 1.38121713465486e+00,\n                                                1.37701673619902e+00,  1.37370310614823e+00,  1.37114137522644e+00, 1.36920653937479e+00,\n                                                1.36778424735670e+00,  1.36677151280902e+00,  1.36607729000367e+00, 1.36562285115880e+00,\n                                                1.36534190807453e+00,  1.36518043154064e+00,  1.36509613721434e+00, 1.36505762494677e+00,\n                                                1.36504317807106e+00,  1.36503924820886e+00,  1.36503866817080e+00, 1.36503861470166e+00,\n                                                1.36503754136869e+00,  1.36503026941743e+00,  1.36500353751883e+00, 1.36493228442049e+00,\n                                                1.36477637072137e+00,  1.36447786148776e+00,  1.36395901469706e+00, 1.36312112689073e+00,\n                                                1.36184439266869e+00,  1.35998893401531e+00,  1.35739714287838e+00, 1.35389744939451e+00,\n                                                1.34930957271058e+00,  1.34345122745614e+00,  1.33614614588690e+00, 1.32723313748841e+00,\n                                                1.31657575380790e+00,  1.30407197143492e+00,  1.28966317012465e+00, 1.27334158907054e+00,\n                                                1.25515541666117e+00,  1.23521073146948e+00,  1.21366968555620e+00, 1.19074461933218e+00,\n                                                1.16668821938759e+00,  1.14178034861663e+00,  1.11631272195351e+00, 1.09057305513349e+00,\n                                                1.06483053513071e+00,  1.03932432975492e+00,  1.01425634071539e+00, 9.89788612907006e-01,\n                                                9.66044960067919e-01,  9.43115698598973e-01,  9.21064064275996e-01, 8.99932946855742e-01,\n                                                8.79750913063830e-01,  8.60536937397242e-01,  8.42303676554621e-01, 8.25059421048053e-01,\n                                                8.08809015329217e-01,  7.93554078753274e-01,  7.79292825423013e-01, 7.66019711637597e-01,\n                                                7.53725064576798e-01,  7.42394781525704e-01,  7.32010141705743e-01, 7.22547742471193e-01,\n                                                7.13979554961853e-01,  7.06273087106283e-01,  6.99391640386324e-01, 6.93294648130788e-01,\n                                                6.87938085396837e-01,  6.83274942580880e-01,  6.79255756209557e-01, 6.75829190686372e-01,\n                                                6.72942664115709e-01,  6.70543009831448e-01,  6.68577163129001e-01, 6.66992860189296e-01,\n                                                6.65739333577903e-01,  6.64767986301328e-01,  6.64033024507603e-01, 6.63492027814470e-01,\n                                                6.63106436169798e-01,  6.62841933263238e-01,  6.62668708883629e-01, 6.62561586210842e-01,\n                                                6.62500004686009e-01,  6.62467854558841e-01,  6.62453165123594e-01, 6.62447654645405e-01,\n                                                6.62446155665151e-01,  6.62445934418926e-01,  6.62445913334395e-01, 6.62445482605094e-01,\n                                                6.62442564356439e-01,  6.62431836650825e-01,  6.62403241180044e-01, 6.62340664008198e-01,\n                                                6.62220833942797e-01,  6.62012488187656e-01,  6.61675852632044e-01, 6.61162481074740e-01,\n                                                6.60415492985010e-01,  6.59370241917827e-01,  6.57955435193529e-01, 6.56094708847320e-01,\n                                                6.53708639585176e-01,  6.50717147830520e-01,  6.47042214383816e-01, 6.42610800546493e-01,\n                                                6.37357831802220e-01,  6.31229083040338e-01,  6.24183793492236e-01, 6.16196845537033e-01,\n                                                6.07260364754794e-01,  5.97384637830345e-01,  5.86598296189763e-01, 5.74947770466082e-01,\n                                                5.62496076682137e-01,  5.49321042001722e-01,  5.35513109811504e-01, 5.21172876884620e-01,\n                                                5.06408508868461e-01,  4.91333157455927e-01,  4.76062469737599e-01, 4.60712245577923e-01,\n                                                4.45396270256566e-01,  4.30224332332870e-01,  4.15300432037128e-01, 4.00721190771364e-01,\n                                                3.86574482117126e-01,  3.72938313068389e-01,  3.59879986359573e-01, 3.47455568677219e-01,\n                                                3.35709675958071e-01,  3.24675568719400e-01,  3.14375531217735e-01, 3.04821491751667e-01,\n                                                2.96015830144142e-01,  2.87952313510758e-01,  2.80617102686122e-01, 2.73989778028692e-01,\n                                                2.68044343118817e-01,  2.62750176367177e-01,  2.58072912194535e-01, 2.53975244007719e-01,\n                                                2.50417649860566e-01,  2.47359047997705e-01,  2.44757393304226e-01, 2.42570227127857e-01,\n                                                2.40755192285363e-01,  2.39270522706065e-01,  2.38075513573420e-01, 2.37130973509608e-01,\n                                                2.36399655826645e-01,  2.35846661634682e-01,  2.35439804101048e-01, 2.35149920745627e-01,\n                                                2.34951119588942e-01,  2.34820945348218e-01,  2.34740453674590e-01, 2.34694184474932e-01,\n                                                2.34670029384333e-01,  2.34658993089610e-01,  2.34654853053627e-01, 2.34653726869027e-01,\n                                                2.34653560646734e-01,  2.34653544194444e-01,  2.34653201679407e-01, 2.34650881097679e-01,\n                                                2.34642350515301e-01,  2.34619612048277e-01,  2.34569854206725e-01, 2.34474580141082e-01,\n                                                2.34308954549448e-01,  2.34041412084594e-01,  2.33633569775463e-01, 2.33040484258083e-01,\n                                                2.32211290236549e-01,  2.31090248232988e-01,  2.29618216146449e-01, 2.27734539627960e-01,\n                                                2.25379330661056e-01,  2.22496072753387e-01,  2.19034456559072e-01, 2.14953314367776e-01,\n                                                2.10223489439500e-01,  2.04830450994066e-01,  1.98776452362182e-01, 1.92082032639618e-01,\n                                                1.84786684498746e-01,  1.76948554331375e-01,  1.68643105037177e-01, 1.59960752948919e-01,\n                                                1.51003581623698e-01,  1.41881326296087e-01,  1.32706901214803e-01, 1.23591795195040e-01,\n                                                1.14641678346700e-01,  1.05952540185086e-01,  9.76076183335550e-02, 8.96752870117581e-02,\n                                                8.22079699286320e-02,  7.52420394442481e-02,  6.87985776016120e-02, 6.28848149082728e-02,\n                                                5.74960335895867e-02,  5.26177216993062e-02,  4.82277869664784e-02, 4.42986764453792e-02,\n                                                4.07992916550199e-02,  3.76966320125973e-02,  3.49571371289841e-02, 3.25477282993347e-02,\n                                                3.04365705326290e-02,  2.85935893228384e-02,  2.69907824746838e-02, 2.56023683538018e-02,\n                                                2.44048096002274e-02,  2.33767470321595e-02,  2.24988732679066e-02, 2.17537702559838e-02,\n                                                2.11257298985288e-02,  2.06005725063108e-02,  2.01654740056938e-02, 1.98088095862659e-02,\n                                                1.95200187441600e-02,  1.92894943350979e-02,  1.91084962205537e-02, 1.89690883150320e-02,\n                                                1.88640963099402e-02,  1.87870820833638e-02,  1.87323298542879e-02, 1.86948385615864e-02,\n                                                1.86703147916916e-02,  1.86551608618402e-02,  1.86464533706783e-02, 1.86419085845273e-02,\n                                                1.86398323330366e-02,  1.86390535077550e-02,  1.86388416529724e-02, 1.86388103838055e-02,\n                                                1.86388071582684e-02,  1.86387386877271e-02,  1.86382747955633e-02, 1.86365695672777e-02,\n                                                1.86320247329235e-02,  1.86220819151259e-02,  1.86030534089667e-02, 1.85700038833971e-02,\n                                                1.85166975328315e-02,  1.84356272555419e-02,  1.83181435643860e-02, 1.81547000822349e-02,\n                                                1.79352284660297e-02,  1.76496473938244e-02,  1.72884972395053e-02, 1.68436744957319e-02,\n                                                1.63092193247962e-02,  1.56820886731168e-02,  1.49628303181828e-02, 1.41560649025365e-02,\n                                                1.32706880035869e-02,  1.23197254393119e-02,  1.13198120812257e-02, 1.02903132604126e-02,\n                                                9.25216044865351e-03,  8.22651898548088e-03,  7.23343507416985e-03, 6.29061495908445e-03,\n                                                5.41246915982185e-03,  4.60951269577947e-03,  3.88815697081668e-03, 3.25087152776860e-03,\n                                                2.69664540113013e-03,  2.22164722127616e-03,  1.81997517788091e-03, 1.48440112539561e-03,\n                                                1.20704003496996e-03,  9.79905624660660e-04,  7.95336025149140e-04, 6.46287164798309e-04,\n                                                5.26500604607349e-04,  4.30562602389273e-04,  3.53882530234273e-04, 2.92625192685136e-04,\n                                                2.43627016274672e-04,  2.04312183427646e-04,  1.72611026940217e-04, 1.46878199487332e-04,\n                                                1.25812361389421e-04,  1.08384650147286e-04,  9.37828916960370e-05, 8.13723842441050e-05,\n                                                7.06677610224915e-05,  6.13088132723760e-05,  5.30362296302656e-05, 4.56674352591335e-05,\n                                                3.90749184475681e-05,  3.31690409467456e-05,  2.78856949051942e-05, 2.31778283961148e-05,\n                                                1.90094630312387e-05,  1.53511594334077e-05,  1.21764358880228e-05, 9.45902868920712e-06,\n                                                7.17100947156268e-06,  5.28172823521800e-06,  3.75745948133499e-06, 2.56157169076232e-06,\n                                                1.65503809057554e-06,  9.97145093606377e-07,  5.46305443549500e-07, -4.26325641456060e-14,\n                                                -5.68434188608080e-14, -5.68434188608080e-14, -5.68434188608080e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.03000000000000e+02, 1.02999999471644e+02, 1.02999983133816e+02, 1.02999872442293e+02, 1.02999465523486e+02,\n                                                1.02998380788496e+02, 1.02996006675532e+02, 1.02991459211809e+02, 1.02983548784758e+02, 1.02970757160298e+02,\n                                                1.02951225424838e+02, 1.02922753223393e+02, 1.02882809505136e+02, 1.02828555062213e+02, 1.02756877520524e+02,\n                                                1.02664440093216e+02, 1.02547746175426e+02, 1.02403222393969e+02, 1.02227322514497e+02, 1.02016653093913e+02,\n                                                1.01768118580326e+02, 1.01479078825286e+02, 1.01147506521371e+02, 1.00772127473239e+02, 1.00352524781401e+02,\n                                                9.98891905657717e+01, 9.93835162378941e+01, 9.88377233084016e+01, 9.82547484329101e+01, 9.76381052027499e+01,\n                                                9.69917479473089e+01, 9.63199581947605e+01, 9.56272635601309e+01, 9.49183850889309e+01, 9.41981972414523e+01,\n                                                9.34716795411311e+01, 9.27438435173507e+01, 9.20196322153222e+01, 9.13038061445508e+01, 9.06008394303979e+01,\n                                                8.99148463527620e+01, 8.92495440165575e+01, 8.86082420889502e+01, 8.79938444063537e+01, 8.74088505576986e+01,\n                                                8.68553528464564e+01, 8.63350299289733e+01, 8.58491409185531e+01, 8.53985235491122e+01, 8.49835986159390e+01,\n                                                8.46043814707271e+01, 8.42605003323722e+01, 8.39512206437048e+01, 8.36754745317101e+01, 8.34318944574811e+01,\n                                                8.32188502482160e+01, 8.30344888102035e+01, 8.28767758913864e+01, 8.27435392836038e+01, 8.26325128321154e+01,\n                                                8.25413805653103e+01, 8.24678201854864e+01, 8.24095450876676e+01, 8.23643440121819e+01, 8.23301174009903e+01,\n                                                8.23049095279606e+01, 8.22869355168003e+01, 8.22746024510095e+01, 8.22665239178745e+01, 8.22615275091084e+01,\n                                                8.22586550164781e+01, 8.22571553008633e+01, 8.22564700648523e+01, 8.22562130085915e+01, 8.22561430830016e+01,\n                                                8.22561327621290e+01, 8.22561313493472e+01, 8.22560979842241e+01, 8.22558719309903e+01, 8.22550409411436e+01,\n                                                8.22528258715059e+01, 8.22479784700276e+01, 8.22386959754496e+01, 8.22225563272569e+01, 8.21964775776754e+01,\n                                                8.21567048367459e+01, 8.20988277067762e+01, 8.20178305990907e+01, 8.19081774936533e+01, 8.17639315299017e+01,\n                                                8.15789082614412e+01, 8.13468594701252e+01, 8.10616821797528e+01, 8.07176450711689e+01, 8.03096220927514e+01,\n                                                7.98333209832867e+01, 7.92854930740601e+01, 7.86641105977293e+01, 7.79684992976084e+01, 7.71994176867782e+01,\n                                                7.63590795482306e+01, 7.54511219312257e+01, 7.44805248093839e+01, 7.34534886126705e+01, 7.23772719711337e+01,\n                                                7.12599880606509e+01, 7.01103607265278e+01, 6.89374549113667e+01, 6.77504130449245e+01, 6.65582337519572e+01,\n                                                6.53696114890894e+01, 6.41928263650460e+01, 6.30356556812088e+01, 6.19052842723716e+01, 6.08082101486384e+01,\n                                                5.97501582108687e+01, 5.87360189023378e+01, 5.77698224071723e+01, 5.68547490912661e+01, 5.59931689280562e+01,\n                                                5.51866990427994e+01, 5.44362689192651e+01, 5.37421856150297e+01, 5.31041947897585e+01, 5.25215362629508e+01,\n                                                5.19929946676436e+01, 5.15169465773988e+01, 5.10914055620074e+01, 5.07140663343659e+01, 5.03823487652673e+01,\n                                                5.00934422149331e+01, 4.98443504018602e+01, 4.96319368787950e+01, 4.94529710685269e+01, 4.93041746904468e+01,\n                                                4.91822682614376e+01, 4.90840171789300e+01, 4.90062767012350e+01, 4.89460349505009e+01, 4.89004529002201e+01,\n                                                4.88669001948684e+01, 4.88429856029558e+01, 4.88265809393460e+01, 4.88158374134637e+01, 4.88091935639708e+01,\n                                                4.88053742166772e+01, 4.88033802330650e+01, 4.88024691791554e+01, 4.88021274135925e+01, 4.88020344452816e+01,\n                                                4.88020207233612e+01, 4.88020194207728e+01, 4.88019928640901e+01, 4.88018129390014e+01, 4.88011515204995e+01,\n                                                4.87993884612250e+01, 4.87955302501173e+01, 4.87881420843772e+01, 4.87752964114966e+01, 4.87545408553941e+01,\n                                                4.87228882551370e+01, 4.86768312666266e+01, 4.86123835435562e+01, 4.85251488562479e+01, 4.84104185670683e+01,\n                                                4.82632966253470e+01, 4.80788496806833e+01, 4.78522781033055e+01, 4.75791017655176e+01, 4.72553525538183e+01,\n                                                4.68777639543248e+01, 4.64439468983273e+01, 4.59525405734314e+01, 4.54033273039189e+01, 4.47973021266969e+01,\n                                                4.41366906238354e+01, 4.34249130858570e+01, 4.26664988004710e+01, 4.18669598102456e+01, 4.10326365771171e+01,\n                                                4.01705267048659e+01, 3.92881025461045e+01, 3.83931175081264e+01, 3.74933986701155e+01, 3.65966272361754e+01,\n                                                3.57101166044174e+01, 3.48406058020964e+01, 3.39940892783069e+01, 3.31757007279795e+01, 3.23896599961774e+01,\n                                                3.16392813667786e+01, 3.09270321082852e+01, 3.02546243999646e+01, 2.96231224565617e+01, 2.90330491437006e+01,\n                                                2.84844811286889e+01, 2.79771269792721e+01, 2.75103872839095e+01, 2.70833990812594e+01, 2.66950684940300e+01,\n                                                2.63440957270836e+01, 2.60289959849840e+01, 2.57481188788614e+01, 2.54996679026418e+01, 2.52817207775170e+01,\n                                                2.50922509548510e+01, 2.49291502952286e+01, 2.47902528241172e+01, 2.46733594198961e+01, 2.45762632563048e+01,\n                                                2.44967757648983e+01, 2.44327527940257e+01, 2.43821205258446e+01, 2.43429005877098e+01, 2.43132336781049e+01,\n                                                2.42914009388398e+01, 2.42758422601690e+01, 2.42651707148268e+01, 2.42581823860194e+01, 2.42538609823267e+01,\n                                                2.42513768123898e+01, 2.42500799121575e+01, 2.42494873615089e+01, 2.42492650775326e+01, 2.42492046111118e+01,\n                                                2.42491956864024e+01, 2.42491948921671e+01, 2.42491792575504e+01, 2.42490733309488e+01, 2.42486839369434e+01,\n                                                2.42476459815123e+01, 2.42453745734700e+01, 2.42410250611929e+01, 2.42334628053744e+01, 2.42212444363474e+01,\n                                                2.42026122472692e+01, 2.41755032197788e+01, 2.41375739252393e+01, 2.40862421481157e+01, 2.40187455000158e+01,\n                                                2.39322165113164e+01, 2.38237727071269e+01, 2.36906190360837e+01, 2.35301588026447e+01, 2.33401080661918e+01,\n                                                2.31186074393457e+01, 2.28643244664587e+01, 2.25765394030492e+01, 2.22552073684961e+01, 2.19009906895656e+01,\n                                                2.15152570809735e+01, 2.11000424530663e+01, 2.06579816670334e+01, 2.01922157739021e+01, 1.97062883808084e+01,\n                                                1.92040444330868e+01, 1.86895405560170e+01, 1.81669684507272e+01, 1.76405854338048e+01, 1.71146429462279e+01,\n                                                1.65933061360089e+01, 1.60805636646124e+01, 1.55801333158567e+01, 1.50953729783367e+01, 1.46292070546952e+01,\n                                                1.41840758815979e+01, 1.37619117217094e+01, 1.33641407571491e+01, 1.29917072871244e+01, 1.26451144608120e+01,\n                                                1.23244753370115e+01, 1.20295685448881e+01, 1.17598939144627e+01, 1.15147247732893e+01, 1.12931548902069e+01,\n                                                1.10941391276421e+01, 1.09165276782227e+01, 1.07590943135528e+01, 1.06205594025537e+01, 1.04996086153557e+01,\n                                                1.03949082652561e+01, 1.03051181953726e+01, 1.02289030172183e+01, 1.01649423752428e+01, 1.01119407575978e+01,\n                                                1.00686372082939e+01, 1.00338151270891e+01, 1.00063121781636e+01, 9.98503017465083e+00, 9.96894467163271e+00,\n                                                9.95711389354432e+00, 9.94868655050794e+00, 9.94290806748445e+00, 9.93912476303349e+00, 9.93678557008424e+00,\n                                                9.93544098482428e+00, 9.93473905349336e+00, 9.93441834973495e+00, 9.93429804502324e+00, 9.93426531944556e+00,\n                                                9.93426048922684e+00, 9.93426006221074e+00, 9.93425168825060e+00, 9.93419495363663e+00, 9.93398639416004e+00,\n                                                9.93343047395030e+00, 9.93221397176526e+00, 9.92988466744229e+00, 9.92583537325126e+00, 9.91929435568429e+00,\n                                                9.90932318255996e+00, 9.89482298200400e+00, 9.87454998052456e+00, 9.84714096099621e+00, 9.81114891558026e+00,\n                                                9.76508864276835e+00, 9.70749135148215e+00, 9.63696651653190e+00, 9.55226834068908e+00, 9.45236331575592e+00,\n                                                9.33649466324557e+00, 9.20423901304049e+00, 9.05555067432823e+00, 8.89078935698407e+00, 8.71072823486536e+00,\n                                                8.51654073730332e+00, 8.30976625064672e+00, 8.09225677534150e+00, 7.86610825589985e+00, 7.63358155198104e+00,\n                                                7.39701870104095e+00, 7.15876019497991e+00, 6.92106850826728e+00, 6.68606218507618e+00, 6.45566355104724e+00,\n                                                6.23156169846536e+00, 6.01519094767265e+00, 5.80772367292376e+00, 5.61007535654498e+00, 5.42291911791963e+00,\n                                                5.24670678680990e+00, 5.08169379183444e+00, 4.92796558479117e+00, 4.78546387296676e+00, 4.65401146602954e+00,\n                                                4.53333499331602e+00, 4.42308509049262e+00, 4.32285390147119e+00, 4.23218991402062e+00, 4.15061026727733e+00,\n                                                4.07761075204193e+00, 4.01267377994859e+00, 3.95527463067614e+00, 3.90488630057104e+00, 3.86098327387189e+00,\n                                                3.82304452155473e+00, 3.79055600501732e+00, 3.76301292464242e+00, 3.73992190876876e+00, 3.72080328862144e+00,\n                                                3.70519355113878e+00, 3.69264800633023e+00, 3.68274365107246e+00, 3.67508215971489e+00, 3.66929288646264e+00,\n                                                3.66503572827750e+00, 3.66200367282444e+00, 3.65992484601870e+00, 3.65856387923553e+00, 3.65772243717061e+00,\n                                                3.65723878219714e+00, 3.65698629700766e+00, 3.65687094044247e+00, 3.65682766718348e+00, 3.65681589589947e+00,\n                                                3.65681415848593e+00, 3.65681400251512e+00, 3.65681091700377e+00, 3.65679001229526e+00, 3.65671316564693e+00,\n                                                3.65650833046283e+00, 3.65606010322365e+00, 3.65520188427232e+00, 3.65371002811435e+00, 3.65130038509314e+00,\n                                                3.64762763820872e+00, 3.64228782503177e+00, 3.63482439050728e+00, 3.62473802610872e+00, 3.61150040014016e+00,\n                                                3.59457166427161e+00, 3.57342133351990e+00, 3.54755179517034e+00, 3.51652333670265e+00, 3.47997923917852e+00,\n                                                3.43766921752466e+00, 3.38946936229513e+00, 3.33539679949860e+00, 3.27561756477705e+00, 3.21044668172593e+00,\n                                                3.14034009932132e+00, 3.06587890231636e+00, 2.98774695816577e+00, 2.90670379430721e+00, 2.82355491379811e+00,\n                                                2.73912189186119e+00, 2.65421443436510e+00, 2.56960615696416e+00, 2.48601524142555e+00, 2.40409045351707e+00,\n                                                2.32440238018830e+00, 2.24743925884647e+00, 2.17360648562418e+00, 2.10322881201365e+00, 2.03655433499934e+00,\n                                                1.97375958962817e+00, 1.91495528973489e+00, 1.86019246744871e+00, 1.80946889497261e+00, 1.76273572289944e+00,\n                                                1.71990425421865e+00, 1.68085272389521e+00, 1.64543290448695e+00, 1.61347633399353e+00, 1.58479997391949e+00,\n                                                1.55921115033327e+00, 1.53651169624558e+00, 1.51650128461662e+00, 1.49898000454449e+00, 1.48375028035693e+00,\n                                                1.47061826133552e+00, 1.45939481964054e+00, 1.44989628901870e+00, 1.44194506121826e+00, 1.43537013461766e+00,\n                                                1.43000768359798e+00, 1.42570169006572e+00, 1.42230465204538e+00, 1.41967835979338e+00, 1.41769470859555e+00,\n                                                1.41623650034273e+00, 1.41519817403987e+00, 1.41448639928838e+00, 1.41402046684928e+00, 1.41373241655197e+00,\n                                                1.41356685445740e+00, 1.41348042720968e+00, 1.41344094041750e+00, 1.41342612796801e+00, 1.41342209866121e+00,\n                                                1.41342150394540e+00, 1.41342144912322e+00, 1.41342034862966e+00, 1.41341289266188e+00, 1.41338548430606e+00,\n                                                1.41331242807340e+00, 1.41315256852340e+00, 1.41284650351922e+00, 1.41231452028427e+00, 1.41145540862655e+00,\n                                                1.41014631052398e+00, 1.40824376370203e+00, 1.40558608245551e+00, 1.40199718475971e+00, 1.39729191426854e+00,\n                                                1.39128281487480e+00, 1.38378819377026e+00, 1.37464116166024e+00, 1.36369917803275e+00, 1.35085347438569e+00,\n                                                1.33603760448504e+00, 1.31923430710259e+00, 1.30047989172260e+00, 1.27986549349203e+00, 1.25753479886292e+00,\n                                                1.23367820566888e+00, 1.20852381149469e+00, 1.18232605453819e+00, 1.15535317376145e+00, 1.12787482188681e+00,\n                                                1.10015109736794e+00, 1.07242395975631e+00, 1.04491152604849e+00, 1.01780523416635e+00, 9.91269432947362e-01,\n                                                9.65442706559912e-01, 9.40440189219970e-01, 9.16356234460608e-01, 8.93266997833109e-01, 8.71232697798050e-01,\n                                                8.50299484920058e-01, 8.30500953169832e-01, 8.11859372778727e-01, 7.94386728533780e-01, 7.78085630123570e-01,\n                                                7.62950137731352e-01, 7.48966525928211e-01, 7.36113995837101e-01, 7.24365339517760e-01, 7.13687559672238e-01,\n                                                7.04042449768593e-01, 6.95387142573381e-01, 6.87674637589410e-01, 6.80854319359113e-01, 6.74872478810258e-01,\n                                                6.69672848839568e-01, 6.65197163316094e-01, 6.61385745832604e-01, 6.58178131030212e-01, 6.55513717345087e-01,\n                                                6.53332445760697e-01, 6.51575494794358e-01, 6.50185977740819e-01, 6.49109624410841e-01, 6.48295426537459e-01,\n                                                6.47696223974293e-01, 6.47269208042985e-01, 6.46976319093497e-01, 6.46784517606818e-01, 6.46665911949356e-01,\n                                                6.46597731000767e-01, 6.46562136003851e-01, 6.46545872721646e-01, 6.46539771862223e-01, 6.46538112286137e-01,\n                                                6.46537867336363e-01, 6.46537843992917e-01, 6.46537367116892e-01, 6.46534136219586e-01, 6.46522259218727e-01,\n                                                6.46490600412662e-01, 6.46421320545144e-01, 6.46288659143863e-01, 6.46058015628171e-01, 6.45685383995499e-01,\n                                                6.45117193406591e-01, 6.44290602516477e-01, 6.43134287407278e-01, 6.41569749824114e-01, 6.39513152639964e-01,\n                                                6.36877662259408e-01, 6.33576243303224e-01, 6.29524811216029e-01, 6.24645607017740e-01, 6.18870620558411e-01,\n                                                6.12144860728975e-01, 6.04429259554450e-01, 5.95703007005511e-01, 5.85965146900293e-01, 5.75235319669844e-01,\n                                                5.63553608963218e-01, 5.50979526381198e-01, 5.37590240424834e-01, 5.23478210836572e-01, 5.08748419714095e-01,\n                                                4.93515392940296e-01, 4.77900182380893e-01, 4.62027439032639e-01, 4.46022661041027e-01, 4.30009659448174e-01,\n                                                4.14108256799935e-01, 3.98432222374311e-01, 3.83087450477944e-01, 3.68170398793325e-01, 3.53766814579529e-01,\n                                                3.39950781299478e-01, 3.26784113607602e-01, 3.14316114705974e-01, 3.02583689787156e-01, 2.91611787004314e-01,\n                                                2.81414117519617e-01, 2.71994091966292e-01, 2.63345903784440e-01, 2.55455690417563e-01, 2.48302710123610e-01,\n                                                2.41860483296833e-01, 2.36097860663051e-01, 2.30979994632321e-01, 2.26469202996427e-01, 2.22525725048740e-01,\n                                                2.19108378527764e-01, 2.16175131352841e-01, 2.13683605014992e-01, 2.11591526966615e-01, 2.09857147795091e-01,\n                                                2.08439635810237e-01, 2.07299457401490e-01, 2.06398746625496e-01, 2.05701662464705e-01, 2.05174727527776e-01,\n                                                2.04787138071111e-01, 2.04511032459607e-01, 2.04321703800332e-01, 2.04197742593706e-01, 2.04121096825489e-01,\n                                                2.04077039811679e-01, 2.04054040021447e-01, 2.04043531670607e-01, 2.04039589697132e-01, 2.04038517391552e-01,\n                                                2.04038359121725e-01, 2.04038343456574e-01, 2.04038017328315e-01, 2.04035807770538e-01, 2.04027685340876e-01,\n                                                2.04006034988566e-01, 2.03958659116239e-01, 2.03867949321918e-01, 2.03710268901560e-01, 2.03455589033211e-01,\n                                                2.03067422049415e-01, 2.02503094185516e-01, 2.01714396235730e-01, 2.00648642106444e-01, 1.99250150947876e-01,\n                                                1.97462147437193e-01, 1.95229046739954e-01, 1.92499056608867e-01, 1.89226991165427e-01, 1.85377152620291e-01,\n                                                1.80926103104014e-01, 1.75865124206666e-01, 1.70202152164151e-01, 1.63962986582860e-01, 1.57191603290798e-01,\n                                                1.49949457987162e-01, 1.42313744261429e-01, 1.34374661011691e-01, 1.26231840492366e-01, 1.17990176665032e-01,\n                                                1.09755360853839e-01, 1.01629466254352e-01, 9.37069174131437e-02, 8.60711347873035e-02, 7.87920646180709e-02,\n                                                7.19247034452479e-02, 6.55086208072220e-02, 5.95683888849692e-02, 5.41147563271522e-02, 4.91463618373160e-02,\n                                                4.46517718236237e-02, 4.06116409723722e-02, 3.70008273995381e-02, 3.37903365014967e-02, 3.09490120317264e-02,\n                                                2.84449334378110e-02, 2.62465115509229e-02, 2.43232988892572e-02, 2.26465463051682e-02, 2.11895456970268e-02,\n                                                1.99278007258528e-02, 1.88390657009165e-02, 1.79032886074708e-02, 1.71024889000932e-02, 1.64205950727165e-02,\n                                                1.58432617181745e-02, 1.53576811073179e-02, 1.49524003635264e-02, 1.46171520646448e-02, 1.43427034743269e-02,\n                                                1.41207274682529e-02, 1.39436964556552e-02, 1.38047991013934e-02, 1.36978783682054e-02, 1.36173882939943e-02,\n                                                1.35583660082403e-02, 1.35164148083362e-02, 1.34876937088961e-02, 1.34689087855975e-02, 1.34573018806208e-02,\n                                                1.34506328069222e-02, 1.34471520351553e-02, 1.34455618896396e-02, 1.34449654112530e-02, 1.34448031584355e-02,\n                                                1.34447792104311e-02, 1.34447767400729e-02, 1.34447243005411e-02, 1.34443690196804e-02, 1.34430630423878e-02,\n                                                1.34395823452707e-02, 1.34319677594732e-02, 1.34173957738568e-02, 1.33920889108623e-02, 1.33512772742392e-02,\n                                                1.32892245876093e-02, 1.31993329947306e-02, 1.30743401748674e-02, 1.29066189597324e-02, 1.26885827480123e-02,\n                                                1.24131891235635e-02, 1.20745194506497e-02, 1.16683951475665e-02, 1.11929743405170e-02, 1.06492592637011e-02,\n                                                1.00414392322108e-02, 9.37699998630137e-03, 8.66654978590020e-03, 7.92334513496940e-03, 7.16254037544672e-03,\n                                                6.40022844176258e-03, 5.65237592664403e-03, 4.93377586589361e-03, 4.25714079206330e-03, 3.63243588169837e-03,\n                                                3.06651201519514e-03, 2.56305023873438e-03, 2.12278336213956e-03, 1.74392691502590e-03, 1.42273587431418e-03,\n                                                1.15410521475212e-03, 9.32146245531840e-04, 7.50689819838612e-04, 6.03686499090372e-04, 4.85490845647973e-04,\n                                                3.91032684461834e-04, 3.15892080763547e-04, 2.56304179444555e-04, 2.09121687802849e-04, 1.71756545455537e-04,\n                                                1.42112654856419e-04, 1.18514513417267e-04, 9.96350246964539e-05, 8.44274313180904e-05, 7.20669345923852e-05,\n                                                6.19051411376859e-05, 5.34364213535810e-05, 4.62723917280528e-05, 4.01205792286419e-05, 3.47651617289557e-05,\n                                                3.00496175356102e-05, 2.58619310642416e-05, 2.21227550269987e-05, 1.87763326522372e-05, 1.57836065000083e-05,\n                                                1.31169094288452e-05, 1.07558124824436e-05, 8.68390084463044e-06, 6.88636680479249e-06, 5.34834067877910e-06,\n                                                4.05386190038826e-06, 2.98536855325438e-06, 2.12357110740413e-06, 1.44758804765388e-06, 9.35243619437642e-07,\n                                                5.63459124691690e-07, 8.52651282912120e-14, 8.52651282912120e-14, 8.52651282912120e-14, 8.52651282912120e-14,\n                                                5.68434188608080e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.04000000000000e+02, 1.03999999464438e+02, 1.03999982903792e+02, 1.03999870702639e+02, 1.03999458234183e+02,\n                                                1.03998358705208e+02, 1.03995952212628e+02, 1.03991342725302e+02, 1.03983324398986e+02, 1.03970358275158e+02,\n                                                1.03950560048718e+02, 1.03921699282618e+02, 1.03881210287903e+02, 1.03826214969743e+02, 1.03753558327750e+02,\n                                                1.03659857970860e+02, 1.03541569793578e+02, 1.03395072500833e+02, 1.03216773433845e+02, 1.03003236567840e+02,\n                                                1.02751330253732e+02, 1.02458387395645e+02, 1.02122365174128e+02, 1.01741986762091e+02, 1.01316845723427e+02,\n                                                1.00847456558277e+02, 1.00335242586524e+02, 9.97824637056250e+01, 9.91920985261751e+01, 9.85677042030661e+01,\n                                                9.79132797585816e+01, 9.72331535487253e+01, 9.65319040286805e+01, 9.58143087411465e+01, 9.50853044834361e+01,\n                                                9.43499368835200e+01, 9.36132832298250e+01, 9.28803472504258e+01, 9.21559417667001e+01, 9.14445844081262e+01,\n                                                9.07504263372869e+01, 9.00772180498679e+01, 8.94283013529834e+01, 8.88066114852997e+01, 8.82146777752034e+01,\n                                                8.76546190572405e+01, 8.71281358733309e+01, 8.66365036279503e+01, 8.61805703578715e+01, 8.57607612290678e+01,\n                                                8.53770903833078e+01, 8.50291797591613e+01, 8.47162840220435e+01, 8.44373206055452e+01, 8.41909039249203e+01,\n                                                8.39753829482120e+01, 8.37888814265162e+01, 8.36293401577265e+01, 8.34945606791424e+01, 8.33822497595199e+01,\n                                                8.32900640034513e+01, 8.32156538059364e+01, 8.31567058184386e+01, 8.31109830243574e+01, 8.30763614846335e+01,\n                                                8.30508628136145e+01, 8.30326814887491e+01, 8.30202061889634e+01, 8.30120344955515e+01, 8.30069804719423e+01,\n                                                8.30040748568811e+01, 8.30025578484832e+01, 8.30018647112821e+01, 8.30016046910163e+01, 8.30015339591455e+01,\n                                                8.30015235192676e+01, 8.30015220901957e+01, 8.30014883403544e+01, 8.30012596806056e+01, 8.30004191090393e+01,\n                                                8.29981784988639e+01, 8.29932752066463e+01, 8.29838856903350e+01, 8.29675599796149e+01, 8.29411806354191e+01,\n                                                8.29009495730248e+01, 8.28424057451073e+01, 8.27604761114113e+01, 8.26495614784747e+01, 8.25036576036320e+01,\n                                                8.23165103775439e+01, 8.20818019303540e+01, 8.17933622126789e+01, 8.14453981231060e+01, 8.10327298108876e+01,\n                                                8.05510216899084e+01, 7.99969943705811e+01, 7.93686036466463e+01, 7.86651743513854e+01, 7.78874805624941e+01,\n                                                7.70377688940735e+01, 7.61197270988863e+01, 7.51384037046237e+01, 7.41000839874995e+01, 7.30121236513583e+01,\n                                                7.18827385399578e+01, 7.07207533801135e+01, 6.95353275025883e+01, 6.83356918789239e+01, 6.71309329343842e+01,\n                                                6.59298372097056e+01, 6.47407815089300e+01, 6.35716390788209e+01, 6.24296817712048e+01, 6.13214787187665e+01,\n                                                6.02528068543975e+01, 5.92285904202041e+01, 5.82528787662182e+01, 5.73288613313231e+01, 5.64589110744132e+01,\n                                                5.56446446980757e+01, 5.48869890823439e+01, 5.41862465964748e+01, 5.35421555994096e+01, 5.29539453235824e+01,\n                                                5.24203860386556e+01, 5.19398360245683e+01, 5.15102868155123e+01, 5.11294077966477e+01, 5.07945908202047e+01,\n                                                5.05029951902389e+01, 5.02515931667654e+01, 5.00372160216895e+01, 4.98566005876859e+01, 4.97064361355680e+01,\n                                                4.95834112755124e+01, 4.94842604025027e+01, 4.94058090105383e+01, 4.93450170055965e+01, 4.92990189788795e+01,\n                                                4.92651602831711e+01, 4.92410277055978e+01, 4.92244735628309e+01, 4.92136321651090e+01, 4.92069278003425e+01,\n                                                4.92030736678267e+01, 4.92010615246591e+01, 4.92001421738333e+01, 4.91997972958650e+01, 4.91997034809094e+01,\n                                                4.91996896340262e+01, 4.91996883195754e+01, 4.91996615210463e+01, 4.91994799574189e+01, 4.91988125155664e+01,\n                                                4.91970334009510e+01, 4.91931400566760e+01, 4.91856846203371e+01, 4.91727220059485e+01, 4.91517775557741e+01,\n                                                4.91198370213502e+01, 4.90733613539839e+01, 4.90083283481737e+01, 4.89203025181008e+01, 4.88045336379431e+01,\n                                                4.86560831065824e+01, 4.84699757128955e+01, 4.82413725403266e+01, 4.79657587800244e+01, 4.76391382959347e+01,\n                                                4.72582251149846e+01, 4.68206208274987e+01, 4.63249664060061e+01, 4.57710574263953e+01, 4.51599133788875e+01,\n                                                4.44937949544202e+01, 4.37761679262077e+01, 4.30116179132369e+01, 4.22057253303091e+01, 4.13649120026673e+01,\n                                                4.04962688555230e+01, 3.96073688370926e+01, 3.87060644414417e+01, 3.78002688519286e+01, 3.68977251183546e+01,\n                                                3.60057763527502e+01, 3.51311569590523e+01, 3.42798264746308e+01, 3.34568625807918e+01, 3.26664200438027e+01,\n                                                3.19117512100262e+01, 3.11952745843732e+01, 3.05186730992445e+01, 2.98830033843096e+01, 2.92888007320767e+01,\n                                                2.87361698361885e+01, 2.82248570243480e+01, 2.77543043206328e+01, 2.73236886041233e+01, 2.69319503414247e+01,\n                                                2.65778162372176e+01, 2.62598192268606e+01, 2.59763180593243e+01, 2.57255176641374e+01, 2.55054907462250e+01,\n                                                2.53142006289913e+01, 2.51495251930257e+01, 2.50092817275586e+01, 2.48912525291337e+01, 2.47932110843820e+01,\n                                                2.47129486327373e+01, 2.46483008177703e+01, 2.45971740155634e+01, 2.45575707955136e+01, 2.45276138450096e+01,\n                                                2.45055675945802e+01, 2.44898567304688e+01, 2.44790807881389e+01, 2.44720240880270e+01, 2.44676604028109e+01,\n                                                2.44651519263880e+01, 2.44638423363261e+01, 2.44632439876688e+01, 2.44630195286721e+01, 2.44629584705943e+01,\n                                                2.44629494585575e+01, 2.44629486565507e+01, 2.44629328689510e+01, 2.44628259058684e+01, 2.44624327016732e+01,\n                                                2.44613845898563e+01, 2.44590909557327e+01, 2.44546988813850e+01, 2.44470626208576e+01, 2.44347246704576e+01,\n                                                2.44159101006955e+01, 2.43885356604138e+01, 2.43502349084713e+01, 2.42984002294857e+01, 2.42302420086706e+01,\n                                                2.41428644535528e+01, 2.40333565603154e+01, 2.38988955669817e+01, 2.37368589891162e+01, 2.35449401031794e+01,\n                                                2.33212606563540e+01, 2.30644737775362e+01, 2.27738496907132e+01, 2.24493370712658e+01, 2.20915939886922e+01,\n                                                2.17019846547421e+01, 2.12825418524164e+01, 2.08358996999982e+01, 2.03652061674710e+01, 1.98740275189577e+01,\n                                                1.93662556954854e+01, 1.88460243160490e+01, 1.83176317276908e+01, 1.77854641464247e+01, 1.72539112307571e+01,\n                                                1.67272704825356e+01, 1.62096432232641e+01, 1.57048303850933e+01, 1.52162388632081e+01, 1.47468082791724e+01,\n                                                1.42989646160552e+01, 1.38746027728076e+01, 1.34750959894971e+01, 1.31013271679746e+01, 1.27537356482651e+01,\n                                                1.24323728592275e+01, 1.21369610638027e+01, 1.18669507270277e+01, 1.16215734746725e+01, 1.13998889260538e+01,\n                                                1.12008247426470e+01, 1.10232099973409e+01, 1.08658024612468e+01, 1.07273106781691e+01, 1.06064118091540e+01,\n                                                1.05017662316887e+01, 1.04120298088876e+01, 1.03358646301932e+01, 1.02719488841815e+01, 1.02189863670951e+01,\n                                                1.01757159653926e+01, 1.01409212832038e+01, 1.01134404225579e+01, 1.00921757727520e+01, 1.00761035331540e+01,\n                                                1.00642825891568e+01, 1.00558622912710e+01, 1.00500886580196e+01, 1.00463085371387e+01, 1.00439713158423e+01,\n                                                1.00426278650303e+01, 1.00419265262562e+01, 1.00416060933041e+01, 1.00414858901912e+01, 1.00414531922518e+01,\n                                                1.00414483661125e+01, 1.00414479394570e+01, 1.00414395725693e+01, 1.00413828858724e+01, 1.00411745025542e+01,\n                                                1.00406190519953e+01, 1.00394035780199e+01, 1.00370762443331e+01, 1.00330303817354e+01, 1.00264949228721e+01,\n                                                1.00165322598996e+01, 1.00020445121537e+01, 9.98178907103345e+00, 9.95440406154299e+00, 9.91844399170448e+00,\n                                                9.87242533166970e+00, 9.81488107387023e+00, 9.74442250297703e+00, 9.65980551337607e+00, 9.55999795093328e+00,\n                                                9.44424375181298e+00, 9.31211924324015e+00, 9.16357698673011e+00, 8.99897306922536e+00, 8.81907479693052e+00,\n                                                8.62504724558809e+00, 8.41841890423936e+00, 8.20102848567265e+00, 7.97495661434060e+00, 7.74244732569782e+00,\n                                                7.50582498420695e+00, 7.26741231196625e+00, 7.02945475834603e+00, 6.79405552381679e+00, 6.56312429227151e+00,\n                                                6.33834126052612e+00, 6.12113654784399e+00, 5.91268371664466e+00, 5.71390512357692e+00, 5.52548626690596e+00,\n                                                5.34789621165268e+00, 5.18141146139989e+00, 5.02614114801619e+00, 4.88205197164127e+00, 4.74899183261506e+00,\n                                                4.62671150304558e+00, 4.51488398369413e+00, 4.41312140192710e+00, 4.32098945441373e+00, 4.23801950477733e+00,\n                                                4.16371852432303e+00, 4.09757711965516e+00, 4.03907592727995e+00, 3.98769067374396e+00, 3.94289620206352e+00,\n                                                3.90416975309327e+00, 3.87099376623354e+00, 3.84285842966430e+00, 3.81926416814707e+00, 3.79972420824363e+00,\n                                                3.78376730844569e+00, 3.77094068723164e+00, 3.76081312783820e+00, 3.75297818730117e+00, 3.74705739213188e+00,\n                                                3.74270326700332e+00, 3.73960201892160e+00, 3.73747568982093e+00, 3.73608359658522e+00, 3.73522289908891e+00,\n                                                3.73472817244311e+00, 3.73446990634670e+00, 3.73435190832411e+00, 3.73430764414493e+00, 3.73429560330487e+00,\n                                                3.73429382610539e+00, 3.73429366656292e+00, 3.73429051039470e+00, 3.73426912697440e+00, 3.73419052051557e+00,\n                                                3.73398099420551e+00, 3.73352249995699e+00, 3.73264461617636e+00, 3.73111855559642e+00, 3.72865361006853e+00,\n                                                3.72489643963534e+00, 3.71943359790401e+00, 3.71179764026796e+00, 3.70147707023865e+00, 3.68793022808957e+00,\n                                                3.67060300660110e+00, 3.64894999183281e+00, 3.62245828668476e+00, 3.59067291125990e+00, 3.55322233159306e+00,\n                                                3.50984240310386e+00, 3.46039688589859e+00, 3.40489274580395e+00, 3.34348872631412e+00, 3.27649615882308e+00,\n                                                3.20437163024972e+00, 3.12770187176173e+00, 3.04718196847257e+00, 2.96358860948401e+00, 2.87775050624043e+00,\n                                                2.79051824436988e+00, 2.70273568696307e+00, 2.61521465394102e+00, 2.52871404484502e+00, 2.44392395855128e+00,\n                                                2.36145480122671e+00, 2.28183094742587e+00, 2.20548827113711e+00, 2.13277478952051e+00, 2.06395371904070e+00,\n                                                1.99920836822712e+00, 1.93864842127003e+00, 1.88231725928971e+00, 1.83020000660919e+00, 1.78223198865538e+00,\n                                                1.73830727218055e+00, 1.69828695467650e+00, 1.66200689593639e+00, 1.62928464432221e+00, 1.59992539465520e+00,\n                                                1.57372690840620e+00, 1.55048341443614e+00, 1.52998857858657e+00, 1.51203767756267e+00, 1.49642913671886e+00,\n                                                1.48296559601468e+00, 1.47145465852594e+00, 1.46170945646169e+00, 1.45354914477814e+00, 1.44679940520305e+00,\n                                                1.44129301579254e+00, 1.43687051431297e+00, 1.43338095867165e+00, 1.43068276506182e+00, 1.42864458520775e+00,\n                                                1.42714616891112e+00, 1.42607914780818e+00, 1.42534767151152e+00, 1.42486882848998e+00, 1.42457279107929e+00,\n                                                1.42440263634464e+00, 1.42431381107988e+00, 1.42427322855789e+00, 1.42425800505328e+00, 1.42425386392868e+00,\n                                                1.42425325270872e+00, 1.42425319636520e+00, 1.42425206533149e+00, 1.42424440244936e+00, 1.42421623344597e+00,\n                                                1.42414114954127e+00, 1.42397685215073e+00, 1.42366228688387e+00, 1.42311551763841e+00, 1.42223249708621e+00,\n                                                1.42088689382159e+00, 1.41893113384494e+00, 1.41619879840721e+00, 1.41250848447248e+00, 1.40766917176533e+00,\n                                                1.40148704748239e+00, 1.39377361640791e+00, 1.38435477655244e+00, 1.37308038198066e+00, 1.35983366606627e+00,\n                                                1.34453978673336e+00, 1.32717270937640e+00, 1.30775968898220e+00, 1.28638276634402e+00, 1.26317695291928e+00,\n                                                1.23832512124483e+00, 1.21204999587415e+00, 1.18460398856348e+00, 1.15625787105863e+00, 1.12728937351928e+00,\n                                                1.09797271368258e+00, 1.06856982276189e+00, 1.03932370037867e+00, 1.01045398470781e+00, 9.82154540731230e-01,\n                                                9.54592694311884e-01, 9.27909679191288e-01, 9.02221892855636e-01, 8.77622635664594e-01, 8.54184098223698e-01,\n                                                8.31959440054746e-01, 8.10984858426536e-01, 7.91281581114646e-01, 7.72857737504154e-01, 7.55710075914322e-01,\n                                                7.39825506218651e-01, 7.25182457925030e-01, 7.11752054977111e-01, 6.99499118727715e-01, 6.88383018773635e-01,\n                                                6.78358396963702e-01, 6.69375792754678e-01, 6.61382198477099e-01, 6.54321571506543e-01, 6.48135327382491e-01,\n                                                6.42762834062651e-01, 6.38141923101415e-01, 6.34209428818011e-01, 6.30901761599432e-01, 6.28155516447009e-01,\n                                                6.25908112801483e-01, 6.24098456688159e-01, 6.22667611489121e-01, 6.21559459406171e-01, 6.20721332216831e-01,\n                                                6.20104587540055e-01, 6.19665105801374e-01, 6.19363683622822e-01, 6.19166301565571e-01, 6.19044247982956e-01,\n                                                6.18974086008421e-01, 6.18937457082140e-01, 6.18920721467788e-01, 6.18914443432999e-01, 6.18912735662121e-01,\n                                                6.18912483598962e-01, 6.18912459577587e-01, 6.18911968852984e-01, 6.18908644130670e-01, 6.18896422237228e-01,\n                                                6.18863844211930e-01, 6.18792553355149e-01, 6.18656043348309e-01, 6.18418715454112e-01, 6.18035302557246e-01,\n                                                6.17450715744454e-01, 6.16600364899156e-01, 6.15410996668572e-01, 6.13802079270030e-01, 6.11687742284133e-01,\n                                                6.08979249903470e-01, 6.05587948393591e-01, 6.01428584875976e-01, 5.96422849103405e-01, 5.90502948734880e-01,\n                                                5.83614999046716e-01, 5.75721997324777e-01, 5.66806165934693e-01, 5.56870488330375e-01, 5.45939326338598e-01,\n                                                5.34058087170393e-01, 5.21291992953934e-01, 5.07724080622836e-01, 4.93452613569005e-01, 4.78588110857700e-01,\n                                                4.63250193759563e-01, 4.47564418447314e-01, 4.31659218636426e-01, 4.15663035399319e-01, 3.99701674301085e-01,\n                                                3.83895908673324e-01, 3.68359342628679e-01, 3.53196553553076e-01, 3.38501543734978e-01, 3.24356537027725e-01,\n                                                3.10831153996020e-01, 2.97981986495699e-01, 2.85852572105128e-01, 2.74473744508128e-01, 2.63864312662932e-01,\n                                                2.54032003459983e-01, 2.44974592049118e-01, 2.36681141774199e-01, 2.29133280844820e-01, 2.22306453668182e-01,\n                                                2.16171098934893e-01, 2.10693721939322e-01, 2.05837843446744e-01, 2.01564820428231e-01, 1.97834544425390e-01,\n                                                1.94606030866780e-01, 1.91837917348352e-01, 1.89488890930960e-01, 1.87518064248039e-01, 1.85885318067676e-01,\n                                                1.84551624360253e-01, 1.83479359346848e-01, 1.82632610907348e-01, 1.81977479573220e-01, 1.81482367557621e-01,\n                                                1.81118246287397e-01, 1.80858890032596e-01, 1.80681061712292e-01, 1.80564636915435e-01, 1.80492653584139e-01,\n                                                1.80451277515232e-01, 1.80429677566693e-01, 1.80419808848654e-01, 1.80416106828943e-01, 1.80415099797102e-01,\n                                                1.80414951161580e-01, 1.80414936449992e-01, 1.80414630174027e-01, 1.80412555118792e-01, 1.80404927140756e-01,\n                                                1.80384594861025e-01, 1.80340103791963e-01, 1.80254919635971e-01, 1.80106851143037e-01, 1.79867714192412e-01,\n                                                1.79503279716954e-01, 1.78973547519902e-01, 1.78233384432531e-01, 1.77233556997422e-01, 1.75922174472959e-01,\n                                                1.74246536458071e-01, 1.72155350695419e-01, 1.69601251641183e-01, 1.66543511586582e-01, 1.62950797280303e-01,\n                                                1.58803791152053e-01, 1.54097473118995e-01, 1.48842852304071e-01, 1.43067952574228e-01, 1.36817894385956e-01,\n                                                1.30153977783195e-01, 1.23151753616241e-01, 1.15898164302635e-01, 1.08487930463355e-01, 1.01019442237600e-01,\n                                                9.35904708701969e-02, 8.62940370597300e-02, 7.92147527797908e-02, 7.24258950897649e-02, 6.59873830321658e-02,\n                                                5.99447263462736e-02, 5.43289136082308e-02, 4.91571221111116e-02, 4.44340724343704e-02, 4.01538214323125e-02,\n                                                3.63017867691724e-02, 3.28568183116715e-02, 2.97931685687161e-02, 2.70822576222685e-02, 2.46941706067361e-02,\n                                                2.25988628592546e-02, 2.07670767480437e-02, 1.91709941835825e-02, 1.77846605983518e-02, 1.65842212059459e-02,\n                                                1.55480103902050e-02, 1.46565318638778e-02, 1.38923622594831e-02, 1.32400051881376e-02, 1.26857172738113e-02,\n                                                1.22173226655775e-02, 1.18240282459396e-02, 1.14962482316230e-02, 1.12254440516750e-02, 1.10039831834428e-02,\n                                                1.08250188950194e-02, 1.06823914566547e-02, 1.05705502365367e-02, 1.04844951176233e-02, 1.04197348351107e-02,\n                                                1.03722591389044e-02, 1.03385211678244e-02, 1.03154261154685e-02, 1.03003222143627e-02, 1.02909902800263e-02,\n                                                1.02856285364226e-02, 1.02828301486682e-02, 1.02815517535078e-02, 1.02810722175377e-02, 1.02809417753349e-02,\n                                                1.02809225224405e-02, 1.02809205364451e-02, 1.02808783782251e-02, 1.02805927540999e-02, 1.02795428313414e-02,\n                                                1.02767445968368e-02, 1.02706231340761e-02, 1.02589090112843e-02, 1.02385668471783e-02, 1.02057656753800e-02,\n                                                1.01559022111530e-02, 1.00836889421885e-02, 9.98331834956900e-03, 9.84871167032964e-03, 9.67385469368764e-03,\n                                                9.45321373806962e-03, 9.18221244091910e-03, 8.85773547342694e-03, 8.47861100298530e-03, 8.04601282253259e-03,\n                                                7.56371914286547e-03, 7.03817125884143e-03, 6.47829329194849e-03, 5.89506310031140e-03, 5.30086033650434e-03,\n                                                4.70865396395936e-03, 4.13112040553187e-03, 3.57979771146688e-03, 3.06437645468804e-03, 2.59220482757883e-03,\n                                                2.16804886160560e-03, 1.79410764125976e-03, 1.47024745602664e-03, 1.19439513996156e-03, 9.63021624770022e-04,\n                                                7.71649371785088e-04, 6.15327098813623e-04, 4.89028757812093e-04, 3.87950628450540e-04, 3.07700755598717e-04,\n                                                2.44395380491369e-04, 1.94690052424562e-04, 1.55772729300452e-04, 1.25334554098799e-04, 1.01521586472586e-04,\n                                                8.28681032203349e-05, 6.82201847013175e-05, 5.66663565990666e-05, 4.74876006961722e-05, 4.01243313490340e-05,\n                                                3.41492852271585e-05, 2.92402863806274e-05, 2.51547524214857e-05, 2.17086833487201e-05, 1.87604331642888e-05,\n                                                1.61995530021386e-05, 1.39413034929703e-05, 1.19250394305936e-05, 1.01124287397170e-05, 8.48283031018582e-06,\n                                                7.02650314110542e-06, 5.73810928017338e-06, 4.61235545401451e-06, 3.64207693337448e-06, 2.81802053336833e-06,\n                                                2.12937713683914e-06, 1.56440923149148e-06, 1.11089929077934e-06, 7.56394953782547e-07, 4.88326080017032e-07,\n                                                4.26325641456060e-14, 5.68434188608080e-14, 5.68434188608080e-14, 5.68434188608080e-14, 7.10542735760100e-14,\n                                                5.68434188608080e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.05000000000000e+02, 1.04999999457138e+02, 1.04999982670757e+02, 1.04999868940209e+02, 1.04999450849450e+02,\n                                                1.04998336332810e+02, 1.04995897036716e+02, 1.04991224713834e+02, 1.04983097075842e+02, 1.04969954168706e+02,\n                                                1.04949885963983e+02, 1.04920631550006e+02, 1.04879590148780e+02, 1.04823844274318e+02, 1.04750195750862e+02,\n                                                1.04655216001683e+02, 1.04535312824395e+02, 1.04386816414188e+02, 1.04206087136704e+02, 1.03989645902014e+02,\n                                                1.03734324576755e+02, 1.03437428846362e+02, 1.03096900226517e+02, 1.02711459204728e+02, 1.02280709813833e+02,\n                                                1.01805188948067e+02, 1.01286351814019e+02, 1.00726496623858e+02, 1.00128643851935e+02, 9.94963941880249e+01,\n                                                9.88337914968708e+01, 9.81452114023930e+01, 9.74352839877861e+01, 9.67088443815247e+01, 9.59708929355796e+01,\n                                                9.52265424723686e+01, 9.44809367727202e+01, 9.37391405688910e+01, 9.30060190939817e+01, 9.22861337052755e+01,\n                                                9.15836730818771e+01, 9.09024222136184e+01, 9.02457564550399e+01, 8.96166439010227e+01, 8.90176449058876e+01,\n                                                8.84509058441445e+01, 8.79181498581950e+01, 8.74206691026191e+01, 8.69593221759081e+01, 8.65345387252485e+01,\n                                                8.61463316834633e+01, 8.57943166254619e+01, 8.54777372863315e+01, 8.51954961918955e+01, 8.49461894405958e+01,\n                                                8.47281448177397e+01, 8.45394625476080e+01, 8.43780580642042e+01, 8.42417062014758e+01, 8.41280861763974e+01,\n                                                8.40348266774504e+01, 8.39595502929266e+01, 8.38999164342485e+01, 8.38536618440405e+01, 8.38186377400310e+01,\n                                                8.37928426445311e+01, 8.37744499926512e+01, 8.37618297043954e+01, 8.37535630461323e+01, 8.37484502914647e+01,\n                                                8.37455109122050e+01, 8.37439762759478e+01, 8.37432750844539e+01, 8.37430120427483e+01, 8.37429404889729e+01,\n                                                8.37429299277836e+01, 8.37429284821059e+01, 8.37428943400917e+01, 8.37426630233198e+01, 8.37418126843612e+01,\n                                                8.37395460387093e+01, 8.37345857725770e+01, 8.37250871600656e+01, 8.37085717791258e+01, 8.36818860088409e+01,\n                                                8.36411877263664e+01, 8.35819642403128e+01, 8.34990839211146e+01, 8.33868831345527e+01, 8.32392888781239e+01,\n                                                8.30499759153754e+01, 8.28125552019642e+01, 8.25207880648523e+01, 8.21688180761631e+01, 8.17514100866624e+01,\n                                                8.12641837779899e+01, 8.07038277865194e+01, 8.00682804519956e+01, 7.93568650279065e+01, 7.85703709495943e+01,\n                                                7.77110780074126e+01, 7.67827255492101e+01, 7.57904319188526e+01, 7.47405685002545e+01, 7.36405888781674e+01,\n                                                7.24988116739437e+01, 7.13241622164124e+01, 7.01258944615160e+01, 6.89133296706904e+01, 6.76956456209689e+01,\n                                                6.64817255307637e+01, 6.52800471920620e+01, 6.40985827173492e+01, 6.29446922509159e+01, 6.18250161485099e+01,\n                                                6.07453831125617e+01, 5.97107513039327e+01, 5.87251901810574e+01, 5.77919001029795e+01, 5.69132595632331e+01,\n                                                5.60908877339903e+01, 5.53257117401747e+01, 5.46180317486333e+01, 5.39675807387629e+01, 5.33735786340011e+01,\n                                                5.28347819972877e+01, 5.23495309345052e+01, 5.19157946365948e+01, 5.15312165336914e+01, 5.11931596023054e+01,\n                                                5.08987520705557e+01, 5.06449336047307e+01, 5.04285019778353e+01, 5.02461601556961e+01, 5.00945636454714e+01,\n                                                4.99703678166860e+01, 4.98702747290365e+01, 4.97910788011290e+01, 4.97297104542455e+01, 4.96832766914145e+01,\n                                                4.96490974489047e+01, 4.96247365045811e+01, 4.96080257586187e+01, 4.95970818221711e+01, 4.95903140555859e+01,\n                                                4.95864234782803e+01, 4.95843923090873e+01, 4.95834642654419e+01, 4.95831161265500e+01, 4.95830214245491e+01,\n                                                4.95830074467401e+01, 4.95830061198609e+01, 4.95829790679448e+01, 4.95827957875896e+01, 4.95821220349548e+01,\n                                                4.95803260988092e+01, 4.95763959445693e+01, 4.95688700263199e+01, 4.95557848857860e+01, 4.95346425148857e+01,\n                                                4.95024002727778e+01, 4.94554858681311e+01, 4.93898394773804e+01, 4.93009844002991e+01, 4.91841266945971e+01,\n                                                4.90342829456653e+01, 4.88464337216465e+01, 4.86156983980206e+01, 4.83375250310293e+01, 4.80078869929562e+01,\n                                                4.76234763733307e+01, 4.71818829401546e+01, 4.66817469990710e+01, 4.61228750597192e+01, 4.55063091079360e+01,\n                                                4.48343437129179e+01, 4.41104900680377e+01, 4.33393915553473e+01, 4.25266998299433e+01, 4.16789217396663e+01,\n                                                4.08032447967443e+01, 3.99073440560141e+01, 3.89991698569985e+01, 3.80867173032433e+01, 3.71777849200247e+01,\n                                                3.62797384828591e+01, 3.53993018835390e+01, 3.45423967361295e+01, 3.37140457884989e+01, 3.29183443985083e+01,\n                                                3.21584929787812e+01, 3.14368747070912e+01, 3.07551588061128e+01, 3.01144104513697e+01, 2.95151926522933e+01,\n                                                2.89576514130677e+01, 2.84415813279578e+01, 2.79664732478295e+01, 2.75315482281452e+01, 2.71357827245113e+01,\n                                                2.67779294396087e+01, 2.64565369892398e+01, 2.61699702136095e+01, 2.59164318792370e+01, 2.56939858384358e+01,\n                                                2.55005814061634e+01, 2.53340786585376e+01, 2.51922744193868e+01, 2.50729287771393e+01, 2.49737920051510e+01,\n                                                2.48926317245131e+01, 2.48272600560695e+01, 2.47755603779533e+01, 2.47355131611895e+01, 2.47052202228828e+01,\n                                                2.46829266349937e+01, 2.46670394727788e+01, 2.46561425912854e+01, 2.46490066855110e+01, 2.46445940184311e+01,\n                                                2.46420573835865e+01, 2.46407330926644e+01, 2.46401280271480e+01, 2.46399010484393e+01, 2.46398393049401e+01,\n                                                2.46398301917366e+01, 2.46398293807266e+01, 2.46398134158996e+01, 2.46397052520771e+01, 2.46393076338609e+01,\n                                                2.46382477560864e+01, 2.46359283734745e+01, 2.46314869916105e+01, 2.46237649971772e+01, 2.46112885110245e+01,\n                                                2.45922626479048e+01, 2.45645807088474e+01, 2.45258495743222e+01, 2.44734321636348e+01, 2.44045072387306e+01,\n                                                2.43161460343888e+01, 2.42054041927412e+01, 2.40694263029252e+01, 2.39055590686569e+01, 2.37114678549214e+01,\n                                                2.34852502357523e+01, 2.32255393379487e+01, 2.29315894399866e+01, 2.26033366782213e+01, 2.22414291225673e+01,\n                                                2.18472231776138e+01, 2.14227472566454e+01, 2.09706383654891e+01, 2.04940611815505e+01, 1.99966205113824e+01,\n                                                1.94822754242333e+01, 1.89552576010106e+01, 1.84199903017010e+01, 1.78810011635892e+01, 1.73428234869395e+01,\n                                                1.68098858054988e+01, 1.62863956546153e+01, 1.57762277863918e+01, 1.52828281643679e+01, 1.48091429847609e+01,\n                                                1.43575778659095e+01, 1.39299877007021e+01, 1.35276937072316e+01, 1.31515216376502e+01, 1.28018540653057e+01,\n                                                1.24786899206708e+01, 1.21817055487987e+01, 1.19103130582000e+01, 1.16637132577366e+01, 1.14409418026848e+01,\n                                                1.12409081883852e+01, 1.10624279283595e+01, 1.09042486763540e+01, 1.07650712627158e+01, 1.06435666783647e+01,\n                                                1.05383900062331e+01, 1.04481922076251e+01, 1.03716305437553e+01, 1.03073782654868e+01, 1.02541340457974e+01,\n                                                1.02106314655658e+01, 1.01756486988983e+01, 1.01480183849442e+01, 1.01266375255508e+01, 1.01104771197539e+01,\n                                                1.00985911448670e+01, 1.00901244270816e+01, 1.00843189175577e+01, 1.00805179057482e+01, 1.00781677594566e+01,\n                                                1.00768168763965e+01, 1.00761116568370e+01, 1.00757894506118e+01, 1.00756685822651e+01, 1.00756357033643e+01,\n                                                1.00756308505154e+01, 1.00756304214987e+01, 1.00756220083056e+01, 1.00755650078820e+01, 1.00753554712556e+01,\n                                                1.00747969462798e+01, 1.00735747434057e+01, 1.00712345207212e+01, 1.00671662366653e+01, 1.00605945188312e+01,\n                                                1.00505764855117e+01, 1.00360080067052e+01, 1.00156392694969e+01, 9.98810028266904e+00, 9.95193658450957e+00,\n                                                9.90565488556291e+00, 9.84777768504165e+00, 9.77690507577763e+00, 9.69178106291128e+00, 9.59136086621146e+00,\n                                                9.47487498294554e+00, 9.34188539667147e+00, 9.19232935225828e+00, 9.02654665967461e+00, 8.84528754681780e+00,\n                                                8.64969957320837e+00, 8.44129387308772e+00, 8.22189279020424e+00, 7.99356255729184e+00, 7.75853586160049e+00,\n                                                7.51912980266675e+00, 7.27766485422376e+00, 7.03639001810016e+00, 6.79741847027746e+00, 6.56267674024053e+00,\n                                                6.33386896658038e+00, 6.11245622295569e+00, 5.89964953828903e+00, 5.69641425431074e+00, 5.50348288962849e+00,\n                                                5.32137369425938e+00, 5.15041244766034e+00, 4.99075559244014e+00, 4.84241334277340e+00, 4.70527186280526e+00,\n                                                4.57911394531151e+00, 4.46363784949483e+00, 4.35847411201770e+00, 4.26320025816614e+00, 4.17735343053917e+00,\n                                                4.10044102985530e+00, 4.03194952789801e+00, 3.97135166453867e+00, 3.91811227707953e+00, 3.87169302979865e+00,\n                                                3.83155631481135e+00, 3.79716858346076e+00, 3.76800334226903e+00, 3.74354401113912e+00, 3.72328679623348e+00,\n                                                3.70674367815809e+00, 3.69344556036606e+00, 3.68294556602351e+00, 3.67482241725625e+00, 3.66868378226724e+00,\n                                                3.66416943684136e+00, 3.66095406044737e+00, 3.65874947597382e+00, 3.65730614742770e+00, 3.65641377159079e+00,\n                                                3.65590083604975e+00, 3.65563306414134e+00, 3.65551072303397e+00, 3.65546482964601e+00, 3.65545234562471e+00,\n                                                3.65545050301267e+00, 3.65545033759801e+00, 3.65544706526222e+00, 3.65542489479259e+00, 3.65534339510020e+00,\n                                                3.65512615682329e+00, 3.65465078680617e+00, 3.65374059035977e+00, 3.65215835798489e+00, 3.64960267822622e+00,\n                                                3.64570719883382e+00, 3.64004324287403e+00, 3.63212614009412e+00, 3.62142554075074e+00, 3.60737982502455e+00,\n                                                3.58941449724564e+00, 3.56696416112956e+00, 3.53949732398542e+00, 3.50654290383413e+00, 3.46771695817554e+00,\n                                                3.42274787255612e+00, 3.37149810013052e+00, 3.31398058115539e+00, 3.25036822456325e+00, 3.18099530232011e+00,\n                                                3.10635025448870e+00, 3.02706015721759e+00, 2.94386787033032e+00, 2.85760354971015e+00, 2.76915268661199e+00,\n                                                2.67942305497736e+00, 2.58931288528832e+00, 2.49968226382542e+00, 2.41132924599988e+00, 2.32497156528451e+00,\n                                                2.24123421446491e+00, 2.16064265712909e+00, 2.08362104716251e+00, 2.01049460875316e+00, 1.94149524379195e+00,\n                                                1.87676945293833e+00, 1.81638774099714e+00, 1.76035479240673e+00, 1.70861982572652e+00, 1.66108665554712e+00,\n                                                1.61762310254436e+00, 1.57806949711762e+00, 1.54224611889769e+00, 1.50995950177089e+00, 1.48100760932468e+00,\n                                                1.45518394620665e+00, 1.43228071529251e+00, 1.41209115882576e+00, 1.39441123531624e+00, 1.37904078543879e+00,\n                                                1.36578433230800e+00, 1.35445164703327e+00, 1.34485819165810e+00, 1.33682553018167e+00, 1.33018177557256e+00,\n                                                1.32476211739643e+00, 1.32040945159142e+00, 1.31697511173094e+00, 1.31431968059479e+00, 1.31231384292505e+00,\n                                                1.31083922585830e+00, 1.30978916365362e+00, 1.30906931875492e+00, 1.30859809239256e+00, 1.30830676483708e+00,\n                                                1.30813931754325e+00, 1.30805190573170e+00, 1.30801196901112e+00, 1.30799698776610e+00, 1.30799291254175e+00,\n                                                1.30799231104854e+00, 1.30799225560162e+00, 1.30799114256678e+00, 1.30798360162927e+00, 1.30795588090250e+00,\n                                                1.30788199190290e+00, 1.30772030935164e+00, 1.30741075112044e+00, 1.30687268698171e+00, 1.30600373038170e+00,\n                                                1.30467957152995e+00, 1.30275500769585e+00, 1.30006631132868e+00, 1.29643504151642e+00, 1.29167334311904e+00,\n                                                1.28559068677667e+00, 1.27800188227764e+00, 1.26873605385357e+00, 1.25764611235191e+00, 1.24461811640455e+00,\n                                                1.22957980824950e+00, 1.21250756658593e+00, 1.19343106130233e+00, 1.17243503519171e+00, 1.14965787210893e+00,\n                                                1.12528691702902e+00, 1.09955085126646e+00, 1.07270974422426e+00, 1.04504364824295e+00, 1.01684073240583e+00,\n                                                9.88385942641955e-01, 9.59951034658545e-01, 9.31786585204847e-01, 9.04116296128137e-01, 8.77133619530852e-01,\n                                                8.51000496773963e-01, 8.25847846041640e-01, 8.01777358337546e-01, 7.78864158524570e-01, 7.57159935192220e-01,\n                                                7.36696217885964e-01, 7.17487563463095e-01, 6.99534492049651e-01, 6.82826080201778e-01, 6.67342171836225e-01,\n                                                6.53055206472416e-01, 6.39931690916555e-01, 6.27933356841368e-01, 6.17018054980406e-01, 6.07140438925924e-01,\n                                                5.98252489617551e-01, 5.90303927068220e-01, 5.83242549900262e-01, 5.77014536743462e-01, 5.71564737043872e-01,\n                                                5.66836972663495e-01, 5.62774365912745e-01, 5.59319704332481e-01, 5.56415847534453e-01, 5.54006176623830e-01,\n                                                5.52035082109455e-01, 5.50448481764278e-01, 5.49194355725604e-01, 5.48223282389571e-01, 5.47488955589628e-01,\n                                                5.46948661411193e-01, 5.46563692038504e-01, 5.46299674449145e-01, 5.46126793671661e-01, 5.46019893684999e-01,\n                                                5.45958443703782e-01, 5.45926363275385e-01, 5.45911705919224e-01, 5.45906207512743e-01, 5.45904711819844e-01,\n                                                5.45904491058963e-01, 5.45904470020687e-01, 5.45904040236351e-01, 5.45901128393353e-01, 5.45890424284977e-01,\n                                                5.45861892096084e-01, 5.45799455344721e-01, 5.45679901592308e-01, 5.45472059459470e-01, 5.45136299866272e-01,\n                                                5.44624412080680e-01, 5.43879901791158e-01, 5.42838751317788e-01, 5.41430669398551e-01, 5.39580838115654e-01,\n                                                5.37212136556022e-01, 5.34247785108107e-01, 5.30614313032032e-01, 5.26244709304379e-01, 5.21081578831414e-01,\n                                                5.15080100172156e-01, 5.08210573937873e-01, 5.00460368048422e-01, 4.91835108304414e-01, 4.82359026655558e-01,\n                                                4.72074456595564e-01, 4.61040543283559e-01, 4.49331302371561e-01, 4.37033205421940e-01, 4.24242485465015e-01,\n                                                4.11062344227389e-01, 3.97600209347246e-01, 3.83965145823808e-01, 3.70265482214847e-01, 3.56606677669475e-01,\n                                                3.43089435485098e-01, 3.29808062392246e-01, 3.16849076212321e-01, 3.04290071954199e-01, 2.92198862079658e-01,\n                                                2.80632906693668e-01, 2.69639042535402e-01, 2.59253507021754e-01, 2.49502237971555e-01, 2.40401414286310e-01,\n                                                2.31958190608424e-01, 2.24171571646565e-01, 2.17033370074461e-01, 2.10529195255234e-01, 2.04639427387065e-01,\n                                                1.99340141543644e-01, 1.94603957018614e-01, 1.90400798115832e-01, 1.86698562112710e-01, 1.83463697959567e-01,\n                                                1.80661705061198e-01, 1.78257565156542e-01, 1.76216121972871e-01, 1.74502423200281e-01, 1.73082037700510e-01,\n                                                1.71921358061311e-01, 1.70987894991782e-01, 1.70250566001911e-01, 1.69679976697338e-01, 1.69248689219032e-01,\n                                                1.68931469199137e-01, 1.68705500374401e-01, 1.68550554889066e-01, 1.68449107434029e-01, 1.68386382684560e-01,\n                                                1.68350327888703e-01, 1.68331505691427e-01, 1.68322906052012e-01, 1.68319680091543e-01, 1.68318802557849e-01,\n                                                1.68318673035913e-01, 1.68318660216144e-01, 1.68318393325336e-01, 1.68316585108570e-01, 1.68309938029324e-01,\n                                                1.68292220254372e-01, 1.68253449892788e-01, 1.68179217467397e-01, 1.68050181270729e-01, 1.67841771065255e-01,\n                                                1.67524136092183e-01, 1.67062372583942e-01, 1.66417062692915e-01, 1.65545149631967e-01, 1.64401161679720e-01,\n                                                1.62938779750760e-01, 1.61112719386026e-01, 1.58880869150721e-01, 1.56206595538038e-01, 1.53061092708498e-01,\n                                                1.49425627845474e-01, 1.45293514195941e-01, 1.40671638521809e-01, 1.35581381352438e-01, 1.30058799098904e-01,\n                                                1.24153986384442e-01, 1.17929601711225e-01, 1.11458613784066e-01, 1.04821400997466e-01, 9.81024028673687e-02,\n                                                9.13865697585976e-02, 8.47558782842697e-02, 7.82861701321593e-02, 7.20445326415700e-02, 6.60873761167409e-02,\n                                                6.04592855311950e-02, 5.51926447824940e-02, 5.03079612756778e-02, 4.58147658764432e-02, 4.17129326421559e-02,\n                                                3.79942544016387e-02, 3.46441208931481e-02, 3.16431703034965e-02, 2.89688165202051e-02, 2.65965875842795e-02,\n                                                2.45012414083732e-02, 2.26576501082576e-02, 2.10414631150400e-02, 1.96295716159511e-02, 1.84004036213707e-02,\n                                                1.73340812690270e-02, 1.64124711406970e-02, 1.56191555554273e-02, 1.49393489732148e-02, 1.43597794976813e-02,\n                                                1.38685514612007e-02, 1.34550014738721e-02, 1.31095572175610e-02, 1.28236056776672e-02, 1.25893753672415e-02,\n                                                1.23998353281394e-02, 1.22486122060366e-02, 1.21299254203393e-02, 1.20385393382634e-02, 1.19697304070456e-02,\n                                                1.19192664039929e-02, 1.18833943696188e-02, 1.18588334317877e-02, 1.18427686418840e-02, 1.18328421456795e-02,\n                                                1.18271384879733e-02, 1.18241615612362e-02, 1.18228015835342e-02, 1.18222914420443e-02, 1.18221526743270e-02,\n                                                1.18221321926200e-02, 1.18221300798496e-02, 1.18220852305342e-02, 1.18217813737971e-02, 1.18206644246186e-02,\n                                                1.18176875111118e-02, 1.18111749568470e-02, 1.17987116298082e-02, 1.17770659166894e-02, 1.17421560614730e-02,\n                                                1.16890710196174e-02, 1.16121577575257e-02, 1.15051863328972e-02, 1.13616013207860e-02, 1.11748624777874e-02,\n                                                1.09388685746694e-02, 1.06484462664866e-02, 1.02998717608784e-02, 9.89137891404823e-03, 9.42359613445376e-03,\n                                                8.89984946549305e-03, 8.32627351125836e-03, 7.71168726079452e-03, 7.06721798580645e-03, 6.40569016316306e-03,\n                                                5.74083218495502e-03, 5.08638427064056e-03, 4.45520937401511e-03, 3.85850995091630e-03, 3.30523602903554e-03,\n                                                2.80173763286484e-03, 2.35167496626332e-03, 1.95616245720487e-03, 1.61409594758766e-03, 1.32259947568514e-03,\n                                                1.07752731288713e-03, 8.73963196895033e-04, 7.06668260605170e-04, 5.70441941221134e-04, 4.60377906037479e-04,\n                                                3.72018365965232e-04, 3.01428131180614e-04, 2.45216121712133e-04, 2.00525060051859e-04, 1.64997774760423e-04,\n                                                1.36722303977876e-04, 1.14161883047359e-04, 9.60831202121426e-05, 8.14962346424863e-05, 6.96126949577547e-05,\n                                                5.98150944171039e-05, 5.16302450961348e-05, 4.47007310100389e-05, 3.87567718291848e-05, 3.35930937040985e-05,\n                                                2.90534105715778e-05, 2.50212531227589e-05, 2.14137239566980e-05, 1.81753049162126e-05, 1.52707944636177e-05,\n                                                1.26780648912472e-05, 1.03818142065393e-05, 8.36907227608208e-06, 6.62654568373000e-06, 5.13940454993644e-06,\n                                                3.89096422281909e-06, 2.86280359773627e-06, 2.03503617512979e-06, 1.38660728055129e-06, 8.95587945137777e-07,\n                                                5.39476943117734e-07, 5.68434188608080e-14, 4.26325641456060e-14, 5.68434188608080e-14, 4.26325641456060e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.06000000000000e+02, 1.05999999449808e+02, 1.05999982436764e+02, 1.05999867170535e+02, 1.05999443434364e+02,\n                                                1.05998313868458e+02, 1.05995841634007e+02, 1.05991106217233e+02, 1.05982868818010e+02, 1.05969548400174e+02,\n                                                1.05949209105543e+02, 1.05919559421403e+02, 1.05877963334809e+02, 1.05821463804972e+02, 1.05746819303009e+02,\n                                                1.05650554881168e+02, 1.05529030057722e+02, 1.05378526353880e+02, 1.05195357033491e+02, 1.04975999875380e+02,\n                                                1.04717250275511e+02, 1.04416386804008e+02, 1.04071335497861e+02, 1.03680814399126e+02, 1.03244438253593e+02,\n                                                1.02762766537345e+02, 1.02237286422918e+02, 1.01670334386165e+02, 1.01064972610606e+02, 1.00424845142141e+02,\n                                                9.97540406004939e+01, 9.90569819944287e+01, 9.83383514144002e+01, 9.76030421688296e+01, 9.68561188015155e+01,\n                                                9.61027617572037e+01, 9.53481813148891e+01, 9.45975027690484e+01, 9.38556430995218e+01, 9.31272068690037e+01,\n                                                9.24164201767145e+01, 9.17271028800828e+01, 9.10626645508012e+01, 9.04261068579392e+01, 8.98200217569881e+01,\n                                                8.92465835108227e+01, 8.87075379889454e+01, 8.82041940532842e+01, 8.77374207158980e+01, 8.73076519068225e+01,\n                                                8.69148991404061e+01, 8.65587714304390e+01, 8.62385014072637e+01, 8.59529765403998e+01, 8.57007744870418e+01,\n                                                8.54802017455557e+01, 8.52893349250684e+01, 8.51260640192439e+01, 8.49881370909070e+01, 8.48732057438072e+01,\n                                                8.47788706936255e+01, 8.47027266690792e+01, 8.46424057920557e+01, 8.45956185181683e+01, 8.45601911790535e+01,\n                                                8.45340991656726e+01, 8.45154948352993e+01, 8.45027293175583e+01, 8.44943675366397e+01, 8.44891959533414e+01,\n                                                8.44862227537969e+01, 8.44846704604006e+01, 8.44839612012362e+01, 8.44836951330725e+01, 8.44836227560275e+01,\n                                                8.44836120733253e+01, 8.44836106110142e+01, 8.44835760761756e+01, 8.44833420979678e+01, 8.44824819753944e+01,\n                                                8.44801892510272e+01, 8.44751719163708e+01, 8.44655640265396e+01, 8.44488586606248e+01, 8.44218659560856e+01,\n                                                8.43806996794972e+01, 8.43207954109205e+01, 8.42369628363148e+01, 8.41234737767826e+01, 8.39741863595254e+01,\n                                                8.37827041060551e+01, 8.35425666795708e+01, 8.32474666628568e+01, 8.28914841786444e+01, 8.24693286559038e+01,\n                                                8.19765749288936e+01, 8.14098795751241e+01, 8.07671634689003e+01, 8.00477484120305e+01, 7.92524395422362e+01,\n                                                7.83835504388843e+01, 7.74448728889564e+01, 7.64415959367617e+01, 7.53801776431448e+01, 7.42681693373238e+01,\n                                                7.31139914416821e+01, 7.19266684871042e+01, 7.07155481598158e+01, 6.94900424992819e+01, 6.82594226077873e+01,\n                                                6.70326709726835e+01, 6.58183683120938e+01, 6.46245860176914e+01, 6.34587713414674e+01, 6.23276336602147e+01,\n                                                6.12370510530922e+01, 6.01920137184356e+01, 5.91966102378541e+01, 5.82540518455428e+01, 5.73667232547313e+01,\n                                                5.65362471861374e+01, 5.57635521411710e+01, 5.50489370067232e+01, 5.43921299521380e+01, 5.37923417798368e+01,\n                                                5.32483152094406e+01, 5.27583718138237e+01, 5.23204579701917e+01, 5.19321906658974e+01, 5.15909035625815e+01,\n                                                5.12936934583426e+01, 5.10374671691671e+01, 5.08189888062333e+01, 5.06349273863671e+01, 5.04819046353089e+01,\n                                                5.03565427121651e+01, 5.02555114049979e+01, 5.01755741420066e+01, 5.01136319565170e+01, 5.00667643645043e+01,\n                                                5.00322659856762e+01, 5.00076776833497e+01, 4.99908110277802e+01, 4.99797650075470e+01, 4.99729341207567e+01,\n                                                4.99690072606476e+01, 4.99669571500254e+01, 4.99660204522189e+01, 4.99656690669065e+01, 4.99655734818056e+01,\n                                                4.99655593736531e+01, 4.99655580344006e+01, 4.99655307302246e+01, 4.99653457407772e+01, 4.99646657054305e+01,\n                                                4.99628530225883e+01, 4.99588862221977e+01, 4.99512901359239e+01, 4.99380830155988e+01, 4.99167436083587e+01,\n                                                4.98842010110235e+01, 4.98368498448869e+01, 4.97705928488895e+01, 4.96809123133436e+01, 4.95629708060845e+01,\n                                                4.94117403413002e+01, 4.92221575129935e+01, 4.89893002198987e+01, 4.87085795684696e+01, 4.83759385358654e+01,\n                                                4.79880472327413e+01, 4.75424833841378e+01, 4.70378862258111e+01, 4.64740726922198e+01, 4.58521068424092e+01,\n                                                4.51743170904877e+01, 4.44442607251386e+01, 4.36666404172267e+01, 4.28471811733301e+01, 4.19924767699427e+01,\n                                                4.11098118271191e+01, 4.02069614700114e+01, 3.92919686164551e+01, 3.83729019571151e+01, 3.74576051361201e+01,\n                                                3.65534558793438e+01, 3.56671583699623e+01, 3.48045902647844e+01, 3.39707175913702e+01, 3.31695791071365e+01,\n                                                3.24043302972484e+01, 3.16773292100217e+01, 3.09902433569909e+01, 3.03441587489897e+01, 2.97396773127716e+01,\n                                                2.91769954197215e+01, 2.86559622291739e+01, 2.81761208099800e+01, 2.77367371351861e+01, 2.73368222837748e+01,\n                                                2.69751521639563e+01, 2.66502875284048e+01, 2.63605955811096e+01, 2.61042734189437e+01, 2.58793729912801e+01,\n                                                2.56838271033825e+01, 2.55154760666745e+01, 2.53720947540167e+01, 2.52514199444603e+01, 2.51511778898329e+01,\n                                                2.50691119980246e+01, 2.50030104226188e+01, 2.49507332030975e+01, 2.49102384429244e+01, 2.48796068698899e+01,\n                                                2.48570640150246e+01, 2.48409991887057e+01, 2.48299804352933e+01, 2.48227647148211e+01, 2.48183026899586e+01,\n                                                2.48157376808309e+01, 2.48143985764229e+01, 2.48137867426044e+01, 2.48135572248886e+01, 2.48134947907193e+01,\n                                                2.48134855755745e+01, 2.48134847554925e+01, 2.48134686120810e+01, 2.48133592383243e+01, 2.48129571722916e+01,\n                                                2.48118854384949e+01, 2.48095401104051e+01, 2.48050490442017e+01, 2.47972406619098e+01, 2.47846245865753e+01,\n                                                2.47653858309269e+01, 2.47373940810270e+01, 2.46982293554244e+01, 2.46452249126988e+01, 2.45755276854877e+01,\n                                                2.44861757114921e+01, 2.43741910110758e+01, 2.42366851601739e+01, 2.40709734983321e+01, 2.38746926061594e+01,\n                                                2.36459145329030e+01, 2.33832504391081e+01, 2.30859360704138e+01, 2.27538920719833e+01, 2.23877538765625e+01,\n                                                2.19888689198329e+01, 2.15592630369872e+01, 2.11015821837001e+01, 2.06190185431309e+01, 2.01152300339547e+01,\n                                                1.95942587410454e+01, 1.90604482977117e+01, 1.85183556515903e+01, 1.79726515587434e+01, 1.74280072279899e+01,\n                                                1.68889701811624e+01, 1.63598378965557e+01, 1.58445408895629e+01, 1.53465466441172e+01, 1.48687927140859e+01,\n                                                1.44136526682381e+01, 1.39829338102087e+01, 1.35779018738495e+01, 1.31993257212479e+01, 1.28475344717513e+01,\n                                                1.25224801246699e+01, 1.22238001168286e+01, 1.19508759107338e+01, 1.17028852900268e+01, 1.14788473434085e+01,\n                                                1.12776600724401e+01, 1.10981311775684e+01, 1.09390029219197e+01, 1.07989721185800e+01, 1.06767063016683e+01,\n                                                1.05708570758580e+01, 1.04800715275807e+01, 1.04030024447561e+01, 1.03383179420402e+01, 1.02847109314903e+01,\n                                                1.02409087181629e+01, 1.02056828402785e+01, 1.01778591189993e+01, 1.01563277397371e+01, 1.01400530626108e+01,\n                                                1.01280827619847e+01, 1.01195558312019e+01, 1.01137089642071e+01, 1.01098808435557e+01, 1.01075139236734e+01,\n                                                1.01061533947469e+01, 1.01054431383869e+01, 1.01051186306257e+01, 1.01049968988642e+01, 1.01049637850909e+01,\n                                                1.01049588975752e+01, 1.01049584654938e+01, 1.01049499922002e+01, 1.01048925845850e+01, 1.01046815510526e+01,\n                                                1.01041190356702e+01, 1.01028880988497e+01, 1.01005311456282e+01, 1.00964337545405e+01, 1.00898149583975e+01,\n                                                1.00797250145841e+01, 1.00650516504530e+01, 1.00445356454079e+01, 1.00167963790486e+01, 9.98036760187468e+00,\n                                                9.93374315126832e+00, 9.87543164182581e+00, 9.80401833634862e+00, 9.71823151788794e+00, 9.61700983528350e+00,\n                                                9.49956641287302e+00, 9.36544513744073e+00, 9.21456458392677e+00, 9.04724559156529e+00, 8.86421955606187e+00,\n                                                8.66661597501042e+00, 8.45592950484588e+00, 8.23396853821708e+00, 8.00278886589454e+00, 7.76461716483297e+00,\n                                                7.52176974179618e+00, 7.27657211670413e+00, 7.03128465485699e+00, 6.78803858569300e+00, 6.54878545149931e+00,\n                                                6.31526145797496e+00, 6.08896658134948e+00, 5.87115690181805e+00, 5.66284771383471e+00, 5.46482460897057e+00,\n                                                5.27765987016340e+00, 5.10173197348050e+00, 4.93724655443042e+00, 4.78425770157305e+00, 4.64268881628122e+00,\n                                                4.51235252219129e+00, 4.39296925852142e+00, 4.28418429259374e+00, 4.18558297149437e+00, 4.09670411692790e+00,\n                                                4.01705155348422e+00, 3.94610384380861e+00, 3.88332237754844e+00, 3.82815801864477e+00, 3.78005655421372e+00,\n                                                3.73846320701190e+00, 3.70282647319023e+00, 3.67260152968399e+00, 3.64725342368682e+00, 3.62626021301786e+00,\n                                                3.60911617380862e+00, 3.59533513405312e+00, 3.58445393171678e+00, 3.57603593812647e+00, 3.56967453527592e+00,\n                                                3.56499639341710e+00, 3.56166436637076e+00, 3.55937980903396e+00, 3.55788412600120e+00, 3.55695938194401e+00,\n                                                3.55642784168606e+00, 3.55615035754033e+00, 3.55602357908313e+00, 3.55597602113275e+00, 3.55596308431394e+00,\n                                                3.55596117487013e+00, 3.55596100345586e+00, 3.55595761243195e+00, 3.55593463783640e+00, 3.55585018214467e+00,\n                                                3.55562506466269e+00, 3.55513245324816e+00, 3.55418924532142e+00, 3.55254963031091e+00, 3.54990127108871e+00,\n                                                3.54586454283205e+00, 3.53999525218254e+00, 3.53179121237939e+00, 3.52070295482864e+00, 3.50614869970192e+00,\n                                                3.48753347849274e+00, 3.46427200044057e+00, 3.43581449611810e+00, 3.40167438464249e+00, 3.36145624062843e+00,\n                                                3.31488223936546e+00, 3.26181509376825e+00, 3.20227551729621e+00, 3.13645248687087e+00, 3.06470504249859e+00,\n                                                2.98755501344196e+00, 2.90567083662600e+00, 2.81984343671760e+00, 2.73095586203557e+00, 2.63994891579367e+00,\n                                                2.54778531321493e+00, 2.45541489691227e+00, 2.36374316765676e+00, 2.27360489115293e+00, 2.18574391078285e+00,\n                                                2.10079963059965e+00, 2.01930002298423e+00, 1.94166052789507e+00, 1.86818787996894e+00, 1.79908772916613e+00,\n                                                1.73447488997382e+00, 1.67438513009333e+00, 1.61878755536529e+00, 1.56759683013981e+00, 1.52068466486628e+00,\n                                                1.47789018638895e+00, 1.43902896913679e+00, 1.40390064047828e+00, 1.37229507862477e+00, 1.34399729739056e+00,\n                                                1.31879116176701e+00, 1.29646210582516e+00, 1.27679903459689e+00, 1.25959558886578e+00, 1.24465094023459e+00,\n                                                1.23177026665657e+00, 1.22076503819660e+00, 1.21145322072380e+00, 1.20365948249840e+00, 1.19721546576729e+00,\n                                                1.19196016286269e+00, 1.18774041423754e+00, 1.18441152479507e+00, 1.18183797540139e+00, 1.17989418941295e+00,\n                                                1.17846530034291e+00, 1.17744785736835e+00, 1.17675040103384e+00, 1.17629384271154e+00, 1.17601158816318e+00,\n                                                1.17584935743173e+00, 1.17576466927613e+00, 1.17572597704843e+00, 1.17571146266083e+00, 1.17570751443350e+00,\n                                                1.17570693168480e+00, 1.17570687796579e+00, 1.17570579961686e+00, 1.17569849368149e+00, 1.17567163685109e+00,\n                                                1.17560005070889e+00, 1.17544340804079e+00, 1.17514350230900e+00, 1.17462222556543e+00, 1.17378040615729e+00,\n                                                1.17249766219773e+00, 1.17063342489858e+00, 1.16802927101581e+00, 1.16451266880048e+00, 1.15990218067502e+00,\n                                                1.15401407451218e+00, 1.14667017443774e+00, 1.13770663828227e+00, 1.12698319626850e+00, 1.11439224542301e+00,\n                                                1.09986709264508e+00, 1.08338860314784e+00, 1.06498956169091e+00, 1.04475620165256e+00, 1.02282659486497e+00,\n                                                9.99385897931731e-01, 9.74658777010518e-01, 9.48899632327127e-01, 9.22381466967735e-01, 8.95384355222177e-01,\n                                                8.68184448396434e-01, 8.41044319514808e-01, 8.14205223313294e-01, 7.87881578597606e-01, 7.62257713341512e-01,\n                                                7.37486688181448e-01, 7.13690856031917e-01, 6.90963732480668e-01, 6.69372736974992e-01, 6.48962402602066e-01,\n                                                6.29757722717343e-01, 6.11767387002317e-01, 5.94986742950994e-01, 5.79400391638870e-01, 5.64984384134291e-01,\n                                                5.51708026070330e-01, 5.39535324201012e-01, 5.28426122994475e-01, 5.18336984634985e-01, 5.09221865170545e-01,\n                                                5.01032635395731e-01, 4.93719489216588e-01, 4.87231275915491e-01, 4.81515786625707e-01, 4.76520019747568e-01,\n                                                4.72190445046522e-01, 4.68473281655136e-01, 4.65314800985638e-01, 4.62661661463542e-01, 4.60461277888925e-01,\n                                                4.58662224055601e-01, 4.57214663049328e-01, 4.56070795521740e-01, 4.55185312408162e-01, 4.54515835282066e-01,\n                                                4.54023325109574e-01, 4.53672438852010e-01, 4.53431813381187e-01, 4.53274257636451e-01, 4.53176836857438e-01,\n                                                4.53120836922793e-01, 4.53091602038626e-01, 4.53078244864543e-01, 4.53073234205988e-01, 4.53071871192819e-01,\n                                                4.53071670015191e-01, 4.53071650843185e-01, 4.53071259184199e-01, 4.53068605646237e-01, 4.53058851097509e-01,\n                                                4.53032850108556e-01, 4.52975952940747e-01, 4.52867008592222e-01, 4.52677617677637e-01, 4.52371683865991e-01,\n                                                4.51905311928584e-01, 4.51227097844679e-01, 4.50278850194593e-01, 4.48996770419001e-01, 4.47313100833213e-01,\n                                                4.45158222657554e-01, 4.42463152087186e-01, 4.39162342628293e-01, 4.35196660593874e-01, 4.30516363616078e-01,\n                                                4.25083886213088e-01, 4.18876228544420e-01, 4.11886759303826e-01, 4.04126282510063e-01, 3.95623277499155e-01,\n                                                3.86423293969656e-01, 3.76587558660475e-01, 3.66190915619683e-01, 3.55319268564543e-01, 3.44066716288637e-01,\n                                                3.32532570382469e-01, 3.20818423275028e-01, 3.09025401186503e-01, 2.97251698976112e-01, 2.85590458556570e-01,\n                                                2.74128023391256e-01, 2.62942579686595e-01, 2.52103179265703e-01, 2.41669127804713e-01, 2.31689713203750e-01,\n                                                2.22204241122100e-01, 2.13242337781821e-01, 2.04824474392055e-01, 1.96962663643532e-01, 1.89661277292842e-01,\n                                                1.82917935215769e-01, 1.76724420361580e-01, 1.71067580330245e-01, 1.65930184112270e-01, 1.61291711077709e-01,\n                                                1.57129057817968e-01, 1.53417156309189e-01, 1.50129503639988e-01, 1.47238608971975e-01, 1.44716367372155e-01,\n                                                1.42534372683926e-01, 1.40664182774799e-01, 1.39077550454800e-01, 1.37746632265120e-01, 1.36644185381243e-01,\n                                                1.35743760260368e-01, 1.35019893604209e-01, 1.34448302942999e-01, 1.34006080912869e-01, 1.33671884350875e-01,\n                                                1.33426110901524e-01, 1.33251054120578e-01, 1.33131027226412e-01, 1.33052445762360e-01, 1.33003860487491e-01,\n                                                1.32975933710782e-01, 1.32961354847140e-01, 1.32954693970547e-01, 1.32952195298614e-01, 1.32951515604262e-01,\n                                                1.32951415282974e-01, 1.32951405353438e-01, 1.32951198633009e-01, 1.32949798078329e-01, 1.32944649589760e-01,\n                                                1.32930926366839e-01, 1.32900897271924e-01, 1.32843402685808e-01, 1.32743465177796e-01, 1.32582063200331e-01,\n                                                1.32336096661561e-01, 1.31978572786181e-01, 1.31479038067994e-01, 1.30804276194297e-01, 1.29919281539230e-01,\n                                                1.28788502521360e-01, 1.27377328793031e-01, 1.25653771778630e-01, 1.23590261486498e-01, 1.21165456820961e-01,\n                                                1.18365945670959e-01, 1.15187699014740e-01, 1.11637143895720e-01, 1.07731735904579e-01, 1.03499943266243e-01,\n                                                9.89805998500515e-02, 9.42216389933037e-02, 8.92782775410979e-02, 8.42107724886887e-02, 7.90819137665153e-02,\n                                                7.39544402076717e-02, 6.88885683281200e-02, 6.39398051645514e-02, 5.91571802186337e-02, 5.45819832940708e-02,\n                                                5.02470418942806e-02, 4.61765211724696e-02, 4.23861872853024e-02, 3.88840453971682e-02, 3.56712480337222e-02,\n                                                3.27431672258882e-02, 3.00905324442482e-02, 2.77005522918756e-02, 2.55579577335538e-02, 2.36459251460275e-02,\n                                                2.19468563096825e-02, 2.04430081514033e-02, 1.91169769374113e-02, 1.79520497008525e-02, 1.69324404022575e-02,\n                                                1.60434303186605e-02, 1.52714321683618e-02, 1.46039961711466e-02, 1.40297741888702e-02, 1.35384557123928e-02,\n                                                1.31206870529041e-02, 1.27679828394491e-02, 1.24726369021460e-02, 1.22276378592261e-02, 1.20265931997210e-02,\n                                                1.18636643298942e-02, 1.17335138845789e-02, 1.16312655644464e-02, 1.15524758323744e-02, 1.14931159873350e-02,\n                                                1.14495624573152e-02, 1.14185926422010e-02, 1.13973833306318e-02, 1.13835086366976e-02, 1.13749345649978e-02,\n                                                1.13700077038033e-02, 1.13674361280260e-02, 1.13662613112808e-02, 1.13658206224159e-02, 1.13657007467936e-02,\n                                                1.13656830534836e-02, 1.13656812283551e-02, 1.13656424847903e-02, 1.13653799946434e-02, 1.13644150999903e-02,\n                                                1.13618434049982e-02, 1.13562171391237e-02, 1.13454491597054e-02, 1.13267454172075e-02, 1.12965738144197e-02,\n                                                1.12506784468991e-02, 1.11841487812683e-02, 1.10915528470912e-02, 1.09671413720207e-02, 1.08051254281065e-02,\n                                                1.06000232685801e-02, 1.03470627512934e-02, 1.00426148207475e-02, 9.68462244033219e-03, 9.27298026746826e-03,\n                                                8.80981574628947e-03, 8.29962447309640e-03, 7.74922312358228e-03, 7.16750184786008e-03, 6.56498285324858e-03,\n                                                5.95321907746893e-03, 5.34409136135139e-03, 4.74907919991097e-03, 4.17858499724844e-03, 3.64138316651008e-03,\n                                                3.14424486067821e-03, 2.69176107110525e-03, 2.28635772856478e-03, 1.92847274152541e-03, 1.61685083833163e-03,\n                                                1.34890813990296e-03, 1.12112169597367e-03, 9.29405780595971e-04, 7.69444226619953e-04, 6.36956873805161e-04,\n                                                5.27889643350932e-04, 4.38531110305007e-04, 3.65569849194003e-04, 3.06111656612984e-04, 2.57672685094690e-04,\n                                                2.18157275114095e-04, 1.85823832936194e-04, 1.59241579069658e-04, 1.37243461693970e-04, 1.18881914559665e-04,\n                                                1.03392287059023e-04, 9.01647450746168e-05, 7.87219972551156e-05, 6.86993509049216e-05, 5.98251178303144e-05,\n                                                5.19014591588984e-05, 4.47868548718588e-05, 3.83812570987629e-05, 3.26142578757072e-05, 2.74359555447745e-05,\n                                                2.28099378745128e-05, 1.87078615283554e-05, 1.51052946648633e-05, 1.19786446504122e-05, 9.30305500901341e-06,\n                                                7.05114925381167e-06, 5.19246901831139e-06, 3.69343612760531e-06, 2.51767674797065e-06, 1.62657447333459e-06,\n                                                9.79959594360480e-07, 5.36879525725453e-07, 9.94759830064140e-14, 9.94759830064140e-14, 9.94759830064140e-14,\n                                                9.94759830064140e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.07000000000000e+02, 1.06999999442502e+02, 1.06999982203573e+02, 1.06999865406926e+02, 1.06999436044688e+02,\n                                                1.06998291481079e+02, 1.06995786421101e+02, 1.06990988126452e+02, 1.06982641341453e+02, 1.06969144019239e+02,\n                                                1.06948534558667e+02, 1.06918490947603e+02, 1.06876342053627e+02, 1.06819091409353e+02, 1.06743454273267e+02,\n                                                1.06645909480703e+02, 1.06522768442693e+02, 1.06370264204967e+02, 1.06184663166812e+02, 1.05962400265919e+02,\n                                                1.05700234781898e+02, 1.05395418589637e+02, 1.05045862717562e+02, 1.04650283244730e+02, 1.04208306066491e+02,\n                                                1.03720513563596e+02, 1.03188425025016e+02, 1.02614415142274e+02, 1.02001587586008e+02, 1.01353629441176e+02,\n                                                1.00674673786594e+02, 9.99691908548979e+01, 9.92419147747392e+01, 9.84977972070195e+01, 9.77419670266417e+01,\n                                                9.69796721572696e+01, 9.62161887533335e+01, 9.54567015750758e+01, 9.47061780380604e+01, 9.39692647684358e+01,\n                                                9.32502245889949e+01, 9.25529119982618e+01, 9.18807708445662e+01, 9.12368364765204e+01, 9.06237324320292e+01,\n                                                9.00436606589528e+01, 8.94983893899613e+01, 8.89892437345874e+01, 8.85171026334553e+01, 8.80824038468575e+01,\n                                                8.76851570893471e+01, 8.73249645247857e+01, 8.70010474900828e+01, 8.67122783082119e+01, 8.64572161959806e+01,\n                                                8.62341464463807e+01, 8.60411222039108e+01, 8.58760082292931e+01, 8.57365260666310e+01, 8.56202999924828e+01,\n                                                8.55249030586702e+01, 8.54479024561833e+01, 8.53869033429260e+01, 8.53395902084267e+01, 8.53037648071530e+01,\n                                                8.52773796893023e+01, 8.52585664013433e+01, 8.52456575219738e+01, 8.52372018422879e+01, 8.52319721874615e+01,\n                                                8.52289656029519e+01, 8.52273958797102e+01, 8.52266786567318e+01, 8.52264096010707e+01, 8.52263364113544e+01,\n                                                8.52263256087037e+01, 8.52263241299733e+01, 8.52262892073673e+01, 8.52260526019857e+01, 8.52251828217501e+01,\n                                                8.52228643544197e+01, 8.52177906860700e+01, 8.52080749263831e+01, 8.51911820236295e+01, 8.51638863431278e+01,\n                                                8.51222581152503e+01, 8.50616818705546e+01, 8.49769093902302e+01, 8.48621488231789e+01, 8.47111903796657e+01,\n                                                8.45175673573542e+01, 8.42747491896919e+01, 8.39763607982211e+01, 8.36164199323895e+01, 8.31895816417615e+01,\n                                                8.26913769005109e+01, 8.21184311512219e+01, 8.14686486757862e+01, 8.07413506815865e+01, 7.99373588953012e+01,\n                                                7.90590216196196e+01, 7.81101839940996e+01, 7.70961064419530e+01, 7.60233337904768e+01, 7.48995142676887e+01,\n                                                7.37331682710337e+01, 7.25334172358064e+01, 7.13097007511210e+01, 7.00715210442608e+01, 6.88282431238632e+01,\n                                                6.75889495464694e+01, 6.63623237792328e+01, 6.51565346460424e+01, 6.39791130905308e+01, 6.28368332067162e+01,\n                                                6.17356181073744e+01, 6.06804863227929e+01, 5.96755428357571e+01, 5.87240080328806e+01, 5.78282719060738e+01,\n                                                5.69899602443074e+01, 5.62100025979806e+01, 5.54886961814571e+01, 5.48257637983131e+01, 5.42204064221707e+01,\n                                                5.36713521541469e+01, 5.31769033068529e+01, 5.27349828739888e+01, 5.23431810688505e+01, 5.19988021894433e+01,\n                                                5.16989118468595e+01, 5.14403845240669e+01, 5.12199514271010e+01, 5.10342485758875e+01, 5.08798650152043e+01,\n                                                5.07533908962449e+01, 5.06514649965893e+01, 5.05708210343802e+01, 5.05083319195010e+01, 5.04610508991229e+01,\n                                                5.04262484226674e+01, 5.04014434923033e+01, 5.03844282929027e+01, 5.03732850151336e+01, 5.03663939936446e+01,\n                                                5.03624325673300e+01, 5.03603644115637e+01, 5.03594194691312e+01, 5.03590649910315e+01, 5.03589685646229e+01,\n                                                5.03589543322953e+01, 5.03589529812552e+01, 5.03589254367573e+01, 5.03587388191001e+01, 5.03580527983766e+01,\n                                                5.03562241614400e+01, 5.03522224495729e+01, 5.03445595177023e+01, 5.03312361963104e+01, 5.03097090953359e+01,\n                                                5.02768804035792e+01, 5.02291132547298e+01, 5.01622747848415e+01, 5.00718083239159e+01, 4.99528351831534e+01,\n                                                4.98002851814576e+01, 4.96090534037765e+01, 4.93741787594917e+01, 4.90910378343478e+01, 4.87555454891622e+01,\n                                                4.83643518893889e+01, 4.79150244265925e+01, 4.74062026190470e+01, 4.68377148711269e+01, 4.62106482075575e+01,\n                                                4.55273658593300e+01, 4.47914724605613e+01, 4.40077314761118e+01, 4.31819425947242e+01, 4.23207867982369e+01,\n                                                4.14316439075882e+01, 4.05223840544035e+01, 3.96011341304444e+01, 3.86760247257498e+01, 3.77549310933132e+01,\n                                                3.68452293533250e+01, 3.59535922530043e+01, 3.50858451578645e+01, 3.42468933874524e+01, 3.34407196550690e+01,\n                                                3.26704390809033e+01, 3.19383920345094e+01, 3.12462532002991e+01, 3.05951382253427e+01, 2.99856953496851e+01,\n                                                2.94181763706695e+01, 2.88924872974881e+01, 2.84082229913477e+01, 2.79646916820003e+01, 2.75609349080712e+01,\n                                                2.71957469287541e+01, 2.68676958237407e+01, 2.65751469518427e+01, 2.63162884702911e+01, 2.60891582295763e+01,\n                                                2.58916713829529e+01, 2.57216482698108e+01, 2.55768423737357e+01, 2.54549683187880e+01, 2.53537299176548e+01,\n                                                2.52708482325305e+01, 2.52040894836597e+01, 2.51512924759457e+01, 2.51103950423671e+01, 2.50794588500743e+01,\n                                                2.50566918010186e+01, 2.50404671983383e+01, 2.50293388515391e+01, 2.50220513611821e+01, 2.50175449548687e+01,\n                                                2.50149544326745e+01, 2.50136020086856e+01, 2.50129840891637e+01, 2.50127522885102e+01, 2.50126892333285e+01,\n                                                2.50126799265236e+01, 2.50126790982844e+01, 2.50126627942996e+01, 2.50125523326374e+01, 2.50121462673801e+01,\n                                                2.50110638733619e+01, 2.50086952168689e+01, 2.50041594786964e+01, 2.49962734262059e+01, 2.49835318546380e+01,\n                                                2.49641017155002e+01, 2.49358314879281e+01, 2.48962770846089e+01, 2.48427451707931e+01, 2.47723541715902e+01,\n                                                2.46821124224007e+01, 2.45690118784860e+01, 2.44301345753688e+01, 2.42627676962236e+01, 2.40645217744854e+01,\n                                                2.38334454044480e+01, 2.35681290624796e+01, 2.32677905176317e+01, 2.29323351239365e+01, 2.25623862840756e+01,\n                                                2.21592845830448e+01, 2.17250580652951e+01, 2.12623697849964e+01, 2.07744505976575e+01, 2.02650240489013e+01,\n                                                1.97382263634531e+01, 1.91985198317909e+01, 1.86505950051979e+01, 1.80992578566075e+01, 1.75493022652642e+01,\n                                                1.70053738686902e+01, 1.64718359720052e+01, 1.59526500234645e+01, 1.54512817198009e+01, 1.49706398675908e+01,\n                                                1.45130500996276e+01, 1.40802608338179e+01, 1.36734754457434e+01, 1.32934029017438e+01, 1.29403189534709e+01,\n                                                1.26141309984239e+01, 1.23144413337960e+01, 1.20406053033014e+01, 1.17917824325739e+01, 1.15669799003631e+01,\n                                                1.13650885605907e+01, 1.11849122564427e+01, 1.10251914308611e+01, 1.08846221209353e+01, 1.07618713955478e+01,\n                                                1.06555902048879e+01, 1.05644244872246e+01, 1.04870252389965e+01, 1.04220581066723e+01, 1.03682129065151e+01,\n                                                1.03242133236184e+01, 1.02888268872228e+01, 1.02608751696944e+01, 1.02392440177046e+01, 1.02228935034391e+01,\n                                                1.02108671889476e+01, 1.02023002353444e+01, 1.01964258660852e+01, 1.01925797128599e+01, 1.01902016331537e+01,\n                                                1.01888346858778e+01, 1.01881210778183e+01, 1.01877950384683e+01, 1.01876727321276e+01, 1.01876394620522e+01,\n                                                1.01876345514666e+01, 1.01876341173456e+01, 1.01876256040565e+01, 1.01875679254639e+01, 1.01873558957635e+01,\n                                                1.01867907247626e+01, 1.01855539751676e+01, 1.01831858858841e+01, 1.01790691168667e+01, 1.01724189679745e+01,\n                                                1.01622811090041e+01, 1.01475378044087e+01, 1.01269234907110e+01, 1.00990503311621e+01, 1.00624439985889e+01,\n                                                1.00155894036408e+01, 9.95698539321850e+00, 9.88520662398091e+00, 9.79896993490941e+00, 9.69720170222040e+00,\n                                                9.57910198704660e+00, 9.44420091728890e+00, 9.29240279832680e+00, 9.12401399407067e+00, 8.93975165852697e+00,\n                                                8.74073184222731e+00, 8.52843718540061e+00, 8.30466613367118e+00, 8.07146716399487e+00, 7.83106271735163e+00,\n                                                7.58576828338023e+00, 7.33791230031444e+00, 7.08976218338073e+00, 6.84346087741304e+00, 6.60097692249458e+00,\n                                                6.36406931970623e+00, 6.13426679157240e+00, 5.91285967820137e+00, 5.70090192556633e+00, 5.49922044863111e+00,\n                                                5.30842944726905e+00, 5.12894778067322e+00, 4.96101804599354e+00, 4.80472642681698e+00, 4.66002264307149e+00,\n                                                4.52673947904347e+00, 4.40461144721164e+00, 4.29329221127334e+00, 4.19237046935150e+00, 4.10138409447738e+00,\n                                                4.01983243728885e+00, 3.94718680350333e+00, 3.88289921471578e+00, 3.82640963745723e+00, 3.77715191822691e+00,\n                                                3.73455869071392e+00, 3.69806552717911e+00, 3.66711459172004e+00, 3.64115802214523e+00, 3.61966122286627e+00,\n                                                3.60210619709146e+00, 3.58799498632597e+00, 3.57685322262444e+00, 3.56823373831445e+00, 3.56172012325217e+00,\n                                                3.55693007520225e+00, 3.55351835829764e+00, 3.55117917047066e+00, 3.54964772470400e+00, 3.54870087080376e+00,\n                                                3.54815662234900e+00, 3.54787250418241e+00, 3.54774269476967e+00, 3.54769399983287e+00, 3.54768075372904e+00,\n                                                3.54767879863547e+00, 3.54767862312312e+00, 3.54767515102886e+00, 3.54765162717224e+00, 3.54756515237669e+00,\n                                                3.54733465299684e+00, 3.54683026491020e+00, 3.54586450891873e+00, 3.54418570038735e+00, 3.54147404170627e+00,\n                                                3.53734084734509e+00, 3.53133133567670e+00, 3.52293137386222e+00, 3.51157846515716e+00, 3.49667710704902e+00,\n                                                3.47761841425763e+00, 3.45380359309620e+00, 3.42467048672840e+00, 3.38972201399321e+00, 3.34855494282617e+00,\n                                                3.30088712987875e+00, 3.24658118199682e+00, 3.18566250748631e+00, 3.11832996150848e+00, 3.04495775666157e+00,\n                                                2.96608797645719e+00, 2.88241382898136e+00, 2.79475461448037e+00, 2.70402414338075e+00, 2.61119492444928e+00,\n                                                2.51726076505503e+00, 2.42320044613990e+00, 2.32994486180560e+00, 2.23834950238411e+00, 2.14917349963041e+00,\n                                                2.06306574690618e+00, 1.98055795277344e+00, 1.90206395633990e+00, 1.82788426732120e+00, 1.75821460077901e+00,\n                                                1.69315713776686e+00, 1.63273332493239e+00, 1.57689718903546e+00, 1.52554834869962e+00, 1.47854412418449e+00,\n                                                1.43571035335147e+00, 1.39685070326411e+00, 1.36175441414684e+00, 1.33020252352895e+00, 1.30197269523259e+00,\n                                                1.27684282488997e+00, 1.25459361663131e+00, 1.23501033041475e+00, 1.21788389162624e+00, 1.20301153858651e+00,\n                                                1.19019716290919e+00, 1.17925147464744e+00, 1.16999210034392e+00, 1.16224369827647e+00, 1.15583815176821e+00,\n                                                1.15061487859892e+00, 1.14642127251098e+00, 1.14311327188105e+00, 1.14055603136605e+00, 1.13862465548985e+00,\n                                                1.13720493961112e+00, 1.13619405443085e+00, 1.13550110594116e+00, 1.13504750396984e+00, 1.13476707927678e+00,\n                                                1.13460590103780e+00, 1.13452176252518e+00, 1.13448332146743e+00, 1.13446890130778e+00, 1.13446497871324e+00,\n                                                1.13446439974793e+00, 1.13446434637765e+00, 1.13446327502969e+00, 1.13445601652725e+00, 1.13442933407121e+00,\n                                                1.13435821279249e+00, 1.13420258769710e+00, 1.13390463162011e+00, 1.13338674809444e+00, 1.13255042038800e+00,\n                                                1.13127607285746e+00, 1.12942409909431e+00, 1.12683719653597e+00, 1.12334411213654e+00, 1.11876484194796e+00,\n                                                1.11291723516182e+00, 1.10562483093511e+00, 1.09672561116214e+00, 1.08608119875137e+00, 1.07358589062530e+00,\n                                                1.05917481423977e+00, 1.04283046309905e+00, 1.02458692211366e+00, 1.00453124716175e+00, 9.82801707025018e-01,\n                                                9.59582903073454e-01, 9.35098109632861e-01, 9.09599474403123e-01, 8.83356934585890e-01, 8.56646805179608e-01,\n                                                8.29740967829281e-01, 8.02897443027973e-01, 7.76352897882873e-01, 7.50317371123586e-01, 7.24971233116975e-01,\n                                                7.00464179497047e-01, 6.76915905928993e-01, 6.54418035277331e-01, 6.33036859742063e-01, 6.12816502962886e-01,\n                                                5.93782180753252e-01, 5.75943325229147e-01, 5.59296420920717e-01, 5.43827473483617e-01, 5.29514087302616e-01,\n                                                5.16327166927113e-01, 5.04232280767781e-01, 4.93190736966440e-01, 4.83160424297296e-01, 4.74096468522035e-01,\n                                                4.65951749325896e-01, 4.58677316596763e-01, 4.52222738486867e-01, 4.46536407980346e-01, 4.41565829746295e-01,\n                                                4.37257904800362e-01, 4.33559226716426e-01, 4.30416399570618e-01, 4.27776384242151e-01, 4.25586875988557e-01,\n                                                4.23796712303499e-01, 4.22356306000381e-01, 4.21218094394860e-01, 4.20336991614903e-01, 4.19670827734990e-01,\n                                                4.19180755923037e-01, 4.18831607388341e-01, 4.18592173856226e-01, 4.18435398687990e-01, 4.18338460609888e-01,\n                                                4.18282738161693e-01, 4.18253648145068e-01, 4.18240357160954e-01, 4.18235371332344e-01, 4.18234015073466e-01,\n                                                4.18233814892801e-01, 4.18233795815752e-01, 4.18233406097627e-01, 4.18230765709140e-01, 4.18221059498848e-01,\n                                                4.18195187359146e-01, 4.18138572158099e-01, 4.18030167746537e-01, 4.17841715591422e-01, 4.17537298550201e-01,\n                                                4.17073239654073e-01, 4.16398391217697e-01, 4.15454853478536e-01, 4.14179150493922e-01, 4.12503872611111e-01,\n                                                4.10359768585465e-01, 4.07678236671629e-01, 4.04394124747782e-01, 4.00448708669259e-01, 3.95792681257845e-01,\n                                                3.90388958339429e-01, 3.84215099543368e-01, 3.77265154839193e-01, 3.69550784282779e-01, 3.61101555105989e-01,\n                                                3.51964389823095e-01, 3.42202211264762e-01, 3.31891894627915e-01, 3.21121683947496e-01, 3.09988256011934e-01,\n                                                2.98593618501855e-01, 2.87042014918200e-01, 2.75436982881757e-01, 2.63878681103051e-01, 2.52461568834391e-01,\n                                                2.41272492867779e-01, 2.30389212045125e-01, 2.19879367440598e-01, 2.09799887107792e-01, 2.00196797135277e-01,\n                                                1.91105395886424e-01, 1.82550736376200e-01, 1.74548353572277e-01, 1.67105169595132e-01, 1.60220510472186e-01,\n                                                1.53887172867954e-01, 1.48092487237662e-01, 1.42819334031444e-01, 1.38047080755726e-01, 1.33752418824031e-01,\n                                                1.29910089371492e-01, 1.26493496009559e-01, 1.23475209556062e-01, 1.20827375020994e-01, 1.18522034619218e-01,\n                                                1.16531382490180e-01, 1.14827967330370e-01, 1.13384858506990e-01, 1.12175789635998e-01, 1.11175291274805e-01,\n                                                1.10358821499716e-01, 1.09702899908768e-01, 1.09185247215962e-01, 1.08784929303539e-01, 1.08482501591496e-01,\n                                                1.08260147089652e-01, 1.08101799700862e-01, 1.07993243392727e-01, 1.07922177823426e-01, 1.07878241891584e-01,\n                                                1.07852988391585e-01, 1.07839805325483e-01, 1.07833782224574e-01, 1.07831522808240e-01, 1.07830908197585e-01,\n                                                1.07830817482522e-01, 1.07830808503763e-01, 1.07830621577804e-01, 1.07829355133831e-01, 1.07824699654159e-01,\n                                                1.07812290641121e-01, 1.07785137810012e-01, 1.07733152178511e-01, 1.07642796555098e-01, 1.07496886179391e-01,\n                                                1.07274567308536e-01, 1.06951501497278e-01, 1.06500281073437e-01, 1.05891095650136e-01, 1.05092659361190e-01,\n                                                1.04073393154650e-01, 1.02802835934497e-01, 1.01253233560229e-01, 9.94012278143117e-02, 9.72295416731157e-02,\n                                                9.47285366791704e-02, 9.18975073398798e-02, 8.87455801923096e-02, 8.52921039839742e-02, 8.15664525858892e-02,\n                                                7.76072112729054e-02, 7.34607746326930e-02, 6.91794432342050e-02, 6.48191579853261e-02, 6.04370481112682e-02,\n                                                5.60889852396258e-02, 5.18273298083614e-02, 4.76990282867717e-02, 4.37441753510939e-02, 3.99951014347266e-02,\n                                                3.64759911363706e-02, 3.32029893124712e-02, 3.01847148207059e-02, 2.74230796942305e-02, 2.49143041564110e-02,\n                                                2.26500232677722e-02, 2.06183956818222e-02, 1.88051450283240e-02, 1.71944861784965e-02, 1.57699091782604e-02,\n                                                1.45148110577793e-02, 1.34129790960884e-02, 1.24489382898787e-02, 1.16081811449362e-02, 1.08773001881133e-02,\n                                                1.02440436006503e-02, 9.69731288228104e-03, 9.22711912170371e-03, 8.82451177857035e-03, 8.48149121607378e-03,\n                                                8.19091377597658e-03, 7.94639606057501e-03, 7.74222330917951e-03, 7.57326530406033e-03, 7.43490206228614e-03,\n                                                7.32296060796500e-03, 7.23366331243369e-03, 7.16358759814284e-03, 7.10963619832228e-03, 7.06901663876636e-03,\n                                                7.03922817109515e-03, 7.01805405950040e-03, 7.00355692836752e-03, 6.99407483843117e-03, 6.98821588804321e-03,\n                                                6.98484942240896e-03, 6.98309236017280e-03, 6.98228966633963e-03, 6.98198856797205e-03, 6.98190666379617e-03,\n                                                6.98189457496312e-03, 6.98189332796062e-03, 6.98186685701785e-03, 6.98168751500816e-03, 6.98102827077207e-03,\n                                                6.97927124403463e-03, 6.97542743624524e-03, 6.96807145473599e-03, 6.95529613041401e-03, 6.93469281318926e-03,\n                                                6.90336397626368e-03, 6.85797522015719e-03, 6.79485340465646e-03, 6.71013596043224e-03, 6.59997301420390e-03,\n                                                6.46077856653449e-03, 6.28951971846448e-03, 6.08402450622236e-03, 5.84328051097316e-03, 5.56768984804989e-03,\n                                                5.25924344228201e-03, 4.92158048670888e-03, 4.55990865783917e-03, 4.18077663887573e-03, 3.79171070224515e-03,\n                                                3.40074794964096e-03, 3.01591592926798e-03, 2.64471774087838e-03, 2.29368098554517e-03, 1.96801805854818e-03,\n                                                1.67142691337574e-03, 1.40603988876364e-03, 1.17250811561576e-03, 9.70193828422339e-04, 7.97434002748787e-04,\n                                                6.51835855052241e-04, 5.30567050404329e-04, 4.30610485139482e-04, 3.48964770424232e-04, 2.82785206522362e-04,\n                                                2.29472174481771e-04, 1.86720015165065e-04, 1.52538009459136e-04, 1.25249361275337e-04, 1.03470293083774e-04,\n                                                8.60731427394512e-05, 7.21423557905609e-05, 6.09344368029952e-05, 5.18486745733071e-05, 4.44075509449249e-05,\n                                                3.82405293635202e-05, 3.30659415368473e-05, 2.86706900851641e-05, 2.48914519005439e-05, 2.16010998599359e-05,\n                                                1.87011304433327e-05, 1.61179538764600e-05, 1.38000441296526e-05, 1.17140869804189e-05, 9.83999069603669e-06,\n                                                8.16569992423410e-06, 6.68285720450967e-06, 5.38386359494325e-06, 4.26031513711678e-06, 3.30244611745911e-06,\n                                                2.49913576055860e-06, 1.83813578757963e-06, 1.30632768957639e-06, 8.89941631498914e-07, 5.74739175362993e-07,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.08000000000000e+02,  1.07999999435170e+02,  1.07999981969510e+02,  1.07999863636722e+02,\n                                                1.07999428627381e+02,  1.07998269009987e+02,  1.07995731001721e+02,  1.07990869593998e+02,\n                                                1.07982413013915e+02,  1.07968738124998e+02,  1.07947857486179e+02,  1.07917418470626e+02,\n                                                1.07874714693332e+02,  1.07816710111017e+02,  1.07740076607526e+02,  1.07641246632878e+02,\n                                                1.07516483326376e+02,  1.07361971112723e+02,  1.07173929419444e+02,  1.06948750295675e+02,\n                                                1.06683156935561e+02,  1.06374374636477e+02,  1.06020299613914e+02,  1.05619646226445e+02,\n                                                1.05172051757223e+02,  1.04678121665393e+02,  1.04139407415619e+02,  1.03558321842897e+02,\n                                                1.02938009934562e+02,  1.02282201631711e+02,  1.01595074395506e+02,  1.00881145821762e+02,\n                                                1.00145202478357e+02,  9.93922549732965e+01,  9.86274971064678e+01,  9.78562446120542e+01,\n                                                9.70838393972939e+01,  9.63155251385106e+01,  9.55563189913617e+01,  9.48109091860672e+01,\n                                                9.40835952894315e+01,  9.33782669189362e+01,  9.26984029142185e+01,  9.20470729995129e+01,\n                                                9.14269328030759e+01,  9.08402122224200e+01,  9.02887019020804e+01,  8.97737430959088e+01,\n                                                8.92962244847822e+01,  8.88565874390839e+01,  8.84548396565810e+01,  8.80905762564075e+01,\n                                                8.77630071168341e+01,  8.74709892788571e+01,  8.72130634096592e+01,  8.69874935088213e+01,\n                                                8.67923091843713e+01,  8.66253499041192e+01,  8.64843106419621e+01,  8.63667883018106e+01,\n                                                8.62703282305420e+01,  8.61924700436803e+01,  8.61307919001907e+01,  8.60829522911024e+01,\n                                                8.60467283638036e+01,  8.60200498003975e+01,  8.60010273119252e+01,  8.59879749043702e+01,\n                                                8.59794252168738e+01,  8.59741374231005e+01,  8.59710974148736e+01,  8.59695102415564e+01,\n                                                8.59687850455211e+01,  8.59685129988954e+01,  8.59684389955646e+01,  8.59684280728261e+01,\n                                                8.59684265776574e+01,  8.59683912668340e+01,  8.59681520312297e+01,  8.59672725821237e+01,\n                                                8.59649283419560e+01,  8.59597982745489e+01,  8.59499745198812e+01,  8.59328938628658e+01,\n                                                8.59052948554382e+01,  8.58632041418273e+01,  8.58019551449470e+01,  8.57162416758613e+01,\n                                                8.56002081400728e+01,  8.54475767554203e+01,  8.52518105173539e+01,  8.50063085493366e+01,\n                                                8.47046280302442e+01,  8.43407242549657e+01,  8.39091978171667e+01,  8.34055357719105e+01,\n                                                8.28263324124377e+01,  8.21694755053152e+01,  8.14342858968708e+01,  8.06216023568959e+01,\n                                                7.97338086082319e+01,  7.87748039991790e+01,  7.77499211076077e+01,  7.66657918544357e+01,\n                                                7.55301609276819e+01,  7.43516475354408e+01,  7.31394687350813e+01,  7.19031555772335e+01,\n                                                7.06523015158377e+01,  6.93963677082190e+01,  6.81445391256828e+01,  6.69056032393206e+01,\n                                                6.56878258927754e+01,  6.44988198728233e+01,  6.33454214604791e+01,  6.22335964347484e+01,\n                                                6.11683900651391e+01,  6.01539231647585e+01,  5.91934256334691e+01,  5.82892937239172e+01,\n                                                5.74431575081204e+01,  5.66559486873312e+01,  5.59279635637084e+01,  5.52589199044662e+01,\n                                                5.46480087827541e+01,  5.40939433137247e+01,  5.35950060192188e+01,  5.31490959381721e+01,\n                                                5.27537759882251e+01,  5.24063206845428e+01,  5.21037641543125e+01,  5.18429483696671e+01,\n                                                5.16205715564345e+01,  5.14332367438110e+01,  5.12775003614474e+01,  5.11499206591589e+01,\n                                                5.10471055358555e+01,  5.09657591447721e+01,  5.09027264218618e+01,  5.08550344927375e+01,\n                                                5.08199297766653e+01,  5.07949095441850e+01,  5.07777467112452e+01,  5.07665067724177e+01,\n                                                5.07595559852194e+01,  5.07555602048625e+01,  5.07534741147293e+01,  5.07525209782880e+01,\n                                                5.07521634263894e+01,  5.07520661638384e+01,  5.07520518080981e+01,  5.07520504453427e+01,\n                                                5.07520226619985e+01,  5.07518344261285e+01,  5.07511424567778e+01,  5.07492979637105e+01,\n                                                5.07452615547691e+01,  5.07375321879510e+01,  5.07240933797447e+01,  5.07023797397876e+01,\n                                                5.06692667161937e+01,  5.06210861524710e+01,  5.05536698074517e+01,  5.04624223009262e+01,\n                                                5.03424239554368e+01,  5.01885626699407e+01,  4.99956922869823e+01,  4.97588129614662e+01,\n                                                4.94732669310572e+01,  4.91349410156935e+01,  4.87404653838357e+01,  4.82873969078631e+01,\n                                                4.77743751133480e+01,  4.72012396331495e+01,  4.65691004578230e+01,  4.58803561199071e+01,\n                                                4.51386597194285e+01,  4.43488371505328e+01,  4.35167643978548e+01,  4.26492103087665e+01,\n                                                4.17536485334652e+01,  4.08380399910978e+01,  3.99105883136403e+01,  3.89794764028533e+01,\n                                                3.80526005703003e+01,  3.71373256172937e+01,  3.62402857650025e+01,  3.53672509984392e+01,\n                                                3.45230675358679e+01,  3.37116682518132e+01,  3.29361378720177e+01,  3.21988114433208e+01,\n                                                3.15013839101182e+01,  3.08450127400202e+01,  3.02304024204920e+01,  2.96578669907551e+01,\n                                                2.91273727084772e+01,  2.86385664527591e+01,  2.81907964213774e+01,  2.77831306891954e+01,\n                                                2.74143772035400e+01,  2.70831067168503e+01,  2.67876786086450e+01,  2.65262687451395e+01,\n                                                2.62968983662730e+01,  2.60974632216908e+01,  2.59257625394121e+01,  2.57795277232007e+01,\n                                                2.56564508533487e+01,  2.55542131002922e+01,  2.54705130802668e+01,  2.54030950290114e+01,\n                                                2.53497764833509e+01,  2.53084749740296e+01,  2.52772330714352e+01,  2.52542410073433e+01,\n                                                2.52378560335963e+01,  2.52266176806563e+01,  2.52192581479314e+01,  2.52147071907912e+01,\n                                                2.52120910578571e+01,  2.52107252632059e+01,  2.52101012346211e+01,  2.52098671422639e+01,\n                                                2.52098034636848e+01,  2.52097940648678e+01,  2.52097932284402e+01,  2.52097767632654e+01,\n                                                2.52096652095191e+01,  2.52092551296737e+01,  2.52081620344539e+01,  2.52057699597408e+01,\n                                                2.52011893770758e+01,  2.51932253527467e+01,  2.51803577929995e+01,  2.51607355090237e+01,\n                                                2.51321856711263e+01,  2.50922399533842e+01,  2.50381782508653e+01,  2.49670902388040e+01,\n                                                2.48759542093311e+01,  2.47617315647237e+01,  2.46214741009235e+01,  2.44524398599295e+01,\n                                                2.42522119934548e+01,  2.40188139454769e+01,  2.37508135645659e+01,  2.34474087783107e+01,\n                                                2.31084884827560e+01,  2.27346644922603e+01,  2.23272736327422e+01,  2.18883527113901e+01,\n                                                2.14205919976653e+01,  2.09272737097354e+01,  2.04122001901315e+01,  1.98796127275469e+01,\n                                                1.93340983868340e+01,  1.87804809980636e+01,  1.82236946834655e+01,  1.76686431735574e+01,\n                                                1.71200535565294e+01,  1.65823367649201e+01,  1.60594676923983e+01,  1.55548953121363e+01,\n                                                1.50714885411709e+01,  1.46115183249288e+01,  1.41766718420327e+01,  1.37680916967456e+01,\n                                                1.33864317231893e+01,  1.30319213336279e+01,  1.27044316941005e+01,  1.24035388427901e+01,\n                                                1.21285807172648e+01,  1.18787066312246e+01,  1.16529189112123e+01,  1.14501071658303e+01,\n                                                1.12690760832659e+01,  1.11085678317502e+01,  1.09672801605492e+01,  1.08438812339799e+01,\n                                                1.07370221218299e+01,  1.06453477408886e+01,  1.05675069052886e+01,  1.05021620018995e+01,\n                                                1.04479986620660e+01,  1.04037356533483e+01,  1.03681350667814e+01,  1.03400127306966e+01,\n                                                1.03182486474756e+01,  1.03017971322360e+01,  1.02896962404413e+01,  1.02810760122142e+01,\n                                                1.02751650404341e+01,  1.02712948904538e+01,  1.02689019609223e+01,  1.02675264734325e+01,\n                                                1.02668084057300e+01,  1.02664803285309e+01,  1.02663572576901e+01,  1.02663237796491e+01,\n                                                1.02663188383680e+01,  1.02663184015334e+01,  1.02663098350287e+01,  1.02662517958910e+01,\n                                                1.02660384407581e+01,  1.02654697364052e+01,  1.02642252529616e+01,  1.02618423478559e+01,\n                                                1.02576997996743e+01,  1.02510079463272e+01,  1.02408063647482e+01,  1.02259700738073e+01,\n                                                1.02052251149737e+01,  1.01771741306766e+01,  1.01403321863637e+01,  1.00931725493013e+01,\n                                                1.00341814469216e+01,  9.96192001149842e+00,  9.87509074255048e+00,  9.77260498442374e+00,\n                                                9.65364725021698e+00,  9.51773185814558e+00,  9.36474739759221e+00,  9.19498507726566e+00,\n                                                9.00914802417725e+00,  8.80834001665919e+00,  8.59403379544725e+00,  8.36802081252706e+00,\n                                                8.13234585410207e+00,  7.88923124278156e+00,  7.64099614784475e+00,  7.38997679899197e+00,\n                                                7.13845302533976e+00,  6.88858551214929e+00,  6.64236659695069e+00,  6.40158559058480e+00,\n                                                6.16780789334733e+00,  5.94236594081703e+00,  5.72635944325486e+00,  5.52066242660104e+00,\n                                                5.32593501543464e+00,  5.14263844547573e+00,  4.97105225199260e+00,  4.81129286656434e+00,\n                                                4.66333298464271e+00,  4.52702110701827e+00,  4.40210067896385e+00,  4.28822829681752e+00,\n                                                4.18499053894416e+00,  4.09191910013217e+00,  4.00850404827730e+00,  3.93420516072499e+00,\n                                                3.86846141973814e+00,  3.81069884288902e+00,  3.76033689085928e+00,  3.71679373235435e+00,\n                                                3.67949065623333e+00,  3.64785590833219e+00,  3.62132819898106e+00,  3.59936008102369e+00,\n                                                3.58142134129299e+00,  3.56700248503080e+00,  3.55561832684495e+00,  3.54681163781717e+00,\n                                                3.54015674074402e+00,  3.53526289848911e+00,  3.53177730781113e+00,  3.52938749563691e+00,\n                                                3.52782291805416e+00,  3.52685558416078e+00,  3.52629956545573e+00,  3.52600930323469e+00,\n                                                3.52587668679865e+00,  3.52582693889036e+00,  3.52581340635646e+00,  3.52581140898654e+00,\n                                                3.52581122967895e+00,  3.52580768250526e+00,  3.52578364997756e+00,  3.52569530530184e+00,\n                                                3.52545982188148e+00,  3.52494452823952e+00,  3.52395789406820e+00,  3.52224280093816e+00,\n                                                3.51947255774009e+00,  3.51525012286710e+00,  3.50911097991138e+00,  3.50053006526858e+00,\n                                                3.48893304727483e+00,  3.47371209191188e+00,  3.45424600993974e+00,  3.42992436464472e+00,\n                                                3.40017474201679e+00,  3.36449197601274e+00,  3.32246772654648e+00,  3.27381848528637e+00,\n                                                3.21840989737613e+00,  3.15627529296033e+00,  3.08762655950844e+00,  3.01285596299581e+00,\n                                                2.93252821409780e+00,  2.84736290725039e+00,  2.75820833676445e+00,  2.66600849919942e+00,\n                                                2.57176571193122e+00,  2.47650162571576e+00,  2.38121943786699e+00,  2.28686982841145e+00,\n                                                2.19432260078082e+00,  2.10434530540579e+00,  2.01758936982385e+00,  1.93458355730797e+00,\n                                                1.85573400750545e+00,  1.78132972228383e+00,  1.71155215763747e+00,  1.64648754927153e+00,\n                                                1.58614069852563e+00,  1.53044913263375e+00,  1.47929678639829e+00,  1.43252659557757e+00,\n                                                1.38995161950326e+00,  1.35136450522928e+00,  1.31654525999129e+00,  1.28526741172209e+00,\n                                                1.25730271218475e+00,  1.23242457996440e+00,  1.21041049813822e+00,  1.19104358084577e+00,\n                                                1.17411351025979e+00,  1.15941702545106e+00,  1.14675812087617e+00,  1.13594808703438e+00,\n                                                1.12680550060952e+00,  1.11915624680255e+00,  1.11283363280978e+00,  1.10767862857584e+00,\n                                                1.10354024912009e+00,  1.10027607214168e+00,  1.09775286571629e+00,  1.09584728440832e+00,\n                                                1.09444657889480e+00,  1.09344925513757e+00,  1.09276561501638e+00,  1.09231811163971e+00,\n                                                1.09204145932681e+00,  1.09188245005258e+00,  1.09179944399888e+00,  1.09176152038559e+00,\n                                                1.09174729433954e+00,  1.09174342454887e+00,  1.09174285337726e+00,  1.09174280072546e+00,\n                                                1.09174174379943e+00,  1.09173458300812e+00,  1.09170825975012e+00,  1.09163809597453e+00,\n                                                1.09148456641745e+00,  1.09119062379924e+00,  1.09067972049597e+00,  1.08985467676442e+00,\n                                                1.08859755072301e+00,  1.08677066382280e+00,  1.08421892087598e+00,  1.08077352864882e+00,\n                                                1.07625715513720e+00,  1.07049047903064e+00,  1.06329995623133e+00,  1.05452648479672e+00,\n                                                1.04403449609906e+00,  1.03172086042397e+00,  1.01752289668579e+00,  1.00142474579829e+00,\n                                                9.83461426968773e-01,  9.63720054616729e-01,  9.42337941838801e-01,  9.19497626071248e-01,\n                                                8.95419179504600e-01,  8.70350458654698e-01,  8.44556155427668e-01,  8.18306601912752e-01,\n                                                7.91867241654955e-01,  7.65489524971215e-01,  7.39403749457821e-01,  7.13814095291767e-01,\n                                                6.88895844779850e-01,  6.64794563980962e-01,  6.41626882827609e-01,  6.19482444028506e-01,\n                                                5.98426591319736e-01,  5.78503416857458e-01,  5.59738865226208e-01,  5.42143678822868e-01,\n                                                5.25716051891692e-01,  5.10443929344859e-01,  4.96306937910774e-01,  4.83277971195491e-01,\n                                                4.71324469431565e-01,  4.60409442620687e-01,  4.50492286158450e-01,  4.41529434058126e-01,\n                                                4.33474888990929e-01,  4.26280662129713e-01,  4.19897150117166e-01,  4.14273471718957e-01,\n                                                4.09357782849952e-01,  4.05097585450676e-01,  4.01440042834849e-01,  3.98332311323728e-01,\n                                                3.95721894994281e-01,  3.93557027046214e-01,  3.91787077613159e-01,  3.90362983874837e-01,\n                                                3.89237694260075e-01,  3.88366614618235e-01,  3.87708040801499e-01,  3.87223559466946e-01,\n                                                3.86878397383583e-01,  3.86641699345404e-01,  3.86486716079375e-01,  3.86390886285881e-01,\n                                                3.86335801013715e-01,  3.86307043667003e-01,  3.86293904683981e-01,  3.86288975876511e-01,\n                                                3.86287635128795e-01,  3.86287437237499e-01,  3.86287418378672e-01,  3.86287033117640e-01,\n                                                3.86284422926707e-01,  3.86274827725742e-01,  3.86249251495570e-01,  3.86193283882847e-01,\n                                                3.86086119671177e-01,  3.85899824207783e-01,  3.85598892894620e-01,  3.85140152284080e-01,\n                                                3.84473047879311e-01,  3.83540357790181e-01,  3.82279360167260e-01,  3.80623464271537e-01,\n                                                3.78504289256796e-01,  3.75854141537189e-01,  3.72608802906683e-01,  3.68710501156684e-01,\n                                                3.64110898285674e-01,  3.58773905023554e-01,  3.52678120611387e-01,  3.45818708169688e-01,\n                                                3.38208549927501e-01,  3.29878580345110e-01,  3.20877262039147e-01,  3.11269239981712e-01,\n                                                3.01133273668114e-01,  2.90559596540930e-01,  2.79646882123885e-01,  2.68499006379528e-01,\n                                                2.57221788561395e-01,  2.45919873064409e-01,  2.34693887542804e-01,  2.23637981944947e-01,\n                                                2.12837821733572e-01,  2.02369077817053e-01,  1.92296426385838e-01,  1.82673044651537e-01,\n                                                1.73540564394116e-01,  1.64929425438359e-01,  1.56859556858350e-01,  1.49341305646104e-01,\n                                                1.42376530935707e-01,  1.35959786080619e-01,  1.30079519757956e-01,  1.24719239277724e-01,\n                                                1.19858592815859e-01,  1.15474340969200e-01,  1.11541200764336e-01,  1.08032556306469e-01,\n                                                1.04921039210765e-01,  1.02178988685097e-01,  9.97788057153599e-02,  9.76932184881321e-02,\n                                                9.58954772735012e-02,  9.43594967988588e-02,  9.30599629357687e-02,  9.19724185237385e-02,\n                                                9.10733405577986e-02,  9.03402179431083e-02,  8.97516357428003e-02,  8.92873684913695e-02,\n                                                8.89284819011209e-02,  8.86574393456101e-02,  8.84582070517581e-02,  8.83163501433728e-02,\n                                                8.82191106851309e-02,  8.81554587529081e-02,  8.81161083034954e-02,  8.80934911528612e-02,\n                                                8.80816845428001e-02,  8.80762903661321e-02,  8.80742668826144e-02,  8.80737164515466e-02,\n                                                8.80736352092839e-02,  8.80736271681002e-02,  8.80734597616026e-02,  8.80723255647382e-02,\n                                                8.80681562399133e-02,  8.80570431405658e-02,  8.80327264019911e-02,  8.79861722920339e-02,\n                                                8.79052623311622e-02,  8.77746191857511e-02,  8.75755956517992e-02,  8.72864532950217e-02,\n                                                8.68827553705813e-02,  8.63379932876853e-02,  8.56244560079773e-02,  8.47143366719081e-02,\n                                                8.35810504375161e-02,  8.22007130075946e-02,  8.05537028082028e-02,  7.86262046422763e-02,\n                                                7.64116131331747e-02,  7.39116649368867e-02,  7.11371734867043e-02,  6.81082613073869e-02,\n                                                6.48540226097509e-02,  6.14115998935603e-02,  5.78247167253778e-02,  5.41417667065645e-02,\n                                                5.04136071868970e-02,  4.66912377855806e-02,  4.30235531635930e-02,  3.94553454069921e-02,\n                                                3.60256965768713e-02,  3.27668526491465e-02,  2.97036144474703e-02,  2.68532277505216e-02,\n                                                2.42257105774684e-02,  2.18245252492864e-02,  1.96474878408566e-02,  1.76878071662259e-02,\n                                                1.59351566394861e-02,  1.43767012260128e-02,  1.29980239349550e-02,  1.17839181330908e-02,\n                                                1.07190308410878e-02,  9.78835698619207e-03,  8.97759526118591e-03,  8.27338313206383e-03,\n                                                7.66343202015207e-03,  7.13658419189755e-03,  6.68281115900982e-03,  6.29317045932964e-03,\n                                                5.95973456675836e-03,  5.67550296621278e-03,  5.43430619991625e-03,  5.23070874227471e-03,\n                                                5.05991573086817e-03,  4.91768689560956e-03,  4.80025963229025e-03,  4.70428215604102e-03,\n                                                4.62675701450621e-03,  4.56499481342121e-03,  4.51657767746383e-03,  4.47933165055758e-03,\n                                                4.45130692240525e-03,  4.43076447346868e-03,  4.41616750067908e-03,  4.40617585287839e-03,\n                                                4.39964168675999e-03,  4.39560465834177e-03,  4.39328518363880e-03,  4.39207461931801e-03,\n                                                4.39152159619027e-03,  4.39131415330962e-03,  4.39125772523141e-03,  4.39124939660474e-03,\n                                                4.39124853751593e-03,  4.39123030150768e-03,  4.39110675162624e-03,  4.39065259656957e-03,\n                                                4.38944219588677e-03,  4.38679432883760e-03,  4.38172742620679e-03,  4.37292879257711e-03,\n                                                4.35874203928677e-03,  4.33717760775210e-03,  4.30595162620762e-03,  4.26255806473819e-03,\n                                                4.20437785649597e-03,  4.12882600416253e-03,  4.03353351080682e-03,  3.91655538267344e-03,\n                                                3.77658948349335e-03,  3.61318470154970e-03,  3.42691217430513e-03,  3.21947185769034e-03,\n                                                2.99370995934112e-03,  2.75353135424439e-03,  2.50370448215165e-03,  2.24957231961298e-03,\n                                                1.99669853191153e-03,  1.75048918210052e-03,  1.51583459476967e-03,  1.29681226053435e-03,\n                                                1.09648139999763e-03,  9.16785820507471e-04,  7.58566794218041e-04,  6.21673514658028e-04,\n                                                5.05146040055138e-04,  4.07436081331980e-04,  3.26627954663650e-04,  2.60629125520495e-04,\n                                                2.07316525361989e-04,  1.64643565241818e-04,  1.30721731864014e-04,  1.03883525824244e-04,\n                                                8.27178506455084e-05,  6.60627948150250e-05,  5.29560632287485e-05,  4.25712250660126e-05,\n                                                3.41822985205908e-05,  2.71796639736976e-05,  2.11177506486138e-05,  1.57478608997508e-05,\n                                                1.10019215213697e-05,  6.92714411343331e-06,  3.59197370869424e-06,  9.23974084798829e-07,\n                                                1.18905575163808e-06,  1.20132817471585e-06,  6.72647942678850e-07,  -1.42108547152020e-14,\n                                                6.76150904155293e-07,  6.77816728966718e-07,  4.84629168795436e-07,  -2.84217094304040e-14,\n                                                -1.42108547152020e-14, 4.47540116965683e-07,  4.82744326291140e-07,  4.54242027103646e-07,\n                                                -1.42108547152020e-14, -2.84217094304040e-14, -2.84217094304040e-14, -2.84217094304040e-14,\n                                                0.00000000000000e+00,  -1.42108547152020e-14, -1.42108547152020e-14, -2.84217094304040e-14,\n                                                -1.42108547152020e-14, -1.42108547152020e-14, -1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.09000000000000e+02,  1.08999999427810e+02,  1.08999981734564e+02,  1.08999861859847e+02,\n                                                1.08999421182120e+02,  1.08998246454203e+02,  1.08995675373458e+02,  1.08990750614722e+02,\n                                                1.08982183825480e+02,  1.08968330699829e+02,  1.08947177858697e+02,  1.08916341943960e+02,\n                                                1.08873081183427e+02,  1.08814319806978e+02,  1.08736686160061e+02,  1.08636566137214e+02,\n                                                1.08510174439826e+02,  1.08353646724503e+02,  1.08163155338530e+02,  1.07935049393994e+02,\n                                                1.07666016029397e+02,  1.07353254080828e+02,  1.06994645143908e+02,  1.06588902094902e+02,\n                                                1.06135673836476e+02,  1.05635589071413e+02,  1.05090231490185e+02,  1.04502051991641e+02,\n                                                1.03874236706859e+02,  1.03210558255387e+02,  1.02515238418180e+02,  1.01792842314529e+02,\n                                                1.01048209373655e+02,  1.00286409755775e+02,  9.95127027686868e+01,  9.87324722532787e+01,\n                                                9.79511257000813e+01,  9.71739651213405e+01,  9.64060567291795e+01,  9.56521299556155e+01,\n                                                9.49165212090229e+01,  9.42031557669459e+01,  9.35155482041938e+01,  9.28568033122126e+01,\n                                                9.22296092922785e+01,  9.16362242246851e+01,  9.10784611867285e+01,  9.05576774537167e+01,\n                                                9.00747712476110e+01,  8.96301873250009e+01,  8.92239311510394e+01,  8.88555906092429e+01,\n                                                8.85243639590181e+01,  8.82290928288502e+01,  8.79682992311853e+01,  8.77402257871766e+01,\n                                                8.75428784983633e+01,  8.73740714803658e+01,  8.72314730850990e+01,  8.71126527972784e+01,\n                                                8.70151282160517e+01,  8.69364113416076e+01,  8.68740532966188e+01,  8.68256865386722e+01,\n                                                8.67890635756238e+01,  8.67620911916909e+01,  8.67428592355591e+01,  8.67296631166166e+01,\n                                                8.67210193013516e+01,  8.67156732944573e+01,  8.67125998198755e+01,  8.67109951742236e+01,\n                                                8.67102619949614e+01,  8.67099869535561e+01,  8.67099121355730e+01,  8.67099010925935e+01,\n                                                8.67098995809656e+01,  8.67098638814296e+01,  8.67096220122475e+01,  8.67087328819383e+01,\n                                                8.67063628360612e+01,  8.67011762976692e+01,  8.66912444103175e+01,  8.66739757597188e+01,\n                                                8.66460730389405e+01,  8.66035192508879e+01,  8.65415966464095e+01,  8.64549409937352e+01,\n                                                8.63376328753483e+01,  8.61833264317330e+01,  8.59854142674747e+01,  8.57372251050552e+01,\n                                                8.54322482887291e+01,  8.50643765684551e+01,  8.46281559996404e+01,  8.41190296588972e+01,\n                                                8.35335606832950e+01,  8.28696204178629e+01,  8.21265296050318e+01,  8.13051445347669e+01,\n                                                8.04078850529701e+01,  7.94387055399851e+01,  7.84030114141825e+01,  7.73075218768967e+01,\n                                                7.61600774996474e+01,  7.49693950968412e+01,  7.37447862024337e+01,  7.24958731765605e+01,\n                                                7.12323420284549e+01,  6.99637524144272e+01,  6.86993939198138e+01,  6.74481589562658e+01,\n                                                6.62184096465569e+01,  6.50178385721426e+01,  6.38533416587124e+01,  6.27309251434363e+01,\n                                                6.16556597099682e+01,  6.06316817290595e+01,  5.96622312345327e+01,  5.87497118974379e+01,\n                                                5.78957593608263e+01,  5.71013085568795e+01,  5.63666555447610e+01,  5.56915132581951e+01,\n                                                5.50750626686793e+01,  5.45160014294605e+01,  5.40125916661970e+01,  5.35627078523320e+01,\n                                                5.31638850785790e+01,  5.28133676689243e+01,  5.25081579915512e+01,  5.22450653547530e+01,\n                                                5.20207549514673e+01,  5.18317968432666e+01,  5.16747149208823e+01,  5.15460356432654e+01,\n                                                5.14423361609529e+01,  5.13602912016286e+01,  5.12967178680321e+01,  5.12486173008397e+01,\n                                                5.12132120178458e+01,  5.11879776760177e+01,  5.11706680279785e+01,  5.11593319641895e+01,\n                                                5.11523217428420e+01,  5.11482917990584e+01,  5.11461878740771e+01,  5.11452265890979e+01,\n                                                5.11448659804583e+01,  5.11447678864050e+01,  5.11447534079369e+01,  5.11447520335313e+01,\n                                                5.11447240126662e+01,  5.11445341675636e+01,  5.11438362825980e+01,  5.11419760213978e+01,\n                                                5.11379051079591e+01,  5.11301096749844e+01,  5.11165560212378e+01,  5.10946568785972e+01,\n                                                5.10612611038344e+01,  5.10126694256412e+01,  5.09446784246225e+01,  5.08526542284983e+01,\n                                                5.07316364011237e+01,  5.05764711521278e+01,  5.03819712966989e+01,  5.01430984127226e+01,\n                                                4.98551605026669e+01,  4.95140163664203e+01,  4.91162760869494e+01,  4.86594858312045e+01,\n                                                4.81422849127114e+01,  4.75645240765230e+01,  4.69273364633478e+01,  4.62331565848925e+01,\n                                                4.54856872334006e+01,  4.46898182650432e+01,  4.38515031660601e+01,  4.29775985822782e+01,\n                                                4.20756696781427e+01,  4.11537629855033e+01,  4.02201509189781e+01,  3.92830588259996e+01,\n                                                3.83503938221496e+01,  3.74295005673163e+01,  3.65269690688212e+01,  3.56485125899981e+01,\n                                                3.47989217300803e+01,  3.39820874959754e+01,  3.32010756217642e+01,  3.24582291043140e+01,\n                                                3.17552765195376e+01,  3.10934289579755e+01,  3.04734560982015e+01,  2.98957395849251e+01,\n                                                2.93603076241498e+01,  2.88668576392242e+01,  2.84147740348227e+01,  2.80031464150775e+01,\n                                                2.76307911279406e+01,  2.72962767569215e+01,  2.69979527290466e+01,  2.67339796570261e+01,\n                                                2.65023601569319e+01,  2.63009693361674e+01,  2.61275846368433e+01,  2.59799150764382e+01,\n                                                2.58556300965880e+01,  2.57523882312437e+01,  2.56678656869689e+01,  2.55997847432083e+01,\n                                                2.55459416720556e+01,  2.55042336772736e+01,  2.54726841837941e+01,  2.54494656879094e+01,\n                                                2.54329193161476e+01,  2.54215702442344e+01,  2.54141381985728e+01,  2.54095423981169e+01,\n                                                2.54069004857837e+01,  2.54055212322675e+01,  2.54048910542854e+01,  2.54046546550882e+01,\n                                                2.54045903489937e+01,  2.54045808575568e+01,  2.54045800128867e+01,  2.54045633854571e+01,\n                                                2.54044507324122e+01,  2.54040366114511e+01,  2.54029327442728e+01,  2.54005170962655e+01,\n                                                2.53958913712614e+01,  2.53878488544322e+01,  2.53748544576745e+01,  2.53550387161944e+01,\n                                                2.53262073181128e+01,  2.52858674765869e+01,  2.52312720282349e+01,  2.51594815193531e+01,\n                                                2.50674436945514e+01,  2.49520887297603e+01,  2.48104372899054e+01,  2.46397171257047e+01,\n                                                2.44374825942003e+01,  2.42017303929330e+01,  2.39310041918127e+01,  2.36244810136850e+01,\n                                                2.32820334019628e+01,  2.29042637008885e+01,  2.24925098889829e+01,  2.20488255937290e+01,\n                                                2.15759390489771e+01,  2.10771958341852e+01,  2.05564881013287e+01,  2.00181697653791e+01,\n                                                1.94669548004579e+01,  1.89077960918266e+01,  1.83457456435046e+01,  1.77858021168183e+01,\n                                                1.72327565410271e+01,  1.66910496454761e+01,  1.61646536827789e+01,  1.56569881404278e+01,\n                                                1.51708735619571e+01,  1.47085223120449e+01,  1.42715607803062e+01,  1.38610749303195e+01,\n                                                1.34776703631070e+01,  1.31215388204414e+01,  1.27925247236052e+01,  1.24901873444188e+01,\n                                                1.22138560918171e+01,  1.19626779124164e+01,  1.17356568629997e+01,  1.15316865516317e+01,\n                                                1.13495764572555e+01,  1.11880732327850e+01,  1.10458780653285e+01,  1.09216610732523e+01,\n                                                1.08140736006839e+01,  1.07217591432271e+01,  1.06433635095404e+01,  1.05775446919130e+01,\n                                                1.05229827836030e+01,  1.04783901412308e+01,  1.04425218488268e+01,  1.04141864005724e+01,\n                                                1.03922563882918e+01,  1.03756788652104e+01,  1.03634849677063e+01,  1.03547983193843e+01,\n                                                1.03488417226237e+01,  1.03449416647987e+01,  1.03425302291208e+01,  1.03411440992077e+01,\n                                                1.03404204742652e+01,  1.03400898577036e+01,  1.03399658342256e+01,  1.03399320970409e+01,\n                                                1.03399271175107e+01,  1.03399266772947e+01,  1.03399180444787e+01,  1.03398595560705e+01,\n                                                1.03396445493396e+01,  1.03390714421878e+01,  1.03378173220833e+01,  1.03354159568555e+01,\n                                                1.03312412914637e+01,  1.03244974881705e+01,  1.03142165483059e+01,  1.02992644962242e+01,\n                                                1.02783569771866e+01,  1.02500848852228e+01,  1.02129502629471e+01,  1.01654121834816e+01,\n                                                1.01059416369917e+01,  1.00330836323536e+01,  9.94552385417266e+00,  9.84215638651393e+00,\n                                                9.72214835164799e+00,  9.58499694573536e+00,  9.43057439577437e+00,  9.25915687945071e+00,\n                                                9.07143444067789e+00,  8.86850032325580e+00,  8.65181979478051e+00,  8.42318026669950e+00,\n                                                8.18462614802944e+00,  7.93838321880527e+00,  7.68677820014604e+00,  7.43215946659264e+00,\n                                                7.17682437434298e+00,  6.92295746689241e+00,  6.67258205979552e+00,  6.42752578073741e+00,\n                                                6.18939900380201e+00,  5.95958410860175e+00,  5.73923320490405e+00,  5.52927222535352e+00,\n                                                5.33040980285816e+00,  5.14314983789642e+00,  4.96780697024873e+00,  4.80452428106030e+00,\n                                                4.65329253337534e+00,  4.51397020481313e+00,  4.38630354627962e+00,  4.26994594886375e+00,\n                                                4.16447601674462e+00,  4.06941390593028e+00,  3.98423566913549e+00,  3.90838552101987e+00,\n                                                3.84128608765161e+00,  3.78234681982964e+00,  3.73097082891502e+00,  3.68656044775017e+00,\n                                                3.64852183223212e+00,  3.61626890626475e+00,  3.58922691932278e+00,  3.56683583658916e+00,\n                                                3.54855372114973e+00,  3.53386020043425e+00,  3.52226003941325e+00,  3.51328677551084e+00,\n                                                3.50650630936124e+00,  3.50152029581257e+00,  3.49796914484152e+00,  3.49553442517957e+00,\n                                                3.49394046598930e+00,  3.49295497370339e+00,  3.49238852021392e+00,  3.49209281139704e+00,\n                                                3.49195770666370e+00,  3.49190702535724e+00,  3.49189323892098e+00,  3.49189120407577e+00,\n                                                3.49189102140397e+00,  3.49188740767713e+00,  3.49186292424581e+00,  3.49177292205798e+00,\n                                                3.49153302075779e+00,  3.49100806092105e+00,  3.49000292336453e+00,  3.48825567939681e+00,\n                                                3.48543354358770e+00,  3.48113210372668e+00,  3.47487828811052e+00,  3.46613748161458e+00,\n                                                3.45432510131626e+00,  3.43882277375607e+00,  3.41899900904755e+00,  3.39423394189686e+00,\n                                                3.36394732013778e+00,  3.32762849818923e+00,  3.28486678303130e+00,  3.23538014401011e+00,\n                                                3.17904010057838e+00,  3.11589060393715e+00,  3.04615897091546e+00,  2.97025742208616e+00,\n                                                2.88877449275165e+00,  2.80245645586598e+00,  2.71217981669831e+00,  2.61891678722621e+00,\n                                                2.52369630285304e+00,  2.42756350925883e+00,  2.33154067240075e+00,  2.23659215557281e+00,\n                                                2.14359552463992e+00,  2.05332008765954e+00,  1.96641336789024e+00,  1.88339526274609e+00,\n                                                1.80465904171064e+00,  1.73047793170781e+00,  1.66101583838153e+00,  1.59634073429349e+00,\n                                                1.53643936867624e+00,  1.48123216884157e+00,  1.43058746342132e+00,  1.38433442329612e+00,\n                                                1.34227435938226e+00,  1.30419022062607e+00,  1.26985429349226e+00,  1.23903421610721e+00,\n                                                1.21149749097968e+00,  1.18701471731505e+00,  1.16536177554249e+00,  1.14632119047663e+00,\n                                                1.12968288203260e+00,  1.11524448862492e+00,  1.10281142183848e+00,  1.09219678390625e+00,\n                                                1.08322125318401e+00,  1.07571301768230e+00,  1.06950781289152e+00,  1.06444909753790e+00,\n                                                1.06038837950226e+00,  1.05718568405837e+00,  1.05471013823808e+00,  1.05284062914386e+00,\n                                                1.05146648122717e+00,  1.05048808880267e+00,  1.04981743613877e+00,  1.04937843883252e+00,\n                                                1.04910704690880e+00,  1.04895106173869e+00,  1.04886963451155e+00,  1.04883243227061e+00,\n                                                1.04881847683522e+00,  1.04881468065709e+00,  1.04881412035054e+00,  1.04881406870032e+00,\n                                                1.04881303187958e+00,  1.04880600730438e+00,  1.04878018478836e+00,  1.04871135578573e+00,\n                                                1.04856074723806e+00,  1.04827239828552e+00,  1.04777122110521e+00,  1.04696189384025e+00,\n                                                1.04572873885655e+00,  1.04393673826533e+00,  1.04143382418015e+00,  1.03805454634413e+00,\n                                                1.03362515813529e+00,  1.02797006967199e+00,  1.02091949455493e+00,  1.01231797199557e+00,\n                                                1.00203329366312e+00,  9.89965226833732e-01,  9.76053329533158e-01,  9.60283126701896e-01,\n                                                9.42689980128549e-01,  9.23360147131461e-01,  9.02428773760150e-01,  8.80074878162901e-01,\n                                                8.56513703403650e-01,  8.31987103796521e-01,  8.06752826437602e-01,  7.81073627438445e-01,\n                                                7.55207111274643e-01,  7.29397017697082e-01,  7.03866440172959e-01,  6.78813189804870e-01,\n                                                6.54407265315427e-01,  6.30790188706271e-01,  6.08075837249615e-01,  5.86352348392026e-01,\n                                                5.65684684263132e-01,  5.46117498114285e-01,  5.27678025267917e-01,  5.10378807478460e-01,\n                                                4.94220138425902e-01,  4.79192181555590e-01,  4.65276756931033e-01,  4.52448822175114e-01,\n                                                4.40677687084190e-01,  4.29928006043525e-01,  4.20160590720926e-01,  4.11333080732319e-01,\n                                                4.03400504221494e-01,  3.96315754883247e-01,  3.90030007483986e-01,  3.84493090508954e-01,\n                                                3.79653831992655e-01,  3.75460392532347e-01,  3.71860597575164e-01,  3.68802278985910e-01,\n                                                3.66233633417167e-01,  3.64103601993364e-01,  3.62362272293737e-01,  3.60961299684547e-01,\n                                                3.59854340927470e-01,  3.58997488970488e-01,  3.58349694248929e-01,  3.57873155037765e-01,\n                                                3.57533657718292e-01,  3.57300847495608e-01,  3.57148411258834e-01,  3.57054156907978e-01,\n                                                3.56999977430405e-01,  3.56971693010891e-01,  3.56958770116975e-01,  3.56953922372753e-01,\n                                                3.56952603676305e-01,  3.56952409039721e-01,  3.56952390491088e-01,  3.56952011566463e-01,\n                                                3.56949444305542e-01,  3.56940006920468e-01,  3.56914851373091e-01,  3.56859804432347e-01,\n                                                3.56754403487088e-01,  3.56571174578576e-01,  3.56275200234663e-01,  3.55824024240320e-01,\n                                                3.55167938196658e-01,  3.54250688977075e-01,  3.53010635241105e-01,  3.51382363464936e-01,\n                                                3.49298748621337e-01,  3.46693411946447e-01,  3.43503490013759e-01,  3.39672589250910e-01,\n                                                3.35153763385023e-01,  3.29912324411481e-01,  3.23928286709489e-01,  3.17198253447600e-01,\n                                                3.09736585975429e-01,  3.01575748185940e-01,  2.92765782758593e-01,  2.83372946045986e-01,\n                                                2.73477593706104e-01,  2.63171461983575e-01,  2.52554524751716e-01,  2.41731622553544e-01,\n                                                2.30809058486656e-01,  2.19891340287504e-01,  2.09078222338675e-01,  1.98462169105852e-01,\n                                                1.88126325554450e-01,  1.78143042686443e-01,  1.68572969567066e-01,  1.59464689190060e-01,\n                                                1.50854846377086e-01,  1.42768693472448e-01,  1.35220965139254e-01,  1.28216987481849e-01,\n                                                1.21753928470312e-01,  1.15822104877992e-01,  1.10406273794624e-01,  1.05486852222114e-01,\n                                                1.01041024422400e-01,  9.70437120629128e-02,  9.34683957488573e-02,  9.02877876497996e-02,\n                                                8.74743634121558e-02,  8.50007674930993e-02,  8.28401097270302e-02,  8.09661727241178e-02,\n                                                7.93535499846172e-02,  7.79777337524052e-02,  7.68151699143971e-02,  7.58432949158845e-02,\n                                                7.50405668829615e-02,  7.43865000757182e-02,  7.38617085738014e-02,  7.34479618615609e-02,\n                                                7.31282518798935e-02,  7.28868683089274e-02,  7.27094765055369e-02,  7.25831907937362e-02,\n                                                7.24966348202116e-02,  7.24399805103388e-02,  7.24049577947028e-02,  7.23848286543500e-02,\n                                                7.23743210078851e-02,  7.23695203378867e-02,  7.23677194991694e-02,  7.23672296328743e-02,\n                                                7.23671573298361e-02,  7.23671501734486e-02,  7.23670011870183e-02,  7.23659917887716e-02,\n                                                7.23622812348879e-02,  7.23523910353947e-02,  7.23307505067936e-02,  7.22893213657443e-02,\n                                                7.22173228490277e-02,  7.21010804881104e-02,  7.19240231537128e-02,  7.16668534417408e-02,\n                                                7.13079147875391e-02,  7.08237736562438e-02,  7.01900256717352e-02,  6.93823199251540e-02,\n                                                6.83775759667355e-02,  6.71553441750916e-02,  6.56992345588918e-02,  6.39983150052217e-02,\n                                                6.20483618575918e-02,  5.98528380220387e-02,  5.74234804294349e-02,  5.47804017714526e-02,\n                                                5.19516505207918e-02,  4.89722248047713e-02,  4.58825932962412e-02,  4.27268315297766e-02,\n                                                3.95505261485454e-02,  3.63986251568775e-02,  3.33134149831409e-02,  3.03327848016437e-02,\n                                                2.74888990002609e-02,  2.48073470130379e-02,  2.23067846447833e-02,  1.99990308737057e-02,\n                                                1.78895453927339e-02,  1.59781884154029e-02,  1.42601560793452e-02,  1.27269901348228e-02,\n                                                1.13675758802856e-02,  1.01690631991858e-02,  9.11766798040503e-03,  8.19933194338773e-03,\n                                                7.40023592850036e-03,  6.70717425437317e-03,  6.10780588191062e-03,  5.59080245132293e-03,\n                                                5.14591452272839e-03,  4.76397635227954e-03,  4.43686709049018e-03,  4.15744319222711e-03,\n                                                3.91945371235636e-03,  3.71744740257896e-03,  3.54667822574584e-03,  3.40301401244858e-03,\n                                                3.28285142707330e-03,  3.18303916046148e-03,  3.10081031852860e-03,  3.03372431524451e-03,\n                                                2.97961814374048e-03,  2.93656661068553e-03,  2.90285089982945e-03,  2.87693463809546e-03,\n                                                2.85744645601937e-03,  2.84316787120531e-03,  2.83302520081463e-03,  2.82608414102015e-03,\n                                                2.82154565677217e-03,  2.81874190942233e-03,  2.81713111374415e-03,  2.81629044657450e-03,\n                                                2.81590641033347e-03,  2.81576235661873e-03,  2.81572317162215e-03,  2.81571738806008e-03,\n                                                2.81571679147419e-03,  2.81570412784049e-03,  2.81561833118360e-03,  2.81530295438870e-03,\n                                                2.81446243457140e-03,  2.81262378413771e-03,  2.80910563738246e-03,  2.80299720529342e-03,\n                                                2.79315022532955e-03,  2.77818750296888e-03,  2.75653191827985e-03,  2.72645955111273e-03,\n                                                2.68617956781725e-03,  2.63394145777340e-03,  2.56816698026796e-03,  2.48759989607095e-03,\n                                                2.39146166195781e-03,  2.27959659291344e-03,  2.15258670044705e-03,  2.01181577054399e-03,\n                                                1.85946529440173e-03,  1.69843201723552e-03,  1.53216752907781e-03,  1.36445276719144e-03,\n                                                1.19913193738341e-03,  1.03983834284804e-03,  8.89746712104511e-04,  7.51382056236594e-04,\n                                                6.26504902498937e-04,  5.16079551772464e-04,  4.20319072205189e-04,  3.38790832742575e-04,\n                                                2.70560867605241e-04,  2.14354080199541e-04,  1.68709238593578e-04,  1.32112052909861e-04,\n                                                1.03096065274144e-04,  8.03090298830966e-05,  6.25498336432884e-05,  4.87847375012507e-05,\n                                                3.81499966835008e-05,  2.99426932741653e-05,  2.35990768970851e-05,  1.86644215460774e-05,\n                                                1.47652906576923e-05,  1.15958211495126e-05,  8.92350917069962e-06,  6.60832105836562e-06,\n                                                4.61986137167969e-06,  3.05131453615104e-06,  2.10827063540364e-06,  1.73161545546918e-06,\n                                                1.43107142491772e-06,  1.00787852375106e-06,  5.09226097733517e-07,  -5.68434188608080e-14,\n                                                4.88448534952113e-07,  4.66638553575649e-07,  -5.68434188608080e-14, -4.26325641456060e-14,\n                                                -5.68434188608080e-14, -4.26325641456060e-14, -4.26325641456060e-14, -5.68434188608080e-14,\n                                                -4.26325641456060e-14, -4.26325641456060e-14, -5.68434188608080e-14, -5.68434188608080e-14,\n                                                -5.68434188608080e-14, -5.68434188608080e-14, -5.68434188608080e-14, -4.26325641456060e-14,\n                                                -5.68434188608080e-14, -4.26325641456060e-14, -5.68434188608080e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.10000000000000e+02, 1.09999999420422e+02, 1.09999981498729e+02, 1.09999860076240e+02, 1.09999413708652e+02,\n                                                1.09998223812965e+02, 1.09995619534426e+02, 1.09990631184589e+02, 1.09981953768375e+02, 1.09967921729917e+02,\n                                                1.09946495653187e+02, 1.09915261331150e+02, 1.09871441468662e+02, 1.09811920416536e+02, 1.09733282816724e+02,\n                                                1.09631867836771e+02, 1.09503841572715e+02, 1.09345290764918e+02, 1.09152340571107e+02, 1.08921297117184e+02,\n                                                1.08648811515151e+02, 1.08332056254895e+02, 1.07968898502955e+02, 1.07558049887376e+02, 1.07099171155727e+02,\n                                                1.06592914411404e+02, 1.06040895611882e+02, 1.05445603633143e+02, 1.04810265574855e+02, 1.04138696562875e+02,\n                                                1.03435162649699e+02, 1.02704276659013e+02, 1.01950931323434e+02, 1.01180256968845e+02, 1.00397578980113e+02,\n                                                9.96083495632909e+01, 9.88180415757653e+01, 9.80320147583036e+01, 9.72553837129282e+01, 9.64929187316926e+01,\n                                                9.57489932382938e+01, 9.50275687697460e+01, 9.43321964027218e+01, 9.36660166777442e+01, 9.30317508235377e+01,\n                                                9.24316853038956e+01, 9.18676556224407e+01, 9.13410349345692e+01, 9.08527307944652e+01, 9.04031911183100e+01,\n                                                8.99924189247080e+01, 8.96199946750656e+01, 8.92851048549803e+01, 8.89865755549753e+01, 8.87229100319055e+01,\n                                                8.84923294466264e+01, 8.82928161261519e+01, 8.81221587755341e+01, 8.79779990729013e+01, 8.78578790364528e+01,\n                                                8.77592884734849e+01, 8.76797117272513e+01, 8.76166728447993e+01, 8.75677782132307e+01, 8.75307556662957e+01,\n                                                8.75034890584782e+01, 8.74840473472510e+01, 8.74707073197738e+01, 8.74619692476374e+01, 8.74565649477880e+01,\n                                                8.74534579609584e+01, 8.74518358190128e+01, 8.74510946455767e+01, 8.74508166052853e+01, 8.74507409715328e+01,\n                                                8.74507298081475e+01, 8.74507282800377e+01, 8.74506921912561e+01, 8.74504476848851e+01, 8.74495488600978e+01,\n                                                8.74471529731270e+01, 8.74419098863232e+01, 8.74318697180458e+01, 8.74144128161933e+01, 8.73862059659252e+01,\n                                                8.73431884692510e+01, 8.72805913352657e+01, 8.71929922104975e+01, 8.70744077677419e+01, 8.69184239773327e+01,\n                                                8.67183629558301e+01, 8.64674829249756e+01, 8.61592052941484e+01, 8.57873601713561e+01, 8.53464389881188e+01,\n                                                8.48318407855139e+01, 8.42400975474054e+01, 8.35690643090280e+01, 8.28180619893421e+01, 8.19879648952375e+01,\n                                                8.10812296982538e+01, 8.01018665925697e+01, 7.90553544258599e+01, 7.79484997276291e+01, 7.67892382553895e+01,\n                                                7.55863832166056e+01, 7.43493396426331e+01, 7.30878213440105e+01, 7.18116084697654e+01, 7.05303615778524e+01,\n                                                6.92534768749036e+01, 6.79899523178915e+01, 6.67482452592964e+01, 6.55361258650603e+01, 6.43605471913719e+01,\n                                                6.32275539146623e+01, 6.21422410885362e+01, 6.11087606624425e+01, 6.01303636652993e+01, 5.92094624903969e+01,\n                                                5.83476996797543e+01, 5.75460144238820e+01, 5.68047030934696e+01, 5.61234738516756e+01, 5.55014972347881e+01,\n                                                5.49374548556380e+01, 5.44295877750227e+01, 5.39757452647503e+01, 5.35734340613833e+01, 5.32198679118945e+01,\n                                                5.29120171809871e+01, 5.26466583909661e+01, 5.24204236753339e+01, 5.22298501701837e+01, 5.20714293149734e+01,\n                                                5.19416558927917e+01, 5.18370764348631e+01, 5.17543363771299e+01, 5.16902251213385e+01, 5.16417179496052e+01,\n                                                5.16060135959333e+01, 5.15805662107920e+01, 5.15631104786936e+01, 5.15516787685981e+01, 5.15446094090585e+01,\n                                                5.15405454719688e+01, 5.15384238009502e+01, 5.15374544080097e+01, 5.15370907578506e+01, 5.15369918364355e+01,\n                                                5.15369772358508e+01, 5.15369758498529e+01, 5.15369475926497e+01, 5.15367561463280e+01, 5.15360523752053e+01,\n                                                5.15341764243921e+01, 5.15300711782770e+01, 5.15222100081333e+01, 5.15085420807351e+01, 5.14864583591195e+01,\n                                                5.14527812410173e+01, 5.14037804948339e+01, 5.13352176968658e+01, 5.12424206710757e+01, 5.11203884175214e+01,\n                                                5.09639256465229e+01, 5.07678043152554e+01, 5.05269475530806e+01, 5.02366291922984e+01, 4.98926799949542e+01,\n                                                4.94916898532896e+01, 4.90311940639415e+01, 4.85098315835297e+01, 4.79274642844420e+01, 4.72852488084279e+01,\n                                                4.65856564658422e+01, 4.58324409883753e+01, 4.50305575207923e+01, 4.41860377561785e+01, 4.33058252979166e+01,\n                                                4.23975735906620e+01, 4.14694087487265e+01, 4.05296634495991e+01, 3.95865955375503e+01, 3.86481131724065e+01,\n                                                3.77215331155579e+01, 3.68133970034093e+01, 3.59293618501600e+01, 3.50741679859220e+01, 3.42516741999300e+01,\n                                                3.34649399031044e+01, 3.27163299916041e+01, 3.20076200290970e+01, 3.13400858152636e+01, 3.07145698415115e+01,\n                                                3.01315249873607e+01, 2.95910412232485e+01, 2.90928632904001e+01, 2.86364066536859e+01, 2.82207765617525e+01,\n                                                2.78447921300876e+01, 2.75070150415938e+01, 2.72057812260198e+01, 2.69392336756939e+01, 2.67053550028906e+01,\n                                                2.65019990155290e+01, 2.63269211761672e+01, 2.61778081744839e+01, 2.60523069736256e+01, 2.59480536390633e+01,\n                                                2.58627020939614e+01, 2.57939527269929e+01, 2.57395805500446e+01, 2.56974623931551e+01, 2.56656024516042e+01,\n                                                2.56421553788256e+01, 2.56254460582383e+01, 2.56139851929442e+01, 2.56064799260167e+01, 2.56018388423477e+01,\n                                                2.55991708970862e+01, 2.55977780521564e+01, 2.55971416641727e+01, 2.55969029353939e+01, 2.55968379955972e+01,\n                                                2.55968284106272e+01, 2.55968275576333e+01, 2.55968107663491e+01, 2.55966970031662e+01, 2.55962788012358e+01,\n                                                2.55951640558095e+01, 2.55927246016182e+01, 2.55880532871993e+01, 2.55799314970672e+01, 2.55668089923449e+01,\n                                                2.55467978327758e+01, 2.55176819731961e+01, 2.54769438508103e+01, 2.54218088473717e+01, 2.53493078789224e+01,\n                                                2.52563575071572e+01, 2.51398558808009e+01, 2.49967915430765e+01, 2.48243607742994e+01, 2.46200878282327e+01,\n                                                2.43819413796540e+01, 2.41084399907463e+01, 2.37987396980323e+01, 2.34526981167495e+01, 2.30709117370283e+01,\n                                                2.26547259569349e+01, 2.22062200542681e+01, 2.17281707356815e+01, 2.12239974403115e+01, 2.06976904501001e+01,\n                                                2.01537203741127e+01, 1.95969265222583e+01, 1.90323832956133e+01, 1.84652478625326e+01, 1.79005975782475e+01,\n                                                1.73432697839989e+01, 1.67977181543835e+01, 1.62678980852073e+01, 1.57571893118145e+01, 1.52683583540556e+01,\n                                                1.48035579990151e+01, 1.43643570170528e+01, 1.39517912167456e+01, 1.35664267301835e+01, 1.32084276106573e+01,\n                                                1.28776217792849e+01, 1.25735614818729e+01, 1.22955762933722e+01, 1.20428181240543e+01, 1.18142986030079e+01,\n                                                1.16089197149817e+01, 1.14254987657789e+01, 1.12627887672963e+01, 1.11194952566610e+01, 1.09942904518335e+01,\n                                                1.08858255268761e+01, 1.07927416730493e+01, 1.07136804962285e+01, 1.06472941828658e+01, 1.05922557425249e+01,\n                                                1.05472695040621e+01, 1.05110819069315e+01, 1.04824924937358e+01, 1.04603648820502e+01, 1.04436373810669e+01,\n                                                1.04313328303976e+01, 1.04225671823022e+01, 1.04165563306248e+01, 1.04126207128726e+01, 1.04101872756665e+01,\n                                                1.04087884939058e+01, 1.04080582626439e+01, 1.04077246273916e+01, 1.04075994714647e+01, 1.04075654262232e+01,\n                                                1.04075604012244e+01, 1.04075599569887e+01, 1.04075512453454e+01, 1.04074922228681e+01, 1.04072752528129e+01,\n                                                1.04066969119266e+01, 1.04054313367417e+01, 1.04030080291433e+01, 1.03987951916450e+01, 1.03919896541545e+01,\n                                                1.03816144326053e+01, 1.03665249001285e+01, 1.03454244207843e+01, 1.03168900590631e+01, 1.02794086041413e+01,\n                                                1.02314226171291e+01, 1.01713855242766e+01, 1.00978239705141e+01, 1.00094047810737e+01, 9.90500305258837e+00,\n                                                9.78376723125871e+00, 9.64517666288666e+00, 9.48908712818734e+00, 9.31576037369000e+00, 9.12587461798852e+00,\n                                                8.92051439078965e+00, 8.70113972435162e+00, 8.46953649838207e+00, 8.22775144940609e+00, 7.97801678289079e+00,\n                                                7.72267024379084e+00, 7.46407669446313e+00, 7.20455659232707e+00, 6.94632531738885e+00, 6.69144538095799e+00,\n                                                6.44179163824600e+00, 6.19902820428666e+00, 5.96459509258416e+00, 5.73970260948575e+00, 5.52533196363379e+00,\n                                                5.32224105160019e+00, 5.13097471988308e+00, 4.95187890305606e+00, 4.78511795237175e+00, 4.63069431113600e+00,\n                                                4.48846956732892e+00, 4.35818588180321e+00, 4.23948686582042e+00, 4.13193714433179e+00, 4.03504005495510e+00,\n                                                3.94825315973027e+00, 3.87100145788062e+00, 3.80268836420797e+00, 3.74270465076575e+00, 3.69043563806152e+00,\n                                                3.64526696992809e+00, 3.60658931934320e+00, 3.57380235741358e+00, 3.54631828069792e+00, 3.52356513859787e+00,\n                                                3.50499013770531e+00, 3.49006302841934e+00, 3.47827960542483e+00, 3.46916528237811e+00, 3.46227863704564e+00,\n                                                3.45721477066571e+00, 3.45360828839432e+00, 3.45113568931947e+00, 3.44951695623190e+00, 3.44851615695279e+00,\n                                                3.44794090854222e+00, 3.44764060945757e+00, 3.44750340772940e+00, 3.44745193982224e+00, 3.44743793941666e+00,\n                                                3.44743587299020e+00, 3.44743568748329e+00, 3.44743201767069e+00, 3.44740715425445e+00, 3.44731575526522e+00,\n                                                3.44707213109204e+00, 3.44653902630854e+00, 3.44551829966731e+00, 3.44374397575605e+00, 3.44087815101841e+00,\n                                                3.43651024144005e+00, 3.43016004567563e+00, 3.42128504857948e+00, 3.40929228746091e+00, 3.39355493026977e+00,\n                                                3.37343346065920e+00, 3.34830102922054e+00, 3.31757212741667e+00, 3.28073330230414e+00, 3.23737420475372e+00,\n                                                3.18721691396473e+00, 3.13014127506467e+00, 3.06620398758984e+00, 2.99564943493353e+00, 2.91891076087188e+00,\n                                                2.83660045035779e+00, 2.74949058561084e+00, 2.65848391566770e+00, 2.56457776707306e+00, 2.46882350582250e+00,\n                                                2.37228463354634e+00, 2.27599661076967e+00, 2.18093115454121e+00, 2.08796712385461e+00, 1.99786929494115e+00,\n                                                1.91127546930305e+00, 1.82869157144835e+00, 1.75049377162867e+00, 1.67693626062410e+00, 1.60816311585147e+00,\n                                                1.54422270425948e+00, 1.48508322045028e+00, 1.43064820365436e+00, 1.38077116320763e+00, 1.33526872750501e+00,\n                                                1.29393198719146e+00, 1.25653591326223e+00, 1.22284688895064e+00, 1.19262850260444e+00, 1.16564581375630e+00,\n                                                1.14166833507966e+00, 1.12047197805595e+00, 1.10184019826433e+00, 1.08556455404928e+00, 1.07144486501257e+00,\n                                                1.05928912778542e+00, 1.04891331795196e+00, 1.04014117986456e+00, 1.03280408074134e+00, 1.02674098179985e+00,\n                                                1.02179855704497e+00, 1.01783146954594e+00, 1.01470279565731e+00, 1.01228456998292e+00, 1.01045840852686e+00,\n                                                1.00911615520397e+00, 1.00816048852644e+00, 1.00750542159425e+00, 1.00707662996963e+00, 1.00681154868478e+00,\n                                                1.00665919109935e+00, 1.00657965768045e+00, 1.00654332070917e+00, 1.00652968986196e+00, 1.00652598197927e+00,\n                                                1.00652543470495e+00, 1.00652538425604e+00, 1.00652437155081e+00, 1.00651751036116e+00, 1.00649228846073e+00,\n                                                1.00642506042486e+00, 1.00627795528018e+00, 1.00599631471469e+00, 1.00550680019032e+00, 1.00471631404231e+00,\n                                                1.00351188497966e+00, 1.00176166722332e+00, 9.99317188286255e-01, 9.96016945974532e-01, 9.91691394198256e-01,\n                                                9.86169265812862e-01, 9.79285059798286e-01, 9.70887376991584e-01, 9.60847638381324e-01, 9.49068584998301e-01,\n                                                9.35491865846373e-01, 9.20103997264036e-01, 9.02940044248268e-01, 8.84084538966107e-01, 8.63669402976328e-01,\n                                                8.41868947136078e-01, 8.18892340829521e-01, 7.94974217488516e-01, 7.70364269044450e-01, 7.45316747200320e-01,\n                                                7.20080727489872e-01, 6.94891821334153e-01, 6.69965779674484e-01, 6.45494166643630e-01, 6.21642038457594e-01,\n                                                5.98547375054764e-01, 5.76321897154372e-01, 5.55052859786869e-01, 5.34805432472339e-01, 5.15625336482969e-01,\n                                                4.97541490122231e-01, 4.80568495890793e-01, 4.64708876421412e-01, 4.49955022673322e-01, 4.36290856549221e-01,\n                                                4.23693232709667e-01, 4.12133114548951e-01, 4.01576561142477e-01, 3.91985559124151e-01, 3.83318728672265e-01,\n                                                3.75531927882719e-01, 3.68578775736665e-01, 3.62411110937487e-01, 3.56979401984631e-01, 3.52233122639689e-01,\n                                                3.48121106002949e-01, 3.44591889372623e-01, 3.41594060587795e-01, 3.39076614462755e-01, 3.36989325125501e-01,\n                                                3.35283136619637e-01, 3.33910570166580e-01, 3.32826142266057e-01, 3.31986783651288e-01, 3.31352245376635e-01,\n                                                3.30885475358983e-01, 3.30552946852407e-01, 3.30324919851918e-01, 3.30175617435501e-01, 3.30083301553472e-01,\n                                                3.30030236615642e-01, 3.30002534119060e-01, 3.29989877118010e-01, 3.29985129120601e-01, 3.29983837557762e-01,\n                                                3.29983646926095e-01, 3.29983628759095e-01, 3.29983257631284e-01, 3.29980743195122e-01, 3.29971500000198e-01,\n                                                3.29946862099447e-01, 3.29892948051366e-01, 3.29789716868021e-01, 3.29610261624239e-01, 3.29320387691197e-01,\n                                                3.28878522268070e-01, 3.28235999790522e-01, 3.27337762287840e-01, 3.26123503098472e-01, 3.24529265011961e-01,\n                                                3.22489478992395e-01, 3.19939397387984e-01, 3.16817837708868e-01, 3.13070113195892e-01, 3.08650989655831e-01,\n                                                3.03527480567908e-01, 2.97681280347646e-01, 2.91110643481304e-01, 2.83831546802503e-01, 2.75878021591282e-01,\n                                                2.67301605934747e-01, 2.58169937771228e-01, 2.48564576224098e-01, 2.38578195215638e-01, 2.28311333410744e-01,\n                                                2.17868905847325e-01, 2.07356685525724e-01, 1.96877950032714e-01, 1.86530462184422e-01, 1.76403918141617e-01,\n                                                1.66577954920683e-01, 1.57120765081586e-01, 1.48088323036802e-01, 1.39524188190109e-01, 1.31459817889194e-01,\n                                                1.23915300079602e-01, 1.16900402602539e-01, 1.10415833087643e-01, 1.04454609058834e-01, 9.90034501244281e-02,\n                                                9.40441205310947e-02, 8.95546685579518e-02, 8.55105272010235e-02, 8.18854568751419e-02, 7.86523245312196e-02,\n                                                7.57837242542507e-02, 7.32524520801547e-02, 7.10318527278275e-02, 6.90960586201044e-02, 6.74201424420886e-02,\n                                                6.59802040051432e-02, 6.47534107354915e-02, 6.37180089815672e-02, 6.28533207612918e-02, 6.21397377050670e-02,\n                                                6.15587209169490e-02, 6.10928123776944e-02, 6.07256604528317e-02, 6.04420591635915e-02, 6.02279982626612e-02,\n                                                6.00707189669123e-02, 5.99587685772747e-02, 5.98820462679868e-02, 5.98318321237628e-02, 5.98007920501118e-02,\n                                                5.97829524135705e-02, 5.97736400596318e-02, 5.97693855207240e-02, 5.97677895533195e-02, 5.97673554168807e-02,\n                                                5.97672913394405e-02, 5.97672849972213e-02, 5.97671529603474e-02, 5.97662583976586e-02, 5.97629699878723e-02,\n                                                5.97542050418127e-02, 5.97350269626133e-02, 5.96983131691786e-02, 5.96345129977891e-02, 5.95315168156390e-02,\n                                                5.93746591623443e-02, 5.91468793332552e-02, 5.88290613503517e-02, 5.84005705522657e-02, 5.78399950144473e-02,\n                                                5.71260860092764e-02, 5.62388727809093e-02, 5.51609040936825e-02, 5.38785445634318e-02, 5.23832311286867e-02,\n                                                5.06725784351261e-02, 4.87512158478296e-02, 4.66312469740586e-02, 4.43322468583318e-02, 4.18807515942063e-02,\n                                                3.93092460612507e-02, 3.66547110852764e-02, 3.39568430102588e-02, 3.12560978327667e-02, 2.85917318302324e-02,\n                                                2.60000075512039e-02, 2.35127088722749e-02, 2.11560663753403e-02, 1.89501422420619e-02, 1.69086709976654e-02,\n                                                1.50393067405901e-02, 1.33441946322108e-02, 1.18207669747932e-02, 1.04626617415988e-02, 9.26067117042351e-03,\n                                                8.20364592217970e-03, 7.27930199265359e-03, 6.47489926106459e-03, 5.77777953417069e-03, 5.17576669523123e-03,\n                                                4.65744166859849e-03, 4.21231072294859e-03, 3.83088793047648e-03, 3.50471230386518e-03, 3.22631814843533e-03,\n                                                2.98917428169432e-03, 2.78760462131800e-03, 2.61669964731936e-03, 2.47222564745186e-03, 2.35053652956196e-03,\n                                                2.24849131643623e-03, 2.16337917714782e-03, 2.09285292758921e-03, 2.03487129483904e-03, 1.98764981701061e-03,\n                                                1.94961998253973e-03, 1.91939603678293e-03, 1.89574876299048e-03, 1.87758544171857e-03, 1.86393510473692e-03,\n                                                1.85393812012080e-03, 1.84683908757677e-03, 1.84198199541186e-03, 1.83880660988223e-03, 1.83684513440596e-03,\n                                                1.83571830181961e-03, 1.83513023171145e-03, 1.83486159193080e-03, 1.83476082470690e-03, 1.83473341438400e-03,\n                                                1.83472936870999e-03, 1.83472895139403e-03, 1.83472009283037e-03, 1.83466007577238e-03, 1.83443946242789e-03,\n                                                1.83385150843662e-03, 1.83256539531840e-03, 1.83010467002021e-03, 1.82583274624903e-03, 1.81894773412239e-03,\n                                                1.80848925393207e-03, 1.79336009934161e-03, 1.77236543848380e-03, 1.74427145407208e-03, 1.70788372761876e-03,\n                                                1.66214318277014e-03, 1.60623411638028e-03, 1.53969514303753e-03, 1.46252043316508e-03, 1.37523635977743e-03,\n                                                1.27893857008132e-03, 1.17527732585643e-03, 1.06638490684929e-03, 9.54747312476911e-04, 8.43031927871607e-04,\n                                                7.33891127893571e-04, 6.29766853577962e-04, 5.32721537666703e-04, 4.44316150932877e-04, 3.65547695651003e-04,\n                                                2.96848284463636e-04, 2.38138365503460e-04, 1.88919578604896e-04, 1.48389170703922e-04, 1.15557967902191e-04,\n                                                8.93570304043578e-05, 6.87232775931079e-05, 5.26602575661173e-05, 4.02754047428289e-05, 3.07983367093811e-05,\n                                                2.35854009105196e-05, 1.81143262238948e-05, 1.39711026889699e-05, 1.08309910160642e-05, 8.43740738787346e-06,\n                                                6.58449592094712e-06, 5.10829531208401e-06, 3.88633888803724e-06, 2.83966740255437e-06, 1.92982049895818e-06,\n                                                1.14730138989216e-06, 4.95838648362223e-07, 2.84217094304040e-14, 4.30612800528252e-07, 3.84612860671041e-07,\n                                                4.26325641456060e-14, 2.84217094304040e-14, 2.84217094304040e-14, 5.68434188608080e-14, 4.26325641456060e-14,\n                                                4.26325641456060e-14, 2.84217094304040e-14, 5.68434188608080e-14, 4.26325641456060e-14, 2.84217094304040e-14,\n                                                2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14,\n                                                4.26325641456060e-14, 2.84217094304040e-14, 2.84217094304040e-14, 2.84217094304040e-14, 4.26325641456060e-14,\n                                                4.26325641456060e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.11000000000000e+02, 1.10999999413103e+02, 1.10999981265071e+02, 1.10999858309099e+02, 1.10999406304175e+02,\n                                                1.10998201380729e+02, 1.10995564210799e+02, 1.10990512856620e+02, 1.10981725833693e+02, 1.10967516531152e+02,\n                                                1.10945819733785e+02, 1.10914190665558e+02, 1.10869816828221e+02, 1.10809543050022e+02, 1.10729910659010e+02,\n                                                1.10627212515835e+02, 1.10497566561498e+02, 1.10337011103771e+02, 1.10141624634178e+02, 1.09907670862966e+02,\n                                                1.09631765497074e+02, 1.09311055345504e+02, 1.08943393829873e+02, 1.08527491985884e+02, 1.08063022967376e+02,\n                                                1.07550662672320e+02, 1.06992059493056e+02, 1.06389740203524e+02, 1.05746972579617e+02, 1.05067613836904e+02,\n                                                1.04355973879576e+02, 1.03616712919395e+02, 1.02854776812960e+02, 1.02075355920476e+02, 1.01283841407799e+02,\n                                                1.00485753130496e+02, 9.96866280403618e+01, 9.88918819011622e+01, 9.81066759336372e+01, 9.73358198503489e+01,\n                                                9.65837231654852e+01, 9.58543831673110e+01, 9.51513870932551e+01, 9.44779108332186e+01, 9.38367080755295e+01,\n                                                9.32300929347803e+01, 9.26599225116953e+01, 9.21275850023641e+01, 9.16339965193108e+01, 9.11796074836491e+01,\n                                                9.07644179631586e+01, 9.03880006560178e+01, 9.00495300957176e+01, 8.97478168105367e+01, 8.94813454176711e+01,\n                                                8.92483158573547e+01, 8.90466871277807e+01, 8.88742229570342e+01, 8.87285388528679e+01, 8.86071499224300e+01,\n                                                8.85075187714779e+01, 8.84271026950359e+01, 8.83633992761475e+01, 8.83139894317010e+01, 8.82765768974526e+01,\n                                                8.82490231389809e+01, 8.82293767188676e+01, 8.82158962467006e+01, 8.82070661872038e+01, 8.82016049982785e+01,\n                                                8.81984653063878e+01, 8.81968260896003e+01, 8.81960771145615e+01, 8.81957961476250e+01, 8.81957197177547e+01,\n                                                8.81957084368641e+01, 8.81957068926694e+01, 8.81956704240190e+01, 8.81954233439878e+01, 8.81945150582625e+01,\n                                                8.81920939527420e+01, 8.81867956800070e+01, 8.81766498403422e+01, 8.81590092259467e+01, 8.81305055838291e+01,\n                                                8.80870355784516e+01, 8.80237802329823e+01, 8.79352605121848e+01, 8.78154307875440e+01, 8.76578106131741e+01,\n                                                8.74556534872411e+01, 8.72021490798122e+01, 8.68906528523714e+01, 8.65149342513441e+01, 8.60694320144865e+01,\n                                                8.55495029901862e+01, 8.49516497407750e+01, 8.42737126054846e+01, 8.35150141814041e+01, 8.26764481781283e+01,\n                                                8.17605093071265e+01, 8.07712644598075e+01, 7.97142661839998e+01, 7.85964076748540e+01, 7.74257181429520e+01,\n                                                7.62111046940539e+01, 7.49620633772478e+01, 7.36883977997126e+01, 7.23999816068977e+01, 7.11065759191489e+01,\n                                                6.98176823822182e+01, 6.85424016481682e+01, 6.72892817203660e+01, 6.60661646558716e+01, 6.48800547284186e+01,\n                                                6.37370297079898e+01, 6.26422046951931e+01, 6.15997440002350e+01, 6.06129073283479e+01, 5.96841140254907e+01,\n                                                5.88150119625396e+01, 5.80065429727433e+01, 5.72590019834502e+01, 5.65720905407447e+01, 5.59449669488237e+01,\n                                                5.53762952067949e+01, 5.48642941153630e+01, 5.44067870315532e+01, 5.40012521515444e+01, 5.36448729790554e+01,\n                                                5.33345886853388e+01, 5.30671442279788e+01, 5.28391402393993e+01, 5.26470827502940e+01, 5.24874327583267e+01,\n                                                5.23566555021824e+01, 5.22512690853003e+01, 5.21678918472034e+01, 5.21032876372223e+01, 5.20544079361499e+01,\n                                                5.20184296218035e+01, 5.19927871045781e+01, 5.19751975817577e+01, 5.19636782793362e+01, 5.19565547634093e+01,\n                                                5.19524596973106e+01, 5.19503217757498e+01, 5.19493449581690e+01, 5.19489785228302e+01, 5.19488788437843e+01,\n                                                5.19488641313751e+01, 5.19488627347620e+01, 5.19488342611395e+01, 5.19486413485523e+01, 5.19479321873781e+01,\n                                                5.19460418694015e+01, 5.19419051848294e+01, 5.19339838205645e+01, 5.19202112597688e+01, 5.18979585426532e+01,\n                                                5.18640238631832e+01, 5.18146486899553e+01, 5.17455626402525e+01, 5.16520586273490e+01, 5.15290987746486e+01,\n                                                5.13714502044113e+01, 5.11738480659843e+01, 5.09311811313099e+01, 5.06386930884408e+01, 5.02921905167719e+01,\n                                                4.98882467110190e+01, 4.94243893696057e+01, 4.88992600324497e+01, 4.83127343460403e+01, 4.76659948606750e+01,\n                                                4.69615518417178e+01, 4.62032116700108e+01, 4.53959955642530e+01, 4.45460125292724e+01, 4.36602896814514e+01,\n                                                4.27465620727509e+01, 4.18130253351713e+01, 4.08680595063850e+01, 3.99199404445343e+01, 3.89765630227708e+01,\n                                                3.80452037648310e+01, 3.71323471385746e+01, 3.62435895855661e+01, 3.53836214450593e+01, 3.45562734730012e+01,\n                                                3.37646054725886e+01, 3.30110117015904e+01, 3.22973210714042e+01, 3.16248777901092e+01, 3.09945972333192e+01,\n                                                3.04069997597276e+01, 2.98622300914034e+01, 2.93600711711283e+01, 2.88999597225717e+01, 2.84810074874439e+01,\n                                                2.81020288337288e+01, 2.77615731881439e+01, 2.74579598796514e+01, 2.71893132162975e+01, 2.69535964133049e+01,\n                                                2.67486438525038e+01, 2.65721917922063e+01, 2.64219079766500e+01, 2.62954206562679e+01, 2.61903474118760e+01,\n                                                2.61043239614820e+01, 2.60350328794151e+01, 2.59802319130184e+01, 2.59377813658625e+01, 2.59056698433120e+01,\n                                                2.58820375369126e+01, 2.58651961662974e+01, 2.58536447061411e+01, 2.58460801022898e+01, 2.58414023220655e+01,\n                                                2.58387132802618e+01, 2.58373094211310e+01, 2.58366680006895e+01, 2.58364273840655e+01, 2.58363619307294e+01,\n                                                2.58363522699621e+01, 2.58363514102228e+01, 2.58363344861542e+01, 2.58362198233382e+01, 2.58357983142736e+01,\n                                                2.58346747533359e+01, 2.58322160070916e+01, 2.58275077479068e+01, 2.58193217161774e+01, 2.58060953949457e+01,\n                                                2.57859258712582e+01, 2.57565794863001e+01, 2.57155185958725e+01, 2.56599463250805e+01, 2.55868695622336e+01,\n                                                2.54931795694634e+01, 2.53757484934300e+01, 2.52315387834009e+01, 2.50577211651076e+01, 2.48517955382312e+01,\n                                                2.46117081844147e+01, 2.43359582526296e+01, 2.40236868780347e+01, 2.36747436265193e+01, 2.32897271307589e+01,\n                                                2.28699993272481e+01, 2.24176748235497e+01, 2.19355877899581e+01, 2.14272380148532e+01, 2.08967159111436e+01,\n                                                2.03486046647634e+01, 1.97878578852755e+01, 1.92196538015250e+01, 1.86492316900721e+01, 1.80817211931242e+01,\n                                                1.75219785546383e+01, 1.69744442534994e+01, 1.64430338144642e+01, 1.59310685652609e+01, 1.54412472319015e+01,\n                                                1.49756540055955e+01, 1.45357951186818e+01, 1.41226544302974e+01, 1.37367588435872e+01, 1.33782459761127e+01,\n                                                1.30469286932708e+01, 1.27423533010813e+01, 1.24638500010122e+01, 1.22105754810733e+01, 1.19815482720157e+01,\n                                                1.17756778491580e+01, 1.15917885503550e+01, 1.14286393317635e+01, 1.12849402797403e+01, 1.11593666849813e+01,\n                                                1.10505713804087e+01, 1.09571959471647e+01, 1.08778812966421e+01, 1.08112780338363e+01, 1.07560568943410e+01,\n                                                1.07109194236436e+01, 1.06746089360671e+01, 1.06459216576329e+01, 1.06237178301092e+01, 1.06069324414969e+01,\n                                                1.05945851601933e+01, 1.05857889941387e+01, 1.05797571784115e+01, 1.05758078180938e+01, 1.05733658772478e+01,\n                                                1.05719622052158e+01, 1.05712294203501e+01, 1.05708946182343e+01, 1.05707690245604e+01, 1.05707348602396e+01,\n                                                1.05707298176648e+01, 1.05707293718753e+01, 1.05707206297613e+01, 1.05706614008390e+01, 1.05704436718551e+01,\n                                                1.05698633078278e+01, 1.05685933044605e+01, 1.05661615141122e+01, 1.05619339180078e+01, 1.05551045078489e+01,\n                                                1.05446928176709e+01, 1.05295500862630e+01, 1.05083748992668e+01, 1.04797389231900e+01, 1.04421229699349e+01,\n                                                1.03939631010010e+01, 1.03337057971174e+01, 1.02598704123961e+01, 1.01711162664455e+01, 1.00663109001422e+01,\n                                                9.94459535154303e+00, 9.80544192515337e+00, 9.64869994167874e+00, 9.47462543783813e+00, 9.28389175025623e+00,\n                                                9.07757931221488e+00, 8.85714470367087e+00, 8.62437085582765e+00, 8.38130210460513e+00, 8.13016925044927e+00,\n                                                7.87331063177719e+00, 7.61309522063699e+00, 7.35185282715842e+00, 7.09181483904796e+00, 6.83506696368237e+00,\n                                                6.58351372498407e+00, 6.33885340361900e+00, 6.10256180094028e+00, 5.87588345402983e+00, 5.65982938061209e+00,\n                                                5.45518078015770e+00, 5.26249821258116e+00, 5.08213563661204e+00, 4.91425843315051e+00, 4.75886429804137e+00,\n                                                4.61580575735223e+00, 4.48481307170638e+00, 4.36551644061113e+00, 4.25746665108554e+00, 4.16015358785936e+00,\n                                                4.07302229221847e+00, 3.99548649351237e+00, 3.92693972547208e+00, 3.86676427410370e+00, 3.81433828782177e+00,\n                                                3.76904142050776e+00, 3.73025938254285e+00, 3.69738775154299e+00, 3.66983535049549e+00, 3.64702744210726e+00,\n                                                3.62840891939528e+00, 3.61344759833717e+00, 3.60163764305169e+00, 3.59250308184849e+00, 3.58560130798018e+00,\n                                                3.58052640634740e+00, 3.57691211055322e+00, 3.57443417646721e+00, 3.57281196035368e+00, 3.57180901146535e+00,\n                                                3.57123252879906e+00, 3.57093158577264e+00, 3.57079408992517e+00, 3.57074251170030e+00, 3.57072848128716e+00,\n                                                3.57072641043177e+00, 3.57072622452725e+00, 3.57072254684915e+00, 3.57069763014420e+00, 3.57060603527877e+00,\n                                                3.57036188911557e+00, 3.56982764269993e+00, 3.56880473249230e+00, 3.56702662007406e+00, 3.56415469547959e+00,\n                                                3.55977753438059e+00, 3.55341398604887e+00, 3.54452051990323e+00, 3.53250315463923e+00, 3.51673411849747e+00,\n                                                3.49657313127467e+00, 3.47139285802108e+00, 3.44060767566977e+00, 3.40370444946579e+00, 3.36027358613727e+00,\n                                                3.31003827956300e+00, 3.25287966269046e+00, 3.18885559140733e+00, 3.11821105681321e+00, 3.04137876306577e+00,\n                                                2.95896918636197e+00, 2.87175036844816e+00, 2.78061867863293e+00, 2.68656266407939e+00, 2.59062276610122e+00,\n                                                2.49385000924046e+00, 2.39726672371941e+00, 2.30183195966910e+00, 2.20841357340898e+00, 2.11776813348061e+00,\n                                                2.03052894179977e+00, 1.94720171250751e+00, 1.86816688086175e+00, 1.79368716453047e+00, 1.72391886534500e+00,\n                                                1.65892544539930e+00, 1.59869208540852e+00, 1.54314018062058e+00, 1.49214100221326e+00, 1.44552801379855e+00,\n                                                1.40310756035277e+00, 1.36466782931669e+00, 1.32998611855406e+00, 1.29883453711724e+00, 1.27098431941572e+00,\n                                                1.24620895962896e+00, 1.22428637897526e+00, 1.20500033054222e+00, 1.18814123014744e+00, 1.17350658099099e+00,\n                                                1.16090113722598e+00, 1.15013692850593e+00, 1.14103324479319e+00, 1.13341665846851e+00, 1.12712113906416e+00,\n                                                1.12198829470775e+00, 1.11786775367894e+00, 1.11461767963989e+00, 1.11210539564627e+00, 1.11020807576510e+00,\n                                                1.10881344995887e+00, 1.10782045880275e+00, 1.10713979040420e+00, 1.10669423310195e+00, 1.10641878420292e+00,\n                                                1.10626046671861e+00, 1.10617782182618e+00, 1.10614006322687e+00, 1.10612589908273e+00, 1.10612204613082e+00,\n                                                1.10612147744456e+00, 1.10612142502185e+00, 1.10612037269489e+00, 1.10611324306277e+00, 1.10608703434819e+00,\n                                                1.10601717589545e+00, 1.10586431449002e+00, 1.10557165130999e+00, 1.10506297248742e+00, 1.10424152285256e+00,\n                                                1.10298987760477e+00, 1.10117096528026e+00, 1.09863038089895e+00, 1.09520009342449e+00, 1.09070359028482e+00,\n                                                1.08496240983732e+00, 1.07780389105261e+00, 1.06906982549064e+00, 1.05862554453282e+00, 1.04636883664679e+00,\n                                                1.03223799177670e+00, 1.01621823950221e+00, 9.98345905053696e-01, 9.78709760730197e-01, 9.57449290505238e-01,\n                                                9.34749884900341e-01, 9.10835298946182e-01, 8.85957988934805e-01, 8.60388148411602e-01, 8.34402359524333e-01,\n                                                8.08272752538258e-01, 7.82257436344565e-01, 7.56592756152600e-01, 7.31487690675536e-01, 7.07120459433852e-01,\n                                                6.83637203157247e-01, 6.61152446617905e-01, 6.39750960996494e-01, 6.19490609007755e-01, 6.00405770399121e-01,\n                                                5.82510994511551e-01, 5.65804596231729e-01, 5.50271989199970e-01, 5.35888625505876e-01, 5.22622477298910e-01,\n                                                5.10436048778956e-01, 4.99287945548659e-01, 4.89134052962143e-01, 4.79928387882993e-01, 4.71623691825428e-01,\n                                                4.64171830576433e-01, 4.57524058593762e-01, 4.51631197756754e-01, 4.46443770861109e-01, 4.41912121493544e-01,\n                                                4.37986544047916e-01, 4.34617440782446e-01, 4.31755516878411e-01, 4.29352019270581e-01, 4.27359020373856e-01,\n                                                4.25729743572987e-01, 4.24418923385886e-01, 4.23383189563538e-01, 4.22581461143352e-01, 4.21975333791423e-01,\n                                                4.21529441860855e-01, 4.21211775670628e-01, 4.20993934744146e-01, 4.20851299247374e-01, 4.20763104623916e-01,\n                                                4.20712408317812e-01, 4.20685942262054e-01, 4.20673850155737e-01, 4.20669314062451e-01, 4.20668080142050e-01,\n                                                4.20667898018237e-01, 4.20667880661995e-01, 4.20667526097560e-01, 4.20665123879999e-01, 4.20656293201347e-01,\n                                                4.20632754832297e-01, 4.20581246649363e-01, 4.20482621323885e-01, 4.20311170492297e-01, 4.20034219759643e-01,\n                                                4.19612038332332e-01, 4.18998104688526e-01, 4.18139763879950e-01, 4.16979301073781e-01, 4.15455438264331e-01,\n                                                4.13505235867078e-01, 4.11066348537503e-01, 4.08079547129617e-01, 4.04491380293734e-01, 4.00256815679825e-01,\n                                                3.95341678962325e-01, 3.89724705494515e-01, 3.83399038779018e-01, 3.76373052710036e-01, 3.68670436425518e-01,\n                                                3.60329552601200e-01, 3.51402150031646e-01, 3.41951567011293e-01, 3.32050593938817e-01, 3.21779167836780e-01,\n                                                3.11222050740469e-01, 3.00466606329323e-01, 2.89600745800911e-01, 2.78711075432795e-01, 2.67881251812611e-01,\n                                                2.57190538811173e-01, 2.46712560857290e-01, 2.36514254739731e-01, 2.26655030948294e-01, 2.17186160531838e-01,\n                                                2.08150401988661e-01, 1.99581874748432e-01, 1.91506173274874e-01, 1.83940701632068e-01, 1.76895195453071e-01,\n                                                1.70372388853295e-01, 1.64368779121219e-01, 1.58875442122536e-01, 1.53878855590861e-01, 1.49361694688011e-01,\n                                                1.45303573091297e-01, 1.41681712191257e-01, 1.38471529786614e-01, 1.35647147275989e-01, 1.33181820372542e-01,\n                                                1.31048302660730e-01, 1.29219153892606e-01, 1.27667005917729e-01, 1.26364798763902e-01, 1.25285997873036e-01,\n                                                1.24404801114835e-01, 1.23696341224317e-01, 1.23136886022166e-01, 1.22704035465318e-01, 1.22376911518501e-01,\n                                                1.22136334289948e-01, 1.21964976054201e-01, 1.21847483844050e-01, 1.21770561310257e-01, 1.21723001511668e-01,\n                                                1.21695664107179e-01, 1.21681392898296e-01, 1.21674872580201e-01, 1.21672426634746e-01, 1.21671761283110e-01,\n                                                1.21671663078772e-01, 1.21671653358732e-01, 1.21671451000438e-01, 1.21670079999689e-01, 1.21665040151342e-01,\n                                                1.21651606498858e-01, 1.21622210997657e-01, 1.21565929344484e-01, 1.21468099655900e-01, 1.21310100519466e-01,\n                                                1.21069316560380e-01, 1.20719319265177e-01, 1.20230288370692e-01, 1.19569693576224e-01, 1.18703246688128e-01,\n                                                1.17596119916740e-01, 1.16214406853430e-01, 1.14526779392762e-01, 1.12506268214801e-01, 1.10132069043502e-01,\n                                                1.07391255173695e-01, 1.04280262562639e-01, 1.00806010819298e-01, 9.69865346012853e-02, 9.28510266531788e-02,\n                                                8.84392353368924e-02, 8.38002129679722e-02, 7.89904711930376e-02, 7.40716587741730e-02, 6.91079273546080e-02,\n                                                6.41631844004280e-02, 5.92984438721089e-02, 5.45694719210985e-02, 5.00248887355355e-02, 4.57048341867647e-02,\n                                                4.16402425845916e-02, 3.78527101044028e-02, 3.43548858628964e-02, 3.11512802279594e-02, 2.82393644426548e-02,\n                                                2.56108333984315e-02, 2.32529152259389e-02, 2.11496326716940e-02, 1.92829470961868e-02, 1.76337420751480e-02,\n                                                1.61826268816725e-02, 1.49105587507989e-02, 1.37992961527260e-02, 1.28317035764098e-02, 1.19919323414308e-02,\n                                                1.12655027303390e-02, 1.06393112952219e-02, 1.01015844554979e-02, 9.64179618334526e-03, 9.25056418235215e-03,\n                                                8.91953581540861e-03, 8.64127228960854e-03, 8.40913730463910e-03, 8.21719449822922e-03, 8.06011651667404e-03,\n                                                7.93310732449015e-03, 7.83183837252466e-03, 7.75239840714903e-03, 7.69125598210962e-03, 7.64523311917742e-03,\n                                                7.61148805017342e-03, 7.58750459314683e-03, 7.57108548459939e-03, 7.56034694515506e-03, 7.55371189713117e-03,\n                                                7.54989958672070e-03, 7.54790985024556e-03, 7.54700086777405e-03, 7.54665990042724e-03, 7.54656715126600e-03,\n                                                7.54655346173649e-03, 7.54655204963228e-03, 7.54652207365325e-03, 7.54631898485059e-03, 7.54557245127785e-03,\n                                                7.54358279210976e-03, 7.53923012157998e-03, 7.53090055604844e-03, 7.51643512711553e-03, 7.49310810066106e-03,\n                                                7.45764240942037e-03, 7.40627046197062e-03, 7.33484817619967e-03, 7.23902811660082e-03, 7.11449359113203e-03,\n                                                6.95724920184659e-03, 6.76395480080316e-03, 6.53227984972204e-03, 6.26124530263894e-03, 5.95151244459657e-03,\n                                                5.60557506355508e-03, 5.22781509123149e-03, 4.82439361887543e-03, 4.40296850828759e-03, 3.97225415363778e-03,\n                                                3.54146394622035e-03, 3.11969630475062e-03, 2.71533585802786e-03, 2.33553955912669e-03, 1.98586328590977e-03,\n                                                1.67006115040635e-03, 1.39006279677290e-03, 1.14610929908565e-03, 9.37010250481762e-04, 7.60475091240664e-04,\n                                                6.13470200661936e-04, 4.92558324481251e-04, 3.94187192711115e-04, 3.14908443144191e-04, 2.51523835302692e-04,\n                                                2.01169090630060e-04, 1.61352129026682e-04, 1.29960592317957e-04, 1.05246954603899e-04, 8.57947218122490e-05,\n                                                7.04702207912078e-05, 5.83691252842300e-05, 4.87689712400652e-05, 4.10945705766608e-05, 3.48950021589189e-05,\n                                                2.98252926427267e-05, 2.56269055540770e-05, 2.21064797898407e-05, 1.91165392919856e-05, 1.65419804574185e-05,\n                                                1.42930501709770e-05, 1.23024246647674e-05, 1.05231175382414e-05, 8.92520405670894e-06, 7.49122058607554e-06,\n                                                6.21124605970635e-06, 5.07877305722104e-06, 4.08795062867284e-06, 3.23217768993800e-06, 2.50366923637557e-06,\n                                                1.89354341273429e-06, 1.39208557925485e-06, 9.89003183349269e-07, 6.73612404966661e-07, 4.34968626450427e-07,\n                                                2.84217094304040e-14, 0.00000000000000e+00, 0.00000000000000e+00, 1.42108547152020e-14, 2.84217094304040e-14,\n                                                1.42108547152020e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.12000000000000e+02, 1.11999999405770e+02, 1.11999981031000e+02, 1.11999856538838e+02, 1.11999398886625e+02,\n                                                1.11998178908881e+02, 1.11995508789459e+02, 1.11990394319579e+02, 1.11981497496015e+02, 1.11967110615249e+02,\n                                                1.11945142616351e+02, 1.11913118098543e+02, 1.11868189295626e+02, 1.11807161440287e+02, 1.11726532468061e+02,\n                                                1.11622548853654e+02, 1.11491280312562e+02, 1.11328716671669e+02, 1.11130889747936e+02, 1.10894020886891e+02,\n                                                1.10614690516401e+02, 1.10290019970461e+02, 1.09917849197993e+02, 1.09496888944961e+02, 1.09026825049170e+02,\n                                                1.08508357394034e+02, 1.07943166863130e+02, 1.07333818040023e+02, 1.06683619187003e+02, 1.05996469413373e+02,\n                                                1.05276722395233e+02, 1.04529085869951e+02, 1.03758559192803e+02, 1.02970393261556e+02, 1.02170045422052e+02,\n                                                1.01363103209078e+02, 1.00555167199544e+02, 9.97517083550028e+01, 9.89579337100242e+01, 9.81786919880010e+01,\n                                                9.74184289128127e+01, 9.66811780234568e+01, 9.59705633177313e+01, 9.52897964993789e+01, 9.46416639365981e+01,\n                                                9.40285073746430e+01, 9.34522053156476e+01, 9.29141607046271e+01, 9.24152978922198e+01, 9.19560695022889e+01,\n                                                9.15364723937781e+01, 9.11560712983709e+01, 9.08140286493829e+01, 9.05091393148348e+01, 9.02398692167550e+01,\n                                                9.00043970537529e+01, 8.98006585012874e+01, 8.96263923372346e+01, 8.94791879410442e+01, 8.93565335617950e+01,\n                                                8.92558646639730e+01, 8.91746115589235e+01, 8.91102454320078e+01, 8.90603217958775e+01, 8.90225203521513e+01,\n                                                8.89946802377690e+01, 8.89748296759163e+01, 8.89612091484373e+01, 8.89522873567328e+01, 8.89467694365769e+01,\n                                                8.89435971303857e+01, 8.89419408861457e+01, 8.89411841311580e+01, 8.89409002456997e+01, 8.89408230219211e+01,\n                                                8.89408116238514e+01, 8.89408100636166e+01, 8.89407732161516e+01, 8.89405235696038e+01, 8.89396058492012e+01,\n                                                8.89371595951350e+01, 8.89318062896843e+01, 8.89215550721076e+01, 8.89037312556803e+01, 8.88749316472448e+01,\n                                                8.88310103936805e+01, 8.87670986741929e+01, 8.86776609349666e+01, 8.85565894289427e+01, 8.83973374937668e+01,\n                                                8.81930902223398e+01, 8.79369689550723e+01, 8.76222634317305e+01, 8.72426826641387e+01, 8.67926129251541e+01,\n                                                8.62673691112443e+01, 8.56634246394998e+01, 8.49786055033125e+01, 8.42122364461536e+01, 8.33652311902914e+01,\n                                                8.24401231958059e+01, 8.14410366997343e+01, 8.03735982575912e+01, 7.92447874006917e+01, 7.80627257544281e+01,\n                                                7.68364129699175e+01, 7.55754352584974e+01, 7.42896863926008e+01, 7.29891351089993e+01, 7.16836450426315e+01,\n                                                7.03828243998831e+01, 6.90958760683835e+01, 6.78314367077226e+01, 6.65974174111973e+01, 6.54008708364297e+01,\n                                                6.42479057433194e+01, 6.31436562448111e+01, 6.20922990008251e+01, 6.10971030838894e+01, 6.01604957473434e+01,\n                                                5.92841310056213e+01, 5.84689537431247e+01, 5.77152573549909e+01, 5.70227362468011e+01, 5.63905356904851e+01,\n                                                5.58173011799111e+01, 5.53012284325559e+01, 5.48401142419252e+01, 5.44314078378381e+01, 5.40722622798671e+01,\n                                                5.37595855436043e+01, 5.34900911791537e+01, 5.32603485936271e+01, 5.30668330700758e+01, 5.29059755742027e+01,\n                                                5.27742122388462e+01, 5.26680331890621e+01, 5.25840301144956e+01, 5.25189417450763e+01, 5.24696961713237e+01,\n                                                5.24334487972282e+01, 5.24076146414952e+01, 5.23898937246370e+01, 5.23782883995765e+01, 5.23711116979953e+01,\n                                                5.23669860609432e+01, 5.23648321801895e+01, 5.23638480710869e+01, 5.23634789005057e+01, 5.23633784774132e+01,\n                                                5.23633636551844e+01, 5.23633622481464e+01, 5.23633335619851e+01, 5.23631392094223e+01, 5.23624247548404e+01,\n                                                5.23605203273126e+01, 5.23563527680375e+01, 5.23483722892157e+01, 5.23344969721023e+01, 5.23120782925544e+01,\n                                                5.22778906775216e+01, 5.22281478087206e+01, 5.21585479274279e+01, 5.20643496788255e+01, 5.19404789966218e+01,\n                                                5.17816661262110e+01, 5.15826101198737e+01, 5.13381660748163e+01, 5.10435481626553e+01, 5.06945393344363e+01,\n                                                5.02876967689813e+01, 4.98205410091119e+01, 4.92917166563681e+01, 4.87011137508453e+01, 4.80499416028068e+01,\n                                                4.73407505044046e+01, 4.65774005554173e+01, 4.57649796120715e+01, 4.49096733035945e+01, 4.40185895289146e+01,\n                                                4.30995396366056e+01, 4.21607808967911e+01, 4.12107309716929e+01, 4.02576734950639e+01, 3.93094810457214e+01,\n                                                3.83733838654970e+01, 3.74558075125015e+01, 3.65622910558706e+01, 3.56974827651979e+01, 3.48651969454475e+01,\n                                                3.40685073213641e+01, 3.33098509327818e+01, 3.25911213373104e+01, 3.19137387452029e+01, 3.12786944647249e+01,\n                                                3.06865748909764e+01, 3.01375744468670e+01, 2.96315070500929e+01, 2.91678228550233e+01, 2.87456329934899e+01,\n                                                2.83637415430049e+01, 2.80206819874878e+01, 2.77147550951657e+01, 2.74440658844405e+01, 2.72065584806441e+01,\n                                                2.70000486631117e+01, 2.68222545288545e+01, 2.66708259472531e+01, 2.65433734493090e+01, 2.64374970026969e+01,\n                                                2.63508148619721e+01, 2.62809924094812e+01, 2.62257706484973e+01, 2.61829937927312e+01, 2.61506352259804e+01,\n                                                2.61268209902320e+01, 2.61098499066556e+01, 2.60982094461795e+01, 2.60905865459059e+01, 2.60858727110882e+01,\n                                                2.60831629412730e+01, 2.60817482601929e+01, 2.60811018950996e+01, 2.60808594235638e+01, 2.60807934656465e+01,\n                                                2.60807837304041e+01, 2.60807828640370e+01, 2.60807658095002e+01, 2.60806502627434e+01, 2.60802255042252e+01,\n                                                2.60790932814838e+01, 2.60766155793297e+01, 2.60718710182064e+01, 2.60636218598709e+01, 2.60502935165289e+01,\n                                                2.60299683483108e+01, 2.60003953591602e+01, 2.59590171172741e+01, 2.59030147838508e+01, 2.58293714891747e+01,\n                                                2.57349534214330e+01, 2.56166068954217e+01, 2.54712683945296e+01, 2.52960832358077e+01, 2.50885272628311e+01,\n                                                2.48465250489713e+01, 2.45685577465396e+01, 2.42537541608140e+01, 2.39019599388362e+01, 2.35137817590407e+01,\n                                                2.30906055844129e+01, 2.26345896696356e+01, 2.21486334601689e+01, 2.16363226964145e+01, 2.11018496494482e+01,\n                                                2.05499067635734e+01, 1.99855532571581e+01, 1.94140577572135e+01, 1.88407249448489e+01, 1.82707187595061e+01,\n                                                1.77088971984802e+01, 1.71596731339549e+01, 1.66269119357547e+01, 1.61138710890871e+01, 1.56231809695413e+01,\n                                                1.51568609212350e+01, 1.47163616896269e+01, 1.43026243159401e+01, 1.39161464524966e+01, 1.35570490289893e+01,\n                                                1.32251385622417e+01, 1.29199625852201e+01, 1.26408573498840e+01, 1.23869880435621e+01, 1.21573823252481e+01,\n                                                1.19509581889914e+01, 1.17665471541011e+01, 1.16029136873120e+01, 1.14587716523329e+01, 1.13327984870381e+01,\n                                                1.12236477306014e+01, 1.11299604523949e+01, 1.10503760597657e+01, 1.09835428744134e+01, 1.09281287634981e+01,\n                                                1.08828319928720e+01, 1.08463923405902e+01, 1.08176023762408e+01, 1.07953186843776e+01, 1.07784726978669e+01,\n                                                1.07660807185685e+01, 1.07572526466060e+01, 1.07511989216015e+01, 1.07472352027043e+01, 1.07447843784684e+01,\n                                                1.07433755982717e+01, 1.07426401461655e+01, 1.07423041252930e+01, 1.07421780744096e+01, 1.07421437857156e+01,\n                                                1.07421387247836e+01, 1.07421382773712e+01, 1.07421295034318e+01, 1.07420700588875e+01, 1.07418515372438e+01,\n                                                1.07412690601977e+01, 1.07399944321411e+01, 1.07375537834305e+01, 1.07333107777822e+01, 1.07264564489123e+01,\n                                                1.07160067084539e+01, 1.07008085059270e+01, 1.06795554897714e+01, 1.06508137812863e+01, 1.06130580997638e+01,\n                                                1.05647179480442e+01, 1.05042328847515e+01, 1.04301151026910e+01, 1.03410166656772e+01, 1.02357979242354e+01,\n                                                1.01135929540821e+01, 9.97386746806006e+00, 9.81646465675847e+00, 9.64163489366510e+00, 9.45004622094424e+00,\n                                                9.24277396949792e+00, 9.02126964873348e+00, 8.78731118081635e+00, 8.54293839112428e+00, 8.29037908422666e+00,\n                                                8.03197171650032e+00, 7.77009041602697e+00, 7.50707692766768e+00, 7.24518230002097e+00, 6.98651930985858e+00,\n                                                6.73302525038720e+00, 6.48643405879400e+00, 6.24825675716569e+00, 6.01976952017219e+00, 5.80200901179283e+00,\n                                                5.59577472700428e+00, 5.40163789321153e+00, 5.21995613219009e+00, 5.05089271072926e+00, 4.89443894642309e+00,\n                                                4.75043825019613e+00, 4.61861038084906e+00, 4.49857471706348e+00, 4.38987165880691e+00, 4.29198159530863e+00,\n                                                4.20434117710889e+00, 4.12635687891162e+00, 4.05741602740363e+00, 3.99689559436320e+00, 3.94416912734243e+00,\n                                                3.89861221780397e+00, 3.85960689983372e+00, 3.82654534026700e+00, 3.79883313043072e+00, 3.77589242639495e+00,\n                                                3.75716511323452e+00, 3.74211609335769e+00, 3.73023672334561e+00, 3.72104835196970e+00, 3.71410584824498e+00,\n                                                3.70900095663485e+00, 3.70536528052455e+00, 3.70287267763520e+00, 3.70124085364355e+00, 3.70023196271738e+00,\n                                                3.69965206398599e+00, 3.69934933747014e+00, 3.69921102673250e+00, 3.69915914281439e+00, 3.69914502924533e+00,\n                                                3.69914294611624e+00, 3.69914275910990e+00, 3.69913905963476e+00, 3.69911399525172e+00, 3.69902185750755e+00,\n                                                3.69877626424152e+00, 3.69823885094000e+00, 3.69720987600697e+00, 3.69542121771681e+00, 3.69253225010202e+00,\n                                                3.68812908975961e+00, 3.68172769173189e+00, 3.67278122265003e+00, 3.66069203420869e+00, 3.64482838267993e+00,\n                                                3.62454577966507e+00, 3.59921251556983e+00, 3.56823848550098e+00, 3.53110600059624e+00, 3.48740083754490e+00,\n                                                3.43684143089648e+00, 3.37930391837263e+00, 3.31484077406041e+00, 3.24369105206976e+00, 3.16628082241682e+00,\n                                                3.08321317452270e+00, 2.99524810757696e+00, 2.90327359875636e+00, 2.80826999928060e+00, 2.71127052306238e+00,\n                                                2.61332086957410e+00, 2.51544092727679e+00, 2.41859106957274e+00, 2.32364487289448e+00, 2.23136928200762e+00,\n                                                2.14241245102144e+00, 2.05729880689964e+00, 1.97643038190937e+00, 1.90009316452829e+00, 1.82846710998327e+00,\n                                                1.76163849368595e+00, 1.69961343621706e+00, 1.64233163206954e+00, 1.58967953919623e+00, 1.54150250593776e+00,\n                                                1.49761550917957e+00, 1.45781234346691e+00, 1.42187323191932e+00, 1.38957092676777e+00, 1.36067543340296e+00,\n                                                1.33495753165191e+00, 1.31219128686237e+00, 1.29215574645399e+00, 1.27463600955097e+00, 1.25942384198018e+00,\n                                                1.24631798923303e+00, 1.23512431800357e+00, 1.22565589392659e+00, 1.21773307988984e+00, 1.21118371615819e+00,\n                                                1.20584342075733e+00, 1.20155602636014e+00, 1.19817414869459e+00, 1.19555986185016e+00, 1.19358543861472e+00,\n                                                1.19213410008223e+00, 1.19110070919953e+00, 1.19039233849678e+00, 1.18992864346495e+00, 1.18964197996588e+00,\n                                                1.18947721619273e+00, 1.18939120604449e+00, 1.18935190989778e+00, 1.18933716897715e+00, 1.18933315912903e+00,\n                                                1.18933256728531e+00, 1.18933251272789e+00, 1.18933141754904e+00, 1.18932399759007e+00, 1.18929672161924e+00,\n                                                1.18922401837536e+00, 1.18906493183390e+00, 1.18876034914848e+00, 1.18823094963604e+00, 1.18737602980008e+00,\n                                                1.18607336453125e+00, 1.18418026303522e+00, 1.18153596296074e+00, 1.17796547030120e+00, 1.17328488934616e+00,\n                                                1.16730819228013e+00, 1.15985525260963e+00, 1.15076081763965e+00, 1.13988393758741e+00, 1.12711722486766e+00,\n                                                1.11239521388956e+00, 1.09570105713117e+00, 1.07707084929527e+00, 1.05659502758760e+00, 1.03441654461774e+00,\n                                                1.01072582390158e+00, 9.85752843038213e-01, 9.59756994526558e-01, 9.33015599453981e-01, 9.05812058942374e-01,\n                                                8.78424607816441e-01, 8.51116494255507e-01, 8.24128178998308e-01, 7.97671871666097e-01, 7.71928446205607e-01,\n                                                7.47046541609620e-01, 7.23143483843231e-01, 7.00307570536637e-01, 6.78601237645509e-01, 6.58064663022941e-01,\n                                                6.38719436683033e-01, 6.20572021885422e-01, 6.03616828166210e-01, 5.87838804748600e-01, 5.73215533064101e-01,\n                                                5.59718847593501e-01, 5.47316045564784e-01, 5.35970761111287e-01, 5.25643582263029e-01, 5.16292483723959e-01,\n                                                5.07873138405245e-01, 5.00339158965957e-01, 4.93642309076947e-01, 4.87732713869349e-01, 4.82559090497205e-01,\n                                                4.78069012908719e-01, 4.74209219499201e-01, 4.70925967900840e-01, 4.68165437354941e-01, 4.65874175588382e-01,\n                                                4.63999583680533e-01, 4.62490428995409e-01, 4.61297372931739e-01, 4.60373497183298e-01, 4.59674809644426e-01,\n                                                4.59160709320614e-01, 4.58794388871070e-01, 4.58543153927963e-01, 4.58378640217035e-01, 4.58276912733879e-01,\n                                                4.58218435669025e-01, 4.58187907150645e-01, 4.58173958824716e-01, 4.58168726391804e-01, 4.58167303049379e-01,\n                                                4.58167092967287e-01, 4.58167072946651e-01, 4.58166663952042e-01, 4.58163892961622e-01, 4.58153706629830e-01,\n                                                4.58126554547064e-01, 4.58067137636647e-01, 4.57953365373470e-01, 4.57755571459359e-01, 4.57436036800217e-01,\n                                                4.56948867155077e-01, 4.56240269470456e-01, 4.55249264127147e-01, 4.53908858447846e-01, 4.52147688386873e-01,\n                                                4.49892109576950e-01, 4.47068686252635e-01, 4.43606989058708e-01, 4.39442574302234e-01, 4.34519983403220e-01,\n                                                4.28795578620395e-01, 4.22240025627531e-01, 4.14840249133874e-01, 4.06600724786927e-01, 3.97544024889072e-01,\n                                                3.87710598754310e-01, 3.77157830223041e-01, 3.65958464748047e-01, 3.54198529583996e-01, 3.41974881180136e-01,\n                                                3.29392507500060e-01, 3.16561697095992e-01, 3.03595169715791e-01, 2.90605251343507e-01, 2.77701172214506e-01,\n                                                2.64986567555397e-01, 2.52557262707768e-01, 2.40499421365882e-01, 2.28888123927106e-01, 2.17786421400433e-01,\n                                                2.07244881029979e-01, 1.97301607090438e-01, 1.87982689309749e-01, 1.79303006559749e-01, 1.71267297728065e-01,\n                                                1.63871405992225e-01, 1.57103606256882e-01, 1.50945936273899e-01, 1.45375467355279e-01, 1.40365468040400e-01,\n                                                1.35886431413624e-01, 1.31906952419513e-01, 1.28394454537144e-01, 1.25315775154860e-01, 1.22637625925478e-01,\n                                                1.20326948537112e-01, 1.18351188093484e-01, 1.16678506088732e-01, 1.15277953201542e-01, 1.14119619206406e-01,\n                                                1.13174773544500e-01, 1.12416005836124e-01, 1.11817371146074e-01, 1.11354540432885e-01, 1.11004952609335e-01,\n                                                1.10747961286521e-01, 1.10564966803807e-01, 1.10439522736527e-01, 1.10357405813474e-01, 1.10306639060553e-01,\n                                                1.10277459902491e-01, 1.10262227691138e-01, 1.10255268410626e-01, 1.10252657815863e-01, 1.10251947677568e-01,\n                                                1.10251842862894e-01, 1.10251832488572e-01, 1.10251616509174e-01, 1.10250153225408e-01, 1.10244774166830e-01,\n                                                1.10230436548420e-01, 1.10199063978342e-01, 1.10139000745704e-01, 1.10034609696186e-01, 1.09866045456428e-01,\n                                                1.09609236313332e-01, 1.09236108315969e-01, 1.08715082794575e-01, 1.08011872013662e-01, 1.07090585762862e-01,\n                                                1.05915143457565e-01, 1.04450961680257e-01, 1.02666857066851e-01, 1.00537071392608e-01, 9.80432933709920e-02,\n                                                9.51765249221239e-02, 9.19386239633155e-02, 8.83433563201947e-02, 8.44168100156679e-02, 8.01970673571049e-02,\n                                                7.57330919265655e-02, 7.10828629964340e-02, 6.63108697786186e-02, 6.14851507454546e-02, 5.66741172542322e-02,\n                                                5.19434262898955e-02, 4.73531592166552e-02, 4.29555228268157e-02, 3.87932224978726e-02, 3.48985762870626e-02,\n                                                3.12933566660263e-02, 2.79892757383493e-02, 2.49889791580102e-02, 2.22873877194729e-02, 1.98732230039411e-02,\n                                                1.77305700591859e-02, 1.58403593145806e-02, 1.41816848764762e-02, 1.27329110543997e-02, 1.14725491700796e-02,\n                                                1.03799100401289e-02, 9.43555335874180e-03, 8.62156415287529e-03, 7.92168986720299e-03, 7.32137101168462e-03,\n                                                6.80769512389645e-03, 6.36929927478036e-03, 5.99624140170363e-03, 5.67985602573629e-03, 5.41260576709135e-03,\n                                                5.18793666714146e-03, 5.00014265047355e-03, 4.84424243452963e-03, 4.71587070516932e-03, 4.61118430321505e-03,\n                                                4.52678340292323e-03, 4.45964710868907e-03, 4.40708247181476e-03, 4.36668558613462e-03, 4.33631312732530e-03,\n                                                4.31406245800758e-03, 4.29825824008390e-03, 4.28744339849629e-03, 4.28037229180234e-03, 4.27600407715545e-03,\n                                                4.27349451105385e-03, 4.27218479114799e-03, 4.27158648338377e-03, 4.27136205593115e-03, 4.27130100797513e-03,\n                                                4.27129199748322e-03, 4.27129106802226e-03, 4.27127133738736e-03, 4.27113766167508e-03, 4.27064628860307e-03,\n                                                4.26933672176233e-03, 4.26647205206621e-03, 4.26099078866571e-03, 4.25147420924077e-03, 4.23613410636392e-03,\n                                                4.21282662210842e-03, 4.17909830551366e-03, 4.13227017179452e-03, 4.06956392316715e-03, 3.98827119904865e-03,\n                                                3.88596156412291e-03, 3.76071810613610e-03, 3.61138174135078e-03, 3.43777795467304e-03, 3.24089458814569e-03,\n                                                3.02297843330734e-03, 2.78752339598043e-03, 2.53913444134923e-03, 2.28326839584270e-03, 2.02587227812501e-03,\n                                                1.77295818991752e-03, 1.53016662962102e-03, 1.30237399299915e-03, 1.09339351031679e-03, 9.05802924037857e-04,\n                                                7.40910159763075e-04, 5.98845085619359e-04, 4.78746664981600e-04, 3.79004790772797e-04, 2.97516504673467e-04,\n                                                2.31925054009707e-04, 1.79822259298135e-04, 1.38904720827782e-04, 1.07080442603547e-04, 8.25265866239988e-05,\n                                                6.37045057771957e-05, 4.93448003027197e-05, 3.84185983506313e-05, 3.01076345721185e-05, 2.37765859907313e-05,\n                                                1.89437783433277e-05, 1.52474079442300e-05, 1.24117248958555e-05, 1.02214670363310e-05, 8.50823046505411e-06,\n                                                7.14504287202544e-06, 6.04214939414760e-06, 5.13917638045314e-06, 4.39409677710501e-06, 3.77349847724417e-06,\n                                                3.24798833162276e-06, 2.79250008361487e-06, 2.38833345633793e-06, 2.02407299809693e-06, 1.69453784337747e-06,\n                                                1.39847782065772e-06, 1.13616614783041e-06, 9.07692026430595e-07, 7.12178291450982e-07, 5.47724226862556e-07,\n                                                4.11717834936098e-07, 7.10542735760100e-14, 5.68434188608080e-14, 5.68434188608080e-14, 4.26325641456060e-14,\n                                                5.68434188608080e-14, 5.68434188608080e-14, 7.10542735760100e-14, 7.10542735760100e-14, 5.68434188608080e-14,\n                                                5.68434188608080e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.13000000000000e+02, 1.12999999398462e+02, 1.12999980797724e+02, 1.12999854774590e+02,  1.12999391494268e+02,\n                                                1.12998156513352e+02, 1.12995453556308e+02, 1.12990276184908e+02, 1.12981269932984e+02,  1.12966706075211e+02,\n                                                1.12944467791038e+02, 1.12912049155838e+02, 1.12866567250201e+02, 1.12804787838833e+02,  1.12723165604845e+02,\n                                                1.12617900791052e+02, 1.12485015059864e+02, 1.12320449956215e+02, 1.12120190859479e+02,  1.11880417037851e+02,\n                                                1.11597673986167e+02, 1.11269057965194e+02, 1.10892395887751e+02, 1.10466398639225e+02,  1.09990765103635e+02,\n                                                1.09466219381949e+02, 1.08894474905258e+02, 1.08278133941834e+02, 1.07620544983798e+02,  1.06925648746663e+02,\n                                                1.06197842483678e+02, 1.05441881451578e+02, 1.04662818693142e+02, 1.03865965900275e+02,  1.03056846674559e+02,\n                                                1.02241115860484e+02, 1.01424436742580e+02, 1.00612334203965e+02, 9.98100598723669e+01,  9.90225006966963e+01,\n                                                9.82541383695909e+01, 9.75090428082770e+01, 9.67908749782203e+01, 9.61028824603041e+01,  9.54478841331897e+01,\n                                                9.48282489934352e+01, 9.42458764333204e+01, 9.37021835904557e+01, 9.31981025229023e+01,  9.27340875991453e+01,\n                                                9.23101321087327e+01, 9.19257925623922e+01, 9.15802191426998e+01, 9.12721910024523e+01,  9.10001553979535e+01,\n                                                9.07622698879191e+01, 9.05564469870824e+01, 9.03804007339536e+01, 9.02316946286198e+01,  9.01077903390901e+01,\n                                                9.00060964842620e+01, 8.99240166974366e+01, 8.98589960738097e+01, 8.98085650238447e+01,  8.97703795050488e+01,\n                                                8.97422565980649e+01, 8.97222044366557e+01, 8.97084455988994e+01, 8.96994332183406e+01,  8.96938592742151e+01,\n                                                8.96906547603771e+01, 8.96889817010089e+01, 8.96882172630881e+01, 8.96879304955024e+01,  8.96878524877160e+01,\n                                                8.96878409739283e+01, 8.96878393978533e+01, 8.96878021762978e+01, 8.96875499952387e+01,  8.96866229578147e+01,\n                                                8.96841518688362e+01, 8.96787442170794e+01, 8.96683889362661e+01, 8.96503842044083e+01,  8.96212923263987e+01,\n                                                8.95769254673248e+01, 8.95123655952637e+01, 8.94220213635185e+01, 8.92997237171877e+01,  8.91388606616732e+01,\n                                                8.89325498274589e+01, 8.86738452089657e+01, 8.83559718291593e+01, 8.79725792723114e+01,  8.75180023405302e+01,\n                                                8.69875149535891e+01, 8.63775623471766e+01, 8.56859571425943e+01, 8.49120272375067e+01,  8.40567074066763e+01,\n                                                8.31225708552024e+01, 8.21137999251046e+01, 8.10360953990798e+01, 7.98965225411660e+01,  7.87032939547166e+01,\n                                                7.74655000421546e+01, 7.61928158679253e+01, 7.48952251923468e+01, 7.35827926497652e+01,  7.22654852101972e+01,\n                                                7.09530173208596e+01, 6.96546920363871e+01, 6.83792310636036e+01, 6.71346101711458e+01,  6.59279262129384e+01,\n                                                6.47653156200870e+01, 6.36519293617670e+01, 6.25919553565670e+01, 6.15886716575186e+01,  6.06445132908494e+01,\n                                                5.97611401442586e+01, 5.89394995208417e+01, 5.81798822504444e+01, 5.74819742783091e+01,  5.68449064333902e+01,\n                                                5.62673044072011e+01, 5.57473398106338e+01, 5.52827822167133e+01, 5.48710516257173e+01,  5.45092707626012e+01,\n                                                5.41943168404483e+01, 5.39228726985431e+01, 5.36914774187334e+01, 5.34965765851929e+01,  5.33345722815802e+01,\n                                                5.32018727451331e+01, 5.30949413579464e+01, 5.30103443898370e+01, 5.29447966493294e+01,  5.28952039794186e+01,\n                                                5.28587013779871e+01, 5.28326854484770e+01, 5.28148399072193e+01, 5.28031529942076e+01,  5.27959258498815e+01,\n                                                5.27917712188558e+01, 5.27896022022580e+01, 5.27886111778337e+01, 5.27882394131366e+01,  5.27881382843872e+01,\n                                                5.27881233580052e+01, 5.27881219410802e+01, 5.27880930533462e+01, 5.27878973351055e+01,  5.27871778602425e+01,\n                                                5.27852600512199e+01, 5.27810632105816e+01, 5.27730266686628e+01, 5.27590539018188e+01,  5.27364778368814e+01,\n                                                5.27020503732115e+01, 5.26519588658913e+01, 5.25818718484244e+01, 5.24870155514501e+01,  5.23622817253324e+01,\n                                                5.22023658558521e+01, 5.20019330763932e+01, 5.17558069932250e+01, 5.14591743955373e+01,  5.11077966430908e+01,\n                                                5.06982167114110e+01, 5.02279497792552e+01, 4.96956452178768e+01, 4.91012091396287e+01,  4.84458792823553e+01,\n                                                4.77322475179168e+01, 4.69642287846683e+01, 4.61469776890756e+01, 4.52867548386699e+01,  4.43907447944667e+01,\n                                                4.34668282230355e+01, 4.25233144022982e+01, 4.15686472382365e+01, 4.06111064996679e+01,  3.96585323604453e+01,\n                                                3.87181018967088e+01, 3.77961793168069e+01, 3.68982487697698e+01, 3.60289233532330e+01,  3.51920109782476e+01,\n                                                3.43906106085907e+01, 3.36272124874472e+01, 3.29037823547459e+01, 3.22218196700884e+01,  3.15823901264560e+01,\n                                                3.09861403090373e+01, 3.04333055332902e+01, 2.99237206980243e+01, 2.94568399285902e+01,  2.90317660761964e+01,\n                                                2.86472876509500e+01, 2.83019193178440e+01, 2.79939424206043e+01, 2.77214432862360e+01,  2.74823484772109e+01,\n                                                2.72744572050359e+01, 2.70954716621884e+01, 2.69430261532953e+01, 2.68147157668420e+01,  2.67081250633448e+01,\n                                                2.66208569548461e+01, 2.65505616614153e+01, 2.64949653744027e+01, 2.64518980428813e+01,  2.64193195350044e+01,\n                                                2.63953433158607e+01, 2.63782567338171e+01, 2.63665370229312e+01, 2.63588622112123e+01,  2.63541162701929e+01,\n                                                2.63513880421411e+01, 2.63499637240932e+01, 2.63493129557657e+01, 2.63490688324209e+01,  2.63490024251711e+01,\n                                                2.63489926236081e+01, 2.63489917513390e+01, 2.63489745806195e+01, 2.63488582467081e+01,  2.63484305945295e+01,\n                                                2.63472906583780e+01, 2.63447960757454e+01, 2.63400191869845e+01, 2.63317138121512e+01,  2.63182946120214e+01,\n                                                2.62978308273787e+01, 2.62680560137409e+01, 2.62263951020262e+01, 2.61700096698506e+01,  2.60958616596739e+01,\n                                                2.60007949034327e+01, 2.58816327153652e+01, 2.57352885485644e+01, 2.55588853872594e+01,  2.53498783382327e+01,\n                                                2.51061740135394e+01, 2.48262399987501e+01, 2.45091981553925e+01, 2.41548967347269e+01,  2.37639580500568e+01,\n                                                2.33378002618568e+01, 2.28786330434995e+01, 2.23894270835420e+01, 2.18738566712098e+01,  2.13362138149990e+01,\n                                                2.07812926333370e+01, 2.02142450005767e+01, 1.96404125836151e+01, 1.90651453578067e+01,  1.84936207261720e+01,\n                                                1.79306789235383e+01, 1.73806887421976e+01, 1.68474531378865e+01, 1.63341582120140e+01,  1.58433630143699e+01,\n                                                1.53770229422752e+01, 1.49365369885990e+01, 1.45228087643077e+01, 1.41363125892988e+01,  1.37771582400236e+01,\n                                                1.34451504152858e+01, 1.31398410953985e+01, 1.28605744659959e+01, 1.26065249404473e+01,  1.23767291795791e+01,\n                                                1.21701130624476e+01, 1.19855144749461e+01, 1.18217026659505e+01, 1.16773948265474e+01,  1.15512704866118e+01,\n                                                1.14419842820022e+01, 1.13481776063562e+01, 1.12684896088354e+01, 1.12015679250730e+01,  1.11460794314975e+01,\n                                                1.11007211966080e+01, 1.10642316732903e+01, 1.10354020424140e+01, 1.10130874892824e+01,  1.09962180808302e+01,\n                                                1.09838088222007e+01, 1.09749684146142e+01, 1.09689062182555e+01, 1.09649369472340e+01,  1.09624826878859e+01,\n                                                1.09610719323772e+01, 1.09603354488459e+01, 1.09599989566759e+01, 1.09598727289876e+01,  1.09598383921980e+01,\n                                                1.09598333241671e+01, 1.09598328761271e+01, 1.09598240898807e+01, 1.09597645619542e+01,  1.09595457337842e+01,\n                                                1.09589624396179e+01, 1.09576860231423e+01, 1.09552419487393e+01, 1.09509929837354e+01,  1.09441290174853e+01,\n                                                1.09336645597412e+01, 1.09184448992239e+01, 1.08971617713565e+01, 1.08683791468823e+01,  1.08305693795560e+01,\n                                                1.07821594220419e+01, 1.07215861358328e+01, 1.06473589129869e+01, 1.05581269574832e+01,  1.04527477373187e+01,\n                                                1.03303524353922e+01, 1.01904038278722e+01, 1.00327420225535e+01, 9.85761398264447e+00,  9.66568377523410e+00,\n                                                9.45802197872844e+00, 9.23607453502534e+00, 9.00161332087703e+00, 8.75667253003550e+00,  8.50347624576736e+00,\n                                                8.24436303090806e+00, 7.98171284056892e+00, 7.71788023147620e+00, 7.45513613946001e+00,  7.19561896824582e+00,\n                                                6.94129478362831e+00, 6.69392612890806e+00, 6.45504915617173e+00, 6.22595904980717e+00,  6.00770381070224e+00,\n                                                5.80108625844289e+00, 5.60667365982889e+00, 5.42481386889075e+00, 5.25565643362499e+00,  5.09917689557392e+00,\n                                                4.95520250965600e+00, 4.82343780933417e+00, 4.70348876806446e+00, 4.59488468746704e+00,  4.49709731377304e+00,\n                                                4.40955700556763e+00, 4.33166602727091e+00, 4.26280922022353e+00, 4.20236241319979e+00,  4.14969898828443e+00,\n                                                4.10419502908483e+00, 4.06523345778427e+00, 4.03220752494769e+00, 4.00452395835693e+00,  3.98160600969956e+00,\n                                                3.96289656466392e+00, 3.94786140632053e+00, 3.93599264692845e+00, 3.92681227303174e+00,  3.91987568667780e+00,\n                                                3.91477507562308e+00, 3.91114241098808e+00, 3.90865185468357e+00, 3.90702136249170e+00,  3.90601329176616e+00,\n                                                3.90543386336677e+00, 3.90513138205743e+00, 3.90499318327690e+00, 3.90494134134487e+00,  3.90492723919576e+00,\n                                                3.90492515775223e+00, 3.90492497089720e+00, 3.90492127441540e+00, 3.90489623031172e+00,  3.90480416710241e+00,\n                                                3.90455877240869e+00, 3.90402179311835e+00, 3.90299364722202e+00, 3.90120642389978e+00,  3.89831975741993e+00,\n                                                3.89392006454769e+00, 3.88752362066525e+00, 3.87858389911280e+00, 3.86650349235111e+00,  3.85065075534547e+00,\n                                                3.83038105024119e+00, 3.80506212711732e+00, 3.77410276397512e+00, 3.73698334409229e+00,  3.69328662281653e+00,\n                                                3.64272659551234e+00, 3.58517319608440e+00, 3.52067059624513e+00, 3.44944718154979e+00,  3.37191585570798e+00,\n                                                3.28866412703775e+00, 3.20043436952653e+00, 3.10809559836251e+00, 3.01260891412964e+00,  2.91498932436541e+00,\n                                                2.81626686333657e+00, 2.71744978222550e+00, 2.61949212158622e+00, 2.52326730815000e+00,  2.42954866611493e+00,\n                                                2.33899701930403e+00, 2.25215497310985e+00, 2.16944704808101e+00, 2.09118459352183e+00,  2.01757431491424e+00,\n                                                1.94872926682366e+00, 1.88468125740732e+00, 1.82539375285208e+00, 1.77077453874183e+00,  1.72068757450826e+00,\n                                                1.67496365368623e+00, 1.63340964552067e+00, 1.59581623368346e+00, 1.56196417973499e+00,  1.53162922048031e+00,\n                                                1.50458576094151e+00, 1.48060955226732e+00, 1.45947955183750e+00, 1.44097915661959e+00,  1.42489698541489e+00,\n                                                1.41102736486025e+00, 1.39917065065173e+00, 1.38913349111438e+00, 1.38072911587184e+00,  1.37377770839174e+00,\n                                                1.36810689779894e+00, 1.36355238275868e+00, 1.35995867879396e+00, 1.35717996069211e+00,  1.35508095448466e+00,\n                                                1.35353781980588e+00, 1.35243895421735e+00, 1.35168564714952e+00, 1.35119251294685e+00,  1.35088764014203e+00,\n                                                1.35071240701608e+00, 1.35062093068716e+00, 1.35057913694368e+00, 1.35056345907959e+00,  1.35055919435935e+00,\n                                                1.35055856489696e+00, 1.35055850687175e+00, 1.35055734208133e+00, 1.35054945049338e+00,  1.35052044075942e+00,\n                                                1.35044311590113e+00, 1.35027391487439e+00, 1.34994996099142e+00, 1.34938687246434e+00,  1.34847749594917e+00,\n                                                1.34709172796832e+00, 1.34507758622128e+00, 1.34226367633015e+00, 1.33846316218548e+00,  1.33347928321611e+00,\n                                                1.32711236564464e+00, 1.31916814779824e+00, 1.30946708905746e+00, 1.29785417298092e+00,  1.28420856987869e+00,\n                                                1.26845242002211e+00, 1.25055796366189e+00, 1.23055230015134e+00, 1.20851921522130e+00,  1.18459776443916e+00,\n                                                1.15897761407626e+00, 1.13189147354443e+00, 1.10360525352451e+00, 1.07440680148250e+00,  1.04459416698859e+00,\n                                                1.01446432186076e+00, 9.84303118589779e-01, 9.54377049107222e-01, 9.24927109590001e-01,  8.96164829633548e-01,\n                                                8.68270319555435e-01, 8.41392046618097e-01, 8.15647973432291e-01, 7.91127672132475e-01,  7.67895052036664e-01,\n                                                7.45991390475481e-01, 7.25438421763428e-01, 7.06241306514826e-01, 6.88391364987126e-01,  6.71868509569308e-01,\n                                                6.56643351354518e-01, 6.42678984277197e-01, 6.29932469041364e-01, 6.18356050019599e-01,  6.07898143521226e-01,\n                                                5.98504137141020e-01, 5.90117038753917e-01, 5.82678011158293e-01, 5.76126825050054e-01,  5.70402259308764e-01,\n                                                5.65442473648687e-01, 5.61185374560779e-01, 5.57568991111467e-01, 5.54531872517970e-01,  5.52013514475888e-01,\n                                                5.49954816012857e-01, 5.48298563302893e-01, 5.46989931606845e-01, 5.45976991577149e-01,  5.45211201916132e-01,\n                                                5.44647867152676e-01, 5.44246537429089e-01, 5.43971326918538e-01, 5.43791128961928e-01,  5.43679709203971e-01,\n                                                5.43615662746092e-01, 5.43582227286620e-01, 5.43566950934277e-01, 5.43561220341772e-01,  5.43559661490619e-01,\n                                                5.43559431407772e-01, 5.43559409481119e-01, 5.43558961548555e-01, 5.43555926750514e-01,  5.43544770675481e-01,\n                                                5.43515033931968e-01, 5.43449962171579e-01, 5.43325366389269e-01, 5.43108769666347e-01,  5.42758896686792e-01,\n                                                5.42225561833348e-01, 5.41450008927399e-01, 5.40365748751412e-01, 5.38899927256551e-01,  5.36975235929148e-01,\n                                                5.34512345077459e-01, 5.31432801105993e-01, 5.27662282410219e-01, 5.23134059839151e-01,  5.17792463324312e-01,\n                                                5.11596124181338e-01, 5.04520750623115e-01, 4.96561208151945e-01, 4.87732718969809e-01,  4.78071062630534e-01,\n                                                4.67631746006063e-01, 4.56488202502186e-01, 4.44729165062540e-01, 4.32455422917315e-01,  4.19776210203764e-01,\n                                                4.06805482709231e-01, 3.93658319491394e-01, 3.80447645387548e-01, 3.67281416841990e-01,  3.54260355598754e-01,\n                                                3.41476259929280e-01, 3.29010876512967e-01, 3.16935281028208e-01, 3.05309693069717e-01,  2.94183640592294e-01,\n                                                2.83596388772949e-01, 2.73577555249005e-01, 2.64147845127937e-01, 2.55319852236170e-01,  2.47098885686682e-01,\n                                                2.39483791735864e-01, 2.32467749590782e-01, 2.26039026433867e-01, 2.20181681900172e-01,  2.14876216101715e-01,\n                                                2.10100158496914e-01, 2.05828597734566e-01, 2.02034655167736e-01, 1.98689907010234e-01,  1.95764761977870e-01,\n                                                1.93228802586844e-01, 1.91051098940662e-01, 1.89200503747571e-01, 1.87645936448078e-01,  1.86356662739172e-01,\n                                                1.85302573564684e-01, 1.84454464968809e-01, 1.83784317289124e-01, 1.83265569252313e-01,  1.82873379884086e-01,\n                                                1.82584869012217e-01, 1.82379325740897e-01, 1.82238373770971e-01, 1.82146082906556e-01,  1.82089017520767e-01,\n                                                1.82056215041797e-01, 1.82039090482746e-01, 1.82031266425085e-01, 1.82028331398627e-01,  1.82027533004785e-01,\n                                                1.82027415163674e-01, 1.82027403500030e-01, 1.82027160678530e-01, 1.82025515533340e-01,  1.82019467900304e-01,\n                                                1.82003347857844e-01, 1.81968073227409e-01, 1.81900532220766e-01, 1.81783122049126e-01,  1.81593474623668e-01,\n                                                1.81304400470779e-01, 1.80884080823034e-01, 1.80296534477634e-01, 1.79502379298810e-01,  1.78459897176495e-01,\n                                                1.77126395232449e-01, 1.75459835152608e-01, 1.73420677725559e-01, 1.70973863055323e-01,  1.68090821588208e-01,\n                                                1.64751390845922e-01, 1.60945501501928e-01, 1.56674497431979e-01, 1.51951969412977e-01,  1.46804011025566e-01,\n                                                1.41268845636361e-01, 1.35395820885179e-01, 1.29243816614860e-01, 1.22879158295049e-01,  1.16373166055013e-01,\n                                                1.09799496007298e-01, 1.03231443482798e-01, 9.67393762292659e-02, 9.03884498494136e-02,  8.42367292994339e-02,\n                                                7.83338019872275e-02, 7.27199239966012e-02, 6.74256961669784e-02, 6.24722262467827e-02,  5.78717014162038e-02,\n                                                5.36282749201433e-02, 4.97391622344168e-02, 4.61958451017495e-02, 4.29852935126007e-02,  4.00911331210239e-02,\n                                                3.74947054742165e-02, 3.51759880695113e-02, 3.31143586766700e-02, 3.12892024497131e-02,  2.96803707059894e-02,\n                                                2.82685070264534e-02, 2.70352600332160e-02, 2.59634034980252e-02, 2.50368840135877e-02,  2.42408149343873e-02,\n                                                2.35614331446214e-02, 2.29860327929714e-02, 2.25028876704272e-02, 2.21011715292292e-02,  2.17708834064609e-02,\n                                                2.15027829411127e-02, 2.12883387535214e-02, 2.11196911879767e-02, 2.09896291125631e-02,  2.08915790528010e-02,\n                                                2.08196037552426e-02, 2.07684063875320e-02, 2.07333360385888e-02, 2.07103900224581e-02,  2.06962087217732e-02,\n                                                2.06880593072754e-02, 2.06838055718350e-02, 2.06818622317542e-02, 2.06811332544987e-02,  2.06809349584773e-02,\n                                                2.06809056905399e-02, 2.06809026714154e-02, 2.06808385829191e-02, 2.06804043785240e-02,  2.06788082656573e-02,\n                                                2.06745541402711e-02, 2.06652467570621e-02, 2.06474322173307e-02, 2.06164845187971e-02,  2.05665504499422e-02,\n                                                2.04905665784025e-02, 2.03803628601946e-02, 2.02268666886880e-02, 2.00204181360135e-02,  1.97512009288516e-02,\n                                                1.94097838730301e-02, 1.89877541031933e-02, 1.84784076196394e-02, 1.78774460047038e-02,  1.71836138358827e-02,\n                                                1.63992025937176e-02, 1.55303472164405e-02, 1.45870533666113e-02, 1.35829175644346e-02,  1.25345366386256e-02,\n                                                1.14606427615627e-02, 1.03810388864929e-02, 9.31543922453670e-03, 8.28233420386937e-03,  7.29799580942370e-03,\n                                                6.37571789771130e-03, 5.52535136876031e-03, 4.75315272971955e-03, 4.06192401767669e-03,  3.45138876201645e-03,\n                                                2.91872741046006e-03, 2.45918905004316e-03, 2.06670431616374e-03, 1.73444373504594e-03,  1.45528974348963e-03,\n                                                1.22221137885958e-03, 1.02854286745924e-03, 8.68171491447356e-04, 7.35641577094270e-04,  6.26185662625289e-04,\n                                                5.35701250285570e-04, 4.60696963713758e-04, 3.98230026675606e-04, 3.45847685878198e-04,  3.01534330603204e-04,\n                                                2.63660199934179e-04, 2.30928570061906e-04, 2.02322638600094e-04, 1.77056109833984e-04,  1.54530713643908e-04,\n                                                1.34301037789442e-04, 1.16044749901789e-04, 9.95359273474605e-05, 8.46203742383977e-05,  7.11932092087864e-05,\n                                                5.91797129061433e-05, 4.85202667732665e-05, 3.91595810640410e-05, 3.10397730487466e-05,  2.40964878628347e-05,\n                                                1.82571872215931e-05, 1.34408616503379e-05, 9.55862638818417e-06, 6.51485186153877e-06,  4.20862491523621e-06,\n                                                2.53543245776200e-06, 1.38902133528518e-06, 6.63433283421000e-07, -1.42108547152020e-14, 0.00000000000000e+00,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {1.14000000000000e+02, 1.13999999391129e+02, 1.13999980563642e+02, 1.13999853004237e+02, 1.13999384076335e+02,\n                                                1.13998134040337e+02, 1.13995398132040e+02, 1.13990157641411e+02, 1.13981041582234e+02, 1.13966300134303e+02,\n                                                1.13943790627612e+02, 1.13910976506845e+02, 1.13864939576014e+02, 1.13802405993554e+02, 1.13719787040448e+02,\n                                                1.13613236572903e+02, 1.13478728050941e+02, 1.13312154608806e+02, 1.13109455099371e+02, 1.12866766685090e+02,\n                                                1.12580599976591e+02, 1.12248026292880e+02, 1.11866859711595e+02, 1.11435811492575e+02, 1.10954593781595e+02,\n                                                1.10423955034950e+02, 1.09845641249737e+02, 1.09222292276365e+02, 1.08557296665533e+02, 1.07854636601414e+02,\n                                                1.07118752933885e+02, 1.06354448707692e+02, 1.05566831169794e+02, 1.04761273432810e+02, 1.03943365832517e+02,\n                                                1.03118830588772e+02, 1.02293393257491e+02, 1.01472631912897e+02, 1.00661842166878e+02, 9.98659490571423e+01,\n                                                9.90894706432121e+01, 9.83365139408487e+01, 9.76107776242684e+01, 9.69155456946571e+01, 9.62536698071899e+01,\n                                                9.56275462266598e+01, 9.50390950805474e+01, 9.44897474542331e+01, 9.39804428429682e+01, 9.35116371054619e+01,\n                                                9.30833197442297e+01, 9.26950388746343e+01, 9.23459322951039e+01, 9.20347633443573e+01, 9.17599605409814e+01,\n                                                9.15196602514234e+01, 9.13117517909217e+01, 9.11339244288802e+01, 9.09837157620616e+01, 9.08585608570602e+01,\n                                                9.07558414691113e+01, 9.06729345369026e+01, 9.06072590500179e+01, 9.05563203022683e+01, 9.05177504935694e+01,\n                                                9.04893446358423e+01, 9.04690907621545e+01, 9.04551935367916e+01, 9.04460905167324e+01, 9.04404605173161e+01,\n                                                9.04372237778253e+01, 9.04355338939283e+01, 9.04347617687792e+01, 9.04344721174549e+01, 9.04343933252222e+01,\n                                                9.04343816956520e+01, 9.04343801037280e+01, 9.04343425078728e+01, 9.04340877908854e+01, 9.04331514312312e+01,\n                                                9.04306554934560e+01, 9.04251934650104e+01, 9.04147340627837e+01, 9.03965483143553e+01, 9.03671640033781e+01,\n                                                9.03223512896594e+01, 9.02571429025555e+01, 9.01658916710315e+01, 9.00423671973545e+01, 8.98798921165110e+01,\n                                                8.96715165555582e+01, 8.94102271196306e+01, 8.90891840708063e+01, 8.87019775250643e+01, 8.82428907861202e+01,\n                                                8.77071568018225e+01, 8.70911926957483e+01, 8.63927978942233e+01, 8.56113037756012e+01, 8.47476666523612e+01,\n                                                8.38045000497291e+01, 8.27860448945548e+01, 8.16980763027256e+01, 8.05477447748196e+01, 7.93433528648022e+01,\n                                                7.80940807081691e+01, 7.68096920315474e+01, 7.55002617288835e+01, 7.41759524930373e+01, 7.28468367518783e+01,\n                                                7.15227361773650e+01, 7.02130533543016e+01, 6.89265930869677e+01, 6.76713933629670e+01, 6.64545931342656e+01,\n                                                6.52823553523982e+01, 6.41598478166648e+01, 6.30912706046442e+01, 6.20799121460066e+01, 6.11282166459425e+01,\n                                                6.02378508918665e+01, 5.94097650470934e+01, 5.86442472245152e+01, 5.79409743045557e+01, 5.72990618262495e+01,\n                                                5.67171147944100e+01, 5.61932799423946e+01, 5.57252990452863e+01, 5.53105625080028e+01, 5.49461625438864e+01,\n                                                5.46289455733132e+01, 5.43555637963583e+01, 5.41225261042037e+01, 5.39262485504302e+01, 5.37631045186166e+01,\n                                                5.36294745334843e+01, 5.35217954110631e+01, 5.34366081680911e+01, 5.33706038462785e+01, 5.33206661825492e+01,\n                                                5.32839098965078e+01, 5.32577132902816e+01, 5.32397438759549e+01, 5.32279758665027e+01, 5.32206985831695e+01,\n                                                5.32165151327056e+01, 5.32143310713622e+01, 5.32133331732345e+01, 5.32129588300329e+01, 5.32128569998734e+01,\n                                                5.32128419699648e+01, 5.32128405432123e+01, 5.32128114551188e+01, 5.32126143794188e+01, 5.32118899144858e+01,\n                                                5.32099588044903e+01, 5.32057328586595e+01, 5.31976405908410e+01, 5.31835709600579e+01, 5.31608384549180e+01,\n                                                5.31261725808972e+01, 5.30757345210441e+01, 5.30051632725944e+01, 5.29096528338030e+01, 5.27840609558518e+01,\n                                                5.26230485402564e+01, 5.24212469560095e+01, 5.21734484411897e+01, 5.18748124881300e+01, 5.15210789206527e+01,\n                                                5.11087765638706e+01, 5.06354153376378e+01, 5.00996496178332e+01, 4.95014020276666e+01, 4.88419393881181e+01,\n                                                4.81238958939554e+01, 4.73512418071501e+01, 4.65291981392971e+01, 4.56640986083304e+01, 4.47632004573828e+01,\n                                                4.38344473689227e+01, 4.28861923893034e+01, 4.19268965269596e+01, 4.09648271846786e+01, 4.00077860098795e+01,\n                                                3.90628947164585e+01, 3.81364588706563e+01, 3.72339154633777e+01, 3.63598544613158e+01, 3.55180920923220e+01,\n                                                3.47117677622235e+01, 3.39434382693451e+01, 3.32151510021041e+01, 3.25284889800672e+01, 3.18845912404781e+01,\n                                                3.12841590842594e+01, 3.07274605510603e+01, 3.02143426832993e+01, 2.97442558028155e+01, 2.93162888184890e+01,\n                                                2.89292114060945e+01, 2.85815182282971e+01, 2.82714714898572e+01, 2.79971399263994e+01, 2.77564339204187e+01,\n                                                2.75471374303982e+01, 2.73669378075754e+01, 2.72134545429314e+01, 2.70842677349749e+01, 2.69769467404073e+01,\n                                                2.68890791427822e+01, 2.68182998811499e+01, 2.67623201307514e+01, 2.67189553232276e+01, 2.66861515370538e+01,\n                                                2.66620093848343e+01, 2.66448044788010e+01, 2.66330035744474e+01, 2.66252755766793e+01, 2.66204967404256e+01,\n                                                2.66177496002688e+01, 2.66163154082200e+01, 2.66156601283394e+01, 2.66154143125487e+01, 2.66153474449119e+01,\n                                                2.66153375753968e+01, 2.66153366970804e+01, 2.66153194073199e+01, 2.66152022668879e+01, 2.66147716498552e+01,\n                                                2.66136238104966e+01, 2.66111119319166e+01, 2.66063019194525e+01, 2.65979389425444e+01, 2.65844266429897e+01,\n                                                2.65638208129262e+01, 2.65338391669987e+01, 2.64918885442066e+01, 2.64351104266983e+01, 2.63604450122839e+01,\n                                                2.62647132005405e+01, 2.61447147581484e+01, 2.59973396739772e+01, 2.58196884126473e+01, 2.56091955999110e+01,\n                                                2.53637508398626e+01, 2.50818100884556e+01, 2.47624914326294e+01, 2.44056502262616e+01, 2.40119300535875e+01,\n                                                2.35827874535886e+01, 2.31204892319247e+01, 2.26280812629421e+01, 2.21093272355390e+01, 2.15686156627919e+01,\n                                                2.10108346624129e+01, 2.04412170821888e+01, 1.98651631317666e+01, 1.92880525123912e+01, 1.87150614247078e+01,\n                                                1.81510004303012e+01, 1.76001865103525e+01, 1.70663574425262e+01, 1.65526302194676e+01, 1.60614992867543e+01,\n                                                1.55948661651774e+01, 1.51540901351335e+01, 1.47400499684340e+01, 1.43532085472070e+01, 1.39936747649397e+01,\n                                                1.36612596078673e+01, 1.33555252811188e+01, 1.30758274968525e+01, 1.28213516482782e+01, 1.25911437511782e+01,\n                                                1.23841369613626e+01, 1.21991743400784e+01, 1.20350284318393e+01, 1.18904181668688e+01, 1.17640235898805e+01,\n                                                1.16544989204868e+01, 1.15604844429567e+01, 1.14806176889119e+01, 1.14135443105978e+01, 1.13579289468261e+01,\n                                                1.13124662652329e+01, 1.12758922320142e+01, 1.12469955235635e+01, 1.12246288635425e+01, 1.12077199537729e+01,\n                                                1.11952815772610e+01, 1.11864203946157e+01, 1.11803439369046e+01, 1.11763653214720e+01, 1.11739052816883e+01,\n                                                1.11724912025576e+01, 1.11717529836666e+01, 1.11714156985670e+01, 1.11712891734186e+01, 1.11712547557122e+01,\n                                                1.11712496757381e+01, 1.11712492266424e+01, 1.11712404196905e+01, 1.11711807514813e+01, 1.11709614076137e+01,\n                                                1.11703767387584e+01, 1.11690973136660e+01, 1.11666474768510e+01, 1.11623884892383e+01, 1.11555083191474e+01,\n                                                1.11450191271610e+01, 1.11297634264076e+01, 1.11084297672788e+01, 1.10795785577267e+01, 1.10416782559346e+01,\n                                                1.09931516419248e+01, 1.09324311895573e+01, 1.08580217496368e+01, 1.07685678810422e+01, 1.06629223256378e+01,\n                                                1.05402114361374e+01, 1.03998929678306e+01, 1.02418016602911e+01, 1.00661785563649e+01, 9.87368106769954e+00,\n                                                9.66537235196293e+00, 9.44269046768444e+00, 9.20739975837481e+00, 8.96152863822370e+00, 8.70729903924861e+00,\n                                                8.44705297409877e+00, 8.18318095260267e+00, 7.91805564687667e+00, 7.65397272164189e+00, 7.39309961459340e+00,\n                                                7.13743251265213e+00, 6.88876174871453e+00, 6.64864603913240e+00, 6.41839606469006e+00, 6.19906767654263e+00,\n                                                5.99146448885973e+00, 5.79614895274034e+00, 5.61346038809786e+00, 5.44353803675659e+00, 5.28634706117981e+00,\n                                                5.14170553571770e+00, 5.00931079215206e+00, 4.88876389894898e+00, 4.77959149119637e+00, 4.68126456515245e+00,\n                                                4.59321417343148e+00, 4.51484419265553e+00, 4.44554148929086e+00, 4.38468389430268e+00, 4.33164642892439e+00,\n                                                4.28580621704401e+00, 4.24654648654636e+00, 4.21326001135598e+00, 4.18535228411369e+00, 4.16224464061173e+00,\n                                                4.14337748439752e+00, 4.12821368600818e+00, 4.11624215889407e+00, 4.10698154638125e+00, 4.09998389452940e+00,\n                                                4.09483813812473e+00, 4.09117319470894e+00, 4.08866044713299e+00, 4.08701540005650e+00, 4.08599831992342e+00,\n                                                4.08541370931330e+00, 4.08510852164048e+00, 4.08496908612142e+00, 4.08491678021714e+00, 4.08490255185365e+00,\n                                                4.08490045178101e+00, 4.08490026325362e+00, 4.08489653368790e+00, 4.08487126543410e+00, 4.08477837819575e+00,\n                                                4.08453078671724e+00, 4.08398899867055e+00, 4.08295163903543e+00, 4.08114837918164e+00, 4.07823575641237e+00,\n                                                4.07379637226023e+00, 4.06734194171469e+00, 4.05832061342296e+00, 4.04612887392408e+00, 4.03012817028208e+00,\n                                                4.00966612450020e+00, 3.98410187030507e+00, 3.95283463431574e+00, 3.91533424368949e+00, 3.87117182386906e+00,\n                                                3.82004861989724e+00, 3.76182070467027e+00, 3.69651739058175e+00, 3.62435147590756e+00, 3.54572003357150e+00,\n                                                3.46119523930015e+00, 3.37150564363644e+00, 3.27750918975970e+00, 3.18016003020848e+00, 3.08047168640017e+00,\n                                                2.97947926120236e+00, 2.87820325771328e+00, 2.77761713947721e+00, 2.67862019131167e+00, 2.58201661677066e+00,\n                                                2.48850122748254e+00, 2.39865159240995e+00, 2.31292613549786e+00, 2.23166738977179e+00, 2.15510942213960e+00,\n                                                2.08338833089054e+00, 2.01655468995838e+00, 1.95458687290662e+00, 1.89740432812766e+00, 1.84488007424686e+00,\n                                                1.79685191051408e+00, 1.75313205860797e+00, 1.71351514374892e+00, 1.67778456939290e+00, 1.64571743753420e+00,\n                                                1.61708822079829e+00, 1.59167141262353e+00, 1.56924337851292e+00, 1.54958361389414e+00, 1.53247558955093e+00,\n                                                1.51770733844283e+00, 1.50507191053808e+00, 1.49436779613973e+00, 1.48539939331290e+00, 1.47797757125223e+00,\n                                                1.47192035854910e+00, 1.46705376327641e+00, 1.46321271085033e+00, 1.46024206631888e+00, 1.45799769090945e+00,\n                                                1.45634746935706e+00, 1.45517223575906e+00, 1.45436652231953e+00, 1.45383905787153e+00, 1.45351295152540e+00,\n                                                1.45332551065383e+00, 1.45322766061680e+00, 1.45318295463582e+00, 1.45316618428484e+00, 1.45316162238107e+00,\n                                                1.45316094905503e+00, 1.45316088698638e+00, 1.45315964102821e+00, 1.45315119951661e+00, 1.45312016820431e+00,\n                                                1.45303745455222e+00, 1.45285646024121e+00, 1.45250992065189e+00, 1.45190755490374e+00, 1.45093469464916e+00,\n                                                1.44945206264524e+00, 1.44729686790939e+00, 1.44428536624341e+00, 1.44021699574748e+00, 1.43488013010054e+00,\n                                                1.42805939395481e+00, 1.41954435559646e+00, 1.40913925949158e+00, 1.39667330065731e+00, 1.38201079652822e+00,\n                                                1.36506050758321e+00, 1.34578332306670e+00, 1.32419758397232e+00, 1.30038147029209e+00, 1.27447212355519e+00,\n                                                1.24666147994814e+00, 1.21718910988707e+00, 1.18633264683422e+00, 1.15439659696796e+00, 1.12170042356411e+00,\n                                                1.08856678903146e+00, 1.05531072814371e+00, 1.02223034773985e+00, 9.89599436392126e-01, 9.57662154885128e-01,\n                                                9.26629789362039e-01, 8.96679398563379e-01, 8.67954081055800e-01, 8.40564527711848e-01, 8.14591504664776e-01,\n                                                7.90088925494501e-01, 7.67087209860634e-01, 7.45596679955952e-01, 7.25610807196404e-01, 7.07109181986354e-01,\n                                                6.90060133641992e-01, 6.74422972245480e-01, 6.60149858003408e-01, 6.47187326896074e-01, 6.35477515401831e-01,\n                                                6.24959133772194e-01, 6.15568238706771e-01, 6.07238854106527e-01, 5.99903484276766e-01, 5.93493558503084e-01,\n                                                5.87939839963923e-01, 5.83172825804638e-01, 5.79123159010109e-01, 5.75722066498102e-01, 5.72901831595132e-01,\n                                                5.70596302771037e-01, 5.68741434277200e-01, 5.67275848332855e-01, 5.66141402992002e-01, 5.65283745130131e-01,\n                                                5.64652824472603e-01, 5.64203342587120e-01, 5.63895110546326e-01, 5.63693290679282e-01, 5.63568501452437e-01,\n                                                5.63496769855433e-01, 5.63459322344286e-01, 5.63442212917153e-01, 5.63435794685503e-01, 5.63434048780778e-01,\n                                                5.63433791089267e-01, 5.63433766531546e-01, 5.63433264849550e-01, 5.63429865892346e-01, 5.63417371148162e-01,\n                                                5.63384066146014e-01, 5.63311186058300e-01, 5.63171639150369e-01, 5.62929050910569e-01, 5.62537191832959e-01,\n                                                5.61939851185258e-01, 5.61071215958023e-01, 5.59856806359718e-01, 5.58215004304557e-01, 5.56059187227262e-01,\n                                                5.53300445024021e-01, 5.49850813318500e-01, 5.45626904137592e-01, 5.40553760566382e-01, 5.34568712552726e-01,\n                                                5.27624975802837e-01, 5.19694723658489e-01, 5.10771379785808e-01, 5.00870929890610e-01, 4.90032130049187e-01,\n                                                4.78315588002999e-01, 4.65801797567821e-01, 4.52588298985191e-01, 4.38786205308872e-01, 4.24516367730320e-01,\n                                                4.09905449301888e-01, 3.95082142221881e-01, 3.80173709326940e-01, 3.65302968380917e-01, 3.50585779580399e-01,\n                                                3.36129050199830e-01, 3.22029238638848e-01, 3.08371322370775e-01, 2.95228186819600e-01, 2.82660390533849e-01,\n                                                2.70716262296304e-01, 2.59432285580829e-01, 2.48833724238466e-01, 2.38935440929410e-01, 2.29742857751262e-01,\n                                                2.21253007943915e-01, 2.13455629315760e-01, 2.06334254409470e-01, 1.99867259145790e-01, 1.94028840095285e-01,\n                                                1.88789899781270e-01, 1.84118828658228e-01, 1.79982180906023e-01, 1.76345248392025e-01, 1.73172542756745e-01,\n                                                1.70428199425572e-01, 1.68076319454954e-01, 1.66081265591401e-01, 1.64407927946669e-01, 1.63021972499152e-01,\n                                                1.61890082491738e-01, 1.60980199001642e-01, 1.60261762826877e-01, 1.59705955701469e-01, 1.59285935047336e-01,\n                                                1.58977053311872e-01, 1.58757050695698e-01, 1.58606208941393e-01, 1.58507453932756e-01, 1.58446396137819e-01,\n                                                1.58411300291533e-01, 1.58392978930962e-01, 1.58384608168788e-01, 1.58381468074637e-01, 1.58380613899297e-01,\n                                                1.58380487825042e-01, 1.58380475346533e-01, 1.58380215559916e-01, 1.58378455475955e-01, 1.58371985346960e-01,\n                                                1.58354739325517e-01, 1.58317001735696e-01, 1.58244748534528e-01, 1.58119158420419e-01, 1.57916329231696e-01,\n                                                1.57607236168488e-01, 1.57157967894022e-01, 1.56530273372255e-01, 1.55682444910454e-01, 1.54570549991632e-01,\n                                                1.53150005256336e-01, 1.51377460410131e-01, 1.49212929000100e-01, 1.46622069366018e-01, 1.43578486387014e-01,\n                                                1.40065897680486e-01, 1.36079991841100e-01, 1.31629805825256e-01, 1.26738466943479e-01, 1.21443183027125e-01,\n                                                1.15794420197091e-01, 1.09854276292538e-01, 1.03694131898877e-01, 9.73917309453327e-02, 9.10278996763765e-02,\n                                                8.46831483569588e-02, 7.84344089576621e-02, 7.23521427158289e-02, 6.64980065976977e-02, 6.09232039929140e-02,\n                                                5.56675719357571e-02, 5.07593852268968e-02, 4.62157964624197e-02, 4.20437869029513e-02, 3.82414794534469e-02,\n                                                3.47996612620420e-02, 3.17033761746757e-02, 2.89334713896352e-02, 2.64680125777090e-02, 2.42835124828389e-02,\n                                                2.23559458538887e-02, 2.06615462096238e-02, 1.91773965229487e-02, 1.78818365797468e-02, 1.67547153418326e-02,\n                                                1.57775182481288e-02, 1.49333982063382e-02, 1.42071361350418e-02, 1.35850531856931e-02, 1.30548928390510e-02,\n                                                1.26056873299092e-02, 1.22276195256745e-02, 1.19118885408369e-02, 1.16505850098747e-02, 1.14365800017424e-02,\n                                                1.12634299638898e-02, 1.11252987492776e-02, 1.10168966373010e-02, 1.09334352668924e-02, 1.08705965424889e-02,\n                                                1.08245128633939e-02, 1.07917554918089e-02, 1.07693275567584e-02, 1.07546581165252e-02, 1.07455938905048e-02,\n                                                1.07403857109745e-02, 1.07376673984731e-02, 1.07364255677425e-02, 1.07359597446930e-02, 1.07358330323990e-02,\n                                                1.07358143300331e-02, 1.07358124008101e-02, 1.07357714477985e-02, 1.07354939888751e-02, 1.07344740760027e-02,\n                                                1.07317557890383e-02, 1.07258090474289e-02, 1.07144286097025e-02, 1.06946638312735e-02, 1.06627881169032e-02,\n                                                1.06143183082850e-02, 1.05440949646720e-02, 1.04464339432155e-02, 1.03153571236305e-02, 1.01449048785156e-02,\n                                                9.92952461312768e-03, 9.66451856692174e-03, 9.34652106973033e-03, 8.97396246443805e-03, 8.54746664184347e-03,\n                                                8.07012469522306e-03, 7.54759139624639e-03, 6.98796564114446e-03, 6.40144028490397e-03, 5.79973794677358e-03,\n                                                5.19538216354931e-03, 4.60088104672707e-03, 4.02791689316473e-03, 3.48663556064821e-03, 2.98511295018500e-03,\n                                                2.52904602537285e-03, 2.12167949301545e-03, 1.76394525894352e-03, 1.45476736101102e-03, 1.19147349973048e-03,\n                                                9.70253912754515e-04, 7.86614738558455e-04, 6.35782566078547e-04, 5.13029071115056e-04, 4.13900660518607e-04,\n                                                3.34356665419477e-04, 2.70835120417701e-04, 2.20270690064694e-04, 1.80083428361399e-04, 1.48146530122517e-04,\n                                                1.22735692883680e-04, 1.02465701914412e-04, 8.62257428764224e-05, 7.31253443859714e-05, 6.24556058852477e-05,\n                                                5.36614039532424e-05, 4.63168712769857e-05, 4.00999654743828e-05, 3.47675582901275e-05, 3.01349347466839e-05,\n                                                2.60618564595916e-05, 2.24440992724340e-05, 1.92075707587946e-05, 1.63025822814689e-05, 1.36974892939179e-05,\n                                                1.13722685739504e-05, 9.31300844797534e-06, 7.50794295356627e-06, 5.94509062068482e-06, 4.61115396888090e-06,\n                                                3.49120801956815e-06, 2.56878115578729e-06, 1.82608174270626e-06, 1.24425719150167e-06, 8.03656391212826e-07,\n                                                4.84103537701230e-07, 8.52651282912120e-14, 7.10542735760100e-14, 9.94759830064140e-14, 7.10542735760100e-14,\n                                                7.10542735760100e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.15000000000000e+02, 1.14999999383775e+02, 1.14999980328863e+02, 1.14999851228625e+02, 1.14999376636360e+02,\n                                                1.14998111500541e+02, 1.14995342543060e+02, 1.14990038745556e+02, 1.14980812552523e+02, 1.14965892985813e+02,\n                                                1.14943111448382e+02, 1.14909900661849e+02, 1.14863307046859e+02, 1.14800017035834e+02, 1.14716398378191e+02,\n                                                1.14608558410503e+02, 1.14472422263882e+02, 1.14303834556605e+02, 1.14098687549777e+02, 1.13853076294909e+02,\n                                                1.13563476589188e+02, 1.13226934960953e+02, 1.12841252869686e+02, 1.12405142196089e+02, 1.11918328569106e+02,\n                                                1.11381584938472e+02, 1.10796689881735e+02, 1.10166320722639e+02, 1.09493905893608e+02, 1.08783468907169e+02,\n                                                1.08039494229394e+02, 1.07266832960758e+02, 1.06470647058612e+02, 1.05656371651539e+02, 1.04829664228114e+02,\n                                                1.03996314366672e+02, 1.03162109377613e+02, 1.02332679749043e+02, 1.01513364469493e+02, 1.00709126560261e+02,\n                                                9.99245208710435e+01, 9.91636922286986e+01, 9.84303777136276e+01, 9.77278982248194e+01, 9.70591383897183e+01,\n                                                9.64265216958234e+01, 9.58319888020616e+01, 9.52769844624889e+01, 9.47624553178882e+01, 9.42888584516455e+01,\n                                                9.38561793582505e+01, 9.34639575857245e+01, 9.31113184217058e+01, 9.27970093020989e+01, 9.25194399486059e+01,\n                                                9.22767254981306e+01, 9.20667320446937e+01, 9.18871240775498e+01, 9.17354132862188e+01, 9.16090081365822e+01,\n                                                9.15052635238190e+01, 9.14215296973466e+01, 9.13551995474261e+01, 9.13037532579072e+01, 9.12647992778271e+01,\n                                                9.12361105568488e+01, 9.12156550333667e+01, 9.12016194633183e+01, 9.11924258318934e+01, 9.11867397945949e+01,\n                                                9.11834708394623e+01, 9.11817641362640e+01, 9.11809843262753e+01, 9.11806917921085e+01, 9.11806122156734e+01,\n                                                9.11806004703565e+01, 9.11805988625885e+01, 9.11805608925499e+01, 9.11803036404222e+01, 9.11793579614347e+01,\n                                                9.11768371825857e+01, 9.11713207943558e+01, 9.11607573031023e+01, 9.11423905944616e+01, 9.11127139417047e+01,\n                                                9.10674555126920e+01, 9.10015988138912e+01, 9.09094408681796e+01, 9.07846899554331e+01, 9.06206033624511e+01,\n                                                9.04101637363596e+01, 9.01462903174435e+01, 8.98220786330138e+01, 8.94310593621800e+01, 8.89674643564578e+01,\n                                                8.84264856717435e+01, 8.78045124643093e+01, 8.70993312152717e+01, 8.63102771728041e+01, 8.54383287123611e+01,\n                                                8.44861402551095e+01, 8.34580117405160e+01, 8.23597926241078e+01, 8.11987180402008e+01, 7.99831794242224e+01,\n                                                7.87224457072491e+01, 7.74263692651304e+01, 7.61051174193438e+01, 7.47689530529893e+01, 7.34280559162425e+01,\n                                                7.20923554826144e+01, 7.07713528210932e+01, 6.94739335950952e+01, 6.82081954377307e+01, 6.69813173357217e+01,\n                                                6.57994877339149e+01, 6.46678913704392e+01, 6.35907414606698e+01, 6.25713381877008e+01, 6.16121362159892e+01,\n                                                6.07148100490706e+01, 5.98803129004724e+01, 5.91089297701416e+01, 5.84003276723168e+01, 5.77536058823376e+01,\n                                                5.71673477805004e+01, 5.66396744602002e+01, 5.61682993731613e+01, 5.57505830400184e+01, 5.53835870726158e+01,\n                                                5.50641271564926e+01, 5.47888250086067e+01, 5.45541595436382e+01, 5.43565175278669e+01, 5.41922438981191e+01,\n                                                5.40576917182120e+01, 5.39492714811208e+01, 5.38634991809468e+01, 5.37970423080931e+01, 5.37467626924286e+01,\n                                                5.37097549566552e+01, 5.36833792644099e+01, 5.36652870671171e+01, 5.36534386746694e+01, 5.36461116933404e+01,\n                                                5.36418996768973e+01, 5.36397007031143e+01, 5.36386959917295e+01, 5.36383190926982e+01, 5.36382165672965e+01,\n                                                5.36382014347719e+01, 5.36381999982783e+01, 5.36381707115872e+01, 5.36379722903649e+01, 5.36372428792427e+01,\n                                                5.36352985852348e+01, 5.36310437901282e+01, 5.36228962863354e+01, 5.36087306430165e+01, 5.35858430722083e+01,\n                                                5.35509408813301e+01, 5.35001593093122e+01, 5.34291080726693e+01, 5.33329492134357e+01, 5.32065067708493e+01,\n                                                5.30444073488764e+01, 5.28412488259752e+01, 5.25917923226107e+01, 5.22911702575571e+01, 5.19351011234765e+01,\n                                                5.15200998094573e+01, 5.10436712504420e+01, 5.05044752226733e+01, 4.99024514202604e+01, 4.92388964360597e+01,\n                                                4.85164874173929e+01, 4.77392501264969e+01, 4.69124711218207e+01, 4.60425546973017e+01, 4.51368260957030e+01,\n                                                4.42032851376459e+01, 4.32503201195163e+01, 4.22864001621146e+01, 4.13197724458230e+01, 4.03581950823311e+01,\n                                                3.94087336883688e+01, 3.84776395083729e+01, 3.75703116445319e+01, 3.66913300930128e+01, 3.58445345702652e+01,\n                                                3.50331197205612e+01, 3.42597208842667e+01, 3.35264743281576e+01, 3.28350481324172e+01, 3.21866507342341e+01,\n                                                3.15820302265059e+01, 3.10214776553218e+01, 3.05048429116955e+01, 3.00315652644837e+01, 2.96007151943072e+01,\n                                                2.92110416993748e+01, 2.88610195931573e+01, 2.85488932796472e+01, 2.82727157125179e+01, 2.80303828788110e+01,\n                                                2.78196649726990e+01, 2.76382356001028e+01, 2.74837001527906e+01, 2.73536241363480e+01, 2.72455618628622e+01,\n                                                2.71570855830020e+01, 2.70858148470583e+01, 2.70294456477386e+01, 2.69857787051268e+01, 2.69527461066084e+01,\n                                                2.69284354165251e+01, 2.69111103287359e+01, 2.68992269561512e+01, 2.68914449373671e+01, 2.68866326895010e+01,\n                                                2.68838663403817e+01, 2.68824221193487e+01, 2.68817622571026e+01, 2.68815147223019e+01, 2.68814473870522e+01,\n                                                2.68814374485183e+01, 2.68814365640597e+01, 2.68814191533897e+01, 2.68813011937784e+01, 2.68808675653568e+01,\n                                                2.68797116987486e+01, 2.68771822527676e+01, 2.68723385967793e+01, 2.68639171139830e+01, 2.68503102547101e+01,\n                                                2.68295601526982e+01, 2.67993684367023e+01, 2.67571235791292e+01, 2.66999466737266e+01, 2.66247558834438e+01,\n                                                2.65283489245629e+01, 2.64075018651218e+01, 2.62590812733017e+01, 2.60801654704786e+01, 2.58681694948082e+01,\n                                                2.56209675699641e+01, 2.53370065936644e+01, 2.50154045212761e+01, 2.46560284653821e+01, 2.42595485972988e+01,\n                                                2.38274650995443e+01, 2.33621060894442e+01, 2.28665945264181e+01, 2.23447820346004e+01, 2.18011481337246e+01,\n                                                2.12406653900646e+01, 2.06686347436990e+01, 2.00905001165333e+01, 1.95116559627097e+01, 1.89372640754794e+01,\n                                                1.83720955835947e+01, 1.78204105064697e+01, 1.72858813787422e+01, 1.67715608567348e+01, 1.62798875115207e+01,\n                                                1.58127203581941e+01, 1.53713914760003e+01, 1.49567670181377e+01, 1.45693092047130e+01, 1.42091346284837e+01,\n                                                1.38760666432154e+01, 1.35696813381283e+01, 1.32893475524593e+01, 1.30342617109213e+01, 1.28034782211678e+01,\n                                                1.25959360058870e+01, 1.24104815981238e+01, 1.22458891684051e+01, 1.21008778682947e+01, 1.19741269283822e+01,\n                                                1.18642889988671e+01, 1.17700022402530e+01, 1.16899016484757e+01, 1.16226300334803e+01, 1.15668489702753e+01,\n                                                1.15212499171383e+01, 1.14845655578376e+01, 1.14555812840721e+01, 1.14331466009884e+01, 1.14161861222655e+01,\n                                                1.14037097308111e+01, 1.13948214242136e+01, 1.13887263463020e+01, 1.13847355301619e+01, 1.13822679429320e+01,\n                                                1.13808495241479e+01, 1.13801090393864e+01, 1.13797707189506e+01, 1.13796438054052e+01, 1.13796092820447e+01,\n                                                1.13796041864763e+01, 1.13796037360019e+01, 1.13795949020147e+01, 1.13795350506368e+01, 1.13793150334163e+01,\n                                                1.13787285696090e+01, 1.13774452161025e+01, 1.13749878551150e+01, 1.13707157804255e+01, 1.13638144514482e+01,\n                                                1.13532929600157e+01, 1.13379901919606e+01, 1.13165905321761e+01, 1.12876497228131e+01, 1.12496311084159e+01,\n                                                1.12009519695779e+01, 1.11400389589672e+01, 1.10653908396538e+01, 1.09756458485752e+01, 1.08696501647747e+01,\n                                                1.07465232773291e+01, 1.06057156596486e+01, 1.04470541951812e+01, 1.02707713599066e+01, 1.00775152800450e+01,\n                                                9.86833938518505e+00, 9.64467228668728e+00, 9.40827043123552e+00, 9.16115763993047e+00, 8.90555650357612e+00,\n                                                8.64381659081504e+00, 8.37834363686336e+00, 8.11153268063262e+00, 7.84570698100048e+00, 7.58306382563875e+00,\n                                                7.32562812584423e+00, 7.07521477070487e+00, 6.83340077327765e+00, 6.60150802749071e+00, 6.38059693766530e+00,\n                                                6.17147039510589e+00, 5.97468676689903e+00, 5.79057993220799e+00, 5.61928407334463e+00, 5.46076092522537e+00,\n                                                5.31482744969460e+00, 5.18118233093421e+00, 5.05943018048022e+00, 4.94910281141668e+00, 4.84967733828586e+00,\n                                                4.76059115937441e+00, 4.68125408126113e+00, 4.61105796528214e+00, 4.54938433068817e+00, 4.49561035827986e+00,\n                                                4.44911371651385e+00, 4.40927659061808e+00, 4.37548924149485e+00, 4.34715335964742e+00, 4.32368541281897e+00,\n                                                4.30452011649263e+00, 4.28911408583640e+00, 4.27694965847850e+00, 4.26753881264482e+00, 4.26042704816740e+00,\n                                                4.25519705237051e+00, 4.25147194230698e+00, 4.24891786194173e+00, 4.24724571911163e+00, 4.24621187227956e+00,\n                                                4.24561761935239e+00, 4.24530739661307e+00, 4.24516566032322e+00, 4.24511249128682e+00, 4.24509802812730e+00,\n                                                4.24509589339917e+00, 4.24509570176068e+00, 4.24509191064935e+00, 4.24506622541277e+00, 4.24497180526907e+00,\n                                                4.24472012737769e+00, 4.24416939504779e+00, 4.24311490117925e+00, 4.24128182954006e+00, 4.23832098217265e+00,\n                                                4.23380792170971e+00, 4.22724599925768e+00, 4.21807368467114e+00, 4.20567650798681e+00, 4.18940374199067e+00,\n                                                4.16858969610658e+00, 4.14257915182377e+00, 4.11075606597345e+00, 4.07257423481543e+00, 4.02758820158625e+00,\n                                                3.97548236878553e+00, 3.91609611384362e+00, 3.84944276286538e+00, 3.77572058622462e+00, 3.69531453680543e+00,\n                                                3.60878820496855e+00, 3.51686631925315e+00, 3.42040895709081e+00, 3.32037932367182e+00, 3.21780741675175e+00,\n                                                3.11375207906964e+00, 3.00926386403508e+00, 2.90535086412083e+00, 2.80294925043997e+00, 2.70289980830421e+00,\n                                                2.60593126027415e+00, 2.51265065583893e+00, 2.42354058587277e+00, 2.33896248288576e+00, 2.25916485358515e+00,\n                                                2.18429502483308e+00, 2.11441291164351e+00, 2.04950543550312e+00, 1.98950048631339e+00, 1.93427965819976e+00,\n                                                1.88368932488240e+00, 1.83754990138790e+00, 1.79566334101031e+00, 1.75781903944673e+00, 1.72379837665179e+00,\n                                                1.69337814108975e+00, 1.66633306912371e+00, 1.64243770804427e+00, 1.62146778335268e+00, 1.60320122381297e+00,\n                                                1.58741897306068e+00, 1.57390569416441e+00, 1.56245045272848e+00, 1.55284744401774e+00, 1.54489680948657e+00,\n                                                1.53840556766403e+00, 1.53318866366953e+00, 1.52907012119729e+00, 1.52588426146909e+00, 1.52347693653766e+00,\n                                                1.52170671066609e+00, 1.52044591452194e+00, 1.51958149357053e+00, 1.51901557490152e+00, 1.51866568579719e+00,\n                                                1.51846457208435e+00, 1.51835958355832e+00, 1.51831161593509e+00, 1.51829362202824e+00, 1.51828872728750e+00,\n                                                1.51828800483541e+00, 1.51828793823825e+00, 1.51828660137456e+00, 1.51827754396511e+00, 1.51824424855266e+00,\n                                                1.51815549968273e+00, 1.51796129765826e+00, 1.51758946453559e+00, 1.51694311568997e+00, 1.51589917399765e+00,\n                                                1.51430810550285e+00, 1.51199505005667e+00, 1.50876250105017e+00, 1.50439464766254e+00, 1.49866342448360e+00,\n                                                1.49133621306929e+00, 1.48218500877508e+00, 1.47099671144996e+00, 1.45758403525024e+00, 1.44179638307762e+00,\n                                                1.42352992176434e+00, 1.40273605191840e+00, 1.37942751194157e+00, 1.35368149738724e+00, 1.32563940607811e+00,\n                                                1.29550311057073e+00, 1.26352797380643e+00, 1.23001311705418e+00, 1.19528968165592e+00, 1.15970796978813e+00,\n                                                1.12362439271868e+00, 1.08738910179582e+00, 1.05133504366128e+00, 1.01576899024003e+00, 9.80964872393599e-01,\n                                                9.47159520218619e-01, 9.14550706999307e-01, 8.83297227365475e-01, 8.53520626203775e-01, 8.25308138135824e-01,\n                                                7.98716394506982e-01, 7.73775495634624e-01, 7.50493116277667e-01, 7.28858396697262e-01, 7.08845456850327e-01,\n                                                6.90416447296798e-01, 6.73524111544111e-01, 6.58113878831315e-01, 6.44125534669570e-01, 6.31494531445455e-01,\n                                                6.20153006407762e-01, 6.10030572678056e-01, 6.01054943309620e-01, 5.93152440899289e-01, 5.86248437154524e-01,\n                                                5.80267758851789e-01, 5.75135089068382e-01, 5.70775385432412e-01, 5.67114330284539e-01, 5.64078820936601e-01,\n                                                5.61597501557415e-01, 5.59601331642270e-01, 5.58024179673282e-01, 5.56803424719376e-01, 5.55880543709208e-01,\n                                                5.55201658329779e-01, 5.54718013338260e-01, 5.54386357820960e-01, 5.54169202759411e-01, 5.54034932151652e-01,\n                                                5.53957750681107e-01, 5.53917458128765e-01, 5.53899048843604e-01, 5.53892143000795e-01, 5.53890264455035e-01,\n                                                5.53889987186011e-01, 5.53889960762575e-01, 5.53889420966456e-01, 5.53885763781764e-01, 5.53872319783025e-01,\n                                                5.53836484548270e-01, 5.53758067775348e-01, 5.53607920008020e-01, 5.53346904775537e-01, 5.52925284211526e-01,\n                                                5.52282585640398e-01, 5.51348013333111e-01, 5.50041461231842e-01, 5.48275166319229e-01, 5.45956016164396e-01,\n                                                5.42988486695080e-01, 5.39278137845130e-01, 5.34735538249805e-01, 5.29280431261967e-01, 5.22845901498243e-01,\n                                                5.15382263791821e-01, 5.06860384539223e-01, 4.97274166127170e-01, 4.86641980592140e-01, 4.75006924485939e-01,\n                                                4.62435872005130e-01, 4.49017411844082e-01, 4.34858847648528e-01, 4.20082507950070e-01, 4.04821641109422e-01,\n                                                3.89216164363603e-01, 3.73408501295231e-01, 3.57539691172036e-01, 3.41745899443922e-01, 3.26155411031735e-01,\n                                                3.10886151732703e-01, 2.96043758014065e-01, 2.81720198264040e-01, 2.67992934800660e-01, 2.54924602146815e-01,\n                                                2.42563161873164e-01, 2.30942478364341e-01, 2.20083245237618e-01, 2.09994181217610e-01, 2.00673408900926e-01,\n                                                1.92109930818461e-01, 1.84285124169747e-01, 1.77174187325122e-01, 1.70747485914916e-01, 1.64971762227893e-01,\n                                                1.59811187108119e-01, 1.55228247373714e-01, 1.51184473227801e-01, 1.47641018860881e-01, 1.44559115436920e-01,\n                                                1.41900419119452e-01, 1.39627278037594e-01, 1.37702941481223e-01, 1.36091732503928e-01, 1.34759201843309e-01,\n                                                1.33672276957640e-01, 1.32799415335938e-01, 1.32110766374637e-01, 1.31578341338681e-01, 1.31176186561532e-01,\n                                                1.30880551384081e-01, 1.30670039657858e-01, 1.30525732145003e-01, 1.30431266942011e-01, 1.30372866136653e-01,\n                                                1.30339299149298e-01, 1.30321776383539e-01, 1.30313770595549e-01, 1.30310767430345e-01, 1.30309950504355e-01,\n                                                1.30309829928066e-01, 1.30309817993705e-01, 1.30309569536223e-01, 1.30307886209863e-01, 1.30301698270230e-01,\n                                                1.30285204617380e-01, 1.30249114356133e-01, 1.30180019005678e-01, 1.30059929862341e-01, 1.29866017024213e-01,\n                                                1.29570588333067e-01, 1.29141346735153e-01, 1.28541961729852e-01, 1.27732982954427e-01, 1.26673110001022e-01,\n                                                1.25320811279067e-01, 1.23636256086115e-01, 1.21583489341575e-01, 1.19132740587602e-01, 1.16262722381919e-01,\n                                                1.12962743871250e-01, 1.09234449415126e-01, 1.05092995315687e-01, 1.00567503816364e-01, 9.57006833072143e-02,\n                                                9.05475739642441e-02, 8.51734616755095e-02, 7.96510895345079e-02, 7.40573730995777e-02, 6.84698810697597e-02,\n                                                6.29633678231016e-02, 5.76066339806545e-02, 5.24599472980469e-02, 4.75731860143753e-02, 4.29847818827085e-02,\n                                                3.87214538947518e-02, 3.47986486860066e-02, 3.12215489265810e-02, 2.79864811324018e-02, 2.50825489302997e-02,\n                                                2.24933327033625e-02, 2.01985253280554e-02, 1.81754094185038e-02, 1.64001179122977e-02, 1.48486523379745e-02,\n                                                1.34976589597215e-02, 1.23249812332631e-02, 1.13100180156778e-02, 1.04339219571585e-02, 9.67967297921746e-03,\n                                                9.03205920407402e-03, 8.47759343290022e-03, 8.00438829773498e-03, 7.60200827048152e-03, 7.26131225181348e-03,\n                                                6.97429669529015e-03, 6.73394618739565e-03, 6.53409603935984e-03, 6.36930965549709e-03, 6.23477210525891e-03,\n                                                6.12620033433586e-03, 6.03976969358655e-03, 5.97205586817040e-03, 5.91999078883987e-03, 5.88083068149103e-03,\n                                                5.85213405668128e-03, 5.83174717567658e-03, 5.81779438195440e-03, 5.80867068183011e-03, 5.80303411211958e-03,\n                                                5.79979574574452e-03, 5.79810563601768e-03, 5.79733355002077e-03, 5.79704393639702e-03, 5.79696515660544e-03,\n                                                5.79695352894305e-03, 5.79695232951849e-03, 5.79692686838484e-03, 5.79675436813432e-03, 5.79612027939902e-03,\n                                                5.79443034162352e-03, 5.79073352680837e-03, 5.78365970686434e-03, 5.77137710035913e-03, 5.75157559130446e-03,\n                                                5.72148299966102e-03, 5.67792192308048e-03, 5.61741434982821e-03, 5.53633929790465e-03, 5.43114476967332e-03,\n                                                5.29860907435875e-03, 5.13613826434778e-03, 4.94207689948212e-03, 4.71600017588969e-03, 4.45894883071674e-03,\n                                                4.17356661088775e-03, 3.86410551955407e-03, 3.53627737759155e-03, 3.19695042969670e-03, 2.85371361731279e-03,\n                                                2.51435388935306e-03, 2.18630819173882e-03, 1.87615739491775e-03, 1.58922278691875e-03, 1.32930844876000e-03,\n                                                1.09860893662983e-03, 8.97776358740998e-04, 7.26118799875053e-04, 5.81886520336639e-04, 4.62595654596498e-04,\n                                                3.65342334774255e-04, 2.87072446241154e-04, 2.24789806608783e-04, 1.75702019518553e-04, 1.37312602305428e-04,\n                                                1.07468780299769e-04, 8.43711968201433e-05, 6.65515786977267e-05, 5.28293168287064e-05, 4.22624261489091e-05,\n                                                3.41054920625083e-05, 2.77779936794786e-05, 2.28384056129016e-05, 1.89576504254774e-05, 1.58897161526284e-05,\n                                                1.34441650345707e-05, 1.14680090774755e-05, 9.83907968077347e-06, 8.46544277521843e-06, 7.28380544501306e-06,\n                                                6.25402014975407e-06, 5.35116680566716e-06, 4.55820611477975e-06, 3.86127526041946e-06, 3.24790441652567e-06,\n                                                2.70711693417525e-06, 2.23006949795490e-06, 1.81033763624328e-06, 1.44359609066669e-06, 1.12688559283924e-06,\n                                                8.57795669162442e-07, 6.33814650541353e-07, 4.51949489388426e-07, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                0.00000000000000e+00, 1.42108547152020e-14, 1.42108547152020e-14, 0.00000000000000e+00, 1.42108547152020e-14,\n                                                0.00000000000000e+00}),\nmadness::CubicInterpolationTable<double>(grid, {1.16000000000000e+02, 1.15999999376399e+02, 1.15999980093413e+02, 1.15999849447929e+02, 1.15999369175084e+02,\n                                                1.15998088896210e+02, 1.15995286794900e+02, 1.15989919509177e+02, 1.15980582866642e+02, 1.15965484670250e+02,\n                                                1.15942430320898e+02, 1.15908821727799e+02, 1.15861669824937e+02, 1.15797621202896e+02, 1.15712999954406e+02,\n                                                1.15603866768080e+02, 1.15466098324644e+02, 1.15295490626469e+02, 1.15087889283180e+02, 1.14839347235687e+02,\n                                                1.14546305543650e+02, 1.14205786099979e+02, 1.13815577965374e+02, 1.13374393887638e+02, 1.12881973197192e+02,\n                                                1.12339113469721e+02, 1.11747625871000e+02, 1.11110225084128e+02, 1.10430379245669e+02, 1.09712153062132e+02,\n                                                1.08960074647788e+02, 1.08179043441192e+02, 1.07374276624095e+02, 1.06551271925570e+02, 1.05715754368883e+02,\n                                                1.04873580818255e+02, 1.04030599772588e+02, 1.03192493345425e+02, 1.02364643331858e+02, 1.01552050695702e+02,\n                                                1.00759307553491e+02, 9.99905972736150e+01, 9.92496960217995e+01, 9.85399620326788e+01, 9.78643130575146e+01,\n                                                9.72251997234680e+01, 9.66245829909727e+01, 9.60639209888678e+01, 9.55441672062074e+01, 9.50657796863104e+01,\n                                                9.46287396993305e+01, 9.42325780606006e+01, 9.38764074276091e+01, 9.35589592518803e+01, 9.32786244057545e+01,\n                                                9.30334967654126e+01, 9.28214191874652e+01, 9.26400313750332e+01, 9.24868191111640e+01, 9.23591642661407e+01,\n                                                9.22543948828850e+01, 9.21698345308931e+01, 9.21028500112151e+01, 9.20508964080559e+01, 9.20115584296881e+01,\n                                                9.19825869731266e+01, 9.19619298909740e+01, 9.19477560388089e+01, 9.19384718370215e+01, 9.19327297872078e+01,\n                                                9.19294286310198e+01, 9.19277051161363e+01, 9.19269176247881e+01, 9.19266222090844e+01, 9.19265418488019e+01,\n                                                9.19265299877908e+01, 9.19265283641859e+01, 9.19264900201333e+01, 9.19262302340136e+01, 9.19252752399132e+01,\n                                                9.19227296312412e+01, 9.19171589078517e+01, 9.19064913747408e+01, 9.18879437879466e+01, 9.18579749261187e+01,\n                                                9.18122709844735e+01, 9.17457662694350e+01, 9.16527020240316e+01, 9.15267252350676e+01, 9.13610278730775e+01,\n                                                9.11485251392552e+01, 9.08820689449323e+01, 9.05546901215823e+01, 9.01598599577271e+01, 8.96917589167239e+01,\n                                                8.91455382641813e+01, 8.85175593593558e+01, 8.78055960148470e+01, 8.70089877597149e+01, 8.61287355629783e+01,\n                                                8.51675352914401e+01, 8.41297462576926e+01, 8.30212921659302e+01, 8.18494920996735e+01, 8.06228253117548e+01,\n                                                7.93506487291376e+01, 7.80429035910299e+01, 7.67098511213115e+01, 7.53618565245228e+01, 7.40092085274171e+01,\n                                                7.26619446578323e+01, 7.13296631300096e+01, 7.00213280753306e+01, 6.87450942210872e+01, 6.75081786907691e+01,\n                                                6.63167946331054e+01, 6.51761440635446e+01, 6.40904544695148e+01, 6.30630392079312e+01, 6.20963646118064e+01,\n                                                6.11921135597111e+01, 6.03512423085228e+01, 5.95740321628881e+01, 5.88601393314758e+01, 5.82086457801475e+01,\n                                                5.76181123185020e+01, 5.70866336769204e+01, 5.66118945246300e+01, 5.61912252834678e+01, 5.58216569433534e+01,\n                                                5.54999745705310e+01, 5.52227695989141e+01, 5.49864912122615e+01, 5.47874971541947e+01, 5.46221041821429e+01,\n                                                5.44866381597267e+01, 5.43774835058615e+01, 5.42911314265811e+01, 5.42242260795533e+01, 5.41736075890704e+01,\n                                                5.41363506644053e+01, 5.41097974953735e+01, 5.40915836179529e+01, 5.40796555643059e+01, 5.40722793311613e+01,\n                                                5.40680390051717e+01, 5.40658252528077e+01, 5.40648137893219e+01, 5.40644343574017e+01, 5.40643311429983e+01,\n                                                5.40643159087787e+01, 5.40643144626314e+01, 5.40642849791252e+01, 5.40640852244580e+01, 5.40633509115426e+01,\n                                                5.40613935518563e+01, 5.40571101663975e+01, 5.40489079223179e+01, 5.40346471278985e+01, 5.40116058822044e+01,\n                                                5.39764694928476e+01, 5.39253474855122e+01, 5.38538205551627e+01, 5.37570190683456e+01, 5.36297336456672e+01,\n                                                5.34665568888822e+01, 5.32620534726859e+01, 5.30109536703120e+01, 5.27083630802560e+01, 5.23499791120271e+01,\n                                                5.19323029902731e+01, 5.14528350047966e+01, 5.09102407859599e+01, 5.03044776778128e+01, 4.96368726685601e+01,\n                                                4.89101462889769e+01, 4.81283796130644e+01, 4.72969233644971e+01, 4.64222492642377e+01, 4.55117452911020e+01,\n                                                4.45734601379187e+01, 4.36158087937269e+01, 4.26472599253655e+01, 4.16760335607933e+01, 4.07098406453389e+01,\n                                                3.97556916528907e+01, 3.88197896052979e+01, 3.79075065773619e+01, 3.70234268609133e+01, 3.61714291748893e+01,\n                                                3.53547775788958e+01, 3.45761963135558e+01, 3.38379152854979e+01, 3.31416862382170e+01, 3.24887803215110e+01,\n                                                3.18799824993824e+01, 3.13155962429425e+01, 3.07954653109732e+01, 3.03190118770436e+01, 2.98852851457951e+01,\n                                                2.94930132168887e+01, 2.91406525135913e+01, 2.88264318465462e+01, 2.85483906498661e+01, 2.83044124317932e+01,\n                                                2.80922550364293e+01, 2.79095792387206e+01, 2.77539768288657e+01, 2.76229989089752e+01, 2.75141847300147e+01,\n                                                2.74250910695610e+01, 2.73533218847252e+01, 2.72965577564724e+01, 2.72525844633799e+01, 2.72193198844552e+01,\n                                                2.71948383378124e+01, 2.71773914230615e+01, 2.71654244574567e+01, 2.71575876827455e+01, 2.71527415694912e+01,\n                                                2.71499557507920e+01, 2.71485013647846e+01, 2.71478368580552e+01, 2.71475875809448e+01, 2.71475197717443e+01,\n                                                2.71475097632563e+01, 2.71475088725723e+01, 2.71474913393541e+01, 2.71473725494610e+01, 2.71469358688398e+01,\n                                                2.71457718662196e+01, 2.71432246149356e+01, 2.71383468602805e+01, 2.71298660815816e+01, 2.71161633897790e+01,\n                                                2.70952670837877e+01, 2.70648625069746e+01, 2.70223195532573e+01, 2.69647387221638e+01, 2.68890159721615e+01,\n                                                2.67919257499843e+01, 2.66702204931138e+01, 2.65207436730181e+01, 2.63405521833901e+01, 2.61270427464128e+01,\n                                                2.58780762040443e+01, 2.55920932522582e+01, 2.52682154458901e+01, 2.49063260749397e+01, 2.45071265365995e+01,\n                                                2.40721647458640e+01, 2.36038326722399e+01, 2.31053303063674e+01, 2.25805937221468e+01, 2.20341861588965e+01,\n                                                2.14711538175522e+01, 2.08968523451644e+01, 2.03167549330327e+01, 1.97362571080997e+01, 1.91604951428039e+01,\n                                                1.85941936519749e+01, 1.80415535185316e+01, 1.75061849128681e+01, 1.69910835126130e+01, 1.64986426915007e+01,\n                                                1.60306914457549e+01, 1.55885473676395e+01, 1.51730755422557e+01, 1.47847469129535e+01, 1.44236924784815e+01,\n                                                1.40897519544993e+01, 1.37825169429706e+01, 1.35013692484412e+01, 1.32455150191246e+01, 1.30140151838055e+01,\n                                                1.28058124430989e+01, 1.26197549751702e+01, 1.24546170442592e+01, 1.23091168070131e+01, 1.21819317342758e+01,\n                                                1.20717121568542e+01, 1.19770934792000e+01, 1.18967075814964e+01, 1.18291938570220e+01, 1.17732102212622e+01,\n                                                1.17274442956943e+01, 1.16906248247118e+01, 1.16615332394550e+01, 1.16390151470309e+01, 1.16219914067784e+01,\n                                                1.16094683651910e+01, 1.16005467650574e+01, 1.15944288275728e+01, 1.15904230311215e+01, 1.15879461762479e+01,\n                                                1.15865224284783e+01, 1.15857791612125e+01, 1.15854395693604e+01, 1.15853121788520e+01, 1.15852775257450e+01,\n                                                1.15852724110262e+01, 1.15852719588589e+01, 1.15852630916714e+01, 1.15852030153562e+01, 1.15849821712332e+01,\n                                                1.15843935031364e+01, 1.15831053252353e+01, 1.15806387235697e+01, 1.15763505749144e+01, 1.15694232543959e+01,\n                                                1.15588620779334e+01, 1.15435014617456e+01, 1.15220206464874e+01, 1.14929695930098e+01, 1.14548052789691e+01,\n                                                1.14059380909446e+01, 1.13447873163445e+01, 1.12698439229283e+01, 1.11797379353502e+01, 1.10733068768282e+01,\n                                                1.09496610675720e+01, 1.08082412016972e+01, 1.06488636936561e+01, 1.04717498870164e+01, 1.02775363719265e+01,\n                                                1.00672652752972e+01, 9.84235525727027e+00, 9.60455574782725e+00, 9.35588832728034e+00, 9.09857981215579e+00,\n                                                8.83499147876802e+00, 8.56754813156662e+00, 8.29866978762780e+00, 8.03070799656649e+00, 7.76588845277347e+00,\n                                                7.50626151862174e+00, 7.25366230227361e+00, 7.00968174059453e+00, 6.77564958219305e+00, 6.55262929821035e+00,\n                                                6.34142396514724e+00, 6.14259130158851e+00, 5.95646547991943e+00, 5.78318314928559e+00, 5.62271126637671e+00,\n                                                5.47487473607231e+00, 5.33938239082443e+00, 5.21585037549372e+00, 5.10382247649501e+00, 5.00278730176262e+00,\n                                                4.91219247382170e+00, 4.83145615501455e+00, 4.75997630376308e+00, 4.69713808667692e+00, 4.64231986254629e+00,\n                                                4.59489812447879e+00, 4.55425174412979e+00, 4.51976581172363e+00, 4.49083530956290e+00, 4.46686879609926e+00,\n                                                4.44729221342641e+00, 4.43155286478566e+00, 4.41912354268548e+00, 4.40950672566773e+00, 4.40223870634121e+00,\n                                                4.39689346899139e+00, 4.39308610551272e+00, 4.39047554642670e+00, 4.38876639086806e+00, 4.38770964551121e+00,\n                                                4.38710222557329e+00, 4.38678512770431e+00, 4.38664024993666e+00, 4.38658590239530e+00, 4.38657111865116e+00,\n                                                4.38656893660530e+00, 4.38656874071903e+00, 4.38656486557502e+00, 4.38653861100288e+00, 4.38644209789628e+00,\n                                                4.38618484074092e+00, 4.38562189734756e+00, 4.38454401407616e+00, 4.38267025633002e+00, 4.37964361793833e+00,\n                                                4.37503010151977e+00, 4.36832174183063e+00, 4.35894398862315e+00, 4.34626775650047e+00, 4.32962627048613e+00,\n                                                4.30833657759355e+00, 4.28172525758478e+00, 4.24915746653065e+00, 4.21006801873740e+00, 4.16399280743565e+00,\n                                                4.11059854624160e+00, 4.04970864863819e+00, 3.98132310777899e+00, 3.90563052436602e+00, 3.82301094892992e+00,\n                                                3.73402890666928e+00, 3.63941677195602e+00, 3.54004945113299e+00, 3.43691201820489e+00, 3.33106245983531e+00,\n                                                3.22359199540425e+00, 3.11558554935297e+00, 3.00808488195479e+00, 2.90205663459729e+00, 2.79836710408652e+00,\n                                                2.69776492117421e+00, 2.60087200915886e+00, 2.50818234412671e+00, 2.42006728529394e+00, 2.33678574353418e+00,\n                                                2.25849729212284e+00, 2.18527647945959e+00, 2.11712697865791e+00, 2.05399466898939e+00, 1.99577917274985e+00,\n                                                1.94234369943095e+00, 1.89352325861579e+00, 1.84913141010175e+00, 1.80896575577921e+00, 1.77281237400607e+00,\n                                                1.74044937698383e+00, 1.71164974884010e+00, 1.68618360289572e+00, 1.66381998214067e+00, 1.64432831598907e+00,\n                                                1.62747963688567e+00, 1.61304765039321e+00, 1.60080974064657e+00, 1.59054797876810e+00, 1.58205018482685e+00,\n                                                1.57511107449311e+00, 1.56953350039907e+00, 1.56512977641789e+00, 1.56172305193076e+00, 1.55914868415073e+00,\n                                                1.55725554123470e+00, 1.55590715863238e+00, 1.55498266697781e+00, 1.55437741243357e+00, 1.55400319975655e+00,\n                                                1.55378810382956e+00, 1.55367581574133e+00, 1.55362451298237e+00, 1.55360526796628e+00, 1.55360003289491e+00,\n                                                1.55359926021077e+00, 1.55359918898310e+00, 1.55359775916732e+00, 1.55358807199580e+00, 1.55355246153636e+00,\n                                                1.55345754179518e+00, 1.55324983595467e+00, 1.55285214518464e+00, 1.55216084150108e+00, 1.55104427265111e+00,\n                                                1.54934246853276e+00, 1.54686833275444e+00, 1.54341048263097e+00, 1.53873785865547e+00, 1.53260615358165e+00,\n                                                1.52476600764626e+00, 1.51497278078860e+00, 1.50299755209761e+00, 1.48863882578785e+00, 1.47173426355526e+00,\n                                                1.45217164179738e+00, 1.42989817599261e+00, 1.40492738540343e+00, 1.37734280005435e+00, 1.34729803428665e+00,\n                                                1.31501304647797e+00, 1.28076673851533e+00, 1.24488637934921e+00, 1.20773462203755e+00, 1.16969508720788e+00,\n                                                1.13115758352825e+00, 1.09250401777096e+00, 1.05409591895337e+00, 1.01626428293514e+00, 9.79302167673310e-01,\n                                                9.43460174138082e-01, 9.08944673426461e-01, 8.75918420341179e-01, 8.44503049088090e-01, 8.14782884383149e-01,\n                                                7.86809513650908e-01, 7.60606635325374e-01, 7.36174801830956e-01, 7.13495791329478e-01, 6.92536451789849e-01,\n                                                6.73251952641522e-01, 6.55588447804405e-01, 6.39485199000404e-01, 6.24876233085615e-01, 6.11691616485530e-01,\n                                                5.99858428694546e-01, 5.89301509612113e-01, 5.79944045540657e-01, 5.71708048149446e-01, 5.64514770807335e-01,\n                                                5.58285097856512e-01, 5.52939934620113e-01, 5.48400618927445e-01, 5.44589368363376e-01, 5.41429770998292e-01,\n                                                5.38847320867944e-01, 5.36769992929777e-01, 5.35128845782651e-01, 5.33858634390612e-01, 5.32898409796246e-01,\n                                                5.32192078792889e-01, 5.31688894162357e-01, 5.31343845722660e-01, 5.31117924245947e-01, 5.30978234305636e-01,\n                                                5.30897938069515e-01, 5.30856019564496e-01, 5.30836867421954e-01, 5.30829682916391e-01, 5.30827728568440e-01,\n                                                5.30827440111196e-01, 5.30827412621520e-01, 5.30826851043855e-01, 5.30823046286741e-01, 5.30809059809627e-01,\n                                                5.30771778629159e-01, 5.30690197959657e-01, 5.30533992945010e-01, 5.30262450343400e-01, 5.29823831480911e-01,\n                                                5.29155237383208e-01, 5.28183043741308e-01, 5.26823964717849e-01, 5.24986787796863e-01, 5.22574794498851e-01,\n                                                5.19488842441163e-01, 5.15631033395891e-01, 5.10908832722436e-01, 5.05239443824706e-01, 4.98554185828979e-01,\n                                                4.90802583846673e-01, 4.81955869015636e-01, 4.72009607175764e-01, 4.60985232369538e-01, 4.48930349299118e-01,\n                                                4.35917775614413e-01, 4.22043404068006e-01, 4.07423059050615e-01, 3.92188588319698e-01, 3.76483462337248e-01,\n                                                3.60458152142257e-01, 3.44265530308803e-01, 3.28056499643523e-01, 3.11976011374227e-01, 2.96159595405214e-01,\n                                                2.80730491765652e-01, 2.65797442975142e-01, 2.51453178558975e-01, 2.37773593011227e-01, 2.24817586885933e-01,\n                                                2.12627509406019e-01, 2.01230113396619e-01, 1.90637912945547e-01, 1.80850823401926e-01, 1.71857962905406e-01,\n                                                1.63639503669927e-01, 1.56168477535687e-01, 1.49412461032142e-01, 1.43335087530474e-01, 1.37897355614996e-01,\n                                                1.33058721847860e-01, 1.28777981649350e-01, 1.25013953701867e-01, 1.21725991229141e-01, 1.18874348115668e-01,\n                                                1.16420429669091e-01, 1.14326957464982e-01, 1.12558075673064e-01, 1.11079422985298e-01, 1.09858190111296e-01,\n                                                1.08863178073733e-01, 1.08064867486192e-01, 1.07435503880538e-01, 1.06949199229604e-01, 1.06582045344538e-01,\n                                                1.06312231085042e-01, 1.06120152543937e-01, 1.05988503745721e-01, 1.05902335042089e-01, 1.05849067294770e-01,\n                                                1.05818451997820e-01, 1.05802470481009e-01, 1.05795168948163e-01, 1.05792429980781e-01, 1.05791684923716e-01,\n                                                1.05791574955134e-01, 1.05791564070714e-01, 1.05791337471359e-01, 1.05789802237723e-01, 1.05784158711316e-01,\n                                                1.05769116331246e-01, 1.05736202484437e-01, 1.05673191647611e-01, 1.05563687585800e-01, 1.05386893926749e-01,\n                                                1.05117610757716e-01, 1.04726495666910e-01, 1.04180625183631e-01, 1.03444385022541e-01, 1.02480703242705e-01,\n                                                1.01252618319137e-01, 9.97251441857543e-02, 9.78673580285374e-02, 9.56545972717606e-02, 9.30706148755860e-02,\n                                                9.01095131952303e-02, 8.67772631666242e-02, 8.30926235868930e-02, 7.90873085079085e-02, 7.48053092615066e-02,\n                                                7.03013567580797e-02, 6.56386001904394e-02, 6.08856673781872e-02, 5.61133456096883e-02, 5.13911673698573e-02,\n                                                4.67841944827114e-02, 4.23502650045151e-02, 3.81379047291119e-02, 3.41850204314937e-02, 3.05183994752554e-02,\n                                                2.71539549090676e-02, 2.40975886045902e-02, 2.13465043454164e-02, 1.88907894556394e-02, 1.67150940982168e-02,\n                                                1.48002651609005e-02, 1.31248288925576e-02, 1.16662558877039e-02, 1.04019779858220e-02, 9.31015561546644e-03,\n                                                8.37021463320298e-03, 7.56318405548484e-03, 6.87187159856251e-03, 6.28091437597789e-03, 5.77673914575882e-03,\n                                                5.34746158787414e-03, 4.98274839087287e-03, 4.67366032289362e-03, 4.41248952448348e-03, 4.19260023616630e-03,\n                                                4.00827903892775e-03, 3.85459831331048e-03, 3.72729486078072e-03, 3.62266437478809e-03, 3.53747160208684e-03,\n                                                3.46887549862629e-03, 3.41436835140030e-03, 3.37172761368265e-03, 3.33897901987257e-03, 3.31436938283503e-03,\n                                                3.29634733078876e-03, 3.28355012798909e-03, 3.27479467409830e-03, 3.26907080545880e-03, 3.26553514760519e-03,\n                                                3.26350399181763e-03, 3.26244397930964e-03, 3.26195974986376e-03, 3.26177811469108e-03, 3.26172870705932e-03,\n                                                3.26172141461711e-03, 3.26172066240815e-03, 3.26170469453757e-03, 3.26159651180546e-03, 3.26119884907428e-03,\n                                                3.26013904515321e-03, 3.25782080031445e-03, 3.25338533525610e-03, 3.24568531036107e-03, 3.23327561713427e-03,\n                                                3.21442586333376e-03, 3.18715975635087e-03, 3.14932626858422e-03, 3.09870603264528e-03, 3.03315351131062e-03,\n                                                2.95077094813223e-03, 2.85010412531506e-03, 2.73034321656951e-03, 2.59150575820399e-03, 2.43457464910080e-03,\n                                                2.26156391325105e-03, 2.07549009708430e-03, 1.88023798880010e-03, 1.68032471708557e-03, 1.48058353815372e-03,\n                                                1.28580397958444e-03, 1.10037459401724e-03, 9.27975573532080e-04, 7.71360128098308e-04, 6.32247522716511e-04,\n                                                5.11330753923289e-04, 4.08382863241741e-04, 3.22432369145531e-04, 2.51973035986452e-04, 1.95176155173726e-04,\n                                                1.50081765681875e-04, 1.14754491065128e-04, 8.73968486985177e-05, 6.64180384717383e-05, 5.04615673406761e-05,\n                                                3.84014582976988e-05, 2.93212680020360e-05, 2.24884876445230e-05, 1.73294381085043e-05, 1.34028827147858e-05,\n                                                1.03708104859379e-05, 7.97159592025309e-06, 6.00481706669598e-06, 4.32970279007350e-06, 2.86656438674981e-06,\n                                                1.59127660026570e-06, 6.79961374316917e-07, 9.05130420392197e-07, 9.91389313753643e-07, 8.45748104438826e-07,\n                                                5.96606341218830e-07, 4.26325641456060e-14, 4.26325641456060e-14, 5.68434188608080e-14, 4.26325641456060e-14,\n                                                4.26325641456060e-14, 5.68434188608080e-14, 4.26325641456060e-14, 4.26325641456060e-14, 4.26325641456060e-14,\n                                                4.26325641456060e-14, 5.68434188608080e-14, 5.68434188608080e-14, 4.26325641456060e-14, 4.26325641456060e-14,\n                                                2.84217094304040e-14, 5.68434188608080e-14, 5.68434188608080e-14, 4.26325641456060e-14, 5.68434188608080e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.17000000000000e+02, 1.16999999369002e+02, 1.16999979857295e+02, 1.16999847662188e+02, 1.16999361692669e+02,\n                                                1.16998066227835e+02, 1.16995230888775e+02, 1.16989799934868e+02, 1.16980352529592e+02, 1.16965075196500e+02,\n                                                1.16941747259979e+02, 1.16907739728167e+02, 1.16860027945869e+02, 1.16795218546898e+02, 1.16709591843198e+02,\n                                                1.16599161748274e+02, 1.16459756372360e+02, 1.16287123003576e+02, 1.16077060542149e+02, 1.15825579820611e+02,\n                                                1.15529087238661e+02, 1.15184580209912e+02, 1.14789835615143e+02, 1.14343567312891e+02, 1.13845528548423e+02,\n                                                1.13296541649095e+02, 1.12698450369673e+02, 1.12054006633962e+02, 1.11366718105755e+02, 1.10640690559340e+02,\n                                                1.09880495804450e+02, 1.09091081917833e+02, 1.08277721830486e+02, 1.07445976448660e+02, 1.06601638678933e+02,\n                                                1.05750632548574e+02, 1.04898867138818e+02, 1.04052075400500e+02, 1.03215681413483e+02, 1.02394724114042e+02,\n                                                1.01593833418205e+02, 1.00817231985036e+02, 1.00068735728143e+02, 9.93517406196897e+01, 9.86691976474532e+01,\n                                                9.80235844637729e+01, 9.74168820803918e+01, 9.68505616974398e+01, 9.63255833535702e+01, 9.58424057911846e+01,\n                                                9.54010058464816e+01, 9.50009054443945e+01, 9.46412045002811e+01, 9.43206184061870e+01, 9.40375191378996e+01,\n                                                9.37899792837881e+01, 9.35758184498790e+01, 9.33926515493058e+01, 9.32379384608547e+01, 9.31090344652494e+01,\n                                                9.30032407615123e+01, 9.29178542488741e+01, 9.28502156494248e+01, 9.27977549580747e+01, 9.27580331524156e+01,\n                                                9.27287790863593e+01, 9.27079205355159e+01, 9.26936084630098e+01, 9.26842337313401e+01, 9.26784356940534e+01,\n                                                9.26751023512091e+01, 9.26733620321587e+01, 9.26725668628864e+01, 9.26722685669345e+01, 9.26721874231552e+01,\n                                                9.26721754465017e+01, 9.26721738070669e+01, 9.26721350891677e+01, 9.26718727701891e+01, 9.26709084651421e+01,\n                                                9.26683380377530e+01, 9.26627130035109e+01, 9.26519414751007e+01, 9.26332130911411e+01, 9.26029521512001e+01,\n                                                9.25568028968672e+01, 9.24896504570058e+01, 9.23956803205935e+01, 9.22684782101820e+01, 9.21011708114797e+01,\n                                                9.18866059134666e+01, 9.16175681347061e+01, 9.12870236512473e+01, 9.08883844108969e+01, 9.04157795597009e+01,\n                                                8.98643196855713e+01, 8.92303385359473e+01, 8.85115975479091e+01, 8.77074409534845e+01, 8.68188928400540e+01,\n                                                8.58486910335178e+01, 8.48012545068578e+01, 8.36825810277406e+01, 8.25000728791043e+01, 8.12622960994089e+01,\n                                                7.99786949745288e+01, 7.86593000542883e+01, 7.73144681034851e+01, 7.59546687534702e+01, 7.45903011417799e+01,\n                                                7.32315107980064e+01, 7.18879914937811e+01, 7.05687833407872e+01, 6.92820956861957e+01, 6.80351821010952e+01,\n                                                6.68342799135029e+01, 6.56846089945940e+01, 6.45904123896568e+01, 6.35550180812791e+01, 6.25809051962135e+01,\n                                                6.16697654825306e+01, 6.08225580406788e+01, 6.00395597271105e+01, 5.93204148923308e+01, 5.86641871032818e+01,\n                                                5.80694136703942e+01, 5.75341622968299e+01, 5.70560884873477e+01, 5.66324924273485e+01, 5.62603745294315e+01,\n                                                5.59364894044386e+01, 5.56573984349387e+01, 5.54195213368230e+01, 5.52191871024930e+01, 5.50526845767937e+01,\n                                                5.49163126787109e+01, 5.48064299943640e+01, 5.47195031673589e+01, 5.46521532319628e+01, 5.46011987993776e+01,\n                                                5.45636948405002e+01, 5.45369657283315e+01, 5.45186312218194e+01, 5.45066241948653e+01, 5.44991991351280e+01,\n                                                5.44949307439798e+01, 5.44927023406062e+01, 5.44916841833029e+01, 5.44913022403573e+01, 5.44911983428995e+01,\n                                                5.44911830078627e+01, 5.44911815521450e+01, 5.44911518735226e+01, 5.44909507969205e+01, 5.44902116245226e+01,\n                                                5.44882413119340e+01, 5.44839295828854e+01, 5.44756730709260e+01, 5.44613179463866e+01, 5.44381243512876e+01,\n                                                5.44027557824074e+01, 5.43512962723212e+01, 5.42792977417332e+01, 5.41818591499831e+01, 5.40537379802758e+01,\n                                                5.38894931172408e+01, 5.36836563122712e+01, 5.34309272621351e+01, 5.31263850084139e+01, 5.27657061473818e+01,\n                                                5.23453785435030e+01, 5.18628982168311e+01, 5.13169371255266e+01, 5.07074708150388e+01, 5.00358571753363e+01,\n                                                4.93048603044418e+01, 4.85186160030772e+01, 4.76825372559479e+01, 4.68031594923092e+01, 4.58879276752756e+01,\n                                                4.49449318512425e+01, 4.39826052698715e+01, 4.30094081754361e+01, 4.20335276016242e+01, 4.10626252026214e+01,\n                                                4.01036590234796e+01, 3.91627917341767e+01, 3.82453807311583e+01, 3.73560297591919e+01, 3.64986720696579e+01,\n                                                3.56766542825343e+01, 3.48927978353158e+01, 3.41494282247696e+01, 3.34483764419791e+01, 3.27909671190727e+01,\n                                                3.21780106943596e+01, 3.16098123400998e+01, 3.10862017395284e+01, 3.06065796766678e+01, 3.01699731332568e+01,\n                                                2.97750907063502e+01, 2.94203730019289e+01, 2.91040360354196e+01, 2.88241081523902e+01, 2.85784621883193e+01,\n                                                2.83648447934050e+01, 2.81809045181241e+01, 2.80242197520903e+01, 2.78923271291570e+01, 2.77827506219169e+01,\n                                                2.76930312465439e+01, 2.76207570603075e+01, 2.75635929379075e+01, 2.75193094491070e+01, 2.74858100298735e+01,\n                                                2.74611555501637e+01, 2.74435853437694e+01, 2.74315337879789e+01, 2.74236416076775e+01, 2.74187612286358e+01,\n                                                2.74159557106512e+01, 2.74144910398835e+01, 2.74138218339718e+01, 2.74135707940376e+01, 2.74135025053065e+01,\n                                                2.74134924260406e+01, 2.74134915290579e+01, 2.74134738718488e+01, 2.74133542418997e+01, 2.74129144731532e+01,\n                                                2.74117422387996e+01, 2.74091769729498e+01, 2.74042647197147e+01, 2.73957239523370e+01, 2.73819243155485e+01,\n                                                2.73608801257756e+01, 2.73302602808936e+01, 2.72874159388133e+01, 2.72294268742314e+01, 2.71531667746272e+01,\n                                                2.70553868692978e+01, 2.69328162123691e+01, 2.67822757224481e+01, 2.66008018309127e+01, 2.63857744670625e+01,\n                                                2.61350432911013e+01, 2.58470457269541e+01, 2.55209105071138e+01, 2.51565410383782e+01, 2.47546737033999e+01,\n                                                2.43169069474669e+01, 2.38456975056737e+01, 2.33443205526744e+01, 2.28167914097544e+01, 2.22677483813854e+01,\n                                                2.17022997237070e+01, 2.11258424267334e+01, 2.05438654017324e+01, 1.99617533034887e+01, 1.93846082016536e+01,\n                                                1.88171039995003e+01, 1.82633832907677e+01, 1.77269995789852e+01, 1.72109012119340e+01, 1.67174485478996e+01,\n                                                1.62484536147226e+01, 1.58052318299183e+01, 1.53886575039664e+01, 1.49992178028384e+01, 1.46370626230563e+01,\n                                                1.43020498086643e+01, 1.39937861362577e+01, 1.37116646960318e+01, 1.34548990649204e+01, 1.32225543507176e+01,\n                                                1.30135750006595e+01, 1.28268092761717e+01, 1.26610304493928e+01, 1.25149549866562e+01, 1.23872581698752e+01,\n                                                1.22765877232042e+01, 1.21815760473064e+01, 1.21008516264698e+01, 1.20330500830712e+01, 1.19768252284212e+01,\n                                                1.19308603146514e+01, 1.18938795413255e+01, 1.18646597226899e+01, 1.18420418855012e+01, 1.18249424512429e+01,\n                                                1.18123635678969e+01, 1.18034021020018e+01, 1.17972567864857e+01, 1.17932330460779e+01, 1.17907450890513e+01,\n                                                1.17893149570772e+01, 1.17885683562255e+01, 1.17882272411264e+01, 1.17880992791786e+01, 1.17880644706246e+01,\n                                                1.17880593329621e+01, 1.17880588787664e+01, 1.17880499718022e+01, 1.17879896259934e+01, 1.17877677911679e+01,\n                                                1.17871764821062e+01, 1.17858825239295e+01, 1.17834048500867e+01, 1.17790974397393e+01, 1.17721389681126e+01,\n                                                1.17615302168010e+01, 1.17461002257945e+01, 1.17245220327289e+01, 1.16953386025073e+01, 1.16569991706646e+01,\n                                                1.16079056871505e+01, 1.15464683549190e+01, 1.14711684403699e+01, 1.13806256558815e+01, 1.12736665797774e+01,\n                                                1.11493899165660e+01, 1.10072240540751e+01, 1.08469724759377e+01, 1.06688432237434e+01, 1.04734597756203e+01,\n                                                1.02618523048736e+01, 1.00354300680787e+01, 9.79593732218792e+00, 9.54539635877548e+00, 9.28604176476709e+00,\n                                                9.02024988672440e+00, 8.75046693000786e+00, 8.47913851593468e+00, 8.20864312667953e+00, 7.94123175048756e+00,\n                                                7.67897603471525e+00, 7.42372709459738e+00, 7.17708661062453e+00, 6.94039095304564e+00, 6.71470795443130e+00,\n                                                6.50084486249851e+00, 6.29936518207637e+00, 6.11061169630213e+00, 5.93473295804432e+00, 5.77171087767475e+00,\n                                                5.62138756572084e+00, 5.48349018002347e+00, 5.35765307043954e+00, 5.24343694910947e+00, 5.14034512231356e+00,\n                                                5.04783701202479e+00, 4.96533929740505e+00, 4.89225504751857e+00, 4.82797122069988e+00, 4.77186489002682e+00,\n                                                4.72330852762231e+00, 4.68167464704942e+00, 4.64634006373898e+00, 4.61668998783628e+00, 4.59212211179765e+00,\n                                                4.57205079704197e+00, 4.55591140162156e+00, 4.54316472699303e+00, 4.53330150023699e+00, 4.52584675276373e+00,\n                                                4.52036391202799e+00, 4.51645839302982e+00, 4.51378046441583e+00, 4.51202717143131e+00, 4.51094312468607e+00,\n                                                4.51032000773367e+00, 4.50999471419507e+00, 4.50984609166395e+00, 4.50979033931729e+00, 4.50977517343061e+00,\n                                                4.50977293498126e+00, 4.50977273403154e+00, 4.50976875871922e+00, 4.50974182549128e+00, 4.50964281756426e+00,\n                                                4.50937891005759e+00, 4.50880141214705e+00, 4.50769565375877e+00, 4.50577341635439e+00, 4.50266840970053e+00,\n                                                4.49793529336209e+00, 4.49105271994280e+00, 4.48143082017954e+00, 4.46842343993426e+00, 4.45134525999524e+00,\n                                                4.42949367162385e+00, 4.40217494491874e+00, 4.36873382906650e+00, 4.32858529638989e+00, 4.28124673535957e+00,\n                                                4.22636857274190e+00, 4.16376112557217e+00, 4.09341550312904e+00, 4.01551662729362e+00, 3.93044691278769e+00,\n                                                3.83877980717672e+00, 3.74126316645074e+00, 3.63879325530908e+00, 3.53238093644455e+00, 3.42311228834457e+00,\n                                                3.31210641326004e+00, 3.20047350627206e+00, 3.08927627702094e+00, 2.97949747223502e+00, 2.87201551216469e+00,\n                                                2.76758920227188e+00, 2.66685130743190e+00, 2.57030974235333e+00, 2.47835446792199e+00, 2.39126798962505e+00,\n                                                2.30923757511177e+00, 2.23236777794598e+00, 2.16069238462318e+00, 2.09418535094004e+00, 2.03277059783673e+00,\n                                                1.97633069816717e+00, 1.92471454337267e+00, 1.87774407964922e+00, 1.83522018437513e+00, 1.79692773747533e+00,\n                                                1.76263993765139e+00, 1.73212191978436e+00, 1.70513374296452e+00, 1.68143283335866e+00, 1.66077597827301e+00,\n                                                1.64292097462958e+00, 1.62762803541344e+00, 1.61466105131531e+00, 1.60378879234193e+00, 1.59478611655925e+00,\n                                                1.58743523159436e+00, 1.58152703044215e+00, 1.57686249805028e+00, 1.57325416076435e+00, 1.57052752873838e+00,\n                                                1.56852246356605e+00, 1.56709439117638e+00, 1.56611527462911e+00, 1.56547426346469e+00, 1.56507794569517e+00,\n                                                1.56485014463796e+00, 1.56473122422709e+00, 1.56467689131077e+00, 1.56465650961128e+00, 1.56465096533762e+00,\n                                                1.56465014701600e+00, 1.56465007158137e+00, 1.56464855731556e+00, 1.56463829798567e+00, 1.56460058425763e+00,\n                                                1.56450005832770e+00, 1.56428008527195e+00, 1.56385890818410e+00, 1.56312678309132e+00, 1.56194429372782e+00,\n                                                1.56014204832302e+00, 1.55752195482924e+00, 1.55386025008752e+00, 1.54891241431396e+00, 1.54242002785007e+00,\n                                                1.53411951793568e+00, 1.52375259968684e+00, 1.51107804448165e+00, 1.49588422531806e+00, 1.47800171465067e+00,\n                                                1.45731507340088e+00, 1.43377289927055e+00, 1.40739522303500e+00, 1.37827746793265e+00, 1.34659041952604e+00,\n                                                1.31257597418865e+00, 1.27653881011589e+00, 1.23883450986517e+00, 1.19985500697624e+00, 1.16001248302952e+00,\n                                                1.11972296832977e+00, 1.07939087999358e+00, 1.03939556882226e+00, 1.00008066732920e+00, 9.61746680950185e-01,\n                                                9.24646898259454e-01, 8.88986368227208e-01, 8.54923445391165e-01, 8.22573260029870e-01, 7.92012431381607e-01,\n                                                7.63284390988204e-01, 7.36404792633891e-01, 7.11366624280146e-01, 6.88144778650170e-01, 6.66699963141411e-01,\n                                                6.46981925876915e-01, 6.28932040152989e-01, 6.12485327135758e-01, 5.97572012314600e-01, 5.84118711763338e-01,\n                                                5.72049335927503e-01, 5.61285786319047e-01, 5.51748507437040e-01, 5.43356944283630e-01, 5.36029945736246e-01,\n                                                5.29686145759413e-01, 5.24244347577493e-01, 5.19623929915696e-01, 5.15745288722997e-01, 5.12530322009326e-01,\n                                                5.09902959368162e-01, 5.07789731400109e-01, 5.06120367807881e-01, 5.04828406738554e-01, 5.03851792467117e-01,\n                                                5.03133434239530e-01, 5.02621696499531e-01, 5.02270790176951e-01, 5.02041036430839e-01, 5.01898978220424e-01,\n                                                5.01817321099878e-01, 5.01774692274978e-01, 5.01755215623518e-01, 5.01747909390289e-01, 5.01745921930080e-01,\n                                                5.01745628585567e-01, 5.01745600630116e-01, 5.01745029537787e-01, 5.01741160317934e-01, 5.01726936878754e-01,\n                                                5.01689024119642e-01, 5.01606061637403e-01, 5.01447211748498e-01, 5.01171074264846e-01, 5.00725041138409e-01,\n                                                5.00045163910201e-01, 4.99056603802885e-01, 4.97674725642412e-01, 4.95806879737188e-01, 4.93354887875739e-01,\n                                                4.90218209310669e-01, 4.86297710466872e-01, 4.81499901270951e-01, 4.75741437603844e-01, 4.68953632324883e-01,\n                                                4.61086677122765e-01, 4.52113264211008e-01, 4.42031317718289e-01, 4.30865601190490e-01, 4.18668054725543e-01,\n                                                4.05516821164298e-01, 3.91514029570232e-01, 3.76782499749169e-01, 3.61461601420245e-01, 3.45702540186934e-01,\n                                                3.29663351259995e-01, 3.13503867897623e-01, 2.97380903614041e-01, 2.81443852776377e-01, 2.65830877241129e-01,\n                                                2.50665807777949e-01, 2.36055847042138e-01, 2.22090115011483e-01, 2.08839029234568e-01, 1.96354464312947e-01,\n                                                1.84670592522394e-01, 1.73805275097138e-01, 1.63761854758008e-01, 1.54531195648829e-01, 1.46093825746163e-01,\n                                                1.38422056072713e-01, 1.31481976821021e-01, 1.25235258878206e-01, 1.19640716912798e-01, 1.14655614742404e-01,\n                                                1.10236713754503e-01, 1.06341080197936e-01, 1.02926677370320e-01, 9.99527746959927e-02, 9.73802082064736e-02,\n                                                9.51715268184756e-02, 9.32910567836416e-02, 9.17049133509806e-02, 9.03809844916736e-02, 8.92889068136640e-02,\n                                                8.84000487816508e-02, 8.76875112503370e-02, 8.71261502885687e-02, 8.66926225154145e-02, 8.63654488839245e-02,\n                                                8.61250892629215e-02, 8.59540174845108e-02, 8.58367849243820e-02, 8.57600602625013e-02, 8.57126338438263e-02,\n                                                8.56853769247010e-02, 8.56711488399071e-02, 8.56646484774757e-02, 8.56622100588140e-02, 8.56615467584589e-02,\n                                                8.56614488570528e-02, 8.56614391669837e-02, 8.56612374329870e-02, 8.56598706658929e-02, 8.56548464408604e-02,\n                                                8.56414548950823e-02, 8.56121538802910e-02, 8.55560621304789e-02, 8.54585906687788e-02, 8.53012455367121e-02,\n                                                8.50616375894333e-02, 8.47137362169690e-02, 8.42284017032853e-02, 8.35742236498334e-02, 8.27186787670655e-02,\n                                                8.16295992995890e-02, 8.02769134267294e-02, 7.86345827962691e-02, 7.66826234129923e-02, 7.44090598123250e-02,\n                                                7.18116355899951e-02, 6.88990931102609e-02, 6.56918476865940e-02, 6.22219200607645e-02, 5.85320547037327e-02,\n                                                5.46740343491763e-02, 5.07062924635733e-02, 4.66910110117453e-02, 4.26909562384878e-02, 3.87663382242636e-02,\n                                                3.49719741836907e-02, 3.13549916423312e-02, 2.79532337882387e-02, 2.47944388946593e-02, 2.18961744358808e-02,\n                                                1.92664287822595e-02, 1.69047093647521e-02, 1.48034703620823e-02, 1.29496939203193e-02, 1.13264709225547e-02,\n                                                9.91446238292326e-03, 8.69316254573960e-03, 7.64192306817790e-03, 6.74072977275841e-03, 5.97074712548817e-03,\n                                                5.31466047138451e-03, 4.75685316853003e-03, 4.28345691153709e-03, 3.88231072400913e-03, 3.54285908571228e-03,\n                                                3.25601376137286e-03, 3.01399801732316e-03, 2.81018662832366e-03, 2.63895070325759e-03, 2.49551298122697e-03,\n                                                2.37581677660614e-03, 2.27641001045242e-03, 2.19434457963530e-03, 2.12709055102778e-03, 2.07246421868490e-03,\n                                                2.02856883736047e-03, 1.99374675715092e-03, 1.96654165725363e-03, 1.94566956484721e-03, 1.92999732358601e-03,\n                                                1.91852714908691e-03, 1.91038588613424e-03, 1.90481758548344e-03, 1.90117806415913e-03, 1.89893021287446e-03,\n                                                1.89763897546413e-03, 1.89696513868398e-03, 1.89665732683864e-03, 1.89654186726784e-03, 1.89651046053996e-03,\n                                                1.89650582498757e-03, 1.89650534684915e-03, 1.89649519666091e-03, 1.89642642902754e-03, 1.89617365191452e-03,\n                                                1.89549999421956e-03, 1.89402648811665e-03, 1.89120752419569e-03, 1.88631462351907e-03, 1.87843130792942e-03,\n                                                1.86646235233923e-03, 1.84916096860377e-03, 1.82517722653586e-03, 1.79312996979775e-03, 1.75170237957900e-03,\n                                                1.69975806967670e-03, 1.63647032789527e-03, 1.56145238264571e-03, 1.47487232277399e-03, 1.37753378974992e-03,\n                                                1.27090410956043e-03, 1.15707605834814e-03, 1.03865803993131e-03, 9.18598961916928e-04, 7.99966218949066e-04,\n                                                6.85704931399300e-04, 5.78411190815586e-04, 4.80150047380334e-04, 3.92340769394650e-04, 3.15719709021778e-04,\n                                                2.50377971738658e-04, 1.95859745389271e-04, 1.51299299986363e-04, 1.15571212830901e-04, 8.74299299198356e-05,\n                                                6.56216465984016e-05, 4.89624391235566e-05, 3.63876129085838e-05, 2.69825671352919e-05, 2.00016257565494e-05,\n                                                1.48716367220914e-05, 1.11712364656569e-05, 8.58246608004265e-06, 6.82928478568101e-06, 5.63780614015741e-06,\n                                                4.74786067172772e-06, 3.95917943762925e-06, 3.16390703858360e-06, 2.34276747335116e-06, 1.53861765284091e-06,\n                                                8.50162408028154e-07, 5.96391771523486e-07, 6.63594974525950e-07, 6.12787189879782e-07, 4.64184438442317e-07,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 0.00000000000000e+00, 1.42108547152020e-14, 0.00000000000000e+00,\n                                                1.42108547152020e-14, 2.84217094304040e-14, 1.42108547152020e-14, 1.42108547152020e-14, 2.84217094304040e-14,\n                                                1.42108547152020e-14, 1.42108547152020e-14, 0.00000000000000e+00, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                1.42108547152020e-14, 2.84217094304040e-14, 0.00000000000000e+00, 1.42108547152020e-14, 1.42108547152020e-14,\n                                                2.84217094304040e-14}),\nmadness::CubicInterpolationTable<double>(grid, {1.18000000000000e+02, 1.17999999361585e+02, 1.17999979620511e+02, 1.17999845871402e+02, 1.17999354189115e+02,\n                                                1.17998043495415e+02, 1.17995174824685e+02, 1.17989680022631e+02, 1.17980121541370e+02, 1.17964664564560e+02,\n                                                1.17941062265623e+02, 1.17906654662959e+02, 1.17858381409690e+02, 1.17792809067970e+02, 1.17706174044953e+02,\n                                                1.17594443352071e+02, 1.17453396409298e+02, 1.17278731692696e+02, 1.17066201335917e+02, 1.16811774066165e+02,\n                                                1.16511821701394e+02, 1.16163317332035e+02, 1.15764025876437e+02, 1.15312662544216e+02, 1.14808994703397e+02,\n                                                1.14253869551701e+02, 1.13649163426682e+02, 1.12997665369931e+02, 1.12302922396965e+02, 1.11569081232771e+02,\n                                                1.10800757446035e+02, 1.10002948070231e+02, 1.09180982321353e+02, 1.08340484851176e+02, 1.07487316764655e+02,\n                                                1.06627469080666e+02, 1.05766910821265e+02, 1.04911424993801e+02, 1.04066477495275e+02, 1.03237145337018e+02,\n                                                1.02428096820802e+02, 1.01643594660513e+02, 1.00887495161204e+02, 1.00163232398375e+02, 9.94737906718952e+01,\n                                                9.88216745160604e+01, 9.82088847263333e+01, 9.76369052635933e+01, 9.71067024180157e+01, 9.66187353755424e+01,\n                                                9.61729763363536e+01, 9.57689381852985e+01, 9.54057079910108e+01, 9.50819850171291e+01, 9.47961223004551e+01,\n                                                9.45461711178413e+01, 9.43299278137377e+01, 9.41449825086366e+01, 9.39887691797169e+01, 9.38586165240705e+01,\n                                                9.37517989046815e+01, 9.36655865594229e+01, 9.35972941407823e+01, 9.35443265637610e+01, 9.35042210843799e+01,\n                                                9.34746845220482e+01, 9.34536245833011e+01, 9.34391743459144e+01, 9.34297091207027e+01, 9.34238551184233e+01,\n                                                9.34204896018485e+01, 9.34187324853803e+01, 9.34179296412675e+01, 9.34176284662242e+01, 9.34175465392629e+01,\n                                                9.34175344470134e+01, 9.34175327917551e+01, 9.34174937001594e+01, 9.34172288493393e+01, 9.34162552370855e+01,\n                                                9.34136600009487e+01, 9.34079806776731e+01, 9.33971051957554e+01, 9.33781960873230e+01, 9.33476431868033e+01,\n                                                9.33010487992115e+01, 9.32332488960023e+01, 9.31383732352226e+01, 9.30099463010246e+01, 9.28410295226076e+01,\n                                                9.26244033074251e+01, 9.23527850149557e+01, 9.20190762049444e+01, 9.16166295352151e+01, 9.11395229094241e+01,\n                                                9.05828263584257e+01, 8.99428462146360e+01, 8.92173318447569e+01, 8.84056326114865e+01, 8.75087962330198e+01,\n                                                8.65296029651189e+01, 8.54725316519932e+01, 8.43436538501982e+01, 8.31504542430071e+01, 8.19015846779248e+01,\n                                                8.06065763415538e+01, 7.92755497689960e+01, 7.79189590396930e+01, 7.65473802577245e+01, 7.51713241688880e+01,\n                                                7.38010439570934e+01, 7.24463271469552e+01, 7.11162872874718e+01, 6.98191859855481e+01, 6.85623118039499e+01,\n                                                6.73519259980272e+01, 6.61932671044827e+01, 6.50905951428328e+01, 6.40472541777693e+01, 6.30657371460306e+01,\n                                                6.21477449796328e+01, 6.12942392279282e+01, 6.05054913874300e+01, 5.97811328060533e+01, 5.91202075436066e+01,\n                                                5.85212285230180e+01, 5.79822358309003e+01, 5.75008555110552e+01, 5.70743574530819e+01, 5.66997115982680e+01,\n                                                5.63736423077339e+01, 5.60926811682535e+01, 5.58532187005436e+01, 5.56515554167562e+01, 5.54839525089888e+01,\n                                                5.53466821964311e+01, 5.52360774611381e+01, 5.51485805968521e+01, 5.50807897109419e+01, 5.50295020818763e+01,\n                                                5.49917531060680e+01, 5.49648494866615e+01, 5.49463953351311e+01, 5.49343099789491e+01, 5.49268364907644e+01,\n                                                5.49225402632855e+01, 5.49202973283519e+01, 5.49192725318043e+01, 5.49188880983049e+01, 5.49187835233613e+01,\n                                                5.49187680883291e+01, 5.49187666231192e+01, 5.49187367509713e+01, 5.49185343632114e+01, 5.49177903709482e+01,\n                                                5.49158072110543e+01, 5.49114673694711e+01, 5.49031570319730e+01, 5.48887083460591e+01, 5.48653636427464e+01,\n                                                5.48297647850251e+01, 5.47779705187207e+01, 5.47055042223517e+01, 5.46074337003713e+01, 5.44784835641881e+01,\n                                                5.43131792526549e+01, 5.41060198645455e+01, 5.38516747875560e+01, 5.35451967750009e+01, 5.31822418945141e+01,\n                                                5.27592849756020e+01, 5.22738181610289e+01, 5.17245202031443e+01, 5.11113853371023e+01, 5.04358027041844e+01,\n                                                4.97005798712088e+01, 4.89099063662176e+01, 4.80692550208020e+01, 4.71852207361658e+01, 4.62652993130255e+01,\n                                                4.53176145073442e+01, 4.43506096699685e+01, 4.33727293999825e+01, 4.23921231110343e+01, 4.14164026325024e+01,\n                                                4.04524780745457e+01, 3.95064813309883e+01, 3.85837687840268e+01, 3.76889793889095e+01, 3.68261160726022e+01,\n                                                3.59986196549605e+01, 3.52094145526079e+01, 3.44609206975559e+01, 3.37550409005823e+01, 3.30931418792485e+01,\n                                                3.24760473551417e+01, 3.19040541296081e+01, 3.13769715775502e+01, 3.08941769345656e+01, 3.04546759786272e+01,\n                                                3.00571606332411e+01, 2.97000590608322e+01, 2.93815775364509e+01, 2.90997356305145e+01, 2.88523969905818e+01,\n                                                2.86372978358926e+01, 2.84520747171910e+01, 2.82942924972058e+01, 2.81614730191365e+01, 2.80511245708632e+01,\n                                                2.79607719891971e+01, 2.78879870428993e+01, 2.78304185598688e+01, 2.77858216135273e+01, 2.77520849593883e+01,\n                                                2.77272558255556e+01, 2.77095611228029e+01, 2.76974241611478e+01, 2.76894760458335e+01, 2.76845610755080e+01,\n                                                2.76817356717804e+01, 2.76802606190995e+01, 2.76795866696603e+01, 2.76793338502738e+01, 2.76792650774894e+01,\n                                                2.76792549267783e+01, 2.76792540234376e+01, 2.76792362410682e+01, 2.76791157631410e+01, 2.76786728771552e+01,\n                                                2.76774923335207e+01, 2.76749088836967e+01, 2.76699618086069e+01, 2.76613604940225e+01, 2.76474630193739e+01,\n                                                2.76262696071808e+01, 2.75954325968259e+01, 2.75522843138447e+01, 2.74938837567018e+01, 2.74170823770038e+01,\n                                                2.73186083662228e+01, 2.71951677960511e+01, 2.70435597497432e+01, 2.68608013377814e+01, 2.66442573643550e+01,\n                                                2.63917685677939e+01, 2.61017719328471e+01, 2.57734066126222e+01, 2.54065994236372e+01, 2.50021244981460e+01,\n                                                2.45616322892154e+01, 2.40876436685382e+01, 2.35835055625141e+01, 2.30533059419873e+01, 2.25017485618259e+01,\n                                                2.19339918424300e+01, 2.13554612320188e+01, 2.07716491241604e+01, 2.01879194290179e+01, 1.96093339818693e+01,\n                                                1.90405147295622e+01, 1.84855497439283e+01, 1.79479440958516e+01, 1.74306102912605e+01, 1.69358887677421e+01,\n                                                1.64655875204185e+01, 1.60210310107558e+01, 1.56031111920337e+01, 1.52123366034535e+01, 1.48488780727172e+01,\n                                                1.45126111137846e+01, 1.42031556051603e+01, 1.39199131302643e+01, 1.36621019118103e+01, 1.34287889332684e+01,\n                                                1.32189187700680e+01, 1.30313388289837e+01, 1.28648209988857e+01, 1.27180800243070e+01, 1.25897891418391e+01,\n                                                1.24785936373120e+01, 1.23831229962287e+01, 1.23020022560993e+01, 1.22338630548118e+01, 1.21773547266302e+01,\n                                                1.21311556428225e+01, 1.20939848381900e+01, 1.20646138159135e+01, 1.20418782882074e+01, 1.20246894962214e+01,\n                                                1.20120446663825e+01, 1.20030361082618e+01, 1.19968584458531e+01, 1.19928135021700e+01, 1.19903124253594e+01,\n                                                1.19888747485960e+01, 1.19881242080407e+01, 1.19877812927114e+01, 1.19876526554113e+01, 1.19876176631429e+01,\n                                                1.19876124983645e+01, 1.19876120417716e+01, 1.19876030877975e+01, 1.19875424234880e+01, 1.19873194177988e+01,\n                                                1.19867249874760e+01, 1.19854241976428e+01, 1.19829334370895e+01, 1.19786032585903e+01, 1.19716079599743e+01,\n                                                1.19609429535275e+01, 1.19454309043534e+01, 1.19237374802397e+01, 1.18943973113716e+01, 1.18558503766834e+01,\n                                                1.18064884955065e+01, 1.17447109103315e+01, 1.16689871305052e+01, 1.15779243347282e+01, 1.14703358056660e+01,\n                                                1.13453062250862e+01, 1.12022493364356e+01, 1.10409536110536e+01, 1.08616122090645e+01, 1.06648346907172e+01,\n                                                1.04516394761565e+01, 1.02234277260084e+01, 9.98194081409865e+00, 9.72920461355048e+00, 9.46746428847372e+00,\n                                                9.19911325113463e+00, 8.92661965210742e+00, 8.65245349394934e+00, 8.37901734713340e+00, 8.10858364405337e+00,\n                                                7.84324142035442e+00, 7.58485493709645e+00, 7.33503575651713e+00, 7.09512865236350e+00, 6.86621045317092e+00,\n                                                6.64909982278520e+00, 6.44437528714832e+00, 6.25239859991598e+00, 6.07334075076425e+00, 5.90720842103713e+00,\n                                                5.75386931635461e+00, 5.61307541315406e+00, 5.48448365539869e+00, 5.36767399362677e+00, 5.26216487871795e+00,\n                                                5.16742643849190e+00, 5.08289161387189e+00, 5.00796554441636e+00, 4.94203349125176e+00, 4.88446757876694e+00,\n                                                4.83463262699563e+00, 4.79189133241515e+00, 4.75560903281773e+00, 4.72515825961126e+00, 4.69992323765395e+00,\n                                                4.67930443954413e+00, 4.66272324076203e+00, 4.64962665797739e+00, 4.63949208978640e+00, 4.63183192208851e+00,\n                                                4.62619781413007e+00, 4.62218445020170e+00, 4.61943252926554e+00, 4.61763077206663e+00, 4.61651675239712e+00,\n                                                4.61587640408916e+00, 4.61554211425961e+00, 4.61538938125567e+00, 4.61533208692981e+00, 4.61531650158756e+00,\n                                                4.61531420122746e+00, 4.61531399471986e+00, 4.61530990945873e+00, 4.61528223131216e+00, 4.61518048499408e+00,\n                                                4.61490927800867e+00, 4.61431580570544e+00, 4.61317945574274e+00, 4.61120402341845e+00, 4.60801305069452e+00,\n                                                4.60314879750858e+00, 4.59607533105651e+00, 4.58618616051221e+00, 4.57281673320612e+00, 4.55526192768937e+00,\n                                                4.53279841949465e+00, 4.50471145736950e+00, 4.47032518629601e+00, 4.42903522038570e+00, 4.38034175145995e+00,\n                                                4.32388113703571e+00, 4.25945370682187e+00, 4.18704551380318e+00, 4.10684196924431e+00, 4.01923174800488e+00,\n                                                3.92480001018862e+00, 3.82431081189611e+00, 3.71867950848436e+00, 3.60893690918309e+00, 3.49618782082307e+00,\n                                                3.38156728863012e+00, 3.26619814753603e+00, 3.15115329969254e+00, 3.03742538473453e+00, 2.92590531806104e+00,\n                                                2.81736980956866e+00, 2.71247678555031e+00, 2.61176689706282e+00, 2.51566910683994e+00, 2.42450860650182e+00,\n                                                2.33851581208933e+00, 2.25783569959572e+00, 2.18253712984574e+00, 2.11262202821003e+00, 2.04803435687425e+00,\n                                                1.98866880534960e+00, 1.93437908626920e+00, 1.88498569655654e+00, 1.84028300502636e+00, 1.80004555609175e+00,\n                                                1.76403352638147e+00, 1.73199732524736e+00, 1.70368138147029e+00, 1.67882720035111e+00, 1.65717580452831e+00,\n                                                1.63846968766731e+00, 1.62245441364122e+00, 1.60887998682681e+00, 1.59750210378968e+00, 1.58808337499804e+00,\n                                                1.58039457923115e+00, 1.57421598486879e+00, 1.56933874306107e+00, 1.56556632969745e+00, 1.56271598794599e+00,\n                                                1.56062010268469e+00, 1.55912742396308e+00, 1.55810404990780e+00, 1.55743408086052e+00, 1.55701986595700e+00,\n                                                1.55678178003643e+00, 1.55665749122171e+00, 1.55660070571629e+00, 1.55657940401110e+00, 1.55657360947785e+00,\n                                                1.55657275421859e+00, 1.55657267537899e+00, 1.55657109276187e+00, 1.55656037034569e+00, 1.55652095432227e+00,\n                                                1.55641589114980e+00, 1.55618599074269e+00, 1.55574581037520e+00, 1.55498066590854e+00, 1.55374488224209e+00,\n                                                1.55186149814091e+00, 1.54912363554413e+00, 1.54529772212734e+00, 1.54012870963118e+00, 1.53334735151506e+00,\n                                                1.52467948694435e+00, 1.51385712409051e+00, 1.50063093137865e+00, 1.48478354610486e+00, 1.46614291943051e+00,\n                                                1.44459476504569e+00, 1.42009309790073e+00, 1.39266786793650e+00, 1.36242883027961e+00, 1.32956505056958e+00,\n                                                1.29433980493278e+00, 1.25708106154040e+00, 1.21816817121476e+00, 1.17801578593429e+00, 1.13705630596685e+00,\n                                                1.09572228214512e+00, 1.05443014728949e+00, 1.01356642852970e+00, 9.73477239260660e-01, 9.34461427350385e-01,\n                                                8.96767335721762e-01, 8.60592776643287e-01, 8.26087576319580e-01, 7.93357929317949e-01, 7.62471804570978e-01,\n                                                7.33464738462843e-01, 7.06345498860500e-01, 6.81101270384417e-01, 6.57702166739767e-01, 6.36105002390394e-01,\n                                                6.16256345844931e-01, 5.98094931363079e-01, 5.81553531202488e-01, 5.66560394967851e-01, 5.53040354391030e-01,\n                                                5.40915677653956e-01, 5.30106741840456e-01, 5.20532578005657e-01, 5.12111331852495e-01, 5.04760674209635e-01,\n                                                4.98398188897625e-01, 4.92941760378457e-01, 4.88309979024933e-01, 4.84422577278181e-01, 4.81200904961284e-01,\n                                                4.78568446398270e-01, 4.76451375806818e-01, 4.74779140946225e-01, 4.73485058623339e-01, 4.72506899912219e-01,\n                                                4.71787438372985e-01, 4.71274931680838e-01, 4.70923506293602e-01, 4.70693416325474e-01, 4.70551151667735e-01,\n                                                4.70469376377253e-01, 4.70426686006945e-01, 4.70407181269138e-01, 4.70399864505310e-01, 4.70397874181032e-01,\n                                                4.70397580413803e-01, 4.70397552418092e-01, 4.70396980502798e-01, 4.70393105707956e-01, 4.70378861781867e-01,\n                                                4.70340894468720e-01, 4.70257812883204e-01, 4.70098735997013e-01, 4.69822207206107e-01, 4.69375550873636e-01,\n                                                4.68694744834011e-01, 4.67704879990762e-01, 4.66321269658479e-01, 4.64451254277748e-01, 4.61996719028306e-01,\n                                                4.58857301224924e-01, 4.54934211685668e-01, 4.50134532634280e-01, 4.44375790305500e-01, 4.37590542154268e-01,\n                                                4.29730676919661e-01, 4.20771110813973e-01, 4.10712581885377e-01, 3.99583298897866e-01, 3.87439286000543e-01,\n                                                3.74363368936443e-01, 3.60462857627269e-01, 3.45866078545043e-01, 3.30717986733589e-01, 3.15175135981576e-01,\n                                                2.99400306847943e-01, 2.83557090558631e-01, 2.67804708040345e-01, 2.52293312113409e-01, 2.37159979512001e-01,\n                                                2.22525548806331e-01, 2.08492401488584e-01, 1.95143219118407e-01, 1.82540684353683e-01, 1.70728034234855e-01,\n                                                1.59730326551355e-01, 1.49556249184073e-01, 1.40200289970679e-01, 1.31645089926820e-01, 1.23863822216805e-01,\n                                                1.16822468360525e-01, 1.10481896770281e-01, 1.04799682410601e-01, 9.97316368681993e-02, 9.52330433802189e-02,\n                                                9.12596105493151e-02, 8.77681716523853e-02, 8.47171643120532e-02, 8.20669288537488e-02, 7.97798639765688e-02,\n                                                7.78204764025077e-02, 7.61553577233229e-02, 7.47531173400375e-02, 7.35842955949408e-02, 7.26212762042735e-02,\n                                                7.18382120775232e-02, 7.12109736771822e-02, 7.07171243352605e-02, 7.03359225248050e-02, 7.00483471354403e-02,\n                                                6.98371384998353e-02, 6.96868454392074e-02, 6.95838670967248e-02, 6.95164779043864e-02, 6.94748246971812e-02,\n                                                6.94508866598511e-02, 6.94383912893812e-02, 6.94326826089764e-02, 6.94305411761036e-02, 6.94299586629370e-02,\n                                                6.94298726855322e-02, 6.94298641757030e-02, 6.94296870121462e-02, 6.94284867131358e-02, 6.94240744376344e-02,\n                                                6.94123140884670e-02, 6.93865827240501e-02, 6.93373265776529e-02, 6.92517400806025e-02, 6.91135982688564e-02,\n                                                6.89032757588848e-02, 6.85979867898254e-02, 6.81722789525878e-02, 6.75988063182302e-02, 6.68493940670771e-02,\n                                                6.58963853566519e-02, 6.47142321344205e-02, 6.32812566007885e-02, 6.15814726801318e-02, 5.96063226834076e-02,\n                                                5.73561602134447e-02, 5.48413034142925e-02, 5.20824987322328e-02, 4.91106772162908e-02, 4.59659512681014e-02,\n                                                4.26958826380286e-02, 3.93531406216141e-02, 3.59927482886064e-02, 3.26691698050325e-02, 2.94335126869356e-02,\n                                                2.63311007085889e-02, 2.33996194078543e-02, 2.06679569037362e-02, 1.81557727905641e-02, 1.58737428722588e-02,\n                                                1.38243605734658e-02, 1.20031350334386e-02, 1.04000131194226e-02, 9.00086438481651e-03, 7.78889718915821e-03,\n                                                6.74591228042232e-03, 5.85333936686538e-03, 5.09303690169816e-03, 4.44786226286453e-03, 3.90203767045705e-03,\n                                                3.44134702473298e-03, 3.05320181632851e-03, 2.72661230849280e-03, 2.45209534291746e-03, 2.22154410027997e-03,\n                                                2.02807913953507e-03, 1.86589467473652e-03, 1.73010956341102e-03, 1.61662890046443e-03, 1.52201939414454e-03,\n                                                1.44339975305741e-03, 1.37834602934106e-03, 1.32481109979210e-03, 1.28105708458293e-03, 1.24559936980972e-03,\n                                                1.21716090490054e-03, 1.19463551520482e-03, 1.17705904689558e-03, 1.16358722601717e-03, 1.15347915459552e-03,\n                                                1.14608539253425e-03, 1.14083959388722e-03, 1.13725269383735e-03, 1.13490869233601e-03, 1.13346116083335e-03,\n                                                1.13262971382255e-03, 1.13219583802504e-03, 1.13199764554395e-03, 1.13192330464074e-03, 1.13190308285027e-03,\n                                                1.13190009818709e-03, 1.13189979032313e-03, 1.13189325504948e-03, 1.13184897858787e-03, 1.13168622753790e-03,\n                                                1.13125250005908e-03, 1.13030384105173e-03, 1.12848912462482e-03, 1.12533981325669e-03, 1.12026708340807e-03,\n                                                1.11256855964825e-03, 1.10144708177984e-03, 1.08604374437959e-03, 1.06548668507855e-03, 1.03895558059719e-03,\n                                                1.00575946936488e-03, 9.65422492370749e-04, 9.17768846122158e-04, 8.62995382490794e-04, 8.01718804595453e-04,\n                                                7.34985217832218e-04, 6.64233498611111e-04, 5.91210455269220e-04, 5.17844086317609e-04, 4.46089583363118e-04,\n                                                3.77768884746388e-04, 3.14426707447524e-04, 2.57223277841945e-04, 2.06877052576715e-04, 1.63661376561208e-04,\n                                                1.27449563890991e-04, 9.77953552023791e-05, 7.40314826117583e-05, 5.53688351629944e-05, 4.09823834814915e-05,\n                                                3.00764042435731e-05, 2.19281801605575e-05, 1.59134157797780e-05, 1.15168899270657e-05, 8.33031502622816e-06,\n                                                6.03990504544072e-06, 4.40886222463632e-06, 3.25823208413567e-06, 2.44548274963563e-06, 1.85034281230401e-06,\n                                                1.38117817982675e-06, 9.82889062584036e-07, 6.33370873970307e-07, 4.41518821503450e-07, 5.79661588062663e-07,\n                                                7.19121757697394e-07, 7.65494633014896e-07, 7.22373343364779e-07, 6.12960619150726e-07, 4.71135848556514e-07,\n                                                5.68434188608080e-14, 5.68434188608080e-14, 5.68434188608080e-14, 4.26325641456060e-14, 5.68434188608080e-14,\n                                                5.68434188608080e-14, 5.68434188608080e-14, 5.68434188608080e-14, 5.68434188608080e-14, 7.10542735760100e-14,\n                                                5.68434188608080e-14, 7.10542735760100e-14, 5.68434188608080e-14, 5.68434188608080e-14, 5.68434188608080e-14,\n                                                5.68434188608080e-14, 5.68434188608080e-14, 4.26325641456060e-14, 7.10542735760100e-14, 5.68434188608080e-14,\n                                                5.68434188608080e-14})\n};\n} // namespace madness\n"
  },
  {
    "path": "src/madness/chem/SAP.h",
    "content": "//\n// Created by Jonathon Misiewicz on 2/11/25.\n//\n\n#ifndef MPQC_SAP_INTERPOLATORS_H\n#define MPQC_SAP_INTERPOLATORS_H\n\n#include <madness/misc/interpolation_1d.h>\n\nnamespace madness {\n    extern std::vector<CubicInterpolationTable<double>> SAPCharges;\n}\n\n#endif  // MPQC_SAP_INTERPOLATORS_H\n"
  },
  {
    "path": "src/madness/chem/SCF.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n */\n\n/// \\file SCF.cc\n/// \\brief Molecular HF and DFT code\n/// \\defgroup moldft The molecular density functional and Hartree-Fock code\n\n\n\n#include \"funcdefaults.h\"\n#include \"tensor_json.hpp\"\n#include <madness/world/worldmem.h>\n#include <madness.h>\n#include <madness/chem/SCF.h>\n#include <madchem.h>\n\n#if defined(__has_include)\n#  if __has_include(<filesystem>)\n#    define MADCHEM_HAS_STD_FILESYSTEM\n// <filesystem> is not reliably usable on Linux with gcc < 9\n#    if defined(__GNUC__)\n#      if __GNUC__ >= 7 && __GNUC__ < 9\n#        undef MADCHEM_HAS_STD_FILESYSTEM\n#      endif\n#    endif\n#    if defined(MADCHEM_HAS_STD_FILESYSTEM)\n\n#      include <filesystem>\n\n#    endif\n#  endif\n#endif\n\nusing namespace madchem;\nnamespace madness {\n\n//    // moved to vmra.h\n//    template <typename T, std::size_t NDIM>\n//    DistributedMatrix<T> matrix_inner(const DistributedMatrixDistribution& d,\n//                                      const std::vector< Function<T,NDIM> >& f,\n//                                      const std::vector< Function<T,NDIM> >& g,\n//                                      bool sym=false)\n\n\ntemplate<typename T, std::size_t NDIM>\nstatic void verify_tree(World& world, const std::vector<Function<T, NDIM> >& v) {\n    for (unsigned int i = 0; i < v.size(); i++) {\n        v[i].verify_tree();\n    }\n}\n\ntemplate<int NDIM>\nstruct unaryexp {\n    void operator()(const Key<NDIM>& key, Tensor<double_complex>& t) const {\n        //vzExp(t.size, t.ptr(), t.ptr());\n        UNARY_OPTIMIZED_ITERATOR(double_complex, t, *_p0 = exp(*_p0););\n    }\n\n    template<typename Archive>\n    void serialize(Archive& ar) {}\n};\n\n\nstatic double rsquared(const coordT& r) {\n    return r[0] * r[0] + r[1] * r[1] + r[2] * r[2];\n}\n\n// // Returns exp(-I*t*V)\n// static Function<double_complex, 3> make_exp(double t, const Function<double, 3>& v) {\n//     v.reconstruct();\n//     Function<double_complex, 3> expV = double_complex(0.0, -t) * v;\n//     expV.unaryop(unaryexp<3>());\n//     //expV.truncate(); expV.reconstruct();\n//     return expV;\n// }\n\n// Timer modified to correctly nest\nstatic bool print_timings = false;\nstatic std::vector<double> ttt, sss;\n\nstatic void START_TIMER(World& world) {\n    world.gop.fence();\n    ttt.push_back(wall_time());\n    sss.push_back(cpu_time());\n}\n\nstatic double pop(std::vector<double>& v) {\n    MADNESS_ASSERT(v.size());\n    double x = v.back();\n    v.pop_back();\n    return x;\n}\n\nstatic void END_TIMER(World& world, const char *msg) {\n    double wall = wall_time() - pop(ttt), cpu = cpu_time() - pop(sss);\n    if (world.rank() == 0 and print_timings) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, cpu, wall);\n}\n\n\n/// Given overlap matrix, return rotation with 3rd order error to orthonormalize the vectors\ntensorT Q3(const tensorT& s) {\n    tensorT Q = inner(s, s);\n    Q.gaxpy(0.2, s, -2.0 / 3.0);\n    for (int i = 0; i < s.dim(0); ++i) Q(i, i) += 1.0;\n    return Q.scale(15.0 / 8.0);\n}\n\n/// Given overlap matrix, return rotation with 2nd order error to orthonormalize the vectors\ntensorT Q2(const tensorT& s) {\n    tensorT Q = -0.5 * s;\n    for (int i = 0; i < s.dim(0); ++i) Q(i, i) += 1.5;\n    return Q;\n}\n\nvoid SCF::output_scf_info_schema(const std::map<std::string, double> &vals,\n                                 const tensorT &dipole_T) const {\n    nlohmann::json j = {};\n    // if it exists figure out the size.  pushback for each protocol\n    const double thresh = FunctionDefaults<3>::get_thresh();\n    const int k = FunctionDefaults<3>::get_k();\n    j[\"scf_threshold\"] = thresh;\n    j[\"scf_k\"] = k;\n    for (auto const &[key, val]: vals) {\n        j[key] = val;\n    }\n    j[\"scf_dipole_moment\"] = tensor_to_json(dipole_T);\n    update_schema(param.prefix()+\".scf_info\", j);\n}\n\nvoid SCF::output_calc_info_schema() const {\n    nlohmann::json j = {};\n        vec_pair_ints int_vals;\n        vec_pair_T<double> double_vals;\n        vec_pair_tensor_T<double> double_tensor_vals;\n\n\n        int_vals.emplace_back(\"calcinfo_nmo\", param.nmo_alpha() + param.nmo_beta());\n        int_vals.emplace_back(\"calcinfo_nalpha\", param.nalpha());\n        int_vals.emplace_back(\"calcinfo_nbeta\", param.nbeta());\n        int_vals.emplace_back(\"calcinfo_natom\", molecule.natom());\n        int_vals.emplace_back(\"k\", FunctionDefaults<3>::get_k());\n\n        to_json(j, int_vals);\n        //    double_vals.push_back({\"return_energy\", value(molecule.get_all_coords().flat())});\n        double_vals.emplace_back(\"return_energy\", current_energy);\n        to_json(j, double_vals);\n        double_tensor_vals.emplace_back(\"scf_eigenvalues_a\", aeps);\n        if (param.nbeta() != 0 && !param.spin_restricted()) {\n            double_tensor_vals.emplace_back(\"scf_eigenvalues_b\", beps);\n        }\n\n        to_json(j, double_tensor_vals);\n        param.to_json(j);\n        j[\"molecule\"]= molecule.to_json();\n        e_data.to_json(j);\n\n        //    output_schema(param.prefix()+\".calc_info\", j);\n        update_schema(param.prefix()+\".calc_info\", j);\n}\n\nvoid scf_data::add_data(std::map<std::string, double> values) {\n    //print(\"ADDING DATA\");\n\n    iter++;\n    std::for_each(e_data.begin(), e_data.end(), [&values](auto &v) {\n    //    print(v.first, \" : \", values[v.first]);\n        v.second.push_back(values[v.first]);\n    });\n}\n\nscf_data::scf_data() : iter(0) {\n\n    e_data.insert({\"e_kinetic\", std::vector<double>(0)});\n    e_data.insert({\"e_local\", std::vector<double>(0)});\n    e_data.insert({\"e_nuclear\", std::vector<double>(0)});\n    e_data.insert({\"e_coulomb\", std::vector<double>(0)});\n    e_data.insert({\"e_pcm\", std::vector<double>(0)});\n    e_data.insert({\"e_xc\", std::vector<double>(0)});\n    e_data.insert({\"e_nrep\", std::vector<double>(0)});\n    e_data.insert({\"e_tot\", std::vector<double>(0)});\n}\n\n\nvoid scf_data::to_json(json &j) const {\n    madness::print(\"SCF DATA TO JSON\");\n\n    j[\"scf_e_data\"] = json();\n    j[\"scf_e_data\"][\"iterations\"] = iter;\n    j[\"scf_e_data\"][\"data\"] = {};\n\n    for (const auto &e: e_data) {\n        //::print(e.second);\n        j[\"scf_e_data\"][\"data\"][e.first]= e.second;\n    }\n}\n\nvoid scf_data::print_data() {\n    for (const auto &[key, value]: e_data) { print(key, \" : \", value); }\n}\n\nvoid scf_data::add_gradient(const Tensor<double> &grad) {\n    gradient = tensor_to_json(grad);\n}\n\nSCF::SCF(World& world, const CalculationParameters& param1, const Molecule& molecule)\n    : molecule(molecule), param(param1) {\n    PROFILE_MEMBER_FUNC(SCF);\n\n    if (world.rank() == 0) {\n        //account for nwchem aobasis generation\n        if (param.nwfile() == \"none\") reset_aobasis(param.aobasis());\n        else aobasis.read_nw_file(param.nwfile());\n        this->param.set_derived_values(molecule);\n    }\n    world.gop.broadcast_serializable(param, 0);\n    world.gop.broadcast_serializable(aobasis, 0);\n\n    if (param.print_level() > 2) print_timings = true;\n\n    xc.initialize(param.xc(), !param.spin_restricted(), world, param.print_level() >= 10);\n    //xc.plot();\n\n    // Ensure we have enough basis functions to guess the requested\n    // number of states ... a minimal basis for a closed-shell atom\n    // might not have any functions for virtuals.\n    int nbf = aobasis.nbf(molecule);\n    if ((this->param.nmo_alpha()>nbf) or (this->param.nmo_beta()>nbf)) error(\"too few basis functions?\", nbf);\n\n    FunctionDefaults<3>::set_cubic_cell(-param.L(), param.L());\n    //set_protocol < 3 > (world, param.econv());\n    FunctionDefaults<3>::set_truncate_mode(1);\n\n}\n\nvoid SCF::set_print_timings(const bool value) {\n    print_timings=value;\n}\n\nvoid SCF::copy_data(World& world, const SCF& other) {\n    aeps = copy(other.aeps);\n    beps = copy(other.beps);\n    aocc = copy(other.aocc);\n    bocc = copy(other.bocc);\n    amo = copy(world, other.amo);\n    bmo = copy(world, other.bmo);\n    aset = other.aset;\n    bset = other.bset;\n    ao = copy(world, other.ao);\n    at_to_bf = other.at_to_bf;\n    at_nbf = other.at_nbf;\n}\n\nvoid SCF::save_mos(World& world) {\n    PROFILE_MEMBER_FUNC(SCF);\n    auto archivename=param.prefix()+\".restartdata\";\n    archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, archivename.c_str(), param.get<int>(\"nio\"));\n    // IF YOU CHANGE ANYTHING HERE MAKE SURE TO UPDATE THIS VERSION NUMBER\n    /*\n     * After spin restricted\n      double L;\n      int k;\n      Molecule molecule;\n      std::string xc;\n      */\n    unsigned int version = 4;\n    ar & version;\n    ar & current_energy & param.spin_restricted();\n    ar & param.L() & FunctionDefaults<3>::get_k() & molecule & param.xc() & param.localize_method() & converged_for_thresh;\n    // Reorder so it doesn't affect orbital data\n\n    ar & (unsigned int) (amo.size());\n    ar & aeps & aocc & aset;\n    for (unsigned int i = 0; i < amo.size(); ++i) ar & amo[i];\n    if (!param.spin_restricted()) {\n        ar & (unsigned int) (bmo.size());\n        ar & beps & bocc & bset;\n        for (unsigned int i = 0; i < bmo.size(); ++i) ar & bmo[i];\n    }\n\n    // Do not make a restartaodata file if nwchem orbitals used,\n    // as no aoamo/aobmo overlap matrix can be computed\n    if (param.nwfile() == \"none\") {\n        tensorT Saoamo = matrix_inner(world, ao, amo);\n        tensorT Saobmo = (!param.spin_restricted()) ? matrix_inner(world, ao, bmo) : tensorT();\n        if (world.rank() == 0) {\n            archive::BinaryFstreamOutputArchive arao(param.prefix()+\".restartaodata\");\n            arao << Saoamo << aeps << aocc << aset;\n            if (!param.spin_restricted()) arao << Saobmo << beps << bocc << bset;\n        }\n    }\n}\n\nvoid SCF::load_mos(World& world) {\n    PROFILE_MEMBER_FUNC(SCF);\n    //        const double trantol = vtol / std::min(30.0, double(param.nalpha));\n\n    bool needs_redo=false; // if we need to redo the orbitals, e.g. because of a change in k or thresh\n\n    // const double thresh = FunctionDefaults<3>::get_thresh();\n    bool spinrest = false;\n\n    amo.clear();\n    bmo.clear();\n\n    archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, param.prefix()+\".restartdata\");\n\n    /*\n      File format:\n          unsigned int version;\n          double current energy;\n      bool spinrestricted --> if true only alpha orbitals are present\n      double L;\n      int k;\n      Molecule molecule;\n      std::string xc;\n      std::string localize;\n      double converged_for_thresh\n      unsigned int nmo_alpha;\n      Tensor<double> aeps;\n      Tensor<double> aocc;\n      vector<int> aset;\n      for i from 0 to nalpha-1:\n      .   Function<double,3> amo[i]\n      repeat for beta if !spinrestricted\n     */\n    // Local copies for a basic check\n    double L=0;\n    int k1=0;                    // Ignored for restarting, used in response only\n    double converged_for_thresh1=1.e10;\n    double current_energy1=1.e10;\n    unsigned int version = 4;// UPDATE THIS IF YOU CHANGE ANYTHING\n    unsigned int archive_version=0;\n\n    ar & archive_version;\n\n    // Some basic checks\n    std::string errmsg= \"incompatible archive versions: \"+std::to_string(archive_version) +\n                     \" vs. input parameter: \"+std::to_string(version);\n    MADNESS_CHECK_THROW(archive_version ==version, errmsg.c_str());\n\n    // LOTS OF LOGIC MISSING HERE TO CHANGE OCCUPATION NO., SET,\n    // EPS, SWAP, ... sigh\n    ar & current_energy1 & spinrest;\n    // Reorder\n    Molecule mol;\n    ar & L & k1 & mol& param.xc() & param.localize_method() & converged_for_thresh1;\n\n\n    // more basic checks\n    errmsg= \"inconsistent box size in restartdata file: \"+ std::to_string(L) +\n                     \" vs. input parameter: \"+std::to_string(param.L());\n    MADNESS_CHECK_THROW(L==param.L(), errmsg.c_str());\n\n    if (not (mol == molecule)) {\n        if (world.rank() == 0) {\n            print(\"Warning: Molecule in archive does not match the current molecule\");\n            print(\"Restarting from this molecular geometry\");\n            molecule.print();\n        }\n    }\n\n    auto check_and_set_thresh = [&world, &needs_redo](std::vector<real_function_3d>& mo) {\n        if (mo[0].thresh() *0.999 > FunctionDefaults<3>::get_thresh()) {\n            if (world.rank() == 0) print(\"Warning: thresh in archive does not match the current thresh: \",\n                                         mo[0].thresh(), \" vs. \", FunctionDefaults<3>::get_thresh());\n            set_thresh(world, mo, FunctionDefaults<3>::get_thresh());\n            needs_redo=true;\n        }\n    };\n\n    auto check_and_project_k = [&world, &needs_redo](std::vector<real_function_3d>& mo) {\n        auto k=FunctionDefaults<3>::get_k();\n        if (mo[0].k() != k) {\n            if (world.rank() == 0) print(\"Warning: k in archive does not match the current k\");\n            for (unsigned int i = 0; i < mo.size(); ++i)\n                mo[i] = madness::project(mo[i], k, FunctionDefaults<3>::get_thresh(), false);\n            needs_redo=true;\n        }\n    };\n\n\n    // load orbitals\n    MolecularOrbitals<double,3> amos, bmos;\n    amos.load_mos(ar, molecule, param.nmo_alpha());\n    amo= amos.get_mos();\n    aocc=amos.get_occ();\n    aeps=amos.get_eps();\n    aset=amos.get_localize_sets();\n    if (world.rank()==0) {\n        print(\"loaded \", amo.size(), \" alpha MOs from restartdata with thresh and k: \",amo[0].thresh(), amo[0].k());\n    }\n\n    check_and_project_k(amo);\n    check_and_set_thresh(amo);\n\n    if (param.have_beta()) {\n        bmos.load_mos(ar, molecule, param.nmo_beta());\n        bmo= bmos.get_mos();\n        bocc=bmos.get_occ();\n        beps=bmos.get_eps();\n        bset=bmos.get_localize_sets();\n        check_and_project_k(bmo);\n        check_and_set_thresh(bmo);\n    }\n\n    // if everything worked out, set convergence parameters\n    if (needs_redo) {\n        converged_for_thresh=1.e10;\n        current_energy=1.e10;\n    } else {\n        converged_for_thresh= converged_for_thresh1;\n        current_energy=current_energy1;\n    }\n    molecule=mol;\n}\n\n\n/// get the initial orbitals for a calculation\n\n/// the ordering of initial orbitals is\n/// 1. from restartdata\n/// 2. from aobasis\n/// 3. from NWChem\n/// 4. from initial_guess()\nvoid SCF::get_initial_orbitals(World& world) {\n\n    auto get_initial_orbitals1=[&](World& world, std::string fromwhere) {\n        if (world.rank()==0) print(\"try restarting calculation from \"+fromwhere);\n        bool success=false;\n        if (fromwhere==\"restartdata\") {\n            try {\n                load_mos(world);\n                success=true;\n            } catch (...) {\n                // could not load MOs, but user has requested so explicitly\n                if (param.restart()) {\n                    MADNESS_EXCEPTION(\"No initial orbitals found in restartdata\",1);\n                }\n                return false;\n            }\n            MADNESS_CHECK_THROW(amo.size()==size_t(param.nalpha()),\"inconsistent restart data\");\n\n        } else if (fromwhere==\"restartao\") {\n            reset_aobasis(\"sto-3g\");\n            ao = project_ao_basis(world, aobasis);\n            success=restart_aos(world);\n\n        } else if (fromwhere==\"NWChem\") {\n            initial_guess_from_nwchem(world);\n            // will throw if it doesn't work\n            success=true;\n\n        } else if (fromwhere==\"initial_guess\") {\n            reset_aobasis(param.aobasis());\n            ao = project_ao_basis(world, aobasis);\n            make_nuclear_potential(world);\n            initial_guess(world);\n            success=true;\n\n        } else {\n            throw std::runtime_error(\"Unknown source of initial orbitals: \"+fromwhere);\n        }\n        if (success and world.rank()==0) print(\"   --- successfully started from \",fromwhere);\n        return success;\n    };\n\n    bool success=false;\n    if (!success and param.restart()) success=get_initial_orbitals1(world,\"restartdata\");\n    if (!success and param.restartao()) success=get_initial_orbitals1(world,\"restartao\");\n    if (!success and param.nwfile()!=\"none\") success=get_initial_orbitals1(world,\"NWChem\");\n    if (!success) get_initial_orbitals1(world,\"initial_guess\");\n}\n\n\nvoid SCF::do_plots(World& world) {\n    PROFILE_MEMBER_FUNC(SCF);\n    START_TIMER(world);\n\n    std::vector<long> npt(3, static_cast<long>(param.get<int>(\"npt_plot\")));\n\n    if (param.plot_cell().size() == 0)\n        param.plot_cell() = copy(FunctionDefaults<3>::get_cell());\n\n    if (param.get<bool>(\"plotdens\") || param.get<bool>(\"plotcoul\")) {\n        functionT rho;\n        rho = make_density(world, aocc, amo);\n\n        if (param.spin_restricted()) {\n            rho.scale(2.0);\n        } else {\n            functionT rhob = make_density(world, bocc, bmo);\n            functionT rho_spin = rho - rhob;\n            rho += rhob;\n            plotdx(rho_spin, \"spin_density.dx\", param.plot_cell(), npt, true);\n\n        }\n        plotdx(rho, \"total_density.dx\", param.plot_cell(), npt, true);\n        if (param.get<bool>(\"plotcoul\")) {\n            real_function_3d vnuc = potentialmanager->vnuclear();\n            functionT vlocl = vnuc + apply(*coulop, rho);\n            vlocl.truncate();\n            vlocl.reconstruct();\n            plotdx(vlocl, \"coulomb.dx\", param.plot_cell(), npt, true);\n        }\n    }\n\n    for (int i = param.get<int>(\"plotlo\"); i <= param.get<int>(\"plothi\"); ++i) {\n        const std::size_t bufsize=256;\n        char fname[bufsize];\n        if (i < param.nalpha()) {\n            snprintf(fname,bufsize, \"amo-%5.5d.dx\", i);\n            plotdx(amo[i], fname, param.plot_cell(), npt, true);\n        }\n        if (!param.spin_restricted() && i < param.nbeta()) {\n            snprintf(fname,bufsize, \"bmo-%5.5d.dx\", i);\n            plotdx(bmo[i], fname, param.plot_cell(), npt, true);\n        }\n    }\n    END_TIMER(world, \"plotting\");\n}\n\nvoid SCF::project(World& world) {\n    PROFILE_MEMBER_FUNC(SCF);\n    reconstruct(world, amo);\n    for (unsigned int i = 0; i < amo.size(); ++i) {\n        amo[i] = madness::project(amo[i], FunctionDefaults<3>::get_k(),\n                                  FunctionDefaults<3>::get_thresh(), false);\n    }\n    world.gop.fence();\n    truncate(world, amo);\n    normalize(world, amo);\n    if (param.nbeta() && !param.spin_restricted()) {\n        reconstruct(world, bmo);\n        for (unsigned int i = 0; i < bmo.size(); ++i) {\n            bmo[i] = madness::project(bmo[i], FunctionDefaults<3>::get_k(),\n                                      FunctionDefaults<3>::get_thresh(), false);\n        }\n        world.gop.fence();\n        truncate(world, bmo);\n        normalize(world, bmo);\n    }\n}\n\nvoid SCF::make_nuclear_potential(World& world) {\n    PROFILE_MEMBER_FUNC(SCF);\n    START_TIMER(world);\n    potentialmanager = std::shared_ptr<PotentialManager\n    >(new PotentialManager(molecule, molecule.parameters.core_type()));\n    gthpseudopotential = std::shared_ptr<GTHPseudopotential<double>\n    >(new GTHPseudopotential<double>(world, molecule));\n\n    if (!molecule.parameters.pure_ae()) {\n        gthpseudopotential->make_pseudo_potential(world);\n    }\n    if (!molecule.parameters.psp_calc()) {\n        potentialmanager->make_nuclear_potential(world);\n    }\n    END_TIMER(world, \"Project vnuclear\");\n}\n\nvecfuncT SCF::project_ao_basis(World& world, const AtomicBasisSet& aobasis) {\n    PROFILE_MEMBER_FUNC(SCF);\n    // Make at_to_bf, at_nbf ... map from atom to first bf on atom, and nbf/atom\n    aobasis.atoms_to_bfn(molecule, at_to_bf, at_nbf);\n\n    return SCF::project_ao_basis_only(world, aobasis, molecule);\n}\n\nvecfuncT SCF::project_ao_basis_only(World& world, const AtomicBasisSet& aobasis,\n                                    const Molecule& molecule) {\n    vecfuncT ao = vecfuncT(aobasis.nbf(molecule));\n    for (int i = 0; i < aobasis.nbf(molecule); ++i) {\n        functorT aofunc(new AtomicBasisFunctor(\n                aobasis.get_atomic_basis_function(molecule, i)));\n        ao[i] = factoryT(world).functor(aofunc).truncate_on_project().nofence().truncate_mode(1);\n    }\n    world.gop.fence();\n    truncate(world, ao);\n    normalize(world, ao);\n    return ao;\n}\n\nvoid SCF::analyze_vectors(World& world, const vecfuncT& mo,\n            const vecfuncT& ao, double vtol,\n            const Molecule& molecule, const int print_level,\n            const AtomicBasisSet& aobasis, const tensorT& occ,\n            const tensorT& energy, const std::vector<int>& set) {\n    START_TIMER(world);\n    PROFILE_MEMBER_FUNC(SCF);\n    tensorT Saomo = matrix_inner(world, ao, mo);\n    tensorT Saoao = matrix_inner(world, ao, ao, true);\n    int nmo1 = mo.size();\n    tensorT rsq, dip(3, nmo1);\n    {\n        functionT frsq = factoryT(world).f(rsquared).initial_level(4);\n        rsq = inner(world, mo, mul_sparse(world, frsq, mo, vtol));\n        for (int axis = 0; axis < 3; ++axis) {\n            functionT fdip = factoryT(world).functor(\n                    functorT(new DipoleFunctor(axis))).initial_level(4);\n            dip(axis, _) = inner(world, mo, mul_sparse(world, fdip, mo, vtol));\n            for (int i = 0; i < nmo1; ++i)\n                rsq(i) -= dip(axis, i) * dip(axis, i);\n\n        }\n    }\n    tensorT C;\n    END_TIMER(world, \"Analyze vectors\");\n\n    START_TIMER(world);\n    gesvp(world, Saoao, Saomo, C);\n    END_TIMER(world, \"Compute eigen gesv analyze vectors\");\n    C = transpose(C);\n    long nmo = mo.size();\n    size_t ncoeff = 0;\n    for (long i = 0; i < nmo; ++i) {\n        size_t ncoeffi = mo[i].size();\n        ncoeff += ncoeffi;\n        // if (world.rank() == 0 and (param.print_level() > 1)) {\n        if (world.rank() == 0 and (print_level > 1)) {\n            printf(\"  MO%4ld : \", i);\n            if (set.size())\n                printf(\"set=%d : \", set[i]);\n\n            if (occ.size())\n                printf(\"occ=%.2f : \", occ(i));\n\n            if (energy.size())\n                printf(\"energy=%13.8f : \", energy(i));\n\n            printf(\"ncoeff=%.2e:\", (double) ncoeffi);\n\n            printf(\"center=(%.2f,%.2f,%.2f) : radius=%.2f\\n\", dip(0, i),\n                   dip(1, i), dip(2, i), sqrt(rsq(i)));\n            aobasis.print_anal(molecule, C(i, _));\n            printf(\"total number of coefficients = %.8e\\n\\n\", double(ncoeff));\n        }\n    }\n}\n\n// this version is faster than the previous version on BG/Q\ndistmatT SCF::kinetic_energy_matrix(World& world, const vecfuncT& v) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    int n = v.size();\n    distmatT r = column_distributed_matrix<double>(world, n, n);\n    START_TIMER(world);\n    reconstruct(world, v);\n    END_TIMER(world, \"KEmat reconstruct\");\n    START_TIMER(world);\n    vecfuncT dvx = apply(world, *(gradop[0]), v, false);\n    vecfuncT dvy = apply(world, *(gradop[1]), v, false);\n    vecfuncT dvz = apply(world, *(gradop[2]), v, false);\n    world.gop.fence();\n    END_TIMER(world, \"KEmat differentiate\");\n    START_TIMER(world);\n    compress(world, dvx, false);\n    compress(world, dvy, false);\n    compress(world, dvz, false);\n    world.gop.fence();\n    END_TIMER(world, \"KEmat compress\");\n    START_TIMER(world);\n    r += matrix_inner(r.distribution(), dvx, dvx, true);\n    r += matrix_inner(r.distribution(), dvy, dvy, true);\n    r += matrix_inner(r.distribution(), dvz, dvz, true);\n    END_TIMER(world, \"KEmat inner products\");\n    r *= 0.5;\n    //tensorT p(v.size(),v.size());\n    //r.copy_to_replicated(p);\n    return r;\n}\n\nbool SCF::restart_aos(World& world) {\n    tensorT Saoamo, Saobmo;\n    bool OK = true;\n    if (world.rank() == 0) {\n        try {\n            archive::BinaryFstreamInputArchive arao(param.prefix()+\".restartaodata\");\n            arao >> Saoamo >> aeps >> aocc >> aset;\n            if (Saoamo.dim(0) != int(ao.size()) || Saoamo.dim(1) != param.nmo_alpha()) {\n                print(\" AO alpha restart data size mismatch --- starting from atomic guess instead\", Saoamo.dim(0),\n                      ao.size(), Saoamo.dim(1), param.nmo_alpha());\n                OK = false;\n            }\n            if (!param.spin_restricted()) {\n                arao >> Saobmo >> beps >> bocc >> bset;\n                if (Saobmo.dim(0) != int(ao.size()) || Saobmo.dim(1) != param.nmo_beta()) {\n                    print(\" AO beta restart data size mismatch --- starting from atomic guess instead\", Saobmo.dim(0),\n                          ao.size(), Saobmo.dim(1), param.nmo_beta());\n                    OK = false;\n                }\n            }\n            print(\"\\nRestarting from AO projections on disk\\n\");\n        }\n        catch (...) {\n            // print(\"\\nAO restart file open/reading failed --- starting from atomic guess instead\\n\");\n            OK = false;\n        }\n    }\n    int fred = OK;\n    world.gop.broadcast(fred, 0);\n    OK = fred;\n    if (!OK) return false;\n\n    world.gop.broadcast_serializable(Saoamo, 0);\n    if (!param.spin_restricted()) world.gop.broadcast_serializable(Saobmo, 0);\n\n    tensorT S = matrix_inner(world, ao, ao), c;\n\n    gesvp(world, S, Saoamo, c);\n    amo = transform(world, ao, c, vtol, true);\n    truncate(world, amo);\n    orthonormalize(world, amo, param.nalpha());\n\n    if (!param.spin_restricted()) {\n        gesvp(world, S, Saobmo, c);\n        bmo = transform(world, ao, c, vtol, true);\n        truncate(world, bmo);\n        orthonormalize(world, bmo, param.nbeta());\n    }\n\n    return true;\n}\n\n\nvoid SCF::initial_guess_from_nwchem(World& world) {\n    START_TIMER(world);\n    MADNESS_CHECK_THROW(param.nwfile()!=\"none\",\"No NWChem file specified for initial guess\");\n    MADNESS_CHECK_THROW(amo.size()==0, \"Initial guess already exists for amo\");\n    MADNESS_CHECK_THROW(bmo.size()==0, \"Initial guess already exists for bmo\");\n\n    // Construct interface object from slymer namespace\n    slymer::NWChem_Interface nwchem(param.nwfile(), std::cout);\n\n    // For parallel runs, silencing all but 1 slymer instance\n    // If print_level is too low, silence all\n    if (world.rank() != 0 or param.print_level() < 4) {\n        std::ostream dev_null(nullptr);\n        nwchem.err = dev_null;\n    }\n\n    // Read in basis set\n    nwchem.read(slymer::Properties::Basis);\n\n    // Read in the molecular orbital coefficients, energies,\n    // and occupancies\n    nwchem.read(slymer::Properties::Energies | slymer::Properties::MOs | slymer::Properties::Occupancies);\n\n    // Shift madness atoms to match nwchem atoms\n    if (world.rank() == 0 && param.print_level() > 3)\n        print(\"\\nAligning atoms by moving MADNESS atoms to match NWChem atoms.\");\n\n    // Verify at least same number of atoms first\n    MADNESS_ASSERT(nwchem.atoms.size() == size_t(molecule.natom()));\n\n    // Get center of charge for nwchem\n    std::vector<double> nw_coc(3, 0);\n    double total_charge = 0.0;\n    if (world.rank() == 0 && param.print_level() > 3) print(\"NWChem coordinates:\");\n    for (auto atom: nwchem.atoms) {\n        int charge = symbol_to_atomic_number(atom.symbol);\n        total_charge += charge;\n        if (world.rank() == 0 && param.print_level() > 3)\n            print(atom.symbol, atom.position[0], atom.position[1], atom.position[2]);\n        nw_coc[0] += atom.position[0] * charge;\n        nw_coc[1] += atom.position[1] * charge;\n        nw_coc[2] += atom.position[2] * charge;\n    }\n    nw_coc[0] = nw_coc[0] / total_charge;\n    nw_coc[1] = nw_coc[1] / total_charge;\n    nw_coc[2] = nw_coc[2] / total_charge;\n\n    // Get center of charge for madness\n    std::vector<double> mad_coc(3, 0);\n    for (size_t i = 0; i < molecule.natom(); ++i) {\n        const Atom& atom = molecule.get_atom(i);\n        int charge = atom.atomic_number;\n        mad_coc[0] += atom.x * charge;\n        mad_coc[1] += atom.y * charge;\n        mad_coc[2] += atom.z * charge;\n    }\n    mad_coc[0] = mad_coc[0] / total_charge;\n    mad_coc[1] = mad_coc[1] / total_charge;\n    mad_coc[2] = mad_coc[2] / total_charge;\n\n    // Now translate MADNESS to have same coc as NWChem\n    Tensor<double> translation(3);\n    for (unsigned int i = 0; i < 3; i++) {\n        translation[i] = mad_coc[i] - nw_coc[i];\n    }\n    if (world.rank()==0) print(\"norm of translation NWChem -- madness\", translation.normf());\n    if (translation.normf()>1.e-13) {\n        molecule.translate(translation);\n    } else {\n        if (world.rank()==0) print(\"no translation needed\");\n    }\n\n    // Now construct the rotation such that the overlap between NWChem\n    // and MADNESS is maximized.\n    // First need the locations in a tensor for manipulations\n    Tensor<double> nw_coords(nwchem.atoms.size(), 4);\n    Tensor<double> mad_coords(molecule.natom(), 4);\n    for (unsigned int i = 0; i < nwchem.atoms.size(); i++) {\n        nw_coords(i, 0) = nwchem.atoms[i].position[0];\n        nw_coords(i, 1) = nwchem.atoms[i].position[1];\n        nw_coords(i, 2) = nwchem.atoms[i].position[2];\n        nw_coords(i, 3) = symbol_to_atomic_number(nwchem.atoms[i].symbol) * 1000.0;\n\n        const Atom& atom = molecule.get_atom(i);\n        mad_coords(i, 0) = atom.x;\n        mad_coords(i, 1) = atom.y;\n        mad_coords(i, 2) = atom.z;\n        mad_coords(i, 3) = atom.atomic_number * 1000.0;\n    }\n\n    // Using polar decomp to construct rotation\n    Tensor<double> q = inner(transpose(mad_coords), nw_coords);\n    Tensor<double> VT(4, 4);\n    Tensor<double> U(4, 4);\n    Tensor<double> sigma(4);\n    svd(q, U, sigma, VT);\n    q = inner(U, VT);\n    auto rotation = q(Slice(0, 2), Slice(0, 2));\n\n    // check if rotation is the identity matrix\n    auto id=copy(rotation);\n    for (int i=0; i<3; i++) id(i,i)-=1.0;\n    if (world.rank()==0) print(\"norm of rotation NWChem -- madness\", id.normf());\n    if (id.normf() < 1.e-13) {\n        if (world.rank() == 0) print(\"no rotation needed\");\n    } else {\n        // Rotate the molecule\n        molecule.rotate(rotation);\n    }\n\n    // And rotate\n    if (world.rank() == 0 && param.print_level() > 3) print(\"New MADNESS coordinates:\");\n    for (size_t i = 0; i < molecule.natom(); ++i) {\n        const Atom& atom = molecule.get_atom(i);\n        if (world.rank() == 0 && param.print_level() > 3)\n            print(atomic_number_to_symbol(atom.atomic_number), atom.x, atom.y, atom.z);\n    }\n\n    // Construct nuclear potential\n    make_nuclear_potential(world);\n    real_function_3d vnuc = potentialmanager->vnuclear();\n\n    // Pull out occupation numbers\n    // NWChem orders occupied orbitals to be first\n    aocc = tensorT(param.nalpha());\n    for (int i = 0; i < param.nalpha(); i++) {\n        // NWChem stores closed shell calculations\n        // as the alpha orbital set with occupation 2.\n        // Verifying no fractional occupations.\n        MADNESS_ASSERT(nwchem.occupancies[i] == 2.0 or nwchem.occupancies[i] == 1.0);\n\n        // Madness instead stores 2 identical sets\n        // (alpha and beta) with occupation 1\n        aocc[i] = 1.0;\n    }\n\n    // Pull out energies\n    aeps = tensorT(param.nalpha());\n    for (int i = 0; i < param.nalpha(); i++) {\n        aeps[i] = nwchem.energies[i];\n    }\n\n    // Create the orbitals as madness functions\n    // Just create the vector of atomic orbitals\n    // and use the vector of MO coefficients and\n    // the transform function, then take only\n    // the occupied orbitals.\n    if (world.rank() == 0 && param.print_level() > 3)\n        print(\"\\nCreating MADNESS functions from the NWChem orbitals.\");\n\n    // Cast the 'basis_set' into a gaussian basis\n    // and iterate over it\n    vector_real_function_3d temp1;\n    int i = 0;\n    for (auto basis: slymer::cast_basis<slymer::GaussianFunction>(nwchem.basis_set)) {\n        // Get the center of gaussian as its special point\n        std::vector<coord_3d> centers;\n        coord_3d r;\n        r[0] = basis.get().center[0];\n        r[1] = basis.get().center[1];\n        r[2] = basis.get().center[2];\n        centers.push_back(r);\n\n        // Now make the function\n        temp1.push_back(factoryT(world).functor(functorT(new slymer::Gaussian_Functor(basis.get(), centers))));\n        if (world.rank() == 0 and i % 10 == 0 and i != 0 && param.print_level() > 3)\n            print(\"Created\", i, \"functions.\");\n        i++;\n    }\n    if (world.rank() == 0 && param.print_level() > 3) print(\"Finished creating\", temp1.size(), \"functions.\");\n\n    // Transform ao's now\n    vector_real_function_3d temp = transform(world, temp1, nwchem.MOs, vtol, true);\n\n    // Now save all aos and only the occupied amo\n    for (unsigned int i = 0; i < temp1.size(); i++) {\n        // Save all AOs\n        ao.push_back(copy(temp1[i]));\n\n        // Only save occupied AMOs\n        if (nwchem.occupancies[i] > 0) {\n            amo.push_back(copy(temp[i]));\n        }\n    }\n\n    // Clean up\n    truncate(world, amo);\n    normalize(world, amo);\n\n    if (world.rank() == 0 && param.print_level() > 3) print(\"\\ngrouping alpha orbitals into sets\");\n    aset = group_orbital_sets(world, aeps, aocc, param.nmo_alpha());\n\n    // Now for betas\n    if (param.nbeta() && !param.spin_restricted()) {\n\n        // Pull out occupation numbers\n        // NWChem orders occupied orbitals to be first\n        bocc = tensorT(param.nbeta());\n        for (int i = 0; i < param.nbeta(); i++) {\n            MADNESS_ASSERT(nwchem.beta_occupancies[i] == 1.0);\n            bocc[i] = 1.0;\n        }\n\n        // Pull out energies\n        beps = tensorT(param.nbeta());\n        for (int i = 0; i < param.nbeta(); i++) {\n            beps[i] = nwchem.beta_energies[i];\n        }\n\n        // Transform ao's now\n        temp = transform(world, temp1, nwchem.beta_MOs, vtol, true);\n\n        // Now only take the occupied bmo\n        for (unsigned int i = 0; i < temp1.size(); i++) {\n            if (nwchem.beta_occupancies[i] > 0) {\n                bmo.push_back(copy(temp[i]));\n            }\n        }\n\n        // Clean up\n        truncate(world, bmo);\n        normalize(world, bmo);\n\n        if (world.rank() == 0 && param.print_level() > 3) print(\"\\ngrouping beta orbitals into sets\");\n        bset = group_orbital_sets(world, beps, bocc, param.nmo_beta());\n    }\n\n    END_TIMER(world, \"read nwchem file\");\n\n\n}\n\n\nvoid SCF::initial_guess(World& world) {\n    PROFILE_MEMBER_FUNC(SCF);\n    START_TIMER(world);\n    MADNESS_CHECK_THROW(not param.restart(),\"no restart in SCF::initial_guess\");\n    MADNESS_CHECK_THROW(param.nwfile()==\"none\",\"no nwchem in SCF::initial_guess\");\n\n    // recalculate initial guess density matrix without core orbitals\n    if (!molecule.parameters.pure_ae()) {\n        for (size_t iatom = 0; iatom < molecule.natom(); iatom++) {\n            if (molecule.get_pseudo_atom(iatom)) {\n                double zeff = molecule.get_atom_charge(iatom);\n                int atn = molecule.get_atomic_number(iatom);\n                aobasis.modify_dmat_psp(atn, zeff);\n            }\n        }\n    }\n\n    // Use the initial density and potential to generate a better process map\n    functionT rho =\n            factoryT(world).functor(\n                    functorT(\n                            new MolecularGuessDensityFunctor(molecule,\n                                                             aobasis))).truncate_on_project();\n    double nel = rho.trace();\n    if (world.rank() == 0 and param.print_level() > 3)\n        print(\"guess dens trace\", nel);\n    END_TIMER(world, \"guess density\");\n    rho.scale(std::round(nel) / nel);\n\n    if (world.size() > 1) {\n        START_TIMER(world);\n        LoadBalanceDeux<3> lb(world);\n        real_function_3d vnuc;\n        if (molecule.parameters.psp_calc()) {\n            vnuc = gthpseudopotential->vlocalpot();\n        } else if (molecule.parameters.pure_ae()) {\n            vnuc = potentialmanager->vnuclear();\n        } else {\n            vnuc = potentialmanager->vnuclear();\n            vnuc = vnuc + gthpseudopotential->vlocalpot();\n        }\n\n        lb.add_tree(vnuc,\n                    lbcost<double, 3>(param.vnucextra() * 1.0, param.vnucextra() * 8.0), false);\n        lb.add_tree(rho, lbcost<double, 3>(1.0, 8.0), true);\n\n        FunctionDefaults<3>::redistribute(world, lb.load_balance(param.get<int>(\"loadbalparts\")));\n        END_TIMER(world, \"guess loadbal\");\n    }\n\n    // Diag approximate fock matrix to get initial mos\n    functionT vlocal;\n    if (param.nalpha() + param.nbeta() > 1) {\n        START_TIMER(world);\n        real_function_3d vnuc;\n        if (molecule.parameters.psp_calc()) {\n            vnuc = gthpseudopotential->vlocalpot();\n        } else if (molecule.parameters.pure_ae()) {\n            vnuc = potentialmanager->vnuclear();\n        } else {\n            vnuc = potentialmanager->vnuclear();\n            vnuc = vnuc + gthpseudopotential->vlocalpot();\n        }\n        vlocal = vnuc + apply(*coulop, rho);\n        END_TIMER(world, \"guess Coulomb potn\");\n        START_TIMER(world);\n        vlocal = vlocal + make_lda_potential(world, rho);\n        vlocal.truncate();\n        END_TIMER(world, \"guess lda potn\");\n    } else {\n        real_function_3d vnuc;\n        if (molecule.parameters.psp_calc()) {\n            vnuc = gthpseudopotential->vlocalpot();\n        } else if (molecule.parameters.pure_ae()) {\n            vnuc = potentialmanager->vnuclear();\n        } else {\n            vnuc = potentialmanager->vnuclear();\n            vnuc = vnuc + gthpseudopotential->vlocalpot();\n        }\n        vlocal = vnuc;\n    }\n    rho.clear();\n    vlocal.reconstruct();\n    if (world.size() > 1) {\n        START_TIMER(world);\n        LoadBalanceDeux<3> lb(world);\n        real_function_3d vnuc;\n        if (molecule.parameters.psp_calc()) {\n            vnuc = gthpseudopotential->vlocalpot();\n        } else if (molecule.parameters.pure_ae()) {\n            vnuc = potentialmanager->vnuclear();\n        } else {\n            vnuc = potentialmanager->vnuclear();\n            vnuc = vnuc + gthpseudopotential->vlocalpot();\n        }\n        lb.add_tree(vnuc,\n                    lbcost<double, 3>(param.vnucextra() * 1.0, param.vnucextra() * 8.0), false);\n        for (unsigned int i = 0; i < ao.size(); ++i) {\n            lb.add_tree(ao[i], lbcost<double, 3>(1.0, 8.0), false);\n        }\n        FunctionDefaults<3>::redistribute(world, lb.load_balance(param.get<int>(\"loadbalparts\")));\n        END_TIMER(world, \"guess loadbal\");\n    }\n    START_TIMER(world);\n    tensorT overlap = matrix_inner(world, ao, ao, true);\n    END_TIMER(world, \"guess overlap\");\n    START_TIMER(world);\n\n    tensorT kinetic(ao.size(), ao.size());\n    {\n        distmatT dkinetic = kinetic_energy_matrix(world, ao);\n        dkinetic.copy_to_replicated(kinetic);\n    }\n    END_TIMER(world, \"guess Kinet potn\");\n\n    START_TIMER(world);\n    reconstruct(world, ao);\n    vlocal.reconstruct();\n    vecfuncT vpsi;\n\n    //debug plots:\n    /*{\n            int npt=1001;\n            functionT rhotmp =\n                factoryT(world).functor(\n                                        functorT(\n                                                 new MolecularGuessDensityFunctor(molecule,\n                                                                                  aobasis))).truncate_on_project();\n            functionT vlda=make_lda_potential(world, rhotmp);\n            functionT coul=apply(*coulop, rhotmp);\n            plot_line(\"vlocal.dat\",npt, {0.0,0.0,-50.0}, {0.0,0.0,50.0}, vlocal);\n            plot_line(\"vcoul.dat\",npt, {0.0,0.0,-50.0}, {0.0,0.0,50.0}, vcoul);\n            plot_line(\"vlda.dat\",npt, {0.0,0.0,-50.0}, {0.0,0.0,50.0}, vlda);\n            plot_line(\"dens.dat\",npt, {0.0,0.0,-50.0}, {0.0,0.0,50.0}, rhotmp);\n\n            if (!param.pure_ae && !param.psp_calc){\n                real_function_3d vloc_ae;\n                vloc_ae = potentialmanager->vnuclear();\n                vloc_ae.reconstruct();\n                plot_line(\"vlocal_ae.dat\",npt, {0.0,0.0,-50.0}, {0.0,0.0,50.0}, vloc_ae);\n                real_function_3d vloc_psp;\n                vloc_psp = gthpseudopotential->vlocalpot();\n                vloc_psp.reconstruct();\n                plot_line(\"vlocal_psp.dat\",npt, {0.0,0.0,-50.0}, {0.0,0.0,50.0}, vloc_psp);\n            }\n        }*/\n\n    //vlocal treated in psp includes psp and ae contribution so don't need separate clause for mixed psp/AE\n    if (!molecule.parameters.pure_ae()) {\n        double enl;\n        tensorT occ = tensorT(ao.size());\n        for (int i = 0; i < param.nalpha(); ++i) {\n            occ[i] = 1.0;\n        }\n        for (int i = param.nalpha(); size_t(i) < ao.size(); ++i) {\n            occ[i] = 0.0;\n        }\n        vpsi = gthpseudopotential->apply_potential(world, vlocal, ao, occ, enl);\n    } else {\n        vpsi = mul_sparse(world, vlocal, ao, vtol);\n    }\n\n    compress(world, vpsi);\n    truncate(world, vpsi);\n    compress(world, ao);\n    tensorT potential = matrix_inner(world, vpsi, ao, true);\n    vpsi.clear();\n    tensorT fock = kinetic + potential;\n    fock = 0.5 * (fock + transpose(fock));\n    tensorT c, e;\n\n    //debug printing\n    /*double ep = 0.0;\n        double ek = 0.0;\n        for(int i = 0;i < ao.size();++i){\n            ep += potential(i, i);\n            ek += kinetic(i, i);\n            std::cout << \"pot/kin \" << i << \"  \" << potential(i,i) << \"  \"<< kinetic(i,i) << std::endl;\n        }\n\n        if(world.rank() == 0){\n            printf(\"\\n              epot, ekin, efock %16.8f  %16.8f  %16.8f\\n\", ek, ep, ek+ep);\n     */\n\n    END_TIMER(world, \"guess fock\");\n\n    START_TIMER(world);\n    sygvp(world, fock, overlap, 1, c, e);\n    END_TIMER(world, \"guess eigen sol\");\n    print_meminfo(world.rank(), \"guess eigen sol\");\n\n    // NAR 7/5/2013\n    // commented out because it generated a lot of output\n    // if(world.rank() == 0 && 0){\n    //   print(\"initial eigenvalues\");\n    //   print(e);\n    //   print(\"\\n\\nWSTHORNTON: initial eigenvectors\");\n    //   print(c);\n    // }\n\n    START_TIMER(world);\n    compress(world, ao);\n\n    unsigned int ncore = 0;\n    if (molecule.parameters.core_type() != \"none\") {\n        ncore = molecule.n_core_orb_all();\n    }\n\n    amo = transform(world, ao, c(_, Slice(ncore, ncore + param.nmo_alpha() - 1)), vtol, true);\n    truncate(world, amo);\n    normalize(world, amo);\n    aeps = e(Slice(ncore, ncore + param.nmo_alpha() - 1));\n\n    aocc = tensorT(param.nmo_alpha());\n    for (int i = 0; i < param.nalpha(); ++i)\n        aocc[i] = 1.0;\n\n    if (world.rank() == 0 and param.print_level() > 3) print(\"grouping alpha orbitals into sets\");\n    aset = group_orbital_sets(world, aeps, aocc, param.nmo_alpha());\n\n    if (param.nbeta() && !param.spin_restricted()) {\n        bmo = transform(world, ao, c(_, Slice(ncore, ncore + param.nmo_beta() - 1)), vtol, true);\n        truncate(world, bmo);\n        normalize(world, bmo);\n        beps = e(Slice(ncore, ncore + param.nmo_beta() - 1));\n        bocc = tensorT(param.nmo_beta());\n        for (int i = 0; i < param.nbeta(); ++i)\n            bocc[i] = 1.0;\n\n        if (world.rank() == 0 and param.print_level() > 3) print(\"grouping beta orbitals into sets\");\n        bset = group_orbital_sets(world, beps, bocc, param.nmo_beta());\n\n    }\n    END_TIMER(world, \"guess orbital grouping\");\n}\n\n/// group orbitals into sets of similar orbital energies for localization\n\n/// @param[in]\teps\torbital energies\n/// @param[in]\tocc\toccupation numbers\n/// @param[in]\tnmo number of MOs for the given spin\n/// @return\t\tvector of length nmo with the set index for each MO\nstd::vector<int> SCF::group_orbital_sets(World& world, const tensorT& eps,\n                                         const tensorT& occ, const int nmo) const {\n    PROFILE_MEMBER_FUNC(SCF);\n\n    std::vector<int> set = std::vector<int>(static_cast<size_t>(nmo), 0);\n    for (int i = 1; i < nmo; ++i) {\n        set[i] = set[i - 1];\n        // Only the new/boys localizers can tolerate not separating out the core orbitals\n        if (param.localize_pm() && (eps[i] - eps[i - 1] > 1.5 || occ[i] != 1.0)) ++(set[i]);\n    }\n\n    // pretty print out\n    int lo = 0;\n    int iset = 0;\n    for (size_t i = 0; i < set.size(); ++i) {\n        if (iset != set[i]) {\n            if (world.rank() == 0 and (param.print_level() > 3)) print(\"set \", iset++, \"  \", lo, \" - \", i - 1);\n            lo = i;\n        }\n    }\n    if (world.rank() == 0 and (param.print_level() > 3)) print(\"set \", iset, \"  \", lo, \" - \", nmo - 1);\n    return set;\n}\n\n\nvoid SCF::initial_load_bal(World& world) {\n    PROFILE_MEMBER_FUNC(SCF);\n    LoadBalanceDeux<3> lb(world);\n    real_function_3d vnuc;\n    if (molecule.parameters.psp_calc()) {\n        vnuc = gthpseudopotential->vlocalpot();\n    } else if (molecule.parameters.pure_ae()) {\n        vnuc = potentialmanager->vnuclear();\n    } else {\n        vnuc = potentialmanager->vnuclear();\n        vnuc = vnuc + gthpseudopotential->vlocalpot();\n    }\n    lb.add_tree(vnuc, lbcost<double, 3>(param.vnucextra() * 1.0, param.vnucextra() * 8.0));\n\n    FunctionDefaults<3>::redistribute(world, lb.load_balance(param.loadbalparts()));\n}\n\nfunctionT SCF::make_density(World& world, const tensorT& occ,\n                            const vecfuncT& v) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    vecfuncT vsq = square(world, v);\n    compress(world, vsq);\n    functionT rho = factoryT(world);\n    rho.compress();\n    for (unsigned int i = 0; i < vsq.size(); ++i) {\n        if (occ[i]) rho.gaxpy(1.0, vsq[i], occ[i], false);\n    }\n    world.gop.fence();\n    vsq.clear();\n    return rho;\n}\n\nfunctionT SCF::make_density(World& world, const tensorT& occ,\n                            const cvecfuncT& v) {\n    PROFILE_MEMBER_FUNC(SCF);\n    reconstruct(world, v); // For max parallelism\n    std::vector<functionT> vsq(v.size());\n    for (unsigned int i = 0; i < v.size(); i++) {\n        vsq[i] = abssq(v[i], false);\n    }\n    world.gop.fence();\n\n    compress(world, vsq); // since will be using gaxpy for accumulation\n    functionT rho = factoryT(world);\n    rho.compress();\n\n    for (unsigned int i = 0; i < vsq.size(); ++i) {\n        if (occ[i])\n            rho.gaxpy(1.0, vsq[i], occ[i], false);\n\n    }\n    world.gop.fence();\n    vsq.clear();\n    rho.truncate();\n\n    return rho;\n}\n\nstd::vector<poperatorT> SCF::make_bsh_operators(World& world, const tensorT& evals,\n    const CalculationParameters& param) {\n    PROFILE_MEMBER_FUNC(SCF);\n    int nmo = evals.dim(0);\n    std::vector<poperatorT> ops(nmo);\n    double tol = FunctionDefaults<3>::get_thresh();\n    for (int i = 0; i < nmo; ++i) {\n        double eps = evals(i);\n        if (eps > 0) {\n            if (world.rank() == 0 and (param.print_level() > 3)) {\n                print(\"bsh: warning: positive eigenvalue\", i, eps);\n            }\n            eps = -0.1;\n        }\n\n        ops[i] = poperatorT(\n                BSHOperatorPtr3D(world, sqrt(-2.0 * eps), param.lo(), tol));\n    }\n\n    return ops;\n}\n\n\n// Used only for initial guess that is always spin-restricted LDA\nfunctionT SCF::make_lda_potential(World& world, const functionT& arho) {\n    PROFILE_MEMBER_FUNC(SCF);\n    functionT vlda = copy(arho);\n    vlda.reconstruct();\n    vlda.unaryop(xc_lda_potential());\n    return vlda;\n}\n\nvecfuncT SCF::apply_potential(World& world, const tensorT& occ,\n                              const vecfuncT& amo,\n                              const functionT& vlocal, double& exc, double& enl, int ispin) {\n    PROFILE_MEMBER_FUNC(SCF);\n    functionT vloc = copy(vlocal);\n    exc = 0.0;\n    enl = 0.0;\n\n    vecfuncT Vpsi;\n    print_meminfo(world.rank(), \"V*psi\");\n    if (xc.hf_exchange_coefficient()) {\n        START_TIMER(world);\n        Exchange<double, 3> K(world, this, ispin);\n\n        K.set_algorithm(Exchange<double,3>::string2algorithm(param.hfexalg()));\n        K.set_symmetric(true).set_printlevel(param.print_level());\n        K.set_macro_task_info(MacroTaskInfo::preset(\"default\"));\n        K.set_macro_task_info(param.memory());\n\n        vecfuncT Kamo = K(amo);\n        tensorT excv = inner(world, Kamo, amo);\n        double exchf = 0.0;\n        for (unsigned long i = 0; i < amo.size(); ++i) {\n            exchf -= 0.5 * excv[i] * occ[i];\n        }\n        if (!xc.is_spin_polarized()) exchf *= 2.0;\n        Vpsi=-xc.hf_exchange_coefficient()* Kamo;\n        Kamo.clear();\n        END_TIMER(world, \"HF exchange\");\n        exc = exchf * xc.hf_exchange_coefficient() + exc;\n    }\n    else {\n      Vpsi = zero_functions<double,3>(world, amo.size());\t  \n    }\n\n    // compute the local DFT potential for the MOs\n    if (xc.is_dft() && !(xc.hf_exchange_coefficient() == 1.0)) { //??RJH?? Won't this incorrectly exclude hybrid DFT with coeff=1.0?\n        START_TIMER(world);\n\n        XCOperator<double, 3> xcoperator(world, this, ispin, param.dft_deriv());\n        if (ispin == 0) exc = xcoperator.compute_xc_energy();\n        vloc += xcoperator.make_xc_potential();\n\n        END_TIMER(world, \"DFT potential\");\n    }\n\n    vloc.truncate();\n    \n    // need to come back to this for psp - when is this used?\n    // RJH commented this out since it seems to never do anything useful ... if pure all-electron there is not a non-local part\n    // if (molecule.parameters.pure_ae()) {\n    //     potentialmanager->apply_nonlocal_potential(world, amo, Vpsi);\n    // }\n\n    // compute Vpsi and truncation\n    START_TIMER(world);\n    const bool tile_Vpsi = true;\n    size_t min_tile = 10;\n    size_t ntile = std::min(amo.size(), min_tile);\n    if (!molecule.parameters.pure_ae()) {\n        gaxpy(world, 1.0, Vpsi, 1.0, gthpseudopotential->apply_potential(world, vloc, amo, occ, enl));\n    } else {\n        if (tile_Vpsi){\n            for (size_t ilo=0; ilo<amo.size(); ilo+=ntile) {\n                size_t iend = std::min(ilo+ntile,amo.size());\n                vecfuncT tmpamo(amo.begin()+ilo,amo.begin()+iend);\n                auto tmpVpsi = mul_sparse(world, vloc, tmpamo, vtol);\n\n                //truncate tmpVpsi\n                truncate(world, tmpVpsi);\n\n                //put the results into their final home\n                for (size_t i = ilo; i<iend; ++i){\n                    Vpsi[i] += tmpVpsi[i-ilo];\n                }\n            }\n            END_TIMER(world, \"V*psi\");\n        } else {\n            gaxpy(world, 1.0, Vpsi, 1.0, mul_sparse(world, vloc, amo, vtol));\n            END_TIMER(world, \"V*psi\");\n            START_TIMER(world);\n            truncate(world, Vpsi);\n            END_TIMER(world, \"Truncate Vpsi\");\n            print_meminfo(world.rank(), \"Truncate Vpsi\");\n        }\n    }\n\n    world.gop.fence();\n    return Vpsi;\n}\n\ntensorT SCF::derivatives(World& world, const functionT& rho) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    START_TIMER(world);\n\n    vecfuncT dv(molecule.natom() * 3);\n    vecfuncT du = zero_functions<double, 3>(world, molecule.natom() * 3);\n    tensorT rc(molecule.natom() * 3);\n    for (size_t atom = 0; atom < molecule.natom(); ++atom) {\n        for (int axis = 0; axis < 3; ++axis) {\n            functorT func(new MolecularDerivativeFunctor(molecule, atom, axis));\n            dv[atom * 3 + axis] =\n                    functionT(\n                            factoryT(world).functor(func).nofence().truncate_on_project().truncate_mode(0));\n            if (molecule.parameters.core_type() != \"none\"\n                && molecule.is_potential_defined_atom(atom)) {\n                // core potential contribution\n                func = functorT(\n                        new CorePotentialDerivativeFunctor(molecule, atom,\n                                                           axis));\n                du[atom * 3 + axis] = functionT(\n                        factoryT(world).functor(func).truncate_on_project());\n\n                // core projector contribution\n                rc[atom * 3 + axis] =\n                        potentialmanager->core_projector_derivative(world, amo,\n                                                                    aocc, atom, axis);\n                if (!param.spin_restricted()) {\n                    if (param.nbeta())\n                        rc[atom * 3 + axis] +=\n                                potentialmanager->core_projector_derivative(\n                                        world, bmo, bocc, atom, axis);\n                } else {\n                    rc[atom * 3 + axis] *= 2 * 2;\n                    // because of 2 electrons in each valence orbital bra+ket\n                }\n            }\n        }\n    }\n\n    world.gop.fence();\n    tensorT r = inner(world, rho, dv);\n    world.gop.fence();\n    tensorT ru = inner(world, rho, du);\n    dv.clear();\n    du.clear();\n    world.gop.fence();\n    tensorT ra(r.size());\n    for (size_t atom = 0; atom < molecule.natom(); ++atom) {\n        for (int axis = 0; axis < 3; ++axis) {\n            ra[atom * 3 + axis] = molecule.nuclear_repulsion_derivative(atom,\n                                                                        axis);\n        }\n    }\n    //if (world.rank() == 0) print(\"derivatives:\\n\", r, ru, rc, ra);\n    r += ra + ru + rc;\n    END_TIMER(world, \"derivatives\");\n\n    if (world.rank() == 0 and (param.print_level() > 1)) {\n        print(\"\\n Derivatives (a.u.)\\n -----------\\n\");\n        print(\n                \"  atom        x            y            z          dE/dx        dE/dy        dE/dz\");\n        print(\n                \" ------ ------------ ------------ ------------ ------------ ------------ ------------\");\n        for (size_t i = 0; i < molecule.natom(); ++i) {\n            const Atom& atom = molecule.get_atom(i);\n            printf(\" %5d %12.6f %12.6f %12.6f %12.6f %12.6f %12.6f\\n\", int(i),\n                   atom.x, atom.y, atom.z, r[i * 3 + 0], r[i * 3 + 1],\n                   r[i * 3 + 2]);\n        }\n    }\n    return r;\n}\n\ntensorT SCF::dipole(World& world, const functionT& rho) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    START_TIMER(world);\n    tensorT mu(3);\n\n    for (unsigned int axis = 0; axis < 3; ++axis) {\n        std::vector<int> x(3ul, 0);\n        x[axis] = true;\n        functionT dipolefunc = factoryT(world)\n                .functor(functorT(new MomentFunctor(x)));\n        mu[axis] = -dipolefunc.inner(rho);\n        mu[axis] += molecule.nuclear_dipole(axis);\n    }\n\n    if (world.rank() == 0 and (param.print_level() > 2)) {\n        print(\"\\n Dipole Moment (a.u.)\\n -----------\\n\");\n        print(\"     x: \", mu[0]);\n        print(\"     y: \", mu[1]);\n        print(\"     z: \", mu[2]);\n        print(\" Total Dipole Moment: \", mu.normf(), \"\\n\");\n    }\n    END_TIMER(world, \"dipole\");\n\n    return mu;\n}\n\nvoid SCF::vector_stats(const std::vector<double>& v, double& rms,\n                       double& maxabsval) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    rms = 0.0;\n    maxabsval = v[0];\n    for (unsigned int i = 0; i < v.size(); ++i) {\n        rms += v[i] * v[i];\n        maxabsval = std::max<double>(maxabsval, std::abs(v[i]));\n    }\n    rms = sqrt(rms / v.size());\n}\n\nvecfuncT SCF::compute_residual(World& world, tensorT& occ, tensorT& fock,\n                               const vecfuncT& psi, vecfuncT& Vpsi, double& err) {\n\n\n    // apply the BSH operator in a Macrotask to reduce communication and possible hangs\n    class ApplyTask : public MacroTaskOperationBase {\n    public:\n        ApplyTask() {\n            name=\"applytask\";\n        }\n        // you need to define the exact argument(s) of operator() as tuple\n        typedef std::tuple<const std::vector<real_function_3d> &, const Tensor<double>&,\n        const CalculationParameters&> argtupleT;\n\n        // you need to define the result type\n        // resultT must implement gaxpy(alpha, result, beta, contribution)\n        // with resultT result, contribution;\n        using resultT = std::vector<real_function_3d>;\n\n        // you need to define an empty constructor for the result\n        resultT allocator(World &world, const argtupleT &argtuple) const {\n            std::size_t n = std::get<0>(argtuple).size();\n            resultT result = zero_functions_compressed<double, 3>(world, n);\n            return result;\n        }\n\n        resultT operator()(const std::vector<real_function_3d> &Vpsi,\n            const Tensor<double>& eps, const CalculationParameters& param) const {\n            World& world=Vpsi.front().world();\n            MADNESS_CHECK_THROW(eps.ndim()==1,\"need a 1D tensor for eps in ApplyTask\");\n            Tensor<double> batched_eps=eps(Slice(batch.input[0].begin,batch.input[0].end-1));\n            MADNESS_CHECK_THROW(batched_eps.size()==batch.input[0].size(),\"batched eps size mismatch\");\n            std::vector<poperatorT> ops = make_bsh_operators(world, batched_eps,param);\n            vecfuncT new_psi = apply(world, ops, Vpsi);\n            return new_psi;\n        }\n    };\n\n    START_TIMER(world);\n    PROFILE_MEMBER_FUNC(SCF);\n    double trantol = vtol / std::min(30.0, double(psi.size()));\n    int nmo = psi.size();\n\n    tensorT eps(nmo);\n    for (int i = 0; i < nmo; ++i) {\n        eps(i) = std::min(-0.05, fock(i, i));\n        fock(i, i) -= eps(i);\n    }\n    vecfuncT fpsi = transform(world, psi, fock, trantol, true);\n\n    for (int i = 0; i < nmo; ++i) { // Undo the damage\n        fock(i, i) += eps(i);\n    }\n\n    gaxpy(world, 1.0, Vpsi, -1.0, fpsi);\n    fpsi.clear();\n    std::vector<double> fac(nmo, -2.0);\n    scale(world, Vpsi, fac);\n    END_TIMER(world, \"Compute residual stuff\");\n\n    const bool tile_applyBSH = true;\n    vecfuncT new_psi;\n\n    if (tile_applyBSH) {\n        START_TIMER(world);\n        size_t min_tile = 10;\n        size_t ntile = std::min(amo.size(), min_tile);\n        new_psi = zero_functions<double,3>(world, Vpsi.size());\n\n        for (size_t ilo=0; ilo<Vpsi.size(); ilo+=ntile) {\n            size_t iend = std::min(ilo+ntile,Vpsi.size());\n            vecfuncT tmp_Vpsi(Vpsi.begin()+ilo,Vpsi.begin()+iend);\n\n            int tmp_nmo = tmp_Vpsi.size();\n            tensorT tmp_eps(tmp_nmo);\n            for (int i = 0; i < tmp_nmo; ++i) {\n                tmp_eps(i) = std::min(-0.05, fock(i+ilo, i+ilo));\n            }\n\n            std::vector<poperatorT> ops = make_bsh_operators(world, tmp_eps, param);\n            set_thresh(world, tmp_Vpsi, FunctionDefaults<3>::get_thresh());\n\n            vecfuncT tmp_new_psi = apply(world, ops, tmp_Vpsi);\n\n            //truncate tmp_new_psi\n            truncate(world, tmp_new_psi);\n\n            //put the results into their final home\n            for (size_t i = ilo; i<iend; ++i){\n                new_psi[i] += tmp_new_psi[i-ilo];\n            }\n            ops.clear();\n        }\n\n        Vpsi.clear();\n        world.gop.fence();\n        END_TIMER(world, \"Apply BSH\");\n    } else {\n        START_TIMER(world);\n\n        std::vector<poperatorT> ops = make_bsh_operators(world, eps, param);\n        set_thresh(world, Vpsi, FunctionDefaults<3>::get_thresh());\n\n        new_psi = apply(world, ops, Vpsi);\n        \n        ops.clear();\n        Vpsi.clear();\n        world.gop.fence();\n\n        END_TIMER(world, \"Apply BSH\");\n        \n        START_TIMER(world);\n        truncate(world, new_psi);\n        END_TIMER(world, \"Truncate new psi\");\n    }\n\n    // Thought it was a bad idea to truncate *before* computing the residual\n    // but simple tests suggest otherwise ... no more iterations and\n    // reduced iteration time from truncating.\n\n    START_TIMER(world);\n    vecfuncT r = sub(world, psi, new_psi);\n    std::vector<double> rnorm = norm2s(world, r);\n    if (world.rank() == 0 and (param.print_level() > 1))\n        print(\"residuals\", rnorm);\n    double rms, maxval;\n    vector_stats(rnorm, rms, maxval);\n    err = maxval;\n    if (world.rank() == 0 and (param.print_level() > 1))\n        print(\"BSH residual: rms\", rms, \"   max\", maxval);\n    END_TIMER(world, \"BSH residual\");\n    return r;\n}\n\ntensorT SCF::make_fock_matrix(World& world, const vecfuncT& psi,\n                              const vecfuncT& Vpsi, const tensorT& occ, double& ekinetic) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    START_TIMER(world);\n    tensorT pe = matrix_inner(world, Vpsi, psi, true);\n    END_TIMER(world, \"PE matrix\");\n\n    std::shared_ptr<WorldDCPmapInterface<Key<3> > > oldpmap = FunctionDefaults<3>::get_pmap();\n    vecfuncT psicopy = psi; // Functions are shallow copy so this is lightweight\n    if (world.size() > 1) {\n        START_TIMER(world);\n        LoadBalanceDeux<3> lb(world);\n        for (unsigned int i = 0; i < psi.size(); ++i) {\n            lb.add_tree(psi[i], lbcost<double, 3>(1.0, 8.0), false);\n        }\n        world.gop.fence();\n        END_TIMER(world, \"KE compute loadbal\");\n\n        START_TIMER(world);\n        std::shared_ptr<WorldDCPmapInterface<Key<3> > > newpmap = lb.load_balance(param.loadbalparts());\n        FunctionDefaults<3>::set_pmap(newpmap);\n\n        world.gop.fence();\n        for (unsigned int i = 0; i < psi.size(); ++i) psicopy[i] = copy(psi[i], newpmap, false);\n        world.gop.fence();\n        END_TIMER(world, \"KE redist\");\n    }\n\n    START_TIMER(world);\n    tensorT ke(psi.size(), psi.size());\n    {\n        distmatT k = kinetic_energy_matrix(world, psicopy);\n        k.copy_to_replicated(ke); // !!!!!!!! ugh\n    }\n    END_TIMER(world, \"KE matrix\");\n\n    psicopy.clear();\n    if (world.size() > 1) {\n        FunctionDefaults<3>::set_pmap(oldpmap); // ! DON'T FORGET !\n    }\n\n    START_TIMER(world);\n    int nocc = occ.size();\n    ekinetic = 0.0;\n    for (int i = 0; i < nocc; ++i) {\n        ekinetic += occ[i] * ke(i, i);\n    }\n    ke += pe;\n    pe = tensorT();\n    ke.gaxpy(0.5, transpose(ke), 0.5);\n    END_TIMER(world, \"Make fock matrix rest\");\n    return ke;\n}\n\n/// Compute the two-electron integrals over the provided set of orbitals\n\n/// Returned is a *replicated* tensor of \\f$(ij|kl)\\f$ with \\f$i>=j\\f$\n/// and \\f$k>=l\\f$.  The symmetry \\f$(ij|kl)=(kl|ij)\\f$ is enforced.\nTensor<double> SCF::twoint(World& world, const vecfuncT& psi) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    double tol = FunctionDefaults<3>::get_thresh(); /// Important this is consistent with Coulomb\n    reconstruct(world, psi);\n    norm_tree(world, psi);\n\n    // Efficient version would use mul_sparse vector interface\n    vecfuncT pairs;\n    for (unsigned int i = 0; i < psi.size(); ++i) {\n        for (unsigned int j = 0; j <= i; ++j) {\n            pairs.push_back(mul_sparse(psi[i], psi[j], tol, false));\n        }\n    }\n\n    world.gop.fence();\n    truncate(world, pairs);\n    vecfuncT Vpairs = apply(world, *coulop, pairs);\n\n    return matrix_inner(world, pairs, Vpairs, true);\n}\n\n/// compute the unitary transformation that diagonalizes the fock matrix\n\n/// @param[in]  world   the world\n/// @param[in]  overlap the overlap matrix of the orbitals\n/// @param[inout]       fock    the fock matrix; diagonal upon exit\n/// @param[out] evals   the orbital energies\n/// @param[in]  occ     the occupation numbers\n/// @param[in]  thresh_degenerate       threshold for orbitals being degenerate\n/// @return             the unitary matrix U: U^T F U = evals\ntensorT SCF::get_fock_transformation(World& world, const tensorT& overlap,\n                                     tensorT& fock, tensorT& evals, const tensorT& occ,\n                                     const double thresh_degenerate) const {\n    PROFILE_MEMBER_FUNC(SCF);\n\n    tensorT U;\n    sygvp(world, fock, overlap, 1, U, evals);\n\n    Localizer::undo_reordering(U, occ, evals);\n    Localizer::undo_degenerate_rotations(U, evals, thresh_degenerate);\n\n    world.gop.broadcast(U.ptr(), U.size(), 0);\n    world.gop.broadcast(evals.ptr(), evals.size(), 0);\n\n    fock = 0;\n    for (unsigned int i = 0; i < evals.size(); ++i)\n        fock(i, i) = evals(i);\n    return U;\n}\n\n/// diagonalize the fock matrix, taking care of degenerate states\n\n/// Vpsi is passed in to make sure orbitals and Vpsi are in phase\n/// @param[in]  world   the world\n/// @param[inout]       fock    the fock matrix (diagonal upon exit)\n/// @param[inout]       psi             the orbitals\n/// @param[inout]       Vpsi    the orbital times the potential\n/// @param[out] evals   the orbital energies\n/// @param[in]  occ             occupation numbers\n/// @param[in]  thresh  threshold for rotation and truncation\n/// @return             the unitary matrix U: U^T F U = evals\ntensorT SCF::diag_fock_matrix(World& world, tensorT& fock, vecfuncT& psi,\n                              vecfuncT& Vpsi, tensorT& evals, const tensorT& occ,\n                              const double thresh) const {\n    PROFILE_MEMBER_FUNC(SCF);\n\n    START_TIMER(world);\n    // compute the unitary transformation matrix U that diagonalizes\n    // the fock matrix\n    tensorT overlap = matrix_inner(world, psi, psi, true);\n    tensorT U = get_fock_transformation(world, overlap, fock, evals, occ,\n                                        thresh);\n\n    //eliminate mixing between occ and unocc\n    int nmo = U.dim(0);\n    for (int i = 0; i < param.nalpha(); ++i) {\n        //make virt orthog to occ without changing occ states\n        for (int j = param.nalpha(); j < nmo; ++j) {\n            U(j, i) = 0.0;\n        }\n    }\n\n    // transform the orbitals and the orbitals times the potential\n    Vpsi = transform(world, Vpsi, U, vtol / std::min(30.0, double(psi.size())), false);\n    psi = transform(world, psi, U, FunctionDefaults<3>::get_thresh() / std::min(30.0, double(psi.size())),\n                    true);\n    truncate(world, Vpsi, vtol, false);\n    truncate(world, psi);\n    normalize(world, psi);\n\n    END_TIMER(world, \"Diagonalization rest\");\n    return U;\n}\n\nvoid SCF::loadbal(World& world, functionT& arho, functionT& brho,\n                  functionT& arho_old, functionT& brho_old, subspaceT& subspace) {\n    if (world.size() == 1)\n        return;\n\n    LoadBalanceDeux<3> lb(world);\n    real_function_3d vnuc;\n    if (molecule.parameters.psp_calc()) {\n        vnuc = gthpseudopotential->vlocalpot();\n    } else if (molecule.parameters.pure_ae()) {\n        vnuc = potentialmanager->vnuclear();\n    } else {\n        vnuc = potentialmanager->vnuclear();\n        vnuc = vnuc + gthpseudopotential->vlocalpot();\n    }\n    lb.add_tree(vnuc, lbcost<double, 3>(param.vnucextra() * 1.0, param.vnucextra() * 8.0),\n                false);\n    lb.add_tree(arho, lbcost<double, 3>(1.0, 8.0), false);\n    for (unsigned int i = 0; i < amo.size(); ++i) {\n        lb.add_tree(amo[i], lbcost<double, 3>(1.0, 8.0), false);\n    }\n    if (param.nbeta() && !param.spin_restricted()) {\n        lb.add_tree(brho, lbcost<double, 3>(1.0, 8.0), false);\n        for (unsigned int i = 0; i < bmo.size(); ++i) {\n            lb.add_tree(bmo[i], lbcost<double, 3>(1.0, 8.0), false);\n        }\n    }\n    world.gop.fence();\n\n    FunctionDefaults<3>::redistribute(world, lb.load_balance(\n            param.loadbalparts())); // 6.0 needs retuning after param.vnucextra\n\n    world.gop.fence();\n}\n\nvoid SCF::rotate_subspace(World& world, const tensorT& U, subspaceT& subspace,\n                          int lo, int nfunc, double trantol) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    for (unsigned int iter = 0; iter < subspace.size(); ++iter) {\n        vecfuncT& v = subspace[iter].first;\n        vecfuncT& r = subspace[iter].second;\n        vecfuncT vnew = transform(world, vecfuncT(&v[lo], &v[lo + nfunc]), U, trantol, false);\n        vecfuncT rnew = transform(world, vecfuncT(&r[lo], &r[lo + nfunc]), U, trantol, false);\n        world.gop.fence();\n        for (int i = 0; i < nfunc; i++) {\n            v[i] = vnew[i];\n            r[i] = rnew[i];\n        }\n    }\n    world.gop.fence();\n}\n\nvoid SCF::rotate_subspace(World& world, const distmatT& dUT, subspaceT& subspace,\n                          int lo, int nfunc, double trantol) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    for (unsigned int iter = 0; iter < subspace.size(); ++iter) {\n        vecfuncT& v = subspace[iter].first;\n        vecfuncT& r = subspace[iter].second;\n        vecfuncT vnew = transform(world, vecfuncT(&v[lo], &v[lo + nfunc]), dUT, false);\n        vecfuncT rnew = transform(world, vecfuncT(&r[lo], &r[lo + nfunc]), dUT, false);\n        world.gop.fence();\n        for (int i = 0; i < nfunc; i++) {\n            v[i] = vnew[i];\n            r[i] = rnew[i];\n        }\n    }\n    world.gop.fence();\n}\n\nvoid SCF::update_subspace(World& world, vecfuncT& Vpsia, vecfuncT& Vpsib,\n                          tensorT& focka, tensorT& fockb, subspaceT& subspace, tensorT& Q,\n                          double& bsh_residual, double& update_residual) {\n    PROFILE_MEMBER_FUNC(SCF);\n    double aerr = 0.0, berr = 0.0;\n    vecfuncT vm = amo;\n\n    // Orbitals with occ!=1.0 exactly must be solved for as eigenfunctions\n    // so zero out off diagonal lagrange multipliers\n    for (int i = 0; i < param.nmo_alpha(); i++) {\n        if (aocc[i] != 1.0) {\n            double tmp = focka(i, i);\n            focka(i, _) = 0.0;\n            focka(_, i) = 0.0;\n            focka(i, i) = tmp;\n        }\n    }\n\n    vecfuncT rm = compute_residual(world, aocc, focka, amo, Vpsia, aerr);\n    if (param.nbeta() != 0 && !param.spin_restricted()) {\n        for (int i = 0; i < param.nmo_beta(); i++) {\n            if (bocc[i] != 1.0) {\n                double tmp = fockb(i, i);\n                fockb(i, _) = 0.0;\n                fockb(_, i) = 0.0;\n                fockb(i, i) = tmp;\n            }\n        }\n\n        vecfuncT br = compute_residual(world, bocc, fockb, bmo, Vpsib, berr);\n        vm.insert(vm.end(), bmo.begin(), bmo.end());\n        rm.insert(rm.end(), br.begin(), br.end());\n    }\n\n    START_TIMER(world);\n    bsh_residual = std::max(aerr, berr);\n    world.gop.broadcast(bsh_residual, 0);\n    compress(world, vm, false);\n    compress(world, rm, false);\n    world.gop.fence();\n\n    restart:\n    subspace.push_back(pairvecfuncT(vm, rm));\n    int m = subspace.size();\n    tensorT ms(m);\n    tensorT sm(m);\n    for (int s = 0; s < m; ++s) {\n        const vecfuncT& vs = subspace[s].first;\n        const vecfuncT& rs = subspace[s].second;\n        for (unsigned int i = 0; i < vm.size(); ++i) {\n            ms[s] += vm[i].inner_local(rs[i]);\n            sm[s] += vs[i].inner_local(rm[i]);\n        }\n    }\n\n    world.gop.sum(ms.ptr(), m);\n    world.gop.sum(sm.ptr(), m);\n    tensorT newQ(m, m);\n    if (m > 1)\n        newQ(Slice(0, -2), Slice(0, -2)) = Q;\n\n    newQ(m - 1, _) = ms;\n    newQ(_, m - 1) = sm;\n    Q = newQ;\n    //if (world.rank() == 0) { print(\"kain Q\"); print(Q); }\n    tensorT c;\n    //if (world.rank() == 0) {\n    double rcond = 1e-12;\n    while (1) {\n        c = KAIN(Q, rcond);\n        if (world.rank() == 0 and (param.print_level() > 3)) print(\"kain c:\", c);\n        //if (std::abs(c[m - 1]) < 5.0) { // was 3\n        if (c.absmax() < 3.0) { // was 3\n            break;\n        } else if (rcond < 0.01) {\n            if (world.rank() == 0 and (param.print_level() > 3))\n                print(\"Increasing subspace singular value threshold \", c[m - 1], rcond);\n            rcond *= 100;\n        } else {\n            //print(\"Forcing full step due to subspace malfunction\");\n            // c = 0.0;\n            // c[m - 1] = 1.0;\n            // break;\n            if (world.rank() == 0 and (param.print_level() > 3)) print(\"Restarting KAIN due to subspace malfunction\");\n            Q = tensorT();\n            subspace.clear();\n            goto restart; // fortran hat on ...\n        }\n    }\n    //}\n    END_TIMER(world, \"Update subspace stuff\");\n\n    world.gop.broadcast_serializable(c, 0); // make sure everyone has same data\n    if (world.rank() == 0 and (param.print_level() > 3)) {\n        print(\"Subspace solution\", c);\n    }\n    START_TIMER(world);\n    vecfuncT amo_new = zero_functions_compressed<double, 3>(world, amo.size(), false);\n    vecfuncT bmo_new = zero_functions_compressed<double, 3>(world, bmo.size(), false);\n    world.gop.fence();\n    for (unsigned int m = 0; m < subspace.size(); ++m) {\n        const vecfuncT& vm = subspace[m].first;\n        const vecfuncT& rm = subspace[m].second;\n        const vecfuncT vma(vm.begin(), vm.begin() + amo.size());\n        const vecfuncT rma(rm.begin(), rm.begin() + amo.size());\n        const vecfuncT vmb(vm.end() - bmo.size(), vm.end());\n        const vecfuncT rmb(rm.end() - bmo.size(), rm.end());\n        gaxpy(world, 1.0, amo_new, c(m), vma, false);\n        gaxpy(world, 1.0, amo_new, -c(m), rma, false);\n        gaxpy(world, 1.0, bmo_new, c(m), vmb, false);\n        gaxpy(world, 1.0, bmo_new, -c(m), rmb, false);\n    }\n    world.gop.fence();\n    END_TIMER(world, \"Subspace transform\");\n    if (param.maxsub() <= 1) {\n        subspace.clear();\n    } else if (subspace.size() == size_t(param.maxsub())) {\n        subspace.erase(subspace.begin());\n        Q = Q(Slice(1, -1), Slice(1, -1));\n    }\n\n    do_step_restriction(world, amo, amo_new, \"alpha\");\n    orthonormalize(world, amo_new, param.nalpha());\n    amo = amo_new;\n\n    if (!param.spin_restricted() && param.nbeta() != 0) {\n        do_step_restriction(world, bmo, bmo_new, \"beta\");\n        orthonormalize(world, bmo_new, param.nbeta());\n        bmo = bmo_new;\n    } else if (param.nbeta()>0) {\n        bmo = amo;\n    }\n}\n\n/// perform step restriction following the KAIN solver\n\n/// Limit maximum step size to make convergence more robust\n/// @param[in]          world   the world\n/// @param[in]          mo              vector of orbitals from previous iteration\n/// @param[inout]       new_mo  vector of orbitals from the KAIN solver\n/// @param[in]          spin    \"alpha\" or \"beta\" for user information\n/// @return                     max residual\ndouble SCF::do_step_restriction(World& world, const vecfuncT& mo, vecfuncT& mo_new,\n                                std::string spin) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    std::vector<double> anorm = norm2s(world, sub(world, mo, mo_new));\n    int nres = 0;\n    for (unsigned int i = 0; i < mo.size(); ++i) {\n        if (anorm[i] > param.maxrotn()) {\n            double s = param.maxrotn() / anorm[i];\n            ++nres;\n            if (world.rank() == 0) {\n                if (nres == 1 and (param.print_level() > 2))\n                    printf(\"  restricting step for %s orbitals:\", spin.c_str());\n                printf(\" %d\", i);\n            }\n            mo_new[i].gaxpy(s, mo[i], 1.0 - s, false);\n        }\n    }\n    if (nres > 0 && world.rank() == 0 and (param.print_level() > 1))\n        printf(\"\\n\");\n\n    world.gop.fence();\n    double rms, maxval;\n    vector_stats(anorm, rms, maxval);\n    if (world.rank() == 0 and (param.print_level() > 2))\n        print(\"Norm of vector changes\", spin, \": rms\", rms, \"   max\", maxval);\n    return maxval;\n}\n\n/// orthonormalize the vectors (symmetric in occupied spaced, gramm-schmidt for virt to occ)\n\n/// @param[in]          world   the world\n/// @param[inout]       amo_new the vectors to be orthonormalized\nvoid SCF::orthonormalize(World& world, vecfuncT& amo_new, int nocc) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    START_TIMER(world);\n    double trantol = vtol / std::min(30.0, double(amo_new.size()));\n    normalize(world, amo_new);\n    double maxq;\n    do {\n        tensorT Q = Q2(matrix_inner(world, amo_new, amo_new)); // Q3(matrix_inner(world, amo_new, amo_new))\n        maxq = 0.0;\n        for (int j = 1; j < Q.dim(0); j++)\n            for (int i = 0; i < j; i++)\n                maxq = std::max(std::abs(Q(j, i)), maxq);\n\n        Q.screen(trantol); // Is this really needed? Just for speed.\n\n        //make virt orthog to occ without changing occ states --- ASSUMES symmetric form for Q2\n        for (int j = nocc; j < Q.dim(0); ++j) {\n            for (int i = 0; i < nocc; ++i) {\n                Q(j, i) = 0.0;\n                Q(i, j) *= 2.0;\n            }\n        }\n\n        amo_new = transform(world, amo_new,\n                            Q, trantol, true);\n        truncate(world, amo_new);\n        if (world.rank() == 0 and (param.print_level() > 3)) print(\"ORTHOG2a: maxq trantol\", maxq, trantol);\n        //print(Q);\n\n    } while (maxq > 0.01);\n    normalize(world, amo_new);\n\n    END_TIMER(world, \"Orthonormalize\");\n\n}\n\n/// orthonormalize the vectors ignoring occupied/virtual distinctions\n\n/// @param[in]          world   the world\n/// @param[inout]       amo_new the vectors to be orthonormalized\nvoid SCF::orthonormalize(World& world, vecfuncT& amo_new) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    START_TIMER(world);\n    double trantol = vtol / std::min(30.0, double(amo.size()));\n    normalize(world, amo_new);\n    double maxq;\n    do {\n        tensorT Q = Q2(matrix_inner(world, amo_new, amo_new)); // Q3(matrix_inner(world, amo_new, amo_new))\n        maxq = 0.0;\n        for (int j = 1; j < Q.dim(0); j++)\n            for (int i = 0; i < j; i++)\n                maxq = std::max(std::abs(Q(j, i)), maxq);\n\n        //Q.screen(trantol); // ???? Is this really needed?\n        amo_new = transform(world, amo_new,\n                            Q, trantol, true);\n        truncate(world, amo_new);\n        if (world.rank() == 0 and (param.print_level() > 3)) print(\"ORTHOG2b: maxq trantol\", maxq, trantol);\n        //print(Q);\n\n    } while (maxq > 0.01);\n    normalize(world, amo_new);\n    END_TIMER(world, \"Orthonormalize\");\n}\n\n\n// For given protocol, solve the DFT/HF/response equations\nvoid SCF::solve(World& world) {\n    PROFILE_MEMBER_FUNC(SCF);\n    functionT arho_old, brho_old;\n    const double dconv = std::max(FunctionDefaults<3>::get_thresh(),\n                                  param.dconv());\n    const double trantol = vtol / std::min(30.0, double(amo.size()));\n    //const double tolloc = 1e-6; // was std::min(1e-6,0.01*dconv) but now trying to avoid unnecessary change // moved to localizer.h\n    double update_residual = 0.0, bsh_residual = 0.0;\n    subspaceT subspace;\n    tensorT Q;\n    bool do_this_iter = true;\n    bool converged = false;\n\n    // Shrink subspace until stop localizing/canonicalizing--- probably not a good idea\n    // int maxsub_save = param.maxsub;\n    // param.maxsub = 2;\n    \n\n    // Fock matrix for storing the results\n    tensorT focka_json(param.nmo_alpha(), param.nmo_alpha());\n    tensorT fockb_json(param.nmo_beta(), param.nmo_beta());\n\n    for (int iter = 0; iter < param.maxiter(); ++iter) {\n        if (world.rank() == 0 and (param.print_level() > 1))\n            printf(\"\\nIteration %d at time %.1fs\\n\\n\", iter, wall_time());\n\n        // if (iter > 0 && update_residual < 0.1) {\n        //     //do_this_iter = false;\n        //     param.maxsub = maxsub_save;\n        // }\n        const bool tile_localize = true;\n        if (tile_localize) {\n            if (param.do_localize() && do_this_iter) {\n                START_TIMER(world);\n                Localizer localizer(world, aobasis, molecule, ao);\n                localizer.set_method(param.localize_method());\n                MolecularOrbitals<double, 3> mo(amo, aeps, {}, aocc, aset);\n                tensorT UT = localizer.compute_localization_matrix(world, mo, iter == 0);\n                UT.screen(trantol);\n\n                size_t min_tile = 10;\n                size_t ntile = std::min(amo.size(), min_tile);\n                vecfuncT new_amo = zero_functions<double,3>(world, amo.size());  \n\n                for (size_t ilo=0; ilo<amo.size(); ilo+=ntile){\n                    size_t iend = std::min(ilo+ntile,amo.size());\n                    auto U_slice = copy(transpose(UT)(_,Slice(ilo,iend-1)));\n\n                    auto tmp_amo = transform(world, amo, U_slice);\n\n                    truncate(world, tmp_amo);\n\n                    for (size_t i = ilo; i<iend; ++i){\n                        new_amo[i] += tmp_amo[i-ilo];\n                    }\n                }\n                normalize(world, new_amo);\n                amo = new_amo;\n\n                if (!param.spin_restricted() && param.nbeta() != 0) {\n\n                    MolecularOrbitals<double, 3> mo(bmo, beps, {}, bocc, bset);\n                    tensorT UT = localizer.compute_localization_matrix(world, mo, iter == 0);\n                    UT.screen(trantol);\n                    bmo = transform(world, bmo, transpose(UT));\n                    truncate(world, bmo);\n                    normalize(world, bmo);\n                }\n                END_TIMER(world, \"localize\");\n            }\n        } else {\n            if (param.do_localize() && do_this_iter) {\n                START_TIMER(world);\n                Localizer localizer(world, aobasis, molecule, ao);\n                localizer.set_method(param.localize_method());\n                MolecularOrbitals<double, 3> mo(amo, aeps, {}, aocc, aset);\n                tensorT UT = localizer.compute_localization_matrix(world, mo, iter == 0);\n                UT.screen(trantol);\n                amo = transform(world, amo, transpose(UT));\n                truncate(world, amo);\n                normalize(world, amo);\n\n                if (!param.spin_restricted() && param.nbeta() != 0) {\n\n                    MolecularOrbitals<double, 3> mo(bmo, beps, {}, bocc, bset);\n                    tensorT UT = localizer.compute_localization_matrix(world, mo, iter == 0);\n                    UT.screen(trantol);\n                    bmo = transform(world, bmo, transpose(UT));\n                    truncate(world, bmo);\n                    normalize(world, bmo);\n                }\n                END_TIMER(world, \"localize\");\n            }\n        }\n\n        START_TIMER(world);\n        functionT arho = make_density(world, aocc, amo), brho;\n\n        if (param.nbeta()) {\n            if (param.spin_restricted()) {\n                brho = arho;\n            } else {\n                brho = make_density(world, bocc, bmo);\n            }\n        } else {\n            brho = functionT(world); // zero\n        }\n        END_TIMER(world, \"Make densities\");\n        print_meminfo(world.rank(), \"Make densities\");\n\n        if (iter < 2 || (iter % 10) == 0) {\n            START_TIMER(world);\n            loadbal(world, arho, brho, arho_old, brho_old, subspace);\n            END_TIMER(world, \"Load balancing\");\n            print_meminfo(world.rank(), \"Load balancing\");\n        }\n        double da = 0.0, db = 0.0;\n        if (iter > 0) {\n            da = (arho - arho_old).norm2();\n            db = (brho - brho_old).norm2();\n            if (world.rank() == 0 and (param.print_level() > 2))\n                print(\"delta rho\", da, db, \"residuals\", bsh_residual,\n                      update_residual);\n\n        }\n\n        START_TIMER(world);\n        arho_old = arho;\n        brho_old = brho;\n        functionT rho = arho + brho;\n        rho.truncate();\n\n        real_function_3d vnuc;\n        if (molecule.parameters.psp_calc()) {\n            vnuc = gthpseudopotential->vlocalpot();\n        } else if (molecule.parameters.pure_ae()) {\n            vnuc = potentialmanager->vnuclear();\n        } else {\n            vnuc = potentialmanager->vnuclear();\n            vnuc = vnuc + gthpseudopotential->vlocalpot();\n        }\n        double enuclear = inner(rho, vnuc);\n        END_TIMER(world, \"Nuclear energy\");\n\n        START_TIMER(world);\n        functionT vcoul = apply(*coulop, rho);\n        functionT vlocal;\n        END_TIMER(world, \"Coulomb\");\n        print_meminfo(world.rank(), \"Coulomb\");\n\n        double ecoulomb = 0.5 * inner(rho, vcoul);\n        rho.clear(false);\n        vlocal = vcoul + vnuc;\n\n        // compute the contribution of the solvent to the local potential\n        double epcm = 0.0;\n        if (param.pcm_data() != \"none\") {\n            START_TIMER(world);\n            functionT vpcm = pcm.compute_pcm_potential(vcoul);\n            vlocal += vpcm;\n            epcm = pcm.compute_pcm_energy();\n            END_TIMER(world, \"PCM\");\n            print_meminfo(world.rank(), \"PCM\");\n        }\n\n        vcoul.clear(false);\n        vlocal.truncate();\n        double exca = 0.0, excb = 0.0;\n\n        double enla = 0.0, enlb = 0.0;\n        vecfuncT Vpsia = apply_potential(world, aocc, amo, vlocal, exca, enla, 0);\n        vecfuncT Vpsib;\n        if (!param.spin_restricted() && param.nbeta()) {\n            Vpsib = apply_potential(world, bocc, bmo, vlocal, excb, enlb, 1);\n        } else if (param.nbeta() != 0) {\n            enlb = enla;\n        }\n\n        double ekina = 0.0, ekinb = 0.0;\n        tensorT focka = make_fock_matrix(world, amo, Vpsia, aocc, ekina);\n        tensorT fockb = focka;\n\n        if (!param.spin_restricted() && param.nbeta() != 0)\n            fockb = make_fock_matrix(world, bmo, Vpsib, bocc, ekinb);\n        else if (param.nbeta() != 0) {\n            ekinb = ekina;\n        }\n\n        if (!param.do_localize() && do_this_iter) {\n            tensorT U = diag_fock_matrix(world, focka, amo, Vpsia, aeps, aocc,\n                                         FunctionDefaults<3>::get_thresh());\n            //rotate_subspace(world, U, subspace, 0, amo.size(), trantol); ??\n            if (!param.spin_restricted() && param.nbeta() != 0) {\n                U = diag_fock_matrix(world, fockb, bmo, Vpsib, beps, bocc,\n                                     FunctionDefaults<3>::get_thresh());\n                //rotate_subspace(world, U, subspace, amo.size(), bmo.size(),trantol);\n            }\n        }\n\n        double enrep = molecule.nuclear_repulsion_energy();\n        double ekinetic = ekina + ekinb;\n        double enonlocal = enla + enlb;\n        double exc = exca + excb;\n        double etot = ekinetic + enuclear + ecoulomb + exc + enrep + enonlocal + epcm;\n        current_energy = etot;\n        //esol = etot;\n\n        if (world.rank() == 0 and (param.print_level() > 1)) {\n            //lots of dps for testing Exc stuff\n            /*printf(\"\\n              kinetic %32.24f\\n\", ekinetic);\n                printf(\"         nonlocal psp %32.24f\\n\", enonlocal);\n                printf(\"   nuclear attraction %32.24f\\n\", enuclear);\n                printf(\"              coulomb %32.24f\\n\", ecoulomb);\n                printf(\" exchange-correlation %32.24f\\n\", exc);\n                printf(\"    nuclear-repulsion %32.24f\\n\", enrep);\n                printf(\"                total %32.24f\\n\\n\", etot);*/\n\n            printf(\"\\n              kinetic %16.8f\\n\", ekinetic);\n            printf(\"         nonlocal psp %16.8f\\n\", enonlocal);\n            printf(\"   nuclear attraction %16.8f\\n\", enuclear);\n            printf(\"              coulomb %16.8f\\n\", ecoulomb);\n            printf(\"                  PCM %16.8f\\n\", epcm);\n            printf(\" exchange-correlation %16.8f\\n\", exc);\n            printf(\"    nuclear-repulsion %16.8f\\n\", enrep);\n            printf(\"                total %16.8f\\n\\n\", etot);\n        }\n        e_data.add_data({{\"e_kinetic\", ekinetic},\n                         {\"e_local\",   enonlocal},\n                         {\"e_nuclear\", enuclear},\n                         {\"e_coulomb\", ecoulomb},\n                         {\"e_pcm\",     epcm},\n                         {\"e_xc\",      exc},\n                         {\"e_nrep\",    enrep},\n                         {\"e_tot\",     etot}});\n        focka_json = focka;\n        if (!param.spin_restricted() && param.nbeta() != 0) {\n            fockb_json = fockb;\n        }\n\n\n        if (iter > 0) {\n            //print(\"##convergence criteria: density delta=\", da < dconv * molecule.natom() && db < dconv * molecule.natom(), \", bsh_residual=\", (param.conv_only_dens || bsh_residual < 5.0*dconv));\n            if (da < dconv * std::max(size_t(5), molecule.natom()) && db < dconv * std::max(size_t(5), molecule.natom())\n                && (param.get<bool>(\"conv_only_dens\") || bsh_residual < 5.0 * dconv))\n                converged = true;\n            // previous conv was too tight for small systems\n            // if (da < dconv * molecule.natom() && db < dconv * molecule.natom()\n            //     && (param.conv_only_dens || bsh_residual < 5.0 * dconv)) converged=true;\n\n            // do diagonalization etc if this is the last iteration, even if the calculation didn't converge\n            if (converged || iter == param.maxiter() - 1) {\n                if (world.rank() == 0 && converged and (param.print_level() > 1)) {\n                    print(\"\\nConverged!\\n\");\n                    converged_for_thresh=param.econv();\n                    converged_for_dconv=param.dconv();\n                }\n\n                // Diagonalize to get the eigenvalues and if desired the final eigenvectors\n                tensorT U;\n                START_TIMER(world);\n                tensorT overlap = matrix_inner(world, amo, amo, true);\n                END_TIMER(world, \"Overlap\");\n\n                START_TIMER(world);\n                sygvp(world, focka, overlap, 1, U, aeps);\n                END_TIMER(world, \"focka eigen sol\");\n\n                if (!param.do_localize()) {\n                    START_TIMER(world);\n                    amo = transform(world, amo, U, trantol, true);\n                    truncate(world, amo);\n                    normalize(world, amo);\n                    END_TIMER(world, \"Transform MOs\");\n                }\n                if (param.nbeta() != 0 && !param.spin_restricted()) {\n\n                    START_TIMER(world);\n                    overlap = matrix_inner(world, bmo, bmo, true);\n                    END_TIMER(world, \"Overlap\");\n\n                    START_TIMER(world);\n                    sygvp(world, fockb, overlap, 1, U, beps);\n                    END_TIMER(world, \"fockb eigen sol\");\n\n                    if (!param.do_localize()) {\n                        START_TIMER(world);\n                        bmo = transform(world, bmo, U, trantol, true);\n                        truncate(world, bmo);\n                        normalize(world, bmo);\n                        END_TIMER(world, \"Transform MOs\");\n                    }\n                }\n\n                if (world.rank() == 0 and (param.print_level() > 1)) {\n                    print(\" \");\n                    print(\"alpha eigenvalues\");\n                    print(aeps);\n                    if (param.nbeta() != 0 && !param.spin_restricted()) {\n                        print(\"beta eigenvalues\");\n                        print(beps);\n                    }\n\n\n                    // write eigenvalues etc to a file at the same time for plotting DOS etc.\n                    FILE *f = 0;\n                    if (param.nbeta() != 0 && !param.spin_restricted()) {\n                        std::string name=std::string(param.prefix()+\".energies_alpha.dat\");\n                        f = fopen(name.c_str(), \"w\");\n                    } else {\n                        std::string name=param.prefix()+\".energies.dat\";\n                        f = fopen(name.c_str(), \"w\");\n                    }\n\n                    long nmo = amo.size();\n                    fprintf(f, \"# %8li\\n\", nmo);\n                    for (long i = 0; i < nmo; ++i) {\n                        fprintf(f, \"%13.8f\\n\", aeps(i));\n                    }\n                    fclose(f);\n\n                    if (param.nbeta() != 0 && !param.spin_restricted()) {\n                        long nmo = bmo.size();\n                        FILE *f = 0;\n                        std::string name=param.prefix()+\".energies_beta.dat\";\n                        f = fopen(name.c_str(), \"w\");\n\n                        fprintf(f, \"# %8li\\n\", nmo);\n                        for (long i = 0; i < nmo; ++i) {\n                            fprintf(f, \"%13.8f\\t\", beps(i));\n                        }\n                        fclose(f);\n                    }\n\n                }\n\n                if (param.do_localize()) {\n                    // Restore the diagonal elements for the analysis\n                    for (unsigned int i = 0; i < amo.size(); ++i)\n                        aeps[i] = focka(i, i);\n                    if (param.nbeta() != 0 && !param.spin_restricted())\n                        for (unsigned int i = 0; i < bmo.size(); ++i)\n                            beps[i] = fockb(i, i);\n                }\n\n                break;\n            }\n\n        }\n\n        update_subspace(world, Vpsia, Vpsib, focka, fockb, subspace, Q,\n                        bsh_residual, update_residual);\n\n    }\n    // save the converged fock matix\n    //\n    json fock_data;\n\n\n    // write the fock matrix to a file\n    if(world.rank() == 0) {\n        auto protocol = std::string(\"thresh: \") + std::to_string(FunctionDefaults<3>::get_thresh());\n    protocol += std::string(\" k: \")+std::to_string(FunctionDefaults<3>::get_k());\n    fock_data[protocol] = json::object();\n    fock_data[protocol][\"focka\"] = tensor_to_json(focka_json);\n    if (!param.spin_restricted() && param.nbeta() != 0) {\n        fock_data[protocol][\"fockb\"] = tensor_to_json(fockb_json);\n    }\n        std::string name=param.prefix()+\".fock.json\";\n        // Read in the existing data if it exists\n        json fock_json;\n        std::ifstream fock_file(name);\n    if (fock_file) {\n        fock_file >> fock_json;\n        }\n    fock_file.close();\n    // Merge the new data with the existing data\n    fock_json.merge_patch(fock_data);\n    // Write the merged data back to the file\n    std::ofstream fock_out(name);\n    fock_out << std::setw(4) << fock_json << std::endl;\n    fock_out.close();\n    }\n\n    // compute the dipole moment\n    functionT rho = make_density(world, aocc, amo);\n    if (!param.spin_restricted()) {\n        if (param.nbeta())\n            rho += make_density(world, bocc, bmo);\n    } else {\n        rho.scale(2.0);\n    }\n    dipole(world, rho);\n\n    if (world.rank() == 0 and (param.print_level() > 1)) {\n        if (param.do_localize())\n            print(\n                    \"Orbitals are localized - energies are diagonal Fock matrix elements\\n\");\n        else\n            print(\"Orbitals are eigenvectors - energies are eigenvalues\\n\");\n        if (param.nwfile() == \"none\") print(\"Analysis of alpha MO vectors\");\n    }\n\n    if (param.nwfile() == \"none\") {\n        analyze_vectors(world, amo, ao, vtol, molecule, param.print_level(), aobasis, aocc, aeps);\n        if (param.nbeta() != 0 && !param.spin_restricted()) {\n            if (world.rank() == 0 and (param.print_level() > 1))\n                print(\"Analysis of beta MO vectors\");\n\n            analyze_vectors(world, bmo, ao, vtol, molecule, param.print_level(), aobasis, bocc, beps);\n        }\n    }\n\n}        // end solve function\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/chem/SCF.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n */\n\n/// \\file moldft.cc\n/// \\brief Molecular HF and DFT code\n/// \\defgroup moldft The molecular density functional and Hartree-Fock code\n\n\n#ifndef MADNESS_CHEM_SCF_H__INCLUDED\n#define MADNESS_CHEM_SCF_H__INCLUDED\n\n#include <memory>\n\n#include<madness/chem/molecular_functors.h>\n#include <madness/mra/mra.h>\n\n#include<madness/chem/CalculationParameters.h>\n#include\"madness/mra/commandlineparser.h\"\n#include<madness/chem/molecule.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/chem/corepotential.h>\n#include<madness/chem/xcfunctional.h>\n#include<madness/chem/potentialmanager.h>\n#include<madness/chem/gth_pseudopotential.h>\n#include<madness/chem/SCFOperators.h>\n#include <madness/tensor/solvers.h>\n#include <madness/tensor/distributed_matrix.h>\n#include<madness/chem/pcm.h>\n#include<madness/chem/QCPropertyInterface.h>\n\n#include <madness/tensor/tensor_json.hpp>\n#include <memory>\n\nnamespace madness {\n\ntypedef std::shared_ptr<WorldDCPmapInterface<Key<3> > > pmapT;\ntypedef Vector<double, 3> coordT;\ntypedef std::shared_ptr<FunctionFunctorInterface<double, 3> > functorT;\ntypedef Function<double, 3> functionT;\ntypedef std::vector<functionT> vecfuncT;\ntypedef std::pair<vecfuncT, vecfuncT> pairvecfuncT;\ntypedef std::vector<pairvecfuncT> subspaceT;\ntypedef Tensor<double> tensorT;\ntypedef DistributedMatrix<double> distmatT;\ntypedef FunctionFactory<double, 3> factoryT;\ntypedef SeparatedConvolution<double, 3> operatorT;\ntypedef std::shared_ptr<operatorT> poperatorT;\ntypedef Function<std::complex<double>, 3> complex_functionT;\ntypedef std::vector<complex_functionT> cvecfuncT;\n\n\ntemplate<typename T, int NDIM>\nstruct lbcost {\n    double leaf_value;\n    double parent_value;\n\n    lbcost(double leaf_value = 1.0, double parent_value = 0.0) : leaf_value(leaf_value), parent_value(parent_value) {}\n\n    double operator()(const Key<NDIM>& key, const FunctionNode<T, NDIM>& node) const {\n        if (key.level() < 1) {\n            return 100.0 * (leaf_value + parent_value);\n        } else if (node.is_leaf()) {\n            return leaf_value;\n        } else {\n            return parent_value;\n        }\n    }\n};\n\n\ninline double mask1(double x) {\n    /* Iterated first beta function to switch smoothly\n           from 0->1 in [0,1].  n iterations produce 2*n-1\n           zero derivatives at the end points. Order of polyn\n           is 3^n.\n\n           Currently use one iteration so that first deriv.\n           is zero at interior boundary and is exactly representable\n           by low order multiwavelet without refinement */\n\n    x = (x * x * (3. - 2. * x));\n    return x;\n}\n\nstatic double mask3(const coordT& ruser) {\n    coordT rsim;\n    user_to_sim(ruser, rsim);\n    double x = rsim[0], y = rsim[1], z = rsim[2];\n    double lo = 0.0625, hi = 1.0 - lo, result = 1.0;\n    double rlo = 1.0 / lo;\n\n    if (x < lo)\n        result *= mask1(x * rlo);\n    else if (x > hi)\n        result *= mask1((1.0 - x) * rlo);\n    if (y < lo)\n        result *= mask1(y * rlo);\n    else if (y > hi)\n        result *= mask1((1.0 - y) * rlo);\n    if (z < lo)\n        result *= mask1(z * rlo);\n    else if (z > hi)\n        result *= mask1((1.0 - z) * rlo);\n\n    return result;\n}\n\n/// A MADNESS functor to compute either x, y, or z\nclass DipoleFunctor : public FunctionFunctorInterface<double, 3> {\nprivate:\n    const int axis;\npublic:\n    DipoleFunctor(int axis) : axis(axis) {}\n\n    double operator()(const coordT& x) const {\n        return x[axis];\n    }\n};\n\n\n/// A MADNESS functor to compute the cartesian moment x^i * y^j * z^k (i, j, k integer and >= 0)\nclass MomentFunctor : public FunctionFunctorInterface<double, 3> {\nprivate:\n    const int i, j, k;\npublic:\n    MomentFunctor(int i, int j, int k) : i(i), j(j), k(k) {}\n\n    MomentFunctor(const std::vector<int>& x) : i(x[0]), j(x[1]), k(x[2]) {}\n\n    double operator()(const coordT& r) const {\n        double xi = 1.0, yj = 1.0, zk = 1.0;\n        for (int p = 0; p < i; ++p) xi *= r[0];\n        for (int p = 0; p < j; ++p) yj *= r[1];\n        for (int p = 0; p < k; ++p) zk *= r[2];\n        return xi * yj * zk;\n    }\n};\n\n    class scf_data {\n\n        std::map<std::string, std::vector<double>> e_data;\n        json gradient;\n        json hessian;\n        int iter;\n    public:\n\n        scf_data();\n\n        void to_json(json &j) const;\n\n        void print_data();\n\n        void add_data(std::map<std::string, double> values);\n\n        void add_gradient(const Tensor<double> &grad);\n    };\n\n\nclass SCF {\npublic:\n    std::shared_ptr<PotentialManager> potentialmanager;\n    std::shared_ptr<GTHPseudopotential<double> > gthpseudopotential;\n    Molecule molecule;\n    CalculationParameters param;\n    XCfunctional xc;\n    PCM pcm;\n    AtomicBasisSet aobasis;\n    functionT mask;\n\n    scf_data e_data;\n\n    /// alpha and beta molecular orbitals\n    vecfuncT amo, bmo;\n\n    /// sets of orbitals grouped by their orbital energies (for localization?)\n    /// only orbitals within the same set will be mixed to localize\n    std::vector<int> aset, bset;\n\n    /// MRA projection of the minimal basis set\n    vecfuncT ao;\n\n    std::vector<int> at_to_bf, at_nbf;\n\n    /// occupation numbers for alpha and beta orbitals\n    tensorT aocc, bocc;\n\n    /// orbital energies for alpha and beta orbitals\n    tensorT aeps, beps;\n    poperatorT coulop;\n    std::vector<std::shared_ptr<real_derivative_3d> > gradop;\n    double vtol;\n    double current_energy;\n    double converged_for_thresh=1.e10;   ///< mos are converged for this threshold\n    double converged_for_dconv=1.e10;    ///< mos are converged for this density\n    double converged_for_tconv=1.e10;    ///< derivatives of mos are converged for this threshold\n\n    /// forwarding constructor\n    SCF(World& world, const commandlineparser& parser)\n        : SCF(world, CalculationParameters(world, parser), Molecule(world, parser)) {}\n\n    /// collective constructor for SCF uses contents of file \\c filename and broadcasts to all nodes\n    SCF(World& world, const CalculationParameters& param, const Molecule& molecule);\n\n    void copy_data(World& world, const SCF& other);\n\n    static void help() {\n        print_header2(\"help page for MOLDFT \");\n        print(\"The moldft code computes Hartree-Fock and DFT energies and gradients, It is the fastest code in MADNESS\");\n        print(\"and considered the reference implementation. No nuclear correlation factor can be used\");\n        print(\"SCF orbitals are the basis for post-SCF calculations like\");\n        print(\"excitation energies (cis), correlation energies (cc2), local potentials (oep), etc\\n\\n\");\n        print(\"You can print all available calculation parameters by running\\n\");\n        print(\"moldft --print_parameters\\n\");\n        print(\"You can perform a simple calculation by running\\n\");\n        print(\"moldft --geometry=h2o.xyz\\n\");\n        print(\"provided you have an xyz file in your directory.\");\n\n    }\n\n    static void print_parameters() {\n        CalculationParameters param;\n        print(\"default parameters for the moldft program are\");\n        param.print(\"dft\", \"end\");\n        print(\"\\n\\nthe molecular geometry must be specified in a separate block:\");\n        Molecule::print_parameters();\n    }\n\n    void set_print_timings(const bool value);\n\n    template<std::size_t NDIM>\n    void set_protocol(World& world, double thresh) {\n        int k;\n        // Allow for imprecise conversion of threshold\n        if (thresh >= 0.9e-2)\n            k = 4;\n        else if (thresh >= 0.9e-4)\n            k = 6;\n        else if (thresh >= 0.9e-6)\n            k = 8;\n        else if (thresh >= 0.9e-8)\n            k = 10;\n        else\n            k = 12;\n\n        // k defaults to make sense with thresh, override by providing k in input file\n        if (param.k() == -1) {\n            FunctionDefaults<NDIM>::set_k(k);\n            //        \tparam.k=k;\n        } else {\n            FunctionDefaults<NDIM>::set_k(param.k());\n        }\n        // don't forget to adapt the molecular smoothing parameter!! NO ... it is independent\n        //        molecule.set_eprec(std::min(thresh,molecule.get_eprec()));\n        FunctionDefaults<NDIM>::set_thresh(thresh);\n        FunctionDefaults<NDIM>::set_refine(true);\n        FunctionDefaults<NDIM>::set_initial_level(2);\n        //        FunctionDefaults<NDIM>::set_truncate_mode(1);\n        FunctionDefaults<NDIM>::set_autorefine(false);\n        FunctionDefaults<NDIM>::set_apply_randomize(false);\n        FunctionDefaults<NDIM>::set_project_randomize(false);\n        FunctionDefaults<NDIM>::set_cubic_cell(-param.L(), param.L());\n        GaussianConvolution1DCache<double>::map.clear();\n        double safety = 0.1;\n        vtol = FunctionDefaults<NDIM>::get_thresh() * safety;\n        coulop = poperatorT(CoulombOperatorPtr(world, param.lo(), 0.001*thresh));\n        gradop = gradient_operator<double, 3>(world);\n\n        // Update coefficients if using a different derivative\n        if (param.deriv() == \"bspline\") {\n            for (int i = 0; i < 3; ++i) (*gradop[i]).set_bspline1();\n        } else if (param.deriv() == \"ble\") {\n            for (int i = 0; i < 3; ++i) (*gradop[i]).set_ble1();\n        }\n\n        mask = functionT(factoryT(world).f(mask3).initial_level(4).norefine());\n        if (world.rank() == 0 and param.print_level() > 1) {\n            print(\"\\nSolving NDIM=\", NDIM, \" with thresh\", thresh, \"    k\",\n                  FunctionDefaults<NDIM>::get_k(), \"   conv\", std::max(thresh, param.dconv()), \"\\n\");\n        }\n    }\n\n    /// getter for the molecular orbitals, alpha spin\n    const vecfuncT& get_amo() const { return amo; }\n\n    /// getter for the molecular orbitals, beta spin\n    const vecfuncT& get_bmo() const { return bmo; }\n\n    /// getter for the occupation numbers, alpha spin\n    const tensorT& get_aocc() const { return aocc; }\n\n    /// getter for the occupation numbers, alpha spin\n    const tensorT& get_bocc() const { return bocc; }\n\n    bool is_spin_restricted() const { return param.get<bool>(\"spin_restricted\"); }\n\n    void save_mos(World& world);\n\n    void load_mos(World& world);\n\n    bool restart_aos(World& world);\n\n    void do_plots(World& world);\n\n    void project(World& world);\n\n    void make_nuclear_potential(World& world);\n\n    vecfuncT project_ao_basis(World& world, const AtomicBasisSet& aobasis);\n\n    static vecfuncT project_ao_basis_only(World& world, const AtomicBasisSet& aobasis,\n                                          const Molecule& molecule);\n\n    void reset_aobasis(const std::string& aobasisname) {\n        aobasis = AtomicBasisSet(); // reset\n        aobasis.read_file(aobasisname);\n    }\n\n    /// group orbitals into sets of similar orbital energies for localization\n\n    /// @param[in]\teps\torbital energies\n    /// @param[in]\tocc\toccupation numbers\n    /// @param[in]\tnmo number of MOs for the given spin\n    /// @return\t\tvector of length nmo with the set index for each MO\n    std::vector<int> group_orbital_sets(World& world, const tensorT& eps,\n                                        const tensorT& occ, const int nmo) const;\n\n    static void analyze_vectors(World& world, const vecfuncT& mo,\n            const vecfuncT& ao, double vtol,\n            const Molecule& molecule, const int print_level,\n            const AtomicBasisSet& aobasis, const tensorT& occ = tensorT(),\n            const tensorT& energy = tensorT(), const std::vector<int>& set = std::vector<int>());\n\n    distmatT kinetic_energy_matrix(World& world, const vecfuncT& v) const;\n\n    void get_initial_orbitals(World& world);\n\n    void initial_guess(World& world);\n\n    void initial_guess_from_nwchem(World& world);\n\n    void initial_load_bal(World& world);\n\n    functionT make_density(World& world, const tensorT& occ, const vecfuncT& v) const;\n\n    functionT make_density(World& world, const tensorT& occ, const cvecfuncT& v);\n\n    static std::vector<poperatorT> make_bsh_operators(World& world, const tensorT& evals,\n        const CalculationParameters& param);\n\n    // Used only for initial guess that is always spin-restricted LDA\n    static functionT make_lda_potential(World& world, const functionT& arho);\n\n\n    //    functionT make_dft_potential(World & world, const vecfuncT& vf, int ispin, int what)\n    //    {\n    //        return multiop_values<double, xc_potential, 3>(xc_potential(xc, ispin, what), vf);\n    //    }\n\n    double make_dft_energy(World& world, const vecfuncT& vf, int ispin) {\n        functionT vlda = multiop_values<double, xc_functional, 3>(xc_functional(xc), vf);\n        return vlda.trace();\n    }\n\n    vecfuncT apply_potential(World& world, const tensorT& occ,\n                             const vecfuncT& amo,\n                             const functionT& vlocal, double& exc, double& enl, int ispin);\n\n    tensorT derivatives(World& world, const functionT& rho) const;\n\n    /// compute the total dipole moment of the molecule\n\n    /// @param[in]  rho the total (alpha + beta) density\n    /// @return     the x,y,z components of the el. + nucl. dipole moment\n    tensorT dipole(World& world, const functionT& rho) const;\n\n    void vector_stats(const std::vector<double>& v, double& rms,\n                      double& maxabsval) const;\n\n    vecfuncT compute_residual(World& world, tensorT& occ, tensorT& fock,\n                              const vecfuncT& psi, vecfuncT& Vpsi, double& err);\n\n    tensorT make_fock_matrix(World& world, const vecfuncT& psi,\n                             const vecfuncT& Vpsi, const tensorT& occ,\n                             double& ekinetic) const;\n\n    /// make the Coulomb potential given the total density\n    functionT make_coulomb_potential(const functionT& rho) const {\n        return apply(*coulop, rho);\n    }\n\n    /// Compute the two-electron integrals over the provided set of orbitals\n\n    /// Returned is a *replicated* tensor of \\f$(ij|kl)\\f$ with \\f$i>=j\\f$\n    /// and \\f$k>=l\\f$.  The symmetry \\f$(ij|kl)=(kl|ij)\\f$ is enforced.\n    Tensor<double> twoint(World& world, const vecfuncT& psi) const;\n\n    /// compute the unitary transformation that diagonalizes the fock matrix\n\n    /// @param[in]\tworld\tthe world\n    /// @param[in]\toverlap\tthe overlap matrix of the orbitals\n    /// @param[in,out]\tfock\tthe fock matrix; diagonal upon exit\n    /// @param[out]\tevals\tthe orbital energies\n    /// @param[in]\tocc\tthe occupation numbers\n    /// @param[in]\tthresh_degenerate\tthreshold for orbitals being degenerate\n    /// @return\t\tthe unitary matrix U: U^T F U = evals\n    tensorT get_fock_transformation(World& world, const tensorT& overlap,\n                                    tensorT& fock, tensorT& evals, const tensorT& occ,\n                                    const double thresh_degenerate) const;\n\n\n    /// diagonalize the fock matrix, taking care of degenerate states\n\n    /// Vpsi is passed in to make sure orbitals and Vpsi are in phase\n    /// @param[in]\tworld\tthe world\n    /// @param[in,out]\tfock\tthe fock matrix (diagonal upon exit)\n    /// @param[in,out]\tpsi\t\tthe orbitals\n    /// @param[in,out]\tVpsi\tthe orbital times the potential\n    /// @param[out]\tevals\tthe orbital energies\n    /// @param[in]\tocc\t\toccupation numbers\n    /// @param[in]\tthresh\tthreshold for rotation and truncation\n    /// @return\t\tthe unitary matrix U: U^T F U = evals\n    tensorT diag_fock_matrix(World& world, tensorT& fock,\n                             vecfuncT& psi, vecfuncT& Vpsi, tensorT& evals,\n                             const tensorT& occ, const double thresh) const;\n\n\n    void loadbal(World& world, functionT& arho, functionT& brho, functionT& arho_old,\n                 functionT& brho_old, subspaceT& subspace);\n\n\n    void rotate_subspace(World& world, const tensorT& U, subspaceT& subspace,\n                         int lo, int nfunc, double trantol) const;\n\n    void rotate_subspace(World& world, const distmatT& U, subspaceT& subspace,\n                         int lo, int nfunc, double trantol) const;\n\n    void update_subspace(World& world,\n                         vecfuncT& Vpsia, vecfuncT& Vpsib,\n                         tensorT& focka, tensorT& fockb,\n                         subspaceT& subspace, tensorT& Q,\n                         double& bsh_residual, double& update_residual);\n\n    /// perform step restriction following the KAIN solver\n\n    /// undo the rotation from the KAIN solver if the rotation exceeds the\n    /// maxrotn parameter\n    /// @param[in]\t\tworld\tthe world\n    /// @param[in]\t\tmo\t\tvector of orbitals from previous iteration\n    /// @param[in,out]\tmo_new\tvector of orbitals from the KAIN solver\n    /// @param[in]\t\tspin\t\"alpha\" or \"beta\" for user information\n    /// @return\t\t\tmax residual\n    double do_step_restriction(World& world, const vecfuncT& mo,\n                               vecfuncT& mo_new, std::string spin) const;\n\n    /// orthonormalize the vectors\n\n    /// @param[in]\t\tworld\tthe world\n    /// @param[in,out]\tamo_new\tthe vectors to be orthonormalized\n    void orthonormalize(World& world, vecfuncT& amo_new) const;\n\n    void orthonormalize(World& world, vecfuncT& amo_new, int nocc) const;\n\n    // For given protocol, solve the DFT/HF/response equations\n    void solve(World& world);\n\n    void output_calc_info_schema() const;\n\n    void output_scf_info_schema(const std::map<std::string, double> &vals,\n                                const tensorT &dipole_T) const;\n\n};\n\n// Computes molecular energy as a function of the geometry\n// This is cludgy ... need better factorization of functionality\n// between calculation, main program and this ... or just merge it all.\nclass MolecularEnergy : public OptimizationTargetInterface, public QCPropertyInterface {\n    World& world;\n    SCF& calc;\n    mutable double coords_sum;     // sum of square of coords at last solved geometry\n\npublic:\n    MolecularEnergy(World& world, SCF& calc)\n            : world(world), calc(calc), coords_sum(-1.0) {}\n\n    std::string name() const { return \"Molecularenerg\"; }\n\n    bool selftest() { return true; }\n\n    bool provides_gradient() const { return true; }\n\n    double value(const Tensor<double>& x) {\n        double xsq = x.sumsq();\n        if (xsq == coords_sum) {\n            return calc.current_energy;\n        }\n        calc.molecule.set_all_coords(x.reshape(calc.molecule.natom(), 3));\n        coords_sum = xsq;\n\n        // read converged wave function from disk if there is one\n        if (calc.param.no_compute()) {\n            calc.load_mos(world);\n            calc.make_nuclear_potential(world);\n            calc.ao = calc.project_ao_basis(world, calc.aobasis);\n            return calc.current_energy;\n        }\n\n        // initialize the PCM solver for this geometry\n        if (calc.param.pcm_data() != \"none\") {\n            calc.pcm = PCM(world, calc.molecule, calc.param.pcm_data(), true);\n        }\n\n        calc.get_initial_orbitals(world);\n\n        // AOs are needed for final analysis, and for localization\n        calc.reset_aobasis(\"sto-3g\");\n        calc.ao.clear(); world.gop.fence();\n        calc.ao = calc.project_ao_basis(world, calc.aobasis);\n\n        // The below is missing convergence test logic, etc.\n\n        // Make the nuclear potential, initial orbitals, etc.\n        for (unsigned int proto = 0; proto < calc.param.protocol().size(); proto++) {\n\n            int nvalpha = calc.param.nmo_alpha() - calc.param.nalpha();\n            int nvbeta = calc.param.nmo_beta() - calc.param.nbeta();\n            int nvalpha_start, nv_old;\n\n            //repeat with gradually decreasing nvirt, only for first protocol\n            if (proto == 0 && nvalpha > 0) {\n                nvalpha_start = nvalpha * calc.param.nv_factor();\n            } else {\n                nvalpha_start = nvalpha;\n            }\n\n            nv_old = nvalpha_start;\n\n            for (int nv = nvalpha_start; nv >= nvalpha; nv -= nvalpha) {\n\n                if (nv > 0 && world.rank() == 0) std::cout << \"Running with \" << nv << \" virtual states\" << std::endl;\n\n                calc.param.set_user_defined_value(\"nmo_alpha\", calc.param.nalpha() + nv);\n                // check whether this is sensible for spin restricted case\n                if (calc.param.nbeta() && !calc.param.spin_restricted()) {\n                    if (nvbeta == nvalpha) {\n                        calc.param.set_user_defined_value(\"nmo_beta\", calc.param.nbeta() + nv);\n                    } else {\n                        calc.param.set_user_defined_value(\"nmo_beta\", calc.param.nbeta() + nv + nvbeta - nvalpha);\n                    }\n                }\n\n                calc.set_protocol<3>(world, calc.param.protocol()[proto]);\n                calc.make_nuclear_potential(world);\n\n                if (nv != nv_old) {\n                    calc.amo.resize(calc.param.nmo_alpha());\n                    calc.bmo.resize(calc.param.nmo_beta());\n\n                    calc.aocc = tensorT(calc.param.nmo_alpha());\n                    for (int i = 0; i < calc.param.nalpha(); ++i)\n                        calc.aocc[i] = 1.0;\n\n                    calc.bocc = tensorT(calc.param.nmo_beta());\n                    for (int i = 0; i < calc.param.nbeta(); ++i)\n                        calc.bocc[i] = 1.0;\n\n                    // might need to resize aset, bset, but for the moment this doesn't seem to be necessary\n\n                }\n\n                // project orbitals into higher k\n                if (proto > 0) calc.project(world);\n\n                // If the basis for the inital guess was not sto-3g\n                // switch to sto-3g since this is needed for analysis\n                // of the MOs and orbital localization\n                // Only do this if not starting from NWChem.\n                // analysis will be done on NWChem orbitals.\n\n                if (calc.param.aobasis() != \"sto-3g\") { // was also  && calc.param.nwfile() == \"none\"\n                    calc.reset_aobasis(\"sto-3g\");\n                }\n                calc.ao.clear(); world.gop.fence();\n                calc.ao = calc.project_ao_basis(world, calc.aobasis);\n                calc.solve(world);\n\n                if (calc.param.save())\n                    calc.save_mos(world);\n\n                nv_old = nv;\n                // exit loop over decreasing nvirt if nvirt=0\n                if (nv == 0) break;\n\n            }\n\n        }\n        return calc.current_energy;\n    }\n\n    madness::Tensor<double> gradient(const Tensor<double>& x) {\n        value(x); // Ensures DFT equations are solved at this geometry\n\n        functionT rho = calc.make_density(world, calc.aocc, calc.amo);\n        functionT brho = rho;\n        if (!calc.param.spin_restricted())\n            brho = calc.make_density(world, calc.bocc, calc.bmo);\n        rho.gaxpy(1.0, brho, 1.0);\n\n        return calc.derivatives(world, rho);\n    }\n\n\n    void energy_and_gradient(const Molecule& molecule, double& energy, Tensor<double>& gradient) {\n        value(molecule.get_all_coords().flat()); // Ensures DFT equations are solved at this geometry\n\n        functionT rho = calc.make_density(world, calc.aocc, calc.amo);\n        functionT brho = rho;\n        if (!calc.param.spin_restricted())\n            brho = calc.make_density(world, calc.bocc, calc.bmo);\n        rho.gaxpy(1.0, brho, 1.0);\n\n        energy = calc.current_energy;\n        gradient = calc.derivatives(world, rho);\n    }\n\n    void output_calc_info_schema() {\n        nlohmann::json j = {};\n        vec_pair_ints int_vals;\n        vec_pair_T<double> double_vals;\n        vec_pair_tensor_T<double> double_tensor_vals;\n\n        CalculationParameters param = calc.param;\n\n        nlohmann::json calc_precision={ };\n        calc_precision[\"eprec\"]=calc.molecule.parameters.eprec();\n        calc_precision[\"dconv\"]=calc.param.dconv();\n        calc_precision[\"econv\"]=calc.param.econv();\n        calc_precision[\"thresh\"]=FunctionDefaults<3>::get_thresh();\n        calc_precision[\"k\"]=FunctionDefaults<3>::get_k();\n\n        auto mol_json=this->calc.molecule.to_json();\n\n        int_vals.push_back({\"calcinfo_nmo\", param.nmo_alpha() + param.nmo_beta()});\n        int_vals.push_back({\"calcinfo_nalpha\", param.nalpha()});\n        int_vals.push_back({\"calcinfo_nbeta\", param.nbeta()});\n        int_vals.push_back({\"calcinfo_natom\", calc.molecule.natom()});\n\n\n        to_json(j, int_vals);\n        double_vals.push_back({\"return_energy\", value(calc.molecule.get_all_coords().flat())});\n        to_json(j, double_vals);\n        double_tensor_vals.push_back({\"scf_eigenvalues_a\", calc.aeps});\n        if (param.nbeta() != 0 && !param.spin_restricted()) {\n            double_tensor_vals.push_back({\"scf_eigenvalues_b\", calc.beps});\n        }\n\n        to_json(j, double_tensor_vals);\n        param.to_json(j);\n        calc.e_data.to_json(j);\n\n        j[\"precision\"]=calc_precision;\n        j[\"molecule\"]=mol_json;\n\n        output_schema(param.prefix()+\".calc_info\", j);\n    }\n\n\n};\n}\n\n#endif /* SCF_H_ */\n\n"
  },
  {
    "path": "src/madness/chem/SCFOperators.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/// \\file SCFOperators.cc\n/// \\brief Operators for the molecular HF and DFT code\n/// \\defgroup chem The molecular density functional and Hartree-Fock code\n\n\n#include<madness/chem/SCFOperators.h>\n#include<madness/chem/SCF.h>\n#include<madness/chem/nemo.h>\n#include<madness/chem/oep.h>\n#include<madness/chem/correlationfactor.h>\n#include<madness/chem/xcfunctional.h>\n#include<madness/chem/exchangeoperator.h>\n\n\nusing namespace madness;\n\nnamespace madness {\n\ntemplate<typename T, std::size_t NDIM>\nDistributedMatrix<T> Kinetic<T, NDIM>::kinetic_energy_matrix(World &world,\n                                                             const vecfuncT &v) const {\n    int n = v.size();\n    DistributedMatrix<T> r = column_distributed_matrix<T>(world, n, n);\n    reconstruct(world, v);\n\n    // apply the derivative operator on each function for each dimension\n    std::vector<vecfuncT> dv(NDIM);\n    for (std::size_t i = 0; i < NDIM; ++i) {\n        dv[i] = apply(world, *(gradop[i]), v, false);\n    }\n    world.gop.fence();\n    for (std::size_t i = 0; i < NDIM; ++i) {\n        compress(world, dv[i], false);\n    }\n    world.gop.fence();\n    for (std::size_t i = 0; i < NDIM; ++i) {\n        r += matrix_inner(r.distribution(), dv[i], dv[i], true);\n    }\n    r *= 0.5;\n    return r;\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nDistributedMatrix<T> Kinetic<T, NDIM>::kinetic_energy_matrix(World &world,\n                                                             const vecfuncT &vbra, const vecfuncT &vket) const {\n    int n = vbra.size();\n    int m = vket.size();\n    DistributedMatrix<T> r = column_distributed_matrix<T>(world, n, m);\n    reconstruct(world, vbra);\n    reconstruct(world, vket);\n    const auto bra_equiv_ket = &vbra == &vket;\n\n    // apply the derivative operator on each function for each dimension\n    std::vector<vecfuncT> dvbra(NDIM), dvket(NDIM);\n    for (std::size_t i = 0; i < NDIM; ++i) {\n        dvbra[i] = apply(world, *(gradop[i]), vbra, false);\n        dvket[i] = apply(world, *(gradop[i]), vket, false);\n    }\n    world.gop.fence();\n    for (std::size_t i = 0; i < NDIM; ++i) {\n        compress(world, dvbra[i], false);\n        compress(world, dvket[i], false);\n    }\n    world.gop.fence();\n    for (std::size_t i = 0; i < NDIM; ++i) {\n        r += matrix_inner(r.distribution(), dvbra[i], dvket[i], bra_equiv_ket);\n    }\n    r *= 0.5;\n    return r;\n}\n\n// explicit instantiation\ntemplate\nclass Kinetic<double, 1>;\n\ntemplate\nclass Kinetic<double, 2>;\n\ntemplate\nclass Kinetic<double, 3>;\n\ntemplate\nclass Kinetic<double, 4>;\n\ntemplate\nclass Kinetic<double, 5>;\n\ntemplate\nclass Kinetic<double, 6>;\n\ntemplate\nclass Kinetic<double_complex, 1>;\n\ntemplate\nclass Kinetic<double_complex, 2>;\n\ntemplate\nclass Kinetic<double_complex, 3>;\n\ntemplate\nclass Kinetic<double_complex, 4>;\n\ntemplate\nclass Kinetic<double_complex, 5>;\n\ntemplate\nclass Kinetic<double_complex, 6>;\n\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T, NDIM> >\nLaplacian<T, NDIM>::operator()(const std::vector<Function<T, NDIM> > &vket) const {\n\n    refine(world, vket);     // for better accuracy\n    vecfuncT result = zero_functions_compressed<T, NDIM>(world, vket.size());\n    SeparatedConvolution<T, NDIM> smooth = SmoothingOperator<NDIM>(world, eps);\n\n\n    for (size_t idim = 0; idim < NDIM; ++idim) {\n        vecfuncT dvket = apply(world, *gradop[idim].get(), vket);\n        refine(world, dvket);\n        if (eps > 0.0) dvket = apply(world, smooth, dvket);\n        vecfuncT ddvket = apply(world, *gradop[idim].get(), dvket);\n        result = add(world, result, ddvket);\n    }\n\n    if (eps > 0.0) result = apply(world, smooth, result);\n\n    return result;\n}\n\n// explicit instantiation\ntemplate\nclass Laplacian<double, 1>;\n\ntemplate\nclass Laplacian<double, 2>;\n\ntemplate\nclass Laplacian<double, 3>;\n\ntemplate\nclass Laplacian<double, 4>;\n\ntemplate\nclass Laplacian<double, 5>;\n\ntemplate\nclass Laplacian<double, 6>;\n\n\n/// ctor with an SCF calculation providing the MOs and density\ntemplate<typename T, std::size_t NDIM>\nCoulomb<T, NDIM>::Coulomb(World &world, const Nemo *nemo) : world(world) {\n    reset_poisson_operator_ptr(nemo->get_calc()->param.lo(), nemo->get_calc()->param.econv());\n    vcoul = compute_potential(nemo);\n}\n\n/// ctor with an SCF calculation providing the MOs and density\ntemplate<typename T, std::size_t NDIM>\nCoulomb<T, NDIM>::Coulomb(World &world, const SCF *calc) : world(world) {\n    reset_poisson_operator_ptr(calc->param.lo(), calc->param.econv());\n    vcoul = compute_potential(calc);\n}\n\ntemplate<typename T, std::size_t NDIM>\nvoid Coulomb<T, NDIM>::reset_poisson_operator_ptr(const double lo, const double econv) {\n    poisson.reset(CoulombOperatorPtr(world, lo, econv));\n}\n\ntemplate<typename T, std::size_t NDIM>\nreal_function_3d Coulomb<T, NDIM>::compute_density(const SCF *calc) const {\n    real_function_3d density = calc->make_density(world, calc->get_aocc(),\n                                                  calc->get_amo());\n    if (calc->is_spin_restricted()) {\n        density.scale(2.0);\n    } else {\n        real_function_3d brho = calc->make_density(world, calc->get_bocc(),\n                                                   calc->get_bmo());\n        density += brho;\n    }\n    density.truncate();\n    return density;\n}\n\ntemplate<typename T, std::size_t NDIM>\nreal_function_3d Coulomb<T, NDIM>::compute_potential(const madness::SCF *calc) const {\n    real_function_3d density = compute_density(calc);\n    return (*poisson)(density).truncate();\n}\n\n/// same as above, but with the additional factor R^2 in the density\ntemplate<typename T, std::size_t NDIM>\nreal_function_3d Coulomb<T, NDIM>::compute_potential(const madness::Nemo *nemo) const {\n    real_function_3d density = nemo->make_density(nemo->get_calc()->aocc,\n                                                  nemo->get_calc()->amo);\n    if (nemo->get_calc()->is_spin_restricted()) {\n        density.scale(2.0);\n    } else {\n        real_function_3d brho = nemo->get_calc()->make_density(world,\n                                                               nemo->get_calc()->get_bocc(),\n                                                               nemo->get_calc()->get_bmo());\n        density += brho;\n    }\n    density = (density * nemo->R_square).truncate();\n    return (*poisson)(density).truncate();\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nNuclear<T, NDIM>::Nuclear(World &world, const SCF *calc) : world(world) {\n    ncf = std::shared_ptr<NuclearCorrelationFactor>(\n            new PseudoNuclearCorrelationFactor(world,\n                                               calc->molecule, calc->potentialmanager, 1.0));\n}\n\ntemplate<typename T, std::size_t NDIM>\nNuclear<T, NDIM>::Nuclear(World &world, const NemoBase* nemo) : world(world) {\n    ncf = nemo->ncf;\n}\n\ntemplate<typename T, std::size_t NDIM>\nNuclear<T, NDIM>::Nuclear(World &world, const Molecule& molecule) : world(world) {\n    auto pm_ptr=std::make_shared<PotentialManager>(molecule,\"\");\n    MADNESS_CHECK(molecule.parameters.pure_ae());\n    pm_ptr->make_nuclear_potential(world);\n    ncf = std::shared_ptr<NuclearCorrelationFactor>(\n            new PseudoNuclearCorrelationFactor(world, molecule, pm_ptr, 1.0));\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T, NDIM> > Nuclear<T, NDIM>::operator()(const std::vector<Function<T, NDIM> > &vket) const {\n\n    typedef Function<T, NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n\n    // shortcut for local nuclear potential (i.e. no correlation factor)\n    if (ncf->type() == NuclearCorrelationFactor::None) {\n        return truncate(ncf->U2() * vket);\n    }\n\n    std::vector<std::shared_ptr<Derivative<T, NDIM> > > gradop =\n            gradient_operator<T, NDIM>(world);\n    reconstruct(world, vket);\n    vecfuncT vresult = zero_functions_compressed<T, NDIM>(world, vket.size());\n\n    // memory-saving algorithm: outer loop over the dimensions\n    // apply the derivative operator on each function for each dimension\n    for (std::size_t i = 0; i < NDIM; ++i) {\n        vecfuncT dv = apply(world, *(gradop[i]), vket, true);\n        truncate(world, dv);\n        vresult += truncate(ncf->U1(i % 3) * dv);\n    }\n\n    return truncate(vresult + ncf->U2() * vket);\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nDNuclear<T, NDIM>::DNuclear(World &world, const SCF *calc, const int iatom, const int iaxis)\n        : world(world), iatom(iatom), iaxis(iaxis) {\n    ncf = std::shared_ptr<NuclearCorrelationFactor>(\n            new PseudoNuclearCorrelationFactor(world,\n                                               calc->molecule, calc->potentialmanager, 1.0));\n}\n\ntemplate<typename T, std::size_t NDIM>\nDNuclear<T, NDIM>::DNuclear(World &world, const Nemo *nemo, const int iatom, const int iaxis)\n        : world(world), iatom(iatom), iaxis(iaxis) {\n    ncf = nemo->ncf;\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T, NDIM>> DNuclear<T, NDIM>::operator()(const std::vector<Function<T, NDIM>> &vket) const {\n\n    const double vthresh = FunctionDefaults<NDIM>::get_thresh() * 0.1;\n\n    // compute the U2 potential/ the derivative nuclear potential\n    NuclearCorrelationFactor::U2X_functor u2x(ncf.get(), iatom, iaxis);\n    real_function_3d u2x_f = real_factory_3d(world).functor(u2x)\n            .thresh(vthresh).truncate_on_project();\n    std::vector<Function<T, NDIM>> result = mul(world, u2x_f, vket);\n    truncate(world, result, vthresh);\n\n    // add U1 and U3 potentials if the nuclear correlation factor exists\n    if (ncf->type() != NuclearCorrelationFactor::None) {\n\n        std::vector<std::shared_ptr<Derivative<T, NDIM> > > gradop =\n                gradient_operator<T, NDIM>(world);\n        reconstruct(world, vket);\n\n        // memory-saving algorithm: outer loop over the dimensions\n        // apply the derivative operator on each function for each dimension\n        for (std::size_t i = 0; i < NDIM; ++i) {\n            std::vector<Function<T, NDIM> > dv = apply(world, *(gradop[i]), vket, true);\n            truncate(world, dv);\n\n            // note the two different axis: U1axis (i) and the derivative axis (iaxis)\n            // \\frac{\\partial U1_i}{\\partial R_{A,iaxis}}\n            // e.g. d/dYA U1x\n            NuclearCorrelationFactor::U1X_functor u1x(ncf.get(), iatom, i, iaxis);\n            Function<double, 3> U1 = real_factory_3d(world).functor(u1x).truncate_on_project();\n            std::vector<Function<T, NDIM> > U1dv = U1 * dv;\n            truncate(world, U1dv);\n            result = sub(world, result, U1dv);\n            truncate(world, result);\n        }\n\n        // add the U3X potential\n        NuclearCorrelationFactor::U3X_functor u3x(ncf.get(), iatom, iaxis);\n        real_function_3d u3x_f = real_factory_3d(world).functor(u3x).truncate_on_project();\n        std::vector<Function<T, NDIM> > U3v = mul(world, u3x_f, vket);\n        result = sub(world, result, U3v);\n        truncate(world, result);\n    }\n    truncate(world, result);\n\n    return result;\n}\n\n\n/// custom ctor with information about the XC functional\ntemplate<typename T, std::size_t NDIM>\nXCOperator<T, NDIM>::XCOperator(World &world, std::string xc_data, const bool spin_polarized,\n                                const real_function_3d &arho, const real_function_3d &brho, std::string deriv)\n        : world(world), dft_deriv(deriv), nbeta(0), ispin(0),\n          extra_truncation(FunctionDefaults<3>::get_thresh() * 0.01) {\n\n    nbeta = (brho.norm2() > 0.0);   // does this make sense\n\n    xc = std::shared_ptr<XCfunctional>(new XCfunctional());\n    xc->initialize(xc_data, spin_polarized, world);\n\n    xc_args = prep_xc_args(arho, brho);\n}\n\n/// custom ctor with the XC functional\ntemplate<typename T, std::size_t NDIM>\nXCOperator<T, NDIM>::XCOperator(World& world, std::shared_ptr<XCfunctional> xc,\n           const bool spin_polarized,\n           const int ispin,\n           const int nbeta,\n           const real_function_3d& arho, const real_function_3d& brho,\n           std::string deriv)\n    : world(world), dft_deriv(deriv), xc(xc), nbeta(nbeta), ispin(ispin),\n      extra_truncation(FunctionDefaults<3>::get_thresh() * 0.01) {\n  xc_args = prep_xc_args(arho, brho);\n}\n\ntemplate<typename T, std::size_t NDIM>\nXCOperator<T, NDIM>::XCOperator(World &world, const SCF *calc, int ispin, std::string deriv)\n        : world(world), dft_deriv(deriv), ispin(ispin), extra_truncation(FunctionDefaults<3>::get_thresh() * 0.01) {\n    xc = std::shared_ptr<XCfunctional>(new XCfunctional());\n    xc->initialize(calc->param.xc(), !calc->param.spin_restricted(), world);\n    nbeta = calc->param.nbeta();\n    const bool have_beta = xc->is_spin_polarized() && nbeta != 0;\n\n    // compute the alpha and beta densities\n    real_function_3d arho, brho;\n    arho = calc->make_density(world, calc->aocc, calc->amo);\n    if (have_beta) {\n        brho = calc->make_density(world, calc->bocc, calc->bmo);\n    } else {\n        brho = arho;\n    }\n    xc_args = prep_xc_args(arho, brho);\n}\n\ntemplate<typename T, std::size_t NDIM>\nXCOperator<T, NDIM>::XCOperator(World &world, const Nemo *nemo, int ispin)\n        : world(world), ispin(ispin), extra_truncation(FunctionDefaults<3>::get_thresh() * 0.01) {\n    xc = std::shared_ptr<XCfunctional>(new XCfunctional());\n    xc->initialize(nemo->get_calc()->param.xc(),\n                   !nemo->get_calc()->param.spin_restricted(), world);\n\n    ncf = nemo->ncf;\n\n    nbeta = nemo->get_calc()->param.nbeta();\n    const bool have_beta = xc->is_spin_polarized() && nbeta != 0;\n\n    // compute the alpha and beta densities\n    real_function_3d arho, brho;\n    real_function_3d arhonemo = nemo->make_density(nemo->get_calc()->aocc, nemo->get_calc()->amo);\n    arho = (arhonemo * nemo->R_square).truncate(extra_truncation);\n    if (have_beta) {\n        real_function_3d brhonemo = nemo->make_density(nemo->get_calc()->bocc, nemo->get_calc()->bmo);\n        brho = (brhonemo * nemo->R_square).truncate(extra_truncation);\n    } else {\n        brho = arho;\n    }\n\n    xc_args = prep_xc_args(arho, brho);\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nXCOperator<T, NDIM>::XCOperator(World &world, const SCF *calc, const real_function_3d &arho,\n                                const real_function_3d &brho, int ispin, std::string deriv)\n        : world(world), dft_deriv(deriv), nbeta(calc->param.nbeta()), ispin(ispin),\n          extra_truncation(FunctionDefaults<3>::get_thresh() * 0.01) {\n    xc = std::shared_ptr<XCfunctional>(new XCfunctional());\n    xc->initialize(calc->param.xc(), !calc->param.spin_restricted(), world);\n    xc_args = prep_xc_args(arho, brho);\n}\n\ntemplate<typename T, std::size_t NDIM>\nXCOperator<T, NDIM>::XCOperator(World &world, const Nemo *nemo, const real_function_3d &arho,\n                                const real_function_3d &brho, int ispin)\n        : world(world), nbeta(nemo->get_calc()->param.nbeta()), ispin(ispin), extra_truncation(0.01) {\n    xc = std::shared_ptr<XCfunctional>(new XCfunctional());\n    xc->initialize(nemo->get_calc()->param.xc(),\n                   not nemo->get_calc()->param.spin_restricted(), world);\n    ncf = nemo->ncf;\n\n    xc_args = prep_xc_args(arho, brho);\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T, NDIM> > XCOperator<T, NDIM>::operator()(const std::vector<Function<T, NDIM> > &vket) const {\n    real_function_3d xc_pot = make_xc_potential();\n    double vtol = FunctionDefaults<3>::get_thresh() * 0.1;  // safety\n    return mul_sparse(world, xc_pot, vket, vtol);\n}\n\ntemplate<typename T, std::size_t NDIM>\ndouble XCOperator<T, NDIM>::compute_xc_energy() const {\n\n    if (not is_initialized()) {\n        MADNESS_EXCEPTION(\"calling xc energy without intermediates \", 1);\n    }\n\n    refine_to_common_level(world, xc_args);\n    real_function_3d vlda = multiop_values<double, xc_functional, 3>\n            (xc_functional(*xc), xc_args);\n    truncate(world, xc_args);\n\n    return vlda.trace();\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nreal_function_3d XCOperator<T, NDIM>::make_xc_potential() const {\n\n    if (not is_initialized()) {\n        MADNESS_EXCEPTION(\"calling xc potential without intermediates \", 1);\n    }\n\n    refine_to_common_level(world, xc_args);\n\n    // compute all the contributions to the xc kernel\n    xc_potential op(*xc, ispin);\n    const vecfuncT intermediates = multi_to_multi_op_values(op, xc_args);\n\n    // local part, first term in Yanai2005, Eq. (12)\n    real_function_3d dft_pot = intermediates[0];\n\n    if (xc->is_gga()) {\n        vecfuncT semilocal(3);\n        semilocal[0] = intermediates[1];\n        semilocal[1] = intermediates[2];\n        semilocal[2] = intermediates[3];\n\n        // second term in Yanai2005, Eq. (12)\n        real_function_3d gga_pot_same_spin = div(semilocal, true);\n        dft_pot -= gga_pot_same_spin;\n\n        bool have_beta = xc->is_spin_polarized() && nbeta != 0;\n\n        if (have_beta) {\n            semilocal[0] = intermediates[4];\n            semilocal[1] = intermediates[5];\n            semilocal[2] = intermediates[6];\n\n            // third term in Yanai2005, Eq. (12)\n            real_function_3d gga_pot_other_spin = div(semilocal, true);\n            dft_pot -= gga_pot_other_spin;\n        }\n    }\n\n    truncate(world, xc_args);\n    return dft_pot.truncate();\n}\n\n\n/// apply the xc kernel on a perturbed density\n\n/// cf Eq. (13) of T. Yanai, R. J. Harrison, and N. Handy,\n/// “Multiresolution quantum chemistry in multiwavelet bases: time-dependent\n/// density functional theory with asymptotically corrected potentials in\n/// local density and generalized gradient approximations,”\n/// Mol. Phys., vol. 103, no. 2, pp. 413–424, 2005.\n///\n/// the application of the xc kernel is (RHF only)\n/// \\f[\n///   \\frac{\\partial^2E_{xc}}{\\partial \\rho_\\alpha^2}\\circ\\tilde\\rho\n///      = second_{local} + second_{semilocal} + first_{semilocal}\n/// \\f]\n/// where the second partial derivatives are\n/// \\f[\n///        second_{local} = \\frac{\\partial^2 f_{xc}}{\\partial \\rho_\\alpha^2}\\tilde \\rho\n///        + 2\\frac{\\partial^2 f_{xc}}{\\partial \\rho_\\alpha\\sigma_{\\alpha\\alpha}}\n///            \\left(\\vec\\nabla \\rho_a\\cdot \\vec \\nabla\\tilde\\rho\\right)\n/// \\f]\n///  the second partial derivatives that need to be multiplied with the density gradients\n/// \\f[\n///      second_{semilocal} = -\\vec\\nabla\\cdot\\left((\\vec\\nabla\\rho)\n///             \\left[2\\frac{\\partial^2 f_{xc}}{\\partial\\rho_\\alpha\\partial\\sigma_{\\alpha\\alpha}}\\tilde\\rho\n///             + 4\\frac{\\partial^2 f_{xc}}{\\partial\\sigma_{\\alpha\\alpha}^2}\n///                \\left(\\vec\\nabla\\rho_\\alpha\\cdot\\vec\\nabla\\tilde\\rho\\right)\\right]\\right)\n/// \\f]\n/// and the first derivatives that need to be multiplied with the density gradients\n/// \\f[\n///      first_{semilocal} =\n///        -\\vec\\nabla\\cdot\\left(2\\frac{\\partial f_{xc}}{\\partial\\sigma_{\\alpha\\alpha}}\\vec\\nabla\\tilde\\rho\\right)\n/// \\f]\ntemplate<typename T, std::size_t NDIM>\nreal_function_3d XCOperator<T, NDIM>::apply_xc_kernel(const real_function_3d &dens_pt,\n                                                      const vecfuncT grad_dens_pt) const {\n\n    MADNESS_ASSERT(not xc->is_spin_polarized());    // for now\n    MADNESS_ASSERT(ispin == 0);           // for now\n\n    if (not is_initialized()) {\n        MADNESS_EXCEPTION(\"calling apply_xc_kernel without intermediates \", 1);\n    }\n\n    vecfuncT ddens_pt = grad_dens_pt;\n    prep_xc_args_response(dens_pt, xc_args, ddens_pt);\n    refine_to_common_level(world, xc_args);\n\n    // compute all the contributions to the xc kernel\n    xc_kernel_apply op(*xc, ispin);\n    const vecfuncT intermediates = multi_to_multi_op_values(op, xc_args);\n\n    // lda potential and local parts of the gga potential\n    real_function_3d result = intermediates[0];\n\n    // add semilocal gga potentials\n    if (xc->is_gga()) {\n        // turn intermediates into quantities that can be digested by the div operator\n        vecfuncT semilocal(3);\n        semilocal[0] = intermediates[1];\n        semilocal[1] = intermediates[2];\n        semilocal[2] = intermediates[3];\n\n        real_function_3d gga_pot = -1.0 * div(semilocal, true);\n\n        result += gga_pot;\n    }\n    truncate(world, xc_args);\n    return result.truncate();\n}\n\n/// prepare xc args\ntemplate<typename T, std::size_t NDIM>\nvecfuncT XCOperator<T, NDIM>::prep_xc_args(const real_function_3d &arho,\n                                           const real_function_3d &brho) const {\n\n    World &world = arho.world();\n    vecfuncT xcargs(XCfunctional::number_xc_args);\n    const bool have_beta = (xc->is_spin_polarized()) and (nbeta > 0);\n\n    // assign the densities (alpha, beta)\n    xcargs[XCfunctional::enum_rhoa] = copy(arho.reconstruct());      // alpha density\n    if (have_beta) xcargs[XCfunctional::enum_rhob] = copy(brho.reconstruct());  // beta density\n    world.gop.fence();\n\n    // compute the chi quantity such that sigma = rho^2 * chi\n    if (xc->is_gga()) {\n\n        real_function_3d logdensa = unary_op(arho, logme());\n        vecfuncT grada;\n        if (dft_deriv == \"bspline\") grada = grad_bspline_one(logdensa); // b-spline\n        else if (dft_deriv == \"ble\") grada = grad_ble_one(logdensa);    // BLE\n        else grada = grad(logdensa);                                   // Default is abgv\n        real_function_3d chi = dot(world, grada, grada);\n        xcargs[XCfunctional::enum_chi_aa] = chi;\n        xcargs[XCfunctional::enum_zetaa_x] = grada[0];\n        xcargs[XCfunctional::enum_zetaa_y] = grada[1];\n        xcargs[XCfunctional::enum_zetaa_z] = grada[2];\n\n        if (have_beta) {\n            real_function_3d logdensb = unary_op(brho, logme());\n            // Bryan's edits for derivatives\n            vecfuncT gradb;\n            if (dft_deriv == \"bspline\") gradb = grad_bspline_one(logdensb);  // b-spline\n            else if (dft_deriv == \"ble\") gradb = grad_ble_one(logdensb);     // BLE\n            else gradb = grad(logdensb);                                    // Default is abgv\n            real_function_3d chib = dot(world, gradb, gradb);\n            real_function_3d chiab = dot(world, grada, gradb);\n            xcargs[XCfunctional::enum_zetab_x] = gradb[0];\n            xcargs[XCfunctional::enum_zetab_y] = gradb[1];\n            xcargs[XCfunctional::enum_zetab_z] = gradb[2];\n            xcargs[XCfunctional::enum_chi_bb] = chib;\n            xcargs[XCfunctional::enum_chi_ab] = chiab;\n        }\n    }\n\n    world.gop.fence();\n    truncate(world, xc_args, extra_truncation);\n    return xcargs;\n}\n\n/// add intermediates for the response kernels to xc_args\ntemplate<typename T, std::size_t NDIM>\nvoid XCOperator<T, NDIM>::prep_xc_args_response(const real_function_3d &dens_pt,\n                                                vecfuncT &xc_args, vecfuncT &ddens_pt) const {\n\n    const bool have_beta = (xc->is_spin_polarized()) and (nbeta > 0);\n    World &world = dens_pt.world();\n\n    // assign the perturbed density (spin-free)\n    xc_args[XCfunctional::enum_rho_pt] = dens_pt;\n    world.gop.fence();\n\n    // assign the reduced density gradients with the perturbed density for GGA\n    // \\sigma_pt   = 2.0 * \\nabla \\rho_\\alpha \\cdot \\nabla\\tilde\\rho\n    // \\sigma_pt_a = \\nabla \\rho_\\alpha \\cdot \\nabla\\tilde\\rho\n    // \\sigma_pt_b = \\nabla \\rho_\\beta \\cdot \\nabla\\tilde\\rho\n    //\n    // using the logarithmic derivatives for rho only we get (alpha and RHF)\n    // \\sigma_pt = 2.0 * \\rho_\\alpha (\\nabla\\zeta_\\alpha \\cdot \\nabla\\tilde\\rho)\n    // \\sigma_pt_a = \\rho_\\alpha (\\nabla\\zeta_\\alpha \\cdot \\nabla\\tilde\\rho)\n    // we save the functions without multiplying the ground state density rho\n    if (xc->is_gga()) {\n\n        if (ddens_pt.size() == 0) ddens_pt = grad(dens_pt);     // spin free\n        else print(\" using provided ddens_pt in prep_xc_args_response\");\n\n        xc_args[XCfunctional::enum_ddens_ptx] = ddens_pt[0];\n        xc_args[XCfunctional::enum_ddens_pty] = ddens_pt[1];\n        xc_args[XCfunctional::enum_ddens_ptz] = ddens_pt[2];\n\n        std::vector<real_function_3d> zeta(3);\n        zeta[0] = xc_args[XCfunctional::enum_zetaa_x];\n        zeta[1] = xc_args[XCfunctional::enum_zetaa_y];\n        zeta[2] = xc_args[XCfunctional::enum_zetaa_z];\n        xc_args[XCfunctional::enum_sigma_pta_div_rho] = dot(world, zeta, ddens_pt);    // sigma_a\n        // for RHF add factor 2 on rho; will be done in xcfunctional_libxc::make_libxc_args\n        // \\sigma_pt = 2 * rho_a * sigma_pta_div_rho\n        world.gop.fence();\n\n        if (have_beta) {\n            zeta[0] = xc_args[XCfunctional::enum_zetab_x];\n            zeta[1] = xc_args[XCfunctional::enum_zetab_y];\n            zeta[2] = xc_args[XCfunctional::enum_zetab_z];\n            xc_args[XCfunctional::enum_sigma_ptb_div_rho] = dot(world, zeta, ddens_pt);  // sigma_b\n        }\n        world.gop.fence();\n    }\n    world.gop.fence();\n    truncate(world, xc_args, extra_truncation);\n}\n\n/// ctor\ntemplate<typename T, std::size_t NDIM>\nExchange<T,NDIM>::Exchange(World& world, const double lo, const double thresh) : impl(new Exchange<T,NDIM>::ExchangeImpl(world,lo,thresh)) {};\n\n\n/// ctor with a conventional calculation\ntemplate<typename T, std::size_t NDIM>\nExchange<T,NDIM>::Exchange(World& world, const SCF *calc, const int ispin) : impl(new Exchange<T,NDIM>::ExchangeImpl(world,calc,ispin)) {};\n\n/// ctor with a nemo calculation\ntemplate<typename T, std::size_t NDIM>\nExchange<T,NDIM>::Exchange(World& world, const Nemo *nemo, const int ispin) : impl(new Exchange<T,NDIM>::ExchangeImpl(world,nemo,ispin)) {};\n\n/// apply the exchange operator on a vector of functions\n\n/// note that only one spin is used (either alpha or beta orbitals)\n/// @param[in]  vket       the orbitals |i> that the operator is applied on\n/// @return     a vector of orbitals  K| i>\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T,NDIM>> Exchange<T,NDIM>::operator()(const std::vector<Function<T,NDIM>>& vket) const {\n    impl->set_taskq(this->taskq);\n    auto result=impl->operator()(vket);\n    this->statistics=impl->get_statistics();\n    return result;\n};\n\ntemplate<typename T, std::size_t NDIM>\nExchange<T,NDIM>& Exchange<T,NDIM>::set_bra_and_ket(const vecfuncT& bra, const vecfuncT& ket) {\n    MADNESS_CHECK(impl);\n    impl->set_bra_and_ket(bra, ket);\n    return *this;\n}\n\ntemplate<typename T, std::size_t NDIM>\nbool Exchange<T,NDIM>::is_symmetric() const {\n    return impl->is_symmetric();\n}\n\ntemplate<typename T, std::size_t NDIM>\nExchange<T,NDIM>& Exchange<T,NDIM>::set_symmetric(const bool flag) {\n    impl->symmetric(flag);\n    return *this;\n}\n\ntemplate<typename T, std::size_t NDIM>\nExchange<T,NDIM>& Exchange<T,NDIM>::set_algorithm(const ExchangeAlgorithm& alg) {\n    impl->set_algorithm(alg);\n    return *this;\n}\n\ntemplate<typename T, std::size_t NDIM>\nExchange<T,NDIM>& Exchange<T,NDIM>::set_macro_task_info(const MacroTaskInfo& info) {\n    impl->set_macro_task_info(info);\n    return *this;\n}\n\n template<typename T, std::size_t NDIM>\n Exchange<T,NDIM>& Exchange<T,NDIM>::set_printlevel(const long& level) {\n    impl->set_printlevel(level);\n    return *this;\n}\n\ntemplate<>\nFock<double, 3>::Fock(World &world, const Nemo *nemo) : world(world) {\n    auto tmp = nemo->make_fock_operator();\n    if (tmp) std::swap(tmp->operators, operators);\n    else MADNESS_EXCEPTION(\"failed to construct fock operator\", 1);\n}\n\ntemplate<>\nFock<double, 3>::Fock(World &world, const OEP *oep) : world(world) {\n    auto tmp = oep->make_fock_operator();\n    if (tmp) std::swap(tmp->operators, operators);\n    else MADNESS_EXCEPTION(\"failed to construct fock operator\", 1);\n}\n\ntemplate<>\nFock<double, 3>::Fock(World &world, const NemoBase *nemobase) : world(world) {\n    auto tmp = nemobase->make_fock_operator();\n    if (tmp) std::swap(tmp->operators, operators);\n    else MADNESS_EXCEPTION(\"failed to construct fock operator\", 1);\n}\n\n\ntemplate class Exchange<double_complex,3>;\ntemplate class Exchange<double,3>;\n\ntemplate class Coulomb<double_complex,3>;\ntemplate class Coulomb<double,3>;\n\ntemplate class XCOperator<double_complex,3>;\ntemplate class XCOperator<double,3>;\n\ntemplate class Nuclear<double_complex,3>;\ntemplate class Nuclear<double,3>;\n\ntemplate class DNuclear<double_complex,3>;\ntemplate class DNuclear<double,3>;\n\ntemplate class Fock<double_complex,3>;\ntemplate class Fock<double,3>;\n\n} // namespace madness\n\n\n"
  },
  {
    "path": "src/madness/chem/SCFOperators.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/// \\file SCFOperators.h\n/// \\brief Operators for the molecular HF and DFT code\n/// \\defgroup chem The molecular density functional and Hartree-Fock code\n\n\n#ifndef MADNESS_CHEM_SCFOPERATORS_H_\n#define MADNESS_CHEM_SCFOPERATORS_H_\n\n#include <madness.h>\n#include <madness/mra/macrotaskq.h> // otherwise issues with install\n\nnamespace madness {\n\n// forward declaration\nclass SCF;\nclass Nemo;\nclass NemoBase;\nclass OEP;\nclass NuclearCorrelationFactor;\nclass XCfunctional;\nclass MacroTaskQ;\nclass Molecule;\n\ntypedef std::vector<real_function_3d> vecfuncT;\n\ntemplate<typename T, std::size_t NDIM>\nclass SCFOperatorBase {\n\npublic:\n    typedef Function<T,NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n    typedef Tensor<T> tensorT;\n    mutable nlohmann::json statistics;\n\n    SCFOperatorBase() = default;\n    SCFOperatorBase(std::shared_ptr<MacroTaskQ> taskq) : taskq(taskq) {}\n\n    virtual ~SCFOperatorBase() {}\n\n    std::shared_ptr<MacroTaskQ> taskq=0;\n\n    /// print some information about this operator\n    virtual std::string info() const = 0;\n\n    /// apply this operator on the argument function\n    ///\n    /// \\param  ket the argument function\n    /// \\return op(ket)\n    virtual functionT operator()(const functionT& ket) const = 0;\n\n    /// apply this operator on the argument vector of functions\n\n    /// \\param vket     argument vector\n    /// \\return         op(vket)\n    virtual vecfuncT operator()(const vecfuncT& vket) const = 0;\n\n    /// compute the matrix element <bra | op | ket>\n\n    /// \\param bra  bra state\n    /// \\param ket  ket state\n    /// \\return     the matrix element <bra | op | ket>\n    virtual T operator()(const functionT& bra, const functionT& ket) const = 0;\n\n    /// compute the matrix <vbra | op | vket>\n\n    /// \\param vbra  vector of bra states\n    /// \\param vket  vector of ket states\n    /// \\return     the matrix <vbra | op | vket>\n    virtual tensorT operator()(const vecfuncT& vbra, const vecfuncT& vket) const = 0;\n\n};\n\ntemplate<typename T, std::size_t NDIM>\nclass Exchange : public SCFOperatorBase<T,NDIM> {\npublic:\n\n    class ExchangeImpl;\n    using implT = std::shared_ptr<ExchangeImpl>;\n    typedef Function<T,NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n    typedef Tensor<T> tensorT;\nprivate:\n    implT impl;\n\npublic:\n    enum ExchangeAlgorithm {\n        small_memory, large_memory, multiworld_efficient, multiworld_efficient_row, fetch_compute\n    };\n    // print out algorithm\n    friend std::ostream& operator<<(std::ostream& os, const ExchangeAlgorithm& alg) {\n        switch (alg) {\n            case small_memory:\n                os << \"smallmem\";\n                break;\n            case large_memory:\n                os << \"largemem\";\n                break;\n            case multiworld_efficient:\n                os << \"multiworld\";\n                break;\n            case multiworld_efficient_row:\n                os << \"multiworld_row\";\n                break;\n            case fetch_compute:\n                os << \"fetch_compute\";\n                break;\n            default:\n                os << \"unknown algorithm\";\n        }\n        return os;\n    }\n\n    static std::string to_string(const ExchangeAlgorithm alg) {\n        std::stringstream ss;\n        ss << alg;\n        return ss.str();\n    }\n\n    static ExchangeAlgorithm string2algorithm(const std::string& alg_string) {\n        ExchangeAlgorithm alg;\n        std::string alg_lc=commandlineparser::tolower(alg_string);\n        if (alg_lc==\"smallmem\") alg=small_memory;\n        else if (alg_lc==\"largemem\") alg=large_memory;\n        else if (alg_lc==\"multiworld\") alg=multiworld_efficient;\n        else if (alg_lc==\"multiworld_row\") alg=multiworld_efficient_row;\n        else if (alg_lc==\"fetch_compute\") alg=fetch_compute;\n        else {\n            std::string msg=\"unknown Exchange algorithm: \"+alg_string;\n            MADNESS_EXCEPTION(msg.c_str(),1);\n        }\n        return alg;\n    }\n\n    Exchange(World& world, const double lo, const double thresh=FunctionDefaults<NDIM>::get_thresh());\n\n    /// ctor with a conventional calculation\n    Exchange(World& world, const SCF *calc, const int ispin);\n\n    /// ctor with a nemo calculation\n    Exchange(World& world, const Nemo *nemo, const int ispin);\n\n    std::string info() const {return \"K\";}\n\n    bool is_symmetric() const;\n\n    Exchange& set_symmetric(const bool flag);\n\n    Exchange& set_algorithm(const ExchangeAlgorithm& alg);\n\n    /// how the cloud will handle the data\n    Exchange& set_macro_task_info(const MacroTaskInfo& info);\n    Exchange& set_macro_task_info(const std::vector<std::string>& info) {\n        impl->set_macro_task_info(info);\n        return *this;\n    }\n\n\n    Exchange& set_printlevel(const long& level);\n\n    Exchange& set_taskq(std::shared_ptr<MacroTaskQ> taskq1) {\n        this->taskq=taskq1;\n        return *this;\n    }\n\n    Exchange& set_bra_and_ket(const vecfuncT& bra, const vecfuncT& ket);\n\n    Function<T, NDIM> operator()(const Function<T, NDIM>& ket) const {\n        vecfuncT vket(1, ket);\n        vecfuncT vKket = this->operator()(vket);\n        return vKket[0];\n    }\n\n    /// apply the exchange operator on a vector of functions\n\n    /// note that only one spin is used (either alpha or beta orbitals)\n    /// @param[in]  vket       the orbitals |i> that the operator is applied on\n    /// @return     a vector of orbitals  K| i>\n    vecfuncT operator()(const vecfuncT& vket) const;\n\n    /// compute the matrix element <bra | K | ket>\n\n    /// @param[in]  bra    real_function_3d, the bra state\n    /// @param[in]  ket    real_function_3d, the ket state\n    T operator()(const Function<T, NDIM>& bra, const Function<T, NDIM>& ket) const {\n        return inner(bra, this->operator()(ket));\n    }\n\n    /// compute the matrix < vbra | K | vket >\n\n    /// @param[in]  vbra    vector of real_function_3d, the set of bra states\n    /// @param[in]  vket    vector of real_function_3d, the set of ket states\n    /// @return K_ij\n    Tensor<T> operator()(const vecfuncT& vbra, const vecfuncT& vket) const {\n        vecfuncT vKket = this->operator()(vket);\n        World& world=vket[0].world();\n        auto result = matrix_inner(world, vbra, vKket);\n        return result;\n    }\n\n\n};\n\n\ntemplate<typename T, std::size_t NDIM>\nclass Kinetic : public SCFOperatorBase<T,NDIM> {\n    typedef DistributedMatrix<T> distmatT;\n    typedef Function<T,NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n    typedef Tensor<T> tensorT;\n\npublic:\n    Kinetic(World& world) : world(world) {\n        gradop = gradient_operator<T,NDIM>(world);\n    }\n\n    std::string info() const {return \"T\";}\n\n    functionT operator()(const functionT& ket) const {\n        MADNESS_EXCEPTION(\"do not apply the kinetic energy operator on a function!\",1);\n        return ket;\n    }\n\n    vecfuncT operator()(const vecfuncT& vket) const {\n        MADNESS_EXCEPTION(\"do not apply the kinetic energy operator on a function!\",1);\n        return vket;\n    }\n\n    T operator()(const functionT& bra, const functionT& ket) const {\n        vecfuncT vbra(1,bra), vket(1,ket);\n        Tensor<T> tmat=this->operator()(vbra,vket);\n        return tmat(0l,0l);\n    }\n\n    tensorT operator()(const vecfuncT& vbra, const vecfuncT& vket) const {\n        distmatT dkinetic;\n        if (&vbra==&vket) {\n            dkinetic = kinetic_energy_matrix(world,vbra);\n        } else {\n            dkinetic = kinetic_energy_matrix(world,vbra,vket);\n        }\n        tensorT kinetic(vbra.size(),vket.size());\n        dkinetic.copy_to_replicated(kinetic);\n        return kinetic;\n    }\n\nprivate:\n    World& world;\n    std::vector< std::shared_ptr<Derivative<T,NDIM> > > gradop;\n\n    distmatT kinetic_energy_matrix(World & world, const vecfuncT & v) const;\n    distmatT kinetic_energy_matrix(World & world, const vecfuncT & vbra,\n            const vecfuncT & vket) const;\n\n};\n\n\ntemplate<typename T, std::size_t NDIM>\nclass DerivativeOperator : public SCFOperatorBase<T,NDIM> {\n    typedef Function<T,NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n    typedef Tensor<T> tensorT;\n\npublic:\n\n    DerivativeOperator(World& world, const int axis1) : world(world), axis(axis1) {\n        gradop = free_space_derivative<T,NDIM>(world, axis);\n    }\n\n    std::string info() const {return \"D\";}\n\n    functionT operator()(const functionT& ket) const {\n        vecfuncT vket(1,ket);\n        return this->operator()(vket)[0];\n    }\n\n    vecfuncT operator()(const vecfuncT& vket) const {\n        vecfuncT dvket=apply(world, gradop, vket, false);\n        world.gop.fence();\n        return dvket;\n    }\n\n    T operator()(const functionT& bra, const functionT& ket) const {\n        vecfuncT vbra(1,bra), vket(1,ket);\n        Tensor<T> tmat=this->operator()(vbra,vket);\n        return tmat(0l,0l);\n    }\n\n    tensorT operator()(const vecfuncT& vbra, const vecfuncT& vket) const {\n        const auto bra_equiv_ket = &vbra == &vket;\n        vecfuncT dvket=this->operator()(vket);\n        return matrix_inner(world,vbra,dvket, bra_equiv_ket);\n    }\n\nprivate:\n    World& world;\n    int axis;\n    Derivative<T,NDIM> gradop;\n\n};\n\n\n/// the Laplacian operator: \\sum_i \\nabla^2_i\n\n/// note that the application of the Laplacian operator is in general\n/// unstable and very sensitive to noise and cusps in the argument.\n///\n/// !!! BE SURE YOU KNOW WHAT YOU ARE DOING !!!\n///\n/// For computing matrix elements, which is reasonably stable, we refer\ntemplate<typename T, std::size_t NDIM>\nclass Laplacian : public SCFOperatorBase<T,NDIM> {\n    typedef Function<T,NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n    typedef Tensor<T> tensorT;\n\npublic:\n\n    Laplacian(World& world, const double e=0.0) : world(world), eps(e) {\n        gradop = gradient_operator<T,NDIM>(world);\n    }\n\n    std::string info() const {return \"D^2\";}\n\n    functionT operator()(const functionT& ket) const {\n        vecfuncT vket(1,ket);\n        return this->operator()(vket)[0];\n    }\n\n    vecfuncT operator()(const vecfuncT& vket) const;\n\n    T operator()(const functionT& bra, const functionT& ket) const {\n        vecfuncT vbra(1,bra), vket(1,ket);\n        Tensor<T> tmat=this->operator()(vbra,vket);\n        return tmat(0l,0l);\n    }\n\n    tensorT operator()(const vecfuncT& vbra, const vecfuncT& vket) const {\n        Kinetic<T,NDIM> t(world);\n        return -2.0*t(vbra,vket);\n    }\n\nprivate:\n    World& world;\n    std::vector< std::shared_ptr< Derivative<T,NDIM> > > gradop;\n    double eps;\n};\n\n\n\ntemplate<typename T, std::size_t NDIM>\nclass Coulomb : public SCFOperatorBase<T,NDIM> {\npublic:\n\n    class MacroTaskCoulomb : public MacroTaskOperationBase {\n    public:\n        // you need to define the exact argument(s) of operator() as tuple\n        typedef std::tuple<const Function<double,NDIM>&, const std::vector<Function<T,NDIM>> &> argtupleT;\n\n        using resultT = std::vector<Function<T,NDIM>>;\n\n        class MacroTaskPartitionerCoulomb : public MacroTaskPartitioner {\n        public:\n            partitionT do_partitioning(const std::size_t& vsize1, const std::size_t& vsize2,\n                                       const std::string policy) const override {\n                partitionT p={std::pair(Batch(_,_),1.0)};\n                return p;\n            }\n        };\n\n        MacroTaskCoulomb() {\n            partitioner.reset(new MacroTaskPartitionerCoulomb());\n        }\n\n        // you need to define an empty constructor for the result\n        // resultT must implement operator+=(const resultT&)\n        resultT allocator(World &world, const argtupleT &argtuple) const {\n            std::size_t n = std::get<1>(argtuple).size();\n            resultT result = zero_functions_compressed<T,NDIM>(world, n);\n            return result;\n        }\n\n        resultT operator()(const Function<double,NDIM>& vcoul, const std::vector<Function<T,NDIM>> &arg) const {\n            return truncate(vcoul * arg);\n        }\n    };\n\n    /// default empty ctor\n    Coulomb(World& world) : world(world) {};\n\n    /// default empty ctor\n    Coulomb(World& world, const double lo, const double thresh=FunctionDefaults<3>::get_thresh()) : world(world) {\n        reset_poisson_operator_ptr(lo,thresh);\n    };\n\n    /// ctor with an SCF calculation providing the MOs and density\n    Coulomb(World& world, const SCF* calc);\n\n    /// ctor with a Nemo calculation providing the MOs and density\n    Coulomb(World& world, const Nemo* nemo);\n\n    std::string info() const {return \"J\";}\n\n    Coulomb& set_taskq(std::shared_ptr<MacroTaskQ> taskq1) {\n        this->taskq=taskq1;\n        return *this;\n    }\n\n    void reset_poisson_operator_ptr(const double lo, const double econv);\n\n    Function<T,NDIM> operator()(const Function<T,NDIM>& ket) const {\n        std::vector<Function<T,NDIM> > vket(1,ket);\n        return this->operator()(vket)[0];\n    }\n\n    std::vector<Function<T,NDIM> > operator()(const std::vector<Function<T,NDIM> >& vket) const {\n        MacroTaskCoulomb t;\n        World& world=vket.front().world();\n        MacroTask task(world, t, this->taskq);\n        auto result=task(vcoul,vket);\n        return result;\n    }\n\n    T operator()(const Function<T,NDIM>& bra, const Function<T,NDIM>& ket) const {\n        return inner(bra,vcoul*ket);\n    }\n\n    Tensor<T> operator()(const std::vector<Function<T,NDIM> >& vbra,\n    \t\tconst std::vector<Function<T,NDIM> >& vket) const {\n        const auto bra_equiv_ket = &vbra == &vket;\n        std::vector<Function<T,NDIM> > vJket;\n        for (std::size_t i=0; i<vket.size(); ++i) {\n            vJket.push_back(this->operator()(vket[i]));\n        }\n        return matrix_inner(world,vbra,vJket,bra_equiv_ket);\n    }\n\n    /// getter for the Coulomb potential\n    const real_function_3d& potential() const {return vcoul;}\n\n    /// setter for the Coulomb potential\n    real_function_3d& potential() {return vcoul;}\n\n    real_function_3d compute_density(const SCF* calc) const;\n\n    /// given a density compute the Coulomb potential\n\n    /// this function uses a newly constructed Poisson operator. Note that\n    /// the accuracy parameters must be consistent with the exchange operator.\n    Function<T,NDIM> compute_potential(const Function<T,NDIM>& density) const {\n    \treturn (*poisson)(density).truncate();\n    }\n\n    /// given a set of MOs in an SCF calculation, compute the Coulomb potential\n\n    /// this function uses the Poisson operator of the SCF calculation\n    real_function_3d compute_potential(const SCF* calc) const;\n\n    /// given a set of MOs in an SCF calculation, compute the Coulomb potential\n\n    /// this function uses the Poisson operator of the SCF calculation\n    real_function_3d compute_potential(const Nemo* nemo) const;\n\nprivate:\n    World& world;\n    std::shared_ptr<real_convolution_3d> poisson;\n    double lo=1.e-4;\n    real_function_3d vcoul; ///< the coulomb potential\n};\n\n\ntemplate<typename T, std::size_t NDIM>\nclass Nuclear : public SCFOperatorBase<T,NDIM> {\npublic:\n\n    Nuclear(World& world, const SCF* calc);\n\n    Nuclear(World& world, const NemoBase* nemo);\n\n    /// simple constructor takes a molecule, no nuclear correlation factor or core potentials\n    Nuclear(World& world, const Molecule& molecule);\n\n    Nuclear(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf)\n        : world(world), ncf(ncf) {}\n\n    std::string info() const {return \"Vnuc\";}\n\n    Function<T,NDIM> operator()(const Function<T,NDIM>& ket) const {\n        std::vector<Function<T,NDIM> > vket(1,ket);\n        return this->operator()(vket)[0];\n    }\n\n    std::vector<Function<T,NDIM> > operator()(const std::vector<Function<T,NDIM> >& vket) const;\n\n    T operator()(const Function<T,NDIM>& bra, const Function<T,NDIM>& ket) const {\n        return inner(bra,this->operator()(ket));\n    }\n\n    Tensor<T> operator()(const  std::vector<Function<T,NDIM> >& vbra,\n    \t\tconst  std::vector<Function<T,NDIM> >& vket) const {\n        const auto bra_equiv_ket = &vbra == &vket;\n        std::vector<Function<T,NDIM> > vVket=this->operator()(vket);\n        return matrix_inner(world,vbra,vVket,bra_equiv_ket);\n    }\n\nprivate:\n    World& world;\n    std::shared_ptr<NuclearCorrelationFactor> ncf;\n\n};\n\n\n/// the z component of the angular momentum\n\n/// takes real and complex functions as input, will return complex functions\ntemplate<typename T, std::size_t NDIM>\nclass Lz : public SCFOperatorBase<T,NDIM> {\nprivate:\n    World& world;\npublic:\n\n\tbool use_bsplines=true;\n\n\tLz(World& world, bool use_bspline_derivative=true) : world(world), use_bsplines(use_bspline_derivative) {};\n\n    std::string info() const {return \"Lz\";}\n\n\n    Function<T,NDIM> operator()(const Function<T,NDIM>& ket) const {\n\t\tstd::vector<Function<T,NDIM> > vket(1,ket);\n        return this->operator()(vket)[0];\n    }\n\n    std::vector<Function<T,NDIM> > operator()(const std::vector<Function<T,NDIM> >& vket) const {\n\n\t\t// the operator in cartesian components as\n\t\t// L_z =  - i (x del_y - y del_x)\n\n\t\tif (vket.size()==0) return std::vector<complex_function_3d>(0);\n\n\t    real_function_3d x=real_factory_3d(world).functor([] (const coord_3d& r) {return r[0];});\n\t    real_function_3d y=real_factory_3d(world).functor([] (const coord_3d& r) {return r[1];});\n\n\t    Derivative<T,NDIM> Dx = free_space_derivative<T,NDIM>(world, 0);\n\t\tDerivative<T,NDIM> Dy = free_space_derivative<T,NDIM>(world, 1);\n\t\tif (use_bsplines) {\n\t\t\tDx.set_bspline1();\n\t\t\tDy.set_bspline1();\n\t\t}\n\n\t\treconstruct(world,vket,true);\n\t    std::vector<Function<T,NDIM> > delx=apply(world,Dx,vket,false);\n\t    std::vector<Function<T,NDIM> > dely=apply(world,Dy,vket,true);\n\n\t    std::vector<Function<T,NDIM> > result1=x*dely - y*delx;\n\t    std::vector<complex_function_3d> cresult1=convert<T,double_complex,NDIM>(world,result1);\n\t    std::vector<complex_function_3d> result=double_complex(0.0,-1.0)*cresult1;\n\t\treturn result;\n\t}\n\n    T operator()(const Function<T,NDIM>& bra, const Function<T,NDIM>& ket) const {\n        return inner(bra,this->operator()(ket));\n    }\n\n    Tensor<T> operator()(const std::vector<Function<T,NDIM> >& vbra,\n    \t\tconst std::vector<Function<T,NDIM> >& vket) const {\n        const auto bra_equiv_ket = &vbra == &vket;\n        std::vector<complex_function_3d> vVket=this->operator()(vket);\n        return matrix_inner(world,vbra,vVket,bra_equiv_ket);\n    }\n\n};\n\n\n\n/// derivative of the (regularized) nuclear potential wrt nuclear displacements\ntemplate<typename T, std::size_t NDIM>\nclass DNuclear : public SCFOperatorBase<T,NDIM> {\npublic:\n\n    DNuclear(World& world, const SCF* calc, const int iatom, const int iaxis);\n\n    DNuclear(World& world, const Nemo* nemo, const int iatom, const int iaxis);\n\n    DNuclear(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf,\n            const int iatom, const int iaxis)\n        : world(world), ncf(ncf), iatom(iatom), iaxis(iaxis) {}\n\n    std::string info() const {return \"DVnuc\";}\n\n    Function<T,NDIM> operator()(const Function<T,NDIM>& ket) const {\n        std::vector<Function<T,NDIM>> vket(1,ket);\n        return this->operator()(vket)[0];\n    }\n\n    std::vector<Function<T,NDIM>> operator()(const std::vector<Function<T,NDIM>>& vket) const;\n\n    T operator()(const Function<T,NDIM>& bra, const Function<T,NDIM>& ket) const {\n        return inner(bra,this->operator()(ket));\n    }\n\n    Tensor<T> operator()(const std::vector<Function<T,NDIM>>& vbra, const std::vector<Function<T,NDIM>>& vket) const {\n        const auto bra_equiv_ket = &vbra == &vket;\n        std::vector<Function<T,NDIM>> vVket=this->operator()(vket);\n        return matrix_inner(world,vbra,vVket,bra_equiv_ket);\n    }\n\nprivate:\n    World& world;\n    std::shared_ptr<NuclearCorrelationFactor> ncf;\n    int iatom;  ///< index of the atom which is displaced\n    int iaxis;  ///< x,y,z component of the atom\n\n};\n\ntemplate<typename T, std::size_t NDIM>\nclass LocalPotentialOperator : public SCFOperatorBase<T,NDIM> {\npublic:\n    LocalPotentialOperator(World& world) : world(world) {};\n    LocalPotentialOperator(World& world, const std::string info, const Function<T,NDIM> potential)\n            : world(world), info_str(info), potential(potential) {};\n\n    std::string info() const {return info_str;}\n\n    void set_info(const std::string new_info) {\n        info_str=new_info;\n    }\n\n    void set_potential(const Function<T,NDIM>& new_potential) {\n        potential=copy(new_potential);\n    }\n\n    Function<T,NDIM> operator()(const Function<T,NDIM>& ket) const {\n        return (potential*ket).truncate();\n    }\n\n    std::vector<Function<T,NDIM> > operator()(const std::vector<Function<T,NDIM> >& vket) const {\n        return truncate(potential*vket);\n    }\n\n    T operator()(const Function<T,NDIM>& bra, const Function<T,NDIM>& ket) const {\n        return inner(bra,potential*ket);\n    }\n\n    Tensor<T> operator()(const std::vector<Function<T,NDIM> >& vbra,\n                         const std::vector<Function<T,NDIM> >& vket) const {\n        const auto bra_equiv_ket = &vbra == &vket;\n        return matrix_inner(world,vbra,potential*vket,bra_equiv_ket);\n    }\n\nprivate:\n    World& world;\n    std::string info_str=\"Vlocal\";\n    Function<T,NDIM> potential;\n};\n\n/// operator class for the handling of DFT exchange-correlation functionals\ntemplate<typename T, std::size_t NDIM>\nclass XCOperator : public SCFOperatorBase<T,NDIM> {\npublic:\n\n    /// default ctor without information about the XC functional\n    XCOperator(World& world) : world(world), nbeta(0), ispin(0),\n        extra_truncation(FunctionDefaults<3>::get_thresh()*0.01) {}\n\n    /// custom ctor with information about the XC functional\n    XCOperator(World& world, std::string xc_data, const bool spin_polarized,\n            const real_function_3d& arho, const real_function_3d& brho,\n            std::string deriv=\"abgv\");\n\n    /// custom ctor with the XC functional\n    XCOperator(World& world, std::shared_ptr<XCfunctional> xc,\n               const bool spin_polarized,\n               int ispin,\n               int nbeta,\n               const real_function_3d& arho, const real_function_3d& brho,\n               std::string deriv=\"abgv\");\n\n    /// ctor with an SCF calculation, will initialize the necessary intermediates\n    XCOperator(World& world, const SCF* scf, int ispin=0, std::string deriv=\"abgv\");\n\n    /// ctor with a Nemo calculation, will initialize the necessary intermediates\n    XCOperator(World& world, const Nemo* nemo, int ispin=0);\n\n    /// ctor with an SCF calculation, will initialize the necessary intermediates\n    XCOperator(World& world, const SCF* scf, const real_function_3d& arho,\n            const real_function_3d& brho, int ispin=0, std::string deriv=\"abgv\");\n\n    /// ctor with an Nemo calculation, will initialize the necessary intermediates\n    XCOperator(World& world, const Nemo* scf, const real_function_3d& arho,\n            const real_function_3d& brho, int ispin=0);\n\n    std::string info() const {return \"Vxc\";}\n\n    XCOperator& set_extra_truncation(const double& fac) {\n        extra_truncation=fac;\n        if (world.rank()==0)\n            print(\"set extra truncation in XCOperator to\", extra_truncation);\n        return *this;\n    }\n\n    /// set the spin state this operator is acting on\n    void set_ispin(const int i) const {ispin=i;}\n\n    /// apply the xc potential on a set of orbitals\n    std::vector<Function<T,NDIM> > operator()(const std::vector<Function<T,NDIM> >& vket) const;\n\n    /// apply the xc potential on an orbitals\n    Function<T,NDIM> operator()(const Function<T,NDIM>& ket) const {\n    \tstd::vector<Function<T,3> > vket(1,ket);\n    \tstd::vector<Function<T,3> > vKket=this->operator()(vket);\n        return vKket[0];\n    }\n\n    T operator()(const Function<T,NDIM>& bra, const Function<T,NDIM>& ket) const {\n         MADNESS_EXCEPTION(\"no implementation of matrix elements of the xc operator\",1);\n    };\n\n    Tensor<T> operator()(const std::vector<Function<T,NDIM>>& vbra, const std::vector<Function<T,NDIM>>& vket) const {\n        MADNESS_EXCEPTION(\"no implementation of matrix elements of the xc operator\", 1);\n    }\n\n    /// compute the xc energy using the precomputed intermediates vf and delrho\n    double compute_xc_energy() const;\n\n    /// return the local xc potential\n    real_function_3d make_xc_potential() const;\n\n    /// construct the xc kernel and apply it directly on the (response) density\n\n    /// the xc kernel is the second derivative of the xc functions wrt the density\n    /// @param[in]  density the (response) density on which the kernel is applied\n    /// @return     kernel * density\n    real_function_3d apply_xc_kernel(const real_function_3d& density,\n            const vecfuncT grad_dens_pt=vecfuncT()) const;\n\nprivate:\n\n    /// the world\n    World& world;\n\n    /// which derivative operator to use\n    std::string dft_deriv;\n\npublic:\n    /// interface to the actual XC functionals\n    std::shared_ptr<XCfunctional> xc;\n\nprivate:\n    /// number of beta orbitals\n    int nbeta;\n\n    /// the XC functionals depend on the spin of the orbitals they act on\n    mutable int ispin;\n\n    /// additional truncation for the densities in the XC kernel\n\n    /// the densities in the DFT kernal are processed as their inverses,\n    /// so noise in the small density regions might amplify and lead to inaccurate\n    /// results. Extra truncation will tighten the truncation threshold by a\n    /// specified factor, default is 0.01.\n    double extra_truncation;\n\n    /// the nuclear correlation factor, if it exists, for computing derivatives for GGA\n    std::shared_ptr<NuclearCorrelationFactor> ncf;\n\n    /// functions that are need for the computation of the XC operator\n\n    /// the ordering of the intermediates is fixed, but the code can handle\n    /// non-initialized functions, so if e.g. no GGA is requested, all the\n    /// corresponding vector components may be left empty.\n    /// For the ordering of the intermediates see xcfunctional::xc_arg\n    mutable vecfuncT xc_args;\n\n    /// compute the intermediates for the XC functionals\n\n    /// @param[in]  arho    density of the alpha orbitals\n    /// @param[in]  brho    density of the beta orbitals (necessary only if spin-polarized)\n    /// @return xc_args vector of intermediates as described above\n    vecfuncT prep_xc_args(const real_function_3d& arho, const real_function_3d& brho) const;\n\n    /// compute the intermediates for the XC functionals\n\n    /// @param[in]  dens_pt     perturbed densities from CPHF or TDDFT equations\n    /// @param[in,out] xc_args   vector of intermediates as described above\n    /// @param[out] ddens_pt    xyz-derivatives of dens_pt\n    void prep_xc_args_response(const real_function_3d& dens_pt,\n            vecfuncT& xc_args, vecfuncT& ddens_pt) const;\n\n    /// check if the intermediates are initialized\n    bool is_initialized() const {\n        return (xc_args.size()>0);\n    }\n\n    /// simple structure to take the pointwise logarithm of a function, shifted by +14\n    struct logme{\n        typedef double resultT;\n        struct logme1 {\n            double operator()(const double& val) {return log(std::max(1.e-14,val))+14.0;}\n        };\n        Tensor<double> operator()(const Key<3>& key, const Tensor<double>& val) const {\n            Tensor<double> result=copy(val);\n            logme1 op;\n            return result.unaryop(op);\n        }\n\n        template <typename Archive>\n        void serialize(Archive& ar) {}\n    };\n\n    /// simple structure to take the pointwise exponential of a function, shifted by +14\n    struct expme{\n        typedef double resultT;\n        struct expme1 {\n            double operator()(const double& val) {return exp(val-14.0);}\n        };\n        Tensor<double> operator()(const Key<3>& key, const Tensor<double>& val) const {\n            Tensor<double> result=copy(val);\n            expme1 op;\n            return result.unaryop(op);\n        }\n\n        template <typename Archive>\n        void serialize(Archive& ar) {}\n\n    };\n};\n\n/// Computes matrix representation of the Fock operator\ntemplate<typename T, std::size_t NDIM>\nclass Fock : public SCFOperatorBase<T,NDIM> {\npublic:\n    Fock(World& world) : world(world) {}\n\n    Fock(World& world, const Nemo* nemo);\n    Fock(World& world, const OEP* nemo);\n    Fock(World& world, const NemoBase* nemo);\n\n    /// pretty print what this is actually computing\n    std::string info() const {\n        std::string s;\n        for (auto& op : operators) {\n            double number=std::get<0>(op.second);\n            if (number==-1.0) {\n                s+=\" - \";\n            } else if (number!=1.0) {\n                std::stringstream snumber;\n                snumber << std::fixed << std::setw(2) << number;\n                s+=\" \"+snumber.str()+ \" \";\n            } else {\n                MADNESS_CHECK(number==1.0);\n                s+=\" + \";\n            }\n            s+=op.first;\n        }\n        return s;\n    }\n\n    /// add an operator with default prefactor 1.0\n    void add_operator(std::string name, std::shared_ptr<SCFOperatorBase<T,NDIM>> new_op) {\n        operators.insert({name,valueT(1.0,new_op)});\n    }\n\n    /// add an operator with custom prefactor (e.g. -1.0 for the exchange, supposedly)\n    void add_operator(std::string name, std::tuple<double,std::shared_ptr<SCFOperatorBase<T,NDIM>>> new_op) {\n        operators.insert({name,new_op});\n    }\n\n    /// remove operator, returns 0 if no operator was found\n    int remove_operator(std::string name) {\n        return operators.erase(name);\n    }\n\n    Function<T,NDIM> operator()(const Function<T,NDIM>& ket) const {\n      MADNESS_EXCEPTION(\"Fock(ket) not yet implemented\",1);\n      Function<T,NDIM> result;\n      return result;\n    }\n\n    std::vector<Function<T,NDIM>> operator()(const std::vector<Function<T,NDIM>>& vket) const {\n        // make sure T is not part of the Fock operator, it's numerically unstable!\n        MADNESS_CHECK(operators.count(\"T\")==0);\n        std::vector<Function<T,NDIM>> result = zero_functions_compressed<T, NDIM>(world, vket.size());\n        for (const auto& op : operators) {\n            result+=std::get<0>(op.second) * (*std::get<1>(op.second))(vket);\n        }\n        return result;\n    }\n\n    T operator()(const Function<T,NDIM>& bra, const Function<T,NDIM>& ket) const {\n        std::vector<Function<T,NDIM>> vbra(1,bra), vket(1,ket);\n        return (*this)(vbra,vket)(0,0);\n    }\n\n    /// compute the Fock matrix by summing up all contributions\n    Tensor<T> operator()(const std::vector<Function<T,NDIM>>& vbra, const std::vector<Function<T,NDIM>>& vket) const {\n        return this->operator()(vbra,vket,false);\n    }\n\n    /// compute the Fock matrix by summing up all contributions\n    Tensor<T> operator()(const std::vector<Function<T,NDIM>>& vbra, const std::vector<Function<T,NDIM>>& vket,\n            const bool symmetric) const {\n        Tensor<T> fock(vbra.size(),vket.size());\n        for (const auto& op : operators) {\n            Tensor<T> tmp=std::get<0>(op.second) * (*std::get<1>(op.second))(vbra,vket);\n//            print(\"Operator\",std::get<1>(op.second)->info());\n//            print(tmp);\n            fock+=tmp;\n        }\n        return fock;\n    }\n\n\nprivate:\n    /// the world\n    World& world;\n\n    /// type defining Fock operator contribution including prefactor\n    typedef std::tuple<double,std::shared_ptr<SCFOperatorBase<T,NDIM> > > valueT;\n\n    /// all the Fock operator contribution\n    std::map<std::string,valueT> operators;\n};\n\n}\n#endif /* MADNESS_CHEM_SCFOPERATORS_H_ */\n"
  },
  {
    "path": "src/madness/chem/SCFProtocol.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file SCFProtocol.h\n/// \\brief solution protocol for SCF calculations\n\n\n#ifndef MADNESS_CHEM_SCFPROTOCOL_H__INCLUDED\n#define MADNESS_CHEM_SCFPROTOCOL_H__INCLUDED\n\nnamespace madness {\n\n#include<madness/chem/CalculationParameters.h>\n\n/// struct for running a protocol of subsequently tightening precision\nclass SCFProtocol {\npublic:\n    SCFProtocol(World& w, const CalculationParameters& param)\n            : world(w), converged(false),\n              start_prec(1.e-4), current_prec(start_prec), end_prec(param.econv()),\n              thresh(1.e-4), econv(1.e-4), dconv(1.e-3), user_dconv(1.e-20) {\n        user_dconv=param.dconv();\n    }\n\n    World& world;\n\n    bool converged;         ///< flag if protocol has converged\n\n    double start_prec;      ///< starting precision, typically 1.e-4\n    double current_prec;    ///< current precision\n    double end_prec;        ///< final precision\n\n    double thresh;          ///< numerical precision of representing functions\n    double econv;           ///< energy convergence of SCF calculations\n    double dconv;           ///< density convergence of SCF calculations\n    double user_dconv;      ///< density convergence provided by user\n\n    void initialize() {\n\n        // don't do anything if this protocol is already converged\n        if (converged) return;\n\n        current_prec=start_prec;\n        infer_thresholds(current_prec);\n\n        if (world.rank()==0) {\n            std::stringstream ss;\n            ss <<\"\\nstarting protocol at time\" << std::setw(8) << std::setprecision(2)\n               << wall_time() << \"s\";\n            print(ss.str());\n            print(\"precision steps \",start_prec,\" --> \",end_prec);\n            print(\"protocol: thresh\",thresh,\"econv \",econv,\"dconv\",dconv);\n        }\n    }\n\n    bool finished() const {return converged;}\n\n    /// go to the next level\n    SCFProtocol& operator++() {\n        if (current_prec*0.9999>end_prec) {\n            current_prec*=0.1;\n            if (current_prec<end_prec) current_prec=end_prec;\n            infer_thresholds(current_prec);\n        } else {\n            converged=true;\n        }\n\n        return *this;\n    }\n\n    /// infer thresholds starting from a target precision\n    void infer_thresholds(const double prec) {\n        econv=prec;\n        thresh=econv;\n        dconv=std::min(1.e-3,sqrt(econv)*0.1);\n//            dconv=std::min(1.e-3,econv*10.0);\n        if (approx(current_prec,end_prec)) dconv=user_dconv;    // respect the user\n    }\n\n    /// compare two positive doubles to be equal\n    bool approx(const double a, const double b) const {\n        return (std::abs(a/b-1.0)<1.e-12);\n    }\n};\n\n\n\n} // namespace madness\n\n\n#endif /* SRC_APPS_CHEM_SCFPROTOCOL_H_ */\n"
  },
  {
    "path": "src/madness/chem/SCFTargetAdapter.hpp",
    "content": "// SCFTarget.hpp\n#pragma once\n#include <filesystem>\n\n#include <madness/chem/Applications.hpp>\n#include <madness/chem/molecule.h>\n\nstruct SCFTarget {\n  World& world_;\n  std::function<std::unique_ptr<Application>(Params)> factory_;\n  Params params_;\n  double last_energy = 0.0;\n  madness::Tensor<double> last_gradient;\n\n  SCFTarget(World& w,\n            std::function<std::unique_ptr<Application>(Params)> factory,\n            Params p)\n      : world_(w), factory_(std::move(factory)), params_(std::move(p)) {}\n\n  // Called by MolOpt at each geometry:\n  void energy_and_gradient(Molecule& mol, double& energy,\n                           madness::Tensor<double>& grad) {\n    // 1) inject new coords into params\n    params_.set(mol);\n\n    // 2) build & run the SCF+grad application\n    auto app = factory_(params_);\n    app->run(std::filesystem::current_path());\n    auto res = app->results();\n\n    // 3) extract energy + gradient\n    energy = res.at(\"energy\").get<double>();\n    grad = tensor_from_json<double>(res.at(\"gradient\"));\n\n    last_energy = energy;\n    last_gradient = grad;\n  }\n\n  // Called by MolOpt::line_search\n  double value(const madness::Tensor<double>& x) {\n    Molecule mol = params_.get<Molecule>();\n    mol.set_all_coords(x.reshape(mol.natom(), 3));\n    double e;\n    madness::Tensor<double> g;\n    energy_and_gradient(mol, e, g);\n    return e;\n  }\n};\n"
  },
  {
    "path": "src/madness/chem/TDHF.cc",
    "content": "/*\n * TDHF.cc\n *\n *  Created on: Aug 11, 2016\n *      Author: kottmanj\n */\n\n#include<madness/chem/TDHF.h>\n#include<madness/chem/localizer.h>\n#include<madness/chem/oep.h>\n#include<madness/world/test_utilities.h>\n#include<madness/chem/write_test_input.h>\n#include\"madness/mra/commandlineparser.h\"\n\n\nnamespace madness {\n\n// KAIN allocator for vectorfunctions\nstruct TDHF_allocator {\n    World &world;\n    const int noct;\n\n    /// @param[in]\tworld\tthe world\n    /// @param[in]\tnnoct\tthe number of functions in a given vector\n    /// @todo validate doxygen on `nnoct`\n    TDHF_allocator(World &world, const int nnoct) : world(world), noct(nnoct) {}\n\n    vector_real_function_3d operator()() {\n        return zero_functions<double, 3>(world, noct);\n    }\n\n    TDHF_allocator operator=(const TDHF_allocator &other) {\n        TDHF_allocator tmp(world, other.noct);\n        return tmp;\n    }\n\n};\n\n\n/// ctor with world and parameters, constructs Nemo object on-the-fly, and delegates further\n///\n///\nTDHF::TDHF(World &world, const TDHFParameters &parameters, std::shared_ptr<const Nemo> reference)\n        : world(world),\n            reference_(reference),\n            parameters(parameters),\n            g12(),\n            mo_ket_(),\n            mo_bra_(),\n            Q(),\n            msg(world) {\n    this->parameters.set_derived_values(get_calc());\n    initialize();\n\n}\n\n\n///  ctor with command line parser, constructs SCF and Nemo objects on-the-fly, and delegates further\n\n/// \\param world    the world\n/// \\param parser   the parser\nTDHF::TDHF(World &world, const commandlineparser &parser) : TDHF(world,parser,std::make_shared<const Nemo>(world,parser)) {}\n\n///  ctor with command line parser, constructs SCF and Nemo objects on-the-fly, and delegates further\n\n/// \\param world    the world\n/// \\param parser   the parser\nTDHF::TDHF(World &world, const commandlineparser &parser, std::shared_ptr<const Nemo> nemo)\n        : world(world),\n          reference_(nemo),\n          parameters(world, parser),\n          g12(),\n          mo_ket_(),\n          mo_bra_(),\n          Q(),\n          msg(world) {\n\n    if (parameters.do_oep()) {\n        std::shared_ptr<OEP> oep(new OEP(world, parser));\n        set_reference(oep);\n    }\n    parameters.set_derived_values(get_calc());\n    initialize();\n}\n\nvoid TDHF::initialize() {\n\n    msg.debug = parameters.debug();\n    g12=std::make_shared<CCConvolutionOperator<double,3>>(world, OpType::OT_G12, parameters.get_ccc_parameters(get_calcparam().lo()));\n\n    const double old_thresh = FunctionDefaults<3>::get_thresh();\n    if (old_thresh > parameters.thresh() * 0.1 and old_thresh > 1.e-5) {\n        msg.warning(\"Threshold of Reference might be too loose |  Response thresh=\"\n                    + std::to_string(parameters.thresh()) + \" and Reference thresh=\" + std::to_string(old_thresh)\n                    + \". Be careful, reference should be tight\");\n    }\n    symmetry_projector = get_nemo()->get_symmetry_projector();\n    // do not normalize the x vectors individually!\n    symmetry_projector.set_lindep(1.e-2).set_orthonormalize_irreps(false).set_verbosity(0);\n    check_consistency();\n\n}\n\nvoid TDHF::print_frozen_orbitals() const {\n\n    MolecularOrbitals<double, 3> dummy_mo(get_calc()->amo, get_calc()->aeps);\n    if (parameters.print_level() > 2) dummy_mo.print_frozen_orbitals(parameters.freeze());\n}\n\nMolecularOrbitals<double,3> TDHF::enforce_core_valence_separation(const Tensor<double>& fmat) const {\n\n\n    if (get_calcparam().localize_method()==\"canonical\") {\n        return MolecularOrbitals<double,3>(get_calc()->amo, get_calc()->aeps);\n    }\n\n\n    // check block structure of the fock matrix\n    print(\"initial fock matrix\");\n    print(fmat);\n\n    auto nemo=get_reference();\n    auto calc=get_calc();\n    Localizer localizer(world,calc->aobasis,calc->molecule,calc->ao);\n    localizer.set_enforce_core_valence_separation(true).set_method(get_calcparam().localize_method());\n    localizer.set_metric(nemo->R);\n\n    MolecularOrbitals<double, 3> mos(get_calc()->amo, get_calc()->aeps);\n    mos.recompute_localize_sets();\n    auto mo_new= localizer.separate_core_valence(mos, fmat);\n\n    return mo_new;\n\n    mos=mo_new;\n    Fock<double,3> fock(world,get_reference().get());\n    auto fmat1=fock(make_bra(mos.get_mos()),mos.get_mos());\n    bool good=Localizer::check_core_valence_separation(fmat1,mos.get_localize_sets(),true);\n    print(\"block-diagonalized fock matrix\");\n    print(fmat1);\n    if (not good) {\n        print(\"fock matrix not block-diagonal\");\n        print(fmat1);\n        MADNESS_CHECK(0);\n    }\n    return mo_new;\n\n}\n\n/// compute non-trivial prerequisites for the calculation\nvoid TDHF::prepare_calculation() {\n    MADNESS_CHECK_THROW(get_nemo()->check_converged(get_calc()->molecule.get_all_coords()),\n        \"reference calculation for TDHF is not converged\");\n\n    // enforce core-valence separation if localized\n    Tensor<double> fmat;\n    if (get_calcparam().do_localize()) {\n        auto fock_operator=*(get_reference()->make_fock_operator());\n        fmat=fock_operator(make_bra(get_calc()->amo),get_calc()->amo);\n        auto mos=enforce_core_valence_separation(fmat);\n        get_nemo()->get_calc()->amo=mos.get_mos();\n        get_nemo()->get_calc()->aeps=mos.get_eps();\n    } else {\n        std::size_t nmo=get_calc()->aeps.size();\n        fmat=Tensor<double>(nmo,nmo);\n        for (size_t i=0; i<nmo; ++i) fmat(i,i)= get_calc()->aeps(i);\n    }\n\n    std::size_t nfrozen=Localizer::determine_frozen_orbitals(fmat);\n    // this won't override user's will\n    parameters.set_derived_value<long>(\"freeze\", long(nfrozen));\n    print_frozen_orbitals();\n\n    mo_ket_ = make_mo_ket(get_calc()->amo);\n    mo_bra_ = make_mo_bra(get_calc()->amo);\n    Q = QProjector( mo_bra_.get_vecfunction(), mo_ket_.get_vecfunction());\n\n    if (not parameters.no_compute()) {\n\n        bool need_hf = (get_calc()->xc.hf_exchange_coefficient() != 0.0) and (parameters.do_oep() == false);\n        if (need_hf) {\n            msg.subsection(\"Computing Exchange Intermediate\");\n            CCTimer timer(world, \"Computing ExIm\");\n            g12->update_elements(mo_bra_, mo_ket_);\n            timer.info();\n        } else msg.output(\"No Exchange Intermediate Computed\\n\");\n\n        msg.output(\"Orbital Energies of Reference\");\n        const Tensor<double> eps = get_calc()->aeps;\n        msg << eps << \"\\n\";\n\n    }\n    if (get_calcparam().do_localize()) {\n        Fock<double,3> F(world,get_reference().get());\n        F_occ = F(get_active_mo_bra(), get_active_mo_ket());\n//        for (size_t i = 0; i < get_active_mo_ket().size(); ++i) {\n//            msg << std::scientific << std::setprecision(10);\n//            msg << \"F(\" << i << \",\" << i << \")=\" << F_occ(i, i) << \"\\n\";\n//            if (std::fabs(get_orbital_energy(i + parameters.freeze()) - F_occ(i, i)) > 1.e-5) {\n//                msg << \"eps(\" << i << \")=\" << get_orbital_energy(i) << \" | diff=\"\n//                    << get_orbital_energy(i + parameters.freeze()) - F_occ(i, i) << \"\\n\";\n//            }\n//        }\n    } else {\n        F_occ = Tensor<double>(get_active_mo_bra().size(), get_active_mo_ket().size());\n        F_occ *= 0.0;\n        for (size_t i = 0; i < get_active_mo_ket().size(); ++i) {\n            F_occ(i, i) = get_orbital_energy(i + parameters.freeze());\n        }\n    }\n}\n\n/// plot planes and cubes\nvoid TDHF::plot(const vector_real_function_3d &vf, const std::string &name) const {\n    if (parameters.plot()) {\n        CCTimer timer(world, \"plot planes and cubes\");\n        madness::plot(vf, name, get_calc()->molecule.cubefile_header());\n        timer.print();\n    }\n}\n\n/// sort the xfunctions according to their excitation energy and name the excitation energies accordingly\nstd::vector<CC_vecfunction> TDHF::sort_xfunctions(std::vector<CC_vecfunction> x) const {\n    std::sort(x.begin(), x.end());\n    return x;\n}\n\n/// print information\nvoid TDHF::print_xfunctions(const std::vector<CC_vecfunction>& f, const std::string message) const {\n    int counter=0;\n    if (world.rank()==0 and (not message.empty())) print(message);\n    for (const auto &x:f) {\n        const double mem = get_size(world, x.get_vecfunction());\n\n        msg << \"ex. vector \"\n            << counter++ << \" | \"\n            << std::setw(4) << x.irrep << \" | \"\n            << x.omega << \" (ex. energy) | \"\n            << std::setprecision(3)\n            << x.current_error << \" (error) | \"\n            << x.delta << \" (Edelta) | \"\n            << mem << \" (Gbyte)\"\n            << std::setprecision(msg.output_prec)\n            << \"\\n\";\n\n    }\n}\n\nvoid TDHF::initialize(std::vector<CC_vecfunction> &start) const {\n\n    msg.subsection(\"Calculate Guess\");\n    std::vector<CC_vecfunction> guess;\n    guess = make_guess_from_initial_diagonalization();\n    // combine guess and start vectors\n    for (const auto &tmp:start) guess.push_back(tmp);\n    std::vector<vector_real_function_3d> empty;\n    //orthonormalize(guess,empty);\n\n\n    // failsafe (works in most cases)\n    if (guess.size() < size_t(parameters.guess_excitations())) {\n        std::string message = (\"WARNING: You demanded: \" + std::to_string(parameters.guess_excitations())\n                               + \" Guess vectors, but your demanded guess has only \" + std::to_string(guess.size())\n                               +\n                               \"vectors. So we will not iterate the first vectors and then do the same guess again ... this might be unstable\").c_str();\n        msg.output(message);\n        if (parameters.guess_maxiter() == 0) {\n            msg.output(\n                    \"In this case you demanded guess_maxiter=0 (which is also the default), so this can not work!\");\n            MADNESS_EXCEPTION(\"Faulty combinations of parameters given\", 1);\n        }\n        iterate_cis_guess_vectors(guess);\n        initialize(guess);\n    }\n\n    //sort guess (according to excitation energies)\n    std::sort(guess.begin(), guess.end());\n    //truncate the guess\n    std::vector<CC_vecfunction> guess_vectors;\n    for (size_t i = 0; i < parameters.guess_excitations(); i++) guess_vectors.push_back(guess[i]);\n    // this is the return value\n    start = guess_vectors;\n}\n\nvoid TDHF::symmetrize(std::vector<CC_vecfunction> &v) const {\n\n    // The irreps of the x vector elements are given by\n    //    Gamma(orbital) x Gamma(x element) = Gamma (excitation)\n    // Using the inverse element of Gamma(orbital) we get\n    //    Gamma(x element) = Gamma(excitation) x Gamma^{-1}(orbital)\n    // since all groups are Abelian the inverse element is the element itself\n    //    Gamma(x element) = Gamma(excitation) x Gamma(orbital)\n\n    if (get_nemo()->do_symmetry()) {\n        std::vector<std::string> irreps, orbital_irreps;\n        symmetry_projector(get_active_mo_ket(), orbital_irreps);\n\n        // loop over all excitations\n        for (auto &f : v) {\n\n            // determine the irreps of the x vector elements\n            std::vector<std::string> xirreps(f.get_vecfunction().size());\n            MADNESS_ASSERT(symmetry_projector.get_table().is_abelian);\n            for (size_t i = 0; i < xirreps.size(); ++i) {\n                xirreps[i] = symmetry_projector.reduce(f.irrep, orbital_irreps[i])[0];\n            }\n\n            vector_real_function_3d tmp = symmetry_projector.project_on_irreps(f.get_vecfunction(), xirreps);\n            f.set_functions(tmp, RESPONSE, parameters.freeze());\n        }\n    }\n}\n\n/// @param[in/out] CC_vecfunction\n/// on input the guess functions (if empty or not enough the a guess will be generated)\n/// on output the solution\nstd::vector<CC_vecfunction> TDHF::solve_cis() const {\n    if (world.rank()==0) print_header2(\"computing CIS excitations\");\n    std::vector<CC_vecfunction> ccs;\n    // look for restart options\n    if (parameters.restart()==\"iterate\" or parameters.restart()==\"no_compute\") {\n        auto excitations_list=parameters.excitations();\n        if (excitations_list.empty()) {\n            for (size_t i=0; i<parameters.nexcitations(); ++i) excitations_list.push_back(i);\n        }\n        for (auto ex : excitations_list) {\n            std::string filename= filename_for_roots(ex);\n            try {\n                auto root=CC_vecfunction::load_restartdata(world,filename);\n                if (world.rank()==0) print(\"found excitation #\",ex,\"on disk: \",filename);\n                ccs.push_back(root);\n            } catch (...) {\n                if (world.rank()==0) print(\"could not find excitation #\", ex, \", \", filename);\n            }\n        }\n        if (ccs.size()>0) {\n            print_xfunctions(ccs, \"initial roots from disk\");\n            if (world.rank()==0) print(\"\\nsorting roots according to energy\");\n            ccs=sort_xfunctions(ccs);\n\n            if (parameters.restart()==\"no_compute\") {\n                converged_roots=ccs;\n            } else {\n                // sort ccs in converged and non-converged sets\n                std::vector<CC_vecfunction> other_roots;\n                double dconv = parameters.dconv();\n                double econv = parameters.econv();\n                std::partition_copy(std::begin(ccs), std::end(ccs),\n                                    std::back_inserter(converged_roots), std::back_inserter(other_roots),\n                                    [&econv, &dconv](const CC_vecfunction &root) {\n                                        return root.is_converged(econv, dconv);\n                                    });\n                std::swap(other_roots, ccs);\n                if (parameters.print_level()>0) {\n                    print_xfunctions(converged_roots, \"\\nconverged roots\");\n                    print_xfunctions(ccs, \"\\nnon-converged roots\");\n                }\n            }\n        }\n    }\n\n    bool skip_solve=(parameters.restart()==\"no_compute\") or (converged_roots.size()>=parameters.nexcitations());\n\n    if (skip_solve) {\n        if (world.rank()==0) {\n            print(\"skipping the solution of the CIS equations\");\n            if (parameters.restart()==\"no_compute\") print(\" -> no_compute is set\");\n            if (converged_roots.size()>=parameters.nexcitations())\n                print(\" -> number of converged excitations from disk is sufficient:\", converged_roots.size());\n        }\n    } else {\n        for (size_t macrocycle = 0; macrocycle < 1; ++macrocycle) {\n            //msg.section(\"CIS Macroiteration \" + std::to_string(macrocycle));\n            ccs = solve_cis(ccs);\n            if (converged_roots.size() >= size_t(parameters.nexcitations())) break;\n        }\n    }\n\n    if (world.rank()==0) print_header2(\"end computing CIS excitations\");\n    return converged_roots;\n}\n\nstd::vector<CC_vecfunction> TDHF::solve_cis(std::vector<CC_vecfunction> &start) const {\n    msg.section(\"SOLVING CIS EQUATIONS\");\n\n    mo_ket_.plot(\"MOS_\");\n\n    CCTimer time(world, \"TDHF/CIS\");\n    // decide if a guess calculation is needed\n    bool need_guess = false;\n    if (start.size() < size_t(parameters.guess_excitations())) need_guess = true;\n    std::vector<CC_vecfunction> guess_vectors;\n    if (need_guess) {\n        initialize(start);\n        guess_vectors = start;\n    } else guess_vectors = start;\n\n    symmetrize(guess_vectors);\n\n    msg.output(\"====Guess-Vectors=====\");\n    print_xfunctions(guess_vectors, \"\");\n\n    std::vector<CC_vecfunction> final_vectors;\n    msg.subsection(\"Iterate Guess Vectors\");\n    {\n        // do guess iterations\n        iterate_cis_guess_vectors(guess_vectors);\n        // sort according to excitation energies\n        std::sort(guess_vectors.begin(), guess_vectors.end());\n        // save\n        for (size_t i = 0; i < guess_vectors.size(); i++) guess_vectors[i].save_restartdata(world, filename_for_roots(i));\n        // prepare final iterations\n        for (size_t i = 0; i < guess_vectors.size(); i++) {\n            if (i < size_t(parameters.iterating_excitations())) final_vectors.push_back(guess_vectors[i]);\n            else guess_roots.push_back(guess_vectors[i]);\n        }\n        // sort guess_roots backwards in order to feed them into the cycle easily with pop_back\n        std::sort(guess_roots.rbegin(), guess_roots.rend());\n\n    }\n\n    msg.subsection(\"Iterate Final Vectors\");\n\n    print_xfunctions(final_vectors, \"Vectors in Iteration Cycle\");\n    print_xfunctions(guess_roots, \"Remaining Guess Vectors\");\n\n    iterate_cis_final_vectors(final_vectors);\n    msg.section(\"CIS CALCULATIONS ENDED\");\n    std::sort(converged_roots.begin(), converged_roots.end());\n    std::sort(final_vectors.begin(), final_vectors.end());\n\n    // information\n    print_xfunctions(converged_roots, \"\\n\\nCONVERGED ROOTS\\n\");\n    print_xfunctions(final_vectors, \"\\n\\nRest\\n\");\n    time.info();\n\n    // plot final vectors\n    for (size_t i = 0; i < final_vectors.size(); i++) final_vectors[i].plot(std::to_string(i) + \"_converged_cis\");\n\n    //give back as much as demanded\n    std::vector<CC_vecfunction> result = converged_roots;\n    for (const auto &x:final_vectors) {\n        result.push_back(x);\n        if (result.size() == size_t(parameters.nexcitations())) break;\n    }\n    msg << \"writing final functions to disk...\\n\";\n    result = sort_xfunctions(result);\n    for (size_t i = 0; i < result.size(); i++) result[i].save_restartdata(world,filename_for_roots(i));\n\n\n    // print out all warnings\n    msg.print_warnings();\n    return result;\n}\n\nvoid TDHF::solve_tdhf(std::vector<CC_vecfunction> &x) const {\n    msg.section(\"SOLVING TDHF EQUATIONS\");\n    MADNESS_EXCEPTION(\"TDHF NOT IMPLEMENTED\", 1);\n}\n\nbool TDHF::iterate_cis_guess_vectors(std::vector<CC_vecfunction> &x) const {\n    std::vector<CC_vecfunction> dummy;\n    return iterate_vectors(x, dummy, false, parameters.guess_dconv(), parameters.guess_econv(),\n                           parameters.guess_maxiter(), false);\n}\n\nbool TDHF::iterate_cis_final_vectors(std::vector<CC_vecfunction> &x) const {\n    std::vector<CC_vecfunction> dummy;\n    return iterate_vectors(x, dummy, false, parameters.dconv(), parameters.econv(), parameters.maxiter(),\n                           parameters.kain_subspace() > 0);\n}\n\nbool TDHF::iterate_vectors(std::vector<CC_vecfunction> &x, const std::vector<CC_vecfunction> &y,\n                           const bool iterate_y, const double dconv, const double econv, const double iter_max,\n                           const bool kain) const {\n    if (iterate_y) MADNESS_ASSERT(x.size() == y.size());\n\n    msg.subsection(\"Iterating excitation vectors with the following parameters\");\n    msg << \"dconv    = \" << dconv << \"\\n\"\n        << \"econv    = \" << econv << \"\\n\"\n        << \"iter_max = \" << iter_max << \"\\n\"\n        << \"kain     = \" << kain << \"\\n\";\n\n    // set up the kain solvers ... if needed or not\n    std::vector<std::shared_ptr<XNonlinearSolver<vector_real_function_3d, double, TDHF_allocator> > > solvers(\n            x.size());\n    // initialize solvers\n    if (kain) {\n        for (size_t i = 0; i < x.size(); i++) {\n            solvers[i] = std::make_shared<XNonlinearSolver<vector_real_function_3d, double, TDHF_allocator> >(\n                    TDHF_allocator(world, x[i].size()), true);\n            solvers[i]->set_maxsub(parameters.kain_subspace());\n        }\n    }\n\n    bool converged = true;\n\n    symmetrize(x);\n\n    // get potentials (if demanded)\n    std::vector<vector_real_function_3d> V;\n\n    // for TDHF the potential is always stored\n    if (parameters.store_potential() and y.empty()) V = make_potentials(x);\n    else if (not y.empty()) V = make_tdhf_potentials(x, y);\n\n\n    for (size_t iter = 0; iter < iter_max; iter++) {\n        CCTimer timer(world, \"iteration \" + std::to_string(iter));\n        const bool this_is_a_guess_iteration = not(kain); // better readable code\n\n        // if this is the first iteration, the potentials are not calculated yet\n        if (iter == 0) orthonormalize(x, V);\n\n        // if we solve for the y functions we need to switch the sign of omega\n        if (iterate_y) {\n            for (auto &tmp:x) tmp.omega *= -1.0;\n        }\n        // apply Greens Functions\n        for (size_t i = 0; i < x.size(); i++) if (iterate_y and x[i].omega >= 0.0) x[i].omega = -1.0 * y[i].omega;\n        std::vector<vector_real_function_3d> residuals = apply_G(x, V);\n\n\n        // check convergence\n\n        converged = true;\n        // error (vector norm)\n        std::vector<double> errors;\n        // largest individual error\n        std::vector<std::pair<int, double> > largest_errors;\n        for (size_t i = 0; i < x.size(); i++) {\n            double av_error = norm2(world, residuals[i]);\n            std::vector<double> ind_err = norm2s(world, residuals[i]);\n            auto it = max_element(ind_err.begin(), ind_err.end());\n            const double largest_error = (*it);\n            errors.push_back(av_error);\n            largest_errors.push_back(std::make_pair(std::distance(ind_err.begin(), it), *it));\n            // convergece criteria are the individual functions (orhterwise we have a dependence on the number of functions)\n            if ((*it) > dconv) converged = false;\n            if (fabs(x[i].delta) > econv) converged = false;\n            x[i].current_error = (largest_error);\n        }\n        // update, store old omegas in the deltas vector\n        for (size_t i = 0; i < x.size(); i++) {\n            if (std::fabs(x[i].current_error) > dconv or std::fabs(x[i].delta) > econv or\n                this_is_a_guess_iteration) {\n                vector_real_function_3d new_x0;\n                if (kain) {\n                    new_x0 = solvers[i]->update(x[i].get_vecfunction(), residuals[i], 10.0 * parameters.thresh(), 5.0);\n                } else {\n                    new_x0 = sub(world, x[i].get_vecfunction(), residuals[i]);\n                }\n\n                // Project out the converged roots\n                if (converged_roots.size() > 0) {\n                    vector_real_function_3d bra_new_x0 = make_bra(new_x0);\n                    CCTimer timeP(world, \"project out converged roots\");\n                    for (const auto& it : converged_roots) {\n                        const double overlap = inner(world, it.get_vecfunction(), bra_new_x0).sum();\n                        new_x0 -= overlap * it.get_vecfunction();\n                    }\n                    timeP.print();\n                }\n\n                vector_real_function_3d Q_new_x0 = Q(new_x0);\n                truncate(world, Q_new_x0);\n                x[i].set_functions(Q_new_x0, x[i].type, parameters.freeze());\n\n            } else msg.output(\"Root \" + std::to_string(i) + \" converged\");\n        }\n        symmetrize(x);\n\n        // remove converged roots\n        if (this_is_a_guess_iteration) {\n            // not in the guess iteration\n        } else {\n            std::vector<CC_vecfunction> unconverged_roots;\n            std::vector<std::shared_ptr<XNonlinearSolver<vector_real_function_3d, double, TDHF_allocator> > > corresponding_solvers;\n            for (size_t i = 0; i < x.size(); ++i) {\n                if (x[i].is_converged(econv,dconv)) {\n                    // put converged roots into converged roots and replace it by one of the remaining guess functions\n                    converged_roots.push_back(x[i]);\n                    if (guess_roots.empty()) msg.output(\"Ran out of guess functions\"); // no replacement\n                    else {\n                        // fill the unconverged roots with new guess roots\n                        unconverged_roots.push_back(guess_roots.back());\n                        // allocate a new solver for the new guess function\n                        auto sol = std::make_shared<XNonlinearSolver<vector_real_function_3d, double, TDHF_allocator> >(\n                                TDHF_allocator(world, x[i].size()), true);\n                        sol->set_maxsub(parameters.kain_subspace());\n                        corresponding_solvers.push_back(sol);\n                        // delete the used guess root\n                        guess_roots.pop_back();\n                    }\n                } else {\n                    unconverged_roots.push_back(x[i]);\n                    corresponding_solvers.push_back(solvers[i]);\n                }\n            }\n            x = unconverged_roots;\n            solvers = corresponding_solvers;\n            sort_xfunctions(converged_roots);\n        }\n\n        // for TDHF the potential is always stored\n        if (parameters.store_potential() and y.empty()) V = make_potentials(x);\n        else if (not y.empty()) V = make_tdhf_potentials(x, y);\n        // orthonormalize\n        orthonormalize(x, V);\n\n        // save functions (every 5 iterations)\n        for (size_t i = 0; i < x.size(); i++) x[i].save_restartdata(world, filename_for_roots(i));\n\n        // make plots if demanded\n        if (parameters.plot()) {\n            if (iterate_y)\n                for (size_t i = 0; i < y.size(); i++)\n                    y[i].plot(std::to_string(i) + \"_y_iter_\" + std::to_string(iter) + \"_\");\n            else\n                for (size_t i = 0; i < x.size(); i++)\n                    x[i].plot(std::to_string(i) + \"_iter_\" + std::to_string(iter) + \"_\");\n        }\n        // information\n        msg << std::setfill('-') << std::setw(60) << \"\\n\" << std::setfill(' ');\n        msg << \"Iteration \" << iter << \": omega, largest error, delta, size \" << \"\\n\";\n\n        print_xfunctions(converged_roots, \"===========CONVERGED=ROOTS=====================\");\n        print_xfunctions(x, \"=========NON-CONVERGED=ROOTS====================\");\n\n        msg << std::setfill('-') << std::setw(60) << \"\\n\" << std::setfill(' ');\n\n        timer.stop().print();\n        if (converged) break;\n        if (converged_roots.size() >= size_t(parameters.nexcitations())) break;\n        if (x.empty()) break;\n    }\n    return converged;\n}\n\n\nstd::vector<vector_real_function_3d>\nTDHF::apply_G(std::vector<CC_vecfunction> &x, std::vector<vector_real_function_3d> &V) const {\n\n    std::string msg1 = \"Applying Greens Function to vectors\";\n    if (V.empty()) msg1 += \", with recalculated Potentials\";\n    CCTimer time(world, msg1);\n    std::vector<vector_real_function_3d> result;\n    for (size_t i = 0; i < x.size(); i++) {\n\n        vector_real_function_3d Vi;\n        if (V.empty()) Vi = get_tda_potential(x[i]);\n        else Vi = V[i];\n        double omega = x[i].omega;\n        if (x[i].type == RESPONSE) MADNESS_ASSERT(omega > 0.0);\n        else\n        MADNESS_ASSERT(omega < 0.0);\n        if (x[i].type == UNDEFINED and V.empty()) msg.warning(\"Empty V but x is y state from TDHF\");\n\n        CCTimer time_N(world, \"add nuclear potential\");\n        // the potentials still need the nuclear potential\n        const Nuclear<double,3> V(world, get_reference().get());\n        vector_real_function_3d VNi = V(x[i].get_vecfunction());\n        Vi += VNi;\n        time_N.info(parameters.debug());\n\n        // scale potential\n        scale(world, Vi, -2.0);\n\n        // make bsh operators as pointers in order to apply them in parallel\n        std::vector<std::shared_ptr<SeparatedConvolution<double, 3> > > bsh(x[i].size());\n        for (size_t p = 0; p < bsh.size(); p++) {\n            double eps = get_orbital_energy(p + parameters.freeze()) + omega;\n            // if eps is above zero we have an unbound state (or are early in the iteration) however this needs a shift of the potential\n            // we shift to -0.05 (same as moldft does, no particular reason)\n            if (eps > 0.0) {\n                msg.output(\"potential shift needed for V\" + std::to_string(p + parameters.freeze()));\n                double shift = eps + 0.05;\n                eps = eps - shift;\n                Vi[p] -= (-2.0 * shift * x[i].get_vecfunction()[p]);\n            }\n            if (eps > 0.0) {\n                msg.warning(\"eps is \" + std::to_string(eps) + \"... should not happen ... setting to zero\");\n                eps = -1.0 * parameters.thresh();\n            }\n            MADNESS_ASSERT(not(eps > 0.0));\n            bsh[p] = poperatorT(BSHOperatorPtr3D(world, sqrt(-2.0 * eps), get_calcparam().lo(), parameters.thresh()));\n        }\n        world.gop.fence();\n\n        vector_real_function_3d GV = Q(apply(world, bsh, Vi));\n\n        vector_real_function_3d residual = sub(world, x[i].get_vecfunction(), GV);\n        result.push_back(residual);\n\n//         // Calculate Second Order Energy Update\n//         const vector_real_function_3d bra_GV = make_bra(GV);\n//         {\n//             // Inner product of Vpsi and the residual (Vi is scaled to -2.0 --> multiply later with 0.5)\n//             double tmp = inner(world, make_bra(residual), Vi).sum();\n//             // squared norm of GVpsi (Psi_tilde)\n//             double tmp2 = inner(world, make_bra(GV), GV).sum();\n\n//             // Factor 0.5 removes the factor 2 from the scaling before\n//             //const double sou = (0.5 * tmp / tmp2);\n// //            msg << \"FYI: second order update would be: \" << sou << \" norm after QG is \" << tmp2 << \"\\n\";\n//         }\n        // clear potential\n        Vi.clear();\n    }\n    // clear the potentials\n    V.clear();\n    time.info();\n    return result;\n}\n\nstd::vector<vector_real_function_3d> TDHF::make_potentials(const std::vector<CC_vecfunction> &x) const {\n    CCTimer time(world, \"Make Potentials\");\n    std::vector<vector_real_function_3d> V;\n    for (auto &xi:x) {\n        if (parameters.debug()) msg << std::setfill('-') << std::setw(60) << \"\\n\" << std::setfill(' ');\n        const vector_real_function_3d pot = get_tda_potential(xi);\n        V.push_back(pot);\n        if (parameters.debug()) msg << std::setfill('-') << std::setw(60) << \"\\n\" << std::setfill(' ');\n    }\n    time.info();\n    MADNESS_ASSERT(V.size() == x.size());\n    return V;\n}\n\nvector_real_function_3d TDHF::get_tda_potential(const CC_vecfunction &x) const {\n\n\n    // Occupation numbers\n    const Tensor<double> occ = get_calc()->get_aocc();\n    // Closed shell full density of the nemo orbitals (without any nuclear cusps)\n    const real_function_3d nemo_density = 2.0 * get_reference()->compute_density(mo_ket_.get_vecfunction());\n    // Real Alpha density (with nuclear cusps)\n    const real_function_3d alpha_density = 0.5 * get_reference()->R_square * nemo_density;\n\n\n    // Apply Ground State Potential to x-states\n    vector_real_function_3d Vpsi1;\n    {\n        Fock<double,3> fock(world,get_reference().get());\n        fock.remove_operator(\"T\");\n        fock.remove_operator(\"V\");      // Vnuc is computed elsewhere (why?)\n//        print(\"ground state potential fock operator\",fock.info());\n        Vpsi1=fock(x.get_vecfunction());\n    }\n\n    // Apply the Perturbed Potential to the Active Ground State Orbitals\n    vector_real_function_3d Vpsi2;\n    {\n        // active mo\n        const vector_real_function_3d active_mo = get_active_mo_ket();\n        const vector_real_function_3d active_bra = get_active_mo_bra();\n        // construct perturbed operators\n        CCTimer timeJ(world, \"pXC\");\n        Coulomb<double,3> Jp(world, get_nemo().get());\n        real_function_3d density_pert = 2.0 * get_nemo()->make_density(occ, active_bra, x.get_vecfunction());\n        Jp.potential() = Jp.compute_potential(density_pert);\n\n        vector_real_function_3d XCp = zero_functions<double, 3>(world, get_active_mo_ket().size());\n        if (parameters.response_kernel()!=\"hf\") {\n            // XC Potential\n            const std::string xc_data = parameters.response_kernel();\n            const XCOperator<double,3> xc(world, xc_data, not get_calcparam().spin_restricted(), alpha_density,\n                                alpha_density);\n            // reconstruct the full perturbed density: do not truncate!\n            real_function_3d gamma = xc.apply_xc_kernel(density_pert);\n            XCp = truncate(gamma * active_mo);\n        }\n\n        if (parameters.triplet()) {\n            if (norm2(world, XCp) != 0.0) MADNESS_EXCEPTION(\"Triplets only for CIS\", 1);\n            Vpsi2 = XCp;\n        } else Vpsi2 = Jp(active_mo) + XCp;\n        timeJ.info(parameters.debug());\n        // Exchange Part\n        double hf_coeff = get_calc()->xc.hf_exchange_coefficient();\n        bool do_hf = (hf_coeff != 0.0) and (not parameters.do_oep());\n        if (do_hf) {\n            CCTimer timeK(world, \"pK\");\n            vector_real_function_3d Kp;\n            // summation over all active indices\n            for (const auto& itmp:x.functions) {\n                const size_t i = itmp.first;\n                real_function_3d Ki = real_factory_3d(world);\n                for (const auto& ktmp:x.functions) {\n                    const size_t k = ktmp.first;\n                    Ki += ((*g12)(mo_bra_(k), mo_ket_(i)) * x(k).function).truncate();\n                }\n                Kp.push_back(Ki);\n            }\n            scale(world, Kp, hf_coeff);\n            Vpsi2 = sub(world, Vpsi2, Kp);\n            timeK.info(parameters.debug());\n            truncate(world, Vpsi2);\n        }\n\n\n        // compute the solvent (PCM) contribution to the kernel\n        if (get_nemo()->do_pcm()) {\n            CCTimer timepcm(world, \"pcm:ex\");\n            const real_function_3d vpcm = get_nemo()->get_pcm().compute_pcm_potential(Jp.potential(), true);\n            if (parameters.plot() or parameters.debug()) plot_plane(world, vpcm, \"vpcm_ex\");\n            const vector_real_function_3d pcm_orbitals = vpcm * active_mo;\n            timepcm.info(parameters.debug());\n            Vpsi2 = add(world, Vpsi2, pcm_orbitals);\n        }\n\n        truncate(world, Vpsi2);\n    }\n    // whole tda potential\n    vector_real_function_3d Vpsi = Vpsi1 + Q(Vpsi2);\n    // if the ground state is localized add the coupling terms\n    // canonical: -ei|xi> (part of greens function)\n    // local:  -fik|xk> (fii|xi> part of greens functions, rest needs to be added)\n\n    if (get_calcparam().do_localize()) {\n        const vector_real_function_3d vx = x.get_vecfunction();\n        vector_real_function_3d fock_coupling = madness::transform(world, vx, F_occ);\n        // subtract the diagonal terms\n        for (size_t i = 0; i < fock_coupling.size(); ++i) {\n            fock_coupling[i] = (fock_coupling[i] - F_occ(i, i) * vx[i]);\n        }\n        Vpsi -= fock_coupling;\n    }\n\n\n    truncate(world, Vpsi);\n\n\n\n    // debug output\n    if (parameters.debug() or parameters.plot()) {\n        plot_plane(world, Vpsi, \"Vpsi\");\n        plot_plane(world, Vpsi1, \"Vpsi1\");\n        plot_plane(world, Vpsi2, \"Vpsi2\");\n    }\n\n    return Vpsi;\n\n}\n\nstd::vector<vector_real_function_3d>\nTDHF::make_tdhf_potentials(std::vector<CC_vecfunction> &x, const std::vector<CC_vecfunction> &y) const {\n    MADNESS_EXCEPTION(\"NOT IMPLEMENTED\", 1);\n}\n\n\nvoid TDHF::orthonormalize(std::vector<CC_vecfunction> &x, std::vector<vector_real_function_3d> &V) const {\n    if (x.empty()) return;\n    CCTimer time(world, \"Orthonormalization\");\n\n    // make the overlap matrix\n    Tensor<double> S = make_overlap_matrix(x);\n    if (parameters.debug()) msg << \"The Overlap Matrix\\n \" << S << \"\\n\";\n\n    //make the Hamilton matrix for the vectorfunctions\n    Tensor<double> F = make_perturbed_fock_matrix(x, V);\n\n    // Diagonalize the F Matrix\n    Tensor<double> U, evals;\n    Tensor<double> dummy(x.size());\n    U = get_calc()->get_fock_transformation(world, S, F, evals, dummy, 2.0 * parameters.thresh());\n\n    if (parameters.debug()) {\n        msg << \"Perturbed Fock-Matrix Eigenvalues\\n\";\n        for (int x = 0; x < evals.size(); ++x) msg << evals(x) << \"\\n\";\n    }\n\n    // Transform the states\n    x = transform(x, U);\n\n    // Transform the potentials (if V is empty nothing will happen)\n    V = transform(V, U);\n\n    // assign new energies and  get energy differences\n    for (size_t i = 0; i < x.size(); i++) {\n        const double old_omega = x[i].omega;\n        const double new_omega = evals(i);\n        const double delta = new_omega - old_omega;\n        x[i].omega = new_omega;\n        x[i].delta = delta;\n    }\n\n    time.info();\n}\n\nstd::vector<CC_vecfunction>\nTDHF::transform(const std::vector<CC_vecfunction> &x, const madness::Tensor<double> U) const {\n    std::vector<CC_vecfunction> transformed;\n    for (size_t k = 0; k < x.size(); k++) {\n        vector_real_function_3d new_x = zero_functions_compressed<double, 3>(world, x[k].size());\n        compress(world, x[k].get_vecfunction());\n        for (size_t l = 0; l < x.size(); l++) {\n            // gaxpy(alpha,a,beta,b) -> a[i]=alpha*a[i] + beta*b[i], since there is no += for vectorfunctions implemented\n            gaxpy(world, 1.0, new_x, U(l, k), x[l].get_vecfunction());\n        }\n        CC_vecfunction tmp(x[k]);\n        tmp.set_functions(new_x, tmp.type, parameters.freeze());\n        transformed.push_back(tmp);\n    }\n    MADNESS_ASSERT(transformed.size() == x.size());\n    return transformed;\n\n}\n\nTensor<double> TDHF::make_overlap_matrix(const std::vector<CC_vecfunction> &x) const {\n    CCTimer time(world, \"Make Overlap Matrix\");\n    Tensor<double> S(x.size(), x.size());\n    for (size_t k = 0; k < x.size(); k++) {\n        const vector_real_function_3d kbra = make_bra(x[k]);\n        for (size_t l = 0; l < x.size(); l++) {\n            S(l, k) = inner(world, kbra, x[l].get_vecfunction()).sum();\n        }\n    }\n    time.info();\n    if (parameters.debug())msg << std::fixed << std::setprecision(5) << \"\\nOverlap Matrix\\n\" << S << \"\\n\";\n    return S;\n}\n\nTensor<double> TDHF::make_perturbed_fock_matrix(const std::vector<CC_vecfunction> &x,\n                                                const std::vector<vector_real_function_3d> &V) const {\n    // Make formated timings\n    CCTimer timeF(world, \"Matrix: F\");\n    CCTimer timeT(world, \"Matrix: T+Vn\");\n    CCTimer timeV(world, \"Matrix: V\");\n    CCTimer timeR(world, \"Matrix: e\");\n\n    // bra elements of x\n    std::vector<vector_real_function_3d> xbra;\n\n    {\n        CCTimer time_bra(world, \"Make bra elements\");\n        for (size_t k = 0; k < x.size(); k++) {\n            const vector_real_function_3d xbrak = make_bra(x[k]);\n            xbra.push_back(xbrak);\n        }\n        MADNESS_ASSERT(xbra.size() == x.size());\n        time_bra.info(parameters.debug());\n    }\n\n    timeF.start();\n    Tensor<double> F(x.size(), x.size());\n    {\n        Tensor<double> T(x.size(), x.size());\n        {\n            timeT.start();\n            // gradient operator\n            std::vector<std::shared_ptr<real_derivative_3d> > D = gradient_operator<double, 3>(world);\n\n            real_function_3d Vnuc = get_calc()->potentialmanager->vnuclear();\n            if (not Vnuc.is_initialized()) {\n                msg.output(\"Compute Nuclear Potential\");\n                get_calc()->potentialmanager->make_nuclear_potential(world);\n                Vnuc = get_calc()->potentialmanager->vnuclear();\n            }\n\n            const real_function_3d R = get_reference()->ncf->function();\n            std::vector<vector_real_function_3d> Rx(x.size(), zero_functions<double, 3>(world, x.front().size()));\n            CCTimer timeR(world, \"make Rx\");\n            for (size_t k = 0; k < x.size(); k++) {\n                Rx[k] = mul(world, R, x[k].get_vecfunction(), false);\n            }\n            world.gop.fence();\n            timeR.info(parameters.debug());\n            std::vector<vector_real_function_3d> dx(x.size(), zero_functions<double, 3>(world, x.front().size()));\n            std::vector<vector_real_function_3d> dy(x.size(), zero_functions<double, 3>(world, x.front().size()));\n            std::vector<vector_real_function_3d> dz(x.size(), zero_functions<double, 3>(world, x.front().size()));\n            CCTimer timeD(world, \"make Grad(Rx)\");\n            for (size_t k = 0; k < x.size(); k++) {\n                dx[k] = apply(world, *(D[0]), Rx[k], false);\n                dy[k] = apply(world, *(D[1]), Rx[k], false);\n                dz[k] = apply(world, *(D[2]), Rx[k], false);\n            }\n            world.gop.fence();\n            timeD.info(parameters.debug());\n\n            CCTimer time_mat(world, \"T+V Mat\");\n            for (size_t k = 0; k < x.size(); k++) {\n                const vector_real_function_3d Vxk = mul(world, Vnuc, x[k].get_vecfunction());\n                for (size_t l = 0; l < x.size(); l++) {\n                    T(l, k) = inner(world, xbra[l], Vxk).sum();\n                    T(l, k) += 0.5 * inner(world, dx[l], dx[k]).sum();\n                    T(l, k) += 0.5 * inner(world, dy[l], dy[k]).sum();\n                    T(l, k) += 0.5 * inner(world, dz[l], dz[k]).sum();\n                }\n\n            }\n            time_mat.info(parameters.debug());\n            timeT.stop();\n        }\n        Tensor<double> MV(x.size(), x.size());\n        {\n            timeV.start();\n            bool recompute_V = V.empty();\n            for (size_t k = 0; k < x.size(); k++) {\n                vector_real_function_3d Vk;\n                //if(recompute_V) Vk = CCOPS.get_CIS_potential(x[k]);\n                if (recompute_V) {\n                    msg.output(\"Recompute V\");\n                    Vk = get_tda_potential(x[k]);\n                } else Vk = V[k];\n                for (size_t l = 0; l < x.size(); l++) {\n                    MV(l, k) = inner(world, xbra[l], Vk).sum();\n                }\n            }\n            timeV.stop();\n        }\n\n        // now set the fock matrix together: F(l,k) = T(l,k) + MV(l,k) - eps(l,k)\n        // with eps(l,k) = \\sum_i eps_i <xl_i|xk_i>\n        // first get active eps\n        timeR.start();\n        std::vector<double> eps;\n        for (size_t i = 0; i < mo_ket_.size(); i++) eps.push_back(get_orbital_energy(i));\n        std::vector<double> active_eps;\n        for (size_t i = parameters.freeze(); i < eps.size(); i++) active_eps.push_back(eps[i]);\n        for (size_t k = 0; k < x.size(); k++) {\n            for (size_t l = 0; l < x.size(); l++) {\n                Tensor<double> xlk = inner(world, xbra[l], x[k].get_vecfunction());\n                MADNESS_ASSERT(size_t(xlk.size()) == active_eps.size());\n                double eps_part = 0.0;\n                for (size_t i = 0; i < active_eps.size(); i++) eps_part += xlk(i) * active_eps[i];\n                F(l, k) = T(l, k) + MV(l, k) - eps_part;\n            }\n        }\n        timeR.stop();\n        if (parameters.debug())msg << std::fixed << std::setprecision(5) << \"\\n(T+V) Matrix\\n\" << T << \"\\n\";\n        if (parameters.debug())msg << std::fixed << std::setprecision(5) << \"\\nPotential Matrix\\n\" << MV << \"\\n\";\n        if (parameters.debug())\n            msg << std::fixed << std::setprecision(5) << \"\\nPerturbed Fock Matrix\\n\" << F << \"\\n\";\n    }\n    timeF.stop();\n    if (parameters.debug())msg << std::fixed << std::setprecision(5) << \"\\nPerturbed Fock Matrix\\n\" << F << \"\\n\";\n    //formated timings output\n    timeT.print();\n    timeV.print();\n    timeR.print();\n    timeF.print();\n\n    // symmetryze\n    F = 0.5 * (F + transpose<double>(F));\n    if (parameters.debug())\n        msg << std::fixed << std::setprecision(5) << \"\\nSymmetrized Perturbed Fock Matrix\\n\" << F << \"\\n\";\n\n    return F;\n}\n\nvector_real_function_3d TDHF::make_virtuals() const {\n    CCTimer time(world, \"make virtuals\");\n    // create virtuals\n    vector_real_function_3d virtuals;\n    if (parameters.guess_excitation_operators() == \"external\") {\n        madness::load_function(world, virtuals, \"mybasis\");\n        //virtuals=Q(virtuals);\n        for (auto &x : virtuals) {\n            const double norm = sqrt(inner(make_bra(x), x));\n            x.scale(1.0 / norm);\n        }\n    } else if (parameters.guess_excitation_operators() == \"scf\") {\n        // use the ao basis set from the scf calculations as virtuals (like projected aos)\n        virtuals = (get_calc()->ao);\n        for (auto &x : virtuals) {\n            const double norm = sqrt(inner(make_bra(x), x));\n            x.scale(1.0 / norm);\n        }\n    } else {\n        // create the seeds\n        vector_real_function_3d xmo;\n//        for (size_t i = 0; i < parameters.guess_occ_to_virt(); ++i)\n        for (size_t i = 0; i < get_active_mo_ket().size(); ++i)\n            xmo.push_back(get_active_mo_ket()[get_active_mo_ket().size() - 1 - i]);\n\n        bool use_trigo = true;\n//\t\tif(parameters.generalkeyval.find(\"polynomial_exops\")!=parameters.generalkeyval.end())\n//\t\t\tuse_trigo = (std::stoi(parameters.generalkeyval.find(\"polynomial_exops\")->second)==0);\n        virtuals = apply_excitation_operators(xmo, use_trigo);\n\n    }\n\n    if (parameters.guess_cm() > 0.0) {\n        // add center of mass diffuse functions\n        const double factor = parameters.guess_cm();\n        const double width = (-1.0 * factor / (get_orbital_energy(mo_ket_.size() - 1)));\n        msg.subsection(\"adding center of mass functions with exponent homo/c and c=\" + std::to_string(factor));\n        msg.output(\"width=\" + std::to_string(width));\n\n        Tensor<double> cm = get_calc()->molecule.center_of_mass();\n        msg << \"center of mass is \" << cm << \"\\n\";\n        guessfactory::PolynomialFunctor px(\"x 1.0\", width, cm);\n        guessfactory::PolynomialFunctor py(\"y 1.0\", width, cm);\n        guessfactory::PolynomialFunctor pz(\"z 1.0\", width, cm);\n        guessfactory::GaussFunctor s(width, cm);\n        real_function_3d vpx = real_factory_3d(world).functor(px);\n        real_function_3d vpy = real_factory_3d(world).functor(py);\n        real_function_3d vpz = real_factory_3d(world).functor(pz);\n        real_function_3d vs = real_factory_3d(world).functor(s);\n        virtuals.push_back(vpx);\n        virtuals.push_back(vpy);\n        virtuals.push_back(vpz);\n        virtuals.push_back(vs);\n    }\n    if (world.rank() == 0)\n        msg << virtuals.size() << \" virtuals\\n\";\n\n    plot(virtuals, \"virtuals\");\n    CCTimer timerQ(world, \"virt=Qvirt\");\n    virtuals = Q(virtuals);\n    timerQ.print();\n    plot(virtuals, \"Qvirtuals\");\n\n    if (parameters.debug()) {\n        for (const auto &x : virtuals)\n            x.print_size(\"virtual\");\n    }\n    world.gop.fence();\n    time.print();\n    return virtuals;\n}\n\nvector_real_function_3d\nTDHF::apply_excitation_operators(const vector_real_function_3d &seed, const bool &use_trigo) const {\n    //const int nvirt = seed.size() * ((2 * order * 2 * order * 2 * order) - 1);\n    //\tmsg.subsection(\"creating a set of \" + std::to_string(nvirt) + \" virtuals by multiplying functions with plane waves\");\n    // compute the centers of the seed functions\n    CCTimer time_centers(world, \"compute centers\");\n    std::vector<coord_3d> centers = guessfactory::compute_centroids(seed);\n    time_centers.print();\n\n\n    // prepare the list of excitation operators and copied seeds\n    CCTimer time_init_exop(world, \"initialize excitation operators\");\n    std::vector<std::pair<vector_real_function_3d, std::string> > exlist;\n    {\n        std::vector<std::string> exop_strings = parameters.exops();\n        if (parameters.guess_excitation_operators() != \"custom\")\n            exop_strings = (guessfactory::make_predefined_exop_strings(parameters.guess_excitation_operators()));\n        for (const auto& ex: exop_strings) {\n            vector_real_function_3d cseed = copy(world, seed, false);\n            exlist.push_back(std::make_pair(cseed, ex));\n        }\n    }\n    world.gop.fence();\n    time_init_exop.print();\n    msg << \"will create \" << exlist.size() * seed.size() << \" virtuals, from \" << seed.size() << \" seeds and \"\n        << exlist.size() << \" excitation operators\" << \" \\n\";\n\n    // create the virtuals by unary operations: multiply excitation operators with seeds\n    CCTimer time_create_virtuals(world, \"create virtuals\");\n    vector_real_function_3d virtuals;\n    for (auto it:exlist) {\n        if (use_trigo)\n            virtuals = append(virtuals, guessfactory::apply_trigonometric_exop(it.first, it.second, centers,\n                                                                               false));\n        else virtuals = append(virtuals, guessfactory::apply_polynomial_exop(it.first, it.second, centers, false));\n    }\n    world.gop.fence();\n    time_create_virtuals.print();\n\n    return virtuals;\n\n}\n\n/// make the initial guess by explicitly diagonalizing a CIS matrix with virtuals from the make_virtuals routine\nvector<CC_vecfunction> TDHF::make_guess_from_initial_diagonalization() const {\n    CCTimer time(world, \"make_guess_from_initial_diagonalization\");\n    //convenience\n    const int nact = get_active_mo_ket().size();\n\n    // create virtuals\n    vector_real_function_3d virtuals = make_virtuals();\n    // remove linear dependencies\n    CCTimer time_ortho(world, \"rr-cholesky orthonormalization\");\n    const size_t spre = virtuals.size();\n    Tensor<double> S = matrix_inner(world, make_bra(virtuals), virtuals);\n    virtuals = orthonormalize_rrcd(virtuals,S, 1.e-6);\n    if (virtuals.size() != spre)\n        msg << \"removed \" << spre - virtuals.size() << \" virtuals due to linear dependencies \\n\";\n    time_ortho.print();\n\n    // project virtuals onto irreps\n    std::vector<std::string> virtual_irreps;\n    projector_irrep proj = projector_irrep(symmetry_projector).set_verbosity(0).set_lindep(1.e-1);\n    virtuals = proj(virtuals, get_reference()->R_square, virtual_irreps);\n\n    // re-orthonormalize virtuals (seems to improve numerical stability in the canonicalization step below)\n    get_reference()->orthonormalize(virtuals,get_reference()->R);\n    virtuals = proj(virtuals, get_reference()->R_square, virtual_irreps);\n    if (world.rank() == 0) print(\"final number of virtuals\", virtuals.size());\n\n    // determine the symmetry of the occupied and virtual orbitals\n    std::vector<std::string> orbital_irreps;\n    proj(get_active_mo_ket(), get_reference()->R_square, orbital_irreps);\n\n    // canonicalize virtuals\n    Tensor<double> veps;    // orbital energies of the virtuals\n    virtuals = canonicalize(virtuals, veps);\n\n    // make sure the virtual orbital energies are higher than the occupied orbtials\n    double vmin = veps.min();\n    double omax = get_calc()->aeps.max();\n    if (vmin < omax) {\n        veps += (omax - vmin);\n        if (world.rank() == 0) print(\"shifting guess virtual energies by \", omax - vmin + 1.e-1);\n    }\n\n    // compute the CIS matrix\n    Tensor<double> MCIS = make_cis_matrix(virtuals, veps);\n\n    // zero out all non-contributing irreps\n    if (parameters.irrep() != \"all\") {\n        int I = 0;\n        for (auto oirrep1 : orbital_irreps) {\n            for (auto virrep1 : virtual_irreps) {\n                if (not(proj.reduce(oirrep1, virrep1)[0] == parameters.irrep())) {\n                    MCIS(I, _) = 0.0;\n                    MCIS(_, I) = 0.0;\n                }\n                I++;\n            }\n        }\n    }\n\n    // initialize the guess functions\n    if (world.rank() == 0 && size_t(MCIS.dim(0)) < parameters.guess_excitations()) {\n        msg.warning(std::to_string(parameters.guess_excitations())\n                    + \" guess vectors where demanded, but with the given options only \"\n                    + std::to_string(MCIS.dim(0)) + \" can be created\\n\");\n    }\n\n    const int nvirt = virtuals.size();\n    auto get_com_idx = [nvirt](int i, int a) {\n        return i * nvirt + a;\n    };\n    auto get_vir_idx = [nvirt](int I) {\n        return I % nvirt;\n    };\n    auto get_occ_idx = [nvirt](int I) {\n        return I / nvirt;\n    };\n\n\n    // find all contributing ia/jb elements for the requested irrep -- needs to be improved..\n    std::vector<int> II;\n    for (size_t i = 0; i < orbital_irreps.size(); ++i) {\n        for (size_t a = 0; a < virtual_irreps.size(); ++a) {\n            if (proj.reduce(orbital_irreps[i], virtual_irreps[a])[0] == parameters.irrep())\n                II.push_back(get_com_idx(i, a));\n        }\n    }\n    std::vector<CC_vecfunction> xfunctions;\n    for (size_t x = 0; x < size_t(MCIS.dim(0)); ++x) {\n        if (x >= parameters.guess_excitations())\n            break;\n\n        CC_vecfunction init(zero_functions<double, 3>(world, nact), RESPONSE, parameters.freeze());\n        xfunctions.push_back(init);\n    }\n    {\n        Tensor<double> U, evals;\n        CCTimer time_diag(world, \"cis-matrix diagonalization\");\n        syev(MCIS, U, evals);\n        Localizer::undo_degenerate_rotations(U,evals,FunctionDefaults<3>::get_thresh());\n\n        time_diag.print();\n\n        if (parameters.debug()) {\n            msg << \"Initial Diagonalization of CIS Matrix:\\n Lowest Eigenvalues are \\n\";\n            for (int x = 0; x < std::max(std::min(evals.size(), 10l), long(parameters.guess_excitations())); ++x)\n                msg << evals(x) << \"\\n\";\n        }\n\n        CCTimer time_assemble(world, \"assemble guess vectors\");\n        // make x functions from amplitudes and virtuals\n        // todo: probably not optimal for highly parallel applications\n        int iexcitation = 0;\n        for (int I = 0; I < MCIS.dim(0); ++I) {\n            if (size_t(iexcitation) >= parameters.guess_excitations()) break;\n\n            //const int a = get_vir_idx(I);\n            //const int i = get_occ_idx(I);\n            if (evals(I) < 0.0 && world.rank() == 0)\n                msg.warning(\"NEGATIVE EIGENVALUE IN INITIAL DIAGONALIZATION: CHECK YOUR REFERENCE!\\n\");\n\n            if (evals(I) < 1.e-5) {\n                if (parameters.debug()) msg << \"skipping root \" << evals(I) << \" \\n\";\n                continue;\n            }\n\n            xfunctions[iexcitation].omega = evals(I);\n\n            for (int J = 0; J < MCIS.dim(1); ++J) {\n\n                const int b = get_vir_idx(J);\n                const int j = get_occ_idx(J);\n                const double xjb = U(J, I);\n                xfunctions[iexcitation].get_vecfunction()[j] += xjb * virtuals[b];\n            }\n            std::vector<std::string> x_irreps;\n            vector_real_function_3d tmp = proj(xfunctions[iexcitation].get_vecfunction(), get_reference()->R_square, x_irreps);\n\n            iexcitation++;\n        }\n        time_assemble.print();\n        CCTimer time_truncate(world, \"truncate guess\");\n        for (auto &x : xfunctions) {\n            vector_real_function_3d tmp = x.get_vecfunction();\n            truncate(world, tmp, parameters.thresh());\n            // should be truncated by shallow copy anyways ... but just to be sure\n            x.set_functions(tmp, x.type, parameters.freeze());\n        }\n        time_truncate.print();\n\n        CCTimer time_symmetrize(world, \"symmetrize guess\");\n        for (auto &x : xfunctions) {\n            std::vector<std::string> x_irreps;\n            vector_real_function_3d tmp = proj(x.get_vecfunction(), get_reference()->R_square, x_irreps);\n            try {\n                x.set_functions(tmp, RESPONSE, parameters.freeze());\n                for (size_t i = 0; i < x_irreps.size(); ++i) {\n                    std::string reduced = symmetry_projector.reduce(x_irreps[i], orbital_irreps[i])[0];\n                    if (not((reduced == x.irrep) or (reduced == \"null\") or (x.irrep == \"null\"))) {\n                        print(\"reduced, irrep\", reduced, x.irrep);\n                        MADNESS_EXCEPTION(\"inconsistent symmetry in x vector\\n\\n\", 0);\n                    }\n                    if (reduced != \"null\") x.irrep = reduced;\n                }\n            } catch (...) {\n                if (world.rank()==0) {\n                    print_header1(\"error\");\n                    print(\"if you are here, there is likely a problem with the CIS guess, where degenerate states\");\n                    print(\"of different irreps may mix and mess up the symmetry determination\");\n                    print(\"This needs to be fixed, for now just run the same calculation again with fingers crossed\");\n                    print(\"\\nx_irreps\");\n                    print(x_irreps);\n                    print(\"\\n\");\n                }\n                MADNESS_EXCEPTION(\"inconsistent symmetry in x vector\\n\\n\", 0);\n            }\n        }\n        time_symmetrize.print();\n\n    }\n    if (parameters.debug()) {\n        Tensor<double> S = make_overlap_matrix(xfunctions);\n\n        msg << \"Overlap matrix of guess:\\n\" << S << \"\\n\";\n    }\n    print_xfunctions(xfunctions, \"\");\n    msg << \"created \" << xfunctions.size() << \" guess vectors\\n\";\n\n    time.print();\n    return xfunctions;\n}\n\n/// canonicalize a set of orbitals (here the virtuals for the guess)\n\n/// @param[out]\tveps\torbital energies of the virtuals\nvector_real_function_3d TDHF::canonicalize(const vector_real_function_3d &v, Tensor<double> &veps) const {\n    CCTimer time(world, \"canonicalize\");\n\n    Fock<double,3> F(world, get_reference().get());\n    const vector_real_function_3d vbra = make_bra(v);\n    Tensor<double> Fmat = F(vbra, v);\n\n    Tensor<double> S = matrix_inner(world, vbra, v);\n    Tensor<double> occ(v.size());\n    occ = 1.0;\n    if (parameters.debug())\n        msg << \"Canonicalize: Fock Matrix\\n\" << Fmat(Slice(0, std::min(10, int(v.size())) - 1),\n                                                     Slice(0, std::min(10, int(v.size())) - 1));\n    if (parameters.debug())\n        msg << \"Canonicalize: Overlap Matrix\\n\" << S(Slice(0, std::min(10, int(v.size())) - 1),\n                                                     Slice(0, std::min(10, int(v.size())) - 1));\n    Tensor<double> U = get_calc()->get_fock_transformation(world, S, Fmat, veps, occ,1.e-3);\n\n    vector_real_function_3d result = madness::transform(world, v, U);\n    time.print();\n    return result;\n}\n\n/// compute the CIS matrix for a given set of virtuals\nTensor<double> TDHF::make_cis_matrix(const vector_real_function_3d& virtuals,\n                                     const Tensor<double> &veps) const {\n\n    CCTimer time_cis(world, \"make CIS matrix\");\n\n    // the cis matrix is indexed by ij and ab\n    // we will use the combined indixes from ia and jb named I and J\n    // in order to not be confused we use the following helper functions\n    const int nocc = get_active_mo_ket().size();\n    // determines for which orbitals (couting from the HOMO downwards) the off-diagonal elements will be computed\n    // this simplifies the guess\n//    int active_guess_orbitals = parameters.guess_active_orbitals();\n    int active_guess_orbitals = get_active_mo_bra().size();\n    const int nvirt = virtuals.size();\n    auto get_com_idx = [nvirt](int i, int a) { return i * nvirt + a; };\n    auto get_vir_idx = [nvirt](int I) { return I % nvirt; };\n    auto get_occ_idx = [nvirt](int I) { return I / nvirt; };\n    auto delta = [](int x, int y) { if (x == y) return 1; else return 0; };\n\n\n    const int dim = (virtuals.size() * nocc);\n    msg << \"CIS-Matrix for guess calculation will be of size \" << dim << \"x\" << dim << \"\\n\";\n    // the number of the matrix where elements which are not determined by orbital energies and the fock matrix are computed (controlled over active_guess_orbitals parameter)\n    const int dim2 = (virtuals.size() * active_guess_orbitals);\n    if (dim2 < dim)\n        msg << \"Effective size through neglect of some orbitals will be: \" << dim2 << \"x\" << dim2 << \"\\n\";\n    const int start_ij = nocc - active_guess_orbitals;\n    Tensor<double> MCIS(dim, dim);\n\n    // make CIS matrix\n    // first do the \"diagonal\" entries\n    if (get_calcparam().do_localize()) {\n\n        // make bra elements\n        const vector_real_function_3d virtuals_bra = make_bra(virtuals);\n\n        // make Fock Matrix of virtuals for diagonal elements\n        Fock<double,3> F(world, get_reference().get());\n        Tensor<double> Fmat = F(virtuals_bra, virtuals);\n\n        if (parameters.debug()) {\n            const int dim = std::min(10, int(virtuals.size()));\n            msg << \"Debug Part of Virtual Fock Matrix\\n\" << Fmat(Slice(0, dim - 1), Slice(0, dim - 1)) << \"\\n\";\n\n            Tensor<double> S = matrix_inner(world, virtuals_bra, virtuals);\n            msg << \"Debug Overlap of virtuals\\n\" << S(Slice(0, dim - 1), Slice(0, dim - 1)) << \"\\n\";\n        }\n\n        Tensor<double> Focc = F(get_active_mo_bra(), get_active_mo_ket());\n        for (int I = 0; I < dim; ++I) {\n            const int a = get_vir_idx(I);\n            const int i = get_occ_idx(I);\n            for (int J = 0; J < dim; ++J) {\n                const int b = get_vir_idx(J);\n                const int j = get_occ_idx(J);\n                MCIS(I, J) = Fmat(a, b) * delta(i, j) - Focc(i, j) * delta(a, b);\n            }\n        }\n\n    } else {    // canonical case with virtual orbital energies only\n        for (int I = 0; I < dim; ++I) {\n            const int a = get_vir_idx(I);\n            const int i = get_occ_idx(I);\n            MCIS(I, I) = veps(a) - get_orbital_energy(i + parameters.freeze());\n        }\n    }\n\n    if (not parameters.guess_diag()) {\n        const vector_real_function_3d virtuals_bra = make_bra(virtuals);\n\n        bool is_dft=(get_calc()->xc.is_dft()) or (parameters.do_oep());\n        if (not is_dft) {\n            int I = -1; // combined index from i and a, start is -1 so that initial value is 0 (not so important anymore since I dont use ++I)\n            for (size_t i = start_ij; i < get_active_mo_ket().size(); ++i) {\n                const real_function_3d brai = get_active_mo_bra()[i];\n                const vector_real_function_3d igv = (*g12)(brai * virtuals);\n                for (size_t a = 0; a < virtuals.size(); ++a) {\n                    I = get_com_idx(i, a);\n                    int J = -1;\n                    for (size_t j = start_ij; j < get_active_mo_ket().size(); ++j) {\n                        const real_function_3d braj = get_active_mo_bra()[j];\n                        for (size_t b = 0; b < virtuals.size(); ++b) {\n                            J = get_com_idx(j, b);\n                            if (J <= I) {\n                                const real_function_3d igj = (*g12)(mo_bra_(i + parameters.freeze()), mo_ket_(j +\n                                                                                                              parameters.freeze())); // use exchange intermediate\n                                const double rIJ = 2.0 * inner(braj * virtuals[b], igv[a]) -\n                                                   inner(virtuals_bra[a] * virtuals[b], igj);\n                                MCIS(J, I) += rIJ;\n                                MCIS(I, J) += rIJ;\n                            }\n                        }\n                    }\n                }\n            }\n        } else { // is_dft\n\n            std::string xc_data= (parameters.do_oep()) ? \"lda_x\" : get_calcparam().xc();\n            real_function_3d alpha_density=get_reference()->compute_density(mo_bra_.get_vecfunction());\n\n            const XCOperator<double,3> xc(world, xc_data, not get_calcparam().spin_restricted(),\n                                              alpha_density, alpha_density);\n//                real_function_3d gamma = xc.apply_xc_kernel(density_pert);\n//                vector_real_function_3d XCp = truncate(gamma * active_mo);\n//                Vpsi2 = Vpsi2 + XCp;\n            std::vector<real_function_3d> ia_func(dim);\n            for (int ia=0; ia<dim; ++ia) {\n                int i=get_occ_idx(ia);\n                int a=get_vir_idx(ia);\n                ia_func[ia]=get_active_mo_bra()[i]*virtuals[a];\n            }\n            for (int ia=0; ia<dim; ++ia) {\n\n                // make g | ia )  (Mullikan notation)\n                const real_function_3d igv = (*g12)(ia_func[ia]);\n                for (int jb=ia; jb<dim; ++jb) {\n\n                    const double coulomb=2.0*inner(ia_func[jb],igv);\n                    const double exchange=inner(ia_func[ia],xc.apply_xc_kernel(ia_func[jb]));\n                    MCIS(ia,jb)+= coulomb;\n                    MCIS(jb,ia)+= exchange;\n                }\n            }\n        }\n    }\n    if (parameters.debug()) {\n        int sdim = std::min(int(MCIS.dim(0)), 10);\n        msg << \"Part of the CIS Matrix:\\n\" << MCIS(Slice(dim - sdim, -1), Slice(dim - sdim, -1)) << \"\\n\";\n        if (parameters.debug()) msg << \"Debug: Full CIS Matrix:\\n\" << MCIS << \"\\n\";\n    }\n\n    // test if symmetric\n    if (parameters.debug()) {\n        const double symm_norm = (MCIS - transpose(MCIS)).normf();\n        msg << \"Hermiticity of CIS Matrix:\\n\" << \"||MCIS-transpose(MCIS)||=\" << symm_norm << \"\\n\";\n\n        if (symm_norm > 1.e-4) {\n            long sliced_dim = 8;\n            if (8 > MCIS.dim(0l))\n                sliced_dim = MCIS.dim(0l);\n\n            msg << \"first \" << sliced_dim << \"x\" << sliced_dim << \" block of MCIS Matrix\\n\"\n                << MCIS(_, Slice(sliced_dim - 1, sliced_dim - 1));\n        }\n    }\n    time_cis.info();\n\n    return MCIS;\n}\n\n\n/// compute the oscillator strength in the length representation\n\n/// the oscillator strength is given by\n/// \\f[\n/// f = 2/3 * \\omega |<x | \\vec \\mu | i >| ^2 * 2\n/// \\f]\n/// where \\f$ x \\f$ is the excited state, and \\f$ i \\f$ is the ground state\n/// @param[in]  root    a converged root\ndouble TDHF::oscillator_strength_length(const CC_vecfunction &x) const {\n    Tensor<double> mu_if(3);\n    for (int idim = 0; idim < 3; idim++) {\n        real_function_3d ri = real_factory_3d(world).functor(guessfactory::PolynomialFunctor(idim));\n        vector_real_function_3d amo_times_x = ri * get_active_mo_bra();\n        Tensor<double> a = inner(world, amo_times_x, x.get_vecfunction());\n        mu_if(idim) = a.sum();\n    }\n    const double f = 2.0 / 3.0 * x.omega * mu_if.sumsq() * 2.0;\n    return f;\n}\n\n/// compute the oscillator strength in the velocity representation\n\n/// the oscillator strength is given by\n/// \\f[\n/// f = 2/(3 * \\omega) |<x | \\vec p | i >| ^2 * 2\n/// \\f]\n/// where \\f$ x \\f$ is the excited state, and \\f$ i \\f$ is the ground state\n/// @param[in]  root    a converged root\ndouble TDHF::oscillator_strength_velocity(const CC_vecfunction &x) const {\n    Tensor<double> p_if(3);\n    // compute the derivatives of the MOs in all 3 directions\n    const vector_real_function_3d Rroot = get_reference()->R * x.get_vecfunction();\n    const vector_real_function_3d Rnemo = get_reference()->R * get_active_mo_ket();\n\n    for (int idim = 0; idim < 3; idim++) {\n        real_derivative_3d D = free_space_derivative<double, 3>(world, idim);\n        vector_real_function_3d Damo = apply(world, D, Rnemo);\n        Tensor<double> a = inner(world, Damo, Rroot);\n        p_if(idim) = a.sum();\n    }\n    const double f = 2.0 / (3.0 * x.omega) * p_if.sumsq() * 2.0;\n    return f;\n}\n\n\n/// analyze the root: oscillator strength and contributions from occ\nnlohmann::json TDHF::analyze(const std::vector<CC_vecfunction> &x) const {\n\n    const size_t noct = get_active_mo_ket().size();\n    nlohmann::json j;\n    int counter=0;\n\n    for (const CC_vecfunction &root : x) {\n\n        const vector_real_function_3d Rroot =\n                get_reference()->R * root.get_vecfunction(); // reintroduce the nuclear correlation factor\n        std::vector<double> norms = norm2s(world, Rroot);\n\n        // compute the oscillator strengths and dominant contributions\n        double osl = this->oscillator_strength_length(root);\n        double osv = this->oscillator_strength_velocity(root);\n\n        msg << std::scientific << std::setprecision(10) << std::setw(20);\n\n        msg << \"excitation energy for root \"\n            << std::fixed << std::setprecision(1) << counter++ << \": \"\n            << std::fixed << std::setprecision(10) << root.omega << \" Eh         \"\n            << root.omega * constants::hartree_electron_volt_relationship << \" eV   \"\n            << \"irrep: \" << root.irrep << \"\\n\";\n        msg << std::scientific;\n        if (world.rank() == 0)print(\"  oscillator strength (length)    \", osl);\n        if (world.rank() == 0)print(\"  oscillator strength (velocity)  \", osv);\n        // print out the most important amplitudes\n        if (world.rank() == 0)print(\"  dominant contributions \");\n\n        for (std::size_t p = 0; p < noct; ++p) {\n            const double amplitude = norms[p] * norms[p];\n            if ((amplitude > 0.1)) {\n                msg << \"    norm(x_\" << p + parameters.freeze() << \") **2  \";\n                std::cout.width(10);\n                std::cout.precision(6);\n                msg << amplitude << \"\\n\";\n            }\n        }\n        if (world.rank() == 0) print(\" \");\n        j.push_back(root);\n        j.back()[\"oscillator_strength_length\"]=osl;\n        j.back()[\"oscillator_strength_velocity\"]=osv;\n    }\n\n    nlohmann::json j1;\n    j1[\"excitations\"]=j;\n    if (world.rank()==0) update_schema(get_calc()->param.prefix()+\".calc_info\", j1);\n\n\n    // compute the transition densities\n    const vector_real_function_3d bra_oct = get_active_mo_bra();\n    for (std::size_t i = 0; i < x.size(); ++i) {\n        const vector_real_function_3d root = x[i].get_vecfunction();\n        const real_function_3d td = dot(world, root, bra_oct);\n        const double trace = td.trace();\n        if (world.rank() == 0) print(\"trace over transition density\", i, trace);\n        save(td, \"transition_density_\" + std::to_string(i));\n    }\n    j1[\"model\"]=\"cis\";\n    j1[\"nfreeze\"]= parameters.freeze();\n    return j1;\n}\n\n/// auto assigns all parameters which where not explicitly given and which depend on other parameters of the reference calculation\n//void TDHF::TDHFParameters::complete_with_defaults(const std::shared_ptr<SCF>& scf) {\nvoid TDHFParameters::set_derived_values(const std::shared_ptr<SCF> &scf) {\n    //  double thresh=FunctionDefaults<3>::get_thresh();\n\n    set_derived_value(\"econv\", scf->param.econv());\n    set_derived_value(\"dconv\", sqrt(get<double>(\"econv\")) * 0.1);\n    set_derived_value(\"guess_econv\", econv() * 10.0);\n    set_derived_value(\"guess_dconv\", dconv() * 10.0);\n\n    set_derived_value(\"iterating_excitations\", std::min(nexcitations(), std::size_t(4)));\n    set_derived_value(\"guess_excitations\", std::min(nexcitations() + iterating_excitations(), 2 * nexcitations()));\n\n    set_derived_value(\"response_kernel\", scf->param.xc());\n    if (do_oep()) set_derived_value(\"response_kernel\",std::string(\"lda_x\"));\n//    set_derived_value(\"guess_occ_to_virt\", scf->amo.size() - freeze());\n//    set_derived_value(\"guess_active_orbitals\", scf->amo.size() - freeze());\n}\n\n/// check consistency of the input parameters\nvoid TDHF::check_consistency() const {\n\n    // check if the requested irrep is present in the computational point group\n    const std::vector<std::string> irreps = get_symmetry_projector().get_table().mullikan_;\n    if (find(irreps.begin(), irreps.end(), parameters.irrep()) == irreps.end()\n        and (parameters.irrep() != \"all\")) {\n        print(\"irrep \", parameters.irrep(), \" is not contained in point group \",\n              get_symmetry_projector().get_table().schoenflies_, \"\\n\\n\");\n        MADNESS_EXCEPTION(\"\\ninconsistent input parameters\\n\\n\", 1);\n    }\n}\n\nint TDHF::test(World &world, commandlineparser& parser) {\n\n    // write the input file\n    parser.set_keyval(\"input\",\"bla\");\n    std::string input = parser.value(\"input\");\n    std::ofstream of(input.c_str());\n    CalculationParameters scfparam;\n    scfparam.set_user_defined_value(\"econv\", 1.e-3);\n    TDHFParameters cisparam;\n    write_test_input::write_to_test_input(\"dft\", &scfparam, of);\n    write_test_input::write_to_test_input(\"response\", &cisparam, of);\n    write_test_input::write_molecule_to_test_input(\"lih\", of);\n    of.close();\n\n\n    // construct TDHF class\n    TDHF tdhf(world, parser);\n    tdhf.get_calcparam().print(\"dft\");\n    tdhf.parameters.print(\"response\");\n\n\n    // Compute MRA-CIS\n\n    // solve the CIS equations\n    const double time_scf_start = wall_time();\n    tdhf.prepare_calculation();\n    const double time_scf_end = wall_time();\n    if (world.rank() == 0) printf(\" at time %.1f\\n\", wall_time());\n\n    const double time_cis_start = wall_time();\n    std::vector<CC_vecfunction> roots = tdhf.solve_cis();\n    const double time_cis_end = wall_time();\n    if (world.rank() == 0) printf(\" at time %.1f\\n\", wall_time());\n\n    // check result\n    int error = 0;\n    if (std::abs(roots[0].omega - 1.2893418409e-01) > 1.e-5) error++;\n\n    if (world.rank() == 0) {\n        std::cout << std::setfill(' ');\n        std::cout << \"\\n\\n\\n\";\n        std::cout << \"--------------------------------------------------\\n\";\n        std::cout << \"MRA-CIS ended \\n\";\n        std::cout << \"--------------------------------------------------\\n\";\n        std::cout << std::setw(25) << \"time scf\" << \" = \" << time_scf_end - time_scf_start << \"\\n\";\n        std::cout << std::setw(25) << \"time cis\" << \" = \" << time_cis_end - time_cis_start << \"\\n\";\n        std::cout << \"--------------------------------------------------\\n\";\n    }\n    tdhf.analyze(roots);\n    std::remove(input.c_str());\n    if (error == 0) print(\"\\n\\nCIS test passed\\n\\n\");\n    if (error != 0) print(\"\\n\\nCIS test failed\\n\\n\");\n    return error;\n\n}\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/TDHF.h",
    "content": "/*\n * TDHF.h\n *\n *  Created on: Aug 11, 2016\n *      Author: kottmanj\n */\n\n#ifndef SRC_APPS_CHEM_TDHF_H_\n#define SRC_APPS_CHEM_TDHF_H_\n\n#include<madness/chem/CCStructures.h>\n#include<madness/chem/nemo.h>\n#include<madness/chem/MolecularOrbitals.h>\n#include<madness/chem/projector.h>\n#include<madness/chem/SCFOperators.h>\n#include <math.h>\n#include<madness/chem/GuessFactory.h>\n#include\"madness/mra/commandlineparser.h\"\n\n\nnamespace madness {\n    /// the TDHF parameter class\n    struct TDHFParameters : public QCCalculationParametersBase {\n\n        static constexpr char const *tag = \"tdhf\";\n\n        TDHFParameters() {\n            initialize_all();\n        }\n\n        TDHFParameters(const TDHFParameters &other) = default;\n\n        /// todo: read_from_file compatible with dist. memory computation\n        TDHFParameters(World &world, const commandlineparser& parser) {\n            initialize_all();\n            read_input_and_commandline_options(world, parser, tag);\n        }\n\n        std::string get_tag() const override {\n            return std::string(tag);\n        }\n\n\n        void initialize_all() {\n\n            // MRA stuff\n            initialize < double > (\"thresh\", 1.e-5);\n            initialize < double > (\"econv\", 1.e-5);\n            initialize < double > (\"dconv\", 1.e-4);\n\n            // physics\n            initialize < std::string >\n            (\"calculation\", \"cis\", \"currently only cis=tda possible, TBD: thdf\", {\"cis\"});\n            initialize < std::string >\n            (\"response_kernel\", \"default\", \"default: corresponds to the ground state, libxc-notation otherwise\");\n            initialize < bool > (\"triplet\", false, \"calculate triplet excitation energies (only works for CIS)\");\n            initialize < bool > (\"do_oep\", false, \"use OEP potentials for the ground state exchange\");\n            initialize < std::size_t > (\"nexcitations\", 1,\"number of excitation to be computed\");\n            initialize < long > (\"freeze\", -1, \"the number of frozen occupied orbitals (-1: automatic)\");\n            initialize < std::string > (\"irrep\", \"all\", \"compute only irreps of the respective point group\");\n\n            // solver\n            initialize < size_t > (\"maxiter\", 25, \"maximum number of iterations in the final iterations\");\n            initialize < std::size_t >\n            (\"kain_subspace\", 8, \"use kain (kain subspace<=0 == no kain, kain_subspace==1 should have the same effect)\");\n\n            // guess\n            initialize < double > (\"guess_econv\", 1.e-4);\n            initialize < double > (\"guess_dconv\", 1.e-3);\n            initialize < std::size_t > (\"iterating_excitations\", 2);\n            initialize < std::size_t > (\"guess_excitations\", 4);\n            initialize < std::size_t > (\"guess_occ_to_virt\", 5);\n            initialize < double >\n            (\"damping_width\", 0.0, \"every exop is multiplied with e^(-exponent*r2) to avoid noise at the boundaries\");\n\n            initialize < bool > (\"debug\", false);\n            initialize < bool > (\"plot\", false);\n//            initialize < bool > (\"no_compute\", false);\n            initialize<int>  (\"print_level\",3,\"0: no output; 1: final energy; 2: iterations; 3: timings; 10: debug\");\n\n//            initialize <std::vector<size_t>> (\"restart\", std::vector<size_t>(), \"excitations which will be read from disk\");\n            initialize <std::string> (\"restart\", \"iterate\", \"restart excitations from disk\", {\"no_restart\",\"iterate\",\"no_compute\"});\n            initialize <std::vector<size_t>> (\"excitations\", std::vector<size_t>(), \"ordering of the excitations read from disk\");\n\n\n            initialize < std::string >\n            (\"guess_excitation_operators\", \"quadrupole\", \"guess type\", {\"dipole+\", \"quadrupole\", \"octopole\", \"custom\"});\n\n            /// add center of mass functions determined by the homo-energy\n            /// will add s,px,py,pz functions in the center of mass with exponent: -(e_homo/c) and c=guess_cm is the value of this parameter\n            initialize < double >\n            (\"guess_cm\", 2.0, \"center-of-mass functions, s/p shell with exponent -(e_homo/c)\");\n\n            /// use the diagonal approximation for the guess (only e_a -e_i terms in CIS matrix)\n            /// much faster\n            initialize < bool >\n            (\"guess_diag\", true, \"use the diagonal approximation for the guess (only e_a -e_i terms in CIS matrix)\");\n\n            /// determine active orbitals in guess (for all inactive orbitals only the diagonal  e_a-e_i term is computed in the guess\n            /// guess_active_orbitals=0 is the same as guess_diag\n            initialize < std::size_t >\n            (\"guess_active_orbitals\", 0, \"determine active orbitals in guess (for all inactive orbitals only the diagonal  e_a-e_i term is computed in the guess\");\n\n\n            initialize < bool >\n            (\"store_potential\", true, \"store the potential for orthogonalizations or recalculate it\");\n\n            initialize < size_t > (\"guess_maxiter\", 5, \"maximum number of guess iterations \");\n\n            //\t\t/// determine how the virtuals for the guess are constructed: scf, external, custom, dipole, quadrupole\n            //\t\t/// scf: read in the ao set from scf (scales with system size)\n            //\t\t/// external: read in virtuals from disk\n            //\t\t/// custom or predefined strings like dipole, dipole+, ... : create virtuals form occupied orbitals by multiplying with polynomials\n            //\t\t/// |v> = |occ>*poly\n            //\t\t/// if custom is chosen:\n            //\t\t/// the polynomials can be determined by: exop x n1 y n2 z n3 c n4, x n11 ... x n44, ...  which will be n4*x^n1*y^n2*z^n3 + n44*x^n11* ...\n            //\t\t/// e.g. for a dipole guess enter the exop keyword 3 times as:\n            //\t\t/// exop x 1.0\n            //\t\t/// exop y 1.0\n            //\t\t/// exop z 1.0\n            //\t\t/// the options dipole, dipole+, dipole+diffuse and quadrupole give predefined exops without explicitly stating them\n            //\t\t/// see the end of TDHF.cc for predefined keys\n            //\t\tstd::string guess_excitation_operators=\"dipole+\";\n            //\n            /// Vector of strings which contains the polynomial excitation operators\n            /// For this to be used the tda_guess key has to be \"custom\"\n            /// The strings are given in a format like: \"c c1 x x1 y y1 z z1, c c2 x x2 y y2 z z2, ...\" which will be interpreted as: c1*x^x1*y^y1*z^z1 + c2*x^x2*y^y2*z^z2 + ....\n            initialize < std::vector<std::string> >\n            (\"exops\", {\"\"}, \"applies only if guess_excitation_operator is custom\");\n\n\n        }\n\n        void set_derived_values(const std::shared_ptr<SCF> &scf);\n\n        // physical part\n        std::size_t nexcitations() const { return get<std::size_t>(\"nexcitations\"); }\n\n        long freeze() const { return get<long>(\"freeze\"); }\n\n        std::string irrep() const { return get<std::string>(\"irrep\"); }\n\n        bool triplet() const { return get<bool>(\"triplet\"); }\n\n        bool do_oep() const { return get<bool>(\"do_oep\"); }\n\n        std::string response_kernel() const { return get<std::string>(\"response_kernel\"); }\n\n        // precision\n        double thresh() const { return get<double>(\"thresh\"); }\n\n        double econv() const { return get<double>(\"econv\"); }\n\n        double dconv() const { return get<double>(\"dconv\"); }\n\n        // restart and plotting\n        bool debug() const { return get<bool>(\"debug\"); }\n\n        std::string restart() const { return get<std::string>(\"restart\"); }\n        bool no_compute() const { return (restart()==\"no_compute\"); }\n\n        int print_level() const {return get<int>(\"print_level\");}\n\n        std::vector<size_t> excitations() const { return get<std::vector<size_t> >(\"excitations\"); }\n\n        bool plot() const { return get<bool>(\"plot\"); }\n\n        // solver parameters\n        std::size_t iterating_excitations() const { return get<std::size_t>(\"iterating_excitations\"); }\n\n        std::size_t maxiter() const { return get<std::size_t>(\"maxiter\"); }\n\n        std::size_t kain_subspace() const { return get<std::size_t>(\"kain_subspace\"); }\n\n        bool store_potential() const { return get<bool>(\"store_potential\"); }\n\n        // guess parameters\n//        std::size_t guess_occ_to_virt() const { return get<std::size_t>(\"guess_occ_to_virt\"); }\n\n        std::vector<std::string> exops() const { return get<std::vector<std::string> >(\"exops\"); }\n\n//        std::size_t guess_active_orbitals() const { return get<std::size_t>(\"guess_active_orbitals\"); }\n\n        bool guess_diag() const { return get<bool>(\"guess_diag\"); }\n\n        std::size_t guess_excitations() const { return get<std::size_t>(\"guess_excitations\"); }\n\n        std::string guess_excitation_operators() const { return get<std::string>(\"guess_excitation_operators\"); }\n\n        double damping_width() const { return get<double>(\"damping_width\"); }\n\n        double guess_cm() const { return get<double>(\"guess_cm\"); }\n\n        double guess_econv() const { return get<double>(\"guess_econv\"); }\n\n        double guess_dconv() const { return get<double>(\"guess_dconv\"); }\n\n        std::size_t guess_maxiter() const { return get<std::size_t>(\"guess_maxiter\"); }\n\n        /// make parameters for convolution operator\n        typename CCConvolutionOperator<double,3>::Parameters get_ccc_parameters(const double lo) const {\n            typename CCConvolutionOperator<double,3>::Parameters result;\n            result.freeze = freeze();\n            result.lo = lo;\n            result.thresh_op = thresh();\n            result.gamma = 1.0;\n            return result;\n        }\n    }; // end of parameter class\n\n\n/// The TDHF class\n/// solves CIS/TDA equations and hopefully soon the full TDHF/TDDFT equations\nclass TDHF : public QCPropertyInterface {\npublic:\n\n    TDHF(World &world, const TDHFParameters &parameters, std::shared_ptr<const Nemo> reference);\n\n    TDHF(World &world, const commandlineparser &parser);\n\n    TDHF(World &world, const commandlineparser &parser, std::shared_ptr<const Nemo> nemo);\n\n    virtual ~TDHF() {}\n\n    void initialize();\n\n    std::string name() const {return \"TDHF\";};\n\n    static void help() {\n        print_header2(\"help page for CIS \");\n        print(\"The CIS code computes Hartree-Fock and DFT excitations.\");\n        print(\"A moldft or nemo calculation will be performed automatically unless there is already a \");\n        print(\"wave function on file ('restartdata.00000'). Both local and canonical orbitals can be \");\n        print(\"used, for the latter individual irreps may be chosen for computation\");\n        print(\"Relevant parameters are derived from the reference calculation (moldft or nemo),\");\n        print(\"such as k, nuclear_correlation_factor, charge, etc\");\n        print(\"You can print all available calculation parameters by running\\n\");\n        print(\"cis --print_parameters\\n\");\n        print(\"You can perform a simple calculation by running\\n\");\n        print(\"cis --geometry=h2o.xyz\\n\");\n        print(\"provided you have an xyz file in your directory.\");\n\n    }\n\n    void print_frozen_orbitals() const;\n\n    MolecularOrbitals<double,3> enforce_core_valence_separation(const Tensor<double>& fmat) const;\n\n    static void print_parameters() {\n        TDHFParameters param;\n        print(\"default parameters for the CIS program are\\n\");\n        param.print(\"response\", \"end\");\n        print(\"\\n\\nthe molecular geometry must be specified in a separate block:\");\n        Molecule::print_parameters();\n    }\n\n    virtual bool selftest() {\n        return true;\n    };\n\n    ///  sets the reference wave function (nemo or oep)\n    void set_reference(std::shared_ptr<NemoBase> reference) {\n        reference_=reference;\n    }\n\n    std::shared_ptr<const NemoBase> get_reference() const {\n        return reference_;\n    }\n\n    std::shared_ptr<SCF> get_calc() const {\n        auto n=std::dynamic_pointer_cast<const Nemo>(reference_);\n        if (not n) MADNESS_EXCEPTION(\"could not cast NemoBase to Nemo\",1);\n        return n->get_calc();\n    }\n\n    std::shared_ptr<const Nemo> get_nemo() const {\n        auto n=std::dynamic_pointer_cast<const Nemo>(reference_);\n        if (not n) MADNESS_EXCEPTION(\"could not cast NemoBase to Nemo\",1);\n        return n;\n    }\n\n    void prepare_calculation();\n\n    CalculationParameters get_calcparam() const {\n        auto n=std::dynamic_pointer_cast<const Nemo>(reference_);\n        if (not n) MADNESS_EXCEPTION(\"could not cast NemoBase to Nemo\",1);\n        return n->get_calc_param();\n    }\n\n    projector_irrep get_symmetry_projector() const {\n        return symmetry_projector;\n    }\n    static int test(World &world, commandlineparser& parser);\n\n    /// check consistency of the input parameters\n    void check_consistency() const;\n\n    /// plot planes and cubes\n    void plot(const vector_real_function_3d &vf, const std::string &name) const;\n\n    /// sort the xfunctions according to their excitation energy and name the excitation energies accordingly\n    std::vector<CC_vecfunction> sort_xfunctions(std::vector<CC_vecfunction> x) const;\n\n    /// print information\n    void print_xfunctions(const std::vector<CC_vecfunction>& f, const std::string message) const;\n\n    /// Initialize the CIS functions\n\n    /// @param[in\\out] on input the already obtained guess functions (or empty vector), on output new guess functions are added\n    void initialize(std::vector<CC_vecfunction> &start) const;\n\n    void symmetrize(std::vector<CC_vecfunction> &v) const;\n\n    /// Solve the CIS equations\n\n    /// @param[in/out] CC_vecfunction\n    /// on input the guess functions (if empty or not enough the a guess will be generated)\n    /// on output the solution\n    std::vector<CC_vecfunction> solve_cis() const;\n\n    /// analyze the root: oscillator strength and contributions from occupied orbitals\n    nlohmann::json analyze(const std::vector<CC_vecfunction> &x) const;\n\n    const TDHFParameters& get_parameters() const {return parameters;};\n\n    std::vector<CC_vecfunction> get_converged_roots() const {return converged_roots;}\n\nprivate:\n    std::vector<CC_vecfunction> solve_cis(std::vector<CC_vecfunction> &start) const;\n\n    /// Solve TDHF equations (not ready)\n    void solve_tdhf(std::vector<CC_vecfunction> &guess) const;\n\n    /// iterate the CIS guess vectors\n    /// @param[in,out] x: on input the guess, on output the iterated guess\n    /// see CC_Structures.h CCParameters class for convergence criteria\n    bool iterate_cis_guess_vectors(std::vector<CC_vecfunction> &x) const;\n\n    /// iterate the final CIS vectors\n    /// @param[in,out] x: on input the guess, on output the iterated guess\n    /// see CC_Structures.h CCParameters class for convergence criteria\n    bool iterate_cis_final_vectors(std::vector<CC_vecfunction> &x) const;\n\n    /// General function to iterate vectors\n    /// @param[in,out] x: the CIS (or TDHF x) functions\n    /// @param[in,out] the TDHF y functions (empty for CIS)\n    /// @param[in] iterate_y, if true the y equation for TDHF is iterated\n    /// @param[in] dconv: wavefunction convergence (for the vector norm of the vectorfunction)\n    /// @param[in] econv: Energy convergece\n    /// @param[in] iter: maximum number of iterations\n    /// @param[in] kain: use kain if true (kainsubspace is controlled over CCParameters class)\n    bool iterate_vectors(std::vector<CC_vecfunction> &x, const std::vector<CC_vecfunction> &y, bool iterate_y,\n                         const double dconv, const double econv, const double iter, const bool kain) const;\n\n    /// Apply the Greens function to a vector of vectorfunction with a given potential\n    /// @param[in] x: the vector of vectorfunctions where G will be applied to\n    /// @param[in] V: the vector of potentials to the vectorfunctions, will be cleared afterwards (potentials are all potentials excpet the nuclear: 2J - K + Q(2pJ - pK)\n    /// @param[out] the vectorfunctions after G has been applied\n    /// the energy is assumed to be stored in the CC_vecfunctions member omega\n    /// the wavefunction error is stored in the CC_vecfunctions member current_error\n    std::vector<vector_real_function_3d>\n    apply_G(std::vector<CC_vecfunction> &x, std::vector<vector_real_function_3d> &V) const;\n\n    /// Make the old CIS Guess\n    /// the routine is now used to create virtuals\n//    std::vector<CC_vecfunction> make_old_guess(const vector_real_function_3d &f) const;\n\n    /// Create a set of virtual orbitals for the initial guess\n    vector_real_function_3d make_virtuals() const;\n\n    /// multiply excitation operators defined in the parameters with the seed functions\n    /// @param[in] the seeds, define the function which are multiplied by the excitation operators\n    /// @param[in] use_trigo, if false polynomials are used for excitation operators, else trigonometric functions (i.e. x^2y vs sin^2(x)*sin(y))\n    /// Trigonometric functions are prefered since they are bounded (no weird behaviour at the boundaries for large exponents)\n    vector_real_function_3d\n    apply_excitation_operators(const vector_real_function_3d &seed, const bool &use_trigo = true) const;\n\n    /// make the initial guess by explicitly diagonalizing a CIS matrix with virtuals from the make_virtuals routine\n    vector<CC_vecfunction> make_guess_from_initial_diagonalization() const;\n\n    /// canonicalize a set of orbitals (here the virtuals for the guess)\n    vector_real_function_3d canonicalize(const vector_real_function_3d &v, Tensor<double> &veps) const;\n\n    /// compute the CIS matrix for a given set of virtuals\n\n    /// @param[in]\tvirtuals\tthe virtual orbitals\n    /// @param[in]\tveps\t\tthe orbital energies of the virtuals\n    Tensor<double> make_cis_matrix(const vector_real_function_3d& virtuals, const Tensor<double> &veps) const;\n\n    std::string filename_for_roots(const int ex) const {\n        return get_calcparam().prefix()+\"_root_\"+std::to_string(ex);\n    }\n\n    /// Make the potentials to a given vector of vecfunctions (excitations)\n    /// @param[in] The vector of excitations\n    /// @param[out] The potentials\n    std::vector<vector_real_function_3d> make_potentials(const std::vector<CC_vecfunction> &x) const;\n\n    //    /// Make the CIS potential for a single excitation vector\n    //\tvecfuncT get_cis_potential(const CC_vecfunction& x) const {\n    //\t\treturn CCOPS.make_cis_potential(x);\n    //\t}\n    /// Make the TDA potential for a single excitation vector\n    vector_real_function_3d get_tda_potential(const CC_vecfunction &x) const;\n\n    /// Make the TDHF potential (not ready)\n    std::vector<vector_real_function_3d>\n    make_tdhf_potentials(std::vector<CC_vecfunction> &x, const std::vector<CC_vecfunction> &y) const;\n\n    /// orthonormalize a vector of excitations\n    /// @param[in,out] input: the excitations, output: the orthonormalized excitations\n    /// @param[in] input: the potentials, if empty the potentials will be recalculated but NOT stored\n    /// output: the transformed potentials\n    void orthonormalize(std::vector<CC_vecfunction> &x, std::vector<vector_real_function_3d> &V) const;\n\n    /// Calculate the perturbed fock matrix for a given vector of excitations\n    /// @param[in] input: the excitations\n    /// @param[in] input: the potentials, if empty the potentials will be recalculated but NOT stored\n    Tensor<double> make_perturbed_fock_matrix(const std::vector<CC_vecfunction> &x,\n                                              const std::vector<vector_real_function_3d> &V) const;\n\n    Tensor<double> make_overlap_matrix(const std::vector<CC_vecfunction> &x) const;\n\n    std::vector<vector_real_function_3d>\n    transform(const std::vector<vector_real_function_3d> &x, const madness::Tensor<double> U) const {\n        std::vector<CC_vecfunction> tmp;\n        for (const auto &xi:x) tmp.push_back(CC_vecfunction(xi));\n        std::vector<CC_vecfunction> tmp2 = transform(tmp, U);\n        std::vector<vector_real_function_3d> result;\n        for (const auto &xi:tmp2) result.push_back(xi.get_vecfunction());\n        return result;\n    }\n\n    /// Interface to the SCF.h fock_transform function\n    std::vector<CC_vecfunction>\n    transform(const std::vector<CC_vecfunction> &x, const madness::Tensor<double> U) const;\n\n\n    /// Helper function to initialize the const mo_bra and ket elements\n    CC_vecfunction make_mo_bra(const std::vector<Function<double,3>>& amo) const {\n        vector_real_function_3d tmp = get_reference()->get_ncf_ptr()->square()* amo;\n        set_thresh(world, tmp, parameters.thresh());\n        truncate(world, tmp);\n        reconstruct(world, tmp);\n        CC_vecfunction mo_bra(tmp, HOLE);\n        return mo_bra;\n    }\n\n    CC_vecfunction make_mo_ket(const std::vector<Function<double,3>>& amo) const {\n        vector_real_function_3d tmp = copy(world,amo);\n        set_thresh(world, tmp, parameters.thresh());\n        truncate(world, tmp);\n        reconstruct(world, tmp);\n        CC_vecfunction mo_ket(tmp, HOLE);\n        return mo_ket;\n    }\n\n    double get_orbital_energy(const size_t i) const {\n        auto n=std::dynamic_pointer_cast<const Nemo>(reference_);\n        if (not n) MADNESS_EXCEPTION(\"could not cast NemoBase to Nemo\",1);\n        return n->get_calc()->aeps(i);\n    }\n\n    /// convenience\n    vector_real_function_3d make_bra(const CC_vecfunction &ket) const {\n        return make_bra(ket.get_vecfunction());\n    }\n\n    real_function_3d make_bra(const real_function_3d &ket) const {\n        vector_real_function_3d v(1, ket);\n        return make_bra(v).front();\n\n    }\n\n    /// maybe move this into nuclear_correlation class ?\n    vector_real_function_3d make_bra(const vector_real_function_3d &ket) const {\n        CCTimer time(world, \"Make Bra\");\n        real_function_3d nucf = reference_->ncf->square();\n        vector_real_function_3d result = mul(world, nucf, ket);\n        time.info(parameters.debug());\n        return result;\n    }\n\n    const vector_real_function_3d get_active_mo_ket() const {\n        vector_real_function_3d result;\n        for (size_t i = parameters.freeze(); i < mo_ket_.size(); i++) result.push_back(mo_ket_(i).function);\n        return result;\n    }\n\n    const vector_real_function_3d get_active_mo_bra() const {\n        vector_real_function_3d result;\n        for (size_t i = parameters.freeze(); i < mo_ket_.size(); i++) result.push_back(mo_bra_(i).function);\n        return result;\n    }\n\n    /// compute the oscillator strength in the length representation\n\n    /// the oscillator strength is given by\n    /// \\f[\n    /// f = 2/3 * \\omega |<x | \\vec \\mu | i >| ^2 * 2\n    /// \\f]\n    /// where \\f$ x \\f$ is the excited state, and \\f$ i \\f$ is the ground state\n    /// @param[in]  root    a converged root\n    double oscillator_strength_length(const CC_vecfunction &x) const;\n\n    /// compute the oscillator strength in the velocity representation\n\n    /// the oscillator strength is given by\n    /// \\f[\n    /// f = 2/(3 * \\omega) |<x | \\vec p | i >| ^2 * 2\n    /// \\f]\n    /// where \\f$ x \\f$ is the excited state, and \\f$ i \\f$ is the ground state\n    /// @param[in]  root    a converged root\n    double oscillator_strength_velocity(const CC_vecfunction &x) const;\n\n    /// Fock matrix for occupied orbitals\n    Tensor<double> F_occ;\n    /// The MPI Communicator\n    World &world;\n    /// The Nemo structure (convenience)\n    std::shared_ptr<const NemoBase> reference_;\n    /// The TDHFParameters for the Calculations\n    TDHFParameters parameters;\n    /// Operator Structure which can handle intermediates (use for exchange with GS orbitals)\n    /// Can be replaced by another potential manager\n    std::shared_ptr<CCConvolutionOperator<double,3>> g12;\n    /// MO bra and ket\n    CC_vecfunction mo_ket_;\n    CC_vecfunction mo_bra_;\n    /// the Projector to the virtual space\n    QProjector<double, 3> Q;\n    /// the symmetry projector\n    projector_irrep symmetry_projector;\n    /// the messenger IO\n    CCMessenger msg;\n    /// converged roots\n    mutable std::vector<CC_vecfunction> converged_roots;\n    /// stored guess roots roots to feed into the cycle, sorted backwards for easier pop_back calling\n    mutable std::vector<CC_vecfunction> guess_roots;\n};\n\n\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_TDHF_H_ */\n"
  },
  {
    "path": "src/madness/chem/atomutil.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n#include <madness/constants.h>\n#include<madness/chem/atomutil.h>\n#include <madness/misc/misc.h>\n#include <algorithm>\n#include <cmath>\n#include <cstdio>\n\n/// \\file atomutil.cc\n/// \\brief implementation of utility functions for atom\n\nnamespace madness {\nstatic const unsigned int NUMBER_OF_ATOMS_IN_TABLE = 110;\n\n/// Atomic weights are taken from IUPAC 2005 (M. E. Wieser, “Atomic weights of the elements\n/// 2005 (IUPAC Technical Report),” Pure and Applied Chemistry, vol. 78, no. 11.)\n/// Negative masses refer to the longest-living isotope.\n/// Note that the masses refer to isotopic averaging, not to the specified isotope!\nstatic const AtomicData atomic_data[NUMBER_OF_ATOMS_IN_TABLE] = {\n    // symbol    number          nuclear_radius                    nuclear_gaussian_exponent mass in amu\n    //     symbol      isotope                    nuclear_half_charge_radius       covalent_radius\n    {\"Bq\",  \"bq\",   0  ,  0   ,  0.0               , 0.0           ,0.0             , 0.0   , 0.0},\n    {\"H\",   \"h\",    1  ,  1   ,  2.6569547399e-05  , 1.32234e-05   ,2.1248239171e+09, 0.30  , 1.00794  },\n    {\"He\",  \"he\",   2  ,  4   ,  3.5849373401e-05  , 2.63172e-05   ,1.1671538870e+09, 1.22  , 4.002602 },\n    {\"Li\",  \"li\",   3  ,  7   ,  4.0992133976e-05  , 2.34051e-05   ,8.9266848806e+08, 1.23  , 6.941    },\n    {\"Be\",  \"be\",   4  ,  9   ,  4.3632829651e-05  , 3.03356e-05   ,7.8788802914e+08, 0.89  , 9.012182 },\n    {\"B\",   \"b\",    5  ,  11  ,  4.5906118608e-05  , 3.54894e-05   ,7.1178709563e+08, 0.88  , 10.811   },\n    {\"C\",   \"c\",    6  ,  12  ,  4.6940079496e-05  , 3.76762e-05   ,6.8077502929e+08, 0.77  , 12.0107  },\n    {\"N\",   \"n\",    7  ,  14  ,  4.8847128967e-05  , 4.15204e-05   ,6.2865615725e+08, 0.70  , 14.0067  },\n    {\"O\",   \"o\",    8  ,  16  ,  5.0580178957e-05  , 4.48457e-05   ,5.8631436655e+08, 0.66  , 15.9994  },\n    {\"F\",   \"f\",    9  ,  19  ,  5.2927138943e-05  , 4.91529e-05   ,5.3546911034e+08, 0.58  , 18.9984032},\n    {\"Ne\",  \"ne\",  10  ,  20  ,  5.3654104231e-05  , 5.04494e-05   ,5.2105715255e+08, 1.60  , 20.1797  },\n    {\"Na\",  \"na\",  11  ,  23  ,  5.5699159416e-05  , 5.40173e-05   ,4.8349721509e+08, 1.66  , 22.98976928},\n    {\"Mg\",  \"mg\",  12  ,  24  ,  5.6341070732e-05  , 5.51157e-05   ,4.7254270882e+08, 1.36  , 24.3050},\n    {\"Al\",  \"al\",  13  ,  27  ,  5.8165765928e-05  , 5.81891e-05   ,4.4335984491e+08, 1.25  , 26.9815386},\n    {\"Si\",  \"si\",  14  ,  28  ,  5.8743802504e-05  , 5.91490e-05   ,4.3467748823e+08, 1.17  , 28.0855},\n    {\"P\",   \"p\",   15  ,  31  ,  6.0399312923e-05  , 6.18655e-05   ,4.1117553148e+08, 1.10  , 30.973762},\n    {\"S\",   \"s\",   16  ,  32  ,  6.0927308666e-05  , 6.27224e-05   ,4.0407992047e+08, 1.04  , 32.065},\n    {\"Cl\",  \"cl\",  17  ,  35  ,  6.2448101115e-05  , 6.51676e-05   ,3.8463852873e+08, 0.99  , 35.453},\n    {\"Ar\",  \"ar\",  18  ,  40  ,  6.4800211825e-05  , 6.88887e-05   ,3.5722217300e+08, 1.91  , 39.948},\n    {\"K\",   \"k\",   19  ,  39  ,  6.4346167051e-05  , 6.81757e-05   ,3.6228128110e+08, 2.03  , 39.0983},\n    {\"Ca\",  \"ca\",  20  ,  40  ,  6.4800211825e-05  , 6.88887e-05   ,3.5722217300e+08, 1.74  , 40.078},\n    {\"Sc\",  \"sc\",  21  ,  45  ,  6.6963627201e-05  , 7.22548e-05   ,3.3451324570e+08, 1.44  , 44.955912},\n    {\"Ti\",  \"ti\",  22  ,  48  ,  6.8185577480e-05  , 7.41350e-05   ,3.2263108827e+08, 1.32  , 47.867},\n    {\"V\",   \"v\",   23  ,  51  ,  6.9357616830e-05  , 7.59254e-05   ,3.1181925878e+08, 1.22  , 50.9415},\n    {\"Cr\",  \"cr\",  24  ,  52  ,  6.9738057221e-05  , 7.65040e-05   ,3.0842641793e+08, 1.19  , 51.9961},\n    {\"Mn\",  \"mn\",  25  ,  55  ,  7.0850896638e-05  , 7.81897e-05   ,2.9881373610e+08, 1.17  , 54.938045},\n    {\"Fe\",  \"fe\",  26  ,  56  ,  7.1212829817e-05  , 7.87358e-05   ,2.9578406371e+08, 1.165 , 55.845},\n    {\"Co\",  \"co\",  27  ,  59  ,  7.2273420879e-05  , 8.03303e-05   ,2.8716667270e+08, 1.16  , 58.933195},\n    {\"Ni\",  \"ni\",  28  ,  58  ,  7.1923970253e-05  , 7.98058e-05   ,2.8996391416e+08, 1.15  , 58.6934},\n    {\"Cu\",  \"cu\",  29  ,  63  ,  7.3633018675e-05  , 8.23625e-05   ,2.7665979354e+08, 1.17  , 63.546},\n    {\"Zn\",  \"zn\",  30  ,  64  ,  7.3963875193e-05  , 8.28551e-05   ,2.7419021043e+08, 1.25  , 65.409},\n    {\"Ga\",  \"ga\",  31  ,  69  ,  7.5568424848e-05  , 8.52341e-05   ,2.6267002737e+08, 1.25  , 69.723},\n    {\"Ge\",  \"ge\",  32  ,  74  ,  7.7097216161e-05  , 8.74862e-05   ,2.5235613399e+08, 1.22  , 72.64},\n    {\"As\",  \"as\",  33  ,  75  ,  7.7394645153e-05  , 8.79228e-05   ,2.5042024280e+08, 1.21  , 74.92160},\n    {\"Se\",  \"se\",  34  ,  80  ,  7.8843427408e-05  , 9.00427e-05   ,2.4130163719e+08, 1.17  , 78.96},\n    {\"Br\",  \"br\",  35  ,  79  ,  7.8558604038e-05  , 8.96268e-05   ,2.4305454351e+08, 1.14  , 79.904},\n    {\"Kr\",  \"kr\",  36  ,  84  ,  7.9959560033e-05  , 9.16684e-05   ,2.3461213272e+08, 1.98  , 83.798},\n    {\"Rb\",  \"rb\",  37  ,  85  ,  8.0233033713e-05  , 9.20658e-05   ,2.3301551109e+08, 2.22  , 85.4678},\n    {\"Sr\",  \"sr\",  38  ,  88  ,  8.1040799081e-05  , 9.32375e-05   ,2.2839354730e+08, 1.92  , 87.62},\n    {\"Y\",   \"y\",   39  ,  89  ,  8.1305968993e-05  , 9.36215e-05   ,2.2690621893e+08, 1.62  , 88.90585},\n    {\"Zr\",  \"zr\",  40  ,  90  ,  8.1569159980e-05  , 9.40022e-05   ,2.2544431039e+08, 1.45  , 91.224},\n    {\"Nb\",  \"nb\",  41  ,  93  ,  8.2347219223e-05  , 9.51261e-05   ,2.2120420724e+08, 1.34  , 92.90638},\n    {\"Mo\",  \"mo\",  42  ,  98  ,  8.3607614434e-05  , 9.69412e-05   ,2.1458511597e+08, 1.29  , 95.94},\n    {\"Tc\",  \"tc\",  43  ,  98  ,  8.3607614434e-05  , 9.69412e-05   ,2.1458511597e+08, 1.27  , -97.9072},\n    {\"Ru\",  \"ru\",  44  , 102  ,  8.4585397905e-05  , 9.83448e-05   ,2.0965270287e+08, 1.24  , 101.07},\n    {\"Rh\",  \"rh\",  45  , 103  ,  8.4825835954e-05  , 9.86893e-05   ,2.0846586999e+08, 1.25  , 102.90550},\n    {\"Pd\",  \"pd\",  46  , 106  ,  8.5537941156e-05  , 9.97084e-05   ,2.0500935221e+08, 1.28  , 106.42},\n    {\"Ag\",  \"ag\",  47  , 107  ,  8.5772320442e-05  , 1.00043e-04   ,2.0389047621e+08, 1.34  , 107.8682},\n    {\"Cd\",  \"cd\",  48  , 114  ,  8.7373430179e-05  , 1.02327e-04   ,1.9648639618e+08, 1.41  , 112.411},\n    {\"In\",  \"in\",  49  , 115  ,  8.7596760865e-05  , 1.02644e-04   ,1.9548577691e+08, 1.50  , 114.818},\n    {\"Sn\",  \"sn\",  50  , 120  ,  8.8694413774e-05  , 1.04204e-04   ,1.9067718154e+08, 1.40  , 118.710},\n    {\"Sb\",  \"sb\",  51  , 121  ,  8.8910267995e-05  , 1.04510e-04   ,1.8975246242e+08, 1.41  , 121.760},\n    {\"Te\",  \"te\",  52  , 130  ,  9.0801452955e-05  , 1.07185e-04   ,1.8193056289e+08, 1.37  , 127.60},\n    {\"I\",   \"i\",   53  , 127  ,  9.0181040290e-05  , 1.06309e-04   ,1.8444240538e+08, 1.33  , 126.90447},\n    {\"Xe\",  \"xe\",  54  , 132  ,  9.1209776425e-05  , 1.07762e-04   ,1.8030529331e+08, 2.09  , 131.293},\n    {\"Cs\",  \"cs\",  55  , 133  ,  9.1412392742e-05  , 1.08047e-04   ,1.7950688281e+08, 2.35  , 132.9054519},\n    {\"Ba\",  \"ba\",  56  , 138  ,  9.2410525664e-05  , 1.09453e-04   ,1.7565009043e+08, 1.98  , 137.327},\n    {\"La\",  \"la\",  57  , 139  ,  9.2607247118e-05  , 1.09730e-04   ,1.7490463170e+08, 1.69  , 138.90547},\n    {\"Ce\",  \"ce\",  58  , 140  ,  9.2803027311e-05  , 1.10006e-04   ,1.7416744147e+08, 1.65  , 140.116},\n    {\"Pr\",  \"pr\",  59  , 141  ,  9.2997877424e-05  , 1.10279e-04   ,1.7343837120e+08, 1.65  , 140.90765},\n    {\"Nd\",  \"nd\",  60  , 144  ,  9.3576955934e-05  , 1.11093e-04   ,1.7129844956e+08, 1.64  , 144.242},\n    {\"Pm\",  \"pm\",  61  , 145  ,  9.3768193375e-05  , 1.11361e-04   ,1.7060044589e+08, 1.65  , -144.9127},\n    {\"Sm\",  \"sm\",  62  , 152  ,  9.5082839751e-05  , 1.13204e-04   ,1.6591550422e+08, 1.66  , 150.36},\n    {\"Eu\",  \"eu\",  63  , 153  ,  9.5267329183e-05  , 1.13462e-04   ,1.6527352089e+08, 1.65  , 151.964},\n    {\"Gd\",  \"gd\",  64  , 158  ,  9.6177915369e-05  , 1.14735e-04   ,1.6215880671e+08, 1.61  , 157.25},\n    {\"Tb\",  \"tb\",  65  , 159  ,  9.6357719009e-05  , 1.14986e-04   ,1.6155419421e+08, 1.59  , 158.92535},\n    {\"Dy\",  \"dy\",  66  , 162  ,  9.6892647152e-05  , 1.15733e-04   ,1.5977529080e+08, 1.59  , 162.500},\n    {\"Ho\",  \"ho\",  67  , 162  ,  9.6892647152e-05  , 1.15733e-04   ,1.5977529080e+08, 1.58  , 164.93032},\n    {\"Er\",  \"er\",  68  , 168  ,  9.7943009317e-05  , 1.17198e-04   ,1.5636673634e+08, 1.57  , 167.259},\n    {\"Tm\",  \"tm\",  69  , 169  ,  9.8115626740e-05  , 1.17438e-04   ,1.5581702004e+08, 1.56  , 168.93421},\n    {\"Yb\",  \"yb\",  70  , 174  ,  9.8968651305e-05  , 1.18625e-04   ,1.5314257850e+08, 1.56  , 173.04},\n    {\"Lu\",  \"lu\",  71  , 175  ,  9.9137288835e-05  , 1.18859e-04   ,1.5262201512e+08, 1.56  , 174.967},\n    {\"Hf\",  \"hf\",  72  , 180  ,  9.9970978172e-05  , 1.20018e-04   ,1.5008710340e+08, 1.44  , 178.49},\n    {\"Ta\",  \"ta\",  73  , 181  ,  1.0013585755e-04  , 1.20246e-04   ,1.4959325643e+08, 1.34  , 180.94788},\n    {\"W\",   \"w\",   74  , 184  ,  1.0062688070e-04  , 1.20928e-04   ,1.4813689532e+08, 1.30  , 183.84},\n    {\"Re\",  \"re\",  75  , 187  ,  1.0111259523e-04  , 1.21601e-04   ,1.4671710337e+08, 1.28  , 186.207},\n    {\"Os\",  \"os\",  76  , 192  ,  1.0191070333e-04  , 1.22706e-04   ,1.4442808782e+08, 1.26  , 190.23},\n    {\"Ir\",  \"ir\",  77  , 193  ,  1.0206865731e-04  , 1.22925e-04   ,1.4398142103e+08, 1.26  , 192.217},\n    {\"Pt\",  \"pt\",  78  , 195  ,  1.0238293593e-04  , 1.23360e-04   ,1.4309883584e+08, 1.29  , 195.084},\n    {\"Au\",  \"au\",  79  , 197  ,  1.0269507292e-04  , 1.23792e-04   ,1.4223027307e+08, 1.34  , 196.966569},\n    {\"Hg\",  \"hg\",  80  , 202  ,  1.0346628039e-04  , 1.24857e-04   ,1.4011788914e+08, 1.44  , 200.59},\n    {\"Tl\",  \"tl\",  81  , 205  ,  1.0392291259e-04  , 1.25488e-04   ,1.3888925203e+08, 1.55  , 204.3833},\n    {\"Pb\",  \"pb\",  82  , 208  ,  1.0437511130e-04  , 1.26112e-04   ,1.3768840081e+08, 1.54  , 207.2},\n    {\"Bi\",  \"bi\",  83  , 209  ,  1.0452487744e-04  , 1.26318e-04   ,1.3729411599e+08, 1.52  , 208.98040},\n    {\"Po\",  \"po\",  84  , 209  ,  1.0452487744e-04  , 1.26318e-04   ,1.3729411599e+08, 1.53  , -208.9824},\n    {\"At\",  \"at\",  85  , 210  ,  1.0467416660e-04  , 1.26524e-04   ,1.3690277000e+08, 1.50  , -209.9871},\n    {\"Rn\",  \"rn\",  86  , 222  ,  1.0642976299e-04  , 1.28942e-04   ,1.3242350205e+08, 2.20  , -220.0176},\n    {\"Fr\",  \"fr\",  87  , 223  ,  1.0657317899e-04  , 1.29139e-04   ,1.3206733609e+08, 3.24  , -223.0197},\n    {\"Ra\",  \"ra\",  88  , 226  ,  1.0700087100e-04  , 1.29727e-04   ,1.3101367628e+08, 2.68  , -226.0254},\n    {\"Ac\",  \"ac\",  89  , 227  ,  1.0714259349e-04  , 1.29922e-04   ,1.3066730974e+08, 2.25  , -227.0278},\n    {\"Th\",  \"th\",  90  , 232  ,  1.0784503195e-04  , 1.30887e-04   ,1.2897067480e+08, 2.16  , 232.03806 },\n    {\"Pa\",  \"pa\",  91  , 231  ,  1.0770535752e-04  , 1.30695e-04   ,1.2930539512e+08, 1.93  , 321.03588 },\n    {\"U\",   \"u\",   92  , 238  ,  1.0867476102e-04  , 1.32026e-04   ,1.2700881714e+08, 3.00  , 238.02891 },\n    {\"Np\",  \"np\",  93  , 237  ,  1.0853744903e-04  , 1.31838e-04   ,1.2733038109e+08, 1.57  , -239.0482},\n    {\"Pu\",  \"pu\",  94  , 244  ,  1.0949065967e-04  , 1.33145e-04   ,1.2512299012e+08, 1.81  , -244.0642},\n    {\"Am\",  \"am\",  95  , 243  ,  1.0935561268e-04  , 1.32960e-04   ,1.2543221826e+08, 2.21  , -243.0614},\n    {\"Cm\",  \"cm\",  96  , 247  ,  1.0989359973e-04  , 1.33697e-04   ,1.2420711085e+08, 1.43  , -247.0704},\n    {\"Bk\",  \"bk\",  97  , 247  ,  1.0989359973e-04  , 1.33697e-04   ,1.2420711085e+08, 1.42  , -247.0703},\n    {\"Cf\",  \"cf\",  98  , 251  ,  1.1042580946e-04  , 1.34426e-04   ,1.2301273547e+08, 1.40  , -251.0796},\n    {\"Es\",  \"es\",  99  , 252  ,  1.1055797721e-04  , 1.34607e-04   ,1.2271879740e+08, 1.39  , -252.0830},\n    {\"Fm\",  \"fm\",  100 , 257  ,  1.1121362374e-04  , 1.35504e-04   ,1.2127611477e+08, 1.38  , -257.0951},\n    {\"Md\",  \"md\",  101 , 258  ,  1.1134373034e-04  , 1.35682e-04   ,1.2099285491e+08, 1.37  , -258.0984},\n    {\"No\",  \"no\",  102 , 259  ,  1.1147350119e-04  , 1.35859e-04   ,1.2071131346e+08, 1.36  , -259.1010},\n    {\"Lr\",  \"lr\",  103 , 262  ,  1.1186082063e-04  , 1.36389e-04   ,1.1987683191e+08, 1.34  , -262.1096},\n    {\"Db\",  \"db\",  104 , 261  ,  1.1173204420e-04  , 1.36213e-04   ,1.2015331850e+08, 1.40  , -1.0},        // ??\n    {\"Jl\",  \"jl\",  105 , 262  ,  1.1186082063e-04  , 1.36389e-04   ,1.1987683191e+08, 1.40  , -1.0},        // ??\n    {\"Rf\",  \"rf\",  106 , 263  ,  1.1198926979e-04  , 1.36565e-04   ,1.1960199758e+08, 1.40  , -1.0},        // ??\n    {\"Bh\",  \"bh\",  107 , 262  ,  1.1186082063e-04  , 1.36389e-04   ,1.1987683191e+08, 1.40  , -272.1380},\n    {\"Hn\",  \"hn\",  108 , 265  ,  1.1224519460e-04  , 1.36914e-04   ,1.1905722195e+08, 1.40  , -1.0},        // ??\n    {\"Mt\",  \"mt\",  109 , 266  ,  1.1237267433e-04  , 1.37088e-04   ,1.1878724932e+08, 1.40  , -276.1512}\n};\n\nconst AtomicData& get_atomic_data(unsigned int atomic_number) {\n    if (atomic_number >= NUMBER_OF_ATOMS_IN_TABLE) throw \"I am not an alchemist\";\n    return atomic_data[atomic_number];\n}\n\n\nunsigned int symbol_to_atomic_number(const std::string& symbol) {\n    //first check if pseudo-atom (i.e. starts with ps)\n    std::string rsymbol(symbol);\n    if (symbol.size()>1){\n        if (symbol[0]=='p' && symbol[1]=='s') rsymbol.erase(0,2);}\n\n    std::string tlow = madness::lowercase(rsymbol);    \n\n    for (unsigned int i=0; i<NUMBER_OF_ATOMS_IN_TABLE; ++i) {\n        if (tlow.compare(atomic_data[i].symbol_lowercase) == 0) return i;\n    }\n    throw \"unknown atom\";\n}\n\n/// return the lower-case element symbol corresponding to the atomic number\nstd::string atomic_number_to_symbol(const unsigned int atomic_number) {\n    return atomic_data[atomic_number].symbol_lowercase;\n}\n\n\nbool check_if_pseudo_atom(const std::string& symbol) {\n    //check if pseudo-atom (i.e. starts with ps)\n    if (symbol.size()>1) {\n        if (symbol[0]=='p' && symbol[1]=='s') return true;}\n    return false;\n\n}\n\n\n/// Returns radius for smoothing nuclear potential with energy precision eprec\ndouble smoothing_parameter(double Z, double eprec) {\n    // The min is since asymptotic form not so good at low acc.\n    // The /2 is from two electrons in 1s closed shell.\n    if (Z == 0.0) return 1.0;\n    eprec = std::min(1e-3,eprec/2.0);\n    //eprec = std::min(1e-2,eprec/2.0);\n    double Z5 = Z*Z*Z*Z*Z;\n    double c = pow(eprec/(0.65*Z5),1.0/3.0);\n    //std::cout << \"SMOOTHING \" << Z << \" \" << c << std::endl;\n    return c;\n}\n\n\n/// Smoothed 1/r potential\n\n/// Invoke as \\c u(r/c)/c where \\c c is the radius of the\n/// smoothed volume.\ndouble smoothed_potential(double r) {\n    //     if (r > 7) {\n    //         return 1.0/r;\n    //     }\n    //     else if (r > 1e-2) {\n    //         double rsq = r*r;\n    //         return erf(r)/r + exp(-rsq)/sqrt(madness::constants::pi);\n    //     }\n    //     else {\n    //         double rsq = r*r;\n    //         return 1.6925687506432689+(-.94031597257959385+(.39493270848342941-.12089776790309064*rsq)*rsq)*rsq;\n    //     }\n\n    // Below code is about 3x faster than the above and accurate under gcc 4.7 is accurate to 3*epsilon (6.66e-16)\n    static const double lo0=0., hi0=.75, m0=(hi0+lo0)*0.5;\n    static const double q0[16] = {1.5678214965991468, -.62707838966047510, -.64081087092780663, .47615447123508785, .17661021898450753, -.19684394977153049, -0.28659921463622429e-1, 0.55915374519467232e-1, 0.14360220805627533e-2, -0.12055628477910659e-1, 0.64426691086411555e-3, 0.20868614450806855e-2, -0.23638877395492455e-3, -0.30013965988191071e-3, 0.45381875950933199e-4, 0.34681863672368034e-4};\n\n    static const double lo1=0.75, hi1=1.5, m1=(hi1+lo1)*0.5;\n    static const double q1[16] = {.94881540742968045, -.77708439858316963, .29787227010512777, .15217642747453712, -.21398168552777233, 0.46031655538422367e-1, 0.47949184476371850e-1, -0.28318961737780952e-1, -0.32540636504803776e-2, 0.68978584780210998e-2, -0.95383257324881606e-3, -0.10234901787860559e-2, 0.34967650634270816e-3, 0.91583510656898485e-4, -0.59911753487282495e-4};\n\n    static const double lo2=1.5, hi2=2.3, m2=(hi2+lo2)*0.5;\n    static const double q2[16] = {.53778364876259625, -.31694255320073229, .20069433198898583, -.10393741805917812, 0.20334064004004232e-1, 0.21235241487756926e-1, -0.20518056794680800e-1, 0.58265985152125050e-2, 0.20871477843956435e-2, -0.21669668079311651e-2, 0.43633711821764852e-3, 0.23242367731229579e-3, -0.14633201591612828e-3, 0.81202239221096509e-5, 0.17796616558877600e-4, -0.52312378743479744e-5};\n\n    static const double lo3=2.3, hi3=3.1, m3=(hi3+lo3)*0.5;\n    static const double q3[16] = {.37070557988365330, -.13894942379378032, 0.55150689152956653e-1, -0.25223306695010866e-1, 0.13102816917145070e-1, -0.62578895129075508e-2, 0.18797639251795907e-2, 0.22594681129385247e-3, -0.63097453855253135e-3, 0.34542603237417486e-3, -0.67467846042544434e-4, -0.28565855991132860e-4, 0.24299523362660657e-4, -0.52291058128176869e-5, -0.12789313539110192e-5};\n\n    static const double lo4=3.1, hi4=4.1, m4=(hi4+lo4)*0.5;\n    static const double q4[16] = {.27777900622536875, -0.77169285529226839e-1, 0.21463679730008438e-1, -0.60198321985860536e-2, 0.17566374490424399e-2, -0.57950539050391789e-3, 0.23569755765811705e-3, -0.11059754002626651e-3, 0.49084348022523836e-4, -0.16493922349103034e-4, 0.22821100336745665e-5, 0.15678232491648044e-5, -0.13699711510193177e-5, 0.50039859344562296e-6, -0.59433859103763842e-7};\n\n    static const double lo5=4.1, hi5=5.6, m5=(hi5+lo5)*0.5;\n    static const double q5[16] = {.20618556704321355, -0.42512488361955708e-1, 0.87654629615324323e-2, -0.18073162972250135e-2, 0.37265209018141361e-3, -0.76851802150694868e-4, 0.15868227305029941e-4, -0.32974415757731337e-5, 0.70444925352388208e-6, -0.16523539352856092e-6, 0.47936573168344514e-7, -0.18010609222020871e-7, 0.77011461658052001e-8, -0.32809439744789984e-8, 0.12461858963532225e-8, -0.28690455490168773e-9};\n\n    static const double lo6=5.6, hi6=7.0, m6=(hi6+lo6)*0.5;\n    static const double q6[16] = {.15873015873015873, -0.25195263290501128e-1, 0.39992481413494903e-2, -0.63480129229574217e-3, 0.10076210989447071e-3, -0.15993985425859338e-4, 0.25387278290368119e-5, -0.40297464132256025e-6, 0.63964378952634106e-7, -0.10146488064153093e-7, 0.16103633738263416e-8, -0.26645848419611212e-9, 0.42505693478320828e-10, 0.0, 0.0, 0.0};\n\n\n//     double rsq = r*r;\n//     double formula = erf(r)/r + exp(-rsq)/sqrt(madness::constants::pi);\n\n    const double* a;\n\n    if (r > hi6) {              // Most common case\n        return 1.0/r;\n    }\n    else if (r > hi3) {\n        if (r > hi5) {\n            r -= m6;\n            a = q6;\n        }\n        else if (r > hi4) {\n            r -= m5;\n            a = q5;\n        }\n        else {\n            r -= m4;\n            a = q4;\n        }\n    }\n    else if (r > hi1) {\n        if (r > hi2) {\n            r -= m3;\n            a = q3;\n        }\n        else {\n            r -= m2;\n            a = q2;\n        }\n    }\n    else if (r > hi0) {\n        r -= m1;\n        a = q1;\n    }\n    else {\n        r -= m0;                // Least common case\n        a = q0;\n    }\n\n\n    double b0 = a[ 0] + r*a[ 1];\n    double b1 = a[ 2] + r*a[ 3];\n    double b2 = a[ 4] + r*a[ 5];\n    double b3 = a[ 6] + r*a[ 7];\n    double b4 = a[ 8] + r*a[ 9];\n    double b5 = a[10] + r*a[11];\n    double b6 = a[12] + r*a[13];\n    double b7 = a[14] + r*a[15];\n\n    double r2 = r*r;\n    double c0 = b0 + r2*b1;\n    double c1 = b2 + r2*b3;\n    double c2 = b4 + r2*b5;\n    double c3 = b6 + r2*b7;\n\n    double r4 = r2*r2;\n    double d0 = c0 + r4*c1;\n    double d1 = c2 + r4*c3;\n\n    double r8 = r4*r4;\n    double result = d0 + r8*d1;\n\n//     if (abs(result-formula) > 1e-12) {\n//         printf(\"ERROR in potn: r=%.10f formula=%.10f result=%.10f err=%.1e\\n\",\n//                r, formula, result, formula-result);\n//         throw \"bad\";\n//     }\n\n    return result;\n}\n\n\n/// Derivative of the regularized 1/r potential\n\n/// dV/dx = (x/r) * du(r/c)/(c*c)\ndouble dsmoothed_potential(double r) {\n//      double rsq = r*r;\n//      if (r > 7.0) {\n//          return -1.0/rsq;\n//      }\n//      else if (r > 1e-2) {\n//          return -erf(r)/rsq + exp(-rsq)*(2/r - 2*r)/sqrt(madness::constants::pi);\n//      }\n//      else {\n//          return (-1.8806319451591876+(1.5797308339337176-.72538660741854381*rsq)*rsq)*r;\n//      }\n\n    // Below we have 16-term polynomial approximations generated from Chebyshev expansions\n    // computed by Maple, accurate to about 1e-14.  These are over 5x faster than\n    // the above code using gcc.  Note the use of a tree algorithm to compute the polynomials\n    // with lots of parallelism and use of FMA.\n\n    static const double lo0=0.0, hi0=0.65, m0=(hi0+lo0)*0.5;\n    static const double q0[16] = {-.55952054067648194, -1.4186837724703172, 1.3079855069574490, .89801173653480100, -.92664998851771673, -.28801593449022579, .37975455626369975, 0.55119107345331705e-1, -.10877141173737492, -0.53157122124920191e-2, 0.23855987780906309e-1, -0.39335550662218725e-3, -0.42224803990545490e-2, 0.27757150363394877e-3, 0.59449662015255330e-3, -0.61851566882100875e-4};\n\n    static const double lo1=.65, hi1=1.3, m1=(hi1+lo1)*0.5;\n    static const double q1[16] = {-.85319294453145976, .39871916999716314, .86161440627190766, -.91664151410845898, -0.47179381608173164e-1, .44169815463839599, -.13041276737306307, -.10308252655802193, 0.61601684937724164e-1, 0.11350111203259745e-1, -0.15588916300580124e-1, 0.58815593818761124e-3, 0.26813418239064462e-2, -0.50269597194697906e-3, -0.32324952206733884e-3, 0.10747689363541249e-3};\n\n    static const double lo2=1.3, hi2=2.05, m2=(hi2+lo2)*0.5;\n    static const double q2[16] = {-.42361918942412451, .54752071970870675, -.31914917137271829, -0.83673298657446777e-1, .26525917360889740, -.14704606647385246, -0.15489414991976576e-1, 0.54789663251404254e-1, -0.19295808218984080e-1, -0.59946709656351250e-2, 0.62453013421289702e-2, -0.75889771423321585e-3, -0.90288108595876188e-3, 0.35950533255739200e-3, 0.53102646864226617e-4, -0.58410284838976865e-4};\n\n    static const double lo3=2.05, hi3=2.85, m3=(hi3+lo3)*0.5;\n    static const double q3[16] = {-.17220555920881688, .16011983697724617, -.12825554624056501, 0.89384680084907880e-1, -0.40233745605529377e-1, -0.6582373116861300e-3, 0.16338415642492739e-1, -0.11773063688286990e-1, 0.28825867688662255e-2, 0.12891024069952489e-2, -0.12813889708133769e-2, 0.32788790594626357e-3, 0.95157444762995566e-4, -0.90416802462172157e-4, 0.14868602678620544e-4, 0.72371956855016211e-5};\n\n    static const double lo4=2.85, hi4=3.9, m4=(hi4+lo4)*0.5;\n    static const double q4[16] = {-0.87830594664260867e-1, 0.52274501692140091e-1, -0.23878700103915117e-1, 0.10566809233968182e-1, -0.52605680459469043e-2, 0.29752045061396727e-2, -0.16104234494416077e-2, 0.66084450440893938e-3, -0.11555273542331601e-3, -0.79814006315265824e-4, 0.82495635391798472e-4, -0.36112562130960013e-4, 0.56745127440475224e-5, 0.30778452492334783e-5, -0.23005717864408269e-5, 0.53498531579838538e-6};\n\n    static const double lo5=3.9, hi5=5.0, m5=(hi5+lo5)*0.5;\n    static const double q5[16] = {-0.50498686366854397e-1, 0.22696136873300272e-1, -0.76507833315391100e-2, 0.22934220273682421e-2, -0.64621983684159045e-3, 0.17717650067309256e-3, -0.49822348110737912e-4, 0.15950369754100344e-4, -0.64382111428954669e-5, 0.30935528834043852e-5, -0.14868198880550113e-5, 0.61815723812849196e-6, -0.19561205283581128e-6, 0.29092516398105484e-7, 0.18203712532317880e-7, -0.12991676945664683e-7};\n\n    static const double lo6=5.0, hi6=7.0, m6=(hi6+lo6)*0.5;\n    static const double q6[16] = {-0.27777777777779237e-1, 0.92592592592770810e-2, -0.23148148149286158e-2, 0.51440329259377589e-3, -0.10716735349262763e-3, 0.21433472880730380e-4, -0.41676252668392218e-5, 0.79384016105355812e-6, -0.14884727258382283e-6, 0.27571110992976271e-7, -0.50751367707046113e-8, 0.93366213261041495e-9, -0.16069628589065609e-9, 0.29406617613306847e-10, -0.15659360054098260e-10, 0.58338713932903765e-11};\n\n//     double rsq = r*r;\n//     double formula= -erf(r)/rsq + exp(-rsq)*(2/r - 2*r)/sqrt(madness::constants::pi);\n\n    const double* a;\n\n    if (r > hi6) {              // Most common case\n        return -1.0/(r*r);\n    }\n    else if (r > hi3) {\n        if (r > hi5) {\n            r -= m6;\n            a = q6;\n        }\n        else if (r > hi4) {\n            r -= m5;\n            a = q5;\n        }\n        else {\n            r -= m4;\n            a = q4;\n        }\n    }\n    else if (r > hi1) {\n        if (r > hi2) {\n            r -= m3;\n            a = q3;\n        }\n        else {\n            r -= m2;\n            a = q2;\n        }\n    }\n    else if (r > hi0) {\n        r -= m1;\n        a = q1;\n    }\n    else {\n        r -= m0;                // Least common case\n        a = q0;\n    }\n\n    double b0 = a[ 0] + r*a[ 1];\n    double b1 = a[ 2] + r*a[ 3];\n    double b2 = a[ 4] + r*a[ 5];\n    double b3 = a[ 6] + r*a[ 7];\n    double b4 = a[ 8] + r*a[ 9];\n    double b5 = a[10] + r*a[11];\n    double b6 = a[12] + r*a[13];\n    double b7 = a[14] + r*a[15];\n\n    double r2 = r*r;\n    double c0 = b0 + r2*b1;\n    double c1 = b2 + r2*b3;\n    double c2 = b4 + r2*b5;\n    double c3 = b6 + r2*b7;\n\n    double r4 = r2*r2;\n    double d0 = c0 + r4*c1;\n    double d1 = c2 + r4*c3;\n\n    double r8 = r4*r4;\n    double result = d0 + r8*d1;\n\n//     if (abs(result-formula) > 1e-12) {\n//         printf(\"ERROR in dpotn: r=%.10f formula=%.10f result=%.10f err=%.1e\\n\",\n//                r, formula, result, formula-result);\n//         throw \"bad\";\n//     }\n\n    return result;\n}\n\n/// second radial derivative of the regularized 1/r potential\n\n/// invoke as d2smoothed_potential(r*rc) * rc*rc*rc\n/// with rc the reciprocal smoothing radius\n/// d2u[r*rc]*rc*rc*rc \\approx 2/r^3\ndouble d2smoothed_potential(double r) {\n    double rsq = r*r;\n    const double sqrtpi=sqrt(madness::constants::pi);\n    if (r > 7.0) {\n        return 2.0/(rsq*r);\n    }\n    else if (r > 1e-2) {\n        double er2=exp(-rsq);\n        double e4r2=exp(-4*rsq);\n        return -(4.* er2)*sqrtpi - (4.* er2)/(sqrtpi* rsq)\n                + (-2.* er2 + 4.* er2* rsq +\n                 16.* (-8.* e4r2 + 64.* e4r2*rsq))/(3*sqrtpi)\n                 + (2.* erf(r))/(r*rsq);\n    }\n    else {\n        return\n          -134./(3. *sqrtpi) + (2582 *rsq)/(5.* sqrtpi)\n          - (35905* rsq*rsq)/(21. *sqrtpi)\n          +(86051. *rsq*rsq*rsq)/(27.0*sqrtpi);\n    }\n}\n\n\n/// Charge density corresponding to smoothed `1/r` potential\n\n/// To obtain the desired density as a function of `r`,\n///// \\f$\n/////  \\frac{\\exp(-\\frac{r^2}{c^2}) \\left(\\frac{5}{2}-\\frac{r^2}{c^2}\\right)}{\\pi ^{3/2} c^3}\n///// \\f$,\n/// invoke as \\c smoothed_density(r/c)/c^3 where \\c c is the radius of the\n/// smoothed volume.\n/// \\param rs effective distance, \\f$ r_s \\equiv r/c \\f$ , from the origin of the density\n/// \\return \\f$ \\frac{\\exp(-r_s^2) \\left(\\frac{5}{2}- r_s^2 \\right)}{\\pi^{3/2}} \\f$\ndouble smoothed_density(double rs) {\n    static const double rpithreehalf = std::pow(madness::constants::pi, -1.5);\n    double rs2 = rs*rs;\n    return exp(-rs2)*(2.5 - rs2) * rpithreehalf;\n}\n\n\n// static double smoothing_parameter_original(double Z, double eprec) {\n//     // The min is since asymptotic form not so good at low acc.\n//     // The 2 is from two electrons in 1s closed shell.\n//     if (Z == 0.0) return 1.0;\n//     double Z5 = Z*Z*Z*Z*Z;\n//     double c = pow(std::min(1e-3,eprec)/2.0/0.00435/Z5,1.0/3.0);\n//     return c;\n// }\n\n\n// static double smoothed_potential_original(double r) {\n//     // This eliminated the first 3 moments ... not such\n//     // a good idea ... 1 moment is good enough.\n//     const double THREE_SQRTPI = 5.31736155271654808184;\n//     double r2 = r*r, pot;\n//     if (r > 6.5){\n//         pot = 1.0/r;\n//     } else if (r > 1e-8){\n//         pot = erf(r)/r + (exp(-r2) + 16.0*exp(-4.0*r2))/(THREE_SQRTPI);\n//     } else{\n//         pot = (2.0 + 17.0/3.0)/sqrt(PI);\n//     }\n\n//     return pot;\n// }\n\n// static double dsmoothed_potential_original(double r)\n// {\n//     if (r < 1e-3) {\n//         const double t1 = sqrt(0.31415926535897932385e1);\n//         const double t2 = 0.1e1 / t1;\n//         const double t5 = r * r;\n//         return -0.134e3 / 0.3e1 * r * t2 + 0.2582e4 / 0.15e2 * t5 * r * t2;\n//     }\n//     else {\n//         const double t1 = r * r;\n//         const double t2 = exp(-t1);\n//         const double t5 = erf(r);\n//         const double t6 = sqrt(PI);\n//         const double t9 = t1 * r;\n//         const double t13 = exp(-0.4e1 * t1);\n//         return -(-0.6e1 * r * t2 + 0.3e1 * t5 * t6 + 0.2e1 * t9 * t2 + 0.128e3 * t9 * t13) / t6 / t1 / 0.3e1;\n//     }\n// }\n\n\n// /// Charge density corresponding to smoothed 1/r potential\n\n// /// Invoke as \\c rho(r/c)/c^3 where \\c c is the radius of the\n// /// smoothed volume.\n\n// static double smoothed_density_original(double r) {\n//     const double RPITO1P5 = 0.1795871221251665617; // 1.0/Pi^1.5\n//     return ((-3.0/2.0+(1.0/3.0)*r^2)*exp(-r^2)+(-32.0+(256.0/3.0)*r^2)*exp(-4.0*r^2))*RPITO1P5;\n// }\n\n}\n"
  },
  {
    "path": "src/madness/chem/atomutil.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#ifndef MADNESS_CHEM_ATOMUTIL_H__INCLUDED\n#define MADNESS_CHEM_ATOMUTIL_H__INCLUDED\n\n#include <string>\n\n/// \\file atomutil.h\n/// \\brief Declaration of utility class and functions for atom\n\nnamespace madness {\nstruct AtomicData  {\n    // !!! The order of declaration here must match the order in the initializer !!!\n\n    // Nuclear info from L. Visscher and K.G. Dyall, Dirac-Fock\n    // atomic electronic structure calculations using different\n    // nuclear charge distributions, Atom. Data Nucl. Data Tabl., 67,\n    // (1997), 207.\n    //\n    // http://dirac.chem.sdu.dk/doc/FiniteNuclei/FiniteNuclei.shtml\n    const char* const symbol;\n    const char* const symbol_lowercase;\n    const unsigned int atomic_number;\n    const int isotope_number;\n    const double nuclear_radius;     ///< Radius of the nucleus for the finite nucleus models (in atomic units).\n    const double nuclear_half_charge_radius; ///< Half charge radius in the Fermi Model (in atomic units).\n    const double nuclear_gaussian_exponent; ///< Exponential parameter in the Gaussian Model (in atomic units).\n\n    /// Covalent radii stolen without shame from NWChem\n    const double covalent_radius;\n    const double mass;              ///< the atomic mass\n\n\n};\n\nconst AtomicData& get_atomic_data(unsigned int atn);\n\nunsigned int symbol_to_atomic_number(const std::string& symbol);\nstd::string atomic_number_to_symbol(const unsigned int atomic_number);\n\nbool check_if_pseudo_atom(const std::string& symbol);\n\ndouble smoothing_parameter(double Z, double eprec);\ndouble smoothed_potential(double r);\ndouble dsmoothed_potential(double r);\ndouble d2smoothed_potential(double r);\ndouble smoothed_density(double r);\n}\n#endif\n\n"
  },
  {
    "path": "src/madness/chem/aug-cc-pvdz",
    "content": "<?xml version=\"1.0\" ?>\n<name>\n   aug-cc-pvdz\n</name>\n<basis symbol=\"H\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      13.01000000\n      1.96200000\n      0.44460000\n    </exponents>\n    <coefficients>\n      0.01968500\n      0.13797700\n      0.47814800\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.12200000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.02974000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.72700000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.14100000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"He\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      38.36000000\n      5.77000000\n      1.24000000\n    </exponents>\n    <coefficients>\n      0.02380900\n      0.15489100\n      0.46998700\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.29760000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.07255000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      1.27500000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.24730000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Li\">\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      1469.00000000\n      220.50000000\n      50.26000000\n      14.24000000\n      4.58100000\n      1.58000000\n      0.56400000\n      0.07345000\n    </exponents>\n    <coefficients>\n      0.00076600\n      0.00589200\n      0.02967100\n      0.10918000\n      0.28278900\n      0.45312300\n      0.27477400\n      0.00975100\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      1469.00000000\n      220.50000000\n      50.26000000\n      14.24000000\n      4.58100000\n      1.58000000\n      0.56400000\n      0.07345000\n    </exponents>\n    <coefficients>\n      -0.00012000\n      -0.00092300\n      -0.00468900\n      -0.01768200\n      -0.04890200\n      -0.09600900\n      -0.13638000\n      0.57510200\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.02805000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.00864000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      1.53400000\n      0.27490000\n      0.07362000\n    </exponents>\n    <coefficients>\n      0.02278400\n      0.13910700\n      0.50037500\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.02403000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.00579000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.12390000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.07250000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Be\">\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      2940.00000000\n      441.20000000\n      100.50000000\n      28.43000000\n      9.16900000\n      3.19600000\n      1.15900000\n      0.18110000\n    </exponents>\n    <coefficients>\n      0.00068000\n      0.00523600\n      0.02660600\n      0.09999300\n      0.26970200\n      0.45146900\n      0.29507400\n      0.01258700\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      2940.00000000\n      441.20000000\n      100.50000000\n      28.43000000\n      9.16900000\n      3.19600000\n      1.15900000\n      0.18110000\n    </exponents>\n    <coefficients>\n      -0.00012300\n      -0.00096600\n      -0.00483100\n      -0.01931400\n      -0.05328000\n      -0.12072300\n      -0.13343500\n      0.53076700\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.05890000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.01877000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      3.61900000\n      0.71100000\n      0.19510000\n    </exponents>\n    <coefficients>\n      0.02911100\n      0.16936500\n      0.51345800\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.06018000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.00850000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.23800000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.07400000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"B\">\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      4570.00000000\n      685.90000000\n      156.50000000\n      44.47000000\n      14.48000000\n      5.13100000\n      1.89800000\n      0.33290000\n    </exponents>\n    <coefficients>\n      0.00069600\n      0.00535300\n      0.02713400\n      0.10138000\n      0.27205500\n      0.44840300\n      0.29012300\n      0.01432200\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      4570.00000000\n      685.90000000\n      156.50000000\n      44.47000000\n      14.48000000\n      5.13100000\n      1.89800000\n      0.33290000\n    </exponents>\n    <coefficients>\n      -0.00013900\n      -0.00109700\n      -0.00544400\n      -0.02191600\n      -0.05975100\n      -0.13873200\n      -0.13148200\n      0.53952600\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.10430000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.03105000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      6.00100000\n      1.24100000\n      0.33640000\n    </exponents>\n    <coefficients>\n      0.03548100\n      0.19807200\n      0.50523000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.09538000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.02378000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.34300000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.09040000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"C\">\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      6665.00000000\n      1000.00000000\n      228.00000000\n      64.71000000\n      21.06000000\n      7.49500000\n      2.79700000\n      0.52150000\n    </exponents>\n    <coefficients>\n      0.00069200\n      0.00532900\n      0.02707700\n      0.10171800\n      0.27474000\n      0.44856400\n      0.28507400\n      0.01520400\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      6665.00000000\n      1000.00000000\n      228.00000000\n      64.71000000\n      21.06000000\n      7.49500000\n      2.79700000\n      0.52150000\n    </exponents>\n    <coefficients>\n      -0.00014600\n      -0.00115400\n      -0.00572500\n      -0.02331200\n      -0.06395500\n      -0.14998100\n      -0.12726200\n      0.54452900\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.15960000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.04690000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      9.43900000\n      2.00200000\n      0.54560000\n    </exponents>\n    <coefficients>\n      0.03810900\n      0.20948000\n      0.50855700\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.15170000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.04041000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.55000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.15100000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"N\">\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      9046.00000000\n      1357.00000000\n      309.30000000\n      87.73000000\n      28.56000000\n      10.21000000\n      3.83800000\n      0.74660000\n    </exponents>\n    <coefficients>\n      0.00070000\n      0.00538900\n      0.02740600\n      0.10320700\n      0.27872300\n      0.44854000\n      0.27823800\n      0.01544000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      9046.00000000\n      1357.00000000\n      309.30000000\n      87.73000000\n      28.56000000\n      10.21000000\n      3.83800000\n      0.74660000\n    </exponents>\n    <coefficients>\n      -0.00015300\n      -0.00120800\n      -0.00599200\n      -0.02454400\n      -0.06745900\n      -0.15807800\n      -0.12183100\n      0.54900300\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.22480000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.06124000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      13.55000000\n      2.91700000\n      0.79730000\n    </exponents>\n    <coefficients>\n      0.03991900\n      0.21716900\n      0.51031900\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.21850000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.05611000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.81700000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.23000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"O\">\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      11720.00000000\n      1759.00000000\n      400.80000000\n      113.70000000\n      37.03000000\n      13.27000000\n      5.02500000\n      1.01300000\n    </exponents>\n    <coefficients>\n      0.00071000\n      0.00547000\n      0.02783700\n      0.10480000\n      0.28306200\n      0.44871900\n      0.27095200\n      0.01545800\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      11720.00000000\n      1759.00000000\n      400.80000000\n      113.70000000\n      37.03000000\n      13.27000000\n      5.02500000\n      1.01300000\n    </exponents>\n    <coefficients>\n      -0.00016000\n      -0.00126300\n      -0.00626700\n      -0.02571600\n      -0.07092400\n      -0.16541100\n      -0.11695500\n      0.55736800\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.30230000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.07896000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      17.70000000\n      3.85400000\n      1.04600000\n    </exponents>\n    <coefficients>\n      0.04301800\n      0.22891300\n      0.50872800\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.27530000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.06856000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      1.18500000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.33200000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"F\">\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      14710.00000000\n      2207.00000000\n      502.80000000\n      142.60000000\n      46.47000000\n      16.70000000\n      6.35600000\n      1.31600000\n    </exponents>\n    <coefficients>\n      0.00072100\n      0.00555300\n      0.02826700\n      0.10644400\n      0.28681400\n      0.44864100\n      0.26476100\n      0.01533300\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      14710.00000000\n      2207.00000000\n      502.80000000\n      142.60000000\n      46.47000000\n      16.70000000\n      6.35600000\n      1.31600000\n    </exponents>\n    <coefficients>\n      -0.00016500\n      -0.00130800\n      -0.00649500\n      -0.02669100\n      -0.07369000\n      -0.17077600\n      -0.11232700\n      0.56281400\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.38970000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.09863000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      22.67000000\n      4.97700000\n      1.34700000\n    </exponents>\n    <coefficients>\n      0.04487800\n      0.23571800\n      0.50852100\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.34710000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.08502000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      1.64000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.46400000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ne\">\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      17880.00000000\n      2683.00000000\n      611.50000000\n      173.50000000\n      56.64000000\n      20.42000000\n      7.81000000\n      1.65300000\n    </exponents>\n    <coefficients>\n      0.00073800\n      0.00567700\n      0.02888300\n      0.10854000\n      0.29090700\n      0.44832400\n      0.25802600\n      0.01506300\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"8\">\n    <exponents>\n      17880.00000000\n      2683.00000000\n      611.50000000\n      173.50000000\n      56.64000000\n      20.42000000\n      7.81000000\n      1.65300000\n    </exponents>\n    <coefficients>\n      -0.00017200\n      -0.00135700\n      -0.00673700\n      -0.02766300\n      -0.07620800\n      -0.17522700\n      -0.10703800\n      0.56705000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.48690000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.12300000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"3\">\n    <exponents>\n      28.39000000\n      6.27000000\n      1.69500000\n    </exponents>\n    <coefficients>\n      0.04608700\n      0.24018100\n      0.50874400\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.43170000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.10640000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      2.20200000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.63100000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Na\">\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      31700.00000000\n      4755.00000000\n      1082.00000000\n      306.40000000\n      99.53000000\n      35.42000000\n      13.30000000\n      4.39200000\n      1.67600000\n      0.58890000\n      0.05640000\n    </exponents>\n    <coefficients>\n      0.00045888\n      0.00355070\n      0.01826180\n      0.07166500\n      0.21234600\n      0.41620300\n      0.37302000\n      0.06250540\n      -0.00624532\n      0.00243374\n      -0.00044238\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      31700.00000000\n      4755.00000000\n      1082.00000000\n      306.40000000\n      99.53000000\n      35.42000000\n      13.30000000\n      4.39200000\n      1.67600000\n      0.58890000\n      0.05640000\n    </exponents>\n    <coefficients>\n      -0.00011216\n      -0.00086851\n      -0.00451330\n      -0.01814360\n      -0.05807990\n      -0.13765300\n      -0.19390800\n      0.08580090\n      0.60441900\n      0.44171900\n      0.01305470\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      31700.00000000\n      4755.00000000\n      1082.00000000\n      306.40000000\n      99.53000000\n      35.42000000\n      13.30000000\n      4.39200000\n      1.67600000\n      0.58890000\n      0.05640000\n    </exponents>\n    <coefficients>\n      0.00001702\n      0.00013069\n      0.00068778\n      0.00272359\n      0.00895529\n      0.02078320\n      0.03193800\n      -0.01913680\n      -0.10259500\n      -0.19894500\n      0.65595200\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.02307000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.00725000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      138.10000000\n      32.24000000\n      9.98500000\n      3.48400000\n      1.23100000\n      0.41770000\n      0.06513000\n    </exponents>\n    <coefficients>\n      0.00579641\n      0.04157560\n      0.16287300\n      0.35940100\n      0.44998800\n      0.22750700\n      0.00808247\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      138.10000000\n      32.24000000\n      9.98500000\n      3.48400000\n      1.23100000\n      0.41770000\n      0.06513000\n    </exponents>\n    <coefficients>\n      -0.00058153\n      -0.00407306\n      -0.01679370\n      -0.03532680\n      -0.05219710\n      -0.01683590\n      0.43461300\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.02053000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.00633000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.09730000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.04680000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mg\">\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      47390.00000000\n      7108.00000000\n      1618.00000000\n      458.40000000\n      149.30000000\n      53.59000000\n      20.70000000\n      8.38400000\n      2.54200000\n      0.87870000\n      0.10770000\n    </exponents>\n    <coefficients>\n      0.00034602\n      0.00268077\n      0.01383670\n      0.05517670\n      0.16966000\n      0.36470300\n      0.40685600\n      0.13508900\n      0.00490884\n      0.00028646\n      0.00002646\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      47390.00000000\n      7108.00000000\n      1618.00000000\n      458.40000000\n      149.30000000\n      53.59000000\n      20.70000000\n      8.38400000\n      2.54200000\n      0.87870000\n      0.10770000\n    </exponents>\n    <coefficients>\n      -0.00008778\n      -0.00067473\n      -0.00355603\n      -0.01421540\n      -0.04767480\n      -0.11489200\n      -0.20067600\n      -0.03412240\n      0.57045400\n      0.54230900\n      0.02181280\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      47390.00000000\n      7108.00000000\n      1618.00000000\n      458.40000000\n      149.30000000\n      53.59000000\n      20.70000000\n      8.38400000\n      2.54200000\n      0.87870000\n      0.10770000\n    </exponents>\n    <coefficients>\n      0.00001696\n      0.00012987\n      0.00068883\n      0.00273533\n      0.00931224\n      0.02232650\n      0.04111950\n      0.00545642\n      -0.13401200\n      -0.25617600\n      0.60585600\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.03999000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.01488000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      179.90000000\n      42.14000000\n      13.13000000\n      4.62800000\n      1.67000000\n      0.58570000\n      0.13110000\n    </exponents>\n    <coefficients>\n      0.00538161\n      0.03924180\n      0.15744500\n      0.35853500\n      0.45722600\n      0.21591800\n      0.00664948\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      179.90000000\n      42.14000000\n      13.13000000\n      4.62800000\n      1.67000000\n      0.58570000\n      0.13110000\n    </exponents>\n    <coefficients>\n      -0.00086595\n      -0.00615978\n      -0.02615190\n      -0.05706470\n      -0.08739060\n      -0.01229900\n      0.50208500\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.04112000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.00935000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.18700000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.05950000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Al\">\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      64150.00000000\n      9617.00000000\n      2189.00000000\n      620.50000000\n      202.70000000\n      73.15000000\n      28.55000000\n      11.77000000\n      3.30000000\n      1.17300000\n      0.17520000\n    </exponents>\n    <coefficients>\n      0.00029025\n      0.00225064\n      0.01164590\n      0.04673770\n      0.14629900\n      0.33028300\n      0.41586100\n      0.18925300\n      0.01158890\n      -0.00128385\n      0.00042588\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      64150.00000000\n      9617.00000000\n      2189.00000000\n      620.50000000\n      202.70000000\n      73.15000000\n      28.55000000\n      11.77000000\n      3.30000000\n      1.17300000\n      0.17520000\n    </exponents>\n    <coefficients>\n      -0.00007580\n      -0.00058179\n      -0.00308113\n      -0.01231120\n      -0.04197810\n      -0.10337100\n      -0.19630800\n      -0.08300020\n      0.54104000\n      0.57879600\n      0.02881470\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      64150.00000000\n      9617.00000000\n      2189.00000000\n      620.50000000\n      202.70000000\n      73.15000000\n      28.55000000\n      11.77000000\n      3.30000000\n      1.17300000\n      0.17520000\n    </exponents>\n    <coefficients>\n      0.00001751\n      0.00013421\n      0.00071244\n      0.00284330\n      0.00976842\n      0.02418500\n      0.04749930\n      0.02036210\n      -0.15878800\n      -0.31169400\n      0.62014700\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.06473000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.02310000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      258.80000000\n      60.89000000\n      19.14000000\n      6.88100000\n      2.57400000\n      0.95720000\n      0.20990000\n    </exponents>\n    <coefficients>\n      0.00406847\n      0.03068150\n      0.12914900\n      0.32083100\n      0.45381500\n      0.27506600\n      0.01908070\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      258.80000000\n      60.89000000\n      19.14000000\n      6.88100000\n      2.57400000\n      0.95720000\n      0.20990000\n    </exponents>\n    <coefficients>\n      -0.00074805\n      -0.00545796\n      -0.02453710\n      -0.05821380\n      -0.09837560\n      -0.02600640\n      0.46402000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.05986000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.01530000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.18900000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.05350000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Si\">\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      78860.00000000\n      11820.00000000\n      2692.00000000\n      763.40000000\n      249.60000000\n      90.28000000\n      35.29000000\n      14.51000000\n      4.05300000\n      1.48200000\n      0.25170000\n    </exponents>\n    <coefficients>\n      0.00027044\n      0.00209717\n      0.01085060\n      0.04367540\n      0.13765300\n      0.31664400\n      0.41858100\n      0.21021200\n      0.01449520\n      -0.00203590\n      0.00062419\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      78860.00000000\n      11820.00000000\n      2692.00000000\n      763.40000000\n      249.60000000\n      90.28000000\n      35.29000000\n      14.51000000\n      4.05300000\n      1.48200000\n      0.25170000\n    </exponents>\n    <coefficients>\n      -0.00007232\n      -0.00055512\n      -0.00293805\n      -0.01176870\n      -0.04029070\n      -0.10060900\n      -0.19652800\n      -0.10238200\n      0.52719000\n      0.59325100\n      0.03326520\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      78860.00000000\n      11820.00000000\n      2692.00000000\n      763.40000000\n      249.60000000\n      90.28000000\n      35.29000000\n      14.51000000\n      4.05300000\n      1.48200000\n      0.25170000\n    </exponents>\n    <coefficients>\n      0.00001851\n      0.00014224\n      0.00075219\n      0.00302279\n      0.01036770\n      0.02625630\n      0.05239890\n      0.02909590\n      -0.17800300\n      -0.34687400\n      0.62302000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.09243000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.03320000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      315.90000000\n      74.42000000\n      23.48000000\n      8.48800000\n      3.21700000\n      1.22900000\n      0.29640000\n    </exponents>\n    <coefficients>\n      0.00392656\n      0.02988110\n      0.12721200\n      0.32094300\n      0.45542900\n      0.26856300\n      0.01883360\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      315.90000000\n      74.42000000\n      23.48000000\n      8.48800000\n      3.21700000\n      1.22900000\n      0.29640000\n    </exponents>\n    <coefficients>\n      -0.00085830\n      -0.00630328\n      -0.02882550\n      -0.06945600\n      -0.11949300\n      -0.01995810\n      0.51026800\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.08768000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.02500000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.27500000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.08230000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"P\">\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      94840.00000000\n      14220.00000000\n      3236.00000000\n      917.10000000\n      299.50000000\n      108.10000000\n      42.18000000\n      17.28000000\n      4.85800000\n      1.81800000\n      0.33720000\n    </exponents>\n    <coefficients>\n      0.00025551\n      0.00198193\n      0.01027600\n      0.04148230\n      0.13198400\n      0.30866200\n      0.42064700\n      0.22287800\n      0.01640350\n      -0.00254255\n      0.00074805\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      94840.00000000\n      14220.00000000\n      3236.00000000\n      917.10000000\n      299.50000000\n      108.10000000\n      42.18000000\n      17.28000000\n      4.85800000\n      1.81800000\n      0.33720000\n    </exponents>\n    <coefficients>\n      -0.00006969\n      -0.00053527\n      -0.00283709\n      -0.01139830\n      -0.03929290\n      -0.09963640\n      -0.19798300\n      -0.11486000\n      0.51859500\n      0.60184700\n      0.03686120\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      94840.00000000\n      14220.00000000\n      3236.00000000\n      917.10000000\n      299.50000000\n      108.10000000\n      42.18000000\n      17.28000000\n      4.85800000\n      1.81800000\n      0.33720000\n    </exponents>\n    <coefficients>\n      0.00001912\n      0.00014722\n      0.00077791\n      0.00314546\n      0.01082000\n      0.02799570\n      0.05639780\n      0.03581900\n      -0.19338700\n      -0.37209700\n      0.62424600\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.12320000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.04170000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      370.50000000\n      87.33000000\n      27.59000000\n      10.00000000\n      3.82500000\n      1.49400000\n      0.39210000\n    </exponents>\n    <coefficients>\n      0.00395005\n      0.03024920\n      0.12955400\n      0.32759400\n      0.45699200\n      0.25308600\n      0.01687980\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      370.50000000\n      87.33000000\n      27.59000000\n      10.00000000\n      3.82500000\n      1.49400000\n      0.39210000\n    </exponents>\n    <coefficients>\n      -0.00095983\n      -0.00711177\n      -0.03271220\n      -0.07957840\n      -0.13501600\n      -0.00910585\n      0.53780200\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.11860000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.03430000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.37300000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.11300000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"S\">\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      110800.00000000\n      16610.00000000\n      3781.00000000\n      1071.00000000\n      349.80000000\n      126.30000000\n      49.26000000\n      20.16000000\n      5.72000000\n      2.18200000\n      0.43270000\n    </exponents>\n    <coefficients>\n      0.00024764\n      0.00192026\n      0.00996192\n      0.04029750\n      0.12860400\n      0.30348000\n      0.42143200\n      0.23078100\n      0.01789710\n      -0.00297516\n      0.00084952\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      110800.00000000\n      16610.00000000\n      3781.00000000\n      1071.00000000\n      349.80000000\n      126.30000000\n      49.26000000\n      20.16000000\n      5.72000000\n      2.18200000\n      0.43270000\n    </exponents>\n    <coefficients>\n      -0.00006870\n      -0.00052768\n      -0.00279671\n      -0.01126510\n      -0.03888340\n      -0.09950250\n      -0.19974000\n      -0.12336000\n      0.51319400\n      0.60712000\n      0.03967530\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      110800.00000000\n      16610.00000000\n      3781.00000000\n      1071.00000000\n      349.80000000\n      126.30000000\n      49.26000000\n      20.16000000\n      5.72000000\n      2.18200000\n      0.43270000\n    </exponents>\n    <coefficients>\n      0.00001991\n      0.00015348\n      0.00080950\n      0.00328974\n      0.01129670\n      0.02963850\n      0.05998510\n      0.04132480\n      -0.20747400\n      -0.39288900\n      0.63284000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.15700000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.05070000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      399.70000000\n      94.19000000\n      29.75000000\n      10.77000000\n      4.11900000\n      1.62500000\n      0.47260000\n    </exponents>\n    <coefficients>\n      0.00447541\n      0.03417080\n      0.14425000\n      0.35392800\n      0.45908500\n      0.20638300\n      0.01021410\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      399.70000000\n      94.19000000\n      29.75000000\n      10.77000000\n      4.11900000\n      1.62500000\n      0.47260000\n    </exponents>\n    <coefficients>\n      -0.00116251\n      -0.00865664\n      -0.03908860\n      -0.09346250\n      -0.14799400\n      0.03019040\n      0.56157300\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.14070000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.03990000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.47900000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.15200000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cl\">\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      127900.00000000\n      19170.00000000\n      4363.00000000\n      1236.00000000\n      403.60000000\n      145.70000000\n      56.81000000\n      23.23000000\n      6.64400000\n      2.57500000\n      0.53710000\n    </exponents>\n    <coefficients>\n      0.00024115\n      0.00187095\n      0.00970827\n      0.03931530\n      0.12593200\n      0.29934100\n      0.42188600\n      0.23720100\n      0.01915310\n      -0.00334792\n      0.00092988\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      127900.00000000\n      19170.00000000\n      4363.00000000\n      1236.00000000\n      403.60000000\n      145.70000000\n      56.81000000\n      23.23000000\n      6.64400000\n      2.57500000\n      0.53710000\n    </exponents>\n    <coefficients>\n      -0.00006789\n      -0.00052184\n      -0.00276513\n      -0.01115370\n      -0.03859190\n      -0.09948480\n      -0.20139200\n      -0.13031300\n      0.50944300\n      0.61072500\n      0.04215490\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      127900.00000000\n      19170.00000000\n      4363.00000000\n      1236.00000000\n      403.60000000\n      145.70000000\n      56.81000000\n      23.23000000\n      6.64400000\n      2.57500000\n      0.53710000\n    </exponents>\n    <coefficients>\n      0.00002050\n      0.00015830\n      0.00083364\n      0.00339880\n      0.01167380\n      0.03096220\n      0.06295330\n      0.04602570\n      -0.21931200\n      -0.40877300\n      0.63846500\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.19380000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.06080000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      417.60000000\n      98.33000000\n      31.04000000\n      11.19000000\n      4.24900000\n      1.62400000\n      0.53220000\n    </exponents>\n    <coefficients>\n      0.00525982\n      0.03983320\n      0.16465500\n      0.38732200\n      0.45707200\n      0.15163600\n      0.00181615\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      417.60000000\n      98.33000000\n      31.04000000\n      11.19000000\n      4.24900000\n      1.62400000\n      0.53220000\n    </exponents>\n    <coefficients>\n      -0.00143570\n      -0.01077960\n      -0.04700750\n      -0.11103000\n      -0.15327500\n      0.08946090\n      0.57944400\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.16200000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.04660000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.60000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.19600000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ar\">\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      145700.00000000\n      21840.00000000\n      4972.00000000\n      1408.00000000\n      459.70000000\n      165.90000000\n      64.69000000\n      26.44000000\n      7.62800000\n      2.99600000\n      0.65040000\n    </exponents>\n    <coefficients>\n      0.00023670\n      0.00183523\n      0.00952860\n      0.03862830\n      0.12408100\n      0.29647100\n      0.42206800\n      0.24171100\n      0.02005090\n      -0.00361000\n      0.00097561\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      145700.00000000\n      21840.00000000\n      4972.00000000\n      1408.00000000\n      459.70000000\n      165.90000000\n      64.69000000\n      26.44000000\n      7.62800000\n      2.99600000\n      0.65040000\n    </exponents>\n    <coefficients>\n      -0.00006749\n      -0.00051852\n      -0.00274825\n      -0.01110070\n      -0.03848200\n      -0.09975990\n      -0.20308800\n      -0.13560800\n      0.50719500\n      0.61289800\n      0.04429680\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"11\">\n    <exponents>\n      145700.00000000\n      21840.00000000\n      4972.00000000\n      1408.00000000\n      459.70000000\n      165.90000000\n      64.69000000\n      26.44000000\n      7.62800000\n      2.99600000\n      0.65040000\n    </exponents>\n    <coefficients>\n      0.00002105\n      0.00016257\n      0.00085546\n      0.00349745\n      0.01201560\n      0.03213680\n      0.06552790\n      0.04993700\n      -0.22976900\n      -0.42100600\n      0.64233100\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.23370000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.07090000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      453.70000000\n      106.80000000\n      33.73000000\n      12.13000000\n      4.59400000\n      1.67800000\n      0.59090000\n    </exponents>\n    <coefficients>\n      0.00570555\n      0.04304600\n      0.17659100\n      0.40686300\n      0.45254900\n      0.12280100\n      -0.00445996\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"7\">\n    <exponents>\n      453.70000000\n      106.80000000\n      33.73000000\n      12.13000000\n      4.59400000\n      1.67800000\n      0.59090000\n    </exponents>\n    <coefficients>\n      -0.00160655\n      -0.01217140\n      -0.05207890\n      -0.12373700\n      -0.15161900\n      0.14242500\n      0.58450100\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.18520000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.05330000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.73800000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.24000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<atomicguess symbol=\"H\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     0.31111      0.27617      0.03323      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.27617      0.24515      0.02949      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03323      0.02949      0.00355      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -0.26829      0.03143      0.15257      0.15257      0.15257      0.51954      1.45112      1.45112      1.45112 \n   </alphaeps>\n   <betaeps>\n    -0.49933     -0.12187     -0.04786     -0.04786     -0.04786      0.31851      1.21442      1.21442      1.21442 \n   </betaeps>\n   <alphavectors>\n     0.55777     -0.22516      0.00000     -0.00000     -0.00000     -1.33645      0.00000     -0.00000      0.00000 \n     0.49513     -0.59233      0.00000     -0.00000     -0.00000      1.81847     -0.00000      0.00000     -0.00000 \n     0.05957      1.29570     -0.00000      0.00000      0.00000     -0.77491      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.01372     -0.00000     -0.00000      0.00000      1.13110      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.01372      0.00000     -0.00000      0.00000      1.13110      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.01372      0.00000     -0.00000      0.00000      1.13110 \n     0.00000      0.00000      0.99351      0.00000      0.00000     -0.00000     -0.54084      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.99351     -0.00000     -0.00000      0.00000     -0.54084      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.99351     -0.00000      0.00000     -0.00000     -0.54084 \n   </alphavectors>\n   <betavectors>\n     0.58919     -0.26998      0.00000     -0.00000     -0.00000     -1.31448     -0.00000      0.00000      0.00000 \n     0.48966     -0.47434      0.00000     -0.00000     -0.00000      1.85420      0.00000     -0.00000     -0.00000 \n     0.01678      1.25484     -0.00000      0.00000      0.00000     -0.84140      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.03005     -0.00000      0.00000      0.00000      1.13078      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.03005     -0.00000      1.13078     -0.00000      0.00000 \n     0.00000      0.00000      0.03005     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.13078 \n    -0.00000      0.00000     -0.00000      0.98560     -0.00000      0.00000      0.00000     -0.55513      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.98560      0.00000     -0.55513     -0.00000      0.00000 \n     0.00000      0.00000      0.98560      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.55513 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"He\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     0.67498      0.56890      0.06740      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.56890      0.47949      0.05681      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06740      0.05681      0.00673      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -0.56939      0.10135      0.35416      0.35416      0.35416      1.38637      2.60918      2.60918      2.60918 \n   </alphaeps>\n   <betaeps>\n    -0.56939      0.10135      0.35416      0.35416      0.35416      1.38637      2.60918      2.60918      2.60918 \n   </betaeps>\n   <alphavectors>\n     0.58094     -0.20975     -0.00000      0.00000     -0.00000     -1.21784      0.00000     -0.00000      0.00000 \n     0.48964     -0.60262     -0.00000      0.00000     -0.00000      1.68846      0.00000      0.00000     -0.00000 \n     0.05801      1.29999      0.00000     -0.00000      0.00000     -0.73358     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00685     -0.00000      0.00000      0.00000      0.00000      1.13118 \n    -0.00000     -0.00000      0.00685     -0.00000      0.00000      0.00000      1.13118      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00685     -0.00000      0.00000      1.13118     -0.00000 \n    -0.00000      0.00000      0.00000      0.99678      0.00000     -0.00000     -0.00000     -0.00000     -0.53483 \n    -0.00000     -0.00000      0.99678      0.00000     -0.00000     -0.00000     -0.53483      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.99678      0.00000     -0.00000     -0.53483     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.58094     -0.20975      0.00000     -0.00000     -0.00000     -1.21784      0.00000     -0.00000     -0.00000 \n     0.48964     -0.60262      0.00000     -0.00000     -0.00000      1.68846     -0.00000      0.00000      0.00000 \n     0.05801      1.29999     -0.00000      0.00000      0.00000     -0.73358      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00685     -0.00000      0.00000     -0.00000      1.13118 \n     0.00000      0.00000      0.00685     -0.00000     -0.00000     -0.00000      0.00000      1.13118     -0.00000 \n     0.00000     -0.00000      0.00000      0.00685     -0.00000      0.00000      1.13118      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.99678      0.00000     -0.00000      0.00000     -0.53483 \n     0.00000      0.00000      0.99678      0.00000      0.00000     -0.00000      0.00000     -0.53483     -0.00000 \n     0.00000     -0.00000      0.00000      0.99678      0.00000     -0.00000     -0.53483      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Li\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.06003      0.14039      0.01696     -0.00878      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05407      0.00000      0.00000     -0.05407      0.00000     -0.05407     -0.01370      0.00000      0.00000     -0.01370      0.00000     -0.01370 \n     0.14039      0.29072      0.29954     -0.00617      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00405      0.00000      0.00000     -0.00405      0.00000     -0.00405     -0.01099      0.00000      0.00000     -0.01099      0.00000     -0.01099 \n     0.01696      0.29954      0.31693     -0.00599      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00081      0.00000      0.00000     -0.00081      0.00000     -0.00081     -0.01079      0.00000      0.00000     -0.01079      0.00000     -0.01079 \n    -0.00878     -0.00617     -0.00599      0.00015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00024      0.00000      0.00000      0.00024      0.00000      0.00024      0.00026      0.00000      0.00000      0.00026      0.00000      0.00026 \n     0.00000      0.00000      0.00000      0.00000      0.00199      0.00000      0.00000      0.00142      0.00000      0.00000      0.00012      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00199      0.00000      0.00000      0.00142      0.00000      0.00000      0.00012      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00199      0.00000      0.00000      0.00142      0.00000      0.00000      0.00012      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00142      0.00000      0.00000      0.00102      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00142      0.00000      0.00000      0.00102      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00142      0.00000      0.00000      0.00102      0.00000      0.00000      0.00009      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00012      0.00000      0.00000      0.00009      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00012      0.00000      0.00000      0.00009      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00012      0.00000      0.00000      0.00009      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05407     -0.00405     -0.00081      0.00024      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00143      0.00000      0.00000      0.00143      0.00000      0.00143      0.00037      0.00000      0.00000      0.00037      0.00000      0.00037 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05407     -0.00405     -0.00081      0.00024      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00143      0.00000      0.00000      0.00143      0.00000      0.00143      0.00037      0.00000      0.00000      0.00037      0.00000      0.00037 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05407     -0.00405     -0.00081      0.00024      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00143      0.00000      0.00000      0.00143      0.00000      0.00143      0.00037      0.00000      0.00000      0.00037      0.00000      0.00037 \n    -0.01370     -0.01099     -0.01079      0.00026      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00037      0.00000      0.00000      0.00037      0.00000      0.00037      0.00045      0.00000      0.00000      0.00045      0.00000      0.00045 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01370     -0.01099     -0.01079      0.00026      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00037      0.00000      0.00000      0.00037      0.00000      0.00037      0.00045      0.00000      0.00000      0.00045      0.00000      0.00045 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01370     -0.01099     -0.01079      0.00026      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00037      0.00000      0.00000      0.00037      0.00000      0.00037      0.00045      0.00000      0.00000      0.00045      0.00000      0.00045 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.98517      0.00494      0.00494      0.00494      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -1.86983     -0.11694     -0.04970     -0.04970     -0.04970      0.00069      0.00933      0.00933      0.00933      0.07114      0.07114      0.07114      0.09626      0.09626      0.09626      0.09626      0.09626      0.12607      0.33600      0.40577      0.40577      0.40577      0.40577      0.40577      0.81835 \n   </alphaeps>\n   <betaeps>\n    -1.86264     -0.07776     -0.02056     -0.02056     -0.02056      0.00636      0.01397      0.01397      0.01397      0.09243      0.09243      0.09243      0.12332      0.12332      0.12332      0.12332      0.12332      0.14789      0.35235      0.44768      0.44768      0.44768      0.44768      0.44768      0.84915 \n   </betaeps>\n   <alphavectors>\n     1.01618     -0.02029     -0.00000     -0.00000     -0.00000      0.01392     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.70140     -1.29788      0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.37574 \n     0.07978      0.53273      0.00000      0.00000      0.00000     -0.21796      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -2.13449     -2.31215     -0.00000     -0.00000     -0.00000      0.00000      0.00000      7.30555 \n     0.01185      0.56683      0.00000      0.00000      0.00000     -0.90539      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      2.82423      6.74178     -0.00000      0.00000      0.00000      0.00000     -0.00000     -5.48896 \n    -0.00399     -0.01050     -0.00000     -0.00000     -0.00000      1.47594     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.23332     -1.38790      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.90065 \n     0.00000     -0.00000     -0.00000     -0.00000      0.63452     -0.00000     -0.28511      0.00000      0.00000      0.00000     -1.13746     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.63452      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.28511     -0.00000      0.00000     -1.13746     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.63452     -0.00000      0.00000     -0.00000     -0.28511     -0.00000     -1.13746     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.45407     -0.00000     -0.19057     -0.00000     -0.00000      0.00000      1.50214     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.45407      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.19057     -0.00000      0.00000      1.50214      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.45407     -0.00000      0.00000     -0.00000     -0.19057      0.00000      1.50214     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.03941      0.00000      1.07106      0.00000      0.00000      0.00000     -0.64482     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.03941     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.07106     -0.00000     -0.00000     -0.64482     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.03941      0.00000     -0.00000      0.00000      1.07106     -0.00000     -0.64482     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.02835     -0.00013     -0.00000     -0.00000     -0.00000     -0.02735      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.10405     -0.35393     -0.00000      0.00000      0.00000     -0.05298      0.63804     -0.76769      1.95503      0.00000      0.00000     -0.00000     -3.44842 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.63897     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      3.63792     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.63897     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      3.63792     -0.00000     -0.00000      0.00000 \n    -0.02835     -0.00013     -0.00000     -0.00000     -0.00000     -0.02735      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.35854      0.08686      0.00000     -0.00000     -0.00000     -0.05298      0.63804      2.07695     -0.31268     -0.00000     -0.00000      0.00000     -3.44842 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.63897      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      3.63792      0.00000      0.00000 \n    -0.02835     -0.00013     -0.00000     -0.00000     -0.00000     -0.02735      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.25449      0.26707     -0.00000      0.00000      0.00000     -0.05298      0.63804     -1.30926     -1.64235     -0.00000     -0.00000      0.00000     -3.44842 \n    -0.00644     -0.01898     -0.00000     -0.00000     -0.00000      0.07617     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.36969      1.25754      0.00000     -0.00000     -0.00000      0.13660     -2.26000      0.61482     -1.56573     -0.00000     -0.00000      0.00000      2.41432 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      2.27030      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -2.91351      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.27030      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -2.91351      0.00000      0.00000     -0.00000 \n    -0.00644     -0.01898     -0.00000     -0.00000     -0.00000      0.07617     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.27391     -0.30861     -0.00000      0.00000      0.00000      0.13660     -2.26000     -1.66337      0.25042      0.00000      0.00000     -0.00000      2.41432 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.27030     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -2.91351     -0.00000     -0.00000 \n    -0.00644     -0.01898     -0.00000     -0.00000     -0.00000      0.07617     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.90422     -0.94893      0.00000     -0.00000     -0.00000      0.13660     -2.26000      1.04855      1.31531      0.00000      0.00000     -0.00000      2.41432 \n   </alphavectors>\n   <betavectors>\n     1.01341     -0.04770      0.00000     -0.00000      0.00000      0.05649      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.76680     -1.31321      0.00000      0.00000      0.00000      0.00000      0.00000      2.34710 \n     0.06904      0.42389     -0.00000      0.00000     -0.00000     -0.13879     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -2.29366     -2.36503     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      7.24934 \n     0.01603      0.62249     -0.00000      0.00000     -0.00000     -1.12450     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      3.07668      6.71410     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -5.33857 \n    -0.00487      0.07657     -0.00000      0.00000     -0.00000      1.54735      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.20408     -1.35190      0.00000     -0.00000      0.00000      0.00000      0.00000      0.87142 \n     0.00000      0.00000      0.41740      0.00000     -0.00000      0.00000      0.00000     -0.26950     -0.00000     -0.00000     -1.23728      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.41740      0.00000      0.00000      0.00000     -0.26950     -0.00000      0.00000     -1.23728      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.41740      0.00000      0.00000     -0.26950     -0.00000     -0.00000     -1.23728     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.56429      0.00000     -0.00000      0.00000      0.00000     -0.47531      0.00000     -0.00000      1.39806      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.56429      0.00000      0.00000      0.00000     -0.47531     -0.00000      0.00000      1.39806      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.56429      0.00000      0.00000     -0.47531      0.00000      0.00000      1.39806     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.21487     -0.00000      0.00000     -0.00000     -0.00000      1.10979     -0.00000     -0.00000     -0.53543      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.21487     -0.00000     -0.00000     -0.00000      1.10979     -0.00000      0.00000     -0.53543     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.21487     -0.00000     -0.00000      1.10979     -0.00000     -0.00000     -0.53543     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.02493     -0.01957      0.00000     -0.00000      0.00000     -0.01512     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.43818      0.13563      0.00000     -0.00000     -0.00000     -0.01914      0.71990     -0.89919      1.87847     -0.00000     -0.00000     -0.00000     -3.43266 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.79447     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      3.60716      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.79447      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      3.60716      0.00000     -0.00000      0.00000 \n    -0.02493     -0.01957      0.00000     -0.00000      0.00000     -0.01512     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.10163     -0.44728     -0.00000      0.00000      0.00000     -0.01914      0.71990      2.07640     -0.16051      0.00000      0.00000      0.00000     -3.43266 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.79447      0.00000     -0.00000     -0.00000      0.00000     -0.00000      3.60716      0.00000     -0.00000 \n    -0.02493     -0.01957      0.00000     -0.00000      0.00000     -0.01512     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.33655      0.31166      0.00000     -0.00000     -0.00000     -0.01914      0.71990     -1.17721     -1.71796      0.00000      0.00000      0.00000     -3.43266 \n    -0.00744     -0.00508      0.00000     -0.00000      0.00000      0.05664      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.31994     -0.40856     -0.00000      0.00000      0.00000      0.02157     -2.31986      0.70133     -1.46512      0.00000      0.00000      0.00000      2.36133 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      2.39321      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -2.81342     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      2.39321     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -2.81342     -0.00000      0.00000     -0.00000 \n    -0.00744     -0.00508      0.00000     -0.00000      0.00000      0.05664      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.30614      1.34738      0.00000     -0.00000     -0.00000      0.02157     -2.31986     -1.61950      0.12519     -0.00000     -0.00000     -0.00000      2.36133 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      2.39321     -0.00000      0.00000      0.00000     -0.00000      0.00000     -2.81342     -0.00000      0.00000 \n    -0.00744     -0.00508      0.00000     -0.00000      0.00000      0.05664      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.01379     -0.93882     -0.00000      0.00000      0.00000      0.02157     -2.31986      0.91817      1.33993     -0.00000     -0.00000     -0.00000      2.36133 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Be\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     1.97132     -0.00121      0.13731      0.00789      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05512      0.00000      0.00000     -0.05512      0.00000     -0.05512     -0.04808      0.00000      0.00000     -0.04808      0.00000     -0.04808 \n    -0.00121      0.41473      0.63120      0.03105      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01136      0.00000      0.00000     -0.01136      0.00000     -0.01136     -0.04247      0.00000      0.00000     -0.04247      0.00000     -0.04247 \n     0.13731      0.63120      0.97048      0.04782      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02118      0.00000      0.00000     -0.02118      0.00000     -0.02118     -0.06804      0.00000      0.00000     -0.06804      0.00000     -0.06804 \n     0.00789      0.03105      0.04782      0.00236      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00107      0.00000      0.00000     -0.00107      0.00000     -0.00107     -0.00337      0.00000      0.00000     -0.00337      0.00000     -0.00337 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05512     -0.01136     -0.02118     -0.00107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00185      0.00000      0.00000      0.00185      0.00000      0.00185      0.00251      0.00000      0.00000      0.00251      0.00000      0.00251 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05512     -0.01136     -0.02118     -0.00107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00185      0.00000      0.00000      0.00185      0.00000      0.00185      0.00251      0.00000      0.00000      0.00251      0.00000      0.00251 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05512     -0.01136     -0.02118     -0.00107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00185      0.00000      0.00000      0.00185      0.00000      0.00185      0.00251      0.00000      0.00000      0.00251      0.00000      0.00251 \n    -0.04808     -0.04247     -0.06804     -0.00337      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00251      0.00000      0.00000      0.00251      0.00000      0.00251      0.00553      0.00000      0.00000      0.00553      0.00000      0.00553 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04808     -0.04247     -0.06804     -0.00337      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00251      0.00000      0.00000      0.00251      0.00000      0.00251      0.00553      0.00000      0.00000      0.00553      0.00000      0.00553 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04808     -0.04247     -0.06804     -0.00337      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00251      0.00000      0.00000      0.00251      0.00000      0.00251      0.00553      0.00000      0.00000      0.00553      0.00000      0.00553 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -3.85239     -0.20566     -0.07564     -0.07564     -0.07564      0.01053      0.01502      0.01502      0.01502      0.12711      0.12711      0.12711      0.12711      0.12711      0.16508      0.18449      0.18449      0.18449      0.59863      0.59863      0.59863      0.59863      0.59863      0.89533      2.49466 \n   </alphaeps>\n   <betaeps>\n    -3.85239     -0.20566     -0.07564     -0.07564     -0.07564      0.01053      0.01502      0.01502      0.01502      0.12711      0.12711      0.12711      0.12711      0.12711      0.16508      0.18449      0.18449      0.18449      0.59863      0.59863      0.59863      0.59863      0.59863      0.89533      2.49466 \n   </betaeps>\n   <alphavectors>\n     0.99207     -0.03817      0.00000     -0.00000      0.00000     -0.03747     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.19594      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.47318     -3.58185 \n     0.01690      0.45506     -0.00000      0.00000     -0.00000     -0.27947     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.03691      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      3.82763     -5.69873 \n     0.09575      0.68998     -0.00000      0.00000     -0.00000     -0.78777     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.60398      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -2.92379     16.20084 \n     0.00528      0.03392     -0.00000      0.00000     -0.00000      1.57327      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.61512     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.73971      1.00924 \n     0.00000      0.00000      0.57564      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.20332     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.09739      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.57564     -0.00000     -0.00000     -0.20332     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.09739      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.57564     -0.00000      0.00000     -0.20332     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.09739      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.51726     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.16640     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.22111      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.51726     -0.00000     -0.00000     -0.16640      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.22111      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.51726      0.00000      0.00000     -0.16640      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.22111      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.08886     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.02331     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.34115      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.08886      0.00000      0.00000      1.02331     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.34115      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.08886     -0.00000     -0.00000      1.02331     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.34115      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02822     -0.01143      0.00000     -0.00000      0.00000      0.01877      0.00000     -0.00000     -0.00000     -0.00073      0.00000      0.00029     -0.00000     -0.00000      0.02428     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.10680     -0.50088     -1.09202     -1.74636 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00136     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      2.10421      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00136     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      2.10421      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.02822     -0.01143      0.00000     -0.00000      0.00000      0.01877      0.00000     -0.00000     -0.00000      0.00061      0.00000      0.00049     -0.00000     -0.00000      0.02428     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.98718     -0.70808     -1.09202     -1.74636 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00136     -0.00000      0.00000      0.00000      0.00000      2.10421      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.02822     -0.01143      0.00000     -0.00000      0.00000      0.01877      0.00000     -0.00000     -0.00000      0.00012      0.00000     -0.00078     -0.00000     -0.00000      0.02428     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.11962      1.20896     -1.09202     -1.74636 \n    -0.02599     -0.04570      0.00000     -0.00000      0.00000     -0.05978     -0.00000      0.00000      0.00000      0.93182     -0.00000     -0.36415      0.00000      0.00000     -1.12578      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.62790      0.28416      1.30375     -4.51838 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73282      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.19374      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.73282      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.19374     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.02599     -0.04570      0.00000     -0.00000      0.00000     -0.05978     -0.00000      0.00000      0.00000     -0.78127     -0.00000     -0.62490      0.00000      0.00000     -1.12578      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.56004      0.40170      1.30375     -4.51838 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73282      0.00000     -0.00000     -0.00000     -0.00000     -1.19374     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.02599     -0.04570      0.00000     -0.00000      0.00000     -0.05978     -0.00000      0.00000      0.00000     -0.15054     -0.00000      0.98905      0.00000      0.00000     -1.12578      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.06786     -0.68586      1.30375     -4.51838 \n   </alphavectors>\n   <betavectors>\n     0.99207     -0.03817     -0.00000     -0.00000     -0.00000     -0.03747      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.19594      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.47318     -3.58185 \n     0.01690      0.45506      0.00000      0.00000      0.00000     -0.27947      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.03691     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      3.82763     -5.69873 \n     0.09575      0.68998      0.00000      0.00000      0.00000     -0.78777      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.60398     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -2.92379     16.20084 \n     0.00528      0.03392      0.00000      0.00000      0.00000      1.57327     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.61512     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.73971      1.00924 \n     0.00000     -0.00000      0.57564     -0.00000     -0.00000     -0.00000     -0.20332      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.09739      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.57564      0.00000     -0.00000     -0.00000     -0.20332      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.09739     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.57564      0.00000     -0.00000      0.00000     -0.20332      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.09739     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.51726      0.00000      0.00000     -0.00000     -0.16640     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.22111      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.51726      0.00000     -0.00000     -0.00000     -0.16640     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.22111     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.51726     -0.00000     -0.00000      0.00000     -0.16640     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.22111     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.08886      0.00000      0.00000      0.00000      1.02331      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.34115      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.08886     -0.00000      0.00000      0.00000      1.02331      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.34115     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.08886      0.00000      0.00000     -0.00000      1.02331      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.34115     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02822     -0.01143     -0.00000     -0.00000     -0.00000      0.01877     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00073      0.00029      0.02428     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.14093     -0.41735     -1.09202     -1.74636 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00136     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      2.10421     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00136     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.10421      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.02822     -0.01143     -0.00000     -0.00000     -0.00000      0.01877     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00061      0.00049      0.02428     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.93190     -0.77940     -1.09202     -1.74636 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00136     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      2.10421      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.02822     -0.01143     -0.00000     -0.00000     -0.00000      0.01877     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00012     -0.00078      0.02428     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.20903      1.19675     -1.09202     -1.74636 \n    -0.02599     -0.04570     -0.00000     -0.00000     -0.00000     -0.05978      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.93059     -0.36728     -1.12578      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.64726      0.23677      1.30375     -4.51838 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73282      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.19374      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73282      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.19374     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.02599     -0.04570     -0.00000     -0.00000     -0.00000     -0.05978      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.78337     -0.62227     -1.12578      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.52868      0.44216      1.30375     -4.51838 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73282      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.19374     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02599     -0.04570     -0.00000     -0.00000     -0.00000     -0.05978      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.14722      0.98955     -1.12578      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.11859     -0.67893      1.30375     -4.51838 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"B\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     1.98819      0.01041      0.07300      0.01882      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04395      0.00000      0.00000     -0.04395      0.00000     -0.04395     -0.02292      0.00000      0.00000     -0.02292      0.00000     -0.02292 \n     0.01041      0.46214      0.58790      0.06637      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01131      0.00000      0.00000     -0.01131      0.00000     -0.01131     -0.02949      0.00000      0.00000     -0.02949      0.00000     -0.02949 \n     0.07300      0.58790      0.75046      0.08516      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01569      0.00000      0.00000     -0.01569      0.00000     -0.01569     -0.03809      0.00000      0.00000     -0.03809      0.00000     -0.03809 \n     0.01882      0.06637      0.08516      0.00974      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00200      0.00000      0.00000     -0.00200      0.00000     -0.00200     -0.00440      0.00000      0.00000     -0.00440      0.00000     -0.00440 \n     0.00000      0.00000      0.00000      0.00000      0.14595      0.00000      0.00000      0.09731      0.00000      0.00000      0.01460      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.14596      0.00000      0.00000      0.09732      0.00000      0.00000      0.01460      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14595      0.00000      0.00000      0.09731      0.00000      0.00000      0.01460      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.09731      0.00000      0.00000      0.06488      0.00000      0.00000      0.00973      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.09732      0.00000      0.00000      0.06489      0.00000      0.00000      0.00973      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09731      0.00000      0.00000      0.06488      0.00000      0.00000      0.00973      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.01460      0.00000      0.00000      0.00973      0.00000      0.00000      0.00146      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.01460      0.00000      0.00000      0.00973      0.00000      0.00000      0.00146      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01460      0.00000      0.00000      0.00973      0.00000      0.00000      0.00146      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04395     -0.01131     -0.01569     -0.00200      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00124      0.00000      0.00000      0.00124      0.00000      0.00124      0.00121      0.00000      0.00000      0.00121      0.00000      0.00121 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04395     -0.01131     -0.01569     -0.00200      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00124      0.00000      0.00000      0.00124      0.00000      0.00124      0.00121      0.00000      0.00000      0.00121      0.00000      0.00121 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04395     -0.01131     -0.01569     -0.00200      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00124      0.00000      0.00000      0.00124      0.00000      0.00124      0.00121      0.00000      0.00000      0.00121      0.00000      0.00121 \n    -0.02292     -0.02949     -0.03809     -0.00440      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00121      0.00000      0.00000      0.00121      0.00000      0.00121      0.00214      0.00000      0.00000      0.00214      0.00000      0.00214 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02292     -0.02949     -0.03809     -0.00440      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00121      0.00000      0.00000      0.00121      0.00000      0.00121      0.00214      0.00000      0.00000      0.00214      0.00000      0.00214 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02292     -0.02949     -0.03809     -0.00440      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00121      0.00000      0.00000      0.00121      0.00000      0.00121      0.00214      0.00000      0.00000      0.00214      0.00000      0.00214 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.33335      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -6.56202     -0.36105     -0.14985     -0.14985     -0.14985      0.00887      0.03203      0.03203      0.03203      0.16315      0.16315      0.16315      0.16315      0.16315      0.19031      0.30793      0.30793      0.30793      0.79773      0.79773      0.79773      0.79773      0.79773      0.93261      2.19669 \n   </alphaeps>\n   <betaeps>\n    -6.55042     -0.31903     -0.11209     -0.11209     -0.11209      0.01572      0.03805      0.03805      0.03805      0.17758      0.17758      0.17758      0.17758      0.17758      0.20353      0.33454      0.33454      0.33454      0.83400      0.83400      0.83400      0.83400      0.83400      0.96170      2.22472 \n   </betaeps>\n   <alphavectors>\n     0.99651     -0.01884     -0.00000     -0.00000      0.00000     -0.06318     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15239      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.33141     -1.57227 \n     0.01639      0.49260      0.00000      0.00000     -0.00000     -0.28322     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05524     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -2.88223     -1.70442 \n     0.05298      0.60680      0.00000      0.00000     -0.00000     -0.72874     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06670     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      3.27646      7.75206 \n     0.01163      0.06519      0.00000      0.00000     -0.00000      1.86809      0.00000      0.00000      0.00000     -0.00002     -0.00000     -0.00000     -0.00000     -0.00000      2.71738      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.78915      1.81451 \n    -0.00000      0.00000     -0.00000      0.00000      0.66171      0.00000     -0.00000     -0.00000     -0.26309     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.99794      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.66171     -0.00000      0.00000      0.00000     -0.26309     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.99794      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.66171      0.00000      0.00000      0.00000     -0.26309     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.99794     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.44120      0.00000     -0.00000     -0.00000     -0.25526      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.38696     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.44120     -0.00000      0.00000      0.00000     -0.25526     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.38696     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.44120      0.00000      0.00000      0.00000     -0.25526      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.38696      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.06619     -0.00000      0.00000      0.00000      1.09344     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.61125      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.06619     -0.00000      0.00000     -0.00000      1.09344      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.61125      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.06619     -0.00000     -0.00000     -0.00000      1.09344     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.61125     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02339     -0.01169     -0.00000     -0.00000      0.00000     -0.00246     -0.00000     -0.00000     -0.00000     -0.01524     -0.00000     -0.00000     -0.00000      0.02639     -0.07912      0.00000      0.00000      0.00000     -0.57106     -0.00000     -0.00000      0.00000      0.98911      0.12412     -2.12922 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05279     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.97822      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05279      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.97822     -0.00000      0.00000      0.00000 \n    -0.02339     -0.01169      0.00000     -0.00000      0.00000     -0.00246      0.00000     -0.00000     -0.00000      0.03048      0.00000      0.00000      0.00000     -0.00000     -0.07912      0.00000     -0.00000     -0.00000      1.14213      0.00000      0.00000     -0.00000     -0.00000      0.12412     -2.12922 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05279      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.97822      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02339     -0.01169     -0.00000     -0.00000      0.00000     -0.00246     -0.00000     -0.00000     -0.00000     -0.01524     -0.00000     -0.00000     -0.00000     -0.02639     -0.07912      0.00000      0.00000      0.00000     -0.57106     -0.00000     -0.00000     -0.00000     -0.98911      0.12412     -2.12922 \n    -0.01287     -0.03355     -0.00000     -0.00000      0.00000     -0.21192      0.00000     -0.00000     -0.00000     -0.49244     -0.00000     -0.00000     -0.00000      0.85295     -1.30991     -0.00000      0.00000      0.00000      0.28955     -0.00000     -0.00000     -0.00000     -0.50151     -1.51494     -2.00293 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.70590      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.00302      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.70590     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.00302      0.00000     -0.00000     -0.00000 \n    -0.01287     -0.03355     -0.00000     -0.00000      0.00000     -0.21192     -0.00000     -0.00000     -0.00000      0.98491      0.00000      0.00000      0.00000     -0.00000     -1.30989      0.00000     -0.00000     -0.00000     -0.57909      0.00000      0.00000     -0.00000      0.00000     -1.51494     -2.00293 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.70590     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.00302      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.01287     -0.03355     -0.00000     -0.00000      0.00000     -0.21192     -0.00000     -0.00000     -0.00000     -0.49244     -0.00000     -0.00000     -0.00000     -0.85295     -1.30991     -0.00000      0.00000      0.00000      0.28955     -0.00000     -0.00000      0.00000      0.50151     -1.51494     -2.00293 \n   </alphavectors>\n   <betavectors>\n     0.99708     -0.02509     -0.00000      0.00000     -0.00000     -0.06325      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.17012     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.34491     -1.55845 \n     0.01514      0.46796      0.00000     -0.00000      0.00000     -0.27747      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.03005     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -2.90343     -1.67674 \n     0.04718      0.61418      0.00000     -0.00000      0.00000     -0.75762      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.02402     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      3.34364      7.72025 \n     0.01031      0.07246      0.00000     -0.00000     -0.00000      1.96790     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00002      2.66765      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.77394      1.79739 \n     0.00000     -0.00000      0.61729     -0.00000      0.00000      0.00000     -0.00000     -0.26972     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.02428      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.61728      0.00000     -0.00000      0.00000     -0.26972     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.02429     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.61729      0.00000     -0.00000     -0.26972      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.02428     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.46340     -0.00000      0.00000      0.00000     -0.00000     -0.32383      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.36523      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.46340      0.00000     -0.00000      0.00000     -0.32383      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.36523      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.46340     -0.00000     -0.00000     -0.32383     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.36523     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.11375      0.00000     -0.00000     -0.00000      0.00000      1.10636     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.58021      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.11375      0.00000     -0.00000      0.00000      1.10636     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.58021     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.11375      0.00000      0.00000      1.10636      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.58021      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.02118     -0.01035     -0.00000      0.00000     -0.00000     -0.00614      0.00000     -0.00000     -0.00000     -0.00000      0.01292      0.00000     -0.00000     -0.00746     -0.07727     -0.00000      0.00000      0.00000      0.00000      0.98938     -0.00000      0.00000     -0.57122      0.10495     -2.13034 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.02585     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.97876     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.02585      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.97876     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.02118     -0.01035     -0.00000      0.00000     -0.00000     -0.00614      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.01492     -0.07728      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.14243      0.10495     -2.13034 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.02585     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.97876     -0.00000      0.00000     -0.00000 \n    -0.02118     -0.01035     -0.00000      0.00000     -0.00000     -0.00614      0.00000     -0.00000      0.00000     -0.00000     -0.01292     -0.00000     -0.00000     -0.00746     -0.07727     -0.00000      0.00000     -0.00000     -0.00000     -0.98938      0.00000     -0.00000     -0.57122      0.10495     -2.13034 \n    -0.01143     -0.02688     -0.00000      0.00000     -0.00000     -0.25777      0.00000     -0.00000      0.00000      0.00000      0.85970     -0.00000     -0.00000     -0.49636     -1.32402     -0.00000      0.00000     -0.00000     -0.00000     -0.48985      0.00000     -0.00000      0.28281     -1.51478     -1.98844 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.71940      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.97970     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.71940     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.97970      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01143     -0.02688     -0.00000      0.00000     -0.00000     -0.25777      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.99269     -1.32403      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.56563     -1.51478     -1.98844 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.71940      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.97970      0.00000     -0.00000      0.00000 \n    -0.01143     -0.02688     -0.00000      0.00000     -0.00000     -0.25777      0.00000     -0.00000     -0.00000      0.00000     -0.85970      0.00000     -0.00000     -0.49636     -1.32402     -0.00000      0.00000      0.00000      0.00000      0.48985     -0.00000      0.00000      0.28281     -1.51478     -1.98844 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"C\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     1.99179      0.00701      0.05859      0.01111      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03661      0.00000      0.00000     -0.03661      0.00000     -0.03661     -0.01934      0.00000      0.00000     -0.01934      0.00000     -0.01934 \n     0.00701      0.45880      0.59061      0.06269      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01070      0.00000      0.00000     -0.01070      0.00000     -0.01070     -0.02713      0.00000      0.00000     -0.02713      0.00000     -0.02713 \n     0.05859      0.59061      0.76315      0.08158      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01466      0.00000      0.00000     -0.01466      0.00000     -0.01466     -0.03516      0.00000      0.00000     -0.03516      0.00000     -0.03516 \n     0.01111      0.06269      0.08158      0.00886      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00163      0.00000      0.00000     -0.00163      0.00000     -0.00163     -0.00371      0.00000      0.00000     -0.00371      0.00000     -0.00371 \n     0.00000      0.00000      0.00000      0.00000      0.30497      0.00000      0.00000      0.19238      0.00000      0.00000      0.03108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.30497      0.00000      0.00000      0.19238      0.00000      0.00000      0.03108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.30496      0.00000      0.00000      0.19237      0.00000      0.00000      0.03108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.19238      0.00000      0.00000      0.12135      0.00000      0.00000      0.01961      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.19238      0.00000      0.00000      0.12135      0.00000      0.00000      0.01961      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.19237      0.00000      0.00000      0.12134      0.00000      0.00000      0.01960      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03108      0.00000      0.00000      0.01961      0.00000      0.00000      0.00317      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.03108      0.00000      0.00000      0.01961      0.00000      0.00000      0.00317      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03108      0.00000      0.00000      0.01960      0.00000      0.00000      0.00317      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03661     -0.01070     -0.01466     -0.00163      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00092      0.00000      0.00000      0.00092      0.00000      0.00092      0.00099      0.00000      0.00000      0.00099      0.00000      0.00099 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03661     -0.01070     -0.01466     -0.00163      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00092      0.00000      0.00000      0.00092      0.00000      0.00092      0.00099      0.00000      0.00000      0.00099      0.00000      0.00099 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03661     -0.01070     -0.01466     -0.00163      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00092      0.00000      0.00000      0.00092      0.00000      0.00092      0.00099      0.00000      0.00000      0.00099      0.00000      0.00099 \n    -0.01934     -0.02713     -0.03516     -0.00371      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00099      0.00000      0.00099      0.00183      0.00000      0.00000      0.00183      0.00000      0.00183 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01934     -0.02713     -0.03516     -0.00371      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00099      0.00000      0.00099      0.00183      0.00000      0.00000      0.00183      0.00000      0.00183 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01934     -0.02713     -0.03516     -0.00371      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00099      0.00000      0.00000      0.00099      0.00000      0.00099      0.00183      0.00000      0.00000      0.00183      0.00000      0.00183 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.66668      0.66668      0.66664      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -9.94502     -0.53247     -0.22636     -0.22636     -0.22636      0.02119      0.05798      0.05798      0.05798      0.29125      0.29125      0.29125      0.29125      0.29125      0.32691      0.51028      0.51028      0.51029      1.32404      1.32404      1.32404      1.32404      1.32404      1.54161      3.61952 \n   </alphaeps>\n   <betaeps>\n    -9.91226     -0.43584     -0.13801     -0.13801     -0.13801      0.03574      0.07313      0.07313      0.07313      0.32395      0.32395      0.32395      0.32395      0.32395      0.35891      0.57280      0.57280      0.57280      1.40862      1.40862      1.40862      1.40862      1.40862      1.60943      3.68621 \n   </betaeps>\n   <alphavectors>\n     0.99715     -0.01695      0.00000     -0.00000     -0.00000     -0.07024      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.19671      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.49071     -1.73092 \n     0.01484      0.49805     -0.00000      0.00000      0.00000     -0.28700      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00374     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -3.07048     -1.84144 \n     0.04823      0.61340     -0.00000      0.00000      0.00000     -0.65566      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.31019     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      3.90261      8.64307 \n     0.00797      0.05741     -0.00000      0.00000      0.00000      1.77115     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00001      2.27745     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.50581      1.51162 \n     0.00000      0.00000      0.67635     -0.00000     -0.00000     -0.00000     -0.26394      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.97675     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.67635      0.00000      0.00000     -0.00000     -0.26394      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.97675      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.67635     -0.00000     -0.00000     -0.00000     -0.26394      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.97675      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.42664     -0.00000      0.00000     -0.00000     -0.28428     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.41324      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.42664     -0.00000      0.00000     -0.00000     -0.28428     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.41324     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.42664     -0.00000     -0.00000     -0.00000     -0.28428      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.41324      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.06893      0.00000      0.00000      0.00000      1.11306      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.64671     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.06893      0.00000     -0.00000      0.00000      1.11306      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.64671      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.06893     -0.00000     -0.00000     -0.00000      1.11306     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.64671     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.02048     -0.01189      0.00000     -0.00000     -0.00000     -0.00356      0.00000     -0.00000      0.00000      0.01480     -0.00000     -0.00000     -0.00000     -0.00854     -0.07824      0.00000      0.00000      0.00000      1.00258     -0.00000      0.00000      0.00000     -0.57884      0.11741     -2.17487 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.02960      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      2.00517      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.02960      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.00517     -0.00000      0.00000     -0.00000 \n    -0.02048     -0.01189      0.00000     -0.00000      0.00000     -0.00356      0.00000     -0.00000     -0.00000     -0.01480      0.00000     -0.00000      0.00000     -0.00854     -0.07824      0.00000      0.00000      0.00000     -1.00258      0.00000     -0.00000     -0.00000     -0.57884      0.11741     -2.17487 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.02960      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.00517     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02048     -0.01189      0.00000     -0.00000      0.00000     -0.00356      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.01709     -0.07824     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.15768      0.11741     -2.17487 \n    -0.01161     -0.03338      0.00000     -0.00000      0.00000     -0.19360      0.00000     -0.00000      0.00000      0.85847     -0.00000     -0.00000     -0.00000     -0.49565     -1.24551      0.00000      0.00000     -0.00000     -0.51809      0.00000     -0.00000     -0.00000      0.29912     -1.59019     -2.19011 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.71694     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.03618     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.71695     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.03618      0.00000     -0.00000      0.00000 \n    -0.01161     -0.03338      0.00000     -0.00000     -0.00000     -0.19360      0.00000     -0.00000      0.00000     -0.85847     -0.00000     -0.00000     -0.00000     -0.49565     -1.24551      0.00000      0.00000     -0.00000      0.51809     -0.00000      0.00000      0.00000      0.29912     -1.59019     -2.19011 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.71695     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.03618      0.00000      0.00000      0.00000      0.00000 \n    -0.01161     -0.03338      0.00000     -0.00000     -0.00000     -0.19360      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.99127     -1.24552     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.59824     -1.59019     -2.19011 \n   </alphavectors>\n   <betavectors>\n     0.99824     -0.02658     -0.00000      0.00000     -0.00000     -0.07187      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.22561     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.51189     -1.70806 \n     0.01287      0.45865      0.00000     -0.00000     -0.00000     -0.28451      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03637     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -3.10242     -1.79767 \n     0.03741      0.61900      0.00000     -0.00000      0.00000     -0.68069      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.44896      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      4.00578      8.58732 \n     0.00611      0.07391      0.00000     -0.00000      0.00000      1.88052     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21380      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.48812      1.49074 \n    -0.00000     -0.00000      0.60444     -0.00000     -0.00000     -0.00000     -0.28470     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.01722     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.60444      0.00000      0.00000      0.00000     -0.28470      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.01722     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.60444      0.00000      0.00000      0.00000     -0.28470      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.01722      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.45383     -0.00000      0.00000     -0.00000     -0.39131      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.37876      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.45383      0.00000      0.00000      0.00000     -0.39131     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.37876      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.45383      0.00000      0.00000      0.00000     -0.39131      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.37876      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.15554      0.00000     -0.00000      0.00000      1.12945     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.60169     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.15554     -0.00000     -0.00000     -0.00000      1.12945      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.60169     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.15554     -0.00000      0.00000      0.00000      1.12945     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.60169     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.01667     -0.00929     -0.00000      0.00000     -0.00000     -0.00852      0.00000     -0.00000      0.00000     -0.00445      0.00000     -0.00000     -0.00000      0.00257     -0.07517      0.00000     -0.00000     -0.00000      1.00268      0.00000      0.00000      0.00000     -0.57890      0.08839     -2.17638 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00890     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.00537     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00890     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      2.00537     -0.00000      0.00000     -0.00000      0.00000 \n    -0.01667     -0.00929     -0.00000      0.00000     -0.00000     -0.00852      0.00000     -0.00000     -0.00000      0.00445      0.00000     -0.00000     -0.00000      0.00257     -0.07517      0.00000     -0.00000     -0.00000     -1.00268     -0.00000     -0.00000     -0.00000     -0.57890      0.08839     -2.17638 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00890      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      2.00537     -0.00000     -0.00000      0.00000 \n    -0.01667     -0.00929     -0.00000      0.00000      0.00000     -0.00852      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00514     -0.07517     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.15780      0.08839     -2.17638 \n    -0.00894     -0.02228     -0.00000      0.00000     -0.00000     -0.25047      0.00000     -0.00000     -0.00000      0.86826     -0.00000      0.00000     -0.00000     -0.50129     -1.26929     -0.00000      0.00000      0.00000     -0.50152     -0.00000     -0.00000     -0.00000      0.28955     -1.59404     -2.16794 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73652      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.00303      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73652      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.00303      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00894     -0.02228     -0.00000      0.00000     -0.00000     -0.25047      0.00000     -0.00000     -0.00000     -0.86826      0.00000     -0.00000     -0.00000     -0.50129     -1.26929     -0.00000      0.00000      0.00000      0.50152      0.00000     -0.00000      0.00000      0.28955     -1.59404     -2.16794 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73652     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.00303      0.00000      0.00000     -0.00000 \n    -0.00894     -0.02228     -0.00000      0.00000     -0.00000     -0.25047      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.00258     -1.26930      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.57910     -1.59404     -2.16794 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"N\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     1.99587      0.00551      0.04510      0.00554      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03060      0.00000      0.00000     -0.03060      0.00000     -0.03060     -0.01614      0.00000      0.00000     -0.01614      0.00000     -0.01614 \n     0.00551      0.45808      0.59424      0.05634      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01023      0.00000      0.00000     -0.01023      0.00000     -0.01023     -0.02413      0.00000      0.00000     -0.02413      0.00000     -0.02413 \n     0.04510      0.59424      0.77355      0.07410      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01381      0.00000      0.00000     -0.01381      0.00000     -0.01381     -0.03126      0.00000      0.00000     -0.03126      0.00000     -0.03126 \n     0.00554      0.05634      0.07410      0.00738      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00131      0.00000      0.00000     -0.00131      0.00000     -0.00131     -0.00283      0.00000      0.00000     -0.00283      0.00000     -0.00283 \n     0.00000      0.00000      0.00000      0.00000      0.46810      0.00000      0.00000      0.28814      0.00000      0.00000      0.04840      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.46810      0.00000      0.00000      0.28814      0.00000      0.00000      0.04840      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46810      0.00000      0.00000      0.28814      0.00000      0.00000      0.04840      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.28814      0.00000      0.00000      0.17736      0.00000      0.00000      0.02979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.28814      0.00000      0.00000      0.17736      0.00000      0.00000      0.02979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.28814      0.00000      0.00000      0.17736      0.00000      0.00000      0.02979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04840      0.00000      0.00000      0.02979      0.00000      0.00000      0.00500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.04840      0.00000      0.00000      0.02979      0.00000      0.00000      0.00500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04840      0.00000      0.00000      0.02979      0.00000      0.00000      0.00500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03060     -0.01023     -0.01381     -0.00131      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00071      0.00000      0.00000      0.00071      0.00000      0.00071      0.00080      0.00000      0.00000      0.00080      0.00000      0.00080 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03060     -0.01023     -0.01381     -0.00131      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00071      0.00000      0.00000      0.00071      0.00000      0.00071      0.00080      0.00000      0.00000      0.00080      0.00000      0.00080 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03060     -0.01023     -0.01381     -0.00131      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00071      0.00000      0.00000      0.00071      0.00000      0.00071      0.00080      0.00000      0.00000      0.00080      0.00000      0.00080 \n    -0.01614     -0.02413     -0.03126     -0.00283      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00080      0.00000      0.00000      0.00080      0.00000      0.00080      0.00147      0.00000      0.00000      0.00147      0.00000      0.00147 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01614     -0.02413     -0.03126     -0.00283      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00080      0.00000      0.00000      0.00080      0.00000      0.00080      0.00147      0.00000      0.00000      0.00147      0.00000      0.00147 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01614     -0.02413     -0.03126     -0.00283      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00080      0.00000      0.00000      0.00080      0.00000      0.00080      0.00147      0.00000      0.00000      0.00147      0.00000      0.00147 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -14.00743     -0.72249     -0.30729     -0.30729     -0.30729      0.03607      0.08545      0.08545      0.08545      0.46705      0.46705      0.46705      0.46705      0.46705      0.49565      0.74248      0.74248      0.74248      2.01953      2.01953      2.01953      2.01953      2.01953      2.32841      5.45717 \n   </alphaeps>\n   <betaeps>\n   -13.94555     -0.56237     -0.15906     -0.15906     -0.15906      0.05894      0.11074      0.11074      0.11074      0.52313      0.52313      0.52313      0.52313      0.52313      0.55220      0.84855      0.84855      0.84855      2.16326      2.16326      2.16326      2.16326      2.16326      2.44364      5.57212 \n   </betaeps>\n   <alphavectors>\n     0.99803     -0.01587     -0.00000     -0.00000      0.00000     -0.07001     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.23143     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.63616     -1.81785 \n     0.01407      0.50119      0.00000      0.00000     -0.00000     -0.27909     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03457     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -3.27147     -1.88768 \n     0.04305      0.62045      0.00000      0.00000     -0.00000     -0.55079     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.69633      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      4.56907      9.38596 \n     0.00497      0.04753      0.00000      0.00000     -0.00000      1.61043      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.79488      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.15325      1.12059 \n     0.00000     -0.00000      0.68418     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.25446      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.95999     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.68418      0.00000      0.00000     -0.25446     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.95999     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.68418      0.00000      0.00000     -0.25446      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.95999     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.42114      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.27526      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.38162     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.42114      0.00000      0.00000     -0.27526      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.38162      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.42114      0.00000      0.00000     -0.27526     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.38162     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.07074      0.00000     -0.00000      0.00000      0.00000      0.00000      1.10554      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.61493     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.07074     -0.00000     -0.00000      1.10554     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.61493     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.07074     -0.00000     -0.00000      1.10554      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.61493     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01792     -0.01182     -0.00000     -0.00000      0.00000     -0.00307     -0.00000     -0.00000      0.00000     -0.00524     -0.00503     -0.00000      0.00000      0.00000     -0.07332     -0.00000     -0.00000      0.00000      0.02935      1.16757     -0.00000     -0.00000      0.00000      0.12042     -2.18325 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.01258      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.02293      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01258      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      2.02293     -0.00000     -0.00000      0.00000 \n    -0.01792     -0.01182     -0.00000     -0.00000      0.00000     -0.00307     -0.00000     -0.00000      0.00000      0.00697     -0.00203     -0.00000      0.00000      0.00000     -0.07332     -0.00000     -0.00000      0.00000      0.99647     -0.60920      0.00000     -0.00000      0.00000      0.12042     -2.18325 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.01258      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      2.02293      0.00000      0.00000 \n    -0.01792     -0.01182     -0.00000     -0.00000      0.00000     -0.00307     -0.00000     -0.00000      0.00000     -0.00173      0.00705     -0.00000      0.00000      0.00000     -0.07332     -0.00000     -0.00000      0.00000     -1.02582     -0.55837      0.00000      0.00000     -0.00000      0.12042     -2.18325 \n    -0.01034     -0.03187     -0.00000     -0.00000      0.00000     -0.16019     -0.00000     -0.00000      0.00000     -0.71902     -0.68955     -0.00000     -0.00000      0.00000     -1.17434     -0.00000     -0.00000      0.00000     -0.01532     -0.60945      0.00000      0.00000     -0.00000     -1.65479     -2.33547 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.72552     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.05594     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.72552     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.05594      0.00000      0.00000     -0.00000 \n    -0.01034     -0.03187     -0.00000     -0.00000      0.00000     -0.16019     -0.00000     -0.00000      0.00000      0.95668     -0.27792     -0.00000     -0.00000      0.00000     -1.17434     -0.00000     -0.00000      0.00000     -0.52014      0.31799     -0.00000      0.00000     -0.00000     -1.65479     -2.33547 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.72552     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.05594     -0.00000     -0.00000 \n    -0.01034     -0.03187     -0.00000     -0.00000      0.00000     -0.16019     -0.00000     -0.00000      0.00000     -0.23766      0.96747     -0.00000     -0.00000      0.00000     -1.17434     -0.00000     -0.00000      0.00000      0.53546      0.29146     -0.00000     -0.00000      0.00000     -1.65479     -2.33547 \n   </alphavectors>\n   <betavectors>\n     0.99942     -0.02664     -0.00000     -0.00000     -0.00000     -0.07362      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.26768      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.66054     -1.78951 \n     0.01154      0.45449      0.00000      0.00000      0.00000     -0.28143      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.08404     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -3.30697     -1.83503 \n     0.02855      0.62123      0.00000      0.00000      0.00000     -0.56084      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.86367     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      4.68807      9.31249 \n     0.00324      0.07131      0.00000      0.00000      0.00000      1.70356     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.72839     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.13711      1.10250 \n     0.00000     -0.00000      0.59506     -0.00000     -0.00000      0.00000     -0.00000     -0.28905     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.00835      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.59506      0.00000     -0.00000      0.00000     -0.00000     -0.28905      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.00835      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.59506     -0.00000     -0.28905     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.00835      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.44965     -0.00000     -0.00000      0.00000     -0.00000     -0.40241      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.34085      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.44965     -0.00000     -0.00000      0.00000     -0.00000     -0.40241      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.34085      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.44965     -0.00000     -0.40241      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.34085      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.18633      0.00000      0.00000     -0.00000      0.00000      1.11859     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.56515      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.18633     -0.00000      0.00000     -0.00000      0.00000      1.11859      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.56515      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.18633      0.00000      1.11859     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.56515      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01314     -0.00858     -0.00000     -0.00000     -0.00000     -0.00819      0.00000     -0.00000      0.00000     -0.01479      0.00959     -0.00000      0.00000      0.00000     -0.06984      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.11789      1.16186     -0.00000      0.08741     -2.18497 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.03054      0.00000     -0.00000     -0.00000     -0.00000      2.02274     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.03054     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.02274     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01314     -0.00858     -0.00000     -0.00000     -0.00000     -0.00819      0.00000     -0.00000      0.00000     -0.00091     -0.01761     -0.00000      0.00000      0.00000     -0.06984      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.94726     -0.68303     -0.00000      0.08741     -2.18497 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.03054      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      2.02274     -0.00000      0.00000 \n    -0.01314     -0.00858     -0.00000     -0.00000     -0.00000     -0.00819      0.00000     -0.00000      0.00000      0.01570      0.00801     -0.00000      0.00000      0.00000     -0.06984      0.00000      0.00000     -0.00000      0.00000      0.00000      1.06515     -0.47883      0.00000      0.08741     -2.18497 \n    -0.00680     -0.01746     -0.00000     -0.00000     -0.00000     -0.21819      0.00000     -0.00000      0.00000      0.84654     -0.54904     -0.00000      0.00000     -0.00000     -1.20513      0.00000      0.00000     -0.00000      0.00000      0.00000      0.05939     -0.58527      0.00000     -1.66283     -2.30939 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.74763     -0.00000      0.00000      0.00000      0.00000     -1.01892      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.74763      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.01892      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00680     -0.01746     -0.00000     -0.00000     -0.00000     -0.21819      0.00000     -0.00000      0.00000      0.05222      1.00764     -0.00000      0.00000     -0.00000     -1.20513      0.00000      0.00000     -0.00000      0.00000      0.00000      0.47716      0.34407      0.00000     -1.66283     -2.30939 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.74763     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.01892      0.00000     -0.00000 \n    -0.00680     -0.01746     -0.00000     -0.00000     -0.00000     -0.21819      0.00000     -0.00000      0.00000     -0.89875     -0.45860     -0.00000      0.00000     -0.00000     -1.20513      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.53655      0.24120     -0.00000     -1.66283     -2.30939 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"O\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.00242      0.00864      0.03112      0.00304      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02624      0.00000      0.00000     -0.02624      0.00000     -0.02624     -0.01315      0.00000      0.00000     -0.01315      0.00000     -0.01315 \n     0.00864      0.47453      0.60629      0.04941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01022      0.00000      0.00000     -0.01023      0.00000     -0.01022     -0.02476      0.00000      0.00000     -0.02477      0.00000     -0.02476 \n     0.03112      0.60629      0.77537      0.06341      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01331      0.00000      0.00000     -0.01332      0.00000     -0.01331     -0.03166      0.00000      0.00000     -0.03167      0.00000     -0.03166 \n     0.00304      0.04941      0.06341      0.00527      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00108      0.00000      0.00000     -0.00108      0.00000     -0.00108     -0.00254      0.00000      0.00000     -0.00254      0.00000     -0.00254 \n     0.00000      0.00000      0.00000      0.00000      0.63529      0.00000      0.00000      0.38648      0.00000      0.00000      0.06847      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.63543      0.00000      0.00000      0.38658      0.00000      0.00000      0.06850      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.63529      0.00000      0.00000      0.38648      0.00000      0.00000      0.06847      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.38648      0.00000      0.00000      0.23588      0.00000      0.00000      0.04245      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.38658      0.00000      0.00000      0.23595      0.00000      0.00000      0.04248      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.38648      0.00000      0.00000      0.23588      0.00000      0.00000      0.04245      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.06847      0.00000      0.00000      0.04245      0.00000      0.00000      0.00822      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.06850      0.00000      0.00000      0.04248      0.00000      0.00000      0.00823      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06847      0.00000      0.00000      0.04245      0.00000      0.00000      0.00822      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02624     -0.01022     -0.01331     -0.00108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00056      0.00000      0.00000      0.00056      0.00000      0.00056      0.00071      0.00000      0.00000      0.00071      0.00000      0.00071 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02624     -0.01023     -0.01332     -0.00108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00056      0.00000      0.00000      0.00056      0.00000      0.00056      0.00071      0.00000      0.00000      0.00071      0.00000      0.00071 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02624     -0.01022     -0.01331     -0.00108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00056      0.00000      0.00000      0.00056      0.00000      0.00056      0.00071      0.00000      0.00000      0.00071      0.00000      0.00071 \n    -0.01315     -0.02476     -0.03166     -0.00254      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00071      0.00000      0.00000      0.00071      0.00000      0.00071      0.00140      0.00000      0.00000      0.00140      0.00000      0.00140 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01315     -0.02477     -0.03167     -0.00254      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00071      0.00000      0.00000      0.00071      0.00000      0.00071      0.00140      0.00000      0.00000      0.00140      0.00000      0.00140 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01315     -0.02476     -0.03166     -0.00254      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00071      0.00000      0.00000      0.00071      0.00000      0.00071      0.00140      0.00000      0.00000      0.00140      0.00000      0.00140 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.33358      0.33321      0.33321      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -18.78676     -0.91854     -0.37982     -0.37982     -0.37978      0.05692      0.10752      0.10752      0.10752      0.70614      0.70614      0.70615      0.70615      0.70615      0.73022      0.93715      0.93715      0.93717      2.97897      2.97897      2.97900      2.97900      2.97901      3.42093      7.95320 \n   </alphaeps>\n   <betaeps>\n   -18.73553     -0.80437     -0.27127     -0.27125     -0.27125      0.07107      0.12106      0.12107      0.12107      0.74532      0.74532      0.74532      0.74533      0.74533      0.77082      1.00861      1.00862      1.00862      3.08435      3.08435      3.08435      3.08436      3.08436      3.50437      8.03908 \n   </betaeps>\n   <alphavectors>\n     1.00005     -0.01711     -0.00000      0.00000      0.00000     -0.07024     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00005     -0.26432      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.82152     -1.80212 \n     0.01487      0.49955      0.00000     -0.00000      0.00000     -0.27570     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06667     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -3.56753     -1.76033 \n     0.03222      0.62232      0.00000     -0.00000      0.00000     -0.49765     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00021      0.97134     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00003      5.30258      9.78863 \n     0.00295      0.04423      0.00000     -0.00000     -0.00000      1.53871      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00033      1.51040     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.95321      0.87289 \n    -0.00000     -0.00000      0.70201      0.00000      0.00000     -0.00000     -0.00000     -0.24087      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.92296     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.70200      0.00000     -0.00000      0.00000     -0.24088      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.92297      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.70201      0.00000      0.00000     -0.24087      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.92296      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.41397      0.00000      0.00000     -0.00000     -0.00000     -0.25866     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.34413     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.41397      0.00000     -0.00000      0.00000     -0.25868      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.34412      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.41397     -0.00000      0.00000     -0.25866     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.34413     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.06192     -0.00000     -0.00000      0.00000      0.00000      1.09820      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.58979      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.06194      0.00000     -0.00000      0.00000      1.09820     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.58978     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.06192      0.00000     -0.00000      1.09820      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.58979     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.01468     -0.01103     -0.00000      0.00000     -0.00000     -0.00230     -0.00000      0.00000     -0.00000      0.00154      0.00000      0.00000     -0.00000     -0.00090     -0.06311      0.00000     -0.00000     -0.00000      1.00976      0.00000      0.00000     -0.00000     -0.58299      0.13982     -2.15382 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00308      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      2.01952     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00309      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.01952     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01468     -0.01105     -0.00000      0.00000     -0.00000     -0.00229     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00176     -0.06312     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.16596      0.13982     -2.15382 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00308     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      2.01952      0.00000      0.00000      0.00000 \n    -0.01468     -0.01103     -0.00000      0.00000      0.00000     -0.00230     -0.00000      0.00000      0.00000     -0.00154      0.00000     -0.00000      0.00000     -0.00090     -0.06311      0.00000     -0.00000      0.00000     -1.00976     -0.00000     -0.00000      0.00000     -0.58299      0.13982     -2.15382 \n    -0.00814     -0.02928     -0.00000      0.00000      0.00000     -0.15064     -0.00000      0.00000      0.00000      0.86523      0.00000      0.00000     -0.00000     -0.49979     -1.15957      0.00000     -0.00000      0.00000     -0.52057     -0.00000     -0.00000      0.00000      0.30054     -1.80868     -2.50069 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73046     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.04113     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73046     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.04114      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00814     -0.02929     -0.00000      0.00000      0.00000     -0.15065     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.99883     -1.15989     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.60111     -1.80868     -2.50069 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73046      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.04113      0.00000      0.00000      0.00000 \n    -0.00814     -0.02928     -0.00000      0.00000     -0.00000     -0.15064     -0.00000      0.00000      0.00000     -0.86523      0.00000      0.00000     -0.00000     -0.49979     -1.15957      0.00000     -0.00000     -0.00000      0.52057      0.00000      0.00000     -0.00000      0.30054     -1.80868     -2.50069 \n   </alphavectors>\n   <betavectors>\n     1.00075     -0.02287     -0.00000     -0.00000      0.00000     -0.07217     -0.00000     -0.00000      0.00000      0.00002      0.00000      0.00000      0.00000      0.00000     -0.28498      0.00000     -0.00000      0.00000      0.00001      0.00000     -0.00000     -0.00000     -0.00000     -1.83377     -1.78595 \n     0.01314      0.47390     -0.00000      0.00000     -0.00000     -0.27789     -0.00000     -0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000     -0.09489      0.00000     -0.00000      0.00000      0.00002      0.00000     -0.00000     -0.00000     -0.00000     -3.58462     -1.73083 \n     0.02375      0.62168      0.00000      0.00000     -0.00000     -0.49933      0.00000     -0.00000      0.00000     -0.00006     -0.00000     -0.00000     -0.00000     -0.00000      1.06345     -0.00000      0.00000     -0.00000     -0.00004     -0.00000      0.00000      0.00000      0.00000      5.36461      9.74514 \n     0.00216      0.05749      0.00000      0.00000     -0.00000      1.57713      0.00000      0.00000     -0.00000     -0.00008     -0.00000     -0.00000     -0.00000     -0.00000      1.47894     -0.00000      0.00000     -0.00000     -0.00001     -0.00000      0.00000      0.00000      0.00000      0.94600      0.86524 \n    -0.00000     -0.00000      0.00000      0.65388      0.00000     -0.00000      0.00000     -0.00000     -0.25978      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.95271     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.65388     -0.00000     -0.00000     -0.00000     -0.25978      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.95271      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.65388      0.00000     -0.00000     -0.25978     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.95271     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.44000     -0.00000     -0.00000      0.00000     -0.00000     -0.32293     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.32176      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.44000     -0.00000     -0.00000     -0.00000     -0.32292      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.32177     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.44000      0.00000     -0.00000     -0.32293      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.32176      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.11473      0.00000      0.00000     -0.00000      0.00000      1.10810      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.56275     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.11472     -0.00000     -0.00000     -0.00000      1.10810     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.56275      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.11473     -0.00000      0.00000      1.10810     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.56275      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.01195     -0.00915     -0.00000     -0.00000      0.00000     -0.00464     -0.00000     -0.00000      0.00000      0.00556      0.00000      0.00000     -0.00963     -0.00000     -0.06089      0.00000      0.00000     -0.00000     -0.58296      0.00000     -0.00000      1.00971      0.00000      0.12293     -2.15493 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01926      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      2.01943     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01926     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      2.01943     -0.00000      0.00000 \n    -0.01195     -0.00915     -0.00000     -0.00000      0.00000     -0.00464      0.00000     -0.00000      0.00000     -0.01111     -0.00000     -0.00000     -0.00000     -0.00000     -0.06088      0.00000     -0.00000      0.00000      1.16592      0.00000     -0.00000     -0.00000      0.00000      0.12294     -2.15493 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01926      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      2.01943      0.00000     -0.00000      0.00000      0.00000 \n    -0.01195     -0.00915     -0.00000     -0.00000      0.00000     -0.00464      0.00000     -0.00000      0.00000      0.00556      0.00000      0.00000      0.00963      0.00000     -0.06089      0.00000      0.00000     -0.00000     -0.58296     -0.00000      0.00000     -1.00971     -0.00000      0.12293     -2.15493 \n    -0.00599     -0.02097     -0.00000     -0.00000      0.00000     -0.17780     -0.00000     -0.00000      0.00000     -0.50277     -0.00000     -0.00000      0.87094      0.00000     -1.17811      0.00000     -0.00000      0.00000      0.29502     -0.00000      0.00000     -0.51096     -0.00000     -1.81455     -2.48610 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.74187     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.02193      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.74188      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.02193      0.00000      0.00000 \n    -0.00599     -0.02097     -0.00000     -0.00000      0.00000     -0.17779      0.00000     -0.00000      0.00000      1.00574      0.00000      0.00000      0.00000      0.00000     -1.17803      0.00000      0.00000     -0.00000     -0.59000     -0.00000      0.00000      0.00000     -0.00000     -1.81455     -2.48610 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.74187     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.02193     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00599     -0.02097     -0.00000     -0.00000      0.00000     -0.17780     -0.00000     -0.00000      0.00000     -0.50277     -0.00000     -0.00000     -0.87094     -0.00000     -1.17811      0.00000     -0.00000      0.00000      0.29502      0.00000     -0.00000      0.51096      0.00000     -1.81455     -2.48610 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"F\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.00591      0.00862      0.02159      0.00138      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02297      0.00000      0.00000     -0.02297      0.00000     -0.02297     -0.01154      0.00000      0.00000     -0.01154      0.00000     -0.01154 \n     0.00862      0.48062      0.61339      0.04438      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00992      0.00000      0.00000     -0.00992      0.00000     -0.00992     -0.02500      0.00000      0.00000     -0.02500      0.00000     -0.02500 \n     0.02159      0.61339      0.78297      0.05668      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01278      0.00000      0.00000     -0.01278      0.00000     -0.01278     -0.03195      0.00000      0.00000     -0.03195      0.00000     -0.03195 \n     0.00138      0.04438      0.05668      0.00412      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00092      0.00000      0.00000     -0.00092      0.00000     -0.00092     -0.00230      0.00000      0.00000     -0.00230      0.00000     -0.00230 \n     0.00000      0.00000      0.00000      0.00000      0.80626      0.00000      0.00000      0.48650      0.00000      0.00000      0.08598      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.80626      0.00000      0.00000      0.48650      0.00000      0.00000      0.08598      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.80625      0.00000      0.00000      0.48649      0.00000      0.00000      0.08598      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.48650      0.00000      0.00000      0.29379      0.00000      0.00000      0.05210      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.48650      0.00000      0.00000      0.29379      0.00000      0.00000      0.05210      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.48649      0.00000      0.00000      0.29378      0.00000      0.00000      0.05210      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.08598      0.00000      0.00000      0.05210      0.00000      0.00000      0.00938      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.08598      0.00000      0.00000      0.05210      0.00000      0.00000      0.00938      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08598      0.00000      0.00000      0.05210      0.00000      0.00000      0.00938      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02297     -0.00992     -0.01278     -0.00092      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00046      0.00000      0.00000      0.00046      0.00000      0.00046      0.00064      0.00000      0.00000      0.00064      0.00000      0.00064 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02297     -0.00992     -0.01278     -0.00092      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00046      0.00000      0.00000      0.00046      0.00000      0.00046      0.00064      0.00000      0.00000      0.00064      0.00000      0.00064 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02297     -0.00992     -0.01278     -0.00092      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00046      0.00000      0.00000      0.00046      0.00000      0.00046      0.00064      0.00000      0.00000      0.00064      0.00000      0.00064 \n    -0.01154     -0.02500     -0.03195     -0.00230      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00064      0.00000      0.00000      0.00064      0.00000      0.00064      0.00137      0.00000      0.00000      0.00137      0.00000      0.00137 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01154     -0.02500     -0.03195     -0.00230      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00064      0.00000      0.00000      0.00064      0.00000      0.00064      0.00137      0.00000      0.00000      0.00137      0.00000      0.00137 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01154     -0.02500     -0.03195     -0.00230      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00064      0.00000      0.00000      0.00064      0.00000      0.00064      0.00137      0.00000      0.00000      0.00137      0.00000      0.00137 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.66667      0.66667      0.66665      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -24.23012     -1.11846     -0.44110     -0.44110     -0.44110      0.08702      0.14202      0.14202      0.14202      1.02405      1.02405      1.02405      1.02405      1.02405      1.05308      1.20504      1.20504      1.20504      4.20353      4.20353      4.20353      4.20353      4.20353      5.01143     11.58838 \n   </alphaeps>\n   <betaeps>\n   -24.20040     -1.05843     -0.38310     -0.38310     -0.38310      0.09416      0.14838      0.14838      0.14838      1.04567      1.04567      1.04567      1.04567      1.04567      1.07607      1.24197      1.24197      1.24197      4.26081      4.26081      4.26081      4.26081      4.26081      5.05811     11.63435 \n   </betaeps>\n   <alphavectors>\n     1.00112     -0.01877      0.00000      0.00000      0.00000     -0.06858      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.29762      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -2.05558     -2.07444 \n     0.01439      0.49515     -0.00000     -0.00000      0.00000     -0.27253      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.09666      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -3.98998     -2.11826 \n     0.02517      0.62591     -0.00000     -0.00000     -0.00000     -0.46733      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00001      1.22400     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      6.07106     11.26412 \n     0.00172      0.04226     -0.00000     -0.00000     -0.00000      1.47661     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00001      1.27044     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.75679      0.68647 \n     0.00000      0.00000     -0.00000      0.70338     -0.00000     -0.00000     -0.00000     -0.23637     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.90953      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.70338     -0.00000      0.00000     -0.00000     -0.23637     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.90953     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.70338     -0.00000      0.00000     -0.00000     -0.23637     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.90953     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.41496     -0.00000     -0.00000     -0.00000     -0.26202      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.32187     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.41496      0.00000      0.00000     -0.00000     -0.26202      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.32187     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.41496     -0.00000      0.00000     -0.00000     -0.26202     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.32187      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.06604      0.00000      0.00000      0.00000      1.09698     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.57116      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.06604      0.00000     -0.00000      0.00000      1.09698     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.57116      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.06604      0.00000      0.00000     -0.00000      1.09698      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.57116     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.01226     -0.01016      0.00000      0.00000      0.00000      0.00024     -0.00000     -0.00000     -0.00000     -0.00397     -0.00000     -0.00000      0.00000      0.00229     -0.04493      0.00000     -0.00000      0.00000     -0.00000      1.01329     -0.00000     -0.00000     -0.58503      0.24681     -2.16704 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00795     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.02659      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00795      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      2.02659     -0.00000      0.00000      0.00000 \n    -0.01226     -0.01016      0.00000      0.00000      0.00000      0.00024     -0.00000     -0.00000     -0.00000      0.00397      0.00000      0.00000     -0.00000      0.00229     -0.04493      0.00000     -0.00000      0.00000      0.00000     -1.01329      0.00000      0.00000     -0.58503      0.24681     -2.16704 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00795      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      2.02659     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01226     -0.01016      0.00000      0.00000      0.00000      0.00024     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00459     -0.04493     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.17005      0.24681     -2.16704 \n    -0.00679     -0.02714      0.00000      0.00000      0.00000     -0.13772      0.00000      0.00000      0.00000      0.86808      0.00000      0.00000     -0.00000     -0.50120     -1.16372     -0.00000      0.00000     -0.00000      0.00000     -0.52270      0.00000     -0.00000      0.30178     -2.01516     -2.99352 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73616      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.04540     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.73616     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.04540      0.00000     -0.00000     -0.00000 \n    -0.00679     -0.02714      0.00000      0.00000      0.00000     -0.13772      0.00000      0.00000      0.00000     -0.86808     -0.00000     -0.00000      0.00000     -0.50120     -1.16372     -0.00000      0.00000      0.00000     -0.00000      0.52270     -0.00000      0.00000      0.30178     -2.01516     -2.99352 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73616     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.04540      0.00000      0.00000      0.00000      0.00000 \n    -0.00679     -0.02714      0.00000      0.00000      0.00000     -0.13772      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.00237     -1.16373      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.60356     -2.01516     -2.99352 \n   </alphavectors>\n   <betavectors>\n     1.00144     -0.02094      0.00000     -0.00000      0.00000     -0.06953      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.30657      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -2.06078     -2.06776 \n     0.01364      0.48482     -0.00000      0.00000      0.00000     -0.27403      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.10889      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -3.99718     -2.10628 \n     0.02119      0.62460     -0.00000      0.00000     -0.00000     -0.46656      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.26304     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      6.09705     11.24587 \n     0.00146      0.04828     -0.00000      0.00000      0.00000      1.48889     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.25853     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.75436      0.68417 \n     0.00000      0.00000      0.68357      0.00000      0.00000      0.00000     -0.00000     -0.24461     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.92236      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.68357     -0.00000     -0.00000     -0.24461     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.92236     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.68357     -0.00000     -0.00000      0.00000     -0.24461     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.92236      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.42707      0.00000      0.00000      0.00000     -0.00000     -0.28760      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.31267      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.42707      0.00000     -0.00000     -0.28760      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.31267     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.42707     -0.00000     -0.00000      0.00000     -0.28760     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.31267     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.08674     -0.00000     -0.00000     -0.00000      0.00000      1.10118     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.56020     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.08674      0.00000      0.00000      1.10118     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.56020      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.08674     -0.00000     -0.00000      0.00000      1.10118     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.56020     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.01107     -0.00941      0.00000     -0.00000      0.00000     -0.00051      0.00000     -0.00000      0.00000     -0.00839      0.00000      0.00000      0.00000      0.00484     -0.04379      0.00000     -0.00000      0.00000      1.01327      0.00000     -0.00000     -0.00000     -0.58501      0.24054     -2.16778 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01677     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.02653     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.01677     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      2.02653     -0.00000      0.00000      0.00000 \n    -0.01107     -0.00941      0.00000     -0.00000      0.00000     -0.00051      0.00000     -0.00000     -0.00000      0.00839      0.00000     -0.00000     -0.00000      0.00484     -0.04379      0.00000     -0.00000     -0.00000     -1.01327     -0.00000     -0.00000      0.00000     -0.58501      0.24054     -2.16778 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01677      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      2.02653      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01107     -0.00941      0.00000     -0.00000      0.00000     -0.00051      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00968     -0.04379     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.17002      0.24054     -2.16778 \n    -0.00574     -0.02349      0.00000     -0.00000      0.00000     -0.14784      0.00000     -0.00000     -0.00000      0.87035      0.00000      0.00000      0.00000     -0.50250     -1.17202     -0.00000      0.00000      0.00000     -0.51891     -0.00000      0.00000     -0.00000      0.29959     -2.01864     -2.98749 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.74070      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.03782      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.74070      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.03782      0.00000     -0.00000     -0.00000 \n    -0.00574     -0.02349      0.00000     -0.00000      0.00000     -0.14784      0.00000     -0.00000      0.00000     -0.87035      0.00000      0.00000      0.00000     -0.50250     -1.17202     -0.00000      0.00000      0.00000      0.51891      0.00000      0.00000     -0.00000      0.29959     -2.01864     -2.98749 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.74070     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.03782     -0.00000      0.00000      0.00000      0.00000 \n    -0.00574     -0.02349      0.00000     -0.00000      0.00000     -0.14784      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00499     -1.17202      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.59919     -2.01864     -2.98749 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ne\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.00784      0.00810      0.01576      0.00038      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02038      0.00000      0.00000     -0.02038      0.00000     -0.02038     -0.01080      0.00000      0.00000     -0.01080      0.00000     -0.01080 \n     0.00810      0.48558      0.61634      0.04080      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00927      0.00000      0.00000     -0.00927      0.00000     -0.00927     -0.02447      0.00000      0.00000     -0.02447      0.00000     -0.02447 \n     0.01576      0.61634      0.78232      0.05179      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01183      0.00000      0.00000     -0.01183      0.00000     -0.01183     -0.03109      0.00000      0.00000     -0.03109      0.00000     -0.03109 \n     0.00038      0.04080      0.05179      0.00343      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00078      0.00000      0.00000     -0.00078      0.00000     -0.00078     -0.00205      0.00000      0.00000     -0.00205      0.00000     -0.00205 \n     0.00000      0.00000      0.00000      0.00000      0.97896      0.00000      0.00000      0.58369      0.00000      0.00000      0.10480      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.97896      0.00000      0.00000      0.58369      0.00000      0.00000      0.10480      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.97896      0.00000      0.00000      0.58369      0.00000      0.00000      0.10480      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.58369      0.00000      0.00000      0.34801      0.00000      0.00000      0.06249      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.58369      0.00000      0.00000      0.34801      0.00000      0.00000      0.06249      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.58369      0.00000      0.00000      0.34801      0.00000      0.00000      0.06249      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.10480      0.00000      0.00000      0.06249      0.00000      0.00000      0.01122      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.10480      0.00000      0.00000      0.06249      0.00000      0.00000      0.01122      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10480      0.00000      0.00000      0.06249      0.00000      0.00000      0.01122      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02038     -0.00927     -0.01183     -0.00078      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00038      0.00000      0.00000      0.00038      0.00000      0.00038      0.00057      0.00000      0.00000      0.00057      0.00000      0.00057 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02038     -0.00927     -0.01183     -0.00078      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00038      0.00000      0.00000      0.00038      0.00000      0.00038      0.00057      0.00000      0.00000      0.00057      0.00000      0.00057 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02038     -0.00927     -0.01183     -0.00078      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00038      0.00000      0.00000      0.00038      0.00000      0.00038      0.00057      0.00000      0.00000      0.00057      0.00000      0.00057 \n    -0.01080     -0.02447     -0.03109     -0.00205      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00057      0.00000      0.00000      0.00057      0.00000      0.00057      0.00129      0.00000      0.00000      0.00129      0.00000      0.00129 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01080     -0.02447     -0.03109     -0.00205      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00057      0.00000      0.00000      0.00057      0.00000      0.00057      0.00129      0.00000      0.00000      0.00129      0.00000      0.00129 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01080     -0.02447     -0.03109     -0.00205      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00057      0.00000      0.00000      0.00057      0.00000      0.00057      0.00129      0.00000      0.00000      0.00129      0.00000      0.00129 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -30.34663     -1.32895     -0.49754     -0.49754     -0.49754      0.12782      0.18826      0.18826      0.18826      1.43030      1.43030      1.43030      1.43030      1.43030      1.50126      1.53817      1.53817      1.53817      5.73774      5.73774      5.73774      5.73774      5.73774      7.43475     17.30284 \n   </alphaeps>\n   <betaeps>\n   -30.34663     -1.32895     -0.49754     -0.49754     -0.49754      0.12782      0.18826      0.18826      0.18826      1.43030      1.43030      1.43030      1.43030      1.43030      1.50126      1.53817      1.53817      1.53817      5.73774      5.73774      5.73774      5.73774      5.73774      7.43475     17.30284 \n   </betaeps>\n   <alphavectors>\n     1.00177     -0.01938      0.00000     -0.00000      0.00000     -0.06517      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.31731      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -2.34027     -2.76922 \n     0.01357      0.49255     -0.00000      0.00000     -0.00000     -0.27041      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.10215      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -4.56475     -3.17825 \n     0.01996      0.62511     -0.00000      0.00000     -0.00000     -0.47174      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.39198     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      6.79764     14.34400 \n     0.00099      0.04139     -0.00000      0.00000     -0.00000      1.44155     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.08872     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.56230      0.50561 \n     0.00000      0.00000      0.69963     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.23779     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.90551      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.69963     -0.00000     -0.00000     -0.23779     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.90551     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.69963      0.00000     -0.00000     -0.23779      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.90551      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.41714     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.27699     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.31517      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.41714     -0.00000     -0.00000     -0.27699      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.31517      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.41714      0.00000     -0.00000     -0.27699     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.31517      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.07490      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.10141     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.56646      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.07490      0.00000      0.00000      1.10141     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.56646     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.07490     -0.00000      0.00000      1.10141      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.56646      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01035     -0.00913      0.00000     -0.00000      0.00000      0.00416     -0.00000      0.00000      0.00000      0.00517     -0.00856      0.00000     -0.00000     -0.00000     -0.01737      0.00000      0.00000     -0.00000     -0.46509      1.07956     -0.00000     -0.00000     -0.00000      0.47136     -2.18436 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.01732     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.03600     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.01732     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      2.03600     -0.00000     -0.00000      0.00000 \n    -0.01035     -0.00913      0.00000     -0.00000      0.00000      0.00416     -0.00000      0.00000      0.00000     -0.01000     -0.00019      0.00000     -0.00000     -0.00000     -0.01737      0.00000      0.00000     -0.00000     -0.70238     -0.94257      0.00000      0.00000      0.00000      0.47136     -2.18436 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.01732      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.03600      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01035     -0.00913      0.00000     -0.00000      0.00000      0.00416     -0.00000      0.00000      0.00000      0.00483      0.00875      0.00000     -0.00000     -0.00000     -0.01737      0.00000      0.00000     -0.00000      1.16748     -0.13700      0.00000      0.00000      0.00000      0.47136     -2.18436 \n    -0.00587     -0.02468      0.00000     -0.00000      0.00000     -0.12468      0.00000     -0.00000     -0.00000     -0.51948      0.86058      0.00000     -0.00000      0.00000     -1.17361      0.00000      0.00000     -0.00000      0.24113     -0.55970      0.00000      0.00000      0.00000     -2.24941     -3.99872 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.74109      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.05556      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.74109      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.05556      0.00000      0.00000     -0.00000 \n    -0.00587     -0.02468      0.00000     -0.00000      0.00000     -0.12468      0.00000     -0.00000     -0.00000      1.00503      0.01960      0.00000     -0.00000      0.00000     -1.17361      0.00000      0.00000     -0.00000      0.36415      0.48867     -0.00000     -0.00000     -0.00000     -2.24941     -3.99872 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.74109     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.05556     -0.00000      0.00000      0.00000      0.00000 \n    -0.00587     -0.02468      0.00000     -0.00000      0.00000     -0.12468      0.00000     -0.00000     -0.00000     -0.48554     -0.88018      0.00000     -0.00000      0.00000     -1.17361      0.00000      0.00000     -0.00000     -0.60527      0.07103     -0.00000     -0.00000     -0.00000     -2.24941     -3.99872 \n   </alphavectors>\n   <betavectors>\n     1.00177     -0.01938      0.00000      0.00000      0.00000     -0.06517     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.31731     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -2.34027     -2.76922 \n     0.01357      0.49255     -0.00000     -0.00000     -0.00000     -0.27041     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.10215     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -4.56475     -3.17825 \n     0.01996      0.62511     -0.00000     -0.00000     -0.00000     -0.47174     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.39198      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      6.79764     14.34400 \n     0.00099      0.04139     -0.00000     -0.00000     -0.00000      1.44155      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.08872      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.56230      0.50561 \n     0.00000      0.00000     -0.00000      0.69963     -0.00000     -0.00000     -0.00000     -0.23779      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.90551     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.69963      0.00000      0.00000      0.00000     -0.23779     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.90551      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.69963     -0.00000     -0.00000      0.00000     -0.23779     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.90551      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.41714      0.00000     -0.00000     -0.00000     -0.27699     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.31517     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.41714     -0.00000     -0.00000      0.00000     -0.27699      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.31517      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.41714     -0.00000     -0.00000      0.00000     -0.27699     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.31517      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.07490      0.00000      0.00000      0.00000      1.10141      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.56646     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.07490     -0.00000     -0.00000     -0.00000      1.10141     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.56646      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.07490      0.00000      0.00000     -0.00000      1.10141     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.56646      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01035     -0.00913      0.00000      0.00000      0.00000      0.00416      0.00000     -0.00000     -0.00000      0.00633      0.00774      0.00000      0.00000      0.00000     -0.01737     -0.00000      0.00000     -0.00000     -0.27898      1.14190      0.00000     -0.00000     -0.00000      0.47136     -2.18436 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01732     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      2.03600      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.01732     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.03600      0.00000      0.00000     -0.00000      0.00000 \n    -0.01035     -0.00913      0.00000      0.00000      0.00000      0.00416      0.00000     -0.00000     -0.00000     -0.00987      0.00162      0.00000      0.00000      0.00000     -0.01737     -0.00000      0.00000     -0.00000     -0.84942     -0.81256     -0.00000      0.00000      0.00000      0.47136     -2.18436 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.01732     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      2.03600      0.00000      0.00000     -0.00000 \n    -0.01035     -0.00913      0.00000      0.00000      0.00000      0.00416      0.00000     -0.00000     -0.00000      0.00353     -0.00935      0.00000      0.00000      0.00000     -0.01737     -0.00000      0.00000     -0.00000      1.12841     -0.32934     -0.00000      0.00000      0.00000      0.47136     -2.18436 \n    -0.00587     -0.02468      0.00000      0.00000      0.00000     -0.12468     -0.00000      0.00000      0.00000     -0.63682     -0.77777      0.00000      0.00000     -0.00000     -1.17361     -0.00000      0.00000     -0.00000      0.14464     -0.59202     -0.00000      0.00000      0.00000     -2.24941     -3.99872 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.74109      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.05556     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.74109      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.05556     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00587     -0.02468      0.00000      0.00000      0.00000     -0.12468     -0.00000      0.00000      0.00000      0.99198     -0.16262      0.00000      0.00000     -0.00000     -1.17361     -0.00000      0.00000     -0.00000      0.44038      0.42127      0.00000     -0.00000     -0.00000     -2.24941     -3.99872 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.74109      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.05556      0.00000     -0.00000      0.00000 \n    -0.00587     -0.02468      0.00000      0.00000      0.00000     -0.12468     -0.00000      0.00000      0.00000     -0.35516      0.94039      0.00000      0.00000     -0.00000     -1.17361     -0.00000      0.00000     -0.00000     -0.58502      0.17075      0.00000     -0.00000     -0.00000     -2.24941     -3.99872 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Na\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.00067      0.00164     -0.00195     -0.02194      0.00368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00292      0.00000      0.00000      0.00292      0.00000      0.00292      0.00539      0.00000      0.00000      0.00539      0.00000      0.00539 \n     0.00164      2.00218      0.04764      0.08041     -0.01565      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03877      0.00000      0.00000     -0.03877      0.00000     -0.03877     -0.03050      0.00000      0.00000     -0.03050      0.00000     -0.03050 \n    -0.00195      0.04764      0.37479      0.39675     -0.02704      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00667      0.00000      0.00000     -0.00667      0.00000     -0.00667     -0.05064      0.00000      0.00000     -0.05064      0.00000     -0.05064 \n    -0.02194      0.08041      0.39675      0.42069     -0.02884      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00765      0.00000      0.00000     -0.00765      0.00000     -0.00765     -0.05403      0.00000      0.00000     -0.05403      0.00000     -0.05403 \n     0.00368     -0.01565     -0.02704     -0.02884      0.00203      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00072      0.00000      0.00000      0.00072      0.00000      0.00072      0.00381      0.00000      0.00000      0.00381      0.00000      0.00381 \n     0.00000      0.00000      0.00000      0.00000      0.00000      2.00753      0.00000      0.00000      0.03967      0.00000      0.00000     -0.02766      0.00000      0.00000      0.00949      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00753      0.00000      0.00000      0.03967      0.00000      0.00000     -0.02766      0.00000      0.00000      0.00949      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00753      0.00000      0.00000      0.03967      0.00000      0.00000     -0.02766      0.00000      0.00000      0.00949      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.03967      0.00000      0.00000      0.00115      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00024      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03967      0.00000      0.00000      0.00115      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00024      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03967      0.00000      0.00000      0.00115      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00024      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.02766      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00086      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02766      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00086      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02766      0.00000      0.00000     -0.00014      0.00000      0.00000      0.00086      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00949      0.00000      0.00000      0.00024      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00949      0.00000      0.00000      0.00024      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00949      0.00000      0.00000      0.00024      0.00000      0.00000     -0.00007      0.00000      0.00000      0.00005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00292     -0.03877     -0.00667     -0.00765      0.00072      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00085      0.00000      0.00000      0.00085      0.00000      0.00085      0.00137      0.00000      0.00000      0.00137      0.00000      0.00137 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00292     -0.03877     -0.00667     -0.00765      0.00072      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00085      0.00000      0.00000      0.00085      0.00000      0.00085      0.00137      0.00000      0.00000      0.00137      0.00000      0.00137 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00292     -0.03877     -0.00667     -0.00765      0.00072      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00085      0.00000      0.00000      0.00085      0.00000      0.00085      0.00137      0.00000      0.00000      0.00137      0.00000      0.00137 \n     0.00539     -0.03050     -0.05064     -0.05403      0.00381      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00137      0.00000      0.00137      0.00715      0.00000      0.00000      0.00715      0.00000      0.00715 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00539     -0.03050     -0.05064     -0.05403      0.00381      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00137      0.00000      0.00137      0.00715      0.00000      0.00000      0.00715      0.00000      0.00715 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00539     -0.03050     -0.05064     -0.05403      0.00381      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00137      0.00000      0.00000      0.00137      0.00000      0.00137      0.00715      0.00000      0.00000      0.00715      0.00000      0.00715 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99550      0.00150      0.00150      0.00150      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -37.71620     -2.05308     -1.05101     -1.05101     -1.05101     -0.11327     -0.03435     -0.03435     -0.03435     -0.00085      0.01216      0.01216      0.01216      0.05610      0.05610      0.05610      0.05610      0.05610      0.08231      0.08231      0.08231      0.08270      0.26134      0.26134      0.26134      0.26134      0.26134      0.31520      0.63806 \n   </alphaeps>\n   <betaeps>\n   -37.71482     -2.05091     -1.04822     -1.04822     -1.04822     -0.08220     -0.01603     -0.01603     -0.01603      0.00296      0.01643      0.01643      0.01643      0.07305      0.07305      0.07305      0.07305      0.07305      0.09720      0.10035      0.10035      0.10035      0.29183      0.29183      0.29183      0.29183      0.29183      0.32540      0.65790 \n   </betaeps>\n   <alphavectors>\n     1.00016     -0.00282      0.00000     -0.00000      0.00000     -0.00292     -0.00000     -0.00000      0.00000      0.00357      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.05561      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.21020     -0.30975 \n     0.00365      1.00090     -0.00000      0.00000     -0.00000     -0.03900     -0.00000     -0.00000      0.00000      0.03196      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.52853      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.87701     -3.25779 \n     0.00002      0.03898     -0.00000      0.00000     -0.00000      0.61148      0.00000      0.00000     -0.00000     -0.21777      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.82173      0.00000     -0.00000      0.00000      0.00000     -0.00000     -3.37074     -9.51003 \n    -0.00988      0.05167     -0.00000      0.00000     -0.00000      0.64560      0.00000      0.00000     -0.00000     -0.97505     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      2.28955     -0.00000      0.00000     -0.00000     -0.00000      0.00000     10.02514     10.73055 \n     0.00175     -0.00851      0.00000     -0.00000      0.00000     -0.04340     -0.00000     -0.00000      0.00000      1.44915      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.26987      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.64806     -1.36794 \n    -0.00000      0.00000     -0.00000      0.00000      1.00206      0.00000      0.00000      0.00000     -0.00445     -0.00000     -0.00214      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.15659      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      1.00206      0.00000      0.00000     -0.00445     -0.00000      0.00000      0.00000      0.00000     -0.00214     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.15659     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      1.00206      0.00000     -0.00000      0.00000      0.00000     -0.00445     -0.00000     -0.00000     -0.00000      0.00000     -0.00214      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.15659      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.02198      0.00000      0.00000      0.00000      0.48623     -0.00000     -0.23942      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.35483      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.02198      0.00000     -0.00000      0.48623     -0.00000      0.00000      0.00000      0.00000     -0.23942     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.35483     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.02198     -0.00000      0.00000     -0.00000     -0.00000      0.48623     -0.00000     -0.00000     -0.00000      0.00000     -0.23942     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.35483     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.01496      0.00000      0.00000      0.00000      0.56366      0.00000     -0.51251     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.73055     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.01496     -0.00000     -0.00000      0.56366      0.00000     -0.00000     -0.00000     -0.00000     -0.51251      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73055      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.01496     -0.00000      0.00000     -0.00000     -0.00000      0.56366      0.00000     -0.00000     -0.00000      0.00000     -0.51251     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73055      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00514      0.00000      0.00000      0.00000      0.07512     -0.00000      1.21971      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.75943      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00514      0.00000     -0.00000      0.07512     -0.00000      0.00000      0.00000      0.00000      1.21971     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.75943     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00514     -0.00000      0.00000     -0.00000     -0.00000      0.07512     -0.00000      0.00000      0.00000     -0.00000      1.21971     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.75943     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00139     -0.02055      0.00000     -0.00000      0.00000     -0.00866     -0.00000     -0.00000      0.00000     -0.01072     -0.00000     -0.00000      0.00000      0.02399     -0.10026      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.07105     -0.13344      1.64013     -0.00000     -0.00000      0.00000     -0.14870      2.90830 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.17855      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      2.85018     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.17855      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.85018     -0.00000      0.00000      0.00000     -0.00000 \n     0.00139     -0.02055      0.00000     -0.00000      0.00000     -0.00866     -0.00000     -0.00000      0.00000     -0.01072     -0.00000     -0.00000      0.00000     -0.09882      0.02936      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.07105      1.48712     -0.70450      0.00000      0.00000     -0.00000     -0.14870      2.90830 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.17855     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.85018      0.00000      0.00000 \n     0.00139     -0.02055      0.00000     -0.00000      0.00000     -0.00866     -0.00000     -0.00000      0.00000     -0.01072     -0.00000     -0.00000      0.00000      0.07483      0.07090      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.07105     -1.35368     -0.93563     -0.00000     -0.00000      0.00000     -0.14870      2.90830 \n     0.00253     -0.01664      0.00000     -0.00000      0.00000     -0.08122     -0.00000     -0.00000      0.00000      0.12788      0.00000     -0.00000     -0.00000     -0.25129      1.05036     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.32812      0.10103     -1.24171      0.00000      0.00000     -0.00000     -2.50065     -3.22704 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.87062     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -2.15782      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.87062     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -2.15782     -0.00000      0.00000     -0.00000      0.00000 \n     0.00253     -0.01664      0.00000     -0.00000      0.00000     -0.08122     -0.00000     -0.00000      0.00000      0.12788      0.00000     -0.00000     -0.00000      1.03529     -0.30755     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.32812     -1.12587      0.53337     -0.00000     -0.00000      0.00000     -2.50065     -3.22704 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.87062      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -2.15782     -0.00000     -0.00000 \n     0.00253     -0.01664      0.00000     -0.00000      0.00000     -0.08122     -0.00000     -0.00000      0.00000      0.12788      0.00000     -0.00000     -0.00000     -0.78399     -0.74281     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.32812      1.02484      0.70835      0.00000      0.00000     -0.00000     -2.50065     -3.22704 \n   </alphavectors>\n   <betavectors>\n     1.00016     -0.00295     -0.00000     -0.00000      0.00000     -0.00556     -0.00000     -0.00000      0.00000      0.00719     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.05985      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.21788     -0.30349 \n     0.00365      0.99942      0.00000      0.00000     -0.00000     -0.06090     -0.00000     -0.00000      0.00000      0.06670     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.56531      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.95895     -3.20249 \n     0.00001      0.03238      0.00000      0.00000     -0.00000      0.52282      0.00000      0.00000     -0.00000     -0.13948      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.92795      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -3.60896     -9.40791 \n    -0.00988      0.05386      0.00000      0.00000     -0.00000      0.71119      0.00000      0.00000     -0.00000     -1.15531      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      2.42175     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     10.27948     10.43476 \n     0.00175     -0.00884     -0.00000     -0.00000      0.00000     -0.00418     -0.00000     -0.00000      0.00000      1.53342     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.20274      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.65969     -1.32261 \n    -0.00000      0.00000      0.00000      0.00000      1.00170     -0.00000     -0.00000     -0.00000     -0.01760     -0.00000      0.01392      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.15735     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      1.00170     -0.00000      0.00000     -0.01760     -0.00000      0.00000      0.00000     -0.00000      0.01392     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.15735      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      1.00170     -0.00000      0.00000      0.00000      0.00000     -0.01760      0.00000      0.00000     -0.00000     -0.00000      0.01392      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.15735     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.01762      0.00000      0.00000      0.00000      0.29663     -0.00000     -0.19229      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.41581     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.01762      0.00000     -0.00000      0.29663     -0.00000      0.00000     -0.00000      0.00000     -0.19229     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.41581      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.01762     -0.00000      0.00000     -0.00000     -0.00000      0.29663      0.00000      0.00000     -0.00000      0.00000     -0.19229      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.41581     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.01264      0.00000      0.00000      0.00000      0.59867     -0.00000     -0.79259     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.60893      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.01264      0.00000     -0.00000      0.59867      0.00000     -0.00000     -0.00000      0.00000     -0.79259      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.60893     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01264      0.00000     -0.00000     -0.00000     -0.00000      0.59867     -0.00000     -0.00000      0.00000      0.00000     -0.79259     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.60893      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00433      0.00000      0.00000      0.00000      0.26327      0.00000      1.25055      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.66098     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00433      0.00000     -0.00000      0.26327      0.00000     -0.00000      0.00000     -0.00000      1.25055     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.66098      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00433     -0.00000      0.00000     -0.00000     -0.00000      0.26327      0.00000      0.00000     -0.00000     -0.00000      1.25055      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.66098     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00139     -0.01856     -0.00000     -0.00000      0.00000     -0.02567     -0.00000     -0.00000      0.00000     -0.00278     -0.00000      0.00000      0.00000      0.00715     -0.19032     -0.00000      0.00000      0.00000     -0.08201      0.00000      0.00000     -0.00000     -0.08881      1.63533      0.00000      0.00000      0.00000     -0.05880      2.91115 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.32988     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      2.83665      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.32988     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.83665     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00139     -0.01856     -0.00000     -0.00000      0.00000     -0.02567     -0.00000     -0.00000      0.00000     -0.00278     -0.00000      0.00000      0.00000     -0.16840      0.08897     -0.00000      0.00000      0.00000     -0.08201      0.00000      0.00000     -0.00000      1.46064     -0.74076     -0.00000     -0.00000     -0.00000     -0.05880      2.91115 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.32988      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.83665      0.00000     -0.00000 \n     0.00139     -0.01856     -0.00000     -0.00000      0.00000     -0.02567     -0.00000     -0.00000      0.00000     -0.00278     -0.00000      0.00000      0.00000      0.16125      0.10135     -0.00000      0.00000      0.00000     -0.08201      0.00000      0.00000     -0.00000     -1.37184     -0.89457     -0.00000      0.00000      0.00000     -0.05880      2.91115 \n     0.00253     -0.01703     -0.00000     -0.00000      0.00000     -0.06265     -0.00000     -0.00000      0.00000      0.10199     -0.00000     -0.00000     -0.00000     -0.04298      1.14393      0.00000      0.00000     -0.00000      0.28072     -0.00000     -0.00000      0.00000      0.06434     -1.18487     -0.00000     -0.00000     -0.00000     -2.60479     -3.14954 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.98273      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -2.05528     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.98273      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -2.05528     -0.00000      0.00000     -0.00000      0.00000 \n     0.00253     -0.01703     -0.00000     -0.00000      0.00000     -0.06265     -0.00000     -0.00000      0.00000      0.10199     -0.00000     -0.00000     -0.00000      1.01216     -0.53475      0.00000      0.00000     -0.00000      0.28072     -0.00000     -0.00000      0.00000     -1.05830      0.53671      0.00000      0.00000      0.00000     -2.60479     -3.14954 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.98273     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -2.05528     -0.00000      0.00000 \n     0.00253     -0.01703     -0.00000     -0.00000      0.00000     -0.06265     -0.00000     -0.00000      0.00000      0.10199     -0.00000     -0.00000     -0.00000     -0.96918     -0.60918      0.00000      0.00000     -0.00000      0.28072     -0.00000     -0.00000      0.00000      0.99396      0.64816      0.00000     -0.00000     -0.00000     -2.60479     -3.14954 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mg\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.01188      0.04284      0.06791     -0.19283      0.00651      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00664      0.00000      0.00000      0.00664      0.00000      0.00664      0.05044      0.00000      0.00000      0.05044      0.00000      0.05044 \n     0.04284      1.94656     -0.02406      0.19402      0.00087      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05992      0.00000      0.00000     -0.05992      0.00000     -0.05992     -0.07633      0.00000      0.00000     -0.07633      0.00000     -0.07633 \n     0.06791     -0.02406      0.56475      0.77068     -0.00126      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02347      0.00000      0.00000     -0.02347      0.00000     -0.02347     -0.08525      0.00000      0.00000     -0.08525      0.00000     -0.08525 \n    -0.19283      0.19402      0.77068      1.12041     -0.00259      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04071      0.00000      0.00000     -0.04071      0.00000     -0.04071     -0.13475      0.00000      0.00000     -0.13475      0.00000     -0.13475 \n     0.00651      0.00087     -0.00126     -0.00259      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00006      0.00000      0.00000      0.00006      0.00000      0.00006      0.00036      0.00000      0.00000      0.00036      0.00000      0.00036 \n     0.00000      0.00000      0.00000      0.00000      0.00000      2.00693      0.00000      0.00000      0.03171      0.00000      0.00000     -0.01523      0.00000      0.00000      0.00397      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00693      0.00000      0.00000      0.03171      0.00000      0.00000     -0.01523      0.00000      0.00000      0.00397      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00693      0.00000      0.00000      0.03171      0.00000      0.00000     -0.01523      0.00000      0.00000      0.00397      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.03171      0.00000      0.00000      0.00050      0.00000      0.00000     -0.00024      0.00000      0.00000      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03171      0.00000      0.00000      0.00050      0.00000      0.00000     -0.00024      0.00000      0.00000      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03171      0.00000      0.00000      0.00050      0.00000      0.00000     -0.00024      0.00000      0.00000      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.01523      0.00000      0.00000     -0.00024      0.00000      0.00000      0.00012      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01523      0.00000      0.00000     -0.00024      0.00000      0.00000      0.00012      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01523      0.00000      0.00000     -0.00024      0.00000      0.00000      0.00012      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00397      0.00000      0.00000      0.00006      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00397      0.00000      0.00000      0.00006      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00397      0.00000      0.00000      0.00006      0.00000      0.00000     -0.00003      0.00000      0.00000      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00664     -0.05992     -0.02347     -0.04071      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00294      0.00000      0.00000      0.00294      0.00000      0.00294      0.00639      0.00000      0.00000      0.00639      0.00000      0.00639 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00664     -0.05992     -0.02347     -0.04071      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00294      0.00000      0.00000      0.00294      0.00000      0.00294      0.00639      0.00000      0.00000      0.00639      0.00000      0.00639 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00664     -0.05992     -0.02347     -0.04071      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00294      0.00000      0.00000      0.00294      0.00000      0.00294      0.00639      0.00000      0.00000      0.00639      0.00000      0.00639 \n     0.05044     -0.07633     -0.08525     -0.13475      0.00036      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00639      0.00000      0.00000      0.00639      0.00000      0.00639      0.01811      0.00000      0.00000      0.01811      0.00000      0.01811 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.05044     -0.07633     -0.08525     -0.13475      0.00036      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00639      0.00000      0.00000      0.00639      0.00000      0.00639      0.01811      0.00000      0.00000      0.01811      0.00000      0.01811 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.05044     -0.07633     -0.08525     -0.13475      0.00036      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00639      0.00000      0.00000      0.00639      0.00000      0.00639      0.01811      0.00000      0.00000      0.01811      0.00000      0.01811 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -45.98949     -2.90315     -1.71942     -1.71942     -1.71942     -0.17539     -0.05035     -0.05035     -0.05035      0.00551      0.01981      0.01981      0.01981      0.07957      0.07957      0.07957      0.07957      0.07957      0.13660      0.17036      0.17036      0.17036      0.40137      0.40137      0.40137      0.40137      0.40137      0.92493      3.63569 \n   </alphaeps>\n   <betaeps>\n   -45.98949     -2.90315     -1.71942     -1.71942     -1.71942     -0.17539     -0.05035     -0.05035     -0.05035      0.00551      0.01981      0.01981      0.01981      0.07957      0.07957      0.07957      0.07957      0.07957      0.13660      0.17036      0.17036      0.17036      0.40137      0.40137      0.40137      0.40137      0.40137      0.92493      3.63569 \n   </betaeps>\n   <alphavectors>\n     1.00294     -0.00512      0.00000      0.00000      0.00000     -0.00497      0.00000     -0.00000      0.00000     -0.00021     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01694      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.20950     -1.37229 \n     0.02612      0.98475     -0.00000     -0.00000     -0.00000     -0.05355      0.00000     -0.00000      0.00000     -0.00924     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13415      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      2.38229    -11.60852 \n     0.03656      0.01563     -0.00000     -0.00000     -0.00000      0.52990     -0.00000      0.00000     -0.00000     -0.27733     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.28099     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      6.10201    -19.20574 \n    -0.09180      0.14061     -0.00000     -0.00000     -0.00000      0.72939     -0.00000      0.00000     -0.00000     -1.04168     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.26687     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -2.68326     40.72830 \n     0.00324      0.00028     -0.00000     -0.00000     -0.00000     -0.00142      0.00000     -0.00000      0.00000      1.63212      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.53692     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.24358     -1.44572 \n     0.00000      0.00000     -0.00000      1.00173      0.00000     -0.00000     -0.01958      0.00000     -0.00000     -0.00000      0.00417     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.19676     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      1.00173      0.00000      0.00000      0.00000     -0.00000     -0.01958     -0.00000     -0.00000     -0.00000     -0.00000      0.00417     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.19676     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      1.00173     -0.00000      0.00000     -0.00000     -0.01958      0.00000      0.00000      0.00417     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.19676     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.01583     -0.00000      0.00000      0.40813      0.00000     -0.00000      0.00000     -0.20380     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.33325     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.01583      0.00000      0.00000     -0.00000      0.00000      0.40813     -0.00000     -0.00000     -0.00000     -0.00000     -0.20380     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.33325     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.01583      0.00000     -0.00000      0.00000      0.40813      0.00000      0.00000     -0.20380     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.33325     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00760     -0.00000      0.00000      0.61542      0.00000     -0.00000      0.00000     -0.44334      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.45191      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00760      0.00000      0.00000     -0.00000      0.00000      0.61542      0.00000      0.00000      0.00000      0.00000     -0.44334      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.45191      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00760      0.00000     -0.00000      0.00000      0.61542     -0.00000     -0.00000     -0.44334      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.45191      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00198     -0.00000      0.00000      0.13302     -0.00000      0.00000     -0.00000      1.11778     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.50518     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00198      0.00000      0.00000     -0.00000      0.00000      0.13302     -0.00000      0.00000      0.00000      0.00000      1.11778     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.50518     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00198      0.00000     -0.00000      0.00000      0.13302      0.00000      0.00000      1.11778     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.50518     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00304     -0.03167      0.00000      0.00000      0.00000     -0.02142      0.00000     -0.00000      0.00000      0.02456      0.00000      0.00000     -0.00000     -0.04562     -0.04147      0.00000      0.00000      0.00000      0.07114     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.95785     -0.76515     -2.22325     -0.18554 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.10679     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      2.12340      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.10679      0.00000      0.00000     -0.00000      0.00000      0.00000      2.12340      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00304     -0.03167      0.00000      0.00000      0.00000     -0.02142      0.00000     -0.00000      0.00000      0.02456      0.00000      0.00000     -0.00000      0.05873     -0.01877      0.00000      0.00000      0.00000      0.07114     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.14157     -0.44695     -2.22325     -0.18554 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.10679      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.12340      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00304     -0.03167      0.00000      0.00000      0.00000     -0.02142      0.00000     -0.00000      0.00000      0.02456      0.00000      0.00000     -0.00000     -0.01311      0.06024      0.00000      0.00000      0.00000      0.07114     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.18371      1.21210     -2.22325     -0.18554 \n     0.02452     -0.04380      0.00000      0.00000      0.00000     -0.08084      0.00000     -0.00000      0.00000      0.03285      0.00000      0.00000     -0.00000     -0.71254     -0.64778      0.00000      0.00000      0.00000     -1.04591      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.59473      0.47508      0.92561    -10.82401 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.66794      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.31841     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.66794     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.31841      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.02452     -0.04380      0.00000      0.00000      0.00000     -0.08084      0.00000     -0.00000      0.00000      0.03285      0.00000      0.00000     -0.00000      0.91727     -0.29319      0.00000      0.00000      0.00000     -1.04591      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.70879      0.27751      0.92561    -10.82401 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.66794     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.31841      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.02452     -0.04380      0.00000      0.00000      0.00000     -0.08084      0.00000     -0.00000      0.00000      0.03285      0.00000      0.00000     -0.00000     -0.20473      0.94097      0.00000      0.00000      0.00000     -1.04591      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.11407     -0.75259      0.92561    -10.82401 \n   </alphavectors>\n   <betavectors>\n     1.00294     -0.00512      0.00000     -0.00000      0.00000     -0.00497     -0.00000     -0.00000      0.00000     -0.00021      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.01694     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.20950     -1.37229 \n     0.02612      0.98475     -0.00000      0.00000     -0.00000     -0.05355     -0.00000     -0.00000      0.00000     -0.00924      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.13415     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.38229    -11.60852 \n     0.03656      0.01563     -0.00000      0.00000     -0.00000      0.52990      0.00000      0.00000     -0.00000     -0.27733      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.28099      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      6.10201    -19.20574 \n    -0.09180      0.14061     -0.00000      0.00000     -0.00000      0.72939      0.00000      0.00000     -0.00000     -1.04168      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.26687      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.68326     40.72830 \n     0.00324      0.00028     -0.00000      0.00000     -0.00000     -0.00142     -0.00000     -0.00000      0.00000      1.63212     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.53692      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.24358     -1.44572 \n     0.00000      0.00000      1.00173     -0.00000      0.00000      0.00000     -0.01958      0.00000     -0.00000      0.00000      0.00417      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.19676     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      1.00173     -0.00000      0.00000      0.00000     -0.01958      0.00000      0.00000     -0.00000      0.00000      0.00417     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.19676      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      1.00173     -0.00000     -0.00000     -0.00000     -0.01958      0.00000     -0.00000      0.00417      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.19676     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.01583      0.00000     -0.00000     -0.00000      0.40813     -0.00000      0.00000     -0.00000     -0.20380      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.33325     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.01583     -0.00000     -0.00000     -0.00000      0.40813      0.00000      0.00000     -0.00000      0.00000     -0.20380     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.33325      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.01583      0.00000      0.00000      0.00000      0.40813      0.00000     -0.00000     -0.20380      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.33325     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00760      0.00000     -0.00000     -0.00000      0.61542     -0.00000      0.00000     -0.00000     -0.44334     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.45191      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00760      0.00000     -0.00000     -0.00000      0.61542     -0.00000     -0.00000      0.00000     -0.00000     -0.44334      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.45191      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00760      0.00000      0.00000      0.00000      0.61542     -0.00000      0.00000     -0.44334     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.45191      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00198      0.00000     -0.00000     -0.00000      0.13302      0.00000     -0.00000      0.00000      1.11778      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.50518     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00198     -0.00000     -0.00000     -0.00000      0.13302     -0.00000     -0.00000      0.00000     -0.00000      1.11778     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.50518     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00198      0.00000      0.00000      0.00000      0.13302     -0.00000      0.00000      1.11778      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.50518     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00304     -0.03167      0.00000     -0.00000      0.00000     -0.02142     -0.00000     -0.00000      0.00000      0.02456     -0.00000      0.00000      0.00000      0.05288     -0.03170     -0.00000      0.00000      0.00000      0.07114      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.02983     -0.66513     -2.22325     -0.18554 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.10679     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      2.12340     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.10679     -0.00000     -0.00000     -0.00000      0.00000      0.00000      2.12340      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00304     -0.03167      0.00000     -0.00000      0.00000     -0.02142     -0.00000     -0.00000      0.00000      0.02456     -0.00000      0.00000      0.00000     -0.05389     -0.02995     -0.00000      0.00000      0.00000      0.07114      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.09093     -0.55929     -2.22325     -0.18554 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.10679     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.12340      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00304     -0.03167      0.00000     -0.00000      0.00000     -0.02142     -0.00000     -0.00000      0.00000      0.02456     -0.00000      0.00000      0.00000      0.00101      0.06164     -0.00000      0.00000      0.00000      0.07114      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.06110      1.22442     -2.22325     -0.18554 \n     0.02452     -0.04380      0.00000     -0.00000      0.00000     -0.08084     -0.00000     -0.00000      0.00000      0.03285     -0.00000      0.00000      0.00000      0.82596     -0.49511     -0.00000      0.00000      0.00000     -1.04591     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.63942      0.41298      0.92561    -10.82401 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.66794      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.31841      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.66794      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.31841      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.02452     -0.04380      0.00000     -0.00000      0.00000     -0.08084     -0.00000     -0.00000      0.00000      0.03285     -0.00000      0.00000      0.00000     -0.84176     -0.46774     -0.00000      0.00000      0.00000     -1.04591     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.67736      0.34726      0.92561    -10.82401 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.66794      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.31841      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.02452     -0.04380      0.00000     -0.00000      0.00000     -0.08084     -0.00000     -0.00000      0.00000      0.03285     -0.00000      0.00000      0.00000      0.01580      0.96285     -0.00000      0.00000      0.00000     -1.04591     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.03794     -0.76024      0.92561    -10.82401 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Al\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.00182      0.00187      0.00177     -0.02496     -0.00960      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00714      0.00000      0.00000      0.00714      0.00000      0.00714      0.00706      0.00000      0.00000      0.00706      0.00000      0.00706 \n     0.00187      1.96798      0.00629      0.10929      0.04073      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06525      0.00000      0.00000     -0.06525      0.00000     -0.06525     -0.03323      0.00000      0.00000     -0.03323      0.00000     -0.03323 \n     0.00177      0.00629      0.63362      0.63791      0.09642      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03125      0.00000      0.00000     -0.03125      0.00000     -0.03125     -0.05055      0.00000      0.00000     -0.05055      0.00000     -0.05055 \n    -0.02496      0.10929      0.63791      0.64817      0.09939      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03505      0.00000      0.00000     -0.03505      0.00000     -0.03505     -0.05273      0.00000      0.00000     -0.05273      0.00000     -0.05273 \n    -0.00960      0.04073      0.09642      0.09939      0.01559      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00616      0.00000      0.00000     -0.00616      0.00000     -0.00616     -0.00841      0.00000      0.00000     -0.00841      0.00000     -0.00841 \n     0.00000      0.00000      0.00000      0.00000      0.00000      2.00871      0.00000      0.00000      0.02726      0.00000      0.00000     -0.02006      0.00000      0.00000      0.00593      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00871      0.00000      0.00000      0.02726      0.00000      0.00000     -0.02006      0.00000      0.00000      0.00593      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00871      0.00000      0.00000      0.02726      0.00000      0.00000     -0.02006      0.00000      0.00000      0.00593      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.02726      0.00000      0.00000      0.08054      0.00000      0.00000      0.09607      0.00000      0.00000      0.01035      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02726      0.00000      0.00000      0.08054      0.00000      0.00000      0.09607      0.00000      0.00000      0.01035      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02726      0.00000      0.00000      0.08054      0.00000      0.00000      0.09607      0.00000      0.00000      0.01035      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.02006      0.00000      0.00000      0.09607      0.00000      0.00000      0.11597      0.00000      0.00000      0.01228      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02006      0.00000      0.00000      0.09607      0.00000      0.00000      0.11598      0.00000      0.00000      0.01228      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02006      0.00000      0.00000      0.09607      0.00000      0.00000      0.11597      0.00000      0.00000      0.01228      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00593      0.00000      0.00000      0.01035      0.00000      0.00000      0.01228      0.00000      0.00000      0.00133      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00593      0.00000      0.00000      0.01035      0.00000      0.00000      0.01228      0.00000      0.00000      0.00133      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00593      0.00000      0.00000      0.01035      0.00000      0.00000      0.01228      0.00000      0.00000      0.00133      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00714     -0.06525     -0.03125     -0.03505     -0.00616      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00376      0.00000      0.00000      0.00376      0.00000      0.00376      0.00361      0.00000      0.00000      0.00361      0.00000      0.00361 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00714     -0.06525     -0.03125     -0.03505     -0.00616      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00376      0.00000      0.00000      0.00376      0.00000      0.00376      0.00361      0.00000      0.00000      0.00361      0.00000      0.00361 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00714     -0.06525     -0.03125     -0.03505     -0.00616      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00376      0.00000      0.00000      0.00376      0.00000      0.00376      0.00361      0.00000      0.00000      0.00361      0.00000      0.00361 \n     0.00706     -0.03323     -0.05055     -0.05273     -0.00841      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00361      0.00000      0.00000      0.00361      0.00000      0.00361      0.00461      0.00000      0.00000      0.00461      0.00000      0.00461 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00706     -0.03323     -0.05055     -0.05273     -0.00841      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00361      0.00000      0.00000      0.00361      0.00000      0.00361      0.00461      0.00000      0.00000      0.00461      0.00000      0.00461 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00706     -0.03323     -0.05055     -0.05273     -0.00841      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00361      0.00000      0.00000      0.00361      0.00000      0.00361      0.00461      0.00000      0.00000      0.00461      0.00000      0.00461 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33334      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -55.16701     -3.93524     -2.56603     -2.56603     -2.56603     -0.29706     -0.11121     -0.11121     -0.11121     -0.00737      0.01788      0.01788      0.01788      0.05666      0.05666      0.05666      0.05666      0.05666      0.10637      0.22798      0.22798      0.22798      0.32646      0.32646      0.32646      0.32646      0.32646      0.50988      1.28715 \n   </alphaeps>\n   <betaeps>\n   -55.16533     -3.93291     -2.56315     -2.56315     -2.56315     -0.27269     -0.08870     -0.08870     -0.08870     -0.00127      0.02179      0.02179      0.02179      0.07140      0.07140      0.07140      0.07140      0.07140      0.11472      0.24416      0.24416      0.24416      0.34889      0.34889      0.34889      0.34889      0.34889      0.52582      1.30097 \n   </betaeps>\n   <alphavectors>\n     1.00045     -0.00389      0.00000     -0.00000      0.00000     -0.00109     -0.00000      0.00000      0.00000     -0.01407     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.03447      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.25694     -0.39436 \n     0.00477      0.99179     -0.00000      0.00000     -0.00000     -0.02394     -0.00000      0.00000      0.00000     -0.11658     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.25000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.11776     -2.75082 \n     0.00177      0.01832      0.00000      0.00000     -0.00000      0.56329      0.00000     -0.00000     -0.00000     -0.38622     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.01053      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      3.63020     -2.63261 \n    -0.01140      0.06979     -0.00000      0.00000     -0.00000      0.55579      0.00000     -0.00000     -0.00000     -0.94988     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.93305     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -3.52324      9.30900 \n    -0.00459      0.02266     -0.00000      0.00000     -0.00000      0.07962      0.00000     -0.00000     -0.00000      2.25687      0.00000      0.00000     -0.00000     -0.00001     -0.00000      0.00000     -0.00000      0.00000      4.53745     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -3.35835      3.34814 \n     0.00000      0.00000     -0.00000      0.00000      1.00224     -0.00000     -0.00000      0.00000     -0.00024      0.00000      0.00000     -0.01025      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.23321      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      1.00224     -0.00000      0.00000     -0.00000     -0.00024      0.00000      0.00000     -0.00000     -0.01025     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.23321     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      1.00224     -0.00000     -0.00000     -0.00000     -0.00024     -0.00000     -0.00000     -0.00000     -0.00000     -0.01025     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.23321      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.01416      0.00000      0.00000     -0.00000      0.49041      0.00000      0.00000     -0.23095      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.23754     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.01416     -0.00000      0.00000     -0.00000      0.49041     -0.00000     -0.00000      0.00000     -0.23095     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.23754     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.01416      0.00000      0.00000      0.00000      0.49041     -0.00000     -0.00000     -0.00000     -0.00000     -0.23095     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.23754      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.01016      0.00000      0.00000     -0.00000      0.58934     -0.00000      0.00000     -0.38953     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.47018      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.01016      0.00000     -0.00000     -0.00000      0.58934     -0.00000     -0.00000      0.00000     -0.38953     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.47018      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.01016      0.00000      0.00000      0.00000      0.58934     -0.00000     -0.00000     -0.00000     -0.00000     -0.38953      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.47018      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00301      0.00000      0.00000     -0.00000      0.06281     -0.00000     -0.00000      1.13723      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.59969     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00301     -0.00000      0.00000     -0.00000      0.06281     -0.00000     -0.00000      0.00000      1.13723      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.59969     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00301      0.00000      0.00000      0.00000      0.06281      0.00000      0.00000      0.00000      0.00000      1.13723     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.59969     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00340     -0.03373      0.00000     -0.00000      0.00000     -0.02209     -0.00000      0.00000      0.00000      0.00533     -0.00000     -0.00000     -0.00000     -0.07768     -0.00000      0.00000      0.13454     -0.00000     -0.09699      0.00000      0.00000     -0.00000     -0.57996      0.00000     -0.00000      1.00452     -0.00000     -0.14558     -2.54105 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.26908     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.00903      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.26908     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00903     -0.00000     -0.00000 \n     0.00340     -0.03373      0.00000     -0.00000      0.00000     -0.02209     -0.00000      0.00000      0.00000      0.00533     -0.00000      0.00000     -0.00000      0.15535      0.00000     -0.00000      0.00000     -0.00000     -0.09699     -0.00000     -0.00000     -0.00000      1.15991     -0.00000      0.00000      0.00000      0.00000     -0.14558     -2.54105 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.26908     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.00903      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00340     -0.03373      0.00000     -0.00000      0.00000     -0.02209     -0.00000      0.00000      0.00000      0.00533      0.00000      0.00000     -0.00000     -0.07768     -0.00000      0.00000     -0.13454      0.00000     -0.09699      0.00000      0.00000      0.00000     -0.57996     -0.00000     -0.00000     -1.00452      0.00000     -0.14558     -2.54105 \n     0.00340     -0.01786      0.00000     -0.00000      0.00000     -0.04305      0.00000      0.00000      0.00000     -0.27175     -0.00000     -0.00000      0.00000     -0.45522     -0.00000      0.00000      0.78848     -0.00000     -1.76106     -0.00000      0.00000     -0.00000      0.36763      0.00000     -0.00000     -0.63676      0.00000      2.09001     -2.61355 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.57695      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.27351     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.57695     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.27351      0.00000      0.00000 \n     0.00340     -0.01786      0.00000     -0.00000      0.00000     -0.04305     -0.00000      0.00000      0.00000     -0.27175     -0.00000     -0.00000      0.00000      0.91046      0.00000     -0.00000      0.00000     -0.00000     -1.76106      0.00000     -0.00000     -0.00000     -0.73526     -0.00000      0.00000     -0.00000      0.00000      2.09001     -2.61355 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.57695      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.27351      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00340     -0.01786      0.00000     -0.00000      0.00000     -0.04305      0.00000      0.00000      0.00000     -0.27175      0.00000     -0.00000      0.00000     -0.45522     -0.00000      0.00000     -0.78848      0.00000     -1.76106     -0.00000      0.00000      0.00000      0.36763     -0.00000     -0.00000      0.63676     -0.00000      2.09001     -2.61355 \n   </alphavectors>\n   <betavectors>\n     1.00044     -0.00392      0.00000     -0.00000      0.00000     -0.00180      0.00000      0.00000     -0.00000     -0.01430     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.03836     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.25817     -0.39318 \n     0.00476      0.99144     -0.00000      0.00000      0.00000     -0.02760      0.00000      0.00000     -0.00000     -0.11770     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.28051     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      2.12662     -2.74107 \n     0.00176      0.01724     -0.00000      0.00000     -0.00000      0.56186     -0.00000     -0.00000      0.00000     -0.37453     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.04735     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      3.64068     -2.61970 \n    -0.01137      0.06992     -0.00000      0.00000     -0.00000      0.57380     -0.00000     -0.00000     -0.00000     -1.02434     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.80937     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -3.57284      9.29267 \n    -0.00458      0.02290     -0.00000      0.00000      0.00000      0.09037     -0.00000     -0.00000      0.00000      2.46077      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      4.47611      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -3.32017      3.32479 \n    -0.00000     -0.00000      0.00000      1.00211     -0.00000     -0.00000     -0.00187      0.00000      0.00000     -0.00000     -0.00537      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.23394     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      1.00211      0.00000     -0.00000     -0.00000     -0.00187     -0.00000     -0.00000     -0.00000     -0.00537      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.23394     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00211      0.00000     -0.00000     -0.00000      0.00000     -0.00187      0.00000      0.00000      0.00000     -0.00537     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.23394      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.01308      0.00000      0.00000      0.47068      0.00000      0.00000      0.00000     -0.22369      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.24652     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.01308      0.00000     -0.00000     -0.00000      0.47068      0.00000      0.00000      0.00000     -0.22369      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.24652      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.01308      0.00000      0.00000      0.00000     -0.00000      0.47068      0.00000      0.00000      0.00000     -0.22369     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.24652     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00981      0.00000      0.00000      0.58431     -0.00000      0.00000      0.00000     -0.44565     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.45618      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00981     -0.00000      0.00000      0.00000      0.58431      0.00000      0.00000      0.00000     -0.44565     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.45618      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00981      0.00000      0.00000      0.00000     -0.00000      0.58431      0.00000      0.00000      0.00000     -0.44565      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.45618     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00291      0.00000      0.00000      0.10501     -0.00000     -0.00000     -0.00000      1.14659      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.57549     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00291      0.00000     -0.00000     -0.00000      0.10501      0.00000      0.00000      0.00000      1.14659      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.57549     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00291      0.00000     -0.00000      0.00000     -0.00000      0.10501     -0.00000     -0.00000     -0.00000      1.14659     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.57549      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00339     -0.03351      0.00000     -0.00000      0.00000     -0.03137      0.00000      0.00000     -0.00000      0.00452      0.00000      0.00000      0.00000      0.10766     -0.00000      0.00000      0.00000     -0.06216     -0.10266      0.00000      0.00000     -0.00000      1.00775     -0.00000      0.00000     -0.00000     -0.58183     -0.13604     -2.54126 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.21533      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      2.01550      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.21533     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      2.01550     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00339     -0.03351      0.00000     -0.00000     -0.00000     -0.03137      0.00000      0.00000     -0.00000      0.00452      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.12432     -0.10266     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.16365     -0.13604     -2.54126 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.21533     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.01550      0.00000     -0.00000      0.00000     -0.00000 \n     0.00339     -0.03351      0.00000     -0.00000      0.00000     -0.03137      0.00000      0.00000      0.00000      0.00452      0.00000      0.00000     -0.00000     -0.10766      0.00000     -0.00000     -0.00000     -0.06216     -0.10266      0.00000     -0.00000     -0.00000     -1.00775      0.00000     -0.00000      0.00000     -0.58183     -0.13604     -2.54126 \n     0.00339     -0.01799      0.00000     -0.00000     -0.00000     -0.04570      0.00000      0.00000     -0.00000     -0.34698     -0.00000     -0.00000      0.00000      0.80520     -0.00000      0.00000      0.00000     -0.46488     -1.78140      0.00000      0.00000      0.00000     -0.61547      0.00000     -0.00000     -0.00000      0.35534      2.07847     -2.59998 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.61040     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.23094      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.61040     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.23094      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00339     -0.01799      0.00000     -0.00000     -0.00000     -0.04570      0.00000      0.00000      0.00000     -0.34698     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.92976     -1.78140     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.71068      2.07847     -2.59998 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.61040      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.23094      0.00000     -0.00000      0.00000     -0.00000 \n     0.00339     -0.01799      0.00000     -0.00000     -0.00000     -0.04570      0.00000      0.00000     -0.00000     -0.34698     -0.00000     -0.00000     -0.00000     -0.80520      0.00000     -0.00000     -0.00000     -0.46488     -1.78140      0.00000     -0.00000     -0.00000      0.61547     -0.00000      0.00000      0.00000      0.35534      2.07847     -2.59998 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Si\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.00226      0.00285      0.00138     -0.02821     -0.00792      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00719      0.00000      0.00000      0.00719      0.00000      0.00719      0.00718      0.00000      0.00000      0.00718      0.00000      0.00718 \n     0.00285      1.97989      0.01259      0.09928      0.02833      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06209      0.00000      0.00000     -0.06209      0.00000     -0.06209     -0.02946      0.00000      0.00000     -0.02946      0.00000     -0.02946 \n     0.00138      0.01259      0.60730      0.64878      0.07899      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02637      0.00000      0.00000     -0.02637      0.00000     -0.02637     -0.04443      0.00000      0.00000     -0.04443      0.00000     -0.04443 \n    -0.02821      0.09928      0.64878      0.69828      0.08608      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03127      0.00000      0.00000     -0.03127      0.00000     -0.03127     -0.04889      0.00000      0.00000     -0.04889      0.00000     -0.04889 \n    -0.00792      0.02833      0.07899      0.08608      0.01083      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00442      0.00000      0.00000     -0.00442      0.00000     -0.00442     -0.00623      0.00000      0.00000     -0.00623      0.00000     -0.00623 \n     0.00000      0.00000      0.00000      0.00000      0.00000      2.00837      0.00000      0.00000      0.02494      0.00000      0.00000     -0.01943      0.00000      0.00000      0.00586      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00837      0.00000      0.00000      0.02494      0.00000      0.00000     -0.01943      0.00000      0.00000      0.00586      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00837      0.00000      0.00000      0.02494      0.00000      0.00000     -0.01943      0.00000      0.00000      0.00586      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.02494      0.00000      0.00000      0.18680      0.00000      0.00000      0.19313      0.00000      0.00000      0.02086      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02494      0.00000      0.00000      0.18680      0.00000      0.00000      0.19313      0.00000      0.00000      0.02086      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02494      0.00000      0.00000      0.18680      0.00000      0.00000      0.19313      0.00000      0.00000      0.02087      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.01943      0.00000      0.00000      0.19313      0.00000      0.00000      0.20070      0.00000      0.00000      0.02150      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01943      0.00000      0.00000      0.19313      0.00000      0.00000      0.20070      0.00000      0.00000      0.02150      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01943      0.00000      0.00000      0.19313      0.00000      0.00000      0.20070      0.00000      0.00000      0.02151      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00586      0.00000      0.00000      0.02086      0.00000      0.00000      0.02150      0.00000      0.00000      0.00234      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00586      0.00000      0.00000      0.02086      0.00000      0.00000      0.02150      0.00000      0.00000      0.00234      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00586      0.00000      0.00000      0.02087      0.00000      0.00000      0.02151      0.00000      0.00000      0.00234      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00719     -0.06209     -0.02637     -0.03127     -0.00442      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00319      0.00000      0.00000      0.00319      0.00000      0.00319      0.00287      0.00000      0.00000      0.00287      0.00000      0.00287 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00719     -0.06209     -0.02637     -0.03127     -0.00442      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00319      0.00000      0.00000      0.00319      0.00000      0.00319      0.00287      0.00000      0.00000      0.00287      0.00000      0.00287 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00719     -0.06209     -0.02637     -0.03127     -0.00442      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00319      0.00000      0.00000      0.00319      0.00000      0.00319      0.00287      0.00000      0.00000      0.00287      0.00000      0.00287 \n     0.00718     -0.02946     -0.04443     -0.04889     -0.00623      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00287      0.00000      0.00000      0.00287      0.00000      0.00287      0.00370      0.00000      0.00000      0.00370      0.00000      0.00370 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00718     -0.02946     -0.04443     -0.04889     -0.00623      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00287      0.00000      0.00000      0.00287      0.00000      0.00287      0.00370      0.00000      0.00000      0.00370      0.00000      0.00370 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00718     -0.02946     -0.04443     -0.04889     -0.00623      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00287      0.00000      0.00000      0.00287      0.00000      0.00287      0.00370      0.00000      0.00000      0.00370      0.00000      0.00370 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66667      0.66667      0.66666      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -65.19329     -5.07449     -3.51663     -3.51663     -3.51663     -0.41791     -0.17023     -0.17023     -0.17023     -0.00486      0.03064      0.03064      0.03064      0.08719      0.08719      0.08719      0.08719      0.08719      0.17251      0.33795      0.33795      0.33795      0.46274      0.46274      0.46274      0.46274      0.46274      0.79093      1.97487 \n   </alphaeps>\n   <betaeps>\n   -65.18792     -5.06742     -3.50800     -3.50800     -3.50800     -0.36262     -0.12058     -0.12058     -0.12058      0.00667      0.03968      0.03968      0.03968      0.11898      0.11898      0.11898      0.11898      0.11898      0.19067      0.37196      0.37196      0.37196      0.51157      0.51157      0.51157      0.51157      0.51157      0.82603      2.00521 \n   </betaeps>\n   <alphavectors>\n     1.00056     -0.00358      0.00000      0.00000      0.00000     -0.00105     -0.00000      0.00000     -0.00000     -0.01883     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.05420     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.34275     -0.52203 \n     0.00500      0.99506     -0.00000     -0.00000      0.00000     -0.02310     -0.00000      0.00000     -0.00000     -0.14826     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.37462     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -2.68522     -3.40378 \n     0.00183      0.02301     -0.00000     -0.00000      0.00000      0.55576      0.00000     -0.00000     -0.00000     -0.40077      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.11596      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -4.02721     -2.95124 \n    -0.01276      0.06619     -0.00000     -0.00000     -0.00000      0.57003      0.00000     -0.00000     -0.00000     -0.88205     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.34836     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      4.45058     10.96617 \n    -0.00377      0.01605     -0.00000     -0.00000      0.00000      0.06281      0.00000     -0.00000      0.00000      2.19084      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      3.91135      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.91021      2.94133 \n     0.00000      0.00000      1.00222     -0.00000     -0.00000      0.00000     -0.00149      0.00000      0.00000     -0.00000      0.00000     -0.00991     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.25557      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      1.00222      0.00000     -0.00000     -0.00000     -0.00149      0.00000     -0.00000     -0.00000     -0.00000     -0.00991     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.25557      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      1.00222      0.00000     -0.00000     -0.00000     -0.00149      0.00000     -0.00991     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.25557      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.01372     -0.00000     -0.00000     -0.00000      0.52888      0.00000     -0.00000     -0.00000      0.00000     -0.24329     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.25737      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.01372      0.00000      0.00000     -0.00000      0.52888      0.00000     -0.00000     -0.00000     -0.00000     -0.24329     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.25737      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.01372     -0.00000     -0.00000     -0.00000      0.52888     -0.00000     -0.24329     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.25737     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00978      0.00000     -0.00000     -0.00000      0.54844      0.00000     -0.00000      0.00000      0.00000     -0.42197      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.60006      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00978      0.00000      0.00000     -0.00000      0.54844      0.00000      0.00000     -0.00000     -0.00000     -0.42197      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.60006      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00978     -0.00000      0.00000      0.00000      0.54844     -0.00000     -0.42197     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.60006     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00307     -0.00000      0.00000     -0.00000      0.05896     -0.00000      0.00000     -0.00000     -0.00000      1.17255     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.69277     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00307     -0.00000      0.00000      0.00000      0.05896     -0.00000     -0.00000      0.00000      0.00000      1.17255     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.69277     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00307     -0.00000     -0.00000     -0.00000      0.05897     -0.00000      1.17255      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.69277      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00344     -0.03212      0.00000      0.00000     -0.00000     -0.01594     -0.00000      0.00000     -0.00000      0.00166     -0.00000     -0.00000      0.00000      0.15863      0.00000     -0.00000     -0.00000     -0.09159     -0.08952     -0.00000      0.00000      0.00000      1.02309      0.00000      0.00000     -0.00000     -0.59068      0.17061     -2.71372 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.31727     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.04618      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.31727     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      2.04618      0.00000      0.00000     -0.00000      0.00000 \n     0.00344     -0.03212      0.00000      0.00000     -0.00000     -0.01594     -0.00000      0.00000      0.00000      0.00166      0.00000      0.00000     -0.00000     -0.15863     -0.00000      0.00000      0.00000     -0.09159     -0.08952     -0.00000     -0.00000     -0.00000     -1.02309     -0.00000     -0.00000      0.00000     -0.59068      0.17061     -2.71372 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.31727     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      2.04618      0.00000     -0.00000      0.00000 \n     0.00344     -0.03212      0.00000      0.00000     -0.00000     -0.01594     -0.00000      0.00000      0.00000      0.00166      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.18317     -0.08952      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.18136      0.17061     -2.71372 \n     0.00346     -0.01578      0.00000      0.00000     -0.00000     -0.03828     -0.00000      0.00000     -0.00000     -0.26383      0.00000     -0.00000     -0.00000      0.76887      0.00000     -0.00000     -0.00000     -0.44391     -1.66886     -0.00000      0.00000      0.00000     -0.69333     -0.00000     -0.00000      0.00000      0.40030     -2.14598     -2.84923 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.53774     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.38667     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.53774      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.38667      0.00000      0.00000     -0.00000      0.00000 \n     0.00346     -0.01578      0.00000      0.00000     -0.00000     -0.03828     -0.00000      0.00000      0.00000     -0.26383      0.00000     -0.00000     -0.00000     -0.76887     -0.00000      0.00000      0.00000     -0.44391     -1.66886     -0.00000     -0.00000      0.00000      0.69333      0.00000      0.00000     -0.00000      0.40030     -2.14598     -2.84923 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.53774      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.38667     -0.00000     -0.00000      0.00000 \n     0.00346     -0.01578      0.00000      0.00000     -0.00000     -0.03828     -0.00000      0.00000     -0.00000     -0.26383     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.88782     -1.66886      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.80059     -2.14598     -2.84923 \n   </alphavectors>\n   <betavectors>\n     1.00055     -0.00368     -0.00000     -0.00000     -0.00000     -0.00281     -0.00000      0.00000     -0.00000     -0.01969      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.06179      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.34522     -0.51951 \n     0.00495      0.99403      0.00000      0.00000     -0.00000     -0.03266     -0.00000      0.00000     -0.00000     -0.15328      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.43120      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -2.70163     -3.38403 \n     0.00182      0.02045      0.00000      0.00000     -0.00000      0.54541      0.00000     -0.00000     -0.00000     -0.39231      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.17859      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -4.04492     -2.92688 \n    -0.01266      0.06682      0.00000      0.00000      0.00000      0.60347      0.00000     -0.00000     -0.00000     -0.95162     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.15641      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      4.52691     10.93168 \n    -0.00374      0.01654      0.00000      0.00000      0.00000      0.07956      0.00000     -0.00000      0.00000      2.41423     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      3.83473     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.86443      2.91174 \n    -0.00000     -0.00000      1.00196      0.00000     -0.00000      0.00000     -0.00481      0.00000      0.00000     -0.00000      0.00000     -0.00161     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.25673      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      1.00196     -0.00000     -0.00000     -0.00000     -0.00481      0.00000      0.00000      0.00000      0.00000     -0.00161     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.25673     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      1.00196     -0.00000     -0.00000     -0.00000     -0.00481      0.00000     -0.00161     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.25673     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.01169      0.00000     -0.00000     -0.00000      0.49236      0.00000     -0.00000     -0.00000      0.00000     -0.23499     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.27370     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.01169      0.00000      0.00000      0.00000      0.49236     -0.00000      0.00000      0.00000      0.00000     -0.23499     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.27370     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.01169     -0.00000     -0.00000     -0.00000      0.49236     -0.00000     -0.23499     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.27370     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00907     -0.00000     -0.00000     -0.00000      0.54314      0.00000     -0.00000     -0.00000      0.00000     -0.51150      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.57557     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00907      0.00000      0.00000      0.00000      0.54314     -0.00000     -0.00000      0.00000      0.00000     -0.51150      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.57557     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00907     -0.00000      0.00000      0.00000      0.54314     -0.00000     -0.51150     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.57557     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00284      0.00000      0.00000     -0.00000      0.12674     -0.00000      0.00000      0.00000     -0.00000      1.18891     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.65477     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00284      0.00000      0.00000      0.00000      0.12674      0.00000      0.00000     -0.00000     -0.00000      1.18891     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.65477      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00284     -0.00000     -0.00000     -0.00000      0.12674     -0.00000      1.18891      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.65477     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00341     -0.03169     -0.00000     -0.00000      0.00000     -0.02959     -0.00000      0.00000      0.00000      0.00100     -0.00000     -0.00000     -0.00000      0.11203      0.00000      0.00000      0.00000     -0.06468     -0.09663     -0.00000     -0.00000     -0.00000      1.02923     -0.00000      0.00000      0.00000     -0.59423      0.15398     -2.71436 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.22407      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.05847      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.22407      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.05847      0.00000     -0.00000      0.00000     -0.00000 \n     0.00341     -0.03169     -0.00000     -0.00000      0.00000     -0.02959     -0.00000      0.00000      0.00000      0.00100      0.00000     -0.00000     -0.00000     -0.11203     -0.00000     -0.00000     -0.00000     -0.06468     -0.09663     -0.00000      0.00000      0.00000     -1.02923      0.00000      0.00000      0.00000     -0.59423      0.15398     -2.71436 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.22407      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      2.05847     -0.00000      0.00000     -0.00000 \n     0.00341     -0.03169     -0.00000     -0.00000      0.00000     -0.02959     -0.00000      0.00000     -0.00000      0.00100      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.12937     -0.09663      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.18846      0.15398     -2.71436 \n     0.00344     -0.01612     -0.00000     -0.00000     -0.00000     -0.04120     -0.00000      0.00000     -0.00000     -0.35333     -0.00000      0.00000     -0.00000      0.79955      0.00000      0.00000      0.00000     -0.46162     -1.70281     -0.00000     -0.00000     -0.00000     -0.65772      0.00000      0.00000      0.00000      0.37974     -2.13331     -2.82886 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.59909      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.31545     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.59909     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.31545     -0.00000      0.00000      0.00000     -0.00000 \n     0.00344     -0.01612     -0.00000     -0.00000     -0.00000     -0.04120     -0.00000      0.00000     -0.00000     -0.35333     -0.00000      0.00000     -0.00000     -0.79955     -0.00000     -0.00000     -0.00000     -0.46162     -1.70281     -0.00000      0.00000      0.00000      0.65772     -0.00000      0.00000      0.00000      0.37974     -2.13331     -2.82886 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.59909     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.31545      0.00000     -0.00000      0.00000 \n     0.00344     -0.01612     -0.00000     -0.00000     -0.00000     -0.04120     -0.00000      0.00000     -0.00000     -0.35333      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.92324     -1.70281      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.75947     -2.13331     -2.82886 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"P\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.00221      0.00304      0.00012     -0.02679     -0.00567      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00671      0.00000      0.00000      0.00671      0.00000      0.00671      0.00621      0.00000      0.00000      0.00621      0.00000      0.00621 \n     0.00304      1.99988      0.02523      0.08343      0.01859      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05828      0.00000      0.00000     -0.05828      0.00000     -0.05828     -0.02415      0.00000      0.00000     -0.02415      0.00000     -0.02415 \n     0.00012      0.02523      0.59643      0.65606      0.06518      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02364      0.00000      0.00000     -0.02364      0.00000     -0.02364     -0.03740      0.00000      0.00000     -0.03740      0.00000     -0.03740 \n    -0.02679      0.08343      0.65606      0.72545      0.07287      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02819      0.00000      0.00000     -0.02819      0.00000     -0.02819     -0.04195      0.00000      0.00000     -0.04195      0.00000     -0.04195 \n    -0.00567      0.01859      0.06518      0.07287      0.00749      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00323      0.00000      0.00000     -0.00323      0.00000     -0.00323     -0.00432      0.00000      0.00000     -0.00432      0.00000     -0.00432 \n     0.00000      0.00000      0.00000      0.00000      0.00000      2.00791      0.00000      0.00000      0.02302      0.00000      0.00000     -0.01796      0.00000      0.00000      0.00503      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00791      0.00000      0.00000      0.02302      0.00000      0.00000     -0.01796      0.00000      0.00000      0.00503      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00791      0.00000      0.00000      0.02302      0.00000      0.00000     -0.01796      0.00000      0.00000      0.00503      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.02302      0.00000      0.00000      0.30693      0.00000      0.00000      0.28907      0.00000      0.00000      0.03214      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02302      0.00000      0.00000      0.30693      0.00000      0.00000      0.28907      0.00000      0.00000      0.03214      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02302      0.00000      0.00000      0.30693      0.00000      0.00000      0.28907      0.00000      0.00000      0.03214      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.01796      0.00000      0.00000      0.28907      0.00000      0.00000      0.27304      0.00000      0.00000      0.03022      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01796      0.00000      0.00000      0.28907      0.00000      0.00000      0.27304      0.00000      0.00000      0.03022      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01796      0.00000      0.00000      0.28907      0.00000      0.00000      0.27304      0.00000      0.00000      0.03022      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00503      0.00000      0.00000      0.03214      0.00000      0.00000      0.03022      0.00000      0.00000      0.00337      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00503      0.00000      0.00000      0.03214      0.00000      0.00000      0.03022      0.00000      0.00000      0.00337      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00503      0.00000      0.00000      0.03214      0.00000      0.00000      0.03022      0.00000      0.00000      0.00337      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00671     -0.05828     -0.02364     -0.02819     -0.00323      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00274      0.00000      0.00000      0.00274      0.00000      0.00274      0.00218      0.00000      0.00000      0.00218      0.00000      0.00218 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00671     -0.05828     -0.02364     -0.02819     -0.00323      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00274      0.00000      0.00000      0.00274      0.00000      0.00274      0.00218      0.00000      0.00000      0.00218      0.00000      0.00218 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00671     -0.05828     -0.02364     -0.02819     -0.00323      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00274      0.00000      0.00000      0.00274      0.00000      0.00274      0.00218      0.00000      0.00000      0.00218      0.00000      0.00218 \n     0.00621     -0.02415     -0.03740     -0.04195     -0.00432      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00218      0.00000      0.00000      0.00218      0.00000      0.00218      0.00262      0.00000      0.00000      0.00262      0.00000      0.00262 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00621     -0.02415     -0.03740     -0.04195     -0.00432      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00218      0.00000      0.00000      0.00218      0.00000      0.00218      0.00262      0.00000      0.00000      0.00262      0.00000      0.00262 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00621     -0.02415     -0.03740     -0.04195     -0.00432      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00218      0.00000      0.00000      0.00218      0.00000      0.00218      0.00262      0.00000      0.00000      0.00262      0.00000      0.00262 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -76.06636     -6.32658     -4.57682     -4.57682     -4.57682     -0.54160     -0.23135     -0.23135     -0.23135      0.00007      0.04481      0.04481      0.04481      0.12426      0.12426      0.12426      0.12426      0.12426      0.24019      0.45972      0.45972      0.45972      0.61280      0.61280      0.61280      0.61280      0.61280      1.08020      2.66736 \n   </alphaeps>\n   <betaeps>\n   -76.05519     -6.31253     -4.55978     -4.55978     -4.55978     -0.45126     -0.15084     -0.15084     -0.15084      0.01671      0.05931      0.05931      0.05931      0.17529      0.17529      0.17529      0.17529      0.17529      0.26929      0.51373      0.51373      0.51373      0.69111      0.69111      0.69111      0.69111      0.69111      1.13649      2.71805 \n   </betaeps>\n   <alphavectors>\n     1.00055     -0.00290      0.00000     -0.00000      0.00000     -0.00063     -0.00000     -0.00000     -0.00000     -0.02212      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.06919      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.41555     -0.57560 \n     0.00448      1.00048     -0.00000      0.00000     -0.00000     -0.01900     -0.00000      0.00000     -0.00000     -0.16674      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.45748      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -3.11030     -3.50172 \n     0.00118      0.02865     -0.00000      0.00000     -0.00000      0.55396      0.00000      0.00000      0.00000     -0.39645      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.17154      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -4.23388     -2.66390 \n    -0.01212      0.05689     -0.00000      0.00000     -0.00000      0.57813      0.00000      0.00000      0.00000     -0.74725      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.18271      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      5.27636     11.42550 \n    -0.00269      0.01062     -0.00000      0.00000     -0.00000      0.04970      0.00000      0.00000      0.00000      2.03762     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.27895     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.40430      2.31140 \n    -0.00000      0.00000     -0.00000      0.00000      1.00215     -0.00000     -0.00262     -0.00000     -0.00000     -0.00000      0.00000     -0.00901      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.26771      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      1.00215     -0.00000      0.00000     -0.00000     -0.00000     -0.00262     -0.00000     -0.00000     -0.00901      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.26771      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      1.00215     -0.00000      0.00000      0.00000      0.00000     -0.00262      0.00000     -0.00000     -0.00000     -0.00901      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.26771      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.01357     -0.00000      0.55374     -0.00000     -0.00000     -0.00000      0.00000     -0.24234      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.26229      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.01357     -0.00000      0.00000     -0.00000     -0.00000      0.55374     -0.00000     -0.00000     -0.24234      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.26229      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.01357      0.00000     -0.00000     -0.00000     -0.00000      0.55374      0.00000     -0.00000     -0.00000     -0.24234      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.26229     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00876      0.00000      0.52240      0.00000      0.00000      0.00000     -0.00000     -0.41920     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.64011     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00876      0.00000     -0.00000     -0.00000     -0.00000      0.52240      0.00000     -0.00000     -0.41920     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.64011     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00876      0.00000     -0.00000     -0.00000     -0.00000      0.52240     -0.00000      0.00000      0.00000     -0.41920      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.64011     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00274     -0.00000      0.05793     -0.00000     -0.00000      0.00000     -0.00000      1.17747      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.70970      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00274     -0.00000      0.00000      0.00000      0.00000      0.05793      0.00000      0.00000      1.17747      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.70970      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00274      0.00000     -0.00000     -0.00000     -0.00000      0.05793      0.00000     -0.00000     -0.00000      1.17747      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.70970      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00324     -0.03007      0.00000     -0.00000      0.00000     -0.01255     -0.00000     -0.00000     -0.00000     -0.00268      0.00000      0.00000      0.00000      0.17180     -0.11516      0.00000     -0.00000      0.00000     -0.09063      0.00000     -0.00000     -0.00000     -0.00000      0.97855     -0.00000     -0.66575      0.00000      0.11153     -2.79813 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.35823      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      2.04996     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.35823     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.04996      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00324     -0.03007      0.00000     -0.00000      0.00000     -0.01255     -0.00000     -0.00000     -0.00000     -0.00268      0.00000      0.00000      0.00000      0.01383      0.20636      0.00000     -0.00000      0.00000     -0.09063      0.00000     -0.00000     -0.00000     -0.00000     -1.06583      0.00000     -0.51457     -0.00000      0.11153     -2.79813 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.35823     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.04996     -0.00000      0.00000     -0.00000      0.00000 \n     0.00324     -0.03007      0.00000     -0.00000      0.00000     -0.01255     -0.00000     -0.00000     -0.00000     -0.00268      0.00000      0.00000      0.00000     -0.18563     -0.09121      0.00000     -0.00000      0.00000     -0.09063      0.00000     -0.00000     -0.00000     -0.00000      0.08728     -0.00000      1.18032     -0.00000      0.11153     -2.79813 \n     0.00302     -0.01273      0.00000     -0.00000      0.00000     -0.03278     -0.00000     -0.00000     -0.00000     -0.24683      0.00000      0.00000      0.00000      0.72302     -0.48464     -0.00000     -0.00000     -0.00000     -1.56878      0.00000     -0.00000     -0.00000     -0.00000     -0.68475      0.00000      0.46586     -0.00000     -2.12687     -2.74783 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.50762     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.43448      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.50762      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.43448     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00302     -0.01273      0.00000     -0.00000      0.00000     -0.03278     -0.00000     -0.00000     -0.00000     -0.24683      0.00000      0.00000      0.00000      0.05820      0.86848     -0.00000     -0.00000     -0.00000     -1.56878      0.00000     -0.00000     -0.00000     -0.00000      0.74583     -0.00000      0.36008      0.00000     -2.12687     -2.74783 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.50762      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.43448      0.00000      0.00000      0.00000     -0.00000 \n     0.00302     -0.01273      0.00000     -0.00000      0.00000     -0.03278     -0.00000     -0.00000     -0.00000     -0.24683      0.00000      0.00000      0.00000     -0.78122     -0.38384     -0.00000     -0.00000     -0.00000     -1.56878      0.00000     -0.00000     -0.00000     -0.00000     -0.06108      0.00000     -0.82594      0.00000     -2.12687     -2.74783 \n   </alphavectors>\n   <betavectors>\n     1.00054     -0.00307     -0.00000     -0.00000      0.00000     -0.00323     -0.00000      0.00000     -0.00000     -0.02361     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.07998      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.41890     -0.57170 \n     0.00440      0.99872      0.00000      0.00000     -0.00000     -0.03276     -0.00000      0.00000      0.00000     -0.17542     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.53449      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -3.13075     -3.47245 \n     0.00118      0.02470      0.00000      0.00000     -0.00000      0.53677      0.00000     -0.00000      0.00000     -0.39183      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.25058      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -4.25381     -2.62991 \n    -0.01195      0.05799      0.00000      0.00000     -0.00000      0.61994      0.00000     -0.00000      0.00000     -0.79525      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.41811     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      5.36495     11.37249 \n    -0.00266      0.01121      0.00000      0.00000     -0.00000      0.06907      0.00000     -0.00000      0.00000      2.24604     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      3.19492     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.35897      2.28198 \n     0.00000     -0.00000      1.00180      0.00000     -0.00000      0.00000      0.00000     -0.00716      0.00000     -0.00000      0.00000      0.00136     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.26907     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      1.00180      0.00000      0.00000      0.00000     -0.00000     -0.00716      0.00000      0.00136      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.26907      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      1.00180      0.00000     -0.00716      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00136     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.26907     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.01085     -0.00000      0.00000      0.00000      0.00000      0.50604      0.00000     -0.00000      0.00000     -0.23584     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.28339     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.01085      0.00000      0.00000      0.00000     -0.00000      0.50604      0.00000     -0.23584      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.28339      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.01085     -0.00000      0.50604      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.23584      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.28339      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00780     -0.00000      0.00000      0.00000      0.00000      0.51900     -0.00000      0.00000     -0.00000     -0.52646      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.60999     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00780     -0.00000      0.00000      0.00000     -0.00000      0.51900     -0.00000     -0.52646     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.60999      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00780     -0.00000      0.51900     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.52646      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.60999      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00243      0.00000     -0.00000      0.00000      0.00000      0.14094      0.00000     -0.00000      0.00000      1.19642     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.66498      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00243      0.00000     -0.00000     -0.00000      0.00000      0.14094      0.00000      1.19642      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.66498      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00243     -0.00000      0.14094     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.19642      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.66498     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00319     -0.02942     -0.00000     -0.00000      0.00000     -0.02814     -0.00000      0.00000     -0.00000     -0.00357     -0.00000     -0.00000     -0.00000      0.13671     -0.01563      0.00000     -0.00000      0.00000     -0.09927      0.00000     -0.00000      0.00000     -0.08424      0.00000     -0.00000      1.19060      0.00000      0.08928     -2.79853 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.23833     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.06733     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.23833      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      2.06733     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00319     -0.02942     -0.00000     -0.00000      0.00000     -0.02814     -0.00000      0.00000     -0.00000     -0.00357     -0.00000     -0.00000     -0.00000     -0.08189     -0.11058      0.00000     -0.00000      0.00000     -0.09927      0.00000     -0.00000      0.00000      1.07321     -0.00000      0.00000     -0.52235     -0.00000      0.08928     -2.79853 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.23833     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      2.06733     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00319     -0.02942     -0.00000     -0.00000      0.00000     -0.02814     -0.00000      0.00000     -0.00000     -0.00357     -0.00000     -0.00000     -0.00000     -0.05482      0.12621      0.00000     -0.00000      0.00000     -0.09927      0.00000     -0.00000      0.00000     -0.98897      0.00000     -0.00000     -0.66825     -0.00000      0.08928     -2.79853 \n     0.00298     -0.01321     -0.00000     -0.00000      0.00000     -0.03458     -0.00000      0.00000     -0.00000     -0.33992     -0.00000     -0.00000     -0.00000      0.91121     -0.10416      0.00000      0.00000      0.00000     -1.61059      0.00000     -0.00000      0.00000      0.05478     -0.00000      0.00000     -0.77420     -0.00000     -2.11413     -2.72340 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.58855      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.34431      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.58855     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.34431      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00298     -0.01321     -0.00000     -0.00000      0.00000     -0.03458     -0.00000      0.00000     -0.00000     -0.33992     -0.00000     -0.00000     -0.00000     -0.54581     -0.73706      0.00000      0.00000      0.00000     -1.61059      0.00000     -0.00000      0.00000     -0.69787      0.00000     -0.00000      0.33966      0.00000     -2.11413     -2.72340 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.58855      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.34431      0.00000      0.00000      0.00000     -0.00000 \n     0.00298     -0.01321     -0.00000     -0.00000      0.00000     -0.03458     -0.00000      0.00000     -0.00000     -0.33992     -0.00000     -0.00000     -0.00000     -0.36540      0.84121      0.00000      0.00000      0.00000     -1.61059      0.00000     -0.00000      0.00000      0.64309     -0.00000      0.00000      0.43454      0.00000     -2.11413     -2.72340 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"S\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.00247      0.00352     -0.00022     -0.02889     -0.00429      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00658      0.00000      0.00000      0.00658      0.00000      0.00658      0.00616      0.00000      0.00000      0.00616      0.00000      0.00616 \n     0.00352      2.00465      0.02313      0.07821      0.01265      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05613      0.00000      0.00000     -0.05613      0.00000     -0.05613     -0.02254      0.00000      0.00000     -0.02254      0.00000     -0.02254 \n    -0.00022      0.02313      0.58624      0.66327      0.05186      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01998      0.00000      0.00000     -0.01998      0.00000     -0.01998     -0.03397      0.00000      0.00000     -0.03397      0.00000     -0.03397 \n    -0.02889      0.07821      0.66327      0.75292      0.05921      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02430      0.00000      0.00000     -0.02430      0.00000     -0.02430     -0.03909      0.00000      0.00000     -0.03909      0.00000     -0.03909 \n    -0.00429      0.01265      0.05186      0.05921      0.00471      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00212      0.00000      0.00000     -0.00212      0.00000     -0.00212     -0.00314      0.00000      0.00000     -0.00314      0.00000     -0.00314 \n     0.00000      0.00000      0.00000      0.00000      0.00000      2.00593      0.00000      0.00000      0.02079      0.00000      0.00000     -0.01314      0.00000      0.00000      0.00361      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00593      0.00000      0.00000      0.02079      0.00000      0.00000     -0.01314      0.00000      0.00000      0.00361      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00593      0.00000      0.00000      0.02079      0.00000      0.00000     -0.01314      0.00000      0.00000      0.00361      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.02079      0.00000      0.00000      0.46542      0.00000      0.00000      0.38764      0.00000      0.00000      0.04150      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02079      0.00000      0.00000      0.46543      0.00000      0.00000      0.38765      0.00000      0.00000      0.04151      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02079      0.00000      0.00000      0.46542      0.00000      0.00000      0.38764      0.00000      0.00000      0.04150      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.01314      0.00000      0.00000      0.38764      0.00000      0.00000      0.32360      0.00000      0.00000      0.03486      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01314      0.00000      0.00000      0.38765      0.00000      0.00000      0.32360      0.00000      0.00000      0.03486      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01314      0.00000      0.00000      0.38764      0.00000      0.00000      0.32360      0.00000      0.00000      0.03486      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00361      0.00000      0.00000      0.04150      0.00000      0.00000      0.03486      0.00000      0.00000      0.00408      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00361      0.00000      0.00000      0.04151      0.00000      0.00000      0.03486      0.00000      0.00000      0.00408      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00361      0.00000      0.00000      0.04150      0.00000      0.00000      0.03486      0.00000      0.00000      0.00408      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00658     -0.05613     -0.01998     -0.02430     -0.00212      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00227      0.00000      0.00000      0.00227      0.00000      0.00227      0.00177      0.00000      0.00000      0.00177      0.00000      0.00177 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00658     -0.05613     -0.01998     -0.02430     -0.00212      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00227      0.00000      0.00000      0.00227      0.00000      0.00227      0.00177      0.00000      0.00000      0.00177      0.00000      0.00177 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00658     -0.05613     -0.01998     -0.02430     -0.00212      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00227      0.00000      0.00000      0.00227      0.00000      0.00227      0.00177      0.00000      0.00000      0.00177      0.00000      0.00177 \n     0.00616     -0.02254     -0.03397     -0.03909     -0.00314      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00177      0.00000      0.00000      0.00177      0.00000      0.00177      0.00221      0.00000      0.00000      0.00221      0.00000      0.00221 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00616     -0.02254     -0.03397     -0.03909     -0.00314      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00177      0.00000      0.00000      0.00177      0.00000      0.00177      0.00221      0.00000      0.00000      0.00221      0.00000      0.00221 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00616     -0.02254     -0.03397     -0.03909     -0.00314      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00177      0.00000      0.00000      0.00177      0.00000      0.00177      0.00221      0.00000      0.00000      0.00221      0.00000      0.00221 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33335      0.33332      0.33332      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -87.80483     -7.70778     -5.76178     -5.76178     -5.76178     -0.65768     -0.28442     -0.28442     -0.28442      0.00783      0.05325      0.05325      0.05325      0.18162      0.18162      0.18162      0.18162      0.18162      0.33113      0.53793      0.53793      0.53793      0.80222      0.80222      0.80222      0.80222      0.80222      1.46148      3.58258 \n   </alphaeps>\n   <betaeps>\n   -87.79491     -7.69585     -5.74735     -5.74735     -5.74735     -0.59456     -0.22823     -0.22823     -0.22823      0.01860      0.06142      0.06142      0.06142      0.21763      0.21763      0.21763      0.21763      0.21763      0.35144      0.57339      0.57339      0.57339      0.85540      0.85541      0.85541      0.85541      0.85541      1.50082      3.61798 \n   </betaeps>\n   <alphavectors>\n     1.00061     -0.00276     -0.00000     -0.00000      0.00000     -0.00163      0.00000     -0.00000     -0.00000     -0.02504      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.09074      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.48686     -0.69865 \n     0.00454      1.00137     -0.00000      0.00000     -0.00000     -0.02399      0.00000     -0.00000     -0.00000     -0.18185      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.58274      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -3.52154     -4.09921 \n     0.00130      0.02825     -0.00000      0.00000     -0.00000      0.54691     -0.00000      0.00000     -0.00000     -0.39420      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.26835      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -4.50804     -3.04299 \n    -0.01283      0.05616      0.00000      0.00000     -0.00000      0.59875     -0.00000      0.00000      0.00000     -0.64019     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.75125     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      6.07682     13.07776 \n    -0.00201      0.00755     -0.00000      0.00000     -0.00000      0.04277     -0.00000      0.00000      0.00000      1.92342     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.71795     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.94455      1.90026 \n    -0.00000     -0.00000     -0.00000      1.00157      0.00000      0.00000     -0.00000     -0.00111      0.00000     -0.00000      0.00000     -0.00901     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.23932      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      1.00157      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00111      0.00000     -0.00901     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.23932     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      1.00157     -0.00000     -0.00111      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00901     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.23932     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.01188     -0.00000     -0.00000      0.00000      0.59771      0.00000     -0.00000      0.00000     -0.23729     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.20761      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.01188      0.00000      0.00000      0.00000      0.00000      0.00000      0.59771     -0.00000     -0.23729     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.20761     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.01188      0.00000      0.59771      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.23729     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.20761      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00622     -0.00000     -0.00000      0.00000      0.49034     -0.00000     -0.00000      0.00000     -0.37523      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.60744     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00622     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.49034     -0.00000     -0.37523     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.60744      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00622      0.00000      0.49034      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.37523      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.60744      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00197     -0.00000     -0.00000      0.00000      0.04387      0.00000      0.00000     -0.00000      1.16255     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.69723      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00197      0.00000      0.00000      0.00000      0.00000      0.00000      0.04387     -0.00000      1.16255      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.69723     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00197      0.00000      0.04387     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.16255     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.69723     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00318     -0.02877      0.00000     -0.00000      0.00000     -0.01324      0.00000     -0.00000     -0.00000     -0.00367      0.00000      0.00000      0.00000     -0.10617     -0.00000      0.00000      0.18389      0.00000     -0.08782      0.00000     -0.00000      0.00000      1.04569      0.00000     -0.00000      0.00000     -0.60373      0.12578     -2.95165 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.36779     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.09137      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.36779     -0.00000      0.00000      0.00000     -0.00000     -0.00000      2.09137     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00318     -0.02877      0.00000     -0.00000      0.00000     -0.01324      0.00000     -0.00000     -0.00000     -0.00367     -0.00000      0.00000      0.00000      0.21234      0.00000     -0.00000     -0.00000     -0.00000     -0.08782     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.20746      0.12578     -2.95165 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.36779      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.09137      0.00000      0.00000     -0.00000      0.00000 \n     0.00318     -0.02877      0.00000     -0.00000      0.00000     -0.01324      0.00000     -0.00000      0.00000     -0.00367     -0.00000      0.00000      0.00000     -0.10617     -0.00000      0.00000     -0.18389      0.00000     -0.08782      0.00000     -0.00000      0.00000     -1.04569     -0.00000      0.00000     -0.00000     -0.60373      0.12578     -2.95165 \n     0.00298     -0.01199     -0.00000     -0.00000      0.00000     -0.03068      0.00000     -0.00000      0.00000     -0.23939      0.00000      0.00000      0.00000     -0.43102     -0.00000      0.00000      0.74655      0.00000     -1.50950     -0.00000     -0.00000      0.00000     -0.75494     -0.00000      0.00000     -0.00000      0.43587     -2.15899     -2.98239 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.49310      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.50989     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.49310      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.50989      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00298     -0.01199     -0.00000     -0.00000      0.00000     -0.03068      0.00000     -0.00000     -0.00000     -0.23939      0.00000      0.00000      0.00000      0.86204      0.00000     -0.00000     -0.00000     -0.00000     -1.50950      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.87173     -2.15899     -2.98239 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.49310     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.50989     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00298     -0.01199     -0.00000     -0.00000      0.00000     -0.03068      0.00000     -0.00000     -0.00000     -0.23939     -0.00000      0.00000      0.00000     -0.43102     -0.00000      0.00000     -0.74655      0.00000     -1.50950     -0.00000     -0.00000      0.00000      0.75494      0.00000     -0.00000      0.00000      0.43587     -2.15899     -2.98239 \n   </alphavectors>\n   <betavectors>\n     1.00061     -0.00289     -0.00000      0.00000     -0.00000     -0.00333      0.00000     -0.00000      0.00000     -0.02626     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.09743      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.48909     -0.69615 \n     0.00448      1.00010     -0.00000     -0.00000      0.00000     -0.03307      0.00000     -0.00000      0.00000     -0.18906     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.62901      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -3.53459     -4.08102 \n     0.00130      0.02562     -0.00000     -0.00000      0.00000      0.53448      0.00000      0.00000     -0.00000     -0.39515      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.31367      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -4.52028     -3.02253 \n    -0.01268      0.05704      0.00000     -0.00000      0.00000      0.62264     -0.00000      0.00000     -0.00000     -0.64916      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.88224     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      6.12726     13.04444 \n    -0.00199      0.00787     -0.00000     -0.00000      0.00000      0.05249     -0.00000      0.00000     -0.00000      2.01195      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      2.67620     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.92494      1.88752 \n     0.00000      0.00000     -0.00000      1.00139      0.00000      0.00000     -0.00000     -0.00417      0.00000     -0.00000     -0.00000     -0.00376     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.24016     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      1.00139      0.00000      0.00000     -0.00000     -0.00417      0.00000     -0.00000      0.00000     -0.00376      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.24016      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      1.00139     -0.00000      0.00000     -0.00000     -0.00417      0.00000      0.00000     -0.00000     -0.00376     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.24016      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.01033      0.00000     -0.00000      0.00000      0.56900      0.00000     -0.00000     -0.00000     -0.23313     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.22222      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.01033      0.00000      0.00000     -0.00000      0.56900     -0.00000      0.00000      0.00000     -0.23313      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.22222      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.01033      0.00000     -0.00000      0.00000      0.56900     -0.00000      0.00000     -0.00000     -0.23313     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.22222     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00566      0.00000     -0.00000      0.00000      0.49928      0.00000      0.00000     -0.00000     -0.43179      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.59040     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00566     -0.00000     -0.00000     -0.00000      0.49928     -0.00000      0.00000      0.00000     -0.43179      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.59040     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00566      0.00000     -0.00000      0.00000      0.49928     -0.00000      0.00000     -0.00000     -0.43179      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.59040      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00179     -0.00000     -0.00000      0.00000      0.08036     -0.00000     -0.00000      0.00000      1.17568     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.67150      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00179      0.00000      0.00000     -0.00000      0.08036     -0.00000      0.00000      0.00000      1.17568     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.67150      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00179      0.00000     -0.00000      0.00000      0.08036      0.00000     -0.00000      0.00000      1.17568     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.67150     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00314     -0.02836      0.00000      0.00000     -0.00000     -0.02097     -0.00000     -0.00000      0.00000     -0.00433      0.00000     -0.00000      0.00000     -0.08608      0.00000      0.00000      0.14910     -0.00000     -0.09182     -0.00000      0.00000      0.00000     -0.60692      0.00000     -0.00000      1.05121      0.00000      0.11269     -2.95202 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.29820      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      2.10243      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.29819     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      2.10243     -0.00000     -0.00000 \n     0.00314     -0.02836     -0.00000      0.00000     -0.00000     -0.02097      0.00000     -0.00000      0.00000     -0.00433     -0.00000     -0.00000      0.00000      0.17216     -0.00000     -0.00000     -0.00000     -0.00000     -0.09182      0.00000      0.00000     -0.00000      1.21384     -0.00000     -0.00000     -0.00000     -0.00000      0.11269     -2.95202 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.29820      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      2.10243      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00314     -0.02836      0.00000      0.00000     -0.00000     -0.02097     -0.00000     -0.00000      0.00000     -0.00433      0.00000     -0.00000      0.00000     -0.08608      0.00000      0.00000     -0.14910      0.00000     -0.09182     -0.00000     -0.00000     -0.00000     -0.60692     -0.00000      0.00000     -1.05121     -0.00000      0.11269     -2.95202 \n     0.00295     -0.01232      0.00000      0.00000     -0.00000     -0.03095     -0.00000     -0.00000      0.00000     -0.28431      0.00000     -0.00000      0.00000     -0.44524      0.00000      0.00000      0.77119     -0.00000     -1.53369      0.00000      0.00000      0.00000      0.42133      0.00000     -0.00000     -0.72976     -0.00000     -2.15457     -2.96927 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.54238     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.45952     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.54238     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.45952     -0.00000     -0.00000 \n     0.00295     -0.01232      0.00000      0.00000     -0.00000     -0.03095      0.00000     -0.00000      0.00000     -0.28431      0.00000     -0.00000      0.00000      0.89049     -0.00000     -0.00000     -0.00000      0.00000     -1.53369     -0.00000      0.00000     -0.00000     -0.84265      0.00000      0.00000      0.00000      0.00000     -2.15457     -2.96927 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.54238     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.45952      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00295     -0.01232      0.00000      0.00000     -0.00000     -0.03095     -0.00000     -0.00000      0.00000     -0.28431     -0.00000     -0.00000      0.00000     -0.44524      0.00000      0.00000     -0.77119      0.00000     -1.53369     -0.00000     -0.00000     -0.00000      0.42133     -0.00000      0.00000      0.72976      0.00000     -2.15457     -2.96927 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cl\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.00263      0.00403     -0.00080     -0.03002     -0.00344      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00634      0.00000      0.00000      0.00634      0.00000      0.00634      0.00613      0.00000      0.00000      0.00613      0.00000      0.00613 \n     0.00403      2.01276      0.02320      0.06873      0.00896      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05380      0.00000      0.00000     -0.05380      0.00000     -0.05380     -0.02099      0.00000      0.00000     -0.02099      0.00000     -0.02099 \n    -0.00080      0.02320      0.57725      0.66907      0.04575      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01811      0.00000      0.00000     -0.01811      0.00000     -0.01811     -0.03206      0.00000      0.00000     -0.03206      0.00000     -0.03206 \n    -0.03002      0.06873      0.66907      0.77693      0.05327      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02221      0.00000      0.00000     -0.02221      0.00000     -0.02221     -0.03766      0.00000      0.00000     -0.03766      0.00000     -0.03766 \n    -0.00344      0.00896      0.04575      0.05327      0.00367      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00164      0.00000      0.00000     -0.00164      0.00000     -0.00164     -0.00262      0.00000      0.00000     -0.00262      0.00000     -0.00262 \n     0.00000      0.00000      0.00000      0.00000      0.00000      2.00417      0.00000      0.00000      0.01838      0.00000      0.00000     -0.00941      0.00000      0.00000      0.00255      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00417      0.00000      0.00000      0.01838      0.00000      0.00000     -0.00941      0.00000      0.00000      0.00255      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00417      0.00000      0.00000      0.01838      0.00000      0.00000     -0.00941      0.00000      0.00000      0.00255      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.01838      0.00000      0.00000      0.67809      0.00000      0.00000      0.47631      0.00000      0.00000      0.04746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01838      0.00000      0.00000      0.67809      0.00000      0.00000      0.47631      0.00000      0.00000      0.04746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01838      0.00000      0.00000      0.67809      0.00000      0.00000      0.47631      0.00000      0.00000      0.04746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00941      0.00000      0.00000      0.47631      0.00000      0.00000      0.33492      0.00000      0.00000      0.03341      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00941      0.00000      0.00000      0.47631      0.00000      0.00000      0.33492      0.00000      0.00000      0.03341      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00941      0.00000      0.00000      0.47631      0.00000      0.00000      0.33492      0.00000      0.00000      0.03341      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00255      0.00000      0.00000      0.04746      0.00000      0.00000      0.03341      0.00000      0.00000      0.00340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00255      0.00000      0.00000      0.04746      0.00000      0.00000      0.03341      0.00000      0.00000      0.00340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00255      0.00000      0.00000      0.04746      0.00000      0.00000      0.03341      0.00000      0.00000      0.00340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00634     -0.05380     -0.01811     -0.02221     -0.00164      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00199      0.00000      0.00000      0.00199      0.00000      0.00199      0.00155      0.00000      0.00000      0.00155      0.00000      0.00155 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00634     -0.05380     -0.01811     -0.02221     -0.00164      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00199      0.00000      0.00000      0.00199      0.00000      0.00199      0.00155      0.00000      0.00000      0.00155      0.00000      0.00155 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00634     -0.05380     -0.01811     -0.02221     -0.00164      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00199      0.00000      0.00000      0.00199      0.00000      0.00199      0.00155      0.00000      0.00000      0.00155      0.00000      0.00155 \n     0.00613     -0.02099     -0.03206     -0.03766     -0.00262      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00155      0.00000      0.00000      0.00155      0.00000      0.00155      0.00199      0.00000      0.00000      0.00199      0.00000      0.00199 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00613     -0.02099     -0.03206     -0.03766     -0.00262      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00155      0.00000      0.00000      0.00155      0.00000      0.00155      0.00199      0.00000      0.00000      0.00199      0.00000      0.00199 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00613     -0.02099     -0.03206     -0.03766     -0.00262      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00155      0.00000      0.00000      0.00155      0.00000      0.00155      0.00199      0.00000      0.00000      0.00199      0.00000      0.00199 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66667      0.66667      0.66667      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -100.38580     -9.19833     -7.05215     -7.05215     -7.05215     -0.77070     -0.33375     -0.33375     -0.33375      0.02046      0.06620      0.06620      0.06620      0.25266      0.25266      0.25266      0.25266      0.25266      0.44176      0.61544      0.61544      0.61544      1.02236      1.02236      1.02236      1.02236      1.02236      1.91451      4.65249 \n   </alphaeps>\n   <betaeps>\n  -100.37960     -9.19124     -7.04356     -7.04356     -7.04356     -0.73795     -0.30453     -0.30453     -0.30453      0.02562      0.06982      0.06982      0.06982      0.27160      0.27160      0.27160      0.27160      0.27160      0.45245      0.63266      0.63266      0.63266      1.04944      1.04944      1.04944      1.04944      1.04944      1.93504      4.67099 \n   </betaeps>\n   <alphavectors>\n     1.00065     -0.00249     -0.00000     -0.00000      0.00000     -0.00266      0.00000     -0.00000      0.00000     -0.02839     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.11117      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.55640     -0.81230 \n     0.00447      1.00304     -0.00000      0.00000     -0.00000     -0.02865      0.00000     -0.00000      0.00000     -0.19960     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.69613      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -3.91471     -4.61346 \n     0.00130      0.02859     -0.00000      0.00000     -0.00000      0.53938      0.00000      0.00000     -0.00000     -0.39802     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.34924      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -4.77717     -3.33176 \n    -0.01302      0.05306      0.00000      0.00000     -0.00000      0.61607     -0.00000      0.00000     -0.00000     -0.56667     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.15810     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      6.74021     14.46593 \n    -0.00158      0.00571      0.00000      0.00000     -0.00000      0.04032     -0.00000      0.00000     -0.00000      1.86836      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      2.38546     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.67998      1.65936 \n    -0.00000      0.00000      1.00107     -0.00000      0.00000     -0.00000     -0.00138      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00782      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.21295     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      1.00107      0.00000     -0.00000     -0.00000      0.00000     -0.00138     -0.00000     -0.00000     -0.00782     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.21295      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      1.00107      0.00000     -0.00000     -0.00138     -0.00000      0.00000     -0.00782     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.21295      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.01053     -0.00000      0.00000     -0.00000      0.64296     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.23663      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.17502     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.01053     -0.00000      0.00000      0.00000     -0.00000      0.64296      0.00000     -0.00000     -0.23663     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.17502      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.01053     -0.00000      0.00000      0.64296     -0.00000      0.00000     -0.23663     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.17502      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00411      0.00000     -0.00000      0.00000      0.44550     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.35426      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.62700      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00411     -0.00000      0.00000      0.00000     -0.00000      0.44550      0.00000     -0.00000     -0.35426      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.62700     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00411     -0.00000      0.00000      0.44550     -0.00000      0.00000     -0.35426      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.62700     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00139     -0.00000      0.00000     -0.00000      0.03939     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.16142     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.71574     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00139     -0.00000      0.00000      0.00000     -0.00000      0.03939     -0.00000      0.00000      1.16142     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.71574      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00139     -0.00000      0.00000      0.03939      0.00000     -0.00000      1.16142     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.71574      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00306     -0.02741     -0.00000     -0.00000      0.00000     -0.01397     -0.00000     -0.00000      0.00000     -0.00429     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.21645     -0.08243      0.00000      0.00000     -0.00000      1.22381      0.00000      0.00000     -0.00000     -0.00000      0.14899     -3.07275 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.37490     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      2.11970     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.37490     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      2.11970     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00306     -0.02741     -0.00000     -0.00000      0.00000     -0.01397      0.00000     -0.00000      0.00000     -0.00429     -0.00000     -0.00000      0.00000      0.18745     -0.00000      0.00000      0.00000     -0.10823     -0.08243     -0.00000     -0.00000      0.00000     -0.61191     -0.00000     -0.00000      0.00000      1.05985      0.14899     -3.07275 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.37490     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      2.11970     -0.00000      0.00000      0.00000 \n     0.00306     -0.02741      0.00000     -0.00000      0.00000     -0.01397      0.00000     -0.00000      0.00000     -0.00429     -0.00000     -0.00000     -0.00000     -0.18745     -0.00000      0.00000      0.00000     -0.10823     -0.08243     -0.00000     -0.00000      0.00000     -0.61191     -0.00000     -0.00000     -0.00000     -1.05985      0.14899     -3.07275 \n     0.00295     -0.01129     -0.00000     -0.00000      0.00000     -0.02939     -0.00000     -0.00000      0.00000     -0.24532     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.85619     -1.49983      0.00000      0.00000     -0.00000     -0.90083      0.00000      0.00000     -0.00000      0.00000     -2.23969     -3.25404 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.48297      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.56029     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.48297      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.56029     -0.00000     -0.00000      0.00000      0.00000 \n     0.00295     -0.01129     -0.00000     -0.00000      0.00000     -0.02939      0.00000     -0.00000      0.00000     -0.24532     -0.00000     -0.00000      0.00000      0.74149     -0.00000      0.00000      0.00000     -0.42810     -1.49983     -0.00000     -0.00000      0.00000      0.45042     -0.00000     -0.00000     -0.00000     -0.78014     -2.23969     -3.25404 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.48297     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.56029      0.00000     -0.00000     -0.00000 \n     0.00295     -0.01129     -0.00000     -0.00000      0.00000     -0.02939      0.00000     -0.00000      0.00000     -0.24532     -0.00000     -0.00000     -0.00000     -0.74149     -0.00000      0.00000      0.00000     -0.42810     -1.49983     -0.00000     -0.00000      0.00000      0.45042     -0.00000     -0.00000      0.00000      0.78014     -2.23969     -3.25404 \n   </alphavectors>\n   <betavectors>\n     1.00065     -0.00257     -0.00000      0.00000     -0.00000     -0.00342     -0.00000     -0.00000      0.00000     -0.02900      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.11431     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.55746     -0.81111 \n     0.00444      1.00237      0.00000     -0.00000      0.00000     -0.03265     -0.00000     -0.00000      0.00000     -0.20313      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.71726     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -3.92071     -4.60509 \n     0.00130      0.02732      0.00000     -0.00000     -0.00000      0.53362      0.00000      0.00000      0.00000     -0.39928      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.36925     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -4.78258     -3.32263 \n    -0.01294      0.05357      0.00000     -0.00000      0.00000      0.62559      0.00000      0.00000     -0.00000     -0.56668     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.21444      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      6.76208     14.45069 \n    -0.00157      0.00584      0.00000     -0.00000      0.00000      0.04439      0.00000      0.00000     -0.00000      1.89863      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      2.36945      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.67302      1.65486 \n    -0.00000     -0.00000     -0.00000      0.00000      1.00101      0.00000     -0.00000     -0.00000     -0.00273     -0.00000     -0.00579      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.21331      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      1.00101     -0.00000      0.00000      0.00000     -0.00273      0.00000     -0.00000     -0.00000      0.00000     -0.00579     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.21331      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      1.00101      0.00000     -0.00000      0.00000     -0.00273      0.00000     -0.00000      0.00000     -0.00000     -0.00579     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.21331     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00986     -0.00000     -0.00000     -0.00000      0.62986      0.00000     -0.23512      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.18240      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00986      0.00000     -0.00000     -0.00000      0.62986     -0.00000     -0.00000     -0.00000      0.00000     -0.23512     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.18240      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00986     -0.00000      0.00000     -0.00000      0.62986      0.00000      0.00000      0.00000     -0.00000     -0.23512     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.18240      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00385     -0.00000      0.00000      0.00000      0.45236      0.00000     -0.37780      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.61980     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00385      0.00000     -0.00000     -0.00000      0.45236     -0.00000     -0.00000     -0.00000      0.00000     -0.37780      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.61980     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00385     -0.00000      0.00000     -0.00000      0.45236      0.00000      0.00000     -0.00000     -0.00000     -0.37780      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.61980      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00131     -0.00000     -0.00000     -0.00000      0.05264      0.00000      1.16779     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.70443      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00131      0.00000     -0.00000     -0.00000      0.05264      0.00000      0.00000      0.00000     -0.00000      1.16779     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.70443      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00131     -0.00000      0.00000     -0.00000      0.05264     -0.00000     -0.00000      0.00000      0.00000      1.16779     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.70443      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00304     -0.02722     -0.00000      0.00000     -0.00000     -0.01697     -0.00000     -0.00000     -0.00000     -0.00452     -0.00000      0.00000      0.00000      0.19884      0.00000     -0.00000      0.00000      0.00000     -0.08388     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.22680      0.14328     -3.07297 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.34439      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      2.12487     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.34439     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      2.12487     -0.00000      0.00000      0.00000      0.00000 \n     0.00304     -0.02722     -0.00000      0.00000     -0.00000     -0.01697     -0.00000     -0.00000      0.00000     -0.00452      0.00000      0.00000      0.00000     -0.09942     -0.00000      0.00000      0.17220      0.00000     -0.08388      0.00000     -0.00000      0.00000     -0.00000      1.06244     -0.00000     -0.00000     -0.61340      0.14328     -3.07297 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.34439     -0.00000      0.00000      0.00000     -0.00000      2.12487      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00304     -0.02722     -0.00000      0.00000     -0.00000     -0.01697     -0.00000     -0.00000      0.00000     -0.00452     -0.00000      0.00000      0.00000     -0.09942     -0.00000      0.00000     -0.17220     -0.00000     -0.08388      0.00000      0.00000     -0.00000      0.00000     -1.06244      0.00000      0.00000     -0.61340      0.14328     -3.07297 \n     0.00294     -0.01146     -0.00000      0.00000     -0.00000     -0.02919     -0.00000     -0.00000      0.00000     -0.26232      0.00000      0.00000      0.00000      0.86905      0.00000     -0.00000      0.00000      0.00000     -1.51058      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.88843     -2.23856     -3.24851 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.50525     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.53881      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.50525      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.53881      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00294     -0.01146     -0.00000      0.00000     -0.00000     -0.02919     -0.00000     -0.00000      0.00000     -0.26232      0.00000      0.00000      0.00000     -0.43453     -0.00000      0.00000      0.75262      0.00000     -1.51058     -0.00000     -0.00000      0.00000      0.00000     -0.76940     -0.00000     -0.00000      0.44422     -2.23856     -3.24851 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.50525     -0.00000     -0.00000      0.00000     -0.00000     -1.53881     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00294     -0.01146     -0.00000      0.00000     -0.00000     -0.02919     -0.00000     -0.00000     -0.00000     -0.26232     -0.00000      0.00000      0.00000     -0.43453     -0.00000      0.00000     -0.75262     -0.00000     -1.51058     -0.00000      0.00000     -0.00000     -0.00000      0.76940      0.00000      0.00000      0.44422     -2.23856     -3.24851 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ar\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.00243      0.00413     -0.00193     -0.02774     -0.00278      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00585      0.00000      0.00000      0.00585      0.00000      0.00585      0.00551      0.00000      0.00000      0.00551      0.00000      0.00551 \n     0.00413      2.02930      0.03039      0.05263      0.00653      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05092      0.00000      0.00000     -0.05092      0.00000     -0.05092     -0.01772      0.00000      0.00000     -0.01772      0.00000     -0.01772 \n    -0.00193      0.03039      0.57528      0.67135      0.04340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01725      0.00000      0.00000     -0.01725      0.00000     -0.01725     -0.02955      0.00000      0.00000     -0.02955      0.00000     -0.02955 \n    -0.02774      0.05263      0.67135      0.78394      0.05071      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02063      0.00000      0.00000     -0.02063      0.00000     -0.02063     -0.03469      0.00000      0.00000     -0.03469      0.00000     -0.03469 \n    -0.00278      0.00653      0.04340      0.05071      0.00329      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00141      0.00000      0.00000     -0.00141      0.00000     -0.00141     -0.00227      0.00000      0.00000     -0.00227      0.00000     -0.00227 \n     0.00000      0.00000      0.00000      0.00000      0.00000      2.00336      0.00000      0.00000      0.01609      0.00000      0.00000     -0.00926      0.00000      0.00000      0.00181      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00336      0.00000      0.00000      0.01609      0.00000      0.00000     -0.00926      0.00000      0.00000      0.00181      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.00336      0.00000      0.00000      0.01609      0.00000      0.00000     -0.00926      0.00000      0.00000      0.00181      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.01609      0.00000      0.00000      0.91662      0.00000      0.00000      0.55277      0.00000      0.00000      0.05335      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01609      0.00000      0.00000      0.91662      0.00000      0.00000      0.55277      0.00000      0.00000      0.05335      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01609      0.00000      0.00000      0.91662      0.00000      0.00000      0.55277      0.00000      0.00000      0.05335      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00926      0.00000      0.00000      0.55277      0.00000      0.00000      0.33353      0.00000      0.00000      0.03216      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00926      0.00000      0.00000      0.55277      0.00000      0.00000      0.33353      0.00000      0.00000      0.03216      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00926      0.00000      0.00000      0.55277      0.00000      0.00000      0.33353      0.00000      0.00000      0.03216      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00181      0.00000      0.00000      0.05335      0.00000      0.00000      0.03216      0.00000      0.00000      0.00311      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00181      0.00000      0.00000      0.05335      0.00000      0.00000      0.03216      0.00000      0.00000      0.00311      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00181      0.00000      0.00000      0.05335      0.00000      0.00000      0.03216      0.00000      0.00000      0.00311      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00585     -0.05092     -0.01725     -0.02063     -0.00141      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00177      0.00000      0.00000      0.00177      0.00000      0.00177      0.00130      0.00000      0.00000      0.00130      0.00000      0.00130 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00585     -0.05092     -0.01725     -0.02063     -0.00141      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00177      0.00000      0.00000      0.00177      0.00000      0.00177      0.00130      0.00000      0.00000      0.00130      0.00000      0.00130 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00585     -0.05092     -0.01725     -0.02063     -0.00141      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00177      0.00000      0.00000      0.00177      0.00000      0.00177      0.00130      0.00000      0.00000      0.00130      0.00000      0.00130 \n     0.00551     -0.01772     -0.02955     -0.03469     -0.00227      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00130      0.00000      0.00000      0.00130      0.00000      0.00130      0.00166      0.00000      0.00000      0.00166      0.00000      0.00166 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00551     -0.01772     -0.02955     -0.03469     -0.00227      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00130      0.00000      0.00000      0.00130      0.00000      0.00130      0.00166      0.00000      0.00000      0.00166      0.00000      0.00166 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00551     -0.01772     -0.02955     -0.03469     -0.00227      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00130      0.00000      0.00000      0.00130      0.00000      0.00130      0.00166      0.00000      0.00000      0.00166      0.00000      0.00166 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -113.81430    -10.80301     -8.45298     -8.45298     -8.45298     -0.88422     -0.38194     -0.38194     -0.38194      0.03471      0.08012      0.08012      0.08012      0.32890      0.32890      0.32890      0.32890      0.32890      0.55406      0.70144      0.70144      0.70144      1.25677      1.25677      1.25677      1.25677      1.25677      2.36674      5.67224 \n   </alphaeps>\n   <betaeps>\n  -113.81430    -10.80301     -8.45298     -8.45298     -8.45298     -0.88422     -0.38194     -0.38194     -0.38194      0.03471      0.08012      0.08012      0.08012      0.32890      0.32890      0.32890      0.32890      0.32890      0.55406      0.70144      0.70144      0.70144      1.25677      1.25677      1.25677      1.25677      1.25677      2.36674      5.67224 \n   </betaeps>\n   <alphavectors>\n     1.00060     -0.00187     -0.00000      0.00000     -0.00000     -0.00319     -0.00000     -0.00000     -0.00000     -0.03129      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.12612      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.61468     -0.83064 \n     0.00385      1.00685      0.00000     -0.00000      0.00000     -0.02977     -0.00000     -0.00000     -0.00000     -0.21346      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.76951      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -4.20633     -4.49705 \n     0.00080      0.03092      0.00000     -0.00000      0.00000      0.53543      0.00000      0.00000      0.00000     -0.39792      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.39180      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -4.91843     -2.98567 \n    -0.01179      0.04464      0.00000     -0.00000      0.00000      0.62437      0.00000      0.00000      0.00000     -0.50496      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.41302     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      7.25839     14.44323 \n    -0.00125      0.00444      0.00000     -0.00000      0.00000      0.04027      0.00000      0.00000      0.00000      1.83417     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.19067     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.53945      1.46421 \n    -0.00000     -0.00000      1.00083     -0.00000      0.00000      0.00000      0.00000     -0.00420     -0.00000     -0.00000      0.00000     -0.00000     -0.00586     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.19080      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      1.00083      0.00000     -0.00420      0.00000      0.00000     -0.00000     -0.00586      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.19080      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00083     -0.00000      0.00000      0.00000      0.00000     -0.00420     -0.00000     -0.00000     -0.00586     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.19080      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.01088      0.00000     -0.00000     -0.00000     -0.00000      0.67690     -0.00000      0.00000     -0.00000      0.00000     -0.23375     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.15135      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.01088     -0.00000      0.67690     -0.00000     -0.00000     -0.00000     -0.23375      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.15135      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.01088     -0.00000     -0.00000     -0.00000     -0.00000      0.67690      0.00000     -0.00000     -0.23375     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.15135     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00291      0.00000     -0.00000     -0.00000     -0.00000      0.40836      0.00000      0.00000     -0.00000      0.00000     -0.33724      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.63568     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00291     -0.00000      0.40836     -0.00000     -0.00000     -0.00000     -0.33724     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.63568      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00291      0.00000     -0.00000     -0.00000     -0.00000      0.40836      0.00000     -0.00000     -0.33724      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.63568      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00107      0.00000     -0.00000     -0.00000     -0.00000      0.03939     -0.00000     -0.00000      0.00000     -0.00000      1.15774     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.71991      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00107      0.00000      0.03939      0.00000      0.00000      0.00000      1.15774      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.71991      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00107     -0.00000     -0.00000     -0.00000     -0.00000      0.03939     -0.00000      0.00000      1.15774     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.71991     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00283     -0.02573     -0.00000      0.00000     -0.00000     -0.01463     -0.00000     -0.00000     -0.00000     -0.00687      0.00000     -0.00000     -0.00000     -0.04562      0.21757     -0.00000     -0.00000     -0.00000     -0.08664     -0.00000      0.00000     -0.00000      1.20962     -0.15905      0.00000      0.00000      0.00000      0.09939     -3.11809 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.38504      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      2.11316     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.38504     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      2.11316     -0.00000      0.00000      0.00000 \n     0.00283     -0.02573     -0.00000      0.00000     -0.00000     -0.01463     -0.00000     -0.00000     -0.00000     -0.00687      0.00000     -0.00000     -0.00000      0.21123     -0.06927     -0.00000      0.00000      0.00000     -0.08664      0.00000     -0.00000      0.00000     -0.46707      1.12709     -0.00000     -0.00000     -0.00000      0.09939     -3.11809 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.38504      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      2.11316     -0.00000      0.00000     -0.00000      0.00000 \n     0.00283     -0.02573     -0.00000      0.00000     -0.00000     -0.01463     -0.00000     -0.00000     -0.00000     -0.00687      0.00000     -0.00000     -0.00000     -0.16561     -0.14829      0.00000      0.00000      0.00000     -0.08664     -0.00000      0.00000     -0.00000     -0.74255     -0.96804      0.00000      0.00000      0.00000      0.09939     -3.11809 \n     0.00265     -0.00961     -0.00000      0.00000     -0.00000     -0.02704     -0.00000     -0.00000     -0.00000     -0.25554      0.00000     -0.00000     -0.00000     -0.17492      0.83419     -0.00000     -0.00000     -0.00000     -1.49747     -0.00000      0.00000     -0.00000     -0.89311      0.11743     -0.00000     -0.00000     -0.00000     -2.29933     -3.22697 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.47628     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.56022      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.47628     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.56022     -0.00000     -0.00000      0.00000 \n     0.00265     -0.00961     -0.00000      0.00000     -0.00000     -0.02704     -0.00000     -0.00000     -0.00000     -0.25554      0.00000     -0.00000     -0.00000      0.80989     -0.26561     -0.00000      0.00000      0.00000     -1.49747      0.00000     -0.00000      0.00000      0.34486     -0.83217      0.00000      0.00000      0.00000     -2.29933     -3.22697 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.47628     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.56022     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00265     -0.00961     -0.00000      0.00000     -0.00000     -0.02704     -0.00000     -0.00000     -0.00000     -0.25554      0.00000     -0.00000     -0.00000     -0.63497     -0.56858      0.00000      0.00000      0.00000     -1.49747     -0.00000      0.00000     -0.00000      0.54825      0.71474     -0.00000     -0.00000     -0.00000     -2.29933     -3.22697 \n   </alphavectors>\n   <betavectors>\n     1.00060     -0.00187      0.00000      0.00000      0.00000     -0.00319      0.00000     -0.00000     -0.00000     -0.03129      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.12612      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.61468     -0.83064 \n     0.00385      1.00685     -0.00000     -0.00000     -0.00000     -0.02977      0.00000     -0.00000     -0.00000     -0.21346      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.76951      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -4.20633     -4.49705 \n     0.00080      0.03092     -0.00000     -0.00000     -0.00000      0.53543     -0.00000      0.00000      0.00000     -0.39792      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.39180     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -4.91843     -2.98567 \n    -0.01179      0.04464     -0.00000     -0.00000     -0.00000      0.62437     -0.00000      0.00000      0.00000     -0.50496      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.41302     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      7.25839     14.44323 \n    -0.00125      0.00444     -0.00000     -0.00000     -0.00000      0.04027     -0.00000      0.00000      0.00000      1.83417     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      2.19067     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.53945      1.46421 \n     0.00000      0.00000     -0.00000      1.00083     -0.00000      0.00000     -0.00000     -0.00420      0.00000      0.00000     -0.00000     -0.00586     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.19080      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      1.00083      0.00000      0.00000     -0.00000     -0.00420     -0.00000     -0.00000     -0.00000     -0.00586     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.19080      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      1.00083      0.00000     -0.00000      0.00000     -0.00420      0.00000     -0.00000      0.00000     -0.00586     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.19080      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.01088      0.00000     -0.00000      0.00000      0.67690      0.00000      0.00000     -0.00000     -0.23375     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.15135      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.01088     -0.00000     -0.00000      0.00000      0.67690     -0.00000     -0.00000     -0.00000     -0.23375      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.15135      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.01088     -0.00000      0.00000     -0.00000      0.67690      0.00000     -0.00000      0.00000     -0.23375     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.15135      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00291      0.00000     -0.00000      0.00000      0.40836      0.00000      0.00000     -0.00000     -0.33724      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.63568     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00291     -0.00000     -0.00000      0.00000      0.40836      0.00000      0.00000     -0.00000     -0.33724     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.63568     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00291     -0.00000      0.00000     -0.00000      0.40836     -0.00000      0.00000     -0.00000     -0.33724     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.63568     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00107      0.00000     -0.00000      0.00000      0.03939     -0.00000     -0.00000      0.00000      1.15774     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.71991      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00107      0.00000      0.00000      0.00000      0.03939     -0.00000     -0.00000      0.00000      1.15774      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.71991      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00107     -0.00000      0.00000     -0.00000      0.03939     -0.00000      0.00000     -0.00000      1.15774     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.71991      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00283     -0.02573      0.00000      0.00000      0.00000     -0.01463      0.00000     -0.00000     -0.00000     -0.00687      0.00000     -0.00000     -0.00000      0.18442     -0.12413     -0.00000     -0.00000     -0.00000     -0.08664      0.00000     -0.00000     -0.00000      1.21510     -0.10958      0.00000      0.00000      0.00000      0.09939     -3.11809 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.38504     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.11316     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.38504     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.11316      0.00000     -0.00000 \n     0.00283     -0.02573      0.00000      0.00000      0.00000     -0.01463      0.00000     -0.00000     -0.00000     -0.00687      0.00000     -0.00000     -0.00000     -0.19971     -0.09764     -0.00000     -0.00000     -0.00000     -0.08664      0.00000     -0.00000     -0.00000     -0.51266      1.10710     -0.00000     -0.00000     -0.00000      0.09939     -3.11809 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.38504      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.11316      0.00000      0.00000     -0.00000      0.00000 \n     0.00283     -0.02573      0.00000      0.00000      0.00000     -0.01463      0.00000     -0.00000     -0.00000     -0.00687      0.00000     -0.00000     -0.00000      0.01529      0.22177     -0.00000     -0.00000     -0.00000     -0.08664      0.00000     -0.00000     -0.00000     -0.70245     -0.99752      0.00000      0.00000      0.00000      0.09939     -3.11809 \n     0.00265     -0.00961      0.00000      0.00000      0.00000     -0.02704      0.00000     -0.00000     -0.00000     -0.25554      0.00000     -0.00000     -0.00000      0.70708     -0.47594     -0.00000      0.00000     -0.00000     -1.49747      0.00000     -0.00000     -0.00000     -0.89715      0.08090     -0.00000     -0.00000     -0.00000     -2.29933     -3.22697 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.47628      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.56022      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.47628      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.56022     -0.00000      0.00000 \n     0.00265     -0.00961      0.00000      0.00000      0.00000     -0.02704      0.00000     -0.00000     -0.00000     -0.25554      0.00000     -0.00000     -0.00000     -0.76571     -0.37438     -0.00000      0.00000     -0.00000     -1.49747      0.00000     -0.00000     -0.00000      0.37851     -0.81741      0.00000      0.00000      0.00000     -2.29933     -3.22697 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.47628     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.56022     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00265     -0.00961      0.00000      0.00000      0.00000     -0.02704      0.00000     -0.00000     -0.00000     -0.25554      0.00000     -0.00000     -0.00000      0.05863      0.85031     -0.00000      0.00000     -0.00000     -1.49747      0.00000     -0.00000     -0.00000      0.51864      0.73651     -0.00000     -0.00000     -0.00000     -2.29933     -3.22697 \n   </betavectors>\n</atomicguess>\n"
  },
  {
    "path": "src/madness/chem/basis.h",
    "content": "/* This file is a part of Slymer, which is distributed under the Creative\n   Commons Attribution-NonCommercial 4.0 International Public License.\n\n   (c) 2017 Stony Brook University. */\n\n/**\n * \\file Basis/basis.h\n * \\brief Basis function API and routines.\n *\n * Sets up the interface for general basis functions and related calculations.\n */\n\n#ifndef __Basis_basis_h__\n#define __Basis_basis_h__\n\n#include <array>\n#include <functional>\n#include <memory>\n#include <stdexcept>\n#include <vector>\n\nnamespace slymer {\n\n/// Abstract base class for generic basis functions.\nclass BasisFunction {\npublic:\n  virtual ~BasisFunction() = default;\n  \n  /**\n   * \\brief Evaluate the basis function at the specified point.\n   *\n   * \\param[in] x The point.\n   * \\return The basis function evaluated at the point x.\n   */\n  virtual double operator() (const std::array<double, 3> &x) const = 0;\n\n};\n\n/// Type for a basis set (collection of basis functions).\nusing BasisSet = std::vector<std::reference_wrapper<BasisFunction>>;\n\n/**\n * \\brief Convert a generic basis set to basis functions with the specific\n *    type.\n *\n * \\throw std::runtime_error if a basis function in the basis set is not\n *    of the specified type.\n *\n * \\tparam T The intended type of each basis function.\n * \\param[in] bset The basis set.\n * \\return A vector with cast references to the basis functions.\n */\ntemplate<typename T>\nstd::vector<std::reference_wrapper<const T>> cast_basis(const BasisSet &bset) {\n  const unsigned size = bset.size();\n  std::vector<std::reference_wrapper<const T>> casts;\n\n  for(unsigned j = 0; j < size; ++j) {\n    const T *ptr = dynamic_cast<const T*>(&bset[j].get());\n    if(ptr == nullptr)\n      throw std::runtime_error(\"A basis function is not of the specified type.\");\n    casts.emplace_back(std::cref(*ptr));\n  }\n\n  return casts;\n}\n\n} // namespace slymer\n\n#endif\n"
  },
  {
    "path": "src/madness/chem/benchmark_exchange_operator.cc",
    "content": "#include <madness.h>\n#include <madness/chem/SCF.h>\n#include <madness/chem/SCFOperators.h>\n#include <madness/chem/nemo.h>\n#include <madness/chem/write_test_input.h>\n#include <madness/misc/info.h>\n#include <madness/world/test_utilities.h>\n#include <ParameterManager.hpp>\n\nclass MemoryParameters : public QCCalculationParametersBase {\npublic:\n    static constexpr char const* tag = \"memory\";\n\n    MemoryParameters(World& world, const commandlineparser& parser) : MemoryParameters() {\n        QCCalculationParametersBase::read_input_and_commandline_options(world, parser, \"memory\");\n        set_derived_values();\n    }\n\n    MemoryParameters(const MemoryParameters& mp) = default;\n\n    MemoryParameters() {\n        initialize<std::string>(\"memory_algorithm\", \"default\",\n                                \"preset for memory algorithm to use\", {\n                                    \"default\", \"node_replicated_target\", \"small_memory\", \"large_memory\"\n                                });\n        initialize<std::string>(\"cloud_storage\", \"Function\",\n                                \"Store function or pointer to target function in exchange operator\", {\n                                    \"Function\", \"FunctionPointer\", \"FunctionViaPointer\"\n                                });\n        initialize<std::string>(\"cloud_distribution\", \"RankReplicated\", \"distribution of cloud container\",\n                                {\"Distributed\", \"NodeReplicated\", \"RankReplicated\"});\n        initialize<std::string>(\"target_distribution\", \"NodeReplicated\", \"distribution of target functions\",\n                                {\"Distributed\", \"NodeReplicated\", \"RankReplicated\"});\n    }\n\n    std::string memory_algorithm() const { return get<std::string>(\"memory_algorithm\"); }\n    MacroTaskInfo::StoragePolicy cloud_storage() const { return MacroTaskInfo::policy_to_string(get<std::string>(\"cloud_storage\"));}\n    DistributionType cloud_distribution() const { return from_string(get<std::string>(\"cloud_distribution\")); }\n    DistributionType target_distribution() const { return from_string(get<std::string>(\"target_distribution\")); }\n\n    std::string get_tag() const override { return tag; }\n\n    void set_derived_values() {\n        if (memory_algorithm()==\"default\") {\n            set_derived_value(\"cloud_storage\",std::string(\"Function\"));\n            set_derived_value(\"cloud_distribution\",std::string(\"NodeReplicated\"));\n            set_derived_value(\"target_distribution\",std::string(\"Distributed\"));\n        } else if (memory_algorithm()==\"node_replicated_target\") {\n            set_derived_value(\"cloud_storage\",std::string(\"FunctionPointer\"));\n            set_derived_value(\"cloud_distribution\",std::string(\"RankReplicated\"));\n            set_derived_value(\"target_distribution\",std::string(\"NodeReplicated\"));\n        } else if (memory_algorithm()==\"small_memory\") {\n            set_derived_value(\"cloud_storage\",std::string(\"FunctionViaPointer\"));\n            set_derived_value(\"cloud_distribution\",std::string(\"RankReplicated\"));\n            set_derived_value(\"target_distribution\",std::string(\"Distributed\"));\n        } else if (memory_algorithm()==\"large_memory\") {\n            set_derived_value(\"cloud_storage\",std::string(\"Function\"));\n            set_derived_value(\"cloud_distribution\",std::string(\"RankReplicated\"));\n            set_derived_value(\"target_distribution\",std::string(\"Distributed\"));\n        }\n    }\n};\n\nusing namespace madness;\n\nint main(int argc, char** argv) {\n    World& world = initialize(argc, argv);\n    {\n        startup(world, argc, argv, true);\n        commandlineparser parser(argc, argv);\n\n        srand(time(nullptr));\n        if (world.rank() == 0) print(info::print_revision_information());\n\n        if (not parser.key_exists(\"geometry\")) parser.set_keyval(\"geometry\", \"water2\");\n        MemoryParameters memparam(world, parser);\n\n        Params pm(world, parser);\n        pm.get<CalculationParameters>().set_derived_value<int>(\"maxiter\", 1);\n        // memparam.print(\"memory\",\"end\");\n\n        auto exchange_alg=Exchange<double,3>::string2algorithm(pm.get<CalculationParameters>().hfexalg());\n        MacroTaskInfo info;\n        info.storage_policy=memparam.cloud_storage();\n        info.ptr_target_distribution_policy=memparam.target_distribution();\n        info.cloud_distribution_policy=memparam.cloud_distribution();\n\n        double cpu0 = cpu_time();\n\n        SCF calc(world, pm.get<CalculationParameters>(), pm.get<Molecule>());\n        if (world.rank() == 0) {\n            calc.param.print(\"dft\", \"end\");\n            memparam.print(\"memory\",\"end\");\n            calc.molecule.print();\n        }\n\n        // prepare orbitals\n        calc.set_protocol<3>(world, 1e-4);\n        MolecularEnergy me(world, calc);\n        me.value(calc.molecule.get_all_coords());\n\n        Exchange<double, 3> K = Exchange<double, 3>(world, &calc, 0);\n\n        if (world.size() > 1) {\n            LoadBalanceDeux<3> lb(world);\n            for (unsigned int i = 0; i < calc.amo.size(); ++i) {\n                lb.add_tree(calc.amo[i], lbcost<double, 3>(1.0, 8.0), false);\n            }\n            world.gop.fence();\n            FunctionDefaults<3>::redistribute(world, lb.load_balance( calc.param.loadbalparts()));\n            world.gop.fence();\n        }\n\n        double cpu1 = cpu_time();\n        if (world.rank() == 0) printf(\"\\ntimings for preparation   %8.2fs\\n\", cpu1 - cpu0);\n\n        // compute reference number\n        cpu0 = cpu1;\n        K.set_algorithm(Exchange<double, 3>::large_memory);\n        K.set_symmetric(true);\n        K.set_printlevel(20);\n        //        const vecfuncT reference = K(calc.amo);\n        //        cpu1 = cpu_time();\n        //        double norm = norm2(world, reference);\n        //        if (world.rank() == 0)\n        //            printf(\"timings exchange operator no multiworld largemem   %8.2fs, norm %.15e\\n\", cpu1 - cpu0, norm);\n\n        // gather all results in a vector\n        nlohmann::json all_results = nlohmann::json::array();\n\n\n        //        for (auto exchange_alg : {\n        //                 Exchange<double, 3>::multiworld_efficient_row,\n        //                 Exchange<double, 3>::multiworld_efficient,\n        //                 Exchange<double, 3>::large_memory,\n        //                 Exchange<double, 3>::small_memory\n        //             }) {\n        //            for (auto info : MacroTaskInfo::get_all_presets()) {\n        {\n            {\n                K.set_macro_task_info(info);\n                if (world.rank() == 0) {\n                    print(\"MacroTaskInfo:\");\n                    print(info);\n                    print(\"Algorithm:\", exchange_alg);\n                }\n\n\n                cpu0 = cpu_time();\n                K.set_algorithm(exchange_alg);\n                vecfuncT tmp = K(calc.amo);\n                cpu1 = cpu_time();\n                nlohmann::json result = K.statistics;\n                result[\"time\"] = cpu1 - cpu0;\n                double err = 0.0;\n                // err= norm2(world, reference - tmp);\n                result[\"error\"] = err;\n                all_results.push_back(result);\n\n                if (world.rank() == 0) {\n                    printf(\"timings exchange operator                          %8.2fs, error %.2e\\n\", cpu1 - cpu0, err);\n                    print(all_results.dump(4));\n                }\n            }\n        }\n\n        // print out all_results into a file\n        if (world.rank() == 0) {\n            std::string prefix = pm.get<CalculationParameters>().prefix();\n            prefix+=\".hfexalg_\"+calc.param.hfexalg()\n                    +\".cloud_\"+to_string(memparam.cloud_storage())\n                    +\".cloud_\"+to_string(memparam.cloud_distribution())\n                    +\".target_\"+to_string(memparam.target_distribution());\n            std::ofstream file(prefix + \".benchmark.json\");\n            file << std::setw(4) << all_results << std::endl;\n            file.close();\n        }\n    }\n\n    print(\"\\n all done -- thumbs up :-)\\n\");\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/chem/ccpairfunction.cc",
    "content": "//\n// Created by Florian Bischoff on 6/27/22.\n//\n\n#include<madness/chem/ccpairfunction.h>\n#include<madness/chem/CCStructures.h>\n#include<madness/chem/projector.h>\n#include<madness/chem/lowrankfunction.h>\n#include<madness/mra/operator.h>\n\nusing namespace madness;\n\nnamespace madness {\n\ntemplate<typename T, std::size_t NDIM>\nmadness::CCPairFunction<T,NDIM>\nCCPairFunction<T,NDIM>::invert_sign() {\n    (*this)*=(-1.0);\n    return *this;\n}\n\ntemplate<typename T, std::size_t NDIM>\nbool CCPairFunction<T,NDIM>::is_convertible_to_pure_no_op() const {\n    if (has_operator()) {\n        const auto type=get_operator().type();\n        if (not (type==OpType::OT_SLATER or type==OpType::OT_F12)) return false;\n    }\n    return true;\n};\n\n\ntemplate<typename T, std::size_t NDIM>\nvoid CCPairFunction<T,NDIM>::convert_to_pure_no_op_inplace() {\n    pureT result;\n    if (is_pure_no_op()) {\n        return;\n    } else if (is_pure()) {\n        result= CompositeFactory<T, NDIM, LDIM>(world())\n                .g12(get_operator().get_kernel())\n                .ket(get_function());\n    } else if (is_decomposed_no_op()) {\n        result= CompositeFactory<T, NDIM, LDIM>(world())\n                .particle1(get_a())\n                .particle2(get_b());\n    } else if (is_op_decomposed()) {\n        result= CompositeFactory<T, NDIM, LDIM>(world())\n                .g12(get_operator().get_kernel())\n                .particle1(get_a())\n                .particle2(get_b());\n    } else {\n        MADNESS_EXCEPTION(\"error in convert_to_pure_no_op_inplace\",1);\n    }\n    result.fill_tree();\n    result.truncate(FunctionDefaults<NDIM>::get_thresh()*0.1);\n    component.reset(new TwoBodyFunctionPureComponent<T,NDIM>(result));\n};\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> CCPairFunction<T,NDIM>::op_pure_to_pure(const std::vector<CCPairFunction<T,NDIM>>& other) {\n    World& world=other.front().world();\n    std::vector<CCPairFunction<T,NDIM>> result;\n    Function<T,NDIM> pure=FunctionFactory<T,NDIM>(world);\n    for (const auto& c : other) {\n        if (c.is_pure_no_op()) {\n            pure+=c.get_function();\n        } else if (c.is_op_pure()) {\n            Function<T,NDIM> tmp=CompositeFactory<T,NDIM,LDIM>(world).g12(c.get_operator().get_kernel()).ket(c.get_function());\n            tmp.fill_tree();\n            pure+=tmp;\n        } else if (c.is_decomposed()) {\n            result.push_back(c);\n        }\n    }\n    if (pure.is_initialized()) {\n        pure.truncate(FunctionDefaults<NDIM>::get_thresh()*0.1);\n        result.push_back(CCPairFunction<T,NDIM>(pure));\n    }\n    return result;\n}\n\n/// turn decomposed functions with operator into decomposed functions using LowRankFunction\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> CCPairFunction<T,NDIM>::op_dec_to_dec(const std::vector<CCPairFunction<T,NDIM>>& other,\n                                                                          const std::vector<Vector<double,CCPairFunction<T,NDIM>::LDIM>>& centers) {\n    LowRankFunctionParameters lrparameters;\n    lrparameters.set_derived_value(\"tol\",1.e-10);\n    auto builder = LowRankFunctionFactory<T,NDIM>(lrparameters,centers);\n//    builder.set_volume_element(3.e-2);\n    if (other.front().world().rank()==0) {\n        builder.parameters.print(\"lrparameters\");\n        print(\"centers\",centers);\n    }\n    std::vector<CCPairFunction<T,NDIM>> result;\n    for (const auto& c : other) {\n        if (c.is_op_decomposed()) {\n            LRFunctorF12<T,NDIM> functor(c.get_operator_ptr()->get_op(),c.get_a(),c.get_b());\n            LowRankFunction<T,NDIM> tmp=builder.project(functor);\n//            double l2error=tmp.l2error(functor);\n            tmp.optimize(functor);\n            result.push_back(CCPairFunction<T,NDIM>(tmp.get_g(),tmp.get_h()));\n        } else {\n            result.push_back(c);\n        }\n    }\n    return result;\n}\n\n/// turn decomposed functions with operator into pure functions\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> CCPairFunction<T,NDIM>::dec_to_pure(const std::vector<CCPairFunction<T,NDIM>>& other) {\n    std::vector<CCPairFunction<T,NDIM>> result;\n    for (const auto& c : other) {\n        if (c.is_decomposed_no_op()) {\n            CCPairFunction<T,NDIM> tmp=copy(c);\n            tmp.convert_to_pure_no_op_inplace();\n            result.push_back(tmp);\n        } else {\n            result.push_back(c);\n        }\n    }\n    return result;\n}\n\n\n/// turn decomposed functions with operator into pure functions\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> CCPairFunction<T,NDIM>::op_dec_to_pure(const std::vector<CCPairFunction<T,NDIM>>& other) {\n    std::vector<CCPairFunction<T,NDIM>> result;\n    for (const auto& c : other) {\n        if (c.is_op_decomposed()) {\n            CCPairFunction<T,NDIM> tmp=copy(c);\n            tmp.convert_to_pure_no_op_inplace();\n            result.push_back(tmp);\n        } else {\n            result.push_back(c);\n        }\n    }\n    return result;\n\n}\n\n/// turn decomposed functions with operator into decomposed functions using LowRankFunction\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> CCPairFunction<T,NDIM>::remove_linearly_dependent_terms(const std::vector<CCPairFunction<T,NDIM>>& other,\n    double thresh) {\n    if (thresh<0.0) thresh=FunctionDefaults<3>::get_thresh()*0.1;\n    std::vector<CCPairFunction<T,NDIM>> result;\n    for (const auto& c : other) {\n        if (c.is_pure()) result.push_back(c);\n        else if (c.is_decomposed()) {\n\n            LowRankFunction<T,NDIM> lrf(c.get_a(),c.get_b(),thresh,\"canonical\");\n            lrf.reorthonormalize();\n            result.push_back(CCPairFunction<T,NDIM>(c.get_operator_ptr(),lrf.get_g(),lrf.get_h()));\n\n        } else {\n            MADNESS_EXCEPTION(\"you should not be here\",1);\n        }\n    }\n\n    return result;\n}\n\n/// collect all terms with of similiar type: pure, op_pure, decomposed, op_decomposed\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> CCPairFunction<T,NDIM>::collect_same_types(const std::vector<CCPairFunction<T, NDIM>>& other) {\n\n    if (other.size()==0) return other;\n    if (is_collected(other)) return other;\n\n    World& world=other.front().world();\n\n    /// vector includes OT_ONE, meaning no operator\n    std::vector<std::vector<Function<T,NDIM>>> op_pure(OT_SIZE);\n    std::vector<std::vector<Function<T,LDIM>>> op_decomposed_a(OT_SIZE);\n    std::vector<std::vector<Function<T,LDIM>>> op_decomposed_b(OT_SIZE);\n    std::vector<std::shared_ptr<CCConvolutionOperator<T,LDIM>>> ops(OT_SIZE);\n\n    // collect terms of the same type\n    for (const auto& c : other) {\n        int iop= (c.has_operator()) ? int(c.get_operator().type()) : OT_ONE;\n        ops[iop]=c.get_operator_ptr();\n        if (c.is_decomposed()) {\n            op_decomposed_a[iop]=append(op_decomposed_a[iop],c.get_a());\n            op_decomposed_b[iop]=append(op_decomposed_b[iop],c.get_b());\n        } else if (c.is_pure()) {\n            op_pure[iop].push_back(c.get_function());\n        }\n    }\n\n    std::vector<CCPairFunction<T,NDIM>> result;\n\n    // accumulate all terms of the same type\n    for (int opint=OT_ONE; opint<OT_SIZE; ++opint) {\n        if (op_pure[opint].size()>0) {\n            auto op=ops[opint];\n            if (op_pure[opint].size()>1) {\n                // Function<T,NDIM> tmp=CompositeFactory<T,NDIM,LDIM>(world).ket(op_pure[opint]);\n                // tmp.fill_tree();\n                Tensor<double> c(op_pure[opint].size(),1);\n                c=1.0;\n                Function<T,NDIM> tmp=transform_reconstructed(world, op_pure[opint],c,true)[0];\n                result.push_back(CCPairFunction<T,NDIM>(op,tmp));\n            } else {\n                MADNESS_CHECK_THROW(op_pure[opint].size()==1,\"op_pure[opint].size()!=1\");\n                result.push_back(CCPairFunction<T,NDIM>(op,copy(op_pure[opint].front())));\n            }\n        }\n        if (op_decomposed_a[opint].size()>0) {\n            result.push_back(CCPairFunction<T,NDIM>(ops[opint],op_decomposed_a[opint],op_decomposed_b[opint]));\n        }\n    }\n    return result;\n\n}\ntemplate<typename T, std::size_t NDIM>\nbool CCPairFunction<T,NDIM>::is_collected(const std::vector<CCPairFunction<T,NDIM>>& other) {\n\n    // simply count the occurence of each term\n    std::map<int,int> counter;\n    for (const auto& c : other) {\n        int index=0;\n        if (c.has_operator()) index=int(c.get_operator().type()) *100;\n        if (c.is_op_pure()) index+=1;\n        if (c.is_op_decomposed()) index+=2;\n        if (c.is_pure_no_op()) index+=3;\n        if (c.is_decomposed_no_op()) index+=4;\n        counter[index]++;\n    }\n    for (const auto& c : counter) if (c.second>1) return false;\n    return true;\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> CCPairFunction<T,NDIM>::consolidate(const std::vector<CCPairFunction<T,NDIM>>& other,\n                                                const std::vector<std::string>& options,\n                                                const std::vector<Vector<double,CCPairFunction<T,NDIM>::LDIM>>& centers) const {\n\n    // convert op_pure functions to pure\n    bool op_pure_to_pure=find(options.begin(),options.end(),\"op_pure_to_pure\")!=options.end();\n    // convert op_dec functions to dec (via LowRankFunctions\n    bool op_dec_to_dec=find(options.begin(),options.end(),\"op_dec_to_dec\")!=options.end();\n    // convert op_dec functions to pure (via fill_tree)\n    bool op_dec_to_pure=find(options.begin(),options.end(),\"op_dec_to_pure\")!=options.end();\n    // convert dec functions to pure (via hartree product)\n    bool dec_to_pure=find(options.begin(),options.end(),\"dec_to_pure\")!=options.end();\n    // reorthogonalize decomposed functions and op_decomposed functions\n    bool lindep=find(options.begin(),options.end(),\"remove_lindep\")!=options.end();\n\n    // always collect all terms of the same type\n    auto result= is_collected(other) ? other : collect_same_types(other);\n    if (lindep) result=CCPairFunction<T,NDIM>::remove_linearly_dependent_terms(result);\n\n    if (op_dec_to_dec) result=CCPairFunction<T,NDIM>::op_dec_to_dec(result,centers);\n    if (op_dec_to_pure) result=CCPairFunction<T,NDIM>::op_dec_to_pure(result);\n    if (dec_to_pure) result=CCPairFunction<T,NDIM>::dec_to_pure(result);\n    if (op_pure_to_pure) result=CCPairFunction<T,NDIM>::op_pure_to_pure(result);\n\n    if (not is_collected(result)) result=collect_same_types(result);\n\n\n    return result;\n}\n\n/// multiplication with a 2-particle function\ntemplate<typename T, std::size_t NDIM>\nCCPairFunction<T,NDIM>& CCPairFunction<T,NDIM>::multiply_with_op_inplace(const std::shared_ptr<CCConvolutionOperator<T,CCPairFunction<T,NDIM>::LDIM>> op) {\n    if (has_operator()) {\n        auto newop=combine(get_operator_ptr(),op);\n        reset_operator(newop);\n    } else {\n        reset_operator(op);\n    }\n    return *this;\n}\n\ntemplate<typename T, std::size_t NDIM>\ndouble\nCCPairFunction<T,NDIM>::make_xy_u(const CCFunction<T,LDIM>& xx, const CCFunction<T,LDIM>& yy) const {\n    CCPairFunction<T,NDIM> bra(xx.function,yy.function);\n    return inner(bra,*this);\n    T result = 0.0;\n    if (is_pure()) {\n        World& world=xx.function.world();\n        Function<T,NDIM> ij = CompositeFactory<double, NDIM, LDIM>(world).particle1(madness::copy(xx.function))\n                .particle2( madness::copy(yy.function));\n        result = inner(pure().get_function(), ij);\n    } else if (is_decomposed_no_op()) {\n        for (size_t i = 0; i < get_a().size(); i++)\n            result += (xx.function.inner(get_a()[i])) * (yy.function.inner(get_b()[i]));\n    } else if (is_op_decomposed()) {\n        const CCConvolutionOperator<T,LDIM>& op=*decomposed().get_operator_ptr();\n        result = yy.function.inner(op(xx, get_a()[0]) * get_b()[0]);\n    }\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,CCPairFunction<T,NDIM>::LDIM>\nCCPairFunction<T,NDIM>::project_out(const CCFunction<T,LDIM>& f, const size_t particle) const {\n    MADNESS_ASSERT(particle == 1 or particle == 2);\n    Function<T,LDIM> result;\n    if (is_pure_no_op()) {\n        result = pure().get_function().project_out(f.function,\n                                                   particle - 1); // this needs 0 or 1 for particle but we give 1 or 2\n    } else if (is_op_pure()) {\n        MADNESS_EXCEPTION(\"implement CCPairFunction<T,NDIM>::project_out for op_pure\",1);\n    } else if (is_decomposed_no_op()) {\n        result = project_out_decomposed(f.function, particle);\n    } else if (is_op_decomposed()) {\n        result = project_out_op_decomposed(f, particle);\n    }\n    if (not result.is_initialized()) MADNESS_EXCEPTION(\"Result of project out on CCPairFunction<T,NDIM> was not initialized\",\n                                                       1);\n    return result;\n}\n\n// result is: <x|op12|f>_particle\ntemplate<typename T, std::size_t NDIM>\nFunction<T,CCPairFunction<T,NDIM>::LDIM>\nCCPairFunction<T,NDIM>::dirac_convolution(const CCFunction<T,LDIM>& x, const CCConvolutionOperator<T,CCPairFunction<T,NDIM>::LDIM>& op, const size_t particle) const {\n    Function<T,CCPairFunction<T,NDIM>::LDIM> result;\n    if (is_pure()) {\n        result = op(x, pure().get_function(), particle);\n    } else if (is_decomposed_no_op()) {\n        result = dirac_convolution_decomposed(x, op, particle);\n    } else {\n        MADNESS_EXCEPTION(\"op_decomposed dirac convolution not yet implemented\", 1);\n    }\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nCCPairFunction<T,NDIM> CCPairFunction<T,NDIM>::partial_inner(const CCPairFunction<T,NDIM>& other,\n                                               const std::array<int, CCPairFunction<T,NDIM>::LDIM>& v1,\n                                               const std::array<int, CCPairFunction<T,NDIM>::LDIM>& v2) const {\n    auto a012=std::array<int,LDIM>();\n    auto a345=std::array<int,LDIM>();\n    for (size_t i=0; i<LDIM; ++i) {\n        a012[i]=i;\n        a345[i]=i+LDIM;\n    }\n    MADNESS_CHECK(v1==a012 or v1== a345);\n    MADNESS_CHECK(v2==a012 or v2== a345);\n    MADNESS_CHECK(not this->is_op_pure()); // not implemented yet\n    MADNESS_CHECK(not other.is_op_pure()); // not implemented yet\n\n    auto integration_index=[&a012](auto v) {return (v==a012) ? 0l : 1l;};\n    auto remaining_index=[&integration_index](auto v) {return (integration_index(v)+1)%2;};\n\n    CCPairFunction<T,NDIM> result;\n    if (this->is_pure()) {\n        if (other.is_pure()) {\n            Function<T,NDIM> tmp=madness::innerXX<NDIM>(this->get_function(),other.get_function(),v1,v2);\n            return CCPairFunction<T,NDIM>(tmp);\n\n        } else if (other.is_decomposed_no_op()) {\n            // \\int \\sum_i f(1,2) a_i(1) b_i(3) d1  =  \\sum_i b_i(3) \\int a_i(1) f(1,2) d1\n            std::vector<Function<T,LDIM>> tmp;\n            auto avec=other.get_vector(integration_index(v2));\n            change_tree_state(avec,redundant);\n            for (auto& a : other.get_vector(integration_index(v2))) {\n//                tmp.push_back(innerXX<3>(this->get_function(),a,v1,a012));  // a012 is correct, referring to 3D function\n                tmp.push_back(this->get_function().project_out(a,integration_index(v1)));\n            }\n            return CCPairFunction<T,NDIM>(tmp,other.get_vector(remaining_index(v2)));\n\n        } else if (other.is_op_decomposed()) {\n\n            // \\int \\sum_i h(1,2) f(1,3) c_i(1) d_i(3) d1\n            //  = \\sum_i d_i(3) \\int h_c_i(1,2) f(1,3) d1\n            //  = \\sum_i d_i(3) H_i(3,2)\n            const auto& h=this->pure().get_function();\n            const auto& c=other.get_vector(integration_index(v2));\n            const auto& d=other.get_vector(remaining_index(v2));\n            auto& op=*(other.get_operator().get_op());\n            op.particle()=integration_index(v1)+1;\n\n            const std::vector<Function<T,NDIM>> tmp=partial_mul(h,c,integration_index(v1)+1);\n            auto H=madness::apply(world(),op,tmp);\n            Function<T,NDIM> result=FunctionFactory<T,NDIM>(world());\n//            const vector_real_function_6d result=partial_mul(H,d,integration_index(v1)+1);\n            for (size_t i=0; i<H.size(); ++i) {\n                result+=multiply(H[i],d[i],integration_index(v1)+1);\n            }\n            return CCPairFunction<T,NDIM>(result);\n        } else {\n            MADNESS_EXCEPTION(\"confused CCPairFunction<T,NDIM>\",1);\n        }\n\n    } else if (this->is_decomposed_no_op()) {\n        if (other.is_pure()) {\n            return other.partial_inner(*this,v2,v1);\n        } else if (other.is_decomposed_no_op()) {\n            // \\int \\sum_i a_i(1) b_i(2) \\sum_j c_j(1) d_j(3) d1\n            //    =  \\sum_ij  <a_i|c_j>  b_i(2) d_j(3)\n            //    =  \\sum_i  b~_i(2) d~_i(3)        // SVD decomposition of S_ac\n            Tensor<T> ovlp=matrix_inner(world(),this->get_vector(integration_index(v1)),other.get_vector(integration_index(v2)));\n            Tensor< typename Tensor<T>::scalar_type > s;\n            Tensor<T> U,VT;\n            svd(ovlp,U,s,VT);\n            for (int i=0; i<s.size(); ++i) U(_,i)*=s(i);\n            auto left=transform(world(),this->get_vector(remaining_index(v1)),U);\n            auto right=transform(world(),other.get_vector(remaining_index(v2)),transpose(VT));\n            return CCPairFunction<T,NDIM>(left,right);\n\n        } else if (other.is_op_decomposed()) {\n            // \\int \\sum_ij a_i(1) b_i(2) f(1,3) c_j(1) d_j(3) d1\n            //   = \\sum_ij b_i(2) d_j(3) \\int ac_ij(1) f(1,3) d1\n            //   = \\sum_i b_i(2) \\sum_j d_j(3) g_ij(3)\n            //   = \\sum_i b_i(2) h_i(3)\n            const auto& a=this->get_vector(integration_index(v1));\n            const auto& b=this->get_vector(remaining_index(v1));\n            const auto& c=other.get_vector(integration_index(v2));\n            const auto& d=other.get_vector(remaining_index(v2));\n            const auto& op=*(other.get_operator().get_op());\n            std::decay_t<decltype(a)> h(a.size());        // /same type as a, without reference&\n            for (size_t i=0; i<a.size(); ++i) {\n                const auto ac=a[i]*c;\n                const auto g=madness::apply(world(),op,ac);\n                h[i]=dot(world(),d,g);\n            }\n            return CCPairFunction<T,NDIM>(b,h);\n        } else {\n            MADNESS_EXCEPTION(\"confused CCPairFunction<T,NDIM>\",1);\n        }\n\n    } else if (this->is_op_decomposed()) {\n        if (other.is_pure()) {\n            return other.partial_inner(*this,v2,v1);\n        } else if (other.is_decomposed_no_op()) {\n            return other.partial_inner(*this,v2,v1);\n        } else if (other.is_op_decomposed()) {\n            if (this->is_convertible_to_pure_no_op()) {\n                CCPairFunction<T,NDIM> tmp=copy(*this);\n                tmp.convert_to_pure_no_op_inplace();\n                return tmp.partial_inner(other,v1,v2);\n            } else if (other.is_convertible_to_pure_no_op()) {\n                CCPairFunction<T,NDIM> tmp=copy(other);\n                tmp.convert_to_pure_no_op_inplace();\n                return this->partial_inner(tmp,v1,v2);\n            } else {\n                MADNESS_EXCEPTION(\"no partial_inner for this combination: <op_decomposed|op_decomposed>\",1);\n            }\n        } else {\n            MADNESS_EXCEPTION(\"confused CCPairFunction<T,NDIM>\",1);\n        }\n    } else {\n        MADNESS_EXCEPTION(\"confused CCPairFunction<T,NDIM>\",1);\n    }\n    return result;\n\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,CCPairFunction<T,NDIM>::LDIM> CCPairFunction<T,NDIM>::partial_inner(\n        const Function<T,CCPairFunction<T,NDIM>::LDIM>& f,\n        const std::array<int, CCPairFunction<T,NDIM>::LDIM>& v1,\n        const std::array<int, CCPairFunction<T,NDIM>::LDIM >& v2) const {\n//    auto a012=std::array<int,LDIM>{0,1,2};\n//    auto a345=std::array<int,LDIM>{3,4,5};\n    auto a012=std::array<int,LDIM>();\n    auto a345=std::array<int,LDIM>();\n    for (size_t i=0; i<LDIM; ++i) {\n        a012[i]=i;\n        a345[i]=i+LDIM;\n    }\n    MADNESS_CHECK(v2==a012 ); // only 3 dimension in f\n    MADNESS_CHECK(v1==a012 or v1== a345); // 6 dimension in f\n    MADNESS_CHECK(not this->is_op_pure()); // not implemented yet\n    int particle=-1;\n    if (v1== a012) particle=0;\n    if (v1== a345) particle=1;\n\n    Function<T,CCPairFunction<T,NDIM>::LDIM> result;\n\n    if (is_pure()) {\n        result = pure().get_function().project_out(f, particle);\n    } else if (is_decomposed_no_op()) {\n        result = project_out_decomposed(f, particle+1);\n    } else if (is_op_decomposed()) {\n        result = project_out_op_decomposed(f, particle+1);\n    } else {\n        MADNESS_EXCEPTION(\"confused state in CCPairFunction<T,NDIM>::partial_inner\",1);\n    }\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,CCPairFunction<T,NDIM>::LDIM> CCPairFunction<T,NDIM>::project_out_decomposed(\n        const Function<T,LDIM>& f, const size_t particle) const {\n    World& world=f.world();\n    Function<T,LDIM> result = FunctionFactory<T,LDIM>(world);\n    const std::pair<std::vector<Function<T,LDIM>>, std::vector<Function<T,LDIM>>> decompf = assign_particles(particle);\n    Tensor<double> c = inner(world, f, decompf.first);\n    for (size_t i = 0; i < get_a().size(); i++) result += c(i) * decompf.second[i];\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,CCPairFunction<T,NDIM>::LDIM> CCPairFunction<T,NDIM>::project_out_op_decomposed(const CCFunction<T,LDIM>& f, const size_t particle) const {\n    World& world=f.get().world();\n    const CCConvolutionOperator<T,LDIM>& op=*decomposed().get_operator_ptr();\n    if (particle == 1) {\n//        return op(f, get_a()[0]) * get_b()[0];\n        // result(2) = < f(1) | op(1,2) | a_i(1) b_i(2) >\n        return sum(world,mul(world,op(f.f()* get_a()),get_b()));\n    } else if (particle == 2) {\n//        return op(f, get_b()[0]) * get_a()[0];\n        return sum(world,mul(world,op(f.f()* get_b()),get_a()));\n    } else {\n        MADNESS_EXCEPTION(\"project_out_op_decomposed: particle must be 1 or 2\", 1);\n        return FunctionFactory<T,LDIM>(world);\n    }\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,CCPairFunction<T,NDIM>::LDIM> CCPairFunction<T,NDIM>::dirac_convolution_decomposed(const CCFunction<T,LDIM>& bra,\n                                                                      const CCConvolutionOperator<T,LDIM>& op,\n                                                              const size_t particle) const {\n    World& world=bra.function.world();\n    const std::pair<std::vector<Function<T,LDIM>>, std::vector<Function<T,LDIM>>> f = assign_particles(particle);\n    const std::vector<Function<T,LDIM>> braa = mul(world, bra.function, f.first);\n    const std::vector<Function<T,LDIM>> braga = op(braa);\n    Function<T,LDIM> result = FunctionFactory<T,LDIM>(world);\n    for (size_t i = 0; i < braga.size(); i++) result += braga[i] * f.second[i];\n    return result;\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nconst std::pair<std::vector<Function<T,CCPairFunction<T,NDIM>::LDIM>>, std::vector<Function<T,CCPairFunction<T,NDIM>::LDIM>>>\nCCPairFunction<T,NDIM>::assign_particles(const size_t particle) const {\n    if (particle == 1) {\n        return std::make_pair(get_a(), get_b());\n    } else if (particle == 2) {\n        return std::make_pair(get_b(), get_a());\n    } else {\n        MADNESS_EXCEPTION(\"project_out_decomposed: Particle is neither 1 nor 2\", 1);\n        return std::make_pair(get_a(), get_b());\n    }\n}\n\n/// compute the inner product of this and other\n\n/// there are 4 possible components: pure/decomposed with and without operator, gives us 16 pair combinations..\ntemplate<typename T, std::size_t NDIM>\ndouble CCPairFunction<T,NDIM>::inner_internal(const CCPairFunction<T,NDIM>& other, const Function<T,LDIM>& R2) const {\n    const CCPairFunction<T,NDIM>& f1=*this;\n    const CCPairFunction<T,NDIM>& f2=other;\n\n    double result = 0.0;\n    if (f1.is_pure() and f2.is_pure()) {        // these are 4 combinations pure/pure\n        pureT bra=f1.get_function();\n        pureT ket=f2.get_function();\n        // include the operator(s), if any\n        auto op=combine(f1.get_operator_ptr(),f2.get_operator_ptr());\n        Function<T,NDIM> tmp1;\n        if (op) {\n            if (R2.is_initialized()) {\n                tmp1 = CompositeFactory<T,NDIM,LDIM>(world()).g12(op->get_kernel()).ket(ket).particle1(R2).particle2(R2);\n            } else {\n                tmp1 = CompositeFactory<T,NDIM,LDIM>(world()).g12(op->get_kernel()).ket(ket);\n            }\n        } else {\n            if (R2.is_initialized()) {\n                tmp1 = CompositeFactory<T,NDIM,LDIM>(world()).ket(ket).particle1(R2).particle2(R2);\n            } else {\n                tmp1 = CompositeFactory<T,NDIM,LDIM>(world()).ket(ket);\n            }\n        }\n        result=inner(bra,tmp1);\n    } else if (f1.is_pure() and f2.is_decomposed()) {       // with or without operator\n        const std::vector<Function<T,LDIM>> a = R2.is_initialized() ? R2 * f2.get_a() : copy(world(), f2.get_a());\n        const std::vector<Function<T,LDIM>> b = R2.is_initialized() ? R2 * f2.get_b() : copy(world(), f2.get_b());\n        const pureT& bra=f1.get_function();\n\n        auto op=combine(f1.get_operator_ptr(),f2.get_operator_ptr());\n        if (op) {\n            double bla=0.0;\n            for (size_t i=0; i<a.size(); ++i) {\n                Function<T,NDIM> tmp = CompositeFactory<T,NDIM,LDIM>(world()).g12(op->get_kernel()).particle1(a[i]).particle2(b[i]);\n                bla += inner(bra, tmp);\n            }\n            result+=bla;\n        } else { // no operators\n            for (size_t i=0; i<a.size(); ++i) {\n                Function<T,NDIM> tmp = CompositeFactory<T,NDIM,LDIM>(world()).particle1(a[i]).particle2(b[i]);\n                result+=inner(bra,tmp);\n            }\n        }\n    } else if (f1.is_decomposed() and f2.is_pure()) {     // with or without op\n        result= f2.inner_internal(f1,R2);\n\n    } else if (f1.is_decomposed() and f2.is_decomposed()) {\n        MADNESS_ASSERT(f1.get_a().size() == f1.get_b().size());\n        MADNESS_ASSERT(f2.get_a().size() == f2.get_b().size());\n\n        const std::vector<Function<T,LDIM>>& a1 = f1.get_a();\n        const std::vector<Function<T,LDIM>>& b1 = f1.get_b();\n        const std::vector<Function<T,LDIM>> a2 = R2.is_initialized() ?  R2* f2.get_a() : f2.get_a();\n        const std::vector<Function<T,LDIM>> b2 = R2.is_initialized() ?  R2* f2.get_b() : f2.get_b();\n\n\n//        MADNESS_EXCEPTION(\"still to debug\",1);\n        auto op=combine(f1.get_operator_ptr(),f2.get_operator_ptr());\n        if (not op) {\n            // <p1 | p2> = \\sum_ij <a_i b_i | a_j b_j> = \\sum_ij <a_i|a_j> <b_i|b_j>\n            result = (matrix_inner(world(), a1, a2)).trace(matrix_inner(world(),b1,b2));\n        } else {\n            // <a_i b_i | op | a_j b_j>  =  <a_i * a_j | op(b_i*b_j) >\n            result=0.0;\n            for (size_t i = 0; i < a1.size(); i++) {\n                std::vector<Function<T,LDIM>> aa = truncate(a1[i] * a2);\n                std::vector<Function<T,LDIM>> bb = truncate(b1[i] * b2);\n                std::vector<Function<T,LDIM>> aopx = (*op)(aa);\n                result +=  inner(bb, aopx);\n            }\n        }\n    } else MADNESS_EXCEPTION(\n            (\"CCPairFunction<T,NDIM> Overlap not supported for combination \" + f1.name() + \" and \" + f2.name()).c_str(), 1) ;\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> CCPairFunction<T,NDIM>::apply(const ProjectorBase& projector, const std::vector<CCPairFunction<T,NDIM>>& argument) {\n    if (argument.size()==0) return argument;\n    World& world=argument.front().world();\n    constexpr std::size_t LDIM=CCPairFunction<T,NDIM>::LDIM;\n//    print(\"apply projector on argument with terms\",argument.size());\n    if (auto P=dynamic_cast<const Projector<double,LDIM>*>(&projector)) {\n        MADNESS_CHECK_THROW(P->get_particle()==0 or P->get_particle()==1,\"P Projector particle must be 0 or 1 in CCPairFunction<T,NDIM>\");\n    }\n    if (auto Q=dynamic_cast<const QProjector<double,LDIM>*>(&projector)) {\n        MADNESS_CHECK_THROW(Q->get_particle()==0 or Q->get_particle()==1,\"Q Projector particle must be 0 or 1 in CCPairFunction<T,NDIM>\");\n    }\n    std::vector<CCPairFunction<T,NDIM>> result;\n    for (const auto& pf : argument) {\n        if (pf.is_pure()) {\n            MADNESS_CHECK(not pf.has_operator()); // not yet implemented\n            if (auto SO=dynamic_cast<const StrongOrthogonalityProjector<double,LDIM>*>(&projector)) {\n                auto tmp=(*SO)(pf.get_function());\n                auto tmp2=CCPairFunction<T,NDIM>(tmp);\n                result.push_back(tmp2);\n            } else if (auto P=dynamic_cast<const Projector<double,LDIM>*>(&projector)) {\n                // result.push_back(CCPairFunction<T,NDIM>((*P)(pf.get_function())));\n                auto [left,right]=P->get_vectors_for_outer_product(pf.get_function());\n                result.push_back(CCPairFunction<T,NDIM>(left,right));\n\n\n            } else if (auto Q=dynamic_cast<const QProjector<double,LDIM>*>(&projector)) {\n                // result.push_back(CCPairFunction<T,NDIM>((*Q)(pf.get_function())));\n                result.push_back(pf);\n                result.push_back(-1.0*Q->get_P_projector()(pf));\n\n            } else {\n                MADNESS_EXCEPTION(\"CCPairFunction<T,NDIM>: unknown projector type\",1);\n            }\n        } else if (pf.is_decomposed_no_op()) {  // pair function is sum_i | a_i b_i >\n            if (auto SO=dynamic_cast<const StrongOrthogonalityProjector<double,LDIM>*>(&projector)) {\n                // Q12 | kl > = (1-O1)(1-O2) |kl> = |(1-O1)k (1-O2)l>\n                QProjector<double,LDIM> Q1(SO->bra1(),SO->ket1());\n                QProjector<double,LDIM> Q2(SO->bra2(),SO->ket2());\n                result.push_back(CCPairFunction<T,NDIM>(Q1(pf.get_a()),Q2(pf.get_b())));\n\n            } else if (auto P=dynamic_cast<const Projector<double,LDIM>*>(&projector)) {\n                // P1 | kl > = P1 |kl> = |P1 k l>\n                if (P->get_particle()==0) result.push_back(CCPairFunction<T,NDIM>((*P)(pf.get_a()),pf.get_b()));\n                // P2 | kl > = P2 |kl> = |k P2 l>\n                if (P->get_particle()==1) result.push_back(CCPairFunction<T,NDIM>(pf.get_a(),(*P)(pf.get_b())));\n\n            } else if (auto Q=dynamic_cast<const QProjector<double,LDIM>*>(&projector)) {\n                // Q1 | kl > = Q1 |kl> = |Q1 k l>\n                if (Q->get_particle()==0) result.push_back(CCPairFunction<T,NDIM>((*Q)(pf.get_a()),pf.get_b()));\n                // P2 | kl > = Q2 |kl> = |k Q2 l>\n                if (Q->get_particle()==1) result.push_back(CCPairFunction<T,NDIM>(pf.get_a(),(*Q)(pf.get_b())));\n            } else {\n                MADNESS_EXCEPTION(\"CCPairFunction<T,NDIM>: unknown projector type\",1);\n            }\n        } else if (pf.is_op_decomposed()) {\n            if (auto SO=dynamic_cast<const StrongOrthogonalityProjector<double,LDIM>*>(&projector)) {\n//                CCTimer t(world,\"SO block\");\n                // Q12 = 1 - O1 (1 - 1/2 O2) - O2 (1 - 1/2 O1)\n//                print(\"entering SO block\");\n                QProjector<double,LDIM> Q1(SO->bra1(),SO->ket1());\n                Q1.set_particle(0);\n                QProjector<double,LDIM> Q2(SO->bra2(),SO->ket2());\n                Q2.set_particle(1);\n\n                Projector<double,LDIM> O1(SO->bra1(),SO->ket1());\n                O1.set_particle(0);\n                Projector<double,LDIM> O2(SO->bra2(),SO->ket2());\n                O2.set_particle(1);\n\n//                auto arg=std::vector<CCPairFunction<T,NDIM>>({pf});\n//                auto o1arg=O1(arg);\n//                auto o2arg=O2(arg);\n//                auto o1o2arg=O1(o2arg);\n//\n//                result.push_back(pf);\n//                for (auto& t: o1arg) result.push_back(-1.0*t);\n//                for (auto& t: o2arg) result.push_back(-1.0*t);\n//                for (auto& t: o1o2arg) result.push_back(t);\n\n\n                auto tmp=Q1(Q2(std::vector<CCPairFunction<T,NDIM>>({pf})));\n//                auto tmp=Q2(Q1(std::vector<CCPairFunction<T,NDIM>>({pf})));\n//                print(\"result of SO\");\n//                for (auto& t: tmp) t.print_size();\n                for (auto& t: tmp) result.push_back(t);\n//                for (auto& t: result) t.print_size();\n\n            } else if (auto P=dynamic_cast<const Projector<double,LDIM>*>(&projector)) {\n//                CCTimer t(world,\"P block\");\n//                print(\"entering P block\");\n                std::vector<Function<T,LDIM>> tmp= zero_functions_compressed<double,LDIM>(world,P->get_ket_vector().size());\n\n                // per term a_i b_i:\n                // P1 f |a b> = \\sum_k |k(1)> |f_ak(2)*b(2)>\n                for (std::size_t i=0; i<pf.get_a().size(); ++i) {\n                    Function<T,LDIM> a=pf.get_a()[i];\n                    Function<T,LDIM> b=pf.get_b()[i];\n                    if (P->get_particle()==1) std::swap(a,b);\n\n                    std::vector<Function<T,LDIM>> ka=a*P->get_bra_vector();\n                    SeparatedConvolution<T,LDIM>& op=*(pf.get_operator().get_op());\n                    std::vector<Function<T,LDIM>> f_ka=madness::apply(world,op,ka);\n                    std::vector<Function<T,LDIM>> b_f_ka=f_ka*b;\n                    tmp+=b_f_ka;\n                }\n                truncate(world,tmp);\n//                print(\"size of tmp\",tmp.size());\n\n                if (P->get_particle()==0) result.push_back(CCPairFunction<T,NDIM>(P->get_ket_vector(),tmp));\n                if (P->get_particle()==1) result.push_back(CCPairFunction<T,NDIM>(tmp,P->get_ket_vector()));\n//                t.print();\n\n            } else if (auto Q=dynamic_cast<const QProjector<double,LDIM>*>(&projector)) {\n//                CCTimer t(world,\"Q block\");\n                // Q1 f12 |a_i b_i> = f12 |a_i b_i> - \\sum_k |k(1) a_i(2)*f_(kb_i)(2) >\n                result.push_back(pf);\n//                print(\"entering Q block\");\n                // reuse the projector code above\n                std::vector<CCPairFunction<T,NDIM>> tmp=madness::apply(Q->get_P_projector(),std::vector<CCPairFunction<T,NDIM>>(1,pf));\n//                for (auto& t : tmp) t.print_size();\n                for (auto& t : tmp) {\n                    t*=-1.0;\n                    result.push_back(t);\n                }\n//                t.print();\n\n            } else {\n                MADNESS_EXCEPTION(\"CCPairFunction<T,NDIM>: unknown projector type\",1);\n            }\n\n        } else {\n            MADNESS_EXCEPTION(\"confused type in CCPairFunction<T,NDIM>\",1);\n        }\n\n    }\n//    print(\"working on \",argument[0].name(),\"with \",(&projector)->type(),\": result has\",result.size(),\"components\");\n    return result;\n};\n\n\ntemplate class CCPairFunction<double,6>;\ntemplate class CCPairFunction<double,4>;\ntemplate class CCPairFunction<double,2>;\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/chem/ccpairfunction.h",
    "content": "//\n// Created by Florian Bischoff on 6/27/22.\n//\n\n#ifndef MADNESS_CCPAIRFUNCTION_H\n#define MADNESS_CCPAIRFUNCTION_H\n\n\n\n#include <madness/mra/mra.h>\n#include<madness/world/timing_utilities.h>\n#include<madness/mra/commandlineparser.h>\n#include<madness/mra/QCCalculationParametersBase.h>\n#include <algorithm>\n#include <iomanip>\n#include <madness/mra/macrotaskq.h>\n\nnamespace madness {\n\ntemplate<typename T, std::size_t NDIM>\nclass CCConvolutionOperator;\nclass ProjectorBase;\n\n/// FuncTypes used by the CC_function_6d structure\n/// Types of Functions used by CC_function class\nenum FuncType { UNDEFINED, HOLE, PARTICLE, MIXED, RESPONSE };\n\ninline std::string name(const FuncType& type, const int ex=-1) {\n    if (type == PARTICLE) return \"tau\";\n    else if (type == HOLE) return \"phi\";\n    else if (type == MIXED) return \"t\";\n    else if (type == RESPONSE) {\n        MADNESS_CHECK_THROW(ex>=0,\"ex must be >=0\");\n        return std::to_string(ex) + \"_\" + \"x\";\n    }\n    else {\n        MADNESS_EXCEPTION(\"unknown FuncType\",1);\n    }\n    return \"undefined\";\n}\n\n/// structure for a CC Function 3D which holds an index and a type\n// the type is defined by the enum FuncType (definition at the start of this file)\ntemplate<typename T=double, std::size_t NDIM=3>\nclass CCFunction : public archive::ParallelSerializableObject {\npublic:\n    CCFunction() : current_error(99), i(99), type(UNDEFINED) {};\n\n    CCFunction(const Function<T,NDIM>& f) : current_error(99), function(f), i(99), type(UNDEFINED) {};\n\n//    CCFunction(const Function<T,NDIM>& f, const size_t& ii) : current_error(99), function(f), i(ii), type(UNDEFINED) {};\n//\n    CCFunction(const Function<T,NDIM>& f, const size_t& ii, const FuncType& type_) : current_error(99), function(f),\n                                                                                     i(ii), type(type_) {};\n\n    CCFunction(const CCFunction& other) : current_error(other.current_error), function(other.function), i(other.i),\n                                          type(other.type) {};\n\n    /// deep copy\n    friend CCFunction copy(const CCFunction& other) {\n        CCFunction tmp;\n        tmp.current_error=other.current_error;\n        tmp.function=madness::copy(other.function);\n        tmp.i=other.i;\n        tmp.type=other.type;\n        return tmp;\n    }\n\n    double current_error;\n    Function<T,NDIM> function;\n\n    Function<T,NDIM> get() const { return function; }\n\n    Function<T,NDIM> f() const { return function; }\n\n    void set(const Function<T,NDIM>& other) { function = other; }\n\n    size_t i;\n    FuncType type;\n\n    void info(World& world, const std::string& msg = \" \") const {\n        if (world.rank() == 0) {\n            std::cout << \"Information about 3D function: \" << name() << \" \" << msg << std::endl;\n            std::cout << std::setw(10) << std::setfill(' ') << std::setw(50) << \" |f|    : \" << function.norm2()\n                      << std::endl;\n            std::cout << std::setw(10) << std::setfill(' ') << std::setw(50) << \" |error|: \" << current_error << std::endl;\n        }\n    };\n\n    std::string name() const {\n        if (type == HOLE) {\n            return \"phi\" + stringify(i);\n        } else if (type == PARTICLE) {\n            return \"tau\" + stringify(i);\n        } else if (type == MIXED) {\n            return \"t\" + stringify(i);\n        } else if (type == RESPONSE) {\n            return \"x\" + stringify(i);\n        } else {\n            return \"function\" + stringify(i);\n        }\n    };\n\n    double inner(const CCFunction& f) const {\n        return inner(f.function);\n    }\n\n    double inner(const Function<T,NDIM>& f) const {\n        return function.inner(f);\n    }\n\n    /// scalar multiplication\n    CCFunction operator*(const double& fac) const {\n        Function<T,NDIM> fnew = fac * function;\n        return CCFunction(fnew, i, type);\n    }\n\n    // for convenience\n    bool operator==(const CCFunction& other) const {\n        if (i == other.i and type == other.type) return true;\n        else return false;\n    }\n\n    /// plotting\n    void plot(const std::string& msg = \"\") const {\n        plot_plane(function.world(), function, msg + name());\n    }\n\n    template<typename Archive>\n    void serialize(const Archive& ar) {\n        ar & type & i & current_error & function;\n    }\n};\n\n\nclass TwoBodyFunctionComponentBase {\npublic:\n    virtual void swap_particles_inplace() = 0;\n    virtual bool is_pure() const {return false;}\n    virtual bool is_decomposed() const {return false;}\n    virtual bool has_operator() const = 0;\n//    virtual void set_operator(const std::shared_ptr<CCConvolutionOperator> op) = 0;\n//    virtual const std::shared_ptr<CCConvolutionOperator> get_operator_ptr() const = 0;\n    virtual void print_size(const std::string name=\"\") const = 0;\n    virtual std::string name(const bool transpose=false) const = 0;\n    virtual World& world() const =0;\n    virtual std::shared_ptr<TwoBodyFunctionComponentBase> clone() = 0;\n    virtual ~TwoBodyFunctionComponentBase() {}\n    virtual hashT hash() const = 0;\n};\n\n/// a two-body, explicitly 6-dimensional function\ntemplate<typename T, std::size_t NDIM>\nclass TwoBodyFunctionPureComponent : public TwoBodyFunctionComponentBase {\n    static constexpr std::size_t LDIM=NDIM/2;\n    static_assert(NDIM%2==0,\"NDIM must be even\");\n\npublic:\n    TwoBodyFunctionPureComponent() = default;\n\n    explicit TwoBodyFunctionPureComponent(const Function<T,NDIM>& f) : u(f) {}\n    explicit TwoBodyFunctionPureComponent(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op, const Function<T,NDIM>& f)\n            : u(f), op(op) {}\n\n    /// deep copy\n    std::shared_ptr<TwoBodyFunctionComponentBase> clone() override {\n        TwoBodyFunctionPureComponent<T,NDIM> result(op,madness::copy(u));\n        return std::make_shared<TwoBodyFunctionPureComponent<T,NDIM>>(result);\n    }\n\n    template<typename Q>\n    TwoBodyFunctionPureComponent& operator*=(const Q fac) {\n        u.scale(fac);\n        return *this;\n    }\n\n    bool is_pure() const override {return true;}\n\n    bool has_operator() const override {return op!=nullptr;}\n\n    World& world() const override {return u.world();};\n\n    void print_size(const std::string name1=\"\") const override {\n        u.print_size(name1+name(false));\n    }\n\n    std::string name(const bool transpose) const override {\n        if (transpose) {\n            if (has_operator()) return \"< u |\"+get_operator_ptr()->name();\n            return \"< u |\";\n        }\n        if (has_operator()) return get_operator_ptr()->name() + \"| u >\";\n        return \"| u >\";\n    }\n\n\n//    template<typename Q, std::size_t MDIM>\n//    TwoBodyFunctionPureComponent operator*()(const Function<Q,MDIM>& g, const int particle=0) {}\n//\n    template<typename Q, std::size_t MDIM>\n    TwoBodyFunctionPureComponent apply(const SeparatedConvolution<Q,MDIM>* op, const int particle=0) {}\n\n    /// return f(2,1)\n    void swap_particles_inplace() override {\n        u=swap_particles(u);\n    }\n\n    const std::shared_ptr<CCConvolutionOperator<T,LDIM>> get_operator_ptr() const {return op;};\n\n    void set_operator(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op1) {op=op1;}\n\n    Function<T,NDIM>& get_function() {\n        return u;\n    }\n\n    hashT hash() const override {\n        hashT h1=hash_value(u.get_impl());\n        if (op) hash_combine(h1,hash_value(*op));\n        return h1;\n    }\n\nprivate:\n    /// pure 6D function\n    Function<T,NDIM> u;\n    std::shared_ptr<CCConvolutionOperator<T,LDIM>> op;\n\n};\n\n/// holds two vectors a and b of low-dimensional functions forming a high-dim function by a sum of outer products\n/// f(1,2) = sum_i |a_i b_i >\ntemplate<typename T, std::size_t NDIM>\nclass TwoBodyFunctionSeparatedComponent : public TwoBodyFunctionComponentBase {\n    static constexpr std::size_t LDIM=NDIM/2;\n    static_assert(NDIM%2==0,\"NDIM must be even\");\n\npublic:\n    TwoBodyFunctionSeparatedComponent() = default;\n\n    TwoBodyFunctionSeparatedComponent(const std::vector<Function<T,LDIM>>& a,\n                                      const std::vector<Function<T,LDIM>>& b) : a(a), b(b), op(nullptr) {};\n\n    TwoBodyFunctionSeparatedComponent(const std::vector<Function<T,LDIM>>& a,\n                                      const std::vector<Function<T,LDIM>>& b,\n                                      const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op) : a(a), b(b), op(op) {};\n\n    TwoBodyFunctionSeparatedComponent(const TwoBodyFunctionSeparatedComponent& other) = default;\n\n    /// deep copy\n    std::shared_ptr<TwoBodyFunctionComponentBase> clone() override {\n        TwoBodyFunctionSeparatedComponent<T,NDIM> result(madness::copy(world(),a),madness::copy(world(),b),op);\n        return std::make_shared<TwoBodyFunctionSeparatedComponent<T,NDIM>>(result);\n    }\n\n    template<typename Q>\n    TwoBodyFunctionSeparatedComponent& operator*=(const Q fac) {\n        if (a.size()>0 and a.front().is_initialized()) scale(a.front().world(),a,fac);\n        return *this;\n    }\n\n    bool is_decomposed() const override {return true;}\n    bool has_operator() const override {return op!=nullptr;}\n\n    World& world() const override {\n        MADNESS_ASSERT(a.size()>0 and a.front().is_initialized());\n        return a.front().world();\n    };\n\n    void print_size(const std::string name1=\"\") const override {\n        if (a.size() > 0) {\n            World& world = a.front().world();\n            madness::print_size(world, a, \"a from \" + name(false));\n            madness::print_size(world, b, \"b from \" + name(false));\n        }\n    }\n\n    std::string name(const bool transpose) const override {\n        if (transpose) {\n            if (has_operator()) return \"<ab |\"+get_operator_ptr()->name();\n            return \"<ab |\";\n        }\n        if (has_operator()) return get_operator_ptr()->name() + \"| ab>\";\n        return \"| ab>\";\n    };\n\n    void serialize() {}\n\n    hashT hash() const override {\n        hashT h1=0;\n        for (const auto& aa : a) hash_combine(h1,hash_value(aa.get_impl()));\n        for (const auto& bb : b) hash_combine(h1,hash_value(bb.get_impl()));\n        // print(\"hashvalue of TwoBodyFunctionSeparatedComponent: \",h1);\n\n        if (op) hash_combine(h1,hash_value(*op));\n        return h1;\n    }\n\n\n        template<typename Q, std::size_t MDIM>\n    TwoBodyFunctionPureComponent<T,NDIM> apply(const SeparatedConvolution<Q,MDIM>* op, const int particle=0) {\n        MADNESS_EXCEPTION(\"TwoBodyFunctionPureComponent<T> apply not yet implemented\",1);\n    }\n\n    /// return f(2,1)\n    void swap_particles_inplace() override {\n        std::swap(a,b);\n    }\n\n    long rank() const {\n        MADNESS_CHECK(a.size()==b.size());\n        return a.size();\n    }\n\n    std::vector<Function<T,LDIM>> get_a() const {return a;}\n    std::vector<Function<T,LDIM>> get_b() const {return b;}\n    std::vector<Function<T,LDIM>> get_vector(const int i) const {\n        MADNESS_CHECK(i==0 or i==1);\n        if (i==0) return a;\n        else if (i==1) return b;\n        else {\n            MADNESS_EXCEPTION(\"confused index in TwoBodyFunctionSeparatedComponent\",1);\n        }\n    }\n\n    const std::shared_ptr<CCConvolutionOperator<T,LDIM>> get_operator_ptr() const {return op;};\n\n    void set_operator(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op1) {op=op1;}\n\nprivate:\n\n    std::vector<Function<T,LDIM>> a;\n    std::vector<Function<T,LDIM>> b;\n    std::shared_ptr<CCConvolutionOperator<T,LDIM>> op;\n\n};\n\n\n\n\n/// Helper structure for the coupling potential of CC Singles and Doubles\n/// because of the regularization of the CC-Wavefunction (for CC2: |tauij> = |uij> + Qt12*f12*|titj>)\n/// we have 6D-functions in std format |u> : type==pure_\n/// we have 6D-functions in separated format: type==decomposed_ (e.g O1*f12*|titj> = |xy> with x=|k> and y=<k|f12|ti>*|tj>)\n/// we have 6D-function like f12|xy> which are not needed to be represented on the 6D MRA-Grid, type==op_decomposed_\n\n\n/** functionality\n *\n *  - ctor\n *  - assignment\n *  - add\n *  - scalar multiplication\n *  - inner\n *  - inner_partial\n *  - swap_particles\n *  - apply\n *  - apply_partial (i.e. exchange)\n *  - serialize\n *  - callapse_to_pure (excl g!)\n *  - mul_partial\n */\n\n/// a 6D function, either in full or low rank form, possibly including an 2-particle function\n\n/**\n * the function is stored as\n *  - pure: full rank form, 6D\n *  - op_pure: full rank form, 6D with an 2-particle function f(1,2) |u>\n *  - decomposed: sum of two vectors of 3D functions \\sum_i |a_i(1) b_i(2)>\n *  - op_decomposed: as above, with an 2-particle function: f(1,2) \\sum_i |a_i b_i>\n *\n**/\ntemplate<typename T=double, std::size_t NDIM=6>\nclass CCPairFunction : public archive::ParallelSerializableObject {\npublic:\n    static constexpr std::size_t LDIM=NDIM/2;\n    static_assert(NDIM%2==0,\"NDIM must be even\");\n\nusing pureT=Function<T,NDIM>;\n\npublic:\n\n    /// empty ctor\n    CCPairFunction() = default;\n\n    /// takes a shallow copy of the argument function\n    explicit CCPairFunction(const Function<T,NDIM>& ket) {\n        component.reset(new TwoBodyFunctionPureComponent<T,NDIM>(ket));\n    }\n\n    /// takes a shallow copy of the argument function\n    explicit CCPairFunction(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op_, const Function<T,NDIM>& ket) {\n        component.reset(new TwoBodyFunctionPureComponent<T,NDIM>(op_,ket));\n    }\n\n    /// takes a deep copy of the argument functions\n    explicit CCPairFunction(const std::vector<Function<T,LDIM>>& f1, const std::vector<Function<T,LDIM>>& f2) {\n        World& world=f1.front().world();\n        component.reset(new TwoBodyFunctionSeparatedComponent<T,NDIM>(copy(world,f1),copy(world,f2)));\n    }\n\n    /// takes a deep copy of the argument functions\n    explicit CCPairFunction(const Function<T,LDIM>& f1, const Function<T,LDIM>& f2) :\n            CCPairFunction(std::vector<Function<T,LDIM>>({f1}),std::vector<Function<T,LDIM>>({f2})) {\n    }\n\n    /// takes a deep copy of the argument functions\n    explicit CCPairFunction(const std::pair<std::vector<Function<T,LDIM>>, std::vector<Function<T,LDIM>>>& f) :\n            CCPairFunction(f.first,f.second) {\n    }\n\n    /// takes a deep copy of the argument functions\n    explicit CCPairFunction(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op_, const CCFunction<T,LDIM>& f1, const CCFunction<T,LDIM>& f2) :\n            CCPairFunction(op_,std::vector<Function<T,LDIM>>({f1.function}),std::vector<Function<T,LDIM>>({f2.function})) {\n    }\n\n    /// takes a deep copy of the argument functions\n    explicit CCPairFunction(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op_, const std::vector<Function<T,LDIM>>& f1,\n                            const std::vector<Function<T,LDIM>>& f2) {\n        World& world=f1.front().world();\n        component.reset(new TwoBodyFunctionSeparatedComponent<T,NDIM>(copy(world,f1),copy(world,f2),op_));\n    }\n\n    /// takes a deep copy of the argument functions\n    explicit CCPairFunction(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op_, const Function<T,LDIM>& f1,\n                            const Function<T,LDIM>& f2) : CCPairFunction(op_,std::vector<Function<T,LDIM>>({f1}),\n                                                                         std::vector<Function<T,LDIM>>({f2})) {\n    };\n\n    /// shallow assignment operator\n    CCPairFunction& operator()(const CCPairFunction& other) {\n        component=other.component;\n        return *this;\n    }\n\n    /// copy ctor -- shallow\n    CCPairFunction(const CCPairFunction& other) = default;\n\n    /// deep copy\n    friend CCPairFunction copy(const CCPairFunction& other) {\n        CCPairFunction result;\n        result.component=other.component->clone();\n        return result;\n    }\n\n    bool is_assigned() const {\n        return component.get();\n    }\n\n    friend hashT hash_value(const CCPairFunction& f) {\n        if (not f.is_assigned()) { return hashT(); }\n        return f.component->hash();\n    }\n\nprivate:\n    std::vector<CCPairFunction> consolidate(const std::vector<CCPairFunction>& other,\n                                                   const std::vector<std::string>& options,\n                                                   const std::vector<Vector<double,LDIM>>& centers) const;\n\n    /// turn decomposed functions with operator into decomposed functions using LowRankFunction\n    static std::vector<CCPairFunction> op_dec_to_dec(const std::vector<CCPairFunction>& other,\n                                                     const std::vector<Vector<double,LDIM>>& centers);\n\n    /// turn pure functions with operator into pure functions without operators\n    static std::vector<CCPairFunction> op_pure_to_pure(const std::vector<CCPairFunction>& other);\n\n    /// turn decomposed functions with operator into pure functions without operators\n    static std::vector<CCPairFunction> op_dec_to_pure(const std::vector<CCPairFunction>& other);\n\n    /// turn decomposed functions without operator into pure functions without operators\n    static std::vector<CCPairFunction> dec_to_pure(const std::vector<CCPairFunction>& other);\n\n    /// remove linear dependent terms in the low-rank parts\n    static std::vector<CCPairFunction> remove_linearly_dependent_terms(const std::vector<CCPairFunction>& other,\n        double thresh=-1.0);\n\n    static std::vector<CCPairFunction> collect_same_types(const std::vector<CCPairFunction>& other);\n\npublic:\n    // check if all types (pure. op_pure, decomposed, op_decomposed, with various ops) occur only once\n    static bool is_collected(const std::vector<CCPairFunction<T,NDIM>>& other);\n\n    /// collect the terms into a compact format\n\n    /// @param[in] other: a vector of CCPairFunctions\n    /// @param[in] options: a vector of strings which can be \"one_term\", \"op_pure_to_pure\", \"svd\"\n    /// @param[in] centers: a vector of 3D-vectors which are the centers of the grid for low-rank functions\n    /// TODO: implement a function for removing linearly dependent terms without orthonormalization\n    friend std::vector<CCPairFunction> consolidate(const std::vector<CCPairFunction>& other,\n                                                   const std::vector<std::string> options=std::vector<std::string>(),\n                                                   const std::vector<Vector<double,LDIM>> centers=std::vector<Vector<double,LDIM>>()) {\n\n        if (other.size()>0) return other.front().consolidate(other,options,centers); // workaround\n        return other;\n    };\n\n\n    void info() const { print_size(); }\n\n    World& world() const {\n        MADNESS_CHECK(component);\n        return component->world();\n    }\n\n    Function<T,NDIM>& get_function() {\n        MADNESS_CHECK(component and (component->is_pure()));\n        return pure().get_function();\n    }\n\n    Function<T,NDIM>& get_function() const {\n        MADNESS_CHECK(component and (component->is_pure()));\n        return pure().get_function();\n    }\n\n    /// make a deep copy and invert the sign\n    /// deep copy necessary otherwise: shallow copy errors\n    CCPairFunction invert_sign();\n\n    /// scalar multiplication: f*fac\n    CCPairFunction operator*(const double fac) const {\n        CCPairFunction result=copy(*this);\n        result*=fac;\n        return result;\n    }\n\n    /// scalar multiplication: fac*f\n    friend CCPairFunction operator*(const double fac, const CCPairFunction& f) {\n        return f*fac;\n    }\n\n    /// multiplication with a 2-particle function\n    friend CCPairFunction operator*(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op, const CCPairFunction& f) {\n        CCPairFunction result=copy(f);\n        return result.multiply_with_op_inplace(op);\n    }\n\n    /// multiplication with a 2-particle function\n    friend std::vector<CCPairFunction> operator*(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op,\n            const std::vector<CCPairFunction>& f) {\n        std::vector<CCPairFunction> result;\n        for (auto& ff : f) {\n            result.push_back(copy(ff));\n            result.back().multiply_with_op_inplace(op);\n        }\n        return result;\n    }\n\n    friend std::vector<CCPairFunction> multiply(const std::vector<CCPairFunction>& other, const Function<T,LDIM> f,\n                                                const std::array<int, LDIM>& v1) {\n        std::vector<CCPairFunction> result;\n        for (auto& o : other) {\n//            double cpu0=cpu_time();\n//            std::cout << \"multiply \" << o.name();\n            result.push_back(multiply(o,f,v1));\n//            double cpu1=cpu_time();\n//            std::cout << \" done after \" << cpu1-cpu0 << std::endl;\n        }\n        return result;\n    }\n\n    /// multiplication with a 2-particle function\n    CCPairFunction operator*(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op) {\n        CCPairFunction result=copy(*this);\n        return result.multiply_with_op_inplace(op);\n    }\n\n    CCPairFunction<T,NDIM>& multiply_with_op_inplace(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op);\n\n\n    bool has_operator() const {return component->has_operator();}\n    bool is_pure() const {return component->is_pure();}\n    bool is_op_pure() const {return is_pure() and has_operator();}\n    bool is_pure_no_op() const {return is_pure() and (not has_operator());}\n    bool is_decomposed() const {return component->is_decomposed();}\n    bool is_op_decomposed() const {return component->is_decomposed() and component->has_operator();}\n    bool is_decomposed_no_op() const {return component->is_decomposed() and (not component->has_operator());}\n\n    TwoBodyFunctionPureComponent<T,NDIM>& pure() const {\n        if (auto ptr=dynamic_cast<TwoBodyFunctionPureComponent<T,NDIM>*>(component.get())) return *ptr;\n        MADNESS_EXCEPTION(\"bad cast in TwoBodyFunction\",1);\n    }\n\n    TwoBodyFunctionSeparatedComponent<T,NDIM>& decomposed() const {\n        if (auto ptr=dynamic_cast<TwoBodyFunctionSeparatedComponent<T,NDIM>*>(component.get())) return *ptr;\n        MADNESS_EXCEPTION(\"bad cast in TwoBodyFunction\",1);\n    }\n\n    std::vector<Function<T,LDIM>> get_a() const {\n        MADNESS_CHECK(component->is_decomposed());\n        return decomposed().get_a();\n    }\n\n    std::vector<Function<T,LDIM>> get_b() const {\n        MADNESS_CHECK(component->is_decomposed());\n        return decomposed().get_b();\n    }\n\n    std::vector<Function<T,LDIM>> get_vector(const int i) const {\n        MADNESS_CHECK(component->is_decomposed());\n        return decomposed().get_vector(i);\n    }\n\n    const CCConvolutionOperator<T,LDIM>& get_operator() const {\n        MADNESS_CHECK(component and component->has_operator());\n        if (is_pure()) return *(pure().get_operator_ptr());\n        if (is_decomposed()) return *(decomposed().get_operator_ptr());\n        MADNESS_EXCEPTION(\"bad cast in TwoBodyFunction\",1);\n        return *(decomposed().get_operator_ptr());\n    }\n\n    const std::shared_ptr<CCConvolutionOperator<T,LDIM>> get_operator_ptr() const {\n        MADNESS_CHECK(component);\n        if (is_pure()) return (pure().get_operator_ptr());\n        if (is_decomposed()) return (decomposed().get_operator_ptr());\n        MADNESS_EXCEPTION(\"bad cast in TwoBodyFunction\",1);\n//        return component->get_operator_ptr();\n    }\n\n    void reset_operator(const std::shared_ptr<CCConvolutionOperator<T,LDIM>> op) {\n        MADNESS_CHECK(component);\n        if (is_pure()) pure().set_operator(op);\n        else if (is_decomposed()) decomposed().set_operator(op);\n        else {\n            MADNESS_EXCEPTION(\"bad cast in TwoBodyFunction\",1);\n        }\n    }\n\n    /// can this be converted to a pure representation (depends on the operator, if present)\n    bool is_convertible_to_pure_no_op() const;\n\n    /// out-of-place conversion to pure function\n    CCPairFunction to_pure() const {\n        auto tmp=copy(*this);\n        MADNESS_CHECK(tmp.is_convertible_to_pure_no_op());\n        tmp.convert_to_pure_no_op_inplace();\n        return tmp;\n    }\n\n    /// convert this into a pure hi-dim function\n    void convert_to_pure_no_op_inplace();\n\n    CCPairFunction& operator*=(const double fac) {\n        if (component->is_pure()) pure()*=fac;\n        if (component->is_decomposed()) decomposed()*=fac;\n        return *this;\n    }\n\n    /// print the size of the functions\n    void print_size(const std::string name1=\"\") const {\n        if (not component) {\n            print(\"CCPairFunction \"+name1+ \" not assigned\");\n        } else if (component->is_pure()) {\n            component->print_size(name1);\n        } else {\n            print(\"printing\",name1,name());\n            double wall=wall_time();\n            component->print_size();\n            double anorm=madness::norm2(world(),get_a());\n            double bnorm=madness::norm2(world(),get_b());\n            print(\"anorm, bnorm\",anorm,bnorm);\n            double norm=this->norm2();\n            std::size_t fsize=get_a().size();\n            constexpr std::size_t bufsize=128;\n            char buf[bufsize];\n            snprintf(buf, bufsize, \"%40s at time %.1fs: norm/  #functions: %7.5f %zu \\n\",\n                   ((name1+\" \"+name()).c_str()), wall, norm, fsize);\n            if (world().rank()==0) print(std::string(buf));\n        }\n\n    };\n\n    std::string name(const bool transpose=false) const {\n        if (not component) return \"empty\";\n        return component->name(transpose);\n    }\n\n    typename Tensor<T>::scalar_type norm2() const {\n        if (is_pure_no_op()) {\n            return pure().get_function().norm2();\n        } else if (is_op_pure()) {\n            double n2=inner(*this,*this);\n            if (n2<0.0) print(\"norm of \",name(),\" is < 0.0\");\n            return sqrt(std::max(0.0,n2));\n        } else if (component->is_decomposed()) {\n            Function<T,LDIM> R2;\n            auto tmp= inner_internal(*this,R2);\n            typename Tensor<T>::scalar_type result=std::real(tmp);\n            typename Tensor<T>::scalar_type imag=std::imag(tmp);\n            if ((imag>1.e-14) or (result<-1.e-14)) {\n                MADNESS_EXCEPTION(\"bad norm in TwoBodyFunction\",1);\n            }\n            return sqrt(std::abs(result));\n        }\n        MADNESS_EXCEPTION(\"bad cast in TwoBodyFunction\",1);\n        return 0.0;\n    }\n\n    /// multiply CCPairFunction with a 3D function of one of the two particles\n    friend CCPairFunction<T,NDIM> multiply(const CCPairFunction<T,NDIM>& other, const Function<T,LDIM>& f,\n                                           const std::array<int, LDIM>& v1) {\n        auto a012=std::array<int,LDIM>();\n        auto a345=std::array<int,LDIM>();\n        for (size_t i=0; i<LDIM; ++i) {\n            a012[i]=i;\n            a345[i]=i+LDIM;\n        }\n        int particle=-1;\n        if (v1== a012) particle=0;\n        if (v1== a345) particle=1;\n        MADNESS_CHECK(particle==0 or particle==1);\n        World& world=other.world();\n\n        if (other.is_decomposed()) {\n            if (particle == 0) {\n                return CCPairFunction<T,NDIM>(other.get_operator_ptr(), f * other.get_a(), copy(world, other.get_b()));\n            } else {\n                return CCPairFunction<T,NDIM>(other.get_operator_ptr(), copy(world, other.get_a()), f * other.get_b());\n            }\n        } else if (other.is_pure()) {\n            auto tmp=multiply(other.get_function(),f,particle+1);\n            return CCPairFunction<T,NDIM>(other.get_operator_ptr(),tmp);\n        } else  {\n            MADNESS_EXCEPTION(\"confused CCPairFunction<T,NDIM> in multiply\",1);\n        }\n    };\n\n    /// @param[in] f: a 3D-CC_function\n    /// @param[in] particle: the particle on which the operation acts\n    /// @param[out] <f|u>_particle (projection from 6D to 3D)\n    Function<T,LDIM> project_out(const CCFunction<T,LDIM>& f, const size_t particle) const;\n\n    /// result is: <x|op12|f>_particle\n\n    /// @param[in] x: a 3D-CC_function\n    /// @param[in] op: a CC_convoltion_operator which is currently either f12 or g12\n    /// @param[in] particle: the particle on which the operation acts (can be 1 or 2)\n    /// @param[out] the operator is applied and afterwards a convolution with the delta function makes a 3D-function: <x|op|u>_particle\n    Function<T,LDIM>\n    dirac_convolution(const CCFunction<T,LDIM>& x, const CCConvolutionOperator<T,LDIM>& op, const size_t particle) const;\n\n    /// @param[out] particles are interchanged, if the function was u(1,2) the result is u(2,1)\n    CCPairFunction swap_particles() const {\n        CCPairFunction result=copy(*this);\n        result.component->swap_particles_inplace();\n        return result;\n    };\n\n    double\n    make_xy_u(const CCFunction<T,LDIM>& xx, const CCFunction<T,LDIM>& yy) const;\n\n    /// compute the inner product of this and other\n    double inner_internal(const CCPairFunction& other, const Function<T,LDIM>& R2) const;\n\n    friend double inner(const CCPairFunction& a, const CCPairFunction& b, const Function<T,LDIM>& R2) {\n        return a.inner_internal(b,R2);\n    }\n\n    friend double inner(const CCPairFunction& a, const CCPairFunction& b) {\n        Function<T,LDIM> R2;\n        return a.inner_internal(b,R2);\n    }\n\n    friend double inner(const std::vector<CCPairFunction>& va, const std::vector<CCPairFunction>& vb,\n                        const Function<T,LDIM> R2=Function<T,LDIM>()) {\n        double wall0=cpu_time();\n//        Function<T,LDIM> R2;\n        double result=0.0;\n        for (auto& a : va) {\n            for (auto& b : vb) {\n                double tmp=a.inner_internal(b,R2);\n                double wall1=cpu_time();\n                constexpr std::size_t bufsize=256;\n                char buf[bufsize];\n                snprintf(buf,bufsize,\"result from inner %10s %10s %12.8f %4.1fs\",a.name(true).c_str(),b.name().c_str(),tmp,wall1-wall0);\n                print(std::string(buf));\n                wall0=wall1;\n                result+=tmp;\n            }\n        }\n        return result;\n    }\n\n\n    friend std::vector<CCPairFunction> swap_particles(const std::vector<CCPairFunction>& argument) {\n        std::vector<CCPairFunction> result;\n        for (auto& a : argument) result.push_back(a.swap_particles());\n        return result;\n    };\n\npublic:\n    /// the 3 types of 6D-function that occur in the CC potential which coupled doubles to singles\n    std::shared_ptr<TwoBodyFunctionComponentBase> component;\n\n    /// @param[in] f: a 3D-CC_function\n    /// @param[in] particle: the particle on which the operation acts\n    /// @param[out] <f|u>_particle (projection from 6D to 3D) for the case that u=|ab> so <f|u>_particle = <f|a>*|b> if particle==1\n    Function<T,LDIM> project_out_decomposed(const Function<T,LDIM>& f, const size_t particle) const;\n\n    /// @param[in] f: a 3D-CC_function\n    /// @param[in] particle: the particle on which the operation acts\n    /// @param[out] <f|u>_particle (projection from 6D to 3D) for the case that u=op|xy> so <f|u>_particle = <f|op|x>*|y> if particle==1\n    Function<T,LDIM> project_out_op_decomposed(const CCFunction<T,LDIM>& f, const size_t particle) const;\n\n    /// @param[in] x: a 3D-CC_function\n    /// @param[in] op: a CC_convoltion_operator which is currently either f12 or g12\n    /// @param[in] particle: the particle on which the operation acts (can be 1 or 2)\n    /// @param[out] the operator is applied and afterwards a convolution with the delta function makes a 3D-function: <x|op|u>_particle\n    /// in this case u=|ab> and the result is <x|op|u>_1 = <x|op|a>*|b> for particle==1\n    Function<T,LDIM>\n    dirac_convolution_decomposed(const CCFunction<T,LDIM>& x, const CCConvolutionOperator<T,LDIM>& op, const size_t particle) const;\n\n    /// small helper function that gives back (a,b) or (b,a) depending on the value of particle\n    const std::pair<std::vector<Function<T,LDIM>>, std::vector<Function<T,LDIM>>> assign_particles(const size_t particle) const;\n\n    static std::vector<CCPairFunction<T,NDIM>> apply(const ProjectorBase& P, const std::vector<CCPairFunction<T,NDIM>>& argument);\n    static std::vector<CCPairFunction<T,NDIM>> apply(const SeparatedConvolution<T,NDIM>& G, const CCPairFunction<T,NDIM>& argument);\n    static std::vector<CCPairFunction<T,NDIM>> apply(const SeparatedConvolution<T,NDIM>& G, const std::vector<CCPairFunction<T,NDIM>>& argument);\n\n\n    Function<T,LDIM> partial_inner(const Function<T,LDIM>& f,\n                                   const std::array<int, LDIM>& v1,\n                                   const std::array<int, LDIM>& v2) const;\n\n    CCPairFunction partial_inner(const CCPairFunction& other,\n                                   const std::array<int, LDIM>& v1,\n                                   const std::array<int, LDIM>& v2) const;\n\n};\n\nnamespace archive {\ntemplate <class archiveT, class T, std::size_t NDIM>\nstruct ArchiveLoadImpl< ParallelInputArchive<archiveT>, CCPairFunction<T,NDIM> > {\n    static inline void load(const ParallelInputArchive<archiveT>& ar, CCPairFunction<T,NDIM>& p) {\n        constexpr std::size_t LDIM=CCPairFunction<T,NDIM>::LDIM;\n        bool exists=false;\n        bool is_pure=false;\n        bool has_operator=false;\n        ar & exists;\n        if (exists) {\n            ar & is_pure & has_operator;\n            if (is_pure) {\n                Function<T,NDIM> f;\n                ar & f;\n                p=CCPairFunction<T,NDIM>(f);\n            } else {\n                std::size_t sz=0;\n                ar & sz;\n                std::vector<Function<T,LDIM>> a(sz),b(sz);\n                for (auto& aa : a) ar & aa;\n                for (auto& bb : b) ar & bb;\n                p=CCPairFunction<T,NDIM>(a,b);\n            }\n\n            // store construction parameters of the operator, not the operator itself\n            if (has_operator) {\n                auto param=typename CCConvolutionOperator<T,LDIM>::Parameters();\n                OpType type=OT_UNDEFINED;\n                ar & param & type;\n                auto op=std::make_shared<CCConvolutionOperator<T,LDIM>>(*ar.get_world(),type,param);\n                p.reset_operator(op);\n            }\n        }\n    }\n};\n\ntemplate <class archiveT, class T, std::size_t NDIM>\nstruct ArchiveStoreImpl< ParallelOutputArchive<archiveT>, CCPairFunction<T,NDIM> > {\n    static inline void store(const ParallelOutputArchive<archiveT>& ar, const CCPairFunction<T,NDIM>& f) {\n        bool exists=f.is_assigned();\n        ar & exists;\n        if (exists) {\n            ar & f.is_pure() & f.has_operator();\n            if (f.is_pure()) ar & f.get_function();\n            if (f.is_decomposed()) {\n                auto avec=f.get_a();\n                auto bvec=f.get_b();\n                ar & avec.size();\n                for (const auto& a : avec) ar & a;\n                for (const auto& b : bvec) ar & b;\n            }\n            // store construction parameters of the operator, not the operator itself\n            if (f.has_operator()) {\n                ar & f.get_operator().parameters & f.get_operator().type();\n            }\n        }\n    }\n};\n}\n\n/// apply the operator to the argument\n\n/// the operator is applied to one particle only, the other one is left untouched\n/// note the ordering of the particles, cf the corresponding comment in mra.h\n/// op.particle==1 :  op(f(x,y)) = op(x,x') f(x',y) = result(x,y);\n/// op.particle==2 :  op(f(x,y)) = op(y,y') f(x,y') = result(y,x);\ntemplate<typename T, std::size_t NDIM>\nCCPairFunction<T,NDIM> apply(const SeparatedConvolution<T,NDIM/2>& op, const CCPairFunction<T,NDIM>& arg) {\n    bool convert_to_pure=(arg.has_operator() or arg.is_pure());\n    CCPairFunction<T, NDIM> result;\n    World& world = arg.world();\n\n    if (convert_to_pure) {\n        auto tmp=arg.to_pure().get_function();\n        tmp=op(tmp);\n\n        result=(CCPairFunction<T,NDIM>(tmp));\n        // !! confusing ordering of the result variables!!\n        if (op.particle()==2) result=result.swap_particles();\n\n    } else if (arg.is_decomposed_no_op()) {\n        MADNESS_CHECK(op.particle()==1 or op.particle()==2);\n        if (op.particle()==1) {\n            auto tmp= madness::apply(world,op,arg.get_a());\n            result=(CCPairFunction<T,NDIM>(tmp,arg.get_b()));\n        } else if (op.particle()==2) {\n            auto tmp= madness::apply(world,op,arg.get_b());\n            result=(CCPairFunction<T,NDIM>(tmp,arg.get_a()));\n        }\n\n    } else {\n        MADNESS_CHECK_THROW(false,\"confused type in apply(CCPairFunction<T,NDIM>)\");\n    }\n\n    return result;\n}\n\n/// apply the operator to the argument\n\n/// the operator is applied to one particle only, the other one is left untouched\n/// note the ordering of the particles, cf the corresponding comment in mra.h\n/// op.particle==1 :  op(f(x,y)) = op(x,x') f(x',y) = result(x,y);\n/// op.particle==2 :  op(f(x,y)) = op(y,y') f(x,y') = result(y,x);\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> apply(const SeparatedConvolution<T,NDIM/2>& op, const std::vector<CCPairFunction<T,NDIM>>& argument) {\n    std::vector<CCPairFunction<T, NDIM>> result;\n    for (const auto& arg : argument) result.push_back(madness::apply(op, arg));\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nCCPairFunction<T,NDIM> apply(const SeparatedConvolution<T,NDIM>& G, const std::vector<CCPairFunction<T,NDIM>>& argument) {\n    CCPairFunction result;\n    for (const auto& a : argument) result+=G(a);\n    return result;\n}\n\n/// apply the operator on a CCPairfunction, both with the same dimension\n\n/// note there is another function, where the operator works only on some dimensions of the CCPairFunction!\n/// @return result(x) = \\int op(x,x') arg(x') dx': a CCPairfunction with the same dimension as the argument\ntemplate<typename T, std::size_t NDIM>\nCCPairFunction<T,NDIM> apply(const SeparatedConvolution<T,NDIM>& G, const CCPairFunction<T,NDIM>& argument) {\n    CCPairFunction result;\n    double n=argument.norm2();\n    print(\"applying G to \",argument.name(),\"with norm\",n);\n    print(\"G eps\",G.gamma());\n    timer t1(argument.world());\n    if (argument.is_pure()) {\n        result=CCPairFunction(G(argument.get_function()));\n    } else if (argument.is_decomposed_no_op()) {\n        MADNESS_ASSERT(argument.get_a().size() == argument.get_b().size());\n        Function<T,NDIM> result1=G(argument.get_a(), argument.get_b());\n        result=CCPairFunction(result1);\n    } else {\n        MADNESS_EXCEPTION(\"unknown type in CCPairFunction::apply\",1);\n    }\n    double n1=result.norm2();\n    print(\"result norm\",n1);\n    t1.end(\"applying G to \" + argument.name());\n    return result;\n};\n\n\n/// apply the projector on the argument function, potentially yielding a vector of CCPairfunctions as result\n\n/// result can be\n///  Q12 f12 |ij> = (1 - O1) (1 - O2) f12 i(1) j(2)\n///              = f12 ij - \\sum_k k(1) f_ik(2) j(2) - \\sum_k k(2) f_ij(1)j(1)\n/// which is a pure function and a decomposed function\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> apply(const ProjectorBase& projector, const std::vector<CCPairFunction<T,NDIM>>& argument) {\n    return CCPairFunction<T,NDIM>::apply(projector,argument);\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nCCPairFunction<T,NDIM> apply(const ProjectorBase& projector, const CCPairFunction<T,NDIM>& argument) {\n    auto result=madness::apply(projector,std::vector<CCPairFunction<T,NDIM>> (1,argument));\n    MADNESS_CHECK(result.size()==1);\n    return result[0];\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,CCPairFunction<T,NDIM>::LDIM>inner(const CCPairFunction<T,NDIM>& c, const Function<T,CCPairFunction<T,NDIM>::LDIM>& f,\n                                              const std::tuple<int,int,int> v1, const std::tuple<int,int,int> v2) {\n    constexpr std::size_t LDIM=CCPairFunction<T,NDIM>::LDIM;\n    auto v11=std::array<int,LDIM>({std::get<0>(v1),std::get<1>(v1),std::get<2>(v1)});\n    auto v22=std::array<int,LDIM>({std::get<0>(v2),std::get<1>(v2),std::get<2>(v2)});\n\n    return c.partial_inner(f,v11,v22);\n}\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,CCPairFunction<T,NDIM>::LDIM>inner(const CCPairFunction<T,NDIM>& c, const Function<T,CCPairFunction<T,NDIM>::LDIM>& f,\n                                              const std::array<int,CCPairFunction<T,NDIM>::LDIM>& v1,\n                                              const std::array<int,CCPairFunction<T,NDIM>::LDIM>& v2) {\n    return c.partial_inner(f,v1,v2);\n}\n\ntemplate<typename T, std::size_t NDIM>\nCCPairFunction<T,NDIM> inner(const CCPairFunction<T,NDIM>& c1, const CCPairFunction<T,NDIM>& c2,\n                             const std::tuple<int,int,int> v1, const std::tuple<int,int,int> v2) {\n    constexpr std::size_t LDIM=CCPairFunction<T,NDIM>::LDIM;\n    auto v11=std::array<int,LDIM>({std::get<0>(v1),std::get<1>(v1),std::get<2>(v1)});\n    auto v22=std::array<int,LDIM>({std::get<0>(v2),std::get<1>(v2),std::get<2>(v2)});\n\n    return c1.partial_inner(c2,v11,v22);\n}\n\ntemplate<typename T, std::size_t NDIM>\nCCPairFunction<T,NDIM> inner(const CCPairFunction<T,NDIM>& c1, const CCPairFunction<T,NDIM>& c2,\n                             const std::array<int,CCPairFunction<T,NDIM>::LDIM>& v1,\n                             const std::array<int,CCPairFunction<T,NDIM>::LDIM>& v2) {\n    return c1.partial_inner(c2,v1,v2);\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> inner(const std::vector<CCPairFunction<T,NDIM>>& c1,\n                                          const std::vector<CCPairFunction<T,NDIM>>& c2,\n                                          const std::tuple<int,int,int> v1, const std::tuple<int,int,int> v2) {\n    constexpr std::size_t LDIM=CCPairFunction<T,NDIM>::LDIM;\n    auto v11=std::array<int,LDIM>({std::get<0>(v1),std::get<1>(v1),std::get<2>(v1)});\n    auto v22=std::array<int,LDIM>({std::get<0>(v2),std::get<1>(v2),std::get<2>(v2)});\n    return inner(c1,c2,v11,v22);\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM>> inner(const std::vector<CCPairFunction<T,NDIM>>& c1,\n                                          const std::vector<CCPairFunction<T,NDIM>>& c2,\n                                          const std::array<int,CCPairFunction<T,NDIM>::LDIM>& v1,\n                                          const std::array<int,CCPairFunction<T,NDIM>::LDIM>& v2) {\n    std::vector<CCPairFunction<T,NDIM>> result;\n    for (const auto& cc1 : c1) {\n        for (const auto& cc2 : c2) {\n            print(\"inner of \",cc1.name(), cc2.name());\n            result.push_back(inner(cc1,cc2,v1,v2));\n        }\n    }\n    return result;\n}\n\ntemplate <typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM> > operator+(const std::vector<CCPairFunction<T,NDIM>> c1, const std::vector<CCPairFunction<T,NDIM> >& c2) {\n    std::vector<CCPairFunction<T,NDIM>> result;\n    for (const auto& l : c1) result.push_back(l);\n    for (const auto& l : c2) result.push_back(l);\n    return result;\n}\n\ntemplate <typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM> > operator-(const std::vector<CCPairFunction<T,NDIM>> c1, const std::vector<CCPairFunction<T,NDIM> >& c2) {\n    std::vector<CCPairFunction<T,NDIM>> result;\n    for (const auto& l : c1) result.push_back(l);\n    for (const auto& l : c2) result.push_back(-1.0*l);\n    return result;\n}\n\ntemplate <typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM> >& operator+=(std::vector<CCPairFunction<T,NDIM> >& lhs,\n        const CCPairFunction<T,NDIM >& rhs) {\n    lhs.push_back(rhs);\n    return lhs;\n}\n\ntemplate <typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM> >& operator+=(std::vector<CCPairFunction<T,NDIM> >& rhs,\n        const std::vector<CCPairFunction<T,NDIM> >& lhs) {\n    for (const auto& l : lhs) rhs.push_back(l);\n    return rhs;\n}\n\ntemplate <typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM> >& operator-=(std::vector<CCPairFunction<T,NDIM> >& rhs,\n        const std::vector<CCPairFunction<T,NDIM> >& lhs) {\n    for (const auto& l : lhs) rhs.push_back(-1.0*l);\n    return rhs;\n}\n\ntemplate <typename T, std::size_t NDIM>\nstd::vector<CCPairFunction<T,NDIM> > operator*(const double fac, const std::vector<CCPairFunction<T,NDIM> >& arg) {\n    std::vector<CCPairFunction<T,NDIM>> result;\n    for (const auto& l : arg) result.push_back(fac*l);\n    return result;\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nbool is_collected(const std::vector<CCPairFunction<T,NDIM>>& other) {\n    return CCPairFunction<T,NDIM>::is_collected(other);\n\n}\n} // namespace madness\n\n#endif //MADNESS_CCPAIRFUNCTION_H\n"
  },
  {
    "path": "src/madness/chem/cis_example_input",
    "content": "plot\n plane x1 x2\n zoom 1.0\n npoints 50\n origin 0.0 0.0 0.0\nend\n\ndft\n xc hf\n k 8\n econv 1.e-6\n dconv 5.e-6\n protocol 1.e-6\n canon\nend\n\nexcite\nlow_thresh 1.e-4\nhigh_thresh 1.e-5\nend\n\nTDA\n guess physical\n guess_exop C2v\n guess_iter 5\n guess_excitations 8\n excitations 7\n guess_omega 0.3225\n iter_max 30\n econv 5.e-4\n dconv 5.e-3\n hard_dconv 1.e-3\n nfreeze 1\n only_fock\n kain\n no_otf\nend\n\ngeometry\n  o    0.00000000000000      0.00000000000000     -0.12178983933899\n  h    1.41713420892173      0.00000000000000      0.96657854674257\n  h   -1.41713420892173      0.00000000000000      0.96657854674257\nend\n"
  },
  {
    "path": "src/madness/chem/coredata/mcp",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<core_info>\n    <atom id=\"Li\" symbol=\"Li\" atomic_number=\"3\">\n        <potential>\n            0    1    0.000000e+00    2.000000e+00\n            0    1    2.718422000000e+00    -1.717586728164e+00\n            0    1    1.061906000000e+00    1.418564696154e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"4.9554840\">\n            7.105793e+02    2.009533e-03\n            1.034368e+02    1.482329e-02\n            2.443300e+01    6.640480e-02\n            7.308967e+00    1.990801e-01\n            2.506894e+00    3.819108e-01\n            9.438003e-01    3.884663e-01\n            3.709710e-01    1.099967e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Be\" symbol=\"Be\" atomic_number=\"4\">\n        <potential>\n            0    1    0.000000e+00    2.000000e+00\n            0    1    5.188992000000e+00    -1.881929662069e+00\n            0    1    2.023980000000e+00    2.498997301900e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"9.4653380\">\n            1.311616e+03    1.969894e-03\n            1.913861e+02    1.451971e-02\n            4.527883e+01    6.534285e-02\n            1.359732e+01    1.982694e-01\n            4.719701e+00    3.835307e-01\n            1.817344e+00    3.845043e-01\n            7.340121e-01    1.096769e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"B\" symbol=\"B\" atomic_number=\"5\">\n        <potential>\n            0    1    0.000000e+00    2.000000e+00\n            0    1    1.603560000000e+01    -1.732294880810e+00\n            0    1    2.322329000000e+00    -1.596306790339e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"15.390670\">\n            2.787867e+02    2.477011e-02\n            3.826330e+01    1.678633e-01\n            8.576375e+00    4.977570e-01\n            2.360978e+00    4.542732e-01\n            2.929847e-01    8.554471e-03\n            9.375142e-02    6.986010e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"C\" symbol=\"C\" atomic_number=\"6\">\n        <potential>\n            0    1    0.000000e+00    2.000000e+00\n            0    1    1.864605000000e+01    -1.461263274320e+00\n            0    1    3.512100000000e+00    -1.797988128353e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"22.651036\">\n            4.090699e+02    2.446620e-02\n            5.616343e+01    1.667309e-01\n            1.263216e+01    4.985016e-01\n            3.495336e+00    4.533167e-01\n            4.607115e-01    9.069870e-03\n            1.436420e-01    7.456826e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"N\" symbol=\"N\" atomic_number=\"7\">\n        <potential>\n            0    1    0.000000e+00    2.000000e+00\n            0    1    2.763930000000e+01    -1.439667183297e+00\n            0    1    5.022100000000e+00    -2.157238444933e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"31.258000\">\n            5.635094e+02    2.422667e-02\n            7.738753e+01    1.657101e-01\n            1.744855e+01    4.979887e-01\n            4.843508e+00    4.511053e-01\n            7.820957e+00    1.334650e-03\n            6.633018e-01    9.410938e-03\n            2.029459e-01    7.779541e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"O\" symbol=\"O\" atomic_number=\"8\">\n        <potential>\n            0    1    0.000000e+00    2.000000e+00\n            0    1    4.064864000000e+01    -1.652819174505e+00\n            0    1    5.175230000000e+00    -1.645265426926e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"41.337314\">\n            7.432411e+02    2.413306e-02\n            1.020870e+02    1.655533e-01\n            2.305897e+01    4.996164e-01\n            6.416186e+00    4.517950e-01\n            9.065320e-01    9.761350e-03\n            2.740610e-01    7.992775e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"F\" symbol=\"F\" atomic_number=\"9\">\n        <potential>\n            0    1    0.000000e+00    2.000000e+00\n            0    1    5.202781000000e+01    -1.665079199433e+00\n            0    1    6.206354000000e+00    -1.570985856967e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"52.765500\">\n            9.476157e+02    2.401760e-02\n            1.301841e+02    1.651131e-01\n            2.944885e+01    4.998040e-01\n            8.208941e+00    4.514980e-01\n            1.184390e+00    1.005990e-02\n            3.545967e-01    8.202500e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ne\" symbol=\"Ne\" atomic_number=\"10\">\n        <potential>\n            0    1    0.000000e+00    2.000000e+00\n            0    1    5.407668000000e+01    -1.431831248614e+00\n            0    1    7.612973000000e+00    -1.535941722588e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"65.54324\">\n                99920   8.531738E-005\n                14960   0.00066368499\n                3399    0.0034900643\n                958.9   0.01455040251\n                311.2   0.05055672553\n                111.7   0.14259582815\n                43.32   0.30211383473\n                17.8    0.39679786984\n                7.503   0.21678101044\n                2.337   0.01994\n                0.9001  0.00011\n                0.3301  4E-005\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Na\" symbol=\"Na\" atomic_number=\"11\">\n        <potential>\n            0    1    0.000000e+00     4.0000e+00\n            0    1    3.050656000000e+02    -2.897619271036e+00\n            0    1    1.464675000000e+01    -1.319215823237e+00\n            0    1    2.136867000000e+00    -9.287752652095e-01\n            0    2    4.718427000000e+02    7.960024651340e+01\n            0    2    2.052377000000e+02    -2.125749865373e+01\n            0    2    6.894609000000e-01    -3.994723288019e-01\n        </potential>\n            0    1    3.050656000000e+02    -2.897619271036e+00\n            0    1    1.464675000000e+01    -1.319215823237e+00\n            0    1    2.136867000000e+00    -9.287752652095e-01\n            0    2    4.718427000000e+02    7.960024651340e+01\n            0    2    2.052377000000e+02    -2.125749865373e+01\n            0    2    6.894609000000e-01    -3.994723288019e-01\n        <core num=\"2\">\n            <orbital type=\"0\" bc=\"80.9572\">\n                1224000     5.0002E-006\n                183200      3.700149E-005\n                41700       0.00019600719\n                11810       0.00082702996\n                3853        0.00300310857\n                1391        0.00970335331\n                542.5       0.02823505071\n                224.9       0.07320884299\n                97.93       0.16290394607\n                44.31       0.28872274348\n                20.65       0.34685447335\n                9.729       0.20688894473\n                4.228       0.03277823685\n                1.969       -0.00073674573\n                0.889       0.00136977939\n                0.3964      -0.00016158574\n                0.06993     -0.00115\n                0.03289     0.00091\n                0.01612     -5E-005\n            </orbital>\n            <orbital type=\"0\" bc=\"5.5942\">\n                1224000     -9.9987E-007\n                183200      -8.99764E-006\n                41700       -4.798447E-005\n                11810       -0.00020193348\n                3853        -0.00073575535\n                1391        -0.00238621128\n                542.5       -0.00704769949\n                224.9       -0.01878004233\n                97.93       -0.04460163068\n                44.31       -0.0897501665\n                20.65       -0.14291007325\n                9.729       -0.12429614602\n                4.228       0.0999639237\n                1.969       0.41705096717\n                0.889       0.4750436931\n                0.3964      0.16305746022\n                0.06993     0.01154\n                0.03289     -0.0112\n                0.01612     0.00067\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Mg\" symbol=\"Mg\" atomic_number=\"12\">\n        <potential>\n            0    1    0.000000e+00    4.000000e+00\n            0    1    3.371815000000e+02    1.582036297230e+00\n            0    1    1.582292000000e+01    -1.120404892641e+00\n            0    1    2.309331000000e+00    -9.460018733114e-01\n            0    2    5.552475000000e+02    4.017354059378e+01\n            0    2    2.797939000000e+02    -7.998745241906e+01\n            0    2    7.681323000000e-01    -2.960128956124e-01\n        </potential>\n        <core num=\"2\">\n            <orbital type=\"0\" bc=\"98.06274\">\n                327600      3.099666E-005\n                49050       0.00024096804\n                11150       0.00126682924\n                3152        0.0053332808\n                1025        0.0190743581\n                368.8       0.0587976508\n                143.2       0.15142998214\n                58.96       0.30065940292\n                25.4        0.38103803064\n                11.15       0.21349325238\n                4.004       0.02332448202\n                1.701       -0.00187005168\n                0.706       0.00129608952\n                0.141       0.00419\n                0.06808     -0.00269\n                0.03063     0.00015\n            </orbital>\n            <orbital type=\"0\" bc=\"7.535298\">\n                327600      -7.96378E-006\n                49050       -6.073309E-005\n                11150       -0.00031959877\n                3152        -0.00134410902\n                1025        -0.0048845946\n                368.8       -0.01528900392\n                143.2       -0.04215638843\n                58.96       -0.09365015564\n                25.4        -0.16271372369\n                11.15       -0.12421029062\n                4.004       0.23459040783\n                1.701       0.57495678625\n                0.706       0.3333864325\n                0.141       0.03409\n                0.06808     -0.03002\n                0.03063     0.0017\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Al\" symbol=\"Al\" atomic_number=\"13\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.316953e+02    -3.386013e+00\n        0    1    5.217324e+00    -6.046747e+00\n        0    1    2.331459e+00    -3.647381e-01\n        0    2    9.142273e+02    -1.140686e+02\n        0    2    2.077560e+02    -4.208050e+01\n        0    2    1.251080e+00    -3.349915e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"76.051300\">\n            2.043808e+03    2.330614e-02\n            2.809367e+02    1.613919e-01\n            6.378912e+01    4.958434e-01\n            1.788862e+01    4.569062e-01\n            2.886838e+00    1.142757e-02\n            9.993500e-01    8.659862e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"6.3839100\">\n            2.043808e+03    6.603905e-03\n            2.809367e+02    4.573118e-02\n            6.378912e+01    1.404996e-01\n            1.788862e+01    1.294666e-01\n            3.061927e+01    9.566236e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"4.1837900\">\n            1.089621e+02    1.824312e-02\n            2.363035e+01    1.212105e-01\n            7.107732e+00    3.571781e-01\n            2.366064e+00    4.993906e-01\n            8.025018e-01    2.309303e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Si\" symbol=\"Si\" atomic_number=\"14\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.349863e+02    -3.320043e+00\n        0    1    4.335714e+00    -5.901880e+00\n        0    1    4.547902e+00    3.453667e-01\n        0    2    8.540638e+02    -1.218275e+02\n        0    2    2.119761e+02    -3.822756e+01\n        0    2    9.980917e-01    -3.460521e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"82.574880\">\n            2.387957e+03    2.313729e-02\n            3.282802e+02    1.604502e-01\n            7.458612e+01    4.946216e-01\n            2.094412e+01    4.585802e-01\n            3.444621e+00    1.181110e-02\n            1.222284e+00    8.622046e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"5.1072648\">\n            1.348228e+02    1.731180e-02\n            2.936148e+01    1.169748e-01\n            8.890635e+00    3.531863e-01\n            3.000349e+00    5.034634e-01\n            1.037602e+00    2.287471e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"7.3878360\">\n            2.387957e+03    6.719179e-03\n            3.282802e+02    4.659548e-02\n            7.458612e+01    1.436404e-01\n            2.094412e+01    1.331738e-01\n            3.582222e+01    9.806896e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"P\" symbol=\"P\" atomic_number=\"15\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.269965e+02    -2.738258e+00\n        0    1    5.125039e+00    -5.713482e+00\n        0    1    2.849041e+00    3.351582e-01\n        0    2    1.169129e+03    -7.823903e+01\n        0    2    1.843911e+02    -2.594858e+01\n        0    2    1.326776e+00    -2.364182e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"87.966687\">\n            2.759337e+03    2.298844e-02\n            3.793730e+02    1.596162e-01\n            8.624196e+01    4.935288e-01\n            2.424595e+01    4.600765e-01\n            4.049327e+00    1.216849e-02\n            1.462091e+00    8.553915e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"5.9410450\">\n            1.635738e+02    1.653283e-02\n            3.574204e+01    1.133241e-01\n            1.088147e+01    3.493311e-01\n            3.713289e+00    5.065666e-01\n            1.304009e+00    2.282030e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"8.2622100\">\n            2.759337e+03    6.815474e-03\n            3.793730e+02    4.732204e-02\n            8.624196e+01    1.463184e-01\n            2.424595e+01    1.364007e-01\n            4.146794e+01    1.001408e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"S\" symbol=\"S\" atomic_number=\"16\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.155917e+02    -3.620214e+00\n        0    1    5.971141e+00    -5.737309e+00\n        0    1    2.859090e+00    4.704707e-01\n        0    2    2.062680e+03    -3.776082e+01\n        0    2    1.487138e+02    -3.431947e+01\n        0    2    1.644010e+00    -2.288331e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"96.604672\">\n            3.158033e+03    2.285572e-02\n            4.342273e+02    1.588694e-01\n            9.875946e+01    4.925416e-01\n            2.779522e+01    4.614278e-01\n            4.703444e+00    1.248984e-02\n            1.720138e+00    8.475957e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"7.0166355\">\n            1.931031e+02    1.615636e-02\n            4.229557e+01    1.118467e-01\n            1.292618e+01    3.491943e-01\n            4.446308e+00    5.094185e-01\n            1.575364e+00    2.231922e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"9.4545045\">\n            3.158033e+03    6.897386e-03\n            4.342273e+02    4.794350e-02\n            9.875946e+01    1.486389e-01\n            2.779522e+01    1.392494e-01\n            4.754841e+01    1.019635e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Cl\" symbol=\"Cl\" atomic_number=\"17\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.120543e+02    -2.654674e+00\n        0    1    6.860978e+00    -5.707226e+00\n        0    1    2.789429e+00    6.518503e-01\n        0    2    1.667526e+03    -3.516025e+01\n        0    2    1.070677e+02    -3.284686e+01\n        0    2    3.574553e+00    -9.898434e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"104.88440\">\n            3.584292e+03    2.273479e-02\n            4.928774e+02    1.581851e-01\n            1.121465e+02    4.916240e-01\n            3.159387e+01    4.626829e-01\n            5.405644e+00    1.279159e-02\n            1.995106e+00    8.399245e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"8.0722000\">\n            2.239078e+02    1.596166e-02\n            4.916041e+01    1.112272e-01\n            1.507759e+01    3.501497e-01\n            5.222262e+00    5.115647e-01\n            1.862470e+00    2.176059e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"10.607500\">\n            3.584292e+03    6.966199e-03\n            4.928774e+02    4.846974e-02\n            1.121465e+02    1.506392e-01\n            3.159387e+01    1.417713e-01\n            5.406610e+01    1.035544e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ar\" symbol=\"Ar\" atomic_number=\"18\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.316953e+02    -9.029367e+00\n        0    1    5.217324e+00    -1.612466e+01\n        0    1    2.331459e+00    -9.726350e-01\n        0    2    9.142273e+02    -3.041829e+02\n        0    2    2.077560e+02    -1.122147e+02\n        0    2    1.251080e+00    -8.933106e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"76.051300\">\n            2.043808e+03    2.330614e-02\n            2.809367e+02    1.613919e-01\n            6.378912e+01    4.958434e-01\n            1.788862e+01    4.569062e-01\n            2.886838e+00    1.142757e-02\n            9.993500e-01    8.659862e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"4.1837900\">\n            1.089621e+02    1.824312e-02\n            2.363035e+01    1.212105e-01\n            7.107732e+00    3.571781e-01\n            2.366064e+00    4.993906e-01\n            8.025018e-01    2.309303e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"6.3839100\">\n            2.043808e+03    6.603905e-03\n            2.809367e+02    4.573118e-02\n            6.378912e+01    1.404996e-01\n            1.788862e+01    1.294666e-01\n            3.061927e+01    9.566236e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"K\" symbol=\"K\" atomic_number=\"19\">\n        <potential>\n        0    1    0.000000e+00    1.200000e+01\n        0    1    1.165002e+02    -6.815450e+00\n        0    1    8.900975e+00    -5.215410e+00\n        0    1    3.035128e-01    -1.866213e-01\n        0    2    1.887663e+03    -1.595243e+02\n        0    2    1.854639e+02    -5.261246e+01\n        0    2    1.596409e+00    -3.662524e+00\n        </potential>\n        <core num=\"6\">\n            <orbital type=\"0\" bc=\"3.4975600\">\n            4.734263e+03    2.216103e-03\n            6.514608e+02    1.553145e-02\n            1.484022e+02    4.954343e-02\n            4.196838e+01    5.035876e-02\n            6.816142e+01    4.017761e-02\n            6.770286e-01    7.829351e-01\n            2.602544e-01    4.122532e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"267.06608\">\n            4.734263e+03    2.126296e-02\n            6.514608e+02    1.490203e-01\n            1.484022e+02    4.753568e-01\n            4.196838e+01    4.831797e-01\n            7.097100e+00    1.941763e-02\n            2.791745e+00    1.356118e-02\n            4.663554e+00    4.197652e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"23.038560\">\n            1.735091e+02    3.641247e-02\n            3.760621e+01    2.230816e-01\n            1.115757e+01    5.296130e-01\n            3.680917e+00    3.941468e-01\n            1.439472e+00    6.592606e-03\n            5.215131e-01    1.100807e-02\n            1.902026e-01    4.409938e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"28.979920\">\n            4.734263e+03    6.686011e-03\n            6.514608e+02    4.685857e-02\n            1.484022e+02    1.494731e-01\n            4.196838e+01    1.519330e-01\n            6.816142e+01    1.061468e-01\n            4.663554e+00    2.218768e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ca\" symbol=\"Ca\" atomic_number=\"20\">\n        <potential>\n        0    1    0.000000e+00    1.200000e+01\n        0    1    1.267215e+02    -6.552351e+00\n        0    1    9.963899e+00    -4.778063e+00\n        0    1    3.241862e-01    -1.760750e-01\n        0    2    1.502502e+03    -1.925403e+02\n        0    2    2.020013e+02    -5.803146e+01\n        0    2    1.617474e+00    -3.299848e+00\n        </potential>\n        <core num=\"6\">\n            <orbital type=\"0\" bc=\"4.4907400\">\n            5.269373e+03    2.335822e-03\n            7.251419e+02    1.638271e-02\n            1.652354e+02    5.236452e-02\n            4.676625e+01    5.344078e-02\n            7.592187e+01    4.269463e-02\n            8.076661e-01    8.100857e-01\n            3.256016e-01    3.956857e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"298.72740\">\n            5.269373e+03    2.116644e-02\n            7.251419e+02    1.484547e-01\n            1.652354e+02    4.745100e-01\n            4.676625e+01    4.842626e-01\n            7.983490e+00    1.968437e-02\n            3.169474e+00    1.355669e-02\n            5.360188e+00    4.184384e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"27.258600\">\n            1.986128e+02    3.537530e-02\n            4.314738e+01    2.190453e-01\n            1.286298e+01    5.275969e-01\n            4.278264e+00    3.976240e-01\n            1.712917e+00    7.288671e-03\n            6.380574e-01    1.177173e-02\n            2.397383e-01    4.039566e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"33.645480\">\n            5.269373e+03    6.728304e-03\n            7.251419e+02    4.719017e-02\n            1.652354e+02    1.508353e-01\n            4.676625e+01    1.539355e-01\n            7.592187e+01    1.073839e-01\n            5.360188e+00    2.391065e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ga1\" symbol=\"Ga\" type=\"1\" atomic_number=\"31\">\n        <potential>\n        0    1    0.000000e+00    1.800000e+01\n        0    1    1.419617e+02    -1.011094e+01\n        0    1    6.981494e+00    -4.972984e+00\n        0    1    1.459222e+00    -1.658636e+00\n        0    2    9.030206e+02    -9.733987e+01\n        0    2    6.042702e+01    -6.438824e+01\n        0    2    1.538846e+00    -7.874682e-01\n        </potential>\n        <core num=\"9\">\n            <orbital type=\"0\" bc=\"13.162628\">\n            1.753258e+04    2.552036e-03\n            2.141321e+03    1.798133e-02\n            4.590901e+02    6.105938e-02\n            1.256613e+02    6.916771e-02\n            2.041631e+02    4.757103e-02\n            2.668048e+00    8.122274e-01\n            1.067967e+00    4.208331e-01\n            1.586098e-01    3.207152e-03\n            5.313909e-02    1.093893e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"768.06648\">\n            1.753258e+04    1.905672e-02\n            2.141321e+03    1.342713e-01\n            4.590901e+02    4.559463e-01\n            1.256613e+02    5.164933e-01\n            2.211365e+01    2.596770e-02\n            9.055300e+00    1.693821e-02\n            1.691566e+01    5.533978e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"9.0529146\">\n            5.897572e+02    1.315674e-02\n            1.274100e+02    8.568570e-02\n            3.858081e+01    2.194940e-01\n            1.319410e+01    1.678596e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"85.576416\">\n            5.897572e+02    3.154579e-02\n            1.274100e+02    2.054478e-01\n            3.858081e+01    5.262790e-01\n            1.319410e+01    4.024755e-01\n            6.040503e+00    9.503667e-03\n            2.285194e+00    1.448962e-02\n            8.785018e-01    5.294503e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"98.640560\">\n            1.753258e+04    6.598478e-03\n            2.141321e+03    4.649206e-02\n            4.590901e+02    1.578735e-01\n            1.256613e+02    1.788382e-01\n            2.041631e+02    1.059212e-01\n            1.691566e+01    2.972671e-03\n            1.586098e-01    1.394275e-03\n            5.313909e-02    4.755583e-04\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ge1\" symbol=\"Ge\" type=\"1\" atomic_number=\"32\">\n        <potential>\n        0    1    0.000000e+00    1.800000e+01\n        0    1    1.274682e+02    -9.018011e+00\n        0    1    7.957019e+00    -5.122292e+00\n        0    1    1.637895e+00    -1.644804e+00\n        0    2    7.395817e+02    -1.629970e+02\n        0    2    5.924678e+01    -5.269001e+01\n        0    2    1.505617e+00    -7.954904e-01\n        </potential>\n        <core num=\"9\">\n            <orbital type=\"0\" bc=\"14.812806\">\n            1.906556e+04    2.579178e-03\n            2.310581e+03    1.816386e-02\n            4.933572e+02    6.187404e-02\n            1.347287e+02    7.045750e-02\n            2.190805e+02    4.804061e-02\n            2.899252e+00    8.178377e-01\n            1.182388e+00    4.172929e-01\n            1.997604e-01    3.366036e-03\n            6.722313e-02    1.047392e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"822.40226\">\n            1.906556e+04    1.896751e-02\n            2.310581e+03    1.335787e-01\n            4.933572e+02    4.550274e-01\n            1.347287e+02    5.181510e-01\n            2.379342e+01    2.617004e-02\n            9.774380e+00    1.714604e-02\n            1.826867e+01    5.545111e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"10.423152\">\n            6.387863e+02    1.319476e-02\n            1.379239e+02    8.625880e-02\n            4.179844e+01    2.223490e-01\n            1.432062e+01    1.715137e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"93.154372\">\n            6.387863e+02    3.114216e-02\n            1.379239e+02    2.035873e-01\n            4.179844e+01    5.247863e-01\n            1.432062e+01    4.048052e-01\n            6.585455e+00    9.959601e-03\n            2.517464e+00    1.516615e-02\n            9.912460e-01    5.431750e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"106.94675\">\n            1.906556e+04    6.599092e-03\n            2.310581e+03    4.647411e-02\n            4.933572e+02    1.583111e-01\n            1.347287e+02    1.802728e-01\n            2.190805e+02    1.057224e-01\n            1.826867e+01    3.142525e-03\n            1.997604e-01    1.717543e-03\n            6.722313e-02    5.344390e-04\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"As1\" symbol=\"As\" type=\"1\" atomic_number=\"33\">\n        <potential>\n        0    1    0.000000e+00    1.800000e+01\n        0    1    1.422958e+02    -9.817787e+00\n        0    1    8.204055e+00    -4.993532e+00\n        0    1    1.705258e+00    -1.603169e+00\n        0    2    8.792100e+02    -1.396404e+02\n        0    2    7.059450e+01    -5.968996e+01\n        0    2    1.732241e+00    -7.626109e-01\n        </potential>\n        <core num=\"9\">\n            <orbital type=\"0\" bc=\"16.556158\">\n            2.070120e+04    2.606574e-03\n            2.488959e+03    1.834574e-02\n            5.292053e+02    6.269014e-02\n            1.441692e+02    7.176311e-02\n            2.346329e+02    4.849273e-02\n            3.140549e+00    8.261152e-01\n            1.301168e+00    4.113889e-01\n            2.435996e-01    3.496967e-03\n            8.270040e-02    1.047075e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"878.72548\">\n            2.070120e+04    1.888091e-02\n            2.488959e+03    1.328887e-01\n            5.292053e+02    4.541005e-01\n            1.441692e+02    5.198212e-01\n            2.554504e+01    2.637489e-02\n            1.052815e+01    1.736753e-02\n            1.968156e+01    5.563399e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"11.875626\">\n            6.904302e+02    1.322952e-02\n            1.489766e+02    8.680121e-02\n            4.517937e+01    2.251550e-01\n            1.550622e+01    1.752475e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"101.09504\">\n            6.904302e+02    3.074253e-02\n            1.489766e+02    2.017072e-01\n            4.517937e+01    5.232115e-01\n            1.550622e+01    4.072372e-01\n            7.151327e+00    1.045325e-02\n            2.758110e+00    1.587569e-02\n            1.106490e+00    5.514443e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"115.64659\">\n            2.070120e+04    6.599282e-03\n            2.488959e+03    4.644744e-02\n            5.292053e+02    1.587178e-01\n            1.441692e+02    1.816887e-01\n            2.346329e+02    1.054775e-01\n            1.968156e+01    3.317968e-03\n            2.435996e-01    2.022820e-03\n            8.270040e-02    6.056805e-04\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Se1\" symbol=\"Se\" type=\"1\" atomic_number=\"34\">\n        <potential>\n        0    1    0.000000e+00    1.800000e+01\n        0    1    1.511515e+02    -1.041981e+01\n        0    1    1.236041e+01    -3.887438e+00\n        0    1    3.657611e+00    -1.109334e+00\n        0    2    6.454874e+02    -2.138912e+02\n        0    2    7.442747e+01    -7.995303e+01\n        0    2    2.997280e+00    -5.685900e+00\n        </potential>\n        <core num=\"9\">\n            <orbital type=\"0\" bc=\"18.436860\">\n            2.244564e+04    2.633691e-03\n            2.676845e+03    1.852303e-02\n            5.666818e+02    6.349405e-02\n            1.539899e+02    7.306893e-02\n            2.508583e+02    4.891412e-02\n            3.393299e+00    8.359122e-01\n            1.424691e+00    4.042380e-01\n            2.916912e-01    3.638659e-03\n            9.918827e-02    1.057776e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"937.09502\">\n            2.244564e+04    8.593214e-02\n            2.676845e+03    1.291239e-01\n            5.666818e+02    4.426165e-01\n            1.539899e+02    5.093629e-01\n            2.508583e+02    4.061329e-03\n            2.736320e+01    2.597834e-02\n            1.130876e+01    1.717920e-02\n            2.115399e+01    5.459317e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"13.454666\">\n            7.448706e+02    1.325438e-02\n            1.606041e+02    8.727282e-02\n            4.873444e+01    2.278224e-01\n            1.675489e+01    1.790212e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"109.44400\">\n            7.448706e+02    3.034145e-02\n            1.606041e+02    1.997817e-01\n            4.873444e+01    5.215226e-01\n            1.675489e+01    4.098088e-01\n            7.738321e+00    1.099823e-02\n            3.006211e+00    1.664546e-02\n            1.222484e+00    5.560003e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"124.78739\">\n            2.244564e+04    6.599227e-03\n            2.676845e+03    4.641307e-02\n            5.666818e+02    1.590967e-01\n            1.539899e+02    1.830885e-01\n            2.508583e+02    1.051835e-01\n            2.115399e+01    3.457553e-03\n            2.916912e-01    2.190586e-03\n            9.918827e-02    6.368142e-04\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Br1\" symbol=\"Br\" type=\"1\" atomic_number=\"35\">\n        <potential>\n        0    1    0.000000e+00    1.800000e+01\n        0    1    1.511924e+02    -1.004655e+01\n        0    1    1.225936e+01    -3.340956e+00\n        0    1    4.073227e+00    -1.041641e+00\n        0    2    7.615376e+02    -3.027725e+02\n        0    2    7.283256e+01    -8.638852e+01\n        0    2    3.266225e+00    -6.059629e+00\n        </potential>\n        <core num=\"9\">\n            <orbital type=\"0\" bc=\"20.401890\">\n            2.430549e+04    2.660251e-03\n            2.874653e+03    1.869363e-02\n            6.058359e+02    6.427818e-02\n            1.641984e+02    7.436621e-02\n            2.677039e+02    4.930923e-02\n            3.656819e+00    8.465978e-01\n            1.552117e+00    3.961412e-01\n            3.427024e-01    3.774496e-03\n            1.172107e-01    1.090944e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"997.46640\">\n            2.430549e+04    1.871595e-02\n            2.874653e+03    1.315173e-01\n            6.058359e+02    4.522232e-01\n            1.641984e+02    5.231966e-01\n            2.927411e+01    2.678198e-02\n            1.214839e+01    1.785403e-02\n            2.269055e+01    5.615537e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"15.108107\">\n            8.014974e+02    1.328687e-02\n            1.726692e+02    8.776625e-02\n            5.241922e+01    2.304487e-01\n            1.804917e+01    1.826273e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"118.14688\">\n            8.014974e+02    2.998247e-02\n            1.726692e+02    1.980489e-01\n            5.241922e+01    5.200189e-01\n            1.804917e+01    4.121075e-01\n            8.347950e+00    1.149155e-02\n            3.264892e+00    1.730968e-02\n            1.342376e+00    5.552376e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"134.31659\">\n            2.430549e+04    6.599246e-03\n            2.874653e+03    4.637304e-02\n            6.058359e+02    1.594540e-01\n            1.641984e+02    1.844792e-01\n            2.677039e+02    1.048642e-01\n            2.269055e+01    3.709187e-03\n            3.427024e-01    2.695420e-03\n            1.172107e-01    7.790586e-04\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Kr1\" symbol=\"Kr\" type=\"1\" atomic_number=\"36\">\n        <potential>\n        0    1    0.000000e+00    1.800000e+01\n        0    1    1.611333e+02    -9.582092e+00\n        0    1    1.256127e+01    -3.218382e+00\n        0    1    4.278209e+00    -1.037790e+00\n        0    2    8.592716e+02    -3.576688e+02\n        0    2    8.503966e+01    -1.004948e+02\n        0    2    3.463696e+00    -6.125106e+00\n        </potential>\n        <core num=\"9\">\n            <orbital type=\"0\" bc=\"22.452878\">\n            2.628775e+04    2.685969e-03\n            3.082822e+03    1.885541e-02\n            6.467196e+02    6.503482e-02\n            1.748027e+02    7.564584e-02\n            2.852744e+02    4.965926e-02\n            3.932341e+00    8.579122e-01\n            1.683396e+00    3.876149e-01\n            3.967245e-01    3.906953e-03\n            1.367040e-01    1.135803e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"1059.8524\">\n            2.628775e+04    1.863775e-02\n            3.082822e+03    1.308363e-01\n            6.467196e+02    4.512721e-01\n            1.748027e+02    5.249012e-01\n            3.124910e+01    2.699639e-02\n            1.300959e+01    1.810864e-02\n            2.428824e+01    5.648936e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"16.837578\">\n            8.608589e+02    1.331180e-02\n            1.852878e+02    8.819928e-02\n            5.626984e+01    2.329222e-01\n            1.940291e+01    1.861763e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"127.20478\">\n            8.608589e+02    2.963214e-02\n            1.852878e+02    1.963321e-01\n            5.626984e+01    5.184860e-01\n            1.940291e+01    4.144294e-01\n            8.981600e+00    1.200026e-02\n            3.534366e+00    1.798026e-02\n            1.465887e+00    5.536325e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"144.23735\">\n            2.628775e+04    6.599258e-03\n            3.082822e+03    4.632655e-02\n            6.467196e+02    1.597865e-01\n            1.748027e+02    1.858571e-01\n            2.852744e+02    1.044940e-01\n            2.428824e+01    3.893449e-03\n            3.967245e-01    2.973505e-03\n            1.367040e-01    8.644372e-04\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Rb\" symbol=\"Rb\" atomic_number=\"37\">\n        <potential>\n        0    1    0.000000e+00    3.000000e+01\n        0    1    1.717237e+02    -1.587122e+01\n        0    1    8.795873e+00    -8.401075e+00\n        0    1    1.678889e+00    -2.468170e+00\n        0    2    3.285551e+03    -1.559101e+03\n        0    2    4.334126e+01    -1.055606e+02\n        0    2    1.370595e+00    -3.327627e+00\n        </potential>\n        <core num=\"15\">\n            <orbital type=\"0\" bc=\"1124.8126\">\n            2.832869e+04    1.861324e-02\n            3.293308e+03    1.305182e-01\n            6.874975e+02    4.512925e-01\n            1.852792e+02    5.255960e-01\n            3.331788e+01    2.681546e-02\n            1.388857e+01    1.810175e-02\n            2.594265e+01    5.565386e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"137.15820\">\n            9.224700e+02    2.931989e-02\n            1.983383e+02    1.948162e-01\n            6.024212e+01    5.172275e-01\n            2.079577e+01    4.163505e-01\n            9.638792e+00    1.251893e-02\n            3.818761e+00    1.861915e-02\n            1.600081e+00    5.548744e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"155.09320\">\n            2.832869e+04    6.618279e-03\n            3.293308e+03    4.640816e-02\n            6.874975e+02    1.604653e-01\n            1.852792e+02    1.868853e-01\n            3.032982e+02    1.041683e-01\n            2.594265e+01    3.793006e-03\n            5.321561e-01    2.442360e-03\n            2.133496e-01    1.216528e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"25.125400\">\n            2.832869e+04    2.719032e-03\n            3.293308e+03    1.906618e-02\n            6.874975e+02    6.592506e-02\n            1.852792e+02    7.677937e-02\n            3.032982e+02    5.001043e-02\n            4.223752e+00    8.691871e-01\n            1.823778e+00    3.803838e-01\n            5.321561e-01    3.528156e-03\n            2.133496e-01    1.757358e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"19.174000\">\n            9.224700e+02    1.334197e-02\n            1.983383e+02    8.865078e-02\n            6.024212e+01    2.353635e-01\n            2.079577e+01    1.894595e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"3.1324000\">\n            2.832869e+04    9.277854e-04\n            3.293308e+03    6.505742e-03\n            6.874975e+02    2.249488e-02\n            1.852792e+02    2.619858e-02\n            3.032982e+02    1.676234e-02\n            4.223752e+00    3.861552e-01\n            1.823778e+00    1.689937e-01\n            2.975875e+00    2.580162e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"9.2910000\">\n            6.893612e+01    7.038264e-02\n            1.806695e+01    3.297978e-01\n            5.745926e+00    5.563627e-01\n            1.824534e+00    3.148138e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Sr\" symbol=\"Sr\" atomic_number=\"38\">\n        <potential>\n        0    1    0.000000e+00    3.000000e+01\n        0    1    1.816301e+02    -1.509172e+01\n        0    1    8.787134e+00    -7.884786e+00\n        0    1    1.717769e+00    -2.313954e+00\n        0    2    3.261270e+03    -1.660114e+03\n        0    2    4.336450e+01    -1.063372e+02\n        0    2    1.370653e+00    -3.327384e+00\n        </potential>\n        <core num=\"15\">\n            <orbital type=\"0\" bc=\"1191.8658\">\n            3.057188e+04    1.854130e-02\n            3.522884e+03    1.298469e-01\n            7.318539e+02    4.503413e-01\n            1.966604e+02    5.273101e-01\n            3.546029e+01    2.701428e-02\n            1.483342e+01    1.837944e-02\n            2.766961e+01    5.602087e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"147.51486\">\n            9.882035e+02    2.895395e-02\n            2.122455e+02    1.929608e-01\n            6.447958e+01    5.154228e-01\n            2.228907e+01    4.189878e-01\n            1.032476e+01    1.313962e-02\n            4.114168e+00    1.942212e-02\n            1.737704e+00    5.596171e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"166.39380\">\n            3.057188e+04    6.619310e-03\n            3.522884e+03    4.635583e-02\n            7.318539e+02    1.607735e-01\n            1.966604e+02    1.882516e-01\n            3.222729e+02    1.037361e-01\n            2.766961e+01    3.981177e-03\n            6.107345e-01    2.769145e-03\n            2.567184e-01    1.255844e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"27.926500\">\n            3.057188e+04    2.744006e-03\n            3.522884e+03    1.921661e-02\n            7.318539e+02    6.664796e-02\n            1.966604e+02    7.803889e-02\n            3.222729e+02    5.029882e-02\n            4.527839e+00    8.796345e-01\n            1.968793e+00    3.728859e-01\n            6.107345e-01    3.640638e-03\n            2.567184e-01    1.651077e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"21.626220\">\n            9.882035e+02    1.333696e-02\n            2.122455e+02    8.888286e-02\n            6.447958e+01    2.374174e-01\n            2.228907e+01    1.929969e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"3.8978400\">\n            3.057188e+04    9.836503e-04\n            3.522884e+03    6.888622e-03\n            7.318539e+02    2.389145e-02\n            1.966604e+02    2.797478e-02\n            3.222729e+02    1.782949e-02\n            4.527839e+00    4.115402e-01\n            1.968793e+00    1.744560e-01\n            3.273140e+00    2.807261e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"11.186520\">\n            7.581164e+01    6.821491e-02\n            1.996358e+01    3.250123e-01\n            6.405919e+00    5.573717e-01\n            2.065585e+00    3.151559e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"In1\" symbol=\"In\" type=\"1\" atomic_number=\"49\">\n        <potential>\n        0    1    0.000000e+00    3.600000e+01\n        0    1    2.145475e+02    -2.826330e+01\n        0    1    6.235092e+00    -9.041888e+00\n        0    1    1.188715e+00    -2.324406e+00\n        0    2    1.651103e+03    -1.240581e+02\n        0    2    3.756033e+01    -8.501762e+01\n        0    2    1.109095e+00    -1.197530e+00\n        </potential>\n        <core num=\"18\">\n            <orbital type=\"0\" bc=\"2067.3992\">\n            6.790279e+04    1.776520e-02\n            7.040326e+03    1.213420e-01\n            1.375403e+03    4.355878e-01\n            3.558255e+02    5.502616e-01\n            6.425357e+01    3.199124e-02\n            2.748527e+01    2.311087e-02\n            5.134544e+01    7.307106e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"283.57658\">\n            1.947782e+03    2.528844e-02\n            4.116454e+02    1.730932e-01\n            1.247747e+02    4.930022e-01\n            4.365494e+01    4.465301e-01\n            1.960851e+01    2.358726e-02\n            8.108029e+00    3.359207e-02\n            3.481304e+00    6.952704e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"316.23400\">\n            6.790279e+04    6.598182e-03\n            7.040326e+03    4.506770e-02\n            1.375403e+03    1.617819e-01\n            3.558255e+02    2.043730e-01\n            5.903032e+02    9.628463e-02\n            5.134544e+01    4.984940e-03\n            1.653841e+00    3.480653e-03\n            7.005751e-01    1.419582e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"62.859304\">\n            6.790279e+04    2.934135e-03\n            7.040326e+03    2.004108e-02\n            1.375403e+03    7.194251e-02\n            3.558255e+02    9.088226e-02\n            5.903032e+02    5.042911e-02\n            8.699199e+00    9.757823e-01\n            3.848173e+00    3.049227e-01\n            1.653841e+00    2.811371e-03\n            7.005751e-01    1.146616e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"51.854474\">\n            1.947782e+03    1.278307e-02\n            4.116454e+02    8.749703e-02\n            1.247747e+02    2.492081e-01\n            4.365494e+01    2.257169e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"10.620561\">\n            6.790279e+04    1.262043e-03\n            7.040326e+03    8.620157e-03\n            1.375403e+03    3.094423e-02\n            3.558255e+02    3.909067e-02\n            5.903032e+02    2.245986e-02\n            8.699199e+00    5.597291e-01\n            3.848173e+00    1.749100e-01\n            7.641793e+00    3.797049e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"7.1636290\">\n            1.947782e+03    5.343462e-03\n            4.116454e+02    3.657470e-02\n            1.247747e+02    1.041717e-01\n            4.365494e+01    9.435208e-02\n            2.669398e+00    5.428550e-01\n            1.153922e+00    5.887788e-01\n            4.695989e-01    1.298705e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"34.739834\">\n            1.811900e+02    4.897803e-02\n            4.931153e+01    2.695238e-01\n            1.686080e+01    5.470622e-01\n            6.106148e+00    3.504625e-01\n            4.088039e+00    6.580949e-03\n            1.359836e+00    1.290444e-02\n            4.219564e-01    7.129024e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Sn1\" symbol=\"Sn\" type=\"1\" atomic_number=\"50\">\n        <potential>\n        0    1    0.000000e+00    3.600000e+01\n        0    1    2.399380e+02    -2.926862e+01\n        0    1    6.880170e+00    -8.988872e+00\n        0    1    1.333055e+00    -2.497620e+00\n        0    2    3.158649e+03    -8.867078e+01\n        0    2    4.206145e+01    -9.076272e+01\n        0    2    1.235161e+00    -1.257930e+00\n        </potential>\n        <core num=\"18\">\n            <orbital type=\"0\" bc=\"2160.6716\">\n            7.266615e+04    1.773963e-02\n            7.458577e+03    1.207515e-01\n            1.448048e+03    4.345224e-01\n            3.731342e+02    5.520353e-01\n            6.745249e+01    3.228038e-02\n            2.888902e+01    2.349413e-02\n            5.396235e+01    7.371557e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"298.72182\">\n            2.041792e+03    2.532196e-02\n            4.307275e+02    1.732810e-01\n            1.304436e+02    4.936558e-01\n            4.558117e+01    4.470731e-01\n            2.063008e+01    2.258027e-02\n            8.539518e+00    3.189178e-02\n            3.661291e+00    6.454050e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"333.02815\">\n            7.266615e+04    6.610922e-03\n            7.458577e+03    4.499975e-02\n            1.448048e+03    1.619309e-01\n            3.731342e+02    2.057237e-01\n            6.206207e+02    9.546550e-02\n            5.396235e+01    5.048381e-03\n            1.777042e+00    3.480766e-03\n            7.657393e-01    1.397729e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"67.175532\">\n            7.266615e+04    2.953586e-03\n            7.458577e+03    2.010470e-02\n            1.448048e+03    7.234645e-02\n            3.731342e+02    9.191194e-02\n            6.206207e+02    5.025423e-02\n            9.164452e+00    9.818402e-01\n            4.048987e+00    3.010621e-01\n            1.777042e+00    2.619555e-03\n            7.657393e-01    1.051903e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"55.641553\">\n            2.041792e+03    1.288245e-02\n            4.307275e+02    8.815608e-02\n            1.304436e+02    2.511456e-01\n            4.558117e+01    2.274468e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"11.771644\">\n            7.266615e+04    1.287268e-03\n            7.458577e+03    8.762279e-03\n            1.448048e+03    3.153092e-02\n            3.731342e+02    4.005820e-02\n            6.206207e+02    2.268724e-02\n            9.164452e+00    5.728315e-01\n            4.048987e+00    1.756476e-01\n            8.116065e+00    3.870636e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"8.1041616\">\n            2.041792e+03    5.483335e-03\n            4.307275e+02    3.752308e-02\n            1.304436e+02    1.068985e-01\n            4.558117e+01    9.681130e-02\n            2.865541e+00    5.502444e-01\n            1.251380e+00    5.916674e-01\n            5.173573e-01    1.234323e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"37.846092\">\n            1.930010e+02    4.796829e-02\n            5.260605e+01    2.662139e-01\n            1.804452e+01    5.459717e-01\n            6.570293e+00    3.529913e-01\n            4.538816e+00    6.742746e-03\n            1.550296e+00    1.352712e-02\n            5.002391e-01    7.274215e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Sb1\" symbol=\"Sb\" type=\"1\" atomic_number=\"51\">\n        <potential>\n        0    1    0.000000e+00    3.600000e+01\n        0    1    2.668636e+02    -2.992093e+01\n        0    1    7.495168e+00    -8.938023e+00\n        0    1    1.055974e+00    -2.029444e+00\n        0    2    3.415451e+03    -1.350729e+02\n        0    2    4.547132e+01    -1.172562e+02\n        0    2    1.922978e+00    -1.335315e+00\n        </potential>\n        <core num=\"18\">\n            <orbital type=\"0\" bc=\"2256.2691\">\n            7.772952e+04    1.771776e-02\n            7.897737e+03    1.201668e-01\n            1.523595e+03    4.334453e-01\n            3.910089e+02    5.538159e-01\n            7.085474e+01    3.246281e-02\n            3.046331e+01    2.397554e-02\n            5.667781e+01    7.422703e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"314.29937\">\n            2.140155e+03    2.533108e-02\n            4.506338e+02    1.733219e-01\n            1.363488e+02    4.940944e-01\n            4.758959e+01    4.477572e-01\n            2.168046e+01    2.173861e-02\n            8.984165e+00    3.046358e-02\n            3.846385e+00    6.039136e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"350.33645\">\n            7.772952e+04    6.625106e-03\n            7.897737e+03    4.493334e-02\n            1.523595e+03    1.620758e-01\n            3.910089e+02    2.070854e-01\n            6.518766e+02    9.464965e-02\n            5.667781e+01    5.357000e-03\n            1.904156e+00    4.035483e-03\n            8.320664e-01    1.581948e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"71.647083\">\n            7.772952e+04    2.973234e-03\n            7.897737e+03    2.016531e-02\n            1.523595e+03    7.273685e-02\n            3.910089e+02    9.293637e-02\n            6.518766e+02    5.007031e-02\n            9.642199e+00    9.870342e-01\n            4.255994e+00    2.974771e-01\n            1.904156e+00    2.407143e-03\n            8.320664e-01    9.436232e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"59.563495\">\n            2.140155e+03    1.296613e-02\n            4.506338e+02    8.871763e-02\n            1.363488e+02    2.529102e-01\n            4.758959e+01    2.291918e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"12.961197\">\n            7.772952e+04    1.312356e-03\n            7.897737e+03    8.900766e-03\n            1.523595e+03    3.210532e-02\n            3.910089e+02    4.102118e-02\n            6.518766e+02    2.290314e-02\n            9.642199e+00    5.853485e-01\n            4.255994e+00    1.764151e-01\n            8.607677e+00    3.944439e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"9.0747358\">\n            2.140155e+03    5.615018e-03\n            4.506338e+02    3.841943e-02\n            1.363488e+02    1.095235e-01\n            4.758959e+01    9.925217e-02\n            3.067791e+00    5.586107e-01\n            1.352145e+00    5.942375e-01\n            5.650612e-01    1.167132e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"41.072321\">\n            1.880339e+02    5.516419e-02\n            5.103533e+01    2.954908e-01\n            1.734697e+01    5.665716e-01\n            6.166323e+00    3.105956e-01\n            5.027724e+00    7.767543e-04\n            1.779129e+00    1.617500e-03\n            5.881318e-01    8.672809e-04\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Te1\" symbol=\"Te\" type=\"1\" atomic_number=\"52\">\n        <potential>\n        0    1    0.000000e+00    3.600000e+01\n        0    1    2.429654e+02    -3.430523e+01\n        0    1    2.063113e+00    -4.148315e+00\n        0    1    9.080743e-01    -8.581169e-01\n        0    2    3.268975e+03    -4.428144e+02\n        0    2    4.255696e+01    -1.754604e+02\n        0    2    3.750702e+00    -5.647906e-01\n        </potential>\n        <core num=\"18\">\n            <orbital type=\"0\" bc=\"2354.2536\">\n            8.310434e+04    1.770100e-02\n            8.358395e+03    1.195938e-01\n            1.602101e+03    4.323621e-01\n            4.094573e+02    5.555928e-01\n            7.427984e+01    3.275256e-02\n            3.197229e+01    2.438902e-02\n            5.947033e+01    7.489354e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"330.34971\">\n            2.242920e+03    2.531963e-02\n            4.713680e+02    1.732369e-01\n            1.424906e+02    4.943444e-01\n            4.968056e+01    4.485601e-01\n            2.275951e+01    2.104678e-02\n            9.440646e+00    2.927810e-02\n            4.034581e+00    5.689717e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"368.20357\">\n            8.310434e+04    6.640886e-03\n            8.358395e+03    4.486803e-02\n            1.602101e+03    1.622093e-01\n            4.094573e+02    2.084418e-01\n            6.845819e+02    9.378192e-02\n            5.947033e+01    5.426753e-03\n            2.035795e+00    4.059384e-03\n            8.998324e-01    1.545840e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"76.313443\">\n            8.310434e+04    2.993153e-03\n            8.358395e+03    2.022274e-02\n            1.602101e+03    7.311033e-02\n            4.094573e+02    9.394805e-02\n            6.845819e+02    4.984210e-02\n            1.013791e+01    9.923610e-01\n            4.468113e+00    2.942143e-01\n            2.035795e+00    2.144044e-03\n            8.998324e-01    8.164662e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"63.658553\">\n            2.242920e+03    1.303596e-02\n            4.713680e+02    8.919199e-02\n            1.424906e+02    2.545160e-01\n            4.968056e+01    2.309437e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"14.226984\">\n            8.310434e+04    1.337247e-03\n            8.358395e+03    9.034881e-03\n            1.602101e+03    3.266339e-02\n            4.094573e+02    4.197303e-02\n            6.845819e+02    2.308636e-02\n            1.013791e+01    5.977351e-01\n            4.468113e+00    1.772160e-01\n            9.115573e+00    4.017739e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"10.113025\">\n            2.242920e+03    5.738007e-03\n            4.713680e+02    3.925944e-02\n            1.424906e+02    1.120297e-01\n            4.968056e+01    1.016540e-01\n            3.276480e+00    5.675947e-01\n            1.456225e+00    5.963576e-01\n            6.129979e-01    1.101295e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"44.456501\">\n            2.177113e+02    4.618225e-02\n            5.949579e+01    2.602803e-01\n            2.052317e+01    5.439398e-01\n            7.545045e+00    3.575382e-01\n            5.459859e+00    7.069627e-03\n            1.942199e+00    1.465446e-02\n            6.617277e-01    7.520586e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"I1\" symbol=\"I\" type=\"1\" atomic_number=\"53\">\n        <potential>\n        0    1    0.000000e+00    3.600000e+01\n        0    1    2.720190e+02    -3.676569e+01\n        0    1    2.263086e+00    -3.842603e+00\n        0    1    1.053259e+00    -8.066965e-01\n        0    2    5.104624e+03    -3.495153e+02\n        0    2    4.031470e+01    -1.837709e+02\n        0    2    2.647569e+00    -3.277054e-01\n        </potential>\n        <core num=\"18\">\n            <orbital type=\"0\" bc=\"2454.6048\">\n            8.881194e+04    1.768881e-02\n            8.841808e+03    1.190303e-01\n            1.683700e+03    4.312702e-01\n            4.284975e+02    5.573705e-01\n            7.782165e+01    3.304250e-02\n            3.353386e+01    2.481793e-02\n            6.235374e+01    7.557020e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"346.83248\">\n            2.349964e+03    2.529389e-02\n            4.928960e+02    1.730624e-01\n            1.488570e+02    4.944575e-01\n            5.184959e+01    4.494301e-01\n            2.386824e+01    2.047717e-02\n            9.909558e+00    2.829034e-02\n            4.226890e+00    5.394690e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"386.59357\">\n            8.881194e+04    6.658291e-03\n            8.841808e+03    4.480449e-02\n            1.683700e+03    1.623355e-01\n            4.284975e+02    2.098013e-01\n            7.185638e+02    9.289105e-02\n            6.235374e+01    5.499755e-03\n            2.171925e+00    4.096793e-03\n            9.685845e-01    1.509237e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"81.134313\">\n            8.881194e+04    3.013393e-03\n            8.841808e+03    2.027751e-02\n            1.683700e+03    7.346942e-02\n            4.284975e+02    9.495135e-02\n            7.185638e+02    4.958847e-02\n            1.064916e+01    9.973573e-01\n            4.685949e+00    2.912147e-01\n            2.171925e+00    1.842732e-03\n            9.685845e-01    6.788531e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"67.885467\">\n            2.349964e+03    1.309519e-02\n            4.928960e+02    8.959812e-02\n            1.488570e+02    2.559913e-01\n            5.184959e+01    2.326796e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"15.529132\">\n            8.881194e+04    1.361861e-03\n            8.841808e+03    9.164141e-03\n            1.683700e+03    3.320349e-02\n            4.284975e+02    4.291195e-02\n            7.185638e+02    2.324459e-02\n            1.064916e+01    6.097033e-01\n            4.685949e+00    1.780250e-01\n            9.640530e+00    4.089963e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"11.179601\">\n            2.349964e+03    5.853232e-03\n            4.928960e+02    4.004817e-02\n            1.488570e+02    1.144219e-01\n            5.184959e+01    1.040021e-01\n            3.491920e+00    5.769315e-01\n            1.563864e+00    5.979902e-01\n            6.612446e-01    1.039140e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"47.956633\">\n            2.096282e+02    5.407733e-02\n            5.701584e+01    2.928344e-01\n            1.947108e+01    5.672906e-01\n            6.972525e+00    3.107734e-01\n            6.042350e+00    6.770240e-04\n            2.215766e+00    1.489093e-03\n            7.632974e-01    7.759726e-04\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Xe1\" symbol=\"Xe\" type=\"1\" atomic_number=\"54\">\n        <potential>\n        0    1    0.000000e+00    3.600000e+01\n        0    1    2.576660e+02    -3.538898e+01\n        0    1    2.189311e+00    -3.358263e+00\n        0    1    9.959189e-01    -6.816075e-01\n        0    2    3.971828e+03    -6.373092e+02\n        0    2    4.114562e+01    -1.951533e+02\n        0    2    3.698646e+00    -3.377956e-01\n        </potential>\n        <core num=\"18\">\n            <orbital type=\"0\" bc=\"2557.3482\">\n            9.487214e+04    1.768122e-02\n            9.349124e+03    1.184763e-01\n            1.768512e+03    4.301696e-01\n            4.481476e+02    5.591477e-01\n            8.148399e+01    3.333339e-02\n            3.514965e+01    2.526344e-02\n            6.533041e+01    7.625927e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"363.75122\">\n            2.501286e+03    2.463870e-02\n            5.235308e+02    1.692299e-01\n            1.580152e+02    4.890454e-01\n            5.507622e+01    4.561658e-01\n            2.510059e+01    2.225373e-02\n            1.043497e+01    3.103876e-02\n            4.447579e+00    5.880920e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"405.51465\">\n            9.487214e+04    6.677363e-03\n            9.349124e+03    4.474291e-02\n            1.768512e+03    1.624548e-01\n            4.481476e+02    2.111638e-01\n            7.538748e+02    9.197723e-02\n            6.533041e+01    5.576147e-03\n            2.312876e+00    4.145291e-03\n            1.038420e+00    1.473910e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"86.112969\">\n            9.487214e+04    3.033999e-03\n            9.349124e+03    2.032987e-02\n            1.768512e+03    7.381473e-02\n            4.481476e+02    9.594665e-02\n            7.538748e+02    4.931003e-02\n            1.117613e+01    1.002040e+00\n            4.909653e+00    2.884592e-01\n            2.312876e+00    1.504520e-03\n            1.038420e+00    5.349510e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"72.246326\">\n            2.501286e+03    1.282336e-02\n            5.235308e+02    8.807674e-02\n            1.580152e+02    2.545266e-01\n            5.507622e+01    2.374142e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"16.870339\">\n            9.487214e+04    1.386184e-03\n            9.349124e+03    9.288381e-03\n            1.768512e+03    3.372472e-02\n            4.481476e+02    4.383643e-02\n            7.538748e+02    2.337702e-02\n            1.117613e+01    6.212373e-01\n            4.909653e+00    1.788368e-01\n            1.018270e+01    4.160800e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"12.277074\">\n            2.501286e+03    5.815405e-03\n            5.235308e+02    3.994288e-02\n            1.580152e+02    1.154280e-01\n            5.507622e+01    1.076676e-01\n            3.723646e+00    5.840232e-01\n            1.680574e+00    6.006810e-01\n            7.131027e-01    9.949652e-02\n            </orbital>\n            <orbital type=\"2\" bc=\"51.574230\">\n            2.438967e+02    4.465139e-02\n            6.679120e+01    2.551094e-01\n            2.315135e+01    5.420927e-01\n            8.582120e+00    3.615153e-01\n            6.419499e+00    7.378972e-03\n            2.354200e+00    1.564342e-02\n            8.317158e-01    7.720316e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Cs\" symbol=\"Cs\" atomic_number=\"55\">\n        <potential>\n        0    1    0.000000e+00    4.800000e+01\n        0    1    4.418373e+02    -7.390764e+00\n        0    1    1.035219e+01    -1.743794e+01\n        0    1    1.692241e+00    -9.019157e+00\n        0    2    8.654932e+02    -7.842653e+02\n        0    2    9.280596e+01    -9.552911e+01\n        0    2    5.295508e-01    -1.352907e+00\n        </potential>\n        <core num=\"24\">\n            <orbital type=\"0\" bc=\"2662.9400\">\n            1.009176e+05    1.774244e-02\n            9.844100e+03    1.183708e-01\n            1.849438e+03    4.304124e-01\n            4.666344e+02    5.595855e-01\n            8.548912e+01    3.283032e-02\n            3.686122e+01    2.531609e-02\n            7.183215e+01    7.341386e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"381.53600\">\n            2.622068e+03    2.454877e-02\n            5.476712e+02    1.686664e-01\n            1.651321e+02    4.885798e-01\n            5.749730e+01    4.577832e-01\n            2.488532e+01    2.535362e-02\n            9.566524e+00    3.045200e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"425.40200\">\n            1.009176e+05    6.723811e-03\n            9.844100e+03    4.485869e-02\n            1.849438e+03    1.631124e-01\n            4.666344e+02    2.120648e-01\n            7.886446e+02    9.121970e-02\n            7.183215e+01    5.335173e-03\n            1.950479e+00    3.551284e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"91.676600\">\n            1.009176e+05    3.089298e-03\n            9.844100e+03    2.061061e-02\n            1.849438e+03    7.494302e-02\n            4.666344e+02    9.743451e-02\n            7.886446e+02    4.798006e-02\n            1.039584e+01    1.222086e+00\n            1.950479e+00    8.737503e-02\n            2.172664e+00    9.018310e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"77.165600\">\n            2.622068e+03    1.281975e-02\n            5.476712e+02    8.808026e-02\n            1.651321e+02    2.551440e-01\n            5.749730e+01    2.390616e-01\n            4.809538e-01    7.494866e-03\n            1.633000e-01    6.217486e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"18.672820\">\n            1.009176e+05    1.391221e-03\n            9.844100e+03    9.281691e-03\n            1.849438e+03    3.374950e-02\n            4.666344e+02    4.387822e-02\n            7.886446e+02    2.627042e-02\n            1.039584e+01    6.546047e-01\n            1.233037e+01    4.443163e-01\n            2.172664e+00    1.660082e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"2.6188600\">\n            1.009176e+05    5.351154e-04\n            9.844100e+03    3.570085e-03\n            1.849438e+03    1.298132e-02\n            4.666344e+02    1.687720e-02\n            7.886446e+02    9.131888e-03\n            1.039584e+01    2.997215e-01\n            1.233037e+01    1.887165e-01\n            3.439283e-01    9.534798e-01\n            1.443567e-01    3.059850e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"13.824140\">\n            2.622068e+03    5.884360e-03\n            5.476712e+02    4.042948e-02\n            1.651321e+02    1.171130e-01\n            5.749730e+01    1.097310e-01\n            3.756752e+00    6.734913e-01\n            1.502927e+00    5.673248e-01\n            4.809538e-01    1.149766e-02\n            1.633000e-01    9.538066e-03\n            </orbital>\n            <orbital type=\"2\" bc=\"6.5089600\">\n            2.575297e+02    1.919204e-02\n            7.058664e+01    1.103332e-01\n            2.451981e+01    2.362293e-01\n            9.123165e+00    1.585533e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"55.734200\">\n            2.575297e+02    4.397336e-02\n            7.058664e+01    2.527986e-01\n            2.451981e+01    5.412554e-01\n            9.123165e+00    3.632818e-01\n            6.952956e+00    7.426077e-03\n            2.591209e+00    1.600456e-02\n            9.343775e-01    7.907209e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ba\" symbol=\"Ba\" atomic_number=\"56\">\n        <potential>\n        0    1    0.000000e+00    4.800000e+01\n        0    1    4.239742e+02    -6.958587e+00\n        0    1    1.033137e+01    -1.610109e+01\n        0    1    1.704769e+00    -8.650936e+00\n        0    2    8.479779e+02    -8.000354e+02\n        0    2    9.325344e+01    -9.308317e+01\n        0    2    5.295500e-01    -1.376229e+00\n        </potential>\n        <core num=\"24\">\n            <orbital type=\"0\" bc=\"2770.9938\">\n            1.077089e+05    1.774558e-02\n            1.039961e+04    1.178455e-01\n            1.940478e+03    4.293305e-01\n            4.874210e+02    5.613372e-01\n            8.943074e+01    3.309324e-02\n            3.860205e+01    2.578581e-02\n            7.505492e+01    7.418349e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"399.77920\">\n            2.753935e+03    2.438246e-02\n            5.739820e+02    1.676586e-01\n            1.729309e+02    4.872197e-01\n            6.034045e+01    4.577277e-01\n            2.613393e+01    2.714764e-02\n            1.011833e+01    3.325257e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"445.85300\">\n            1.077089e+05    6.747071e-03\n            1.039961e+04    4.480620e-02\n            1.940478e+03    1.632363e-01\n            4.874210e+02    2.134268e-01\n            8.266035e+02    9.027008e-02\n            7.505492e+01    5.438905e-03\n            2.091223e+00    3.565554e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"97.419600\">\n            1.077089e+05    3.110860e-03\n            1.039961e+04    2.065872e-02\n            1.940478e+03    7.526308e-02\n            4.874210e+02    9.840430e-02\n            8.266035e+02    4.768257e-02\n            1.092449e+01    1.223205e+00\n            2.091223e+00    8.853101e-02\n            2.328715e+00    9.139834e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"82.237060\">\n            2.753935e+03    1.278409e-02\n            5.739820e+02    8.790595e-02\n            1.729309e+02    2.554566e-01\n            6.034045e+01    2.399935e-01\n            5.478717e-01    7.140049e-03\n            1.958695e-01    5.442036e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"20.530020\">\n            1.077089e+05    1.417181e-03\n            1.039961e+04    9.411271e-03\n            1.940478e+03    3.428680e-02\n            4.874210e+02    4.482900e-02\n            8.266035e+02    2.622452e-02\n            1.092449e+01    6.696110e-01\n            1.293764e+01    4.472684e-01\n            2.328715e+00    1.806428e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"3.2083200\">\n            1.077089e+05    5.707487e-04\n            1.039961e+04    3.790250e-03\n            1.940478e+03    1.380850e-02\n            4.874210e+02    1.805421e-02\n            8.266035e+02    9.541499e-03\n            1.092449e+01    3.214358e-01\n            1.293764e+01    2.015345e-01\n            3.911176e-01    1.003898e+00\n            1.703696e-01    2.809982e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"15.415380\">\n            2.753935e+03    5.944570e-03\n            5.739820e+02    4.087604e-02\n            1.729309e+02    1.187867e-01\n            6.034045e+01    1.115964e-01\n            4.032446e+00    6.693907e-01\n            1.633220e+00    5.750905e-01\n            5.478717e-01    1.248044e-02\n            1.958695e-01    9.512402e-03\n            </orbital>\n            <orbital type=\"2\" bc=\"7.7185200\">\n            2.712525e+02    1.942862e-02\n            7.440013e+01    1.122994e-01\n            2.589187e+01    2.419585e-01\n            9.665031e+00    1.629869e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"60.029060\">\n            2.712525e+02    4.342654e-02\n            7.440013e+01    2.510098e-01\n            2.589187e+01    5.408217e-01\n            9.665031e+00    3.643056e-01\n            7.510341e+00    7.387887e-03\n            2.841690e+00    1.619778e-02\n            1.044140e+00    8.039416e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Tl1\" symbol=\"Tl\" type=\"1\" atomic_number=\"81\">\n        <potential>\n        0    1    0.000000e+00    6.800000e+01\n        0    1    3.298244e+02    -3.663140e+01\n        0    1    6.214575e+00    -1.698065e+01\n        0    1    3.181997e+00    -7.160325e+00\n        0    2    6.562251e+03    -6.620930e+03\n        0    2    6.903256e+01    -2.486635e+02\n        0    2    1.052477e+00    -2.860910e+00\n        </potential>\n        <core num=\"34\">\n            <orbital type=\"0\" bc=\"6346.5857\">\n            5.036713e+05    1.957831e-02\n            3.856487e+04    1.086627e-01\n            5.904381e+03    3.991082e-01\n            1.289249e+03    6.032374e-01\n            2.558320e+02    3.865044e-02\n            1.104903e+02    4.758163e-02\n            1.942904e+02    1.004381e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"986.03038\">\n            7.731113e+03    2.267175e-02\n            1.507506e+03    1.542949e-01\n            4.376697e+02    4.720559e-01\n            1.502123e+02    4.816205e-01\n            6.840685e+01    3.163158e-02\n            2.719751e+01    3.959489e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"1141.8426\">\n            5.036713e+05    8.076128e-03\n            3.856487e+04    4.482377e-02\n            5.904381e+03    1.646337e-01\n            1.289249e+03    2.488377e-01\n            2.536357e+03    6.161120e-02\n            1.942904e+02    1.078298e-02\n            7.867014e+00    1.012349e-02\n            3.410552e+00    2.460003e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"277.65398\">\n            5.036713e+05    3.902105e-03\n            3.856487e+04    2.165729e-02\n            5.904381e+03    7.954527e-02\n            1.289249e+03    1.202297e-01\n            2.536357e+03    3.545812e-02\n            3.244588e+01    1.057109e+00\n            1.327227e+01    2.663563e-01\n            1.489370e+00    3.366259e-03\n            5.994629e-01    8.000617e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"231.93078\">\n            7.731113e+03    1.276944e-02\n            1.507506e+03    8.690371e-02\n            4.376697e+02    2.658766e-01\n            1.502123e+02    2.712637e-01\n            1.959124e+00    8.004960e-03\n            7.158242e-01    5.260924e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"64.771280\">\n            5.036713e+05    2.085825e-03\n            3.856487e+04    1.157666e-02\n            5.904381e+03    4.252001e-02\n            1.289249e+03    6.426743e-02\n            2.536357e+03    1.071725e-02\n            3.244588e+01    1.162042e+00\n            1.327227e+01    2.927960e-01\n            1.489370e+00    1.834061e-03\n            5.994629e-01    4.359030e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"11.261664\">\n            5.036713e+05    9.521953e-04\n            3.856487e+04    5.284833e-03\n            5.904381e+03    1.941071e-02\n            1.289249e+03    2.933858e-02\n            2.536357e+03    3.102355e-03\n            3.244588e+01    6.349639e-01\n            1.327227e+01    1.599898e-01\n            1.489370e+00    1.187720e+00\n            5.994629e-01    2.822865e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"6.8953568\">\n            7.731113e+03    2.697149e-03\n            1.507506e+03    1.835573e-02\n            4.376697e+02    5.615823e-02\n            1.502123e+02    5.729608e-02\n            1.221030e+01    4.499210e-01\n            5.095106e+00    3.981692e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"49.474620\">\n            7.731113e+03    6.519048e-03\n            1.507506e+03    4.436605e-02\n            4.376697e+02    1.357352e-01\n            1.502123e+02    1.384854e-01\n            1.221030e+01    6.862869e-01\n            5.095106e+00    6.073474e-01\n            1.959124e+00    1.472472e-02\n            7.158242e-01    9.677202e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"10.206321\">\n            1.272994e+02    4.211776e-02\n            3.999141e+01    2.173766e-01\n            1.511232e+01    4.527266e-01\n            5.860638e+00    4.453532e-01\n            2.106195e+00    1.668768e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"30.828020\">\n            7.481043e+02    1.921276e-02\n            2.053677e+02    1.200997e-01\n            7.305338e+01    2.841247e-01\n            2.829822e+01    2.049424e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"182.55623\">\n            7.481043e+02    3.587156e-02\n            2.053677e+02    2.242345e-01\n            7.305338e+01    5.304805e-01\n            2.829822e+01    3.826418e-01\n            2.498019e+01    9.835162e-03\n            1.029172e+01    2.417978e-02\n            4.169595e+00    1.411766e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Pb1\" symbol=\"Pb\" type=\"1\" atomic_number=\"82\">\n        <potential>\n        0    1    0.000000e+00    6.800000e+01\n        0    1    3.345942e+02    -3.245518e+01\n        0    1    7.554156e+00    -1.764896e+01\n        0    1    3.201153e+00    -7.542026e+00\n        0    2    5.117577e+03    -6.901676e+03\n        0    2    6.583186e+01    -2.426514e+02\n        0    2    1.119148e+00    -2.686847e+00\n        </potential>\n        <core num=\"34\">\n            <orbital type=\"0\" bc=\"6531.2544\">\n            5.341441e+05    1.974472e-02\n            4.059137e+04    1.085520e-01\n            6.160331e+03    3.979800e-01\n            1.335977e+03    6.046208e-01\n            2.670142e+02    3.861109e-02\n            1.149689e+02    4.891774e-02\n            2.014949e+02    1.008361e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"1016.6531\">\n            8.021998e+03    2.264351e-02\n            1.559323e+03    1.539134e-01\n            4.518366e+02    4.715735e-01\n            1.549029e+02    4.824037e-01\n            7.081715e+01    3.163589e-02\n            2.821050e+01    3.994888e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"1180.2097\">\n            5.341441e+05    8.171424e-03\n            4.059137e+04    4.492462e-02\n            6.160331e+03    1.647054e-01\n            1.335977e+03    2.502245e-01\n            2.652756e+03    6.037324e-02\n            2.014949e+02    1.101182e-02\n            8.177380e+00    1.042723e-02\n            3.550598e+00    2.516978e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"288.50414\">\n            5.341441e+05    3.952489e-03\n            4.059137e+04    2.172988e-02\n            6.160331e+03    7.966743e-02\n            1.335977e+03    1.210327e-01\n            2.652756e+03    3.482429e-02\n            3.356452e+01    1.056428e+00\n            1.374057e+01    2.668860e-01\n            1.578173e+00    3.339576e-03\n            6.446766e-01    7.705908e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"240.70348\">\n            8.021998e+03    1.277572e-02\n            1.559323e+03    8.683968e-02\n            4.518366e+02    2.660671e-01\n            1.549029e+02    2.721776e-01\n            2.078785e+00    9.057867e-03\n            7.755449e-01    5.898782e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"68.169460\">\n            5.341441e+05    2.116369e-03\n            4.059137e+04    1.163531e-02\n            6.160331e+03    4.265810e-02\n            1.335977e+03    6.480722e-02\n            2.652756e+03    1.057343e-02\n            3.356452e+01    1.167056e+00\n            1.374057e+01    2.948342e-01\n            1.578173e+00    2.073523e-03\n            6.446766e-01    4.784553e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"12.310360\">\n            5.341441e+05    9.778673e-04\n            4.059137e+04    5.376090e-03\n            6.160331e+03    1.971016e-02\n            1.335977e+03    2.994415e-02\n            2.652756e+03    3.086386e-03\n            3.356452e+01    6.470368e-01\n            1.374057e+01    1.634613e-01\n            1.578173e+00    1.205839e+00\n            6.446766e-01    2.782415e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"7.6878416\">\n            8.021998e+03    2.758740e-03\n            1.559323e+03    1.875182e-02\n            4.518366e+02    5.745350e-02\n            1.549029e+02    5.877298e-02\n            1.267788e+01    4.597806e-01\n            5.316224e+00    4.099928e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"52.183100\">\n            8.021998e+03    6.548585e-03\n            1.559323e+03    4.451232e-02\n            4.518366e+02    1.363808e-01\n            1.549029e+02    1.395129e-01\n            1.267788e+01    6.839064e-01\n            5.316224e+00    6.098490e-01\n            2.078785e+00    1.506723e-02\n            7.755449e-01    9.812276e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"11.670822\">\n            1.323809e+02    4.201447e-02\n            4.178515e+01    2.167005e-01\n            1.588522e+01    4.522038e-01\n            6.216465e+00    4.444109e-01\n            2.265790e+00    1.641702e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"32.912140\">\n            7.739088e+02    1.921431e-02\n            2.123687e+02    1.203716e-01\n            7.556823e+01    2.857639e-01\n            2.929984e+01    2.070114e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"189.78712\">\n            7.739088e+02    3.562056e-02\n            2.123687e+02    2.231517e-01\n            7.556823e+01    5.297651e-01\n            2.929984e+01    3.837692e-01\n            2.606878e+01    9.817937e-03\n            1.079897e+01    2.450247e-02\n            4.401687e+00    1.452283e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Bi1\" symbol=\"Bi\" type=\"1\" atomic_number=\"83\">\n        <potential>\n        0    1    0.000000e+00    6.800000e+01\n        0    1    3.532523e+02    -3.087336e+01\n        0    1    8.788539e+00    -1.862866e+01\n        0    1    3.130933e+00    -7.519923e+00\n        0    2    4.770345e+03    -7.110319e+03\n        0    2    6.002969e+01    -2.238539e+02\n        0    2    1.156867e+00    -2.405820e+00\n        </potential>\n        <core num=\"34\">\n            <orbital type=\"0\" bc=\"6719.6090\">\n            5.664029e+05    1.991978e-02\n            4.272825e+04    1.084627e-01\n            6.427628e+03    3.968563e-01\n            1.384302e+03    6.059809e-01\n            2.787654e+02    3.855249e-02\n            1.196200e+02    5.030315e-02\n            2.089484e+02    1.012059e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"1047.8370\">\n            8.323227e+03    2.261280e-02\n            1.612743e+03    1.535115e-01\n            4.663912e+02    4.710569e-01\n            1.597001e+02    4.832781e-01\n            7.316488e+01    3.175420e-02\n            2.914382e+01    4.022383e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"1219.5256\">\n            5.664029e+05    8.270370e-03\n            4.272825e+04    4.503196e-02\n            6.427628e+03    1.647683e-01\n            1.384302e+03    2.515934e-01\n            2.774629e+03    5.914958e-02\n            2.089484e+02    1.124416e-02\n            8.497441e+00    1.074335e-02\n            3.694375e+00    2.576774e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"299.65082\">\n            5.664029e+05    4.004475e-03\n            4.272825e+04    2.180427e-02\n            6.427628e+03    7.978004e-02\n            1.384302e+03    1.218204e-01\n            2.774629e+03    3.419788e-02\n            3.471407e+01    1.055621e+00\n            1.422432e+01    2.674770e-01\n            1.670083e+00    3.318727e-03\n            6.905768e-01    7.393068e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"249.67610\">\n            8.323227e+03    1.277915e-02\n            1.612743e+03    8.675373e-02\n            4.663912e+02    2.662078e-01\n            1.597001e+02    2.731143e-01\n            2.199622e+00    8.933002e-03\n            8.363468e-01    5.729860e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"71.673200\">\n            5.664029e+05    2.147802e-03\n            4.272825e+04    1.169473e-02\n            6.427628e+03    4.279006e-02\n            1.384302e+03    6.533842e-02\n            2.774629e+03    1.043350e-02\n            3.471407e+01    1.171893e+00\n            1.422432e+01    2.969383e-01\n            1.670083e+00    2.354879e-03\n            6.905768e-01    5.245921e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"13.385447\">\n            5.664029e+05    1.004063e-03\n            4.272825e+04    5.467098e-03\n            6.427628e+03    2.000367e-02\n            1.384302e+03    3.054466e-02\n            2.774629e+03    3.071493e-03\n            3.471407e+01    6.589934e-01\n            1.422432e+01    1.669781e-01\n            1.670083e+00    1.225433e+00\n            6.905768e-01    2.729875e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"8.4933852\">\n            8.323227e+03    2.818922e-03\n            1.612743e+03    1.913680e-02\n            4.663912e+02    5.872215e-02\n            1.597001e+02    6.024565e-02\n            1.314259e+01    4.713673e-01\n            5.534688e+00    4.203565e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"54.966000\">\n            8.323227e+03    6.576158e-03\n            1.612743e+03    4.464354e-02\n            4.663912e+02    1.369907e-01\n            1.597001e+02    1.405448e-01\n            1.314259e+01    6.846582e-01\n            5.534688e+00    6.105653e-01\n            2.199622e+00    1.531727e-02\n            8.363468e-01    9.824892e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"13.188045\">\n            1.364453e+02    4.254383e-02\n            4.328779e+01    2.178868e-01\n            1.656258e+01    4.525507e-01\n            6.542936e+00    4.418362e-01\n            2.418853e+00    1.601334e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"35.053900\">\n            8.016838e+02    1.915052e-02\n            2.199102e+02    1.203145e-01\n            7.828421e+01    2.870394e-01\n            3.039040e+01    2.094645e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"197.17268\">\n            8.016838e+02    3.525897e-02\n            2.199102e+02    2.215170e-01\n            7.828421e+01    5.284824e-01\n            3.039040e+01    3.856553e-01\n            2.715512e+01    9.975382e-03\n            1.130529e+01    2.519320e-02\n            4.636159e+00    1.512790e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Po1\" symbol=\"Po\" type=\"1\" atomic_number=\"84\">\n        <potential>\n        0    1    0.000000e+00    6.800000e+01\n        0    1    3.761923e+02    -2.793928e+01\n        0    1    1.039236e+01    -1.934910e+01\n        0    1    3.111308e+00    -7.996979e+00\n        0    2    4.612183e+03    -7.631720e+03\n        0    2    5.543823e+01    -2.219538e+02\n        0    2    1.099238e+00    -1.550290e+00\n        </potential>\n        <core num=\"34\">\n            <orbital type=\"0\" bc=\"6911.7656\">\n            6.005359e+05    2.010310e-02\n            4.498041e+04    1.083926e-01\n            6.706596e+03    3.957331e-01\n            1.434233e+03    6.073169e-01\n            2.911599e+02    3.846977e-02\n            1.244600e+02    5.174752e-02\n            2.166603e+02    1.015525e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"1079.6279\">\n            8.633443e+03    2.258652e-02\n            1.667493e+03    1.531295e-01\n            4.812575e+02    4.705597e-01\n            1.645937e+02    4.841025e-01\n            7.557288e+01    3.187815e-02\n            3.010295e+01    4.052008e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"1259.8424\">\n            6.005359e+05    8.373678e-03\n            4.498041e+04    4.514948e-02\n            6.706596e+03    1.648373e-01\n            1.434233e+03    2.529697e-01\n            2.902707e+03    5.792081e-02\n            2.166603e+02    1.148299e-02\n            8.827412e+00    1.107537e-02\n            3.842130e+00    2.640433e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"311.13778\">\n            6.005359e+05    4.058625e-03\n            4.498041e+04    2.188343e-02\n            6.706596e+03    7.989475e-02\n            1.434233e+03    1.226115e-01\n            2.902707e+03    3.356623e-02\n            3.589477e+01    1.054692e+00\n            1.472367e+01    2.681120e-01\n            1.765559e+00    3.301523e-03\n            7.374273e-01    7.085223e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"258.88636\">\n            8.633443e+03    1.278445e-02\n            1.667493e+03    8.667454e-02\n            4.812575e+02    2.663467e-01\n            1.645937e+02    2.740123e-01\n            2.323357e+00    8.859667e-03\n            8.985772e-01    5.584725e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"75.320160\">\n            6.005359e+05    2.180211e-03\n            4.498041e+04    1.175534e-02\n            6.706596e+03    4.291784e-02\n            1.434233e+03    6.586441e-02\n            2.902707e+03    1.029230e-02\n            3.589477e+01    1.176550e+00\n            1.472367e+01    2.990894e-01\n            1.765559e+00    2.673176e-03\n            7.374273e-01    5.736761e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"14.522737\">\n            6.005359e+05    1.030740e-03\n            4.498041e+04    5.557579e-03\n            6.706596e+03    2.029030e-02\n            1.434233e+03    3.113876e-02\n            2.902707e+03    3.055656e-03\n            3.589477e+01    6.707732e-01\n            1.472367e+01    1.705165e-01\n            1.765559e+00    1.245654e+00\n            7.374273e-01    2.673232e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"9.3477268\">\n            8.633443e+03    2.878185e-03\n            1.667493e+03    1.951319e-02\n            4.812575e+02    5.996310e-02\n            1.645937e+02    6.168886e-02\n            1.361899e+01    4.826986e-01\n            5.759339e+00    4.305844e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"57.858900\">\n            8.633443e+03    6.604338e-03\n            1.667493e+03    4.477534e-02\n            4.812575e+02    1.375925e-01\n            1.645937e+02    1.415524e-01\n            1.361899e+01    6.853055e-01\n            5.759339e+00    6.113170e-01\n            2.323357e+00    1.559451e-02\n            8.985772e-01    9.830062e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"14.793043\">\n            1.389815e+02    4.405980e-02\n            4.427568e+01    2.224518e-01\n            1.704614e+01    4.547399e-01\n            6.803365e+00    4.360428e-01\n            2.554046e+00    1.534935e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"37.288558\">\n            8.286368e+02    1.915156e-02\n            2.272032e+02    1.205647e-01\n            8.090108e+01    2.885980e-01\n            3.143327e+01    2.114702e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"204.74861\">\n            8.286368e+02    3.502436e-02\n            2.272032e+02    2.204886e-01\n            8.090108e+01    5.277877e-01\n            3.143327e+01    3.867364e-01\n            2.828874e+01    9.957523e-03\n            1.183466e+01    2.550149e-02\n            4.878431e+00    1.551388e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"At1\" symbol=\"At\" type=\"1\" atomic_number=\"85\">\n        <potential>\n        0    1    0.000000e+00    6.800000e+01\n        0    1    3.926122e+02    -3.070002e+01\n        0    1    1.125226e+01    -1.855302e+01\n        0    1    3.700868e+00    -8.080579e+00\n        0    2    4.701506e+03    -7.515548e+03\n        0    2    4.529843e+01    -2.089813e+02\n        0    2    1.324535e+00    -2.208494e+00\n        </potential>\n        <core num=\"34\">\n            <orbital type=\"0\" bc=\"7107.8476\">\n            6.366627e+05    2.029520e-02\n            4.735586e+04    1.083430e-01\n            6.998004e+03    3.946125e-01\n            1.485869e+03    6.086274e-01\n            3.042431e+02    3.836574e-02\n            1.294960e+02    5.325298e-02\n            2.246464e+02    1.018374e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"1111.9884\">\n            8.953691e+03    2.256167e-02\n            1.723751e+03    1.527500e-01\n            4.964799e+02    4.700584e-01\n            1.695920e+02    4.849299e-01\n            7.804048e+01    3.200251e-02\n            3.108457e+01    4.082515e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"1301.1571\">\n            6.366627e+05    8.481292e-03\n            4.735586e+04    4.527617e-02\n            6.998004e+03    1.649072e-01\n            1.485869e+03    2.543433e-01\n            3.037215e+03    5.669577e-02\n            2.246464e+02    1.172300e-02\n            9.167218e+00    1.142172e-02\n            3.993346e+00    2.706977e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"322.93212\">\n            6.366627e+05    4.114772e-03\n            4.735586e+04    2.196613e-02\n            6.998004e+03    8.000616e-02\n            1.485869e+03    1.233969e-01\n            3.037215e+03    3.294287e-02\n            3.711120e+01    1.053523e+00\n            1.524462e+01    2.688838e-01\n            1.864578e+00    3.281989e-03\n            7.850906e-01    6.774653e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"268.29584\">\n            8.953691e+03    1.278998e-02\n            1.723751e+03    8.659245e-02\n            4.964799e+02    2.664713e-01\n            1.695920e+02    2.749018e-01\n            2.449806e+00    8.811177e-03\n            9.619672e-01    5.445738e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"79.072780\">\n            6.366627e+05    2.213493e-03\n            4.735586e+04    1.181641e-02\n            6.998004e+03    4.303836e-02\n            1.485869e+03    6.637987e-02\n            3.037215e+03    1.016001e-02\n            3.711120e+01    1.180870e+00\n            1.524462e+01    3.013857e-01\n            1.864578e+00    3.037380e-03\n            7.850906e-01    6.269733e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"15.685012\">\n            6.366627e+05    1.057776e-03\n            4.735586e+04    5.646788e-03\n            6.998004e+03    2.056702e-02\n            1.485869e+03    3.172138e-02\n            3.037215e+03    3.044346e-03\n            3.711120e+01    6.822283e-01\n            1.524462e+01    1.741207e-01\n            1.864578e+00    1.266285e+00\n            7.850906e-01    2.613856e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"10.213783\">\n            8.953691e+03    2.936096e-03\n            1.723751e+03    1.987835e-02\n            4.964799e+02    6.117174e-02\n            1.695920e+02    6.310706e-02\n            1.410623e+01    4.938638e-01\n            5.989433e+00    4.405756e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"60.822760\">\n            8.953691e+03    6.632285e-03\n            1.723751e+03    4.490279e-02\n            4.964799e+02    1.381795e-01\n            1.695920e+02    1.425512e-01\n            1.410623e+01    6.860229e-01\n            5.989433e+00    6.120006e-01\n            2.449806e+00    1.587999e-02\n            9.619672e-01    9.814612e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"16.446274\">\n            1.444920e+02    4.378587e-02\n            4.619546e+01    2.214108e-01\n            1.787265e+01    4.540671e-01\n            7.186670e+00    4.356253e-01\n            2.729331e+00    1.518893e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"39.576586\">\n            8.561902e+02    1.915068e-02\n            2.346489e+02    1.207967e-01\n            8.357131e+01    2.901104e-01\n            3.249777e+01    2.134552e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"212.47517\">\n            8.561902e+02    3.479403e-02\n            2.346489e+02    2.194702e-01\n            8.357131e+01    5.270888e-01\n            3.249777e+01    3.878173e-01\n            2.944780e+01    9.942086e-03\n            1.237653e+01    2.581128e-02\n            5.126437e+00    1.589788e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Rn1\" symbol=\"Rn\" type=\"1\" atomic_number=\"86\">\n        <potential>\n        0    1    0.000000e+00    6.800000e+01\n        0    1    5.599171e+02    -3.051871e+01\n        0    1    2.250929e+01    -2.337127e+01\n        0    1    3.456274e+00    -1.056940e+01\n        0    2    5.099139e+03    -6.572529e+03\n        0    2    4.497361e+01    -1.656966e+02\n        0    2    1.240549e+00    -1.181296e+00\n        </potential>\n        <core num=\"34\">\n            <orbital type=\"0\" bc=\"7307.9100\">\n            6.748933e+05    2.049634e-02\n            4.986148e+04    1.083145e-01\n            7.302420e+03    3.934954e-01\n            1.539262e+03    6.099120e-01\n            3.180612e+02    3.823758e-02\n            1.347343e+02    5.481627e-02\n            2.328756e+02    1.021127e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"1144.9259\">\n            9.284304e+03    2.253826e-02\n            1.781558e+03    1.523732e-01\n            5.120667e+02    4.695532e-01\n            1.746969e+02    4.857599e-01\n            8.056918e+01    3.212732e-02\n            3.208910e+01    4.113894e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"1343.4916\">\n            6.748933e+05    8.593323e-03\n            4.986148e+04    4.541206e-02\n            7.302420e+03    1.649774e-01\n            1.539262e+03    2.557125e-01\n            3.178288e+03    5.547729e-02\n            2.328756e+02    1.197033e-02\n            9.519502e+00    1.177833e-02\n            4.151486e+00    2.780972e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"335.04200\">\n            6.748933e+05    4.172600e-03\n            4.986148e+04    2.205042e-02\n            7.302420e+03    8.010691e-02\n            1.539262e+03    1.241645e-01\n            3.178288e+03    3.231804e-02\n            3.836433e+01    1.052108e+00\n            1.578896e+01    2.697879e-01\n            1.967190e+00    3.257334e-03\n            8.335464e-01    6.462859e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"277.90762\">\n            9.284304e+03    1.279577e-02\n            1.781558e+03    8.650765e-02\n            5.120667e+02    2.665820e-01\n            1.746969e+02    2.757831e-01\n            2.579154e+00    8.783177e-03\n            1.026515e+00    5.314652e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"82.934740\">\n            6.748933e+05    2.247749e-03\n            4.986148e+04    1.187840e-02\n            7.302420e+03    4.315301e-02\n            1.539262e+03    6.688651e-02\n            3.178288e+03    1.002687e-02\n            3.836433e+01    1.184923e+00\n            1.578896e+01    3.038451e-01\n            1.967190e+00    3.401957e-03\n            8.335464e-01    6.749805e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"16.875387\">\n            6.748933e+05    1.085198e-03\n            4.986148e+04    5.734809e-03\n            7.302420e+03    2.083398e-02\n            1.539262e+03    3.229235e-02\n            3.178288e+03    3.031745e-03\n            3.836433e+01    6.933854e-01\n            1.578896e+01    1.778021e-01\n            1.967190e+00    1.287010e+00\n            8.335464e-01    2.553550e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"11.094423\">\n            9.284304e+03    2.992507e-03\n            1.781558e+03    2.023127e-02\n            5.120667e+02    6.234469e-02\n            1.746969e+02    6.449653e-02\n            1.460451e+01    5.048266e-01\n            6.225015e+00    4.503100e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"63.859580\">\n            9.284304e+03    6.659986e-03\n            1.781558e+03    4.502579e-02\n            5.120667e+02    1.387515e-01\n            1.746969e+02    1.435405e-01\n            1.460451e+01    6.867955e-01\n            6.225015e+00    6.126280e-01\n            2.579154e+00    1.616953e-02\n            1.026515e+00    9.784097e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"18.149190\">\n            1.459621e+02    4.613231e-02\n            4.672784e+01    2.295318e-01\n            1.814779e+01    4.588101e-01\n            7.365236e+00    4.261785e-01\n            2.841600e+00    1.425553e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"41.919560\">\n            8.860628e+02    1.907747e-02\n            2.427296e+02    1.206621e-01\n            8.647772e+01    2.912118e-01\n            3.366670e+01    2.158706e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"220.35392\">\n            8.860628e+02    3.444229e-02\n            2.427296e+02    2.178422e-01\n            8.647772e+01    5.257511e-01\n            3.366670e+01    3.897307e-01\n            3.059515e+01    1.012055e-02\n            1.291376e+01    2.653624e-02\n            5.376237e+00    1.651825e-02\n            </orbital>\n        </core>\n    </atom>\n</core_info>\n"
  },
  {
    "path": "src/madness/chem/coredata/mcp2",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<core_info>\n    <atom id=\"Li\" symbol=\"Li\" atomic_number=\"3\">\n        <potential>\n        0    1    0.000000e+00    2.000000e+00\n        0    1    2.718422e+00    -1.404070e+00\n        0    1    1.061906e+00    -2.040843e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"4.9554840\">\n            7.105793e+02    2.009533e-03\n            1.034368e+02    1.482329e-02\n            2.443300e+01    6.640480e-02\n            7.308967e+00    1.990801e-01\n            2.506894e+00    3.819108e-01\n            9.438003e-01    3.884663e-01\n            3.709710e-01    1.099967e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Be\" symbol=\"Be\" atomic_number=\"4\">\n        <potential>\n        0    1    0.000000e+00    2.000000e+00\n        0    1    5.188992e+00    -1.397212e+00\n        0    1    2.023980e+00    -2.122203e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"9.4653380\">\n            1.311616e+03    1.969894e-03\n            1.913861e+02    1.451971e-02\n            4.527883e+01    6.534285e-02\n            1.359732e+01    1.982694e-01\n            4.719701e+00    3.835307e-01\n            1.817344e+00    3.845043e-01\n            7.340121e-01    1.096769e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"B\" symbol=\"B\" atomic_number=\"5\">\n        <potential>\n        0    1    0.000000e+00    2.000000e+00\n        0    1    1.603560e+01    -1.518700e+00\n        0    1    2.322329e+00    -2.808786e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"15.390670\">\n            2.787867e+02    2.477011e-02\n            3.826330e+01    1.678633e-01\n            8.576375e+00    4.977570e-01\n            2.360978e+00    4.542732e-01\n            2.929847e-01    8.554471e-03\n            9.375142e-02    6.986010e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"C\" symbol=\"C\" atomic_number=\"6\">\n        <potential>\n        0    1    0.000000e+00    2.000000e+00\n        0    1    1.864605e+01    -1.582358e+00\n        0    1    3.512100e+00    -2.257663e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"22.651036\">\n            4.090699e+02    2.446620e-02\n            5.616343e+01    1.667309e-01\n            1.263216e+01    4.985016e-01\n            3.495336e+00    4.533167e-01\n            4.607115e-01    9.069870e-03\n            1.436420e-01    7.456826e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"N\" symbol=\"N\" atomic_number=\"7\">\n        <potential>\n        0    1    0.000000e+00    2.000000e+00\n        0    1    2.763930e+01    -1.595784e+00\n        0    1    5.022100e+00    -2.624201e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"31.258000\">\n            5.635094e+02    2.422667e-02\n            7.738753e+01    1.657101e-01\n            1.744855e+01    4.979887e-01\n            4.843508e+00    4.511053e-01\n            7.820957e+00    1.334650e-03\n            6.633018e-01    9.410938e-03\n            2.029459e-01    7.779541e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"O\" symbol=\"O\" atomic_number=\"8\">\n        <potential>\n        0    1    0.000000e+00    2.000000e+00\n        0    1    4.064864e+01    -1.695591e+00\n        0    1    5.175230e+00    -2.183506e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"41.337314\">\n            7.432411e+02    2.413306e-02\n            1.020870e+02    1.655533e-01\n            2.305897e+01    4.996164e-01\n            6.416186e+00    4.517950e-01\n            9.065320e-01    9.761350e-03\n            2.740610e-01    7.992775e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"F\" symbol=\"F\" atomic_number=\"9\">\n        <potential>\n        0    1    0.000000e+00    2.000000e+00\n        0    1    5.202781e+01    -1.715359e+00\n        0    1    6.206354e+00    -2.299835e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"52.765500\">\n            9.476157e+02    2.401760e-02\n            1.301841e+02    1.651131e-01\n            2.944885e+01    4.998040e-01\n            8.208941e+00    4.514980e-01\n            1.184390e+00    1.005990e-02\n            3.545967e-01    8.202500e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ne\" symbol=\"Ne\" atomic_number=\"10\">\n        <potential>\n        0    1    0.000000e+00    2.000000e+00\n        0    1    5.407668e+01    -1.635342e+00\n        0    1    7.612973e+00    -2.108811e-01\n        </potential>\n        <core num=\"1\">\n            <orbital type=\"0\" bc=\"65.544850\">\n            1.175870e+03    2.394744e-02\n            1.615680e+02    1.648909e-01\n            3.659069e+01    5.001582e-01\n            1.021284e+01    4.509687e-01\n            1.497330e+00    1.025659e-02\n            4.446700e-01    8.352764e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Na\" symbol=\"Na\" atomic_number=\"11\">\n        <potential>\n        0    1    0.000000e+00    4.000000e+00\n        0    1    3.050656e+02    -1.743249e+00\n        0    1    1.464675e+01    -1.513124e+00\n        0    1    2.136867e+00    -8.039920e-01\n        0    2    4.718427e+02    -1.590759e+02\n        0    2    2.052377e+02    -4.548875e+00\n        0    2    6.894609e-01    -4.851126e-01\n        </potential>\n        <core num=\"2\">\n            <orbital type=\"0\" bc=\"80.957000\">\n            1.437387e+03    2.371636e-02\n            1.975242e+02    1.636571e-01\n            4.477766e+01    4.987114e-01\n            1.251831e+01    4.529699e-01\n            1.910040e+00    1.062412e-02\n            6.071710e-01    8.547746e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"5.5940000\">\n            1.437387e+03    6.294799e-03\n            1.975242e+02    4.343787e-02\n            4.477766e+01    1.323680e-01\n            1.251831e+01    1.202273e-01\n            2.156724e+01    8.952974e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Mg\" symbol=\"Mg\" atomic_number=\"12\">\n        <potential>\n        0    1    0.000000e+00    4.000000e+00\n        0    1    3.371815e+02    -1.693663e+00\n        0    1    1.582292e+01    -1.422796e+00\n        0    1    2.309331e+00    -7.518502e-01\n        0    2    5.552475e+02    -1.581608e+02\n        0    2    2.797939e+02    -4.956377e+00\n        0    2    7.681323e-01    -4.550130e-01\n        </potential>\n        <core num=\"2\">\n            <orbital type=\"0\" bc=\"98.063470\">\n            1.726576e+03    2.350363e-02\n            2.373122e+02    1.624787e-01\n            5.384661e+01    4.972212e-01\n            1.507884e+01    4.549977e-01\n            2.375296e+00    1.102567e-02\n            7.937981e-01    8.641283e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"7.5354400\">\n            1.726576e+03    6.466155e-03\n            2.373122e+02    4.470000e-02\n            5.384661e+01    1.367920e-01\n            1.507884e+01    1.251758e-01\n            2.586516e+01    9.284621e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Al\" symbol=\"Al\" atomic_number=\"13\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.316953e+02    -3.386013e+00\n        0    1    5.217324e+00    -6.046747e+00\n        0    1    2.331459e+00    -3.647381e-01\n        0    2    9.142273e+02    -1.140686e+02\n        0    2    2.077560e+02    -4.208050e+01\n        0    2    1.251080e+00    -3.349915e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"76.051300\">\n            2.043808e+03    2.330614e-02\n            2.809367e+02    1.613919e-01\n            6.378912e+01    4.958434e-01\n            1.788862e+01    4.569062e-01\n            2.886838e+00    1.142757e-02\n            9.993500e-01    8.659862e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"6.3839100\">\n            2.043808e+03    6.603905e-03\n            2.809367e+02    4.573118e-02\n            6.378912e+01    1.404996e-01\n            1.788862e+01    1.294666e-01\n            3.061927e+01    9.566236e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"4.1837900\">\n            1.089621e+02    1.824312e-02\n            2.363035e+01    1.212105e-01\n            7.107732e+00    3.571781e-01\n            2.366064e+00    4.993906e-01\n            8.025018e-01    2.309303e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Si\" symbol=\"Si\" atomic_number=\"14\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.349863e+02    -3.320043e+00\n        0    1    4.335714e+00    -5.901880e+00\n        0    1    4.547902e+00    3.453667e-01\n        0    2    8.540638e+02    -1.218275e+02\n        0    2    2.119761e+02    -3.822756e+01\n        0    2    9.980917e-01    -3.460521e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"82.574880\">\n            2.387957e+03    2.313729e-02\n            3.282802e+02    1.604502e-01\n            7.458612e+01    4.946216e-01\n            2.094412e+01    4.585802e-01\n            3.444621e+00    1.181110e-02\n            1.222284e+00    8.622046e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"5.1072648\">\n            1.348228e+02    1.731180e-02\n            2.936148e+01    1.169748e-01\n            8.890635e+00    3.531863e-01\n            3.000349e+00    5.034634e-01\n            1.037602e+00    2.287471e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"7.3878360\">\n            2.387957e+03    6.719179e-03\n            3.282802e+02    4.659548e-02\n            7.458612e+01    1.436404e-01\n            2.094412e+01    1.331738e-01\n            3.582222e+01    9.806896e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"P\" symbol=\"P\" atomic_number=\"15\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.269965e+02    -2.738258e+00\n        0    1    5.125039e+00    -5.713482e+00\n        0    1    2.849041e+00    3.351582e-01\n        0    2    1.169129e+03    -7.823903e+01\n        0    2    1.843911e+02    -2.594858e+01\n        0    2    1.326776e+00    -2.364182e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"87.966687\">\n            2.759337e+03    2.298844e-02\n            3.793730e+02    1.596162e-01\n            8.624196e+01    4.935288e-01\n            2.424595e+01    4.600765e-01\n            4.049327e+00    1.216849e-02\n            1.462091e+00    8.553915e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"5.9410450\">\n            1.635738e+02    1.653283e-02\n            3.574204e+01    1.133241e-01\n            1.088147e+01    3.493311e-01\n            3.713289e+00    5.065666e-01\n            1.304009e+00    2.282030e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"8.2622100\">\n            2.759337e+03    6.815474e-03\n            3.793730e+02    4.732204e-02\n            8.624196e+01    1.463184e-01\n            2.424595e+01    1.364007e-01\n            4.146794e+01    1.001408e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"S\" symbol=\"S\" atomic_number=\"16\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.155917e+02    -3.620214e+00\n        0    1    5.971141e+00    -5.737309e+00\n        0    1    2.859090e+00    4.704707e-01\n        0    2    2.062680e+03    -3.776082e+01\n        0    2    1.487138e+02    -3.431947e+01\n        0    2    1.644010e+00    -2.288331e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"96.604672\">\n            3.158033e+03    2.285572e-02\n            4.342273e+02    1.588694e-01\n            9.875946e+01    4.925416e-01\n            2.779522e+01    4.614278e-01\n            4.703444e+00    1.248984e-02\n            1.720138e+00    8.475957e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"7.0166355\">\n            1.931031e+02    1.615636e-02\n            4.229557e+01    1.118467e-01\n            1.292618e+01    3.491943e-01\n            4.446308e+00    5.094185e-01\n            1.575364e+00    2.231922e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"9.4545045\">\n            3.158033e+03    6.897386e-03\n            4.342273e+02    4.794350e-02\n            9.875946e+01    1.486389e-01\n            2.779522e+01    1.392494e-01\n            4.754841e+01    1.019635e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Cl\" symbol=\"Cl\" atomic_number=\"17\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.120543e+02    -2.654674e+00\n        0    1    6.860978e+00    -5.707226e+00\n        0    1    2.789429e+00    6.518503e-01\n        0    2    1.667526e+03    -3.516025e+01\n        0    2    1.070677e+02    -3.284686e+01\n        0    2    3.574553e+00    -9.898434e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"104.88440\">\n            3.584292e+03    2.273479e-02\n            4.928774e+02    1.581851e-01\n            1.121465e+02    4.916240e-01\n            3.159387e+01    4.626829e-01\n            5.405644e+00    1.279159e-02\n            1.995106e+00    8.399245e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"8.0722000\">\n            2.239078e+02    1.596166e-02\n            4.916041e+01    1.112272e-01\n            1.507759e+01    3.501497e-01\n            5.222262e+00    5.115647e-01\n            1.862470e+00    2.176059e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"10.607500\">\n            3.584292e+03    6.966199e-03\n            4.928774e+02    4.846974e-02\n            1.121465e+02    1.506392e-01\n            3.159387e+01    1.417713e-01\n            5.406610e+01    1.035544e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ar\" symbol=\"Ar\" atomic_number=\"18\">\n        <potential>\n        0    1    0.000000e+00    1.000000e+01\n        0    1    1.316953e+02    -9.029367e+00\n        0    1    5.217324e+00    -1.612466e+01\n        0    1    2.331459e+00    -9.726350e-01\n        0    2    9.142273e+02    -3.041829e+02\n        0    2    2.077560e+02    -1.122147e+02\n        0    2    1.251080e+00    -8.933106e-01\n        </potential>\n        <core num=\"5\">\n            <orbital type=\"0\" bc=\"76.051300\">\n            2.043808e+03    2.330614e-02\n            2.809367e+02    1.613919e-01\n            6.378912e+01    4.958434e-01\n            1.788862e+01    4.569062e-01\n            2.886838e+00    1.142757e-02\n            9.993500e-01    8.659862e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"4.1837900\">\n            1.089621e+02    1.824312e-02\n            2.363035e+01    1.212105e-01\n            7.107732e+00    3.571781e-01\n            2.366064e+00    4.993906e-01\n            8.025018e-01    2.309303e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"6.3839100\">\n            2.043808e+03    6.603905e-03\n            2.809367e+02    4.573118e-02\n            6.378912e+01    1.404996e-01\n            1.788862e+01    1.294666e-01\n            3.061927e+01    9.566236e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"K\" symbol=\"K\" atomic_number=\"19\">\n        <potential>\n        0    1    0.000000e+00    1.200000e+01\n        0    1    1.165002e+02    -6.815450e+00\n        0    1    8.900975e+00    -5.215410e+00\n        0    1    3.035128e-01    -1.866213e-01\n        0    2    1.887663e+03    -1.595243e+02\n        0    2    1.854639e+02    -5.261246e+01\n        0    2    1.596409e+00    -3.662524e+00\n        </potential>\n        <core num=\"6\">\n            <orbital type=\"0\" bc=\"3.4975600\">\n            4.734263e+03    2.216103e-03\n            6.514608e+02    1.553145e-02\n            1.484022e+02    4.954343e-02\n            4.196838e+01    5.035876e-02\n            6.816142e+01    4.017761e-02\n            6.770286e-01    7.829351e-01\n            2.602544e-01    4.122532e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"267.06608\">\n            4.734263e+03    2.126296e-02\n            6.514608e+02    1.490203e-01\n            1.484022e+02    4.753568e-01\n            4.196838e+01    4.831797e-01\n            7.097100e+00    1.941763e-02\n            2.791745e+00    1.356118e-02\n            4.663554e+00    4.197652e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"23.038560\">\n            1.735091e+02    3.641247e-02\n            3.760621e+01    2.230816e-01\n            1.115757e+01    5.296130e-01\n            3.680917e+00    3.941468e-01\n            1.439472e+00    6.592606e-03\n            5.215131e-01    1.100807e-02\n            1.902026e-01    4.409938e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"28.979920\">\n            4.734263e+03    6.686011e-03\n            6.514608e+02    4.685857e-02\n            1.484022e+02    1.494731e-01\n            4.196838e+01    1.519330e-01\n            6.816142e+01    1.061468e-01\n            4.663554e+00    2.218768e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ca\" symbol=\"Ca\" atomic_number=\"20\">\n        <potential>\n        0    1    0.000000e+00    1.200000e+01\n        0    1    1.267215e+02    -6.552351e+00\n        0    1    9.963899e+00    -4.778063e+00\n        0    1    3.241862e-01    -1.760750e-01\n        0    2    1.502502e+03    -1.925403e+02\n        0    2    2.020013e+02    -5.803146e+01\n        0    2    1.617474e+00    -3.299848e+00\n        </potential>\n        <core num=\"6\">\n            <orbital type=\"0\" bc=\"4.4907400\">\n            5.269373e+03    2.335822e-03\n            7.251419e+02    1.638271e-02\n            1.652354e+02    5.236452e-02\n            4.676625e+01    5.344078e-02\n            7.592187e+01    4.269463e-02\n            8.076661e-01    8.100857e-01\n            3.256016e-01    3.956857e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"298.72740\">\n            5.269373e+03    2.116644e-02\n            7.251419e+02    1.484547e-01\n            1.652354e+02    4.745100e-01\n            4.676625e+01    4.842626e-01\n            7.983490e+00    1.968437e-02\n            3.169474e+00    1.355669e-02\n            5.360188e+00    4.184384e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"27.258600\">\n            1.986128e+02    3.537530e-02\n            4.314738e+01    2.190453e-01\n            1.286298e+01    5.275969e-01\n            4.278264e+00    3.976240e-01\n            1.712917e+00    7.288671e-03\n            6.380574e-01    1.177173e-02\n            2.397383e-01    4.039566e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"33.645480\">\n            5.269373e+03    6.728304e-03\n            7.251419e+02    4.719017e-02\n            1.652354e+02    1.508353e-01\n            4.676625e+01    1.539355e-01\n            7.592187e+01    1.073839e-01\n            5.360188e+00    2.391065e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ga2\" symbol=\"Ga\" type=\"2\" atomic_number=\"31\">\n        <potential>\n        0    1    0.000000e+00    2.800000e+01\n        0    1    1.770724e+02    -1.170695e+01\n        0    1    4.230505e+00    -1.488350e+01\n        0    1    9.892221e-01    -5.178489e-01\n        0    2    1.077689e+03    -3.556251e+02\n        0    2    1.792821e+02    -5.882823e+01\n        0    2    8.663673e-01    -1.691885e+00\n        </potential>\n        <core num=\"14\">\n            <orbital type=\"0\" bc=\"492.46395\">\n            1.313743e+04    2.037141e-02\n            1.808839e+03    1.437043e-01\n            4.130223e+02    4.670565e-01\n            1.176649e+02    4.935966e-01\n            2.120531e+01    2.218001e-02\n            8.686230e+00    1.380392e-02\n            1.626113e+01    4.226503e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"55.242240\">\n            5.594101e+02    3.178940e-02\n            1.230426e+02    2.075653e-01\n            3.768391e+01    5.272335e-01\n            1.297468e+01    3.991191e-01\n            4.693424e+00    1.375409e-02\n            1.453593e+00    1.375376e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"62.618952\">\n            1.313743e+04    6.927090e-03\n            1.808839e+03    4.886519e-02\n            4.130223e+02    1.588178e-01\n            1.176649e+02    1.678425e-01\n            1.907904e+02    1.151553e-01\n            1.626113e+01    2.799764e-03\n            1.518955e-01    1.211912e-03\n            5.076494e-02    3.942917e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"8.3130544\">\n            1.313743e+04    2.671470e-03\n            1.808839e+03    1.884513e-02\n            4.130223e+02    6.124896e-02\n            1.176649e+02    6.472939e-02\n            1.907904e+02    5.170179e-02\n            2.597655e+00    8.106145e-01\n            1.041160e+00    4.241170e-01\n            1.518955e-01    3.263973e-03\n            5.076494e-02    1.061923e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"5.8270790\">\n            5.594101e+02    1.188250e-02\n            1.230426e+02    7.758545e-02\n            3.768391e+01    1.970736e-01\n            1.297468e+01    1.491860e-01\n            5.870788e+01    2.823686e-02\n            </orbital>\n            <orbital type=\"2\" bc=\"1.5513810\">\n            3.393704e+01    9.107488e-02\n            8.526278e+00    3.687624e-01\n            2.490394e+00    5.407529e-01\n            6.801859e-01    3.269504e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ge2\" symbol=\"Ge\" type=\"2\" atomic_number=\"32\">\n        <potential>\n        0    1    0.000000e+00    2.800000e+01\n        0    1    1.475185e+02    -1.160870e+01\n        0    1    4.276358e+00    -1.489067e+01\n        0    1    3.200115e+00    4.446479e-01\n        0    2    9.634012e+02    -2.667329e+02\n        0    2    1.608157e+02    -7.570730e+01\n        0    2    8.915900e-01    -1.494415e+00\n        </potential>\n        <core num=\"14\">\n            <orbital type=\"0\" bc=\"486.29328\">\n            1.412554e+04    2.015314e-02\n            1.945092e+03    1.423197e-01\n            4.441943e+02    4.644349e-01\n            1.266081e+02    4.966870e-01\n            2.269153e+01    2.350805e-02\n            9.321496e+00    1.452473e-02\n            1.751443e+01    4.954463e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"55.483380\">\n            6.034712e+02    3.140655e-02\n            1.328293e+02    2.058783e-01\n            4.074483e+01    5.258956e-01\n            1.406095e+01    4.010603e-01\n            5.183914e+00    1.413023e-02\n            1.643302e+00    1.447252e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"62.580420\">\n            1.412554e+04    6.876497e-03\n            1.945092e+03    4.856122e-02\n            4.441943e+02    1.584708e-01\n            1.266081e+02    1.694757e-01\n            2.040504e+02    1.154084e-01\n            1.751443e+01    2.900941e-03\n            1.916898e-01    1.423946e-03\n            6.432966e-02    4.240571e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"8.6291880\">\n            1.412554e+04    2.680038e-03\n            1.945092e+03    1.892619e-02\n            4.441943e+02    6.176224e-02\n            1.266081e+02    6.605125e-02\n            2.040504e+02    5.244679e-02\n            2.817345e+00    8.169395e-01\n            1.151078e+00    4.201687e-01\n            1.916898e-01    3.436330e-03\n            6.432966e-02    1.023354e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"6.1939200\">\n            6.034712e+02    1.200499e-02\n            1.328293e+02    7.869587e-02\n            4.074483e+01    2.010208e-01\n            1.406095e+01    1.533032e-01\n            6.233043e+01    2.729073e-02\n            </orbital>\n            <orbital type=\"2\" bc=\"1.9618680\">\n            3.926423e+01    8.537630e-02\n            9.980528e+00    3.585446e-01\n            2.983177e+00    5.445484e-01\n            8.497422e-01    3.238528e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"As2\" symbol=\"As\" type=\"2\" atomic_number=\"33\">\n        <potential>\n        0    1    0.000000e+00    2.800000e+01\n        0    1    1.333456e+02    -1.306261e+01\n        0    1    4.666478e+00    -1.494674e+01\n        0    1    1.981306e+00    4.730957e-01\n        0    2    7.345525e+02    -2.051308e+02\n        0    2    1.341873e+02    -8.344618e+01\n        0    2    1.289440e+00    -9.240559e-01\n        </potential>\n        <core num=\"14\">\n            <orbital type=\"0\" bc=\"475.84482\">\n            1.504748e+04    2.011970e-02\n            2.072094e+03    1.421216e-01\n            4.732470e+02    4.641367e-01\n            1.349364e+02    4.970613e-01\n            2.428569e+01    2.352967e-02\n            1.001257e+01    1.455887e-02\n            1.881352e+01    4.934949e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"55.169120\">\n            6.496252e+02    3.102053e-02\n            1.430851e+02    2.041373e-01\n            4.395584e+01    5.244461e-01\n            1.520359e+01    4.031635e-01\n            5.693779e+00    1.456793e-02\n            1.843026e+00    1.517755e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"61.940813\">\n            1.504748e+04    6.888015e-03\n            2.072094e+03    4.865559e-02\n            4.732470e+02    1.588980e-01\n            1.349364e+02    1.701698e-01\n            2.174671e+02    1.158352e-01\n            1.881352e+01    3.079572e-03\n            2.339273e-01    1.804417e-03\n            7.920690e-02    5.183852e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"8.8325853\">\n            1.504748e+04    2.713164e-03\n            2.072094e+03    1.916526e-02\n            4.732470e+02    6.258935e-02\n            1.349364e+02    6.702927e-02\n            2.174671e+02    5.327741e-02\n            3.046407e+00    8.256403e-01\n            1.265088e+00    4.140791e-01\n            2.339273e-01    3.595445e-03\n            7.920690e-02    1.032924e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"6.4687590\">\n            6.496252e+02    1.210706e-02\n            1.430851e+02    7.967311e-02\n            4.395584e+01    2.046870e-01\n            1.520359e+01    1.573514e-01\n            6.605645e+01    2.663506e-02\n            </orbital>\n            <orbital type=\"2\" bc=\"2.3239260\">\n            4.469596e+01    8.114536e-02\n            1.146926e+01    3.508263e-01\n            3.490297e+00    5.477342e-01\n            1.026268e+00    3.208275e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Se2\" symbol=\"Se\" type=\"2\" atomic_number=\"34\">\n        <potential>\n        0    1    0.000000e+00    2.800000e+01\n        0    1    1.291200e+02    -1.357738e+01\n        0    1    4.545595e+00    -1.394526e+01\n        0    1    2.718347e+00    6.294496e-01\n        0    2    8.206665e+02    -1.526266e+02\n        0    2    1.371375e+02    -8.887129e+01\n        0    2    1.224833e+00    -9.593809e-01\n        </potential>\n        <core num=\"14\">\n            <orbital type=\"0\" bc=\"483.91035\">\n            1.599893e+04    2.008699e-02\n            2.203162e+03    1.419266e-01\n            5.032314e+02    4.638310e-01\n            1.435335e+02    4.974016e-01\n            2.601334e+01    2.446434e-02\n            9.998426e+00    1.391188e-02\n            2.004753e+01    4.991765e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"56.982345\">\n            6.970816e+02    3.069640e-02\n            1.536332e+02    2.026811e-01\n            4.724871e+01    5.234171e-01\n            1.637668e+01    4.045998e-01\n            6.214285e+00    1.506550e-02\n            2.047987e+00    1.582766e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"63.702345\">\n            1.599893e+04    6.931590e-03\n            2.203162e+03    4.897583e-02\n            5.032314e+02    1.600582e-01\n            1.435335e+02    1.716427e-01\n            2.248841e+02    1.167850e-01\n            2.004753e+01    3.236878e-03\n            2.799631e-01    1.975754e-03\n            9.459739e-02    5.461451e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"9.3787050\">\n            1.599893e+04    2.760583e-03\n            2.203162e+03    1.950517e-02\n            5.032314e+02    6.374494e-02\n            1.435335e+02    6.835859e-02\n            2.248841e+02    5.438287e-02\n            3.252662e+00    8.404582e-01\n            1.323473e+00    4.089132e-01\n            2.799631e-01    3.797495e-03\n            9.459739e-02    1.049717e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"6.9945960\">\n            6.970816e+02    1.220527e-02\n            1.536332e+02    8.058854e-02\n            4.724871e+01    2.081171e-01\n            1.637668e+01    1.608739e-01\n            6.999482e+01    2.627999e-02\n            </orbital>\n            <orbital type=\"2\" bc=\"2.7821077\">\n            5.034890e+01    7.764744e-02\n            1.302382e+01    3.442077e-01\n            4.022727e+00    5.502592e-01\n            1.213824e+00    3.184576e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Br2\" symbol=\"Br\" type=\"2\" atomic_number=\"35\">\n        <potential>\n        0    1    0.000000e+00    2.800000e+01\n        0    1    1.281268e+02    -1.748732e+01\n        0    1    4.400488e+00    -1.327358e+01\n        0    1    3.896848e+00    1.341067e+00\n        0    2    6.906283e+02    -2.098522e+02\n        0    2    1.261179e+02    -6.434127e+01\n        0    2    1.364496e+00    -6.104418e-01\n        </potential>\n        <core num=\"14\">\n            <orbital type=\"0\" bc=\"514.56335\">\n            1.697980e+04    2.005735e-02\n            2.338286e+03    1.417513e-01\n            5.341455e+02    4.635731e-01\n            1.523987e+02    4.977655e-01\n            2.763213e+01    2.358636e-02\n            1.146758e+01    1.461994e-02\n            2.155440e+01    4.910386e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"61.481931\">\n            7.491496e+02    3.019398e-02\n            1.652152e+02    2.002629e-01\n            5.089802e+01    5.209223e-01\n            1.768499e+01    4.082495e-01\n            6.764060e+00    1.578081e-02\n            2.266909e+00    1.673066e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"68.459953\">\n            1.697980e+04    6.908701e-03\n            2.338286e+03    4.882585e-02\n            5.341455e+02    1.596765e-01\n            1.523987e+02    1.714540e-01\n            2.455999e+02    1.166172e-01\n            2.155440e+01    3.392594e-03\n            3.290939e-01    2.360322e-03\n            1.123625e-01    6.587084e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"10.365485\">\n            1.697980e+04    2.777742e-03\n            2.338286e+03    1.963113e-02\n            5.341455e+02    6.420024e-02\n            1.523987e+02    6.893554e-02\n            2.455999e+02    5.489770e-02\n            3.534757e+00    8.472252e-01\n            1.504633e+00    3.984469e-01\n            3.290939e-01    3.937988e-03\n            1.123625e-01    1.098997e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"7.8521205\">\n            7.491496e+02    1.221855e-02\n            1.652152e+02    8.104005e-02\n            5.089802e+01    2.108008e-01\n            1.768499e+01    1.652057e-01\n            7.395352e+01    2.597316e-02\n            </orbital>\n            <orbital type=\"2\" bc=\"3.3811785\">\n            5.612475e+01    7.495665e-02\n            1.461849e+01    3.391826e-01\n            4.571645e+00    5.526696e-01\n            1.408837e+00    3.160503e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Kr2\" symbol=\"Kr\" type=\"2\" atomic_number=\"36\">\n        <potential>\n        0    1    0.000000e+00    2.800000e+01\n        0    1    1.482671e+02    -1.761660e+01\n        0    1    4.832748e+00    -1.278472e+01\n        0    1    4.851261e+00    7.989919e-01\n        0    2    6.193299e+02    -2.353824e+02\n        0    2    1.158974e+02    -5.669794e+01\n        0    2    1.219641e+00    -6.358529e-01\n        </potential>\n        <core num=\"14\">\n            <orbital type=\"0\" bc=\"546.17378\">\n            1.799018e+04    2.002825e-02\n            2.477476e+03    1.415780e-01\n            5.659913e+02    4.633068e-01\n            1.615326e+02    4.980968e-01\n            2.938435e+01    2.361991e-02\n            1.223152e+01    1.464727e-02\n            2.299656e+01    4.903402e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"66.160290\">\n            7.977488e+02    3.006397e-02\n            1.760371e+02    1.997281e-01\n            5.423058e+01    5.205994e-01\n            1.887913e+01    4.073038e-01\n            8.458913e+00    1.223907e-02\n            3.353909e+00    1.669992e-02\n            1.364064e+00    4.689426e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"73.398255\">\n            1.799018e+04    6.918022e-03\n            2.477476e+03    4.890291e-02\n            5.659913e+02    1.600323e-01\n            1.615326e+02    1.720492e-01\n            2.603157e+02    1.169764e-01\n            2.299656e+01    3.530117e-03\n            3.807262e-01    2.571777e-03\n            1.310393e-01    7.234866e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"11.391975\">\n            1.799018e+04    2.808530e-03\n            2.477476e+03    1.985326e-02\n            5.659913e+02    6.496878e-02\n            1.615326e+02    6.984733e-02\n            2.603157e+02    5.567440e-02\n            3.794300e+00    8.591255e-01\n            1.629212e+00    3.897450e-01\n            3.807262e-01    4.108277e-03\n            1.310393e-01    1.155731e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"8.7480750\">\n            7.977488e+02    1.348108e-02\n            1.760371e+02    8.956078e-02\n            5.423058e+01    2.334438e-01\n            1.887913e+01    1.826405e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"4.0164915\">\n            6.210049e+01    7.268341e-02\n            1.627163e+01    3.348934e-01\n            5.142520e+00    5.547344e-01\n            1.612760e+00    3.138046e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Rb\" symbol=\"Rb\" atomic_number=\"37\">\n        <potential>\n        0    1    0.000000e+00    3.000000e+01\n        0    1    1.717237e+02    -1.587122e+01\n        0    1    8.795873e+00    -8.401075e+00\n        0    1    1.678889e+00    -2.468170e+00\n        0    2    3.285551e+03    -1.559101e+03\n        0    2    4.334126e+01    -1.055606e+02\n        0    2    1.370595e+00    -3.327627e+00\n        </potential>\n        <core num=\"15\">\n            <orbital type=\"0\" bc=\"1124.8126\">\n            2.832869e+04    1.861324e-02\n            3.293308e+03    1.305182e-01\n            6.874975e+02    4.512925e-01\n            1.852792e+02    5.255960e-01\n            3.331788e+01    2.681546e-02\n            1.388857e+01    1.810175e-02\n            2.594265e+01    5.565386e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"137.15820\">\n            9.224700e+02    2.931989e-02\n            1.983383e+02    1.948162e-01\n            6.024212e+01    5.172275e-01\n            2.079577e+01    4.163505e-01\n            9.638792e+00    1.251893e-02\n            3.818761e+00    1.861915e-02\n            1.600081e+00    5.548744e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"155.09320\">\n            2.832869e+04    6.618279e-03\n            3.293308e+03    4.640816e-02\n            6.874975e+02    1.604653e-01\n            1.852792e+02    1.868853e-01\n            3.032982e+02    1.041683e-01\n            2.594265e+01    3.793006e-03\n            5.321561e-01    2.442360e-03\n            2.133496e-01    1.216528e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"25.125400\">\n            2.832869e+04    2.719032e-03\n            3.293308e+03    1.906618e-02\n            6.874975e+02    6.592506e-02\n            1.852792e+02    7.677937e-02\n            3.032982e+02    5.001043e-02\n            4.223752e+00    8.691871e-01\n            1.823778e+00    3.803838e-01\n            5.321561e-01    3.528156e-03\n            2.133496e-01    1.757358e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"19.174000\">\n            9.224700e+02    1.334197e-02\n            1.983383e+02    8.865078e-02\n            6.024212e+01    2.353635e-01\n            2.079577e+01    1.894595e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"3.1324000\">\n            2.832869e+04    9.277854e-04\n            3.293308e+03    6.505742e-03\n            6.874975e+02    2.249488e-02\n            1.852792e+02    2.619858e-02\n            3.032982e+02    1.676234e-02\n            4.223752e+00    3.861552e-01\n            1.823778e+00    1.689937e-01\n            2.975875e+00    2.580162e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"9.2910000\">\n            6.893612e+01    7.038264e-02\n            1.806695e+01    3.297978e-01\n            5.745926e+00    5.563627e-01\n            1.824534e+00    3.148138e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Sr\" symbol=\"Sr\" atomic_number=\"38\">\n        <potential>\n        0    1    0.000000e+00    3.000000e+01\n        0    1    1.816301e+02    -1.509172e+01\n        0    1    8.787134e+00    -7.884786e+00\n        0    1    1.717769e+00    -2.313954e+00\n        0    2    3.261270e+03    -1.660114e+03\n        0    2    4.336450e+01    -1.063372e+02\n        0    2    1.370653e+00    -3.327384e+00\n        </potential>\n        <core num=\"15\">\n            <orbital type=\"0\" bc=\"1191.8658\">\n            3.057188e+04    1.854130e-02\n            3.522884e+03    1.298469e-01\n            7.318539e+02    4.503413e-01\n            1.966604e+02    5.273101e-01\n            3.546029e+01    2.701428e-02\n            1.483342e+01    1.837944e-02\n            2.766961e+01    5.602087e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"147.51486\">\n            9.882035e+02    2.895395e-02\n            2.122455e+02    1.929608e-01\n            6.447958e+01    5.154228e-01\n            2.228907e+01    4.189878e-01\n            1.032476e+01    1.313962e-02\n            4.114168e+00    1.942212e-02\n            1.737704e+00    5.596171e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"166.39380\">\n            3.057188e+04    6.619310e-03\n            3.522884e+03    4.635583e-02\n            7.318539e+02    1.607735e-01\n            1.966604e+02    1.882516e-01\n            3.222729e+02    1.037361e-01\n            2.766961e+01    3.981177e-03\n            6.107345e-01    2.769145e-03\n            2.567184e-01    1.255844e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"27.926500\">\n            3.057188e+04    2.744006e-03\n            3.522884e+03    1.921661e-02\n            7.318539e+02    6.664796e-02\n            1.966604e+02    7.803889e-02\n            3.222729e+02    5.029882e-02\n            4.527839e+00    8.796345e-01\n            1.968793e+00    3.728859e-01\n            6.107345e-01    3.640638e-03\n            2.567184e-01    1.651077e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"21.626220\">\n            9.882035e+02    1.333696e-02\n            2.122455e+02    8.888286e-02\n            6.447958e+01    2.374174e-01\n            2.228907e+01    1.929969e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"3.8978400\">\n            3.057188e+04    9.836503e-04\n            3.522884e+03    6.888622e-03\n            7.318539e+02    2.389145e-02\n            1.966604e+02    2.797478e-02\n            3.222729e+02    1.782949e-02\n            4.527839e+00    4.115402e-01\n            1.968793e+00    1.744560e-01\n            3.273140e+00    2.807261e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"11.186520\">\n            7.581164e+01    6.821491e-02\n            1.996358e+01    3.250123e-01\n            6.405919e+00    5.573717e-01\n            2.065585e+00    3.151559e-01\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"In2\" symbol=\"In\" type=\"2\" atomic_number=\"49\">\n        <potential>\n        0    1    0.000000e+00    4.600000e+01\n        0    1    9.382104e+02    -1.034282e+01\n        0    1    8.103365e+00    -2.198754e+01\n        0    1    8.099241e-01    -7.450007e+00\n        0    2    5.088125e+03    -4.018677e+02\n        0    2    1.160014e+02    -1.689906e+02\n        0    2    3.936118e+02    1.201405e+02\n        </potential>\n        <core num=\"23\">\n            <orbital type=\"0\" bc=\"1343.8097\">\n            6.790279e+04    1.776520e-02\n            7.040326e+03    1.213420e-01\n            1.375403e+03    4.355878e-01\n            3.558255e+02    5.502616e-01\n            6.425357e+01    3.199124e-02\n            2.748527e+01    2.311087e-02\n            5.134544e+01    7.307106e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"184.32496\">\n            1.947782e+03    2.528844e-02\n            4.116454e+02    1.730932e-01\n            1.247747e+02    4.930022e-01\n            4.365494e+01    4.465301e-01\n            1.960851e+01    2.358726e-02\n            8.108029e+00    3.359207e-02\n            3.481304e+00    6.952704e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"205.55220\">\n            6.790279e+04    6.598182e-03\n            7.040326e+03    4.506770e-02\n            1.375403e+03    1.617819e-01\n            3.558255e+02    2.043730e-01\n            5.903032e+02    9.628463e-02\n            5.134544e+01    4.984940e-03\n            1.653841e+00    3.480653e-03\n            7.005751e-01    1.419582e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"40.858571\">\n            6.790279e+04    2.934135e-03\n            7.040326e+03    2.004108e-02\n            1.375403e+03    7.194251e-02\n            3.558255e+02    9.088226e-02\n            5.903032e+02    5.042911e-02\n            8.699199e+00    9.757823e-01\n            3.848173e+00    3.049227e-01\n            1.653841e+00    2.811371e-03\n            7.005751e-01    1.146616e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"33.705477\">\n            1.947782e+03    1.278307e-02\n            4.116454e+02    8.749703e-02\n            1.247747e+02    2.492081e-01\n            4.365494e+01    2.257169e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"6.9033380\">\n            6.790279e+04    1.262043e-03\n            7.040326e+03    8.620157e-03\n            1.375403e+03    3.094423e-02\n            3.558255e+02    3.909067e-02\n            5.903032e+02    2.245986e-02\n            8.699199e+00    5.597291e-01\n            3.848173e+00    1.749100e-01\n            7.641793e+00    3.797049e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"4.6563387\">\n            1.947782e+03    5.343462e-03\n            4.116454e+02    3.657470e-02\n            1.247747e+02    1.041717e-01\n            4.365494e+01    9.435207e-02\n            2.669398e+00    5.428550e-01\n            1.153922e+00    5.887788e-01\n            4.695989e-01    1.298705e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"1.3158327\">\n            1.811900e+02    1.730684e-02\n            4.931153e+01    9.523877e-02\n            1.686080e+01    1.933096e-01\n            6.106148e+00    1.238392e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"22.581026\">\n            1.811900e+02    4.897803e-02\n            4.931153e+01    2.695238e-01\n            1.686080e+01    5.470622e-01\n            6.106148e+00    3.504625e-01\n            4.088039e+00    6.580949e-03\n            1.359836e+00    1.290444e-02\n            4.219564e-01    7.129024e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Sn2\" symbol=\"Sn\" type=\"2\" atomic_number=\"50\">\n        <potential>\n        0    1    0.000000e+00    4.600000e+01\n        0    1    8.659419e+02    -1.231535e+01\n        0    1    8.976930e+00    -2.083742e+01\n        0    1    8.940789e-01    -7.318656e+00\n        0    2    3.787441e+03    -4.217628e+02\n        0    2    1.499106e+02    -1.618228e+02\n        0    2    3.479049e+02    1.419028e+02\n        </potential>\n        <core num=\"23\">\n            <orbital type=\"0\" bc=\"1296.4031\">\n            7.266615e+04    1.773963e-02\n            7.458577e+03    1.207515e-01\n            1.448048e+03    4.345224e-01\n            3.731342e+02    5.520353e-01\n            6.745249e+01    3.228038e-02\n            2.888902e+01    2.349413e-02\n            5.396235e+01    7.371557e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"179.23320\">\n            2.041792e+03    2.532196e-02\n            4.307275e+02    1.732810e-01\n            1.304436e+02    4.936558e-01\n            4.558117e+01    4.470731e-01\n            2.063008e+01    2.258027e-02\n            8.539518e+00    3.189178e-02\n            3.661291e+00    6.454050e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"199.81699\">\n            7.266615e+04    6.610922e-03\n            7.458577e+03    4.499975e-02\n            1.448048e+03    1.619309e-01\n            3.731342e+02    2.057237e-01\n            6.206207e+02    9.546550e-02\n            5.396235e+01    5.048381e-03\n            1.777042e+00    3.480766e-03\n            7.657393e-01    1.397729e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"40.305348\">\n            7.266615e+04    2.953586e-03\n            7.458577e+03    2.010470e-02\n            1.448048e+03    7.234645e-02\n            3.731342e+02    9.191194e-02\n            6.206207e+02    5.025423e-02\n            9.164452e+00    9.818402e-01\n            4.048987e+00    3.010621e-01\n            1.777042e+00    2.619555e-03\n            7.657393e-01    1.051903e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"33.384960\">\n            2.041792e+03    1.288245e-02\n            4.307275e+02    8.815608e-02\n            1.304436e+02    2.511456e-01\n            4.558117e+01    2.274468e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"7.0629600\">\n            7.266615e+04    1.287268e-03\n            7.458577e+03    8.762279e-03\n            1.448048e+03    3.153092e-02\n            3.731342e+02    4.005820e-02\n            6.206207e+02    2.268724e-02\n            9.164452e+00    5.728315e-01\n            4.048987e+00    1.756476e-01\n            8.116065e+00    3.870636e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"4.8624720\">\n            2.041792e+03    5.483335e-03\n            4.307275e+02    3.752308e-02\n            1.304436e+02    1.068985e-01\n            4.558117e+01    9.681130e-02\n            2.865541e+00    5.502444e-01\n            1.251380e+00    5.916674e-01\n            5.173573e-01    1.234323e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"1.5695280\">\n            1.930010e+02    1.776738e-02\n            5.260605e+01    9.860524e-02\n            1.804452e+01    2.022271e-01\n            6.570293e+00    1.307474e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"22.707780\">\n            1.930010e+02    4.796829e-02\n            5.260605e+01    2.662139e-01\n            1.804452e+01    5.459717e-01\n            6.570293e+00    3.529913e-01\n            4.538816e+00    6.742746e-03\n            1.550296e+00    1.352712e-02\n            5.002391e-01    7.274215e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Sb2\" symbol=\"Sb\" type=\"2\" atomic_number=\"51\">\n        <potential>\n        0    1    0.000000e+00    4.600000e+01\n        0    1    4.705092e+02    -1.619975e+01\n        0    1    9.105112e+00    -1.693194e+01\n        0    1    1.306836e+00    -9.361014e+00\n        0    2    2.467258e+03    -5.267092e+02\n        0    2    2.605360e+02    -1.302272e+02\n        0    2    1.837901e+02    9.020596e+01\n        </potential>\n        <core num=\"23\">\n            <orbital type=\"0\" bc=\"1128.1347\">\n            7.772952e+04    1.771776e-02\n            7.897737e+03    1.201668e-01\n            1.523595e+03    4.334453e-01\n            3.910089e+02    5.538159e-01\n            7.085474e+01    3.246281e-02\n            3.046331e+01    2.397554e-02\n            5.667781e+01    7.422703e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"157.14980\">\n            2.140155e+03    2.533108e-02\n            4.506338e+02    1.733219e-01\n            1.363488e+02    4.940944e-01\n            4.758959e+01    4.477572e-01\n            2.168046e+01    2.173861e-02\n            8.984165e+00    3.046358e-02\n            3.846385e+00    6.039136e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"175.16831\">\n            7.772952e+04    6.625106e-03\n            7.897737e+03    4.493334e-02\n            1.523595e+03    1.620758e-01\n            3.910089e+02    2.070854e-01\n            6.518766e+02    9.464965e-02\n            5.667781e+01    5.357000e-03\n            1.904156e+00    4.035483e-03\n            8.320664e-01    1.581948e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"35.823560\">\n            7.772952e+04    2.973234e-03\n            7.897737e+03    2.016531e-02\n            1.523595e+03    7.273685e-02\n            3.910089e+02    9.293637e-02\n            6.518766e+02    5.007031e-02\n            9.642199e+00    9.870342e-01\n            4.255994e+00    2.974771e-01\n            1.904156e+00    2.407143e-03\n            8.320664e-01    9.436232e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"29.781810\">\n            2.140155e+03    1.296613e-02\n            4.506338e+02    8.871763e-02\n            1.363488e+02    2.529102e-01\n            4.758959e+01    2.291918e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"6.4805800\">\n            7.772952e+04    1.312356e-03\n            7.897737e+03    8.900766e-03\n            1.523595e+03    3.210532e-02\n            3.910089e+02    4.102118e-02\n            6.518766e+02    2.290314e-02\n            9.642199e+00    5.853485e-01\n            4.255994e+00    1.764151e-01\n            8.607677e+00    3.944439e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"4.5373500\">\n            2.140155e+03    5.615018e-03\n            4.506338e+02    3.841943e-02\n            1.363488e+02    1.095235e-01\n            4.758959e+01    9.925217e-02\n            3.067791e+00    5.586107e-01\n            1.352145e+00    5.942375e-01\n            5.650612e-01    1.167132e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"1.6158100\">\n            1.880339e+02    2.129477e-02\n            5.103533e+01    1.140669e-01\n            1.734697e+01    2.187109e-01\n            6.166323e+00    1.198977e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"20.536300\">\n            1.880339e+02    5.516419e-02\n            5.103533e+01    2.954908e-01\n            1.734697e+01    5.665716e-01\n            6.166323e+00    3.105956e-01\n            5.027724e+00    7.767543e-04\n            1.779129e+00    1.617500e-03\n            5.881318e-01    8.672809e-04\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Te2\" symbol=\"Te\" type=\"2\" atomic_number=\"52\">\n        <potential>\n        0    1    0.000000e+00    4.600000e+01\n        0    1    9.831894e+02    -1.826324e+01\n        0    1    9.581656e+00    -1.663640e+01\n        0    1    1.531146e+00    -9.697847e+00\n        0    2    2.008619e+03    -1.147411e+03\n        0    2    2.867595e+02    -1.701795e+02\n        0    2    2.181314e+02    1.345126e+02\n        </potential>\n        <core num=\"23\">\n            <orbital type=\"0\" bc=\"1177.1269\">\n            8.310434e+04    1.770100e-02\n            8.358395e+03    1.195938e-01\n            1.602101e+03    4.323621e-01\n            4.094573e+02    5.555928e-01\n            7.427984e+01    3.275256e-02\n            3.197229e+01    2.438902e-02\n            5.947033e+01    7.489354e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"165.17500\">\n            2.242920e+03    2.531963e-02\n            4.713680e+02    1.732369e-01\n            1.424906e+02    4.943444e-01\n            4.968056e+01    4.485601e-01\n            2.275951e+01    2.104678e-02\n            9.440646e+00    2.927810e-02\n            4.034581e+00    5.689717e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"184.10190\">\n            8.310434e+04    6.640886e-03\n            8.358395e+03    4.486803e-02\n            1.602101e+03    1.622093e-01\n            4.094573e+02    2.084418e-01\n            6.845819e+02    9.378192e-02\n            5.947033e+01    5.426753e-03\n            2.035795e+00    4.059384e-03\n            8.998324e-01    1.545840e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"38.156700\">\n            8.310434e+04    2.993153e-03\n            8.358395e+03    2.022274e-02\n            1.602101e+03    7.311033e-02\n            4.094573e+02    9.394805e-02\n            6.845819e+02    4.984210e-02\n            1.013791e+01    9.923610e-01\n            4.468113e+00    2.942143e-01\n            2.035795e+00    2.144044e-03\n            8.998324e-01    8.164662e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"31.829300\">\n            2.242920e+03    1.303596e-02\n            4.713680e+02    8.919199e-02\n            1.424906e+02    2.545160e-01\n            4.968056e+01    2.309437e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"7.1135000\">\n            8.310434e+04    1.337247e-03\n            8.358395e+03    9.034881e-03\n            1.602101e+03    3.266339e-02\n            4.094573e+02    4.197303e-02\n            6.845819e+02    2.308636e-02\n            1.013791e+01    5.977351e-01\n            4.468113e+00    1.772160e-01\n            9.115573e+00    4.017739e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"5.0565000\">\n            2.242920e+03    5.738007e-03\n            4.713680e+02    3.925944e-02\n            1.424906e+02    1.120297e-01\n            4.968056e+01    1.016540e-01\n            3.276480e+00    5.675947e-01\n            1.456225e+00    5.963576e-01\n            6.129979e-01    1.101295e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"1.9548700\">\n            2.177113e+02    1.846960e-02\n            5.949579e+01    1.040935e-01\n            2.052317e+01    2.175371e-01\n            7.545045e+00    1.429898e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"22.228400\">\n            2.177113e+02    4.618225e-02\n            5.949579e+01    2.602803e-01\n            2.052317e+01    5.439398e-01\n            7.545045e+00    3.575382e-01\n            5.459859e+00    7.069627e-03\n            1.942199e+00    1.465446e-02\n            6.617277e-01    7.520586e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"I2\" symbol=\"I\" type=\"2\" atomic_number=\"53\">\n        <potential>\n        0    1    0.000000e+00    4.600000e+01\n        0    1    9.418354e+02    -1.435322e+01\n        0    1    9.301749e+00    -1.674032e+01\n        0    1    1.554262e+00    -8.765613e+00\n        0    2    3.792865e+03    -4.214712e+02\n        0    2    2.151862e+02    -1.628815e+02\n        0    2    2.366327e+02    1.197458e+02\n        </potential>\n        <core num=\"23\">\n            <orbital type=\"0\" bc=\"1227.3025\">\n            8.881194e+04    1.768881e-02\n            8.841808e+03    1.190303e-01\n            1.683700e+03    4.312702e-01\n            4.284975e+02    5.573705e-01\n            7.782165e+01    3.304250e-02\n            3.353386e+01    2.481793e-02\n            6.235374e+01    7.557020e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"173.41638\">\n            2.349964e+03    2.529389e-02\n            4.928960e+02    1.730624e-01\n            1.488570e+02    4.944575e-01\n            5.184959e+01    4.494301e-01\n            2.386824e+01    2.047717e-02\n            9.909558e+00    2.829034e-02\n            4.226890e+00    5.394690e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"193.29688\">\n            8.881194e+04    6.658291e-03\n            8.841808e+03    4.480449e-02\n            1.683700e+03    1.623355e-01\n            4.284975e+02    2.098013e-01\n            7.185638e+02    9.289105e-02\n            6.235374e+01    5.499755e-03\n            2.171925e+00    4.096793e-03\n            9.685845e-01    1.509237e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"40.567180\">\n            8.881194e+04    3.013393e-03\n            8.841808e+03    2.027751e-02\n            1.683700e+03    7.346942e-02\n            4.284975e+02    9.495135e-02\n            7.185638e+02    4.958847e-02\n            1.064916e+01    9.973573e-01\n            4.685949e+00    2.912147e-01\n            2.171925e+00    1.842732e-03\n            9.685845e-01    6.788531e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"33.942800\">\n            2.349964e+03    1.309519e-02\n            4.928960e+02    8.959812e-02\n            1.488570e+02    2.559913e-01\n            5.184959e+01    2.326796e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"7.7645400\">\n            8.881194e+04    1.361861e-03\n            8.841808e+03    9.164140e-03\n            1.683700e+03    3.320349e-02\n            4.284975e+02    4.291195e-02\n            7.185638e+02    2.324458e-02\n            1.064916e+01    6.097032e-01\n            4.685949e+00    1.780250e-01\n            9.640530e+00    4.089963e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"5.5897900\">\n            2.349964e+03    5.853232e-03\n            4.928960e+02    4.004817e-02\n            1.488570e+02    1.144219e-01\n            5.184959e+01    1.040021e-01\n            3.491920e+00    5.769315e-01\n            1.563864e+00    5.979902e-01\n            6.612446e-01    1.039140e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"2.3054919\">\n            2.096282e+02    2.235868e-02\n            5.701584e+01    1.210746e-01\n            1.947108e+01    2.345506e-01\n            6.972525e+00    1.284916e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"23.978430\">\n            2.096282e+02    5.407733e-02\n            5.701584e+01    2.928344e-01\n            1.947108e+01    5.672906e-01\n            6.972525e+00    3.107734e-01\n            6.042350e+00    6.770240e-04\n            2.215766e+00    1.489093e-03\n            7.632974e-01    7.759726e-04\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Xe2\" symbol=\"Xe\" type=\"2\" atomic_number=\"54\">\n        <potential>\n        0    1    0.000000e+00    4.600000e+01\n        0    1    1.146362e+03    -1.450911e+01\n        0    1    9.704362e+00    -1.595966e+01\n        0    1    1.616917e+00    -8.374774e+00\n        0    2    4.356249e+03    -2.980129e+02\n        0    2    1.938917e+02    -2.640253e+02\n        0    2    2.420282e+02    1.604077e+02\n        </potential>\n        <core num=\"23\">\n            <orbital type=\"0\" bc=\"1278.6742\">\n            9.487214e+04    1.768122e-02\n            9.349124e+03    1.184763e-01\n            1.768512e+03    4.301696e-01\n            4.481476e+02    5.591477e-01\n            8.148399e+01    3.333339e-02\n            3.514965e+01    2.526344e-02\n            6.533041e+01    7.625927e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"181.87576\">\n            2.501286e+03    2.463870e-02\n            5.235308e+02    1.692299e-01\n            1.580152e+02    4.890454e-01\n            5.507622e+01    4.561658e-01\n            2.510059e+01    2.225373e-02\n            1.043497e+01    3.103876e-02\n            4.447579e+00    5.880920e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"202.75740\">\n            9.487214e+04    6.677363e-03\n            9.349124e+03    4.474291e-02\n            1.768512e+03    1.624548e-01\n            4.481476e+02    2.111638e-01\n            7.538748e+02    9.197723e-02\n            6.533041e+01    5.576147e-03\n            2.312876e+00    4.145291e-03\n            1.038420e+00    1.473910e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"43.056500\">\n            9.487214e+04    3.033999e-03\n            9.349124e+03    2.032987e-02\n            1.768512e+03    7.381472e-02\n            4.481476e+02    9.594665e-02\n            7.538748e+02    4.931002e-02\n            1.117613e+01    1.002040e+00\n            4.909653e+00    2.884592e-01\n            2.312876e+00    1.504520e-03\n            1.038420e+00    5.349510e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"36.123230\">\n            2.501286e+03    1.282336e-02\n            5.235308e+02    8.807674e-02\n            1.580152e+02    2.545266e-01\n            5.507622e+01    2.374142e-01\n            </orbital>\n            <orbital type=\"0\" bc=\"8.4351500\">\n            9.487214e+04    1.386184e-03\n            9.349124e+03    9.288381e-03\n            1.768512e+03    3.372472e-02\n            4.481476e+02    4.383643e-02\n            7.538748e+02    2.337702e-02\n            1.117613e+01    6.212373e-01\n            4.909653e+00    1.788368e-01\n            1.018270e+01    4.160800e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"6.1385240\">\n            2.501286e+03    5.815405e-03\n            5.235308e+02    3.994288e-02\n            1.580152e+02    1.154280e-01\n            5.507622e+01    1.076676e-01\n            3.723646e+00    5.840232e-01\n            1.680574e+00    6.006810e-01\n            7.131027e-01    9.949652e-02\n            </orbital>\n            <orbital type=\"2\" bc=\"2.6689270\">\n            2.438967e+02    1.897128e-02\n            6.679120e+01    1.083897e-01\n            2.315135e+01    2.303218e-01\n            8.582120e+00    1.535990e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"25.787230\">\n            2.438967e+02    4.465139e-02\n            6.679120e+01    2.551094e-01\n            2.315135e+01    5.420927e-01\n            8.582120e+00    3.615153e-01\n            6.419499e+00    7.378972e-03\n            2.354200e+00    1.564342e-02\n            8.317158e-01    7.720316e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Cs\" symbol=\"Cs\" atomic_number=\"55\">\n        <potential>\n        0    1    0.000000e+00    4.800000e+01\n        0    1    4.418373e+02    -7.390764e+00\n        0    1    1.035219e+01    -1.743794e+01\n        0    1    1.692241e+00    -9.019157e+00\n        0    2    8.654932e+02    -7.842653e+02\n        0    2    9.280596e+01    -9.552911e+01\n        0    2    5.295508e-01    -1.352907e+00\n        </potential>\n        <core num=\"24\">\n            <orbital type=\"0\" bc=\"2662.9400\">\n            1.009176e+05    1.774244e-02\n            9.844100e+03    1.183708e-01\n            1.849438e+03    4.304124e-01\n            4.666344e+02    5.595855e-01\n            8.548912e+01    3.283032e-02\n            3.686122e+01    2.531609e-02\n            7.183215e+01    7.341386e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"381.53600\">\n            2.622068e+03    2.454877e-02\n            5.476712e+02    1.686664e-01\n            1.651321e+02    4.885798e-01\n            5.749730e+01    4.577832e-01\n            2.488532e+01    2.535362e-02\n            9.566524e+00    3.045200e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"425.40200\">\n            1.009176e+05    6.723811e-03\n            9.844100e+03    4.485869e-02\n            1.849438e+03    1.631124e-01\n            4.666344e+02    2.120648e-01\n            7.886446e+02    9.121970e-02\n            7.183215e+01    5.335173e-03\n            1.950479e+00    3.551284e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"91.676600\">\n            1.009176e+05    3.089298e-03\n            9.844100e+03    2.061061e-02\n            1.849438e+03    7.494302e-02\n            4.666344e+02    9.743451e-02\n            7.886446e+02    4.798006e-02\n            1.039584e+01    1.222086e+00\n            1.950479e+00    8.737503e-02\n            2.172664e+00    9.018310e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"77.165600\">\n            2.622068e+03    1.281975e-02\n            5.476712e+02    8.808026e-02\n            1.651321e+02    2.551440e-01\n            5.749730e+01    2.390616e-01\n            4.809538e-01    7.494866e-03\n            1.633000e-01    6.217486e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"18.672820\">\n            1.009176e+05    1.391221e-03\n            9.844100e+03    9.281691e-03\n            1.849438e+03    3.374950e-02\n            4.666344e+02    4.387822e-02\n            7.886446e+02    2.627042e-02\n            1.039584e+01    6.546047e-01\n            1.233037e+01    4.443163e-01\n            2.172664e+00    1.660082e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"2.6188600\">\n            1.009176e+05    5.351154e-04\n            9.844100e+03    3.570085e-03\n            1.849438e+03    1.298132e-02\n            4.666344e+02    1.687720e-02\n            7.886446e+02    9.131888e-03\n            1.039584e+01    2.997215e-01\n            1.233037e+01    1.887165e-01\n            3.439283e-01    9.534798e-01\n            1.443567e-01    3.059850e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"13.824140\">\n            2.622068e+03    5.884360e-03\n            5.476712e+02    4.042948e-02\n            1.651321e+02    1.171130e-01\n            5.749730e+01    1.097310e-01\n            3.756752e+00    6.734913e-01\n            1.502927e+00    5.673248e-01\n            4.809538e-01    1.149766e-02\n            1.633000e-01    9.538066e-03\n            </orbital>\n            <orbital type=\"2\" bc=\"6.5089600\">\n            2.575297e+02    1.919204e-02\n            7.058664e+01    1.103332e-01\n            2.451981e+01    2.362293e-01\n            9.123165e+00    1.585533e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"55.734200\">\n            2.575297e+02    4.397336e-02\n            7.058664e+01    2.527986e-01\n            2.451981e+01    5.412554e-01\n            9.123165e+00    3.632818e-01\n            6.952956e+00    7.426077e-03\n            2.591209e+00    1.600456e-02\n            9.343775e-01    7.907209e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Ba\" symbol=\"Ba\" atomic_number=\"56\">\n        <potential>\n        0    1    0.000000e+00    4.800000e+01\n        0    1    4.239742e+02    -6.958587e+00\n        0    1    1.033137e+01    -1.610109e+01\n        0    1    1.704769e+00    -8.650936e+00\n        0    2    8.479779e+02    -8.000354e+02\n        0    2    9.325344e+01    -9.308317e+01\n        0    2    5.295500e-01    -1.376229e+00\n        </potential>\n        <core num=\"24\">\n            <orbital type=\"0\" bc=\"2770.9938\">\n            1.077089e+05    1.774558e-02\n            1.039961e+04    1.178455e-01\n            1.940478e+03    4.293305e-01\n            4.874210e+02    5.613372e-01\n            8.943074e+01    3.309324e-02\n            3.860205e+01    2.578581e-02\n            7.505492e+01    7.418349e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"399.77920\">\n            2.753935e+03    2.438246e-02\n            5.739820e+02    1.676586e-01\n            1.729309e+02    4.872197e-01\n            6.034045e+01    4.577277e-01\n            2.613393e+01    2.714764e-02\n            1.011833e+01    3.325257e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"445.85300\">\n            1.077089e+05    6.747071e-03\n            1.039961e+04    4.480620e-02\n            1.940478e+03    1.632363e-01\n            4.874210e+02    2.134268e-01\n            8.266035e+02    9.027008e-02\n            7.505492e+01    5.438905e-03\n            2.091223e+00    3.565554e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"97.419600\">\n            1.077089e+05    3.110860e-03\n            1.039961e+04    2.065872e-02\n            1.940478e+03    7.526308e-02\n            4.874210e+02    9.840430e-02\n            8.266035e+02    4.768257e-02\n            1.092449e+01    1.223205e+00\n            2.091223e+00    8.853101e-02\n            2.328715e+00    9.139834e-03\n            </orbital>\n            <orbital type=\"1\" bc=\"82.237060\">\n            2.753935e+03    1.278409e-02\n            5.739820e+02    8.790595e-02\n            1.729309e+02    2.554566e-01\n            6.034045e+01    2.399935e-01\n            5.478717e-01    7.140049e-03\n            1.958695e-01    5.442036e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"20.530020\">\n            1.077089e+05    1.417181e-03\n            1.039961e+04    9.411271e-03\n            1.940478e+03    3.428680e-02\n            4.874210e+02    4.482900e-02\n            8.266035e+02    2.622452e-02\n            1.092449e+01    6.696110e-01\n            1.293764e+01    4.472684e-01\n            2.328715e+00    1.806428e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"3.2083200\">\n            1.077089e+05    5.707487e-04\n            1.039961e+04    3.790250e-03\n            1.940478e+03    1.380850e-02\n            4.874210e+02    1.805421e-02\n            8.266035e+02    9.541499e-03\n            1.092449e+01    3.214358e-01\n            1.293764e+01    2.015345e-01\n            3.911176e-01    1.003898e+00\n            1.703696e-01    2.809982e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"15.415380\">\n            2.753935e+03    5.944570e-03\n            5.739820e+02    4.087604e-02\n            1.729309e+02    1.187867e-01\n            6.034045e+01    1.115964e-01\n            4.032446e+00    6.693907e-01\n            1.633220e+00    5.750905e-01\n            5.478717e-01    1.248044e-02\n            1.958695e-01    9.512402e-03\n            </orbital>\n            <orbital type=\"2\" bc=\"7.7185200\">\n            2.712525e+02    1.942862e-02\n            7.440013e+01    1.122994e-01\n            2.589187e+01    2.419585e-01\n            9.665031e+00    1.629869e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"60.029060\">\n            2.712525e+02    4.342654e-02\n            7.440013e+01    2.510098e-01\n            2.589187e+01    5.408217e-01\n            9.665031e+00    3.643056e-01\n            7.510341e+00    7.387887e-03\n            2.841690e+00    1.619778e-02\n            1.044140e+00    8.039416e-03\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Tl2\" symbol=\"Tl\" type=\"2\" atomic_number=\"81\">\n        <potential>\n        0    1    0.000000e+00    7.800000e+01\n        0    1    4.957230e+02    -2.227257e+01\n        0    1    5.940970e+00    -2.119242e+01\n        0    1    1.901390e+00    -1.042548e+01\n        0    2    4.261830e+04    -3.320892e+03\n        0    2    1.359940e+02    -3.509820e+02\n        0    2    6.530800e-01    -5.255910e+00\n        </potential>\n        <core num=\"39\">\n            <orbital type=\"0\" bc=\"5711.9274\">\n            5.036713e+05    1.957831e-02\n            3.856487e+04    1.086627e-01\n            5.904381e+03    3.991082e-01\n            1.289249e+03    6.032374e-01\n            2.558320e+02    3.865044e-02\n            1.104903e+02    4.758163e-02\n            1.942904e+02    1.004381e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"887.42700\">\n            7.731113e+03    2.267175e-02\n            1.507506e+03    1.542949e-01\n            4.376697e+02    4.720559e-01\n            1.502123e+02    4.816205e-01\n            6.840685e+01    3.163158e-02\n            2.719751e+01    3.959489e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"1027.6596\">\n            5.036713e+05    8.076128e-03\n            3.856487e+04    4.482377e-02\n            5.904381e+03    1.646337e-01\n            1.289249e+03    2.488377e-01\n            2.536357e+03    6.161120e-02\n            1.942904e+02    1.078298e-02\n            7.867014e+00    1.012349e-02\n            3.410552e+00    2.460003e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"249.88860\">\n            5.036713e+05    3.902105e-03\n            3.856487e+04    2.165729e-02\n            5.904381e+03    7.954527e-02\n            1.289249e+03    1.202297e-01\n            2.536357e+03    3.545812e-02\n            3.244588e+01    1.057109e+00\n            1.327227e+01    2.663563e-01\n            1.489370e+00    3.366259e-03\n            5.994629e-01    8.000617e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"208.73700\">\n            7.731113e+03    1.276944e-02\n            1.507506e+03    8.690371e-02\n            4.376697e+02    2.658766e-01\n            1.502123e+02    2.712637e-01\n            1.959124e+00    8.004960e-03\n            7.158242e-01    5.260924e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"58.294260\">\n            5.036713e+05    2.085825e-03\n            3.856487e+04    1.157666e-02\n            5.904381e+03    4.252001e-02\n            1.289249e+03    6.426743e-02\n            2.536357e+03    1.071725e-02\n            3.244588e+01    1.162042e+00\n            1.327227e+01    2.927960e-01\n            1.489370e+00    1.834061e-03\n            5.994629e-01    4.359030e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"10.135476\">\n            5.036713e+05    9.521954e-04\n            3.856487e+04    5.284833e-03\n            5.904381e+03    1.941071e-02\n            1.289249e+03    2.933858e-02\n            2.536357e+03    3.102355e-03\n            3.244588e+01    6.349639e-01\n            1.327227e+01    1.599898e-01\n            1.489370e+00    1.187720e+00\n            5.994629e-01    2.822865e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"6.2057880\">\n            7.731113e+03    2.697149e-03\n            1.507506e+03    1.835573e-02\n            4.376697e+02    5.615823e-02\n            1.502123e+02    5.729608e-02\n            1.221030e+01    4.499210e-01\n            5.095106e+00    3.981692e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"44.527140\">\n            7.731113e+03    6.519048e-03\n            1.507506e+03    4.436605e-02\n            4.376697e+02    1.357352e-01\n            1.502123e+02    1.384854e-01\n            1.221030e+01    6.862869e-01\n            5.095106e+00    6.073474e-01\n            1.959124e+00    1.472472e-02\n            7.158242e-01    9.677202e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"9.1858910\">\n            8.591652e+01    9.091024e-02\n            2.563866e+01    3.752020e-01\n            8.801142e+00    5.550099e-01\n            2.890798e+00    2.934681e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"1.5169624\">\n            7.481043e+02    6.263403e-03\n            2.053677e+02    3.915277e-02\n            7.305338e+01    9.262526e-02\n            2.829822e+01    6.681168e-02\n            2.528211e+00    3.702531e-01\n            9.097497e-01    6.154945e-01\n            2.982332e-01    2.926222e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"27.745308\">\n            7.481043e+02    1.921276e-02\n            2.053677e+02    1.200997e-01\n            7.305338e+01    2.841247e-01\n            2.829822e+01    2.049424e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"164.30094\">\n            7.481043e+02    3.587156e-02\n            2.053677e+02    2.242345e-01\n            7.305338e+01    5.304805e-01\n            2.829822e+01    3.826418e-01\n            2.498019e+01    9.835162e-03\n            1.029172e+01    2.417978e-02\n            4.169595e+00    1.411766e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Pb2\" symbol=\"Pb\" type=\"2\" atomic_number=\"82\">\n        <potential>\n        0    1    0.000000e+00    7.800000e+01\n        0    1    4.869652e+02    -2.313377e+01\n        0    1    6.787635e+00    -2.483263e+01\n        0    1    1.835036e+00    -1.017391e+01\n        0    2    4.518024e+04    -4.899832e+03\n        0    2    1.141396e+02    -2.195219e+02\n        0    2    7.745997e-01    -5.452892e+00\n        </potential>\n        <core num=\"39\">\n            <orbital type=\"0\" bc=\"5551.5637\">\n            5.341441e+05    1.974472e-02\n            4.059137e+04    1.085520e-01\n            6.160331e+03    3.979800e-01\n            1.335977e+03    6.046208e-01\n            2.670142e+02    3.861109e-02\n            1.149689e+02    4.891774e-02\n            2.014949e+02    1.008361e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"864.15359\">\n            8.021998e+03    2.264351e-02\n            1.559323e+03    1.539134e-01\n            4.518366e+02    4.715735e-01\n            1.549029e+02    4.824037e-01\n            7.081715e+01    3.163589e-02\n            2.821050e+01    3.994888e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"1003.1797\">\n            5.341441e+05    8.171424e-03\n            4.059137e+04    4.492462e-02\n            6.160331e+03    1.647054e-01\n            1.335977e+03    2.502245e-01\n            2.652756e+03    6.037324e-02\n            2.014949e+02    1.101182e-02\n            8.177380e+00    1.042723e-02\n            3.550598e+00    2.516978e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"245.22789\">\n            5.341441e+05    3.952489e-03\n            4.059137e+04    2.172988e-02\n            6.160331e+03    7.966743e-02\n            1.335977e+03    1.210327e-01\n            2.652756e+03    3.482429e-02\n            3.356452e+01    1.056428e+00\n            1.374057e+01    2.668860e-01\n            1.578173e+00    3.339576e-03\n            6.446766e-01    7.705908e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"204.59772\">\n            8.021998e+03    1.277572e-02\n            1.559323e+03    8.683968e-02\n            4.518366e+02    2.660671e-01\n            1.549029e+02    2.721776e-01\n            2.078785e+00    9.057867e-03\n            7.755449e-01    5.898782e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"57.943820\">\n            5.341441e+05    2.116369e-03\n            4.059137e+04    1.163531e-02\n            6.160331e+03    4.265810e-02\n            1.335977e+03    6.480722e-02\n            2.652756e+03    1.057343e-02\n            3.356452e+01    1.167056e+00\n            1.374057e+01    2.948342e-01\n            1.578173e+00    2.073523e-03\n            6.446766e-01    4.784553e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"10.463772\">\n            5.341441e+05    9.778673e-04\n            4.059137e+04    5.376090e-03\n            6.160331e+03    1.971016e-02\n            1.335977e+03    2.994415e-02\n            2.652756e+03    3.086386e-03\n            3.356452e+01    6.470368e-01\n            1.374057e+01    1.634613e-01\n            1.578173e+00    1.205839e+00\n            6.446766e-01    2.782415e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"6.5346640\">\n            8.021998e+03    2.758740e-03\n            1.559323e+03    1.875182e-02\n            4.518366e+02    5.745350e-02\n            1.549029e+02    5.877298e-02\n            1.267788e+01    4.597806e-01\n            5.316224e+00    4.099928e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"44.355601\">\n            8.021998e+03    6.548585e-03\n            1.559323e+03    4.451232e-02\n            4.518366e+02    1.363808e-01\n            1.549029e+02    1.395129e-01\n            1.267788e+01    6.839064e-01\n            5.316224e+00    6.098490e-01\n            2.078785e+00    1.506723e-02\n            7.755449e-01    9.812276e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"9.9204086\">\n            9.056942e+01    8.891606e-02\n            2.712435e+01    3.716817e-01\n            9.372578e+00    5.560401e-01\n            3.113754e+00    2.936912e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"1.8279726\">\n            7.739088e+02    6.560546e-03\n            2.123687e+02    4.109977e-02\n            7.556823e+01    9.757141e-02\n            2.929984e+01    7.068209e-02\n            2.735608e+00    3.709272e-01\n            1.014563e+00    6.219666e-01\n            3.459034e-01    2.814543e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"27.975319\">\n            7.739088e+02    1.921431e-02\n            2.123687e+02    1.203716e-01\n            7.556823e+01    2.857639e-01\n            2.929984e+01    2.070114e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"161.31902\">\n            7.739088e+02    3.562056e-02\n            2.123687e+02    2.231517e-01\n            7.556823e+01    5.297651e-01\n            2.929984e+01    3.837692e-01\n            2.606878e+01    9.817937e-03\n            1.079897e+01    2.450247e-02\n            4.401687e+00    1.452283e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Bi2\" symbol=\"Bi\" type=\"2\" atomic_number=\"83\">\n        <potential>\n        0    1    0.000000e+00    7.800000e+01\n        0    1    2.690351e+02    -3.253767e+01\n        0    1    7.166323e+00    -2.260474e+01\n        0    1    1.849351e+00    -9.178123e+00\n        0    2    1.613278e+04    -8.969041e+03\n        0    2    9.110662e+01    -2.673083e+02\n        0    2    8.409393e-01    -5.326061e+00\n        </potential>\n        <core num=\"39\">\n            <orbital type=\"0\" bc=\"5039.7150\">\n            5.664029e+05    1.991978e-02\n            4.272825e+04    1.084627e-01\n            6.427628e+03    3.968563e-01\n            1.384302e+03    6.059809e-01\n            2.787654e+02    3.855249e-02\n            1.196200e+02    5.030315e-02\n            2.089484e+02    1.012059e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"785.87850\">\n            8.323227e+03    2.261280e-02\n            1.612743e+03    1.535115e-01\n            4.663912e+02    4.710569e-01\n            1.597001e+02    4.832781e-01\n            7.316488e+01    3.175420e-02\n            2.914382e+01    4.022383e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"914.64300\">\n            5.664029e+05    8.270370e-03\n            4.272825e+04    4.503196e-02\n            6.427628e+03    1.647683e-01\n            1.384302e+03    2.515934e-01\n            2.774629e+03    5.914958e-02\n            2.089484e+02    1.124416e-02\n            8.497441e+00    1.074335e-02\n            3.694375e+00    2.576774e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"224.73750\">\n            5.664029e+05    4.004475e-03\n            4.272825e+04    2.180427e-02\n            6.427628e+03    7.978004e-02\n            1.384302e+03    1.218204e-01\n            2.774629e+03    3.419788e-02\n            3.471407e+01    1.055621e+00\n            1.422432e+01    2.674770e-01\n            1.670083e+00    3.318727e-03\n            6.905768e-01    7.393068e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"187.25700\">\n            8.323227e+03    1.277915e-02\n            1.612743e+03    8.675373e-02\n            4.663912e+02    2.662078e-01\n            1.597001e+02    2.731143e-01\n            2.199622e+00    8.933002e-03\n            8.363468e-01    5.729860e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"53.754900\">\n            5.664029e+05    2.147802e-03\n            4.272825e+04    1.169473e-02\n            6.427628e+03    4.279006e-02\n            1.384302e+03    6.533842e-02\n            2.774629e+03    1.043350e-02\n            3.471407e+01    1.171893e+00\n            1.422432e+01    2.969383e-01\n            1.670083e+00    2.354879e-03\n            6.905768e-01    5.245921e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"10.039065\">\n            5.664029e+05    1.004063e-03\n            4.272825e+04    5.467098e-03\n            6.427628e+03    2.000367e-02\n            1.384302e+03    3.054466e-02\n            2.774629e+03    3.071493e-03\n            3.471407e+01    6.589934e-01\n            1.422432e+01    1.669781e-01\n            1.670083e+00    1.225433e+00\n            6.905768e-01    2.729875e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"6.3700050\">\n            8.323227e+03    2.818922e-03\n            1.612743e+03    1.913680e-02\n            4.663912e+02    5.872215e-02\n            1.597001e+02    6.024565e-02\n            1.314259e+01    4.713673e-01\n            5.534688e+00    4.203565e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"41.224500\">\n            8.323227e+03    6.576158e-03\n            1.612743e+03    4.464354e-02\n            4.663912e+02    1.369907e-01\n            1.597001e+02    1.405448e-01\n            1.314259e+01    6.846582e-01\n            5.534688e+00    6.105653e-01\n            2.199622e+00    1.531727e-02\n            8.363468e-01    9.824892e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"9.8912136\">\n            9.531382e+01    8.702363e-02\n            2.864076e+01    3.681724e-01\n            9.957159e+00    5.567165e-01\n            3.343175e+00    2.938595e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"1.9668071\">\n            8.016838e+02    6.805233e-03\n            2.199102e+02    4.275435e-02\n            7.828421e+01    1.020009e-01\n            3.039040e+01    7.443423e-02\n            2.938973e+00    3.732035e-01\n            1.117393e+00    6.279238e-01\n            3.920597e-01    2.716109e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"26.290500\">\n            8.016838e+02    1.915052e-02\n            2.199102e+02    1.203145e-01\n            7.828421e+01    2.870394e-01\n            3.039040e+01    2.094645e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"147.87975\">\n            8.016838e+02    3.525897e-02\n            2.199102e+02    2.215170e-01\n            7.828421e+01    5.284824e-01\n            3.039040e+01    3.856553e-01\n            2.715512e+01    9.975382e-03\n            1.130529e+01    2.519320e-02\n            4.636159e+00    1.512790e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Po2\" symbol=\"Po\" type=\"2\" atomic_number=\"84\">\n        <potential>\n        0    1    0.000000e+00    7.800000e+01\n        0    1    3.942586e+02    -2.773872e+01\n        0    1    8.002691e+00    -2.548371e+01\n        0    1    1.687569e+00    -1.106726e+01\n        0    2    1.228252e+04    -1.573989e+04\n        0    2    7.531426e+01    -1.783193e+02\n        0    2    5.604055e-01    -1.354229e+00\n        </potential>\n        <core num=\"39\">\n            <orbital type=\"0\" bc=\"5183.8635\">\n            6.005359e+05    2.010310e-02\n            4.498041e+04    1.083926e-01\n            6.706596e+03    3.957331e-01\n            1.434233e+03    6.073169e-01\n            2.911599e+02    3.846977e-02\n            1.244600e+02    5.174752e-02\n            2.166603e+02    1.015525e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"809.72115\">\n            8.633443e+03    2.258652e-02\n            1.667493e+03    1.531295e-01\n            4.812575e+02    4.705597e-01\n            1.645937e+02    4.841025e-01\n            7.557288e+01    3.187815e-02\n            3.010295e+01    4.052008e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"944.88150\">\n            6.005359e+05    8.373678e-03\n            4.498041e+04    4.514948e-02\n            6.706596e+03    1.648373e-01\n            1.434233e+03    2.529697e-01\n            2.902707e+03    5.792081e-02\n            2.166603e+02    1.148299e-02\n            8.827412e+00    1.107537e-02\n            3.842130e+00    2.640433e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"233.35455\">\n            6.005359e+05    4.058625e-03\n            4.498041e+04    2.188343e-02\n            6.706596e+03    7.989475e-02\n            1.434233e+03    1.226115e-01\n            2.902707e+03    3.356623e-02\n            3.589477e+01    1.054692e+00\n            1.472367e+01    2.681120e-01\n            1.765559e+00    3.301523e-03\n            7.374273e-01    7.085223e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"194.16450\">\n            8.633443e+03    1.278445e-02\n            1.667493e+03    8.667454e-02\n            4.812575e+02    2.663467e-01\n            1.645937e+02    2.740123e-01\n            2.323357e+00    8.859667e-03\n            8.985772e-01    5.584725e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"56.490000\">\n            6.005359e+05    2.180211e-03\n            4.498041e+04    1.175534e-02\n            6.706596e+03    4.291785e-02\n            1.434233e+03    6.586441e-02\n            2.902707e+03    1.029230e-02\n            3.589477e+01    1.176550e+00\n            1.472367e+01    2.990894e-01\n            1.765559e+00    2.673176e-03\n            7.374273e-01    5.736761e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"10.892025\">\n            6.005359e+05    1.030740e-03\n            4.498041e+04    5.557580e-03\n            6.706596e+03    2.029030e-02\n            1.434233e+03    3.113876e-02\n            2.902707e+03    3.055656e-03\n            3.589477e+01    6.707732e-01\n            1.472367e+01    1.705165e-01\n            1.765559e+00    1.245654e+00\n            7.374273e-01    2.673232e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"7.0107600\">\n            8.633443e+03    2.878185e-03\n            1.667493e+03    1.951319e-02\n            4.812575e+02    5.996310e-02\n            1.645937e+02    6.168886e-02\n            1.361899e+01    4.826986e-01\n            5.759339e+00    4.305844e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"43.394250\">\n            8.633443e+03    6.604338e-03\n            1.667493e+03    4.477534e-02\n            4.812575e+02    1.375925e-01\n            1.645937e+02    1.415524e-01\n            1.361899e+01    6.853055e-01\n            5.759339e+00    6.113170e-01\n            2.323357e+00    1.559451e-02\n            8.985772e-01    9.830062e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"11.094965\">\n            1.001471e+02    8.530397e-02\n            3.018689e+01    3.650135e-01\n            1.055441e+01    5.575616e-01\n            3.578778e+00    2.941948e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"2.3527640\">\n            8.286368e+02    7.051211e-03\n            2.272032e+02    4.438944e-02\n            8.090108e+01    1.062558e-01\n            3.143327e+01    7.785896e-02\n            3.142810e+00    3.760460e-01\n            1.221199e+00    6.332214e-01\n            4.390344e-01    2.630759e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"27.966510\">\n            8.286368e+02    1.915156e-02\n            2.272032e+02    1.205647e-01\n            8.090108e+01    2.885980e-01\n            3.143327e+01    2.114702e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"153.56169\">\n            8.286368e+02    3.502436e-02\n            2.272032e+02    2.204886e-01\n            8.090108e+01    5.277877e-01\n            3.143327e+01    3.867364e-01\n            2.828874e+01    9.957523e-03\n            1.183466e+01    2.550149e-02\n            4.878431e+00    1.551388e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"At2\" symbol=\"At\" type=\"2\" atomic_number=\"85\">\n        <potential>\n        0    1    0.000000e+00    7.800000e+01\n        0    1    5.190520e+02    -2.697507e+01\n        0    1    7.767834e+00    -2.599058e+01\n        0    1    1.688595e+00    -1.123702e+01\n        0    2    2.491467e+04    -9.487801e+03\n        0    2    8.702394e+01    -1.511301e+02\n        0    2    6.501742e-01    -1.203176e+00\n        </potential>\n        <core num=\"39\">\n            <orbital type=\"0\" bc=\"5330.8934\">\n            6.366627e+05    2.029520e-02\n            4.735586e+04    1.083430e-01\n            6.998004e+03    3.946125e-01\n            1.485869e+03    6.086274e-01\n            3.042431e+02    3.836574e-02\n            1.294960e+02    5.325298e-02\n            2.246464e+02    1.018374e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"833.99149\">\n            8.953691e+03    2.256167e-02\n            1.723751e+03    1.527500e-01\n            4.964799e+02    4.700584e-01\n            1.695920e+02    4.849299e-01\n            7.804048e+01    3.200251e-02\n            3.108457e+01    4.082515e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"975.86853\">\n            6.366627e+05    8.481292e-03\n            4.735586e+04    4.527617e-02\n            6.998004e+03    1.649072e-01\n            1.485869e+03    2.543433e-01\n            3.037215e+03    5.669577e-02\n            2.246464e+02    1.172300e-02\n            9.167218e+00    1.142172e-02\n            3.993346e+00    2.706977e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"242.19915\">\n            6.366627e+05    4.114772e-03\n            4.735586e+04    2.196613e-02\n            6.998004e+03    8.000616e-02\n            1.485869e+03    1.233969e-01\n            3.037215e+03    3.294287e-02\n            3.711120e+01    1.053523e+00\n            1.524462e+01    2.688838e-01\n            1.864578e+00    3.281989e-03\n            7.850906e-01    6.774653e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"201.22188\">\n            8.953691e+03    1.278998e-02\n            1.723751e+03    8.659245e-02\n            4.964799e+02    2.664713e-01\n            1.695920e+02    2.749018e-01\n            2.449806e+00    8.811177e-03\n            9.619672e-01    5.445738e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"59.304594\">\n            6.366627e+05    2.213493e-03\n            4.735586e+04    1.181641e-02\n            6.998004e+03    4.303835e-02\n            1.485869e+03    6.637986e-02\n            3.037215e+03    1.016001e-02\n            3.711120e+01    1.180870e+00\n            1.524462e+01    3.013857e-01\n            1.864578e+00    3.037380e-03\n            7.850906e-01    6.269733e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"11.763761\">\n            6.366627e+05    1.057776e-03\n            4.735586e+04    5.646788e-03\n            6.998004e+03    2.056702e-02\n            1.485869e+03    3.172138e-02\n            3.037215e+03    3.044346e-03\n            3.711120e+01    6.822282e-01\n            1.524462e+01    1.741207e-01\n            1.864578e+00    1.266285e+00\n            7.850906e-01    2.613855e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"7.6603365\">\n            8.953691e+03    2.936096e-03\n            1.723751e+03    1.987835e-02\n            4.964799e+02    6.117174e-02\n            1.695920e+02    6.310706e-02\n            1.410623e+01    4.938638e-01\n            5.989433e+00    4.405756e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"45.617071\">\n            8.953691e+03    6.632285e-03\n            1.723751e+03    4.490279e-02\n            4.964799e+02    1.381795e-01\n            1.695920e+02    1.425512e-01\n            1.410623e+01    6.860229e-01\n            5.989433e+00    6.120006e-01\n            2.449806e+00    1.587999e-02\n            9.619672e-01    9.814612e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"12.334703\">\n            1.050668e+02    8.369065e-02\n            3.176179e+01    3.619621e-01\n            1.116388e+01    5.582237e-01\n            3.820267e+00    2.944914e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"2.7433650\">\n            8.561902e+02    7.275862e-03\n            2.346489e+02    4.589393e-02\n            8.357131e+01    1.102208e-01\n            3.249777e+01    8.109739e-02\n            3.346024e+00    3.796779e-01\n            1.324721e+00    6.380389e-01\n            4.853186e-01    2.553913e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"29.682435\">\n            8.561902e+02    1.915068e-02\n            2.346489e+02    1.207967e-01\n            8.357131e+01    2.901104e-01\n            3.249777e+01    2.134552e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"159.35637\">\n            8.561902e+02    3.479403e-02\n            2.346489e+02    2.194702e-01\n            8.357131e+01    5.270888e-01\n            3.249777e+01    3.878173e-01\n            2.944780e+01    9.942086e-03\n            1.237653e+01    2.581128e-02\n            5.126437e+00    1.589788e-02\n            </orbital>\n        </core>\n    </atom>\n    <atom id=\"Rn2\" symbol=\"Rn\" type=\"2\" atomic_number=\"86\">\n        <potential>\n        0    1    0.000000e+00    7.800000e+01\n        0    1    4.988177e+02    -2.688251e+01\n        0    1    8.811453e+00    -2.585124e+01\n        0    1    1.822679e+00    -1.125073e+01\n        0    2    1.610514e+04    -1.565476e+04\n        0    2    8.251972e+01    -1.606397e+02\n        0    2    6.709391e-01    -1.222878e+00\n        </potential>\n        <core num=\"39\">\n            <orbital type=\"0\" bc=\"5480.8719\">\n            6.748933e+05    2.049634e-02\n            4.986148e+04    1.083145e-01\n            7.302420e+03    3.934954e-01\n            1.539262e+03    6.099120e-01\n            3.180612e+02    3.823758e-02\n            1.347343e+02    5.481627e-02\n            2.328756e+02    1.021127e-02\n            </orbital>\n            <orbital type=\"1\" bc=\"858.69461\">\n            9.284304e+03    2.253826e-02\n            1.781558e+03    1.523732e-01\n            5.120667e+02    4.695532e-01\n            1.746969e+02    4.857599e-01\n            8.056918e+01    3.212732e-02\n            3.208910e+01    4.113894e-02\n            </orbital>\n            <orbital type=\"0\" bc=\"1007.6117\">\n            6.748933e+05    8.593323e-03\n            4.986148e+04    4.541206e-02\n            7.302420e+03    1.649774e-01\n            1.539262e+03    2.557125e-01\n            3.178288e+03    5.547729e-02\n            2.328756e+02    1.197033e-02\n            9.519502e+00    1.177833e-02\n            4.151486e+00    2.780972e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"251.28136\">\n            6.748933e+05    4.172600e-03\n            4.986148e+04    2.205042e-02\n            7.302420e+03    8.010691e-02\n            1.539262e+03    1.241645e-01\n            3.178288e+03    3.231804e-02\n            3.836433e+01    1.052108e+00\n            1.578896e+01    2.697879e-01\n            1.967190e+00    3.257334e-03\n            8.335464e-01    6.462859e-04\n            </orbital>\n            <orbital type=\"1\" bc=\"208.43073\">\n            9.284304e+03    1.279577e-02\n            1.781558e+03    8.650765e-02\n            5.120667e+02    2.665820e-01\n            1.746969e+02    2.757831e-01\n            2.579154e+00    8.783177e-03\n            1.026515e+00    5.314652e-03\n            </orbital>\n            <orbital type=\"0\" bc=\"62.200983\">\n            6.748933e+05    2.247749e-03\n            4.986148e+04    1.187840e-02\n            7.302420e+03    4.315300e-02\n            1.539262e+03    6.688651e-02\n            3.178288e+03    1.002687e-02\n            3.836433e+01    1.184923e+00\n            1.578896e+01    3.038451e-01\n            1.967190e+00    3.401957e-03\n            8.335464e-01    6.749805e-04\n            </orbital>\n            <orbital type=\"0\" bc=\"12.656536\">\n            6.748933e+05    1.085198e-03\n            4.986148e+04    5.734809e-03\n            7.302420e+03    2.083398e-02\n            1.539262e+03    3.229235e-02\n            3.178288e+03    3.031746e-03\n            3.836433e+01    6.933854e-01\n            1.578896e+01    1.778021e-01\n            1.967190e+00    1.287010e+00\n            8.335464e-01    2.553550e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"8.3208180\">\n            9.284304e+03    2.992507e-03\n            1.781558e+03    2.023127e-02\n            5.120667e+02    6.234469e-02\n            1.746969e+02    6.449653e-02\n            1.460451e+01    5.048266e-01\n            6.225015e+00    4.503100e-01\n            </orbital>\n            <orbital type=\"1\" bc=\"47.894695\">\n            9.284304e+03    6.659986e-03\n            1.781558e+03    4.502579e-02\n            5.120667e+02    1.387515e-01\n            1.746969e+02    1.435405e-01\n            1.460451e+01    6.867955e-01\n            6.225015e+00    6.126280e-01\n            2.579154e+00    1.616953e-02\n            1.026515e+00    9.784097e-03\n            </orbital>\n            <orbital type=\"3\" bc=\"13.611889\">\n            1.100730e+02    8.219039e-02\n            3.336531e+01    3.590862e-01\n            1.178540e+01    5.588329e-01\n            4.067488e+00    2.948007e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"3.1406630\">\n            8.860628e+02    7.454725e-03\n            2.427296e+02    4.714999e-02\n            8.647772e+01    1.137941e-01\n            3.366670e+01    8.435373e-02\n            3.550752e+00    3.836569e-01\n            1.429080e+00    6.424463e-01\n            5.314869e-01    2.486080e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"31.439670\">\n            8.860628e+02    1.907747e-02\n            2.427296e+02    1.206621e-01\n            8.647772e+01    2.912118e-01\n            3.366670e+01    2.158706e-01\n            </orbital>\n            <orbital type=\"2\" bc=\"165.26546\">\n            8.860628e+02    3.444229e-02\n            2.427296e+02    2.178422e-01\n            8.647772e+01    5.257511e-01\n            3.366670e+01    3.897307e-01\n            3.059515e+01    1.012055e-02\n            1.291376e+01    2.653624e-02\n            5.376237e+00    1.651825e-02\n            </orbital>\n        </core>\n    </atom>\n</core_info>\n"
  },
  {
    "path": "src/madness/chem/coredata/mcp2_guess",
    "content": "<?xml version=\"1.0\" ?>\n<name>\n  MCP\n</name>\n<basis symbol=\"H\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      3.425250910\n      0.623913730\n      0.168855400\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"He\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      6.362421390\n      1.158923000\n      0.313649790\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Li\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     16.119575000\n      2.936200700\n      0.794650500\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.636289700\n      0.147860100\n      0.048088700\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Be\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     30.167871000\n      5.495115300\n      1.487192700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.314833100\n      0.305538900\n      0.099370700\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"B\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     48.791113000\n      8.887362200\n      2.405267000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.236956100\n      0.519820500\n      0.169061800\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"C\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     71.616837000\n     13.045096000\n      3.530512200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.941249400\n      0.683483100\n      0.222289900\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"N\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     99.106169000\n     18.052312000\n      4.885660200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.780455900\n      0.878496600\n      0.285714400\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"O\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    130.709320000\n     23.808861000\n      6.443608300\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.033151300\n      1.169596100\n      0.380389000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"F\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    166.679130000\n     30.360812000\n      8.216820700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.464803200\n      1.502281200\n      0.488588500\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ne\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    207.015610000\n     37.708151000\n     10.205297000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      8.246315100\n      1.916266200\n      0.623229300\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Na\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    250.772430000\n     45.678511000\n     12.362388000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     12.040193000\n      2.797881900\n      0.909958000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.478740600\n      0.412564900\n      0.161475100\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mg\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    299.237400000\n     54.506470000\n     14.751580000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     15.121820000\n      3.513987000\n      1.142857000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.395448000\n      0.389326000\n      0.152380000\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Al\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    351.421476700\n     64.011860670\n     17.324107610\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     18.899396210\n      4.391813233\n      1.428353970\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.395448293\n      0.389326532\n      0.152379766\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Si\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    407.797551400\n     74.280833050\n     20.103292290\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     23.193656060\n      5.389706871\n      1.752899952\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.478740622\n      0.412564880\n      0.161475098\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"P\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    468.365637800\n     85.313385590\n     23.089131560\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     28.032639580\n      6.514182577\n      2.118614352\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.743103231\n      0.486321377\n      0.190342891\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"S\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    533.125735900\n     97.109518300\n     26.281625420\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     33.329751730\n      7.745117521\n      2.518952599\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.029194274\n      0.566140052\n      0.221583379\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cl\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    601.345613600\n    109.535854200\n     29.644676860\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     38.960418890\n      9.053563477\n      2.944499834\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.129386495\n      0.594093427\n      0.232524141\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ar\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    674.446518400\n    122.851275300\n     33.248349450\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     45.164243920\n     10.495199000\n      3.413364448\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.621366518\n      0.731354605\n      0.286247236\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"K\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    771.510368100\n    140.531576600\n     38.033328990\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     52.402039790\n     12.177107100\n      3.960373165\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.651583985\n      1.018782663\n      0.398744630\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.503982251\n      0.186001147\n      0.082140067\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ca\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    854.032495100\n    155.563085100\n     42.101441790\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     59.560299440\n     13.840532700\n      4.501370797\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.374706256\n      1.220531941\n      0.477707930\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.455848976\n      0.168236941\n      0.074295207\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sc\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    941.662425000\n    171.524986200\n     46.421355160\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     67.176687710\n     15.610417540\n      5.076992278\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.698159231\n      1.433088313\n      0.552930024\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      0.551700068\n      0.168286106\n      0.064930011\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.630932838\n      0.232853898\n      0.102830736\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ti\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1033.571245000\n    188.266292600\n     50.952206010\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     75.251204600\n     17.486761620\n      5.687237606\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.395535474\n      1.645810296\n      0.635004777\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      1.645981194\n      0.502076728\n      0.193716810\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.712264025\n      0.262870220\n      0.116086261\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"V\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1130.762517000\n    205.969804100\n     55.743467110\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     83.783850110\n     19.469564930\n      6.332106784\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.141151276\n      1.873246881\n      0.722756883\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.964817927\n      0.904363968\n      0.348931734\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.712264025\n      0.262870220\n      0.116086261\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1232.320450000\n    224.468708200\n     60.749992510\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     92.774624230\n     21.558827490\n      7.011599810\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.899488096\n      2.104563782\n      0.812006134\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      4.241479241\n      1.293786360\n      0.499182999\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.754778054\n      0.278560571\n      0.123015285\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1337.153266000\n    243.564136500\n     65.917960620\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    102.022002100\n     23.707719230\n      7.710486098\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.701960922\n      2.349343572\n      0.906449787\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.426950461\n      1.655392868\n      0.638702032\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.670982286\n      0.247634663\n      0.109358078\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Fe\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1447.400411000\n    263.645791600\n     71.352840190\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    111.919489100\n     26.007682360\n      8.458505490\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      8.548569754\n      2.607586250\n      1.006087840\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.411803475\n      1.955804428\n      0.754610151\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.592115681\n      0.218527925\n      0.096504236\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Co\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1557.298704000\n    283.663902900\n     76.770522340\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    121.834474100\n     28.311711640\n      9.207847321\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      9.480851678\n      2.891961952\n      1.115808827\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      7.664527389\n      2.337925151\n      0.902044205\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.592115681\n      0.218527925\n      0.096504236\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ni\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1679.771028000\n    305.972389600\n     82.808069430\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    132.858889900\n     30.873548780\n     10.041036270\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     10.330743350\n      3.151206003\n      1.215833241\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      8.627722755\n      2.631730438\n      1.015403419\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.630932838\n      0.232853898\n      0.102830736\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cu\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1801.806730000\n    328.201345000\n     88.824092280\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    144.121218400\n     33.490671730\n     10.892205880\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     11.307754020\n      3.449225397\n      1.330818388\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      9.647911930\n      2.942920654\n      1.135470278\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.630932838\n      0.232853898\n      0.102830736\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Zn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1929.432301000\n    351.448502100\n     95.115680210\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    155.841675500\n     36.214253910\n     11.777999340\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     12.281527440\n      3.746257327\n      1.445422541\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     10.947370770\n      3.339297018\n      1.288404602\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.889713885\n      0.328360379\n      0.145007406\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ga\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2061.424532000\n    375.491051700\n    101.622532400\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    167.761868000\n     38.984250280\n     12.678888130\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     12.615055200\n      3.847993927\n      1.484675684\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     12.615055200\n      3.847993927\n      1.484675684\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.798524374\n      0.294705714\n      0.130145151\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ge\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2196.384229000\n    400.074129200\n    108.275672600\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    180.389038000\n     41.918533040\n     13.633207950\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     14.196656190\n      4.330432640\n      1.670815538\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     14.196656190\n      4.330432640\n      1.670815538\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.985832560\n      0.363834215\n      0.160673025\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"As\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2337.065673000\n    425.699429800\n    115.210879000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    193.197053500\n     44.894840400\n     14.601195480\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     15.871635840\n      4.841354819\n      1.867945198\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     15.871635840\n      4.841354819\n      1.867945198\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.107681464\n      0.408804124\n      0.180532211\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Se\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2480.626814000\n    451.849270800\n    122.288046400\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    206.157878000\n     47.906657270\n     15.580731800\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     17.639994140\n      5.380760465\n      2.076064666\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     17.639994140\n      5.380760465\n      2.076064666\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.214644297\n      0.448280136\n      0.197965235\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Br\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2629.997471000\n    479.057322400\n    129.651607000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    219.835025500\n     51.084932220\n     16.614405460\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     19.501731090\n      5.948649577\n      2.295173940\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     19.501731090\n      5.948649577\n      2.295173940\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.396037488\n      0.515225632\n      0.227529071\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Kr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2782.160055000\n    506.773927000\n    137.152801900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    233.951411800\n     54.365276810\n     17.681275330\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     21.456846710\n      6.545022156\n      2.525273021\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     21.456846710\n      6.545022156\n      2.525273021\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.590049336\n      0.586828205\n      0.259149523\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Rb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2938.601529000\n    535.269937000\n    144.864934000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    248.507037000\n     57.747691000\n     18.781341000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     23.505340970\n      7.169878201\n      2.766361909\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     23.505340970\n      7.169878201\n      2.766361909\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.247796820\n      0.829578393\n      0.366350565\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.486993992\n      0.262216156\n      0.115825488\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3100.983951000\n    564.848097800\n    152.869938900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    263.501900700\n     61.232174930\n     19.914603720\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     25.578866920\n      7.802369707\n      3.010396794\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     25.578866920\n      7.802369707\n      3.010396794\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.461032403\n      0.908275734\n      0.401104140\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>\n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.437080480\n      0.235340816\n      0.103954177\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Y\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3266.026869000\n    594.910871000\n    161.006099000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    277.937724000\n     64.586750000\n     21.005616000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     30.671326000\n      8.557222000\n      3.349239000\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.660043000\n      1.774715000\n      0.691295000\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.667688000\n      0.984544000\n      0.434785000\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.128212000\n      0.962594000\n      0.472861000\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.207424000\n      0.111685000\n      0.049333000\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Zr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3435.348677000\n    625.753049800\n    169.353195800\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    293.783029200\n     68.268857970\n     22.203151440\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     30.732931030\n      9.374523538\n      3.616982618\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     30.732931030\n      9.374523538\n      3.616982618\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.827607815\n      1.101055827\n      0.484687486\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      0.486993992\n      0.262216156\n      0.115825488\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.887830189\n      0.345716474\n      0.152185243\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Nb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3610.742864000\n    657.701320100\n    177.999644500\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    310.067572800\n     72.053035690\n     23.433883480\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     33.019978580\n     10.072145940\n      3.886147028\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     33.019978580\n     10.072145940\n      3.886147028\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.144798430\n      1.224568208\n      0.539057940\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      1.344878866\n      0.523688859\n      0.230529125\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.486993992\n      0.262216156\n      0.115825488\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mo\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3788.666115000\n    690.110262300\n    186.770769100\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    326.430956700\n     75.855534200\n     24.670574010\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     35.469481290\n     10.819322340\n      4.174430912\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     35.469481290\n     10.819322340\n      4.174430912\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.496895188\n      1.361672861\n      0.599411746\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      1.702112315\n      0.662793713\n      0.291763424\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.512962508\n      0.276198597\n      0.122001777\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Tc\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3970.868257000\n    723.298609800\n    195.752831100\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    343.584632300\n     79.841679520\n     25.966992190\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     38.089919830\n     11.618639620\n      4.482832367\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     38.089919830\n     11.618639620\n      4.482832367\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.829752708\n      1.491285854\n      0.656467704\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.101373228\n      0.818263843\n      0.360201758\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.461699983\n      0.248596896\n      0.109809621\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ru\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4159.274210000\n    757.616989400\n    205.040723900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    360.798656100\n     83.841848430\n     27.267971270\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     40.717516780\n     12.420140440\n      4.792076302\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     40.717516780\n     12.420140440\n      4.792076302\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.197516371\n      1.634491118\n      0.719507014\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.390895761\n      0.931002417\n      0.409829556\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.413135485\n      0.222447917\n      0.098259157\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Rh\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4350.077794000\n    792.372100500\n    214.446813300\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    378.433426400\n     87.939789810\n     28.600748990\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     43.521794550\n     13.275534540\n      5.122113939\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     43.521794550\n     13.275534540\n      5.122113939\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.540857408\n      1.768186338\n      0.778359979\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.779066094\n      1.082153932\n      0.476366825\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.413135485\n      0.222447917\n      0.098259157\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Pd\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4545.160269000\n    827.906616800\n    224.063840200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    396.488943300\n     92.135503650\n     29.965325350\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     46.419450970\n     14.159412110\n      5.463141383\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     46.419450970\n     14.159412110\n      5.463141383\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.919104589\n      1.915473830\n      0.843196295\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      3.025977448\n      1.178299934\n      0.518690532\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.437080480\n      0.235340816\n      0.103954177\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ag\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4744.521634000\n    864.220538300\n    233.891804500\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    414.965206900\n     96.428989950\n     31.361700350\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     49.410486050\n     15.071773140\n      5.815158634\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     49.410486050\n     15.071773140\n      5.815158634\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.290230450\n      2.059988316\n      0.906811928\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      3.283395668\n      1.278537254\n      0.562815247\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.437080480\n      0.235340816\n      0.103954177\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cd\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4950.261905000\n    901.696385600\n    244.034231300\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    433.446938500\n    100.723746900\n     32.758488610\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     52.592792350\n     16.042478000\n      6.189686744\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     52.592792350\n     16.042478000\n      6.189686744\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.674851796\n      2.209757875\n      0.972740857\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      3.642963976\n      1.418551290\n      0.624449770\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.594915098\n      0.320325000\n      0.141493186\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"In\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5158.224714000\n    939.577070700\n    254.286223100\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    452.331322300\n    105.112071600\n     34.185707990\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     55.975397690\n     17.074280440\n      6.587788204\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     55.975397690\n     17.074280440\n      6.587788204\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.048549180\n      1.965878882\n      0.865384724\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.048549180\n      1.965878882\n      0.865384724\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.566923061\n      0.305253019\n      0.134835626\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5370.466413000\n    978.237161100\n    264.749152200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    472.051532200\n    109.694624300\n     35.676096360\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     59.151411880\n     18.043066000\n      6.961575790\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     59.151411880\n     18.043066000\n      6.961575790\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.583138529\n      2.174045204\n      0.957020051\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.583138529\n      2.174045204\n      0.957020051\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.623581642\n      0.335760162\n      0.148311168\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5586.987002000\n   1017.676657000\n    275.423018900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    492.192488800\n    114.374949400\n     37.198283360\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     62.521797750\n     19.071141120\n      7.358239131\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     62.521797750\n     19.071141120\n      7.358239131\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.120693149\n      2.383366187\n      1.049163663\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.120693149\n      2.383366187\n      1.049163663\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.652922693\n      0.351558503\n      0.155289573\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Te\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5810.061591000\n   1058.309972000\n    286.419979700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    512.754192000\n    119.153047100\n     38.752269000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     65.985562270\n     20.127699700\n      7.765892279\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     65.985562270\n     20.127699700\n      7.765892279\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.707956921\n      2.612043655\n      1.149828048\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.707956921\n      2.612043655\n      1.149828048\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.701271348\n      0.377591265\n      0.166788702\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"I\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   6035.183623000\n   1099.316231000\n    297.517873700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    533.736641800\n    124.028917100\n     40.338053280\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     69.542705450\n     21.212741750\n      8.184535234\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     69.542705450\n     21.212741750\n      8.184535234\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.295991196\n      2.841021154\n      1.250624506\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>\n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      7.295991196\n      2.841021154\n      1.250624506\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.790036458\n      0.425385789\n      0.187900384\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n</basis>\n<atomicguess symbol=\"H\" basis=\"MCP\">\n   <guessdensitymatrix>\n     1.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000 \n   </betaocc>\n   <alphaeps>\n     0.11391 \n   </alphaeps>\n   <betaeps>\n    -0.16248 \n   </betaeps>\n   <alphavectors>\n     1.00000 \n   </alphavectors>\n   <betavectors>\n     1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"He\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000 \n   </betaocc>\n   <alphaeps>\n    -0.48864 \n   </alphaeps>\n   <betaeps>\n    -0.48864 \n   </betaeps>\n   <alphavectors>\n     1.00000 \n   </alphavectors>\n   <betavectors>\n     1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Li\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.09350     -0.31455      0.00000      0.00000      0.00000 \n    -0.31455      1.05820      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.88671      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.11328      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -1.72754     -0.07859      0.00270      0.00270      0.00270 \n   </alphaeps>\n   <betaeps>\n    -1.71598     -0.04439      0.03627      0.03627      0.03627 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.30597      0.00000      0.00000      0.00000 \n     0.00000     -1.02868      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000     -1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.30427      0.00000      0.00000      0.00000 \n     0.00000     -1.02878      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Be\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.19904     -0.65260      0.00000      0.00000      0.00000 \n    -0.65260      2.13968      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -3.57542     -0.12879      0.01861      0.01861      0.01861 \n   </alphaeps>\n   <betaeps>\n    -3.57542     -0.12879      0.01861      0.01861      0.01861 \n   </betaeps>\n   <alphavectors>\n     0.00000     -0.31547      0.00000      0.00000      0.00000 \n     0.00000      1.03433      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000     -0.31547      0.00000      0.00000      0.00000 \n     0.00000      1.03433      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"B\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.20570     -0.66544      0.00000      0.00000      0.00000 \n    -0.66544      2.15275      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.33333      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.33333      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.33333 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      0.33333      0.33333      0.33333 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.00001      0.00001      0.00001 \n   </betaocc>\n   <alphaeps>\n    -6.08829     -0.21144      0.01879      0.01879      0.01879 \n   </alphaeps>\n   <betaeps>\n    -6.07221     -0.15890      0.07410      0.07410      0.07410 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.32158      0.00000      0.00000      0.00000 \n     0.00000     -1.03745      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.31982      0.00000      0.00000      0.00000 \n     0.00000     -1.03752      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000     -1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"C\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.16633     -0.59512      0.00000      0.00000      0.00000 \n    -0.59512      2.12928      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.66667      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.66667      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.66666 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      0.66667      0.66667      0.66666 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -9.48864     -0.40197     -0.07086     -0.07086     -0.07086 \n   </alphaeps>\n   <betaeps>\n    -9.45732     -0.29308      0.04262      0.04262      0.04263 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.28944      0.00000      0.00000      0.00000 \n     0.00000     -1.03178      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.28733      0.00000      0.00000      0.00000 \n     0.00000     -1.03185      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"N\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.14474     -0.55332      0.00000      0.00000      0.00000 \n    -0.55332      2.11538      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -13.63110     -0.61525     -0.16723     -0.16723     -0.16723 \n   </alphaeps>\n   <betaeps>\n   -13.58360     -0.44497      0.00931      0.00931      0.00931 \n   </betaeps>\n   <alphavectors>\n     0.00000     -0.27008      0.00000      0.00000      0.00000 \n     0.00000      1.02841      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000     -0.26794      0.00000      0.00000      0.00000 \n     0.00000      1.02847      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"O\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.14431     -0.55278      0.00000      0.00000      0.00000 \n    -0.55278      2.11737      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.33333      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.33333      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.33333 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.33333      0.33333      0.33333 \n   </betaocc>\n   <alphaeps>\n   -18.33305     -0.75425     -0.16616     -0.16616     -0.16615 \n   </alphaeps>\n   <betaeps>\n   -18.29820     -0.63847     -0.04596     -0.04596     -0.04596 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.26916      0.00000      0.00000      0.00000 \n     0.00000     -1.02891      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000     -1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.26808      0.00000      0.00000      0.00000 \n     0.00000     -1.02894      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"F\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.14394     -0.55227      0.00000      0.00000      0.00000 \n    -0.55227      2.11894      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.66666      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.66666      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.66668 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.66668      0.66666      0.66666 \n   </betaocc>\n   <alphaeps>\n   -23.72693     -0.90234     -0.15540     -0.15540     -0.15540 \n   </alphaeps>\n   <betaeps>\n   -23.70789     -0.84251     -0.09322     -0.09322     -0.09322 \n   </betaeps>\n   <alphavectors>\n     0.00000     -0.26849      0.00000      0.00000      0.00000 \n     0.00000      1.02930      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000     -0.26806      0.00000      0.00000      0.00000 \n     0.00000      1.02931      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ne\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.14856     -0.56175      0.00000      0.00000      0.00000 \n    -0.56175      2.12419      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      1.00000      1.00000      1.00000 \n   </betaocc>\n   <alphaeps>\n   -29.70111     -1.02178     -0.09526     -0.09526     -0.09526 \n   </alphaeps>\n   <betaeps>\n   -29.70111     -1.02178     -0.09526     -0.09526     -0.09526 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.27254      0.00000      0.00000      0.00000 \n     0.00000     -1.03058      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.27254      0.00000      0.00000      0.00000 \n     0.00000     -1.03058      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Na\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.02589     -0.10214      0.00000      0.00000      0.00000      0.18066      0.00000      0.00000      0.00000 \n    -0.10214      0.40298      0.00000      0.00000      0.00000     -0.71278      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.56498      0.00000      0.00000      0.00000      0.37415      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.56498      0.00000      0.00000      0.00000      0.37415      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.56498      0.00000      0.00000      0.00000      0.37415 \n     0.18066     -0.71278      0.00000      0.00000      0.00000      1.26074      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.37415      0.00000      0.00000      0.00000      0.08949      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.37415      0.00000      0.00000      0.00000      0.08949      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.37415      0.00000      0.00000      0.00000      0.08949 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      1.00000      1.00000      1.00000      0.93972      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      1.00000      1.00000      1.00000      0.06028      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -37.35536     -1.89289     -0.84513     -0.84513     -0.84513      0.23693      0.51480      0.51480      0.51480 \n   </alphaeps>\n   <betaeps>\n   -37.34378     -1.88018     -0.83095     -0.83095     -0.83095      0.28084      0.55684      0.55684      0.55684 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.16095      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.63499     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.88203      0.00000      0.70216     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.88203     -0.00000      0.00000     -0.00000      0.00000     -0.70216 \n     0.00000      0.00000     -0.88203     -0.00000      0.00000      0.00000      0.00000      0.70216     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      1.12281     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.21553     -0.00000     -1.10660     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.21553      0.00000     -0.00000      0.00000     -0.00000      1.10660 \n     0.00000      0.00000     -0.21553      0.00000     -0.00000     -0.00000     -0.00000     -1.10660      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.16005     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.63200      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.88713     -0.00000     -0.00000     -0.00000     -0.69572     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.88713      0.00000     -0.00000      0.00000     -0.69572 \n     0.00000      0.00000      0.00000      0.88713      0.00000      0.00000     -0.00000     -0.69572      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.12312      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.20746      0.00000      0.00000      0.00000      1.10814     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.20746     -0.00000      0.00000     -0.00000      1.10814 \n     0.00000      0.00000      0.00000      0.20746     -0.00000     -0.00000      0.00000      1.10814     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mg\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.03436     -0.12956      0.00000      0.00000      0.00000      0.28096      0.00000      0.00000      0.00000 \n    -0.12956      0.48845      0.00000      0.00000      0.00000     -1.05926      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.72515      0.00000      0.00000      0.00000      0.30060      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.72515      0.00000      0.00000      0.00000      0.30060      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.72515      0.00000      0.00000      0.00000      0.30060 \n     0.28096     -1.05926      0.00000      0.00000      0.00000      2.29712      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.30060      0.00000      0.00000      0.00000      0.05238      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.30060      0.00000      0.00000      0.00000      0.05238      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.30060      0.00000      0.00000      0.00000      0.05238 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -45.36464     -2.61673     -1.37821     -1.37821     -1.37821      0.06831      0.34666      0.34666      0.34666 \n   </alphaeps>\n   <betaeps>\n   -45.36464     -2.61673     -1.37821     -1.37821     -1.37821      0.06831      0.34666      0.34666      0.34666 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.13108     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.49419     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.92875      0.00000     -0.00000      0.54410      0.00000 \n     0.00000      0.00000      0.00000     -0.92875      0.00000     -0.00000      0.00000      0.00000      0.54410 \n     0.00000      0.00000      0.92875      0.00000     -0.00000      0.00000      0.54410      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.07171      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.16183     -0.00000      0.00000     -1.06416      0.00000 \n     0.00000      0.00000      0.00000     -0.16183     -0.00000      0.00000     -0.00000     -0.00000     -1.06416 \n     0.00000      0.00000      0.16183     -0.00000      0.00000     -0.00000     -1.06416      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.13108     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.49419     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.92875      0.00000     -0.00000      0.54410      0.00000 \n     0.00000      0.00000      0.00000     -0.92875      0.00000     -0.00000      0.00000      0.00000      0.54410 \n     0.00000      0.00000      0.92875      0.00000     -0.00000      0.00000      0.54410      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.07171      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.16183     -0.00000      0.00000     -1.06416      0.00000 \n     0.00000      0.00000      0.00000     -0.16183     -0.00000      0.00000     -0.00000     -0.00000     -1.06416 \n     0.00000      0.00000      0.16183     -0.00000      0.00000     -0.00000     -1.06416      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sc\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.33463     -0.92686      0.00000      0.00000      0.00000      0.24877      0.00000      0.00000      0.00000     -0.06140      0.00000      0.00000     -0.06140      0.00000     -0.06140      0.06379      0.00000      0.00000      0.00000 \n    -0.92686      2.57569      0.00000      0.00000      0.00000     -0.83071      0.00000      0.00000      0.00000      0.17381      0.00000      0.00000      0.17381      0.00000      0.17381     -0.13465      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.19074      0.00000      0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05912      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.19074      0.00000      0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05912      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.19074      0.00000      0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05912 \n     0.24877     -0.83071      0.00000      0.00000      0.00000      2.59681      0.00000      0.00000      0.00000     -0.37708      0.00000      0.00000     -0.37708      0.00000     -0.37708     -0.09050      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      2.09521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09389      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      2.09521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09389      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      2.09521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09389 \n    -0.06140      0.17381      0.00000      0.00000      0.00000     -0.37708      0.00000      0.00000      0.00000      0.71614      0.00000      0.00000      0.48198      0.00000      0.48197     -0.11760      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46832      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46831      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.06140      0.17381      0.00000      0.00000      0.00000     -0.37708      0.00000      0.00000      0.00000      0.48198      0.00000      0.00000      0.71614      0.00000      0.48198     -0.11760      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46832      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.06140      0.17381      0.00000      0.00000      0.00000     -0.37708      0.00000      0.00000      0.00000      0.48197      0.00000      0.00000      0.48198      0.00000      0.71614     -0.11760      0.00000      0.00000      0.00000 \n     0.06379     -0.13465      0.00000      0.00000      0.00000     -0.09050      0.00000      0.00000      0.00000     -0.11760      0.00000      0.00000     -0.11760      0.00000     -0.11760      0.05130      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.05912      0.00000      0.00000      0.00000      0.09389      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09895      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05912      0.00000      0.00000      0.00000      0.09389      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09895      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05912      0.00000      0.00000      0.00000      0.09389      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09895 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.14865      0.14865      0.14865      0.14865      0.14864      0.07177      0.07177      0.07177      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00746      0.00746      0.00746      0.00746      0.00746      0.00139      0.00139      0.00139      0.00000 \n   </betaocc>\n   <alphaeps>\n  -158.64070    -17.05630    -14.36178    -14.36178    -14.36178     -2.14001     -1.39483     -1.39483     -1.39483     -0.18866      0.00385      0.00385      0.00385      0.00385      0.00385      0.00980      0.00980      0.00980      0.16066 \n   </alphaeps>\n   <betaeps>\n  -158.64030    -17.05582    -14.36127    -14.36127    -14.36127     -2.13514     -1.38922     -1.38922     -1.38922     -0.16923      0.02354      0.02354      0.02354      0.02354      0.02354      0.03141      0.03141      0.03141      0.17251 \n   </betaeps>\n   <alphavectors>\n     0.99159     -0.40443     -0.00000     -0.00000     -0.00000      0.13670      0.00000     -0.00000      0.00000     -0.04290     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.03610 \n     0.02263      1.04452     -0.00000     -0.00000     -0.00000     -0.42169     -0.00000      0.00000      0.00000      0.13697      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12031 \n    -0.00000     -0.00000      0.00000      0.00000     -0.98495      0.00000      0.00000      0.35233      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.15797      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.98495     -0.00000     -0.00000     -0.00000      0.00000     -0.35233     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.15797      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.98495     -0.00000     -0.00000      0.00000     -0.35233      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.15797     -0.00000 \n    -0.00415      0.08337      0.00000      0.00000      0.00000      1.05533      0.00000     -0.00000     -0.00000     -0.42385     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.26314 \n     0.00000      0.00000     -0.00000     -0.00000     -0.04725     -0.00000     -0.00000     -1.01580     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.56175      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.04725      0.00000      0.00000      0.00000     -0.00000      1.01580      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.56175      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.04725      0.00000      0.00000     -0.00000      1.01580     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.56175      0.00000 \n    -0.00155      0.02669      0.00000      0.00000      0.00000      0.02812      0.00000     -0.00000     -0.00000      0.50436     -0.86012     -0.51009      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.24577 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000 \n    -0.00155      0.02669      0.00000      0.00000      0.00000      0.02812      0.00000     -0.00000     -0.00000      0.50436     -0.01169      0.99993     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.24577 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00155      0.02669      0.00000      0.00000      0.00000      0.02812      0.00000     -0.00000     -0.00000      0.50436      0.87181     -0.48984      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      2.24577 \n     0.00480     -0.08241     -0.00000     -0.00000     -0.00000     -0.07311     -0.00000      0.00000      0.00000     -0.04749     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -5.23297 \n    -0.00000     -0.00000      0.00000      0.00000      0.01178     -0.00000     -0.00000     -0.07095      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.10381     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.01178     -0.00000      0.00000      0.00000     -0.00000      0.07095     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.10381     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.01178      0.00000      0.00000     -0.00000      0.07095      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.10381     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99159      0.40443      0.00000     -0.00000      0.00000     -0.13679     -0.00000      0.00000     -0.00000      0.04195      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.03679 \n     0.02263     -1.04453     -0.00000      0.00000     -0.00000      0.42201      0.00000     -0.00000      0.00000     -0.13388     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.12254 \n     0.00000     -0.00000     -0.00000      0.00000      0.98496     -0.00000     -0.00000     -0.35286      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.15673      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.98496      0.00000     -0.00000     -0.00000      0.00000      0.35286     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.15673     -0.00000 \n     0.00000      0.00000     -0.98496      0.00000     -0.00000     -0.00000      0.35286     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.15673     -0.00000     -0.00000     -0.00000 \n    -0.00415     -0.08333     -0.00000      0.00000     -0.00000     -1.05627     -0.00000      0.00000     -0.00000      0.41690     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.27039 \n     0.00000     -0.00000     -0.00000      0.00000      0.04722      0.00000      0.00000      1.01775     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.55820     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.04722     -0.00000      0.00000      0.00000     -0.00000     -1.01775      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.55820      0.00000 \n     0.00000      0.00000     -0.04722     -0.00000      0.00000      0.00000     -1.01775      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.55820      0.00000      0.00000      0.00000 \n    -0.00155     -0.02668     -0.00000      0.00000     -0.00000     -0.03016     -0.00000      0.00000     -0.00000     -0.55002     -0.00000      0.00000      0.22938      0.00000      0.97334     -0.00000      0.00000      0.00000     -2.23499 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00155     -0.02668     -0.00000      0.00000     -0.00000     -0.03016     -0.00000      0.00000     -0.00000     -0.55002      0.00000      0.00000      0.72825     -0.00000     -0.68532      0.00000     -0.00000     -0.00000     -2.23499 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00155     -0.02668     -0.00000      0.00000     -0.00000     -0.03016     -0.00000      0.00000     -0.00000     -0.55002     -0.00000     -0.00000     -0.95762     -0.00000     -0.28802     -0.00000     -0.00000     -0.00000     -2.23499 \n     0.00480      0.08236      0.00000     -0.00000      0.00000      0.07949      0.00000     -0.00000      0.00000      0.15414      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      5.23083 \n     0.00000     -0.00000     -0.00000      0.00000     -0.01177      0.00000      0.00000      0.06710      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.10405      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01177      0.00000      0.00000      0.00000     -0.00000     -0.06710     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.10405     -0.00000 \n     0.00000      0.00000      0.01177     -0.00000      0.00000      0.00000     -0.06710     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.10405     -0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ti\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.34057     -0.93192      0.00000      0.00000      0.00000      0.21154      0.00000      0.00000      0.00000      0.06077      0.00000      0.00000      0.06077      0.00000      0.06077     -0.16755      0.00000      0.00000      0.00000 \n    -0.93192      2.56375      0.00000      0.00000      0.00000     -0.78770      0.00000      0.00000      0.00000     -0.11665      0.00000      0.00000     -0.11665      0.00000     -0.11665      0.43094      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.20009      0.00000      0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.20009      0.00000      0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06816      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.20009      0.00000      0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06816 \n     0.21154     -0.78770      0.00000      0.00000      0.00000      3.00957      0.00000      0.00000      0.00000     -0.19415      0.00000      0.00000     -0.19415      0.00000     -0.19415     -0.44651      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      2.08661      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13653      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      2.08661      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13653      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      2.08661      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13653 \n     0.06077     -0.11665      0.00000      0.00000      0.00000     -0.19415      0.00000      0.00000      0.00000      0.47230      0.00000      0.00000     -0.12743      0.00000     -0.12743     -0.39038      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19955      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19955      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06077     -0.11665      0.00000      0.00000      0.00000     -0.19415      0.00000      0.00000      0.00000     -0.12743      0.00000      0.00000      0.47232      0.00000     -0.12744     -0.39038      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19951      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06077     -0.11665      0.00000      0.00000      0.00000     -0.19415      0.00000      0.00000      0.00000     -0.12743      0.00000      0.00000     -0.12744      0.00000      0.47232     -0.39038      0.00000      0.00000      0.00000 \n    -0.16755      0.43094      0.00000      0.00000      0.00000     -0.44651      0.00000      0.00000      0.00000     -0.39038      0.00000      0.00000     -0.39038      0.00000     -0.39038      3.42109      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000      0.13653      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00963      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000      0.13653      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00963      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000      0.13653      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00963 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.39984      0.39984      0.39983      0.39983      0.39981      0.00027      0.00027      0.00027      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00001      0.00001      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -175.61000    -19.28605    -16.41208    -16.41208    -16.41208     -2.31568     -1.48506     -1.48506     -1.48506     -0.11022      0.04885      0.04885      0.04885      0.04885      0.04885      0.09420      0.09420      0.09420      0.91908 \n   </alphaeps>\n   <betaeps>\n  -175.61010    -19.28395    -16.41060    -16.41060    -16.41060     -2.27604     -1.44260     -1.44260     -1.44260     -0.07859      0.10659      0.10659      0.10659      0.10659      0.10659      0.12765      0.12765      0.12765      0.95682 \n   </betaeps>\n   <alphavectors>\n     0.99151     -0.40438     -0.00000      0.00000      0.00000      0.14741     -0.00000      0.00000      0.00000     -0.04419     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.12616 \n     0.02285      1.02814     -0.00000      0.00000      0.00000     -0.45293     -0.00000      0.00000      0.00000      0.13891     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.43448 \n    -0.00000     -0.00000     -0.98623     -0.00000     -0.00000      0.00000     -0.35652     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.15756      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.98623      0.00000      0.00000     -0.00000      0.35652      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.15756     -0.00000 \n    -0.00000     -0.00000      0.00000      0.98623      0.00000     -0.00000     -0.00000     -0.35652     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.15756      0.00000      0.00000 \n    -0.00979      0.17631      0.00000     -0.00000     -0.00000      1.16251      0.00000     -0.00000     -0.00000     -0.35224      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -2.09614 \n     0.00000      0.00000     -0.04256      0.00000      0.00000     -0.00000      1.01914      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.55417      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.04256     -0.00000     -0.00000      0.00000     -1.01914     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.55417      0.00000 \n    -0.00000     -0.00000      0.00000      0.04256     -0.00000      0.00000      0.00000      1.01914      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.55417     -0.00000     -0.00000 \n     0.00545     -0.08701     -0.00000      0.00000      0.00000     -0.10131     -0.00000      0.00000      0.00000     -0.10966      0.00000      0.00000      0.00000     -0.00000     -1.00000      0.00000      0.00000     -0.00000      1.94892 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00545     -0.08701     -0.00000      0.00000      0.00000     -0.10131     -0.00000      0.00000      0.00000     -0.10966      0.00000      0.00000      0.00000     -0.86603      0.50000      0.00000      0.00000     -0.00000      1.94892 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00545     -0.08701     -0.00000      0.00000      0.00000     -0.10131     -0.00000      0.00000      0.00000     -0.10966      0.00000      0.00000      0.00000      0.86603      0.50000      0.00000      0.00000     -0.00000      1.94892 \n    -0.00706      0.11048      0.00000     -0.00000     -0.00000      0.14980      0.00000     -0.00000     -0.00000      1.26292     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -2.91630 \n    -0.00000     -0.00000      0.01022     -0.00000     -0.00000      0.00000      0.07014     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.10047      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.01022      0.00000      0.00000     -0.00000     -0.07014      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.10047     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.01022     -0.00000      0.00000      0.00000      0.07014     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.10047      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99151     -0.40443      0.00000     -0.00000      0.00000      0.14808     -0.00000      0.00000     -0.00000     -0.04108      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.12625 \n     0.02285      1.02830     -0.00000      0.00000     -0.00000     -0.45531     -0.00000     -0.00000      0.00000      0.12840     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.43483 \n    -0.00000     -0.00000     -0.98632      0.00000     -0.00000      0.00000     -0.35707     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.15573      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.98632     -0.00000     -0.00000     -0.00000     -0.35707      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.15573     -0.00000 \n    -0.00000     -0.00000      0.00000      0.98632     -0.00000     -0.00000     -0.00000      0.35707     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.15573     -0.00000     -0.00000 \n    -0.00979      0.17578     -0.00000      0.00000     -0.00000      1.17426      0.00000      0.00000     -0.00000     -0.30496      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -2.09705 \n     0.00000     -0.00000     -0.04228      0.00000      0.00000     -0.00000      1.02190      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.54909     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.04228      0.00000      0.00000      0.00000      1.02190     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.54909      0.00000 \n    -0.00000     -0.00000      0.00000      0.04228      0.00000      0.00000      0.00000     -1.02190      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.54909      0.00000      0.00000 \n     0.00545     -0.08679      0.00000     -0.00000      0.00000     -0.11094     -0.00000     -0.00000      0.00000     -0.15074     -1.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.94566 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00545     -0.08679      0.00000     -0.00000      0.00000     -0.11094     -0.00000     -0.00000      0.00000     -0.15074      0.50000     -0.86603      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.94566 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00545     -0.08679      0.00000     -0.00000      0.00000     -0.11094     -0.00000     -0.00000      0.00000     -0.15074      0.50000      0.86603      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.94566 \n    -0.00706      0.11024     -0.00000      0.00000     -0.00000      0.16096      0.00000      0.00000     -0.00000      1.32413      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -2.88843 \n    -0.00000     -0.00000      0.01017     -0.00000      0.00000     -0.00000      0.06466     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.10080      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.01017      0.00000      0.00000      0.00000      0.06466      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.10080     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.01017      0.00000      0.00000      0.00000     -0.06466     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.10080     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"V\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.34879     -0.94238      0.00000      0.00000      0.00000      0.17626      0.00000      0.00000      0.00000      0.05939      0.00000      0.00000      0.05939      0.00000      0.05939     -0.12198      0.00000      0.00000      0.00000 \n    -0.94238      2.56279      0.00000      0.00000      0.00000     -0.71853      0.00000      0.00000      0.00000     -0.11349      0.00000      0.00000     -0.11349      0.00000     -0.11349      0.33405      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.20952      0.00000      0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07186      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.20952      0.00000      0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07186      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.20952      0.00000      0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07186 \n     0.17626     -0.71853      0.00000      0.00000      0.00000      3.16327      0.00000      0.00000      0.00000     -0.19954      0.00000      0.00000     -0.19954      0.00000     -0.19954     -0.49526      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      2.08731      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15705      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      2.08731      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15705      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      2.08731      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15705 \n     0.05939     -0.11349      0.00000      0.00000      0.00000     -0.19954      0.00000      0.00000      0.00000      0.62956      0.00000      0.00000     -0.26104      0.00000     -0.26102     -0.15612      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.78118      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.78122      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.05939     -0.11349      0.00000      0.00000      0.00000     -0.19954      0.00000      0.00000      0.00000     -0.26104      0.00000      0.00000      0.62956      0.00000     -0.26102     -0.15612      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.78122      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.05939     -0.11349      0.00000      0.00000      0.00000     -0.19954      0.00000      0.00000      0.00000     -0.26102      0.00000      0.00000     -0.26102      0.00000      0.62954     -0.15612      0.00000      0.00000      0.00000 \n    -0.12198      0.33405      0.00000      0.00000      0.00000     -0.49526      0.00000      0.00000      0.00000     -0.15612      0.00000      0.00000     -0.15612      0.00000     -0.15612      2.53836      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07186      0.00000      0.00000      0.00000      0.15705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02503      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07186      0.00000      0.00000      0.00000      0.15705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02503      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07186      0.00000      0.00000      0.00000      0.15705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02503 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.59374      0.59374      0.59373      0.59373      0.59371      0.01045      0.01045      0.01045      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -193.29460    -21.49575    -18.46861    -18.46861    -18.46861     -2.47276     -1.56626     -1.56626     -1.56626     -0.08937      0.07892      0.07892      0.07892      0.07892      0.07892      0.11494      0.11494      0.11494      1.27684 \n   </alphaeps>\n   <betaeps>\n  -193.29440    -21.48422    -18.46002    -18.46002    -18.46002     -2.37783     -1.46988     -1.46988     -1.46988     -0.06182      0.14454      0.14454      0.14454      0.17868      0.17868      0.17868      0.17868      0.17868      1.34368 \n   </betaeps>\n   <alphavectors>\n    -0.99157      0.40783     -0.00000     -0.00000     -0.00000     -0.15124     -0.00000     -0.00000      0.00000     -0.04471      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.14056 \n    -0.02260     -1.02386     -0.00000     -0.00000     -0.00000      0.46201     -0.00000     -0.00000      0.00000      0.13904      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.51228 \n     0.00000     -0.00000     -0.98723      0.00000      0.00000      0.00000      0.00000      0.36075     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.14639     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.98723      0.00000      0.00000     -0.36075      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.14639     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.98723      0.00000      0.00000      0.00000      0.36075      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.14639     -0.00000 \n     0.01245     -0.23174      0.00000      0.00000      0.00000     -1.18839      0.00000      0.00000     -0.00000     -0.34649     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -3.02027 \n    -0.00000      0.00000     -0.03868     -0.00000     -0.00000     -0.00000     -0.00000     -1.02091      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.50066      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.03868     -0.00000     -0.00000      1.02091     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.50066      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.03868     -0.00000     -0.00000     -0.00000     -1.02091     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.50066      0.00000 \n    -0.00497      0.08535     -0.00000     -0.00000     -0.00000      0.07832     -0.00000     -0.00000      0.00000     -0.04121      0.00000     -0.00000      0.86603     -0.00000     -0.50000     -0.00000     -0.00000      0.00000      1.72384 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00497      0.08535     -0.00000     -0.00000     -0.00000      0.07832     -0.00000     -0.00000      0.00000     -0.04121      0.00000     -0.00000     -0.86603      0.00000     -0.50000     -0.00000     -0.00000      0.00000      1.72384 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00497      0.08535     -0.00000     -0.00000     -0.00000      0.07832     -0.00000     -0.00000      0.00000     -0.04121      0.00000     -0.00000      0.00000     -0.00000      1.00000      0.00000      0.00000     -0.00000      1.72384 \n     0.00312     -0.05214      0.00000      0.00000      0.00000     -0.07424      0.00000      0.00000     -0.00000      1.10749     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.42349 \n     0.00000     -0.00000      0.00811      0.00000      0.00000      0.00000      0.00000     -0.07855     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.07550     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00811      0.00000      0.00000      0.07855      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.07550      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00811     -0.00000     -0.00000     -0.00000     -0.07855     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.07550      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99157      0.40801      0.00000     -0.00000      0.00000     -0.15153      0.00000     -0.00000     -0.00000     -0.04167      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.14064 \n    -0.02260     -1.02446     -0.00000      0.00000     -0.00000      0.46345     -0.00000      0.00000      0.00000      0.12803     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.51267 \n     0.00000     -0.00000     -0.00000     -0.98752      0.00000      0.00000      0.00000      0.35964      0.00000     -0.00000      0.00000      0.14718     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.98752      0.00000     -0.00000     -0.00000      0.35964     -0.00000     -0.00000      0.00000      0.14718      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.98752     -0.00000      0.00000     -0.00000      0.35964     -0.00000      0.00000     -0.00000      0.14718      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.01245     -0.22953     -0.00000      0.00000     -0.00000     -1.20190     -0.00000      0.00000      0.00000     -0.28228      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -3.02178 \n    -0.00000     -0.00000     -0.00000     -0.03784     -0.00000      0.00000     -0.00000     -1.01956     -0.00000      0.00000     -0.00000     -0.50348      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.03784     -0.00000      0.00000     -0.00000     -1.01956      0.00000      0.00000     -0.00000     -0.50348     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.03784      0.00000     -0.00000      0.00000     -1.01956      0.00000     -0.00000      0.00000     -0.50348     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00497      0.08461      0.00000     -0.00000      0.00000      0.08608      0.00000     -0.00000     -0.00000     -0.07808      0.00000     -0.00000     -0.00000     -0.50000     -0.00000      0.86603     -0.00000     -0.00000      1.72223 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205     -0.00000     -0.00000 \n    -0.00497      0.08461      0.00000     -0.00000      0.00000      0.08608      0.00000     -0.00000     -0.00000     -0.07808      0.00000     -0.00000     -0.00000     -0.50000      0.00000     -0.86603      0.00000      0.00000      1.72223 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000 \n    -0.00497      0.08461      0.00000     -0.00000      0.00000      0.08608      0.00000     -0.00000     -0.00000     -0.07808      0.00000     -0.00000     -0.00000      1.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.72223 \n     0.00312     -0.05174     -0.00000      0.00000     -0.00000     -0.08100     -0.00000      0.00000      0.00000      1.13769     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.39911 \n     0.00000     -0.00000     -0.00000      0.00795     -0.00000      0.00000     -0.00000     -0.08151      0.00000     -0.00000      0.00000      1.07528     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00795     -0.00000      0.00000     -0.00000     -0.08151     -0.00000     -0.00000      0.00000      1.07528     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00795      0.00000     -0.00000      0.00000     -0.08151     -0.00000     -0.00000      0.00000      1.07528     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cr\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.35677     -0.95184      0.00000      0.00000      0.00000      0.11680      0.00000      0.00000      0.00000      0.08338      0.00000      0.00000      0.08338      0.00000      0.08338     -0.11514      0.00000      0.00000      0.00000 \n    -0.95184      2.55926      0.00000      0.00000      0.00000     -0.59873      0.00000      0.00000      0.00000     -0.16238      0.00000      0.00000     -0.16238      0.00000     -0.16238      0.31963      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.21681      0.00000      0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06543      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.21681      0.00000      0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06543      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.21681      0.00000      0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06543 \n     0.11680     -0.59873      0.00000      0.00000      0.00000      3.40459      0.00000      0.00000      0.00000     -0.26226      0.00000      0.00000     -0.26226      0.00000     -0.26226     -0.49559      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      2.10073      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13877      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      2.10073      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13877      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      2.10073      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13877 \n     0.08338     -0.16238      0.00000      0.00000      0.00000     -0.26226      0.00000      0.00000      0.00000      0.79971      0.00000      0.00000     -0.32966      0.00000     -0.32966     -0.11915      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08338     -0.16238      0.00000      0.00000      0.00000     -0.26226      0.00000      0.00000      0.00000     -0.32966      0.00000      0.00000      0.79970      0.00000     -0.32965     -0.11915      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25871      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08338     -0.16238      0.00000      0.00000      0.00000     -0.26226      0.00000      0.00000      0.00000     -0.32966      0.00000      0.00000     -0.32965      0.00000      0.79970     -0.11915      0.00000      0.00000      0.00000 \n    -0.11514      0.31963      0.00000      0.00000      0.00000     -0.49559      0.00000      0.00000      0.00000     -0.11915      0.00000      0.00000     -0.11915      0.00000     -0.11915      2.37473      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.06543      0.00000      0.00000      0.00000      0.13877      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10484      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.06543      0.00000      0.00000      0.00000      0.13877      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10484      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06543      0.00000      0.00000      0.00000      0.13877      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10484 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.75290      0.75290      0.75290      0.75290      0.75290      0.07843      0.07843      0.07843      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00006      0.00006      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -211.84990    -23.83779    -20.66141    -20.66141    -20.66141     -2.68087     -1.69643     -1.69643     -1.69643     -0.08924      0.09665      0.09665      0.09665      0.09665      0.09665      0.12634      0.12634      0.12634      1.70843 \n   </alphaeps>\n   <betaeps>\n  -211.84910    -23.81050    -20.64084    -20.64084    -20.64084     -2.53411     -1.55023     -1.55023     -1.55023     -0.05801      0.16050      0.16050      0.16050      0.23986      0.23986      0.23986      0.23986      0.23986      1.80268 \n   </betaeps>\n   <alphavectors>\n    -0.99166      0.41137     -0.00000     -0.00000     -0.00000      0.15401     -0.00000     -0.00000      0.00000      0.04571      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.14823 \n    -0.02231     -1.02009      0.00000      0.00000      0.00000     -0.46822      0.00000      0.00000     -0.00000     -0.14107     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.58556 \n     0.00000      0.00000      0.98796      0.00000      0.00000     -0.00000     -0.36337      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.14213     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.98796     -0.00000      0.00000     -0.00000      0.36337      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.14213      0.00000 \n     0.00000      0.00000     -0.00000      0.98796      0.00000      0.00000     -0.00000     -0.36337     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.14213     -0.00000     -0.00000 \n     0.01627     -0.31392      0.00000      0.00000      0.00000      1.22478     -0.00000      0.00000      0.00000      0.34853     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      4.43533 \n     0.00000      0.00000      0.03607     -0.00000     -0.00000      0.00000      1.02234     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.47950      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.03607      0.00000     -0.00000      0.00000     -1.02234     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.47950     -0.00000 \n     0.00000      0.00000     -0.00000      0.03607     -0.00000     -0.00000      0.00000      1.02234      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.47950      0.00000      0.00000 \n    -0.00632      0.11522     -0.00000     -0.00000     -0.00000     -0.08684      0.00000     -0.00000     -0.00000      0.02555      0.00000      0.00000      0.98435     -0.00000     -0.17625     -0.00000      0.00000      0.00000     -2.20806 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00632      0.11522     -0.00000     -0.00000     -0.00000     -0.08684      0.00000     -0.00000     -0.00000      0.02555      0.00000      0.00000     -0.33954     -0.00000      0.94059     -0.00000      0.00000      0.00000     -2.20806 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00632      0.11522     -0.00000     -0.00000     -0.00000     -0.08684      0.00000     -0.00000     -0.00000      0.02555      0.00000      0.00000     -0.64481     -0.00000     -0.76434     -0.00000      0.00000      0.00000     -2.20806 \n     0.00228     -0.04042      0.00000      0.00000      0.00000      0.06006     -0.00000      0.00000      0.00000     -1.07719      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.11815 \n     0.00000      0.00000     -0.00705     -0.00000     -0.00000      0.00000      0.08243      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.06608     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00705      0.00000     -0.00000      0.00000     -0.08243      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.06608     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00705     -0.00000     -0.00000      0.00000      0.08243     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.06608      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99166      0.41170      0.00000      0.00000      0.00000      0.15350      0.00000      0.00000      0.00000     -0.04354      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.14849 \n    -0.02231     -1.02120      0.00000      0.00000      0.00000     -0.46717      0.00000      0.00000      0.00000      0.13211     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.58656 \n     0.00000      0.00000     -0.98844      0.00000      0.00000      0.00000      0.36071      0.00000      0.00000      0.00000      0.14553      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.98844      0.00000      0.00000      0.00000      0.36071     -0.00000      0.00000      0.00000      0.14553      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.98844      0.00000      0.00000      0.00000     -0.36071      0.00000      0.00000     -0.00000      0.14553      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01627     -0.30879      0.00000      0.00000      0.00000      1.23031      0.00000      0.00000      0.00000     -0.27376      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      4.43940 \n     0.00000      0.00000     -0.03469      0.00000      0.00000      0.00000     -1.01735      0.00000      0.00000     -0.00000     -0.49010      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.03469      0.00000      0.00000      0.00000     -1.01735      0.00000     -0.00000     -0.00000     -0.49010      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.03469      0.00000      0.00000      0.00000      1.01735      0.00000     -0.00000      0.00000     -0.49010      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00632      0.11342      0.00000      0.00000      0.00000     -0.09037      0.00000      0.00000      0.00000     -0.06493      0.00000      0.00000     -0.00000     -0.99582     -0.00000      0.09128     -0.00000      0.00000     -2.20721 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000      0.00000 \n    -0.00632      0.11342      0.00000      0.00000      0.00000     -0.09037      0.00000      0.00000      0.00000     -0.06493      0.00000      0.00000     -0.00000      0.57697      0.00000      0.81677      0.00000     -0.00000     -2.20721 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000 \n    -0.00632      0.11342      0.00000      0.00000      0.00000     -0.09037      0.00000      0.00000      0.00000     -0.06493      0.00000      0.00000     -0.00000      0.41886      0.00000     -0.90805      0.00000     -0.00000     -2.20721 \n     0.00228     -0.03985      0.00000      0.00000      0.00000      0.06624      0.00000      0.00000      0.00000      1.09689     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.09849 \n     0.00000      0.00000      0.00676      0.00000      0.00000      0.00000     -0.09349      0.00000      0.00000      0.00000      1.06517      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00676      0.00000      0.00000      0.00000     -0.09349     -0.00000      0.00000      0.00000      1.06517      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00676      0.00000      0.00000      0.00000      0.09349      0.00000      0.00000     -0.00000      1.06517      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mn\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.36542     -0.96522      0.00000      0.00000      0.00000      0.08562      0.00000      0.00000      0.00000      0.09153      0.00000      0.00000      0.09153      0.00000      0.09153     -0.09766      0.00000      0.00000      0.00000 \n    -0.96522      2.57155      0.00000      0.00000      0.00000     -0.55184      0.00000      0.00000      0.00000     -0.16991      0.00000      0.00000     -0.16991      0.00000     -0.16991      0.28996      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.22975      0.00000      0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04418      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.22975      0.00000      0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04418      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.22975      0.00000      0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04418 \n     0.08562     -0.55184      0.00000      0.00000      0.00000      3.80865      0.00000      0.00000      0.00000     -0.39116      0.00000      0.00000     -0.39116      0.00000     -0.39116     -0.83376      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      2.15818      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08516      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      2.15818      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08516      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      2.15818      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08516 \n     0.09153     -0.16991      0.00000      0.00000      0.00000     -0.39116      0.00000      0.00000      0.00000      0.94675      0.00000      0.00000     -0.37725      0.00000     -0.37726      0.13942      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.64801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.64801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.09153     -0.16991      0.00000      0.00000      0.00000     -0.39116      0.00000      0.00000      0.00000     -0.37725      0.00000      0.00000      0.94675      0.00000     -0.37725      0.13942      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.64801      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.09153     -0.16991      0.00000      0.00000      0.00000     -0.39116      0.00000      0.00000      0.00000     -0.37726      0.00000      0.00000     -0.37725      0.00000      0.94676      0.13942      0.00000      0.00000      0.00000 \n    -0.09766      0.28996      0.00000      0.00000      0.00000     -0.83376      0.00000      0.00000      0.00000      0.13942      0.00000      0.00000      0.13942      0.00000      0.13942      2.06224      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.04418      0.00000      0.00000      0.00000      0.08516      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22398      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.04418      0.00000      0.00000      0.00000      0.08516      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22398      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.04418      0.00000      0.00000      0.00000      0.08516      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22398 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.88267      0.88267      0.88267      0.88267      0.88267      0.19534      0.19534      0.19534      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00021      0.00021      0.00021      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -231.39080    -26.42665    -23.10092    -23.10092    -23.10092     -3.02321     -1.95423     -1.95423     -1.95423     -0.15694      0.01190      0.01190      0.01190      0.01190      0.01190      0.04084      0.04084      0.04084      1.88064 \n   </alphaeps>\n   <betaeps>\n  -231.38950    -26.38200    -23.06697    -23.06697    -23.06697     -2.83277     -1.76496     -1.76496     -1.76496     -0.11923      0.07859      0.07859      0.07859      0.19713      0.19713      0.19713      0.19713      0.19713      2.00046 \n   </betaeps>\n   <alphavectors>\n     0.99193     -0.41538      0.00000      0.00000      0.00000      0.15613      0.00000     -0.00000     -0.00000      0.04408      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.14212 \n     0.02151      1.02109      0.00000      0.00000      0.00000     -0.47281      0.00000      0.00000      0.00000     -0.14259      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.61295 \n     0.00000     -0.00000     -0.98894      0.00000      0.00000      0.00000      0.00000     -0.00000      0.36891      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.11577     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.98894      0.00000     -0.00000     -0.36891     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.11577      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.98894      0.00000      0.00000      0.36891      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.11577      0.00000 \n    -0.01837      0.37132     -0.00000     -0.00000     -0.00000      1.24508     -0.00000     -0.00000     -0.00000      0.52345     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      5.69239 \n    -0.00000      0.00000     -0.03263     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.03399     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.38208     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.03263     -0.00000      0.00000      1.03399      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.38208     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.03263     -0.00000     -0.00000     -1.03399     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.38208     -0.00000 \n     0.00703     -0.13559      0.00000      0.00000      0.00000     -0.08958      0.00000      0.00000      0.00000     -0.09840      0.00000      0.00000      0.00000      0.58341     -0.81218     -0.00000     -0.00000     -0.00000     -2.65392 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00703     -0.13559      0.00000      0.00000      0.00000     -0.08958      0.00000      0.00000      0.00000     -0.09840      0.00000      0.00000      0.00000     -0.99507     -0.09916     -0.00000     -0.00000     -0.00000     -2.65392 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00703     -0.13559      0.00000      0.00000      0.00000     -0.08958      0.00000      0.00000      0.00000     -0.09840      0.00000      0.00000      0.00000      0.41166      0.91134     -0.00000     -0.00000     -0.00000     -2.65392 \n    -0.00144      0.02672     -0.00000     -0.00000     -0.00000      0.04553     -0.00000     -0.00000     -0.00000     -1.00712     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.84299 \n     0.00000     -0.00000      0.00501      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.07215     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.03955      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00501      0.00000      0.00000      0.07215     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03955     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00501     -0.00000     -0.00000     -0.07215      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.03955      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99193     -0.41581      0.00000      0.00000      0.00000     -0.15496      0.00000      0.00000      0.00000     -0.04246      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.14264 \n     0.02151      1.02258      0.00000      0.00000      0.00000      0.46935      0.00000      0.00000      0.00000      0.13475     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.61489 \n     0.00000      0.00000      0.00000      0.00000     -0.98955      0.00000      0.00000      0.00000      0.36582      0.00000     -0.00000     -0.00000     -0.12030     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.98955      0.00000      0.00000      0.00000      0.36582      0.00000      0.00000     -0.00000     -0.12030     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.98955      0.00000      0.00000      0.00000      0.36582      0.00000      0.00000     -0.00000      0.12030      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.01837      0.36308      0.00000      0.00000      0.00000     -1.23451      0.00000      0.00000      0.00000     -0.43593      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      5.70260 \n     0.00000      0.00000      0.00000      0.00000     -0.03091      0.00000      0.00000      0.00000     -1.02882     -0.00000      0.00000      0.00000      0.39592      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.03091      0.00000      0.00000      0.00000     -1.02882      0.00000      0.00000      0.00000      0.39592      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.03091      0.00000      0.00000      0.00000     -1.02882      0.00000     -0.00000      0.00000     -0.39592     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00703     -0.13264      0.00000      0.00000      0.00000      0.08547      0.00000      0.00000      0.00000      0.05469     -0.00000     -0.00000      0.00000      0.22997      0.97320      0.00000      0.00000     -0.00000     -2.65546 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000 \n     0.00703     -0.13264      0.00000      0.00000      0.00000      0.08547      0.00000      0.00000      0.00000      0.05469     -0.00000     -0.00000      0.00000     -0.95780     -0.28743     -0.00000     -0.00000      0.00000     -2.65546 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000 \n     0.00703     -0.13264      0.00000      0.00000      0.00000      0.08547      0.00000      0.00000      0.00000      0.05469     -0.00000     -0.00000      0.00000      0.72783     -0.68576     -0.00000     -0.00000      0.00000     -2.65546 \n    -0.00144      0.02618      0.00000      0.00000      0.00000     -0.05040      0.00000      0.00000      0.00000      1.02075     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.82617 \n     0.00000      0.00000      0.00000      0.00000      0.00471      0.00000      0.00000      0.00000     -0.08606      0.00000     -0.00000     -0.00000     -1.03849     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00471      0.00000      0.00000      0.00000     -0.08606      0.00000      0.00000     -0.00000     -1.03849     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00471      0.00000      0.00000      0.00000     -0.08606      0.00000      0.00000     -0.00000      1.03849      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Fe\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.37368     -0.97732      0.00000      0.00000      0.00000      0.05851      0.00000      0.00000      0.00000      0.10002      0.00000      0.00000      0.10002      0.00000      0.10096     -0.08381      0.00000      0.00000      0.00000 \n    -0.97732      2.57920      0.00000      0.00000      0.00000     -0.49870      0.00000      0.00000      0.00000     -0.18197      0.00000      0.00000     -0.18197      0.00000     -0.18532      0.26474      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.23981      0.00000      0.00000      0.00000     -0.72635      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02145      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.23981      0.00000      0.00000      0.00000     -0.72635      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02145      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25431      0.00000      0.00000      0.00000     -0.77323      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13069 \n     0.05851     -0.49870      0.00000      0.00000      0.00000      4.04986      0.00000      0.00000      0.00000     -0.51543      0.00000      0.00000     -0.51543      0.00000     -0.49523     -1.11780      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.72635      0.00000      0.00000      0.00000      2.20202      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02318      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.72635      0.00000      0.00000      0.00000      2.20202      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02318      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.77323      0.00000      0.00000      0.00000      2.35348      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.46842 \n     0.10002     -0.18197      0.00000      0.00000      0.00000     -0.51543      0.00000      0.00000      0.00000      0.60687      0.00000      0.00000      0.60687      0.00000     -0.86969      0.32767      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.92017      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.10002     -0.18197      0.00000      0.00000      0.00000     -0.51543      0.00000      0.00000      0.00000      0.60687      0.00000      0.00000      0.60687      0.00000     -0.86969      0.32767      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.92016      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.10096     -0.18532      0.00000      0.00000      0.00000     -0.49523      0.00000      0.00000      0.00000     -0.86969      0.00000      0.00000     -0.86969      0.00000      2.06223      0.32522      0.00000      0.00000      0.00000 \n    -0.08381      0.26474      0.00000      0.00000      0.00000     -1.11780      0.00000      0.00000      0.00000      0.32767      0.00000      0.00000      0.32767      0.00000      0.32522      1.94105      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.02145      0.00000      0.00000      0.00000      0.02318      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.44091      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.02145      0.00000      0.00000      0.00000      0.02318      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.44091      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.13069      0.00000      0.00000      0.00000     -0.46842      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.03643 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99482      0.95571      0.43330      0.43330      0.10919      0.10919      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.98268      0.96420      0.30205      0.30205      0.20675      0.20675      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -251.74420    -29.06746    -25.68909    -25.57820    -25.57820     -3.25897     -2.25838     -2.01490     -2.01490     -0.18860     -0.04427     -0.03210     -0.00564     -0.00564      0.00939      0.00939      0.16674      0.16674      2.08916 \n   </alphaeps>\n   <betaeps>\n  -251.74450    -29.06249    -25.68640    -25.57398    -25.57398     -3.24583     -2.25275     -1.99676     -1.99676     -0.19700     -0.03789     -0.03349     -0.00068     -0.00068      0.00355      0.00355      0.18648      0.18648      2.09473 \n   </betaeps>\n   <alphavectors>\n     0.99207     -0.41985     -0.00000     -0.00000      0.00000     -0.15731     -0.00000      0.00000     -0.00000     -0.03909     -0.01031      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.13618 \n     0.02101      1.02361      0.00000      0.00000     -0.00000      0.47247      0.00000     -0.00000      0.00000      0.13181      0.03218     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.62446 \n     0.00000      0.00000     -0.00000      0.99004      0.00000      0.00000     -0.00000     -0.37127     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.09693      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.99004      0.00000      0.00000     -0.00000     -0.37127      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.09693      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.98950      0.00000     -0.00000     -0.00000     -0.37398      0.00000     -0.00000      0.00000     -0.00000      0.09188     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.01929      0.39957     -0.00000     -0.00000      0.00000     -1.21560     -0.00000      0.00000     -0.00000     -0.62304     -0.10323      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -6.52826 \n     0.00000      0.00000     -0.00000      0.02912     -0.00000     -0.00000      0.00000      1.03944      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.31336      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02912     -0.00000     -0.00000      0.00000      1.03944     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.31336     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.03064      0.00000     -0.00000     -0.00000      1.04378     -0.00000      0.00000     -0.00000     -0.00000     -0.29843      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00736     -0.14677      0.00000      0.00000     -0.00000      0.10106      0.00000     -0.00000      0.00000      0.20712     -0.48458     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.86603      2.96578 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00736     -0.14677      0.00000      0.00000     -0.00000      0.10106     -0.00000      0.00000     -0.00000      0.20712     -0.48458      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.86603      2.96578 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00736     -0.14416      0.00000      0.00000     -0.00000      0.01986      0.00000     -0.00000      0.00000      0.10762      1.00991     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      2.96692 \n    -0.00101      0.01893     -0.00000     -0.00000      0.00000     -0.03796      0.00000     -0.00000      0.00000      0.98159      0.06377     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.66837 \n     0.00000      0.00000      0.00000     -0.00344     -0.00000     -0.00000      0.00000      0.07389     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.02225     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00344      0.00000     -0.00000      0.00000      0.07389      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.02225     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00365     -0.00000      0.00000      0.00000      0.05925     -0.00000      0.00000      0.00000     -0.00000      1.02320     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99207      0.41988      0.00000      0.00000      0.00000      0.15714      0.00000      0.00000     -0.00000      0.03891      0.00000     -0.01072      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.13629 \n    -0.02101     -1.02373      0.00000      0.00000      0.00000     -0.47189     -0.00000     -0.00000      0.00000     -0.13087     -0.00000      0.03340     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.62483 \n     0.00000      0.00000      0.00000      0.99010      0.00000      0.00000     -0.00000     -0.37092     -0.00000      0.00000      0.00000      0.00000     -0.09766      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.99010     -0.00000     -0.00000      0.00000     -0.37092     -0.00000     -0.00000     -0.00000     -0.00000      0.09766      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.98953      0.00000      0.00000      0.00000      0.37385     -0.00000     -0.00000     -0.00000      0.09213      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01929     -0.39882      0.00000      0.00000      0.00000      1.21209      0.00000      0.00000     -0.00000      0.61146      0.00000     -0.10628      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -6.53000 \n     0.00000      0.00000      0.00000      0.02895      0.00000     -0.00000      0.00000      1.03880      0.00000     -0.00000     -0.00000     -0.00000      0.31551      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02895      0.00000      0.00000     -0.00000      1.03880      0.00000      0.00000      0.00000      0.00000     -0.31551     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.03056      0.00000      0.00000     -0.00000     -1.04358      0.00000      0.00000      0.00000     -0.29917     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00736      0.14654      0.00000      0.00000      0.00000     -0.10109     -0.00000     -0.00000      0.00000     -0.20124      0.00000     -0.48448     -0.00000     -0.00000     -0.00000     -0.00000      0.86603     -0.00000      2.96621 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00736      0.14654      0.00000      0.00000      0.00000     -0.10109     -0.00000     -0.00000      0.00000     -0.20124      0.00000     -0.48448     -0.00000     -0.00000     -0.00000     -0.00000     -0.86603      0.00000      2.96621 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.73205      0.00000     -0.00000     -0.00000 \n    -0.00736      0.14382      0.00000      0.00000      0.00000     -0.01547     -0.00000     -0.00000      0.00000     -0.10278     -0.00000      1.00983     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      2.96717 \n     0.00101     -0.01890      0.00000      0.00000      0.00000      0.03834     -0.00000      0.00000     -0.00000     -0.98287     -0.00000      0.06296     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.66654 \n     0.00000      0.00000      0.00000     -0.00342      0.00000     -0.00000      0.00000      0.07601     -0.00000      0.00000      0.00000      0.00000     -1.02209      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00342      0.00000      0.00000      0.00000      0.07601     -0.00000     -0.00000     -0.00000     -0.00000      1.02209      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00364      0.00000      0.00000     -0.00000     -0.05997      0.00000      0.00000     -0.00000      1.02316      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Co\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.38001     -0.97936      0.00000      0.00000      0.00000     -0.11555      0.00000      0.00000      0.00000      0.17370      0.00000      0.00000      0.17370      0.00000      0.17245     -0.07073      0.00000      0.00000      0.00000 \n    -0.97936      2.54447      0.00000      0.00000      0.00000      0.01555      0.00000      0.00000      0.00000     -0.38799      0.00000      0.00000     -0.38799      0.00000     -0.38422      0.21360      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.26217      0.00000      0.00000      0.00000     -0.78356      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12262      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26217      0.00000      0.00000      0.00000     -0.78356      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12262      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26218      0.00000      0.00000      0.00000     -0.78356      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12262 \n    -0.11555      0.01555      0.00000      0.00000      0.00000      2.40835      0.00000      0.00000      0.00000     -0.09264      0.00000      0.00000     -0.09264      0.00000     -0.10180     -0.67420      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.78356      0.00000      0.00000      0.00000      2.34385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.42999      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.78356      0.00000      0.00000      0.00000      2.34385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.42999      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.78356      0.00000      0.00000      0.00000      2.34385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.43000 \n     0.17370     -0.38799      0.00000      0.00000      0.00000     -0.09264      0.00000      0.00000      0.00000      0.17817      0.00000      0.00000     -0.01734      0.00000      0.05374      0.11979      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.18148      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16054      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.17370     -0.38799      0.00000      0.00000      0.00000     -0.09264      0.00000      0.00000      0.00000     -0.01734      0.00000      0.00000      0.17817      0.00000      0.05374      0.11979      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16054      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.17245     -0.38422      0.00000      0.00000      0.00000     -0.10180      0.00000      0.00000      0.00000      0.05374      0.00000      0.00000      0.05374      0.00000      0.10694      0.12253      0.00000      0.00000      0.00000 \n    -0.07073      0.21360      0.00000      0.00000      0.00000     -0.67420      0.00000      0.00000      0.00000      0.11979      0.00000      0.00000      0.11979      0.00000      0.12253      2.03123      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.12262      0.00000      0.00000      0.00000     -0.42999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.07912      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.12262      0.00000      0.00000      0.00000     -0.42999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.07912      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.12262      0.00000      0.00000      0.00000     -0.43000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.07911 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.72716      0.13021      0.05350      0.05350      0.03547      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00012      0.00001      0.00001      0.00001      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -271.73920    -30.58498    -26.97956    -26.97956    -26.97128     -2.64952     -1.42858     -1.42858     -1.40442      0.00030      0.18820      0.18820      0.19089      0.87615      0.90061      0.90749      0.90749      0.91023      3.36487 \n   </alphaeps>\n   <betaeps>\n  -271.73900    -30.57124    -26.96734    -26.96734    -26.96407     -2.60651     -1.37886     -1.37886     -1.37610      0.00306      0.19235      0.19235      0.19354      0.93655      0.94376      0.94376      0.94623      0.94885      3.39232 \n   </betaeps>\n   <alphavectors>\n    -0.99269      0.42351      0.00000      0.00000      0.00000     -0.15464      0.00000     -0.00000     -0.00000      0.03626     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00069      0.12597 \n    -0.01935     -1.02647      0.00000      0.00000      0.00000      0.45317     -0.00000      0.00000      0.00000     -0.11475      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00184     -0.67380 \n     0.00000      0.00000      0.99027      0.00000      0.00000      0.00000      0.37112     -0.00000     -0.00000      0.00000      0.11277     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.99027      0.00000      0.00000     -0.00000     -0.37112     -0.00000      0.00000     -0.00000      0.11277      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.99034      0.00000     -0.00000      0.00000     -0.37063     -0.00000     -0.00000     -0.00000     -0.11382      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.02067     -0.45767      0.00000      0.00000      0.00000     -0.92456      0.00000     -0.00000     -0.00000      0.39429     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00091      8.69994 \n     0.00000      0.00000      0.02802      0.00000      0.00000     -0.00000     -1.02448      0.00000      0.00000     -0.00000     -0.34868     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.02802      0.00000     -0.00000      0.00000      1.02448      0.00000     -0.00000      0.00000     -0.34868     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02784     -0.00000      0.00000     -0.00000      1.02345      0.00000      0.00000      0.00000      0.35171      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00806      0.17017      0.00000      0.00000      0.00000     -0.05786      0.00000     -0.00000     -0.00000     -0.06205     -0.00000     -0.00000      0.00000     -0.00000      0.86603     -0.00000     -0.00000      0.49699     -3.88184 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000 \n    -0.00806      0.17017      0.00000      0.00000      0.00000     -0.05786      0.00000     -0.00000     -0.00000     -0.06205     -0.00000     -0.00000      0.00000      0.00000     -0.86603      0.00000      0.00000      0.49699     -3.88184 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000      0.00000 \n    -0.00806      0.17042      0.00000      0.00000      0.00000     -0.05033      0.00000     -0.00000     -0.00000     -0.06527     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.00299     -3.88072 \n     0.00073     -0.01392      0.00000      0.00000      0.00000     -0.04948      0.00000     -0.00000     -0.00000     -1.00596     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00232      0.55568 \n     0.00000      0.00000     -0.00288      0.00000      0.00000     -0.00000     -0.13422     -0.00000     -0.00000      0.00000      1.01071     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00288      0.00000     -0.00000      0.00000      0.13422     -0.00000      0.00000     -0.00000      1.01071     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00286     -0.00000      0.00000     -0.00000      0.13720      0.00000     -0.00000     -0.00000     -1.01031      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99269     -0.42360     -0.00000      0.00000      0.00000      0.15428     -0.00000      0.00000      0.00000      0.03630      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00010      0.00000     -0.12611 \n     0.01934      1.02680      0.00000     -0.00000     -0.00000     -0.45184     -0.00000     -0.00000     -0.00000     -0.11432     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00036      0.00000      0.67426 \n    -0.00000      0.00000     -0.99043      0.00000      0.00000     -0.00000     -0.37001      0.00000     -0.00000     -0.00000     -0.11504     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.99043      0.00000     -0.00000      0.00000     -0.37001     -0.00000      0.00000      0.00000      0.11504      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.99042     -0.00000      0.00000      0.00000     -0.37000     -0.00000      0.00000     -0.00000     -0.11511     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02067      0.45521      0.00000     -0.00000     -0.00000      0.91444     -0.00000     -0.00000     -0.00000      0.37992     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00221      0.00000     -8.70178 \n     0.00000      0.00000     -0.02759     -0.00000     -0.00000      0.00000      1.02223     -0.00000      0.00000     -0.00000      0.35526     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02759     -0.00000      0.00000     -0.00000      1.02223      0.00000     -0.00000     -0.00000     -0.35526     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.02760      0.00000     -0.00000     -0.00000      1.02217      0.00000     -0.00000      0.00000      0.35543      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00806     -0.16932     -0.00000      0.00000      0.00000      0.05992      0.00000      0.00000      0.00000     -0.05576      0.00000     -0.00000     -0.00000      0.86603     -0.00000     -0.00000     -0.50073     -0.00000      3.88146 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000 \n     0.00806     -0.16932     -0.00000      0.00000      0.00000      0.05992      0.00000      0.00000      0.00000     -0.05576      0.00000     -0.00000     -0.00000     -0.86603      0.00000      0.00000     -0.50073      0.00000      3.88146 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000 \n     0.00806     -0.16935     -0.00000      0.00000      0.00000      0.05911      0.00000      0.00000      0.00000     -0.05580      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.99927      0.00000      3.88175 \n    -0.00073      0.01384      0.00000     -0.00000     -0.00000      0.05089     -0.00000     -0.00000      0.00000     -1.00690     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00011     -0.00000     -0.55386 \n     0.00000      0.00000      0.00283     -0.00000     -0.00000      0.00000      0.14070      0.00000     -0.00000      0.00000     -1.00983     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00283      0.00000     -0.00000      0.00000      0.14070     -0.00000      0.00000      0.00000      1.00983      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00283      0.00000     -0.00000     -0.00000      0.14087      0.00000     -0.00000      0.00000     -1.00980      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ni\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.39152     -1.00742      0.00000      0.00000      0.00000      0.01392      0.00000      0.00000      0.00000      0.12069      0.00000      0.00000      0.12062      0.00000      0.12054     -0.06760      0.00000      0.00000      0.00000 \n    -1.00742      2.61902      0.00000      0.00000      0.00000     -0.45481      0.00000      0.00000      0.00000     -0.20472      0.00000      0.00000     -0.20447      0.00000     -0.20424      0.23312      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.25432      0.00000      0.00000      0.00000     -0.75883      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03336      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25437      0.00000      0.00000      0.00000     -0.75900      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03398      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25436      0.00000      0.00000      0.00000     -0.75900      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03403 \n     0.01392     -0.45481      0.00000      0.00000      0.00000      5.04378      0.00000      0.00000      0.00000     -0.84958      0.00000      0.00000     -0.85098      0.00000     -0.85213     -1.44446      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.75883      0.00000      0.00000      0.00000      2.26579      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.14256      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.75900      0.00000      0.00000      0.00000      2.26628      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.14455      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.75900      0.00000      0.00000      0.00000      2.26631      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.14475 \n     0.12069     -0.20472      0.00000      0.00000      0.00000     -0.84958      0.00000      0.00000      0.00000      1.22023      0.00000      0.00000     -0.28155      0.00000     -0.28097      0.49317      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.12062     -0.20447      0.00000      0.00000      0.00000     -0.85098      0.00000      0.00000      0.00000     -0.28155      0.00000      0.00000      1.22076      0.00000     -0.28021      0.49380      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.12054     -0.20424      0.00000      0.00000      0.00000     -0.85213      0.00000      0.00000      0.00000     -0.28097      0.00000      0.00000     -0.28021      0.00000      1.22110      0.49433      0.00000      0.00000      0.00000 \n    -0.06760      0.23312      0.00000      0.00000      0.00000     -1.44446      0.00000      0.00000      0.00000      0.49317      0.00000      0.00000      0.49380      0.00000      0.49433      1.93831      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03336      0.00000      0.00000      0.00000     -0.14256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.03504      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03398      0.00000      0.00000      0.00000     -0.14455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.04289      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03403      0.00000      0.00000      0.00000     -0.14475      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.04392 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.86283      0.86209      0.85907      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.13965      0.13939      0.13483      0.00141      0.00072      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -295.19390    -34.90123    -31.19429    -31.19385    -31.19340     -4.07332     -2.73921     -2.73858     -2.73784     -0.27104     -0.20027     -0.19975     -0.19928     -0.16973     -0.16864     -0.07215     -0.07211     -0.07191      3.30727 \n   </alphaeps>\n   <betaeps>\n  -295.19280    -34.84125    -31.14803    -31.14753    -31.14699     -3.88445     -2.55052     -2.54954     -2.54838     -0.23908     -0.04139     -0.04138     -0.04108     -0.01447     -0.01165      0.01184      0.01212      0.01228      3.42845 \n   </betaeps>\n   <alphavectors>\n     0.99249     -0.42826      0.00000     -0.00000      0.00000      0.16181     -0.00000     -0.00000      0.00000     -0.03445     -0.00000      0.00000      0.00000     -0.00004     -0.00004      0.00000      0.00000     -0.00000      0.10384 \n     0.01981      1.02964     -0.00000      0.00000     -0.00000     -0.48426      0.00000      0.00000     -0.00000      0.12492      0.00000     -0.00000     -0.00000      0.00013      0.00014     -0.00000     -0.00000      0.00000     -0.65774 \n     0.00000      0.00000      0.99085     -0.00000      0.00000      0.00000      0.37723     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.08138     -0.00000 \n     0.00000     -0.00000      0.00000      0.99085      0.00000     -0.00000     -0.00000     -0.37723     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.08140     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.99085     -0.00000     -0.00000     -0.00000      0.37722      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.08141      0.00000      0.00000     -0.00000 \n    -0.02350      0.48455      0.00000     -0.00000     -0.00000      1.31349     -0.00000      0.00000     -0.00000     -0.81721     -0.00000     -0.00000     -0.00000     -0.00043     -0.00048      0.00000      0.00000     -0.00000     10.08263 \n     0.00000      0.00000      0.02643     -0.00000      0.00000     -0.00000     -1.04893      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.26166     -0.00000 \n     0.00000     -0.00000      0.00000      0.02642      0.00000      0.00000      0.00000      1.04891      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.26171      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.02642      0.00000      0.00000      0.00000     -1.04890      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.26175      0.00000     -0.00000     -0.00000 \n     0.00927     -0.18173     -0.00000      0.00000      0.00000     -0.11428      0.00000     -0.00000      0.00000      0.27101     -0.00000      0.00000      0.00000      0.95649      0.29203     -0.00000     -0.00000      0.00000     -4.51255 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00927     -0.18173     -0.00000      0.00000      0.00000     -0.11445      0.00000     -0.00000     -0.00000      0.27204      0.00000      0.00000      0.00000     -0.73100      0.68239      0.00000      0.00000      0.00000     -4.51250 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00927     -0.18174     -0.00000      0.00000      0.00000     -0.11465      0.00000     -0.00000      0.00000      0.27280     -0.00000      0.00000      0.00000     -0.22532     -0.97420     -0.00000      0.00000     -0.00000     -4.51247 \n    -0.00069      0.01163      0.00000     -0.00000      0.00000      0.03387     -0.00000      0.00000      0.00000      0.98186     -0.00000     -0.00000     -0.00000      0.00078      0.00069      0.00000     -0.00000     -0.00000      0.58591 \n     0.00000      0.00000     -0.00263      0.00000     -0.00000     -0.00000     -0.05447      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.01711     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00263     -0.00000      0.00000      0.00000      0.05451      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.01711     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00263      0.00000      0.00000      0.00000     -0.05455      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.01710      0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99249      0.42858     -0.00000      0.00000      0.00000     -0.16065     -0.00000      0.00000      0.00000     -0.03438     -0.00000      0.00000     -0.00000      0.00005     -0.00005     -0.00000     -0.00000     -0.00000      0.10431 \n    -0.01980     -1.03093      0.00000     -0.00000      0.00000      0.47975      0.00000      0.00000      0.00000      0.12242     -0.00000      0.00000      0.00000     -0.00014      0.00014     -0.00000     -0.00000     -0.00000     -0.65949 \n    -0.00000      0.00000     -0.99135     -0.00000      0.00000      0.00000      0.37525      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.08438      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.99135     -0.00000     -0.00000     -0.00000      0.37524      0.00000     -0.00000     -0.00000      0.08441     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.99135      0.00000     -0.00000     -0.00000      0.37522     -0.00000     -0.08443     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.02349     -0.47385     -0.00000      0.00000     -0.00000     -1.27307     -0.00000     -0.00000     -0.00000     -0.75469      0.00000     -0.00000     -0.00000      0.00017     -0.00025      0.00000      0.00000     -0.00000     10.09319 \n     0.00000     -0.00000     -0.02502     -0.00000      0.00000      0.00000     -1.04667     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.27069     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.02501     -0.00000     -0.00000      0.00000     -1.04665      0.00000     -0.00000     -0.00000     -0.27077     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.02500     -0.00000      0.00000      0.00000     -1.04663      0.00000      0.27084     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00927      0.17764      0.00000     -0.00000      0.00000      0.09648      0.00000      0.00000      0.00000      0.24110     -0.00000      0.00000     -0.00000     -0.97196      0.23473     -0.00000      0.00000      0.00000     -4.51487 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.73205     -0.00000 \n    -0.00927      0.17765      0.00000     -0.00000      0.00000      0.09675      0.00000      0.00000      0.00000      0.24180     -0.00000      0.00000      0.00000      0.68945      0.72437     -0.00000      0.00000      0.00000     -4.51479 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.73205      0.00000      0.00000 \n    -0.00927      0.17766      0.00000     -0.00000      0.00000      0.09708      0.00000      0.00000      0.00000      0.24235     -0.00000      0.00000     -0.00000      0.28278     -0.95926      0.00000     -0.00000     -0.00000     -4.51475 \n     0.00069     -0.01134     -0.00000      0.00000     -0.00000     -0.03634     -0.00000     -0.00000     -0.00000      0.98566      0.00000     -0.00000     -0.00000     -0.00058      0.00047      0.00000      0.00000     -0.00000      0.57935 \n     0.00000     -0.00000      0.00246      0.00000     -0.00000     -0.00000     -0.06322     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.01660      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00246      0.00000      0.00000      0.00000     -0.06330     -0.00000      0.00000      0.00000      1.01660      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00246      0.00000      0.00000      0.00000     -0.06337     -0.00000     -1.01659      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cu\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.40657     -1.06012      0.00000      0.00000      0.00000      0.56867      0.00000      0.00000      0.00000     -0.12003      0.00000      0.00000     -0.12005      0.00000     -0.12005     -0.03219      0.00000      0.00000      0.00000 \n    -1.06012      2.82690      0.00000      0.00000      0.00000     -2.79518      0.00000      0.00000      0.00000      0.78158      0.00000      0.00000      0.78194      0.00000      0.78190      0.19290      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.26014      0.00000      0.00000      0.00000     -0.76892      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01153      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26021      0.00000      0.00000      0.00000     -0.76918      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01238      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26019      0.00000      0.00000      0.00000     -0.76912      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01219 \n     0.56867     -2.79518      0.00000      0.00000      0.00000     27.96649      0.00000      0.00000      0.00000     -9.96422      0.00000      0.00000     -9.97161      0.00000     -9.97085     -2.95940      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.76892      0.00000      0.00000      0.00000      2.27317      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04137      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.76918      0.00000      0.00000      0.00000      2.27410      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04422      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.76912      0.00000      0.00000      0.00000      2.27387      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04358 \n    -0.12003      0.78158      0.00000      0.00000      0.00000     -9.96422      0.00000      0.00000      0.00000      5.77856      0.00000      0.00000      2.78195      0.00000      2.78161      1.31449      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.12005      0.78194      0.00000      0.00000      0.00000     -9.97161      0.00000      0.00000      0.00000      2.78195      0.00000      0.00000      5.78536      0.00000      2.78500      1.31306      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.12005      0.78190      0.00000      0.00000      0.00000     -9.97085      0.00000      0.00000      0.00000      2.78161      0.00000      0.00000      2.78500      0.00000      5.78463      1.31332      0.00000      0.00000      0.00000 \n    -0.03219      0.19290      0.00000      0.00000      0.00000     -2.95940      0.00000      0.00000      0.00000      1.31449      0.00000      0.00000      1.31306      0.00000      1.31332      0.61357      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.01153      0.00000      0.00000      0.00000     -0.04137      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00076      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.01238      0.00000      0.00000      0.00000     -0.04422      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00086      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.01219      0.00000      0.00000      0.00000     -0.04358      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00084 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.75616      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.24384      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -324.79740    -44.56840    -40.80850    -40.78767    -40.71952     -9.40413     -7.86827     -7.83351     -7.71725     -4.99599     -4.99484     -4.92014     -4.89098     -4.86200     -1.33097     -0.85061     -0.84585     -0.82947      1.11107 \n   </alphaeps>\n   <betaeps>\n  -324.79690    -44.50074    -40.76862    -40.74112    -40.64954     -9.18313     -7.69918     -7.63560     -7.42117     -4.83470     -4.83334     -4.66453     -4.63186     -4.60026     -1.31134     -0.83911     -0.83355     -0.81500      1.22917 \n   </betaeps>\n   <alphavectors>\n    -0.99269     -0.43322      0.00000     -0.00000     -0.00000     -0.17119      0.00000      0.00000     -0.00000      0.00104     -0.00000      0.00000      0.00000      0.00319      0.04180      0.00000      0.00000     -0.00000      0.06401 \n    -0.01917      1.03738     -0.00000     -0.00000     -0.00000      0.55088      0.00000      0.00000     -0.00000     -0.00350     -0.00000     -0.00000      0.00000     -0.01078     -0.26157      0.00000     -0.00000      0.00000     -0.55392 \n     0.00000     -0.00000     -0.00000      0.00000     -0.99304      0.00000     -0.00000     -0.00000      0.37945      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.04697     -0.00000 \n    -0.00000      0.00000      0.99285      0.00000     -0.00000      0.00000     -0.37997      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04672     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.99289     -0.00000     -0.00000      0.00000     -0.37985     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.04678     -0.00000     -0.00000 \n     0.02358      0.45018      0.00000     -0.00000      0.00000     -2.46271     -0.00000     -0.00000      0.00000      0.01805      0.00000      0.00000     -0.00000      0.05748      3.97470     -0.00000      0.00000     -0.00000     10.27496 \n     0.00000     -0.00000     -0.00000      0.00000     -0.02009     -0.00000     -0.00000      0.00000     -1.06613     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.16260      0.00000 \n     0.00000     -0.00000      0.02062      0.00000     -0.00000      0.00000      1.06625      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.16176     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.02050     -0.00000     -0.00000      0.00000      1.06622      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.16196     -0.00000      0.00000 \n    -0.00935     -0.16925     -0.00000      0.00000     -0.00000      0.64504      0.00000      0.00000     -0.00000      0.08199     -0.00000      0.00000      0.00000      0.98003     -1.73474      0.00000     -0.00000      0.00000     -4.64590 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00935     -0.16786     -0.00000      0.00000     -0.00000      0.60950      0.00000      0.00000     -0.00000     -0.91104      0.00000     -0.00000      0.00000     -0.43865     -1.73419      0.00000     -0.00000      0.00000     -4.64501 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00935     -0.16819     -0.00000      0.00000     -0.00000      0.61798      0.00000      0.00000     -0.00000      0.81443      0.00000     -0.00000      0.00000     -0.58930     -1.73424      0.00000     -0.00000      0.00000     -4.64513 \n     0.00057      0.00813      0.00000     -0.00000      0.00000     -0.02486     -0.00000     -0.00000      0.00000      0.00022     -0.00000      0.00000     -0.00000      0.00068     -0.78019      0.00000     -0.00000      0.00000      0.80254 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00168     -0.00000     -0.00000     -0.00000      0.02070      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.01476     -0.00000 \n    -0.00000      0.00000     -0.00174     -0.00000      0.00000     -0.00000     -0.02149     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.01475      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00172      0.00000      0.00000     -0.00000     -0.02131     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.01475      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99269     -0.43354      0.00000     -0.00000     -0.00000      0.17021      0.00000     -0.00000      0.00000      0.00220      0.00000      0.00000     -0.00000      0.00573     -0.04127     -0.00000      0.00000      0.00000      0.06460 \n     0.01916      1.03866      0.00000      0.00000      0.00000     -0.54725     -0.00000      0.00000     -0.00000     -0.00723     -0.00000     -0.00000      0.00000     -0.01887      0.25594      0.00000      0.00000     -0.00000     -0.55748 \n     0.00000     -0.00000      0.00000     -0.00000      0.99370     -0.00000     -0.00000     -0.00000      0.37761      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.04779      0.00000 \n     0.00000     -0.00000     -0.99323     -0.00000      0.00000     -0.00000      0.37892     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.04721     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.99334     -0.00000      0.00000      0.00000      0.37862      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.04734      0.00000      0.00000 \n    -0.02358      0.43871     -0.00000      0.00000      0.00000      2.43138      0.00000     -0.00000     -0.00000      0.03423      0.00000      0.00000      0.00000      0.08956     -3.86094     -0.00000     -0.00000      0.00000     10.32589 \n     0.00000     -0.00000      0.00000     -0.00000      0.01822     -0.00000      0.00000      0.00000     -1.06574     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.16538     -0.00000 \n     0.00000     -0.00000     -0.01956     -0.00000      0.00000     -0.00000     -1.06602      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.16342      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01925     -0.00000      0.00000     -0.00000     -1.06595     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.16385     -0.00000      0.00000 \n     0.00935     -0.16548      0.00000     -0.00000     -0.00000     -0.64923     -0.00000      0.00000      0.00000      0.11843      0.00000      0.00000     -0.00000      0.96893      1.68122      0.00000      0.00000     -0.00000     -4.66662 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00935     -0.16302      0.00000     -0.00000     -0.00000     -0.58280     -0.00000      0.00000      0.00000     -0.93089     -0.00000     -0.00000      0.00000     -0.40748      1.68242      0.00000      0.00000     -0.00000     -4.66650 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00935     -0.16359      0.00000     -0.00000     -0.00000     -0.59907     -0.00000     -0.00000      0.00000      0.78697      0.00000     -0.00000      0.00000     -0.62810      1.68218      0.00000      0.00000     -0.00000     -4.66652 \n    -0.00057      0.00786     -0.00000      0.00000      0.00000      0.02470      0.00000      0.00000     -0.00000      0.00056      0.00000      0.00000     -0.00000      0.00154      0.78936     -0.00000     -0.00000      0.00000      0.79354 \n     0.00000      0.00000     -0.00000      0.00000     -0.00148      0.00000      0.00000     -0.00000      0.01805      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.01481      0.00000 \n     0.00000      0.00000      0.00162      0.00000     -0.00000      0.00000      0.01992     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.01478     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00159      0.00000     -0.00000      0.00000      0.01951      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.01479      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Zn\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.40928     -1.03505      0.00000      0.00000      0.00000     -0.09556      0.00000      0.00000      0.00000      0.17184      0.00000      0.00000      0.17173      0.00000      0.17173     -0.06847      0.00000      0.00000      0.00000 \n    -1.03505      2.63996      0.00000      0.00000      0.00000     -0.07743      0.00000      0.00000      0.00000     -0.36175      0.00000      0.00000     -0.36142      0.00000     -0.36142      0.19405      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.27164      0.00000      0.00000      0.00000     -0.80495      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14858      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.27167      0.00000      0.00000      0.00000     -0.80496      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14857      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.27167      0.00000      0.00000      0.00000     -0.80496      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14857 \n    -0.09556     -0.07743      0.00000      0.00000      0.00000      2.44921      0.00000      0.00000      0.00000     -0.07615      0.00000      0.00000     -0.07749      0.00000     -0.07749     -0.28780      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.80495      0.00000      0.00000      0.00000      2.38819      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51801      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.80496      0.00000      0.00000      0.00000      2.38819      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51799      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.80496      0.00000      0.00000      0.00000      2.38819      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51799 \n     0.17184     -0.36175      0.00000      0.00000      0.00000     -0.07615      0.00000      0.00000      0.00000      0.91365      0.00000      0.00000     -0.37378      0.00000     -0.37378     -0.08957      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.49611      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.49611      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.17173     -0.36142      0.00000      0.00000      0.00000     -0.07749      0.00000      0.00000      0.00000     -0.37378      0.00000      0.00000      0.82443      0.00000     -0.28375     -0.08936      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21605      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.17173     -0.36142      0.00000      0.00000      0.00000     -0.07749      0.00000      0.00000      0.00000     -0.37378      0.00000      0.00000     -0.28375      0.00000      0.82443     -0.08936      0.00000      0.00000      0.00000 \n    -0.06847      0.19405      0.00000      0.00000      0.00000     -0.28780      0.00000      0.00000      0.00000     -0.08957      0.00000      0.00000     -0.08936      0.00000     -0.08936      2.11410      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.14858      0.00000      0.00000      0.00000     -0.51801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11270      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.14857      0.00000      0.00000      0.00000     -0.51799      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11271      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.14857      0.00000      0.00000      0.00000     -0.51799      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11271 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.42923      0.41602      0.41602      0.36939      0.36934      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.42923      0.41602      0.41602      0.36939      0.36934      0.00000 \n   </betaocc>\n   <alphaeps>\n  -339.57450    -38.62810    -34.71406    -34.71285    -34.71285     -2.96388     -1.48885     -1.48665     -1.48665      0.02389      0.31034      0.31080      0.31080      1.53893      1.53940      1.53940      1.54112      1.54112      9.00107 \n   </alphaeps>\n   <betaeps>\n  -339.57450    -38.62810    -34.71406    -34.71285    -34.71285     -2.96388     -1.48885     -1.48665     -1.48665      0.02389      0.31034      0.31080      0.31080      1.53893      1.53940      1.53940      1.54112      1.54112      9.00107 \n   </betaeps>\n   <alphavectors>\n     0.99291      0.43673     -0.00000      0.00000     -0.00000      0.16116     -0.00000     -0.00000     -0.00000     -0.04544      0.00000      0.00000      0.00000     -0.00006     -0.00000     -0.00000      0.00000     -0.00000      0.04388 \n     0.01862     -1.04151      0.00000     -0.00000      0.00000     -0.46642      0.00000      0.00000      0.00000      0.13170      0.00000     -0.00000     -0.00000      0.00016      0.00000      0.00000     -0.00000      0.00000     -0.69326 \n     0.00000      0.00000      0.99118     -0.00000     -0.00000     -0.00000      0.36274     -0.00000      0.00000     -0.00000     -0.14765     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.99119     -0.00000      0.00000     -0.00000     -0.36269      0.00000      0.00000      0.00000     -0.14776     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.99119     -0.00000     -0.00000     -0.00000      0.36269     -0.00000      0.00000     -0.00000      0.14776      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.02766     -0.43585     -0.00000     -0.00000      0.00000      0.99148      0.00000      0.00000      0.00000     -0.22548     -0.00000     -0.00000     -0.00000      0.00009      0.00000      0.00000     -0.00000      0.00000     15.90554 \n     0.00000     -0.00000      0.02526     -0.00000     -0.00000     -0.00000     -0.99472     -0.00000      0.00000     -0.00000      0.45165      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.02525      0.00000      0.00000      0.00000      0.99458     -0.00000     -0.00000     -0.00000      0.45196      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.02525      0.00000      0.00000     -0.00000     -0.99458      0.00000     -0.00000      0.00000     -0.45196     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.01124      0.15866      0.00000      0.00000     -0.00000      0.02134     -0.00000     -0.00000     -0.00000     -0.04520      0.00000      0.00000      0.00000      0.99976      0.00000      0.00000     -0.00000      0.00000     -7.10000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000 \n     0.01124      0.15868      0.00000      0.00000     -0.00000      0.02079     -0.00000     -0.00000     -0.00000     -0.04495      0.00000      0.00000      0.00000     -0.50024     -0.00000     -0.00000      0.86603      0.00000     -7.09995 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000 \n     0.01124      0.15868      0.00000      0.00000     -0.00000      0.02079     -0.00000     -0.00000     -0.00000     -0.04495      0.00000      0.00000      0.00000     -0.50024     -0.00000     -0.00000     -0.86603     -0.00000     -7.09995 \n    -0.00059     -0.00247     -0.00000     -0.00000      0.00000      0.08674      0.00000      0.00000      0.00000      1.02446     -0.00000     -0.00000     -0.00000      0.00016      0.00000      0.00000     -0.00000      0.00000      0.64363 \n     0.00000      0.00000     -0.00296      0.00000      0.00000      0.00000     -0.19765      0.00000     -0.00000      0.00000     -1.00860     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00296     -0.00000      0.00000     -0.00000      0.19797      0.00000      0.00000      0.00000     -1.00854     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00296      0.00000      0.00000      0.00000     -0.19797     -0.00000      0.00000     -0.00000      1.00854      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99291      0.43673     -0.00000      0.00000     -0.00000      0.16116     -0.00000     -0.00000     -0.00000     -0.04544      0.00000      0.00000      0.00000     -0.00006     -0.00000     -0.00000      0.00000     -0.00000      0.04388 \n     0.01862     -1.04151      0.00000     -0.00000      0.00000     -0.46642      0.00000      0.00000      0.00000      0.13170      0.00000     -0.00000     -0.00000      0.00016      0.00000      0.00000     -0.00000      0.00000     -0.69326 \n     0.00000      0.00000      0.99118     -0.00000     -0.00000     -0.00000      0.36274     -0.00000      0.00000     -0.00000     -0.14765     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.99119     -0.00000      0.00000     -0.00000     -0.36269      0.00000      0.00000      0.00000     -0.14776     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.99119     -0.00000     -0.00000     -0.00000      0.36269     -0.00000      0.00000     -0.00000      0.14776      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.02766     -0.43585     -0.00000     -0.00000      0.00000      0.99148      0.00000      0.00000      0.00000     -0.22548     -0.00000     -0.00000     -0.00000      0.00009      0.00000      0.00000     -0.00000      0.00000     15.90554 \n     0.00000     -0.00000      0.02526     -0.00000     -0.00000     -0.00000     -0.99472     -0.00000      0.00000     -0.00000      0.45165      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.02525      0.00000      0.00000      0.00000      0.99458     -0.00000     -0.00000     -0.00000      0.45196      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.02525      0.00000      0.00000     -0.00000     -0.99458      0.00000     -0.00000      0.00000     -0.45196     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.01124      0.15866      0.00000      0.00000     -0.00000      0.02134     -0.00000     -0.00000     -0.00000     -0.04520      0.00000      0.00000      0.00000      0.99976      0.00000      0.00000     -0.00000      0.00000     -7.10000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000 \n     0.01124      0.15868      0.00000      0.00000     -0.00000      0.02079     -0.00000     -0.00000     -0.00000     -0.04495      0.00000      0.00000      0.00000     -0.50024     -0.00000     -0.00000      0.86603      0.00000     -7.09995 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000 \n     0.01124      0.15868      0.00000      0.00000     -0.00000      0.02079     -0.00000     -0.00000     -0.00000     -0.04495      0.00000      0.00000      0.00000     -0.50024     -0.00000     -0.00000     -0.86603     -0.00000     -7.09995 \n    -0.00059     -0.00247     -0.00000     -0.00000      0.00000      0.08674      0.00000      0.00000      0.00000      1.02446     -0.00000     -0.00000     -0.00000      0.00016      0.00000      0.00000     -0.00000      0.00000      0.64363 \n     0.00000      0.00000     -0.00296      0.00000      0.00000      0.00000     -0.19765      0.00000     -0.00000      0.00000     -1.00860     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00296     -0.00000      0.00000     -0.00000      0.19797      0.00000      0.00000      0.00000     -1.00854     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00296      0.00000      0.00000      0.00000     -0.19797     -0.00000      0.00000     -0.00000      1.00854      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Al\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.02555     -0.09210      0.00000      0.00000      0.00000      0.23649      0.00000      0.00000      0.00000 \n    -0.09210      0.33202      0.00000      0.00000      0.00000     -0.85252      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.88905      0.00000      0.00000      0.00000      0.08349      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.97561      0.00000      0.00000      0.00000     -0.03340      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.97739      0.00000      0.00000      0.00000     -0.03540 \n     0.23649     -0.85252      0.00000      0.00000      0.00000      2.18901      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.08349      0.00000      0.00000      0.00000      0.39314      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.03340      0.00000      0.00000      0.00000      0.37818      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.03540      0.00000      0.00000      0.00000      0.37763 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.33205      0.33205      0.33204 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.00129      0.00129      0.00129 \n   </betaocc>\n   <alphaeps>\n   -54.25346     -3.52040     -2.09558     -2.09558     -2.09558     -0.10886      0.17738      0.17738      0.17738 \n   </alphaeps>\n   <betaeps>\n   -54.24694     -3.51021     -2.08372     -2.08372     -2.08372     -0.07210      0.21387      0.21387      0.21387 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.11322      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.40803      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.95481      0.00000      0.00000     -0.43801      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.95481      0.00000      0.00000      0.00000     -0.43801 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43801      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      1.04614      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.12452      0.00000      0.00000      1.04308      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.12452      0.00000      0.00000      0.00000      1.04308 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.04308     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.11283     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.40685      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.95574      0.00000      0.00000     -0.00000     -0.43596 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.43596      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.95574      0.00000     -0.00000     -0.00000      0.43596     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      1.04623     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.12230     -0.00000      0.00000      0.00000      1.04334 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.04334      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.12230     -0.00000      0.00000     -0.00000     -1.04334     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Si\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.02076     -0.07230      0.00000      0.00000      0.00000      0.21080      0.00000      0.00000      0.00000 \n    -0.07230      0.25175      0.00000      0.00000      0.00000     -0.73407      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.97681      0.00000      0.00000      0.00000     -0.07415      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.09029      0.00000      0.00000      0.00000     -0.25366      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.97681      0.00000      0.00000      0.00000     -0.07415 \n     0.21080     -0.73407      0.00000      0.00000      0.00000      2.14042      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07415      0.00000      0.00000      0.00000      0.72968      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.25366      0.00000      0.00000      0.00000      0.71259      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07415      0.00000      0.00000      0.00000      0.72968 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.66666      0.66666      0.66666 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -64.12367     -4.63110     -3.02588     -3.02588     -3.02588     -0.27028      0.03464      0.03464      0.03464 \n   </alphaeps>\n   <betaeps>\n   -64.11292     -4.61452     -3.00677     -3.00677     -3.00677     -0.19971      0.10487      0.10487      0.10487 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.10219     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.35568      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.97070     -0.00000     -0.00000     -0.36802     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.36802      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.97070      0.00000      0.00000      0.00000     -0.36802 \n     0.00000      0.00000      0.00000      0.00000      0.00000      1.03445     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.09386      0.00000      0.00000      1.03387     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.03387     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.09386     -0.00000      0.00000      0.00000      1.03387 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.10158     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.35390      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.97173     -0.00000     -0.00000      0.00000     -0.36531      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36531      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.97173     -0.00000      0.00000      0.00000      0.36531 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03457     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.09097      0.00000      0.00000     -0.00000      1.03413      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.03413     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.09097      0.00000     -0.00000     -0.00000     -1.03413 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"P\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.02112     -0.07142      0.00000      0.00000      0.00000      0.21231      0.00000      0.00000      0.00000 \n    -0.07142      0.24153      0.00000      0.00000      0.00000     -0.71797      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.02974      0.00000      0.00000      0.00000     -0.20835      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.02974      0.00000      0.00000      0.00000     -0.20835      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.12021      0.00000      0.00000      0.00000     -0.35829 \n     0.21231     -0.71797      0.00000      0.00000      0.00000      2.13426      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.20835      0.00000      0.00000      0.00000      1.07961      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.20835      0.00000      0.00000      0.00000      1.07961      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.35829      0.00000      0.00000      0.00000      1.06783 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.99991      0.99991      0.99991 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.00009      0.00009      0.00009 \n   </betaocc>\n   <alphaeps>\n   -74.83110     -5.83703     -4.05980     -4.05980     -4.05980     -0.38941     -0.04131     -0.04131     -0.04131 \n   </alphaeps>\n   <betaeps>\n   -74.81481     -5.81277     -4.03203     -4.03203     -4.03203     -0.28344      0.06441      0.06441      0.06441 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.10315     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.34861      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.97660      0.00000      0.00000      0.00000      0.34672      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.97660      0.00000      0.00000     -0.00000      0.34672 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.34672      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -1.03295     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.07828     -0.00000     -0.00000     -0.00000     -1.03336      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07828     -0.00000     -0.00000      0.00000     -1.03336 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.03336      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.10237      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.34641      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.97764      0.00000      0.00000      0.00000      0.34378      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.97764      0.00000      0.00000     -0.00000      0.34378 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.34378     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -1.03309     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07517     -0.00000     -0.00000     -0.00000     -1.03359      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.07517     -0.00000     -0.00000      0.00000     -1.03359 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03359     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"S\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.02136     -0.07050      0.00000      0.00000      0.00000      0.21326      0.00000      0.00000      0.00000 \n    -0.07050      0.23270      0.00000      0.00000      0.00000     -0.70392      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.14413      0.00000      0.00000      0.00000     -0.45275      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.07024      0.00000      0.00000      0.00000     -0.32557      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.07024      0.00000      0.00000      0.00000     -0.32557 \n     0.21326     -0.70392      0.00000      0.00000      0.00000      2.12941      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.45275      0.00000      0.00000      0.00000      1.42224      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.32557      0.00000      0.00000      0.00000      1.43064      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.32557      0.00000      0.00000      0.00000      1.43064 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.99999      0.99999      0.99999 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.33334      0.33334      0.33334 \n   </betaocc>\n   <alphaeps>\n   -86.44704     -7.19582     -5.24976     -5.24976     -5.24976     -0.49607     -0.10079     -0.10079     -0.10079 \n   </alphaeps>\n   <betaeps>\n   -86.43602     -7.17994     -5.23167     -5.23167     -5.23167     -0.42777     -0.03253     -0.03253     -0.03253 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.10355      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.34169      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.32913      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.98112     -0.00000     -0.00000      0.00000      0.32913      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.98112      0.00000      0.00000     -0.00000      0.32913 \n     0.00000      0.00000      0.00000      0.00000      0.00000      1.03181      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.03278     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.06554      0.00000      0.00000     -0.00000     -1.03278     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06554      0.00000     -0.00000      0.00000     -1.03278 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.10313     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.34051     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.32773      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.98159     -0.00000     -0.00000      0.00000      0.32773      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98159      0.00000      0.00000      0.00000      0.32773 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03188      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.03287      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.06406      0.00000      0.00000      0.00000     -1.03287      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.06406     -0.00000      0.00000     -0.00000     -1.03287 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cl\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.01751     -0.05680      0.00000      0.00000      0.00000      0.19197      0.00000      0.00000      0.00000 \n    -0.05680      0.18422      0.00000      0.00000      0.00000     -0.62262      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.08707      0.00000      0.00000      0.00000     -0.39380      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.13676      0.00000      0.00000      0.00000     -0.49033      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.08707      0.00000      0.00000      0.00000     -0.39380 \n     0.19197     -0.62262      0.00000      0.00000      0.00000      2.10429      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.39380      0.00000      0.00000      0.00000      1.76277      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.49033      0.00000      0.00000      0.00000      1.75799      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.39380      0.00000      0.00000      0.00000      1.76277 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.99629      0.99629      0.99629 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.67038      0.67037      0.67037 \n   </betaocc>\n   <alphaeps>\n   -99.24907     -8.92768     -6.81482     -6.81482     -6.81482     -0.67893     -0.25399     -0.25399     -0.25399 \n   </alphaeps>\n   <betaeps>\n   -99.24452     -8.92114     -6.80740     -6.80740     -6.80740     -0.64728     -0.22236     -0.22236     -0.22236 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.09365      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.30371     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98743      0.00000     -0.00000     -0.00000     -0.28664 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.28664     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.98743     -0.00000      0.00000     -0.00000      0.28664      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -1.02573      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04912     -0.00000      0.00000      0.00000      1.02702 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.02702      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.04912      0.00000     -0.00000      0.00000     -1.02702      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.09350     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.30329      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98757     -0.00000      0.00000     -0.00000      0.28618 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.28618      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.98757      0.00000     -0.00000      0.00000      0.28618     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      1.02575     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04863      0.00000     -0.00000      0.00000     -1.02705 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.02705     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.04863      0.00000      0.00000     -0.00000     -1.02705      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ar\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.02070     -0.06595      0.00000      0.00000      0.00000      0.20943      0.00000      0.00000      0.00000 \n    -0.06595      0.21011      0.00000      0.00000      0.00000     -0.66725      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.12902      0.00000      0.00000      0.00000     -0.52407      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.17807      0.00000      0.00000      0.00000     -0.61511      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.12902      0.00000      0.00000      0.00000     -0.52407 \n     0.20943     -0.66725      0.00000      0.00000      0.00000      2.11900      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.52407      0.00000      0.00000      0.00000      2.12902      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.61511      0.00000      0.00000      0.00000      2.12477      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.52407      0.00000      0.00000      0.00000      2.12902 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000 \n   </betaocc>\n   <alphaeps>\n  -112.47540    -10.43942     -8.16229     -8.16229     -8.16229     -0.75856     -0.26076     -0.26076     -0.26076 \n   </alphaeps>\n   <betaeps>\n  -112.47540    -10.43942     -8.16229     -8.16229     -8.16229     -0.75856     -0.26076     -0.26076     -0.26076 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.10173      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.32412     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98766     -0.00000     -0.00000     -0.29839      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.29839     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.98766      0.00000      0.00000      0.00000     -0.00000      0.29839 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -1.02932     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04609      0.00000      0.00000      1.03072      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03072      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.04609     -0.00000     -0.00000     -0.00000      0.00000     -1.03072 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.10173      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.32412     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98766     -0.00000     -0.00000     -0.29839      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.29839     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.98766      0.00000      0.00000      0.00000     -0.00000      0.29839 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -1.02932     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04609      0.00000      0.00000      1.03072      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03072      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.04609     -0.00000     -0.00000     -0.00000      0.00000     -1.03072 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"K\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.03455     -0.10797      0.00000      0.00000      0.00000      0.28930      0.00000      0.00000      0.00000     -0.05617      0.00000      0.00000      0.00000 \n    -0.10797      0.33748      0.00000      0.00000      0.00000     -0.90469      0.00000      0.00000      0.00000      0.18212      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.13712      0.00000      0.00000      0.00000     -0.48827      0.00000      0.00000      0.00000     -0.15708      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.20687      0.00000      0.00000      0.00000     -0.60146      0.00000      0.00000      0.00000     -0.12535      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.20687      0.00000      0.00000      0.00000     -0.60146      0.00000      0.00000      0.00000     -0.12535 \n     0.28930     -0.90469      0.00000      0.00000      0.00000      2.43098      0.00000      0.00000      0.00000     -0.56987      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.48827      0.00000      0.00000      0.00000      1.75539      0.00000      0.00000      0.00000      0.36260      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.60146      0.00000      0.00000      0.00000      1.74875      0.00000      0.00000      0.00000      0.36446      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.60146      0.00000      0.00000      0.00000      1.74875      0.00000      0.00000      0.00000      0.36446 \n    -0.05617      0.18212      0.00000      0.00000      0.00000     -0.56987      0.00000      0.00000      0.00000      1.25695      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.15708      0.00000      0.00000      0.00000      0.36260      0.00000      0.00000      0.00000      0.07648      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.12535      0.00000      0.00000      0.00000      0.36446      0.00000      0.00000      0.00000      0.07596      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.12535      0.00000      0.00000      0.00000      0.36446      0.00000      0.00000      0.00000      0.07596 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -126.81700    -12.41858    -10.02728    -10.02728    -10.02728     -1.19297     -0.61401     -0.61401     -0.61401      0.00880      0.17955      0.17955      0.17955 \n   </alphaeps>\n   <betaeps>\n  -126.81700    -12.41858    -10.02728    -10.02728    -10.02728     -1.19297     -0.61401     -0.61401     -0.61401      0.00880      0.17955      0.17955      0.17955 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.12558      0.00000      0.00000     -0.00000     -0.05484      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.39120      0.00000      0.00000     -0.00000      0.17721      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98241     -0.00000      0.32161     -0.00000      0.00000      0.00000      0.00000     -0.20081     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.32161     -0.00000      0.20081      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.32161     -0.00000     -0.00000     -0.00000     -0.00000      0.20081 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -1.03234     -0.00000     -0.00000      0.00000     -0.54729     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05761      0.00000     -0.93508      0.00000     -0.00000     -0.00000     -0.00000      0.71073      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.93508      0.00000     -0.71073     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.93508      0.00000      0.00000      0.00000      0.00000     -0.71073 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02107      0.00000      0.00000     -0.00000      1.12074      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01615     -0.00000     -0.19488     -0.00000      0.00000      0.00000      0.00000     -1.10831     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.19488     -0.00000      1.10831     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.19488     -0.00000     -0.00000     -0.00000     -0.00000      1.10831 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.12558     -0.00000     -0.00000     -0.00000      0.05484     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.39120     -0.00000     -0.00000     -0.00000     -0.17721      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98241     -0.00000      0.00000     -0.32161      0.00000      0.00000      0.20081     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.32161      0.00000      0.00000      0.00000     -0.00000      0.20081     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.32161      0.00000     -0.00000     -0.00000     -0.20081 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -1.03234     -0.00000     -0.00000     -0.00000      0.54729     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05761      0.00000     -0.00000      0.93508     -0.00000     -0.00000     -0.71073      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.93508     -0.00000     -0.00000     -0.00000      0.00000     -0.71073      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.93508     -0.00000      0.00000      0.00000      0.71073 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.02107      0.00000      0.00000      0.00000     -1.12074      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01615      0.00000     -0.00000      0.19488      0.00000      0.00000      1.10831     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.19488      0.00000      0.00000      0.00000     -0.00000      1.10831      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.19488      0.00000     -0.00000     -0.00000     -1.10831 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ca\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.04010     -0.12386      0.00000      0.00000      0.00000      0.31570      0.00000      0.00000      0.00000     -0.08964      0.00000      0.00000      0.00000 \n    -0.12386      0.38267      0.00000      0.00000      0.00000     -0.97574      0.00000      0.00000      0.00000      0.28578      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.24329      0.00000      0.00000      0.00000     -0.69318      0.00000      0.00000      0.00000     -0.08930      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.17796      0.00000      0.00000      0.00000     -0.59245      0.00000      0.00000      0.00000     -0.11062      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.24329      0.00000      0.00000      0.00000     -0.69318      0.00000      0.00000      0.00000     -0.08930 \n     0.31570     -0.97574      0.00000      0.00000      0.00000      2.49232      0.00000      0.00000      0.00000     -0.82301      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.69318      0.00000      0.00000      0.00000      1.97496      0.00000      0.00000      0.00000      0.25443      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.59245      0.00000      0.00000      0.00000      1.98020      0.00000      0.00000      0.00000      0.25332      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.69318      0.00000      0.00000      0.00000      1.97496      0.00000      0.00000      0.00000      0.25443 \n    -0.08964      0.28578      0.00000      0.00000      0.00000     -0.82301      0.00000      0.00000      0.00000      2.27187      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.08930      0.00000      0.00000      0.00000      0.25443      0.00000      0.00000      0.00000      0.03278      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.11062      0.00000      0.00000      0.00000      0.25332      0.00000      0.00000      0.00000      0.03301      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.08930      0.00000      0.00000      0.00000      0.25443      0.00000      0.00000      0.00000      0.03278 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -142.12610    -14.54356    -11.99670    -11.99670    -11.99670     -1.60684     -0.94161     -0.94161     -0.94161     -0.09356      0.05183      0.05183      0.05183 \n   </alphaeps>\n   <betaeps>\n  -142.12610    -14.54356    -11.99670    -11.99670    -11.99670     -1.60684     -0.94161     -0.94161     -0.94161     -0.09356      0.05183      0.05183      0.05183 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.13447     -0.00000     -0.00000     -0.00000     -0.04434      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.41403     -0.00000     -0.00000      0.00000      0.14111     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.34878     -0.00000      0.00000     -0.15405     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.98353     -0.00000     -0.34878     -0.00000      0.00000     -0.00000     -0.00000     -0.15405      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.34878      0.00000      0.00000     -0.00000      0.15405 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -1.04072     -0.00000     -0.00000      0.00000     -0.40381     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.99372      0.00000     -0.00000      0.52099     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05121     -0.00000      0.99372      0.00000     -0.00000     -0.00000      0.00000      0.52099      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.99372      0.00000     -0.00000      0.00000     -0.52099 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.01808      0.00000      0.00000     -0.00000      1.06565      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.12802     -0.00000     -0.00000     -1.06216     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.01084      0.00000      0.12802     -0.00000      0.00000      0.00000     -0.00000     -1.06216     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.12802     -0.00000      0.00000     -0.00000      1.06216 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.13447     -0.00000     -0.00000     -0.00000     -0.04434      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.41403     -0.00000     -0.00000      0.00000      0.14111     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.34878     -0.00000      0.00000     -0.15405     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.98353     -0.00000     -0.34878     -0.00000      0.00000     -0.00000     -0.00000     -0.15405      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.34878      0.00000      0.00000     -0.00000      0.15405 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -1.04072     -0.00000     -0.00000      0.00000     -0.40381     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.99372      0.00000     -0.00000      0.52099     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05121     -0.00000      0.99372      0.00000     -0.00000     -0.00000      0.00000      0.52099      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.99372      0.00000     -0.00000      0.00000     -0.52099 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.01808      0.00000      0.00000     -0.00000      1.06565      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.12802     -0.00000     -0.00000     -1.06216     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.01084      0.00000      0.12802     -0.00000      0.00000      0.00000     -0.00000     -1.06216     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.12802     -0.00000      0.00000     -0.00000      1.06216 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Y\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.48004     -1.20829      0.00000      0.00000      0.00000      0.50453      0.00000      0.00000      0.00000     -0.04333      0.00000      0.00000     -0.04333      0.00000     -0.04333     -0.26088      0.00000      0.00000      0.00000      0.06858      0.00000      0.00000      0.06858      0.00000      0.06858      0.05398      0.00000      0.00000      0.00000 \n    -1.20829      3.06195      0.00000      0.00000      0.00000     -1.52539      0.00000      0.00000      0.00000      0.16267      0.00000      0.00000      0.16267      0.00000      0.16267      0.97604      0.00000      0.00000      0.00000     -0.31394      0.00000      0.00000     -0.31394      0.00000     -0.31394     -0.15754      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.45037      0.00000      0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25952      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00776      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.45037      0.00000      0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25952      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00776      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.45037      0.00000      0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25952      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00776 \n     0.50453     -1.52539      0.00000      0.00000      0.00000      3.68757      0.00000      0.00000      0.00000     -0.69016      0.00000      0.00000     -0.69016      0.00000     -0.69016     -3.43341      0.00000      0.00000      0.00000      1.40749      0.00000      0.00000      1.40749      0.00000      1.40749      0.46928      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      2.67702      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02042      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      2.67702      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02042      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      2.67702      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02042 \n    -0.04333      0.16267      0.00000      0.00000      0.00000     -0.69016      0.00000      0.00000      0.00000      7.02944      0.00000      0.00000     -2.85426      0.00000     -2.85425      0.54567      0.00000      0.00000      0.00000     -4.11302      0.00000      0.00000      1.73126      0.00000      1.73129     -0.50757      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     19.76746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     19.76746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04333      0.16267      0.00000      0.00000      0.00000     -0.69016      0.00000      0.00000      0.00000     -2.85426      0.00000      0.00000      7.02944      0.00000     -2.85425      0.54567      0.00000      0.00000      0.00000      1.73128      0.00000      0.00000     -4.11302      0.00000      1.73128     -0.50757      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     19.76746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04333      0.16267      0.00000      0.00000      0.00000     -0.69016      0.00000      0.00000      0.00000     -2.85425      0.00000      0.00000     -2.85425      0.00000      7.02941      0.54567      0.00000      0.00000      0.00000      1.73127      0.00000      0.00000      1.73129      0.00000     -4.11302     -0.50757      0.00000      0.00000      0.00000 \n    -0.26088      0.97604      0.00000      0.00000      0.00000     -3.43341      0.00000      0.00000      0.00000      0.54567      0.00000      0.00000      0.54567      0.00000      0.54567      9.76616      0.00000      0.00000      0.00000     -3.46917      0.00000      0.00000     -3.46917      0.00000     -3.46917      2.53123      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.25952      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.25952      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.25952      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111 \n     0.06858     -0.31394      0.00000      0.00000      0.00000      1.40749      0.00000      0.00000      0.00000     -4.11302      0.00000      0.00000      1.73128      0.00000      1.73127     -3.46917      0.00000      0.00000      0.00000      3.55816      0.00000      0.00000      0.10239      0.00000      0.10238     -0.80972      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.91154      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.91154      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06858     -0.31394      0.00000      0.00000      0.00000      1.40749      0.00000      0.00000      0.00000      1.73126      0.00000      0.00000     -4.11302      0.00000      1.73129     -3.46917      0.00000      0.00000      0.00000      0.10239      0.00000      0.00000      3.55816      0.00000      0.10238     -0.80972      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.91154      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06858     -0.31394      0.00000      0.00000      0.00000      1.40749      0.00000      0.00000      0.00000      1.73129      0.00000      0.00000      1.73128      0.00000     -4.11302     -3.46917      0.00000      0.00000      0.00000      0.10238      0.00000      0.00000      0.10238      0.00000      3.55817     -0.80972      0.00000      0.00000      0.00000 \n     0.05398     -0.15754      0.00000      0.00000      0.00000      0.46928      0.00000      0.00000      0.00000     -0.50757      0.00000      0.00000     -0.50757      0.00000     -0.50757      2.53123      0.00000      0.00000      0.00000     -0.80972      0.00000      0.00000     -0.80972      0.00000     -0.80972      1.85990      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00776      0.00000      0.00000      0.00000      0.02042      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34690      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00776      0.00000      0.00000      0.00000      0.02042      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34690      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00776      0.00000      0.00000      0.00000      0.02042      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34690 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.16658      0.16658      0.16658      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.16675      0.16675      0.16675      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -609.38680    -89.44959    -84.25176    -84.25176    -84.25176    -17.24291    -15.00992    -15.00992    -15.00992     -4.23798     -4.23798     -4.23798     -4.23798     -4.23798     -2.40561     -1.48394     -1.48394     -1.48394     -0.21636     -0.10595     -0.10595     -0.10595      0.21986      0.21986      0.21986      0.21986      0.21986      1.11119      4.60831 \n   </alphaeps>\n   <betaeps>\n  -609.38680    -89.44959    -84.25176    -84.25176    -84.25176    -17.24291    -15.00992    -15.00992    -15.00992     -4.23798     -4.23798     -4.23798     -4.23798     -4.23798     -2.40561     -1.48394     -1.48394     -1.48394     -0.21637     -0.10596     -0.10596     -0.10596      0.21986      0.21986      0.21986      0.21986      0.21986      1.11119      4.60831 \n   </betaeps>\n   <alphavectors>\n     0.99386      0.44353      0.00000      0.00000      0.00000     -0.21519      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.09260     -0.00000     -0.00000     -0.00000      0.02577      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.11600      0.07295 \n     0.01500     -1.03828      0.00000      0.00000      0.00000      0.60860      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.27660      0.00000      0.00000      0.00000     -0.07630     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.34731     -0.24832 \n     0.00000      0.00000      0.00000     -0.99878      0.00000      0.00000      0.46331      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.11357     -0.00000     -0.00000      0.02059     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.99878      0.00000      0.00000      0.00000      0.00000      0.46331      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.11357      0.00000     -0.00000      0.00000     -0.00000      0.02059      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.99878      0.00000      0.00000      0.00000     -0.46331     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.11357      0.00000      0.00000      0.00000     -0.02059     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00336     -0.13266      0.00000      0.00000      0.00000     -1.13251      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.69711     -0.00000     -0.00000     -0.00000      0.24007      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.21232      0.34079 \n     0.00000      0.00000      0.00000     -0.00286      0.00000      0.00000     -1.10624      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.33778      0.00000      0.00000     -0.06185      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00286      0.00000      0.00000      0.00000      0.00000     -1.10624     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.33778     -0.00000      0.00000     -0.00000      0.00000     -0.06185     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00286      0.00000      0.00000      0.00000      1.10624      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.33778     -0.00000     -0.00000     -0.00000      0.06185      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00116      0.04728      0.00000      0.00000      0.00000      0.00602      0.00000      0.00000      0.00000     -1.57192     -0.00000      0.00000     -0.00000     -0.90754     -0.38569      0.00000      0.00000      0.00000     -0.26292     -0.00000     -0.00000     -0.00000      0.98843     -0.00000     -0.00000     -0.00000      0.57067      1.77112      0.48919 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -3.14384     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.97686      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -3.14384      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.97686      0.00000      0.00000     -0.00000 \n     0.00116      0.04728      0.00000      0.00000      0.00000      0.00602      0.00000      0.00000     -0.00000      1.57191     -0.00000      0.00000     -0.00000     -0.90756     -0.38569      0.00000      0.00000      0.00000     -0.26292     -0.00000     -0.00000      0.00000     -0.98843     -0.00000     -0.00000     -0.00000      0.57067      1.77112      0.48919 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.14384      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.97686      0.00000      0.00000     -0.00000     -0.00000 \n     0.00116      0.04728      0.00000      0.00000      0.00000      0.00602      0.00000      0.00000      0.00000      0.00001      0.00000     -0.00000      0.00000      1.81509     -0.38569      0.00000      0.00000      0.00000     -0.26292     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.14134      1.77112      0.48919 \n     0.01141      0.31708      0.00000      0.00000      0.00000      0.80185      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.55242      0.00000      0.00000      0.00000      1.31509     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000    -12.80125    -34.46859 \n     0.00000      0.00000      0.00000     -0.00106      0.00000      0.00000      0.01895      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.04922     -0.00000     -0.00000      0.22204     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00106      0.00000      0.00000      0.00000      0.00000      0.01895      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.04922      0.00000     -0.00000      0.00000     -0.00000      0.22204      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00106      0.00000      0.00000      0.00000     -0.01895     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.04922      0.00000      0.00000      0.00000     -0.22204     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00580     -0.17161      0.00000      0.00000      0.00000     -0.35730      0.00000      0.00000     -0.00000      0.92949     -0.00000      0.00000     -0.00000      0.53663      0.54127     -0.00000     -0.00000     -0.00000     -0.42076      0.00000      0.00000      0.00000     -1.60748      0.00000      0.00000      0.00000     -0.92807      4.16254     14.97667 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.85897      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -3.21495     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.85897     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -3.21495     -0.00000     -0.00000     -0.00000 \n    -0.00580     -0.17161      0.00000      0.00000      0.00000     -0.35730      0.00000      0.00000     -0.00000     -0.92948     -0.00000      0.00000     -0.00000      0.53665      0.54127     -0.00000     -0.00000     -0.00000     -0.42076      0.00000      0.00000     -0.00000      1.60747      0.00000      0.00000      0.00000     -0.92808      4.16254     14.97667 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.85897     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      3.21495     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00580     -0.17161      0.00000      0.00000      0.00000     -0.35730      0.00000      0.00000     -0.00000     -0.00001     -0.00000      0.00000     -0.00000     -1.07328      0.54127     -0.00000     -0.00000     -0.00000     -0.42076      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.85615      4.16254     14.97667 \n     0.00006      0.00325      0.00000      0.00000      0.00000     -0.00253      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00100     -0.00000     -0.00000     -0.00000      0.96433      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42904      0.10929 \n     0.00000      0.00000      0.00000      0.00018      0.00000      0.00000     -0.00329      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.01167      0.00000      0.00000     -1.01972      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00018      0.00000      0.00000      0.00000      0.00000     -0.00329     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.01167     -0.00000      0.00000      0.00000      0.00000     -1.01972      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00018      0.00000      0.00000      0.00000      0.00329      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.01167     -0.00000     -0.00000     -0.00000      1.01972      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99386     -0.44353     -0.00000     -0.00000     -0.00000     -0.21519      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.09260      0.00000     -0.00000      0.00000     -0.02577      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.11600     -0.07295 \n     0.01500      1.03828      0.00000      0.00000      0.00000      0.60860     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.27660     -0.00000      0.00000     -0.00000      0.07630     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.34731      0.24832 \n     0.00000     -0.00000     -0.00000     -0.00000      0.99878      0.00000     -0.00000      0.46331      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.11357      0.00000     -0.00000     -0.02059      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.99878      0.00000     -0.00000      0.46331      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.11357      0.00000      0.00000     -0.00000      0.00000      0.02059     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.99878      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.46331     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.11357     -0.00000      0.00000     -0.00000     -0.02059      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00336      0.13266      0.00000      0.00000      0.00000     -1.13251     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.69711     -0.00000     -0.00000      0.00000     -0.24007      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.21232     -0.34079 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00286      0.00000      0.00000     -1.10624     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.33778     -0.00000      0.00000      0.06185     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00286     -0.00000      0.00000     -1.10624     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.33778     -0.00000     -0.00000      0.00000     -0.00000     -0.06185      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00286     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.10624     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.33778      0.00000     -0.00000      0.00000      0.06185      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00116     -0.04728     -0.00000     -0.00000     -0.00000      0.00602      0.00000      0.00000     -0.00000     -0.90765     -0.00000     -0.00000     -1.57186      0.00000     -0.38569      0.00000      0.00000     -0.00000      0.26291     -0.00000      0.00000     -0.00000      0.57068      0.00000      0.00000     -0.98843     -0.00000     -1.77112     -0.48919 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -3.14384     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.97686      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      3.14384     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.97686     -0.00000      0.00000     -0.00000      0.00000 \n     0.00116     -0.04728     -0.00000     -0.00000     -0.00000      0.00602      0.00000      0.00000     -0.00000     -0.90744     -0.00000     -0.00000      1.57198      0.00000     -0.38569      0.00000      0.00000     -0.00000      0.26291     -0.00000      0.00000     -0.00000      0.57066      0.00000      0.00000      0.98843     -0.00000     -1.77112     -0.48919 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.14384     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.97686      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00116     -0.04728     -0.00000     -0.00000     -0.00000      0.00602      0.00000      0.00000     -0.00000      1.81509     -0.00000     -0.00000     -0.00012      0.00000     -0.38569      0.00000      0.00000     -0.00000      0.26291     -0.00000      0.00000     -0.00000     -1.14134      0.00000      0.00000     -0.00001     -0.00000     -1.77112     -0.48919 \n     0.01141     -0.31708     -0.00000     -0.00000     -0.00000      0.80185      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.55243      0.00000      0.00000     -0.00000     -1.31506      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     12.80126     34.46859 \n     0.00000      0.00000      0.00000      0.00000      0.00106     -0.00000     -0.00000      0.01895      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.04922      0.00000     -0.00000     -0.22204      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00106     -0.00000      0.00000      0.01895      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.04922      0.00000      0.00000     -0.00000      0.00000      0.22204     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00106     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01895      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.04922     -0.00000      0.00000     -0.00000     -0.22204      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00580      0.17161      0.00000      0.00000      0.00000     -0.35730     -0.00000     -0.00000      0.00000      0.53670      0.00000      0.00000      0.92945     -0.00000      0.54127     -0.00000     -0.00000      0.00000      0.42075     -0.00000      0.00000     -0.00000     -0.92808     -0.00000     -0.00000      1.60747      0.00000     -4.16254    -14.97667 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.85897      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -3.21495     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.85897      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      3.21495      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00580      0.17161      0.00000      0.00000      0.00000     -0.35730     -0.00000     -0.00000      0.00000      0.53658      0.00000      0.00000     -0.92952     -0.00000      0.54127     -0.00000     -0.00000      0.00000      0.42075     -0.00000      0.00000     -0.00000     -0.92807     -0.00000     -0.00000     -1.60748      0.00000     -4.16254    -14.97667 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.85897      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -3.21495      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00580      0.17161      0.00000      0.00000      0.00000     -0.35730     -0.00000     -0.00000      0.00000     -1.07328      0.00000      0.00000      0.00007     -0.00000      0.54127     -0.00000     -0.00000      0.00000      0.42075     -0.00000      0.00000     -0.00000      1.85615     -0.00000     -0.00000      0.00001      0.00000     -4.16254    -14.97667 \n     0.00006     -0.00325     -0.00000     -0.00000     -0.00000     -0.00253      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00100      0.00000     -0.00000      0.00000     -0.96433      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.42904     -0.10929 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00018      0.00000      0.00000     -0.00329     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.01167     -0.00000      0.00000      1.01972     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00018      0.00000     -0.00000     -0.00329     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.01167     -0.00000     -0.00000      0.00000     -0.00000     -1.01972      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00018      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00329     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.01167      0.00000     -0.00000      0.00000      1.01972     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Zr\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.40961     -1.09988      0.00000      0.00000      0.00000      2.51681      0.00000      0.00000      0.00000     -0.96281      0.00000      0.00000     -0.96281      0.00000     -0.96281     -0.07733      0.00000      0.00000      0.00000      0.11695      0.00000      0.00000      0.11695      0.00000      0.11695     -0.24455      0.00000      0.00000      0.00000 \n    -1.09988      2.98362      0.00000      0.00000      0.00000     -7.15115      0.00000      0.00000      0.00000      2.64766      0.00000      0.00000      2.64766      0.00000      2.64766      0.29364      0.00000      0.00000      0.00000     -0.33488      0.00000      0.00000     -0.33488      0.00000     -0.33488      0.66054      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.47112      0.00000      0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22330      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06055      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.47112      0.00000      0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22330      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06055      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.47112      0.00000      0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22330      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06055 \n     2.51681     -7.15115      0.00000      0.00000      0.00000     19.82224      0.00000      0.00000      0.00000     -6.44978      0.00000      0.00000     -6.44978      0.00000     -6.44978     -1.66295      0.00000      0.00000      0.00000      0.86883      0.00000      0.00000      0.86883      0.00000      0.86883     -1.51752      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      2.65735      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15236      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      2.65735      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15236      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      2.65735      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15236 \n    -0.96281      2.64766      0.00000      0.00000      0.00000     -6.44978      0.00000      0.00000      0.00000      4.34832      0.00000      0.00000      1.35650      0.00000      1.35650      0.27472      0.00000      0.00000      0.00000     -0.25744      0.00000      0.00000     -0.31239      0.00000     -0.31239      0.58588      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.98364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.98364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.96281      2.64766      0.00000      0.00000      0.00000     -6.44978      0.00000      0.00000      0.00000      1.35650      0.00000      0.00000      4.34832      0.00000      1.35651      0.27472      0.00000      0.00000      0.00000     -0.31240      0.00000      0.00000     -0.25745      0.00000     -0.31240      0.58588      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.98364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.96281      2.64766      0.00000      0.00000      0.00000     -6.44978      0.00000      0.00000      0.00000      1.35650      0.00000      0.00000      1.35651      0.00000      4.34832      0.27472      0.00000      0.00000      0.00000     -0.31239      0.00000      0.00000     -0.31239      0.00000     -0.25745      0.58588      0.00000      0.00000      0.00000 \n    -0.07733      0.29364      0.00000      0.00000      0.00000     -1.66295      0.00000      0.00000      0.00000      0.27472      0.00000      0.00000      0.27472      0.00000      0.27472      3.31194      0.00000      0.00000      0.00000     -0.34193      0.00000      0.00000     -0.34193      0.00000     -0.34193     -0.79265      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.22330      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.99563      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.22330      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.99563      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.22330      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.99563      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912 \n     0.11695     -0.33488      0.00000      0.00000      0.00000      0.86883      0.00000      0.00000      0.00000     -0.25744      0.00000      0.00000     -0.31240      0.00000     -0.31239     -0.34193      0.00000      0.00000      0.00000      2.35029      0.00000      0.00000      1.74527      0.00000      1.74527     -2.31099      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.21005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.21005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.11695     -0.33488      0.00000      0.00000      0.00000      0.86883      0.00000      0.00000      0.00000     -0.31239      0.00000      0.00000     -0.25745      0.00000     -0.31239     -0.34193      0.00000      0.00000      0.00000      1.74527      0.00000      0.00000      2.35029      0.00000      1.74526     -2.31099      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.21005      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.11695     -0.33488      0.00000      0.00000      0.00000      0.86883      0.00000      0.00000      0.00000     -0.31239      0.00000      0.00000     -0.31240      0.00000     -0.25745     -0.34193      0.00000      0.00000      0.00000      1.74527      0.00000      0.00000      1.74526      0.00000      2.35029     -2.31099      0.00000      0.00000      0.00000 \n    -0.24455      0.66054      0.00000      0.00000      0.00000     -1.51752      0.00000      0.00000      0.00000      0.58588      0.00000      0.00000      0.58588      0.00000      0.58588     -0.79265      0.00000      0.00000      0.00000     -2.31099      0.00000      0.00000     -2.31099      0.00000     -2.31099      3.24734      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.06055      0.00000      0.00000      0.00000     -0.15236      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01976      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.06055      0.00000      0.00000      0.00000     -0.15236      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01976      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.06055      0.00000      0.00000      0.00000     -0.15236      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01976 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.40050      0.40050      0.40050      0.40050      0.40050      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99547      0.00041      0.00041      0.00041      0.00041      0.00041      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -632.83490    -85.70121    -79.61686    -79.61686    -79.61686    -13.70424    -11.23626    -11.23626    -11.23626     -5.81456     -5.81456     -5.81456     -5.81456     -5.81456     -1.90607     -1.20926     -1.20926     -1.20926     -0.09848     -0.01845     -0.01845     -0.01845     -0.01845     -0.01845      0.23507      0.23507      0.23507      0.71468    123.37530 \n   </alphaeps>\n   <betaeps>\n  -632.83510    -85.70090    -79.61668    -79.61668    -79.61668    -13.70390    -11.23586    -11.23586    -11.23586     -5.81408     -5.81408     -5.81408     -5.81408     -5.81408     -1.89132     -1.18988     -1.18988     -1.18988     -0.05892      0.02532      0.02532      0.02532      0.02532      0.02532      0.27506      0.27506      0.27506      0.73514    123.37680 \n   </betaeps>\n   <alphavectors>\n     0.99473     -0.41817      0.00000      0.00000      0.00000     -0.18691      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.07051     -0.00000      0.00000     -0.00000     -0.02332      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.06640      0.53706 \n     0.01401      1.04226      0.00000      0.00000      0.00000      0.59070     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.22318      0.00000     -0.00000      0.00000      0.08110     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.15819     -0.16182 \n     0.00000      0.00000      0.00000      0.00000      0.99522      0.00000     -0.00000      0.00000      0.47040     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.15375     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.11190     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.99522      0.00000     -0.00000      0.00000      0.47040     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.15375     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.11190     -0.00000      0.00000 \n     0.00000      0.00000     -0.99522      0.00000      0.00000     -0.00000     -0.47040      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.15375     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.11190      0.00000      0.00000     -0.00000     -0.00000 \n    -0.03990     -1.89716      0.00000      0.00000      0.00000     -2.29382      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.97995     -0.00000      0.00000     -0.00000     -0.29495      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.16359    -34.86321 \n     0.00000      0.00000      0.00000      0.00000      0.01108     -0.00000      0.00000     -0.00000     -1.07157      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.42292      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.32561      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.01108      0.00000      0.00000     -0.00000     -1.07157      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.42292      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.32561      0.00000     -0.00000 \n     0.00000      0.00000     -0.01108      0.00000      0.00000      0.00000      1.07157     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.42292      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.32561     -0.00000     -0.00000      0.00000      0.00000 \n     0.01697      0.90133      0.00000      0.00000      0.00000      0.56192     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.41895      0.90588      0.20863      0.00000     -0.00000      0.00000      0.06988     -0.04407     -0.05995      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.17630     15.72002 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.72871     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.12888     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.72871      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.12888      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01697      0.90133      0.00000      0.00000      0.00000      0.56192     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.57504     -0.81577      0.20863      0.00000     -0.00000      0.00000      0.06988     -0.02988      0.06814      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.17630     15.72002 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.72871     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.12888      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.01697      0.90133      0.00000      0.00000      0.00000      0.56192     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.99399     -0.09012      0.20863      0.00000     -0.00000      0.00000      0.06988      0.07396     -0.00819      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.17630     15.72002 \n     0.00021     -0.06812      0.00000      0.00000      0.00000     -0.13887      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.12183     -0.00000      0.00000     -0.00000      0.61310     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.73882     -0.60624 \n     0.00000      0.00000      0.00000      0.00000      0.00007     -0.00000      0.00000     -0.00000     -0.08922     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.99063     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.83110      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00007      0.00000      0.00000     -0.00000     -0.08922     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.99063     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.83110     -0.00000      0.00000 \n     0.00000      0.00000     -0.00007      0.00000      0.00000      0.00000      0.08922      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.99063     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.83110      0.00000      0.00000     -0.00000     -0.00000 \n     0.00122     -0.07337      0.00000      0.00000      0.00000     -0.15122      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01403      0.03034      0.31285     -0.00000      0.00000     -0.00000     -0.89690      0.59248      0.80593     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      3.70943     -0.28713 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.05790     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73254      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05790     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73254      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00122     -0.07337      0.00000      0.00000      0.00000     -0.15122      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01926     -0.02732      0.31285     -0.00000      0.00000     -0.00000     -0.89690      0.40172     -0.91607     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      3.70943     -0.28713 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.05790      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73254     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00122     -0.07337      0.00000      0.00000      0.00000     -0.15122      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.03329     -0.00302      0.31285     -0.00000      0.00000     -0.00000     -0.89690     -0.99420      0.11014     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      3.70943     -0.28713 \n    -0.00294      0.19212      0.00000      0.00000      0.00000      0.39350     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.76185      0.00000     -0.00000      0.00000      0.85377     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -8.88404      0.84206 \n     0.00000      0.00000      0.00000      0.00000     -0.00018      0.00000     -0.00000      0.00000      0.03423      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.09944      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.22178      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00018      0.00000     -0.00000      0.00000      0.03423      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.09944      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.22178      0.00000      0.00000 \n     0.00000      0.00000      0.00018      0.00000      0.00000     -0.00000     -0.03423     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.09944      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.22178     -0.00000     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99473     -0.41817     -0.00000     -0.00000     -0.00000     -0.18691      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.07090     -0.00000     -0.00000      0.00000     -0.02219     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.06636     -0.53706 \n     0.01401      1.04226     -0.00000     -0.00000     -0.00000      0.59071     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.22424      0.00000      0.00000     -0.00000      0.07813     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.15812      0.16182 \n     0.00000      0.00000     -0.00000     -0.00000      0.99522      0.00000     -0.00000     -0.47042     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.15486      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.11029      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.99522     -0.00000     -0.00000      0.00000     -0.00000      0.47042      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.15486     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.11029     -0.00000     -0.00000 \n     0.00000      0.00000      0.99522     -0.00000     -0.00000     -0.00000     -0.47042     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.15486      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.11029     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.03990     -1.89713      0.00000      0.00000      0.00000     -2.29388      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.98679     -0.00000     -0.00000      0.00000     -0.27665      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.16178     34.86322 \n     0.00000      0.00000     -0.00000     -0.00000      0.01107     -0.00000      0.00000      1.07161      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.42618     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.32118     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.01107      0.00000      0.00000     -0.00000      0.00000     -1.07161     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.42618      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.32118      0.00000      0.00000 \n    -0.00000     -0.00000      0.01107      0.00000      0.00000      0.00000      1.07161      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.42618     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.32118      0.00000      0.00000      0.00000     -0.00000 \n     0.01697      0.90131     -0.00000     -0.00000     -0.00000      0.56194     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.56441      0.82318     -0.20989      0.00000      0.00000     -0.00000      0.06686     -0.00000     -0.00000     -0.00000     -0.04515     -0.05882     -0.00000     -0.00000     -0.00000      0.17583    -15.72002 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.72874     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.12843     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.72874     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.12843      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.01697      0.90131     -0.00000     -0.00000     -0.00000      0.56194     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.43069     -0.90038     -0.20989      0.00000      0.00000     -0.00000      0.06686     -0.00000     -0.00000     -0.00000     -0.02836      0.06851     -0.00000     -0.00000     -0.00000      0.17583    -15.72002 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.72874     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.12843     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.01697      0.90131     -0.00000     -0.00000     -0.00000      0.56194     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.99510      0.07720     -0.20989      0.00000      0.00000     -0.00000      0.06686     -0.00000     -0.00000     -0.00000      0.07351     -0.00969     -0.00000     -0.00000     -0.00000      0.17583    -15.72002 \n     0.00021     -0.06811     -0.00000     -0.00000     -0.00000     -0.13880      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.12809      0.00000      0.00000     -0.00000      0.59896      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.74088      0.60624 \n     0.00000      0.00000     -0.00000     -0.00000      0.00007     -0.00000      0.00000      0.08911     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.99919      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.82080      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00007      0.00000     -0.00000      0.00000     -0.00000     -0.08911      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.99919     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.82080     -0.00000     -0.00000 \n     0.00000      0.00000      0.00007     -0.00000     -0.00000      0.00000      0.08911     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.99919      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.82080      0.00000     -0.00000     -0.00000      0.00000 \n     0.00122     -0.07337     -0.00000     -0.00000     -0.00000     -0.15124      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.01876      0.02736     -0.32483      0.00000      0.00000     -0.00000     -0.94161      0.00000     -0.00000     -0.00000      0.60911      0.79345      0.00000      0.00000      0.00000      3.69731      0.28705 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05745      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73256      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.05745      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73256     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00122     -0.07337     -0.00000     -0.00000     -0.00000     -0.15124      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.01431     -0.02992     -0.32483      0.00000      0.00000     -0.00000     -0.94161      0.00000     -0.00000     -0.00000      0.38259     -0.92423      0.00000      0.00000      0.00000      3.69731      0.28705 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05745      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73256      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00122     -0.07337     -0.00000     -0.00000     -0.00000     -0.15124      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.03307      0.00257     -0.32483      0.00000      0.00000     -0.00000     -0.94161      0.00000     -0.00000     -0.00000     -0.99171      0.13078      0.00000      0.00000      0.00000      3.69731      0.28705 \n    -0.00294      0.19212      0.00000      0.00000      0.00000      0.39351     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.79692     -0.00000     -0.00000      0.00000      0.96103     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -8.87001     -0.84187 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00018     -0.00000      0.00000     -0.03419     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.08678     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.22275     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00018     -0.00000     -0.00000      0.00000     -0.00000      0.03419      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.08678      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.22275      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00018      0.00000      0.00000     -0.00000     -0.03419     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.08678     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.22275      0.00000      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Nb\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.41362     -1.10809      0.00000      0.00000      0.00000      2.56895      0.00000      0.00000      0.00000     -0.97773      0.00000      0.00000     -0.97773      0.00000     -0.97773     -0.03182      0.00000      0.00000      0.00000     -0.04412      0.00000      0.00000     -0.04412      0.00000     -0.04412      0.07927      0.00000      0.00000      0.00000 \n    -1.10809      3.00137      0.00000      0.00000      0.00000     -7.30629      0.00000      0.00000      0.00000      2.69241      0.00000      0.00000      2.69241      0.00000      2.69241      0.17724      0.00000      0.00000      0.00000      0.11365      0.00000      0.00000      0.11365      0.00000      0.11365     -0.22776      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.49383      0.00000      0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05255      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.49383      0.00000      0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05255      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.49383      0.00000      0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05255 \n     2.56895     -7.30629      0.00000      0.00000      0.00000     20.52492      0.00000      0.00000      0.00000     -6.66929      0.00000      0.00000     -6.66929      0.00000     -6.66929     -1.33077      0.00000      0.00000      0.00000     -0.26592      0.00000      0.00000     -0.26592      0.00000     -0.26592      0.80296      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      2.72628      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13663      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      2.72628      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13663      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      2.72628      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13663 \n    -0.97773      2.69241      0.00000      0.00000      0.00000     -6.66929      0.00000      0.00000      0.00000      4.40117      0.00000      0.00000      1.42995      0.00000      1.42996      0.17181      0.00000      0.00000      0.00000      0.12127      0.00000      0.00000      0.09532      0.00000      0.09532     -0.21032      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.94243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.94243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.97773      2.69241      0.00000      0.00000      0.00000     -6.66929      0.00000      0.00000      0.00000      1.42995      0.00000      0.00000      4.40116      0.00000      1.42995      0.17181      0.00000      0.00000      0.00000      0.09533      0.00000      0.00000      0.12127      0.00000      0.09532     -0.21032      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.94243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.97773      2.69241      0.00000      0.00000      0.00000     -6.66929      0.00000      0.00000      0.00000      1.42996      0.00000      0.00000      1.42995      0.00000      4.40117      0.17181      0.00000      0.00000      0.00000      0.09531      0.00000      0.00000      0.09531      0.00000      0.12127     -0.21032      0.00000      0.00000      0.00000 \n    -0.03182      0.17724      0.00000      0.00000      0.00000     -1.33077      0.00000      0.00000      0.00000      0.17181      0.00000      0.00000      0.17181      0.00000      0.17181      3.46111      0.00000      0.00000      0.00000     -0.32967      0.00000      0.00000     -0.32967      0.00000     -0.32967     -0.42542      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.25500      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.03222      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.25500      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.03222      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.25500      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.03222      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976 \n    -0.04412      0.11365      0.00000      0.00000      0.00000     -0.26592      0.00000      0.00000      0.00000      0.12127      0.00000      0.00000      0.09533      0.00000      0.09531     -0.32967      0.00000      0.00000      0.00000      0.70960      0.00000      0.00000     -0.27263      0.00000     -0.27263     -0.16119      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.96448      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.96448      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04412      0.11365      0.00000      0.00000      0.00000     -0.26592      0.00000      0.00000      0.00000      0.09532      0.00000      0.00000      0.12127      0.00000      0.09531     -0.32967      0.00000      0.00000      0.00000     -0.27263      0.00000      0.00000      0.70960      0.00000     -0.27263     -0.16119      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.96448      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04412      0.11365      0.00000      0.00000      0.00000     -0.26592      0.00000      0.00000      0.00000      0.09532      0.00000      0.00000      0.09532      0.00000      0.12127     -0.32967      0.00000      0.00000      0.00000     -0.27263      0.00000      0.00000     -0.27263      0.00000      0.70961     -0.16119      0.00000      0.00000      0.00000 \n     0.07927     -0.22776      0.00000      0.00000      0.00000      0.80296      0.00000      0.00000      0.00000     -0.21032      0.00000      0.00000     -0.21032      0.00000     -0.21032     -0.42542      0.00000      0.00000      0.00000     -0.16119      0.00000      0.00000     -0.16119      0.00000     -0.16119      2.48453      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.05255      0.00000      0.00000      0.00000     -0.13663      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02512      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05255      0.00000      0.00000      0.00000     -0.13663      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02512      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05255      0.00000      0.00000      0.00000     -0.13663      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02512 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99989      0.63965      0.63965      0.63965      0.63965      0.63965      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.80186      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -667.08170    -91.27053    -85.00090    -85.00090    -85.00090    -14.84636    -12.29265    -12.29265    -12.29265     -6.66692     -6.66692     -6.66692     -6.66692     -6.66692     -1.96720     -1.22651     -1.22651     -1.22651     -0.06935     -0.02219     -0.02219     -0.02219     -0.02219     -0.02219      0.12515      0.12515      0.12515      0.90024    133.83860 \n   </alphaeps>\n   <betaeps>\n  -667.08150    -91.26587    -84.99727    -84.99727    -84.99727    -14.84051    -12.28646    -12.28646    -12.28646     -6.65985     -6.65985     -6.65985     -6.65985     -6.65985     -1.90600     -1.15993     -1.15993     -1.15993     -0.02913      0.06015      0.06015      0.06015      0.06015      0.06015      0.16595      0.16595      0.16595      0.95664    133.85060 \n   </betaeps>\n   <alphavectors>\n     0.99484     -0.41872     -0.00000     -0.00000     -0.00000     -0.19010     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.07140     -0.00000      0.00000      0.00000     -0.02422      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05684     -0.54726 \n     0.01382      1.04051      0.00000      0.00000      0.00000      0.59884      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.23190      0.00000     -0.00000     -0.00000      0.07713     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.19006      0.18248 \n     0.00000      0.00000      0.00000     -0.99571      0.00000      0.00000      0.47906     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.16096     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.07655      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.99571      0.00000      0.00000      0.00000      0.00000      0.47906      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.16096     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.07655     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.99571      0.00000     -0.00000      0.00000      0.47906      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.16096     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.07655     -0.00000     -0.00000 \n    -0.04245     -1.91656     -0.00000     -0.00000     -0.00000     -2.35098     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.97797     -0.00000      0.00000      0.00000     -0.34005      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.83783     35.02372 \n     0.00000     -0.00000     -0.00000     -0.00978     -0.00000     -0.00000     -1.08065      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.44133      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.21441     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00978     -0.00000     -0.00000     -0.00000     -0.00000     -1.08065     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.44133      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.21441      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00978     -0.00000      0.00000     -0.00000     -1.08065     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.44133      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.21441      0.00000      0.00000 \n     0.01821      0.90721      0.00000      0.00000      0.00000      0.57888      0.00000     -0.00000      0.00000     -0.85698      0.00000     -0.00000      0.00000      0.49477     -0.21720      0.00000     -0.00000     -0.00000      0.07203     -0.09281      0.00000     -0.16076      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.18849    -15.78758 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.71395     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.32151     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.71395      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.32151      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.01821      0.90721      0.00000      0.00000      0.00000      0.57888      0.00000     -0.00000      0.00000      0.85697      0.00000     -0.00000      0.00000      0.49478     -0.21720      0.00000     -0.00000     -0.00000      0.07203     -0.09281      0.00000      0.16076      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.18849    -15.78758 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.71395      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.32151      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.01821      0.90721      0.00000      0.00000      0.00000      0.57888      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.98955     -0.21720      0.00000     -0.00000     -0.00000      0.07203      0.18563     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.18849    -15.78758 \n     0.00040     -0.10176     -0.00000     -0.00000     -0.00000     -0.20183     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.22478      0.00000     -0.00000     -0.00000      0.44162     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.31624      0.82800 \n     0.00000      0.00000      0.00000     -0.00035      0.00000     -0.00000     -0.07280     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.00398     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.59376      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00035      0.00000      0.00000      0.00000      0.00000     -0.07280      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.00398     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.59376      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00035     -0.00000      0.00000      0.00000     -0.07280     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.00398     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.59376      0.00000     -0.00000 \n    -0.00036      0.03816      0.00000      0.00000      0.00000      0.07469      0.00000     -0.00000     -0.00000     -0.06017      0.00000     -0.00000      0.00000      0.03474      0.12562     -0.00000      0.00000      0.00000      0.02962      0.50220     -0.00000      0.86984     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.69540     -0.23129 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.12035      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73969      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.12035     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.73969      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00036      0.03816      0.00000      0.00000      0.00000      0.07469      0.00000     -0.00000     -0.00000      0.06017      0.00000     -0.00000      0.00000      0.03474      0.12562     -0.00000      0.00000      0.00000      0.02962      0.50220     -0.00000     -0.86984     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.69540     -0.23129 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.12035     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.73969      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00036      0.03816      0.00000      0.00000      0.00000      0.07469      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06948      0.12562     -0.00000      0.00000      0.00000      0.02962     -1.00441      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.69540     -0.23129 \n     0.00041     -0.03321     -0.00000     -0.00000     -0.00000     -0.06570     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.15541      0.00000     -0.00000     -0.00000     -1.13442      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      2.03643      0.16570 \n     0.00000     -0.00000     -0.00000      0.00017     -0.00000     -0.00000      0.01806      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.11320      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.09516     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00017      0.00000      0.00000      0.00000      0.00000      0.01806     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.11320      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.09516     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00017     -0.00000     -0.00000      0.00000      0.01806      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.11320      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.09516     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99484      0.41873      0.00000     -0.00000     -0.00000     -0.19013      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.07190     -0.00000      0.00000      0.00000      0.02243     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.05689      0.54725 \n     0.01382     -1.04053     -0.00000      0.00000      0.00000      0.59892     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.23351      0.00000     -0.00000     -0.00000     -0.07113      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.19009     -0.18245 \n     0.00000     -0.00000     -0.00000     -0.99573      0.00000     -0.00000     -0.47913      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.16107     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.07573      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.99573      0.00000      0.00000      0.00000     -0.00000     -0.47913     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.16107     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.07573      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.99573     -0.00000      0.00000     -0.00000      0.47913      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.16107      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.07573     -0.00000     -0.00000 \n    -0.04244      1.91638      0.00000     -0.00000     -0.00000     -2.35133      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.98438     -0.00000      0.00000      0.00000      0.31327     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.83613    -35.02382 \n     0.00000      0.00000      0.00000     -0.00975     -0.00000      0.00000      1.08090     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.44178      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.21219     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00975     -0.00000     -0.00000     -0.00000      0.00000      1.08090      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.44178      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.21219     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00975      0.00000     -0.00000      0.00000     -1.08090     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.44178     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21219      0.00000      0.00000 \n     0.01821     -0.90711     -0.00000      0.00000      0.00000      0.57893     -0.00000      0.00000      0.00000      0.85713      0.00000     -0.00000     -0.00000     -0.49486     -0.21842      0.00000     -0.00000     -0.00000     -0.06589      0.00000      0.00000      0.00000     -0.15993      0.09233      0.00000      0.00000     -0.00000      0.18751     15.78761 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.71426      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.31985      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.71426     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.31985      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.01821     -0.90711     -0.00000      0.00000      0.00000      0.57893     -0.00000      0.00000      0.00000     -0.85713      0.00000     -0.00000     -0.00000     -0.49486     -0.21842      0.00000     -0.00000     -0.00000     -0.06589      0.00000      0.00000      0.00000      0.15993      0.09233      0.00000      0.00000     -0.00000      0.18751     15.78761 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.71426     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.31985      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.01821     -0.90711     -0.00000      0.00000      0.00000      0.57893     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.98973     -0.21842      0.00000     -0.00000     -0.00000     -0.06589      0.00000      0.00000      0.00000      0.00000     -0.18467      0.00000      0.00000     -0.00000      0.18751     15.78761 \n     0.00040      0.10174      0.00000     -0.00000     -0.00000     -0.20116      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.24556     -0.00000      0.00000      0.00000     -0.37488     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      2.31705     -0.82782 \n     0.00000     -0.00000     -0.00000     -0.00035      0.00000      0.00000      0.07221      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.00684     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.58898      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00035      0.00000      0.00000      0.00000     -0.00000      0.07221     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.00684     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.58898      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00035      0.00000     -0.00000      0.00000     -0.07221     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.00684      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.58898      0.00000      0.00000 \n    -0.00036     -0.03816     -0.00000      0.00000      0.00000      0.07452     -0.00000      0.00000      0.00000      0.05933      0.00000     -0.00000     -0.00000     -0.03426      0.13956      0.00000     -0.00000     -0.00000     -0.07576      0.00000      0.00000      0.00000      0.86990     -0.50224      0.00000      0.00000     -0.00000     -1.69289      0.23118 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.11866     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.73980     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.11866      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73980      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00036     -0.03816     -0.00000      0.00000      0.00000      0.07452     -0.00000      0.00000      0.00000     -0.05933      0.00000     -0.00000     -0.00000     -0.03426      0.13956      0.00000     -0.00000     -0.00000     -0.07576      0.00000      0.00000      0.00000     -0.86990     -0.50224      0.00000      0.00000     -0.00000     -1.69289      0.23118 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.11866      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73980      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00036     -0.03816     -0.00000      0.00000      0.00000      0.07452     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06851      0.13956      0.00000     -0.00000     -0.00000     -0.07576      0.00000      0.00000      0.00000     -0.00000      1.00447      0.00000      0.00000     -0.00000     -1.69289      0.23118 \n     0.00041      0.03321      0.00000     -0.00000     -0.00000     -0.06562      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.16820     -0.00000      0.00000     -0.00000      1.18946      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      2.00376     -0.16559 \n     0.00000      0.00000      0.00000      0.00017     -0.00000     -0.00000     -0.01799     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.10798      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.09568      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00017      0.00000      0.00000      0.00000     -0.00000     -0.01799     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.10798      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.09568     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00017      0.00000     -0.00000      0.00000      0.01799      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.10798     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.09568     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mo\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.41730     -1.11668      0.00000      0.00000      0.00000      2.58565      0.00000      0.00000      0.00000     -0.98118      0.00000      0.00000     -0.98118      0.00000     -0.98118     -0.02475      0.00000      0.00000      0.00000     -0.04595      0.00000      0.00000     -0.04595      0.00000     -0.04595      0.07298      0.00000      0.00000      0.00000 \n    -1.11668      3.02519      0.00000      0.00000      0.00000     -7.39785      0.00000      0.00000      0.00000      2.71847      0.00000      0.00000      2.71847      0.00000      2.71847      0.16356      0.00000      0.00000      0.00000      0.11928      0.00000      0.00000      0.11928      0.00000      0.11928     -0.21411      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.51593      0.00000      0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.27344      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05326      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.51593      0.00000      0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.27344      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05326      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.51593      0.00000      0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.27344      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05326 \n     2.58565     -7.39785      0.00000      0.00000      0.00000     20.91168      0.00000      0.00000      0.00000     -6.77910      0.00000      0.00000     -6.77910      0.00000     -6.77910     -1.34249      0.00000      0.00000      0.00000     -0.28487      0.00000      0.00000     -0.28487      0.00000     -0.28487      0.78862      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      2.77180      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13888      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      2.77180      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13888      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      2.77180      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13888 \n    -0.98118      2.71847      0.00000      0.00000      0.00000     -6.77910      0.00000      0.00000      0.00000      4.43646      0.00000      0.00000      1.45565      0.00000      1.45566      0.16690      0.00000      0.00000      0.00000      0.07160      0.00000      0.00000      0.12789      0.00000      0.12788     -0.19957      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.96159      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.96159      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.98118      2.71847      0.00000      0.00000      0.00000     -6.77910      0.00000      0.00000      0.00000      1.45565      0.00000      0.00000      4.43645      0.00000      1.45565      0.16690      0.00000      0.00000      0.00000      0.12788      0.00000      0.00000      0.07160      0.00000      0.12787     -0.19957      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.96159      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.98118      2.71847      0.00000      0.00000      0.00000     -6.77910      0.00000      0.00000      0.00000      1.45566      0.00000      0.00000      1.45565      0.00000      4.43645      0.16690      0.00000      0.00000      0.00000      0.12788      0.00000      0.00000      0.12787      0.00000      0.07160     -0.19957      0.00000      0.00000      0.00000 \n    -0.02475      0.16356      0.00000      0.00000      0.00000     -1.34249      0.00000      0.00000      0.00000      0.16690      0.00000      0.00000      0.16690      0.00000      0.16690      3.55382      0.00000      0.00000      0.00000     -0.32022      0.00000      0.00000     -0.32022      0.00000     -0.32022     -0.51507      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.27344      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.05557      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.27344      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.05557      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.27344      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.05557      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681 \n    -0.04595      0.11928      0.00000      0.00000      0.00000     -0.28487      0.00000      0.00000      0.00000      0.07160      0.00000      0.00000      0.12788      0.00000      0.12788     -0.32022      0.00000      0.00000      0.00000      0.89784      0.00000      0.00000     -0.38003      0.00000     -0.38002     -0.09999      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.55572      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.55572      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04595      0.11928      0.00000      0.00000      0.00000     -0.28487      0.00000      0.00000      0.00000      0.12789      0.00000      0.00000      0.07160      0.00000      0.12787     -0.32022      0.00000      0.00000      0.00000     -0.38003      0.00000      0.00000      0.89784      0.00000     -0.38003     -0.09999      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.55572      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04595      0.11928      0.00000      0.00000      0.00000     -0.28487      0.00000      0.00000      0.00000      0.12788      0.00000      0.00000      0.12787      0.00000      0.07160     -0.32022      0.00000      0.00000      0.00000     -0.38002      0.00000      0.00000     -0.38003      0.00000      0.89784     -0.09999      0.00000      0.00000      0.00000 \n     0.07298     -0.21411      0.00000      0.00000      0.00000      0.78862      0.00000      0.00000      0.00000     -0.19957      0.00000      0.00000     -0.19957      0.00000     -0.19957     -0.51507      0.00000      0.00000      0.00000     -0.09999      0.00000      0.00000     -0.09999      0.00000     -0.09999      2.34799      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.05326      0.00000      0.00000      0.00000     -0.13888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02618      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05326      0.00000      0.00000      0.00000     -0.13888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02618      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05326      0.00000      0.00000      0.00000     -0.13888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02618 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99996      0.82834      0.82834      0.82834      0.82834      0.82834      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.85832      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -702.26820    -97.04339    -90.56350    -90.56350    -90.56350    -16.09375    -13.45394    -13.45394    -13.45394     -7.59555     -7.59555     -7.59555     -7.59555     -7.59555     -2.13062     -1.33787     -1.33787     -1.33787     -0.06124     -0.01848     -0.01848     -0.01848     -0.01848     -0.01848      0.14037      0.14037      0.14037      1.09337    144.03570 \n   </alphaeps>\n   <betaeps>\n  -702.26800    -97.03485    -90.55680    -90.55680    -90.55680    -16.08327    -13.44298    -13.44298    -13.44298     -7.58298     -7.58298     -7.58298     -7.58298     -7.58298     -2.03828     -1.24078     -1.24078     -1.24078     -0.02025      0.09084      0.09084      0.09084      0.09084      0.09084      0.18242      0.18242      0.18242      1.16623    144.05630 \n   </betaeps>\n   <alphavectors>\n     0.99506     -0.41879     -0.00000      0.00000      0.00000      0.19222      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07461     -0.00000      0.00000      0.00000      0.02520      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.06335      0.55568 \n     0.01345      1.03884     -0.00000      0.00000      0.00000     -0.60655      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.24323      0.00000      0.00000     -0.00000     -0.08073     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.21232     -0.19707 \n     0.00000     -0.00000     -0.00000     -0.99641      0.00000     -0.00000     -0.48663      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.16828      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.07654      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.99641      0.00000      0.00000     -0.00000      0.00000     -0.48663      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.16828     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.07654     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.99641      0.00000     -0.00000     -0.00000      0.48663     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.16828     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.07654     -0.00000      0.00000      0.00000 \n    -0.04750     -1.90629      0.00000     -0.00000     -0.00000      2.37557     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.02977     -0.00000     -0.00000      0.00000      0.35622      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.96009    -35.03829 \n    -0.00000      0.00000      0.00000     -0.00805     -0.00000      0.00000      1.08446     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.45795     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.21274     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00805     -0.00000     -0.00000      0.00000     -0.00000      1.08446     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.45795      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.21274      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00805     -0.00000      0.00000      0.00000     -1.08446      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.45795      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.21274      0.00000     -0.00000     -0.00000 \n     0.02053      0.90372     -0.00000      0.00000      0.00000     -0.59064      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.27756     -0.94695     -0.23136      0.00000      0.00000     -0.00000     -0.07659     -0.00000      0.00000     -0.00000      0.12424      0.17841      0.00000     -0.00000      0.00000      0.21857     15.80109 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.70917      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.37656     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.70917      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.37656      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.02053      0.90372     -0.00000      0.00000      0.00000     -0.59064      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.68130      0.71385     -0.23136      0.00000      0.00000     -0.00000     -0.07659     -0.00000      0.00000     -0.00000      0.09239     -0.19680      0.00000     -0.00000      0.00000      0.21857     15.80109 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.70917     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.37656     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.02053      0.90372     -0.00000      0.00000      0.00000     -0.59064      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.95886      0.23310     -0.23136      0.00000      0.00000     -0.00000     -0.07659     -0.00000      0.00000     -0.00000     -0.21663      0.01839      0.00000     -0.00000      0.00000      0.21857     15.80109 \n     0.00037     -0.11125     -0.00000      0.00000      0.00000      0.22614      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.23338      0.00000      0.00000     -0.00000     -0.45096     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      2.66552     -0.85239 \n     0.00000     -0.00000     -0.00000     -0.00084      0.00000     -0.00000      0.07056      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.01127      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.56784      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00084      0.00000      0.00000     -0.00000      0.00000      0.07056      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.01127     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.56784     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00084      0.00000     -0.00000     -0.00000     -0.07056     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.01127     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.56784     -0.00000      0.00000     -0.00000 \n    -0.00035      0.03836      0.00000     -0.00000     -0.00000     -0.07747     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.02069     -0.07060      0.11178     -0.00000     -0.00000      0.00000     -0.00684      0.00000     -0.00000      0.00000     -0.57590     -0.82701     -0.00000      0.00000     -0.00000     -1.66408      0.21216 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12743     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.74551      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.12743     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.74551      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00035      0.03836      0.00000     -0.00000     -0.00000     -0.07747     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.05080      0.05322      0.11178     -0.00000     -0.00000      0.00000     -0.00684      0.00000     -0.00000      0.00000     -0.42826      0.91225     -0.00000      0.00000     -0.00000     -1.66408      0.21216 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.12743      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.74551      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00035      0.03836      0.00000     -0.00000     -0.00000     -0.07747     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.07149      0.01738      0.11178     -0.00000     -0.00000      0.00000     -0.00684      0.00000     -0.00000      0.00000      1.00416     -0.08524     -0.00000      0.00000     -0.00000     -1.66408      0.21216 \n     0.00033     -0.02515     -0.00000      0.00000      0.00000      0.05172      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12024      0.00000      0.00000     -0.00000      1.09376     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.61711     -0.10052 \n     0.00000     -0.00000     -0.00000      0.00031      0.00000     -0.00000     -0.01629      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.11340     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.08349      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00031     -0.00000     -0.00000      0.00000     -0.00000     -0.01629     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.11340     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.08349     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00031      0.00000     -0.00000     -0.00000      0.01629     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.11340      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.08349      0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99506      0.41881     -0.00000     -0.00000     -0.00000      0.19226     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.07513     -0.00000      0.00000      0.00000      0.02328      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06339      0.55566 \n    -0.01345     -1.03887      0.00000      0.00000      0.00000     -0.60671     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.24490     -0.00000     -0.00000     -0.00000     -0.07425     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.21226     -0.19702 \n     0.00000      0.00000     -0.00000      0.99643      0.00000      0.00000      0.48673     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.16791     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.07641      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.99643      0.00000      0.00000      0.00000     -0.00000      0.48673      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.16791      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.07641      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.99643      0.00000      0.00000     -0.00000      0.48673      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.16791      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.07641      0.00000      0.00000     -0.00000 \n     0.04750      1.90600     -0.00000     -0.00000     -0.00000      2.37610      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.03569      0.00000      0.00000      0.00000      0.32603      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.95695    -35.03848 \n     0.00000      0.00000     -0.00000      0.00800     -0.00000     -0.00000     -1.08485      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.45717      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.21243     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00800     -0.00000     -0.00000     -0.00000      0.00000     -1.08485     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.45717     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.21243     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00800     -0.00000     -0.00000      0.00000     -1.08485     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.45717     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21243     -0.00000      0.00000     -0.00000 \n    -0.02052     -0.90357      0.00000      0.00000      0.00000     -0.59070     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.28737      0.94431     -0.23226     -0.00000     -0.00000     -0.00000     -0.06948     -0.00000     -0.00000      0.00000     -0.18427      0.11301     -0.00000      0.00000     -0.00000      0.21703     15.80113 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.70964      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.37440     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.70964     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.37440      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.02052     -0.90357      0.00000      0.00000      0.00000     -0.59070     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.67411     -0.72102     -0.23226     -0.00000     -0.00000     -0.00000     -0.06948     -0.00000     -0.00000      0.00000     -0.00574     -0.21608     -0.00000      0.00000     -0.00000      0.21703     15.80113 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.70964      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.37440     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.02052     -0.90357      0.00000      0.00000      0.00000     -0.59070     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.96148     -0.22328     -0.23226     -0.00000     -0.00000     -0.00000     -0.06948     -0.00000     -0.00000      0.00000      0.19000      0.10307     -0.00000      0.00000     -0.00000      0.21703     15.80113 \n    -0.00037      0.11121     -0.00000     -0.00000     -0.00000      0.22500      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.25801      0.00000      0.00000      0.00000     -0.37412      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      2.66610     -0.85207 \n    -0.00000     -0.00000      0.00000      0.00085      0.00000     -0.00000     -0.06968     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.01147     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.56759      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00085      0.00000      0.00000     -0.00000     -0.00000     -0.06968      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.01147      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.56759      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00085     -0.00000      0.00000      0.00000     -0.06968      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.01147      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.56759      0.00000     -0.00000      0.00000 \n     0.00035     -0.03835      0.00000      0.00000      0.00000     -0.07719     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.02105      0.06917      0.12657     -0.00000     -0.00000     -0.00000     -0.05359     -0.00000     -0.00000     -0.00000      0.85916     -0.52692     -0.00000      0.00000     -0.00000     -1.66220      0.21200 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.12523      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.74567     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.12523      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.74567      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00035     -0.03835      0.00000      0.00000      0.00000     -0.07719     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.04938     -0.05281      0.12657     -0.00000     -0.00000     -0.00000     -0.05359     -0.00000     -0.00000     -0.00000      0.02675      1.00751     -0.00000      0.00000     -0.00000     -1.66220      0.21200 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.12523     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.74567      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00035     -0.03835      0.00000      0.00000      0.00000     -0.07719     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.07043     -0.01635      0.12657     -0.00000     -0.00000     -0.00000     -0.05359     -0.00000     -0.00000     -0.00000     -0.88590     -0.48059     -0.00000      0.00000     -0.00000     -1.66220      0.21200 \n    -0.00033      0.02515     -0.00000     -0.00000     -0.00000      0.05161      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.13246      0.00000      0.00000      0.00000      1.13879      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.58476     -0.10040 \n    -0.00000      0.00000     -0.00000     -0.00031     -0.00000      0.00000      0.01619      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.11311      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.08352     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00031      0.00000      0.00000     -0.00000     -0.00000      0.01619      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.11311     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.08352     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00031     -0.00000     -0.00000      0.00000      0.01619      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.11311     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.08352      0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Tc\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.42136     -1.12591      0.00000      0.00000      0.00000      2.60984      0.00000      0.00000      0.00000     -0.98838      0.00000      0.00000     -0.98838      0.00000     -0.98838     -0.01611      0.00000      0.00000      0.00000     -0.04569      0.00000      0.00000     -0.04569      0.00000     -0.04569      0.06381      0.00000      0.00000      0.00000 \n    -1.12591      3.04927      0.00000      0.00000      0.00000     -7.50340      0.00000      0.00000      0.00000      2.75244      0.00000      0.00000      2.75244      0.00000      2.75244      0.14294      0.00000      0.00000      0.00000      0.11902      0.00000      0.00000      0.11902      0.00000      0.11902     -0.19267      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.53900      0.00000      0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.29546      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04917      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.53900      0.00000      0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.29546      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04917      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.53900      0.00000      0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.29546      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04917 \n     2.60984     -7.50340      0.00000      0.00000      0.00000     21.36404      0.00000      0.00000      0.00000     -6.92308      0.00000      0.00000     -6.92308      0.00000     -6.92308     -1.31695      0.00000      0.00000      0.00000     -0.28150      0.00000      0.00000     -0.28150      0.00000     -0.28150      0.75060      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      2.81885      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12802      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      2.81885      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12802      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      2.81885      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12802 \n    -0.98838      2.75244      0.00000      0.00000      0.00000     -6.92308      0.00000      0.00000      0.00000      4.49145      0.00000      0.00000      1.49322      0.00000      1.49322      0.15602      0.00000      0.00000      0.00000      0.00796      0.00000      0.00000      0.15977      0.00000      0.15977     -0.18474      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99646      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99646      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.98838      2.75244      0.00000      0.00000      0.00000     -6.92308      0.00000      0.00000      0.00000      1.49322      0.00000      0.00000      4.49146      0.00000      1.49321      0.15602      0.00000      0.00000      0.00000      0.15978      0.00000      0.00000      0.00795      0.00000      0.15979     -0.18474      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99646      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.98838      2.75244      0.00000      0.00000      0.00000     -6.92308      0.00000      0.00000      0.00000      1.49322      0.00000      0.00000      1.49321      0.00000      4.49144      0.15602      0.00000      0.00000      0.00000      0.15978      0.00000      0.00000      0.15978      0.00000      0.00795     -0.18474      0.00000      0.00000      0.00000 \n    -0.01611      0.14294      0.00000      0.00000      0.00000     -1.31695      0.00000      0.00000      0.00000      0.15602      0.00000      0.00000      0.15602      0.00000      0.15602      3.66518      0.00000      0.00000      0.00000     -0.34518      0.00000      0.00000     -0.34518      0.00000     -0.34518     -0.70803      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.29546      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11611      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.29546      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11611      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.29546      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11611      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633 \n    -0.04569      0.11902      0.00000      0.00000      0.00000     -0.28150      0.00000      0.00000      0.00000      0.00796      0.00000      0.00000      0.15978      0.00000      0.15978     -0.34518      0.00000      0.00000      0.00000      1.07762      0.00000      0.00000     -0.47595      0.00000     -0.47596      0.07992      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.10717      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.10717      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04569      0.11902      0.00000      0.00000      0.00000     -0.28150      0.00000      0.00000      0.00000      0.15977      0.00000      0.00000      0.00795      0.00000      0.15978     -0.34518      0.00000      0.00000      0.00000     -0.47595      0.00000      0.00000      1.07763      0.00000     -0.47596      0.07992      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.10717      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04569      0.11902      0.00000      0.00000      0.00000     -0.28150      0.00000      0.00000      0.00000      0.15977      0.00000      0.00000      0.15979      0.00000      0.00795     -0.34518      0.00000      0.00000      0.00000     -0.47596      0.00000      0.00000     -0.47596      0.00000      1.07763      0.07992      0.00000      0.00000      0.00000 \n     0.06381     -0.19267      0.00000      0.00000      0.00000      0.75060      0.00000      0.00000      0.00000     -0.18474      0.00000      0.00000     -0.18474      0.00000     -0.18474     -0.70803      0.00000      0.00000      0.00000      0.07992      0.00000      0.00000      0.07992      0.00000      0.07992      2.08730      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.04917      0.00000      0.00000      0.00000     -0.12802      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02292      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.04917      0.00000      0.00000      0.00000     -0.12802      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02292      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04917      0.00000      0.00000      0.00000     -0.12802      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02292 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00001      0.00001      0.00001      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -738.25200   -102.90250    -96.22477    -96.22477    -96.22477    -17.34534    -14.62937    -14.62937    -14.62937     -8.53741     -8.53741     -8.53741     -8.53741     -8.53741     -2.30645     -1.46538     -1.46538     -1.46538     -0.08970     -0.03217     -0.03217     -0.03217     -0.03217     -0.03217      0.09195      0.09195      0.09195      1.15159    155.05280 \n   </alphaeps>\n   <betaeps>\n  -738.25180   -102.88860    -96.21380    -96.21380    -96.21380    -17.32869    -14.61216    -14.61216    -14.61216     -8.51754     -8.51754     -8.51754     -8.51754     -8.51754     -2.18051     -1.33664     -1.33664     -1.33664     -0.05658      0.10468      0.10468      0.10468      0.10468      0.10468      0.12341      0.12341      0.12341      1.23895    155.08460 \n   </betaeps>\n   <alphavectors>\n    -0.99526     -0.41907     -0.00000      0.00000      0.00000      0.19473      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.07718      0.00000      0.00000      0.00000     -0.02519     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.06795      0.56399 \n    -0.01308      1.03714     -0.00000      0.00000      0.00000     -0.61526     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.25226     -0.00000     -0.00000     -0.00000      0.08140      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.22747     -0.21071 \n    -0.00000     -0.00000      0.99683      0.00000      0.00000     -0.00000     -0.00000      0.49492     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.17592      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06590      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99683     -0.00000     -0.00000      0.49492      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17592      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.06590     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.99683      0.00000      0.00000      0.00000      0.49492      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.17592      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.06590      0.00000     -0.00000 \n     0.05208     -1.90055      0.00000     -0.00000     -0.00000      2.40741      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.07110      0.00000      0.00000      0.00000     -0.36178      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.04419    -35.06293 \n     0.00000      0.00000      0.00696     -0.00000     -0.00000      0.00000      0.00000     -1.08868      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.47398     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.18083     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00696      0.00000      0.00000     -1.08868     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.47398     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.18083      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00696     -0.00000     -0.00000     -0.00000     -1.08868     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.47398     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.18083     -0.00000      0.00000 \n    -0.02264      0.90224     -0.00000      0.00000      0.00000     -0.60549     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.26657     -0.94711      0.24395     -0.00000     -0.00000     -0.00000      0.07979      0.24552      0.04043     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.23980     15.81735 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.70418      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.43099      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.70418      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.43099      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.02264      0.90224     -0.00000      0.00000      0.00000     -0.60549     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.95351      0.24269      0.24395     -0.00000     -0.00000     -0.00000      0.07979     -0.08775     -0.23285     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.23980     15.81735 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.70418     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.43099      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.02264      0.90224     -0.00000      0.00000      0.00000     -0.60549     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.68693      0.70441      0.24395     -0.00000     -0.00000     -0.00000      0.07979     -0.15778      0.19241     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.23980     15.81735 \n    -0.00023     -0.11903     -0.00000      0.00000      0.00000      0.25289      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.22718     -0.00000     -0.00000     -0.00000      0.50880      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -2.92785     -0.88208 \n    -0.00000     -0.00000      0.00113      0.00000      0.00000      0.00000      0.00000     -0.06822     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.02781      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.46315     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00113     -0.00000      0.00000     -0.06822      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.02781      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.46315     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00113     -0.00000     -0.00000     -0.00000     -0.06822      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.02781     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.46315      0.00000     -0.00000 \n     0.00028      0.03787      0.00000     -0.00000     -0.00000     -0.08049     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.02094     -0.07440     -0.09232      0.00000      0.00000      0.00000     -0.07533     -0.99849     -0.16442     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.58087      0.20433 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.13387     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.75273      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.13387     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.75273      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00028      0.03787      0.00000     -0.00000     -0.00000     -0.08049     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.07490      0.01907     -0.09232      0.00000      0.00000      0.00000     -0.07533      0.35685      0.94693     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.58087      0.20433 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.13387      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.75273     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00028      0.03787      0.00000     -0.00000     -0.00000     -0.08049     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.05396      0.05534     -0.09232      0.00000      0.00000      0.00000     -0.07533      0.64164     -0.78251     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.58087      0.20433 \n    -0.00021     -0.01637     -0.00000      0.00000      0.00000      0.03580      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.08146     -0.00000     -0.00000     -0.00000     -1.00010     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.14138     -0.05512 \n    -0.00000     -0.00000     -0.00032      0.00000      0.00000     -0.00000     -0.00000      0.01272      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.10296     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.05061      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00032     -0.00000     -0.00000      0.01272     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10296     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.05061      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00032     -0.00000     -0.00000     -0.00000      0.01272     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.10296      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.05061     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99526      0.41909      0.00000      0.00000      0.00000      0.19480      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.07762     -0.00000      0.00000      0.00000     -0.02316     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06804      0.56396 \n     0.01308     -1.03718      0.00000      0.00000      0.00000     -0.61550      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.25363      0.00000     -0.00000     -0.00000      0.07454      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.22756     -0.21064 \n     0.00000      0.00000     -0.99686      0.00000      0.00000      0.00000      0.00000      0.49506      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.17498     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.06688     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.99686      0.00000      0.00000     -0.49506      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.17498     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.06688     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.99686      0.00000      0.00000      0.00000      0.49506      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.17498      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.06688     -0.00000      0.00000 \n    -0.05208      1.90013      0.00000      0.00000      0.00000      2.40808      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.07483     -0.00000      0.00000      0.00000     -0.32887      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.04098    -35.06321 \n     0.00000      0.00000     -0.00689      0.00000      0.00000      0.00000      0.00000     -1.08920      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.47172      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.18354      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00689      0.00000      0.00000      1.08920      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47172      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.18354      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00689      0.00000      0.00000      0.00000     -1.08920      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.47172     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.18354      0.00000     -0.00000 \n     0.02264     -0.90202      0.00000      0.00000      0.00000     -0.60553      0.00000      0.00000      0.00000      0.00000      0.00000      0.35163      0.00000      0.91934      0.24412      0.00000     -0.00000     -0.00000      0.07189      0.23826     -0.06627     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.23807     15.81742 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.70484      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.42834      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.70484      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.42834     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.02264     -0.90202      0.00000      0.00000      0.00000     -0.60553      0.00000      0.00000      0.00000      0.00000      0.00000     -0.97199      0.00000     -0.15515      0.24412      0.00000     -0.00000     -0.00000      0.07189     -0.06174      0.23947     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.23807     15.81742 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.70484      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.42834      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.02264     -0.90202      0.00000      0.00000      0.00000     -0.60553      0.00000      0.00000      0.00000      0.00000      0.00000      0.62036      0.00000     -0.76419      0.24412      0.00000     -0.00000     -0.00000      0.07189     -0.17652     -0.17321     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.23807     15.81742 \n     0.00023      0.11896      0.00000      0.00000      0.00000      0.25113      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.25201      0.00000     -0.00000     -0.00000      0.42126     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -2.93153     -0.88163 \n     0.00000      0.00000     -0.00114      0.00000      0.00000      0.00000      0.00000     -0.06706      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.02497     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.46957     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00114      0.00000      0.00000      0.06706      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.02497     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.46957     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00114      0.00000      0.00000      0.00000     -0.06706      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.02497      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.46957     -0.00000      0.00000 \n    -0.00028     -0.03785      0.00000      0.00000      0.00000     -0.08006      0.00000      0.00000      0.00000      0.00000      0.00000      0.02705      0.00000      0.07073     -0.10573     -0.00000      0.00000      0.00000     -0.02781     -0.97505      0.27119      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.58163      0.20414 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13115      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.75293     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.13115      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.75293     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00028     -0.03785      0.00000      0.00000      0.00000     -0.08006      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07478      0.00000     -0.01194     -0.10573     -0.00000      0.00000      0.00000     -0.02781      0.25267     -0.98001      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.58163      0.20414 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13115      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.75293     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00028     -0.03785      0.00000      0.00000      0.00000     -0.08006      0.00000      0.00000      0.00000      0.00000      0.00000      0.04772      0.00000     -0.05879     -0.10573     -0.00000      0.00000      0.00000     -0.02781      0.72238      0.70882      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.58163      0.20414 \n     0.00021      0.01637      0.00000      0.00000      0.00000      0.03568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.09145      0.00000     -0.00000     -0.00000     -1.03393     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.11006     -0.05503 \n     0.00000      0.00000      0.00032      0.00000      0.00000      0.00000      0.00000      0.01260      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.10949      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.04995      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00032      0.00000      0.00000     -0.01260      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.10949      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.04995      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00032      0.00000      0.00000      0.00000      0.01260      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.10949     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04995      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ru\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.42460     -1.13421      0.00000      0.00000      0.00000      2.63038      0.00000      0.00000      0.00000     -0.99371      0.00000      0.00000     -0.99371      0.00000     -0.99371     -0.01767      0.00000      0.00000      0.00000     -0.04307      0.00000      0.00000     -0.04307      0.00000     -0.04307      0.05719      0.00000      0.00000      0.00000 \n    -1.13421      3.07301      0.00000      0.00000      0.00000     -7.58339      0.00000      0.00000      0.00000      2.77427      0.00000      0.00000      2.77427      0.00000      2.77427      0.14990      0.00000      0.00000      0.00000      0.11207      0.00000      0.00000      0.11207      0.00000      0.11207     -0.17606      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.56171      0.00000      0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32209      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03772      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.56171      0.00000      0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32209      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03772      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.56171      0.00000      0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32209      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03772 \n     2.63038     -7.58339      0.00000      0.00000      0.00000     21.67773      0.00000      0.00000      0.00000     -7.01043      0.00000      0.00000     -7.01043      0.00000     -7.01043     -1.35797      0.00000      0.00000      0.00000     -0.25894      0.00000      0.00000     -0.25894      0.00000     -0.25894      0.70986      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      2.87260      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09775      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      2.87260      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09775      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      2.87260      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09775 \n    -0.99371      2.77427      0.00000      0.00000      0.00000     -7.01043      0.00000      0.00000      0.00000      4.52746      0.00000      0.00000      1.50730      0.00000      1.50730      0.16970      0.00000      0.00000      0.00000     -0.05675      0.00000      0.00000      0.18153      0.00000      0.18153     -0.17306      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.04029      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.04029      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99371      2.77427      0.00000      0.00000      0.00000     -7.01043      0.00000      0.00000      0.00000      1.50730      0.00000      0.00000      4.52745      0.00000      1.50731      0.16970      0.00000      0.00000      0.00000      0.18153      0.00000      0.00000     -0.05675      0.00000      0.18153     -0.17306      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.04029      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99371      2.77427      0.00000      0.00000      0.00000     -7.01043      0.00000      0.00000      0.00000      1.50730      0.00000      0.00000      1.50731      0.00000      4.52745      0.16970      0.00000      0.00000      0.00000      0.18153      0.00000      0.00000      0.18153      0.00000     -0.05675     -0.17306      0.00000      0.00000      0.00000 \n    -0.01767      0.14990      0.00000      0.00000      0.00000     -1.35797      0.00000      0.00000      0.00000      0.16970      0.00000      0.00000      0.16970      0.00000      0.16970      3.65714      0.00000      0.00000      0.00000     -0.36396      0.00000      0.00000     -0.36396      0.00000     -0.36396     -0.84065      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.32209      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19825      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.32209      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19825      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.32209      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19825      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828 \n    -0.04307      0.11207      0.00000      0.00000      0.00000     -0.25894      0.00000      0.00000      0.00000     -0.05675      0.00000      0.00000      0.18153      0.00000      0.18153     -0.36396      0.00000      0.00000      0.00000      1.25591      0.00000      0.00000     -0.54385      0.00000     -0.54384      0.21491      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.59950      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.59950      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04307      0.11207      0.00000      0.00000      0.00000     -0.25894      0.00000      0.00000      0.00000      0.18153      0.00000      0.00000     -0.05675      0.00000      0.18153     -0.36396      0.00000      0.00000      0.00000     -0.54385      0.00000      0.00000      1.25591      0.00000     -0.54384      0.21491      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.59950      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04307      0.11207      0.00000      0.00000      0.00000     -0.25894      0.00000      0.00000      0.00000      0.18153      0.00000      0.00000      0.18153      0.00000     -0.05675     -0.36396      0.00000      0.00000      0.00000     -0.54384      0.00000      0.00000     -0.54384      0.00000      1.25592      0.21491      0.00000      0.00000      0.00000 \n     0.05719     -0.17606      0.00000      0.00000      0.00000      0.70986      0.00000      0.00000      0.00000     -0.17306      0.00000      0.00000     -0.17306      0.00000     -0.17306     -0.84065      0.00000      0.00000      0.00000      0.21491      0.00000      0.00000      0.21491      0.00000      0.21491      1.86207      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03772      0.00000      0.00000      0.00000     -0.09775      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09630      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03772      0.00000      0.00000      0.00000     -0.09775      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09630      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03772      0.00000      0.00000      0.00000     -0.09775      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09630 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.07456      0.07456      0.07456      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.15481      0.15481      0.15481      0.15481      0.15481      0.00076      0.00076      0.00076      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -775.29670   -109.05720   -102.17680   -102.17680   -102.17680    -18.73670    -15.94238    -15.94238    -15.94238     -9.60722     -9.60722     -9.60722     -9.60722     -9.60722     -2.54115     -1.64801     -1.64801     -1.64801     -0.13469     -0.09165     -0.09165     -0.09165     -0.09165     -0.09165      0.03290      0.03290      0.03290      1.12536    165.91310 \n   </alphaeps>\n   <betaeps>\n  -775.29630   -109.04370   -102.16610   -102.16610   -102.16610    -18.72079    -15.92611    -15.92611    -15.92611     -9.58847     -9.58847     -9.58847     -9.58847     -9.58847     -2.42949     -1.53487     -1.53487     -1.53487     -0.10619      0.02687      0.02687      0.02687      0.02687      0.02687      0.05734      0.05734      0.05734      1.20109    165.94340 \n   </betaeps>\n   <alphavectors>\n    -0.99535      0.41932     -0.00000     -0.00000     -0.00000      0.19697      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.07954      0.00000      0.00000     -0.00000      0.02488      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.07006      0.57082 \n    -0.01291     -1.03606      0.00000      0.00000      0.00000     -0.62321     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.26076     -0.00000     -0.00000      0.00000     -0.08103     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.23497     -0.22196 \n     0.00000     -0.00000     -0.99751     -0.00000     -0.00000     -0.00000     -0.50197      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.18380      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.05487     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.99751      0.00000      0.00000     -0.00000     -0.50197      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.18380      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05487      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.99751      0.00000      0.00000     -0.00000      0.50197     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.18380     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05487     -0.00000      0.00000 \n     0.05349      1.89058     -0.00000     -0.00000     -0.00000      2.43094      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.10778      0.00000      0.00000     -0.00000      0.36304      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.08482    -35.08419 \n     0.00000     -0.00000     -0.00535      0.00000      0.00000     -0.00000      1.09264     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.49187     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.14926     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00535     -0.00000      0.00000      0.00000      1.09264     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.49187     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.14926      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00535     -0.00000     -0.00000      0.00000     -1.09264      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.49187      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.14926      0.00000     -0.00000 \n    -0.02330     -0.89821      0.00000      0.00000      0.00000     -0.61567     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.88097      0.00000      0.43735      0.25443     -0.00000     -0.00000      0.00000     -0.08140      0.00000     -0.00000     -0.00000     -0.22583      0.12909     -0.00000     -0.00000     -0.00000     -0.25082     15.83094 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.70357     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.45054      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.70357      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.45054     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.02330     -0.89821      0.00000      0.00000      0.00000     -0.61567     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.81924      0.00000      0.54427      0.25443     -0.00000     -0.00000      0.00000     -0.08140     -0.00000     -0.00000      0.00000      0.22471      0.13103     -0.00000     -0.00000     -0.00000     -0.25082     15.83094 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.70357      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.45054      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.02330     -0.89821      0.00000      0.00000      0.00000     -0.61567     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.06173      0.00000     -0.98162      0.25443     -0.00000     -0.00000      0.00000     -0.08140      0.00000     -0.00000     -0.00000      0.00112     -0.26012     -0.00000     -0.00000     -0.00000     -0.25082     15.83094 \n    -0.00016      0.11824     -0.00000     -0.00000     -0.00000      0.25846      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.20456      0.00000      0.00000     -0.00000     -0.55875     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -2.92609     -0.87221 \n     0.00000     -0.00000     -0.00154      0.00000      0.00000     -0.00000      0.06570      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.04488      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.36861      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00154      0.00000     -0.00000     -0.00000      0.06570      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.04488      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36861      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00154      0.00000      0.00000     -0.00000     -0.06570     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.04488     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.36861     -0.00000      0.00000 \n     0.00024     -0.03570      0.00000      0.00000      0.00000     -0.07842     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06691      0.00000      0.03322     -0.07338     -0.00000     -0.00000      0.00000      0.13684     -0.00000      0.00000      0.00000      0.88087     -0.50352      0.00000     -0.00000      0.00000      1.48889      0.19044 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.12938      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.75738     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.12938     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.75738      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00024     -0.03570      0.00000      0.00000      0.00000     -0.07842     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.06222      0.00000      0.04134     -0.07338     -0.00000     -0.00000      0.00000      0.13684      0.00000      0.00000     -0.00000     -0.87650     -0.51109      0.00000     -0.00000      0.00000      1.48889      0.19044 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.12938     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.75738      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00024     -0.03570      0.00000      0.00000      0.00000     -0.07842     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00469      0.00000     -0.07455     -0.07338     -0.00000     -0.00000      0.00000      0.13684     -0.00000      0.00000      0.00000     -0.00437      1.01462      0.00000     -0.00000      0.00000      1.48889      0.19044 \n    -0.00015      0.01187     -0.00000     -0.00000     -0.00000      0.02701      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06003      0.00000      0.00000     -0.00000      0.95194      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.90861     -0.03619 \n     0.00000     -0.00000      0.00033      0.00000      0.00000     -0.00000     -0.00958      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.08734     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.02969      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00033     -0.00000      0.00000      0.00000     -0.00958     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.08734     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.02969     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00033      0.00000      0.00000     -0.00000      0.00958     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.08734      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.02969      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99535      0.41934      0.00000     -0.00000      0.00000     -0.19704     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.07982      0.00000     -0.00000      0.00000      0.02328     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.07017      0.57079 \n    -0.01291     -1.03609      0.00000     -0.00000      0.00000      0.62343     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.26160     -0.00000      0.00000      0.00000     -0.07562      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.23517     -0.22189 \n    -0.00000      0.00000     -0.99754      0.00000     -0.00000     -0.00000     -0.50210     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.18305     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05578      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.99754      0.00000      0.00000     -0.00000     -0.50210     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.18305      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.05578      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.99754      0.00000      0.00000     -0.00000     -0.50210     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.18305     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.05578     -0.00000      0.00000     -0.00000      0.00000 \n     0.05349      1.89022     -0.00000      0.00000     -0.00000     -2.43150      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.10935      0.00000     -0.00000     -0.00000      0.33688     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.08283    -35.08445 \n    -0.00000      0.00000     -0.00529     -0.00000      0.00000      0.00000      1.09310      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.49010      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.15173     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00529     -0.00000     -0.00000      0.00000      1.09310      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.49010     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.15173     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00529     -0.00000     -0.00000      0.00000      1.09310      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.49010      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.15173     -0.00000      0.00000      0.00000      0.00000 \n    -0.02330     -0.89802      0.00000     -0.00000      0.00000      0.61568     -0.00000      0.00000      0.00000      0.00000      0.93079     -0.00000      0.00000      0.31882     -0.25417     -0.00000      0.00000      0.00000     -0.07508      0.17615      0.18975      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.24959     15.83100 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.70412     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.44845      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.70412      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.44845     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.02330     -0.89802      0.00000     -0.00000      0.00000      0.61568     -0.00000      0.00000      0.00000      0.00000     -0.74150     -0.00000      0.00000      0.64667     -0.25417     -0.00000      0.00000      0.00000     -0.07508      0.07626     -0.24743     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.24959     15.83100 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.70412      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.44845     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.02330     -0.89802      0.00000     -0.00000      0.00000      0.61568     -0.00000      0.00000      0.00000      0.00000     -0.18929     -0.00000      0.00000     -0.96549     -0.25417     -0.00000      0.00000      0.00000     -0.07508     -0.25241      0.05768      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.24959     15.83100 \n    -0.00016      0.11818      0.00000     -0.00000      0.00000     -0.25685      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.22136     -0.00000      0.00000      0.00000     -0.49146      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -2.93145     -0.87184 \n     0.00000     -0.00000     -0.00155      0.00000     -0.00000      0.00000      0.06472     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.04294     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.37424      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00155      0.00000     -0.00000     -0.00000      0.06472     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.04294      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.37424      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00155     -0.00000      0.00000     -0.00000      0.06472     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.04294     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.37424     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00024     -0.03568     -0.00000      0.00000     -0.00000      0.07803     -0.00000      0.00000      0.00000      0.00000      0.06949      0.00000      0.00000      0.02380      0.08195      0.00000     -0.00000     -0.00000      0.10229     -0.69037     -0.74367     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.49126      0.19030 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.12723      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.75754     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.12723     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.75754      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00024     -0.03568     -0.00000      0.00000     -0.00000      0.07803     -0.00000      0.00000      0.00000      0.00000     -0.05536      0.00000      0.00000      0.04828      0.08195      0.00000     -0.00000     -0.00000      0.10229     -0.29885      0.96971      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.49126      0.19030 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.12723     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.75754      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00024     -0.03568     -0.00000      0.00000     -0.00000      0.07803     -0.00000      0.00000      0.00000      0.00000     -0.01413      0.00000      0.00000     -0.07209      0.08195      0.00000     -0.00000     -0.00000      0.10229      0.98922     -0.22604     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.49126      0.19030 \n    -0.00015      0.01187      0.00000     -0.00000      0.00000     -0.02693      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06574     -0.00000      0.00000      0.00000      0.97274     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.88591     -0.03614 \n     0.00000     -0.00000      0.00033      0.00000     -0.00000      0.00000     -0.00950     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.09287      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.02920     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00033     -0.00000     -0.00000      0.00000     -0.00950      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.09287     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.02920     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00033     -0.00000     -0.00000      0.00000     -0.00950      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.09287      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.02920      0.00000     -0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Rh\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.42802     -1.14219      0.00000      0.00000      0.00000      2.63976      0.00000      0.00000      0.00000     -0.99487      0.00000      0.00000     -0.99487      0.00000     -0.99487     -0.00116      0.00000      0.00000      0.00000     -0.05049      0.00000      0.00000     -0.05049      0.00000     -0.05049      0.05571      0.00000      0.00000      0.00000 \n    -1.14219      3.09471      0.00000      0.00000      0.00000     -7.64430      0.00000      0.00000      0.00000      2.79023      0.00000      0.00000      2.79023      0.00000      2.79023      0.10572      0.00000      0.00000      0.00000      0.13333      0.00000      0.00000      0.13333      0.00000      0.13333     -0.17321      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.58375      0.00000      0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.33616      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03488      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.58375      0.00000      0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.33616      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03488      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.58375      0.00000      0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.33616      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03488 \n     2.63976     -7.64430      0.00000      0.00000      0.00000     21.90076      0.00000      0.00000      0.00000     -7.07077      0.00000      0.00000     -7.07077      0.00000     -7.07077     -1.24197      0.00000      0.00000      0.00000     -0.32248      0.00000      0.00000     -0.32248      0.00000     -0.32248      0.70872      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      2.90892      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08985      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      2.90892      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08985      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      2.90892      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08985 \n    -0.99487      2.79023      0.00000      0.00000      0.00000     -7.07077      0.00000      0.00000      0.00000      4.56106      0.00000      0.00000      1.50951      0.00000      1.50951      0.13345      0.00000      0.00000      0.00000     -0.11347      0.00000      0.00000      0.23917      0.00000      0.23916     -0.17253      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.10307      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.10307      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99487      2.79023      0.00000      0.00000      0.00000     -7.07077      0.00000      0.00000      0.00000      1.50951      0.00000      0.00000      4.56106      0.00000      1.50951      0.13345      0.00000      0.00000      0.00000      0.23916      0.00000      0.00000     -0.11347      0.00000      0.23917     -0.17253      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.10307      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99487      2.79023      0.00000      0.00000      0.00000     -7.07077      0.00000      0.00000      0.00000      1.50951      0.00000      0.00000      1.50951      0.00000      4.56106      0.13345      0.00000      0.00000      0.00000      0.23915      0.00000      0.00000      0.23916      0.00000     -0.11347     -0.17253      0.00000      0.00000      0.00000 \n    -0.00116      0.10572      0.00000      0.00000      0.00000     -1.24197      0.00000      0.00000      0.00000      0.13345      0.00000      0.00000      0.13345      0.00000      0.13345      3.76609      0.00000      0.00000      0.00000     -0.39915      0.00000      0.00000     -0.39915      0.00000     -0.39915     -0.90967      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.33616      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.22422      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.33616      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.22422      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.33616      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.22422      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280 \n    -0.05049      0.13333      0.00000      0.00000      0.00000     -0.32248      0.00000      0.00000      0.00000     -0.11347      0.00000      0.00000      0.23916      0.00000      0.23915     -0.39915      0.00000      0.00000      0.00000      1.46749      0.00000      0.00000     -0.62883      0.00000     -0.62883      0.25486      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.19262      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.19262      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05049      0.13333      0.00000      0.00000      0.00000     -0.32248      0.00000      0.00000      0.00000      0.23917      0.00000      0.00000     -0.11347      0.00000      0.23916     -0.39915      0.00000      0.00000      0.00000     -0.62883      0.00000      0.00000      1.46749      0.00000     -0.62883      0.25486      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.19262      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05049      0.13333      0.00000      0.00000      0.00000     -0.32248      0.00000      0.00000      0.00000      0.23916      0.00000      0.00000      0.23917      0.00000     -0.11347     -0.39915      0.00000      0.00000      0.00000     -0.62883      0.00000      0.00000     -0.62883      0.00000      1.46749      0.25486      0.00000      0.00000      0.00000 \n     0.05571     -0.17321      0.00000      0.00000      0.00000      0.70872      0.00000      0.00000      0.00000     -0.17253      0.00000      0.00000     -0.17253      0.00000     -0.17253     -0.90967      0.00000      0.00000      0.00000      0.25486      0.00000      0.00000      0.25486      0.00000      0.25486      1.85263      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03488      0.00000      0.00000      0.00000     -0.08985      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12616      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03488      0.00000      0.00000      0.00000     -0.08985      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12616      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03488      0.00000      0.00000      0.00000     -0.08985      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12616 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.10209      0.10209      0.10209      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33636      0.33636      0.33636      0.33636      0.33636      0.00397      0.00397      0.00397      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -813.11750   -115.25940   -108.16910   -108.16910   -108.16910    -20.05611    -17.18655    -17.18655    -17.18655    -10.61064    -10.61064    -10.61064    -10.61064    -10.61064     -2.69704     -1.75714     -1.75714     -1.75714     -0.14482     -0.08382     -0.08382     -0.08382     -0.08382     -0.08382      0.02301      0.02301      0.02301      1.28024    177.70610 \n   </alphaeps>\n   <betaeps>\n  -813.11710   -115.24670   -108.15900   -108.15900   -108.15900    -20.04133    -17.17160    -17.17160    -17.17160    -10.59338    -10.59338    -10.59338    -10.59338    -10.59338     -2.60449     -1.66407     -1.66407     -1.66407     -0.12243      0.01103      0.01103      0.01103      0.01103      0.01103      0.04259      0.04259      0.04259      1.34063    177.73350 \n   </betaeps>\n   <alphavectors>\n    -0.99554      0.41949     -0.00000     -0.00000      0.00000     -0.19910     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.08177      0.00000     -0.00000      0.00000     -0.02461      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.07518     -0.57807 \n    -0.01256     -1.03468      0.00000      0.00000     -0.00000      0.63082      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.26879     -0.00000      0.00000     -0.00000      0.08046     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.25288      0.23405 \n     0.00000      0.00000      0.99818     -0.00000      0.00000      0.00000      0.50954      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.18916     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05196      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.99818     -0.00000     -0.00000      0.00000      0.50954      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.18916      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.05196     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.99818     -0.00000      0.00000     -0.00000     -0.50954     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.18916      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.05196      0.00000      0.00000 \n     0.05709      1.87620     -0.00000     -0.00000      0.00000     -2.45030     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.13953      0.00000     -0.00000      0.00000     -0.36108      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.17584     35.11200 \n     0.00000     -0.00000      0.00380      0.00000     -0.00000     -0.00000     -1.09648     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.50146      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.13993     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00380      0.00000      0.00000     -0.00000     -1.09648     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.50146     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.13993      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00380      0.00000     -0.00000      0.00000      1.09648      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.50146     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.13993     -0.00000     -0.00000 \n    -0.02497     -0.89248      0.00000      0.00000     -0.00000      0.62497      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.97938      0.07308      0.26377     -0.00000      0.00000     -0.00000      0.08181     -0.00000     -0.00000     -0.00000     -0.27954      0.02025      0.00000      0.00000     -0.00000     -0.27432    -15.84783 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.70105      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.48544     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.70105     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.48544     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.02497     -0.89248      0.00000      0.00000     -0.00000      0.62497      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.55298      0.81163      0.26377     -0.00000      0.00000     -0.00000      0.08181     -0.00000     -0.00000     -0.00000      0.15730      0.23196      0.00000      0.00000     -0.00000     -0.27432    -15.84783 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.70105     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.48544      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02497     -0.89248      0.00000      0.00000     -0.00000      0.62497      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.42640     -0.88471      0.26377     -0.00000      0.00000     -0.00000      0.08181     -0.00000     -0.00000     -0.00000      0.12223     -0.25221      0.00000      0.00000     -0.00000     -0.27432    -15.84783 \n    -0.00006      0.12827     -0.00000     -0.00000      0.00000     -0.29344     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.20924     -0.00000     -0.00000      0.00000      0.57569     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -3.32153      0.90937 \n     0.00000      0.00000      0.00195     -0.00000      0.00000      0.00000     -0.06522      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.05047     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.33880      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00195     -0.00000     -0.00000      0.00000     -0.06522      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.05047      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.33880      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00195      0.00000     -0.00000      0.00000      0.06522     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.05047      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.33880      0.00000     -0.00000 \n     0.00023     -0.03925      0.00000      0.00000     -0.00000      0.09076      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.07464      0.00557     -0.07192     -0.00000      0.00000     -0.00000     -0.15132      0.00000      0.00000      0.00000      1.01590     -0.07359     -0.00000     -0.00000      0.00000      1.61799     -0.20064 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.12964     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.76420      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.12964      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.76420      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00023     -0.03925      0.00000      0.00000     -0.00000      0.09076      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.04214      0.06185     -0.07192     -0.00000      0.00000     -0.00000     -0.15132      0.00000      0.00000      0.00000     -0.57168     -0.84300     -0.00000     -0.00000      0.00000      1.61799     -0.20064 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.12964      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.76420      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00023     -0.03925      0.00000      0.00000     -0.00000      0.09076      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03250     -0.06742     -0.07192     -0.00000      0.00000     -0.00000     -0.15132      0.00000      0.00000      0.00000     -0.44422      0.91659     -0.00000     -0.00000      0.00000      1.61799     -0.20064 \n    -0.00013      0.01012     -0.00000     -0.00000      0.00000     -0.02446     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.05359      0.00000     -0.00000      0.00000     -0.95484      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.79764      0.02512 \n     0.00000     -0.00000     -0.00037      0.00000     -0.00000     -0.00000      0.00862     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.08363      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.02383     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00037     -0.00000     -0.00000      0.00000      0.00862      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.08363     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.02383      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00037     -0.00000      0.00000     -0.00000     -0.00862      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.08363     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.02383     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99554     -0.41951      0.00000     -0.00000      0.00000     -0.19916     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.08190     -0.00000      0.00000     -0.00000     -0.02361      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.07525     -0.57805 \n     0.01256      1.03471      0.00000     -0.00000     -0.00000      0.63101     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.26914      0.00000     -0.00000      0.00000      0.07705     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.25301      0.23399 \n    -0.00000     -0.00000      0.99820     -0.00000      0.00000     -0.00000      0.50964      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.18854     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05280     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.99820      0.00000     -0.00000     -0.00000     -0.50964     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.18854      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.05280      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.99820     -0.00000      0.00000     -0.00000     -0.50964      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.18854      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.05280     -0.00000     -0.00000 \n    -0.05709     -1.87589     -0.00000      0.00000      0.00000     -2.45072      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.13919     -0.00000      0.00000     -0.00000     -0.34423      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.17423     35.11222 \n    -0.00000      0.00000      0.00374      0.00000     -0.00000      0.00000     -1.09685     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.50000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.14220      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00374     -0.00000      0.00000      0.00000      1.09685      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.50000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.14220      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00374     -0.00000     -0.00000      0.00000      1.09685     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.50000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.14220      0.00000      0.00000 \n     0.02497      0.89232      0.00000     -0.00000     -0.00000      0.62494     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.97968     -0.07254     -0.26316      0.00000     -0.00000      0.00000      0.07767     -0.27867      0.01960      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.27337    -15.84789 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.70150     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.48386      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.70150      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.48386     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.02497      0.89232      0.00000     -0.00000     -0.00000      0.62494     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.55266     -0.81216     -0.26316      0.00000     -0.00000      0.00000      0.07767      0.15631      0.23153     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.27337    -15.84789 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.70150      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.48386     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.02497      0.89232      0.00000     -0.00000     -0.00000      0.62494     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.42702      0.88470     -0.26316      0.00000     -0.00000      0.00000      0.07767      0.12236     -0.25113      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.27337    -15.84789 \n     0.00006     -0.12822     -0.00000      0.00000      0.00000     -0.29195     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.21979      0.00000     -0.00000      0.00000      0.52942     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      3.32559      0.90906 \n     0.00000     -0.00000      0.00196     -0.00000      0.00000     -0.00000     -0.06443      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.04887     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.34386     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00196      0.00000     -0.00000     -0.00000      0.06443     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.04887      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.34386      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00196     -0.00000     -0.00000      0.00000      0.06443      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.04887      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.34386     -0.00000     -0.00000 \n    -0.00022      0.03923      0.00000     -0.00000     -0.00000      0.09038      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.07370     -0.00546      0.07715     -0.00000      0.00000     -0.00000     -0.12821      1.01612     -0.07148     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.61978     -0.20052 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.12799      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.76432     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.12799     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.76432      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00022      0.03923      0.00000     -0.00000     -0.00000      0.09038      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.04157     -0.06109      0.07715     -0.00000      0.00000     -0.00000     -0.12821     -0.56997     -0.84425      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.61978     -0.20052 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.12799      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.76432      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00022      0.03923      0.00000     -0.00000     -0.00000      0.09038      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.03212      0.06655      0.07715     -0.00000      0.00000     -0.00000     -0.12821     -0.44616      0.91573     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.61978     -0.20052 \n     0.00013     -0.01011     -0.00000      0.00000      0.00000     -0.02439     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05723      0.00000     -0.00000      0.00000     -0.96611     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.78370      0.02508 \n    -0.00000      0.00000     -0.00037      0.00000     -0.00000      0.00000      0.00856     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.08855      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.02342     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00037      0.00000     -0.00000     -0.00000     -0.00856     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.08855     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.02342     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00037     -0.00000     -0.00000      0.00000     -0.00856      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.08855     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.02342     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Pd\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.43156     -1.15061      0.00000      0.00000      0.00000      2.65036      0.00000      0.00000      0.00000     -0.99622      0.00000      0.00000     -0.99622      0.00000     -0.99622      0.00521      0.00000      0.00000      0.00000     -0.05450      0.00000      0.00000     -0.05450      0.00000     -0.05450      0.05581      0.00000      0.00000      0.00000 \n    -1.15061      3.11757      0.00000      0.00000      0.00000     -7.70554      0.00000      0.00000      0.00000      2.80548      0.00000      0.00000      2.80548      0.00000      2.80548      0.08622      0.00000      0.00000      0.00000      0.14670      0.00000      0.00000      0.14670      0.00000      0.14670     -0.17427      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.60522      0.00000      0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03854      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.60522      0.00000      0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03854      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.60522      0.00000      0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03854 \n     2.65036     -7.70554      0.00000      0.00000      0.00000     22.11278      0.00000      0.00000      0.00000     -7.12547      0.00000      0.00000     -7.12547      0.00000     -7.12547     -1.16605      0.00000      0.00000      0.00000     -0.37690      0.00000      0.00000     -0.37690      0.00000     -0.37690      0.71320      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      2.94390      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09917      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      2.94390      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09917      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      2.94390      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09917 \n    -0.99622      2.80548      0.00000      0.00000      0.00000     -7.12547      0.00000      0.00000      0.00000      4.59332      0.00000      0.00000      1.50893      0.00000      1.50894      0.11778      0.00000      0.00000      0.00000     -0.17621      0.00000      0.00000      0.28988      0.00000      0.28988     -0.17421      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.16875      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.16875      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99622      2.80548      0.00000      0.00000      0.00000     -7.12547      0.00000      0.00000      0.00000      1.50893      0.00000      0.00000      4.59332      0.00000      1.50893      0.11778      0.00000      0.00000      0.00000      0.28988      0.00000      0.00000     -0.17622      0.00000      0.28989     -0.17421      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.16875      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99622      2.80548      0.00000      0.00000      0.00000     -7.12547      0.00000      0.00000      0.00000      1.50894      0.00000      0.00000      1.50893      0.00000      4.59331      0.11778      0.00000      0.00000      0.00000      0.28988      0.00000      0.00000      0.28989      0.00000     -0.17622     -0.17421      0.00000      0.00000      0.00000 \n     0.00521      0.08622      0.00000      0.00000      0.00000     -1.16605      0.00000      0.00000      0.00000      0.11778      0.00000      0.00000      0.11778      0.00000      0.11778      3.60254      0.00000      0.00000      0.00000     -0.34637      0.00000      0.00000     -0.34637      0.00000     -0.34637     -0.86566      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.34801      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.23149      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.34801      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.23149      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.34801      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.23149      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294 \n    -0.05450      0.14670      0.00000      0.00000      0.00000     -0.37690      0.00000      0.00000      0.00000     -0.17621      0.00000      0.00000      0.28988      0.00000      0.28988     -0.34637      0.00000      0.00000      0.00000      1.69938      0.00000      0.00000     -0.75989      0.00000     -0.75988      0.22993      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.91851      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.91851      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05450      0.14670      0.00000      0.00000      0.00000     -0.37690      0.00000      0.00000      0.00000      0.28988      0.00000      0.00000     -0.17622      0.00000      0.28989     -0.34637      0.00000      0.00000      0.00000     -0.75989      0.00000      0.00000      1.69937      0.00000     -0.75988      0.22993      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.91851      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05450      0.14670      0.00000      0.00000      0.00000     -0.37690      0.00000      0.00000      0.00000      0.28988      0.00000      0.00000      0.28989      0.00000     -0.17622     -0.34637      0.00000      0.00000      0.00000     -0.75988      0.00000      0.00000     -0.75988      0.00000      1.69938      0.22993      0.00000      0.00000      0.00000 \n     0.05581     -0.17427      0.00000      0.00000      0.00000      0.71320      0.00000      0.00000      0.00000     -0.17421      0.00000      0.00000     -0.17421      0.00000     -0.17421     -0.86566      0.00000      0.00000      0.00000      0.22993      0.00000      0.00000      0.22993      0.00000      0.22993      1.88075      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03854      0.00000      0.00000      0.00000     -0.09917      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07380      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03854      0.00000      0.00000      0.00000     -0.09917      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07380      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03854      0.00000      0.00000      0.00000     -0.09917      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07380 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.04847      0.04847      0.04847      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.56639      0.56639      0.56639      0.56639      0.56639      0.00755      0.00755      0.00755      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -851.82690   -121.61080   -114.31280   -114.31280   -114.31280    -21.39429    -18.45428    -18.45428    -18.45428    -11.63061    -11.63061    -11.63061    -11.63061    -11.63061     -2.81592     -1.83039     -1.83039     -1.83039     -0.12738     -0.04089     -0.04089     -0.04089     -0.04089     -0.04089      0.04622      0.04622      0.04622      1.45847    189.99650 \n   </alphaeps>\n   <betaeps>\n  -851.82670   -121.60200   -114.30590   -114.30590   -114.30590    -21.38426    -18.44421    -18.44421    -18.44421    -11.61901    -11.61901    -11.61901    -11.61901    -11.61901     -2.75546     -1.76981     -1.76981     -1.76981     -0.11494      0.02038      0.02038      0.02038      0.02038      0.02038      0.05711      0.05711      0.05711      1.49710    190.01500 \n   </betaeps>\n   <alphavectors>\n     0.99572     -0.41974     -0.00000     -0.00000      0.00000      0.20128     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.08387     -0.00000     -0.00000      0.00000     -0.02431      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.07837      0.58497 \n     0.01221      1.03354      0.00000     -0.00000      0.00000     -0.63852      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.27639      0.00000      0.00000      0.00000      0.07965     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.26449     -0.24537 \n     0.00000     -0.00000     -0.00000     -0.99885      0.00000      0.00000     -0.00000      0.51670      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.19463     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.05274     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.99885     -0.00000      0.00000      0.00000      0.51670     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.19463      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.05274     -0.00000     -0.00000 \n     0.00000      0.00000     -0.99885     -0.00000      0.00000     -0.00000     -0.51670     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.19463      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05274      0.00000     -0.00000     -0.00000      0.00000 \n    -0.06021     -1.86225     -0.00000      0.00000     -0.00000      2.46912     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.16844     -0.00000     -0.00000     -0.00000     -0.35609      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.22993    -35.14953 \n    -0.00000      0.00000      0.00000     -0.00226     -0.00000     -0.00000      0.00000     -1.09994     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51160      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.14081      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00226      0.00000     -0.00000     -0.00000     -1.09994      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.51160     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.14081      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00226      0.00000     -0.00000      0.00000      1.09994      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.51160     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.14081      0.00000     -0.00000      0.00000     -0.00000 \n     0.02643      0.88670      0.00000     -0.00000      0.00000     -0.63349      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.85088     -0.49173     -0.27224      0.00000      0.00000      0.00000      0.08120     -0.00000      0.00000     -0.00000     -0.24415      0.14106     -0.00000     -0.00000      0.00000      0.28898     15.86855 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.70217      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.48838     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.70217      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.48838      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.02643      0.88670      0.00000     -0.00000      0.00000     -0.63349      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00041      0.98275     -0.27224      0.00000      0.00000      0.00000      0.08120     -0.00000      0.00000     -0.00000     -0.00009     -0.28197      0.00000      0.00000     -0.00000      0.28898     15.86855 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.70217     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.48838     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.02643      0.88670      0.00000     -0.00000      0.00000     -0.63349      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.85129     -0.49102     -0.27224      0.00000      0.00000      0.00000      0.08120     -0.00000      0.00000     -0.00000      0.24424      0.14091     -0.00000     -0.00000      0.00000      0.28898     15.86855 \n    -0.00013     -0.12824     -0.00000      0.00000     -0.00000      0.30553     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.18865     -0.00000     -0.00000     -0.00000      0.53485      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      3.36864     -0.90119 \n    -0.00000     -0.00000      0.00000     -0.00237     -0.00000      0.00000     -0.00000     -0.06518      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.05332     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.33419      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00237      0.00000     -0.00000     -0.00000     -0.06518     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.05332      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.33419     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00237     -0.00000      0.00000      0.00000      0.06518     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.05332      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.33419     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00017      0.03895      0.00000     -0.00000      0.00000     -0.09432      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06166     -0.03563      0.06085      0.00000      0.00000      0.00000     -0.13167     -0.00000     -0.00000      0.00000      0.88311     -0.51024      0.00000      0.00000     -0.00000     -1.62574      0.19391 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.12335     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.76654     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.12335     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.76654     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00017      0.03895      0.00000     -0.00000      0.00000     -0.09432      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00003      0.07121      0.06085      0.00000      0.00000      0.00000     -0.13167     -0.00000     -0.00000      0.00000      0.00032      1.01991     -0.00000     -0.00000      0.00000     -1.62574      0.19391 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.12335      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.76654     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00017      0.03895      0.00000     -0.00000      0.00000     -0.09432      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.06169     -0.03558      0.06085      0.00000      0.00000      0.00000     -0.13167     -0.00000     -0.00000      0.00000     -0.88343     -0.50968      0.00000      0.00000     -0.00000     -1.62574      0.19391 \n     0.00011     -0.00964     -0.00000      0.00000     -0.00000      0.02460     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05189     -0.00000     -0.00000     -0.00000     -0.96480      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.76417     -0.02135 \n    -0.00000      0.00000      0.00000      0.00043     -0.00000     -0.00000      0.00000      0.00834     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08537      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.02212     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00043     -0.00000      0.00000      0.00000      0.00834      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.08537     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.02212      0.00000      0.00000 \n     0.00000      0.00000      0.00043     -0.00000      0.00000      0.00000     -0.00834     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.08537     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.02212      0.00000     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99572      0.41975     -0.00000     -0.00000     -0.00000      0.20132     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.08392      0.00000     -0.00000      0.00000      0.02373      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.07842      0.58495 \n    -0.01220     -1.03356      0.00000      0.00000      0.00000     -0.63865      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.27653     -0.00000      0.00000     -0.00000     -0.07766     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.26457     -0.24533 \n     0.00000      0.00000     -0.00000      0.99887     -0.00000      0.00000     -0.00000      0.51676      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.19422      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.05332      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.99887      0.00000      0.00000     -0.00000      0.51676     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.19422      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05332     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.99887      0.00000      0.00000     -0.00000     -0.51676      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.19422      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.05332      0.00000      0.00000      0.00000 \n     0.06021      1.86206     -0.00000     -0.00000     -0.00000      2.46939     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.16788      0.00000     -0.00000      0.00000      0.34620      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.22896    -35.14967 \n     0.00000     -0.00000      0.00000      0.00223      0.00000     -0.00000      0.00000     -1.10018     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.51066     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.14235     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00223      0.00000     -0.00000      0.00000     -1.10018     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.51066      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.14235      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00223     -0.00000     -0.00000      0.00000      1.10018     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.51066     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.14235     -0.00000     -0.00000      0.00000 \n    -0.02643     -0.88660      0.00000      0.00000      0.00000     -0.63347      0.00000     -0.00000     -0.00000      0.85085     -0.00000      0.00000      0.00000     -0.49209     -0.27178     -0.00000      0.00000     -0.00000     -0.07875     -0.13802     -0.24527      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.28840     15.86859 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.70243      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.48746      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.70243     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.48746      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.02643     -0.88660      0.00000      0.00000      0.00000     -0.63347      0.00000     -0.00000     -0.00000      0.00074     -0.00000      0.00000      0.00000      0.98290     -0.27178     -0.00000      0.00000     -0.00000     -0.07875      0.28142      0.00311     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.28840     15.86859 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.70243      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.48746     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.02643     -0.88660      0.00000      0.00000      0.00000     -0.63347      0.00000     -0.00000     -0.00000     -0.85158     -0.00000      0.00000      0.00000     -0.49081     -0.27178     -0.00000      0.00000     -0.00000     -0.07875     -0.14340      0.24216      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.28840     15.86859 \n     0.00013      0.12820     -0.00000     -0.00000     -0.00000      0.30456     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.19433     -0.00000      0.00000     -0.00000     -0.50811     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      3.37091     -0.90099 \n     0.00000      0.00000     -0.00000      0.00238     -0.00000      0.00000     -0.00000     -0.06469      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.05228      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.33756      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00238     -0.00000      0.00000     -0.00000     -0.06469     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.05228     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.33756     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00238     -0.00000     -0.00000      0.00000      0.06469      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.05228      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.33756      0.00000     -0.00000     -0.00000 \n     0.00017     -0.03894      0.00000      0.00000      0.00000     -0.09407      0.00000     -0.00000     -0.00000      0.06117     -0.00000      0.00000      0.00000     -0.03538      0.06367      0.00000     -0.00000      0.00000      0.11831      0.50019      0.88888     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.62669      0.19384 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.12239     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.76661      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.12239      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.76661     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00017     -0.03894      0.00000      0.00000      0.00000     -0.09407      0.00000     -0.00000     -0.00000      0.00005     -0.00000      0.00000      0.00000      0.07066      0.06367      0.00000     -0.00000      0.00000      0.11831     -1.01989     -0.01126      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.62669      0.19384 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.12239     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.76661      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00017     -0.03894      0.00000      0.00000      0.00000     -0.09407      0.00000     -0.00000     -0.00000     -0.06122     -0.00000      0.00000      0.00000     -0.03528      0.06367      0.00000     -0.00000      0.00000      0.11831      0.51970     -0.87762     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.62669      0.19384 \n    -0.00011      0.00964     -0.00000     -0.00000     -0.00000      0.02456     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.05409     -0.00000      0.00000     -0.00000      0.97103      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.75609     -0.02133 \n     0.00000     -0.00000      0.00000     -0.00043      0.00000     -0.00000      0.00000      0.00830     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.08863     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.02184      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00043      0.00000     -0.00000      0.00000      0.00830      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.08863      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.02184     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00043      0.00000      0.00000     -0.00000     -0.00830     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.08863     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.02184      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ag\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.43514     -1.15909      0.00000      0.00000      0.00000      2.66035      0.00000      0.00000      0.00000     -0.99729      0.00000      0.00000     -0.99729      0.00000     -0.99729      0.00916      0.00000      0.00000      0.00000     -0.05667      0.00000      0.00000     -0.05667      0.00000     -0.05667      0.05421      0.00000      0.00000      0.00000 \n    -1.15909      3.14049      0.00000      0.00000      0.00000     -7.76171      0.00000      0.00000      0.00000      2.81867      0.00000      0.00000      2.81867      0.00000      2.81867      0.07406      0.00000      0.00000      0.00000      0.15429      0.00000      0.00000      0.15429      0.00000      0.15429     -0.17028      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.62629      0.00000      0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36054      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03825      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.62629      0.00000      0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36054      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03825      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.62629      0.00000      0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36054      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03825 \n     2.66035     -7.76171      0.00000      0.00000      0.00000     22.29156      0.00000      0.00000      0.00000     -7.16866      0.00000      0.00000     -7.16866      0.00000     -7.16866     -1.11784      0.00000      0.00000      0.00000     -0.40714      0.00000      0.00000     -0.40714      0.00000     -0.40714      0.69974      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      2.97780      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09808      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      2.97780      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09808      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      2.97780      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09808 \n    -0.99729      2.81867      0.00000      0.00000      0.00000     -7.16866      0.00000      0.00000      0.00000      4.62115      0.00000      0.00000      1.50477      0.00000      1.50475      0.10830      0.00000      0.00000      0.00000     -0.24188      0.00000      0.00000      0.33335      0.00000      0.33334     -0.17119      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.23274      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.23274      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99729      2.81867      0.00000      0.00000      0.00000     -7.16866      0.00000      0.00000      0.00000      1.50477      0.00000      0.00000      4.62114      0.00000      1.50476      0.10830      0.00000      0.00000      0.00000      0.33335      0.00000      0.00000     -0.24188      0.00000      0.33336     -0.17119      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.23274      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99729      2.81867      0.00000      0.00000      0.00000     -7.16866      0.00000      0.00000      0.00000      1.50475      0.00000      0.00000      1.50476      0.00000      4.62116      0.10830      0.00000      0.00000      0.00000      0.33336      0.00000      0.00000      0.33335      0.00000     -0.24188     -0.17119      0.00000      0.00000      0.00000 \n     0.00916      0.07406      0.00000      0.00000      0.00000     -1.11784      0.00000      0.00000      0.00000      0.10830      0.00000      0.00000      0.10830      0.00000      0.10830      3.52629      0.00000      0.00000      0.00000     -0.33002      0.00000      0.00000     -0.33002      0.00000     -0.33002     -0.86041      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.36054      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25079      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.36054      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25079      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.36054      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25079      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367 \n    -0.05667      0.15429      0.00000      0.00000      0.00000     -0.40714      0.00000      0.00000      0.00000     -0.24188      0.00000      0.00000      0.33335      0.00000      0.33336     -0.33002      0.00000      0.00000      0.00000      1.93120      0.00000      0.00000     -0.87384      0.00000     -0.87384      0.24029      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.61005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.61005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05667      0.15429      0.00000      0.00000      0.00000     -0.40714      0.00000      0.00000      0.00000      0.33335      0.00000      0.00000     -0.24188      0.00000      0.33335     -0.33002      0.00000      0.00000      0.00000     -0.87384      0.00000      0.00000      1.93119      0.00000     -0.87385      0.24029      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.61005      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05667      0.15429      0.00000      0.00000      0.00000     -0.40714      0.00000      0.00000      0.00000      0.33334      0.00000      0.00000      0.33336      0.00000     -0.24188     -0.33002      0.00000      0.00000      0.00000     -0.87384      0.00000      0.00000     -0.87385      0.00000      1.93120      0.24029      0.00000      0.00000      0.00000 \n     0.05421     -0.17028      0.00000      0.00000      0.00000      0.69974      0.00000      0.00000      0.00000     -0.17119      0.00000      0.00000     -0.17119      0.00000     -0.17119     -0.86041      0.00000      0.00000      0.00000      0.24029      0.00000      0.00000      0.24029      0.00000      0.24029      1.87137      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03825      0.00000      0.00000      0.00000     -0.09808      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04046      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03825      0.00000      0.00000      0.00000     -0.09808      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04046      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03825      0.00000      0.00000      0.00000     -0.09808      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04046 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99814      0.99814      0.99814      0.99814      0.99814      0.01759      0.01759      0.01759      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.78621      0.78621      0.78621      0.78621      0.78621      0.00848      0.00848      0.00848      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -891.48660   -128.17290   -120.66910   -120.66910   -120.66910    -22.80530    -19.79871    -19.79871    -19.79871    -12.72755    -12.72755    -12.72755    -12.72755    -12.72755     -2.96396     -1.93247     -1.93247     -1.93247     -0.12510     -0.02283     -0.02283     -0.02283     -0.02283     -0.02283      0.04799      0.04799      0.04799      1.57199    202.67040 \n   </alphaeps>\n   <betaeps>\n  -891.48650   -128.16840   -120.66560   -120.66560   -120.66560    -22.80022    -19.79364    -19.79364    -19.79364    -12.72172    -12.72172    -12.72172    -12.72172    -12.72172     -2.93428     -1.90277     -1.90277     -1.90277     -0.12033      0.00698      0.00698      0.00698      0.00698      0.00698      0.05197      0.05197      0.05197      1.59060    202.67970 \n   </betaeps>\n   <alphavectors>\n    -0.99590      0.42004      0.00000     -0.00000     -0.00000     -0.20347     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.08578     -0.00000     -0.00000     -0.00000     -0.02373      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.08070     -0.59147 \n    -0.01186     -1.03259      0.00000     -0.00000      0.00000      0.64617      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.28329     -0.00000      0.00000      0.00000      0.07797     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.27296      0.25597 \n     0.00000     -0.00000     -0.00000      0.00000     -0.99953     -0.00000     -0.00000     -0.00000      0.52368     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.19959     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04983     -0.00000      0.00000 \n     0.00000      0.00000      0.99953      0.00000      0.00000     -0.00000      0.52368      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.19959      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.04983     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.99953     -0.00000     -0.00000     -0.00000      0.52368      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.19959     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.04983     -0.00000     -0.00000      0.00000 \n     0.06289      1.84827     -0.00000      0.00000     -0.00000     -2.48668     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.19292      0.00000     -0.00000     -0.00000     -0.34781      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.26610     35.18987 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00076      0.00000      0.00000      0.00000     -1.10364      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.52034      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.13187      0.00000     -0.00000 \n    -0.00000      0.00000      0.00076     -0.00000     -0.00000      0.00000     -1.10364     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.52034     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13187      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00076      0.00000      0.00000      0.00000     -1.10364     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.52034      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.13187      0.00000     -0.00000     -0.00000 \n    -0.02770     -0.88076      0.00000     -0.00000      0.00000      0.64114      0.00000      0.00000      0.00000     -0.44464      0.00000     -0.00000      0.00000     -0.87709     -0.27937     -0.00000      0.00000      0.00000      0.07983      0.12827     -0.00000      0.00000      0.00000     -0.25300      0.00000     -0.00000      0.00000     -0.29888    -15.89016 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.70322     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.49132      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.70322     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.49132      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.02770     -0.88076      0.00000     -0.00000      0.00000      0.64114      0.00000      0.00000      0.00000      0.98190      0.00000     -0.00000      0.00000      0.05347     -0.27937     -0.00000      0.00000      0.00000      0.07983     -0.28324     -0.00000      0.00000      0.00000      0.01541      0.00000     -0.00000      0.00000     -0.29888    -15.89016 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.70322     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.49132     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.02770     -0.88076      0.00000     -0.00000      0.00000      0.64114      0.00000      0.00000      0.00000     -0.53726      0.00000     -0.00000      0.00000      0.82362     -0.27937     -0.00000      0.00000      0.00000      0.07983      0.15497     -0.00000      0.00000      0.00000      0.23759      0.00000     -0.00000      0.00000     -0.29888    -15.89016 \n     0.00033      0.12781     -0.00000      0.00000     -0.00000     -0.31600     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.17522     -0.00000     -0.00000     -0.00000      0.51913     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -3.39127      0.90019 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00276      0.00000      0.00000      0.00000     -0.06469      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05852     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.30788     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00276     -0.00000     -0.00000      0.00000     -0.06469      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.05852      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.30788      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00276     -0.00000      0.00000      0.00000     -0.06469      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.05852     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.30788      0.00000      0.00000     -0.00000 \n     0.00011     -0.03844      0.00000     -0.00000      0.00000      0.09703      0.00000      0.00000      0.00000     -0.03068      0.00000     -0.00000      0.00000     -0.06052      0.05289     -0.00000      0.00000      0.00000     -0.13276     -0.46179     -0.00000      0.00000      0.00000      0.91083      0.00000     -0.00000      0.00000      1.61596     -0.19077 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.11752      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.76877     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.11752      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.76877     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00011     -0.03844      0.00000     -0.00000      0.00000      0.09703      0.00000      0.00000      0.00000      0.06775      0.00000     -0.00000      0.00000      0.00369      0.05289     -0.00000      0.00000      0.00000     -0.13276      1.01969     -0.00000      0.00000      0.00000     -0.05549      0.00000     -0.00000      0.00000      1.61596     -0.19077 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.11752      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.76877      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00011     -0.03844      0.00000     -0.00000      0.00000      0.09703      0.00000      0.00000      0.00000     -0.03707      0.00000     -0.00000      0.00000      0.05683      0.05289     -0.00000      0.00000      0.00000     -0.13276     -0.55791     -0.00000      0.00000      0.00000     -0.85533      0.00000     -0.00000      0.00000      1.61596     -0.19077 \n    -0.00009      0.00868     -0.00000      0.00000     -0.00000     -0.02324     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.04786     -0.00000     -0.00000     -0.00000     -0.96448     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.70399      0.01832 \n     0.00000      0.00000     -0.00000      0.00000      0.00045     -0.00000     -0.00000     -0.00000      0.00755      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.08089      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.01798      0.00000      0.00000 \n    -0.00000      0.00000     -0.00045     -0.00000     -0.00000     -0.00000      0.00755     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.08089     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.01798     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00045      0.00000     -0.00000     -0.00000      0.00755     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.08089      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.01798      0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99590      0.42004     -0.00000      0.00000      0.00000      0.20349     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.08580     -0.00000     -0.00000     -0.00000      0.02346      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.08072     -0.59146 \n    -0.01186     -1.03260     -0.00000      0.00000     -0.00000     -0.64624     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.28333      0.00000      0.00000      0.00000     -0.07706     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.27301      0.25595 \n     0.00000     -0.00000      0.00000     -0.00000      0.99953     -0.00000      0.00000      0.00000     -0.52371     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.19940      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05011      0.00000     -0.00000 \n     0.00000      0.00000     -0.99953     -0.00000     -0.00000      0.00000     -0.52371     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.19940     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05011     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.99953      0.00000      0.00000     -0.00000      0.52371     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.19940     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05011     -0.00000      0.00000     -0.00000 \n     0.06289      1.84818      0.00000     -0.00000      0.00000      2.48681      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.19252     -0.00000     -0.00000     -0.00000      0.34328      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.26570     35.18994 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00074      0.00000     -0.00000     -0.00000      1.10375      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.51991     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.13261     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00074      0.00000      0.00000     -0.00000      1.10375      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.51991      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13261      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00074     -0.00000     -0.00000      0.00000     -1.10375      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.51991      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.13261      0.00000     -0.00000      0.00000 \n    -0.02770     -0.88071     -0.00000      0.00000     -0.00000     -0.64113     -0.00000     -0.00000      0.00000     -0.44466     -0.00000     -0.00000     -0.00000      0.87716      0.27912      0.00000      0.00000      0.00000     -0.07871      0.12817      0.00000      0.00000     -0.00000     -0.25279     -0.00000      0.00000      0.00000     -0.29863    -15.89018 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.70334     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.49091      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.70334     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.49091      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.02770     -0.88071     -0.00000      0.00000     -0.00000     -0.64113     -0.00000     -0.00000      0.00000      0.98197     -0.00000     -0.00000     -0.00000     -0.05349      0.27912      0.00000      0.00000      0.00000     -0.07871     -0.28301      0.00000      0.00000     -0.00000      0.01540     -0.00000      0.00000      0.00000     -0.29863    -15.89018 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.70334      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.49091     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.02770     -0.88071     -0.00000      0.00000     -0.00000     -0.64113     -0.00000     -0.00000      0.00000     -0.53731     -0.00000     -0.00000     -0.00000     -0.82367      0.27912      0.00000      0.00000      0.00000     -0.07871      0.15484      0.00000      0.00000     -0.00000      0.23739      0.00000      0.00000      0.00000     -0.29863    -15.89018 \n     0.00033      0.12779      0.00000     -0.00000      0.00000      0.31553      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.17750      0.00000      0.00000      0.00000     -0.50702     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -3.39238      0.90010 \n     0.00000     -0.00000      0.00000     -0.00000      0.00276      0.00000      0.00000      0.00000      0.06445     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.05806      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.30948      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00276      0.00000      0.00000     -0.00000      0.06445     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.05806     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.30948     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00276      0.00000     -0.00000     -0.00000     -0.06445     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.05806     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.30948      0.00000      0.00000     -0.00000 \n     0.00011     -0.03843     -0.00000      0.00000     -0.00000     -0.09691     -0.00000      0.00000      0.00000     -0.03057     -0.00000      0.00000     -0.00000      0.06030     -0.05402     -0.00000     -0.00000     -0.00000      0.12676     -0.46179     -0.00000     -0.00000      0.00000      0.91084      0.00000      0.00000     -0.00000      1.61641     -0.19074 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.11710      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.76880      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11710      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.76880      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00011     -0.03843     -0.00000      0.00000     -0.00000     -0.09691     -0.00000      0.00000      0.00000      0.06751     -0.00000      0.00000     -0.00000     -0.00368     -0.05402     -0.00000     -0.00000     -0.00000      0.12676      1.01971     -0.00000     -0.00000      0.00000     -0.05550     -0.00000     -0.00000     -0.00000      1.61641     -0.19074 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.11710     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.76880      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00011     -0.03843     -0.00000      0.00000     -0.00000     -0.09691     -0.00000      0.00000      0.00000     -0.03694     -0.00000      0.00000     -0.00000     -0.05663     -0.05402     -0.00000     -0.00000     -0.00000      0.12676     -0.55792     -0.00000     -0.00000      0.00000     -0.85535     -0.00000     -0.00000     -0.00000      1.61641     -0.19074 \n    -0.00009      0.00868      0.00000     -0.00000      0.00000      0.02322      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.04881      0.00000      0.00000      0.00000      0.96708     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.70036      0.01831 \n     0.00000      0.00000      0.00000     -0.00000     -0.00045      0.00000      0.00000      0.00000     -0.00753     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.08242     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.01785     -0.00000      0.00000 \n    -0.00000      0.00000      0.00045      0.00000      0.00000     -0.00000     -0.00753     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.08242      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.01785      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00045     -0.00000     -0.00000      0.00000      0.00753      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.08242      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.01785      0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cd\" basis=\"MCP\">\n   <guessdensitymatrix>\n     2.43752     -1.16585      0.00000      0.00000      0.00000      2.66465      0.00000      0.00000      0.00000     -0.99646      0.00000      0.00000     -0.99646      0.00000     -0.99646      0.03749      0.00000      0.00000      0.00000     -0.07373      0.00000      0.00000     -0.07373      0.00000     -0.07373      0.06393      0.00000      0.00000      0.00000 \n    -1.16585      3.16159      0.00000      0.00000      0.00000     -7.79228      0.00000      0.00000      0.00000      2.82144      0.00000      0.00000      2.82144      0.00000      2.82144     -0.00566      0.00000      0.00000      0.00000      0.20474      0.00000      0.00000      0.20474      0.00000      0.20474     -0.19929      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.64750      0.00000      0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35881      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05078      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.64750      0.00000      0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35881      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05078      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.64750      0.00000      0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35881      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05078 \n     2.66465     -7.79228      0.00000      0.00000      0.00000     22.35111      0.00000      0.00000      0.00000     -7.16644      0.00000      0.00000     -7.16644      0.00000     -7.16644     -0.86727      0.00000      0.00000      0.00000     -0.57647      0.00000      0.00000     -0.57647      0.00000     -0.57647      0.79539      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      2.99521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12934      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      2.99521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12934      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      2.99521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12934 \n    -0.99646      2.82144      0.00000      0.00000      0.00000     -7.16644      0.00000      0.00000      0.00000      4.63755      0.00000      0.00000      1.48044      0.00000      1.48043      0.03448      0.00000      0.00000      0.00000     -0.27995      0.00000      0.00000      0.42398      0.00000      0.42400     -0.19566      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.31417      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.31417      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99646      2.82144      0.00000      0.00000      0.00000     -7.16644      0.00000      0.00000      0.00000      1.48044      0.00000      0.00000      4.63754      0.00000      1.48044      0.03448      0.00000      0.00000      0.00000      0.42399      0.00000      0.00000     -0.27993      0.00000      0.42397     -0.19566      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.31417      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99646      2.82144      0.00000      0.00000      0.00000     -7.16644      0.00000      0.00000      0.00000      1.48043      0.00000      0.00000      1.48044      0.00000      4.63752      0.03448      0.00000      0.00000      0.00000      0.42399      0.00000      0.00000      0.42398      0.00000     -0.27994     -0.19566      0.00000      0.00000      0.00000 \n     0.03749     -0.00566      0.00000      0.00000      0.00000     -0.86727      0.00000      0.00000      0.00000      0.03448      0.00000      0.00000      0.03448      0.00000      0.03448      3.50176      0.00000      0.00000      0.00000     -0.28622      0.00000      0.00000     -0.28622      0.00000     -0.28622     -0.70779      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.35881      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19692      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.35881      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19692      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.35881      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19692      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106 \n    -0.07373      0.20474      0.00000      0.00000      0.00000     -0.57647      0.00000      0.00000      0.00000     -0.27995      0.00000      0.00000      0.42399      0.00000      0.42399     -0.28622      0.00000      0.00000      0.00000      2.14739      0.00000      0.00000     -1.00673      0.00000     -1.00673      0.08168      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.30823      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.30823      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.07373      0.20474      0.00000      0.00000      0.00000     -0.57647      0.00000      0.00000      0.00000      0.42398      0.00000      0.00000     -0.27993      0.00000      0.42398     -0.28622      0.00000      0.00000      0.00000     -1.00673      0.00000      0.00000      2.14738      0.00000     -1.00672      0.08168      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.30823      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.07373      0.20474      0.00000      0.00000      0.00000     -0.57647      0.00000      0.00000      0.00000      0.42400      0.00000      0.00000      0.42397      0.00000     -0.27994     -0.28622      0.00000      0.00000      0.00000     -1.00673      0.00000      0.00000     -1.00672      0.00000      2.14738      0.08168      0.00000      0.00000      0.00000 \n     0.06393     -0.19929      0.00000      0.00000      0.00000      0.79539      0.00000      0.00000      0.00000     -0.19566      0.00000      0.00000     -0.19566      0.00000     -0.19566     -0.70779      0.00000      0.00000      0.00000      0.08168      0.00000      0.00000      0.08168      0.00000      0.08168      2.07429      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.05078      0.00000      0.00000      0.00000     -0.12934      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02481      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05078      0.00000      0.00000      0.00000     -0.12934      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02481      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05078      0.00000      0.00000      0.00000     -0.12934      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02481 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99897      0.99897      0.99897      0.99897      0.99897      0.00171      0.00171      0.00171      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99897      0.99897      0.99897      0.99897      0.99897      0.00171      0.00171      0.00171      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -931.93550   -134.77850   -127.04970   -127.04970   -127.04970    -24.13071    -21.05430    -21.05430    -21.05430    -13.73851    -13.73851    -13.73851    -13.73851    -13.73851     -3.01629     -1.94626     -1.94626     -1.94626     -0.04791      0.08741      0.08741      0.08741      0.08741      0.08741      0.17237      0.17237      0.17237      2.14534    216.31750 \n   </alphaeps>\n   <betaeps>\n  -931.93550   -134.77850   -127.04970   -127.04970   -127.04970    -24.13071    -21.05430    -21.05430    -21.05430    -13.73851    -13.73851    -13.73851    -13.73851    -13.73851     -3.01629     -1.94626     -1.94626     -1.94626     -0.04791      0.08741      0.08741      0.08741      0.08741      0.08741      0.17237      0.17237      0.17237      2.14534    216.31750 \n   </betaeps>\n   <alphavectors>\n     0.99596     -0.41997      0.00000      0.00000      0.00000      0.20509     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08790     -0.00000      0.00000     -0.00000      0.02566      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.08757     -0.59812 \n     0.01171      1.03110      0.00000      0.00000      0.00000     -0.65240      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.29120      0.00000     -0.00000      0.00000     -0.08408     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.29799      0.26721 \n     0.00000      0.00000     -1.00044      0.00000      0.00000     -0.00000     -0.53099     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.20227      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.06728      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00044      0.00000      0.00000     -0.00000     -0.00000      0.53099     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.20227     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.06728      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00044     -0.00000      0.00000     -0.53099      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.20227     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.06728     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.06279     -1.82632      0.00000      0.00000      0.00000      2.49249     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.22002     -0.00000      0.00000     -0.00000      0.36771      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.38826     35.22676 \n     0.00000      0.00000      0.00122      0.00000      0.00000      0.00000      1.10679      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.52208     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.17672     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00122      0.00000     -0.00000      0.00000      0.00000     -1.10679      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.52208      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.17672      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00122      0.00000     -0.00000      1.10679     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.52208      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.17672      0.00000      0.00000      0.00000     -0.00000 \n     0.02767      0.87160      0.00000      0.00000      0.00000     -0.64535      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.96961      0.16132      0.28708      0.00000     -0.00000      0.00000     -0.08401     -0.00000     -0.00000      0.00000     -0.29304     -0.02051      0.00000      0.00000     -0.00000     -0.33050    -15.91068 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.70249      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.50880      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.70249      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.50880     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.02767      0.87160      0.00000      0.00000      0.00000     -0.64535      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.62451      0.75905      0.28708      0.00000     -0.00000      0.00000     -0.08401     -0.00000     -0.00000      0.00000      0.16428     -0.24352      0.00000      0.00000     -0.00000     -0.33050    -15.91068 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.70249      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.50880     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.02767      0.87160      0.00000      0.00000      0.00000     -0.64535      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.34510     -0.92036      0.28708      0.00000     -0.00000      0.00000     -0.08401     -0.00000     -0.00000      0.00000      0.12876      0.26403      0.00000      0.00000     -0.00000     -0.33050    -15.91068 \n    -0.00026     -0.14044      0.00000      0.00000      0.00000      0.36783     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.18617     -0.00000      0.00000     -0.00000     -0.43458      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -3.94387      0.92441 \n     0.00000      0.00000     -0.00337      0.00000      0.00000      0.00000      0.06694     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.04579      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.41222      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00337      0.00000     -0.00000      0.00000      0.00000     -0.06694     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.04579      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.41222     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00337     -0.00000      0.00000      0.06694      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.04579     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.41222      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00016      0.04454      0.00000      0.00000      0.00000     -0.11977      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.06600      0.01098     -0.06057      0.00000     -0.00000      0.00000      0.04821     -0.00000     -0.00000      0.00000      1.02121      0.07146      0.00000      0.00000     -0.00000      1.89477     -0.19888 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.11589      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.77311     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.11589     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.77311      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00016      0.04454      0.00000      0.00000      0.00000     -0.11977      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.04251      0.05167     -0.06057      0.00000     -0.00000      0.00000      0.04821     -0.00000     -0.00000      0.00000     -0.57249      0.84866      0.00000      0.00000     -0.00000      1.89477     -0.19888 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.11589     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.77311      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00016      0.04454      0.00000      0.00000      0.00000     -0.11977      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02349     -0.06265     -0.06057      0.00000     -0.00000      0.00000      0.04821     -0.00000     -0.00000      0.00000     -0.44872     -0.92012      0.00000      0.00000     -0.00000      1.89477     -0.19888 \n     0.00013     -0.01112      0.00000      0.00000      0.00000      0.03216     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06256     -0.00000      0.00000     -0.00000      1.01591      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.84277      0.01380 \n     0.00000      0.00000      0.00074      0.00000      0.00000      0.00000     -0.01047     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.10228     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.03471      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00074      0.00000      0.00000     -0.00000     -0.00000      0.01047      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.10228      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.03471      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00074      0.00000     -0.00000     -0.01047     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.10228      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.03471      0.00000      0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99596     -0.41997      0.00000      0.00000      0.00000      0.20509     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08790     -0.00000      0.00000     -0.00000      0.02566      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.08757     -0.59812 \n     0.01171      1.03110      0.00000      0.00000      0.00000     -0.65240      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.29120      0.00000     -0.00000      0.00000     -0.08408     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.29799      0.26721 \n     0.00000      0.00000     -1.00044      0.00000      0.00000     -0.00000     -0.53099     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.20227      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.06728      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00044      0.00000      0.00000     -0.00000     -0.00000      0.53099     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.20227     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.06728      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00044     -0.00000      0.00000     -0.53099      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.20227     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.06728     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.06279     -1.82632      0.00000      0.00000      0.00000      2.49249     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.22002     -0.00000      0.00000     -0.00000      0.36771      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.38826     35.22676 \n     0.00000      0.00000      0.00122      0.00000      0.00000      0.00000      1.10679      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.52208     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.17672     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00122      0.00000     -0.00000      0.00000      0.00000     -1.10679      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.52208      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.17672      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00122      0.00000     -0.00000      1.10679     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.52208      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.17672      0.00000      0.00000      0.00000     -0.00000 \n     0.02767      0.87160      0.00000      0.00000      0.00000     -0.64535      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.96961      0.16132      0.28708      0.00000     -0.00000      0.00000     -0.08401     -0.00000     -0.00000      0.00000     -0.29304     -0.02051      0.00000      0.00000     -0.00000     -0.33050    -15.91068 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.70249      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.50880      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.70249      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.50880     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.02767      0.87160      0.00000      0.00000      0.00000     -0.64535      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.62451      0.75905      0.28708      0.00000     -0.00000      0.00000     -0.08401     -0.00000     -0.00000      0.00000      0.16428     -0.24352      0.00000      0.00000     -0.00000     -0.33050    -15.91068 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.70249      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.50880     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.02767      0.87160      0.00000      0.00000      0.00000     -0.64535      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.34510     -0.92036      0.28708      0.00000     -0.00000      0.00000     -0.08401     -0.00000     -0.00000      0.00000      0.12876      0.26403      0.00000      0.00000     -0.00000     -0.33050    -15.91068 \n    -0.00026     -0.14044      0.00000      0.00000      0.00000      0.36783     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.18617     -0.00000      0.00000     -0.00000     -0.43458      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -3.94387      0.92441 \n     0.00000      0.00000     -0.00337      0.00000      0.00000      0.00000      0.06694     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.04579      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.41222      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00337      0.00000     -0.00000      0.00000      0.00000     -0.06694     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.04579      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.41222     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00337     -0.00000      0.00000      0.06694      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.04579     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.41222      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00016      0.04454      0.00000      0.00000      0.00000     -0.11977      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.06600      0.01098     -0.06057      0.00000     -0.00000      0.00000      0.04821     -0.00000     -0.00000      0.00000      1.02121      0.07146      0.00000      0.00000     -0.00000      1.89477     -0.19888 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.11589      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.77311     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.11589     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.77311      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00016      0.04454      0.00000      0.00000      0.00000     -0.11977      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.04251      0.05167     -0.06057      0.00000     -0.00000      0.00000      0.04821     -0.00000     -0.00000      0.00000     -0.57249      0.84866      0.00000      0.00000     -0.00000      1.89477     -0.19888 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.11589     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.77311      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00016      0.04454      0.00000      0.00000      0.00000     -0.11977      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02349     -0.06265     -0.06057      0.00000     -0.00000      0.00000      0.04821     -0.00000     -0.00000      0.00000     -0.44872     -0.92012      0.00000      0.00000     -0.00000      1.89477     -0.19888 \n     0.00013     -0.01112      0.00000      0.00000      0.00000      0.03216     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06256     -0.00000      0.00000     -0.00000      1.01591      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.84277      0.01380 \n     0.00000      0.00000      0.00074      0.00000      0.00000      0.00000     -0.01047     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.10228     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.03471      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00074      0.00000      0.00000     -0.00000     -0.00000      0.01047      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.10228      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.03471      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00074      0.00000     -0.00000     -0.01047     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.10228      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.03471      0.00000      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ga\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.00091     -0.00282      0.00000      0.00000      0.00000      0.00980      0.00000      0.00000      0.00000     -0.00097      0.00000      0.00000     -0.00097      0.00000     -0.00132     -0.04325      0.00000      0.00000      0.00000 \n    -0.00282      0.00878      0.00000      0.00000      0.00000     -0.03050      0.00000      0.00000      0.00000      0.00302      0.00000      0.00000      0.00302      0.00000      0.00409      0.13464      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.26408      0.00000      0.00000      0.00000     -0.77300      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02919      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.26408      0.00000      0.00000      0.00000     -0.77300      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02919      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.26416      0.00000      0.00000      0.00000     -0.77325      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03032 \n     0.00980     -0.03050      0.00000      0.00000      0.00000      0.10593      0.00000      0.00000      0.00000     -0.01059      0.00000      0.00000     -0.01059      0.00000     -0.01400     -0.46760      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.77300      0.00000      0.00000      0.00000      2.26320      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09679      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.77300      0.00000      0.00000      0.00000      2.26320      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09679      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.77325      0.00000      0.00000      0.00000      2.26398      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.10082 \n    -0.00097      0.00302      0.00000      0.00000      0.00000     -0.01059      0.00000      0.00000      0.00000      2.00114      0.00000      0.00000     -0.99889      0.00000     -0.99861      0.05175      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00097      0.00302      0.00000      0.00000      0.00000     -0.01059      0.00000      0.00000      0.00000     -0.99889      0.00000      0.00000      2.00114      0.00000     -0.99861      0.05175      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00132      0.00409      0.00000      0.00000      0.00000     -0.01400      0.00000      0.00000      0.00000     -0.99861      0.00000      0.00000     -0.99861      0.00000      2.00163      0.05179      0.00000      0.00000      0.00000 \n    -0.04325      0.13464      0.00000      0.00000      0.00000     -0.46760      0.00000      0.00000      0.00000      0.05175      0.00000      0.00000      0.05175      0.00000      0.05179      2.06524      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.02919      0.00000      0.00000      0.00000     -0.09679      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34041      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02919      0.00000      0.00000      0.00000     -0.09679      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34041      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03032      0.00000      0.00000      0.00000     -0.10082      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36104 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33041      0.31290      0.31290      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.01614      0.01383      0.01383      0.00000 \n   </betaocc>\n   <alphaeps>\n  -371.94320    -49.61001    -45.39447    -45.39211    -45.39211     -8.87091     -7.23166     -7.23166     -7.23106     -4.18125     -4.17759     -4.17759     -4.17265     -4.17265     -0.72014     -0.48774     -0.48705     -0.48705     40.78386 \n   </alphaeps>\n   <betaeps>\n  -371.94190    -49.25758    -45.12449    -45.11859    -45.11859     -7.95777     -6.31218     -6.29965     -6.29965     -3.20684     -3.20684     -3.20548     -3.19534     -3.19534     -0.69611     -0.46367     -0.46280     -0.46280     41.25893 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00002      0.00000      0.00000     -0.00000     -0.00000      0.02079     -0.00000     -0.00000     -0.00000      0.37995 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00006      0.00000     -0.00000     -0.00000      0.00000     -0.06473      0.00000      0.00000     -0.00000      0.05690 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.36553     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.05336      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.36553      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.05336     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.36551     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.05337     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00013     -0.00000      0.00000      0.00000     -0.00000      0.22482     -0.00000     -0.00000      0.00000    -33.36497 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.06207      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.19053     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.06207     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.19053      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.06206      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.19057      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.50000      0.00000     -0.86603     -0.00000     -0.00000     -0.02506      0.00000      0.00000     -0.00000     14.93784 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.50000      0.00000      0.86603     -0.00000     -0.00000     -0.02506      0.00000      0.00000     -0.00000     14.93784 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02498     -0.00000      0.00000      0.00000     14.93784 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00005     -0.00000     -0.00000     -0.00000      0.00000     -1.01610      0.00000      0.00000     -0.00000     -0.32986 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02159     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.01989      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.02159      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.01989      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02156      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.01989     -0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00025     -0.00000      0.00000      0.02177      0.00000      0.00000      0.00000      0.37903 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00076      0.00000      0.00000     -0.06777     -0.00000     -0.00000      0.00000      0.05929 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.35990     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.05700      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.35990     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.05700      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35996      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.05695      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00236     -0.00000     -0.00000      0.23533      0.00000      0.00000     -0.00000    -33.36936 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.05985      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.20301      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05985     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.20301     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05988      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.20284     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.49983      0.86603      0.00000     -0.02579     -0.00000     -0.00000      0.00000     14.93922 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.49983     -0.86603      0.00000     -0.02579     -0.00000     -0.00000      0.00000     14.93922 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.00016      0.00000     -0.00000     -0.02613      0.00000     -0.00000     -0.00000     14.93921 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00020     -0.00000      0.00000     -1.01626     -0.00000     -0.00000      0.00000     -0.32990 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00962     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.02007      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00962     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.02007      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00978     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.02007      0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ge\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.00237     -0.00727      0.00000      0.00000      0.00000      0.02412      0.00000      0.00000      0.00000     -0.00242      0.00000      0.00000     -0.00373      0.00000     -0.00242     -0.07018      0.00000      0.00000      0.00000 \n    -0.00727      0.02232      0.00000      0.00000      0.00000     -0.07407      0.00000      0.00000      0.00000      0.00745      0.00000      0.00000      0.01143      0.00000      0.00745      0.21555      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.29458      0.00000      0.00000      0.00000     -0.82746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09686      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.29898      0.00000      0.00000      0.00000     -0.84145      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14233      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.29458      0.00000      0.00000      0.00000     -0.82746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09686 \n     0.02412     -0.07407      0.00000      0.00000      0.00000      0.24581      0.00000      0.00000      0.00000     -0.02462      0.00000      0.00000     -0.03815      0.00000     -0.02462     -0.71520      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.82746      0.00000      0.00000      0.00000      2.32686      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.33479      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.84145      0.00000      0.00000      0.00000      2.37141      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.48122      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.82746      0.00000      0.00000      0.00000      2.32686      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.33479 \n    -0.00242      0.00745      0.00000      0.00000      0.00000     -0.02462      0.00000      0.00000      0.00000      1.23934      0.00000      0.00000     -0.92642      0.00000     -0.30429      0.08515      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.64346      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.08724      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00373      0.01143      0.00000      0.00000      0.00000     -0.03815      0.00000      0.00000      0.00000     -0.92642      0.00000      0.00000      1.86667      0.00000     -0.92642      0.08387      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.64345      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00242      0.00745      0.00000      0.00000      0.00000     -0.02462      0.00000      0.00000      0.00000     -0.30429      0.00000      0.00000     -0.92642      0.00000      1.23934      0.08515      0.00000      0.00000      0.00000 \n    -0.07018      0.21555      0.00000      0.00000      0.00000     -0.71520      0.00000      0.00000      0.00000      0.08515      0.00000      0.00000      0.08387      0.00000      0.08515      2.08172      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.09686      0.00000      0.00000      0.00000     -0.33479      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.58779      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.14233      0.00000      0.00000      0.00000     -0.48122      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.06878      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.09686      0.00000      0.00000      0.00000     -0.33479      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.58779 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.86783      0.55465      0.55465      0.11674      0.11674      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      0.99317      0.99317      0.99310      0.96830      0.91234      0.91233      0.50849      0.50849      0.00000 \n   </betaocc>\n   <alphaeps>\n  -391.93330    -47.46448    -43.08636    -43.07390    -43.07390     -5.14793     -3.43861     -3.40849     -3.40849     -0.31160     -0.03175     -0.02333     -0.02333      0.03131      0.04515      0.04515      0.06395      0.06395     50.90978 \n   </alphaeps>\n   <betaeps>\n  -391.93090    -47.47659    -43.09254    -43.08330    -43.08330     -5.17610     -3.45901     -3.43961     -3.43961     -0.24677      0.01222      0.01222      0.01228      0.02084      0.02793      0.02793      0.04680      0.04680     50.91639 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.03450     -0.00000      0.00000     -0.00000     -0.00076     -0.00000     -0.00000      0.00000     -0.00000      0.40161 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.10607      0.00000     -0.00000      0.00000      0.00232      0.00000      0.00000     -0.00000      0.00000      0.02786 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.37395     -0.00000     -0.00000     -0.00000     -0.09832      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37414      0.00000     -0.00000     -0.00000     -0.09802      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37395     -0.00000      0.00000     -0.00000     -0.09832     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.35541     -0.00000      0.00000     -0.00000     -0.00789     -0.00000      0.00000      0.00000     -0.00000    -33.57112 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.04275      0.00000      0.00000      0.00000      0.31614     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.04301     -0.00000      0.00000      0.00000      0.31525     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.04275      0.00000     -0.00000      0.00000      0.31614      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.04560      0.00000     -0.00000      0.00000     -0.49899      0.00000      0.00000     -0.86603      0.00000     15.04050 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03860     -0.00000     -0.00000      0.00000      1.00098     -0.00000     -0.00000     -0.00000      0.00000     15.04051 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.04560      0.00000     -0.00000      0.00000     -0.49899      0.00000      0.00000      0.86603     -0.00000     15.04050 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.02014      0.00000      0.00000      0.00000      0.00459      0.00000      0.00000     -0.00000      0.00000     -0.35079 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07439     -0.00000     -0.00000     -0.00000     -1.02247      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07352     -0.00000      0.00000     -0.00000     -1.02253      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.07439     -0.00000      0.00000     -0.00000     -1.02247     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.03429      0.00000      0.00000     -0.00030     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.40163 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10520      0.00000     -0.00000      0.00091     -0.00000      0.00000      0.00000      0.00000      0.00000      0.02780 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37459      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.09668     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37458     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.09686      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.37459     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.09668      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.34559     -0.00000      0.00000     -0.00310     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000    -33.57101 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.04416     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.31143     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.04401      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.31191     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.04416      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.31143     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03869     -0.00000      0.00000     -0.49959     -0.00000     -0.00000      0.86603      0.00000     -0.00000     15.04046 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04195      0.00000     -0.00000      1.00040     -0.00000      0.00000      0.00000      0.00000      0.00000     15.04046 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03869     -0.00000      0.00000     -0.49959     -0.00000      0.00000     -0.86603     -0.00000      0.00000     15.04046 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.02030      0.00000     -0.00000     -0.00231      0.00000      0.00000      0.00000      0.00000      0.00000     -0.35058 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06977      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.02280      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07025      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.02276     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06977     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.02280     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"As\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.00263     -0.00817      0.00000      0.00000      0.00000      0.02891      0.00000      0.00000      0.00000     -0.00431      0.00000      0.00000     -0.00431      0.00000     -0.00431     -0.07398      0.00000      0.00000      0.00000 \n    -0.00817      0.02536      0.00000      0.00000      0.00000     -0.08979      0.00000      0.00000      0.00000      0.01337      0.00000      0.00000      0.01337      0.00000      0.01337      0.22976      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.31216      0.00000      0.00000      0.00000     -0.84719      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04903      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.31216      0.00000      0.00000      0.00000     -0.84719      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04903      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.31216      0.00000      0.00000      0.00000     -0.84719      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04903 \n     0.02891     -0.08979      0.00000      0.00000      0.00000      0.31790      0.00000      0.00000      0.00000     -0.04736      0.00000      0.00000     -0.04736      0.00000     -0.04736     -0.81334      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.84719      0.00000      0.00000      0.00000      2.30107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17643      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.84719      0.00000      0.00000      0.00000      2.30107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17643      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.84719      0.00000      0.00000      0.00000      2.30107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17643 \n    -0.00431      0.01337      0.00000      0.00000      0.00000     -0.04736      0.00000      0.00000      0.00000      2.00707      0.00000      0.00000     -0.99295      0.00000     -0.99294      0.12114      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00431      0.01337      0.00000      0.00000      0.00000     -0.04736      0.00000      0.00000      0.00000     -0.99295      0.00000      0.00000      2.00706      0.00000     -0.99293      0.12114      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00431      0.01337      0.00000      0.00000      0.00000     -0.04736      0.00000      0.00000      0.00000     -0.99294      0.00000      0.00000     -0.99293      0.00000      2.00705      0.12114      0.00000      0.00000      0.00000 \n    -0.07398      0.22976      0.00000      0.00000      0.00000     -0.81334      0.00000      0.00000      0.00000      0.12114      0.00000      0.00000      0.12114      0.00000      0.12114      2.08127      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.04903      0.00000      0.00000      0.00000     -0.17643      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05675      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.04903      0.00000      0.00000      0.00000     -0.17643      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05675      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04903      0.00000      0.00000      0.00000     -0.17643      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05675 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99952      0.99952      0.99952      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00048      0.00048      0.00048      0.00000 \n   </betaocc>\n   <alphaeps>\n  -418.56820    -51.33130    -46.75587    -46.75587    -46.75587     -5.86395     -4.03478     -4.03478     -4.03478     -0.39477     -0.31891     -0.31891     -0.31891     -0.31891     -0.31891     -0.07863     -0.07863     -0.07863     57.57434 \n   </alphaeps>\n   <betaeps>\n  -418.56410    -51.32742    -46.75124    -46.75124    -46.75124     -5.85482     -4.02439     -4.02439     -4.02439     -0.30998     -0.30998     -0.30998     -0.30998     -0.30998     -0.30122      0.01476      0.01476      0.01476     57.60987 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.03632      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.41806 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.11295     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00597 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.38833      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.10172     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.38833      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.10172      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.38833      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.10172     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.40415     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     33.63117 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.04840     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.31768      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.04840     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.31768     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.04840     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.31768     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06152     -0.40269      0.91534      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000    -15.07151 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06152     -0.59136     -0.80641      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000    -15.07151 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06152      0.99405     -0.10893      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000    -15.07151 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.02004     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.35420 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.07227      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.02309      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07227      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.02309      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07227      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.02309      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.03620      0.00000     -0.00000      0.00000     -0.41805 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.11228     -0.00000      0.00000     -0.00000     -0.00599 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.38860     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.10062     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.38860     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.10062     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.38860     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.10062      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.39315      0.00000     -0.00000      0.00000     33.63126 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.04929      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.31474     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.04929      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.31474     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.04929      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.31474      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.54984     -0.83527      0.00000     -0.00000     -0.00000      0.05723     -0.00000      0.00000     -0.00000    -15.07153 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.44844      0.89381      0.00000     -0.00000     -0.00000      0.05723     -0.00000      0.00000     -0.00000    -15.07153 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.99828     -0.05854      0.00000     -0.00000     -0.00000      0.05723     -0.00000      0.00000     -0.00000    -15.07153 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.02019      0.00000     -0.00000      0.00000      0.35393 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06940     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.02329      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.06940      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.02329      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.06940     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.02329      0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Se\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.00269     -0.00846      0.00000      0.00000      0.00000      0.03147      0.00000      0.00000      0.00000     -0.00539      0.00000      0.00000     -0.00539      0.00000     -0.00539     -0.07481      0.00000      0.00000      0.00000 \n    -0.00846      0.02658      0.00000      0.00000      0.00000     -0.09886      0.00000      0.00000      0.00000      0.01693      0.00000      0.00000      0.01693      0.00000      0.01693      0.23499      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.33752      0.00000      0.00000      0.00000     -0.89177      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08630      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.33752      0.00000      0.00000      0.00000     -0.89177      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08630      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.33752      0.00000      0.00000      0.00000     -0.89177      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08630 \n     0.03147     -0.09886      0.00000      0.00000      0.00000      0.36775      0.00000      0.00000      0.00000     -0.06298      0.00000      0.00000     -0.06298      0.00000     -0.06298     -0.87408      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.89177      0.00000      0.00000      0.00000      2.35849      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28507      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.89177      0.00000      0.00000      0.00000      2.35849      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28507      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.89177      0.00000      0.00000      0.00000      2.35849      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28507 \n    -0.00539      0.01693      0.00000      0.00000      0.00000     -0.06298      0.00000      0.00000      0.00000      2.01079      0.00000      0.00000     -0.98921      0.00000     -0.98921      0.14969      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00539      0.01693      0.00000      0.00000      0.00000     -0.06298      0.00000      0.00000      0.00000     -0.98921      0.00000      0.00000      2.01080      0.00000     -0.98923      0.14969      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00539      0.01693      0.00000      0.00000      0.00000     -0.06298      0.00000      0.00000      0.00000     -0.98921      0.00000      0.00000     -0.98923      0.00000      2.01080      0.14969      0.00000      0.00000      0.00000 \n    -0.07481      0.23499      0.00000      0.00000      0.00000     -0.87408      0.00000      0.00000      0.00000      0.14969      0.00000      0.00000      0.14969      0.00000      0.14969      2.07764      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.08630      0.00000      0.00000      0.00000     -0.28507      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.40352      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.08630      0.00000      0.00000      0.00000     -0.28507      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.40351      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.08630      0.00000      0.00000      0.00000     -0.28507      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.40351 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99988      0.99988      0.99988      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33345      0.33345      0.33345      0.00000 \n   </betaocc>\n   <alphaeps>\n  -446.39520    -55.63866    -50.86171    -50.86171    -50.86171     -6.78223     -4.85142     -4.85142     -4.85142     -0.89570     -0.89570     -0.89570     -0.89570     -0.89570     -0.48748     -0.14509     -0.14509     -0.14509     64.36452 \n   </alphaeps>\n   <betaeps>\n  -446.39250    -55.63606    -50.85860    -50.85860    -50.85860     -6.77625     -4.84472     -4.84472     -4.84472     -0.88987     -0.88987     -0.88987     -0.88987     -0.88987     -0.42939     -0.08706     -0.08706     -0.08706     64.38718 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.03673     -0.00000      0.00000      0.00000     -0.43230 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.11547      0.00000     -0.00000     -0.00000      0.01297 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40238      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.10111      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.40238     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.10111     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40238      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.10111     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.43185     -0.00000      0.00000      0.00000     33.66326 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05620      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.30832      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.05620     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.30832     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05620     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.30832      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.00000     -0.00000     -0.00000      0.00000     -0.00000      0.07463      0.00000     -0.00000     -0.00000    -15.08854 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.50000     -0.00000     -0.00000      0.00000     -0.86603      0.07463      0.00000     -0.00000     -0.00000    -15.08854 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.50000     -0.00000     -0.00000      0.00000      0.86603      0.07463      0.00000     -0.00000     -0.00000    -15.08854 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.01918     -0.00000      0.00000      0.00000      0.35361 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06460     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.02297     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06460      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.02297      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06460      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.02297     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03667      0.00000     -0.00000      0.00000     -0.43230 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.11509     -0.00000      0.00000     -0.00000      0.01296 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40252      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.10054     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40252      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.10054     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.40252      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.10054     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.42574      0.00000     -0.00000      0.00000     33.66331 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05664      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.30683      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.05664     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.30683      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.05664     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.30683     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.00000      0.00000     -0.00000      0.00000      0.00000      0.07224     -0.00000      0.00000     -0.00000    -15.08855 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.50000     -0.00000      0.00000     -0.00000      0.86603      0.07224     -0.00000      0.00000     -0.00000    -15.08855 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.50000     -0.00000      0.00000     -0.00000     -0.86603      0.07224     -0.00000      0.00000     -0.00000    -15.08855 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.01927     -0.00000      0.00000     -0.00000      0.35346 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06316     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.02306     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.06316      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.02306      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06316      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.02306     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Br\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.00313     -0.00990      0.00000      0.00000      0.00000      0.03800      0.00000      0.00000      0.00000     -0.00706      0.00000      0.00000     -0.00706      0.00000     -0.00706     -0.08074      0.00000      0.00000      0.00000 \n    -0.00990      0.03134      0.00000      0.00000      0.00000     -0.12032      0.00000      0.00000      0.00000      0.02236      0.00000      0.00000      0.02236      0.00000      0.02236      0.25564      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.36332      0.00000      0.00000      0.00000     -0.93748      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13108      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.36332      0.00000      0.00000      0.00000     -0.93748      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13108      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.36332      0.00000      0.00000      0.00000     -0.93748      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13108 \n     0.03800     -0.12032      0.00000      0.00000      0.00000      0.46198      0.00000      0.00000      0.00000     -0.08584      0.00000      0.00000     -0.08584      0.00000     -0.08584     -0.98155      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.93748      0.00000      0.00000      0.00000      2.42229      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.41385      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.93748      0.00000      0.00000      0.00000      2.42229      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.41385      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.93748      0.00000      0.00000      0.00000      2.42229      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.41385 \n    -0.00706      0.02236      0.00000      0.00000      0.00000     -0.08584      0.00000      0.00000      0.00000      2.01595      0.00000      0.00000     -0.98405      0.00000     -0.98405      0.18238      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00706      0.02236      0.00000      0.00000      0.00000     -0.08584      0.00000      0.00000      0.00000     -0.98405      0.00000      0.00000      2.01597      0.00000     -0.98407      0.18238      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00706      0.02236      0.00000      0.00000      0.00000     -0.08584      0.00000      0.00000      0.00000     -0.98405      0.00000      0.00000     -0.98407      0.00000      2.01597      0.18238      0.00000      0.00000      0.00000 \n    -0.08074      0.25564      0.00000      0.00000      0.00000     -0.98155      0.00000      0.00000      0.00000      0.18238      0.00000      0.00000      0.18238      0.00000      0.18238      2.08549      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.13108      0.00000      0.00000      0.00000     -0.41385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.76102      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.13108      0.00000      0.00000      0.00000     -0.41385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.76102      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.13108      0.00000      0.00000      0.00000     -0.41385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.76102 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99047      0.99047      0.99047      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.67620      0.67620      0.67620      0.00000 \n   </betaocc>\n   <alphaeps>\n  -475.02400    -60.02799    -55.05942    -55.05942    -55.05942     -7.66783     -5.64211     -5.64211     -5.64211     -1.44332     -1.44332     -1.44332     -1.44332     -1.44332     -0.55996     -0.17459     -0.17459     -0.17459     72.03976 \n   </alphaeps>\n   <betaeps>\n  -475.02250    -60.02661    -55.05775    -55.05775    -55.05775     -7.66474     -5.63869     -5.63869     -5.63869     -1.44032     -1.44032     -1.44032     -1.44032     -1.44032     -0.53324     -0.14790     -0.14790     -0.14790     72.05039 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.03955      0.00000     -0.00000     -0.00000     -0.44753 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.12526      0.00000      0.00000      0.00000      0.03318 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.41491      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.10679     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.41491     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.10679     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.41491     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.10679     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.48195     -0.00000     -0.00000     -0.00000     33.78777 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.06124      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.31910      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.06124      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.31910      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.06124      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.31910      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.00000     -0.00000     -0.00000      0.00000      0.00000      0.08982      0.00000      0.00000      0.00000    -15.15017 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.50000      0.00000      0.00000      0.86603     -0.00000      0.08982      0.00000      0.00000      0.00000    -15.15017 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.50000      0.00000      0.00000     -0.86603     -0.00000      0.08982      0.00000      0.00000      0.00000    -15.15017 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.02113      0.00000     -0.00000     -0.00000      0.36389 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06211     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.02567     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06211     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.02567     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06211     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.02567      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.03952     -0.00000     -0.00000      0.00000     -0.44752 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.12509      0.00000      0.00000     -0.00000      0.03317 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.41497      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.10655      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.41497      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.10655      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.41497      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.10655     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.47927     -0.00000     -0.00000      0.00000     33.78779 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.06142     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.31850     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.06142     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.31850     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.06142     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.31850      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.00000     -0.00000     -0.00000     -0.00000      0.00000      0.08878      0.00000      0.00000     -0.00000    -15.15017 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.50000      0.00000      0.00000     -0.86603     -0.00000      0.08878      0.00000      0.00000     -0.00000    -15.15017 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.73205     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.50000      0.00000      0.00000      0.86603     -0.00000      0.08878      0.00000      0.00000     -0.00000    -15.15017 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.02117      0.00000      0.00000     -0.00000      0.36382 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06153     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.02570      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06153      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.02570      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06153      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.02570     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Kr\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.00358     -0.01142      0.00000      0.00000      0.00000      0.04485      0.00000      0.00000      0.00000     -0.00883      0.00000      0.00000     -0.00883      0.00000     -0.00883     -0.08661      0.00000      0.00000      0.00000 \n    -0.01142      0.03641      0.00000      0.00000      0.00000     -0.14296      0.00000      0.00000      0.00000      0.02813      0.00000      0.00000      0.02813      0.00000      0.02813      0.27605      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.38950      0.00000      0.00000      0.00000     -0.98402      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17982      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.38950      0.00000      0.00000      0.00000     -0.98402      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17982      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.38950      0.00000      0.00000      0.00000     -0.98402      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17982 \n     0.04485     -0.14296      0.00000      0.00000      0.00000      0.56138      0.00000      0.00000      0.00000     -0.11047      0.00000      0.00000     -0.11047      0.00000     -0.11047     -1.08400      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.98402      0.00000      0.00000      0.00000      2.49048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54975      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.98402      0.00000      0.00000      0.00000      2.49048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54975      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.98402      0.00000      0.00000      0.00000      2.49048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54975 \n    -0.00883      0.02813      0.00000      0.00000      0.00000     -0.11047      0.00000      0.00000      0.00000      2.02173      0.00000      0.00000     -0.97826      0.00000     -0.97825      0.21332      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00883      0.02813      0.00000      0.00000      0.00000     -0.11047      0.00000      0.00000      0.00000     -0.97826      0.00000      0.00000      2.02175      0.00000     -0.97827      0.21332      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00883      0.02813      0.00000      0.00000      0.00000     -0.11047      0.00000      0.00000      0.00000     -0.97825      0.00000      0.00000     -0.97827      0.00000      2.02174      0.21332      0.00000      0.00000      0.00000 \n    -0.08661      0.27605      0.00000      0.00000      0.00000     -1.08400      0.00000      0.00000      0.00000      0.21332      0.00000      0.00000      0.21332      0.00000      0.21332      2.09318      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.17982      0.00000      0.00000      0.00000     -0.54975      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.12187      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.17982      0.00000      0.00000      0.00000     -0.54975      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.12187      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.17982      0.00000      0.00000      0.00000     -0.54975      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.12187 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -504.55140    -64.58686    -59.42332    -59.42332    -59.42332     -8.58559     -6.46794     -6.46794     -6.46794     -2.02569     -2.02569     -2.02569     -2.02569     -2.02569     -0.63469     -0.20495     -0.20495     -0.20495     80.13718 \n   </alphaeps>\n   <betaeps>\n  -504.55140    -64.58686    -59.42332    -59.42332    -59.42332     -8.58559     -6.46794     -6.46794     -6.46794     -2.02569     -2.02569     -2.02569     -2.02569     -2.02569     -0.63469     -0.20495     -0.20495     -0.20495     80.13718 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.04233     -0.00000      0.00000      0.00000     -0.46162 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.13492      0.00000     -0.00000     -0.00000      0.05210 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42673      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.11247      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42673     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11247      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.42673      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.11247     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.52980     -0.00000      0.00000      0.00000     33.90587 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.06604     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.32985      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.06604      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.32985      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.06604     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32985      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.44298     -0.89653      0.10426      0.00000     -0.00000     -0.00000    -15.20866 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.55493      0.83190      0.10426      0.00000     -0.00000     -0.00000    -15.20866 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.99791      0.06463      0.10426      0.00000     -0.00000     -0.00000    -15.20866 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.02303     -0.00000      0.00000      0.00000      0.37319 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06031      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.02825      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06031     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.02825     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.06031      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.02825     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.04233     -0.00000      0.00000      0.00000     -0.46162 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.13492      0.00000     -0.00000     -0.00000      0.05210 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42673      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.11247      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42673     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11247      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.42673      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.11247     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.52980     -0.00000      0.00000      0.00000     33.90587 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.06604     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.32985      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.06604      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.32985      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.06604     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32985      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.44298     -0.89653      0.10426      0.00000     -0.00000     -0.00000    -15.20866 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.55493      0.83190      0.10426      0.00000     -0.00000     -0.00000    -15.20866 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.99791      0.06463      0.10426      0.00000     -0.00000     -0.00000    -15.20866 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.02303     -0.00000      0.00000      0.00000      0.37319 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06031      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.02825      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06031     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.02825     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.06031      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.02825     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Rb\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.00727     -0.02336      0.00000      0.00000      0.00000      0.09515      0.00000      0.00000      0.00000     -0.01927      0.00000      0.00000     -0.01927      0.00000     -0.01927     -0.13962      0.00000      0.00000      0.00000      0.03676      0.00000      0.00000      0.00000 \n    -0.02336      0.07502      0.00000      0.00000      0.00000     -0.30558      0.00000      0.00000      0.00000      0.06190      0.00000      0.00000      0.06190      0.00000      0.06190      0.44808      0.00000      0.00000      0.00000     -0.11599      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.40608      0.00000      0.00000      0.00000     -1.00497      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12838      0.00000      0.00000      0.00000      0.10202      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.21814      0.00000      0.00000      0.00000     -0.54643      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16574      0.00000      0.00000      0.00000      0.08887      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.21814      0.00000      0.00000      0.00000     -0.54643      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16574      0.00000      0.00000      0.00000      0.08887 \n     0.09515     -0.30558      0.00000      0.00000      0.00000      1.24484      0.00000      0.00000      0.00000     -0.25211      0.00000      0.00000     -0.25211      0.00000     -0.25211     -1.82688      0.00000      0.00000      0.00000      0.48291      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.00497      0.00000      0.00000      0.00000      2.49331      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40871      0.00000      0.00000      0.00000     -0.28452      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.54643      0.00000      0.00000      0.00000      1.37452      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.49986      0.00000      0.00000      0.00000     -0.25244      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.54643      0.00000      0.00000      0.00000      1.37452      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.49986      0.00000      0.00000      0.00000     -0.25244 \n    -0.01927      0.06190      0.00000      0.00000      0.00000     -0.25211      0.00000      0.00000      0.00000      2.05111      0.00000      0.00000     -0.94890      0.00000     -0.94890      0.36884      0.00000      0.00000      0.00000     -0.09005      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01927      0.06190      0.00000      0.00000      0.00000     -0.25211      0.00000      0.00000      0.00000     -0.94890      0.00000      0.00000      2.05110      0.00000     -0.94891      0.36884      0.00000      0.00000      0.00000     -0.09005      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01927      0.06190      0.00000      0.00000      0.00000     -0.25211      0.00000      0.00000      0.00000     -0.94890      0.00000      0.00000     -0.94891      0.00000      2.05110      0.36884      0.00000      0.00000      0.00000     -0.09005      0.00000      0.00000      0.00000 \n    -0.13962      0.44808      0.00000      0.00000      0.00000     -1.82688      0.00000      0.00000      0.00000      0.36884      0.00000      0.00000      0.36884      0.00000      0.36884      2.71056      0.00000      0.00000      0.00000     -0.90905      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.12838      0.00000      0.00000      0.00000     -0.40871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.38076      0.00000      0.00000      0.00000      0.50404      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.16574      0.00000      0.00000      0.00000     -0.49986      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.37333      0.00000      0.00000      0.00000      0.50665      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.16574      0.00000      0.00000      0.00000     -0.49986      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.37333      0.00000      0.00000      0.00000      0.50665 \n     0.03676     -0.11599      0.00000      0.00000      0.00000      0.48291      0.00000      0.00000      0.00000     -0.09005      0.00000      0.00000     -0.09005      0.00000     -0.09005     -0.90905      0.00000      0.00000      0.00000      1.54795      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.10202      0.00000      0.00000      0.00000     -0.28452      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.50404      0.00000      0.00000      0.00000      0.19172      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.08887      0.00000      0.00000      0.00000     -0.25244      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.50665      0.00000      0.00000      0.00000      0.19080      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.08887      0.00000      0.00000      0.00000     -0.25244      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.50665      0.00000      0.00000      0.00000      0.19080 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -535.38870    -69.71667    -64.32094    -64.32094    -64.32094     -9.85838     -7.64964     -7.64964     -7.64964     -2.95369     -2.95369     -2.95369     -2.95369     -2.95369     -0.99418     -0.49027     -0.49027     -0.49027      0.10916      0.36130      0.36130      0.36130     92.01570 \n   </alphaeps>\n   <betaeps>\n  -535.38870    -69.71667    -64.32094    -64.32094    -64.32094     -9.85838     -7.64964     -7.64964     -7.64964     -2.95369     -2.95369     -2.95369     -2.95369     -2.95369     -0.99418     -0.49027     -0.49027     -0.49027      0.10916      0.36130      0.36130      0.36130     92.01570 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.05532      0.00000     -0.00000     -0.00000     -0.03395     -0.00000      0.00000      0.00000     -0.49221 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.17816     -0.00000      0.00000      0.00000      0.10741      0.00000     -0.00000     -0.00000      0.09747 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.43352      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.12288      0.00000      0.00000     -0.11168     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.12288     -0.00000     -0.00000      0.00000     -0.00000      0.11168     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43352     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.12288     -0.00000      0.00000      0.00000     -0.11168     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.72324      0.00000     -0.00000     -0.00000     -0.44574     -0.00000      0.00000      0.00000     34.59343 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05773     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.35758     -0.00000     -0.00000      0.33390      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.35758      0.00000      0.00000     -0.00000      0.00000     -0.33390      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05773      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.35758      0.00000     -0.00000     -0.00000      0.33390      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.75358     -0.65736      0.14835     -0.00000      0.00000      0.00000      0.08418      0.00000     -0.00000     -0.00000    -15.55445 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.94608     -0.32394      0.14835     -0.00000      0.00000      0.00000      0.08418      0.00000     -0.00000     -0.00000    -15.55445 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.19250      0.98130      0.14835     -0.00000      0.00000      0.00000      0.08418      0.00000     -0.00000     -0.00000    -15.55445 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.01288     -0.00000      0.00000      0.00000      0.81161      0.00000      0.00000     -0.00000      0.53240 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08618      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.82641      0.00000      0.00000     -1.01308     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.82641     -0.00000     -0.00000      0.00000     -0.00000      1.01308     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08618     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.82641     -0.00000      0.00000      0.00000     -1.01308     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.04895     -0.00000      0.00000      0.00000     -1.24224     -0.00000      0.00000      0.00000     -0.16880 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03033      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.30812     -0.00000     -0.00000      1.20544     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.30812      0.00000      0.00000     -0.00000      0.00000     -1.20544     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03033     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.30812      0.00000     -0.00000     -0.00000      1.20544     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.05532      0.00000      0.00000     -0.00000     -0.03395     -0.00000      0.00000      0.00000     -0.49221 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.17816     -0.00000     -0.00000     -0.00000      0.10741      0.00000     -0.00000     -0.00000      0.09747 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.43352     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.12288     -0.00000     -0.00000     -0.00000      0.00000      0.11168      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43352     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.12288     -0.00000     -0.11168     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.12288     -0.00000     -0.00000      0.00000     -0.00000      0.11168     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.72324      0.00000      0.00000      0.00000     -0.44574     -0.00000      0.00000      0.00000     34.59343 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05773      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.35758      0.00000      0.00000      0.00000     -0.00000     -0.33390      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05773      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.35758      0.00000      0.33390     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.35758      0.00000      0.00000     -0.00000      0.00000     -0.33390     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.78924     -0.61409     -0.14835     -0.00000     -0.00000     -0.00000      0.08418      0.00000     -0.00000     -0.00000    -15.55445 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.92643     -0.37646     -0.14835     -0.00000     -0.00000     -0.00000      0.08418      0.00000     -0.00000     -0.00000    -15.55445 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13720      0.99054     -0.14835     -0.00000     -0.00000     -0.00000      0.08418      0.00000     -0.00000     -0.00000    -15.55445 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.01288     -0.00000     -0.00000     -0.00000      0.81161     -0.00000      0.00000      0.00000      0.53240 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.08618     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.82641     -0.00000     -0.00000     -0.00000      0.00000      1.01308      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08618     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.82641     -0.00000     -1.01308      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.82641     -0.00000     -0.00000      0.00000     -0.00000      1.01308     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04895     -0.00000     -0.00000     -0.00000     -1.24224      0.00000     -0.00000     -0.00000     -0.16880 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03033      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.30812      0.00000      0.00000      0.00000     -0.00000     -1.20544     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03033      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30812      0.00000      1.20544     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30812      0.00000      0.00000     -0.00000      0.00000     -1.20544      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sr\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.00822     -0.02650      0.00000      0.00000      0.00000      0.10942      0.00000      0.00000      0.00000     -0.02286      0.00000      0.00000     -0.02286      0.00000     -0.02286     -0.15401      0.00000      0.00000      0.00000      0.06206      0.00000      0.00000      0.00000 \n    -0.02650      0.08545      0.00000      0.00000      0.00000     -0.35278      0.00000      0.00000      0.00000      0.07370      0.00000      0.00000      0.07370      0.00000      0.07370      0.49622      0.00000      0.00000      0.00000     -0.19710      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.43083      0.00000      0.00000      0.00000     -1.05081      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18296      0.00000      0.00000      0.00000      0.07648      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.43083      0.00000      0.00000      0.00000     -1.05081      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18296      0.00000      0.00000      0.00000      0.07648      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03661      0.00000      0.00000      0.00000     -0.10530      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25046      0.00000      0.00000      0.00000      0.05640 \n     0.10942     -0.35278      0.00000      0.00000      0.00000      1.45654      0.00000      0.00000      0.00000     -0.30421      0.00000      0.00000     -0.30421      0.00000     -0.30421     -2.05047      0.00000      0.00000      0.00000      0.83046      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.05081      0.00000      0.00000      0.00000      2.57061      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.55845      0.00000      0.00000      0.00000     -0.21037      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.05081      0.00000      0.00000      0.00000      2.57061      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.55845      0.00000      0.00000      0.00000     -0.21037      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.10530      0.00000      0.00000      0.00000      0.30284      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.72035      0.00000      0.00000      0.00000     -0.16220 \n    -0.02286      0.07370      0.00000      0.00000      0.00000     -0.30421      0.00000      0.00000      0.00000      2.06359      0.00000      0.00000     -0.93641      0.00000     -0.93642      0.42722      0.00000      0.00000      0.00000     -0.16316      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02286      0.07370      0.00000      0.00000      0.00000     -0.30421      0.00000      0.00000      0.00000     -0.93641      0.00000      0.00000      2.06357      0.00000     -0.93640      0.42722      0.00000      0.00000      0.00000     -0.16316      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02286      0.07370      0.00000      0.00000      0.00000     -0.30421      0.00000      0.00000      0.00000     -0.93642      0.00000      0.00000     -0.93640      0.00000      2.06358      0.42722      0.00000      0.00000      0.00000     -0.16316      0.00000      0.00000      0.00000 \n    -0.15401      0.49622      0.00000      0.00000      0.00000     -2.05047      0.00000      0.00000      0.00000      0.42722      0.00000      0.00000      0.42722      0.00000      0.42722      2.90919      0.00000      0.00000      0.00000     -1.39160      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.18296      0.00000      0.00000      0.00000     -0.55845      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.72499      0.00000      0.00000      0.00000      0.38237      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.18296      0.00000      0.00000      0.00000     -0.55845      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.72499      0.00000      0.00000      0.00000      0.38237      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.25046      0.00000      0.00000      0.00000     -0.72035      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.71343      0.00000      0.00000      0.00000      0.38580 \n     0.06206     -0.19710      0.00000      0.00000      0.00000      0.83046      0.00000      0.00000      0.00000     -0.16316      0.00000      0.00000     -0.16316      0.00000     -0.16316     -1.39160      0.00000      0.00000      0.00000      2.66543      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.07648      0.00000      0.00000      0.00000     -0.21037      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.38237      0.00000      0.00000      0.00000      0.08789      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.07648      0.00000      0.00000      0.00000     -0.21037      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.38237      0.00000      0.00000      0.00000      0.08789      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05640      0.00000      0.00000      0.00000     -0.16220      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.38580      0.00000      0.00000      0.00000      0.08687 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -566.98620    -74.86932    -69.28861    -69.28861    -69.28861    -11.09269     -8.79478     -8.79478     -8.79478     -3.85756     -3.85756     -3.85756     -3.85756     -3.85756     -1.28011     -0.71454     -0.71454     -0.71454     -0.00263      0.20018      0.20018      0.20018    100.08970 \n   </alphaeps>\n   <betaeps>\n  -566.98620    -74.86932    -69.28861    -69.28861    -69.28861    -11.09269     -8.79478     -8.79478     -8.79478     -3.85756     -3.85756     -3.85756     -3.85756     -3.85756     -1.28011     -0.71454     -0.71454     -0.71454     -0.00263      0.20018      0.20018      0.20018    100.08970 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05779      0.00000      0.00000     -0.00000     -0.02776     -0.00000      0.00000     -0.00000     -0.50096 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.18693     -0.00000     -0.00000      0.00000      0.08822      0.00000     -0.00000      0.00000      0.10923 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.44397     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.13530      0.00000      0.09086     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.44397     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13530     -0.00000     -0.00000      0.00000     -0.09086     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.13530      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.09086     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.76832      0.00000      0.00000     -0.00000     -0.37142     -0.00000      0.00000     -0.00000     34.59871 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.06484      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.38913     -0.00000     -0.26702      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.06484      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.38913      0.00000      0.00000     -0.00000      0.26702      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.38913     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.26702     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.09048     -0.00000      0.00000     -0.99590      0.16261     -0.00000     -0.00000      0.00000      0.07315      0.00000     -0.00000      0.00000    -15.55672 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.90771     -0.00000      0.00000      0.41959      0.16261     -0.00000     -0.00000      0.00000      0.07315      0.00000     -0.00000      0.00000    -15.55672 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.81723     -0.00000      0.00000      0.57631      0.16261     -0.00000     -0.00000      0.00000      0.07315      0.00000     -0.00000      0.00000    -15.55672 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03537      0.00000      0.00000     -0.00000      0.61855     -0.00000     -0.00000      0.00000      0.50242 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07602     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.92559      0.00000      0.78944     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.07602     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.92559     -0.00000     -0.00000      0.00000     -0.78944      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.92559      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.78944      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.01757     -0.00000     -0.00000      0.00000     -1.15430      0.00000      0.00000     -0.00000     -0.13827 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02262     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.20841     -0.00000     -1.13710      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02262     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.20841      0.00000      0.00000     -0.00000      1.13710      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.20841     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.13710      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05779      0.00000      0.00000     -0.00000     -0.02776     -0.00000      0.00000     -0.00000     -0.50096 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.18693     -0.00000     -0.00000      0.00000      0.08822      0.00000     -0.00000      0.00000      0.10923 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.44397     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.13530      0.00000      0.09086     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.44397     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13530     -0.00000     -0.00000      0.00000     -0.09086     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.13530      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.09086     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.76832      0.00000      0.00000     -0.00000     -0.37142     -0.00000      0.00000     -0.00000     34.59871 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.06484      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.38913     -0.00000     -0.26702      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.06484      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.38913      0.00000      0.00000     -0.00000      0.26702      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.38913     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.26702     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.09048     -0.00000      0.00000     -0.99590      0.16261     -0.00000     -0.00000      0.00000      0.07315      0.00000     -0.00000      0.00000    -15.55672 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.90771     -0.00000      0.00000      0.41959      0.16261     -0.00000     -0.00000      0.00000      0.07315      0.00000     -0.00000      0.00000    -15.55672 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.81723     -0.00000      0.00000      0.57631      0.16261     -0.00000     -0.00000      0.00000      0.07315      0.00000     -0.00000      0.00000    -15.55672 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03537      0.00000      0.00000     -0.00000      0.61855     -0.00000     -0.00000      0.00000      0.50242 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07602     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.92559      0.00000      0.78944     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.07602     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.92559     -0.00000     -0.00000      0.00000     -0.78944      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.92559      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.78944      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.01757     -0.00000     -0.00000      0.00000     -1.15430      0.00000      0.00000     -0.00000     -0.13827 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02262     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.20841     -0.00000     -1.13710      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02262     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.20841      0.00000      0.00000     -0.00000      1.13710      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.20841     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.13710      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"In\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.01157     -0.03857      0.00000      0.00000      0.00000      0.15566      0.00000      0.00000      0.00000     -0.03750      0.00000      0.00000     -0.03750      0.00000     -0.03750     -0.33910      0.00000      0.00000      0.00000      0.07804      0.00000      0.00000      0.07804      0.00000      0.07804      0.03849      0.00000      0.00000      0.00000 \n    -0.03857      0.12862      0.00000      0.00000      0.00000     -0.51907      0.00000      0.00000      0.00000      0.12506      0.00000      0.00000      0.12506      0.00000      0.12506      1.13086      0.00000      0.00000      0.00000     -0.26030      0.00000      0.00000     -0.26030      0.00000     -0.26030     -0.12642      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.06351      0.00000      0.00000      0.00000     -0.15968      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37462      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00258      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.06351      0.00000      0.00000      0.00000     -0.15968      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37462      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00258      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.06351      0.00000      0.00000      0.00000     -0.15968      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37462      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00258 \n     0.15566     -0.51907      0.00000      0.00000      0.00000      2.09504      0.00000      0.00000      0.00000     -0.50469      0.00000      0.00000     -0.50469      0.00000     -0.50469     -4.56294      0.00000      0.00000      0.00000      1.04971      0.00000      0.00000      1.04971      0.00000      1.04971      0.53390      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.15968      0.00000      0.00000      0.00000      0.40149      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94194      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00723      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.15968      0.00000      0.00000      0.00000      0.40149      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94194      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00723      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.15968      0.00000      0.00000      0.00000      0.40149      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94194      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00723 \n    -0.03750      0.12506      0.00000      0.00000      0.00000     -0.50469      0.00000      0.00000      0.00000      2.31618      0.00000      0.00000     -0.97571      0.00000     -0.97571      1.09946      0.00000      0.00000      0.00000     -0.90651      0.00000      0.00000      0.07371      0.00000      0.07369     -0.12437      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58377      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58377      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03750      0.12506      0.00000      0.00000      0.00000     -0.50469      0.00000      0.00000      0.00000     -0.97571      0.00000      0.00000      2.31619      0.00000     -0.97571      1.09946      0.00000      0.00000      0.00000      0.07369      0.00000      0.00000     -0.90651      0.00000      0.07372     -0.12437      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58377      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03750      0.12506      0.00000      0.00000      0.00000     -0.50469      0.00000      0.00000      0.00000     -0.97571      0.00000      0.00000     -0.97571      0.00000      2.31619      1.09946      0.00000      0.00000      0.00000      0.07370      0.00000      0.00000      0.07370      0.00000     -0.90652     -0.12437      0.00000      0.00000      0.00000 \n    -0.33910      1.13086      0.00000      0.00000      0.00000     -4.56294      0.00000      0.00000      0.00000      1.09946      0.00000      0.00000      1.09946      0.00000      1.09946      9.94545      0.00000      0.00000      0.00000     -2.29106      0.00000      0.00000     -2.29106      0.00000     -2.29106     -1.04443      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.37462      0.00000      0.00000      0.00000     -0.94194      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21097      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03691      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.37462      0.00000      0.00000      0.00000     -0.94194      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21097      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03691      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.37462      0.00000      0.00000      0.00000     -0.94194      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21097      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03691 \n     0.07804     -0.26030      0.00000      0.00000      0.00000      1.04971      0.00000      0.00000      0.00000     -0.90651      0.00000      0.00000      0.07369      0.00000      0.07370     -2.29106      0.00000      0.00000      0.00000      2.72354      0.00000      0.00000     -0.56815      0.00000     -0.56814      0.18916      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07804     -0.26030      0.00000      0.00000      0.00000      1.04971      0.00000      0.00000      0.00000      0.07371      0.00000      0.00000     -0.90651      0.00000      0.07370     -2.29106      0.00000      0.00000      0.00000     -0.56815      0.00000      0.00000      2.72356      0.00000     -0.56816      0.18916      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58340      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07804     -0.26030      0.00000      0.00000      0.00000      1.04971      0.00000      0.00000      0.00000      0.07369      0.00000      0.00000      0.07372      0.00000     -0.90652     -2.29106      0.00000      0.00000      0.00000     -0.56814      0.00000      0.00000     -0.56816      0.00000      2.72356      0.18916      0.00000      0.00000      0.00000 \n     0.03849     -0.12642      0.00000      0.00000      0.00000      0.53390      0.00000      0.00000      0.00000     -0.12437      0.00000      0.00000     -0.12437      0.00000     -0.12437     -1.04443      0.00000      0.00000      0.00000      0.18916      0.00000      0.00000      0.18916      0.00000      0.18916      2.16863      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00258      0.00000      0.00000      0.00000      0.00723      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03691      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36794      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00258      0.00000      0.00000      0.00000      0.00723      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03691      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36794      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00258      0.00000      0.00000      0.00000      0.00723      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03691      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36794 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99996      0.99996      0.99996      0.99996      0.99996      0.32623      0.32623      0.32623      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99991      0.99991      0.99991      0.99991      0.99991      0.00731      0.00731      0.00731      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -973.25740   -141.47150   -133.61940   -133.61940   -133.61940    -25.46486    -22.49320    -22.49320    -22.49320    -14.96569    -14.96569    -14.96569    -14.96569    -14.96569     -3.26371     -2.18628     -2.18628     -2.18628     -0.14562     -0.00303     -0.00303     -0.00303     -0.00303     -0.00303      0.05891      0.05891      0.05891     12.48964    228.19330 \n   </alphaeps>\n   <betaeps>\n  -973.25690   -141.47110   -133.61890   -133.61890   -133.61890    -25.46424    -22.49256    -22.49256    -22.49256    -14.96508    -14.96508    -14.96508    -14.96508    -14.96508     -3.26136     -2.18356     -2.18356     -2.18356     -0.11733     -0.00060     -0.00060     -0.00060     -0.00060     -0.00060      0.08707      0.08707      0.08707     12.50375    228.19460 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.07377      0.00000     -0.00000     -0.00000     -0.01850     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00076      0.58792 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.24622     -0.00000      0.00000      0.00000      0.06075      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.02636     -0.22632 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.17690      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.05181     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.17690      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.05181     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.17690     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.05181      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.99086      0.00000     -0.00000     -0.00000     -0.25634     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.57671    -35.26327 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.44468     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.13237      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.44468     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.13237      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.44468     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.13237     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.84290      0.00000     -0.00000     -0.48666     -0.23923     -0.00000      0.00000      0.00000      0.05972      0.00000     -0.33540      0.00000     -0.00000     -0.19364     -0.00000     -0.00000      0.00000      0.10528     15.89486 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.68580     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.67081     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68580     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.67081      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.84291      0.00000     -0.00000     -0.48664     -0.23923     -0.00000      0.00000      0.00000      0.05972      0.00000      0.33540      0.00000     -0.00000     -0.19365     -0.00000     -0.00000      0.00000      0.10528     15.89486 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.68580      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.67081     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00001      0.00000     -0.00000      0.97330     -0.23923     -0.00000      0.00000      0.00000      0.05972      0.00000      0.00000      0.00000     -0.00000      0.38729      0.00000      0.00000     -0.00000      0.10528     15.89486 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -2.17284     -0.00000      0.00000      0.00000      0.51861      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000    -57.53691      5.99449 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.04040      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.36710      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.04040      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.36710     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.04040      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.36710      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06918     -0.00000      0.00000     -0.03994      0.50625      0.00000     -0.00000     -0.00000     -0.09844     -0.00000      0.90454     -0.00000      0.00000      0.52223      0.00000      0.00000     -0.00000     25.85647     -2.90884 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13836      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.80908      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13836      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.80908     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.06918     -0.00000      0.00000     -0.03994      0.50625      0.00000     -0.00000     -0.00000     -0.09844     -0.00000     -0.90454     -0.00000      0.00000      0.52224      0.00000      0.00000     -0.00000     25.85647     -2.90884 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13836     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.80908      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.07988      0.50625      0.00000     -0.00000     -0.00000     -0.09844     -0.00000     -0.00000     -0.00000      0.00000     -1.04447     -0.00000     -0.00000      0.00000     25.85647     -2.90884 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00017     -0.00000      0.00000      0.00000     -1.04114      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.57808      0.15192 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.04453     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.04481      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.04453     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.04481      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.04453     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.04481     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.07377     -0.00000      0.00000      0.00000     -0.01845      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00077      0.58792 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.24624      0.00000     -0.00000     -0.00000      0.06060     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02639     -0.22632 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.17698      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05153      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.17698      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.05153     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.17698     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05153      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.99091     -0.00000      0.00000      0.00000     -0.25617      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.57673    -35.26327 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.44487     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.13168     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.44487     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.13168      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.44487      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.13168     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.84290      0.00000     -0.00000      0.48667      0.23923      0.00000     -0.00000     -0.00000      0.05967     -0.00000      0.33539     -0.00000      0.00000     -0.19363      0.00000      0.00000     -0.00000      0.10532     15.89486 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68582      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.67077     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.68582     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.67077     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.84292      0.00000     -0.00000      0.48664      0.23923      0.00000     -0.00000     -0.00000      0.05967     -0.00000     -0.33538     -0.00000      0.00000     -0.19364      0.00000      0.00000     -0.00000      0.10532     15.89486 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.68582     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.67077      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00001      0.00000     -0.00000     -0.97331      0.23923      0.00000     -0.00000     -0.00000      0.05967     -0.00000     -0.00000     -0.00000      0.00000      0.38727      0.00000      0.00000     -0.00000      0.10532     15.89486 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      2.17280      0.00000     -0.00000     -0.00000      0.48394     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000    -57.53718      5.99476 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.04096      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.36550      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.04096      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.36550     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.04096     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.36550      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06916     -0.00000      0.00000      0.03993     -0.50616     -0.00000      0.00000      0.00000     -0.08311      0.00000     -0.90454      0.00000     -0.00000      0.52223     -0.00000     -0.00000      0.00000     25.85651     -2.90896 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13832     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.80908      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13832      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.80908     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06916     -0.00000      0.00000      0.03993     -0.50616     -0.00000      0.00000      0.00000     -0.08311      0.00000      0.90454      0.00000     -0.00000      0.52224     -0.00000     -0.00000      0.00000     25.85651     -2.90896 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13832      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.80908     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.07986     -0.50616     -0.00000      0.00000      0.00000     -0.08311      0.00000      0.00000      0.00000     -0.00000     -1.04448     -0.00000     -0.00000      0.00000     25.85651     -2.90896 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00039     -0.00000      0.00000     -0.00000     -1.04147      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.57747      0.15192 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.04292     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.04488      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.04292     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.04488      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.04292      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04488     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sn\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.01295     -0.04330      0.00000      0.00000      0.00000      0.17515      0.00000      0.00000      0.00000     -0.04236      0.00000      0.00000     -0.04236      0.00000     -0.04236     -0.35438      0.00000      0.00000      0.00000      0.08022      0.00000      0.00000      0.08022      0.00000      0.08022      0.04025      0.00000      0.00000      0.00000 \n    -0.04330      0.14479      0.00000      0.00000      0.00000     -0.58569      0.00000      0.00000      0.00000      0.14166      0.00000      0.00000      0.14166      0.00000      0.14166      1.18509      0.00000      0.00000      0.00000     -0.26832      0.00000      0.00000     -0.26832      0.00000     -0.26832     -0.13273      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.07170      0.00000      0.00000      0.00000     -0.17979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40474      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02293      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.07170      0.00000      0.00000      0.00000     -0.17979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40474      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02293      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.07170      0.00000      0.00000      0.00000     -0.17979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.40474      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02293 \n     0.17515     -0.58569      0.00000      0.00000      0.00000      2.36959      0.00000      0.00000      0.00000     -0.57306      0.00000      0.00000     -0.57306      0.00000     -0.57306     -4.79309      0.00000      0.00000      0.00000      1.08451      0.00000      0.00000      1.08451      0.00000      1.08451      0.56341      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.17979      0.00000      0.00000      0.00000      0.45084      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.01501      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05913      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.17979      0.00000      0.00000      0.00000      0.45084      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.01501      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05913      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.17979      0.00000      0.00000      0.00000      0.45084      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.01501      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05913 \n    -0.04236      0.14166      0.00000      0.00000      0.00000     -0.57306      0.00000      0.00000      0.00000      2.35442      0.00000      0.00000     -0.96932      0.00000     -0.96931      1.15940      0.00000      0.00000      0.00000     -0.95400      0.00000      0.00000      0.08333      0.00000      0.08333     -0.13208      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64749      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64749      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04236      0.14166      0.00000      0.00000      0.00000     -0.57306      0.00000      0.00000      0.00000     -0.96932      0.00000      0.00000      2.35443      0.00000     -0.96932      1.15940      0.00000      0.00000      0.00000      0.08334      0.00000      0.00000     -0.95400      0.00000      0.08334     -0.13208      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64749      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04236      0.14166      0.00000      0.00000      0.00000     -0.57306      0.00000      0.00000      0.00000     -0.96931      0.00000      0.00000     -0.96932      0.00000      2.35442      1.15940      0.00000      0.00000      0.00000      0.08333      0.00000      0.00000      0.08334      0.00000     -0.95399     -0.13208      0.00000      0.00000      0.00000 \n    -0.35438      1.18509      0.00000      0.00000      0.00000     -4.79309      0.00000      0.00000      0.00000      1.15940      0.00000      0.00000      1.15940      0.00000      1.15940      9.70399      0.00000      0.00000      0.00000     -2.19923      0.00000      0.00000     -2.19923      0.00000     -2.19923     -1.02008      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.40474      0.00000      0.00000      0.00000     -1.01501      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.28735      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17305      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.40474      0.00000      0.00000      0.00000     -1.01501      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.28735      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17305      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.40474      0.00000      0.00000      0.00000     -1.01501      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.28735      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17305 \n     0.08022     -0.26832      0.00000      0.00000      0.00000      1.08451      0.00000      0.00000      0.00000     -0.95400      0.00000      0.00000      0.08334      0.00000      0.08333     -2.19923      0.00000      0.00000      0.00000      2.71574      0.00000      0.00000     -0.60801      0.00000     -0.60800      0.17720      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64748      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64748      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08022     -0.26832      0.00000      0.00000      0.00000      1.08451      0.00000      0.00000      0.00000      0.08333      0.00000      0.00000     -0.95400      0.00000      0.08334     -2.19923      0.00000      0.00000      0.00000     -0.60801      0.00000      0.00000      2.71575      0.00000     -0.60801      0.17720      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64748      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08022     -0.26832      0.00000      0.00000      0.00000      1.08451      0.00000      0.00000      0.00000      0.08333      0.00000      0.00000      0.08334      0.00000     -0.95399     -2.19923      0.00000      0.00000      0.00000     -0.60800      0.00000      0.00000     -0.60801      0.00000      2.71574      0.17720      0.00000      0.00000      0.00000 \n     0.04025     -0.13273      0.00000      0.00000      0.00000      0.56341      0.00000      0.00000      0.00000     -0.13208      0.00000      0.00000     -0.13208      0.00000     -0.13208     -1.02008      0.00000      0.00000      0.00000      0.17720      0.00000      0.00000      0.17720      0.00000      0.17720      2.16836      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.02293      0.00000      0.00000      0.00000      0.05913      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17305      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.73060      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.02293      0.00000      0.00000      0.00000      0.05913      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17305      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.73060      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02293      0.00000      0.00000      0.00000      0.05913      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17305      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.73060 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66638      0.66638      0.66638      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00029      0.00029      0.00029      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1015.98700   -148.90080   -140.83880   -140.83880   -140.83880    -27.32963    -24.30106    -24.30106    -24.30106    -16.51983    -16.51983    -16.51983    -16.51983    -16.51983     -3.78705     -2.64754     -2.64754     -2.64754     -0.30692     -0.30692     -0.30692     -0.30692     -0.30692     -0.22413     -0.00328     -0.00328     -0.00328     13.56879    244.22210 \n   </alphaeps>\n   <betaeps>\n -1015.98600   -148.90000   -140.83780   -140.83780   -140.83780    -27.32825    -24.29964    -24.29964    -24.29964    -16.51849    -16.51849    -16.51849    -16.51849    -16.51849     -3.78211     -2.64196     -2.64196     -2.64196     -0.30184     -0.30184     -0.30184     -0.30184     -0.30184     -0.16916      0.05151      0.05151      0.05151     13.59672    244.22500 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.07805      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.01957     -0.00000     -0.00000      0.00000      0.00228     -0.59740 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.26121      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.06457      0.00000      0.00000      0.00000     -0.03779      0.23646 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.18676     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05334     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.18676      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05334      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.18676      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05334     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.05356     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.27360     -0.00000     -0.00000     -0.00000     -0.44398     35.51978 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.46809      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13609      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.46809     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.13609      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.46809     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13609      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00002     -0.00000      0.00000      0.97312     -0.25532      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.40118     -0.06419      0.00000      0.00000      0.00000      0.04966    -16.02198 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68550      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.69486      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.68550      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.69486     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.84276     -0.00000      0.00000     -0.48654     -0.25532      0.00000     -0.00000     -0.00000      0.34743     -0.00000     -0.00000     -0.00000      0.20059     -0.06419      0.00000      0.00000      0.00000      0.04966    -16.02198 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68550      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.69486      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.84274     -0.00000      0.00000     -0.48658     -0.25532      0.00000     -0.00000     -0.00000     -0.34743     -0.00000     -0.00000     -0.00000      0.20059     -0.06419      0.00000      0.00000      0.00000      0.04966    -16.02198 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -2.14624      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.52580      0.00000      0.00000      0.00000    -57.46618     -8.08980 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.04823     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.36310     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.04823      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.36310     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.04823      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.36310     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.07743      0.49240     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.04972      0.09979     -0.00000     -0.00000     -0.00000     25.82539      3.85571 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13412     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.81817      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13412     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.81817      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06706      0.00000     -0.00000     -0.03872      0.49240     -0.00000      0.00000      0.00000     -0.90909      0.00000      0.00000      0.00000     -0.52486      0.09979     -0.00000     -0.00000     -0.00000     25.82539      3.85571 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13412      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.81817     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06706      0.00000     -0.00000     -0.03872      0.49240     -0.00000      0.00000      0.00000      0.90909      0.00000      0.00000      0.00000     -0.52486      0.09979     -0.00000     -0.00000     -0.00000     25.82539      3.85571 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00322      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.04094      0.00000      0.00000      0.00000     -0.57683     -0.17147 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.03937     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.04477     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.03937     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.04477     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.03937     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.04477      0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.07806     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.01949      0.00000     -0.00000     -0.00000      0.00231     -0.59740 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.26126      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.06426     -0.00000      0.00000      0.00000     -0.03786      0.23646 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.18688      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05287     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.18688     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05287      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.18688      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05287     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.05368     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.27296      0.00000     -0.00000     -0.00000     -0.44415     35.51978 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.46839      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.13492      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.46839      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.13492      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.46839     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.13492      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00003      0.00000      0.00000     -0.97314      0.25533      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.40114      0.06398     -0.00000      0.00000      0.00000      0.04980    -16.02198 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.68553     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.69479      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.68553      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.69479     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.84278      0.00000      0.00000      0.48655      0.25533      0.00000     -0.00000     -0.00000      0.34740      0.00000      0.00000     -0.00000     -0.20057      0.06398     -0.00000      0.00000      0.00000      0.04980    -16.02198 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.68553      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.69479      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.84275      0.00000      0.00000      0.48659      0.25533      0.00000     -0.00000     -0.00000     -0.34740      0.00000      0.00000     -0.00000     -0.20057      0.06398     -0.00000      0.00000      0.00000      0.04980    -16.02198 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      2.14591      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.46503     -0.00000      0.00000      0.00000    -57.46661     -8.09053 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.04913     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.36051     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.04913     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.36051     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.04913      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.36051     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.07739     -0.49211     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.04973     -0.07295      0.00000     -0.00000     -0.00000     25.82544      3.85604 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13404      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.81818     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.13404     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.81818      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06702     -0.00000     -0.00000      0.03869     -0.49211     -0.00000      0.00000      0.00000     -0.90909     -0.00000     -0.00000      0.00000      0.52487     -0.07295      0.00000     -0.00000     -0.00000     25.82544      3.85604 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13404     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.81818      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06702     -0.00000     -0.00000      0.03870     -0.49211     -0.00000      0.00000      0.00000      0.90909     -0.00000     -0.00000      0.00000      0.52486     -0.07295      0.00000     -0.00000     -0.00000     25.82544      3.85604 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00218      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.04153      0.00000      0.00000      0.00000     -0.57576     -0.17147 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.03678     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.04487      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.03678      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.04487     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.03678     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.04487      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sb\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.01422     -0.04770      0.00000      0.00000      0.00000      0.19320      0.00000      0.00000      0.00000     -0.04694      0.00000      0.00000     -0.04694      0.00000     -0.04694     -0.36593      0.00000      0.00000      0.00000      0.08161      0.00000      0.00000      0.08161      0.00000      0.08161      0.03962      0.00000      0.00000      0.00000 \n    -0.04770      0.15996      0.00000      0.00000      0.00000     -0.64787      0.00000      0.00000      0.00000      0.15742      0.00000      0.00000      0.15742      0.00000      0.15742      1.22722      0.00000      0.00000      0.00000     -0.27372      0.00000      0.00000     -0.27372      0.00000     -0.27372     -0.13116      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.07968      0.00000      0.00000      0.00000     -0.19894      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43239      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04188      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.07968      0.00000      0.00000      0.00000     -0.19894      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43239      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04188      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.07968      0.00000      0.00000      0.00000     -0.19894      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43239      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04188 \n     0.19320     -0.64787      0.00000      0.00000      0.00000      2.62439      0.00000      0.00000      0.00000     -0.63762      0.00000      0.00000     -0.63762      0.00000     -0.63762     -4.96940      0.00000      0.00000      0.00000      1.10761      0.00000      0.00000      1.10761      0.00000      1.10761      0.56074      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.19894      0.00000      0.00000      0.00000      0.49669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.07968      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10703      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.19894      0.00000      0.00000      0.00000      0.49669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.07968      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10703      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.19894      0.00000      0.00000      0.00000      0.49669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.07968      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10703 \n    -0.04694      0.15742      0.00000      0.00000      0.00000     -0.63762      0.00000      0.00000      0.00000      2.38931      0.00000      0.00000     -0.96227      0.00000     -0.96229      1.20758      0.00000      0.00000      0.00000     -0.99295      0.00000      0.00000      0.09259      0.00000      0.09259     -0.13259      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04694      0.15742      0.00000      0.00000      0.00000     -0.63762      0.00000      0.00000      0.00000     -0.96227      0.00000      0.00000      2.38931      0.00000     -0.96227      1.20758      0.00000      0.00000      0.00000      0.09262      0.00000      0.00000     -0.99294      0.00000      0.09259     -0.13259      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04694      0.15742      0.00000      0.00000      0.00000     -0.63762      0.00000      0.00000      0.00000     -0.96229      0.00000      0.00000     -0.96227      0.00000      2.38933      1.20758      0.00000      0.00000      0.00000      0.09260      0.00000      0.00000      0.09259      0.00000     -0.99295     -0.13259      0.00000      0.00000      0.00000 \n    -0.36593      1.22722      0.00000      0.00000      0.00000     -4.96940      0.00000      0.00000      0.00000      1.20758      0.00000      0.00000      1.20758      0.00000      1.20758      9.42040      0.00000      0.00000      0.00000     -2.10363      0.00000      0.00000     -2.10363      0.00000     -2.10363     -0.93489      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.43239      0.00000      0.00000      0.00000     -1.07968      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.34991      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28865      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.43239      0.00000      0.00000      0.00000     -1.07968      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.34991      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28865      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.43239      0.00000      0.00000      0.00000     -1.07968      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.34991      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28865 \n     0.08161     -0.27372      0.00000      0.00000      0.00000      1.10761      0.00000      0.00000      0.00000     -0.99295      0.00000      0.00000      0.09262      0.00000      0.09260     -2.10363      0.00000      0.00000      0.00000      2.70570      0.00000      0.00000     -0.64590      0.00000     -0.64591      0.15494      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08161     -0.27372      0.00000      0.00000      0.00000      1.10761      0.00000      0.00000      0.00000      0.09259      0.00000      0.00000     -0.99294      0.00000      0.09259     -2.10363      0.00000      0.00000      0.00000     -0.64590      0.00000      0.00000      2.70568      0.00000     -0.64591      0.15494      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08161     -0.27372      0.00000      0.00000      0.00000      1.10761      0.00000      0.00000      0.00000      0.09259      0.00000      0.00000      0.09259      0.00000     -0.99295     -2.10363      0.00000      0.00000      0.00000     -0.64591      0.00000      0.00000     -0.64591      0.00000      2.70570      0.15494      0.00000      0.00000      0.00000 \n     0.03962     -0.13116      0.00000      0.00000      0.00000      0.56074      0.00000      0.00000      0.00000     -0.13259      0.00000      0.00000     -0.13259      0.00000     -0.13259     -0.93489      0.00000      0.00000      0.00000      0.15494      0.00000      0.00000      0.15494      0.00000      0.15494      2.15006      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.04188      0.00000      0.00000      0.00000      0.10703      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28865      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.08409      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.04188      0.00000      0.00000      0.00000      0.10703      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28865      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.08409      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.04188      0.00000      0.00000      0.00000      0.10703      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28865      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.08409 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99655      0.99655      0.99655      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00345      0.00345      0.00345      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1059.69800   -156.58510   -148.31280   -148.31280   -148.31280    -29.32084    -26.24899    -26.24899    -26.24899    -18.21794    -18.21794    -18.21794    -18.21794    -18.21794     -4.38768     -3.19085     -3.19085     -3.19085     -0.69858     -0.69858     -0.69858     -0.69858     -0.69858     -0.31741     -0.08957     -0.08957     -0.08957     14.48827    260.74720 \n   </alphaeps>\n   <betaeps>\n -1059.69600   -156.58400   -148.31140   -148.31140   -148.31140    -29.31889    -26.24699    -26.24699    -26.24699    -18.21607    -18.21607    -18.21607    -18.21607    -18.21607     -4.38090     -3.18330     -3.18330     -3.18330     -0.69161     -0.69161     -0.69161     -0.69161     -0.69161     -0.24091     -0.01316     -0.01316     -0.01316     14.52805    260.75150 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.08204      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.01954      0.00000     -0.00000     -0.00000     -0.00396      0.60609 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.27532     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.06472     -0.00000      0.00000      0.00000      0.04942     -0.24570 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.19614      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.05190      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.19614     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.05190     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.19614     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05190      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.11181      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.27607      0.00000     -0.00000     -0.00000      0.30823    -35.74953 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.48937     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.13194     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.48937      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.13194      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.48937      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.13194      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.25172      0.93994     -0.27057     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.09335     -0.40204     -0.06538     -0.00000      0.00000      0.00000      0.00529     16.13400 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68539     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.71488     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68539      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.71488      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.68815     -0.68796     -0.27057     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.30150      0.28187     -0.06538     -0.00000      0.00000      0.00000      0.00529     16.13400 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.68539      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.71488      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.93987     -0.25198     -0.27057     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.39486      0.12018     -0.06538     -0.00000      0.00000      0.00000      0.00529     16.13400 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -2.12044     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.49838     -0.00000      0.00000      0.00000     57.22033      9.54942 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.05646      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.34020      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.05646     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.34020     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.05646     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.34020      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.01949      0.07276      0.47905      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.23846      1.02697      0.09362      0.00000     -0.00000     -0.00000    -25.71025     -4.51412 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13047      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.82608      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.13047     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.82608     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05327     -0.05326      0.47905      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.77015     -0.71999      0.09362      0.00000     -0.00000     -0.00000    -25.71025     -4.51412 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.13047     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.82608     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.07276     -0.01951      0.47905      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.00861     -0.30697      0.09362      0.00000     -0.00000     -0.00000    -25.71025     -4.51412 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00539     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.03646      0.00000     -0.00000     -0.00000      0.56374      0.17918 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.03228     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.04028      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03228      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.04028      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.03228      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.04028      0.00000      0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.08206      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.01943      0.00000     -0.00000     -0.00000     -0.00400      0.60609 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.27538     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.06431     -0.00000      0.00000      0.00000      0.04951     -0.24569 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.19626     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.05135     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.19626      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.05135     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.19626      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.05135      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.11196      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.27496      0.00000     -0.00000     -0.00000      0.30865    -35.74953 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.48969      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.13058      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.48969     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.13058      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.48969     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.13058     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.21300     -0.94948     -0.27058     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.08266      0.40432     -0.06499     -0.00000      0.00000      0.00000      0.00502     16.13400 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68543     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.71479      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68543     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.71479      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.71578      0.65920     -0.27058     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.30882     -0.27375     -0.06499     -0.00000      0.00000      0.00000      0.00502     16.13400 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.68543     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.71479     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.92878      0.29028     -0.27058     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.39148     -0.13058     -0.06499     -0.00000      0.00000      0.00000      0.00502     16.13400 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -2.12061     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.42280     -0.00000      0.00000      0.00000     57.22073      9.55065 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.05739     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.33731     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.05739      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.33731     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.05739      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.33731      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.01648     -0.07344      0.47897      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.21117     -1.03293      0.06023      0.00000      0.00000     -0.00000    -25.71025     -4.51467 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13037      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.82609     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.13037      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.82609      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.05537      0.05099      0.47897      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.78896      0.69934      0.06023      0.00000      0.00000     -0.00000    -25.71025     -4.51467 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.13037      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.82609      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.07184      0.02245      0.47897      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.00013      0.33359      0.06023      0.00000      0.00000     -0.00000    -25.71025     -4.51467 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00413     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03719     -0.00000     -0.00000     -0.00000      0.56241      0.17919 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.02945      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.04036      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.02945     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.04036      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02945     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.04036      0.00000      0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Te\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.01569     -0.05278      0.00000      0.00000      0.00000      0.21410      0.00000      0.00000      0.00000     -0.05223      0.00000      0.00000     -0.05223      0.00000     -0.05223     -0.37792      0.00000      0.00000      0.00000      0.08253      0.00000      0.00000      0.08253      0.00000      0.08253      0.04041      0.00000      0.00000      0.00000 \n    -0.05278      0.17747      0.00000      0.00000      0.00000     -0.71991      0.00000      0.00000      0.00000      0.17563      0.00000      0.00000      0.17563      0.00000      0.17563      1.27084      0.00000      0.00000      0.00000     -0.27758      0.00000      0.00000     -0.27758      0.00000     -0.27758     -0.13429      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.08847      0.00000      0.00000      0.00000     -0.22005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46134      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06113      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.08847      0.00000      0.00000      0.00000     -0.22005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46134      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06113      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.08847      0.00000      0.00000      0.00000     -0.22005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46134      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06113 \n     0.21410     -0.71991      0.00000      0.00000      0.00000      2.92084      0.00000      0.00000      0.00000     -0.71254      0.00000      0.00000     -0.71254      0.00000     -0.71254     -5.15452      0.00000      0.00000      0.00000      1.12510      0.00000      0.00000      1.12510      0.00000      1.12510      0.57660      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.22005      0.00000      0.00000      0.00000      0.54733      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.14767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15556      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.22005      0.00000      0.00000      0.00000      0.54733      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.14767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15556      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.22005      0.00000      0.00000      0.00000      0.54733      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.14767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15556 \n    -0.05223      0.17563      0.00000      0.00000      0.00000     -0.71254      0.00000      0.00000      0.00000      2.42895      0.00000      0.00000     -0.95373      0.00000     -0.95374      1.25761      0.00000      0.00000      0.00000     -1.03308      0.00000      0.00000      0.10466      0.00000      0.10467     -0.13726      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76536      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76536      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05223      0.17563      0.00000      0.00000      0.00000     -0.71254      0.00000      0.00000      0.00000     -0.95373      0.00000      0.00000      2.42894      0.00000     -0.95373      1.25761      0.00000      0.00000      0.00000      0.10467      0.00000      0.00000     -1.03308      0.00000      0.10467     -0.13726      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76536      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05223      0.17563      0.00000      0.00000      0.00000     -0.71254      0.00000      0.00000      0.00000     -0.95374      0.00000      0.00000     -0.95373      0.00000      2.42896      1.25761      0.00000      0.00000      0.00000      0.10466      0.00000      0.00000      0.10467      0.00000     -1.03309     -0.13726      0.00000      0.00000      0.00000 \n    -0.37792      1.27084      0.00000      0.00000      0.00000     -5.15452      0.00000      0.00000      0.00000      1.25761      0.00000      0.00000      1.25761      0.00000      1.25761      9.10216      0.00000      0.00000      0.00000     -1.98933      0.00000      0.00000     -1.98933      0.00000     -1.98933     -0.91723      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.46134      0.00000      0.00000      0.00000     -1.14767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.41034      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.39939      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.46134      0.00000      0.00000      0.00000     -1.14767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.41034      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.39939      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.46134      0.00000      0.00000      0.00000     -1.14767      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.41034      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.39939 \n     0.08253     -0.27758      0.00000      0.00000      0.00000      1.12510      0.00000      0.00000      0.00000     -1.03308      0.00000      0.00000      0.10467      0.00000      0.10466     -1.98933      0.00000      0.00000      0.00000      2.69108      0.00000      0.00000     -0.69159      0.00000     -0.69158      0.15195      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76535      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76535      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08253     -0.27758      0.00000      0.00000      0.00000      1.12510      0.00000      0.00000      0.00000      0.10466      0.00000      0.00000     -1.03308      0.00000      0.10467     -1.98933      0.00000      0.00000      0.00000     -0.69159      0.00000      0.00000      2.69109      0.00000     -0.69159      0.15195      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76535      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08253     -0.27758      0.00000      0.00000      0.00000      1.12510      0.00000      0.00000      0.00000      0.10467      0.00000      0.00000      0.10467      0.00000     -1.03309     -1.98933      0.00000      0.00000      0.00000     -0.69158      0.00000      0.00000     -0.69159      0.00000      2.69108      0.15195      0.00000      0.00000      0.00000 \n     0.04041     -0.13429      0.00000      0.00000      0.00000      0.57660      0.00000      0.00000      0.00000     -0.13726      0.00000      0.00000     -0.13726      0.00000     -0.13726     -0.91723      0.00000      0.00000      0.00000      0.15195      0.00000      0.00000      0.15195      0.00000      0.15195      2.14323      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.06113      0.00000      0.00000      0.00000      0.15556      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.39939      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.43993      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.06113      0.00000      0.00000      0.00000      0.15556      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.39939      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.43993      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06113      0.00000      0.00000      0.00000      0.15556      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.39939      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.43993 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99820      0.99820      0.99820      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33514      0.33514      0.33514      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1104.29500   -164.41950   -155.93700   -155.93700   -155.93700    -31.33768    -28.22413    -28.22413    -28.22413    -19.94149    -19.94149    -19.94149    -19.94149    -19.94149     -4.98723     -3.73674     -3.73674     -3.73674     -1.08705     -1.08705     -1.08705     -1.08705     -1.08705     -0.38632     -0.14497     -0.14497     -0.14497     15.58394    278.64600 \n   </alphaeps>\n   <betaeps>\n -1104.29400   -164.41880   -155.93600   -155.93600   -155.93600    -31.33635    -28.22276    -28.22276    -28.22276    -19.94022    -19.94022    -19.94022    -19.94022    -19.94022     -4.98280     -3.73188     -3.73188     -3.73188     -1.08251     -1.08251     -1.08251     -1.08251     -1.08251     -0.33913     -0.09779     -0.09779     -0.09779     15.60897    278.64910 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.08626      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.02018      0.00000      0.00000     -0.00000     -0.00533      0.61538 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.29024      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.06711     -0.00000      0.00000      0.00000      0.06068     -0.25476 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.20590     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05245     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.20590     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05245     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.20590     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.05245      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.17384     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.28748      0.00000     -0.00000     -0.00000      0.16852    -36.02594 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.51169      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.13297      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.51169      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13297      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.51169      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.13297     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.48642      0.00000      0.00000     -0.84249     -0.00000     -0.28676      0.00000      0.00000     -0.00000      0.21283      0.00000     -0.00000     -0.36861     -0.00000      0.06854     -0.00000      0.00000      0.00000      0.06309     16.26781 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.68498     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.73723     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.68498      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.73723     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.48641      0.00000      0.00000      0.84249     -0.00000     -0.28676      0.00000      0.00000     -0.00000      0.21281      0.00000     -0.00000      0.36862     -0.00000      0.06854     -0.00000      0.00000      0.00000      0.06309     16.26781 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68498      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.73723      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.97283      0.00000      0.00000     -0.00000     -0.00000     -0.28676      0.00000      0.00000     -0.00000     -0.42564     -0.00000      0.00000     -0.00001      0.00000      0.06854     -0.00000      0.00000      0.00000      0.06309     16.26781 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -2.08336      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.47911     -0.00000      0.00000      0.00000     57.10905     11.15961 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.06379     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.33131      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.06379     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.33131     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.06379     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.33131     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03682     -0.00000     -0.00000     -0.06377      0.00000      0.46046     -0.00000     -0.00000      0.00000     -0.52967     -0.00000      0.00000      0.91738      0.00000     -0.08597      0.00000     -0.00000     -0.00000    -25.65863     -5.24157 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.12754      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.83478      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.12754     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.83478      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03682     -0.00000     -0.00000      0.06377      0.00000      0.46046     -0.00000     -0.00000      0.00000     -0.52964     -0.00000      0.00000     -0.91740      0.00000     -0.08597      0.00000     -0.00000     -0.00000    -25.65863     -5.24157 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.12754     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.83478     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07363     -0.00000     -0.00000     -0.00000      0.00000      0.46046     -0.00000     -0.00000      0.00000      1.05931      0.00000     -0.00000      0.00002     -0.00000     -0.08597      0.00000     -0.00000     -0.00000    -25.65863     -5.24157 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00790      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.03496      0.00000     -0.00000     -0.00000      0.55770      0.19133 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.02842      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.03864      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.02842      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.03864      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02842      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.03864      0.00000     -0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.08627      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.02011      0.00000      0.00000      0.00000     -0.00536      0.61538 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.29027     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06685     -0.00000     -0.00000     -0.00000      0.06073     -0.25476 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.20596     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.05215     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.20596     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.05215     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.20596      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05215     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.17394      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.28664      0.00000      0.00000     -0.00000      0.16887    -36.02595 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.51185      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.13223     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.51185      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.13223      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.51185     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13223      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.48641      0.00000      0.00000     -0.84251      0.00000      0.28678     -0.00000      0.00000      0.00000     -0.21281     -0.00000      0.00000     -0.36858     -0.00000     -0.06824     -0.00000     -0.00000      0.00000      0.06289     16.26781 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.68501      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.73718      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.68501      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.73718      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.48643      0.00000      0.00000      0.84250      0.00000      0.28678     -0.00000      0.00000      0.00000     -0.21280     -0.00000      0.00000      0.36859     -0.00000     -0.06824     -0.00000     -0.00000      0.00000      0.06289     16.26781 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.68501      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.73718     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.97284      0.00000      0.00000      0.00001      0.00000      0.28678     -0.00000      0.00000      0.00000      0.42561      0.00000     -0.00000     -0.00001      0.00000     -0.06824      0.00000     -0.00000     -0.00000      0.06289     16.26781 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      2.08350     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.43732     -0.00000     -0.00000      0.00000     57.10921     11.16047 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.06427     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.32980     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.06427     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.32980     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.06427      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.32980     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03680     -0.00000     -0.00000     -0.06374     -0.00000     -0.46043      0.00000     -0.00000     -0.00000      0.52967      0.00000     -0.00000      0.91738      0.00000      0.06753      0.00000      0.00000     -0.00000    -25.65861     -5.24196 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.12748     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.83478     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.12748     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.83478      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03680     -0.00000     -0.00000      0.06374     -0.00000     -0.46043      0.00000     -0.00000     -0.00000      0.52964      0.00000     -0.00000     -0.91740      0.00000      0.06753      0.00000      0.00000     -0.00000    -25.65861     -5.24196 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.12748     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.83478      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07360     -0.00000     -0.00000      0.00000     -0.00000     -0.46043      0.00000     -0.00000     -0.00000     -1.05931     -0.00000      0.00000      0.00002     -0.00000      0.06753     -0.00000     -0.00000      0.00000    -25.65861     -5.24196 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00718     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.03536      0.00000      0.00000      0.00000      0.55696      0.19133 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.02694      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.03868      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02694      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.03868      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.02694     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.03868      0.00000      0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"I\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.01719     -0.05793      0.00000      0.00000      0.00000      0.23504      0.00000      0.00000      0.00000     -0.05748      0.00000      0.00000     -0.05748      0.00000     -0.05748     -0.38815      0.00000      0.00000      0.00000      0.08236      0.00000      0.00000      0.08236      0.00000      0.08236      0.04415      0.00000      0.00000      0.00000 \n    -0.05793      0.19524      0.00000      0.00000      0.00000     -0.79214      0.00000      0.00000      0.00000      0.19372      0.00000      0.00000      0.19372      0.00000      0.19372      1.30825      0.00000      0.00000      0.00000     -0.27763      0.00000      0.00000     -0.27763      0.00000     -0.27763     -0.14719      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.09727      0.00000      0.00000      0.00000     -0.24107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.49122      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08666      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.09727      0.00000      0.00000      0.00000     -0.24107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.49122      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08666      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.09727      0.00000      0.00000      0.00000     -0.24107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.49122      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08666 \n     0.23504     -0.79214      0.00000      0.00000      0.00000      3.21449      0.00000      0.00000      0.00000     -0.78606      0.00000      0.00000     -0.78606      0.00000     -0.78606     -5.30701      0.00000      0.00000      0.00000      1.12528      0.00000      0.00000      1.12528      0.00000      1.12528      0.63062      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.24107      0.00000      0.00000      0.00000      0.59746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.21772      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21980      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.24107      0.00000      0.00000      0.00000      0.59746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.21772      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21980      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.24107      0.00000      0.00000      0.00000      0.59746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.21772      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21980 \n    -0.05748      0.19372      0.00000      0.00000      0.00000     -0.78606      0.00000      0.00000      0.00000      2.46598      0.00000      0.00000     -0.94465      0.00000     -0.94464      1.29798      0.00000      0.00000      0.00000     -1.06428      0.00000      0.00000      0.11914      0.00000      0.11914     -0.15027      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05748      0.19372      0.00000      0.00000      0.00000     -0.78606      0.00000      0.00000      0.00000     -0.94465      0.00000      0.00000      2.46598      0.00000     -0.94464      1.29798      0.00000      0.00000      0.00000      0.11914      0.00000      0.00000     -1.06427      0.00000      0.11914     -0.15027      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05748      0.19372      0.00000      0.00000      0.00000     -0.78606      0.00000      0.00000      0.00000     -0.94464      0.00000      0.00000     -0.94464      0.00000      2.46598      1.29798      0.00000      0.00000      0.00000      0.11915      0.00000      0.00000      0.11914      0.00000     -1.06427     -0.15027      0.00000      0.00000      0.00000 \n    -0.38815      1.30825      0.00000      0.00000      0.00000     -5.30701      0.00000      0.00000      0.00000      1.29798      0.00000      0.00000      1.29798      0.00000      1.29798      8.76805      0.00000      0.00000      0.00000     -1.86233      0.00000      0.00000     -1.86233      0.00000     -1.86233     -0.92816      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.49122      0.00000      0.00000      0.00000     -1.21772      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.48739      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54558      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.49122      0.00000      0.00000      0.00000     -1.21772      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.48739      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54558      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.49122      0.00000      0.00000      0.00000     -1.21772      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.48739      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54558 \n     0.08236     -0.27763      0.00000      0.00000      0.00000      1.12528      0.00000      0.00000      0.00000     -1.06428      0.00000      0.00000      0.11914      0.00000      0.11915     -1.86233      0.00000      0.00000      0.00000      2.67090      0.00000      0.00000     -0.73970      0.00000     -0.73971      0.13975      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82126      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82126      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08236     -0.27763      0.00000      0.00000      0.00000      1.12528      0.00000      0.00000      0.00000      0.11914      0.00000      0.00000     -1.06427      0.00000      0.11914     -1.86233      0.00000      0.00000      0.00000     -0.73970      0.00000      0.00000      2.67089      0.00000     -0.73971      0.13975      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82126      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08236     -0.27763      0.00000      0.00000      0.00000      1.12528      0.00000      0.00000      0.00000      0.11914      0.00000      0.00000      0.11914      0.00000     -1.06427     -1.86233      0.00000      0.00000      0.00000     -0.73971      0.00000      0.00000     -0.73971      0.00000      2.67091      0.13975      0.00000      0.00000      0.00000 \n     0.04415     -0.14719      0.00000      0.00000      0.00000      0.63062      0.00000      0.00000      0.00000     -0.15027      0.00000      0.00000     -0.15027      0.00000     -0.15027     -0.92816      0.00000      0.00000      0.00000      0.13975      0.00000      0.00000      0.13975      0.00000      0.13975      2.16022      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.08666      0.00000      0.00000      0.00000      0.21980      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54558      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.81328      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.08666      0.00000      0.00000      0.00000      0.21980      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54558      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.81328      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.08666      0.00000      0.00000      0.00000      0.21980      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54558      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.81328 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.96436      0.96436      0.96436      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.70231      0.70231      0.70231      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1149.80400   -172.43310   -163.73750   -163.73750   -163.73750    -33.38919    -30.23519    -30.23519    -30.23519    -21.70046    -21.70046    -21.70046    -21.70046    -21.70046     -5.55639     -4.25655     -4.25655     -4.25655     -1.45461     -1.45461     -1.45461     -1.45461     -1.45461     -0.43729     -0.17069     -0.17069     -0.17069     16.89002    297.58610 \n   </alphaeps>\n   <betaeps>\n -1149.80400   -172.43270   -163.73700   -163.73700   -163.73700    -33.38859    -30.23458    -30.23458    -30.23458    -21.69989    -21.69989    -21.69989    -21.69989    -21.69989     -5.55448     -4.25448     -4.25448     -4.25448     -1.45267     -1.45267     -1.45267     -1.45267     -1.45267     -0.41929     -0.15269     -0.15269     -0.15269     16.89966    297.58740 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.09006     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.02199      0.00000      0.00000     -0.00000     -0.00590      0.62492 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.30372      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.07333     -0.00000     -0.00000      0.00000      0.06827     -0.26397 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.21451     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.05608      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.21451      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05608     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.21451      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05608      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.22841     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.31357      0.00000      0.00000     -0.00000      0.06787    -36.32033 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.53100      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.14186     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.53100     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.14186      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.53100     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.14186     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.97288     -0.30088      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.43633     -0.07481     -0.00000     -0.00000      0.00000      0.10709     16.41007 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.68507      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.75574      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.68507     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.75574     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.84254     -0.00000     -0.00000     -0.48644     -0.30088      0.00000     -0.00000      0.00000     -0.00000     -0.37787     -0.00000      0.00000      0.21817     -0.07481     -0.00000     -0.00000      0.00000      0.10709     16.41007 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.68507      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.75574     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.84254     -0.00000     -0.00000     -0.48644     -0.30088      0.00000     -0.00000      0.00000     -0.00000      0.37787     -0.00000      0.00000      0.21816     -0.07481     -0.00000     -0.00000      0.00000      0.10709     16.41007 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -2.04204     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.47056     -0.00000     -0.00000      0.00000     57.30134     12.77576 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.06981     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.34493      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.06981      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.34493     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.06981      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.34493      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.07165      0.44002      0.00000      0.00000     -0.00000      0.00000      0.00001      0.00000     -0.00000      1.06383      0.07408      0.00000      0.00000     -0.00000    -25.74976     -5.97412 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.12410     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.84261      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.12410      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.84261      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.06205      0.00000      0.00000     -0.03583      0.44002      0.00000      0.00000     -0.00000      0.00000      0.92130      0.00000     -0.00000     -0.53192      0.07408      0.00000      0.00000     -0.00000    -25.74976     -5.97412 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12410     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.84261      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06205      0.00000      0.00000     -0.03582      0.44002      0.00000      0.00000     -0.00000      0.00000     -0.92131      0.00000     -0.00000     -0.53191      0.07408      0.00000      0.00000     -0.00000    -25.74976     -5.97412 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00858      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.03918     -0.00000     -0.00000      0.00000      0.56793      0.21133 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02524      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.04269     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.02524     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.04269      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.02524     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.04269     -0.00000     -0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.09006      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02196      0.00000      0.00000     -0.00000     -0.00591      0.62492 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.30373     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.07323     -0.00000     -0.00000      0.00000      0.06829     -0.26397 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.21453     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05597     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.21453      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05597     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.21453     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.05597      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.22845      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.31319      0.00000      0.00000     -0.00000      0.06800    -36.32033 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.53105      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.14159      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.53105     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.14159      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.53105      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.14159      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.97288      0.30088     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.43632      0.07467     -0.00000     -0.00000      0.00000      0.10701     16.41007 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.68508      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.75572      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.68508     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.75572      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.84254     -0.00000     -0.00000      0.48644      0.30088     -0.00000      0.00000      0.00000     -0.00000     -0.37786     -0.00000     -0.00000     -0.21816      0.07467     -0.00000     -0.00000      0.00000      0.10701     16.41007 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.68508     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.75572     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.84254     -0.00000     -0.00000      0.48644      0.30088     -0.00000      0.00000      0.00000     -0.00000      0.37786     -0.00000     -0.00000     -0.21816      0.07467     -0.00000     -0.00000      0.00000      0.10701     16.41007 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.04182     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.45571     -0.00000     -0.00000      0.00000     57.30139     12.77610 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.06998     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.34440      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.06998      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.34440     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.06998     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.34440     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07164     -0.43988      0.00000     -0.00000     -0.00000      0.00000      0.00001      0.00000      0.00000     -1.06383     -0.06754      0.00000      0.00000     -0.00000    -25.74975     -5.97427 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.12408     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.84262     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.12408      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.84262      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06204      0.00000      0.00000      0.03582     -0.43988      0.00000     -0.00000     -0.00000      0.00000      0.92130      0.00000      0.00000      0.53192     -0.06754      0.00000      0.00000     -0.00000    -25.74975     -5.97427 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12408      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.84262      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06204      0.00000      0.00000      0.03582     -0.43988      0.00000     -0.00000     -0.00000      0.00000     -0.92131      0.00000      0.00000      0.53191     -0.06754      0.00000      0.00000     -0.00000    -25.74975     -5.97427 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00830     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.03932     -0.00000     -0.00000      0.00000      0.56767      0.21134 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.02473      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.04271      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02473     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.04271     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02473      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.04271      0.00000      0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n"
  },
  {
    "path": "src/madness/chem/coredata/mcp_guess",
    "content": "<?xml version=\"1.0\" ?>\n<name>\n   MCP\n</name>\n<basis symbol=\"H\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      18.73113700\n      2.82539370\n      0.64012170\n    </exponents>\n    <coefficients>\n      0.03349460\n      0.23472695\n      0.81375733\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.16127780\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"He\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      38.42163400\n      5.77803000\n      1.24177400\n    </exponents>\n    <coefficients>\n      0.02376600\n      0.15467900\n      0.46963000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.29796400\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Li\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      642.41892000\n      96.79851500\n      22.09112100\n      6.20107030\n      1.93511770\n      0.63673580\n    </exponents>\n    <coefficients>\n      0.00214260\n      0.01620890\n      0.07731560\n      0.24578600\n      0.47018900\n      0.34547080\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.32491840\n      0.63243060\n      0.07905340\n    </exponents>\n    <scoefficients>\n      -0.03509170\n      -0.19123280\n      1.08398780\n    </scoefficients>\n    <pcoefficients>\n      0.00894150\n      0.14100950\n      0.94536370\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03596200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Be\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      1264.58570000\n      189.93681000\n      43.15908900\n      12.09866300\n      3.80632320\n      1.27289030\n    </exponents>\n    <coefficients>\n      0.00194480\n      0.01483510\n      0.07209060\n      0.23715420\n      0.46919870\n      0.35652020\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.19646310\n      0.74781330\n      0.21996630\n    </exponents>\n    <scoefficients>\n      -0.11264870\n      -0.22950640\n      1.18691670\n    </scoefficients>\n    <pcoefficients>\n      0.05598020\n      0.26155060\n      0.79397230\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.08230990\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"B\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      2068.88230000\n      310.64957000\n      70.68303300\n      19.86108000\n      6.29930480\n      2.12702700\n    </exponents>\n    <coefficients>\n      0.00186630\n      0.01425150\n      0.06955160\n      0.23257290\n      0.46707870\n      0.36343140\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.72797100\n      1.19033770\n      0.35941170\n    </exponents>\n    <scoefficients>\n      -0.13039380\n      -0.13078890\n      1.13094440\n    </scoefficients>\n    <pcoefficients>\n      0.07459760\n      0.30784670\n      0.74345680\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.12675120\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"C\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      3047.52490000\n      457.36951000\n      103.94869000\n      29.21015500\n      9.28666300\n      3.16392700\n    </exponents>\n    <coefficients>\n      0.00183470\n      0.01403730\n      0.06884260\n      0.23218440\n      0.46794130\n      0.36231200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.86827240\n      1.88128850\n      0.54424930\n    </exponents>\n    <scoefficients>\n      -0.11933240\n      -0.16085420\n      1.14345640\n    </scoefficients>\n    <pcoefficients>\n      0.06899910\n      0.31642400\n      0.74430830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.16871440\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"N\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      4173.51100000\n      627.45790000\n      142.90210000\n      40.23433000\n      12.82021000\n      4.39043700\n    </exponents>\n    <coefficients>\n      0.00183480\n      0.01399500\n      0.06858700\n      0.23224100\n      0.46907000\n      0.36045500\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      11.62635800\n      2.71628000\n      0.77221800\n    </exponents>\n    <scoefficients>\n      -0.11496100\n      -0.16911800\n      1.14585200\n    </scoefficients>\n    <pcoefficients>\n      0.06758000\n      0.32390700\n      0.74089500\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.21203130\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"O\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      5484.67170000\n      825.23495000\n      188.04696000\n      52.96450000\n      16.89757000\n      5.79963530\n    </exponents>\n    <coefficients>\n      0.00183110\n      0.01395010\n      0.06844510\n      0.23271430\n      0.47019300\n      0.35852090\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      15.53961600\n      3.59993360\n      1.01376180\n    </exponents>\n    <scoefficients>\n      -0.11077750\n      -0.14802630\n      1.13076700\n    </scoefficients>\n    <pcoefficients>\n      0.07087430\n      0.33975280\n      0.72715860\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.27000580\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"F\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      7001.71309000\n      1051.36609000\n      239.28569000\n      67.39744530\n      21.51995730\n      7.40310130\n    </exponents>\n    <coefficients>\n      0.00181962\n      0.01391608\n      0.06840532\n      0.23318576\n      0.47126744\n      0.35661855\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      20.84795280\n      4.80830834\n      1.34406986\n    </exponents>\n    <scoefficients>\n      -0.10850698\n      -0.14645166\n      1.12868858\n    </scoefficients>\n    <pcoefficients>\n      0.07162872\n      0.34591210\n      0.72246996\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.35815139\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ne\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      8425.85153000\n      1268.51940000\n      289.62141400\n      81.85900400\n      26.25150790\n      9.09472051\n    </exponents>\n    <coefficients>\n      0.00188435\n      0.01433690\n      0.07010962\n      0.23737327\n      0.47300713\n      0.34840124\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      26.53213100\n      6.10175501\n      1.69627153\n    </exponents>\n    <scoefficients>\n      -0.10711829\n      -0.14616382\n      1.12777350\n    </scoefficients>\n    <pcoefficients>\n      0.07190959\n      0.34951337\n      0.71994051\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.44581870\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Na\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    250.772430000\n     45.678511000\n     12.362388000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     12.040193000\n      2.797881900\n      0.909958000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.478740600\n      0.412564900\n      0.161475100\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mg\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    299.237400000\n     54.506470000\n     14.751580000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     15.121820000\n      3.513987000\n      1.142857000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.395448000\n      0.389326000\n      0.152380000\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>\n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Al\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      13983.10000000\n      2098.75000000\n      477.70500000\n      134.36000000\n      42.87090000\n      14.51890000\n    </exponents>\n    <coefficients>\n      0.00194267\n      0.01485990\n      0.07284940\n      0.24683000\n      0.48725800\n      0.32349600\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      239.66800000\n      57.44190000\n      18.28590000\n      6.59914000\n      2.49049000\n      0.94454000\n    </exponents>\n    <scoefficients>\n      -0.00292619\n      -0.03740800\n      -0.11448700\n      0.11563500\n      0.61259500\n      0.39379900\n    </scoefficients>\n    <pcoefficients>\n      0.00460285\n      0.03319900\n      0.13628200\n      0.33047600\n      0.44914600\n      0.26570400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.27790000\n      0.39759000\n      0.16009500\n    </exponents>\n    <scoefficients>\n      -0.22760600\n      0.00144583\n      1.09279000\n    </scoefficients>\n    <pcoefficients>\n      -0.01751300\n      0.24453300\n      0.80493400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.05565770\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Si\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      16115.90000000\n      2425.58000000\n      553.86700000\n      156.34000000\n      50.06830000\n      17.01780000\n    </exponents>\n    <coefficients>\n      0.00195948\n      0.01492880\n      0.07284780\n      0.24613000\n      0.48591400\n      0.32500200\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      292.71800000\n      69.87310000\n      22.33630000\n      8.15039000\n      3.13458000\n      1.22543000\n    </exponents>\n    <scoefficients>\n      -0.00278094\n      -0.03571460\n      -0.11498500\n      0.09356340\n      0.60301700\n      0.41895900\n    </scoefficients>\n    <pcoefficients>\n      0.00443826\n      0.03266790\n      0.13472100\n      0.32867800\n      0.44964000\n      0.26137200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.72738000\n      0.57292200\n      0.22219200\n    </exponents>\n    <scoefficients>\n      -0.24463000\n      0.00431572\n      1.09818000\n    </scoefficients>\n    <pcoefficients>\n      -0.01779510\n      0.25353900\n      0.80066900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.07783690\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"P\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      19413.30000000\n      2909.42000000\n      661.36400000\n      185.75900000\n      59.19430000\n      20.03100000\n    </exponents>\n    <coefficients>\n      0.00185160\n      0.01420620\n      0.06999950\n      0.24007900\n      0.48476200\n      0.33520000\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      339.47800000\n      81.01010000\n      25.87800000\n      9.45221000\n      3.66566000\n      1.46746000\n    </exponents>\n    <scoefficients>\n      -0.00278217\n      -0.03604990\n      -0.11663100\n      0.09683280\n      0.61441800\n      0.40379800\n    </scoefficients>\n    <pcoefficients>\n      0.00456462\n      0.03369360\n      0.13975500\n      0.33936200\n      0.45092100\n      0.23858600\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.15623000\n      0.74899700\n      0.28314500\n    </exponents>\n    <scoefficients>\n      -0.25292300\n      0.03285170\n      1.08125000\n    </scoefficients>\n    <pcoefficients>\n      -0.01776530\n      0.27405800\n      0.78542100\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.09983170\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"S\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      21917.10000000\n      3301.49000000\n      754.14600000\n      212.71100000\n      67.98960000\n      23.05150000\n    </exponents>\n    <coefficients>\n      0.00186900\n      0.01423000\n      0.06969600\n      0.23848700\n      0.48330700\n      0.33807400\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      423.73500000\n      100.71000000\n      32.15990000\n      11.80790000\n      4.63110000\n      1.87025000\n    </exponents>\n    <scoefficients>\n      -0.00237670\n      -0.03169300\n      -0.11331700\n      0.05609000\n      0.59225500\n      0.45500600\n    </scoefficients>\n    <pcoefficients>\n      0.00406100\n      0.03068100\n      0.13045200\n      0.32720500\n      0.45285100\n      0.25604200\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.61584000\n      0.92216700\n      0.34128700\n    </exponents>\n    <scoefficients>\n      -0.25037400\n      0.06695700\n      1.05451000\n    </scoefficients>\n    <pcoefficients>\n      -0.01451100\n      0.31026300\n      0.75448300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.11716700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cl\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      25180.10000000\n      3780.35000000\n      860.47400000\n      242.14500000\n      77.33490000\n      26.24700000\n    </exponents>\n    <coefficients>\n      0.00183300\n      0.01403400\n      0.06909700\n      0.23745200\n      0.48303400\n      0.33985600\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      491.76500000\n      116.98400000\n      37.41530000\n      13.78340000\n      5.45215000\n      2.22588000\n    </exponents>\n    <scoefficients>\n      -0.00229740\n      -0.03071400\n      -0.11252800\n      0.04501600\n      0.58935300\n      0.46520600\n    </scoefficients>\n    <pcoefficients>\n      0.00398940\n      0.03031800\n      0.12988000\n      0.32795100\n      0.45352700\n      0.25215400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.18649000\n      1.14427000\n      0.42037700\n    </exponents>\n    <scoefficients>\n      -0.25183000\n      0.06158900\n      1.06018000\n    </scoefficients>\n    <pcoefficients>\n      -0.01429900\n      0.32357200\n      0.74350700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.14265700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ar\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      28348.30000000\n      4257.62000000\n      969.85700000\n      273.26300000\n      87.36950000\n      29.68670000\n    </exponents>\n    <coefficients>\n      0.00182526\n      0.01396860\n      0.06870730\n      0.23620400\n      0.48221400\n      0.34204300\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      575.89100000\n      136.81600000\n      43.80980000\n      16.20940000\n      6.46084000\n      2.65114000\n    </exponents>\n    <scoefficients>\n      -0.00215972\n      -0.02907750\n      -0.11082700\n      0.02769990\n      0.57761300\n      0.48868800\n    </scoefficients>\n    <pcoefficients>\n      0.00380665\n      0.02923050\n      0.12646700\n      0.32351000\n      0.45489600\n      0.25663000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.86028000\n      1.41373000\n      0.51664600\n    </exponents>\n    <scoefficients>\n      -0.25559200\n      0.03780660\n      1.08056000\n    </scoefficients>\n    <pcoefficients>\n      -0.01591970\n      0.32464600\n      0.74399000\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.17388800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"K\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      31594.42000000\n      4744.33000000\n      1080.41900000\n      304.23380000\n      97.24586000\n      33.02495000\n    </exponents>\n    <coefficients>\n      0.00182801\n      0.01399403\n      0.06887129\n      0.23697600\n      0.48290400\n      0.34047950\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      622.76250000\n      147.88390000\n      47.32735000\n      17.51495000\n      6.92272200\n      2.76827700\n    </exponents>\n    <scoefficients>\n      -0.00250298\n      -0.03315550\n      -0.12263870\n      0.05353643\n      0.61938600\n      0.43458780\n    </scoefficients>\n    <pcoefficients>\n      0.00409464\n      0.03145199\n      0.13515580\n      0.33905000\n      0.46294550\n      0.22426380\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      11.84802000\n      4.07921100\n      1.76348100\n      0.78892700\n      0.35038700\n      0.14634400\n    </exponents>\n    <scoefficients>\n      0.01277689\n      0.20987670\n      -0.00309527\n      -0.55938840\n      -0.51347600\n      -0.06598035\n    </scoefficients>\n    <pcoefficients>\n      -0.01221377\n      -0.00690054\n      0.20074660\n      0.42813320\n      0.39701560\n      0.11047180\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.71680100\n      0.23374100\n      0.03867500\n    </exponents>\n    <scoefficients>\n      -0.05237772\n      -0.27985030\n      1.14154700\n    </scoefficients>\n    <pcoefficients>\n      0.03164300\n      -0.04046160\n      1.01202900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.01652100\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ca\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      35264.86000000\n      5295.50300000\n      1206.02000000\n      339.68390000\n      108.62640000\n      36.92103000\n    </exponents>\n    <coefficients>\n      0.00181350\n      0.01388493\n      0.06836162\n      0.23561880\n      0.48206390\n      0.34298190\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      706.30960000\n      167.81870000\n      53.82558000\n      20.01638000\n      7.97027900\n      3.21205900\n    </exponents>\n    <scoefficients>\n      0.00244823\n      0.03241504\n      0.12262190\n      -0.04316965\n      -0.61269950\n      -0.44875400\n    </scoefficients>\n    <pcoefficients>\n      0.00402037\n      0.03100601\n      0.13372790\n      0.33679830\n      0.46312810\n      0.22575320\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      14.19518000\n      4.88082800\n      2.16039000\n      0.98789900\n      0.44951700\n      0.18738700\n    </exponents>\n    <scoefficients>\n      0.01084500\n      0.20883330\n      0.03150338\n      -0.55265180\n      -0.54379970\n      -0.06669342\n    </scoefficients>\n    <pcoefficients>\n      -0.01289621\n      -0.01025198\n      0.19597810\n      0.43579330\n      0.39964520\n      0.09713636\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.03227100\n      0.38117100\n      0.06513100\n    </exponents>\n    <scoefficients>\n      -0.04439720\n      -0.32845630\n      1.16301000\n    </scoefficients>\n    <pcoefficients>\n      -0.42986210\n      0.00693583\n      0.97059330\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02601000\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sc\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      39088.98000000\n      5869.79200000\n      1336.91000000\n      376.60310000\n      120.46790000\n      40.98032000\n    </exponents>\n    <coefficients>\n      0.00180326\n      0.01380769\n      0.06800396\n      0.23470990\n      0.48156900\n      0.34456520\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      786.28520000\n      186.88700000\n      60.00935000\n      22.25883000\n      8.88514900\n      3.60921100\n    </exponents>\n    <scoefficients>\n      0.00245186\n      0.03259579\n      0.12382420\n      -0.04359890\n      -0.61771810\n      -0.44328230\n    </scoefficients>\n    <pcoefficients>\n      0.00403953\n      0.03122570\n      0.13498330\n      0.34247930\n      0.46231130\n      0.21775240\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      29.84355000\n      9.54238300\n      4.05679000\n      1.70470300\n      0.70623400\n      0.27953600\n    </exponents>\n    <scoefficients>\n      -0.00258630\n      0.07188424\n      0.25032600\n      -0.29910030\n      -0.74468180\n      -0.17997760\n    </scoefficients>\n    <pcoefficients>\n      -0.00609665\n      -0.02628884\n      0.05091001\n      0.37980970\n      0.51708830\n      0.18297720\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.06560900\n      0.42593300\n      0.07632000\n    </exponents>\n    <scoefficients>\n      0.06482978\n      0.32537560\n      -1.17080600\n    </scoefficients>\n    <pcoefficients>\n      -0.29384400\n      0.09235323\n      0.98479300\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.02959400\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      11.14701000\n      2.82104300\n      0.81962000\n    </exponents>\n    <coefficients>\n      0.08747672\n      0.37956350\n      0.71803930\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.22146800\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ti\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      43152.95000000\n      6479.57100000\n      1475.67500000\n      415.69910000\n      133.00060000\n      45.27222000\n    </exponents>\n    <coefficients>\n      0.00179187\n      0.01372392\n      0.06762830\n      0.23376420\n      0.48106960\n      0.34622800\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      874.68260000\n      207.97850000\n      66.87918000\n      24.87347000\n      9.96844100\n      4.06382600\n    </exponents>\n    <scoefficients>\n      0.00243101\n      0.03233027\n      0.12425200\n      -0.03903905\n      -0.61717890\n      -0.44730970\n    </scoefficients>\n    <pcoefficients>\n      0.00401768\n      0.03113966\n      0.13490770\n      0.34316720\n      0.46257600\n      0.21546030\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      33.64363000\n      10.87565000\n      4.62822500\n      1.95012600\n      0.80945200\n      0.32047400\n    </exponents>\n    <scoefficients>\n      -0.00294036\n      0.07163103\n      0.25289150\n      -0.29664010\n      -0.74322150\n      -0.18535200\n    </scoefficients>\n    <pcoefficients>\n      -0.00631162\n      -0.02697638\n      0.05316847\n      0.38455490\n      0.51276620\n      0.18111350\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.22414800\n      0.48426300\n      0.08409600\n    </exponents>\n    <scoefficients>\n      0.06351465\n      0.31514040\n      -1.16259500\n    </scoefficients>\n    <pcoefficients>\n      -0.21120700\n      0.07771998\n      0.98982140\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03203600\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      13.69085000\n      3.51315400\n      1.04043400\n    </exponents>\n    <coefficients>\n      0.08589418\n      0.37846710\n      0.71612390\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.28696200\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"V\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      47354.33000000\n      7110.78700000\n      1619.59100000\n      456.33790000\n      146.06060000\n      49.75791000\n    </exponents>\n    <coefficients>\n      0.00178451\n      0.01366754\n      0.06736122\n      0.23305520\n      0.48063160\n      0.34748020\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      968.14840000\n      230.28210000\n      74.14591000\n      27.64107000\n      11.11475000\n      4.54311300\n    </exponents>\n    <scoefficients>\n      0.00241060\n      0.03207243\n      0.12459420\n      -0.03482177\n      -0.61673740\n      -0.45098440\n    </scoefficients>\n    <pcoefficients>\n      0.00399500\n      0.03104061\n      0.13477470\n      0.34372790\n      0.46287590\n      0.21355470\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      37.64050000\n      12.28238000\n      5.23336600\n      2.20895000\n      0.91788000\n      0.36341200\n    </exponents>\n    <scoefficients>\n      -0.00323320\n      0.07130744\n      0.25438200\n      -0.29338870\n      -0.74156950\n      -0.19094100\n    </scoefficients>\n    <pcoefficients>\n      -0.00649406\n      -0.02753453\n      0.05516284\n      0.38796720\n      0.50902580\n      0.18038400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.39278100\n      0.54391300\n      0.09147600\n    </exponents>\n    <scoefficients>\n      0.06139703\n      0.30611300\n      -1.15489000\n    </scoefficients>\n    <pcoefficients>\n      -0.18912650\n      0.08005453\n      0.98773990\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03431200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      16.05025000\n      4.16006300\n      1.24326500\n    </exponents>\n    <coefficients>\n      0.08599899\n      0.38029960\n      0.71276590\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.34427700\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cr\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      51789.81000000\n      7776.84900000\n      1771.38500000\n      499.15880000\n      159.79820000\n      54.47021000\n    </exponents>\n    <coefficients>\n      0.00177618\n      0.01360476\n      0.06706925\n      0.23231040\n      0.48024100\n      0.34876530\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1064.32800000\n      253.21380000\n      81.60924000\n      30.48193000\n      12.29439000\n      5.03772200\n    </exponents>\n    <scoefficients>\n      0.00239967\n      0.03194886\n      0.12508680\n      -0.03221866\n      -0.61722840\n      -0.45259360\n    </scoefficients>\n    <pcoefficients>\n      0.00398700\n      0.03104662\n      0.13505180\n      0.34488650\n      0.46285710\n      0.21104260\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      41.56291000\n      13.67627000\n      5.84439000\n      2.47160900\n      1.02830800\n      0.40725000\n    </exponents>\n    <scoefficients>\n      -0.00345422\n      0.07218428\n      0.25448200\n      -0.29345340\n      -0.73854550\n      -0.19471570\n    </scoefficients>\n    <pcoefficients>\n      -0.00672250\n      -0.02806471\n      0.05820028\n      0.39169880\n      0.50478230\n      0.17902900\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.57146400\n      0.60558000\n      0.09856100\n    </exponents>\n    <scoefficients>\n      0.05892219\n      0.29760550\n      -1.14750600\n    </scoefficients>\n    <pcoefficients>\n      -0.19301000\n      0.09605620\n      0.98176090\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03645900\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      18.41930000\n      4.81266100\n      1.44644700\n    </exponents>\n    <coefficients>\n      0.08650816\n      0.38266990\n      0.70937720\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.40041300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mn\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      56347.14000000\n      8460.94300000\n      1927.32500000\n      543.23430000\n      173.99050000\n      59.36005000\n    </exponents>\n    <coefficients>\n      0.00177158\n      0.01357081\n      0.06690605\n      0.23185410\n      0.47990460\n      0.34957370\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1165.41200000\n      277.32760000\n      89.47278000\n      33.48256000\n      13.54037000\n      5.55797200\n    </exponents>\n    <scoefficients>\n      0.00238875\n      0.03181708\n      0.12546700\n      -0.02955431\n      -0.61751600\n      -0.45444580\n    </scoefficients>\n    <pcoefficients>\n      0.00397732\n      0.03103112\n      0.13518940\n      0.34573870\n      0.46292050\n      0.20905920\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      45.83532000\n      15.18777000\n      6.50071000\n      2.75158300\n      1.14540400\n      0.45368700\n    </exponents>\n    <scoefficients>\n      -0.00366586\n      0.07231971\n      0.25444860\n      -0.29103800\n      -0.73598600\n      -0.19976170\n    </scoefficients>\n    <pcoefficients>\n      -0.00688758\n      -0.02846816\n      0.06031832\n      0.39389610\n      0.50137690\n      0.17922640\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.75799900\n      0.66702200\n      0.10512900\n    </exponents>\n    <scoefficients>\n      0.05628572\n      0.28974910\n      -1.14065300\n    </scoefficients>\n    <pcoefficients>\n      -0.50350240\n      0.23450110\n      0.91412570\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.03841800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      20.94355000\n      5.51048600\n      1.66503800\n    </exponents>\n    <coefficients>\n      0.08672702\n      0.38418830\n      0.70690710\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.46173300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Fe\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      61132.62000000\n      9179.34200000\n      2090.85700000\n      589.24790000\n      188.75430000\n      64.44629000\n    </exponents>\n    <coefficients>\n      0.00176611\n      0.01353038\n      0.06673128\n      0.23148230\n      0.47970580\n      0.35019760\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1259.98000000\n      299.87610000\n      96.84917000\n      36.31020000\n      14.72996000\n      6.06607500\n    </exponents>\n    <scoefficients>\n      0.00243801\n      0.03224048\n      0.12657240\n      -0.03139902\n      -0.62075930\n      -0.45029140\n    </scoefficients>\n    <pcoefficients>\n      0.00402802\n      0.03144647\n      0.13683170\n      0.34872360\n      0.46179310\n      0.20430580\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      50.43485000\n      16.83929000\n      7.19208600\n      3.05342000\n      1.27364300\n      0.50409100\n    </exponents>\n    <scoefficients>\n      -0.00387326\n      0.07196598\n      0.25565910\n      -0.28828370\n      -0.73428220\n      -0.20493530\n    </scoefficients>\n    <pcoefficients>\n      -0.00701713\n      -0.02877660\n      0.06181383\n      0.39549460\n      0.49890590\n      0.17912510\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.95031600\n      0.73672100\n      0.11417700\n    </exponents>\n    <scoefficients>\n      0.05694869\n      0.28829150\n      -1.13815900\n    </scoefficients>\n    <pcoefficients>\n      -0.45937960\n      0.28521390\n      0.90764850\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04114800\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      23.14994000\n      6.12236800\n      1.84660100\n    </exponents>\n    <coefficients>\n      0.08876935\n      0.38963190\n      0.70148160\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.50436100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Co\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      66148.99000000\n      9933.07700000\n      2262.81600000\n      637.91540000\n      204.41220000\n      69.82538000\n    </exponents>\n    <coefficients>\n      0.00175979\n      0.01348162\n      0.06649342\n      0.23079390\n      0.47929190\n      0.35140970\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1378.84100000\n      328.26940000\n      106.09460000\n      39.83275000\n      16.18622000\n      6.66778800\n    </exponents>\n    <scoefficients>\n      0.00237628\n      0.03167450\n      0.12628880\n      -0.02584552\n      -0.61834910\n      -0.45670080\n    </scoefficients>\n    <pcoefficients>\n      0.00397149\n      0.03108174\n      0.13574390\n      0.34768270\n      0.46263400\n      0.20516320\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      54.52355000\n      18.29783000\n      7.86734800\n      3.34053400\n      1.39375600\n      0.55132600\n    </exponents>\n    <scoefficients>\n      -0.00399300\n      0.07409663\n      0.25420000\n      -0.29216570\n      -0.73187030\n      -0.20407840\n    </scoefficients>\n    <pcoefficients>\n      -0.00729077\n      -0.02926027\n      0.06564150\n      0.40006520\n      0.49502360\n      0.17582400\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.15194700\n      0.81106300\n      0.12101700\n    </exponents>\n    <scoefficients>\n      0.05379843\n      0.27599710\n      -1.12969200\n    </scoefficients>\n    <pcoefficients>\n      -0.21654960\n      0.12404880\n      0.97240640\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04303700\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      25.59306000\n      6.80099000\n      2.05164700\n    </exponents>\n    <coefficients>\n      0.09004748\n      0.39317030\n      0.69768440\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.55567100\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ni\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      71396.35000000\n      10720.84000000\n      2442.12900000\n      688.42650000\n      220.61530000\n      75.39373000\n    </exponents>\n    <coefficients>\n      0.00175300\n      0.01343122\n      0.06627041\n      0.23025080\n      0.47901860\n      0.35234440\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1492.53200000\n      355.40130000\n      114.95340000\n      43.22043000\n      17.59710000\n      7.25776500\n    </exponents>\n    <scoefficients>\n      0.00237071\n      0.03160566\n      0.12663350\n      -0.02417037\n      -0.61877750\n      -0.45767700\n    </scoefficients>\n    <pcoefficients>\n      0.00396755\n      0.03109479\n      0.13595170\n      0.34851360\n      0.46254980\n      0.20351860\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      59.35261000\n      20.02181000\n      8.61456100\n      3.66053100\n      1.52811100\n      0.60405700\n    </exponents>\n    <scoefficients>\n      -0.00416200\n      0.07425111\n      0.25413600\n      -0.29034770\n      -0.73021210\n      -0.20760570\n    </scoefficients>\n    <pcoefficients>\n      -0.00742145\n      -0.02953410\n      0.06731852\n      0.40166600\n      0.49266230\n      0.17568930\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.37927600\n      0.88583900\n      0.12852900\n    </exponents>\n    <scoefficients>\n      0.05157888\n      0.27076110\n      -1.12477000\n    </scoefficients>\n    <pcoefficients>\n      -0.18876630\n      0.10151990\n      0.97909060\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04519500\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      28.19147000\n      7.52358400\n      2.27122800\n    </exponents>\n    <coefficients>\n      0.09098881\n      0.39582080\n      0.69471540\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.61160300\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cu\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      76794.38000000\n      11530.70000000\n      2626.57500000\n      740.49030000\n      237.35280000\n      81.15818000\n    </exponents>\n    <coefficients>\n      0.00174816\n      0.01339602\n      0.06610885\n      0.22982650\n      0.47876750\n      0.35307390\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1610.81400000\n      383.63670000\n      124.17330000\n      46.74678000\n      19.06569000\n      7.87156700\n    </exponents>\n    <scoefficients>\n      0.00236405\n      0.03153635\n      0.12694520\n      -0.02262840\n      -0.61920800\n      -0.45853930\n    </scoefficients>\n    <pcoefficients>\n      0.00396331\n      0.03110223\n      0.13613500\n      0.34929140\n      0.46247800\n      0.20201020\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      64.45732000\n      21.85212000\n      9.40534300\n      3.99916800\n      1.67029700\n      0.65962700\n    </exponents>\n    <scoefficients>\n      -0.00433108\n      0.07412307\n      0.25421080\n      -0.28748430\n      -0.72914360\n      -0.21139510\n    </scoefficients>\n    <pcoefficients>\n      -0.00752373\n      -0.02975687\n      0.06849654\n      0.40271410\n      0.49084900\n      0.17592680\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.60008800\n      0.96309400\n      0.13616100\n    </exponents>\n    <scoefficients>\n      0.05027577\n      0.26500400\n      -1.12015500\n    </scoefficients>\n    <pcoefficients>\n      -0.17029110\n      0.09310133\n      0.98143360\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04733200\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      30.85341000\n      8.26498500\n      2.49533200\n    </exponents>\n    <coefficients>\n      0.09199905\n      0.39850210\n      0.69178970\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.66765800\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Zn\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      82400.94000000\n      12372.55000000\n      2818.35100000\n      794.57170000\n      254.72320000\n      87.13880000\n    </exponents>\n    <coefficients>\n      0.00174333\n      0.01335966\n      0.06594365\n      0.22941510\n      0.47854530\n      0.35377530\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1732.56900000\n      412.71490000\n      133.67800000\n      50.38585000\n      20.58358000\n      8.50594000\n    </exponents>\n    <scoefficients>\n      0.00236146\n      0.03150177\n      0.12727740\n      -0.02145928\n      -0.61976520\n      -0.45901800\n    </scoefficients>\n    <pcoefficients>\n      0.00396313\n      0.03113411\n      0.13639310\n      0.35012660\n      0.46231790\n      0.20049950\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      69.36492000\n      23.62082000\n      10.18471000\n      4.33408200\n      1.81091800\n      0.71484100\n    </exponents>\n    <scoefficients>\n      -0.00444010\n      0.07505253\n      0.25331110\n      -0.28818970\n      -0.72670520\n      -0.21334390\n    </scoefficients>\n    <pcoefficients>\n      -0.00768926\n      -0.02997982\n      0.07082411\n      0.40461410\n      0.48823250\n      0.17519700\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.82384200\n      1.03954300\n      0.14326400\n    </exponents>\n    <scoefficients>\n      0.04898543\n      0.25927930\n      -1.11571100\n    </scoefficients>\n    <pcoefficients>\n      -0.15867630\n      0.08379327\n      0.98405470\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"1\">\n    <exponents>\n      0.04929600\n    </exponents>\n    <scoefficients>\n      1.00000000\n    </scoefficients>\n    <pcoefficients>\n      1.00000000\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      33.70764000\n      9.06110600\n      2.73838300\n    </exponents>\n    <coefficients>\n      0.09262648\n      0.40029800\n      0.68966080\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"1\">\n    <exponents>\n      0.73029400\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<atomicguess symbol=\"H\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.16371      0.27762 \n     0.27762      0.47079 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -0.07019      0.91759 \n   </alphaeps>\n   <betaeps>\n    -0.25951      0.68500 \n   </betaeps>\n   <alphavectors>\n    -0.24849     -1.30499 \n    -0.81877      1.04612 \n   </alphavectors>\n   <betavectors>\n     0.40461      1.26532 \n     0.68614     -1.13753 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"He\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.66346      0.61066 \n     0.61066      0.56205 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -0.55639      1.08876 \n   </alphaeps>\n   <betaeps>\n    -0.55639      1.08876 \n   </betaeps>\n   <alphavectors>\n    -0.57596     -1.15798 \n    -0.53012      1.17967 \n   </alphavectors>\n   <betavectors>\n     0.57596     -1.15798 \n     0.53012      1.17967 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Li\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000   -0.13445845    0.00000000    0.03725601    0.03660753    0.00000000    0.00000000   -0.20476244    0.94516820\n       0.00000000    0.22124123    0.00000000    1.35975730    1.29585091    0.00000000    0.00000000   -7.35883706   -1.55297899\n       0.00000000    0.04398268    0.24824310    0.22209541    0.00000000   -0.79645159    0.00000000    0.75718008    0.00662173\n       0.00000000    0.00000000   -0.88731203    0.24824310   -0.71231754   -5.80504234   -0.79645159    0.00000000    0.00000000\n       0.00000000    0.00000000    1.15650837   -0.88731203    0.24824310    0.00000000   -0.75968154    0.79645159    0.00000000\n       0.00000000    0.46824899    0.00000000   -1.31778467   -1.26185226    0.00000000    0.00000000    7.14876549   -3.29350284\n       0.00000000   -0.03083182    0.27656306    0.27408121    0.00000000   -0.88731203    0.00000000    0.93441295    0.03338988\n       0.00000000    0.00000000    0.87685433    0.27656306    1.18723160    4.02628436   -0.88731203    0.00000000    0.00000000\n       0.00000000    0.00000000   -0.63906918    0.87685433    0.27656306    0.00000000   -0.90426927    0.88731203    0.00000000\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.57941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.42058      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -1.85210     -0.10528     -0.03630     -0.03630     -0.03630      0.09632      0.09632      0.09632      0.11891 \n   </alphaeps>\n   <betaeps>\n    -1.85081     -0.09961     -0.03174     -0.03174     -0.03174      0.09963      0.09963      0.09963      0.12267 \n   </betaeps>\n   <alphavectors>\n     0.00000     -0.20207     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.06595 \n     0.00000      0.34465     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -2.33453 \n     0.00000     -0.00000      0.49824     -0.00000     -0.00000     -1.59853      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.49824      0.00000     -0.00000     -1.59853     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.49824     -0.00000      0.00000     -1.59853      0.00000 \n     0.00000      0.69292      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      2.27328 \n     0.00000      0.00000      0.55508      0.00000      0.00000      1.57969     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.55508      0.00000     -0.00000      1.57969     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.55508      0.00000      0.00000      1.57969     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000     -0.20249      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.06406 \n     0.00000      0.32009     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -2.33804 \n     0.00000      0.00000     -0.00000      0.00000     -0.47127      1.60668      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.47127      0.00000     -0.00000     -0.00000      1.60668      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.47127     -0.00000     -0.00000      0.00000     -1.60668     -0.00000 \n     0.00000      0.71678     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.26587 \n     0.00000     -0.00000      0.00000     -0.00000     -0.58158     -1.57012     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.58158     -0.00000      0.00000      0.00000     -1.57012     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.58158      0.00000      0.00000     -0.00000      1.57012      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Be\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000   -0.13969297    0.00000000    0.00000000   -0.00917198    0.00000000    0.00000000   -0.01864164   -0.95490572\n       0.00000000    0.17394382    0.00000000    0.00000000    2.39508611    0.00000000    0.00000000    4.86790649    1.18903583\n       0.00000000   -0.94317413    0.00000000    0.74214605    0.00000000    0.62441014   -0.88396886    0.00000000    2.37452006\n       0.00000000   -0.94317413    0.00000000    0.74214605    0.00000000    2.13278913    0.62441014    0.00000000    2.37452006\n       0.00000000    0.00000000    1.48429211    0.00000000    0.49960008   -1.50837900    1.50837900   -1.24882027    0.00000000\n       0.00000000    0.44528461    0.00000000    0.00000000   -2.25812425    0.00000000    0.00000000   -4.58953757    3.04385271\n       0.00000000    0.91149643    0.00000000   -0.71722013    0.00000000    0.74214605    2.19986422    0.00000000   -2.29476878\n       0.00000000    0.91149643    0.00000000   -0.71722013    0.00000000   -0.71557212    0.74214605    0.00000000   -2.29476878\n       0.00000000    0.00000000   -1.43444027    0.00000000    0.59380238    1.45771817   -1.45771817   -1.48429211    0.00000000\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -3.81516     -0.19579     -0.06325     -0.06325     -0.06325      0.25595      0.25595      0.25595      0.29224 \n   </alphaeps>\n   <betaeps>\n    -3.81516     -0.19579     -0.06325     -0.06325     -0.06325      0.25595      0.25595      0.25595      0.29224 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.23684      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00772 \n     0.00000     -0.29491     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -2.01593 \n     0.00000     -0.00000     -0.00000     -0.49980      0.00000      1.24932      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.49980     -0.00000      0.00000     -0.00000     -1.24932      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.49980      0.00000     -0.00000      1.24932     -0.00000 \n     0.00000     -0.75495     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.90065 \n     0.00000      0.00000      0.00000     -0.59404     -0.00000     -1.20736     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.59404      0.00000     -0.00000      0.00000      1.20736      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.59404     -0.00000      0.00000     -1.20736      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.23684      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00772 \n     0.00000     -0.29491     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -2.01593 \n     0.00000      0.00000     -0.00000      0.49980     -0.00000     -0.00000      1.24932     -0.00000      0.00000 \n     0.00000      0.00000      0.49980      0.00000      0.00000      1.24932      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.49980      0.00000     -0.00000      1.24932     -0.00000 \n     0.00000     -0.75495     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.90065 \n     0.00000     -0.00000      0.00000      0.59404      0.00000      0.00000     -1.20736     -0.00000     -0.00000 \n     0.00000     -0.00000      0.59404     -0.00000     -0.00000     -1.20736      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.59404     -0.00000      0.00000     -1.20736      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"B\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000   -0.18968602    0.00000000    0.00000000    0.00466647   -0.09259445   -0.09531960    0.00000000    0.00299936\n       0.00000000    0.30498359    0.00000000    0.00000000   -0.06900672    2.17012595    2.14873783    0.00000000   -0.05958192\n       0.00000000    0.00000000    0.66880228   -0.57950713    0.00000000    1.97470616   -1.32629619   -0.67537320    0.00000000\n       0.00000000    0.79026391   -0.57950713    0.03991849    0.00000000    0.00000000   -0.67537320   -0.68002893   -2.01745821\n       0.00000000    0.74204837    0.00000000   -0.62888380    0.67270849   -0.67537320    0.64626726   -1.32843890    2.00049270\n       0.00000000    0.52368200    0.00000000    0.00000000    0.05551758   -2.07263159   -2.03025894    0.00000000    0.06408270\n       0.00000000    0.00000000   -0.63502212    0.60040448    0.00000000   -0.70798401    1.37412317   -0.57950713    0.00000000\n       0.00000000   -0.79527812    0.60040448   -0.00214807    0.00000000    0.00000000   -0.57950713    2.00300697    2.03025894\n       0.00000000   -0.76880705    0.00000000    0.63287405    0.61362098   -0.57950713    0.62888380    1.33686781   -2.07263159\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      0.33289      0.33289      0.33289      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.00044      0.00044      0.00044      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -6.51886     -0.34388     -0.13051     -0.13051     -0.13051      0.36482      0.36482      0.36482      0.40796 \n   </alphaeps>\n   <betaeps>\n    -6.50722     -0.30028     -0.08958     -0.08958     -0.08958      0.39722      0.39722      0.39722      0.44082 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.24432      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.07899 \n     0.00000     -0.40695     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.85128 \n     0.00000      0.00000     -0.00000     -0.59692     -0.00000      0.00000      1.13143     -0.00000      0.00000 \n     0.00000      0.00000     -0.59692      0.00000     -0.00000      0.00000     -0.00000      1.13143      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.59692     -1.13143      0.00000     -0.00000      0.00000 \n     0.00000     -0.65585      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.76811 \n     0.00000     -0.00000     -0.00000     -0.51219      0.00000     -0.00000     -1.17223      0.00000     -0.00000 \n     0.00000     -0.00000     -0.51219      0.00000     -0.00000      0.00000     -0.00000     -1.17223     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.51219      1.17223      0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000     -0.24177     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.08244 \n     0.00000      0.37333     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.85840 \n     0.00000     -0.00000      0.00000      0.56249      0.00000     -0.00000     -0.00000     -1.14894      0.00000 \n     0.00000     -0.00000     -0.56249      0.00000      0.00000      1.14894      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.56249      0.00000     -1.14894      0.00000     -0.00000 \n     0.00000      0.68782      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.75593 \n     0.00000      0.00000      0.00000      0.54736     -0.00000      0.00000      0.00000      1.15623     -0.00000 \n     0.00000      0.00000     -0.54736      0.00000      0.00000     -1.15623     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.54736     -0.00000      1.15623     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"C\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000   -0.21604469    0.00000000    0.08528735    0.00000000    0.00000000    0.18959151    0.00000000    0.78158759\n       0.00000000    0.42421933    0.00000000   -1.65736586    0.00000000    0.00000000   -3.69354272    0.00000000   -1.52972075\n       0.00000000   -1.27770888    0.79162234    0.00000000    0.00000000    0.03999471    0.00000000    0.00000000   -3.33403030\n       0.00000000    0.00000000    0.00000000    0.07591791    0.08517959    0.00000000   -0.04000531   -2.31090212    0.00000000\n       0.00000000    0.00000000   -0.08516899    0.00000000    0.07591791   -2.31090212    0.00000000   -1.30774527    0.00000000\n       0.00000000    0.56214996    0.00000000    1.59323137    0.00000000    0.00000000    3.55363779    0.00000000   -2.04069398\n       0.00000000    1.35980554    0.62370132    0.00000000    0.00000000   -0.08516899    0.00000000    0.00000000    3.55363779\n       0.00000000    0.00000000    0.00000000   -0.01038333   -0.05706459    0.00000000    0.08517959    2.46361784    0.00000000\n       0.00000000    0.00000000    0.05705363    0.00000000   -0.01037205    2.46361784    0.00000000   -1.03798582    0.00000000\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      0.66667      0.66667      0.66665      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -9.91065     -0.51518     -0.20791     -0.20791     -0.20791      0.46282      0.46282      0.46282      0.53156 \n   </alphaeps>\n   <betaeps>\n    -9.87822     -0.41688     -0.11467     -0.11467     -0.11466      0.53297      0.53297      0.53297      0.60218 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.23711      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.08230 \n     0.00000     -0.48734     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.65653 \n     0.00000     -0.00000      0.65861     -0.00000     -0.00000      1.02317     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.65861     -0.00000     -0.00000      1.02317     -0.00000 \n     0.00000      0.00000      0.00000     -0.65861     -0.00000     -0.00000      1.02317      0.00000      0.00000 \n     0.00000     -0.58641     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.61110 \n     0.00000      0.00000      0.46562      0.00000      0.00000     -1.12421     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.46562     -0.00000     -0.00000     -1.12421      0.00000 \n     0.00000      0.00000     -0.00000     -0.46562      0.00000      0.00000     -1.12421     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.23256      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.08862 \n     0.00000     -0.43211     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.67186 \n     0.00000      0.00000     -0.59821     -0.00000     -0.00000      1.05962      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.59820      0.00000      0.00000      1.05962      0.00000 \n     0.00000      0.00000      0.00000     -0.59821     -0.00000      0.00000      1.05962      0.00000      0.00000 \n     0.00000     -0.63958     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.59076 \n     0.00000      0.00000     -0.52998      0.00000      0.00000     -1.09534      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.52999      0.00000      0.00000     -1.09534      0.00000 \n     0.00000     -0.00000     -0.00000     -0.52998      0.00000     -0.00000     -1.09534     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"N\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000   -0.23188710   -0.04253309   -0.05511043    0.00000000    0.00000000    0.00508321    0.00000000   -0.70337098\n       0.00000000    0.50302749    0.67401402    0.81389863    0.00000000    0.00000000    0.03592197    0.00000000    1.51982231\n       0.00000000   -0.61343558    0.37773316    0.00000000    0.90068900   -0.24468115    0.00000000    0.00000000    1.45297385\n       0.00000000   -0.51991960    0.47907162    0.37773316   -0.52953453    0.00000000   -0.04105480   -1.03787972    1.40102604\n       0.00000000    0.00000000    0.52953453    0.05745425    0.37773316    1.03787972    0.00000000    1.06139206    0.00000000\n       0.00000000    0.58183638   -0.66357514   -0.77599724    0.00000000    0.00000000   -0.08494544    0.00000000    1.77401899\n       0.00000000    0.64213166    0.32684428    0.00000000   -0.17396649   -2.12068601    0.00000000    0.00000000   -1.52094292\n       0.00000000    0.59594384    0.30930107    0.32684428    0.55430578    0.00000000    0.10791716    1.08643098   -1.60588836\n       0.00000000    0.00000000   -0.55430578    0.79256863    0.32684428   -1.08643098    0.00000000   -1.27745126    0.00000000\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -13.98305     -0.70902     -0.29458     -0.29458     -0.29458      0.57187      0.57187      0.57187      0.67010 \n   </alphaeps>\n   <betaeps>\n   -13.92154     -0.54822     -0.14082     -0.14082     -0.14082      0.68399      0.68399      0.68399      0.78289 \n   </betaeps>\n   <alphavectors>\n     0.00000     -0.23472     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.09518 \n     0.00000      0.53391      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.50830 \n     0.00000      0.00000      0.00000      0.69215      0.00000     -0.00000      0.00000      0.94349     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.69215     -0.94349      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.69215     -0.00000      0.00000     -0.00000     -0.94349      0.00000     -0.00000 \n     0.00000      0.55106      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.48494 \n     0.00000     -0.00000     -0.00000      0.44687     -0.00000      0.00000     -0.00000     -1.08145      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.44687      1.08145     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.44687      0.00000     -0.00000      0.00000      1.08145      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000     -0.22826     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.10363 \n     0.00000      0.46687      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.53046 \n     0.00000      0.00000      0.61460      0.00000     -0.00000     -0.99574      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.61460     -0.00000     -0.00000     -0.99574      0.00000 \n     0.00000     -0.00000     -0.00000      0.61460      0.00000     -0.00000      0.99574      0.00000      0.00000 \n     0.00000      0.61606      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.45919 \n     0.00000     -0.00000      0.53180     -0.00000      0.00000      1.04232     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.53180      0.00000      0.00000      1.04232     -0.00000 \n     0.00000      0.00000      0.00000      0.53180     -0.00000      0.00000     -1.04232      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"O\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000   -0.25560803    0.00000000    0.10740998    0.00000000   -0.12447119    0.12161620    0.00000000   -0.00276383\n       0.00000000    0.58118762    0.00000000   -1.36245133    0.00000000    1.55390803   -1.57097400    0.00000000    0.04764461\n       0.00000000    0.48724146    0.03879241   -0.44003322    0.00000000   -1.27421461   -0.99260272    0.00000000   -1.33079735\n       0.00000000    0.00000000    0.00000000   -0.49905747    0.42022215    0.00000000    0.64630076   -2.59942746    0.00000000\n       0.00000000    0.53880280    0.04004291    0.00000000   -0.49905747   -0.97891090   -0.62791384   -0.64630076    1.36373781\n       0.00000000    0.59290089    0.00000000    1.33650475    0.00000000   -1.51074683    1.55645410    0.00000000   -0.06155557\n       0.00000000   -0.56986060    0.81874362   -0.32254730    0.00000000   -0.86025537    1.09960390    0.00000000    1.55645410\n       0.00000000    0.00000000    0.00000000   -0.30886263   -1.30024299    0.00000000    0.39999031    1.78423885    0.00000000\n       0.00000000   -0.59688499    0.79036200    0.00000000   -0.30886263    1.14490000   -0.46026506   -0.39999031   -1.51074683\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.33333      0.33333      0.33333      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -18.75258     -0.89462     -0.35779     -0.35779     -0.35779      0.74524      0.74525      0.74525      0.86315 \n   </alphaeps>\n   <betaeps>\n   -18.70223     -0.78176     -0.24795     -0.24795     -0.24795      0.82049      0.82049      0.82049      0.93847 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.23919      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.11366 \n     0.00000     -0.55739     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.46820 \n     0.00000     -0.00000      0.70644      0.00000      0.00000     -0.91487     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.70644      0.00000      0.00000     -0.91487      0.00000 \n     0.00000     -0.00000     -0.00000      0.70644     -0.00000      0.00000     -0.91487     -0.00000      0.00000 \n     0.00000     -0.53258      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.45463 \n     0.00000      0.00000      0.43721      0.00000      0.00000      1.07000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.43721     -0.00000     -0.00000      1.07000     -0.00000 \n     0.00000      0.00000     -0.00000      0.43721      0.00000     -0.00000      1.07000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.23512     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.11870 \n     0.00000     -0.52010     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.48186 \n     0.00000     -0.00000      0.00000     -0.00000      0.66335     -0.00000     -0.00000      0.94658     -0.00000 \n     0.00000      0.00000     -0.66335      0.00000      0.00000     -0.00000      0.94658     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.66335     -0.00000     -0.94658      0.00000     -0.00000     -0.00000 \n     0.00000     -0.56921      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.44070 \n     0.00000      0.00000     -0.00000      0.00000      0.48624     -0.00000     -0.00000     -1.04862      0.00000 \n     0.00000     -0.00000     -0.48624     -0.00000     -0.00000      0.00000     -1.04862      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.48624      0.00000      1.04862      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"F\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000   -0.25621902    0.00000000   -0.11831804    0.00000000    0.00000000    0.00000000   -0.27097491    0.72346885\n       0.00000000    0.55179595    0.00000000    1.36985109    0.00000000    0.00000000    0.00000000    3.13777782   -1.55779587\n       0.00000000    0.00000000    0.00000000    0.02382313   -0.85770357    0.00000000   -1.96439859   -0.00732972    0.00000000\n       0.00000000    0.02098725    0.00000000    0.00000000    0.94067070    0.00000000   -1.27332875    0.00000000    0.01311148\n       0.00000000    0.00000000    0.04813235    0.00000000    0.00000000    0.00177945    0.00000000    0.00000000    0.00000000\n       0.00000000    0.59460888    0.00000000   -1.33150706    0.00000000    0.00000000    0.00000000   -3.05024510   -1.67941464\n       0.00000000    0.00000000    0.00000000   -0.00555631    0.97698435    0.00000000    2.23821520    0.02430922    0.00000000\n       0.00000000   -0.01074352    0.00000000    0.00000000    0.63320507    0.00000000   -0.85770357    0.00000000    0.01859176\n       0.00000000    0.00000000   -0.02251210    0.00000000    0.00000000   -0.04258922    0.00000000    0.00000000    0.00000000\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      0.66667      0.66667      0.66667      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -24.16923     -1.07776     -0.40242     -0.40241     -0.40241      1.04434      1.04434      1.04434      1.22114 \n   </alphaeps>\n   <betaeps>\n   -24.13992     -1.01869     -0.34404     -0.34404     -0.34404      1.08446      1.08446      1.08446      1.26141 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.24480      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.12703 \n     0.00000     -0.53280     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.48038 \n     0.00000      0.00000     -0.00000      0.00000      0.69444      0.00000     -0.92208      0.00000     -0.00000 \n     0.00000     -0.00000      0.69444     -0.00000      0.00000      0.92208     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.69444      0.00000      0.00000     -0.00000     -0.92208     -0.00000 \n     0.00000     -0.55879     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.44458 \n     0.00000     -0.00000     -0.00000      0.00000      0.45191      0.00000      1.06219      0.00000      0.00000 \n     0.00000      0.00000      0.45191     -0.00000      0.00000     -1.06219     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.45191     -0.00000      0.00000      0.00000      1.06219      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.24302      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.12913 \n     0.00000     -0.51761      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.48577 \n     0.00000      0.00000      0.00000      0.00000     -0.67707     -0.00000      0.93491      0.00000     -0.00000 \n     0.00000     -0.00000     -0.67707     -0.00000     -0.00000     -0.93491     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.67707     -0.00000      0.00000      0.00000     -0.93491      0.00000 \n     0.00000     -0.57357     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.43878 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.47171      0.00000     -1.05355     -0.00000      0.00000 \n     0.00000      0.00000     -0.47171      0.00000      0.00000      1.05355      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.47171      0.00000     -0.00000     -0.00000      1.05355     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ne\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000   -0.25885047   -0.06107796    0.06107796    0.00000000    0.00000000    0.00000000   -0.28084618   -0.72367370\n       0.00000000    0.55396233    0.67453028   -0.67453028    0.00000000    0.00000000    0.00000000    3.10159745    1.54872411\n       0.00000000   -1.04199287    0.00000000    0.47749482    0.47749482    0.00000000    0.63466504    0.63466504    2.62306665\n       0.00000000    0.00000000    0.47749482    0.42105880    0.05643602    2.57076036    0.00000000   -0.63466504    0.00000000\n       0.00000000    0.00000000    0.89855362    0.47749482   -0.42105880   -0.63466504    1.30143027    0.00000000    0.00000000\n       0.00000000    0.59707601   -0.65463857    0.65463857    0.00000000    0.00000000    0.00000000   -3.01013220    1.66925792\n       0.00000000    1.19575166    0.00000000    0.31678662    0.31678662    0.00000000    0.42105880    0.42105880   -3.01013220\n       0.00000000    0.00000000    0.31678662   -0.48319118    0.79997780   -1.80073104    0.00000000   -0.42105880    0.00000000\n       0.00000000    0.00000000   -0.16640455    0.31678662    0.48319118   -0.42105880   -2.64284864    0.00000000    0.00000000\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -30.27035     -1.27480     -0.44549     -0.44549     -0.44549      1.34280      1.34280      1.34280      1.57960 \n   </alphaeps>\n   <betaeps>\n   -30.27035     -1.27480     -0.44549     -0.44549     -0.44549      1.34280      1.34280      1.34280      1.57960 \n   </betaeps>\n   <alphavectors>\n     0.00000     -0.24592      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.13323 \n     0.00000      0.52629     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.47136 \n     0.00000      0.00000      0.00000      0.00000     -0.69101     -0.91846      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.69101      0.00000     -0.00000      0.00000      0.91846      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.69101     -0.00000      0.00000     -0.00000     -0.91846     -0.00000 \n     0.00000      0.56725     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.42797 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.45844      1.05399     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.45844     -0.00000      0.00000     -0.00000     -1.05399      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.45844      0.00000     -0.00000      0.00000      1.05399      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000     -0.24592     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.13323 \n     0.00000      0.52629      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.47136 \n     0.00000      0.00000      0.00000      0.69101     -0.00000     -0.91846     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.69101     -0.00000      0.91846      0.00000      0.00000 \n     0.00000      0.00000      0.69101      0.00000     -0.00000      0.00000      0.00000     -0.91846      0.00000 \n     0.00000      0.56725      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.42797 \n     0.00000     -0.00000     -0.00000      0.45844      0.00000      1.05399      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.45844      0.00000     -1.05399      0.00000     -0.00000 \n     0.00000     -0.00000      0.45844     -0.00000      0.00000     -0.00000     -0.00000      1.05399     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Na\" basis=\"MCP\">\n   <guessdensitymatrix>\n     0.02589     -0.10214      0.00000      0.00000      0.00000      0.18066      0.00000      0.00000      0.00000 \n    -0.10214      0.40298      0.00000      0.00000      0.00000     -0.71278      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.56498      0.00000      0.00000      0.00000      0.37415      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.56498      0.00000      0.00000      0.00000      0.37415      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.56498      0.00000      0.00000      0.00000      0.37415 \n     0.18066     -0.71278      0.00000      0.00000      0.00000      1.26074      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.37415      0.00000      0.00000      0.00000      0.08949      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.37415      0.00000      0.00000      0.00000      0.08949      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.37415      0.00000      0.00000      0.00000      0.08949 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      1.00000      1.00000      1.00000      0.93972      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      1.00000      1.00000      1.00000      0.06028      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -37.35536     -1.89289     -0.84513     -0.84513     -0.84513      0.23693      0.51480      0.51480      0.51480 \n   </alphaeps>\n   <betaeps>\n   -37.34378     -1.88018     -0.83095     -0.83095     -0.83095      0.28084      0.55684      0.55684      0.55684 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.16095      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.63499     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.88203      0.00000      0.70216     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.88203     -0.00000      0.00000     -0.00000      0.00000     -0.70216 \n     0.00000      0.00000     -0.88203     -0.00000      0.00000      0.00000      0.00000      0.70216     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      1.12281     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.21553     -0.00000     -1.10660     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.21553      0.00000     -0.00000      0.00000     -0.00000      1.10660 \n     0.00000      0.00000     -0.21553      0.00000     -0.00000     -0.00000     -0.00000     -1.10660      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.16005     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.63200      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.88713     -0.00000     -0.00000     -0.00000     -0.69572     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.88713      0.00000     -0.00000      0.00000     -0.69572 \n     0.00000      0.00000      0.00000      0.88713      0.00000      0.00000     -0.00000     -0.69572      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.12312      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.20746      0.00000      0.00000      0.00000      1.10814     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.20746     -0.00000      0.00000     -0.00000      1.10814 \n     0.00000      0.00000      0.00000      0.20746     -0.00000     -0.00000      0.00000      1.10814     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mg\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.06023306    0.00000000    0.00000000    0.00000000   -0.18158880    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.30432204    0.00000000    0.00000000    0.00000000    0.09188650    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    1.96215923   -0.00343007    0.00000000    0.00000000    0.03409429   -0.15766589   -0.01044504    0.00000000   -0.03164999   -0.21655682    0.24820680\n       0.00000000    0.00000000   -0.00639500    1.96901937    0.00982507    0.00000000    0.16811094    0.00000000    0.16811094    0.00000000    0.24820680   -0.36254077    0.43311363\n       0.00000000    0.00000000   -0.00296493    0.00000000    1.97541437    0.00000000    0.00000000   -0.49388777    0.15766589    0.00000000   -0.21655682    0.03164999   -0.24820680\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.67344976    0.00000000    0.00000000    0.00000000   -7.00472601    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.09837978    0.01865461    0.00000000    0.00000000   -0.55924195   -0.00639500    0.92067489    0.00000000   -0.58377137    0.57370399    0.01006738\n       0.00000000    0.00000000    0.01694168    0.06107057   -0.03559628    0.00000000   -0.91427989    0.00000000   -0.91427989    0.00000000    0.01006738    3.33164915   -1.14740799\n       0.00000000    0.00000000   -0.00171293    0.00000000    0.04412889    0.00000000    0.00000000    1.82216479    0.00639500    0.00000000    0.57370399    0.58377137   -0.01006738\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.56428748    0.00000000    0.00000000    0.00000000    7.09077545    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000   -0.04387302   -0.01670975    0.00000000    0.00000000    1.38476491    0.00217885   -0.82113970    0.00000000   -0.91084982    0.91427989   -0.00343007\n       0.00000000    0.00000000    0.02699900   -0.01045351   -0.01028925    0.00000000    0.81896085    0.00000000    0.81896085    0.00000000   -0.00343007   -2.97871746   -1.82855978\n       0.00000000    0.00000000    0.04370876    0.00000000   -0.03745252    0.00000000    0.00000000   -1.63574285   -0.00217885    0.00000000    0.91427989    0.91084982    0.00343007\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      1.00000      1.00000      1.00000      0.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -45.95953     -2.89792     -1.71432     -1.71432     -1.71432     -0.17590     -0.04979     -0.04979     -0.04979      0.09325      0.14778      0.14778      0.14778 \n   </alphaeps>\n   <betaeps>\n   -45.95953     -2.89792     -1.71432     -1.71432     -1.71432     -0.17590     -0.04979     -0.04979     -0.04979      0.09325      0.14778      0.14778      0.14778 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05190     -0.00000      0.00000     -0.00000     -0.04822     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.26222      0.00000     -0.00000      0.00000      0.02440      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.99136      0.00000     -0.00000     -0.15904      0.00000     -0.00000     -0.00000     -0.00000     -0.25037      0.00000 \n     0.00000      0.00000     -0.99136     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.15904     -0.00000      0.25037      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.99136     -0.00000      0.00000      0.15904     -0.00000      0.00000     -0.00000      0.00000      0.25037 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.58028      0.00000      0.00000     -0.00000     -1.86007     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.04021     -0.00000      0.00000      0.42133     -0.00000      0.00000      0.00000      0.00000      1.36165     -0.00000 \n     0.00000      0.00000     -0.04021      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.42133      0.00000     -1.36165     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.04021     -0.00000      0.00000     -0.42133      0.00000     -0.00000      0.00000     -0.00000     -1.36165 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.48622     -0.00000      0.00000     -0.00000      1.88292     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.01370      0.00000     -0.00000      0.67145      0.00000     -0.00000     -0.00000     -0.00000     -1.21969      0.00000 \n     0.00000      0.00000      0.01370      0.00000      0.00000      0.00000      0.00000      0.00000      0.67145     -0.00000      1.21969     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.01370      0.00000     -0.00000     -0.67145      0.00000      0.00000      0.00000     -0.00000      1.21969 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.05190     -0.00000     -0.00000      0.00000     -0.04822     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.26222      0.00000      0.00000     -0.00000      0.02440      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.99136     -0.00000      0.00000     -0.15904      0.00000     -0.00000     -0.00000      0.25037      0.00000      0.00000 \n     0.00000      0.00000      0.99136     -0.00000      0.00000      0.00000      0.00000     -0.15904      0.00000     -0.00000     -0.00000     -0.00000      0.25037 \n     0.00000      0.00000      0.00000     -0.00000     -0.99136     -0.00000     -0.00000      0.00000     -0.15904      0.00000     -0.00000     -0.25037     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.58028     -0.00000     -0.00000      0.00000     -1.86007      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.04021      0.00000     -0.00000      0.42133     -0.00000      0.00000      0.00000     -1.36165      0.00000     -0.00000 \n     0.00000      0.00000      0.04021      0.00000     -0.00000     -0.00000     -0.00000      0.42133     -0.00000      0.00000      0.00000      0.00000     -1.36165 \n     0.00000      0.00000     -0.00000      0.00000     -0.04021      0.00000     -0.00000      0.00000      0.42133      0.00000     -0.00000      1.36165      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.48622     -0.00000     -0.00000      0.00000      1.88292      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01370     -0.00000      0.00000      0.67145      0.00000     -0.00000     -0.00000      1.21969     -0.00000     -0.00000 \n     0.00000      0.00000     -0.01370     -0.00000      0.00000      0.00000      0.00000      0.67145      0.00000     -0.00000     -0.00000     -0.00000      1.21969 \n     0.00000      0.00000      0.00000     -0.00000      0.01370      0.00000      0.00000     -0.00000      0.67145     -0.00000      0.00000     -1.21969     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Al\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.08827778    0.00000000    0.00000000    0.00000000   -0.20413867    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.42295209    0.00000000    0.00000000    0.00000000    0.26515912    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.03663242   -0.02411333    0.00000000    0.00000000    0.57446199    0.57750492    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.03663242   -0.02411333    0.00000000    0.00000000   -0.57446199   -0.57750492\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.25737897    0.00000000   -0.03663242    0.00000000   -0.06658833    0.00000000   -0.57446199\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.97592397    0.00000000    0.00000000    0.00000000   -6.14631504    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.39727587    0.34785951    0.00000000    0.00000000   -2.26483054   -2.28394918    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.39727587    0.34785951    0.00000000    0.00000000    2.26483054    2.28394918\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.01237954    0.00000000    0.39727587    0.00000000    0.82846562    0.00000000    2.26483054\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.53542380    0.00000000    0.00000000    0.00000000    6.42412953    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.99266085   -0.97452985    0.00000000    0.00000000    0.79114451    0.83923254    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.99266085   -0.97452985    0.00000000    0.00000000   -0.79114451   -0.83923254\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.35349494    0.00000000   -0.99266085    0.00000000   -2.19947159    0.00000000   -0.79114451\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      0.29986      0.29986      0.29986      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      0.03347      0.03347      0.03347      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -55.13397     -3.92572     -2.55655     -2.55655     -2.55655     -0.29322     -0.10795     -0.10795     -0.10795      0.09206      0.15444      0.15444      0.15444 \n   </alphaeps>\n   <betaeps>\n   -55.13251     -3.92377     -2.55413     -2.55413     -2.55413     -0.27346     -0.08946     -0.08946     -0.08946      0.10538      0.16749      0.16749      0.16749 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.06326     -0.00000      0.00000      0.00000      0.05694     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.30199      0.00000     -0.00000     -0.00000     -0.07371      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.20234     -0.00000     -0.00000      0.00000      0.26127 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.20234     -0.00000      0.00000      0.00000     -0.26127     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.20234      0.00000     -0.00000     -0.00000      0.26127      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.70457     -0.00000      0.00000      0.00000      1.71437      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.57642      0.00000      0.00000     -0.00000     -1.26252 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.57642      0.00000     -0.00000     -0.00000      1.26252     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.57642     -0.00000      0.00000      0.00000     -1.26252     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.37225     -0.00000      0.00000      0.00000     -1.79415     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.53870     -0.00000      0.00000     -0.00000      1.23262 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.53870     -0.00000      0.00000      0.00000     -1.23262      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.53870      0.00000     -0.00000     -0.00000      1.23262      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.06298     -0.00000     -0.00000      0.00000      0.05707      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.30137      0.00000      0.00000     -0.00000     -0.07437      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.19787      0.00000     -0.00000     -0.00000      0.26377      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.19787     -0.00000     -0.00000     -0.00000      0.26377 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.19787     -0.00000      0.00000     -0.00000     -0.26377      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.69953     -0.00000     -0.00000     -0.00000      1.71645      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.55748     -0.00000      0.00000      0.00000     -1.27102     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.55748      0.00000      0.00000      0.00000     -1.27102 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.55748      0.00000     -0.00000      0.00000      1.27102     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.37753     -0.00000      0.00000      0.00000     -1.79304     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.55708      0.00000     -0.00000     -0.00000      1.22442      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.55708     -0.00000     -0.00000      0.00000      1.22442 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.55708      0.00000     -0.00000      0.00000     -1.22442     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Si\" basis=\"MCP\">\n   <guessdensitymatrix>\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.15261225    0.00000000    0.00000000    0.00000000    0.00190812    0.00000000    0.00000000    0.00000000\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.52557407    0.00000000    0.00000000    0.00000000   -0.85549070    0.00000000    0.00000000    0.00000000\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00099244    0.14927644   -0.15141937    0.00000000   -0.06594663   -0.29365787    0.35432308\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.30069581   -0.13354255   -0.13255011    0.00000000   -0.64798096    0.35021660    0.28426998\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.01886926    0.28281899    0.00000000    0.00000000   -0.07005310   -0.64387448\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    2.30068874    0.00000000    0.00000000    0.00000000   -3.81187137    0.00000000    0.00000000    0.00000000\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.23958094   -0.66401520    0.41225388    0.00000000    0.81522555    0.79951198   -1.57610881\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -1.07626909    0.35488232    0.59446325    0.00000000    2.37562079   -1.57065809   -0.75543253\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.18220937   -1.01889752    0.00000000    0.00000000    0.82067628    2.37017007\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.82569159    0.00000000    0.00000000    0.00000000    7.83811196    0.00000000    0.00000000    0.00000000\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.91411013    0.65081449    0.30652422    0.00000000   -2.25504425    0.59446325    1.54477555\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.34429027    0.31193686   -0.60217326    0.00000000   -0.95031230    1.59102905   -0.66401520\n           0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.90869748    0.33887763    0.00000000    0.00000000   -2.20879076   -0.99656580\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      0.66587      0.66587      0.66587      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      0.00079      0.00079      0.00079      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -65.15103     -5.06017     -3.50217     -3.50217     -3.50217     -0.41417     -0.16726     -0.16726     -0.16726      0.13365      0.20385      0.20385      0.20385 \n   </alphaeps>\n   <betaeps>\n   -65.14538     -5.05300     -3.49339     -3.49339     -3.49339     -0.35848     -0.11655     -0.11655     -0.11655      0.16736      0.23720      0.23720      0.23720 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.07226      0.00000      0.00000     -0.00000     -0.06780      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.33048     -0.00000     -0.00000      0.00000      0.07732      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.23583     -0.00000      0.00000      0.00000     -0.00000      0.27765 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.23583      0.00000     -0.00000     -0.27765      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.23583     -0.00000     -0.00000      0.00000     -0.27765      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.71798      0.00000      0.00000     -0.00000     -1.72748     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.64207      0.00000     -0.00000     -0.00000      0.00000     -1.24521 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.64207     -0.00000      0.00000      1.24521     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.64207      0.00000      0.00000     -0.00000      1.24521     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.36420     -0.00000      0.00000     -0.00000      1.81043     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.47740     -0.00000      0.00000      0.00000     -0.00000      1.26136 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.47740      0.00000     -0.00000     -1.26136      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.47740      0.00000      0.00000     -0.00000     -1.26136      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.07115     -0.00000      0.00000      0.00000     -0.06849      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.32846     -0.00000      0.00000      0.00000      0.08064      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.22417      0.00000      0.00000     -0.28508      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.22417     -0.00000     -0.00000      0.00000      0.00000     -0.28508 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.22417     -0.00000      0.00000      0.00000      0.28508      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.69725      0.00000     -0.00000      0.00000     -1.73600     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.59572     -0.00000     -0.00000      1.26810      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.59572      0.00000      0.00000     -0.00000     -0.00000      1.26810 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.59572      0.00000     -0.00000     -0.00000     -1.26810     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.38588     -0.00000      0.00000     -0.00000      1.80594      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.52363      0.00000      0.00000     -1.24289      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.52363     -0.00000     -0.00000      0.00000      0.00000     -1.24289 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.52363      0.00000     -0.00000     -0.00000      1.24289      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"P\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.06029819    0.00000000    0.00000000    0.00000000   -0.53951750    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.44533599    0.00000000    0.00000000    0.00000000    1.58765118    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.33716505    0.12047502    0.14425133    0.00000000    0.68827162    0.00000000    0.05726442\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.12047502   -0.48141638    0.00000000    0.00000000   -0.36303125    0.06503211    0.31747270\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.14425133    0.00000000   -0.21669003    0.00000000    0.30576682   -0.68050394    0.37079893\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.17571783    0.00000000    0.00000000    0.00000000   -8.78535701    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.89285329   -0.51669324   -0.61127050    0.00000000   -2.42311920    0.00000000   -0.75983440\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.51669324    1.50412379    0.00000000    0.00000000    1.55696832   -0.77414064   -0.85184463\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.61127050    0.00000000    0.37616004    0.00000000   -0.79713393    2.40881295   -1.57127457\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.82199259    0.00000000    0.00000000    0.00000000    5.30490460    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.60643153    0.54118831    0.61172419    0.00000000    1.05574752    0.00000000    2.24205058\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.54118831   -0.00529266    0.00000000    0.00000000   -1.63078008    2.18371126   -0.51669324\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.61172419    0.00000000    1.14761984    0.00000000   -0.61127050   -1.11408684    1.57244076\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      0.99809      0.99809      0.99809      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      0.00191      0.00191      0.00191      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -76.02188     -6.31132     -4.56144     -4.56144     -4.56144     -0.53674     -0.22728     -0.22728     -0.22728      0.17832      0.25412      0.25412      0.25412 \n   </alphaeps>\n   <betaeps>\n   -76.01036     -6.29733     -4.54439     -4.54439     -4.54439     -0.44618     -0.14546     -0.14546     -0.14546      0.22983      0.30494      0.30494      0.30494 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.07890      0.00000     -0.00000     -0.00000      0.07394      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.35602     -0.00000      0.00000      0.00000     -0.09707     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.26039     -0.00000     -0.00000     -0.28428     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.26039      0.00000      0.00000      0.00000      0.00000     -0.28428 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.26039     -0.00000     -0.00000     -0.00000      0.28428     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.74674      0.00000      0.00000      0.00000      1.72286      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.69868      0.00000     -0.00000      1.21922      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.69868      0.00000     -0.00000     -0.00000     -0.00000      1.21922 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.69868      0.00000     -0.00000      0.00000     -1.21922      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.34136      0.00000     -0.00000     -0.00000     -1.81275     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42379     -0.00000      0.00000     -1.27702     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.42379     -0.00000      0.00000      0.00000      0.00000     -1.27702 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42379     -0.00000      0.00000     -0.00000      1.27702     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.07701     -0.00000     -0.00000     -0.00000      0.07519     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.35248      0.00000      0.00000      0.00000     -0.10302      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.24402     -0.00000      0.00000      0.00000      0.00000      0.00000      0.29570 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.24402      0.00000      0.00000     -0.00000     -0.29570      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.24402      0.00000      0.29570      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.71323     -0.00000     -0.00000     -0.00000      1.73707     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.63616      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.25304 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.63616     -0.00000     -0.00000      0.00000      1.25304     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.63616     -0.00000     -1.25304     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.37645     -0.00000     -0.00000     -0.00000     -1.80579      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.48783      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.25397 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.48783      0.00000      0.00000     -0.00000     -1.25397      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.48783      0.00000      1.25397     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"S\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.08108412    0.00000000    0.00000000    0.00000000   -0.54543200    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.50158042    0.00000000    0.00000000    0.00000000    1.71265783    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.63636075    0.00000000    0.00000000    0.00000000    0.08215566    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.63636075    0.00000000    0.00000000    0.00000000    0.01174221    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.41541226    0.00000000    0.00000000    0.00000000   -0.63823265\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.15370391    0.00000000    0.00000000    0.00000000   -8.43316061    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    2.00240442    0.00000000    0.00000000    0.00000000   -1.21947328    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    2.00240442    0.00000000    0.00000000    0.00000000   -0.03993815    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.11164668    0.00000000    0.00000000    0.00000000    1.68478499\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.60962715    0.00000000    0.00000000    0.00000000    5.14138928    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.42214828    0.00000000    0.00000000    0.00000000    4.06126696    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.42214828    0.00000000    0.00000000    0.00000000    0.02337014    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.54310282    0.00000000    0.00000000    0.00000000    0.91412788\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      0.99982      0.99982      0.99982      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      0.33351      0.33351      0.33351      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -87.75745     -7.69076     -5.74497     -5.74497     -5.74497     -0.65154     -0.27936     -0.27936     -0.27936      0.21527      0.29683      0.29683      0.29683 \n   </alphaeps>\n   <betaeps>\n   -87.74724     -7.67898     -5.73061     -5.73061     -5.73061     -0.58843     -0.22278     -0.22278     -0.22278      0.24841      0.32960      0.32960      0.32960 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.08396      0.00000      0.00000      0.00000     -0.07581      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.37767     -0.00000     -0.00000     -0.00000      0.12900     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.28074     -0.00000     -0.00000      0.00000      0.28714      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.28074     -0.00000      0.00000      0.00000     -0.28714 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.28074      0.00000      0.00000     -0.00000      0.28714      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.78836      0.00000      0.00000      0.00000     -1.65662      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.74495      0.00000      0.00000     -0.00000     -1.15761     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.74495      0.00000     -0.00000     -0.00000      1.15761 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.74495      0.00000      0.00000      0.00000     -1.15761      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.30541     -0.00000      0.00000      0.00000      1.76224     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.38474      0.00000      0.00000      0.00000      1.25442      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.38474     -0.00000      0.00000      0.00000     -1.25442 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.38474     -0.00000     -0.00000     -0.00000      1.25442     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.08265      0.00000     -0.00000      0.00000     -0.07677     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.37489     -0.00000      0.00000     -0.00000      0.13350      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.27061     -0.00000     -0.00000     -0.00000     -0.29506     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.27061      0.00000      0.00000     -0.00000      0.29506      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.27061      0.00000     -0.00000     -0.00000      0.29506 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.76602     -0.00000     -0.00000      0.00000     -1.66711     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.70829      0.00000      0.00000      0.00000      1.18044      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.70829      0.00000      0.00000     -0.00000     -1.18044     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.70829     -0.00000      0.00000      0.00000     -1.18044 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.32910      0.00000     -0.00000     -0.00000      1.75798     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.42391      0.00000      0.00000      0.00000     -1.24174      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.42391      0.00000     -0.00000      0.00000      1.24174      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.42391     -0.00000      0.00000     -0.00000      1.24174 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cl\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.13625492    0.00000000    0.00000000    0.00000000   -0.28424326    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.61028087    0.00000000    0.00000000    0.00000000    0.50235891    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.22330201   -0.33480285   -0.11290573    0.00000000    0.00000000   -0.37559608   -0.37063050\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.11039628    0.33480285    0.00000000    0.70847913    0.00000000   -0.03774745\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.20944506    0.00000000    0.22330201    0.00000000    0.70925030   -0.37063050   -0.33784863\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.19963632    0.00000000    0.00000000    0.00000000   -5.77656832    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.57232251    1.00622450    0.43393696    0.00000000    0.00000000    1.44071720    1.42446515\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.13838555   -1.00622450    0.00000000   -2.29037037    0.00000000    0.57481198\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.52741628    0.00000000   -0.57232251    0.00000000   -2.28680369    1.42446515    0.86590523\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.51641279    0.00000000    0.00000000    0.00000000    6.09871576    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.28681186   -0.19685560   -0.47182242    0.00000000    0.00000000   -1.55869672   -1.54883003\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.75863428    0.19685560    0.00000000    1.11489307    0.00000000   -1.99263368\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.31133821    0.00000000   -0.28681186    0.00000000    1.07988850   -1.54883003    0.43393696\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      0.99253      0.99253      0.99253      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      0.67414      0.67414      0.67414      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -100.34040     -9.18185     -7.03663     -7.03663     -7.03663     -0.76301     -0.32700     -0.32700     -0.32700      0.28860      0.37568      0.37568      0.37568 \n   </alphaeps>\n   <betaeps>\n  -100.33430     -9.17517     -7.02848     -7.02848     -7.02848     -0.73178     -0.29897     -0.29897     -0.29897      0.30455      0.39140      0.39140      0.39140 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.08823     -0.00000      0.00000     -0.00000      0.08121      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.39298      0.00000     -0.00000      0.00000     -0.14265      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.29517      0.00000      0.00000      0.00000     -0.00000      0.29781     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.29517      0.00000      0.00000     -0.00000     -0.29781 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.29517      0.00000      0.00000     -0.29781      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.78557     -0.00000      0.00000     -0.00000      1.65273      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.75652     -0.00000     -0.00000     -0.00000      0.00000     -1.14459      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.75652     -0.00000     -0.00000      0.00000      1.14459 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.75652     -0.00000     -0.00000      1.14459     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.31409      0.00000      0.00000     -0.00000     -1.74992     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.37912     -0.00000     -0.00000     -0.00000      0.00000      1.24452      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.37912     -0.00000     -0.00000      0.00000     -1.24452 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.37912     -0.00000     -0.00000     -1.24452     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.08761     -0.00000      0.00000      0.00000      0.08166      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.39166      0.00000     -0.00000     -0.00000     -0.14477     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.29085      0.00000     -0.00000      0.00000      0.30134 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.29085     -0.00000      0.00000     -0.00000     -0.30134      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.29085     -0.00000      0.00000     -0.00000     -0.30134      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.77558      0.00000      0.00000      0.00000      1.65747      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.74152     -0.00000      0.00000      0.00000     -1.15438 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.74152      0.00000     -0.00000      0.00000      1.15438     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.74152     -0.00000     -0.00000      0.00000      1.15438      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.32466      0.00000      0.00000      0.00000     -1.74800      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.39534      0.00000     -0.00000     -0.00000      1.23946 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.39534      0.00000     -0.00000     -0.00000     -1.23946      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.39534      0.00000      0.00000     -0.00000     -1.23946     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ar\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.14076685    0.00000000    0.00000000    0.00000000   -0.30809776    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.61541871    0.00000000    0.00000000    0.00000000    0.50709723    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.46235921    0.00000000    0.00000000    0.00000000    0.76831024    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.34313235    0.11922686    0.00000000    0.00000000    0.35118464   -0.35118464\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.11922686   -0.34313235    0.00000000    0.00000000   -0.35118464    0.35118464\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.17158247    0.00000000    0.00000000    0.00000000   -5.82556884    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.14249751    0.00000000    0.00000000    0.00000000   -2.84587348    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.70087310   -0.44162442    0.00000000    0.00000000   -0.86778325    0.86778325\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.44162442    0.70087310    0.00000000    0.00000000    0.86778325   -0.86778325\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.51809426    0.00000000    0.00000000    0.00000000    6.11359531    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.58142952    0.00000000    0.00000000    0.00000000    3.07187770    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.05812541    0.47669589    0.00000000    0.00000000   -0.44162442    0.44162442\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.47669589    1.05812541    0.00000000    0.00000000    0.44162442   -0.44162442\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -113.77020    -10.78627     -8.43810     -8.43810     -8.43810     -0.87550     -0.37388     -0.37388     -0.37388      0.38824      0.47891      0.47891      0.47891 \n   </alphaeps>\n   <betaeps>\n  -113.77020    -10.78627     -8.43810     -8.43810     -8.43810     -0.87550     -0.37388     -0.37388     -0.37388      0.38824      0.47891      0.47891      0.47891 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.09196     -0.00000     -0.00000      0.00000     -0.08811     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.40204     -0.00000      0.00000     -0.00000      0.14502      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30587     -0.00000     -0.00000      0.00000     -0.30997      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.30587      0.00000     -0.00000     -0.00000      0.00000      0.30997 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.30587     -0.00000      0.00000     -0.30997      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.76537      0.00000     -0.00000      0.00000     -1.66600     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.75581      0.00000      0.00000     -0.00000      1.14815     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.75581     -0.00000      0.00000      0.00000     -0.00000     -1.14815 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.75581      0.00000      0.00000      1.14815     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.33846      0.00000     -0.00000      0.00000      1.74837      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.38464     -0.00000     -0.00000      0.00000     -1.23933      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.38464      0.00000     -0.00000     -0.00000      0.00000      1.23933 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.38464     -0.00000     -0.00000     -1.23933      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.09196      0.00000      0.00000     -0.00000     -0.08811     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.40204     -0.00000     -0.00000      0.00000      0.14502      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.30587     -0.00000      0.00000     -0.00000     -0.30997      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.30587     -0.00000      0.00000      0.00000     -0.30997     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.30587     -0.00000     -0.00000      0.00000     -0.30997 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.76537      0.00000      0.00000     -0.00000     -1.66600     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.75581      0.00000     -0.00000      0.00000      1.14815     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.75581      0.00000     -0.00000     -0.00000      1.14815     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.75581      0.00000      0.00000     -0.00000      1.14815 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.33846      0.00000      0.00000     -0.00000      1.74837      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.38464      0.00000     -0.00000      0.00000     -1.23933     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.38464     -0.00000      0.00000      0.00000     -1.23933     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.38464     -0.00000     -0.00000     -0.00000     -1.23933 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"K\" basis=\"MCP\">\n   <guessdensitymatrix>\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.02468730    0.00000000    0.00000000    0.00000000    0.10853849    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.06706804    0.00000000    0.00000000    0.00000000   -0.80115195    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.67418374    0.00103649    0.00046306    0.00000000    0.00357517   -0.00357517    0.00000000    0.00000000    0.00000000    0.16503850    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00051825   -0.00046306    0.00051825    0.00000000   -0.09346738   -0.00740766    0.02630312    0.00000000   -0.16503850    0.08218997    0.08218997\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00005519    0.00000000   -0.00051825    0.00000000    0.08989221    0.06358908   -0.02630312    0.00000000    0.00000000   -0.10078987    0.24722847\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.43539108    0.00000000    0.00000000    0.00000000   -0.33046321    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    2.18074905   -0.00416416   -0.00211142    0.00000000   -0.03056393    0.03056393    0.00000000    0.00000000    0.00000000   -0.53384192    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.00208208    0.00211142   -0.00208208    0.00000000    0.34192628   -0.03622317   -0.10567386    0.00000000    0.53384192   -0.33020151   -0.33020151\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00002934    0.00000000    0.00208208    0.00000000   -0.31136235   -0.20568849    0.10567386    0.00000000    0.00000000    0.50414217   -0.86404343\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.31899375    0.00000000    0.00000000    0.00000000  -12.78885523    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.02207460    0.01134098    0.01384640    0.00000000    0.60562821   -0.60562821    0.00000000    0.00000000    0.00000000   -0.00540381    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00567049   -0.01384640    0.00567049    0.00000000   -0.89134619    1.18331041    0.28780006    0.00000000    0.00540381    0.89929539    0.89929539\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.00817592    0.00000000   -0.00567049    0.00000000    0.28571798   -0.00208208   -0.28780006    0.00000000    0.00000000   -4.57221309    0.89389158\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.92019124    0.00000000    0.00000000    0.00000000    8.88096323    0.00000000    0.00000000    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.00862517    0.01126699   -0.01348032    0.00000000   -1.15572946    1.15572946    0.00000000    0.00000000    0.00000000    0.00211142    0.00000000\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00563349    0.01348032    0.00563349    0.00000000    0.86899351   -0.58469815    0.28592242    0.00000000   -0.00211142    0.89342827    0.89342827\n       0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.01911381    0.00000000   -0.00563349    0.00000000    0.28673594    0.00081353   -0.28592242    0.00000000    0.00000000    6.22027627    0.89553969\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.49994      0.00002      0.00002      0.00002      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.49994      0.00002      0.00002      0.00002      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -128.37560    -12.84460    -10.28997    -10.28997    -10.28997     -1.29275     -0.70296     -0.70296     -0.70296     -0.09002     -0.03178     -0.03178     -0.03178      0.02409      0.04356      0.04356      0.04356 \n   </alphaeps>\n   <betaeps>\n  -128.37560    -12.84460    -10.28997    -10.28997    -10.28997     -1.29275     -0.70296     -0.70296     -0.70296     -0.09002     -0.03178     -0.03178     -0.03178      0.02409      0.04356      0.04356      0.04356 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.01947      0.00000      0.00000      0.00000      0.00558      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08777     -0.00000     -0.00000      0.00000     -0.09402     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.32282     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.04903      0.00000     -0.00000      0.05606      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.32282     -0.00000     -0.00000     -0.04903     -0.00000     -0.00000      0.00000      0.00000     -0.05606 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.32282      0.00000     -0.00000      0.04903      0.00000      0.00000      0.00000      0.05606      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.23428     -0.00000     -0.00000      0.00000      0.14828     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.04421     -0.00000      0.00000      0.00000      0.00000      0.00000      0.19698     -0.00000     -0.00000     -0.25562     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.04421      0.00000      0.00000      0.19698      0.00000      0.00000     -0.00000      0.00000      0.25562 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.04421     -0.00000      0.00000     -0.19698     -0.00000     -0.00000     -0.00000     -0.25562      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.72600      0.00000     -0.00000     -0.00000     -2.13839      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01057      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.53647      0.00000      0.00000      1.67632      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01057     -0.00000      0.00000     -0.53647     -0.00000     -0.00000      0.00000     -0.00000     -1.67632 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01057      0.00000     -0.00000      0.53647      0.00000      0.00000      0.00000      1.67632     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32107      0.00000     -0.00000     -0.00000      2.26430      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00413     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.53297      0.00000      0.00000     -1.63200      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00413     -0.00000     -0.00000     -0.53297      0.00000      0.00000     -0.00000      0.00000      1.63200 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00413      0.00000     -0.00000      0.53297     -0.00000     -0.00000     -0.00000     -1.63200      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.01947      0.00000      0.00000      0.00000     -0.00558     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.08777     -0.00000     -0.00000      0.00000      0.09402      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.32282      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.04903     -0.00000      0.00000      0.05606      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32282     -0.00000      0.04903     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.05606 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.32282      0.00000     -0.00000      0.00000      0.04903     -0.00000      0.00000      0.05606     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.23428      0.00000     -0.00000      0.00000     -0.14828      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.04421     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.19698      0.00000     -0.00000     -0.25562     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.04421      0.00000     -0.19698      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.25562 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.04421     -0.00000      0.00000     -0.00000     -0.19698      0.00000     -0.00000     -0.25562      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.72600     -0.00000     -0.00000      0.00000      2.13839     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01057      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.53647     -0.00000      0.00000      1.67632      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.01057     -0.00000      0.53647     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.67632 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.01057      0.00000     -0.00000      0.00000      0.53647     -0.00000      0.00000      1.67632     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.32107      0.00000     -0.00000      0.00000     -2.26430     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00413     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.53297      0.00000     -0.00000     -1.63200      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00413      0.00000      0.53297     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.63200 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00413     -0.00000      0.00000      0.00000      0.53297      0.00000     -0.00000     -1.63200     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ca\" basis=\"MCP\">\n    <guessdensitymatrix>\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.03746131    0.00000000    0.00000000    0.00000000    0.04974838    0.00000000    0.00000000    0.00000000\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.16889797    0.00000000    0.00000000    0.00000000    0.58461727    0.00000000    0.00000000    0.00000000\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.36210918    0.36268205    0.00001880    0.00000000   -0.02011862    0.03492654   -0.01480791    0.00000000   -0.20692470    0.00518638    0.10499406\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00059168    0.36325492    0.36210918    0.00000000    0.00000000   -0.04973445    0.02011862    0.00000000    0.00518638   -0.31710515    0.21517451\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.36325492   -0.00001880   -0.36268205    0.00000000    0.04973445   -0.01480791    0.17130356    0.00000000    0.10499406    0.21517451   -0.20692470\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.44260743    0.00000000    0.00000000    0.00000000    0.40608853    0.00000000    0.00000000    0.00000000\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -1.11039625   -1.11072629    0.00194097    0.00000000   -0.02522806   -0.02012169    0.04534975    0.00000000   -0.92684244    0.25807138   -0.32154794\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00161093   -1.11105633   -1.11039625    0.00000000    0.00000000    0.06547144    0.02522806    0.00000000    0.25807138   -0.86336588   -0.38502451\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.11105633   -0.00194097    1.11072629    0.00000000   -0.06547144    0.04534975    0.35118501    0.00000000   -0.32154794   -0.38502451   -0.92684244\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    1.02453887    0.00000000    0.00000000    0.00000000   -8.40768662    0.00000000    0.00000000    0.00000000\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.01167014   -0.00808349    0.00420225    0.00000000   -0.21899850    0.21866846    0.00033004    0.00000000   -3.48458757    0.69215911   -0.00234012\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00778890   -0.00449684   -0.01167014    0.00000000    0.00000000   -0.21833842    0.21899850    0.00000000    0.69215911   -4.17440656    0.68747888\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00449684   -0.00420225    0.00808349    0.00000000    0.21833842    0.00033004    2.01395035    0.00000000   -0.00234012    0.68747888   -3.48458757\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.50443219    0.00000000    0.00000000    0.00000000    8.90225891    0.00000000    0.00000000    0.00000000\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.00188487    0.00278232   -0.01213781    0.00000000   -0.28443317    0.28454677   -0.00011360    0.00000000    4.90146837    0.89683548    0.00080546\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.00747062    0.00744952   -0.00188487    0.00000000    0.00000000   -0.28466037    0.28443317    0.00000000    0.89683548    4.00382742    0.89844641\n        0.00000000    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000   -0.00744952    0.01213781   -0.00278232    0.00000000    0.28466037   -0.00011360   -1.43737436    0.00000000    0.00080546    0.89844641    4.90146837\n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.99885      0.00038      0.00038      0.00038      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.00000      1.00000      1.00000      0.99885      0.00038      0.00038      0.00038      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -143.89860    -15.05408    -12.29371    -12.29371    -12.29371     -1.71679     -1.03957     -1.03957     -1.03957     -0.14262     -0.05193     -0.05193     -0.05193      0.03957      0.09460      0.09460      0.09460 \n   </alphaeps>\n   <betaeps>\n  -143.89860    -15.05408    -12.29371    -12.29371    -12.29371     -1.71679     -1.03957     -1.03957     -1.03957     -0.14262     -0.05193     -0.05193     -0.05193      0.03957      0.09460      0.09460      0.09460 \n   </betaeps>\n   <alphavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.02617      0.00000     -0.00000      0.00000     -0.01179      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.11799     -0.00000     -0.00000      0.00000     -0.13855      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.34413     -0.00000     -0.00000      0.07469      0.00000     -0.00000     -0.11206      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34413     -0.00000     -0.00000     -0.00000     -0.07469     -0.00000     -0.00000     -0.00000      0.00000      0.11206      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34413      0.00000      0.00000      0.00000      0.00000     -0.07469     -0.00000     -0.00000      0.00000     -0.11206 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.30920     -0.00000     -0.00000      0.00000     -0.09624      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.05391     -0.00000      0.00000     -0.04303      0.00000     -0.00000     -0.30510     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05391      0.00000      0.00000     -0.00000      0.04303      0.00000      0.00000      0.00000      0.00000      0.30510      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.05391      0.00000      0.00000     -0.00000     -0.00000      0.04303     -0.00000     -0.00000      0.00000     -0.30510 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.71573      0.00000     -0.00000      0.00000      1.99256      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00767     -0.00000     -0.00000      0.46762      0.00000     -0.00000     -1.47517     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00767      0.00000      0.00000      0.00000     -0.46762     -0.00000     -0.00000      0.00000     -0.00000      1.47517      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00767      0.00000      0.00000      0.00000      0.00000     -0.46762     -0.00000     -0.00000      0.00000     -1.47517 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.35239     -0.00000      0.00000     -0.00000     -2.10977      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00264      0.00000     -0.00000      0.60850     -0.00000      0.00000      1.41489      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00264     -0.00000     -0.00000     -0.00000     -0.60850     -0.00000     -0.00000      0.00000     -0.00000     -1.41489     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00264     -0.00000     -0.00000      0.00000      0.00000     -0.60850      0.00000      0.00000     -0.00000      1.41489 \n   </alphavectors>\n   <betavectors>\n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.02617     -0.00000      0.00000      0.00000     -0.01179     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.11799     -0.00000      0.00000      0.00000     -0.13855     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.34413      0.00000      0.00000      0.00000     -0.00000      0.07469      0.00000      0.00000     -0.00000      0.11206 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34413      0.00000     -0.00000      0.00000      0.07469     -0.00000      0.00000     -0.00000     -0.00000      0.11206     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.34413      0.00000      0.00000      0.07469      0.00000     -0.00000      0.11206     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.30920     -0.00000     -0.00000      0.00000     -0.09624     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05391      0.00000      0.00000      0.00000     -0.00000     -0.04303      0.00000      0.00000     -0.00000      0.30510 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.05391      0.00000      0.00000      0.00000     -0.04303     -0.00000      0.00000     -0.00000     -0.00000      0.30510      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.05391      0.00000     -0.00000     -0.04303      0.00000     -0.00000      0.30510     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.71573     -0.00000      0.00000      0.00000      1.99256      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00767     -0.00000     -0.00000     -0.00000      0.00000      0.46762     -0.00000     -0.00000      0.00000      1.47517 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00767     -0.00000     -0.00000      0.00000      0.46762     -0.00000     -0.00000     -0.00000     -0.00000      1.47517      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00767      0.00000      0.00000      0.46762      0.00000     -0.00000      1.47517     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.35239      0.00000     -0.00000     -0.00000     -2.10977     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00264      0.00000      0.00000      0.00000     -0.00000      0.60850      0.00000      0.00000     -0.00000     -1.41489 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00264      0.00000     -0.00000     -0.00000      0.60850      0.00000      0.00000      0.00000      0.00000     -1.41489     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00264     -0.00000      0.00000      0.60850     -0.00000      0.00000     -1.41489      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n"
  },
  {
    "path": "src/madness/chem/corepotential.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/// \\file corepotential.cc\n/// \\brief Simple management of core potential and orbital information\n\n#include <madness/madness_config.h>\n#include <madness/constants.h>\n#include <madness/mra/mra.h>\n#include <madness/external/tinyxml/tinyxml.h>\n#include<madness/chem/corepotential.h>\n#include <cstdio>\n#include <cmath>\n#include <string>\n#include <sstream>\n#include <vector>\n#include <utility>\n#include <map>\n#include <set>\nusing std::string;\nusing std::vector;\n\n\nnamespace madness {\n\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef vector<functionT> vecfuncT;\n\nconst double CorePotentialManager::fc = 2.0;\n\ndouble CorePotential::eval(double r) const {\n    double u = 0.0;\n    double rr = r*r;\n    double sp_n = smoothed_potential(r*rcut)*rcut;\n    for (unsigned int i=0; i<A.size(); ++i) {\n        double rn = 1.0;\n        double sp = sp_n;\n        if (i==0) {\n            sp = smoothed_potential(r*rcut0)*rcut0;\n        }\n        switch (n[i]) {\n            //case 0: rn = sp*sp; break;\n            case 1: rn = sp; break;\n            case 2: rn = 1.0; break;\n            //case 3: rn = r; break;\n            //case 4: rn = rr; break;\n            default: rn = pow(r, n[i] - 2);\n        }\n        u += A[i] * rn * exp(-alpha[i] * rr);\n    }\n    return u;\n}\n\ndouble CorePotential::eval_derivative(double xi, double r) const {\n    double u = 0.0;\n    double rr = r*r;\n    double sp_n = smoothed_potential(r*rcut)*rcut;\n    double dsp_n = -dsmoothed_potential(r*rcut)*rcut*rcut;\n    for (unsigned int i=0; i<A.size(); ++i) {\n        double rn2 = 1.0;\n        double rn4 = 1.0;\n        double sp = sp_n;\n        double dsp = dsp_n;\n        if (i==0) {\n            sp = smoothed_potential(r*rcut0)*rcut0;\n            dsp = -dsmoothed_potential(r*rcut0)*rcut0*rcut0;\n        }\n        switch (n[i]) {\n            //case 0: rn2 = sp*sp; rn4 = rn2*rn2; break;\n            case 1: rn2 = sp; rn4 = dsp*sp; break;\n            case 2: rn2 = 1.0; rn4 = dsp; break;\n            //case 3: rn2 = r; rn4 = sp; break;\n            //case 4: rn2 = rr; rn4 = 1.0; break;\n            default: rn2 = pow(r, n[i] - 2); rn4 = pow(r, n[i] - 4);\n        }\n        u += A[i] * xi * exp(-alpha[i] * rr) * ((n[i]-2) * rn4 - 2.0 * alpha[i] * rn2);\n    }\n    return u;\n}\n\nstring CorePotential::to_string () const {\n    std::ostringstream oss;\n    for (unsigned int i=0; i<A.size(); ++i) {\n        oss.precision(8);\n        oss << std::scientific;\n        std::string sep = \"    \";\n        oss << l[i] << sep << n[i] << sep << alpha[i] << sep << A[i] << endl;\n    }\n    return oss.str();\n}\n\ndouble CoreOrbital::eval_radial(double rsq) const {\n    double s=0.0;\n    for (unsigned int k=0; k<expnt.size(); ++k) {\n        s += coeff[k] * pow((2 * expnt[k] / madness::constants::pi), 0.75) * exp(-1.0 * expnt[k] * rsq);\n    }\n    return s;\n}\n\ndouble CoreOrbital::eval_radial_derivative(double rsq, double xi) const {\n    double s=0.0;\n    for (unsigned int k=0; k<expnt.size(); ++k) {\n        s += coeff[k] * pow((2 * expnt[k] / madness::constants::pi), 0.75) * exp(-1.0 * expnt[k] * rsq) * (-2.0 * expnt[k] * xi);\n    }\n    return s;\n}\n\ndouble CoreOrbital::eval_spherical_harmonics(int m, double x, double y, double z, double& dp, int axis=0) const {\n    double p = 1.0;\n    dp = 0.0;\n    switch (type) {\n        case 0:\n            break;\n        case 1:\n            switch (m) {\n                case 0: p *= x; if (axis == 0) dp = 1.0; break;\n                case 1: p *= y; if (axis == 1) dp = 1.0; break;\n                case 2: p *= z; if (axis == 2) dp = 1.0; break;\n                default: throw \"INVALID MAGNETIC QUANTUM NUMBER\";\n            }\n            break;\n        case 2:\n          { /// braces need by some compilers to limit scope of fac\n            static const double fac = 1.0; //sqrt(3.0);\n            switch (m) {\n                case 0: p *= x*x; if (axis == 0) dp = 2*x; break;\n                case 1: p *= x*y*fac;\n                        if (axis == 0) dp = y*fac;\n                        else if (axis == 1) dp = x*fac;\n                        break;\n                case 2: p *= x*z*fac;\n                        if (axis == 0) dp = z*fac;\n                        else if (axis == 2) dp = x*fac;\n                        break;\n                case 3: p *= y*y; if (axis == 1) dp = 2*y; break;\n                case 4: p *= y*z*fac;\n                        if (axis == 1) dp = z*fac;\n                        else if (axis == 2) dp = y*fac;\n                        break;\n                case 5: p *= z*z; if (axis == 2) dp = 2*z; break;\n                default: throw \"INVALID MAGNETIC QUANTUM NUMBER\";\n            }\n            }\n            break;\n        case 3:\n            switch (m) {\n                case 0: p *= x*x*x;\n                        if (axis == 0) dp = 3*x*x;\n                        break;\n                case 1: p *= x*x*y;\n                        if (axis == 0) dp = 2*x*y;\n                        else if (axis == 1) dp = x*x;\n                        break;\n                case 2: p *= x*x*z;\n                        if (axis == 0) dp = 2*x*z;\n                        else if (axis == 2) dp = x*x;\n                        break;\n                case 3: p *= x*y*y;\n                        if (axis == 0) dp = y*y;\n                        else if (axis == 1) dp = 2*x*y;\n                        break;\n                case 4: p *= x*y*z;\n                        if (axis == 0) dp = y*z;\n                        else if (axis == 1) dp = x*z;\n                        else dp = x*y;\n                        break;\n                case 5: p *= x*z*z;\n                        if (axis == 0) dp = z*z;\n                        else if (axis == 2) dp = 2*x*z;\n                        break;\n                case 6: p *= y*y*y;\n                        if (axis == 1) dp = 3*y*y;\n                        break;\n                case 7: p *= y*y*z;\n                        if (axis == 1) dp = 2*y*z;\n                        else if (axis == 2) dp = y*y;\n                        break;\n                case 8: p *= y*z*z;\n                        if (axis == 1) dp = z*z;\n                        else if (axis == 2) dp = 2*y*z;\n                        break;\n                case 9: p *= z*z*z;\n                        if (axis == 2) dp = 3*z*z;\n                        break;\n                default: throw \"INVALID MAGNETIC QUANTUM NUMBER\";\n            }\n            break;\n\n        default:\n            throw \"UNKNOWN ANGULAR MOMENTUM\";\n    }\n    return p;\n}\n\ndouble CoreOrbital::eval(int m, double rsq, double x, double y, double z) const {\n    if (m < 0 || m >= (type+1)*(type+2)/2) throw \"INVALID MAGNETIC QUANTUM NUMBER\";\n    double R = eval_radial(rsq);\n    if (fabs(R) < 1e-8) {\n        return 0.0;\n    }\n    double dummy;\n    double p = eval_spherical_harmonics(m, x, y, z, dummy);\n    return R*p;\n}\n\ndouble CoreOrbital::eval_derivative(int m, int axis, double xi, double rsq, double x, double y, double z) const {\n    if (m < 0 || m >= (type+1)*(type+2)/2) throw \"INVALID MAGNETIC QUANTUM NUMBER\";\n    double R = eval_radial(rsq);\n    double dR = eval_radial_derivative(rsq, xi);\n    if (fabs(R) < 1e-8) {\n        return 0.0;\n    }\n    double dp;\n    double p = eval_spherical_harmonics(m, x, y, z, dp, axis);\n    return dR*p + R*dp;\n}\n\nstatic const string dir = \"coredata/\";\n\nstatic bool read_potential(TiXmlElement* elem, AtomCore& ac, double eprec) {\n    TiXmlElement* p = elem->FirstChildElement(\"potential\");\n    if (!p) return false;\n\n    std::istringstream iss(p->GetText());\n    int l, n;\n    double e, c;\n    vector<int> vl, vn;\n    vector<double> ve, vc;\n    while (iss >> l) {\n        iss >> n >> e >> c;\n        if (l<0) continue;\n        vl.push_back(l);\n        vn.push_back(n);\n        ve.push_back(e);\n        vc.push_back(c);\n    }\n    ac.potential.l = vl;\n    ac.potential.n = vn;\n    ac.potential.A = vc;\n    ac.potential.alpha = ve;\n    ac.potential.eprec = eprec;\n    int atn = ac.atomic_number;\n    int ncore = ac.ncore;\n    //ac.potential.rcut0 = 1.0/smoothing_parameter(ncore*2, eprec);\n    ac.potential.rcut0 = 1.0/smoothing_parameter(ncore*2, 1.0);\n    //ac.potential.rcut = 1.0/smoothing_parameter(atn-ncore*2, eprec);\n    ac.potential.rcut = 1.0/smoothing_parameter(atn-ncore*2, 1.0);\n\n    return true;\n}\n\nstatic bool read_orbital(TiXmlElement* e, AtomCore& ac) {\n    TiXmlElement* p = e->FirstChildElement(\"core\");\n    if (!p) return false;\n\n    std::istringstream i_num(p->Attribute(\"num\"));\n    i_num >> ac.ncore;\n\n    vector<CoreOrbital> vc;\n\n    for (TiXmlElement* node = p->FirstChildElement(\"orbital\"); node; node = node->NextSiblingElement(\"orbital\")) {\n        int type;\n        vector<double> coeff, expnt;\n        double c, e;\n        double bc;\n        std::istringstream i_bc(node->Attribute(\"bc\"));\n        i_bc >> bc;\n        std::istringstream i_type(node->Attribute(\"type\"));\n        i_type >> type;\n        std::istringstream iss(node->GetText());\n        while (iss >> e) {\n            iss >> c;\n            coeff.push_back(c);\n            expnt.push_back(e);\n        }\n        CoreOrbital co(type, coeff, expnt, bc);\n        vc.push_back(co);\n    }\n    ac.orbital = vc;\n\n    return true;\n}\n\nstatic AtomCore read_atom(TiXmlElement* e, unsigned int atn, double eprec) {\n    AtomCore ac;\n    ac.atomic_number = atn;\n\n    if (!read_orbital(e, ac)) {\n        MADNESS_EXCEPTION(\"CORE_INFO: read_orbital failed.\", -1);\n    }\n    if (!read_potential(e, ac, eprec)) {\n        MADNESS_EXCEPTION(\"CORE_INFO: read_potential failed.\", -1);\n    }\n\n    return ac;\n}\n\nvoid CorePotentialManager::read_file(string filename, std::set<unsigned int> atomset, double eprec) {\n\n\tchar* data_dir=nullptr;\n\tif (getenv(\"MRA_DATA_DIR\")) data_dir = getenv(\"MRA_DATA_DIR\");\n\tstd::string datadir(data_dir);\n\tdatadir+=\"/\"+dir;\n\n\tcore_type = filename;\n    guess_filename = datadir+\"/\"+dir + filename + \"_guess\";\n\n    TiXmlDocument doc(datadir + core_type);\n    if (!doc.LoadFile()) {\n        MADNESS_EXCEPTION((\"CORE_INFO: Failed to load core_info data file: \" + datadir + core_type).c_str(), -1);\n        return;\n    }\n    TiXmlElement* core_info = doc.FirstChildElement();\n    if (!core_info) {\n        MADNESS_EXCEPTION(\"CORE_INFO: core_info data file is not valid.\", -1);\n        return;\n    }\n\n    for (TiXmlElement* node = core_info->FirstChildElement(\"atom\"); node; node = node->NextSiblingElement(\"atom\")) {\n        unsigned int atn = symbol_to_atomic_number(node->Attribute(\"symbol\"));\n        if (atomset.find(atn) != atomset.end()) {\n            AtomCore ac = read_atom(node, atn, eprec);\n            if (ac.n_orbital() == 0) {\n                MADNESS_EXCEPTION(\"CORE_INFO: read_atom Failed.\", -1);\n                return;\n            }\n            atom_core.insert(std::pair<unsigned int,AtomCore>(atn, ac));\n        }\n    }\n\n    vector<unsigned int> atns;\n    for (std::map<unsigned int, AtomCore>::iterator it = atom_core.begin(); it != atom_core.end(); ++it) {\n        atns.push_back(it->first);\n    }\n    madness::print(\"MCP parameters loaded for atomic numbers:\", atns);\n}\n\nvoid CorePotentialManager::set_eprec(double value) {\n    for (std::map<unsigned int,AtomCore>::iterator it=atom_core.begin(); it != atom_core.end(); ++it) {\n        it->second.potential.eprec = value;\n        double q0 = it->second.ncore * 2;\n        double q = it->first - it->second.ncore * 2;\n        it->second.potential.rcut0 = 1.0 / smoothing_parameter(q0, value);\n        it->second.potential.rcut = 1.0 / smoothing_parameter(q, value);\n    }\n}\n\nvoid CorePotentialManager::set_rcut(double value) {\n    for (std::map<unsigned int,AtomCore>::iterator it=atom_core.begin(); it != atom_core.end(); ++it) {\n        it->second.potential.rcut0 = (value<=0.0) ? 1.0 : value;\n        it->second.potential.rcut = (value<=0.0) ? 1.0 : value;\n    }\n}\n\n}\n"
  },
  {
    "path": "src/madness/chem/corepotential.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n#ifndef MADNESS_CHEM_COREPOTENTIAL_H__INCLUDED\n#define MADNESS_CHEM_COREPOTENTIAL_H__INCLUDED\n\n/// \\file corepotential.h\n/// \\brief Declaration of core potential related class\n\n#include <madness/madness_config.h>\n#include <madness/constants.h>\n#include<madness/chem/atomutil.h>\n#include <madness/world/print.h>\n#include <map>\n#include <set>\n#include <vector>\n#include <string>\n#include <cmath>\n#include <iostream>\n#include <sstream>\nusing std::cout;\nusing std::endl;\nusing std::vector;\n\nnamespace madness {\n\n/// Represents a core potential\n\n/// General Core Potential is able to write down as following form:\n/// \\f$  U(r) = \\sum_k A_k r^(n_k-2) exp(-alpha_k r^2) \\sum_m |Y_lm \\rangle \\langle Y_lm| \\f$\n/// CorePotential holds these parameters (l,n,A,alpha)\n///\n/// Note: CorePotential::eval() currently ignores `l'.\n///       (It means `\\f$\\sum_m |Y_lm \\rangle \\langle Y_lm|\\f$' is always `1'.)\nstruct CorePotential {\n    std::vector<int> l; ///< Angular momentum = 0, 1, 2, ...\n    std::vector<int> n;\n    std::vector<double> A;\n    std::vector<double> alpha;\n    double eprec, rcut0, rcut;\n\n    CorePotential() : l(), n(), A(), alpha() {};\n    CorePotential(const std::vector<int>& l,\n                  const std::vector<int>& n,\n                  const std::vector<double>& A,\n                  const std::vector<double>& alpha)\n                : l(l), n(n), A(A), alpha(alpha), eprec(1e-4), rcut0(1.0), rcut(1.0) {};\n\n    double eval(double r) const;\n\n    double eval_derivative(double xi, double r) const;\n\n    std::string to_string () const;\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & l & n & A & alpha & eprec & rcut0 & rcut;\n    }\n};\n\nstruct CoreOrbital {\n    double Bc;\n    int type;\n    vector<double> coeff, expnt;\n    double rsqmax;\n\n    CoreOrbital() : Bc(0), type(0), coeff(), expnt(), rsqmax(0.0) {}\n    CoreOrbital(int type,\n                const std::vector<double>& coeff,\n                const std::vector<double>& expnt,\n                double Bc)\n                : Bc(Bc), type(type), coeff(coeff), expnt(expnt)\n    {\n        double minexpnt = expnt[0];\n        for (unsigned int i=1; i<expnt.size(); ++i)\n            minexpnt = std::min(minexpnt,expnt[i]);\n        rsqmax = 18.4/minexpnt;\n    };\n\n    double eval_radial(double rsq) const;\n\n    double eval_radial_derivative(double rsq, double xi) const;\n\n    double eval_spherical_harmonics(int m, double x, double y, double z, double& dp, int axis) const;\n\n    double eval(int m, double rsq, double x, double y, double z) const;\n\n    double eval_derivative(int m, int axis, double xi, double rsq, double x, double y, double z) const;\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & Bc & type & rsqmax;\n        ar & coeff & expnt;\n    }\n};\n\nstruct AtomCore {\n    unsigned int atomic_number;\n    unsigned int ncore;\n    std::vector<CoreOrbital> orbital;\n    CorePotential potential;\n\n    AtomCore() : atomic_number(0), ncore(0), orbital(), potential() {};\n\n    inline unsigned int n_orbital() const { return ncore; };\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & atomic_number & ncore;\n        ar & potential;\n        for (std::vector<CoreOrbital>::iterator it=orbital.begin(); it != orbital.end(); ++it) {\n            ar & (*it);\n        }\n    }\n};\n\nclass CorePotentialManager {\n    static const double fc;\n    std::string core_type;      ///< core potential type (eg. mcp)\n    std::string guess_filename; ///< filename of initial guess density data\n    std::map<unsigned int,AtomCore> atom_core;\n        ///< core potential data mapped atn to potential\n\npublic:\n    CorePotentialManager() :\n        core_type(\"\"),\n        guess_filename(\"\"),\n        atom_core() {}\n\n    CorePotentialManager(std::string filename, double eprec) : core_type(filename) {\n        read_file(filename, std::set<unsigned int>(), eprec);\n    }\n\n    inline bool is_defined(const unsigned int atn) const {\n        return (atom_core.find(atn) != atom_core.end());\n    }\n\n    inline unsigned int n_core_orb(const unsigned int atn) const {\n        return (*(atom_core.find(atn))).second.n_orbital();\n    }\n\n    inline unsigned int n_core_orb_base(const unsigned int atn) const {\n        return (*(atom_core.find(atn))).second.orbital.size();\n    }\n\n    inline std::string guess_file() const { return guess_filename; }\n\n    AtomCore get_atom_core(unsigned int atn) const {\n        return atom_core.find(atn)->second;\n    }\n\n    CorePotential get_potential(unsigned int atn) const {\n        return atom_core.find(atn)->second.potential;\n    }\n\n    inline unsigned int get_core_l(unsigned int atn, unsigned int core) const {\n        return get_atom_core(atn).orbital[core].type;\n    }\n\n    inline double get_core_bc(unsigned int atn, unsigned int core) const {\n        return get_atom_core(atn).orbital[core].Bc*fc/2;\n    }\n\n    inline double core_eval(unsigned int atn, unsigned int core, int m, double rsq, double x, double y, double z) const {\n        return get_atom_core(atn).orbital[core].eval(m, rsq, x, y, z);\n    }\n\n    inline double core_derivative(unsigned int atn, unsigned int core, int m, int axis, double xi, double rsq, double x, double y, double z) const {\n        return get_atom_core(atn).orbital[core].eval_derivative(m, axis, xi, rsq, x, y, z);\n    }\n\n    double potential(unsigned int atn, double r) const {\n        AtomCore ac = (*(atom_core.find(atn))).second;\n        return ac.potential.eval(r);\n    }\n\n    double potential_derivative(unsigned int atn, double xi, double r) const {\n        AtomCore ac = (*(atom_core.find(atn))).second;\n        return ac.potential.eval_derivative(xi, r);\n    }\n\n    void read_file(std::string filename, std::set<unsigned int> atomset, double eprec);\n\n    void set_eprec(double value);\n\n    void set_rcut(double value);\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & core_type;\n        ar & guess_filename;\n        for (std::map<unsigned int, AtomCore>::iterator it=atom_core.begin(); it != atom_core.end(); ++it) {\n            ar & it->first & it->second;\n        }\n    }\n};\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/chem/correlationfactor.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include<madness/chem/correlationfactor.h>\n\nnamespace madness{\n\n\t/// create and return a new nuclear correlation factor\n\n\t/// note there is also an Ad-hoc nuclear correlation factor, which can only be created directly\n\t/// @param[in]\tworld\tthe world\n\t/// @param[in]\tcalc\tthe calculation as read from the input file\n\t/// @return \ta nuclear correlation factor\n\tstd::shared_ptr<NuclearCorrelationFactor>\n\tcreate_nuclear_correlation_factor(World& world,\n\t\t\tconst Molecule& molecule,\n\t\t\tconst std::shared_ptr<PotentialManager> potentialmanager,\n\t\t\tconst std::string inputline) {\n\n\t\tstd::stringstream ss(lowercase(inputline));\n\t\tstd::string corrfac, factor;\n\t\tss >> corrfac >> factor;\n\n\t\t// read the length scale factor if there is one\n\t\tdouble a=0.0;\n\t\tif (factor.size()>0) {\n\t\t\tstd::stringstream fss(factor);\n\t\t\tif (not (fss >> a)) {\n\t\t\t\tif (world.rank()==0) print(\"could not read the length scale parameter a: \",a);\n\t\t\t\tMADNESS_EXCEPTION(\"input error in the nuclear correlation factor\",1);\n\t\t\t}\n\t\t}\n\n\t\ttypedef std::shared_ptr<NuclearCorrelationFactor> ncf_ptr;\n\n\t\tif (corrfac == \"gaussslater\") {\n\t\t\treturn ncf_ptr(new GaussSlater(world, molecule));\n\t\t} else if (corrfac == \"linearslater\") {\n\t\t\treturn ncf_ptr(new LinearSlater(world, molecule, a));\n        } else if ((corrfac == \"gradientalgaussslater\") or (corrfac == \"ggs\")) {\n            return ncf_ptr(new GradientalGaussSlater(world, molecule,a));\n        } else if (corrfac == \"slater\") {\n\t\t\treturn ncf_ptr(new Slater(world, molecule, a));\n        } else if (corrfac == \"poly4erfc\") {\n            return ncf_ptr(new poly4erfc(world, molecule, a));\n\t\t} else if (corrfac == \"polynomial4\") {\n\t\t\treturn ncf_ptr(new Polynomial<4>(world, molecule, a ));\n\t\t} else if (corrfac == \"polynomial5\") {\n\t\t\treturn ncf_ptr(new Polynomial<5>(world, molecule, a));\n\t\t} else if (corrfac == \"polynomial6\") {\n\t\t\treturn ncf_ptr(new Polynomial<6>(world, molecule, a));\n\t\t} else if (corrfac == \"polynomial7\") {\n\t\t\treturn ncf_ptr(new Polynomial<7>(world, molecule, a));\n\t\t} else if (corrfac == \"polynomial8\") {\n\t\t\treturn ncf_ptr(new Polynomial<8>(world, molecule, a));\n\t\t} else if (corrfac == \"polynomial9\") {\n\t\t\treturn ncf_ptr(new Polynomial<9>(world, molecule, a));\n\t\t} else if (corrfac == \"polynomial10\") {\n\t\t\treturn ncf_ptr(new Polynomial<10>(world, molecule, a));\n\t\t} else if ((corrfac == \"none\") or (corrfac == \"one\")) {\n\t\t\treturn ncf_ptr(new PseudoNuclearCorrelationFactor(world,\n\t\t\t\t\tmolecule,potentialmanager,1.0));\n\t\t} else if (corrfac == \"two\") {\n\t\t\treturn ncf_ptr(new PseudoNuclearCorrelationFactor(world,\n\t\t\t\t\tmolecule,potentialmanager,2.0));\n\t\t} else if (corrfac == \"linear\") {\n\t\t\treturn ncf_ptr(new PseudoNuclearCorrelationFactor(world,\n\t\t\t\t\tmolecule,potentialmanager, a));\n\t\t} else {\n\t\t\tif (world.rank()==0) print(inputline);\n\t\t\tMADNESS_EXCEPTION(\"unknown nuclear correlation factor\", 1);\n\t\t\treturn ncf_ptr();\n\t\t}\n\t}\n\n\tstd::shared_ptr<NuclearCorrelationFactor>\n\tcreate_nuclear_correlation_factor(World& world,\n\t\t\tconst Molecule& molecule,\n\t\t\tconst std::shared_ptr<PotentialManager> pm,\n\t\t\tconst std::pair<std::string,double>& ncf) {\n\t\tstd::stringstream ss;\n\t\tss << ncf.first << \" \" << ncf.second;\n\t\treturn create_nuclear_correlation_factor(world,molecule,pm,ss.str());\n\t}\n\n\n}\n"
  },
  {
    "path": "src/madness/chem/correlationfactor.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/*!\n  \\file apps/chem/correlationfactor.h\n  \\brief class for regularizing singular potentials in the molecular\n  Hamilton operator\n\n  \\par Introduction\n\n  The correlation factors are intended to represent the cusps (nuclear or\n  electronic) in the molecular wave function. Their commutator over the\n  kinetic energy operator give a potential operator that cancels the\n  singular potential\n\n  [T, f12]\t\t= U + 1/r12\n  R^-1[T, R]\t= U_nuc\t- sum_A Z_A/r1A\n\n  The regularized potentials U and U_nuc contain two terms each, a local\n  potential, (denoted U2), and a potential that is multiplied with the\n  derivative operator \\nabla (denoted U1)\n\n  U \t\t\t= U1 . (\\nabla_1 - \\nabla_2) + U2\n  U_nuc\t\t\t= U1 . \\nabla + U2\n\n  with\n\n  U2\t\t\t= (\\nabla^2 f12)\n  U2\t\t\t= R^{-1}(\\nabla^2 R)\n\n  \\vec U1\t\t= (\\vec \\nabla f12)\n  \\vec U1\t\t= R^{-1}(\\vec \\nabla R)\n\n  To construct a nuclear correlation factor write:\n\n  std::shared_ptr<NuclearCorrelationFactor> nuclear_correlation\n   = create_nuclear_correlation_factor(world,*calc);\n\n  where calc is an SCF calculation which holds the molecule and the\n  nuclear_corrfac parameter name.\n*/\n\n\n#ifndef MADNESS_CHEM_NUCLEARCORRELATIONFACTOR_H_\n#define MADNESS_CHEM_NUCLEARCORRELATIONFACTOR_H_\n\n#include <madness/mra/mra.h>\n#include<madness/chem/molecule.h>\n#include<madness/chem/potentialmanager.h>\n#include<madness/chem/atomutil.h>\n\nnamespace madness {\n\n/// ABC for the nuclear correlation factors\nclass NuclearCorrelationFactor {\npublic:\n\tenum corrfactype {None, GradientalGaussSlater, GaussSlater, LinearSlater,\n\t    Polynomial, Slater, poly4erfc, Two, Adhoc};\n\ttypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\n\n\t/// ctor\n\n\t/// @param[in]\tworld\tthe world\n\t/// @param[in]\tmol molecule with the sites of the nuclei\n\tNuclearCorrelationFactor(World& world, const Molecule& mol)\n\t\t: world(world), vtol(FunctionDefaults<3>::get_thresh()*0.1)\n\t\t, eprec(mol.get_eprec()), molecule(mol) {}\n\n\t/// virtual destructor\n\tvirtual ~NuclearCorrelationFactor() {};\n\n\t/// initialize the regularized potentials U1 and U2\n\tvoid initialize(const double vtol1) {\n\n\t    // set threshold for projections\n\t    vtol=vtol1;\n\n\t\t// construct the potential functions\n\t\t// keep tighter threshold for orthogonalization\n\t\tfor (int axis=0; axis<3; ++axis) {\n\t\t\tfunctorT U1f=functorT(new U1_functor(this,axis));\n\t\t\tU1_function.push_back(real_factory_3d(world).thresh(vtol)\n\t\t\t\t\t.functor(U1f).truncate_on_project());\n\t\t\tU1_function.back().set_thresh(FunctionDefaults<3>::get_thresh());\n\t\t}\n\n\t\t// U2 is the term -S\"/S - Z/r\n\t\tfunctorT U2f=functorT(new U2_functor(this));\n\t\tU2_function=real_factory_3d(world).thresh(vtol)\n\t\t\t\t.functor(U2f).truncate_on_project();\n\t\tU2_function.set_thresh(FunctionDefaults<3>::get_thresh());\n\n\t\t// U3 is the term SA'/SA . SB'/SB\n\t\tfunctorT U3f=functorT(new U3_functor(this));\n\t\treal_function_3d tmp=real_factory_3d(world).thresh(vtol)\n\t\t\t\t.functor(U3f).truncate_on_project();\n\t\ttmp.set_thresh(FunctionDefaults<3>::get_thresh());\n\t\tU2_function+=tmp;\n\t\tU2_function.truncate();\n\t}\n\n\tvirtual corrfactype type() const = 0;\n\n\t/// apply the regularized potential U_nuc on a given function rhs\n\tvirtual real_function_3d apply_U(const real_function_3d& rhs) const {\n\n\t\t// the purely local part\n\t\treal_function_3d result=(U2()*rhs).truncate();\n\n\t\t// the part with the derivative operators\n        result.compress();\n        for (int axis=0; axis<3; ++axis) {\n            real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n            const real_function_3d Drhs=D(rhs).truncate();\n            result+=U1(axis)*Drhs;\n        }\n\n        result.truncate();\n        return result;\n\t}\n\n\t/// return the nuclear correlation factor\n\tvirtual real_function_3d function() const {\n\t\tfunctorT Rf=functorT(new R_functor(this,1));\n\t\treal_function_3d r=real_factory_3d(world).thresh(vtol)\n\t\t\t\t.functor(Rf).truncate_on_project();\n\t\treturn r;\n\t}\n\n\t/// return the square of the nuclear correlation factor\n\tvirtual real_function_3d square() const {\n\t    R_functor r(this,2);\n\t\treal_function_3d R2=real_factory_3d(world).thresh(vtol)\n\t\t\t\t.functor(r).truncate_on_project();\n\t\treturn R2;\n\t}\n\n    /// return the square of the nuclear correlation factor multiplied with\n    /// the derivative of the nuclear potential for the specified atom\n\n    /// @return R^2 * \\frac{\\partial Z_A/r_{1A}}{\\partial X_A}\n    virtual real_function_3d square_times_V_derivative(const int iatom, const int axis) const {\n        square_times_V_derivative_functor func(this,molecule,iatom,axis);\n        real_function_3d R2=real_factory_3d(world).thresh(vtol)\n                .functor(func).truncate_on_project();\n        return R2;\n    }\n\n\t/// return the inverse nuclear correlation factor\n\tvirtual real_function_3d inverse() const {\n\t    R_functor r(this,-1);\n\t\treal_function_3d R_inverse=real_factory_3d(world).thresh(vtol)\n\t\t\t\t.functor(r).truncate_on_project();\n\t\treturn R_inverse;\n\t}\n\n\t/// return the U1 term of the correlation function\n\tvirtual const real_function_3d U1(const int axis) const {\n\t\treturn U1_function[axis];\n\t}\n\n    /// return the U1 functions in a vector\n\tstd::vector<real_function_3d> U1vec() const {\n\t    std::vector<real_function_3d> uvec(3);\n\t    uvec[0]=U1_function[0];\n\t    uvec[1]=U1_function[1];\n\t    uvec[2]=U1_function[2];\n\t    return uvec;\n\t}\n\n\t/// return the U2 term of the correlation function\n\tvirtual const real_function_3d U2() const  {return U2_function;}\n\nprivate:\n\n\t/// the world\n\tWorld& world;\n\n\t/// the threshold for initial projection\n\tdouble vtol;\n\n    /// smoothing of the potential/step function\n    double eprec;\n\n\t/// the molecule\n\tconst Molecule& molecule;\n\nprotected:\n\t/// the three components of the U1 potential\n\tstd::vector<real_function_3d> U1_function;\n\n\t/// the purely local U2 potential, having absorbed the nuclear pot V_nuc\n\treal_function_3d U2_function;\n\nprivate:\n\t/// the correlation factor S wrt a given atom\n\n\t/// @param[in]\tr\tthe distance of the req'd coord to the nucleus\n\t/// @param[in]\tZ\tthe nuclear charge\n\t/// @return\t\tthe nuclear correlation factor S_A(r_1A)\n\tvirtual double S(const double& r, const double& Z) const = 0;\n\n\t/// the partial derivative of correlation factor S' wrt the cartesian coordinates\n\n\t/// @param[in]\tvr1A\tthe vector of the req'd coord to the nucleus\n\t/// @param[in]\tZ\tthe nuclear charge\n\t/// @return\t\tthe gradient of the nuclear correlation factor S'_A(r_1A)\n\tvirtual coord_3d Sp(const coord_3d& vr1A, const double& Z) const = 0;\n\n\t/// the regularized potential wrt a given atom wrt the cartesian coordinate\n\n\t/// S\" is the Cartesian Laplacian applied on the NCF. Note the difference\n\t/// to Srr_div_S, which is the second derivative wrt the distance rho.\n\t/// this is:  -S\"/S - Z/r\n\t/// @param[in]\tr\tthe distance of the req'd coord to the nucleus\n\t/// @param[in]\tZ\tthe nuclear charge\n\t/// @return \tthe Laplacian of the nuclear correlation factor divided\n\t///\t\t\t\tby the correlation factor minus the nuclear potential\n\tvirtual double Spp_div_S(const double& r, const double& Z) const = 0;\n\npublic:\n\n\t/// first derivative of the NCF with respect to the relative distance rho\n\t/// \\f[\n\t///     \\frac{\\partial S(\\rho)}{\\partial \\rho} \\frac{1}{S(\\rho)}\n\t/// \\f]\n\t/// where the distance of the electron to the nucleus A is given by\n\t/// \\f[\n\t///    \\rho = |\\vec r - \\vec R_A |\n\t/// \\f]\n\tvirtual double Sr_div_S(const double& r, const double& Z) const = 0;\n\n\t/// second derivative of the NCF with respect to the relative distance rho\n    /// \\f[\n    ///     \\frac{\\partial^2 S(\\rho)}{\\partial \\rho^2} \\frac{1}{S(\\rho)}\n    /// \\f]\n    /// where the distance of the electron to the nucleus A is given by\n    /// \\f[\n    ///    \\rho = |\\vec r - \\vec R_A |\n    /// \\f]\n\tvirtual double Srr_div_S(const double& r, const double& Z) const = 0;\n\n    /// third derivative of the NCF with respect to the relative distance rho\n    /// \\f[\n    ///     \\frac{\\partial^3 S(\\rho)}{\\partial \\rho^3} \\frac{1}{S(\\rho)}\n    /// \\f]\n    /// where the distance of the electron to the nucleus A is given by\n    /// \\f[\n    ///    \\rho = |\\vec r - \\vec R_A |\n    /// \\f]\n\tvirtual double Srrr_div_S(const double& r, const double& Z) const = 0;\n\n    /// derivative of the U2 potential wrt nuclear coordinate X (spherical part)\n\n    /// need to reimplement this for all derived classes due to the\n    /// range for r -> 0, where the singular terms cancel. With\n    /// \\f[\n    ///   \\rho = \\left| \\vec r- \\vec R_A \\right|\n    /// \\f]\n    /// returns the term in the parenthesis without the the derivative of rho\n    /// \\f[\n    /// \\frac{\\partial U_2}{\\partial X_A} = \\frac{\\partial \\rho}{\\partial X}\n    ///           \\left(-\\frac{1}{2}\\frac{S''' S - S'' S'}{S^2} + \\frac{1}{\\rho^2}\\frac{S'}{S}\n    ///           - \\frac{1}{\\rho} \\frac{S''S - S'^2}{S^2} + \\frac{Z_A}{\\rho^2}\\right)\n    /// \\f]\n    virtual double U2X_spherical(const double& r, const double& Z, const double& rcut) const {\n        if (world.rank()==0) {\n            print(\"you can't compute the Hessian matrix\");\n            print(\"U2X_spherical is not implemented for the nuclear correlation factor\");\n        }\n        MADNESS_EXCEPTION(\"do more implementation work\",1);\n    }\n\npublic:\n\n\t/// smoothed unit vector for the computation of the U1 potential\n\n    /// note the identity for exchanging nuclear and electronic coordinates\n    /// (there is a sign change, unlike for the smoothed potential)\n    /// \\f[\n    ///     \\vec n  = \\frac{\\partial \\rho}{\\partial x} = -\\frac{\\partial \\rho}{\\partial X}\n    /// \\f]\n    /// \\f[\n    /// \\vec n = \\left\\{\\frac{x \\mathrm{erf}\\left(\\frac{r}{s}\\right)}{r},\n    ///          \\frac{y \\mathrm{erf}\\left(\\frac{r}{s}\\right)}{r},\n    ///          \\frac{z \\mathrm{erf}\\left(\\frac{r}{s}\\right)}{r}\\right\\}\n    /// \\f]\n\tcoord_3d smoothed_unitvec(const coord_3d& xyz, double smoothing=0.0) const {\n#if 0\n\n        if (smoothing==0.0) smoothing=molecule.get_eprec();\n        // TODO:need to test this\n        // reduce the smoothing for the unitvector\n        //if (not (this->type()==None or this->type()==Two)) smoothing=sqrt(smoothing);\n        smoothing=sqrt(smoothing);\n        const double r=xyz.normf();\n        const double rs=r/smoothing;\n        if (r<1.e-4) {\n            const double sqrtpi=sqrt(constants::pi);\n            double erfrs_div_r=2.0/(smoothing*sqrtpi)-2.0/3.0*rs*rs/(sqrtpi*smoothing);\n            return erfrs_div_r*xyz;\n        } else if (r<6.0) {\n            return erf(rs)/r*xyz;\n        } else {\n            return 1.0/r*xyz;\n        }\n\n\n\n#else\n        if (smoothing==0.0) smoothing=eprec;\n        // TODO:need to test this\n        // reduce the smoothing for the unitvector\n        //if (not (this->type()==None or this->type()==Two)) smoothing=sqrt(smoothing);\n        const double r=xyz.normf();\n        const double cutoff=smoothing;\n        if (r>cutoff) {\n            return 1.0/r*xyz;\n        } else {\n            const double xi=r/cutoff;\n            const double xi2=xi*xi;\n            const double xi3=xi*xi*xi;\n//            const double nu21=0.5+1./32.*(45.*xi - 50.*xi3 + 21.*xi*xi*xi*xi*xi);\n            const double nu22=0.5 + 1./64.*(105* xi - 175 *xi3 + 147* xi2*xi3 - 45* xi3*xi3*xi);\n//            const double nu40=0.5 + 1./128.*(225 *xi - 350 *xi3 + 189*xi2*xi3);\n            const double kk=2.*nu22-1.0;\n            return kk/r*xyz;\n        }\n\n#endif\n\t}\n\n\t/// derivative of smoothed unit vector wrt the *electronic* coordinate\n\n\t/// note the sign change for exchanging nuclear and electronic coordinates\n\t/// \\f[\n\t///     \\frac{\\partial \\vec n}{\\partial x}  = -\\frac{\\partial \\vec n}{\\partial X}\n\t/// \\f]\n\t/// the derivative wrt x is given by\n\t/// \\f[\n\t/// \\frac{\\partial\\vec n}{\\partial x} =\n\t/// \\left\\{\\frac{\\left(r^2-x^2\\right) \\mathrm{erf}\\left(\\frac{r}{s}\\right)}{r^3}\n\t///    +\\frac{2 x^2 e^{-\\frac{r^2}{s^2}}}{\\sqrt{\\pi } r^2 s},\n\t///  x y \\left(\\frac{2 e^{-\\frac{r^2}{s^2}}}{\\sqrt{\\pi } r^2 s}\n\t///    -\\frac{\\mathrm{erf}\\left(\\frac{r}{s}\\right)}{r^3}\\right),\n\t///  x z \\left(\\frac{2 e^{-\\frac{r^2}{s^2}}}{\\sqrt{\\pi } r^2 s}\n\t///    -\\frac{\\mathrm{erf}\\left(\\frac{r}{s}\\right)}{r^3}\\right)\\right\\}\n\t/// \\f]\n\tcoord_3d dsmoothed_unitvec(const coord_3d& xyz, const int axis,\n            double smoothing=0.0) const {\n\n\t    const double r=xyz.normf();\n        coord_3d result;\n        if (smoothing==0.0) smoothing=eprec;\n\n#if 1\n        // TODO:need to test this\n        // reduce the smoothing for the unitvector\n        //if (not (this->type()==None or this->type()==Two)) smoothing=sqrt(smoothing);\n        smoothing=sqrt(smoothing);\n\n        const double rs=r/smoothing;\n        const static double sqrtpi=sqrt(constants::pi);\n        const double sqrtpis3=sqrtpi*smoothing*smoothing*smoothing;\n\n        if (r<1.e-4) {\n            // series expansion\n            double p=-4.0/(3.0*sqrtpis3) + 4.0*rs*rs/(5.0*sqrtpis3);\n\n            double erfrs_div_r=2.0/(smoothing*sqrtpi)-2.0/3.0*rs*rs/(sqrtpi*smoothing);\n            result=xyz*xyz[axis]*p;\n            result[axis]+=erfrs_div_r;\n\n        } else if (r<6.0) {\n            const double erfrs_div_r=erf(rs)/r;\n            const double term1=2.0*exp(-rs*rs)/(sqrtpi*r*r*smoothing);\n            result=xyz*xyz[axis]*(term1-erfrs_div_r/(r*r));\n            result[axis]+=erfrs_div_r;\n#else\n        if (r<smoothing) {\n            double r2=r*r;\n            double s2=smoothing*smoothing;\n            double s7=s2*s2*s2*smoothing;\n            double x2=xyz[axis]*xyz[axis];\n\n            double fac_offdiag=-(((135. *r2*r2 - 294.* r2 *s2\n                    + 175.*s2*s2))/(16.* s7));\n            double fac_diag=-((45.* r2*r2*r2 - 147.* r2*r2* s2\n                    + 175.* r2*s2*s2 - 105.* s2*s2*s2 + 270.* r2*r2* x2\n                    - 588.* r2* s2* x2 + 350.*s2* s2 *x2)/(32.* s7));\n\n            result[0]=fac_offdiag*xyz[0]*xyz[axis];\n            result[1]=fac_offdiag*xyz[1]*xyz[axis];\n            result[2]=fac_offdiag*xyz[2]*xyz[axis];\n            result[axis]=fac_diag;\n\n#endif\n        } else {\n            result=xyz*(-xyz[axis]/(r*r*r));\n            result[axis]+=1/r;\n        }\n        return result;\n    }\n\n\n\tclass R_functor : public FunctionFunctorInterface<double,3> {\n\t\tconst NuclearCorrelationFactor* ncf;\n\t\tint exponent;\n\tpublic:\n\t\tR_functor(const NuclearCorrelationFactor* ncf, const int e=1)\n\t\t\t: ncf(ncf), exponent(e) {}\n\t\tdouble operator()(const coord_3d& xyz) const {\n\t\t\tdouble result=1.0;\n\t\t\tfor (size_t i=0; i<ncf->molecule.natom(); ++i) {\n\t\t\t\tconst Atom& atom=ncf->molecule.get_atom(i);\n\t\t\t\tconst coord_3d vr1A=xyz-atom.get_coords();\n\t\t\t\tconst double r=vr1A.normf();\n\t\t\t\tresult*=ncf->S(r,atom.q);\n\t\t\t}\n\t\t\tif (exponent==-1) return 1.0/result;\n\t\t\telse if (exponent==2) return result*result;\n\t\t\telse if (exponent==1) return result;\n\t\t\telse {\n\t\t\t\treturn std::pow(result,double(exponent));\n\t\t\t}\n\n\t\t}\n\t\tstd::vector<coord_3d> special_points() const {\n\t\t\treturn ncf->molecule.get_all_coords_vec();\n\t\t}\n\t};\n\n\t/// functor for the local part of the U1 potential -- NOTE THE SIGN\n\n\t/// U1 = -S'/S\n\tclass U1_functor : public FunctionFunctorInterface<double,3> {\n\n\t\tconst NuclearCorrelationFactor* ncf;\n\t\tconst int axis;\n\n\tpublic:\n\t\tU1_functor(const NuclearCorrelationFactor* ncf, const int axis)\n\t\t\t: ncf(ncf), axis(axis) {}\n\n\t\tdouble operator()(const coord_3d& xyz) const {\n\t\t\tdouble result=0.0;\n\t\t\tfor (size_t i=0; i<ncf->molecule.natom(); ++i) {\n\t\t\t\tconst Atom& atom=ncf->molecule.get_atom(i);\n\t\t\t\tconst coord_3d vr1A=xyz-atom.get_coords();\n\t\t\t\tconst double r=vr1A.normf();\n\t\t\t\tconst double& Z=atom.q;\n//\t\t\t\tresult-=(ncf->Sp(vr1A,Z)[axis]/ncf->S(r,Z));\n\t\t\t\tresult-=ncf->Sr_div_S(r,Z)*ncf->smoothed_unitvec(vr1A)[axis];\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\tstd::vector<coord_3d> special_points() const {\n\t\t\treturn ncf->molecule.get_all_coords_vec();\n\t\t}\n\t};\n\n    /// U1 functor for a specific atom\n\n\t/// NOTE THE SIGN !!\n\t/// this is\n\t/// \\f[\n\t///  -\\frac{\\partial \\rho}{\\partial X_A}\\frac{\\partial S}{\\partial \\rho}\\frac{1}{S}\n\t/// \\f]\n    class U1_atomic_functor : public FunctionFunctorInterface<double,3> {\n\n        const NuclearCorrelationFactor* ncf;\n        const size_t iatom;\n        const int axis;\n\n    public:\n        U1_atomic_functor(const NuclearCorrelationFactor* ncf, const size_t atom,\n                const int axis) : ncf(ncf), iatom(atom), axis(axis) {}\n\n        double operator()(const coord_3d& xyz) const {\n            const Atom& atom=ncf->molecule.get_atom(iatom);\n            const coord_3d vr1A=xyz-atom.get_coords();\n            const double r=vr1A.normf();\n            const double& Z=atom.q;\n            return ncf->Sr_div_S(r,Z)*ncf->smoothed_unitvec(vr1A)[axis];\n        }\n\n        std::vector<coord_3d> special_points() const {\n            std::vector< madness::Vector<double,3> > c(1);\n            const Atom& atom=ncf->molecule.get_atom(iatom);\n            c[0][0]=atom.x;\n            c[0][1]=atom.y;\n            c[0][2]=atom.z;\n            return c;\n        }\n    };\n\n\n    /// functor for a local U1 dot U1 potential\n\n    /// \\f[\n    ///  U1\\dot U1 = \\frac{\\left(S^r_A S^r_B\\right)}{S_A S_B} n_A \\cdot n_B\n    /// \\f]\n    /// with positive sign!\n    class U1_dot_U1_functor : public FunctionFunctorInterface<double,3> {\n\n        const NuclearCorrelationFactor* ncf;\n\n    public:\n        U1_dot_U1_functor(const NuclearCorrelationFactor* ncf) : ncf(ncf) {}\n\n        double operator()(const coord_3d& xyz) const {\n\t\t\tstd::vector<double> Sr_div_S(ncf->molecule.natom());\n\t\t\tstd::vector<coord_3d> unitvec(ncf->molecule.natom());\n\t\t\tfor (size_t i=0; i<ncf->molecule.natom(); ++i) {\n\t\t\t\tconst Atom& atom=ncf->molecule.get_atom(i);\n\t\t\t\tconst coord_3d vr1A=xyz-atom.get_coords();\n\t\t\t\tconst double r=vr1A.normf();\n\t\t\t\tSr_div_S[i]=ncf->Sr_div_S(r,atom.q);\n\t\t\t\tunitvec[i]=ncf->smoothed_unitvec(vr1A);\n\t\t\t}\n\n\t\t\tdouble result=0.0;\n\t\t\tfor (size_t i=0; i<ncf->molecule.natom(); ++i) {\n\t\t\t\tfor (size_t j=0; j<ncf->molecule.natom(); ++j) {\n\t\t\t\t\tdouble tmp=Sr_div_S[i]*Sr_div_S[j];\n\t\t\t\t\tif (i!=j) tmp*=inner(unitvec[i],unitvec[j]);\n\t\t\t\t\tresult+=tmp;\n\t\t\t\t}\n\t\t\t}\n\n\n            return result;\n        }\n        std::vector<coord_3d> special_points() const {\n            return ncf->molecule.get_all_coords_vec();\n        }\n    };\n\n\n\tclass U2_functor : public FunctionFunctorInterface<double,3> {\n\t\tconst NuclearCorrelationFactor* ncf;\n\tpublic:\n\t\tU2_functor(const NuclearCorrelationFactor* ncf) : ncf(ncf) {}\n\t\tdouble operator()(const coord_3d& xyz) const {\n\t\t\tdouble result=0.0;\n\t\t\tfor (size_t i=0; i<ncf->molecule.natom(); ++i) {\n\t\t\t\tconst Atom& atom=ncf->molecule.get_atom(i);\n\t\t\t\tconst coord_3d vr1A=xyz-atom.get_coords();\n\t\t\t\tconst double r=vr1A.normf();\n\t\t\t\tresult+=ncf->Spp_div_S(r,atom.q);\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\tstd::vector<coord_3d> special_points() const {\n\t\t\treturn ncf->molecule.get_all_coords_vec();\n\t\t}\n\t};\n\n\tclass U3_functor : public FunctionFunctorInterface<double,3> {\n\t\tconst NuclearCorrelationFactor* ncf;\n\tpublic:\n\t\tU3_functor(const NuclearCorrelationFactor* ncf) : ncf(ncf) {}\n\t\tdouble operator()(const coord_3d& xyz) const {\n\t\t\tstd::vector<coord_3d> all_terms(ncf->molecule.natom());\n\t\t\tfor (size_t i=0; i<ncf->molecule.natom(); ++i) {\n\t\t\t\tconst Atom& atom=ncf->molecule.get_atom(i);\n\t\t\t\tconst coord_3d vr1A=xyz-atom.get_coords();\n\t\t\t\tconst double r=vr1A.normf();\n//\t\t\t\tall_terms[i]=ncf->Sp(vr1A,atom.q)*(1.0/ncf->S(r,atom.q));\n\t\t\t\tall_terms[i]=ncf->Sr_div_S(r,atom.q)*ncf->smoothed_unitvec(vr1A);\n\t\t\t}\n\n\t\t\tdouble result=0.0;\n\t\t\tfor (size_t i=0; i<ncf->molecule.natom(); ++i) {\n\t\t\t\tfor (size_t j=0; j<i; ++j) {\n\t\t\t\t\tresult+=all_terms[i][0]*all_terms[j][0]\n\t\t\t\t\t       +all_terms[i][1]*all_terms[j][1]\n\t\t\t\t\t       +all_terms[i][2]*all_terms[j][2];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn -1.0*result;\n\t\t}\n\t\tstd::vector<coord_3d> special_points() const {\n\t\t\treturn ncf->molecule.get_all_coords_vec();\n\t\t}\n\t};\n\n    /// U2 functor for a specific atom\n    class U2_atomic_functor : public FunctionFunctorInterface<double,3> {\n\n        const NuclearCorrelationFactor* ncf;\n        const size_t iatom;\n\n    public:\n        U2_atomic_functor(const NuclearCorrelationFactor* ncf, const size_t atom)\n            : ncf(ncf), iatom(atom) {}\n\n        double operator()(const coord_3d& xyz) const {\n            const Atom& atom=ncf->molecule.get_atom(iatom);\n            const coord_3d vr1A=xyz-atom.get_coords();\n            const double r=vr1A.normf();\n            return ncf->Spp_div_S(r,atom.q);\n        }\n\n        std::vector<coord_3d> special_points() const {\n            std::vector< madness::Vector<double,3> > c(1);\n            const Atom& atom=ncf->molecule.get_atom(iatom);\n            c[0][0]=atom.x;\n            c[0][1]=atom.y;\n            c[0][2]=atom.z;\n            return c;\n        }\n    };\n\n    /// U3 functor for a specific atom\n    class U3_atomic_functor : public FunctionFunctorInterface<double,3> {\n\n        const NuclearCorrelationFactor* ncf;\n        const size_t iatom;\n\n    public:\n        U3_atomic_functor(const NuclearCorrelationFactor* ncf, const int atom)\n            : ncf(ncf), iatom(atom) {}\n\n        double operator()(const coord_3d& xyz) const {\n            const Atom& atomA=ncf->molecule.get_atom(iatom);\n            const coord_3d vr1A=xyz-atomA.get_coords();\n            const double rA=vr1A.normf();\n            const coord_3d nA=ncf->smoothed_unitvec(vr1A);\n            double Sr_div_SA=ncf->Sr_div_S(rA,atomA.q);\n\n            double result=0.0;\n            // sum over B\n            for (size_t i=0; i<ncf->molecule.natom(); ++i) {\n                if (i==iatom) continue; // restricted sum\n\n                const Atom& atomB=ncf->molecule.get_atom(i);\n                const coord_3d vr1B=xyz-atomB.get_coords();\n                const double rB=vr1B.normf();\n                const coord_3d nB=ncf->smoothed_unitvec(vr1B);\n                double Sr_div_SB=ncf->Sr_div_S(rB,atomB.q);\n\n                double dot=nA[0]*nB[0] + nA[1]*nB[1] + nA[2]*nB[2];\n                result+=Sr_div_SB*Sr_div_SA*dot;\n            }\n            return -0.5*result;\n        }\n\n        std::vector<coord_3d> special_points() const {\n            std::vector< madness::Vector<double,3> > c(1);\n            const Atom& atom=ncf->molecule.get_atom(iatom);\n            c[0][0]=atom.x;\n            c[0][1]=atom.y;\n            c[0][2]=atom.z;\n            return c;\n        }\n    };\n\n    class square_times_V_functor : public FunctionFunctorInterface<double,3> {\n        const NuclearCorrelationFactor* ncf;\n        const Molecule& molecule;\n        const size_t iatom;\n    public:\n        square_times_V_functor(const NuclearCorrelationFactor* ncf,\n                const Molecule& mol, const size_t iatom1)\n            : ncf(ncf), molecule(mol), iatom(iatom1) {}\n        double operator()(const coord_3d& xyz) const {\n            double result=1.0;\n            for (size_t i=0; i<ncf->molecule.natom(); ++i) {\n                const Atom& atom=ncf->molecule.get_atom(i);\n                const coord_3d vr1A=xyz-atom.get_coords();\n                const double r=vr1A.normf();\n                result*=ncf->S(r,atom.q);\n            }\n            const double V=-molecule.atomic_attraction_potential(\n                                iatom, xyz[0], xyz[1], xyz[2]);\n            return result*result*V;\n\n        }\n        std::vector<coord_3d> special_points() const {\n            return ncf->molecule.get_all_coords_vec();\n        }\n    };\n\n\n    class square_times_V_derivative_functor : public FunctionFunctorInterface<double,3> {\n        const NuclearCorrelationFactor* ncf;\n        const Molecule& molecule;\n        const size_t iatom;\n        const int axis;\n    public:\n        square_times_V_derivative_functor(const NuclearCorrelationFactor* ncf,\n                const Molecule& molecule1, const size_t atom1, const int axis1)\n            : ncf(ncf), molecule(molecule1), iatom(atom1), axis(axis1) {}\n        double operator()(const coord_3d& xyz) const {\n            double result=1.0;\n            for (size_t i=0; i<ncf->molecule.natom(); ++i) {\n                const Atom& atom=ncf->molecule.get_atom(i);\n                const coord_3d vr1A=xyz-atom.get_coords();\n                const double r=vr1A.normf();\n                result*=ncf->S(r,atom.q);\n            }\n            const double Vprime=molecule.nuclear_attraction_potential_derivative(\n                    iatom, axis, xyz[0], xyz[1], xyz[2]);\n            return result*result*Vprime;\n\n        }\n        std::vector<coord_3d> special_points() const {\n            return ncf->molecule.get_all_coords_vec();\n        }\n    };\n\n    /// compute the derivative of R wrt the displacement of atom A, coord axis\n    class RX_functor : public FunctionFunctorInterface<double,3> {\n        const NuclearCorrelationFactor* ncf;\n        const Atom& thisatom;\n        const int derivativeaxis;   /// direction of the derivative operator\n        const int exponent;         /// 1 or 2 -> R^X or R^X R\n\n    public:\n        RX_functor(const NuclearCorrelationFactor* ncf, const Atom& atom1,\n                const int daxis, const int exponent) : ncf(ncf), thisatom(atom1),\n                derivativeaxis(daxis), exponent(exponent) {\n            MADNESS_ASSERT((exponent==1) or (exponent==2) or (exponent==-1));\n        }\n\n        RX_functor(const NuclearCorrelationFactor* ncf, const int iatom,\n                const int daxis, const int exponent) : ncf(ncf),\n                thisatom(ncf->molecule.get_atom(iatom)),\n                derivativeaxis(daxis), exponent(exponent) {\n            MADNESS_ASSERT((exponent==1) or (exponent==2) or (exponent==-1));\n        }\n\n        double operator()(const coord_3d& xyz) const {\n\n            // compute the R term\n            double result=1.0;\n            if ((exponent==1) or (exponent==2)) {\n                for (size_t i=0; i<ncf->molecule.natom(); ++i) {\n                    const Atom& atom=ncf->molecule.get_atom(i);\n                    const coord_3d vr1A=xyz-atom.get_coords();\n                    const double r=vr1A.normf();\n                    result*=ncf->S(r,atom.q);\n                }\n                if (exponent==2) result=result*result;\n            }\n\n            // compute the derivative term\n            {\n                const coord_3d vr1A=xyz-thisatom.get_coords();\n                const double r=vr1A.normf();\n                const double& Z=thisatom.q;\n                const double S1=-ncf->Sr_div_S(r,Z) // note the sign\n                        *ncf->smoothed_unitvec(vr1A)[derivativeaxis];\n                result*=S1;\n            }\n            return result;\n        }\n\n        std::vector<coord_3d> special_points() const {\n            return ncf->molecule.get_all_coords_vec();\n        }\n\n    };\n\n\n    /// compute the derivative of U1 wrt the displacement of atom A, coord axis\n    class U1X_functor : public FunctionFunctorInterface<double,3> {\n        const NuclearCorrelationFactor* ncf;\n        const Atom& thisatom;\n        const int U1axis;           /// U1x/U1y/U1z potential?\n        const int derivativeaxis;   /// direction of the derivative operator\n    public:\n        U1X_functor(const NuclearCorrelationFactor* ncf, const Atom& atom1,\n                const int U1axis, const int daxis) : ncf(ncf), thisatom(atom1),\n                U1axis(U1axis), derivativeaxis(daxis) {\n            double lo=1.0/thisatom.q;\n            set_length_scale(lo);\n        }\n\n        U1X_functor(const NuclearCorrelationFactor* ncf, const int iatom,\n                const int U1axis, const int daxis) : ncf(ncf),\n                thisatom(ncf->molecule.get_atom(iatom)),\n                U1axis(U1axis), derivativeaxis(daxis) {\n            double lo=1.0/thisatom.q;\n            set_length_scale(lo);\n        }\n\n        double operator()(const coord_3d& xyz) const {\n            const coord_3d vr1A=xyz-thisatom.get_coords();\n            const double r=vr1A.normf();\n            const double& Z=thisatom.q;\n            const double S1=ncf->Sr_div_S(r,Z);\n            const double S2=ncf->Srr_div_S(r,Z);\n\n            // note the sign change smoothed_unitvec due to the\n            // change in the derivative variable x: electronic -> nuclear\n            const double drhodx=-ncf->smoothed_unitvec(vr1A)[derivativeaxis];\n            return drhodx*(S2-S1*S1)*ncf->smoothed_unitvec(vr1A)[U1axis]\n                      -S1*(ncf->dsmoothed_unitvec(vr1A,derivativeaxis)[U1axis]);\n        }\n\n        std::vector<coord_3d> special_points() const {\n            std::vector< madness::Vector<double,3> > c(1);\n            c[0][0]=thisatom.x;\n            c[0][1]=thisatom.y;\n            c[0][2]=thisatom.z;\n            return c;\n        }\n\n    };\n\n\n    /// compute the derivative of U2 wrt the displacement of atom A\n    class U2X_functor : public FunctionFunctorInterface<double,3> {\n        const NuclearCorrelationFactor* ncf;\n        const int iatom;\n        const int axis;\n    public:\n        U2X_functor(const NuclearCorrelationFactor* ncf, const int& atom1,\n                const int axis) : ncf(ncf), iatom(atom1), axis(axis) {\n            const Atom& atom=ncf->molecule.get_atom(iatom);\n            double lo=1.0/atom.q;\n            set_length_scale(lo);\n        }\n\n        double operator()(const coord_3d& xyz) const {\n            const Atom& atom=ncf->molecule.get_atom(iatom);\n            const coord_3d vr1A=xyz-atom.get_coords();\n            const double r=vr1A.normf();\n            const double& Z=atom.q;\n            const double rcut=ncf->molecule.get_rcut()[iatom];\n\n            // note the sign change due to the change in the derivative\n            // variable x: electronic -> nuclear in drho/dx\n            const double drhodx=-ncf->smoothed_unitvec(vr1A)[axis];\n            return drhodx*ncf->U2X_spherical(r,Z,rcut);\n        }\n\n        std::vector<coord_3d> special_points() const {\n            std::vector< madness::Vector<double,3> > c(1);\n            const Atom& atom=ncf->molecule.get_atom(iatom);\n            c[0][0]=atom.x;\n            c[0][1]=atom.y;\n            c[0][2]=atom.z;\n            return c;\n        }\n    };\n\n\n    /// compute the derivative of U3 wrt the displacement of atom A, coord axis\n\n    /// \\f[\n    /// U_3^{X_A} = -\\sum_{B\\neq A}\\left(\\frac{\\vec S_A'}{S_A}\\right)^X\\cdot\\left(\\frac{\\vec S_B'}{S_B}\\right)\n    /// \\f]\n    /// with\n    /// \\f[\n    /// \\left(\\frac{\\vec S_A'}{S_A}\\right)^X =\n    ///     \\frac{\\partial \\rho}{\\partial X}\\left(\\frac{S''_A}{S_A}\n    ///          -\\left(\\frac{S'_A}{S_A}\\right)^2\\right)\\vec n_{1A}\n    ///     + \\left(\\frac{S'_A}{S_A}\\right)\\frac{\\partial \\vec n_{1A}}{\\partial X}\n    /// \\f]\n    class U3X_functor : public FunctionFunctorInterface<double,3> {\n        const NuclearCorrelationFactor* ncf;\n        const size_t iatom;\n        const int axis;\n    public:\n        U3X_functor(const NuclearCorrelationFactor* ncf, const size_t iatom,\n                const int axis) : ncf(ncf), iatom(iatom), axis(axis) {}\n\n        double operator()(const coord_3d& xyz) const {\n            const Atom& atomA=ncf->molecule.get_atom(iatom);\n            const coord_3d vr1A=xyz-atomA.get_coords();\n            const double r1A=vr1A.normf();\n            const double& ZA=atomA.q;\n\n            double S1A=ncf->Sr_div_S(r1A,ZA);\n            double S2A=ncf->Srr_div_S(r1A,ZA);\n            double termA=S2A-S1A*S1A;\n\n            // unit vector \\vec n_A = \\vec r_{1A}/r_{1A}\n            const coord_3d nA=ncf->smoothed_unitvec(vr1A);\n            // derivative of the unit vector \\frac{\\partial \\vec n_A}{\\partial X}\n            const coord_3d dnA=ncf->dsmoothed_unitvec(vr1A,axis)*(-1.0);\n            // \\frac{\\partial \\rho}{\\partial X}\n            const double drhodx=-nA[axis];\n\n            double term=0.0;\n            for (size_t jatom=0; jatom<ncf->molecule.natom(); ++jatom) {\n                if (iatom==jatom) continue; // restricted sum B \\neq A\n\n                const Atom& atomB=ncf->molecule.get_atom(jatom);\n                const coord_3d vr1B=xyz-atomB.get_coords();\n                const double r1B=vr1B.normf();\n                const double& ZB=atomB.q;\n\n                double S1B=ncf->Sr_div_S(r1B,ZB);\n                const coord_3d nB=ncf->smoothed_unitvec(vr1B);\n\n                double dot=0.0;     // n_A.n_B\n                double ddot=0.0;    // n'_A.n_B\n                for (int i=0; i<3; ++i) {\n                    ddot+=dnA[i]*nB[i];\n                    dot+=nA[i]*nB[i];\n                }\n                term+=(+drhodx*termA*S1B*dot + S1A*S1B*ddot);\n\n            }\n\n            return term;\n        }\n\n        std::vector<coord_3d> special_points() const {\n            return ncf->molecule.get_all_coords_vec();\n        }\n    };\n\n};\n\n\n/// A nuclear correlation factor class\n\n/// The nuclear correlation factor is given by\n/// \\[f\n/// \tR = \\prod S_A\t; S_A=exp(-Z_A r_{1A}) + ( 1 - exp(-r_{1A}^2) )\n/// \\]f\nclass GaussSlater : public NuclearCorrelationFactor {\npublic:\n\t/// ctor\n\n\t/// @param[in]\tworld\tthe world\n\t/// @param[in]\tmol molecule with the sites of the nuclei\n\tGaussSlater(World& world, const Molecule& mol)\n\t\t: NuclearCorrelationFactor(world,mol) {\n\n\t\tif (world.rank()==0) {\n\t\t\tprint(\"constructed nuclear correlation factor of the form\");\n\t\t\tprint(\"  R   = Prod_A S_A\");\n\t\t\tprint(\"  S_A = exp(-Z_A r_{1A}) + (1 - exp(-Z_A^2*r_{1A}^2))\");\n\t\t\tprint(\"with eprec \",mol.get_eprec());\n\t\t\tprint(\"which is of Gaussian-Slater type\\n\");\n\t\t}\n\n\t}\n\n\tcorrfactype type() const {return NuclearCorrelationFactor::GaussSlater;}\n\nprivate:\n\n\t/// the nuclear correlation factor\n\tdouble S(const double& r, const double& Z) const {\n\t\tconst double rho=r*Z;\n\t\treturn exp(-rho)+(1.0-exp(-(rho*rho)));\n\t}\n\n\t/// radial part first derivative of the nuclear correlation factor\n\tcoord_3d Sp(const coord_3d& vr1A, const double& Z) const {\n\n\t\tconst double r=sqrt(vr1A[0]*vr1A[0] +\n\t\t\t\tvr1A[1]*vr1A[1] + vr1A[2]*vr1A[2]);\n\n\t\tconst double eA=exp(-Z*r);\n\t\tconst double gA=exp(-Z*Z*r*r);\n\t\tcoord_3d term=(2.0*gA*Z*Z*vr1A-Z*eA*smoothed_unitvec(vr1A));\n\t\treturn term;\n\t}\n\n\t/// second derivative of the nuclear correlation factor\n\n\t/// -1/2 S\"/S - Z/r\n\tdouble Spp_div_S(const double& r, const double& Z) const {\n\t\tconst double rho=Z*r;\n    \tif (rho<1.e-4) {\n    \t\treturn Z*Z*(-3.5 - 4.0*rho + 6.0*rho*rho + 12.0*rho*rho*rho);\n    \t} else {\n\t\t\tconst double e=exp(-rho);\n\t\t\tconst double g=exp(-rho*rho);\n\t\t\tconst double term1=-Z/r*(1.0-g);\n\t\t\tconst double term2=-g*Z*Z*(3.0-2.0*Z*Z*r*r) - Z*Z/2.0*e;\n\t\t\tconst double S_inv=exp(-rho)+(1.0-exp(-(rho*rho)));\n\t\t\treturn (term1+term2)/S_inv;\n    \t}\n\t}\n\n    double Sr_div_S(const double& r, const double& Z) const {\n        const double Zr=r*Z;\n        const double eA=exp(-Zr);\n        const double gA=exp(-Zr*Zr);\n        const double num=Z*(2.0*Zr*gA-eA);\n        const double denom=1.0+eA-gA;\n        return num/denom;\n    }\n\n    double Srr_div_S(const double& r, const double& Z) const {\n        const double Zr=r*Z;\n        const double eA=exp(-Zr);\n        const double gA=exp(-Zr*Zr);\n        const double num=Z*Z*(eA+gA*(2.0-4.0*Zr*Zr));\n        const double denom=1.0+eA-gA;\n        return num/denom;\n    }\n\n    double Srrr_div_S(const double& r, const double& Z) const {\n        const double Zr=r*Z;\n        const double eA=exp(-Zr);\n        const double gA=exp(-Zr*Zr);\n        const double num=Z*Z*Z*(-eA - 12.0*gA*Zr + 8.0*gA*Zr*Zr*Zr);\n        const double denom=1.0+eA-gA;\n        return num/denom;\n\n    }\n\n    /// derivative of the U2 potential wrt X (scalar part)\n\n    /// with\n    /// \\f[\n    ///   \\rho = \\left| \\vec r- \\vec R_A \\right|\n    /// \\f]\n    /// returns the term in the parenthesis without the the derivative of rho\n    /// \\f[\n    /// \\frac{\\partial U_2}{\\partial X_A} = \\frac{\\partial \\rho}{\\partial X}\n    ///           \\left(-\\frac{1}{2}\\frac{S''' S - S'' S'}{S^2} + \\frac{1}{\\rho^2}\\frac{S'}{S}\n    ///           - \\frac{1}{\\rho} \\frac{S''S - S'^2}{S^2} + \\frac{Z_A}{\\rho^2}\\right)\n    /// \\f]\n    double U2X_spherical(const double& r, const double& Z, const double& rcut) const {\n\n        double result=0.0;\n        if (r*Z<1.e-4) {\n            const double ZZ=Z*Z;\n            const double ZZZ=ZZ*Z;\n            const double Z4=ZZ*ZZ;\n            const double r0=-4.0*ZZZ;\n            const double r1=12.0*Z4;\n            const double r2=36*Z4*Z;\n            const double r3=-67.0/6.0*Z4*ZZ;\n            result=(r0 + r*r1 + r*r*r2 + r*r*r*r3);\n\n        } else {\n            const double S1=Sr_div_S(r,Z);\n            const double S2=Srr_div_S(r,Z);\n            const double S3=Srrr_div_S(r,Z);\n            const double term1=-0.5*(S3-S1*S2);\n            const double term2=(S1+Z)/(r*r);\n            const double term3=(S2-S1*S1)/r;\n            result=term1+term2-term3;\n        }\n        return result;\n    }\n\n\n};\n\n/// A nuclear correlation factor class\n\n/// The nuclear correlation factor is given by\n/// \\[f\n///     R = \\prod S_A   ; S_A=exp(-Z_A r_{1A}) + ( 1 - exp(-r_{1A}^2) )\n/// \\]f\nclass GradientalGaussSlater : public NuclearCorrelationFactor {\npublic:\n    /// ctor\n\n    /// @param[in]  world   the world\n    /// @param[in]  mol molecule with the sites of the nuclei\n    GradientalGaussSlater(World& world, const Molecule& mol, const double a)\n        : NuclearCorrelationFactor(world,mol), a(a) {\n\n        if (world.rank()==0) {\n            print(\"constructed nuclear correlation factor of the form\");\n            print(\"  R   = Prod_A S_A\");\n            print(\"  S_A = 1/sqrt{Z} exp(-Z_A r_{1A}) + (1 - exp(-a^2*Z_A^2*r_{1A}^2))\");\n            print(\"  a   = \",a);\n            print(\"with eprec \",mol.get_eprec());\n            print(\"which is of Gradiental Gaussian-Slater type\\n\");\n        }\n\n    }\n\n    corrfactype type() const {return NuclearCorrelationFactor::GradientalGaussSlater;}\n\nprivate:\n\n    const double a;\n\n    /// the nuclear correlation factor\n    double S(const double& r, const double& Z) const {\n        const double rho=r*Z;\n        return 1/sqrt(Z) * exp(-rho)+(1.0-exp(-(a*a*rho*rho)));\n    }\n\n    /// radial part first derivative of the nuclear correlation factor\n    coord_3d Sp(const coord_3d& vr1A, const double& Z) const {\n\n        const double r=sqrt(vr1A[0]*vr1A[0] +\n                vr1A[1]*vr1A[1] + vr1A[2]*vr1A[2]);\n\n        const double rho=Z*r;\n        const double sqrtz=sqrt(Z);\n        const double term=-exp(-rho)*sqrtz + 2.0*a*a*exp(-a*a*rho*rho)*Z*rho;\n        return term*smoothed_unitvec(vr1A);\n    }\n\n    /// second derivative of the nuclear correlation factor\n\n    /// -1/2 S\"/S - Z/r\n    double Spp_div_S(const double& r, const double& Z) const {\n        const double rho=Z*r;\n        const double sqrtz=sqrt(Z);\n        if (rho<1.e-4) {\n            const double zfivehalf=Z*Z*sqrtz;\n            const double a2=a*a;\n            const double a4=a2*a2;\n            return  -0.5*Z*Z\n                    - 3. *a2 * zfivehalf\n                    - 4.* a2 *rho* zfivehalf\n                    - 2. *a2 * rho*rho*zfivehalf\n                    + 5. *a4 *rho*rho*zfivehalf\n                    + 3. *a4 *rho*rho*Z*Z*Z\n                    -0.5 *a2 *rho*rho*rho*zfivehalf\n                    +5.5 *a4 *rho*rho*rho*zfivehalf\n                    +7.  *a4 *rho*rho*rho*Z*Z*Z;\n        } else {\n            const double e=exp(-rho);\n            const double g=exp(-a*a*rho*rho);\n            const double poly=(2.0-6.0*a*a*rho + 4.0*a*a*a*a*rho*rho*rho);\n            const double num=Z*(-2.0 - e*r*sqrtz + g*poly);\n            const double denom=2.0*r*(1.0-g+e/sqrtz);\n            return num/denom;\n        }\n    }\n\n    double Sr_div_S(const double& r, const double& Z) const {\n        const double rZ=r*Z;\n        const double e=exp(-rZ);\n        const double g=exp(-a*a*rZ*rZ);\n        const double sqrtz=sqrt(Z);\n        const double num=-sqrtz*e + 2.0*a*a*g*Z*rZ;\n        const double denom=1.0-g+e/sqrtz;\n        return num/denom;\n    }\n\n    double Srr_div_S(const double& r, const double& Z) const {\n        const double rZ=r*Z;\n        const double e=exp(-rZ);\n        const double g=exp(-a*a*rZ*rZ);\n        const double sqrtz=sqrt(Z);\n        const double num=e*Z*sqrtz + g*(2.0*a*a - 4.0*power<4>(a)*rZ*rZ)*Z*Z;\n        const double denom=1.0-g+e/sqrtz;\n        return num/denom;\n    }\n\n    double Srrr_div_S(const double& r, const double& Z) const {\n        const double rZ=r*Z;\n        const double e=exp(-rZ);\n        const double g=exp(-a*a*rZ*rZ);\n        const double sqrtz=sqrt(Z);\n        const double num=e*power<3>(Z) + (12.0*power<4>(a)*g*rZ\n                -8.0*power<6>(a)*g*power<3>(rZ))*sqrtz*power<3>(Z);\n        const double denom=e+sqrtz-g*sqrtz;\n        return -num/denom;\n    }\n\n    double U2X_spherical(const double& r, const double& Z, const double& rcut) const {\n\n        double result=0.0;\n        if (r*Z<1.e-4) {\n            const double sqrtz=sqrt(Z);\n            const double Z2=Z*Z;\n            const double Z4=Z2*Z2;\n            const double Z5=Z4*Z;\n            const double Z6=Z5*Z;\n            const double Z7=Z6*Z;\n            const double a2=a*a;\n            const double a4=a2*a2;\n\n            const double r0=-4.* a2* sqrt(Z7);\n            const double r1=2.* (-2.* a2* Z*sqrt(Z7)+ 5.* a4* Z*sqrt(Z7) + 3.* a4 *Z5) *r;\n            const double r2=1.5 * (-a2* sqrtz*Z5 + 11.* a4* sqrtz*Z5 + 14.*a4* Z6)* r*r;\n            const double r3=1./6.* (-a2* sqrtz*Z6 + 66.* a4*sqrtz*Z6 - 84.* a2*a4* sqrtz*Z6 +\n                    180. *a4* Z7 - 156.*a2*a4* Z7 - 72.* a2*a4*sqrtz*Z7) *r*r*r;\n            result=(r0 + r1 + r2 + r3);\n\n        } else {\n            const double S1=Sr_div_S(r,Z);\n            const double S2=Srr_div_S(r,Z);\n            const double S3=Srrr_div_S(r,Z);\n            const double term1=-0.5*(S3-S1*S2);\n            const double term2=(S1+Z)/(r*r);\n            const double term3=(S2-S1*S1)/r;\n            result=term1+term2-term3;\n        }\n        return result;\n    }\n};\n\n\n/// A nuclear correlation factor class\n\n/// The nuclear correlation factor is given by\n/// \\[f\n/// \tR = \\prod S_A\t; S_A= -Z_A r_{1A} exp(-Z_A r_{1A}) + 1\n/// \\]f\nclass LinearSlater : public NuclearCorrelationFactor {\npublic:\n\t/// ctor\n\n\t/// @param[in]\tworld\tthe world\n\t/// @param[in]\tmol molecule with the sites of the nuclei\n\tLinearSlater(World& world, const Molecule& mol, const double a)\n\t\t: NuclearCorrelationFactor(world,mol), a_(1.0) {\n\n\t\tif (a!=0.0) a_=a;\n\n\t\tif (world.rank()==0) {\n\t\t\tprint(\"constructed nuclear correlation factor of the form\");\n\t\t\tprint(\"  S_A = -Z_A r_{1A} exp(-Z_A r_{1A}) + 1\");\n\t\t\tprint(\"    a = \",a_);\n            print(\"with eprec \",mol.get_eprec());\n\t\t\tprint(\"which is of linear Slater type\\n\");\n\t\t}\n\t}\n\n\tcorrfactype type() const {return NuclearCorrelationFactor::LinearSlater;}\n\nprivate:\n\n\t/// the length scale parameter a\n\tdouble a_;\n\n\tdouble a_param() const {return 1.0;}\n\n\t/// the nuclear correlation factor\n\tdouble S(const double& r, const double& Z) const {\n\t\tconst double rho=r*Z;\n\t\tconst double b=a_param();\n\t\treturn (-rho)*exp(-b*rho)+1.0;\n\t}\n\n\t/// radial part first derivative of the nuclear correlation factor\n\tcoord_3d Sp(const coord_3d& vr1A, const double& Z) const {\n\n\t\tconst double b=a_param();\n\t\tconst double r=sqrt(vr1A[0]*vr1A[0] +\n\t\t\t\tvr1A[1]*vr1A[1] + vr1A[2]*vr1A[2]);\n\n\t\tconst double ebrz=exp(-b*r*Z);\n\t\tconst coord_3d term=Z*ebrz*(b*Z*(vr1A) - smoothed_unitvec(vr1A));\n\t\treturn term;\n\t}\n\n\t/// second derivative of the nuclear correlation factor\n\n\t/// -1/2 S\"/S - Z/r\n\tdouble Spp_div_S(const double& r, const double& Z) const {\n\n\t\tconst double b=a_param();\n\t\tconst double rho=Z*r;\n    \tif (rho<1.e-4) {\n    \t\tconst double O0=1.0- 3.0* b;\n    \t\tconst double O1=Z - 4.0*b*Z + 3.0*b*b*Z;\n    \t\tconst double O2=Z*Z - 5.0*b*Z*Z + 6.5*b*b*Z*Z - 5.0/3.0*b*b*b*Z*Z;\n    \t\treturn Z*Z*(O0 + O1*r + O2*r*r);\n\n    \t} else {\n\t\t\tconst double ebrz=exp(-b*rho);\n\t\t\tconst double num=Z* (ebrz - 1.0 + 0.5*ebrz*rho* (2.0 + b*(b*rho-4.0)));\n\t\t\tconst double denom=r*(rho*ebrz-1.0);\n\t\t\treturn -num/denom;\n    \t}\n\t}\n\n\tdouble Sr_div_S(const double& r, const double& Z) const {\n\t    const double& a=a_param();\n\t    const double earz=exp(-a*r*Z);\n\t    return Z*earz*(a*r*Z-1.0)/(1.0-r*Z*earz);\n\t}\n\n    double Srr_div_S(const double& r, const double& Z) const {\n        const double& a=a_param();\n        const double earz=exp(-a*r*Z);\n        return a*Z*Z*earz*(a*r*Z-2.0)/(-1.0+r*Z*earz);\n    }\n\n    double Srrr_div_S(const double& r, const double& Z) const {\n        const double& a=a_param();\n        const double earz=exp(-a*r*Z);\n        return a*a*Z*Z*Z*earz*(a*r*Z-3.0)/(1.0-r*Z*earz);\n    }\n\n};\n\n\n/// A nuclear correlation factor class\nclass Slater : public NuclearCorrelationFactor {\npublic:\n\t/// ctor\n\n\t/// @param[in]\tworld\tthe world\n\t/// @param[in]\tmol molecule with the sites of the nuclei\n\tSlater(World& world, const Molecule& mol, const double a)\n\t\t: NuclearCorrelationFactor(world,mol), a_(1.5) {\n\n\t\tif (a!=0.0) a_=a;\n\t\teprec_=mol.get_eprec();\n\n\t\tif (world.rank()==0) {\n\t\t\tprint(\"\\nconstructed nuclear correlation factor of the form\");\n\t\t\tprint(\"  S_A = 1/(a-1) exp(-a Z_A r_{1A}) + 1\");\n\t\t\tprint(\"    a = \",a_);\n            print(\"with eprec \",eprec_);\n\t\t\tprint(\"which is of Slater type\\n\");\n\t\t}\n\t}\n\n\tcorrfactype type() const {return NuclearCorrelationFactor::Slater;}\n\nprivate:\n\n\t/// the length scale parameter\n\tdouble a_;\n\tdouble eprec_;\n\n\tdouble a_param() const {return a_;}\n    double eprec_param() const {return eprec_;}\n\n\t/// first derivative of the correlation factor wrt (r-R_A)\n\n\t/// \\f[\n\t///     Sr_div_S = \\frac{1}{S(r)}\\frac{\\partial S(r)}{\\partial r}\n\t/// \\f]\n\tdouble Sr_div_S(const double& r, const double& Z) const {\n\t    const double& a=a_param();\n\t    return -a*Z/(1.0+(a-1.0)*exp(a*r*Z));\n\t}\n\n    /// second derivative of the correlation factor wrt (r-R_A)\n\n    /// \\f[\n    ///     result = \\frac{1}{S(r)}\\frac{\\partial^2 S(r)}{\\partial r^2}\n    /// \\f]\n    double Srr_div_S(const double& r, const double& Z) const {\n        const double& a=a_param();\n        const double aZ=a*Z;\n        return aZ*aZ/(1.0+(a-1.0)*exp(r*aZ));\n    }\n\n    /// third derivative of the correlation factor wrt (r-R_A)\n\n    /// \\f[\n    ///    result = \\frac{1}{S(r)}\\frac{\\partial^3 S(r)}{\\partial r^3}\n    /// \\f]\n    double Srrr_div_S(const double& r, const double& Z) const {\n        const double& a=a_param();\n        const double aZ=a*Z;\n        return -aZ*aZ*aZ/(1.0+(a-1.0)*exp(r*aZ));\n    }\n\n    /// the nuclear correlation factor\n    double S(const double& r, const double& Z) const {\n    \tconst double a=a_param();\n    \t//const double eprec=eprec_param();\n    \treturn 1.0+1.0/(a-1.0) * exp(-a*Z*r);\n\n//    \treturn 1.0 + 0.5/(a-1.0) *\n//    \t        (exp(-a*r*Z + 0.5*a*a*Z*Z*eprec) * erfc((-r+a*eprec*Z)/sqrt(2*eprec))\n//    \t         + exp(-a*r*Z + 0.5*a*Z*(4.0*r+a*eprec*Z)) * erfc((r+a*eprec*Z)/sqrt(2*eprec)));\n    }\n\n    /// radial part first derivative of the nuclear correlation factor\n    coord_3d Sp(const coord_3d& vr1A, const double& Z) const {\n    \tconst double a=a_param();\n\t\tconst double r=vr1A.normf();\n    \treturn -(a*exp(-a*Z*r)*Z)/(a-1.0)*smoothed_unitvec(vr1A);\n    }\n\n    /// second derivative of the nuclear correlation factor\n    double Spp_div_S(const double& r, const double& Z) const {\n    \tconst double a=a_param();\n\n    \tif (r*Z<1.e-4) {\n    \t\tconst double O0=1.0-(1.5*a);\n    \t\tconst double O1=(a-1.0)*(a-1.0)*Z;\n    \t\tconst double O2=(1.0/12.0 * (a-1.0)*(12.0+a*(5*a-18.0)))*Z*Z;\n    \t\treturn Z*Z*(O0 + O1*r + O2*r*r);\n\n    \t} else {\n    \t\tconst double earz=exp(-a*r*Z);\n    \t\tconst double num=Z*(-earz + a*earz - (a-1.0) - 0.5*a*a*r*Z*earz);\n    \t\tconst double denom=(r*earz + (a-1.0) * r);\n    \t\treturn num/denom;\n    \t}\n    }\n\n\n    /// derivative of the U2 potential wrt X (scalar part)\n\n    /// with\n    /// \\f[\n    ///   \\rho = \\left| \\vec r- \\vec R_A \\right|\n    /// \\f]\n    /// returns the term in the parenthesis without the the derivative of rho\n    /// \\f[\n    /// \\frac{\\partial U_2}{\\partial X_A} = \\frac{\\partial \\rho}{\\partial X}\n    ///           \\left(-\\frac{1}{2}\\frac{S''' S - S'' S'}{S^2} + \\frac{1}{\\rho^2}\\frac{S'}{S}\n    ///           - \\frac{1}{\\rho} \\frac{S''S - S'^2}{S^2} + \\frac{Z_A}{\\rho^2}\\right)\n    /// \\f]\n    double U2X_spherical(const double& r, const double& Z, const double& rcut) const {\n        const double a=a_param();\n\n        double result=0.0;\n        if (r*Z<1.e-4) {\n            const double ZZ=Z*Z;\n            const double ZZZ=ZZ*Z;\n            const double a2=a*a;\n            const double a4=a2*a2;\n            const double r0=ZZZ*(1. - 2.* a + a2);\n            const double r1=ZZ*ZZ/6.* (12.0 - 30.* a + 23. *a2 - 5.*a*a2);\n            const double r2=1./8.*ZZ*ZZZ* (24. - 72.*a + 74.*a2 - 29.*a2*a + 3.*a4);\n            const double r3=1./60.*ZZZ*ZZZ* (240. - 840.*a + 1080.*a2 - 610.*a2*a\n                    + 137.*a2*a2 - 7.*a4*a);\n            result=(r0 + r*r1 + r*r*r2 + r*r*r*r3);\n\n        } else {\n            const double S1=Sr_div_S(r,Z);\n            const double S2=Srr_div_S(r,Z);\n            const double S3=Srrr_div_S(r,Z);\n            const double term1=-0.5*(S3-S1*S2);\n            const double term2=(S1+Z)/(r*r);\n            const double term3=(S2-S1*S1)/r;\n            result=term1+term2-term3;\n        }\n        return result;\n    }\n\n};\n\n\nclass poly4erfc : public NuclearCorrelationFactor {\npublic:\n    /// ctor\n\n    /// @param[in]  world   the world\n    /// @param[in]  mol molecule with the sites of the nuclei\n    poly4erfc(World& world, const Molecule& mol, const double aa)\n        : NuclearCorrelationFactor(world,mol), a(1.0) {\n\n        if (aa!=0.0) a=aa;\n        eprec_=mol.get_eprec();\n\n        if (world.rank()==0) {\n            print(\"\\nconstructed nuclear correlation factor of the form\");\n            print(\"  S_A = 1 + (a0 + a1 arZ + a2 (arZ)^2 + a3 (arZ)^3 + a4 (arZ)^4) erfc(arZ)\");\n            print(\"    a = \",a);\n            print(\"with eprec \",eprec_);\n            print(\"which is of poly4erfc type\\n\");\n        }\n        //const double pi32=std::pow(constants::pi,1.5);\n        //const double sqrtpi=sqrt(constants::pi);\n        //const double Pi=constants::pi;\n\n        if (a==0.5) {\n            a0=0.5083397721116242769;\n            a1=-2.4430795355664112811;\n            a2=3.569312300653802680;\n            a3=-1.9812471972342746507;\n            a4=0.3641705622093696564;\n        } else if (a==1.0) {\n            a0=0.20265985404508529127;\n            a1=-0.9739826967339938056;\n            a2=1.4229779953809877198;\n            a3=-0.7898639647077711196;\n            a4=0.14518390461225107425;\n\n        } else {\n            print(\"invalid parameter a for poly4erfc: only 0.5 and 1.0 implemented\");\n            MADNESS_EXCEPTION(\"stupid you\",1);\n        }\n    }\n\n    corrfactype type() const {return NuclearCorrelationFactor::poly4erfc;}\n\nprivate:\n\n    /// the length scale parameter\n    double a;\n    double a0, a1, a2, a3, a4;\n    double eprec_;\n\n    double a_param() const {return a;}\n    double eprec_param() const {return eprec_;}\n\n    /// first derivative of the correlation factor wrt (r-R_A)\n\n    /// \\f[\n    ///     Sr_div_S = \\frac{1}{S(r)}\\frac{\\partial S(r)}{\\partial r}\n    /// \\f]\n    double Sr_div_S(const double& r, const double& Z) const {\n       const double x=r*Z;\n\n       double result=0.0;\n       if (a==0.5) {\n           if (x<1.0) {\n                result=(-17.97663543396820624361586474 + x*(32.78290319470982346841067868 +\n                        x*(-18.158574783628271659713638233 +\n                           x*(2.472138984374094343735335913 +\n                              x*(0.5516975358315341628276502285 +\n                                 x*(-0.008573693952875097234391220137 +\n                                    x*(-0.05596791202351071993748992739 +\n                                       (0.002673799219133696315436690424 +\n                                          0.0013386538660557369902632289083*x)*x)))))))/\n                   (17.976635433967702922140233083 + x*\n                      (-13.062204300852085089323266568 +\n                        x*(16.397871971437618641239835027 + x*(-5.383337491559214163188757918 + 1.*x))));\n            } else if (x<2.0) {\n                result=(-16.53370050883888159389958126 + x*(30.04151304875517461538549269 +\n                        x*(-16.692529697855029750948871179 +\n                           x*(2.50341008323651011875249567 +\n                              x*(0.3106921665634860719234742532 +\n                                 x*(0.08721948207311506458903445571 +\n                                    x*(-0.10041387133168708232852057948 +\n                                       (0.02000987266876476192949541524 - 0.0012508983745483161308604975792*x)*\n                                        x)))))))/\n                   (16.532205048243702951212522516 + x*\n                      (-11.89273747187279634240347945 +\n                        x*(15.157537549656745468895369276 + x*(-4.9102960292797655978798640519 + 1.*x))));\n            } else if (x<5.0) {\n                result=(-2352.191894900273554810118278 + x*(5782.846962269399174183661793 +\n                        x*(-5653.246084369776756298278851 +\n                           x*(2948.18046377483570925427449 +\n                              x*(-913.4583247839311453090142452 +\n                                 x*(174.39391722588915386106331206 +\n                                    x*(-20.22035127074332315930567933 +\n                                       (1.3107321165711966663791114988 - 0.03655666729452579098523876463*x)*x))\n                                 )))))/\n                   (886.4859678528423041797649741 + x*(269.17746130370931387996124706 +\n                        x*(-130.21383548057958115685397713 + x*(37.644499985765056273193347388 + 1.*x))));\n            } else if (x<10) {\n                result=(2.2759176275121988686860433041 + x*(-1.8014283464827425541637211503 +\n                        x*(0.60570955276433317373251991152 +\n                           x*(-0.11235368819003308411943926239 +\n                              x*(0.01243211635244600976892077538 +\n                                 x*(-0.0008211800260491381826149891865 +\n                                    x*(0.000029973534470203049782417744015 +\n                                       (-4.6423722605763162431293872646e-7 -\n                                          1.3224615425412157194986675329e-10*x)*x)))))))/\n                   (1039.800013929971888016478838 + x*(-702.5378531848183775210948787 +\n                        x*(183.17476380259879599459789974 + x*(-21.74106003575315304073197254 + 1.*x))));\n            } else {\n                result=0.0;\n            }\n       } else if (a==1.0) {\n           if (x<1.0) {\n               result=(-1.6046958001953006847027538457 + x*(5.948945186367159977879486279 +\n                       x*(-6.884321742840291285733040882 +\n                          x*(2.296896506418919905405783368 +\n                             x*(0.616939354810622973212914089 +\n                                x*(-0.13679830198890803519235207564 +\n                                   x*(-0.3356576872066501398893403439 +\n                                      (0.14876798925798674488426727928 - 0.016049886728185297028755535226*x)*x\n                                      )))))))/\n                  (1.6046957999975126909719683196 + x*\n                     (-0.8234878506688316215458988304 +\n                       x*(3.4607641859010551501639903314 + x*(-1.8955210085531557309609670978 + 1.*x))));\n           } else if (x<2.0) {\n               result=(-7.143856421301985019580778813 + x*(33.35568129248075086686087865 +\n                       x*(-60.0412343766569246898209957 +\n                          x*(55.46407913315151830247939138 +\n                             x*(-28.7874770749840240158264326 +\n                                x*(8.379317837934083469035061852 +\n                                   x*(-1.2103278392957399092107317741 +\n                                      (0.04275186003977071121074860478 + 0.005247730112126140726731063205*x)*x\n                                      )))))))/\n                  (5.4509691924562038998044993827 + x*\n                     (-2.2732931206867811068721699796 +\n                       x*(4.1530634219989859344450742259 + x*(-2.0183662125874366044951391259 + 1.*x))));\n           } else if (x<5.0) {\n               result=(-0.4869290414611847276899694883 + x*(1.0513417728218375522016338562 +\n                       x*(-0.9694851629317255156038942437 +\n                          x*(0.5007460889402078102011673774 +\n                             x*(-0.15897436623286639052954575417 +\n                                x*(0.03185042477631079356985872518 +\n                                   x*(-0.003940899912654543218183049969 +\n                                      (0.0002757919409481032696079686825 -\n                                         8.369138363906178282041501561e-6*x)*x)))))))/\n                  (30.81121613134246115634780413 + x*(-49.989974505724725146933397436 +\n                       x*(31.455643953462635691568128729 + x*(-8.992097794824270871044305786 + 1.*x))));\n           } else {\n               result=0.0;\n           }\n       }\n       return result*Z;\n    }\n\n    /// second derivative of the correlation factor wrt (r-R_A)\n\n    /// \\f[\n    ///     result = \\frac{1}{S(r)}\\frac{\\partial^2 S(r)}{\\partial r^2}\n    /// \\f]\n    double Srr_div_S(const double& r, const double& Z) const {\n        MADNESS_EXCEPTION(\"no Srr_div_S in Slater2 yet\",0);\n        return 0.0;\n    }\n\n    /// third derivative of the correlation factor wrt (r-R_A)\n\n    /// \\f[\n    ///    result = \\frac{1}{S(r)}\\frac{\\partial^3 S(r)}{\\partial r^3}\n    /// \\f]\n    double Srrr_div_S(const double& r, const double& Z) const {\n        MADNESS_EXCEPTION(\"no Srrr_div_S in Slater2 yet\",0);\n        return 0.0;\n    }\n\n    /// the nuclear correlation factor\n    double S(const double& r, const double& Z) const {\n        const double arZ=a*r*Z;\n        const double arZ2=a*a*r*r*Z*Z;\n\n        return 1.0 + (a0 +a1* arZ+ a2 * arZ2 + a3*arZ*arZ2 + + a4*arZ2*arZ2) *erfc( a*r*Z);\n    }\n\n    /// radial part first derivative of the nuclear correlation factor\n    coord_3d Sp(const coord_3d& vr1A, const double& Z) const {\n        MADNESS_EXCEPTION(\"no Sp in Slater2 yet\",0);\n        return smoothed_unitvec(vr1A);;\n    }\n\n    /// second derivative of the nuclear correlation factor\n    double Spp_div_S(const double& r, const double& Z) const {\n        const double x=r*Z;\n        double result=0.0;\n        if (a==0.5) {\n            if (x<1.0) {\n                result=(-37.75186842343823465059 + x*(21.3476988467348903615 +\n                        x*(0.014608707333424946750026 +\n                           x*(-3.704945314726273312722 +\n                              x*(0.08808104845382944292252 +\n                                 x*(0.3362428305409206967066 +\n                                    x*(-0.02288039625102549092766 +\n                                       (-0.017240056622850307571001 + 0.002412740490618117536527*x)*x)))))))/\n                   (17.595611361287293183447 + x*(-12.421065066789808273295 +\n                        x*(15.957564552156320207938 + x*(-5.0239100389132464317907 + 1.*x))));\n            } else if (x<2.0) {\n                result=(-35.46082798344982189328 + x*(20.3565414350879797493 +\n                        x*(-0.3046488975234456455871 +\n                           x*(-3.298067641731523613442 +\n                              x*(-0.10712268902574947466554 +\n                                 x*(0.4829111116912435121877 +\n                                    x*(-0.10089023589818206760275 +\n                                       (0.0013899828749998182176948 + 0.0008305150868988335610678*x)*x)))))))/\n                   (16.526499668833810286111 + x*(-11.79820182874024593006 +\n                        x*(15.115407083582433322342 + x*(-4.8449266197426825174319 + 1.*x))));\n            } else if (x<5.0) {\n                result=(-414.5311559516023264104 + x*(615.8720414166440747539 +\n                        x*(-422.5938440932793094888 + x*\n                            (159.72497494584873155352 +\n                              x*(-35.6790348104188081907 +\n                                 x*(4.658777521872728594702 +\n                                    x*(-0.328305094433759490678 +\n                                       (0.009162754689309596905172 + 0.00005047926659010755662873*x)*x)))))))/\n                   (112.7044543272820830484 + x*(-56.072518762714727894479 +\n                        x*(28.188843903409059322224 + x*(-6.519554545057610040741 + 1.*x))));\n            } else if (x<10.0) {\n                result=(-146.68256559112012287314 + x*(188.52807059353309478385 +\n                        x*(-82.07176992590032524431 + x*\n                            (18.107697718347802322776 +\n                              x*(-2.3221393933622638466979 +\n                                 x*(0.18681223946803275939642 +\n                                    x*(-0.009601011427143648072501 +\n                                       (0.00028623295732553770894583 - 3.77364531155112782235e-6*x)*x)))))))/\n                   (633.1319105785227043552 + x*(-574.29230199331494406798 +\n                        x*(171.872612865808639376 + x*(-21.906495121260483674385 + 1.*x))));\n            } else {\n                result=-1.0/x;\n            }\n        } else if (a==1.0) {\n            if (x<1.0) {\n                result=(-8.85288955131414420808 + x*(11.359434597010419928515 +\n                        x*(-2.982094072176256165405 + x*\n                            (-4.924201512880445076103 +\n                              x*(0.6773928043289287907009 +\n                                 x*(2.061680233090141287213 +\n                                    x*(-0.5528612000728412913713 +\n                                       (-0.3024276764350212595121 + 0.10765958646570631264003*x)*x)))))))/\n                   (1.6731803922436094206275 + x*(-0.8242052614481793487834 +\n                        x*(3.5912910648514747558597 + x*(-1.9146644266104277222142 + 1.*x))));\n            } else if (x<2.0) {\n                result=(-8.538839434207355205544 + x*(-37.85611260277589742674 +\n                        x*(155.08466711228234382211 + x*\n                            (-241.1247881821171613212 +\n                              x*(199.33293375918859716585 +\n                                 x*(-96.80750216221383928113 +\n                                    x*(27.71704080319043943288 +\n                                       (-4.354251431065185902435 + 0.2906781051124817624589*x)*x)))))))/\n                   (2.2233877901091612794108 + x*(3.2084406367698851844258 +\n                        x*(1.021615116328133792993 + x*(-0.9819667717342250528772 + 1.*x))));\n            } else if (x<5.0) {\n                result=(-7.338671998425412491091 + x*(18.593867285988629508481 +\n                        x*(-19.15344657249203844577 + x*\n                            (10.072359942912659732126 +\n                              x*(-2.99771628023376895151 +\n                                 x*(0.5324416109232007541639 +\n                                    x*(-0.05993976172902101376555 +\n                                       (0.003887110757665478374745 - 0.00011079212872583089652945*x)*x)))))))/\n                   (13.273604111590967002999 + x*(-28.012330064250556933961 +\n                        x*(22.161347591665727407914 + x*(-7.617582259533338164664 + 1.*x))));\n            } else if (x<10) {\n                result=(132.78397650676876308801 + x*(-78.01898251977413923271 +\n                        x*(15.292039515801252996504 + x*\n                            (-1.000000154745351328125 +\n                              x*(1.950300262619412492847e-8 +\n                                 x*(-1.6337541591423364318692e-9 +\n                                    x*(8.771557330523968791519e-11 +\n                                       (-2.7388800346031121159372e-12 + 3.7894572289998844980568e-14*x)*x))))))\n                     )/(-4.724326520908917985827e-6 + x*\n                      (-132.78397108375581258096 + x*(78.01897976124964688489 +\n                           x*(-15.292038699709498552356 + 1.*x))));\n            } else {\n                result=-1.0/x;\n            }\n        }\n        return result*Z*Z;\n    }\n\n\n    /// derivative of the U2 potential wrt X (scalar part)\n\n    /// with\n    /// \\f[\n    ///   \\rho = \\left| \\vec r- \\vec R_A \\right|\n    /// \\f]\n    /// returns the term in the parenthesis without the the derivative of rho\n    /// \\f[\n    /// \\frac{\\partial U_2}{\\partial X_A} = \\frac{\\partial \\rho}{\\partial X}\n    ///           \\left(-\\frac{1}{2}\\frac{S''' S - S'' S'}{S^2} + \\frac{1}{\\rho^2}\\frac{S'}{S}\n    ///           - \\frac{1}{\\rho} \\frac{S''S - S'^2}{S^2} + \\frac{Z_A}{\\rho^2}\\right)\n    /// \\f]\n    double U2X_spherical(const double& r, const double& Z, const double& rcut) const {\n        MADNESS_EXCEPTION(\"no U2X_spherical in Slater2 yet\",0);\n        return 0.0;\n    }\n\n};\n\n\n\n/// A nuclear correlation factor class\n\n/// should reduce to quartic for N=4\n/// @tparam\tN\tthe exponent of the polynomial\ntemplate<std::size_t N>\nclass Polynomial : public NuclearCorrelationFactor {\npublic:\n\t/// ctor\n\n\t/// @param[in]\tworld\tthe world\n\t/// @param[in]\tmol molecule with the sites of the nuclei\n\tPolynomial(World& world, const Molecule& mol, const double a)\n\t\t: NuclearCorrelationFactor(world,mol) {\n\n\t\t/// length scale parameter a, default chosen that linear terms in U2 vanish\n\t\ta_=(2. + (-2. + sqrt(-1. + N))*N)/(-2. + N);\n\n\t\tif (a!=0.0) a_=a;\n\n\t\tif (world.rank()==0) {\n\t\t\tprint(\"constructed nuclear correlation factor of the form\");\n\t\t\tprint(\"  R   = Prod_A S_A\");\n\t\t\tprint(\"  S_A = 1 + a (r/b -1)^N  if  r<b, with  b= (N*a)/((1+a) Z)\");\n\t\t\tprint(\"      = 1                 else \");\n\t\t\tprint(\"with eprec \",mol.get_eprec());\n\t\t\tprint(\"which is of polynomial type with exponent N = \",N);\n\t\t}\n\t}\n\n\tcorrfactype type() const {return NuclearCorrelationFactor::Polynomial;}\n\nprivate:\n\n\t/// length scale parameter a, default chosen that linear terms in U2 vanish\n\tdouble a_;\n\n\tdouble a_param() const {return a_;}\n\n\t/// the cutoff\n\tstatic double b_param(const double& a) {return N*a/(1.0+a);}\n\n    /// the nuclear correlation factor\n    double S(const double& r, const double& Z) const {\n\n    \tconst double rho=r*Z;\n    \tconst double a=Polynomial<N>::a_param();\n    \tconst double b=Polynomial<N>::b_param(a);\n\n    \tif (rho<b) {\n    \t\tconst double arg=-1.0 + rho/b;\n    \t\treturn 1.0 + power<N>(-1.0) * a*power<N>(arg);\n    \t} else {\n    \t\treturn 1.0;\n    \t}\n\n    }\n\n    /// radial part first derivative of the nuclear correlation factor\n    coord_3d Sp(const coord_3d& vr1A, const double& Z) const {\n\n\t\tconst double r=vr1A.normf();\n    \tconst double rho=r*Z;\n    \tconst double a=Polynomial<N>::a_param();\n    \tconst double b=Polynomial<N>::b_param(a);\n\n    \tif (rho<b) {\n    \t\treturn power<N>(-1.)*(1.+a)* Z* power<N-1>(-1.+rho/b)*smoothed_unitvec(vr1A);\n    \t}\n    \treturn coord_3d(0.0);\n    }\n\n    /// second derivative of the nuclear correlation factor\n\n    /// -1/2 S\"/S - Z/r\n    double Spp_div_S(const double& r, const double& Z) const {\n\n    \tconst double rho=r*Z;\n    \tconst double a=Polynomial<N>::a_param();\n    \tconst double b=Polynomial<N>::b_param(a);\n\n    \tif (rho<1.e-6) {\n    \t\tconst double ap1=1.0+a;\n    \t\tconst double c0=((3. *(1. + a) - (3. + a) * N))/(2.* a*N);\n    \t\tconst double c1=((2.* ap1*ap1 - ap1* (3. + a)*N + N*N)*Z)/(a*a*N*N);\n    \t\tconst double c2=((30.*ap1*ap1*ap1- ap1*ap1* (55 + 18* a)*N +\n    \t\t\t\t   30 *ap1 *N*N + (-5 + a* (8 + a)) *N*N*N)* Z*Z)/(12 *a*a*a*N*N*N);\n    \t\treturn Z*Z*(c0 + c1*r + c2*r*r);\n\n    \t} else if (rho<b) {\n\n    \t\tconst double num=Z* (2 + (power<N>(-1)* a* power<N>(-1 + rho/b)\n    \t\t\t    * (-2 *a*N*N + (1 + a) *N* (1 + a *(-3 + N) + N)* rho +\n    \t\t\t      2 *(1 + a)*(1+a)* rho*rho))/power<2>(a* N - (1 + a)*rho));\n\n    \t\tconst double denom=2.* (r + power<N>(-1) *a* r* power<N>(-1 + rho/b));\n    \t\treturn -num/denom;\n\n    \t} else {\n    \t\treturn -Z*Z/rho;\n    \t}\n    }\n\n    double Sr_div_S(const double& r, const double& Z) const {\n        const double rho=r*Z;\n        const double a=Polynomial<N>::a_param();\n        const double b=Polynomial<N>::b_param(a);\n\n        if (rho<b) {\n            const double negn= power<N>(-1.0);\n            const double num=(negn*(1 + a)*Z*power<N-1>(-1 + ((1 + a)*r*Z)/(a*N)));\n            const double denom=(1 + negn*a*power<N>(-1 + ((1 + a)*r*Z)/(a*N)));\n            return num/denom;\n        } else {\n            return 0.0;\n        }\n\n    }\n\n    double Srr_div_S(const double& r, const double& Z) const {\n        const double rho=r*Z;\n        const double a=Polynomial<N>::a_param();\n        const double b=Polynomial<N>::b_param(a);\n\n        if (rho<b) {\n            const double negn= power<N>(-1.0);\n            return (negn*power<2>(1 + a)*(-1 + N)*power<2>(Z)*power<N-2>(-1 + ((1 + a)*r*Z)/(a*N)))/\n                    (a*N*(1 + negn*a*power<N>(-1 + ((1 + a)*r*Z)/(a*N))));\n        } else {\n            return 0.0;\n        }\n    }\n\n    double Srrr_div_S(const double& r, const double& Z) const {\n        const double rho=r*Z;\n        const double a=Polynomial<N>::a_param();\n        const double b=Polynomial<N>::b_param(a);\n\n        if (rho<b) {\n            const double negn= power<N>(-1.0);\n            return (negn*power<3>(1 + a)*(-2 + N)*(-1 + N)*power<3>(Z)*power<N-3>(-1 + ((1 + a)*r*Z)/(a*N)))/\n                    (power<2>(a*N)*(1 + negn*a*power<N>(-1 + ((1 + a)*r*Z)/(a*N))));\n        } else {\n            return 0.0;\n        }\n    }\n\n    double U2X_spherical(const double& r, const double& Z, const double& rcut) const {\n        const double a=a_param();\n        const double aopt=(2. + (-2. + sqrt(-1. + N))*N)/(-2. + N);\n        if (fabs(a-aopt)>1.e-10) {\n            MADNESS_EXCEPTION(\"U2X_spherical for polynomial ncf only with aopt\",1);\n        }\n\n        double result=0.0;\n        if (r*Z<1.e-4) {\n            const double rn=sqrt(N-1);\n            const double r0=0.0;\n            const double r1=((2.*(-8. + 9.*rn) + N*(25. + 10.*rn + N))*r*power<4>(Z))/\n                    (6.*power<2>(-2 + N)*rn);\n            const double r2=((-4*(17 + 9*rn) + N*(92 + 80*rn +\n                    N*(-29 - 33*rn + N*(4 + 7*rn + N))))*power<5>(Z))/\n                            (8.*power<3>(-2 + N)*(-1 + N)*rn);\n            result=(r0 + r*r1 + r*r*r2);\n\n        } else {\n            const double S1=Sr_div_S(r,Z);\n            const double S2=Srr_div_S(r,Z);\n            const double S3=Srrr_div_S(r,Z);\n            const double term1=-0.5*(S3-S1*S2);\n            const double term2=(S1+Z)/(r*r);\n            const double term3=(S2-S1*S1)/r;\n            result=term1+term2-term3;\n        }\n        return result;\n    }\n\n};\n\nclass PseudoNuclearCorrelationFactor : public NuclearCorrelationFactor {\n\npublic:\n\t/// ctor\n\n\t/// @param[in]\tworld\tthe world\n\t/// @param[in]\tmol molecule with the sites of the nuclei\n\tPseudoNuclearCorrelationFactor(World& world, const Molecule& mol,\n\t\t\tconst std::shared_ptr<PotentialManager> pot, const double fac)\n\t\t: NuclearCorrelationFactor(world,mol), potentialmanager(pot),\n\t\t  eprec(mol.get_eprec()), fac(fac) {\n\n\t\tif (world.rank()==0) {\n\t\t\tprint(\"constructed nuclear correlation factor of the form\");\n\t\t\tprint(\"    R   = \",fac);\n            print(\"with eprec \",mol.get_eprec());\n\t\t\tprint(\"which means it's (nearly) a conventional calculation\\n\");\n\t\t}\n\n\t\t// add the missing -Z/r part to U2!\n\t}\n\n\tcorrfactype type() const {return None;}\n\n\t/// return the U2 term of the correlation function\n\n\t/// overloading to avoid inconsistent state of U2, which needs the\n\t/// nuclear potential\n\tconst real_function_3d U2() const {\n\n//\t\tif (not U2_function.is_initialized()) {\n\t\t\tMADNESS_ASSERT(potentialmanager->vnuclear().is_initialized());\n//\t\t}\n\t\treturn potentialmanager->vnuclear();\n\t}\n\n\t/// apply the regularized potential U_nuc on a given function rhs\n\n\t/// overload the base class method for efficiency\n\treal_function_3d apply_U(const real_function_3d& rhs) const {\n        return (U2()*rhs).truncate();\n\t}\n\n\nprivate:\n\n\t/// underlying potential (=molecule)\n    std::shared_ptr<PotentialManager> potentialmanager;\n    double eprec;\n\n    /// the factor of the correlation factor: R=fac;\n\tconst double fac;\n\n    double Sr_div_S(const double& r, const double& Z) const {return 0.0;}\n\n    double Srr_div_S(const double& r, const double& Z) const {return 0.0;}\n\n    double Srrr_div_S(const double& r, const double& Z) const {return 0.0;}\n\n    /// the nuclear correlation factor\n    double S(const double& r, const double& Z) const {\n    \treturn fac;\n    }\n\n    /// radial part first derivative of the nuclear correlation factor\n    coord_3d Sp(const coord_3d& vr1A, const double& Z) const {\n    \treturn coord_3d(0.0);\n    }\n\n    /// second derivative of the nuclear correlation factor\n    double Spp_div_S(const double& r, const double& Z) const {\n        double rcut= 1.0 / smoothing_parameter(Z, eprec);\n        return - Z * smoothed_potential(r*rcut)*rcut;\n    }\n\n    double U2X_spherical(const double& r, const double& Z, const double& rcut) const {\n        // factor -1 from the definition of the dsmoothed_potential as -1/r^2\n        return -Z*dsmoothed_potential(r * rcut) * (rcut * rcut);\n    }\n\n};\n\n\n/// this ncf has no information about itself, only U2 and U1 assigned\nclass AdhocNuclearCorrelationFactor : public NuclearCorrelationFactor {\n\npublic:\n\t/// ctor\n\n\t/// @param[in]\tworld\tthe world\n\t/// @param[in]\tmol molecule with the sites of the nuclei\n\tAdhocNuclearCorrelationFactor(World& world, const real_function_3d U2,\n\t\tconst std::vector<real_function_3d>& U1)\n\t\t: NuclearCorrelationFactor(world,Molecule()) {\n\n\t\tU2_function=U2;\n\t\tU1_function=U1;\n\n\t\tif (world.rank()==0) {\n\t\t\tprint(\"constructed ad hoc nuclear correlation factor\");\n\t\t}\n\t}\n\n\tcorrfactype type() const {return Adhoc;}\n\nprivate:\n\n    double Sr_div_S(const double& r, const double& Z) const {\n    \tMADNESS_EXCEPTION(\"no Sr_div_S() in AdhocNuclearCorrelationFactor\",0);\n\t    return 0.0;\n    }\n\n    double Srr_div_S(const double& r, const double& Z) const {\n    \tMADNESS_EXCEPTION(\"no Srr_div_S() in AdhocNuclearCorrelationFactor\",0);\n\t    return 0.0;\n    }\n\n    double Srrr_div_S(const double& r, const double& Z) const {\n    \tMADNESS_EXCEPTION(\"no Srrr_div_S() in AdhocNuclearCorrelationFactor\",0);\n\t    return 0.0;\n    }\n\n    /// the nuclear correlation factor\n    double S(const double& r, const double& Z) const {\n    \tMADNESS_EXCEPTION(\"no S() in AdhocNuclearCorrelationFactor\",0);\n    \treturn 0.0;\n    }\n\n    /// radial part first derivative of the nuclear correlation factor\n    coord_3d Sp(const coord_3d& vr1A, const double& Z) const {\n    \tMADNESS_EXCEPTION(\"no Sp() in AdhocNuclearCorrelationFactor\",0);\n    \treturn coord_3d(0.0);\n    }\n\n    /// second derivative of the nuclear correlation factor\n    double Spp_div_S(const double& r, const double& Z) const {\n    \tMADNESS_EXCEPTION(\"no Spp_div_S() in AdhocNuclearCorrelationFactor\",0);\n    \treturn 0.0;\n    }\n};\n\n\nstd::shared_ptr<NuclearCorrelationFactor>\ncreate_nuclear_correlation_factor(World& world,\n\t\tconst Molecule& molecule,\n\t\tconst std::shared_ptr<PotentialManager> pm,\n\t\tconst std::string inputline);\n\nstd::shared_ptr<NuclearCorrelationFactor>\ncreate_nuclear_correlation_factor(World& world,\n\t\tconst Molecule& molecule,\n\t\tconst std::shared_ptr<PotentialManager> pm,\n\t\tconst std::pair<std::string,double>& ncf);\n\n}\n\n\n#endif /* NUCLEARCORRELATIONFACTOR_H_ */\n"
  },
  {
    "path": "src/madness/chem/def2-SVP",
    "content": "<?xml version=\"1.0\" ?>\n<name>\n   def2-SVP\n</name>\n<basis symbol=\"H\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     13.0107010   \n      1.9622572   \n      0.44453796  \n    </exponents>\n    <coefficients>\n           0.19682158e-01\n           0.13796524\n           0.47831935\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.12194962\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      0.8\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"He\">\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      38.354936737\n    </exponents>\n    <coefficients>\n      1.00000008\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      5.7689081479\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      1.2399407035\n    </exponents>\n    <coefficients>\n      1.00000006\n    </coefficients>\n  </shell>\n  <shell type=\"S\" nprim=\"1\">\n    <exponents>\n      0.29757815953\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n  <shell type=\"P\" nprim=\"1\">\n    <exponents>\n      1.0000000000\n    </exponents>\n    <coefficients>\n      1.00000000\n    </coefficients>\n  </shell>\n</basis>\n\n\n"
  },
  {
    "path": "src/madness/chem/diamagneticpotentialfactor.cc",
    "content": "/*\n * diamagneticpotentialfactor.cc\n *\n *  Created on: 16 Apr 2019\n *      Author: fbischoff\n */\n\n#include<madness/chem/diamagneticpotentialfactor.h>\n#include <madness/world/test_utilities.h>\n#include<madness/chem/masks_and_boxes.h>\n\nnamespace madness {\n\n\n\n/// compute the expression (\\sum_i R_i)^(-1) \\sum_i R_i arg(r,B,v_i)\n\n/// see compute_T_commutator_vector_term() for an example\n/// @param[in]\targ\tthe function argument arg(r,B,v)\n/// @param[in]\tB\tmagnetic field\n/// @param[in]\tv\tthe position of the nuclei (centers of the Gaussian) in A space\nstruct R_times_arg_div_R {\n\n\tconst coord_3d& B;\n\tconst std::vector<coord_3d>& vv;\n\tstd::function<double(const coord_3d& r, const coord_3d& B, const coord_3d& vv)>& arg;\n\tconst double radius;\n\tdouble tightness;\n\n\tR_times_arg_div_R(std::function<double(const coord_3d& r, const coord_3d& B, const coord_3d& v)>& arg,\n\t\t\tconst coord_3d& B, const std::vector<coord_3d>& vv, const double radius) : B(B), vv(vv), arg(arg),\n\t\t\t\t\tradius(radius) {\n\t\ttightness=max_of_x_1_smooth::compute_tightness(FunctionDefaults<3>::get_thresh(),radius);\n\t}\n\n\tdouble operator()(const coord_3d& r) const {\n\t\tcoord_3d r_boxed=r;\n\t\tr_boxed*=max_of_x_1_smooth::compute_factor(r.normf(),tightness,radius);\n\t\tint imax=0;\n\t\tdouble Riuimax=-1.0;\n\t\t//double Rmax=0.0;\n\t\tdouble umax=0.0;\n\t\tdouble Amv_square_max=0.0;\n\t\tfor (size_t i=0; i<vv.size(); ++i) {\n\t\t\tconst coord_3d& v = vv[i];\n\t\t\tcoord_3d Amv=0.5*cross(B,r_boxed)-v;\n\t\t\tdouble Amv_square=inner(Amv,Amv);\n\t\t\tdouble Ri=exp(-1.0/B.normf()*Amv_square);\n\t\t\tdouble ui=arg(r_boxed,B,v);\n\n\t\t\tif (Ri*ui>Riuimax) {\n\t\t\t        //Rmax=Ri;\n\t\t\t\tumax=ui;\n\t\t\t\tAmv_square_max=Amv_square;\n\t\t\t\tRiuimax=Ri*ui;\n\t\t\t\timax=i;\n\t\t\t}\n\t\t}\n\t\tdouble numerator=umax;\n\t\tdouble denominator=1.0;\n\t\tfor (size_t i=0; i<vv.size(); ++i) {\n\t\t        if (i==size_t(imax)) continue;\n\t\t\tconst coord_3d& v = vv[i];\n\t\t\tcoord_3d Amv=0.5*cross(B,r_boxed)-v;\n\t\t\tdouble Amv_square=inner(Amv,Amv);\n\n\t\t\tdouble Ri_div_Rmax=exp(-1.0/B.normf()*(Amv_square-Amv_square_max));\n\t\t\tdouble ui=arg(r_boxed,B,v);\n\n\t\t\tnumerator+=Ri_div_Rmax*ui;\n\t\t\tdenominator+=Ri_div_Rmax;\n\t\t}\n        MADNESS_ASSERT(!isnan(numerator/denominator));\n        return numerator/denominator;\n\t}\n};\n\n\n\n/// functor for the diamagnetic term in a box\n\n/// The diamagnetic term is a 2D harmonic potential, which makes the iterations diverge.\n/// Approximate it by making it constant at a specific radius: construct a smooth approximation\n/// for the piecewise function f(x)={{x, x<1}, {1,x>1}}, which is squared. For this approximation\n/// see https://doi.org/10.1186/s40064-016-3278-y\nstruct harmonic_potential_boxed : public FunctionFunctorInterface<double,3> {\n\tdouble radius;\t\t//\n\tdouble tightness;\t// alpha in the article\n\tharmonic_potential_boxed(const double r, const double deviation=FunctionDefaults<3>::get_thresh()) :\n\t\tradius(r) {\n\t\ttightness=max_of_x_1_smooth::compute_tightness(deviation,radius);\n\t}\n\n\tdouble operator()(const coord_3d& xyz) const {\n\n\t\tdouble r=sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]);\t// radius in x and y directions only\n\t\tcoord_3d xyz_boxed=xyz*max_of_x_1_smooth::compute_factor(r,tightness,radius);\n\t\txyz_boxed[2]=0.0;\n\t\tdouble result=inner(xyz_boxed,xyz_boxed);\n\t\tMADNESS_ASSERT(!isnan(result));\n\t\treturn result;\n\t}\n\n    std::vector<coord_3d> special_points() const {\n    \treturn std::vector<coord_3d>();\n    }\n\n};\n\nvoid Diamagnetic_potential_factor::print_info() const {\n\n\tprint(\"\\ninformation about the diamagnetic_potential_factor\\n\");\n\tprint(\"coords in A space (v) \",v);\n\tprint(\"coords in real space  \",coords);\n\tprint(\"physical magnetic field B      \",physical_B);\n\tprint(\"explicit magnetic field B      \",explicit_B);\n\tprint(\"\");\n\n}\n\n\nvoid Diamagnetic_potential_factor::recompute_factors_and_potentials() {\n\tdiamagnetic_factor_=custom_factor(explicit_B,v,1.0);\n\tdiamagnetic_factor_square=custom_factor(explicit_B,v,2.0);\n\tdiamagnetic_U2=compute_U2();\n\tdiamagnetic_U1=-1.0*compute_nabla_R_div_R();\n//\tsave(diamagnetic_U2,\"U2\");\n//\tsave(diamagnetic_factor_,\"factor\");\n//\tsave(diamagnetic_U1[0],\"U1x\");\n//\tsave(diamagnetic_U1[1],\"U1y\");\n//\tsave(diamagnetic_U1[2],\"U1z\");\n}\n\n\ncomplex_function_3d Diamagnetic_potential_factor::compute_lz_commutator() const {\n\tstd::vector<real_function_3d> r(3), A(3);\n    r[0]=real_factory_3d(world).functor([] (const coord_3d& r) {return r[0];});\n    r[1]=real_factory_3d(world).functor([] (const coord_3d& r) {return r[1];});\n    r[2]=real_factory_3d(world).functor([] (const coord_3d& r) {return r[2];});\n\n    A[0]=explicit_B[1]*r[2]-explicit_B[2]*r[1];\n    A[1]=explicit_B[2]*r[0]-explicit_B[0l]*r[2];\n    A[2]=explicit_B[0l]*r[1]-explicit_B[1]*r[0];\n\n\tscale(world,A,0.5);\n\tcomplex_function_3d result=double_complex(0.0,1.0)*dot(world,A,diamagnetic_U1);\n\treturn result;\n}\n\n\nreal_function_3d Diamagnetic_potential_factor::compute_U2() const {\n\n\tMADNESS_ASSERT(B_along_z(explicit_B));\n\tMADNESS_ASSERT(B_along_z(physical_B));\n\tdouble eB=explicit_B.normf();\n\tdouble pB=physical_B.normf();\n\n\tstd::function<double(const coord_3d& r, const coord_3d& B, const coord_3d& v)>\n\tU2c = [] (const coord_3d& r, const coord_3d& B, const coord_3d& v) {\n\t\tcoord_3d Amv=0.5*cross(B,r)-v;\n\t\tdouble Amv_square=inner(Amv,Amv);\n\t\tdouble ui=Amv_square;\n\t\treturn ui;\n\t};\n\n\treal_function_3d U2c_function(world);\n\tdouble radius=get_potential_radius();\n\tif (eB>0.0) U2c_function=real_factory_3d(world).functor(R_times_arg_div_R(U2c,explicit_B,v,radius)).truncate_on_project();\n\treal_function_3d harmonic_potential=real_factory_3d(world).functor(harmonic_potential_boxed(radius));\n\n\treal_function_3d U2_function;\n\tU2_function=-0.5*(-eB - 0.25*pB*pB*harmonic_potential  + U2c_function);\n\treturn U2_function.truncate();\n}\n\nreal_function_3d Diamagnetic_potential_factor::compute_R_times_T_commutator_scalar_term_numerically() const {\n\t// the physical potential\n\tMADNESS_ASSERT(B_along_z(physical_B));\n\tdouble pB=physical_B.normf();\n\tdouble radius=get_potential_radius();\n\treal_function_3d harmonic_potential=real_factory_3d(world).functor(harmonic_potential_boxed(radius));\n\tharmonic_potential.scale(0.125*pB*pB) ;\n\n\treturn (-0.5*div(grad_bspline_one(factor())) + harmonic_potential*factor()).truncate();\n}\n\n\nstd::vector<real_function_3d> Diamagnetic_potential_factor::compute_nabla_R_div_R() const {\n\n\tstd::vector<real_function_3d> result=zero_functions_compressed<double,3>(world,3);\n\n\tif (explicit_B.normf()>0.0) {\n\t\tMADNESS_ASSERT(B_along_z(physical_B));\n\t\tfor (int idim=0; idim<3; ++idim) {\n\n\t\t\tstd::function<double(const coord_3d& r, const coord_3d& B, const coord_3d& v)>\n\t\t\tU1 = [&idim] (const coord_3d& r, const coord_3d& B, const coord_3d& v) {\n\t\t\t\tconst double Bnorm=B.normf();\n\t\t\t\tconst double B2=inner(B,B);\n\t\t\t\tconst double rB=inner(r,B);\n\t\t\t\tconst coord_3d Bxv=cross(B,v);\n\t\t\t\treturn (-1.0/(2.0*Bnorm))*((B2*r[idim] - B[idim]*rB) + 2.0*Bxv[idim]);\n\t\t\t};\n\n\t\t\t// no flattening of the U1 potential: use cell diameter as radius\n\t\t\tdouble radius=FunctionDefaults<3>::get_cell().normf();\n\t\t\tresult[idim]=real_factory_3d(world).functor(R_times_arg_div_R(U1,explicit_B,v,radius));\n\t\t}\n\t\ttruncate(world,result);\n\t}\n\treturn result;\n}\n\n\n/// compute the diamagnetic local potential (B is in z direction -> dia = x^2 + y^2\nstd::vector<complex_function_3d> Diamagnetic_potential_factor::apply_potential(const std::vector<complex_function_3d>& rhs) const {\n\n\tstd::vector<complex_function_3d> result=zero_functions_compressed<double_complex,3>(world,rhs.size());\n\tif (physical_B.normf()==0.0) return result;\n\n\tdouble plateau=diamagnetic_U2(20.0, 20.0, 20.0);\n\n\tresult=(diamagnetic_U2-plateau)*rhs + plateau*rhs;\n\tif (explicit_B.normf()!=0.0) {\n\t\tDerivative<double_complex,3> dx(world,0);\n\t\tDerivative<double_complex,3> dy(world,1);\n\t\tstd::vector<complex_function_3d> dxrhs=apply(world,dx,rhs);\n\t\tstd::vector<complex_function_3d> dyrhs=apply(world,dy,rhs);\n\n\t\tstd::vector<complex_function_3d> tmp=(diamagnetic_U1[0]*dxrhs + diamagnetic_U1[1]*dyrhs);\n\t\tresult+=tmp;\n\t}\n\ttruncate(world,result);\n\treturn result;\n}\n\n\n/// compute a factor for comparison in coordinate space\nbool Diamagnetic_potential_factor::test_factor() const {\n\ttest_output t(\"entering Diamagnetic_potential_factor::test_factor .. \");\n\n\t// compute the factor in coordiate space\n\tconst auto& B=explicit_B;\n\tconst auto& c=coords;\n\tauto factor = [&B, &c](const coord_3d& r) {\n\t\tdouble result=0.0;\n\t\tdouble absB=B.normf();\n\t\tif (absB==0.0) return 1.0;\n\t\tfor (auto& cc : c) {\n\t\t\tcoord_3d arg1=(r-cc);\n\t\t\tresult+=exp(-0.25/absB*(inner(B,B)*inner(arg1,arg1) - inner(B,arg1)*inner(B,arg1)));\n\t\t}\n\t\treturn result;\n\t};\n\n\tauto factor_square = [&B, &c](const coord_3d& r) {\n\t\tdouble result=0.0;\n\t\tdouble absB=B.normf();\n\t\tif (absB==0.0) return 1.0;\n\t\tfor (auto& cc : c) {\n\t\t\tcoord_3d arg1=(r-cc);\n\t\t\tresult+=exp(-0.25/absB*(inner(B,B)*inner(arg1,arg1) - inner(B,arg1)*inner(B,arg1)));\n\t\t}\n\t\treturn result*result;\n\t};\n\n\treal_function_3d factor_in_coordinate_space=real_factory_3d(world).functor(factor);\n\treal_function_3d factor_in_A_space=custom_factor(explicit_B,v,1.0);\n\n\treal_function_3d factor_square_in_coordinate_space=real_factory_3d(world).functor(factor_square);\n\treal_function_3d factor_square_in_A_space=custom_factor(explicit_B,v,2.0);\n\n\n\tdouble diffnorm1=(factor_in_coordinate_space-factor_in_A_space).norm2();\n\tdouble diffnorm2=(factor_square_in_coordinate_space-factor_square_in_A_space).norm2();\n\tt.logger << \"diffnorm1 \" << diffnorm1 << std::endl;\n\tt.logger << \"diffnorm2 \" << diffnorm2 << std::endl;\n\tbool success=((diffnorm1<1.e-10) and (diffnorm2<1.e-10));\n\treturn t.end(success);\n}\n\nbool Diamagnetic_potential_factor::test_harmonic_potential() const {\n\ttest_output t(\"entering Diamagnetic_potential_factor::test_harmonic_potential .. \");\n\n\tdouble radius=3;\n\treal_function_3d pot=real_factory_3d(world).functor(harmonic_potential_boxed(radius));\n\tdouble error1=std::abs(pot({0,0,0}) - 0.0);\n\tdouble error2=std::abs(pot({0,0,10}) - 0.0);\t// orientied along z\n\tdouble error3=std::abs(pot({0,10,0}) - 9.0);\t// flattened out at r=3\n\tdouble error4=std::abs(pot({10,0,0}) - 9.0);\t// flattened out at r=3\n\tdouble error5=std::abs(pot({2.4,0,0}) - 5.76);\t// deviation of thresh at 0.8*r\n\n\tdouble thresh=FunctionDefaults<3>::get_thresh();\n\tt.logger << \"thresh \" << thresh << std::endl;\n\tt.logger << \"error1 \" << error1 << std::endl;\n\tt.logger << \"error2 \" << error2 << std::endl;\n\tt.logger << \"error3 \" << error3 << std::endl;\n\tt.logger << \"error4 \" << error4 << std::endl;\n\tt.logger << \"error5 \" << error5 << std::endl;\n\tbool success=((error1<thresh) and (error2<thresh) and (error3<thresh) and (error4<thresh) and (error5<10*thresh));\n\treturn t.end(success);\n\n}\n\n\nbool Diamagnetic_potential_factor::test_scalar_potentials() const {\n\n\ttest_output t(\"entering Diamagnetic_potential_factor::test_scalar_potentials .. \");\n\tconst std::vector<complex_function_3d> mo=make_fake_orbitals(2);\n\tconst std::vector<complex_function_3d> diamo=factor()*mo;\n\tconst std::vector<complex_function_3d> dia2mo=factor_square()*mo;\n\n\treal_function_3d T_commutator_scalar_term=compute_U2();\n\treal_function_3d T_commutator_scalar_term_numerical=compute_R_times_T_commutator_scalar_term_numerically();\n\n\tdouble_complex t3=inner(dia2mo,T_commutator_scalar_term*mo);\n\tdouble_complex t3a=inner(diamo,T_commutator_scalar_term_numerical*mo);\n\n\tt.logger << \"t3   \" << t3 << std::endl;\n\tt.logger << \"t3a  \" << t3a << std::endl;\n\tt.logger << \"error \" << std::abs(t3-t3a) << std::endl;\n\n\tbool success=(std::abs(t3-t3a)<FunctionDefaults<3>::get_thresh());\n\treturn t.end(success);\n}\n\nbool Diamagnetic_potential_factor::test_vector_potentials() const {\n\n\ttest_output t(\"entering Diamagnetic_potential_factor::test_vector_potentials .. \");\n\tdouble thresh=FunctionDefaults<3>::get_thresh();\n\n\tconst std::vector<real_function_3d> U1_analytical=compute_nabla_R_div_R();\n\tconst std::vector<real_function_3d> U1_numerical_times_factor=grad(factor());\n\n\tdouble total_error=0.0;\n\tfor (int i=0; i<3; ++i) {\n\t\tdouble norm=U1_analytical[i].norm2();\n\t\tdouble error=(U1_analytical[i]*factor()-U1_numerical_times_factor[i]).norm2();\n\t\tdouble relative_error= (error>thresh) ? error/norm : 0.0;\t// norm might be zero\n\t\tt.logger << \"error[\" << i << \"]\" << relative_error << std::endl;\n\t\ttotal_error+=relative_error;\n\t}\n\n\tbool success=(total_error<thresh);\n\treturn t.end(success);\n}\n\n\nbool Diamagnetic_potential_factor::test_lz_commutator() const {\n\n\ttest_output t(\"entering Znemo::test_lz_commutator .. \");\n\tdouble thresh=FunctionDefaults<3>::get_thresh();\n\n\tLz<double_complex,3> lz(world);\n\n\tcomplex_function_3d lzR=0.5*explicit_B[2]*lz(convert<double,double_complex,3>(factor()));\n\tcomplex_function_3d lz_commR=compute_lz_commutator()*factor();\n\tdouble norm1=lzR.norm2();\n\tdouble norm2=lz_commR.norm2();\n\tdouble error=(lzR-lz_commR).norm2();\n\n\tt.logger << \"norm lz numerical  \" << norm1 << std::endl;\n\tt.logger << \"norm lz analytical \" << norm2 << std::endl;\n\tt.logger << \"error lz numerical vs analytical \" << error << std::endl;\n\n\treturn t.end(error<thresh);\n}\n\nstd::vector<complex_function_3d> Diamagnetic_potential_factor::make_fake_orbitals(const int n,\n\t\tconst coord_3d& offset) const {\n\n\tstd::vector<complex_function_3d> result;\n\tfor (int i=0; i<n; ++i) {\n\t\tdouble exponent=2.0/double(i+1);\n\t\tcoord_3d offset1=offset+coord_3d({0.1,0.2,0.3*i});\n\t\tdouble_complex phase(0.0,2.0*i);\n\t\tauto gaussian = [&exponent, &offset1, &phase](const coord_3d& r) {\n\t\t\tdouble arg=(r-offset1).normf();\n\t\t\treturn exp(-exponent*arg*arg+phase);\n\t\t};\n\t\tcomplex_function_3d tmp=complex_factory_3d(world).functor(gaussian);\n\t\tresult.push_back(tmp);\n\t}\n\n\treturn result;\n}\n\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/diamagneticpotentialfactor.h",
    "content": "/*\n * diamagneticpotentialfactor.h\n *\n *  Created on: 16 Apr 2019\n *      Author: fbischoff\n */\n\n#ifndef SRC_APPS_CHEM_DIAMAGNETICPOTENTIALFACTOR_H_\n#define SRC_APPS_CHEM_DIAMAGNETICPOTENTIALFACTOR_H_\n\n\n#include <madness/mra/mra.h>\n#include<madness/chem/znemo.h>\n\nnamespace madness {\n\n\n/// to be put in a separate file\nclass Diamagnetic_potential_factor {\n\npublic:\n\n\t/// constructor takes a world and the parameters for the calculation\n\tDiamagnetic_potential_factor(World& world, const Nemo_complex_Parameters& param,\n\t\t\tconst std::vector<coord_3d>& coords)\n\t\t: world(world), coords(coords) {\n\n\t\tuse_v_vector=param.use_v_vector();\n\t\tphysical_B={0,0,param.physical_B()};\n\t\texplicit_B={0,0,param.explicit_B()};\n\n\t\tv=compute_v_vector(explicit_B,coords,use_v_vector);\n\n\t\tpotential_radius=param.potential_radius();\n\n\t\t// initialize all functions to their default values\n\t\tdiamagnetic_factor_=real_factory_3d(world).functor([] (const coord_3d& r) {return 1.0;});\n\t\tdiamagnetic_factor_square=real_factory_3d(world).functor([] (const coord_3d& r) {return 1.0;});\n\t\tdiamagnetic_U2=real_factory_3d(world).functor([] (const coord_3d& r) {return 0.0;});\n\t\tdiamagnetic_U1=zero_functions<double,3>(world,3);\n\n\t\tif (physical_B.normf()>0.0) recompute_factors_and_potentials();\n\t\tif (param.printlevel()>9) print_info();\n\t}\n\n\tvoid reset_explicit_B_and_v(const coord_3d& eB) {\n\t\texplicit_B=eB;\n\t\tv=compute_v_vector(explicit_B,coords,use_v_vector);\n\t}\n\n\tstatic std::vector<coord_3d> compute_v_vector(const coord_3d& B,\n\t\t\tconst std::vector<coord_3d>& coords, bool use_v_vector) {\n\t\tstd::vector<coord_3d> v;\n\t\tif (use_v_vector) {\n\t\t\tfor (auto& c : coords) v.push_back(0.5*cross(B,c));\n\t\t} else {\n\t\t\tv=std::vector<coord_3d> (1,{0.0,0.0,0.0});\n\t\t}\n\t\treturn v;\n\t}\n\n\n\tvoid print_info() const;\n\n\t/// return the diamagnetic factor\n\treal_function_3d factor() const {return diamagnetic_factor_;}\n\n\t/// return the square of the diamagnetic factor\n\treal_function_3d factor_square() const {return diamagnetic_factor_square;}\n\n\t/// return a custom factor for a given magnetic field\n\treal_function_3d custom_factor(const coord_3d& B, const std::vector<coord_3d>& vv,\n\t\t\tconst double extra_exponent=1.0) const {\n\t\tconst double absB=B.normf();\n\t\tif (absB==0.0) return real_factory_3d(world).functor([](const coord_3d& r){return 1.0;}).truncate_on_project();\n\t\tconst double& ee=extra_exponent;\n\t\tauto diamagnetic_HO = [&absB, &B, &vv, &ee](const coord_3d& r) {\n\t\t\tdouble result=0.0;\n\t\t\tconst coord_3d A=0.5*cross(B,r);\n\t\t\tfor (auto& v : vv) {\n\t\t\t\tcoord_3d arg=A-v;\n\t\t\t\tresult+=exp(-1.0/absB*inner(arg,arg));\n\t\t\t}\n\t\t\tif (ee!=1.0) result=std::pow(result,ee);\n\t\t\treturn result;\n\t\t};\n\t\treal_function_3d result=real_factory_3d(world).functor(diamagnetic_HO);\n\t\treturn result;\n\t}\n\n\n\t/// return a custom factor for a given magnetic field\n\tcomplex_function_3d factor_with_phase(const coord_3d& B, const std::vector<coord_3d>& vv) const {\n\t\tconst double absB=B.normf();\n\t\tif (absB==0.0) return complex_factory_3d(world).functor([](const coord_3d& r){return 1.0;}).truncate_on_project();\n\t\tauto diamagnetic_HO = [&absB, &B, &vv](const coord_3d& r) {\n\t\t\tdouble result=0.0;\n\t\t\tconst coord_3d A=0.5*cross(B,r);\n\t\t\tfor (auto& v : vv) {\n\t\t\t\tcoord_3d arg=A-v;\n\t\t\t\tresult+=exp(-1.0/absB*inner(arg,arg));\n\t\t\t}\n\t\t\tdouble theta=acos(r[2]/r.normf());\n\t\t\tdouble phi=atan2(r[1],r[0]);\n\t\t\tdouble_complex phase=r.normf()*sin(theta)*exp(absB*double_complex(0.0,1.0)*phi);\n\t\t\treturn result*phase;\n\t\t};\n\t\tcomplex_function_3d result=complex_factory_3d(world).functor(diamagnetic_HO);\n\t\treturn result;\n\t}\n\n\t/// compute the bare potential without confinement or factors\n\treal_function_3d bare_diamagnetic_potential() const {\n\t\tMADNESS_ASSERT(B_along_z(physical_B));\n\t\tconst double b_square=inner(physical_B,physical_B);\n\t\treal_function_3d result=real_factory_3d(world)\n\t\t\t\t.functor([& b_square](const coord_3d& r){return 0.125*b_square*(r[0]*r[0] + r[1]*r[1]);});\n\t\treturn result;\n\t}\n\n\t/// apply the diamagnetic potential on rhs\n\tstd::vector<complex_function_3d> apply_potential(const std::vector<complex_function_3d>& rhs) const;\n\n\t/// make sure the magnetic field is oriented along the z axis\n\tstatic bool B_along_z(const coord_3d& B) {\n\t\treturn((B[0]==0.0) && (B[1]==0.0));\n\t}\n\n\tstd::vector<coord_3d> get_v() const {return v;}\n\tstd::vector<coord_3d> get_coords() const {return coords;}\n\n\tcoord_3d get_explicit_B() const {return explicit_B;}\n\n\tcoord_3d get_physical_B() const {return physical_B;}\n\n\t/// given the explicit and the physical B, estimate the radius\n\t/// of the wave function\n\tdouble estimate_wavefunction_radius(const double eps=1.e-8) const {\n\t\tdouble remaining_B=(get_physical_B()-get_explicit_B()).normf();\n\t\treturn 2.0*sqrt(-log(eps)/remaining_B);\n\t}\n\nprivate:\n\tWorld& world;\t\t\t\t///< the world\n\tcoord_3d physical_B={0,0,0};\t\t///< the actual magnetic field strength\n\tcoord_3d explicit_B={0,0,0};\t\t///< the magnetic field strength encoded in the diamagnetic factor\n\n\t/// the diamagnetic factor to cancel the diamagnetic potential\n\treal_function_3d diamagnetic_factor_;\n\treal_function_3d diamagnetic_factor_square;\n\n\t/// radius where the diamagnetic potential flattens out\n\tdouble potential_radius;\n\n\t/// the boxed diamagnetic potential (for a given B)\n\treal_function_3d diamagnetic_U2;\n\tstd::vector<real_function_3d> diamagnetic_U1;\n\n\t/// the position of the nuclei in the coordinate space:\n\tstd::vector<coord_3d> coords;\n\n\t/// the position of the nuclei in the \"A\" space: v = 1/2 B cross R\n\tstd::vector<coord_3d> v;\n\n\tbool use_v_vector=true;\n\npublic:\n\t/// recompute the factor and the potentials for given physical and explicit magnetic fields\n\tvoid recompute_factors_and_potentials();\n\n\t/// compute the commutator of the orbital-zeeman term with the diamagnetic factor\n\n\t/// @return\ta local potential: iB \\sum_i \\vec r \\cdot \\vec v_i\n\tcomplex_function_3d compute_lz_commutator() const;\n\n\treal_function_3d compute_U2() const;\n\treal_function_3d compute_R_times_T_commutator_scalar_term_numerically() const;\n\n\t/// returns \\f$R^{-1} \\vec\\nabla R\\f$\n\tstd::vector<real_function_3d> compute_nabla_R_div_R() const;\n\n\t/// run the tests\n\n\t/// @param[in]\tlevel: 1: basic tests, .. , 3: all the tests\n\tbool test_me(const int level) const {\n\t\tbool success=true;\n\t\tif ((level<1) or (level>3)) {\n\t\t\tprint(\"testing diamagneticpotentialfactor with an invalid level of \",level);\n\t\t}\n\t\tif (level<2) {\n\t\t\tsuccess=test_factor() and success;\n\t\t\tsuccess=test_lz_commutator() and success;\n\t\t\tsuccess=test_harmonic_potential() and success;\n\t\t\tsuccess=test_scalar_potentials() and success;\n\t\t\tsuccess=test_vector_potentials() and success;\n\t\t}\n\t\tif (level<3) {\n\t\t\t;\n\t\t}\n\t\tif (level<4) {\n\t\t\t;\n\t\t}\n\t\treturn success;\n\t}\n\nprivate:\n\n\n\t/// compute a factor for comparison in coordinate space\n\tbool test_factor() const;\n\n\t/// test the harmonic potential\n\tbool test_harmonic_potential() const;\n\n\t/// test analytical vs numerical computation of the potentials\n\tbool test_scalar_potentials() const;\n\n\t/// test analytical vs numerical computation of the potentials\n\tbool test_vector_potentials() const;\n\n\tbool test_lz_commutator() const;\n\npublic:\n\t/// make a set orbitals for testing (not orthonormalized!)\n\tstd::vector<complex_function_3d> make_fake_orbitals(const int n,\n\t\t\tconst coord_3d& offset={0.0,0.0,0.0}) const;\n\n\t/// compute the radius for the diamagnetic potential\n\tdouble get_potential_radius() const {\n\t\treturn potential_radius;\n\t}\n\n};\n\n\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_DIAMAGNETICPOTENTIALFACTOR_H_ */\n"
  },
  {
    "path": "src/madness/chem/distpm.cc",
    "content": "#include <madness/madness_config.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/lbdeux.h>\n#include <madness/world/MADworld.h>\n#include <madness/misc/ran.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/systolic.h>\n#include<madness/chem/distpm.h>\n\n#include <utility>\n#include <vector>\n\n//#ifdef HAVE_INTEL_TBB\n//#define NTHREAD 1\n//#else\n#define NTHREAD ThreadPool::size()+1\n//#endif\n\nnamespace madness {\n\ntypedef Tensor<double> tensorT;\ntypedef Function<double,3> functionT;\ntypedef std::vector<functionT> vecfuncT;\n\n/// Simple (?) version of BLAS-1 DROT(N, DX, INCX, DY, INCY, DC, DS)\nvoid drot(long n, double* MADNESS_RESTRICT a, double* MADNESS_RESTRICT b, double s, double c, long inc) {\n    if (inc == 1) {\n        for (long i=0; i<n; ++i) {\n            double aa = a[i]*c - b[i]*s;\n            double bb = b[i]*c + a[i]*s;\n            a[i] = aa;\n            b[i] = bb;\n        }\n    }\n    else {\n        for (long i=0; i<(n*inc); i+=inc) {\n            double aa = a[i]*c - b[i]*s;\n            double bb = b[i]*c + a[i]*s;\n            a[i] = aa;\n            b[i] = bb;\n        }\n    }\n}\n\ntemplate <typename T, std::size_t NDIM>\nvoid matrix_inner(DistributedMatrix<T>& A,\n                  const std::vector< Function<T,NDIM> >& f,\n                  const std::vector< Function<T,NDIM> >& g,\n                  bool sym=false)\n{\n    const int64_t n = A.coldim();\n    const int64_t m = A.rowdim();\n    MADNESS_ASSERT(int64_t(f.size()) == n && int64_t(g.size()) == m);\n\n    // Assume we can always create an ichunk*jchunk matrix locally\n    const int ichunk = 1000;\n    const int jchunk = 1000; // 1000*1000*8 = 8 MBytes\n    for (int64_t ilo=0; ilo<n; ilo+=ichunk) {\n        int64_t ihi = std::min(ilo + ichunk, n);\n        std::vector< Function<T,NDIM> > ivec(f.begin()+ilo, f.begin()+ihi);\n        for (int64_t jlo=0; jlo<m; jlo+=jchunk) {\n            int64_t jhi = std::min(jlo + jchunk, m);\n            std::vector< Function<T,NDIM> > jvec(g.begin()+jlo, g.begin()+jhi);\n\n            Tensor<T> P = matrix_inner(A.get_world(),ivec,jvec);\n            A.copy_from_replicated_patch(ilo, ihi-1, jlo, jhi-1, P);\n        }\n    }\n}\n\n// Computes sum(mu,nu on atom a) C[mu,i] S[mu,nu] C[nu,j]\nstatic inline double PM_q(const tensorT & S, const double * MADNESS_RESTRICT Ci, const double * MADNESS_RESTRICT Cj, int lo, int nbf)\n{\n    double qij = 0.0;\n    if (nbf == 1) { // H atom in STO-3G ... often lots of these!\n        qij = Ci[lo]*S(0,0)*Cj[lo];\n    }\n    else {\n        for(int mu = 0;mu < nbf;++mu){\n            double Smuj = 0.0;\n            for(int nu = 0;nu < nbf;++nu){\n                Smuj += S(mu, nu) * Cj[nu + lo];\n            }\n            qij += Ci[mu + lo] * Smuj;\n        }\n    }\n\n    return qij;\n}\n\n// Given a rotation matrix U, re-order rows to make the matrix more diagonal corresponding to least rotation\nclass SystolicFixOrbitalOrders : public SystolicMatrixAlgorithm<double> {\n    AtomicInt nswitched;\n\npublic:\n    SystolicFixOrbitalOrders(DistributedMatrix<double>& U, int tag=5556)\n        : SystolicMatrixAlgorithm<double>(U, tag, NTHREAD)\n    {}\n\n    void start_iteration_hook(const TaskThreadEnv& env) {\n        if (env.id() == 0) nswitched = 0;\n    }\n\n    void end_iteration_hook(const TaskThreadEnv& env) {\n        if (env.id() == 0) {\n            int nsw = nswitched;\n            SystolicMatrixAlgorithm<double>::get_world().gop.sum(nsw);\n            nswitched = nsw;\n        }\n    }\n\n    bool converged(const TaskThreadEnv& env) const {\n        return nswitched == 0;\n    }\n\n    void kernel(int i, int j, double * MADNESS_RESTRICT Ui, double * MADNESS_RESTRICT Uj) {\n        const int m = get_rowdim();\n        double sold = Ui[i]*Ui[i] + Uj[j]*Uj[j];\n        double snew = Ui[j]*Ui[j] + Uj[i]*Uj[i];\n        if (snew > sold) {\n            nswitched++;\n            //print(\"rotation\", i, j, sold, snew);\n            double tmp[m];\n            memcpy(tmp, Ui, m*sizeof(double));\n            memcpy(Ui, Uj, m*sizeof(double));\n            memcpy(Uj, tmp, m*sizeof(double));\n        }\n        // While here fix the phases\n        if (Ui[i] < 0) {\n            //print(\"fixing sign\", i);\n            for (int i=0; i<m; i++) Ui[i]*=-1.0;\n        }\n        if (Uj[j] < 0) {\n            //print(\"fixing sign\", j);\n            for (int j=0; j<m; j++) Uj[j]*=-1.0;\n        }\n    }\n};\n\nclass SystolicPMOrbitalLocalize : public SystolicMatrixAlgorithm<double> {\n    const std::vector<int>& set;\n    const std::vector<int>& at_to_bf;\n    const std::vector<int>& at_nbf;\n    const std::vector<tensorT>& Svec;\n    const double thresh;\n    const double thetamax;\n    double tol;\n    const int natom;\n    const int nao;\n    const int nmo;\n    int iter;\n    AtomicInt ndone_iter;\n\n\n    // Applies rotation between orbitals i and j for Pipek Mezy\n    void localize_PM_ij(const int seti, const int setj,\n                        double * MADNESS_RESTRICT Ci, double * MADNESS_RESTRICT Cj,\n                        double * MADNESS_RESTRICT Ui, double * MADNESS_RESTRICT Uj)\n    {\n        if(seti == setj){\n            std::vector<double> Qi(natom), Qj(natom);\n            double ovij = 0.0;\n            for(long a = 0; a < natom; ++a) {\n                Qi[a] = PM_q(Svec[a], Ci, Ci, at_to_bf[a], at_nbf[a]);\n                Qj[a] = PM_q(Svec[a], Cj, Cj, at_to_bf[a], at_nbf[a]);\n                ovij += fabs(Qi[a] * Qj[a]);\n            }\n\n            if(ovij > tol * tol){\n                double aij = 0.0;\n                double bij = 0.0;\n                for(long a = 0;a < natom;++a){\n                    double qiia = Qi[a];\n                    double qija = PM_q(Svec[a], Ci, Cj, at_to_bf[a], at_nbf[a]);\n                    double qjja = Qj[a];\n                    double d = qiia - qjja;\n                    aij += qija * qija - 0.25 * d * d;\n                    bij += qija * d;\n                }\n\n\t\t// double theta = 0.25*bij/aij; // initial estimate for step restriction\n\t\t// if (theta > thetamax) {\n\t\t//   theta = thetamax;\n\t\t// }\n\t\t// else if (theta < -thetamax) {\n\t\t//   theta = -thetamax;\n\t\t// }\n\t\t// else {\n\t\t//   theta = 0.25*atan(bij/aij);\n\t\t// }\n\n\t\tdouble theta, fa=fabs(aij), fb=fabs(bij), r=fb/aij;\n\t\t// Full formula loses accuracy for b<<a. use taylor series instead\n\t\tif (fb < 1e-2*fa) {\n                    theta = -0.25*r*(1.0 - r*r/3.0 + r*r*r*r/5.0);\n                    //theta = -0.25*fabs(bij)/aij;\n\t\t}\n\t\telse {\n\t\t  theta = 0.25 * acos(-aij / sqrt(aij * aij + bij * bij));\n\t\t}\n\t\t\n                if(bij > 0.0) theta = -theta;\n\n                if(theta > thetamax)\n                    theta = thetamax;\n                else if(theta < -thetamax)\n\t\t    theta = -thetamax;\n\n\t\tif(fabs(theta) >= tol){\n\t\t    //print(theta, aij, bij);\n\t\t    ndone_iter++;\n                    double c = cos(theta);\n                    double s = sin(theta);\n                    drot(nao, Ci, Cj, s, c, 1);\n                    drot(nmo, Ui, Uj, s, c, 1);\n                    // for(long a = 0;a < natom;++a){\n                    //     Qi[a] = PM_q(Svec[a], Ci, Ci, at_to_bf[a], at_nbf[a]);\n                    //     Qj[a] = PM_q(Svec[a], Cj, Cj, at_to_bf[a], at_nbf[a]);\n                    // }\n                }\n            }\n        }\n    }\n\n\npublic:\n\n    // A[i,...] = [ C[i,...],  U[i,...], Q[i,...] ]\n    SystolicPMOrbitalLocalize(DistributedMatrix<double>& A,\n                              const std::vector<int>& set,\n                              const std::vector<int>& at_to_bf,\n                              const std::vector<int>& at_nbf,\n                              const std::vector<tensorT>& Svec,\n                              double thresh,\n                              double thetamax,\n                              int natom,\n                              int nao,\n                              int nmo,\n                              int tag=5555)\n    : SystolicMatrixAlgorithm<double>(A, tag, NTHREAD),\n          set(set),\n          at_to_bf(at_to_bf),\n          at_nbf(at_nbf),\n          Svec(Svec),\n          thresh(thresh),\n          thetamax(thetamax),\n          tol(0.1),\n          natom(natom),\n          nao(nao),\n          nmo(nmo),\n          iter(-1)\n    {\n        MADNESS_ASSERT(A.is_column_distributed());\n        MADNESS_ASSERT(A.coldim() == nmo);\n        MADNESS_ASSERT(A.rowdim() == nao + nmo);\n    }\n\n    void start_iteration_hook(const TaskThreadEnv& env) {\n        if (env.id() == 0) {\n            iter++;\n            //if (iter > 0) tol = std::max(0.1 * std::min(maxtheta, tol), thresh);\n            if (iter > 0) tol = std::max(0.333 * tol, thresh);\n            ndone_iter = 0;\n            //madness::print(\"start\", SystolicMatrixAlgorithm::get_world().rank(),iter,tol);\n        }\n    }\n\n    void end_iteration_hook(const TaskThreadEnv& env) {\n        if(env.id() == 0) {\n            int ndone = ndone_iter;\n            SystolicMatrixAlgorithm<double>::get_world().gop.sum(ndone);\n            ndone_iter = ndone;\n            //madness::print(\"end\", SystolicMatrixAlgorithm::get_world().rank(),iter,ndone);\n        }\n    }\n\n    bool converged(const TaskThreadEnv& env) const {\n        //if (env.id() == 0) madness::print(\"converged\", SystolicMatrixAlgorithm::get_world().rank(),iter,int(ndone_iter), tol, thresh, (ndone_iter == 0 && tol == thresh));\n        return (ndone_iter == 0 && tol == thresh);\n    }\n\n    void kernel(int i, int j, double * MADNESS_RESTRICT rowi, double * MADNESS_RESTRICT rowj) {\n\n        double * MADNESS_RESTRICT Ci = rowi;\n        double * MADNESS_RESTRICT Cj = rowj;\n        double * MADNESS_RESTRICT Ui = Ci + nao;\n        double * MADNESS_RESTRICT Uj = Cj + nao;\n\n        localize_PM_ij(set[i], set[j],\n                       Ci, Cj,\n                       Ui, Uj);\n    }\n};\n\n\nDistributedMatrix<double> distributed_localize_PM(World & world,\n                                                  const vecfuncT & mo,\n                                                  const vecfuncT & ao,\n                                                  const std::vector<int> & set,\n                                                  const std::vector<int> & at_to_bf,\n                                                  const std::vector<int> & at_nbf,\n                                                  const double thresh,\n                                                  const double thetamax,\n                                                  const bool randomize,\n                                                  const bool doprint)\n{\n    // Make Svec ... this can be much more efficient!\n    tensorT S = matrix_inner(world, ao, ao, true);\n    long nmo = mo.size();\n    long nao = S.dim(0);\n    long natom = at_to_bf.size();\n\n    std::vector<tensorT> Svec(natom);\n    for(long a = 0; a < natom; ++a){\n        Slice as(at_to_bf[a], at_to_bf[a] + at_nbf[a] - 1);\n        Svec[a] = copy(S(as, as));\n    }\n    S = tensorT();\n\n    // Make initial matrices\n    DistributedMatrix<double> dU = column_distributed_matrix<double>(world, nmo, nmo);\n    dU.fill_identity();\n\n    DistributedMatrix<double> dC = column_distributed_matrix<double>(world, nmo, nao);\n    matrix_inner(dC, mo, ao);\n\n    DistributedMatrix<double> dA = concatenate_rows(dC,dU);\n\n    // Run the systolic algorithm\n    world.taskq.add(new SystolicPMOrbitalLocalize(dA, set, at_to_bf, at_nbf, Svec, thresh, thetamax, natom, nao, nmo));\n    world.taskq.fence();\n\n    //print(\"DONE\",world.rank());\n\n    // Copy the data out\n    Tensor<double> A(nmo, nao+nmo+natom);\n    //    dA.copy_to_replicated(A);\n    //U(___) = A(_,Slice(nao,nao+nmo-1));\n\n\n    dA.extract_columns(nao,nmo+nao-1,dU);\n\n    // Fix orbital orders in parallel\n    world.taskq.add(new SystolicFixOrbitalOrders(dU));\n    world.taskq.fence();\n\n    return dU;\n\n    //tensorT U(nmo, nmo);\n    //dU.copy_to_replicated(U);\n    //U = transpose(U);\n\n    // if(world.rank() == 0){\n    //     // Fix orbital orders\n    //     bool switched = true;\n    //     while (switched) {\n    //         switched = false;\n    //         for (int i=0; i<nmo; i++) {\n    //     \tfor (int j=i+1; j<nmo; j++) {\n    //                 if (set[i] == set[j]) {\n    //                     double sold = U(i,i)*U(i,i) + U(j,j)*U(j,j);\n    //                     double snew = U(i,j)*U(i,j) + U(j,i)*U(j,i);\n    //                     if (snew > sold) {\n    //                         tensorT tmp = copy(U(_,i));\n    //                         U(_,i) = U(_,j);\n    //                         U(_,j) = tmp;\n    //                         switched = true;\n    //                     }\n    //                 }\n    //     \t}\n    //         }\n    //     }\n\n    //     // Fix phases.\n    //     for (long i=0; i<nmo; ++i) {\n    //         if (U(i,i) < 0.0) U(_,i).scale(-1.0);\n    //     }\n    // }\n    // world.gop.broadcast(U.ptr(), U.size(), 0);\n    //return U;\n}\n\n}\n"
  },
  {
    "path": "src/madness/chem/distpm.h",
    "content": "#ifndef MADNESS_DISTPM_H\n#define MADNESS_DISTPM_H\n\n#include<madness/chem/MolecularOrbitals.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/chem/molecule.h>\n#include <madness/tensor/distributed_matrix.h>\n\n\nnamespace madness {\n\nextern DistributedMatrix<double> distributed_localize_PM(World& world,\n                                                         const std::vector<Function<double, 3>>& mo,\n                                                         const std::vector<Function<double, 3>>& ao,\n                                                         const std::vector<int>& set,\n                                                         const std::vector<int>& at_to_bf,\n                                                         const std::vector<int>& at_nbf,\n                                                         const double thresh = 1e-9,\n                                                         const double thetamax = 0.5,\n                                                         const bool randomize = true,\n                                                         const bool doprint = false);\n}\n\n#endif // MADNESS_DISTPM_H\n"
  },
  {
    "path": "src/madness/chem/electronic_correlation_factor.h",
    "content": "/*\n * electronic_correlation_factor.h\n *\n *  Created on: Jul 9, 2015\n *      Author: fbischoff\n */\n\n#ifndef SRC_APPS_CHEM_ELECTRONIC_CORRELATION_FACTOR_H_\n#define SRC_APPS_CHEM_ELECTRONIC_CORRELATION_FACTOR_H_\n\n\n\n#include <madness/mra/mra.h>\n#include <madness/mra/lbdeux.h>\n#include<madness/chem/molecule.h>\n#include <iomanip>\n\nnamespace madness {\n/// a class holding the electronic correlation factor for R12 theory\nclass CorrelationFactor {\n\n    World& world;\n    double _gamma;      ///< the correlation factor exp(-gamma r12)\n    double dcut;        ///< the cutoff for the 1/r potential\n    double lo;          ///< smallest length scale to be resolved\n\npublic:\n\n    /// ctor, use negative gamma for linear correlation factor r12\n    CorrelationFactor(World& world) : world(world), _gamma(-1.0), dcut(1.e-10),\n        lo(1.e-10) {\n    }\n\n    /// ctor, use negative gamma for linear correlation factor r12\n    CorrelationFactor(World& world, const double& gamma, const double dcut,\n            const Molecule& molecule) : world(world), _gamma(gamma), dcut(dcut) {\n        lo=1.e-6;//lo = molecule.smallest_length_scale();\n//        if (world.rank()==0) {\n//            if (gamma>0.0) print(\"constructed correlation factor with gamma=\",gamma);\n//            else if (gamma==0.0) print(\"constructed linear correlation factor\");\n//        }\n    }\n    /// ctor, use negative gamma for linear correlation factor r12\n    CorrelationFactor(World& world, const double& gamma, const double dcut,\n            const double lo) : world(world), _gamma(gamma), dcut(dcut), lo(lo) {\n//        if (world.rank()==0) {\n//            if (gamma>0.0) print(\"constructed correlation factor with gamma=\",gamma);\n//            else if (gamma==0.0) print(\"constructed linear correlation factor\");\n//        }\n    }\n\n    /// copy ctor\n    CorrelationFactor(const CorrelationFactor& other) : world(other.world) {\n        _gamma=other._gamma;\n        dcut=other.dcut;\n        lo=other.lo;\n    }\n\n    /// assignment; assume other's world is this world\n    CorrelationFactor& operator=(const CorrelationFactor& other) {\n        _gamma=other._gamma;\n        dcut=other.dcut;\n        lo=other.lo;\n        return *this;\n    }\n\n    /// return the exponent of this correlation factor\n    double gamma() const {return _gamma;}\n\n    /// return the value of the correlation factor\n    double operator()(const coord_6d& r) const {\n        const double rr=r12(r);\n        if (_gamma>0.0) return (1.0-exp(-_gamma*rr))/(2.0*_gamma);\n        return 0.5*rr;\n    }\n\n    /// apply Kutzelnigg's regularized potential to an orbital product\n    real_function_6d apply_U(const real_function_3d& phi_i, const real_function_3d& phi_j,\n            const real_convolution_6d& op_mod, const bool symmetric=false) const {\n\t  if(not op_mod.modified()) MADNESS_EXCEPTION(\"ElectronicCorrelationFactor::apply_U, op_mod must be in modified_NS form\",1);\n\t  const double thresh = FunctionDefaults<6>::get_thresh();\n\t  const bool debug = false;\n\t  if(symmetric) MADNESS_ASSERT((phi_i-phi_j).norm2() < FunctionDefaults<3>::get_thresh());\n\n        real_function_6d result=real_factory_6d(world);\n\n        for (int axis=0; axis<3; ++axis) {\n            //if (world.rank()==0) print(\"working on axis\",axis);\n            real_derivative_3d D = free_space_derivative<double,3>(world, axis);\n            const real_function_3d Di=(D(phi_i)).truncate();\n            real_function_3d Dj;\n            if(symmetric) Dj=madness::copy(Di);\n            else Dj=(D(phi_j)).truncate();\n\n            real_function_6d u=U1(axis);\n            real_function_6d tmp1=CompositeFactory<double,6,3>(world)\n                        .g12(u).particle1(copy(Di)).particle2(copy(phi_j)).thresh(thresh);\n            tmp1.fill_cuspy_tree(op_mod).truncate();\n\n            real_function_6d tmp2;\n            if(symmetric) tmp2 = -1.0*swap_particles(tmp1);\n            else{\n            tmp2=CompositeFactory<double,6,3>(world)\n                                    .g12(u).particle1(copy(phi_i)).particle2(copy(Dj)).thresh(thresh);\n            tmp2.fill_cuspy_tree(op_mod).truncate();\n            }\n\n            result=result+(tmp1-tmp2).truncate();\n\n\n            tmp1.clear();\n            tmp2.clear();\n            world.gop.fence();\n            result.truncate().reduce_rank();\n        }\n\n        // include the purely local potential that (partially) cancels 1/r12\n        if (_gamma>0.0) {\n            fg_ func(_gamma,dcut);\n            real_function_6d fg3=real_factory_6d(world).functor(func).is_on_demand();\n            real_function_6d mul=CompositeFactory<double,6,3>(world)\n                                .g12(fg3).particle1(copy(phi_i)).particle2(copy(phi_j)).thresh(thresh);;\n            mul.fill_cuspy_tree(op_mod).truncate();\n            // mul.print_size(\"mul\");\n\n            result=(result+mul).truncate().reduce_rank();\n        }\n        if(debug) result.print_size(\"Ue|ij>\");\n        return result;\n    }\n\n    /// return the U1 term of the correlation function\n    real_function_6d U1(const int axis) const {\n        U func(_gamma,axis,dcut);\n        const real_function_6d u1=real_factory_6d(world)\n                .functor(func).is_on_demand();\n        return u1;\n    }\n\n    /// return the U1 term of the correlation function\n    real_function_6d U2() const {\n        if (world.rank()==0) print(\"U2 for the electronic correlation factor\");\n        if (world.rank()==0) print(\"is expensive -- do you really need it??\");\n        MADNESS_EXCEPTION(\"U2() not implemented, since it might be expensive\",1);\n        return real_factory_6d(world);\n    }\n\n    /// return the correlation factor as on-demand function\n    real_function_6d f() const {\n//        real_function_6d tmp=real_factory_6d(world).functor2(*this).is_on_demand();\n        double thresh=FunctionDefaults<3>::get_thresh();\n        real_function_6d tmp=TwoElectronFactory(world)\n                .dcut(dcut).gamma(_gamma).f12().thresh(thresh);\n        return tmp;\n    }\n\n    /// return f^2 as on-demand function\n    real_function_6d f2() const {\n        f2_ func(_gamma);\n        real_function_6d tmp=real_factory_6d(world).functor(func).is_on_demand();\n        return tmp;\n    }\n\n    /// return fg+sth as on-demand function\n    real_function_6d fg() const {\n        fg_ func(_gamma,dcut);\n        real_function_6d tmp=real_factory_6d(world).functor(func).is_on_demand();\n        return tmp;\n    }\n\n    /// return f/r as on-demand function\n    real_function_6d f_over_r() const {\n        f_over_r_ func(_gamma,dcut);\n        real_function_6d tmp=real_factory_6d(world).functor(func).is_on_demand();\n        return tmp;\n    }\n\n    /// return (\\nabla f)^2 as on-demand functions\n    real_function_6d nablaf2() const {\n        nablaf2_ func(_gamma);\n        real_function_6d tmp=real_factory_6d(world).functor(func).is_on_demand();\n        return tmp;\n    }\n\nprivate:\n    /// functor for the local potential (1-f12)/r12 + sth (doubly connected term of the commutator)\n\n    /// TODO: turn this into coeffs directly\n    struct fg_ : FunctionFunctorInterface<double,6> {\n        double gamma;\n        double dcut;\n        fg_(double gamma, double dcut) : gamma(gamma), dcut(dcut) {\n            MADNESS_ASSERT(gamma>0.0);\n        }\n        double operator()(const coord_6d& r) const {\n            const double rr=r12(r);\n            const double e=exp(-gamma*rr);\n            if (rr<5.e-2) {\n                double value= 1.5*gamma - 1.*std::pow(gamma,2)*rr + 0.41666666666666663*std::pow(gamma,3)*std::pow(rr,2) -\n                    0.125*std::pow(gamma,4)*std::pow(rr,3) + 0.029166666666666667*std::pow(gamma,5)*std::pow(rr,4)\n                       + 0.005555555555555556*std::pow(gamma,6)*std::pow(rr,5) +\n                    0.0008928571428571429*std::pow(gamma,7)*std::pow(rr,6);\n                return value;\n            } else {\n                // return (1.0-e)*u(rr,dcut) + 0.5*gamma*e;\n                return (1.0-e)/rr + 0.5*gamma*e;\n            }\n        }\n    };\n\n    /// functor for the local potential (1-f12)/r12\n    struct f_over_r_ : FunctionFunctorInterface<double,6>  {\n        double gamma;\n        double dcut;\n        f_over_r_(double gamma, double dcut) : gamma(gamma), dcut(dcut) {\n            MADNESS_ASSERT(gamma>0.0);\n        }\n        double operator()(const coord_6d& r) const {\n            const double rr=r12(r);\n            const double e=exp(-gamma*rr);\n            return (1.0-e)*u(rr,dcut)/(2.0*gamma);\n        }\n    };\n\n    /// functor for the local part of the regularized potential: f12/r12*(r1-r2)(D1-D2)\n    struct U : FunctionFunctorInterface<double,6>  {\n        double gamma;\n        int axis;\n        double dcut;\n        U(double gamma, int axis, double dcut) : gamma(gamma), axis(axis),\n            dcut(dcut) {\n            MADNESS_ASSERT(axis>=0 and axis<3);\n        }\n        double operator()(const coord_6d& r) const {\n            const double rr=r12(r);\n            const coord_3d vr12{r[0]-r[3],r[1]-r[4],r[2]-r[5]};\n            const coord_3d N=unitvec(vr12);\n            if (gamma>0.0) return -0.5*exp(-gamma*rr)*N[axis];\n            MADNESS_EXCEPTION(\"no gamma in electronic corrfac::U1\",1);\n//          const double rr=r12(r);\n//            const double g12=u(rr,dcut);\n//            double a=0.5;\n//            if (gamma>0.0) a=0.5*exp(-gamma*rr);\n//            return -a*x12(r,axis) * g12;\n        }\n    };\n\n    /// functor for the local potential (1-f12)^2\n    struct f2_ : FunctionFunctorInterface<double,6>  {\n        double gamma;\n        f2_(double gamma) : gamma(gamma) {MADNESS_ASSERT(gamma>0.0);}\n        double operator()(const coord_6d& r) const {\n            const double rr=r12(r);\n            const double e=exp(-gamma*rr);\n            const double f=(1.0-e)/(2.0*gamma);\n            return f*f;\n        }\n    };\n\n    /// functor for the local potential (\\nabla f)^2\n    struct nablaf2_ : FunctionFunctorInterface<double,6>  {\n        double gamma;\n        nablaf2_(double gamma) : gamma(gamma) {\n            MADNESS_ASSERT(gamma>0.0);\n            MADNESS_ASSERT(gamma==1.0);\n        }\n        double operator()(const coord_6d& r) const {\n            const double rr=r12(r);\n            const double f=exp(-2.0*gamma*rr)/(4.0*gamma*gamma);\n            return f;\n        }\n    };\n\n    /// Smoothed 1/r potential (c is the smoothing distance)\n    static double u(double r, double c) {\n        r = r/c;\n        double r2 = r*r, pot;\n        if (r > 6.5){\n            pot = 1.0/r;\n        } else if (r > 1e-2) {\n            pot = erf(r)/r + exp(-r2)*0.56418958354775630;\n        } else{\n            pot = 1.6925687506432689-r2*(0.94031597257959381-r2*(0.39493270848342941-0.12089776790309064*r2));\n        }\n        return pot/c;\n    }\n\n    static double r12(const coord_6d& r) {\n        const double x12=r[0]-r[3];\n        const double y12=r[1]-r[4];\n        const double z12=r[2]-r[5];\n        const double r12=sqrt(x12*x12 + y12*y12 + z12*z12);\n        return r12;\n    }\n    static double x12(const coord_6d& r, const int axis) {\n        return r[axis]-r[axis+3];\n    }\n\n\tstatic coord_3d smoothed_unitvec(const coord_3d& xyz, double smoothing) {\n//        if (smoothing==0.0) smoothing=molecule.get_eprec();\n        // TODO:need to test this\n        // reduce the smoothing for the unitvector\n        //if (not (this->type()==None or this->type()==Two)) smoothing=sqrt(smoothing);\n        const double r=xyz.normf();\n        const double cutoff=smoothing;\n        if (r>cutoff) {\n            return 1.0/r*xyz;\n        } else {\n            const double xi=r/cutoff;\n            const double xi2=xi*xi;\n            const double xi3=xi*xi*xi;\n//            const double nu21=0.5+1./32.*(45.*xi - 50.*xi3 + 21.*xi*xi*xi*xi*xi);\n            const double nu22=0.5 + 1./64.*(105* xi - 175 *xi3 + 147* xi2*xi3 - 45* xi3*xi3*xi);\n//            const double nu40=0.5 + 1./128.*(225 *xi - 350 *xi3 + 189*xi2*xi3);\n            const double kk=2.*nu22-1.0;\n            return kk/(r+1.e-15)*xyz;\n        }\n\t}\n};\n\n/// a class holding the electronic correlation factor for R12 theory\n/// CorrelationFactor2 = (1-0.5*exp(-gamma*r12), gamma=0.5\n/// (CorrelationFactor + 1)*2.0 = CorrelationFactor2 (currently CorrelationFactor2 is only implemented for gamma=0.5 so use this gamma also on CorrelationFactor\nclass CorrelationFactor2 {\n\n    World& world;\n    double _gamma;      ///< the correlation factor exp(-gamma r12)\n    typedef std::shared_ptr< FunctionFunctorInterface<double,6> > functorT;\n\npublic:\n\n    double dcut;        ///< the cutoff for the 1/r potential\n    double lo;          ///< smallest length scale to be resolved\n    double vtol;        ///< initial projection threshold\n\n\n    /// ctor, use negative gamma for linear correlation factor r12\n    CorrelationFactor2(World& world) : world(world), _gamma(0.5), dcut(1.e-10),\n        lo(1.e-10), vtol(FunctionDefaults<3>::get_thresh()*0.1) {\n        MADNESS_ASSERT(_gamma==0.5);\n    }\n\n    /// return the exponent of this correlation factor\n    double gamma() const {return _gamma;}\n\n    real_function_6d function() const {\n        functorT R=functorT(new R_functor(_gamma,1));\n        return real_factory_6d(world).functor(R).is_on_demand();\n    }\n\n    real_function_6d square() const {\n        functorT R2=functorT(new R_functor(_gamma,2));\n        return real_factory_6d(world).functor(R2).is_on_demand();\n    }\n\n    real_function_6d inverse() const {\n        functorT R=functorT(new R_functor(_gamma,-1));\n        return real_factory_6d(world).functor(R).is_on_demand();\n    }\n\n    /// return the U1 term of the correlation function\n    real_function_6d U1(const int axis) const {\n        functorT U1f=functorT(new U1_functor(_gamma,axis));\n        return real_factory_6d(world).functor(U1f).is_on_demand();\n    }\n\n    /// return the U2 term of the correlation function\n    real_function_6d U2() const {\n        functorT U2f=functorT(new U2_functor(_gamma));\n        return real_factory_6d(world).functor(U2f).is_on_demand();\n    }\n\n    /// apply Kutzelnigg's regularized potential to an orbital product\n    real_function_6d apply_U(const real_function_6d& psi, const double eps) const {\n        const double bsh_thresh=1.e-7;\n\n        real_function_6d result=real_factory_6d(world);\n\n        real_convolution_6d op_mod = BSHOperator<6>(world, sqrt(-2*eps), lo,bsh_thresh);\n        op_mod.modified()=true;\n\n        for (int axis=0; axis<3; ++axis) {\n            //if (world.rank()==0) print(\"working on axis\",axis);\n            real_derivative_6d D1 = free_space_derivative<double,6>(world, axis);\n            real_derivative_6d D2 = free_space_derivative<double,6>(world, axis+3);\n            const real_function_6d Drhs1=D1(psi).truncate();\n            const real_function_6d Drhs2=D2(psi).truncate();\n\n            const real_function_6d u1=U1(axis);\n\n            real_function_6d tmp1=CompositeFactory<double,6,3>(world)\n                                 .g12(u1).ket(copy(Drhs1));\n            tmp1.fill_cuspy_tree(op_mod).truncate();\n\n            real_function_6d tmp2=CompositeFactory<double,6,3>(world)\n                                 .g12(u1).ket(copy(Drhs2));\n            tmp2.fill_cuspy_tree(op_mod).truncate();\n           // if (world.rank()==0) print(\"done with fill_tree\");\n\n            result=result+(tmp1-tmp2).truncate();\n            tmp1.clear();\n            tmp2.clear();\n            world.gop.fence();\n            result.truncate().reduce_rank();\n\n           // if (world.rank()==0) printf(\"done with multiplication with U at ime %.1f\\n\",wall_time());\n           // result.print_size(\"result\");\n        }\n\n        real_function_6d u2=U2();\n        real_function_6d r2=CompositeFactory<double,6,3>(world).ket(copy(psi))\n                                    .g12(u2);\n        r2.fill_tree(op_mod);\n        result=(result+r2).truncate();\n        return result;\n    }\n\n\nprivate:\n\n    /// functor for the correlation factor R\n    class R_functor : public FunctionFunctorInterface<double,6> {\n        double gamma;\n        int exponent;\n\n\n    public:\n        R_functor(double gamma, int e=1) : gamma(gamma), exponent(e) {\n            MADNESS_ASSERT(gamma==0.5);\n        }\n\n        // only valid for gamma=1\n        double operator()(const coord_6d& r) const {\n            const double rr=r12(r);\n            double val=(1.0-0.5*exp(-gamma*rr));\n            if (exponent==1) return val;\n            else if (exponent==2) return val*val;\n            else if (exponent==-1) return 1.0/val;\n            else {\n                MADNESS_EXCEPTION(\"fancy exponent in correlationfactor2\",1);\n            }\n        }\n    };\n\n    /// functor for the U2 local potential\n    class U2_functor : public FunctionFunctorInterface<double,6> {\n        double gamma;\n\n    public:\n        U2_functor(double gamma) : gamma(gamma) {\n            MADNESS_ASSERT(gamma==0.5);\n        }\n\n        // only valid for gamma=1\n        double operator()(const coord_6d& r) const {\n            const double rr=r12(r);\n            // Taylor expansion for small r\n            if (rr<1.e-4) { // valid for gamma==0.5, otherwise singular\n                return (5./4.0 - rr + (35.0* rr*rr)/48.0 - (101.0*rr*rr*rr)/192.0);\n            }\n            const double egr=exp(-gamma*rr);\n            return -(-8.*egr + 8.0 + rr*egr)/(4.0 *rr*egr - 8 *rr);\n        }\n    };\n\n    /// functor for the U1 = -\\frac{\\vec\\nabla_1 f_{12}}{f_{12}}  potential\n\n    /// the potential is given by\n    /// U1 = -\\frac{\\vec\\nabla_1 f_{12}}{f_{12}}\n    ///    =  \\frac{e^{-r12/2}{4-2e^{-r12/2}} \\vec unitvec\n    /// the derivative operators are not included\n    class U1_functor : public FunctionFunctorInterface<double,6> {\n        double gamma;\n        int axis;\n\n    public:\n        U1_functor(double gamma, int axis) : gamma(gamma), axis(axis) {\n            MADNESS_ASSERT(gamma==0.5);\n            MADNESS_ASSERT(axis<3);\n        }\n\n        double operator()(const coord_6d& r) const {\n            const double rr=r12(r);\n            const coord_3d vr12{r[0]-r[3],r[1]-r[4],r[2]-r[5]};\n            const coord_3d N=unitvec(vr12);\n            // Taylor expansion for small r\n            double val;\n            if (rr<1.e-4) { // valid for gamma==0.5, otherwise singular\n                val = 0.5 - 0.5*rr + 0.125*(3.*rr*rr) - (13.* rr*rr*rr)/48.0;\n            } else {\n                const double egr=exp(-gamma*rr);\n                val=egr/(4.0-2.0*egr);\n            }\n            // NOTE the sign\n            return -val*N[axis];\n        }\n    };\n\n    /// helper function\n    static double r12(const coord_6d& r) {\n        const double x12=r[0]-r[3];\n        const double y12=r[1]-r[4];\n        const double z12=r[2]-r[5];\n        const double r12=sqrt(x12*x12 + y12*y12 + z12*z12);\n        return r12;\n    }\n\n};\n\n}\n\n\n\n#endif /* SRC_APPS_CHEM_ELECTRONIC_CORRELATION_FACTOR_H_ */\n"
  },
  {
    "path": "src/madness/chem/exchangeoperator.cc",
    "content": "#include<madness/chem/exchangeoperator.h>\n\n#include<madness/chem/SCF.h>\n#include<madness/chem/nemo.h>\n#include <madness/mra/macrotaskpartitioner.h>\n\nusing namespace madness;\n\nnamespace madness {\n\n\ntemplate<typename T, std::size_t NDIM>\nExchange<T, NDIM>::ExchangeImpl::ExchangeImpl(World& world, const SCF *calc, const int ispin)\n        : world(world), symmetric_(false), lo(calc->param.lo()) {\n\n    if constexpr (std::is_same_v<T,double_complex>) {\n        if (ispin == 0) { // alpha spin\n            mo_ket = convert<double, T, NDIM>(world, calc->amo);        // deep copy necessary if T==double_complex\n        } else if (ispin == 1) {  // beta spin\n            mo_ket = convert<double, T, NDIM>(world, calc->bmo);\n        }\n        mo_bra = conj(world, mo_ket);\n    } else {\n        if (ispin == 0) { // alpha spin\n            mo_ket = calc->amo;        // deep copy necessary if T==double_complex\n        } else if (ispin == 1) {  // beta spin\n            mo_ket = calc->bmo;\n        }\n        mo_bra = mo_ket;\n    }\n\n}\n\ntemplate<typename T, std::size_t NDIM>\nExchange<T, NDIM>::ExchangeImpl::ExchangeImpl(World& world, const Nemo *nemo,\n                            const int ispin) // @suppress(\"Class members should be properly initialized\")\n        : ExchangeImpl(world, nemo->get_calc().get(), ispin) {\n\n    if (ispin == 0) { // alpha spin\n        mo_ket = convert<double, T, NDIM>(world,\n                                          nemo->get_calc()->amo);        // deep copy necessary if T==double_complex\n    } else if (ispin == 1) {  // beta spin\n        mo_ket = convert<double, T, NDIM>(world,\n                                          nemo->get_calc()->bmo);        // deep copy necessary if T==double_complex\n    }\n\n    mo_bra = mul(world, nemo->ncf->square(), mo_ket);\n    truncate(world, mo_bra);\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T, NDIM> > Exchange<T, NDIM>::ExchangeImpl::operator()(\n        const std::vector<Function<T, NDIM> >& vket) const {\n\n    reconstruct(world, mo_bra, false);\n    reconstruct(world, mo_ket, false);\n    world.gop.fence();\n    norm_tree(world, mo_bra, false);\n    norm_tree(world, mo_ket, false);\n    world.gop.fence();\n\n    reconstruct(world, vket);\n    norm_tree(world, vket);\n\n    // pick your algorithm.\n    // Note that the macrotask algorithm partitions the exchange matrix into tiles. The final truncation\n    // takes place for each sum over tile elements, instead of the sum over all matrix elements.\n    // Truncation and addition doesn't commute, so truncation is done after the final accumulation.\n    // Other truncations are elementwise and are not affected.\n    reset_timer();\n    statistics=gather_statistics();\n    double cpu0=wall_time();\n    vecfuncT Kf;\n    if (algorithm_ == multiworld_efficient) {\n        Kf = K_macrotask_efficient(vket, mul_tol);\n    } else if (algorithm_ == multiworld_efficient_row or algorithm_ == fetch_compute) {\n        Kf = K_macrotask_efficient_row(vket, mul_tol);\n    } else if (algorithm_ == small_memory) {\n        Kf = K_small_memory(vket, mul_tol);     // Smaller memory algorithm ... possible 2x saving using i-j sym\n    } else if (algorithm_ == large_memory) {\n        Kf = K_large_memory(vket, mul_tol);\n    } else {\n        MADNESS_EXCEPTION(\"unknown algorithm in exchangeoperator\", 1);\n    }\n    if (printdebug()) {\n        auto size = get_size(world, Kf);\n        if (world.rank() == 0) print(\"total size of Kf before truncation\", size);\n    }\n    truncate(world, Kf);\n    if (printdebug()) {\n        auto size=get_size(world,Kf);\n        if (world.rank()==0) print(\"total size of Kf after truncation\",size);\n    }\n    double cpu1=wall_time();\n    elapsed_time=cpu1-cpu0;\n\n    if (printtimings_detail()) print_timer(world);\n    return Kf;\n}\n\n/// apply the exchange operator by tiling the exchange matrix\n\n/// compute the matrix N_{ik} = N \\phi_i \\phi_k by tiles, with i,k \\in batches A,B,\n/// do a local reduce within the tiles: K_{iB} = \\sum_{k \\in batch B} \\phi_k N_{ik}\n/// and a universe-wide reduce of the tiles: K\\phi_i = \\sum_{batches B} K_{iB}\n/// saving up to half of the cpu time compared to the naive algorithm\n/// \\tparam T       number type\n/// \\tparam NDIM    physical dimension of the argument vket\n/// \\param vf     argument of the exchange operator\n/// \\param mul_tol  cutoff parameter for sparse multiplication\n/// \\return         the exchange operator applied on vket\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T, NDIM> >\nExchange<T, NDIM>::ExchangeImpl::K_macrotask_efficient(const vecfuncT& vf, const double mul_tol) const {\n\n    if (world.rank()==0 and printdebug()) print(\"\\nentering macrotask_efficient version:\");\n\n    // the result is a vector of functions living in the universe\n    const long nresult = vf.size();\n    MacroTaskExchangeSimple xtask(nresult, lo, mul_tol, is_symmetric());\n    if (taskq) taskq->set_printlevel(printlevel);\n\n    // construct MacroTask with or without user-provided taskq -> deferred execution or immediate execution\n    auto mtask = (taskq) ? MacroTask(world, xtask, taskq)\n                 : MacroTask(world, xtask, MacroTaskQFactory(world).set_printlevel(printlevel).set_policy(macro_task_info));\n\n    // deferred execution if a taskq is provided by the user\n    vecfuncT Kf = mtask(vf, mo_bra, mo_ket);\n    world.gop.fence();\n    statistics=gather_statistics();\n    statistics[\"cloud\"]=mtask.get_taskq()->get_cloud_statistics();\n    statistics[\"macrotaskq\"]=mtask.get_taskq()->get_taskq_statistics();\n\n    return Kf;\n}\n\n/// compute each row of the exchange matrix in different subworlds\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T, NDIM> >\nExchange<T, NDIM>::ExchangeImpl::K_macrotask_efficient_row(const vecfuncT& vf, const double mul_tol) const {\n\n    if (world.rank()==0 and printdebug()) print(\"\\nentering macrotask_efficient_row version:\");\n\n    // the result is a vector of functions living in the universe\n    const long nresult = vf.size();\n    MacroTaskExchangeRow xtask(nresult, lo, mul_tol, algorithm_);\n\n    // print the size of the amos\n    if (printdebug()) {\n        auto size=get_size(world,vf);\n        if (world.rank()==0) print(\"total size of vf before iteration\",size);\n    }\n\n    if (taskq) taskq->set_printlevel(printlevel);\n\n    // construct MacroTask with or without user-provided taskq -> deferred execution or immediate execution\n    auto mtask = (taskq) ? MacroTask(world, xtask, taskq)\n                 : MacroTask(world, xtask, MacroTaskQFactory(world).set_printlevel(printlevel)\n                     .set_policy(macro_task_info));\n\n    // deferred execution if a taskq is provided by the user\n    vecfuncT Kf = mtask(vf, mo_bra, mo_ket);\n    world.gop.fence();\n    statistics=gather_statistics();\n    statistics[\"cloud\"]=mtask.get_taskq()->get_cloud_statistics();\n    statistics[\"macrotaskq\"]=mtask.get_taskq()->get_taskq_statistics();\n\n    return Kf;\n\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T, NDIM> > Exchange<T, NDIM>::ExchangeImpl::K_small_memory(const vecfuncT& vket, const double mul_tol) const {\n\n    const long nocc = mo_ket.size();\n    const long nf = vket.size();\n    vecfuncT Kf = zero_functions_compressed<T, NDIM>(world, nf);\n    auto poisson = set_poisson(world, lo);\n\n    for (int i = 0; i < nocc; ++i) {\n        vecfuncT psif = mul_sparse(world, mo_bra[i], vket, mul_tol); /// was vtol\n        truncate(world, psif);\n        psif = apply(world, *poisson.get(), psif);\n        truncate(world, psif);\n        psif = mul_sparse(world, mo_ket[i], psif, mul_tol); /// was vtol\n        gaxpy(world, 1.0, Kf, 1.0, psif);\n    }\n    truncate(world, Kf);\n    return Kf;\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T, NDIM> > Exchange<T, NDIM>::ExchangeImpl::K_large_memory(const vecfuncT& vket,\n                                                                  const double mul_tol) const {    // Larger memory algorithm ... use i-j sym if psi==f\n\n    auto poisson = set_poisson(world, lo);\n    vecfuncT result = compute_K_tile(world, mo_bra, mo_ket, vket, poisson, is_symmetric(), mul_tol);\n    truncate(world, result);\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T, NDIM> >\nExchange<T, NDIM>::ExchangeImpl::compute_K_tile(World& world, const vecfuncT& mo_bra, const vecfuncT& mo_ket,\n                                  const vecfuncT& vket, std::shared_ptr<real_convolution_3d> poisson,\n                                  const bool symmetric, const double mul_tol) {\n\n    double cpu0 = cpu_time();\n    const long nf = vket.size();\n    const long nocc = mo_ket.size();\n    vecfuncT Kf = zero_functions_compressed<T, NDIM>(world, nf);\n\n    vecfuncT psif;\n    for (int i = 0; i < nocc; ++i) {\n        int jtop = nf;\n        if (symmetric)\n            jtop = i + 1;\n        for (int j = 0; j < jtop; ++j) {\n            psif.push_back(mul_sparse(mo_bra[i], vket[j], mul_tol, false));\n        }\n    }\n\n    world.gop.fence();\n    truncate(world, psif);\n    double cpu1 = cpu_time();\n    mul1_timer += long((cpu1 - cpu0) * 1000l);\n\n    cpu0 = cpu_time();\n    psif = apply(world, *poisson.get(), psif);\n    truncate(world, psif);\n    cpu1 = cpu_time();\n    apply_timer += long((cpu1 - cpu0) * 1000l);\n\n    cpu0 = cpu_time();\n    reconstruct(world, psif);\n    norm_tree(world, psif);\n    vecfuncT psipsif = zero_functions<T, NDIM>(world, nf * nocc);\n    int ij = 0;\n    for (int i = 0; i < nocc; ++i) {\n        int jtop = nf;\n        if (symmetric)\n            jtop = i + 1;\n        for (int j = 0; j < jtop; ++j, ++ij) {\n            psipsif[i * nf + j] = mul_sparse(psif[ij], mo_ket[i], mul_tol, false);\n            if (symmetric && i != j) {\n                psipsif[j * nf + i] = mul_sparse(psif[ij], mo_ket[j], mul_tol, false);\n            }\n        }\n    }\n\n    world.gop.fence();\n    cpu1 = cpu_time();\n    mul2_timer += long((cpu1 - cpu0) * 1000l);\n    psif.clear();\n    world.gop.fence();\n    compress(world, psipsif);\n    for (int i = 0; i < nocc; ++i) {\n        for (int j = 0; j < nf; ++j) {\n            Kf[j].gaxpy(1.0, psipsif[i * nf + j], 1.0, false);\n        }\n    }\n    // !! NO TRUNCATION AT THIS POINT !!\n    world.gop.fence();\n    psipsif.clear();\n    world.gop.fence();\n    return Kf;\n\n}\n\n\n/// compute a batch of the exchange matrix, with non-identical ranges\n\n/// \\param subworld     the world we're computing in\n/// \\param cloud        where to store the results\n/// \\param bra_batch    the bra batch of orbitals (including the nuclear correlation factor square)\n/// \\param ket_batch    the ket batch of orbitals, also the orbitals to premultiply with\n/// \\param vf_batch     the argument of the exchange operator\ntemplate<typename T, std::size_t NDIM>\nstd::pair<std::vector<Function<T, NDIM>>, std::vector<Function<T, NDIM>>>\nExchange<T, NDIM>::ExchangeImpl::MacroTaskExchangeSimple::compute_offdiagonal_batch_in_symmetric_matrix(World& subworld,\n                                                                                          const vecfuncT& mo_ket,      // not batched\n                                                                                          const vecfuncT& bra_batch,   // batched\n                                                                                          const vecfuncT& vf_batch) const { // batched\n    // orbital_product is a vector of vectors\n    double cpu0 = cpu_time();\n    std::vector<vecfuncT> orbital_product = matrix_mul_sparse<T, T, NDIM>(subworld, bra_batch, vf_batch, mul_tol);\n    vecfuncT orbital_product_flat = flatten(orbital_product); // convert into a flattened vector\n    truncate(subworld, orbital_product_flat);\n    double cpu1 = cpu_time();\n    mul1_timer += long((cpu1 - cpu0) * 1000l);\n\n    cpu0 = cpu_time();\n    auto poisson = set_poisson(subworld, lo);\n    vecfuncT Nij = apply(subworld, *poisson.get(), orbital_product_flat);\n    truncate(subworld, Nij);\n    cpu1 = cpu_time();\n    apply_timer += long((cpu1 - cpu0) * 1000l);\n\n    // accumulate columns:      resultrow(i)=\\sum_j j N_ij\n    // accumulate rows:      resultcolumn(j)=\\sum_i i N_ij\n    cpu0 = cpu_time();\n\n    // some helper functions\n    std::size_t nrow = bra_batch.size();\n    std::size_t ncolumn = vf_batch.size();\n    auto ij = [&ncolumn](const int i, const int j) { return i * ncolumn + j; };\n\n    auto Nslice = [&Nij, &ij, &ncolumn](const long irow, const Slice s) {\n        vecfuncT result;\n        MADNESS_CHECK(s.start == 0 && s.end == -1 && s.step == 1);\n        for (std::size_t i = s.start; i <= s.end + ncolumn; ++i) {\n            result.push_back(Nij[ij(irow, i)]);\n        }\n        return result;\n    };\n    auto Nslice1 = [&Nij, &ij, &nrow](const Slice s, const long jcolumn) {\n        vecfuncT result;\n        MADNESS_CHECK(s.start == 0 && s.end == -1 && s.step == 1);\n        for (std::size_t i = s.start; i <= s.end + nrow; ++i) {\n            result.push_back(Nij[ij(i, jcolumn)]);\n        }\n        return result;\n    };\n\n    // corresponds to bra_batch and ket_batch, but without the ncf R^2\n    // result[i]        =                      sum_{k}                ket[k] \\int bra[k] vf[i]\n    // result[rowbatch] = \\sum_{columnbatches} sum_{k in columnbatch} ket[k] \\int bra[k] vf[rowbatch]\n    MADNESS_CHECK(batch.input.size() == 2);\n    auto row_range = batch.input[0];            // corresponds to bra_batch\n    auto column_range = batch.input[1];         // corresponds to f_batch\n    vecfuncT to_dot_with_bra = column_range.copy_batch(mo_ket);\n    vecfuncT to_dot_with_vf = row_range.copy_batch(mo_ket);\n\n    vecfuncT resultcolumn(nrow);\n    for (std::size_t irow = 0; irow < nrow; ++irow) {\n        resultcolumn[irow] = dot(subworld, to_dot_with_vf,\n                                 Nslice(irow, _));  // sum over columns result=sum_j ket[j] N[j,i]\n    }\n    vecfuncT resultrow(ncolumn);\n    for (std::size_t icolumn = 0; icolumn < ncolumn; ++icolumn) {\n        resultrow[icolumn] = dot(subworld, to_dot_with_bra,\n                                 Nslice1(_, icolumn));  // sum over rows result=sum_i ket[i] N[j,i]\n    }\n\n    // !! NO TRUNCATION AT THIS POINT !!\n    subworld.gop.fence();\n    cpu1 = cpu_time();\n    mul2_timer += long((cpu1 - cpu0) * 1000l);\n\n    return std::make_pair(resultcolumn, resultrow);\n}\n\n\ntemplate \nclass Exchange<double_complex, 3>::ExchangeImpl;\n\ntemplate\nclass Exchange<double, 3>::ExchangeImpl;\n\ntemplate<> volatile std::list<detail::PendingMsg> WorldObject<MacroTaskQ>::pending = std::list<detail::PendingMsg>();\ntemplate<> Spinlock WorldObject<MacroTaskQ>::pending_mutex(0);\n\ntemplate<> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<long, std::vector<unsigned char>, madness::Hash<long> > >::pending = std::list<detail::PendingMsg>();\ntemplate<> Spinlock WorldObject<WorldContainerImpl<long, std::vector<unsigned char>, madness::Hash<long> > >::pending_mutex(\n        0);\n\nExchange<double,3>::ExchangeImpl junkjunkjunk(World& world, const SCF *calc, const int ispin) {return Exchange<double,3>::ExchangeImpl(world, calc, ispin);}\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/exchangeoperator.h",
    "content": "#ifndef SRC_APPS_CHEM_EXCHANGEOPERATOR_H_\n#define SRC_APPS_CHEM_EXCHANGEOPERATOR_H_\n\n#include<madness.h>\n#include<madness/world/cloud.h>\n#include<madness/mra/macrotaskq.h>\n#include<madness/chem/SCFOperators.h>\n\nnamespace madness {\n\n// forward declaration\nclass SCF;\nclass Nemo;\n\n\ntemplate<typename T, std::size_t NDIM>\nclass Exchange<T,NDIM>::ExchangeImpl {\n    typedef Function<T, NDIM> functionT;\n    typedef std::vector<functionT> vecfuncT;\n\n    static inline std::atomic<long> apply_timer;\n    static inline std::atomic<long> mul2_timer;\n    static inline std::atomic<long> mul1_timer; ///< timing\n    static inline double elapsed_time;\n\n    static void reset_timer() {\n        mul1_timer = 0l;\n        mul2_timer = 0l;\n        apply_timer = 0l;\n        elapsed_time = 0.0;\n    }\n\npublic:\n    nlohmann::json gather_timings(World& world) const {\n        double t1 = double(mul1_timer) * 0.001;\n        double t2 = double(apply_timer) * 0.001;\n        double t3 = double(mul2_timer) * 0.001;\n        world.gop.sum(t1);\n        world.gop.sum(t2);\n        world.gop.sum(t3);\n        nlohmann::json j;\n        j[\"multiply1\"] = t1;\n        j[\"apply\"] = t2;\n        j[\"multiply2\"] = t3;\n        j[\"total\"] = elapsed_time;\n        return j;\n    }\n\n    void print_timer(World& world) const {\n        auto timings= gather_timings(world);\n        if (world.rank() == 0) {\n            printf(\" cpu time spent in multiply1   %8.2fs\\n\", timings[\"multiply1\"].template get<double>());\n            printf(\" cpu time spent in apply       %8.2fs\\n\", timings[\"apply\"].template get<double>());\n            printf(\" cpu time spent in multiply2   %8.2fs\\n\", timings[\"multiply2\"].template get<double>());\n            printf(\" total wall time               %8.2fs\\n\", timings[\"total\"].template get<double>());\n        }\n    }\n\n\n    typedef Exchange<T,NDIM>::ExchangeAlgorithm Algorithm;\n    Algorithm algorithm_ = multiworld_efficient_row;\n    MacroTaskInfo macro_task_info = MacroTaskInfo::preset(\"default\");\n\n    /// default ctor\n    ExchangeImpl(World& world, const double lo, const double thresh) : world(world), lo(lo), thresh(thresh) {}\n\n    /// ctor with a conventional calculation\n    ExchangeImpl(World& world, const SCF *calc, const int ispin) ;\n\n    /// ctor with a nemo calculation\n    ExchangeImpl(World& world, const Nemo *nemo, const int ispin);\n\n    /// set the bra and ket orbital spaces, and the occupation\n\n    /// @param[in]\tbra\t\tbra space, must be provided as complex conjugate\n    /// @param[in]\tket\t\tket space\n    void set_bra_and_ket(const vecfuncT& bra, const vecfuncT& ket) {\n        mo_bra = copy(world, bra);\n        mo_ket = copy(world, ket);\n    }\n\n    std::string info() const {return \"K\";}\n\n    static auto set_poisson(World& world, const double lo, const double econv = FunctionDefaults<3>::get_thresh()) {\n        return std::shared_ptr<real_convolution_3d>(CoulombOperatorPtr(world, lo, econv));\n    }\n\n    /// apply the exchange operator on a vector of functions\n\n    /// note that only one spin is used (either alpha or beta orbitals)\n    /// @param[in]  vket       the orbitals |i> that the operator is applied on\n    /// @return     a vector of orbitals  K| i>\n    vecfuncT operator()(const vecfuncT& vket) const;\n\n    bool is_symmetric() const { return symmetric_; }\n\n    ExchangeImpl& set_taskq(std::shared_ptr<MacroTaskQ> taskq1) {\n        this->taskq=taskq1;\n        return *this;\n    }\n\n    ExchangeImpl& symmetric(const bool flag) {\n        symmetric_ = flag;\n        return *this;\n    }\n\n    ExchangeImpl& set_macro_task_info(const MacroTaskInfo& info) {\n        macro_task_info = info;\n        return *this;\n    }\n\n    ExchangeImpl& set_macro_task_info(const std::vector<std::string>& info) {\n        macro_task_info.from_vector_of_strings(info);\n        return *this;\n    }\n\n    ExchangeImpl& set_algorithm(const Algorithm& alg) {\n        algorithm_ = alg;\n        return *this;\n    }\n\n    ExchangeImpl& set_printlevel(const long& level) {\n        printlevel=level;\n        return *this;\n    }\n\n    std::shared_ptr<MacroTaskQ> get_taskq() const {return taskq;}\n\n    World& get_world() const {return world;}\n\n    nlohmann::json get_statistics() const {return statistics;}\n\n    /// return some statistics about the current settings\n    nlohmann::json gather_statistics() const {\n        nlohmann::json j;\n        j[\"symmetric\"] = symmetric_;\n        j[\"lo\"] = lo;\n        j[\"thresh\"] = thresh;\n        j[\"mul_tol\"] = mul_tol;\n        j[\"printlevel\"] = printlevel;\n        j[\"algorithm\"] = to_string(algorithm_);\n        j[\"macro_task_info\"] = macro_task_info.to_json();\n        auto timings = gather_timings(world);\n        j.update(timings);\n        return j;\n    }\n\nprivate:\n\n    /// exchange using macrotasks, i.e. apply K on a function in individual worlds\n    vecfuncT K_macrotask_efficient(const vecfuncT& vket, const double mul_tol = 0.0) const;\n\n    /// exchange using macrotasks, i.e. apply K on a function in individual worlds row-wise\n    vecfuncT K_macrotask_efficient_row(const vecfuncT& vket, const double mul_tol = 0.0) const;\n\n    /// computing the full square of the double sum (over vket and the K orbitals)\n    vecfuncT K_small_memory(const vecfuncT& vket, const double mul_tol = 0.0) const;\n\n    /// computing the upper triangle of the double sum (over vket and the K orbitals)\n    vecfuncT K_large_memory(const vecfuncT& vket, const double mul_tol = 0.0) const;\n\n    /// computing the upper triangle of the double sum (over vket and the K orbitals)\n    static vecfuncT compute_K_tile(World& world, const vecfuncT& mo_bra, const vecfuncT& mo_ket,\n                                   const vecfuncT& vket, std::shared_ptr<real_convolution_3d> poisson,\n                                   const bool symmetric, const double mul_tol = 0.0);\n\n    inline bool printdebug() const {return printlevel >= 10; }\n    inline bool printprogress() const {return (printlevel>=4) and (not (printdebug()));}\n    inline bool printtimings() const {return printlevel>=3;}\n    inline bool printtimings_detail() const {return printlevel>=4;}\n\n    World& world;\n    std::shared_ptr<MacroTaskQ> taskq;\n    bool symmetric_ = false;      /// is the exchange matrix symmetric? K phi_i = \\sum_k \\phi_k \\int \\phi_k \\phi_i\n    vecfuncT mo_bra, mo_ket;    ///< MOs for bra and ket\n    double lo = 1.e-4;\n    double thresh = FunctionDefaults<NDIM>::get_thresh();\n    long printlevel = 0;\n    double mul_tol = FunctionDefaults<NDIM>::get_thresh()*0.1;\n\n    mutable nlohmann::json statistics;  ///< statistics of the Cloud (timings, memory)  and of the parameters of this run\n\n    class MacroTaskExchangeSimple : public MacroTaskOperationBase {\n\n        long nresult;\n        double lo = 1.e-4;\n        double mul_tol = 1.e-7;\n        bool symmetric = false;\n\n        /// custom partitioning for the exchange operator in exchangeoperator.h\n\n        /// arguments are: result[i] += sum_k vket[k] \\int 1/r vbra[k] f[i]\n        /// with f and vbra being batched, result and vket being passed on as a whole\n        class MacroTaskPartitionerExchange : public MacroTaskPartitioner {\n        public:\n            MacroTaskPartitionerExchange(const bool symmetric) : symmetric(symmetric) {\n                max_batch_size=30;\n            }\n\n            bool symmetric = false;\n\n            partitionT do_partitioning(const std::size_t& vsize1, const std::size_t& vsize2,\n                                       const std::string policy) const override {\n\n                partitionT partition1 = do_1d_partition(vsize1, policy);\n                partitionT partition2 = do_1d_partition(vsize2, policy);\n                partitionT result;\n                for (auto i = partition1.begin(); i != partition1.end(); ++i) {\n                    if (symmetric) {\n                        for (auto j = i; j != partition1.end(); ++j) {\n                            Batch batch(i->first.input[0], j->first.input[0], _);\n                            double priority=compute_priority(batch);\n                            result.push_back(std::make_pair(batch,priority));\n                        }\n                    } else {\n                        for (auto j = partition2.begin(); j != partition2.end(); ++j) {\n                            Batch batch(i->first.input[0], j->first.input[0], _);\n                            double priority=compute_priority(batch);\n                            result.push_back(std::make_pair(batch,priority));\n                        }\n                    }\n                }\n                return result;\n            }\n\n            /// compute the priority of this task for non-dumb scheduling\n\n            /// \\return the priority as double number (no limits)\n            double compute_priority(const Batch& batch) const override {\n                MADNESS_CHECK(batch.input.size() == 2);   // must be quadratic batches\n                long nrow = batch.input[0].size();\n                long ncol = batch.input[1].size();\n                return double(nrow * ncol);\n            }\n        };\n\n    public:\n        MacroTaskExchangeSimple(const long nresult, const double lo, const double mul_tol, const bool symmetric)\n                : nresult(nresult), lo(lo), mul_tol(mul_tol), symmetric(symmetric) {\n            partitioner.reset(new MacroTaskPartitionerExchange(symmetric));\n        }\n\n\n        // you need to define the exact argument(s) of operator() as tuple\n        typedef std::tuple<const std::vector<Function<T, NDIM>>&,\n                const std::vector<Function<T, NDIM>>&,\n                const std::vector<Function<T, NDIM>>&> argtupleT;\n\n        using resultT = std::vector<Function<T, NDIM>>;\n\n        // you need to define an empty constructor for the result\n        // resultT must implement operator+=(const resultT&)\n        resultT allocator(World& world, const argtupleT& argtuple) const {\n            std::size_t n = std::get<0>(argtuple).size();\n            resultT result = zero_functions_compressed<T, NDIM>(world, n);\n            return result;\n        }\n\n        std::vector<Function<T, NDIM>>\n        operator()(const std::vector<Function<T, NDIM>>& vf_batch,     // will be batched (column)\n                   const std::vector<Function<T, NDIM>>& bra_batch,    // will be batched (row)\n                   const std::vector<Function<T, NDIM>>& vket) {       // will not be batched\n\n            World& world = vf_batch.front().world();\n            resultT Kf = zero_functions_compressed<T, NDIM>(world, nresult);\n\n            bool diagonal_block = batch.input[0] == batch.input[1];\n            auto& bra_range = batch.input[1];    // corresponds to vbra\n            auto& vf_range = batch.input[0];       // corresponds to vf_batch\n\n            if (vf_range.is_full_size()) vf_range.end = vf_batch.size();\n            if (bra_range.is_full_size()) bra_range.end = bra_batch.size();\n\n            MADNESS_CHECK(vf_range.end <= nresult);\n            if (symmetric) MADNESS_CHECK(bra_range.end <= nresult);\n\n            if (symmetric and diagonal_block) {\n                auto ket_batch = bra_range.copy_batch(vket);\n                vecfuncT resultcolumn = compute_diagonal_batch_in_symmetric_matrix(world, ket_batch, bra_batch,\n                                                                                   vf_batch);\n\n                for (int i = vf_range.begin; i < vf_range.end; ++i){\n                    Kf[i] += resultcolumn[i - vf_range.begin];}\n\n            } else if (symmetric and not diagonal_block) {\n                auto[resultcolumn, resultrow]=compute_offdiagonal_batch_in_symmetric_matrix(world, vket, bra_batch,\n                                                                                            vf_batch);\n\n                for (int i = bra_range.begin; i < bra_range.end; ++i){\n                    Kf[i] += resultcolumn[i - bra_range.begin];}\n                for (int i = vf_range.begin; i < vf_range.end; ++i){\n                    Kf[i] += resultrow[i - vf_range.begin];}\n            } else {\n                auto ket_batch = bra_range.copy_batch(vket);\n                vecfuncT resultcolumn = compute_batch_in_asymmetric_matrix(world, ket_batch, bra_batch, vf_batch);\n                for (int i = vf_range.begin; i < vf_range.end; ++i)\n                    Kf[i] += resultcolumn[i - vf_range.begin];\n            }\n            return Kf;\n        }\n\n        /// compute a batch of the exchange matrix, with identical ranges, exploiting the matrix symmetry\n\n        /// \\param subworld     the world we're computing in\n        /// \\param cloud        where to store the results\n        /// \\param bra_batch    the bra batch of orbitals (including the nuclear correlation factor square)\n        /// \\param ket_batch    the ket batch of orbitals, i.e. the orbitals to premultiply with\n        /// \\param vf_batch     the argument of the exchange operator\n        vecfuncT compute_diagonal_batch_in_symmetric_matrix(World& subworld,\n                                                            const vecfuncT& ket_batch,      // is batched\n                                                            const vecfuncT& bra_batch,      // is batched\n                                                            const vecfuncT& vf_batch        // is batched\n        ) const {\n            double mul_tol = 0.0;\n            double symmetric = true;\n            auto poisson = Exchange<double, 3>::ExchangeImpl::set_poisson(subworld, lo);\n            return Exchange<T, NDIM>::ExchangeImpl::compute_K_tile(subworld, bra_batch, ket_batch, vf_batch, poisson, symmetric,\n                                                     mul_tol);\n        }\n\n        /// compute a batch of the exchange matrix, with non-identical ranges\n\n        /// \\param subworld     the world we're computing in\n        /// \\param cloud        where to store the results\n        /// \\param bra_batch    the bra batch of orbitals (including the nuclear correlation factor square)\n        /// \\param ket_batch    the ket batch of orbitals, i.e. the orbitals to premultiply with\n        /// \\param vf_batch     the argument of the exchange operator\n        vecfuncT compute_batch_in_asymmetric_matrix(World& subworld,\n                                                    const vecfuncT& ket_batch,\n                                                    const vecfuncT& bra_batch,\n                                                    const vecfuncT& vf_batch) const {\n            double mul_tol = 0.0;\n            double symmetric = false;\n            auto poisson = Exchange<double, 3>::ExchangeImpl::set_poisson(subworld, lo);\n            return Exchange<T, NDIM>::ExchangeImpl::compute_K_tile(subworld, bra_batch, ket_batch, vf_batch, poisson, symmetric,\n                                                     mul_tol);\n        }\n\n        /// compute a batch of the exchange matrix, with non-identical ranges\n\n        /// \\param subworld     the world we're computing in\n        /// \\param cloud        where to store the results\n        /// \\param bra_batch    the bra batch of orbitals (including the nuclear correlation factor square)\n        /// \\param ket_batch    the ket batch of orbitals, i.e. the orbitals to premultiply with\n        /// \\param vf_batch     the argument of the exchange operator\n        std::pair<vecfuncT, vecfuncT> compute_offdiagonal_batch_in_symmetric_matrix(World& subworld,\n                                                                                    const vecfuncT& ket, // not batched\n                                                                                    const vecfuncT& bra_batch, // batched\n                                                                                    const vecfuncT& vf_batch) const; // batched\n\n    };\n\n    class MacroTaskExchangeRow : public MacroTaskOperationBase {\n\n        long nresult;\n        double lo = 1.e-4;\n        double mul_tol = 1.e-7;\n        bool symmetric = false;\n        Algorithm algorithm_;\n\n        /// custom partitioning for the exchange operator in exchangeoperator.h\n        class MacroTaskPartitionerRow : public MacroTaskPartitioner {\n        public:\n            MacroTaskPartitionerRow() {\n              max_batch_size=1;\n            }       \n        };\n\n    public:\n        MacroTaskExchangeRow(const long nresult, const double lo, const double mul_tol, const Algorithm algorithm)\n                : nresult(nresult), lo(lo), mul_tol(mul_tol),  algorithm_(algorithm) {\n            partitioner.reset(new MacroTaskPartitionerRow());\n            name=\"MacroTaskExchangeRow\";\n        }\n\n        // you need to define the exact argument(s) of operator() as tuple\n        typedef std::tuple<const std::vector<Function<T, NDIM>>&,\n                           const std::vector<Function<T, NDIM>>&,\n                           const std::vector<Function<T, NDIM>>&> argtupleT;\n\n        using resultT = std::vector<Function<T, NDIM>>;\n\n        // you need to define an empty constructor for the result\n        // resultT must implement operator+=(const resultT&)\n        resultT allocator(World& world, const argtupleT& argtuple) const {\n            std::size_t n = std::get<0>(argtuple).size();\n            resultT result = zero_functions_compressed<T, NDIM>(world, n);\n            return result;\n        }\n\n        /// compute exchange row-wise for a fixed orbital phi_i of vket\n\n        /// create 2 worlds: one fetches the function coefficients from the universe, the other\n        /// does the computation, then swap. The result is copied back to the universe\n        std::vector<Function<T, NDIM>>\n        operator()(const std::vector<Function<T, NDIM>>& vket,\n                   const std::vector<Function<T, NDIM>>& mo_bra, \n                   const std::vector<Function<T, NDIM>>& mo_ket) {\n            std::vector<Function<T,NDIM>> result;\n            if (algorithm_==fetch_compute) {\n                result=row_fetch_compute(vket,mo_bra,mo_ket);\n            } else if (algorithm_==multiworld_efficient_row) {\n                result=row(vket,mo_bra,mo_ket);\n            } else {\n                MADNESS_EXCEPTION(\"unknown algorithm in Exchange::MacroTaskExchangeRow::operator()\",1);\n            }\n            return result;\n        }\n\n        std::vector<Function<T,NDIM>>\n        row(const std::vector<Function<T, NDIM>>& vket,\n            const std::vector<Function<T, NDIM>>& mo_bra,\n            const std::vector<Function<T, NDIM>>& mo_ket) {\n\n            double cpu0, cpu1;\n            World& world = vket.front().world();\n            mul_tol = 0.0;\n\n            resultT Kf = zero_functions_compressed<T, NDIM>(world, 1);\n            vecfuncT psif = zero_functions_compressed<T,NDIM>(world, mo_bra.size());\n            auto poisson = Exchange<double, 3>::ExchangeImpl::set_poisson(world, lo);\n\n            // !! NO !! vket is batched, starts at batch.input[0].begin\n            // auto& i = batch.input[0].begin;\n            long i=0;\n            MADNESS_CHECK_THROW(vket.size()==1,\"out-of-bounds error in Exchange::MacroTaskExchangeRow::operator()\");\n            size_t min_tile = 10;\n            size_t ntile = std::min(mo_bra.size(), min_tile);\n\n            for (size_t ilo=0; ilo<mo_bra.size(); ilo+=ntile){\n                cpu0 = cpu_time();\n                size_t iend = std::min(ilo+ntile,mo_bra.size());\n                vecfuncT tmp_mo_bra(mo_bra.begin()+ilo,mo_bra.begin()+iend);\n                auto tmp_psif = mul_sparse(world, vket[i], tmp_mo_bra, mul_tol);\n                truncate(world, tmp_psif);\n                cpu1 = cpu_time();\n                mul1_timer += long((cpu1 - cpu0) * 1000l);\n\n                cpu0 = cpu_time();\n                tmp_psif = apply(world, *poisson.get(), tmp_psif);\n                truncate(world, tmp_psif);\n                cpu1 = cpu_time();\n                apply_timer += long((cpu1 - cpu0) * 1000l);\n\n                cpu0 = cpu_time();\n                vecfuncT tmp_mo_ket(mo_ket.begin()+ilo,mo_ket.begin()+iend);\n                auto tmp_Kf = dot(world, tmp_mo_ket, tmp_psif);\n                cpu1 = cpu_time();\n                mul2_timer += long((cpu1 - cpu0) * 1000l);\n\n                Kf[0] += tmp_Kf;\n                truncate(world, Kf);\n            }\n\n            return Kf;\n        }\n\n        std::vector<Function<T,NDIM>>\n        row_fetch_compute(const std::vector<Function<T, NDIM>>& vket,\n            const std::vector<Function<T, NDIM>>& mo_bra,\n            const std::vector<Function<T, NDIM>>& mo_ket) {\n\n            io_redirect_cout();\n            double total_execution_time=0.0;\n            double total_fetch_time=0.0;\n            double total_fetch_spawn_time=0.0;\n\n            resultT Kf = zero_functions_compressed<T, NDIM>(*subworld_ptr, 1);\n            {\n                // create the two worlds that will be used for fetching and computing\n                // std::shared_ptr<World> executing_world(subworld_ptr);\n                double cpu0=cpu_time();\n                SafeMPI::Intracomm comm = subworld_ptr->mpi.comm();\n                std::shared_ptr<World> fetching_world(new World(comm.Clone()));\n                std::shared_ptr<World> executing_world(new World(comm.Clone()));\n                double cpu1=cpu_time();\n                print(\"time to create two worlds:\",cpu1-cpu0,\"seconds\");\n                print(\"executing_world.id()\",executing_world->id(),\"fetching_world.id()\",fetching_world->id(),\"in MacroTaskExchangeRow\");\n\n                {\n                    auto poisson1 = Exchange<double, 3>::ExchangeImpl::set_poisson(*executing_world, lo);\n                    auto poisson2 = Exchange<double, 3>::ExchangeImpl::set_poisson(*fetching_world, lo);\n\n                    functionT phi1=copy(*executing_world,vket[0]);\n                    functionT phi2=copy(*fetching_world,vket[0]);\n\n                    // !! NO !! vket is batched, starts at batch.input[0].begin\n                    // auto& i = batch.input[0].begin;\n                    MADNESS_CHECK_THROW(vket.size()==1,\"out-of-bounds error in Exchange::MacroTaskExchangeRow::operator()\");\n                    size_t min_tile = 10;\n                    size_t ntile = std::min(mo_bra.size(), min_tile);\n\n                    struct Tile {\n                        size_t ilo;\n                        size_t iend;\n                    };\n\n\n                    // copy the data from the universe bra and ket to subworld bra and ket\n                    // returns a pair of vectors in the subworld which are still awaiting the function coefficients\n                    auto fetch_data = [&](World& world, const Tile& tile) {\n                        MADNESS_CHECK_THROW(mo_bra.size()==mo_ket.size(),\n                                            \"bra and ket size mismatch in Exchange::MacroTaskExchangeRow::execute()\");\n\n                        std::size_t sz=tile.iend-tile.ilo;\n                        vecfuncT subworld_bra(sz);\n                        vecfuncT subworld_ket;\n                        for (size_t i=tile.ilo; i<tile.iend; ++i) {\n                            auto f=copy(world,mo_bra[i],false);\n                            subworld_bra[i-tile.ilo]=f;\n                            subworld_ket.push_back(copy(world, mo_ket[i],false));\n                        }\n                        return std::make_pair(subworld_bra,subworld_ket);\n                    };\n\n                    // apply the exchange operator on phi for a a tile of mo_bra and mo_ket\n                    auto execute = [&](World& world, auto poisson, const functionT& phi, const vecfuncT& mo_bra, const vecfuncT& mo_ket) {\n                        MADNESS_CHECK_THROW(mo_bra.size()==mo_ket.size(),\n                                            \"bra and ket size mismatch in Exchange::MacroTaskExchangeRow::execute()\");\n\n                        auto world_id=world.id();\n                        auto phi_id=phi.world().id();\n                        auto bra_id=mo_bra.front().world().id();\n                        auto ket_id=mo_ket.front().world().id();\n                        std::string msg=\"world mismatch in Exchange::MacroTaskExchangeRow::execute(): \";\n                        msg+=\"world.id()=\"+std::to_string(world_id)+\", \";\n                        msg+=\"phi.world().id()=\"+std::to_string(phi_id)+\", \";\n                        msg+=\"bra.world().id()=\"+std::to_string(bra_id)+\", \";\n                        msg+=\"ket.world().id()=\"+std::to_string(ket_id);\n                        if (not (world_id==phi_id && world_id==bra_id && world_id==ket_id)) {\n                            print(msg);\n                        }\n                        MADNESS_CHECK_THROW(world_id==phi_id && world_id==bra_id && world_id==ket_id,msg.c_str());\n\n                        double cpu0 = cpu_time();\n                        auto tmp_psif = mul_sparse(world, phi, mo_bra, mul_tol);\n                        truncate(world, tmp_psif);\n                        double cpu1 = cpu_time();\n                        mul1_timer += long((cpu1 - cpu0) * 1000l);\n\n                        cpu0 = cpu_time();\n                        tmp_psif = apply(world, *poisson.get(), tmp_psif);\n                        truncate(world, tmp_psif);\n                        cpu1 = cpu_time();\n                        apply_timer += long((cpu1 - cpu0) * 1000l);\n\n                        cpu0 = cpu_time();\n                        auto tmp_Kf = dot(world, mo_ket, tmp_psif);\n                        cpu1 = cpu_time();\n                        mul2_timer += long((cpu1 - cpu0) * 1000l);\n\n                        return tmp_Kf.truncate();\n\n                    };\n\n                    std::vector<Tile> tiles;\n                    for (size_t ilo=0; ilo<mo_bra.size(); ilo+=ntile) {\n                        tiles.push_back(Tile{ilo,std::min(ilo+ntile,mo_bra.size())});\n                    }\n\n                    vecfuncT tmp_mo_bra1,tmp_mo_ket1;\n                    vecfuncT tmp_mo_bra2,tmp_mo_ket2;\n\n                    for (size_t itile=0; itile<tiles.size(); ++itile) {\n                        Tile& tile = tiles[itile];\n\n                        if (itile==0) {\n                            double t0=cpu_time();\n                            print(\"fetching tile\",tile.ilo,\"into world\",executing_world->id());\n                            std::tie(tmp_mo_bra1,tmp_mo_ket1)=fetch_data(*executing_world,tiles[itile]);\n                            fetching_world->gop.set_forbid_fence(false);\n                            double t2=cpu_time();\n                            executing_world->gop.fence();\n                            double t1=cpu_time();\n                            total_fetch_time += (t1 - t0);\n                            total_fetch_spawn_time += (t2 - t0);\n                        }\n\n                        if (itile>=0) {\n                            double t0=cpu_time();\n                            fetching_world->gop.set_forbid_fence(true);\n                            if (itile<tiles.size()-1) {\n                                // fetch data into fetching_world while computing in executing_world\n                                print(\"fetching tile\",tiles[itile+1].ilo,\"into world\",fetching_world->id(),\" at time \",wall_time());\n                                std::tie(tmp_mo_bra2,tmp_mo_ket2)=fetch_data(*fetching_world,tiles[itile+1]);\n                            }\n                            fetching_world->gop.set_forbid_fence(false);\n                            double t2=cpu_time();\n                            // uncomment the next line to enforce that fetching is finished before executing\n                            // fetching_world->gop.fence();\n                            double t1=cpu_time();\n                            total_fetch_time += (t1 - t0);\n                            total_fetch_spawn_time += (t2 - t0);\n\n                            print(\"executing tile\",tile.ilo,\"in world\",executing_world->id());\n                            double dpu0=cpu_time();\n                            Kf[0]+=execute(*executing_world,poisson1,phi1,tmp_mo_bra1,tmp_mo_ket1);\n                            double dpu1=cpu_time();\n                            print(\"time to execute tile\",tile.ilo,\"in world\",executing_world->id(),dpu1-dpu0,\"seconds\");\n                            total_execution_time += dpu1-dpu0;\n\n                            fetching_world->gop.fence();\n\n                            // change roles of the two worlds\n                            std::swap(poisson1,poisson2);\n                            std::swap(phi1,phi2);\n                            std::swap(tmp_mo_bra2,tmp_mo_bra1);\n                            std::swap(tmp_mo_ket2,tmp_mo_ket1);\n                            std::swap(executing_world,fetching_world);\n                        }\n                    }\n                } // objects living in the two worlds must be destroyed before the worlds are freed\n\n                // deferred destruction of WorldObjects happens here\n                fetching_world->gop.fence();\n                executing_world->gop.fence();\n                double cpu2=cpu_time();\n                print(\"overall time: \",cpu2-cpu0,\"seconds\");\n                print(\"total execution time:\",total_execution_time,\"seconds\");\n                print(\"total fetch time:\",total_fetch_time,\"seconds\");\n                print(\"total fetch spawn time:\",total_fetch_spawn_time,\"seconds\");\n            } // worlds are destroyed here\n\n            return Kf;\n        }\n    };\n};\n\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_EXCHANGEOPERATOR_H_ */\n"
  },
  {
    "path": "src/madness/chem/gaussian.cc",
    "content": "/* This file is a part of Slymer, which is distributed under the Creative\n   Commons Attribution-NonCommercial 4.0 International Public License.\n\n   (c) 2017 Stony Brook University. */\n\n/**\n * \\file Basis/gaussian.cc\n * \\brief Implementation of Gaussian basis function API and routines.\n */\n\n#include \"../../madness.h\"\n#include \"gaussian.h\"\n#include <cmath>\n#include <limits>\n#include <stdexcept>\n\nconst static double pi = 4.*atan(1.);\n\nnamespace slymer {\n\n///////////////////////////////////////////////////////////////////////////\n// CartesianPrimitive implementations\n///////////////////////////////////////////////////////////////////////////\nPrimitiveGaussian::PrimitiveGaussian(const GaussianType &type,\n    const std::array<double, 3> &center, const double ec)\n    : prefactor(0), exppoly(2) {\n\n  // make sure the decay constant is positive\n  if(ec <= 0.)\n    throw std::invalid_argument(\"Gaussian decay constant must be positive.\");\n\n  // set the exponent array; expand out (x-x0)^2 and similarly for y, z\n  exppoly[{{2,0,0}}] = -ec;\n  exppoly[{{1,0,0}}] = 2.*ec*center[0];\n  exppoly[{{0,0,0}}] = -ec*center[0]*center[0];\n  exppoly[{{0,2,0}}] = -ec;\n  exppoly[{{0,1,0}}] = 2.*ec*center[1];\n  exppoly[{{0,0,0}}] += -ec*center[1]*center[1];\n  exppoly[{{0,0,2}}] = -ec;\n  exppoly[{{0,0,1}}] = 2.*ec*center[2];\n  exppoly[{{0,0,0}}] += -ec*center[2]*center[2];\n\n  if(type == GaussianType::s) {\n    prefactor[{{0,0,0}}] = pow(2.*ec/pi, 0.75);\n  }\n  else if(type == GaussianType::px) {\n    prefactor = PolynomialCoeffs(1);\n    prefactor[{{1,0,0}}] = 1.;\n    prefactor[{{0,0,0}}] = -center[0];\n    prefactor *= pow(2.*ec/pi, 0.5) * 2.*pow(2.*ec*ec*ec/pi, 0.25);\n  }\n  else if(type == GaussianType::py) {\n    prefactor = PolynomialCoeffs(1);\n    prefactor[{{0,1,0}}] = 1.;\n    prefactor[{{0,0,0}}] = -center[1];\n    prefactor *= pow(2.*ec/pi, 0.5) * 2.*pow(2.*ec*ec*ec/pi, 0.25);\n  }\n  else if(type == GaussianType::pz) {\n    prefactor = PolynomialCoeffs(1);\n    prefactor[{{0,0,1}}] = 1.;\n    prefactor[{{0,0,0}}] = -center[2];\n    prefactor *= pow(2.*ec/pi, 0.5) * 2.*pow(2.*ec*ec*ec/pi, 0.25);\n  }\n\n  // Cartesian and shared d-types\n  else if(type == GaussianType::dxx) {\n    prefactor = PolynomialCoeffs(2);\n    prefactor[{{2,0,0}}] = 1.;\n    prefactor[{{1,0,0}}] = -2. * center[0];\n    prefactor[{{0,0,0}}] = center[0] * center[0];\n    prefactor *= pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n  }\n  else if(type == GaussianType::dxy) {\n    prefactor = PolynomialCoeffs(2);\n    prefactor[{{1,1,0}}] = 1.;\n    prefactor[{{1,0,0}}] = -center[1];\n    prefactor[{{0,1,0}}] = -center[0];\n    prefactor[{{0,0,0}}] = center[0] * center[1];\n    prefactor *= pow(2.*ec/pi, 0.25) * 4.*pow(2.*ec*ec*ec/pi, 0.5);\n  }\n  else if(type == GaussianType::dxz) {\n    prefactor = PolynomialCoeffs(2);\n    prefactor[{{1,0,1}}] = 1.;\n    prefactor[{{1,0,0}}] = -center[2];\n    prefactor[{{0,0,1}}] = -center[0];\n    prefactor[{{0,0,0}}] = center[0] * center[2];\n    prefactor *= pow(2.*ec/pi, 0.25) * 4.*pow(2.*ec*ec*ec/pi, 0.5);\n  }\n  else if(type == GaussianType::dyy) {\n    prefactor = PolynomialCoeffs(2);\n    prefactor[{{0,2,0}}] = 1.;\n    prefactor[{{0,1,0}}] = -2. * center[1];\n    prefactor[{{0,0,0}}] = center[1] * center[1];\n    prefactor *= pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n  }\n  else if(type == GaussianType::dyz) {\n    prefactor = PolynomialCoeffs(2);\n    prefactor[{{0,1,1}}] = 1.;\n    prefactor[{{0,1,0}}] = -center[2];\n    prefactor[{{0,0,1}}] = -center[1];\n    prefactor[{{0,0,0}}] = center[1] * center[2];\n    prefactor *= pow(2.*ec/pi, 0.25) * 4.*pow(2.*ec*ec*ec/pi, 0.5);\n  }\n  else if(type == GaussianType::dzz) {\n    prefactor = PolynomialCoeffs(2);\n    prefactor[{{0,0,2}}] = 1.;\n    prefactor[{{0,0,1}}] = -2. * center[2];\n    prefactor[{{0,0,0}}] = center[2] * center[2];\n    prefactor *= pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n  }\n\n  else if(type == GaussianType::fxxx) {\n    prefactor = PolynomialCoeffs(3);\n    prefactor[{{3,0,0}}] = 1.;\n    prefactor[{{2,0,0}}] = -3. * center[0];\n    prefactor[{{1,0,0}}] = 3. * center[0] * center[0];\n    prefactor[{{0,0,0}}] = -center[0] * center[0] * center[0];\n    prefactor *= pow(2.*ec/pi, 0.5) * 8.*ec*pow(2.*ec*ec*ec/pi, 0.25)/sqrt(15.);\n  }\n  else if(type == GaussianType::fxxy) {\n    prefactor = PolynomialCoeffs(3);\n    prefactor[{{2,1,0}}] = 1.;\n    prefactor[{{2,0,0}}] = -center[1];\n    prefactor[{{1,1,0}}] = -2. * center[0];\n    prefactor[{{1,0,0}}] = 2. * center[0] * center[1];\n    prefactor[{{0,1,0}}] = center[0] * center[0];\n    prefactor[{{0,0,0}}] = -center[0] * center[0] * center[1];\n    prefactor *= pow(2.*ec/pi, 0.25) * 2.*pow(2.*ec*ec*ec/pi, 0.25) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n  }\n  else if(type == GaussianType::fxxz) {\n    prefactor = PolynomialCoeffs(3);\n    prefactor[{{2,0,1}}] = 1.;\n    prefactor[{{2,0,0}}] = -center[2];\n    prefactor[{{1,0,1}}] = -2. * center[0];\n    prefactor[{{1,0,0}}] = 2. * center[0] * center[2];\n    prefactor[{{0,0,1}}] = center[0] * center[0];\n    prefactor[{{0,0,0}}] = -center[0] * center[0] * center[2];\n    prefactor *= pow(2.*ec/pi, 0.25) * 2.*pow(2.*ec*ec*ec/pi, 0.25) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n  }\n  else if(type == GaussianType::fxyy) {\n    prefactor = PolynomialCoeffs(3);\n    prefactor[{{1,2,0}}] = 1.;\n    prefactor[{{0,2,0}}] = -center[0];\n    prefactor[{{1,1,0}}] = -2. * center[1];\n    prefactor[{{0,1,0}}] = 2. * center[0] * center[1];\n    prefactor[{{1,0,0}}] = center[1] * center[1];\n    prefactor[{{0,0,0}}] = -center[0] * center[1] * center[1];\n    prefactor *= pow(2.*ec/pi, 0.25) * 2.*pow(2.*ec*ec*ec/pi, 0.25) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n  }\n  else if(type == GaussianType::fxyz) {\n    prefactor = PolynomialCoeffs(3);\n    prefactor[{{1,1,1}}] = 1.;\n    prefactor[{{1,1,0}}] = -center[2];\n    prefactor[{{1,0,1}}] = -center[1];\n    prefactor[{{0,1,1}}] = -center[0];\n    prefactor[{{1,0,0}}] = center[1] * center[2];\n    prefactor[{{0,1,0}}] = center[0] * center[2];\n    prefactor[{{0,0,1}}] = center[0] * center[1];\n    prefactor[{{0,0,0}}] = -center[0] * center[1] * center[2];\n    prefactor *= 8.*pow(2.*ec*ec*ec/pi, 0.75);\n  }\n  else if(type == GaussianType::fxzz) {\n    prefactor = PolynomialCoeffs(3);\n    prefactor[{{1,0,2}}] = 1.;\n    prefactor[{{0,0,2}}] = -center[0];\n    prefactor[{{1,0,1}}] = -2. * center[2];\n    prefactor[{{0,0,1}}] = 2. * center[0] * center[2];\n    prefactor[{{1,0,0}}] = center[2] * center[2];\n    prefactor[{{0,0,0}}] = -center[0] * center[2] * center[2];\n    prefactor *= pow(2.*ec/pi, 0.25) * 2.*pow(2.*ec*ec*ec/pi, 0.25) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n  }\n  else if(type == GaussianType::fyyy) {\n    prefactor = PolynomialCoeffs(3);\n    prefactor[{{0,3,0}}] = 1.;\n    prefactor[{{0,2,0}}] = -3. * center[1];\n    prefactor[{{0,1,0}}] = 3. * center[1] * center[1];\n    prefactor[{{0,0,0}}] = -center[1] * center[1] * center[1];\n    prefactor *= pow(2.*ec/pi, 0.5) * 8.*ec*pow(2.*ec*ec*ec/pi, 0.25)/sqrt(15.);\n  }\n  else if(type == GaussianType::fyyz) {\n    prefactor = PolynomialCoeffs(3);\n    prefactor[{{0,2,1}}] = 1.;\n    prefactor[{{0,2,0}}] = -center[2];\n    prefactor[{{0,1,1}}] = -2. * center[1];\n    prefactor[{{0,1,0}}] = 2. * center[1] * center[2];\n    prefactor[{{0,0,1}}] = center[1] * center[1];\n    prefactor[{{0,0,0}}] = -center[1] * center[1] * center[2];\n    prefactor *= pow(2.*ec/pi, 0.25) * 2.*pow(2.*ec*ec*ec/pi, 0.25) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n  }\n  else if(type == GaussianType::fyzz) {\n    prefactor = PolynomialCoeffs(3);\n    prefactor[{{0,1,2}}] = 1.;\n    prefactor[{{0,0,2}}] = -center[1];\n    prefactor[{{0,1,1}}] = -2. * center[2];\n    prefactor[{{0,0,1}}] = 2. * center[1] * center[2];\n    prefactor[{{0,1,0}}] = center[2] * center[2];\n    prefactor[{{0,0,0}}] = -center[1] * center[2] * center[2];\n    prefactor *= pow(2.*ec/pi, 0.25) * 2.*pow(2.*ec*ec*ec/pi, 0.25) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n  }\n  else if(type == GaussianType::fzzz) {\n    prefactor = PolynomialCoeffs(3);\n    prefactor[{{0,0,3}}] = 1.;\n    prefactor[{{0,0,2}}] = -3. * center[2];\n    prefactor[{{0,0,1}}] = 3. * center[2] * center[2];\n    prefactor[{{0,0,0}}] = -center[2] * center[2] * center[2];\n    prefactor *= pow(2.*ec/pi, 0.5) * 8.*ec*pow(2.*ec*ec*ec/pi, 0.25)/sqrt(15.);\n  }\n\n  // spherical d orbitals\n  else if(type == GaussianType::dzzmrr) {\n    // setup as dzz - dxx/2 - dyy/2\n    PolynomialCoeffs predxx(2), predyy(2), predzz(2);\n    predxx[{{2,0,0}}] = 1.;\n    predxx[{{1,0,0}}] = -2. * center[0];\n    predxx[{{0,0,0}}] = center[0] * center[0];\n    predxx *= -pow(2.*ec/pi, 0.5) * 2.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n    predyy[{{0,2,0}}] = 1.;\n    predyy[{{0,1,0}}] = -2. * center[1];\n    predyy[{{0,0,0}}] = center[1] * center[1];\n    predyy *= -pow(2.*ec/pi, 0.5) * 2.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n    predzz[{{0,0,2}}] = 1.;\n    predzz[{{0,0,1}}] = -2. * center[2];\n    predzz[{{0,0,0}}] = center[2] * center[2];\n    predzz *= pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.);\n    prefactor = predxx + predyy + predzz;\n  }\n  else if(type == GaussianType::dxxmyy) {\n    // setup as sqrt(3)*dxx/2 - sqrt(3)*dyy/2\n    PolynomialCoeffs predxx(2), predyy(2);\n    predxx[{{2,0,0}}] = 1.;\n    predxx[{{1,0,0}}] = -2. * center[0];\n    predxx[{{0,0,0}}] = center[0] * center[0];\n    predxx *= pow(2.*ec/pi, 0.5) * 2.*ec*pow(2.*ec/pi, 0.25);\n    predyy[{{0,2,0}}] = 1.;\n    predyy[{{0,1,0}}] = -2. * center[1];\n    predyy[{{0,0,0}}] = center[1] * center[1];\n    predyy *= -pow(2.*ec/pi, 0.5) * 2.*ec*pow(2.*ec/pi, 0.25);\n    prefactor = predxx + predyy;\n  }\n\n  // spherical f orbitals\n  else if(type == GaussianType::fxyymxxx) {\n    // setup dxx and dyy, get (3dyy - dxx), normalize, and multiply by x\n    PolynomialCoeffs xfact(1), predxx(2), predyy(2);\n    xfact[{{1,0,0}}] = 1.;\n    xfact[{{0,0,0}}] = -center[0];\n    predxx[{{2,0,0}}] = 1.;\n    predxx[{{1,0,0}}] = -2. * center[0];\n    predxx[{{0,0,0}}] = center[0] * center[0];\n    predxx *= -pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)/sqrt(3.) * sqrt(0.5*ec);\n    predyy[{{0,2,0}}] = 1.;\n    predyy[{{0,1,0}}] = -2. * center[1];\n    predyy[{{0,0,0}}] = center[1] * center[1];\n    predyy *= sqrt(3.) * pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25) * sqrt(0.5*ec);\n    prefactor = xfact * (predxx + predyy);\n  }\n  else if(type == GaussianType::fxxzmyyz) {\n    // setup dxx and dyy, get (dxx - dyy), normalize, and multiply by z\n    PolynomialCoeffs zfact(1), predxx(2), predyy(2);\n    zfact[{{0,0,1}}] = 1.;\n    zfact[{{0,0,0}}] = -center[2];\n    predxx[{{2,0,0}}] = 1.;\n    predxx[{{1,0,0}}] = -2. * center[0];\n    predxx[{{0,0,0}}] = center[0] * center[0];\n    predxx *= pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)*sqrt(ec);\n    predyy[{{0,2,0}}] = 1.;\n    predyy[{{0,1,0}}] = -2. * center[1];\n    predyy[{{0,0,0}}] = center[1] * center[1];\n    predyy *= -pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)*sqrt(ec);\n    prefactor = zfact * (predxx + predyy);\n  }\n  else if(type == GaussianType::fxzzmrrx) {\n    // setup dxx, dyy, and dzz; get (4dzz-dxx-dyy); normalize; and multiply by x\n    PolynomialCoeffs xfact(1), predxx(2), predyy(2), predzz(2);\n    xfact[{{1,0,0}}] = 1.;\n    xfact[{{0,0,0}}] = -center[0];\n    predxx[{{2,0,0}}] = 1.;\n    predxx[{{1,0,0}}] = -2. * center[0];\n    predxx[{{0,0,0}}] = center[0] * center[0];\n    predxx *= -pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)*sqrt(0.1*ec);\n    predyy[{{0,2,0}}] = 1.;\n    predyy[{{0,1,0}}] = -2. * center[1];\n    predyy[{{0,0,0}}] = center[1] * center[1];\n    predyy *= -pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)*sqrt(0.1*ec);\n    predzz[{{0,0,2}}] = 1.;\n    predzz[{{0,0,1}}] = -2. * center[2];\n    predzz[{{0,0,0}}] = center[2] * center[2];\n    predzz *= 4.*pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)*sqrt(0.1*ec);\n    prefactor = xfact * (predxx + predyy + predzz);\n  }\n  else if(type == GaussianType::fzzzmrrz) {\n    // setup dxx, dyy, and dzz; get (2dzz-3dxx-3dyy); normalize; and multiply by z\n    PolynomialCoeffs zfact(1), predxx(2), predyy(2), predzz(2);\n    zfact[{{0,0,1}}] = 1.;\n    zfact[{{0,0,0}}] = -center[2];\n    predxx[{{2,0,0}}] = 1.;\n    predxx[{{1,0,0}}] = -2. * center[0];\n    predxx[{{0,0,0}}] = center[0] * center[0];\n    predxx *= -pow(2.*ec/pi, 0.5) * 12.*ec*pow(2.*ec/pi, 0.25)*sqrt(ec/15.);\n    predyy[{{0,2,0}}] = 1.;\n    predyy[{{0,1,0}}] = -2. * center[1];\n    predyy[{{0,0,0}}] = center[1] * center[1];\n    predyy *= -pow(2.*ec/pi, 0.5) * 12.*ec*pow(2.*ec/pi, 0.25)*sqrt(ec/15.);\n    predzz[{{0,0,2}}] = 1.;\n    predzz[{{0,0,1}}] = -2. * center[2];\n    predzz[{{0,0,0}}] = center[2] * center[2];\n    predzz *= pow(2.*ec/pi, 0.5) * 8.*ec*pow(2.*ec/pi, 0.25)*sqrt(ec/15.);\n    prefactor = zfact * (predxx + predyy + predzz);\n  }\n  else if(type == GaussianType::fyzzmrry) {\n    // setup dxx, dyy, and dzz; get (4dzz-dxx-dyy); normalize; and multiply by y\n    PolynomialCoeffs yfact(1), predxx(2), predyy(2), predzz(2);\n    yfact[{{0,1,0}}] = 1.;\n    yfact[{{0,0,0}}] = -center[1];\n    predxx[{{2,0,0}}] = 1.;\n    predxx[{{1,0,0}}] = -2. * center[0];\n    predxx[{{0,0,0}}] = center[0] * center[0];\n    predxx *= -pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)*sqrt(0.1*ec);\n    predyy[{{0,2,0}}] = 1.;\n    predyy[{{0,1,0}}] = -2. * center[1];\n    predyy[{{0,0,0}}] = center[1] * center[1];\n    predyy *= -pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)*sqrt(0.1*ec);\n    predzz[{{0,0,2}}] = 1.;\n    predzz[{{0,0,1}}] = -2. * center[2];\n    predzz[{{0,0,0}}] = center[2] * center[2];\n    predzz *= pow(2.*ec/pi, 0.5) * 16.*ec*pow(2.*ec/pi, 0.25)*sqrt(0.1*ec);\n    prefactor = yfact * (predxx + predyy + predzz);\n  }\n  else if(type == GaussianType::fxxymyyy) {\n    // setup dxx and dyy, get (3dxx-dyy), normalize, and multiply by y\n    PolynomialCoeffs yfact(1), predxx(2), predyy(2);\n    yfact[{{0,1,0}}] = 1.;\n    yfact[{{0,0,0}}] = -center[1];\n    predxx[{{2,0,0}}] = 1.;\n    predxx[{{1,0,0}}] = -2. * center[0];\n    predxx[{{0,0,0}}] = center[0] * center[0];\n    predxx *= pow(2.*ec/pi, 0.5) * 12.*ec*pow(2.*ec/pi, 0.25)*sqrt(ec/6.);\n    predyy[{{0,2,0}}] = 1.;\n    predyy[{{0,1,0}}] = -2. * center[1];\n    predyy[{{0,0,0}}] = center[1] * center[1];\n    predyy *= -pow(2.*ec/pi, 0.5) * 4.*ec*pow(2.*ec/pi, 0.25)*sqrt(ec/6);\n    prefactor = yfact * (predxx + predyy);\n  }\n\n  // Cartesian g orbitals\n  else if(type == GaussianType::gxxxx) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{4,0,0}}] =  1.;\n    prefactor[{{3,0,0}}] = -4. * center[0];\n    prefactor[{{2,0,0}}] =  6. * center[0] * center[0];\n    prefactor[{{1,0,0}}] = -4. * pow(center[0], 3); \n    prefactor[{{0,0,0}}] =  pow(center[0], 4);\n    prefactor *= 16./sqrt(105.) * pow(ec, 2.75) * pow(2./pi, 0.75); \n  }\n  else if(type == GaussianType::gxxxy) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{3,1,0}}] =  1.;\n    prefactor[{{2,1,0}}] = -3. * center[0];\n    prefactor[{{1,1,0}}] =  3. * center[0] * center[0];\n    prefactor[{{0,1,0}}] = -pow(center[0], 3);\n    prefactor[{{3,0,0}}] = -center[1];\n    prefactor[{{2,0,0}}] =  3. * center[0] * center[1];\n    prefactor[{{1,0,0}}] = -3. * center[0] * center[0] * center[1];\n    prefactor[{{0,0,0}}] =  pow(center[0], 3) * center[1];\n    prefactor *= 16./sqrt(15.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gxxxz) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{3,0,1}}] =  1.;\n    prefactor[{{2,0,1}}] = -3. * center[0];\n    prefactor[{{1,0,1}}] =  3. * center[0] * center[0];\n    prefactor[{{0,0,1}}] = -pow(center[0], 3);\n    prefactor[{{3,0,0}}] = -center[2];\n    prefactor[{{2,0,0}}] =  3. * center[0] * center[2];\n    prefactor[{{1,0,0}}] = -3. * center[0] * center[0] * center[2];\n    prefactor[{{0,0,0}}] =  pow(center[0], 3) * center[2];\n    prefactor *= 16./sqrt(15.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gxxyy) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{2,2,0}}] =  1.;\n    prefactor[{{1,2,0}}] = -2. * center[0];\n    prefactor[{{0,2,0}}] =  center[0] * center[0];\n    prefactor[{{2,1,0}}] = -2. * center[1];\n    prefactor[{{1,1,0}}] =  4. * center[0] * center[1];\n    prefactor[{{0,1,0}}] = -2. * center[0] * center[0] * center[1];\n    prefactor[{{2,0,0}}] =  center[1] * center[1];\n    prefactor[{{1,0,0}}] = -2. * center[0] * center[1] * center[1];\n    prefactor[{{0,0,0}}] =  center[0] * center[0] * center[1] * center[1];\n    prefactor *= 16./3. * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gxxyz) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{2,1,1}}] =  1.;\n    prefactor[{{1,1,1}}] = -2. * center[0];\n    prefactor[{{0,1,1}}] =  center[0] * center[0];\n    prefactor[{{2,0,1}}] = -center[1];\n    prefactor[{{1,0,1}}] =  2. * center[0] * center[1];\n    prefactor[{{0,0,1}}] = -center[0] * center[0] * center[1];\n    prefactor[{{2,1,0}}] = -center[2];\n    prefactor[{{1,1,0}}] =  2. * center[0] * center[2];\n    prefactor[{{0,1,0}}] = -center[0] * center[0] * center[2];\n    prefactor[{{2,0,0}}] =  center[1] * center[2];\n    prefactor[{{1,0,0}}] = -2. * center[0] * center[1] * center[2];\n    prefactor[{{0,0,0}}] =  center[0] * center[0] * center[1] * center[2];\n    prefactor *= 16./sqrt(3.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gxxzz) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{2,0,2}}] =  1.;\n    prefactor[{{1,0,2}}] = -2. * center[0];\n    prefactor[{{0,0,2}}] =  center[0] * center[0];\n    prefactor[{{2,0,1}}] = -2. * center[2];\n    prefactor[{{1,0,1}}] =  4. * center[0] * center[2];\n    prefactor[{{0,0,1}}] = -2. * center[0] * center[0] * center[2];\n    prefactor[{{2,0,0}}] =  center[2] * center[2];\n    prefactor[{{1,0,0}}] = -2. * center[0] * center[2] * center[2];\n    prefactor[{{0,0,0}}] =  center[0] * center[0] * center[2] * center[2];\n    prefactor *= 16./3. * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gxyyy) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{1,3,0}}] =  1.;\n    prefactor[{{0,3,0}}] = -center[0];\n    prefactor[{{1,2,0}}] = -3. * center[1];\n    prefactor[{{0,2,0}}] =  3. * center[0] * center[1];\n    prefactor[{{1,1,0}}] =  3. * center[1] * center[1];\n    prefactor[{{0,1,0}}] = -3. * center[0] * center[1] * center[1];\n    prefactor[{{1,0,0}}] = -pow(center[1], 3);\n    prefactor[{{0,0,0}}] =  center[0] * pow(center[1], 3);\n    prefactor *= 16./sqrt(15.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gxyyz) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{1,2,1}}] =  1.;\n    prefactor[{{0,2,1}}] = -center[0];\n    prefactor[{{1,1,1}}] = -2. * center[1];\n    prefactor[{{0,1,1}}] =  2. * center[0] * center[1];\n    prefactor[{{1,0,1}}] =  center[1] * center[1];\n    prefactor[{{0,0,1}}] = -center[0] * center[1] * center[1];\n    prefactor[{{1,2,0}}] = -center[2];\n    prefactor[{{0,2,0}}] =  center[0] * center[2];\n    prefactor[{{1,1,0}}] =  2. * center[1] * center[2];\n    prefactor[{{0,1,0}}] = -2. * center[0] * center[1] * center[2];\n    prefactor[{{1,0,0}}] = -center[1] * center[1] * center[2];\n    prefactor[{{0,0,0}}] =  center[0] * center[1] * center[1] * center[2];\n    prefactor *= 16./sqrt(3.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gxyzz) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{1,1,2}}] =  1.;\n    prefactor[{{0,1,2}}] = -center[0]; \n    prefactor[{{1,0,2}}] = -center[1];\n    prefactor[{{0,0,2}}] =  center[0] * center[1];\n    prefactor[{{1,1,1}}] = -2. * center[2];\n    prefactor[{{0,1,1}}] =  2. * center[0] * center[2];\n    prefactor[{{1,0,1}}] =  2. * center[1] * center[2];\n    prefactor[{{0,0,1}}] = -2. * center[0] * center[1] * center[2];\n    prefactor[{{1,1,0}}] =  center[2] * center[2];\n    prefactor[{{0,1,0}}] = -center[0] * center[2] * center[2];\n    prefactor[{{1,0,0}}] = -center[1] * center[2] * center[2];\n    prefactor[{{0,0,0}}] =  center[0] * center[1] * center[2] * center[2];\n    prefactor *= 16./sqrt(3.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gxzzz) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{1,0,3}}] =  1.;\n    prefactor[{{0,0,3}}] = -center[0];\n    prefactor[{{1,0,2}}] = -3. * center[2];\n    prefactor[{{0,0,2}}] =  3. * center[0] * center[2];\n    prefactor[{{1,0,1}}] =  3. * center[2] * center[2];\n    prefactor[{{0,0,1}}] = -3. * center[0] * center[2] * center[2];\n    prefactor[{{1,0,0}}] = -pow(center[2], 3);\n    prefactor[{{0,0,0}}] =  center[0] * pow(center[2], 3);\n    prefactor *= 16./sqrt(15.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gyyyy) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{0,4,0}}] = 1.;\n    prefactor[{{0,3,0}}] = -4. * center[1];\n    prefactor[{{0,2,0}}] =  6. * center[1] * center[1];\n    prefactor[{{0,1,0}}] = -4. * pow(center[1], 3); \n    prefactor[{{0,0,0}}] = + pow(center[1], 4);\n    prefactor *= 16./sqrt(105.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gyyyz) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{0,3,1}}] =  1.;\n    prefactor[{{0,2,1}}] = -3. * center[1];\n    prefactor[{{0,1,1}}] =  3. * center[1] * center[1];\n    prefactor[{{0,0,1}}] = -pow(center[1], 3);\n    prefactor[{{0,3,0}}] = -center[2];\n    prefactor[{{0,2,0}}] =  3. * center[1] * center[2];\n    prefactor[{{0,1,0}}] = -3. * center[1] * center[1] * center[2];\n    prefactor[{{0,0,0}}] =  pow(center[1], 3) * center[2];\n    prefactor *= 16./sqrt(15.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gyyzz) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{0,2,2}}] =  1.;\n    prefactor[{{0,1,2}}] = -2. * center[1];\n    prefactor[{{0,0,2}}] =  center[1] * center[1];\n    prefactor[{{0,2,1}}] = -2. * center[2];\n    prefactor[{{0,1,1}}] =  4. * center[1] * center[2];\n    prefactor[{{0,0,1}}] = -2. * center[1] * center[1] * center[2];\n    prefactor[{{0,2,0}}] =  center[2] * center[2];\n    prefactor[{{0,1,0}}] = -2. * center[1] * center[2] * center[2];\n    prefactor[{{0,0,0}}] =  center[1] * center[1] * center[2] * center[2];\n    prefactor *= 16./3. * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gyzzz) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{0,1,3}}] =  1.;\n    prefactor[{{0,0,3}}] = -center[1];\n    prefactor[{{0,1,2}}] = -3. * center[2];\n    prefactor[{{0,0,2}}] =  3. * center[1] * center[2];\n    prefactor[{{0,1,1}}] =  3. * center[2] * center[2];\n    prefactor[{{0,0,1}}] = -3. * center[1] * center[2] * center[2];\n    prefactor[{{0,1,0}}] = -pow(center[2], 3);\n    prefactor[{{0,0,0}}] =  center[1] * pow(center[2], 3);\n    prefactor *= 16./sqrt(15.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::gzzzz) {\n    prefactor = PolynomialCoeffs(4);\n    prefactor[{{0,0,4}}] = 1.;\n    prefactor[{{0,0,3}}] = -4. * center[2];\n    prefactor[{{0,0,2}}] =  6. * center[2] * center[2];\n    prefactor[{{0,0,1}}] = -4. * pow(center[2], 3); \n    prefactor[{{0,0,0}}] = pow(center[2], 4);\n    prefactor *= 16./sqrt(105.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n  }\n\n  // spherical g orbitals\n  // (l,m) = (4,-4) \n  else if(type == GaussianType::gxydx2my2 ) {\n    // get (xx-yy), multiply by xy, normalize\n    PolynomialCoeffs xx(2), yy(2), x(1), y(1);\n    x[{{1,0,0}}] = 1.;\n    x[{{0,0,0}}] = -center[0];\n    y[{{0,1,0}}] = 1.;\n    y[{{0,0,0}}] = -center[1];\n    xx[{{2,0,0}}] = 1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] = center[0] * center[0];\n    yy[{{0,2,0}}] = 1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] = center[1] * center[1];\n    double norm = 8./sqrt(3.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n    prefactor = norm * x * y * (xx + (-1. * yy));\n  }\n  // (l,m) = (4,-3)\n  else if(type == GaussianType::gyzdx2my2) {\n    // get (3xx - yy), multiply by y*z, normalize\n    PolynomialCoeffs xx(2), yy(2), y(1), z(1);\n    y[{{0,1,0}}] = 1.;\n    y[{{0,0,0}}] = -center[1];\n    z[{{0,0,1}}] = 1.;\n    z[{{0,0,0}}] = -center[2];\n    xx[{{2,0,0}}] = 1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] = center[0] * center[0];\n    yy[{{0,2,0}}] = 1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] = center[1] * center[1];\n    double norm = 8./sqrt(3.) * pow(ec, 2.75) * pow(2., 0.25) * pow(1./pi, 0.75);\n    prefactor = norm * y * z * (3. * xx + (-1. * yy));\n  }\n  // (l,m) = (4,-2)\n  else if(type == GaussianType::gxydz2mr2) {\n    // get (7zz - rr), multiply by x*y, normalize\n    PolynomialCoeffs zz(2), rr(2), x(1), y(1);\n    x[{{1,0,0}}] = 1.;\n    x[{{0,0,0}}] = -center[0];\n    y[{{0,1,0}}] = 1.;\n    y[{{0,0,0}}] = -center[1];\n    zz[{{0,0,2}}] = 1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] = center[2] * center[2];    \n    rr[{{2,0,0}}] = 1.;\n    rr[{{1,0,0}}] = -2. * center[0];\n    rr[{{0,2,0}}] = 1.;\n    rr[{{0,1,0}}] = -2. * center[1];\n    rr[{{0,0,2}}] = 1.;\n    rr[{{0,0,1}}] = -2. * center[2];\n    rr[{{0,0,0}}] = center[0] * center[0] + center[1] * center[1] + center[2] * center[2];\n    double norm = 8./sqrt(21.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n    prefactor = norm * x * y * (7. * zz + (-1. * rr));\n  }\n  // (l,m) = (4,-1)\n  else if(type == GaussianType::gyzdz2mr2) {\n    // get (7zz - 3rr), multiply by y*z, normalize\n    PolynomialCoeffs zz(2), rr(2), y(1), z(1);\n    y[{{0,1,0}}] = 1.;\n    y[{{0,0,0}}] = -center[1];\n    z[{{0,0,1}}] = 1.;\n    z[{{0,0,0}}] = -center[2];\n    zz[{{0,0,2}}] = 1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] = center[2] * center[2];\n    rr[{{2,0,0}}] = 1.;\n    rr[{{1,0,0}}] = -2. * center[0];\n    rr[{{0,2,0}}] = 1.;\n    rr[{{0,1,0}}] = -2. * center[1];\n    rr[{{0,0,2}}] = 1.;\n    rr[{{0,0,1}}] = -2. * center[2];\n    rr[{{0,0,0}}] = center[0] * center[0] + center[1] * center[1] + center[2] * center[2];\n    double norm = 8./sqrt(21.) * pow(2., 0.25) * pow(ec, 2.75) * pow(1./pi, 0.75);\n    prefactor = norm * y * z * (7. * zz + (-3. * rr));\n  }\n  // (l,m) = (4,0)\n  else if(type == GaussianType::gzero) {\n    // we want: 3x^4 + 6x^2y^2 + 3y^4 - 24x^2z^2 - 24y^2z^2 + 8z^4\n    PolynomialCoeffs x4(4), y4(4), z4(4), xx(2), yy(2), zz(2);\n    x4[{{4,0,0}}] =  1.;\n    x4[{{3,0,0}}] = -4. * center[0];\n    x4[{{2,0,0}}] =  6. * pow(center[0], 2);\n    x4[{{1,0,0}}] = -4. * pow(center[0], 3);\n    x4[{{0,0,0}}] =  pow(center[0], 4);\n    y4[{{0,4,0}}] =  1.;\n    y4[{{0,3,0}}] = -4. * center[1];\n    y4[{{0,2,0}}] =  6. * pow(center[1], 2);\n    y4[{{0,1,0}}] = -4. * pow(center[1], 3);\n    y4[{{0,0,0}}] =  pow(center[1], 4);\n    z4[{{0,0,4}}] =  1.;\n    z4[{{0,0,3}}] = -4. * center[2];\n    z4[{{0,0,2}}] =  6. * pow(center[2], 2);\n    z4[{{0,0,1}}] = -4. * pow(center[2], 3);\n    z4[{{0,0,0}}] =  pow(center[2], 4);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  pow(center[0], 2);\n    yy[{{0,2,0}}] =  1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  pow(center[1], 2);\n    zz[{{0,0,2}}] =  1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] =  pow(center[2], 2);\n    double norm = 2./sqrt(105.) * pow(ec, 2.75) * pow(2./pi, 0.75); \n    prefactor = norm * (3.*x4 + 3.*y4 + 8.*z4 + 6.*xx*yy + (-24.*xx*zz) + (-24.*yy*zz)); \n  }\n  // (l,m) = (4,1)\n  else if(type == GaussianType::gxzdz2mr2) {\n    // get (7zz - 3rr), multiply by x*z, normalize\n    PolynomialCoeffs zz(2), rr(2), x(1), z(1);\n    x[{{1,0,0}}] = 1.;\n    x[{{0,0,0}}] = -center[0];\n    z[{{0,0,1}}] = 1.;\n    z[{{0,0,0}}] = -center[2];\n    zz[{{0,0,2}}] = 1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] = center[2] * center[2];    \n    rr[{{2,0,0}}] = 1.;\n    rr[{{1,0,0}}] = -2. * center[0];\n    rr[{{0,2,0}}] = 1.;\n    rr[{{0,1,0}}] = -2. * center[1];\n    rr[{{0,0,2}}] = 1.;\n    rr[{{0,0,1}}] = -2. * center[2];\n    rr[{{0,0,0}}] = center[0] * center[0] + center[1] * center[1] + center[2] * center[2];\n    double norm = 8./sqrt(21.) * pow(2, 0.25) * pow(ec, 2.75) * pow(1./pi, 0.75);\n    // Testing shows nwchem uses the negative\n    prefactor = (-1.) * norm * x * z * (7.*zz + (-3.*rr)); \n  }\n  // (l,m) = (4,2)\n  else if(type == GaussianType::gx2my2dz2mr2) {\n    // get (7zz - rr) and (xx - yy), multiply together, normalize\n    PolynomialCoeffs xx(2), yy(2), zz(2), rr(2);\n    xx[{{2,0,0}}] = 1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] = center[0] * center[0];\n    yy[{{0,2,0}}] = 1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] = center[1] * center[1];\n    zz[{{0,0,2}}] = 1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] = center[2] * center[2]; \n    rr[{{2,0,0}}] = 1.;\n    rr[{{1,0,0}}] = -2. * center[0];\n    rr[{{0,2,0}}] = 1.;\n    rr[{{0,1,0}}] = -2. * center[1];\n    rr[{{0,0,2}}] = 1.;\n    rr[{{0,0,1}}] = -2. * center[2];\n    rr[{{0,0,0}}] = center[0] * center[0] + center[1] * center[1] + center[2] * center[2];\n    double norm = 4./sqrt(21.) * pow(ec, 2.75) * pow(2./pi, 0.75);\n    prefactor = norm * (xx + (-1*yy)) * (7.*zz + (-1.*rr));  \n  }\n  // (l,m) = (4,3)\n  else if(type == GaussianType::gxzdx2my2) {\n    // get (xx - 3yy), multiply by xz, normalize\n    PolynomialCoeffs xx(2), yy(2), x(1), z(1);\n    x[{{1,0,0}}] = 1.;\n    x[{{0,0,0}}] = -center[0];\n    z[{{0,0,1}}] = 1.;\n    z[{{0,0,0}}] = -center[2];\n    xx[{{2,0,0}}] = 1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] = center[0] * center[0];\n    yy[{{0,2,0}}] = 1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] = center[1] * center[1];\n    double norm = 8./sqrt(3.) * pow(2., 0.25) * pow(ec, 2.75) * pow(1./pi, 0.75);\n    // Testing shows nwchem uses the negative\n    prefactor = norm * x * z * (3.*yy + -1.*xx); \n  }\n  // (l,m) = (4,4)\n  else if(type == GaussianType::gx4mx2y2py4) {\n    // we want: x^4 - 6x^2y^2 + y^4, then normalize \n    PolynomialCoeffs x4(4), y4(4), xx(2), yy(2);\n    x4[{{4,0,0}}] =  1.;\n    x4[{{3,0,0}}] = -4. * center[0];\n    x4[{{2,0,0}}] =  6. * center[0] * center[0];\n    x4[{{1,0,0}}] = -4. * pow(center[0], 3);\n    x4[{{0,0,0}}] =  pow(center[0], 4);\n    y4[{{0,4,0}}] =  1.;\n    y4[{{0,3,0}}] = -4 * center[1];\n    y4[{{0,2,0}}] =  6. * center[1] * center[1];\n    y4[{{0,1,0}}] = -4. * pow(center[1], 3);\n    y4[{{0,0,0}}] =  pow(center[1], 4);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    yy[{{0,2,0}}] =  1.; \n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    double norm = 2./sqrt(3.) * pow(ec, 2.75) * pow(2./pi, 0.75);     \n    prefactor = norm * (x4 + (-6.*xx*yy) + y4); \n  }\n\n  // Cartesian h orbitals\n  else if(type == GaussianType::hxxxxx) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{5,0,0}}] =  1.;\n    prefactor[{{4,0,0}}] = -5. * center[0];\n    prefactor[{{3,0,0}}] =  10. * center[0] * center[0];\n    prefactor[{{2,0,0}}] = -10. * pow(center[0], 3);\n    prefactor[{{1,0,0}}] =  5. * pow(center[0], 4); \n    prefactor[{{0,0,0}}] = -pow(center[0], 5);\n    prefactor *= 32./(3.*sqrt(105.)) * pow(ec, 3.25) * pow(2./pi, 0.75); \n  }\n  else if(type == GaussianType::hxxxxy) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{4,1,0}}] =  1.;\n    prefactor[{{3,1,0}}] = -4. * center[0];\n    prefactor[{{2,1,0}}] =  6. * center[0] * center[0];\n    prefactor[{{1,1,0}}] = -4. * pow(center[0], 3);\n    prefactor[{{0,1,0}}] =  pow(center[0], 4);\n    prefactor[{{4,0,0}}] = -1. * center[1];\n    prefactor[{{3,0,0}}] =  4. * center[0] * center[1];\n    prefactor[{{2,0,0}}] = -6. * center[0] * center[0] * center[1];\n    prefactor[{{1,0,0}}] =  4. * pow(center[0], 3) * center[1];\n    prefactor[{{0,0,0}}] = -pow(center[0], 4) * center[1];\n    prefactor *= 32./sqrt(105.) * pow(ec, 3.25) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::hxxxxz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{4,0,1}}] =  1.;\n    prefactor[{{3,0,1}}] = -4. * center[0];\n    prefactor[{{2,0,1}}] =  6. * center[0] * center[0];\n    prefactor[{{1,0,1}}] = -4. * pow(center[0], 3);\n    prefactor[{{0,0,1}}] =  pow(center[0], 4);\n    prefactor[{{4,0,0}}] = -center[2];\n    prefactor[{{3,0,0}}] =  4. * center[0] * center[2];\n    prefactor[{{2,0,0}}] = -6. * center[0] * center[0] * center[2];\n    prefactor[{{1,0,0}}] =  4. * pow(center[0], 3) * center[2];\n    prefactor[{{0,0,0}}] = -pow(center[0], 4) * center[2];\n    prefactor *= 32./sqrt(105.) * pow(ec, 3.25) * pow(2./pi, 0.75);    \n  }\n  else if(type == GaussianType::hxxxyy) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{3,2,0}}] =  1.;\n    prefactor[{{2,2,0}}] = -3. * center[0];\n    prefactor[{{1,2,0}}] =  3. * center[0] * center[0];\n    prefactor[{{0,2,0}}] = -pow(center[0], 3);\n    prefactor[{{3,1,0}}] = -2. * center[1];\n    prefactor[{{2,1,0}}] =  6. * center[0] * center[1];\n    prefactor[{{1,1,0}}] = -6. * center[0] * center[0] * center[1];\n    prefactor[{{0,1,0}}] =  2. * pow(center[0], 3) * center[1];\n    prefactor[{{3,0,0}}] =  center[1] * center[1];\n    prefactor[{{2,0,0}}] = -3. * center[0] * center[1] * center[1];\n    prefactor[{{1,0,0}}] =  3. * center[0] * center[0] * center[1] * center[1];\n    prefactor[{{0,0,0}}] = -pow(center[0], 3) * center[1] * center[1];\n    prefactor *= 32./(3.*sqrt(5.)) * pow(ec, 3.25) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::hxxxyz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{3,1,1}}] =  1.;\n    prefactor[{{2,1,1}}] = -3. * center[0];\n    prefactor[{{1,1,1}}] =  3. * center[0] * center[0];\n    prefactor[{{0,1,1}}] = -pow(center[0], 3);\n    prefactor[{{3,0,1}}] = -center[1];\n    prefactor[{{2,0,1}}] =  3. * center[0] * center[1];\n    prefactor[{{1,0,1}}] = -3. * center[0] * center[0] * center[1];\n    prefactor[{{0,0,1}}] =  pow(center[0], 3) * center[1];\n    prefactor[{{3,1,0}}] = -center[2];\n    prefactor[{{2,1,0}}] =  3. * center[0] * center[2];\n    prefactor[{{1,1,0}}] = -3. * center[0] * center[0] * center[2];\n    prefactor[{{0,1,0}}] =  pow(center[0], 3) * center[2];\n    prefactor[{{3,0,0}}] =  center[1] * center[2];\n    prefactor[{{2,0,0}}] = -3. * center[0] * center[1] * center[2];\n    prefactor[{{1,0,0}}] =  3. * center[0] * center[0] * center[1] * center[2];\n    prefactor[{{0,0,0}}] = -pow(center[0], 3) * center[1] * center[2];\n    prefactor *= 32./sqrt(15.) * pow(ec, 3.25) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::hxxxzz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{3,0,2}}] =  1.;\n    prefactor[{{2,0,2}}] = -3. * center[0];\n    prefactor[{{1,0,2}}] =  3. * center[0] * center[0];\n    prefactor[{{0,0,2}}] = -pow(center[0], 3);\n    prefactor[{{3,0,1}}] = -2. * center[2];\n    prefactor[{{2,0,1}}] =  6. * center[0] * center[2];\n    prefactor[{{1,0,1}}] = -6. * center[0] * center[0] * center[2];\n    prefactor[{{0,0,1}}] =  2. * pow(center[0], 3) * center[2];\n    prefactor[{{3,0,0}}] =  center[2] * center[2];\n    prefactor[{{2,0,0}}] = -3. * center[0] * center[2] * center[2];\n    prefactor[{{1,0,0}}] =  3. * center[0] * center[0] * center[2] * center[2];\n    prefactor[{{0,0,0}}] = -pow(center[0], 3) * center[2] * center[2];\n    prefactor *= 32./(3.*sqrt(5.)) * pow(ec, 3.25) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::hxxyyy) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{2,3,0}}] =  1.;\n    prefactor[{{1,3,0}}] = -2. * center[0];\n    prefactor[{{0,3,0}}] =  center[0] * center[0];\n    prefactor[{{2,2,0}}] = -3. * center[1];\n    prefactor[{{1,2,0}}] =  6. * center[0] * center[1];\n    prefactor[{{0,2,0}}] = -3. * center[0] * center[0] * center[1];\n    prefactor[{{2,1,0}}] =  3. * center[1] * center[1];\n    prefactor[{{1,1,0}}] = -6. * center[0] * center[1] * center[1];\n    prefactor[{{0,1,0}}] =  3. * center[0] * center[0] * center[1] * center[1];\n    prefactor[{{2,0,0}}] = -pow(center[1], 3);\n    prefactor[{{1,0,0}}] =  2. * center[0] * pow(center[1], 3);\n    prefactor[{{0,0,0}}] = -center[0] * center[0] * pow(center[1], 3);\n    prefactor *= 32./(3.*sqrt(5)) * pow(ec, 13./4) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::hxxyyz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{2,2,1}}] =  1.;\n    prefactor[{{1,2,1}}] = -2. * center[0];\n    prefactor[{{0,2,1}}] =  center[0] * center[0];\n    prefactor[{{2,1,1}}] = -2. * center[1];\n    prefactor[{{1,1,1}}] =  4. * center[0] * center[1];\n    prefactor[{{0,1,1}}] = -2. * center[0] * center[0] * center[1];\n    prefactor[{{2,0,1}}] =  center[1] * center[1];\n    prefactor[{{1,0,1}}] = -2. * center[0] * center[1] * center[1];\n    prefactor[{{0,0,1}}] =  center[0] * center[0] * center[1] * center[1];\n    prefactor[{{2,2,0}}] = -center[2];\n    prefactor[{{1,2,0}}] =  2. * center[0] * center[2];\n    prefactor[{{0,2,0}}] = -center[0] * center[0] * center[2];\n    prefactor[{{2,1,0}}] =  2. * center[1] * center[2];\n    prefactor[{{1,1,0}}] = -4. * center[0] * center[1] * center[2];\n    prefactor[{{0,1,0}}] =  2. * center[0] * center[0] * center[1] * center[2];\n    prefactor[{{2,0,0}}] = -center[1] * center[1] * center[2];\n    prefactor[{{1,0,0}}] =  2. * center[0] * center[1] * center[1] * center[2];\n    prefactor[{{0,0,0}}] = -center[0] * center[0] * center[1] * center[1] * center[2];\n    prefactor *= 32./3. * pow(ec, 3.25) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::hxxyzz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{2,1,2}}] =  1.;\n    prefactor[{{1,1,2}}] = -2. * center[0];\n    prefactor[{{0,1,2}}] =  center[0] * center[0];\n    prefactor[{{2,0,2}}] = -center[1];\n    prefactor[{{1,0,2}}] =  2. * center[0] * center[1];\n    prefactor[{{0,0,2}}] = -center[0] * center[0] * center[1];\n    prefactor[{{2,1,1}}] = -2. * center[2];\n    prefactor[{{1,1,1}}] =  4. * center[0] * center[2];\n    prefactor[{{0,1,1}}] = -2. * center[0] * center[0] * center[2];\n    prefactor[{{2,0,1}}] =  2. * center[1] * center[2];\n    prefactor[{{1,0,1}}] = -4. * center[0] * center[1] * center[2];\n    prefactor[{{0,0,1}}] =  2. * center[0] * center[0] * center[1] * center[2];\n    prefactor[{{2,1,0}}] =  center[2] * center[2];\n    prefactor[{{1,1,0}}] = -2. * center[0] * pow(center[2], 2);\n    prefactor[{{0,1,0}}] =  center[0] * center[0] * center[2] * center[2];\n    prefactor[{{2,0,0}}] = -center[1] * center[2] * center[2];\n    prefactor[{{1,0,0}}] =  2. * center[0] * center[1] * center[2] * center[2];\n    prefactor[{{0,0,0}}] = -center[0] * center[0] * center[1] * center[2] * center[2];\n    prefactor *= 32./3. * pow(ec, 3.25) * pow(2./pi, 0.75); \n  }\n  else if(type == GaussianType::hxxzzz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{2,0,3}}] =  1.;\n    prefactor[{{1,0,3}}] = -2. * center[0];\n    prefactor[{{0,0,3}}] =  center[0] * center[0];\n    prefactor[{{2,0,2}}] = -3. * center[2];\n    prefactor[{{1,0,2}}] =  6. * center[0] * center[2];\n    prefactor[{{0,0,2}}] = -3. * center[0] * center[0] * center[2];\n    prefactor[{{2,0,1}}] =  3. * center[2] * center[2];\n    prefactor[{{1,0,1}}] = -6. * center[0] * center[2] * center[2];\n    prefactor[{{0,0,1}}] =  3. * center[0] * center[0] * center[2] * center[2];\n    prefactor[{{2,0,0}}] = -pow(center[2], 3);\n    prefactor[{{1,0,0}}] =  2. * center[0] * pow(center[2], 3);\n    prefactor[{{0,0,0}}] = -center[0] * center[0] * pow(center[2], 3);\n    prefactor *= 32./(3.*sqrt(5.)) * pow(ec, 3.25) * pow(2./pi, 0.75); \n  }\n  else if(type == GaussianType::hxyyyy) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{1,4,0}}] =  1.;\n    prefactor[{{0,4,0}}] = -center[0];\n    prefactor[{{1,3,0}}] = -4. * center[1];\n    prefactor[{{0,3,0}}] =  4. * center[0] * center[1];\n    prefactor[{{1,2,0}}] =  6. * center[1] * center[1];\n    prefactor[{{0,2,0}}] = -6. * center[0] * center[1] * center[1];\n    prefactor[{{1,1,0}}] = -4. * pow(center[1], 3);\n    prefactor[{{0,1,0}}] =  4. * center[0] * pow(center[1], 3);\n    prefactor[{{1,0,0}}] =  pow(center[1], 4);\n    prefactor[{{0,0,0}}] = -center[0] * pow(center[1], 4);\n    prefactor *= 32./sqrt(105.) * pow(ec, 3.25) * pow(2./pi, 0.75); \n  }\n  else if(type == GaussianType::hxyyyz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{1,3,1}}] =  1.;\n    prefactor[{{0,3,1}}] = -center[0];\n    prefactor[{{1,2,1}}] = -3. * center[1];\n    prefactor[{{0,2,1}}] =  3. * center[0] * center[1];\n    prefactor[{{1,1,1}}] =  3. * center[1] * center[1];\n    prefactor[{{0,1,1}}] = -3. * center[0] * center[1] * center[1];\n    prefactor[{{1,0,1}}] = -pow(center[1], 3);\n    prefactor[{{0,0,1}}] =  center[0] * pow(center[1], 3);\n    prefactor[{{1,3,0}}] = -center[2];\n    prefactor[{{0,3,0}}] =  center[0] * center[2];\n    prefactor[{{1,2,0}}] =  3. * center[1] * center[2];\n    prefactor[{{0,2,0}}] = -3. * center[0] * center[1] * center[2];\n    prefactor[{{1,1,0}}] = -3. * center[1] * center[1] * center[2];\n    prefactor[{{0,1,0}}] =  3. * center[0] * center[1] * center[1] * center[2];\n    prefactor[{{1,0,0}}] =  pow(center[1], 3) * center[2];\n    prefactor[{{0,0,0}}] = -center[0] * pow(center[1], 3) * center[2];\n    prefactor *= 32./sqrt(15.) * pow(ec, 3.25) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::hxyyzz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{1,2,2}}] =  1.;\n    prefactor[{{0,2,2}}] = -center[0];\n    prefactor[{{1,1,2}}] = -2. * center[1];\n    prefactor[{{0,1,2}}] =  2. * center[0] * center[1];\n    prefactor[{{1,0,2}}] =  center[1] * center[1];\n    prefactor[{{0,0,2}}] = -center[0] * pow(center[1], 2);\n    prefactor[{{1,2,1}}] = -2. * center[2];\n    prefactor[{{0,2,1}}] =  2. * center[0] * center[2];\n    prefactor[{{1,1,1}}] =  4. * center[1] * center[2];\n    prefactor[{{0,1,1}}] = -4. * center[0] * center[1] * center[2];\n    prefactor[{{1,0,1}}] = -2. * center[1] * center[1] * center[2];\n    prefactor[{{0,0,1}}] =  2. * center[0] * center[1] * center[1] * center[2];\n    prefactor[{{1,2,0}}] =  center[2] * center[2];\n    prefactor[{{0,2,0}}] = -center[0] * center[2] * center[2];\n    prefactor[{{1,1,0}}] = -2. * center[1] * center[2] * center[2];\n    prefactor[{{0,1,0}}] =  2. * center[0] * center[1] * center[2] * center[2];\n    prefactor[{{1,0,0}}] =  center[1] * center[1] * center[2] * center[2];\n    prefactor[{{0,0,0}}] = -center[0] * center[1] * center[1] * center[2] * center[2];\n    prefactor *= 32./3. * pow(ec, 3.25) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::hxyzzz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{1,1,3}}] =  1.;\n    prefactor[{{0,1,3}}] = -center[0];\n    prefactor[{{1,0,3}}] = -center[1];\n    prefactor[{{0,0,3}}] =  center[0] * center[1];\n    prefactor[{{1,1,2}}] = -3. * center[2];\n    prefactor[{{0,1,2}}] =  3. * center[0] * center[2];\n    prefactor[{{1,0,2}}] =  3. * center[1] * center[2];\n    prefactor[{{0,0,2}}] = -3. * center[0] * center[1] * center[2];\n    prefactor[{{1,1,1}}] =  3. * center[2] * center[2];\n    prefactor[{{0,1,1}}] = -3. * center[0] * center[2] * center[2];\n    prefactor[{{1,0,1}}] = -3. * center[1] * center[2] * center[2];\n    prefactor[{{0,0,1}}] =  3. * center[0] * center[1] * center[2] * center[2];\n    prefactor[{{1,1,0}}] = -pow(center[2], 3);\n    prefactor[{{0,1,0}}] =  center[0] * pow(center[2], 3);\n    prefactor[{{1,0,0}}] =  center[1] * pow(center[2], 3);\n    prefactor[{{0,0,0}}] = -center[0] * center[1] * pow(center[2], 3);\n    prefactor *= 32./sqrt(15.) * pow(ec, 3.25) * pow(2./pi, 0.75);\n  }\n  else if(type == GaussianType::hxzzzz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{1,0,4}}] =  1.;\n    prefactor[{{0,0,4}}] = -center[0];\n    prefactor[{{1,0,3}}] = -4. * center[2];\n    prefactor[{{0,0,3}}] =  4. * center[0] * center[2];\n    prefactor[{{1,0,2}}] =  6. * center[2] * center[2];\n    prefactor[{{0,0,2}}] = -6. * center[0] * center[2] * center[2];\n    prefactor[{{1,0,1}}] = -4. * pow(center[2], 3);\n    prefactor[{{0,0,1}}] =  4. * center[0] * pow(center[2], 3);\n    prefactor[{{1,0,0}}] =  pow(center[2], 4);\n    prefactor[{{0,0,0}}] = -center[0] * pow(center[2], 4);\n    prefactor *= 32./sqrt(105.) * pow(ec, 3.25) * pow(2./pi, 0.75);  \n  }\n  else if(type == GaussianType::hyyyyy) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{0,5,0}}] =  1.;\n    prefactor[{{0,4,0}}] = -5. * center[1];\n    prefactor[{{0,3,0}}] =  10. * center[1] * center[1];\n    prefactor[{{0,2,0}}] = -10. * pow(center[1], 3);\n    prefactor[{{0,1,0}}] =  5. * pow(center[1], 4); \n    prefactor[{{0,0,0}}] = -pow(center[1], 5);\n    prefactor *= 32./(3.*sqrt(105.)) * pow(ec, 3.25) * pow(2./pi, 0.75);  \n  }\n  else if(type == GaussianType::hyyyyz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{0,4,1}}] =  1.;\n    prefactor[{{0,3,1}}] = -4. * center[1];\n    prefactor[{{0,2,1}}] =  6. * center[1] * center[1];\n    prefactor[{{0,1,1}}] = -4. * pow(center[1], 3);\n    prefactor[{{0,0,1}}] =  pow(center[1], 4);\n    prefactor[{{0,4,0}}] = -center[2];\n    prefactor[{{0,3,0}}] =  4. * center[1] * center[2];\n    prefactor[{{0,2,0}}] = -6. * center[1] * center[1] * center[2];\n    prefactor[{{0,1,0}}] =  4. * pow(center[1], 3) * center[2];\n    prefactor[{{0,0,0}}] = -pow(center[1], 4) * center[2];\n    prefactor *= 32./sqrt(105.) * pow(ec, 3.25) * pow(2./pi, 0.75);     \n  }\n  else if(type == GaussianType::hyyyzz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{0,3,2}}] =  1.;\n    prefactor[{{0,2,2}}] = -3. * center[1];\n    prefactor[{{0,1,2}}] =  3. * center[1] * center[1];\n    prefactor[{{0,0,2}}] = -pow(center[1], 3);\n    prefactor[{{0,3,1}}] = -2. * center[2];\n    prefactor[{{0,2,1}}] =  6. * center[1] * center[2];\n    prefactor[{{0,1,1}}] = -6. * center[1] * center[1] * center[2];\n    prefactor[{{0,0,1}}] =  2. * pow(center[1], 3) * center[2];\n    prefactor[{{0,3,0}}] =  center[2] * center[2];\n    prefactor[{{0,2,0}}] = -3. * center[1] * center[2] * center[2];\n    prefactor[{{0,1,0}}] =  3. * center[1] * center[1] * center[2] * center[2];\n    prefactor[{{0,0,0}}] = -pow(center[1], 3) * center[2] * center[2];\n    prefactor *= 32./(3.*sqrt(5.)) * pow(ec, 3.25) * pow(2./pi, 0.75); \n  }\n  else if(type == GaussianType::hyyzzz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{0,2,3}}] =  1.;\n    prefactor[{{0,1,3}}] = -2. * center[1];\n    prefactor[{{0,0,3}}] =  center[1] * center[1];\n    prefactor[{{0,2,2}}] = -3. * center[2];\n    prefactor[{{0,1,2}}] =  6. * center[1] * center[2];\n    prefactor[{{0,0,2}}] = -3. * center[1] * center[1] * center[2];\n    prefactor[{{0,2,1}}] =  3. * center[2] * center[2];\n    prefactor[{{0,1,1}}] = -6. * center[1] * pow(center[2], 2);\n    prefactor[{{0,0,1}}] =  3. * center[1] * center[1] * center[2] * center[2];\n    prefactor[{{0,2,0}}] = -pow(center[2], 3);\n    prefactor[{{0,1,0}}] =  2. * center[1] * pow(center[2], 3);\n    prefactor[{{0,0,0}}] = -center[1] * center[1] * pow(center[2], 3);\n    prefactor *= 32./(3.*sqrt(5.)) * pow(ec, 3.25) * pow(2./pi, 0.75);  \n  }\n  else if(type == GaussianType::hyzzzz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{0,1,4}}] =  1.;\n    prefactor[{{0,0,4}}] = -center[1];\n    prefactor[{{0,1,3}}] = -4. * center[2];\n    prefactor[{{0,0,3}}] =  4. * center[1] * center[2];\n    prefactor[{{0,1,2}}] =  6. * center[2] * center[2];\n    prefactor[{{0,0,2}}] = -6. * center[1] * center[2] * center[2];\n    prefactor[{{0,1,1}}] = -4. * pow(center[2], 3);\n    prefactor[{{0,0,1}}] =  4. * center[1] * pow(center[2], 3);\n    prefactor[{{0,1,0}}] =  pow(center[2], 4);\n    prefactor[{{0,0,0}}] = -center[1] * pow(center[2], 4);\n    prefactor *= 32./sqrt(105.) * pow(ec, 3.25) * pow(2./pi, 0.75);   \n  }\n  else if(type == GaussianType::hzzzzz) {\n    prefactor = PolynomialCoeffs(5);\n    prefactor[{{0,0,5}}] =  1.;\n    prefactor[{{0,0,4}}] = -5. * center[2];\n    prefactor[{{0,0,3}}] =  10. * center[2] * center[2];\n    prefactor[{{0,0,2}}] = -10. * pow(center[2], 3);\n    prefactor[{{0,0,1}}] =  5. * pow(center[2], 4); \n    prefactor[{{0,0,0}}] = -pow(center[2], 5);\n    prefactor *= 32./(3.*sqrt(105.)) * pow(ec, 3.25) * pow(2./pi, 0.75);\n  }\n\n  // h sphericals\n  // (l,m) = (5,-5) \n  else if(type == GaussianType::hm5) {\n    // (5x^4-10x^2y^2+y^4), multiply by y, normalize\n    PolynomialCoeffs y(1), x4(4), xx(2), yy(2),  y4(4);\n    y[{{0,1,0}}]  =  1.;\n    y[{{0,0,0}}]  = -center[1];\n    x4[{{4,0,0}}]  =  1.;\n    x4[{{3,0,0}}]  = -4. * center[0];\n    x4[{{2,0,0}}]  =  6. * center[0] * center[0];\n    x4[{{1,0,0}}]  = -4. * pow(center[0], 3);\n    x4[{{0,0,0}}]  =  pow(center[0], 4);\n    y4[{{0,4,0}}]  =  1.;\n    y4[{{0,3,0}}]  = -4. * center[1];\n    y4[{{0,2,0}}]  =  6. * center[1] * center[1];\n    y4[{{0,1,0}}]  = -4. * pow(center[1], 3);\n    y4[{{0,0,0}}]  =  pow(center[1], 4);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    yy[{{0,2,0}}] =  1.; \n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    double norm =  4./sqrt(15.) * pow(2., 0.25) * pow(ec, 3.25) * pow(1./pi, 0.75);\n    prefactor = norm * y * (5.*x4 + (-10.*xx*yy) + y4);\n    }\n  // (l,m) = (5,-4)\n  else if(type == GaussianType::hm4) {\n    // get (x^2-y^2), multiply by xyz, normalize\n    PolynomialCoeffs xx(2), yy(2), x(1), y(1), z(1);\n    x[{{1,0,0}}] =  1.;\n    x[{{0,0,0}}] = -center[0];\n    y[{{0,1,0}}] =  1.;\n    y[{{0,0,0}}] = -center[1];\n    z[{{0,0,1}}] =  1.;\n    z[{{0,0,0}}] = -center[2];\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    yy[{{0,2,0}}] =  1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    double norm = 16./sqrt(3.) * pow(ec, 3.25) * pow(2./pi, 0.75);\n    prefactor = norm * x * y * z * (xx + (-1.*yy));\n  }\n  // (l,m) = (5,-3)\n  else if(type == GaussianType::hm3) {\n    // get y, (3x^2-y^2) and (8z^2-x^2-y^2), multiply together, normalize\n    PolynomialCoeffs xx(2), yy(2), zz(2), y(1);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    yy[{{0,2,0}}] =  1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    zz[{{0,0,2}}] =  1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] =  center[2] * center[2];\n    y[{{0,1,0}}] =  1.;\n    y[{{0,0,0}}] = -center[1];\n    double norm = 4./(3.*sqrt(3.)) * pow(2., 0.25) * pow(ec, 3.25) * pow(1./pi, 0.75);\n    prefactor = norm * y * (3.*xx + (-1.*yy)) * (8.*zz + (-1.*xx) + (-1.*yy));\n  }\n  // (l,m) = (5,-2)\n  else if(type == GaussianType::hm2) {\n    // get (2z^2-x^2-y^2), multiply by xyz, normalize\n    PolynomialCoeffs xx(2), yy(2), zz(2), x(1), y(1), z(1);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    yy[{{0,2,0}}] =  1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    zz[{{0,0,2}}] =  1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] =  center[2] * center[2];\n    x[{{1,0,0}}] =  1.;\n    x[{{0,0,0}}] = -center[0];\n    y[{{0,1,0}}] =  1.; \n    y[{{0,0,0}}] = -center[1];\n    z[{{0,0,1}}] =  1.;\n    z[{{0,0,0}}] = -center[2];\n    double norm = 16./3. * pow(ec, 3.25) * pow(2./pi, 0.75);\n    prefactor = norm * x * y * z * (2.*zz + (-1.*xx) + (-1.*yy)); \n  }\n  // (l,m) = (5,-1)\n  else if(type == GaussianType::hm1) {\n    // get x^4+2x^2y^2-12x^2z^2+y^4-12y^2z^2+8z^4\n    // multiply by y, normalize\n    PolynomialCoeffs x4(4), xx(2), yy(2), y4(4), zz(2), z4(4), y(1);\n    x4[{{4,0,0}}] =  1.;\n    x4[{{3,0,0}}] = -4. * center[0];\n    x4[{{2,0,0}}] =  6. * center[0] * center[0];\n    x4[{{1,0,0}}] = -4. * pow(center[0], 3);\n    x4[{{0,0,0}}] =  1. * pow(center[0], 4);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    zz[{{0,0,2}}] =  1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] =  center[2] * center[2];\n    y4[{{0,4,0}}] =  1.;\n    y4[{{0,3,0}}] = -4. * center[1];\n    y4[{{0,2,0}}] =  6. * center[1] * center[1];\n    y4[{{0,1,0}}] = -4. * pow(center[1], 3);\n    y4[{{0,0,0}}] =  1. * pow(center[1], 4);\n    yy[{{0,2,0}}] =  1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    z4[{{0,0,4}}] =  1.;\n    z4[{{0,0,3}}] = -4. * center[2];\n    z4[{{0,0,2}}] =  6. * center[2] * center[2];\n    z4[{{0,0,1}}] = -4. * pow(center[2], 3);\n    z4[{{0,0,0}}] =  1. * pow(center[2], 4);\n    y[{{0,1,0}}] =  1.;\n    y[{{0,0,0}}] = -center[1];\n    double norm = 4./(3.*sqrt(7.)) * pow(ec, 3.25) * pow(2./pi, 0.75);\n    prefactor = norm * y * (x4 + 2.*xx*yy + (-12.*xx*zz) + y4 + (-12.*yy*zz) + 8.*z4);\n  }\n  // (l,m) = (5,0)\n  else if(type == GaussianType::hzero) {\n    // get 15x^4+30x^2y^2-40x^2z^2+15y^4-40y^2z^2+8z^4\n    // multiply by z, normalize\n    PolynomialCoeffs x4(4), xx(2), zz(2), y4(4), yy(2), z4(4), z(1);\n    x4[{{4,0,0}}] =  1.;\n    x4[{{3,0,0}}] = -4. * center[0];\n    x4[{{2,0,0}}] =  6. * center[0] * center[0];\n    x4[{{1,0,0}}] = -4. * pow(center[0], 3);\n    x4[{{0,0,0}}] =  1. * pow(center[0], 4);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    zz[{{0,0,2}}] =  1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] =  center[2] * center[2];\n    y4[{{0,4,0}}] =  1.;\n    y4[{{0,3,0}}] = -4. * center[1];\n    y4[{{0,2,0}}] =  6. * center[1] * center[1];\n    y4[{{0,1,0}}] = -4. * pow(center[1], 3);\n    y4[{{0,0,0}}] =  1. * pow(center[1], 4);\n    yy[{{0,2,0}}] =  1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  pow(center[1], 2);\n    z4[{{0,0,4}}] =  1.;\n    z4[{{0,0,3}}] = -4. * center[2];\n    z4[{{0,0,2}}] =  6. * center[2] * center[2];\n    z4[{{0,0,1}}] = -4. * pow(center[2], 3);\n    z4[{{0,0,0}}] =  1. * pow(center[2], 4);\n    z[{{0,0,1}}] =  1.;\n    z[{{0,0,0}}] = -center[2];\n    double norm = 4./(3.*sqrt(105.)) * pow(ec, 3.25) * pow(2./pi, 0.75);\n    prefactor = norm * z * (15.*x4 + 30.*xx*yy + (-40.*xx*zz) + 15.*y4 + (-40.*yy*zz) + 8.*z4); \n  }\n  // (l,m) = (5,1)\n  else if(type == GaussianType::hp1) {\n    // get x^4+2x^2y^2-12x^2z^2+y^4-12y^2z^2+8z^4\n    // multiply by x, normalize\n    PolynomialCoeffs x4(4), xx(2), zz(2), y4(4), yy(2), z4(4), x(1);\n    x4[{{4,0,0}}] =  1.;\n    x4[{{3,0,0}}] = -4. * center[0];\n    x4[{{2,0,0}}] =  6. * center[0] * center[0];\n    x4[{{1,0,0}}] = -4. * pow(center[0], 3);\n    x4[{{0,0,0}}] =  1. * pow(center[0], 4);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    zz[{{0,0,2}}] =  1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] =  center[2] * center[2];\n    y4[{{0,4,0}}] =  1.;\n    y4[{{0,3,0}}] = -4. * center[1];\n    y4[{{0,2,0}}] =  6. * center[1] * center[1];\n    y4[{{0,1,0}}] = -4. * pow(center[1], 3);\n    y4[{{0,0,0}}] =  1. * pow(center[1], 4);\n    yy[{{0,2,0}}] =  1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    z4[{{0,0,4}}] =  1.;\n    z4[{{0,0,3}}] = -4. * center[2];\n    z4[{{0,0,2}}] =  6. * center[2] * center[2];\n    z4[{{0,0,1}}] = -4. * pow(center[2], 3);\n    z4[{{0,0,0}}] =  1. * pow(center[2], 4);\n    x[{{1,0,0}}] =  1.;\n    x[{{0,0,0}}] = -center[0];\n    double norm = 4./(3.*sqrt(7.)) * pow(ec, 3.25) * pow(2./pi, 0.75);\n    // Testing shows nwchem uses the negative of this\n    prefactor = (-1.) * norm * x * (x4 + 2.*xx*yy + (-12.*xx*zz) + y4 + (-12.*yy*zz) + 8.*z4);\n  }\n  // (l,m) = (5,2)\n  else if(type == GaussianType::hp2) {\n    // get z * (x^2-y^2) * (2z^2 - x^2 - y^2), and normalize\n    PolynomialCoeffs xx(2), yy(2), zz(2), z(1);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    yy[{{0,2,0}}] =  1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    zz[{{0,0,2}}] =  1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] =  center[2] * center[2];\n    z[{{0,0,1}}] =  1.;\n    z[{{0,0,0}}] = -center[2];\n    double norm = 8./3. * pow(ec, 3.25) * pow(2./pi, 0.75);\n    prefactor = norm * z * (xx + (-1.*yy)) * (2.*zz + (-1.*xx) + (-1.*yy)); \n  }\n  // (l,m) = (5,3)\n  else if(type == GaussianType::hp3) {\n    // get x, (x^2-3y^2) and (8z^2-x^2-y^2), \n    // multiply and normalize\n    PolynomialCoeffs xx(2), yy(2), zz(2), x(1);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    yy[{{0,2,0}}] =  1.;\n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    zz[{{0,0,2}}] =  1.;\n    zz[{{0,0,1}}] = -2. * center[2];\n    zz[{{0,0,0}}] =  center[2] * center[2];\n    x[{{1,0,0}}] =  1.;\n    x[{{0,0,0}}] = -center[0];\n    double norm = 4./(3.*sqrt(3.)) * pow(2., 0.25) * pow(ec, 3.25) * pow(1./pi, 0.75);\n    // Testing shows nwchem uses the negative of this\n    prefactor = (-1.) * norm * x * (xx + (-3.*yy)) * (8.*zz + (-1.*xx) + (-1.*yy)); \n  } \n  // (l,m) = (5,4)\n  else if(type == GaussianType::hp4) {\n    // setup x^4, x^2y^2, y^4, get (x^4-6x^2y^2+y^4), normalize, multiply by z\n    PolynomialCoeffs z(1), x4(4), xx(2), yy(2), y4(4);\n    z[{{0,0,1}}]  =  1.;\n    z[{{0,0,0}}]  = -center[2];\n    x4[{{4,0,0}}]  =  1.;\n    x4[{{3,0,0}}]  = -4. * center[0];\n    x4[{{2,0,0}}]  =  6. * center[0] * center[0];\n    x4[{{1,0,0}}]  = -4. * pow(center[0], 3);\n    x4[{{0,0,0}}]  =  pow(center[0], 4);\n    y4[{{0,4,0}}]  =  1.;\n    y4[{{0,3,0}}]  = -4. * center[1];\n    y4[{{0,2,0}}]  =  6. * center[1] * center[1];\n    y4[{{0,1,0}}]  = -4. * pow(center[1], 3);\n    y4[{{0,0,0}}]  =  pow(center[1], 4);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    yy[{{0,2,0}}] =  1.; \n    yy[{{0,1,0}}] = -2. *center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    double norm = 4./sqrt(3.) * pow(ec, 3.25) * pow(2./pi, 0.75);\n    prefactor = norm * z * (x4 + (-6.*xx*yy) + y4); \n  }\n  // (l,m) = (5,5)\n  else if(type == GaussianType::hp5) {\n    // get x, (x^4-10x^2y^2+5y^4), multiply, normalize\n    PolynomialCoeffs x(1), x4(4), xx(2), yy(2),  y4(4);\n    x[{{1,0,0}}]  =  1.;\n    x[{{0,0,0}}]  = -center[0];\n    x4[{{4,0,0}}]  =  1.;\n    x4[{{3,0,0}}]  = -4. * center[0];\n    x4[{{2,0,0}}]  =  6. * center[0] * center[0];\n    x4[{{1,0,0}}]  = -4. * pow(center[0], 3);\n    x4[{{0,0,0}}]  =  pow(center[0], 4);\n    y4[{{0,4,0}}]  =  1.;\n    y4[{{0,3,0}}]  = -4. * center[1];\n    y4[{{0,2,0}}]  =  6. * center[1] * center[1];\n    y4[{{0,1,0}}]  = -4. * pow(center[1], 3);\n    y4[{{0,0,0}}]  =  pow(center[1], 4);\n    xx[{{2,0,0}}] =  1.;\n    xx[{{1,0,0}}] = -2. * center[0];\n    xx[{{0,0,0}}] =  center[0] * center[0];\n    yy[{{0,2,0}}] =  1.; \n    yy[{{0,1,0}}] = -2. * center[1];\n    yy[{{0,0,0}}] =  center[1] * center[1];\n    double norm = 4./sqrt(15.) * pow(2., 0.25) * pow(ec, 3.25) * pow(1./pi, 0.75);\n    // Testing shows nwchem uses the negative of this\n    prefactor = (-1.) * norm * x * (x4 + (-10.*xx*yy) + 5.*y4);\n  }\n}\n\nPrimitiveGaussian::PrimitiveGaussian(const PolynomialCoeffs &exppoly_,\n    const PolynomialCoeffs &prefactor_)\n    : prefactor(prefactor_), exppoly(exppoly_) {\n\n  const unsigned degree = exppoly_.get_degree();\n  if(degree > 2)\n    throw std::invalid_argument(\"Exponential in a Gaussian must have degree at most 2.\");\n  else if(degree < 2) {\n    // it will be assumed in other functions that exppoly's degree is 2\n    exppoly = PolynomialCoeffs(2);\n    exppoly[{{0,0,0}}] = exppoly_[{{0,0,0}}];\n    if(degree == 1) {\n      exppoly[{{1,0,0}}] = exppoly_[{{1,0,0}}];\n      exppoly[{{0,1,0}}] = exppoly_[{{0,1,0}}];\n      exppoly[{{0,0,1}}] = exppoly_[{{0,0,1}}];\n    }\n  }\n}\n\ndouble PrimitiveGaussian::operator() (const std::array<double, 3> &x) const {\n  return exp(exppoly(x)) * prefactor(x);\n}\n\nPrimitiveGaussian PrimitiveGaussian::operator*(const PrimitiveGaussian &rhs) const {\n  PrimitiveGaussian ret;\n  ret.prefactor = prefactor * rhs.prefactor;\n  ret.exppoly = exppoly + rhs.exppoly;\n\n  return ret;\n}\n\n///////////////////////////////////////////////////////////////////////////\n// Implementation of the GaussianFunction class.\n///////////////////////////////////////////////////////////////////////////\nGaussianFunction::GaussianFunction(const GaussianType type,\n    const std::array<double, 3> &center, const std::vector<double> &expcoeff,\n    const std::vector<double> &coeff) {\n\n  if(expcoeff.size() != coeff.size())\n    throw std::invalid_argument(\"A Gaussian function must have the same number of linear expansion and exponential coefficients.\");\n\n  // go through each of the primitives and construct the Gaussian function\n  for(auto iterexpcoeff = expcoeff.cbegin(),\n           itercoeff = coeff.cbegin(),\n           end = expcoeff.cend();\n      iterexpcoeff != end; \n      iterexpcoeff++, itercoeff++) {\n\n    terms.emplace_front(*itercoeff, PrimitiveGaussian(type, center, *iterexpcoeff));\n  }\n\n  // prune any small terms in the expansion\n  removeSmallTerms();\n\n  // store the center\n  this->center = center;\n\n  // store the exponents\n  this->expcoeff = expcoeff;\n}\n\ndouble GaussianFunction::operator() (const std::array<double, 3> &x) const {\n  double ret = 0.;\n  for(const TermT &term : terms)\n    ret += term.first * term.second(x);\n  return ret;\n}\n\nGaussianFunction GaussianFunction::operator- () const {\n  GaussianFunction ret(*this);\n\n  for(TermT &term : ret.terms)\n    term.first *= -1.;\n\n  return ret;\n}\n\nGaussianFunction GaussianFunction::operator+(const GaussianFunction &rhs) const {\n  GaussianFunction ret;\n  ret.terms = terms; // deep copy\n  for(const TermT &term : rhs.terms)\n    ret.terms.push_front(term);\n  return ret;\n}\n\nGaussianFunction &GaussianFunction::operator+=(const GaussianFunction &rhs) {\n  if(this == &rhs)\n    for(TermT &term : terms)\n      term.first *= 2.;\n  else\n    for(const TermT &term : rhs.terms)\n      terms.push_front(term);\n  return *this;\n}\n\nGaussianFunction &GaussianFunction::operator*=(const double rhs) {\n  for(TermT &term : terms)\n    term.first *= rhs;\n  removeSmallTerms();\n  return *this;\n}\n\nGaussianFunction GaussianFunction::operator*(const GaussianFunction &rhs) const {\n  GaussianFunction ret;\n  for(const TermT &term : terms)\n    for(const TermT &rterm : rhs.terms) {\n      ret.terms.emplace_front(\n        term.first * rterm.first,\n        term.second * rterm.second\n      );\n    }\n  ret.removeSmallTerms();\n  return ret;\n}\n\n} // namespace slymer\n"
  },
  {
    "path": "src/madness/chem/gaussian.h",
    "content": "/* This file is a part of Slymer, which is distributed under the Creative\n   Commons Attribution-NonCommercial 4.0 International Public License.\n\n   (c) 2017 Stony Brook University. */\n\n/**\n * \\file Basis/gaussian.h\n * \\brief Gaussian basis function API and routines.\n *\n * Handles Gaussian basis functions as special cases (class inheritance). Both\n * primitive and contracted Gaussians from electronic structure codes are\n * implemented, but not using those labels.\n */\n\n#ifndef __Basis_gaussian_h__\n#define __Basis_gaussian_h__\n\n#include <forward_list>\n#include <utility>\n#include<madness/chem/basis.h>\n#include<madness/chem/polynomial.h>\n#include<madness/chem/ESInterface.h>\n#include <madness/mra/mra.h>\n#include <madness/constants.h>\n\nnamespace slymer {\n\n/// Implemented types of Gaussian orbitals (from quantum chemistry codes).\nenum class GaussianType {\n  // both Cartesian and spherical\n  s, px, py, pz,\n\n  // Cartesian (and possibly spherical)\n  dxx, dxy, dxz, dyy, dyz, dzz,\n  fxxx, fxxy, fxxz, fxyy, fxyz, fxzz, fyyy, fyyz, fyzz, fzzz,\n\n  // spherical only ('m' denotes \"minus\")\n  dzzmrr, dxxmyy,\n  fxyymxxx, fxxzmyyz, fxzzmrrx, fzzzmrrz, fyzzmrry, fxxymyyy,\n\n  // g\n  // cartesian\n  gxxxx, gxxxy, gxxxz, gxxyy, gxxyz, gxxzz, gxyyy, gxyyz, gxyzz,\n  gxzzz, gyyyy, gyyyz, gyyzz, gyzzz, gzzzz,\n  // spherical\n  // ('d' denotes \"dot\" for multiplication)\n  // (numbers in names indicate powers of preceding variable)\n  gxydx2my2, gyzdx2my2, gxydz2mr2, gyzdz2mr2, gzero,\n  gxzdz2mr2, gx2my2dz2mr2, gxzdx2my2, gx4mx2y2py4, \n\n  // h\n  // cartesian\n  hxxxxx, hxxxxy, hxxxxz, hxxxyy, hxxxyz, hxxxzz, hxxyyy, hxxyyz,\n  hxxyzz, hxxzzz, hxyyyy, hxyyyz, hxyyzz, hxyzzz, hxzzzz, hyyyyy,\n  hyyyyz, hyyyzz, hyyzzz, hyzzzz, hzzzzz,\n  // spherical\n  // at this point, just giving names corresponding to value\n  // quantum number m\n  hm5, hm4, hm3, hm2, hm1, hzero, hp1, hp2, hp3, hp4, hp5\n\n};\n\n// forward declaration\nclass GaussianFunction;\n\n/**\n * \\brief A primitive Gaussian function.\n *\n * This basis function has the form \\f[\n * f(x,y,z) = p(x,y,z) \\exp[(x-x_0)^T \\Sigma (x-x_0)],\n * \\f]\n * where \\f$p\\f$ is a polynomial and \\f$x_0\\f$ is the ``center'' of the\n * Gaussian and \\f$\\Sigma\\f$ is the variance/covariance matrix.\n *\n * This class is designed to work with Gaussian basis functions in quantum\n * chemistry codes, but is made to be a bit more general for other\n * applications.\n *\n * The wikipedia page on multivariable normal distributions may be helpful\n * (https://en.wikipedia.org/wiki/Multivariate_normal_distribution).\n */\nclass PrimitiveGaussian {\n\nprotected:\n  /// Polynomial prefactor (\\f$p\\f$ in the class description).\n  PolynomialCoeffs prefactor;\n\n  /// Coefficients in the exponent's quadratic function.\n  PolynomialCoeffs exppoly;\n\n  /**\n   * \\brief Return type for the function's canonical form.\n   *\n   * The first element is the polynomial prefactor, converted to use the principal coordinates.\n   * The second element is the array of decay values (eigenvalues of the covariance matrix).\n   * The third element is the \\f$\\nu\\f$ vector (essentially the center of the Gaussian).\n   * The fourth element are the canonical axes in the original coordinates (for debugging purposes).\n   */\n  using CF = std::tuple<PolynomialCoeffs, std::array<double, 3>, std::array<double, 3>, std::array<std::array<double, 3>, 3>>;\n\npublic:\n  /// Default constructor: Make the function 1 (\\f$p=1\\f$, \\f$f(\\vec{x})=0\\f$).\n  PrimitiveGaussian()\n    : prefactor(0), exppoly(2)\n  {\n    prefactor[{{0,0,0}}] = 1.;\n  }\n\n  /**\n   * \\brief Create a primitive Gaussian function centered on the specific point,\n   *    with the specified decay constant and type.\n   *\n   * \\throw std::invalid_argument if the decay constant is non-positive.\n   *\n   * \\param[in] type The orbital type of the Gaussian.\n   * \\param[in] center The center of the Gaussian.\n   * \\param[in] ec The decay constant in the exponential.\n   */\n  PrimitiveGaussian(const GaussianType &type,\n      const std::array<double, 3> &center, const double ec);\n\n  /**\n   * \\brief Create a primitive Gaussian function with the specified exponential\n   *    polynomial (quadratic) and polynomial prefactor.\n   *\n   * \\throw std::invalid_argument if the exponential polynomial is not\n   *    quadratic (or constant or linear as subsets).\n   *\n   * \\param[in] exppoly_ The exponential polynomial.\n   * \\param[in] prefactor_ The degree of the prefactor.\n   */\n  PrimitiveGaussian(const PolynomialCoeffs &exppoly_,\n      const PolynomialCoeffs &prefactor_);\n\n  /**\n   * \\brief Evaluate the Gaussian primitive at the specified point.\n   *\n   * \\param[in] x The point.\n   * \\return The Gaussian primitive evaluated at the point x.\n   */\n  double operator() (const std::array<double, 3> &x) const;\n\n  /**\n   * \\brief Multiply two primitive Gaussians. The result is another.\n   *\n   * \\param[in] rhs The right-hand object.\n   * \\result The product.\n   */\n  PrimitiveGaussian operator*(const PrimitiveGaussian &rhs) const;\n};\n\n\n/**\n * \\brief A Gaussian basis function used by chemistry electronic structure\n *   codes.\n *\n * This basis function has the form \\f[\n * \\sum_j c_j x^{l_j} y^{m_j} z^{n_j} \\exp[f_j(\\vec{x})],\n * \\f]\n * where \\f$f_j(\\vec{x})\\f$ is a quadratic function. Note that this functional\n * form is a bit more general than that used by standard electronic structure\n * codes; we do not require the prinicpal axes of the Gaussian function to be\n * coincident with the x-, y-, and z-axes. This class can also hold/handle any\n * linear combination of primitive Gaussian functions (the exponents and\n * centers do not have to be the same).\n */\nclass GaussianFunction : public BasisFunction {\n\nprotected:\n  /// Helper class for storing terms in the sum of Gaussian primitives.\n  using TermT = std::pair<double, PrimitiveGaussian>;\n\n  /// The list of terms in the sum of Gaussian primitives.\n  std::forward_list<TermT> terms;\n\n  /**\n   * \\brief Removes terms with very small linear expansion coefficients.\n   *\n   * \\param[in] eps The threshold for \"small\". Defaults to 1.e-6.\n   */\n  void removeSmallTerms(const double eps = 1.e-6) {\n    terms.remove_if(\n      [eps](const TermT &t) {\n        return std::abs(t.first) < eps;\n      }\n    );\n  }\n\npublic:\n\n  /// The center of the gaussian\n  std::array<double, 3> center;\n\n  /// The exponent coefficients\n  std::vector<double> expcoeff;\n\n  /// Default constructor: Make the function 0.\n  GaussianFunction() : terms(0), center({{0,0,0}}), expcoeff(std::vector<double>{0.0}) {}\n\n  /**\n   * \\brief Create a Gaussian orbital (uncontracted or contracted) from\n   *    quantum chemistry codes.\n   *\n   * Both Cartesian and spherical orbitals are supported. The expcoeff and\n   * coeff parameters must be arrays. If the orbital is uncontracted, the\n   * arrays will be length 1.\n   *\n   * All uncontracted primitive Gaussian orbitals used underneath the\n   * GaussianFunction are normalized.\n   *\n   * \\throw invalid_argument If a non-positive exponential coefficient is\n   *    passed or if the lengths of expcoeff and coeff are not equal.\n   *\n   * \\param[in] type The orbital type (from enum OrbitalType).\n   * \\param[in] center The center of the Gaussian orbital.\n   * \\param[in] expcoeff Array of coefficients in the exponents of the\n   *    primitive Gaussians.\n   * \\param[in] coeff Array of linear expansion coefficients of the primitive\n   *    Gaussians.\n   */\n  GaussianFunction(const GaussianType type, const std::array<double, 3> &center,\n    const std::vector<double> &expcoeff, const std::vector<double> &coeff);\n\n  /**\n   * \\brief Create an uncontracted Gaussian orbital (shortcut to the more\n   *    general constructor for Gaussian orbitals).\n   *\n   * \\param[in] type The orbital type (from enum OrbitalType).\n   * \\param[in] center The center of the Gaussian orbital.\n   * \\param[in] expcoeff The coefficient in the exponent of the primitive\n   *    Gaussian.\n   */\n  GaussianFunction(const GaussianType type, const std::array<double, 3> &center,\n    const double expcoeff)\n    : GaussianFunction(type, center, {expcoeff}, {1.}) {}\n\n  /**\n   * \\brief Evaluate the Gaussian function at the specified point.\n   *\n   * \\param[in] x The point.\n   * \\return The Gaussian function evaluated at the point x.\n   */\n  virtual double operator() (const std::array<double, 3> &x) const override;\n\n  /**\n   * \\brief Evaluate the Gaussian function at the specified point.\n   *\n   * \\param[in] x The point.\n   * \\return The Gaussian function evaluated at the point x.\n   */\n  double operator() (const madness::coord_3d& r) const {\n     return operator()(std::array<double, 3>{{r[0], r[1], r[2]}});\n  };\n\n  /**\n   * \\brief Additive inverse of the GaussianFunction (deep copy).\n   *\n   * \\return The negated function.\n   */\n  GaussianFunction operator- () const;\n\n  /**\n   * \\brief Add two GaussianFunction objects, resulting in a new one.\n   *\n   * \\param[in] rhs The right-hand GaussianFunction.\n   * \\return The sum of this GaussianFunction and rhs.\n   */\n  GaussianFunction operator+(const GaussianFunction &rhs) const;\n\n  /**\n   * \\brief Add a GaussianFunction to this GaussianFunction.\n   *\n   * \\param[in] rhs The right-hand GaussianFunction.\n   * \\return The sum of this GaussianFunction and rhs, stored in *this.\n   */\n  GaussianFunction &operator+=(const GaussianFunction &rhs);\n\n  /**\n   * \\brief Subtract a GaussianFunction from this one, returning the difference.\n   *\n   * \\param[in] rhs The GaussianFunction to be subtracted.\n   * \\return The difference of the two GaussianFunction objects.\n   */\n  GaussianFunction operator-(const GaussianFunction &rhs) const {\n    return *this + (-rhs);\n  }\n\n  /**\n   * \\brief Subtract a GaussianFunction from this one.\n   *\n   * \\param[in] rhs The GaussianFunction to be subtracted.\n   * \\return This GaussianFunction (the difference).\n   */\n  GaussianFunction &operator-=(const GaussianFunction &rhs) {\n    return operator+=(-rhs);\n  }\n\n  /**\n   * \\brief Multiply the GaussianFunction by a scalar.\n   *\n   * \\param[in] rhs The scalar multiplicative factor.\n   * \\return This GaussianFunction, which has been scaled.\n   */\n  GaussianFunction &operator*=(const double rhs);\n\n  /**\n   * \\brief Multiply the GaussianFunction by another.\n   *\n   * \\param[in] rhs The right-hand GaussianFunction object.\n   * \\return This GaussianFunction, which is now the product.\n   */\n  GaussianFunction &operator*=(const GaussianFunction &rhs) {\n    GaussianFunction ret = (*this) * rhs;\n    terms.swap(ret.terms);\n    return *this;\n  }\n\n  /**\n   * \\brief Multiply the GaussianFunction by a scalar.\n   *\n   * \\param[in] rhs The scalar multiplicative factor.\n   * \\return The scaled GaussianFunction.\n   */\n  GaussianFunction operator*(const double rhs) const {\n    GaussianFunction ret(*this);\n    ret *= rhs;\n    return ret;\n  }\n\n  /**\n   * \\brief Multiply two GaussianFunctions.\n   *\n   * \\param[in] rhs The right-hand GaussianFunction object.\n   * \\return The product.\n   */\n  GaussianFunction operator*(const GaussianFunction &rhs) const;\n\n  /**\n   * \\brief Divide the GaussianFunction by a scalar.\n   *\n   * Does not check that the scalar is nonzero.\n   *\n   * \\param[in] rhs The scalar factor.\n   * \\return This GaussianFunction, which has been scaled.\n   */\n  GaussianFunction &operator/=(const double rhs) {\n    operator*=(1./rhs);\n    return *this;\n  }\n\n  /**\n   * \\brief Divide the GaussianFunction by a scalar.\n   *\n   * \\param[in] rhs The scalar factor.\n   * \\return The scaled GaussianFunction.\n   */\n  GaussianFunction operator/(const double rhs) const {\n    return (*this) * (1./rhs);\n  }\n};\n\n\n// helper functions\n\n/**\n * \\brief Multiply a GaussianFunction by a scalar.\n *\n * \\param[in] lhs The scalar multiplicative factor.\n * \\param[in] rhs The GaussianFunction.\n * \\return The scaled GaussianFunction.\n */\ninline GaussianFunction operator*(const double lhs, const GaussianFunction &rhs) {\n  return rhs * lhs;\n}\n\nclass Gaussian_Functor : public madness::FunctionFunctorInterface<double, 3> {\nprivate:\n    GaussianFunction func;\n    std::vector<madness::coord_3d> centers;\npublic:\n    Gaussian_Functor(GaussianFunction func, std::vector<madness::coord_3d> centers) : func(func), centers(centers) {}\n\n    double operator()(const madness::coord_3d& r) const final {\n        return func(r);\n    }\n   \n    std::vector<madness::coord_3d> special_points() const final {\n       return centers;       \n    }\n\n    madness::Level special_level() const final {\n       // From Robert: \n       // Pick initial level such that average gap between quadrature points\n       // will find a significant value\n       const int N = 6; // looking for where exp(-a*x^2) < 10**-N\n       const int K = 6; // typically the lowest order of the polyn\n       const double log10 = std::log(10.0);\n       const double log2 = std::log(2.0); \n       const double L = madness::FunctionDefaults<3>::get_cell_min_width(); \n       const double expnt = *(std::max_element(func.expcoeff.begin(), func.expcoeff.end()));\n       const double a = expnt*L*L;\n       //const double fac = pow(2.0/(expnt*madness::constants::pi), 3.0/2.0); \n       const double fac = 100.0; \n       double n = std::log(a/(4*K*K*(N*log10+std::log(fac))))/(2*log2);\n       return (n < 2 ? 2.0 : std::ceil(n)+1); // Added in the +1 for paranoia's sake\n    }\n};\n\n} // namespace slymer\n#endif\n"
  },
  {
    "path": "src/madness/chem/gth_pseudopotential.cc",
    "content": "\n#include<madness/chem/gth_pseudopotential.h>\n\n\nnamespace madness {\n\n\n    double get_charge_from_file(const std::string filename, unsigned int atype) {\n        bool debug = true;\n       \n        TiXmlDocument doc(filename);\n        if (!doc.LoadFile()) {\n            MADNESS_EXCEPTION(\"Failed to load GTH pseudopotential file\", 0);\n        }\n\n        bool success = false;\n        for (TiXmlElement* node=doc.FirstChildElement(); node && !success; node=node->NextSiblingElement()) {\n            if (strcmp(node->Value(),\"name\") == 0) {\n                std::string name = node->GetText();\n                if (debug) std::cout << \"Loading pseudopotential file \" << name << std::endl;\n            }\n            else if (strcmp(node->Value(), \"atom\") == 0) {\n                const char* symbol = node->Attribute(\"symbol\");\n                unsigned int atn = symbol_to_atomic_number(symbol);\n                if (atype == atn) {\n                    success = true;\n                    if (debug) std::cout << \"  found atomic pseudopotential \" << symbol << std::endl;\n                    int lmax = -1;\n                    node->Attribute(\"lmax\", &lmax);\n                    // local part\n                    TiXmlElement* xmlVLocal = node->FirstChildElement();\n                    double zeff = 0.0; xmlVLocal->Attribute(\"Zeff\", &zeff);\n                    return zeff;\n                }\n            }\n        }\n        if (!success){\n            MADNESS_EXCEPTION(\"Failed to find element in GTH pseudopotential file\", 0);\n        }\n        \n        return 0.;\n    }\n\n    const double ProjRLMFunctor::gamma_data[17] = {1.0, 0.0, 1.0/2.0, 0.0, 3.0/4.0, 0.0, 15.0/8.0, 0.0, 105.0/16.0, 0.0, \n        945.0/32.0, 0.0, 10395.0/64.0, 0.0, 135135.0/128.0, 0.0, 2027025.0/256.0};\n\n\n}\n"
  },
  {
    "path": "src/madness/chem/gth_pseudopotential.h",
    "content": "/// \\file gth_pseudopotential.cc\n/// \\brief GTH pseudopotential functionality\n/// \\defgroup moldft The molecular density functional and Hartree-Fock code\n\n#ifndef MADNESS_CHEM_GTH_PSEUDOPOTENTIAL_H__INCLUDED\n#define MADNESS_CHEM_GTH_PSEUDOPOTENTIAL_H__INCLUDED\n\n#include <madness/mra/mra.h>\n#include <madness/external/tinyxml/tinyxml.h>\n\n#include<madness/chem/molecule.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/chem/xcfunctional.h>\n\nnamespace madness {\n\ntypedef Tensor<double> tensorT;\n\ndouble get_charge_from_file(const std::string filename, unsigned int atype);\n\n/*template <typename Q, int NDIM>\nstruct function_real2complex_op\n{\n  typedef std::complex<Q> resultT;\n  Tensor<resultT> operator()(const Key<NDIM>& key, const Tensor<Q>& t) const\n  {\n    Tensor<resultT> result(t.ndim(), t.dims());\n    BINARY_OPTIMIZED_ITERATOR(const Q, t, resultT, result, *_p1 = resultT(*_p0,0.0););\n    return result;\n  }\n  template <typename Archive>\n  void serialize(Archive& ar) {}\n};\n\nFunction<std::complex<double>,3> function_real2complex(const Function<double,3>& r)\n{\n  return unary_op_coeffs(r, function_real2complex_op<double,3>());\n}*/\n\nclass VLocalFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    double Zeff, zi, C1, C2, C3, C4;\n    coord_3d center;\n    std::vector<coord_3d> specialpts;\n\npublic:\n    VLocalFunctor(double Zeff, double zi, \n        double C1, double C2, double C3, double C4, const coord_3d& center)\n          : Zeff(Zeff), zi(zi), C1(C1), C2(C2), \n            C3(C3), C4(C4), center(center) {\n        specialpts.push_back(center);\n    }\n\n    double operator()(const coord_3d& r) const final {\n        const double x = r[0]-center[0]; const double y = r[1]-center[1]; const double z = r[2]-center[2];\n        double rr = std::sqrt(x*x + y*y + z*z);\n        double rs = rr/zi;\n        double rs2 = rs*rs; double rs4 = rs2*rs2; double rs6 = rs2*rs4;\n        return -(Zeff/rr)*erf(rs/std::sqrt(2.0))\n          + std::exp(-0.5*rs2)*\n          (C1 + C2*rs2 + C3*rs4 + C4*rs6);\n    }\n              \n    std::vector<coord_3d> special_points() const final {return specialpts;}\n\n    Level special_level() const final {\n      return 6;\n    }\n};\n\nclass ProjRLMFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    double alpha; // radius\n    int l, m; // i = 1,2,3 and m = 0,1,2,3 and l = 0,1,2,3 (angular momentum) (i just used in constructor)\n    coord_3d center;\n    std::vector<coord_3d> specialpts;\n    // gamma of half-integers starting and 1 (which means 1/2)\n    /*const double gamma_data[17] = {1.0, 0.0, 1.0/2.0, 0.0, 3.0/4.0, 0.0, 15.0/8.0, 0.0, 105.0/16.0, 0.0, \n        945.0/32.0, 0.0, 10395.0/64.0, 0.0, 135135.0/128.0, 0.0, 2027025.0/256.0};*/\n    double sqrtPI;\n    int itmp, itmp2;\n    double t1;\n    \npublic:\n\n    virtual bool supports_vectorized() const final {return false;}\n\n    static const double gamma_data[17];\n    \n    ProjRLMFunctor(double alpha, int l, int m, int i, const coord_3d& center) \n     : alpha(alpha), l(l), m(m), center(center) {\n        specialpts.push_back(coord_3d(0.0));\n        sqrtPI = std::sqrt(constants::pi);\n        itmp = 2*l + (4*i-1);\n        itmp2 = 2*(i-1);\n        t1 = 1./std::pow(alpha, 0.5*(double)itmp)/std::sqrt(gamma_data[itmp-1]*sqrtPI);\n    }\n\n    double operator()(const coord_3d& r) const final {\n        double x = r[0]-center[0]; double y = r[1]-center[1]; double z = r[2]-center[2];\n        double rsq = x*x + y*y + z*z;\n\n        if (rsq > 40.0) return 0.0;\n\n        double rr = std::sqrt(rsq);\n        double rval = t1;\n        const double PI = constants::pi;\n        // Radial part\n        if (itmp2 == 0) {\n            rval *= std::sqrt(2);\n        }\n        else if (itmp2 == 1) {\n            rval *= rr*std::sqrt(2);\n        }\n        else if (itmp2 == 2) {\n            rval *= rsq*std::sqrt(2);\n        }\n        else if (itmp2 == 3) {\n            rval *= rr*rsq*std::sqrt(2);\n        }\n        else if (itmp2 == 4) {\n            rval *= rsq*rsq*std::sqrt(2);\n        }\n        else if (itmp2 == 5) {\n            rval *= rr*rsq*rsq*std::sqrt(2);\n        }\n        else if (itmp2 == 6) {\n            rval *= rsq*rsq*rsq*std::sqrt(2);\n        }\n        else if (itmp2 == 7) {\n            rval *= rr*rsq*rsq*rsq*std::sqrt(2);\n        }\n        // Angular part\n        if (l == 0) {\n            rval *= (1./2.)*std::sqrt(1./PI);\n        } else if (l == 1) {\n            if (m == 0) {\n                rval *= std::sqrt(3./4./PI)*x;\n            }\n            else if (m == 1) {\n                rval *= std::sqrt(3./4./PI)*y;\n            }\n            else if (m == 2) {\n                rval *= std::sqrt(3./4./PI)*z;\n            }\n            else {\n                MADNESS_EXCEPTION(\"m out of range for l = 1\", 0);\n            }\n        } else if (l == 2) {\n            if (m == 0) {\n                rval *= (1./4.)*std::sqrt(5./PI)*(-x*x - y*y + 2*z*z);\n            }\n            else if (m == 1) {\n                rval *= (1./2.)*std::sqrt(15./PI)*(y*z);\n            }\n            else if (m == 2) {\n                rval *= (1./2.)*std::sqrt(15./PI)*(x*z);\n            }\n            else if (m == 3) {\n                rval *= (1./2.)*std::sqrt(15./PI)*(x*y);\n            }\n            else if (m == 4) {\n                rval *= (1./4.)*std::sqrt(15./PI)*(x*x - y*y);\n            }\n            else {\n                MADNESS_EXCEPTION(\"m out of range for l = 2\", 0);\n            }\n        }\n        rval *= std::exp(-0.5*(rsq/alpha/alpha));\n        return rval;\n    }\n   \n    virtual bool screened(const coord_3d& c1, const coord_3d& c2) const final {\n        double ftol = 1e-12;\n\n        double x1 = c1[0]; double y1 = c1[1]; double z1 = c1[2];\n        double x2 = c2[0]; double y2 = c2[1]; double z2 = c2[2];\n\n        // if center is inside box, then return false\n        // otherwise, look for the closest point and check\n        bool inside = (center[0] >= x1) && (center[0] <= x2) &&\n                      (center[1] >= y1) && (center[1] <= y2) &&\n                      (center[2] >= z1) && (center[2] <= z2);\n        if (inside) {\n          return false;\n        }\n        else {\n            //printf(\"GTH_pseudopotential: (point not inside)\\n\");\n            //print(\"  c1: \", c1, \"     c2: \", c2);\n            double minr = 1e10;\n            int ii = -1; int jj = -1; int kk = -1;\n            for (int i = 0; i <= 1; i++) {\n                for (int j = 0; j <= 1; j++) {\n                    for (int k = 0; k <= 1; k++) {\n                        double x = (i == 0) ? c1[0] : c2[0];\n                        double y = (j == 0) ? c1[1] : c2[1];\n                        double z = (k == 0) ? c1[2] : c2[2];\n                        coord_3d rr = coord_3d{x, y, z} - center;\n                        double rsq = rr[0]*rr[0]+rr[1]*rr[1]+rr[2]*rr[2];\n             //           print(\"current minr:  \", minr, \"     point: \", {x,y,z}, \"     center: \", center, \"     p: \", {x,y,z}, \"     rsq: \", rsq);\n                        if (minr > rsq) {\n                            minr = rsq;\n                            ii = i; jj = j; kk = k;\n                        }\n                    }\n                }\n            }\n            //print(\"ii: \", ii, \"jj: \", jj, \"kk: \", kk);\n            //printf(\"\\n\");\n            if ((ii < 0) || (jj < 0) || (kk < 0)) MADNESS_EXCEPTION(\"GTH_Pseudopotential: failed to find suitable minimum point\\n\", 0);\n            double x = (ii == 0) ? c1[0] : c2[0]; \n            double y = (jj == 0) ? c1[1] : c2[1]; \n            double z = (kk == 0) ? c1[2] : c2[2]; \n            double fval = this->operator()({x, y, z});\n            if (fabs(fval) < ftol) return true;\n            else return false;\n        }\n    }\n \n    virtual void operator()(const Vector<double*,3>& xvals, double* MADNESS_RESTRICT fvals, int npts) const final {\n        \n        double* x = new double[npts];\n        double* y = new double[npts];\n        double* z = new double[npts];\n        double* rsq = new double[npts];\n        double* rr = new double[npts];\n\n        double* x1 = xvals[0]; double* x2 = xvals[1]; double* x3 = xvals[2];\n        for (int i = 0; i < npts; i++) {\n            x[i] = x1[i]-center[0];\n            y[i] = x2[i]-center[1];\n            z[i] = x3[i]-center[2];\n            rsq[i] = x[i]*x[i] + y[i]*y[i] + z[i]*z[i];\n            rr[i] = std::sqrt(rsq[i]);\n            fvals[i] = t1;\n        }\n\n        const double PI = constants::pi;\n\n        // Radial part\n        if (itmp2 == 0) {\n            for (int i = 0; i < npts; i++) {\n                fvals[i] *= std::sqrt(2);\n            }\n        }\n        else if (itmp2 == 1) {\n            for (int i = 0; i < npts; i++) {\n                fvals[i] *= rr[i]*std::sqrt(2);\n            }\n        }\n        else if (itmp2 == 2) {\n            for (int i = 0; i < npts; i++) {\n                fvals[i] *= rsq[i]*std::sqrt(2);\n            }\n        }\n        else if (itmp2 == 3) {\n            for (int i = 0; i < npts; i++) {\n                fvals[i] *= rr[i]*rsq[i]*std::sqrt(2);\n            }\n        }\n        else if (itmp2 == 4) {\n            for (int i = 0; i < npts; i++) {\n                fvals[i] *= rsq[i]*rsq[i]*std::sqrt(2);\n            }\n        }\n        else if (itmp2 == 5) {\n            for (int i = 0; i < npts; i++) {\n                fvals[i] *= rr[i]*rsq[i]*rsq[i]*std::sqrt(2);\n            }\n        }\n        else if (itmp2 == 6) {\n            for (int i = 0; i < npts; i++) {\n                fvals[i] *= rsq[i]*rsq[i]*rsq[i]*std::sqrt(2);\n            }\n        }\n        else if (itmp2 == 7) {\n            for (int i = 0; i < npts; i++) {\n                fvals[i] *= rr[i]*rsq[i]*rsq[i]*rsq[i];\n            }\n        }\n        // Angular part\n        if (l == 0) {\n            for (int i = 0; i < npts; i++) {\n                fvals[i] *= (1./2.)*std::sqrt(1./PI)*std::exp(-0.5*(rsq[i]/alpha/alpha));\n            }\n        } else if (l == 1) {\n            if (m == 0) {\n                for (int i = 0; i < npts; i++) {\n                    fvals[i] *= std::sqrt(3./4./PI)*x[i]*std::exp(-0.5*(rsq[i]/alpha/alpha));\n                }\n            }\n            else if (m == 1) {\n                for (int i = 0; i < npts; i++) {\n                    fvals[i] *= std::sqrt(3./4./PI)*y[i]*std::exp(-0.5*(rsq[i]/alpha/alpha));\n                }\n            }\n            else if (m == 2) {\n                for (int i = 0; i < npts; i++) {\n                    fvals[i] *= std::sqrt(3./4./PI)*z[i]*std::exp(-0.5*(rsq[i]/alpha/alpha));\n                }\n            }\n            else {\n                MADNESS_EXCEPTION(\"m out of range for l = 1\", 0);\n            }\n        } else if (l == 2) {\n            if (m == 0) {\n                for (int i = 0; i < npts; i++) {\n                    fvals[i] *= (1./4.)*std::sqrt(5./PI)*(-x[i]*x[i] - y[i]*y[i] + 2*z[i]*z[i])*std::exp(-0.5*(rsq[i]/alpha/alpha));\n                }\n            }\n            else if (m == 1) {\n                for (int i = 0; i < npts; i++) {\n                    fvals[i] *= (1./2.)*std::sqrt(15./PI)*(y[i]*z[i])*std::exp(-0.5*(rsq[i]/alpha/alpha));\n                }\n            }\n            else if (m == 2) {\n                for (int i = 0; i < npts; i++) {\n                    fvals[i] *= (1./2.)*std::sqrt(15./PI)*(x[i]*z[i])*std::exp(-0.5*(rsq[i]/alpha/alpha));\n                }\n            }\n            else if (m == 3) {\n                for (int i = 0; i < npts; i++) {\n                    fvals[i] *= (1./2.)*std::sqrt(15./PI)*(x[i]*y[i])*std::exp(-0.5*(rsq[i]/alpha/alpha));\n                }\n            }\n            else if (m == 4) {\n                for (int i = 0; i < npts; i++) {\n                    fvals[i] *= (1./4.)*std::sqrt(15./PI)*(x[i]*x[i] - y[i]*y[i])*std::exp(-0.5*(rsq[i]/alpha/alpha));\n                }\n            }\n            else {\n                MADNESS_EXCEPTION(\"m out of range for l = 2\", 0);\n            }\n        }\n        //for (int i = 0; i < npts; i++) {\n        //    fvals[i] *= std::exp(-0.5*(rsq[i]/alpha/alpha));\n        //}\n\n        delete [] x;\n        delete [] y;\n        delete [] z;\n        delete [] rsq;\n        delete [] rr;\n    }\n\n    std::vector<coord_3d> special_points() const final {return specialpts;}\n\n    Level special_level() const final {\n      return 6;\n    }\n};\n\nclass ProjRLMStore {\nprivate:\n    int maxL;\n    real_tensor radii;\n    coord_3d center;\n\npublic:\n    ProjRLMStore(const real_tensor& radii, const coord_3d& center) \n     : maxL(radii.dim(0)), radii(radii), center(center) {}\n  \n    real_function_3d nlmproj(World& world, int l, int m, int i) {\n      // real_function_3d f1 = (m < 2*l+1) ?\n      // \treal_factory_3d(world).functor(real_functor_3d(new ProjRLMFunctor(radii(l), l, m, i, center))).\n      // \ttruncate_on_project().nofence().truncate_mode(0) : real_factory_3d(world);\n\n      real_function_3d f1;\n      if (m < 2*l+1) {\n\tauto functor = real_functor_3d(new ProjRLMFunctor(radii(l), l, m, i, center));\n\tf1 = real_factory_3d(world).functor(functor).truncate_on_project().nofence().truncate_mode(0);\n      }\n      else {\n\tf1 = real_factory_3d(world);\n      }\n\t\n      return f1;\n    }\n\n    ProjRLMFunctor nlmproj_functor(World& world, int l, int m, int i) {\n       return ProjRLMFunctor(radii(l), l, m, i, center);\n    }\n};\n\ntemplate <typename Q>\nclass GTHPseudopotential {\nprivate:\npublic:\n    Molecule molecule;\n    std::array<real_tensor,118> localp;\n    std::array<real_tensor,118> radii;\n    std::array<real_tensor,118> hlij;\n    std::array<real_tensor,118> klij;\n    real_function_3d vlocalp;\n    std::vector<unsigned int> atoms_with_projectors;\n\n\npublic:\n    GTHPseudopotential(World& world, Molecule molecule) : molecule(molecule) {}\n\n    void make_pseudo_potential(World& world) {\n        // Load info from file\n        load_pseudo_from_file(world, \"gth.xml\");\n        atoms_with_projectors.clear();\n        \n        // fill list with atoms-with-projectors (i.e. not H or He)\n        for (size_t iatom = 0; iatom < molecule.natom(); iatom++) {\n            Atom atom = molecule.get_atom(iatom);\n\n            //make sure this is actually a pseudo-atom\n            if (!atom.pseudo_atom) continue;\n\n            unsigned int atype = atom.atomic_number;\n            if (radii[atype-1].dim(0) > 0)\n              atoms_with_projectors.push_back(iatom);\n        }\n\n        vlocalp = real_factory_3d(world);\n        vlocalp.compress();\n        for (size_t iatom = 0; iatom < molecule.natom(); iatom++) {\n            // Get atom and its associated GTH tensors\n            Atom atom = molecule.get_atom(iatom);\n\n            //make sure this is actually a pseudo-atom\n            if (!atom.pseudo_atom) continue;\n\n            coord_3d center = atom.get_coords();\n            unsigned int atype = atom.atomic_number;\n            // do local part\n            real_tensor atom_localp = localp[atype-1];\n            real_function_3d temp = real_factory_3d(world).functor(\n                real_functor_3d(new \n                VLocalFunctor(atom_localp[0], atom_localp[1], atom_localp[2], atom_localp[3], atom_localp[4], atom_localp[5], center))).\n                truncate_mode(0).truncate_on_project();\n            temp.compress();\n            //vlocalp += temp;\n            vlocalp.gaxpy(1.0, temp, 1.0, true);\n        }\n    }\n\n    real_function_3d vlocalpot() {\n        return vlocalp;\n    }\n\n    void reproject(int k, double thresh) {\n      vlocalp = madness::project(vlocalp, k, thresh, true);\n    }\n\n    void load_pseudo_from_file(World& world, const std::string filename) {\n        bool debug = true;\n       \n        TiXmlDocument doc(filename);\n        if (!doc.LoadFile()) {\n            MADNESS_EXCEPTION(\"Failed to load GTH pseudopotential file\", 0);\n        }\n\n        for (size_t iatom = 0; iatom < molecule.natom(); iatom++) {\n            Atom atom = molecule.get_atom(iatom);\n            unsigned int atype = atom.atomic_number;\n            if (debug && world.rank() == 0) {printf(\"atom atomic_number = %d\\n\", atype);}\n    \n            bool success = false;\n            for (TiXmlElement* node=doc.FirstChildElement(); node && !success; node=node->NextSiblingElement()) {\n                if (strcmp(node->Value(),\"name\") == 0) {\n                    std::string name = node->GetText();\n                    if (debug && world.rank() == 0) std::cout << \"Loading pseudopotential file \" << name << std::endl;\n                }\n                else if (strcmp(node->Value(), \"atom\") == 0) {\n                    const char* symbol = node->Attribute(\"symbol\");\n                    unsigned int atn = symbol_to_atomic_number(symbol);\n                    if (atype == atn) {\n                        success = true;\n                        if (debug && world.rank() == 0) std::cout << \"  found atomic pseudopotential \" << symbol << std::endl;\n                        int lmax = -1;\n                        node->Attribute(\"lmax\", &lmax);\n                        if (debug && world.rank() == 0) std::cout << \"  maximum L is \" << lmax << std::endl;\n                        real_tensor t_radii((long)lmax+1); \n                        real_tensor t_hlij((long)lmax+1, (long)3, (long)3);\n                        real_tensor t_klij((long)lmax+1, (long)3, (long)3);\n                        // local part\n                        TiXmlElement* xmlVLocal = node->FirstChildElement();\n                        real_tensor t_localp((long)6);\n                        double zeff = 0.0; xmlVLocal->Attribute(\"Zeff\", &zeff); t_localp[0] = zeff;\n                        double lradius = 0.0; xmlVLocal->Attribute(\"radius\", &lradius); t_localp(1) = lradius;\n                        double C1 = 0.0; xmlVLocal->Attribute(\"C1\", &C1); t_localp[2] = C1;\n                        double C2 = 0.0; xmlVLocal->Attribute(\"C2\", &C2); t_localp[3] = C2;\n                        double C3 = 0.0; xmlVLocal->Attribute(\"C3\", &C3); t_localp[4] = C3;\n                        double C4 = 0.0; xmlVLocal->Attribute(\"C4\", &C4); t_localp[5] = C4;\n                        // loop through nonlocal part\n                        for (TiXmlElement* xmlLnlproj = xmlVLocal->NextSiblingElement(); \n                            xmlLnlproj; xmlLnlproj=xmlLnlproj->NextSiblingElement()) {\n                            int lvalue = -1; xmlLnlproj->Attribute(\"l\", &lvalue);\n                            double radius = 0.0; xmlLnlproj->Attribute(\"radius\", &radius); t_radii[lvalue] = radius; \n                            double h00 = 0.0; xmlLnlproj->Attribute(\"h00\", &h00); t_hlij(lvalue, 0, 0) = h00;\n                            double h11 = 0.0; xmlLnlproj->Attribute(\"h11\", &h11); t_hlij(lvalue, 1, 1) = h11;\n                            double h22 = 0.0; xmlLnlproj->Attribute(\"h22\", &h22); t_hlij(lvalue, 2, 2) = h22;\n                            double k00 = 0.0; xmlLnlproj->Attribute(\"k00\", &k00); t_klij(lvalue, 0, 0) = k00;\n                            double k11 = 0.0; xmlLnlproj->Attribute(\"k11\", &k11); t_klij(lvalue, 1, 1) = k11;\n                            double k22 = 0.0; xmlLnlproj->Attribute(\"k22\", &k22); t_klij(lvalue, 2, 2) = k22;\n                        }\n                        // off-diagonal elements\n                        if (lmax >= 0) {\n                            t_hlij(0, 0, 1) = -1./2.*std::sqrt(3./5.)*t_hlij(0, 1, 1); \n                            t_hlij(0, 1, 0) = t_hlij(0, 0, 1);\n                            t_hlij(0, 0, 2) = 1./2.*std::sqrt(5./21.)*t_hlij(0, 2, 2);\n                            t_hlij(0, 2, 0) = t_hlij(0, 0, 2);\n                            t_hlij(0, 1, 2) = -1./2.*std::sqrt(100./63.)*t_hlij(0, 2, 2);\n                            t_hlij(0, 2, 1) = t_hlij(0, 1, 2);\n                        } if (lmax >= 1) {\n                            t_hlij(1, 0, 1) = -1./2.*std::sqrt(5./7.)*t_hlij(1, 1, 1);\n                            t_hlij(1, 1, 0) = t_hlij(1, 0, 1);\n                            t_hlij(1, 0, 2) = 1./6.*std::sqrt(35./11.)*t_hlij(1, 2, 2);\n                            t_hlij(1, 2, 0) = t_hlij(1, 0, 2);\n                            t_hlij(1, 1, 2) = -1./6.*14./std::sqrt(11.)*t_hlij(1, 2, 2);\n                            t_hlij(1, 2, 1) = t_hlij(1, 1, 2);\n                        } if (lmax >= 2) {\n                            t_hlij(2, 0, 1) = -1./2.*std::sqrt(7./9.)*t_hlij(2, 1, 1);\n                            t_hlij(2, 1, 0) = t_hlij(2, 0, 1);\n                            t_hlij(2, 0, 2) = 1./2.*std::sqrt(63./143.)*t_hlij(2, 2, 2);\n                            t_hlij(2, 2, 0) = t_hlij(2, 0, 2);\n                            t_hlij(2, 1, 2) = -1./2.*18./std::sqrt(143.)*t_hlij(2, 2, 2);\n                            t_hlij(2, 2, 1) = t_hlij(2, 1, 2);\n                        }\n\n                        // Copy to main array\n                        localp[atype-1] = t_localp;\n                        radii[atype-1] = t_radii;\n                        hlij[atype-1] = t_hlij;\n                        klij[atype-1] = t_klij;\n                    }\n                }\n            }\n        }\n    }\n\n\n    std::vector<Function<Q,3> > apply_potential(World& world, const real_function_3d& potential, const std::vector<Function<Q,3> >& psi, const tensorT & occ, Q & enl) {\n        double thresh = FunctionDefaults<3>::get_thresh();\n        double vtol = 1e-2*thresh;\n        std::vector<Function<Q,3> > vpsi = mul_sparse(world,(potential), psi, vtol);\n\n        unsigned int norbs = psi.size();\n        unsigned int natoms = atoms_with_projectors.size();\n\n        // NEW (VECTORIZED) ... hopefully\n        vector_real_function_3d localproj;\n        int lidx = 0;\n        unsigned int maxLL = 0;\n        // loop through all of the atom types in the molecule and get the maximum L value\n        // we need this because we are going to create a fixed sized tensor to store \n        // mapping between a linear index and (ias=which atom, i=which projector, l=angular momentum, \n        // m=angular momentum projection)\n        for (unsigned int iatom = 0; iatom < natoms; iatom++) {\n            // Get atom and its associated GTH tensors\n            Atom atom = molecule.get_atom(atoms_with_projectors[iatom]);\n            unsigned int atype = atom.atomic_number;\n            real_tensor& atom_radii = radii[atype-1];\n            if (atom_radii.dim(0) > 0)\n              maxLL = std::max(maxLL,(unsigned int)atom_radii.dim(0)-1);\n        }\n\n        // Pilm_lookup is a mapping between a linear index and (ias,i,l,m)\n        Tensor<int> Pilm_lookup((unsigned int) natoms, (unsigned long) 3, (unsigned long) maxLL+1, (unsigned long) 2*maxLL+1);\n        for (unsigned int iatom = 0; iatom < natoms; iatom++) {\n            // Get atom and its associated GTH tensors\n            Atom atom = molecule.get_atom(atoms_with_projectors[iatom]);\n            coord_3d center = atom.get_coords();\n            unsigned int atype = atom.atomic_number;\n            real_tensor& atom_radii = radii[atype-1];\n            //real_tensor& atom_hlij = hlij[atype-1];\n\n            // Create function stores for projectors\n            ProjRLMStore prlmstore(atom_radii, center);\n            for (unsigned int j = 1; j <= 3; j++) {\n                for (unsigned int l = 0; l <= maxLL; l++) {\n                    for (unsigned int m = 0; m < 2*maxLL+1; m++) {\n                       Pilm_lookup(iatom, j-1, l, m) = lidx++;\n                       if (m < 2*l+1) localproj.push_back(prlmstore.nlmproj(world,l,m,j)); \n                       else localproj.push_back(real_factory_3d(world));\n                    }\n                }\n            }\n            // Somehow this scares me ... thread-safety of the container localproj (???)\n            world.gop.fence();\n        }\n        truncate(world, localproj, FunctionDefaults<3>::get_thresh());\n        compress(world, localproj);\n        //truncate(world, psi, FunctionDefaults<3>::get_thresh());\n        compress(world, psi);\n        //truncate(world, vpsi, FunctionDefaults<3>::get_thresh());\n        compress(world, vpsi);\n\n        Tensor<Q> Pilm = matrix_inner(world, localproj, psi);\n        Pilm = Pilm.reshape(natoms, 3, maxLL+1, 2*maxLL+1, norbs);\n\n        Tensor<Q> Qilm((unsigned int) natoms, (unsigned long) 3, (unsigned long) maxLL+1, (unsigned long) 2*maxLL+1, (unsigned int) norbs);\n        for (unsigned int iorb=0; iorb<psi.size(); iorb++) {\n            for (unsigned int iatom = 0; iatom < natoms; iatom++) {\n                // Get atom and its associated GTH tensors\n                Atom atom = molecule.get_atom(atoms_with_projectors[iatom]);\n                unsigned int atype = atom.atomic_number;\n                real_tensor& atom_radii = radii[atype-1];\n                real_tensor& atom_hlij = hlij[atype-1];\n                int maxL = atom_radii.dim(0)-1;\n                for (unsigned int i = 1; i <= 3; i++) {\n                    for (int l = 0; l <= maxL; l++) {\n                        for (int m = 0; m < 2*l+1; m++) {\n                            Q s = 0.0;\n                            for (unsigned int j = 1; j <= 3; j++) {\n                                s += atom_hlij(l,i-1,j-1)*Pilm(iatom, j-1,l,m,iorb);\n                            }\n                            Qilm(iatom, i-1,l,m,iorb) = s;\n                        }\n                    }\n                }\n            }\n        }\n        Qilm = Qilm.reshape(natoms*3*(maxLL+1)*(2*maxLL+1),norbs);\n\n        double vtol2 = 1e-4*thresh;\n        double trantol = vtol2 / std::min(30.0, double(localproj.size()));\n        vector_real_function_3d dpsi = transform(world, localproj, Qilm, trantol, true);\n\n        // calculate non-local energy\n        tensorT nlmat = matrix_inner(world, dpsi, psi, true);\n        int nocc = occ.size();\n        enl = 0.0;\n        for(int i = 0;i < nocc;++i){\n            enl += occ[i] * nlmat(i, i);\n        }\n\n        //debug printing\n        /*tensorT lmat = matrix_inner(world, vpsi, psi, true);\n        Q el = 0.0;\n        for(int i = 0;i < nocc;++i){\n            el += occ[i] * lmat(i, i);\n            std::cout << \"nloc/loc \" << i << \"  \" << occ[i] << \"  \" << nlmat(i,i) << \"  \"<< lmat(i,i) << std::endl;\n        }\n\n        if(world.rank() == 0){\n            printf(\"\\n              enl, el, epot %16.8f  %16.8f  %16.8f\\n\", enl, el, enl+el);\n        }*/\n\n        gaxpy(world, 1.0, vpsi, 1.0, dpsi);\n\n        return vpsi;\n    }\n\n    std::vector<Function<Q,3> > apply_potential_simple(World& world, const real_function_3d& potential, const std::vector<Function<Q,3> >& psi, const tensorT & occ, Q & enl) {\n        double thresh = FunctionDefaults<3>::get_thresh();\n        double vtol = 1e-2*thresh;\n        std::vector<Function<Q,3> > vpsi = mul_sparse(world,(potential), psi, vtol);\n\n        //unsigned int norbs = psi.size();\n        unsigned int natoms = atoms_with_projectors.size();\n\n        for (unsigned int iatom = 0; iatom < natoms; iatom++) {\n            Atom atom = molecule.get_atom(atoms_with_projectors[iatom]);\n            unsigned int atype = atom.atomic_number;\n            real_tensor& atom_radii = radii[atype-1];\n            real_tensor& atom_hlij = hlij[atype-1];\n            coord_3d center = atom.get_coords();\n            ProjRLMStore prlmstore(atom_radii, center);\n            unsigned int maxLL = atom_radii.dim(0)-1;\n            for (unsigned int l = 0; l <= maxLL; l++) {\n                for (unsigned int m = 0; m < 2*l+1; m++) {\n                    for (unsigned int i = 1; i <= 3; i++) {\n                        real_function_3d fproji = prlmstore.nlmproj(world,l,m,i);\n                        for (unsigned int j = 1; j <= 3; j++) {\n                            real_function_3d fprojj = prlmstore.nlmproj(world,l,m,j);\n                            for (unsigned int iorb = 0; iorb < psi.size(); iorb++) {\n                               double val = atom_hlij(l,i-1,j-1)*(fprojj.inner(psi[iorb]));\n                               if (std::abs(val) > vtol*1e-2) {\n                                   vpsi[iorb] += val*fproji;\n                               }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        return vpsi;\n    }\n};\n\n\n\n\n}\n\n#endif // MADNESS_CHEM_GTH_PSEUDOPOTENTIAL_H__INCLUDED\n"
  },
  {
    "path": "src/madness/chem/lda.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n/* lda.f -- translated by f2c (version 20050501).\n   You must link the resulting object file with libf2c:\n\ton Microsoft Windows system, link with libf2c.lib;\n\ton Linux or Unix systems, link with .../path/to/libf2c.a -lm\n\tor, if you install libf2c.a in a standard place, with -lf2c -lm\n\t-- in that order, at the end of the command line, as in\n\t\tcc *.o -lf2c -lm\n\tSource for libf2c is in /netlib/f2c/libf2c.zip, e.g.,\n\n\t\thttp://www.netlib.org/f2c/libf2c.zip\n*/\n\n\n/* Table of constant values */\n\n#include <cmath>\n\nnamespace madness {\n\n\nconst double c_b2  = 0.333333333333333333333333333333333;\nconst double c_b7  = 0.333333333333333333333333333333;\nconst double c_b14 = 1.333333333333333333333333333333;\n\n/* Subroutine */\nint x_rks_s__(const double *r__, double *f, double * dfdra) {\n\n    /*     This subroutine evaluates the spin polarised exchange functional */\n    /*     in the Local Density Approximation [1], and the corresponding */\n    /*     potential. Often this functional is referred to as the Dirac */\n    /*     functional [2] or Slater functional. */\n\n    /*     [1] F. Bloch, Zeitschrift fuer Physik, Vol. 57 (1929) 545. */\n    /*     [2] P.A.M. Dirac, Proceedings of the Cambridge Philosophical Society, Vol. 26 (1930) 376. */\n\n    /*     Parameters: */\n    /*     r     the total electron density */\n    /*     f     On return the functional value */\n    /*     dfdra On return the derivative of f with respect to alpha electron density */\n\n    /*     Ax = -3/4*(6/pi)**(1/3) */\n    /*     Bx = -(6/pi)**(1/3) */\n    /*     C  = (1/2)**(1/3) */\n\n    double ra13 = pow(*r__, c_b2) * 0.793700525984099737375852819636154;\n    *f          = ra13 * (*r__) * -0.930525736349100025002010218071667;\n    *dfdra      = ra13 * -1.24070098179880003333601362409556;\n\n    return 0;\n} /* x_rks_s__ */\n\n/* ----------------------------------------------------------------------- */\n/* Subroutine */\nint x_uks_s__(double *ra, double *rb, double *f, double *dfdra, double *dfdrb) {\n\n    /*     This subroutine evaluates the spin polarised exchange functional */\n    /*     in the Local Density Approximation [1], and the corresponding */\n    /*     potential. Often this functional is referred to as the Dirac */\n    /*     functional [2] or Slater functional. */\n\n    /*     [1] F. Bloch, Zeitschrift fuer Physik, Vol. 57 (1929) 545. */\n    /*     [2] P.A.M. Dirac, Proceedings of the Cambridge Philosophical Society, Vol. 26 (1930) 376. */\n\n    /*     Parameters: */\n    /*     ra    the alpha electron density */\n    /*     rb    the beta  electron density */\n    /*     f     On return the functional value */\n    /*     dfdra On return the derivative of f with respect to ra */\n    /*     dfdrb On return the derivative of f with respect to rb */\n\n    /*     Ax = -3/4*(6/pi)**(1/3) */\n    /*     Bx = -(6/pi)**(1/3) */\n\n    double ra13 = pow(*ra, c_b2);\n    double rb13 = pow(*rb, c_b2);\n    *f = (*ra * ra13 + *rb * rb13) * -.930525736349100025002010218071667;\n    *dfdra = ra13 * -1.24070098179880003333601362409556;\n    *dfdrb = rb13 * -1.24070098179880003333601362409556;\n\n    return 0;\n} /* x_uks_s__ */\n\n/* Subroutine */\nint c_rks_vwn5__(const double *r__, double *f, double * dfdra) {\n\n    /*     This subroutine evaluates the Vosko, Wilk and Nusair correlation */\n    /*     functional number 5 [1] for the closed shell case, with the */\n    /*     parametrisation as given in table 5. */\n\n    /*     The original code was obtained from Dr. Phillip Young, */\n    /*     with corrections from Dr. Paul Sherwood. */\n\n    /*     [1] S.H. Vosko, L. Wilk, and M. Nusair */\n    /*         \"Accurate spin-dependent electron liquid correlation energies */\n    /*          for local spin density calculations: a critical analysis\", */\n    /*         Can.J.Phys, Vol. 58 (1980) 1200-1211. */\n\n    /*     Parameters: */\n    /*     r      the total electron density */\n    /*     f      On return the functional value */\n    /*     dfdra  On return the derivative of f with respect to the alpha */\n    /*            electron density */\n\n    /* Local variables */\n    double a2, b2, c2, d2, i1, i2, i3, p1, p2, p3, p4, t4, \n        iv, iv2, pp1, pp2, inv, srho, srho13;\n\n    /* VWN interpolation parameters */\n\n    /* paramagnetic */\n    a2 = .0621814;\n    b2 = 3.72744;\n    c2 = 12.9352;\n    d2 = -.10498;\n\n    /* t4 = (1/(4/3)*pi)**(1/3) */\n    t4 = .620350490899399531;\n\n    /* Paramagnetic interpolation constants */\n\n    p1 = 6.1519908197590798;\n    p2 = a2 * .5;\n    p3 = 9.6902277115443745e-4;\n    p4 = .038783294878113009;\n\n    /* closed shell case */\n    srho = *r__;\n    srho13 = pow(srho, c_b7);\n    iv2 = t4 / srho13;\n    iv = sqrt(iv2);\n\n    /* paramagnetic */\n    inv = 1. / (iv2 + b2 * iv + c2);\n    i1 = log(iv2 * inv);\n    i2 = log((iv - d2) * (iv - d2) * inv);\n    /* corrected b1->b2 ps Apr98 */\n    i3 = atan(p1 / (iv * 2. + b2));\n    pp1 = p2 * i1 + p3 * i2 + p4 * i3;\n    pp2 = a2 * (1. / iv - iv * inv * (b2 / (iv - d2) + 1.));\n\n    *f = pp1 * srho;\n    *dfdra = pp1 - iv * .166666666666666666666666666666 * pp2;\n\n    return 0;\n} /* c_rks_vwn5__ */\n\n/* ----------------------------------------------------------------------- */\n/* Subroutine */\nint c_uks_vwn5__(double *ra, double *rb, double * f, double *dfdra, double *dfdrb) {\n\n    /*     This subroutine evaluates the Vosko, Wilk and Nusair correlation */\n    /*     functional number 5 [1], with the parametrisation as given in */\n    /*     table 5. */\n\n    /*     The original code was obtained from Dr. Phillip Young, */\n    /*     with corrections from Dr. Paul Sherwood. */\n\n    /*     [1] S.H. Vosko, L. Wilk, and M. Nusair */\n    /*         \"Accurate spin-dependent electron liquid correlation energies */\n    /*          for local spin density calculations: a critical analysis\", */\n    /*         Can.J.Phys, Vol. 58 (1980) 1200-1211. */\n\n    /*     Parameters: */\n    /*     ra     the alpha-electron density */\n    /*     rb     the beta-electron density */\n    /*     f      On return the functional value */\n    /*     dfdra  On return the derivative of f with respect to ra */\n    /*     dfdrb  On return the derivative of f with respect to rb */\n\n    /* System generated locals */\n    double d__1, d__2;\n\n    /* Local variables */\n    double v, a1, b1, c1, d1, a2, b2, c2, d2, a3, b3,\n    c3, d3, f1, f2, f3, p1, p2, p3, s1, t1, t2, s2, t4, t5, t6, t7,\n    s3, s4, p4, f4, i1, i2, i3, iv, ff1, ff2, iv2, pp1,\n    pp2, ss1, ss2, tau, inv, vwn1, vwn2, dtau, zeta, srho, zeta3,\n    zeta4, srho13, inter1, inter2;\n\n    /*     tn13 = 2**(1/3) */\n    /*     tn43 = 2**(4/3) */\n\n    /* VWN interpolation parameters */\n\n    /* spin stiffness */\n    a1 = -.0337737278807791058;\n    b1 = 1.13107;\n    c1 = 13.0045;\n    d1 = -.0047584;\n    /* paramagnetic */\n    a2 = .0621814;\n    b2 = 3.72744;\n    c2 = 12.9352;\n    d2 = -.10498;\n    /* ferromagnetic */\n    /* try cadpac/nwchem value (.5*a2) */\n    a3 = .0310907;\n    b3 = 7.06042;\n    c3 = 18.0578;\n    d3 = -.325;\n\n    /* t4 = (1/(4/3)*pi)**(1/3) */\n    t4 = .620350490899399531;\n\n    /* t5 = 0.5/(2**(1/3)-1) */\n    t5 = 1.92366105093153617;\n\n    /* t6 = 2/(3*(2**(1/3)-1)) */\n    t6 = 2.56488140124204822;\n\n    /* t7 = 2.25*(2**(1/3)-1) */\n    t7 = .584822362263464735;\n\n    /* Spin stiffness interpolation constants */\n\n    s1 = 7.12310891781811772;\n    s2 = a1 * .5;\n    s3 = -6.9917323507644313e-6;\n    s4 = -.0053650918488835769;\n\n    /* Paramagnetic interpolation constants */\n\n    p1 = 6.1519908197590798;\n    p2 = a2 * .5;\n    p3 = 9.6902277115443745e-4;\n    p4 = .038783294878113009;\n\n    /* Ferromagnetic interpolation constants */\n\n    f1 = 4.73092690956011364;\n    f2 = a3 * .5;\n\n    /*      F3 = -0.244185082989490298d-02 *0.5d0 */\n    /*      F4 = -0.570212323620622186d-01 *0.5d0 */\n\n    /*  try nwchem values */\n\n    f3 = .00224786709554261133;\n    f4 = .0524913931697809227;\n\n    /* Interpolation intervals */\n\n    inter1 = .99999999989999999;\n    inter2 = -.99999999989999999;\n\n    /* open shell case */\n    srho = *ra + *rb;\n    srho13 = pow(srho, c_b7);\n    iv2 = t4 / srho13;\n    iv = sqrt(iv2);\n\n    /* spin-stiffness */\n    inv = 1. / (iv2 + b1 * iv + c1);\n    i1 = log(iv2 * inv);\n    i2 = log((iv - d1) * (iv - d1) * inv);\n    i3 = atan(s1 / (iv * 2. + b1));\n    ss1 = s2 * i1 + s3 * i2 + s4 * i3;\n    ss2 = a1 * (1. / iv - iv * inv * (b1 / (iv - d1) + 1.));\n\n    /* paramagnetic */\n    inv = 1. / (iv2 + b2 * iv + c2);\n    i1 = log(iv2 * inv);\n    i2 = log((iv - d2) * (iv - d2) * inv);\n    /* corrected b1->b2 ps Apr98 */\n    i3 = atan(p1 / (iv * 2. + b2));\n    pp1 = p2 * i1 + p3 * i2 + p4 * i3;\n    pp2 = a2 * (1. / iv - iv * inv * (b2 / (iv - d2) + 1.));\n\n    /* ferromagnetic */\n    inv = 1. / (iv2 + b3 * iv + c3);\n    i1 = log(iv2 * inv);\n    i2 = log((iv - d3) * (iv - d3) * inv);\n    i3 = atan(f1 / (iv * 2. + b3));\n    ff1 = f2 * i1 + f3 * i2 + f4 * i3;\n    ff2 = a3 * (1. / iv - iv * inv * (b3 / (iv - d3) + 1.));\n\n    /* polarisation function */\n\n    zeta = (*ra - *rb) / srho;\n    zeta3 = zeta * zeta * zeta;\n    zeta4 = zeta3 * zeta;\n    if (zeta > inter1) {\n        vwn1 = t5 * .51984209978974638;\n        vwn2 = t6 * 1.25992104989487316476721060727823;\n    }\n    else if (zeta < inter2) {\n        vwn1 = t5 * .51984209978974638;\n        vwn2 = t6 * -1.25992104989487316476721060727823;\n    }\n    else {\n        d__1 = zeta + 1.;\n        d__2 = 1. - zeta;\n        vwn1 = (pow(d__1, c_b14) + pow(d__2, c_b14) - 2.) * t5;\n        d__1 = zeta + 1.;\n        d__2 = 1. - zeta;\n        vwn2 = (pow(d__1, c_b7) - pow(d__2, c_b7)) * t6;\n    }\n    ss1 *= t7;\n    ss2 *= t7;\n    tau = ff1 - pp1 - ss1;\n    dtau = ff2 - pp2 - ss2;\n\n    v = pp1 + vwn1 * (ss1 + tau * zeta4);\n    *f = v * srho;\n\n    t1 = v - iv * .166666666666666666666666666667 * (pp2 + vwn1 * (ss2 + dtau * zeta4));\n    t2 = vwn2 * (ss1 + tau * zeta4) + vwn1 * 4. * tau * zeta3;\n    *dfdra = t1 + t2 * (1. - zeta);\n    *dfdrb = t1 - t2 * (zeta + 1.);\n\n    return 0;\n} /* c_uks_vwn5__ */\n\n}\n"
  },
  {
    "path": "src/madness/chem/localizer.cc",
    "content": "//\n// Created by Florian Bischoff on 11/1/21.\n//\n\n#include<madness/chem/localizer.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/function_factory.h>\n#include <madness/tensor/jacobi.h>\n\nnamespace madness {\n\nLocalizer::Localizer(World& world, const AtomicBasisSet& aobasis, const Molecule& molecule,\n                     const std::vector<Function<double, 3>>& ao) : aobasis(aobasis), molecule(molecule), ao(ao) {\n    aobasis.atoms_to_bfn(molecule, at_to_bf, at_nbf);\n    thresh_degenerate = FunctionDefaults<3>::get_thresh();\n}\n\ntemplate<typename T, std::size_t NDIM>\nMolecularOrbitals<T, NDIM> Localizer::localize(const MolecularOrbitals<T, NDIM>& mo_in, bool randomize) const {\n\n    Tensor<T> Fock ;\n    return localize(mo_in, Fock, randomize);\n}\n\ntemplate<typename T, std::size_t NDIM>\nMolecularOrbitals<T, NDIM> Localizer::localize(const MolecularOrbitals<T, NDIM>& mo_in, const Tensor<T>& Fock,\n                                               bool randomize) const {\n\n    World& world = mo_in.get_mos()[0].world();\n    long nmo = mo_in.get_mos().size();\n    Tensor<T> U(nmo, nmo);\n    Tensor<T> fnew(nmo, nmo);\n    if (enforce_core_valence_separation) {\n        MADNESS_CHECK(size_t(Fock.dim(0)) == mo_in.get_mos().size());\n\n        MolecularOrbitals<T, NDIM> mo_cv_separated = mo_in;\n        Tensor<double> U1 = compute_core_valence_separation_transformation_matrix(world, mo_in, Fock);\n        mo_cv_separated.update_mos(transform(world, mo_in.get_mos(), U1));\n\n        auto slices = MolecularOrbitals<T, NDIM>::convert_set_to_slice(mo_in.get_localize_sets());\n\n        // localize all orbital sets separately\n        Tensor<T> UT2(nmo, nmo);\n        for (int set = 0; set <= mo_cv_separated.get_localize_sets().back(); ++set) {\n            Slice s = slices[set];\n            MolecularOrbitals<T, NDIM> mo1 = mo_cv_separated.get_subset(set);\n            Tensor<T> block_UT = compute_localization_matrix(world, mo1, randomize);\n            UT2(s, s) = block_UT;\n        }\n        U = inner(U1, transpose(UT2));\n        fnew = inner(U, inner(Fock, U, 1, 0), 0, 0);\n    } else {\n        U = transpose(compute_localization_matrix(world, mo_in, randomize));\n    }\n\n    // transform orbitals\n    std::vector<Function<T, NDIM>> result = truncate(transform(world, mo_in.get_mos(), U));\n\n    // transform orbital energies if given\n    Tensor<double> eps(mo_in.get_mos().size());\n    if (fnew.has_data()) for (int i = 0; i < fnew.dim(0); ++i) eps(i) = fnew(i, i);\n\n    MolecularOrbitals<T, NDIM> lmo(result, eps, {}, Tensor<double>(), mo_in.get_localize_sets());\n    lmo.set_all_orbitals_occupied();\n    return lmo;\n\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nTensor<T> Localizer::compute_localization_matrix(World& world, const MolecularOrbitals<T, NDIM>& mo_in,\n                                                 bool randomize) const {\n    // localize using the reconstructed orbitals\n    std::vector<Function<T, NDIM>> psi = metric.is_initialized() ? metric * mo_in.get_mos() : mo_in.get_mos();\n\n    DistributedMatrix<T> dUT;\n    if (method == \"pm\") {\n        dUT = localize_PM(world, psi, mo_in.get_localize_sets(), tolloc, randomize, false);\n    } else if (method == \"boys\") {\n        dUT = localize_boys(world, psi, mo_in.get_localize_sets(), tolloc, randomize);\n    } else if (method == \"new\") {\n        dUT = localize_new(world, psi, mo_in.get_localize_sets(), tolloc, randomize, false);\n    } else {\n        print(\"unknown localization method\", method);\n        MADNESS_EXCEPTION(\"unknown localization method\", 1);\n    }\n    long nmo = mo_in.get_mos().size();\n    Tensor<T> UT(nmo, nmo);\n    dUT.copy_to_replicated(UT);\n    return UT;\n}\n\ntemplate<typename T, std::size_t NDIM>\nMolecularOrbitals<T, NDIM> Localizer::separate_core_valence(const MolecularOrbitals<T, NDIM>& mo_in,\n                                                            const Tensor<T>& Fock) const {\n    World& world = mo_in.get_mos()[0].world();\n\n    Tensor<double> UT = compute_core_valence_separation_transformation_matrix(world, mo_in, Fock);\n\n    std::vector<Function<T, NDIM>> result = transform(world, mo_in.get_mos(), UT);\n    Tensor<T> fnew = inner(UT, inner(Fock, UT, 1, 0), 0, 0);\n    Tensor<double> eps(mo_in.get_mos().size());\n    for (int i = 0; i < eps.size(); ++i) eps(i) = std::real(fnew(i, i));\n    MolecularOrbitals<T, NDIM> mo_out(result, eps, {}, Tensor<double>(), mo_in.get_localize_sets());\n    mo_out.set_all_orbitals_occupied();\n    return mo_out;\n\n}\n\ntemplate<typename T, std::size_t NDIM>\nTensor<T> Localizer::compute_core_valence_separation_transformation_matrix(World& world,\n                         const MolecularOrbitals<T, NDIM>& mo_in, const Tensor<T>& Fock) const {\n\n    // block diagonalize the fock matrix\n    Tensor<T> U(Fock.dim(0),Fock.dim(1));\n    Tensor<T> f=copy(Fock);\n    jacobi(f,U,mo_in.get_localize_sets());\n    U=transpose(U);\n\n    world.gop.broadcast(U.ptr(), U.size(), 0);\n\n    // compute new fock matrix\n    Tensor<T> fnew = inner(U, inner(Fock, U, 1, 0), 0, 0);\n    bool success = check_core_valence_separation(fnew, mo_in.get_localize_sets());\n    if (not success) {\n        for (int i=0; i<world.size(); ++i) {\n            if (world.rank()==i) {\n                print(\"fnew in compute_core_valence_separation_transformation_matrix\");\n                print(fnew);\n            }\n            world.gop.fence();\n        }\n    }\n    MADNESS_CHECK(success);\n    return U;\n}\n\ntemplate<typename T>\nbool Localizer::check_core_valence_separation(const Tensor<T>& Fock, const std::vector<int>& localized_set,\n                                              const bool silent) {\n    std::vector<Slice> slices = MolecularOrbitals<T, 3>::convert_set_to_slice(localized_set);\n    Tensor<T> F = copy(Fock);\n    for (auto s: slices) F(s, s) = 0.0;\n    double error = F.absmax();\n    bool success = (error < FunctionDefaults<3>::get_thresh() * 5.0);\n    if (silent) return success;\n    if (not success) {\n        World& world=World::get_default();\n        for (int i=0; i<world.size(); ++i) {\n            if (world.rank()==i) {\n                print(\"faulty localization: core-valence separation requested but Fock matrix not block diagonal\");\n                std::cout << std::scientific << std::setprecision(8);\n                print(\"error norm\", error);\n                print(\"F, rank\",world.rank());\n                print(F);\n            }\n            world.gop.fence();\n        }\n        // print(Fock);\n    }\n    return success;\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nDistributedMatrix<T> Localizer::localize_boys(World& world, const std::vector<Function<T, NDIM>>& mo,\n                                              const std::vector<int>& set, const double thresh1,\n                                              const bool randomize,\n                                              const bool doprint) const {\n    typedef Tensor<T> tensorT;\n    typedef Function<T, NDIM> functionT;\n    typedef FunctionFactory<T, NDIM> factoryT;\n\n    double vtol = 1.e-7;\n    double thresh = thresh1;\n    if (thresh < 1e-6) thresh = 1e-6; //<<<<<<<<<<<<<<<<<<<<< need to implement new line search like in pm routine\n\n    long nmo = mo.size();\n    tensorT dip(nmo, nmo, 3);\n    for (int axis = 0; axis < 3; ++axis) {\n        auto dipole = [&axis](const Vector<double, NDIM>& x) { return x[axis]; };\n        functionT fdip = factoryT(world).functor(dipole).initial_level(4);\n        dip(_, _, axis) = matrix_inner(world, mo, mul_sparse(world, fdip, mo, vtol), true);\n    }\n\n    tensorT U(nmo, nmo);\n    default_random_generator.setstate(\n            182041 + world.rank() * 10101); // To help with reproducibility for debugging, etc.\n    if (world.rank() == 0) {\n        for (long i = 0; i < nmo; ++i)\n            U(i, i) = 1.0;\n\n        tensorT xprev; // previous search direction\n        tensorT gprev; // previous gradient\n        bool rprev = true; // if true previous iteration restricted step or did incomplete search (so don't do conjugate)\n        const int N = (nmo * (nmo - 1)) / 2;\n        for (long iter = 0; iter < 1200; ++iter) {\n            tensorT g(nmo, nmo);\n            double W = 0.0;\n            // cannot restrict size of individual gradients if want to do line search --- should instead modify line search direction\n            for (long i = 0; i < nmo; ++i) {\n                W += DIP(dip, i, i, i, i);\n                for (long j = 0; j < i; ++j) {\n                    g(j, i) = (DIP(dip, i, i, i, j) - DIP(dip, j, j, j, i));\n                    if (randomize && iter == 0) g(j, i) += 0.1 * (RandomValue<double>() - 0.5);\n                    g(i, j) = -g(j, i);\n                }\n            }\n            double maxg = g.absmax();\n            if (doprint)\n                printf(\"iteration %ld W=%.8f maxg=%.2e\\n\", iter, W, maxg);\n            if (maxg < thresh) break;\n\n            // construct search direction using conjugate gradient approach\n            tensorT x = copy(g);\n            if (!rprev) { // Only apply conjugacy if did LS with real gradient\n                double gamma = g.trace(g - gprev) / gprev.trace(gprev);\n                if (doprint) print(\"gamma\", gamma);\n                x.gaxpy(1.0, xprev, gamma);\n            }\n\n            // Perform the line search.\n            rprev = false;\n            double dxgrad = x.trace(g) * 2.0;\n            if (dxgrad < 0 || ((iter + 1) % N) == 0) {\n                if (doprint) print(\"resetting since dxgrad -ve or due to dimension\", dxgrad, iter, N);\n                x = copy(g);\n                dxgrad = x.trace(g) * 2.0; // 2*2 = 4 which should be prefactor on integrals in gradient\n            }\n            xprev = x; // Save for next iteration, noting shallow copy\n            gprev = g;\n\n            double mu = 0.01 / std::max(0.1, maxg); // Restrict intial step mu by size of max gradient\n            tensorT dU = matrix_exponential(x * mu);\n            tensorT newdip = inner(dU, dip, 0, 1); // can optimize this since only want (ii|ii)\n            newdip = inner(dU, newdip, 0, 1);\n            double newW = 0.0;\n            for (long i = 0; i < nmo; ++i) {\n                newW += DIP(newdip, i, i, i, i);\n            }\n\n            if (randomize && iter == 0) {\n                rprev = true; // since did not use real gradient\n            } else { // perform quadratic fit using f(0), df(0)/dx=dxgrad, f(mu)\n                double f0 = W;\n                double f1 = newW;\n                double hess = 2.0 * (f1 - f0 - mu * dxgrad) / (mu * mu);\n                if (hess >= 0) {\n                    if (doprint) print(\"+ve hessian\", hess);\n                    hess = -2.0 * dxgrad; // force a bigish step to get out of bad region\n                    rprev = true; // since did not do line search\n                }\n                double mu2 = -dxgrad / hess;\n                if (mu2 * maxg > 0.5) {\n                    mu2 = 0.5 / maxg; // pi/6 = 0.524, pi/4=0.785\n                    rprev = true; // since did not do line search\n                }\n                double f2p = f0 + dxgrad * mu2 + 0.5 * hess * mu2 * mu2;\n                if (doprint) print(f0, f1, f2p, \"dxg\", dxgrad, \"hess\", hess, \"mu\", mu, \"mu2\", mu2);\n                mu = mu2;\n            }\n\n            dU = matrix_exponential(x * mu);\n            U = inner(U, dU, 1, 0);\n            dip = inner(dU, dip, 0, 1);\n            dip = inner(dU, dip, 0, 1);\n        }\n\n        bool switched = true;\n        while (switched) {\n            switched = false;\n            for (int i = 0; i < nmo; i++) {\n                for (int j = i + 1; j < nmo; j++) {\n                    if (set[i] == set[j]) {\n                        double sold = U(i, i) * U(i, i) + U(j, j) * U(j, j);\n                        double snew = U(i, j) * U(i, j) + U(j, i) * U(j, i);\n                        if (snew > sold) {\n                            tensorT tmp = copy(U(_, i));\n                            U(_, i) = U(_, j);\n                            U(_, j) = tmp;\n                            switched = true;\n                        }\n                    }\n                }\n            }\n        }\n\n        // Fix phases.\n        for (long i = 0; i < nmo; ++i) {\n            if (U(i, i) < 0.0)\n                U(_, i).scale(-1.0);\n        }\n\n    }\n\n    world.gop.broadcast(U.ptr(), U.size(), 0);\n\n    DistributedMatrix<double> dUT = column_distributed_matrix<double>(world, nmo, nmo);\n    dUT.copy_from_replicated(transpose(U));\n\n    return dUT;\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nDistributedMatrix<T> Localizer::localize_PM(World& world, const std::vector<Function<T, NDIM>>& mo,\n                                            const std::vector<int>& set, const double thresh,\n                                            const bool randomize, const bool doprint) const {\n\n    DistributedMatrix<T> dUT = distributed_localize_PM(world, mo, ao, set, at_to_bf, at_nbf,\n                                                       thresh, thetamax, randomize, doprint);\n    return dUT;\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nDistributedMatrix<T> Localizer::localize_new(World& world, const std::vector<Function<T, NDIM>>& mo,\n                                             const std::vector<int>& set, double thresh,\n                                             const bool randomize, const bool doprint) const {\n    // PROFILE_MEMBER_FUNC(SCF);\n    typedef Tensor<T> tensorT;\n\n    int nmo = mo.size();\n    int nao = ao.size();\n\n    tensorT C = matrix_inner(world, mo, ao);\n    std::vector<int> at_to_bf, at_nbf; // OVERRIDE DATA IN CLASS OBJ TO USE ATOMS OR SHELLS FOR TESTING\n\n    bool use_atomic_evecs = true;\n    if (use_atomic_evecs) {\n        // Transform from AOs to orthonormal atomic eigenfunctions\n        int ilo = 0;\n        for (size_t iat = 0; iat < molecule.natom(); ++iat) {\n            const tensorT& avec = aobasis.get_avec(molecule, iat);\n            int ihi = ilo + avec.dim(1);\n            Slice s(ilo, ihi - 1);\n            C(_, s) = inner(C(_, s), avec);\n\n            // This commented out code would put each shell (s, p, d, etc.) into a separate set, however this\n            // led to delocalized valence orbitals due to the inability to localize hybrid orbitals (e.g., sp3)\n            // into a single set.  The initial workaround was to put the 1s core orbital into one set, and\n            // everything else into a second.  However, this was not optimal for heavier atoms.  So now for\n            // atoms with Z>=12 (Mg and beyond) we separate out the 2s+p sets.\n\n            // // generate shell dimensions for atomic eigenfunctions\n            // // ... this relies upon spherical symmetry being enforced\n            // // when making atomic states\n            // const tensorT& aeps = aobasis.get_aeps(molecule, iat);\n            // //print(aeps);\n            // double prev = aeps(0L);\n            // int start = 0;\n            // int i; // used after loop\n            // for (i = 0; i < aeps.dim(0); ++i) {\n            //     //print(\" ... \", i, prev, aeps(i), (std::abs(aeps(i)-prev) > 1e-2*std::abs(prev)));\n            //     if (std::abs(aeps(i) - prev) > 1e-2 * std::abs(prev)) {\n            //         at_to_bf.push_back(ilo + start);\n            //         at_nbf.push_back(i - start);\n            //         //print(\"    \", start, i-start);\n            //         start = i;\n            //     }\n            //     prev = aeps(i);\n            // }\n            // at_to_bf.push_back(ilo + start);\n            // at_nbf.push_back(i - start);\n            // //print(\"    \", start, i-start);\n\n            at_to_bf.push_back(ilo);\n            at_nbf.push_back(1); // 1s core orbital on atom\n            if (molecule.get_atomic_number(iat) < 12) {\n                // For lighter atoms everything else put into one set\n                if (avec.dim(1) > 1) {\n                    at_to_bf.push_back(ilo + 1);\n                    at_nbf.push_back(avec.dim(1) - 1);\n                }\n            }\n            else {            \n                // For heavier atoms separate out 2s2p\n                at_to_bf.push_back(ilo+1);\n                at_nbf.push_back(4);\n                if (avec.dim(1) > 5) {\n                    at_to_bf.push_back(ilo + 5);\n                    at_nbf.push_back(avec.dim(1) - 5);\n                }\n            }\n\n            ilo = ihi;\n        }\n        MADNESS_ASSERT(ilo == nao);\n        MADNESS_ASSERT(std::accumulate(at_nbf.begin(), at_nbf.end(), 0) == nao);\n//        MADNESS_ASSERT(at_to_bf.back() + at_nbf.back() == nao);\n        //print(\"newloc\", at_to_bf, at_nbf);\n    } else {\n        aobasis.shells_to_bfn(molecule, at_to_bf, at_nbf);\n        //aobasis.atoms_to_bfn(molecule, at_to_bf, at_nbf);\n    }\n\n    // Below here atoms may be shells or atoms --- by default shells\n\n    int natom = at_to_bf.size();\n\n    tensorT U(nmo, nmo);\n    for (int i = 0; i < nmo; ++i) U(i, i) = 1.0;\n\n\n    default_random_generator.setstate(\n            182041 + world.rank() * 10101); // To help with reproducibility for debugging, etc.\n\n    if (world.rank() == 0) {\n        //MKL_Set_Num_Threads_Local(16);\n\n        tensorT Q(nmo, natom);\n        double breaksym = 0.0; // was 1e-3;\n        auto QQ = [&at_to_bf, &at_nbf, &breaksym](const tensorT& C, int i, int j, int a) -> double {\n            int lo = at_to_bf[a], nbf = at_nbf[a];\n            const double *Ci = &C(i, lo);\n            const double *Cj = &C(j, lo);\n            double qij = 0.0;\n            for (int mu = 0; mu < nbf; ++mu) qij += Ci[mu] * Cj[mu];\n            return qij * (1.0 + breaksym * a); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! break symmetry\n        };\n\n        auto makeGW = [&Q, &nmo, &natom, &QQ](const tensorT& C, double& W, tensorT& g) -> void {\n            W = 0.0;\n            for (int i = 0; i < nmo; ++i) {\n                for (int a = 0; a < natom; ++a) {\n                    Q(i, a) = QQ(C, i, i, a);\n                    W += Q(i, a) * Q(i, a);\n                }\n            }\n\n            for (int i = 0; i < nmo; ++i) {\n                for (int j = 0; j < i; ++j) {\n                    double Qiiij = 0.0, Qijjj = 0.0;\n                    for (int a = 0; a < natom; ++a) {\n                        double Qija = QQ(C, i, j, a);\n                        Qijjj += Qija * Q(j, a);\n                        Qiiij += Qija * Q(i, a);\n                    }\n                    g(j, i) = Qiiij - Qijjj;\n                    g(i, j) = -g(j, i);\n                }\n            }\n        };\n\n        tensorT xprev; // previous search direction\n        tensorT gprev; // previous gradient\n        bool rprev = true; // if true previous iteration restricted step or did incomplete search (so don't do conjugate)\n        const int N = (nmo * (nmo - 1)) / 2; // number of independent variables\n        for (int iter = 0; iter < 1200; ++iter) {\n            tensorT g(nmo, nmo);\n            double W;\n\n            makeGW(C, W, g);\n\n            if (randomize && iter == 0) {\n                for (int i = 0; i < nmo; ++i) {\n                    for (int j = 0; j < i; ++j) {\n                        g(i, j) += 0.1 * (RandomValue<double>() - 0.5);\n                        g(j, i) = -g(i, j);\n                    }\n                }\n            }\n\n            double maxg = g.absmax();\n            if (doprint) printf(\"iteration %d W=%.8f maxg=%.2e\\n\", iter, W, maxg);\n            if (maxg < thresh) break;\n\n            // construct search direction using conjugate gradient approach\n            tensorT x = copy(g);\n            if (!rprev) { // Only apply conjugacy if did LS with real gradient\n                double gamma = g.trace(g - gprev) / gprev.trace(gprev);\n                if (doprint) print(\"gamma\", gamma);\n                x.gaxpy(1.0, xprev, gamma);\n            }\n\n            // Perform the line search.\n            rprev = false;\n            double dxgrad = x.trace(g) * 2.0;  // 2*2 = 4 which should be prefactor on integrals in gradient\n            if (dxgrad < 0 || ((iter + 1) % N) == 0) {\n                if (doprint) print(\"resetting since dxgrad -ve or due to dimension\", dxgrad, iter, N);\n                x = copy(g);\n                dxgrad = x.trace(g) * 2.0;\n            }\n            xprev = x; // Save for next iteration\n            gprev = copy(g);\n\n            double mu = 0.05 / std::max(0.1,\n                                        maxg); // Take larger inital step (was 0.01), and restrict intial step mu by size of max gradient\n            tensorT dU = matrix_exponential(x * mu);\n            tensorT newC = inner(dU, C, 0, 0);\n            double newW;\n            makeGW(newC, newW, g);\n            double dxgnew = x.trace(g) * 2.0;\n\n            if (randomize && iter == 0) {\n                rprev = true; // since did not use real gradient\n            } else { // perform quadratic fit using f(0), df(0)/dx=dxgrad, f(mu) --- actually now use f(0), df(0)/dx, df(mu)/dx for better accuracy\n                double f0 = W;\n                double f1 = newW;\n                //double hess = 2.0*(f1-f0-mu*dxgrad)/(mu*mu);\n                double hess = (dxgnew - dxgrad) / mu; // Near convergence this is more accurate\n                if (hess >= 0) {\n                    if (doprint) print(\"+ve hessian\", hess);\n                    hess = -2.0 * dxgrad; // force a bigish step to get out of bad region\n                    rprev = true; // since did not do line search\n                }\n                double mu2 = -dxgrad / hess;\n                if (mu2 * maxg > 0.25) {\n                    mu2 = 0.25 / maxg; // pi/6 = 0.524, pi/4=0.785\n                    rprev = true; // since did not do line search\n                }\n                double f2p = f0 + dxgrad * mu2 + 0.5 * hess * mu2 * mu2;\n                if (doprint) print(f0, f1, f0 - f1, f2p, \"dxg\", dxgrad, \"hess\", hess, \"mu\", mu, \"mu2\", mu2);\n                mu = mu2;\n            }\n\n            // if (maxg < 10 * thresh) {\n            //     breaksym = 0.0; // was 1e-5;\n            //     rprev = true; // since just messed up the gradient\n            // }\n\n            dU = matrix_exponential(x * mu);\n            U = inner(U, dU, 1, 0);\n            C = inner(dU, C, 0, 0);\n        }\n        bool switched = true;\n        while (switched) {\n            switched = false;\n            for (int i = 0; i < nmo; i++) {\n                for (int j = i + 1; j < nmo; j++) {\n                    if (set[i] == set[j]) {\n                        double sold = U(i, i) * U(i, i) + U(j, j) * U(j, j);\n                        double snew = U(i, j) * U(i, j) + U(j, i) * U(j, i);\n                        if (snew > sold) {\n                            tensorT tmp = copy(U(_, i));\n                            U(_, i) = U(_, j);\n                            U(_, j) = tmp;\n                            switched = true;\n                        }\n                    }\n                }\n            }\n        }\n\n        // Fix phases.\n        for (int i = 0; i < nmo; ++i) {\n            if (U(i, i) < 0.0)\n                U(_, i).scale(-1.0);\n        }\n        //MKL_Set_Num_Threads_Local(1);\n    }\n    //done:\n    world.gop.broadcast(U.ptr(), U.size(), 0);\n\n    DistributedMatrix<double> dUT = column_distributed_matrix<double>(world, nmo, nmo);\n    dUT.copy_from_replicated(transpose(U));\n\n    // distmatT dUT = distributed_localize_PM(world, mo, ao, set, at_to_bf, at_nbf,\n    //                                        thresh, thetamax, randomize, doprint);\n    //print(UT);\n    return dUT;\n}\n\ntemplate<typename T>\nstd::size_t Localizer::determine_frozen_orbitals(const Tensor<T> fmat) {\n\n    // freezing based on canonical orbital energies\n    Tensor<double> eps;\n    if (fmat.ndim()==2) {\n        auto [eval, evec] = syev(fmat);\n        eps=real(eval);\n    } else {\n        MADNESS_CHECK(fmat.ndim()==1);\n        eps=real(fmat);\n    }\n\n    std::vector<Function<T,3>> vec(eps.size());\n    MolecularOrbitals<T, 3> dummy_mo(vec, eps);\n    dummy_mo.recompute_localize_sets();\n    auto s = MolecularOrbitals<double, 3>::convert_set_to_slice(dummy_mo.get_localize_sets());\n\n    long nactive = s.back().end - s.back().start + 1;\n    long nfrozen = dummy_mo.get_mos().size() - nactive;\n\n    if (not Localizer::check_frozen_consistency(nfrozen,dummy_mo.get_localize_sets())) {\n        dummy_mo.pretty_print(\"mos\");\n        print(\"nfrozen\", nfrozen);\n        MADNESS_EXCEPTION(\"inconsistent number of frozen orbitals\",1);\n    };\n\n    return nfrozen;\n}\n\nbool Localizer::check_frozen_consistency(const long nfrozen, const std::vector<int>& localize_sets) {\n\n    // fast return\n    if (nfrozen==0) return true;\n\n    // check that freeze is consistent with the core/valence block-diagonal structure of the fock matrix\n    bool fine = false;\n    int ntotal = 0;\n    std::vector<Slice> slices = MolecularOrbitals<double, 3>::convert_set_to_slice(localize_sets);\n    for (std::size_t i = 0; i < slices.size(); ++i) {\n        const Slice& s = slices[i];\n        int n_in_set = s.end - s.start + 1;\n        ntotal += n_in_set;\n        if (nfrozen == ntotal) {\n            fine = true;\n            break;\n        }\n    }\n    return fine;\n}\n\n/// given a unitary transformation matrix undo mere reordering\ntemplate<typename T>\nvoid Localizer::undo_reordering(Tensor<T>& U, const Tensor<double>& occ, Tensor<double>& evals) {\n    long nmo = U.dim(0);\n\n    // Within blocks with the same occupation number attempt to\n    // keep orbitals in the same order (to avoid confusing the\n    // non-linear solver).\n    // !!!!!!!!!!!!!!!!! NEED TO RESTRICT TO OCCUPIED STATES?\n    bool switched = true;\n    while (switched) {\n        switched = false;\n        for (int i = 0; i < nmo; i++) {\n            for (int j = i + 1; j < nmo; j++) {\n                if (occ(i) == occ(j)) {\n//                    double sold = std::abs(U(i, i) * U(i, i) + U(j, j) * U(j, j));\n//                    double snew = std::abs(U(i, j) * U(i, j) + U(j, i) * U(j, i));\n                    double sold = std::real(U(i,i)*std::conj(U(i,i))) + std::real(U(j,j)*std::conj(U(j,j)));\n                    double snew = std::real(U(i,j)*std::conj(U(i,j))) + std::real(U(j,i)*std::conj(U(j,i)));\n                    if (snew > sold) {\n                        Tensor<T> tmp = copy(U(_, i));\n                        U(_, i) = U(_, j);\n                        U(_, j) = tmp;\n                        std::swap(evals[i], evals[j]);\n                        switched = true;\n                    }\n                }\n            }\n        }\n    }\n\n    // Fix phases.\n//    for (long i = 0; i < nmo; ++i)\n//        if (std::real(U(i, i)) < 0.0)\n//            U(_, i).scale(-1.0);\n\n    for (long i = 0; i < nmo; ++i) U(_, i).scale(conditional_conj(U(i,i))/std::abs(U(i,i)));\n\n}\n\n\nstd::vector<Slice> Localizer::find_degenerate_blocks(const Tensor<double>& eval, const double thresh_degenerate) {\n    long nmo = eval.size();\n    std::vector<Slice> blocks;\n    // Rotations between effectively degenerate states confound\n    // the non-linear equation solver ... undo these rotations\n    long ilo = 0; // first element of cluster\n    while (ilo < nmo - 1) {\n        long ihi = ilo;\n        while (fabs(eval[ilo] - eval[ihi + 1])\n               < thresh_degenerate * 10.0 * std::max(fabs(eval[ilo]), 1.0)) {\n            ++ihi;\n            if (ihi == nmo - 1)\n                break;\n        }\n        blocks.push_back(Slice(ilo, ihi));\n        ilo = ihi + 1;\n    }\n    return blocks;\n}\n\ntemplate<typename T>\nTensor<T> Localizer::undo_rotation(const Tensor<T>& U_in, const std::vector<Slice>& blocks) {\n    Tensor<T> U = copy(U_in);\n    for (auto block: blocks) {\n        long ncluster = block.end - block.start + 1;\n        if (ncluster > 1) {\n            Tensor<T> q = copy(U(block, block));\n\n            // Polar Decomposition\n            Tensor<T> VH(ncluster, ncluster);\n            Tensor<T> W(ncluster, ncluster);\n            Tensor<double> sigma(ncluster);\n\n            svd(q, W, sigma, VH);\n            q = transpose(inner(W, VH)).conj();\n            U(_, block) = inner(U(_, block), q);\n        }\n    }\n    return U;\n}\n\ntemplate<typename T>\nvoid Localizer::undo_rotations_within_sets(Tensor<T>& U, const std::vector<int>& localized_set) {\n    std::vector<Slice> blocks = MolecularOrbitals<T, 3>::convert_set_to_slice(localized_set);\n//    for (auto block : blocks) print(\"block\",block);\n    U = undo_rotation(U, blocks);\n}\n\n/// given a unitary transformation matrix undo rotations between degenerate columns\ntemplate<typename T>\nvoid Localizer::undo_degenerate_rotations(Tensor<T>& U, const Tensor<double>& evals, const double thresh_degenerate) {\n    MADNESS_CHECK(evals.size() == U.dim(0));\n    std::vector<Slice> degenerate_blocks = find_degenerate_blocks(evals, thresh_degenerate);\n    U = undo_rotation(U, degenerate_blocks);\n}\n\n\ntemplate<typename T>\nTensor<T> Localizer::matrix_exponential(const Tensor<T>& A) const {\n    MADNESS_CHECK(A.dim(0) == A.dim(1));\n    typedef Tensor<T> tensorT;\n\n    // Power iteration to estimate the 2-norm of the matrix. Used\n    // to use Frobenius or 1-norms but neither were very tight.\n    double anorm;\n    {\n        tensorT x(A.dim(0));\n        x.fillrandom();\n        x.scale(1.0 / x.normf());\n        double prev = 0.0;\n        for (int i = 0; i < 100; i++) {\n            tensorT xnew = inner(A, inner(A, x, 1, 0), 0, 0);\n            anorm = std::sqrt(std::abs((x.trace(xnew))));\n            double err = std::abs(prev - anorm) / anorm;\n            //print(i,anorm,err,A.normf());\n            if (err < 0.01) break; // just need 1-2 digits\n            x = xnew.scale(1.0 / xnew.normf());\n            prev = anorm;\n        }\n    }\n\n    // Scale A by a power of 2 until it is \"small\"\n    int n = 0;\n    double scale = 1.0;\n    while (anorm * scale > 0.089) { // so that 9th order expansion is accurate to 1e-15\n        ++n;\n        scale *= 0.5;\n    }\n    tensorT B = scale * A;    // B = A*2^-n\n\n    // Make identity\n    tensorT I = tensorT(2, B.dims());\n    for (int i = 0; i < I.dim(0); ++i) I(i, i) = 1.0;\n\n    // Compute exp(B) using Taylor series optimized to reduce cost --- Chebyshev is only a minor improvement\n    tensorT expB;\n    if (anorm > 0.24e-1) {\n        tensorT B2 = inner(B, B);\n        tensorT B4 = inner(B2, B2);\n        tensorT B6 = inner(B4, B2);\n        expB = I + inner(B, B6 + 42. * B4 + 840. * B2 + 5040. * I).scale(1. / 5040.) +\n               inner(B2, B6 + 56. * B4 + 1680. * B2 + 20160. * I).scale(1. / 40320.);\n    } else if (anorm > 0.26e-2) {\n        tensorT B2 = inner(B, B);\n        tensorT B4 = inner(B2, B2);\n        expB = I + inner(B, 42. * B4 + 840. * B2 + 5040. * I).scale(1. / 5040.) +\n               inner(B2, 56. * B4 + 1680. * B2 + 20160. * I).scale(1. / 40320.);\n    } else if (anorm > 0.18e-4) {\n        tensorT B2 = inner(B, B);\n        expB = I + inner(B, 840. * B2 + 5040. * I).scale(1. / 5040.) +\n               inner(B2, 1680. * B2 + 20160. * I).scale(1. / 40320.);\n    } else if (anorm > 4.5e-8) {\n        expB = I + B + inner(B, B).scale(0.5);\n    } else {\n        expB = I + B;\n    }\n\n    // // Old algorithm\n    // tensorT oldexpB = copy(I);\n    // const double tol = 1e-13;\n    // int k = 1;\n    // tensorT term = B;\n    // while (term.normf() > tol) {\n    //     oldexpB += term;\n    //     term = inner(term, B);\n    //     ++k;\n    //     term.scale(1.0 / k);\n    // }\n    // Error check for validation\n    // double err = (expB-oldexpB).normf();\n    // print(\"matxerr\", anorm, err);\n\n    // Repeatedly square to recover exp(A)\n    while (n--) expB = inner(expB, expB);\n\n    return expB;\n}\n\n\ntemplate\nMolecularOrbitals<double, 3> Localizer::localize(const MolecularOrbitals<double, 3>& mo_in, bool randomize) const;\n\ntemplate\nMolecularOrbitals<double, 3> Localizer::localize(const MolecularOrbitals<double, 3>& mo_in, const Tensor<double>& Fock,\n                                                 bool randomize) const;\n\ntemplate\nstd::size_t Localizer::determine_frozen_orbitals(const Tensor<double> fmat);\n\ntemplate\nstd::size_t Localizer::determine_frozen_orbitals(const Tensor<double_complex> fmat);\n\ntemplate\nMolecularOrbitals<double, 3> Localizer::separate_core_valence(const MolecularOrbitals<double, 3>& mo_in,\n                                                            const Tensor<double>& Fock) const;\n\n//template\n//MolecularOrbitals<double_complex, 3> Localizer::separate_core_valence(const MolecularOrbitals<double_complex, 3>& mo_in,\n//                                                              const Tensor<double_complex>& Fock) const;\n\ntemplate\nbool Localizer::check_core_valence_separation(const Tensor<double>& Fock, const std::vector<int>& localized_set,\n                                              const bool silent);\n\ntemplate\nvoid\nLocalizer::undo_degenerate_rotations(Tensor<double>& U, const Tensor<double>& evals, const double thresh_degenerate);\n\ntemplate\nvoid\nLocalizer::undo_degenerate_rotations(Tensor<double_complex>& U, const Tensor<double>& evals, const double thresh_degenerate);\n\ntemplate\nvoid\nLocalizer::undo_reordering(Tensor<double>& U, const Tensor<double>& occ, Tensor<double>& eval);\n\ntemplate\nvoid\nLocalizer::undo_reordering(Tensor<double_complex>& U, const Tensor<double>& occ, Tensor<double>& eval);\n\n}  // namespace madness\n"
  },
  {
    "path": "src/madness/chem/localizer.h",
    "content": "//\n// Created by Florian Bischoff on 11/1/21.\n//\n\n#ifndef MADNESS_LOCALIZER_H\n#define MADNESS_LOCALIZER_H\n\n#include<madness/chem/MolecularOrbitals.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/chem/molecule.h>\n#include <madness/tensor/distributed_matrix.h>\n#include<madness/mra/mra.h>\n#include<madness/chem/distpm.h>\n\n\nnamespace madness {\n\nclass SCF;\n\n//template<typename T, std::size_t NDIM>\nclass Localizer {\npublic:\n\n    Localizer() = default;\n\n    Localizer(World& world, const AtomicBasisSet& aobasis, const Molecule& molecule,\n              const std::vector<Function<double, 3>>& ao);\n\n    Localizer& set_method(const std::string method1) {\n        method=method1;\n        return *this;\n    }\n\n    std::string get_method() {\n        return method;\n    }\n\n    Localizer& set_metric(const Function<double,3>& R) {\n        metric=copy(R);\n        return *this;\n    }\n\n    Localizer& set_enforce_core_valence_separation(const bool value) {\n        enforce_core_valence_separation=value;\n        return *this;\n    }\n\n    AtomicBasisSet get_aobasis() const {\n        return aobasis;\n    }\n\n    void print_info() const {\n        print(\"Localizer info\");\n        print(\"method  \",method);\n        print(\"aobasis \",aobasis.get_name());\n        print(\"metric  \", metric.is_initialized());\n        print(\"core-valence separation \",enforce_core_valence_separation);\n        print(\"thresh_degenerate \",thresh_degenerate);\n    }\n\n    /// localize the orbitals\n    template<typename T, std::size_t NDIM>\n    MolecularOrbitals<T, NDIM> localize(const MolecularOrbitals<T, NDIM>& mo_in, bool randomize) const;\n\n    /// localize the orbitals, possibly enforce core-valence separation\n    template<typename T, std::size_t NDIM>\n    MolecularOrbitals<T, NDIM> localize(const MolecularOrbitals<T, NDIM>& mo_in, const Tensor<T>& Fock,\n                                        bool randomize) const;\n\n    template<typename T, std::size_t NDIM>\n    MolecularOrbitals<T, NDIM> separate_core_valence(const MolecularOrbitals<T, NDIM>& mo_in, const Tensor<T>& Fock) const;\n\n    template<typename T, std::size_t NDIM>\n    Tensor<T> compute_localization_matrix(World& world, const MolecularOrbitals<T, NDIM>& mo_in, bool randomize) const;\n\n    /// localize orbitals while enforcing core-valence separation\n\n    /// @param[in]  World   the world\n    /// @param[in]  mo_in   the input orbitals\n    /// @param[in]  Fock    the Fock matrix for canonicalizing the orbitals first\n    /// @param[in]  method  the localization method\n    /// @param[in]  tolloc  localization tolerance\n    /// @param[in]  randomize   initially randomize the localization procedure\n    template<typename T, std::size_t NDIM>\n    Tensor<T> compute_core_valence_separation_transformation_matrix(World& world,\n                                        const MolecularOrbitals<T, NDIM>& mo_in, const Tensor<T>& Fock) const;\n\n    template<typename T>\n    static bool check_core_valence_separation(const Tensor<T>& Fock, const std::vector<int>& localized_set,\n                                              const bool silent=false);\n\n    template<typename T>\n    static std::size_t determine_frozen_orbitals(const Tensor<T> fmat);\n\n    static bool check_frozen_consistency(const long nfrozen, const std::vector<int>& localize_sets);\n\n        /// given a unitary transformation matrix undo mere reordering\n    template<typename T>\n    static void undo_reordering(Tensor<T>& U, const Tensor<double>& occ) {\n        Tensor<double> eval(U.dim(0)); // dummy tensor\n        undo_reordering(U,occ,eval);\n    }\n\n    /// given a unitary transformation matrix undo mere reordering\n    template<typename T>\n    static void undo_reordering(Tensor<T>& U, const Tensor<double>& occ, Tensor<double>& eval);\n\n    /// given a unitary transformation matrix undo rotations between degenerate columns\n    template<typename T>\n    static void undo_degenerate_rotations(Tensor<T>& U, const Tensor<double>& eval, const double thresh_degenerate);\n\n    /// given a unitary transformation matrix undo rotations within blocks of localized orbitals\n    template<typename T>\n    static void undo_rotations_within_sets(Tensor<T>& U, const std::vector<int>& localized_set);\n\n    /// find sets of degenerate states/orbitals\n    static std::vector<Slice> find_degenerate_blocks(const Tensor<double>& eval, const double thresh_degenerate);\n\n    /// given a unitary transformation matrix undo the rotations within the blocks\n    template<typename T>\n    static Tensor<T> undo_rotation(const Tensor<T>& U_in, const std::vector<Slice>& blocks);\n\nprivate:\n\n    template<typename T, std::size_t NDIM>\n    DistributedMatrix<T>\n    localize_PM(World& world, const std::vector<Function<T, NDIM>>& mo, const std::vector<int>& set,\n                const double thresh = 1e-9, const bool randomize = true, const bool doprint = false) const;\n\n    template<typename T, std::size_t NDIM>\n    DistributedMatrix<T> localize_boys(World& world,\n                                       const std::vector<Function<T, NDIM>>& mo,\n                                       const std::vector<int>& set,\n                                       const double thresh = 1e-9,\n                                       const bool randomize = true,\n                                       const bool doprint = false) const;\n\n    template<typename T, std::size_t NDIM>\n    DistributedMatrix<T> localize_new(World& world,\n                                      const std::vector<Function<T, NDIM>>& mo,\n                                      const std::vector<int>& set,\n                                      const double thresh = 1e-9,\n                                      const bool randomize = true,\n                                      const bool doprint = false) const;\n\n    template<typename T>\n    inline double DIP(const Tensor<T>& dip, int i, int j, int k, int l) const {\n        return dip(i, j, 0) * dip(k, l, 0) + dip(i, j, 1) * dip(k, l, 1) + dip(i, j, 2) * dip(k, l, 2);\n    }\n\n    template<typename T>\n    Tensor<T> matrix_exponential(const Tensor<T>& A) const;\n\n\n    std::vector<int> at_to_bf, at_nbf;  /// map atoms to basis functions in the \"new\" algorithm\n    AtomicBasisSet aobasis;             ///\n    Molecule molecule;\n    std::vector<Function<double, 3>> ao;\n    Function<double,3> metric;       /// =R for computing matrix elements of operators\n    double thetamax=0.1;                /// maximum rotation(?)\n    const double tolloc = 1e-6; // was std::min(1e-6,0.01*dconv) but now trying to avoid unnecessary change\n    double thresh_degenerate;           /// when are orbitals degenerate\n    bool enforce_core_valence_separation=false;  /// no rotations between core and valence orbitals (distinguished by 'set')\n    std::string method=\"new\";           /// localization method\n\n};\n\n}\n\n#endif //MADNESS_LOCALIZER_H\n"
  },
  {
    "path": "src/madness/chem/lowrankfunction.h",
    "content": "//\n// Created by Florian Bischoff on 8/10/23.\n//\n\n#ifndef MADNESS_LOWRANKFUNCTION_H\n#define MADNESS_LOWRANKFUNCTION_H\n\n\n#include<madness/mra/mra.h>\n#include<madness/mra/vmra.h>\n#include<madness/world/timing_utilities.h>\n#include<madness/chem/electronic_correlation_factor.h>\n#include<madness/chem/IntegratorXX.h>\n#include <random>\n\n\n\nnamespace madness {\n\n    struct LowRankFunctionParameters : QCCalculationParametersBase {\n\n        LowRankFunctionParameters() : QCCalculationParametersBase() {\n\n            // initialize with: key, value, comment (optional), allowed values (optional)\n            initialize<double>(\"radius\",2.0,\"the radius\");\n            initialize<double>(\"gamma\",1.0,\"the exponent of the correlation factor\");\n            initialize<double>(\"volume_element\",0.1,\"volume covered by each grid point\");\n            initialize<double>(\"tol\",1.e-8,\"rank-reduced cholesky tolerance\");\n            initialize<std::string>(\"f12type\",\"Slater\",\"correlation factor\",{\"Slater\",\"SlaterF12\"});\n            initialize<std::string>(\"orthomethod\",\"cholesky\",\"orthonormalization\",{\"cholesky\",\"canonical\",\"symmetric\"});\n            initialize<std::string>(\"transpose\",\"slater2\",\"transpose of the matrix\",{\"slater1\",\"slater2\"});\n            initialize<std::string>(\"gridtype\",\"random\",\"the grid type\",{\"random\",\"cartesian\",\"dftgrid\"});\n            initialize<std::string>(\"rhsfunctiontype\",\"exponential\",\"the type of function\",{\"exponential\"});\n            initialize<int>(\"optimize\",1,\"number of optimization iterations\");\n        }\n        std::string get_tag() const override {\n            return std::string(\"lrf\");\n        }\n\n\n        void read_and_set_derived_values(World& world, const commandlineparser& parser, std::string tag) {\n            read_input_and_commandline_options(world,parser,tag);\n        }\n\n        double radius() const {return get<double>(\"radius\");}\n        double gamma() const {return get<double>(\"gamma\");}\n        double volume_element() const {return get<double>(\"volume_element\");}\n        double tol() const {return get<double>(\"tol\");}\n        int optimize() const {return get<int>(\"optimize\");}\n        std::string gridtype() const {return get<std::string>(\"gridtype\");}\n        std::string orthomethod() const {return get<std::string>(\"orthomethod\");}\n        std::string rhsfunctiontype() const {return get<std::string>(\"rhsfunctiontype\");}\n        std::string f12type() const {return get<std::string>(\"f12type\");}\n    };\n\n\n    class gridbase {\n    public:\n        double get_volume_element() const {return volume_element;}\n        double get_radius() const {return radius;}\n\n        virtual ~gridbase() = default;\n        // visualize the grid in xyz format\n        template<std::size_t NDIM>\n        void visualize(const std::string filename, const std::vector<Vector<double,NDIM>>& grid) const {\n            print(\"visualizing grid to file\",filename);\n            print(\"a total of\",grid.size(),\"grid points\");\n            std::ofstream file(filename);\n            for (const auto& r : grid) {\n                // formatted output\n                file << std::fixed << std::setprecision(6);\n                for (int i=0; i<NDIM; ++i) file << r[i] << \" \";\n                file << std::endl;\n            }\n            file.close();\n        }\n\n    protected:\n        double volume_element=0.1;\n        double radius=3;\n        bool do_print=false;\n    };\n\n    template<std::size_t NDIM>\n    class dftgrid : public gridbase {\n    public:\n        GridBuilder builder;\n        explicit dftgrid(const double volume_element, const double radius) {\n            // increase number of radial grid points until the volume element is below the threshold\n            double current_ve=1.0;\n            std::size_t nradial=10;\n            while (current_ve>volume_element) {\n                nradial+=10;\n                print(\"trying nradial\",nradial);\n                GridBuilder tmp;\n                tmp.set_angular_order(7);\n                tmp.set_nradial(nradial);\n                tmp.make_grid();\n                double volume=4./3. *M_PI * std::pow(radius,3.0);\n                auto npoints=tmp.get_points().size();\n                current_ve=volume/npoints;\n                print(\"volume, npoints, volume element\",volume,npoints,current_ve);\n            }\n            builder.set_nradial(nradial);\n            builder.set_angular_order(7);\n        }\n\n\n        explicit dftgrid(const std::size_t nradial, const std::size_t angular_order, const coord_3d origin=coord_3d()) {\n            static_assert(NDIM==3,\"DFT Grids only defined for NDIM=3\");\n            builder.set_nradial(nradial);\n            builder.set_angular_order(angular_order);\n            builder.set_origin(origin);\n            builder.make_grid();\n        }\n\n        std::vector<Vector<double,NDIM>> get_grid() const {\n            return builder.get_points();\n        }\n\n    };\n\n    /// grid with random points around the origin, with a Gaussian distribution\n    template<std::size_t NDIM>\n    class randomgrid : public gridbase {\n    public:\n        randomgrid(const double volume_element, const double radius, const Vector<double,NDIM> origin=Vector<double,NDIM>(0.0))\n            : gridbase(), origin(origin) {\n            this->volume_element=volume_element;\n            this->radius=radius;\n        }\n\n        std::vector<Vector<double,NDIM>> get_grid() const {\n            std::vector<Vector<double, NDIM>> grid;\n            long npoint_within_volume=volume()/volume_element;\n            if (do_print) print(\"npoint_within_volume\",npoint_within_volume);\n\n            auto cell = FunctionDefaults<NDIM>::get_cell();\n            auto is_in_cell = [&cell](const Vector<double, NDIM>& r) {\n                for (size_t d = 0; d < NDIM; ++d) if (r[d] < cell(d, 0) or r[d] > cell(d, 1)) return false;\n                return true;\n            };\n            double rad=radius;\n            auto o=origin;\n            auto is_in_sphere = [&rad,&o](const Vector<double, NDIM>& r) {\n                return ((r-o).normf()<rad);\n            };\n\n            // set variance such that about 70% of all grid points sits within the radius\n            double variance=radius;\n            if (NDIM==2) variance=0.6*radius;\n            if (NDIM==3) variance=0.5*radius;\n            long maxrank=10*npoint_within_volume;\n            long rank=0;\n            for (int r=0; r<maxrank; ++r) {\n                auto tmp = gaussian_random_distribution(origin, variance);\n                if (not is_in_cell(tmp)) continue;\n                if (is_in_sphere(tmp)) ++rank;\n                grid.push_back(tmp);\n                if (rank==npoint_within_volume) break;\n            }\n            if (do_print) {\n                print(\"origin                \",origin);\n                print(\"radius                \",radius);\n                print(\"grid points in volume \",rank);\n                print(\"total grid points     \",grid.size());\n                print(\"ratio                 \",rank/double(grid.size()));\n                print(\"volume element        \",volume()/rank);\n            }\n            return grid;\n        }\n\n        Vector<double,NDIM> get_origin() const {\n            return origin;\n        }\n\n    private:\n\n        double volume() const {\n            MADNESS_CHECK(NDIM>0 and NDIM<4);\n            if (NDIM==1) return 2.0*radius;\n            if (NDIM==2) return constants::pi*radius*radius;\n            if (NDIM==3) return 4.0 / 3.0 * constants::pi * std::pow(radius, 3.0);\n        }\n\n        static Vector<double,NDIM> gaussian_random_distribution(const Vector<double,NDIM> origin, double variance) {\n            std::random_device rd{};\n            std::mt19937 gen{rd()};\n            Vector<double,NDIM> result;\n            for (size_t i = 0; i < NDIM; ++i) {\n                std::normal_distribution<> d{origin[i], variance};\n                result[i]=d(gen);\n            }\n\n            return result;\n        }\n\n        Vector<double,NDIM> origin;\n\n    };\n\n    template<std::size_t NDIM>\n    struct cartesian_grid {\n        Vector<double,NDIM> lovec,hivec;\n        std::vector<long> stride;\n        long index=0;\n        long n_per_dim;\n        long total_n;\n        Vector<double,NDIM> increment;\n\n        cartesian_grid(const double volume_per_gridpoint, const double radius) {\n            double length_per_gridpoint=std::pow(volume_per_gridpoint,1.0/NDIM);\n            n_per_dim=ceil(2.0*radius/length_per_gridpoint);\n            print(\"length per gridpoint, n_per_dim\",length_per_gridpoint,n_per_dim);\n            print(\"volume_per_gridpoint\",std::pow(length_per_gridpoint,NDIM));\n            initialize(-radius,radius);\n            print(\"increment\",increment);\n        }\n\n\n        cartesian_grid(const long n_per_dim, const double lo, const double hi)\n                : n_per_dim(n_per_dim) {\n            initialize(lo,hi);\n        }\n\n        cartesian_grid(const cartesian_grid<NDIM>& other) : lovec(other.lovec),\n                                                            hivec(other.hivec), stride(other.stride), index(0), n_per_dim(other.n_per_dim),\n                                                            total_n(other.total_n), increment(other.increment) {\n        }\n\n        cartesian_grid& operator=(const cartesian_grid<NDIM>& other) {\n            cartesian_grid<NDIM> tmp(other);\n            std::swap(*this,other);\n            return *this;\n        }\n\n        void initialize(const double lo, const double hi) {\n            lovec.fill(lo);\n            hivec.fill(hi);\n            increment=(hivec-lovec)*(1.0/double(n_per_dim-1));\n            stride=std::vector<long>(NDIM,1l);\n            total_n=std::pow(n_per_dim,NDIM);\n            for (long i=NDIM-2; i>=0; --i) stride[i]=n_per_dim*stride[i+1];\n\n        }\n\n        double volume_per_gridpoint() const{\n            double volume=1.0;\n            for (int i=0; i<NDIM; ++i) volume*=(hivec[i]-lovec[i]);\n            return volume/total_n;\n        }\n\n        void operator++() {\n            index++;\n        }\n\n        bool operator()() const {\n            return index < total_n;\n        }\n\n        Vector<double,NDIM> get_coordinates() const {\n            Vector<double,NDIM> tmp(NDIM);\n            for (int idim=0; idim<NDIM; ++idim) {\n                tmp[idim]=(index/stride[idim])%n_per_dim;\n            }\n            return lovec+tmp*increment;\n        }\n\n    };\n\n    /// given a molecule, return a suitable grid\n    template<std::size_t NDIM>\n    class molecular_grid : public gridbase {\n\n    public:\n        /// ctor takes centers of the grid and the grid parameters\n        molecular_grid(const std::vector<Vector<double,NDIM>> origins, const LowRankFunctionParameters& params)\n            : centers(origins)\n        {\n            if (centers.size()==0) centers.push_back(Vector<double,NDIM>(0) );\n            if (params.gridtype()==\"random\") grid_builder=std::make_shared<randomgrid<NDIM>>(params.volume_element(),params.radius());\n            // else if (params.gridtype()==\"cartesian\") grid_builder=std::make_shared<cartesian_grid<NDIM>>(params.volume_element(),params.radius());\n            else if (params.gridtype()==\"dftgrid\") {\n                if constexpr (NDIM==3) {\n                    grid_builder=std::make_shared<dftgrid<NDIM>>(params.volume_element(),params.radius());\n                } else {\n                    MADNESS_EXCEPTION(\"no dft grid with NDIM != 3\",1);\n                }\n            } else {\n                MADNESS_EXCEPTION(\"no such grid type\",1);\n            }\n        }\n\n\n        /// ctor takes centers of the grid and the grid builder\n        molecular_grid(const std::vector<Vector<double,NDIM>> origins, std::shared_ptr<gridbase> grid)\n            : centers(origins), grid_builder(grid) {\n            if (centers.size()==0) centers.push_back({0,0,0});\n        }\n\n        /// ctor takes molecule and grid builder\n        molecular_grid(const Molecule& molecule, std::shared_ptr<gridbase> grid) : molecular_grid(molecule.get_all_coords_vec(),grid) {}\n\n        std::vector<Vector<double,NDIM>> get_grid() const {\n            MADNESS_CHECK_THROW(grid_builder,\"no grid builder given in molecular_grid\");\n            MADNESS_CHECK_THROW(centers.size()>0,\"no centers given in molecular_grid\");\n            std::vector<Vector<double,NDIM>> grid;\n            for (const auto& coords : centers) {\n                print(\"atom sites\",coords);\n                if (auto builder=dynamic_cast<dftgrid<NDIM>*>(grid_builder.get())) {\n                    if constexpr (NDIM==3) {\n                        dftgrid<NDIM> b1(builder->builder.get_nradial(),builder->builder.get_angular_order(),coords);\n                        auto atomgrid=b1.get_grid();\n                        grid.insert(grid.end(),atomgrid.begin(),atomgrid.end());\n                    } else {\n                        MADNESS_EXCEPTION(\"no DFT grid for NDIM /= 3\",1);\n                    }\n                } else if (auto builder=dynamic_cast<randomgrid<NDIM>*>(grid_builder.get())) {\n                    randomgrid<NDIM> b1(builder->get_volume_element(),builder->get_radius(),coords);\n                    auto atomgrid=b1.get_grid();\n                    grid.insert(grid.end(),atomgrid.begin(),atomgrid.end());\n                } else {\n                    MADNESS_EXCEPTION(\"no such grid builder\",1);\n                }\n            }\n            return grid;\n        }\n\n    private:\n        std::vector<Vector<double,NDIM>> centers;\n        std::shared_ptr<gridbase> grid_builder;\n\n    };\n\ntemplate<std::size_t PDIM>\nstruct particle {\n    std::array<int,PDIM> dims;\n\n    /// default constructor\n    particle() = default;\n\n    /// convenience for particle 1 (the left/first particle)\n    static particle particle1() {\n        particle p;\n        for (size_t i=0; i<PDIM; ++i) p.dims[i]=i;\n        return p;\n    }\n    /// convenience for particle 2 (the right/second particle)\n    static particle particle2() {\n        particle p;\n        for (size_t i=0; i<PDIM; ++i) p.dims[i]=i+PDIM;\n        return p;\n    }\n\n    /// return the other particle\n    particle complement() const {\n        MADNESS_CHECK(is_first() or is_last());\n        if (is_first()) return particle2();\n        return particle1();\n    }\n\n    particle(const int p) : particle(std::vector<int>(1,p)) {}\n    particle(const int p1, const int p2) : particle(std::vector<int>({p1,p2})) {}\n    particle(const int p1, const int p2,const int p3) : particle(std::vector<int>({p1,p2,p3})) {}\n    particle(const std::vector<int> p) {\n        for (int i=0; i<PDIM; ++i) dims[i]=p[i];\n    }\n\n    std::string str() const {\n        std::stringstream ss;\n        ss << *this;\n        return ss.str();\n    }\n\n\n    /// type conversion to std::array\n    std::array<int,PDIM> get_array() const {\n        return dims;\n    }\n\n\n    /// assuming two particles only\n    bool is_first() const {return dims[0]==0;}\n    /// assuming two particles only\n    bool is_last() const {return dims[0]==(PDIM);}\n\n    template<std::size_t DUMMYDIM=PDIM>\n    typename std::enable_if_t<DUMMYDIM==1, std::tuple<int>>\n    get_tuple() const {return std::tuple<int>(dims[0]);}\n\n    template<std::size_t DUMMYDIM=PDIM>\n    typename std::enable_if_t<DUMMYDIM==2, std::tuple<int,int>>\n    get_tuple() const {return std::tuple<int,int>(dims[0],dims[1]);}\n\n    template<std::size_t DUMMYDIM=PDIM>\n    typename std::enable_if_t<DUMMYDIM==3, std::tuple<int,int,int>>\n    get_tuple() const {return std::tuple<int,int,int>(dims[0],dims[1],dims[2]);}\n};\n\ntemplate<std::size_t PDIM>\nstd::ostream& operator<<(std::ostream& os, const particle<PDIM>& p) {\n    os << \"(\";\n    for (auto i=0; i<PDIM-1; ++i) os << p.dims[i] << \";\";\n    os << p.dims[PDIM-1] << \")\";\n    return os;\n}\n\n/// the low-rank functor is what the LowRankFunction will represent\n\n/// derive from this class :\n/// must implement in inner product\n/// may implement an operator()(const coord_nd&)\ntemplate<typename T, std::size_t NDIM, std::size_t LDIM=NDIM/2>\nstruct LRFunctorBase {\n\n    virtual ~LRFunctorBase() {};\n    virtual std::vector<Function<T,LDIM>> inner(const std::vector<Function<T,LDIM>>& rhs,\n                                        const particle<LDIM> p1, const particle<LDIM> p2) const =0;\n\n    virtual Function<T,LDIM> inner(const Function<T,LDIM>& rhs, const particle<LDIM> p1, const particle<LDIM> p2) const {\n        return inner(std::vector<Function<T,LDIM>>({rhs}),p1,p2)[0];\n    }\n\n    virtual T operator()(const Vector<T,NDIM>& r) const =0;\n    virtual typename Tensor<T>::scalar_type norm2() const {\n        MADNESS_EXCEPTION(\"L2 norm not implemented\",1);\n    }\n\n    virtual World& world() const =0;\n    friend std::vector<Function<T,LDIM>> inner(const LRFunctorBase& functor, const std::vector<Function<T,LDIM>>& rhs,\n                                               const particle<LDIM> p1, const particle<LDIM> p2) {\n        return functor.inner(rhs,p1,p2);\n    }\n    friend Function<T,LDIM> inner(const LRFunctorBase& functor, const Function<T,LDIM>& rhs,\n                                               const particle<LDIM> p1, const particle<LDIM> p2) {\n        return functor.inner(rhs,p1,p2);\n    }\n\n};\n\ntemplate<typename T, std::size_t NDIM, std::size_t LDIM=NDIM/2>\nstruct LRFunctorF12 : public LRFunctorBase<T,NDIM> {\n//    LRFunctorF12() = default;\n    LRFunctorF12(const std::shared_ptr<SeparatedConvolution<T,LDIM>> f12, const std::vector<Function<T,LDIM>>& a,\n                 const std::vector<Function<T,LDIM>>& b) : f12(f12), a(a), b(b) {\n\n        // if a or b are missing, they are assumed to be 1\n        // you may not provide a or b, but if you do they have to have the same size because they are summed up\n        if (a.size()>0 and b.size()>0)\n            MADNESS_CHECK_THROW(a.size()==b.size(), \"a and b must have the same size\");\n        if (a.size()==0) this->a.resize(b.size());\n        if (b.size()==0) this->b.resize(a.size());\n        MADNESS_CHECK_THROW(this->a.size()==this->b.size(), \"a and b must have the same size\");\n    }\n\n    /// delegate to the other ctor with vector arguments\n    LRFunctorF12(const std::shared_ptr<SeparatedConvolution<T,LDIM>> f12,\n                 const Function<T,LDIM>& a, const Function<T,LDIM>& b)\n                 : LRFunctorF12(f12,std::vector<Function<T,LDIM>>({a}), std::vector<Function<T,LDIM>>({b})) {}\n\n\nprivate:\n    std::shared_ptr<SeparatedConvolution<T,LDIM>> f12;  ///< a two-particle function\n    std::vector<Function<T,LDIM>> a,b;   ///< the lo-dim functions\npublic:\n\n    World& world() const {return f12->get_world();}\n    std::vector<Function<T,LDIM>> inner(const std::vector<Function<T,LDIM>>& rhs,\n                                        const particle<LDIM> p1, const particle<LDIM> p2) const {\n\n        std::vector<Function<T,LDIM>> result;\n        // functor is now \\sum_i a_i(1) b_i(2) f12\n        // result(1) = \\sum_i \\int a_i(1) f(1,2) b_i(2) rhs(2) d2\n        //            = \\sum_i a_i(1) \\int f(1,2) b_i(2) rhs(2) d2\n        World& world=rhs.front().world();\n\n        const int nbatch=30;\n        for (size_t i=0; i<rhs.size(); i+=nbatch) {\n            std::vector<Function<T,LDIM>> rhs_batch;\n            auto begin= rhs.begin()+i;\n            auto end= size_t(i+nbatch)<rhs.size() ? rhs.begin()+i+nbatch : rhs.end();\n            std::copy(begin,end, std::back_inserter(rhs_batch));\n            auto tmp2= zero_functions_compressed<T,LDIM>(world,rhs_batch.size());\n\n            if (a.size()==0) tmp2=apply(world,*(f12),rhs_batch);\n\n            for (size_t ia=0; ia<a.size(); ia++) {\n                auto premultiply= p1.is_first() ? a[ia] : b[ia];\n                auto postmultiply= p1.is_first() ? b[ia] : a[ia];\n\n                auto tmp=copy(world,rhs_batch);\n                if (premultiply.is_initialized()) tmp=rhs_batch*premultiply;\n                auto tmp1=apply(world,*(f12),tmp);\n                if (postmultiply.is_initialized()) tmp1=tmp1*postmultiply;\n                tmp2+=tmp1;\n            }\n\n            for (auto& t : tmp2) result.push_back(t);\n        }\n        return result;\n    }\n\n    typename Tensor<T>::scalar_type norm2() const {\n        const Function<T, LDIM> one = FunctionFactory<T, LDIM>(world()).f(\n                [](const Vector<double, LDIM>& r) { return 1.0; });\n        std::vector<Function<T, LDIM>> pre, post;\n        std::size_t sz = a.size();\n        if (sz == 0) {\n            pre = std::vector<Function<T, LDIM>>(1, one);\n            post = std::vector<Function<T, LDIM>>(1, one);\n        } else {\n            pre = (a.front().is_initialized()) ? a : std::vector<Function<T, LDIM>>(sz, one);\n            post = (b.front().is_initialized()) ? b : std::vector<Function<T, LDIM>>(sz, one);\n        }\n\n        const SeparatedConvolution<T,LDIM>& f12a=*(f12);\n        const SeparatedConvolution<T,LDIM> f12sq= SeparatedConvolution<T,LDIM>::combine(f12a,f12a);\n\n        // \\int f(1,2)^2 d1d2 = \\int f(1,2)^2 pre(1)^2 post(2)^2 d1 d2\n        // || \\sum_i f(1,2) a_i(1) b_i(2) || = \\int ( \\sum_{ij} a_i(1) a_j(1) f(1,2)^2 b_i(1) b_j(2) ) d1d2\n        std::vector<Function<T,LDIM>> aa,bb;\n        for (std::size_t i=0; i<pre.size(); ++i) {\n            aa=append(aa,(pre[i]*pre));\n            bb=append(bb,(post[i]*post));\n        }\n//        typename Tensor<T>::scalar_type term1 =madness::inner(mul(world(),post,post),f12sq(mul(world(),pre,pre)));\n        typename Tensor<T>::scalar_type term1 =madness::inner(bb,f12sq(aa));\n        return sqrt(term1);\n\n    }\n\n    T operator()(const Vector<double,NDIM>& r) const {\n\n        if (a.size()==0) return 0.0;\n        auto split = [](const Vector<double,NDIM>& r) {\n            Vector<double,LDIM> first, second;\n            for (size_t i=0; i<LDIM; ++i) {\n                first[i]=r[i];\n                second[i]=r[i+LDIM];\n            }\n            return std::make_pair(first,second);\n        };\n\n        double gamma=f12->info.mu;\n        auto [first,second]=split(r);\n\n\n        double result=0.0;\n        for (std::size_t ia=0; ia<a.size(); ++ia) {\n            double result1=1.0;\n            if (a[ia].is_initialized()) result1*=a[ia](first);\n            if (b[ia].is_initialized()) result1*=b[ia](first);\n            if (f12->info.type==OT_SLATER) result1*=exp(-gamma*(first-second).normf());\n            else if (f12->info.type==OT_GAUSS) result1*=exp(-gamma* madness::inner(first-second,first-second));\n            else {\n                MADNESS_EXCEPTION(\"no such operator_type\",1);\n            }\n            result+=result1;\n        }\n        return result;\n\n    }\n};\n\ntemplate<typename T, std::size_t NDIM, std::size_t LDIM=NDIM/2>\nstruct LRFunctorPure : public LRFunctorBase<T,NDIM> {\n    LRFunctorPure() = default;\n    LRFunctorPure(const Function<T,NDIM>& f) : f(f) {}\n    World& world() const {return f.world();}\n\n    Function<T, NDIM> f;    ///< a hi-dim function\n\n    std::vector<Function<T,LDIM>> inner(const std::vector<Function<T,LDIM>>& rhs,\n                                        const particle<LDIM> p1, const particle<LDIM> p2) const {\n        return madness::innerXX<LDIM>(f,rhs,p1.get_array(),p2.get_array());\n//        std::vector<Function<T,LDIM>> result;\n//        for (const auto& r : rhs) result.push_back(madness::inner(f,r,p1.get_tuple(),p2.get_tuple()));\n//        return result;\n    }\n\n    T operator()(const Vector<double,NDIM>& r) const {\n        return f(r);\n    }\n\n    typename Tensor<T>::scalar_type norm2() const {\n        return f.norm2();\n    }\n};\n\n\n    /// LowRankFunction represents a hi-dimensional (NDIM) function as a sum of products of low-dimensional (LDIM) functions\n\n    /// f(1,2) = \\sum_i g_i(1) h_i(2)\n    /// a LowRankFunction can be created from a hi-dim function directly, or from a composite like f(1,2) phi(1) psi(2),\n    /// where f(1,2) is a two-particle function (e.g. a Slater function)\n    template<typename T, std::size_t NDIM, std::size_t LDIM=NDIM/2>\n    class LowRankFunction {\n    public:\n\n        World& world;\n        double rank_revealing_tol=1.e-8;     // rrcd tol\n        std::string orthomethod=\"canonical\";\n        bool do_print=false;\n        std::vector<Function<T,LDIM>> g,h;\n        const particle<LDIM> p1=particle<LDIM>::particle1();\n        const particle<LDIM> p2=particle<LDIM>::particle2();\n\n        LowRankFunction(World& world) : world(world) {}\n\n        LowRankFunction(std::vector<Function<T,LDIM>> g, std::vector<Function<T,LDIM>> h,\n                        double tol, std::string orthomethod) : world(g.front().world()),\n                        rank_revealing_tol(tol), orthomethod(orthomethod), g(g), h(h) {\n\n        }\n\n        /// shallow copy ctor\n        LowRankFunction(const LowRankFunction& other) : world(other.world),\n            rank_revealing_tol(other.rank_revealing_tol), orthomethod(other.orthomethod),\n            g(other.g), h(other.h) {\n        }\n\n        /// deep copy\n        friend LowRankFunction copy(const LowRankFunction& other) {\n            return LowRankFunction<T,NDIM>(madness::copy(other.g),madness::copy(other.h),other.rank_revealing_tol,other.orthomethod);\n        }\n\n        LowRankFunction& operator=(const LowRankFunction& f) { // Assignment required for storage in vector\n            LowRankFunction ff(f);\n            std::swap(ff.g,g);\n            std::swap(ff.h,h);\n            return *this;\n        }\n\n        /// function evaluation\n        T operator()(const Vector<double,NDIM>& r) const {\n            Vector<double,LDIM> first, second;\n            for (int i=0; i<LDIM; ++i) {\n                first[i]=r[i];\n                second[i]=r[i+LDIM];\n            }\n            double result=0.0;\n            for (int i=0; i<rank(); ++i) result+=g[i](first)*h[i](second);\n            return result;\n        }\n\n        /*\n         * arithmetic section\n         */\n\n        /// addition\n        LowRankFunction operator+(const LowRankFunction& b) const {\n            LowRankFunction<T,NDIM> result=copy(*this);\n            result+=b;\n            return result;\n        }\n        /// subtraction\n        LowRankFunction operator-(const LowRankFunction& b) const {\n            LowRankFunction<T,NDIM> result=copy(*this);\n            result-=b;\n            return result;\n        }\n\n        /// in-place addition\n        LowRankFunction& operator+=(const LowRankFunction& b) {\n\n            g=append(g,copy(b.g));\n            h=append(h,copy(b.h));\n            return *this;\n        }\n\n        /// in-place subtraction\n        LowRankFunction& operator-=(const LowRankFunction& b) {\n            g=append(g,-1.0*b.g);   // operator* implies deep copy of b.g\n            h=append(h,copy(b.h));\n            return *this;\n        }\n\n        /// scale by a scalar\n        template<typename Q>\n        LowRankFunction operator*(const Q a) const {\n            return LowRankFunction<TensorResultType<T,Q>,NDIM>(g * a, Q(h),rank_revealing_tol,orthomethod);\n        }\n\n        /// out-of-place scale by a scalar (no type conversion)\n        LowRankFunction operator*(const T a) const {\n            return LowRankFunction(g * a, h,rank_revealing_tol,orthomethod);\n        }\n\n        /// multiplication with a scalar\n        friend LowRankFunction operator*(const T a, const LowRankFunction& other) {\n            return other*a;\n        }\n\n        /// in-place scale by a scalar (no type conversion)\n        LowRankFunction& operator*=(const T a) {\n            g=g*a;\n            return *this;\n        }\n\n        /// l2 norm\n        typename TensorTypeData<T>::scalar_type norm2() const {\n            auto tmp1=matrix_inner(world,h,h);\n            auto tmp2=matrix_inner(world,g,g);\n            return sqrt(tmp1.trace(tmp2));\n        }\n\n        std::vector<Function<T,LDIM>> get_functions(const particle<LDIM>& p) const {\n            MADNESS_CHECK(p.is_first() or p.is_last());\n            if (p.is_first()) return g;\n            return h;\n        }\n\n        std::vector<Function<T,LDIM>> get_g() const {return g;}\n        std::vector<Function<T,LDIM>> get_h() const {return h;}\n\n        long rank() const {return g.size();}\n\n        /// return the size in GByte\n        double size() const {\n            double sz=get_size(world,g);\n            sz+=get_size(world,h);\n            return sz;\n        }\n\n        Function<T,NDIM> reconstruct() const {\n            auto fapprox=hartree_product(g[0],h[0]);\n            for (int i=1; i<g.size(); ++i) fapprox+=hartree_product(g[i],h[i]);\n            return fapprox;\n        }\n\n        /// orthonormalize the argument vector\n        std::vector<Function<T,LDIM>> orthonormalize(const std::vector<Function<T,LDIM>>& g) const {\n\n            double tol=rank_revealing_tol;\n            std::vector<Function<T,LDIM>> g2;\n            auto ovlp=matrix_inner(world,g,g);\n            if (orthomethod==\"canonical\") {\n                tol*=0.01;\n                print(\"orthonormalizing with method/tol\",orthomethod,tol);\n                g2=orthonormalize_canonical(g,ovlp,tol);\n            } else if (orthomethod==\"cholesky\") {\n                print(\"orthonormalizing with method/tol\",orthomethod,tol);\n                g2=orthonormalize_rrcd(g,ovlp,tol);\n            }\n            else {\n                MADNESS_EXCEPTION(\"no such orthomethod\",1);\n            }\n            double tight_thresh=FunctionDefaults<3>::get_thresh()*0.1;\n            return truncate(g2,tight_thresh);\n        }\n\n\n        /// optimize the lrf using the lrfunctor\n\n        /// @param[in]  nopt       number of iterations (wrt to Alg. 4.3 in Halko)\n        void optimize(const LRFunctorBase<T,NDIM>& lrfunctor1, const long nopt=1) {\n            timer t(world);\n            t.do_print=do_print;\n            for (int i=0; i<nopt; ++i) {\n                // orthonormalize h\n                h=truncate(orthonormalize(h));\n                t.tag(\"ortho1\");\n                g=truncate(inner(lrfunctor1,h,p2,p1));\n                t.tag(\"inner1\");\n                g=truncate(orthonormalize(g));\n                t.tag(\"ortho2\");\n                h=truncate(inner(lrfunctor1,g,p1,p1));\n                t.tag(\"inner2\");\n            }\n        }\n\n        /// remove linear dependencies using rank-revealing cholesky decomposition\n        ///\n        /// @return this with g orthonormal and h orthogonal\n        void reorthonormalize_rrcd(double thresh=-1.0) {\n\n            // with g~ being the orthonormalized g and h~ the orthonormalized h (from rrcd)\n            // with\n            //    ovlp = <g_i | g_j> = L L^T\n            // we get\n            //    | g~_i(1) > = | g_j(1) > piv (L^T)^(-1)        // with piv permuting/truncating, and LT^(-1) already rank-reduced\n            //    | g_i(1) >  = | g~_j(1) >  L^T piv^T\n            //                = | g_j(1) > piv LT^(-1) LT piv^T\n            // thus:\n            // f(1,2) = sum_i | g_i(1)>< h_i(2) |\n            //        = | g_i(1)> piv_g LTg^(-1) LTg piv_g^(-1) <h_i(2)|                     (1)\n            //        = | g_i(1)> piv_g LTg^(-1) ( LTg  piv_g^(-1) <h_i(2)| )                (2)\n            //        = | g_i(1)> piv_g LTg^(-1) <h'_i(2)|                                   (3)\n            //        = | g_i(1)> piv_g LTg^(-1) piv_h Lh Lh^(-1) piv_h^T <h'_i(2)|          (4)\n            //        = (| g_i(1)> piv_g LTg^(-1) piv_h Lh ) ( Lh^(-1) piv_h^T LTg piv_g^(-1) <h_i(2)| )\n            // Notes:\n            //  piv^(-1) = piv^T since piv is a unitary permutation matrix\n            // Thus\n            //   | h~_i(2) > = |h_i(2) > piv_g Lg piv_h LTh^(-1)\n\n            double tol=rank_revealing_tol;\n\n            // no pivot_inverse is necessary..\n            auto pivot_vec = [&] (const std::vector<Function<T,LDIM>>& v, const Tensor<integer>& ipiv) {\n                std::size_t rank=ipiv.size();\n                std::vector<Function<T,LDIM> > pv(rank);\n                for(int i=0;i<ipiv.size();++i) pv[i]=v[ipiv[i]];       // all elements in [rank,v.size()) = 0 due to lindep\n                return pv;\n            };\n\n            auto pivot_mat = [&] (const Tensor<T>& t, const Tensor<integer>& ipiv) {\n                // std::size_t rank=ipiv.size();\n                Tensor<T> pt(t.dim(0),t.dim(1));\n                // for(int i=0;i<ipiv.size();++i) pt(i,_)=t(ipiv[i],_);       // all elements in [rank,v.size()) = 0 due to lindep\n                for(int i=0;i<ipiv.size();++i) pt(ipiv[i],_)=t(i,_);       // all elements in [rank,v.size()) = 0 due to lindep\n                return pt;\n            };\n\n            auto pivot = [](const Tensor<integer>& ipiv) {\n                Tensor<T> piv(ipiv.size(),ipiv.size());\n                for (int i=0; i<ipiv.size(); ++i) piv(ipiv[i],i)=1.0;\n                return piv;\n            };\n\n\n            auto LT = [&](const Tensor<T>& ovlp1) {\n                Tensor<integer> piv;\n                auto ovlp=copy(ovlp1);  // copy since ovlp will be destroyed\n                // auto ovlp=matrix_inner(world,v,v);\n                int rank;\n                rr_cholesky(ovlp,tol,piv,rank); // destroys ovlp and gives back Upper ∆ Matrix from CD\n                print(\"initial, final rank\",ovlp.dim(0),rank);\n                // piv=piv(Slice(0,rank-1));\n                Tensor<T> p=pivot(piv);\n                Tensor<T> L=inner(p,transpose(ovlp));\n\n                double err1=(ovlp1-inner(L,L,1,1)).normf();\n                L=L(_,Slice(0,rank-1));       // (new, old)\n                double err2=(ovlp1-inner(L,L,1,1)).normf();\n                print(\"err1, err2\", err1,err2);\n                return std::make_pair(L,piv);\n            };\n\n            // orthonormalize g: g_ortho= transform(g_piv,LT_g^(-1))\n            auto ovlp_g=matrix_inner(world,g,g);\n            // ovlp_g=0.5*(ovlp_g+transpose(ovlp_g));\n            // for (int i=0; i<ovlp_g.dim(0); ++i) ovlp_g(i,i)+=1.e-12;\n            auto [L_g,piv_g]=LT(ovlp_g);              // (1)\n            L_g=pivot_mat(L_g,piv_g);\n            double zero=(ovlp_g-inner(L_g,L_g,1,1)).normf();\n            print(\"zero\",zero);\n            // auto hpiv_g=pivot_vec(h,piv_g);         // (2) : | h_i > piv_g\n            // auto ovlp_hsmall=matrix_inner(world,hpiv_g,hpiv_g);           // (3) : < h_i | h_j >\n            // auto ovlp1=inner(LT_g,inner(ovlp_hsmall,LT_g,1,1));        // (3) : LTg piv_g <h_i | h_i> piv_g  Lg\n            // auto [LTh,piv_h]=LT(ovlp1);                // (3)\n\n            // auto gpiv_g=pivot_vec(g,piv_g);         // | g_i > piv_g\n            // auto gtrans=inner(pivot_mat(inverse(LT_g),piv_h),LTh,1,1);        // LTg^(-1) piv_g Lh\n            // auto htrans=inner(pivot_mat(transpose(LT_g),piv_h),inverse(LTh));        // LTg^(-1) piv_g Lh\n            auto gpiv_g=pivot_vec(g,piv_g);         // | g_i > piv_g\n            auto gtrans=inverse(L_g);\n            auto htrans=L_g;\n            auto hpiv_g=pivot_vec(h,piv_g);         // | h_i > piv_g\n\n            g=transform(world,gpiv_g,(gtrans));\n            h=transform(world,hpiv_g,transpose(htrans));\n            auto Gortho=matrix_inner(world,g,g);\n            for (int i=0; i<Gortho.dim(0); ++i) Gortho(i,i)-=1.0;\n            print(\"G_ortho.normf()\",Gortho.normf(),Gortho.dim(0));\n            print(\"end of line\");\n            // g=gpiv_g;\n            // h=hpiv_g;\n        }\n\n        void reorthonormalize(double thresh=-1.0) {\n            if (orthomethod==\"canonical\") {\n                reorthonormalize_canonical(thresh);\n            } else if (orthomethod==\"cholesky\") {\n                reorthonormalize_rrcd(thresh);\n            } else {\n                MADNESS_EXCEPTION(\"no such orthomethod\",1);\n            }\n        }\n        /// after external operations g might not be orthonormal and/or optimal -- reorthonormalize\n\n        /// orthonormalization similar to Bischoff, Harrison, Valeev, JCP 137 104103 (2012), Sec II C 3\n        /// f   =\\sum_i g_i h_i\n        ///     = g X- (X+)^T (Y+)^T Y- h\n        ///     = g X-  U S V^T  Y- h\n        ///     = g (X- U) (S V^T Y-) h\n        /// requires 2 matrix_inner and 2 transforms. g and h are optimal\n        /// @param[in]  thresh        SVD threshold\n        void reorthonormalize_canonical(double thresh=-1.0) {\n            if (thresh<0.0) thresh=rank_revealing_tol;\n            Tensor<T> ovlp_g = matrix_inner(world, g, g);\n            Tensor<T> ovlp_h = matrix_inner(world, h, h);\n\n            ovlp_g=0.5*(ovlp_g+transpose(ovlp_g));\n            ovlp_h=0.5*(ovlp_h+transpose(ovlp_h));\n\n            auto [eval_g, evec_g] = syev(ovlp_g);\n            auto [eval_h, evec_h] = syev(ovlp_h);\n\n            // get relevant part of the eigenvalues and eigenvectors\n            // eigenvalues are sorted in ascending order\n            auto get_slice = [](auto eval, double thresh) {\n                // remove small/negative eigenvalues\n                eval.screen(thresh);\n                Slice s;\n                for (int i=0; i<eval.size(); ++i) {\n                    MADNESS_CHECK_THROW(eval[i]>=0.0,\"negative eigenvalues in reorthonormalize\");\n                    if (eval[i]>thresh) {\n                        return s=Slice(i,-1);       // from i to the end\n                        break;\n                    }\n                }\n                return s;\n            };\n\n            Slice gslice=get_slice(eval_g,1.e-12);\n            Slice hslice=get_slice(eval_h,1.e-12);\n\n            Tensor<T> Xplus=copy(evec_g(_,gslice));\n            Tensor<T> Xminus=copy(evec_g(_,gslice));\n            Tensor<T> Yplus=copy(evec_h(_,hslice));\n            Tensor<T> Yminus=copy(evec_h(_,hslice));\n            eval_g=copy(eval_g(gslice));\n            eval_h=copy(eval_h(hslice));\n\n            for (int i=0; i<eval_g.size(); ++i) Xplus(_,i)*=std::pow(eval_g(i),0.5);\n            for (int i=0; i<eval_g.size(); ++i) Xminus(_,i)*=std::pow(eval_g(i),-0.5);\n            for (int i=0; i<eval_h.size(); ++i) Yplus(_,i)*=std::pow(eval_h(i),0.5);\n            for (int i=0; i<eval_h.size(); ++i) Yminus(_,i)*=std::pow(eval_h(i),-0.5);\n\n            Tensor<T> M=madness::inner(Xplus,Yplus,0,0);    // (X+)^T Y+\n            auto [U,s,VT]=svd(M);\n\n            // truncate\n            typename Tensor<T>::scalar_type s_accumulated=0.0;\n            int i=s.size()-1;\n            for (;i>=0; i--) {\n                s_accumulated+=s[i];\n                if (s_accumulated>thresh) {\n                    i++;\n                    break;\n                }\n            }\n            for (int j=0; j<s.size(); ++j) VT(j,_)*=s[j];\n            Tensor<T> XX=madness::inner(Xminus,U,1,0);\n            Tensor<T> YY=madness::inner(Yminus,VT,1,1);\n\n            g=truncate(transform(world,g,XX));\n            h=truncate(transform(world,h,YY));\n        }\n\n\n        double check_orthonormality(const std::vector<Function<T,LDIM>>& v) const {\n            Tensor<T> ovlp=matrix_inner(world,v,v);\n            return check_orthonormality(ovlp);\n        }\n\n        double check_orthonormality(const Tensor<T>& ovlp) const {\n            timer t(world);\n            t.do_print=do_print;\n            Tensor<T> ovlp2=ovlp;\n            for (int i=0; i<ovlp2.dim(0); ++i) ovlp2(i,i)-=1.0;\n            if (world.rank()==0 and do_print) {\n                print(\"absmax\",ovlp2.absmax());\n                print(\"l2\",ovlp2.normf()/ovlp2.size());\n            }\n            t.tag(\"check_orthonoramality\");\n            return ovlp.absmax();\n        }\n\n        /// compute the l2 error |functor - \\sum_i g_ih_i|_2\n\n        /// \\int (f(1,2) - gh(1,2))^2 = \\int f(1,2)^2 - 2\\int f(1,2) gh(1,2) + \\int gh(1,2)^2\n        /// since we are subtracting large numbers the numerics are sensitive, and NaN may be returned..\n        double l2error(const LRFunctorBase<T,NDIM>& lrfunctor1) const {\n\n            timer t(world);\n            t.do_print=do_print;\n\n            // \\int f(1,2)^2 d1d2\n            double term1 = lrfunctor1.norm2();\n            term1=term1*term1;\n            t.tag(\"computing term1\");\n\n            // \\int f(1,2) pre(1) post(2) \\sum_i g(1) h(2) d1d2\n//            double term2=madness::inner(pre*g,f12(post*h));\n            double term2=madness::inner(g,inner(lrfunctor1,h,p2,p1));\n            t.tag(\"computing term2\");\n\n            // g functions are orthonormal\n            // \\int gh(1,2)^2 d1d2 = \\int \\sum_{ij} g_i(1) g_j(1) h_i(2) h_j(2) d1d2\n            //   = \\sum_{ij} \\int g_i(1) g_j(1) d1 \\int h_i(2) h_j(2) d2\n            //   = \\sum_{ij} delta_{ij} \\int h_i(2) h_j(2) d2\n            //   = \\sum_{i} \\int h_i(2) h_i(2) d2\n            double zero=check_orthonormality(g);\n            if (zero>1.e-10) print(\"g is not orthonormal\",zero);\n            // double term3a=madness::inner(h,h);\n            auto tmp1=matrix_inner(world,h,h);\n            auto tmp2=matrix_inner(world,g,g);\n            double term3=tmp1.trace(tmp2);\n//            print(\"term3/a/diff\",term3a,term3,term3-term3a);\n            t.tag(\"computing term3\");\n\n            double arg=term1-2.0*term2+term3;\n            if (arg<0.0) {\n                print(\"negative l2 error\");\n                arg*=-1.0;\n//                throw std::runtime_error(\"negative argument in l2error\");\n            }\n            double error=sqrt(arg)/sqrt(term1);\n            if (world.rank()==0 and do_print) {\n                print(\"term1,2,3, error\",term1, term2, term3, \"  --\",error);\n            }\n\n            return error;\n        }\n\n    };\n\n    // This interface is necessary to compute inner products\n    template<typename T, std::size_t NDIM>\n    double inner(const LowRankFunction<T,NDIM>& a, const LowRankFunction<T,NDIM>& b) {\n        World& world=a.world;\n        return (matrix_inner(world,a.g,b.g).emul(matrix_inner(world,a.h,b.h))).sum();\n    }\n\n\n\n//    template<typename T, std::size_t NDIM>\n//    LowRankFunction<T,NDIM> inner(const Function<T,NDIM>& lhs, const LowRankFunction<T,NDIM>& rhs,\n//                                  const std::tuple<int> v1, const std::tuple<int> v2) {\n//        World& world=rhs.world;\n//        // int lhs(1,2) rhs(2,3) d2 = \\sum \\int lhs(1,2) g_i(2) h_i(3) d2\n//        //                      = \\sum \\int lhs(1,2) g_i(2) d2 h_i(3)\n//        LowRankFunction<T, NDIM + NDIM - 2> result(world);\n//        result.h=rhs.h;\n//        decltype(rhs.g) g;\n//        for (int i=0; i<rhs.rank(); ++i) {\n//            g.push_back(inner(lhs,rhs.g[i],{v1},{0}));\n//        }\n//        result.g=g;\n//        return result;\n//    }\n\n    /**\n     * inner product: LowRankFunction lrf; Function f, g; double d\n     *  lrf(1,3) = inner(lrf(1,2), lrf(2,3))\n     *  lrf(1,3) = inner(lrf(1,2), f(2,3))\n     *  g(1) = inner(lrf(1,2), f(2))\n     *  d = inner(lrf(1,2), f(1,2))\n     *  d = inner(lrf(1,2), lrf(1,2))\n     */\n\n    ///  lrf(1,3) = inner(full(1,2), lrf(2,3))\n\n    /// @param[in] f1 the first function\n    /// @param[in] f2 the second function\n    /// @param[in] p1 the integration variable of the first function\n    /// @param[in] p2 the integration variable of the second function\n    template<typename T, std::size_t NDIM, std::size_t PDIM>\n    LowRankFunction<T,NDIM> inner(const Function<T,NDIM>& f1, const LowRankFunction<T,NDIM>& f2,\n                                  const particle<PDIM> p1, const particle<PDIM> p2) {\n        auto result=inner(f2,f1,p2,p1);\n        std::swap(result.g,result.h);\n        return result;\n    }\n\n    ///  lrf(1,3) = inner(lrf(1,2), full(2,3))\n\n    /// @param[in] f1 the first function\n    /// @param[in] f2 the second function\n    /// @param[in] p1 the integration variable of the first function\n    /// @param[in] p2 the integration variable of the second function\n    template<typename T, std::size_t NDIM, std::size_t PDIM>\n    LowRankFunction<T,NDIM> inner(const LowRankFunction<T,NDIM>& f1, const Function<T,NDIM>& f2,\n                                  const particle<PDIM> p1, const particle<PDIM> p2) {\n        static_assert(TensorTypeData<T>::iscomplex==false, \"complex inner in LowRankFunction not implemented\");\n        World& world=f1.world;\n        static_assert(2*PDIM==NDIM);\n        // int f(1,2) k(2,3) d2 = \\sum \\int g_i(1) h_i(2) k(2,3) d2\n        //                      = \\sum g_i(1) \\int h_i(2) k(2,3) d2\n        LowRankFunction<T, NDIM> result(world);\n        if (p1.is_last()) { // integrate over 2: result(1,3) = lrf(1,2) f(2,3)\n            result.g = f1.g;\n            change_tree_state(f1.h,reconstructed);\n            result.h=innerXX<PDIM>(f2,f1.h,p2.get_array(),particle<PDIM>::particle1().get_array());\n        } else if (p1.is_first()) { // integrate over 1: result(2,3) = lrf(1,2) f(1,3)\n            result.g = f1.h;        // correct! second variable of f1 becomes first variable of result\n            change_tree_state(f1.g,reconstructed);\n            result.h=innerXX<PDIM>(f2,f1.g,p2.get_array(),particle<PDIM>::particle1().get_array());\n        }\n        return result;\n    }\n\n    ///  lrf(1,3) = inner(lrf(1,2), lrf(2,3))\n\n    /// @param[in] f1 the first function\n    /// @param[in] f2 the second function\n    /// @param[in] p1 the integration variable of the first function\n    /// @param[in] p2 the integration variable of the second function\n    template<typename T, std::size_t NDIM, std::size_t PDIM>\n    LowRankFunction<T,NDIM> inner(const LowRankFunction<T,NDIM>& f1, const LowRankFunction<T,NDIM>& f2,\n                                  const particle<PDIM> p1, const particle<PDIM> p2) {\n        World& world=f1.world;\n        static_assert(2*PDIM==NDIM);\n\n        // inner(lrf(1,2) ,lrf(2,3) ) = \\sum_ij g1_i(1) <h1_i(2) g2_j(2)> h2_j(3)\n        auto matrix=matrix_inner(world,f2.get_functions(p2),f1.get_functions(p1));\n        auto htilde=transform(world,f2.get_functions(p2.complement()),matrix);\n        auto gg=copy(world,f1.get_functions(p1.complement()));\n        return LowRankFunction<T,NDIM>(gg,htilde,f1.rank_revealing_tol,f1.orthomethod);\n    }\n\n    ///  f(1) = inner(lrf(1,2), f(2))\n\n    /// @param[in] f1 the first function\n    /// @param[in] vf vector of the second functions\n    /// @param[in] p1 the integration variable of the first function\n    /// @param[in] p2 the integration variable of the second function, dummy variable for consistent notation\n    template<typename T, std::size_t NDIM, std::size_t PDIM>\n    std::vector<Function<T,NDIM-PDIM>> inner(const LowRankFunction<T,NDIM>& f1, const std::vector<Function<T,PDIM>>& vf,\n                                  const particle<PDIM> p1, const particle<PDIM> p2=particle<PDIM>::particle1()) {\n        World& world=f1.world;\n        static_assert(2*PDIM==NDIM);\n        MADNESS_CHECK(p2.is_first());\n\n        // inner(lrf(1,2), f_k(2) ) = \\sum_i g1_i(1) <h1_i(2) f_k(2)>\n        auto matrix=matrix_inner(world,f1.get_functions(p1),vf);\n        return transform(world,f1.get_functions(p1.complement()),matrix);\n    }\n\n    ///  f(1) = inner(lrf(1,2), f(2))\n\n    /// @param[in] f1 the first function\n    /// @param[in] vf the second function\n    /// @param[in] p1 the integration variable of the first function\n    /// @param[in] p2 the integration variable of the second function, dummy variable for consistent notation\n    template<typename T, std::size_t NDIM, std::size_t PDIM>\n    Function<T,NDIM> inner(const LowRankFunction<T,NDIM>& f1, const Function<T,PDIM>& f2,\n                                        const particle<PDIM> p1, const particle<PDIM> p2=particle<PDIM>::particle1()) {\n        return inner(f1,std::vector<Function<T,PDIM>>({f2}),p1,p2)[0];\n    }\n\n    template<typename T, std::size_t NDIM, std::size_t LDIM=NDIM/2>\n    class LowRankFunctionFactory {\n    public:\n\n        const particle<LDIM> p1=particle<LDIM>::particle1();\n        const particle<LDIM> p2=particle<LDIM>::particle2();\n\n        LowRankFunctionParameters parameters;\n        std::vector<Vector<double,LDIM>> origins;  ///< origins of the molecular grid\n\n        LowRankFunctionFactory() = default;\n        LowRankFunctionFactory(const LowRankFunctionParameters param, const std::vector<Vector<double,LDIM>> origins={})\n                : parameters(param), origins(origins) {}\n\n        LowRankFunctionFactory(const LowRankFunctionParameters param, const Molecule& molecule)\n                : LowRankFunctionFactory(param,molecule.get_all_coords_vec()){}\n\n        LowRankFunctionFactory(const LowRankFunctionFactory& other) = default;\n\n        LowRankFunctionFactory& set_radius(const double radius) {\n            parameters.set_user_defined_value(\"radius\",radius);\n            return *this;\n        }\n        LowRankFunctionFactory& set_volume_element(const double volume_element) {\n            parameters.set_user_defined_value(\"volume_element\",volume_element);\n            return *this;\n        }\n        LowRankFunctionFactory& set_rank_revealing_tol(const double rrtol) {\n            parameters.set_user_defined_value(\"tol\",rrtol);\n            return *this;\n        }\n        LowRankFunctionFactory& set_orthomethod(const std::string orthomethod) {\n            parameters.set_user_defined_value(\"orthomethod\",orthomethod);\n            return *this;\n        }\n\n        LowRankFunction<T,NDIM> project(const LRFunctorBase<T,NDIM>& lrfunctor) const {\n            World& world=lrfunctor.world();\n            bool do_print=true;\n            timer t1(world);\n            t1.do_print=do_print;\n            auto orthomethod=parameters.orthomethod();\n            auto rank_revealing_tol=parameters.tol();\n\n            // get sampling grid\n            molecular_grid<LDIM> mgrid(origins,parameters);\n            auto grid=mgrid.get_grid();\n            if (world.rank()==0) print(\"grid size\",grid.size());\n\n            auto Y=Yformer(lrfunctor,grid,parameters.rhsfunctiontype());\n            t1.tag(\"Yforming\");\n\n            auto ovlp=matrix_inner(world,Y,Y);  // error in symmetric matrix_inner, use non-symmetric form here!\n            t1.tag(\"compute ovlp\");\n            auto g=truncate(orthonormalize_rrcd(Y,ovlp,rank_revealing_tol));\n            t1.tag(\"rrcd/truncate/thresh\");\n            auto sz=get_size(world,g);\n            if (world.rank()==0 and do_print) print(\"gsize\",sz);\n//            check_orthonormality(g);\n\n            if (world.rank()==0 and do_print) {\n                print(\"Y.size()\",Y.size());\n                print(\"g.size()\",g.size());\n            }\n\n            auto h=truncate(inner(lrfunctor,g,p1,p1));\n            t1.tag(\"Y backprojection with truncation\");\n            return LowRankFunction<T,NDIM>(g,h,parameters.tol(),parameters.orthomethod());\n\n        }\n\n        /// apply a rhs (delta or exponential) on grid points to the hi-dim function and form Y = A_ij w_j (in Halko's language)\n        std::vector<Function<T,LDIM>> Yformer(const LRFunctorBase<T,NDIM>& lrfunctor1, const std::vector<Vector<double,LDIM>>& grid,\n                                              const std::string rhsfunctiontype, const double exponent=30.0) const {\n\n            World& world=lrfunctor1.world();\n            std::vector<Function<double,LDIM>> Y;\n            if (rhsfunctiontype==\"exponential\") {\n                std::vector<Function<double,LDIM>> omega;\n                double coeff=std::pow(2.0*exponent/constants::pi,0.25*LDIM);\n                for (const auto& point : grid) {\n                    omega.push_back(FunctionFactory<double,LDIM>(world)\n                                            .functor([&point,&exponent,&coeff](const Vector<double,LDIM>& r)\n                                                     {\n                                                         auto r_rel=r-point;\n                                                         return coeff*exp(-exponent*madness::inner(r_rel,r_rel));\n                                                     }));\n                }\n                Y=inner(lrfunctor1,omega,p2,p1);\n            } else {\n                MADNESS_EXCEPTION(\"confused rhsfunctiontype\",1);\n            }\n            auto norms=norm2s(world,Y);\n            std::vector<Function<double,LDIM>> Ynormalized;\n\n            for (size_t i=0; i<Y.size(); ++i) if (norms[i]>parameters.tol()) Ynormalized.push_back(Y[i]);\n            normalize(world,Ynormalized);\n            return Ynormalized;\n        }\n\n    };\n\n\n} // namespace madness\n\n#endif //MADNESS_LOWRANKFUNCTION_H\n"
  },
  {
    "path": "src/madness/chem/masks_and_boxes.h",
    "content": "/*\n * masks_and_boxes.h\n *\n *  Created on: 16 May 2019\n *      Author: fbischoff\n */\n\n#ifndef SRC_APPS_CHEM_MASKS_AND_BOXES_H_\n#define SRC_APPS_CHEM_MASKS_AND_BOXES_H_\n\n\n#include <madness/world/vector.h>\n#include <math.h>\n\nnamespace madness {\n\n/// construct a smooth approximation for the piecewise function f(x)={{x, x<1}, {1,x>1}}.\n/// see https://doi.org/10.1186/s40064-016-3278-y\nstruct max_of_x_1_smooth {\n\n\t/// return a smooth transition of linear r to a constant at radius r\n\n\t/// @param[in]\tr\t\t\tnorm of the n-dimensional vector\n\t/// @param[in]\ttightness \tsee the compute_tightness() function\n\t/// @param[in]\tmax_radius\twhere the curve flattens\n\t/// @return\t\tfactor\t\tmultiply your vector with the factor xyz->xyz*factor\n\tstatic double compute_factor(const double& r, const double& tightness, const double& rmax) {\n\n\t\tconst double a=0.5;\n\t\tconst double b=0.5;\n\t\tconst double c=-0.5;\n\t\tconst double beta=1.0;\n\t\tconst double A=a-c*beta;\n\t\tconst double B=b+c;\n\t\tconst double C=2.0*c/tightness;\n\n\t\tconst double f=rmax * (A +B*r/rmax + C*log(1.0+exp(-tightness*(r/rmax-beta))));\n\t\tconst double factor=(r>1.e-10) ? f/r : 1.0;\t// prevent division by zero\n\t\treturn factor;\n\t}\n\n\t/// compute the tightness parameter given the deviation at 0.8 radius\n\n\t/// simple linear fit\n\tstatic double compute_tightness(const double deviation_at_dot_8_radius, const double rmax) {\n\t\tconst double a=-1.0577335859862533;\n\t\tconst double b=-1.0/0.09618399253086536;\n\t\treturn (log10(deviation_at_dot_8_radius/rmax)-a)*b;\n\t}\n\n};\n\n\n\n/// an 2-dimensional smooth mask that is 1 inside the radius and 0 outside\ntemplate<std::size_t NDIM>\nstruct spherical_box {\n\n\ttypedef Vector<double,NDIM> coordT;\n\n\tconst double radius;\n\tconst double tightness=11.5;\t// 99.9% accurate at 0.8 radius\n\tconst coordT offset=coordT(0.0);\n\tconst coordT B_direction=coordT(0.0);\n\n\tspherical_box(const double r, const double deviation,\n\t\t\tconst coordT o={0.0,0.0,0.0}, const coordT B_dir={0.0,0.0,1.0}) :\n\t\tradius(r), tightness(compute_tightness(deviation)), offset(o), B_direction(B_dir) {}\n\n\tdouble operator()(const coordT& xyz) const {\n\t\t// project out all contributions from xyz along the direction of the B field\n\t\tcoordT tmp=(xyz-offset)*B_direction;\n\t\tconst double inner=tmp[0]+tmp[1]+tmp[2];\n\t\tcoordT proj=(xyz-offset)-B_direction*inner;\n\t\tdouble r=proj.normf();\n\t\tdouble v1=1.0/(1.0+exp(-tightness*(r-radius)));\n\t\treturn 1.0-v1;\n\t}\n\n\t/// compute the tightness parameter given the deviation at 0.8 radius\n\tstatic double compute_tightness(const double deviation_at_dot_8_radius) {\n\t\treturn 5.0/3.0*log((1.0-deviation_at_dot_8_radius)/deviation_at_dot_8_radius);\n\t}\n\n};\n\n\n}\n\n\n#endif /* SRC_APPS_CHEM_MASKS_AND_BOXES_H_ */\n"
  },
  {
    "path": "src/madness/chem/molecular_functors.h",
    "content": "//\n// Created by Florian Bischoff on 5/25/22.\n//\n#ifndef MADNESS_MOLECULAR_FUNCTORS_H\n#define MADNESS_MOLECULAR_FUNCTORS_H\n\n#include<madness/chem/molecule.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/mra/mra.h>\n#include<madness/mra/functypedefs.h>\nnamespace madchem {\n\n\n\nclass MolecularGuessDensityFunctor : public madness::FunctionFunctorInterface<double,3> {\nprivate:\n    const madness::Molecule& molecule;\n    const madness::AtomicBasisSet& aobasis;\npublic:\n    MolecularGuessDensityFunctor(const madness::Molecule& molecule, const madness::AtomicBasisSet& aobasis)\n            : molecule(molecule), aobasis(aobasis) {}\n\n    double operator()(const madness::coord_3d& x) const {\n        return aobasis.eval_guess_density(molecule, x[0], x[1], x[2]);\n    }\n\n    std::vector<madness::coord_3d> special_points() const {return molecule.get_all_coords_vec();}\n};\n\n\nclass AtomicBasisFunctor : public madness::FunctionFunctorInterface<double,3> {\nprivate:\n    const madness::AtomicBasisFunction aofunc;\n\npublic:\n    AtomicBasisFunctor(const madness::AtomicBasisFunction& aofunc)\n            : aofunc(aofunc)\n    {}\n\n    double operator()(const madness::coord_3d& x) const {\n        return aofunc(x[0], x[1], x[2]);\n    }\n\n    std::vector<madness::coord_3d> special_points() const {\n        return std::vector<madness::coord_3d>(1,aofunc.get_coords_vec());\n    }\n};\n\n\nclass AtomicAttractionFunctor : public madness::FunctionFunctorInterface<double,3> {\nprivate:\n    const madness::Molecule& molecule;\n    const int iatom;\n\npublic:\n    AtomicAttractionFunctor(const madness::Molecule& molecule, int iatom)\n            : molecule(molecule), iatom(iatom) {}\n\n    double operator()(const madness::coord_3d& x) const {\n        const madness::Atom& atom=molecule.get_atom(iatom);\n        const madness::coord_3d coord={atom.x,atom.y,atom.z};\n        double r = (x-coord).normf();\n        return -atom.q * madness::smoothed_potential(r*molecule.get_rcut()[iatom])\n               *molecule.get_rcut()[iatom];\n    }\n\n    std::vector<madness::coord_3d> special_points() const {\n        return std::vector<madness::coord_3d>(1,molecule.get_atom(iatom).get_coords());\n    }\n};\n\nclass MolecularDerivativeFunctor : public madness::FunctionFunctorInterface<double,3> {\nprivate:\n    const madness::Molecule& molecule;\n    const int atom;\n    const int axis;\n\npublic:\n    MolecularDerivativeFunctor(const madness::Molecule& molecule, int atom, int axis)\n            : molecule(molecule), atom(atom), axis(axis)\n    {}\n\n    double operator()(const madness::coord_3d& x) const {\n        return molecule.nuclear_attraction_potential_derivative(atom, axis, x[0], x[1], x[2]);\n    }\n\n    std::vector<madness::coord_3d> special_points() const {\n        return std::vector<madness::coord_3d>(1,molecule.get_atom(atom).get_coords());\n    }\n};\n\nclass MolecularSecondDerivativeFunctor : public madness::FunctionFunctorInterface<double,3> {\nprivate:\n    const madness::Molecule& molecule;\n    const int atom;\n    const int iaxis, jaxis;\n\npublic:\n    MolecularSecondDerivativeFunctor(const madness::Molecule& molecule, int atom,\n                                     int iaxis, int jaxis)\n            : molecule(molecule), atom(atom),iaxis(iaxis), jaxis(jaxis)\n    {}\n\n    double operator()(const madness::coord_3d& x) const {\n        return molecule.nuclear_attraction_potential_second_derivative(atom,\n                                                                       iaxis, jaxis, x[0], x[1], x[2]);\n    }\n\n    std::vector<madness::coord_3d> special_points() const {\n        return std::vector<madness::coord_3d>(1,molecule.get_atom(atom).get_coords());\n    }\n};\n\n\nclass CorePotentialDerivativeFunctor : public madness::FunctionFunctorInterface<double,3> {\nprivate:\n    const madness::Molecule& molecule;\n    const int atom;\n    const int axis;\n    std::vector<madness::coord_3d> specialpt;\npublic:\n    CorePotentialDerivativeFunctor(const madness::Molecule& molecule, int atom, int axis)\n            : molecule(molecule), atom(atom), axis(axis) {}\n\n    double operator()(const madness::coord_3d& r) const {\n        return molecule.core_potential_derivative(atom, axis, r[0], r[1], r[2]);\n    }\n};\n\n\n\n}\n#endif //MADNESS_MOLECULAR_FUNCTORS_H\n"
  },
  {
    "path": "src/madness/chem/molecular_optimizer.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n*/\n\n\n/// \\file chem/molecular_optimizer.h\n/// \\brief optimize the geometrical structure of a molecule\n#ifndef MADNESS_CHEM_MOLECULAR_OPTIMIZER_H__INCLUDED\n#define MADNESS_CHEM_MOLECULAR_OPTIMIZER_H__INCLUDED\n\n#include <madness/tensor/solvers.h>\n#include<madness/chem/molecule.h>\n#include\"madness/mra/QCCalculationParametersBase.h\"\n\nnamespace madness {\n\n\nstruct MolecularOptimizationTargetInterface : public OptimizationTargetInterface {\n\n    /// return the molecule of the target\n    virtual Molecule& molecule() {\n        MADNESS_EXCEPTION(\"you need to return a molecule\",1);\n        return *(new Molecule());   // this is a memory leak silencing warnings\n    }\n};\n\n\nclass MolecularOptimizationParameters : public QCCalculationParametersBase {\npublic:\n\n\t/// ctor reading out the input file\n    MolecularOptimizationParameters() {\n        initialize < std::string > (\"update\", \"bfgs\", \"Quasi-Newton update method\",{\"bfgs\",\"sr1\"});\n        initialize < int > (\"maxiter\", 20);\n        initialize < double > (\"tol\", 1.e-4,\"geometry convergence threshold for the gradient norm\");\n        initialize < double > (\"value_precision\", 1.e-12);\n        initialize < double > (\"gradient_precision\", 1.e-12);\n        initialize < bool > (\"printtest\", false);\n        initialize < std::string > (\"cg_method\", \"polak_ribiere\",\"conjugate gradients update\",{\"polak_ribiere\",\"fletcher-reeves\"});\n        initialize < std::vector<std::string> >\n        (\"remove_dof\", {\"tx\", \"ty\", \"tz\", \"rx\", \"ry\", \"rz\"}, \"degree of freedom projected out: translation/rotation\");\n    }\n\n    MolecularOptimizationParameters(World& world, const commandlineparser& parser)\n            : MolecularOptimizationParameters() {\n\t\t// read input file\n        read_input_and_commandline_options(world,parser,\"geoopt\");\n        set_derived_values();\n\t}\n    std::string get_tag() const override {\n        return std::string(\"geoopt\");\n    }\n\n\tvoid set_derived_values() {\n\t}\n\n\tstd::string update() const {return get<std::string>(\"update\");}\n\tstd::string cg_method() const {return get<std::string>(\"cg_method\");}\n\tint maxiter() const {return get<int>(\"maxiter\");}\n\tdouble tol() const {return get<double>(\"tol\");}\n\tdouble value_precision() const {return get<double>(\"value_precision\");}\n\tdouble gradient_precision() const {return get<double>(\"gradient_precision\");}\n\tbool printtest() const {return get<bool>(\"printtest\");}\n\tstd::vector<std::string> remove_dof() const {return get<std::vector<std::string> >(\"remove_dof\");}\n\n};\n\n\n\n\n/// Molecular optimizer derived from the QuasiNewton optimizer\n\n/// Essentially the QuasiNewton optimizer, but with the additional feature\n/// of projecting out rotational and translational degrees of freedom\nclass MolecularOptimizer : public OptimizerInterface {\nprivate:\n    /// How to update the hessian: BFGS or SR1\n    std::shared_ptr<MolecularOptimizationTargetInterface> target;\n    Tensor<double> h;\n    double f=1.e10;\n    double gnorm=1.e10;\n\npublic:\n    MolecularOptimizationParameters parameters;\n\n    /// same ctor as the QuasiNewton optimizer\n    MolecularOptimizer(World& world, const commandlineparser& parser,\n    \t\tconst std::shared_ptr<MolecularOptimizationTargetInterface>& tar)\n\t\t\t: target(tar), parameters(world, parser) {\n    }\n\n    /// optimize the underlying molecule\n\n    /// @param[in]  x   the coordinates to compute energy and gradient\n    bool optimize(Tensor<double>& x) {\n        bool converge;\n        converge=optimize_quasi_newton(x);\n//        converge=optimize_conjugate_gradients(x);\n        return converge;\n    }\n\n    bool converged() const {\n        return gradient_norm();\n    }\n\n    bool converged(const Tensor<double>& displacement) const {\n        return (gradient_norm()<parameters.tol() and (displacement.normf()/displacement.size())<parameters.tol());\n    }\n\n    double value() const {return 0.0;}\n\n    double gradient_norm() const {return gnorm;}\n\n    /// set an (initial) hessian\n    void set_hessian(const Tensor<double>& hess) {\n        h=copy(hess);\n    }\n\n\nprivate:\n\n    bool optimize_quasi_newton(Tensor<double>& x) {\n\n        if(parameters.printtest())  target->test_gradient(x, parameters.value_precision());\n\n        bool h_is_identity = (h.size() == 0);\n        if (h_is_identity) {\n            int n = x.dim(0);\n            h = Tensor<double>(n,n);\n\n            // mass-weight the initial hessian\n            for (size_t i=0; i<target->molecule().natom(); ++i) {\n                h(3*i  ,3*i  )=1.0/(target->molecule().get_atom(i).mass);\n                h(3*i+1,3*i+1)=1.0/(target->molecule().get_atom(i).mass);\n                h(3*i+2,3*i+2)=1.0/(target->molecule().get_atom(i).mass);\n            }\n            h*=10.0;\n            madness::print(\"using the identity as initial Hessian\");\n        } else {\n            Tensor<double> normalmodes;\n            Tensor<double> freq=MolecularOptimizer::compute_frequencies(\n                    target->molecule(),h,normalmodes,parameters.remove_dof());\n            madness::print(\"\\ngopt: projected vibrational frequencies (cm-1)\\n\");\n            printf(\"frequency in cm-1   \");\n            for (int i=0; i<freq.size(); ++i) {\n                printf(\"%10.1f\",constants::au2invcm*freq(i));\n            }\n\n        }\n\n        remove_external_dof(h,target->molecule(),parameters.remove_dof());\n\n        // the previous gradient\n        Tensor<double> gp;\n        // the displacement\n        Tensor<double> dx;\n\n        for (int iter=0; iter<parameters.maxiter(); ++iter) {\n            Tensor<double> gradient;\n\n            target->value_and_gradient(x, f, gradient);\n//            print(\"gopt: new energy\",f);\n//            const double rawgnorm = gradient.normf()/sqrt(gradient.size());\n//            print(\"gopt: raw gradient norm \",rawgnorm);\n\n            // remove external degrees of freedom (translation and rotation)\n            Tensor<double> project_ext=projector_external_dof(target->molecule(),parameters.remove_dof());\n            gradient=inner(gradient,project_ext);\n            gnorm = gradient.normf()/sqrt(gradient.size());\n//            print(\"gopt: projected gradient norm \",gnorm);\n//            const double gradratio=rawgnorm/gnorm;\n\n\n//            if (iter == 1 && h_is_identity) {\n//                // Default initial Hessian is scaled identity but\n//                // prefer to reuse any existing approximation.\n//                h.scale(gradient.trace(gp)/gp.trace(dx));\n//            }\n\n            if (iter > 0) {\n                if (parameters.update() == \"bfgs\") QuasiNewton::hessian_update_bfgs(dx, gradient-gp,h);\n                else QuasiNewton::hessian_update_sr1(dx, gradient-gp,h);\n            }\n\n\n            remove_external_dof(h,target->molecule(),parameters.remove_dof());\n            Tensor<double> v, e;\n            syev(h, v, e);\n            Tensor<double> normalmodes;\n            Tensor<double> freq=MolecularOptimizer::compute_frequencies(\n                    target->molecule(),h,normalmodes,parameters.remove_dof());\n            madness::print(\"\\ngopt: projected vibrational frequencies (cm-1)\\n\");\n            printf(\"frequency in cm-1   \");\n            for (int i=0; i<freq.size(); ++i) {\n                printf(\"%10.3f\",constants::au2invcm*freq(i));\n            }\n            printf(\"\\n\");\n\n            // this will invert the hessian, multiply with the gradient and\n            // return the displacements\n            dx = new_search_direction2(gradient,h);\n\n            // line search only for large displacements > 0.01 bohr = 2pm\n            double step=1.0;\n            double maxdx=dx.absmax();\n            if (h_is_identity and (maxdx>0.01)) step = QuasiNewton::line_search(1.0, f,\n                    dx.trace(gradient), x, dx,target, parameters.value_precision());\n\n            dx.scale(step);\n            x += dx;\n            gp = gradient;\n\n            double disp2=dx.normf()/dx.size();\n            printf(\" QuasiNewton iteration %2d energy: %16.8f gradient %.2e displacement %.2e \\n\", iter,f,gnorm, disp2);\n            if (converged(dx)) break;\n        }\n\n        if (parameters.printtest()) {\n            print(\"final hessian\");\n            print(h);\n        }\n        return converged(dx);\n    }\n\n    bool optimize_conjugate_gradients(Tensor<double>& x) {\n\n//        Tensor<double> project_ext=projector_external_dof(target->molecule());\n\n\n        // initial energy and gradient gradient\n        double energy=0.0;\n        Tensor<double> gradient;\n\n        // first step is steepest descent\n        Tensor<double> displacement(x.size());\n        Tensor<double> oldgradient;\n        Tensor<double> old_displacement(x.size());\n        old_displacement.fill(0.0);\n\n        for (int iter=1; iter<parameters.maxiter(); ++iter) {\n\n            // displace coordinates\n            if (iter>1) x+=displacement;\n\n            // compute energy and gradient\n            target->value_and_gradient(x, energy, gradient);\n//            print(\"gopt: new energy\",energy);\n            gnorm = gradient.normf()/sqrt(gradient.size());\n//            print(\"gopt: raw gradient norm \",gnorm);\n\n            // remove external degrees of freedom (translation and rotation)\n            Tensor<double> project_ext=projector_external_dof(target->molecule(),parameters.remove_dof());\n            gradient=inner(gradient,project_ext);\n            gnorm = gradient.normf()/sqrt(gradient.size());\n//            print(\"gopt: projected gradient norm \",gnorm);\n\n            // compute new displacement\n            if (iter==1) {\n                displacement=-gradient;\n            } else {\n                double beta=0.0;\n                if (parameters.cg_method()==\"fletcher_reeves\")\n                    beta=gradient.normf()/oldgradient.normf();\n                if (parameters.cg_method()==\"polak_ribiere\")\n                    beta=gradient.normf()/(gradient-oldgradient).normf();\n                displacement=-gradient + beta * old_displacement;\n            }\n\n            // save displacement for the next step\n            old_displacement=displacement;\n\n            if (converged(displacement)) break;\n        }\n\n        return converged(displacement);\n    }\n\n    /// effectively invert the hessian and multiply with the gradient\n    Tensor<double> new_search_direction2(const Tensor<double>& g,\n            const Tensor<double>& hessian) const {\n        Tensor<double> dx, s;\n        double tol = parameters.gradient_precision();\n        double trust = 1.0; // This applied in spectral basis\n\n        // diagonalize the hessian:\n        // VT H V = lambda\n        // H^-1   = V lambda^-1 VT\n        Tensor<double> v, e;\n        syev(hessian, v, e);\n\n        // Transform gradient into spectral basis\n        // H^-1 g = V lambda^-1 VT g\n        Tensor<double> gv = inner(g,v); // this is VT g == gT V == gv\n\n        // Take step applying restriction\n        int nneg=0, nsmall=0, nrestrict=0;\n        for (int i=0; i<e.size(); ++i) {\n            if (e[i] < -tol) {\n                if (parameters.printtest()) printf(\n                        \"   forcing negative eigenvalue to be positive %d %.1e\\n\", i, e[i]);\n                nneg++;\n                //e[i] = -2.0*e[i]; // Enforce positive search direction\n                e[i] = -0.1*e[i]; // Enforce positive search direction\n            }\n            else if (e[i] < tol) {\n                if (parameters.printtest()) printf(\n                        \"   forcing small eigenvalue to be zero %d %.1e\\n\", i, e[i]);\n                nsmall++;\n                e[i] = tol;\n                gv[i]=0.0;   // effectively removing this direction\n            }\n\n            // this is the step -lambda^-1 gv\n            gv[i] = -gv[i] / e[i];\n            if (std::abs(gv[i]) > trust) { // Step restriction\n                double gvnew = trust*std::abs(gv(i))/gv[i];\n                if (parameters.printtest()) printf(\n                        \"   restricting step in spectral direction %d %.1e --> %.1e\\n\",\n                        i, gv[i], gvnew);\n                nrestrict++;\n                gv[i] = gvnew;\n            }\n        }\n        if (nneg || nsmall || nrestrict)\n            printf(\"   nneg=%d nsmall=%d nrestrict=%d\\n\", nneg, nsmall, nrestrict);\n\n        // Transform back from spectral basis to give the displacements\n        // disp = -V lambda^-1 VT g = V lambda^-1 gv\n        return inner(v,gv);\n    }\n\npublic:\n\n    /// compute the projector to remove transl. and rot. degrees of freedom\n\n    /// taken from http://www.gaussian.com/g_whitepap/vib.htm\n    /// I don't really understand the concept behind the projectors, but it\n    /// seems to work, and it is not written down explicitly anywhere.\n    /// NOTE THE ERROR IN THE FORMULAS ON THE WEBPAGE !\n    /// @param[in]\tdo_remove_dof\twhich dof to remove: x,y,z,Rx,Ry,Rz (transl/rot)\n    static Tensor<double> projector_external_dof(const Molecule& mol,\n    \t\tconst std::vector<std::string>& remove_dof) {\n\n        // compute the translation vectors\n        Tensor<double> transx(3*mol.natom());\n        Tensor<double> transy(3*mol.natom());\n        Tensor<double> transz(3*mol.natom());\n        for (size_t i=0; i<mol.natom(); ++i) {\n            transx[3*i  ]=sqrt(mol.get_atom(i).get_mass_in_au());\n            transy[3*i+1]=sqrt(mol.get_atom(i).get_mass_in_au());\n            transz[3*i+2]=sqrt(mol.get_atom(i).get_mass_in_au());\n        }\n\n        // compute the rotation vectors\n\n        // move the molecule to its center of mass and compute\n        // the moment of inertia tensor\n        Tensor<double> com=mol.center_of_mass();\n        Molecule mol2=mol;\n        mol2.translate(-1.0*com);\n        Tensor<double> I=mol2.moment_of_inertia();\n        I.scale(constants::atomic_mass_in_au);\n\n        // diagonalize the moment of inertia\n        Tensor<double> v,e;\n        syev(I, v, e);  // v being the \"X\" tensor on the web site\n        v=transpose(v);\n\n//        Tensor<double> B(e.size());\n//        for (long i=0; i<e.size(); ++i) B(i)=1.0/(2.0*e(i));\n//        print(\"rotational constants in cm-1\");\n//        print(constants::au2invcm*B);\n\n        // rotation vectors\n        Tensor<double> rotx(3*mol.natom());\n        Tensor<double> roty(3*mol.natom());\n        Tensor<double> rotz(3*mol.natom());\n\n        for (size_t iatom=0; iatom<mol.natom(); ++iatom) {\n\n            // coordinates wrt the center of mass (\"R\" on the web site)\n            Tensor<double> coord(3);\n            coord(0l)=mol.get_atom(iatom).x-com(0l);\n            coord(1l)=mol.get_atom(iatom).y-com(1l);\n            coord(2l)=mol.get_atom(iatom).z-com(2l);\n\n            // note the wrong formula on the Gaussian website:\n            // multiply with sqrt(mass), do not divide!\n            coord.scale(sqrt(mol.get_atom(iatom).get_mass_in_au()));\n\n            // p is the dot product of R and X on the web site\n            Tensor<double> p=inner(coord,v);\n\n            // Eq. (5)\n            rotx(3*iatom + 0)=p(1)*v(0,2)-p(2)*v(0,1);\n            rotx(3*iatom + 1)=p(1)*v(1,2)-p(2)*v(1,1);\n            rotx(3*iatom + 2)=p(1)*v(2,2)-p(2)*v(2,1);\n\n            roty(3*iatom + 0)=p(2)*v(0,0)-p(0l)*v(0,2);\n            roty(3*iatom + 1)=p(2)*v(1,0)-p(0l)*v(1,2);\n            roty(3*iatom + 2)=p(2)*v(2,0)-p(0l)*v(2,2);\n\n            rotz(3*iatom + 0)=p(0l)*v(0,1)-p(1)*v(0,0);\n            rotz(3*iatom + 1)=p(0l)*v(1,1)-p(1)*v(1,0);\n            rotz(3*iatom + 2)=p(0l)*v(2,1)-p(1)*v(2,0);\n\n        }\n\n        // move the translational and rotational vectors to a common tensor\n        auto tmp=remove_dof;\n        for (auto& t : tmp) t=commandlineparser::tolower(t);\n        bool remove_Tx=std::find(tmp.begin(), tmp.end(), \"tx\")!=tmp.end();\n        bool remove_Ty=std::find(tmp.begin(), tmp.end(), \"ty\")!=tmp.end();\n        bool remove_Tz=std::find(tmp.begin(), tmp.end(), \"tz\")!=tmp.end();\n        bool remove_Rx=std::find(tmp.begin(), tmp.end(), \"rx\")!=tmp.end();\n        bool remove_Ry=std::find(tmp.begin(), tmp.end(), \"ry\")!=tmp.end();\n        bool remove_Rz=std::find(tmp.begin(), tmp.end(), \"rz\")!=tmp.end();\n        Tensor<double> ext_dof(6,3*mol.natom());\n        if (remove_Tx) ext_dof(0l,_)=transx;\n        if (remove_Ty) ext_dof(1l,_)=transy;\n        if (remove_Tz) ext_dof(2l,_)=transz;\n\n        if (remove_Rx) ext_dof(3l,_)=rotx;\n        if (remove_Ry) ext_dof(4l,_)=roty;\n        if (remove_Rz) ext_dof(5l,_)=rotz;\n        print(\"removing dof \",remove_Tx, remove_Ty, remove_Tz, remove_Rx, remove_Ry, remove_Rz);\n\n        // normalize\n        for (int i=0; i<6; ++i) {\n            double norm=ext_dof(i,_).normf();\n            if (norm>1.e-14) ext_dof(i,_).scale(1.0/norm);\n            else ext_dof(i,_)=0.0;\n        }\n\n        // compute overlap to orthonormalize the projectors\n        Tensor<double> ovlp=inner(ext_dof,ext_dof,1,1);\n        syev(ovlp,v,e);\n        ext_dof=inner(v,ext_dof,0,0);\n\n        // normalize or remove the dof if necessary (e.g. linear molecules)\n        for (int i=0; i<6; ++i) {\n            if (e(i)<1.e-14) {\n                ext_dof(i,_).scale(0.0);      // take out this degree of freedom\n            } else {\n                ext_dof(i,_).scale(1.0/sqrt(e(i)));   // normalize\n            }\n        }\n\n        // construct projector on the complement of the rotations\n        Tensor<double> projector(3*mol.natom(),3*mol.natom());\n        for (size_t i=0; i<3*mol.natom(); ++i) projector(i,i)=1.0;\n\n        // compute the outer products of the projectors\n        // 1- \\sum_i | t_i >< t_i |\n        projector-=inner(ext_dof,ext_dof,0,0);\n\n        return projector;\n\n    }\n\n    /// remove translational degrees of freedom from the hessian\n\n    /// @param[in]\tdo_remove_dof\twhich dof to remove: x,y,z,Rx,Ry,Rz (transl/rot)\n    static void remove_external_dof(Tensor<double>& hessian, const Molecule& mol,\n    \t\tconst std::vector<std::string>& remove_dof) {\n\n        // compute the translation of the center of mass\n        Tensor<double> projector_ext=projector_external_dof(mol,remove_dof);\n\n        // this is P^T * H * P\n        hessian=inner(projector_ext,inner(hessian,projector_ext),0,0);\n    }\n\n\n    /// returns the vibrational frequencies\n\n    /// @param[in]  hessian the hessian matrix (not mass-weighted)\n    /// @param[out] normalmodes the normal modes\n    /// @param[in]  project_tr whether to project out translation and rotation\n    /// @param[in]  print_hessian   whether to print the hessian matrix\n    /// @return the frequencies in atomic units\n    static Tensor<double> compute_frequencies(const Molecule& molecule,\n            const Tensor<double>& hessian, Tensor<double>& normalmodes,\n            const std::vector<std::string>& remove_dof={}, const bool print_hessian=false) {\n\n        // compute mass-weighing matrices\n        Tensor<double> M=molecule.massweights();\n        Tensor<double> Minv(3*molecule.natom(),3*molecule.natom());\n        for (size_t i=0; i<3*molecule.natom(); ++i) Minv(i,i)=1.0/M(i,i);\n\n        // mass-weight the hessian\n        Tensor<double> mwhessian=inner(M,inner(hessian,M));\n\n        // remove translation and rotation\n        if (remove_dof.size()>0) MolecularOptimizer::remove_external_dof(mwhessian,molecule,remove_dof);\n\n        if (print_hessian) {\n            if (remove_dof.size()>0) {\n                print(\"mass-weighted hessian with translation and rotation projected out\");\n            } else {\n                print(\"mass-weighted unprojected hessian\");\n            }\n            Tensor<double> mmhessian=inner(Minv,inner(mwhessian,Minv));\n            print(mwhessian);\n            print(\"mass-weighted unprojected hessian; mass-weighing undone\");\n            print(mmhessian);\n        }\n\n        Tensor<double> freq;\n        syev(mwhessian,normalmodes,freq);\n        for (long i=0; i<freq.size(); ++i) {\n            if (freq(i)>0.0) freq(i)=sqrt(freq(i)); // real frequencies\n            else freq(i)=-sqrt(-freq(i));           // imaginary frequencies\n        }\n        return freq;\n    }\n\n\n    static Tensor<double> compute_reduced_mass(const Molecule& molecule,\n            const Tensor<double>& normalmodes) {\n\n        Tensor<double> M=molecule.massweights();\n        Tensor<double> D=MolecularOptimizer::projector_external_dof(molecule,{\"Tx\",\"Ty\",\"Tz\",\"Rx\",\"Ry\",\"Rz\"});\n        Tensor<double> L=copy(normalmodes);\n        Tensor<double> DL=inner(D,L);\n        Tensor<double> MDL=inner(M,DL);\n        Tensor<double> mu(3*molecule.natom());\n\n        for (size_t i=0; i<3*molecule.natom(); ++i) {\n            double mu1=0.0;\n            for (size_t j=0; j<3*molecule.natom(); ++j) mu1+=MDL(j,i)*MDL(j,i);\n            if (mu1>1.e-14) mu(i)=1.0/(mu1*constants::atomic_mass_in_au);\n        }\n        return mu;\n    }\n\n};\n\n}\n\n#endif //MADNESS_CHEM_MOLECULAR_OPTIMIZER_H__INCLUDED\n"
  },
  {
    "path": "src/madness/chem/molecularbasis.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include<madness/chem/molecularbasis.h>\n#include \"NWChem.h\"\n\nnamespace madness {\n\nstd::ostream& operator<<(std::ostream& s, const ContractedGaussianShell& c) {\n    static const char* tag[] = {\"s\",\"p\",\"d\",\"f\",\"g\"};\n    const std::size_t maxbufsize=32768;\n    char buf[maxbufsize];\n    std::size_t bufsize= maxbufsize;\n    char* p = buf;\n    const std::vector<double>& coeff = c.get_coeff();\n    const std::vector<double>& expnt = c.get_expnt();\n\n    p += snprintf(p,bufsize,\"%s [\",tag[c.angular_momentum()]);\n    bufsize-=5;\n    for (int i=0; i<c.nprim(); ++i) {\n        p += snprintf(p,bufsize, \"%.6f(%.6f)\",coeff[i],expnt[i]);\n        bufsize-=14;\n        if (i != (c.nprim()-1)) {\n            p += snprintf(p,bufsize, \", \");\n            bufsize-=2;\n        }\n    }\n    p += snprintf(p,bufsize, \"]\");\n    s << buf;\n    return s;\n}\n\nstd::ostream& operator<<(std::ostream& s, const AtomicBasis& c) {\n    const std::vector<ContractedGaussianShell>& shells = c.get_shells();\n    for (int i=0; i<c.nshell(); ++i) {\n        s << \"     \" << shells[i] << std::endl;\n    }\n    if (c.has_guess_info()) {\n        s << \"     \" << \"Guess density matrix\" << std::endl;\n        s << c.get_dmat();\n    }\n    if (c.has_guesspsp_info()) {\n        s << \"     \" << \"Guess density matrix (psp)\" << std::endl;\n        s << c.get_dmatpsp();\n    }\n\n    return s;\n}\n\nstd::ostream& operator<<(std::ostream& s, const AtomicBasisFunction& a) {\n    a.print_me(s);\n    return s;\n}\n\nvoid AtomicBasisFunction::print_me(std::ostream& s) const {\n    s << \"atomic basis function: center \" << xx << \" \" << yy << \" \" << zz << \" : ibf \" << ibf << \" nbf \" << nbf << \" : shell \" << shell << std::endl;\n}\n\n/// Print basis info for atoms in the molecule (once for each unique atom type)\nvoid AtomicBasisSet::print(const Molecule& molecule) const {\n    molecule.print();\n    std::cout << \"\\n \" << name << \" atomic basis set\" << std::endl;\n    for (size_t i=0; i<molecule.natom(); ++i) {\n        const Atom& atom = molecule.get_atom(i);\n        const unsigned int atn = atom.atomic_number;\n        for (size_t j=0; j<i; ++j) {\n            if (molecule.get_atom(j).atomic_number == atn)\n                goto doneitalready;\n        }\n        std::cout << std::endl;\n        std::cout << \"   \" <<  get_atomic_data(atn).symbol << std::endl;\n        std::cout << ag[atn];\ndoneitalready:\n        ;\n    }\n}\n\n/// Print basis info for all supported atoms\nvoid AtomicBasisSet::print_all() const {\n    std::cout << \"\\n \" << name << \" atomic basis set\" << std::endl;\n    for (unsigned int i=0; i<ag.size(); ++i) {\n        if (ag[i].nbf() > 0) {\n            std::cout << \"   \" <<  get_atomic_data(i).symbol << std::endl;\n            std::cout << ag[i];\n        }\n    }\n}\n\nvoid AtomicBasisSet::read_file(std::string filename) {\n    static const bool debug = false;\n    const char* data_dir = MRA_CHEMDATA_DIR;\n\n    std::string full_filename(data_dir);\n    full_filename+=\"/\"+filename;\n\n    // override default location for the basis set\n    if (getenv(\"MRA_CHEMDATA_DIR\")) {\n    \tchar* chemdata_dir=getenv(\"MRA_CHEMDATA_DIR\");\n        full_filename=std::string(chemdata_dir)+\"/\"+filename;\n    }\n\n\n    TiXmlDocument doc(full_filename);\n\n    // try to read the AO basis from current directory, otherwise from\n    // the environment variable MRA_DATA_DIR\n    if (!doc.LoadFile()) {\n\n    \tstd::cout << \"AtomicBasisSet: Failed loading from file \" << filename\n    \t\t\t<< \" : ErrorDesc  \" << doc.ErrorDesc()\n    \t\t\t<< \" : Row \" << doc.ErrorRow()\n    \t\t\t<< \" : Col \" << doc.ErrorCol() << std::endl;\n    \tMADNESS_EXCEPTION(\"AtomicBasisSet: Failed loading basis set\",0);\n    }\n    for (TiXmlElement* node=doc.FirstChildElement(); node; node=node->NextSiblingElement()) {\n        if (strcmp(node->Value(),\"name\") == 0) {\n            name = node->GetText();\n            if (debug) std::cout << \"Loading basis set \" << name << std::endl;\n        }\n        else if (strcmp(node->Value(), \"basis\") == 0) {\n            const char* symbol = node->Attribute(\"symbol\");\n            if (debug) std::cout << \"  found basis set for \" << symbol << std::endl;\n            int atn = symbol_to_atomic_number(symbol);\n            std::vector<ContractedGaussianShell> g;\n            for (TiXmlElement* shell=node->FirstChildElement(); shell; shell=shell->NextSiblingElement()) {\n                const char* type = shell->Attribute(\"type\");\n                int nprim=-1;\n                shell->Attribute(\"nprim\",&nprim);\n                if (debug) std::cout << \"      found shell \" << type << \" \" << nprim << std::endl;\n                std::vector<double> expnt = load_tixml_vector<double>(shell, nprim, \"exponents\");\n                if (strcmp(type,\"L\") == 0) {\n                    std::vector<double> scoeff = load_tixml_vector<double>(shell, nprim, \"scoefficients\");\n                    std::vector<double> pcoeff = load_tixml_vector<double>(shell, nprim, \"pcoefficients\");\n                    g.push_back(ContractedGaussianShell(0,scoeff,expnt));\n                    g.push_back(ContractedGaussianShell(1,pcoeff,expnt));\n                }\n                else {\n                    static const char* tag[] = {\"S\",\"P\",\"D\",\"F\",\"G\"};\n                    int i;\n                    for (i=0; i<5; ++i) {\n                        if (strcmp(type,tag[i]) == 0) goto foundit;\n                    }\n                    MADNESS_EXCEPTION(\"Loading atomic basis set: bad shell type?\",0);\nfoundit:\n                    std::vector<double> coeff = load_tixml_vector<double>(shell, nprim, \"coefficients\");\n                    g.push_back(ContractedGaussianShell(i, coeff, expnt));\n                }\n            }\n            ag[atn] = AtomicBasis(g);\n        }\n        else if (strcmp(node->Value(), \"atomicguess\") == 0) {\n            const char* symbol = node->Attribute(\"symbol\");\n            if (debug) std::cout << \"  atomic guess info for \" << symbol << std::endl;\n            int atn = symbol_to_atomic_number(symbol);\n            MADNESS_ASSERT(is_supported(atn));\n            int nbf = ag[atn].nbf();\n            Tensor<double> dmat = load_tixml_matrix<double>(node, nbf, nbf, \"guessdensitymatrix\");\n            Tensor<double> dmatpsp = dmat;\n            Tensor<double> aocc = load_tixml_matrix<double>(node, nbf, 1, \"alphaocc\");\n            Tensor<double> bocc = load_tixml_matrix<double>(node, nbf, 1, \"betaocc\");\n\t    Tensor<double> aeps = load_tixml_matrix<double>(node, nbf, 1, \"alphaeps\");\n\t    Tensor<double> beps = load_tixml_matrix<double>(node, nbf, 1, \"betaeps\");\n            Tensor<double> aoccpsp = aocc;\n\t    Tensor<double> boccpsp = bocc;\n            Tensor<double> avec = load_tixml_matrix<double>(node, nbf, nbf, \"alphavectors\");\n            Tensor<double> bvec = load_tixml_matrix<double>(node, nbf, nbf, \"betavectors\");\n            ag[atn].set_guess_info(dmat, dmatpsp, avec, bvec, aocc, bocc, aeps, beps, aoccpsp, boccpsp);\n        }\n        else {\n            MADNESS_EXCEPTION(\"Loading atomic basis set: unexpected XML element\", 0);\n        }\n    }\n\n}\n\nvoid AtomicBasisSet::read_nw_file(std::string filename) {\n\n    // Construct the slymer object that contains interface\n    std::ostream bad(nullptr);\n    slymer::NWChem_Interface nwchem(filename, bad);\n\n    // Read in the molecule info\n    nwchem.read(slymer::Properties::Atoms);\n\n    // Let madness know a basis exists on each atom...\n    for(const slymer::Atom &atom : nwchem.atoms) {\n        int atn = symbol_to_atomic_number(atom.symbol);\n \n        // We need to add to ag[atn] so madness doesn't baulk\n        // These functions will not be used in anyway. Need \n        // to add at least the number of orbitals to work.\n        // Adding in 2 basis functions per electron, just to \n        // be safe.\n        if (ag[atn].nbf() == 0) {\n            std::vector<ContractedGaussianShell> g;\n            for(int i = 0; i < atn; i++) {\n               g.push_back(ContractedGaussianShell(0,{1},{1}));\n               g.push_back(ContractedGaussianShell(1,{2},{2}));\n            }\n            ag[atn] = AtomicBasis(g);\n        }\n    }\n}\n\n\n\nvoid AtomicBasisSet::modify_dmat_psp(int atn, double zeff){\n    static const bool debug = false;\n\n    // number of core states to be eliminated\n    int zcore = atn - round(zeff);\n\n    Tensor<double> aocc = ag[atn].get_aoccpsp();\n    Tensor<double> bocc = ag[atn].get_boccpsp();\n\n    double occ_sum = aocc.sum() + bocc.sum();\n\n    if (debug) std::cout << \"before: atn, zeff, occ_sum  \" << atn << \" \" << zeff << \"  \" << occ_sum << std::endl;\n    if (debug) std::cout << \"aocc:\" << std::endl;\n    if (debug) std::cout << aocc << std::endl;\n    if (debug) std::cout << \"bocc:\" << std::endl;\n    if (debug) std::cout << bocc << std::endl;\n\n    // return immediately if we already modified this atom type or if there are no core states\n    // allow for noise in occupancy sum\n    double tol=1e-4;\n    if (zcore==0 || (occ_sum < zeff+tol && occ_sum > zeff-tol)) return;\n\n    // otherwise check that total occupancy matches atomic number within tolerance\n    if (occ_sum > atn+tol || occ_sum < atn-tol){\n        MADNESS_EXCEPTION(\"Problem with occupancy of initial guess\", 0);\n    }\n\n    // set occupancies for relevant core states to zero\n    // assuming that there is an even number of core states with occupancy 1\n    for (int i=0;i<zcore/2;++i){\n        aocc[i] = 0.0;\n        bocc[i] = 0.0;\n    }\n\n    if (debug) std::cout << \"after: atn, zeff, occ_sum  \" << atn << \" \" << zeff << \"  \" << occ_sum << std::endl;\n    if (debug) std::cout << \"aocc:\" << std::endl;\n    if (debug) std::cout << aocc << std::endl;\n    if (debug) std::cout << \"bocc:\" << std::endl;\n    if (debug) std::cout << bocc << std::endl;\n\n    ag[atn].set_aoccpsp(aocc);\n    ag[atn].set_boccpsp(bocc);\n\n    // recalculate the density matrix with new occupancies\n    Tensor<double> avec = ag[atn].get_avec();\n    Tensor<double> bvec = ag[atn].get_bvec();\n\n    Tensor<double> aovec = transpose(avec);\n    Tensor<double> bovec = transpose(bvec);\n\n    // multiply vectors by occupancies\n    for (int i=0;i<aocc.size();++i){\n        for (int j=0;j<aocc.size();++j){\n            aovec(i,j) *= aocc[i];\n            bovec(i,j) *= bocc[i];\n        }\n    }\n\n    Tensor<double> dmata = inner(avec, aovec);\n    Tensor<double> dmatb = inner(bvec, bovec);\n    Tensor<double> dmat = dmata + dmatb;\n\n    if (debug) std::cout << \"dmat:\" << std::endl;\n    if (debug) std::cout << dmat << std::endl;\n\n    ag[atn].set_dmatpsp(dmat);\n\n}\n\n\n}\n"
  },
  {
    "path": "src/madness/chem/molecularbasis.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_CHEM_MOLECULAR_BASIS_H__INCLUDED\n#define MADNESS_CHEM_MOLECULAR_BASIS_H__INCLUDED\n\n#include <madness/madness_config.h>\n#include <madness/constants.h>\n#include<madness/chem/molecule.h>\n#include<madness/chem/atomutil.h>\n#include <madness/external/tinyxml/tinyxml.h>\n#include <madness/tensor/tensor.h>\n\n#include <vector>\n#include <algorithm>\n#include <iostream>\n#include <sstream>\n#include <iomanip>\n#include <cstdio>\n\nnamespace madness {\n/// Represents a single shell of contracted, Cartesian, Gaussian primitives\nclass ContractedGaussianShell {\npublic:\n    static const int maxtype=6; ///< Maximum angular momentum supported\n    static const int maxbf=(maxtype+1)*(maxtype+2)/2; ///< Maximum number of basis functions in a shell\nprivate:\n    int type;  ///< Angular momentum = 0, 1, 2, ...\n    std::vector<double> coeff;\n    std::vector<double> expnt;\n    double rsqmax;\n    int numbf;  ///< Number of basis functions in shell (type+1)*(type+2)/2\n\n    void normalize() {\n        // nwcchem cartesian normalization conventions\n        // translation of nmcoeff.F into python and thence to c++\n        int np = coeff.size();\n        if (np == 1) coeff[0] = 1.0e0;\n\n        double pi32=pow(madness::constants::pi,1.5);\n        int l_lim = 2*type - 1;\n        double f = 1.0e00;\n        for (int n=l_lim; n>1; n-=2) f *= n;\n\n        for (int n=0; n<np; ++n)\n            coeff[n] *= pow(2.e0*expnt[n]/madness::constants::pi,0.75e0)*pow(4.e0*expnt[n],0.5E0*type)/sqrt(f);\n\n        double sum = 0.0;\n        for (int n1=0; n1<np; ++n1) {\n            for (int n2=0; n2<np; ++n2) {\n                double S =pi32/pow(expnt[n1]+expnt[n2],1.5e0+type)/pow(2e0,type);\n                sum = sum + coeff[n1]*coeff[n2]*S;\n            }\n        }\n        sum *= f;\n\n        f = 1e0/sqrt(sum);\n        for (int n=0; n<np; ++n) coeff[n] *= f;\n    }\n\npublic:\n    ContractedGaussianShell()\n            : type(-1), coeff(), expnt(), rsqmax(0.0), numbf(0) {};\n\n    ContractedGaussianShell(int type,\n                            const std::vector<double>& coeff,\n                            const std::vector<double>& expnt,\n                            bool donorm=true)\n            : type(type), coeff(coeff), expnt(expnt), numbf((type+1)*(type+2)/2) {\n        if (donorm) normalize();\n        double minexpnt = expnt[0];\n        for (unsigned int i=1; i<expnt.size(); ++i)\n            minexpnt = std::min(minexpnt,expnt[i]);\n        rsqmax = 27.6/minexpnt;  // 27.6 = log(1e12)\n    }\n\n\n    /// Returns square of the distance beyond which function is less than 1e-8.\n    double rangesq() const {\n        return rsqmax;\n    }\n\n\n    /// Evaluates the radial part of the contracted function\n    double eval_radial(double rsq) const {\n        if (rsq > rsqmax) return 0.0;\n        double sum = 0.0;\n        for (unsigned int i=0; i<coeff.size(); ++i) {\n            double ersq = expnt[i]*rsq;\n            if (ersq < 27.6) sum += coeff[i]*exp(-ersq); // 27.6 = log(1e12)\n        }\n        return sum;\n    }\n\n\n    /// Evaluates the entire shell returning the incremented result pointer\n    double* eval(double rsq, double x, double y, double z, double* bf) const {\n        double R = eval_radial(rsq);\n        if (fabs(R) < 1e-12) {\n            for (int i=0; i<numbf; ++i) bf[i] = 0.0;\n\n        }\n        else {\n            switch (type) {\n            case 0:\n                bf[0] =  R;\n                break;\n            case 1:\n                bf[0] =  R*x;\n                bf[1] =  R*y;\n                bf[2] =  R*z;\n                break;\n            case 2:\n              { // braces need by some compilers to limit scope of fac\n                static const double fac = 1.0; //sqrt(3.0);\n                bf[0] = R*x*x;\n                bf[1] = R*x*y*fac;\n                bf[2] = R*x*z*fac;\n                bf[3] = R*y*y;\n                bf[4] = R*y*z*fac;\n                bf[5] = R*z*z;\n              }\n                break;\n            case 3:\n                bf[0] = R*x*x*x;\n                bf[1] = R*x*x*y;\n                bf[2] = R*x*x*z;\n                bf[3] = R*x*y*y;\n                bf[4] = R*x*y*z;\n                bf[5] = R*x*z*z;\n                bf[6] = R*y*y*y;\n                bf[7] = R*y*y*z;\n                bf[8] = R*y*z*z;\n                bf[9] = R*z*z*z;\n                break;\n\n            default:\n                throw \"UNKNOWN ANGULAR MOMENTUM\";\n            }\n        }\n        return bf+numbf;\n    }\n\n\n    /// Returns the shell angular momentum\n    int angular_momentum() const {\n        return type;\n    }\n\n    /// Returns the number of basis functions in the shell\n    int nbf() const {\n        return numbf;\n    }\n\n    /// Returns the number of primitives in the contraction\n    int nprim() const {\n        return coeff.size();\n    }\n\n    /// Returns a const reference to the coefficients\n    const std::vector<double>& get_coeff() const {\n        return coeff;\n    }\n\n    /// Returns a const reference to the exponents\n    const std::vector<double>& get_expnt() const {\n        return expnt;\n    }\n\n    /// Returns a string description of the basis function type\n    const char* get_desc(int ibf) const {\n        static const char* tags[4][10] = {\n            {\"s\"   ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    } ,\n            {\"px\"  ,\"py\"  ,\"pz\"  ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    ,\"\"    } ,\n            {\"dxx\" ,\"dxy\" ,\"dxz\" ,\"dyy\" ,\"dyz\" ,\"dzz\" ,\"\"    ,\"\"    ,\"\"    ,\"\"    } ,\n            {\"fxxx\",\"fxxy\",\"fxxz\",\"fxyy\",\"fxyz\",\"fxzz\",\"fxzz\",\"fyyy\",\"fyzz\",\"fzzz\"}\n        };\n        MADNESS_ASSERT(ibf<numbf && ibf >= 0);\n        return tags[type][ibf];\n    }\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & type & coeff & expnt & rsqmax & numbf;\n    }\n};\n\n/// Represents multiple shells of contracted gaussians on a single center\nclass AtomicBasis {\n    std::vector<ContractedGaussianShell> g;\n    double rmaxsq;\n    int numbf;\n    Tensor<double> dmat, dmatpsp, avec, bvec, aocc, bocc, aeps, beps, aoccpsp, boccpsp;\n\npublic:\n    AtomicBasis() : g(), rmaxsq(0.0), numbf(0) {};\n\n    AtomicBasis(const std::vector<ContractedGaussianShell>& g)\n            : g(g) {\n        rmaxsq = 0.0;\n        numbf = 0;\n        for (unsigned int i=0; i<g.size(); ++i) {\n            rmaxsq = std::max(rmaxsq, g[i].rangesq());\n            numbf += g[i].nbf();\n        }\n    }\n\n    void set_guess_info(const Tensor<double>& dmat, const Tensor<double>& dmatpsp,\n                        const Tensor<double>& avec, const Tensor<double>& bvec,\n                        const Tensor<double>& aocc, const Tensor<double>& bocc,\n                        const Tensor<double>& aeps, const Tensor<double>& beps,\n                        const Tensor<double>& aoccpsp, const Tensor<double>& boccpsp) {\n        this->dmat = copy(dmat);\n        this->dmatpsp = copy(dmatpsp);\n        this->avec = copy(avec);\n        this->bvec = copy(bvec);\n        this->aocc = copy(aocc);\n        this->beps = copy(beps);\n        this->aeps = copy(aeps);\n        this->bocc = copy(bocc);\n        this->aoccpsp = copy(aoccpsp);\n        this->boccpsp = copy(boccpsp);\n    }\n\n    /// Returns the number of basis functions on the center\n    int nbf() const {\n        return numbf;\n    }\n\n    /// Returns the number of shells on the center\n    int nshell() const {\n        return g.size();\n    }\n\n    /// Returns a const reference to the shells\n    const std::vector<ContractedGaussianShell>& get_shells() const {\n        return g;\n    };\n\n    /// Evaluates the basis functions at point x, y, z relative to atomic center\n\n    /// The array bf[] must be large enough to hold nbf() values.\n    ///\n    /// Returned is the incremented pointer.\n    double* eval(double x, double y, double z, double* bf) const {\n        double rsq = x*x + y*y + z*z;\n        if (rsq > rmaxsq) {\n            for (int i=0; i<numbf; ++i) bf[i] = 0.0;\n            return bf+numbf;\n        }\n\n        double* bfstart = bf;\n        for (unsigned int i=0; i<g.size(); ++i) {\n            bf = g[i].eval(rsq, x, y, z, bf);\n        }\n        // paranoia is good\n        MADNESS_CHECK(bf-bfstart == numbf);\n        return bf;\n    }\n\n    /// Evaluates the guess atomic density at point x, y, z relative to atomic center\n    double eval_guess_density(double x, double y, double z, bool pspat) const {\n        MADNESS_ASSERT(has_guess_info());\n        double rsq = x*x + y*y + z*z;\n        if (rsq > rmaxsq) return 0.0;\n\n        double bf[ContractedGaussianShell::maxbf];\n        eval(x, y, z, bf);\n        const double* p;\n        // check if pseudo-atom\n        if (pspat){\n            p = dmatpsp.ptr();}\n        else{\n            p = dmat.ptr();}\n        double sum = 0.0;\n        for (int i=0; i<numbf; ++i, p+=numbf) {\n            double sumj = 0.0;\n            for (int j=0; j<numbf; ++j)\n                sumj += p[j]*bf[j];\n            sum += bf[i]*sumj;\n        }\n        return sum;\n    }\n\n    /// Return shell that contains basis function ibf and also return index of function in the shell\n    const ContractedGaussianShell& get_shell_from_basis_function(int ibf, int& ibf_in_shell) const {\n        int n=0;\n        for (unsigned int i=0; i<g.size(); ++i) {\n            int nbf_in_shell = g[i].nbf();\n            if (ibf>=n && ibf<(n+nbf_in_shell)) {\n                ibf_in_shell = ibf-n;\n                return g[i];\n            }\n            else {\n                n += g[i].nbf();\n            }\n        }\n        MADNESS_EXCEPTION(\"AtomicBasis: get_shell_from_basis_function\", ibf*100000 + nbf());\n    }\n\n    bool has_guess_info() const {\n        return dmat.size()>0;\n    }\n\n    const Tensor<double>& get_dmat() const {\n        return dmat;\n    };\n\n    void set_dmat(Tensor<double>& mat) {\n       dmat = mat;\n    };\n\n    bool has_guesspsp_info() const {\n        return dmatpsp.size()>0;\n    }\n\n    const Tensor<double>& get_dmatpsp() const {\n        return dmatpsp;\n    };\n\n    void set_dmatpsp(Tensor<double>& mat) {\n       dmatpsp = mat;\n    };\n\n    const Tensor<double>& get_avec() const {\n        return avec;\n    };\n\n    const Tensor<double>& get_bvec() const {\n        return bvec;\n    };\n\n    const Tensor<double>& get_aeps() const {\n        return aeps;\n    };\n\n    const Tensor<double>& get_beps() const {\n        return beps;\n    };\n\n    const Tensor<double>& get_aocc() const {\n        return aocc;\n    };\n\n    const Tensor<double>& get_bocc() const {\n        return bocc;\n    };\n\n    void set_aocc(Tensor<double>& occ) {\n       aocc = occ;\n    };\n\n    void set_bocc(Tensor<double>& occ)  {\n       bocc = occ;\n    };\n\n    const Tensor<double>& get_aoccpsp() const {\n        return aoccpsp;\n    };\n\n    const Tensor<double>& get_boccpsp() const {\n        return boccpsp;\n    };\n\n    void set_aoccpsp(Tensor<double>& occ) {\n       aoccpsp = occ;\n    };\n\n    void set_boccpsp(Tensor<double>& occ)  {\n       boccpsp = occ;\n    };\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & g & rmaxsq & numbf & dmat & dmatpsp & avec & bvec & aocc & bocc & aeps & beps & aoccpsp & boccpsp;\n    }\n\n};\n\n/// Used to represent one basis function from a shell on a specific center\nclass AtomicBasisFunction {\nprivate:\n    const double xx, yy, zz; // Coordinates of the center\n    const ContractedGaussianShell& shell; // Reference to the underlying atomic shell\n    const int ibf; // Index of basis function in the shell (0, 1, ...)\n    const int nbf; // Number of functions in the shell\n\npublic:\n    AtomicBasisFunction(double x, double y, double z,\n                        const ContractedGaussianShell& shell, int ibf)\n            : xx(x), yy(y), zz(z), shell(shell), ibf(ibf), nbf(shell.maxbf) {}\n\n\n    AtomicBasisFunction(const AtomicBasisFunction& aofunc)\n            : xx(aofunc.xx)\n            , yy(aofunc.yy)\n            , zz(aofunc.zz)\n            , shell(aofunc.shell)\n            , ibf(aofunc.ibf)\n            , nbf(aofunc.nbf) {}\n\n    double operator()(double x, double y, double z) const {\n        double bf[ContractedGaussianShell::maxbf];\n        x-=xx;\n        y-=yy;\n        z-=zz;\n        double rsq = x*x + y*y + z*z;\n        shell.eval(rsq, x, y, z, bf);\n        return bf[ibf];\n    }\n\n    void print_me(std::ostream& s) const;\n\n    const ContractedGaussianShell& get_shell() const {\n        return shell;\n    }\n\n    int get_index() const {\n        return ibf;\n    }\n\n    const char* get_desc() const {\n        return shell.get_desc(ibf);\n    }\n\n    void get_coords(double& x, double& y, double& z) const {\n    \tx=xx; y=yy; z=zz;\n        return;\n    }\n\n    madness::Vector<double,3> get_coords_vec() const {\n        return madness::Vector<double,3>{xx, yy, zz};\n    }\n\n    double rangesq() const {\n        return shell.rangesq();\n    }\n};\n\n/// Contracted Gaussian basis\nclass AtomicBasisSet {\n    std::string name;\n    std::vector<AtomicBasis> ag;  ///< Basis associated by atomic number = 1, 2, ...; 0=Bq.\n\n    template <typename T>\n    std::vector<T> load_tixml_vector(TiXmlElement* node, int n, const char* name) {\n        TiXmlElement* child = node->FirstChildElement(name);\n        MADNESS_ASSERT(child);\n        std::istringstream s(child->GetText());\n        std::vector<T> r(n);\n        for (int i=0; i<n; ++i) {\n            s >> r[i];\n            MADNESS_ASSERT(s);\n        }\n        return r;\n    }\n\n    template <typename T>\n    Tensor<T> load_tixml_matrix(TiXmlElement* node, int n, int m, const char* name) {\n        TiXmlElement* child = node->FirstChildElement(name);\n        MADNESS_ASSERT(child);\n        std::istringstream s(child->GetText());\n        Tensor<T> r(n,m);\n        for (int i=0; i<n; ++i) {\n            for (int j=0; j<m; ++j) {\n                s >> r(i,j);\n                MADNESS_ASSERT(s);\n            }\n        }\n        return r;\n    }\n\npublic:\n    AtomicBasisSet() : name(\"unknown\"), ag(110) {}\n\n\n    AtomicBasisSet(std::string filename) : name(\"\"), ag(110) {\n        read_file(filename);\n    }\n\n    std::string get_name() const {return name;}\n\n    /// read the atomic basis set from file\n\n    /// use the default location MRA_CHEMDATA_DIR as defined in the Makefile.am\n    /// unless it is overridden by the environment variable MRA_CHEMDATA_DIR\n    /// @param[in]\tfilename\tthe name of the basis set (sto-3g, 6-31g, etc)\n    void read_file(std::string filename);\n\n    /// read the atomic basis set from file\n\n    /// @param[in]\tfilename\tthe base name of nwchem files (.out and .movecs)\n    void read_nw_file(std::string filename);\n\n\n\n    /// Makes map from atoms to first basis function on atom and number of basis functions on atom\n    void atoms_to_bfn(const Molecule& molecule, std::vector<int>& at_to_bf, std::vector<int>& at_nbf) const {\n        at_to_bf = std::vector<int>(molecule.natom());\n        at_nbf   = std::vector<int>(molecule.natom());\n\n        int n = 0;\n        for (size_t i=0; i<molecule.natom(); ++i) {\n            const Atom& atom = molecule.get_atom(i);\n            const int atn = atom.atomic_number;\n            MADNESS_ASSERT(is_supported(atn));\n            at_to_bf[i] = n;\n            at_nbf[i] = ag[atn].nbf();\n            n += at_nbf[i];\n        }\n    }\n\n    /// Makes map from shells to first basis function on she and number of basis functions on sh\n    void shells_to_bfn(const Molecule& molecule, std::vector<int>& sh_to_bf, std::vector<int>& sh_nbf) const {\n        sh_to_bf = std::vector<int>();\n        sh_nbf   = std::vector<int>();\n\n        int nbf = 0;\n        for (size_t i=0; i<molecule.natom(); ++i) {\n            const Atom& atom = molecule.get_atom(i);\n            const int atn = atom.atomic_number;\n            MADNESS_ASSERT(is_supported(atn));\n            const auto& shells = ag[atn].get_shells();\n            for (const auto& sh : shells) {\n                int n = sh.nbf();\n                sh_nbf.push_back(n);\n                sh_to_bf.push_back(nbf);\n                nbf += n;\n            }\n        }\n    }\n\n    /// Returns the atomic alpha eigenvectors for atom iat\n    const Tensor<double>& get_avec(const Molecule& molecule, size_t iat) const {\n      MADNESS_ASSERT(iat>=0 && iat<molecule.natom());\n      const Atom& atom = molecule.get_atom(iat);\n      const int atn = atom.atomic_number;\n      MADNESS_ASSERT(is_supported(atn));\n      return ag[atn].get_avec();\n    }\n\n    /// Returns the atomic alpha eigenvalues for atom iat\n    const Tensor<double>& get_aeps(const Molecule& molecule, size_t iat) const {\n      MADNESS_ASSERT(iat>=0 && iat<molecule.natom());\n      const Atom& atom = molecule.get_atom(iat);\n      const int atn = atom.atomic_number;\n      MADNESS_ASSERT(is_supported(atn));\n      return ag[atn].get_aeps();\n    }\n\n    /// Returns the number of the atom the ibf'th basis function is on\n    int basisfn_to_atom(const Molecule& molecule, size_t ibf) const {\n        MADNESS_ASSERT(ibf >= 0);\n        size_t n = 0;\n        for (size_t i=0; i<molecule.natom(); ++i) {\n            // Is the desired function on this atom?\n            const Atom& atom = molecule.get_atom(i);\n            const int atn = atom.atomic_number;\n            MADNESS_ASSERT(is_supported(atn));\n            const int nbf_on_atom = ag[atn].nbf();\n            if (ibf >= n  && (n+nbf_on_atom) > ibf) {\n                return i;\n            }\n            else {\n                n += nbf_on_atom;\n            }\n        }\n        MADNESS_EXCEPTION(\"AtomicBasisSet: get_atomic_basis_function: confused?\", ibf);\n    }\n\n    /// Returns the ibf'th atomic basis function\n    AtomicBasisFunction get_atomic_basis_function(const Molecule& molecule, size_t ibf) const {\n        MADNESS_ASSERT(ibf >= 0);\n        size_t n = 0;\n        for (size_t i=0; i<molecule.natom(); ++i) {\n            // Is the desired function on this atom?\n            const Atom& atom = molecule.get_atom(i);\n            const int atn = atom.atomic_number;\n            MADNESS_ASSERT(is_supported(atn));\n            const int nbf_on_atom = ag[atn].nbf();\n            if (ibf >= n  && (n+nbf_on_atom) > ibf) {\n                int index;\n                const ContractedGaussianShell& shell =\n                    ag[atn].get_shell_from_basis_function(ibf-n, index);\n                return AtomicBasisFunction(atom.x, atom.y, atom.z, shell, index);\n            }\n            else {\n                n += nbf_on_atom;\n            }\n        }\n        MADNESS_EXCEPTION(\"AtomicBasisSet: get_atomic_basis_function: confused?\", ibf);\n    }\n\n\n    /// Given a molecule count the number of basis functions\n    int nbf(const Molecule& molecule) const {\n        int n = 0;\n        for (size_t i=0; i<molecule.natom(); ++i) {\n            const Atom& atom = molecule.get_atom(i);\n            const int atn = atom.atomic_number;\n            MADNESS_ASSERT(is_supported(atn));\n            n += ag[atn].nbf();\n        }\n        return n;\n    }\n\n    /// Evaluates the basis functions\n    void eval(const Molecule& molecule, double x, double y, double z, double *bf) const {\n        for (size_t i=0; i<molecule.natom(); ++i) {\n            const Atom& atom = molecule.get_atom(i);\n            const int atn = atom.atomic_number;\n            bf = ag[atn].eval(x-atom.x, y-atom.y, z-atom.z, bf);\n        }\n    }\n\n\n    /// Evaluates the guess density\n    double eval_guess_density(const Molecule& molecule, double x, double y, double z) const {\n        double sum = 0.0;\n        bool pspat;\n        for (size_t i=0; i<molecule.natom(); ++i) {\n            const Atom& atom = molecule.get_atom(i);\n            if (atom.pseudo_atom){\n                pspat=true;}\n            else{\n                pspat=false;}\n            const int atn = atom.atomic_number;\n            sum += ag[atn].eval_guess_density(x-atom.x, y-atom.y, z-atom.z, pspat);\n        }\n        return sum;\n    }\n\n    bool is_supported(int atomic_number) const {\n        return ag[atomic_number].nbf() > 0;\n    }\n\n    /// Print basis info for atoms in the molecule (once for each unique atom type)\n    void print(const Molecule& molecule) const;\n\n    /// Eliminates core orbitals from the density matrix for pseudopotential calculations\n    void modify_dmat_psp(int atn, double zeff);\n\n    template <typename T>\n    class AnalysisSorter {\n        const Tensor<T> v;\n    public:\n        AnalysisSorter(const Tensor<T>& v) : v(v) {}\n        bool operator()(long i, long j) const {\n            return std::abs(v[i]) > std::abs(v[j]);\n        }\n    };\n\n    /// Given a vector of AO coefficients prints an analysis\n\n    /// For each significant coeff it prints\n    /// - atomic symbol\n    /// - atom number\n    /// - basis function type (e.g., dxy)\n    /// - basis function number\n    /// - MO coeff\n    template <typename T>\n    void print_anal(const Molecule& molecule, const Tensor<T>& v) const {\n        const double thresh = 0.2*v.normf();\n        if (thresh == 0.0) {\n            printf(\"    zero vector\\n\");\n            return;\n        }\n        long nbf = int(v.dim(0));\n        std::vector<long> list(nbf);\n        long ngot=0;\n        for (long i=0; i<nbf; ++i) {\n            if (std::abs(v(i)) > thresh) {\n                list[ngot++] = i;\n            }\n        }\n        std::sort(list.begin(),list.begin()+ngot,AnalysisSorter<T>(v));\n\n        const char* format;\n        if (molecule.natom() < 10) {\n            format = \"  %2s(%1d)%4s(%2ld)%6.3f  \";\n        }\n        else if (molecule.natom() < 100) {\n            format = \"  %2s(%2d)%4s(%3ld)%6.3f  \";\n        }\n        else if (molecule.natom() < 1000) {\n            format = \"  %2s(%3d)%4s(%4ld)%6.3f  \";\n        }\n        else {\n            format = \"  %2s(%4d)%4s(%5ld)%6.3f  \";\n        }\n        printf(\"         \");\n        for (long ii=0; ii<ngot; ++ii) {\n            long ibf = list[ii];\n\n            const int iat = basisfn_to_atom(molecule, ibf);\n            const Atom& atom = molecule.get_atom(iat);\n            const AtomicBasisFunction ao = get_atomic_basis_function(molecule, ibf);\n            const char* desc = ao.get_desc();\n            const char* element = get_atomic_data(atom.atomic_number).symbol;\n\n            // This will need wrapping in a template for a complex MO vector\n            printf(format, element, iat, desc, ibf, v[ibf]);\n        }\n        printf(\"\\n\");\n    }\n\n    /// Print basis info for all supported atoms\n    void print_all() const;\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & name & ag;\n    }\n};\n}\n\n\n#endif\n"
  },
  {
    "path": "src/madness/chem/molecule.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id: test.cc 257 2007-06-25 19:09:38Z HartmanBaker $\n*/\n\n\n/// \\file moldft/molecule.cc\n/// \\brief Simple management of molecular information and potential\n\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/tensor_lapack.h>\n#include <madness/constants.h>\n#include <madness/world/world.h>\n#include<madness/chem/molecule.h>\n#include<madness/chem/gth_pseudopotential.h>\n#include<madness/chem/atomutil.h>\n#include <madness/misc/misc.h>\n#include <iomanip>\n#include <set>\n\nnamespace madness {\nstatic inline double distance(double x1, double y1, double z1, double x2, double y2, double z2) {\n    double xx = x1-x2;\n    double yy = y1-y2;\n    double zz = z1-z2;\n    return sqrt(xx*xx + yy*yy + zz*zz);\n}\n\nstatic inline double distance_sq(double x1, double y1, double z1, double x2, double y2, double z2) {\n    double xx = x1-x2;\n    double yy = y1-y2;\n    double zz = z1-z2;\n    return xx*xx + yy*yy + zz*zz;\n}\n\n\n/// read molecule from the input file and return part of the header for\n/// a Gaussian cube file.\n/// @param[in]  filename input file name (usually \"input\")\nstd::vector<std::string> cubefile_header(std::string filename, const bool& no_orient=false) {\n    Molecule molecule;\n    molecule.read_file(filename);\n    if(no_orient==false) molecule.orient();\n    return molecule.cubefile_header();\n}\n\n\nstd::ostream& operator<<(std::ostream& s, const Atom& atom) {\n    s << \"Atom([\" << atom.x << \", \" << atom.y << \", \" << atom.z << \"], \" << atom.q << \",\" << atom.atomic_number << \")\";\n    return s;\n}\n\nMolecule::Molecule(std::vector<Atom> atoms, double eprec, CorePotentialManager core_pot, madness::Tensor<double> field) : atoms(std::move(atoms)), core_pot(std::move(core_pot)), field(std::move(field)) {\n  atomic_radii.reserve(this->atoms.size());\n  for(auto&& atom: this->atoms) {\n    double radius =\n        get_atomic_data(atom.get_atomic_number()).covalent_radius;\n    atomic_radii.emplace_back(\n        radius * 1e-10 /\n        madness::constants::atomic_unit_of_length);\n  }\n  this->update_rcut_with_eprec(eprec);\n}\n\n  Molecule::Molecule(World& world, const commandlineparser& parser) :atoms(), rcut(), core_pot(), field(3L), parameters(world,parser)\n{\n    try {\n        if (world.rank()==0) {\n            get_structure();\n            if (parameters.core_type() != \"none\") {\n                read_core_file(parameters.core_type());\n            }\n        }\n        world.gop.broadcast_serializable(*this, 0);\n        MADNESS_CHECK(parameters.field().size()==3);\n        for (int i=0; i<3; ++i) field(i)=parameters.field()[i];\n    } catch (...) {\n        std::cout << \"\\n\\nsomething went wrong in the geometry input\" << std::endl;\n        std::cout << \"geometry parameters \" << std::endl << std::endl;\n        parameters.print(\"geometry\",\"end\");\n        throw madness::MadnessException(\"faulty geometry input\",0,1,__LINE__,__FUNCTION__,__FILE__);\n    }\n}\n\n\nvoid Molecule::print_parameters() {\n    GeometryParameters param;\n    madness::print(\"default parameters for the geometry input:\\n\");\n    param.print(\"geometry\",\"end\");\n    madness::print(\"\");\n    madness::print(\"\");\n\n\n    madness::print(\"If the molecular geometry is provided in the input file you need to specify\");\n    madness::print(\"the coordinates inside the geometry block\\n\");\n    madness::print(\"Example:\\n\");\n    madness::print(\"geometry\");\n    madness::print(\"  units  atomic \");\n    madness::print(\"  O                     0                   0          0.21300717 \");\n    madness::print(\"  H                     0           1.4265081         -0.85202867 \");\n    madness::print(\"  H                     0          -1.4265081         -0.85202867 \");\n    madness::print(\"end\\n\");\n}\n\nvoid Molecule::get_structure() {\n\n    // read input parameters from the input file\n    std::string sourcetype=parameters.source_type();\n    std::string sourcename=parameters.source_name();\n\n    if (sourcetype == \"inputfile\") {\n        try {\n            std::ifstream ifile(sourcename);\n            read(ifile);\n        } catch (const std::exception& err) {\n            std::cout << \"caught runtime error: \" << err.what() << std::endl;\n            std::cout << \"failed to load geometry from input file\" << std::endl;\n            MADNESS_EXCEPTION(\"failed to load geometry from input file\",1);\n        }\n\n\n    } else if (sourcetype == \"library\") {\n        read_structure_from_library(sourcename);\n    } else if (sourcetype == \"xyz\") {\n        try {\n            read_xyz(sourcename);\n        } catch (std::exception& err) {\n            std::cout << \"could not read from xyz-file \" << sourcename <<  std::endl;\n            std::cout << \"source \" << sourcetype << \"  \" << sourcename << std::endl;\n            MADNESS_EXCEPTION(\"failed to get geometry\",1);\n        }\n\n    } else {\n        std::cout << \"could not determine molecule\" << std::endl;\n        std::cout << \" source_type \" << sourcetype << std::endl;\n        std::cout << \" source_name \" << sourcename << std::endl;\n        MADNESS_EXCEPTION(\"failed to get geometry\",1);\n    }\n\n\n    // set derived parameters for the molecule\n\n    //if psp_calc is true, set all atoms to PS atoms\n    //if not, check whether some atoms are PS atoms or if this a pure AE calculation\n    if (parameters.get<bool>(\"psp_calc\")) {\n        for (size_t iatom = 0; iatom < natom(); iatom++) {\n            set_pseudo_atom(iatom, true);\n        }\n    }\n\n    //modify atomic charge for complete PSP calc or individual PS atoms\n    for (size_t iatom = 0; iatom < natom(); iatom++) {\n        if (get_pseudo_atom(iatom)) {\n            unsigned int an = get_atomic_number(iatom);\n            double zeff = madness::get_charge_from_file(\"gth.xml\", an);\n            set_atom_charge(iatom, zeff);\n        }\n    }\n\n    if (parameters.core_type() != \"none\") {\n        read_core_file(parameters.core_type());\n    }\n\n    if (not parameters.no_orient()) orient();\n    if (natom()==0) {\n        MADNESS_EXCEPTION(\"no molecule was given\",1);\n    }\n\n\n};\n\nstd::string Molecule::get_structure_library_path() {\n    std::string chemdata_dir(MRA_CHEMDATA_DIR);\n    if (getenv(\"MRA_CHEMDATA_DIR\")) chemdata_dir=std::string(getenv(\"MRA_CHEMDATA_DIR\"));\n    return chemdata_dir+\"/structure_library\";\n}\n\nstd::istream& Molecule::position_stream_in_library(std::ifstream& f, const std::string& name) {\n    // get the location of the structure library\n    std::string library=get_structure_library_path();\n\n    f.open(library);\n    std::string errmsg;\n\n    if(f.fail()) {\n        errmsg=std::string(\"Failed to open structure library: \") + library;\n    } else {\n        try {\n            std::string full_line=\"structure=\"+name;\n            madness::position_stream_to_word(f, full_line,'#',true,true);\n        } catch (...) {\n            errmsg = \"could not find structure \" + name + \" in the library\\n\\n\";\n        }\n    }\n    MADNESS_CHECK_THROW(errmsg.empty(),errmsg.c_str());\n    return f;\n}\n\nvoid Molecule::read_structure_from_library(const std::string& name) {\n\n    try {\n        std::ifstream f;\n        position_stream_in_library(f,name);\n        this->read(f);\n    } catch (...) {\n        std::string errmsg = \"could not find structure \" + name + \" in the library\\n\\n\";\n        MADNESS_EXCEPTION(errmsg.c_str(), 0);\n    }\n}\n\n\nstd::vector<std::string> Molecule::cubefile_header(const Vector<double,3> offset) const {\n\tstd::vector<std::string> molecular_info;\n\tfor (unsigned int i = 0; i < natom(); ++i) {\n\t\tstd::stringstream ss;\n\t\tconst int charge = get_atom(i).get_atomic_number();\n\t\tss << charge << \" \" << charge << \" \";\n\t\tss << std::fixed;\n\t\tss.precision(8);\n\t\tconst Vector<double, 3> coord = get_atom(i).get_coords()-offset;\n\t\tss << coord[0] << \" \" << coord[1] << \" \" << coord[2] << \" \\n\";\n\t\tmolecular_info.push_back(ss.str());\n\t}\n\treturn molecular_info;\n}\n\nvoid Molecule::read_file(const std::string& filename) {\n    std::ifstream f(filename.c_str());\n    if(f.fail()) {\n        std::string errmsg = std::string(\"Failed to open file: \") + filename;\n        MADNESS_EXCEPTION(errmsg.c_str(), 0);\n    }\n    this->read(f);\n}\n\nvoid Molecule::read(std::istream& f) {\n  atoms.clear();\n  rcut.clear();\n  madness::position_stream(f, \"molecule\", false);  // do not rewind\n  double scale = 1.0;                              // Default is atomic units\n  if (parameters.units() == \"angstrom\") scale = 1e-10 / madness::constants::atomic_unit_of_length;\n\n    std::string s, tag;\n    while (std::getline(f,s)) {\n        std::istringstream ss(s);\n        ss >> tag;\n        // check if tag is a keyword to be ignored\n        bool ignore=false;\n        for (auto& p : parameters.get_all_parameters()) {\n            if (tag==p.first) ignore=true;\n        }\n        if (ignore) continue;\n        if (tag == \"end\") {\n            goto finished;\n        }\n        else {\n            double xx, yy, zz;\n            ss >> xx >> yy >> zz;\n            xx *= scale;\n            yy *= scale;\n            zz *= scale;\n            int atn = symbol_to_atomic_number(tag);\n            double qq = atn;\n            if (atn == 0) ss >> qq; // Charge of ghost atom\n            //check if pseudo-atom or not\n            bool psat = check_if_pseudo_atom(tag);\n            add_atom(xx,yy,zz,qq,atn,psat);\n        }\n    }\n    throw \"No end to the geometry in the input file\";\nfinished:\n    ;\n    update_rcut_with_eprec(parameters.eprec());\n}\n\n\nvoid Molecule::read_xyz(const std::string filename) {\n    std::ifstream f(filename.c_str());\n    if(f.fail()) {\n        std::string errmsg = std::string(\"Failed to open file: \") + filename;\n        MADNESS_EXCEPTION(errmsg.c_str(), 0);\n    }\n\n    atoms.clear();\n    rcut.clear();\n    MADNESS_CHECK(parameters.units()==\"angstrom\"); // xyz is always in angs\n    const double scale = 1e-10 / madness::constants::atomic_unit_of_length;\n\n    long natom_expected=1;\n    long current_line=0;\n\n    std::string s, tag;\n    while (std::getline(f,s)) {\n        std::istringstream ss(s);\n        current_line++;\n        if (current_line==1) {\n            ss >> natom_expected;\n            MADNESS_CHECK(natom_expected>0);\n            continue;\n        }\n        if (current_line==2) continue;      // ignore comment line\n        double xx, yy, zz;\n        if (not (ss >> tag >>  xx >> yy >> zz)) {\n            MADNESS_EXCEPTION(std::string(\"error reading the xyz input file\"+filename).c_str(),1);\n        };\n        xx *= scale;\n        yy *= scale;\n        zz *= scale;\n        int atn = symbol_to_atomic_number(tag);\n        double qq = atn;\n        if (atn == 0) ss >> qq; // Charge of ghost atom\n        //check if pseudo-atom or not\n        bool psat = check_if_pseudo_atom(tag);\n        add_atom(xx,yy,zz,qq,atn,psat);\n        if (current_line==natom_expected+2) break;\n    }\n    MADNESS_CHECK(size_t(natom_expected)==natom());\n    update_rcut_with_eprec(parameters.eprec());\n}\n\n//version without pseudo-atoms\nvoid Molecule::add_atom(double x, double y, double z, double q, int atomic_number) {\n    atoms.push_back(Atom(x,y,z,q,atomic_number));\n    double c = smoothing_parameter(q, get_eprec()); // eprec is error per atom\n    //printf(\"smoothing param %.6f\\n\", c);\n    double radius = get_atomic_data(atomic_number).covalent_radius;//Jacob added\n    atomic_radii.push_back(radius*1e-10/madness::constants::atomic_unit_of_length);// Jacob added\n    rcut.push_back(1.0/c);\n}\n\n//version specifying pseudo-atoms\nvoid Molecule::add_atom(double x, double y, double z, double q, int atomic_number, bool pseudo_atom) {\n    atoms.push_back(Atom(x,y,z,q,atomic_number,pseudo_atom));\n    double c = smoothing_parameter(q, get_eprec()); // eprec is error per atom\n    //printf(\"smoothing param %.6f\\n\", c);\n    double radius = get_atomic_data(atomic_number).covalent_radius;//Jacob added\n    atomic_radii.push_back(radius*1e-10/madness::constants::atomic_unit_of_length);// Jacob added\n    rcut.push_back(1.0/c);\n}\n\nvoid Molecule::set_atom_charge(unsigned int i, double zeff) {\n  if (i>=atoms.size()) throw \"trying to set charge of invalid atom\";\n  atoms[i].q = zeff;\n}\n\nunsigned int Molecule::get_atom_charge(unsigned int i) const {\n  if (i>=atoms.size()) throw \"trying to get charge of invalid atom\";\n  return atoms[i].q;\n}\n\nunsigned int Molecule::get_atomic_number(unsigned int i) const {\n  if (i>=atoms.size()) throw \"trying to get number of invalid atom\";\n  return atoms[i].atomic_number;\n}\n\nvoid Molecule::set_pseudo_atom(unsigned int i, bool psat) {\n  if (i>=atoms.size()) throw \"trying to set charge of invalid atom\";\n  atoms[i].pseudo_atom = psat;\n}\n\nbool Molecule::get_pseudo_atom(unsigned int i) const {\n  if (i>=atoms.size()) throw \"trying to get pseudo atom for invalid atom\";\n  return atoms[i].pseudo_atom;\n}\n\nvoid Molecule::set_atom_coords(unsigned int i, double x, double y, double z) {\n    if (i>=atoms.size()) throw \"trying to set coords of invalid atom\";\n    atoms[i].x = x;\n    atoms[i].y = y;\n    atoms[i].z = z;\n}\n\nmadness::Tensor<double> Molecule::get_all_coords() const {\n    madness::Tensor<double> c(natom(),3);\n    for (size_t i=0; i<natom(); ++i) {\n        const Atom atom = get_atom(i);\n        c(i,0) = atom.x;\n        c(i,1) = atom.y;\n        c(i,2) = atom.z;\n    }\n    return c;\n}\n\nstd::vector< madness::Vector<double,3> > Molecule::get_all_coords_vec() const {\n  std::vector< madness::Vector<double,3> > c(natom());\n  for (size_t i=0; i<natom(); ++i) {\n    const Atom atom = get_atom(i);\n    c[i][0] = atom.x;\n    c[i][1] = atom.y;\n    c[i][2] = atom.z;\n  }\n  return c;\n}\n\nvoid Molecule::set_all_coords(const madness::Tensor<double>& c) {\n    MADNESS_ASSERT(c.ndim()==2u && size_t(c.dims()[0])==natom() && c.dims()[1]==3);\n    for (size_t i=0; i<natom(); ++i) {\n        atoms[i].x = c(i,0);\n        atoms[i].y = c(i,1);\n        atoms[i].z = c(i,2);\n    }\n}\n\n/// updates rcuts with given eprec\nvoid Molecule::update_rcut_with_eprec(double value) {\n  if (value != get_eprec()) {\n    parameters.set_user_defined_value(\"eprec\", value);\n  }\n  rcut.clear();\n  rcut.reserve(atoms.size());\n  for (auto &&atom : atoms) {\n    rcut.emplace_back(1.0 / smoothing_parameter(atom.q, value));\n  }\n  core_pot.set_eprec(value);\n}\n\nvoid Molecule::set_rcut(double value) {\n    for (size_t i=0; i<atoms.size(); ++i) {\n        rcut[i] = (value<=0.0) ? 1.0 : value;\n    }\n}\n\nconst Atom& Molecule::get_atom(unsigned int i) const {\n    if (i>=atoms.size()) throw \"trying to get coords of invalid atom\";\n    return atoms[i];\n}\n\n// Returns molecule in qc-schema format\n// symbols (nat,) atom symbols in title case. array[string]\n// geometry (3*nat,) vector of xyz coordinates [a0] of the atoms.  array[number]\n// There are optional parameters yet to be implemented\n// https://molssi-qc-schema.readthedocs.io/en/latest/auto_topology.html\nnlohmann::json Molecule::to_json() const {\n  nlohmann::json mol_schema;\n  mol_schema[\"symbols\"] = {};\n  mol_schema[\"geometry\"] = {};\n\n  auto molecule_parameters = parameters.to_json();\n  mol_schema[\"parameters\"] = molecule_parameters[\"parameters\"];\n  insert_symbols_and_geometry(mol_schema);\n  return mol_schema;\n}\n\nvoid Molecule::insert_symbols_and_geometry(json& mol_json) const {\n  mol_json[\"symbols\"] = {};\n  mol_json[\"geometry\"] = {};\n\n  for (size_t i = 0; i < natom(); ++i) {\n    mol_json[\"symbols\"].push_back(get_atomic_data(atoms[i].atomic_number).symbol);\n    mol_json[\"geometry\"].push_back({atoms[i].x, atoms[i].y, atoms[i].z});\n  }\n}\n\nvoid Molecule::from_json(const json& mol_json) {\n  atoms.clear();\n  rcut.clear();\n\n  parameters.from_json(mol_json[\"parameters\"]);\n\n  double scale = 1.0;\n  if (parameters.units() == \"angstrom\") scale = 1e-10 / madness::constants::atomic_unit_of_length;\n  auto symbols = mol_json[\"symbols\"];\n  auto geometry = mol_json[\"geometry\"];\n\n  for (size_t i = 0; i < symbols.size(); ++i) {\n    std::string symbol = symbols[i];\n    double x = (geometry[i][0]);\n    double y = (geometry[i][1]);\n    double z = (geometry[i][2]);\n    x *= scale;\n    y *= scale;\n    z *= scale;\n    int atomic_number = symbol_to_atomic_number(symbol);\n    double q = atomic_number;\n\n    add_atom(x, y, z, q, atomic_number);\n  }\n  if (parameters.no_orient() == false) orient();\n}\n\nvoid Molecule::print(std::ostream& os, const bool defined_only) const {\n    std::string p =parameters.print_to_string({\"defined\"});\n    os.flush();\n\n    std::stringstream sstream;\n    sstream << \"geometry\" << std::endl;\n    sstream << p << std::endl;\n    sstream << \"molecule\" << std::endl;\n    for (size_t i=0; i<natom(); ++i) {\n        sstream << std::setw(5) << get_atomic_data(atoms[i].atomic_number).symbol << \"  \";\n        sstream << std::setw(20) << std::setprecision(8) << atoms[i].x\n                << std::setw(20) << atoms[i].y\n                << std::setw(20) << atoms[i].z;\n        if (atoms[i].atomic_number == 0) sstream << \"     \" << atoms[i].q;\n        sstream << std::endl;\n    }\n    sstream << \"end\" << std::endl;\n    sstream << \"end\" << std::endl;\n    os << sstream.str();\n}\n\ndouble Molecule::inter_atomic_distance(unsigned int i,unsigned int j) const {\n    if (i>=atoms.size()) throw \"trying to compute distance with invalid atom\";\n    if (j>=atoms.size()) throw \"trying to compute distance with invalid atom\";\n    return distance(atoms[i].x, atoms[i].y, atoms[i].z,\n                    atoms[j].x, atoms[j].y, atoms[j].z);\n}\n\ndouble Molecule::nuclear_repulsion_energy() const {\n    double sum = 0.0;\n    unsigned int z1, z2;\n    for (size_t i=0; i<atoms.size(); ++i) {\n        if (atoms[i].pseudo_atom){\n            z1 = atoms[i].q;}\n        else{\n            z1 = atoms[i].atomic_number;}\n        if (core_pot.is_defined(z1)) z1 -= core_pot.n_core_orb(z1) * 2;\n        for (size_t j=i+1; j<atoms.size(); ++j) {\n            if (atoms[j].pseudo_atom){\n                z2 = atoms[j].q;}\n            else{\n                z2 = atoms[j].atomic_number;}\n            if (core_pot.is_defined(z2)) z2 -= core_pot.n_core_orb(z2) * 2;\n            sum += z1 * z2 / inter_atomic_distance(i,j);\n        }\n    }\n    return sum;\n}\n\ndouble Molecule::nuclear_dipole(int axis) const {\n    double sum = 0.0;\n    for (size_t atom = 0; atom < atoms.size(); ++atom) {\n        unsigned int z;\n        if (atoms[atom].pseudo_atom){\n            z = atoms[atom].q;}\n        else{\n            z = atoms[atom].atomic_number;}\n        if (core_pot.is_defined(z)) z -= core_pot.n_core_orb(z) * 2;\n        double r;\n        switch (axis) {\n            case 0: r = atoms[atom].x; break;\n            case 1: r = atoms[atom].y; break;\n            case 2: r = atoms[atom].z; break;\n            default: MADNESS_EXCEPTION(\"invalid axis\", 0);\n        }\n        sum += r*z;\n    }\n    return sum;\n}\n\nTensor<double> Molecule::nuclear_dipole_derivative(const int atom, const int axis) const{\n    Tensor<double> mu_x(3);\n    mu_x(axis)=atoms[atom].q;\n    return mu_x;\n}\n\n\ndouble Molecule::nuclear_repulsion_derivative(size_t i, int axis) const {\n    double sum = 0.0;\n    unsigned int z1 = atoms[i].atomic_number;\n    if (core_pot.is_defined(z1)) z1 -= core_pot.n_core_orb(z1) * 2;\n    for (size_t j=0; j<atoms.size(); ++j) {\n        if (j != i) {\n            size_t z2 = atoms[j].atomic_number;\n            if (core_pot.is_defined(z2)) z2 -= core_pot.n_core_orb(z2) * 2;\n            double r = inter_atomic_distance(i,j);\n            double xx;\n            if (axis == 0) xx = atoms[i].x - atoms[j].x;\n            else if (axis == 1) xx = atoms[i].y - atoms[j].y;\n            else xx = atoms[i].z - atoms[j].z;\n            sum -= xx * z1 * z2/ (r * r * r);\n        }\n    }\n    return sum;\n}\n\n/// compute the nuclear-nuclear contribution to the molecular hessian\nTensor<double> Molecule::nuclear_repulsion_hessian() const {\n\n    Tensor<double> hessian(3*natom(),3*natom());\n    for (size_t iatom=0; iatom<natom(); ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis) {\n            for (size_t jatom=0; jatom<natom(); ++jatom) {\n                for (int jaxis=0; jaxis<3; ++jaxis) {\n                    hessian(3*iatom+iaxis, 3*jatom+jaxis)=\n                            nuclear_repulsion_second_derivative(iatom,jatom,iaxis,jaxis);\n                }\n            }\n        }\n    }\n    return hessian;\n}\n\n\n/// compute the nuclear-nuclear contribution to the second derivatives\n\n/// @param[in]  iatom   the i-th atom (row of the hessian)\n/// @param[in]  jatom   the j-th atom (column of the hessian)\n/// @param[in]  iaxis   the xyz axis of the i-th atom\n/// @param[in]  jaxis   the xyz axis of the j-th atom\n/// return the (3*iatom + iaxis, 3*jatom + jaxis) matix element\ndouble Molecule::nuclear_repulsion_second_derivative(int iatom, int jatom,\n        int iaxis, int jaxis) const {\n\n    double sum = 0.0;\n    unsigned int ZA = atoms[iatom].atomic_number;\n    unsigned int ZB = atoms[jatom].atomic_number;\n\n    Tensor<double> RA(3), RB(3);\n    RA(0l)=atoms[iatom].x; RA(1)=atoms[iatom].y; RA(2)=atoms[iatom].z;\n    RB(0l)=atoms[jatom].x; RB(1)=atoms[jatom].y; RB(2)=atoms[jatom].z;\n\n    if (core_pot.is_defined(ZA)) MADNESS_EXCEPTION(\"no core potentials in the hessian\",1);\n    if (core_pot.is_defined(ZB)) MADNESS_EXCEPTION(\"no core potentials in the hessian\",1);\n\n    // first term is (for A\\neq B, i.e. iatom/=jatom):\n    // \\frac{\\partial^2}{\\partial X_A\\partial Y_B}\\frac{Z_AZ_B}{R_{AB}}\n    if (iatom != jatom) {\n        const double RAB = inter_atomic_distance(iatom,jatom);\n        if (iaxis==jaxis) {\n            sum+=(RAB*RAB - 3*std::pow(RA(iaxis)-RB(iaxis),2.0))/std::pow(RAB,5.0);\n        } else {\n            sum-=3*(RA(iaxis)-RB(iaxis))*(RA(jaxis)-RB(jaxis)) /std::pow(RAB,5.0);\n        }\n        sum*=ZA*ZB;\n    }\n\n    // second term is (for A==B, i.e. iatom==jatom):\n    // \\sum_{C\\neq A}\\frac{\\partial^2}{\\partial X_A\\partial X_B}Z_AZ_B\\frac{Z_CZ_B}{R_{AC}}\n    if (iatom==jatom) {\n        for (unsigned int katom=0; katom<atoms.size(); ++katom) {\n            double RAC = inter_atomic_distance(iatom,katom);\n            Tensor<double> RC(3);\n            RC(0l)=atoms[katom].x; RC(1)=atoms[katom].y; RC(2)=atoms[katom].z;\n            const unsigned int ZC=atoms[katom].atomic_number;\n\n            if (katom != (unsigned int)(iatom)) {\n                if (iaxis==jaxis) {\n                    sum-=ZA*ZC*(RAC*RAC - 3.0*std::pow(RA(iaxis)-RC(iaxis),2.0))/std::pow(RAC,5.0);\n                } else {\n                    sum+=ZA*ZC*3.0*(RA(iaxis)-RC(iaxis))*(RA(jaxis)-RC(jaxis)) /std::pow(RAC,5.0);\n                }\n\n            }\n        }\n    }\n    return sum;\n}\n\n\ndouble Molecule::smallest_length_scale() const {\n    double rcmax = 0.0;\n    for (unsigned int i=0; i<atoms.size(); ++i) {\n        rcmax = std::max(rcmax,rcut[i]);\n    }\n    return 1.0/rcmax;\n}\n\n\n/// Moves the center of nuclear charge to the origin\nvoid Molecule::center() {\n    double xx=0.0, yy=0.0, zz=0.0, qq=0.0;\n    for (unsigned int i=0; i<atoms.size(); ++i) {\n        xx += atoms[i].x*atoms[i].q;\n        yy += atoms[i].y*atoms[i].q;\n        zz += atoms[i].z*atoms[i].q;\n        qq += atoms[i].q;\n    }\n    xx /= qq;\n    yy /= qq;\n    zz /= qq;\n    Tensor<double> translation(3);\n    translation(0l)=-xx;\n    translation(1l)=-yy;\n    translation(2l)=-zz;\n    translate(translation);\n}\n\n/// translate the molecule\n void Molecule::translate(const Tensor<double>& translation) {\n    for (unsigned int i=0; i<atoms.size(); ++i) {\n        atoms[i].x += translation(0l);\n        atoms[i].y += translation(1l);\n        atoms[i].z += translation(2l);\n    }\n}\n\n\ntemplate <typename opT>\nbool Molecule::test_for_op(opT op, const double symtol) const {\n    // all atoms must have a symmetry-equivalent partner\n    for (unsigned int i=0; i<atoms.size(); ++i) {\n        if (find_symmetry_equivalent_atom(i,op,symtol)==-1) return false;\n    }\n    return true;\n}\n\n\ntemplate <typename opT>\nint Molecule::find_symmetry_equivalent_atom(int iatom, opT op, const double symtol) const  {\n    double x=atoms[iatom].x, y=atoms[iatom].y, z=atoms[iatom].z;\n    op(x, y, z);\n    for (unsigned int j=0; j<atoms.size(); ++j) {\n        double r = distance(x, y, z, atoms[j].x, atoms[j].y, atoms[j].z);\n        if (r < symtol) return j;\n    }\n    return -1;\n}\n\ntemplate <typename opT>\nvoid Molecule::symmetrize_for_op(opT op, const double symtol) {\n\n    MADNESS_CHECK(test_for_op(op, symtol));\n\n    for (unsigned int iatom = 0; iatom < atoms.size(); ++iatom) {\n        int jatom = find_symmetry_equivalent_atom(iatom, op, symtol);\n\n        // symmetrize\n        double x=atoms[iatom].x,y=atoms[iatom].y,z=atoms[iatom].z;\n        op(x,y,z);\n        double r = distance(atoms[jatom].x, atoms[jatom].y, atoms[jatom].z, x,y,z);\n        MADNESS_CHECK(r<symtol);\n\n        x=0.5*(x+atoms[jatom].x);\n        y=0.5*(y+atoms[jatom].y);\n        z=0.5*(z+atoms[jatom].z);\n        atoms[iatom].x=x;\n        atoms[iatom].y=y;\n        atoms[iatom].z=z;\n        op(x,y,z);\n        atoms[jatom].x=x;\n        atoms[jatom].y=y;\n        atoms[jatom].z=z;\n\n        // check result\n        int jatom2=find_symmetry_equivalent_atom(iatom, op, 1.e-12);\n        MADNESS_CHECK(jatom==jatom2);\n    }\n}\n\n\nbool Molecule::test_for_c2(double xaxis, double yaxis, double zaxis, const double symtol) const {\n    return test_for_op(apply_c2(xaxis,yaxis,zaxis), symtol);\n}\n\nbool Molecule::test_for_sigma(double xaxis, double yaxis, double zaxis, const double symtol) const {\n    return test_for_op(apply_sigma(xaxis, yaxis, zaxis), symtol);\n}\n\nbool Molecule::test_for_inverse(const double symtol) const {\n    return test_for_op(apply_inverse(0.0, 0.0, 0.0), symtol);\n}\n\nvoid Molecule::swapaxes(int ix, int iy) {\n    for (unsigned int i=0; i<atoms.size(); ++i) {\n        double r[3] = {atoms[i].x, atoms[i].y, atoms[i].z};\n        std::swap(r[ix],r[iy]);\n        atoms[i].x=r[0]; atoms[i].y=r[1]; atoms[i].z=r[2];\n    }\n\n    // field rotation\n    double r[3] = {field[0], field[1], field[2]};\n    std::swap(r[ix],r[iy]);\n    field[0]=r[0]; field[1]=r[1]; field[2]=r[2];\n}\n\nstd::string Molecule::symmetrize_and_identify_point_group(const double symtol) {\n    // C2 axes must be along the Cartesian axes and\n    // mirror planes must be orthogonal to them\n\n    bool x_is_c2 = test_for_c2(1.0,0.0,0.0,fabs(symtol));\n    bool y_is_c2 = test_for_c2(0.0,1.0,0.0,fabs(symtol));\n    bool z_is_c2 = test_for_c2(0.0,0.0,1.0,fabs(symtol));\n    bool xy_is_sigma = test_for_sigma(0.0,0.0,1.0,fabs(symtol));\n    bool xz_is_sigma = test_for_sigma(0.0,1.0,0.0,fabs(symtol));\n    bool yz_is_sigma = test_for_sigma(1.0,0.0,0.0,fabs(symtol));\n    bool inverse = test_for_inverse(fabs(symtol));\n\n    // this is stupid, but necessary for backwards compatibility\n    // FIXME SYMTOL\n    if (symtol>0.0) {\n        if (x_is_c2) symmetrize_for_op(apply_c2(1.0,0.0,0.0), symtol);\n        if (y_is_c2) symmetrize_for_op(apply_c2(0.0,1.0,0.0), symtol);\n        if (z_is_c2) symmetrize_for_op(apply_c2(0.0,0.0,1.0), symtol);\n        if (xy_is_sigma) symmetrize_for_op(apply_sigma(0.0,0.0,1.0),symtol);\n        if (xz_is_sigma) symmetrize_for_op(apply_sigma(0.0,1.0,0.0),symtol);\n        if (yz_is_sigma) symmetrize_for_op(apply_sigma(1.0,0.0,0.0),symtol);\n        if (inverse) symmetrize_for_op(apply_inverse(0.0,0.0,0.0),symtol);\n    }\n\n    /*\n      .   (i,c,s)\n      Ci  (1,0,0) --- i\n      C2h (1,1,1) --- c2z, sxy, i\n      D2h (1,3,3) --- c2z, c2y, c2x, sxy, sxz, syz, i\n\n      C1  (0,0,0) ---\n      Cs  (0,0,1) --- sxy\n      C2  (0,1,0) --- c2z\n      C2v (0,1,2) --- c2z, sxz, syz\n      D2  (0,3,0) --- c2z, c2y, c2x\n\n     */\n\n    int nc2 = int(x_is_c2) + int(y_is_c2) + int(z_is_c2);\n    int nsi = int(xy_is_sigma) + int(xz_is_sigma) + int(yz_is_sigma);\n\n    std::string pointgroup;\n    if (inverse && nc2==0 && nsi==0) {\n        pointgroup = \"Ci\";\n    }\n    else if (inverse && nc2==1 && nsi==1) {\n        pointgroup = \"C2h\";\n        if (x_is_c2) swapaxes(0,2);\n        if (y_is_c2) swapaxes(1,2);\n    }\n    else if (inverse && nc2==3 && nsi==3) {\n        pointgroup = \"D2h\";\n    }\n    else if (!inverse && nc2==0 && nsi==0) {\n        pointgroup = \"C1\";\n    }\n    else if (!inverse && nc2==0 && nsi==1) {\n        pointgroup = \"Cs\";\n        if (xz_is_sigma) swapaxes(1,2);\n        if (yz_is_sigma) swapaxes(0,2);\n    }\n    else if (!inverse && nc2==1 && nsi==0) {\n        pointgroup = \"C2\";\n        if (x_is_c2) swapaxes(0,2);\n        if (y_is_c2) swapaxes(1,2);\n    }\n    else if (!inverse && nc2==1 && nsi==2) {\n        pointgroup = \"C2v\";\n        if (x_is_c2) swapaxes(0,2);\n        if (y_is_c2) swapaxes(1,2);\n    }\n    else if (!inverse && nc2==3 && nsi==0) {\n        pointgroup = \"D2\";\n    }\n    else {\n        madness::print(\"Not-quite-symmetric geometry (clean up to fix), will assume C1\");\n        pointgroup = \"C1\";\n    }\n    return pointgroup;\n}\n\n/// compute the center of mass\nTensor<double> Molecule::center_of_mass() const {\n    Tensor<double> com(3);\n    double xx=0.0, yy=0.0, zz=0.0, qq=0.0;\n    for (unsigned int i=0; i<natom(); ++i) {\n        xx += get_atom(i).x*get_atom(i).mass;\n        yy += get_atom(i).y*get_atom(i).mass;\n        zz += get_atom(i).z*get_atom(i).mass;\n        qq += get_atom(i).mass;\n    }\n    com(0l)=xx/qq;\n    com(1l)=yy/qq;\n    com(2l)=zz/qq;\n    return com;\n}\n\n// Align molecule with axes of inertia\nTensor<double> Molecule::moment_of_inertia() const {\n    madness::Tensor<double> I(3L,3L);\n    for (unsigned int i=0; i<atoms.size(); ++i) {\n        double q = atoms[i].mass, x[3] = {atoms[i].x, atoms[i].y, atoms[i].z};\n        for (int j=0; j<3; ++j) {\n            I(j,j)+=q*(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\n            for (int k=0; k<3; ++k)\n                I(j,k) -= q*x[j]*x[k];\n        }\n    }\n    return I;\n}\n\n/// Centers and orients the molecule in a standard manner\nvoid Molecule::orient(bool verbose) {\n  center();\n  // Align molecule with axes of charge inertia\n  madness::Tensor<double> I(3L, 3L);\n  for (unsigned int i = 0; i < atoms.size(); ++i) {\n    double q = atoms[i].atomic_number, x[3] = {atoms[i].x, atoms[i].y, atoms[i].z};\n    for (int j = 0; j < 3; ++j)\n      for (int k = 0; k < 3; ++k) I(j, k) += q * x[j] * x[k];\n  }\n  madness::Tensor<double> U, e;\n  madness::syev(I, U, e);\n\n  rotate(U);\n  fix_phase();\n\n\n\n  if (verbose) {\n    // Try to resolve degenerate rotations\n    double symtol = fabs(parameters.symtol());\n    if (fabs(e[0] - e[1]) < symtol && fabs(e[1] - e[2]) < symtol) {\n      madness::print(\"Cubic point group\");\n    } else if (fabs(e[0] - e[1]) < symtol) {\n      madness::print(\"XY degenerate\");\n    } else if (fabs(e[0] - e[2]) < symtol) {\n      madness::print(\"XZ degenerate\");\n    } else if (fabs(e[1] - e[2]) < symtol) {\n      madness::print(\"YZ degenerate\");\n    } else {\n      madness::print(\"Abelian pointgroup\");\n    }\n  }\n\n  // Now hopefully have mirror planes and C2 axes correctly oriented\n  // Figure out what elements are actually present and enforce\n  // conventional ordering\n  pointgroup_ = symmetrize_and_identify_point_group(parameters.symtol());\n  if (parameters.symtol() > 0.0) {\n    std::string pointgroup_tight = symmetrize_and_identify_point_group(1.e-12);\n    MADNESS_CHECK(pointgroup_tight == pointgroup_);\n  }\n}\n\n/// rotates the molecule and the external field\n\n// find the first non-zero x and if negative rotate by 180\nvoid Molecule::fix_phase() {\n  for (auto& atom : atoms) {\n    // find the first non-zero x and if negative, negate all x and y (aka rotate by 180 about z)\n    if (fabs(atom.x) > 1e-12) {\n      if (atom.x < 0) {\n        for (auto& atom : atoms) {\n          atom.x = -atom.x;\n          atom.y = -atom.y;\n        }\n      }\n      break;\n    }\n  }\n\n  // find the first non-zero z and if negative, negate all z and y (aka rotate by 180 about x)\n  for (auto& atom : atoms) {\n    if (fabs(atom.z) > 1e-12) {\n      if (atom.z < 0) {\n        for (auto& atom : atoms) {\n          atom.z = -atom.z;\n          atom.y = -atom.y;\n        }\n      }\n      break;\n    }\n  }\n}\n\n/// @param[in]  D   the rotation matrix\nvoid Molecule::rotate(const Tensor<double>& D) {\n    madness::Tensor<double> r(3L), rU;\n    for (auto& atom: atoms) {\n        r[0]=atom.x; r[1]=atom.y, r[2]= atom.z;\n        rU = inner(r,D);\n        atom.x=rU[0]; atom.y=rU[1]; atom.z=rU[2];\n    }\n    // field rotation\n    rU = inner(field,D);\n    field[0] = rU[0];\n    field[1] = rU[1];\n    field[2] = rU[2];\n}\n\n/// Returns the half width of the bounding cube\n\n/// The molecule will be contained in the cube [-L,+L].\ndouble Molecule::bounding_cube() const {\n    double L = 0.0;\n    for (const auto& atom: atoms) {\n        L = std::max(L, fabs(atom.x));\n        L = std::max(L, fabs(atom.y));\n        L = std::max(L, fabs(atom.z));\n    }\n    return L;\n}\n\ndouble Molecule::total_nuclear_charge() const {\n    double sum = 0.0;\n    for (const auto& atom: atoms) {\n        sum += atom.q;\n    }\n    return sum;\n}\n\ndouble Molecule::nuclear_attraction_potential(double x, double y, double z) const {\n    // This is very inefficient since it scales as O(ngrid*natom)\n    // ... we can easily make an O(natom) version using\n    // the integral operator and sparse projection of an effective\n    // density ... its potential can be evaluated at the same\n    // time as the electronic Coulomb potential so it will be\n    // essentially free.\n\n    double sum = 0.0;\n    for (unsigned int i=0; i<atoms.size(); ++i) {\n        //make sure this isn't a pseudo-atom\n        if (atoms[i].pseudo_atom) continue;\n\n        double r = distance(atoms[i].x, atoms[i].y, atoms[i].z, x, y, z);\n        //sum -= atoms[i].q/(r+1e-8);\n        sum -= atoms[i].q * smoothed_potential(r*rcut[i])*rcut[i];\n    }\n\n    // field contribution\n    sum += field[0] * x + field[1] * y + field[2] * z;\n\n    return sum;\n}\n\ndouble Molecule::atomic_attraction_potential(int iatom, double x, double y,\n        double z) const {\n\n    //make sure this isn't a pseudo-atom\n    if (atoms[iatom].pseudo_atom) return 0.0;\n\n    double r = distance(atoms[iatom].x, atoms[iatom].y, atoms[iatom].z, x, y, z);\n    double sum =- atoms[iatom].q * smoothed_potential(r*rcut[iatom])*rcut[iatom];\n\n  return sum;\n}\n\n\ndouble Molecule::nuclear_attraction_potential_derivative(int atom, int axis, double x, double y, double z) const {\n    double r = distance(atoms[atom].x, atoms[atom].y, atoms[atom].z, x, y, z);\n    double rc = rcut[atom];\n    double coord;\n    if (axis == 0) coord = x-atoms[atom].x;\n    else if (axis == 1) coord = y-atoms[atom].y;\n    else coord = z-atoms[atom].z;\n\n    //double q = atoms[atom].q;\n    //if (core_pot.is_defined(atoms[atom].atomic_number)) {\n    //    q -= core_pot.n_core_orb(atoms[atom].atomic_number) * 2;\n    //    rc = 1.0/smoothing_parameter(q, eprec);\n    //}\n\n    double dv = atoms[atom].q * (coord / r) * dsmoothed_potential(r * rc) * (rc * rc);\n    //double dv = q * (coord / r) * dsmoothed_potential(r * rc) * (rc * rc);\n    double df = field[axis];\n    return dv + df;\n}\n\n/// the second derivative of the (smoothed) nuclear potential Z/r\n\n/// \\f[\n/// V(R,r_{el}) -V(r) =\\frac{Z}{|R-r_{el}|} \\approx Z u(r) \\f]\n/// with\n/// \\f[\n/// \\frac{\\partial^2 V}{\\partial X_i\\partial X_j}\n///   =  Z \\left(\\frac{\\partial^2 u(r)}{\\partial r^2} \\frac{\\partial r}{\\partial X_i}\n///      \\frac{\\partial r}{\\partial X_j} + \\frac{\\partial u}{\\partial r}\n///      \\frac{\\partial^2 r}{\\partial X_i \\partial X_j}\\right)\n/// \\f]\ndouble Molecule::nuclear_attraction_potential_second_derivative(int atom,\n        int iaxis, int jaxis, double x, double y, double z) const {\n\n    const Vector<double,3> rr={x-atoms[atom].x,y-atoms[atom].y,z-atoms[atom].z};\n    double r = rr.normf();\n    double rc = rcut[atom];\n\n    double u=smoothed_potential(r*rc)*rc;\n    double d2u=d2smoothed_potential(r * rc) * (rc * rc * rc);\n//    double rreg=r+1.e-5;\n//    double rinv=1./(rreg);\n//    double r3inv = 1.0/(rreg * rreg* rreg);\n    double rinv=u;\n    double r3inv = 0.5*d2u;\n\n    double di=rr[iaxis]*rinv;\n    double dj=rr[jaxis]*rinv;\n    double term1=3.0*r3inv*di*dj;\n\n//    double term2=-di*dj*r3inv;\n//    if (iaxis==jaxis) term2+=rinv;\n\n    double result=-atoms[atom].q * (term1);\n    if (iaxis==jaxis) return 0.0;\n    return result;\n\n}\n\ndouble Molecule::nuclear_charge_density(double x, double y, double z, double rscale) const {\n  // Only one atom will contribute due to the short range of the nuclear charge density\n\n  MADNESS_ASSERT(rscale > 0.0);\n  const double rscale_inv = 1.0/rscale;\n  for (unsigned int i=0; i<atoms.size(); i++) {\n      const auto rcut_i = rcut[i] * rscale_inv;\n      double rsq = distance_sq(atoms[i].x, atoms[i].y, atoms[i].z, x, y, z)*rcut_i*rcut_i;\n      if (rsq < 36.0) {\n          double r = sqrt(rsq);\n          return atoms[i].q * smoothed_density(r)*rcut_i*rcut_i*rcut_i;\n      }\n  }\n  return 0.0;\n}\n\n\nunsigned int Molecule::n_core_orb_all() const {\n    int natom = atoms.size();\n    unsigned int sum = 0;\n\n    for (int i=0; i<natom; ++i) {\n        unsigned int atn = atoms[i].atomic_number;\n        if (core_pot.is_defined(atn)) sum += core_pot.n_core_orb(atn);\n    }\n\n    return sum;\n}\n\ndouble Molecule::core_eval(int atom, unsigned int core, int m, double x, double y, double z) const {\n    unsigned int atn = atoms[atom].atomic_number;\n    double xx = x - atoms[atom].x;\n    double yy = y - atoms[atom].y;\n    double zz = z - atoms[atom].z;\n    double rsq = xx*xx + yy*yy + zz*zz;\n    return core_pot.core_eval(atn, core, m, rsq, xx, yy, zz);\n}\n\ndouble Molecule::core_derivative(int atom, int axis, unsigned int core, int m, double x, double y, double z) const {\n    unsigned int atn = atoms[atom].atomic_number;\n    double xx = x - atoms[atom].x;\n    double yy = y - atoms[atom].y;\n    double zz = z - atoms[atom].z;\n    double rsq = xx*xx + yy*yy + zz*zz;\n    double xi;\n    if (axis == 0) xi = xx;\n    else if (axis == 1) xi = yy;\n    else xi = zz;\n    return core_pot.core_derivative(atn, core, m, axis, xi, rsq, xx, yy, zz);\n}\n\ndouble Molecule::molecular_core_potential(double x, double y, double z) const {\n    int natom = atoms.size();\n    double sum = 0.0;\n\n    for (int i=0; i<natom; ++i) {\n        unsigned int atn = atoms[i].atomic_number;\n        if (core_pot.is_defined(atn)) {\n            double r = distance(atoms[i].x, atoms[i].y, atoms[i].z, x, y, z);\n            sum += core_pot.potential(atn, r);\n        }\n    }\n\n    return sum;\n}\n\ndouble Molecule::core_potential_derivative(int atom, int axis, double x, double y, double z) const {\n    int natom = atoms.size();\n    if (natom <= atom) return 0.0;\n\n    unsigned int atn = atoms[atom].atomic_number;\n    //if (!core_pot.is_defined(atn)) return 0.0;\n\n    double xi;\n    if (axis == 0) xi = x-atoms[atom].x;\n    else if (axis == 1) xi = y-atoms[atom].y;\n    else xi = z-atoms[atom].z;\n    double r = distance(atoms[atom].x, atoms[atom].y, atoms[atom].z, x, y, z);\n    return core_pot.potential_derivative(atn, xi, r);\n}\n\nvoid Molecule::read_core_file(const std::string& filename) {\n    std::set<unsigned int> atomset;\n    int natom = atoms.size();\n    for (int i=0; i<natom; ++i) {\n        if (atomset.count(atoms[i].atomic_number) == 0)\n            atomset.insert(atoms[i].atomic_number);\n    }\n\n    core_pot.read_file(filename, atomset, get_eprec());\n\n    //return;\n\n    // rcut update\n    for (int i=0; i<natom; ++i) {\n        unsigned int atn = atoms[i].atomic_number;\n        if (core_pot.is_defined(atn)) {\n            double q = atoms[i].q - core_pot.n_core_orb(atn) * 2;\n            if (q == 0.0) {\n                rcut[i] = 1.0;\n                continue;\n            }\n            double r = rcut[i];\n            rcut[i] = 1.0/smoothing_parameter(q, get_eprec());\n            //rcut[i] = 1.0/smoothing_parameter(q, 1.0);\n            madness::print(\"rcut update\", i, r, \"to\", rcut[i]);\n        }\n    }\n\n    return;\n}\n\n}\n"
  },
  {
    "path": "src/madness/chem/molecule.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_CHEM_MOLECULE_H__INCLUDED\n#define MADNESS_CHEM_MOLECULE_H__INCLUDED\n\n/// \\file moldft/molecule.h\n/// \\brief Declaration of molecule related classes and functions\n\n#include <ctype.h>\n#include <madness/chem/atomutil.h>\n#include <madness/chem/corepotential.h>\n#include <madness/misc/misc.h>\n#include <madness/tensor/tensor.h>\n#include <madness/world/vector.h>\n\n#include <algorithm>\n#include <cmath>\n#include <fstream>\n#include <iostream>\n#include <sstream>\n#include <string>\n#include <vector>\n\n#include \"madness/mra/QCCalculationParametersBase.h\"\n#include \"madness/mra/commandlineparser.h\"\n\nnamespace madness {\n\nclass World;\n\nclass Atom {\n public:\n  double x, y, z, q;           ///< Coordinates and charge in atomic units\n  unsigned int atomic_number;  ///< Atomic number\n  double mass;                 ///< Mass\n  bool pseudo_atom;            ///< Indicates if this atom uses a pseudopotential\n\n  explicit Atom(double x, double y, double z, double q, unsigned int atomic_number, bool pseudo_atom)\n      : x(x), y(y), z(z), q(q), atomic_number(atomic_number), pseudo_atom(pseudo_atom) {\n    mass = get_atomic_data(atomic_number).mass;\n\n    if (mass == -1.0) MADNESS_EXCEPTION(\"faulty element in Atom\", 1);\n\n    // unstable elements are indicated by negative masses, the mass\n    // is taken from the longest-living element\n    if (mass < 0.0) mass *= -1.0;\n  }\n\n  explicit Atom(double x, double y, double z, double q, unsigned int atomic_number) : x(x), y(y), z(z), q(q), atomic_number(atomic_number) {\n    mass = get_atomic_data(atomic_number).mass;\n\n    if (mass == -1.0) MADNESS_EXCEPTION(\"faulty element in Atom\", 1);\n\n    // unstable elements are indicated by negative masses, the mass\n    // is taken from the longest-living element\n    if (mass < 0.0) mass *= -1.0;\n\n    pseudo_atom = false;\n  }\n\n  Atom(const Atom &a) : x(a.x), y(a.y), z(a.z), q(a.q), atomic_number(a.atomic_number), mass(a.mass), pseudo_atom(a.pseudo_atom) {}\n\n  /// Default construct makes a zero charge ghost atom at origin\n  Atom() : x(0), y(0), z(0), q(0), atomic_number(0), mass(0.0), pseudo_atom(false) {}\n\n  bool operator==(const Atom &other) const {\n    double thresh=1.e-10;\n    auto displacement=Vector<double, 3>({x, y, z})-(Vector<double, 3>({other.x, other.y, other.z}));\n    double err = displacement.normf();\n    return ((err<thresh) && q == other.q &&\n            atomic_number == other.atomic_number && mass == other.mass &&\n            pseudo_atom == other.pseudo_atom);\n  }\n\n  int get_atomic_number() const { return atomic_number; }\n\n  madness::Vector<double, 3> get_coords() const { return madness::Vector<double, 3>{x, y, z}; }\n\n  /// return the mass in atomic units (electron mass = 1 a.u.)\n  double get_mass_in_au() const { return constants::atomic_mass_in_au * mass; }\n\n  template <typename Archive>\n  void serialize(Archive &ar) {\n    ar & x & y & z & q & atomic_number & mass & pseudo_atom;\n  }\n  hashT hash() const {\n    hashT h = hash_value(x);\n    hash_combine(h, y);\n    hash_combine(h, z);\n    hash_combine(h, q);\n    hash_combine(h, atomic_number);\n    hash_combine(h, mass);\n    hash_combine(h, pseudo_atom);\n    return h;\n  }\n};\n\nstd::ostream &operator<<(std::ostream &s, const Atom &atom);\n\nclass Molecule {\n public:\n  // Needed for ParameterManager\n  static constexpr char const *tag = \"molecule\";\n  [[nodiscard]] json to_json_if_precedence(std::string const &precedence) const {\n    json mol_schema = to_json();\n    mol_schema[\"parameters\"] = parameters.to_json_if_precedence(precedence);\n    insert_symbols_and_geometry(mol_schema);\n    return mol_schema;\n  }\n\n\n  struct GeometryParameters : public QCCalculationParametersBase {\n    GeometryParameters(const GeometryParameters &other) = default;\n\n    GeometryParameters(World &world, const commandlineparser &parser) : GeometryParameters() {\n      try {\n        set_global_convenience_options(parser);\n        read_input_and_commandline_options(world, parser, \"geometry\");\n        set_derived_values(parser);\n\n      } catch (std::exception &e) {\n        print(tag, \"end\");\n        throw;\n        //                MADNESS_EXCEPTION(\"faulty geometry input\",1);\n      }\n    }\n\n    GeometryParameters() {\n      ignore_unknown_keys = true;\n      ignore_unknown_keys_silently = true;\n      throw_if_datagroup_not_found = true;\n\n      //            initialize<std::vector<std::string>>(\"source\",{\"inputfile\"},\"where\n      //            to get the coordinates from: ({inputfile}, {library,xxx},\n      //            {xyz,xxx.xyz})\");\n      initialize<std::string>(\"source_type\", \"inputfile\", \"where to get the coordinates from\", {\"inputfile\", \"xyz\", \"library\"});\n      initialize<std::string>(\"source_name\", \"TBD\", \"name of the geometry from the library or the input file\");\n      initialize<double>(\"eprec\", 1.e-4, \"smoothing for the nuclear potential\");\n      initialize<std::string>(\"units\", \"atomic\", \"coordinate units\", {\"atomic\", \"angstrom\", \"bohr\", \"au\"});\n      initialize<std::vector<double>>(\"field\", {0.0, 0.0, 0.0}, \"external electric field\");\n      initialize<bool>(\"no_orient\", false,\n                       \"if true the molecule coordinates will not be \"\n                       \"reoriented and/or symmetrized\");\n      initialize<double>(\"symtol\", -1.e-2,\n                         \"distance threshold for determining the \"\n                         \"symmetry-equivalent atoms; negative: old algorithm\");\n\n      initialize<std::string>(\"core_type\", \"none\", \"core potential type\", {\"none\", \"mcp\"});\n      initialize<bool>(\"psp_calc\", false, \"pseudopotential calculation for all atoms\");\n      initialize<bool>(\"pure_ae\", true, \"pure all electron calculation with no pseudo-atoms\");\n    }\n\n    std::string get_tag() const override {\n      return std::string(\"geometry\");\n    }\n\n    void set_global_convenience_options(const commandlineparser &parser) {\n      if (parser.key_exists(\"geometry\")) {\n        set_user_defined_value(\"source_name\", parser.value(\"geometry\"));\n      }\n    }\n\n    void set_derived_values(const commandlineparser &parser) {\n      // check if we use an xyz file, the structure library or the input file\n      set_derived_value(\"source_name\",\n                        parser.value(\"input\"));  // will not override user input\n      std::string src_type = derive_source_type_from_name(source_name(), parser);\n      set_derived_value(\"source_type\", src_type);\n      if (parser.key_exists(\"no_orient\") and parser.value(\"no_orient\") == \"true\") set_derived_value(\"no_orient\", true);\n\n      // check for ambiguities in the derived source type\n      if (not is_user_defined(\"source_type\")) {\n        std::ifstream f(source_name().c_str());\n        bool found_geometry_file = f.good();\n        //                bool\n        //                found_geometry_file=std::filesystem::exists(source_name());\n\n        bool geometry_found_in_library = true;\n        try {  // check for existence of file and structure in the library\n          std::ifstream f;\n          position_stream_in_library(f, source_name());\n        } catch (...) {\n          geometry_found_in_library = false;\n        }\n\n        if (found_geometry_file and geometry_found_in_library) {\n          madness::print(\"\\n\\n\");\n          madness::print(\n              \"geometry specification ambiguous: found geometry in \"\n              \"the structure library and in a file\\n\");\n          madness::print(\"  \", get_structure_library_path());\n          madness::print(\"  \", source_name());\n          madness::print(\n              \"\\nPlease specify the location of your geometry input \"\n              \"by one of the two lines:\\n\");\n          madness::print(\"  source_type xyz\");\n          madness::print(\"  source_type library\\n\\n\");\n          MADNESS_EXCEPTION(\"faulty input\\n\\n\", 1);\n        }\n      }\n\n      //            std::vector<std::string> src=source();\n      //\n      //            // some convenience for the user\n      //\n      //            // if source is the input file provide the name of the input\n      //            file if (src.size()==1 and src[0]==\"inputfile\")\n      //                set_derived_value(\"source\",std::vector<std::string>({src[0],parser.value(\"input\")}));\n      //            // if source is not \"inputfile\" or \"library\" assume an xyz\n      //            file if (src.size()==1 and src[0]!=\"inputfile\") {\n      //                std::size_t found=src[0].find(\"xyz\");\n      //                if (found==src[0].size()-3) { // check input file ends\n      //                with xyz\n      //                    set_user_defined_value(\"source\",\n      //                    std::vector<std::string>({\"xyz\", src[0]}));\n      //                } else {\n      //                    throw std::runtime_error(\"error in deriving geometry\n      //                    parameters\");\n      //                }\n      //            }\n\n      if (source_type() == \"xyz\") set_derived_value(\"units\", std::string(\"angstrom\"));\n      if (units() == \"bohr\" or units() == \"au\") set_derived_value(\"units\", std::string(\"atomic\"));\n    }\n\n    std::string source_type() const { return get<std::string>(\"source_type\"); }\n    std::string source_name() const { return get<std::string>(\"source_name\"); }\n    std::vector<double> field() const { return get<std::vector<double>>(\"field\"); }\n    double eprec() const { return get<double>(\"eprec\"); }\n    std::string units() const { return get<std::string>(\"units\"); }\n    std::string core_type() const { return get<std::string>(\"core_type\"); }\n    bool psp_calc() const { return get<bool>(\"psp_calc\"); }\n    bool pure_ae() const { return get<bool>(\"pure_ae\"); }\n    bool no_orient() const { return get<bool>(\"no_orient\"); }\n    double symtol() const { return get<double>(\"symtol\"); }\n\n    static std::string derive_source_type_from_name(const std::string name, const commandlineparser &parser) {\n      if (name == parser.value(\"input\")) return \"inputfile\";\n      std::size_t pos = name.find(\".xyz\");\n      if (pos != std::string::npos) return \"xyz\";\n      return \"library\";\n    }\n  };\n\n private:\n  // If you add more fields don't forget to serialize them\n  std::vector<Atom> atoms;\n  std::vector<double> rcut;  // Reciprocal of the smoothing radius\n  CorePotentialManager core_pot;\n  madness::Tensor<double> field;\n\n  /// The molecular point group is automatically assigned in the\n  /// identify_pointgroup function\n  std::string pointgroup_ = \"c1\";\n\n public:\n  GeometryParameters parameters;\n\n  static void print_parameters();\n\n  std::string get_pointgroup() const { return pointgroup_; }\n\n private:\n  void swapaxes(int ix, int iy);\n\n  template <typename opT>\n  bool test_for_op(opT op, const double symtol) const;\n\n  template <typename opT>\n  void symmetrize_for_op(opT op, const double symtol);\n\n  template <typename opT>\n  int find_symmetry_equivalent_atom(int iatom, opT op, const double symtol) const;\n\n  bool test_for_c2(double xaxis, double yaxis, double zaxis, const double symtol) const;\n\n  bool test_for_sigma(double xaxis, double yaxis, double zaxis, const double symtol) const;\n\n  bool test_for_inverse(const double symtol) const;\n\n  /// Apply to (x,y,z) a C2 rotation about an axis thru the origin and\n  /// (xaxis,yaxis,zaxis)\n  struct apply_c2 {\n    double xaxis, yaxis, zaxis;\n    apply_c2(double xaxis, double yaxis, double zaxis) : xaxis(xaxis), yaxis(yaxis), zaxis(zaxis) {}\n    void operator()(double &x, double &y, double &z) const {\n      double raxissq = xaxis * xaxis + yaxis * yaxis + zaxis * zaxis;\n      double dx = x * xaxis * xaxis / raxissq;\n      double dy = y * yaxis * yaxis / raxissq;\n      double dz = z * zaxis * zaxis / raxissq;\n      x = 2.0 * dx - x;\n      y = 2.0 * dy - y;\n      z = 2.0 * dz - z;\n    }\n  };\n\n  /// Apply to (x,y,z) a reflection through a plane containing the origin with\n  /// normal (xaxis,yaxis,zaxis)\n  struct apply_sigma {\n    double xaxis, yaxis, zaxis;\n    apply_sigma(double xaxis, double yaxis, double zaxis) : xaxis(xaxis), yaxis(yaxis), zaxis(zaxis) {}\n    void operator()(double &x, double &y, double &z) const {\n      double raxissq = xaxis * xaxis + yaxis * yaxis + zaxis * zaxis;\n      double dx = x * xaxis * xaxis / raxissq;\n      double dy = y * yaxis * yaxis / raxissq;\n      double dz = z * zaxis * zaxis / raxissq;\n\n      x = x - 2.0 * dx;\n      y = y - 2.0 * dy;\n      z = z - 2.0 * dz;\n    }\n  };\n\n  struct apply_inverse {\n    double xaxis, yaxis, zaxis;\n    apply_inverse(double xaxis, double yaxis, double zaxis) : xaxis(xaxis), yaxis(yaxis), zaxis(zaxis) {}\n    void operator()(double &x, double &y, double &z) const {\n      x = -x;\n      y = -y;\n      z = -z;\n    }\n  };\n\n public:\n  /// Makes a molecule with zero atoms\n  Molecule() : atoms(), rcut(), core_pot(), field(3L){};\n\n  /// makes a molecule from a list of atoms\n  Molecule(std::vector<Atom> atoms, double eprec, CorePotentialManager core_pot = {}, madness::Tensor<double> field = madness::Tensor<double>(3L));\n\n  /// makes a molecule using contents of \\p parser\n  Molecule(World &world, const commandlineparser &parser);\n\n  void get_structure();\n\n  void read_structure_from_library(const std::string &name);\n\n  static std::istream &position_stream_in_library(std::ifstream &f, const std::string &name);\n\n  static std::string get_structure_library_path();\n\n  /// print out a Gaussian cubefile header\n\n  /// @param[in] offset  the offset to be subtracted from the coordinates\n  std::vector<std::string> cubefile_header(const Vector<double, 3> offset = Vector<double, 3>(0.0)) const;\n\n  // initializes Molecule using the contents of file \\c filename\n  void read_file(const std::string &filename);\n\n  // initializes Molecule using the contents of stream \\c f\n  void read(std::istream &f);\n\n  // initializes Molecule using the contents of file \\c filenam assuming an xyz\n  // file\n  void read_xyz(const std::string filename);\n\n  void read_core_file(const std::string &filename);\n\n  std::string guess_file() const { return core_pot.guess_file(); };\n\n  unsigned int n_core_orb_all() const;\n\n  unsigned int n_core_orb(unsigned int atn) const {\n    if (core_pot.is_defined(atn))\n      return core_pot.n_core_orb_base(atn);\n    else\n      return 0;\n  };\n\n  unsigned int get_core_l(unsigned int atn, unsigned int c) const { return core_pot.get_core_l(atn, c); }\n\n  double get_core_bc(unsigned int atn, unsigned int c) const { return core_pot.get_core_bc(atn, c); }\n\n  double core_eval(int atom, unsigned int core, int m, double x, double y, double z) const;\n\n  double core_derivative(int atom, int axis, unsigned int core, int m, double x, double y, double z) const;\n\n  bool is_potential_defined(unsigned int atn) const { return core_pot.is_defined(atn); };\n\n  bool is_potential_defined_atom(int i) const { return core_pot.is_defined(atoms[i].atomic_number); };\n\n  void add_atom(double x, double y, double z, double q, int atn);\n\n  void add_atom(double x, double y, double z, double q, int atn, bool psat);\n\n  size_t natom() const { return atoms.size(); };\n\n  void set_atom_charge(unsigned int i, double zeff);\n\n  unsigned int get_atom_charge(unsigned int i) const;\n\n  unsigned int get_atomic_number(unsigned int i) const;\n\n  void set_pseudo_atom(unsigned int i, bool psat);\n\n  bool get_pseudo_atom(unsigned int i) const;\n\n  void set_atom_coords(unsigned int i, double x, double y, double z);\n\n  madness::Tensor<double> get_all_coords() const;\n\n  std::vector<madness::Vector<double, 3>> get_all_coords_vec() const;\n\n  std::vector<double> atomic_radii;\n\n  void set_all_coords(const madness::Tensor<double> &newcoords);\n\n  void update_rcut_with_eprec(double value);\n\n  void set_rcut(double value);\n\n  std::vector<double> get_rcut() const { return rcut; }\n\n  void set_core_eprec(double value) { core_pot.set_eprec(value); }\n\n  void set_core_rcut(double value) { core_pot.set_rcut(value); }\n\n  double get_eprec() const { return parameters.eprec(); }\n\n  double bounding_cube() const;\n\n  const Atom &get_atom(unsigned int i) const;\n\n  const std::vector<Atom> &get_atoms() const { return atoms; }\n\n  /// print all parameters and the molecular geometry\n  void print(std::ostream& os=std::cout, const bool defined_only=false) const;\n\n  /// print user-defined parameters and the molecular geometry\n  void print_defined_only(std::ostream& os=std::cout) const {\n      this->print(os,true);\n  };\n\n  double inter_atomic_distance(unsigned int i, unsigned int j) const;\n\n  double nuclear_repulsion_energy() const;\n\n  double nuclear_repulsion_derivative(size_t iatom, int axis) const;\n\n  /// compute the nuclear-nuclear contribution to the second derivatives\n\n  /// @param[in]  iatom   the i-th atom (row of the hessian)\n  /// @param[in]  jatom   the j-th atom (column of the hessian)\n  /// @param[in]  iaxis   the xyz axis of the i-th atom\n  /// @param[in]  jaxis   the xyz axis of the j-th atom\n  /// return the (3*iatom + iaxis, 3*jatom + jaxis) matix element of the hessian\n  double nuclear_repulsion_second_derivative(int iatom, int jatom, int iaxis, int jaxis) const;\n\n  /// return the hessian matrix of the second derivatives d^2/dxdy V\n\n  /// no factor 0.5 included\n  Tensor<double> nuclear_repulsion_hessian() const;\n\n  /// compute the dipole moment of the nuclei\n\n  ///  @param[in] axis the axis (x, y, z)\n  double nuclear_dipole(int axis) const;\n\n  /// compute the derivative of the nuclear dipole wrt a nuclear displacement\n\n  /// @param[in]  atom    the atom which will be displaced\n  /// @param[in]  axis    the axis where the atom will be displaced\n  /// @return     a vector which all 3 components of the dipole derivative\n  Tensor<double> nuclear_dipole_derivative(const int atom, const int axis) const;\n\n  /// evaluate the nuclear charge density at point `{x,y,z}` using the default\n  /// MADNESS nuclear model. See smoothed_density() for the description\n  /// of the default nuclear model.\n  /// \\param x,y,z the point at which the nuclear charge density is evaluated\n  /// \\param rscale setting `rscale>1` will make a nucleus larger by a factor of\n  /// \\p rscale (in other words, `rcut` is multiplied by the inverse of by this)\n  /// \\return the nuclear charge density at point `{x,y,z}`\n  /// \\sa smoothed_density()\n  double nuclear_charge_density(double x, double y, double z, double rscale = 1.) const;\n\n  double smallest_length_scale() const;\n\n  std::string symmetrize_and_identify_point_group(const double symtol);\n\n  /// Moves the center of nuclear charge to the origin\n  void center();\n\n  /// rotates the molecule and the external field\n\n  void fix_phase();\n\n  /// @param[in]  D   the rotation matrix\n  void rotate(const Tensor<double> &D);\n\n  /// translate the molecule\n  void translate(const Tensor<double> &translation);\n\n  Tensor<double> center_of_mass() const;\n\n  /// compute the mass-weighting matrix for the hessian\n\n  /// use as\n  /// mass_weighted_hessian=inner(massweights,inner(hessian,massweights));\n  Tensor<double> massweights() const {\n    Tensor<double> M(3 * natom(), 3 * natom());\n    for (size_t i = 0; i < natom(); i++) {\n      const double sqrtmass = 1.0 / sqrt(get_atom(i).get_mass_in_au());\n      M(3 * i, 3 * i) = sqrtmass;\n      M(3 * i + 1, 3 * i + 1) = sqrtmass;\n      M(3 * i + 2, 3 * i + 2) = sqrtmass;\n    }\n    return M;\n  }\n\n  Tensor<double> moment_of_inertia() const;\n\n  void orient(bool verbose = false);\n\n  double total_nuclear_charge() const;\n\n  /// nuclear attraction potential for the whole molecule\n  double nuclear_attraction_potential(double x, double y, double z) const;\n\n  /// nuclear attraction potential for a specific atom in the molecule\n  double atomic_attraction_potential(int iatom, double x, double y, double z) const;\n\n  double molecular_core_potential(double x, double y, double z) const;\n\n  double core_potential_derivative(int atom, int axis, double x, double y, double z) const;\n\n  double nuclear_attraction_potential_derivative(int atom, int axis, double x, double y, double z) const;\n\n  double nuclear_attraction_potential_second_derivative(int atom, int iaxis, int jaxis, double x, double y, double z) const;\n\n bool operator==(const Molecule& other) const {\n    if (atoms.size() != other.atoms.size() || rcut.size() != other.rcut.size() || pointgroup_ != other.pointgroup_) return false;\n    for (size_t i = 0; i < atoms.size(); ++i) {\n      if (not (atoms[i] == other.atoms[i])) return false;\n    }\n    for (size_t i = 0; i < rcut.size(); ++i) {\n      if (rcut[i] != other.rcut[i]) return false;\n    }\n\n    return (field-other.field).normf()<1.e-13 && parameters == other.parameters;\n  }\n\n  template <typename Archive>\n  void serialize(Archive &ar) {\n    ar & atoms & rcut & core_pot & parameters & pointgroup_ & field;\n  }\n\n  hashT hash() const {\n    hashT h = hash_range(atoms.begin(), atoms.end());\n    hash_combine(h, hash_range(rcut.begin(), rcut.end()));\n    hash_combine(h, pointgroup_);\n    return h;\n  }\n  [[nodiscard]] json to_json() const;\n  void insert_symbols_and_geometry(json &mol_json) const;\n  void from_json(const json &mol_json);\n};\n\n}  // namespace madness\n\n#endif"
  },
  {
    "path": "src/madness/chem/molopt.h",
    "content": "#ifndef MADNESS_MOLOPT_H\n#define MADNESS_MOLOPT_H\n\n#include <madness/chem/molecule.h>\n#include <madness/tensor/solvers.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/tensor_lapack.h>\n\n#include <algorithm>\n#include <string>\n\nnamespace madness {\n\n// Generalized Optimization using targetT to provide energy and gradient of a\n// molecule targetT must have the following methods:\n//  void energy_and_gradient(Molecule& molecule, double& energy, Tensor<double>&\n//  gradient) double value(const Tensor<double>& x)  // value of target at x\n//  Let's express that in code so we can get compile time errors if we don't\n//  have the right methods\n//\n//\n//\n\nclass MolOpt {\n private:\n  const int maxiter;     //< Maximum number of iterations\n  const double maxstep;  //< Maximum step in any one coordinate (currently\n                         //Cartesian in a.u.)\n  const double etol;     //< Convergence test for energy change\n  const double gtol;     //< Convergence test for maximum gradient element\n  const double xtol;     //< Convergence test for Cartesian step in a.u.\n  const double energy_precision;    //< Assumed precision in energy\n  const double gradient_precision;  //< Assumed precision in the gradient\n  const int print_level;     //< print_level=0 is none; 1 is default; 2 is debug\n  const std::string update;  //< update = \"bfgs\" (default) or \"sr1\"\n\n  Tensor<double> hessian;\n\n  /// Returns new search direction given gradient and projected/shifted hessian\n  Tensor<double> new_search_direction(const Tensor<double>& g,\n                                      const Tensor<double>& h) const {\n    Tensor<double> dx, s;\n    double tol = gradient_precision;  // threshold for small hessian eigenvalues\n    double trust = std::min(maxstep * g.dim(0), 1.0);\n\n    Tensor<double> v, e;\n    syev(h, v, e);\n    if (print_level > 1) print(\"hessian eigenvalues\", e);\n\n    // Transform gradient into spectral basis\n    Tensor<double> gv = inner(g, v);\n    if (print_level > 1) print(\"spectral gradient\", gv);\n\n    // Take step applying restrictions\n    int nneg = 0, nsmall = 0, nrestrict = 0;\n    for (int i = 0; i < e.dim(0); i++) {\n      if (e[i] > 900.0) {\n        // This must be a translation or rotation ... skip it\n        if (print_level > 1) print(\"skipping redundant mode\", i);\n      } else if (e[i] <\n                 -tol) {  // BGFS hessian should be positive ... SR1 may not be\n        if (print_level > 0)\n          printf(\"   forcing negative eigenvalue to be positive %d %.1e\\n\", i,\n                 e[i]);\n        nneg++;\n        e[i] = tol;  // or -e[i] ??\n      } else if (e[i] < tol) {\n        if (print_level > 0)\n          printf(\"   forcing small eigenvalue to be positive %d %.1e\\n\", i,\n                 e[i]);\n        nsmall++;\n        e[i] = tol;\n      }\n\n      gv[i] = -gv[i] / e[i];  // Newton step\n\n      if (std::abs(gv[i]) > trust) {  // Step restriction\n        double gvnew = trust * std::abs(gv(i)) / gv[i];\n        if (print_level > 0)\n          printf(\"   restricting step in spectral direction %d %.1e --> %.1e\\n\",\n                 i, gv[i], gvnew);\n        nrestrict++;\n        gv[i] = gvnew;\n      }\n    }\n    if (print_level > 0 && (nneg || nsmall || nrestrict))\n      printf(\"   nneg=%d nsmall=%d nrestrict=%d\\n\", nneg, nsmall, nrestrict);\n\n    // Transform back from spectral basis\n    gv = inner(v, gv);\n\n    if (print_level > 1) print(\"cartesian dx before restriction\", gv);\n\n    // Now apply step restriction in real space\n    bool printing = false;\n    for (int i = 0; i < gv.dim(0); i++) {\n      if (fabs(gv[i]) > maxstep) {\n        gv[i] = maxstep * gv[i] / fabs(gv[i]);\n        if (print_level > 0) {\n          if (!printing) printf(\"  restricting step in Cartesian direction\");\n          printing = true;\n          printf(\" %d\", i);\n        }\n      }\n    }\n    if (printing) printf(\"\\n\");\n\n    return gv;\n  }\n\n  /// Makes the projector onto independent coordinates\n\n  /// For Cartesians \\code P*x removes the rotations and translations;\n  /// eventually will add support for redundant internal coordinates\n  Tensor<double> make_projector(const Molecule& molecule) {\n    const int natom = molecule.natom();\n    const Tensor<double> coords = molecule.get_all_coords();  // (natom,3)\n\n    // Construct normalized vectors in V in the direction of the translations\n    // and infinitesimal rotations\n    Tensor<double> V(6, natom, 3);  // First 3 translations, second 3 rotations\n\n    for (int k = 0; k < 3; k++)  // Translations already orthonormal\n      V(k, _, k) = 1.0 / std::sqrt(static_cast<double>(natom));\n\n    Tensor<double> centroid(3);\n    for (int k = 0; k < 3; k++) centroid(k) = coords(_, k).sum() / natom;\n    if (print_level > 1) print(\"centroid\", centroid);\n\n    for (int i = 0; i < natom; i++) {\n      double x = coords(i, 0) - centroid[0];\n      double y = coords(i, 1) - centroid[1];\n      double z = coords(i, 2) - centroid[2];\n\n      V(3, i, 0) = 0;  // Rotn about x axis\n      V(3, i, 1) = z;\n      V(3, i, 2) = -y;\n\n      V(4, i, 0) = z;  // Rotn about y axis\n      V(4, i, 1) = 0;\n      V(4, i, 2) = -x;\n\n      V(5, i, 0) = -y;\n      V(5, i, 1) = x;\n      V(5, i, 2) = 0;  // Rotn about z axis\n    }\n\n    V = V.reshape(6, 3 * natom);\n\n    if (print_level > 1) print(\"V before orthonormal\");\n    if (print_level > 1) print(V);\n\n    // Normalize rotations, orthonormalize rotns and translations,\n    // noting may end up with a zero vector for linear molecules\n    for (int i = 3; i < 6; i++) {\n      V(i, _).scale(1.0 / V(i, _).normf());\n      for (int j = 0; j < i; j++) {\n        double s = V(i, _).trace(V(j, _));\n        V(i, _) -= V(j, _) * s;\n      }\n      double vnorm = V(i, _).normf();\n      if (vnorm > 1e-6) {\n        V(i, _) *= 1.0 / vnorm;\n      } else {\n        V(i, _) = 0.0;\n      }\n    }\n\n    // The projector is 1 - VT*V\n    V = -inner(transpose(V), V);\n    for (int i = 0; i < 3 * natom; i++) V(i, i) += 1.0;\n\n    return V;\n  }\n\n  /// a1 is initial step (usually pick 1)\n  /// energy0 is energy at zero step\n  /// dxgrad is gradient projected onto search dir\n  ///\n  template <typename targetT>\n  double line_search(Molecule& molecule, targetT& target,\n                     const Tensor<double>& dx, double energy0, double dxgrad,\n                     double a1 = 1.0) {\n    double energy1;\n    double hess, a2;\n    const char* lsmode = \"\";\n\n    Tensor<double> x = molecule.get_all_coords().flat();\n\n    // Ensure we are walking downhill (BFGS should ensure that, but SR1 may not)\n    if (dxgrad * a1 > 0.0) {\n      if (print_level > 0) print(\"    line search gradient +ve \", a1, dxgrad);\n      a1 = -a1;\n    }\n\n    // Compute energy at new point\n    energy1 = target.value(x + a1 * dx);\n\n    // Fit to a parabola using energy0, g0, energy1\n    hess = 2.0 * (energy1 - energy0 - a1 * dxgrad) / (a1 * a1);\n    a2 = -dxgrad / hess;  // Newton step\n\n    if (std::abs(energy1 - energy0) <\n        energy_precision) {  // Insufficient precision\n      a2 = a1;\n      lsmode = \"fixed\";\n    } else if (hess > 0.0) {                           // Positive curvature\n      if ((energy1 - energy0) <= -energy_precision) {  // a1 step went downhill\n        lsmode = \"downhill\";\n        if (std::abs(a2) >\n            4.0 * std::abs(a1)) {  // Walking down hill but don't go too far\n          lsmode = \"restrict\";\n          a2 = 4.0 * a1;\n        }\n      } else {  // a1 step went uphill ... we have bracketed the minimum.\n        lsmode = \"bracket\";\n      }\n    } else {                                         // Negative curvature\n      if ((energy1 - energy0) < energy_precision) {  // keep walking down hill\n        lsmode = \"negative\";\n        a2 = 2e0 * a1;\n      } else {\n        lsmode = \"punt\";  // negative curvature but no apparent progress\n        a2 = a1;\n      }\n    }\n\n    if (std::abs(a2 - a1) <\n        0.2 * std::abs(a1)) {  // Take full step to avoid reconverging SCF\n      a2 = a1;\n      lsmode = \"fixed2\";\n    }\n\n    // Predicted next energy\n    double energy2 = energy0 + dxgrad * a2 + 0.5 * hess * a2 * a2;\n\n    if (print_level > 0) {\n      printf(\"\\n   line search grad=%.2e hess=%.2e mode=%s newstep=%.3f\\n\",\n             dxgrad, hess, lsmode, a2);\n      printf(\"                      predicted %.12e\\n\\n\", energy2);\n    }\n\n    return a2;\n  }\n\n public:\n  MolOpt(int maxiter = 20, double maxstep = 0.1, double etol = 1e-4,\n         double gtol = 1e-3, double xtol = 1e-3, double energy_precision = 1e-5,\n         double gradient_precision = 1e-4, int print_level = 1,\n         std::string update = \"BFGS\")\n      : maxiter(maxiter),\n        maxstep(maxstep),\n        etol(std::max(etol, energy_precision)),\n        gtol(std::max(gtol, gradient_precision)),\n        xtol(xtol),\n        energy_precision(energy_precision),\n        gradient_precision(gradient_precision),\n        print_level(print_level),\n        update(update)\n\n  {\n    if (print_level > 0) {\n      std::cout << endl;\n      print_justified(\"Molecular Geometry Optimization\");\n      std::cout << endl;\n      print(\"       maximum iterations\", maxiter);\n      print(\"             maximum step\", maxstep);\n      print(\"       energy convergence\", etol);\n      print(\"     gradient convergence\", gtol);\n      print(\"    cartesian convergence\", xtol);\n      print(\"         energy precision\", energy_precision);\n      print(\"       gradient precision\", gradient_precision);\n      print(\"           hessian update\", update);\n    }\n  }\n\n  void set_hessian(const Tensor<double>& h) { hessian = h; }\n\n  const Tensor<double>& get_hessian() const { return hessian; }\n\n  void initialize_hessian(const Molecule& molecule) {\n    const int N = 3 * molecule.natom();\n    hessian = Tensor<double>(N, N);\n    for (int i = 0; i < N; i++) hessian(i, i) = 0.5;\n  }\n\n  template <typename targetT>\n  Molecule optimize(Molecule molecule,\n                    targetT& target) {  ////!!!!!!! pass by value\n    const int natom = molecule.natom();\n\n    // Code structured so it will be straightforward to introduce redundant\n    // internal coordinates\n\n    if (hessian.size() == 0) initialize_hessian(molecule);\n\n    double ep = 0.0;               // Previous energy\n    Tensor<double> gp(3 * natom);  // Previous gradient\n    Tensor<double> dx(3 * natom);  // Current search direction\n    gp = 0.0;\n    dx = 0.0;\n\n    for (int iter = 0; iter < maxiter; iter++) {\n      if (print_level > 0)\n        print(\"\\n\\n Geometry optimization iteration\", iter, \"\\n\");\n      if (print_level > 0) molecule.print();\n\n      double e;\n      Tensor<double> g;\n\n      target.energy_and_gradient(molecule, e, g);\n\n      double de = e - ep;\n      double dxmax = dx.absmax();\n      double gmax = g.absmax();\n\n      bool dxconv = (iter > 0) && (dxmax < xtol);\n      bool gconv = gmax < gtol;\n      bool econv = (iter > 0) && (std::abs(de) < etol);\n      bool converged = econv && dxconv && gconv;\n\n      if (!converged && gmax < gradient_precision) {\n        if (print_level > 0)\n          print(\n              \"\\nInsufficient precision in gradient to proceed further -- \"\n              \"forcing convergence\\n\");\n        converged = true;\n      }\n\n      if (print_level > 0) {\n        const char* tf[] = {\"F\", \"T\"};\n        print(\" \");\n        printf(\n            \"      energy        delta-e     max-dx     max-g     e  dx   g\\n\");\n        printf(\n            \" ----------------  ---------  ---------  ---------  --- --- \"\n            \"---\\n\");\n        printf(\" %15.6f   %9.2e  %9.2e  %9.2e   %s   %s   %s\\n\", e, de, dxmax,\n               gmax, tf[econv], tf[dxconv], tf[gconv]);\n        // print(e, de, econv, dxmax, dxconv, dxnorm, gmax, gconv, gnorm,\n        // converged);\n        print(\" \");\n      }\n\n      if (converged) {\n        if (print_level > 0) print(\"\\n Geometry optimization converged!\\n\");\n        if (print_level > 0) molecule.print();\n        break;\n      }\n\n      // Construct projector\n      Tensor<double> P = make_projector(molecule);\n\n      // Project the gradient before updating Hessian\n      g = inner(P, g);\n      if (print_level > 1) print(\"gradient after projection\", g);\n\n      if (iter > 0) {\n        if ((g - gp).absmax() < 2.0 * gradient_precision) {\n          if (print_level > 0)\n            print(\n                \"  skipping hessian update due to insufficient precision in \"\n                \"gradient\");\n        } else if (update == \"bfgs\") {\n          QuasiNewton::hessian_update_bfgs(dx, g - gp, hessian);\n        } else if (update == \"sr1\") {\n          QuasiNewton::hessian_update_sr1(dx, g - gp, hessian);\n        } else {\n          throw \"unknown update\";\n        }\n      }\n\n      ep = e;\n      gp = g;\n\n      // Construct the projected and shifted hessian = PHP + shift*(1-P)\n      const double shift = 1000.0;  // this value assumed in new_search_dir\n      Tensor<double> PHPS = inner(P, inner(hessian, P)) - shift * P;\n      if (print_level > 1) {\n        print(\"projector\");\n        print(P);\n      }\n      for (int i = 0; i < 3 * natom; i++) PHPS(i, i) += shift;\n      if (print_level > 1) {\n        print(\"PHPS\");\n        print(PHPS);\n      }\n\n      // Construct new search direction by diagonalizing Hessian and taking\n      // spectral step\n      dx = new_search_direction(g, PHPS);\n      if (print_level > 1) print(\"dx\", dx);\n\n      // Line search\n      double alpha = line_search(molecule, target, dx, e, dx.trace(g), 1.0);\n      if (print_level > 1) print(\"step\", alpha);\n      dx.scale(alpha);\n      if (print_level > 1) print(\"scaled dx\", dx);\n\n      // Take the step\n      Tensor<double> x = molecule.get_all_coords().flat();\n      x += dx;\n      molecule.set_all_coords(x.reshape(natom, 3));\n\n      if (print_level > 1) print(\"new molecular coords\");\n    }\n    // return the optimized molecule\n    return molecule;\n  }\n};\n}  // namespace madness\n#endif  // MADNESS_MOLOPT_H\n"
  },
  {
    "path": "src/madness/chem/mp2.cc",
    "content": "/*\n This file is part of MADNESS.\n\n Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n For more information please contact:\n\n Robert J. Harrison\n Oak Ridge National Laboratory\n One Bethel Valley Road\n P.O. Box 2008, MS-6367\n\n email: harrisonrj@ornl.gov\n tel:   865-241-3937\n fax:   865-572-0680\n\n $Id$\n */\n/*!\n \\file mp2.h\n \\brief Solves molecular MP2 equations\n \\defgroup Solves molecular MP2 equations\n \\ingroup examples\n\n The source is\n <a href=http://code.google.com/p/m-a-d-n-e-s-s/source/browse/local/trunk/src/apps/examples/mp2.h>here</a>.\n\n\n */\n\n#include<madness/chem/mp2.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/lbdeux.h>\n#include<madness/chem/SCF.h>\n#include <madness/mra/nonlinsol.h>\n#include<madness/chem/correlationfactor.h>\n#include<madness/chem/nemo.h>\n#include<madness/chem/localizer.h>\n#include<madness/chem/ccpairfunction.h>\n#include<madness/chem/CCStructures.h>\n\n#include <iostream>\n\nstatic const double dcut = 1.e-7;\nstatic const double lo = 1.e-6;\nstatic const double bsh_eps = 1.e-7;\n\nusing namespace madness;\n\nnamespace madness {\n\n/// do some load-balancing\n\n/// @param[in]\tf\t\tthe function we want to distribute evenly\n/// @param[in]\tleaf\tif true: weigh leaf nodes only; if false: weigh internal nodes only\nvoid load_balance(const real_function_6d& f, const bool leaf) {\n    LoadBalanceDeux<6> lb(f.world());\n    if (leaf)\n        lb.add_tree(f, LBCost(1.0, 0.1));\n    else\n        lb.add_tree(f, LBCost(0.001, 1.0));\n    FunctionDefaults<6>::redistribute(f.world(), lb.load_balance(2.0, false));\n}\n\n/// ctor\nMP2::MP2(World& world, const commandlineparser& parser) : world(world),\n                   param(world, parser), corrfac(world), correlation_energy(0.0),\n                   coords_sum(-1.0), Q12(world), ttt(0.0), sss(0.0) {\n    {\n        std::shared_ptr<Nemo> nemo = std::shared_ptr<Nemo>(new Nemo(world, parser));\n\n        // by default SCF sets the truncate_mode to 1\n        FunctionDefaults<3>::set_truncate_mode(3);\n        FunctionDefaults<6>::set_truncate_mode(3);\n\n        // get parameters form input file for hf\n        if (world.rank() == 0)\n            print(\"accuracy from dft will be overriden by mp2 to 0.01*thresh\");\n        nemo->get_calc()->set_protocol<6>(world, param.thresh());\n        nemo->get_calc()->param.set_derived_value(\"econv\", param.thresh() * 0.01);\n        nemo->get_calc()->set_protocol<3>(world, nemo->get_calc_param().econv());\n\n        if (world.rank() == 0) nemo->get_calc()->molecule.print();\n\n        hf = std::shared_ptr<HartreeFock>(new HartreeFock(world, nemo));\n        poisson = std::shared_ptr<real_convolution_3d>(\n                CoulombOperatorPtr(world, 0.0001, nemo->get_calc_param().econv()));\n\n        // construct electronic correlation factor only, nuclear correlation\n        // factor depends on the coordinates and must be reassigned for\n        // for each geometric structure\n        corrfac = CorrelationFactor(world, 1.0, dcut, nemo->get_calc()->molecule);\n\n    }\n\n\n    // print some output for the user\n    if (world.rank() == 0) {\n        hf->nemo_ptr->get_calc_param().print(\"reference\");\n        param.print(\"mp2\", \"mp2_end\");\n    }\n\n    // check the user input for consistency\n    param.check_input(hf);\n\n    // initialize the electron pairs and store restart info\n    // or load previous restart information\n    for (int i = param.freeze(); i < hf->nocc(); ++i) {\n        for (int j = i; j < hf->nocc(); ++j) {\n            pairs.insert(i, j, ElectronPair(i, j));\n            if (param.restart())\n                pairs(i, j).load_pair(world);\n        }\n    }\n\n\n}\n\n/// return the molecular correlation energy energy (without the HF energy)\ndouble MP2::value() {\n    hf->value();        // make sure the reference is converged\n    if (not check_core_valence_separation()) enforce_core_valence_separation();\n    return value(hf->get_calc().molecule.get_all_coords());\n}\n\nbool MP2::check_core_valence_separation() const {\n\n    MolecularOrbitals<double, 3> mos(hf->nemos(), hf->get_calc().aeps, {}, hf->get_calc().aocc, {});\n    mos.recompute_localize_sets();\n\n    // check that freeze is consistent with the core/valence block-diagonal structure of the fock matrix\n    bool fine = false;\n    int ntotal = 0;\n    std::vector<Slice> slices = MolecularOrbitals<double, 3>::convert_set_to_slice(mos.get_localize_sets());\n    for (std::size_t i = 0; i < slices.size(); ++i) {\n        const Slice& s = slices[i];\n        int n_in_set = s.end - s.start + 1;\n        ntotal += n_in_set;\n        if (param.freeze() == ntotal) {\n            fine = true;\n            break;\n        }\n    }\n    if (not fine) {\n        print(\"inconsistent core-valence separation and number of frozen orbitals\");\n        print(\"# frozen orbitals\", param.freeze());\n        mos.pretty_print(\"initial orbitals\");\n//        MADNESS_EXCEPTION(\"inconsistency \", 1);\n    }\n\n    // fast return if possible\n    Tensor<double> fock1 = get_fock_matrix();\n    return Localizer::check_core_valence_separation(fock1, mos.get_localize_sets(),true);\n}\n\n\nvoid MP2::enforce_core_valence_separation() {\n\n    MolecularOrbitals<double, 3> mos(hf->nemos(), hf->get_calc().aeps, {}, hf->get_calc().aocc, {});\n    mos.recompute_localize_sets();\n\n    Tensor<double> fock1 = get_fock_matrix();\n\n    // localize the orbitals respecting core-valence separation\n    Localizer localizer(world,hf->get_calc().aobasis,hf->get_calc().molecule,hf->get_calc().ao);\n    localizer.set_enforce_core_valence_separation(true).set_method(hf->nemo_ptr->get_calc_param().localize_method());\n    localizer.set_metric(hf->nemo_ptr->R);\n\n    const auto lmo=localizer.localize(mos,fock1,true);\n    hf->reset_orbitals(lmo);\n    fock.clear();\n    print(\"localized fock matrix\");\n    Tensor<double> fock2=get_fock_matrix();\n    MADNESS_CHECK(Localizer::check_core_valence_separation(fock2,lmo.get_localize_sets()));\n    lmo.pretty_print(\"localized MOs\");\n\n};\n\n\n/// return the molecular correlation energy as a function of the coordinates\ndouble MP2::value(const Tensor<double>& x) {\n\n    // fast return if the MP2 energy is already solved at this geometry\n    double xsq = x.sumsq();\n    if (xsq == coord_chksum())\n        return correlation_energy;\n\n    // nuclear correlation factor depends on the coordinates\n    nuclear_corrfac = hf->nemo_ptr->ncf;\n\n    // make sure HF used the same geometry as we do\n    coords_sum = xsq;\n    MADNESS_CHECK(std::fabs(coord_chksum() - hf->coord_chksum()) < 1.e-14);\n\n    // set all orbitals spaces\n    // When a nuclear correlation factor is used the residual equations\n    // are similarity transformed. Therefore the orbitals in the\n    // projection operator must be set accordingly.\n    if (nuclear_corrfac->type() == NuclearCorrelationFactor::None) {\n        Q12.set_spaces(hf->get_calc().amo);\n    } else {\n        // only valid for closed shell\n        MADNESS_CHECK(hf->get_calc().param.spin_restricted());\n        const std::vector<real_function_3d>& nemos = hf->nemos();\n        const std::vector<real_function_3d>& R2amo = hf->R2orbitals();\n        Q12.set_spaces(R2amo, nemos, R2amo, nemos);\n        if (world.rank() == 0) {\n            print(\"set orbital spaces for the SO projector\");\n            print(\"Q12,R = (1-|nemo><nemo|R2) (1-|nemo><nemo|R2)\");\n        }\n    }\n\n    correlation_energy = 0.0;\n    if (world.rank() == 0) print(\"localize \", hf->get_calc().param.do_localize());\n\n    // compute only one single pair\n    if ((param.i() > -1) and (param.j() > -1)) {\n        pairs(param.i(), param.j()) = make_pair(param.i(), param.j());    // initialize\n        solve_residual_equations(pairs(param.i(), param.j()), param.econv() * 0.05, param.dconv());    // solve\n        correlation_energy += pairs(param.i(), param.j()).e_singlet + pairs(param.i(), param.j()).e_triplet;\n\n        return correlation_energy;\n    }\n\n    // compute the 0th order term and do some coarse pre-iterations\n    for (int i = param.freeze(); i < hf->nocc(); ++i) {\n        for (int j = i; j < hf->nocc(); ++j) {\n            pairs(i, j) = make_pair(i, j);                // initialize\n            solve_residual_equations(pairs(i, j), param.econv() * 0.5, param.dconv());\n            correlation_energy += pairs(i, j).e_singlet + pairs(i, j).e_triplet;\n        }\n    }\n    if (world.rank() == 0) {\n        printf(\"current decoupled mp2 energy %12.8f\\n\", correlation_energy);\n    }\n    if (param.no_compute()) return correlation_energy;\n\n    correlation_energy = 0.0;\n    if (hf->get_calc().param.do_localize()) {\n        // solve the coupled MP1 equations\n        correlation_energy = solve_coupled_equations(pairs, param.econv() * 0.1, param.dconv());\n\n    } else {\n\n        // solve the canonical MP1 equations with increased accuracy\n        for (int i = param.freeze(); i < hf->nocc(); ++i) {\n            for (int j = i; j < hf->nocc(); ++j) {\n                pairs(i, j).converged = false;\n                solve_residual_equations(pairs(i, j), param.econv() * 0.05, param.dconv());\n                correlation_energy += pairs(i, j).e_singlet + pairs(i, j).e_triplet;\n            }\n        }\n    }\n    return correlation_energy;\n}\n\n\n/// solve the residual equation for electron pair (i,j)\nvoid MP2::solve_residual_equations(ElectronPair& result,\n                                   const double econv, const double dconv) const {\n\n\n    if (result.converged or param.no_compute()) {\n        result.print_energy();\n        return;\n    }\n\n    const int i = result.i;\n    const int j = result.j;\n\n    if (world.rank() == 0) printf(\"\\n\\nsolving electron pair (%d, %d)\\n\\n\", i, j);\n    guess_mp1_3(result);\n    result.store_pair(world);\n\n    double energy = compute_energy(result);\n    if (world.rank() == 0)\n        printf(\"finished with prep step at time %6.1fs with energy %12.8f\\n\\n\",\n               wall_time(), energy);\n\n    // the Green's function depends on the zeroth order energy, which is the sum\n    // of the orbital energies of orbitals i and j\n    //  -2.0 G = (T - e_i - e_j) ^ -1\n    const double eps = zeroth_order_energy(i, j);\n    if (world.rank() == 0) print(\"eps in green:  \", eps);\n    real_convolution_6d green = BSHOperator<6>(world, sqrt(-2 * eps), lo,\n                                               bsh_eps);\n\tgreen.destructive()=true;\n    if (world.rank() == 0)\n        std::cout << \"Constructed Green Operator is destructive ? :\" << green.destructive() << std::endl;\n\n    NonlinearSolverND<6> solver(param.maxsub());\n    solver.do_print = (world.rank() == 0);\n    // increment iteration counter upon entry\n    for (++result.iteration; result.iteration <= param.maxiter(); ++result.iteration) {\n\n        result.function.print_size(\"psi\");\n\n        // apply the convolution\n        real_function_6d vphi = multiply_with_0th_order_Hamiltonian(\n                result.function, i, j);\n\n        vphi.print_size(\"Vpsi\");\n\n        vphi.scale(-2.0).truncate();\n        load_balance(vphi, false);\n\n        real_function_6d tmp = green(vphi);    // green is destructive\n        tmp.print_size(\"GV psi\");\n\n        // we have to solve this equation:\n        // psi1 = psi0 + GVpsi1 <=> psi0 + GVpsi1 - psi1 = r =0\n        real_function_6d tmp1 = (result.constant_term + tmp).truncate();\n        tmp1.print_size(\"const + GVpsi\");\n        tmp = Q12(tmp1);\n        tmp.print_size(\"Q12(const + GVpsi)\");\n        //tmp = (Q12(result.constant_term + tmp)).truncate();\n\n        real_function_6d residual = result.function - tmp;\n        result.function = Q12(solver.update(tmp, residual));\n        const double rnorm = residual.norm2();\n        const double fnorm = result.function.norm2();\n        if (world.rank() == 0)\n            printf(\"norm2 of psi, residual %12.8f %12.8f\\n\", fnorm, rnorm);\n\n        double old_energy = energy;\n        energy = compute_energy(result);\n\n        result.converged = ((std::abs(old_energy - energy) < econv) and (\n                rnorm < dconv));\n        result.store_pair(world);\n\n        if (world.rank() == 0)\n            printf(\"finished iteration %2d at time %8.1fs with energy %12.8f\\n\\n\",\n                   result.iteration, wall_time(), energy);\n\n        if (result.converged)\n            break;\n\n    }\n\n    // save the converged first order pair function separately for easier access\n    std::string name = \"pair_\" + stringify(i) + stringify(j) + \"_psi1_converged\";\n    save_function(result.function, name);\n\n    // print the final pair energies\n    result.print_energy();\n}\n\n/// solve the coupled MP1 equations for local orbitals\n\n/// @param[in]  pairs   solved decoupled electron pairs\ndouble MP2::solve_coupled_equations(Pairs<ElectronPair>& pairs,\n                                    const double econv, const double dconv) const {\n\n    if (world.rank() == 0) printf(\"\\nsolving coupled MP2 equations\\n\\n\");\n\n    double total_energy = 0.0;\n    for (int i = param.freeze(); i < hf->nocc(); ++i) {\n        for (int j = i; j < hf->nocc(); ++j) {\n            total_energy += compute_energy(pairs(i, j));\n        }\n    }\n\n    // do the macro-iterations of the whole set of pair functions\n    for (int iteration = 0; iteration < param.maxiter(); ++iteration) {\n\n        // compute the coupling between the pair functions\n        START_TIMER(world);\n        Pairs<real_function_6d> coupling;\n        add_local_coupling(pairs, coupling);\n        END_TIMER(world, \"compute coupling\");\n\n        // compute the vector function, aka the rhs of the residual equations\n        double total_rnorm = 0.0;\n        double old_energy = total_energy;\n        total_energy = 0.0;\n\n        for (int i = param.freeze(); i < hf->nocc(); ++i) {\n            for (int j = i; j < hf->nocc(); ++j) {\n\n                real_function_6d vectorfunction = multiply_with_0th_order_Hamiltonian(pairs(i, j).function, i, j);\n\n                // NOTE THE SIGN\n                vectorfunction -= coupling(i, j);\n\n                const double eps = zeroth_order_energy(i, j);\n                START_TIMER(world);\n                real_convolution_6d green = BSHOperator<6>(world, sqrt(-2 * eps), lo, bsh_eps);\n                vectorfunction.scale(-2.0).truncate();\n                real_function_6d tmp = green(vectorfunction).truncate();\n                END_TIMER(world, \"apply BSH |ket>\");\n\n                START_TIMER(world);\n                tmp = (Q12(pairs(i, j).constant_term + tmp)).truncate();\n\n                real_function_6d residual = pairs(i, j).function - tmp;\n                pairs(i, j).function = tmp;\n\n                const double rnorm = residual.norm2();\n                const double fnorm = pairs(i, j).function.norm2();\n                if (world.rank() == 0)\n                    printf(\"norm2 of psi, residual %2d %2d \"\n                           \"%12.8f %12.8f\\n\", i, j, fnorm, rnorm);\n                double energy = compute_energy(pairs(i, j));\n\n                total_rnorm += rnorm;\n                total_energy += energy;\n                END_TIMER(world, std::string(\" post-BSH \" + stringify(i) + stringify(j)).c_str());\n            }\n        }\n\n        // check convergence\n        bool converged = ((std::abs(old_energy - total_energy) < econv)\n                          and (total_rnorm < dconv));\n\n        // save the pairs\n        for (int i = param.freeze(); i < hf->nocc(); ++i) {\n            for (int j = i; j < hf->nocc(); ++j) {\n                pairs(i, j).store_pair(world);\n            }\n        }\n\n        if (world.rank() == 0)\n            printf(\"finished iteration %2d at time %8.1fs with coupled energy %12.8f\\n\\n\",\n                   iteration, wall_time(), total_energy);\n\n        if (converged) break;\n    }\n\n    return total_energy;\n}\n\n/// compute increments: psi^1 = C + GV C + GVGV C + GVGVGV C + ..\n\n/// for pre-optimization of the mp1 wave function\n/// no restart option here for now\n/// param[inout]\tpair\tthe electron pair\n/// param[in]\t\tgreen\tthe Green's function\nvoid MP2::increment(ElectronPair& pair, real_convolution_6d& green) {\n\n    // don't mess up if we've already done some iterations!\n    if (pair.iteration > 0)\n        return;\n\n    if (world.rank() == 0)\n        print(\"computing increments\");\n    real_function_6d latest_increment;\n    load_function(latest_increment, \"GVpair\");\n\n    for (int ii = 1; ii < 20; ++ii) {\n\n        real_function_6d vphi = multiply_with_0th_order_Hamiltonian(\n                latest_increment, pair.i, pair.j);\n        load_balance(vphi, false);\n\n        /// apply the convolution\n        vphi.scale(-2.0).truncate();\n        latest_increment = green(vphi).truncate();        // green is destructive\n        latest_increment.print_size(\n                \"result of applying 0th order Hamiltonian on latest increment\");\n\n        latest_increment = Q12(latest_increment);\n        pair.function = pair.function + latest_increment;\n\n        // compute the energy\n        compute_energy(pair);\n\n        if (world.rank() == 0)\n            printf(\"finished increment %2d at time %.1fs\\n\\n\", ii, wall_time());\n        const double residual_norm = latest_increment.norm2();\n        if (residual_norm < pair.function.thresh())\n            break;\n    }\n}\n\ndouble MP2::asymmetry(const real_function_6d& f, const std::string s) const {\n    return 0.0;\n    const real_function_6d ff = swap_particles(f);\n    double diff = (ff - f).norm2();\n    f.check_symmetry();\n    if (world.rank() == 0)\n        print(\"asymmetry of \", s, \"  \", diff);\n    return diff;\n}\n\n/// compute the matrix element <ij | g12 Q12 f12 | phi^0>\n\n/// scales quartically. I think I can get this down to cubically by\n/// setting Q12 = (1 - O1)(1 - O2) = 1- O1(1 - 0.5 O2) - O2 (1 - 0.5 O1)\n/// as for the formulas cf the article mra_molecule\n/// @return \tthe energy <ij | g Q f | kl>\ndouble MP2::compute_gQf(const int i, const int j, ElectronPair& pair) const {\n\n    CCTimer t1(world,\"gQf old\");\n    // for clarity of notation\n    const int k = pair.i;\n    const int l = pair.j;\n\n    // the ket space\n    const real_function_3d& ket_i = hf->nemo(i);\n    const real_function_3d& ket_j = hf->nemo(j);\n\n    // the bra space\n    const real_function_3d& bra_k = hf->R2orbital(k);\n    const real_function_3d& bra_l = hf->R2orbital(l);\n\n    // compute <ij| fg |kl>: do it in 3D as (ik| fg |jl)\n    // the operator fg can be rewritten as 1/r12 - f/r12\n    // i.e. as poisson kernel and a bsh kernel. Note the\n    // the bsh kernel includes a factor of 1/(4 pi)\n    const real_function_3d ik = ket_i * bra_k;\n    const real_function_3d jl = ket_j * bra_l;\n\n    // make all the operators that we need\n    const double fourpi = 4.0 * constants::pi;\n    real_convolution_3d fg = BSHOperator<3>(world, corrfac.gamma(), lo,\n                                            bsh_eps / fourpi);\n    real_convolution_3d gg = CoulombOperator(world, lo, bsh_eps);\n    real_convolution_3d slaterf12 = SlaterF12Operator(world, corrfac.gamma(),\n                                                      lo, bsh_eps / fourpi);\n\n    //  < ij | fg | kl >\n    const real_function_3d ik_fg = (gg)(ik) - fourpi * fg(ik);\n    const double a = inner(ik_fg, jl) / (2.0 * corrfac.gamma());\n    if (world.rank() == 0)\n        printf(\"<%d%d | f/r              | %d%d>  %12.8f\\n\", i, j, k, l, a);\n\n    // compute <ij| f (O1 + O2) g | ij>\n\n    // compute bra space xi(ik,j)^dagger, i.e. the hermitian conjugate of xi\n    // the index k is implicit in the vector of functions\n    // naming: xi _ orbitals _ operator _ hc\n    std::vector<real_function_3d> xi_ij_g_ket = make_xi(ket_i, ket_j, *poisson,\n                                                        false);       // xi_{i,m*},j\n    std::vector<real_function_3d> xi_ji_g_ket = make_xi(ket_j, ket_i, *poisson,\n                                                        false);       // xi_{j,m*},i\n\n    std::vector<real_function_3d> xi_ij_f_bra = make_xi(bra_k, bra_l, slaterf12,\n                                                        true);       // xi_{i*,m},j*\n    std::vector<real_function_3d> xi_ji_f_bra = make_xi(bra_l, bra_k, slaterf12,\n                                                        true);       // xi_{j*,m},i*\n\n    // in the following do NOT use antisymmetrized pair functions:\n    // |ij> -> 0.5 |ij - ji>\n\n    // < ij | f12 O1 g12 | kl >\n    //   = \\sum_m <i(1) j(2) | f12 | m(1) >< m(3) | g23 | k(3) l(2)>\n    //   = \\sum_m < chi^f_i*,m(2) j*(2) | chi^g_k,m*(2) l(2) >\n    //   = \\sum_m < xi^f_im,j | xi^g_km,l >\n    const double o1a = inner(world, xi_ij_f_bra, xi_ij_g_ket).sum();\n    if (world.rank() == 0)\n        printf(\"<%d%d | f12 O1 g12       | %d%d>  %12.8f\\n\", i, j, k, l, o1a);\n\n    // < ij | f12 O2 g12 | kl >\n    //    = \\sum_m <i(1) j(2) | f12 | m(2) >< m(3) | g13 | k(1) l(3)>\n    //    = \\sum_m <chi^f_j*,m(1) i*(1) | chi^g_l,m*(1) k(1) >\n    //    = \\sum_m < xi^f_jm,i | xi^g_lm,k >\n    const double o2a = inner(world, xi_ji_f_bra, xi_ji_g_ket).sum();\n    if (world.rank() == 0)\n        printf(\"<%d%d | f12 O2 g12       | %d%d>  %12.8f\\n\", i, j, k, l, o2a);\n\n    // compute <ij| f O1 O2 g | kl>  // why do I need to swap ij in g_ijkl??\n    const Tensor<double> f_ijmn = matrix_inner(world, xi_ij_f_bra, hf->nemos());\n    const Tensor<double> g_ijmn = matrix_inner(world, hf->R2orbitals(),\n                                               xi_ji_g_ket);\n    const double o12 = f_ijmn.trace(g_ijmn);\n    if (world.rank() == 0)\n        printf(\"<%d%d | f12 O12 g12      | %d%d>  %12.8f\\n\", i, j, k, l, o12);\n\n    const double e = a - o1a - o2a + o12;\n    if (world.rank() == 0)\n        printf(\"<%d%d | g Q12 f          | %d%d>  %12.8f\\n\", i, j, k, l, e);\n\n    print(\"gQf old\",t1.reset());\n\n    CCTimer timer(world,\"gQf with ccpairfunction\");\n    CCConvolutionOperator<double,3>::Parameters param;\n    auto f=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_F12,param);\n    auto g=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,param);\n//    print(\"operator constructor\",timer.reset());\n\n    CCPairFunction<double,6> fij(f,ket_i,ket_j);\n    CCPairFunction<double,6> gij(g,bra_k,bra_l);\n//    CCPairFunction ij({psi},{psi});\n    std::vector<CCPairFunction<double,6>> vfij={fij};\n    std::vector<CCPairFunction<double,6>> vgij={gij};\n//    std::vector<CCPairFunction> vij={ij};\n//    print(\"g/f ij constructor\",timer.reset());\n\n//    StrongOrthogonalityProjector<double,3> SO(world);\n//    SO.set_spaces({psi},{psi},{psi},{psi});\n    std::vector<CCPairFunction<double,6>> Qfij=Q12(vfij);\n//    std::vector<CCPairFunction> Qgij=Q12(vgij);\n//    print(\"SO application\",timer.reset());\n\n    double result1=inner(vgij,Qfij);\n    print(\"inner\",timer.reset());\n\n    print(\"<ij | g (Q f | ij>)\",result1);\n\n    return e;\n}\n\n/// save a function\ntemplate<typename T, size_t NDIM>\nvoid MP2::save_function(const Function<T, NDIM>& f,\n                        const std::string name) const {\n    if (world.rank() == 0)\n        print(\"saving function\", name);\n    f.print_size(name);\n    archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, name.c_str(), 1);\n    ar & f;\n}\n\n/// load a function\ntemplate<typename T, size_t NDIM>\nvoid MP2::load_function(Function<T, NDIM>& f, const std::string name) const {\n    if (world.rank() == 0)\n        print(\"loading function\", name);\n    archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, name.c_str());\n    ar & f;\n    f.print_size(name);\n}\n\n/// return the function Uphi0; load from disk if available\nreal_function_6d MP2::make_Uphi0(ElectronPair& pair) const {\n    const int i = pair.i;\n    const int j = pair.j;\n    real_function_6d Uphi0 = real_factory_6d(world);\n    // apply the pure commutator of the kinetic energy and the\n    // electronic correlation factor on the (regularized)\n    // orbitals i and j\n    //  [T,f]\n    const double eps = this->zeroth_order_energy(i, j);\n    std::cout << \"eps=\" << eps << std::endl;\n    {\n        real_convolution_6d op_mod = BSHOperator<6>(world,\n                                                    sqrt(-2 * eps), 0.0001, 1e-5);\n        op_mod.modified() = true;\n        Uphi0 = corrfac.apply_U(hf->nemo(i), hf->nemo(j), op_mod);\n    }\n\n    {\n        real_function_6d tmp =\n                CompositeFactory<double, 6, 3>(world).particle1(\n                        copy(hf->R2orbital(i))).particle2(\n                        copy(hf->R2orbital(j)));\n\n        const double a = inner(Uphi0, tmp);\n        if (world.rank() == 0)\n            print(\"< nemo | R2 U | nemo>\", a);\n    }\n    Uphi0.print_size(\"Uphi0\");\n    asymmetry(Uphi0, \"Uphi w/o R\");\n\n    // apply the mixed commutator of the kinetic energy and the\n    // electronic and nuclear correlation factor on the regularized\n    // orbitals i and j:\n    //  R^{-1} [[T,f],R]\n    // Vanishes if no nuclear correlation factor\n    // is used, since [[T,f],1] = 0\n    //                if (hf->nemo_calc.nuclear_correlation->type()!=NuclearCorrelationFactor::None) {\n    if (world.rank() == 0)\n        print(\"adding the mixed commutator R^{-1} [[T,f],R]\");\n    const double thresh = FunctionDefaults<6>::get_thresh();\n    for (int axis = 0; axis < 3; axis++) {\n\n        double tight_thresh = thresh;// std::min(thresh, 1.e-4); // not nec. anymore bc. of fill_cuspy_tree instead of fill_tree\n\n        real_convolution_6d op_mod = BSHOperator<6>(world,\n                                                    sqrt(-2 * eps), 0.0001, 1e-5);\n        op_mod.modified() = true;\n\n        const real_function_3d u1_nuc =\n                hf->nemo_ptr->ncf->U1(axis);\n        const real_function_3d u1_nuc_nemo_i = u1_nuc * hf->nemo(i);\n        const real_function_3d u1_nuc_nemo_j = u1_nuc * hf->nemo(j);\n        const real_function_6d u1_el = corrfac.U1(axis);\n        //\t\t\t\t\t\tu1_nuc.print_size(\"u1_nuc\");\n        //\t\t\t\t\t\tplot_plane(world,u1_nuc,\"u1_nuc\");\n        //\t\t\t\t\t\tu1_nuc_nemo_i.print_size(\"u1_nuc_nemo_i\");\n        //\t\t\t\t\t\tplot_plane(world,u1_nuc_nemo_i,\"u1_nuc_nemo_i\");\n        //\t\t\t\t\t\tplot_plane(world,hf->nemo(i),\"nemo_i\");\n        //\t\t\t\t\t\tu1_nuc_nemo_j.print_size(\"u1_nuc_nemo_j\");\n        //\t\t\t\t\t\tu1_el.print_size(\"u1_el\");\n\n        real_function_6d U1_mix1 =\n                CompositeFactory<double, 6, 3>(world).g12(u1_el).particle1(\n                        copy(u1_nuc_nemo_i)).particle2(\n                        copy(hf->nemo(j))).thresh(tight_thresh);\n        U1_mix1.fill_cuspy_tree(op_mod);\n        U1_mix1.set_thresh(thresh);\n        U1_mix1.print_size(\"U1_mix1\");\n        //\t\t\t\t\t\tplot_plane(world,U1_mix1,\"U1_mix1\");\n\n        real_function_6d U1_mix2 =\n                CompositeFactory<double, 6, 3>(world).g12(u1_el).particle1(\n                        copy(hf->nemo(i))).particle2(\n                        copy(u1_nuc_nemo_j)).thresh(tight_thresh);\n        U1_mix2.fill_cuspy_tree(op_mod);\n        U1_mix2.set_thresh(thresh);\n        U1_mix2.print_size(\"U1_mix2\");\n        //\t\t\t\t\t\tplot_plane(world,U1_mix2,\"U1_mix2\");\n\n        real_function_6d diff = (U1_mix1 - U1_mix2).scale(-1.0);\n        diff.truncate();\n\n        // multiply with -1 from the kinetic energy operator\n        //\t\t\t\t\t\tUphi0=(Uphi0+(U1_mix1-U1_mix2).scale(-1.0)).truncate();\n        Uphi0 = (Uphi0 + diff).truncate();\n        this->asymmetry(Uphi0, \"Uphi0 in R\");\n\n        //\t\t\t\t\t\tUphi0.print_size(\"Uphi0\");\n        //\t\t\t\t\t\tplot_plane(world,Uphi0,\"Uphi0\");\n\n        {\n            real_function_6d tmp =\n                    CompositeFactory<double, 6, 3>(world).particle1(\n                            copy(hf->R2orbital(i))).particle2(\n                            copy(hf->R2orbital(j)));\n\n            const double a = inner(Uphi0, tmp);\n            if (world.rank() == 0)\n                print(\"< nemo | R2 U | nemo>\", a);\n        }\n    }\n    asymmetry(Uphi0, \"Uphi0\");\n\n\n    // sanity check: <ij| [T,g12] |ij> = <ij | U |ij> - <ij| g12 | ij> = 0\n    real_function_6d tmp = CompositeFactory<double, 6, 3>(world).particle1(\n            copy(hf->R2orbital(i))).particle2(copy(hf->R2orbital(j)));\n\n    const double a = inner(Uphi0, tmp);\n    const real_function_3d ii = hf->R2orbital(i) * hf->nemo(i);\n    const real_function_3d jj = hf->R2orbital(j) * hf->nemo(j);\n    const real_function_3d gii = (*poisson)(ii);\n    const double aa = inner(jj, gii);\n    const double error = std::fabs(a - aa);\n    if (world.rank() == 0) {\n        printf(\"< phi0 | U_R   | phi0 >  %12.8f\\n\", a);\n        printf(\"< phi0 | 1/r12 | phi0 >  %12.8f\\n\", aa);\n        if (error > FunctionDefaults<6>::get_thresh())\n            print(\"WARNING : Kutzelnigg's potential inaccurate (box size, thresh ?)\");\n        if (error > FunctionDefaults<6>::get_thresh() * 10.0) MADNESS_EXCEPTION(\n                \"Kutzelnigg's potential plain wrong (box size, thresh ?)\", 1);\n    }\n    Uphi0.print_size(\"Uphi0\");\n    return Uphi0;\n}\n\n/// return the function [K,f] phi0; load from disk if available\nreal_function_6d MP2::make_KffKphi0(const ElectronPair& pair) const {\n\n    const int i = pair.i;\n    const int j = pair.j;\n\n    real_function_6d KffKphi0;\n    real_function_6d r12nemo = CompositeFactory<double, 6, 3>(world).g12(\n            corrfac.f()).particle1(copy(hf->nemo(i))).particle2(\n            copy(hf->nemo(j)));\n    r12nemo.fill_tree().truncate().reduce_rank();\n    r12nemo.print_size(\"r12nemo\");\n    //                save_function(r12nemo,\"r12nemo\");\n\n    real_function_6d Kfphi0;\n    Kfphi0 = K(r12nemo, i == j);\n\n    {\n        real_function_6d tmp =\n                CompositeFactory<double, 6, 3>(world).particle1(\n                        copy(hf->R2orbitals()[i])).particle2(\n                        copy(hf->R2orbitals()[j]));\n        double a1 = inner(Kfphi0, tmp);\n        if (world.rank() == 0)\n            printf(\"< nemo0 | R^2 R-1 K f R | nemo0 >  %12.8f\\n\", a1);\n        //\t\t\t\t\tsave_function(Kfphi0,\"Kfphi0\");\n    }\n    const real_function_6d fKphi0 = make_fKphi0(pair.i, pair.j);\n    {\n        real_function_6d tmp =\n                CompositeFactory<double, 6, 3>(world).particle1(\n                        copy(hf->R2orbitals()[i])).particle2(\n                        copy(hf->R2orbitals()[j]));\n        double a2 = inner(fKphi0, tmp);\n        if (world.rank() == 0)\n            printf(\"< nemo0 | R^2 R-1 f K R | nemo0 >  %12.8f\\n\", a2);\n    }\n    KffKphi0 = (Kfphi0 - fKphi0).truncate().reduce_rank();\n\n    // sanity check\n    real_function_6d tmp = CompositeFactory<double, 6, 3>(world).particle1(\n            copy(hf->R2orbitals()[i])).particle2(copy(hf->R2orbitals()[j]));\n    const double a = inner(KffKphi0, tmp);\n    if (world.rank() == 0) {\n        printf(\"< nemo0 | R^2 R-1 [K,f] R | nemo0 >  %12.8f\\n\", a);\n        if (std::fabs(a) > FunctionDefaults<6>::get_thresh())\n            print(\"WARNING : exchange commutator inaccurate\");\n        if (std::fabs(a) > FunctionDefaults<6>::get_thresh() * 10.0) MADNESS_EXCEPTION(\n                \"exchange commutator plain wrong\", 1);\n    }\n    KffKphi0.print_size(\"KffKphi0\");\n    return KffKphi0;\n}\n\n/// compute some matrix elements that don't change during the SCF\nElectronPair MP2::make_pair(const int i, const int j) const {\n\n    ElectronPair p = ElectronPair(i, j);\n    if (param.restart()) p.load_pair(world);\n\n    // compute and store them if they have not been read from disk\n    if (p.ij_gQf_ij == ElectronPair::uninitialized()) {\n        p.ij_gQf_ij = compute_gQf(i, j, p);\n        p.ji_gQf_ij = 0.0;\n        if (i != j)\n            p.ji_gQf_ij = compute_gQf(j, i, p);\n        p.store_pair(world);\n    } else {\n        if (world.rank() == 0) {\n            printf(\"<%d%d | g Q12 f          | %d%d>  %12.8f\\n\",\n                   i, j, i, j, p.ij_gQf_ij);\n            if (i != j) {\n                printf(\"<%d%d | g Q12 f          | %d%d>  %12.8f\\n\",\n                       j, i, i, j, p.ji_gQf_ij);\n            }\n        }\n    }\n\n    if (world.rank() == 0)\n        printf(\"done with matrix elements at time %.1fs\\n\\n\", wall_time());\n    return p;\n}\n\n/// compute the first iteration of the residual equations and all intermediates\nvoid MP2::guess_mp1_3(ElectronPair& pair) const {\n\n    // fast return if possible\n    if (pair.function.is_initialized()) return;\n\n    const int i = pair.i;\n    const int j = pair.j;\n\n    // the Green's function\n    const double eps = zeroth_order_energy(i, j);\n    real_convolution_6d green = BSHOperator<6>(world, sqrt(-2.0 * eps), lo, bsh_eps);\n\n    real_function_6d Uphi0 = make_Uphi0(pair);\n    real_function_6d KffKphi0 = real_factory_6d(world);\n    if (not param.do_oep()) KffKphi0 = make_KffKphi0(pair);\n\n    // these are the terms that come from the single projectors: (O1 + O2) (U+[K,f])|phi^0>\n    std::vector<real_function_3d> phi_k_UK_phi0;\n    std::vector<real_function_3d> phi_l_UK_phi0;\n\n    for (int k = 0; k < hf->nocc(); ++k) {\n        real_function_3d tmp;\n        tmp = Uphi0.project_out(hf->R2orbitals()[k], 0)\n              - KffKphi0.project_out(hf->R2orbitals()[k], 0);\n        phi_k_UK_phi0.push_back(tmp);\n\n        tmp = Uphi0.project_out(hf->R2orbitals()[k], 1)\n              - KffKphi0.project_out(hf->R2orbitals()[k], 1);\n        phi_l_UK_phi0.push_back(tmp);\n    }\n\n\n    // make the terms with high ranks and smallish trees\n    load_balance(Uphi0, true);\n    real_function_6d Vpair1 = (Uphi0 - KffKphi0).truncate().reduce_rank();\n    Uphi0.clear();\n    KffKphi0.clear();\n    asymmetry(Vpair1, \"Vpair\");\n    load_balance(Vpair1, false);\n    real_function_6d GVpair;\n    green.destructive() = true;            // green will destroy Vpair1\n    GVpair = green(-2.0 * Vpair1).truncate().reduce_rank();\n    Vpair1.clear(true);\n    save_function(GVpair, \"GVpair1\");\n    //\t\t\tload_function(GVpair,\"GVpair1\");\n    asymmetry(GVpair, \"GVpair1\");\n    pair.function = GVpair;\n    compute_energy(pair);\n\n    // make the terms with low ranks and largish trees:\n    // - G ( O1 + O2 - O1O2) (U-K) | phi0 >\n    // With the notations\n    //  | UK_k(1) > = < k(2) | U-K | phi0 >\t\t// these have been computed in OUKphi0()\n    //  h(kl) = <kl|[H,f] + 1/r12| phi0>\n    // we get\n    // G ( O1 + O2 - O1O2) (U-K) | phi0 >\n    //  = |k(1)>|UK_k(2)> - |l(2)>|UK_l(1)> + |k(1)l(2)> (<kl|[H,f] + 1/r12| phi0> )\n    //  = |k(1)> ( |UK_k(2)> - 1/2 |l(2)> h(kl) ) - |l(2)> ( |UK_l(1) - 1/2 |k(1)> h(kl) )\n    // which scales cubicly but for the computation of h(kl)\n\n    // compute the matrix elements h(kl) = <k(1) l(2) | [H,f] + 1/r12 | phi0 >\n    Tensor<double> h(hf->nocc(), hf->nocc());\n    const double fourpi = 4.0 * constants::pi;\n    real_convolution_3d slaterf12 = SlaterF12Operator(world, corrfac.gamma(),\n                                                      lo, bsh_eps / fourpi);\n\n    // compute some intermediates\n    const tensorT occ = hf->get_calc().aocc;\n    tensorT fock = hf->nemo_ptr->compute_fock_matrix(hf->nemos(), occ);\n    if (hf->get_calc().param.do_localize()) {\n        // local orbitals -- add coupling\n        vecfuncT amotilde = transform(world, hf->orbitals(), fock);\n        vecfuncT fik, fjl, gik, jl, ik, tjl, jtl, itk, tik;\n\n        for (int k = 0; k < hf->nocc(); ++k) {\n            const real_function_3d ik1 = hf->orbital(i) * hf->orbital(k);\n            gik.push_back((*poisson)(ik1).truncate());    // (ik | g12 |\n            fik.push_back(slaterf12(ik1).truncate());    // (ik | f12 |\n            ik.push_back(ik1);\n            itk.push_back(hf->orbital(i) * amotilde[k]);    // | i k~ )\n            tik.push_back(amotilde[i] * hf->orbital(k));    // | i~ k )\n        }\n        for (int l = 0; l < hf->nocc(); ++l) {\n            const real_function_3d jl1 = hf->orbital(j) * hf->orbital(l);\n            fjl.push_back(slaterf12(jl1).truncate());    // (jl | f12 |\n            jl.push_back(jl1);                            //      | jl)\n            tjl.push_back(amotilde[j] * hf->orbital(l));    // | j~ l )\n            jtl.push_back(hf->orbital(j) * amotilde[l]);    // | j l~ )\n        }\n\n        for (int k = 0; k < hf->nocc(); ++k) {\n            for (int l = 0; l < hf->nocc(); ++l) {\n\n                const double g_ijkl = inner(jl[l], gik[k]);        // <i j | g | k l>\n                const double f_itjkl = inner(fik[k], tjl[l]);    // <i j~| f | k l>\n                const double f_ijktl = inner(fik[k], jtl[l]);    // <i j| f | k l~>\n                const double f_tijkl = inner(fjl[l], tik[k]);    // <i~ j| f | k l>\n                const double f_ijtkl = inner(fjl[l], itk[k]);    // <i j| f | k~ l>\n\n                h(k, l) = g_ijkl - f_itjkl + f_ijktl - f_tijkl + f_ijtkl;\n            }\n        }\n\n    } else { // canonical orbitals -- simplified code\n\n        for (int k = 0; k < hf->nocc(); ++k) {\n\n            // for the matrix element <ij|kl> = (ik|jl)\n            const real_function_3d ik = hf->orbital(i) * hf->orbital(k);\n            const real_function_3d gik = (*poisson)(ik).truncate();\n            const real_function_3d fik = slaterf12(ik).truncate();\n\n            // the function Of(2) = <k(1) | f12 | phi0 >\n            //\t            const real_function_3d Of=pair.r12phi.project_out(hf->orbital(k),0);\n\n            for (int l = 0; l < hf->nocc(); ++l) {\n\n                const real_function_3d jl = hf->orbital(j) * hf->orbital(l);\n                const double g_ijkl = inner(jl, gik);\n                const double f_ijkl = inner(jl, fik);\n\n                // the matrix element <kl | f12 | ij>\n                //\t\t            const double f_ijkl=inner(hf->orbital(l),Of);\n                const double e_kl = zeroth_order_energy(k, l);\n                const double e_ij = zeroth_order_energy(i, j);\n\n                h(k, l) = f_ijkl * (e_kl - e_ij) + g_ijkl;\n            }\n        }\n    }\n\n    // the result function; adding many functions requires tighter threshold\n    const double thresh = FunctionDefaults<6>::get_thresh();\n    const double tight_thresh = thresh * 0.1;\n    FunctionDefaults<6>::set_thresh(tight_thresh);\n    real_function_6d r1 = real_factory_6d(world).thresh(tight_thresh);\n    for (int k = 0; k < hf->nocc(); ++k) {\n\n        // make the term  tmp2(2) = |UK_k(2)> - 1/2 |l(2)> h(kl)\n        real_function_3d tmp2 = phi_k_UK_phi0[k];\n        for (int l = 0; l < hf->nocc(); ++l)\n            tmp2 -= 0.5 * h(k, l) * hf->nemo(l);\n\n        // now apply the Greens' function (including the -2.0 factor in one term)\n        real_function_6d tmp = green(-2.0 * hf->nemo(k), tmp2);\n        tmp.set_thresh(tight_thresh);\n        r1 = (r1 - tmp).truncate(tight_thresh);\n    }\n    if (world.rank() == 0)\n        print(\"symmetry r1\");\n    r1.print_size(\"r1\");\n\n    for (int l = 0; l < hf->nocc(); ++l) {\n\n        // make the term  tmp1(1) = |UK_l(1) - 1/2 |k(1)> h(kl)\n        real_function_3d tmp1 = phi_l_UK_phi0[l];\n        for (int k = 0; k < hf->nocc(); ++k)\n            tmp1 -= 0.5 * h(k, l) * hf->nemo(k);\n\n        // now apply the Greens' function (including the -2.0 factor in one term)\n        real_function_6d tmp = green(tmp1, -2.0 * hf->nemo(l));\n        tmp.set_thresh(tight_thresh);\n        r1 = (r1 - tmp).truncate(tight_thresh);\n    }\n    r1.truncate();\n    r1.print_size(\"r1\");\n    GVpair.set_thresh(tight_thresh);\n    GVpair = (GVpair + r1).truncate().reduce_rank();\n\n    FunctionDefaults<6>::set_thresh(thresh);\n    GVpair.set_thresh(thresh);\n    GVpair.truncate().reduce_rank();\n\n    asymmetry(GVpair, \"GVpair before Q12\");\n\n    GVpair = Q12(GVpair);\n    asymmetry(GVpair, \"GVpair after Q12\");\n    pair.function = GVpair;\n    pair.constant_term = copy(GVpair);\n    save_function(GVpair, \"GVpair\");\n}\n\n/// compute the singlet and triplet energy for a given electron pair\n\n/// @return\tthe energy of 1 degenerate triplet and 1 singlet pair\ndouble MP2::compute_energy(ElectronPair& pair) const {\n\n    START_TIMER(world);\n    // a11 will be the bra space, therefore take the hermitian conjugate\n    const double a11 = inner(pair.function,\n                             JK1phi0_on_demand(pair.i, pair.j, true))\n                       + inner(pair.function, JK2phi0_on_demand(pair.i, pair.j, true));\n    if (world.rank() == 0)\n        printf(\"V2: <phi^0 | J-K        | psi^1>  %12.8f\\n\", a11);\n\n    // this will be the bra space\n    real_function_6d eri = TwoElectronFactory(world).dcut(dcut);\n    real_function_6d ij_g =\n            CompositeFactory<double, 6, 3>(world).particle1(\n                    copy(hf->R2orbital(pair.i))).particle2(\n                    copy(hf->R2orbital(pair.j))).g12(eri);\n    real_function_6d ji_g =\n            CompositeFactory<double, 6, 3>(world).particle1(\n                    copy(hf->R2orbital(pair.j))).particle2(\n                    copy(hf->R2orbital(pair.i))).g12(eri);\n\n    // compute < ij | g12 | psi >\n    const double ij_g_uij = inner(pair.function, ij_g);\n    if (world.rank() == 0)\n        printf(\"<ij | g12       | psi^1>  %12.8f\\n\", ij_g_uij);\n\n    // compute < ji | g12 | psi > if (i/=j)\n    const double ji_g_uij = (pair.i == pair.j) ? 0 : inner(pair.function, ji_g);\n    if (world.rank() == 0)\n        printf(\"<ji | g12       | psi^1>  %12.8f\\n\", ji_g_uij);\n\n    // the singlet and triplet triplet pair energies\n    if (pair.i == pair.j) {\n        pair.e_singlet = ij_g_uij + pair.ij_gQf_ij;\n        pair.e_triplet = 0.0;\n    } else {\n        pair.e_singlet = (ij_g_uij + pair.ij_gQf_ij)\n                         + (ji_g_uij + pair.ji_gQf_ij);\n        pair.e_triplet = 3.0\n                         * ((ij_g_uij - ji_g_uij) + (pair.ij_gQf_ij - pair.ji_gQf_ij));\n    }\n\n    // print the pair energies\n    if (world.rank() == 0) {\n        printf(\"current energy %2d %2d %12.8f %12.8f\\n\", pair.i, pair.j,\n               pair.e_singlet, pair.e_triplet);\n    }\n\n    END_TIMER(world, \"compute MP2 energy\");\n    // return the total energy of this pair\n    return pair.e_singlet + pair.e_triplet;\n}\n\n/// apply the exchange operator on an orbital\n\n/// @param[in]\tphi the orbital\n/// @param[in]\thc\thermitian conjugate -> swap bra and ket space\n/// @return \tKphi\nreal_function_3d MP2::K(const real_function_3d& phi, const bool hc) const {\n\n    real_function_3d result = real_factory_3d(world);\n\n    // multiply rhs with R2orbitals (the bra space)\n    vecfuncT R2rhs;\n    if (not hc)\n        R2rhs = mul(world, phi, hf->R2orbitals());\n    else\n        R2rhs = mul(world, phi, hf->orbitals());\n\n    // apply the poisson kernel and sum up\n    for (std::size_t k = 0; k < hf->nemos().size(); ++k) {\n        result += hf->nemo(k) * (*poisson)(R2rhs[k]);\n    }\n    return result;\n}\n\n/// apply the exchange operator on a pair function\n\n/// @param[in]\tphi the pair function\n/// @param[in]\tis_symmetric is the function symmetric wrt particle exchange\n/// @return \t(K1 + K2) |phi >\nreal_function_6d MP2::K(const real_function_6d& phi,\n                        const bool is_symmetric) const {\n\n\t// first particle 1\n\treal_function_6d result=apply_exchange_vector(phi,1);\n        if (is_symmetric) {\n\t\tresult = result + swap_particles(result);\n        } else {\n\t\tresult = result + apply_exchange_vector(phi,2);\n        }\n\tresult.truncate();\n    return result;\n}\n\n/// apply the Coulomb operator a on orbital\n\n/// @param[in]\tphi the orbital\n/// @return \tJphi\nreal_function_3d MP2::J(const real_function_3d& phi) const {\n    return (hf->get_coulomb_potential() * phi).truncate();\n}\n\n\nreal_function_6d MP2::apply_exchange_vector(const real_function_6d& phi,\n\t\tconst int particle) const {\n\n\ttimer timer(world);\n\t// prepare all constituent functions\n\tstd::vector<real_function_3d> ket=copy(world,hf->nemos());\n\tstd::vector<real_function_3d> bra=copy(world,hf->R2orbitals());\n    phi.change_tree_state(redundant,false);\n//\tphi.get_impl()->make_redundant(false);\n\tmake_redundant(world,ket,false);\n\tmake_redundant(world,bra,false);\n\tworld.gop.fence();\n\ttimer.tag(\"prepare K\");\n\n\t// multiply pair function with bra\n\tstd::vector<real_function_6d> result1(hf->nocc());\n\tfor (auto& r : result1) {\n\t    r.set_impl(phi);\n\t    r.get_impl()->undo_redundant(true);\n\t}\n\tfor (int i=0; i<hf->nocc(); ++i) {\n\t\tresult1[i].get_impl()->multiply(phi.get_impl().get(),bra[i].get_impl().get(),particle);\n\t}\n\tworld.gop.fence();\n\tphi.get_impl()->undo_redundant(false);\n    truncate(world,result1);\n    reduce_rank(result1);\n\n\ttimer.tag(\"multiply bra\");\n\tprint_size(world,result1,\"after multiplication and truncation\");\n\n\t// apply exchange operator\n\treal_convolution_3d op = CoulombOperator(world, 0.0001,\n\t\t\thf->get_calc().param.econv());\n\top.particle() = particle;\n\top.destructive()=true;\n\n    std::vector<real_function_6d> result2=apply(world,op,result1);\n\ttimer.tag(\"apply Green's function\");\n\n\ttruncate(world,result2);\n    for (auto& v : result2) v.reduce_rank(false);\n\tworld.gop.fence();\n\n\ttimer.tag(\"truncate\");\n\tprint_size(world,result2,\"after truncate\");\n\n\t// multiply with ket\n\tstd::vector<real_function_6d> result3(hf->nocc());\n\tmake_redundant(world,result2);\n\tfor (auto& r : result3) r.set_impl(phi);\n\tfor (int i=0; i<hf->nocc(); ++i) {\n\t\tresult3[i].get_impl()->multiply(result2[i].get_impl().get(),ket[i].get_impl().get(),particle);\n\t}\n\n\tworld.gop.fence();\n    truncate(result3);\n    reduce_rank(result3);\n\ttimer.tag(\"multiply ket\");\n\n\treal_function_6d result4=real_factory_6d(world);\n\tfor (auto r : result3) result4=result4+r;\n\ttimer.tag(\"add all up\");\n\treturn result4;\n}\n\n\n/// apply the exchange operator on f\n\n/// if the exchange operator is similarity transformed (R-1 K R) the\n/// orbital spaces differ for the orbitals underneath the integral sign\n/// R-1 K R = \\phi-ket(1) * \\int \\phi-bra(1') * f(1',2)\n/// @param[in]  f   the pair function\n/// @param[in]  orbital_bra the orbital underneath the integral sign (typically R2orbitals)\n/// @param[in]  orbital_ket the orbital to be pre-multiplied with (typically orbitals)\n/// @return     the pair function, on which the exchange operator has been applied\nreal_function_6d MP2::apply_exchange(const real_function_6d& f,\n                                     const real_function_3d& orbital_ket,\n                                     const real_function_3d& orbital_bra, const int particle) const {\n\n    MADNESS_ASSERT((particle == 1) or (particle == 2));\n    real_convolution_3d op = CoulombOperator(world, 0.0001,\n                                             hf->get_calc().param.econv());\n    op.particle() = particle;\n    op.destructive() = true;\n\n    //            if (world.rank()==0) printf(\"start multiplication before K at time %.1f\\n\",wall_time());\n\n    // multiply the orbital to the pair function\n    //            real_function_6d x=(particle==1)\n    //            \t\t? CompositeFactory<double,6,3>(world).ket(copy(f)).V_for_particle1(copy(orbital_bra))\n    //            \t\t: CompositeFactory<double,6,3>(world).ket(copy(f)).V_for_particle2(copy(orbital_bra));\n    //            x.fill_tree().truncate();\n    real_function_6d x =\n            multiply(copy(f), copy(orbital_bra), particle).truncate();\n\n    // apply the Poisson operator\n    //            if (world.rank()==0) printf(\"start exchange at time %.1f\\n\",wall_time());\n    load_balance(x, false);\n    x = op(x).truncate();\n\n    // do the final multiplication with the orbital\n    //            if (world.rank()==0) printf(\"start multiplication after K at time %.1f\\n\",wall_time());\n    //            real_function_6d result= (particle==1)\n    //            \t\t? CompositeFactory<double,6,3>(world).ket(copy(x)).V_for_particle1(copy(orbital_ket))\n    //            \t\t: CompositeFactory<double,6,3>(world).ket(copy(x)).V_for_particle2(copy(orbital_ket));\n    //            result.fill_tree().truncate().reduce_rank();\n    real_function_6d result =\n            multiply(copy(x), copy(orbital_ket), particle).truncate();\n\n    //            if (world.rank()==0) printf(\"end multiplication after K at time %.1f\\n\",wall_time());\n    return result;\n}\n\n/// make the quantity chi_k\n\n/// chi is the Poisson kernel applied on an orbital product of the\n/// input function and the vector of orbitals\n/// \\f[ \\chi_{k{*} i}(1) = \\int dr_2 \\frac{k(2) i(2)}{|r_1-r_2|} \\f]\n/// \\f[ \\chi_{ki{*}}(1) = \\int dr_2 \\frac{k(2) i(2)}{|r_1-r_2|} \\f] if hc\n/// @param[in]  phi\t\torbital phi_i\n/// @param[in]\top\t\tthe operator in SeparatedConvolution form\n/// @param[in]\thc\t\tcompute hermitian conjugate -> pass the correct phi!\n/// @return a vector of length nocc\nstd::vector<real_function_3d> MP2::make_chi(const real_function_3d& phi,\n                                            const real_convolution_3d& op, const bool hc) const {\n\n    const double tol = 0.0;\n    MADNESS_ASSERT(hf->get_calc().param.spin_restricted());\n    std::vector<real_function_3d> psif;\n    if (hc)\n        psif = mul_sparse(world, phi, hf->nemos(), tol);\n    else\n        psif = mul_sparse(world, phi, hf->R2orbitals(), tol);\n    truncate(world, psif);\n    psif = apply(world, op, psif);\n    truncate(world, psif);\n    return psif;\n}\n\n/// make the quantity xi_k\n\n/// xi is chi multiplied with an orbital j\n/// \\f[ \\xi_{k{*}i,j}(1) = \\chi_{ki}(1) j(1) \\f]\n/// \\f[ \\xi_{ki{*},j{*}}(1) = \\chi_{k{*}i}(1) j(1) \\f]  if hc\n/// @param[in]  phi_i   orbital i\n/// @param[in]  phi_j   orbital j\n/// @param[in]\top\t\tthe operator in SeparatedConvolution form\n/// @param[in]\thc\t\tcompute hermitian conjugate  -> pass the correct phi!\n/// @return a vector of length k=0,..,nocc\nstd::vector<real_function_3d> MP2::make_xi(const real_function_3d& phi_i,\n                                           const real_function_3d& phi_j, const real_convolution_3d& op,\n                                           const bool hc) const {\n    const double tol = 0.0;\n    return mul_sparse(world, phi_j, make_chi(phi_i, op, hc), tol);\n}\n\n/// apply the operator K on the reference and multiply with f; fK |phi^0>\n\n/// @param[in]  i   index of orbital i\n/// @param[in]  j   index of orbital j\n/// @return     the function f12 (K(1)+K(2))|phi^0>\nreal_function_6d MP2::make_fKphi0(const int i, const int j) const {\n    const real_function_3d& phi_i = hf->nemo(i);\n    const real_function_3d& phi_j = hf->nemo(j);\n\n    const real_function_3d Kphi_i = K(phi_i);\n    const real_function_3d Kphi_j = K(phi_j);\n\n    real_function_6d fKphi0a = CompositeFactory<double, 6, 3>(world).g12(\n            corrfac.f()).particle1(copy(phi_i)).particle2(copy(Kphi_j));\n    fKphi0a.fill_tree().truncate();\n    real_function_6d fKphi0b = CompositeFactory<double, 6, 3>(world).g12(\n            corrfac.f()).particle1(copy(Kphi_i)).particle2(copy(phi_j));\n    fKphi0b.fill_tree().truncate();\n\n    real_function_6d fKphi0 = (fKphi0a + fKphi0b).truncate();\n    return fKphi0;\n}\n\n/// return the function (J(1)-K(1)) |phi0> as on-demand function\n\n/// @param[in]\thc\t\tcompute hermitian conjugate -> swap bra and ket space\nreal_function_6d MP2::JK1phi0_on_demand(const int i, const int j,\n                                        const bool hc) const {\n    real_function_3d phi_i, phi_j;\n    if (not hc) {\n        phi_i = hf->nemo(i);\n        phi_j = hf->nemo(j);\n    } else {\n        phi_i = hf->R2orbital(i);\n        phi_j = hf->R2orbital(j);\n    }\n\n    const real_function_3d JKphi_i = J(phi_i) - K(phi_i, hc);\n\n    real_function_6d tmp1 = CompositeFactory<double, 6, 3>(world).particle1(\n            copy(JKphi_i)).particle2(copy(phi_j));\n    return tmp1;\n}\n\n/// return the function (J(2)-K(2)) |phi0> as on-demand function\nreal_function_6d MP2::JK2phi0_on_demand(const int i, const int j,\n                                        const bool hc) const {\n    real_function_3d phi_i, phi_j;\n    if (not hc) {\n        phi_i = hf->nemo(i);\n        phi_j = hf->nemo(j);\n    } else {\n        phi_i = hf->R2orbital(i);\n        phi_j = hf->R2orbital(j);\n    }\n\n    const real_function_3d JKphi_j = J(phi_j) - K(phi_j, hc);\n\n    real_function_6d tmp = CompositeFactory<double, 6, 3>(world).particle1(\n            copy(phi_i)).particle2(copy(JKphi_j));\n    return tmp;\n}\n\n/// return the function |phi0> as on-demand function\nreal_function_6d MP2::phi0_on_demand(const int i, const int j) const {\n    const real_function_3d& phi_i = hf->orbital(i);\n    const real_function_3d& phi_j = hf->orbital(j);\n\n    real_function_6d tmp1 = CompositeFactory<double, 6, 3>(world).particle1(\n            copy(phi_i)).particle2(copy(phi_j));\n    return tmp1;\n}\n\n/// return the function |F1F2> as on-demand function\nreal_function_6d MP2::nemo0_on_demand(const int i, const int j) const {\n    return CompositeFactory<double, 6, 3>(world).particle1(copy(hf->nemo(i))).particle2(\n            copy(hf->nemo(j)));\n}\n\n/// multiply the given function with the 0th order Hamiltonian, exluding the 0th order energy\n\n/// @param[in]  f   the function we apply H^0 on\n/// @return     the function g=H^0 f, which is NOT orthogonalized against f\nreal_function_6d MP2::multiply_with_0th_order_Hamiltonian(\n        const real_function_6d& f, const int i, const int j) const {\n\n    START_TIMER(world);\n\n    // the purely local part: Coulomb and U2\n    real_function_3d v_local = hf->get_coulomb_potential()\n                               + hf->nemo_ptr->ncf->U2();\n    if (param.do_oep()) {\n        real_function_3d voep = real_factory_3d(world);\n        load(voep, \"mRKS_potential_final\");\n        v_local += voep;\n    }\n\n    v_local.print_size(\"vlocal\");\n    f.print_size(\"u\");\n\n    // screen the construction of Vphi: do only what is needed to\n    // get an accurate result of the BSH operator\n    const double eps = zeroth_order_energy(i, j);\n    real_convolution_6d op_mod = BSHOperator<6>(world, sqrt(-2 * eps), lo,\n                                                bsh_eps);\n    op_mod.modified() = true;\n    real_function_6d vphi = CompositeFactory<double, 6, 3>(world).ket(copy(f)).V_for_particle1(\n            copy(v_local)).V_for_particle2(copy(v_local));\n    vphi.fill_tree(op_mod);\n    vphi.print_size(\"vphi: local parts\");\n\n    // the part with the derivative operators: U1\n    std::vector<real_function_6d> Drhs(6);\n    for (int axis = 0; axis < 6; ++axis) {\n        real_derivative_6d D = free_space_derivative<double, 6>(world,axis);\n        Drhs[axis] = D(f).truncate();\n    }\n//\tconst std::vector<real_function_6d> Drhs = truncate(grad(f));\n\n    std::vector<real_function_3d> U1_6d;\n    for (int axis = 0; axis < 6; ++axis) {\n        // note integer arithmetic\n        U1_6d.push_back(copy(hf->nemo_ptr->ncf->U1(axis % 3)));\n    }\n\n    double tight_thresh = std::min(FunctionDefaults<6>::get_thresh(), 1.e-4);\n    std::vector<real_function_6d> x(6);\n    for (int axis = 0; axis < 6; ++axis) {\n\n        if (axis / 3 + 1 == 1) {\n            x[axis] =CompositeFactory<double, 6, 3>(world).ket(Drhs[axis])\n                    .V_for_particle1(U1_6d[axis]).thresh(tight_thresh);\n\n        } else if (axis / 3 + 1 == 2) {\n            x[axis] =CompositeFactory<double, 6, 3>(world).ket(Drhs[axis])\n                    .V_for_particle2(U1_6d[axis]).thresh(tight_thresh);\n        }\n    }\n    world.gop.fence();\n    for (auto xx : x) {\n        CompositeFunctorInterface<double, 6, 3>* func=\n                dynamic_cast<CompositeFunctorInterface<double, 6, 3>* >(&(*xx.get_impl()->get_functor()));\n        func->make_redundant(false);\n    }\n    world.gop.fence();\n    for (auto xx : x) xx.fill_tree(op_mod,false);\n    world.gop.fence();\n    print_size(world,x,\"x after fill_tree\");\n\n    set_thresh(world,x,FunctionDefaults<6>::get_thresh());\n    for (auto xx : x) vphi += xx;\n    vphi.truncate().reduce_rank();\n\n    vphi.print_size(\"(U_nuc + J) |ket>:  made V tree\");\n    END_TIMER(world, \"apply (U + J) |ket>\");\n\n    // and the exchange\n    START_TIMER(world);\n    if (not param.do_oep()) vphi = (vphi - K(f, i == j)).truncate().reduce_rank();\n    vphi.print_size(\"(U_nuc + J - K) |ket>:  made V tree\");\n    END_TIMER(world, \"apply K |ket>\");\n\n    return vphi;\n}\n\n/// add the coupling terms for local MP2\n\n/// @return \\sum_{k\\neq i} f_ki |u_kj> + \\sum_{l\\neq j} f_lj |u_il>\nvoid MP2::add_local_coupling(const Pairs<ElectronPair>& pairs,\n                             Pairs<real_function_6d>& coupling) const {\n\n    if (world.rank() == 0) print(\"adding local coupling\");\n\n    // temporarily make all N^2 pair functions\n    typedef std::map<std::pair<int, int>, real_function_6d> pairsT;\n    pairsT quadratic;\n    for (int k = param.freeze(); k < hf->nocc(); ++k) {\n        for (int l = param.freeze(); l < hf->nocc(); ++l) {\n            if (l >= k) {\n                quadratic[std::make_pair(k, l)] = pairs(k, l).function;\n            } else {\n                quadratic[std::make_pair(k, l)] = swap_particles(pairs(l, k).function);\n            }\n        }\n    }\n    for (pairsT::iterator it = quadratic.begin(); it != quadratic.end(); ++it) {\n        it->second.compress(false);\n    }\n    world.gop.fence();\n\n    // the coupling matrix is the Fock matrix, skipping diagonal elements\n    tensorT fock1 = get_fock_matrix();\n    for (int k = 0; k < hf->nocc(); ++k) {\n        if (fock1(k, k) > 0.0) MADNESS_EXCEPTION(\"positive orbital energies\", 1);\n        fock1(k, k) = 0.0;\n    }\n\n    for (int i = param.freeze(); i < hf->nocc(); ++i) {\n        for (int j = i; j < hf->nocc(); ++j) {\n            coupling(i, j) = real_factory_6d(world).compressed();\n        }\n    }\n\n    for (int i = param.freeze(); i < hf->nocc(); ++i) {\n        for (int j = i; j < hf->nocc(); ++j) {\n            for (int k = param.freeze(); k < hf->nocc(); ++k) {\n                if (fock1(k, i) != 0.0) {\n                    coupling(i, j).gaxpy(1.0, quadratic[std::make_pair(k, j)], fock1(k, i), false);\n                }\n            }\n\n            for (int l = param.freeze(); l < hf->nocc(); ++l) {\n                if (fock1(l, j) != 0.0) {\n                    coupling(i, j).gaxpy(1.0, quadratic[std::make_pair(i, l)], fock1(l, j), false);\n                }\n            }\n            world.gop.fence();\n            const double thresh = FunctionDefaults<6>::get_thresh();\n            coupling(i, j).truncate(thresh*0.1);\n        }\n    }\n    world.gop.fence();\n}\n\n\n}\n\n"
  },
  {
    "path": "src/madness/chem/mp2.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/*!\n  \\file mp2.h\n  \\brief Solves molecular MP2 equations\n  \\defgroup Solves molecular MP2 equations\n  \\ingroup examples\n*/\n\n#ifndef MP2_H_\n#define MP2_H_\n\n#include <madness/mra/mra.h>\n#include <madness/mra/lbdeux.h>\n#include\"madness/mra/QCCalculationParametersBase.h\"\n#include<madness/chem/SCF.h>\n#include <madness/mra/nonlinsol.h>\n#include<madness/chem/projector.h>\n#include<madness/chem/correlationfactor.h>\n#include<madness/chem/electronic_correlation_factor.h>\n#include<madness/chem/MolecularOrbitals.h>\n#include<madness/chem/nemo.h>\n\n#include <madness/world/text_fstream_archive.h>\n\nusing madness::archive::TextFstreamInputArchive;\nusing madness::archive::TextFstreamOutputArchive;\n\n\n#include <iostream>\n\nnamespace madness {\n\nstruct LBCost {\n    double leaf_value;\n    double parent_value;\n\n    LBCost(double leaf_value = 1.0, double parent_value = 1.0)\n            : leaf_value(leaf_value), parent_value(parent_value) {}\n\n    double operator()(const Key<6>& key, const FunctionNode<double, 6>& node) const {\n        return node.coeff().size();\n    }\n};\n\n\nclass HartreeFock {\n    World& world;\npublic:\n    std::shared_ptr<Nemo> nemo_ptr;\nprivate:\n    mutable double coords_sum;     // sum of square of coords at last solved geometry\n\n    // save the Coulomb potential\n    mutable real_function_3d coulomb;\n\n    /// reconstructed orbitals: R * phi, where R is the nuclear correlation factor\n    std::vector<real_function_3d> orbitals_;\n\n    /// R^2 * phi, where R is the nuclear correlation factor, corresponds\n    /// to the bra space of the transformed operators\n    std::vector<real_function_3d> R2orbitals_;\n\npublic:\n\n    HartreeFock(World& world, std::shared_ptr<Nemo> nemo) :\n            world(world), nemo_ptr(nemo), coords_sum(-1.0) {\n    }\n\n    World& get_world() {return world;} // just to silence compiler about unused private variable\n\n    bool provides_gradient() const { return true; }\n\n    double value() {\n        return value(nemo_ptr->get_calc()->molecule.get_all_coords());\n    }\n\n    double value(const Tensor<double>& x) {\n\n        // fast return if the reference is already solved at this geometry\n        double xsq = x.sumsq();\n        if (xsq == coords_sum) return nemo_ptr->get_calc()->current_energy;\n\n        nemo_ptr->get_calc()->molecule.set_all_coords(x.reshape(nemo_ptr->get_calc()->molecule.natom(), 3));\n        coords_sum = xsq;\n        nemo_ptr->value(x);\n\n        MolecularOrbitals<double,3> mos(nemo_ptr->get_calc()->amo,nemo_ptr->get_calc()->aeps);\n        reset_orbitals(mos);\n        return nemo_ptr->get_calc()->current_energy;\n    }\n\n    void reset_orbitals(const MolecularOrbitals<double,3>& mos) {\n        nemo_ptr->get_calc()->amo=mos.get_mos();\n        nemo_ptr->get_calc()->aeps=mos.get_eps();\n        MADNESS_CHECK(size_t(nemo_ptr->get_calc()->aeps.size())==nemo_ptr->get_calc()->amo.size());\n        orbitals_ = nemo_ptr->R*nemo_ptr->get_calc()->amo;\n        R2orbitals_ = nemo_ptr->ncf->square()*nemo_ptr->get_calc()->amo;\n    }\n\n    Tensor<double> gradient(const Tensor<double>& x) {\n\n        value(x); // Ensures DFT equations are solved at this geometry\n        return nemo_ptr->gradient(x);\n    }\n\n    double coord_chksum() const { return coords_sum; }\n\n    const SCF& get_calc() const { return *nemo_ptr->get_calc(); }\n\n    SCF& get_calc() { return *nemo_ptr->get_calc(); }\n\n    /// return full orbital i, multiplied with the nuclear correlation factor\n\n    /// note that nemo() and orbital() are the same if no nuclear\n    /// correlation factor is used\n    real_function_3d orbital(const int i) const {\n        MADNESS_ASSERT(nemo_ptr->get_calc_param().spin_restricted());\n        return orbitals_[i];\n    }\n\n    /// return full orbitals, multiplied with the nuclear correlation factor\n\n    /// note that nemo() and orbital() are the same if no nuclear\n    /// correlation factor is used\n    std::vector<real_function_3d> orbitals() const {\n        MADNESS_ASSERT(nemo_ptr->get_calc_param().spin_restricted());\n        return orbitals_;\n    }\n\n    /// return orbitals, multiplied with the square nuclear correlation factor\n\n    /// note that nemo() and orbital() are the same if no nuclear\n    /// correlation factor is used\n    std::vector<real_function_3d> R2orbitals() const {\n        MADNESS_ASSERT(nemo_ptr->get_calc_param().spin_restricted());\n        return R2orbitals_;\n    }\n\n    /// return orbital i, multiplied with the square nuclear correlation factor\n\n    /// note that nemo() and orbital() are the same if no nuclear\n    /// correlation factor is used\n    real_function_3d R2orbital(const int i) const {\n        MADNESS_ASSERT(nemo_ptr->get_calc_param().spin_restricted());\n        return R2orbitals_[i];\n    }\n\n    /// return nemo i, which is the regularized orbital\n\n    /// note that nemo() and orbital() are the same if no nuclear\n    /// correlation factor is used\n    real_function_3d nemo(const int i) const {\n        MADNESS_ASSERT(nemo_ptr->get_calc_param().spin_restricted());\n        return nemo_ptr->get_calc()->amo[i];\n    }\n\n    /// return nemo, which are the regularized orbitals\n\n    /// note that nemo() and orbital() are the same if no nuclear\n    /// correlation factor is used\n    std::vector<real_function_3d> nemos() const {\n        MADNESS_ASSERT(nemo_ptr->get_calc_param().spin_restricted());\n        return nemo_ptr->get_calc()->amo;\n    }\n\n    /// return orbital energy i\n    double orbital_energy(const int i) const {\n        MADNESS_ASSERT(nemo_ptr->get_calc_param().spin_restricted());\n        return nemo_ptr->get_calc()->aeps[i];\n    }\n\n    /// return the Coulomb potential\n    real_function_3d get_coulomb_potential() const {\n        MADNESS_ASSERT(nemo_ptr->get_calc_param().spin_restricted());\n        if (coulomb.is_initialized()) return copy(coulomb);\n        functionT rho = 2.0*nemo_ptr->compute_density(nemos())*nemo_ptr->R_square;\n        coulomb = (nemo_ptr->get_calc()->make_coulomb_potential(rho)).truncate();\n        return copy(coulomb);\n    }\n\n    /// return the nuclear potential\n    real_function_3d get_nuclear_potential() const {\n        return nemo_ptr->get_calc()->potentialmanager->vnuclear();\n    }\n\n    /// return the number of occupied orbitals\n    int nocc() const {\n        MADNESS_ASSERT(nemo_ptr->get_calc_param().spin_restricted());\n        return nemo_ptr->get_calc_param().nalpha();\n    }\n};\n\n\n/// enhanced POD for the pair functions\nclass ElectronPair : public archive::ParallelSerializableObject {\n\npublic:\n    /// default ctor; initialize energies with a large number\n    ElectronPair() : ElectronPair(-1, -1) {}\n\n    /// ctor; initialize energies with a large number\n    ElectronPair(const int i, const int j)\n            : i(i), j(j), e_singlet(uninitialized()), e_triplet(uninitialized()),\n              ij_gQf_ij(uninitialized()), ji_gQf_ij(uninitialized()), iteration(0), converged(false) {\n    }\n\n    /// print the pair's energy\n    void print_energy() const {\n        if (function.world().rank() == 0) {\n            printf(\"final correlation energy %2d %2d %12.8f %12.8f\\n\",\n                   i, j, e_singlet, e_triplet);\n        }\n    }\n\n    static double uninitialized() { return 1.e10; }\n\n    int i, j;                       ///< orbitals i and j\n    real_function_6d function;      ///< pair function for a specific pair w/o correlation factor part\n    real_function_6d constant_term;    ///< the first order contribution to the MP1 wave function\n\n    double e_singlet;                ///< the energy of the singlet pair ij\n    double e_triplet;                ///< the energy of the triplet pair ij\n\n    double ij_gQf_ij;                ///< <ij | g12 Q12 f12 | ij>\n    double ji_gQf_ij;                ///< <ji | g12 Q12 f12 | ij>\n\n    int iteration;                    ///< current iteration for restart\n    bool converged;                    ///< is the pair function converged\n\n    /// serialize this ElectronPair\n\n    /// store the function only if it has been initialized\n    /// load the function only if there is one\n    /// don't serialize recomputable intermediates r12phi, Uphi, KffKphi\n    template<typename Archive>\n    void serialize(Archive& ar) {\n        bool fexist = function.is_initialized();\n        bool cexist = constant_term.is_initialized();\n        ar & ij_gQf_ij & ji_gQf_ij & e_singlet & e_triplet & converged\n        & iteration & fexist & cexist;\n        if (fexist) ar & function;\n        if (cexist) ar & constant_term;\n    }\n\n    bool load_pair(World& world) {\n        std::string name = \"pair_\" + stringify(i) + stringify(j);\n        bool exists = archive::ParallelInputArchive<archive::BinaryFstreamInputArchive>::exists(world, name.c_str());\n        if (exists) {\n            if (world.rank() == 0) printf(\"loading matrix elements %s\", name.c_str());\n            archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, name.c_str(), 1);\n            ar & *this;\n            if (world.rank() == 0) printf(\" %s\\n\", (converged) ? \" converged\" : \" not converged\");\n            if (function.is_initialized()) function.set_thresh(FunctionDefaults<6>::get_thresh());\n            if (constant_term.is_initialized()) constant_term.set_thresh(FunctionDefaults<6>::get_thresh());\n        } else {\n            if (world.rank() == 0) print(\"could not find pair \", i, j, \" on disk\");\n        }\n        return exists;\n    }\n\n    void store_pair(World& world) {\n        std::string name = \"pair_\" + stringify(i) + stringify(j);\n        if (world.rank() == 0) printf(\"storing matrix elements %s\\n\", name.c_str());\n        archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, name.c_str(), 1);\n        ar & *this;\n    }\n\n    // print information\n    void info(World& world) const {\n        if (world.rank() == 0) {\n            std::cout << std::setw(20) << std::setfill(' ') << \" *Information about Electron Pair \" << i << j << \" \"\n                      << std::setw(20) << std::setfill(' ') << std::endl;\n            std::cout << std::setw(20) << std::setfill(' ') << \" *e_singlet \" << e_singlet << \" \" << std::setw(20)\n                      << std::setfill(' ') << std::endl;\n            std::cout << std::setw(20) << std::setfill(' ') << \" *e_triplet \" << e_triplet << \" \" << std::setw(20)\n                      << std::setfill(' ') << std::endl;\n            std::cout << std::setw(20) << std::setfill(' ') << \" *ij_gQf_ij \" << ij_gQf_ij << \" \" << std::setw(20)\n                      << std::setfill(' ') << std::endl;\n            std::cout << std::setw(20) << std::setfill(' ') << \" *ji_gQf_ij \" << ji_gQf_ij << \" \" << std::setw(20)\n                      << std::setfill(' ') << std::endl;\n        }\n    }\n};\n\n\n/// a class for computing the first order wave function and MP2 pair energies\nclass MP2 : public OptimizationTargetInterface, public QCPropertyInterface {\n\n    /// POD for MP2 keywords\n    struct Parameters : public QCCalculationParametersBase {\n\n        /// use OEP orbitals\n        bool do_oep1 = false;\n\n        Parameters() {\n            /// the map with initial values\n            initialize < double > (\"thresh\", 1.e-3, \"recommended values: 1.e-4 < econv < 1.e-8\");\n            initialize < double > (\"econv\", 1.e-3, \"recommended values: 1.e-4 < econv < 1.e-8\");\n            initialize < double > (\"dconv\", 1.e-3, \"recommended values: 1.e-4 < econv < 1.e-8\");\n            initialize < std::vector<int> > (\"pair\", {-1, -1});\n            initialize < int > (\"freeze\", 0);\n            initialize < int > (\"maxsub\", 2);\n            initialize < bool > (\"restart\", true);\n            initialize < bool > (\"no_compute\", false);\n            initialize < int > (\"maxiter\", 5);\n        }\n\n        /// ctor reading out the input file\n        Parameters(World& world, const commandlineparser& parser) : Parameters() {\n            read_and_set_derived_values(world,parser);\n\n            // print final parameters\n            if (world.rank() == 0) print(\"mp2\", \"end\");\n        }\n        std::string get_tag() const override {\n            return std::string(\"mp2\");\n        }\n\n\n        void read_and_set_derived_values(World& world, const commandlineparser& parser) {\n            read_input_and_commandline_options(world, parser, \"mp2\");\n\n            set_derived_value(\"dconv\", sqrt(get<double>(\"econv\")) * 0.1);\n        \tset_derived_value(\"thresh\",get<double>(\"econv\"));\n        }\n\n        /// check the user input\n        void check_input(const std::shared_ptr<HartreeFock> hf) const {\n            if (freeze() > hf->nocc()) MADNESS_EXCEPTION(\"you froze more orbitals than you have\", 1);\n            if (i() >= hf->nocc()) MADNESS_EXCEPTION(\"there is no i-th orbital\", 1);\n            if (j() >= hf->nocc()) MADNESS_EXCEPTION(\"there is no j-th orbital\", 1);\n            if (thresh() < 0.0) MADNESS_EXCEPTION(\"please provide the accuracy threshold for MP2\", 1);\n        }\n\n        double thresh() const { return get<double>(\"thresh\"); }    /// convenience function\n        double econv() const { return get<double>(\"econv\"); }        /// convenience function\n        double dconv() const { return this->get<double>(\"dconv\"); }        /// convenience function\n        int freeze() const { return this->get<int>(\"freeze\"); }            /// convenience function\n        int i() const { return this->get<std::vector<int> >(\"pair\")[0]; }    /// convenience function\n        int j() const { return this->get<std::vector<int> >(\"pair\")[1]; }    /// convenience function\n        int restart() const { return this->get<bool>(\"restart\"); }    /// convenience function\n        int no_compute() const { return this->get<bool>(\"no_compute\"); }    /// convenience function\n        int maxiter() const { return this->get<int>(\"maxiter\"); }    /// convenience function\n        int maxsub() const { return this->get<int>(\"maxsub\"); }    /// convenience function\n        bool do_oep() const { return do_oep1;}\n    };\n\n    /// POD holding all electron pairs with easy access\n    template<typename T>\n    struct Pairs {\n\n        typedef std::map<std::pair<int, int>, T> pairmapT;\n        pairmapT allpairs;\n\n        /// getter\n        const T& operator()(int i, int j) const {\n            return allpairs.find(std::make_pair(i, j))->second;\n        }\n\n        /// getter\n        T& operator()(int i, int j) {\n            return allpairs[std::make_pair(i, j)];\n        }\n\n        /// setter\n        void insert(int i, int j, T pair) {\n            std::pair<int, int> key = std::make_pair(i, j);\n            allpairs.insert(std::make_pair(key, pair));\n        }\n    };\n\n\n    World& world;                           ///< the world\n    Parameters param;                        ///< SCF parameters for MP2\n    std::shared_ptr<HartreeFock> hf;        ///< our reference\n    CorrelationFactor corrfac;              ///< correlation factor: Slater\n    std::shared_ptr<NuclearCorrelationFactor> nuclear_corrfac;\n    mutable Tensor<double> fock;            ///< the Fock matrix\n\n    Pairs<ElectronPair> pairs;       ///< pair functions and energies\n    double correlation_energy;                ///< the correlation energy\n    double coords_sum;                        ///< check sum for the geometry\n\n    StrongOrthogonalityProjector<double, 3> Q12;\n\nprivate:\n\n    std::shared_ptr<real_convolution_3d> poisson;\n\npublic:\n\n    /// ctor\n    MP2(World& world, const commandlineparser& parser);\n    std::string name() const {return \"MP2\";};\n\n    static void help() {\n        print_header2(\"help page for MP2 \");\n        print(\"The mp2 code computes second order correlation energies based on a moldft or nemo calculation\");\n        print(\"You can print all available calculation parameters by running\\n\");\n        print(\"mp2 --print_parameters\\n\");\n        print(\"You can perform a simple calculation by running\\n\");\n        print(\"mp2 --geometry=h2o.xyz\\n\");\n        print(\"provided you have an xyz file in your directory.\");\n\n    }\n\n    static void print_parameters() {\n        Parameters param;\n        print(\"default parameters for the mp2 program are\");\n        param.print(\"mp2\", \"end\");\n        print(\"\\n\\nthe molecular geometry must be specified in a separate block:\");\n        Molecule::print_parameters();\n    }\n    virtual bool selftest() {\n        return true;\n    };\n\n    /// return a checksum for the geometry\n    double coord_chksum() const { return coords_sum; }\n\n    /// return the molecular correlation energy energy (without the HF energy)\n    double value();\n\n    /// return the molecular correlation energy as a function of the coordinates\n    double value(const Tensor<double>& x);\n\n    /// make sure frozen orbitals don't couple with correlated ones -- relocalize if necessary\n    bool check_core_valence_separation() const;\n\n    /// make sure frozen orbitals don't couple with correlated ones -- relocalize if necessary\n    void enforce_core_valence_separation();\n\n    /// return the underlying HF reference\n    HartreeFock& get_hf() { return *hf; }\n\n    /// return the 0th order energy of pair ij (= sum of orbital energies)\n    double zeroth_order_energy(const int i, const int j) const {\n        return hf->orbital_energy(i) + hf->orbital_energy(j);\n    }\n\n    /// solve the residual equation for electron pair (i,j)\n\n    /// \\todo Parameter documentation. Below are un-doxygenated comments that no longer seem relevant?\n    // @param[in]  pair    electron pair to solve\n    // @param[in]  econv   energy convergence criterion (for a single pair)\n    // @param[in]  dconv   density convergence criterion (for a single pair)\n    real_function_6d iterate(const real_function_6d& f) const {\n        ElectronPair tmp(0, 0);\n        tmp.function = copy(f);\n        tmp.constant_term = copy(f);\n        tmp.ij_gQf_ij = compute_gQf(0, 0, tmp);\n        tmp.ji_gQf_ij = tmp.ij_gQf_ij;\n        solve_residual_equations(tmp, 10.0, 10.0);\n        return tmp.function;\n    }\n\n    void solve_residual_equations(ElectronPair& pair,\n                                  const double econv, const double dconv) const;\n\n    /// solve the coupled MP1 equations (e.g. for local orbitals)\n\n    /// @param[in]  pairs   set of (coupled) electron pairs to solve\n    /// @param[in]  econv   energy convergence criterion (for all pairs)\n    /// @param[in]  dconv   density convergence criterion (for all pairs)\n    double solve_coupled_equations(Pairs<ElectronPair>& pairs,\n                                   const double econv, const double dconv) const;\n\n    /// compute increments: psi^1 = C + GV C + GVGV C + GVGVGV C + ..\n\n    /// for pre-optimization of the mp1 wave function\n    /// no restart option here for now\n    /// param[inout]\tpair\tthe electron pair\n    /// param[in]\t\tgreen\tthe Green's function\n    void increment(ElectronPair& pair, real_convolution_6d& green);\n\n    double asymmetry(const real_function_6d& f, const std::string s) const;\n\n    /// compute the matrix element <ij | g12 Q12 f12 | phi^0>\n\n    /// scales quartically. I think I can get this down to cubically by\n    /// setting Q12 = (1 - O1)(1 - O2) = 1- O1(1 - 0.5 O2) - O2 (1 - 0.5 O1)\n    /// as for the formulas cf the article mra_molecule\n    /// @return \tthe energy <ij | g Q f | kl>\n    double compute_gQf_cc2interface(const int i, const int j, const real_function_6d& f) const {\n        ElectronPair tmp(0, 0);\n        tmp.function = copy(f);\n        tmp.constant_term = copy(f);\n        return compute_gQf(i, j, tmp);\n    }\n\n    double compute_gQf(const int i, const int j, ElectronPair& pair) const;\n\n    /// pretty print the options\n\n    /// invoke only in (world.rank()==0) !!\n    template<typename T>\n    void print_options(const std::string option, const T val) const {\n        std::cout << std::setfill(' ') << std::setw(30);\n        std::cout << option << \"  \" << val << std::endl;\n    }\n\n    real_function_6d debug_cc2(const real_function_6d& f, const size_t& i, const size_t& j) const {\n        return multiply_with_0th_order_Hamiltonian(f, i, j);\n    }\n\npublic:\n\n    /// save a function\n    template<typename T, size_t NDIM>\n    void save_function(const Function<T, NDIM>& f, const std::string name) const;\n\n    /// load a function\n    template<typename T, size_t NDIM>\n    void load_function(Function<T, NDIM>& f, const std::string name) const;\n\nprivate:\n    /// return the function Uphi0; load from disk if available\n    real_function_6d make_Uphi0(ElectronPair& pair) const;\n\n    /// return the function [K,f] phi0; load from disk if available\n    real_function_6d make_KffKphi0(const ElectronPair& pair) const;\n\n\n    /// compute some matrix elements that don't change during the SCF\n    ElectronPair make_pair(const int i, const int j) const;\n\n    /// compute the first iteration of the residual equations and all intermediates\n    void guess_mp1_3(ElectronPair& pair) const;\n\nprivate:\n\n    /// compute the singlet and triplet energy for a given electron pair\n\n    /// @return\tthe energy of 1 degenerate triplet and 1 singlet pair\n    double compute_energy(ElectronPair& pair) const;\n\n    /// apply the exchange operator on an orbital\n\n    /// @param[in]\tphi the orbital\n    /// @param[in]\thc\thermitian conjugate -> swap bra and ket space\n    /// @return \tKphi\n    real_function_3d K(const real_function_3d& phi, const bool hc = false) const;\n\n    /// apply the exchange operator on a pair function\n\n    /// @param[in]\tphi the pair function\n    /// @param[in]\tis_symmetric is the function symmetric wrt particle exchange\n    /// @return \t(K1 + K2) |phi >\n    real_function_6d K(const real_function_6d& phi, const bool is_symmetric = false) const;\n\n    /// apply the Coulomb operator a on orbital\n\n    /// @param[in]\tphi the orbital\n    /// @return \tJphi\n    real_function_3d J(const real_function_3d& phi) const;\n\n    real_function_6d apply_exchange_vector(const real_function_6d& f, const int particle) const;\n\n    /// apply the exchange operator on f\n\n    /// if the exchange operator is similarity transformed (R-1 K R) the\n    /// orbital spaces differ for the orbitals underneath the integral sign\n    /// R-1 K R = \\phi-ket(1) * \\int \\phi-bra(1') * f(1',2)\n    /// @param[in]  f   the pair function\n    /// @param[in]  orbital_bra the orbital underneath the integral sign (typically R2orbitals)\n    /// @param[in]  orbital_ket the orbital to be pre-multiplied with (typically orbitals)\n    /// @return     the pair function, on which the exchange operator has been applied\n    real_function_6d apply_exchange(const real_function_6d& f,\n                                    const real_function_3d& orbital_ket,\n                                    const real_function_3d& orbital_bra, const int particle) const;\n\n    /// make the quantity chi_k\n\n    /// chi is the Poisson kernel applied on an orbital product of the\n    /// input function and the vector of orbitals\n    /// \\f[ \\chi_{k{*} i}(1) = \\int dr_2 \\frac{k(2) i(2)}{|r_1-r_2|} \\f]\n    /// \\f[ \\chi_{ki{*}}(1) = \\int dr_2 \\frac{k(2) i(2)}{|r_1-r_2|} \\f] if hc\n    /// @param[in]  phi\t\torbital phi_i\n    /// @param[in]\top\t\tthe operator in SeparatedConvolution form\n    /// @param[in]\thc\t\tcompute hermitian conjugate -> pass the correct phi!\n    /// @return a vector of length nocc\n    std::vector<real_function_3d> make_chi(const real_function_3d& phi,\n                                           const real_convolution_3d& op,\n                                           const bool hc = false) const;\n\n    /// make the quantity xi_k\n\n    /// xi is chi multiplied with an orbital j\n    /// \\f[ \\xi_{k{*}i,j}(1) = \\chi_{ki}(1) j(1) \\f]\n    /// \\f[ \\xi_{ki{*},j{*}}(1) = \\chi_{k{*}i}(1) j(1) \\f]  if hc\n    /// @param[in]  phi_i   orbital i\n    /// @param[in]  phi_j   orbital j\n    /// @param[in]\top\t\tthe operator in SeparatedConvolution form\n    /// @param[in]\thc\t\tcompute hermitian conjugate  -> pass the correct phi!\n    /// @return a vector of length k=0,..,nocc\n    std::vector<real_function_3d> make_xi(const real_function_3d& phi_i,\n                                          const real_function_3d& phi_j, const real_convolution_3d& op,\n                                          const bool hc = false) const;\n\n    /// apply the operator K on the reference and multiply with f; fK |phi^0>\n\n    /// @param[in]  i   index of orbital i\n    /// @param[in]  j   index of orbital j\n    /// @return     the function f12 (K(1)+K(2))|phi^0>\n    real_function_6d make_fKphi0(const int i, const int j) const;\n\n    /// return the function (J(1)-K(1)) |phi0> as on-demand function\n\n    /// @param[in]\thc\t\tcompute hermitian conjugate -> swap bra and ket space\n    real_function_6d JK1phi0_on_demand(const int i, const int j,\n                                       const bool hc = false) const;\n\n    /// return the function (J(2)-K(2)) |phi0> as on-demand function\n    real_function_6d JK2phi0_on_demand(const int i, const int j,\n                                       const bool hc = false) const;\n\n    /// return the function |phi0> as on-demand function\n    real_function_6d phi0_on_demand(const int i, const int j) const;\n\n    /// return the function |F1F2> as on-demand function\n    real_function_6d nemo0_on_demand(const int i, const int j) const;\n\n\n    /// multiply the given function with the 0th order Hamiltonian, exluding the 0th order energy\n\n    /// @param[in]  f   the function we apply H^0 on\n    /// @return     the function g=H^0 f, which is NOT orthogonalized against f\n    real_function_6d multiply_with_0th_order_Hamiltonian(const real_function_6d& f,\n                                                         const int i, const int j) const;\n\n    // need this for CC2 debug\npublic:\n    real_function_6d get_residue(const real_function_6d& f,\n                                 const int i, const int j) {\n        hf->value();        // make sure the reference is converged\n        nuclear_corrfac = hf->nemo_ptr->ncf;\n        // set all orbitals spaces\n        // When a nuclear correlation factor is used the residual equations\n        // are similarity transformed. Therefore the orbitals in the\n        // projection operator must be set accordingly.\n        if (nuclear_corrfac->type() == NuclearCorrelationFactor::None) {\n            Q12.set_spaces(hf->get_calc().amo);\n        } else {\n            // only valid for closed shell\n            MADNESS_ASSERT(hf->get_calc().param.spin_restricted());\n            const std::vector<real_function_3d>& nemos = hf->nemos();\n            const std::vector<real_function_3d>& R2amo = hf->R2orbitals();\n            Q12.set_spaces(R2amo, nemos, R2amo, nemos);\n            if (world.rank() == 0) {\n                print(\"set orbital spaces for the SO projector\");\n                print(\"Q12,R = (1-|nemo><nemo|R2) (1-|nemo><nemo|R2)\");\n            }\n        }\n\n        return multiply_with_0th_order_Hamiltonian(f, i, j);\n    }\n\nprivate:\n    // compute some intermediates\n    Tensor<double> get_fock_matrix() const {\n        if (fock.has_data()) return copy(fock);\n        const tensorT occ = hf->get_calc().aocc;\n        fock = hf->nemo_ptr->compute_fock_matrix(hf->nemos(), occ);\n        if (world.rank() == 0 and hf->nocc() < 10) {\n            print(\"The Fock matrix\");\n            print(fock);\n        }\n        return copy(fock);\n    }\n\n\n\n    /// add the coupling terms for local MP2\n\n    /// \\sum_{k\\neq i} f_ki |u_kj> + \\sum_{l\\neq j} f_lj |u_il>\n    /// @todo Verify this doxygen block.\n    void add_local_coupling(const Pairs<ElectronPair>& pairs, Pairs<real_function_6d>& coupling) const;\n\n    mutable double ttt, sss;\n\n    void START_TIMER(World& world) const {\n        world.gop.fence();\n        ttt = wall_time();\n        sss = cpu_time();\n    }\n\n    void END_TIMER(World& world, const char *msg) const {\n        ttt = wall_time() - ttt;\n        sss = cpu_time() - sss;\n        if (world.rank() == 0) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt);\n    }\n\n};\n};\n\n#endif /* MP2_H_ */\n\n"
  },
  {
    "path": "src/madness/chem/mp3.cc",
    "content": "//\n// Created by Florian Bischoff on 2/15/24.\n//\n\n#include \"mp3.h\"\n\nnamespace madness {\ndouble MP3::compute_mp3_cd(const Pairs<CCPair>& mp2pairs, const Info& info) const {\n    print_header3(\"compute term_CD of the MP3 energy with R2_bra\");\n    // compute the MP3 energy\n    std::size_t nocc=info.mo_ket.size();\n    print(\"freeze, nocc\",info.parameters.freeze(),nocc);\n    typedef std::vector<CCPairFunction<double,6>> ClusterFunction;\n    Pairs<ClusterFunction> clusterfunctions;\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = i; j < nocc; ++j) {\n            clusterfunctions(i,j)=mp2pairs(i,j).functions;\n            if (i!=j) {\n                for (const auto& t : clusterfunctions(i,j)) {\n                    clusterfunctions(j, i).push_back(t.swap_particles());\n                }\n            }\n        }\n    }\n    const auto& R2=info.R_square;\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    double result = 0.0;\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = i; j < nocc; ++j) {\n            auto bra = clusterfunctions(i, j);\n            double tmp1 = inner(bra, g12 * clusterfunctions(i, j), R2);\n            double tmp2 = inner(bra, g12 * clusterfunctions(j, i), R2);\n            double fac = (i == j) ? 0.5 : 1.0;\n            double tmp = fac * (4.0 * tmp1 - 2.0 * tmp2);\n            printf(\"mp3 energy: term_CD %2ld %2ld: %12.8f\\n\", i, j, tmp);\n            result+= tmp;\n        }\n    }\n    printf(\"MP3 energy: term_CD %12.8f\\n\", result);\n    return result;\n};\n\ndouble MP3::compute_mp3_ef(const Pairs<CCPair>& mp2pairs, const Info& info) const {\n\n    // prepare cluster functions\n    std::size_t nocc=info.mo_ket.size();\n    typedef std::vector<CCPairFunction<double,6>> ClusterFunction;\n    Pairs<ClusterFunction> clusterfunctions;\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = i; j < nocc; ++j) {\n            clusterfunctions(i,j)=mp2pairs(i,j).functions;\n            if (i!=j) {\n                for (const auto& t : clusterfunctions(i,j)) {\n                    clusterfunctions(j, i).push_back(t.swap_particles());\n                }\n            }\n        }\n    }\n\n\n\n    const auto& R2=info.R_square;\n    double result=0.0;\n    const std::vector<real_function_3d>& nemo_orbital=info.mo_ket;\n    const std::vector<real_function_3d>& R2_orbital=info.mo_bra;\n\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n\n\n    print_header3(\"computing term EF of the MP3 energy with R2_bra\");\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = info.parameters.freeze(); j < nocc; ++j) {\n            double tmp=0.0;\n            for (std::size_t k=info.parameters.freeze(); k< nocc; ++k) {\n                for (std::size_t l=info.parameters.freeze(); l<nocc; ++l) {\n                    auto bra_ik = clusterfunctions(i,k);\n                    auto bra_ki = clusterfunctions(k,i);\n                    double ovlp_E=inner(bra_ik,clusterfunctions(j,l),R2);\n                    double ovlp_F=inner(bra_ki,clusterfunctions(j,l),R2);\n                    auto ket_i=nemo_orbital[i];\n                    auto ket_k=nemo_orbital[k];\n                    auto bra_j=R2_orbital[j];\n                    auto bra_l=R2_orbital[l];\n\n                    double g_jlik=inner(bra_j*ket_i, (*g12)(bra_l*ket_k));\n                    //                    print(\"<jl | g | ik>\",g_jlik);\n                    tmp+=(2.0*ovlp_E - ovlp_F)*g_jlik;\n                }\n            }\n            printf(\"mp3 energy: term_EF %2ld %2ld %12.8f\\n\",i,j,tmp);\n            result+=tmp;\n        }\n    }\n    printf(\"MP3 energy: term_EF %12.8f\\n\",result);\n    return result;\n};\n\n/// permutations in physisists notation: <ij | kl>  = (ik | jl), loop over ik<jl\n\n/// std::vector<permutation> all_permutations;\n/// for (int ik=0; ik<npair(); ++ik) {\n///     for (int jl=ik; jl<npair(); ++jl) {\n///         auto [i,k]=ij_to_i_and_j(ik);\n///         auto [j,l]=ij_to_i_and_j(jl);\n///         permutation p(i,j,k,l);\n///         auto perms=p.make_all_permutations();\n///         for (const auto& p:perms) all_permutations.push_back(p);\n///         int number_of_unique_permutations=perms.size();\n///         print(\"ij, kl, i, j, k, l\",ik,jl,\" -- \", i,j,k,l,\" - \",perms.size(),perms);\n///     }\n/// }\nstruct permutation {\n    int i,j,k,l;\n    permutation(int i, int j, int k, int l) : i(i), j(j), k(k), l(l) {}\n    std::vector<permutation> make_all_eri_permutations() const{\n        permutation p1(i,j,k,l);\n        permutation p2(k,j,i,l);\n        permutation p3(i,l,k,j);\n        permutation p4(k,l,i,j);\n        permutation p5(j,i,l,k);\n        permutation p6(l,i,j,k);\n        permutation p7(j,k,l,i);\n        permutation p8(l,k,j,i);\n        std::vector<permutation> result({p1,p2,p3,p4,p5,p6,p7,p8});\n        return remove_duplicates(result);\n    }\n\n    /// <\\tau_{ij} | \\tau_{kl}> = <\\tau_{ji} | \\tau_{lk}> = <\\tau_{kl} | \\tau_{ij}>= <\\tau_{lk} | \\tau_{ji}>\n    std::vector<permutation> make_all_tau_permutations() const{\n        permutation p1(i,j,k,l);\n        permutation p2(j,i,l,k);\n        permutation p3(k,l,i,j);\n        permutation p4(l,k,j,i);\n        return remove_duplicates({p1,p2,p3,p4});\n    }\n\n    bool operator<(const permutation& other) const {\n        return std::tie(i,j,k,l) < std::tie(other.i,other.j,other.k,other.l);\n    }\n    bool operator==(const permutation& other) const {\n        return std::tie(i,j,k,l) == std::tie(other.i,other.j,other.k,other.l);\n    }\n    bool operator!=(const permutation& other) const {\n        return (not (*this==other));\n    }\n    static std::vector<permutation> remove_duplicates(std::vector<permutation> v) {\n        // remove duplicates\n        std::sort(v.begin(), v.end(),[](permutation a, permutation b) { return a < b; });\n        auto last = std::unique(v.begin(), v.end());\n        v.erase(last, v.end());\n        return v;\n    }\n};\nstd::ostream& operator<<(std::ostream& os, const permutation& p) {\n    os << \"(\" << p.i << p.j << p.k << p.l << \")\";\n    return os;\n}\n/// compute the EF term of the MP3 energy with permutational symmetry\n\n/// there is the usual 8-fold permutational symmetry for 2-electron integrals\n/// <ij | kl >      = <ji | lk > = <kj | il >  = < il | kj >\n///    = <kl | ij>  = <lk | ji > = <il | kj >  = < kj | il >\n/// implemented as loop over (ij) = \\sum_i<j  and (ij) < (kl)\ndouble MP3::compute_mp3_ef_with_permutational_symmetry(const Pairs<CCPair>& mp2pairs, const Info& info) const {\n    print_header3(\"computing term EF of the MP3 energy with R2_bra\");\n    World& world=mp2pairs.allpairs.begin()->second.function().world();\n    // prepare cluster functions\n    std::size_t nocc=info.mo_ket.size();\n    std::size_t nfrozen=info.parameters.freeze();\n    typedef std::vector<CCPairFunction<double,6>> ClusterFunction;\n    Pairs<ClusterFunction> clusterfunctions;\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = i; j < nocc; ++j) {\n            clusterfunctions(i,j)=mp2pairs(i,j).functions;\n            if (i!=j) {\n                for (const auto& t : clusterfunctions(i,j)) {\n                    clusterfunctions(j, i).push_back(t.swap_particles());\n                }\n            }\n        }\n    }\n\n    const auto& R2=info.R_square;\n    double result=0.0;\n    const std::vector<real_function_3d>& nemo_orbital=info.mo_ket;\n    const std::vector<real_function_3d>& R2_orbital=info.mo_bra;\n\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    // number of pairs\n    auto npair = [&nocc, &nfrozen]() { return (nocc - nfrozen) * (nocc - nfrozen + 1) / 2; };\n\n    // turn composite index ij into i and j, taking care of frozen orbitals\n    PairVectorMap map=PairVectorMap::triangular_map(nfrozen,nocc);\n    auto ij_to_i_and_j = [&map](const int ij) { return map.map[ij]; };\n\n    /// <ij | kl >  = (ik | jl)\n    std::vector<permutation> all_tau_permutations;\n    // loop over unique pairs (ij)\n    for (size_t ij=0; ij<npair(); ++ij) {\n        auto [i,j]=ij_to_i_and_j(ij);\n        double tmp=0;\n        std::vector<CCPairFunction<double,6>> tmp_tau;\n        // loop over all k and l\n        for (std::size_t k=nfrozen; k<nocc; ++k) {\n            for (std::size_t l=nfrozen; l<nocc; ++l) {\n\n                // make all possible permutations of the 4 indices i,j,k,l\n                permutation p0(i,j,k,l);\n                auto perms=p0.make_all_tau_permutations();  // permutations are sorted\n                // continue only if this permutation is the canonical one\n                if (p0!=perms.front()) continue;\n                for (const auto& p:perms) all_tau_permutations.push_back(p);\n                const double weight=perms.size();\n\n                // terms C+D = <tau_ij | tau_kl> (2*<ij|g|kl> - <ji|g|kl>)\n                //           = <tau_ij | tau_kl> (2*(ik|jl) - (jk|il))\n                const auto& ket_i=nemo_orbital[i];\n                const auto& ket_k=nemo_orbital[k];\n                const auto& ket_l=nemo_orbital[l];\n                const auto& bra_i=R2_orbital[i];\n                const auto& bra_j=R2_orbital[j];\n                const auto& bra_l=R2_orbital[l];\n                double g_ikjl=inner(bra_i*ket_k, (*g12)(bra_j*ket_l));\n                double g_jkil=inner(bra_j*ket_k, (*g12)(bra_l*ket_i));\n                // double ovlp=inner(clusterfunctions(i,j),clusterfunctions(k,l),R2);\n                tmp_tau+=weight*(2.0* g_ikjl - g_jkil)*clusterfunctions(k,l);\n                // tmp+=weight*ovlp*(2.0* g_ikjl - g_jkil);\n            }\n        }\n        tmp_tau=consolidate(tmp_tau,{\"remove_lindep\"});\n        tmp=inner(clusterfunctions(i,j),tmp_tau,R2);\n        printf(\"mp3 energy: term_EF %2d %2d %12.8f\\n\",i,j,tmp);\n        result+=tmp;\n    }\n    printf(\"MP3 energy: term_EF %12.8f\\n\",result);\n\n    // sanity check\n    int npermutations=all_tau_permutations.size();\n    all_tau_permutations=permutation::remove_duplicates(all_tau_permutations);\n    int nuniquepermutations=all_tau_permutations.size();\n    int ntotalpermutations=std::pow(nocc-nfrozen,4);\n    MADNESS_CHECK_THROW(npermutations==nuniquepermutations,\"incorrect number of unique permutations\");\n    MADNESS_CHECK_THROW(npermutations==ntotalpermutations,\"incorrect number of unique permutations\");\n\n    return result;\n};\n\ndouble MP3::compute_mp3_ef_low_scaling(const Pairs<CCPair>& mp2pairs,\n    const Pairs<std::vector<CCPairFunction<double,6>>> clusterfunctions, const Info& info) const {\n    World& world=mp2pairs.allpairs.begin()->second.function().world();\n\n    print_header3(\"computing term EF of the MP3 energy with R2_bra, low-scaling version\");\n\n    std::size_t nocc=info.mo_ket.size();\n    std::size_t nfrozen=info.parameters.freeze();\n\n    const auto& R2=info.R_square;\n    double result=0.0;\n    const std::vector<real_function_3d>& nemo_orbital=info.mo_ket;\n    const std::vector<real_function_3d>& R2_orbital=info.mo_bra;\n\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    timer timer_sum(world);\n    timer_sum.interrupt();\n    timer timer_inner(world);\n    timer_inner.interrupt();\n    timer timer_consolidate(world);\n    timer_consolidate.interrupt();\n\n    /// <ij | kl >  = (ik | jl)\n    std::vector<permutation> all_tau_permutations;\n    // loop over unique pairs (ij)\n    for (std::size_t i=nfrozen; i<nocc; ++i) {\n        for (std::size_t j=nfrozen; j<nocc; ++j) {\n            timer_sum.resume();\n            std::vector<CCPairFunction<double,6>> sigma;\n            for (std::size_t k=nfrozen; k<nocc; ++k) {\n                for (std::size_t l=nfrozen; l<nocc; ++l) {\n                    const auto& ket_i=nemo_orbital[i];\n                    const auto& ket_k=nemo_orbital[k];\n                    const auto& ket_l=nemo_orbital[l];\n                    const auto& bra_i=R2_orbital[i];\n                    const auto& bra_j=R2_orbital[j];\n                    const auto& bra_l=R2_orbital[l];\n                    double g_ikjl=inner(bra_i*ket_k, (*g12)(bra_j*ket_l));\n                    double g_jkil=inner(bra_j*ket_k, (*g12)(bra_l*ket_i));\n                    double g_ijkl=(2.0* g_ikjl - g_jkil);\n                    sigma+=g_ijkl*clusterfunctions(k,l);\n                }\n            }\n            timer_sum.interrupt();\n            timer_consolidate.resume();\n            sigma=consolidate(sigma,{\"remove_lindep\"});\n            timer_consolidate.interrupt();\n            timer_inner.resume();\n            double tmp=inner(clusterfunctions(i,j),sigma,R2);\n            printf(\"mp3 energy: term_EF %2ld %2ld %12.8f\\n\",i,j,tmp);\n            result+=tmp;\n            timer_inner.interrupt();\n        }\n    }\n\n    timer_sum.print(\"summation in EF term\");\n    timer_consolidate.print(\"consolidation in EF term\");\n    timer_inner.print(\"inner in EF term\");\n    printf(\"MP3 energy: term_EF %12.8f\\n\",result);\n    return result;\n\n}\n\ndouble MP3::compute_mp3_ghij(const Pairs<CCPair>& mp2pairs,\n    const Pairs<std::vector<CCPairFunction<double,6>>> clusterfunctions, const Info& info) const {\n    typedef std::vector<CCPairFunction<double,6>> ClusterFunction;\n    World& world=mp2pairs.allpairs.begin()->second.function().world();\n\n    // prepare cluster functions\n    std::size_t nocc=info.mo_ket.size();\n    double result=0.0;\n\n    const auto& R2=info.R_square;\n    //const std::vector<real_function_3d>& nemo_orbital=info.mo_ket;\n    const std::vector<real_function_3d>& R2_orbital=info.mo_bra;\n\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    timer t2(world);\n\n\n    // compute intermediates for terms G, I, H, and J\n\n    // \\sum_j tau_ij(1,2) * phi_j(2)\n    std::vector<ClusterFunction> tau_kk_i(nocc);\n    // \\sum_j tau_ij(1,2) * phi_j(1)\n    std::vector<ClusterFunction> tau_ij_j(nocc);\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = info.parameters.freeze(); j < nocc; ++j) {\n            auto tmp2 = multiply(clusterfunctions(i, j), R2_orbital[i], {0, 1, 2});\n            for (auto& t: tmp2) tau_kk_i[j].push_back(t);\n\n            auto tmp3 = multiply(clusterfunctions(i, j), R2_orbital[j], {0, 1, 2});\n            for (auto& t: tmp3) tau_ij_j[i].push_back(t);\n        }\n    }\n    std::vector<std::string> consolidation={\"op_pure_to_pure\",\"remove_lindep\"};\n    print(\"consolidating with \",consolidation);\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        tau_kk_i[i] = consolidate(tau_kk_i[i],consolidation);\n        tau_ij_j[i] = consolidate(tau_ij_j[i], consolidation);\n        // for (auto& c: tau_kk_i[i]) c.info();\n    }\n\n    t2.tag(\"GHIJ term prep\");\n\n    // terms G, I, H, J of Bartlett/Silver 1975\n    real_convolution_3d& g = *(g12->get_op());\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        // tmp(1,2) = g(1,1') | tau_ij(1',2) j(2) >\n        timer t4(world, \"gtau\");\n        g.set_particle(1);\n        auto gtau_same = g(tau_kk_i[i]);\n        t4.tag(\"compute gtau_same\");\n\n        // tmp(1',2) = g(1',1) | tau_ij(1,2) j(1) >\n        g.set_particle(1);\n        auto gtau_other = g(tau_ij_j[i]); // < tau_ij(1,2) j(1) | g(1,1') |\n        t4.tag(\"compute gtau_other\");\n\n        auto bra_kk_i = multiply(tau_kk_i[i], R2, {3, 4, 5});\n        auto bra_ij_j = multiply(tau_ij_j[i], R2, {3, 4, 5});\n\n        double G = inner(bra_kk_i, gtau_same);\n        printf(\"G     %12.8f\\n\", G);\n\n        double H = inner(bra_ij_j, gtau_other);\n        printf(\"H     %12.8f\\n\", H);\n\n        double I = inner(bra_kk_i, gtau_other);\n        printf(\"I     %12.8f\\n\", I);\n\n        double J = inner(bra_ij_j, gtau_same);\n        printf(\"J     %12.8f\\n\", J);\n\n        t4.tag(\"compute inner products\");\n        double tmp = (8.0 * G - 4.0 * I + 2.0 * H - 4.0 * J);\n        printf(\"mp3 energy: term_GHIJ  %2ld %12.8f\\n\", i, tmp);\n        result += tmp;\n    }\n    printf(\"MP3 energy: term_GHIJ %12.8f\\n\", result);\n    t2.tag(\"GHIJ term\");\n    return result;\n};\n\n\ndouble MP3::compute_mp3_ghij_fast(const Pairs<CCPair>& mp2pairs, const Pairs<std::vector<CCPairFunction<double,6>>> clusterfunctions, const Info& info) const {\n    World& world=mp2pairs.allpairs.begin()->second.function().world();\n\n    print_header3(\"entering compute_mp3_ghij_fast\");\n\n    // prepare cluster functions\n    std::size_t nocc=info.mo_ket.size();\n    typedef std::vector<CCPairFunction<double,6>> ClusterFunction;\n    double result=0.0;\n\n    const auto& R2=info.R_square;\n    //const std::vector<real_function_3d>& nemo_orbital=info.mo_ket;\n    const std::vector<real_function_3d>& R2_orbital=info.mo_bra;\n\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    timer t2(world);\n\n    // compute intermediates for terms G, I, H, and J\n\n    // \\sum_j tau_ij(1,2) * phi_j(2)\n    std::vector<ClusterFunction> tau_kk_i(nocc);\n    // \\sum_j tau_ij(1,2) * phi_j(1)\n    std::vector<ClusterFunction> tau_ij_j(nocc);\n\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = info.parameters.freeze(); j < nocc; ++j) {\n            auto tmp2 = multiply(clusterfunctions(i, j), R2_orbital[i], {0, 1, 2});\n            for (auto& t: tmp2) tau_kk_i[j].push_back(t);\n\n            auto tmp3 = multiply(clusterfunctions(i, j), R2_orbital[j], {0, 1, 2});\n            for (auto& t: tmp3) tau_ij_j[i].push_back(t);\n        }\n    }\n\n    std::vector<std::string> consolidation={\"op_pure_to_pure\",\"remove_lindep\",\"op_dec_to_dec\"};\n    print(\"consolidating with \",consolidation);\n    std::vector<ClusterFunction> intermediate(nocc);\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        intermediate[i]=2.0*tau_kk_i[i];\n        intermediate[i]-=tau_ij_j[i];\n        intermediate[i]=consolidate(intermediate[i],consolidation,info.molecular_coordinates);\n    }\n\n    t2.tag(\"GHIJ term prep\");\n\n    // terms G, I, H, J of Bartlett/Silver 1975\n    real_convolution_3d& g = *(g12->get_op());\n    g.set_particle(1);\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        // tmp(1,2) = g(1,1') | tau_ij(1',2) j(2) >\n        timer t4(world, \"gtau\");\n        auto gintermediate = g(intermediate[i]);\n        t4.tag(\"compute gintermediate\");\n        auto bra_intermediate = multiply(intermediate[i], R2, {3, 4, 5});\n        t4.tag(\"multiply\");\n        double tmp = 2.0*inner(bra_intermediate, gintermediate);\n        printf(\"mp3 energy: term_GHIJ  %2ld %12.8f\\n\", i, tmp);\n        t4.tag(\"inner\");\n        result += tmp;\n    }\n    printf(\"MP3 energy: term_GHIJ %12.8f\\n\", result);\n    t2.tag(\"GHIJ term\");\n    return result;\n};\n\ndouble MP3::compute_mp3_klmn_fast(const Pairs<CCPair>& mp2pairs, const Info& info) const {\n    World& world=mp2pairs.allpairs.begin()->second.function().world();\n\n    // prepare cluster functions\n    std::size_t nocc=info.mo_ket.size();\n    typedef std::vector<CCPairFunction<double,6>> ClusterFunction;\n    Pairs<ClusterFunction> clusterfunctions;\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = i; j < nocc; ++j) {\n            clusterfunctions(i,j)=mp2pairs(i,j).functions;\n            if (i!=j) {\n                for (const auto& t : clusterfunctions(i,j)) {\n                    clusterfunctions(j, i).push_back(t.swap_particles());\n                }\n            }\n        }\n    }\n    double result=0.0;\n\n    const auto& R2=info.R_square;\n    const std::vector<real_function_3d>& nemo_orbital=info.mo_ket;\n    const std::vector<real_function_3d>& R2_orbital=info.mo_bra;\n\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    // compute the term <i(1) |g(1,2) | j(1)>(2)\n    madness::Pairs<real_function_3d> gij;\n\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = info.parameters.freeze(); j < nocc; ++j) {\n            gij.insert(i,j,(*g12)(nemo_orbital[i]*R2_orbital[j]));\n        }\n    }\n\n\n    timer multiply_KLMN(world, \"multiplication in KLMN term\");\n    multiply_KLMN.interrupt();\n    timer inner_KLMN(world, \"inner in KLMN term\");\n    inner_KLMN.interrupt();\n    // prepare intermediates for terms K, L, M, N of Bartlett/Silver 1975\n    // tau_g_ij(1,2) = \\sum_k tau_ik(1,1') g_jk(2)\n    Pairs<ClusterFunction> tau_ik_g_kj, tau_kj_g_ki;\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = info.parameters.freeze(); j < nocc; ++j) {\n            multiply_KLMN.resume();\n            std::vector<CCPairFunction<double, 6>> rhs;\n            for (std::size_t k = info.parameters.freeze(); k < nocc; ++k) {\n                rhs += +2.0 * multiply(clusterfunctions(j, k), gij(k, i), {0, 1, 2});   // M\n                rhs += +2.0 * multiply(clusterfunctions(k, i), gij(k, j), {0, 1, 2});    //  N\n                rhs += -4.0 * multiply(clusterfunctions(i, k), gij(k, j), {3, 4, 5});   // K\n                rhs += -4.0 * multiply(clusterfunctions(k, j), gij(k, i), {3, 4, 5});   // L\n            }\n            rhs = consolidate(rhs, {});\n            multiply_KLMN.interrupt();\n\n            inner_KLMN.resume();\n            double tmp = inner(clusterfunctions(i, j), rhs, R2);\n            inner_KLMN.interrupt();\n\n            printf(\"mp3 energy: term_KLMN with particle=1 %2ld %2ld %12.8f\\n\", i, j, tmp);\n            result += tmp;\n        }\n    }\n    printf(\"MP3 energy: term_KLMN (KLMN) %12.8f\\n\", result);\n    multiply_KLMN.print(\"multiplication in KLMN term\");\n    inner_KLMN.print(\"inner in KLMN term\");\n\n    return result;\n\n};\ndouble MP3::compute_mp3_klmn(const Pairs<CCPair>& mp2pairs, const Info& info) const {\n    World& world=mp2pairs.allpairs.begin()->second.function().world();\n\n    // prepare cluster functions\n    std::size_t nocc=info.mo_ket.size();\n    typedef std::vector<CCPairFunction<double,6>> ClusterFunction;\n    Pairs<ClusterFunction> clusterfunctions;\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = i; j < nocc; ++j) {\n            clusterfunctions(i,j)=mp2pairs(i,j).functions;\n            if (i!=j) {\n                for (const auto& t : clusterfunctions(i,j)) {\n                    clusterfunctions(j, i).push_back(t.swap_particles());\n                }\n            }\n        }\n    }\n    double result=0.0;\n\n    const auto& R2=info.R_square;\n    const std::vector<real_function_3d>& nemo_orbital=info.mo_ket;\n    const std::vector<real_function_3d>& R2_orbital=info.mo_bra;\n\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    // compute the term <i(1) |g(1,2) | j(1)>(2)\n    madness::Pairs<real_function_3d> gij;\n\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = info.parameters.freeze(); j < nocc; ++j) {\n            gij.insert(i,j,(*g12)(nemo_orbital[i]*R2_orbital[j]));\n        }\n    }\n\n\n    timer multiply_KLMN(world, \"multiplication in KLMN term\");\n    multiply_KLMN.interrupt();\n    timer inner_KLMN(world, \"inner in KLMN term\");\n    inner_KLMN.interrupt();\n    // prepare intermediates for terms K, L, M, N of Bartlett/Silver 1975\n    // tau_g_ij(1,2) = \\sum_k tau_ik(1,1') g_jk(2)\n    Pairs<ClusterFunction> tau_ik_g_kj, tau_kj_g_ki;\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = info.parameters.freeze(); j < nocc; ++j) {\n            multiply_KLMN.resume();\n            std::vector<CCPairFunction<double, 6>> tmp1, tmp2;\n            for (std::size_t k = info.parameters.freeze(); k < nocc; ++k) {\n                tmp1 += multiply(clusterfunctions(i, k), gij(k, j), {3, 4, 5});\n                tmp2 += multiply(clusterfunctions(k, j), gij(k, i), {3, 4, 5});\n            }\n            tmp1 = consolidate(tmp1, {});\n            tmp2 = consolidate(tmp2, {});\n            tau_ik_g_kj(i, j) = tmp1;\n            tau_kj_g_ki(i, j) = tmp2;\n            multiply_KLMN.interrupt();\n\n            inner_KLMN.resume();\n            double K = inner(clusterfunctions(i, j), tau_ik_g_kj(i, j), R2);\n            double L = inner(clusterfunctions(i, j), tau_kj_g_ki(i, j), R2);\n            double M = inner(clusterfunctions(j, i), tau_kj_g_ki(i, j), R2);\n            double N = inner(clusterfunctions(j, i), tau_ik_g_kj(i, j), R2);\n            inner_KLMN.interrupt();\n\n            double tmp = -4 * K - 4 * L + 2 * M + 2 * N;\n            printf(\"mp3 energy: term_KLMN with particle=1 %2ld %2ld %12.8f\\n\", i, j, tmp);\n            result += tmp;\n        }\n    }\n    printf(\"MP3 energy: term_KLMN (KLMN) %12.8f\\n\", result);\n    multiply_KLMN.print(\"multiplication in KLMN term\");\n    inner_KLMN.print(\"inner in KLMN term\");\n\n    return result;\n\n};\n\ndouble MP3::mp3_test(const Pairs<CCPair>& mp2pairs, const Pairs<std::vector<CCPairFunction<double,6>>> clusterfunctions, const Info& info) const {\n    print_header2(\"entering mp3 test\");\n    World& world=mp2pairs.allpairs.begin()->second.function().world();\n\n    auto R2 = info.R_square;\n    const std::size_t nocc=info.mo_ket.size();\n    std::vector<real_function_3d> nemo_orbital=info.mo_ket;\n    std::vector<real_function_3d> R2_orbital=info.mo_bra;\n    //    std::vector<real_function_3d> nemo_orbital=mo_ket().get_vecfunction();\n    std::vector<CCPairFunction<double,6>> ij;\n    std::size_t i=1, j=1;\n    ij.push_back(CCPairFunction<double,6>(nemo_orbital[i],nemo_orbital[j]));\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n    double eri=0.0;\n    for (std::size_t i=0; i<nocc; ++i) {\n        for (std::size_t j=0; j<nocc; ++j) {\n            std::vector<CCPairFunction<double, 6>> ii;\n            ii.push_back(CCPairFunction<double, 6>(nemo_orbital[i], nemo_orbital[j]));\n            double tmp = inner(ii, g12 * ii, R2);\n            print(\"eri for pair\", i,j, tmp);\n            eri += tmp;\n        }\n    }\n    print(\"total eri\",eri);\n\n    print(\"eri(1,1)\",eri);\n    double mp2_energy=inner(clusterfunctions(i,j),ij,R2);\n    print(\"mp2 energy for pair \", i, j, mp2_energy);\n\n    double mp3_contrib=inner(clusterfunctions(i,j),clusterfunctions(i,j),R2);\n    print(\"<tau_ij | tau_ij>\",mp3_contrib);\n\n    return 0.0;\n}\n\ndouble MP3::compute_mp3_cd(World& world,\n                           const long i, const long j,\n                           const Pairs<std::vector<CCPairFunction<double,6>>>& pair_square,\n                           const Info& info,\n                           // const std::vector<Function<double,3>>& mo_ket,\n                           // const std::vector<Function<double,3>>& mo_bra,\n                           // const CCParameters& parameters,\n                           // const Molecule& molecule,\n                           // const Function<double,3>& Rsquare,\n                           const std::vector<std::string>& argument) {\n\n    CCConvolutionOperator<double,3>::Parameters cparam(info.parameters);\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    auto bra = pair_square(i, j);\n    double tmp1 = inner(bra, g12 * pair_square(i, j), info.R_square);\n    double tmp2 = inner(bra, g12 * pair_square(j, i), info.R_square);\n    double fac = (i == j) ? 0.5 : 1.0;\n    double result = fac * (4.0 * tmp1 - 2.0 * tmp2);\n    constexpr std::size_t bufsize=256;\n    char buf[bufsize];\n    snprintf(buf,bufsize,\"mp3 energy: term_CD %2ld %2ld: %12.8f\\n\", i, j, result);\n    print(std::string(buf));\n    return result;\n}\n\ndouble MP3::compute_mp3_ef(World& world,\n                           const long i, const long j,\n                           const Pairs<std::vector<CCPairFunction<double,6>>>& pair_square,\n                           const Info& info,\n                           // const std::vector<Function<double,3>>& mo_ket,\n                           // const std::vector<Function<double,3>>& mo_bra,\n                           // const CCParameters& parameters,\n                           // const Molecule& molecule,\n                           // const Function<double,3>& Rsquare,\n                           const std::vector<std::string>& argument) {\n\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    std::size_t nfrozen=info.parameters.freeze();\n    std::size_t nocc=info.mo_ket.size();\n\n    /// <ij | kl >  = (ik | jl)\n    std::vector<permutation> all_tau_permutations;\n    std::vector<CCPairFunction<double,6>> tmp_tau;\n\n    long counter=0;\n    timer timer_prep(world);\n    // loop over all k and l\n    for (std::size_t k=nfrozen; k<nocc; ++k) {\n        for (std::size_t l=nfrozen; l<nocc; ++l) {\n            counter++;\n\n            // make all possible permutations of the 4 indices i,j,k,l\n            permutation p0(i,j,k,l);\n            auto perms=p0.make_all_tau_permutations();  // permutations are sorted\n            // continue only if this permutation is the canonical one\n            if (p0!=perms.front()) continue;\n            // for (const auto& p:perms) all_tau_permutations.push_back(p);\n            const double weight=perms.size();\n\n            // terms C+D = <tau_ij | tau_kl> (2*<ij|g|kl> - <ji|g|kl>)\n            //           = <tau_ij | tau_kl> (2*(ik|jl) - (jk|il))\n            const auto& ket_i=info.mo_ket[i];\n            const auto& ket_k=info.mo_ket[k];\n            const auto& ket_l=info.mo_ket[l];\n            const auto& bra_i=info.mo_bra[i];\n            const auto& bra_j=info.mo_bra[j];\n            const auto& bra_l=info.mo_bra[l];\n            double g_ikjl=inner(bra_i*ket_k, (*g12)(bra_j*ket_l));\n            double g_jkil=inner(bra_j*ket_k, (*g12)(bra_l*ket_i));\n            tmp_tau+=weight*(2.0* g_ikjl - g_jkil)*pair_square(k,l);\n\n            // save some memory\n            // if (counter%10) tmp_tau=consolidate(tmp_tau,{\"remove_lindep\"});\n        }\n    }\n    timer_prep.tag(\"preparing in EF term\");\n    tmp_tau=consolidate(tmp_tau,{\"remove_lindep\"});\n    timer_prep.tag(\"consolidation in EF term\");\n    timer timer_inner(world);\n    double result=inner(pair_square(i,j),tmp_tau,info.R_square);\n    timer_prep.tag(\"inner in EF term\");\n\n    constexpr std::size_t bufsize=256;\n    char buf[bufsize];\n    snprintf(buf, bufsize,\"mp3 energy: term_EF %2ld %2ld %12.8f\\n\",i,j,result);\n    print(std::string(buf));\n\n    // can't do sanity check, because we are working on a single pair\n//    int npermutations=all_tau_permutations.size();\n//    all_tau_permutations=permutation::remove_duplicates(all_tau_permutations);\n//    int nuniquepermutations=all_tau_permutations.size();\n//    int ntotalpermutations=std::pow(nocc-nfrozen,4);\n//    MADNESS_CHECK_THROW(npermutations==nuniquepermutations,\"incorrect number of unique permutations\");\n//    MADNESS_CHECK_THROW(npermutations==ntotalpermutations,\"incorrect number of unique permutations\");\n\n    return result;\n}\n\ndouble MP3::compute_mp3_ghij(World& world,\n                           const long i, const long jj,\n                           const Pairs<std::vector<CCPairFunction<double,6>>>& pair_square,\n                           const Info& info,\n                           // const std::vector<Function<double,3>>& mo_ket,\n                           // const std::vector<Function<double,3>>& mo_bra,\n                           // const CCParameters& parameters,\n                           // const Molecule& molecule,\n                           // const Function<double,3>& Rsquare,\n                           const std::vector<std::string>& argument) {\n\n    // this scales linearly, use only the diagaonal contributions\n    if (i!=jj) return 0.0;\n\n    print_header3(\"entering compute_mp3_ghij_fast\");\n\n    // prepare cluster functions\n    std::size_t nocc=info.mo_ket.size();\n    typedef std::vector<CCPairFunction<double,6>> ClusterFunction;\n    double result=0.0;\n\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    timer t2(world);\n\n    // compute intermediates for terms G, I, H, and J\n\n    // \\sum_j tau_ij(1,2) * phi_j(2)\n    ClusterFunction tau_kk_i;\n    // \\sum_j tau_ij(1,2) * phi_j(1)\n    ClusterFunction tau_ij_j;\n\n    for (std::size_t ii = info.parameters.freeze(); ii < nocc; ++ii) {\n        // for (std::size_t j = parameters.freeze(); j < nocc; ++j) {\n            auto tmp2 = multiply(pair_square(ii, i), info.mo_bra[ii], {0, 1, 2});\n            for (auto& t: tmp2) tau_kk_i.push_back(t);\n        // }\n    }\n\n    // for (std::size_t i = parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = info.parameters.freeze(); j < nocc; ++j) {\n            auto tmp3 = multiply(pair_square(i, j), info.mo_bra[j], {0, 1, 2});\n            for (auto& t: tmp3) tau_ij_j.push_back(t);\n        }\n    // }\n\n    std::vector<std::string> consolidation={\"op_pure_to_pure\",\"remove_lindep\",\"op_dec_to_dec\"};\n    // std::vector<std::string> consolidation={\"op_pure_to_pure\",\"remove_lindep\",\"op_dec_to_pure\"};\n    print(\"consolidating with \",consolidation);\n    ClusterFunction intermediate;\n    // for (std::size_t i = parameters.freeze(); i < nocc; ++i) {\n        intermediate=2.0*tau_kk_i;\n        intermediate-=tau_ij_j;\n        intermediate=consolidate(intermediate,consolidation,info.molecular_coordinates);\n    // }\n\n    t2.tag(\"GHIJ term prep\");\n\n    // terms G, I, H, J of Bartlett/Silver 1975\n    real_convolution_3d& g = *(g12->get_op());\n    g.set_particle(1);\n    // for (std::size_t i = parameters.freeze(); i < nocc; ++i) {\n        // tmp(1,2) = g(1,1') | tau_ij(1',2) j(2) >\n        timer t4(world, \"gtau\");\n        auto gintermediate = g(intermediate);\n        t4.tag(\"compute gintermediate\");\n        auto bra_intermediate = multiply(intermediate, info.R_square, {3, 4, 5});\n        t4.tag(\"multiply\");\n        double tmp = 2.0*inner(bra_intermediate, gintermediate);\n        constexpr std::size_t bufsize=256;\n        char buf[bufsize];\n        snprintf(buf, bufsize,\"mp3 energy: term_GHIJ  %2ld %12.8f\\n\", i, tmp);\n        print(std::string(buf));\n        t4.tag(\"inner\");\n        result += tmp;\n    // }\n    t2.tag(\"GHIJ term\");\n    return result;\n}\n\n\ndouble MP3::compute_mp3_klmn(World& world,\n                           const long i, const long j,\n                           const Pairs<std::vector<CCPairFunction<double,6>>>& pair_square,\n                           const Info& info,\n                           // const std::vector<Function<double,3>>& mo_ket,\n                           // const std::vector<Function<double,3>>& mo_bra,\n                           // const CCParameters& parameters,\n                           // const Molecule& molecule,\n                           // const Function<double,3>& Rsquare,\n                           const std::vector<std::string>& argument) {\n\n    print_header3(\"starting term KLMN with particles \"+std::to_string(i)+\" \"+std::to_string(j));\n    std::size_t nocc=info.mo_ket.size();\n\n    CCConvolutionOperator<double,3>::Parameters cparam;\n    auto g12=CCConvolutionOperatorPtr<double,3>(world,OpType::OT_G12,cparam);\n\n    // compute the term <i(1) |g(1,2) | j(1)>(2)\n    madness::Pairs<real_function_3d> gij;\n\n    for (std::size_t k = info.parameters.freeze(); k < nocc; ++k) {\n        for (std::size_t l = info.parameters.freeze(); l < nocc; ++l) {\n            gij.insert(k,l,(*g12)(info.mo_ket[k]*info.mo_bra[l]));\n        }\n    }\n\n\n    timer multiply_KLMN(world, \"multiplication in KLMN term\");\n    multiply_KLMN.interrupt();\n    timer inner_KLMN(world, \"inner in KLMN term\");\n    inner_KLMN.interrupt();\n\n    multiply_KLMN.resume();\n    std::vector<CCPairFunction<double, 6>> rhs;\n    for (std::size_t k = info.parameters.freeze(); k < nocc; ++k) {\n        // rhs += +2.0 * multiply(pair_square(j, k), gij(k, i), {0, 1, 2});   // M\n        // rhs += +2.0 * multiply(pair_square(k, i), gij(k, j), {0, 1, 2});    //  N\n        // rhs += -4.0 * multiply(pair_square(i, k), gij(k, j), {3, 4, 5});   // K\n        // rhs += -4.0 * multiply(pair_square(k, j), gij(k, i), {3, 4, 5});   // L\n        rhs += multiply(pair_square(k, j), gij(k, i), {0, 1, 2});\n        rhs += multiply(pair_square(k, j), gij(k, i), {3, 4, 5});\n    }\n    rhs = consolidate(rhs, {});\n\n    std::vector<CCPairFunction<double, 6>> lhs;\n    lhs+=2.0*pair_square(i,j);\n    lhs-= pair_square(j,i);\n    lhs=consolidate(lhs,{});\n    multiply_KLMN.interrupt();\n\n    inner_KLMN.resume();\n    // double result = inner(pair_square(i, j), rhs, Rsquare);\n    double result = -2.0*inner(lhs, rhs, info.R_square);\n    inner_KLMN.interrupt();\n\n    constexpr std::size_t bufsize=256;\n    char buf[bufsize];\n    snprintf(buf,bufsize,\"mp3 energy: term_KLMN %2ld %2ld %12.8f\\n\", i, j, result);\n    print(std::string(buf));\n\n    multiply_KLMN.print(\"multiplication in KLMN term with remove_lindep\");\n    inner_KLMN.print(\"inner in KLMN term\");\n\n    return result;\n}\n\ndouble MP3::mp3_energy_contribution(const Pairs<CCPair>& mp2pairs) const {\n\n    print_header2(\"computing the MP3 correlation energy\");\n    print(\"mp2pairs.size()\",mp2pairs.allpairs.size());\n\n    timer t2(world);\n    std::size_t nocc=info.mo_ket.size();\n    typedef std::vector<CCPairFunction<double,6>> ClusterFunction;\n    Pairs<ClusterFunction> clusterfunctions;\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = i; j < nocc; ++j) {\n            clusterfunctions(i,j)=mp2pairs(i,j).functions;\n            if (i!=j) {\n                for (const auto& t : clusterfunctions(i,j)) {\n                    clusterfunctions(j, i).push_back(t.swap_particles());\n                }\n            }\n        }\n    }\n\n    t2.tag(\"make cluster functions\");\n//    mp3_test(mp2pairs,clusterfunctions);\n    double term_CD=0.0, term_EF=0.0, term_GHIJ=0.0, term_KLMN=0.0;\n    term_CD=compute_mp3_cd(mp2pairs,info);\n    t2.tag(\"CD term\");\n\n    term_GHIJ=compute_mp3_ghij_fast(mp2pairs,clusterfunctions,info);\n    t2.tag(\"GHIJ term\");\n    term_KLMN=compute_mp3_klmn_fast(mp2pairs,info);\n    t2.tag(\"KLMN term fast\");\n    term_EF=compute_mp3_ef_with_permutational_symmetry(mp2pairs,info);\n    t2.tag(\"EF term, permutational symmetry\");\n\n    printf(\"term_CD    %12.8f\\n\",term_CD);\n    printf(\"term_GHIJ  %12.8f\\n\",term_GHIJ);\n    printf(\"term_KLMN  %12.8f\\n\",term_KLMN);\n    printf(\"term_EF    %12.8f\\n\",term_EF);\n    double mp3_energy=term_CD+term_GHIJ+term_KLMN+term_EF;\n    printf(\"MP3 energy contribution  %12.8f\\n\",mp3_energy);\n    return mp3_energy;\n}\n\ndouble MP3::mp3_energy_contribution_macrotask_driver(const Pairs<CCPair>& mp2pairs) const {\n\n    if (world.rank()==0) {\n        print_header2(\"computing the MP3 correlation energy, macrotask version\");\n        print(\"mp2pairs.size()\",mp2pairs.allpairs.size());\n    }\n\n    // compute all ij pairs\n    timer t2(world);\n    std::size_t nocc=info.mo_ket.size();\n    typedef std::vector<CCPairFunction<double,6>> ClusterFunction;\n    Pairs<ClusterFunction> clusterfunctions;\n    for (std::size_t i = info.parameters.freeze(); i < nocc; ++i) {\n        for (std::size_t j = i; j < nocc; ++j) {\n//            clusterfunctions(i,j)=mp2pairs(i,j).functions;\n            clusterfunctions(i,j)=CCPotentials::make_pair_mp2(world,mp2pairs(i,j).function(),i,j,info,true).functions;\n            if (i!=j) {\n                for (const auto& t : clusterfunctions(i,j)) {\n                    clusterfunctions(j, i).push_back(t.swap_particles());\n                }\n            }\n        }\n    }\n    // turn Pair into vector for cloud and stuff -- will be reversed later on\n    PairVectorMap square_map=PairVectorMap::quadratic_map(info.parameters.freeze(),info.mo_ket.size());\n    auto clusterfunc_vec=Pairs<std::vector<CCPairFunction<double,6>>>::pairs2vector(clusterfunctions,square_map);\n\n    t2.tag(\"make cluster functions\");\n\n    // create dummy scheduling vector of length npair=nocc*(nocc+1)/2, for the macrotask scheduler, triangular form\n    std::vector<int> ij_triangular(mp2pairs.allpairs.size());\n    // create dummy scheduling vector of length nact for the macrotask scheduler, square form\n    std::vector<int> nact(nocc-info.parameters.freeze());\n    std::vector<int> dummy;\n\n\n    // get mos\n    //const std::vector<real_function_3d>& ket=info.mo_ket;\n    //const std::vector<real_function_3d>& bra=info.mo_bra;\n\n    auto taskq=std::shared_ptr<MacroTaskQ>(new MacroTaskQ(MacroTaskQFactory(world)));\n    // taskq->set_printlevel(20);\n    // taskq->cloud.set_debug(true);\n    // MacroTaskMP3 task_triangular(\"triangular\");\n    // MacroTaskMP3 task_square(\"square\");\n    MacroTaskMP3 ghij_task(\"ghij\");\n    MacroTaskMP3 klmn_task(\"klmn\");\n    MacroTaskMP3 cd_task(\"cd\");\n    MacroTaskMP3 ef_task(\"ef\");\n    MacroTask macrotask_ghij(world,ghij_task,taskq);\n    MacroTask macrotask_klmn(world,klmn_task,taskq);\n    MacroTask macrotask_cd(world,cd_task,taskq);\n    MacroTask macrotask_ef(world,ef_task,taskq);\n    auto ghij_future=macrotask_ghij(ij_triangular, dummy, clusterfunc_vec,info, std::vector<std::string>());\n    auto klmn_future=macrotask_klmn(nact, nact, clusterfunc_vec, info, std::vector<std::string>());\n    auto cd_future=macrotask_cd(ij_triangular, dummy, clusterfunc_vec, info, std::vector<std::string>());\n    auto ef_future=macrotask_ef(ij_triangular, dummy, clusterfunc_vec, info, std::vector<std::string>());\n    taskq->print_taskq();\n    taskq->run_all();\n\n    double term_CD=cd_future.get();\n    double term_EF=ef_future.get();\n    double term_GHIJ=ghij_future.get();\n    double term_KLMN=klmn_future.get();\n    double mp3_energy=term_CD+term_GHIJ+term_KLMN+term_EF;\n    if (world.rank()==0) {\n        printf(\"term_CD    %12.8f\\n\",term_CD);\n        printf(\"term_GHIJ  %12.8f\\n\",term_GHIJ);\n        printf(\"term_KLMN  %12.8f\\n\",term_KLMN);\n        printf(\"term_EF    %12.8f\\n\",term_EF);\n        printf(\"MP3 energy contribution  %12.8f\\n\",mp3_energy);\n    }\n    return mp3_energy;\n    // return 0.0;\n}\n}\n"
  },
  {
    "path": "src/madness/chem/mp3.h",
    "content": "//\n// Created by Florian Bischoff on 2/15/24.\n//\n\n#ifndef MP3_H\n#define MP3_H\n\n\n#include <madness/mra/mra.h>\n#include<madness/mra/commandlineparser.h>\n#include<madness/chem/ccpairfunction.h>\n#include<madness/chem/CCStructures.h>\n#include<madness/chem/CCPotentials.h>\n#include<madness/mra/QCCalculationParametersBase.h>\n#include <algorithm>\n#include <iomanip>\n#include <iostream>\n#include <madness/mra/macrotaskq.h>\n\nnamespace madness {\nclass MP3 {\npublic:\n\n    // MP3(World& world, const std::shared_ptr<Nemo> nemo, const CCParameters& param) {}\n\n    MP3(World& world, const Info& info) : world(world), info(info) {}\n\n    double mp3_energy_contribution(const Pairs<CCPair>& mp2pairs) const;\n\n    /// compute the MP3 energy contribution, macrotask version\n    double mp3_energy_contribution_macrotask_driver(const Pairs<CCPair>& mp2pairs) const;\n\nprivate:\n    World& world;\n    const Info& info;\n\n    /// helper class for calculating the MP3 energy contributions\n    class MacroTaskMP3 : public MacroTaskOperationBase {\n\n        class Partitioner : public MacroTaskPartitioner {\n        public:\n            Partitioner(const std::string shape) {\n                min_batch_size=1;\n                max_batch_size=1;\n                if (shape==\"triangular\") dimension=1;\n                else if (shape==\"square\") dimension=2;\n                else {\n                    std::string msg = \"Unknown partitioning shape: \" + shape;\n                    MADNESS_EXCEPTION(msg.c_str(), 1);\n                }\n            };\n        };\n\n    public:\n        MacroTaskMP3(const std::string diagram) : diagram(diagram) {\n            name=\"MP3_\"+diagram;\n            std::string shape;\n            if (diagram==\"ghij\" or diagram==\"cd\" or diagram==\"ef\") shape=\"triangular\";\n            else if (diagram==\"klmn\") shape=\"square\";\n            else {\n                std::string msg = \"Unknown MP3 diagram: \" + diagram;\n                MADNESS_EXCEPTION(msg.c_str(), 1);\n            }\n            partitioner.reset(new Partitioner(shape));\n        }\n        std::string diagram=\"unknown\";\n\n        typedef std::tuple<\n                const std::vector<int>&,        // dummy vector of size npair or nocc for scheduling\n                const std::vector<int>&,        // dummy vector of size npair or nocc for scheduling\n                const std::vector<std::vector<CCPairFunction<double,6>>>& ,                 // all pairs ij\n                const Info&,\n                const std::vector<std::string>& > argtupleT;\n\n        using resultT =ScalarResult<double>;\n\n        resultT allocator(World& world, const argtupleT& argtuple) const {\n            return ScalarResult<double>(world);\n        }\n\n        resultT operator() (const std::vector<int>& ij_vec,                         // dummy vector of size npair or nocc\n                            const std::vector<int>& j_vec,                          // dummy vector of size 0 or nocc\n                            const std::vector<std::vector<CCPairFunction<double,6>>>& pair_square,                 // all pairs ij\n                            const Info& info,\n                            const std::vector<std::string>& argument) const {\n\n            // the partitioner will break the input vector of pairs into single pairs\n            MADNESS_CHECK(ij_vec.size()==1);\n            MADNESS_CHECK(batch.result.size()==1);\n\n            // nact=active occupied orbitals\n            const long nact=info.mo_ket.size()-info.parameters.freeze();\n            MADNESS_CHECK(pair_square.size()==nact*nact);\n\n            // loop over pairs i<j (triangular) or i,j (square)\n            bool is_triangular=(j_vec.size()==0);\n            if (is_triangular) MADNESS_CHECK(partitioner->dimension==1);\n\n            // determine the orbital indices i and j for the pair\n            int i=0, j=0;\n            if (is_triangular) {\n                // the batch index is the ij composite index [0,nact*(nact+1)-1]\n                const long ij=batch.result.begin;\n                // turn composite index ij into i and j, taking care of frozen orbitals\n                PairVectorMap tri_map=PairVectorMap::triangular_map(info.parameters.freeze(),info.mo_ket.size());\n                auto ij_to_i_and_j = [&tri_map](const int ij) { return tri_map.map[ij]; };\n                auto [ii,jj]=ij_to_i_and_j(ij);\n                i=ii;\n                j=jj;\n            } else {\n                MADNESS_CHECK(partitioner->dimension==2);\n                MADNESS_CHECK(j_vec.size()==ij_vec.size());\n                i=batch.input[0].begin+info.parameters.freeze();\n                j=batch.input[1].begin+info.parameters.freeze();\n            }\n            // print(\"i,j,parameters.freeze()=\",i,j,parameters.freeze());\n\n            // convert vector of vectors back to Pairs\n            PairVectorMap square_map=PairVectorMap::quadratic_map(info.parameters.freeze(),info.mo_ket.size());\n            auto clusterfunctions=Pairs<std::vector<CCPairFunction<double,6>>>::vector2pairs(pair_square,square_map);\n\n            double result=0.0;\n            World& world=info.R_square.world();\n            if (diagram==\"cd\")\n                result= MP3::compute_mp3_cd(world,i,j,clusterfunctions,info,argument);\n            else if (diagram==\"ef\")\n                result= MP3::compute_mp3_ef(world,i,j,clusterfunctions,info,argument);\n            else if (diagram==\"ghij\")\n                result= MP3::compute_mp3_ghij(world,i,j,clusterfunctions,info,argument);\n            else if (diagram==\"klmn\")\n                result= MP3::compute_mp3_klmn(world,i,j,clusterfunctions,info,argument);\n            else {\n                std::string msg = \"Unknown MP3 diagram: \" + diagram;\n                MADNESS_EXCEPTION(msg.c_str(), 1);\n            }\n            auto result1=ScalarResult<double>(world);\n            result1=result;\n            return result1;\n\n        };\n\n\n    };\n\n\n    double compute_mp3_cd(const Pairs<CCPair>& mp2pairs, const Info& info) const;\n    double compute_mp3_ef(const Pairs<CCPair>& mp2pairs, const Info& info) const;\n    double compute_mp3_ef_with_permutational_symmetry(const Pairs<CCPair>& mp2pairs, const Info& info) const;\n    double compute_mp3_ef_low_scaling(const Pairs<CCPair>& mp2pairs, const Pairs<std::vector<CCPairFunction<double,6>>> clusterfunctions, const Info& info) const;\n    double compute_mp3_ef_as_overlap(const Pairs<CCPair>& mp2pairs, const Pairs<std::vector<CCPairFunction<double,6>>> clusterfunctions, const Info& info) const;\n    double compute_mp3_ghij(const Pairs<CCPair>& mp2pairs, const Pairs<std::vector<CCPairFunction<double,6>>> clusterfunctions, const Info& info) const;\n    double compute_mp3_ghij_fast(const Pairs<CCPair>& mp2pairs, const Pairs<std::vector<CCPairFunction<double,6>>> clusterfunctions, const Info& info) const;\n    double compute_mp3_klmn(const Pairs<CCPair>& mp2pairs, const Info& info) const;\n    double compute_mp3_klmn_fast(const Pairs<CCPair>& mp2pairs, const Info& info) const;\n    double mp3_test(const Pairs<CCPair>& mp2pairs, const Pairs<std::vector<CCPairFunction<double,6>>> clusterfunctions, const Info& info) const;\n\n    /// compute the cd term for single pair ij\n    static double compute_mp3_cd(World& world,\n                                 const long i, const long j,\n                                 const Pairs<std::vector<CCPairFunction<double,6>>>& pair_square,\n                                 const Info& info,\n                                 const std::vector<std::string>& argument);\n\n    /// compute the ef term for single pair ij\n    static double compute_mp3_ef(World& world,\n                                 const long i, const long j,\n                                 const Pairs<std::vector<CCPairFunction<double,6>>>& pair_square,\n                                 const Info& info,\n                                 const std::vector<std::string>& argument);\n\n    /// compute the ghij term for single pair ij\n    ///\n    /// the term actually scales linearly with the number of occupied orbitals i, so for all i!=j return zero\n    static double compute_mp3_ghij(World& world,\n                                   const long i, const long j,\n                                   const Pairs<std::vector<CCPairFunction<double,6>>>& pair_square,\n                                   const Info& info,\n                                   const std::vector<std::string>& argument);\n\n    /// compute the klmn term for single pair ij\n    static double compute_mp3_klmn(World& world,\n                                   const long i, const long j,\n                                   const Pairs<std::vector<CCPairFunction<double,6>>>& pair_square,\n                                   const Info& info,\n                                   const std::vector<std::string>& argument);\n\n};\n}\n\n\n#endif //MP3_H\n"
  },
  {
    "path": "src/madness/chem/nemo.cc",
    "content": "/*\n This file is part of MADNESS.\n\n Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n For more information please contact:\n\n Robert J. Harrison\n Oak Ridge National Laboratory\n One Bethel Valley Road\n P.O. Box 2008, MS-6367\n\n email: harrisonrj@ornl.gov\n tel:   865-241-3937\n fax:   865-572-0680\n*/\n\n/*!\n \\file examples/nemo.cc\n \\brief solve the HF equations using numerical exponential MOs\n\n The source is\n <a href=http://code.google.com/p/m-a-d-n-e-s-s/source/browse/local\n /trunk/src/apps/examples/nemo.h>here</a>.\n\n */\n\n#include<madness/chem/nemo.h>\n#include<madness/chem/projector.h>\n#include<madness/chem/molecular_optimizer.h>\n#include<madness/chem/SCFOperators.h>\n#include<madness/chem/Results.h>\n#include <madness/constants.h>\n#include<madness/chem/vibanal.h>\n#include<madness/chem/pcm.h>\n#include<madness/chem/pointgroupsymmetry.h>\n#include<madness/chem/BSHApply.h>\n#include<madness/chem/localizer.h>\n#include <madness/mra/macrotaskq.h>\n#include <madness/mra/memory_measurement.h>\n\n\nusing namespace madchem;\nnamespace madness {\n\nstruct dens_inv{\n\n    void operator()(const Key<3>& key, Tensor<double>& U, const Tensor<double>& t,\n            const Tensor<double>& inv) const {\n//        real_tensor U,\n//        const real_tensor& rho) const {\nITERATOR(U,\n     double d = t(IND);\n     double p = inv(IND);\n         U(IND) = d/p;\n     );\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n\n};\n\n\nclass atomic_attraction : public FunctionFunctorInterface<double,3> {\n    const Molecule& molecule;\n    const size_t iatom;\npublic:\n    atomic_attraction(const Molecule& mol, const size_t iatom1)\n        : molecule(mol), iatom(iatom1) {}\n\n    double operator()(const coord_3d& xyz) const {\n        return -molecule.atomic_attraction_potential(iatom, xyz[0], xyz[1], xyz[2]);\n    }\n\n    std::vector<coord_3d> special_points() const {\n        return molecule.get_all_coords_vec();\n    }\n};\n\n\n/// compute the nuclear gradients\nTensor<double> NemoBase::compute_gradient(const real_function_3d& rhonemo, const Molecule& molecule) const {\n\n    // the following block computes the gradients more precisely than the\n    // direct evaluation of the derivative of the nuclear potential\n    vecfuncT bra(3);\n    for (int axis=0; axis<3; ++axis) {\n\n        // compute \\frac{\\partial \\rho}{\\partial x_i}\n        real_derivative_3d D = free_space_derivative<double, 3>(world,axis);\n        const real_function_3d Drhonemo=D(rhonemo);\n\n        // compute the second term of the bra\n        const real_function_3d tmp=2.0*rhonemo*ncf->U1(axis);\n        bra[axis]=(Drhonemo-tmp);\n    }\n\n    Tensor<double> grad(3*molecule.natom());\n\n    // linearly scaling code\n    bra=bra*R_square;\n    compress(world,bra);\n    for (size_t iatom=0; iatom<molecule.natom(); ++iatom) {\n        atomic_attraction aa(molecule,iatom);\n        for (int iaxis=0; iaxis<3; iaxis++) {\n            grad(3*iatom + iaxis)=-inner(bra[iaxis],aa);\n        }\n    }\n\n    // add the nuclear contribution\n    for (size_t atom = 0; atom < molecule.natom(); ++atom) {\n        for (int axis = 0; axis < 3; ++axis) {\n            grad[atom * 3 + axis] +=\n                    molecule.nuclear_repulsion_derivative(atom,axis);\n        }\n    }\n    return grad;\n}\n\n\nNemo::Nemo(World& world, const commandlineparser &parser) :\n        NemoBase(world),\n        calc(std::make_shared<SCF>(world, parser)),\n        nemo_param(world,parser),\n        coords_sum(-1.0),\n        ac(world,calc) {\n\n    if (do_pcm()) pcm=PCM(world,this->molecule(),get_calc_param().pcm_data(),true);\n    symmetry_projector=projector_irrep(get_calc_param().pointgroup())\n            .set_ordering(\"keep\").set_verbosity(0).set_orthonormalize_irreps(true);;\n    if (symmetry_projector.get_verbosity()>1) symmetry_projector.print_character_table();\n};\n\nNemo::Nemo(World& world, const CalculationParameters& param, const NemoCalculationParameters& nemo_param,\n    const Molecule& molecule) :\n        NemoBase(world),\n        calc(std::make_shared<SCF>(world, param, molecule)),\n        nemo_param(nemo_param),\n        coords_sum(-1.0),\n        ac(world,calc) {\n\n    if (do_pcm()) pcm=PCM(world,this->molecule(),get_calc_param().pcm_data(),true);\n    symmetry_projector=projector_irrep(get_calc_param().pointgroup())\n            .set_ordering(\"keep\").set_verbosity(0).set_orthonormalize_irreps(true);;\n    if (symmetry_projector.get_verbosity()>1) symmetry_projector.print_character_table();\n};\n\ndouble Nemo::value(const Tensor<double>& x) {\n\n    // fast return if the reference is already solved at this geometry\n    if (check_converged(x)) return calc->current_energy;\n\tdouble xsq = x.sumsq();\n\n    if (world.rank()==0) print_header2(\"computing the nemo wave function\");\n\n    if ((xsq-calc->molecule.get_all_coords()).normf()>1.e-12) invalidate_factors_and_potentials();\n\n    calc->molecule.set_all_coords(x.reshape(calc->molecule.natom(), 3));\n\tcoords_sum = xsq;\n\n\tSCFProtocol p(world,get_calc_param());\n\n\t// read (pre-) converged wave function from disk if there is one\n\tif (get_calc_param().no_compute() or get_calc_param().restart()) {\n\t    set_protocol(get_calc_param().econv());\t// set thresh to current value\n        if (world.rank()==0 and get_calc_param().print_level()>2) print(\"reading orbitals from disk\");\n\t    calc->load_mos(world);\n        if (world.rank()==0 and get_calc_param().print_level()>2) {\n            print(\"orbitals are converged to \",calc->converged_for_thresh);\n        }\n        p.start_prec=calc->converged_for_thresh;\n\n\t    calc->ao=calc->project_ao_basis(world,calc->aobasis);\n\n\t} else {\t\t// we need a guess\n\n\t\tFunctionDefaults<3>::set_thresh(p.start_prec);\n\t\tset_protocol(p.start_prec);\t// set thresh to initial value\n\n\t    calc->ao=calc->project_ao_basis(world,calc->aobasis);\n\n\t    if (not (calc->converged_for_thresh*0.999<p.end_prec)) {\n\t        // if the orbitals are not converged to the end precision, we need to recompute the ncf\n\t        calc->initial_guess(world);\n\t        real_function_3d R_inverse = ncf->inverse();\n\t        calc->amo = R_inverse*calc->amo;\n\t        truncate(world,calc->amo);\n\t    }\n\n\t}\n\n    bool skip_solve=(get_calc_param().no_compute()) or (calc->converged_for_thresh*0.9999<p.end_prec);\n    if (skip_solve) {\n        if (world.rank()==0) {\n            print(\"skipping the solution of the SCF equations:\");\n            if (get_calc_param().no_compute()) print(\" -> the option no_compute =1\");\n            if (calc->converged_for_thresh*0.9999<p.end_prec) print(\" -> orbitals are converged to the required threshold of\",p.end_prec);\n        }\n\n    } else {\n\n\t\tfor (p.initialize() ; not p.finished(); ++p) {\n\n\t\t\tset_protocol(p.current_prec);\n\t\t\tcalc->current_energy=solve(p);\n\n\t\t}\n    }\n\n\n    // save the converged orbitals and nemos\n    for (std::size_t imo = 0; imo < calc->amo.size(); ++imo) {\n        save(calc->amo[imo], \"nemo\" + stringify(imo));\n    }\n\n\t// compute the dipole moment\n\tconst real_function_3d rhonemo=2.0*make_density(calc->aocc, calc->amo);\n\tconst real_function_3d rho = (R_square*rhonemo);\n\tsave(rho,\"rho\");\n\tsave(rhonemo,\"rhonemo\");\n\tTensor<double> dipole=calc->dipole(world,rho);\n\n\tif(world.rank()==0) std::cout << \"Nemo Orbital Energies: \" << calc->aeps << \"\\n\";\n\n    calc->output_calc_info_schema();\n\n    if (world.rank()==0) print_header2(\"end computing the nemo wave function\");\n    return calc->current_energy;\n}\n\nnlohmann::json Nemo::analyze() const {\n\n    timer t(world);;\n    // compute the density\n    const real_function_3d rhonemo = 2.0 * make_density(calc->aocc, calc->amo);\n    const real_function_3d rho = (R_square * rhonemo);\n\n    // compute the dipole moment\n    Tensor<double> dipole = calc->dipole(world, rho);\n\n    // compute the gradient\n    Tensor<double> grad = compute_gradient(rhonemo,molecule());\n\n    PropertyResults pr;\n    pr.energy = calc->current_energy;\n    pr.dipole = dipole;\n    pr.gradient = grad;\n\n    t.end(\"Nemo::analyze\");\n\n    return pr.to_json();\n}\n\n/// localize the nemo orbitals according to Pipek-Mezey or Foster-Boys\nvecfuncT Nemo::localize(const vecfuncT& nemo, const double dconv, const bool randomize) const {\n\n    Localizer localizer(world, get_calc()->aobasis, molecule(), get_calc()->ao);\n    localizer.set_metric(ncf->function()).set_method(calc->param.localize_method());\n\n    MolecularOrbitals<double, 3> mo(nemo, calc->aeps, {}, calc->aocc, calc->aset);\n    Tensor<double> UT = localizer.compute_localization_matrix(world, mo, randomize);\n\n    vecfuncT localnemo = transform(world, nemo, transpose(UT));\n    truncate(world, localnemo);\n    normalize(localnemo, R);\n    return localnemo;\n}\n\nstd::shared_ptr<Fock<double, 3>> Nemo::make_fock_operator() const {\n    MADNESS_CHECK(get_calc_param().spin_restricted());\n    const int ispin = 0;\n\n    std::shared_ptr<Fock<double,3> > fock(new Fock<double,3>(world));\n    Coulomb<double,3> J(world,this);\n    fock->add_operator(\"J\",std::make_shared<Coulomb<double,3> >(J));\n    fock->add_operator(\"V\",std::make_shared<Nuclear<double,3> >(world,this));\n    fock->add_operator(\"T\",std::make_shared<Kinetic<double,3> >(world));\n    if (calc->xc.hf_exchange_coefficient()>0.0) {\n        Exchange<double,3> K=Exchange<double,3>(world,this,ispin).set_symmetric(false);\n        fock->add_operator(\"K\",{-1.0,std::make_shared<Exchange<double,3>>(K)});\n    }\n    if (calc->xc.is_dft()) {\n        XCOperator<double,3> xcoperator(world,this,ispin);\n        real_function_3d xc_pot = xcoperator.make_xc_potential();\n\n        // compute the asymptotic correction of exchange-correlation potential\n        if(do_ac()) {\n            std::cout << \"Computing asymtotic correction!\\n\";\n            double charge = double(molecule().total_nuclear_charge())-get_calc_param().charge();\n            real_function_3d scaledJ = -1.0/charge*J.potential()*(1.0-calc->xc.hf_exchange_coefficient());\n            xc_pot = ac.apply(xc_pot, scaledJ);\n        }\n        LocalPotentialOperator<double,3> xcpot(world);\n        xcpot.set_potential(xc_pot);\n        xcpot.set_info(\"xc potential\");\n        if (do_ac()) xcpot.set_info(\"xc potential with ac\");\n        fock->add_operator(\"Vxc\",std::make_shared<LocalPotentialOperator<double,3>>(xcpot));\n    }\n\n\n    // compute the solvent (PCM) contribution to the potential\n    if (do_pcm()) {\n        const real_function_3d vpcm = pcm.compute_pcm_potential(J.potential());\n        LocalPotentialOperator<double,3> pcmpot(world);\n        pcmpot.set_potential(vpcm);\n        pcmpot.set_info(\"pcm potential\");\n        fock->add_operator(\"Vpcm\",std::make_shared<LocalPotentialOperator<double,3>>(pcmpot));\n    }\n    return fock;\n}\n\n/// compute the Fock matrix from scratch\ntensorT Nemo::compute_fock_matrix(const vecfuncT& nemo, const tensorT& occ) const {\n\t// apply all potentials (J, K, Vnuc) on the nemos\n\tvecfuncT Jnemo, Knemo, xcnemo, pcmnemo, JKVpsi, Unemo;\n\n    vecfuncT R2nemo=mul(world,R_square,nemo);\n    truncate(world,R2nemo);\n\n    // compute potentials the Fock matrix: J - K + Vnuc\n\tcompute_nemo_potentials(nemo, Jnemo, Knemo, xcnemo, pcmnemo, Unemo);\n\n//    vecfuncT JKUpsi=add(world, sub(world, Jnemo, Knemo), Unemo);\n    vecfuncT JKUpsi=Unemo+Jnemo-Knemo;\n    if (do_pcm()) JKUpsi+=pcmnemo;\n    if (calc->xc.is_dft()) JKUpsi+=xcnemo;\n    tensorT fock=matrix_inner(world,R2nemo,JKUpsi,false);   // not symmetric actually\n    Kinetic<double,3> T(world);\n    fock+=T(R2nemo,nemo);\n    JKUpsi.clear();\n\n\treturn 0.5*(fock+transpose(fock));\n}\n\n/// solve the HF equations\ndouble Nemo::solve(const SCFProtocol& proto) {\n\n\t// guess has already been performed in value()\n\tvecfuncT& nemo = calc->amo;\n\t//long nmo = nemo.size();\n\n\t// NOTE that nemos are somewhat sensitive to sparse operations (why??)\n\t// Therefore set all tolerance thresholds to zero, also in the mul_sparse\n\n\t// apply all potentials (J, K, Vnuc) on the nemos\n\tvecfuncT Jnemo, Knemo, xcnemo, pcmnemo, Unemo;\n\n\tstd::vector<double> energies(1,0.0);\t// contains the total energy and all its contributions\n\tdouble energy=0.0;\n\tbool converged = false;\n\tbool localized=get_calc_param().do_localize();\n\treal_function_3d density=real_factory_3d(world); \t// for testing convergence\n\n    auto solver= nonlinear_vector_solver<double,3>(world,nemo.size());\n\n\t// iterate the residual equations\n\tfor (int iter = 0; iter < get_calc_param().maxiter(); ++iter) {\n\n\t    if (localized) nemo=localize(nemo,proto.dconv,iter==0);\n\t    std::vector<std::string> str_irreps;\n\t    if (do_symmetry()) nemo=symmetry_projector(nemo,R_square,str_irreps);\n\t    if (world.rank()==0 and get_calc_param().print_level()>9) print(\"orbital irreps\",str_irreps);\n\t    vecfuncT R2nemo=mul(world,R_square,nemo);\n\t    truncate(world,R2nemo);\n        if (iter==0) solver.initialize(nemo);\n\n\t\t// compute potentials the Fock matrix: J - K + Vnuc\n\t\tcompute_nemo_potentials(nemo, Jnemo, Knemo, xcnemo, pcmnemo, Unemo);\n\n\t\t// compute the energy\n\t\tstd::vector<double> oldenergies=energies;\n\t\tenergies = compute_energy_regularized(nemo, Jnemo, Knemo, Unemo);\n        energy=energies[0];\n\n\t\t// compute the fock matrix\n        timer t_fock(world,get_calc_param().print_level()>2);\n\t\tvecfuncT Vnemo=Unemo+Jnemo-Knemo;\n\t\tif (do_pcm()) Vnemo+=pcmnemo;\n        if (calc->xc.is_dft()) Vnemo+=xcnemo;\n\t\ttensorT fock=matrix_inner(world,R2nemo,Vnemo,false);   // not symmetric actually\n\t\tKinetic<double,3> T(world);\n\t\tfock+=T(R2nemo,nemo);\n\t\tt_fock.end(\"compute fock matrix\");\n\n\n        // Diagonalize the Fock matrix to get the eigenvalues and eigenvectors\n        if (not localized) {\n            timer t(world,get_calc_param().print_level()>2);\n    \t\t// report the off-diagonal fock matrix elements\n            tensorT fock_offdiag=copy(fock);\n            for (int i=0; i<fock.dim(0); ++i) fock_offdiag(i,i)=0.0;\n            double max_fock_offidag=fock_offdiag.absmax();\n            if (world.rank()==0 and get_calc_param().print_level()>3) print(\"F max off-diagonal  \",max_fock_offidag);\n\n            // canonicalize the orbitals, rotate subspace and potentials\n            tensorT overlap = matrix_inner(world, R2nemo, nemo, true);\n            tensorT U=calc->get_fock_transformation(world,overlap,\n                    fock,calc->aeps,calc->aocc,FunctionDefaults<3>::get_thresh());\n\n            nemo = transform(world, nemo, U, trantol(), true);\n            Vnemo = transform(world, Vnemo, U, trantol(), true);\n            // rotate_subspace(world, U, solver, 0, nemo.size());\n\n            truncate(world, nemo);\n            normalize(nemo,R);\n            t.end(\"canonicalize orbitals\");\n\n        } else {\n        \t// if localized the orbital energies are the diagonal fock matrix elements\n        \tfor (int i=0; i<calc->aeps.size(); ++i) calc->aeps[i]=fock(i,i);\n        }\n\n        timer t_bsh(world,get_calc_param().print_level()>2);\n\t\tBSHApply<double,3> bsh_apply(world);\n\t\tbsh_apply.metric=R_square;\n\t\tbsh_apply.ret_value=BSHApply<double,3>::update;\n\t\tbsh_apply.lo=get_calc()->param.lo();\n\t\tbsh_apply.levelshift=get_calc_param().orbitalshift();\n\t\tauto [update,eps_update] =bsh_apply(nemo,fock,Vnemo);\n\t    auto residual=nemo-update;\n\t\tt_bsh.tag(\"BSH apply\");\n\n\t\tconst double bsh_norm = norm2(world, residual) / sqrt(nemo.size());\n\n\t\t// vecfuncT nemo_new = truncate(solver.update(nemo, residual));\n\t\tvecfuncT nemo_new = truncate(solver.update(update));\n        t_bsh.tag(\"solver.update\");\n\t\tnormalize(nemo_new,R);\n\n\t\tcalc->do_step_restriction(world,nemo,nemo_new,\"ab spin case\");\n\t\torthonormalize(nemo_new,R);\n\t\tnemo=nemo_new;\n\n\t\treal_function_3d olddensity=density;\n\t\tdensity=R_square*compute_density(nemo);\n\t\tdouble deltadens=(density-olddensity).norm2();\n\t\tconverged=check_convergence(energies,oldenergies,bsh_norm,deltadens,get_calc_param(),\n\t\t\t\tproto.econv,proto.dconv);\n\n\t\tif (get_calc_param().save()) calc->save_mos(world);\n        t_bsh.tag(\"orbital update\");\n\n\t\tif (world.rank() == 0 and get_calc_param().print_level()>1) {\n\t\t\tprintf(\"finished iteration %2d at time %8.1fs with energy  %12.8f\\n\",\n\t\t\t\t\titer, wall_time(), energy);\n\t\t}\n\n\t\tif (converged) break;\n\t}\n\n\tif (converged) {\n\t\tif (world.rank()==0) print(\"\\nIterations converged\\n\");\n        calc->converged_for_thresh=get_calc_param().econv();\n        calc->converged_for_dconv=get_calc_param().dconv();\n        if (get_calc_param().save()) calc->save_mos(world);\n    } else {\n\t\tif (world.rank()==0) print(\"\\nIterations failed\\n\");\n\t\tenergy = 0.0;\n\t}\n\n\treturn energy;\n}\n\n/// given nemos, compute the HF energy using the regularized expressions for T and V\nstd::vector<double> Nemo::compute_energy_regularized(const vecfuncT& nemo, const vecfuncT& Jnemo,\n        const vecfuncT& Knemo, const vecfuncT& Unemo) const {\n    timer t(world,get_calc_param().print_level()>2);\n\n    vecfuncT R2nemo=R_square*nemo;\n    truncate(world,R2nemo);\n\n    const tensorT U = inner(world, R2nemo, Unemo);\n    const double pe = 2.0 * U.sum();  // closed shell\n\n//    real_function_3d dens=dot(world,nemo,nemo)*R_square;\n//    double pe1=2.0*inner(dens,calc->potentialmanager->vnuclear());\n\n    // compute \\sum_i <F_i | R^2 T | F_i>\n    double ke = 0.0;\n    for (int axis = 0; axis < 3; axis++) {\n        real_derivative_3d D = free_space_derivative<double, 3>(world, axis);\n        const vecfuncT dnemo = apply(world, D, nemo);\n        const vecfuncT dr2nemo = apply(world, D, R2nemo);\n        ke += 0.5 * (inner(world, dnemo, dr2nemo)).sum();\n    }\n    ke *= 2.0; // closed shell\n\n\n    double ke0=compute_kinetic_energy(nemo);\n//    double ke1=compute_kinetic_energy1(nemo);\n//    double ke2=compute_kinetic_energy2(nemo);\n\n    const double J = inner(world, R2nemo, Jnemo).sum();\n    double K = inner(world, R2nemo, Knemo).sum();\n\n    int ispin=0;\n    double exc=0.0;\n    if (calc->xc.is_dft()) {\n        XCOperator<double,3> xcoperator(world,this,ispin);\n        exc=xcoperator.compute_xc_energy();\n    }\n\n    double pcm_energy=0.0;\n    if (do_pcm()) pcm_energy=pcm.compute_pcm_energy();\n    const double nucrep = calc->molecule.nuclear_repulsion_energy();\n\n    double energy = ke + J - K + exc + pe + nucrep + pcm_energy;\n\n    if (world.rank() == 0 and get_calc_param().print_level()>2) {\n        printf(\"\\n  nuclear and kinetic %16.8f\\n\", ke + pe);\n        printf(\"         kinetic only %16.8f\\n\",  ke0);\n//        printf(\"\\n  kinetic only  %16.8f\\n\",  ke2);\n//        printf(\"\\n  kinetic plain %16.8f\\n\",  ke3);\n//        printf(\"\\n  nuclear only  %16.8f\\n\",  pe1);\n//        printf(\"\\n  nuclear and kinetic each  %16.8f\\n\",  pe1+ke1);\n        printf(\"              coulomb %16.8f\\n\", J);\n        if (is_dft()) printf(\" exchange-correlation %16.8f\\n\", exc);\n        if (calc->xc.hf_exchange_coefficient()!=0.0) printf(\"       exact exchange %16.8f\\n\", -K);\n        if (do_pcm()) printf(\"   polarization (PCM) %16.8f\\n\", pcm_energy);\n        printf(\"    nuclear-repulsion %16.8f\\n\", nucrep);\n        printf(\"   regularized energy %16.8f\\n\", energy);\n    }\n    t.end( \"compute energy\");\n\n    return std::vector<double>{energy,ke0,ke+pe,J,exc,-K,pcm_energy,nucrep};\n}\n\n/// compute the reconstructed orbitals, and all potentials applied on nemo\n\n/// to use these potentials in the fock matrix computation they must\n/// be multiplied by the nuclear correlation factor\n/// @param[in]\tnemo\tthe nemo orbitals\n/// @param[out]\tpsi\t\tthe reconstructed, full orbitals\n/// @param[out]\tJnemo\tCoulomb operator applied on the nemos\n/// @param[out]\tKnemo\texchange operator applied on the nemos\n/// @param[out]\tVnemo\tnuclear potential applied on the nemos\n/// @param[out]\tUnemo\tregularized nuclear potential applied on the nemos\nvoid Nemo::compute_nemo_potentials(const vecfuncT& nemo,\n\t\tvecfuncT& Jnemo, vecfuncT& Knemo, vecfuncT& xcnemo, vecfuncT& pcmnemo,\n\t\tvecfuncT& Unemo) const {\n\n    {\n        timer t(world,get_calc_param().print_level()>2);\n        real_function_3d vcoul;\n        int ispin = 0;\n        auto taskq = std::shared_ptr<MacroTaskQ>(new MacroTaskQ(MacroTaskQFactory(world)));\n        taskq->set_printlevel(get_calc_param().print_level());\n        // taskq->cloud.set_debug(true);\n        if (world.rank()==0 and get_calc_param().print_level()>4) print(taskq->get_policy());\n\n\n\n        Coulomb<double, 3> J = Coulomb<double, 3>(world, this).set_taskq(taskq);\n        {\n            t.tag(\"initialize Coulomb operator\");\n\n            // compute the density and the coulomb potential\n            Jnemo = J(nemo);\n            // compute the exchange potential\n            int ispin = 0;\n            Knemo = zero_functions_compressed<double, 3>(world, nemo.size());\n            // construction must happen outside the if-block to avoid pointers to arguments going out of scope in the macrotaskq\n            Exchange<double, 3> K = Exchange<double, 3>(world, this, ispin).set_symmetric(true).set_taskq(taskq);\n\t        K.set_algorithm(Exchange<double,3>::ExchangeAlgorithm::multiworld_efficient_row);\n            if (calc->xc.hf_exchange_coefficient() > 0.0) Knemo = K(nemo);\n\n            t.tag(\"initialize K operator\");\n            // taskq->set_printlevel(get_calc_param().print_level());\n            if (get_calc_param().print_level()>9) taskq->print_taskq();\n            taskq->run_all();\n\n            t.tag(\"compute Knemo\");\n            scale(world, Knemo, calc->xc.hf_exchange_coefficient());\n            truncate(world, Knemo);\n        }\n\n        // compute the exchange-correlation potential\n        if (calc->xc.is_dft()) {\n            XCOperator<double, 3> xcoperator(world, this, ispin);\n            //double exc = 0.0;\n            //if (ispin == 0) exc = xcoperator.compute_xc_energy();\n            real_function_3d xc_pot = xcoperator.make_xc_potential();\n\n            // compute the asymptotic correction of exchange-correlation potential\n            if (do_ac()) {\n                std::cout << \"Computing asymtotic correction!\\n\";\n                double charge = double(molecule().total_nuclear_charge()) - get_calc_param().charge();\n                real_function_3d scaledJ = -1.0 / charge * J.potential() * (1.0 - calc->xc.hf_exchange_coefficient());\n                xc_pot = ac.apply(xc_pot, scaledJ);\n            }\n\n            xcnemo=truncate(xc_pot*nemo);\n            t.tag(\"compute XCnemo\");\n        }\n\n\n        // compute the solvent (PCM) contribution to the potential\n        if (do_pcm()) {\n            const real_function_3d vpcm = pcm.compute_pcm_potential(J.potential());\n            pcmnemo = vpcm * nemo;\n            double size = get_size(world, pcmnemo);\n            t.tag(\"compute PCMnemo \" + stringify(size));\n        }\n\n        Nuclear<double, 3> Unuc(world, this->ncf);\n        Unemo = Unuc(nemo);\n        double size1 = get_size(world, Unemo);\n        t.tag(\"compute Unemo \" + stringify(size1));\n    }\n    world.gop.fence();\n\n}\n\n\n\n/// return the Coulomb potential\nreal_function_3d Nemo::get_coulomb_potential(const vecfuncT& psi) const {\n\tMADNESS_ASSERT(get_calc_param().spin_restricted());\n\tfunctionT rho = make_density(calc->aocc, psi).scale(2.0);\n\treturn calc->make_coulomb_potential(rho);\n}\n\nreal_function_3d Nemo::make_density(const Tensor<double>& occ,\n        const vecfuncT& nemo) const {\n    return calc->make_density(world,occ,nemo);\n}\n\nreal_function_3d Nemo::make_density(const tensorT & occ,\n        const vecfuncT& bra, const vecfuncT& ket, const bool do_refine) const {\n\n    // density may be twice as precise as the orbitals, if you refine\n    if (do_refine) {\n        refine(world,bra,false);\n        if (&bra!=&ket) refine(world,ket,true);\n    }\n\n    vecfuncT vsq = mul(world, bra, ket);\n    compress(world, vsq);\n    functionT rho = factoryT(world).compressed();\n    for (unsigned int i = 0; i < vsq.size(); ++i) {\n        if (calc->get_aocc()[i])\n            rho.gaxpy(1.0, vsq[i], calc->get_aocc()[i], false);\n    }\n    world.gop.fence();\n    return rho;\n}\n\n\nreal_function_3d Nemo::make_ddensity(const real_function_3d& rhonemo,\n        const int axis) const {\n\n    // 2 RXR * rhonemo\n    NuclearCorrelationFactor::U1_functor U1_func(ncf.get(),axis);\n    real_function_3d RXR=real_factory_3d(world).functor(U1_func).truncate_on_project();\n    real_function_3d term1=-2.0*RXR*rhonemo;\n\n    // R^2 * \\nabla \\rho\n    real_derivative_3d D = free_space_derivative<double, 3>(world,axis);\n    real_function_3d rhonemo_copy=copy(rhonemo).refine();\n    real_function_3d Drhonemo=D(rhonemo_copy);\n    return R_square*(term1+Drhonemo);\n}\n\n\nreal_function_3d Nemo::make_laplacian_density(const real_function_3d& rhonemo) const {\n\n    // U1^2 operator\n    NuclearCorrelationFactor::U1_dot_U1_functor u1_dot_u1(ncf.get());\n    const real_function_3d U1dot=real_factory_3d(world).functor(u1_dot_u1).truncate_on_project();\n\n    real_function_3d result=(2.0*U1dot*rhonemo).truncate();\n\n    // U2 operator\n    const Nuclear<double,3> U_op(world,this->ncf);\n    const Nuclear<double,3> V_op(world,this->get_calc().get());\n\n    const real_function_3d Vrho=V_op(rhonemo);  // eprec is important here!\n    const real_function_3d Urho=U_op(rhonemo);\n\n    real_function_3d term2=4.0*(Urho-Vrho).truncate();\n    result-=term2;\n\n    // derivative contribution: R2 \\Delta rhonemo\n    real_function_3d laplace_rhonemo=real_factory_3d(world).compressed();\n    real_function_3d rhonemo_refined=copy(rhonemo).refine();\n    for (int axis=0; axis<3; ++axis) {\n        real_derivative_3d D = free_space_derivative<double, 3>(world,axis);\n        real_function_3d drhonemo=D(rhonemo_refined).refine();\n        smoothen(drhonemo);\n        real_function_3d d2rhonemo=D(drhonemo);\n        laplace_rhonemo+=d2rhonemo;\n    }\n    save(laplace_rhonemo,\"laplace_rhonemo\");\n\n    result+=(laplace_rhonemo).truncate();\n    result=(R_square*result).truncate();\n    save(result,\"d2rho\");\n\n    // double check result: recompute the density from its laplacian\n    real_function_3d rho_rec=-1./(4.*constants::pi)*(*poisson)(result);\n    save(rho_rec,\"rho_reconstructed\");\n\n    return result;\n}\n\n\n\nreal_function_3d Nemo::kinetic_energy_potential(const vecfuncT& nemo) const {\n\n    const Nuclear<double,3> U_op(world,this->ncf);\n    const Nuclear<double,3> V_op(world,this->get_calc().get());\n\n    const vecfuncT Vnemo=V_op(nemo);  // eprec is important here!\n    const vecfuncT Unemo=U_op(nemo);\n\n    // nabla^2 nemo\n    Laplacian<double,3> Laplace(world,0.0);\n    vecfuncT laplace_nemo=Laplace(nemo);\n    real_function_3d laplace_sum=sum(world,laplace_nemo);\n    save(laplace_sum,\"laplace_sum\");\n\n    // result=-2.0*(Unemo-Vnemo)  + laplace_nemo;\n//    vecfuncT tmp=sub(world,Unemo,Vnemo);\n//    vecfuncT tmp=Unemo;\n    vecfuncT tmp=sub(world,Unemo,mul(world,this->ncf->U2(),nemo));\n    gaxpy(world,1.0,laplace_nemo,-2.0,tmp);\n    vecfuncT D2Rnemo=mul(world,R,laplace_nemo);\n\n    // double check result: recompute the density from its laplacian\n    vecfuncT nemo_rec=apply(world,*poisson,D2Rnemo);\n    scale(world,nemo_rec,-1./(4.*constants::pi));\n    vecfuncT Rnemo=mul(world,R,nemo);\n    vecfuncT diff=sub(world,Rnemo,nemo_rec);\n    double dnorm=norm2(world,diff);\n    print(\"dnorm of laplacian phi \",dnorm);\n\n    // compute \\sum_i \\phi_i \\Delta \\phi_i\n    real_function_3d phiD2phi=dot(world,Rnemo,D2Rnemo);\n    save(phiD2phi,\"phiD2phi\");\n\n    // compute \\sum_i \\phi_i \\epsilon_i \\phi_i\n    vecfuncT R2nemo=mul(world,R_square,nemo);\n    real_function_3d rho=2.0*dot(world,nemo,R2nemo);\n\n    std::vector<double> eps(nemo.size());\n    for (std::size_t i=0; i<eps.size(); ++i) eps[i]=calc->aeps(i);\n    scale(world,R2nemo,eps);\n    real_function_3d phiepsilonphi=dot(world,R2nemo,nemo);\n\n    // divide by the density\n    real_function_3d numerator=-0.5*phiD2phi-phiepsilonphi;\n    real_function_3d nu_bar=binary_op(numerator,rho,dens_inv());\n\n    // smooth the smooth part of the potential\n    SeparatedConvolution<double,3> smooth=SmoothingOperator3D(world,0.001);\n    nu_bar=smooth(nu_bar);\n    save(nu_bar,\"nu_bar_bare_smoothed\");\n\n    // reintroduce the nuclear potential *after* smoothing\n    real_function_3d uvnuc=0.5*(calc->potentialmanager->vnuclear()-ncf->U2());\n    nu_bar=nu_bar-uvnuc;\n\n    return nu_bar;\n}\n\n\n/// compute the reduced densities sigma (gamma) for GGA functionals\n\n/// the reduced density is given by\n/// \\f[\n///   \\sigma = \\nabla\\rho_1 \\nabla\\rho_2\n///          = (\\nabla R^2 \\rho_{R,1} + R^2 \\nabla \\rho_{R,1}) \\cdot\n///              (\\nabla R^2 \\rho_{R,2} + R^2 \\nabla \\rho_{R,2})\n///          = 4R^4 U_1^2 \\rho_{R,1}\\rho_{R,2}\n///             + 2R^4 \\vec U_1 \\left(\\rho_{R,1}\\nabla \\rho_{R,2} + \\nabla\\rho_{R,1} \\rho_{R,2}\\right)\n///             + R^4 \\nabla \\rho_{R,1}\\cdot \\nabla\\rho_{R,2}\n/// \\f]\n///\nreal_function_3d Nemo::make_sigma(const real_function_3d& rho1,\n        const real_function_3d& rho2) const {\n\n    const double tight=FunctionDefaults<3>::get_thresh()*0.001;\n    const double thresh=FunctionDefaults<3>::get_thresh();\n    FunctionDefaults<3>::set_thresh(tight);\n\n    // do refine to have sigma more precise\n    std::vector<real_function_3d> drho1=grad(rho1,true);\n    std::vector<real_function_3d> drho2=grad(rho2,true);\n\n    // first term\n    NuclearCorrelationFactor::U1_dot_U1_functor u1_dot_u1(ncf.get());\n    const real_function_3d U1dot=real_factory_3d(world).functor(u1_dot_u1);\n    real_function_3d result=(4.0*U1dot*rho1*rho2);\n\n    std::vector<real_function_3d> uvec=ncf->U1vec();\n    real_function_3d term2=-2.0*(rho1*dot(world,uvec,drho2) + rho2*dot(world,uvec,drho1));\n\n    real_function_3d term3=dot(world,drho1,drho2);\n    FunctionDefaults<3>::set_thresh(thresh);\n    result+=term2+term3;\n    return result*R_square*R_square;\n\n}\n\n\n\n/// compute the nuclear gradients\nTensor<double> Nemo::gradient(const Tensor<double>& x) {\n\n    const vecfuncT& nemo=calc->amo;\n\n    // the pseudo-density made up of the square of the nemo orbitals\n    functionT rhonemo = make_density(calc->aocc, nemo).scale(2.0);\n    rhonemo=rhonemo.refine();\n\n    Tensor<double> grad=NemoBase::compute_gradient(rhonemo,calc->molecule);\n\n\n    if (world.rank() == 0) {\n        print(\"\\n Derivatives (a.u.)\\n -----------\\n\");\n        print(\n              \"  atom        x            y            z          dE/dx        dE/dy        dE/dz\");\n        print(\n              \" ------ ------------ ------------ ------------ ------------ ------------ ------------\");\n        for (size_t i = 0; i < calc->molecule.natom(); ++i) {\n            const Atom& atom = calc->molecule.get_atom(i);\n            printf(\" %3s %3d %12.6f %12.6f %12.6f %12.6f %12.6f %12.6f\\n\", atomic_number_to_symbol(atom.atomic_number).c_str(),int(i),\n                   atom.x, atom.y, atom.z, grad[i * 3 + 0], grad[i * 3 + 1],\n                   grad[i * 3 + 2]);\n        }\n    }\n    return grad;\n}\n\n\n/// compute the nuclear hessian\nTensor<double> Nemo::hessian(const Tensor<double>& x) {\n\n    const bool hessdebug=(false and (world.rank()==0));\n\n    const size_t natom=molecule().natom();\n    const vecfuncT& nemo=get_calc()->amo;\n    vecfuncT R2nemo=mul(world,R_square,nemo);\n    truncate(world,R2nemo);\n\n    Tensor<double> hessian(3*natom,3*natom);\n\n    // the perturbed MOs determined by the CPHF equations\n    std::vector<vecfuncT> xi=compute_all_cphf();\n\n    timer time_hessian(world,get_calc_param().print_level()>2);\n\n    // compute the derivative of the density d/dx rho; 2: closed shell\n    const real_function_3d rhonemo=2.0*make_density(get_calc()->get_aocc(),nemo);\n    const real_function_3d dens=R_square*rhonemo;\n    vecfuncT drho(3);\n    drho[0]=make_ddensity(rhonemo,0);\n    drho[1]=make_ddensity(rhonemo,1);\n    drho[2]=make_ddensity(rhonemo,2);\n\n    // compute the perturbed densities\n    // \\rho_pt = R2 F_i F_i^X + R^X R2 F_i F_i\n    vecfuncT dens_pt(3*natom);\n    vecfuncT pre_dens_pt(3*natom);\n    std::vector<vecfuncT> pre_mo_pt(3*natom);\n    std::vector<vecfuncT> R2mo_pt(3*natom);\n\n    for (size_t iatom=0; iatom<natom; ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis) {\n            int i=iatom*3 + iaxis;\n\n            real_function_3d FXF=4.0*make_density(calc->get_aocc(),nemo,xi[i]);\n            NuclearCorrelationFactor::RX_functor rxr_func(ncf.get(),iatom,iaxis,-1);\n            const real_function_3d RXR=real_factory_3d(world).functor(rxr_func).truncate_on_project();\n            pre_dens_pt[i]=(FXF+2.0*RXR*rhonemo);//.truncate();\n            pre_mo_pt[i]=(RXR*nemo + xi[i]);\n            R2mo_pt[i]=R_square*pre_mo_pt[i];\n        }\n    }\n\n    dens_pt=R_square * pre_dens_pt;\n    save_function(dens_pt,\"full_dens_pt\");\n\n    // add the electronic contribution to the hessian\n    for (size_t iatom=0; iatom<natom; ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis) {\n            int i=iatom*3 + iaxis;\n\n            for (size_t jatom=0; jatom<natom; ++jatom) {\n                for (int jaxis=0; jaxis<3; ++jaxis) {\n                    int j=jatom*3 + jaxis;\n\n                    // skip diagonal elements because they are extremely noisy!\n                    // use translational symmetry to reconstruct them from other\n                    // hessian matrix elements (see below)\n                    if (i==j) continue;\n\n                    MolecularDerivativeFunctor mdf(molecule(), jatom, jaxis);\n                    hessian(i,j)=inner(dens_pt[i],mdf);\n\n                    // integration by parts < 0 | H^{YX} | 0 >\n                    if (iatom==jatom) hessian(i,j)+=inner(drho[iaxis],mdf);\n\n                }\n            }\n        }\n    }\n//    if (hessdebug) {\n        print(\"\\n raw electronic Hessian (a.u.)\\n\");\n        print(hessian);\n//    }\n    for (size_t i=0; i<3*natom; ++i) hessian(i,i)=0.0;\n    if (get_nemo_param().get<bool>(\"purify_hessian\")) hessian=purify_hessian(hessian);\n\n    Tensor<double> asymmetric=0.5*(hessian-transpose(hessian));\n    const double max_asymmetric=asymmetric.absmax();\n    if (hessdebug) {\n        print(\"\\n asymmetry in the electronic Hessian (a.u.)\\n\");\n        print(asymmetric);\n    }\n    if (world.rank()==0) print(\"max asymmetric element in the Hessian matrix: \",max_asymmetric);\n\n    // symmetrize hessian\n    hessian+=transpose(hessian);\n    hessian.scale(0.5);\n\n    // exploit translational symmetry to compute the diagonal elements:\n    // translating all atoms in the same direction will make no energy change,\n    // therefore the respective sum of hessian matrix elements will be zero:\n    for (size_t i=0; i<3*natom; ++i) {\n        double sum=0.0;\n        for (size_t j=0; j<3*natom; j+=3) sum+=hessian(i,j+(i%3));\n        hessian(i,i)=-sum;\n    }\n\n//    if (hessdebug) {\n        print(\"\\n electronic Hessian (a.u.)\\n\");\n        print(hessian);\n//    }\n\n    // add the nuclear-nuclear contribution\n    hessian+=molecule().nuclear_repulsion_hessian();\n        print(\"\\n nuclear Hessian (a.u.)\\n\");\n        print(molecule().nuclear_repulsion_hessian());\n\n//    if (hessdebug) {\n        print(\"\\n Hessian (a.u.)\\n\");\n        print(hessian);\n//    }\n\n    time_hessian.end(\"compute hessian\");\n\n    Tensor<double> normalmodes;\n    Tensor<double> frequencies=compute_frequencies(molecule(),hessian,normalmodes,false,hessdebug);\n\n    if (hessdebug) {\n        print(\"\\n vibrational frequencies (unprojected) (a.u.)\\n\");\n        print(frequencies);\n        print(\"\\n vibrational frequencies (unprojected) (cm-1)\\n\");\n        print(constants::au2invcm*frequencies);\n    }\n\n    frequencies=compute_frequencies(molecule(),hessian, normalmodes,true,hessdebug);\n    Tensor<double> intensities=compute_IR_intensities(normalmodes,dens_pt);\n    Tensor<double> reducedmass=compute_reduced_mass(molecule(),normalmodes);\n\n    if (world.rank() == 0) {\n        print(\"\\nprojected vibrational frequencies (cm-1)\\n\");\n        printf(\"frequency in cm-1   \");\n        for (int i=0; i<frequencies.size(); ++i) {\n            printf(\"%10.3f\",constants::au2invcm*frequencies(i));\n        }\n        printf(\"\\n\");\n        printf(\"intensity in km/mol \");\n        for (int i=0; i<intensities.size(); ++i) {\n            printf(\"%10.3f\",intensities(i));\n        }\n        printf(\"\\n\");\n        printf(\"reduced mass in amu \");\n        for (int i=0; i<intensities.size(); ++i) {\n            printf(\"%10.3f\",reducedmass(i));\n        }\n        printf(\"\\n\\n\");\n        printf(\"done with computing the hessian matrix at time %8.1fs \\n\",wall_time());\n        printf(\"final energy %16.8f\", calc->current_energy);\n    }\n\n    return hessian;\n\n}\n\n/// purify and symmetrize the hessian\n\nTensor<double> Nemo::purify_hessian(const Tensor<double>& hessian) const {\n\n    Tensor<double> purified=copy(hessian);\n    double maxasymmetric=0.0;\n\n    const size_t natom=calc->molecule.natom();\n\n    for (size_t iatom=0; iatom<natom; ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis) {\n            int i=iatom*3 + iaxis;\n\n            for (size_t jatom=0; jatom<natom; ++jatom) {\n                for (int jaxis=0; jaxis<3; ++jaxis) {\n                    int j=jatom*3 + jaxis;\n\n                    double mean=(purified(i,j)+purified(j,i))*0.5;\n                    double diff=0.5*fabs(purified(i,j)-purified(j,i));\n                    maxasymmetric=std::max(maxasymmetric,diff);\n\n                    unsigned int ZA=calc->molecule.get_atomic_number(iatom);\n                    unsigned int ZB=calc->molecule.get_atomic_number(jatom);\n                    if (ZA<ZB) purified(i,j)=purified(j,i);\n                    if (ZA>ZB) purified(j,i)=purified(i,j);\n                    if (ZA==ZB) {\n                        purified(i,j)=mean;\n                        purified(j,i)=mean;\n                    }\n                }\n            }\n        }\n    }\n    print(\"purify: max asymmetric element \",maxasymmetric);\n    print(\"purify: raw hessian \");\n    print(hessian);\n    print(\"purify: purified hessian \");\n    print(purified);\n\n    return purified;\n}\n\n\n\nTensor<double> Nemo::make_incomplete_hessian() const {\n\n    const size_t natom=molecule().natom();\n    vecfuncT& nemo=get_calc()->amo;\n    refine(world,nemo);\n    real_function_3d rhonemo=2.0*make_density(get_calc()->get_aocc(),nemo);\n    real_function_3d rho=R_square*rhonemo;\n\n    Tensor<double> incomplete_hessian=molecule().nuclear_repulsion_hessian();\n\n    // compute the perturbed densities (partial only!)\n    // \\rho_pt = R2 F_i F_i^X + R^X R2 F_i F_i\n    vecfuncT dens_pt(3*natom);\n    for (size_t iatom=0; iatom<natom; ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis) {\n            int i=iatom*3 + iaxis;\n            NuclearCorrelationFactor::RX_functor rxr_func(ncf.get(),iatom,iaxis,2);\n            const real_function_3d RXR=real_factory_3d(world).functor(rxr_func);//.truncate_on_project();\n            dens_pt[i]=2.0*RXR*rhonemo;//.truncate();\n        }\n    }\n\n    // add the electronic contribution to the hessian\n    for (size_t iatom=0; iatom<natom; ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis) {\n            int i=iatom*3 + iaxis;\n\n            for (size_t jatom=0; jatom<natom; ++jatom) {\n                for (int jaxis=0; jaxis<3; ++jaxis) {\n                    int j=jatom*3 + jaxis;\n\n                    MolecularDerivativeFunctor mdf(molecule(), jatom, jaxis);\n                    double result=inner(dens_pt[i],mdf);\n\n                    // no integration by parts\n                    MolecularSecondDerivativeFunctor m2df(molecule(), jatom, jaxis,iaxis);\n                    if (iatom==jatom) result+=inner(rho,m2df);\n\n                    // skip diagonal elements because they are extremely noisy!\n                    // use translational symmetry to reconstruct them from other\n                    // hessian matrix elements (see below)\n                    incomplete_hessian(i,j)+=result;\n                    if (i==j) incomplete_hessian(i,j)=0.0;\n                }\n            }\n        }\n    }\n\n    return incomplete_hessian;\n}\n\n/// compute the complementary incomplete hessian\n\n/// @param[in]  xi the response functions including the parallel part\nTensor<double> Nemo::make_incomplete_hessian_response_part(\n        const std::vector<vecfuncT>& xi) const {\n\n    size_t natom=calc->molecule.natom();\n    const vecfuncT& nemo=calc->amo;\n\n    Tensor<double> complementary_hessian(3*natom,3*natom);\n    for (size_t i=0, iatom=0; iatom<natom; ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis, ++i) {\n\n            real_function_3d dens_pt=dot(world,xi[i],nemo);\n            dens_pt=4.0*R_square*dens_pt;\n            Tensor<double> h(3*molecule().natom());\n\n            for (size_t jatom=0, j=0; jatom<molecule().natom(); ++jatom) {\n                for (int jaxis=0; jaxis<3; ++jaxis, ++j) {\n                    if ((iatom==jatom) and (iaxis==jaxis)) continue;\n                    MolecularDerivativeFunctor mdf(molecule(), jatom, jaxis);\n                    h(j)=inner(dens_pt,mdf);\n                }\n            }\n            complementary_hessian(i,_)=h;\n        }\n    }\n    return complementary_hessian;\n}\n\n\nvecfuncT Nemo::make_cphf_constant_term(const size_t iatom, const int iaxis,\n        const vecfuncT& R2nemo, const real_function_3d& rhonemo) const {\n    // guess for the perturbed MOs\n    const vecfuncT nemo=calc->amo;\n    const int nmo=nemo.size();\n\n    const Tensor<double> occ=get_calc()->get_aocc();\n    QProjector<double,3> Q(R2nemo,nemo);\n\n    DNuclear<double,3> Dunuc(world,this,iatom,iaxis);\n    vecfuncT Vpsi2b=Dunuc(nemo);\n    truncate(world,Vpsi2b);\n\n    // construct some intermediates\n    NuclearCorrelationFactor::RX_functor rxr_func(ncf.get(),iatom,iaxis,2);\n    const real_function_3d RXR=real_factory_3d(world).functor(rxr_func).truncate_on_project();\n\n    // part of the Coulomb operator with the derivative of the NCF\n    // J <- \\int dr' 1/|r-r'| \\sum_i R^XR F_iF_i\n    Coulomb<double,3> Jconst(world);\n    Jconst.potential()=Jconst.compute_potential(2.0*RXR*rhonemo);        // factor 2 for cphf\n    vecfuncT Jconstnemo=Jconst(nemo);\n    truncate(world,Jconstnemo);\n\n    // part of the exchange operator with the derivative of the NCF\n    // K <- \\sum_k |F_k> \\int dr' 1/|r-r'| 2R^XR F_k F_i\n    // there is no constant term for DFT, since the potentials are not\n    // linear in the density\n    vecfuncT Kconstnemo=zero_functions_compressed<double,3>(world,nmo);\n    if (not is_dft()) {\n        Exchange<double,3> Kconst(world,get_calc_param().lo());\n        vecfuncT kbra=2.0*RXR*nemo;\n        truncate(world,kbra);\n        Kconst.set_bra_and_ket(kbra, nemo);\n        Kconstnemo=Kconst(nemo);\n        truncate(world,Kconstnemo);\n    }\n\n    vecfuncT rhsconst=Vpsi2b+Jconstnemo-Kconstnemo;\n    truncate(world,rhsconst);\n    rhsconst=Q(rhsconst);\n    return rhsconst;\n\n}\n\n\n/// solve the CPHF equation for the nuclear displacements\n\n/// @param[in]  iatom   the atom A to be moved\n/// @param[in]  iaxis   the coordinate X of iatom to be moved\n/// @return     \\frac{\\partial}{\\partial X_A} \\varphi\nvecfuncT Nemo::solve_cphf(const size_t iatom, const int iaxis, const Tensor<double> fock,\n        const vecfuncT& guess, const vecfuncT& rhsconst,\n        const Tensor<double> incomplete_hessian, const vecfuncT& parallel,\n        const SCFProtocol& proto, const std::string& xc_data) const {\n\n    print(\"\\nsolving nemo cphf equations for atom, axis\",iatom,iaxis);\n\n    vecfuncT xi=guess;\n    // guess for the perturbed MOs\n    const vecfuncT nemo=calc->amo;\n    const int nmo=nemo.size();\n    const Tensor<double> occ=get_calc()->get_aocc();\n    const real_function_3d rhonemo=2.0*make_density(occ,nemo); // closed shell\n    const real_function_3d arho=0.5*R_square*rhonemo;\n    NuclearCorrelationFactor::RX_functor rxr_func(ncf.get(),iatom,iaxis,2);\n    const real_function_3d RXR=real_factory_3d(world).functor(rxr_func).truncate_on_project();\n\n    int ii=3*iatom+iaxis;\n    Tensor<double> ihr=incomplete_hessian(ii,_);\n    Tensor<double> old_h(3*molecule().natom());\n\n\n    vecfuncT R2nemo=mul(world,R_square,nemo);\n    truncate(world,R2nemo);\n    QProjector<double,3> Q(R2nemo,nemo);\n\n    // construct quantities that are independent of xi\n\n    // construct the BSH operator\n    tensorT eps(nmo);\n    for (int i = 0; i < nmo; ++i) eps(i) = fock(i, i);\n    std::vector<poperatorT> bsh = calc->make_bsh_operators(world, eps,get_calc_param());\n    for (poperatorT& b : bsh) b->destructive()=true;    // make it memory efficient\n\n    // derivative of the (regularized) nuclear potential\n\n    // construct the KAIN solver\n    typedef vector_function_allocator<double, 3> allocT;\n    typedef XNonlinearSolver<std::vector<Function<double, 3> >, double, allocT> solverT;\n    allocT alloc(world, nemo.size());\n    solverT solver(allocT(world, nemo.size()));\n    solver.set_maxsub(5);\n\n    // construct unperturbed operators\n    const Coulomb<double,3> J(world,this);\n    const Exchange<double,3> K=Exchange<double,3>(world,this,0);\n    const XCOperator<double,3> xc(world, xc_data, not get_calc_param().spin_restricted(), arho, arho);\n    const Nuclear<double,3> V(world,this);\n\n    Tensor<double> h_diff(3l);\n    for (int iter=0; iter<10; ++iter) {\n\n\n        // make the rhs\n        vecfuncT Vpsi1=V(xi) + J(xi);\n        if (is_dft()) {\n            Vpsi1+=(xc(xi));\n        } else {\n            Vpsi1-=(K(xi));\n        }\n\n        truncate(world,Vpsi1);\n\n\n        // construct perturbed operators\n        Coulomb<double,3> Jp(world);\n        const vecfuncT xi_complete=xi-parallel;\n\n        // factor 4 from: closed shell (2) and cphf (2)\n        real_function_3d density_pert=4.0*make_density(occ,R2nemo,xi_complete);\n        Jp.potential()=Jp.compute_potential(density_pert);\n        vecfuncT Kp;\n        if (is_dft()) {\n            // reconstruct the full perturbed density: do not truncate!\n            const real_function_3d full_dens_pt=(density_pert + 2.0*RXR*rhonemo);\n            real_function_3d gamma=-1.0*xc.apply_xc_kernel(full_dens_pt);\n            Kp=truncate(gamma*nemo);\n        } else {\n            Exchange<double,3> Kp1(world,get_calc_param().lo());\n            Kp1.set_bra_and_ket(R2nemo, xi_complete).set_symmetric(true);\n            vecfuncT R2xi=mul(world,R_square,xi_complete);\n            truncate(world,R2xi);\n            Exchange<double,3> Kp2(world,get_calc_param().lo());\n            Kp2.set_bra_and_ket(R2xi, nemo);\n            Kp=truncate(Kp1(nemo) + Kp2(nemo));\n        }\n        vecfuncT Vpsi2=truncate(Jp(nemo)-Kp+rhsconst);\n        Vpsi2=Q(Vpsi2);\n        truncate(world,Vpsi2);\n\n        vecfuncT Vpsi=truncate(Vpsi1+Vpsi2);\n        Vpsi1.clear();\n        Vpsi2.clear();\n\n\n        // add the coupling elements in case of localized orbitals\n        if (get_calc()->param.do_localize()) {\n            Tensor<double> fcopy=copy(fock);\n            for (int i = 0; i < nmo; ++i) fcopy(i, i) -= eps(i);\n            vecfuncT fnemo= transform(world, xi, fcopy, trantol(), true);\n            gaxpy(world, 1.0, Vpsi, -1.0, fnemo);\n            truncate(Vpsi);\n        }\n\n        // apply the BSH operator on the wave function\n        scale(world,Vpsi,-2.0);\n        vecfuncT tmp = apply(world, bsh,Vpsi);\n        Vpsi.clear();\n        truncate(world, tmp);\n\n        tmp=Q(tmp);\n        truncate(world,tmp);\n\n        vecfuncT residual = xi-tmp;\n\n        std::vector<double> rnorm = norm2s(world, residual);\n        double rms, maxval;\n        calc->vector_stats(rnorm, rms, maxval);\n        const double norm = norm2(world,xi);\n\n        if (rms < 1.0) {\n            xi = solver.update(xi, residual);\n        } else {\n            xi = tmp;\n        }\n        truncate(xi);\n\n        // measure for hessian matrix elements\n        real_function_3d dens_pt=dot(world,xi-parallel,nemo);\n        dens_pt=4.0*R_square*dens_pt;\n        Tensor<double> h(3*molecule().natom());\n        for (size_t jatom=0, j=0; jatom<molecule().natom(); ++jatom) {\n            for (int jaxis=0; jaxis<3; ++jaxis, ++j) {\n                if ((iatom==jatom) and (iaxis==jaxis)) continue;\n                MolecularDerivativeFunctor mdf(molecule(), jatom, jaxis);\n                h(j)=inner(dens_pt,mdf);\n            }\n        }\n        h_diff=h-old_h;\n\n        if (world.rank() == 0)\n            print(\"xi_\"+stringify(ii),\"CPHF BSH residual: rms\", rms,\n                    \"   max\", maxval, \"H, Delta H\", h.normf(), h_diff.absmax());\n        print(\"h+ihr\");\n        print(h+ihr);\n        old_h=h;\n\n        if (rms/norm<proto.dconv and (h_diff.absmax()<1.e-2)) break;\n    }\n    return xi;\n\n}\n\n\nstd::vector<vecfuncT> Nemo::compute_all_cphf() {\n\n    const int natom=molecule().natom();\n    std::vector<vecfuncT> xi(3*natom);\n    const vecfuncT& nemo=calc->amo;\n\n    // read CPHF vectors from file if possible\n    if (get_calc()->param.get<bool>(\"read_cphf\")) {\n        for (int i=0; i<3*natom; ++i) {\n            load_function(xi[i],\"xi_\"+stringify(i));\n            real_function_3d dens_pt=dot(world,xi[i],nemo);\n            dens_pt=4.0*R_square*dens_pt;\n            save(dens_pt,\"dens_pt\"+stringify(i));\n        }\n        return xi;\n    }\n\n\n    timer t1(world,get_calc_param().print_level()>2);\n    vecfuncT R2nemo=mul(world,R_square,nemo);\n    const real_function_3d rhonemo=2.0*make_density(calc->aocc, nemo);\n    t1.tag(\"make density\");\n\n    // compute some intermediates\n\n    // compute those contributions to the hessian that do not depend on the response\n    Tensor<double> incomplete_hessian=make_incomplete_hessian();\n    t1.tag(\"make incomplete hessian\");\n    print(incomplete_hessian);\n\n    // compute the initial guess for the response\n    const Tensor<double> fock=compute_fock_matrix(nemo,get_calc()->get_aocc());\n    const int nmo=nemo.size();\n    tensorT eps(nmo);\n    for (int i = 0; i < nmo; ++i) eps(i) = fock(i, i);\n    std::vector<poperatorT> bsh = calc->make_bsh_operators(world, eps,get_calc_param());\n    t1.tag(\"make fock matrix\");\n\n    // construct the leading and constant term rhs involving the derivative\n    // of the nuclear potential\n    std::vector<vecfuncT> parallel(3*natom);\n    std::vector<vecfuncT> rhsconst(3*natom);\n\n    for (int i=0, iatom=0; iatom<natom; ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis, ++i) {\n            parallel[i]=compute_cphf_parallel_term(iatom,iaxis);\n            rhsconst[i]=make_cphf_constant_term(iatom,iaxis,R2nemo,rhonemo);\n        }\n    }\n    t1.tag(\"make constant and parallel terms\");\n\n\n    // initial guess from the constant rhs or from restart\n    if (get_calc()->param.restart_cphf()) {\n        for (int i=0; i<3*natom; ++i) {\n            load_function(xi[i],\"xi_guess\"+stringify(i));\n        }\n        t1.tag(\"read guess from file\");\n    } else {\n        for (std::size_t i=0; i<rhsconst.size(); ++i) {\n            xi[i]=apply(world, bsh, -2.0*rhsconst[i]);\n            truncate(world,xi[i]);\n            save_function(xi[i],\"xi_guess\"+stringify(i));\n        }\n        t1.tag(\"make initial guess\");\n    }\n\n\n    // do some pre-iterations using fast LDA xc functional\n    if (world.rank()==0) {\n        print(\"\\ngenerating CPHF guess using the LDA functional\\n\");\n    }\n\n    SCFProtocol preiterations(world,get_calc_param());\n    preiterations.end_prec*=10.0;\n    preiterations.initialize();\n    for (; not preiterations.finished(); ++preiterations) {\n        set_protocol(preiterations.current_prec);\n\n        if (world.rank()==0) {\n            printf(\"\\nstarting initial CPHF equations at time %8.1fs \\n\",wall_time());\n        }\n\n        // double loop over all nuclear displacements\n        for (int i=0, iatom=0; iatom<natom; ++iatom) {\n            for (int iaxis=0; iaxis<3; ++iaxis, ++i) {\n                if (xi[i].size()>0) {\n                    for (real_function_3d& xij : xi[i]) xij.set_thresh(preiterations.current_prec);\n                }\n                xi[i]=solve_cphf(iatom,iaxis,fock,xi[i],rhsconst[i],\n                        incomplete_hessian,parallel[i],preiterations,\"LDA\");\n                save_function(xi[i],\"xi_guess\"+stringify(i));\n            }\n        }\n        if (world.rank()==0) {\n            printf(\"\\nfinished CPHF equations at time %8.1fs \\n\",wall_time());\n        }\n\n        std::vector<vecfuncT> full_xi(3*natom);\n        for (int i=0; i<3*natom; ++i) full_xi[i]=xi[i]-parallel[i];\n        Tensor<double> complementary_hessian=make_incomplete_hessian_response_part(full_xi);\n        print(\"full hessian matrix\");\n        print(incomplete_hessian+complementary_hessian);\n\n    }\n\n    // solve the response equations\n    SCFProtocol p(world,get_calc_param());\n    p.start_prec=p.end_prec;\n    p.initialize();\n\n    for ( ; not p.finished(); ++p) {\n        set_protocol(p.current_prec);\n\n        if (world.rank()==0) {\n            printf(\"\\nstarting CPHF equations at time %8.1fs \\n\",wall_time());\n            print(\"solving CPHF with the density functional\",get_calc_param().xc());\n        }\n\n        // double loop over all nuclear displacements\n        for (int i=0, iatom=0; iatom<natom; ++iatom) {\n            for (int iaxis=0; iaxis<3; ++iaxis, ++i) {\n                if (xi[i].size()>0) {\n                    for (real_function_3d& xij : xi[i]) xij.set_thresh(p.current_prec);\n                }\n                xi[i]=solve_cphf(iatom,iaxis,fock,xi[i],rhsconst[i],\n                        incomplete_hessian,parallel[i],p,get_calc_param().xc());\n                save_function(xi[i],\"xi_guess\"+stringify(i));\n            }\n        }\n        if (world.rank()==0) {\n            printf(\"\\nfinished CPHF equations at time %8.1fs \\n\",wall_time());\n        }\n\n        std::vector<vecfuncT> full_xi(3*natom);\n        for (int i=0; i<3*natom; ++i) full_xi[i]=xi[i]-parallel[i];\n        Tensor<double> complementary_hessian=make_incomplete_hessian_response_part(full_xi);\n        print(\"full hessian matrix\");\n        print(incomplete_hessian+complementary_hessian);\n\n    }\n\n    // reset the initial thresholds\n    set_protocol(get_calc()->param.econv());\n\n    if (world.rank()==0) print(\"\\nadding the inhomogeneous part to xi\\n\");\n\n    // double loop over all nuclear displacements\n    for (int i=0, iatom=0; iatom<natom; ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis, ++i) {\n\n            load_function(xi[i],\"xi_guess\"+stringify(i));\n            xi[i]-=parallel[i];\n            truncate(world,xi[i]);\n            save_function(xi[i],\"xi_\"+stringify(i));\n        }\n    }\n\n    if (world.rank()==0) {\n        printf(\"finished solving the CPHF equations at time %8.1fs \\n\", wall_time());\n    }\n\n    return xi;\n\n}\n\n\nvecfuncT Nemo::compute_cphf_parallel_term(const size_t iatom, const int iaxis) const {\n\n    const vecfuncT& nemo=calc->amo;\n    vecfuncT parallel(nemo.size());\n    NuclearCorrelationFactor::RX_functor rxr_func(ncf.get(),iatom,iaxis,2);\n    const real_function_3d RXR=real_factory_3d(world).functor(rxr_func).truncate_on_project();\n    vecfuncT RXRnemo=mul(world,RXR,nemo);   // skipping factor 2\n    truncate(world,RXRnemo);\n\n    Tensor<double> FRXRF=matrix_inner(world,nemo,RXRnemo);  // skipping factor 0.5\n    parallel=transform(world,nemo,FRXRF);\n    truncate(world,parallel);\n    return parallel;\n\n}\n\n\n\nTensor<double> Nemo::compute_IR_intensities(const Tensor<double>& normalmodes,\n        const vecfuncT& dens_pt) const {\n\n    // compute the matrix of the normal modes: x -> q\n    Tensor<double> M=molecule().massweights();\n    Tensor<double> D=MolecularOptimizer::projector_external_dof(molecule(),{\"tx\",\"ty\",\"tz\",\"rx\",\"ry\",\"rz\"});\n    Tensor<double> DL=inner(D,normalmodes);\n    Tensor<double> nm=inner(M,DL);\n\n    // square of the dipole derivative wrt the normal modes Q\n    Tensor<double> mu_Qxyz2(dens_pt.size());\n\n    // compute the derivative of the dipole moment wrt nuclear displacements X\n    for (std::size_t component=0; component<3; ++component) {\n        // electronic and nuclear dipole derivative wrt nucl. displacements X\n        Tensor<double> mu_X(dens_pt.size()), mu_X_nuc(dens_pt.size());\n\n        for (size_t iatom=0; iatom<molecule().natom(); ++iatom) {\n            for (int iaxis=0; iaxis<3; ++iaxis) {\n                int i=iatom*3 + iaxis;\n                mu_X(i)=-inner(dens_pt[i],DipoleFunctor(component));\n                Tensor<double> dnucdipole=molecule().nuclear_dipole_derivative(iatom,iaxis);\n                mu_X_nuc(i)=dnucdipole(component);\n            }\n        }\n        Tensor<double> mu_X_total=mu_X+mu_X_nuc;\n        Tensor<double> mu_Q=inner(nm,mu_X_total,0,0);\n        mu_Qxyz2+=mu_Q.emul(mu_Q);\n    }\n\n    // have fun with constants\n    // unit of the dipole moment:\n    const double mu_au_to_SI=constants::atomic_unit_of_electric_dipole_moment;\n    // unit of the dipole derivative\n    const double dmu_au_to_SI=mu_au_to_SI/constants::atomic_unit_of_length;\n    // unit of the mass-weighted dipole derivative\n    const double dmuq_au_to_SI=dmu_au_to_SI*sqrt(constants::atomic_mass_in_au/\n            constants::atomic_mass_constant);\n    // some more fundamental constants\n    const double pi=constants::pi;\n    const double N=constants::Avogadro_constant;\n    const double e=constants::dielectric_constant;\n    const double c=constants::speed_of_light_in_vacuum;\n    // final conversion: Eqs (13) and (14) of\n    // J. Neugebauer, M. Reiher, C. Kind, and B. A. Hess,\n    // J. Comp. Chem., vol. 23, no. 9, pp. 895–910, Apr. 2002.\n    const double conversion=pi*N*dmuq_au_to_SI*dmuq_au_to_SI/(3.0*4.0*pi*e*c*c)/1.e3;\n    return mu_Qxyz2.scale(conversion);\n}\n\n\n\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/chem/nemo.h",
    "content": "/*\n This file is part of MADNESS.\n\n Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n For more information please contact:\n\n Robert J. Harrison\n Oak Ridge National Laboratory\n One Bethel Valley Road\n P.O. Box 2008, MS-6367\n\n email: harrisonrj@ornl.gov\n tel:   865-241-3937\n fax:   865-572-0680\n */\n\n/*!\n \\file examples/nemo.h\n \\brief solve the HF equations using numerical exponential MOs\n\n The source is\n <a href=http://code.google.com/p/m-a-d-n-e-s-s/source/browse/local\n /trunk/src/apps/examples/nemo.h>here</a>.\n\n */\n\n#ifndef NEMO_H_\n#define NEMO_H_\n\n#include <madness/mra/mra.h>\n#include <madness/mra/funcplot.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/lbdeux.h>\n#include<madness/chem/SCF.h>\n#include<madness/chem/CalculationParameters.h>\n#include<madness/chem/SCFProtocol.h>\n#include<madness/chem/correlationfactor.h>\n#include<madness/chem/molecular_optimizer.h>\n#include <madness/mra/nonlinsol.h>\n#include <madness/mra/vmra.h>\n#include<madness/chem/pcm.h>\n#include<madness/chem/AC.h>\n#include<madness/chem/pointgroupsymmetry.h>\n#include\"madness/mra/commandlineparser.h\"\n#include<madness/chem/QCPropertyInterface.h>\n#include <madness/world/timing_utilities.h>\n\nnamespace madness {\n\nclass PNO;\nclass OEP;\n\n\nclass NemoBase : public MolecularOptimizationTargetInterface {\n\npublic:\n\n\tNemoBase(World& w) : world(w) {}\n\n    virtual ~NemoBase() {}\n\n    virtual std::shared_ptr<Fock<double,3>> make_fock_operator() const {\n\t    MADNESS_EXCEPTION(\"implement make_fock operator for your derived NemoBase class\",1);\n\t    return std::shared_ptr<Fock<double,3>>();\n\t}\n\n        /// create an instance of the derived object based on the input parameters\n\tstd::shared_ptr<NuclearCorrelationFactor> get_ncf_ptr() const {\n\t\treturn ncf;\n\t}\n\n\t/// normalize the nemos\n\ttemplate<typename T, std::size_t NDIM>\n\tvoid static normalize(std::vector<Function<T,NDIM> >& nemo,\n\t\t\tconst Function<double,NDIM> metric=Function<double,NDIM>()) {\n\n        if (nemo.size()==0) return;\n        World& world=nemo[0].world();\n\t\t// compute the norm of the reconstructed orbitals, includes the factor\n\t\tstd::vector<Function<T,NDIM> > mos = (metric.is_initialized()) ? metric*nemo : nemo;\n\t\tstd::vector<double> norms = norm2s(world, mos);\n\n\t\t// scale the nemos, excludes the nuclear correlation factor\n\t\tstd::vector<double> invnorm(norms.size());\n\t\tfor (std::size_t i = 0; i < norms.size(); ++i)\n\t\t\tinvnorm[i] = 1.0 / norms[i];\n\t\tscale(world, nemo, invnorm);\n\t}\n\n\ttemplate<typename T>\n    static Tensor<T> Q2(const Tensor<T>& s) {\n\t\tTensor<T> Q = -0.5*s;\n        for (int i=0; i<s.dim(0); ++i) Q(i,i) += 1.5;\n        return Q;\n    }\n\n\t/// orthonormalize the vectors\n\ttemplate<typename T, std::size_t NDIM>\n\tvoid orthonormalize(std::vector<Function<T,NDIM> >& nemo,\n\t\t\tconst Function<double,NDIM> metric=Function<double,NDIM>(),\n\t\t\tconst double trantol=FunctionDefaults<NDIM>::get_thresh()*0.01) const {\n\n\t\tif (nemo.size()==0) return;\n\t    normalize(nemo,metric);\n\t    double maxq;\n\t    do {\n\t\t\tstd::vector<Function<T,NDIM> > Rnemo = (metric.is_initialized()) ? metric*nemo : nemo;\n\t        Tensor<T> Q = Q2(matrix_inner(world, Rnemo, Rnemo));\n\t        maxq=0.0;\n\t        for (int i=0; i<Q.dim(0); ++i)\n\t            for (int j=0; j<i; ++j)\n\t                maxq = std::max(maxq,std::abs(Q(i,j)));\n\n\t        Q.screen(trantol); // ???? Is this really needed?\n\t        nemo = transform(world, nemo, Q, trantol, true);\n\t        truncate(world, nemo);\n//\t        if (world.rank() == 0) print(\"ORTHOG2: maxq trantol\", maxq, trantol);\n\n\t    } while (maxq>0.01);\n\t    normalize(nemo,metric);\n\t}\n\n\ttemplate<typename T, std::size_t NDIM>\n\tFunction<typename Tensor<T>::scalar_type,NDIM> compute_density(const std::vector<Function<T,NDIM> > nemo) const {\n\t\treturn sum(world,abssq(world,nemo)).truncate();\n\t}\n\n    virtual bool need_recompute_factors_and_potentials(const double thresh) const {\n        bool need=false;\n        if ((not R.is_initialized()) or (R.thresh()>thresh)) need=true;\n        if (not ncf) need=true;\n        if ((not R_square.is_initialized()) or (R_square.thresh()>thresh)) need=true;\n        return need;\n    };\n\n    virtual void invalidate_factors_and_potentials() {\n        R.clear();\n        R_square.clear();\n        ncf.reset();\n    };\n\n    void construct_nuclear_correlation_factor(const Molecule& molecule,\n\t\t\tconst std::shared_ptr<PotentialManager> pm,\n\t\t\tconst std::pair<std::string,double> ncf_parameter) {\n\n\t    // construct the nuclear correlation factor:\n\t    if (not ncf) {\n\t    \tncf=create_nuclear_correlation_factor(world, molecule, pm, ncf_parameter);\n\t    }\n\n\t    // re-project the ncf\n\t    ncf->initialize(FunctionDefaults<3>::get_thresh());\n\t    R = ncf->function();\n\t    R.set_thresh(FunctionDefaults<3>::get_thresh());\n\t    R_square = ncf->square();\n\t    R_square.set_thresh(FunctionDefaults<3>::get_thresh());\n\t}\n\n\t/// compute the nuclear gradients\n\tTensor<double> compute_gradient(const real_function_3d& rhonemo,\n\t\t\tconst Molecule& molecule) const;\n\n    /// compute kinetic energy as square of the \"analytical\" expectation value\n\n\t/// @param[in]\tthe nemo orbitals F\n\t/// @return\t\tT = 1/2 \\sum_i \\int R^2 U1.U1 F^2 + 2 R^2 U1.grad(F) + R^2 grad(F)^2\n\ttemplate<typename T, std::size_t NDIM>\n\tdouble compute_kinetic_energy(const std::vector<Function<T,NDIM> >& nemo) const {\n\n\t\t// T = 0.5\\sum_i \\int R^2 U1.U1 F^2 - 2 R^2 U1.grad(F) F + R^2 grad(F)^2\n\t\t//   = 0.5 (<U1.U1 | rho > + <R^2|grad(F)^2> - 2<R^2 | U1.grad(F) >)\n\t\t// note: U1=-grad(R)/R\n\t\t//auto id=nemo.front().world().id();\n\t\t//auto id1=R_square.world().id();\n\t\t//auto worldid=world.id();\n\t\tworld.gop.fence();\n\t\treal_function_3d dens=dot(world,nemo,nemo)*R_square;\n\t    real_function_3d U1dotU1=real_factory_3d(world)\n\t    \t\t.functor(NuclearCorrelationFactor::U1_dot_U1_functor(ncf.get()));\n\t    double ke1=inner(dens,U1dotU1);\n\n\t    double ke2=0.0;\n\t    double ke3=0.0;\n\t    //double ke3_real=0.0;\n\t    //double ke3_imag=0.0;\n\n\t    for (size_t axis = 0; axis < NDIM; axis++) {\n\t        real_derivative_3d D = free_space_derivative<double, NDIM>(world, axis);\n\t        const std::vector<Function<T,NDIM> > dnemo = apply(world, D, nemo);\n\n\t        real_function_3d term2=dot(world,dnemo,nemo)*ncf->U1(axis);\n\t        double tmp=-2.0*inner(R_square,term2);\n//\t        ke3_real -=2.0*std::real(tmp);\n//\t        ke3_imag -=2.0*std::imag(tmp);\n\t        ke3 +=tmp;\n\n\t        const real_function_3d term1=dot(world,dnemo,dnemo);\n\t        world.gop.fence();\n\t        ke2 += inner(term1,R_square);\n\n\t    }\n//\t    if (ke3_imag>1.e-8) {\n//\t    \tprint(\"kinetic energy, imaginary part: \",ke3_imag);\n//\t    \tMADNESS_EXCEPTION(\"imaginary kinetic energy\",1);\n//\t    }\n//\t    double ke=2.0*(ke1+ke2+ke3_real); // closed shell\n\t    double ke=2.0*(ke1+ke2+ke3); // closed shell\n\t    return 0.5*ke;\n\t}\n\n    /// compute kinetic energy as square of the \"analytical\" derivative of the orbitals\n\n\t/// @param[in]\tthe nemo orbitals F\n\t/// @return\t\tT = 1/2 \\sum_i || grad(R)*F_i + R*grad(F_i)||^2\n\ttemplate<typename T, std::size_t NDIM>\n\tdouble compute_kinetic_energy1(const std::vector<Function<T,NDIM> >& nemo) const {\n        timer timer1(world);\n\t\tdouble ke=0.0;\n\t\tfor (int i=0; i<nemo.size(); ++i) {\n\t\t\tdouble fnorm2=norm2(world,-1.0*R*ncf->U1vec()*nemo[i] + R*grad(nemo[i]));\n\t\t\tke+=2.0*fnorm2*fnorm2;\n\t\t}\n\t\ttimer1.end(\"compute_kinetic_energy1\");\n\t\treturn 0.5*ke;\n\t}\n\n\n    /// compute kinetic energy as square of the \"analytical\" derivative of the orbitals\n\n\t/// @param[in]\tthe nemo orbitals F\n\t/// @return\t\tT = 1/2 \\sum_i || grad(R)*F_i + R*grad(F_i)||^2\n\ttemplate<typename T, std::size_t NDIM>\n\tdouble compute_kinetic_energy1a(const std::vector<Function<T,NDIM> >& nemo) const {\n        timer timer1(world);\n\t\tdouble ke=0.0;\n\t\tfor (int i=0; i<NDIM; ++i) {\n\t        std::vector< std::shared_ptr< Derivative<T,NDIM> > > grad=\n\t                gradient_operator<T,NDIM>(world);\n\t\t\tdouble fnorm2=norm2(world,R*(-1.0*ncf->U1(i)*nemo + apply(world,*(grad[i]),nemo)));\n\t\t\tke+=2.0*fnorm2*fnorm2;\n\t\t}\n\t\ttimer1.end(\"compute_kinetic_energy1a\");\n\t\treturn 0.5*ke;\n\t}\n\n    /// compute kinetic energy as direct derivative of the orbitals (probably imprecise)\n\n\t/// @param[in]\tthe nemo orbitals F\n\t/// @return\t\tT = 1/2 \\sum_i || grad(R*F_i)||^2\n\ttemplate<typename T, std::size_t NDIM>\n    double compute_kinetic_energy2(const std::vector<Function<T,NDIM> >& nemo) const {\n\n    \t// it's ok to use phi here, no regularization necessary for this eigenvalue\n    \tdouble E_kin = 0.0;\n    \tfor (int axis = 0; axis < 3; axis++) {\n    \t\treal_derivative_3d D = free_space_derivative<double, 3>(world, axis);\n    \t\tconst vecfuncT dphi = apply(world, D,R*nemo);\n    \t\tE_kin += 0.5 * (inner(world, dphi, dphi)).sum();\n    \t\t// -1/2 sum <Psi|Nabla^2|Psi> = 1/2 sum <NablaPsi|NablaPsi>   (integration by parts)\n    \t}\n    \tE_kin *= 2.0; // 2 because closed shell\n    \treturn E_kin;\n    }\n\n\n\tbool check_convergence(const std::vector<double> energies,\n\t\t\tconst std::vector<double> oldenergies, const double bsh_norm,\n\t\t\tconst double delta_density, const CalculationParameters& param,\n\t\t\tconst double econv, const double dconv) const {\n\n        double maxenergychange=fabs(energies.size()-oldenergies.size());\t// >0 if oldenergyvec not initialized\n        for (auto iter1=energies.begin(), iter2=oldenergies.begin();\n        \t\t(iter1!=energies.end() and iter2!=oldenergies.end()); iter1++, iter2++) {\n        \tmaxenergychange=std::max(maxenergychange,fabs(*iter1 - *iter2));\n        }\n        double delta_energy=fabs(energies[0]-oldenergies[0]);\n\n\t\tbool bsh_conv=param.converge_bsh_residual() ? bsh_norm<dconv : true;\n\t\tbool total_energy_conv=param.converge_total_energy() ? delta_energy<econv : true;\n\t\tbool each_energy_conv=param.converge_each_energy() ? maxenergychange<econv*3.0 : true;\n\t\tbool density_conv=param.converge_density() ? delta_density<dconv : true;\n\n\t\tif (world.rank()==0 and param.print_level()>2) {\n\t\t\tstd::stringstream line;\n\t\t\tline << \"convergence: bshresidual, energy change, max energy change, density change \"\n\t\t\t\t\t<< std::scientific << std::setprecision(1)\n\t\t\t\t\t<< bsh_norm << \" \" << delta_energy << \" \"\n\t\t\t\t\t<< maxenergychange << \" \" << delta_density;\n\t\t\tprint(line.str());\n\t\t}\n\n\t\treturn (bsh_conv and density_conv and each_energy_conv and total_energy_conv);\n\t}\n\n\tWorld& world;\n\n\t/// the nuclear correlation factor\n\tstd::shared_ptr<NuclearCorrelationFactor> ncf;\n\n\t/// the nuclear correlation factor\n\treal_function_3d R;\n\n    /// the square of the nuclear correlation factor\n    real_function_3d R_square;\n\n\n};\n\n\n/// The Nemo class\nclass Nemo: public NemoBase, public QCPropertyInterface {\n\ttypedef std::shared_ptr<real_convolution_3d> poperatorT;\n\tfriend class PNO;\n\tfriend class TDHF;\n\npublic:\n\t/// class holding parameters for a nemo calculation beyond the standard dft parameters from moldft\n\tstruct NemoCalculationParameters : public QCCalculationParametersBase {\n\t\tstatic constexpr char const* tag = \"nemo\";\n\n        NemoCalculationParameters(World& world, const commandlineparser& parser) {\n            initialize_nemo_parameters();\n        \tread_input_and_commandline_options(world,parser,tag);\n        }\n\n\t\tNemoCalculationParameters() {\n\t\t\tinitialize_nemo_parameters();\n\t\t}\n\n\t\tstd::string get_tag() const override {\n        \treturn std::string(\"dft\");\n        }\n\n\t\tvoid initialize_nemo_parameters() {\n        \t// check if parameters are initialized for a nemo calculation already\n        \tif (parameter_exists(\"ncf\")) return;\n\t\t\tinitialize<std::pair<std::string,double> > (\"ncf\",{\"slater\",2.0},\"nuclear correlation factor\");\n\t\t\tinitialize<bool> (\"hessian\",false,\"compute the hessian matrix\");\n\t\t\tinitialize<bool> (\"read_cphf\",false,\"read the converged orbital response for nuclear displacements from file\");\n\t\t\tinitialize<bool> (\"restart_cphf\",false,\"read the guess orbital response for nuclear displacements from file\");\n\t\t\tinitialize<bool> (\"purify_hessian\",false,\"symmetrize the hessian matrix based on atomic charges\");\n\t\t}\n\n\t\tstd::pair<std::string,double> ncf() const {return get<std::pair<std::string,double> >(\"ncf\");}\n\t\tbool hessian() const {return get<bool>(\"hessian\");}\n\n\t};\n\n\npublic:\n\n\t/// ctor\n\n\t/// @param[in]\tworld1\tthe world\n\t/// @param[in]\tcalc\tthe SCF\n//\tNemo(World& world1, std::shared_ptr<SCF> calc, const std::string inputfile);\n\n    Nemo(World& world, const commandlineparser& parser);\n\n\tNemo(World& world, const CalculationParameters& param, const NemoCalculationParameters& nemo_param,\n\t\tconst Molecule& molecule);\n\n    std::string name() const {return \"nemo\";}\n    bool selftest() {return false;}\n\n    static void help() {\n        print_header2(\"help page for NEMO\");\n        print(\"The nemo code computes Hartree-Fock and DFT energies, gradients and hessians using a nuclear correlation factor\");\n        print(\"that regularizes the singular nuclear potential. SCF orbitals for the basis for post-SCF calculations like\");\n        print(\"excitation energies (cis), correlation energies (cc2), local potentials (oep), etc\\n\");\n        print(\"A nemo calculation input is mostly identical to a moldft calculation input, but it uses the additional input\");\n        print(\"parameter ncf (nuclear correlation factor)\\n\");\n        print(\"You can print all available calculation parameters by running\\n\");\n        print(\"nemo --print_parameters\\n\");\n        print(\"You can perform a simple calculation by running\\n\");\n        print(\"nemo --geometry=h2o.xyz\\n\");\n        print(\"provided you have an xyz file in your directory.\");\n\n    }\n\n    static void print_parameters() {\n        NemoCalculationParameters param;\n        print(\"default parameters for the nemo program are\");\n        param.print(\"nemo\",\"end\");\n        print(\"\\n\\nthe molecular geometry must be specified in a separate block:\");\n        Molecule::print_parameters();\n    }\n\n\n\tbool check_converged(const Tensor<double>& x) const {\n    \tdouble xsq = x.sumsq();\n    \treturn (xsq == coords_sum);\n\t}\n\n\tvirtual double value() {return value(calc->molecule.get_all_coords());}\n\n\tvirtual double value(const Tensor<double>& x);\n\n\tvoid load_mos(World& w) {\n\t\tcalc->load_mos(w);\n\t}\n\n\t/// compute dipole moment and gradient at the current geometry\n\tvirtual nlohmann::json analyze() const;\n\n\t/// compute the nuclear gradients\n\tTensor<double> gradient(const Tensor<double>& x);\n\n\tbool provides_gradient() const {return true;}\n\n\t/// returns the molecular hessian matrix at structure x\n\tTensor<double> hessian(const Tensor<double>& x);\n\n\t/// construct the fock operator based on the calculation parameters (K or XC?)\n\tvirtual std::shared_ptr<Fock<double,3>> make_fock_operator() const;\n\n\t/// purify and symmetrize the hessian\n\n\t/// The hessian should be symmetric, but it is not, because\n\t/// \\f[\n\t///  \\langle i^{Y_B}|H^{X_A}|i\\rangle \\neq \\langle i|H^{X_A}|i^{Y_B}\\rangle\n\t/// \\f]\n\t/// does holds analytically, but not numerically. If the two numbers\n\t/// differ, pick the more trustworthy, which is the one with a heavy\n\t/// atom causing the perturbed density and the light atom being the\n\t/// nuclear singularity.\n\t/// @param[in]  hessian the raw hessian\n\t/// @return     a symmetrized hessian\n\tTensor<double> purify_hessian(const Tensor<double>& hessian) const;\n\n\n\t/// solve the CPHF equations for the nuclear displacements\n\n\t/// this function computes that part of the orbital response that is\n\t/// orthogonal to the occupied space. If no NCF's are used this\n\t/// corresponds to the normal response. If NCF's are used the part\n\t/// parallel to the occupied space must be added!\n\t/// \\f[\n\t///     F^X = F^\\perp + F^\\parallel\n\t/// \\f]\n\t/// cf parallel_CPHF()\n\t/// @param[in]  iatom   the atom A to be moved\n\t/// @param[in]  iaxis   the coordinate X of iatom to be moved\n\t/// @return     \\ket{i^X} or \\ket{F^\\perp}\n\tvecfuncT solve_cphf(const size_t iatom, const int iaxis, const Tensor<double> fock,\n\t        const vecfuncT& guess, const vecfuncT& rhsconst,\n\t        const Tensor<double> incomplete_hessian, const vecfuncT& parallel,\n\t        const SCFProtocol& p, const std::string& xc_data) const;\n\n\t/// solve the CPHF equation for all displacements\n\n\t/// this function computes the nemo response F^X\n    /// \\f[\n    ///     F^X = F^\\perp + F^\\parallel\n    /// \\f]\n\t/// To reconstruct the unregularized orbital response (not recommended):\n\t/// \\f[\n\t///   i^X   = R^X F + R F^X\n\t/// \\f]\n\t/// The orbital response i^X constructed in this way is automatically\n\t/// orthogonal to the occupied space because of the parallel term F^\\parallel\n\t/// @return a vector of the nemo response F^X for all displacements\n\tstd::vector<vecfuncT> compute_all_cphf();\n\n    /// this function computes that part of the orbital response that is\n    /// parallel to the occupied space.\n    /// \\f[\n    ///     F^X = F^\\perp + F^\\parallel\n    /// \\f]\n    /// If no NCF's are used F^\\parallel vanishes.\n    /// If NCF's are used this term does not vanish because the derivatives of\n    /// the NCF does not vanish, and it is given by\n    /// \\f[\n    ///  F_i^\\parallel = -\\frac{1}{2}\\sum_k|F_k ><F_k | (R^2)^X | F_i>\n    /// \\f]\n    vecfuncT compute_cphf_parallel_term(const size_t iatom, const int iaxis) const;\n\n    /// compute the IR intensities in the double harmonic approximation\n\n    /// use the projected normal modes; units are km/mol\n    /// @param[in]  normalmodes the normal modes\n    /// @param[in]  dens_pt the perturbed densities for each nuclear displacement\n    Tensor<double> compute_IR_intensities(const Tensor<double>& normalmodes,\n            const vecfuncT& dens_pt) const;\n\n\tstd::shared_ptr<SCF> get_calc() const {return calc;}\n\n    const NemoCalculationParameters& get_nemo_param() const {return nemo_param;}\n\tconst CalculationParameters& get_calc_param() const {return calc->param;}\n\n\tPCM get_pcm()const{return pcm;}\n\n\t/// compute the Fock matrix from scratch\n\ttensorT compute_fock_matrix(const vecfuncT& nemo, const tensorT& occ) const;\n\n\t/// return a reference to the molecule\n\tMolecule& molecule() {return calc->molecule;}\n\n    /// return a reference to the molecule\n    Molecule& molecule() const {\n        return calc->molecule;\n    }\n\n    /// make the density (alpha or beta)\n    real_function_3d make_density(const Tensor<double>& occ,\n            const vecfuncT& nemo) const;\n\n    /// make the density using different bra and ket vectors\n\n    /// e.g. for computing the perturbed density \\sum_i \\phi_i \\phi_i^X\n    /// or when using nemos: \\sum_i R2nemo_i nemo_i\n    real_function_3d make_density(const tensorT & occ,\n            const vecfuncT& bra, const vecfuncT& ket, const bool refine=false) const;\n\n    /// make the derivative of the density\n\n    /// \\f$ \\nabla\\rho = 2R^X R \\rho_R + R^2\\nabla \\rho_R \\f$\n    /// @param[in]  rhonemo    the regularized density\n    /// @param[in]  axis       the component of the nabla operator\n    /// @return     the gradient of the *reconstructed* density\n    real_function_3d make_ddensity(const real_function_3d& rhonemo,\n            const int axis) const;\n\n    /// compute the reduced densities sigma (gamma) for GGA functionals\n    real_function_3d make_sigma(const real_function_3d& rho1,\n            const real_function_3d& rho2) const;\n\n\n    /// the Laplacian of the density\n\n    /// The Laplacian should currently only be used for subsequent convolution\n    /// with a Green's function (which is reasonably stable), but not on its own!\n    ///\n    /// The Laplacian of the cuspy density is numerically fairly unstable:\n    ///  - a singular term may be rewritten using the nuclear potential (see below)\n    ///  - the Laplacian of the regularized density is still very noisy\n    ///\n    /// It may be computed as\n    /// \\f[\n    ///   \\Delta \\rho = \\Delta (R^2 \\rho_R)\n    ///          = \\Delta (R^2) \\rho_R + 2\\nabla R \\nabla \\rho_R + R^2 \\Delta \\rho_R\n    ///          = 2 R^2 U1^2 \\rho_R -4 R^2 ( U-V ) \\rho_R + R^2 \\Delta\\rho_R\n    /// \\f]\n    /// where we can use the identity\n    /// \\f[\n    ///   U=V + R^{-1}[T,R]\n    ///   -2 R (U-V) = \\Delta R + 2\\nabla R\\dot \\nabla\n    /// \\f]\n    /// first term comes from the definition of the U potential as the commutator\n    /// over the kinetic energy (aka the Laplacian)\n    /// @param[in]  rhonemo    the regularized density \\rho_R\n    /// @return     the laplacian of the reconstructed density \\Delta (R^2\\rho_R)\n    real_function_3d make_laplacian_density(const real_function_3d& rhonemo) const;\n\n    /// compute the kinetic energy potential using Eq. (16) of\n    /// R. A. King and N. C. Handy, “Kinetic energy functionals from the Kohn–Sham potential,”\n    /// Phys. Chem. Chem. Phys., vol. 2, no. 22, pp. 5049–5056, 2000.\n    real_function_3d kinetic_energy_potential(const vecfuncT& nemo) const;\n\n\n    /// smooth a function by projecting it onto k-1 and then average with k\n\n    /// kept it here for further testing\n    static void smoothen(real_function_3d& f) {\n        int k=f.get_impl()->get_k();\n        real_function_3d fproj=project(f,k-1);\n        real_function_3d freproj=project(fproj,k);\n        f=0.5*(f+freproj);\n    }\n\nprotected:\n\n\tstd::shared_ptr<SCF> calc;\n\npublic:\n    const NemoCalculationParameters nemo_param;\n\nprotected:\n    projector_irrep symmetry_projector;\n\npublic:\n\n    /// return the symmetry_projector\n    projector_irrep get_symmetry_projector() const {\n    \treturn symmetry_projector;\n    }\n\nprivate:\n\n\t/// sum of square of coords at last solved geometry\n\tmutable double coords_sum;\n\nprotected:\n\t/// a poisson solver\n\tstd::shared_ptr<real_convolution_3d> poisson;\n\n\t/// asymptotic correction for DFT\n\tAC<3> ac;\n\n//    /// apply the AC scheme of Tozer/Handy with the multipole approximation\n//    Function<double,3> apply_ac(const Function<double,3>& vxc)const{\n//    \treturn ac.apply(vxc);\n//    }\n//\n//    /// apply the AC scheme of Tozer/Handy using the hartree potential\n//    Function<double,3> apply_ac(const Function<double,3>& vxc, const Function<double,3>& vhartree)const{\n//    \treturn ac.apply(vxc,vhartree);\n//    }\n//\n//    /// apply the AC scheme of Tozer/Handy\n//    Function<double,3> apply_ac_excited(Function<double,3>& vxc, const Function<double,3>& vhartree)const{\n//    \treturn ac.apply_potential(vxc,vhartree);\n//    }\n\nprivate:\n\t/// polarizable continuum model\n\tPCM pcm;\n//\tAC<3> ac;\n\nprotected:\n\t/// adapt the thresholds consistently to a common value\n    void set_protocol(const double thresh) {\n\n        calc->set_protocol<3>(world,thresh);\n\n        if (need_recompute_factors_and_potentials(thresh)) {\n            timer timer1(world,get_calc_param().print_level()>2);\n            get_calc()->make_nuclear_potential(world);\n            construct_nuclear_correlation_factor(calc->molecule, calc->potentialmanager, get_nemo_param().ncf());\n            timer1.end(\"reproject ncf\");\n        }\n\n        // (re) construct the Poisson solver\n        poisson = std::shared_ptr<real_convolution_3d>(\n                CoulombOperatorPtr(world, get_calc_param().lo(), FunctionDefaults<3>::get_thresh()));\n\n        // set thresholds for the MOs\n        set_thresh(world,calc->amo,thresh);\n        set_thresh(world,calc->bmo,thresh);\n\n    }\n\n\t/// solve the HF equations\n\tdouble solve(const SCFProtocol& proto);\n\n    /// given nemos, compute the HF energy using the regularized expressions for T and V\n    std::vector<double> compute_energy_regularized(const vecfuncT& nemo, const vecfuncT& Jnemo,\n            const vecfuncT& Knemo, const vecfuncT& Unemo) const;\n\n\t/// compute the reconstructed orbitals, and all potentials applied on nemo\n\n\t/// to use these potentials in the fock matrix computation they must\n\t/// be multiplied by the nuclear correlation factor\n\t/// @param[in]\tnemo\tthe nemo orbitals\n\t/// @param[out]\tJnemo\tCoulomb operator applied on the nemos\n\t/// @param[out]\tKnemo\texchange operator applied on the nemos\n\t/// @param[out]\tpcmnemo\tPCM (solvent) potential applied on the nemos\n\t/// @param[out]\tUnemo\tregularized nuclear potential applied on the nemos\n\tvoid compute_nemo_potentials(const vecfuncT& nemo,\n\t\t\tvecfuncT& Jnemo, vecfuncT& Knemo, vecfuncT& xcnemo, vecfuncT& pcmnemo,\n\t\t\tvecfuncT& Unemo) const;\n\n\t/// return the Coulomb potential\n\treal_function_3d get_coulomb_potential(const vecfuncT& psi) const;\n\n\t/// compute the incomplete hessian\n\n\t/// incomplete hessian is the nuclear-nuclear contribution, and the\n\t/// contribution from the second derivative of the nuclear potential,\n\t/// and also the derivative of the nuclear correlation factor.\n\t/// i.e. all contributions that *do not* contain the regularized perturbed\n\t/// density, but it will contain parts of the perturbed density\n\tTensor<double> make_incomplete_hessian() const;\n\n    /// compute the complementary incomplete hessian\n\n\t/// @param[in]  xi the response functions including the parallel part\n    Tensor<double> make_incomplete_hessian_response_part(\n            const std::vector<vecfuncT>& xi) const;\n\n\t/// compute the constant term for the CPHF equations\n\n\t/// mainly all terms with the nuclear correlation factor's derivatives\n\tvecfuncT make_cphf_constant_term(const size_t iatom, const int iaxis,\n\t        const vecfuncT& R2nemo, const real_function_3d& rhonemo) const;\n\npublic:\n\n\tbool is_dft() const {return calc->xc.is_dft();}\n\n\tbool do_pcm() const {return get_calc_param().pcm_data() != \"none\";}\n\t\n\tbool do_ac() const {return get_calc_param().ac_data() != \"none\";}\n\n\tAC<3> get_ac() const {return ac;}\n\n\tbool do_symmetry() const {return (symmetry_projector.get_pointgroup()!=\"C1\");}\n\nprotected:\n\n\t/// localize the nemo orbitals\n    vecfuncT localize(const vecfuncT& nemo, const double dconv, const bool randomize) const;\nprotected:\n\t/// return the threshold for vanishing elements in orbital rotations\n    double trantol() const {\n        return calc->vtol / std::min(30.0, double(get_calc()->amo.size()));\n    }\n\n    void make_plots(const real_function_3d &f,const std::string &name=\"function\")const{\n        double width = FunctionDefaults<3>::get_cell_min_width()/2.0 - 1.e-3;\n        plot_plane(world,f,name);\n        coord_3d start(0.0); start[0]=-width;\n        coord_3d end(0.0); end[0]=width;\n        plot_line((\"line_\"+name).c_str(),1000,start,end,f);\n    }\n\n    /// save a function\n    template<typename T, size_t NDIM>\n    void save_function(const std::vector<Function<T,NDIM> >& f, const std::string name) const;\n\n    /// load a function\n    template<typename T, size_t NDIM>\n    void load_function(std::vector<Function<T,NDIM> >& f, const std::string name) const;\n\n};\n\n/// save a function\ntemplate<typename T, size_t NDIM>\nvoid Nemo::save_function(const std::vector<Function<T,NDIM> >& f, const std::string name) const {\n    if (world.rank()==0) print(\"saving vector of functions\",name);\n    archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, name.c_str(), 1);\n    ar & f.size();\n    for (const Function<T,NDIM>& ff:f)  ar & ff;\n}\n\n/// load a function\ntemplate<typename T, size_t NDIM>\nvoid Nemo::load_function(std::vector<Function<T,NDIM> >& f, const std::string name) const {\n    if (world.rank()==0) print(\"loading vector of functions\",name);\n    archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, name.c_str(), 1);\n    std::size_t fsize=0;\n    ar & fsize;\n    f.resize(fsize);\n    for (std::size_t i=0; i<fsize; ++i) ar & f[i];\n}\n\n}\n\n#endif /* NEMO_H_ */\n\n"
  },
  {
    "path": "src/madness/chem/oep.cc",
    "content": "/*\n * oep.cpp\n *\n *  Created on: Nov 6, 2019\n *      Author: fbischoff\n */\n\n#include<madness/chem/oep.h>\n#include<madness/chem/BSHApply.h>\n#include <madness/world/test_utilities.h>\n\n\n\nnamespace madness {\n\n/// Iterative energy calculation for approximate OEP with EXACT EXCHANGE functional\n/// for other functionals, slater potential must be modified\n/// HF orbitals and eigenvalues are used as the guess here\n/// note that KS_nemo is a reference and changes oep->get_calc()->amo orbitals\n/// same for orbital energies (eigenvalues) KS_eigvals which is oep->get_calc()->aeps\n/// converged if norm, total energy difference and orbital energy differences (if not OAEP) are converged\ndouble OEP::solve(const vecfuncT& HF_nemo1) {\n\n\t// recompute HF Fock matrix and orbitals\n\tauto [HF_Fock, HF_nemo] = recompute_HF(HF_nemo1);\n\n\t// compute Slater potential Vs and average IHF from HF orbitals and eigenvalues\n\tconst real_function_3d Vs = compute_slater_potential(HF_nemo);\n\tif (oep_param.saving_amount() >= 1) save(Vs, \"Slaterpotential\");\n\tsave(Vs, \"Slaterpotential\");\n\n\ttensorT KS_Fock=copy(HF_Fock);\n    real_function_3d Voep = copy(Vs);\n\tif (oep_param.restart()) {\n\t\tload_restartdata(KS_Fock);\n\t}\n\n\t// deep copy KS_nemo MOs\n\tvecfuncT KS_nemo = copy(world,calc->amo);\n\n\tfor (std::string model : oep_param.model()) {\n\t\tOEPResults r=iterate(model,HF_nemo,HF_Fock,KS_nemo,KS_Fock,Voep,Vs);\n\n\t\tPropertyResults pr=Nemo::analyze();\n\t\tpr.energy= r.Econv;\n\t\tr.aeps=calc->aeps;\n\t\tr.properties=pr;\n\t\tresults.push_back(r);\n\t}\n\n\tprint(\"KS_Fock after convergence\");\n\tprint(KS_Fock);\n\tauto [eval, evec] = syev(KS_Fock);\n\tcalc->aeps=eval;\n\tcalc->amo=KS_nemo;\n\n\tVfinal=copy(Voep);\n    save_restartdata(KS_Fock);\n\n\tprintf(\"      +++ FINAL TOTAL %s ENERGY = %15.8f  Eh +++\\n\\n\\n\", oep_param.model().back().c_str(), results.back().Econv);\n\treturn results.back().Econv;\n}\n\nvoid OEP::output_calc_info_schema(const double& energy) const {\n    nlohmann::json j;\n    j[\"scf_eigenvalues_a\"]=tensor_to_json(calc->aeps);\n    j[\"model\"]=oep_param.model().back();\n    j[\"driver\"]=\"energy\";\n    j[\"return_energy\"]=energy;\n    update_schema(get_calc_param().prefix()+\".oep_calc_info\", j);\n}\n\n\nvoid OEP::save_restartdata(const Tensor<double>& fock) const {\n\tif (world.rank()==0) print(\"saving OEP orbitals to file restartdata_OEP\");\n    MolecularOrbitals<double,3> mo;\n    mo.update_mos_and_eps(get_calc()->get_amo(),get_calc()->aeps);\n    mo.update_occ(get_calc()->aocc);\n    mo.recompute_irreps(get_calc()->param.pointgroup(),R_square);\n\n    projector_irrep p=projector_irrep(calc->param.pointgroup())\n            .set_ordering(\"keep\").set_verbosity(0).set_orthonormalize_irreps(false);\n    auto Vfinal1=p(Vfinal)[0];\n\n    archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, \"restartdata_OEP\");\n    ar & mo & fock & Vfinal1;\n//    MolecularOrbitals<double,3> amo=to_MO();\n//    archive::ParallelOutputArchive ar(world, \"restartdata_OEP\");\n//\tar & amo & fock & Vfinal;\n}\n\nvoid OEP::load_restartdata(Tensor<double>& fock) {\n\tif (world.rank()==0) print(\"loading OEP orbitals from file restartdata_OEP\");\n\tarchive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, \"restartdata_OEP\");\n\tMolecularOrbitals<double,3> mo;\n\tar & mo & fock & Vfinal;\n\tmo.pretty_print(\"OEP MOs from file\");\n\tget_calc()->amo=mo.get_mos();\n    get_calc()->aeps=mo.get_eps();\n    get_calc()->aset=mo.get_localize_sets();\n    get_calc()->aocc=mo.get_occ();\n//    MolecularOrbitals<double,3> amo;\n//    ar & amo & fock & Vfinal;\n    projector_irrep p=projector_irrep(calc->param.pointgroup())\n            .set_ordering(\"keep\").set_verbosity(0).set_orthonormalize_irreps(false);\n    Vfinal=p(Vfinal)[0];\n//    calc->amo=amo.get_mos();\n}\n\nstd::tuple<Tensor<double>, vecfuncT> OEP::recompute_HF(const vecfuncT& HF_nemo) const {\n\n\ttimer timer1(world);\n    const vecfuncT R2nemo=truncate(R_square*HF_nemo);\n    Fock<double,3> F(world,get_reference().get());\n    Tensor<double> HF_Fock=F(R2nemo,HF_nemo);\n\tvecfuncT nemo_new=HF_nemo;\n\ttimer1.end(\"recompute HF\");\n\treturn std::make_tuple(HF_Fock, nemo_new);\n}\n\n/// the OEP Fock operator is the HF Fock operator without exchange but with the OEP\nstd::shared_ptr<Fock<double,3>> OEP::make_fock_operator() const {\n    Fock<double,3> fock(world,get_reference().get());\n    MADNESS_CHECK(fock.remove_operator((\"K\")));\n    LocalPotentialOperator<double,3> Voep(world,\"Voep\",Vfinal);\n    fock.add_operator(\"Voep\",std::make_shared<LocalPotentialOperator<double,3> >(Voep));\n    return std::make_shared<Fock<double,3>>(fock);\n}\n\nOEPResults OEP::compute_and_print_final_energies(const std::string model, const real_function_3d& Voep,\n\t\tconst vecfuncT& KS_nemo, const tensorT& KS_Fock,\n\t\tconst vecfuncT& HF_nemo, const tensorT& HF_Fock) const {\n\n\t// print final orbital energies\n\tauto [KS_eigvals, evec1] = syev(KS_Fock);\n\n\tprint(\"final\", model, \"canonical orbital energies (no level alignment included):\");\n\tprint_orbens(KS_eigvals);\n\n    auto [eval1, evec2] = syev(HF_Fock);\n    double homoHF = eval1.max();\n    double homoKS = KS_eigvals.max();\n    print(\"canonical HF HOMO energy\",homoHF);\n    print(\"canonical KS HOMO energy\",homoKS);\n\n    // final Jnemo and Knemo have to be computed again in order to calculate final energy\n\tvecfuncT Jnemo, Knemo, Knemo_HF;\n\tcompute_coulomb_potential(KS_nemo, Jnemo);\n\tcompute_exchange_potential(KS_nemo, Knemo);\n\n\tExchange<double,3> K(world,get_calc_param().lo());\n    K.set_bra_and_ket(R_square * HF_nemo, HF_nemo);\n\tdouble Ex_HF=-inner(R_square*HF_nemo,K(HF_nemo));\n\n\t// compute final exchange energy using different methods and final kinetic energy\n\tdouble Ex_vir = compute_exchange_energy_vir(KS_nemo, Voep);\n\tdouble Ex_conv = compute_exchange_energy_conv(R_square*KS_nemo, Knemo);\n//\tdouble Ex_HF = compute_exchange_energy_conv(R_square*HF_nemo, Knemo_HF);\n\tdouble Ekin_KS = compute_kinetic_energy(KS_nemo); // like Ts in Ospadov_2017, equation (22)\n\tdouble Ekin_HF = compute_kinetic_energy(HF_nemo); // like T in Ospadov_2017, equation (22)\n\tdouble Tc = Ekin_HF - Ekin_KS; // like Tc = T - Ts in Ospadov_2017, equation (24)\n\n\treal_function_3d rho_KS = compute_density(KS_nemo);\n\treal_function_3d rho_HF = compute_density(HF_nemo);\n\tdouble Drho = compute_delta_rho(rho_HF, rho_KS);\n\n\n\tprint(\"FINAL\", model, \"ENERGY Evir:\");\n\t//double Evir = compute_energy(KS_nemo, Ex_vir)[0];\n\n\tprint(\"FINAL\", model, \"ENERGY Econv:\");\n\tdouble Econv = compute_energy(KS_nemo, Ex_conv)[0];\n\n\n\tprintf(\"     Ex_vir       = %15.8f  Eh\", Ex_vir);\n\tprintf(\"\\n     Ex_conv      = %15.8f  Eh\", Ex_conv);\n\tprintf(\"\\n     Ex_HF        = %15.8f  Eh\\n\", Ex_HF);\n\n\tprintf(\"\\n     Ekin_HF (T)  = %15.8f  Eh\", Ekin_HF);\n\tprintf(\"\\n     Ekin_KS (Ts) = %15.8f  Eh\\n\", Ekin_KS);\n\n\tprintf(\"\\n     DEvir_14     = %15.8f mEh\", (Ex_vir - Ex_conv)*1000.0); // like in Kohut_2014, equation (45)\n\tprintf(\"\\n     DEvir_17     = %15.8f mEh\\n\", (Ex_vir - Ex_HF - 2.0*Tc)*1000.0); // like in Ospadov_2017, equation (28)\n\tprint(\"     Drho         =     \", Drho, \"e\\n\\n\");\n\n\tif (not get_calc_param().do_localize()) {\n\t\tprint(\"---------------------------------------------------------------------------\");\n\t\tdouble E_0 = compute_E_zeroth(KS_eigvals);\n\t\tdouble E_1 = compute_E_first(R*KS_nemo, R*Jnemo, R*Knemo, Voep);\n\n\t\tprintf(\"  E^(0)               = %15.8f  Eh\", E_0);\n\t\tprintf(\"\\n  E^(1)               = %15.8f  Eh\", E_1);\n\t\tprintf(\"\\n  E^(0) + E^(1)       = %15.8f  Eh\", E_0 + E_1);\n\t\tprintf(\"\\n  difference to Econv = %15.8f mEh\\n\\n\", (E_0 + E_1 - Econv)*1000.0);\n\t}\n\tTensor<double> f_pp = compute_fock_diagonal_elements(calc->aeps, KS_nemo, Knemo, Voep);\n\n//\tprint(\"KS Fock matrix elements using Voep/virial \", calc->aeps);\n\tprint(\"KS Fock matrix elements using K operator  \", f_pp);\n\n\tOEPResults results;\n\tresults.devir14= (Ex_vir - Ex_conv); // like in Kohut_2014, equation (45)\n\tresults.devir17= (Ex_vir - Ex_HF - 2.0*Tc); // like in Ospadov_2017, equation (28)\n\tresults.drho=Drho;\n\tresults.Ex_conv=Ex_conv;\n\tresults.Ex_vir=Ex_vir;\n\tresults.Ex_HF=Ex_HF;\n\tresults.E_kin_HF=Ekin_HF;\n\tresults.E_kin_KS=Ekin_KS;\n\tresults.model=model;\n\tresults.Econv=Econv;\n\tresults.scf_total_energy=Econv;\n\n\treturn results;\n}\n\nOEPResults OEP::iterate(const std::string model, const vecfuncT& HF_nemo, const tensorT& HF_Fock,\n\t\tvecfuncT& KS_nemo, tensorT& KS_Fock, real_function_3d& Voep, const real_function_3d Vs) const {\n\n\tbool print_debug=(get_calc_param().print_level()>=10) and (world.rank()==0);\n\n\t// compute the constant HF contributions to the OEP hierarchy\n\tconst real_function_3d ocep_numerator_HF=-1.0*compute_energy_weighted_density_local(HF_nemo,HF_Fock);\n\tconst real_function_3d dcep_numerator_HF=compute_total_kinetic_density(HF_nemo);\n\tconst real_function_3d mrks_numerator_HF=compute_Pauli_kinetic_density(HF_nemo);\n\tif (oep_param.saving_amount() >= 1) {\n\t\tsave(ocep_numerator_HF,\"ocep_numerator_HF\");\n\t\tsave(dcep_numerator_HF,\"dcep_numerator_HF\");\n\t\tsave(mrks_numerator_HF,\"mrks_numerator_HF\");\n\t}\n\n\n//\ttypedef allocator<double, 3> allocT;\n//\ttypedef XNonlinearSolver<std::vector<Function<double, 3> >, double, allocT> solverT;\n//\tallocT alloc(world, KS_nemo.size());\n//\tsolverT solver(allocT(world, KS_nemo.size()),param.print_level()>4);\n    auto solver= nonlinear_vector_solver<double,3>(world,KS_nemo.size());\n\tsolver.set_maxsub(get_calc_param().maxsub());\n\n\tdouble energy=0.0;\n\tstd::vector<double> energies(1,0.0);\n\tbool converged=false;\n\n\ttimer timer1(world,get_calc_param().print_level()>=3);\n\tfor (size_t iter = 0; iter < oep_param.maxiter(); ++iter) {\n\n\t    if (get_calc_param().do_localize()) {\n\t    \tfor (size_t i=0; i<KS_nemo.size(); ++i) calc->aeps(i)=KS_Fock(i,i);\n\t    \tKS_nemo=localize(KS_nemo,get_calc_param().econv(),iter==0);\n\t    \tif (get_calc_param().print_level()>=10)\n\t    \t\tSCF::analyze_vectors(world, KS_nemo, calc->ao, calc->vtol, calc->molecule, get_calc_param().print_level(),\n\t    \t\t\tcalc->aobasis, calc->aocc, tensorT(), calc->aset );\n\t    \t// calc->analyze_vectors(world,KS_nemo,calc->aocc,tensorT(),calc->aset);\n\t    }\n\t    if (do_symmetry()) {\n\t\t    std::vector<std::string> str_irreps;\n\t    \tKS_nemo=symmetry_projector(KS_nemo,R_square,str_irreps);\n            if (world.rank()==0) print(\"orbital irreps\",str_irreps);\n\t    }\n\n\t    // compute parts of the KS Fock matrix J, Unuc and Voep\n\t\tvecfuncT Jnemo, Unemo, Fnemo;\n\t\tcompute_nemo_potentials(KS_nemo, Jnemo, Unemo);\n\t\tvecfuncT R2KS_nemo = truncate(R_square*KS_nemo);\n\n\t\ttimer1.tag(\"compute potentials\");\n\n\t\tVoep=copy(Vs);\n\n\t\t// treat ocep correction separately as it depends on the KS Fock matrix\n\t\ttensorT Fock_ocep;\n\t\tif (need_ocep_correction(model)) {\n\t\t\treal_function_3d ocep_correction = compute_ocep_correction(ocep_numerator_HF, HF_nemo,KS_nemo,HF_Fock,KS_Fock);\n\t\t\tFock_ocep=matrix_inner(world,R2KS_nemo,ocep_correction*KS_nemo);\n\t\t\tif (oep_param.save_iter_corrections()>0 and (iter%oep_param.save_iter_corrections()==0))\n\t\t\t\tsave(ocep_correction,\"ocep_correction\"+std::to_string(iter));\n\t\t}\n\n\t\tif (need_dcep_correction(model)) {\n\t\t\treal_function_3d dcep_correction=compute_dcep_correction(dcep_numerator_HF, HF_nemo,KS_nemo);\n\t\t\tVoep += dcep_correction;\n\t\t\tif (oep_param.save_iter_corrections()>0 and (iter%oep_param.save_iter_corrections()==0))\n\t\t\t\tsave(dcep_correction,\"dcep_correction\"+std::to_string(iter));\n\t\t}\n\n\t\tif (need_mrks_correction(model)) {\n\t\t\treal_function_3d mrks_correction=compute_mrks_correction(mrks_numerator_HF, HF_nemo,KS_nemo);\n\t\t\tVoep += mrks_correction;\n\t\t\tif (oep_param.save_iter_corrections()>0 and (iter%oep_param.save_iter_corrections()==0))\n\t\t\t\tsave(mrks_correction,\"mrks_correction\"+std::to_string(iter));\n\t\t}\n\n\t\tFnemo = (Jnemo + Unemo + Voep*KS_nemo);\n\n\t\ttensorT Fock_no_ocep = matrix_inner(world, R2KS_nemo, Fnemo, false);\n\t\tKinetic<double,3> T(world);\n\t\tFock_no_ocep += T(R2KS_nemo, KS_nemo);\n\n\t\t// recompute the OCEP correction with the updated Fock matrix\n\t\tif (need_ocep_correction(model)) {\n\t\t\treal_function_3d ocep_correction;\n\t\t\tfor (int i=0; i<5; ++i) {\n\t\t\t\tocep_correction= compute_ocep_correction(ocep_numerator_HF, HF_nemo,KS_nemo,HF_Fock,KS_Fock);\n\t\t\t\tFock_ocep=matrix_inner(world,R2KS_nemo,ocep_correction*KS_nemo);\n\t\t\t\ttensorT KS_Fock_old=copy(KS_Fock);\n\t\t\t\tKS_Fock=Fock_no_ocep+Fock_ocep;\n\t\t\t\tif ((KS_Fock_old-KS_Fock).normf()<get_calc_param().econv()) break;\n\t\t\t\tif (print_debug) {\n\t\t\t\t\tprint(\"fock with updated ocep Fock matrix, ocep micro\",i);\n\t\t\t\t\tprint(KS_Fock);\n\t\t\t\t}\n\t\t\t}\n\t\t\tVoep+=ocep_correction;\n\t\t\tFnemo+=(ocep_correction*KS_nemo);\n\t\t} else {\n\t\t\tKS_Fock=copy(Fock_no_ocep);\n\t\t}\n\n\t\ttimer1.tag(\"compute oep\");\n\n\t\tif (not get_calc_param().do_localize()) {\n\n\t\t\t// report the off-diagonal Fock matrix elements because canonical orbitals are used\n\t\t\ttensorT F_offdiag = copy(KS_Fock);\n\t\t\tfor (int i = 0; i < KS_Fock.dim(0); ++i) F_offdiag(i, i) = 0.0;\n\t\t\tdouble max_F_offidag = F_offdiag.absmax();\n\t\t\tif (print_debug) print(\"F max off-diagonal \", max_F_offidag);\n\n\t\t\t// diagonalize the Fock matrix to get the eigenvalues and eigenvectors (canonical)\n\t\t\t// FC = epsilonSC and X^dSX with transform matrix X, see Szabo/Ostlund (3.159) and (3.165)\n\t\t\ttensorT overlap = matrix_inner(world, R*KS_nemo, R*KS_nemo, true);\n\t\t\ttensorT KSeig;\n\t\t\ttensorT X = calc->get_fock_transformation(world, overlap, KS_Fock, KSeig, calc->aocc,\n\t\t\t\t\tFunctionDefaults<3>::get_thresh());\n\t\t\tKS_nemo = truncate(transform(world, KS_nemo, X));\n\t\t\tnormalize(KS_nemo,R);\n\t\t\t// rotate_subspace(world, X, solver, 0, KS_nemo.size());\n\t\t\tFnemo = transform(world, Fnemo, X);\n\n\t\t\ttimer1.tag(\"canonicalization\");\n\t\t}\n\t\tFnemo=truncate(Fnemo);\n\n        projector_irrep p=projector_irrep(calc->param.pointgroup())\n                .set_ordering(\"keep\").set_verbosity(0).set_orthonormalize_irreps(false);\n        Voep=p(Voep)[0];\n\n        // compute new (current) energy\n        //double old_energy = energy;\n        double Ex_KS = compute_exchange_energy_vir(KS_nemo, Voep);\n\n\t\tstd::vector<double> oldenergies=energies;\n        energies=compute_energy(KS_nemo, Ex_KS);\n        energy =energies[0];\n\n\t\ttimer1.tag(\"compute energy\");\n\n\t\tBSHApply<double,3> bsh_apply(world);\n\t\tbsh_apply.metric=R_square;\n\t\tbsh_apply.levelshift=oep_param.levelshift();\n\t\tbsh_apply.lo=get_calc()->param.lo();\n\t\tauto [residual,eps_update] =bsh_apply(KS_nemo,KS_Fock,Fnemo);\n\t\ttimer1.tag(\"apply BSH\");\n\n\t\tdouble bshnorm=norm2(world,residual)/sqrt(KS_nemo.size());\n\n\t\t// KAIN solver (helps to converge)\n\t\tvecfuncT nemo_new = (solver.update(KS_nemo, residual, oep_param.kain_param()[0], oep_param.kain_param()[1]));\n\t\ttruncate(world, nemo_new);\n\t\tnormalize(nemo_new,R);\n\n\t\t// estimate the orbital energies, as they enter the potential\n\t\tif (get_calc_param().print_level()>=10)  print(KS_Fock);\n\n\t\t// What is step restriction?\n\t\tcalc->do_step_restriction(world, KS_nemo, nemo_new, \"ab spin case\");\n\t\torthonormalize(nemo_new,R);\n\t\tKS_nemo = nemo_new;\n\t\ttimer1.tag(\"post-process\");\n\t\tif (oep_param.saving_amount() >= 3)\n\t\t\tfor (size_t n=0; n<KS_nemo.size(); ++n) save(KS_nemo[n], \"KS_nemo\"+stringify(n)+\"iter\"+stringify(iter));\n\n\t\tdouble deltadensity=0.0;\n\t\tconverged=check_convergence(energies,oldenergies,bshnorm,deltadensity,get_calc_param(),\n\t\t\t\tget_calc_param().econv(),get_calc_param().dconv());\n\t\tif (world.rank() == 0) {\n\t\t\tprintf(\"\\nfinished %s iteration %2lu at time %8.1fs with energy %12.8f; residual %12.8f\\n\\n\",\n\t\t\t\t\tmodel.c_str(), iter, wall_time(), energy,bshnorm);\n\t\t}\n\n\t\tif (converged) break;\n\t}\n\n\tif (world.rank()==0) {\n\t\tif (converged) print(\"\\n     +++ Iterations converged +++\\n\");\n\t\telse print(\"\\n     --- Iterations failed ---\\n\\n\");\n\t}\n\tauto results=compute_and_print_final_energies(model,Voep,KS_nemo,KS_Fock,HF_nemo,HF_Fock);\n\tif (not converged) results.Econv=0.0;\n\treturn results;\n}\n\n\n/// The following function tests all essential parts of the OEP program qualitatively and some also quantitatively\nbool OEP::selftest() {\n\n    printf(\"\\n   +++ starting test of the OEP program +++\\n\\n\");\n\n\t// hack away constness for the refence here\n    const_cast<Nemo*>(reference.get())->value();\n    calc->copy_data(world,*(reference->get_calc()));\n\n    print(\"HF Fock operator \", reference->make_fock_operator()->info());\n    print(\"OEP Fock operator\", make_fock_operator()->info());\n\n    const vecfuncT& HF_nemo1=reference->get_calc()->get_amo();\n\tint ierr=0;\n\tset_protocol(get_calc_param().econv());\n\n    // Start by testing all important functions. If something severe fails, they throw an exception\n    print(\"\\n   >> test calculation of all important functions - severe errors will cause an exception\\n\");\n\n    test_output hfdens(\"test construction of HF density\");\n    const real_function_3d rho_HF = compute_density(HF_nemo1);\n    hfdens.end(true);\n\n    test_output hf_recompute(\"test recomputation of HF orbitals and fock matrix\");\n\tauto [HF_Fock, HF_nemo] = recompute_HF(HF_nemo1);\n\tdouble err_hf=norm2(world,HF_nemo1-HF_nemo);\n\thf_recompute.end(err_hf<get_calc_param().econv());\n\n    test_output slater(\"test computation of the Slater potential\");\n    const real_function_3d Vs = compute_slater_potential(HF_nemo);\n    double refn1=1.70581413e+01;\n    double n1=Vs.norm2();\n    slater.logger << \"  norm of the Slater potential \" << n1 << std::endl;\n    ierr+=slater.end(fabs(n1-refn1) < get_calc_param().econv());\n\n    test_output ihf(\"test computation of the energy_weighted density IHF\");\n    const real_function_3d IHF = compute_energy_weighted_density_local(HF_nemo,HF_Fock);\n    double refn2=4.48800120e+00;\n    double n2=IHF.norm2();\n    ihf.logger << \"  norm of the IHF potential \" << n2 << std::endl;\n    ierr+=ihf.end(fabs(n2-refn2) < get_calc_param().econv());\n\n    test_output kinhf(\"test computation of the kinetic density for dcep\");\n    const real_function_3d kin_tot_HF = compute_total_kinetic_density(HF_nemo);\n    double refn3=7.02281570e+00;\n    double n3=kin_tot_HF.norm2();\n    kinhf.logger << \"  norm of the kin_tot_HF potential \" << n3 << std::endl;\n    ierr+=kinhf.end(fabs(n3-refn3) < get_calc_param().econv());\n\n    test_output paulihf(\"test computation of the pauli kinetic density for mrks\");\n    const real_function_3d kin_P_HF = compute_Pauli_kinetic_density(HF_nemo);\n    double refn4= 7.59945929e-02;\n    double n4=kin_P_HF.norm2();\n    paulihf.logger << \"  norm of the kin_P_HF potential \" << n4 << std::endl;\n    ierr+=paulihf.end(fabs(n4-refn4) < get_calc_param().econv());\n\n    print(\"\\n   >> test some quantities based on the reference HF calculation\\n\");\n\n    vecfuncT Knemo;\n\tcompute_exchange_potential(HF_nemo, Knemo);\n\n    test_output conv_hf(\"test conventional HF exchange energy\");\n    const double Exconv_HF_correct = -2.66691504; // exchange energy from nemo calculation\n    conv_hf.logger << \"HF exchange energy of the system should be \" <<  Exconv_HF_correct << \" Eh\" << std::endl;\n    const double Exconv_HF = compute_exchange_energy_conv(R*HF_nemo, R*Knemo);\n    const double Exconv_HF_diff = fabs(Exconv_HF_correct - Exconv_HF);\n    conv_hf.logger << \"the HF exchange energy of the system is ... \" <<  Exconv_HF <<\" Eh\" << std::endl;\n    conv_hf.logger << \"the error is ... \" <<  std::scientific << Exconv_HF_diff <<\" Eh\" << std::endl;\n    ierr+=conv_hf.end(Exconv_HF_diff < get_calc_param().econv());\n\n\n    test_output slater_x(\"test HF exchange energy via Slater potential\");\n    const double ExVs_HF_correct = -2.666912; // exchange energy from nemo calculation\n    slater_x.logger << \"  HF exchange energy of the system should be \"\n    \t\t<< std::scientific << std::setprecision(8) <<  ExVs_HF_correct << \" Eh\"<<std::endl;\n    const double ExVs_HF = 0.5*inner(rho_HF, Vs);\n    const double ExVs_HF_diff = fabs(ExVs_HF_correct - ExVs_HF);\n    slater_x.logger <<\"  the HF exchange energy of the system is ... \" << ExVs_HF << \" Eh\" << std::endl;\n    slater_x.logger <<\"  error: \"  << ExVs_HF_diff <<  \" Eh\" << std::endl;;\n    ierr+=slater_x.end(ExVs_HF_diff < get_calc_param().econv());\n\n\n    test_output slater_x_vir(\"test virial HF exchange energy (with Slater potential)\");\n    const double Exvir_HF_correct = -3.00661935; // exchange energy from a test calculation with HF reference\n    slater_x_vir.logger << \"  HF virial exchange energy of the system should be \"\n    \t\t<< std::scientific << std::setprecision(8) << Exvir_HF_correct << \" Eh\" << std::endl;\n    const double Exvir_HF = compute_exchange_energy_vir(HF_nemo, Vs);\n    const double Exvir_HF_diff = fabs(Exvir_HF_correct - Exvir_HF);\n    slater_x_vir.logger << \"  the virial HF exchange energy of the system is ... \" << Exvir_HF <<\" Eh\" << std::endl;\n    slater_x_vir.logger << \"  error: \" << Exvir_HF_diff << \" Eh\" << std::endl;\n    ierr+=slater_x_vir.end(Exvir_HF_diff < get_calc_param().econv());\n\n\n    print(\"\\n   >> test solve_oep function with oaep model for 2 iterations\\n\");\n\n    tensorT KS_Fock=copy(HF_Fock);\n\tvecfuncT KS_nemo = copy(world,calc->amo);\n\treal_function_3d Voep = copy(Vs);\n\t//double energy=iterate(\"oaep\",HF_nemo,HF_Fock,KS_nemo,KS_Fock,Voep,Vs);\n\n\n    test_output ihf_vir(\"test virial ocep exchange energy\");\n    save(IHF,\"IHF\");\n    vecfuncT empty; tensorT fock0(2,2);\n    real_function_3d V_HFocep = compute_ocep_correction(IHF, HF_nemo, KS_nemo, HF_Fock, KS_Fock);\n    const double Exvir_HFocep_correct = -5.01251194e+00; // exchange energy from a test calculation with HF reference\n    ihf_vir.logger  << \"HF OCEP virial exchange energy of the system should be \"\n    \t\t<< std::scientific << std::setprecision(8) << Exvir_HFocep_correct << \" Eh\" << std::endl;\n    const double Exvir_HFocep = compute_exchange_energy_vir(HF_nemo, V_HFocep);\n    const double Exvir_HFocep_diff = fabs(Exvir_HFocep_correct - Exvir_HFocep);\n    ihf_vir.logger << \"  the virial HF OCEP exchange energy of the system is ... \"<< Exvir_HFocep<<\" Eh\"<<std::endl;\n    ihf_vir.logger << \" error: \"<< Exvir_HFocep_diff << \" Eh\" << std::endl;\n    ierr+=ihf_vir.end(Exvir_HFocep_diff < get_calc_param().econv());\n\n\n    test_output ihf_kin_vir(\"test virial dcep exchange energy\");\n    real_function_3d V_HFdcep = compute_dcep_correction(kin_tot_HF, HF_nemo, KS_nemo);\n    const double Exvir_HFdcep_correct = 7.83817133e-02; // exchange energy from a test calculation with HF reference\n    ihf_kin_vir.logger << \"HF DCEP virial exchange energy of the system should be \"\n    \t\t<< std::scientific << std::setprecision(8) << Exvir_HFdcep_correct << \" Eh\" << std::endl;\n    const double Exvir_HFdcep = compute_exchange_energy_vir(HF_nemo, V_HFdcep);\n    const double Exvir_HFdcep_diff = fabs(Exvir_HFdcep_correct - Exvir_HFdcep);\n    ihf_kin_vir.logger << \"  the virial HF DCEP exchange energy of the system is ... \" << Exvir_HFdcep << \" Eh\" << std::endl;\n    ihf_kin_vir.logger << \"  error: \" << Exvir_HFdcep_diff << \" Eh\" << std::endl;\n    ierr+=ihf_kin_vir.end(Exvir_HFdcep_diff < get_calc_param().econv());\n\n\n    test_output ihf_pauli_vir(\"test virial mrks exchange energy \");\n    real_function_3d V_HFmrks = compute_mrks_correction(kin_P_HF,HF_nemo, KS_nemo);\n    const double Exvir_HFmrks_correct = 2.97175117e-01; // exchange energy from a test calculation with HF reference\n    ihf_pauli_vir.logger << \"HF mRKS virial exchange energy of the system should be\"\n    \t\t<< std::scientific << std::setprecision(8) << Exvir_HFmrks_correct << \" Eh\" << std::endl;\n    const double Exvir_HFmrks = compute_exchange_energy_vir(HF_nemo, V_HFmrks);\n    const double Exvir_HFmrks_diff = fabs(Exvir_HFmrks_correct - Exvir_HFmrks);\n    ihf_pauli_vir.logger << \"  the virial HF mRKS exchange energy of the system is ... \" << Exvir_HFmrks << \" Eh\" << std::endl;;\n    ihf_pauli_vir.logger << \"  error:\" << Exvir_HFmrks_diff << \" Eh\" << std::endl;\n    ierr+=ihf_pauli_vir.end(Exvir_HFmrks_diff < get_calc_param().econv());\n\n\n    test_output hf_kinetic(\"test HF kinetic energy\");\n    const double Ekin_HF_correct = 14.57304144; // HF kinetic energy from a test calculation with HF reference (OEP: maxiter = 2)\n    hf_kinetic.logger << \"HF kinetic energy of the system should be\"\n    \t\t<< std::scientific << std::setprecision(8) << Ekin_HF_correct << \" Eh\" << std::endl;\n    const double Ekin_HF = compute_kinetic_energy(HF_nemo);\n    const double Ekin_HF_diff = fabs(Ekin_HF_correct - Ekin_HF);\n    hf_kinetic.logger << \"  the HF kinetic energy of the system is ... \" << Ekin_HF << \" Eh\" << std::endl;\n    hf_kinetic.logger << \"  error:\" << Ekin_HF_diff << \" Eh\" << std::endl;\n    ierr+=hf_kinetic.end(Ekin_HF_diff < get_calc_param().econv());\n\n\n\n\n\n    print(\"\\n   >> test solve_oep function with mRKS model for 2 iterations\\n\");\n    solve(HF_nemo);\n    print(\"\\n   >> solve_oep test finished, calculating test quantities based on the new KS orbitals and eigenvalues\\n\");\n\n    KS_nemo = calc->amo;\n    //tensorT& KS_eigvals = calc->aeps;\n\n    const real_function_3d rho_KS = compute_density(KS_nemo);\n\n    print(\"loading final potential ...\");\n    load(Voep, \"OEPapprox_final\");\n    print(   \"... done\\n\");\n\n    vecfuncT Jnemo;\n    compute_coulomb_potential(KS_nemo, Jnemo);\n    compute_exchange_potential(KS_nemo, Knemo);\n\n    test_output conv_ks(\"test conventional KS exchange energy\");\n    const double Ex_conv_correct = -2.68048325e+00;\n    conv_ks.logger << \"KS conventional exchange energy of the system should be \"\n    \t\t<< std::scientific << std::setprecision(8) << Ex_conv_correct << \" Eh\" << std::endl;\n    const double Ex_conv = compute_exchange_energy_conv(R*KS_nemo, R*Knemo);\n    const double Ex_conv_diff = fabs(Ex_conv_correct - Ex_conv);\n    conv_ks.logger << \"  the conventional KS exchange energy of the system is ... \" << Ex_conv << \" Eh\" << std::endl;;\n    conv_ks.logger << \"  error: \"<< Ex_conv_diff << \" Eh\" << std::endl;\n    ierr+=conv_ks.end(Ex_conv_diff < get_calc_param().econv());\n\n\n    test_output vir_ks(\"test virial KS exchange energy\");\n    const double Ex_vir_correct = -2.67728104e+00; // exchange energy from a test calculation with HF reference (OEP: maxiter = 2)\n    vir_ks.logger << \"KS virial exchange energy of the system should be\"\n    \t\t<< std::scientific << std::setprecision(8)  << Ex_vir_correct << \" Eh\" << std::endl;\n    const double Ex_vir = compute_exchange_energy_vir(KS_nemo, Voep);\n    const double Ex_vir_diff = fabs(Ex_vir_correct - Ex_vir);\n    vir_ks.logger << \"  the virial KS exchange energy of the system is ... \" << Ex_vir << \" Eh\" << std::endl;\n    vir_ks.logger << \"  error: \" << Ex_vir_diff << \" Eh\" << std::endl;\n    ierr+=vir_ks.end(Ex_vir_diff < get_calc_param().econv());\n\n\n    test_output total_energy(\"test final total energy\");\n    const double Etot_correct = -1.45708107e+01; // total energy (conv) from a test calculation with HF reference (OEP: maxiter = 2)\n    total_energy.logger << \"final total energy of the system should be \"\n    \t\t<< Etot_correct << \" Eh\" << std::endl;\n    const double Etot = compute_energy(KS_nemo, Ex_conv)[0];\n    const double Etot_diff = fabs(Etot_correct - Etot);\n    total_energy.logger << \"  the final total energy of the system is ... \" << Etot << \" Eh\" << std::endl;\n    total_energy.logger << \"  error: \" << Etot_diff << \"Eh\" << std::endl;\n    ierr+=total_energy.end(Etot_diff < get_calc_param().econv());\n\n\n    test_output ks_kinetic_energy(\"test KS kinetic energy\");\n    const double Ekin_KS_correct = 1.46848100e+01; // KS kinetic energy from a test calculation with HF reference (OEP: maxiter = 2)\n    ks_kinetic_energy.logger << \"KS kinetic energy of the system should be \" << Ekin_KS_correct << \" Eh\" << std::endl;\n    const double Ekin_KS = compute_kinetic_energy(KS_nemo);\n    const double Ekin_KS_diff = fabs(Ekin_KS_correct - Ekin_KS);\n    ks_kinetic_energy.logger << \"  the KS kinetic energy of the system is ... \" << Ekin_KS << \" Eh\" << std::endl;\n    ks_kinetic_energy.logger << \"  error: \" << Ekin_KS_diff << \" Eh\" << std::endl;\n    ierr+=ks_kinetic_energy.end(Ekin_KS_diff < get_calc_param().econv());\n\n\n    const double Tc = Ekin_HF - Ekin_KS;\n\n    test_output corr_energy(\"test quantity Delta Evir (14) after 2 iterations\");\n    const double DEvir_14_correct = 3.20220918e+00; // DEvir_14 (in mEh) from a test calculation with HF reference (OEP: maxiter = 2)\n    corr_energy.logger << \"Delta Evir (14) of the system should be \" << DEvir_14_correct << \" mEh\" << std::endl;\n    const double DEvir_14 = (Ex_vir - Ex_conv)*1000.0;\n    const double DEvir_14_diff = fabs(DEvir_14_correct - DEvir_14);\n    corr_energy.logger << \"  Delta Evir (14) of the system is ... \" << DEvir_14 << \" mEh\" << std::endl;\n    corr_energy.logger << \"  error: \"<< DEvir_14_diff << \" mEh\" << std::endl;\n    ierr+=corr_energy.end(DEvir_14_diff*0.001 < get_calc_param().econv());\n\n\n    test_output devir17(\"test quantity Delta Evir (17) after 2 iterations\");\n    const double DEvir_17_correct = 2.13166331e+02; // DEvir_17 (in mEh) from a test calculation with HF reference (OEP: maxiter = 2)\n    devir17.logger << \"Delta Evir (17) of the system should be \" << DEvir_17_correct <<  \" mEh\" << std::endl;\n    const double DEvir_17 = (Ex_vir - ExVs_HF - 2.0*Tc)*1000.0;\n    const double DEvir_17_diff = fabs(DEvir_17_correct - DEvir_17);\n    devir17.logger << \"  Delta Evir (17) of the system is ... \" << DEvir_17<< \" mEh\" << std::endl;\n    devir17.logger << \"  error: \" << DEvir_17_diff << \" mEh\" << std::endl;\n    ierr+=devir17.end(DEvir_17_diff*0.001 < get_calc_param().econv());\n\n\n    test_output delta_rho(\"test quantity Delta rho after 2 iterations\");\n    const double Drho_correct = 3.66404755e-02; // Drho from a test calculation with HF reference (OEP: maxiter = 2)\n    delta_rho.logger << \"Delta rho of the system should be \"<< Drho_correct << std::endl;\n    const double Drho = compute_delta_rho(rho_HF, rho_KS);\n    const double Drho_diff = fabs(Drho_correct - Drho);\n    delta_rho.logger << \"  Delta rho of the system is ... \" << Drho <<std::endl;\n    delta_rho.logger << \"  error: \" <<  Drho_diff << std::endl;\n    ierr+=delta_rho.end(Drho_diff < get_calc_param().econv());\n\n\n    // TODO: What else can be checked?\n\n    print(\"+++ OEP test finished +++\\n\");\n\n    if (ierr==0) print(\"\\n  All calculated results are correct, everything ok!\\n\");\n    else print(\"  ATTENTION! There are errors in the results, see above!\\n\");\n    return ierr;\n\n}\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/oep.h",
    "content": "/*\n * oep.h\n *\n *  Created on: Nov 6, 2019\n *      Author: fbischoff\n */\n\n#ifndef SRC_APPS_CHEM_OEP_H_\n#define SRC_APPS_CHEM_OEP_H_\n\n\n\n#include<madness/chem/nemo.h>\n#include<madness/chem/SCFOperators.h>\n#include<madness/chem/projector.h>\n#include<madness/chem/MolecularOrbitals.h>\n#include<madness/chem/Results.h>\n\nnamespace madness {\n\n/// Class to compute terms of the potential\nstruct divide_add_interpolate {\n\n\tdouble thresh_high=1.e-5;\n\tdouble thresh_low=1.e-7;\n\tdouble eps_regularize=1.e-8;\n\tdouble log_high, log_low;\n\tbool square_denominator=false;\n\n\tdivide_add_interpolate(double hi, double lo, double eps_regularize) :\n\t\tthresh_high(hi), thresh_low(lo), eps_regularize(eps_regularize),\n\t\t\tlog_high(log10(thresh_high)), log_low(log10(thresh_low)) {}\n\n    std::size_t get_result_size() const {\n    \treturn 1;\n    }\n\n\t/// @param[in]\tt\tvector containing: oep, refdensity, longrange\n    /// @return\t\t(num1/denom1 - num2/denom2) * mask + (1-mask)*longrange\n\tstd::vector<Tensor<double> > operator()(const Key<3> & key,\n\t\t\tconst std::vector<Tensor<double> >& t) const {\n\n\t\tconst Tensor<double>& refdens=t[0];\n\t\tconst Tensor<double>& num1=t[1];\n\t\tconst Tensor<double>& denom1=t[2];\n\t\tconst Tensor<double>& num2=t[3];\n\t\tconst Tensor<double>& denom2=t[4];\n\t\tconst Tensor<double>& longrange=t[5];\n\n    \t// set 1 if above munge interval (dens > thresh_high) or 0 if below munge interval (dens < thresh_low)\n    \t// interpolate inbetween with logarithmic form of (r - lo)/(hi - lo) because this yields near linear behavior\n    \tTensor<double> U = copy(refdens); // copy refdens in oder to have the same dimension in the tensor\n    \tU.fill(1.0); // start with a fuction that is 1.0 everywhere\n        ITERATOR(\n            U,\n\t\t\tdouble r = refdens(IND);\n        \tdouble result=num1(IND)/(denom1(IND)+eps_regularize)\n        \t\t\t- num2(IND)/(denom2(IND)+eps_regularize);\n        \tif (square_denominator) result=num1(IND)/(denom1(IND)*denom1(IND)+eps_regularize)\n        \t\t\t- num2(IND)/(denom2(IND)*denom2(IND)+eps_regularize);\n            if (r > thresh_high) {\n            \tU(IND) = result;\n            } else if (r < thresh_low) {\n            \tU(IND) = longrange(IND);\n            } else {\n            \t// mask = 1 if refdens>hi, 0 if refdens < lo, interpolate in between\n            \tdouble mask=(log10(refdens(IND)) - log_low)/(log_high - log_low);\n            \tU(IND)=mask*result + (1.0-mask)*longrange(IND);\n            }\n        );\n        return std::vector<Tensor<double> > (1,U);\n\t}\n};\n\n/// TODO:\n///  - change algorithm to handle localized orbitals\n///  - do not recompute the OEP potentials that don't depend on the orbital energies/Fock matrix elements\n///  - do not recompute the HF contributions to the OEP potentials\n///  - think about the long-range part of the Slater potential (or medium-range)\nclass OEP_Parameters : public QCCalculationParametersBase {\npublic:\n\tstatic constexpr char const *tag = \"oep\";\n\n    OEP_Parameters() {\n        initialize<std::vector<std::string> >(\"model\",{\"dcep\"},\"comment on this: oaep ocep dcep mrks\");\n        initialize<unsigned int>(\"maxiter\",150,\"maximum number of iterations in OEP algorithm\");\n        initialize<bool>(\"restart\",false,\"restart from previous OEP calculation\");\n        initialize<bool>(\"no_compute\",false,\"read from previous OEP calculation, no computation\");\n        initialize<double>(\"levelshift\",0.0,\"shift occupied orbital energies in the BSH operator\");\n//\t\tinitialize<double>(\"conv_threshold\",1.e-5,\"comment on this\");\n        initialize<double>(\"density_threshold_high\",1.e-6,\"comment on this\");\n        initialize<double>(\"density_threshold_low\",1.e-8,\"comment on this\");\n        initialize<double>(\"density_threshold_inv\",1.e-9,\"comment on this\");\n        initialize<std::vector<double> >(\"kain_param\",{1.0e-8, 3.0},\"comment on this\");\n\n//\t\tstd::vector<bool> oep_model = {false, false, false, false};\n        initialize<unsigned int>(\"saving_amount\",0,\"choose level 0, 1, 2 or 3 for saving functions\");\n        initialize<unsigned int>(\"save_iter_orbs\",0,\"if > 0 save all orbitals every ... iterations (needs a lot of storage!\");\n        initialize<unsigned int>(\"save_iter_density\",0,\"if > 0 save KS density every ... iterations\");\n        initialize<unsigned int>(\"save_iter_IKS\",0,\"if > 0 save IKS every ... iterations\");\n        initialize<unsigned int>(\"save_iter_kin_tot_KS\",0,\"if > 0 save kin_tot_KS every ... iterations\");\n        initialize<unsigned int>(\"save_iter_kin_P_KS\",0,\"if > 0 save kin_P_KS every ... iterations\");\n        initialize<unsigned int>(\"save_iter_corrections\",0,\"if > 0 save OEP correction(s) every ... iterations\");\n        initialize<unsigned int>(\"save_iter_effective_potential\",0,\"if > 0 save effective potential every ... iterations\");\n    }\n\n\tOEP_Parameters(World& world, const commandlineparser& parser) : OEP_Parameters() {\n        read_input_and_commandline_options(world, parser, \"oep\");\n\t}\n\n    OEP_Parameters(const OEP_Parameters& other) = default;\n\n\n\tstd::string get_tag() const override {\n\t\treturn std::string(\"oep\");\n\t}\n\n\n    void set_derived_values(const CalculationParameters& cparam) {\n    \tset_derived_value(\"density_threshold_high\",10.0*cparam.econv());\n    \tset_derived_value(\"density_threshold_low\",0.01*get<double>(\"density_threshold_high\"));\n\t\tif (dens_thresh_hi()<dens_thresh_lo()) {\n\t\t\tMADNESS_EXCEPTION(\"confused thresholds for the long-range transition\",1);\n\t\t}\n    \tset_derived_value(\"density_threshold_inv\",0.1*get<double>(\"density_threshold_low\"));\n\n    \tif (levelshift()>0.0) {\n    \t\tprint(\"levelshift > 0.0 in oep parameters\\n\\n\");\n    \t\tMADNESS_EXCEPTION(\"levelshift > 0.0 in oep parameters\",1);\n    \t}\n\t}\n\n\t// convenience functions\n\tstd::vector<std::string> model() const {return get<std::vector<std::string> >(\"model\");}\n\n\tbool restart() const {return get<bool>(\"restart\");}\n    bool no_compute() const {return get<bool>(\"no_compute\");}\n\tunsigned int maxiter() const {return get<unsigned int>(\"maxiter\");}\n\tdouble levelshift() const {return get<double>(\"levelshift\");}\n//\tdouble conv_thresh() const {return get<double>(\"conv_threshold\");}\n\tdouble dens_thresh_hi() const {return get<double>(\"density_threshold_high\");}\n\tdouble dens_thresh_lo() const {return get<double>(\"density_threshold_low\");}\n\tdouble dens_thresh_inv() const{return get<double>(\"density_threshold_inv\");}\n\tunsigned int saving_amount() const {return get<unsigned int>(\"saving_amount\");}\n\tunsigned int save_iter_corrections        () const {return get<unsigned int>(\"save_iter_corrections\");}\n\n\tstd::vector<double> kain_param() const {return get<std::vector<double> >(\"kain_param\");}\n\n};\n\n\nclass OEP : public Nemo {\n\n\nprotected:\n    /// parameters for this OEP calculation\n\tOEP_Parameters oep_param;\n\nprivate:\n\t/// the wave function reference that determines the local potential\n\tstd::shared_ptr<const Nemo> reference;\n\n\t/// the final local potential\n\treal_function_3d Vfinal;\n\n\t/// collection of results\n\tstd::vector<OEPResults> results;\n\npublic:\n\n\tOEP(World& world, const OEP_Parameters& oepparam, const std::shared_ptr<const Nemo>& reference)\n\t\t\t: Nemo(world, reference->get_calc_param(), reference->get_nemo_param(), reference->molecule()),\t\t// OEP is a nemo calculation, ctor will set param from reference\n\t\t\t  oep_param(oepparam),\n\t\t\t  reference(reference) {\n\n\t\t// add tight convergence criteria\n\t\tstd::vector<std::string> convergence_crit=get_calc_param().get<std::vector<std::string> >(\"convergence_criteria\");\n\t\tif (std::find(convergence_crit.begin(),convergence_crit.end(),\"each_energy\")==convergence_crit.end()) {\n\t\t\tconvergence_crit.push_back(\"each_energy\");\n\t\t}\n\t\tcalc->param.set_derived_value(\"convergence_criteria\",convergence_crit);\n\n\t\toep_param.set_derived_values(get_calc_param());\n\n\t\t// check that reference is well converged\n\t\tMADNESS_CHECK_THROW(reference->get_calc_param().converge_each_energy(),\"need tightly converged reference for OEP calculation\");\n\n\t}\n\n\n    OEP(World& world, const commandlineparser& parser)\n            : Nemo(world, parser),\n              oep_param(world, parser) {\n\n        // add tight convergence criteria\n        std::vector<std::string> convergence_crit=get_calc_param().get<std::vector<std::string> >(\"convergence_criteria\");\n        if (std::find(convergence_crit.begin(),convergence_crit.end(),\"each_energy\")==convergence_crit.end()) {\n            convergence_crit.push_back(\"each_energy\");\n        }\n        calc->param.set_derived_value(\"convergence_criteria\",convergence_crit);\n\n        // set reference\n\t\tauto ref=std::make_shared<Nemo>(world,parser);\n        ref->get_calc()->param.set_derived_value(\"convergence_criteria\",convergence_crit);\n        set_reference(ref);\n\n        oep_param.set_derived_values(get_calc_param());\n    }\n\n    std::string name() const override {return \"oep\";}\n\n    static void help() {\n        print_header2(\"help page for oep\");\n        print(\"The oep code computes local exchange potentials based on a Hartree-Fock calculation from nemo\");\n        print(\"oep --print_parameters\\n\");\n        print(\"You can perform a simple calculation by running\\n\");\n        print(\"oep --geometry=h2o.xyz\\n\");\n        print(\"provided you have an xyz file in your directory.\");\n\n    }\n\n    static void print_parameters() {\n        OEP_Parameters param;\n        print(\"default parameters for the oep program are\");\n        param.print(\"oep\", \"end\");\n        print(\"\\n\\nthe molecular geometry must be specified in a separate block:\");\n        Molecule::print_parameters();\n    }\n\n    void set_reference(const std::shared_ptr<Nemo> reference1) {\n\t    reference=reference1;\n\t}\n\n    std::shared_ptr<const Nemo> get_reference() const {\n        return reference;\n    }\n\n    void print_parameters(std::vector<std::string> what) const {\n        for (auto w : what) {\n            if (w==\"oep\") oep_param.print(\"oep\");\n            else if (w==\"reference\") reference->get_calc_param().print(\"dft\");\n            else if (w==\"oep_calc\") get_calc_param().print(\"oep_calc\");\n            else {MADNESS_EXCEPTION(std::string(\"unknown parameter set to print \"+w).c_str(),1);}\n        }\n    }\n\n\treal_function_3d get_final_potential() const {\n        return Vfinal;\n    }\n\n    double value() override {\n        return value(calc->molecule.get_all_coords());\n    }\n\n    /// update the json file with calculation input and output\n    void output_calc_info_schema(const double& energy) const;\n\n\n    virtual double value(const Tensor<double>& x) override {\n    \tMADNESS_CHECK_THROW(reference->check_converged(x),\"OEP reference is not converged at this geometry\");\n        set_protocol(get_calc_param().econv());\n        calc->copy_data(world,*(reference->get_calc()));\n        double energy=0.0;\n        Tensor<double> fock;\n        bool load_mos=(oep_param.restart() or oep_param.no_compute());\n        if (load_mos) load_restartdata(fock);\n\n        if (not oep_param.no_compute())  energy=solve(reference->get_calc()->get_amo());\n        output_calc_info_schema(energy);\n        return energy;\n\t};\n\n    /// Iterative energy calculation for approximate OEP with EXACT EXCHANGE functional\n\t/// for other functionals, slater potential must be modified\n\t/// HF orbitals and eigenvalues are used as the guess here\n\t/// note that KS_nemo is a reference and changes oep->get_calc()->amo orbitals\n\t/// same for orbital energies (eigenvalues) KS_eigvals which is oep->get_calc()->aeps\n\t/// converged if norm, total energy difference and orbital energy differences (if not OAEP) are converged\n    double solve(const vecfuncT& HF_nemo);\n\n\t/// results are computed in compute_and_print_final_energies\n    nlohmann::json analyze() const override {\n    \t// turn Results vector into a json object\n    \tnlohmann::json results_json;\n    \tfor (const auto& r : results) {\n\t\t\tresults_json.push_back(r.to_json());\n\t\t}\n    \treturn  results_json;\n    };\n\n    OEPResults iterate(const std::string model, const vecfuncT& HF_nemo, const tensorT& HF_eigvals,\n    \t\tvecfuncT& KS_nemo, tensorT& KS_Fock, real_function_3d& Voep,\n\t\t\tconst real_function_3d Vs) const;\n\n    std::shared_ptr<Fock<double,3>> make_fock_operator() const override;\n\n//    MolecularOrbitals<double,3> to_MO() const {\n//    \tstd::vector<std::string> str_irreps;\n//    \tvecfuncT aaa=symmetry_projector(calc->amo,R_square,str_irreps);\n//    \treturn MolecularOrbitals<double,3>(aaa,this->get_calc()->aeps,str_irreps,this->get_calc()->aocc,this->get_calc()->aset);\n//    }\n\n    void save_restartdata(const Tensor<double>& fock) const;\n\n    void load_restartdata(Tensor<double>& fock);\n\n    std::tuple<Tensor<double>, vecfuncT> recompute_HF(const vecfuncT& HF_nemo) const;\n\n    /// The following function tests all essential parts of the OEP program qualitatively and some also quantitatively\n    bool selftest() override;\n\n    bool need_ocep_correction(const std::string& model) const {\n    \treturn (model==\"ocep\") or (model==\"dcep\") or (model==\"mrks\");\n    }\n\n    bool need_dcep_correction(const std::string& model) const {\n    \treturn (model==\"dcep\");\n    }\n\n    bool need_mrks_correction(const std::string& model) const {\n    \treturn (model==\"mrks\");\n    }\n\n    /// print orbital energies in reverse order with optional shift\n    void print_orbens(const tensorT orbens) const {\n\t\tfor (long i = orbens.size() - 1; i >= 0; i--) {\n\t\t\tprintf(\" e%2.2lu = %12.8f Eh\\n\", i, orbens(i));\n\t\t}\n    }\n\n    OEPResults compute_and_print_final_energies(const std::string model, const real_function_3d& Voep,\n    \t\tconst vecfuncT& KS_nemo, const tensorT& KS_Fock,\n\t\t\tconst vecfuncT& HF_nemo, const tensorT& HF_Fock) const;\n\n    /// compute density from orbitals with ragularization (Bischoff, 2014_1, equation (19))\n    real_function_3d compute_density(const vecfuncT& nemo) const {\n    \treal_function_3d density = 2.0*R_square*dot(world, nemo, nemo); // 2 because closed shell\n    \treturn density;\n    }\n\n    /// compute Delta rho as an indicator for the result's quality\n    double compute_delta_rho(const real_function_3d rho_HF, const real_function_3d rho_KS) const {\n    \t// from Ospadov_2017, equation (26)\n    \treal_function_3d rho_diff = abs(rho_KS - rho_HF);\n    \tdouble Drho = rho_diff.trace();\n    \treturn Drho;\n    }\n\n     /// compute Slater potential (Kohut, 2014, equation (15))\n    real_function_3d compute_slater_potential(const vecfuncT& nemo) const {\n\n        Exchange<double,3> K(world,reference->get_calc()->param.lo());\n         K.set_bra_and_ket(R_square * nemo, nemo);\n        const vecfuncT Knemo = K(nemo);\n        // 2.0*R_square in numerator and density (rho) cancel out upon division\n        real_function_3d numerator = -1.0*dot(world, nemo, Knemo);\n        real_function_3d rho = dot(world, nemo, nemo);\n\n        // long-range asymptotic behavior for Slater potential is \\int 1/|r-r'| * |phi_HOMO|^2 dr'\n        // in order to compute this lra, use Coulomb potential with only HOMO density (= |phi_HOMO|^2)\n//        Coulomb J(world);\n//        J.reset_poisson_operator_ptr(param.lo(),param.econv());\n//        real_function_3d lra = -1.0*J.compute_potential(R_square*square(nemo[homo_ind]));\n        Coulomb<double,3> J(world,this);\n        real_function_3d lra=-1.0/(get_calc_param().nalpha()+get_calc_param().nbeta())*J.compute_potential(this);\n//        print(\"compute long-range part of the Slater potential from the full molecular density\");\n        if (oep_param.saving_amount() >= 3) save(lra, \"lra_slater\");\n\n        real_function_3d zero=real_factory_3d(world);\n        real_function_3d one=real_factory_3d(world).functor([](const coord_3d& r){return 1.0;});\n    \tstd::vector<real_function_3d> args={R_square*rho,numerator,rho,zero,one,lra};\n        refine_to_common_level(world,args);\n\n        divide_add_interpolate op(oep_param.dens_thresh_hi(), oep_param.dens_thresh_lo(),\n        \t\toep_param.dens_thresh_inv());\n        real_function_3d VSlater=multi_to_multi_op_values(op,args)[0];\n        return VSlater;\n    }\n\n\n    /// compute the total kinetic energy density of equation (6) from Kohut\n\n    /// return without the NCF and factor 2 for closed shell !\n    real_function_3d compute_total_kinetic_density(const vecfuncT& nemo) const {\n\n\t    // compute tau = 1/2 * sum |\\nabla phi_i|^2\n\t    // = 1/2 * sum {(\\nabla R)^2 * nemo_i^2 + 2 * R * nemo_i * (\\nabla R) * (\\nabla nemo_i)) + R^2 * (\\nabla nemo_i)^2}\n\t    // = 1/2 * R^2 * sum {U1dot * nemo_i^2 + 2 * nemo_i * U1 * (\\nabla nemo_i)) + (\\nabla nemo_i)^2}\n\n    \t// get \\nabla R and (\\nabla R)^2 via and U1 = -1/R \\nabla R and U1dot = (1/R \\nabla R)^2\n    \tconst vecfuncT U1 = this->ncf->U1vec();\n\t    NuclearCorrelationFactor::U1_dot_U1_functor u1_dot_u1(ncf.get());\n\t    const real_function_3d U1dot = real_factory_3d(world).functor(u1_dot_u1).truncate_on_project();\n\n\t    real_function_3d u1u1term=U1dot*dot(world,nemo,nemo);\n\t    real_function_3d u1dnterm=real_factory_3d(world).compressed();\n\t    real_function_3d dndnterm=real_factory_3d(world).compressed();\n\n\t    for (int idim=0; idim<3; ++idim) {\n\t    \treal_derivative_3d D(world,idim);\n\t    \tif(get_calc_param().dft_deriv() == \"bspline\") D.set_bspline1();\n\t    \tvecfuncT nemo_copy=copy(world,nemo);\n\t    \trefine(world,nemo_copy);\n\t    \tstd::vector<real_function_3d> dnemo=apply(world,D,nemo_copy);\n\t    \tu1dnterm+=U1[idim]*dot(world,nemo_copy,dnemo);\n\t    \trefine(world,dnemo);\n\t    \tdndnterm+=dot(world,dnemo,dnemo);\n\t    }\n\n\t    real_function_3d tau=0.5*(u1u1term - 2.0*u1dnterm + dndnterm);\n\n\t\treturn tau;\n\n    }\n\n    /// compute the Pauli kinetic energy density divided by the density tau_P/rho with equation (16) from Ospadov, 2017\n    real_function_3d compute_Pauli_kinetic_density(const vecfuncT& nemo) const {\n\n    \t// compute the numerator tau_P\n\n\t    // get \\nabla nemo\n\t    std::vector<vecfuncT> grad_nemo(nemo.size());\n\t    for (size_t i = 0; i < nemo.size(); i++) {\n\t    \tvecfuncT nemo_copy=copy(world,nemo);\n\t    \trefine(world,nemo_copy);\n\n\t    \tif(get_calc_param().dft_deriv() == \"bspline\") grad_nemo[i] = grad_bspline_one(nemo_copy[i]);  // gradient using b-spline\n\t    \telse grad_nemo[i] = grad(nemo_copy[i]);  // default gradient using abgv\n\t    }\n\n\t    vecfuncT grad_nemo_term;\n\t\tfor (size_t i = 0; i < nemo.size(); i++) {\n\t\t\tfor (size_t j = i + 1; j < nemo.size(); j++) {\n\t\t\t\tvecfuncT tmp = nemo[i]*grad_nemo[j] - nemo[j]*grad_nemo[i];\n\t\t\t\tgrad_nemo_term.push_back(dot(world, tmp, tmp));\n\t\t\t}\n\t\t}\n\t\treal_function_3d numerator = sum(world, grad_nemo_term); // numerator = tau_P * 2 * rho / R^4\n\n\t\treturn numerator;\n\n    }\n\n    /// compute correction of the given model\n\n    /// shift of the diagonal elements of the fock matrix results in a global shift\n    /// of the potential\n    /// \\f[\n    /// \\frac{\\bar \\epsilon}{\\rho} = \\frac{1}{\\rho}\\sum_{ij}\\phi_i(F_ij+\\delta_ij s)\\phi_j\n    ///        = \\frac{1}{\\rho} ( \\sum_{ij}\\phi_i F_ij \\phi_j + s\\sum_i\\phi_i\\phi_i )\n    ///        = s + \\frac{1}{\\rho} \\sum_{ij}\\phi_i F_ij \\phi_j\n    /// \\f]\n    real_function_3d compute_ocep_correction(const real_function_3d& ocep_numerator_HF,\n    \t\tconst vecfuncT& nemoHF, const vecfuncT& nemoKS,\n\t\t\tconst tensorT& fockHF, const tensorT& fockKS) const {\n\n    \tif (fockKS.normf()<1.e-10) {\n    \t\treal_function_3d zero=real_factory_3d(world);\n    \t\treturn zero;\n    \t}\n\n    \t// compute HOMO energies and the long-range asymptotics\n    \tauto [eval, evec] = syev(fockKS);\n       \tdouble homoKS = -eval.max();\n\n       \tauto [eval1, evec1] = syev(fockHF);\n       \tdouble homoHF = -eval1.max();\n\n        double longrange=homoHF-homoKS;\n\n        tensorT fock1=copy(fockKS);\n        for (int i=0; i<fock1.dim(0); ++i) fock1(i,i)-=longrange;\n\n\t\t// 2.0*R_square in numerator and density (rho) cancel out upon division\n//    \treal_function_3d numeratorHF=-1.0*compute_energy_weighted_density_local(nemoHF,fockHF);\n//    \treal_function_3d numeratorHF=-1.0*compute_energy_weighted_density(nemoHF,eigvalsHF);\n    \treal_function_3d numeratorKS=-1.0*compute_energy_weighted_density_local(nemoKS,fock1);\n//    \treal_function_3d numeratorKS=-1.0*compute_energy_weighted_density(nemoKS,eval);\n\n\t\t// 2.0*R_square in numerator and density (rho) cancel out upon division\n        real_function_3d densityKS = dot(world, nemoKS, nemoKS);\n        real_function_3d densityHF = dot(world, nemoHF, nemoHF);\n\n    \treal_function_3d lra_func=real_factory_3d(world);\n    \tstd::vector<real_function_3d> args={densityKS,ocep_numerator_HF,densityHF,\n    \t\t\tnumeratorKS,densityKS,lra_func};\n        refine_to_common_level(world,args);\n\n        divide_add_interpolate op(oep_param.dens_thresh_hi(), oep_param.dens_thresh_lo(),\n        \t\toep_param.dens_thresh_inv());\n        real_function_3d correction=multi_to_multi_op_values(op,args)[0];\n\n\n    \treturn correction;\n\n    }\n\n    /// return without the NCF and factor 2 for closed shell !\n\n    /// follow Eq. (4) of Ryabinkin2014\n    real_function_3d compute_energy_weighted_density_local(const vecfuncT& nemo,\n    \t\tconst tensorT& fock) const {\n    \treturn dot(world,nemo,transform(world,nemo,fock));\n    }\n\n    /// compute correction of the given model\n    real_function_3d compute_dcep_correction(const real_function_3d& dcep_numerator_HF,\n    \t\tconst vecfuncT& nemoHF, const vecfuncT& nemoKS) const {\n\n\t\t// 2.0*R_square in numerator and density (rho) cancel out upon division\n//    \treal_function_3d numeratorHF=compute_total_kinetic_density(nemoHF);\n    \treal_function_3d numeratorKS=compute_total_kinetic_density(nemoKS);\n\n\t\t// 2.0*R_square in numerator and density (rho) cancel out upon division\n        real_function_3d densityKS = dot(world, nemoKS, nemoKS);\n        real_function_3d densityHF = dot(world, nemoHF, nemoHF);\n\n    \treal_function_3d lra_func=real_factory_3d(world).functor([](const coord_3d& r)\n    \t\t\t{return 0.0;});\n\n    \tstd::vector<real_function_3d> args={densityKS,dcep_numerator_HF,densityHF,\n    \t\t\tnumeratorKS,densityKS,lra_func};\n        refine_to_common_level(world,args);\n\n        divide_add_interpolate op(oep_param.dens_thresh_hi(), oep_param.dens_thresh_lo(),\n        \t\toep_param.dens_thresh_inv());\n        real_function_3d correction=multi_to_multi_op_values(op,args)[0];\n\n    \treturn correction;\n    }\n\n    /// compute correction of the given model\n    real_function_3d compute_mrks_correction(const real_function_3d& mrks_numerator_HF,\n    \t\tconst vecfuncT& nemoHF, const vecfuncT& nemoKS) const {\n\n\t\t// 2.0*R_square in numerator and density (rho) cancel out upon division\n//    \treal_function_3d numeratorHF=compute_Pauli_kinetic_density(nemoHF);\n    \treal_function_3d numeratorKS=compute_Pauli_kinetic_density(nemoKS);\n\n\t\t// 2.0*R_square in numerator and density (rho) cancel out upon division\n        real_function_3d densityKS = dot(world, nemoKS, nemoKS);\n        real_function_3d densityHF = dot(world, nemoHF, nemoHF);\n\n        // longrange correction is zero\n    \treal_function_3d lra_func=real_factory_3d(world).functor([](const coord_3d& r) {return 0.0;});\n\n    \treal_function_3d denssq=square(densityKS);\n    \tstd::vector<real_function_3d> args={densityKS,mrks_numerator_HF,densityHF,\n    \t\t\tnumeratorKS,densityKS,lra_func};\n        refine_to_common_level(world,args);\n\n        divide_add_interpolate op(oep_param.dens_thresh_hi(), oep_param.dens_thresh_lo(),\n        \t\toep_param.dens_thresh_inv());\n        op.square_denominator=true;\n        real_function_3d correction=0.5*multi_to_multi_op_values(op,args)[0];\n\n    \treturn correction;\n    }\n\n    /// compute all potentials from given nemos except kinetic energy\n    void compute_nemo_potentials(const vecfuncT& nemo, vecfuncT& Jnemo, vecfuncT& Unemo) const {\n\n    \t// compute Coulomb part\n    \tcompute_coulomb_potential(nemo, Jnemo);\n\n    \t// compute nuclear potential part\n    \tNuclear<double,3> Unuc(world, this->ncf);\n    \tUnemo = Unuc(nemo);\n\n    }\n\n    /// compute Coulomb potential\n    void compute_coulomb_potential(const vecfuncT& nemo, vecfuncT& Jnemo) const {\n\n    \tCoulomb<double,3> J(world, this);\n    \treal_function_3d density=this->compute_density(nemo);\n    \tJ.potential()=J.compute_potential(density);\n    \tJnemo = J(nemo);\n    \ttruncate(world, Jnemo);\n\n    }\n\n    /// compute exchange potential (needed for Econv)\n    void compute_exchange_potential(const vecfuncT& nemo, vecfuncT& Knemo) const {\n\n    \tExchange<double,3> K(world,this->get_calc()->param.lo());\n        K.set_bra_and_ket(R_square * nemo, nemo);\n    \tKnemo = K(nemo);\n    \ttruncate(world, Knemo);\n\n    }\n\n    /// compute Evir using Levy-Perdew virial relation (Kohut_2014, (43) or Ospadov_2017, (25))\n    double compute_exchange_energy_vir(const vecfuncT& nemo, const real_function_3d Vx) const {\n\n    \t// make vector of functions r = (x, y, z)\n    \tauto monomial_x = [] (const coord_3d& r) {return r[0];};\n    \tauto monomial_y = [] (const coord_3d& r) {return r[1];};\n    \tauto monomial_z = [] (const coord_3d& r) {return r[2];};\n    \tvecfuncT r(3);\n    \tr[0]=real_factory_3d(world).functor(monomial_x);\n    \tr[1]=real_factory_3d(world).functor(monomial_y);\n    \tr[2]=real_factory_3d(world).functor(monomial_z);\n\n    \treal_function_3d rhonemo = 2.0*dot(world, nemo, nemo); // 2 because closed shell\n\n    \treal_function_3d rhoterm = 3*rhonemo + dot(world, r, -2.0*ncf->U1vec()*rhonemo + grad(rhonemo,true));\n    \tdouble Ex = inner(Vx, R_square*rhoterm);\n    \treturn Ex;\n\n    }\n\n    /// compute exchange energy using the expectation value of the exchange operator\n    double compute_exchange_energy_conv(const vecfuncT phi, const vecfuncT Kphi) const {\n\n    \tdouble Ex = -1.0*inner(world, phi, Kphi).sum();\n    \treturn Ex;\n\n    }\n\n    /// compute all energy contributions except exchange and sum up for total energy\n    /// the exchange energy must be computed priorly with the compute_exchange_energy_... methods\n    std::vector<double> compute_energy(const vecfuncT& nemo, const double E_X) const {\n\n    \t// compute kinetic energy\n    \tdouble E_kin = compute_kinetic_energy(nemo);\n\n    \treal_function_3d density=compute_density(nemo);\n\n    \t// compute external potential (nuclear attraction)\n    \treal_function_3d Vext = calc->potentialmanager->vnuclear();\n    \tCoulomb<double,3> J(world,this);\n    \treal_function_3d Jpotential=J.compute_potential(density);\n\n    \t// compute remaining energies: nuclear attraction, Coulomb, nuclear repulsion\n    \t// computed as expectation values (see Szabo, Ostlund (3.81))\n    \tconst double E_ext = inner(Vext,density); // 2 because closed shell\n    \tconst double E_J = 0.5*inner(density,Jpotential);\n    \tconst double E_nuc = calc->molecule.nuclear_repulsion_energy();\n    \tdouble energy = E_kin + E_ext + E_J + E_X + E_nuc;\n\n    \tif (world.rank() == 0) {\n    \t\tprintf(\"\\n                      kinetic energy %15.8f Eh\\n\", E_kin);\n    \t\tprintf(\"  electron-nuclear attraction energy %15.8f Eh\\n\", E_ext);\n    \t\tprintf(\"                      Coulomb energy %15.8f Eh\\n\", E_J);\n    \t\tprintf(\"                     exchange energy %15.8f Eh\\n\", E_X);\n    \t\tprintf(\"    nuclear-nuclear repulsion energy %15.8f Eh\\n\", E_nuc);\n    \t\tprintf(\"                        total energy %15.8f Eh\\n\\n\", energy);\n    \t}\n    \treturn {energy,E_kin,E_ext,E_J,E_X};\n\n    }\n\n    /// compute diagonal elements of Fock matrix\n    Tensor<double> compute_fock_diagonal_elements(const Tensor<double>& KS_eigvals,\n    \t\tconst vecfuncT& phi, const vecfuncT& Kphi, const real_function_3d& Vx) const {\n    \treturn KS_eigvals - inner(world, phi, Kphi) - inner(world, phi, Vx*phi);\n    }\n\n    /// cumpute E^(0) = \\sum_i \\epsilon_i^KS\n    double compute_E_zeroth(const tensorT eigvals) const {\n    \tdouble E_0 = 0.0;\n    \tfor (long i = 0; i < eigvals.size(); i++) {\n    \t\tE_0 += eigvals(i);\n    \t}\n    \tE_0 *= 2.0; // closed shell: every orbital energy must be counted twice\n    \treturn E_0;\n    }\n\n    /// compute E^(1) = 1/2*\\sum_ij <ij||ij> - \\sum_i <i|J + Vx|i> = \\sum_i <i|- 0.5*J - 0.5*K - Vx|i>\n    double compute_E_first(const vecfuncT phi, const vecfuncT Jphi, const vecfuncT Kphi, const real_function_3d Vx) const {\n\n    \t//compute expectation values:\n    \tconst double E_J = inner(world, phi, Jphi).sum();\n    \tconst double E_K = inner(world, phi, Kphi).sum();\n    \tconst double E_Vx = inner(world, phi, Vx*phi).sum();\n    \tprintf(\"  E_J   =  %15.8f Eh\\n\", E_J);\n    \tprintf(\"  E_K   =  %15.8f Eh\\n\", E_K);\n    \tprintf(\"  E_Vx  =  %15.8f Eh\\n\", E_Vx);\n    \tconst double E_nuc = calc->molecule.nuclear_repulsion_energy();\n\n    \tdouble E_1 = -1.0*(E_J + E_K + 2.0*E_Vx) + E_nuc;\n    \treturn E_1;\n\n    }\n\n};\n\n\n\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_OEP_H_ */\n"
  },
  {
    "path": "src/madness/chem/pcm.cc",
    "content": "/*\n This file is part of MADNESS.\n\n Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n For more information please contact:\n\n Robert J. Harrison\n Oak Ridge National Laboratory\n One Bethel Valley Road\n P.O. Box 2008, MS-6367\n\n email: harrisonrj@ornl.gov\n tel:   865-241-3937\n fax:   865-572-0680\n */\n\n#include \"madness.h\"\n#include<madness/chem/pcm.h>\n#include<madness/chem/atomutil.h>\n#include<madness/chem/molecule.h>\n\n\n#ifdef MADNESS_HAS_PCM\n\n#include \"PCMSolver/pcmsolver.h\"\n#include \"PCMSolver/PCMInput.h\"\n\nnamespace madness {\n\nnamespace detail {\n\n/// to convert the apparent surface charge potential to a real_function_3d\nstruct asc_potential : public FunctionFunctorInterface<double,3> {\n\n    /// the coordinates of the apparent surface charges\n    std::vector<coord_3d> asc_coord;\n\n    /// the charges of the apparent surface charges\n    std::vector<double> asc_value;\n\n    /// regularization parameter for the (singular) surface charges\n    double rcut;\n\n    /// constructor\n\n    /// @param[in]  size    the grid size (number of apparent surface charges, ASC)\n    /// @param[in]  coord   the coordinates of the ASC\n    /// @param[in]  val     the charges of the ASC\n    asc_potential(const int size, const Tensor<double> coord, const Tensor<double> val)\n        : rcut(3.0) {\n\n        asc_coord.resize(size);\n        asc_value.resize(size);\n        for (int i=0; i<size; ++i) {\n            coord_3d c;\n            c[0]=coord(3*i);\n            c[1]=coord(3*i+1);\n            c[2]=coord(3*i+2);\n            asc_coord[i]=c;\n            asc_value[i]=val(i);\n        }\n\n        // the smoothing parameter is based on the assumption that\n        // electron density is high near the singularity, but the ASC\n        // are at the van-der-Waals distance. We can savely use a smaller rcut.\n//        double Z=*std::max_element(asc_value.begin(),asc_value.end());\n//        double eprec=1.e-4;\n//        rcut=smoothing_parameter(Z,eprec);\n\n    }\n\n    /// return the value of the ASC potential\n    double operator()(const coord_3d& r) const {\n\n        double sum = 0.0;\n        for (unsigned int i=0; i<asc_value.size(); ++i) {\n            double rr=(r-asc_coord[i]).normf();\n            sum += asc_value[i] * smoothed_potential(rr*rcut)*rcut;\n        }\n        return sum;\n\n    }\n};\n\nvoid host_writer(const char * message) {\n    std::string msg(message);\n    print(msg);\n}\n\n\n}\n\nPCM::PCM(World& world, const Molecule& mol, const std::string pcm_data,\n        const bool verbose) : mep_lbl(\"TotMEP\"), asc_lbl(\"totASC\") {\n    if (!pcmsolver_is_compatible_library()) {\n        fprintf(stderr, \"%s\\n\", \"PCMSolver library not compatible\");\n        exit(EXIT_FAILURE);\n    }\n\n    // convert molecule to pcm format\n    const int natom=mol.natom();\n    charges=Tensor<double>(mol.natom());\n    coordinates=Tensor<double>(3*mol.natom());\n    double* ch=charges.ptr();\n    double* c=coordinates.ptr();\n    for (int iatom=0; iatom<mol.natom(); ++iatom) {\n        ch[iatom]=mol.get_atom_charge(iatom);\n        c[3*iatom   ]=mol.get_atom(iatom).x;\n        c[3*iatom +1]=mol.get_atom(iatom).y;\n        c[3*iatom +2]=mol.get_atom(iatom).z;\n    }\n\n    // default input\n    struct PCMInput host_input = pcmsolver_input();\n\n    // use the explicit input reader provided by PCMSolver\n    std::stringstream spcm_data(pcm_data);\n    std::string word;\n    spcm_data >> word;\n\n    pcmsolver_reader_t pcmsolver_reader=PCMSOLVER_READER_HOST;\n    if (word==\"PCMSOLVER_READER_OWN\") {\n        pcmsolver_reader=PCMSOLVER_READER_OWN;\n    } else {\n        // convert madness input to PCM input\n        if (not word.empty()) strcpy(host_input.solvent, pcm_data.c_str());\n    }\n\n    // there is only one option allowed\n    if (not spcm_data.eof()) {\n        print(\"the pcm flag had more than one option\");\n        MADNESS_EXCEPTION(\"only one pcm option is allowed\",0);\n    }\n\n    // This means the molecular point group has three generators:\n    // the Oxy, Oxz and Oyz planes\n    // we don't use symmetry\n    symmetry_info=Tensor<int>(4);\n\n    pcm_context =std::shared_ptr<pcmsolver_context_t> (\n            pcmsolver_new(pcmsolver_reader, natom, charges.ptr(), coordinates.ptr(),\n                    symmetry_info.ptr(), &host_input, detail::host_writer),\n                    pcmsolver_delete);\n\n    if (verbose and (world.rank()==0)) pcmsolver_print(pcm_context.get());\n\n}\n\nPCMInput PCM::pcmsolver_input() const {\n    PCMInput host_input;\n\n    // These parameters would be set by the host input reading\n    // Length and area parameters are all assumed to be in Angstrom,\n    // the module will convert to Bohr internally\n    strcpy(host_input.cavity_type, \"gepol\");\n    host_input.patch_level = 2;\n    host_input.coarsity = 0.5;\n    host_input.area = 0.2;\n    host_input.min_distance = 0.1;\n    host_input.der_order = 4;\n    host_input.scaling = true;\n    strcpy(host_input.radii_set, \"bondi\");\n    strcpy(host_input.restart_name, \"cavity.npz\");\n    host_input.min_radius = 100.0;\n\n    strcpy(host_input.solver_type, \"iefpcm\");\n    strcpy(host_input.solvent, \"water\");\n    strcpy(host_input.equation_type, \"secondkind\");\n    host_input.correction = 0.0;\n    host_input.probe_radius = 1.0;\n\n    strcpy(host_input.inside_type, \"vacuum\");\n    host_input.outside_epsilon = 1.0;\n    strcpy(host_input.outside_type, \"uniformdielectric\");\n\n    return host_input;\n}\n\nTensor<double> PCM::nuclear_mep(int nr_nuclei, const Tensor<double>& charges,\n        const Tensor<double>& coordinates, const int grid_size,\n        const Tensor<double>& grid) const {\n    Tensor<double> mep(grid_size);\n    for (int i = 0; i < nr_nuclei; i++) {\n        for (int j = 0; j < grid_size; j++) {\n            // Column-major ordering. Offsets: col_idx * nr_rows + row_idx\n            double dist = pow((coordinates(i * 3) - grid(j * 3)), 2) +\n                    pow((coordinates(i * 3 + 1) - grid(j * 3 + 1)), 2) +\n                    pow((coordinates(i * 3 + 2) - grid(j * 3 + 2)), 2);\n            mep(j) += charges(i) / sqrt(dist);\n        }\n    }\n    return mep;\n}\n\n\n\nreal_function_3d PCM::compute_pcm_potential(const real_function_3d& coulomb_potential,\n        const bool dynamic) const {\n\n    MADNESS_ASSERT(coulomb_potential.is_initialized());\n    const int grid_size = pcmsolver_get_cavity_size(pcm_context.get());\n\n    Tensor<double> grid(3*grid_size);\n    pcmsolver_get_centers(pcm_context.get(), grid.ptr());\n\n    // compute the molecular electrostatic potential (mep) from the nuclei\n    Tensor<double> mep = nuclear_mep(charges.size(), charges, coordinates, grid_size, grid);\n\n    // nuclear potential is density independent\n    if(dynamic) mep = 0.0;\n\n    // add the electronic contribution to the mep\n    for (int i=0; i<grid_size; ++i) {\n        coord_3d evalpoint={grid(3*i),grid(3*i+1),grid(3*i+2)};\n        mep[i]-=coulomb_potential(evalpoint);\n    }\n\n    // This is the Ag irreducible representation (totally symmetric)\n    int irrep = 0;\n\n    Tensor<double> asc(grid_size);\n\n    // compute the contribution to the response kernel\n    if (dynamic) {\n\n        const std::string mep_neq_lbl=\"mep_neq_lbl\";\n        const std::string asc_neq_lbl=\"asc_neq_lbl\";\n\n        pcmsolver_set_surface_function(pcm_context.get(), grid_size, mep.ptr(), mep_neq_lbl.c_str());\n        pcmsolver_compute_response_asc(pcm_context.get(), mep_neq_lbl.c_str(),asc_neq_lbl.c_str(), irrep);\n        pcmsolver_get_surface_function(pcm_context.get(), grid_size, asc.ptr(), asc_neq_lbl.c_str());\n\n    } else {\n        pcmsolver_set_surface_function(pcm_context.get(), grid_size, mep.ptr(), mep_lbl.c_str());\n        pcmsolver_compute_asc(pcm_context.get(), mep_lbl.c_str(), asc_lbl.c_str(), irrep);\n        pcmsolver_get_surface_function(pcm_context.get(), grid_size, asc.ptr(), asc_lbl.c_str());\n    }\n\n    detail::asc_potential ascpot(grid_size,grid,asc);\n    World& world = coulomb_potential.world();\n    real_function_3d v=real_factory_3d(world).functor(ascpot);\n\n    return -1.0*v;\n\n}\n\ndouble PCM::compute_pcm_energy() const {\n    double pcm_energy =\n            pcmsolver_compute_polarization_energy(pcm_context.get(), mep_lbl.c_str(), asc_lbl.c_str());\n    return pcm_energy;\n}\n\n\n} /* namespace madness */\n#else // MADNESS_HAS_PCM\n\nnamespace madness {\n\nPCM::PCM(World& world, const Molecule& mol, const std::string pcm_data,\n            const bool verbose) {\n    MADNESS_EXCEPTION(\"no PCMSolver configured and available in MADNESS\",1);\n}\n\nreal_function_3d PCM::compute_pcm_potential(const real_function_3d& coulomb_potential,\n        const bool dynamic) const {\n    MADNESS_EXCEPTION(\"no PCMSolver configured and available in MADNESS\",1);\n    real_function_3d dummy;\n    return dummy;\n}\n\ndouble PCM::compute_pcm_energy() const {\n    MADNESS_EXCEPTION(\"no PCMSolver configured and available in MADNESS\",1);\n    return 0.0;\n}\n\nTensor<double> PCM::nuclear_mep(int nr_nuclei, const Tensor<double>& charges,\n                         const Tensor<double>& coordinates, const int grid_size,\n                         const Tensor<double>& grid) const {\n    MADNESS_EXCEPTION(\"no PCMSolver configured and available in MADNESS\",1);\n    return Tensor<double>();\n}\n\n} // namespace madness\n#endif // MADNESS_HAS_PCM\n"
  },
  {
    "path": "src/madness/chem/pcm.h",
    "content": "/*\n This file is part of MADNESS.\n\n Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n For more information please contact:\n\n Robert J. Harrison\n Oak Ridge National Laboratory\n One Bethel Valley Road\n P.O. Box 2008, MS-6367\n\n email: harrisonrj@ornl.gov\n tel:   865-241-3937\n fax:   865-572-0680\n */\n\n#ifndef SRC_APPS_CHEM_PCM_H_\n#define SRC_APPS_CHEM_PCM_H_\n\n#include <memory>\n\n#include <madness/tensor/tensor.h>\n#include <madness/world/vector.h>\n#include <madness/mra/functypedefs.h>\n#include<madness/chem/molecule.h>\n\n#ifdef MADNESS_HAS_PCM\n#include <PCMSolver/pcmsolver.h>\n#endif\n\nnamespace madness {\n\n/// interface class to the PCMSolver library\n\n/// PCMSolver, an API for the Polarizable Continuum Model electrostatic problem.\n/// Main authors: R. Di Remigio, L. Frediani, K. Mozgawa\nclass PCM {\n\npublic:\n\n    /// default ctor\n    PCM() = default;\n\n    /// constructor for the interface to PCM\n\n    /// @param[in]  world   the world\n    /// @param[in]  mol     the molecule (coordinates and charges of the nuclei)\n    /// @param[in]  pcm_data    pcm input data as read from the input file\n    /// @param[in]  verbose print the PCM header\n    PCM(World& world, const Molecule& mol, const std::string pcm_data,\n            const bool verbose);\n\n    /// compute the potential induced by the surrounding solvent\n\n    /// @param[in]  coulomb_potential   the (positive) potential caused by the electron density\n    /// @param[in]  dynamic     compute the contribution to a response kernel\n    /// @return     the pcm potential with correct sign: J - K + V_nuc + V_pcm\n    real_function_3d compute_pcm_potential(const real_function_3d& coulomb_potential,\n            const bool dynamic=false) const;\n\n    /// compute the PCM energy based on the most recent call of compute_pcm_potential\n    double compute_pcm_energy() const;\n\nprivate:\n#ifdef MADNESS_HAS_PCM\n    /// the main pcmsolver object\n    std::shared_ptr<pcmsolver_context_t> pcm_context;\n\n    /// default input generator\n    PCMInput pcmsolver_input() const;\n#endif\n\n    /// compute the molecular electrostatic potential from the nuclei\n    Tensor<double> nuclear_mep(int nr_nuclei, const Tensor<double>& charges,\n                         const Tensor<double>& coordinates, const int grid_size,\n                         const Tensor<double>& grid) const;\n\n    /// symmetry info for PCM, needs to be memory controlled by the PCM class\n    Tensor<int> symmetry_info;\n\n    /// molecular coordinates, needs to be memory controlled by the PCM class\n    Tensor<double> coordinates;\n\n    /// nuclear charges of the molecule, needs to be memory controlled by the PCM class\n    Tensor<double> charges;\n\n    /// file name for the total (nuclear + electronic) molecular electronic potential\n    std::string mep_lbl;\n\n    /// file name for the total (nuclear + electronic) apparent surface charge\n    std::string asc_lbl;\n\n\n};\n\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_PCM_H_ */\n"
  },
  {
    "path": "src/madness/chem/plotxc.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#include <madness/world/world.h>\n#include <madness/mra/mra.h>\n#include <madness/tensor/tensor.h>\n#include <fstream>\n#include \"xcfunctional.h\"\n\nusing namespace madness;\n\nstatic std::string df_repo_functionals[] = {\n\"lda_x\", \n\"lda_c_vwn\", \n\"gga_x_pbe\", \n\"gga_c_pbe\", \n\"gga_x_pw91\",\n\"gga_c_pw91\", \n\"gga_x_b88\", \n\"gga_c_lyp\",\n\"lda_c_vwn_rpa\", \n\"lda_c_vwn\", \n\"lda_c_pz\", \n\"lda_c_pw\", \n\"hyb_gga_xc_b3lyp\", \n\"gga_xc_hcth_93\", \n\"gga_xc_hcth_407\", \n\"gga_xc_hcth_147\", \n\"gga_xc_hcth_120\", \n\"gga_xc_edf1\", \n\"gga_xc_b97_2\", \n\"gga_xc_b97_1\", \n\"gga_xc_b97\", \n\"gga_x_pw91\", \n\"gga_x_pbe\", \n\"gga_x_ft97_b\", \n\"gga_x_b88\", \n\"gga_c_pw91\", \n\"gga_c_pbe\", \n\"gga_c_p86\", \n\"gga_c_lyp\"};\n\n\nstruct xcfunc_data_point\n{\n  double rhoa, rhob;\n  double sigmaaa, sigmaab, sigmabb;\n  double zk;\n  double vrhoa, vrhob;\n  double vsigmaaa, vsigmaab, vsigmabb;\n  double v2rhoa2, v2rhoab, v2rhob2;\n};\n\nstd::vector<xcfunc_data_point> read_test_data(const std::string& dfname,\n                                              bool spin_polarized)\n{\n\n  std::vector<xcfunc_data_point> dps;\n\n  double rhoa=1e-25;\n  double siga;\n  while (rhoa<1e16)\n  {\n    siga=1e-25;\n\n    while (siga<1e16)\n    {\n      xcfunc_data_point dp;\n      dp.rhoa=rhoa;\n      dp.rhob=rhoa;\n      dp.sigmaaa=siga;\n      dp.sigmaab=siga;\n      dp.sigmabb=siga;\n\n      dp.zk=0.0;\n      dp.vrhoa=0.0;\n      dp.vrhob=0.0;\n      dp.vsigmaaa=0.0;\n      dp.vsigmaab=0.0;\n      dp.vsigmabb=0.0;\n      dp.v2rhoa2=0.0;\n      dp.v2rhoab=0.0;\n      dp.v2rhob2=0.0;\n\n      if (!spin_polarized)\n      {\n        if (std::abs(dp.rhoa-dp.rhob) <= 1e-10)\n          dps.push_back(dp);\n      }\n      else\n      {\n        dps.push_back(dp);\n      }\n   \n      siga*=10;\n    }\n    rhoa*=10;\n  }\n\n  return dps;\n\n}\n\nvoid test_xcfunctional(World& world)\n{\n    bool spin_polarized ;\n    //spin_polarized = true;\n    spin_polarized = false;\n\n    int ispin = 0; //alpha=0 beta=1\n\n    //int istr = 0; // 0-7\nfor (int istr=2;istr<3;istr++){\n\n//vama5     0  \"lda_x\", \n//vama5     1\t\"lda_c_vwn_rpa\", \n//vama5     2\t\"lda_c_vwn\", \n//vama5     3\t\"lda_c_pz\", \n//vama5     4\t\"lda_c_pw\", \n//vama5     5\t\"hyb_gga_xc_b3lyp\", \n//vama5     6\t\"gga_xc_hcth_93\", \n//vama5     7\t\"gga_xc_hcth_407\", \n//vama5     8\t\"gga_xc_hcth_147\", \n//vama5     9\t\"gga_xc_hcth_120\", \n//vama5    10\t\"gga_xc_edf1\", \n//vama5    11\t\"gga_xc_b97_2\", \n//vama5    12\t\"gga_xc_b97_1\", \n//vama5    13\t\"gga_xc_b97\", \n//vama5    14\t\"gga_x_pw91\", \n//vama5    15\t\"gga_x_pbe\", \n\n//vama5    16\t\"gga_x_ft97_b\", \n//vama5    17\t\"gga_x_b88\", \n//vama5    18\t\"gga_c_pw91\", \n//vama5    19\t\"gga_c_pbe\", \n\n//vama5    20\t\"gga_c_p86\", \n//vama5    21\t\"gga_c_lyp\"};\n\n    XCfunctional xcfunc;\n    std::string xcfuncstr = df_repo_functionals[istr];\n    std::cout << \"Testing exchange-correlation functional:  \"<< xcfuncstr << std::endl;\n\n    xcfuncstr += \" 1.0\";\n    xcfuncstr += \" gga_c_pbe 1.0\";  //hack to do both x and c for PBE\n    xcfuncstr += \" RHOTOL 0.0 RHOMIN 0.0 SIGTOL 0.0 SIGMIN 0.0\";\n    xcfunc.initialize(xcfuncstr,spin_polarized,world);\n\n    std::string fpath(\"df_repo/\");\n    fpath += df_repo_functionals[istr];\n    fpath += \".data\";\n    std::vector<xcfunc_data_point> dps = read_test_data(fpath.c_str(),spin_polarized);\n\n    Tensor<double> rhoa_t((long)dps.size());\n    Tensor<double> rhob_t((long)dps.size());\n    Tensor<double> sigmaaa_t((long)dps.size());\n    Tensor<double> sigmaab_t((long)dps.size());\n    Tensor<double> sigmabb_t((long)dps.size());\n    Tensor<double> zk_t((long)dps.size());\n    Tensor<double> vrhoa_t((long)dps.size());\n    Tensor<double> vrhob_t((long)dps.size());\n    Tensor<double> vsigmaaa_t((long)dps.size());\n    Tensor<double> vsigmaab_t((long)dps.size());\n    Tensor<double> vsigmabb_t((long)dps.size());\n\n    Tensor<double> rhoa1_t((long)dps.size());\n    Tensor<double> sigmaaa1_t((long)dps.size());\n\n    std::vector<Tensor<double> > xc_args;\n    for (unsigned int idp = 0; idp < dps.size(); idp++)\n    {\n      rhoa_t(idp) = dps[idp].rhoa;\n      rhob_t(idp) = dps[idp].rhob;\n\n      sigmaaa_t(idp) = dps[idp].sigmaaa;\n      sigmaab_t(idp) = dps[idp].sigmaab;\n      sigmabb_t(idp) = dps[idp].sigmabb;\n\n      zk_t(idp) = dps[idp].zk;\n\n      vrhoa_t(idp) = dps[idp].vrhoa;\n      vrhob_t(idp) = dps[idp].vrhob;\n\n\n      vsigmaaa_t(idp) = dps[idp].vsigmaaa;\n      vsigmaab_t(idp) = dps[idp].vsigmaab;\n      vsigmabb_t(idp) = dps[idp].vsigmabb;\n    }\n    if (spin_polarized)\n    {\n      xc_args.push_back(rhoa_t);\n      xc_args.push_back(rhob_t);\n      if (xcfunc.is_gga()) {\n        xc_args.push_back(sigmaaa_t);\n        xc_args.push_back(sigmaab_t);\n        xc_args.push_back(sigmabb_t);\n      }\n    }\n    else\n    {\n      xc_args.push_back(rhoa_t);\n      if (xcfunc.is_gga()) {\n         xc_args.push_back(sigmaaa_t);\n      }\n    }\n\n    print(\"xc_args_size\", xc_args.size());\n    print(\"ispin \", ispin);\n    print(\"spin polarized \", spin_polarized);\n//vama1  std::cout << \"Testing spin-polarized case: \" << std::endl << std::endl;\n\n    // local vr[0] and semilocal vr[1-3] potential\n    std::vector<Tensor<double> > vr = xcfunc.vxc(xc_args,ispin);\n\n\n#if 0\n    print(\"\\n\");\n    if(what == 0)\n    print(\"rhoa \\t vr \\t read\\t comp   \\n\");\n    if(what == 1)\n    print(\"rhoa \\t vsigmaa \\t read\\t comp   \\n\");\n    if(what == 2)\n    print(\"rhoa \\t vsigmab \\t read\\t comp   \\n\");\n    if(what == 3)\n    print(\"rhoa \\t zk \\t read\\t comp   \\n\");\n    for (unsigned int idp = 0; idp < dps.size(); idp++)\n    {\n    if (spin_polarized)\n    {\n      if(what == 0)\n      printf(\"%25.12e %25.12e  %25.12e %25.12e  \\n\",\n          rhoa_t[idp], vrhoa_t[idp], dps[idp].vrhoa, vr[idp] );\n      if(what == 1)\n      printf(\"%i %25.12e %25.12e  %25.12e %25.12e  \\n\",\n          idp, rhoa_t[idp], vsigmaaa_t[idp], dps[idp].vsigmaaa, vr[idp]);\n      if(what == 2)\n      printf(\"%i %25.12e %25.12e  %25.12e %25.12e  \\n\",\n          idp, rhoa_t[idp], vsigmaab_t[idp], dps[idp].vsigmaab, vr[idp]);\n      if(what == 3) \n      printf(\"%25.12e %25.12e  %25.12e %25.12e  \\n\",\n          rhoa_t[idp], zk_t[idp], dps[idp].zk, vr[idp]);\n    }\n    else\n    {\n      if(what == 0)\n      printf(\"%25.12e %25.12e  %25.12e %25.12e  \\n\",\n          rhoa_t[idp], vrhoa_t[idp], dps[idp].vrhoa, vr[idp] );\n      if(what == 1)\n      printf(\"vsga %i %25.12e %25.12e  %25.12e %25.12e  \\n\",\n          idp, rhob_t[idp], vsigmaaa_t[idp], dps[idp].vsigmaaa, vr[idp]);\n        //  idp, rhob_t[idp], .5*(vsigmaaa_t[idp] + .5*vsigmaab_t[idp]), dps[idp].vsigmaaa, vr[idp]);\n      if(what == 2)\n       printf (\" \\n bad bad bad\\n \") ;\n      if(what ==3) \n      printf(\"%25.12e %25.12e  %25.12e %25.12e  \\n\",\n          rhoa_t[idp], zk_t[idp], dps[idp].zk, vr[idp]);\n    }\n    }\n    print(\"\\n\\n\");\n#endif\n\n    FILE *f=0;\n    f = fopen((df_repo_functionals[istr]+\".dat\").c_str(), \"w\");\n\n    //if(xcfunc.is_gga()){\n    if (xcfunc.is_spin_polarized())\n    {\n        fprintf(f,\"%25s %25s %25s %25s %25s %25s %25s\\n\",\"#rhoa\",\"rhob\",\"sigmaaa\",\n                \"sigmaab\",\"sigmabb\",\"vrhoa \",\"vsigmaaa * drho_x\");\n        for (unsigned int idp = 0; idp < dps.size(); idp++) {\n            fprintf(f,\"%25.12e %25.12e %25.12e %25.12e %25.12e %25.12e %25.12e\\n\",\n                    rhoa_t[idp], rhob_t[idp], sigmaaa_t[idp], sigmaab_t[idp], sigmabb_t[idp],vr[0][idp], vr[1][idp]);\n        }\n    }\n    else\n    {\n        fprintf(f,\"%25s %25s %25s %25s\\n\",\"#rho\",\"sigma\",\"vrho \",\"vsigma*drho_x\");\n        for (unsigned int idp = 0; idp < dps.size(); idp++)\n        {\n            fprintf(f,\"%25.12e %25.12e %25.12e %25.12e\\n\",\n                    rhoa_t[idp], sigmaaa_t[idp], vr[0][idp], vr[1][idp]);\n        }\n    }\n    fprintf(f,\"\\n\\n\");\n    /*}\n      else\n      {\n        if (xcfunc.is_spin_polarized())\n        {\n          fprintf(f,\"%25s %25s %25s\\n\",\"#rhoa\",\"rhob\",\"vrhoa\");\n          for (unsigned int idp = 0; idp < dps.size(); idp++)\n          {\n            fprintf(f,\"%25.12e %25.12e %25.12e\\n\",\n                rhoa_t[idp], rhob_t[idp], vr[idp]);\n          }\n        }\n        else\n        {\n          fprintf(f,\"%25s %25s\\n\",\"#rho\",\"vrho\");\n          for (unsigned int idp = 0; idp < dps.size(); idp++)\n          {\n            fprintf(f,\"%25.12e %25.12e\\n\",\n                rhoa_t[idp], vr[idp]);\n          }\n        }\n        fprintf(f,\"\\n\\n\");\n      }*/\n\n    fclose(f);\n\n}\n\n}\n\nint main(int argc, char** argv) {\n    madness::initialize(argc, argv);\n\n    madness::World world(SafeMPI::COMM_WORLD);\n    world.gop.fence();\n\n    test_xcfunctional(world);\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/chem/pointgroupoperator.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n\n/*!\n  \\file chem/pointgroupoperator.h\n  \\brief implements point group operations\n\n  The source is\n  <a href=http://code.google.com/p/m-a-d-n-e-s-s/source/browse/local\n  /trunk/src/apps/chem/pointgroupoperator.h>here</a>.\n\n*/\n\n#ifndef SRC_APPS_CHEM_POINTGROUPOPERATOR_H_\n#define SRC_APPS_CHEM_POINTGROUPOPERATOR_H_\n\n#include <madness/tensor/vector_factory.h>\n\nnamespace madness {\n\ntemplate<typename T, std::size_t NDIM>\nclass Function;\n/// This class implements the symmetry operations (not the point groups)\nclass pg_operator {\n\npublic:\n\n\t/// ctor with explicit mirror maps\n    pg_operator(std::string symbol, std::string name, const std::vector<long> mm,\n    \t\tconst std::vector<long> md)\n\t\t: symbol_(symbol), name_(name), mirrormap(mm), mapdim_(md) {}\n\n    /// return the name of the symmetry operator\n    std::string name() const {return name_;}\n\n    std::string symbol() const {return symbol_;}\n\n\t/// apply the operator on an n-dimensional MRA function\n\ttemplate<typename T, std::size_t NDIM>\n\tFunction<T,NDIM> operator()(const Function<T,NDIM>& f, bool fence=true) const {\n        Function<T,NDIM> result;\n\n        if (name_==\"identity\") {\n        \tresult=copy(f,fence);\n\n        } else if (name_==\"inversion\"){\n\n        \tstd::vector<long> mm(NDIM,-1);\n        \tresult=mirror(f,mm,fence);\n\n        } else {\n        \tresult=map_and_mirror(f,mapdim_,mirrormap,fence);\n        }\n\n\t\treturn result;\n\t}\n\n\t/// apply the operator on an n-dimensional MRA function\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > operator()(const std::vector<Function<T,NDIM> >& vf, bool fence=true) const {\n        std::vector<Function<T,NDIM> > result(vf.size());\n\n        // fast return\n        if (vf.size()==0) return result;\n        World& world=vf.begin()->world();\n\n        for (size_t i=0; i<vf.size(); ++i) result[i]=this->operator()(vf[i],false);\n\n        if (fence) world.gop.fence();\n\t\treturn result;\n\t}\n\n\n\tfriend\n\tstd::ostream& operator<<(std::ostream& s, const pg_operator& pg_op) {\n\t\ts << \"Symmetry operator \" << pg_op.name() ;\n\t\treturn s;\n\t}\n\n\nprivate:\n\n\tstd::string symbol_;\n\tstd::string name_;\n\tstd::vector<long> mirrormap;\n    std::vector<long> mapdim_;\n\n};\n\n\n// n-dimensional operations\nstatic inline pg_operator pg_identity() {\n    return pg_operator(\"E\",\"identity\",std::vector<long>(), std::vector<long>());\n}\n\nstatic inline pg_operator pg_inversion() {\n    return pg_operator(\"i\",\"inversion\",std::vector<long>(), std::vector<long>());\n}\n\n// 2D operations\nstatic inline pg_operator pg_sigma_x() {\n    return pg_operator(\"s\",\"sigma_x\",vector_factory<long>(1,-1),std::vector<long>());\n}\n\nstatic inline pg_operator pg_sigma_y() {\n    return pg_operator(\"s\",\"sigma_y\",vector_factory<long>(-1,1),std::vector<long>());\n}\n\nstatic inline pg_operator pg_c2() {\n    return pg_operator(\"C2\",\"C_2\",vector_factory<long>(-1,-1),std::vector<long>());\n}\n\nstatic inline pg_operator pg_c4() {\n    return pg_operator(\"C4\",\"C_4\",vector_factory<long>(-1,1),vector_factory<long>(1,0));\n}\n\n\n// 3D operations\nstatic inline pg_operator pg_sigma_xy() {\n    return pg_operator(\"s\",\"sigma_xy\",vector_factory<long>(1,1,-1), std::vector<long>());\n}\n\nstatic inline pg_operator pg_sigma_xz() {\n    return pg_operator(\"s\",\"sigma_xz\",vector_factory<long>(1,-1,1), std::vector<long>());\n}\n\nstatic inline pg_operator pg_sigma_yz() {\n    return pg_operator(\"s\",\"sigma_yz\",vector_factory<long>(-1,1,1), std::vector<long>());\n}\n\nstatic inline pg_operator pg_c2x() {\n\treturn pg_operator(\"C2\",\"C_2(x)\",vector_factory<long>(1,-1,-1), std::vector<long>());\n}\n\nstatic inline pg_operator pg_c2y() {\n\treturn pg_operator(\"C2\",\"C_2(y)\",vector_factory<long>(-1,1,-1), std::vector<long>());\n}\n\nstatic inline pg_operator pg_c2z() {\n\treturn pg_operator(\"C2\",\"C_2(z)\",vector_factory<long>(-1,-1,1), std::vector<long>());\n}\n\nstatic inline pg_operator pg_c4x() {\n\treturn pg_operator(\"C4\",\"C_4(x)\",vector_factory<long>(1,-1,1), vector_factory<long>(0,2,1));\n}\n\nstatic inline pg_operator pg_c4y() {\n\treturn pg_operator(\"C4\",\"C_4(y)\",vector_factory<long>(1,1,-1), vector_factory<long>(2,1,0));\n}\n\nstatic inline pg_operator pg_c4z() {\n\treturn pg_operator(\"C4\",\"C_4(z)\",vector_factory<long>(-1,1,1), vector_factory<long>(1,0,2));\n}\n\n\n} // namespace madness\n\n#endif /* SRC_APPS_CHEM_POINTGROUPOPERATOR_H_ */\n"
  },
  {
    "path": "src/madness/chem/pointgroupsymmetry.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n\n/*!\n  \\file chem/pointgroupsymmetry.cc\n  \\brief implements point group operations\n\n  The source is\n  <a href=http://code.google.com/p/m-a-d-n-e-s-s/source/browse/local\n  /trunk/src/apps/chem/pointgroupsymmetry.cc>here</a>.\n\n*/\n\n#include<madness/chem/pointgroupsymmetry.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/vmra.h>\n#include <madness/mra/functypedefs.h>\n#include <madness/fortran_ctypes.h>\n\nnamespace madness {\n\n\n/// (re-)project the argument on the given irreps\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T,NDIM> > projector_irrep::project_on_irreps(\n\t\tconst std::vector<Function<T,NDIM> >& vrhs,\n\t\tconst std::vector<std::string>& irreps) const {\n\n\tWorld& world=vrhs.begin()->world();\n\n\t// fast return\n\tif (vrhs.size()==0) return std::vector<Function<T,NDIM> >();\n\tif (table_.schoenflies_==\"C1\") {return copy(world,vrhs);}\n\n\t// loop over all symmetry operations of this point group and apply them\n\t// to the input vector; dimension: (nop, nmo)\n\tstd::vector<std::vector<Function<T,NDIM> > > opvrhs(table_.operators_.size());\n\tfor (size_t i=0; i<table_.operators_.size(); ++i) {\n\t\topvrhs[i]=table_.operators_[i](vrhs,false);\n\t}\n\tworld.gop.fence();\n\tfor (size_t i=0; i<table_.operators_.size(); ++i) compress(world,opvrhs[i],false);\n\tworld.gop.fence();\n\n\tstd::vector<Function<T,NDIM> > result=zero_functions_compressed<T,NDIM>(world,vrhs.size());\n\n\t// loop over all vector elements\n\tfor (size_t ivec=0; ivec<vrhs.size(); ++ivec) {\n\n\t\t// get the characters for this vector element\n\t\tconst charactertable::characterlineT cline=table_.irreps_.find(irreps[ivec])->second;\n\t\tfor (size_t iop=0; iop<table_.operators_.size(); ++iop) {\n\t\t\tdouble character=double(cline[iop]);\n\n\t\t\t// apply the projection operator P^Gamma v_i = \\sum_op \\chi_op^Gamma op(v_i)\n\t\t\tresult[ivec].gaxpy(1.0,opvrhs[iop][ivec],character/table_.order_,false);\n\t\t}\n\t}\n\tworld.gop.fence();\n\n\ttruncate(world,result);\n\treturn result;\n}\n\n\n/// symmetrize a vector of functions\n\n/// project a number of functions on a given number of irreps\n/// linear dependencies are removed, the functions are orthonormalized\n/// vanishing input functions are mapped onto vanishing output functions with irrep \"null\"\n/// the number of input and output function is expected to be the same!\n/// @param[in]\tvrhs\tvector of functions to be projected on the irrep\n/// @param[in]\tvbra\tbra of vrhs if applicable (if bra /= ket), may be empty\n/// @param[out]\tsirrep\tvector with the irrep names corresponding to the result\ntemplate<typename T, std::size_t NDIM>\nstd::vector<Function<T,NDIM> > projector_irrep::apply_symmetry_operators(\n\t\tconst std::vector<Function<T,NDIM> >& vrhs,\n        Function<typename Tensor<T>::scalar_type,NDIM> metric,\n\t\tstd::vector<std::string>& sirreps) const {\n\n\tWorld& world=vrhs.begin()->world();\n\n\t// fast return\n\tif (vrhs.size()==0) return std::vector<Function<T,NDIM> >();\n\tif (table_.schoenflies_==\"C1\") {\n\t\tsirreps=std::vector<std::string>(vrhs.size(),\"a\");\n\t\treturn copy(world,vrhs);\n\t}\n\n\t// loop over all symmetry operations of this point group and apply them\n\t// to the input vector; dimension: (nop, nmo)\n\tstd::vector<std::vector<Function<T,NDIM> > > opvrhs(table_.operators_.size());\n\tfor (size_t i=0; i<table_.operators_.size(); ++i) {\n\t\topvrhs[i]=table_.operators_[i](vrhs,false);\n\t}\n\n\t// get all irreps to work on\n\tstd::vector<std::string> all_irreps;\n\tif (irrep_==\"all\") {\n\t\tall_irreps=table_.mullikan_;\n\t} else {\n\t\tall_irreps.push_back(irrep_);\n\t}\n\n\t// accumulate the linearly combined results here; dimension: (nirrep, nmo)\n\tstd::vector<std::vector<Function<T,NDIM> > > lc_op_vrhs(all_irreps.size());\n\tfor (auto& v : lc_op_vrhs) {\n\t\tv=zero_functions_compressed<T,NDIM>(world,vrhs.size(),false);\n\t}\n\n\t// need to fence here before the linear combination with the character weights\n\tworld.gop.fence();\n\n\t// loop over all requested irreps\n\tfor (auto& o : opvrhs) change_tree_state(o,compressed);\n\tfor (size_t j=0; j<all_irreps.size(); ++j) {\n\t\tstd::string& irrep=all_irreps[j];\n\n\t\t// get the characters of this irrep\n\t\tconst charactertable::characterlineT cline=table_.irreps_.find(irrep)->second;\n\t\tMADNESS_ASSERT(table_.operators_.size()==cline.size());\n\n\n\t\t// do the linear combination; loop over all operators\n\t\t// lc_op_vhrs[jrrep] = \\sum_iop (character[iop]/table_.order_)*opvhrs[iop];\n\t\tfor (size_t iop=0; iop<cline.size(); ++iop) {\n\t\t\tdouble character=double(cline[iop]);\n\t\t\tgaxpy(world,1.0,lc_op_vrhs[j],character/table_.order_,opvrhs[iop],false);\n\t\t}\n\t}\n\n\t// need to fence here before the orthogonalization step\n\tworld.gop.fence();\n\tfor (auto& v : lc_op_vrhs) truncate(world,v,0.0,false);\n\tworld.gop.fence();\n\n\t// now we have a linearly dependent set of symmetrized functions\n\tstd::vector<Function<T,NDIM> > result1;\n\tstd::vector<std::string> sirreps1;\n\tstd::vector<int> ipiv1;\n\n\t// loop over all irreps\n\t//int iresult=0;\t// counter for the result vector ordering\n\tfor (size_t j=0; j<all_irreps.size(); ++j) {\n\n\t\tif (verbosity_>1) print(\"working on irrep \",all_irreps[j]);\n\t\t// compute overlap, include metric if necessary\n\t\tTensor<T> ovlp_t;\n\t\tif (metric.is_initialized()) ovlp_t=matrix_inner(world,lc_op_vrhs[j],metric*lc_op_vrhs[j]);\n\t\telse ovlp_t=matrix_inner(world,lc_op_vrhs[j],lc_op_vrhs[j]);\n\t\t// overlap matrix should be real\n\t\tTensor<double> ovlp=real(ovlp_t);\n        Tensor<double> imag_ovlp=imag(ovlp_t);\n        MADNESS_CHECK(imag_ovlp.normf()<1.e-10);\n\n//\t\t\tfor (int i=0; i<ovlp.dim(0); ++i) ovlp(i,i)+=1.e-6;\n\n\t\tif (verbosity_>2) {\n\t\t\tprint(\"ovlp\");\n\t\t\tprint(ovlp);\n\t\t}\n\n\t\t// check for zero rank\n\t\tTensor<double> evec,eval;\n\t\tsyev(ovlp,evec,eval);\n\n\t\tif (eval.sum()>lindep_) {\n\n\t\t\tif (verbosity_>1) print(\"eigenvalues\",eval);\n\n\t\t\t// compute rank-revealing Cholesky, discard linear dependent vectors\n\t\t\tTensor<integer> piv;\n\t\t\tint rank;\n\t\t\trr_cholesky(ovlp,lindep_,piv,rank);\n\t\t\tTensor<double> shrunk=copy(ovlp(Slice(0,rank-1,1),Slice(0,rank-1,1)));\n\t\t\tTensor<double> inv=inverse(shrunk);\n\n\t\t\tif (verbosity_>2) {\n\t\t\t\tprint(\"cholesky\");\n\t\t\t\tprint(ovlp);\n\t\t\t\tprint(\"inverse(cholesky)\");\n\t\t\t\tprint(inv);\n\t\t\t\tprint(\"orthogonality\");\n\t\t\t\tprint(inner(shrunk,shrunk,0,0));\n\t\t\t}\n\t\t\tif (verbosity_>1) {\n\t\t\t\tprint(\"pivot elements\");\n\t\t\t\tprint(piv);\n\t\t\t}\n\n\t\t\t// collect non-vanishing elements\n\t\t\tstd::vector<Function<T,NDIM> > a1shrunk;\n\t\t\tfor (int i=0; i<rank; ++i) a1shrunk.push_back(lc_op_vrhs[j][piv(i)]);\n\n\t\t\t// orthonormalize vectors within this irrep\n\t\t\tif (orthonormalize_irreps_) a1shrunk=transform(world,a1shrunk,inv);\n\n\t\t\t// collect all result functions and their irreps\n\t\t\tfor (size_t i=0; i<a1shrunk.size(); ++i) {\n\t\t\t\tresult1.push_back(a1shrunk[i]);\n\t\t\t\tsirreps1.push_back(all_irreps[j]);\n\t\t\t\tipiv1.push_back(piv[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\t// check closure\n\tif (vrhs.size()>1 and (sirreps1.size()>vrhs.size())) {\n\n\t\tprint(\"vrhs.size()            \",vrhs.size());\n\t\tprint(\"raw sirreps            \",sirreps1);\n\t\tprint(\"raw mapping in ipiv1   \",ipiv1);\n\n\t\tMADNESS_EXCEPTION(\"\\n\\nfunction arguments in apply_symmetry_operators are not closed\\n\\n\",1);\n\t}\n\n\tif (verbosity_>1) {\n\t\tprint(\"raw sirreps            \",sirreps1);\n\t\tprint(\"raw mapping in ipiv1   \",ipiv1);\n\t}\n\n\t// resorting section, does not apply if number of function increases\n\n\t// if linear dependencies occur, the mapping of input and output functions\n\t// might not be unique, i.e. the mapping might look like ipiv={0,1,1,3,4},\n\t// with double entries (1) and missing entries (2).\n\t// Imagine a He dimer with the bonding and antibonding orbitals both being mapped\n\t// to the left atomic orbital, just by numerical noise.\n\t// Find double and missing entries and replace the double with the missing ones\n\n\tstd::vector<Function<T,NDIM> > result=zero_functions<T,NDIM>(world,vrhs.size());\n\tsirreps=std::vector<std::string>(vrhs.size(),\"null\");\n\n\tif (vrhs.size()==1) {\n\t\tresult=result1;\n\t\tsirreps=sirreps1;\n\n\t} else {\n\t\t// find all double elements\n\t\tstd::vector<int> ipiv2(ipiv1),double_elements;\n\t\tstd::sort(ipiv2.begin(), ipiv2.end());\n\t\tfor (size_t i=1; i<ipiv2.size(); ++i) {\n\t\t\tif (ipiv2[i]==ipiv2[i-1]) double_elements.push_back(ipiv2[i]);\n\t\t}\n\n\t\tif (verbosity_>1) print(\"double elements  \", double_elements);\n\n\t\t// if there are double elements we have to recompute the overlap matrix\n\t\t// to safely determine the mapping\n\t\tif (double_elements.size()>0) {\n\t\t\tTensor<T> ovlp2=matrix_inner(world,result1,vrhs);\n            Tensor<double> ovlp1=real(ovlp2);\n            Tensor<double> imag_ovlp=imag(ovlp2);\n            MADNESS_CHECK(imag_ovlp.normf()<1.e-10);\n\n\n\t\t\tlong index[2];\n\t\t\t// find the largest overlap matrix element in each column\n\t\t\tfor (int i=0; i<ovlp1.dim(1); ++i) {\n\n\t\t\t\tovlp1(_,i).absmax(index);\n\t\t\t\tif (verbosity_>2) {\n\t\t\t\t\tprint(\"result overlap matrix\");\n\t\t\t\t\tprint(ovlp1);\n\t\t\t\t\tprint(\"index\",index[0]);\n\t\t\t\t}\n\t\t\t\tipiv1[i]=index[0];\n\t\t\t\t// remove this row from the tensor\n\t\t\t\tovlp1(index[0],_)=0.0;\n\t\t\t}\n\t\t}\n\t\tif (verbosity_>1) print(\"final ipiv1\",ipiv1);\n\n\t\tfor (size_t i=0; i<ipiv1.size(); ++i) {\n\t\t\tresult[ipiv1[i]]=result1[i];\n\t\t\tsirreps[ipiv1[i]]=sirreps1[i];\n\t\t}\n\t}\t// end of resorting/mapping section\n\n\tif (not keep_ordering_) result=sort_to_irreps(result,sirreps);\n\tif (verbosity_>0) print(\"final function irreps: \",sirreps);\n\n\treturn result;\n\n}\n\n\n\nstd::vector<std::string> projector_irrep::reduce(const std::vector<std::string> irreps) const {\n\n\tbool verbose=false;\n\tfor (const std::string& r : irreps) {\n\t\tif (r==\"null\") return std::vector<std::string> (1,\"null\");\n\t}\n\n\t// make sure all reps in the input vector exist in the table\n\tfor (auto r : irreps) {\n\t\tif (table_.irreps_.find(r)==table_.irreps_.end()) {\n\t\t\tprint_character_table();\n\t\t\tprint(\"Irrep\", r);\n\t\t\tMADNESS_EXCEPTION(\"Could not find irrep in table\",1);\n\t\t}\n\t}\n\tif (verbose) {\n\t\tprint(\"input irreps in reduce\");\n\t\tfor (auto& i : irreps) print(i);\n\t}\n\n\t// the characters of the direct product of the input representation\n\t// is the product of their characters\n\tstd::vector<int> reducible(table_.irreps_.find(irreps[0])->second);\n\tfor (std::size_t irep=1; irep<irreps.size(); ++irep) {\n\t\tstd::vector<int> rep_characters(table_.irreps_.find(irreps[irep])->second);\n\t\tfor (std::size_t ichar=0; ichar<rep_characters.size(); ++ichar) {\n\t\t\treducible[ichar]*=rep_characters[ichar];\n\t\t}\n\t}\n\tif (verbose) {\n\t\tprint(\"characters of the reducible product representation\");\n\t\tfor (const int i : reducible) print(i);\n\t}\n\n\t// reduce the reducible representation\n\tstd::vector<std::string> result;\n\tfor (const std::string& irrep : get_all_irreps()) {\n\t\tint n_irrep=0;\n\t\tstd::vector<int> ii=table_.irreps_.find(irrep)->second;\n\t\tfor (size_t i=0; i<reducible.size(); ++i) {\t// sum over all classes/operators\n\t\t\tn_irrep+=reducible[i]*ii[i];\n\t\t}\n\t\tMADNESS_ASSERT(n_irrep%table_.order_==0);\n\t\tn_irrep/=table_.order_;\n\t\tif (verbose) {\n\t\t\tprint(\"found irrep\",irrep, n_irrep,\" times\");\n\t\t}\n\t\tif (n_irrep>1) MADNESS_EXCEPTION(\"cannot handle the same irrep multiple times in reduce\",1);\n\t\tif (n_irrep==1) result.push_back(irrep);\n\t}\n\treturn result;\n}\n\n\ncharactertable projector_irrep::make_c1_table() const {\n\tcharactertable c1;\n\tc1.schoenflies_=\"C1\";\n\tc1.order_=1;\n\tc1.operators_.push_back(pg_identity());\n\tc1.irreps_[\"a\"]=vector_factory<int>(1);\n\tc1.mullikan_=vector_factory<std::string>(\"a\");\n\treturn c1;\n}\n\ncharactertable projector_irrep::make_cs_table() const {\n\tcharactertable cs;\n\tcs.schoenflies_=\"Cs\";\n\tcs.order_=2;\n\tcs.operators_.push_back(pg_identity());\n\tcs.operators_.push_back(pg_sigma_xy());\n\tcs.irreps_[\"a'\"]=vector_factory<int>(1,1);\n\tcs.irreps_[\"a''\"]=vector_factory<int>(1,-1);\n\tcs.mullikan_=vector_factory<std::string>(\"a'\",\"a''\");\n\treturn cs;\n}\n\n\ncharactertable projector_irrep::make_ci_table() const {\n\tcharactertable cs;\n\tcs.schoenflies_=\"Ci\";\n\tcs.order_=2;\n\tcs.operators_.push_back(pg_identity());\n\tcs.operators_.push_back(pg_inversion());\n\tcs.mullikan_=vector_factory<std::string>(\"ag\",\"au\");\n\tcs.irreps_[\"ag\"]=vector_factory<int>(1,1);\n\tcs.irreps_[\"au\"]=vector_factory<int>(1,-1);\n\treturn cs;\n}\n\ncharactertable projector_irrep::make_c2_table() const {\n\tcharactertable cs;\n\tcs.schoenflies_=\"C2\";\n\tcs.order_=2;\n\tcs.operators_.push_back(pg_identity());\n\tcs.operators_.push_back(pg_c2z());\n\tcs.mullikan_=vector_factory<std::string>(\"a\",\"b\");\n\tcs.irreps_[\"a\"]=vector_factory<int>(1,1);\n\tcs.irreps_[\"b\"]=vector_factory<int>(1,-1);\n\treturn cs;\n}\n\ncharactertable projector_irrep::make_c2v_table() const {\n\tcharactertable cs;\n\tcs.schoenflies_=\"C2v\";\n\tcs.order_=4;\n\tcs.operators_.push_back(pg_identity());\n\tcs.operators_.push_back(pg_c2z());\n\tcs.operators_.push_back(pg_sigma_xz());\n\tcs.operators_.push_back(pg_sigma_yz());\n\tcs.mullikan_=vector_factory<std::string>(\"a1\",\"a2\",\"b1\",\"b2\");\n\tcs.irreps_[\"a1\"]=vector_factory<int>(1,1,1,1);\n\tcs.irreps_[\"a2\"]=vector_factory<int>(1,1,-1,-1);\n\tcs.irreps_[\"b1\"]=vector_factory<int>(1,-1,1,-1);\n\tcs.irreps_[\"b2\"]=vector_factory<int>(1,-1,-1,1);\n\treturn cs;\n}\n\n\ncharactertable projector_irrep::make_c2h_table() const {\n\tcharactertable cs;\n\tcs.schoenflies_=\"C2h\";\n\tcs.order_=4;\n\tcs.operators_.push_back(pg_identity());\n\tcs.operators_.push_back(pg_c2z());\n\tcs.operators_.push_back(pg_inversion());\n\tcs.operators_.push_back(pg_sigma_xy());\n\tcs.mullikan_=vector_factory<std::string>(\"ag\",\"bg\",\"au\",\"bu\");\n\tcs.irreps_[\"ag\"]=vector_factory<int>(1, 1, 1, 1);\n\tcs.irreps_[\"bg\"]=vector_factory<int>(1,-1, 1,-1);\n\tcs.irreps_[\"au\"]=vector_factory<int>(1, 1,-1,-1);\n\tcs.irreps_[\"bu\"]=vector_factory<int>(1,-1,-1, 1);\n\treturn cs;\n}\n\ncharactertable projector_irrep::make_d2_table() const {\n\tcharactertable cs;\n\tcs.schoenflies_=\"D2\";\n\tcs.order_=4;\n\tcs.operators_.push_back(pg_identity());\n\tcs.operators_.push_back(pg_c2z());\n\tcs.operators_.push_back(pg_c2y());\n\tcs.operators_.push_back(pg_c2x());\n\tcs.mullikan_=vector_factory<std::string>(\"a1\",\"b1\",\"b2\",\"b3\");\n\tcs.irreps_[\"a1\"]=vector_factory<int>(1, 1, 1, 1);\n\tcs.irreps_[\"b1\"]=vector_factory<int>(1, 1,-1,-1);\n\tcs.irreps_[\"b2\"]=vector_factory<int>(1,-1, 1,-1);\n\tcs.irreps_[\"b3\"]=vector_factory<int>(1,-1,-1, 1);\n\treturn cs;\n}\n\ncharactertable projector_irrep::make_d2h_table() const {\n\tcharactertable cs;\n\tcs.schoenflies_=\"D2h\";\n\tcs.order_=8;\n\tcs.operators_.push_back(pg_identity());\n\tcs.operators_.push_back(pg_c2z());\n\tcs.operators_.push_back(pg_c2y());\n\tcs.operators_.push_back(pg_c2x());\n\tcs.operators_.push_back(pg_inversion());\n\tcs.operators_.push_back(pg_sigma_xy());\n\tcs.operators_.push_back(pg_sigma_xz());\n\tcs.operators_.push_back(pg_sigma_yz());\n\tcs.mullikan_=vector_factory<std::string>(\"ag\",\"au\",\"b1g\",\"b1u\",\"b2g\",\"b2u\",\"b3g\",\"b3u\");\n\tcs.irreps_[\"ag\"] =vector_factory<int>(1, 1, 1, 1, 1, 1, 1, 1);\n\tcs.irreps_[\"b1g\"]=vector_factory<int>(1, 1,-1,-1, 1 ,1,-1,-1);\n\tcs.irreps_[\"b2g\"]=vector_factory<int>(1,-1, 1,-1, 1,-1, 1,-1);\n\tcs.irreps_[\"b3g\"]=vector_factory<int>(1,-1,-1, 1, 1,-1,-1, 1);\n\tcs.irreps_[\"au\"] =vector_factory<int>(1, 1, 1, 1,-1,-1,-1,-1);\n\tcs.irreps_[\"b1u\"]=vector_factory<int>(1, 1,-1,-1,-1,-1, 1, 1);\n\tcs.irreps_[\"b2u\"]=vector_factory<int>(1,-1, 1,-1,-1, 1,-1, 1);\n\tcs.irreps_[\"b3u\"]=vector_factory<int>(1,-1,-1, 1,-1, 1, 1,-1);\n\treturn cs;\n}\n\n\n// explicit instantiation\ntemplate std::vector<Function<double,1> > projector_irrep::project_on_irreps (\n\t\tconst std::vector<Function<double,1> >& vhrs, const std::vector<std::string>& irreps) const;\ntemplate std::vector<Function<double,2> > projector_irrep::project_on_irreps (\n\t\tconst std::vector<Function<double,2> >& vhrs, const std::vector<std::string>& irreps) const;\ntemplate std::vector<Function<double,3> > projector_irrep::project_on_irreps (\n\t\tconst std::vector<Function<double,3> >& vhrs, const std::vector<std::string>& irreps) const;\n\n\ntemplate std::vector<Function<double,1> >\nprojector_irrep::apply_symmetry_operators(\n\t\tconst std::vector<Function<double,1> >& vrhs,\n\t\tFunction<double,1> metric,\n\t\tstd::vector<std::string>& sirreps) const;\ntemplate std::vector<Function<double,2> >\nprojector_irrep::apply_symmetry_operators(\n\t\tconst std::vector<Function<double,2> >& vrhs,\n\t\tFunction<double,2> metric,\n\t\tstd::vector<std::string>& sirreps) const;\ntemplate std::vector<Function<double,3> >\nprojector_irrep::apply_symmetry_operators(\n\t\tconst std::vector<Function<double,3> >& vrhs,\n\t\tFunction<double,3> metric,\n\t\tstd::vector<std::string>& sirreps) const;\n\ntemplate std::vector<Function<double_complex,3> >\nprojector_irrep::apply_symmetry_operators(\n        const std::vector<Function<double_complex,3> >& vrhs,\n        Function<double,3> metric,\n        std::vector<std::string>& sirreps) const;\n\n//template void Class::function(int);\n//template class Kinetic<double,2>;\n//template class Kinetic<double,3>;\n//template class Kinetic<double,4>;\n//template class Kinetic<double,5>;\n//template class Kinetic<double,6>;\n//reproject_on_irrep\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/pointgroupsymmetry.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n\n/*!\n  \\file chem/pointgroupsymmetry.cc\n  \\brief implements point group operations\n\n  The source is\n  <a href=http://code.google.com/p/m-a-d-n-e-s-s/source/browse/local\n  /trunk/src/apps/chem/pointgroupsymmetry.h>here</a>.\n\n\t\\par Use cases\n\tThere are 3 use cases for the projector\n\t - create_symmetry_adapted_basis()\n\t   Given a single function generate a set of symmetry-adapted functions of a given irrep\n\t - operator()()\n\t   Given a set of functions transform them to a set of symmetry-adapted function.\n\t   This is most likely the case for a localized-to-symmetrized transformation of orbitals.\n\t   The irreps will be determined by the projection based on a rank-revealing Cholesky\n\t   decomposition. It is therefore necessary that the set of input functions is normalized,\n\t   so that small eigenvalues are always due to numerics and not to physics.\n\t   There will be a rough check on closedness, i.e. that the old and the new set of functions\n\t   project on the same space.\n\t - project_on_irreps()\n\t   Given a set of functions and a set of corresponding irreps, reproject the functions on\n\t   their irreps\n\t Furthermore a reduction method is provided to do some algebra with the irreps\n\n*/\n#ifndef SRC_APPS_CHEM_POINTGROUPSYMMETRY_H_\n#define SRC_APPS_CHEM_POINTGROUPSYMMETRY_H_\n\n#include <madness/world/MADworld.h>\n#include<madness/chem/pointgroupoperator.h>\n\nnamespace madness {\n\n\ttemplate<typename T, std::size_t NDIM>\n\tclass Function;\n}\n\n\n\nnamespace madness {\nstruct charactertable {\n\ttypedef std::vector<int> characterlineT;\n\n\tstd::string schoenflies_;\t\t\t\t\t///< Schoenflies symbol of the point group\n\tint order_;\t\t\t\t\t\t\t\t\t///< order of the point group\n\tstd::map<std::string,characterlineT> irreps_;\n\tstd::vector<pg_operator> operators_;\t\t///< symmetry operators\n\tstd::vector<std::string> mullikan_;\t\t\t///< Mullikan symbols of the irreps\n\tbool is_abelian=true;\t\t\t\t\t\t///< currently always true\n\n};\n\n/*!\n  \\file projector_irrep.h\n  \\brief Defines and implements the symmetry projector class\n  \\ingroup chem\n  \\addtogroup chem\n\n  \\par Introduction\n\n*/\n\nclass projector_irrep {\n\npublic:\n\n\t/// default ctor\n\tprojector_irrep() = default;\n\n\t/// ctor takes the point group and the optionally the irrep\n\tprojector_irrep(std::string pointgroup, std::string irrep=\"all\")\n\t\t: lindep_(1.e-3), verbosity_(0), keep_ordering_(true) {\n        std::transform(pointgroup.begin(), pointgroup.end(), pointgroup.begin(), ::tolower);\n\t\ttable_=get_table(pointgroup);\n\t\tset_irrep(irrep);\n\t}\n\n\t/// print the parameters of this projector\n\tvoid print_info(World& world) const {\n\t\tif (world.rank()==0) {\n\t\t\tprint(\"symmetry projector for point group \",table_.schoenflies_);\n\t\t\tprint(\"\");\n\t\t\tprint(\"             working on irrep:\", irrep_);\n\t\t\tprint(\"  linear dependency threshold:\", lindep_);\n\t\t\tprint(\"                keep ordering:\", keep_ordering_);\n\t\t\tprint(\"        orthonormalize irreps:\", orthonormalize_irreps_);\n\t\t\tprint(\"              verbosity level:\", verbosity_);\n\t\t\tprint(\"\");\n\t\t\tprint_character_table();\n\t\t}\n\t}\n\n\t/// set the irrep on which this projector projects\n\tprojector_irrep& set_irrep(std::string irrep) {\n        std::transform(irrep.begin(), irrep.end(), irrep.begin(), ::tolower);\n\n        // check consistency of the input\n\t\tif (std::find(table_.mullikan_.begin(), table_.mullikan_.end(), irrep) == table_.mullikan_.end()) {\n\t\t\tif (irrep!=\"all\") {\n\t\t\t\tprint(\"irrep\",irrep);\n\t\t\t\tprint(\"point group\", table_.schoenflies_);\n\t\t\t\tMADNESS_EXCEPTION(\"no such irrep in this point group\",1);\n\t\t\t}\n\t\t}\n\n\t\tirrep_=irrep;\n\t\treturn *this;\n\t}\n\n\t/// set the linear dependency threshold\n\tprojector_irrep& set_lindep(const double ld) {\n\t\tlindep_=ld;\n\t\treturn *this;\n\t}\n\n\t/// set the verbosity level\n\tprojector_irrep& set_verbosity(int v) {\n\t\tverbosity_=v;\n\t\treturn *this;\n\t}\n\n\t/// get the verbosity level\n\tint get_verbosity() const {return verbosity_;}\n\n\t/// get the verbosity level\n\tprojector_irrep& set_orthonormalize_irreps(bool flag) {\n\t\torthonormalize_irreps_=flag;\n\t\treturn *this;\n\t}\n\n\t/// get the verbosity level\n\tbool get_orthonormalize_irreps() const {return orthonormalize_irreps_;}\n\n\t/// get the point group name\n\tstd::string get_pointgroup() const {return table_.schoenflies_;}\n\n\t/// return the character table\n\tcharactertable get_table() const {return table_;}\n\n\t/// set the ordering after symmetrization: irreps or keep as is\n\tprojector_irrep& set_ordering(const std::string o) {\n\t\tif (o==\"irrep\") keep_ordering_=false;\n\t\telse if (o==\"keep\") keep_ordering_=true;\n\t\telse {\n\t\t\tprint(\"projector_irrep: ordering parameter unknown: \",o);\n\t\t\tMADNESS_EXCEPTION(\"projector_irrep: ordering parameter unknown\",1);\n\t\t}\n\t\treturn *this;\n\t}\n\n\tstd::vector<std::string> get_all_irreps() const {\n\t\treturn table_.mullikan_;\n\t}\n\n\t/// projector on a given irrep\n\n\t/// @return\ta vector[irreps] of a vector of functions\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > operator()(const Function<T,NDIM>& rhs) const {\n\n\t\tstd::vector<Function<T,NDIM> > vrhs;\n\t\tvrhs.push_back(rhs);\n\t\treturn this->operator()(vrhs);\n\n\t}\n\n\t/// projector on a given irrep\n\n\t/// @return\ta vector[irreps] of a vector of functions\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > operator()(\n\t\t\tconst std::vector<Function<T,NDIM> >& vrhs) const {\n\n        Function<typename Tensor<T>::scalar_type,NDIM> metric;\n\t\tstd::vector<std::string> sirrep;\n\t\treturn apply_symmetry_operators(vrhs,metric,sirrep);\n\t}\n\n\t/// projector on a given irrep\n\n\t/// @return\ta vector[irreps] of a vector of functions\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > operator()(\n\t\t\tconst std::vector<Function<T,NDIM> >& vrhs,\n\t\t\tconst Function<typename Tensor<T>::scalar_type,NDIM>& metric) const {\n\n\t\tstd::vector<std::string> sirrep;\n\t\treturn apply_symmetry_operators(vrhs,metric,sirrep);\n\t}\n\n\t/// projector on a given irrep\n\n\t/// @return\ta vector[irreps] of a vector of functions\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > operator()(\n\t\t\tconst std::vector<Function<T,NDIM> >& vrhs,\n\t\t\tconst Function<typename Tensor<T>::scalar_type,NDIM>& metric,\n\t\t\tstd::vector<std::string>& sirreps) const {\n\n\t\treturn apply_symmetry_operators(vrhs,metric,sirreps);\n\t}\n\n\t/// projector on a given irrep\n\n\t/// @return\ta vector[irreps] of a vector of functions\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > operator()(\n\t\t\tconst std::vector<Function<T,NDIM> >& vrhs,\n\t\t\tstd::vector<std::string>& sirreps) const {\n\n        Function<typename Tensor<T>::scalar_type,NDIM> metric;\n\t\treturn apply_symmetry_operators(vrhs,metric,sirreps);\n\t}\n\n\t/// create a symmetry-adapted basis from a single function\n\n\t/// @return\ta vector[irreps] of a vector of functions\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > create_symmetry_adapted_basis(\n\t\t\tconst Function<T,NDIM>& rhs,\n\t\t\tconst Function<typename Tensor<T>::scalar_type,NDIM>& metric,\n\t\t\tstd::vector<std::string>& sirreps) {\n\n\t\tstd::vector<Function<T,NDIM> > vrhs(1,rhs);\n\t\treturn apply_symmetry_operators(vrhs,metric,sirreps);\n\n\t}\n\n\t/// create a symmetry-adapted basis from a single function\n\n\t/// @return\ta vector[irreps] of a vector of functions\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > create_symmetry_adapted_basis(\n\t\t\tconst Function<T,NDIM>& rhs,\n\t\t\tstd::vector<std::string>& sirreps) {\n\n\t\tstd::vector<Function<T,NDIM> > vrhs(1,rhs);\n        Function<typename Tensor<T>::scalar_type,NDIM> metric;\n\t\treturn apply_symmetry_operators(vrhs,metric,sirreps);\n\n\t}\n\n\t/// print the character table\n\tvoid print_character_table() const {\n\t\tprint(\"character table for point group \",table_.schoenflies_);\n\t\tprintf(\"       \");\n\t\tfor (auto& op : table_.operators_) {\n\t\t\tprintf(\" %5s \",op.symbol().c_str());\n\t\t}\n\t\tprintf(\"\\n\");\n\t\tfor (auto& mullikan : table_.mullikan_) {\n\t\t\tprintf(\" %5s \",mullikan.c_str());\n\t\t\tstd::vector<int> characters=table_.irreps_.find(mullikan)->second;\n\t\t\tfor (auto& character : characters) {\n\t\t\t\tprintf(\" %5i \",character);\n\t\t\t}\n\t\t\tprintf(\"\\n\");\n\t\t}\n\t}\n\n\t/// (re-)project the argument on the given irreps\n\n\t/// @param[in]\tvrhs\tthe vector of functions to be projected on the irreps given by irreps\n\t/// @param[in]\tirreps\tthe irreps in order of the functions\n\t/// @return\t\tvrhs projected on the irreps\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > project_on_irreps(const std::vector<Function<T,NDIM> >& vhrs,\n\t\t\tconst std::vector<std::string>& irreps) const;\n\n\t/// reduce a reducible representation\n\n\t/// @param[in]\treps\tvector or irrep or reduc. reps whose product will be reduced\n\t/// @return\t\tvector of irreps constituting the input product\n\tstd::vector<std::string> reduce(const std::vector<std::string> reps) const;\n\n\t/// reduce a product of two irreps\n\tstd::vector<std::string> reduce(const std::string irrep1, const std::string irrep2) const {\n\t\treturn reduce(vector_factory<std::string>(irrep1,irrep2));\n\t}\n\n\t/// reduce a product of three irreps\n\tstd::vector<std::string> reduce(const std::string irrep1, const std::string irrep2,\n\t\t\tconst std::string irrep3) const {\n\t\treturn reduce(vector_factory<std::string>(irrep1,irrep2,irrep3));\n\t}\n\n\t/// reduce a product of four irreps\n\tstd::vector<std::string> reduce(const std::string irrep1, const std::string irrep2,\n\t\t\tconst std::string irrep3, const std::string irrep4) const {\n\t\treturn reduce(vector_factory<std::string>(irrep1,irrep2,irrep3,irrep4));\n\t}\n\n\t/// get a mapping canonical to irrep-sorting\n\tstd::vector<int> get_canonical_to_irrep_map(std::vector<std::string> sirreps) const {\n\n\t\t// distribute into bins\n\t\tstd::map<std::string,std::vector<int> > m;\n\t\tfor (size_t i=0; i<sirreps.size(); ++i) m[sirreps[i]].push_back(i);\n\n\t\t// concatenate bins\n\t\tstd::vector<int> map;\n\t\tfor (auto& irrep : table_.mullikan_) {\n\t\t\tmap.insert(end(map), begin(m[irrep]), end(m[irrep]));\n\t\t}\n\t\treturn map;\n\t}\n\n\t/// given a mapping resort\n\ttemplate<typename R>\n\tstatic std::vector<R> resort(const std::vector<int> map,\n\t\t\tconst std::vector<R>& vrhs) {\n\t\tMADNESS_ASSERT(map.size()==vrhs.size());\n\t\tstd::vector<R> result(vrhs.size());\n\t\tfor (size_t i=0; i<map.size(); ++i) result[i]=vrhs[map[i]];\n\t\treturn result;\n\t}\n\n\t/// given a mapping resort\n\ttemplate<typename R>\n\tstatic std::vector<R> reverse_resort(const std::vector<int> map,\n\t\t\tconst std::vector<R>& vrhs) {\n\t\tMADNESS_ASSERT(map.size()==vrhs.size());\n\t\tstd::vector<R> result(vrhs.size());\n\t\tfor (int i=0; i<map.size(); ++i) result[map[i]]=vrhs[i];\n\t\treturn result;\n\t}\n\nprivate:\n\n\tcharactertable table_;\n\n\t/// choose one of the irreps or \"all\"\n\tstd::string irrep_=\"all\";\n\n\t/// linear dependency threshold for the orthogonalization\n\tdouble lindep_=1.e-3;\n\n\t/// verbosity level\n\tint verbosity_=1;\n\n\t/// after projection: result functions being ordered according to irreps or ordering unchanged\n\tbool keep_ordering_=true;\n\n\t/// orthonormalize within the irreps or simply discard linear dependent vectors\n\tbool orthonormalize_irreps_=true;\n\n\tcharactertable make_c1_table() const;\n\n\tcharactertable make_cs_table() const;\n\n\tcharactertable make_ci_table() const;\n\n\tcharactertable make_c2_table() const;\n\n\tcharactertable make_c2v_table() const;\n\n\tcharactertable make_c2h_table() const;\n\n\tcharactertable make_d2_table() const;\n\n\tcharactertable make_d2h_table() const;\n\n\n\t/// return the character table according to the requested point group\n\tconst charactertable get_table(std::string pointgroup) {\n\n        std::transform(pointgroup.begin(), pointgroup.end(), pointgroup.begin(), ::tolower);\n\n        charactertable table;\n        if (pointgroup==\"c1\") table=make_c1_table();\n        else if (pointgroup==\"ci\") table=make_ci_table();\n        else if (pointgroup==\"cs\") table=make_cs_table();\n        else if (pointgroup==\"c2\") table=make_c2_table();\n        else if (pointgroup==\"c2v\") table=make_c2v_table();\n        else if (pointgroup==\"c2h\") table=make_c2h_table();\n        else if (pointgroup==\"d2\") table=make_d2_table();\n        else if (pointgroup==\"d2h\") table=make_d2h_table();\n        else {\n        \tMADNESS_EXCEPTION(\"unknown group table\",1);\n        }\n\t\treturn table;\n\t}\n\n\t/// symmetrize a vector of functions\n\n\t/// project a number of functions on a given number of irreps\n\t/// linear dependencies are removed, the functions are orthonormalized\n\t/// vanishing input functions are mapped onto vanishing output functions with irrep \"null\"\n\t/// the number of input and output function is expected to be the same!\n\t/// @param[in]\tvrhs\tvector of functions to be projected on the irrep\n\t/// @param[in]\tvbra\tbra of vrhs if applicable (if bra /= ket), may be empty\n\t/// @param[out]\tsirrep\tvector with the irrep names corresponding to the result\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > apply_symmetry_operators(\n\t\t\tconst std::vector<Function<T,NDIM> >& vrhs,\n            Function<typename Tensor<T>::scalar_type,NDIM> metric,\n\t\t\tstd::vector<std::string>& sirreps) const;\n\n\t/// sort the functions according to their irreps\n\ttemplate<typename T, std::size_t NDIM>\n\tstd::vector<Function<T,NDIM> > sort_to_irreps(std::vector<Function<T,NDIM> >& vrhs,\n\t\t\tstd::vector<std::string>& sirreps) const {\n\t\tstd::vector<int> map=get_canonical_to_irrep_map(sirreps);\n\t\treturn resort(map,vrhs);\n\t}\n\n};\n\n\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_POINTGROUPSYMMETRY_H_ */\n"
  },
  {
    "path": "src/madness/chem/polynomial.cc",
    "content": "/* This file is a part of Slymer, which is distributed under the Creative\n   Commons Attribution-NonCommercial 4.0 International Public License.\n\n   (c) 2017 Stony Brook University. */\n\n/**\n * \\file Basis/polynomial.cc\n * \\brief Implementation of polynomial API and routines.\n */\n\n#include <cmath>\n#include <stdexcept>\n#include <vector>\n#include \"polynomial.h\"\n\nnamespace slymer {\n\ndouble PolynomialCoeffs::operator() (const std::array<double, 3> &pt) const {\n  double ret = 0.;\n\n  for(unsigned j = 0; j <= degree; ++j)\n    for(unsigned k = 0; k <= degree - j; ++k)\n      for(unsigned l = 0; l <= degree - j - k; ++l)\n      ret += coeffs[polyIndex({{j,k,l}})]\n        * ::pow(pt[0], j) * ::pow(pt[1], k) * ::pow(pt[2], l);\n\n  return ret;\n}\n\nPolynomialCoeffs PolynomialCoeffs::operator+ (const PolynomialCoeffs &rhs) const\n{\n  if(degree >= rhs.degree) {\n    PolynomialCoeffs ret(degree);\n\n    unsigned size = rhs.coeffs.size();\n    for(unsigned j = 0; j < size; ++j)\n      ret.coeffs[j] = coeffs[j] + rhs.coeffs[j];\n    size = coeffs.size();\n    for(unsigned j = rhs.coeffs.size(); j < size; ++j)\n      ret.coeffs[j] = coeffs[j];\n\n    return ret;\n  }\n  else {\n    PolynomialCoeffs ret(rhs.degree);\n\n    unsigned size = coeffs.size();\n    for(unsigned j = 0; j < size; ++j)\n      ret.coeffs[j] = coeffs[j] + rhs.coeffs[j];\n    size = rhs.coeffs.size();\n    for(unsigned j = coeffs.size(); j < size; ++j)\n      ret.coeffs[j] = rhs.coeffs[j];\n\n    return ret;\n  }\n}\n\nPolynomialCoeffs &PolynomialCoeffs::operator+= (const PolynomialCoeffs &rhs) {\n  if(degree >= rhs.degree) {\n    const unsigned size = rhs.coeffs.size();\n    for(unsigned j = 0; j < size; ++j)\n      coeffs[j] += rhs.coeffs[j];\n  }\n  else {\n    PolynomialCoeffs newpoly(rhs.degree);\n\n    unsigned size = coeffs.size();\n    for(unsigned j = 0; j < size; ++j)\n      newpoly.coeffs[j] = coeffs[j] + rhs.coeffs[j];\n    size = rhs.coeffs.size();\n    for(unsigned j = coeffs.size(); j < size; ++j)\n      newpoly.coeffs[j] = rhs.coeffs[j];\n\n    std::swap(coeffs, newpoly.coeffs);\n    degree = rhs.degree;\n  }\n\n  return *this;\n}\n\nPolynomialCoeffs PolynomialCoeffs::operator* (const double c) const {\n  PolynomialCoeffs ret(*this);\n\n  for(double &coeff : ret.coeffs)\n    coeff *= c;\n\n  return ret;\n}\n\nPolynomialCoeffs &PolynomialCoeffs::operator*= (const double c) {\n  for(double &coeff : coeffs)\n    coeff *= c;\n\n  return *this;\n}\n\nPolynomialCoeffs PolynomialCoeffs::operator* (const PolynomialCoeffs &rhs) const\n{\n  // make an output vector with the appropriate size for a multinomial of degree j\n  const unsigned deg = degree + rhs.degree;\n  PolynomialCoeffs ret(deg);\n\n  // go through all combinations for the product\n  for(unsigned x1 = 0; x1 <= degree; ++x1)\n    for(unsigned y1 = 0; y1 <= degree - x1; ++y1)\n      for(unsigned z1 = 0; z1 <= degree - x1 - y1; ++z1) {\n\n        for(unsigned x2 = 0; x2 <= rhs.degree; ++x2)\n          for(unsigned y2 = 0; y2 <= rhs.degree - x2; ++y2)\n            for(unsigned z2 = 0; z2 <= rhs.degree - x2 - y2; ++z2) {\n              ret[{{x1+x2, y1+y2, z1+z2}}] +=\n                operator[]({{x1, y1, z1}}) * rhs[{{x2, y2, z2}}];\n            }\n      }\n\n  return ret;\n}\n\nPolynomialCoeffs PolynomialCoeffs::pow(const unsigned j) const {\n  // this function is only intended to work with polynomials of degree 1\n  if(degree != 1)\n    throw std::runtime_error(\"PolynomialCoeffs::pow can only be applied to polynomials with degree 1.\");\n\n  // array with factorials\n  const std::array<unsigned, 11> fact{{1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800}};\n\n  if(j >= fact.size())\n    throw std::invalid_argument(\"Degree is too big in PolynomialCoeffs::pow.\");\n\n  // setup a PolynomialCoeffs for the return values\n  PolynomialCoeffs ret(j);\n\n  // cycle through all exponent orders that add up to j\n  for(unsigned ex1 = 0; ex1 <= j; ++ex1)\n    for(unsigned ex2 = 0; ex2 <= j - ex1; ++ex2)\n      for(unsigned ex3 = 0; ex3 <= j - ex1 - ex2; ++ex3) {\n        unsigned ex4 = j - ex1 - ex2 - ex3; // the ex coefficients add up to j\n\n        // calculate the coefficient on x^ex1 y^ex2 z^ex3, per the multinomial theorem\n        ret[{{ex1, ex2, ex3}}] =\n          (fact[j] / fact[ex1] / fact[ex2] / fact[ex3] / fact[ex4])\n          * ::pow(operator[]({{1,0,0}}), ex1) * ::pow(operator[]({{0,1,0}}), ex2)\n          * ::pow(operator[]({{0,0,1}}), ex3) * ::pow(operator[]({{0,0,0}}), ex4);\n      }\n\n  return ret;\n}\n\n} // namespace slymer\n"
  },
  {
    "path": "src/madness/chem/polynomial.h",
    "content": "/* This file is a part of Slymer, which is distributed under the Creative\n   Commons Attribution-NonCommercial 4.0 International Public License.\n\n   (c) 2017 Stony Brook University. */\n\n/**\n * \\file Basis/polynomial.h\n * \\brief API and helper functions for describing polynomial functions of\n *   three variables.\n *\n * The array is indexed by the polyIndex function. Each element of the array\n * is a coefficient on the polynomial.\n */\n\n#ifndef __Basis_polynomial_h__\n#define __Basis_polynomial_h__\n\n#include <array>\n#include <vector>\n\nnamespace slymer {\n\n/**\n * \\brief Array for storing coefficients of a polynomial of three variables\n *    with specified degree.\n *\n * The general polynomial of three variables is written as\n * \\f[ \\sum_{i,j,k} c_{i,j,k} x^i y^j z^k, \\f]\n * where \\f$0\\le i+j+k\\le N\\f$. This data structure stores the coefficients\n * in a vector and provides access routines in terms of the exponents \\f$i\\f$,\n * \\f$j\\f$, and \\f$k\\f$.\n *\n * \\note This class is not designed for polynomials with a large degree.\n */\nclass PolynomialCoeffs {\n\nprotected:\n  /// The degree of the polynomial.\n  unsigned degree;\n\n  /**\n   * \\brief Array storing the coefficients.\n   * \n   * For a given degree n, there are \\f$(n+1)(n+2)/2\\f$ monomials. The total\n   * array thus has \\f$(n+1)*(n+2)*(n+3)/6\\f$ terms. The array stores all terms\n   * with degree 0, then degree 1, then degree 2, etc.\n   */\n  std::vector<double> coeffs;\n\n  /**\n   * \\brief Gets the array index for the coefficient of a particular term.\n   *\n   * Terms of degree 0 are stored before those of degree 1, etc.\n   *\n   * Within a particular degree, think of the problem in the combinatorial \"stars\n   * and bars\" idea: there are n stars and two bars dividing them into three\n   * parts. (Each part corresponds to the number of x, y, or z factors.) The first\n   * array element will be bars in the 0 and 1 positions, then 0 and 2, ..., 0 and\n   * n+1, then 1 and 2, etc.\n   *\n   * \\param[in] pows The powers of x, y, and z for this term.\n   * \\return The array offset, as described above.\n   */\n  static inline unsigned polyIndex(const std::array<unsigned, 3> &pows) {\n    const unsigned n = pows[0] + pows[1] + pows[2];\n\n    // calculate the offset within the level of the degree...\n    // x-y offset. All terms with pows[0] == 0 are first; there are n+1 of them.\n    // Then pows[0] == 1; there are n, etc.\n    unsigned ret = (n+1)*pows[0] - (pows[0]-1)*pows[0] / 2;\n    // y-z offset. how many y factors are there? pows[1]. This value being 0\n    // comes first, then 1, then 2, etc.\n    ret += pows[1];\n\n    // calculate the offset for smaller degrees. There are (n+1)(n+2)/2 elements\n    // for degree n; add up all the smaller degrees.\n    ret += n*(n+1)*(n+2)/6;\n\n    return ret;\n  }\n\npublic:\n  /**\n   * \\brief Get the degree of the polynomial.\n   *\n   * \\return The degree of the polynomial.\n   */\n  unsigned get_degree() const {\n    return degree;\n  }\n\n  PolynomialCoeffs() = delete;\n\n  /**\n   * \\brief Create a linear function with the specified coefficients.\n   *\n   * \\param[in] constant The constant term.\n   * \\param[in] x The coefficient on x.\n   * \\param[in] y The coefficient on y.\n   * \\param[in] z The coefficient on z.\n   */\n  PolynomialCoeffs(const double constant, const double x, const double y,\n      const double z) : degree(1), coeffs(4) {\n\n    coeffs[polyIndex({{0,0,0}})] = constant;\n    coeffs[polyIndex({{1,0,0}})] = x;\n    coeffs[polyIndex({{0,1,0}})] = y;\n    coeffs[polyIndex({{0,0,1}})] = z;\n  }\n\n  /**\n   * \\brief Create a polynomial of degree N.\n   *\n   * \\param[in] N The degree of the polynomial.\n   */\n  PolynomialCoeffs(const unsigned N)\n      : degree(N), coeffs((N+1)*(N+2)*(N+3)/6) {\n\n    for(double &coeff : coeffs)\n      coeff = 0.;\n  }\n\n  /**\n   * \\brief Access the coefficient for the specified term.\n   *\n   * \\param[in] pows The powers of x, y, and z for this term.\n   * \\return Reference to the array term.\n   */\n  double &operator[] (const std::array<unsigned, 3> &pows) {\n    return coeffs[polyIndex(pows)];\n  }\n\n  /**\n   * \\brief Access the coefficient for the specified term.\n   *\n   * \\param[in] pows The powers of x, y, and z for this term.\n   * \\return The array term.\n   */\n  double operator[] (const std::array<unsigned, 3> &pows) const {\n    return coeffs[polyIndex(pows)];\n  }\n\n  /**\n   * \\brief Evaluate the polynomial at the specified point.\n   *\n   * \\note This implemention is a bit naive; it is not intended for\n   *    polynomials with a large degree.\n   *\n   * \\param[in] pt The point at which the polynomial is evaluated.\n   * \\return The value of the polynomial at the point.\n   */\n  double operator() (const std::array<double, 3> &pt) const;\n\n  /**\n   * \\brief Add two polynomials together.\n   *\n   * *this is one of the polynomials.\n   *\n   * \\param[in] rhs The other polynomial.\n   * \\return The sum of *this and rhs.\n   */\n  PolynomialCoeffs operator+ (const PolynomialCoeffs &rhs) const;\n\n  /**\n   * \\brief Adds another polynomial to this one.\n   *\n   * \\param[in] rhs The other polynomial.\n   * \\return The sum of *this and rhs, in *this.\n   */\n  PolynomialCoeffs &operator+= (const PolynomialCoeffs &rhs);\n\n  /**\n   * \\brief Multiply a polynomial by a constant value.\n   *\n   * *this is one of the polynomials.\n   *\n   * \\param[in] c The constant value.\n   * \\return The product of c and the polynomial.\n   */\n  PolynomialCoeffs operator* (const double c) const;\n\n  /**\n   * \\brief Scale the polynomial by a constant.\n   *\n   * \\param[in] c The scale factor.\n   * \\return The scaled polynomial (*this).\n   */\n  PolynomialCoeffs &operator*= (const double c);\n\n  /**\n   * \\brief Multiply two polynomials together.\n   *\n   * *this is one of the polynomials.\n   *\n   * \\param[in] rhs The other polynomial.\n   * \\return The product of *this and rhs.\n   */\n  PolynomialCoeffs operator* (const PolynomialCoeffs &rhs) const;\n\n  /**\n   * \\brief Expands a linear polynomial raised to a power.\n   *\n   * Essentially expands the polynomial\n   * \\f[ (coeffs[0] + coeffs[1]*x + coeffs[2]*y + coeffs[3]*z)^j \\f]\n   * into a new PolynomialCoeffs object. That is, output[{{p,q,r}}] is the\n   * coefficient on the \\f$x^p y^q z^r\\f$ term.\n   *\n   * This function requires multinomial coefficients, which involve\n   * factorials. We assume that the arguments to the factorials will not\n   * be large and hard-code small values. An error will be thrown if\n   * the maximum value is exceeded.\n   *\n   * \\throw std::runtime_error if the polynomial does not have degree 1.\n   *\n   * \\param[in] j The exponent of the expansion.\n   * \\return The polynomial, ordered using the polyIndex scheme.\n   */\n  PolynomialCoeffs pow(const unsigned j) const;\n\n}; // class PolynomialCoeffs\n\n/**\n * \\brief Multiply a polynomial by a constant value.\n *\n * \\param[in] c The constant value.\n * \\param[in] poly The polynomial.\n * \\return The product of c and the polynomial.\n */\ninline PolynomialCoeffs operator* (const double c, const PolynomialCoeffs &poly) {\n  return poly * c;\n}\n\n} // namespace slymer\n\n#endif\n"
  },
  {
    "path": "src/madness/chem/potentialmanager.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/// \\file moldft/potentialmanager.cc\n/// \\brief Definition of commonly used density/potential related classes and functions\n\n#include \"madness/constants.h\"\n#include <madness/chem/potentialmanager.h>\n#include <madness/chem/SAP.h>\n\nnamespace detail {\nstatic inline double distance(double x1, double y1, double z1, double x2,\n                              double y2, double z2) {\n  double xx = x1 - x2;\n  double yy = y1 - y2;\n  double zz = z1 - z2;\n  return sqrt(xx * xx + yy * yy + zz * zz);\n}\n}  // namespace detail\n\nnamespace madness {\n\nNuclearDensityFunctor::NuclearDensityFunctor(\n    const Molecule &atoms,\n    const BoundaryConditions<3> &bc,\n    const Tensor<double> &cell,\n    int special_level, double rscale) :\n      atoms(atoms),\n      bc_(bc),\n      cell(cell),\n      special_points_(this->atoms.get_all_coords_vec()),\n      special_level_(special_level),\n      rscale(rscale) {\n  if (bc_.is_periodic_any()) {\n    MADNESS_ASSERT(cell.ndim() == 2 && cell.dim(0) == 3 && cell.dim(1) == 2);\n    this->maxR = 1;\n  } else {\n    this->maxR = 0;\n  }\n}\n\ndouble NuclearDensityFunctor::operator()(const coord_3d &x) const {\n  const auto tol = + 6.0*atoms.smallest_length_scale();\n  double sum = 0.0;\n  for (int i=-maxR; i<=+maxR; i++) {\n    const double ext_x = cell(0,1) - cell(0,0);\n    double xx = x[0]+i*ext_x;\n    if (xx < cell(0,1) + tol && xx > cell(0,0) - tol) {\n      for (int j=-maxR; j<=+maxR; j++) {\n        const double ext_y = cell(1,1) - cell(1,0);\n        double yy = x[1]+j*ext_y;\n        if (yy < cell(1,1) + tol && yy > cell(1,0) - tol) {\n          for (int k=-maxR; k<=+maxR; k++) {\n            const double ext_z = cell(2,1) - cell(2,0);\n            double zz = x[2]+k*ext_z;\n            if (zz < cell(2,1) + tol && zz > cell(2,0) - tol) {\n              sum += atoms.nuclear_charge_density(\n                  xx, yy, zz, rscale);\n            }\n          }\n        }\n      }\n    }\n  }\n  return sum;\n}\n\nstd::vector<coord_3d> NuclearDensityFunctor::special_points() const {return special_points_;}\n\nLevel NuclearDensityFunctor::special_level() const {\n  return special_level_;\n}\n\nNuclearDensityFunctor &NuclearDensityFunctor::set_rscale(double rscale) {\n  this->rscale = rscale;\n  return *this;\n}\n\ndouble GaussianNuclearDensityPotentialFunctor::operator()(const madness::coord_3d& R) const {\n  // eq. numbers refer to Visscher and Dyall 10.1006/adnd.1997.0751\n  const auto bohr_rad_fm = constants::Bohr_radius * 1e15;\n\n  double sum = 0.0;\n  for (auto&& atom : molecule.get_atoms()) {\n    // make sure this isn't a pseudo-atom\n    if (atom.pseudo_atom) continue;\n\n    // Eqs. 1 and 11\n    auto ξ =\n        sqrt(3.0 / 2.0) /\n        (0.836 *\n              pow(madness::get_atomic_data(atom.atomic_number).isotope_number,\n                  1.0 / 3.0) +\n          0.57) *\n        bohr_rad_fm;\n\n    // Eq. 14\n    auto r = ::detail::distance(R[0], R[1], R[2], atom.x, atom.y, atom.z);\n    sum += -1. * atom.atomic_number * erf(ξ * r) / r;\n  }\n  return sum;\n}\n\ndouble FermiNuclearDensityFunctor::operator()(const madness::coord_3d& R) const {\n  // eq. numbers refer to Visscher and Dyall 10.1006/adnd.1997.0751\n  const auto bohr_rad_fm = constants::Bohr_radius * 1e15;\n  const auto T = 2.3 / bohr_rad_fm;\n\n  auto A = madness::get_atomic_data(atom.atomic_number).isotope_number;\n  double C;\n  if (A < 5) {\n    // Eq. 9\n    C = 0.000022291 * pow(A, 1.0 / 3.0) - 0.0000090676;\n  } else {\n    // Eqs. 4 and 8\n    C = sqrt((5.0 / 3.0) *\n                  pow((0.836 * pow(A, 1.0 / 3.0) + 0.570) / bohr_rad_fm, 2.0) -\n              (7.0 / 3.0) * pow(M_PI * T / 4.0 / std::log(3.0), 2.0));\n  }\n\n  // Eq. 14\n  auto r = ::detail::distance(R[0], R[1], R[2], atom.x, atom.y, atom.z);\n  return 1.0 / (1.0 + exp(4.0 * std::log(3.0) * (r - C) / T));\n}\n\ndouble WignerSeitzPotentialFunctor::operator()(const coord_3d &r) const {\n  enum { x = 0, y = 1, z = 2 };\n\n  const auto natoms = atoms.natom();\n  // double E = 0.;\n\n  const auto eval = [&](const auto &r1, const auto &r2, const auto rcut) {\n    double restrictor_factor = 1.;\n    double r12_sq = 0.;\n    for (int d = 0; d != 3; ++d) {\n      const auto x1 = r1[d];\n      const auto x2 = r2[d];\n      const auto x12 = x1 - x2;\n      r12_sq += x12 * x12;\n      restrictor_factor *= range[d].value(std::abs(x1 - x2) * rcell_width[d]);\n    }\n    const auto r12 = std::sqrt(r12_sq);\n    return restrictor_factor * smoothed_potential(r12 * rcut) * rcut;\n  };\n\n  double result = 0.0;\n  for (int cx = -lattice_sum_range[x]; cx <= lattice_sum_range[x]; ++cx) {\n    for (int cy = -lattice_sum_range[y]; cy <= lattice_sum_range[y]; ++cy) {\n      for (int cz = -lattice_sum_range[z]; cz <= lattice_sum_range[z]; ++cz) {\n        // const auto intracell = cx==0 && cy==0 && cz==0;\n\n        // r - (A + C) = (r - C) - A\n        const std::array<double, 3> rC{r[x] - cx * cell_width[0],\n                                       r[y] - cy * cell_width[1],\n                                       r[z] - cz * cell_width[2]};\n\n        for (std::size_t a = 0; a != natoms; ++a) {\n          const auto &atom = atoms.get_atom(a);\n\n          // make sure this isn't a pseudo-atom\n          if (atom.pseudo_atom)\n            continue;\n\n          result -=\n              atom.q * eval(rC, std::array<double, 3>{atom.x, atom.y, atom.z},\n                            atoms.get_rcut()[a]);\n        }\n      }\n    }\n  }\n  return result;\n}\n\nstd::vector<coord_3d> WignerSeitzPotentialFunctor::special_points() const {\n  return atoms.get_all_coords_vec();\n}\n\nSAPFunctor::SAPFunctor(\n    const Atom &atom,\n    double smoothing_param,\n    const BoundaryConditions<3> &bc,\n    const Tensor<double> &cell,\n    int special_level) :\n      atom(atom),\n      smoothing_param(smoothing_param),\n      bc_(bc),\n      cell(cell),\n      special_level_(special_level) {\n}\n\ndouble SAPFunctor::operator()(const coord_3d &x) const {\n  double sum = 0.0;\n  const auto ext_x = cell(0,1) - cell(0,0);\n  const auto ext_y = cell(1,1) - cell(1,0);\n  const auto ext_z = cell(2,1) - cell(2,0);\n  const auto& interpolator = SAPCharges[atom.q - 1];\n  auto maxX = bc_.is_periodic()[0] ? static_cast<int>(ceil(interpolator.get_hi() / ext_x)) : 0;\n  auto maxY = bc_.is_periodic()[1] ? static_cast<int>(ceil(interpolator.get_hi() / ext_y)) : 0;\n  auto maxZ = bc_.is_periodic()[2] ? static_cast<int>(ceil(interpolator.get_hi() / ext_z)) : 0;\n  for (int dx = -maxX; dx <= maxX; dx++) {\n    double xx = atom.x + dx*ext_x - x[0];\n    for (int dy = -maxY; dy <= maxY; dy++) {\n      double yy = atom.y + dy*ext_y - x[1];\n      for (int dz = -maxZ; dz <= maxZ; dz++) {\n        double zz = atom.z + dz*ext_z - x[2];\n        auto r = std::sqrt(xx * xx + yy * yy + zz * zz);\n        if (r >= interpolator.get_hi()) continue;\n        sum += interpolator(r) * smoothed_potential(r * smoothing_param);\n      }\n    }\n  }\n\n  return sum * smoothing_param;\n}\n\nLevel\nSAPFunctor::special_level() const { return special_level_; }\n\nstd::vector<coord_3d>\nSAPFunctor::special_points() const { return {atom.get_coords()}; }\n\n\n}  // namespace madness\n"
  },
  {
    "path": "src/madness/chem/potentialmanager.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_CHEM_POTENTIALMANAGER_H__INCLUDED\n#define MADNESS_CHEM_POTENTIALMANAGER_H__INCLUDED\n\n/**\n * @file potentialmanager.h\n * @brief Declaration of molecule-related classes and functions.\n */\n\n#include <madness/chem/corepotential.h>\n#include <madness/chem/atomutil.h>\n#include <madness/chem/molecule.h>\n#include <madness/mra/kernelrange.h>\n#include <vector>\n#include <string>\n#include <iostream>\n#include <fstream>\n#include <sstream>\n#include <algorithm>\n#include <ctype.h>\n#include <cmath>\n#include <madness/tensor/tensor.h>\n#include <madness/misc/misc.h>\n#include <madness/misc/interpolation_1d.h>\n#include <madness/mra/mra.h>\n\nnamespace madness {\n/**\n * @class MolecularPotentialFunctor\n * @brief Functor for evaluating the nuclear attraction potential of a molecule at a given point.\n *\n * This class implements the FunctionFunctorInterface for 3D coordinates and provides\n * an interface to evaluate the nuclear attraction potential (smoothed Coulomb potential)\n * of a molecule at a specified point in space. It also provides access to special points,\n * the coordinates of all nuclei in the molecule.\n *\n */\nclass MolecularPotentialFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    const Molecule& molecule;\npublic:\n    MolecularPotentialFunctor(const Molecule& molecule)\n        : molecule(molecule) {}\n\n    double operator()(const coord_3d& r) const {\n        return molecule.nuclear_attraction_potential(r[0], r[1], r[2]);\n    }\n\n    std::vector<coord_3d> special_points() const {return molecule.get_all_coords_vec();}\n};\n\n/**\n * @class MolecularCorePotentialFunctor\n * @brief Functor for evaluating the molecular core potential at a given point in space.\n *\n * This class implements the FunctionFunctorInterface to provide a callable object\n * that computes the molecular core potential for a given 3D coordinate using the\n * associated Molecule instance.\n *\n */\nclass MolecularCorePotentialFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n    const Molecule& molecule;\npublic:\n    MolecularCorePotentialFunctor(const Molecule& molecule)\n        : molecule(molecule) {}\n\n    double operator()(const coord_3d& r) const {\n        return molecule.molecular_core_potential(r[0], r[1], r[2]);\n    }\n\n    std::vector<coord_3d> special_points() const {return molecule.get_all_coords_vec();}\n};\n\n/**\n * @class CoreOrbitalFunctor\n * @brief Functor for evaluating a core orbital of a specific atom in a molecule.\n *\n * This class implements the FunctionFunctorInterface for evaluating the value of a core orbital\n * at a given 3D coordinate. It holds references to a molecule, the atom index, the core orbital index,\n * and the magnetic quantum number m.\n *\n */\nclass CoreOrbitalFunctor : public FunctionFunctorInterface<double,3> {\n    const Molecule molecule;\n    const int atom;\n    const unsigned int core;\n    const int m;\npublic:\n    CoreOrbitalFunctor(Molecule& molecule, int atom, unsigned int core, int m)\n        : molecule(molecule), atom(atom), core(core), m(m) {};\n    double operator()(const coord_3d& r) const {\n        return molecule.core_eval(atom, core, m, r[0], r[1], r[2]);\n    };\n};\n\n/**\n * @class CoreOrbitalDerivativeFunctor\n * @brief Functor for evaluating the derivative of a core orbital for a given atom in a molecule.\n *\n * It encapsulates the logic to compute the derivative of a specified core orbital with respect to a given axis\n * for a particular atom in a molecule. It holds references to a molecule, the atom index, the axis index,\n * the core orbital index, and the magnetic quantum number m.\n *\n */\nclass CoreOrbitalDerivativeFunctor : public FunctionFunctorInterface<double,3> {\n    const Molecule molecule;\n    const int atom, axis;\n    const unsigned int core;\n    const int m;\npublic:\n    CoreOrbitalDerivativeFunctor(Molecule& molecule, int atom, int axis, unsigned int core, int m)\n        : molecule(molecule), atom(atom), axis(axis), core(core), m(m) {};\n    double operator()(const coord_3d& r) const {\n        return molecule.core_derivative(atom, axis, core, m, r[0], r[1], r[2]);\n    };\n};\n\n/**\n * @class NuclearDensityFunctor\n * @brief Default functor for evaluating nuclear density at a given point in space.\n *\n * This class implements a functor that computes the nuclear density for a given molecule,\n * supporting both open and periodic boundary conditions. It can be used to evaluate the\n * nuclear density at any point in 3D space, and provides special points and refinement\n * level information for adaptive algorithms.\n *\n */\nclass NuclearDensityFunctor : public FunctionFunctorInterface<double,3> {\nprivate:\n  const Molecule& atoms;\n  BoundaryConditions<3> bc_;\n  Tensor<double> cell;\n  std::vector<coord_3d> special_points_;\n  int maxR;\n  int special_level_ = 15;\n  double rscale = 1.0;\npublic:\n  /**\n  * @brief Constructs a NuclearDensityFunctor for evaluating nuclear densities.\n  *\n  * This constructor can handle both open and periodic boundary conditions.\n  *\n  * @param atoms Reference to the molecule containing the atoms.\n  * @param bc Boundary conditions for the simulation (default: open boundaries).\n  * @param cell Simulation cell tensor (unit cell, if periodic; default: identity).\n  * @param special_level The initial refinement level for special points (default: 15).\n  * @param rscale Scaling factor for the nuclear radius. Setting rscale > 1 increases the effective size of a nucleus by this factor (i.e., rcut is divided by rscale).\n  */\n  NuclearDensityFunctor(const Molecule& atoms,\n                        const BoundaryConditions<3>& bc = FunctionDefaults<3>::get_bc(),\n                        const Tensor<double>& cell = FunctionDefaults<3>::get_cell(),\n                        int special_level = 15,\n                        double rscale = 1.0);\n\n  double operator()(const coord_3d& x) const final;\n\n  std::vector<coord_3d> special_points() const final;\n\n  Level special_level() const final;\n\n  NuclearDensityFunctor& set_rscale(double rscale);\n\n};\n\n/**\n * @class GaussianNuclearDensityPotentialFunctor\n * @brief Functor for evaluating the Coulomb potential of all nuclei of a molecule; nuclei are represented by primitive spherical (l=0) Gaussians.\n *\n * It computes the Gaussian potential generated by a given molecule at a specified position.\n *\n * @note DOI 10.1006/adnd.1997.0751\n */\nclass GaussianNuclearDensityPotentialFunctor : public FunctionFunctorInterface<double, 3> {\n private:\n  const Molecule& molecule;\n  int special_level_ = 15;\n\n public:\n  GaussianNuclearDensityPotentialFunctor(const madness::Molecule& molecule, int special_level = 15)\n      : molecule(molecule), special_level_(special_level) {}\n\n  double operator()(const madness::coord_3d& R) const final;\n\n  madness::Level special_level() const final { return special_level_; };\n\n  std::vector<coord_3d> special_points() const { return molecule.get_all_coords_vec(); }\n};\n\n/**\n * @class FermiNuclearDensityFunctor\n * @brief Functor representing the Fermi nuclear density distribution for a given atom.\n *\n * This class implements a functor that evaluates the two-parameter charge distribution for\n * the nuclear density at a given 3D coordinate. The density is significant only in a small\n * region around the atomic center.\n *\n * @note DOI 10.1006/adnd.1997.0751\n */\nclass FermiNuclearDensityFunctor : public FunctionFunctorInterface<double, 3> {\n private:\n  const Atom& atom;\n  int special_level_ = 18;\n\n public:\n  FermiNuclearDensityFunctor(const Atom& atom, int special_level = 18)\n      : atom(atom), special_level_(special_level) {}\n\n  double operator()(const madness::coord_3d& R) const final;\n\n  madness::Level special_level() const final { return special_level_; };\n\n  std::vector<coord_3d> special_points() const final { return {atom.get_coords()}; }\n};\n\n/**\n * @class WignerSeitzPotentialFunctor\n * @brief Functor for evaluating the Wigner-Seitz potential in a simulation cell.\n *\n * This class implements a functor that evaluates the electrostatic potential\n * in a simulation cell due to a set of point charges, with optional periodic\n * boundary conditions and configurable lattice summation range.\n *\n * The potential is computed by summing contributions from point charges\n * in the simulation cell and their periodic images, as determined by the\n * specified boundary conditions and kernel range.\n *\n * @note The lattice summation range can be overridden by the user, or\n *       determined automatically based on the boundary conditions and kernel range.\n */\nclass WignerSeitzPotentialFunctor : public FunctionFunctorInterface<double,3> {\npublic:\n  /**\n   * @brief Constructs a WignerSeitzPotentialFunctor evaluating the potential\n   *        in a simulation cell due to point charges, optionally with periodic\n   *        boundary conditions and a specified lattice summation range.\n   *\n   * @tparam Int Integer type for the lattice summation range.\n   * @param atoms List of point charges in the simulation cell.\n   * @param c The simulation cell dimensions.\n   * @param b The boundary conditions.\n   * @param r The kernel range along each Cartesian direction.\n   * @param lattice_sum_range Overrides the default lattice summation range along each axis.\n   *        By default, this is determined by the number of cells in each direction with\n   *        nonzero contributions to the simulation cell.\n   */\n  template <typename Int>\n  WignerSeitzPotentialFunctor(const Molecule &atoms, Tensor<double> c,\n                              BoundaryConditions<3> b, std::array<KernelRange, 3> r,\n                              std::array<Int, 3> lattice_sum_range)\n      : atoms(atoms), cell(std::move(c)), bc(std::move(b)), range(std::move(r)),\n        cell_width{cell(0, 1) - cell(0, 0), cell(1, 1) - cell(1, 0),\n                   cell(2, 1) - cell(2, 0)},\n        rcell_width{1. / cell_width[0], 1. / cell_width[1],\n                    1. / cell_width[2]}, lattice_sum_range{lattice_sum_range[0], lattice_sum_range[1], lattice_sum_range[2]} {\n    for (int d = 0; d != 3; ++d)\n      MADNESS_ASSERT(lattice_sum_range[d] >= 0);\n  }\n\n  /**\n   * @brief Constructs a WignerSeitzPotentialFunctor with default lattice sum range.\n   *\n   * This constructor initializes the WignerSeitzPotentialFunctor using the provided molecule,\n   * coefficients tensor, boundary conditions, and kernel ranges. It automatically computes\n   * the default lattice sum range using the given boundary conditions and kernel ranges.\n   *\n   * @param atoms The molecule containing the atomic positions and properties.\n   * @param c The tensor of coefficients for the potential calculation.\n   * @param b The boundary conditions for the simulation cell.\n   * @param r The kernel ranges for each spatial dimension.\n   *\n   * @note This constructor delegates to the main constructor, passing the default lattice sum range.\n   * In this case, the move is a cast, and calling make_default_lattice_sum_range like this is OK.\n   */\n  WignerSeitzPotentialFunctor(const Molecule &atoms, Tensor<double> c,\n                              BoundaryConditions<3> b, std::array<KernelRange, 3> r) :\n  WignerSeitzPotentialFunctor(atoms, std::move(c), std::move(b), std::move(r), make_default_lattice_sum_range(b,r)) {}\n\n  double operator()(const coord_3d &x) const final;\n\n  std::vector<coord_3d> special_points() const final;\n\n  static std::array<std::int64_t, 3> make_default_lattice_sum_range(const BoundaryConditions<3>& bc, const std::array<KernelRange, 3>& range) {\n    std::array<std::int64_t, 3> result;\n    for (int d = 0; d != 3; ++d) {\n      result[d] = bc.is_periodic()[d] ? (range[d].iextent_x2() + 1) / 2 : 0;\n    }\n    return result;\n  }\n\nprivate:\n  const Molecule &atoms;\n  const Tensor<double> cell;\n  const BoundaryConditions<3> bc;\n  const std::array<KernelRange, 3> range;\n  const std::array<double, 3> cell_width;\n  const std::array<double, 3> rcell_width;\n  const std::array<std::int64_t, 3> lattice_sum_range;\n};\n\n/**\n * @class SAPFunctor\n * @brief Functor for evaluating a smoothed atomic potential, supporting open and periodic boundary conditions.\n *\n * This class implements the FunctionFunctorInterface for a 3D double-valued function,\n * representing a smoothed interpolated atomic potential centered on a given atom. It supports\n * both open and periodic boundary conditions, and allows customization of the smoothing\n * parameter, simulation cell, and initial refinement level.\n *\n */\nclass SAPFunctor : public FunctionFunctorInterface<double,3> {\n private:\n  const Atom& atom;\n  double smoothing_param;\n  BoundaryConditions<3> bc_;\n  Tensor<double> cell;\n  Level special_level_;\n public:\n  /**\n   * @brief Constructs a SAPFunctor for evaluating a smoothed 1/r potential.\n   *\n   * This constructor initializes the SAPFunctor with a given atom, smoothing parameter,\n   * boundary conditions, simulation cell, and an initial refinement level. It supports\n   * both open and periodic boundary conditions.\n   *\n   * @param atom The atom for which the potential is evaluated.\n   * @param smoothing_param Controls the smoothness of the 1/r potential.\n   * @param bc Boundary conditions for the simulation (default: open or as specified by FunctionDefaults).\n   * @param cell The simulation cell tensor (default: as specified by FunctionDefaults).\n   * @param special_level The initial refinement level (default: 15).\n   */\n  SAPFunctor(const Atom& atom,\n             double smoothing_param,\n             const BoundaryConditions<3>& bc = FunctionDefaults<3>::get_bc(),\n             const Tensor<double>& cell = FunctionDefaults<3>::get_cell(),\n             int special_level = 15);\n\n  double operator()(const coord_3d& x) const final;\n\n  Level special_level() const final;\n\n  std::vector<coord_3d> special_points() const final;\n};\n\n/**\n * @class PotentialManager\n * @brief Manages molecular potentials and core projections for quantum chemistry calculations.\n *\n * This class encapsulates the management of nuclear and core potentials for a given molecule,\n * including the construction of nuclear potentials, application of nonlocal core projectors,\n * and calculation of core projector derivatives. It provides interfaces to access the molecule,\n * core type, and nuclear potential, as well as to perform core projections and apply nonlocal potentials.\n *\n */\nclass PotentialManager {\nprivate:\nMolecule mol;\nreal_function_3d vnuc;\nstd::string core_type_;\n\npublic:\n    PotentialManager(const Molecule& molecule, const std::string& core_type)\n     : mol(molecule), core_type_(core_type) {}\n\n    const Molecule& molecule() const {\n      return this->mol;\n    }\n\n    const std::string& core_type() const {\n      return this->core_type_;\n    }\n\n    const real_function_3d& vnuclear() {\n        return vnuc;\n    }\n\n    /**\n     * @brief Projects the input wavefunctions onto the atomic core orbitals.\n     *\n     * This function computes the projection of the given set of wavefunctions (`psi`)\n     * onto the core orbitals of each atom in the molecule. The projection is performed\n     * for each atom and each of its core orbitals, accumulating the result in the\n     * returned vector of functions. Optionally, the projection can include the core\n     * boundary condition factor (`Bc`).\n     *\n     * @param world The MADNESS World object for parallel execution and data management.\n     * @param psi The input vector of real 3D functions (wavefunctions) to be projected.\n     * @param include_Bc If true, includes the core boundary condition factor in the projection (default: true).\n     * @return A vector of real 3D functions representing the projection of `psi` onto the core orbitals.\n     *\n     */\n    vector_real_function_3d core_projection(World & world, const vector_real_function_3d& psi, const bool include_Bc = true)\n    {\n        int npsi = psi.size();\n        if (npsi == 0) return psi;\n        int natom = mol.natom();\n        vector_real_function_3d proj = zero_functions_compressed<double,3>(world, npsi);\n        real_tensor overlap_sum(static_cast<long>(npsi));\n\n        for (int i=0; i<natom; ++i) {\n            Atom at = mol.get_atom(i);\n            unsigned int atn = at.atomic_number;\n            unsigned int nshell = mol.n_core_orb(atn);\n            if (nshell == 0) continue;\n            for (unsigned int c=0; c<nshell; ++c) {\n                unsigned int l = mol.get_core_l(atn, c);\n                int max_m = (l+1)*(l+2)/2;\n                nshell -= max_m - 1;\n                for (int m=0; m<max_m; ++m) {\n                    real_function_3d core = real_factory_3d(world).functor(real_functor_3d(new CoreOrbitalFunctor(mol, i, c, m)));\n                    real_tensor overlap = inner(world, core, psi);\n                    overlap_sum += overlap;\n                    for (int j=0; j<npsi; ++j) {\n                        if (include_Bc) overlap[j] *= mol.get_core_bc(atn, c);\n                        proj[j] += core.scale(overlap[j]);\n                    }\n                }\n            }\n            world.gop.fence();\n        }\n        if (world.rank() == 0) print(\"sum_k <core_k|psi_i>:\", overlap_sum);\n        return proj;\n    }\n\n    /**\n     * @brief Computes the derivative of the core projector operator with respect to a given axis for a specified atom.\n     *\n     * This function projects the core orbitals and their derivatives onto the molecular orbitals,\n     * then evaluates the sum:\n     * \\f[\n     * \\sum_i \\mathrm{occ}_i \\langle \\psi_i | \\left( \\sum_c B_c \\frac{d}{dx} | \\mathrm{core} \\rangle \\langle \\mathrm{core} | \\right) | \\psi_i \\rangle\n     * \\f]\n     * where \\f$ \\psi_i \\f$ are molecular orbitals, \\f$ \\mathrm{occ}_i \\f$ are their occupations,\n     * and the sum over \\f$ c \\f$ runs over the core orbitals of the specified atom.\n     *\n     * @param world The MADNESS World object for parallel computation.\n     * @param mo The vector of molecular orbitals as real-valued 3D functions.\n     * @param occ The occupation numbers for each molecular orbital.\n     * @param atom The index of the atom for which the core projector derivative is computed.\n     * @param axis The spatial axis (0=x, 1=y, 2=z) along which the derivative is taken.\n     * @return The computed derivative value as a double.\n     */\n    double core_projector_derivative(World & world, const vector_real_function_3d& mo, const real_tensor& occ, int atom, int axis)\n    {\n        vector_real_function_3d cores, dcores;\n        std::vector<double> bc;\n        unsigned int atn = mol.get_atom(atom).atomic_number;\n        unsigned int ncore = mol.n_core_orb(atn);\n\n        // projecting core & d/dx core\n        for (unsigned int c=0; c<ncore; ++c) {\n            unsigned int l = mol.get_core_l(atn, c);\n            int max_m = (l+1)*(l+2)/2;\n            for (int m=0; m<max_m; ++m) {\n                real_functor_3d func = real_functor_3d(new CoreOrbitalFunctor(mol, atom, c, m));\n                cores.push_back(real_function_3d(real_factory_3d(world).functor(func).truncate_on_project()));\n                func = real_functor_3d(new CoreOrbitalDerivativeFunctor(mol, atom, axis, c, m));\n                dcores.push_back(real_function_3d(real_factory_3d(world).functor(func).truncate_on_project()));\n                bc.push_back(mol.get_core_bc(atn, c));\n            }\n        }\n\n        // calc \\sum_i occ_i <psi_i|(\\sum_c Bc d/dx |core><core|)|psi_i>\n        double r = 0.0;\n        for (unsigned int c=0; c<cores.size(); ++c) {\n            double rcore= 0.0;\n            real_tensor rcores = inner(world, cores[c], mo);\n            real_tensor rdcores = inner(world, dcores[c], mo);\n            for (unsigned int i=0; i<mo.size(); ++i) {\n                rcore += rdcores[i] * rcores[i] * occ[i];\n            }\n            r += 2.0 * bc[c] * rcore;\n        }\n\n        return r;\n    }\n\n    void apply_nonlocal_potential(World& world, const vector_real_function_3d& amo, vector_real_function_3d Vpsi) {\n        if (core_type_.substr(0,3) == \"mcp\") {\n         //   START_TIMER(world);\n            gaxpy(world, 1.0, Vpsi, 1.0, core_projection(world, amo));\n         //   END_TIMER(world, \"MCP Core Projector\");\n        }\n    }\n\n    void make_nuclear_potential(World& world) {\n        double safety = 0.1;\n        double vtol = FunctionDefaults<3>::get_thresh() * safety;\n        vnuc = real_factory_3d(world).functor(real_functor_3d(new MolecularPotentialFunctor(mol))).thresh(vtol).truncate_on_project();\n        vnuc.set_thresh(FunctionDefaults<3>::get_thresh());\n        vnuc.reconstruct();\n        //     \"\" is  legacy core_type value for all-electron (also be used by CorePotentialManager)\n        // \"none\" is current core_type value for all-electron\n        if (core_type_ != \"\" && core_type_ != \"none\") {\n            real_function_3d c_pot = real_factory_3d(world).functor(real_functor_3d(new MolecularCorePotentialFunctor(mol))).thresh(vtol).initial_level(4);\n            c_pot.set_thresh(FunctionDefaults<3>::get_thresh());\n            c_pot.reconstruct();\n            vnuc += c_pot;\n            vnuc.truncate();\n        }\n    }\n};\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/chem/projector.h",
    "content": "/*\n * projector.h\n *\n *  Created on: Jan 24, 2014\n *      Author: fbischoff\n */\n\n#ifndef MADNESS_CHEM_PROJECTOR_H__INCLUDED\n#define MADNESS_CHEM_PROJECTOR_H__INCLUDED\n\n#include <madness/mra/mra.h>\n#include <type_traits>\n\nnamespace madness {\n\n\n    class ProjectorBase {\n    protected:\n        /// a projector might work only on a subset of dimensions, e.g. P(1) | \\psi(1,2) >\n        int particle=-1;        // must only be 0 or 1!\n    public:\n        virtual ~ProjectorBase() {}\n        virtual void set_particle(const int p)\n        {\n            MADNESS_CHECK_THROW(p==0 or p==1, \"particle must be 0 or 1\");\n            particle=p;\n        }\n        virtual int get_particle() const {return particle;}\n        virtual std::string type() const = 0;\n    };\n\n    template<typename T, std::size_t NDIM>\n    class CCPairFunction;\n\n    template<typename T, std::size_t NDIM>\n    std::vector<CCPairFunction<T,NDIM>> apply(const ProjectorBase& P, const std::vector<CCPairFunction<T,NDIM>>& argument);\n\n    /// simple projector class\n\n    /// use this class to project a function or a set of functions on\n    /// another space of function. The projector can handle different sets of\n    /// functions for the bra and the ket space, e.g. in case of regularized\n    /// orbitals: |f>  <->  <f|R^2\n    template<typename T, std::size_t NDIM>\n    class Projector : public ProjectorBase {\n\n        typedef Function<T,NDIM> funcT;\n        typedef std::vector<funcT> vecfuncT;\n\n        /// the space onto which the test functions will be projected: |ket>\n        std::vector<Function<T,NDIM> > mo_ket_;\n        /// the dual space onto which the test functions will be projected: <bra|\n        std::vector<Function<T,NDIM> > mo_bra_;\n\n    public:\n\n        Projector() : mo_ket_(vecfuncT()), mo_bra_(vecfuncT()) {}\n\n        /// simple constructor with only one orbital to project\n\n        /// bra and ket spaces are symmetric\n        Projector(const Function<T,NDIM>& mo) : mo_ket_(vecfuncT(1,mo)),\n                mo_bra_(vecfuncT(1,mo)) {}\n\n        /// simple constructor with only one orbital to project\n\n        /// bra and ket spaces are not symmetric (e.g. |ket>^+ = <bra|R2 )\n        Projector(const funcT& bra, const funcT& ket) : mo_ket_(vecfuncT(1,ket))\n                , mo_bra_(vecfuncT(1,bra)) {\n            MADNESS_CHECK_THROW(mo_bra_.size()==mo_ket_.size(), \"bra and ket spaces must have the same size in projector\");\n        }\n\n        /// constructor with a set of orbitals to project out\n\n        /// bra and ket spaces are symmetric\n        Projector(const vecfuncT& p) : mo_ket_(p), mo_bra_(p) {\n            MADNESS_CHECK_THROW(mo_bra_.size()==mo_ket_.size(), \"bra and ket spaces must have the same size in projector\");\n        }\n\n        /// constructor with a set of orbitals to project out\n\n        /// bra and ket spaces are not symmetric (e.g. |ket>^+ = <bra|R2 )\n        Projector(const vecfuncT& bra, const vecfuncT& ket) : mo_ket_(ket),\n                mo_bra_(bra) {\n            MADNESS_CHECK_THROW(mo_bra_.size()==mo_ket_.size(), \"bra and ket spaces must have the same size in projector\");\n        }\n\n    \tvoid set_spaces(const vecfuncT& p) {\n            mo_bra_=p;\n            mo_ket_=p;\n        }\n\n        void set_spaces(const vecfuncT& bra, const vecfuncT& ket) {\n            mo_bra_=bra;\n            mo_ket_=ket;\n            MADNESS_CHECK_THROW(mo_bra_.size()==mo_ket_.size(), \"bra and ket spaces must have the same size in projector\");\n        }\n\n        virtual std::string type() const override {return \"PProjector\";}\n\n        /// project f on p:\n\n        /// \\f[\n        ///     | result > =  \\sum_p | p > <p|f>\n        /// \\f]\n        /// @param[in]  f   the function to be projected\n        /// @return     the projection of f on the space of p\n        funcT operator()(const funcT& f) const {\n            return this->operator()(vecfuncT(1,f)).front();\n        }\n\n        /// project f on p:\n\n        /// \\f[\n        ///     | result > =  \\sum_p | p > <p|f>\n        /// \\f]\n        /// @param[in]  f   the vector of functions to be projected\n        /// @return     the projection of f on the space of p\n        vecfuncT operator()(const vecfuncT& f) const {\n            if (f.size()==0) return vecfuncT();\n            World& world=f[0].world();\n            Tensor<T> ovlp=matrix_inner(world,mo_bra_,f);\n            vecfuncT result=transform(world,mo_ket_,ovlp,true);\n            truncate(world,result);\n            return result;\n        }\n\n        /// apply 3D Projector to one particle of a 6D function\n        /// \\f[\n        /// |result> = \\sum_p |p(particle)> <p(particle)|f(1,2)>_{particle}\n        /// \\f]\n        /// @param[in] f the 6D function to be projected\n        /// @param[in] the particle that is projected (0 or 1)\n        /// @return the projected function\n        template<std::size_t KDIM>\n        typename std::enable_if<KDIM==2*NDIM, Function<T,KDIM> >::type\n        operator()(const Function<T,KDIM>& f, int particle1=-1) const {\n            if (particle1==-1) particle1=get_particle();\n            MADNESS_CHECK_THROW(particle1 == 0 or particle1 == 1, \"particle must be 0 or 1\");\n            auto [left,right]=get_vectors_for_outer_product(f);\n            return hartree_product(left,right);\n        }\n\n        /// apply the projection parts of the operator on a function f\n\n        /// The operator applied on f(1,2) is\n        ///  O(1)f(1,2) = \\sum_i |i(1) > <i(1) | f(1,2)>_1 = \\sum_i |i(1) f_i(2)>\n        /// return the lo-dim vectors i and f_i only, perform no outer product\n        std::pair<std::vector<Function<T,NDIM>>,std::vector<Function<T,NDIM>>>\n        get_vectors_for_outer_product(const Function<T,2*NDIM>& f) const {\n            World& world=f.world();\n            reconstruct(world, mo_bra_, false);\n            f.reconstruct(false);\n            reconstruct(world, mo_ket_, true);\n            std::vector<Function<T,NDIM>> projected;\n            for (const auto& i : mo_bra_) {\n                projected.push_back(f.project_out(i,particle));\n            }\n            if (particle==0) return std::make_pair(mo_ket_,projected);\n            else if (particle==1) return std::make_pair(projected,mo_ket_);\n            else {\n                MADNESS_EXCEPTION(\"confused particles in Projector::get_vector_for_outer_products\",1);\n            }\n        }\n\n        template<typename argT>\n        typename std::enable_if<!std::is_same<argT,Function<T,2*NDIM> >::value, argT>::type\n        operator()(const argT& argument) const {\n            return madness::apply(*this,argument);\n        }\n\n        vecfuncT get_bra_vector() const {return mo_bra_;}\n\n        vecfuncT get_ket_vector() const {return mo_ket_;}\n\n    };\n\n\n    /// orthogonality projector\n\n    /// projects out the space given in the constructor\n    /// \\f[\n    ///   |result> = |f> - \\sum_p |p><p|f>\n    /// \\f]\n    template<typename T, std::size_t NDIM>\n    class QProjector : public ProjectorBase {\n        typedef std::vector<Function<T,NDIM> > vecfuncT;\n\n    public:\n\n        /// default ctor\n        QProjector() = default;\n\n        /// constructor with symmetric bra and ket spaces\n        [[deprecated]] QProjector(World& world, const vecfuncT& amo) : O(amo) {};\n\n        /// constructor with asymmetric bra and ket spaces\n        [[deprecated]] QProjector(World& world, const vecfuncT& bra, const vecfuncT& ket)\n            : O(bra,ket) {};\n\n        /// constructor with symmetric bra and ket spaces\n        QProjector(const vecfuncT& amo) : O(amo) {};\n\n        /// constructor with asymmetric bra and ket spaces\n        QProjector(const vecfuncT& bra, const vecfuncT& ket)\n            : O(bra,ket) {};\n\n        /// copy ctor\n        QProjector(const QProjector& other) = default;\n\n        std::string type() const override {return \"QProjector\";}\n\n        void set_spaces(const vecfuncT& p) {\n            O.set_spaces(p);\n        }\n\n        void set_spaces(const vecfuncT& bra, const vecfuncT& ket) {\n            O.set_spaces(bra,ket);\n        }\n\n        Function<T,NDIM> operator()(const Function<T,NDIM>& rhs) const {\n            return (rhs-O(rhs)).truncate();\n        }\n\n        vecfuncT operator()(const vecfuncT& rhs) const {\n        \tif (rhs.size()==0) return vecfuncT();\n            vecfuncT result=rhs-O(rhs);\n            truncate(result[0].world(),result);\n            return result;\n        }\n\n        Function<T,2*NDIM> operator()(const Function<T,2*NDIM>& f, const size_t particle=-1) const {\n            return f-O(f,particle);\n        }\n\n        template<typename argT>\n        argT operator()(const argT& argument) const {\n            return madness::apply(*this,argument);\n        }\n\n        vecfuncT get_bra_vector() const {return O.get_bra_vector();}\n\n        vecfuncT get_ket_vector() const {return O.get_ket_vector();}\n\n        Projector<T,NDIM> get_P_projector() const {return O;}\n\n        void set_particle(const int p) override {\n            O.set_particle(p);\n            particle=p;\n        }\n\n        int get_particle() const override {\n            return O.get_particle();\n        }\n\n    private:\n        Projector<T,NDIM> O;\n    };\n\n    /// a SO projector class\n\n    /// The SO projector is defined as\n    ///  Q12 = (1-O1)(1-O2),\n    ///  O = \\sum_i | i >< i |\n    /// where O1 and O2 are projectors for electron 1 and 2 on the occupied space\n    /// As a special case there might be a similarity transformed occupied\n    /// space, resulting in different bras and kets\n    template<typename T, std::size_t NDIM>\n    class StrongOrthogonalityProjector : public ProjectorBase {\n\n    \ttypedef std::vector<Function<T,NDIM> > vecfuncT;\n\n    public:\n\n    \t/// default ctor\n    \tStrongOrthogonalityProjector(World& world) : world(world) {}\n\n        std::string type() const override {return \"SOProjector\";}\n\n    \t/// set the same spaces for the projectors for particle 1 and 2\n    \tvoid set_spaces(const vecfuncT& p) {\n    \t\tket1_=p;\n    \t\tbra1_=p;\n    \t\tket2_=p;\n    \t\tbra2_=p;\n    \t}\n\n    \t/// set different spaces for the projectors for particle 1 and 2\n\n    \t/// the SO projector is\n    \t///  Q12 = (1 - O1) (1 - O2)\n    \t///  O1 = \\sum_i | ket1_i >< bra1_i |\n    \t///  O2 = \\sum_i | ket2_i >< bra2_i |\n    \t/// this case occurs for a similarity transformed Q12\n    \tvoid set_spaces(const vecfuncT& bra1, const vecfuncT& ket1,\n        \t\tconst vecfuncT& bra2, const vecfuncT& ket2) {\n    \t\tket1_=ket1;\n    \t\tbra1_=bra1;\n    \t\tket2_=ket2;\n    \t\tbra2_=bra2;\n            MADNESS_CHECK_THROW(ket1.size()==bra1.size(), \"bra1 and ket1 spaces must have the same size in SOprojector\");\n            MADNESS_CHECK_THROW(ket2.size()==bra2.size(), \"bra2 and ket2 spaces must have the same size in SOprojector\");\n    \t}\n\n    \t/// return the orbital space for the ket of particle 1\n    \tvecfuncT ket1() const {return ket1_;}\n\n    \t/// return the orbital space for the bra of particle 1\n    \tvecfuncT bra1() const {return bra1_;}\n\n    \t/// return the orbital space for the ket of particle 2\n    \tvecfuncT ket2() const {return ket2_;}\n\n    \t/// return the orbital space for the bra of particle 2\n    \tvecfuncT bra2() const {return bra2_;}\n\n        void set_particle(const int p) override {\n            MADNESS_EXCEPTION(\"You cannot set a particle in the SO projector\",1);\n        }\n\n        template<typename argT>\n        argT operator()(const argT& argument) const {\n            return madness::apply(*this,argument);\n        }\n\n        /// apply the projection parts of the strong orthogonality operator Q12 on a function f\n\n        /// The SO operator is defined as 1-O1-O2+O1O2, where O1 and O2 are projectors\n        /// return the term -O1-O2+O1O2 only, such that Q12 f = 1 + outer(result.first,result.second)\n        std::pair<std::vector<Function<T,NDIM>>,std::vector<Function<T,NDIM>>>\n        get_vectors_for_outer_product(const Function<T,2*NDIM>& f) const {\n            // Eq. (A9): g_kl = < k(1) l(2) | f(1,2) >\n            // note no (kl) symmetry here!\n            reconstruct(world, bra1_, false);\n            reconstruct(world, bra2_, true);\n            Tensor<double> g_kl(bra1_.size(), bra2_.size());\n            for (size_t k = 0; k < bra1_.size(); ++k) {\n                for (size_t l = 0; l < bra2_.size(); ++l) {\n                    Function<T, 2 * NDIM> kl = CompositeFactory<T, 2 * NDIM, NDIM>(world)\n                            .particle1(bra1_[k]).particle2(bra2_[l]);\n                    g_kl(k, l) = inner(f, kl);\n                }\n            }\n\n            // Eq. (A12)\n            // project out the mainly first particle: O1 (1 - 1/2 O2)\n            std::vector<Function<T, NDIM>> h2(bra1_.size());\n            std::vector<Function<T, NDIM>> h1(ket2_.size());\n            reconstruct(world, bra1_, false);\n            reconstruct(world, bra2_, true);\n            for (size_t k = 0; k < bra1_.size(); ++k) {\n\n                // project out the mainly first particle: O1 (1 - 1/2 O2): first term\n                // Eq. (A10)\n                h2[k] = f.project_out(bra1_[k], 0);\n\n                // project out the mainly second particle: O2 (1 - 1/2 O1): first term\n                // Eq. (A11)\n                std::size_t l = k;\n                h1[l] = f.project_out(bra2_[l], 1);\n\n            }\n\n            // Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i]\n            // project out the mainly first particle: O1 (1 - 1/2 O2): second term\n            // Eq. (A12), (A13)\n            h2 -= transform(world, ket2_, 0.5 * transpose(g_kl), false);   // ordering g(k,l) is correct\n            h1 -= transform(world, ket1_, 0.5 * g_kl, true);               // ordering g(k,l) is correct\n            // aka\n            // \tfor (size_t l=0; l<ket2_.size(); ++l) {\n            // \t\th2[k]-=0.5*g_kl(k,l)*ket2_[l];\n            // \t}\n\n            change_tree_state(h1, reconstructed, false);\n            change_tree_state(h2, reconstructed, false);\n            change_tree_state(ket1_, reconstructed, false);\n            change_tree_state(ket2_, reconstructed, false);\n            world.gop.fence();\n\n    \t    auto left=append(ket1_,h1);\n    \t    auto right=append(h2,ket2_);\n    \t    return std::make_pair(-1.0*left,right);\n        }\n\n        /// apply the strong orthogonality operator Q12 on a function f\n\n    \t/// notation of the equations follows\n    \t/// J. Chem. Phys., vol. 139, no. 11, p. 114106, 2013.\n        Function<T,2*NDIM> operator()(const Function<T,2*NDIM>& f) const {\n\n            // simple and it works for higher accuracies, but might be\n            // imprecise for lower accuracies\n//        \treturn (f-O1(f)-O2(f)+O1(O2(f))).truncate().reduce_rank();\n\n    \t    auto [left,right]=get_vectors_for_outer_product(f);\n\n    \t    // temporarily tighten the threshold\n            double thresh=FunctionDefaults<2*NDIM>::get_thresh();\n            double tight_thresh=thresh*0.1;\n            FunctionDefaults<2*NDIM>::set_thresh(tight_thresh);\n\n    \t    auto tmp=hartree_product(left,right);\n    \t    tmp.truncate(thresh*0.3);\n\n            FunctionDefaults<2*NDIM>::set_thresh(thresh);\n            Function<T, 2 * NDIM> result = copy(f);\n    \t    result+=tmp;\n            result.truncate(thresh).reduce_rank();\n            return result;\n        }\n\n    private:\n\n        /// the world\n        World& world;\n\n        /// the spaces of the projector of particles 1 and 2\n        std::vector<Function<T,NDIM> > ket1_, bra1_, ket2_, bra2_;\n\n    };\n\n\n    /// an outer product of two projectors\n    template<typename projT, typename projQ>\n    class OuterProjector : public ProjectorBase {\n        projT projector0;\n        projQ projector1;\n    public:\n\n        OuterProjector() = default;\n        OuterProjector(const projT& p0, const projQ& p1) : projector0(p0), projector1(p1) {\n            static_assert(std::is_base_of<ProjectorBase,projT>::value, \"projT must be a ProjectorBase\");\n            static_assert(std::is_base_of<ProjectorBase,projQ>::value, \"projQ must be a ProjectorBase\");\n            projector0.set_particle(0);\n            projector1.set_particle(1);\n        }\n\n        std::string type() const override {\n            return \"OuterProjector\";\n        }\n\n        template<typename resultT>\n        resultT operator()(const resultT& argument) const {\n\n            if (projector0.type()==\"PProjector\") return projector1(projector0(argument));\n            return projector0(projector1(argument));\n        }\n    };\n\n//    template<typename projT, typename projQ>\n//    OuterProjector<projT, projQ> outer(const projT& p0 , const projQ& p1) {\n//        return OuterProjector<projT, projQ>(p0, p1);\n//    }\n\n    template<typename projT, typename projQ>\n    typename std::enable_if<std::is_base_of<ProjectorBase,projT>::value, OuterProjector<projT,projQ>>::type\n    outer(const projT& p0 , const projQ& p1) {\n        return OuterProjector<projT, projQ>(p0, p1);\n    }\n}\n\n#endif /* PROJECTOR_H_ */\n"
  },
  {
    "path": "src/madness/chem/sto-3g",
    "content": "<?xml version=\"1.0\" ?>\n<name>\nSTO-3G\n</name>\n<basis symbol=\"H\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      3.425250910\n      0.623913730\n      0.168855400\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n</basis>\n<basis symbol=\"He\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      6.362421390\n      1.158923000\n      0.313649790\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Li\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     16.119575000\n      2.936200700\n      0.794650500\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.636289700\n      0.147860100\n      0.048088700\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Be\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     30.167871000\n      5.495115300\n      1.487192700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.314833100\n      0.305538900\n      0.099370700\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"B\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     48.791113000\n      8.887362200\n      2.405267000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.236956100\n      0.519820500\n      0.169061800\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"C\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     71.616837000\n     13.045096000\n      3.530512200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.941249400\n      0.683483100\n      0.222289900\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"N\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n     99.106169000\n     18.052312000\n      4.885660200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.780455900\n      0.878496600\n      0.285714400\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"O\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    130.709320000\n     23.808861000\n      6.443608300\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.033151300\n      1.169596100\n      0.380389000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"F\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    166.679130000\n     30.360812000\n      8.216820700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.464803200\n      1.502281200\n      0.488588500\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ne\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    207.015610000\n     37.708151000\n     10.205297000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      8.246315100\n      1.916266200\n      0.623229300\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Na\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    250.772430000\n     45.678511000\n     12.362388000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     12.040193000\n      2.797881900\n      0.909958000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.478740600\n      0.412564900\n      0.161475100\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Mg\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    299.237400000\n     54.506470000\n     14.751580000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     15.121820000\n      3.513987000\n      1.142857000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.395448000\n      0.389326000\n      0.152380000\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Al\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    351.421476700\n     64.011860670\n     17.324107610\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     18.899396210\n      4.391813233\n      1.428353970\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.395448293\n      0.389326532\n      0.152379766\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Si\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    407.797551400\n     74.280833050\n     20.103292290\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     23.193656060\n      5.389706871\n      1.752899952\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.478740622\n      0.412564880\n      0.161475098\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"P\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    468.365637800\n     85.313385590\n     23.089131560\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     28.032639580\n      6.514182577\n      2.118614352\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.743103231\n      0.486321377\n      0.190342891\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"S\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    533.125735900\n     97.109518300\n     26.281625420\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     33.329751730\n      7.745117521\n      2.518952599\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.029194274\n      0.566140052\n      0.221583379\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Cl\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    601.345613600\n    109.535854200\n     29.644676860\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     38.960418890\n      9.053563477\n      2.944499834\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.129386495\n      0.594093427\n      0.232524141\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ar\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    674.446518400\n    122.851275300\n     33.248349450\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     45.164243920\n     10.495199000\n      3.413364448\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.621366518\n      0.731354605\n      0.286247236\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"K\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    771.510368100\n    140.531576600\n     38.033328990\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     52.402039790\n     12.177107100\n      3.960373165\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.651583985\n      1.018782663\n      0.398744630\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.503982251\n      0.186001147\n      0.082140067\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ca\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    854.032495100\n    155.563085100\n     42.101441790\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     59.560299440\n     13.840532700\n      4.501370797\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.374706256\n      1.220531941\n      0.477707930\n    </exponents>\n    <scoefficients>\n     -0.21962037\n      0.22559543\n      0.90039843\n    </scoefficients>      \n    <pcoefficients>\n      0.01058760\n      0.59516701\n      0.46200101\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.455848976\n      0.168236941\n      0.074295207\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Sc\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n    941.662425000\n    171.524986200\n     46.421355160\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     67.176687710\n     15.610417540\n      5.076992278\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.698159231\n      1.433088313\n      0.552930024\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      0.551700068\n      0.168286106\n      0.064930011\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.630932838\n      0.232853898\n      0.102830736\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ti\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1033.571245000\n    188.266292600\n     50.952206010\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     75.251204600\n     17.486761620\n      5.687237606\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.395535474\n      1.645810296\n      0.635004777\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      1.645981194\n      0.502076728\n      0.193716810\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.712264025\n      0.262870220\n      0.116086261\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"V\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1130.762517000\n    205.969804100\n     55.743467110\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     83.783850110\n     19.469564930\n      6.332106784\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.141151276\n      1.873246881\n      0.722756883\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.964817927\n      0.904363968\n      0.348931734\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.712264025\n      0.262870220\n      0.116086261\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Cr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1232.320450000\n    224.468708200\n     60.749992510\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     92.774624230\n     21.558827490\n      7.011599810\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.899488096\n      2.104563782\n      0.812006134\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      4.241479241\n      1.293786360\n      0.499182999\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.754778054\n      0.278560571\n      0.123015285\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Mn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1337.153266000\n    243.564136500\n     65.917960620\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    102.022002100\n     23.707719230\n      7.710486098\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.701960922\n      2.349343572\n      0.906449787\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.426950461\n      1.655392868\n      0.638702032\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.670982286\n      0.247634663\n      0.109358078\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Fe\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1447.400411000\n    263.645791600\n     71.352840190\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    111.919489100\n     26.007682360\n      8.458505490\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      8.548569754\n      2.607586250\n      1.006087840\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.411803475\n      1.955804428\n      0.754610151\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.592115681\n      0.218527925\n      0.096504236\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Co\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1557.298704000\n    283.663902900\n     76.770522340\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    121.834474100\n     28.311711640\n      9.207847321\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      9.480851678\n      2.891961952\n      1.115808827\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      7.664527389\n      2.337925151\n      0.902044205\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.592115681\n      0.218527925\n      0.096504236\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ni\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1679.771028000\n    305.972389600\n     82.808069430\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    132.858889900\n     30.873548780\n     10.041036270\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     10.330743350\n      3.151206003\n      1.215833241\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      8.627722755\n      2.631730438\n      1.015403419\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.630932838\n      0.232853898\n      0.102830736\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Cu\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1801.806730000\n    328.201345000\n     88.824092280\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    144.121218400\n     33.490671730\n     10.892205880\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     11.307754020\n      3.449225397\n      1.330818388\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      9.647911930\n      2.942920654\n      1.135470278\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.630932838\n      0.232853898\n      0.102830736\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Zn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   1929.432301000\n    351.448502100\n     95.115680210\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    155.841675500\n     36.214253910\n     11.777999340\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     12.281527440\n      3.746257327\n      1.445422541\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     10.947370770\n      3.339297018\n      1.288404602\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.889713885\n      0.328360379\n      0.145007406\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ga\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2061.424532000\n    375.491051700\n    101.622532400\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    167.761868000\n     38.984250280\n     12.678888130\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     12.615055200\n      3.847993927\n      1.484675684\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     12.615055200\n      3.847993927\n      1.484675684\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.798524374\n      0.294705714\n      0.130145151\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ge\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2196.384229000\n    400.074129200\n    108.275672600\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    180.389038000\n     41.918533040\n     13.633207950\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     14.196656190\n      4.330432640\n      1.670815538\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     14.196656190\n      4.330432640\n      1.670815538\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.985832560\n      0.363834215\n      0.160673025\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"As\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2337.065673000\n    425.699429800\n    115.210879000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    193.197053500\n     44.894840400\n     14.601195480\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     15.871635840\n      4.841354819\n      1.867945198\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     15.871635840\n      4.841354819\n      1.867945198\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.107681464\n      0.408804124\n      0.180532211\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Se\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2480.626814000\n    451.849270800\n    122.288046400\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    206.157878000\n     47.906657270\n     15.580731800\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     17.639994140\n      5.380760465\n      2.076064666\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     17.639994140\n      5.380760465\n      2.076064666\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.214644297\n      0.448280136\n      0.197965235\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Br\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2629.997471000\n    479.057322400\n    129.651607000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    219.835025500\n     51.084932220\n     16.614405460\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     19.501731090\n      5.948649577\n      2.295173940\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     19.501731090\n      5.948649577\n      2.295173940\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.396037488\n      0.515225632\n      0.227529071\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Kr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2782.160055000\n    506.773927000\n    137.152801900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    233.951411800\n     54.365276810\n     17.681275330\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     21.456846710\n      6.545022156\n      2.525273021\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     21.456846710\n      6.545022156\n      2.525273021\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      1.590049336\n      0.586828205\n      0.259149523\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Rb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   2938.601529000\n    535.269937000\n    144.864934000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    248.507037000\n     57.747691000\n     18.781341000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     23.505340970\n      7.169878201\n      2.766361909\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     23.505340970\n      7.169878201\n      2.766361909\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.247796820\n      0.829578393\n      0.366350565\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.486993992\n      0.262216156\n      0.115825488\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Sr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3100.983951000\n    564.848097800\n    152.869938900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    263.501900700\n     61.232174930\n     19.914603720\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     25.578866920\n      7.802369707\n      3.010396794\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     25.578866920\n      7.802369707\n      3.010396794\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.461032403\n      0.908275734\n      0.401104140\n    </exponents>\n    <scoefficients>\n     -0.30884412\n      0.01960641\n      1.13103444\n    </scoefficients>      \n    <pcoefficients>\n     -0.12154686\n      0.57152276\n      0.54989495\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.437080480\n      0.235340816\n      0.103954177\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Y\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3266.026869000\n    594.910871000\n    161.006099000\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    277.937724000\n     64.586750000\n     21.005616000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     30.671326000\n      8.557222000\n      3.349239000\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.660043000\n      1.774715000\n      0.691295000\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.667688000\n      0.984544000\n      0.434785000\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.128212000\n      0.962594000\n      0.472861000\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.207424000\n      0.111685000\n      0.049333000\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Zr\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3435.348677000\n    625.753049800\n    169.353195800\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    293.783029200\n     68.268857970\n     22.203151440\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     30.732931030\n      9.374523538\n      3.616982618\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     30.732931030\n      9.374523538\n      3.616982618\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      2.827607815\n      1.101055827\n      0.484687486\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      0.486993992\n      0.262216156\n      0.115825488\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.887830189\n      0.345716474\n      0.152185243\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Nb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3610.742864000\n    657.701320100\n    177.999644500\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    310.067572800\n     72.053035690\n     23.433883480\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     33.019978580\n     10.072145940\n      3.886147028\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     33.019978580\n     10.072145940\n      3.886147028\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.144798430\n      1.224568208\n      0.539057940\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      1.344878866\n      0.523688859\n      0.230529125\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.486993992\n      0.262216156\n      0.115825488\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Mo\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3788.666115000\n    690.110262300\n    186.770769100\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    326.430956700\n     75.855534200\n     24.670574010\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     35.469481290\n     10.819322340\n      4.174430912\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     35.469481290\n     10.819322340\n      4.174430912\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.496895188\n      1.361672861\n      0.599411746\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      1.702112315\n      0.662793713\n      0.291763424\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.512962508\n      0.276198597\n      0.122001777\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Tc\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   3970.868257000\n    723.298609800\n    195.752831100\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    343.584632300\n     79.841679520\n     25.966992190\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     38.089919830\n     11.618639620\n      4.482832367\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     38.089919830\n     11.618639620\n      4.482832367\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      3.829752708\n      1.491285854\n      0.656467704\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.101373228\n      0.818263843\n      0.360201758\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.461699983\n      0.248596896\n      0.109809621\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ru\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4159.274210000\n    757.616989400\n    205.040723900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    360.798656100\n     83.841848430\n     27.267971270\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     40.717516780\n     12.420140440\n      4.792076302\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     40.717516780\n     12.420140440\n      4.792076302\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.197516371\n      1.634491118\n      0.719507014\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.390895761\n      0.931002417\n      0.409829556\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.413135485\n      0.222447917\n      0.098259157\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Rh\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4350.077794000\n    792.372100500\n    214.446813300\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    378.433426400\n     87.939789810\n     28.600748990\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     43.521794550\n     13.275534540\n      5.122113939\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     43.521794550\n     13.275534540\n      5.122113939\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.540857408\n      1.768186338\n      0.778359979\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      2.779066094\n      1.082153932\n      0.476366825\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.413135485\n      0.222447917\n      0.098259157\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Pd\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4545.160269000\n    827.906616800\n    224.063840200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    396.488943300\n     92.135503650\n     29.965325350\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     46.419450970\n     14.159412110\n      5.463141383\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     46.419450970\n     14.159412110\n      5.463141383\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      4.919104589\n      1.915473830\n      0.843196295\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      3.025977448\n      1.178299934\n      0.518690532\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.437080480\n      0.235340816\n      0.103954177\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Ag\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4744.521634000\n    864.220538300\n    233.891804500\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    414.965206900\n     96.428989950\n     31.361700350\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     49.410486050\n     15.071773140\n      5.815158634\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     49.410486050\n     15.071773140\n      5.815158634\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.290230450\n      2.059988316\n      0.906811928\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      3.283395668\n      1.278537254\n      0.562815247\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.437080480\n      0.235340816\n      0.103954177\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Cd\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   4950.261905000\n    901.696385600\n    244.034231300\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    433.446938500\n    100.723746900\n     32.758488610\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     52.592792350\n     16.042478000\n      6.189686744\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     52.592792350\n     16.042478000\n      6.189686744\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.674851796\n      2.209757875\n      0.972740857\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.15578745\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      3.642963976\n      1.418551290\n      0.624449770\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.594915098\n      0.320325000\n      0.141493186\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"In\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5158.224714000\n    939.577070700\n    254.286223100\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    452.331322300\n    105.112071600\n     34.185707990\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     55.975397690\n     17.074280440\n      6.587788204\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     55.975397690\n     17.074280440\n      6.587788204\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.048549180\n      1.965878882\n      0.865384724\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.048549180\n      1.965878882\n      0.865384724\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.566923061\n      0.305253019\n      0.134835626\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Sn\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5370.466413000\n    978.237161100\n    264.749152200\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    472.051532200\n    109.694624300\n     35.676096360\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     59.151411880\n     18.043066000\n      6.961575790\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     59.151411880\n     18.043066000\n      6.961575790\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      5.583138529\n      2.174045204\n      0.957020051\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      5.583138529\n      2.174045204\n      0.957020051\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.623581642\n      0.335760162\n      0.148311168\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Sb\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5586.987002000\n   1017.676657000\n    275.423018900\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    492.192488800\n    114.374949400\n     37.198283360\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     62.521797750\n     19.071141120\n      7.358239131\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     62.521797750\n     19.071141120\n      7.358239131\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.120693149\n      2.383366187\n      1.049163663\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.120693149\n      2.383366187\n      1.049163663\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.652922693\n      0.351558503\n      0.155289573\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Te\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   5810.061591000\n   1058.309972000\n    286.419979700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    512.754192000\n    119.153047100\n     38.752269000\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     65.985562270\n     20.127699700\n      7.765892279\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     65.985562270\n     20.127699700\n      7.765892279\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      6.707956921\n      2.612043655\n      1.149828048\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      6.707956921\n      2.612043655\n      1.149828048\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.701271348\n      0.377591265\n      0.166788702\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"I\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n   6035.183623000\n   1099.316231000\n    297.517873700\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n    533.736641800\n    124.028917100\n     40.338053280\n    </exponents>\n    <scoefficients>\n     -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>      \n    <pcoefficients>\n      0.15591628\n      0.60768372\n      0.39195739\n    </pcoefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n     69.542705450\n     21.212741750\n      8.184535234\n    </exponents>\n    <scoefficients>\n     -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>      \n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n     69.542705450\n     21.212741750\n      8.184535234\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.295991196\n      2.841021154\n      1.250624506\n    </exponents>\n    <scoefficients>\n     -0.33061006\n      0.05761095\n      1.11557874\n    </scoefficients>      \n    <pcoefficients>\n     -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>      \n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      7.295991196\n      2.841021154\n      1.250624506\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>      \n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.790036458\n      0.425385789\n      0.187900384\n    </exponents>\n    <scoefficients>\n     -0.38426426\n     -0.19725674\n      1.37549551\n    </scoefficients>      \n    <pcoefficients>\n     -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>      \n  </shell>\n</basis>\n<basis symbol=\"Xe\">\n  <shell type=\"S\" nprim=\"3\">\n    <exponents>\n      6264.58454600\n      1141.10189500\n      308.82670520\n    </exponents>\n    <coefficients>\n      0.15432897\n      0.53532814\n      0.44463454\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      555.13983810\n      129.00255970\n      41.95563620\n    </exponents>\n    <scoefficients>\n      -0.09996723\n      0.39951283\n      0.70011547\n    </scoefficients>\n    <pcoefficients>\n      0.15591627\n      0.60768372\n      0.39195739\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      73.07773504\n      22.29103845\n      8.60057562\n    </exponents>\n    <scoefficients>\n      -0.22776350\n      0.21754360\n      0.91667696\n    </scoefficients>\n    <pcoefficients>\n      0.00495151\n      0.57776647\n      0.48464604\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      7.90872828\n      3.07961780\n      1.35565534\n    </exponents>\n    <scoefficients>\n      -0.33061006\n      0.05761095\n      1.11557875\n    </scoefficients>\n    <pcoefficients>\n      -0.12839276\n      0.58520476\n      0.54394420\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"3\">\n    <exponents>\n      0.89101014\n      0.47975388\n      0.21191572\n    </exponents>\n    <scoefficients>\n      -0.38426426\n      -0.19725674\n      1.37549551\n    </scoefficients>\n    <pcoefficients>\n      -0.34816915\n      0.62903237\n      0.66628327\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      73.07773504\n      22.29103845\n      8.60057562\n    </exponents>\n    <coefficients>\n      0.21976795\n      0.65554736\n      0.28657326\n    </coefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"3\">\n    <exponents>\n      7.90872828\n      3.07961780\n      1.35565534\n    </exponents>\n    <coefficients>\n      0.12506621\n      0.66867856\n      0.30524682\n    </coefficients>\n  </shell>\n</basis>\n<atomicguess symbol=\"H\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     1.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000 \n   </betaocc>\n   <alphaeps>\n     0.11391 \n   </alphaeps>\n   <betaeps>\n    -0.16248 \n   </betaeps>\n   <alphavectors>\n     1.00000 \n   </alphavectors>\n   <betavectors>\n     1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"He\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000 \n   </betaocc>\n   <alphaeps>\n    -0.48864 \n   </alphaeps>\n   <betaeps>\n    -0.48864 \n   </betaeps>\n   <alphavectors>\n     1.00000 \n   </alphavectors>\n   <betavectors>\n     1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Li\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.03078     -0.19883      0.00000      0.00000      0.00000 \n    -0.19883      1.06511      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.88671      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.11328      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -1.72754     -0.07859      0.00270      0.00270      0.00270 \n   </alphaeps>\n   <betaeps>\n    -1.71598     -0.04439      0.03627      0.03627      0.03627 \n   </betaeps>\n   <alphavectors>\n     0.98393      0.30597      0.00000      0.00000      0.00000 \n     0.05968     -1.02868      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      0.00000     -1.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98446     -0.30427      0.00000      0.00000      0.00000 \n     0.05790      1.02878      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Be\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.14442     -0.55652      0.00000      0.00000      0.00000 \n    -0.55652      2.14442      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -3.57542     -0.12879      0.01861      0.01861      0.01861 \n   </alphaeps>\n   <betaeps>\n    -3.57542     -0.12879      0.01861      0.01861      0.01861 \n   </betaeps>\n   <alphavectors>\n    -0.98625     -0.31547      0.00000      0.00000      0.00000 \n    -0.04871      1.03433      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.98625     -0.31547      0.00000      0.00000      0.00000 \n     0.04871      1.03433      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"B\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.15643     -0.58079      0.00000      0.00000      0.00000 \n    -0.58079      2.15643      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.33333      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.33333      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.33333 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.33333      0.33333      0.33333 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00001      0.00001      0.00001 \n   </betaocc>\n   <alphaeps>\n    -6.08829     -0.21144      0.01879      0.01879      0.01879 \n   </alphaeps>\n   <betaeps>\n    -6.07221     -0.15890      0.07410      0.07410      0.07410 \n   </betaeps>\n   <alphavectors>\n     0.98732      0.32158      0.00000      0.00000      0.00000 \n     0.04378     -1.03745      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.00000 \n   </alphavectors>\n   <betavectors>\n     0.98789     -0.31982      0.00000      0.00000      0.00000 \n     0.04194      1.03752      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"C\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.13147     -0.52938      0.00000      0.00000      0.00000 \n    -0.52938      2.13149      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.66667      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.66667      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.66666 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.66667      0.66667      0.66666 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -9.48864     -0.40197     -0.07086     -0.07086     -0.07086 \n   </alphaeps>\n   <betaeps>\n    -9.45732     -0.29308      0.04262      0.04262      0.04263 \n   </betaeps>\n   <alphavectors>\n     0.99094      0.28944      0.00000      0.00000      0.00000 \n     0.03426     -1.03178      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.00000 \n   </alphavectors>\n   <betavectors>\n     0.99155     -0.28733      0.00000      0.00000      0.00000 \n     0.03206      1.03185      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"N\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.11695     -0.49756      0.00000      0.00000      0.00000 \n    -0.49756      2.11696      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -13.63110     -0.61525     -0.16723     -0.16723     -0.16723 \n   </alphaeps>\n   <betaeps>\n   -13.58360     -0.44497      0.00931      0.00931      0.00931 \n   </betaeps>\n   <alphavectors>\n    -0.99274     -0.27008      0.00000      0.00000      0.00000 \n    -0.02918      1.02841      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99332     -0.26794      0.00000      0.00000      0.00000 \n     0.02697      1.02847      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"O\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.11870     -0.50150      0.00000      0.00000      0.00000 \n    -0.50150      2.11871      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.33333      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.33333      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.33333 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.33333      0.33333      0.33333 \n   </betaocc>\n   <alphaeps>\n   -18.33305     -0.75425     -0.16616     -0.16616     -0.16615 \n   </alphaeps>\n   <betaeps>\n   -18.29820     -0.63847     -0.04596     -0.04596     -0.04596 \n   </betaeps>\n   <alphavectors>\n     0.99343      0.26916      0.00000      0.00000      0.00000 \n     0.02636     -1.02891      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000     -1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99372     -0.26808      0.00000      0.00000      0.00000 \n     0.02525      1.02894      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"F\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.12007     -0.50456      0.00000      0.00000      0.00000 \n    -0.50456      2.12009      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.66666      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.66666      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.66668 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.66668      0.66666      0.66666 \n   </betaocc>\n   <alphaeps>\n   -23.72693     -0.90234     -0.15540     -0.15540     -0.15540 \n   </alphaeps>\n   <betaeps>\n   -23.70789     -0.84251     -0.09322     -0.09322     -0.09322 \n   </betaeps>\n   <alphavectors>\n     0.99396      0.26849      0.00000      0.00000      0.00000 \n     0.02422     -1.02930      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000     -1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99407     -0.26806      0.00000      0.00000      0.00000 \n     0.02378      1.02931      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ne\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.12526     -0.51598      0.00000      0.00000      0.00000 \n    -0.51598      2.12525      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000 \n   </betaocc>\n   <alphaeps>\n   -29.70111     -1.02178     -0.09526     -0.09526     -0.09526 \n   </alphaeps>\n   <betaeps>\n   -29.70111     -1.02178     -0.09526     -0.09526     -0.09526 \n   </betaeps>\n   <alphavectors>\n     0.99416      0.27254      0.00000      0.00000      0.00000 \n     0.02302     -1.03058      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </alphavectors>\n   <betavectors>\n     0.99416     -0.27254      0.00000      0.00000      0.00000 \n     0.02302      1.03058      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Na\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.17419     -0.63899      0.00000      0.00000      0.00000      0.10388      0.00000      0.00000      0.00000 \n    -0.63899      2.35579      0.00000      0.00000      0.00000     -0.51205      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.56498      0.00000      0.00000      0.00000      0.37415      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.56498      0.00000      0.00000      0.00000      0.37415      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.56498      0.00000      0.00000      0.00000      0.37415 \n     0.10388     -0.51205      0.00000      0.00000      0.00000      1.28162      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.37415      0.00000      0.00000      0.00000      0.08949      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.37415      0.00000      0.00000      0.00000      0.08949      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.37415      0.00000      0.00000      0.00000      0.08949 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.93972      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.06028      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -37.35536     -1.89289     -0.84513     -0.84513     -0.84513      0.23693      0.51480      0.51480      0.51480 \n   </alphaeps>\n   <betaeps>\n   -37.34378     -1.88018     -0.83095     -0.83095     -0.83095      0.28084      0.55684      0.55684      0.55684 \n   </betaeps>\n   <alphavectors>\n     0.99243     -0.29849      0.00000     -0.00000     -0.00000     -0.16095     -0.00000      0.00000     -0.00000 \n     0.02686      0.98681     -0.00000      0.00000     -0.00000      0.63499     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.88203     -0.00000      0.00000     -0.00000     -0.00000     -0.70216 \n     0.00000     -0.00000      0.88203     -0.00000      0.00000     -0.00000      0.00000     -0.70216      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.88203      0.00000      0.70216      0.00000      0.00000 \n    -0.00803      0.10353     -0.00000      0.00000      0.00000     -1.12281      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.21553      0.00000     -0.00000      0.00000      0.00000      1.10660 \n    -0.00000      0.00000      0.21553      0.00000     -0.00000      0.00000     -0.00000      1.10660      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.21553     -0.00000     -1.10660      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99242     -0.29899      0.00000     -0.00000      0.00000      0.16005      0.00000     -0.00000     -0.00000 \n    -0.02687      0.98872     -0.00000      0.00000     -0.00000     -0.63200     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.88713     -0.00000      0.00000     -0.00000      0.00000      0.69572 \n     0.00000      0.00000      0.88713      0.00000     -0.00000      0.00000      0.69572     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.88713     -0.00000      0.00000      0.69572      0.00000 \n     0.00803      0.10013     -0.00000      0.00000     -0.00000      1.12312     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.20746     -0.00000     -0.00000     -0.00000      0.00000     -1.10814 \n    -0.00000     -0.00000      0.20746     -0.00000      0.00000     -0.00000     -1.10814      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.20746      0.00000     -0.00000     -1.10814      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mg\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.20235     -0.71328      0.00000      0.00000      0.00000      0.21567      0.00000      0.00000      0.00000 \n    -0.71328      2.52186      0.00000      0.00000      0.00000     -0.88614      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.72515      0.00000      0.00000      0.00000      0.30060      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.72515      0.00000      0.00000      0.00000      0.30060      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.72515      0.00000      0.00000      0.00000      0.30060 \n     0.21567     -0.88614      0.00000      0.00000      0.00000      2.31199      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.30060      0.00000      0.00000      0.00000      0.05238      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.30060      0.00000      0.00000      0.00000      0.05238      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.30060      0.00000      0.00000      0.00000      0.05238 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -45.36464     -2.61673     -1.37821     -1.37821     -1.37821      0.06831      0.34666      0.34666      0.34666 \n   </alphaeps>\n   <betaeps>\n   -45.36464     -2.61673     -1.37821     -1.37821     -1.37821      0.06831      0.34666      0.34666      0.34666 \n   </betaeps>\n   <alphavectors>\n    -0.99278      0.31366     -0.00000     -0.00000     -0.00000      0.13108     -0.00000     -0.00000      0.00000 \n    -0.02449     -1.00802      0.00000      0.00000      0.00000     -0.49419      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.92875      0.00000     -0.00000     -0.00000     -0.54410 \n    -0.00000      0.00000      0.92875      0.00000      0.00000      0.00000      0.54410      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.92875     -0.00000     -0.00000      0.00000      0.54410     -0.00000 \n     0.00571     -0.08601      0.00000      0.00000      0.00000      1.07171     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.16183     -0.00000      0.00000      0.00000      1.06416 \n     0.00000      0.00000      0.16183     -0.00000     -0.00000     -0.00000     -1.06416      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.16183      0.00000      0.00000     -0.00000     -1.06416      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99278      0.31366     -0.00000      0.00000     -0.00000     -0.13108     -0.00000      0.00000     -0.00000 \n    -0.02449     -1.00802     -0.00000      0.00000     -0.00000      0.49419      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.92875      0.00000     -0.00000     -0.00000      0.54410      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.92875     -0.00000     -0.00000      0.00000      0.54410 \n     0.00000      0.00000      0.00000      0.92875      0.00000      0.00000      0.00000      0.54410     -0.00000 \n     0.00571     -0.08601      0.00000     -0.00000      0.00000     -1.07171     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.16183     -0.00000      0.00000      0.00000     -1.06416     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.16183      0.00000      0.00000     -0.00000     -1.06416 \n    -0.00000     -0.00000     -0.00000      0.16183     -0.00000     -0.00000     -0.00000     -1.06416      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sc\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.33463     -0.92686      0.00000      0.00000      0.00000      0.24877      0.00000      0.00000      0.00000     -0.06140      0.00000      0.00000     -0.06140      0.00000     -0.06140      0.06379      0.00000      0.00000      0.00000 \n    -0.92686      2.57569      0.00000      0.00000      0.00000     -0.83071      0.00000      0.00000      0.00000      0.17381      0.00000      0.00000      0.17381      0.00000      0.17381     -0.13466      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.19074      0.00000      0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05912      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.19074      0.00000      0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05912      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.19074      0.00000      0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05912 \n     0.24877     -0.83071      0.00000      0.00000      0.00000      2.59681      0.00000      0.00000      0.00000     -0.37708      0.00000      0.00000     -0.37708      0.00000     -0.37708     -0.09050      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      2.09521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09389      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      2.09521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09389      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.63046      0.00000      0.00000      0.00000      2.09521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09389 \n    -0.06140      0.17381      0.00000      0.00000      0.00000     -0.37708      0.00000      0.00000      0.00000      0.71614      0.00000      0.00000      0.48198      0.00000      0.48198     -0.11760      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46832      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46831      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.06140      0.17381      0.00000      0.00000      0.00000     -0.37708      0.00000      0.00000      0.00000      0.48198      0.00000      0.00000      0.71614      0.00000      0.48197     -0.11760      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.46830      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.06140      0.17381      0.00000      0.00000      0.00000     -0.37708      0.00000      0.00000      0.00000      0.48198      0.00000      0.00000      0.48197      0.00000      0.71614     -0.11760      0.00000      0.00000      0.00000 \n     0.06379     -0.13466      0.00000      0.00000      0.00000     -0.09050      0.00000      0.00000      0.00000     -0.11760      0.00000      0.00000     -0.11760      0.00000     -0.11760      0.05130      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.05912      0.00000      0.00000      0.00000      0.09389      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09895      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05912      0.00000      0.00000      0.00000      0.09389      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09895      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05912      0.00000      0.00000      0.00000      0.09389      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09895 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.14865      0.14865      0.14865      0.14864      0.14864      0.07177      0.07177      0.07177      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00746      0.00746      0.00746      0.00746      0.00746      0.00139      0.00139      0.00139      0.00000 \n   </betaocc>\n   <alphaeps>\n  -158.64070    -17.05630    -14.36178    -14.36178    -14.36178     -2.14001     -1.39483     -1.39483     -1.39483     -0.18866      0.00385      0.00385      0.00385      0.00385      0.00385      0.00980      0.00980      0.00980      0.16066 \n   </alphaeps>\n   <betaeps>\n  -158.64030    -17.05582    -14.36127    -14.36127    -14.36127     -2.13514     -1.38922     -1.38922     -1.38922     -0.16923      0.02354      0.02354      0.02354      0.02354      0.02354      0.03141      0.03141      0.03141      0.17251 \n   </betaeps>\n   <alphavectors>\n    -0.99159      0.40443      0.00000      0.00000      0.00000     -0.13670      0.00000     -0.00000      0.00000     -0.04290      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03610 \n    -0.02263     -1.04452      0.00000      0.00000      0.00000      0.42169     -0.00000      0.00000     -0.00000      0.13697     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.12031 \n     0.00000      0.00000      0.00000     -0.98495      0.00000     -0.00000     -0.00000      0.35233     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.15797     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.98495     -0.00000     -0.00000     -0.00000     -0.35233     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.15797     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.98495      0.00000      0.00000     -0.00000      0.35233      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.15797      0.00000      0.00000 \n     0.00415     -0.08337      0.00000      0.00000      0.00000     -1.05533      0.00000     -0.00000      0.00000     -0.42385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.26314 \n     0.00000      0.00000      0.00000     -0.04725      0.00000      0.00000      0.00000     -1.01580      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.56175      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.04725      0.00000      0.00000      0.00000      1.01580      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.56175      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.04725      0.00000      0.00000      0.00000     -1.01580     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.56175     -0.00000     -0.00000 \n     0.00155     -0.02669      0.00000      0.00000      0.00000     -0.02812     -0.00000     -0.00000      0.00000      0.50436      0.17152     -0.98518      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.24577 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00155     -0.02669      0.00000      0.00000      0.00000     -0.02812      0.00000     -0.00000      0.00000      0.50436      0.76743      0.64113      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.24577 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000      0.00000 \n     0.00155     -0.02669      0.00000      0.00000      0.00000     -0.02812      0.00000     -0.00000     -0.00000      0.50436     -0.93895      0.34405     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.24577 \n    -0.00480      0.08241      0.00000      0.00000      0.00000      0.07311      0.00000      0.00000      0.00000     -0.04750      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -5.23297 \n     0.00000      0.00000      0.00000      0.01178      0.00000     -0.00000      0.00000     -0.07095     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.10381     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.01178     -0.00000      0.00000      0.00000      0.07095      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.10381      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.01178      0.00000      0.00000     -0.00000     -0.07095     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.10381     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99159     -0.40443     -0.00000      0.00000     -0.00000      0.13679     -0.00000     -0.00000     -0.00000      0.04195     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03679 \n    -0.02263      1.04453     -0.00000      0.00000     -0.00000     -0.42201      0.00000      0.00000      0.00000     -0.13388      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.12254 \n    -0.00000     -0.00000     -0.00000     -0.98496     -0.00000     -0.00000      0.00000      0.35286      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15673     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.98496      0.00000     -0.00000     -0.00000     -0.35286     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.15673     -0.00000 \n    -0.00000     -0.00000      0.98496      0.00000     -0.00000      0.00000      0.35286     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.15673      0.00000     -0.00000     -0.00000 \n     0.00415      0.08333      0.00000     -0.00000      0.00000      1.05627     -0.00000     -0.00000     -0.00000      0.41690     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.27039 \n     0.00000      0.00000      0.00000     -0.04722      0.00000      0.00000     -0.00000     -1.01775     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.55820      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.04722     -0.00000      0.00000      0.00000      1.01775      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.55820      0.00000 \n     0.00000      0.00000      0.04722     -0.00000      0.00000     -0.00000     -1.01775      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.55820      0.00000      0.00000      0.00000 \n     0.00155      0.02668      0.00000     -0.00000      0.00000      0.03016     -0.00000     -0.00000      0.00000     -0.55002     -0.00000      0.00000     -0.86811      0.00000     -0.49637      0.00000      0.00000     -0.00000     -2.23499 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00155      0.02668      0.00000     -0.00000      0.00000      0.03016     -0.00000     -0.00000     -0.00000     -0.55002      0.00000     -0.00000      0.00418     -0.00000      0.99999     -0.00000     -0.00000      0.00000     -2.23499 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00155      0.02668      0.00000     -0.00000      0.00000      0.03016     -0.00000     -0.00000      0.00000     -0.55002     -0.00000     -0.00000      0.86393      0.00000     -0.50362      0.00000      0.00000     -0.00000     -2.23500 \n    -0.00480     -0.08236     -0.00000      0.00000     -0.00000     -0.07949      0.00000      0.00000     -0.00000      0.15414     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      5.23083 \n    -0.00000     -0.00000     -0.00000      0.01177     -0.00000     -0.00000      0.00000     -0.06710      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.10405     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.01177      0.00000     -0.00000     -0.00000      0.06710     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.10405      0.00000 \n    -0.00000     -0.00000     -0.01177      0.00000     -0.00000      0.00000     -0.06710     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.10405      0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ti\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.34057     -0.93192      0.00000      0.00000      0.00000      0.21154      0.00000      0.00000      0.00000      0.06077      0.00000      0.00000      0.06077      0.00000      0.06077     -0.16755      0.00000      0.00000      0.00000 \n    -0.93192      2.56375      0.00000      0.00000      0.00000     -0.78770      0.00000      0.00000      0.00000     -0.11665      0.00000      0.00000     -0.11665      0.00000     -0.11665      0.43094      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.20009      0.00000      0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.20009      0.00000      0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06816      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.20009      0.00000      0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06816 \n     0.21154     -0.78770      0.00000      0.00000      0.00000      3.00957      0.00000      0.00000      0.00000     -0.19415      0.00000      0.00000     -0.19415      0.00000     -0.19415     -0.44651      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      2.08661      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13653      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      2.08661      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13653      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.64458      0.00000      0.00000      0.00000      2.08661      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13653 \n     0.06077     -0.11665      0.00000      0.00000      0.00000     -0.19415      0.00000      0.00000      0.00000      0.47232      0.00000      0.00000     -0.12745      0.00000     -0.12743     -0.39038      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19948      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19956      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06077     -0.11665      0.00000      0.00000      0.00000     -0.19415      0.00000      0.00000      0.00000     -0.12745      0.00000      0.00000      0.47233      0.00000     -0.12744     -0.39038      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19951      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06077     -0.11665      0.00000      0.00000      0.00000     -0.19415      0.00000      0.00000      0.00000     -0.12743      0.00000      0.00000     -0.12744      0.00000      0.47231     -0.39038      0.00000      0.00000      0.00000 \n    -0.16755      0.43094      0.00000      0.00000      0.00000     -0.44651      0.00000      0.00000      0.00000     -0.39038      0.00000      0.00000     -0.39038      0.00000     -0.39038      3.42109      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000      0.13653      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00963      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000      0.13653      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00963      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06816      0.00000      0.00000      0.00000      0.13653      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00963 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.39985      0.39984      0.39983      0.39982      0.39982      0.00027      0.00027      0.00027      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00001      0.00001      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -175.61000    -19.28605    -16.41208    -16.41208    -16.41208     -2.31568     -1.48506     -1.48506     -1.48506     -0.11022      0.04885      0.04885      0.04885      0.04885      0.04885      0.09420      0.09420      0.09420      0.91908 \n   </alphaeps>\n   <betaeps>\n  -175.61010    -19.28395    -16.41060    -16.41060    -16.41060     -2.27604     -1.44260     -1.44260     -1.44260     -0.07859      0.10659      0.10659      0.10659      0.10659      0.10659      0.12765      0.12765      0.12765      0.95682 \n   </betaeps>\n   <alphavectors>\n     0.99151      0.40438     -0.00000     -0.00000      0.00000      0.14741     -0.00000     -0.00000      0.00000      0.04419     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.12616 \n     0.02285     -1.02814      0.00000      0.00000     -0.00000     -0.45293      0.00000      0.00000     -0.00000     -0.13891      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.43448 \n    -0.00000     -0.00000      0.00000      0.98623      0.00000      0.00000      0.00000      0.35652      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.15756      0.00000      0.00000 \n     0.00000      0.00000     -0.98623      0.00000      0.00000     -0.00000      0.35652     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.15756      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.98623      0.00000      0.00000     -0.00000      0.35652      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.15756      0.00000 \n    -0.00979     -0.17631      0.00000      0.00000     -0.00000      1.16251     -0.00000      0.00000     -0.00000      0.35224     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      2.09614 \n     0.00000      0.00000      0.00000      0.04256     -0.00000     -0.00000     -0.00000     -1.01914     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.55417      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.04256      0.00000      0.00000     -0.00000     -1.01914      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.55417     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.04256     -0.00000     -0.00000      0.00000     -1.01914     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.55417     -0.00000 \n     0.00545      0.08701     -0.00000     -0.00000      0.00000     -0.10131     -0.00000     -0.00000      0.00000      0.10966     -0.00000     -0.66775      0.00000      0.74439     -0.00000      0.00000      0.00000     -0.00000     -1.94892 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00545      0.08701     -0.00000     -0.00000      0.00000     -0.10131      0.00000     -0.00000      0.00000      0.10966      0.00000      0.97853     -0.00000      0.20609      0.00000     -0.00000     -0.00000      0.00000     -1.94892 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00545      0.08701     -0.00000     -0.00000      0.00000     -0.10131     -0.00000     -0.00000      0.00000      0.10966     -0.00000     -0.31079     -0.00000     -0.95048     -0.00000      0.00000      0.00000     -0.00000     -1.94892 \n    -0.00706     -0.11048      0.00000      0.00000     -0.00000      0.14980      0.00000      0.00000     -0.00000     -1.26292      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.91630 \n    -0.00000     -0.00000     -0.00000     -0.01022      0.00000      0.00000     -0.00000     -0.07014      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.10047      0.00000      0.00000 \n     0.00000      0.00000      0.01022     -0.00000     -0.00000      0.00000     -0.07014      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.10047     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.01022      0.00000     -0.00000      0.00000     -0.07014      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.10047      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99151     -0.40443     -0.00000      0.00000     -0.00000      0.14808     -0.00000     -0.00000     -0.00000      0.04108      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.12625 \n    -0.02285      1.02830     -0.00000      0.00000     -0.00000     -0.45531      0.00000      0.00000      0.00000     -0.12840     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.43483 \n     0.00000      0.00000      0.00000      0.98632      0.00000     -0.00000      0.00000      0.35707      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.15573     -0.00000      0.00000 \n     0.00000      0.00000      0.98632     -0.00000      0.00000      0.00000     -0.35707     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.15573     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.98632     -0.00000      0.00000      0.00000      0.35707      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.15573     -0.00000 \n     0.00979      0.17578      0.00000     -0.00000      0.00000      1.17426     -0.00000     -0.00000     -0.00000      0.30496      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      2.09705 \n    -0.00000     -0.00000     -0.00000      0.04228     -0.00000      0.00000     -0.00000     -1.02190     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.54909     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.04228      0.00000     -0.00000     -0.00000      1.02190      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.54909      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.04228      0.00000     -0.00000     -0.00000     -1.02190     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.54909      0.00000 \n    -0.00545     -0.08679     -0.00000      0.00000     -0.00000     -0.11094      0.00000      0.00000      0.00000      0.15074     -0.00000     -0.74441     -0.00000     -0.66773      0.00000      0.00000      0.00000      0.00000     -1.94566 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000     -0.00000      0.00000 \n    -0.00545     -0.08679     -0.00000      0.00000     -0.00000     -0.11094      0.00000      0.00000      0.00000      0.15074     -0.00000     -0.20607      0.00000      0.97854     -0.00000      0.00000     -0.00000     -0.00000     -1.94566 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00545     -0.08679     -0.00000      0.00000     -0.00000     -0.11094      0.00000      0.00000      0.00000      0.15074      0.00000      0.95047     -0.00000     -0.31081      0.00000     -0.00000     -0.00000      0.00000     -1.94566 \n     0.00706      0.11024      0.00000     -0.00000      0.00000      0.16096     -0.00000     -0.00000     -0.00000     -1.32413      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      2.88843 \n     0.00000      0.00000      0.00000     -0.01017      0.00000     -0.00000      0.00000     -0.06466      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.10080      0.00000      0.00000 \n     0.00000      0.00000     -0.01017     -0.00000      0.00000      0.00000      0.06466     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.10080     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.01017     -0.00000      0.00000      0.00000     -0.06466      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.10080     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"V\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.34879     -0.94238      0.00000      0.00000      0.00000      0.17626      0.00000      0.00000      0.00000      0.05939      0.00000      0.00000      0.05939      0.00000      0.05939     -0.12198      0.00000      0.00000      0.00000 \n    -0.94238      2.56279      0.00000      0.00000      0.00000     -0.71853      0.00000      0.00000      0.00000     -0.11349      0.00000      0.00000     -0.11349      0.00000     -0.11349      0.33405      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.20952      0.00000      0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07186      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.20952      0.00000      0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07186      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.20952      0.00000      0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07186 \n     0.17626     -0.71853      0.00000      0.00000      0.00000      3.16327      0.00000      0.00000      0.00000     -0.19954      0.00000      0.00000     -0.19954      0.00000     -0.19954     -0.49526      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      2.08731      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15705      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      2.08731      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15705      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.66018      0.00000      0.00000      0.00000      2.08731      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15705 \n     0.05939     -0.11349      0.00000      0.00000      0.00000     -0.19954      0.00000      0.00000      0.00000      0.62954      0.00000      0.00000     -0.26102      0.00000     -0.26102     -0.15612      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.78122      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.78122      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.05939     -0.11349      0.00000      0.00000      0.00000     -0.19954      0.00000      0.00000      0.00000     -0.26102      0.00000      0.00000      0.62956      0.00000     -0.26104     -0.15612      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.78118      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.05939     -0.11349      0.00000      0.00000      0.00000     -0.19954      0.00000      0.00000      0.00000     -0.26102      0.00000      0.00000     -0.26104      0.00000      0.62956     -0.15612      0.00000      0.00000      0.00000 \n    -0.12198      0.33405      0.00000      0.00000      0.00000     -0.49526      0.00000      0.00000      0.00000     -0.15612      0.00000      0.00000     -0.15612      0.00000     -0.15612      2.53836      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07186      0.00000      0.00000      0.00000      0.15705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02503      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07186      0.00000      0.00000      0.00000      0.15705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02503      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07186      0.00000      0.00000      0.00000      0.15705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02503 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.59374      0.59374      0.59373      0.59373      0.59371      0.01045      0.01045      0.01045      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -193.29460    -21.49575    -18.46861    -18.46861    -18.46861     -2.47276     -1.56626     -1.56626     -1.56626     -0.08937      0.07892      0.07892      0.07892      0.07892      0.07892      0.11494      0.11494      0.11494      1.27684 \n   </alphaeps>\n   <betaeps>\n  -193.29440    -21.48422    -18.46002    -18.46002    -18.46002     -2.37783     -1.46988     -1.46988     -1.46988     -0.06182      0.14454      0.14454      0.14454      0.17868      0.17868      0.17868      0.17868      0.17868      1.34368 \n   </betaeps>\n   <alphavectors>\n     0.99157      0.40783     -0.00000     -0.00000      0.00000     -0.15124     -0.00000     -0.00000      0.00000     -0.04471     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.14056 \n     0.02260     -1.02386     -0.00000     -0.00000     -0.00000      0.46201     -0.00000     -0.00000     -0.00000      0.13904      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.51228 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.98723     -0.00000     -0.00000      0.00000      0.36075      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.14639     -0.00000 \n     0.00000     -0.00000     -0.98723     -0.00000     -0.00000     -0.00000     -0.00000     -0.36075     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.14639     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.98723     -0.00000     -0.00000     -0.36075     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.14639      0.00000      0.00000 \n    -0.01245     -0.23174      0.00000      0.00000      0.00000     -1.18839      0.00000      0.00000      0.00000     -0.34649     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -3.02027 \n    -0.00000      0.00000      0.00000      0.00000     -0.03868     -0.00000     -0.00000      0.00000     -1.02091     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.50066     -0.00000 \n    -0.00000      0.00000     -0.03868      0.00000      0.00000      0.00000      0.00000      1.02091      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.50066      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.03868      0.00000      0.00000      1.02091      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.50066      0.00000     -0.00000 \n     0.00497      0.08535     -0.00000     -0.00000     -0.00000      0.07832     -0.00000     -0.00000      0.00000     -0.04121     -0.00000     -0.00000      0.00000     -0.00000      1.00000     -0.00000      0.00000     -0.00000      1.72384 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00497      0.08535     -0.00000     -0.00000      0.00000      0.07832     -0.00000     -0.00000      0.00000     -0.04121     -0.00000     -0.00000      0.86603      0.00000     -0.50000      0.00000     -0.00000      0.00000      1.72384 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00497      0.08535     -0.00000     -0.00000     -0.00000      0.07832     -0.00000     -0.00000     -0.00000     -0.04121     -0.00000     -0.00000     -0.86603      0.00000     -0.50000      0.00000     -0.00000      0.00000      1.72384 \n    -0.00312     -0.05214      0.00000      0.00000     -0.00000     -0.07424      0.00000      0.00000     -0.00000      1.10749      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.42349 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00811      0.00000      0.00000     -0.00000     -0.07855      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.07550      0.00000 \n     0.00000     -0.00000      0.00811     -0.00000     -0.00000     -0.00000     -0.00000      0.07855     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.07550     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00811     -0.00000     -0.00000      0.07855     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.07550      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99157      0.40801     -0.00000      0.00000     -0.00000     -0.15153      0.00000      0.00000     -0.00000     -0.04167      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.14064 \n    -0.02260     -1.02446      0.00000     -0.00000      0.00000      0.46345     -0.00000     -0.00000      0.00000      0.12803     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.51267 \n     0.00000     -0.00000      0.00000     -0.00000      0.98752      0.00000     -0.00000      0.00000      0.35964     -0.00000      0.00000      0.00000      0.14718     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.98752     -0.00000     -0.00000      0.00000     -0.35964     -0.00000     -0.00000     -0.00000      0.14718      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.98752      0.00000      0.00000      0.00000     -0.35964      0.00000      0.00000     -0.00000     -0.14718     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.01245     -0.22953      0.00000     -0.00000     -0.00000     -1.20190      0.00000      0.00000     -0.00000     -0.28228      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      3.02178 \n     0.00000     -0.00000      0.00000     -0.00000      0.03784      0.00000     -0.00000      0.00000     -1.01956     -0.00000      0.00000      0.00000     -0.50348      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.03784      0.00000      0.00000     -0.00000      1.01956      0.00000      0.00000      0.00000     -0.50348      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.03784     -0.00000     -0.00000     -0.00000      1.01956     -0.00000     -0.00000      0.00000      0.50348      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00497      0.08461     -0.00000      0.00000      0.00000      0.08608     -0.00000     -0.00000     -0.00000     -0.07808      0.00000     -0.00000     -0.00000     -1.00000     -0.00000      0.00000      0.00000      0.00000     -1.72223 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000 \n    -0.00497      0.08461     -0.00000      0.00000     -0.00000      0.08608     -0.00000     -0.00000      0.00000     -0.07808      0.00000     -0.00000      0.00000      0.50000     -0.00000     -0.86603     -0.00000     -0.00000     -1.72223 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00497      0.08461     -0.00000      0.00000     -0.00000      0.08608     -0.00000     -0.00000      0.00000     -0.07808      0.00000     -0.00000      0.00000      0.50000      0.00000      0.86603     -0.00000     -0.00000     -1.72223 \n     0.00312     -0.05174      0.00000     -0.00000      0.00000     -0.08100      0.00000      0.00000      0.00000      1.13769     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.39911 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00795     -0.00000      0.00000     -0.00000     -0.08151      0.00000     -0.00000     -0.00000      1.07528      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00795     -0.00000     -0.00000      0.00000      0.08151     -0.00000     -0.00000     -0.00000      1.07528     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00795      0.00000      0.00000      0.00000      0.08151      0.00000      0.00000     -0.00000     -1.07528     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cr\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.35677     -0.95184      0.00000      0.00000      0.00000      0.11680      0.00000      0.00000      0.00000      0.08338      0.00000      0.00000      0.08338      0.00000      0.08338     -0.11514      0.00000      0.00000      0.00000 \n    -0.95184      2.55926      0.00000      0.00000      0.00000     -0.59873      0.00000      0.00000      0.00000     -0.16238      0.00000      0.00000     -0.16238      0.00000     -0.16238      0.31963      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.21681      0.00000      0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06543      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.21681      0.00000      0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06543      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.21681      0.00000      0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06543 \n     0.11680     -0.59873      0.00000      0.00000      0.00000      3.40459      0.00000      0.00000      0.00000     -0.26226      0.00000      0.00000     -0.26226      0.00000     -0.26226     -0.49559      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      2.10073      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13877      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      2.10073      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13877      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.67388      0.00000      0.00000      0.00000      2.10073      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13877 \n     0.08338     -0.16238      0.00000      0.00000      0.00000     -0.26226      0.00000      0.00000      0.00000      0.79971      0.00000      0.00000     -0.32966      0.00000     -0.32966     -0.11915      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08338     -0.16238      0.00000      0.00000      0.00000     -0.26226      0.00000      0.00000      0.00000     -0.32966      0.00000      0.00000      0.79971      0.00000     -0.32966     -0.11915      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25871      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.08338     -0.16238      0.00000      0.00000      0.00000     -0.26226      0.00000      0.00000      0.00000     -0.32966      0.00000      0.00000     -0.32966      0.00000      0.79970     -0.11915      0.00000      0.00000      0.00000 \n    -0.11514      0.31963      0.00000      0.00000      0.00000     -0.49559      0.00000      0.00000      0.00000     -0.11915      0.00000      0.00000     -0.11915      0.00000     -0.11915      2.37473      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.06543      0.00000      0.00000      0.00000      0.13877      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10484      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.06543      0.00000      0.00000      0.00000      0.13877      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10484      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06543      0.00000      0.00000      0.00000      0.13877      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10484 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.75290      0.75290      0.75290      0.75290      0.75290      0.07843      0.07843      0.07843      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00006      0.00006      0.00006      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -211.84990    -23.83779    -20.66141    -20.66141    -20.66141     -2.68087     -1.69643     -1.69643     -1.69643     -0.08924      0.09665      0.09665      0.09665      0.09665      0.09665      0.12634      0.12634      0.12634      1.70843 \n   </alphaeps>\n   <betaeps>\n  -211.84910    -23.81050    -20.64084    -20.64084    -20.64084     -2.53411     -1.55023     -1.55023     -1.55023     -0.05801      0.16050      0.16050      0.16050      0.23986      0.23986      0.23986      0.23986      0.23986      1.80268 \n   </betaeps>\n   <alphavectors>\n    -0.99166      0.41137      0.00000     -0.00000      0.00000     -0.15401     -0.00000      0.00000      0.00000     -0.04571     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.14823 \n    -0.02231     -1.02009     -0.00000      0.00000     -0.00000      0.46822      0.00000     -0.00000     -0.00000      0.14107      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.58556 \n    -0.00000     -0.00000     -0.98796      0.00000      0.00000     -0.00000      0.00000     -0.36337      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.14213     -0.00000 \n    -0.00000      0.00000      0.00000     -0.98796      0.00000      0.00000     -0.36337      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.14213      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.98796      0.00000     -0.00000      0.00000      0.36337      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.14213      0.00000      0.00000      0.00000 \n     0.01627     -0.31392     -0.00000      0.00000      0.00000     -1.22478      0.00000     -0.00000      0.00000     -0.34853     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      4.43533 \n     0.00000      0.00000     -0.03607     -0.00000     -0.00000      0.00000     -0.00000      1.02234     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.47950      0.00000 \n     0.00000     -0.00000     -0.00000     -0.03607     -0.00000     -0.00000      1.02234     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.47950      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.03607     -0.00000     -0.00000      0.00000     -1.02234      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.47950     -0.00000     -0.00000     -0.00000 \n    -0.00632      0.11522      0.00000     -0.00000      0.00000      0.08684     -0.00000      0.00000     -0.00000     -0.02555      0.50000      0.86603      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.20806 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000 \n    -0.00632      0.11522      0.00000     -0.00000      0.00000      0.08684     -0.00000      0.00000      0.00000     -0.02555      0.50000     -0.86603     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -2.20806 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00632      0.11522      0.00000     -0.00000     -0.00000      0.08684     -0.00000      0.00000     -0.00000     -0.02555     -1.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -2.20806 \n     0.00228     -0.04042     -0.00000      0.00000     -0.00000     -0.06006      0.00000     -0.00000     -0.00000      1.07719     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.11815 \n    -0.00000     -0.00000      0.00705      0.00000      0.00000     -0.00000      0.00000      0.08243      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.06608     -0.00000 \n    -0.00000      0.00000      0.00000      0.00705      0.00000      0.00000      0.08243      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.06608     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00705      0.00000      0.00000     -0.00000     -0.08243     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.06608     -0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99166     -0.41170      0.00000      0.00000     -0.00000     -0.15350     -0.00000     -0.00000      0.00000     -0.04354     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.14849 \n    -0.02231      1.02120     -0.00000     -0.00000      0.00000      0.46717      0.00000      0.00000     -0.00000      0.13211      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.58656 \n    -0.00000      0.00000     -0.00000      0.98844      0.00000     -0.00000     -0.00000     -0.36071      0.00000      0.00000     -0.00000      0.14553      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.98844     -0.00000     -0.00000     -0.00000     -0.36071     -0.00000      0.00000     -0.00000      0.14553     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.98844     -0.00000      0.00000     -0.00000     -0.36071      0.00000      0.00000      0.00000      0.14553     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.01627      0.30879     -0.00000     -0.00000     -0.00000     -1.23031     -0.00000     -0.00000      0.00000     -0.27376     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.43940 \n     0.00000     -0.00000      0.00000      0.03469     -0.00000      0.00000      0.00000      1.01735     -0.00000     -0.00000      0.00000     -0.49010     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.03469      0.00000      0.00000      0.00000      1.01735      0.00000     -0.00000      0.00000     -0.49010      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.03469     -0.00000      0.00000     -0.00000      1.01735      0.00000     -0.00000     -0.00000     -0.49010      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00632     -0.11342      0.00000      0.00000     -0.00000      0.09037      0.00000     -0.00000      0.00000     -0.06493     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.86603     -0.50000     -2.20721 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.73205      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00632     -0.11342      0.00000      0.00000     -0.00000      0.09037      0.00000     -0.00000     -0.00000     -0.06493     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.86603     -0.50000     -2.20721 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00632     -0.11342      0.00000      0.00000      0.00000      0.09037      0.00000     -0.00000     -0.00000     -0.06493     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.00000     -2.20721 \n     0.00228      0.03985     -0.00000     -0.00000      0.00000     -0.06624     -0.00000      0.00000     -0.00000      1.09689      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.09849 \n     0.00000     -0.00000      0.00000     -0.00676      0.00000     -0.00000     -0.00000      0.09349      0.00000      0.00000     -0.00000      1.06517      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00676     -0.00000     -0.00000     -0.00000      0.09349     -0.00000      0.00000     -0.00000      1.06517      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00676      0.00000     -0.00000      0.00000      0.09349     -0.00000     -0.00000     -0.00000      1.06517     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mn\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.36542     -0.96522      0.00000      0.00000      0.00000      0.08562      0.00000      0.00000      0.00000      0.09153      0.00000      0.00000      0.09153      0.00000      0.09153     -0.09766      0.00000      0.00000      0.00000 \n    -0.96522      2.57155      0.00000      0.00000      0.00000     -0.55184      0.00000      0.00000      0.00000     -0.16991      0.00000      0.00000     -0.16991      0.00000     -0.16991      0.28996      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.22975      0.00000      0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04418      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.22975      0.00000      0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04418      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.22975      0.00000      0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04418 \n     0.08562     -0.55184      0.00000      0.00000      0.00000      3.80865      0.00000      0.00000      0.00000     -0.39116      0.00000      0.00000     -0.39116      0.00000     -0.39116     -0.83376      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      2.15818      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08516      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      2.15818      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08516      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.70361      0.00000      0.00000      0.00000      2.15818      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08516 \n     0.09153     -0.16991      0.00000      0.00000      0.00000     -0.39116      0.00000      0.00000      0.00000      0.94675      0.00000      0.00000     -0.37726      0.00000     -0.37725      0.13942      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.64801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.64801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.09153     -0.16991      0.00000      0.00000      0.00000     -0.39116      0.00000      0.00000      0.00000     -0.37726      0.00000      0.00000      0.94675      0.00000     -0.37726      0.13942      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.64801      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.09153     -0.16991      0.00000      0.00000      0.00000     -0.39116      0.00000      0.00000      0.00000     -0.37725      0.00000      0.00000     -0.37726      0.00000      0.94675      0.13942      0.00000      0.00000      0.00000 \n    -0.09766      0.28996      0.00000      0.00000      0.00000     -0.83376      0.00000      0.00000      0.00000      0.13942      0.00000      0.00000      0.13942      0.00000      0.13942      2.06224      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.04418      0.00000      0.00000      0.00000      0.08516      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22398      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.04418      0.00000      0.00000      0.00000      0.08516      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22398      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.04418      0.00000      0.00000      0.00000      0.08516      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22398 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.88267      0.88267      0.88267      0.88267      0.88267      0.19534      0.19534      0.19534      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00021      0.00021      0.00021      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -231.39080    -26.42665    -23.10092    -23.10092    -23.10092     -3.02321     -1.95423     -1.95423     -1.95423     -0.15694      0.01190      0.01190      0.01190      0.01190      0.01190      0.04084      0.04084      0.04084      1.88064 \n   </alphaeps>\n   <betaeps>\n  -231.38950    -26.38200    -23.06697    -23.06697    -23.06697     -2.83277     -1.76496     -1.76496     -1.76496     -0.11923      0.07859      0.07859      0.07859      0.19713      0.19713      0.19713      0.19713      0.19713      2.00046 \n   </betaeps>\n   <alphavectors>\n    -0.99193      0.41538      0.00000     -0.00000     -0.00000      0.15613      0.00000     -0.00000     -0.00000     -0.04408      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.14212 \n    -0.02151     -1.02109     -0.00000      0.00000      0.00000     -0.47281      0.00000      0.00000      0.00000      0.14259     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.61295 \n    -0.00000      0.00000      0.00000     -0.98894     -0.00000      0.00000      0.00000     -0.00000     -0.36891     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.11577     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.98894      0.00000      0.36891      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.11577      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.98894      0.00000      0.00000     -0.00000      0.00000      0.36891      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.11577     -0.00000      0.00000 \n     0.01837     -0.37132     -0.00000      0.00000      0.00000      1.24508      0.00000      0.00000      0.00000     -0.52345      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      5.69239 \n     0.00000     -0.00000     -0.00000     -0.03263      0.00000     -0.00000     -0.00000      0.00000      1.03399      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.38208      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.03263     -0.00000     -1.03399     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.38208      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.03263     -0.00000     -0.00000      0.00000     -0.00000     -1.03399     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.38208      0.00000     -0.00000 \n    -0.00703      0.13559      0.00000     -0.00000     -0.00000     -0.08958     -0.00000     -0.00000     -0.00000      0.09840     -0.00000      0.00000     -0.00000     -0.12206     -0.99252      0.00000     -0.00000     -0.00000     -2.65392 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00703      0.13559      0.00000     -0.00000     -0.00000     -0.08958     -0.00000     -0.00000     -0.00000      0.09840     -0.00000      0.00000     -0.00000     -0.79852      0.60197      0.00000     -0.00000     -0.00000     -2.65392 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00703      0.13559      0.00000     -0.00000     -0.00000     -0.08958     -0.00000     -0.00000     -0.00000      0.09840     -0.00000      0.00000     -0.00000      0.92058      0.39055      0.00000     -0.00000      0.00000     -2.65392 \n     0.00144     -0.02672     -0.00000      0.00000      0.00000      0.04553      0.00000      0.00000      0.00000      1.00712     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.84299 \n    -0.00000      0.00000      0.00000      0.00501     -0.00000      0.00000      0.00000     -0.00000      0.07215     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.03955     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00501      0.00000     -0.07215      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.03955      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00501      0.00000      0.00000     -0.00000      0.00000     -0.07215      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.03955     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99193     -0.41581     -0.00000     -0.00000      0.00000      0.15496      0.00000     -0.00000     -0.00000     -0.04246     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.14264 \n     0.02151      1.02258      0.00000      0.00000     -0.00000     -0.46935     -0.00000      0.00000      0.00000      0.13475      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.61489 \n     0.00000     -0.00000      0.98955      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.36582      0.00000      0.00000     -0.00000     -0.12030     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.98955      0.00000      0.00000     -0.00000      0.36582     -0.00000      0.00000      0.00000      0.12030     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98955      0.00000      0.36582     -0.00000     -0.00000      0.00000     -0.12030      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.01837      0.36308      0.00000      0.00000     -0.00000      1.23451     -0.00000     -0.00000     -0.00000     -0.43593     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -5.70260 \n     0.00000     -0.00000      0.03091     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.02882     -0.00000     -0.00000      0.00000      0.39592     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.03091     -0.00000     -0.00000      0.00000     -1.02882      0.00000     -0.00000     -0.00000     -0.39592      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03091     -0.00000     -1.02882      0.00000      0.00000     -0.00000      0.39592     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00703     -0.13264     -0.00000     -0.00000      0.00000     -0.08547      0.00000      0.00000     -0.00000      0.05469      0.00000     -0.00000      0.00000      0.13022      0.99149      0.00000      0.00000     -0.00000      2.65546 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000 \n     0.00703     -0.13264     -0.00000     -0.00000      0.00000     -0.08547      0.00000      0.00000     -0.00000      0.05469      0.00000     -0.00000      0.00000      0.79354     -0.60852      0.00000      0.00000     -0.00000      2.65546 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.73205     -0.00000      0.00000     -0.00000 \n     0.00703     -0.13264     -0.00000     -0.00000      0.00000     -0.08547      0.00000      0.00000     -0.00000      0.05469      0.00000     -0.00000      0.00000     -0.92376     -0.38297      0.00000      0.00000     -0.00000      2.65546 \n    -0.00144      0.02618      0.00000      0.00000     -0.00000      0.05040     -0.00000     -0.00000      0.00000      1.02075      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.82617 \n     0.00000      0.00000     -0.00471     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.08606      0.00000      0.00000     -0.00000     -1.03849      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00471      0.00000      0.00000      0.00000     -0.08606     -0.00000      0.00000      0.00000      1.03849      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00471      0.00000     -0.08606     -0.00000     -0.00000      0.00000     -1.03849     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Fe\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.37369     -0.97739      0.00000      0.00000      0.00000      0.05906      0.00000      0.00000      0.00000      0.10058      0.00000      0.00000      0.09988      0.00000      0.09988     -0.08385      0.00000      0.00000      0.00000 \n    -0.97739      2.57952      0.00000      0.00000      0.00000     -0.50059      0.00000      0.00000      0.00000     -0.18411      0.00000      0.00000     -0.18150      0.00000     -0.18150      0.26495      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.25418      0.00000      0.00000      0.00000     -0.77278      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12916      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.23904      0.00000      0.00000      0.00000     -0.72389      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02954      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.23904      0.00000      0.00000      0.00000     -0.72389      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02954 \n     0.05906     -0.50059      0.00000      0.00000      0.00000      4.05900      0.00000      0.00000      0.00000     -0.49978      0.00000      0.00000     -0.51739      0.00000     -0.51739     -1.12091      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.77278      0.00000      0.00000      0.00000      2.35202      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.46343      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.72389      0.00000      0.00000      0.00000      2.19403      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04936      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.72389      0.00000      0.00000      0.00000      2.19403      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04936 \n     0.10058     -0.18411      0.00000      0.00000      0.00000     -0.49978      0.00000      0.00000      0.00000      2.07801      0.00000      0.00000     -0.87609      0.00000     -0.87609      0.32754      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.16942      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.16945      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.09988     -0.18150      0.00000      0.00000      0.00000     -0.51739      0.00000      0.00000      0.00000     -0.87609      0.00000      0.00000      0.61087      0.00000      0.61087      0.32878      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.09988     -0.18150      0.00000      0.00000      0.00000     -0.51739      0.00000      0.00000      0.00000     -0.87609      0.00000      0.00000      0.61087      0.00000      0.61087      0.32878      0.00000      0.00000      0.00000 \n    -0.08385      0.26495      0.00000      0.00000      0.00000     -1.12091      0.00000      0.00000      0.00000      0.32754      0.00000      0.00000      0.32878      0.00000      0.32878      1.94040      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.12916      0.00000      0.00000      0.00000     -0.46343      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.01922      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.02954      0.00000      0.00000      0.00000      0.04936      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35503      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02954      0.00000      0.00000      0.00000      0.04936      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35503 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99572      0.94313      0.43571      0.43570      0.07733      0.07733      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.97884      0.97786      0.28744      0.28744      0.25175      0.25175      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -251.74900    -29.07211    -25.69514    -25.58229    -25.58229     -3.26173     -2.26337     -2.01597     -2.01597     -0.18916     -0.04809     -0.03327     -0.00862     -0.00862      0.00922      0.00922      0.16633      0.16634      2.08756 \n   </alphaeps>\n   <betaeps>\n  -251.74930    -29.06785    -25.69319    -25.57851    -25.57851     -3.25129     -2.26134     -1.99983     -1.99983     -0.19818     -0.03962     -0.03935     -0.00297     -0.00297     -0.00145     -0.00145      0.18449      0.18449      2.09149 \n   </betaeps>\n   <alphavectors>\n     0.99207     -0.41985      0.00000     -0.00000     -0.00000      0.15731      0.00000     -0.00000      0.00000      0.03907     -0.01053      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.13615 \n     0.02101      1.02363     -0.00000      0.00000      0.00000     -0.47253     -0.00000      0.00000     -0.00000     -0.13178      0.03288     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.62436 \n     0.00000      0.00000      0.98950      0.00000      0.00000     -0.00000     -0.37400     -0.00000     -0.00000     -0.00000      0.00000      0.09178      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.99005      0.00000      0.00000     -0.00000     -0.37126      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.09689     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.99005      0.00000      0.00000      0.00000      0.37126     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.09689      0.00000      0.00000      0.00000     -0.00000 \n    -0.01929      0.39948      0.00000     -0.00000     -0.00000      1.21640      0.00000     -0.00000      0.00000      0.62386     -0.10594      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -6.52799 \n    -0.00000      0.00000      0.03064      0.00000     -0.00000     -0.00000      1.04386      0.00000      0.00000      0.00000     -0.00000     -0.29816      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.02910      0.00000      0.00000      0.00000      1.03947     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.31326      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.02910      0.00000      0.00000      0.00000     -1.03947      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.31326     -0.00000      0.00000      0.00000     -0.00000 \n     0.00736     -0.14410     -0.00000     -0.00000      0.00000     -0.01935      0.00000     -0.00000     -0.00000     -0.10596      1.01029     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      2.96686 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00736     -0.14676      0.00000      0.00000      0.00000     -0.10188     -0.00000      0.00000      0.00000     -0.20872     -0.48391      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.86603      2.96575 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000 \n     0.00736     -0.14676     -0.00000      0.00000      0.00000     -0.10188     -0.00000      0.00000     -0.00000     -0.20872     -0.48391      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.86603      2.96575 \n    -0.00101      0.01893      0.00000     -0.00000      0.00000      0.03794      0.00000      0.00000     -0.00000     -0.98133      0.06586     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.66855 \n     0.00000     -0.00000     -0.00365     -0.00000      0.00000      0.00000      0.05898     -0.00000     -0.00000     -0.00000      0.00000      1.02322     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00344      0.00000     -0.00000      0.00000      0.07380     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.02225      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00344      0.00000     -0.00000     -0.00000     -0.07380      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.02225     -0.00000     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99207      0.41988     -0.00000      0.00000     -0.00000     -0.15716      0.00000      0.00000      0.00000      0.03889      0.00000      0.01102      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13625 \n     0.02101     -1.02373      0.00000     -0.00000      0.00000      0.47200     -0.00000     -0.00000     -0.00000     -0.13087     -0.00000     -0.03437     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.62471 \n     0.00000      0.00000     -0.98952      0.00000     -0.00000      0.00000     -0.37392     -0.00000     -0.00000     -0.00000     -0.09197      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.99010     -0.00000      0.00000     -0.00000      0.37093     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.09758      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99010      0.00000     -0.00000     -0.00000      0.37093      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.09758     -0.00000      0.00000     -0.00000      0.00000 \n    -0.01929     -0.39886     -0.00000      0.00000     -0.00000     -1.21317      0.00000      0.00000      0.00000      0.61316      0.00000      0.11001      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      6.52958 \n     0.00000     -0.00000     -0.03059      0.00000      0.00000      0.00000      1.04371      0.00000      0.00000      0.00000      0.29869     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.02894     -0.00000      0.00000      0.00000     -1.03886      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.31529     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.02894     -0.00000      0.00000      0.00000     -1.03886     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.31529      0.00000     -0.00000      0.00000     -0.00000 \n     0.00736      0.14379     -0.00000      0.00000      0.00000      0.01474      0.00000      0.00000      0.00000     -0.10078     -0.00000     -1.01033      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -2.96707 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00736      0.14657     -0.00000      0.00000     -0.00000      0.10222     -0.00000      0.00000      0.00000     -0.20375      0.00000      0.48357     -0.00000      0.00000     -0.00000     -0.00000     -0.86603     -0.00000     -2.96615 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.73205     -0.00000 \n     0.00736      0.14657      0.00000     -0.00000      0.00000      0.10222     -0.00000     -0.00000     -0.00000     -0.20375      0.00000      0.48357     -0.00000      0.00000     -0.00000     -0.00000      0.86603      0.00000     -2.96615 \n    -0.00101     -0.01890     -0.00000      0.00000      0.00000     -0.03828     -0.00000     -0.00000     -0.00000     -0.98245     -0.00000     -0.06585     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.66689 \n     0.00000      0.00000      0.00364     -0.00000      0.00000     -0.00000      0.05950     -0.00000     -0.00000     -0.00000     -1.02318      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00342      0.00000     -0.00000      0.00000     -0.07579      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.02211     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00342      0.00000     -0.00000     -0.00000     -0.07579     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.02211      0.00000     -0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Co\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.38327     -0.99304      0.00000      0.00000      0.00000      0.01279      0.00000      0.00000      0.00000      0.12336      0.00000      0.00000      0.12005      0.00000      0.11816     -0.07280      0.00000      0.00000      0.00000 \n    -0.99304      2.59757      0.00000      0.00000      0.00000     -0.40525      0.00000      0.00000      0.00000     -0.23266      0.00000      0.00000     -0.22221      0.00000     -0.21630      0.24298      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.26211      0.00000      0.00000      0.00000     -0.78339      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12201      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26207      0.00000      0.00000      0.00000     -0.78325      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12151      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26205      0.00000      0.00000      0.00000     -0.78321      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12137 \n     0.01279     -0.40525      0.00000      0.00000      0.00000      4.32959      0.00000      0.00000      0.00000     -0.59419      0.00000      0.00000     -0.63139      0.00000     -0.65087     -1.29612      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.78339      0.00000      0.00000      0.00000      2.34331      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.42801      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.78325      0.00000      0.00000      0.00000      2.34289      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.42640      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.78321      0.00000      0.00000      0.00000      2.34274      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.42601 \n     0.12336     -0.23266      0.00000      0.00000      0.00000     -0.59419      0.00000      0.00000      0.00000      0.23040      0.00000      0.00000      0.05999      0.00000      0.17769      0.40494      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.32352      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.04739      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.12005     -0.22221      0.00000      0.00000      0.00000     -0.63139      0.00000      0.00000      0.00000      0.05999      0.00000      0.00000      0.28338      0.00000      0.14337      0.42387      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32189      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.11816     -0.21630      0.00000      0.00000      0.00000     -0.65087      0.00000      0.00000      0.00000      0.17769      0.00000      0.00000      0.14337      0.00000      0.17369      0.43354      0.00000      0.00000      0.00000 \n    -0.07280      0.24298      0.00000      0.00000      0.00000     -1.29612      0.00000      0.00000      0.00000      0.40494      0.00000      0.00000      0.42387      0.00000      0.43354      1.94013      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.12201      0.00000      0.00000      0.00000     -0.42801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.07188      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.12151      0.00000      0.00000      0.00000     -0.42640      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.06617      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.12137      0.00000      0.00000      0.00000     -0.42601      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.06476 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99678      0.99529      0.99414      0.10730      0.07716      0.00350      0.00130      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99626      0.99336      0.99084      0.43767      0.27196      0.13442      0.00001      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -272.95150    -31.81339    -28.21882    -28.20745    -28.20462     -3.54344     -2.31101     -2.29549     -2.29324     -0.22198     -0.03761     -0.03580     -0.03473      0.01847      0.02106      0.03905      0.04350      0.08391      2.74099 \n   </alphaeps>\n   <betaeps>\n  -272.95140    -31.81378    -28.22642    -28.20836    -28.19686     -3.54652     -2.34454     -2.29872     -2.26361     -0.22050     -0.03691     -0.03410     -0.03245      0.00313      0.00950      0.01655      0.06258      0.10331      2.74009 \n   </betaeps>\n   <alphavectors>\n    -0.99268     -0.42380      0.00000     -0.00000     -0.00000      0.15908     -0.00000      0.00000      0.00000     -0.03618     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00055     -0.00001      0.11943 \n    -0.01938      1.02746     -0.00000      0.00000      0.00000     -0.47616      0.00000     -0.00000     -0.00000      0.12658      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00166      0.00004     -0.65401 \n     0.00000      0.00000      0.99067     -0.00000      0.00000      0.00000     -0.37674      0.00000      0.00000     -0.00000      0.08788     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.99070      0.00000     -0.00000      0.00000      0.00000      0.37658      0.00000     -0.00000     -0.00000     -0.08824      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.99068     -0.00000     -0.00000     -0.37664      0.00000     -0.00000      0.00000      0.08821     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.02071      0.45026      0.00000     -0.00000     -0.00000      1.20778     -0.00000     -0.00000      0.00000     -0.70825     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00403     -0.00054      8.64556 \n     0.00000     -0.00000      0.02690      0.00000      0.00000     -0.00000      1.04525     -0.00000     -0.00000      0.00000     -0.28046      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.02683      0.00000     -0.00000     -0.00000      0.00000     -1.04498     -0.00000      0.00000      0.00000      0.28148     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.02688      0.00000      0.00000      1.04500     -0.00000      0.00000      0.00000     -0.28138      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00807     -0.16734     -0.00000      0.00000      0.00000     -0.06471      0.00000      0.00000     -0.00000      0.21523      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.98839      0.15174     -3.87600 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00807     -0.16754     -0.00000      0.00000     -0.00000     -0.06997     -0.00000      0.00000      0.00000      0.22026      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.62549      0.78049     -3.87556 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00807     -0.16753      0.00000      0.00000      0.00000     -0.06919     -0.00000      0.00000      0.00000      0.21935      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36307     -0.93156     -3.87573 \n     0.00073      0.01365     -0.00000     -0.00000      0.00000      0.03590      0.00000     -0.00000     -0.00000      0.98427      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00308     -0.00010      0.59424 \n     0.00000      0.00000     -0.00274     -0.00000     -0.00000      0.00000      0.06736     -0.00000     -0.00000     -0.00000      1.01735      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00273     -0.00000      0.00000     -0.00000     -0.00000     -0.06836      0.00000      0.00000     -0.00000     -1.01729     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00274     -0.00000      0.00000      0.06825      0.00000     -0.00000     -0.00000      1.01729     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99268     -0.42380      0.00000      0.00000      0.00000     -0.15908     -0.00000      0.00000      0.00000      0.03615      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00102      0.00221     -0.00000      0.11942 \n    -0.01938      1.02744     -0.00000     -0.00000     -0.00000      0.47619      0.00000     -0.00000     -0.00000     -0.12652     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00307     -0.00659      0.00000     -0.65399 \n     0.00000     -0.00000     -0.99057      0.00000     -0.00000     -0.00000     -0.37717      0.00000     -0.00000     -0.00000      0.08714     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.99068      0.00000     -0.00000      0.00000      0.37666     -0.00000     -0.00000      0.00000      0.08810     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.99077     -0.00000     -0.00000      0.00000      0.37624     -0.00000     -0.00000     -0.00000     -0.08886     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.02071      0.45039      0.00000     -0.00000     -0.00000     -1.20821     -0.00000      0.00000      0.00000      0.70924      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00708      0.01434     -0.00000      8.64540 \n     0.00000      0.00000     -0.02718      0.00000     -0.00000      0.00000      1.04583     -0.00000      0.00000      0.00000     -0.27825      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.02687     -0.00000      0.00000     -0.00000     -1.04509      0.00000      0.00000     -0.00000     -0.28108      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.02662      0.00000      0.00000     -0.00000     -1.04448      0.00000      0.00000      0.00000      0.28333      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00807     -0.16707     -0.00000      0.00000      0.00000      0.05538      0.00000      0.00000     -0.00000     -0.20449      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.76022     -0.64797      0.00000     -3.87701 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000 \n    -0.00807     -0.16756     -0.00000      0.00000      0.00000      0.06930      0.00000     -0.00000     -0.00000     -0.22110     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.94282     -0.33302     -0.00000     -3.87560 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000 \n    -0.00807     -0.16792      0.00000      0.00000      0.00000      0.07986     -0.00000     -0.00000     -0.00000     -0.23108     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.18175      0.98422     -0.00000     -3.87455 \n     0.00073      0.01365     -0.00000     -0.00000     -0.00000     -0.03580      0.00000     -0.00000      0.00000     -0.98407     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00724     -0.01382      0.00000      0.59438 \n     0.00000     -0.00000      0.00278     -0.00000      0.00000     -0.00000      0.06521     -0.00000      0.00000     -0.00000      1.01749     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00274     -0.00000     -0.00000     -0.00000     -0.06796      0.00000     -0.00000      0.00000      1.01731     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00271     -0.00000      0.00000     -0.00000     -0.07015     -0.00000     -0.00000     -0.00000     -1.01717     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ni\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.38480     -0.97712      0.00000      0.00000      0.00000     -0.31262      0.00000      0.00000      0.00000      0.25596      0.00000      0.00000      0.25687      0.00000      0.25628     -0.06457      0.00000      0.00000      0.00000 \n    -0.97712      2.49899      0.00000      0.00000      0.00000      0.57193      0.00000      0.00000      0.00000     -0.60155      0.00000      0.00000     -0.60415      0.00000     -0.60247      0.16331      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.26140      0.00000      0.00000      0.00000     -0.78159      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.11924      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26141      0.00000      0.00000      0.00000     -0.78160      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.11924      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26142      0.00000      0.00000      0.00000     -0.78161      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.11925 \n    -0.31262      0.57193      0.00000      0.00000      0.00000      1.07744      0.00000      0.00000      0.00000      0.03579      0.00000      0.00000      0.03914      0.00000      0.03699      0.19787      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.78159      0.00000      0.00000      0.00000      2.33883      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.41815      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.78160      0.00000      0.00000      0.00000      2.33883      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.41815      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.78161      0.00000      0.00000      0.00000      2.33883      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.41815 \n     0.25596     -0.60155      0.00000      0.00000      0.00000      0.03579      0.00000      0.00000      0.00000      0.21358      0.00000      0.00000      0.21521      0.00000      0.21416     -0.28367      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.06313      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.70428      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.25687     -0.60415      0.00000      0.00000      0.00000      0.03914      0.00000      0.00000      0.00000      0.21521      0.00000      0.00000      0.21686      0.00000      0.21580     -0.28499      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.23258      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.25628     -0.60247      0.00000      0.00000      0.00000      0.03699      0.00000      0.00000      0.00000      0.21416      0.00000      0.00000      0.21580      0.00000      0.21475     -0.28414      0.00000      0.00000      0.00000 \n    -0.06457      0.16331      0.00000      0.00000      0.00000      0.19787      0.00000      0.00000      0.00000     -0.28367      0.00000      0.00000     -0.28499      0.00000     -0.28414      2.12440      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.11924      0.00000      0.00000      0.00000     -0.41815      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.07497      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.11924      0.00000      0.00000      0.00000     -0.41815      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.07498      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.11925      0.00000      0.00000      0.00000     -0.41815      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.07497 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.74420      0.68771      0.56809      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -292.02980    -31.68875    -27.97631    -27.97339    -27.97180     -1.72137     -0.47921     -0.47516     -0.47302      0.07425      0.35422      0.35596      0.35690      1.96183      1.96419      1.96868      2.36696      2.37169      4.95029 \n   </alphaeps>\n   <betaeps>\n  -292.02950    -31.65465    -27.95110    -27.94694    -27.94456     -1.62433     -0.40226     -0.39459     -0.39019      0.08227      0.38208      0.38543      0.38737      2.21627      2.22967      2.23007      2.23338      2.23987      5.01696 \n   </betaeps>\n   <alphavectors>\n    -0.99251     -0.42771     -0.00000     -0.00000     -0.00000     -0.15066      0.00000      0.00000     -0.00000     -0.04160      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00012     -0.00007     -0.11895 \n    -0.01975      1.02771     -0.00000      0.00000      0.00000      0.42534     -0.00000     -0.00000      0.00000      0.11257      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00027      0.00016      0.70222 \n     0.00000     -0.00000      0.00000      0.00000     -0.99010      0.00000      0.00000      0.00000      0.32598     -0.00000      0.00000     -0.00000     -0.21009     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.99009      0.00000     -0.00000      0.00000      0.32663      0.00000     -0.00000      0.00000      0.20912      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.99010      0.00000     -0.00000      0.00000     -0.32620      0.00000     -0.00000      0.00000     -0.20976      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.02343      0.49987      0.00000      0.00000      0.00000     -0.55324      0.00000      0.00000     -0.00000      0.02262     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00136      0.00075    -10.18483 \n    -0.00000      0.00000     -0.00000      0.00000     -0.02850      0.00000     -0.00000     -0.00000     -0.88940      0.00000     -0.00000      0.00000      0.61447      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.02853     -0.00000      0.00000      0.00000     -0.89125     -0.00000      0.00000     -0.00000     -0.61178     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.02851      0.00000     -0.00000     -0.00000      0.89003     -0.00000      0.00000     -0.00000      0.61355     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00925     -0.18753     -0.00000      0.00000     -0.00000     -0.21013      0.00000      0.00000      0.00000     -0.15340      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.34398     -0.93998      4.51421 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000 \n    -0.00925     -0.18745     -0.00000     -0.00000     -0.00000     -0.21203      0.00000      0.00000     -0.00000     -0.15394      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.98388      0.17212      4.51457 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00925     -0.18750     -0.00000     -0.00000     -0.00000     -0.21078      0.00000      0.00000      0.00000     -0.15359      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.64316      0.76603      4.51433 \n     0.00069      0.01208      0.00000     -0.00000      0.00000     -0.10710     -0.00000     -0.00000      0.00000      1.02446     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00027      0.00015     -0.49748 \n     0.00000     -0.00000      0.00000     -0.00000      0.00290     -0.00000     -0.00000     -0.00000     -0.40939     -0.00000      0.00000     -0.00000     -0.93267     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00291     -0.00000      0.00000     -0.00000     -0.40657     -0.00000      0.00000      0.00000      0.93391      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00290     -0.00000      0.00000     -0.00000      0.40842     -0.00000     -0.00000      0.00000     -0.93310      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99251     -0.42789     -0.00000     -0.00000      0.00000     -0.14952      0.00000      0.00000      0.00000     -0.04284     -0.00000     -0.00000     -0.00000     -0.00026      0.00000     -0.00016      0.00000      0.00000     -0.11926 \n    -0.01974      1.02845      0.00000      0.00000     -0.00000      0.42125     -0.00000     -0.00000     -0.00000      0.11521      0.00000      0.00000      0.00000      0.00056     -0.00000      0.00034     -0.00000     -0.00000      0.70317 \n     0.00000     -0.00000      0.00000      0.00000     -0.99041      0.00000     -0.00000      0.00000      0.31303      0.00000     -0.00000     -0.00000     -0.22760     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.99038     -0.00000      0.00000      0.00000      0.31494     -0.00000      0.00000      0.00000     -0.22511      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.99040      0.00000     -0.00000      0.00000      0.31374      0.00000     -0.00000      0.00000      0.22669     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.02343      0.49375     -0.00000     -0.00000     -0.00000     -0.52382      0.00000     -0.00000      0.00000      0.04138      0.00000      0.00000      0.00000      0.00382     -0.00000      0.00241     -0.00000     -0.00000    -10.18663 \n     0.00000      0.00000      0.00000      0.00000     -0.02765      0.00000      0.00000     -0.00000     -0.85354     -0.00000      0.00000      0.00000      0.66341      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.02774     -0.00000      0.00000      0.00000     -0.85888      0.00000     -0.00000     -0.00000      0.65648     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.02768      0.00000     -0.00000     -0.00000     -0.85552     -0.00000      0.00000     -0.00000     -0.66086     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00925     -0.18523     -0.00000      0.00000      0.00000     -0.22052      0.00000     -0.00000      0.00000     -0.16619     -0.00000     -0.00000     -0.00000     -0.33318      0.00000     -0.94557      0.00000      0.00000      4.51300 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000 \n    -0.00925     -0.18507      0.00000      0.00000      0.00000     -0.22482      0.00000     -0.00000      0.00000     -0.16763     -0.00000     -0.00000     -0.00000      0.97982     -0.00000      0.18404     -0.00000     -0.00000      4.51398 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000 \n    -0.00925     -0.18517      0.00000     -0.00000      0.00000     -0.22209      0.00000     -0.00000      0.00000     -0.16671     -0.00000     -0.00000     -0.00000     -0.65496     -0.00000      0.75632     -0.00000     -0.00000      4.51336 \n     0.00069      0.01192      0.00000      0.00000     -0.00000     -0.11663     -0.00000     -0.00000     -0.00000      1.02446      0.00000      0.00000      0.00000      0.00073     -0.00000      0.00045     -0.00000     -0.00000     -0.49534 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00280     -0.00000      0.00000     -0.00000     -0.46106      0.00000     -0.00000      0.00000     -0.90824      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00281      0.00000     -0.00000     -0.00000     -0.45370      0.00000     -0.00000      0.00000     -0.91194      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00280     -0.00000      0.00000     -0.00000     -0.45835      0.00000     -0.00000      0.00000      0.90961      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cu\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.39969     -1.02177      0.00000      0.00000      0.00000      0.03486      0.00000      0.00000      0.00000      0.11015      0.00000      0.00000      0.11040      0.00000      0.11039     -0.02946      0.00000      0.00000      0.00000 \n    -1.02177      2.63946      0.00000      0.00000      0.00000     -0.52376      0.00000      0.00000      0.00000     -0.17035      0.00000      0.00000     -0.17152      0.00000     -0.17146      0.10799      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.25475      0.00000      0.00000      0.00000     -0.75261      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03481      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25480      0.00000      0.00000      0.00000     -0.75274      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03452      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25480      0.00000      0.00000      0.00000     -0.75274      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03453 \n     0.03486     -0.52376      0.00000      0.00000      0.00000      5.40658      0.00000      0.00000      0.00000     -0.97363      0.00000      0.00000     -0.96109      0.00000     -0.96207     -0.87201      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.75261      0.00000      0.00000      0.00000      2.22432      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08522      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.75274      0.00000      0.00000      0.00000      2.22470      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08439      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.75274      0.00000      0.00000      0.00000      2.22470      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08440 \n     0.11015     -0.17035      0.00000      0.00000      0.00000     -0.97363      0.00000      0.00000      0.00000      2.24844      0.00000      0.00000     -0.75656      0.00000     -0.75611      0.34282      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.11040     -0.17152      0.00000      0.00000      0.00000     -0.96109      0.00000      0.00000      0.00000     -0.75656      0.00000      0.00000      2.23837      0.00000     -0.76119      0.33654      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.11039     -0.17146      0.00000      0.00000      0.00000     -0.96207      0.00000      0.00000      0.00000     -0.75611      0.00000      0.00000     -0.76119      0.00000      2.23922      0.33659      0.00000      0.00000      0.00000 \n    -0.02946      0.10799      0.00000      0.00000      0.00000     -0.87201      0.00000      0.00000      0.00000      0.34282      0.00000      0.00000      0.33654      0.00000      0.33659      0.95270      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.03481      0.00000      0.00000      0.00000      0.08522      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00330      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.03452      0.00000      0.00000      0.00000      0.08439      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00323      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.03453      0.00000      0.00000      0.00000      0.08440      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00323 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.44955      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.55045      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -318.71050    -38.42006    -34.61478    -34.61475    -34.60593     -4.62935     -3.20213     -3.20174     -3.17867     -0.43326     -0.43326     -0.41631     -0.41608     -0.41153     -0.25876     -0.05227     -0.05218     -0.05050      3.90575 \n   </alphaeps>\n   <betaeps>\n  -318.71050    -38.46254    -34.64544    -34.64533    -34.64205     -4.76638     -3.33198     -3.33195     -3.33001     -0.56031     -0.56031     -0.55936     -0.55931     -0.55820     -0.26235     -0.05408     -0.05395     -0.05291      3.82512 \n   </betaeps>\n   <alphavectors>\n    -0.99272     -0.43242      0.00000     -0.00000      0.00000      0.16383     -0.00000      0.00000      0.00000     -0.00001      0.00000      0.00000      0.00000     -0.00029      0.03135     -0.00000     -0.00000      0.00000      0.08929 \n    -0.01909      1.03454     -0.00000      0.00000     -0.00000     -0.49092      0.00000     -0.00000     -0.00000      0.00003     -0.00000     -0.00000     -0.00000      0.00049     -0.12141      0.00000      0.00000     -0.00000     -0.65498 \n     0.00000      0.00000      0.00000     -0.00000      0.99190     -0.00000      0.00000     -0.00000      0.37866      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.07119      0.00000 \n     0.00000      0.00000     -0.99185     -0.00000      0.00000      0.00000     -0.00000      0.37884     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.07091      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.99185      0.00000      0.00000      0.37884      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.07091     -0.00000      0.00000     -0.00000 \n     0.02352      0.47303     -0.00000     -0.00000     -0.00000      1.39372     -0.00000      0.00000      0.00000     -0.00010      0.00000      0.00000      0.00000      0.00751      0.96372     -0.00000     -0.00000     -0.00000     11.16016 \n     0.00000      0.00000      0.00000     -0.00000      0.02330      0.00000      0.00000      0.00000     -1.05373     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.22930     -0.00000 \n     0.00000     -0.00000     -0.02343     -0.00000      0.00000      0.00000     -0.00000     -1.05391     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.22848     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.02343      0.00000      0.00000     -1.05391      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.22847      0.00000     -0.00000     -0.00000 \n    -0.00933     -0.17703      0.00000      0.00000      0.00000     -0.15279      0.00000     -0.00000     -0.00000     -0.00790     -0.00000     -0.00000     -0.00000     -1.00448     -0.33969      0.00000      0.00000     -0.00000     -4.98262 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00933     -0.17681      0.00000      0.00000      0.00000     -0.14684      0.00000     -0.00000     -0.00000     -0.86203     -0.00000      0.00000     -0.00000      0.50226     -0.35238     -0.00000     -0.00000      0.00000     -4.98330 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00933     -0.17681      0.00000      0.00000      0.00000     -0.14674      0.00000     -0.00000     -0.00000      0.86996     -0.00000      0.00000     -0.00000      0.48855     -0.35242     -0.00000     -0.00000      0.00000     -4.98328 \n     0.00057      0.00858      0.00000      0.00000      0.00000      0.03029     -0.00000      0.00000      0.00000     -0.00010     -0.00000     -0.00000      0.00000     -0.00815     -0.97631      0.00000      0.00000     -0.00000      0.54700 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00202      0.00000     -0.00000      0.00000     -0.04315      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.01405      0.00000 \n     0.00000      0.00000      0.00203      0.00000     -0.00000     -0.00000      0.00000     -0.04236      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.01409      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00203     -0.00000     -0.00000     -0.04235     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.01409     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99272      0.43221      0.00000      0.00000      0.00000      0.16458      0.00000      0.00000     -0.00000     -0.00001      0.00000     -0.00000      0.00000      0.00007     -0.03133     -0.00000     -0.00000      0.00000     -0.08897 \n    -0.01910     -1.03367     -0.00000     -0.00000     -0.00000     -0.49399     -0.00000     -0.00000      0.00000      0.00005     -0.00000      0.00000     -0.00000     -0.00026      0.12300      0.00000      0.00000     -0.00000      0.65373 \n    -0.00000     -0.00000      0.00000      0.00000      0.99152     -0.00000      0.00000      0.00000      0.37998      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06933     -0.00000 \n     0.00000      0.00000      0.99153      0.00000     -0.00000     -0.00000     -0.00000     -0.37997     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06932      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.99153      0.00000      0.00000     -0.37997     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.06933      0.00000     -0.00000      0.00000 \n     0.02352     -0.48065     -0.00000     -0.00000      0.00000      1.42512      0.00000      0.00000     -0.00000     -0.00057      0.00000     -0.00000      0.00000      0.00212     -1.00835     -0.00000     -0.00000      0.00000    -11.15192 \n     0.00000      0.00000      0.00000      0.00000      0.02434     -0.00000      0.00000      0.00000     -1.05491     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.22371     -0.00000 \n     0.00000      0.00000      0.02432      0.00000     -0.00000     -0.00000     -0.00000      1.05491     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.22371      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.02432      0.00000      0.00000      1.05491     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.22372     -0.00000      0.00000     -0.00000 \n    -0.00933      0.17982      0.00000     -0.00000     -0.00000     -0.16290     -0.00000     -0.00000      0.00000     -0.00017      0.00000      0.00000     -0.00000      0.99923      0.36994      0.00000     -0.00000     -0.00000      4.98111 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00933      0.17980      0.00000      0.00000      0.00000     -0.16246     -0.00000     -0.00000      0.00000     -0.86558      0.00000     -0.00000      0.00000     -0.50113      0.36940     -0.00000     -0.00000     -0.00000      4.98097 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00933      0.17980      0.00000     -0.00000      0.00000     -0.16245     -0.00000     -0.00000      0.00000      0.86647     -0.00000      0.00000     -0.00000     -0.50041      0.36914      0.00000      0.00000      0.00000      4.98091 \n     0.00057     -0.00875      0.00000      0.00000     -0.00000      0.02888      0.00000      0.00000     -0.00000      0.00013     -0.00000      0.00000     -0.00000     -0.00037      0.97403     -0.00000      0.00000      0.00000     -0.55119 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00213      0.00000     -0.00000     -0.00000     -0.03778      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.01427     -0.00000 \n    -0.00000     -0.00000     -0.00213     -0.00000     -0.00000      0.00000      0.00000      0.03777      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.01427     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00213     -0.00000     -0.00000      0.03779      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.01427      0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Zn\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.40930     -1.03512      0.00000      0.00000      0.00000     -0.09441      0.00000      0.00000      0.00000      0.17123      0.00000      0.00000      0.17123      0.00000      0.17132     -0.06845      0.00000      0.00000      0.00000 \n    -1.03512      2.64027      0.00000      0.00000      0.00000     -0.08102      0.00000      0.00000      0.00000     -0.35997      0.00000      0.00000     -0.35997      0.00000     -0.36028      0.19414      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.27165      0.00000      0.00000      0.00000     -0.80495      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14859      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.27165      0.00000      0.00000      0.00000     -0.80495      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14859      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.27166      0.00000      0.00000      0.00000     -0.80494      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14857 \n    -0.09441     -0.08102      0.00000      0.00000      0.00000      2.46207      0.00000      0.00000      0.00000     -0.07998      0.00000      0.00000     -0.07998      0.00000     -0.07863     -0.29282      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.80495      0.00000      0.00000      0.00000      2.38819      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51800      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.80495      0.00000      0.00000      0.00000      2.38819      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51800      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.80494      0.00000      0.00000      0.00000      2.38819      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.51799 \n     0.17123     -0.35997      0.00000      0.00000      0.00000     -0.07998      0.00000      0.00000      0.00000      0.82373      0.00000      0.00000     -0.28339      0.00000     -0.37443     -0.08699      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21393      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.49727      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.17123     -0.35997      0.00000      0.00000      0.00000     -0.07998      0.00000      0.00000      0.00000     -0.28339      0.00000      0.00000      0.82373      0.00000     -0.37443     -0.08699      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.49727      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.17132     -0.36028      0.00000      0.00000      0.00000     -0.07863      0.00000      0.00000      0.00000     -0.37443      0.00000      0.00000     -0.37443      0.00000      0.91395     -0.08720      0.00000      0.00000      0.00000 \n    -0.06845      0.19414      0.00000      0.00000      0.00000     -0.29282      0.00000      0.00000      0.00000     -0.08699      0.00000      0.00000     -0.08699      0.00000     -0.08720      2.11368      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.14859      0.00000      0.00000      0.00000     -0.51800      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11269      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.14859      0.00000      0.00000      0.00000     -0.51800      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11269      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.14857      0.00000      0.00000      0.00000     -0.51799      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11269 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.42955      0.41621      0.41621      0.36904      0.36899      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.42955      0.41621      0.41621      0.36904      0.36899      0.00000 \n   </betaocc>\n   <alphaeps>\n  -339.58810    -38.64172    -34.72776    -34.72653    -34.72653     -2.97332     -1.49787     -1.49565     -1.49565      0.02231      0.30835      0.30882      0.30882      1.52938      1.52986      1.52986      1.53160      1.53160      8.99451 \n   </alphaeps>\n   <betaeps>\n  -339.58810    -38.64172    -34.72776    -34.72653    -34.72653     -2.97332     -1.49787     -1.49565     -1.49565      0.02231      0.30835      0.30882      0.30882      1.52938      1.52986      1.52986      1.53160      1.53160      8.99451 \n   </betaeps>\n   <alphavectors>\n    -0.99291      0.43674     -0.00000     -0.00000     -0.00000      0.16118     -0.00000     -0.00000      0.00000     -0.04537     -0.00000     -0.00000      0.00000      0.00006     -0.00000      0.00000      0.00000     -0.00000     -0.04384 \n    -0.01862     -1.04152      0.00000      0.00000      0.00000     -0.46659      0.00000      0.00000     -0.00000      0.13159      0.00000      0.00000     -0.00000     -0.00016      0.00000     -0.00000      0.00000      0.00000      0.69316 \n    -0.00000     -0.00000      0.00000      0.00000     -0.99119      0.00000      0.00000      0.00000     -0.36287      0.00000      0.00000     -0.14729      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.99119     -0.00000      0.00000     -0.00000      0.36287     -0.00000      0.00000      0.00000      0.00000      0.14729     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.99119     -0.00000     -0.00000     -0.00000      0.36292      0.00000      0.00000      0.00000     -0.14718     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.02766     -0.43578     -0.00000      0.00000      0.00000      0.99422     -0.00000     -0.00000      0.00000     -0.22780     -0.00000     -0.00000      0.00000     -0.00009      0.00000      0.00000     -0.00000      0.00000    -15.90534 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.02524     -0.00000     -0.00000     -0.00000      0.99516     -0.00000     -0.00000      0.45068      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02524      0.00000     -0.00000      0.00000     -0.99516      0.00000     -0.00000     -0.00000     -0.00000     -0.45068     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.02525     -0.00000     -0.00000     -0.00000     -0.99530     -0.00000     -0.00000      0.00000      0.45037      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01124      0.15866     -0.00000     -0.00000     -0.00000      0.01964      0.00000     -0.00000      0.00000     -0.04369      0.00000      0.00000     -0.00000      0.50024     -0.00000      0.00000      0.86603     -0.00000      7.09996 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73205     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000 \n    -0.01124      0.15866      0.00000     -0.00000     -0.00000      0.01964      0.00000     -0.00000      0.00000     -0.04369     -0.00000     -0.00000      0.00000      0.50024     -0.00000      0.00000     -0.86603     -0.00000      7.09996 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01124      0.15863      0.00000     -0.00000     -0.00000      0.02019     -0.00000     -0.00000     -0.00000     -0.04394      0.00000     -0.00000      0.00000     -0.99976      0.00000     -0.00000     -0.00000      0.00000      7.10001 \n     0.00059     -0.00247      0.00000      0.00000      0.00000      0.08635      0.00000     -0.00000      0.00000      1.02439     -0.00000      0.00000     -0.00000     -0.00016      0.00000      0.00000     -0.00000      0.00000     -0.64379 \n    -0.00000      0.00000      0.00000      0.00000      0.00295     -0.00000     -0.00000     -0.00000      0.19667      0.00000      0.00000     -1.00879      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00295     -0.00000     -0.00000      0.00000     -0.19667     -0.00000      0.00000      0.00000      0.00000      1.00879      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00296      0.00000      0.00000      0.00000     -0.19636     -0.00000     -0.00000      0.00000     -1.00885     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99291     -0.43674      0.00000      0.00000      0.00000     -0.16118      0.00000      0.00000     -0.00000      0.04537      0.00000      0.00000      0.00000     -0.00006      0.00000      0.00000      0.00000     -0.00000     -0.04384 \n     0.01862      1.04152     -0.00000     -0.00000     -0.00000      0.46659     -0.00000     -0.00000      0.00000     -0.13159     -0.00000     -0.00000     -0.00000      0.00016     -0.00000     -0.00000     -0.00000      0.00000      0.69316 \n    -0.00000      0.00000     -0.00000     -0.00000      0.99119     -0.00000     -0.00000      0.00000      0.36287     -0.00000      0.00000      0.14729     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.99119     -0.00000     -0.00000     -0.00000     -0.36287     -0.00000      0.00000     -0.00000      0.00000     -0.14729      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.99119     -0.00000     -0.00000     -0.00000      0.36292     -0.00000      0.00000      0.00000      0.14718     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.02766      0.43578      0.00000      0.00000      0.00000     -0.99422      0.00000      0.00000     -0.00000      0.22780     -0.00000      0.00000      0.00000      0.00009     -0.00000     -0.00000     -0.00000      0.00000    -15.90534 \n     0.00000     -0.00000     -0.00000     -0.00000      0.02524      0.00000      0.00000     -0.00000     -0.99516      0.00000     -0.00000     -0.45068      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.02524      0.00000      0.00000      0.00000      0.99516      0.00000     -0.00000      0.00000     -0.00000      0.45068      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.02525     -0.00000     -0.00000     -0.00000     -0.99530      0.00000     -0.00000      0.00000     -0.45037      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.01124     -0.15866     -0.00000     -0.00000     -0.00000     -0.01964      0.00000     -0.00000      0.00000      0.04369      0.00000     -0.00000     -0.00000     -0.50024      0.00000      0.00000      0.86603     -0.00000      7.09996 \n    -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000      0.00000 \n     0.01124     -0.15866      0.00000      0.00000      0.00000     -0.01964     -0.00000      0.00000     -0.00000      0.04369     -0.00000      0.00000      0.00000     -0.50024      0.00000      0.00000     -0.86603     -0.00000      7.09996 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000      0.00000 \n     0.01124     -0.15863     -0.00000     -0.00000     -0.00000     -0.02019     -0.00000      0.00000     -0.00000      0.04394      0.00000      0.00000      0.00000      0.99976     -0.00000     -0.00000     -0.00000      0.00000      7.10001 \n    -0.00059      0.00247     -0.00000     -0.00000     -0.00000     -0.08635     -0.00000      0.00000     -0.00000     -1.02439     -0.00000     -0.00000     -0.00000      0.00016     -0.00000      0.00000     -0.00000      0.00000     -0.64379 \n    -0.00000      0.00000      0.00000      0.00000     -0.00295     -0.00000      0.00000     -0.00000     -0.19667     -0.00000      0.00000      1.00879      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00295     -0.00000      0.00000      0.00000      0.19667     -0.00000      0.00000     -0.00000      0.00000     -1.00879      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00296      0.00000      0.00000      0.00000     -0.19636      0.00000     -0.00000      0.00000      1.00885     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Al\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.21518     -0.72106      0.00000      0.00000      0.00000      0.17765      0.00000      0.00000      0.00000 \n    -0.72106      2.42118      0.00000      0.00000      0.00000     -0.69637      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.88905      0.00000      0.00000      0.00000      0.08349      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.88905      0.00000      0.00000      0.00000      0.08349      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.88905      0.00000      0.00000      0.00000      0.08349 \n     0.17765     -0.69637      0.00000      0.00000      0.00000      2.20075      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.08349      0.00000      0.00000      0.00000      0.39313      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.08349      0.00000      0.00000      0.00000      0.39314      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.08349      0.00000      0.00000      0.00000      0.39314 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33205      0.33205      0.33204 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00129      0.00129      0.00129 \n   </betaocc>\n   <alphaeps>\n   -54.25346     -3.52040     -2.09558     -2.09558     -2.09558     -0.10886      0.17738      0.17738      0.17738 \n   </alphaeps>\n   <betaeps>\n   -54.24694     -3.51021     -2.08372     -2.08372     -2.08372     -0.07210      0.21387      0.21387      0.21387 \n   </betaeps>\n   <alphavectors>\n     0.99297      0.32982     -0.00000      0.00000      0.00000     -0.11322      0.00000      0.00000     -0.00000 \n     0.02276     -1.02156      0.00000     -0.00000     -0.00000      0.40803      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.95481      0.00000      0.00000     -0.00000     -0.43801 \n     0.00000     -0.00000     -0.95481     -0.00000     -0.00000     -0.00000     -0.43801      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.95481     -0.00000      0.00000     -0.00000      0.43801      0.00000 \n    -0.00422     -0.07710      0.00000     -0.00000     -0.00000     -1.04614     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.12452      0.00000      0.00000     -0.00000      1.04308 \n    -0.00000      0.00000     -0.12452      0.00000      0.00000      0.00000      1.04308      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.12452      0.00000     -0.00000      0.00000     -1.04308      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99299      0.32990      0.00000     -0.00000      0.00000     -0.11283     -0.00000     -0.00000     -0.00000 \n    -0.02270     -1.02203     -0.00000     -0.00000     -0.00000      0.40685      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.95574     -0.00000     -0.00000      0.00000     -0.43596      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.95574      0.00000     -0.00000      0.00000     -0.43596 \n     0.00000     -0.00000     -0.00000     -0.95574     -0.00000     -0.00000     -0.00000      0.43596      0.00000 \n     0.00421     -0.07590     -0.00000     -0.00000      0.00000     -1.04623     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.12230      0.00000      0.00000     -0.00000      1.04334     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.12230     -0.00000     -0.00000     -0.00000      1.04334 \n     0.00000      0.00000      0.00000     -0.12230     -0.00000      0.00000      0.00000     -1.04334     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Si\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.23074     -0.74117      0.00000      0.00000      0.00000      0.15812      0.00000      0.00000      0.00000 \n    -0.74117      2.38445      0.00000      0.00000      0.00000     -0.59611      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.97681      0.00000      0.00000      0.00000     -0.07415      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.97681      0.00000      0.00000      0.00000     -0.07415      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.97681      0.00000      0.00000      0.00000     -0.07415 \n     0.15812     -0.59611      0.00000      0.00000      0.00000      2.14939      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07415      0.00000      0.00000      0.00000      0.72968      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07415      0.00000      0.00000      0.00000      0.72968      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07415      0.00000      0.00000      0.00000      0.72968 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66666      0.66666      0.66666 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -64.12367     -4.63110     -3.02588     -3.02588     -3.02588     -0.27028      0.03464      0.03464      0.03464 \n   </alphaeps>\n   <betaeps>\n   -64.11292     -4.61452     -3.00677     -3.00677     -3.00677     -0.19971      0.10487      0.10487      0.10487 \n   </betaeps>\n   <alphavectors>\n     0.99313      0.34442      0.00000      0.00000     -0.00000      0.10219      0.00000      0.00000      0.00000 \n     0.02139     -1.03211      0.00000      0.00000      0.00000     -0.35568     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.97070      0.00000     -0.00000      0.00000      0.00000     -0.36802      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.97070      0.00000      0.00000     -0.00000      0.36802 \n     0.00000      0.00000      0.00000      0.97070      0.00000      0.00000     -0.36802      0.00000     -0.00000 \n    -0.00333     -0.06777      0.00000      0.00000     -0.00000      1.03445      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.09386      0.00000      0.00000     -0.00000     -0.00000      1.03387     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.09386      0.00000      0.00000     -0.00000     -1.03387 \n     0.00000      0.00000      0.00000      0.09386     -0.00000     -0.00000      1.03387     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99315      0.34453      0.00000      0.00000     -0.00000     -0.10158      0.00000     -0.00000      0.00000 \n     0.02131     -1.03273     -0.00000     -0.00000      0.00000      0.35390     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.97173      0.00000     -0.00000      0.00000      0.36531      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.97173      0.00000      0.00000     -0.00000      0.36531 \n    -0.00000     -0.00000      0.97173     -0.00000      0.00000      0.00000      0.36531     -0.00000     -0.00000 \n    -0.00332     -0.06599     -0.00000     -0.00000      0.00000     -1.03457      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.09097     -0.00000      0.00000     -0.00000     -1.03413     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.09097      0.00000      0.00000      0.00000     -1.03413 \n     0.00000      0.00000      0.09097      0.00000     -0.00000     -0.00000     -1.03413      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"P\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.24916     -0.77209      0.00000      0.00000      0.00000      0.16025      0.00000      0.00000      0.00000 \n    -0.77209      2.39629      0.00000      0.00000      0.00000     -0.58385      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.02974      0.00000      0.00000      0.00000     -0.20835      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.02974      0.00000      0.00000      0.00000     -0.20835      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.02974      0.00000      0.00000      0.00000     -0.20835 \n     0.16025     -0.58385      0.00000      0.00000      0.00000      2.14265      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.20835      0.00000      0.00000      0.00000      1.07961      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.20835      0.00000      0.00000      0.00000      1.07961      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.20835      0.00000      0.00000      0.00000      1.07961 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99991      0.99991      0.99991 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00009      0.00009      0.00009 \n   </betaocc>\n   <alphaeps>\n   -74.83110     -5.83703     -4.05980     -4.05980     -4.05980     -0.38941     -0.04131     -0.04131     -0.04131 \n   </alphaeps>\n   <betaeps>\n   -74.81481     -5.81277     -4.03203     -4.03203     -4.03203     -0.28344      0.06441      0.06441      0.06441 \n   </betaeps>\n   <alphavectors>\n     0.99324      0.35694      0.00000      0.00000      0.00000     -0.10315     -0.00000      0.00000      0.00000 \n     0.02034     -1.03740      0.00000     -0.00000     -0.00000      0.34861      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.97660      0.00000     -0.00000      0.00000     -0.34672     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.97660      0.00000     -0.00000     -0.00000      0.34672      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.97660     -0.00000      0.00000      0.00000      0.34672 \n    -0.00297     -0.06577     -0.00000     -0.00000     -0.00000     -1.03295     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.07828      0.00000     -0.00000     -0.00000      1.03336      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.07828     -0.00000      0.00000      0.00000     -1.03336      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.07828      0.00000     -0.00000     -0.00000     -1.03336 \n   </alphavectors>\n   <betavectors>\n    -0.99328      0.35707     -0.00000      0.00000     -0.00000     -0.10237     -0.00000     -0.00000      0.00000 \n    -0.02024     -1.03814      0.00000     -0.00000      0.00000      0.34641      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.97764     -0.00000      0.00000     -0.34378      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.97764      0.00000     -0.00000     -0.34378      0.00000 \n    -0.00000     -0.00000     -0.97764      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.34378 \n     0.00295     -0.06358      0.00000     -0.00000      0.00000     -1.03309     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.07517      0.00000     -0.00000      1.03359     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.07517     -0.00000      0.00000      1.03359     -0.00000 \n     0.00000     -0.00000     -0.07517     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.03359 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"S\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.26601     -0.79970      0.00000      0.00000      0.00000      0.16212      0.00000      0.00000      0.00000 \n    -0.79970      2.40784      0.00000      0.00000      0.00000     -0.57395      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.07024      0.00000      0.00000      0.00000     -0.32557      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.07024      0.00000      0.00000      0.00000     -0.32557      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.07024      0.00000      0.00000      0.00000     -0.32557 \n     0.16212     -0.57395      0.00000      0.00000      0.00000      2.13720      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.32557      0.00000      0.00000      0.00000      1.43064      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.32557      0.00000      0.00000      0.00000      1.43064      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.32557      0.00000      0.00000      0.00000      1.43064 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.99999      0.99999 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33334      0.33334      0.33334 \n   </betaocc>\n   <alphaeps>\n   -86.44704     -7.19582     -5.24976     -5.24976     -5.24976     -0.49607     -0.10079     -0.10079     -0.10079 \n   </alphaeps>\n   <betaeps>\n   -86.43602     -7.17994     -5.23167     -5.23167     -5.23167     -0.42777     -0.03253     -0.03253     -0.03253 \n   </betaeps>\n   <alphavectors>\n    -0.99342     -0.36796     -0.00000     -0.00000     -0.00000      0.10355      0.00000      0.00000     -0.00000 \n    -0.01926      1.04250      0.00000      0.00000      0.00000     -0.34169     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.98112      0.00000     -0.00000      0.00000      0.32913     -0.00000 \n     0.00000      0.00000     -0.98112     -0.00000      0.00000     -0.00000      0.32913     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.98112     -0.00000      0.00000     -0.00000     -0.32913 \n     0.00264      0.06296     -0.00000      0.00000      0.00000      1.03181      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.06554     -0.00000      0.00000     -0.00000     -1.03278      0.00000 \n     0.00000     -0.00000     -0.06554     -0.00000      0.00000      0.00000     -1.03278      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.06554      0.00000     -0.00000      0.00000      1.03278 \n   </alphavectors>\n   <betavectors>\n    -0.99344      0.36803     -0.00000      0.00000      0.00000     -0.10313      0.00000      0.00000     -0.00000 \n    -0.01920     -1.04288      0.00000     -0.00000     -0.00000      0.34051      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.98159      0.00000     -0.00000     -0.00000     -0.32773     -0.00000 \n    -0.00000      0.00000      0.98159     -0.00000      0.00000     -0.00000     -0.32773      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.98159     -0.00000     -0.00000     -0.00000      0.32773 \n     0.00263     -0.06179     -0.00000     -0.00000     -0.00000     -1.03188     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.06406     -0.00000      0.00000      0.00000      1.03287      0.00000 \n     0.00000      0.00000      0.06406     -0.00000      0.00000     -0.00000      1.03287      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.06406      0.00000      0.00000      0.00000     -1.03287 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cl\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.27847     -0.81567      0.00000      0.00000      0.00000      0.14798      0.00000      0.00000      0.00000 \n    -0.81567      2.39224      0.00000      0.00000      0.00000     -0.51185      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.08707      0.00000      0.00000      0.00000     -0.39380      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.08707      0.00000      0.00000      0.00000     -0.39380      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.08707      0.00000      0.00000      0.00000     -0.39380 \n     0.14798     -0.51185      0.00000      0.00000      0.00000      2.10986      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.39380      0.00000      0.00000      0.00000      1.76277      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.39380      0.00000      0.00000      0.00000      1.76277      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.39380      0.00000      0.00000      0.00000      1.76277 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99629      0.99629      0.99629 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.67038      0.67037      0.67037 \n   </betaocc>\n   <alphaeps>\n   -99.24907     -8.92768     -6.81482     -6.81482     -6.81482     -0.67893     -0.25399     -0.25399     -0.25399 \n   </alphaeps>\n   <betaeps>\n   -99.24452     -8.92114     -6.80740     -6.80740     -6.80740     -0.64728     -0.22236     -0.22236     -0.22236 \n   </betaeps>\n   <alphavectors>\n    -0.99383     -0.37784      0.00000     -0.00000     -0.00000     -0.09365     -0.00000      0.00000     -0.00000 \n    -0.01764      1.05051     -0.00000      0.00000      0.00000      0.30371      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.98743     -0.00000     -0.00000     -0.00000     -0.28664 \n     0.00000     -0.00000      0.00000      0.98743      0.00000      0.00000      0.00000      0.28664     -0.00000 \n     0.00000     -0.00000      0.98743     -0.00000     -0.00000     -0.00000      0.28664     -0.00000     -0.00000 \n     0.00208      0.05296      0.00000      0.00000     -0.00000     -1.02573      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.04912      0.00000      0.00000      0.00000      1.02702 \n     0.00000     -0.00000      0.00000      0.04912     -0.00000     -0.00000     -0.00000     -1.02702      0.00000 \n     0.00000      0.00000      0.04912     -0.00000     -0.00000      0.00000     -1.02702      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99384      0.37786      0.00000     -0.00000      0.00000     -0.09350      0.00000      0.00000     -0.00000 \n    -0.01762     -1.05063     -0.00000      0.00000     -0.00000      0.30329     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.98757     -0.00000      0.00000      0.00000      0.28618 \n     0.00000     -0.00000     -0.00000     -0.98757      0.00000      0.00000      0.00000      0.28618     -0.00000 \n    -0.00000     -0.00000     -0.98757      0.00000     -0.00000     -0.00000     -0.28618      0.00000      0.00000 \n     0.00207     -0.05255     -0.00000      0.00000     -0.00000     -1.02575      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.04863      0.00000     -0.00000     -0.00000     -1.02705 \n    -0.00000     -0.00000     -0.00000     -0.04863     -0.00000     -0.00000     -0.00000     -1.02705      0.00000 \n     0.00000      0.00000     -0.04863     -0.00000      0.00000      0.00000      1.02705     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ar\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.29449     -0.84438      0.00000      0.00000      0.00000      0.16246      0.00000      0.00000      0.00000 \n    -0.84438      2.42446      0.00000      0.00000      0.00000     -0.55007      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.12902      0.00000      0.00000      0.00000     -0.52407      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.12902      0.00000      0.00000      0.00000     -0.52407      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.12902      0.00000      0.00000      0.00000     -0.52407 \n     0.16246     -0.55007      0.00000      0.00000      0.00000      2.12522      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.52407      0.00000      0.00000      0.00000      2.12902      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.52407      0.00000      0.00000      0.00000      2.12902      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.52407      0.00000      0.00000      0.00000      2.12902 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000 \n   </betaocc>\n   <alphaeps>\n  -112.47540    -10.43942     -8.16229     -8.16229     -8.16229     -0.75856     -0.26076     -0.26076     -0.26076 \n   </alphaeps>\n   <betaeps>\n  -112.47540    -10.43942     -8.16229     -8.16229     -8.16229     -0.75856     -0.26076     -0.26076     -0.26076 \n   </betaeps>\n   <alphavectors>\n     0.99401      0.38580     -0.00000     -0.00000     -0.00000     -0.10173     -0.00000      0.00000     -0.00000 \n     0.01678     -1.05209      0.00000      0.00000      0.00000      0.32412      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.98766     -0.00000      0.00000      0.00000      0.29839     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.98766     -0.00000      0.00000      0.00000      0.29839     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.98766     -0.00000      0.00000     -0.00000      0.29839 \n    -0.00200     -0.05572      0.00000      0.00000      0.00000     -1.02932      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.04609      0.00000     -0.00000     -0.00000     -1.03072     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.04609      0.00000     -0.00000     -0.00000     -1.03072      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.04609     -0.00000      0.00000     -0.00000     -1.03072 \n   </alphavectors>\n   <betavectors>\n    -0.99401     -0.38580      0.00000     -0.00000      0.00000      0.10173      0.00000      0.00000     -0.00000 \n    -0.01678      1.05209     -0.00000      0.00000     -0.00000     -0.32412     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.98766     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.29839 \n    -0.00000      0.00000     -0.00000     -0.98766     -0.00000     -0.00000      0.29839      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.98766      0.00000      0.00000     -0.29839     -0.00000 \n     0.00200      0.05572     -0.00000      0.00000     -0.00000      1.02932      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.04609      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.03072 \n     0.00000     -0.00000      0.00000     -0.04609      0.00000      0.00000     -1.03072      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.04609     -0.00000     -0.00000      1.03072      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"K\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.30729     -0.87689      0.00000      0.00000      0.00000      0.21527      0.00000      0.00000      0.00000     -0.03227      0.00000      0.00000      0.00000 \n    -0.87689      2.50825      0.00000      0.00000      0.00000     -0.73262      0.00000      0.00000      0.00000      0.12777      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.13712      0.00000      0.00000      0.00000     -0.48827      0.00000      0.00000      0.00000     -0.15708      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.13712      0.00000      0.00000      0.00000     -0.48827      0.00000      0.00000      0.00000     -0.15708      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.13712      0.00000      0.00000      0.00000     -0.48827      0.00000      0.00000      0.00000     -0.15708 \n     0.21527     -0.73262      0.00000      0.00000      0.00000      2.44470      0.00000      0.00000      0.00000     -0.57421      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.48827      0.00000      0.00000      0.00000      1.75539      0.00000      0.00000      0.00000      0.36260      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.48827      0.00000      0.00000      0.00000      1.75539      0.00000      0.00000      0.00000      0.36260      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.48827      0.00000      0.00000      0.00000      1.75539      0.00000      0.00000      0.00000      0.36260 \n    -0.03227      0.12777      0.00000      0.00000      0.00000     -0.57421      0.00000      0.00000      0.00000      1.25832      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.15708      0.00000      0.00000      0.00000      0.36260      0.00000      0.00000      0.00000      0.07648      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.15708      0.00000      0.00000      0.00000      0.36260      0.00000      0.00000      0.00000      0.07648      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.15708      0.00000      0.00000      0.00000      0.36260      0.00000      0.00000      0.00000      0.07648 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -126.81700    -12.41858    -10.02728    -10.02728    -10.02728     -1.19297     -0.61401     -0.61401     -0.61401      0.00880      0.17955      0.17955      0.17955 \n   </alphaeps>\n   <betaeps>\n  -126.81700    -12.41858    -10.02728    -10.02728    -10.02728     -1.19297     -0.61401     -0.61401     -0.61401      0.00880      0.17955      0.17955      0.17955 \n   </betaeps>\n   <alphavectors>\n    -0.99113      0.39247      0.00000      0.00000     -0.00000     -0.12558      0.00000     -0.00000     -0.00000      0.05484     -0.00000      0.00000     -0.00000 \n    -0.02453     -1.04153     -0.00000     -0.00000      0.00000      0.39120     -0.00000      0.00000      0.00000     -0.17721      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.98241     -0.00000     -0.32161     -0.00000      0.00000      0.00000     -0.00000     -0.20081     -0.00000 \n    -0.00000     -0.00000      0.98241     -0.00000     -0.00000      0.00000      0.00000     -0.32161      0.00000     -0.00000     -0.00000      0.00000     -0.20081 \n    -0.00000      0.00000     -0.00000     -0.98241      0.00000      0.00000      0.00000      0.00000      0.32161      0.00000     -0.20081     -0.00000      0.00000 \n     0.00459     -0.08271      0.00000     -0.00000      0.00000     -1.03234     -0.00000      0.00000      0.00000      0.54729     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.05761      0.00000      0.93508      0.00000     -0.00000     -0.00000      0.00000      0.71073      0.00000 \n    -0.00000      0.00000      0.05761     -0.00000     -0.00000     -0.00000      0.00000      0.93508     -0.00000     -0.00000      0.00000      0.00000      0.71073 \n     0.00000     -0.00000     -0.00000     -0.05761     -0.00000     -0.00000     -0.00000     -0.00000     -0.93508     -0.00000      0.71073     -0.00000     -0.00000 \n    -0.00171      0.02613     -0.00000      0.00000     -0.00000     -0.02107      0.00000     -0.00000     -0.00000     -1.12074     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.01615     -0.00000      0.19488     -0.00000      0.00000      0.00000     -0.00000     -1.10831     -0.00000 \n     0.00000      0.00000     -0.01615      0.00000      0.00000     -0.00000     -0.00000      0.19488     -0.00000     -0.00000      0.00000     -0.00000     -1.10831 \n     0.00000     -0.00000      0.00000      0.01615      0.00000      0.00000     -0.00000     -0.00000     -0.19488      0.00000     -1.10831      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99113     -0.39247      0.00000     -0.00000     -0.00000     -0.12558     -0.00000      0.00000     -0.00000      0.05484      0.00000     -0.00000      0.00000 \n    -0.02453      1.04153     -0.00000      0.00000      0.00000      0.39120      0.00000     -0.00000      0.00000     -0.17721     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.98241      0.00000     -0.00000      0.32161      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.20081 \n     0.00000      0.00000     -0.98241      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.32161     -0.00000      0.00000     -0.20081      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.98241     -0.00000     -0.00000      0.32161      0.00000      0.00000     -0.20081     -0.00000     -0.00000 \n     0.00459      0.08271      0.00000     -0.00000     -0.00000     -1.03234     -0.00000      0.00000     -0.00000      0.54729      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05761     -0.00000      0.00000     -0.93508     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.71073 \n     0.00000      0.00000     -0.05761      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.93508      0.00000     -0.00000      0.71073     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.05761      0.00000      0.00000     -0.93508     -0.00000     -0.00000      0.71073      0.00000     -0.00000 \n    -0.00171     -0.02613      0.00000     -0.00000     -0.00000     -0.02107     -0.00000      0.00000     -0.00000     -1.12074     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.01615      0.00000      0.00000     -0.19488      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.10831 \n     0.00000      0.00000      0.01615     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.19488     -0.00000     -0.00000     -1.10831      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.01615     -0.00000     -0.00000     -0.19488      0.00000      0.00000     -1.10831      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ca\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.32400     -0.90981      0.00000      0.00000      0.00000      0.24362      0.00000      0.00000      0.00000     -0.07189      0.00000      0.00000      0.00000 \n    -0.90981      2.56150      0.00000      0.00000      0.00000     -0.80862      0.00000      0.00000      0.00000      0.24551      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.17796      0.00000      0.00000      0.00000     -0.59245      0.00000      0.00000      0.00000     -0.11062      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.17796      0.00000      0.00000      0.00000     -0.59245      0.00000      0.00000      0.00000     -0.11062      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.17796      0.00000      0.00000      0.00000     -0.59245      0.00000      0.00000      0.00000     -0.11062 \n     0.24362     -0.80862      0.00000      0.00000      0.00000      2.50521      0.00000      0.00000      0.00000     -0.82612      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.59245      0.00000      0.00000      0.00000      1.98020      0.00000      0.00000      0.00000      0.25332      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.59245      0.00000      0.00000      0.00000      1.98020      0.00000      0.00000      0.00000      0.25332      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.59245      0.00000      0.00000      0.00000      1.98020      0.00000      0.00000      0.00000      0.25332 \n    -0.07189      0.24551      0.00000      0.00000      0.00000     -0.82612      0.00000      0.00000      0.00000      2.27262      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.11062      0.00000      0.00000      0.00000      0.25332      0.00000      0.00000      0.00000      0.03301      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.11062      0.00000      0.00000      0.00000      0.25332      0.00000      0.00000      0.00000      0.03301      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.11062      0.00000      0.00000      0.00000      0.25332      0.00000      0.00000      0.00000      0.03301 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -142.12610    -14.54356    -11.99670    -11.99670    -11.99670     -1.60684     -0.94161     -0.94161     -0.94161     -0.09356      0.05183      0.05183      0.05183 \n   </alphaeps>\n   <betaeps>\n  -142.12610    -14.54356    -11.99670    -11.99670    -11.99670     -1.60684     -0.94161     -0.94161     -0.94161     -0.09356      0.05183      0.05183      0.05183 \n   </betaeps>\n   <alphavectors>\n    -0.99141      0.39882      0.00000      0.00000      0.00000     -0.13447     -0.00000      0.00000     -0.00000     -0.04434      0.00000     -0.00000      0.00000 \n    -0.02339     -1.04349      0.00000      0.00000     -0.00000      0.41403      0.00000     -0.00000     -0.00000      0.14111      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.98353     -0.00000     -0.00000      0.34878      0.00000     -0.00000      0.00000      0.00000     -0.15405     -0.00000 \n     0.00000     -0.00000     -0.98353     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.34878     -0.00000      0.15405      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.98353     -0.00000     -0.00000     -0.34878      0.00000      0.00000     -0.00000      0.00000      0.15405 \n     0.00410     -0.08017      0.00000      0.00000     -0.00000     -1.04072     -0.00000     -0.00000     -0.00000     -0.40381     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.05121      0.00000      0.00000     -0.99372     -0.00000     -0.00000     -0.00000      0.00000      0.52099     -0.00000 \n    -0.00000     -0.00000     -0.05121     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.99372     -0.00000     -0.52099      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.05121      0.00000      0.00000      0.99372      0.00000     -0.00000     -0.00000     -0.00000     -0.52099 \n    -0.00118      0.01932     -0.00000     -0.00000     -0.00000     -0.01808     -0.00000      0.00000     -0.00000      1.06565      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.01084     -0.00000      0.00000     -0.12802      0.00000      0.00000      0.00000     -0.00000     -1.06216      0.00000 \n     0.00000      0.00000      0.01084      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.12802     -0.00000      1.06216     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.01084      0.00000      0.00000      0.12802     -0.00000      0.00000      0.00000      0.00000      1.06216 \n   </alphavectors>\n   <betavectors>\n     0.99141      0.39882     -0.00000      0.00000     -0.00000     -0.13447     -0.00000      0.00000      0.00000     -0.04434     -0.00000     -0.00000      0.00000 \n     0.02339     -1.04349      0.00000      0.00000      0.00000      0.41403     -0.00000     -0.00000     -0.00000      0.14111      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.98353      0.00000      0.00000      0.34878      0.00000     -0.00000     -0.00000     -0.00000      0.15405      0.00000 \n    -0.00000      0.00000     -0.98353     -0.00000     -0.00000     -0.00000     -0.00000     -0.34878      0.00000      0.00000      0.00000      0.00000     -0.15405 \n     0.00000      0.00000      0.00000      0.00000     -0.98353     -0.00000     -0.00000      0.00000      0.34878      0.00000     -0.15405      0.00000     -0.00000 \n    -0.00410     -0.08017     -0.00000     -0.00000     -0.00000     -1.04072      0.00000      0.00000      0.00000     -0.40381     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.05121     -0.00000     -0.00000     -0.99372     -0.00000      0.00000      0.00000      0.00000     -0.52099      0.00000 \n    -0.00000      0.00000     -0.05121     -0.00000     -0.00000      0.00000     -0.00000      0.99372     -0.00000     -0.00000     -0.00000     -0.00000      0.52099 \n    -0.00000     -0.00000      0.00000      0.00000     -0.05121      0.00000      0.00000     -0.00000     -0.99372     -0.00000      0.52099     -0.00000      0.00000 \n     0.00118      0.01932      0.00000      0.00000      0.00000     -0.01808      0.00000     -0.00000      0.00000      1.06565      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.01084      0.00000     -0.00000     -0.12802      0.00000     -0.00000     -0.00000     -0.00000      1.06216     -0.00000 \n     0.00000     -0.00000      0.01084      0.00000      0.00000     -0.00000      0.00000      0.12802     -0.00000      0.00000     -0.00000     -0.00000     -1.06216 \n     0.00000      0.00000     -0.00000     -0.00000      0.01084     -0.00000     -0.00000     -0.00000     -0.12802      0.00000     -1.06216     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Y\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.48004     -1.20829      0.00000      0.00000      0.00000      0.50453      0.00000      0.00000      0.00000     -0.04333      0.00000      0.00000     -0.04333      0.00000     -0.04333     -0.26088      0.00000      0.00000      0.00000      0.06858      0.00000      0.00000      0.06858      0.00000      0.06858      0.05398      0.00000      0.00000      0.00000 \n    -1.20829      3.06195      0.00000      0.00000      0.00000     -1.52539      0.00000      0.00000      0.00000      0.16267      0.00000      0.00000      0.16267      0.00000      0.16267      0.97604      0.00000      0.00000      0.00000     -0.31394      0.00000      0.00000     -0.31394      0.00000     -0.31394     -0.15754      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.45037      0.00000      0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25952      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00776      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.45037      0.00000      0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25952      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00776      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.45037      0.00000      0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25952      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00776 \n     0.50453     -1.52539      0.00000      0.00000      0.00000      3.68757      0.00000      0.00000      0.00000     -0.69016      0.00000      0.00000     -0.69016      0.00000     -0.69016     -3.43341      0.00000      0.00000      0.00000      1.40749      0.00000      0.00000      1.40749      0.00000      1.40749      0.46928      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      2.67702      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02042      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      2.67702      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02042      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.09650      0.00000      0.00000      0.00000      2.67702      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02042 \n    -0.04333      0.16267      0.00000      0.00000      0.00000     -0.69016      0.00000      0.00000      0.00000      7.02944      0.00000      0.00000     -2.85427      0.00000     -2.85425      0.54567      0.00000      0.00000      0.00000     -4.11303      0.00000      0.00000      1.73129      0.00000      1.73129     -0.50757      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     19.76746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     19.76746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04333      0.16267      0.00000      0.00000      0.00000     -0.69016      0.00000      0.00000      0.00000     -2.85427      0.00000      0.00000      7.02942      0.00000     -2.85423      0.54567      0.00000      0.00000      0.00000      1.73128      0.00000      0.00000     -4.11303      0.00000      1.73127     -0.50757      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     19.76746      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04333      0.16267      0.00000      0.00000      0.00000     -0.69016      0.00000      0.00000      0.00000     -2.85425      0.00000      0.00000     -2.85423      0.00000      7.02941      0.54567      0.00000      0.00000      0.00000      1.73129      0.00000      0.00000      1.73127      0.00000     -4.11302     -0.50757      0.00000      0.00000      0.00000 \n    -0.26088      0.97604      0.00000      0.00000      0.00000     -3.43341      0.00000      0.00000      0.00000      0.54567      0.00000      0.00000      0.54567      0.00000      0.54567      9.76616      0.00000      0.00000      0.00000     -3.46917      0.00000      0.00000     -3.46917      0.00000     -3.46917      2.53123      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.25952      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.25952      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.25952      0.00000      0.00000      0.00000     -0.75531      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111 \n     0.06858     -0.31394      0.00000      0.00000      0.00000      1.40749      0.00000      0.00000      0.00000     -4.11303      0.00000      0.00000      1.73128      0.00000      1.73129     -3.46917      0.00000      0.00000      0.00000      3.55817      0.00000      0.00000      0.10238      0.00000      0.10237     -0.80972      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.91154      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.91154      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06858     -0.31394      0.00000      0.00000      0.00000      1.40749      0.00000      0.00000      0.00000      1.73129      0.00000      0.00000     -4.11303      0.00000      1.73127     -3.46917      0.00000      0.00000      0.00000      0.10238      0.00000      0.00000      3.55817      0.00000      0.10239     -0.80972      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000    -11.68861      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.91154      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.06858     -0.31394      0.00000      0.00000      0.00000      1.40749      0.00000      0.00000      0.00000      1.73129      0.00000      0.00000      1.73127      0.00000     -4.11302     -3.46917      0.00000      0.00000      0.00000      0.10237      0.00000      0.00000      0.10239      0.00000      3.55817     -0.80972      0.00000      0.00000      0.00000 \n     0.05398     -0.15754      0.00000      0.00000      0.00000      0.46928      0.00000      0.00000      0.00000     -0.50757      0.00000      0.00000     -0.50757      0.00000     -0.50757      2.53123      0.00000      0.00000      0.00000     -0.80972      0.00000      0.00000     -0.80972      0.00000     -0.80972      1.85990      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00776      0.00000      0.00000      0.00000      0.02042      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34690      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00776      0.00000      0.00000      0.00000      0.02042      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34690      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00776      0.00000      0.00000      0.00000      0.02042      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05111      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34690 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.16658      0.16658      0.16658      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.16675      0.16675      0.16675      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -609.38680    -89.44959    -84.25176    -84.25176    -84.25176    -17.24291    -15.00992    -15.00992    -15.00992     -4.23798     -4.23798     -4.23798     -4.23798     -4.23798     -2.40561     -1.48394     -1.48394     -1.48394     -0.21636     -0.10595     -0.10595     -0.10595      0.21986      0.21986      0.21986      0.21986      0.21986      1.11119      4.60831 \n   </alphaeps>\n   <betaeps>\n  -609.38680    -89.44959    -84.25176    -84.25176    -84.25176    -17.24291    -15.00992    -15.00992    -15.00992     -4.23798     -4.23798     -4.23798     -4.23798     -4.23798     -2.40561     -1.48394     -1.48394     -1.48394     -0.21637     -0.10596     -0.10596     -0.10596      0.21986      0.21986      0.21986      0.21986      0.21986      1.11119      4.60831 \n   </betaeps>\n   <alphavectors>\n     0.99386      0.44353      0.00000     -0.00000      0.00000      0.21519     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.09260      0.00000      0.00000     -0.00000      0.02577     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.11600     -0.07295 \n     0.01500     -1.03828     -0.00000      0.00000     -0.00000     -0.60860      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.27660     -0.00000     -0.00000      0.00000     -0.07630      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.34731      0.24832 \n    -0.00000     -0.00000      0.99878      0.00000     -0.00000     -0.00000      0.00000     -0.46331      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.11357     -0.00000      0.00000      0.00000     -0.02059     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.99878      0.00000      0.00000      0.46331     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.11357      0.00000     -0.00000     -0.00000      0.02059     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.99878     -0.00000      0.00000      0.00000      0.46331      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11357      0.00000      0.00000      0.00000     -0.02059     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00336     -0.13266     -0.00000      0.00000     -0.00000      1.13251     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.69711      0.00000      0.00000     -0.00000      0.24007     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.21232     -0.34079 \n     0.00000      0.00000      0.00286     -0.00000      0.00000      0.00000     -0.00000      1.10624     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.33778      0.00000     -0.00000     -0.00000      0.06185      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00286     -0.00000     -0.00000     -1.10624      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.33778     -0.00000      0.00000      0.00000     -0.06185      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00286      0.00000     -0.00000     -0.00000     -1.10624     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.33778     -0.00000     -0.00000     -0.00000      0.06185      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00116      0.04728      0.00000     -0.00000      0.00000     -0.00602      0.00000      0.00000     -0.00000      1.57192     -0.00000     -0.00000     -0.00000      0.90755      0.38569     -0.00000      0.00000     -0.00000     -0.26292     -0.00000     -0.00000     -0.00000     -0.00000      0.98843     -0.00000      0.00000      0.57067      1.77112     -0.48919 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -3.14384      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.97686     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      3.14384      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.97686      0.00000      0.00000     -0.00000     -0.00000 \n     0.00116      0.04728      0.00000     -0.00000      0.00000     -0.00602      0.00000      0.00000      0.00000     -1.57192      0.00000      0.00000      0.00000      0.90754      0.38569      0.00000     -0.00000      0.00000     -0.26292      0.00000      0.00000      0.00000     -0.00000     -0.98843     -0.00000     -0.00000      0.57067      1.77112     -0.48919 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -3.14384      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.97686      0.00000      0.00000      0.00000 \n     0.00116      0.04728      0.00000     -0.00000      0.00000     -0.00602      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.81509      0.38569     -0.00000      0.00000      0.00000     -0.26292      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.14134      1.77112     -0.48919 \n     0.01141      0.31708      0.00000     -0.00000      0.00000     -0.80185      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.55242     -0.00000     -0.00000     -0.00000      1.31509      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000    -12.80125     34.46859 \n    -0.00000     -0.00000      0.00106      0.00000     -0.00000     -0.00000      0.00000     -0.01895      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.04922     -0.00000      0.00000      0.00000     -0.22204     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00106      0.00000      0.00000      0.01895     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.04922      0.00000     -0.00000     -0.00000      0.22204      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00106     -0.00000      0.00000      0.00000      0.01895      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.04922      0.00000      0.00000     -0.00000     -0.22204     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00580     -0.17161     -0.00000      0.00000     -0.00000      0.35730     -0.00000     -0.00000      0.00000     -0.92949      0.00000      0.00000      0.00000     -0.53664     -0.54127      0.00000     -0.00000      0.00000     -0.42076      0.00000      0.00000      0.00000      0.00000     -1.60747      0.00000     -0.00000     -0.92808      4.16254    -14.97667 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.85897     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      3.21495      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.85897     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      3.21495     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00580     -0.17161     -0.00000      0.00000     -0.00000      0.35730     -0.00000     -0.00000     -0.00000      0.92949     -0.00000     -0.00000     -0.00000     -0.53664     -0.54127     -0.00000      0.00000     -0.00000     -0.42076     -0.00000     -0.00000     -0.00000      0.00000      1.60747      0.00000     -0.00000     -0.92807      4.16254    -14.97667 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.85897     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      3.21495     -0.00000     -0.00000     -0.00000 \n    -0.00580     -0.17161     -0.00000      0.00000     -0.00000      0.35730     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.07328     -0.54127      0.00000     -0.00000     -0.00000     -0.42076     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.85615      4.16254    -14.97667 \n     0.00006      0.00325      0.00000     -0.00000      0.00000      0.00253     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00100      0.00000      0.00000     -0.00000      0.96433     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.42904     -0.10929 \n     0.00000      0.00000     -0.00018     -0.00000      0.00000      0.00000     -0.00000      0.00329     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.01167      0.00000     -0.00000     -0.00000      1.01972      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00018     -0.00000     -0.00000     -0.00329      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.01167     -0.00000      0.00000      0.00000     -1.01972      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00018      0.00000     -0.00000     -0.00000     -0.00329     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.01167     -0.00000     -0.00000     -0.00000      1.01972      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99386     -0.44353     -0.00000      0.00000      0.00000     -0.21519     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.09260      0.00000     -0.00000     -0.00000     -0.02577     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.11600      0.07295 \n     0.01500      1.03828      0.00000     -0.00000     -0.00000      0.60860      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.27660     -0.00000      0.00000      0.00000      0.07630      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.34731     -0.24832 \n     0.00000     -0.00000     -0.00000     -0.99878     -0.00000     -0.00000      0.00000      0.46331      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.11357      0.00000     -0.00000      0.00000      0.02059      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.99878     -0.00000      0.46331     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.11357     -0.00000      0.00000     -0.00000     -0.02059     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.99878      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.46331     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.11357      0.00000      0.00000     -0.00000      0.02059     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00336      0.13266     -0.00000      0.00000      0.00000     -1.13251     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.69711      0.00000     -0.00000     -0.00000     -0.24007     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.21232      0.34079 \n    -0.00000      0.00000     -0.00000     -0.00286      0.00000      0.00000     -0.00000     -1.10624     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.33778     -0.00000      0.00000     -0.00000     -0.06185     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00286      0.00000     -1.10624      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.33778      0.00000     -0.00000      0.00000      0.06185      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00286      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.10624     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.33778     -0.00000     -0.00000      0.00000     -0.06185      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00116     -0.04728     -0.00000      0.00000      0.00000      0.00602      0.00000     -0.00000      0.00000     -0.90752     -0.00000      0.00000      1.57193     -0.00000     -0.38569     -0.00000      0.00000      0.00000      0.26291      0.00000      0.00000     -0.00000      0.57067      0.00000     -0.00000      0.98843     -0.00000      1.77112      0.48919 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      3.14384     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.97686      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      3.14384      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.97686     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00116     -0.04728     -0.00000      0.00000      0.00000      0.00602      0.00000     -0.00000      0.00000     -0.90757     -0.00000      0.00000     -1.57190     -0.00000     -0.38569     -0.00000      0.00000      0.00000      0.26291      0.00000      0.00000     -0.00000      0.57067      0.00000     -0.00000     -0.98843     -0.00000      1.77112      0.48919 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -3.14384      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.97686     -0.00000      0.00000      0.00000      0.00000 \n     0.00116     -0.04728     -0.00000      0.00000      0.00000      0.00602      0.00000     -0.00000      0.00000      1.81509     -0.00000      0.00000     -0.00003     -0.00000     -0.38569     -0.00000      0.00000      0.00000      0.26291     -0.00000      0.00000     -0.00000     -1.14134      0.00000     -0.00000     -0.00000     -0.00000      1.77112      0.48919 \n     0.01141     -0.31708      0.00000     -0.00000     -0.00000      0.80185      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.55243      0.00000      0.00000      0.00000     -1.31506     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000    -12.80126    -34.46859 \n     0.00000     -0.00000      0.00000     -0.00106     -0.00000     -0.00000      0.00000      0.01895      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.04922      0.00000     -0.00000      0.00000      0.22204      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00106     -0.00000      0.01895     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.04922     -0.00000      0.00000     -0.00000     -0.22204      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00106      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.01895     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.04922      0.00000      0.00000     -0.00000      0.22204     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00580      0.17161     -0.00000      0.00000      0.00000     -0.35730     -0.00000      0.00000     -0.00000      0.53663     -0.00000     -0.00000     -0.92949      0.00000      0.54127     -0.00000     -0.00000     -0.00000      0.42075      0.00000      0.00000     -0.00000     -0.92807      0.00000     -0.00000     -1.60747     -0.00000      4.16254     14.97667 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.85897      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -3.21495     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.85897     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -3.21495      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00580      0.17161     -0.00000      0.00000      0.00000     -0.35730     -0.00000      0.00000     -0.00000      0.53665     -0.00000     -0.00000      0.92948      0.00000      0.54127     -0.00000     -0.00000     -0.00000      0.42075      0.00000      0.00000     -0.00000     -0.92808      0.00000     -0.00000      1.60747     -0.00000      4.16254     14.97667 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.85897     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -3.21495      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00580      0.17161     -0.00000      0.00000      0.00000     -0.35730     -0.00000      0.00000     -0.00000     -1.07328     -0.00000     -0.00000      0.00002      0.00000      0.54127     -0.00000     -0.00000     -0.00000      0.42075      0.00000      0.00000     -0.00000      1.85615      0.00000     -0.00000      0.00000     -0.00000      4.16254     14.97667 \n     0.00006     -0.00325      0.00000     -0.00000     -0.00000     -0.00253     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00100     -0.00000     -0.00000     -0.00000     -0.96433     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.42904      0.10929 \n    -0.00000      0.00000     -0.00000      0.00018      0.00000      0.00000     -0.00000     -0.00329     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.01167     -0.00000      0.00000     -0.00000     -1.01972     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00018      0.00000     -0.00329      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.01167      0.00000     -0.00000      0.00000      1.01972      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00018     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00329      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.01167      0.00000      0.00000      0.00000     -1.01972      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Zr\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.40961     -1.09988      0.00000      0.00000      0.00000      2.51681      0.00000      0.00000      0.00000     -0.96281      0.00000      0.00000     -0.96281      0.00000     -0.96281     -0.07733      0.00000      0.00000      0.00000      0.11695      0.00000      0.00000      0.11695      0.00000      0.11695     -0.24455      0.00000      0.00000      0.00000 \n    -1.09988      2.98362      0.00000      0.00000      0.00000     -7.15115      0.00000      0.00000      0.00000      2.64766      0.00000      0.00000      2.64766      0.00000      2.64766      0.29364      0.00000      0.00000      0.00000     -0.33488      0.00000      0.00000     -0.33488      0.00000     -0.33488      0.66054      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.47112      0.00000      0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22330      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06055      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.47112      0.00000      0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22330      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06055      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.47112      0.00000      0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22330      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06055 \n     2.51681     -7.15115      0.00000      0.00000      0.00000     19.82224      0.00000      0.00000      0.00000     -6.44978      0.00000      0.00000     -6.44978      0.00000     -6.44978     -1.66295      0.00000      0.00000      0.00000      0.86883      0.00000      0.00000      0.86883      0.00000      0.86883     -1.51752      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      2.65735      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15236      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      2.65735      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15236      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.11715      0.00000      0.00000      0.00000      2.65735      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15236 \n    -0.96281      2.64766      0.00000      0.00000      0.00000     -6.44978      0.00000      0.00000      0.00000      4.34833      0.00000      0.00000      1.35651      0.00000      1.35650      0.27472      0.00000      0.00000      0.00000     -0.25745      0.00000      0.00000     -0.31239      0.00000     -0.31240      0.58588      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.98364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.98364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.96281      2.64766      0.00000      0.00000      0.00000     -6.44978      0.00000      0.00000      0.00000      1.35651      0.00000      0.00000      4.34833      0.00000      1.35649      0.27472      0.00000      0.00000      0.00000     -0.31239      0.00000      0.00000     -0.25745      0.00000     -0.31239      0.58588      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.98364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.96281      2.64766      0.00000      0.00000      0.00000     -6.44978      0.00000      0.00000      0.00000      1.35650      0.00000      0.00000      1.35649      0.00000      4.34833      0.27472      0.00000      0.00000      0.00000     -0.31239      0.00000      0.00000     -0.31239      0.00000     -0.25745      0.58588      0.00000      0.00000      0.00000 \n    -0.07733      0.29364      0.00000      0.00000      0.00000     -1.66295      0.00000      0.00000      0.00000      0.27472      0.00000      0.00000      0.27472      0.00000      0.27472      3.31194      0.00000      0.00000      0.00000     -0.34193      0.00000      0.00000     -0.34193      0.00000     -0.34193     -0.79265      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.22330      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.99563      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.22330      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.99563      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.22330      0.00000      0.00000      0.00000     -0.65369      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.99563      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912 \n     0.11695     -0.33488      0.00000      0.00000      0.00000      0.86883      0.00000      0.00000      0.00000     -0.25745      0.00000      0.00000     -0.31239      0.00000     -0.31239     -0.34193      0.00000      0.00000      0.00000      2.35029      0.00000      0.00000      1.74526      0.00000      1.74526     -2.31099      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.21005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.21005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.11695     -0.33488      0.00000      0.00000      0.00000      0.86883      0.00000      0.00000      0.00000     -0.31239      0.00000      0.00000     -0.25745      0.00000     -0.31239     -0.34193      0.00000      0.00000      0.00000      1.74526      0.00000      0.00000      2.35029      0.00000      1.74527     -2.31099      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10989      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.21005      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.11695     -0.33488      0.00000      0.00000      0.00000      0.86883      0.00000      0.00000      0.00000     -0.31240      0.00000      0.00000     -0.31239      0.00000     -0.25745     -0.34193      0.00000      0.00000      0.00000      1.74526      0.00000      0.00000      1.74527      0.00000      2.35029     -2.31099      0.00000      0.00000      0.00000 \n    -0.24455      0.66054      0.00000      0.00000      0.00000     -1.51752      0.00000      0.00000      0.00000      0.58588      0.00000      0.00000      0.58588      0.00000      0.58588     -0.79265      0.00000      0.00000      0.00000     -2.31099      0.00000      0.00000     -2.31099      0.00000     -2.31099      3.24734      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.06055      0.00000      0.00000      0.00000     -0.15236      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01976      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.06055      0.00000      0.00000      0.00000     -0.15236      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01976      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.06055      0.00000      0.00000      0.00000     -0.15236      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17912      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01976 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.40050      0.40050      0.40050      0.40050      0.40050      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99547      0.00041      0.00041      0.00041      0.00041      0.00041      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -632.83490    -85.70121    -79.61686    -79.61686    -79.61686    -13.70424    -11.23626    -11.23626    -11.23626     -5.81456     -5.81456     -5.81456     -5.81456     -5.81456     -1.90607     -1.20926     -1.20926     -1.20926     -0.09848     -0.01845     -0.01845     -0.01845     -0.01845     -0.01845      0.23507      0.23507      0.23507      0.71468    123.37530 \n   </alphaeps>\n   <betaeps>\n  -632.83510    -85.70090    -79.61668    -79.61668    -79.61668    -13.70390    -11.23586    -11.23586    -11.23586     -5.81408     -5.81408     -5.81408     -5.81408     -5.81408     -1.89132     -1.18988     -1.18988     -1.18988     -0.05892      0.02532      0.02532      0.02532      0.02532      0.02532      0.27506      0.27506      0.27506      0.73514    123.37680 \n   </betaeps>\n   <alphavectors>\n    -0.99473     -0.41817      0.00000     -0.00000      0.00000     -0.18691      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.07051     -0.00000      0.00000     -0.00000      0.02332     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.06640      0.53706 \n    -0.01401      1.04226     -0.00000      0.00000     -0.00000      0.59070     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.22318      0.00000     -0.00000      0.00000     -0.08110      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.15819     -0.16182 \n     0.00000      0.00000      0.99522      0.00000     -0.00000      0.00000     -0.47040     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.15375     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.11190     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.99522      0.00000     -0.00000      0.00000      0.47040      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.15375     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.11190      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.99522     -0.00000      0.00000      0.00000      0.47040      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.15375     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.11190      0.00000     -0.00000      0.00000 \n     0.03990     -1.89716      0.00000     -0.00000      0.00000     -2.29382      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.97995     -0.00000      0.00000     -0.00000      0.29495     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.16359    -34.86321 \n     0.00000     -0.00000      0.01108     -0.00000      0.00000     -0.00000      1.07157      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.42292      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.32561      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.01108     -0.00000      0.00000     -0.00000     -1.07157     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.42292      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.32561     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.01108      0.00000     -0.00000     -0.00000     -1.07157     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.42292      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.32561      0.00000      0.00000     -0.00000 \n    -0.01697      0.90133     -0.00000      0.00000     -0.00000      0.56192     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.96900     -0.23914     -0.20863     -0.00000     -0.00000     -0.00000     -0.06988      0.01456      0.07297      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.17630     15.72002 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.72871      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.12888      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.72871     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.12888      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.01697      0.90133     -0.00000      0.00000     -0.00000      0.56192     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.69160     -0.71961     -0.20863      0.00000      0.00000      0.00000     -0.06988     -0.07047     -0.02388     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.17630     15.72002 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.72871      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.12888     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01697      0.90133     -0.00000      0.00000     -0.00000      0.56192     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.27739      0.95875     -0.20863     -0.00000      0.00000     -0.00000     -0.06988      0.05592     -0.04909     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.17630     15.72002 \n    -0.00021     -0.06812      0.00000     -0.00000      0.00000     -0.13887      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.12183     -0.00000      0.00000     -0.00000     -0.61310      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.73882     -0.60624 \n     0.00000      0.00000      0.00007      0.00000     -0.00000      0.00000      0.08922     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.99063     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.83110     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00007      0.00000     -0.00000      0.00000     -0.08922      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.99063     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.83110      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00007     -0.00000      0.00000      0.00000     -0.08922      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.99063     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.83110      0.00000     -0.00000      0.00000 \n    -0.00122     -0.07337      0.00000     -0.00000      0.00000     -0.15122      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.03245     -0.00801     -0.31285     -0.00000     -0.00000     -0.00000      0.89690     -0.19568     -0.98096     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      3.70943     -0.28713 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05790     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.73254      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.05790      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73254      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00122     -0.07337      0.00000     -0.00000      0.00000     -0.15122      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02316     -0.02410     -0.31285      0.00000      0.00000      0.00000      0.89690      0.94737      0.32102     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      3.70943     -0.28713 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.05790     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.73254     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00122     -0.07337      0.00000     -0.00000      0.00000     -0.15122      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00929      0.03211     -0.31285     -0.00000      0.00000     -0.00000      0.89690     -0.75169      0.65994     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      3.70943     -0.28713 \n     0.00294      0.19212     -0.00000      0.00000     -0.00000      0.39350     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.76185      0.00000     -0.00000      0.00000     -0.85377      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -8.88404      0.84206 \n     0.00000     -0.00000     -0.00018     -0.00000      0.00000     -0.00000     -0.03423      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.09944      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.22178      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00018     -0.00000      0.00000     -0.00000      0.03423     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.09944      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.22178     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00018      0.00000     -0.00000     -0.00000      0.03423     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.09944      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.22178     -0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99473      0.41817      0.00000      0.00000     -0.00000     -0.18691      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.07090     -0.00000      0.00000     -0.00000      0.02219      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06636      0.53706 \n    -0.01401     -1.04226      0.00000      0.00000     -0.00000      0.59071     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.22424      0.00000     -0.00000      0.00000     -0.07813     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.15812     -0.16182 \n    -0.00000     -0.00000      0.99522      0.00000     -0.00000     -0.00000      0.47042     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.15486      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11029      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.99522     -0.00000     -0.00000      0.00000     -0.00000     -0.47042     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.15486     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.11029      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.99522      0.00000     -0.00000      0.47042      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.15486      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.11029      0.00000      0.00000     -0.00000 \n     0.03990      1.89713     -0.00000     -0.00000      0.00000     -2.29388      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.98679     -0.00000      0.00000     -0.00000      0.27665      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.16178    -34.86322 \n     0.00000      0.00000      0.01107     -0.00000      0.00000      0.00000     -1.07161      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.42618     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.32118     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.01107      0.00000      0.00000     -0.00000      0.00000      1.07161      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.42618      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.32118     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.01107     -0.00000      0.00000     -1.07161     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.42618     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.32118      0.00000     -0.00000      0.00000 \n    -0.01697     -0.90131      0.00000      0.00000     -0.00000      0.56194     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.43450      0.89855      0.20989      0.00000     -0.00000     -0.00000     -0.06686     -0.00000      0.00000      0.00000     -0.01440      0.07274     -0.00000      0.00000      0.00000     -0.17583     15.72002 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.72874      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.12843      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.72874      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.12843      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01697     -0.90131      0.00000      0.00000     -0.00000      0.56194     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.99542     -0.07298      0.20989     -0.00000      0.00000      0.00000     -0.06686     -0.00000     -0.00000     -0.00000      0.07019     -0.02390     -0.00000      0.00000      0.00000     -0.17583     15.72002 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.72874     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.12843      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.01697     -0.90131      0.00000      0.00000     -0.00000      0.56194     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.56091     -0.82557      0.20989      0.00000      0.00000      0.00000     -0.06686      0.00000      0.00000     -0.00000     -0.05579     -0.04884     -0.00000      0.00000      0.00000     -0.17583     15.72002 \n    -0.00021      0.06811      0.00000      0.00000     -0.00000     -0.13880      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.12809      0.00000     -0.00000      0.00000     -0.59896     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.74088     -0.60624 \n    -0.00000     -0.00000      0.00007      0.00000     -0.00000     -0.00000     -0.08911     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.99919      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.82080     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00007     -0.00000     -0.00000      0.00000     -0.00000      0.08911     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.99919     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.82080      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00007      0.00000     -0.00000     -0.08911      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.99919      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.82080      0.00000      0.00000     -0.00000 \n    -0.00122      0.07337      0.00000      0.00000     -0.00000     -0.15124      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.01444      0.02986      0.32483      0.00000     -0.00000     -0.00000      0.94161     -0.00000     -0.00000      0.00000      0.19429     -0.98124     -0.00000      0.00000     -0.00000     -3.69731     -0.28705 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.05745     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73256     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.05745     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.73256     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00122      0.07337      0.00000      0.00000     -0.00000     -0.15124      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.03308     -0.00243      0.32483     -0.00000      0.00000      0.00000      0.94161     -0.00000     -0.00000      0.00000     -0.94693      0.32236     -0.00000      0.00000     -0.00000     -3.69731     -0.28705 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05745      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73256     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00122      0.07337      0.00000      0.00000     -0.00000     -0.15124      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.01864     -0.02744      0.32483      0.00000      0.00000      0.00000      0.94161     -0.00000     -0.00000      0.00000      0.75263      0.65888     -0.00000      0.00000     -0.00000     -3.69731     -0.28705 \n     0.00294     -0.19212     -0.00000     -0.00000      0.00000      0.39351     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.79692     -0.00000      0.00000      0.00000     -0.96103      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      8.87001      0.84187 \n     0.00000      0.00000     -0.00018     -0.00000      0.00000      0.00000      0.03419      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.08678     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.22275     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00018      0.00000      0.00000     -0.00000      0.00000     -0.03419      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.08678      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.22275     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00018     -0.00000      0.00000      0.03419     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.08678     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.22275      0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Nb\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.41362     -1.10809      0.00000      0.00000      0.00000      2.56895      0.00000      0.00000      0.00000     -0.97773      0.00000      0.00000     -0.97773      0.00000     -0.97773     -0.03182      0.00000      0.00000      0.00000     -0.04412      0.00000      0.00000     -0.04412      0.00000     -0.04412      0.07927      0.00000      0.00000      0.00000 \n    -1.10809      3.00137      0.00000      0.00000      0.00000     -7.30629      0.00000      0.00000      0.00000      2.69241      0.00000      0.00000      2.69241      0.00000      2.69241      0.17724      0.00000      0.00000      0.00000      0.11365      0.00000      0.00000      0.11365      0.00000      0.11365     -0.22776      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.49383      0.00000      0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05255      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.49383      0.00000      0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05255      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.49383      0.00000      0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05255 \n     2.56895     -7.30629      0.00000      0.00000      0.00000     20.52492      0.00000      0.00000      0.00000     -6.66929      0.00000      0.00000     -6.66929      0.00000     -6.66929     -1.33077      0.00000      0.00000      0.00000     -0.26592      0.00000      0.00000     -0.26592      0.00000     -0.26592      0.80296      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      2.72628      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13663      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      2.72628      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13663      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.15834      0.00000      0.00000      0.00000      2.72628      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13663 \n    -0.97773      2.69241      0.00000      0.00000      0.00000     -6.66929      0.00000      0.00000      0.00000      4.40115      0.00000      0.00000      1.42996      0.00000      1.42995      0.17181      0.00000      0.00000      0.00000      0.12127      0.00000      0.00000      0.09532      0.00000      0.09532     -0.21032      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.94243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.94243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.97773      2.69241      0.00000      0.00000      0.00000     -6.66929      0.00000      0.00000      0.00000      1.42996      0.00000      0.00000      4.40117      0.00000      1.42996      0.17181      0.00000      0.00000      0.00000      0.09531      0.00000      0.00000      0.12127      0.00000      0.09531     -0.21032      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.94243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.97773      2.69241      0.00000      0.00000      0.00000     -6.66929      0.00000      0.00000      0.00000      1.42995      0.00000      0.00000      1.42996      0.00000      4.40115      0.17181      0.00000      0.00000      0.00000      0.09533      0.00000      0.00000      0.09532      0.00000      0.12127     -0.21032      0.00000      0.00000      0.00000 \n    -0.03182      0.17724      0.00000      0.00000      0.00000     -1.33077      0.00000      0.00000      0.00000      0.17181      0.00000      0.00000      0.17181      0.00000      0.17181      3.46111      0.00000      0.00000      0.00000     -0.32967      0.00000      0.00000     -0.32967      0.00000     -0.32967     -0.42542      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.25500      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.03222      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.25500      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.03222      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.25500      0.00000      0.00000      0.00000     -0.73116      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.03222      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976 \n    -0.04412      0.11365      0.00000      0.00000      0.00000     -0.26592      0.00000      0.00000      0.00000      0.12127      0.00000      0.00000      0.09531      0.00000      0.09533     -0.32967      0.00000      0.00000      0.00000      0.70960      0.00000      0.00000     -0.27263      0.00000     -0.27263     -0.16119      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.96448      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.96448      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04412      0.11365      0.00000      0.00000      0.00000     -0.26592      0.00000      0.00000      0.00000      0.09532      0.00000      0.00000      0.12127      0.00000      0.09532     -0.32967      0.00000      0.00000      0.00000     -0.27263      0.00000      0.00000      0.70961      0.00000     -0.27263     -0.16119      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05191      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.96448      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04412      0.11365      0.00000      0.00000      0.00000     -0.26592      0.00000      0.00000      0.00000      0.09532      0.00000      0.00000      0.09531      0.00000      0.12127     -0.32967      0.00000      0.00000      0.00000     -0.27263      0.00000      0.00000     -0.27263      0.00000      0.70960     -0.16119      0.00000      0.00000      0.00000 \n     0.07927     -0.22776      0.00000      0.00000      0.00000      0.80296      0.00000      0.00000      0.00000     -0.21032      0.00000      0.00000     -0.21032      0.00000     -0.21032     -0.42542      0.00000      0.00000      0.00000     -0.16119      0.00000      0.00000     -0.16119      0.00000     -0.16119      2.48453      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.05255      0.00000      0.00000      0.00000     -0.13663      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02512      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05255      0.00000      0.00000      0.00000     -0.13663      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02512      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05255      0.00000      0.00000      0.00000     -0.13663      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21976      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02512 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99989      0.63965      0.63965      0.63965      0.63965      0.63965      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.80186      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -667.08170    -91.27053    -85.00090    -85.00090    -85.00090    -14.84636    -12.29265    -12.29265    -12.29265     -6.66692     -6.66692     -6.66692     -6.66692     -6.66692     -1.96720     -1.22651     -1.22651     -1.22651     -0.06935     -0.02219     -0.02219     -0.02219     -0.02219     -0.02219      0.12515      0.12515      0.12515      0.90024    133.83860 \n   </alphaeps>\n   <betaeps>\n  -667.08150    -91.26587    -84.99727    -84.99727    -84.99727    -14.84051    -12.28646    -12.28646    -12.28646     -6.65985     -6.65985     -6.65985     -6.65985     -6.65985     -1.90600     -1.15993     -1.15993     -1.15993     -0.02913      0.06015      0.06015      0.06015      0.06015      0.06015      0.16595      0.16595      0.16595      0.95664    133.85060 \n   </betaeps>\n   <alphavectors>\n    -0.99484      0.41872     -0.00000     -0.00000     -0.00000      0.19010     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.07140      0.00000     -0.00000      0.00000     -0.02422      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05684     -0.54726 \n    -0.01382     -1.04051      0.00000      0.00000      0.00000     -0.59884      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.23190     -0.00000      0.00000     -0.00000      0.07713     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.19006      0.18248 \n     0.00000     -0.00000      0.00000      0.99571      0.00000     -0.00000     -0.47906     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.16096      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.07655      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.99571     -0.00000     -0.00000     -0.00000      0.47906     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.16096     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.07655      0.00000     -0.00000 \n    -0.00000     -0.00000      0.99571      0.00000      0.00000      0.00000      0.00000      0.47906     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.16096      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.07655      0.00000      0.00000     -0.00000      0.00000 \n     0.04245      1.91656     -0.00000     -0.00000     -0.00000      2.35098     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.97797      0.00000     -0.00000      0.00000     -0.34005      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.83783     35.02372 \n    -0.00000      0.00000     -0.00000      0.00978     -0.00000      0.00000      1.08065      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.44133     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.21441      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00978      0.00000     -0.00000     -0.00000     -1.08065      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.44133      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.21441     -0.00000      0.00000 \n     0.00000      0.00000      0.00978     -0.00000     -0.00000     -0.00000     -0.00000     -1.08065      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.44133     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.21441      0.00000     -0.00000      0.00000     -0.00000 \n    -0.01821     -0.90721      0.00000      0.00000      0.00000     -0.57888      0.00000     -0.00000      0.00000     -0.85697     -0.00000      0.00000     -0.00000      0.49477     -0.21720      0.00000     -0.00000      0.00000      0.07203     -0.09281     -0.00000      0.16076      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.18849    -15.78758 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.71395     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.32151      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.71395      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.32151      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.01821     -0.90721      0.00000      0.00000      0.00000     -0.57888      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.98955     -0.21720     -0.00000      0.00000     -0.00000      0.07203      0.18563      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.18849    -15.78758 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.71395     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32151      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01821     -0.90721      0.00000      0.00000      0.00000     -0.57888      0.00000     -0.00000      0.00000      0.85697      0.00000     -0.00000      0.00000      0.49477     -0.21720     -0.00000      0.00000     -0.00000      0.07203     -0.09281     -0.00000     -0.16076      0.00000     -0.00000      0.00000      0.00000      0.00000      0.18849    -15.78758 \n    -0.00040      0.10176     -0.00000     -0.00000     -0.00000      0.20183     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.22478     -0.00000      0.00000     -0.00000      0.44162     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.31624      0.82800 \n     0.00000     -0.00000      0.00000      0.00035      0.00000     -0.00000      0.07280     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.00398      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.59376     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00035     -0.00000     -0.00000     -0.00000     -0.07280     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.00398     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.59376      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00035      0.00000      0.00000      0.00000      0.00000     -0.07280     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.00398      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.59376     -0.00000      0.00000     -0.00000      0.00000 \n     0.00036     -0.03816      0.00000      0.00000      0.00000     -0.07469      0.00000     -0.00000     -0.00000     -0.06017     -0.00000      0.00000     -0.00000      0.03474      0.12562      0.00000     -0.00000     -0.00000      0.02962      0.50220      0.00000     -0.86984     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.69540     -0.23129 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.12035      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73969     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.12035      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73969      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00036     -0.03816      0.00000      0.00000      0.00000     -0.07469      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06948      0.12562      0.00000     -0.00000      0.00000      0.02962     -1.00441     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.69540     -0.23129 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.12035      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73969      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00036     -0.03816      0.00000      0.00000      0.00000     -0.07469      0.00000     -0.00000     -0.00000      0.06017      0.00000     -0.00000      0.00000      0.03474      0.12562     -0.00000      0.00000      0.00000      0.02962      0.50221      0.00000      0.86984     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.69540     -0.23129 \n    -0.00041      0.03321     -0.00000     -0.00000     -0.00000      0.06570     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.15541     -0.00000      0.00000     -0.00000     -1.13442      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.03643      0.16570 \n    -0.00000      0.00000     -0.00000     -0.00017     -0.00000      0.00000     -0.01806      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.11320     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.09516      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00017      0.00000      0.00000      0.00000      0.01806      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.11320      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.09516      0.00000     -0.00000 \n     0.00000      0.00000     -0.00017     -0.00000     -0.00000     -0.00000     -0.00000      0.01806     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.11320     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.09516      0.00000     -0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99484      0.41873     -0.00000      0.00000      0.00000     -0.19013     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.07190     -0.00000      0.00000     -0.00000      0.02243     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.05689      0.54725 \n    -0.01382     -1.04053      0.00000     -0.00000     -0.00000      0.59892      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.23351      0.00000     -0.00000      0.00000     -0.07113      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.19009     -0.18245 \n     0.00000      0.00000     -0.99573      0.00000     -0.00000      0.00000     -0.47913      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.16107     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.07573      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.99573     -0.00000     -0.00000     -0.00000     -0.47913      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.16107      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.07573     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.99573      0.00000     -0.00000      0.00000     -0.47913     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.16107      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.07573     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.04244      1.91638     -0.00000      0.00000      0.00000     -2.35133     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.98438     -0.00000      0.00000     -0.00000      0.31327     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.83613    -35.02382 \n     0.00000     -0.00000     -0.00975     -0.00000      0.00000     -0.00000      1.08090     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.44178      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.21219     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00975     -0.00000     -0.00000     -0.00000      1.08090     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.44178      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.21219      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00975     -0.00000      0.00000     -0.00000      1.08090      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.44178     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.21219      0.00000      0.00000      0.00000      0.00000 \n    -0.01821     -0.90711      0.00000     -0.00000     -0.00000      0.57893      0.00000     -0.00000     -0.00000      0.85713     -0.00000      0.00000     -0.00000      0.49486     -0.21842      0.00000     -0.00000      0.00000     -0.06589     -0.00000     -0.00000     -0.15993     -0.00000     -0.09233      0.00000      0.00000      0.00000      0.18751     15.78761 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.71426      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.31985     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.71426     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.31985      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.01821     -0.90711      0.00000     -0.00000      0.00000      0.57893      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.98973     -0.21842      0.00000     -0.00000      0.00000     -0.06589      0.00000      0.00000     -0.00000     -0.00000      0.18467      0.00000      0.00000     -0.00000      0.18751     15.78761 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.71426     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.31985     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.01821     -0.90711      0.00000     -0.00000     -0.00000      0.57893      0.00000     -0.00000     -0.00000     -0.85713      0.00000     -0.00000      0.00000      0.49486     -0.21842     -0.00000      0.00000      0.00000     -0.06589      0.00000      0.00000      0.15993     -0.00000     -0.09233      0.00000      0.00000      0.00000      0.18751     15.78761 \n    -0.00040      0.10174     -0.00000      0.00000     -0.00000     -0.20116     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.24556      0.00000     -0.00000      0.00000     -0.37488      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      2.31705     -0.82782 \n     0.00000      0.00000     -0.00035      0.00000     -0.00000      0.00000      0.07221      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.00684     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.58898      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00035     -0.00000     -0.00000     -0.00000      0.07221      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.00684     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.58898     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00035      0.00000     -0.00000      0.00000      0.07221     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.00684      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.58898      0.00000      0.00000     -0.00000     -0.00000 \n     0.00036     -0.03816      0.00000     -0.00000      0.00000      0.07452      0.00000     -0.00000      0.00000      0.05933     -0.00000      0.00000     -0.00000      0.03426      0.13956      0.00000     -0.00000     -0.00000     -0.07576     -0.00000     -0.00000      0.86990     -0.00000      0.50224      0.00000      0.00000     -0.00000     -1.69289      0.23118 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.11866     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73980     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.11866     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73980      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00036     -0.03816      0.00000     -0.00000      0.00000      0.07452      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06851      0.13956     -0.00000      0.00000      0.00000     -0.07576      0.00000      0.00000      0.00000     -0.00000     -1.00447     -0.00000     -0.00000      0.00000     -1.69289      0.23118 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.11866      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73980      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00036     -0.03816      0.00000     -0.00000      0.00000      0.07452      0.00000     -0.00000      0.00000     -0.05933      0.00000     -0.00000      0.00000      0.03426      0.13956     -0.00000      0.00000     -0.00000     -0.07576      0.00000      0.00000     -0.86990     -0.00000      0.50224      0.00000      0.00000     -0.00000     -1.69289      0.23118 \n    -0.00041      0.03321     -0.00000      0.00000      0.00000     -0.06562     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.16820      0.00000     -0.00000     -0.00000      1.18946     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      2.00376     -0.16559 \n     0.00000     -0.00000      0.00017     -0.00000      0.00000     -0.00000     -0.01799     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.10798      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.09568      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00017      0.00000      0.00000      0.00000     -0.01799     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.10798      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.09568      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00017     -0.00000      0.00000     -0.00000     -0.01799     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.10798     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.09568      0.00000     -0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mo\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.41730     -1.11668      0.00000      0.00000      0.00000      2.58565      0.00000      0.00000      0.00000     -0.98118      0.00000      0.00000     -0.98118      0.00000     -0.98118     -0.02475      0.00000      0.00000      0.00000     -0.04595      0.00000      0.00000     -0.04595      0.00000     -0.04595      0.07298      0.00000      0.00000      0.00000 \n    -1.11668      3.02519      0.00000      0.00000      0.00000     -7.39785      0.00000      0.00000      0.00000      2.71847      0.00000      0.00000      2.71847      0.00000      2.71847      0.16356      0.00000      0.00000      0.00000      0.11928      0.00000      0.00000      0.11928      0.00000      0.11928     -0.21411      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.51593      0.00000      0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.27344      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05326      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.51593      0.00000      0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.27344      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05326      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.51593      0.00000      0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.27344      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05326 \n     2.58565     -7.39785      0.00000      0.00000      0.00000     20.91168      0.00000      0.00000      0.00000     -6.77910      0.00000      0.00000     -6.77910      0.00000     -6.77910     -1.34249      0.00000      0.00000      0.00000     -0.28487      0.00000      0.00000     -0.28487      0.00000     -0.28487      0.78862      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      2.77180      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13888      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      2.77180      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13888      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.19359      0.00000      0.00000      0.00000      2.77180      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13888 \n    -0.98118      2.71847      0.00000      0.00000      0.00000     -6.77910      0.00000      0.00000      0.00000      4.43645      0.00000      0.00000      1.45566      0.00000      1.45566      0.16690      0.00000      0.00000      0.00000      0.07159      0.00000      0.00000      0.12788      0.00000      0.12788     -0.19957      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.96159      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.96159      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.98118      2.71847      0.00000      0.00000      0.00000     -6.77910      0.00000      0.00000      0.00000      1.45566      0.00000      0.00000      4.43646      0.00000      1.45565      0.16690      0.00000      0.00000      0.00000      0.12787      0.00000      0.00000      0.07160      0.00000      0.12788     -0.19957      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.96159      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.98118      2.71847      0.00000      0.00000      0.00000     -6.77910      0.00000      0.00000      0.00000      1.45566      0.00000      0.00000      1.45565      0.00000      4.43645      0.16690      0.00000      0.00000      0.00000      0.12789      0.00000      0.00000      0.12788      0.00000      0.07159     -0.19957      0.00000      0.00000      0.00000 \n    -0.02475      0.16356      0.00000      0.00000      0.00000     -1.34249      0.00000      0.00000      0.00000      0.16690      0.00000      0.00000      0.16690      0.00000      0.16690      3.55382      0.00000      0.00000      0.00000     -0.32022      0.00000      0.00000     -0.32022      0.00000     -0.32022     -0.51507      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.27344      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.05557      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.27344      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.05557      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.27344      0.00000      0.00000      0.00000     -0.77340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.05557      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681 \n    -0.04595      0.11928      0.00000      0.00000      0.00000     -0.28487      0.00000      0.00000      0.00000      0.07159      0.00000      0.00000      0.12787      0.00000      0.12789     -0.32022      0.00000      0.00000      0.00000      0.89783      0.00000      0.00000     -0.38003      0.00000     -0.38003     -0.09999      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.55572      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.55572      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04595      0.11928      0.00000      0.00000      0.00000     -0.28487      0.00000      0.00000      0.00000      0.12788      0.00000      0.00000      0.07160      0.00000      0.12788     -0.32022      0.00000      0.00000      0.00000     -0.38003      0.00000      0.00000      0.89784      0.00000     -0.38002     -0.09999      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.11256      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.55572      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04595      0.11928      0.00000      0.00000      0.00000     -0.28487      0.00000      0.00000      0.00000      0.12788      0.00000      0.00000      0.12788      0.00000      0.07159     -0.32022      0.00000      0.00000      0.00000     -0.38003      0.00000      0.00000     -0.38002      0.00000      0.89785     -0.09999      0.00000      0.00000      0.00000 \n     0.07298     -0.21411      0.00000      0.00000      0.00000      0.78862      0.00000      0.00000      0.00000     -0.19957      0.00000      0.00000     -0.19957      0.00000     -0.19957     -0.51507      0.00000      0.00000      0.00000     -0.09999      0.00000      0.00000     -0.09999      0.00000     -0.09999      2.34799      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.05326      0.00000      0.00000      0.00000     -0.13888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02618      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05326      0.00000      0.00000      0.00000     -0.13888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02618      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05326      0.00000      0.00000      0.00000     -0.13888      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.22681      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02618 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99996      0.82834      0.82834      0.82834      0.82834      0.82834      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.85832      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -702.26820    -97.04339    -90.56350    -90.56350    -90.56350    -16.09375    -13.45394    -13.45394    -13.45394     -7.59555     -7.59555     -7.59555     -7.59555     -7.59555     -2.13062     -1.33787     -1.33787     -1.33787     -0.06124     -0.01848     -0.01848     -0.01848     -0.01848     -0.01848      0.14037      0.14037      0.14037      1.09337    144.03570 \n   </alphaeps>\n   <betaeps>\n  -702.26800    -97.03485    -90.55680    -90.55680    -90.55680    -16.08327    -13.44298    -13.44298    -13.44298     -7.58298     -7.58298     -7.58298     -7.58298     -7.58298     -2.03828     -1.24078     -1.24078     -1.24078     -0.02025      0.09084      0.09084      0.09084      0.09084      0.09084      0.18242      0.18242      0.18242      1.16623    144.05630 \n   </betaeps>\n   <alphavectors>\n     0.99506      0.41879     -0.00000     -0.00000      0.00000     -0.19222      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.07461     -0.00000      0.00000      0.00000     -0.02520      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.06335     -0.55568 \n     0.01345     -1.03884      0.00000      0.00000     -0.00000      0.60655     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.24323      0.00000     -0.00000     -0.00000      0.08073     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.21232      0.19707 \n     0.00000      0.00000      0.99641     -0.00000      0.00000      0.00000     -0.48663      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.16828     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.07654     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.99641      0.00000     -0.00000      0.48663     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.16828      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.07654      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.99641     -0.00000     -0.00000      0.00000     -0.00000      0.48663     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.16828      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.07654      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.04750      1.90629     -0.00000     -0.00000      0.00000     -2.37557      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.02977     -0.00000      0.00000      0.00000     -0.35622      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.96009     35.03829 \n     0.00000     -0.00000      0.00805      0.00000     -0.00000     -0.00000      1.08446     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.45795      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.21274      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00805     -0.00000      0.00000     -1.08446      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.45795     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.21274     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00805      0.00000      0.00000     -0.00000      0.00000     -1.08446      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.45795     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.21274      0.00000      0.00000      0.00000      0.00000 \n     0.02053     -0.90372      0.00000      0.00000     -0.00000      0.59064     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.95779      0.23747      0.23136     -0.00000     -0.00000     -0.00000      0.07659      0.16865     -0.00000     -0.13720     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.21857    -15.80109 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.70917      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.37656     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.70917     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.37656     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.02053     -0.90372      0.00000      0.00000     -0.00000      0.59064     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.68455      0.71074      0.23136     -0.00000     -0.00000     -0.00000      0.07659     -0.20314     -0.00000     -0.07745     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.21857    -15.80109 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.70917      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.37656     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.02053     -0.90372      0.00000      0.00000     -0.00000      0.59064     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.27324     -0.94820      0.23136      0.00000      0.00000      0.00000      0.07659      0.03450      0.00000      0.21465     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.21857    -15.80109 \n     0.00037      0.11125     -0.00000     -0.00000      0.00000     -0.22614      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.23338     -0.00000      0.00000      0.00000      0.45096     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -2.66552      0.85239 \n     0.00000      0.00000      0.00084     -0.00000      0.00000      0.00000      0.07056      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.01127     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.56784     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00084      0.00000     -0.00000     -0.07056     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.01127      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.56784     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00084     -0.00000     -0.00000      0.00000     -0.00000     -0.07056     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.01127      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.56784     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00035     -0.03836      0.00000      0.00000     -0.00000      0.07747     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.07141      0.01770     -0.11178     -0.00000     -0.00000     -0.00000      0.00684     -0.78174     -0.00000      0.63599     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.66408     -0.21216 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.12743     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.74551     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.12743      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.74551     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00035     -0.03836      0.00000      0.00000     -0.00000      0.07747     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.05104      0.05299     -0.11178     -0.00000     -0.00000     -0.00000      0.00684      0.94166     -0.00000      0.35901     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.66408     -0.21216 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.12743     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.74551      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00035     -0.03836      0.00000      0.00000     -0.00000      0.07747     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.02037     -0.07069     -0.11178      0.00000      0.00000      0.00000      0.00684     -0.15991      0.00000     -0.99501     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.66408     -0.21216 \n     0.00033      0.02515     -0.00000     -0.00000      0.00000     -0.05172      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.12024     -0.00000      0.00000      0.00000     -1.09376      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.61711      0.10052 \n     0.00000     -0.00000     -0.00031      0.00000     -0.00000     -0.00000     -0.01629     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.11340      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.08349      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00031     -0.00000      0.00000      0.01629      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.11340     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.08349      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00031      0.00000      0.00000     -0.00000      0.00000      0.01629     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.11340     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.08349     -0.00000      0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99506      0.41881      0.00000      0.00000     -0.00000      0.19226     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.07513     -0.00000     -0.00000     -0.00000     -0.02328     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.06339      0.55566 \n    -0.01345     -1.03887     -0.00000     -0.00000      0.00000     -0.60671      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.24490      0.00000     -0.00000      0.00000      0.07425      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.21226     -0.19702 \n    -0.00000      0.00000      0.00000     -0.99643     -0.00000     -0.00000      0.48673      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.16791     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.07641      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.99643      0.00000     -0.00000     -0.48673     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.16791      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.07641     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.99643     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.48673      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.16791     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.07641     -0.00000      0.00000 \n     0.04750      1.90600      0.00000      0.00000     -0.00000      2.37610     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.03569     -0.00000      0.00000     -0.00000     -0.32603     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.95695    -35.03848 \n     0.00000     -0.00000     -0.00000     -0.00800      0.00000      0.00000     -1.08485     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.45717      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.21243     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00800     -0.00000      0.00000      1.08485      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.45717     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.21243      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00800      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.08485     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.45717      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.21243      0.00000     -0.00000 \n    -0.02052     -0.90357     -0.00000     -0.00000      0.00000     -0.59070      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.96705      0.19775      0.23226     -0.00000      0.00000      0.00000      0.06948     -0.17147     -0.00000     -0.00000     -0.00000     -0.13162      0.00000      0.00000     -0.00000      0.21703     15.80113 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.70964     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.37440     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.70964     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.37440      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02052     -0.90357     -0.00000     -0.00000      0.00000     -0.59070      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.65478      0.73862      0.23226      0.00000     -0.00000     -0.00000      0.06948      0.19972     -0.00000      0.00000      0.00000     -0.08268      0.00000      0.00000     -0.00000      0.21703     15.80113 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.70964     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.37440      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.02052     -0.90357     -0.00000     -0.00000      0.00000     -0.59070      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.31227     -0.93637      0.23226      0.00000     -0.00000     -0.00000      0.06948     -0.02825     -0.00000      0.00000      0.00000      0.21431      0.00000      0.00000     -0.00000      0.21703     15.80113 \n    -0.00037      0.11121      0.00000      0.00000     -0.00000      0.22500     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.25801     -0.00000     -0.00000     -0.00000      0.37412      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      2.66610     -0.85207 \n    -0.00000      0.00000      0.00000     -0.00085     -0.00000     -0.00000     -0.06968      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.01147     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.56759     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00085      0.00000     -0.00000      0.06968     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.01147      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.56759     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00085     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.06968     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.01147     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.56759     -0.00000      0.00000 \n     0.00035     -0.03835     -0.00000     -0.00000      0.00000     -0.07719      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07083      0.01448     -0.12657     -0.00000      0.00000      0.00000      0.05359      0.79948     -0.00000     -0.00000     -0.00000      0.61369     -0.00000      0.00000     -0.00000     -1.66220      0.21200 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.12523      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.74567     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.12523      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.74567     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00035     -0.03835     -0.00000     -0.00000      0.00000     -0.07719      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04796      0.05410     -0.12657      0.00000     -0.00000     -0.00000      0.05359     -0.93122     -0.00000      0.00000      0.00000      0.38552     -0.00000      0.00000     -0.00000     -1.66220      0.21200 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.12523      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.74567      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00035     -0.03835     -0.00000     -0.00000      0.00000     -0.07719      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02287     -0.06859     -0.12657      0.00000     -0.00000     -0.00000      0.05359      0.13173     -0.00000      0.00000      0.00000     -0.99922     -0.00000      0.00000     -0.00000     -1.66220      0.21200 \n    -0.00033      0.02515      0.00000      0.00000     -0.00000      0.05161     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13246     -0.00000     -0.00000     -0.00000     -1.13879      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.58476     -0.10040 \n     0.00000     -0.00000     -0.00000      0.00031      0.00000      0.00000      0.01619     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.11311      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.08352      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00031     -0.00000      0.00000     -0.01619      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.11311     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.08352      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00031      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.01619     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.11311      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.08352      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Tc\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.42136     -1.12591      0.00000      0.00000      0.00000      2.60984      0.00000      0.00000      0.00000     -0.98838      0.00000      0.00000     -0.98838      0.00000     -0.98838     -0.01611      0.00000      0.00000      0.00000     -0.04569      0.00000      0.00000     -0.04569      0.00000     -0.04569      0.06381      0.00000      0.00000      0.00000 \n    -1.12591      3.04927      0.00000      0.00000      0.00000     -7.50340      0.00000      0.00000      0.00000      2.75244      0.00000      0.00000      2.75244      0.00000      2.75244      0.14294      0.00000      0.00000      0.00000      0.11902      0.00000      0.00000      0.11902      0.00000      0.11902     -0.19267      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.53900      0.00000      0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.29546      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04917      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.53900      0.00000      0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.29546      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04917      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.53900      0.00000      0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.29546      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04917 \n     2.60984     -7.50340      0.00000      0.00000      0.00000     21.36404      0.00000      0.00000      0.00000     -6.92308      0.00000      0.00000     -6.92308      0.00000     -6.92308     -1.31695      0.00000      0.00000      0.00000     -0.28150      0.00000      0.00000     -0.28150      0.00000     -0.28150      0.75060      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      2.81885      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12802      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      2.81885      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12802      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.23015      0.00000      0.00000      0.00000      2.81885      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12802 \n    -0.98838      2.75244      0.00000      0.00000      0.00000     -6.92308      0.00000      0.00000      0.00000      4.49144      0.00000      0.00000      1.49321      0.00000      1.49322      0.15602      0.00000      0.00000      0.00000      0.00795      0.00000      0.00000      0.15978      0.00000      0.15977     -0.18474      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99646      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99646      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.98838      2.75244      0.00000      0.00000      0.00000     -6.92308      0.00000      0.00000      0.00000      1.49321      0.00000      0.00000      4.49144      0.00000      1.49323      0.15602      0.00000      0.00000      0.00000      0.15977      0.00000      0.00000      0.00795      0.00000      0.15978     -0.18474      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99646      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.98838      2.75244      0.00000      0.00000      0.00000     -6.92308      0.00000      0.00000      0.00000      1.49322      0.00000      0.00000      1.49323      0.00000      4.49144      0.15602      0.00000      0.00000      0.00000      0.15979      0.00000      0.00000      0.15977      0.00000      0.00796     -0.18474      0.00000      0.00000      0.00000 \n    -0.01611      0.14294      0.00000      0.00000      0.00000     -1.31695      0.00000      0.00000      0.00000      0.15602      0.00000      0.00000      0.15602      0.00000      0.15602      3.66518      0.00000      0.00000      0.00000     -0.34518      0.00000      0.00000     -0.34518      0.00000     -0.34518     -0.70803      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.29546      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11611      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.29546      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11611      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.29546      0.00000      0.00000      0.00000     -0.82333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.11611      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633 \n    -0.04569      0.11902      0.00000      0.00000      0.00000     -0.28150      0.00000      0.00000      0.00000      0.00795      0.00000      0.00000      0.15977      0.00000      0.15979     -0.34518      0.00000      0.00000      0.00000      1.07763      0.00000      0.00000     -0.47595      0.00000     -0.47595      0.07992      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.10717      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.10717      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04569      0.11902      0.00000      0.00000      0.00000     -0.28150      0.00000      0.00000      0.00000      0.15978      0.00000      0.00000      0.00795      0.00000      0.15977     -0.34518      0.00000      0.00000      0.00000     -0.47595      0.00000      0.00000      1.07762      0.00000     -0.47596      0.07992      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30368      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.10717      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04569      0.11902      0.00000      0.00000      0.00000     -0.28150      0.00000      0.00000      0.00000      0.15977      0.00000      0.00000      0.15978      0.00000      0.00796     -0.34518      0.00000      0.00000      0.00000     -0.47595      0.00000      0.00000     -0.47596      0.00000      1.07762      0.07992      0.00000      0.00000      0.00000 \n     0.06381     -0.19267      0.00000      0.00000      0.00000      0.75060      0.00000      0.00000      0.00000     -0.18474      0.00000      0.00000     -0.18474      0.00000     -0.18474     -0.70803      0.00000      0.00000      0.00000      0.07992      0.00000      0.00000      0.07992      0.00000      0.07992      2.08730      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.04917      0.00000      0.00000      0.00000     -0.12802      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02292      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.04917      0.00000      0.00000      0.00000     -0.12802      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02292      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04917      0.00000      0.00000      0.00000     -0.12802      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21633      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02292 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00001      0.00001      0.00001      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -738.25200   -102.90250    -96.22477    -96.22477    -96.22477    -17.34534    -14.62937    -14.62937    -14.62937     -8.53741     -8.53741     -8.53741     -8.53741     -8.53741     -2.30645     -1.46538     -1.46538     -1.46538     -0.08970     -0.03217     -0.03217     -0.03217     -0.03217     -0.03217      0.09195      0.09195      0.09195      1.15159    155.05280 \n   </alphaeps>\n   <betaeps>\n  -738.25180   -102.88860    -96.21380    -96.21380    -96.21380    -17.32869    -14.61216    -14.61216    -14.61216     -8.51754     -8.51754     -8.51754     -8.51754     -8.51754     -2.18051     -1.33664     -1.33664     -1.33664     -0.05658      0.10468      0.10468      0.10468      0.10468      0.10468      0.12341      0.12341      0.12341      1.23895    155.08460 \n   </betaeps>\n   <alphavectors>\n    -0.99526     -0.41907      0.00000      0.00000     -0.00000      0.19473     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.07718     -0.00000      0.00000     -0.00000      0.02519     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.06795      0.56399 \n    -0.01308      1.03714      0.00000      0.00000     -0.00000     -0.61526     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.25226     -0.00000      0.00000     -0.00000     -0.08140      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.22747     -0.21071 \n    -0.00000     -0.00000     -0.99683      0.00000     -0.00000     -0.00000      0.49492      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.17592     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.06590      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.99683      0.00000      0.00000     -0.00000     -0.49492     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.17592      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.06590      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.99683     -0.00000     -0.00000     -0.00000     -0.49492     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.17592      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06590     -0.00000     -0.00000      0.00000     -0.00000 \n     0.05208     -1.90055     -0.00000     -0.00000      0.00000      2.40741      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.07110      0.00000     -0.00000      0.00000      0.36178     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.04419    -35.06293 \n     0.00000      0.00000     -0.00696     -0.00000      0.00000      0.00000     -1.08868     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.47398      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.18083     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00696     -0.00000     -0.00000      0.00000      1.08868      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.47398     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.18083     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00696      0.00000      0.00000      0.00000      1.08868      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.47398     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.18083      0.00000      0.00000     -0.00000      0.00000 \n    -0.02264      0.90224      0.00000      0.00000     -0.00000     -0.60549     -0.00000      0.00000     -0.00000     -0.98390     -0.00223     -0.00000     -0.00000      0.00000     -0.24395      0.00000      0.00000      0.00000     -0.07979     -0.00000     -0.00000      0.18444      0.00000      0.16703      0.00000      0.00000      0.00000      0.23980     15.81735 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.70418     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.43099     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.70418      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.43099     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02264      0.90224      0.00000      0.00000     -0.00000     -0.60549     -0.00000      0.00000     -0.00000      0.49002      0.85320      0.00000      0.00000     -0.00000     -0.24395     -0.00000     -0.00000     -0.00000     -0.07979      0.00000      0.00000     -0.23687     -0.00000      0.07621      0.00000      0.00000      0.00000      0.23980     15.81735 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.70418      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.43099     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.02264      0.90224      0.00000      0.00000     -0.00000     -0.60549     -0.00000      0.00000     -0.00000      0.49388     -0.85097      0.00000      0.00000     -0.00000     -0.24395     -0.00000     -0.00000     -0.00000     -0.07979      0.00000      0.00000      0.05243      0.00000     -0.24324      0.00000      0.00000      0.00000      0.23980     15.81735 \n    -0.00023     -0.11903      0.00000      0.00000     -0.00000      0.25289     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.22718     -0.00000      0.00000     -0.00000     -0.50880      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      2.92785     -0.88208 \n    -0.00000     -0.00000     -0.00113      0.00000     -0.00000     -0.00000     -0.06822      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.02781     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.46315      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00113      0.00000      0.00000     -0.00000      0.06822     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.02781      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.46315      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00113     -0.00000     -0.00000     -0.00000      0.06822     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.02781      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.46315     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00028      0.03787     -0.00000     -0.00000      0.00000     -0.08049      0.00000     -0.00000      0.00000     -0.07729     -0.00018     -0.00000     -0.00000      0.00000      0.09232      0.00000      0.00000      0.00000      0.07533     -0.00000     -0.00000     -0.75007      0.00000     -0.67928     -0.00000     -0.00000     -0.00000     -1.58087      0.20433 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.13387     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.75273     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.13387     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.75273     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00028      0.03787     -0.00000     -0.00000      0.00000     -0.08049      0.00000     -0.00000      0.00000      0.03849      0.06702      0.00000      0.00000     -0.00000      0.09232     -0.00000     -0.00000     -0.00000      0.07533      0.00000      0.00000      0.96330     -0.00000     -0.30994     -0.00000     -0.00000     -0.00000     -1.58087      0.20433 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.13387     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.75273     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00028      0.03787     -0.00000     -0.00000      0.00000     -0.08049      0.00000     -0.00000      0.00000      0.03880     -0.06685      0.00000      0.00000     -0.00000      0.09232     -0.00000     -0.00000     -0.00000      0.07533      0.00000      0.00000     -0.21324      0.00000      0.98921     -0.00000     -0.00000     -0.00000     -1.58087      0.20433 \n    -0.00021     -0.01637      0.00000      0.00000     -0.00000      0.03580     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.08146     -0.00000      0.00000     -0.00000      1.00010     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.14138     -0.05512 \n     0.00000      0.00000      0.00032     -0.00000      0.00000      0.00000      0.01272     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.10296      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.05061     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00032     -0.00000     -0.00000      0.00000     -0.01272     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.10296     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.05061      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00032      0.00000      0.00000      0.00000     -0.01272      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.10296     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.05061      0.00000      0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99526     -0.41909     -0.00000     -0.00000     -0.00000      0.19480      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.07762      0.00000     -0.00000      0.00000      0.02316     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06804      0.56396 \n    -0.01308      1.03718      0.00000      0.00000      0.00000     -0.61550     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.25363     -0.00000      0.00000     -0.00000     -0.07454      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.22756     -0.21064 \n     0.00000     -0.00000      0.99686     -0.00000     -0.00000     -0.00000     -0.00000      0.49506      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.17498      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.06688     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.99686      0.00000      0.00000      0.00000      0.00000      0.49506      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.17498      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.06688     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.99686      0.00000     -0.49506      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.17498      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.06688      0.00000     -0.00000 \n     0.05208     -1.90013     -0.00000     -0.00000     -0.00000      2.40808      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.07483      0.00000     -0.00000      0.00000      0.32887     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.04098    -35.06321 \n    -0.00000      0.00000      0.00689      0.00000      0.00000      0.00000      0.00000     -1.08920     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.47172     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18354      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00689     -0.00000     -0.00000     -0.00000     -0.00000     -1.08920     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.47172     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.18354      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00689     -0.00000      1.08920     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.47172     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.18354     -0.00000      0.00000 \n    -0.02264      0.90202      0.00000      0.00000      0.00000     -0.60553     -0.00000     -0.00000      0.00000     -0.93794      0.29850      0.00000      0.00000     -0.00000     -0.24412      0.00000      0.00000      0.00000     -0.07189     -0.00000     -0.00000      0.00000     -0.19369      0.15377     -0.00000      0.00000     -0.00000      0.23807     15.81742 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.70484     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.42834      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.70484      0.00000      0.00000      0.00000      0.00000     -0.00000      0.42834      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.02264      0.90202      0.00000      0.00000      0.00000     -0.60553     -0.00000     -0.00000      0.00000      0.72748      0.66302     -0.00000     -0.00000      0.00000     -0.24412     -0.00000     -0.00000     -0.00000     -0.07189      0.00000      0.00000      0.00000      0.23001      0.09085     -0.00000      0.00000     -0.00000      0.23807     15.81742 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.70484     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42834     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.02264      0.90202      0.00000      0.00000      0.00000     -0.60553     -0.00000     -0.00000      0.00000      0.21046     -0.96153     -0.00000     -0.00000      0.00000     -0.24412     -0.00000     -0.00000     -0.00000     -0.07189      0.00000      0.00000      0.00000     -0.03633     -0.24462     -0.00000      0.00000     -0.00000      0.23807     15.81742 \n    -0.00023     -0.11896     -0.00000     -0.00000     -0.00000      0.25113      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.25201     -0.00000      0.00000     -0.00000     -0.42126      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.93153     -0.88163 \n     0.00000     -0.00000      0.00114     -0.00000     -0.00000     -0.00000     -0.00000     -0.06706      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.02497      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.46957     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00114      0.00000      0.00000      0.00000      0.00000     -0.06706      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.02497      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.46957     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00114      0.00000      0.06706      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.02497      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.46957      0.00000     -0.00000 \n     0.00028      0.03785      0.00000      0.00000      0.00000     -0.08006     -0.00000     -0.00000      0.00000     -0.07216      0.02296      0.00000      0.00000     -0.00000      0.10573      0.00000      0.00000      0.00000      0.02781     -0.00000     -0.00000     -0.00000      0.79263     -0.62928     -0.00000      0.00000      0.00000     -1.58163      0.20414 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.13115      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.75293      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.13115     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.75293      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00028      0.03785      0.00000      0.00000      0.00000     -0.08006     -0.00000     -0.00000      0.00000      0.05597      0.05101     -0.00000     -0.00000      0.00000      0.10573     -0.00000     -0.00000     -0.00000      0.02781      0.00000      0.00000     -0.00000     -0.94129     -0.37180     -0.00000      0.00000      0.00000     -1.58163      0.20414 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.13115      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.75293     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00028      0.03785      0.00000      0.00000      0.00000     -0.08006     -0.00000     -0.00000      0.00000      0.01619     -0.07397     -0.00000     -0.00000      0.00000      0.10573     -0.00000     -0.00000     -0.00000      0.02781      0.00000      0.00000     -0.00000      0.14866      1.00108     -0.00000      0.00000      0.00000     -1.58163      0.20414 \n    -0.00021     -0.01637     -0.00000     -0.00000     -0.00000      0.03568      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.09145     -0.00000      0.00000     -0.00000      1.03393      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.11006     -0.05503 \n    -0.00000      0.00000     -0.00032      0.00000      0.00000      0.00000      0.00000      0.01260     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.10949     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.04995      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00032     -0.00000     -0.00000     -0.00000     -0.00000      0.01260      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.10949     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.04995      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00032     -0.00000     -0.01260     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.10949     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.04995     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ru\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.42460     -1.13421      0.00000      0.00000      0.00000      2.63038      0.00000      0.00000      0.00000     -0.99371      0.00000      0.00000     -0.99371      0.00000     -0.99371     -0.01767      0.00000      0.00000      0.00000     -0.04307      0.00000      0.00000     -0.04307      0.00000     -0.04307      0.05719      0.00000      0.00000      0.00000 \n    -1.13421      3.07301      0.00000      0.00000      0.00000     -7.58339      0.00000      0.00000      0.00000      2.77427      0.00000      0.00000      2.77427      0.00000      2.77427      0.14990      0.00000      0.00000      0.00000      0.11207      0.00000      0.00000      0.11207      0.00000      0.11207     -0.17606      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.56171      0.00000      0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32209      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03772      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.56171      0.00000      0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32209      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03772      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.56171      0.00000      0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.32209      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03772 \n     2.63038     -7.58339      0.00000      0.00000      0.00000     21.67773      0.00000      0.00000      0.00000     -7.01043      0.00000      0.00000     -7.01043      0.00000     -7.01043     -1.35797      0.00000      0.00000      0.00000     -0.25894      0.00000      0.00000     -0.25894      0.00000     -0.25894      0.70986      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      2.87260      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09775      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      2.87260      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09775      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.26744      0.00000      0.00000      0.00000      2.87260      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09775 \n    -0.99371      2.77427      0.00000      0.00000      0.00000     -7.01043      0.00000      0.00000      0.00000      4.52746      0.00000      0.00000      1.50730      0.00000      1.50731      0.16970      0.00000      0.00000      0.00000     -0.05674      0.00000      0.00000      0.18153      0.00000      0.18152     -0.17306      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.04029      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.04029      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99371      2.77427      0.00000      0.00000      0.00000     -7.01043      0.00000      0.00000      0.00000      1.50730      0.00000      0.00000      4.52744      0.00000      1.50732      0.16970      0.00000      0.00000      0.00000      0.18152      0.00000      0.00000     -0.05675      0.00000      0.18153     -0.17306      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.04029      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99371      2.77427      0.00000      0.00000      0.00000     -7.01043      0.00000      0.00000      0.00000      1.50731      0.00000      0.00000      1.50732      0.00000      4.52743      0.16970      0.00000      0.00000      0.00000      0.18154      0.00000      0.00000      0.18151      0.00000     -0.05675     -0.17306      0.00000      0.00000      0.00000 \n    -0.01767      0.14990      0.00000      0.00000      0.00000     -1.35797      0.00000      0.00000      0.00000      0.16970      0.00000      0.00000      0.16970      0.00000      0.16970      3.65714      0.00000      0.00000      0.00000     -0.36396      0.00000      0.00000     -0.36396      0.00000     -0.36396     -0.84065      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.32209      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19825      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.32209      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19825      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.32209      0.00000      0.00000      0.00000     -0.88669      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19825      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828 \n    -0.04307      0.11207      0.00000      0.00000      0.00000     -0.25894      0.00000      0.00000      0.00000     -0.05674      0.00000      0.00000      0.18152      0.00000      0.18154     -0.36396      0.00000      0.00000      0.00000      1.25591      0.00000      0.00000     -0.54385      0.00000     -0.54384      0.21491      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.59950      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.59950      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04307      0.11207      0.00000      0.00000      0.00000     -0.25894      0.00000      0.00000      0.00000      0.18153      0.00000      0.00000     -0.05675      0.00000      0.18151     -0.36396      0.00000      0.00000      0.00000     -0.54385      0.00000      0.00000      1.25592      0.00000     -0.54384      0.21491      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47656      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.59950      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.04307      0.11207      0.00000      0.00000      0.00000     -0.25894      0.00000      0.00000      0.00000      0.18152      0.00000      0.00000      0.18153      0.00000     -0.05675     -0.36396      0.00000      0.00000      0.00000     -0.54384      0.00000      0.00000     -0.54384      0.00000      1.25591      0.21491      0.00000      0.00000      0.00000 \n     0.05719     -0.17606      0.00000      0.00000      0.00000      0.70986      0.00000      0.00000      0.00000     -0.17306      0.00000      0.00000     -0.17306      0.00000     -0.17306     -0.84065      0.00000      0.00000      0.00000      0.21491      0.00000      0.00000      0.21491      0.00000      0.21491      1.86207      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03772      0.00000      0.00000      0.00000     -0.09775      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09630      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03772      0.00000      0.00000      0.00000     -0.09775      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09630      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03772      0.00000      0.00000      0.00000     -0.09775      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15828      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.09630 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.07456      0.07456      0.07456      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.15481      0.15481      0.15481      0.15481      0.15481      0.00076      0.00076      0.00076      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -775.29670   -109.05720   -102.17680   -102.17680   -102.17680    -18.73670    -15.94238    -15.94238    -15.94238     -9.60722     -9.60722     -9.60722     -9.60722     -9.60722     -2.54115     -1.64801     -1.64801     -1.64801     -0.13469     -0.09165     -0.09165     -0.09165     -0.09165     -0.09165      0.03290      0.03290      0.03290      1.12536    165.91310 \n   </alphaeps>\n   <betaeps>\n  -775.29630   -109.04370   -102.16610   -102.16610   -102.16610    -18.72079    -15.92611    -15.92611    -15.92611     -9.58847     -9.58847     -9.58847     -9.58847     -9.58847     -2.42949     -1.53487     -1.53487     -1.53487     -0.10619      0.02687      0.02687      0.02687      0.02687      0.02687      0.05734      0.05734      0.05734      1.20109    165.94340 \n   </betaeps>\n   <alphavectors>\n    -0.99535      0.41932     -0.00000      0.00000     -0.00000     -0.19697     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.07954      0.00000      0.00000      0.00000      0.02488      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.07006      0.57082 \n    -0.01291     -1.03606     -0.00000      0.00000      0.00000      0.62321      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.26076     -0.00000     -0.00000     -0.00000     -0.08103     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.23497     -0.22196 \n     0.00000      0.00000      0.00000     -0.00000     -0.99751      0.00000     -0.00000     -0.00000     -0.50197      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.18380      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.05487     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.99751     -0.00000      0.00000      0.00000      0.50197      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.18380     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05487     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.99751     -0.00000      0.00000      0.00000     -0.50197     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.18380     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.05487     -0.00000      0.00000      0.00000      0.00000 \n     0.05349      1.89058      0.00000     -0.00000     -0.00000     -2.43094     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.10778      0.00000      0.00000      0.00000      0.36304      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.08482    -35.08419 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00535      0.00000     -0.00000     -0.00000      1.09264      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.49187      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.14926     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00535      0.00000     -0.00000     -0.00000     -1.09264     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.49187      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.14926      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00535      0.00000     -0.00000     -0.00000      1.09264      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.49187      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.14926      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02330     -0.89821     -0.00000      0.00000     -0.00000      0.61567      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00110     -0.98356     -0.25443     -0.00000      0.00000      0.00000     -0.08140      0.00000      0.00000      0.00000      0.00983     -0.25993      0.00000     -0.00000      0.00000      0.25082     15.83094 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.70357      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.45054     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.70357     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.45054     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.02330     -0.89821     -0.00000      0.00000      0.00000      0.61567      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.85123      0.49273     -0.25443      0.00000     -0.00000     -0.00000     -0.08140     -0.00000     -0.00000     -0.00000     -0.23002      0.12146      0.00000      0.00000      0.00000      0.25082     15.83094 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.70357      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.45054     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.02330     -0.89821     -0.00000      0.00000      0.00000      0.61567      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.85233      0.49082     -0.25443      0.00000     -0.00000     -0.00000     -0.08140     -0.00000     -0.00000     -0.00000      0.22019      0.13848      0.00000      0.00000      0.00000      0.25082     15.83094 \n    -0.00016      0.11824     -0.00000      0.00000     -0.00000     -0.25846     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.20456     -0.00000      0.00000     -0.00000     -0.55875     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      2.92609     -0.87221 \n     0.00000      0.00000      0.00000     -0.00000     -0.00154     -0.00000     -0.00000     -0.00000      0.06570      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.04488      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.36861     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00154     -0.00000      0.00000      0.00000     -0.06570      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.04488     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.36861     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00154     -0.00000      0.00000      0.00000      0.06570     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.04488     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.36861      0.00000      0.00000      0.00000      0.00000 \n     0.00024     -0.03570      0.00000     -0.00000      0.00000      0.07842      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00008     -0.07470      0.07338     -0.00000      0.00000      0.00000      0.13684      0.00000      0.00000      0.00000     -0.03833      1.01390     -0.00000     -0.00000      0.00000     -1.48889      0.19044 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.12938     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.75738      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.12938      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.75738      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00024     -0.03570      0.00000     -0.00000      0.00000      0.07842      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06465      0.03742      0.07338      0.00000     -0.00000     -0.00000      0.13684     -0.00000     -0.00000     -0.00000      0.89723     -0.47376     -0.00000      0.00000     -0.00000     -1.48889      0.19044 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.12938     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.75738      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00024     -0.03570      0.00000     -0.00000      0.00000      0.07842      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.06473      0.03728      0.07338      0.00000     -0.00000     -0.00000      0.13684     -0.00000     -0.00000     -0.00000     -0.85890     -0.54014     -0.00000      0.00000     -0.00000     -1.48889      0.19044 \n    -0.00015      0.01187     -0.00000      0.00000     -0.00000     -0.02701     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06003     -0.00000      0.00000     -0.00000      0.95194     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.90861     -0.03619 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00033      0.00000      0.00000      0.00000     -0.00958     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.08734     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.02969      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00033      0.00000     -0.00000     -0.00000      0.00958     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.08734      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.02969      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00033      0.00000     -0.00000     -0.00000     -0.00958      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.08734      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.02969      0.00000     -0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99535      0.41934      0.00000      0.00000     -0.00000      0.19704     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.07982     -0.00000     -0.00000      0.00000     -0.02328     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.07017     -0.57079 \n    -0.01291     -1.03609     -0.00000     -0.00000      0.00000     -0.62343      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.26160      0.00000      0.00000      0.00000      0.07562      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.23517      0.22189 \n    -0.00000      0.00000      0.00000      0.00000      0.99754     -0.00000      0.00000      0.00000      0.50210     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.18305     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05578     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.99754      0.00000      0.00000     -0.00000      0.50210      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.18305      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.05578     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.99754      0.00000     -0.00000      0.00000      0.50210     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.18305     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05578      0.00000      0.00000 \n     0.05349      1.89022      0.00000      0.00000     -0.00000      2.43150     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.10935     -0.00000     -0.00000     -0.00000     -0.33688     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.08283     35.08445 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00529      0.00000     -0.00000     -0.00000     -1.09310      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.49010      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.15173     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00529     -0.00000     -0.00000      0.00000     -1.09310     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.49010     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.15173      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00529     -0.00000      0.00000     -0.00000     -1.09310      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.49010      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.15173     -0.00000     -0.00000 \n    -0.02330     -0.89802     -0.00000     -0.00000      0.00000     -0.61568      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.10989     -0.00000      0.97772     -0.25417     -0.00000      0.00000      0.00000      0.07508     -0.25588      0.03950     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.24959    -15.83100 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.70412      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.44845     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.70412     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.44845      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.02330     -0.89802     -0.00000     -0.00000      0.00000     -0.61568      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.79178     -0.00000     -0.58403     -0.25417      0.00000     -0.00000      0.00000      0.07508      0.09373     -0.24135     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.24959    -15.83100 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.70412     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.44845     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.02330     -0.89802     -0.00000     -0.00000      0.00000     -0.61568      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.90167      0.00000     -0.39369     -0.25417     -0.00000     -0.00000     -0.00000      0.07508      0.16215      0.20185      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.24959    -15.83100 \n    -0.00016      0.11818      0.00000      0.00000     -0.00000      0.25685     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.22136      0.00000      0.00000      0.00000      0.49146      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -2.93145      0.87184 \n    -0.00000      0.00000      0.00000      0.00000      0.00155     -0.00000      0.00000      0.00000     -0.06472     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.04294     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.37424     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00155      0.00000      0.00000     -0.00000     -0.06472      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.04294      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.37424     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00155      0.00000     -0.00000      0.00000     -0.06472     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.04294     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.37424      0.00000      0.00000 \n     0.00024     -0.03568     -0.00000     -0.00000      0.00000     -0.07803      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00820     -0.00000      0.07300      0.08195     -0.00000      0.00000      0.00000     -0.10229      1.00284     -0.15480      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.49126     -0.19030 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.12723     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.75754      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.12723      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.75754      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00024     -0.03568     -0.00000     -0.00000      0.00000     -0.07803      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05912     -0.00000     -0.04360      0.08195      0.00000     -0.00000      0.00000     -0.10229     -0.36736      0.94588     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.49126     -0.19030 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.12723      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.75754      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00024     -0.03568     -0.00000     -0.00000      0.00000     -0.07803      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06732      0.00000     -0.02939      0.08195     -0.00000     -0.00000     -0.00000     -0.10229     -0.63548     -0.79108      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.49126     -0.19030 \n    -0.00015      0.01187      0.00000      0.00000     -0.00000      0.02693     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.06574      0.00000      0.00000      0.00000     -0.97274     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.88591      0.03614 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00033      0.00000     -0.00000     -0.00000      0.00950      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.09287      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.02920     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00033     -0.00000     -0.00000      0.00000      0.00950     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.09287     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.02920      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00033     -0.00000      0.00000     -0.00000      0.00950      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.09287      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.02920     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Rh\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.42802     -1.14219      0.00000      0.00000      0.00000      2.63976      0.00000      0.00000      0.00000     -0.99487      0.00000      0.00000     -0.99487      0.00000     -0.99487     -0.00116      0.00000      0.00000      0.00000     -0.05049      0.00000      0.00000     -0.05049      0.00000     -0.05049      0.05571      0.00000      0.00000      0.00000 \n    -1.14219      3.09471      0.00000      0.00000      0.00000     -7.64430      0.00000      0.00000      0.00000      2.79023      0.00000      0.00000      2.79023      0.00000      2.79023      0.10572      0.00000      0.00000      0.00000      0.13333      0.00000      0.00000      0.13333      0.00000      0.13333     -0.17321      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.58375      0.00000      0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.33616      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03488      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.58375      0.00000      0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.33616      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03488      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.58375      0.00000      0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.33616      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03488 \n     2.63976     -7.64430      0.00000      0.00000      0.00000     21.90076      0.00000      0.00000      0.00000     -7.07077      0.00000      0.00000     -7.07077      0.00000     -7.07077     -1.24197      0.00000      0.00000      0.00000     -0.32248      0.00000      0.00000     -0.32248      0.00000     -0.32248      0.70872      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      2.90892      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08985      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      2.90892      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08985      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.30007      0.00000      0.00000      0.00000      2.90892      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08985 \n    -0.99487      2.79023      0.00000      0.00000      0.00000     -7.07077      0.00000      0.00000      0.00000      4.56106      0.00000      0.00000      1.50952      0.00000      1.50950      0.13345      0.00000      0.00000      0.00000     -0.11347      0.00000      0.00000      0.23917      0.00000      0.23916     -0.17253      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.10307      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.10307      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99487      2.79023      0.00000      0.00000      0.00000     -7.07077      0.00000      0.00000      0.00000      1.50952      0.00000      0.00000      4.56103      0.00000      1.50953      0.13345      0.00000      0.00000      0.00000      0.23916      0.00000      0.00000     -0.11347      0.00000      0.23915     -0.17253      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.10307      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99487      2.79023      0.00000      0.00000      0.00000     -7.07077      0.00000      0.00000      0.00000      1.50950      0.00000      0.00000      1.50953      0.00000      4.56106      0.13345      0.00000      0.00000      0.00000      0.23916      0.00000      0.00000      0.23916      0.00000     -0.11346     -0.17253      0.00000      0.00000      0.00000 \n    -0.00116      0.10572      0.00000      0.00000      0.00000     -1.24197      0.00000      0.00000      0.00000      0.13345      0.00000      0.00000      0.13345      0.00000      0.13345      3.76609      0.00000      0.00000      0.00000     -0.39915      0.00000      0.00000     -0.39915      0.00000     -0.39915     -0.90967      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.33616      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.22422      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.33616      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.22422      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.33616      0.00000      0.00000      0.00000     -0.91404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.22422      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280 \n    -0.05049      0.13333      0.00000      0.00000      0.00000     -0.32248      0.00000      0.00000      0.00000     -0.11347      0.00000      0.00000      0.23916      0.00000      0.23916     -0.39915      0.00000      0.00000      0.00000      1.46749      0.00000      0.00000     -0.62883      0.00000     -0.62883      0.25486      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.19262      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.19262      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05049      0.13333      0.00000      0.00000      0.00000     -0.32248      0.00000      0.00000      0.00000      0.23917      0.00000      0.00000     -0.11347      0.00000      0.23916     -0.39915      0.00000      0.00000      0.00000     -0.62883      0.00000      0.00000      1.46750      0.00000     -0.62883      0.25486      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.70526      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.19262      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05049      0.13333      0.00000      0.00000      0.00000     -0.32248      0.00000      0.00000      0.00000      0.23916      0.00000      0.00000      0.23915      0.00000     -0.11346     -0.39915      0.00000      0.00000      0.00000     -0.62883      0.00000      0.00000     -0.62883      0.00000      1.46749      0.25486      0.00000      0.00000      0.00000 \n     0.05571     -0.17321      0.00000      0.00000      0.00000      0.70872      0.00000      0.00000      0.00000     -0.17253      0.00000      0.00000     -0.17253      0.00000     -0.17253     -0.90967      0.00000      0.00000      0.00000      0.25486      0.00000      0.00000      0.25486      0.00000      0.25486      1.85263      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03488      0.00000      0.00000      0.00000     -0.08985      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12616      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03488      0.00000      0.00000      0.00000     -0.08985      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12616      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03488      0.00000      0.00000      0.00000     -0.08985      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14280      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12616 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.10209      0.10209      0.10209      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33636      0.33636      0.33636      0.33636      0.33636      0.00397      0.00397      0.00397      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -813.11750   -115.25940   -108.16910   -108.16910   -108.16910    -20.05611    -17.18655    -17.18655    -17.18655    -10.61064    -10.61064    -10.61064    -10.61064    -10.61064     -2.69704     -1.75714     -1.75714     -1.75714     -0.14482     -0.08382     -0.08382     -0.08382     -0.08382     -0.08382      0.02301      0.02301      0.02301      1.28024    177.70610 \n   </alphaeps>\n   <betaeps>\n  -813.11710   -115.24670   -108.15900   -108.15900   -108.15900    -20.04133    -17.17160    -17.17160    -17.17160    -10.59338    -10.59338    -10.59338    -10.59338    -10.59338     -2.60449     -1.66407     -1.66407     -1.66407     -0.12243      0.01103      0.01103      0.01103      0.01103      0.01103      0.04259      0.04259      0.04259      1.34063    177.73350 \n   </betaeps>\n   <alphavectors>\n    -0.99554      0.41949     -0.00000      0.00000     -0.00000      0.19910     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.08177     -0.00000      0.00000      0.00000     -0.02461     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.07518     -0.57807 \n    -0.01256     -1.03468      0.00000     -0.00000      0.00000     -0.63082      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.26879      0.00000     -0.00000     -0.00000      0.08046      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.25288      0.23405 \n    -0.00000     -0.00000      0.00000     -0.99818      0.00000      0.00000     -0.00000     -0.50954      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.18916     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05196     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.99818     -0.00000      0.00000      0.00000      0.50954     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.18916     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.05196     -0.00000     -0.00000 \n     0.00000      0.00000      0.99818      0.00000     -0.00000     -0.00000      0.50954      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.18916     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05196      0.00000     -0.00000      0.00000      0.00000 \n     0.05709      1.87620     -0.00000      0.00000     -0.00000      2.45030     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.13953     -0.00000      0.00000      0.00000     -0.36108     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.17584     35.11200 \n     0.00000      0.00000     -0.00000     -0.00380     -0.00000     -0.00000      0.00000      1.09648     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.50146      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13993      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00380      0.00000     -0.00000     -0.00000     -1.09648      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.50146      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.13993      0.00000      0.00000 \n    -0.00000     -0.00000      0.00380     -0.00000      0.00000      0.00000     -1.09648     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.50146      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.13993     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.02497     -0.89248      0.00000     -0.00000      0.00000     -0.62497      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.56819      0.80105     -0.26377      0.00000      0.00000     -0.00000      0.08181      0.00000      0.00000     -0.00000     -0.16203      0.22869      0.00000      0.00000      0.00000      0.27432    -15.84783 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.70105      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.48544      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.70105     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.48544      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.02497     -0.89248      0.00000     -0.00000      0.00000     -0.62497      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.40963     -0.89259     -0.26377      0.00000      0.00000     -0.00000      0.08181      0.00000      0.00000     -0.00000     -0.11703     -0.25466      0.00000      0.00000      0.00000      0.27432    -15.84783 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.70105     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.48544      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.02497     -0.89248      0.00000     -0.00000      0.00000     -0.62497      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.97783      0.09154     -0.26377     -0.00000     -0.00000      0.00000      0.08181      0.00000      0.00000      0.00000      0.27906      0.02598      0.00000      0.00000      0.00000      0.27432    -15.84783 \n    -0.00006      0.12827     -0.00000      0.00000     -0.00000      0.29344     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.20924     -0.00000     -0.00000      0.00000      0.57569     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      3.32153      0.90937 \n    -0.00000     -0.00000      0.00000     -0.00195      0.00000      0.00000     -0.00000      0.06522      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.05047     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.33880     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00195     -0.00000      0.00000      0.00000     -0.06522      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.05047     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.33880     -0.00000     -0.00000 \n     0.00000      0.00000      0.00195      0.00000     -0.00000     -0.00000     -0.06522      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.05047     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.33880      0.00000     -0.00000      0.00000      0.00000 \n     0.00023     -0.03925      0.00000     -0.00000      0.00000     -0.09076      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.04330      0.06105      0.07192      0.00000      0.00000     -0.00000     -0.15132      0.00000     -0.00000      0.00000      0.58885     -0.83110     -0.00000     -0.00000      0.00000     -1.61799     -0.20064 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.12964     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.76420     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.12964      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.76420     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00023     -0.03925      0.00000     -0.00000      0.00000     -0.09076      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03122     -0.06802      0.07192      0.00000      0.00000     -0.00000     -0.15132      0.00000     -0.00000      0.00000      0.42533      0.92551     -0.00000     -0.00000      0.00000     -1.61799     -0.20064 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.12964      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.76420      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00023     -0.03925      0.00000     -0.00000      0.00000     -0.09076      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.07452      0.00698      0.07192     -0.00000     -0.00000      0.00000     -0.15132      0.00000     -0.00000      0.00000     -1.01418     -0.09441     -0.00000     -0.00000      0.00000     -1.61799     -0.20064 \n    -0.00013      0.01012     -0.00000      0.00000     -0.00000      0.02446     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05359     -0.00000     -0.00000      0.00000     -0.95484      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.79764      0.02512 \n     0.00000      0.00000     -0.00000      0.00037     -0.00000     -0.00000      0.00000     -0.00862     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.08363      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.02383     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00037      0.00000     -0.00000     -0.00000      0.00862     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.08363      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.02383      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00037     -0.00000      0.00000      0.00000      0.00862     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.08363      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.02383     -0.00000      0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99554     -0.41951      0.00000     -0.00000     -0.00000     -0.19916      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.08190      0.00000     -0.00000      0.00000      0.02361     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.07525     -0.57805 \n     0.01256      1.03471     -0.00000      0.00000      0.00000      0.63101     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.26914     -0.00000      0.00000     -0.00000     -0.07705      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.25301      0.23399 \n     0.00000      0.00000     -0.00000     -0.99820      0.00000     -0.00000      0.00000      0.50964     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.18854     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.05280     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.99820      0.00000     -0.00000     -0.00000      0.50964      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.18854     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.05280      0.00000     -0.00000 \n     0.00000      0.00000     -0.99820      0.00000      0.00000     -0.00000      0.50964      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.18854     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.05280     -0.00000      0.00000     -0.00000      0.00000 \n    -0.05709     -1.87589      0.00000     -0.00000     -0.00000     -2.45072      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.13919      0.00000     -0.00000      0.00000      0.34423     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.17423     35.11222 \n     0.00000     -0.00000      0.00000     -0.00374     -0.00000      0.00000     -0.00000     -1.09685      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.50000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.14220      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00374     -0.00000      0.00000      0.00000     -1.09685      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.50000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.14220     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00374     -0.00000     -0.00000      0.00000     -1.09685     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.50000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.14220      0.00000     -0.00000      0.00000     -0.00000 \n     0.02497      0.89232     -0.00000      0.00000      0.00000      0.62494     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.56572      0.80312      0.26316     -0.00000     -0.00000      0.00000     -0.07767     -0.16074      0.22847      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.27337    -15.84789 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.70150      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.48386     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.70150     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.48386      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.02497      0.89232     -0.00000      0.00000      0.00000      0.62494     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.41266     -0.89148      0.26316     -0.00000     -0.00000      0.00000     -0.07767     -0.11749     -0.25345      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.27337    -15.84789 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.70150     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.48386      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.02497      0.89232     -0.00000      0.00000      0.00000      0.62494     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.97838      0.08836      0.26316      0.00000      0.00000     -0.00000     -0.07767      0.27824      0.02497     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.27337    -15.84789 \n     0.00006     -0.12822      0.00000     -0.00000     -0.00000     -0.29195      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.21979      0.00000     -0.00000      0.00000     -0.52942      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      3.32559      0.90906 \n     0.00000      0.00000     -0.00000     -0.00196      0.00000     -0.00000      0.00000     -0.06443     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.04887     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.34386      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00196      0.00000     -0.00000     -0.00000     -0.06443      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.04887     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.34386      0.00000     -0.00000 \n     0.00000      0.00000     -0.00196      0.00000      0.00000     -0.00000     -0.06443      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.04887     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.34386     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00022      0.03923     -0.00000      0.00000      0.00000      0.09038     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.04256      0.06041     -0.07715     -0.00000     -0.00000      0.00000      0.12821      0.58614     -0.83310     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.61978     -0.20052 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.12799     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.76432      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.12799      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.76432     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00022      0.03923     -0.00000      0.00000      0.00000      0.09038     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.03104     -0.06706     -0.07715     -0.00000     -0.00000      0.00000      0.12821      0.42842      0.92416     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.61978     -0.20052 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.12799      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.76432     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00022      0.03923     -0.00000      0.00000      0.00000      0.09038     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.07360      0.00665     -0.07715      0.00000      0.00000     -0.00000      0.12821     -1.01455     -0.09106      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.61978     -0.20052 \n     0.00013     -0.01011      0.00000     -0.00000     -0.00000     -0.02439      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.05723      0.00000     -0.00000      0.00000      0.96611      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.78370      0.02508 \n     0.00000     -0.00000      0.00000      0.00037     -0.00000      0.00000     -0.00000      0.00856      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.08855      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.02342      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00037     -0.00000      0.00000      0.00000      0.00856      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.08855      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.02342     -0.00000      0.00000 \n     0.00000     -0.00000      0.00037     -0.00000     -0.00000      0.00000      0.00856     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.08855      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.02342      0.00000     -0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Pd\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.43156     -1.15061      0.00000      0.00000      0.00000      2.65036      0.00000      0.00000      0.00000     -0.99622      0.00000      0.00000     -0.99622      0.00000     -0.99622      0.00521      0.00000      0.00000      0.00000     -0.05450      0.00000      0.00000     -0.05450      0.00000     -0.05450      0.05581      0.00000      0.00000      0.00000 \n    -1.15061      3.11757      0.00000      0.00000      0.00000     -7.70554      0.00000      0.00000      0.00000      2.80548      0.00000      0.00000      2.80548      0.00000      2.80548      0.08622      0.00000      0.00000      0.00000      0.14670      0.00000      0.00000      0.14670      0.00000      0.14670     -0.17427      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.60522      0.00000      0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03854      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.60522      0.00000      0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03854      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.60522      0.00000      0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03854 \n     2.65036     -7.70554      0.00000      0.00000      0.00000     22.11278      0.00000      0.00000      0.00000     -7.12547      0.00000      0.00000     -7.12547      0.00000     -7.12547     -1.16605      0.00000      0.00000      0.00000     -0.37690      0.00000      0.00000     -0.37690      0.00000     -0.37690      0.71320      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      2.94390      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09917      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      2.94390      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09917      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.33155      0.00000      0.00000      0.00000      2.94390      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09917 \n    -0.99622      2.80548      0.00000      0.00000      0.00000     -7.12547      0.00000      0.00000      0.00000      4.59331      0.00000      0.00000      1.50893      0.00000      1.50894      0.11778      0.00000      0.00000      0.00000     -0.17622      0.00000      0.00000      0.28988      0.00000      0.28988     -0.17421      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.16875      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.16875      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99622      2.80548      0.00000      0.00000      0.00000     -7.12547      0.00000      0.00000      0.00000      1.50893      0.00000      0.00000      4.59332      0.00000      1.50894      0.11778      0.00000      0.00000      0.00000      0.28987      0.00000      0.00000     -0.17621      0.00000      0.28989     -0.17421      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.16875      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99622      2.80548      0.00000      0.00000      0.00000     -7.12547      0.00000      0.00000      0.00000      1.50894      0.00000      0.00000      1.50894      0.00000      4.59330      0.11778      0.00000      0.00000      0.00000      0.28988      0.00000      0.00000      0.28987      0.00000     -0.17621     -0.17421      0.00000      0.00000      0.00000 \n     0.00521      0.08622      0.00000      0.00000      0.00000     -1.16605      0.00000      0.00000      0.00000      0.11778      0.00000      0.00000      0.11778      0.00000      0.11778      3.60254      0.00000      0.00000      0.00000     -0.34637      0.00000      0.00000     -0.34637      0.00000     -0.34637     -0.86566      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.34801      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.23149      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.34801      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.23149      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.34801      0.00000      0.00000      0.00000     -0.93600      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.23149      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294 \n    -0.05450      0.14670      0.00000      0.00000      0.00000     -0.37690      0.00000      0.00000      0.00000     -0.17622      0.00000      0.00000      0.28987      0.00000      0.28988     -0.34637      0.00000      0.00000      0.00000      1.69938      0.00000      0.00000     -0.75988      0.00000     -0.75988      0.22993      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.91851      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.91851      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05450      0.14670      0.00000      0.00000      0.00000     -0.37690      0.00000      0.00000      0.00000      0.28988      0.00000      0.00000     -0.17621      0.00000      0.28987     -0.34637      0.00000      0.00000      0.00000     -0.75988      0.00000      0.00000      1.69938      0.00000     -0.75989      0.22993      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.91851      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05450      0.14670      0.00000      0.00000      0.00000     -0.37690      0.00000      0.00000      0.00000      0.28988      0.00000      0.00000      0.28989      0.00000     -0.17621     -0.34637      0.00000      0.00000      0.00000     -0.75988      0.00000      0.00000     -0.75989      0.00000      1.69937      0.22993      0.00000      0.00000      0.00000 \n     0.05581     -0.17427      0.00000      0.00000      0.00000      0.71320      0.00000      0.00000      0.00000     -0.17421      0.00000      0.00000     -0.17421      0.00000     -0.17421     -0.86566      0.00000      0.00000      0.00000      0.22993      0.00000      0.00000      0.22993      0.00000      0.22993      1.88075      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03854      0.00000      0.00000      0.00000     -0.09917      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07380      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03854      0.00000      0.00000      0.00000     -0.09917      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07380      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03854      0.00000      0.00000      0.00000     -0.09917      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16294      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07380 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.04847      0.04847      0.04847      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.56639      0.56639      0.56639      0.56639      0.56639      0.00755      0.00755      0.00755      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -851.82690   -121.61080   -114.31280   -114.31280   -114.31280    -21.39429    -18.45428    -18.45428    -18.45428    -11.63061    -11.63061    -11.63061    -11.63061    -11.63061     -2.81592     -1.83039     -1.83039     -1.83039     -0.12738     -0.04089     -0.04089     -0.04089     -0.04089     -0.04089      0.04622      0.04622      0.04622      1.45847    189.99650 \n   </alphaeps>\n   <betaeps>\n  -851.82670   -121.60200   -114.30590   -114.30590   -114.30590    -21.38426    -18.44421    -18.44421    -18.44421    -11.61901    -11.61901    -11.61901    -11.61901    -11.61901     -2.75546     -1.76981     -1.76981     -1.76981     -0.11494      0.02038      0.02038      0.02038      0.02038      0.02038      0.05711      0.05711      0.05711      1.49710    190.01500 \n   </betaeps>\n   <alphavectors>\n    -0.99572     -0.41974     -0.00000      0.00000      0.00000     -0.20128     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.08387     -0.00000     -0.00000     -0.00000     -0.02431     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.07837      0.58497 \n    -0.01221      1.03354      0.00000     -0.00000     -0.00000      0.63852      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.27639      0.00000      0.00000      0.00000      0.07965      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.26449     -0.24537 \n     0.00000      0.00000      0.00000     -0.00000      0.99885     -0.00000     -0.00000     -0.00000      0.51670      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.19463     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.05274     -0.00000     -0.00000 \n    -0.00000      0.00000      0.99885     -0.00000      0.00000     -0.00000      0.51670     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.19463     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05274      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.99885     -0.00000      0.00000      0.00000     -0.51670     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.19463     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05274      0.00000     -0.00000      0.00000 \n     0.06021     -1.86225     -0.00000      0.00000      0.00000     -2.46912     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.16844     -0.00000     -0.00000     -0.00000     -0.35609     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.22993    -35.14953 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00226      0.00000     -0.00000     -0.00000     -1.09994      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.51160      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.14081     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00226      0.00000     -0.00000      0.00000     -1.09994      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.51160      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.14081     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00226      0.00000     -0.00000     -0.00000      1.09994      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.51160      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.14081     -0.00000      0.00000     -0.00000 \n    -0.02643      0.88670      0.00000     -0.00000     -0.00000      0.63349      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00326     -0.00000      0.98274     -0.27224      0.00000      0.00000      0.00000      0.08120      0.00000      0.00000     -0.00000     -0.00075     -0.28197     -0.00000      0.00000     -0.00000     -0.28898     15.86855 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.70217      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.48838     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.70217     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.48838     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.02643      0.88670      0.00000     -0.00000     -0.00000      0.63349      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.85271      0.00000     -0.48855     -0.27224     -0.00000     -0.00000      0.00000      0.08120     -0.00000     -0.00000     -0.00000      0.24457      0.14033     -0.00000      0.00000     -0.00000     -0.28898     15.86855 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.70217      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.48838      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02643      0.88670      0.00000     -0.00000     -0.00000      0.63349      0.00000      0.00000      0.00000     -0.00000      0.00000      0.84945     -0.00000     -0.49419     -0.27224      0.00000      0.00000     -0.00000      0.08120      0.00000      0.00000      0.00000     -0.24381      0.14163     -0.00000      0.00000     -0.00000     -0.28898     15.86855 \n     0.00013     -0.12824     -0.00000      0.00000     -0.00000     -0.30553     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.18865     -0.00000     -0.00000      0.00000      0.53485      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -3.36864     -0.90119 \n     0.00000      0.00000      0.00000     -0.00000      0.00237     -0.00000     -0.00000     -0.00000     -0.06518      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.05332     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.33419      0.00000     -0.00000 \n    -0.00000      0.00000      0.00237     -0.00000      0.00000     -0.00000     -0.06518     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.05332     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.33419      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00237     -0.00000      0.00000      0.00000      0.06518     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.05332     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.33419      0.00000     -0.00000      0.00000 \n     0.00017      0.03895      0.00000     -0.00000      0.00000      0.09432      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00024     -0.00000      0.07121      0.06085      0.00000      0.00000     -0.00000     -0.13167     -0.00000     -0.00000     -0.00000      0.00272      1.01991     -0.00000      0.00000      0.00000      1.62574      0.19391 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.12335     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.76654      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.12335      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.76654      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00017      0.03895      0.00000     -0.00000      0.00000      0.09432      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06179      0.00000     -0.03540      0.06085     -0.00000     -0.00000     -0.00000     -0.13167     -0.00000      0.00000     -0.00000     -0.88463     -0.50760     -0.00000      0.00000      0.00000      1.62574      0.19391 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.12335     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.76654      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00017      0.03895      0.00000     -0.00000      0.00000      0.09432      0.00000      0.00000      0.00000     -0.00000      0.00000      0.06155     -0.00000     -0.03581      0.06085      0.00000      0.00000     -0.00000     -0.13167      0.00000     -0.00000      0.00000      0.88191     -0.51231      0.00000      0.00000      0.00000      1.62574      0.19391 \n    -0.00011     -0.00964     -0.00000      0.00000     -0.00000     -0.02460     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.05189     -0.00000     -0.00000      0.00000     -0.96480     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.76417     -0.02135 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00043      0.00000      0.00000      0.00000      0.00834     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.08537      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.02212     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00043      0.00000     -0.00000      0.00000      0.00834      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.08537      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.02212      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00043      0.00000     -0.00000     -0.00000     -0.00834      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.08537      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.02212      0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99572     -0.41975      0.00000      0.00000      0.00000     -0.20132     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.08392     -0.00000     -0.00000      0.00000     -0.02373      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.07842      0.58495 \n    -0.01220      1.03356      0.00000      0.00000     -0.00000      0.63865     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.27653      0.00000      0.00000     -0.00000      0.07766     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.26457     -0.24533 \n    -0.00000      0.00000      0.00000      0.00000     -0.99887      0.00000     -0.00000     -0.00000     -0.51676      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.19422      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05332     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.99887      0.00000     -0.00000      0.00000      0.51676      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.19422      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05332     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.99887      0.00000     -0.00000      0.00000      0.51676     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.19422     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05332      0.00000      0.00000 \n     0.06021     -1.86206     -0.00000     -0.00000      0.00000     -2.46939      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.16788     -0.00000     -0.00000      0.00000     -0.34620      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.22896    -35.14967 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00223      0.00000     -0.00000     -0.00000      1.10018      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.51066      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.14235      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00223     -0.00000      0.00000     -0.00000     -1.10018     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.51066     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.14235      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00223     -0.00000      0.00000     -0.00000     -1.10018      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.51066      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.14235     -0.00000     -0.00000 \n    -0.02643      0.88660      0.00000      0.00000     -0.00000      0.63347     -0.00000      0.00000     -0.00000      0.00481     -0.00000      0.00000      0.00000     -0.98289      0.27178     -0.00000      0.00000      0.00000      0.07875      0.00408     -0.00000      0.28140      0.00000     -0.00000      0.00000      0.00000      0.00000      0.28840     15.86859 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.70243      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.48746     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.70243     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.48746     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.02643      0.88660      0.00000      0.00000     -0.00000      0.63347     -0.00000      0.00000     -0.00000     -0.85361     -0.00000      0.00000      0.00000      0.48728      0.27178      0.00000     -0.00000     -0.00000      0.07875     -0.24574     -0.00000     -0.13717     -0.00000      0.00000      0.00000      0.00000      0.00000      0.28840     15.86859 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.70243      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.48746     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.02643      0.88660      0.00000      0.00000     -0.00000      0.63347     -0.00000      0.00000     -0.00000      0.84880     -0.00000      0.00000      0.00000      0.49561      0.27178      0.00000     -0.00000      0.00000      0.07875      0.24166     -0.00000     -0.14423     -0.00000      0.00000      0.00000      0.00000      0.00000      0.28840     15.86859 \n     0.00013     -0.12820     -0.00000     -0.00000     -0.00000     -0.30456      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.19433      0.00000      0.00000     -0.00000      0.50811     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      3.37091     -0.90099 \n    -0.00000      0.00000      0.00000      0.00000     -0.00238      0.00000     -0.00000     -0.00000      0.06469      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.05228      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.33756     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00238      0.00000     -0.00000      0.00000     -0.06469      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.05228      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.33756     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00238      0.00000     -0.00000      0.00000     -0.06469     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.05228     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.33756      0.00000      0.00000 \n     0.00017      0.03894     -0.00000     -0.00000      0.00000      0.09407     -0.00000      0.00000     -0.00000      0.00035     -0.00000      0.00000      0.00000     -0.07066     -0.06367     -0.00000      0.00000     -0.00000     -0.11831     -0.01478      0.00000     -1.01985     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.62669      0.19384 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.12239     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.76661      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.12239      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.76661      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00017      0.03894     -0.00000     -0.00000      0.00000      0.09407     -0.00000      0.00000     -0.00000     -0.06137     -0.00000      0.00000      0.00000      0.03503     -0.06367      0.00000     -0.00000      0.00000     -0.11831      0.89060      0.00000      0.49712      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.62669      0.19384 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.12239     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.76661      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00017      0.03894     -0.00000     -0.00000      0.00000      0.09407     -0.00000      0.00000     -0.00000      0.06102     -0.00000      0.00000      0.00000      0.03563     -0.06367      0.00000     -0.00000     -0.00000     -0.11831     -0.87582      0.00000      0.52272      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.62669      0.19384 \n    -0.00011     -0.00964      0.00000      0.00000     -0.00000     -0.02456      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.05409      0.00000      0.00000      0.00000     -0.97103      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.75609     -0.02133 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00043     -0.00000      0.00000      0.00000     -0.00830     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.08863     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.02184     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00043     -0.00000      0.00000     -0.00000      0.00830     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.08863     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.02184     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00043     -0.00000      0.00000     -0.00000      0.00830      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08863      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.02184     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ag\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.43514     -1.15909      0.00000      0.00000      0.00000      2.66035      0.00000      0.00000      0.00000     -0.99729      0.00000      0.00000     -0.99729      0.00000     -0.99729      0.00916      0.00000      0.00000      0.00000     -0.05667      0.00000      0.00000     -0.05667      0.00000     -0.05667      0.05421      0.00000      0.00000      0.00000 \n    -1.15909      3.14049      0.00000      0.00000      0.00000     -7.76171      0.00000      0.00000      0.00000      2.81867      0.00000      0.00000      2.81867      0.00000      2.81867      0.07406      0.00000      0.00000      0.00000      0.15429      0.00000      0.00000      0.15429      0.00000      0.15429     -0.17028      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.62629      0.00000      0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36054      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03825      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.62629      0.00000      0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36054      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03825      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.62629      0.00000      0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36054      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03825 \n     2.66035     -7.76171      0.00000      0.00000      0.00000     22.29156      0.00000      0.00000      0.00000     -7.16866      0.00000      0.00000     -7.16866      0.00000     -7.16866     -1.11784      0.00000      0.00000      0.00000     -0.40714      0.00000      0.00000     -0.40714      0.00000     -0.40714      0.69974      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      2.97780      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09808      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      2.97780      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09808      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.36220      0.00000      0.00000      0.00000      2.97780      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09808 \n    -0.99729      2.81867      0.00000      0.00000      0.00000     -7.16866      0.00000      0.00000      0.00000      4.62115      0.00000      0.00000      1.50475      0.00000      1.50477      0.10830      0.00000      0.00000      0.00000     -0.24188      0.00000      0.00000      0.33335      0.00000      0.33335     -0.17119      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.23274      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.23274      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99729      2.81867      0.00000      0.00000      0.00000     -7.16866      0.00000      0.00000      0.00000      1.50475      0.00000      0.00000      4.62116      0.00000      1.50475      0.10830      0.00000      0.00000      0.00000      0.33334      0.00000      0.00000     -0.24187      0.00000      0.33336     -0.17119      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.23274      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99729      2.81867      0.00000      0.00000      0.00000     -7.16866      0.00000      0.00000      0.00000      1.50477      0.00000      0.00000      1.50475      0.00000      4.62114      0.10830      0.00000      0.00000      0.00000      0.33336      0.00000      0.00000      0.33335      0.00000     -0.24188     -0.17119      0.00000      0.00000      0.00000 \n     0.00916      0.07406      0.00000      0.00000      0.00000     -1.11784      0.00000      0.00000      0.00000      0.10830      0.00000      0.00000      0.10830      0.00000      0.10830      3.52629      0.00000      0.00000      0.00000     -0.33002      0.00000      0.00000     -0.33002      0.00000     -0.33002     -0.86041      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.36054      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25079      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.36054      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25079      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.36054      0.00000      0.00000      0.00000     -0.95941      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.25079      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367 \n    -0.05667      0.15429      0.00000      0.00000      0.00000     -0.40714      0.00000      0.00000      0.00000     -0.24188      0.00000      0.00000      0.33334      0.00000      0.33336     -0.33002      0.00000      0.00000      0.00000      1.93119      0.00000      0.00000     -0.87384      0.00000     -0.87383      0.24029      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.61005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.61005      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05667      0.15429      0.00000      0.00000      0.00000     -0.40714      0.00000      0.00000      0.00000      0.33335      0.00000      0.00000     -0.24187      0.00000      0.33335     -0.33002      0.00000      0.00000      0.00000     -0.87384      0.00000      0.00000      1.93119      0.00000     -0.87384      0.24029      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.15048      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.61005      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.05667      0.15429      0.00000      0.00000      0.00000     -0.40714      0.00000      0.00000      0.00000      0.33335      0.00000      0.00000      0.33336      0.00000     -0.24188     -0.33002      0.00000      0.00000      0.00000     -0.87383      0.00000      0.00000     -0.87384      0.00000      1.93118      0.24029      0.00000      0.00000      0.00000 \n     0.05421     -0.17028      0.00000      0.00000      0.00000      0.69974      0.00000      0.00000      0.00000     -0.17119      0.00000      0.00000     -0.17119      0.00000     -0.17119     -0.86041      0.00000      0.00000      0.00000      0.24029      0.00000      0.00000      0.24029      0.00000      0.24029      1.87137      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03825      0.00000      0.00000      0.00000     -0.09808      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04046      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03825      0.00000      0.00000      0.00000     -0.09808      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04046      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03825      0.00000      0.00000      0.00000     -0.09808      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16367      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04046 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99814      0.99814      0.99814      0.99814      0.99814      0.01759      0.01759      0.01759      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.78621      0.78621      0.78621      0.78621      0.78621      0.00848      0.00848      0.00848      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -891.48660   -128.17290   -120.66910   -120.66910   -120.66910    -22.80530    -19.79871    -19.79871    -19.79871    -12.72755    -12.72755    -12.72755    -12.72755    -12.72755     -2.96396     -1.93247     -1.93247     -1.93247     -0.12510     -0.02283     -0.02283     -0.02283     -0.02283     -0.02283      0.04799      0.04799      0.04799      1.57199    202.67040 \n   </alphaeps>\n   <betaeps>\n  -891.48650   -128.16840   -120.66560   -120.66560   -120.66560    -22.80022    -19.79364    -19.79364    -19.79364    -12.72172    -12.72172    -12.72172    -12.72172    -12.72172     -2.93428     -1.90277     -1.90277     -1.90277     -0.12033      0.00698      0.00698      0.00698      0.00698      0.00698      0.05197      0.05197      0.05197      1.59060    202.67970 \n   </betaeps>\n   <alphavectors>\n     0.99590     -0.42004     -0.00000      0.00000     -0.00000      0.20347     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.08578      0.00000      0.00000     -0.00000      0.02373      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.08070      0.59147 \n     0.01186      1.03259     -0.00000      0.00000     -0.00000     -0.64617      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.28329      0.00000      0.00000     -0.00000     -0.07797     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.27296     -0.25597 \n    -0.00000     -0.00000      0.00000      0.99953      0.00000      0.00000      0.00000     -0.52368     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.19959      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.04983     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.99953      0.00000     -0.00000      0.00000     -0.52368      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.19959     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.04983      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.99953      0.00000      0.00000     -0.00000     -0.52368      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.19959      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.04983      0.00000     -0.00000 \n    -0.06289     -1.84827      0.00000     -0.00000      0.00000      2.48668     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.19292     -0.00000     -0.00000      0.00000      0.34781      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.26610    -35.18987 \n     0.00000      0.00000     -0.00000      0.00076     -0.00000     -0.00000     -0.00000      1.10364      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.52034     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13187      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00076     -0.00000      0.00000     -0.00000      1.10364     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.52034      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.13187     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00076     -0.00000     -0.00000      0.00000      1.10364     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.52034     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.13187      0.00000      0.00000 \n     0.02770      0.88076     -0.00000      0.00000     -0.00000     -0.64114     -0.00000      0.00000      0.00000      0.77110      0.00000     -0.00000     -0.00000     -0.61024     -0.27937      0.00000     -0.00000      0.00000     -0.07983      0.22234      0.00000     -0.00000     -0.00000     -0.17615     -0.00000     -0.00000     -0.00000     -0.29888     15.89016 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.70322      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.49132     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.70322      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.49132      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.02770      0.88076     -0.00000      0.00000     -0.00000     -0.64114     -0.00000      0.00000      0.00000     -0.91404     -0.00000      0.00000      0.00000     -0.36267     -0.27937      0.00000      0.00000      0.00000     -0.07983     -0.26372     -0.00000     -0.00000      0.00000     -0.10447     -0.00000     -0.00000     -0.00000     -0.29888     15.89016 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.70322      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.49132      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.02770      0.88076     -0.00000      0.00000     -0.00000     -0.64114     -0.00000      0.00000      0.00000      0.14294      0.00000     -0.00000     -0.00000      0.97291     -0.27937     -0.00000     -0.00000     -0.00000     -0.07983      0.04138     -0.00000      0.00000     -0.00000      0.28063     -0.00000     -0.00000     -0.00000     -0.29888     15.89016 \n    -0.00033     -0.12781      0.00000     -0.00000      0.00000      0.31600     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.17522      0.00000     -0.00000      0.00000     -0.51913     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -3.39127     -0.90019 \n    -0.00000     -0.00000      0.00000      0.00276      0.00000      0.00000      0.00000      0.06469     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.05852      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.30788     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00276      0.00000     -0.00000      0.00000      0.06469      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.05852     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.30788      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00276      0.00000      0.00000     -0.00000      0.06469      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.05852      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.30788     -0.00000     -0.00000 \n    -0.00011      0.03844      0.00000     -0.00000      0.00000     -0.09703      0.00000      0.00000      0.00000      0.05321      0.00000     -0.00000     -0.00000     -0.04211      0.05289      0.00000     -0.00000      0.00000      0.13276     -0.80043      0.00000     -0.00000     -0.00000      0.63416      0.00000     -0.00000     -0.00000      1.61596      0.19077 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.11752     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.76877     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.11752     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.76877      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00011      0.03844      0.00000     -0.00000      0.00000     -0.09703      0.00000      0.00000      0.00000     -0.06307     -0.00000      0.00000      0.00000     -0.02502      0.05289      0.00000      0.00000      0.00000      0.13276      0.94942     -0.00000     -0.00000      0.00000      0.37611      0.00000     -0.00000     -0.00000      1.61596      0.19077 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.11752     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.76877      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00011      0.03844      0.00000     -0.00000      0.00000     -0.09703      0.00000      0.00000      0.00000      0.00986      0.00000     -0.00000     -0.00000      0.06713      0.05289     -0.00000     -0.00000     -0.00000      0.13276     -0.14899     -0.00000      0.00000     -0.00000     -1.01027      0.00000     -0.00000     -0.00000      1.61596      0.19077 \n     0.00009     -0.00868     -0.00000      0.00000     -0.00000      0.02324     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.04786      0.00000     -0.00000      0.00000      0.96448     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.70399     -0.01832 \n     0.00000      0.00000     -0.00000     -0.00045     -0.00000     -0.00000     -0.00000     -0.00755      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.08089     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.01798      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00045     -0.00000      0.00000     -0.00000     -0.00755     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.08089      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.01798     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00045     -0.00000     -0.00000      0.00000     -0.00755      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.08089     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.01798     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99590      0.42004     -0.00000     -0.00000      0.00000     -0.20349     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.08580      0.00000     -0.00000     -0.00000      0.02346     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.08072      0.59146 \n    -0.01186     -1.03260      0.00000      0.00000     -0.00000      0.64624      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.28333     -0.00000      0.00000      0.00000     -0.07706      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.27301     -0.25595 \n    -0.00000      0.00000     -0.00000     -0.99953      0.00000     -0.00000     -0.00000     -0.52371     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.19940      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.05011      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.99953     -0.00000      0.00000     -0.00000     -0.52371     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.19940      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.05011      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.99953     -0.00000     -0.00000     -0.00000     -0.52371      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.19940      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.05011     -0.00000     -0.00000 \n     0.06289      1.84818     -0.00000     -0.00000      0.00000     -2.48681     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.19252      0.00000     -0.00000     -0.00000      0.34328     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.26570    -35.18994 \n     0.00000     -0.00000      0.00000     -0.00074     -0.00000      0.00000      0.00000      1.10375      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.51991     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.13261     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00074      0.00000     -0.00000      0.00000      1.10375      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.51991     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.13261     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00074      0.00000      0.00000      0.00000      1.10375     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.51991     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.13261      0.00000      0.00000 \n    -0.02770     -0.88071      0.00000      0.00000     -0.00000      0.64113      0.00000      0.00000      0.00000     -0.77059      0.00000     -0.00000     -0.00000      0.61100      0.27912      0.00000     -0.00000     -0.00000     -0.07871     -0.22214     -0.00000     -0.00000     -0.00000      0.17603      0.00000      0.00000      0.00000     -0.29863     15.89018 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.70334     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.49091     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.70334      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.49091     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.02770     -0.88071      0.00000      0.00000     -0.00000      0.64113      0.00000      0.00000      0.00000      0.91444     -0.00000      0.00000      0.00000      0.36185      0.27912     -0.00000      0.00000      0.00000     -0.07871      0.26351     -0.00000      0.00000      0.00000      0.10437      0.00000      0.00000      0.00000     -0.29863     15.89018 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.70334     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.49091      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.02770     -0.88071      0.00000      0.00000     -0.00000      0.64113      0.00000      0.00000      0.00000     -0.14385      0.00000     -0.00000     -0.00000     -0.97285      0.27912      0.00000     -0.00000     -0.00000     -0.07871     -0.04137     -0.00000     -0.00000     -0.00000     -0.28039      0.00000      0.00000      0.00000     -0.29863     15.89018 \n     0.00033      0.12779     -0.00000     -0.00000      0.00000     -0.31553     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.17750      0.00000     -0.00000     -0.00000     -0.50702      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -3.39238     -0.90010 \n    -0.00000      0.00000     -0.00000     -0.00276      0.00000     -0.00000     -0.00000      0.06445     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.05806      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.30948      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00276     -0.00000      0.00000     -0.00000      0.06445     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.05806      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.30948      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00276     -0.00000     -0.00000     -0.00000      0.06445      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.05806      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.30948     -0.00000     -0.00000 \n     0.00011     -0.03843      0.00000      0.00000     -0.00000      0.09691      0.00000      0.00000      0.00000     -0.05298      0.00000     -0.00000     -0.00000      0.04200     -0.05402      0.00000     -0.00000     -0.00000      0.12676      0.80039     -0.00000     -0.00000     -0.00000     -0.63424      0.00000      0.00000      0.00000      1.61641      0.19074 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.11710      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.76880     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.11710      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.76880     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00011     -0.03843      0.00000      0.00000     -0.00000      0.09691      0.00000      0.00000      0.00000      0.06287     -0.00000      0.00000      0.00000      0.02488     -0.05402     -0.00000      0.00000      0.00000      0.12676     -0.94946     -0.00000      0.00000      0.00000     -0.37604      0.00000      0.00000      0.00000      1.61641      0.19074 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.11710      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.76880      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00011     -0.03843      0.00000      0.00000     -0.00000      0.09691      0.00000      0.00000      0.00000     -0.00989      0.00000     -0.00000     -0.00000     -0.06688     -0.05402      0.00000     -0.00000     -0.00000      0.12676      0.14907     -0.00000     -0.00000     -0.00000      1.01028      0.00000      0.00000      0.00000      1.61641      0.19074 \n    -0.00009      0.00868     -0.00000     -0.00000      0.00000     -0.02322     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.04881      0.00000     -0.00000     -0.00000      0.96708      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.70036     -0.01831 \n     0.00000     -0.00000      0.00000      0.00045     -0.00000      0.00000      0.00000     -0.00753      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.08242     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.01785     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00045      0.00000     -0.00000      0.00000     -0.00753      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.08242     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.01785      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00045      0.00000      0.00000      0.00000     -0.00753      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.08242     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.01785      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cd\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.43752     -1.16585      0.00000      0.00000      0.00000      2.66465      0.00000      0.00000      0.00000     -0.99646      0.00000      0.00000     -0.99646      0.00000     -0.99646      0.03749      0.00000      0.00000      0.00000     -0.07373      0.00000      0.00000     -0.07373      0.00000     -0.07373      0.06393      0.00000      0.00000      0.00000 \n    -1.16585      3.16159      0.00000      0.00000      0.00000     -7.79228      0.00000      0.00000      0.00000      2.82144      0.00000      0.00000      2.82144      0.00000      2.82144     -0.00566      0.00000      0.00000      0.00000      0.20474      0.00000      0.00000      0.20474      0.00000      0.20474     -0.19929      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.64750      0.00000      0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35881      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05078      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.64750      0.00000      0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35881      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05078      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.64750      0.00000      0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35881      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.05078 \n     2.66465     -7.79228      0.00000      0.00000      0.00000     22.35111      0.00000      0.00000      0.00000     -7.16644      0.00000      0.00000     -7.16644      0.00000     -7.16644     -0.86727      0.00000      0.00000      0.00000     -0.57647      0.00000      0.00000     -0.57647      0.00000     -0.57647      0.79539      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      2.99521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12934      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      2.99521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12934      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.38907      0.00000      0.00000      0.00000      2.99521      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12934 \n    -0.99646      2.82144      0.00000      0.00000      0.00000     -7.16644      0.00000      0.00000      0.00000      4.63753      0.00000      0.00000      1.48044      0.00000      1.48044      0.03448      0.00000      0.00000      0.00000     -0.27993      0.00000      0.00000      0.42399      0.00000      0.42398     -0.19566      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.31417      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.31417      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99646      2.82144      0.00000      0.00000      0.00000     -7.16644      0.00000      0.00000      0.00000      1.48044      0.00000      0.00000      4.63754      0.00000      1.48044      0.03448      0.00000      0.00000      0.00000      0.42398      0.00000      0.00000     -0.27994      0.00000      0.42398     -0.19566      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.31417      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99646      2.82144      0.00000      0.00000      0.00000     -7.16644      0.00000      0.00000      0.00000      1.48044      0.00000      0.00000      1.48044      0.00000      4.63754      0.03448      0.00000      0.00000      0.00000      0.42397      0.00000      0.00000      0.42398      0.00000     -0.27993     -0.19566      0.00000      0.00000      0.00000 \n     0.03749     -0.00566      0.00000      0.00000      0.00000     -0.86727      0.00000      0.00000      0.00000      0.03448      0.00000      0.00000      0.03448      0.00000      0.03448      3.50176      0.00000      0.00000      0.00000     -0.28622      0.00000      0.00000     -0.28622      0.00000     -0.28622     -0.70779      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.35881      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19692      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.35881      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19692      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.35881      0.00000      0.00000      0.00000     -0.94405      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.19692      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106 \n    -0.07373      0.20474      0.00000      0.00000      0.00000     -0.57647      0.00000      0.00000      0.00000     -0.27993      0.00000      0.00000      0.42398      0.00000      0.42397     -0.28622      0.00000      0.00000      0.00000      2.14737      0.00000      0.00000     -1.00672      0.00000     -1.00673      0.08168      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.30823      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.30823      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.07373      0.20474      0.00000      0.00000      0.00000     -0.57647      0.00000      0.00000      0.00000      0.42399      0.00000      0.00000     -0.27994      0.00000      0.42398     -0.28622      0.00000      0.00000      0.00000     -1.00672      0.00000      0.00000      2.14739      0.00000     -1.00673      0.08168      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.40786      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.30823      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.07373      0.20474      0.00000      0.00000      0.00000     -0.57647      0.00000      0.00000      0.00000      0.42398      0.00000      0.00000      0.42398      0.00000     -0.27993     -0.28622      0.00000      0.00000      0.00000     -1.00673      0.00000      0.00000     -1.00673      0.00000      2.14739      0.08168      0.00000      0.00000      0.00000 \n     0.06393     -0.19929      0.00000      0.00000      0.00000      0.79539      0.00000      0.00000      0.00000     -0.19566      0.00000      0.00000     -0.19566      0.00000     -0.19566     -0.70779      0.00000      0.00000      0.00000      0.08168      0.00000      0.00000      0.08168      0.00000      0.08168      2.07429      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.05078      0.00000      0.00000      0.00000     -0.12934      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02481      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.05078      0.00000      0.00000      0.00000     -0.12934      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02481      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.05078      0.00000      0.00000      0.00000     -0.12934      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.21106      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02481 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99897      0.99897      0.99897      0.99897      0.99897      0.00171      0.00171      0.00171      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99897      0.99897      0.99897      0.99897      0.99897      0.00171      0.00171      0.00171      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -931.93550   -134.77850   -127.04970   -127.04970   -127.04970    -24.13071    -21.05430    -21.05430    -21.05430    -13.73851    -13.73851    -13.73851    -13.73851    -13.73851     -3.01629     -1.94626     -1.94626     -1.94626     -0.04791      0.08741      0.08741      0.08741      0.08741      0.08741      0.17237      0.17237      0.17237      2.14534    216.31750 \n   </alphaeps>\n   <betaeps>\n  -931.93550   -134.77850   -127.04970   -127.04970   -127.04970    -24.13071    -21.05430    -21.05430    -21.05430    -13.73851    -13.73851    -13.73851    -13.73851    -13.73851     -3.01629     -1.94626     -1.94626     -1.94626     -0.04791      0.08741      0.08741      0.08741      0.08741      0.08741      0.17237      0.17237      0.17237      2.14534    216.31750 \n   </betaeps>\n   <alphavectors>\n     0.99596      0.41997     -0.00000      0.00000     -0.00000     -0.20509      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.08790      0.00000     -0.00000     -0.00000      0.02566      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.08757     -0.59812 \n     0.01171     -1.03110     -0.00000      0.00000     -0.00000      0.65240     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.29120     -0.00000     -0.00000      0.00000     -0.08408      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.29799      0.26721 \n     0.00000      0.00000     -0.00000     -1.00044     -0.00000      0.00000     -0.00000      0.00000      0.53099      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.20227     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06728      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      1.00044      0.00000     -0.53099      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.20227      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06728      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -1.00044     -0.00000      0.00000      0.00000     -0.00000      0.53099      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.20227     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.06728     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.06279      1.82632      0.00000     -0.00000      0.00000     -2.49249      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.22002      0.00000      0.00000     -0.00000      0.36771     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.38826     35.22676 \n    -0.00000     -0.00000      0.00000      0.00122      0.00000     -0.00000      0.00000     -0.00000     -1.10679     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.52208      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.17672      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00122     -0.00000      1.10679     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.52208     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.17672     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00122      0.00000     -0.00000     -0.00000      0.00000     -1.10679     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.52208      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.17672     -0.00000     -0.00000      0.00000      0.00000 \n     0.02767     -0.87160     -0.00000      0.00000     -0.00000      0.64535     -0.00000      0.00000      0.00000      0.98038      0.00000      0.07079     -0.00000     -0.00000     -0.28708      0.00000      0.00000      0.00000     -0.08401      0.28451     -0.00000      0.00000      0.00000     -0.07311     -0.00000     -0.00000      0.00000      0.33050    -15.91068 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.70249      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.50880      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.70249     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.50880      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.02767     -0.87160     -0.00000      0.00000     -0.00000      0.64535     -0.00000      0.00000      0.00000     -0.55150     -0.00000      0.81364      0.00000      0.00000     -0.28708     -0.00000     -0.00000     -0.00000     -0.08401     -0.20557      0.00000     -0.00000     -0.00000     -0.20984      0.00000     -0.00000      0.00000      0.33050    -15.91068 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.70249     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.50880      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.02767     -0.87160     -0.00000      0.00000     -0.00000      0.64535     -0.00000      0.00000      0.00000     -0.42889     -0.00000     -0.88443      0.00000      0.00000     -0.28708     -0.00000     -0.00000     -0.00000     -0.08401     -0.07894      0.00000     -0.00000     -0.00000      0.28295      0.00000     -0.00000      0.00000      0.33050    -15.91068 \n    -0.00026      0.14044      0.00000     -0.00000      0.00000     -0.36783      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.18617      0.00000     -0.00000      0.00000     -0.43458      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      3.94387      0.92441 \n     0.00000      0.00000     -0.00000     -0.00337     -0.00000      0.00000     -0.00000      0.00000     -0.06694      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.04579     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.41222     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00337      0.00000      0.06694      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.04579      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.41222      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00337     -0.00000      0.00000      0.00000     -0.00000     -0.06694      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.04579     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.41222      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00016     -0.04454      0.00000     -0.00000      0.00000      0.11977     -0.00000      0.00000      0.00000      0.06674      0.00000      0.00482     -0.00000     -0.00000      0.06057      0.00000      0.00000      0.00000      0.04821     -0.99149     -0.00000      0.00000      0.00000      0.25478      0.00000     -0.00000     -0.00000     -1.89477     -0.19888 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.11589     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.77311      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.11589      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.77311      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00016     -0.04454      0.00000     -0.00000      0.00000      0.11977     -0.00000      0.00000      0.00000     -0.03754     -0.00000      0.05539      0.00000      0.00000      0.06057     -0.00000     -0.00000     -0.00000      0.04821      0.71639      0.00000     -0.00000     -0.00000      0.73127      0.00000     -0.00000     -0.00000     -1.89477     -0.19888 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.11589      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.77311      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00016     -0.04454      0.00000     -0.00000      0.00000      0.11977     -0.00000      0.00000      0.00000     -0.02920     -0.00000     -0.06021      0.00000      0.00000      0.06057     -0.00000     -0.00000     -0.00000      0.04821      0.27510      0.00000     -0.00000     -0.00000     -0.98605      0.00000     -0.00000     -0.00000     -1.89477     -0.19888 \n     0.00013      0.01112     -0.00000      0.00000     -0.00000     -0.03216      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.06256      0.00000     -0.00000      0.00000      1.01591      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.84277      0.01380 \n    -0.00000     -0.00000      0.00000      0.00074      0.00000     -0.00000      0.00000     -0.00000      0.01047     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.10228      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.03471     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00074     -0.00000     -0.01047     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.10228     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.03471      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00074      0.00000     -0.00000     -0.00000      0.00000      0.01047     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.10228      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.03471      0.00000      0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99596      0.41997      0.00000     -0.00000     -0.00000      0.20509      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.08790     -0.00000     -0.00000      0.00000      0.02566     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.08757     -0.59812 \n     0.01171     -1.03110      0.00000     -0.00000     -0.00000     -0.65240      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.29120      0.00000     -0.00000     -0.00000     -0.08408      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.29799      0.26721 \n    -0.00000     -0.00000     -0.00000     -1.00044      0.00000     -0.00000     -0.00000     -0.53099     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.20227      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.06728     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      1.00044      0.00000      0.53099      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.20227     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06728     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.00044     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.53099     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.20227     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.06728     -0.00000      0.00000 \n    -0.06279      1.82632     -0.00000      0.00000      0.00000      2.49249     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.22002     -0.00000      0.00000      0.00000      0.36771     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.38826     35.22676 \n     0.00000      0.00000      0.00000      0.00122     -0.00000      0.00000      0.00000      1.10679      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.52208     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.17672      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00122     -0.00000     -1.10679     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.52208      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.17672      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00122      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.10679      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.52208      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.17672      0.00000     -0.00000 \n     0.02767     -0.87160      0.00000     -0.00000     -0.00000     -0.64535      0.00000      0.00000      0.00000     -0.94643      0.26539      0.00000      0.00000     -0.00000     -0.28708      0.00000      0.00000      0.00000     -0.08401      0.28615     -0.00000     -0.00000      0.00000      0.06642      0.00000     -0.00000      0.00000     -0.33050    -15.91068 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.70249      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.50880      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.70249     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.50880     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.02767     -0.87160      0.00000     -0.00000     -0.00000     -0.64535      0.00000      0.00000      0.00000      0.70305      0.68694      0.00000      0.00000     -0.00000     -0.28708      0.00000      0.00000      0.00000     -0.08401     -0.20060     -0.00000     -0.00000      0.00000      0.21460      0.00000     -0.00000      0.00000     -0.33050    -15.91068 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.70249     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.50880      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.02767     -0.87160      0.00000     -0.00000     -0.00000     -0.64535      0.00000      0.00000      0.00000      0.24338     -0.95233     -0.00000     -0.00000      0.00000     -0.28708     -0.00000     -0.00000     -0.00000     -0.08401     -0.08555      0.00000      0.00000      0.00000     -0.28102      0.00000     -0.00000      0.00000     -0.33050    -15.91068 \n    -0.00026      0.14044     -0.00000      0.00000      0.00000      0.36783     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.18617      0.00000     -0.00000     -0.00000     -0.43458      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -3.94387      0.92441 \n    -0.00000     -0.00000     -0.00000     -0.00337      0.00000     -0.00000     -0.00000      0.06694     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.04579      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.41222     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00337      0.00000     -0.06694      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.04579     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.41222     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00337     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.06694     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.04579     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.41222     -0.00000      0.00000 \n    -0.00016     -0.04454     -0.00000      0.00000      0.00000     -0.11977     -0.00000     -0.00000     -0.00000     -0.06443      0.01807      0.00000      0.00000     -0.00000      0.06057      0.00000      0.00000      0.00000      0.04821     -0.99719     -0.00000     -0.00000      0.00000     -0.23147     -0.00000      0.00000     -0.00000      1.89477     -0.19888 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.11589     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.77311      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.11589      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.77311     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00016     -0.04454     -0.00000      0.00000      0.00000     -0.11977     -0.00000     -0.00000     -0.00000      0.04786      0.04676      0.00000      0.00000     -0.00000      0.06057      0.00000      0.00000      0.00000      0.04821      0.69906     -0.00000     -0.00000      0.00000     -0.74786     -0.00000      0.00000     -0.00000      1.89477     -0.19888 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.11589      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.77311      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00016     -0.04454     -0.00000      0.00000      0.00000     -0.11977     -0.00000     -0.00000     -0.00000      0.01657     -0.06483     -0.00000     -0.00000      0.00000      0.06057     -0.00000     -0.00000     -0.00000      0.04821      0.29814      0.00000      0.00000      0.00000      0.97933     -0.00000      0.00000     -0.00000      1.89477     -0.19888 \n     0.00013      0.01112      0.00000     -0.00000     -0.00000      0.03216      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.06256      0.00000     -0.00000     -0.00000      1.01591      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.84277      0.01380 \n     0.00000      0.00000      0.00000      0.00074     -0.00000      0.00000      0.00000     -0.01047      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.10228     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.03471      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00074     -0.00000      0.01047     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.10228      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.03471      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00074      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.01047      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.10228      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.03471      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ga\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.37780     -1.01296      0.00000      0.00000      0.00000      1.81215      0.00000      0.00000      0.00000     -0.69066      0.00000      0.00000     -0.69066      0.00000     -0.69066     -0.02682      0.00000      0.00000      0.00000 \n    -1.01296      2.70075      0.00000      0.00000      0.00000     -4.56230      0.00000      0.00000      0.00000      1.66734      0.00000      0.00000      1.66733      0.00000      1.66734      0.09949      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.24049      0.00000      0.00000      0.00000     -0.73773      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02578      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.24055      0.00000      0.00000      0.00000     -0.73795      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02690      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.24049      0.00000      0.00000      0.00000     -0.73773      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02578 \n     1.81215     -4.56230      0.00000      0.00000      0.00000      8.50308      0.00000      0.00000      0.00000     -2.60340      0.00000      0.00000     -2.60351      0.00000     -2.60340     -0.44178      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.73773      0.00000      0.00000      0.00000      2.26385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09685      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.73795      0.00000      0.00000      0.00000      2.26463      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.10089      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.73773      0.00000      0.00000      0.00000      2.26385      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.09685 \n    -0.69066      1.66734      0.00000      0.00000      0.00000     -2.60340      0.00000      0.00000      0.00000      3.09266      0.00000      0.00000      0.09271      0.00000      0.09263      0.02059      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.69066      1.66733      0.00000      0.00000      0.00000     -2.60351      0.00000      0.00000      0.00000      0.09271      0.00000      0.00000      3.09275      0.00000      0.09271      0.02059      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.69066      1.66734      0.00000      0.00000      0.00000     -2.60340      0.00000      0.00000      0.00000      0.09263      0.00000      0.00000      0.09271      0.00000      3.09266      0.02059      0.00000      0.00000      0.00000 \n    -0.02682      0.09949      0.00000      0.00000      0.00000     -0.44178      0.00000      0.00000      0.00000      0.02059      0.00000      0.00000      0.02059      0.00000      0.02059      2.06720      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.02578      0.00000      0.00000      0.00000     -0.09685      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34042      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02690      0.00000      0.00000      0.00000     -0.10089      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36105      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02578      0.00000      0.00000      0.00000     -0.09685      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34042 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33041      0.31289      0.31289      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.01614      0.01383      0.01383      0.00000 \n   </betaocc>\n   <alphaeps>\n  -371.94320    -49.61001    -45.39448    -45.39211    -45.39211     -8.87091     -7.23166     -7.23166     -7.23106     -4.18125     -4.17759     -4.17759     -4.17265     -4.17265     -0.72014     -0.48774     -0.48705     -0.48705     40.78386 \n   </alphaeps>\n   <betaeps>\n  -371.94190    -49.25758    -45.12449    -45.11859    -45.11859     -7.95776     -6.31217     -6.29964     -6.29964     -3.20683     -3.20683     -3.20547     -3.19533     -3.19533     -0.69611     -0.46367     -0.46280     -0.46280     41.25893 \n   </betaeps>\n   <alphavectors>\n     0.99272     -0.42321     -0.00000      0.00000      0.00000      0.15335     -0.00000     -0.00000      0.00000      0.00002      0.00000      0.00000     -0.00000      0.00000      0.02079     -0.00000     -0.00000     -0.00000     -0.37995 \n     0.01687      1.06736      0.00000     -0.00000     -0.00000     -0.45473      0.00000      0.00000     -0.00000     -0.00006     -0.00000     -0.00000      0.00000     -0.00000     -0.06473      0.00000      0.00000      0.00000     -0.05690 \n    -0.00000      0.00000     -0.00000      0.00000     -0.99316     -0.00000      0.00000     -0.36553      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05336      0.00000 \n    -0.00000      0.00000      0.99317     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.36551      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.05337      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.99316     -0.00000      0.00000      0.36553     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05336     -0.00000     -0.00000 \n     0.03776     -1.58451     -0.00000      0.00000      0.00000      1.35476     -0.00000     -0.00000      0.00000      0.00013      0.00000      0.00000     -0.00000      0.00000      0.22482     -0.00000     -0.00000     -0.00000     33.36497 \n     0.00000     -0.00000     -0.00000      0.00000     -0.02046      0.00000     -0.00000      1.06207     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.19053     -0.00000 \n     0.00000      0.00000      0.02044     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.06206     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.19057     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.02046      0.00000     -0.00000     -1.06207      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.19053      0.00000      0.00000 \n    -0.01790      0.74085     -0.00000     -0.00000     -0.00000     -0.13082      0.00000      0.00000      0.00000     -0.50000     -0.00000      0.86603     -0.00000     -0.00000     -0.02506     -0.00000      0.00000      0.00000    -14.93784 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.01790      0.74085      0.00000     -0.00000     -0.00000     -0.13102      0.00000      0.00000     -0.00000      1.00000      0.00000     -0.00000     -0.00000      0.00000     -0.02498      0.00000      0.00000      0.00000    -14.93784 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01790      0.74085      0.00000     -0.00000     -0.00000     -0.13082      0.00000      0.00000      0.00000     -0.50000     -0.00000     -0.86603      0.00000     -0.00000     -0.02506      0.00000      0.00000      0.00000    -14.93784 \n     0.00073     -0.02514     -0.00000      0.00000      0.00000     -0.02286      0.00000      0.00000      0.00000      0.00005      0.00000     -0.00000     -0.00000      0.00000     -1.01610      0.00000      0.00000      0.00000      0.32986 \n    -0.00000      0.00000      0.00000     -0.00000      0.00207     -0.00000      0.00000     -0.02159      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.01989      0.00000 \n    -0.00000     -0.00000     -0.00207      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.02156     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.01989      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00207     -0.00000      0.00000      0.02159     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.01989     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99274      0.42461     -0.00000      0.00000     -0.00000      0.15150      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00025      0.00000     -0.00000     -0.02177      0.00000      0.00000     -0.00000     -0.37903 \n    -0.01683     -1.06963      0.00000     -0.00000      0.00000     -0.44861     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00076     -0.00000      0.00000      0.06777     -0.00000     -0.00000      0.00000     -0.05929 \n     0.00000      0.00000     -0.00000      0.00000      0.99501      0.00000     -0.00000      0.00000      0.35990     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.05700     -0.00000 \n     0.00000     -0.00000     -0.99499      0.00000     -0.00000      0.00000     -0.35996     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05695      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.99501     -0.00000      0.00000     -0.00000     -0.35990     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05700      0.00000     -0.00000 \n    -0.03780      1.53565     -0.00000      0.00000     -0.00000      1.30001      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00236      0.00000     -0.00000     -0.23533      0.00000      0.00000     -0.00000     33.36936 \n     0.00000     -0.00000     -0.00000      0.00000      0.01502     -0.00000     -0.00000     -0.00000     -1.05985      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.20301      0.00000 \n     0.00000      0.00000     -0.01508      0.00000     -0.00000     -0.00000      1.05988     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.20284     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.01502      0.00000     -0.00000     -0.00000      1.05985      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.20301     -0.00000      0.00000 \n     0.01792     -0.71644      0.00000     -0.00000      0.00000     -0.10780     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.49983      0.86603      0.00000      0.02579     -0.00000     -0.00000      0.00000    -14.93922 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.01792     -0.71655     -0.00000     -0.00000      0.00000     -0.10493     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.00016     -0.00000      0.00000      0.02613     -0.00000     -0.00000      0.00000    -14.93921 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.01792     -0.71644      0.00000     -0.00000      0.00000     -0.10780     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.49983     -0.86603      0.00000      0.02579     -0.00000     -0.00000      0.00000    -14.93922 \n    -0.00073      0.02392     -0.00000      0.00000     -0.00000     -0.01526     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00020      0.00000      0.00000      1.01626     -0.00000     -0.00000      0.00000      0.32990 \n     0.00000      0.00000     -0.00000      0.00000     -0.00136      0.00000      0.00000      0.00000      0.00962      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.02007     -0.00000 \n     0.00000     -0.00000      0.00137     -0.00000      0.00000      0.00000     -0.00978      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.02007      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00136     -0.00000      0.00000      0.00000     -0.00962     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.02007      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ge\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.38093     -1.02240      0.00000      0.00000      0.00000      1.99708      0.00000      0.00000      0.00000     -0.76832      0.00000      0.00000     -0.76885      0.00000     -0.76885     -0.03192      0.00000      0.00000      0.00000 \n    -1.02240      2.73449      0.00000      0.00000      0.00000     -5.16045      0.00000      0.00000      0.00000      1.91125      0.00000      0.00000      1.91287      0.00000      1.91287      0.11640      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.26998      0.00000      0.00000      0.00000     -0.80036      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14100      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.26998      0.00000      0.00000      0.00000     -0.80037      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14101      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.26998      0.00000      0.00000      0.00000     -0.80037      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14101 \n     1.99708     -5.16045      0.00000      0.00000      0.00000     10.98696      0.00000      0.00000      0.00000     -3.44426      0.00000      0.00000     -3.45005      0.00000     -3.45005     -0.49124      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.80036      0.00000      0.00000      0.00000      2.37542      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.49143      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.80037      0.00000      0.00000      0.00000      2.37540      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.49144      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.80037      0.00000      0.00000      0.00000      2.37540      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.49144 \n    -0.76832      1.91125      0.00000      0.00000      0.00000     -3.44426      0.00000      0.00000      0.00000      2.82333      0.00000      0.00000      0.62806      0.00000      0.62806      0.01774      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.21092      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      4.21092      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.76885      1.91287      0.00000      0.00000      0.00000     -3.45005      0.00000      0.00000      0.00000      0.62806      0.00000      0.00000      2.37512      0.00000      1.07873      0.02048      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.59325      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.76885      1.91287      0.00000      0.00000      0.00000     -3.45005      0.00000      0.00000      0.00000      0.62806      0.00000      0.00000      1.07873      0.00000      2.37512      0.02048      0.00000      0.00000      0.00000 \n    -0.03192      0.11640      0.00000      0.00000      0.00000     -0.49124      0.00000      0.00000      0.00000      0.01774      0.00000      0.00000      0.02048      0.00000      0.02048      2.08653      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.14100      0.00000      0.00000      0.00000     -0.49143      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.10197      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.14101      0.00000      0.00000      0.00000     -0.49144      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.10198      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.14101      0.00000      0.00000      0.00000     -0.49144      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.10198 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99845      0.90296      0.90296      0.81900      0.81899      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50069      0.50069      0.46560      0.04541      0.04526      0.00000 \n   </betaocc>\n   <alphaeps>\n  -391.63520    -47.18126    -42.79703    -42.78697    -42.78697     -4.97391     -3.26057     -3.24041     -3.24041     -0.28602     -0.00374      0.00309      0.00309      0.20883      0.23229      0.23229      0.23776      0.23776     51.06178 \n   </alphaeps>\n   <betaeps>\n  -391.63240    -47.16881    -42.78773    -42.77555    -42.77555     -4.94519     -3.23525     -3.20815     -3.20815     -0.21391      0.06581      0.07660      0.07660      0.25063      0.25063      0.25187      0.27457      0.27459     51.10010 \n   </betaeps>\n   <alphavectors>\n    -0.99300     -0.42242      0.00000      0.00000      0.00000     -0.15726     -0.00000      0.00000     -0.00000     -0.03517      0.00000     -0.00000     -0.00000      0.00047     -0.00000     -0.00000     -0.00000     -0.00000      0.40169 \n    -0.01647      1.06376     -0.00000      0.00000      0.00000      0.47298     -0.00000      0.00000     -0.00000      0.10808     -0.00000      0.00000     -0.00000     -0.00145      0.00000      0.00000     -0.00000      0.00000      0.02764 \n    -0.00000     -0.00000      0.99255     -0.00000      0.00000     -0.00000     -0.37366      0.00000     -0.00000     -0.00000     -0.10103     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.99258     -0.00000     -0.00000      0.00000      0.37354     -0.00000      0.00000      0.00000     -0.10125      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.99258     -0.00000      0.00000      0.00000     -0.37354      0.00000      0.00000      0.00000      0.10125      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.02539     -1.68201      0.00000      0.00000      0.00000     -1.59327     -0.00000      0.00000     -0.00000     -0.36195      0.00000     -0.00000      0.00000      0.00501     -0.00000     -0.00000      0.00000     -0.00000    -33.57061 \n     0.00000      0.00000      0.02145     -0.00000      0.00000     -0.00000      1.04050      0.00000     -0.00000      0.00000      0.32344      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02138      0.00000      0.00000      0.00000     -1.04030      0.00000     -0.00000     -0.00000      0.32407     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.02138      0.00000      0.00000     -0.00000      1.04030     -0.00000     -0.00000     -0.00000     -0.32407     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.01236      0.78777     -0.00000     -0.00000     -0.00000      0.23883      0.00000     -0.00000      0.00000      0.04204      0.00000      0.00000     -0.00000     -1.00065      0.00000      0.00000     -0.00000      0.00000     15.04037 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000 \n     0.01236      0.78761     -0.00000     -0.00000     -0.00000      0.24303      0.00000     -0.00000      0.00000      0.04541     -0.00000      0.00000     -0.00000      0.49934     -0.00000     -0.00000     -0.00000      0.86603     15.04036 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000 \n     0.01236      0.78761      0.00000     -0.00000     -0.00000      0.24303      0.00000     -0.00000      0.00000      0.04541     -0.00000      0.00000     -0.00000      0.49934     -0.00000     -0.00000      0.00000     -0.86603     15.04036 \n    -0.00065     -0.02919     -0.00000      0.00000      0.00000     -0.04442     -0.00000      0.00000     -0.00000      1.01998     -0.00000      0.00000     -0.00000     -0.00217      0.00000      0.00000      0.00000      0.00000     -0.35078 \n    -0.00000     -0.00000     -0.00229      0.00000     -0.00000      0.00000      0.08156     -0.00000      0.00000     -0.00000     -1.02192     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00228      0.00000     -0.00000      0.00000     -0.08218     -0.00000      0.00000      0.00000     -1.02188      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00228     -0.00000     -0.00000      0.00000      0.08218      0.00000      0.00000      0.00000      1.02188      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99300     -0.42246     -0.00000     -0.00000     -0.00000      0.15722     -0.00000     -0.00000      0.00000     -0.03516      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00066      0.00000      0.00000     -0.40166 \n    -0.01646      1.06383      0.00000      0.00000      0.00000     -0.47288      0.00000      0.00000     -0.00000      0.10779     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00201      0.00000     -0.00000     -0.02772 \n     0.00000      0.00000     -0.99260     -0.00000     -0.00000      0.00000      0.37371      0.00000     -0.00000     -0.00000     -0.10039     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.99263     -0.00000      0.00000      0.00000     -0.37354     -0.00000     -0.00000     -0.00000     -0.00000     -0.10067     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.99263      0.00000      0.00000      0.00000      0.37354     -0.00000     -0.00000      0.10067     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02535     -1.68069     -0.00000     -0.00000     -0.00000      1.59284     -0.00000     -0.00000      0.00000     -0.35369      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00698     -0.00000      0.00000     33.57078 \n     0.00000      0.00000     -0.02132     -0.00000     -0.00000      0.00000     -1.04103     -0.00000      0.00000      0.00000      0.32172      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.02121      0.00000     -0.00000     -0.00000      1.04077      0.00000      0.00000      0.00000      0.00000      0.32256      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02121     -0.00000     -0.00000     -0.00000     -1.04077      0.00000      0.00000     -0.32256      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.01234      0.78715      0.00000      0.00000      0.00000     -0.23759     -0.00000     -0.00000      0.00000      0.03734     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.00091      0.00000     -0.00000    -15.04041 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000 \n     0.01234      0.78693     -0.00000     -0.00000     -0.00000     -0.24326      0.00000      0.00000     -0.00000      0.04260      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.49907      0.00000     -0.86603    -15.04041 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000 \n     0.01234      0.78693     -0.00000     -0.00000     -0.00000     -0.24326      0.00000      0.00000     -0.00000      0.04260      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.49907     -0.00000      0.86603    -15.04041 \n    -0.00065     -0.02916      0.00000      0.00000      0.00000      0.04385      0.00000      0.00000     -0.00000      1.02008     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00342     -0.00000     -0.00000      0.35056 \n     0.00000      0.00000      0.00227      0.00000      0.00000     -0.00000     -0.07987     -0.00000      0.00000     -0.00000     -1.02206     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00225      0.00000     -0.00000     -0.00000      0.08069     -0.00000     -0.00000     -0.00000     -0.00000     -1.02199      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00225     -0.00000     -0.00000     -0.00000     -0.08069     -0.00000     -0.00000      1.02199     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"As\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.38492     -1.03256      0.00000      0.00000      0.00000      2.07733      0.00000      0.00000      0.00000     -0.79944      0.00000      0.00000     -0.79944      0.00000     -0.79944     -0.03303      0.00000      0.00000      0.00000 \n    -1.03256      2.76470      0.00000      0.00000      0.00000     -5.44731      0.00000      0.00000      0.00000      2.02087      0.00000      0.00000      2.02087      0.00000      2.02087      0.12205      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.28310      0.00000      0.00000      0.00000     -0.80690      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04501      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.28310      0.00000      0.00000      0.00000     -0.80690      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04501      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.28310      0.00000      0.00000      0.00000     -0.80690      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04501 \n     2.07733     -5.44731      0.00000      0.00000      0.00000     12.21030      0.00000      0.00000      0.00000     -3.85917      0.00000      0.00000     -3.85917      0.00000     -3.85917     -0.55504      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.80690      0.00000      0.00000      0.00000      2.30190      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17651      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.80690      0.00000      0.00000      0.00000      2.30190      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17651      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.80690      0.00000      0.00000      0.00000      2.30190      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17651 \n    -0.79944      2.02087      0.00000      0.00000      0.00000     -3.85917      0.00000      0.00000      0.00000      3.48864      0.00000      0.00000      0.48865      0.00000      0.48864      0.04608      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.79944      2.02087      0.00000      0.00000      0.00000     -3.85917      0.00000      0.00000      0.00000      0.48865      0.00000      0.00000      3.48864      0.00000      0.48864      0.04608      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.79944      2.02087      0.00000      0.00000      0.00000     -3.85917      0.00000      0.00000      0.00000      0.48864      0.00000      0.00000      0.48864      0.00000      3.48865      0.04608      0.00000      0.00000      0.00000 \n    -0.03303      0.12205      0.00000      0.00000      0.00000     -0.55504      0.00000      0.00000      0.00000      0.04608      0.00000      0.00000      0.04608      0.00000      0.04608      2.08711      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.04501      0.00000      0.00000      0.00000     -0.17651      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05676      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.04501      0.00000      0.00000      0.00000     -0.17651      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05676      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04501      0.00000      0.00000      0.00000     -0.17651      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05676 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99952      0.99952      0.99952      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00048      0.00048      0.00048      0.00000 \n   </betaocc>\n   <alphaeps>\n  -418.56820    -51.33130    -46.75587    -46.75587    -46.75587     -5.86395     -4.03478     -4.03478     -4.03478     -0.39477     -0.31891     -0.31891     -0.31891     -0.31891     -0.31891     -0.07863     -0.07863     -0.07863     57.57434 \n   </alphaeps>\n   <betaeps>\n  -418.56410    -51.32742    -46.75124    -46.75124    -46.75124     -5.85482     -4.02439     -4.02439     -4.02439     -0.30998     -0.30998     -0.30998     -0.30998     -0.30998     -0.30122      0.01476      0.01476      0.01476     57.60987 \n   </betaeps>\n   <alphavectors>\n     0.99316      0.42238      0.00000      0.00000     -0.00000      0.16239      0.00000     -0.00000      0.00000      0.03632      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.41806 \n     0.01628     -1.06170     -0.00000     -0.00000      0.00000     -0.49206     -0.00000      0.00000      0.00000     -0.11295     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00597 \n     0.00000     -0.00000     -0.00000      0.99271      0.00000      0.00000      0.38833      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.10172      0.00000 \n    -0.00000     -0.00000     -0.99271     -0.00000      0.00000      0.00000     -0.00000     -0.38833     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.10172      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.99271     -0.00000      0.00000     -0.00000      0.38833     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.10172      0.00000      0.00000 \n     0.01611      1.72407      0.00000      0.00000     -0.00000      1.72396      0.00000     -0.00000     -0.00000      0.40415     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     33.63117 \n    -0.00000      0.00000      0.00000      0.02030     -0.00000     -0.00000     -1.04840     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.31768     -0.00000 \n     0.00000      0.00000     -0.02030      0.00000     -0.00000     -0.00000      0.00000      1.04840      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.31768     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.02030      0.00000     -0.00000      0.00000     -1.04840      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.31768      0.00000     -0.00000 \n    -0.00820     -0.80749     -0.00000     -0.00000      0.00000     -0.29776     -0.00000      0.00000      0.00000     -0.06152     -0.08651      0.99625      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000    -15.07151 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00820     -0.80749     -0.00000     -0.00000      0.00000     -0.29776     -0.00000      0.00000      0.00000     -0.06152     -0.81953     -0.57304      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000    -15.07151 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00820     -0.80749     -0.00000     -0.00000      0.00000     -0.29776     -0.00000      0.00000      0.00000     -0.06152      0.90603     -0.42321      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000    -15.07151 \n     0.00055      0.02986      0.00000      0.00000     -0.00000      0.04572      0.00000     -0.00000     -0.00000     -1.02004     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.35420 \n     0.00000     -0.00000     -0.00000     -0.00203      0.00000      0.00000     -0.07227      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.02309      0.00000 \n    -0.00000     -0.00000      0.00203     -0.00000      0.00000      0.00000     -0.00000      0.07227     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.02309      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00203     -0.00000      0.00000     -0.00000     -0.07227     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.02309     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99316      0.42238      0.00000     -0.00000     -0.00000      0.16242     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03620      0.00000     -0.00000     -0.00000     -0.41805 \n    -0.01628     -1.06171     -0.00000      0.00000      0.00000     -0.49219      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.11228     -0.00000      0.00000      0.00000     -0.00599 \n     0.00000      0.00000     -0.99271     -0.00000     -0.00000     -0.00000      0.38860     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.10062     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.99271      0.00000      0.00000     -0.38860      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.10062      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.99271     -0.00000     -0.00000     -0.00000     -0.00000      0.38860      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.10062     -0.00000     -0.00000      0.00000 \n    -0.01605      1.72390      0.00000     -0.00000     -0.00000      1.72499     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.39315      0.00000     -0.00000     -0.00000     33.63126 \n    -0.00000     -0.00000     -0.02029      0.00000      0.00000      0.00000     -1.04929      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.31474      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.02029     -0.00000     -0.00000      1.04929     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.31474     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.02029      0.00000      0.00000      0.00000      0.00000     -1.04929     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.31474      0.00000      0.00000     -0.00000 \n     0.00818     -0.80741     -0.00000      0.00000      0.00000     -0.29806      0.00000      0.00000      0.00000     -0.44290      0.89657     -0.00000      0.00000     -0.00000      0.05723     -0.00000      0.00000      0.00000    -15.07153 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00818     -0.80741     -0.00000      0.00000      0.00000     -0.29806      0.00000      0.00000      0.00000      0.99790     -0.06473     -0.00000      0.00000     -0.00000      0.05723     -0.00000      0.00000      0.00000    -15.07153 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00818     -0.80741     -0.00000      0.00000      0.00000     -0.29806      0.00000      0.00000      0.00000     -0.55501     -0.83185     -0.00000      0.00000     -0.00000      0.05723     -0.00000      0.00000      0.00000    -15.07153 \n    -0.00055      0.02986      0.00000     -0.00000     -0.00000      0.04435     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.02019     -0.00000     -0.00000     -0.00000      0.35393 \n     0.00000      0.00000      0.00202     -0.00000     -0.00000     -0.00000     -0.06940     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.02329     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00202      0.00000      0.00000      0.06940      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.02329      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00202     -0.00000     -0.00000     -0.00000     -0.00000     -0.06940      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.02329      0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Se\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.38904     -1.04254      0.00000      0.00000      0.00000      2.12720      0.00000      0.00000      0.00000     -0.81676      0.00000      0.00000     -0.81676      0.00000     -0.81676     -0.03338      0.00000      0.00000      0.00000 \n    -1.04254      2.79442      0.00000      0.00000      0.00000     -5.66929      0.00000      0.00000      0.00000      2.10120      0.00000      0.00000      2.10120      0.00000      2.10120      0.12466      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.30982      0.00000      0.00000      0.00000     -0.85454      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08297      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.30982      0.00000      0.00000      0.00000     -0.85454      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08298      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.30982      0.00000      0.00000      0.00000     -0.85454      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08297 \n     2.12720     -5.66929      0.00000      0.00000      0.00000     13.18604      0.00000      0.00000      0.00000     -4.17968      0.00000      0.00000     -4.17968      0.00000     -4.17968     -0.60024      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.85454      0.00000      0.00000      0.00000      2.35919      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28513      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.85454      0.00000      0.00000      0.00000      2.35919      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28513      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.85454      0.00000      0.00000      0.00000      2.35919      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.28513 \n    -0.81676      2.10120      0.00000      0.00000      0.00000     -4.17968      0.00000      0.00000      0.00000      3.58466      0.00000      0.00000      0.58464      0.00000      0.58463      0.06912      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.81676      2.10120      0.00000      0.00000      0.00000     -4.17968      0.00000      0.00000      0.00000      0.58464      0.00000      0.00000      3.58464      0.00000      0.58464      0.06912      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.81676      2.10120      0.00000      0.00000      0.00000     -4.17968      0.00000      0.00000      0.00000      0.58463      0.00000      0.00000      0.58464      0.00000      3.58466      0.06912      0.00000      0.00000      0.00000 \n    -0.03338      0.12466      0.00000      0.00000      0.00000     -0.60024      0.00000      0.00000      0.00000      0.06912      0.00000      0.00000      0.06912      0.00000      0.06912      2.08371      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.08297      0.00000      0.00000      0.00000     -0.28513      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.40352      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.08298      0.00000      0.00000      0.00000     -0.28513      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.40352      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.08297      0.00000      0.00000      0.00000     -0.28513      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.40352 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99988      0.99988      0.99988      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33345      0.33345      0.33345      0.00000 \n   </betaocc>\n   <alphaeps>\n  -446.39520    -55.63866    -50.86171    -50.86171    -50.86171     -6.78223     -4.85142     -4.85142     -4.85142     -0.89570     -0.89570     -0.89570     -0.89570     -0.89570     -0.48748     -0.14509     -0.14509     -0.14509     64.36452 \n   </alphaeps>\n   <betaeps>\n  -446.39250    -55.63606    -50.85860    -50.85860    -50.85860     -6.77625     -4.84472     -4.84472     -4.84472     -0.88987     -0.88987     -0.88987     -0.88987     -0.88987     -0.42939     -0.08706     -0.08706     -0.08706     64.38718 \n   </betaeps>\n   <alphavectors>\n    -0.99345      0.42223      0.00000      0.00000     -0.00000     -0.16715      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03673      0.00000     -0.00000     -0.00000     -0.43230 \n    -0.01587     -1.05992     -0.00000     -0.00000      0.00000      0.51009     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.11547     -0.00000      0.00000      0.00000      0.01297 \n     0.00000      0.00000     -0.00000      0.99305     -0.00000     -0.00000      0.00000     -0.00000      0.40238      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.10111      0.00000 \n     0.00000     -0.00000     -0.99305     -0.00000     -0.00000     -0.00000      0.40238     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.10111     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.99305      0.00000      0.00000      0.40238      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.10111      0.00000     -0.00000 \n    -0.00449      1.74516      0.00000      0.00000     -0.00000     -1.83377      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.43185      0.00000     -0.00000     -0.00000     33.66326 \n     0.00000     -0.00000     -0.00000      0.01875      0.00000      0.00000     -0.00000      0.00000     -1.05620     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.30832     -0.00000 \n     0.00000      0.00000     -0.01875     -0.00000     -0.00000     -0.00000     -1.05620      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.30832      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.01875     -0.00000     -0.00000     -1.05620     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.30832      0.00000      0.00000 \n     0.00297     -0.81750     -0.00000     -0.00000      0.00000      0.34438      0.00000     -0.00000     -0.00000     -0.50000      0.00000     -0.00000     -0.00000     -0.86603      0.07463      0.00000      0.00000     -0.00000    -15.08854 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00297     -0.81750     -0.00000     -0.00000      0.00000      0.34438     -0.00000     -0.00000     -0.00000      1.00000     -0.00000      0.00000      0.00000     -0.00000      0.07463     -0.00000      0.00000      0.00000    -15.08854 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00297     -0.81750     -0.00000     -0.00000      0.00000      0.34438      0.00000     -0.00000     -0.00000     -0.50000      0.00000     -0.00000     -0.00000      0.86603      0.07463      0.00000      0.00000     -0.00000    -15.08854 \n    -0.00041      0.02975     -0.00000      0.00000     -0.00000     -0.04672     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.01918     -0.00000      0.00000      0.00000      0.35361 \n     0.00000      0.00000     -0.00000     -0.00168     -0.00000     -0.00000     -0.00000      0.00000     -0.06460      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.02297      0.00000 \n     0.00000     -0.00000      0.00168      0.00000      0.00000      0.00000     -0.06460      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.02297     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00168      0.00000     -0.00000     -0.06460      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.02297     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99346     -0.42223      0.00000      0.00000      0.00000     -0.16717     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.03667      0.00000      0.00000      0.00000     -0.43230 \n     0.01587      1.05993     -0.00000     -0.00000     -0.00000      0.51016      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.11509     -0.00000     -0.00000     -0.00000      0.01296 \n     0.00000      0.00000      0.00000     -0.99305      0.00000     -0.00000     -0.00000      0.00000      0.40252     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.10054      0.00000 \n     0.00000     -0.00000     -0.99305     -0.00000      0.00000     -0.00000      0.40252     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.10054     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.99305      0.00000      0.00000      0.40252     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.10054      0.00000      0.00000 \n     0.00445     -1.74509      0.00000      0.00000      0.00000     -1.83429     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.42574      0.00000      0.00000      0.00000     33.66331 \n     0.00000     -0.00000      0.00000     -0.01874     -0.00000      0.00000      0.00000     -0.00000     -1.05664      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.30683     -0.00000 \n     0.00000     -0.00000     -0.01874     -0.00000      0.00000      0.00000     -1.05664      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.30683      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.01874     -0.00000     -0.00000     -1.05664      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.30683     -0.00000     -0.00000 \n    -0.00295      0.81746     -0.00000     -0.00000     -0.00000      0.34452      0.00000     -0.00000      0.00000      0.50000      0.00000      0.00000     -0.00000     -0.86603     -0.07224      0.00000      0.00000     -0.00000    -15.08855 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00295      0.81746     -0.00000     -0.00000     -0.00000      0.34452     -0.00000     -0.00000      0.00000     -1.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.07224     -0.00000     -0.00000      0.00000    -15.08855 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00295      0.81746     -0.00000     -0.00000     -0.00000      0.34452     -0.00000     -0.00000      0.00000      0.50000      0.00000      0.00000     -0.00000      0.86603     -0.07224      0.00000      0.00000     -0.00000    -15.08855 \n     0.00041     -0.02975     -0.00000      0.00000      0.00000     -0.04597      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.01927     -0.00000      0.00000     -0.00000      0.35346 \n     0.00000      0.00000     -0.00000      0.00167      0.00000     -0.00000     -0.00000      0.00000     -0.06316     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.02306      0.00000 \n     0.00000     -0.00000      0.00167      0.00000     -0.00000     -0.00000     -0.06316      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.02306     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00167      0.00000     -0.00000     -0.06316     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.02306     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Br\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.39295     -1.05256      0.00000      0.00000      0.00000      2.20107      0.00000      0.00000      0.00000     -0.84467      0.00000      0.00000     -0.84467      0.00000     -0.84467     -0.03651      0.00000      0.00000      0.00000 \n    -1.05256      2.82448      0.00000      0.00000      0.00000     -5.92988      0.00000      0.00000      0.00000      2.19832      0.00000      0.00000      2.19832      0.00000      2.19832      0.13682      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.33635      0.00000      0.00000      0.00000     -0.90222      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12810      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.33635      0.00000      0.00000      0.00000     -0.90222      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12810      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.33635      0.00000      0.00000      0.00000     -0.90222      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12811 \n     2.20107     -5.92988      0.00000      0.00000      0.00000     14.32052      0.00000      0.00000      0.00000     -4.56849      0.00000      0.00000     -4.56849      0.00000     -4.56849     -0.67591      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.90222      0.00000      0.00000      0.00000      2.42292      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.41391      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.90222      0.00000      0.00000      0.00000      2.42292      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.41391      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.90222      0.00000      0.00000      0.00000      2.42292      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.41391 \n    -0.84467      2.19832      0.00000      0.00000      0.00000     -4.56849      0.00000      0.00000      0.00000      3.71249      0.00000      0.00000      0.71248      0.00000      0.71248      0.09124      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.84467      2.19832      0.00000      0.00000      0.00000     -4.56849      0.00000      0.00000      0.00000      0.71248      0.00000      0.00000      3.71246      0.00000      0.71248      0.09124      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.84467      2.19832      0.00000      0.00000      0.00000     -4.56849      0.00000      0.00000      0.00000      0.71248      0.00000      0.00000      0.71248      0.00000      3.71248      0.09124      0.00000      0.00000      0.00000 \n    -0.03651      0.13682      0.00000      0.00000      0.00000     -0.67591      0.00000      0.00000      0.00000      0.09124      0.00000      0.00000      0.09124      0.00000      0.09124      2.09248      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.12810      0.00000      0.00000      0.00000     -0.41391      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.76102      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.12810      0.00000      0.00000      0.00000     -0.41391      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.76102      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.12811      0.00000      0.00000      0.00000     -0.41391      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.76102 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99047      0.99047      0.99047      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.67620      0.67620      0.67620      0.00000 \n   </betaocc>\n   <alphaeps>\n  -475.02400    -60.02799    -55.05942    -55.05942    -55.05942     -7.66783     -5.64211     -5.64211     -5.64211     -1.44332     -1.44332     -1.44332     -1.44332     -1.44332     -0.55996     -0.17459     -0.17459     -0.17459     72.03976 \n   </alphaeps>\n   <betaeps>\n  -475.02250    -60.02661    -55.05775    -55.05775    -55.05775     -7.66474     -5.63869     -5.63869     -5.63869     -1.44032     -1.44032     -1.44032     -1.44032     -1.44032     -0.53324     -0.14790     -0.14790     -0.14790     72.05039 \n   </betaeps>\n   <alphavectors>\n     0.99361     -0.42213     -0.00000     -0.00000      0.00000     -0.17162      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03955     -0.00000     -0.00000      0.00000     -0.44753 \n     0.01569      1.05781      0.00000      0.00000     -0.00000      0.52664     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.12526      0.00000      0.00000     -0.00000      0.03318 \n     0.00000     -0.00000     -0.00000      0.99323     -0.00000      0.00000     -0.00000     -0.00000     -0.41491      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.10679     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.99323     -0.00000      0.00000     -0.41491     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.10679     -0.00000     -0.00000 \n     0.00000     -0.00000      0.99323      0.00000      0.00000      0.00000      0.41491      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.10679      0.00000      0.00000     -0.00000 \n    -0.00293     -1.78086     -0.00000     -0.00000      0.00000     -1.93841      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.48195     -0.00000     -0.00000      0.00000     33.78777 \n    -0.00000      0.00000     -0.00000      0.01775      0.00000     -0.00000      0.00000      0.00000      1.06124     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.31910      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.01775      0.00000     -0.00000      1.06124      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.31910      0.00000      0.00000 \n    -0.00000     -0.00000      0.01775      0.00000      0.00000      0.00000     -1.06124     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.31910     -0.00000     -0.00000      0.00000 \n     0.00035      0.83461      0.00000      0.00000     -0.00000      0.38945     -0.00000      0.00000      0.00000      0.50000      0.00000     -0.00000     -0.86603     -0.00000      0.08982      0.00000      0.00000     -0.00000    -15.15017 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00035      0.83461      0.00000      0.00000     -0.00000      0.38945     -0.00000      0.00000      0.00000      0.50000      0.00000     -0.00000      0.86602     -0.00000      0.08982      0.00000      0.00000     -0.00000    -15.15017 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00035      0.83461      0.00000      0.00000     -0.00000      0.38945      0.00000      0.00000      0.00000     -1.00000      0.00000     -0.00000      0.00000     -0.00000      0.08982      0.00000      0.00000     -0.00000    -15.15017 \n     0.00034     -0.03118     -0.00000     -0.00000      0.00000     -0.05035     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.02113      0.00000      0.00000     -0.00000      0.36389 \n     0.00000     -0.00000      0.00000     -0.00150     -0.00000      0.00000     -0.00000     -0.00000      0.06211      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.02567     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00150     -0.00000     -0.00000      0.06211     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.02567      0.00000     -0.00000 \n     0.00000      0.00000     -0.00150     -0.00000     -0.00000     -0.00000     -0.06211     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.02567      0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99361      0.42213      0.00000      0.00000     -0.00000      0.17163     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.03952      0.00000      0.00000      0.00000     -0.44752 \n    -0.01569     -1.05781     -0.00000     -0.00000      0.00000     -0.52667      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.12509     -0.00000      0.00000     -0.00000      0.03317 \n    -0.00000      0.00000      0.00000      0.00000      0.99324     -0.00000      0.00000     -0.00000      0.41497      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.10655     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.99324      0.00000      0.00000      0.00000      0.41497      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.10655     -0.00000     -0.00000 \n     0.00000      0.00000     -0.99324     -0.00000      0.00000      0.00000     -0.41497      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.10655      0.00000      0.00000     -0.00000 \n     0.00294      1.78086      0.00000      0.00000     -0.00000      1.93860     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.47927      0.00000     -0.00000      0.00000     33.78779 \n     0.00000     -0.00000      0.00000      0.00000      0.01775      0.00000     -0.00000      0.00000     -1.06142     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.31850      0.00000 \n     0.00000      0.00000     -0.00000      0.01775     -0.00000     -0.00000     -0.00000     -1.06142     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.31850      0.00000      0.00000 \n    -0.00000      0.00000     -0.01775     -0.00000      0.00000      0.00000      1.06142     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.31850     -0.00000     -0.00000      0.00000 \n    -0.00036     -0.83461     -0.00000     -0.00000      0.00000     -0.38950      0.00000     -0.00000     -0.00000      0.50000      0.00000      0.00000      0.86603      0.00000      0.08878     -0.00000      0.00000     -0.00000    -15.15017 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00036     -0.83461     -0.00000     -0.00000      0.00000     -0.38950      0.00000     -0.00000     -0.00000      0.50000      0.00000      0.00000     -0.86602     -0.00000      0.08878     -0.00000      0.00000     -0.00000    -15.15017 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00036     -0.83461     -0.00000     -0.00000      0.00000     -0.38950     -0.00000     -0.00000     -0.00000     -1.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.08878     -0.00000      0.00000     -0.00000    -15.15017 \n    -0.00034      0.03118      0.00000      0.00000     -0.00000      0.05003      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.02117     -0.00000      0.00000     -0.00000      0.36382 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00150     -0.00000     -0.00000      0.00000     -0.06153      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.02570     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00150      0.00000      0.00000     -0.00000     -0.06153      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.02570      0.00000     -0.00000 \n     0.00000     -0.00000      0.00150      0.00000     -0.00000     -0.00000      0.06153     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.02570      0.00000      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Kr\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.39740     -1.06318      0.00000      0.00000      0.00000      2.26027      0.00000      0.00000      0.00000     -0.86604      0.00000      0.00000     -0.86604      0.00000     -0.86604     -0.03976      0.00000      0.00000      0.00000 \n    -1.06318      2.85458      0.00000      0.00000      0.00000     -6.16214      0.00000      0.00000      0.00000      2.28335      0.00000      0.00000      2.28335      0.00000      2.28335      0.14902      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.36342      0.00000      0.00000      0.00000     -0.95076      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17722      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.36342      0.00000      0.00000      0.00000     -0.95076      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17722      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.36342      0.00000      0.00000      0.00000     -0.95076      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17722 \n     2.26027     -6.16214      0.00000      0.00000      0.00000     15.33938      0.00000      0.00000      0.00000     -4.91625      0.00000      0.00000     -4.91625      0.00000     -4.91625     -0.74743      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.95076      0.00000      0.00000      0.00000      2.49105      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54979      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.95076      0.00000      0.00000      0.00000      2.49105      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54979      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.95076      0.00000      0.00000      0.00000      2.49105      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54979 \n    -0.86604      2.28335      0.00000      0.00000      0.00000     -4.91625      0.00000      0.00000      0.00000      3.82664      0.00000      0.00000      0.82663      0.00000      0.82663      0.11203      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.86604      2.28335      0.00000      0.00000      0.00000     -4.91625      0.00000      0.00000      0.00000      0.82663      0.00000      0.00000      3.82661      0.00000      0.82664      0.11203      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.86604      2.28335      0.00000      0.00000      0.00000     -4.91625      0.00000      0.00000      0.00000      0.82663      0.00000      0.00000      0.82664      0.00000      3.82662      0.11203      0.00000      0.00000      0.00000 \n    -0.03976      0.14902      0.00000      0.00000      0.00000     -0.74743      0.00000      0.00000      0.00000      0.11203      0.00000      0.00000      0.11203      0.00000      0.11203      2.10112      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.17722      0.00000      0.00000      0.00000     -0.54979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.12187      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.17722      0.00000      0.00000      0.00000     -0.54979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.12187      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.17722      0.00000      0.00000      0.00000     -0.54979      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.12187 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -504.55140    -64.58686    -59.42332    -59.42332    -59.42332     -8.58559     -6.46794     -6.46794     -6.46794     -2.02569     -2.02569     -2.02569     -2.02569     -2.02569     -0.63469     -0.20495     -0.20495     -0.20495     80.13718 \n   </alphaeps>\n   <betaeps>\n  -504.55140    -64.58686    -59.42332    -59.42332    -59.42332     -8.58559     -6.46794     -6.46794     -6.46794     -2.02569     -2.02569     -2.02569     -2.02569     -2.02569     -0.63469     -0.20495     -0.20495     -0.20495     80.13718 \n   </betaeps>\n   <alphavectors>\n     0.99387      0.42214      0.00000     -0.00000      0.00000     -0.17587     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.04233     -0.00000      0.00000      0.00000     -0.46162 \n     0.01530     -1.05587     -0.00000      0.00000     -0.00000      0.54221     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.13492      0.00000      0.00000      0.00000      0.05210 \n    -0.00000      0.00000     -0.00000     -0.00000      0.99346      0.00000     -0.42673     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.11247     -0.00000 \n    -0.00000      0.00000      0.00000      0.99346      0.00000      0.00000      0.00000      0.42673      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.11247     -0.00000      0.00000 \n     0.00000      0.00000     -0.99346     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.42673      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.11247     -0.00000     -0.00000      0.00000 \n    -0.01249      1.80769      0.00000     -0.00000      0.00000     -2.03005      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.52980      0.00000     -0.00000     -0.00000     33.90587 \n     0.00000     -0.00000      0.00000      0.00000      0.01674     -0.00000      1.06604      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.32985      0.00000 \n     0.00000     -0.00000     -0.00000      0.01674     -0.00000     -0.00000     -0.00000     -1.06604     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.32985      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.01674      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.06604     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.32985      0.00000      0.00000     -0.00000 \n     0.00467     -0.84767     -0.00000      0.00000     -0.00000      0.42881     -0.00000      0.00000      0.00000      0.30691      0.00000     -0.00000     -0.95174     -0.00000     -0.10426      0.00000      0.00000      0.00000    -15.20866 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00467     -0.84767     -0.00000      0.00000     -0.00000      0.42881     -0.00000      0.00000      0.00000     -0.97768      0.00000     -0.00000      0.21008     -0.00000     -0.10426      0.00000      0.00000      0.00000    -15.20866 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00467     -0.84767     -0.00000      0.00000     -0.00000      0.42881     -0.00000      0.00000      0.00000      0.67077      0.00000     -0.00000      0.74166     -0.00000     -0.10426      0.00000      0.00000      0.00000    -15.20866 \n     0.00024      0.03241      0.00000     -0.00000      0.00000     -0.05404      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.02303     -0.00000     -0.00000      0.00000      0.37319 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00131      0.00000      0.06031     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.02825     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00131      0.00000      0.00000      0.00000     -0.06031      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.02825     -0.00000      0.00000 \n     0.00000      0.00000      0.00131     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.06031      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.02825     -0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99387     -0.42214     -0.00000      0.00000     -0.00000     -0.17587      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.04233      0.00000      0.00000      0.00000     -0.46162 \n    -0.01530      1.05587      0.00000     -0.00000      0.00000      0.54221     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.13492     -0.00000     -0.00000     -0.00000      0.05210 \n    -0.00000      0.00000      0.00000     -0.00000     -0.99346      0.00000      0.42673     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.11247      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.99346     -0.00000      0.00000      0.00000     -0.00000      0.42673     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.11247     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.99346     -0.00000     -0.00000      0.00000      0.00000     -0.42673      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.11247     -0.00000     -0.00000 \n     0.01249     -1.80769     -0.00000      0.00000     -0.00000     -2.03005      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.52980      0.00000      0.00000      0.00000     33.90587 \n     0.00000     -0.00000     -0.00000      0.00000     -0.01674     -0.00000     -1.06604      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.32985     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.01674      0.00000     -0.00000     -0.00000      0.00000     -1.06604      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.32985      0.00000 \n    -0.00000      0.00000      0.00000     -0.01674      0.00000      0.00000     -0.00000     -0.00000      1.06604     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.32985      0.00000      0.00000 \n    -0.00467      0.84767      0.00000     -0.00000      0.00000      0.42881     -0.00000     -0.00000     -0.00000     -0.19056     -0.00000      0.00000      0.98168     -0.00000      0.10426     -0.00000     -0.00000     -0.00000    -15.20866 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00467      0.84767      0.00000     -0.00000      0.00000      0.42881     -0.00000     -0.00000     -0.00000      0.94543     -0.00000      0.00000     -0.32581     -0.00000      0.10426     -0.00000     -0.00000     -0.00000    -15.20866 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00467      0.84767      0.00000     -0.00000      0.00000      0.42881     -0.00000     -0.00000     -0.00000     -0.75488     -0.00000      0.00000     -0.65586     -0.00000      0.10426     -0.00000     -0.00000     -0.00000    -15.20866 \n    -0.00024     -0.03241     -0.00000      0.00000     -0.00000     -0.05404      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.02303      0.00000      0.00000      0.00000      0.37319 \n    -0.00000      0.00000      0.00000     -0.00000      0.00131      0.00000     -0.06031     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.02825      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00131     -0.00000      0.00000      0.00000     -0.00000     -0.06031     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.02825     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00131     -0.00000     -0.00000      0.00000      0.00000      0.06031      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.02825     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Rb\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.40032     -1.07314      0.00000      0.00000      0.00000      2.39517      0.00000      0.00000      0.00000     -0.91771      0.00000      0.00000     -0.91771      0.00000     -0.91771     -0.06414      0.00000      0.00000      0.00000      0.00833      0.00000      0.00000      0.00000 \n    -1.07314      2.89220      0.00000      0.00000      0.00000     -6.60567      0.00000      0.00000      0.00000      2.44819      0.00000      0.00000      2.44819      0.00000      2.44819      0.24296      0.00000      0.00000      0.00000     -0.03955      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.38100      0.00000      0.00000      0.00000     -0.97363      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12492      0.00000      0.00000      0.00000      0.10347      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.38100      0.00000      0.00000      0.00000     -0.97363      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12492      0.00000      0.00000      0.00000      0.10347      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.38100      0.00000      0.00000      0.00000     -0.97363      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12492      0.00000      0.00000      0.00000      0.10347 \n     2.39517     -6.60567      0.00000      0.00000      0.00000     17.30564      0.00000      0.00000      0.00000     -5.59515      0.00000      0.00000     -5.59515      0.00000     -5.59515     -1.26636      0.00000      0.00000      0.00000      0.27713      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.97363      0.00000      0.00000      0.00000      2.49381      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40876      0.00000      0.00000      0.00000     -0.28449      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.97363      0.00000      0.00000      0.00000      2.49381      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40876      0.00000      0.00000      0.00000     -0.28449      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.97363      0.00000      0.00000      0.00000      2.49381      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40876      0.00000      0.00000      0.00000     -0.28449 \n    -0.91771      2.44819      0.00000      0.00000      0.00000     -5.59515      0.00000      0.00000      0.00000      4.07248      0.00000      0.00000      1.07247      0.00000      1.07247      0.19475      0.00000      0.00000      0.00000     -0.02519      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.91771      2.44819      0.00000      0.00000      0.00000     -5.59515      0.00000      0.00000      0.00000      1.07247      0.00000      0.00000      4.07247      0.00000      1.07247      0.19475      0.00000      0.00000      0.00000     -0.02519      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.91771      2.44819      0.00000      0.00000      0.00000     -5.59515      0.00000      0.00000      0.00000      1.07247      0.00000      0.00000      1.07247      0.00000      4.07247      0.19475      0.00000      0.00000      0.00000     -0.02519      0.00000      0.00000      0.00000 \n    -0.06414      0.24296      0.00000      0.00000      0.00000     -1.26636      0.00000      0.00000      0.00000      0.19475      0.00000      0.00000      0.19475      0.00000      0.19475      2.73075      0.00000      0.00000      0.00000     -0.91642      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.12492      0.00000      0.00000      0.00000     -0.40876      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.38077      0.00000      0.00000      0.00000      0.50404      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.12492      0.00000      0.00000      0.00000     -0.40876      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.38077      0.00000      0.00000      0.00000      0.50404      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.12492      0.00000      0.00000      0.00000     -0.40876      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.38077      0.00000      0.00000      0.00000      0.50404 \n     0.00833     -0.03955      0.00000      0.00000      0.00000      0.27713      0.00000      0.00000      0.00000     -0.02519      0.00000      0.00000     -0.02519      0.00000     -0.02519     -0.91642      0.00000      0.00000      0.00000      1.55064      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.10347      0.00000      0.00000      0.00000     -0.28449      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.50404      0.00000      0.00000      0.00000      0.19172      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.10347      0.00000      0.00000      0.00000     -0.28449      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.50404      0.00000      0.00000      0.00000      0.19172      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.10347      0.00000      0.00000      0.00000     -0.28449      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.50404      0.00000      0.00000      0.00000      0.19172 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -535.38870    -69.71667    -64.32094    -64.32094    -64.32094     -9.85838     -7.64964     -7.64964     -7.64964     -2.95369     -2.95369     -2.95369     -2.95369     -2.95369     -0.99418     -0.49027     -0.49027     -0.49027      0.10916      0.36130      0.36130      0.36130     92.01570 \n   </alphaeps>\n   <betaeps>\n  -535.38870    -69.71667    -64.32094    -64.32094    -64.32094     -9.85838     -7.64964     -7.64964     -7.64964     -2.95369     -2.95369     -2.95369     -2.95369     -2.95369     -0.99418     -0.49027     -0.49027     -0.49027      0.10916      0.36130      0.36130      0.36130     92.01570 \n   </betaeps>\n   <alphavectors>\n     0.99411      0.42034     -0.00000      0.00000      0.00000      0.17771      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.05532     -0.00000      0.00000     -0.00000      0.03395     -0.00000     -0.00000      0.00000     -0.49221 \n     0.01493     -1.05111      0.00000     -0.00000     -0.00000     -0.55094     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.17816      0.00000     -0.00000      0.00000     -0.10741      0.00000      0.00000     -0.00000      0.09747 \n     0.00000     -0.00000      0.00000     -0.99371     -0.00000     -0.00000     -0.43352      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.12288      0.00000      0.00000      0.00000     -0.11168     -0.00000     -0.00000 \n     0.00000      0.00000     -0.99371      0.00000      0.00000     -0.00000      0.00000     -0.43352     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.12288      0.00000      0.11168     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.99371      0.00000     -0.00000      0.00000      0.43352     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.12288     -0.00000      0.00000      0.00000      0.00000      0.00000      0.11168     -0.00000 \n    -0.01972      1.88984     -0.00000      0.00000      0.00000      2.11152      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.72324     -0.00000      0.00000      0.00000      0.44574     -0.00000     -0.00000      0.00000     34.59343 \n     0.00000      0.00000     -0.00000     -0.01577      0.00000      0.00000      1.05773     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.35758     -0.00000     -0.00000     -0.00000      0.33390      0.00000      0.00000 \n     0.00000     -0.00000     -0.01577     -0.00000     -0.00000      0.00000     -0.00000      1.05773      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.35758     -0.00000     -0.33390     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.01577     -0.00000      0.00000     -0.00000     -1.05773      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.35758      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.33390      0.00000 \n     0.00791     -0.88889      0.00000     -0.00000     -0.00000     -0.46957     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.86258     -0.50592      0.14835      0.00000     -0.00000      0.00000     -0.08418      0.00000      0.00000     -0.00000    -15.55445 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00791     -0.88889      0.00000     -0.00000     -0.00000     -0.46957     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00685      0.99998      0.14835      0.00000     -0.00000      0.00000     -0.08418      0.00000      0.00000     -0.00000    -15.55445 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00791     -0.88889      0.00000     -0.00000     -0.00000     -0.46957     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.86943     -0.49406      0.14835      0.00000     -0.00000      0.00000     -0.08418      0.00000      0.00000     -0.00000    -15.55445 \n     0.00037      0.05276     -0.00000      0.00000      0.00000      0.08551      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.01288      0.00000     -0.00000     -0.00000     -0.81161     -0.00000     -0.00000     -0.00000      0.53240 \n     0.00000     -0.00000      0.00000      0.00174     -0.00000     -0.00000      0.08618      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.82641      0.00000      0.00000      0.00000     -1.01308     -0.00000     -0.00000 \n     0.00000      0.00000      0.00174      0.00000      0.00000     -0.00000      0.00000      0.08618     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.82641      0.00000      1.01308     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00174      0.00000     -0.00000      0.00000     -0.08618      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.82641     -0.00000      0.00000      0.00000      0.00000      0.00000      1.01308     -0.00000 \n    -0.00023     -0.02038      0.00000     -0.00000     -0.00000     -0.03049     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.04895      0.00000     -0.00000     -0.00000      1.24224     -0.00000     -0.00000     -0.00000     -0.16880 \n     0.00000      0.00000     -0.00000     -0.00073      0.00000      0.00000     -0.03033     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.30812     -0.00000     -0.00000     -0.00000      1.20544      0.00000      0.00000 \n     0.00000     -0.00000     -0.00073     -0.00000     -0.00000      0.00000     -0.00000     -0.03033      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.30812     -0.00000     -1.20544      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00073     -0.00000      0.00000     -0.00000      0.03033     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.30812      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.20544      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99411     -0.42034     -0.00000     -0.00000      0.00000     -0.17771     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.05532     -0.00000     -0.00000     -0.00000      0.03395      0.00000     -0.00000     -0.00000     -0.49221 \n     0.01493      1.05111     -0.00000     -0.00000      0.00000      0.55094      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.17816      0.00000      0.00000     -0.00000     -0.10741     -0.00000      0.00000      0.00000      0.09747 \n    -0.00000     -0.00000      0.00000      0.99371     -0.00000      0.00000     -0.43352      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.12288      0.00000     -0.00000      0.11168     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.99371      0.00000     -0.00000     -0.00000     -0.00000      0.43352      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.12288     -0.00000     -0.00000      0.00000     -0.11168      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.99371     -0.00000     -0.00000     -0.00000     -0.43352      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.12288     -0.00000      0.00000     -0.00000     -0.00000     -0.11168     -0.00000      0.00000 \n    -0.01972     -1.88984      0.00000      0.00000     -0.00000     -2.11152     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.72324     -0.00000     -0.00000      0.00000      0.44574      0.00000     -0.00000     -0.00000     34.59343 \n     0.00000      0.00000     -0.00000      0.01577      0.00000     -0.00000      1.05773     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.35758     -0.00000      0.00000     -0.33390     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.01577     -0.00000      0.00000      0.00000      0.00000     -1.05773     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.35758      0.00000      0.00000     -0.00000      0.33390     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.01577      0.00000      0.00000      0.00000      1.05773     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.35758      0.00000     -0.00000      0.00000      0.00000      0.33390      0.00000     -0.00000 \n     0.00791      0.88889     -0.00000     -0.00000      0.00000      0.46957      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.93441     -0.35621     -0.14835      0.00000      0.00000     -0.00000     -0.08418     -0.00000      0.00000      0.00000    -15.55445 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00791      0.88889     -0.00000     -0.00000      0.00000      0.46957      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.15872      0.98732     -0.14835      0.00000      0.00000     -0.00000     -0.08418     -0.00000      0.00000      0.00000    -15.55445 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00791      0.88889     -0.00000     -0.00000      0.00000      0.46957      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.77569     -0.63111     -0.14835      0.00000      0.00000     -0.00000     -0.08418     -0.00000      0.00000      0.00000    -15.55445 \n     0.00037     -0.05276      0.00000      0.00000     -0.00000     -0.08551     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.01288     -0.00000     -0.00000      0.00000     -0.81161     -0.00000      0.00000      0.00000      0.53240 \n    -0.00000     -0.00000      0.00000     -0.00174     -0.00000      0.00000      0.08618      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.82641      0.00000     -0.00000      1.01308      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00174      0.00000     -0.00000     -0.00000     -0.00000     -0.08618      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.82641     -0.00000     -0.00000      0.00000     -1.01308      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00174     -0.00000     -0.00000     -0.00000      0.08618      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.82641     -0.00000      0.00000     -0.00000     -0.00000     -1.01308     -0.00000      0.00000 \n    -0.00023      0.02038     -0.00000     -0.00000      0.00000      0.03049      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.04895      0.00000      0.00000     -0.00000      1.24224      0.00000     -0.00000     -0.00000     -0.16880 \n     0.00000      0.00000     -0.00000      0.00073      0.00000     -0.00000     -0.03033      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.30812     -0.00000      0.00000     -1.20544     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00073     -0.00000      0.00000      0.00000      0.00000      0.03033     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.30812      0.00000      0.00000     -0.00000      1.20544     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00073      0.00000      0.00000      0.00000     -0.03033     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.30812      0.00000     -0.00000      0.00000      0.00000      1.20544      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sr\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.40529     -1.08564      0.00000      0.00000      0.00000      2.44661      0.00000      0.00000      0.00000     -0.93368      0.00000      0.00000     -0.93368      0.00000     -0.93368     -0.08277      0.00000      0.00000      0.00000      0.03910      0.00000      0.00000      0.00000 \n    -1.08564      2.92721      0.00000      0.00000      0.00000     -6.79355      0.00000      0.00000      0.00000      2.50822      0.00000      0.00000      2.50822      0.00000      2.50822      0.30142      0.00000      0.00000      0.00000     -0.13495      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.40714      0.00000      0.00000      0.00000     -1.02179      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18056      0.00000      0.00000      0.00000      0.07730      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.40714      0.00000      0.00000      0.00000     -1.02179      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18056      0.00000      0.00000      0.00000      0.07730      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.40714      0.00000      0.00000      0.00000     -1.02179      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18056      0.00000      0.00000      0.00000      0.07730 \n     2.44661     -6.79355      0.00000      0.00000      0.00000     18.13812      0.00000      0.00000      0.00000     -5.85370      0.00000      0.00000     -5.85370      0.00000     -5.85370     -1.50915      0.00000      0.00000      0.00000      0.66018      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.02179      0.00000      0.00000      0.00000      2.57104      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.55849      0.00000      0.00000      0.00000     -0.21036      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.02179      0.00000      0.00000      0.00000      2.57104      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.55849      0.00000      0.00000      0.00000     -0.21036      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.02179      0.00000      0.00000      0.00000      2.57104      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.55849      0.00000      0.00000      0.00000     -0.21036 \n    -0.93368      2.50822      0.00000      0.00000      0.00000     -5.85370      0.00000      0.00000      0.00000      4.14971      0.00000      0.00000      1.14972      0.00000      1.14971      0.25881      0.00000      0.00000      0.00000     -0.10947      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.93368      2.50822      0.00000      0.00000      0.00000     -5.85370      0.00000      0.00000      0.00000      1.14972      0.00000      0.00000      4.14971      0.00000      1.14972      0.25881      0.00000      0.00000      0.00000     -0.10947      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.93368      2.50822      0.00000      0.00000      0.00000     -5.85370      0.00000      0.00000      0.00000      1.14971      0.00000      0.00000      1.14972      0.00000      4.14973      0.25881      0.00000      0.00000      0.00000     -0.10947      0.00000      0.00000      0.00000 \n    -0.08277      0.30142      0.00000      0.00000      0.00000     -1.50915      0.00000      0.00000      0.00000      0.25881      0.00000      0.00000      0.25881      0.00000      0.25881      2.92733      0.00000      0.00000      0.00000     -1.39727      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.18056      0.00000      0.00000      0.00000     -0.55849      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.72499      0.00000      0.00000      0.00000      0.38236      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.18056      0.00000      0.00000      0.00000     -0.55849      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.72499      0.00000      0.00000      0.00000      0.38236      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.18056      0.00000      0.00000      0.00000     -0.55849      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.72499      0.00000      0.00000      0.00000      0.38236 \n     0.03910     -0.13495      0.00000      0.00000      0.00000      0.66018      0.00000      0.00000      0.00000     -0.10947      0.00000      0.00000     -0.10947      0.00000     -0.10947     -1.39727      0.00000      0.00000      0.00000      2.66721      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.07730      0.00000      0.00000      0.00000     -0.21036      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.38236      0.00000      0.00000      0.00000      0.08789      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.07730      0.00000      0.00000      0.00000     -0.21036      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.38236      0.00000      0.00000      0.00000      0.08789      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.07730      0.00000      0.00000      0.00000     -0.21036      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.38236      0.00000      0.00000      0.00000      0.08789 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -566.98620    -74.86932    -69.28861    -69.28861    -69.28861    -11.09269     -8.79478     -8.79478     -8.79478     -3.85756     -3.85756     -3.85756     -3.85756     -3.85756     -1.28011     -0.71454     -0.71454     -0.71454     -0.00263      0.20018      0.20018      0.20018    100.08970 \n   </alphaeps>\n   <betaeps>\n  -566.98620    -74.86932    -69.28861    -69.28861    -69.28861    -11.09269     -8.79478     -8.79478     -8.79478     -3.85756     -3.85756     -3.85756     -3.85756     -3.85756     -1.28011     -0.71454     -0.71454     -0.71454     -0.00263      0.20018      0.20018      0.20018    100.08970 \n   </betaeps>\n   <alphavectors>\n     0.99424      0.42081      0.00000     -0.00000      0.00000      0.18150     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05779     -0.00000     -0.00000      0.00000      0.02776     -0.00000      0.00000      0.00000     -0.50096 \n     0.01474     -1.04993     -0.00000      0.00000     -0.00000     -0.56419      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.18693      0.00000      0.00000     -0.00000     -0.08822      0.00000     -0.00000     -0.00000      0.10923 \n     0.00000      0.00000      0.00000      0.99406      0.00000      0.00000      0.44397      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13530      0.00000     -0.00000     -0.00000     -0.09086     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.99406     -0.00000      0.00000     -0.00000      0.00000     -0.44397      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.13530      0.00000      0.00000     -0.00000     -0.09086     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.99406     -0.00000     -0.00000     -0.00000     -0.44397     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.13530     -0.00000      0.00000     -0.00000      0.09086     -0.00000 \n    -0.02494      1.89659      0.00000     -0.00000      0.00000      2.17787     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.76832     -0.00000     -0.00000      0.00000      0.37142     -0.00000      0.00000      0.00000     34.59871 \n    -0.00000     -0.00000     -0.00000      0.01460     -0.00000     -0.00000     -1.06484     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.38913     -0.00000      0.00000      0.00000      0.26702      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.01460      0.00000     -0.00000      0.00000     -0.00000      1.06484     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.38913     -0.00000     -0.00000      0.00000      0.26702      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.01460      0.00000      0.00000      0.00000      1.06484      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.38913      0.00000     -0.00000      0.00000     -0.26702      0.00000 \n     0.01028     -0.89215     -0.00000      0.00000     -0.00000     -0.49702      0.00000     -0.00000     -0.00000      0.69271      0.72121     -0.00000     -0.00000     -0.00000      0.16261      0.00000      0.00000     -0.00000     -0.07315      0.00000     -0.00000     -0.00000    -15.55672 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.01028     -0.89215     -0.00000      0.00000     -0.00000     -0.49702      0.00000     -0.00000     -0.00000      0.27823     -0.96051     -0.00000     -0.00000     -0.00000      0.16261      0.00000      0.00000     -0.00000     -0.07315      0.00000     -0.00000     -0.00000    -15.55672 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.01028     -0.89215     -0.00000      0.00000     -0.00000     -0.49702      0.00000     -0.00000     -0.00000     -0.97095      0.23930     -0.00000     -0.00000     -0.00000      0.16261      0.00000      0.00000     -0.00000     -0.07315      0.00000     -0.00000     -0.00000    -15.55672 \n     0.00023      0.04884      0.00000     -0.00000      0.00000      0.08175     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.03537      0.00000      0.00000     -0.00000     -0.61855      0.00000     -0.00000     -0.00000      0.50242 \n     0.00000      0.00000      0.00000     -0.00121      0.00000      0.00000     -0.07602      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.92559      0.00000     -0.00000     -0.00000     -0.78944      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00121     -0.00000      0.00000     -0.00000      0.00000      0.07602      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.92559      0.00000      0.00000     -0.00000     -0.78944     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00121     -0.00000     -0.00000     -0.00000      0.07602     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.92559     -0.00000      0.00000     -0.00000      0.78944     -0.00000 \n    -0.00014     -0.01614     -0.00000      0.00000     -0.00000     -0.02504      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.01757      0.00000      0.00000     -0.00000      1.15430     -0.00000      0.00000      0.00000     -0.13827 \n    -0.00000     -0.00000     -0.00000      0.00041     -0.00000     -0.00000      0.02262     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.20841     -0.00000      0.00000      0.00000      1.13710      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00041      0.00000     -0.00000      0.00000     -0.00000     -0.02262     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.20841     -0.00000     -0.00000      0.00000      1.13710     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00041      0.00000      0.00000      0.00000     -0.02262      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.20841      0.00000     -0.00000      0.00000     -1.13710      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99424      0.42081     -0.00000      0.00000     -0.00000     -0.18150      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.05779     -0.00000     -0.00000      0.00000      0.02776     -0.00000      0.00000     -0.00000     -0.50096 \n    -0.01474     -1.04993      0.00000     -0.00000      0.00000      0.56419      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.18693      0.00000      0.00000     -0.00000     -0.08822      0.00000     -0.00000     -0.00000      0.10923 \n    -0.00000     -0.00000     -0.99406      0.00000     -0.00000      0.00000     -0.44397     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.13530     -0.00000      0.00000      0.00000     -0.00000     -0.09086      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.99406      0.00000      0.00000     -0.00000     -0.44397     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13530      0.00000      0.09086     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.99406      0.00000     -0.00000      0.00000      0.44397      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13530     -0.00000      0.00000     -0.00000      0.00000     -0.09086      0.00000 \n     0.02494      1.89659     -0.00000      0.00000     -0.00000     -2.17787     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.76832     -0.00000     -0.00000      0.00000      0.37142     -0.00000      0.00000      0.00000     34.59871 \n     0.00000      0.00000     -0.01460     -0.00000      0.00000     -0.00000      1.06484      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.38913      0.00000     -0.00000     -0.00000      0.00000      0.26702      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.01460     -0.00000     -0.00000      0.00000      1.06484      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.38913     -0.00000     -0.26702      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.01460     -0.00000      0.00000     -0.00000     -1.06484     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.38913      0.00000     -0.00000      0.00000     -0.00000      0.26702     -0.00000 \n    -0.01028     -0.89215      0.00000     -0.00000      0.00000      0.49702      0.00000     -0.00000     -0.00000     -0.76283      0.64660     -0.00000     -0.00000     -0.00000     -0.16261      0.00000      0.00000     -0.00000     -0.07315      0.00000     -0.00000     -0.00000    -15.55672 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.73205     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.01028     -0.89215      0.00000     -0.00000      0.00000      0.49702      0.00000     -0.00000     -0.00000     -0.17856     -0.98393     -0.00000     -0.00000     -0.00000     -0.16261      0.00000      0.00000     -0.00000     -0.07315      0.00000     -0.00000     -0.00000    -15.55672 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.01028     -0.89215      0.00000     -0.00000      0.00000      0.49702      0.00000     -0.00000     -0.00000      0.94139      0.33733     -0.00000     -0.00000     -0.00000     -0.16261      0.00000      0.00000     -0.00000     -0.07315      0.00000     -0.00000     -0.00000    -15.55672 \n    -0.00023      0.04884     -0.00000      0.00000     -0.00000     -0.08175     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.03537      0.00000      0.00000     -0.00000     -0.61855      0.00000     -0.00000     -0.00000      0.50242 \n    -0.00000     -0.00000      0.00121      0.00000     -0.00000      0.00000      0.07602     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.92559     -0.00000      0.00000      0.00000     -0.00000     -0.78944      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00121      0.00000      0.00000     -0.00000      0.07602     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.92559      0.00000      0.78944     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00121      0.00000     -0.00000      0.00000     -0.07602      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.92559     -0.00000      0.00000     -0.00000      0.00000     -0.78944      0.00000 \n     0.00014     -0.01614      0.00000     -0.00000      0.00000      0.02504      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.01757      0.00000      0.00000     -0.00000      1.15430     -0.00000      0.00000      0.00000     -0.13827 \n     0.00000      0.00000     -0.00041     -0.00000      0.00000     -0.00000     -0.02262      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.20841      0.00000     -0.00000     -0.00000      0.00000      1.13710      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00041     -0.00000     -0.00000      0.00000     -0.02262      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.20841     -0.00000     -1.13710     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00041     -0.00000      0.00000     -0.00000      0.02262     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.20841      0.00000     -0.00000      0.00000     -0.00000      1.13710     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"In\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.44775     -1.19234      0.00000      0.00000      0.00000      2.65614      0.00000      0.00000      0.00000     -0.98215      0.00000      0.00000     -0.98215      0.00000     -0.98215     -0.57308      0.00000      0.00000      0.00000      0.21845      0.00000      0.00000      0.21845      0.00000      0.21845      0.01939      0.00000      0.00000      0.00000 \n    -1.19234      3.23320      0.00000      0.00000      0.00000     -7.79157      0.00000      0.00000      0.00000      2.79352      0.00000      0.00000      2.79352      0.00000      2.79352      1.85125      0.00000      0.00000      0.00000     -0.68690      0.00000      0.00000     -0.68690      0.00000     -0.68690     -0.07053      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.65526      0.00000      0.00000      0.00000     -1.37682      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.31400      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00840      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.65526      0.00000      0.00000      0.00000     -1.37682      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.31400      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00840      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.65526      0.00000      0.00000      0.00000     -1.37682      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.31400      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00840 \n     2.65614     -7.79157      0.00000      0.00000      0.00000     21.85202      0.00000      0.00000      0.00000     -6.95053      0.00000      0.00000     -6.95053      0.00000     -6.95053     -6.42265      0.00000      0.00000      0.00000      2.19452      0.00000      0.00000      2.19452      0.00000      2.19452      0.36962      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.37682      0.00000      0.00000      0.00000      2.90307      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.80455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01839      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.37682      0.00000      0.00000      0.00000      2.90307      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.80455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01839      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.37682      0.00000      0.00000      0.00000      2.90307      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.80455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01839 \n    -0.98215      2.79352      0.00000      0.00000      0.00000     -6.95053      0.00000      0.00000      0.00000      4.62429      0.00000      0.00000      1.33240      0.00000      1.33240      1.73133      0.00000      0.00000      0.00000     -1.28373      0.00000      0.00000     -0.30351      0.00000     -0.30352     -0.07396      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58377      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58377      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.98215      2.79352      0.00000      0.00000      0.00000     -6.95053      0.00000      0.00000      0.00000      1.33240      0.00000      0.00000      4.62430      0.00000      1.33240      1.73133      0.00000      0.00000      0.00000     -0.30350      0.00000      0.00000     -1.28373      0.00000     -0.30352     -0.07396      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58377      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.98215      2.79352      0.00000      0.00000      0.00000     -6.95053      0.00000      0.00000      0.00000      1.33240      0.00000      0.00000      1.33240      0.00000      4.62429      1.73133      0.00000      0.00000      0.00000     -0.30352      0.00000      0.00000     -0.30351      0.00000     -1.28372     -0.07396      0.00000      0.00000      0.00000 \n    -0.57308      1.85125      0.00000      0.00000      0.00000     -6.42265      0.00000      0.00000      0.00000      1.73133      0.00000      0.00000      1.73133      0.00000      1.73133     10.12372      0.00000      0.00000      0.00000     -2.39933      0.00000      0.00000     -2.39933      0.00000     -2.39933     -1.02936      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.31400      0.00000      0.00000      0.00000     -0.80455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21854      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03832      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.31400      0.00000      0.00000      0.00000     -0.80455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21854      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03832      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.31400      0.00000      0.00000      0.00000     -0.80455      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.21854      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03832 \n     0.21845     -0.68690      0.00000      0.00000      0.00000      2.19452      0.00000      0.00000      0.00000     -1.28373      0.00000      0.00000     -0.30350      0.00000     -0.30352     -2.39933      0.00000      0.00000      0.00000      2.78999      0.00000      0.00000     -0.50173      0.00000     -0.50171      0.17970      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58340      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.21845     -0.68690      0.00000      0.00000      0.00000      2.19452      0.00000      0.00000      0.00000     -0.30351      0.00000      0.00000     -1.28373      0.00000     -0.30351     -2.39933      0.00000      0.00000      0.00000     -0.50173      0.00000      0.00000      2.78998      0.00000     -0.50172      0.17970      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.96044      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.58340      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.21845     -0.68690      0.00000      0.00000      0.00000      2.19452      0.00000      0.00000      0.00000     -0.30352      0.00000      0.00000     -0.30352      0.00000     -1.28372     -2.39933      0.00000      0.00000      0.00000     -0.50171      0.00000      0.00000     -0.50172      0.00000      2.78996      0.17970      0.00000      0.00000      0.00000 \n     0.01939     -0.07053      0.00000      0.00000      0.00000      0.36962      0.00000      0.00000      0.00000     -0.07396      0.00000      0.00000     -0.07396      0.00000     -0.07396     -1.02936      0.00000      0.00000      0.00000      0.17970      0.00000      0.00000      0.17970      0.00000      0.17970      2.17005      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00840      0.00000      0.00000      0.00000     -0.01839      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03832      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36820      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00840      0.00000      0.00000      0.00000     -0.01839      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03832      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36820      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00840      0.00000      0.00000      0.00000     -0.01839      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03832      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36820 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99996      0.99996      0.99996      0.99996      0.99996      0.32623      0.32623      0.32623      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99991      0.99991      0.99991      0.99991      0.99991      0.00731      0.00731      0.00731      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -973.25740   -141.47150   -133.61940   -133.61940   -133.61940    -25.46486    -22.49320    -22.49320    -22.49320    -14.96569    -14.96569    -14.96569    -14.96569    -14.96569     -3.26371     -2.18628     -2.18628     -2.18628     -0.14562     -0.00303     -0.00303     -0.00303     -0.00303     -0.00303      0.05891      0.05891      0.05891     12.48964    228.19330 \n   </alphaeps>\n   <betaeps>\n  -973.25690   -141.47110   -133.61890   -133.61890   -133.61890    -25.46424    -22.49256    -22.49256    -22.49256    -14.96508    -14.96508    -14.96508    -14.96508    -14.96508     -3.26136     -2.18356     -2.18356     -2.18356     -0.11733     -0.00060     -0.00060     -0.00060     -0.00060     -0.00060      0.08707      0.08707      0.08707     12.50375    228.19460 \n   </betaeps>\n   <alphavectors>\n    -0.99613     -0.42315      0.00000     -0.00000     -0.00000     -0.21624      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.07377     -0.00000      0.00000     -0.00000     -0.01850      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00076      0.58792 \n    -0.01140      1.03824     -0.00000      0.00000      0.00000      0.68863     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.24622      0.00000     -0.00000     -0.00000      0.06075     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.02636     -0.22632 \n     0.00000      0.00000     -0.00000      0.00000      1.00100     -0.00000     -0.00000     -0.00000      0.54210      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.17690      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.05181     -0.00000     -0.00000 \n     0.00000      0.00000     -1.00100      0.00000      0.00000     -0.00000      0.54210     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.17690     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.05181      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      1.00100     -0.00000     -0.00000      0.00000     -0.54210     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.17690      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.05181      0.00000     -0.00000      0.00000 \n     0.06522     -1.78741      0.00000     -0.00000     -0.00000     -2.58445      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.99086     -0.00000      0.00000     -0.00000     -0.25634     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.57671    -35.26327 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00229     -0.00000      0.00000      0.00000     -1.11838      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.44468     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13237     -0.00000      0.00000 \n     0.00000     -0.00000      0.00229     -0.00000     -0.00000      0.00000     -1.11838      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.44468      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.13237     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00229      0.00000      0.00000     -0.00000      1.11838      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.44468     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.13237     -0.00000      0.00000     -0.00000 \n    -0.02886      0.84638     -0.00000      0.00000      0.00000      0.66096     -0.00000      0.00000     -0.00000     -0.00001      0.00000     -0.00000      0.00000     -0.97330     -0.23923     -0.00000      0.00000     -0.00000      0.05972      0.00000     -0.00000      0.00000     -0.00000      0.38729     -0.00000     -0.00000      0.00000      0.10528     15.89486 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.68580     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.67081     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.68580      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.67081     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.02886      0.84638     -0.00000      0.00000      0.00000      0.66096     -0.00000      0.00000      0.00000     -0.84290      0.00000     -0.00000      0.00000      0.48666     -0.23923      0.00000      0.00000      0.00000      0.05972      0.33540     -0.00000     -0.00000     -0.00000     -0.19365      0.00000      0.00000      0.00000      0.10528     15.89486 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.68580     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.67081     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.02886      0.84638     -0.00000      0.00000      0.00000      0.66096     -0.00000      0.00000     -0.00000      0.84291     -0.00000      0.00000     -0.00000      0.48664     -0.23923     -0.00000     -0.00000      0.00000      0.05972     -0.33540     -0.00000      0.00000     -0.00000     -0.19364     -0.00000      0.00000      0.00000      0.10528     15.89486 \n    -0.01557      0.20023     -0.00000      0.00000     -0.00000      0.22078     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -2.17284      0.00000     -0.00000     -0.00000      0.51861      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000    -57.53691      5.99449 \n     0.00000      0.00000     -0.00000      0.00000      0.00299      0.00000     -0.00000     -0.00000     -0.06144     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.04040     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.36710     -0.00000      0.00000 \n     0.00000      0.00000     -0.00299      0.00000      0.00000     -0.00000     -0.06144     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.04040     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.36710      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00299     -0.00000     -0.00000      0.00000      0.06144     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.04040      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.36710      0.00000     -0.00000      0.00000 \n     0.00729     -0.10823      0.00000     -0.00000      0.00000     -0.14639      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.07988      0.50625     -0.00000      0.00000     -0.00000     -0.09844     -0.00000      0.00000     -0.00000      0.00000     -1.04447      0.00000     -0.00000     -0.00000     25.85647     -2.90884 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.13836      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.80908      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.13836     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.80908      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00729     -0.10823      0.00000     -0.00000      0.00000     -0.14639      0.00000     -0.00000     -0.00000     -0.06918      0.00000     -0.00000      0.00000      0.03994      0.50625      0.00000      0.00000      0.00000     -0.09844     -0.90454      0.00000     -0.00000      0.00000      0.52224     -0.00000     -0.00000      0.00000     25.85647     -2.90884 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.13836      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.80908     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00729     -0.10823      0.00000     -0.00000      0.00000     -0.14639      0.00000     -0.00000      0.00000      0.06918     -0.00000      0.00000     -0.00000      0.03994      0.50625     -0.00000     -0.00000      0.00000     -0.09844      0.90454      0.00000      0.00000      0.00000      0.52223     -0.00000     -0.00000      0.00000     25.85647     -2.90884 \n    -0.00027      0.01078     -0.00000      0.00000      0.00000      0.02433     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00017      0.00000     -0.00000     -0.00000     -1.04114      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.57808      0.15192 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00072     -0.00000      0.00000      0.00000      0.01146      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.04453      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.04481      0.00000     -0.00000 \n     0.00000     -0.00000      0.00072     -0.00000     -0.00000      0.00000      0.01146      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.04453      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.04481      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00072      0.00000      0.00000     -0.00000     -0.01146     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.04453     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.04481      0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99613     -0.42315      0.00000      0.00000     -0.00000     -0.21624     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.07377      0.00000     -0.00000      0.00000      0.01845     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00077     -0.58792 \n     0.01140      1.03824     -0.00000     -0.00000      0.00000      0.68864      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.24624     -0.00000      0.00000     -0.00000     -0.06060      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.02639      0.22632 \n    -0.00000      0.00000     -0.00000     -0.00000      1.00100     -0.00000      0.00000     -0.00000      0.54210     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.17698      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05153     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -1.00100     -0.00000     -0.00000     -0.54210      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.17698     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05153      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      1.00100      0.00000      0.00000      0.00000      0.00000     -0.54210      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.17698     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.05153     -0.00000      0.00000     -0.00000 \n    -0.06522     -1.78742      0.00000      0.00000     -0.00000     -2.58445     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.99091      0.00000     -0.00000     -0.00000      0.25617      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.57673     35.26327 \n     0.00000     -0.00000      0.00000      0.00000     -0.00229     -0.00000     -0.00000      0.00000     -1.11839      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.44487     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.13168      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00229      0.00000      0.00000      1.11839     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.44487      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.13168     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00229     -0.00000     -0.00000     -0.00000     -0.00000      1.11839     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.44487      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13168      0.00000     -0.00000      0.00000 \n     0.02886      0.84638     -0.00000     -0.00000      0.00000      0.66095      0.00000     -0.00000     -0.00000     -0.00001      0.00000     -0.00000     -0.00000     -0.97331      0.23923      0.00000     -0.00000      0.00000     -0.05967      0.00000     -0.00000     -0.00000      0.00000     -0.38727     -0.00000     -0.00000      0.00000     -0.10532    -15.89486 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.68582      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.67077     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.68582     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.67077     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02886      0.84638     -0.00000     -0.00000      0.00000      0.66095      0.00000     -0.00000     -0.00000     -0.84291     -0.00000     -0.00000     -0.00000      0.48666      0.23923     -0.00000      0.00000     -0.00000     -0.05967      0.33538     -0.00000      0.00000     -0.00000      0.19364      0.00000      0.00000      0.00000     -0.10532    -15.89486 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.68582     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.67077      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.02886      0.84638     -0.00000     -0.00000      0.00000      0.66095      0.00000     -0.00000     -0.00000      0.84291      0.00000      0.00000      0.00000      0.48665      0.23923     -0.00000      0.00000     -0.00000     -0.05967     -0.33539     -0.00000     -0.00000     -0.00000      0.19363      0.00000      0.00000      0.00000     -0.10532    -15.89486 \n     0.01557      0.20023     -0.00000     -0.00000      0.00000      0.22105      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      2.17280     -0.00000     -0.00000     -0.00000     -0.48394      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     57.53718     -5.99476 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00299      0.00000      0.00000     -0.00000     -0.06142     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.04096      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.36550     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00299     -0.00000     -0.00000      0.06142      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.04096     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.36550      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00299      0.00000      0.00000      0.00000      0.00000      0.06142      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.04096     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.36550     -0.00000      0.00000     -0.00000 \n    -0.00729     -0.10823      0.00000      0.00000     -0.00000     -0.14650     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.07986     -0.50616      0.00000     -0.00000      0.00000      0.08311     -0.00000      0.00000     -0.00000      0.00000      1.04448     -0.00000     -0.00000     -0.00000    -25.85651      2.90896 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.13832     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.80908     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13832      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.80908      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00729     -0.10823      0.00000      0.00000     -0.00000     -0.14650     -0.00000      0.00000      0.00000     -0.06916     -0.00000     -0.00000     -0.00000      0.03993     -0.50616     -0.00000      0.00000      0.00000      0.08311     -0.90454      0.00000      0.00000      0.00000     -0.52224      0.00000      0.00000     -0.00000    -25.85651      2.90896 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.13832     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.80908      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00729     -0.10823      0.00000      0.00000     -0.00000     -0.14650     -0.00000      0.00000      0.00000      0.06916      0.00000      0.00000      0.00000      0.03993     -0.50616     -0.00000      0.00000      0.00000      0.08311      0.90454      0.00000     -0.00000      0.00000     -0.52223      0.00000      0.00000     -0.00000    -25.85651      2.90896 \n     0.00027      0.01078     -0.00000     -0.00000     -0.00000      0.02431      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00039     -0.00000      0.00000      0.00000      1.04147     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.57747     -0.15192 \n     0.00000     -0.00000      0.00000      0.00000     -0.00072     -0.00000     -0.00000      0.00000      0.01145      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.04292     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.04488      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00072      0.00000      0.00000     -0.01145     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.04292      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.04488      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00072     -0.00000     -0.00000     -0.00000     -0.00000     -0.01145     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.04292      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.04488      0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sn\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.45121     -1.20160      0.00000      0.00000      0.00000      2.68396      0.00000      0.00000      0.00000     -0.99007      0.00000      0.00000     -0.99007      0.00000     -0.99007     -0.70860      0.00000      0.00000      0.00000      0.27611      0.00000      0.00000      0.27611      0.00000      0.27611      0.01973      0.00000      0.00000      0.00000 \n    -1.20160      3.26094      0.00000      0.00000      0.00000     -7.89997      0.00000      0.00000      0.00000      2.82582      0.00000      0.00000      2.82582      0.00000      2.82582      2.26319      0.00000      0.00000      0.00000     -0.86017      0.00000      0.00000     -0.86017      0.00000     -0.86017     -0.07254      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.67657      0.00000      0.00000      0.00000     -1.41217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01220      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.67657      0.00000      0.00000      0.00000     -1.41217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01220      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.67657      0.00000      0.00000      0.00000     -1.41217      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.34333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.01220 \n     2.68396     -7.89997      0.00000      0.00000      0.00000     22.26104      0.00000      0.00000      0.00000     -7.07125      0.00000      0.00000     -7.07125      0.00000     -7.07125     -7.59128      0.00000      0.00000      0.00000      2.66531      0.00000      0.00000      2.66531      0.00000      2.66531      0.38726      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.41217      0.00000      0.00000      0.00000      2.95938      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.87508      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03381      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.41217      0.00000      0.00000      0.00000      2.95938      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.87508      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03381      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.41217      0.00000      0.00000      0.00000      2.95938      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.87508      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03381 \n    -0.99007      2.82582      0.00000      0.00000      0.00000     -7.07125      0.00000      0.00000      0.00000      4.68146      0.00000      0.00000      1.35773      0.00000      1.35773      2.10794      0.00000      0.00000      0.00000     -1.47789      0.00000      0.00000     -0.44055      0.00000     -0.44057     -0.07771      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64749      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64749      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99007      2.82582      0.00000      0.00000      0.00000     -7.07125      0.00000      0.00000      0.00000      1.35773      0.00000      0.00000      4.68147      0.00000      1.35772      2.10794      0.00000      0.00000      0.00000     -0.44056      0.00000      0.00000     -1.47788      0.00000     -0.44056     -0.07771      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64749      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99007      2.82582      0.00000      0.00000      0.00000     -7.07125      0.00000      0.00000      0.00000      1.35773      0.00000      0.00000      1.35772      0.00000      4.68146      2.10794      0.00000      0.00000      0.00000     -0.44055      0.00000      0.00000     -0.44056      0.00000     -1.47788     -0.07771      0.00000      0.00000      0.00000 \n    -0.70860      2.26319      0.00000      0.00000      0.00000     -7.59128      0.00000      0.00000      0.00000      2.10794      0.00000      0.00000      2.10794      0.00000      2.10794     10.10363      0.00000      0.00000      0.00000     -2.42294      0.00000      0.00000     -2.42294      0.00000     -2.42294     -0.99584      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.34333      0.00000      0.00000      0.00000     -0.87508      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.29519      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17447      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.34333      0.00000      0.00000      0.00000     -0.87508      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.29519      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17447      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.34333      0.00000      0.00000      0.00000     -0.87508      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.29519      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17447 \n     0.27611     -0.86017      0.00000      0.00000      0.00000      2.66531      0.00000      0.00000      0.00000     -1.47789      0.00000      0.00000     -0.44056      0.00000     -0.44055     -2.42294      0.00000      0.00000      0.00000      2.84167      0.00000      0.00000     -0.48208      0.00000     -0.48208      0.16332      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64748      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64748      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.27611     -0.86017      0.00000      0.00000      0.00000      2.66531      0.00000      0.00000      0.00000     -0.44055      0.00000      0.00000     -1.47788      0.00000     -0.44056     -2.42294      0.00000      0.00000      0.00000     -0.48208      0.00000      0.00000      2.84168      0.00000     -0.48206      0.16332      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.07464      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.64748      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.27611     -0.86017      0.00000      0.00000      0.00000      2.66531      0.00000      0.00000      0.00000     -0.44057      0.00000      0.00000     -0.44056      0.00000     -1.47788     -2.42294      0.00000      0.00000      0.00000     -0.48208      0.00000      0.00000     -0.48206      0.00000      2.84167      0.16332      0.00000      0.00000      0.00000 \n     0.01973     -0.07254      0.00000      0.00000      0.00000      0.38726      0.00000      0.00000      0.00000     -0.07771      0.00000      0.00000     -0.07771      0.00000     -0.07771     -0.99584      0.00000      0.00000      0.00000      0.16332      0.00000      0.00000      0.16332      0.00000      0.16332      2.16997      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.01220      0.00000      0.00000      0.00000      0.03381      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17447      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.73086      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.01220      0.00000      0.00000      0.00000      0.03381      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17447      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.73086      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.01220      0.00000      0.00000      0.00000      0.03381      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.17447      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.73086 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66638      0.66638      0.66638      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00029      0.00029      0.00029      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1015.98700   -148.90080   -140.83880   -140.83880   -140.83880    -27.32963    -24.30106    -24.30106    -24.30106    -16.51983    -16.51983    -16.51983    -16.51983    -16.51983     -3.78705     -2.64754     -2.64754     -2.64754     -0.30692     -0.30692     -0.30692     -0.30692     -0.30692     -0.22413     -0.00328     -0.00328     -0.00328     13.56879    244.22210 \n   </alphaeps>\n   <betaeps>\n -1015.98600   -148.90000   -140.83780   -140.83780   -140.83780    -27.32825    -24.29964    -24.29964    -24.29964    -16.51849    -16.51849    -16.51849    -16.51849    -16.51849     -3.78211     -2.64196     -2.64196     -2.64196     -0.30184     -0.30184     -0.30184     -0.30184     -0.30184     -0.16916      0.05151      0.05151      0.05151     13.59672    244.22500 \n   </betaeps>\n   <alphavectors>\n    -0.99628      0.42327      0.00000      0.00000     -0.00000      0.21771      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.07805     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.01957     -0.00000      0.00000      0.00000     -0.00228     -0.59740 \n    -0.01110     -1.03742      0.00000      0.00000      0.00000     -0.69405     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.26121      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06457      0.00000     -0.00000     -0.00000      0.03779      0.23646 \n     0.00000      0.00000      0.00000      0.00000     -1.00169     -0.00000     -0.00000      0.00000      0.54685     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.18676     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05334      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.00169     -0.00000     -0.00000     -0.00000     -0.54685      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.18676      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05334      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -1.00169      0.00000      0.00000      0.00000     -0.54685     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.18676     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.05334      0.00000     -0.00000     -0.00000 \n     0.06757      1.78628      0.00000      0.00000     -0.00000      2.59814      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.05356     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.27360     -0.00000      0.00000      0.00000      0.44398     35.51978 \n     0.00000      0.00000      0.00000      0.00000      0.00374      0.00000      0.00000     -0.00000     -1.11993      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.46809      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.13609     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00374      0.00000      0.00000      0.00000      1.11993     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.46809     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13609     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00374      0.00000     -0.00000     -0.00000      1.11993      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.46809      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.13609     -0.00000      0.00000      0.00000 \n    -0.02998     -0.84667      0.00000      0.00000      0.00000     -0.66766     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.97312     -0.25532      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.40118      0.06419      0.00000     -0.00000      0.00000     -0.04966    -16.02198 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.68550      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.69486     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.68550      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.69486     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.02998     -0.84667      0.00000      0.00000      0.00000     -0.66766     -0.00000      0.00000      0.00000     -0.00000      0.84275      0.00000      0.00000      0.48656     -0.25532      0.00000      0.00000      0.00000     -0.34743      0.00000     -0.00000     -0.00000      0.20059      0.06419      0.00000      0.00000     -0.00000     -0.04966    -16.02198 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.68550      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.69486      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.02998     -0.84667      0.00000      0.00000      0.00000     -0.66766     -0.00000      0.00000      0.00000     -0.00000     -0.84275     -0.00000     -0.00000      0.48656     -0.25532     -0.00000     -0.00000      0.00000      0.34743     -0.00000      0.00000      0.00000      0.20059      0.06419     -0.00000     -0.00000      0.00000     -0.04966    -16.02198 \n    -0.02088     -0.29532      0.00000      0.00000      0.00000     -0.33470      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.14624      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.52580      0.00000     -0.00000     -0.00000     57.46618     -8.08980 \n     0.00000      0.00000      0.00000      0.00000     -0.00346     -0.00000     -0.00000      0.00000     -0.06250     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.04823     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.36310      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00346     -0.00000     -0.00000     -0.00000      0.06250      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04823      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.36310      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00346      0.00000      0.00000      0.00000      0.06250     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.04823     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.36310      0.00000     -0.00000     -0.00000 \n     0.00970      0.15146      0.00000      0.00000     -0.00000      0.19975     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.07743      0.49240      0.00000      0.00000     -0.00000      0.00001     -0.00000      0.00000      0.00000      1.04972     -0.09979      0.00000      0.00000     -0.00000    -25.82539      3.85571 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.13412     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.81817      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.13412     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.81817      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00970      0.15146      0.00000      0.00000     -0.00000      0.19975     -0.00000      0.00000      0.00000     -0.00000      0.06706      0.00000      0.00000      0.03872      0.49240      0.00000      0.00000      0.00000      0.90908     -0.00000      0.00000      0.00000     -0.52487     -0.09979     -0.00000     -0.00000      0.00000    -25.82539      3.85571 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.13412     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.81817     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00970      0.15146      0.00000      0.00000     -0.00000      0.19975     -0.00000      0.00000      0.00000     -0.00000     -0.06706     -0.00000     -0.00000      0.03872      0.49240     -0.00000     -0.00000      0.00000     -0.90909      0.00000     -0.00000     -0.00000     -0.52486     -0.09979      0.00000      0.00000     -0.00000    -25.82539      3.85571 \n    -0.00033     -0.01173      0.00000      0.00000      0.00000     -0.02584      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00322      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.04094     -0.00000      0.00000     -0.00000      0.57683     -0.17147 \n     0.00000      0.00000      0.00000      0.00000      0.00082      0.00000      0.00000     -0.00000      0.01132      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.03937      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04477     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00082      0.00000      0.00000      0.00000     -0.01132     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.03937     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.04477      0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00082      0.00000     -0.00000     -0.00000     -0.01132      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.03937      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.04477     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99628     -0.42327     -0.00000     -0.00000      0.00000      0.21771      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.07806     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.01949      0.00000      0.00000     -0.00000     -0.00231      0.59740 \n    -0.01110      1.03742      0.00000      0.00000     -0.00000     -0.69406     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.26126      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.06426     -0.00000     -0.00000      0.00000      0.03786     -0.23646 \n    -0.00000     -0.00000     -0.00000     -0.00000     -1.00169     -0.00000     -0.00000     -0.00000      0.54686      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.18688     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.05287      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      1.00169      0.00000     -0.00000      0.00000     -0.54686     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.18688     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05287     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      1.00169     -0.00000     -0.00000     -0.00000     -0.54686      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.18688     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.05287     -0.00000      0.00000      0.00000 \n     0.06758     -1.78631     -0.00000     -0.00000      0.00000      2.59813      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.05368     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.27296      0.00000      0.00000     -0.00000      0.44415    -35.51978 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00374      0.00000      0.00000      0.00000     -1.11994     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.46839      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.13492      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00374     -0.00000      0.00000     -0.00000      1.11994      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.46839      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13492     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00374      0.00000      0.00000      0.00000      1.11994     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.46839      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.13492      0.00000     -0.00000     -0.00000 \n    -0.02999      0.84668      0.00000      0.00000     -0.00000     -0.66765     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.97314      0.25533     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.40114     -0.06398      0.00000     -0.00000      0.00000     -0.04980     16.02198 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.68553     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.69479      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.68553     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.69479      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.02999      0.84668      0.00000      0.00000     -0.00000     -0.66765     -0.00000     -0.00000      0.00000      0.00000     -0.84277      0.00000      0.00000      0.48657      0.25533      0.00000     -0.00000      0.00000      0.34739     -0.00000      0.00000     -0.00000     -0.20057     -0.06398     -0.00000      0.00000     -0.00000     -0.04980     16.02198 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.68553     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.69479      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.02999      0.84668      0.00000      0.00000     -0.00000     -0.66765     -0.00000     -0.00000     -0.00000      0.00000      0.84276      0.00000      0.00000      0.48657      0.25533      0.00000     -0.00000      0.00000     -0.34740     -0.00000      0.00000     -0.00000     -0.20057     -0.06398     -0.00000      0.00000     -0.00000     -0.04980     16.02198 \n    -0.02088      0.29531      0.00000      0.00000      0.00000     -0.33514     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      2.14591      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.46503     -0.00000     -0.00000      0.00000     57.46661      8.09053 \n    -0.00000      0.00000      0.00000      0.00000     -0.00346     -0.00000     -0.00000     -0.00000     -0.06247     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.04913     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.36051      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00346      0.00000     -0.00000      0.00000      0.06247     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.04913     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.36051      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00346     -0.00000     -0.00000     -0.00000      0.06247      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.04913     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.36051     -0.00000      0.00000      0.00000 \n     0.00971     -0.15145     -0.00000     -0.00000     -0.00000      0.19992      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.07739     -0.49211     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.04973      0.07295     -0.00000      0.00000     -0.00000    -25.82544     -3.85604 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.13404      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.81818     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.13404      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.81818     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00971     -0.15145     -0.00000     -0.00000     -0.00000      0.19992      0.00000      0.00000     -0.00000     -0.00000     -0.06702     -0.00000     -0.00000      0.03869     -0.49211      0.00000     -0.00000     -0.00000     -0.90909     -0.00000     -0.00000      0.00000      0.52487      0.07295      0.00000     -0.00000      0.00000    -25.82544     -3.85604 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.13404      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.81818      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00971     -0.15145     -0.00000     -0.00000     -0.00000      0.19992      0.00000      0.00000     -0.00000     -0.00000      0.06702     -0.00000     -0.00000      0.03870     -0.49211      0.00000     -0.00000      0.00000      0.90909     -0.00000     -0.00000      0.00000      0.52486      0.07295      0.00000     -0.00000      0.00000    -25.82544     -3.85604 \n    -0.00033      0.01173      0.00000      0.00000      0.00000     -0.02581     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00218      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.04153      0.00000      0.00000     -0.00000      0.57576      0.17147 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00082      0.00000      0.00000      0.00000      0.01130      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.03678     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.04487     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00082     -0.00000      0.00000     -0.00000     -0.01130      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.03678      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.04487      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00082      0.00000      0.00000      0.00000     -0.01130     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.03678      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.04487     -0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sb\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.45487     -1.21142      0.00000      0.00000      0.00000      2.70994      0.00000      0.00000      0.00000     -0.99694      0.00000      0.00000     -0.99694      0.00000     -0.99694     -0.79160      0.00000      0.00000      0.00000      0.31077      0.00000      0.00000      0.31077      0.00000      0.31077      0.01906      0.00000      0.00000      0.00000 \n    -1.21142      3.29027      0.00000      0.00000      0.00000     -8.00167      0.00000      0.00000      0.00000      2.85444      0.00000      0.00000      2.85444      0.00000      2.85444      2.51929      0.00000      0.00000      0.00000     -0.96552      0.00000      0.00000     -0.96552      0.00000     -0.96552     -0.07064      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.69934      0.00000      0.00000      0.00000     -1.44864      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03182      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.69934      0.00000      0.00000      0.00000     -1.44864      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03182      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.69934      0.00000      0.00000      0.00000     -1.44864      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.03182 \n     2.70994     -8.00167      0.00000      0.00000      0.00000     22.62936      0.00000      0.00000      0.00000     -7.17506      0.00000      0.00000     -7.17506      0.00000     -7.17506     -8.30102      0.00000      0.00000      0.00000      2.94028      0.00000      0.00000      2.94028      0.00000      2.94028      0.38432      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.44864      0.00000      0.00000      0.00000      3.01424      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93720      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08308      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.44864      0.00000      0.00000      0.00000      3.01424      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93720      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08308      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.44864      0.00000      0.00000      0.00000      3.01424      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.93720      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08308 \n    -0.99694      2.85444      0.00000      0.00000      0.00000     -7.17506      0.00000      0.00000      0.00000      4.72858      0.00000      0.00000      1.37699      0.00000      1.37699      2.34326      0.00000      0.00000      0.00000     -1.60451      0.00000      0.00000     -0.51897      0.00000     -0.51897     -0.07793      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99694      2.85444      0.00000      0.00000      0.00000     -7.17506      0.00000      0.00000      0.00000      1.37699      0.00000      0.00000      4.72858      0.00000      1.37699      2.34326      0.00000      0.00000      0.00000     -0.51898      0.00000      0.00000     -1.60453      0.00000     -0.51897     -0.07793      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.99694      2.85444      0.00000      0.00000      0.00000     -7.17506      0.00000      0.00000      0.00000      1.37699      0.00000      0.00000      1.37699      0.00000      4.72858      2.34326      0.00000      0.00000      0.00000     -0.51896      0.00000      0.00000     -0.51897      0.00000     -1.60453     -0.07793      0.00000      0.00000      0.00000 \n    -0.79160      2.51929      0.00000      0.00000      0.00000     -8.30102      0.00000      0.00000      0.00000      2.34326      0.00000      0.00000      2.34326      0.00000      2.34326      9.98636      0.00000      0.00000      0.00000     -2.41188      0.00000      0.00000     -2.41188      0.00000     -2.41188     -0.90620      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.37003      0.00000      0.00000      0.00000     -0.93720      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.35801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.29001      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.37003      0.00000      0.00000      0.00000     -0.93720      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.35801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.29001      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.37003      0.00000      0.00000      0.00000     -0.93720      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.35801      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.29001 \n     0.31077     -0.96552      0.00000      0.00000      0.00000      2.94028      0.00000      0.00000      0.00000     -1.60451      0.00000      0.00000     -0.51898      0.00000     -0.51896     -2.41188      0.00000      0.00000      0.00000      2.87442      0.00000      0.00000     -0.47717      0.00000     -0.47720      0.13897      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.31077     -0.96552      0.00000      0.00000      0.00000      2.94028      0.00000      0.00000      0.00000     -0.51897      0.00000      0.00000     -1.60453      0.00000     -0.51897     -2.41188      0.00000      0.00000      0.00000     -0.47717      0.00000      0.00000      2.87442      0.00000     -0.47718      0.13897      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.17108      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.70319      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.31077     -0.96552      0.00000      0.00000      0.00000      2.94028      0.00000      0.00000      0.00000     -0.51897      0.00000      0.00000     -0.51897      0.00000     -1.60453     -2.41188      0.00000      0.00000      0.00000     -0.47720      0.00000      0.00000     -0.47718      0.00000      2.87443      0.13897      0.00000      0.00000      0.00000 \n     0.01906     -0.07064      0.00000      0.00000      0.00000      0.38432      0.00000      0.00000      0.00000     -0.07793      0.00000      0.00000     -0.07793      0.00000     -0.07793     -0.90620      0.00000      0.00000      0.00000      0.13897      0.00000      0.00000      0.13897      0.00000      0.13897      2.15166      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.03182      0.00000      0.00000      0.00000      0.08308      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.29001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.08432      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.03182      0.00000      0.00000      0.00000      0.08308      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.29001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.08432      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.03182      0.00000      0.00000      0.00000      0.08308      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.29001      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.08432 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99655      0.99655      0.99655      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00345      0.00345      0.00345      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1059.69800   -156.58510   -148.31280   -148.31280   -148.31280    -29.32084    -26.24899    -26.24899    -26.24899    -18.21794    -18.21794    -18.21794    -18.21794    -18.21794     -4.38768     -3.19085     -3.19085     -3.19085     -0.69858     -0.69858     -0.69858     -0.69858     -0.69858     -0.31741     -0.08957     -0.08957     -0.08957     14.48827    260.74720 \n   </alphaeps>\n   <betaeps>\n -1059.69600   -156.58400   -148.31140   -148.31140   -148.31140    -29.31889    -26.24699    -26.24699    -26.24699    -18.21607    -18.21607    -18.21607    -18.21607    -18.21607     -4.38090     -3.18330     -3.18330     -3.18330     -0.69161     -0.69161     -0.69161     -0.69161     -0.69161     -0.24091     -0.01316     -0.01316     -0.01316     14.52805    260.75150 \n   </betaeps>\n   <alphavectors>\n    -0.99643     -0.42341      0.00000     -0.00000     -0.00000     -0.21949     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.08204     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01954      0.00000      0.00000     -0.00000      0.00396     -0.60609 \n    -0.01080      1.03654      0.00000     -0.00000     -0.00000      0.70044      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.27532      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06472     -0.00000     -0.00000      0.00000     -0.04942      0.24570 \n    -0.00000      0.00000      0.00000     -0.00000     -1.00237      0.00000      0.00000      0.55234     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.19614     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.05190     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      1.00237     -0.00000     -0.00000      0.00000     -0.55234     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.19614     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.05190      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      1.00237      0.00000      0.00000      0.00000     -0.00000      0.55234     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.19614      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.05190     -0.00000     -0.00000 \n     0.06945     -1.78114     -0.00000      0.00000      0.00000     -2.61250     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.11181     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.27607      0.00000      0.00000     -0.00000     -0.30823     35.74953 \n     0.00000     -0.00000     -0.00000      0.00000      0.00514     -0.00000     -0.00000     -1.12193      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.48937      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.13194      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00514      0.00000      0.00000     -0.00000      1.12193      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.48937      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.13194      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00514     -0.00000     -0.00000     -0.00000      0.00000     -1.12193      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.48937     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.13194      0.00000      0.00000 \n    -0.03089      0.84503      0.00000     -0.00000     -0.00000      0.67424      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.91097     -0.34201      0.27057      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.12630     -0.39294      0.06538     -0.00000     -0.00000      0.00000     -0.00529    -16.13400 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.68539      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.71488     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.68539      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.71488      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.03089      0.84503      0.00000     -0.00000     -0.00000      0.67424      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.75168     -0.61792      0.27057      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.40345      0.08709      0.06538     -0.00000     -0.00000      0.00000     -0.00529    -16.13400 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.68539      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.71488     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03089      0.84503      0.00000     -0.00000     -0.00000      0.67424      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.15930      0.95993      0.27057     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.27715      0.30585      0.06538     -0.00000     -0.00000      0.00000     -0.00529    -16.13400 \n    -0.02482      0.35710      0.00000     -0.00000     -0.00000      0.39331      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      2.12044      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.49838     -0.00000     -0.00000      0.00000    -57.22033     -9.54942 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00389      0.00000      0.00000     -0.06354     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.05646     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.34020     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00389     -0.00000     -0.00000      0.00000      0.06354     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.05646     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.34020      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00389      0.00000      0.00000      0.00000     -0.00000     -0.06354     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.05646      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.34020     -0.00000     -0.00000 \n     0.01150     -0.17945     -0.00000      0.00000      0.00000     -0.22802     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.07052     -0.02648     -0.47905      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.32261      1.00372     -0.09362      0.00000      0.00000     -0.00000     25.71025      4.51412 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.13047     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.82608      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.13047     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.82608     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.01150     -0.17945     -0.00000      0.00000      0.00000     -0.22802     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.05819     -0.04783     -0.47905      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.03055     -0.22247     -0.09362      0.00000      0.00000     -0.00000     25.71025      4.51412 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.13047     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.82608      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.01150     -0.17945     -0.00000      0.00000      0.00000     -0.22802     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.01233      0.07431     -0.47905     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.70794     -0.78125     -0.09362      0.00000      0.00000     -0.00000     25.71025      4.51412 \n    -0.00037      0.01184      0.00000     -0.00000     -0.00000      0.02570      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00539      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.03646      0.00000      0.00000     -0.00000     -0.56374     -0.17918 \n     0.00000     -0.00000     -0.00000      0.00000      0.00087     -0.00000     -0.00000      0.01069      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.03228      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.04028      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00087      0.00000      0.00000     -0.00000     -0.01069      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.03228      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.04028     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00087     -0.00000     -0.00000     -0.00000      0.00000      0.01069      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.03228     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.04028      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99643     -0.42341      0.00000     -0.00000     -0.00000     -0.21949     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.08206     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.01943     -0.00000      0.00000     -0.00000     -0.00400     -0.60609 \n    -0.01080      1.03654     -0.00000      0.00000      0.00000      0.70045      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.27538      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.06431      0.00000     -0.00000      0.00000      0.04951      0.24569 \n    -0.00000     -0.00000     -1.00237     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.55235      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.19626      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.05135     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -1.00237      0.00000      0.00000      0.55235     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.19626      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.05135      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -1.00237      0.00000      0.00000     -0.55235     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.19626      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.05135      0.00000     -0.00000 \n     0.06946     -1.78118      0.00000     -0.00000     -0.00000     -2.61249     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.11196     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.27496     -0.00000      0.00000     -0.00000      0.30865     35.74953 \n     0.00000      0.00000      0.00514      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.12195     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.48969      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.13058      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00514     -0.00000     -0.00000     -1.12195      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.48969     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.13058     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00514     -0.00000     -0.00000      1.12195      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.48969     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.13058     -0.00000      0.00000 \n    -0.03090      0.84505     -0.00000      0.00000      0.00000      0.67422      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.92987     -0.28677     -0.27058      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.16761     -0.37711      0.06499      0.00000     -0.00000      0.00000      0.00502    -16.13400 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.68543     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.71479     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.68543      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.71479      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.03090      0.84505     -0.00000      0.00000      0.00000      0.67422      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.71328     -0.66190     -0.27058     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.41040      0.04340      0.06499      0.00000     -0.00000      0.00000      0.00502    -16.13400 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.68543      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.71479     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.03090      0.84505     -0.00000      0.00000      0.00000      0.67422      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.21658      0.94867     -0.27058     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.24278      0.33372      0.06499      0.00000     -0.00000      0.00000      0.00502    -16.13400 \n    -0.02482      0.35706     -0.00000      0.00000      0.00000      0.39373      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -2.12061      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.42280      0.00000     -0.00000      0.00000     57.22073     -9.55065 \n    -0.00000     -0.00000     -0.00389     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.06349     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.05739     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.33731      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00389      0.00000      0.00000     -0.06349     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.05739      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.33731      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00389      0.00000      0.00000      0.06349     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.05739      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.33731      0.00000     -0.00000 \n     0.01150     -0.17943      0.00000     -0.00000     -0.00000     -0.22819     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.07193     -0.02218      0.47897      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.42820      0.96342     -0.06023     -0.00000      0.00000     -0.00000    -25.71025      4.51467 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.13037      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.82609      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.13037     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.82609      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.01150     -0.17943      0.00000     -0.00000     -0.00000     -0.22819     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.05517     -0.05120      0.47897     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.04845     -0.11087     -0.06023     -0.00000      0.00000     -0.00000    -25.71025      4.51467 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.13037     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.82609      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.01150     -0.17943      0.00000     -0.00000     -0.00000     -0.22819     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01675      0.07338      0.47897     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.62024     -0.85255     -0.06023     -0.00000      0.00000     -0.00000    -25.71025      4.51467 \n    -0.00037      0.01183     -0.00000      0.00000      0.00000      0.02567      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00413      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.03719     -0.00000      0.00000     -0.00000      0.56241     -0.17919 \n     0.00000      0.00000      0.00087      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01067      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.02945      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.04036      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00087     -0.00000     -0.00000      0.01067      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02945     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.04036     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00087     -0.00000     -0.00000     -0.01067      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.02945     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.04036     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Te\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.45795     -1.22074      0.00000      0.00000      0.00000      2.74471      0.00000      0.00000      0.00000     -1.00771      0.00000      0.00000     -1.00771      0.00000     -1.00771     -0.89280      0.00000      0.00000      0.00000      0.35329      0.00000      0.00000      0.35329      0.00000      0.35329      0.01906      0.00000      0.00000      0.00000 \n    -1.22074      3.32000      0.00000      0.00000      0.00000     -8.11736      0.00000      0.00000      0.00000      2.88870      0.00000      0.00000      2.88870      0.00000      2.88870      2.82385      0.00000      0.00000      0.00000     -1.09125      0.00000      0.00000     -1.09125      0.00000     -1.09125     -0.07138      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.72231      0.00000      0.00000      0.00000     -1.48592      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.39755      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05135      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.72231      0.00000      0.00000      0.00000     -1.48592      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.39755      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05135      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.72231      0.00000      0.00000      0.00000     -1.48592      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.39755      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05135 \n     2.74471     -8.11736      0.00000      0.00000      0.00000     23.06440      0.00000      0.00000      0.00000     -7.30314      0.00000      0.00000     -7.30314      0.00000     -7.30314     -9.14640      0.00000      0.00000      0.00000      3.26949      0.00000      0.00000      3.26949      0.00000      3.26949      0.39374      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.48592      0.00000      0.00000      0.00000      3.07221      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.00156      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13205      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.48592      0.00000      0.00000      0.00000      3.07221      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.00156      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13205      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.48592      0.00000      0.00000      0.00000      3.07221      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.00156      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13205 \n    -1.00771      2.88870      0.00000      0.00000      0.00000     -7.30314      0.00000      0.00000      0.00000      4.78718      0.00000      0.00000      1.40448      0.00000      1.40448      2.62416      0.00000      0.00000      0.00000     -1.75293      0.00000      0.00000     -0.61516      0.00000     -0.61518     -0.08036      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76536      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76536      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -1.00771      2.88870      0.00000      0.00000      0.00000     -7.30314      0.00000      0.00000      0.00000      1.40448      0.00000      0.00000      4.78717      0.00000      1.40449      2.62416      0.00000      0.00000      0.00000     -0.61518      0.00000      0.00000     -1.75293      0.00000     -0.61517     -0.08036      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76536      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -1.00771      2.88870      0.00000      0.00000      0.00000     -7.30314      0.00000      0.00000      0.00000      1.40448      0.00000      0.00000      1.40449      0.00000      4.78716      2.62416      0.00000      0.00000      0.00000     -0.61516      0.00000      0.00000     -0.61516      0.00000     -1.75293     -0.08036      0.00000      0.00000      0.00000 \n    -0.89280      2.82385      0.00000      0.00000      0.00000     -9.14640      0.00000      0.00000      0.00000      2.62416      0.00000      0.00000      2.62416      0.00000      2.62416      9.91165      0.00000      0.00000      0.00000     -2.41987      0.00000      0.00000     -2.41987      0.00000     -2.41987     -0.88187      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.39755      0.00000      0.00000      0.00000     -1.00156      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.41884      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40076      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.39755      0.00000      0.00000      0.00000     -1.00156      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.41884      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40076      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.39755      0.00000      0.00000      0.00000     -1.00156      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.41884      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40076 \n     0.35329     -1.09125      0.00000      0.00000      0.00000      3.26949      0.00000      0.00000      0.00000     -1.75293      0.00000      0.00000     -0.61518      0.00000     -0.61516     -2.41987      0.00000      0.00000      0.00000      2.92106      0.00000      0.00000     -0.46160      0.00000     -0.46161      0.13275      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76535      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76535      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.35329     -1.09125      0.00000      0.00000      0.00000      3.26949      0.00000      0.00000      0.00000     -0.61516      0.00000      0.00000     -1.75293      0.00000     -0.61516     -2.41987      0.00000      0.00000      0.00000     -0.46160      0.00000      0.00000      2.92108      0.00000     -0.46161      0.13275      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.27551      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.76535      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.35329     -1.09125      0.00000      0.00000      0.00000      3.26949      0.00000      0.00000      0.00000     -0.61518      0.00000      0.00000     -0.61517      0.00000     -1.75293     -2.41987      0.00000      0.00000      0.00000     -0.46161      0.00000      0.00000     -0.46161      0.00000      2.92106      0.13275      0.00000      0.00000      0.00000 \n     0.01906     -0.07138      0.00000      0.00000      0.00000      0.39374      0.00000      0.00000      0.00000     -0.08036      0.00000      0.00000     -0.08036      0.00000     -0.08036     -0.88187      0.00000      0.00000      0.00000      0.13275      0.00000      0.00000      0.13275      0.00000      0.13275      2.14493      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.05135      0.00000      0.00000      0.00000      0.13205      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40076      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.44015      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05135      0.00000      0.00000      0.00000      0.13205      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40076      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.44015      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05135      0.00000      0.00000      0.00000      0.13205      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40076      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.44015 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99820      0.99820      0.99820      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33514      0.33514      0.33514      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1104.29500   -164.41950   -155.93700   -155.93700   -155.93700    -31.33768    -28.22413    -28.22413    -28.22413    -19.94149    -19.94149    -19.94149    -19.94149    -19.94149     -4.98723     -3.73674     -3.73674     -3.73674     -1.08705     -1.08705     -1.08705     -1.08705     -1.08705     -0.38632     -0.14497     -0.14497     -0.14497     15.58394    278.64600 \n   </alphaeps>\n   <betaeps>\n -1104.29400   -164.41880   -155.93600   -155.93600   -155.93600    -31.33635    -28.22276    -28.22276    -28.22276    -19.94022    -19.94022    -19.94022    -19.94022    -19.94022     -4.98280     -3.73188     -3.73188     -3.73188     -1.08251     -1.08251     -1.08251     -1.08251     -1.08251     -0.33913     -0.09779     -0.09779     -0.09779     15.60897    278.64910 \n   </betaeps>\n   <alphavectors>\n     0.99647     -0.42345     -0.00000     -0.00000     -0.00000     -0.22105      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.08626     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.02018      0.00000      0.00000     -0.00000      0.00533      0.61538 \n     0.01068      1.03557      0.00000      0.00000      0.00000      0.70622     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.29024      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.06711     -0.00000      0.00000      0.00000     -0.06068     -0.25476 \n    -0.00000     -0.00000      1.00305      0.00000      0.00000      0.00000      0.55750      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.20590     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05245     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000      1.00305      0.00000      0.00000     -0.55750     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.20590     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.05245      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -1.00305     -0.00000      0.00000      0.00000      0.00000      0.55750      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.20590     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.05245     -0.00000     -0.00000      0.00000 \n    -0.06917     -1.77958     -0.00000     -0.00000     -0.00000     -2.62680      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.17384     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.28748      0.00000     -0.00000     -0.00000     -0.16852    -36.02594 \n     0.00000     -0.00000     -0.00652     -0.00000     -0.00000     -0.00000     -1.12356     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.51169      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.13297      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00652     -0.00000     -0.00000      1.12356      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.51169      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.13297     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00652      0.00000     -0.00000     -0.00000     -0.00000     -1.12356     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.51169      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.13297      0.00000      0.00000     -0.00000 \n     0.03080      0.84510      0.00000      0.00000      0.00000      0.68115     -0.00000      0.00000      0.00000     -0.97283     -0.00000      0.00000      0.00008      0.00000     -0.28676     -0.00000     -0.00000     -0.00000      0.42564      0.00000     -0.00000     -0.00000     -0.00000      0.06854      0.00000      0.00000     -0.00000     -0.06309     16.26781 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.68498      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.73723     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.68498     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.73723     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.03080      0.84510      0.00000      0.00000      0.00000      0.68115     -0.00000      0.00000      0.00000      0.48635      0.00000     -0.00000     -0.84253      0.00000     -0.28676      0.00000      0.00000     -0.00000     -0.21282     -0.00000      0.00000     -0.36861      0.00000      0.06854     -0.00000      0.00000      0.00000     -0.06309     16.26781 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.68498     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.73723     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.03080      0.84510      0.00000      0.00000      0.00000      0.68115     -0.00000      0.00000      0.00000      0.48648      0.00000     -0.00000      0.84245     -0.00000     -0.28676      0.00000     -0.00000      0.00000     -0.21282     -0.00000      0.00000      0.36862      0.00000      0.06854     -0.00000     -0.00000     -0.00000     -0.06309     16.26781 \n     0.02842      0.43101      0.00000      0.00000      0.00000      0.46700      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -2.08336      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.47911     -0.00000     -0.00000      0.00000    -57.10905     11.15961 \n    -0.00000      0.00000      0.00436      0.00000      0.00000      0.00000     -0.06506     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.06379      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.33131      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00436      0.00000     -0.00000      0.06506     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.06379     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.33131      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00436     -0.00000      0.00000     -0.00000     -0.00000     -0.06506      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.06379     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.33131      0.00000     -0.00000      0.00000 \n    -0.01312     -0.21302     -0.00000     -0.00000     -0.00000     -0.26348     -0.00000     -0.00000     -0.00000     -0.07363     -0.00000      0.00000      0.00001      0.00000      0.46046     -0.00000     -0.00000     -0.00000     -1.05931     -0.00000      0.00000      0.00001      0.00000     -0.08597      0.00000     -0.00000     -0.00000     25.65863     -5.24157 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.12754     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.83478      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.12754      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.83478      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.01312     -0.21302     -0.00000     -0.00000     -0.00000     -0.26348     -0.00000     -0.00000     -0.00000      0.03681      0.00000     -0.00000     -0.06377      0.00000      0.46046      0.00000      0.00000     -0.00000      0.52966      0.00000     -0.00000      0.91739     -0.00000     -0.08597      0.00000     -0.00000     -0.00000     25.65863     -5.24157 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.12754      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.83478      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.01312     -0.21302     -0.00000     -0.00000     -0.00000     -0.26348     -0.00000     -0.00000     -0.00000      0.03682      0.00000     -0.00000      0.06377     -0.00000      0.46046      0.00000     -0.00000      0.00000      0.52965      0.00000     -0.00000     -0.91739     -0.00000     -0.08597      0.00000     -0.00000     -0.00000     25.65863     -5.24157 \n     0.00040      0.01235      0.00000      0.00000      0.00000      0.02644      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00790      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.03496      0.00000      0.00000     -0.00000     -0.55770      0.19133 \n     0.00000     -0.00000     -0.00094     -0.00000     -0.00000     -0.00000      0.01047      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.02842     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.03864     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00094     -0.00000      0.00000     -0.01047     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.02842      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.03864     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00094      0.00000     -0.00000      0.00000      0.00000      0.01047     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.02842      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.03864     -0.00000      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99647     -0.42345      0.00000     -0.00000      0.00000      0.22106     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.08627     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02011      0.00000     -0.00000     -0.00000      0.00536     -0.61538 \n    -0.01068      1.03557     -0.00000      0.00000     -0.00000     -0.70622      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.29027      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.06685     -0.00000      0.00000      0.00000     -0.06073      0.25476 \n     0.00000     -0.00000     -1.00305     -0.00000      0.00000     -0.00000     -0.55751     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.20596     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.05215      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      1.00305      0.00000     -0.00000     -0.00000     -0.00000      0.55751     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.20596     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.05215     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -1.00305     -0.00000      0.00000     -0.55751     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.20596      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.05215      0.00000     -0.00000 \n     0.06917     -1.77960      0.00000     -0.00000      0.00000      2.62679      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.17394     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.28664      0.00000     -0.00000     -0.00000     -0.16887     36.02595 \n    -0.00000      0.00000      0.00652      0.00000     -0.00000      0.00000      1.12357      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.51185      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.13223     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00652     -0.00000      0.00000      0.00000      0.00000     -1.12357      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.51185      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.13223      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00652      0.00000     -0.00000      1.12357      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.51185     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.13223     -0.00000      0.00000 \n    -0.03080      0.84511     -0.00000      0.00000     -0.00000     -0.68114     -0.00000      0.00000     -0.00000      0.97284     -0.00000     -0.00000      0.00012     -0.00000     -0.28678      0.00000     -0.00000      0.00000     -0.42561     -0.00000     -0.00000      0.00000     -0.00000      0.06824     -0.00000      0.00000      0.00000     -0.06289    -16.26781 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.68501     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.73718      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.68501      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.73718      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.03080      0.84511     -0.00000      0.00000     -0.00000     -0.68114      0.00000      0.00000     -0.00000     -0.48631      0.00000      0.00000     -0.84257     -0.00000     -0.28678     -0.00000      0.00000     -0.00000      0.21281     -0.00000      0.00000      0.36859     -0.00000      0.06824     -0.00000      0.00000      0.00000     -0.06289    -16.26781 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.68501      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.73718      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.03080      0.84511     -0.00000      0.00000     -0.00000     -0.68114     -0.00000      0.00000     -0.00000     -0.48653      0.00000      0.00000      0.84244      0.00000     -0.28678     -0.00000     -0.00000     -0.00000      0.21280      0.00000      0.00000     -0.36859      0.00000      0.06824     -0.00000      0.00000      0.00000     -0.06289    -16.26781 \n    -0.02842      0.43098     -0.00000      0.00000     -0.00000     -0.46720      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -2.08350     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.43732     -0.00000      0.00000      0.00000    -57.10921    -11.16047 \n     0.00000     -0.00000     -0.00435     -0.00000      0.00000     -0.00000      0.06503      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.06427     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.32980     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00435      0.00000     -0.00000      0.00000      0.00000     -0.06503     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.06427     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.32980     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00435     -0.00000     -0.00000      0.06503     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.06427      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.32980      0.00000     -0.00000 \n     0.01312     -0.21301      0.00000     -0.00000      0.00000      0.26356     -0.00000     -0.00000      0.00000      0.07360     -0.00000     -0.00000      0.00001     -0.00000      0.46043      0.00000     -0.00000      0.00000      1.05931     -0.00000     -0.00000     -0.00001     -0.00000     -0.06753      0.00000     -0.00000     -0.00000     25.65861      5.24196 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.12748      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.83478      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.12748     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.83478      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.01312     -0.21301      0.00000     -0.00000      0.00000      0.26356     -0.00000     -0.00000      0.00000     -0.03679      0.00000      0.00000     -0.06374     -0.00000      0.46043     -0.00000      0.00000     -0.00000     -0.52966     -0.00000      0.00000     -0.91739     -0.00000     -0.06753      0.00000     -0.00000     -0.00000     25.65861      5.24196 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.12748     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.83478     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.01312     -0.21301      0.00000     -0.00000      0.00000      0.26356      0.00000     -0.00000      0.00000     -0.03681      0.00000      0.00000      0.06373      0.00000      0.46043     -0.00000     -0.00000     -0.00000     -0.52965      0.00000      0.00000      0.91739      0.00000     -0.06753      0.00000     -0.00000     -0.00000     25.65861      5.24196 \n    -0.00040      0.01235     -0.00000      0.00000     -0.00000     -0.02642      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00718     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.03536      0.00000     -0.00000     -0.00000     -0.55696     -0.19133 \n    -0.00000      0.00000      0.00094      0.00000     -0.00000      0.00000     -0.01046     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.02694     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.03868      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00094     -0.00000      0.00000      0.00000      0.00000      0.01046      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.02694      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.03868     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00094      0.00000      0.00000     -0.01046     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.02694     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.03868     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"I\" basis=\"STO-3G\">\n   <guessdensitymatrix>\n     2.46149     -1.23052      0.00000      0.00000      0.00000      2.77409      0.00000      0.00000      0.00000     -1.01602      0.00000      0.00000     -1.01602      0.00000     -1.01602     -1.00608      0.00000      0.00000      0.00000      0.40103      0.00000      0.00000      0.40103      0.00000      0.40103      0.02069      0.00000      0.00000      0.00000 \n    -1.23052      3.35000      0.00000      0.00000      0.00000     -8.22861      0.00000      0.00000      0.00000      2.92111      0.00000      0.00000      2.92111      0.00000      2.92111      3.16345      0.00000      0.00000      0.00000     -1.23221      0.00000      0.00000     -1.23221      0.00000     -1.23221     -0.07795      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.74501      0.00000      0.00000      0.00000     -1.52279      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42602      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07650      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.74501      0.00000      0.00000      0.00000     -1.52279      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42602      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07650      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.74501      0.00000      0.00000      0.00000     -1.52279      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.42602      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07650 \n     2.77409     -8.22861      0.00000      0.00000      0.00000     23.47309      0.00000      0.00000      0.00000     -7.42145      0.00000      0.00000     -7.42145      0.00000     -7.42145    -10.08081      0.00000      0.00000      0.00000      3.63722      0.00000      0.00000      3.63722      0.00000      3.63722      0.42971      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -1.52279      0.00000      0.00000      0.00000      3.12978      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.06788      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.19513      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.52279      0.00000      0.00000      0.00000      3.12978      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.06788      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.19513      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.52279      0.00000      0.00000      0.00000      3.12978      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.06788      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.19513 \n    -1.01602      2.92111      0.00000      0.00000      0.00000     -7.42145      0.00000      0.00000      0.00000      4.84022      0.00000      0.00000      1.42959      0.00000      1.42959      2.93289      0.00000      0.00000      0.00000     -1.90961      0.00000      0.00000     -0.72619      0.00000     -0.72619     -0.08757      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -1.01602      2.92111      0.00000      0.00000      0.00000     -7.42145      0.00000      0.00000      0.00000      1.42959      0.00000      0.00000      4.84021      0.00000      1.42959      2.93289      0.00000      0.00000      0.00000     -0.72618      0.00000      0.00000     -1.90961      0.00000     -0.72619     -0.08757      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82121      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -1.01602      2.92111      0.00000      0.00000      0.00000     -7.42145      0.00000      0.00000      0.00000      1.42959      0.00000      0.00000      1.42959      0.00000      4.84022      2.93289      0.00000      0.00000      0.00000     -0.72619      0.00000      0.00000     -0.72620      0.00000     -1.90961     -0.08757      0.00000      0.00000      0.00000 \n    -1.00608      3.16345      0.00000      0.00000      0.00000    -10.08081      0.00000      0.00000      0.00000      2.93289      0.00000      0.00000      2.93289      0.00000      2.93289      9.91860      0.00000      0.00000      0.00000     -2.46240      0.00000      0.00000     -2.46240      0.00000     -2.46240     -0.88192      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.42602      0.00000      0.00000      0.00000     -1.06788      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.49631      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54705      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.42602      0.00000      0.00000      0.00000     -1.06788      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.49631      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54705      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.42602      0.00000      0.00000      0.00000     -1.06788      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.49631      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54705 \n     0.40103     -1.23221      0.00000      0.00000      0.00000      3.63722      0.00000      0.00000      0.00000     -1.90961      0.00000      0.00000     -0.72618      0.00000     -0.72619     -2.46240      0.00000      0.00000      0.00000      2.98499      0.00000      0.00000     -0.42566      0.00000     -0.42566      0.11519      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82126      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82126      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.40103     -1.23221      0.00000      0.00000      0.00000      3.63722      0.00000      0.00000      0.00000     -0.72619      0.00000      0.00000     -1.90961      0.00000     -0.72620     -2.46240      0.00000      0.00000      0.00000     -0.42566      0.00000      0.00000      2.98495      0.00000     -0.42566      0.11519      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.36684      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.82126      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.40103     -1.23221      0.00000      0.00000      0.00000      3.63722      0.00000      0.00000      0.00000     -0.72619      0.00000      0.00000     -0.72619      0.00000     -1.90961     -2.46240      0.00000      0.00000      0.00000     -0.42566      0.00000      0.00000     -0.42566      0.00000      2.98499      0.11519      0.00000      0.00000      0.00000 \n     0.02069     -0.07795      0.00000      0.00000      0.00000      0.42971      0.00000      0.00000      0.00000     -0.08757      0.00000      0.00000     -0.08757      0.00000     -0.08757     -0.88192      0.00000      0.00000      0.00000      0.11519      0.00000      0.00000      0.11519      0.00000      0.11519      2.16226      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07650      0.00000      0.00000      0.00000      0.19513      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.81353      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07650      0.00000      0.00000      0.00000      0.19513      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.81352      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07650      0.00000      0.00000      0.00000      0.19513      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54705      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.81353 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.96436      0.96436      0.96436      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.70231      0.70231      0.70231      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1149.80400   -172.43310   -163.73750   -163.73750   -163.73750    -33.38919    -30.23519    -30.23519    -30.23519    -21.70046    -21.70046    -21.70046    -21.70046    -21.70046     -5.55639     -4.25655     -4.25655     -4.25655     -1.45461     -1.45461     -1.45461     -1.45461     -1.45461     -0.43729     -0.17069     -0.17069     -0.17069     16.89002    297.58610 \n   </alphaeps>\n   <betaeps>\n -1149.80400   -172.43270   -163.73700   -163.73700   -163.73700    -33.38859    -30.23458    -30.23458    -30.23458    -21.69989    -21.69989    -21.69989    -21.69989    -21.69989     -5.55448     -4.25448     -4.25448     -4.25448     -1.45267     -1.45267     -1.45267     -1.45267     -1.45267     -0.41929     -0.15269     -0.15269     -0.15269     16.89966    297.58740 \n   </betaeps>\n   <alphavectors>\n     0.99661      0.42354     -0.00000      0.00000     -0.00000     -0.22256      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.09006     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.02199     -0.00000      0.00000     -0.00000     -0.00590      0.62492 \n     0.01040     -1.03474      0.00000     -0.00000      0.00000      0.71175     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.30372      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.07333      0.00000     -0.00000      0.00000      0.06827     -0.26397 \n    -0.00000     -0.00000      1.00373     -0.00000      0.00000      0.00000     -0.56249      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.21451     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.05608      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -1.00373     -0.00000     -0.00000      0.00000     -0.56249      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.21451     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05608      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -1.00373      0.00000     -0.00000     -0.00000      0.56249      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.21451     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05608      0.00000     -0.00000     -0.00000 \n    -0.07085      1.77728     -0.00000      0.00000     -0.00000     -2.63923      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.22841     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.31357      0.00000      0.00000     -0.00000      0.06787    -36.32033 \n     0.00000      0.00000     -0.00791      0.00000     -0.00000     -0.00000      1.12521     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.53100      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.14186      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00791      0.00000      0.00000     -0.00000      1.12521     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.53100      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.14186     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00791     -0.00000      0.00000      0.00000     -1.12521     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.53100      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.14186      0.00000      0.00000      0.00000 \n     0.03162     -0.84482      0.00000     -0.00000      0.00000      0.68731     -0.00000      0.00000      0.00000     -0.00000     -0.84255      0.00000     -0.00000     -0.48642     -0.30088      0.00000      0.00000     -0.00000      0.00000     -0.37787     -0.00000     -0.00000     -0.21816      0.07481     -0.00000      0.00000      0.00000      0.10709     16.41007 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.68507      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.75574      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.68507      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.75574     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.03162     -0.84482      0.00000     -0.00000      0.00000      0.68731     -0.00000      0.00000      0.00000     -0.00000      0.00002      0.00000     -0.00000      0.97288     -0.30088     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.43633      0.07481      0.00000     -0.00000     -0.00000      0.10709     16.41007 \n     0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.68507     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.75574     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.03162     -0.84482      0.00000     -0.00000      0.00000      0.68731     -0.00000      0.00000      0.00000     -0.00000      0.84253      0.00000     -0.00000     -0.48646     -0.30088      0.00000      0.00000     -0.00000      0.00000      0.37787     -0.00000     -0.00000     -0.21816      0.07481     -0.00000      0.00000      0.00000      0.10709     16.41007 \n     0.03225     -0.51164      0.00000     -0.00000      0.00000      0.55894     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -2.04204      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.47056     -0.00000      0.00000     -0.00000     57.30134     12.77576 \n    -0.00000     -0.00000      0.00485     -0.00000      0.00000      0.00000      0.06662      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.06981     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.34493      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00485     -0.00000     -0.00000      0.00000      0.06662     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.06981     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.34493      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00485      0.00000     -0.00000     -0.00000     -0.06662      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.06981     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.34493      0.00000     -0.00000     -0.00000 \n    -0.01488      0.24973     -0.00000      0.00000     -0.00000     -0.30730      0.00000     -0.00000     -0.00000      0.00000     -0.06205     -0.00000      0.00000     -0.03582      0.44002      0.00000      0.00000     -0.00000     -0.00000      0.92131      0.00000     -0.00000      0.53192     -0.07408      0.00000     -0.00000     -0.00000    -25.74976     -5.97412 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.12410     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.84261     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.12410     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.84261      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01488      0.24973     -0.00000      0.00000     -0.00000     -0.30730      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.07165      0.44002     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.06383     -0.07408      0.00000      0.00000      0.00000    -25.74976     -5.97412 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.12410      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.84261      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01488      0.24973     -0.00000      0.00000     -0.00000     -0.30730      0.00000     -0.00000     -0.00000      0.00000      0.06205     -0.00000      0.00000     -0.03583      0.44002      0.00000      0.00000     -0.00000     -0.00000     -0.92131      0.00000     -0.00000      0.53192     -0.07408      0.00000     -0.00000     -0.00000    -25.74976     -5.97412 \n     0.00045     -0.01356      0.00000     -0.00000      0.00000      0.02892     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00858      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.03918      0.00000     -0.00000      0.00000      0.56793      0.21133 \n     0.00000      0.00000     -0.00109      0.00000     -0.00000     -0.00000     -0.01097     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.02524      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.04269      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00109      0.00000      0.00000     -0.00000     -0.01097      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.02524      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.04269      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00109     -0.00000      0.00000      0.00000      0.01097     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.02524      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.04269     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99661      0.42354     -0.00000      0.00000     -0.00000     -0.22256     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.09006      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.02196      0.00000     -0.00000      0.00000      0.00591     -0.62492 \n     0.01040     -1.03474      0.00000     -0.00000      0.00000      0.71175      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.30373     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.07323     -0.00000      0.00000     -0.00000     -0.06829      0.26397 \n    -0.00000      0.00000     -1.00373      0.00000     -0.00000      0.00000     -0.56249      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.21453      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.05597     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -1.00373     -0.00000      0.00000     -0.00000      0.56249     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.21453      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.05597     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -1.00373      0.00000     -0.00000      0.00000     -0.56249      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.21453      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.05597     -0.00000      0.00000      0.00000 \n    -0.07085      1.77729     -0.00000      0.00000     -0.00000     -2.63923     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.22845      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.31319      0.00000      0.00000     -0.00000     -0.06800     36.32033 \n     0.00000     -0.00000      0.00791     -0.00000      0.00000     -0.00000      1.12521     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.53105     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.14159      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00791      0.00000     -0.00000      0.00000     -1.12521      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.53105     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.14159      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00791     -0.00000      0.00000     -0.00000      1.12521     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.53105     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.14159      0.00000     -0.00000     -0.00000 \n     0.03162     -0.84483      0.00000     -0.00000      0.00000      0.68730      0.00000      0.00000     -0.00000      0.00000     -0.84255     -0.00000      0.00000     -0.48643      0.30088      0.00000     -0.00000     -0.00000      0.00000      0.37786     -0.00000     -0.00000      0.21816      0.07467     -0.00000     -0.00000     -0.00000     -0.10701    -16.41007 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.68508     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.75572     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.68508      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.75572     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03162     -0.84483      0.00000     -0.00000      0.00000      0.68730      0.00000      0.00000      0.00000      0.00000      0.00002      0.00000     -0.00000      0.97288      0.30088     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.43632      0.07467     -0.00000      0.00000      0.00000     -0.10701    -16.41007 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.68508      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.75572     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.03162     -0.84483      0.00000     -0.00000      0.00000      0.68730      0.00000      0.00000     -0.00000     -0.00000      0.84253      0.00000     -0.00000     -0.48646      0.30088     -0.00000      0.00000      0.00000     -0.00000     -0.37786      0.00000      0.00000      0.21816      0.07467     -0.00000     -0.00000     -0.00000     -0.10701    -16.41007 \n     0.03225     -0.51163      0.00000     -0.00000      0.00000      0.55903      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.04182     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.45571      0.00000     -0.00000      0.00000    -57.30139    -12.77610 \n    -0.00000      0.00000     -0.00485      0.00000     -0.00000      0.00000      0.06661      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.06998      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.34440     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00485     -0.00000      0.00000     -0.00000     -0.06661      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.06998      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.34440      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00485      0.00000     -0.00000      0.00000      0.06661      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.06998      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.34440     -0.00000      0.00000      0.00000 \n    -0.01488      0.24973     -0.00000      0.00000     -0.00000     -0.30733     -0.00000     -0.00000      0.00000      0.00000     -0.06204     -0.00000      0.00000     -0.03582     -0.43988      0.00000     -0.00000     -0.00000     -0.00000     -0.92131     -0.00000     -0.00000     -0.53192     -0.06754      0.00000     -0.00000      0.00000     25.74975      5.97427 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.12408      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.84262     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.12408      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.84262     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.01488      0.24973     -0.00000      0.00000     -0.00000     -0.30733     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.07164     -0.43988     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.06383     -0.06754     -0.00000      0.00000     -0.00000     25.74975      5.97427 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.12408     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -1.84262      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.01488      0.24973     -0.00000      0.00000     -0.00000     -0.30733     -0.00000     -0.00000      0.00000     -0.00000      0.06204      0.00000     -0.00000     -0.03582     -0.43988     -0.00000      0.00000      0.00000     -0.00000      0.92131     -0.00000      0.00000     -0.53192     -0.06754      0.00000     -0.00000      0.00000     25.74975      5.97427 \n     0.00045     -0.01356      0.00000     -0.00000      0.00000      0.02892      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00830     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.03932     -0.00000      0.00000     -0.00000     -0.56767     -0.21134 \n     0.00000     -0.00000      0.00109     -0.00000      0.00000     -0.00000     -0.01097     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.02473     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.04271     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00109      0.00000     -0.00000      0.00000      0.01097      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.02473      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.04271     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00109     -0.00000      0.00000     -0.00000     -0.01097      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.02473     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.04271      0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Xe\" basis=\"sto-3g\">\n   <guessdensitymatrix>\n     2.46476     -1.23952      0.00000      0.00000      0.00000      2.80282      0.00000      0.00000      0.00000     -1.12126      0.00000      0.00000      0.00000      0.02268      0.00000      0.00000      0.00000     -1.02435      0.00000      0.00000     -1.02435      0.00000     -1.02435      0.44955      0.00000      0.00000      0.44955      0.00000      0.44955 \n    -1.23952      3.37760      0.00000      0.00000      0.00000     -8.33687      0.00000      0.00000      0.00000      3.50834      0.00000      0.00000      0.00000     -0.08568      0.00000      0.00000      0.00000      2.95327      0.00000      0.00000      2.95327      0.00000      2.95327     -1.37525      0.00000      0.00000     -1.37525      0.00000     -1.37525 \n     0.00000      0.00000      2.76587      0.00000      0.00000      0.00000     -1.55812      0.00000      0.00000      0.00000      0.45664      0.00000      0.00000      0.00000     -0.10559      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.76587      0.00000      0.00000      0.00000     -1.55812      0.00000      0.00000      0.00000      0.45664      0.00000      0.00000      0.00000     -0.10559      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.76587      0.00000      0.00000      0.00000     -1.55812      0.00000      0.00000      0.00000      0.45664      0.00000      0.00000      0.00000     -0.10559      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     2.80282     -8.33687      0.00000      0.00000      0.00000     23.87783      0.00000      0.00000      0.00000    -11.03760      0.00000      0.00000      0.00000      0.47033      0.00000      0.00000      0.00000     -7.54024      0.00000      0.00000     -7.54024      0.00000     -7.54024      4.01369      0.00000      0.00000      4.01369      0.00000      4.01369 \n     0.00000      0.00000     -1.55812      0.00000      0.00000      0.00000      3.18922      0.00000      0.00000      0.00000     -1.14076      0.00000      0.00000      0.00000      0.26821      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -1.55812      0.00000      0.00000      0.00000      3.18922      0.00000      0.00000      0.00000     -1.14076      0.00000      0.00000      0.00000      0.26821      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.55812      0.00000      0.00000      0.00000      3.18922      0.00000      0.00000      0.00000     -1.14076      0.00000      0.00000      0.00000      0.26821      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -1.12126      3.50834      0.00000      0.00000      0.00000    -11.03760      0.00000      0.00000      0.00000     10.04101      0.00000      0.00000      0.00000     -0.87199      0.00000      0.00000      0.00000      3.24745      0.00000      0.00000      3.24745      0.00000      3.24745     -2.55273      0.00000      0.00000     -2.55273      0.00000     -2.55273 \n     0.00000      0.00000      0.45664      0.00000      0.00000      0.00000     -1.14076      0.00000      0.00000      0.00000      2.58664      0.00000      0.00000      0.00000     -0.71139      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.45664      0.00000      0.00000      0.00000     -1.14076      0.00000      0.00000      0.00000      2.58664      0.00000      0.00000      0.00000     -0.71139      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.45664      0.00000      0.00000      0.00000     -1.14076      0.00000      0.00000      0.00000      2.58664      0.00000      0.00000      0.00000     -0.71139      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.02268     -0.08568      0.00000      0.00000      0.00000      0.47033      0.00000      0.00000      0.00000     -0.87199      0.00000      0.00000      0.00000      2.18394      0.00000      0.00000      0.00000     -0.09543      0.00000      0.00000     -0.09543      0.00000     -0.09543      0.08997      0.00000      0.00000      0.08997      0.00000      0.08997 \n     0.00000      0.00000     -0.10559      0.00000      0.00000      0.00000      0.26821      0.00000      0.00000      0.00000     -0.71139      0.00000      0.00000      0.00000      2.19642      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.10559      0.00000      0.00000      0.00000      0.26821      0.00000      0.00000      0.00000     -0.71139      0.00000      0.00000      0.00000      2.19642      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.10559      0.00000      0.00000      0.00000      0.26821      0.00000      0.00000      0.00000     -0.71139      0.00000      0.00000      0.00000      2.19642      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -1.02435      2.95327      0.00000      0.00000      0.00000     -7.54024      0.00000      0.00000      0.00000      3.24745      0.00000      0.00000      0.00000     -0.09543      0.00000      0.00000      0.00000      4.89546      0.00000      0.00000      1.45543      0.00000      1.45543     -2.06976      0.00000      0.00000     -0.83945      0.00000     -0.83945 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.88001      0.00000      0.00000      0.00000      0.00000      0.00000     -2.46063      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.88001      0.00000      0.00000      0.00000      0.00000      0.00000     -2.46063      0.00000      0.00000      0.00000 \n    -1.02435      2.95327      0.00000      0.00000      0.00000     -7.54024      0.00000      0.00000      0.00000      3.24745      0.00000      0.00000      0.00000     -0.09543      0.00000      0.00000      0.00000      1.45543      0.00000      0.00000      4.89546      0.00000      1.45544     -0.83945      0.00000      0.00000     -2.06975      0.00000     -0.83945 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      6.88001      0.00000      0.00000      0.00000      0.00000      0.00000     -2.46063      0.00000 \n    -1.02435      2.95327      0.00000      0.00000      0.00000     -7.54024      0.00000      0.00000      0.00000      3.24745      0.00000      0.00000      0.00000     -0.09543      0.00000      0.00000      0.00000      1.45543      0.00000      0.00000      1.45544      0.00000      4.89543     -0.83944      0.00000      0.00000     -0.83945      0.00000     -2.06976 \n     0.44955     -1.37525      0.00000      0.00000      0.00000      4.01369      0.00000      0.00000      0.00000     -2.55273      0.00000      0.00000      0.00000      0.08997      0.00000      0.00000      0.00000     -2.06976      0.00000      0.00000     -0.83945      0.00000     -0.83944      3.07076      0.00000      0.00000     -0.36926      0.00000     -0.36926 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.46063      0.00000      0.00000      0.00000      0.00000      0.00000      6.88005      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.46063      0.00000      0.00000      0.00000      0.00000      0.00000      6.88005      0.00000      0.00000      0.00000 \n     0.44955     -1.37525      0.00000      0.00000      0.00000      4.01369      0.00000      0.00000      0.00000     -2.55273      0.00000      0.00000      0.00000      0.08997      0.00000      0.00000      0.00000     -0.83945      0.00000      0.00000     -2.06975      0.00000     -0.83945     -0.36926      0.00000      0.00000      3.07076      0.00000     -0.36928 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -2.46063      0.00000      0.00000      0.00000      0.00000      0.00000      6.88005      0.00000 \n     0.44955     -1.37525      0.00000      0.00000      0.00000      4.01369      0.00000      0.00000      0.00000     -2.55273      0.00000      0.00000      0.00000      0.08997      0.00000      0.00000      0.00000     -0.83945      0.00000      0.00000     -0.83945      0.00000     -2.06976     -0.36926      0.00000      0.00000     -0.36928      0.00000      3.07076 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n -1196.28600   -180.66580   -171.75990   -171.75990   -171.75990    -35.51214    -32.30916    -32.30916    -32.30916    -23.51655    -23.51655    -23.51655    -23.51655    -23.51655     -6.12576     -4.77815     -4.77815     -4.77815     -1.82370     -1.82370     -1.82370     -1.82370     -1.82370     -0.48863     -0.19434     -0.19434     -0.19434     18.27766    316.91820 \n   </alphaeps>\n   <betaeps>\n -1196.28600   -180.66580   -171.75990   -171.75990   -171.75990    -35.51214    -32.30916    -32.30916    -32.30916    -23.51655    -23.51655    -23.51655    -23.51655    -23.51655     -6.12576     -4.77815     -4.77815     -4.77815     -1.82370     -1.82370     -1.82370     -1.82370     -1.82370     -0.48863     -0.19434     -0.19434     -0.19434     18.27766    316.91820 \n   </betaeps>\n   <alphavectors>\n     0.99675      0.42366     -0.00000     -0.00000     -0.00000      0.22373      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.09355     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.02399     -0.00000     -0.00000     -0.00000     -0.00626     -0.63406 \n     0.01012     -1.03414      0.00000      0.00000      0.00000     -0.71616     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.31613      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.08019      0.00000      0.00000      0.00000      0.07541      0.27214 \n    -0.00000      0.00000     -0.00000     -0.00000      1.00442     -0.00000     -0.00000     -0.56656      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.22239      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.06025      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      1.00442     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.56656     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.22239     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.06025      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      1.00442      0.00000      0.00000     -0.56656     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.22239      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.06025      0.00000      0.00000 \n    -0.07262      1.77767     -0.00000     -0.00000     -0.00000      2.64968      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -1.27897     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.34200     -0.00000     -0.00000     -0.00000     -0.03314     36.62686 \n     0.00000     -0.00000      0.00000      0.00000     -0.00931      0.00000      0.00000      1.12673     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54936     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.15234     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00931      0.00000      0.00000      0.00000      0.00000     -0.00000      1.12673      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.54936      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.15234     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00931     -0.00000     -0.00000      1.12673      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.54936     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.15234     -0.00000      0.00000 \n     0.03600     -0.59211      0.00000      0.00000      0.00000     -0.65665     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      2.00552      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.46402      0.00000     -0.00000      0.00000     57.51093    -14.35036 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00537      0.00000      0.00000      0.06736      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.07582      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.36244     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00537     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.06736     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.07582     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.36244      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00537     -0.00000     -0.00000      0.06736     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.07582      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.36244      0.00000      0.00000 \n     0.00051     -0.01484      0.00000      0.00000      0.00000     -0.03147     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00954      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.04435     -0.00000      0.00000     -0.00000      0.57904     -0.23168 \n     0.00000     -0.00000      0.00000      0.00000     -0.00125     -0.00000     -0.00000     -0.01140      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.02304     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      1.04764     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00125      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.01140      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.02304      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.04764     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00125      0.00000      0.00000     -0.01140      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.02304     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.04764     -0.00000     -0.00000 \n     0.03248     -0.84567      0.00000      0.00000      0.00000     -0.69266     -0.00000      0.00000      0.00000      0.93282     -0.27765      0.00000      0.00000     -0.00000      0.31373      0.00000      0.00000      0.00000     -0.44235      0.06140      0.00000      0.00000     -0.00000     -0.08146      0.00000     -0.00000     -0.00000      0.15170    -16.55762 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.68573     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.77351     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.68573     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.77351      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.03248     -0.84567      0.00000      0.00000      0.00000     -0.69266     -0.00000      0.00000      0.00000     -0.70686     -0.66902      0.00000      0.00000     -0.00000      0.31373      0.00000      0.00000      0.00000      0.27434      0.35238      0.00000      0.00000     -0.00000     -0.08146     -0.00000      0.00000     -0.00000      0.15170    -16.55762 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.68573     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.77351     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.03248     -0.84567      0.00000      0.00000      0.00000     -0.69266     -0.00000      0.00000      0.00000     -0.22596      0.94666      0.00000      0.00000     -0.00000      0.31373      0.00000      0.00000      0.00000      0.16800     -0.41378     -0.00000     -0.00000      0.00000     -0.08146      0.00000     -0.00000      0.00000      0.15170    -16.55762 \n    -0.01659      0.28642     -0.00000     -0.00000     -0.00000      0.35331      0.00000     -0.00000     -0.00000      0.06610     -0.01967      0.00000      0.00000      0.00000     -0.42162     -0.00000     -0.00000     -0.00000      1.05846     -0.14691     -0.00000     -0.00000      0.00000      0.06165     -0.00000      0.00000      0.00000    -25.84949      6.68856 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.11945      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.85088      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.11945      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.85088     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01659      0.28642     -0.00000     -0.00000     -0.00000      0.35331      0.00000     -0.00000     -0.00000     -0.05009     -0.04741      0.00000      0.00000      0.00000     -0.42162     -0.00000     -0.00000     -0.00000     -0.65646     -0.84320     -0.00000     -0.00000      0.00000      0.06165      0.00000     -0.00000      0.00000    -25.84949      6.68856 \n    -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.11945      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.85088      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01659      0.28642     -0.00000     -0.00000     -0.00000      0.35331      0.00000     -0.00000     -0.00000     -0.01601      0.06708      0.00000      0.00000      0.00000     -0.42162     -0.00000     -0.00000     -0.00000     -0.40200      0.99011      0.00000      0.00000     -0.00000      0.06165     -0.00000      0.00000     -0.00000    -25.84949      6.68856 \n   </alphavectors>\n   <betavectors>\n     0.99675      0.42366     -0.00000      0.00000     -0.00000      0.22373      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.09355      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.02399     -0.00000     -0.00000      0.00000     -0.00626     -0.63406 \n     0.01012     -1.03414      0.00000     -0.00000      0.00000     -0.71616     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.31613     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.08019      0.00000      0.00000     -0.00000      0.07541      0.27214 \n     0.00000      0.00000     -0.00000      0.00000      1.00442      0.00000      0.00000     -0.56656      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.22239      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.06025      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      1.00442      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.56656     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.22239      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.06025     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      1.00442      0.00000      0.00000     -0.56656     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.22239      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.06025      0.00000      0.00000 \n    -0.07262      1.77767     -0.00000      0.00000     -0.00000      2.64968      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.27897      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.34200     -0.00000     -0.00000      0.00000     -0.03314     36.62686 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00931     -0.00000     -0.00000      1.12673     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.54936     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.15234     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00931     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.12673      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.54936     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.15234      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00931     -0.00000     -0.00000      1.12673     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.54936     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.15234      0.00000     -0.00000 \n     0.03600     -0.59211      0.00000     -0.00000      0.00000     -0.65665     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      2.00552     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.46402      0.00000      0.00000     -0.00000     57.51093    -14.35036 \n     0.00000      0.00000     -0.00000      0.00000      0.00537     -0.00000     -0.00000      0.06736      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.07582      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.36244      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00537      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.06736     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.07582      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.36244     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00537     -0.00000     -0.00000      0.06736      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.07582      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.36244     -0.00000      0.00000 \n     0.00051     -0.01484      0.00000     -0.00000      0.00000     -0.03147     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00954     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.04435     -0.00000     -0.00000      0.00000      0.57904     -0.23168 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00125      0.00000      0.00000     -0.01140      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.02304     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.04764     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00125      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.01140      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.02304     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.04764      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00125      0.00000      0.00000     -0.01140     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.02304     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.04764      0.00000     -0.00000 \n     0.03248     -0.84567      0.00000     -0.00000      0.00000     -0.69266     -0.00000     -0.00000     -0.00000      0.95285     -0.19827      0.00000     -0.00000      0.00000      0.31373     -0.00000     -0.00000      0.00000     -0.44658     -0.00147      0.00000      0.00000     -0.00000     -0.08146     -0.00000     -0.00000     -0.00000      0.15170    -16.55762 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.68573     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.77351     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.68573     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.77351      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.03248     -0.84567      0.00000     -0.00000      0.00000     -0.69266     -0.00000     -0.00000     -0.00000     -0.64813     -0.72606      0.00000     -0.00000      0.00000      0.31373     -0.00000     -0.00000      0.00000      0.22457     -0.38602     -0.00000     -0.00000      0.00000     -0.08146     -0.00000      0.00000      0.00000      0.15170    -16.55762 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.68573      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.77351     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.03248     -0.84567      0.00000     -0.00000      0.00000     -0.69266     -0.00000     -0.00000     -0.00000     -0.30472      0.92432      0.00000     -0.00000      0.00000      0.31373     -0.00000     -0.00000      0.00000      0.22202      0.38749     -0.00000     -0.00000      0.00000     -0.08146      0.00000     -0.00000     -0.00000      0.15170    -16.55762 \n    -0.01659      0.28642     -0.00000      0.00000     -0.00000      0.35331      0.00000      0.00000      0.00000      0.06752     -0.01405     -0.00000      0.00000     -0.00000     -0.42162      0.00000      0.00000     -0.00000      1.06860      0.00353     -0.00000     -0.00000      0.00000      0.06165      0.00000      0.00000      0.00000    -25.84949      6.68856 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.11945      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.85088     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.11945      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.85088     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.01659      0.28642     -0.00000      0.00000     -0.00000      0.35331      0.00000      0.00000      0.00000     -0.04593     -0.05145     -0.00000      0.00000     -0.00000     -0.42162      0.00000      0.00000     -0.00000     -0.53735      0.92367      0.00000      0.00000     -0.00000      0.06165      0.00000     -0.00000     -0.00000    -25.84949      6.68856 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.11945     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.85088      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.01659      0.28642     -0.00000      0.00000     -0.00000      0.35331      0.00000      0.00000      0.00000     -0.02159      0.06550     -0.00000      0.00000     -0.00000     -0.42162      0.00000      0.00000     -0.00000     -0.53124     -0.92720      0.00000      0.00000     -0.00000      0.06165     -0.00000      0.00000      0.00000    -25.84949      6.68856 \n   </betavectors>\n</atomicguess>\n"
  },
  {
    "path": "src/madness/chem/sto-6g",
    "content": "<?xml version=\"1.0\" ?>\n<name>\n   6-31G\n</name>\n<basis symbol=\"H\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      35.52322122\n      6.51314372\n      1.82214290\n      0.62595527\n      0.24307675\n      0.10011243\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"He\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      65.98456824\n      12.09819836\n      3.38463992\n      1.16271516\n      0.45151632\n      0.18595936\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Li\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      167.17584620\n      30.65150840\n      8.57518748\n      2.94580834\n      1.14394358\n      0.47113914\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      6.59756398\n      1.30583009\n      0.40585102\n      0.15614552\n      0.06781410\n      0.03108417\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Be\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      312.87049370\n      57.36446253\n      16.04850940\n      5.51309612\n      2.14089655\n      0.88173943\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      13.63324744\n      2.69837546\n      0.83865308\n      0.32266007\n      0.14013149\n      0.06423251\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"B\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      506.01114720\n      92.77681421\n      25.95565814\n      8.91644514\n      3.46250661\n      1.42605431\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      23.19457500\n      4.59081000\n      1.42681950\n      0.54894825\n      0.23841000\n      0.10928025\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"C\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      742.73704910\n      136.18002490\n      38.09826352\n      13.08778177\n      5.08236865\n      2.09320008\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      30.49723950\n      6.03619960\n      1.87604634\n      0.72178265\n      0.31347070\n      0.14368655\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"N\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      1027.82845800\n      188.45122260\n      52.72186097\n      18.11138217\n      7.03317969\n      2.89665179\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      39.19880787\n      7.75846707\n      2.41132578\n      0.92772394\n      0.40291114\n      0.18468366\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"O\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      1355.58423400\n      248.54488550\n      69.53390229\n      23.88677211\n      9.27593261\n      3.82034130\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      52.18776196\n      10.32932006\n      3.21034498\n      1.23513543\n      0.53642016\n      0.24588061\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"F\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      1728.62657400\n      316.94179000\n      88.66889139\n      30.46015731\n      11.82857044\n      4.87165852\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      67.03228091\n      13.26743777\n      4.12350977\n      1.58646284\n      0.68900189\n      0.31581998\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ne\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      2146.95547500\n      393.64193620\n      110.12682830\n      37.83153777\n      14.69109318\n      6.05060347\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      85.50442919\n      16.92355799\n      5.25982921\n      2.02364589\n      0.87887079\n      0.40285078\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Na\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      2600.75677100\n      476.84590710\n      133.40430100\n      45.82797788\n      17.79634487\n      7.32951760\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      124.84240440\n      24.70956992\n      7.67971591\n      2.95466352\n      1.28321238\n      0.58819012\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      9.43300605\n      2.52624376\n      0.94736825\n      0.42405944\n      0.20984541\n      0.10814709\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mg\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      2600.75677100\n      476.84590710\n      133.40430100\n      45.82797788\n      17.79634487\n      7.32951760\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      124.84240440\n      24.70956992\n      7.67971591\n      2.95466352\n      1.28321238\n      0.58819012\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      9.43300605\n      2.52624376\n      0.94736825\n      0.42405944\n      0.20984541\n      0.10814709\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Al\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      3644.58638800\n      668.23092480\n      186.94693210\n      64.22131675\n      24.93901660\n      10.27126426\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      195.96414410\n      38.78641831\n      12.05478990\n      4.63791218\n      2.01424842\n      0.92327743\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      8.90167754\n      2.38394921\n      0.89400628\n      0.40017365\n      0.19802554\n      0.10205554\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Si\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      4229.26173700\n      775.43051000\n      216.93751290\n      74.52389069\n      28.93980755\n      11.91901091\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      240.49048490\n      47.59934318\n      14.79384038\n      5.69172363\n      2.47191945\n      1.13306154\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      9.43300605\n      2.52624376\n      0.94736825\n      0.42405944\n      0.20984541\n      0.10814709\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"P\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      4857.41237100\n      890.60124100\n      249.15813310\n      85.59254335\n      33.23808927\n      13.68928069\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      290.66495900\n      57.53018103\n      17.88033738\n      6.87921028\n      2.98764571\n      1.36945662\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      11.11939652\n      2.97787427\n      1.11673449\n      0.49987089\n      0.24736063\n      0.12748115\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"S\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      5529.03828900\n      1013.74311800\n      283.60879270\n      97.42727471\n      37.83386178\n      15.58207360\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      345.58967910\n      68.40121655\n      21.25904712\n      8.17912170\n      3.55219813\n      1.62823230\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      12.94439442\n      3.46662510\n      1.30002125\n      0.58191341\n      0.28795929\n      0.14840430\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cl\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      6236.54552500\n      1143.46379500\n      319.89996350\n      109.89427140\n      42.67516141\n      17.57598814\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      403.97296600\n      79.95679269\n      24.85051157\n      9.56088753\n      4.15229997\n      1.90330288\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      13.58352871\n      3.63779101\n      1.36421028\n      0.61064560\n      0.30217739\n      0.15573182\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ar\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      6994.67381400\n      1282.46578700\n      358.78771170\n      123.25326240\n      47.86284856\n      19.71256419\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      468.29921480\n      92.68863609\n      28.80755901\n      11.08330631\n      4.81348748\n      2.20637349\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      16.72190907\n      4.47827746\n      1.67940163\n      0.75173104\n      0.37199338\n      0.19171257\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"K\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      8001.32141200\n      1467.03352200\n      410.42311280\n      140.99141630\n      54.75109279\n      22.54952356\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      543.34650510\n      107.54245340\n      33.42411435\n      12.85946155\n      5.58487291\n      2.55995588\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      23.29374963\n      6.23827540\n      2.33941956\n      1.04716720\n      0.51818968\n      0.26705711\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      2.79199603\n      0.89836813\n      0.38384184\n      0.19140816\n      0.10331373\n      0.05744848\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ca\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      8857.15704200\n      1623.95004800\n      454.32270210\n      156.07211000\n      60.60736746\n      24.96146087\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      617.56909990\n      122.23304190\n      37.98993832\n      14.61609860\n      6.34778158\n      2.90965274\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      27.90660509\n      7.47363953\n      2.80269423\n      1.25453746\n      0.62080665\n      0.31994236\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      2.52534396\n      0.81256868\n      0.34718268\n      0.17312755\n      0.09344666\n      0.05196181\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n</basis>\n<basis symbol=\"Sc\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      9765.96561200\n      1790.57910500\n      500.93950730\n      172.08624080\n      66.82612307\n      27.52268785\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      696.54194080\n      137.86382810\n      42.84797502\n      16.48516043\n      7.15951641\n      3.28173020\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      28.13541924\n      8.10156829\n      3.18654965\n      1.45636149\n      0.72478161\n      0.37222034\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      3.49528576\n      1.12466253\n      0.48052966\n      0.23962291\n      0.12933793\n      0.07191946\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      3.30391371\n      0.95135894\n      0.37419329\n      0.17101905\n      0.08511037\n      0.04370946\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ti\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      10719.15049000\n      1965.34450800\n      549.83256920\n      188.88232720\n      73.34853490\n      30.20897724\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      780.26502770\n      154.43481200\n      47.99822446\n      18.46664702\n      8.02007739\n      3.67618826\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      32.31173000\n      9.30413316\n      3.65954852\n      1.67253805\n      0.83236534\n      0.42747126\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      3.94584994\n      1.26963856\n      0.54247294\n      0.27051180\n      0.14601040\n      0.08119033\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      9.85713099\n      2.83835187\n      1.11639486\n      0.51023039\n      0.25392432\n      0.13040590\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"V\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      11727.11958000\n      2150.15453700\n      601.53575560\n      206.64376710\n      80.24582178\n      33.04966087\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      868.73836060\n      171.94599350\n      53.44068663\n      20.56055839\n      8.92946452\n      4.09302692\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      36.77692843\n      10.58988298\n      4.16526611\n      1.90366818\n      0.94739095\n      0.48654405\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      3.94584994\n      1.26963856\n      0.54247294\n      0.27051180\n      0.14601040\n      0.08119033\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      17.75512307\n      5.11257148\n      2.01090237\n      0.91905073\n      0.45738031\n      0.23489317\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cr\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      12780.37523000\n      2343.26780900\n      655.56188980\n      225.20320230\n      87.45299358\n      36.01797222\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      961.96193970\n      190.39737270\n      59.17536153\n      22.76689453\n      9.88767781\n      4.53224618\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      41.31830800\n      11.89756908\n      4.67961180\n      2.13874164\n      1.06437902\n      0.54662468\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      4.18137213\n      1.34542148\n      0.57485238\n      0.28665827\n      0.15472555\n      0.08603647\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      25.40054323\n      7.31406324\n      2.87680419\n      1.31479729\n      0.65432992\n      0.33603902\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Mn\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      13867.59465000\n      2542.60829900\n      711.33017550\n      244.36111360\n      94.89257116\n      39.08200111\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1057.84619300\n      209.37536870\n      65.07370854\n      25.03620123\n      10.87323925\n      4.98400110\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      46.12400067\n      13.28136390\n      5.22389295\n      2.38749662\n      1.18817592\n      0.61020207\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      3.71715449\n      1.19605224\n      0.51103204\n      0.25483335\n      0.13754786\n      0.07648466\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      32.49986195\n      9.35830559\n      3.68085589\n      1.68227625\n      0.83721171\n      0.42996017\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Fe\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      15010.96599000\n      2752.24418300\n      769.97874120\n      264.50847880\n      102.71638260\n      42.30427873\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1160.47130000\n      229.68755580\n      71.38672115\n      27.46504472\n      11.92808764\n      5.46751529\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      51.19400644\n      14.74126743\n      5.79810956\n      2.64993313\n      1.31878165\n      0.67727622\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      3.28024376\n      1.05546942\n      0.45096583\n      0.22488049\n      0.12138062\n      0.06749473\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      38.39775750\n      11.05659923\n      4.34883730\n      1.98756645\n      0.98914426\n      0.50798697\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Co\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      16150.71939000\n      2961.21672200\n      828.44172690\n      284.59209230\n      110.51543750\n      45.51636020\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1263.27784100\n      250.03565320\n      77.71089465\n      29.89818223\n      12.98480091\n      5.95188430\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      56.77707451\n      16.34890679\n      6.43043437\n      2.93892706\n      1.46260410\n      0.75113798\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      3.28024376\n      1.05546942\n      0.45096583\n      0.22488049\n      0.12138062\n      0.06749473\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      45.89982603\n      13.21681302\n      5.19850347\n      2.37589277\n      1.18240107\n      0.60723633\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ni\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      17420.87786000\n      3194.09888600\n      893.59376420\n      306.97357550\n      119.20682230\n      49.09595247\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1377.58785300\n      272.66058780\n      84.74270746\n      32.60357407\n      14.15975444\n      6.49045147\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      61.86673993\n      17.81447130\n      7.00687758\n      3.20238120\n      1.59371627\n      0.81847221\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      3.49528576\n      1.12466253\n      0.48052966\n      0.23962291\n      0.12933793\n      0.07191946\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      51.66802249\n      14.87775992\n      5.85179547\n      2.67446942\n      1.33099252\n      0.68354726\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Cu\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      18686.50813000\n      3426.15081100\n      958.51353050\n      329.27526740\n      127.86722190\n      52.66278326\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1494.36473600\n      295.77378040\n      91.92627051\n      35.36734970\n      15.36006408\n      7.04064120\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      67.71767076\n      19.49924150\n      7.66953988\n      3.50524040\n      1.74443900\n      0.89587769\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      3.49528576\n      1.12466253\n      0.48052966\n      0.23962291\n      0.12933793\n      0.07191946\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      57.77753235\n      16.63698771\n      6.54374381\n      2.99071333\n      1.48837636\n      0.76437363\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Zn\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      20010.11084000\n      3668.83191800\n      1026.40695900\n      352.59849250\n      136.92431270\n      56.39299342\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1615.89186400\n      319.82717070\n      99.40204628\n      38.24355010\n      16.60919987\n      7.61321153\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      73.54921499\n      21.17842933\n      8.33000650\n      3.80709609\n      1.89466232\n      0.97302668\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      4.92889906\n      1.58594989\n      0.67762191\n      0.33790575\n      0.18238669\n      0.10141768\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      65.55947787\n      18.87779182\n      7.42510816\n      3.39352679\n      1.68884294\n      0.86732566\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ga\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      21379.00011000\n      3919.81626800\n      1096.62333500\n      376.71971290\n      146.29128840\n      60.25083131\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1739.49000900\n      344.29046930\n      107.00522120\n      41.16876556\n      17.87962294\n      8.19553937\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      75.54658101\n      21.75356905\n      8.55622335\n      3.91048488\n      1.94611540\n      0.99945103\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      4.42372104\n      1.42340101\n      0.60817036\n      0.30327275\n      0.16369332\n      0.09102307\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      75.54658101\n      21.75356905\n      8.55622335\n      3.91048488\n      1.94611540\n      0.99945103\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Ge\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      22778.66493000\n      4176.44328000\n      1168.41832500\n      401.38322970\n      155.86885380\n      64.19540160\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      1870.41866600\n      370.20466750\n      115.05933470\n      44.26747332\n      19.22539383\n      8.81240463\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      85.01816438\n      24.48090284\n      9.62895201\n      4.40075834\n      2.19010784\n      1.12475629\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      5.46138400\n      1.75728520\n      0.75082760\n      0.37441080\n      0.20209052\n      0.11237416\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      85.01816438\n      24.48090284\n      9.62895201\n      4.40075834\n      2.19010784\n      1.12475629\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"As\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      24237.66988000\n      4443.95024100\n      1243.25713300\n      427.09238000\n      165.85246920\n      68.30720576\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      2003.22247500\n      396.49000700\n      123.22879870\n      47.41056057\n      20.59043876\n      9.43810460\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      95.04895563\n      27.36926003\n      10.76501521\n      4.91997783\n      2.44850573\n      1.25745965\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      6.13641106\n      1.97448565\n      0.84362989\n      0.42068797\n      0.22706891\n      0.12626361\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      95.04895563\n      27.36926003\n      10.76501521\n      4.91997783\n      2.44850573\n      1.25745965\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Se\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      25726.54013000\n      4716.93297100\n      1319.62786400\n      453.32778710\n      176.04044540\n      72.50317701\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      2137.61073000\n      423.08894990\n      131.49573030\n      50.59114713\n      21.97176968\n      10.07126962\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      105.63895480\n      30.41864061\n      11.96441294\n      5.46814336\n      2.72130908\n      1.39756110\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      6.72897123\n      2.16515110\n      0.92509469\n      0.46131155\n      0.24899573\n      0.13845620\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      105.63895480\n      30.41864061\n      11.96441294\n      5.46814336\n      2.72130908\n      1.39756110\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Br\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      27275.66077000\n      5000.96254400\n      1399.08910300\n      480.62486740\n      186.64070050\n      76.86894743\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      2279.42639800\n      451.15797170\n      140.21956130\n      53.94751939\n      23.42944444\n      10.73942862\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      116.78816180\n      33.62904459\n      13.22714520\n      6.04525492\n      3.00851789\n      1.54506064\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      7.73386588\n      2.48849157\n      1.06324696\n      0.53020313\n      0.28618039\n      0.15913305\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      116.78816180\n      33.62904459\n      13.22714520\n      6.04525492\n      3.00851789\n      1.54506064\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<basis symbol=\"Kr\">\n  <shell type=\"S\" nprim=\"6\">\n    <exponents>\n      28853.73644000\n      5290.30099100\n      1480.03557300\n      508.43216470\n      197.43908780\n      81.31631964\n    </exponents>\n    <coefficients>\n      0.00916360\n      0.04936149\n      0.16853830\n      0.37056280\n      0.41649153\n      0.13033408\n    </coefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      2425.79644800\n      480.12842440\n      149.22355640\n      57.41168085\n      24.93393212\n      11.42904540\n    </exponents>\n    <scoefficients>\n      -0.01325279\n      -0.04699171\n      -0.03378537\n      0.25024179\n      0.59511725\n      0.24070618\n    </scoefficients>\n    <pcoefficients>\n      0.00375970\n      0.03767937\n      0.17389674\n      0.41803643\n      0.42585955\n      0.10170830\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      128.49657660\n      37.00047197\n      14.55321200\n      6.65131252\n      3.31013215\n      1.69995829\n    </exponents>\n    <scoefficients>\n      -0.00794313\n      -0.07100264\n      -0.17850269\n      0.15106351\n      0.73549148\n      0.27605931\n    </scoefficients>\n    <pcoefficients>\n      -0.00713936\n      -0.01829277\n      0.07621621\n      0.41450986\n      0.48896215\n      0.10588165\n    </pcoefficients>\n  </shell>\n  <shell type=\"L\" nprim=\"6\">\n    <exponents>\n      8.80866625\n      2.83432530\n      1.21100984\n      0.60388718\n      0.32595180\n      0.18124828\n    </exponents>\n    <scoefficients>\n      0.00377506\n      -0.05585965\n      -0.31929460\n      -0.02764780\n      0.90491990\n      0.34062580\n    </scoefficients>\n    <pcoefficients>\n      -0.00705207\n      -0.05259505\n      -0.03773450\n      0.38747730\n      0.57916720\n      0.12218170\n    </pcoefficients>\n  </shell>\n  <shell type=\"D\" nprim=\"6\">\n    <exponents>\n      128.49657660\n      37.00047197\n      14.55321200\n      6.65131252\n      3.31013215\n      1.69995829\n    </exponents>\n    <coefficients>\n      0.00663343\n      0.05958178\n      0.24019496\n      0.46481147\n      0.34340923\n      0.05389057\n    </coefficients>\n  </shell>\n</basis>\n<atomicguess symbol=\"H\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     1.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000 \n   </betaocc>\n   <alphaeps>\n     0.10981 \n   </alphaeps>\n   <betaeps>\n    -0.16691 \n   </betaeps>\n   <alphavectors>\n     1.00000 \n   </alphavectors>\n   <betavectors>\n     1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"He\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000 \n   </betaocc>\n   <alphaeps>\n    -0.50758 \n   </alphaeps>\n   <betaeps>\n    -0.50758 \n   </betaeps>\n   <alphavectors>\n     1.00000 \n   </alphavectors>\n   <betavectors>\n     1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Li\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.03397     -0.20182      0.00000      0.00000      0.00000 \n    -0.20182      1.06116      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00001      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00001      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00001 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      0.88409      0.00001      0.00001      0.00001 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.11590      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -1.76015     -0.07711      0.00206      0.00206      0.00206 \n   </alphaeps>\n   <betaeps>\n    -1.74796     -0.04329      0.03563      0.03563      0.03563 \n   </betaeps>\n   <alphavectors>\n     0.98707      0.29075      0.00000      0.00000      0.00000 \n     0.04986     -1.02779      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -1.00000 \n   </alphavectors>\n   <betavectors>\n     0.98754     -0.28916      0.00000      0.00000      0.00000 \n     0.04820      1.02787      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Be\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.13881     -0.54490      0.00000      0.00000      0.00000 \n    -0.54490      2.13880      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -3.62880     -0.12674      0.01720      0.01720      0.01720 \n   </alphaeps>\n   <betaeps>\n    -3.62880     -0.12674      0.01720      0.01720      0.01720 \n   </betaeps>\n   <alphavectors>\n    -0.98925     -0.30131      0.00000      0.00000      0.00000 \n    -0.03934      1.03337      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </alphavectors>\n   <betavectors>\n     0.98925     -0.30131      0.00000      0.00000      0.00000 \n     0.03934      1.03337      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"B\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     0.33003      0.55060      0.00000      0.00000      0.00000 \n     0.55060      0.91860      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.99830      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00170 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      0.00170      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      0.99830      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -3.74408      4.05589      4.06335      4.23916     14.35114 \n   </alphaeps>\n   <betaeps>\n    -3.63113      4.15631      4.30276      4.31722     14.41639 \n   </betaeps>\n   <alphavectors>\n     0.40482     -0.00000     -0.00000     -0.00000      1.30660 \n     0.67899     -0.00000     -0.00000     -0.00000     -1.18746 \n    -0.00000      0.00000     -1.00000      0.00000     -0.00000 \n    -0.00000     -1.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -1.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.40762      0.00000      0.00000     -0.00000      1.30573 \n    -0.67644     -0.00000      0.00000     -0.00000     -1.18891 \n     0.00000     -0.00000      0.00000     -1.00000     -0.00000 \n    -0.00000     -1.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -1.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"C\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.12575     -0.51705      0.00000      0.00000      0.00000 \n    -0.51705      2.12577      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.66666      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.66666      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.66667 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      0.66667      0.66666      0.66666 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n    -9.62613     -0.40533     -0.07598     -0.07598     -0.07598 \n   </alphaeps>\n   <betaeps>\n    -9.59468     -0.29612      0.03764      0.03764      0.03764 \n   </betaeps>\n   <alphavectors>\n    -0.99351     -0.27534      0.00000      0.00000      0.00000 \n    -0.02542      1.03065      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99408      0.27327      0.00000     -0.00000     -0.00000 \n    -0.02327     -1.03070     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      1.00000 \n    -0.00000      0.00000     -0.00000      1.00000     -0.00000 \n     0.00000     -0.00000      1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"N\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.11113     -0.48432      0.00000      0.00000      0.00000 \n    -0.48432      2.11110      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -13.82711     -0.62464     -0.17469     -0.17469     -0.17469 \n   </alphaeps>\n   <betaeps>\n   -13.77909     -0.45397      0.00195      0.00195      0.00195 \n   </betaeps>\n   <alphavectors>\n    -0.99504     -0.25585      0.00000      0.00000      0.00000 \n    -0.02075      1.02719      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </alphavectors>\n   <betavectors>\n     0.99558     -0.25374      0.00000      0.00000      0.00000 \n     0.01857      1.02723      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"O\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.11290     -0.48840      0.00000      0.00000      0.00000 \n    -0.48840      2.11290      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.33333      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.33333      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.33333 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.33333      0.33333      0.33333 \n   </betaocc>\n   <alphaeps>\n   -18.59408     -0.76859     -0.17650     -0.17650     -0.17650 \n   </alphaeps>\n   <betaeps>\n   -18.55865     -0.65261     -0.05630     -0.05630     -0.05630 \n   </betaeps>\n   <alphavectors>\n    -0.99571     -0.25498      0.00000      0.00000      0.00000 \n    -0.01792      1.02768      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n   </alphavectors>\n   <betavectors>\n     0.99598      0.25392     -0.00000      0.00000      0.00000 \n     0.01682     -1.02770     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"F\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.11426     -0.49153      0.00000      0.00000      0.00000 \n    -0.49153      2.11428      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.66666      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.66666      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.66668 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      0.66668      0.66666      0.66666 \n   </betaocc>\n   <alphaeps>\n   -24.06239     -0.92255     -0.16909     -0.16909     -0.16909 \n   </alphaeps>\n   <betaeps>\n   -24.04296     -0.86264     -0.10692     -0.10692     -0.10692 \n   </betaeps>\n   <alphavectors>\n    -0.99621      0.25435      0.00000     -0.00000      0.00000 \n    -0.01578     -1.02805      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      1.00000 \n     0.00000     -0.00000      0.00000     -1.00000      0.00000 \n     0.00000     -0.00000      1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99632      0.25392      0.00000      0.00000      0.00000 \n     0.01534     -1.02806      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -1.00000 \n     0.00000     -0.00000     -0.00000     -1.00000      0.00000 \n     0.00000     -0.00000      1.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ne\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.11950     -0.50327      0.00000      0.00000      0.00000 \n    -0.50327      2.11950      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.00000 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000 \n   </betaocc>\n   <alphaeps>\n   -30.11919     -1.04733     -0.11287     -0.11287     -0.11287 \n   </alphaeps>\n   <betaeps>\n   -30.11919     -1.04733     -0.11287     -0.11287     -0.11287 \n   </betaeps>\n   <alphavectors>\n    -0.99646     -0.25849      0.00000      0.00000      0.00000 \n    -0.01449      1.02934      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99646     -0.25849      0.00000      0.00000      0.00000 \n     0.01449      1.02934      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.00000 \n     0.00000      0.00000      0.00000      1.00000      0.00000 \n     0.00000      0.00000      1.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Na\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.17182     -0.63708      0.00000      0.00000      0.00000      0.11803      0.00000      0.00000      0.00000 \n    -0.63708      2.36911      0.00000      0.00000      0.00000     -0.53498      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.58858      0.00000      0.00000      0.00000      0.36042      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.58858      0.00000      0.00000      0.00000      0.36042      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.58858      0.00000      0.00000      0.00000      0.36042 \n     0.11803     -0.53498      0.00000      0.00000      0.00000      1.29365      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.36042      0.00000      0.00000      0.00000      0.08181      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.36042      0.00000      0.00000      0.00000      0.08181      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.36042      0.00000      0.00000      0.00000      0.08181 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.94444      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      0.05556      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -37.81061     -1.88727     -0.84006     -0.84006     -0.84006      0.24638      0.51692      0.51692      0.51692 \n   </alphaeps>\n   <betaeps>\n   -37.79634     -1.87423     -0.82574     -0.82574     -0.82574      0.29144      0.56007      0.56007      0.56007 \n   </betaeps>\n   <alphavectors>\n     0.99547      0.28561     -0.00000      0.00000     -0.00000     -0.16274      0.00000     -0.00000     -0.00000 \n     0.01649     -0.98803      0.00000     -0.00000      0.00000      0.64216     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.88880     -0.00000      0.00000      0.68880      0.00000      0.00000 \n     0.00000      0.00000      0.88880      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.68880 \n    -0.00000      0.00000     -0.00000      0.00000     -0.88880      0.00000     -0.00000      0.68880      0.00000 \n    -0.00538     -0.09791      0.00000     -0.00000      0.00000     -1.12919      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.20613      0.00000     -0.00000     -1.10540     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.20613     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.10540 \n     0.00000     -0.00000      0.00000     -0.00000     -0.20613     -0.00000     -0.00000     -1.10540     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99546      0.28615      0.00000      0.00000     -0.00000     -0.16184     -0.00000     -0.00000      0.00000 \n     0.01652     -0.99006     -0.00000     -0.00000      0.00000      0.63902     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.89365     -0.00000      0.00000     -0.00000     -0.68249      0.00000 \n    -0.00000     -0.00000     -0.89365     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.68249 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.89365      0.00000      0.68249     -0.00000      0.00000 \n    -0.00539     -0.09433     -0.00000     -0.00000      0.00000     -1.12949      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.19830      0.00000     -0.00000      0.00000      1.10683      0.00000 \n     0.00000      0.00000     -0.19830      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.10683 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.19830     -0.00000     -1.10683      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mg\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.19803     -0.74056      0.00000      0.00000      0.00000      0.30087      0.00000      0.00000      0.00000 \n    -0.74056      2.77767      0.00000      0.00000      0.00000     -1.25694      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.97150      0.00000      0.00000      0.00000      0.03064      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.97150      0.00000      0.00000      0.00000      0.03064      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.97150      0.00000      0.00000      0.00000      0.03064 \n     0.30087     -1.25694      0.00000      0.00000      0.00000      2.56938      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.03064      0.00000      0.00000      0.00000      0.00048      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.03064      0.00000      0.00000      0.00000      0.00048      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03064      0.00000      0.00000      0.00000      0.00048 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -46.85797     -2.82790     -1.50931     -1.50931     -1.50931      0.04248      0.32592      0.32592      0.32592 \n   </alphaeps>\n   <betaeps>\n   -46.85797     -2.82790     -1.50931     -1.50931     -1.50931      0.04248      0.32592      0.32592      0.32592 \n   </betaeps>\n   <alphavectors>\n     1.00867     -0.26469      0.00000     -0.00000      0.00000      0.10741      0.00000     -0.00000     -0.00000 \n    -0.03396      1.06650      0.00000      0.00000     -0.00000     -0.50026     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.99285      0.00000     -0.00000      0.52787     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.99285      0.00000     -0.00000      0.00000      0.52787 \n     0.00000      0.00000      0.99285     -0.00000     -0.00000      0.00000      0.00000      0.52787     -0.00000 \n     0.01341     -0.05793     -0.00000      0.00000      0.00000      1.13188      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.01543      0.00000     -0.00000     -1.12435      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.01543      0.00000     -0.00000     -0.00000     -1.12435 \n    -0.00000     -0.00000      0.01543      0.00000      0.00000     -0.00000     -0.00000     -1.12435     -0.00000 \n   </alphavectors>\n   <betavectors>\n     1.00867      0.26469     -0.00000      0.00000     -0.00000      0.10741      0.00000      0.00000      0.00000 \n    -0.03396     -1.06650      0.00000     -0.00000     -0.00000     -0.50026     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.99285     -0.00000      0.00000     -0.52787     -0.00000      0.00000 \n     0.00000      0.00000      0.99285     -0.00000      0.00000     -0.00000     -0.00000      0.52787     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.99285      0.00000      0.00000      0.00000     -0.52787 \n     0.01341      0.05793      0.00000      0.00000      0.00000      1.13188      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.01543      0.00000     -0.00000      1.12435     -0.00000      0.00000 \n     0.00000      0.00000      0.01543     -0.00000      0.00000     -0.00000     -0.00000     -1.12435     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.01543     -0.00000     -0.00000      0.00000      1.12435 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Sc\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.33514     -0.93221      0.00000      0.00000      0.00000      0.27455      0.00000      0.00000      0.00000     -0.07330      0.00000      0.00000     -0.07330      0.00000     -0.07330      0.08735      0.00000      0.00000      0.00000 \n    -0.93221      2.59867      0.00000      0.00000      0.00000     -0.87887      0.00000      0.00000      0.00000      0.21007      0.00000      0.00000      0.21007      0.00000      0.21007     -0.21725      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.18722      0.00000      0.00000      0.00000     -0.62134      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06962      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.18722      0.00000      0.00000      0.00000     -0.62134      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06962      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.18722      0.00000      0.00000      0.00000     -0.62134      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.06962 \n     0.27455     -0.87887      0.00000      0.00000      0.00000      2.62697      0.00000      0.00000      0.00000     -0.45305      0.00000      0.00000     -0.45305      0.00000     -0.45305      0.06970      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.62134      0.00000      0.00000      0.00000      2.06841      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13232      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.62134      0.00000      0.00000      0.00000      2.06841      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13232      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.62134      0.00000      0.00000      0.00000      2.06841      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13232 \n    -0.07330      0.21007      0.00000      0.00000      0.00000     -0.45305      0.00000      0.00000      0.00000      0.85106      0.00000      0.00000      0.58837      0.00000      0.58837     -0.26516      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.52540      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.52542      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.07330      0.21007      0.00000      0.00000      0.00000     -0.45305      0.00000      0.00000      0.00000      0.58837      0.00000      0.00000      0.85107      0.00000      0.58837     -0.26516      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.52540      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.07330      0.21007      0.00000      0.00000      0.00000     -0.45305      0.00000      0.00000      0.00000      0.58837      0.00000      0.00000      0.58837      0.00000      0.85106     -0.26516      0.00000      0.00000      0.00000 \n     0.08735     -0.21725      0.00000      0.00000      0.00000      0.06970      0.00000      0.00000      0.00000     -0.26516      0.00000      0.00000     -0.26516      0.00000     -0.26516      0.12577      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.06962      0.00000      0.00000      0.00000      0.13232      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06241      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.06962      0.00000      0.00000      0.00000      0.13232      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06241      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.06962      0.00000      0.00000      0.00000      0.13232      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06241 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.16584      0.16583      0.16583      0.16583      0.16583      0.04084      0.04084      0.04084      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00930      0.00930      0.00930      0.00930      0.00930      0.00060      0.00060      0.00060      0.00000 \n   </betaocc>\n   <alphaeps>\n  -160.39940    -16.88112    -14.38448    -14.38448    -14.38448     -2.08577     -1.40034     -1.40034     -1.40034     -0.18576     -0.00621     -0.00621     -0.00621     -0.00621     -0.00621      0.00468      0.00468      0.00468      0.15033 \n   </alphaeps>\n   <betaeps>\n  -160.39920    -16.88077    -14.38415    -14.38415    -14.38415     -2.08102     -1.39493     -1.39493     -1.39493     -0.16692      0.01334      0.01334      0.01334      0.01334      0.01334      0.02585      0.02585      0.02585      0.16246 \n   </betaeps>\n   <alphavectors>\n     0.99566     -0.39157     -0.00000      0.00000      0.00000      0.14447     -0.00000      0.00000      0.00000      0.04541     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.04584 \n     0.01189      1.04227      0.00000      0.00000      0.00000     -0.43947      0.00000      0.00000      0.00000     -0.14163      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.14239 \n     0.00000      0.00000     -0.00000     -0.98578      0.00000     -0.00000     -0.00000     -0.34797     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.16454      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.98578      0.00000     -0.00000      0.00000      0.34797     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.16454     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.98578      0.00000      0.00000     -0.00000      0.34797      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.16454      0.00000     -0.00000 \n    -0.00264      0.08267     -0.00000      0.00000      0.00000      1.05634     -0.00000     -0.00000     -0.00000      0.43903     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.25076 \n    -0.00000     -0.00000     -0.00000     -0.04459     -0.00000      0.00000      0.00000      1.01184      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.55581     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.04459      0.00000     -0.00000     -0.00000     -1.01184      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.55581     -0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.04459     -0.00000     -0.00000      0.00000     -1.01184     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.55581      0.00000      0.00000 \n    -0.00120      0.03235      0.00000      0.00000      0.00000      0.02068      0.00000     -0.00000     -0.00000     -0.55558     -0.00000      0.50000      0.00000     -0.00000     -0.86603      0.00000      0.00000      0.00000     -2.26945 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00120      0.03235      0.00000      0.00000      0.00000      0.02068      0.00000     -0.00000     -0.00000     -0.55558      0.00000     -1.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -2.26945 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00120      0.03235      0.00000      0.00000      0.00000      0.02068     -0.00000     -0.00000     -0.00000     -0.55558      0.00000      0.50000      0.00000     -0.00000      0.86603     -0.00000     -0.00000     -0.00000     -2.26945 \n     0.00352     -0.09594     -0.00000     -0.00000     -0.00000     -0.04599     -0.00000      0.00000      0.00000      0.16316     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      5.29754 \n     0.00000      0.00000      0.00000      0.01145      0.00000     -0.00000      0.00000      0.08025     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.09700      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.01145     -0.00000      0.00000      0.00000     -0.08025      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.09700      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.01145      0.00000     -0.00000      0.00000     -0.08025      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.09700      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99566      0.39158      0.00000     -0.00000      0.00000      0.14460     -0.00000     -0.00000      0.00000      0.04419      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.04658 \n    -0.01189     -1.04229     -0.00000      0.00000      0.00000     -0.43988      0.00000     -0.00000     -0.00000     -0.13786     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.14470 \n    -0.00000      0.00000     -0.00000      0.98579      0.00000     -0.00000      0.00000      0.34853      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.16330      0.00000 \n    -0.00000      0.00000     -0.98579     -0.00000     -0.00000      0.00000      0.34853     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.16330     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.98579     -0.00000      0.00000     -0.00000      0.34853      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.16330     -0.00000      0.00000 \n     0.00264     -0.08263      0.00000      0.00000      0.00000      1.05742     -0.00000      0.00000      0.00000      0.43192      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.25844 \n     0.00000     -0.00000      0.00000      0.04456     -0.00000      0.00000     -0.00000     -1.01381     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.55221     -0.00000 \n     0.00000     -0.00000     -0.04456     -0.00000     -0.00000     -0.00000     -1.01381      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.55221      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.04456      0.00000     -0.00000      0.00000     -1.01381     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.55221      0.00000     -0.00000 \n     0.00120     -0.03234     -0.00000      0.00000      0.00000      0.02301      0.00000      0.00000      0.00000     -0.60350      0.86603      0.00000     -0.00000      0.50000     -0.00000     -0.00000      0.00000      0.00000      2.25716 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00120     -0.03234     -0.00000      0.00000      0.00000      0.02301     -0.00000      0.00000      0.00000     -0.60350     -0.00000     -0.00000     -0.00000     -1.00000     -0.00000      0.00000     -0.00000     -0.00000      2.25716 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n     0.00120     -0.03234     -0.00000      0.00000      0.00000      0.02301     -0.00000      0.00000      0.00000     -0.60350     -0.86603     -0.00000      0.00000      0.50000      0.00000     -0.00000      0.00000      0.00000      2.25716 \n    -0.00352      0.09589      0.00000     -0.00000     -0.00000     -0.05331     -0.00000     -0.00000     -0.00000      0.27526     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -5.29283 \n    -0.00000      0.00000     -0.00000     -0.01144      0.00000     -0.00000     -0.00000     -0.07635      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.09728      0.00000 \n    -0.00000      0.00000      0.01144      0.00000      0.00000      0.00000     -0.07635      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.09728     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.01144     -0.00000     -0.00000      0.00000     -0.07635      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.09728     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ti\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.33960     -0.93170      0.00000      0.00000      0.00000      0.21039      0.00000      0.00000      0.00000      0.07848      0.00000      0.00000      0.07848      0.00000      0.07848     -0.19605      0.00000      0.00000      0.00000 \n    -0.93170      2.56408      0.00000      0.00000      0.00000     -0.72527      0.00000      0.00000      0.00000     -0.19159      0.00000      0.00000     -0.19159      0.00000     -0.19159      0.53793      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.19818      0.00000      0.00000      0.00000     -0.64059      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07126      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.19818      0.00000      0.00000      0.00000     -0.64059      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07126      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.19818      0.00000      0.00000      0.00000     -0.64059      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07126 \n     0.21039     -0.72527      0.00000      0.00000      0.00000      2.66978      0.00000      0.00000      0.00000     -0.02463      0.00000      0.00000     -0.02463      0.00000     -0.02463     -0.60962      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.64059      0.00000      0.00000      0.00000      2.07650      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14912      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.64059      0.00000      0.00000      0.00000      2.07650      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14912      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.64059      0.00000      0.00000      0.00000      2.07650      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.14912 \n     0.07848     -0.19159      0.00000      0.00000      0.00000     -0.02463      0.00000      0.00000      0.00000      0.47979      0.00000      0.00000     -0.12012      0.00000     -0.12012     -0.49491      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.20007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.20007      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07848     -0.19159      0.00000      0.00000      0.00000     -0.02463      0.00000      0.00000      0.00000     -0.12012      0.00000      0.00000      0.47982      0.00000     -0.12016     -0.49491      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.19995      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07848     -0.19159      0.00000      0.00000      0.00000     -0.02463      0.00000      0.00000      0.00000     -0.12012      0.00000      0.00000     -0.12016      0.00000      0.47982     -0.49491      0.00000      0.00000      0.00000 \n    -0.19605      0.53793      0.00000      0.00000      0.00000     -0.60962      0.00000      0.00000      0.00000     -0.49491      0.00000      0.00000     -0.49491      0.00000     -0.49491      3.71782      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07126      0.00000      0.00000      0.00000      0.14912      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01106      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07126      0.00000      0.00000      0.00000      0.14912      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01106      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07126      0.00000      0.00000      0.00000      0.14912      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01106 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.40002      0.40002      0.39998      0.39998      0.39994      0.00001      0.00001      0.00001      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00001      0.00001      0.00001      0.00001      0.00001      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -177.58690    -19.11435    -16.46462    -16.46462    -16.46462     -2.24975     -1.49913     -1.49913     -1.49913     -0.10649      0.03312      0.03312      0.03312      0.03312      0.03312      0.08878      0.08878      0.08878      0.95152 \n   </alphaeps>\n   <betaeps>\n  -177.58700    -19.11190    -16.46293    -16.46293    -16.46293     -2.20968     -1.45729     -1.45729     -1.45729     -0.07564      0.09135      0.09135      0.09135      0.09136      0.09136      0.12244      0.12244      0.12244      0.99158 \n   </betaeps>\n   <alphavectors>\n    -0.99580      0.39140      0.00000      0.00000     -0.00000      0.15127     -0.00000     -0.00000     -0.00000     -0.04581      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.13234 \n    -0.01148     -1.02648     -0.00000     -0.00000     -0.00000     -0.45672      0.00000      0.00000     -0.00000      0.14012     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.42677 \n    -0.00000     -0.00000     -0.98718     -0.00000     -0.00000      0.00000      0.35249     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.16316      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.98718      0.00000     -0.00000      0.00000     -0.35249      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.16316      0.00000 \n    -0.00000      0.00000      0.00000      0.98718      0.00000     -0.00000     -0.00000     -0.35249     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.16316     -0.00000      0.00000 \n     0.00559     -0.17797     -0.00000     -0.00000     -0.00000      1.09650     -0.00000      0.00000     -0.00000     -0.31640      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      2.06757 \n     0.00000      0.00000     -0.03956      0.00000      0.00000     -0.00000     -1.01676      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.54571     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.03956     -0.00000      0.00000     -0.00000      1.01676     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.54571     -0.00000 \n     0.00000     -0.00000     -0.00000      0.03956     -0.00000      0.00000      0.00000      1.01676      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.54571      0.00000     -0.00000 \n    -0.00299      0.08976      0.00000      0.00000      0.00000     -0.03741      0.00000     -0.00000      0.00000     -0.15403      0.00000     -0.00000      0.00000      0.00000     -1.00000     -0.00000      0.00000      0.00000     -1.88627 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00299      0.08976      0.00000      0.00000      0.00000     -0.03741     -0.00000     -0.00000      0.00000     -0.15403      0.00000     -0.00000      0.00000      0.86603      0.50000      0.00000     -0.00000     -0.00000     -1.88627 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00299      0.08976      0.00000      0.00000      0.00000     -0.03741      0.00000     -0.00000     -0.00000     -0.15403      0.00000     -0.00000     -0.00000     -0.86603      0.50000      0.00000     -0.00000     -0.00000     -1.88627 \n     0.00380     -0.11358     -0.00000     -0.00000     -0.00000      0.06158      0.00000      0.00000     -0.00000      1.32964     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      2.79201 \n    -0.00000     -0.00000      0.00981     -0.00000     -0.00000      0.00000     -0.07647      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.09403     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00981      0.00000      0.00000     -0.00000      0.07647      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.09403      0.00000 \n    -0.00000      0.00000      0.00000     -0.00981      0.00000     -0.00000      0.00000      0.07647     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.09403     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99580      0.39146     -0.00000     -0.00000      0.00000     -0.15205      0.00000      0.00000     -0.00000     -0.04273      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.13231 \n     0.01148     -1.02666      0.00000     -0.00000     -0.00000      0.45926     -0.00000     -0.00000      0.00000      0.13030      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.42672 \n    -0.00000      0.00000     -0.98728      0.00000      0.00000     -0.00000      0.35310      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.16126     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.98728     -0.00000     -0.00000     -0.00000      0.35310      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.16126     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.98728     -0.00000      0.00000     -0.00000      0.35310      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.16126     -0.00000      0.00000 \n    -0.00559     -0.17741     -0.00000      0.00000      0.00000     -1.10893      0.00000      0.00000     -0.00000     -0.27280     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -2.06720 \n     0.00000     -0.00000     -0.03928      0.00000      0.00000      0.00000     -1.01960     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.54040      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.03928      0.00000      0.00000      0.00000     -1.01960     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.54040      0.00000 \n     0.00000     -0.00000     -0.00000     -0.03928      0.00000     -0.00000      0.00000     -1.01960     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.54040      0.00000     -0.00000 \n     0.00299      0.08952     -0.00000      0.00000      0.00000      0.04734      0.00000     -0.00000      0.00000     -0.19077      1.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.88270 \n    -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00299      0.08952     -0.00000      0.00000      0.00000      0.04734     -0.00000     -0.00000      0.00000     -0.19077     -0.50000      0.86603      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.88270 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00299      0.08952      0.00000     -0.00000     -0.00000      0.04734      0.00000      0.00000      0.00000     -0.19077     -0.50000     -0.86603     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.88270 \n    -0.00380     -0.11333      0.00000     -0.00000     -0.00000     -0.07278     -0.00000     -0.00000     -0.00000      1.38384     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -2.76529 \n    -0.00000      0.00000      0.00976     -0.00000     -0.00000     -0.00000     -0.07076     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.09442      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00976     -0.00000      0.00000      0.00000     -0.07076      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.09442     -0.00000 \n    -0.00000      0.00000      0.00000      0.00976     -0.00000      0.00000      0.00000     -0.07076      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.09442      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"V\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.34586     -0.93716      0.00000      0.00000      0.00000      0.15683      0.00000      0.00000      0.00000      0.07927      0.00000      0.00000      0.07927      0.00000      0.07927     -0.13936      0.00000      0.00000      0.00000 \n    -0.93716      2.54815      0.00000      0.00000      0.00000     -0.58816      0.00000      0.00000      0.00000     -0.19238      0.00000      0.00000     -0.19238      0.00000     -0.19238      0.39280      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.20786      0.00000      0.00000      0.00000     -0.65667      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07576      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.20786      0.00000      0.00000      0.00000     -0.65667      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07576      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.20786      0.00000      0.00000      0.00000     -0.65667      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07576 \n     0.15683     -0.58816      0.00000      0.00000      0.00000      2.60688      0.00000      0.00000      0.00000     -0.02822      0.00000      0.00000     -0.02822      0.00000     -0.02822     -0.54431      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.65667      0.00000      0.00000      0.00000      2.07838      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17271      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.65667      0.00000      0.00000      0.00000      2.07838      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17271      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.65667      0.00000      0.00000      0.00000      2.07838      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.17271 \n     0.07927     -0.19238      0.00000      0.00000      0.00000     -0.02822      0.00000      0.00000      0.00000      0.63189      0.00000      0.00000     -0.26717      0.00000     -0.26716     -0.21251      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.79811      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.79814      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07927     -0.19238      0.00000      0.00000      0.00000     -0.02822      0.00000      0.00000      0.00000     -0.26717      0.00000      0.00000      0.63189      0.00000     -0.26716     -0.21251      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.79814      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.07927     -0.19238      0.00000      0.00000      0.00000     -0.02822      0.00000      0.00000      0.00000     -0.26716      0.00000      0.00000     -0.26716      0.00000      0.63188     -0.21251      0.00000      0.00000      0.00000 \n    -0.13936      0.39280      0.00000      0.00000      0.00000     -0.54431      0.00000      0.00000      0.00000     -0.21251      0.00000      0.00000     -0.21251      0.00000     -0.21251      2.63497      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07576      0.00000      0.00000      0.00000      0.17271      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01587      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07576      0.00000      0.00000      0.00000      0.17271      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01587      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07576      0.00000      0.00000      0.00000      0.17271      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.01587 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.59938      0.59938      0.59937      0.59937      0.59936      0.00105      0.00105      0.00105      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -195.48250    -21.30983    -18.53293    -18.53293    -18.53293     -2.38815     -1.57632     -1.57632     -1.57632     -0.08192      0.06532      0.06532      0.06532      0.06532      0.06532      0.11238      0.11238      0.11238      1.42341 \n   </alphaeps>\n   <betaeps>\n  -195.48240    -21.29735    -18.52376    -18.52376    -18.52376     -2.29231     -1.47989     -1.47989     -1.47989     -0.05554      0.14239      0.14239      0.14239      0.16567      0.16567      0.16567      0.16568      0.16568      1.48988 \n   </betaeps>\n   <alphavectors>\n    -0.99592     -0.39400      0.00000     -0.00000     -0.00000     -0.15397      0.00000     -0.00000     -0.00000      0.04609     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.15654 \n    -0.01107      1.02081     -0.00000      0.00000      0.00000      0.46084     -0.00000      0.00000      0.00000     -0.13970      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.50914 \n    -0.00000     -0.00000      0.00000     -0.98827      0.00000      0.00000     -0.00000      0.35684     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.15128      0.00000     -0.00000 \n     0.00000      0.00000     -0.98827      0.00000     -0.00000     -0.00000     -0.35684      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.15128     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.98827      0.00000     -0.00000     -0.00000     -0.35684      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.15128      0.00000 \n     0.00708      0.23873     -0.00000      0.00000     -0.00000     -1.07469      0.00000      0.00000     -0.00000      0.30431     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      2.90705 \n     0.00000      0.00000     -0.00000     -0.03551     -0.00000     -0.00000      0.00000     -1.01935      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.49216     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.03551     -0.00000      0.00000      0.00000      1.01935     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.49216      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.03551     -0.00000     -0.00000     -0.00000      1.01935     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.49216      0.00000 \n    -0.00279     -0.09004      0.00000     -0.00000     -0.00000      0.01166     -0.00000     -0.00000     -0.00000      0.07250     -0.00000     -0.00000     -0.86603      0.00000      0.50000     -0.00000      0.00000      0.00000     -1.63540 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00279     -0.09004      0.00000     -0.00000      0.00000      0.01166     -0.00000     -0.00000      0.00000      0.07250     -0.00000     -0.00000      0.86603     -0.00000      0.50000     -0.00000      0.00000      0.00000     -1.63540 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00279     -0.09004      0.00000     -0.00000     -0.00000      0.01166     -0.00000     -0.00000      0.00000      0.07250     -0.00000     -0.00000     -0.00000     -0.00000     -1.00000     -0.00000      0.00000      0.00000     -1.63540 \n     0.00171      0.05466     -0.00000      0.00000      0.00000     -0.02656      0.00000      0.00000      0.00000     -1.13376      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.31969 \n    -0.00000     -0.00000      0.00000      0.00774      0.00000      0.00000     -0.00000     -0.08395     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.07003      0.00000     -0.00000 \n     0.00000      0.00000      0.00774      0.00000     -0.00000     -0.00000      0.08395      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.07003     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.00774      0.00000      0.00000      0.00000      0.08395      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.07003     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99592      0.39420     -0.00000      0.00000      0.00000     -0.15436     -0.00000      0.00000      0.00000      0.04313      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.15650 \n    -0.01107     -1.02143      0.00000     -0.00000     -0.00000      0.46230      0.00000     -0.00000     -0.00000     -0.13010     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.50912 \n    -0.00000      0.00000     -0.98856      0.00000      0.00000      0.00000      0.00000     -0.35577      0.00000     -0.00000      0.00000     -0.15197     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.98856     -0.00000     -0.00000      0.35577     -0.00000     -0.00000      0.00000      0.15197     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.98856     -0.00000     -0.00000     -0.00000     -0.35577      0.00000     -0.00000     -0.00000      0.15197      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00708     -0.23652      0.00000     -0.00000      0.00000     -1.08799     -0.00000      0.00000      0.00000      0.25012     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      2.90745 \n    -0.00000     -0.00000     -0.03468     -0.00000     -0.00000     -0.00000     -0.00000      1.01813     -0.00000      0.00000     -0.00000      0.49474      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.03468      0.00000      0.00000     -1.01813      0.00000      0.00000     -0.00000     -0.49474     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.03468     -0.00000     -0.00000     -0.00000      1.01813     -0.00000      0.00000      0.00000     -0.49474     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00279      0.08931     -0.00000      0.00000     -0.00000      0.01922      0.00000     -0.00000     -0.00000      0.10324      0.00000      0.00000      0.00000     -0.50000      0.00000      0.86603      0.00000      0.00000     -1.63371 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000 \n    -0.00279      0.08931     -0.00000      0.00000      0.00000      0.01922      0.00000     -0.00000      0.00000      0.10324      0.00000      0.00000     -0.00000     -0.50000     -0.00000     -0.86603      0.00000      0.00000     -1.63371 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.73205     -0.00000 \n    -0.00279      0.08931     -0.00000      0.00000      0.00000      0.01922      0.00000     -0.00000      0.00000      0.10324      0.00000      0.00000      0.00000      1.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.63371 \n     0.00170     -0.05431      0.00000     -0.00000      0.00000     -0.03306     -0.00000      0.00000     -0.00000     -1.15837     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.29801 \n     0.00000      0.00000      0.00758      0.00000      0.00000      0.00000      0.00000      0.08665      0.00000     -0.00000      0.00000     -1.06981     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00758      0.00000     -0.00000     -0.08665     -0.00000     -0.00000      0.00000      1.06981      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00758      0.00000      0.00000      0.00000      0.08665     -0.00000      0.00000      0.00000      1.06981     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cr\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.35121     -0.94023      0.00000      0.00000      0.00000      0.06640      0.00000      0.00000      0.00000      0.11472      0.00000      0.00000      0.11472      0.00000      0.11472     -0.12965      0.00000      0.00000      0.00000 \n    -0.94023      2.52680      0.00000      0.00000      0.00000     -0.35875      0.00000      0.00000      0.00000     -0.27948      0.00000      0.00000     -0.27948      0.00000     -0.27948      0.36571      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.21481      0.00000      0.00000      0.00000     -0.66892      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07251      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.21481      0.00000      0.00000      0.00000     -0.66892      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07251      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.21481      0.00000      0.00000      0.00000     -0.66892      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.07251 \n     0.06640     -0.35875      0.00000      0.00000      0.00000      2.51505      0.00000      0.00000      0.00000     -0.03183      0.00000      0.00000     -0.03183      0.00000     -0.03183     -0.45906      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.66892      0.00000      0.00000      0.00000      2.08623      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16623      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.66892      0.00000      0.00000      0.00000      2.08623      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16623      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.66892      0.00000      0.00000      0.00000      2.08623      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16623 \n     0.11472     -0.27948      0.00000      0.00000      0.00000     -0.03183      0.00000      0.00000      0.00000      0.81574      0.00000      0.00000     -0.33875      0.00000     -0.33875     -0.20034      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.30898      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.30898      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.11472     -0.27948      0.00000      0.00000      0.00000     -0.03183      0.00000      0.00000      0.00000     -0.33875      0.00000      0.00000      0.81574      0.00000     -0.33874     -0.20034      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.30898      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.11472     -0.27948      0.00000      0.00000      0.00000     -0.03183      0.00000      0.00000      0.00000     -0.33875      0.00000      0.00000     -0.33874      0.00000      0.81574     -0.20034      0.00000      0.00000      0.00000 \n    -0.12965      0.36571      0.00000      0.00000      0.00000     -0.45906      0.00000      0.00000      0.00000     -0.20034      0.00000      0.00000     -0.20034      0.00000     -0.20034      2.45782      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07251      0.00000      0.00000      0.00000      0.16623      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07485      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07251      0.00000      0.00000      0.00000      0.16623      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07485      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07251      0.00000      0.00000      0.00000      0.16623      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07485 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.76966      0.76966      0.76966      0.76966      0.76966      0.05054      0.05054      0.05054      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00003      0.00003      0.00003      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -214.25210    -23.62782    -20.72578    -20.72578    -20.72578     -2.56742     -1.69217     -1.69217     -1.69217     -0.07552      0.09590      0.09590      0.09590      0.09590      0.09590      0.12952      0.12952      0.12952      1.94789 \n   </alphaeps>\n   <betaeps>\n  -214.25120    -23.59871    -20.70407    -20.70407    -20.70407     -2.41872     -1.54372     -1.54372     -1.54372     -0.04699      0.16307      0.16307      0.16307      0.24106      0.24106      0.24106      0.24106      0.24106      2.04134 \n   </betaeps>\n   <alphavectors>\n    -0.99605      0.39634      0.00000     -0.00000      0.00000      0.15575      0.00000      0.00000     -0.00000     -0.04651      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.17675 \n    -0.01065     -1.01520     -0.00000      0.00000     -0.00000     -0.46212     -0.00000      0.00000      0.00000      0.13953     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.58231 \n    -0.00000      0.00000     -0.98908     -0.00000      0.00000      0.00000     -0.35929     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.14707     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.98908     -0.00000     -0.00000     -0.00000     -0.35929     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.14707      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.98908     -0.00000     -0.00000     -0.00000     -0.35929      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.14707     -0.00000 \n     0.00923     -0.33270     -0.00000      0.00000     -0.00000      1.04044     -0.00000      0.00000      0.00000     -0.27454      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -4.17119 \n     0.00000     -0.00000     -0.03270      0.00000     -0.00000     -0.00000      1.02060      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.47206      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.03270      0.00000      0.00000      0.00000      1.02060      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.47206     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.03270      0.00000      0.00000      0.00000      1.02060     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.47206      0.00000 \n    -0.00357      0.12502      0.00000     -0.00000      0.00000      0.00631      0.00000     -0.00000     -0.00000     -0.06926     -0.99423     -0.00000      0.00000      0.00000      0.10729      0.00000     -0.00000     -0.00000      2.05157 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00357      0.12502      0.00000     -0.00000      0.00000      0.00631      0.00000     -0.00000     -0.00000     -0.06926      0.59003     -0.00000      0.00000      0.00000      0.80738      0.00000     -0.00000     -0.00000      2.05157 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00357      0.12502      0.00000     -0.00000      0.00000      0.00631      0.00000     -0.00000     -0.00000     -0.06926      0.40420     -0.00000      0.00000      0.00000     -0.91467      0.00000     -0.00000     -0.00000      2.05157 \n     0.00126     -0.04355     -0.00000      0.00000     -0.00000      0.02152     -0.00000      0.00000      0.00000      1.09958      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.99990 \n    -0.00000      0.00000      0.00667     -0.00000      0.00000      0.00000      0.08862     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.06089     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00667     -0.00000     -0.00000     -0.00000      0.08862     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.06089     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00667     -0.00000     -0.00000     -0.00000      0.08862      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.06089     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99606     -0.39671      0.00000      0.00000     -0.00000      0.15527     -0.00000      0.00000     -0.00000     -0.04427     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.17690 \n    -0.01065      1.01636     -0.00000     -0.00000      0.00000     -0.46098      0.00000     -0.00000      0.00000      0.13203      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.58293 \n     0.00000     -0.00000     -0.98956     -0.00000      0.00000     -0.00000     -0.35654      0.00000     -0.00000     -0.00000      0.15053     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.98956      0.00000      0.00000     -0.00000      0.35654      0.00000      0.00000      0.00000      0.15053     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.98956     -0.00000      0.00000      0.00000      0.35654      0.00000      0.00000     -0.00000     -0.15053      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00922      0.32764     -0.00000     -0.00000      0.00000      1.04573     -0.00000     -0.00000      0.00000     -0.21307     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      4.17385 \n     0.00000     -0.00000     -0.03134      0.00000     -0.00000      0.00000      1.01552     -0.00000      0.00000      0.00000     -0.48298      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.03134     -0.00000     -0.00000      0.00000     -1.01552     -0.00000     -0.00000     -0.00000     -0.48298      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.03134      0.00000     -0.00000     -0.00000     -1.01552     -0.00000     -0.00000      0.00000      0.48298      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00357     -0.12329      0.00000      0.00000     -0.00000      0.00281     -0.00000      0.00000     -0.00000     -0.10189     -0.00000      0.00000     -0.00000     -0.99458      0.00000      0.00000     -0.10396     -0.00000     -2.05032 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000 \n    -0.00357     -0.12329      0.00000      0.00000     -0.00000      0.00281     -0.00000      0.00000     -0.00000     -0.10189     -0.00000      0.00000     -0.00000      0.58732      0.00000      0.00000     -0.80935     -0.00000     -2.05032 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000 \n    -0.00357     -0.12329      0.00000      0.00000     -0.00000      0.00281     -0.00000      0.00000     -0.00000     -0.10189     -0.00000      0.00000     -0.00000      0.40726      0.00000      0.00000      0.91331     -0.00000     -2.05032 \n     0.00126      0.04307     -0.00000     -0.00000      0.00000      0.02814     -0.00000     -0.00000      0.00000      1.11523      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.98227 \n    -0.00000      0.00000      0.00638     -0.00000      0.00000     -0.00000      0.09998      0.00000     -0.00000     -0.00000      1.05988      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00638      0.00000      0.00000     -0.00000     -0.09998      0.00000      0.00000      0.00000      1.05988      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00638     -0.00000      0.00000      0.00000     -0.09998      0.00000      0.00000     -0.00000     -1.05988     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Mn\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.35748     -0.94760      0.00000      0.00000      0.00000     -0.00392      0.00000      0.00000      0.00000      0.13888      0.00000      0.00000      0.13888      0.00000      0.13888     -0.11133      0.00000      0.00000      0.00000 \n    -0.94760      2.52206      0.00000      0.00000      0.00000     -0.18444      0.00000      0.00000      0.00000     -0.33593      0.00000      0.00000     -0.33593      0.00000     -0.33593      0.32022      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.22871      0.00000      0.00000      0.00000     -0.70095      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04914      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.22871      0.00000      0.00000      0.00000     -0.70095      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04914      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.22871      0.00000      0.00000      0.00000     -0.70095      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.04914 \n    -0.00392     -0.18444      0.00000      0.00000      0.00000      2.56653      0.00000      0.00000      0.00000     -0.07938      0.00000      0.00000     -0.07938      0.00000     -0.07938     -0.67924      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.70095      0.00000      0.00000      0.00000      2.14969      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10712      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.70095      0.00000      0.00000      0.00000      2.14969      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10712      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.70095      0.00000      0.00000      0.00000      2.14969      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.10712 \n     0.13888     -0.33593      0.00000      0.00000      0.00000     -0.07938      0.00000      0.00000      0.00000      0.94805      0.00000      0.00000     -0.39855      0.00000     -0.39855      0.02037      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.69318      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.69318      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.13888     -0.33593      0.00000      0.00000      0.00000     -0.07938      0.00000      0.00000      0.00000     -0.39855      0.00000      0.00000      0.94805      0.00000     -0.39856      0.02037      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.69318      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.13888     -0.33593      0.00000      0.00000      0.00000     -0.07938      0.00000      0.00000      0.00000     -0.39855      0.00000      0.00000     -0.39856      0.00000      0.94805      0.02037      0.00000      0.00000      0.00000 \n    -0.11133      0.32022      0.00000      0.00000      0.00000     -0.67924      0.00000      0.00000      0.00000      0.02037      0.00000      0.00000      0.02037      0.00000      0.02037      2.14333      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.04914      0.00000      0.00000      0.00000      0.10712      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.19712      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.04914      0.00000      0.00000      0.00000      0.10712      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.19712      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.04914      0.00000      0.00000      0.00000      0.10712      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.19712 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.89773      0.89773      0.89773      0.89773      0.89773      0.17028      0.17028      0.17028      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00017      0.00017      0.00017      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -234.02350    -26.20894    -23.17727    -23.17727    -23.17727     -2.89652     -1.95055     -1.95055     -1.95055     -0.14317      0.01115      0.01115      0.01115      0.01115      0.01115      0.04258      0.04258      0.04258      2.14388 \n   </alphaeps>\n   <betaeps>\n  -234.02200    -26.16170    -23.14178    -23.14178    -23.14178     -2.70500     -1.75827     -1.75827     -1.75827     -0.10826      0.07975      0.07975      0.07975      0.19853      0.19853      0.19853      0.19853      0.19853      2.26353 \n   </betaeps>\n   <alphavectors>\n     0.99635      0.39900      0.00000     -0.00000      0.00000      0.15761     -0.00000      0.00000      0.00000     -0.04540      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.18541 \n     0.00981     -1.01348     -0.00000      0.00000     -0.00000     -0.46453      0.00000     -0.00000     -0.00000      0.13743     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.61781 \n     0.00000      0.00000      0.99011     -0.00000      0.00000     -0.00000     -0.36522      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.11936     -0.00000 \n     0.00000      0.00000      0.00000      0.99011      0.00000      0.00000     -0.00000      0.36522      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.11936      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.99011      0.00000     -0.00000      0.00000      0.36522      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.11936      0.00000      0.00000 \n    -0.01026     -0.41374     -0.00000      0.00000     -0.00000      0.99698      0.00000     -0.00000     -0.00000     -0.39514      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      5.30681 \n     0.00000     -0.00000      0.02921      0.00000     -0.00000      0.00000      1.03323     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.37380      0.00000 \n     0.00000     -0.00000     -0.00000      0.02921     -0.00000     -0.00000      0.00000     -1.03323     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.37380     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.02921     -0.00000      0.00000     -0.00000     -1.03323     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.37380     -0.00000     -0.00000 \n     0.00394      0.15558      0.00000     -0.00000      0.00000      0.02769     -0.00000      0.00000      0.00000      0.03187      0.86746      0.49751     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -2.44833 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00394      0.15558      0.00000     -0.00000      0.00000      0.02769     -0.00000      0.00000      0.00000      0.03187     -0.86459      0.50249      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -2.44833 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00394      0.15558      0.00000     -0.00000      0.00000      0.02769     -0.00000      0.00000      0.00000      0.03187     -0.00287     -1.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -2.44833 \n    -0.00078     -0.03034     -0.00000      0.00000     -0.00000      0.01709      0.00000     -0.00000     -0.00000      1.02933      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.73079 \n     0.00000      0.00000     -0.00472     -0.00000      0.00000     -0.00000      0.07692      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.03564     -0.00000 \n     0.00000      0.00000      0.00000     -0.00472      0.00000      0.00000     -0.00000     -0.07692      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.03564      0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00472      0.00000     -0.00000      0.00000     -0.07692      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.03564      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99635      0.39950     -0.00000      0.00000     -0.00000      0.15637      0.00000     -0.00000      0.00000     -0.04352     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.18581 \n     0.00980     -1.01506      0.00000     -0.00000      0.00000     -0.46105     -0.00000      0.00000     -0.00000      0.13092      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.61924 \n     0.00000     -0.00000     -0.99071      0.00000     -0.00000     -0.00000      0.36204      0.00000      0.00000      0.00000      0.00000     -0.12402      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.99071      0.00000     -0.00000     -0.00000     -0.36204      0.00000     -0.00000      0.12402      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.99071      0.00000      0.00000     -0.00000     -0.36204     -0.00000     -0.00000     -0.00000      0.12402     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.01025     -0.40557      0.00000     -0.00000      0.00000      0.98776      0.00000     -0.00000     -0.00000     -0.32385     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      5.31399 \n    -0.00000     -0.00000     -0.02751     -0.00000      0.00000      0.00000     -1.02796      0.00000      0.00000     -0.00000     -0.00000      0.38817     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.02751     -0.00000      0.00000      0.00000      1.02796     -0.00000      0.00000     -0.38817     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.02751     -0.00000     -0.00000      0.00000      1.02796      0.00000      0.00000      0.00000     -0.38817      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00394      0.15270     -0.00000      0.00000     -0.00000      0.03102      0.00000     -0.00000      0.00000     -0.00416     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.84194     -0.53957     -2.44867 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00394      0.15270     -0.00000      0.00000     -0.00000      0.03102      0.00000     -0.00000      0.00000     -0.00416     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.88825     -0.45936     -2.44867 \n    -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000 \n     0.00394      0.15270     -0.00000      0.00000     -0.00000      0.03102      0.00000     -0.00000      0.00000     -0.00416     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.04631      0.99893     -2.44867 \n    -0.00078     -0.02989      0.00000     -0.00000      0.00000      0.02278      0.00000     -0.00000     -0.00000      1.03980      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.71568 \n     0.00000      0.00000      0.00442      0.00000     -0.00000     -0.00000     -0.09134      0.00000      0.00000      0.00000     -0.00000     -1.03447     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00442     -0.00000     -0.00000     -0.00000      0.09134      0.00000     -0.00000      1.03447     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00442      0.00000      0.00000     -0.00000      0.09134     -0.00000     -0.00000     -0.00000      1.03447     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Fe\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.36504     -0.95888      0.00000      0.00000      0.00000     -0.04048      0.00000      0.00000      0.00000      0.15250      0.00000      0.00000      0.15250      0.00000      0.15250     -0.10113      0.00000      0.00000      0.00000 \n    -0.95888      2.52944      0.00000      0.00000      0.00000     -0.10477      0.00000      0.00000      0.00000     -0.36231      0.00000      0.00000     -0.36231      0.00000     -0.36231      0.29714      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.24067      0.00000      0.00000      0.00000     -0.72871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02120      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.24067      0.00000      0.00000      0.00000     -0.72871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02120      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.24067      0.00000      0.00000      0.00000     -0.72871      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02120 \n    -0.04048     -0.10477      0.00000      0.00000      0.00000      2.90798      0.00000      0.00000      0.00000     -0.22993      0.00000      0.00000     -0.22993      0.00000     -0.22993     -1.03352      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.72871      0.00000      0.00000      0.00000      2.20708      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03364      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.72871      0.00000      0.00000      0.00000      2.20708      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03364      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.72871      0.00000      0.00000      0.00000      2.20708      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.03364 \n     0.15250     -0.36231      0.00000      0.00000      0.00000     -0.22993      0.00000      0.00000      0.00000      1.10173      0.00000      0.00000     -0.39829      0.00000     -0.39828      0.25576      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.15250     -0.36231      0.00000      0.00000      0.00000     -0.22993      0.00000      0.00000      0.00000     -0.39829      0.00000      0.00000      1.10173      0.00000     -0.39828      0.25576      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.15250     -0.36231      0.00000      0.00000      0.00000     -0.22993      0.00000      0.00000      0.00000     -0.39828      0.00000      0.00000     -0.39828      0.00000      1.10172      0.25576      0.00000      0.00000      0.00000 \n    -0.10113      0.29714      0.00000      0.00000      0.00000     -1.03352      0.00000      0.00000      0.00000      0.25576      0.00000      0.00000      0.25576      0.00000      0.25576      1.98342      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.02120      0.00000      0.00000      0.00000      0.03364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35506      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.02120      0.00000      0.00000      0.00000      0.03364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35506      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02120      0.00000      0.00000      0.00000      0.03364      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.35506 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33308      0.33308      0.33308      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00026      0.00026      0.00026      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -254.85190    -29.10773    -25.96900    -25.96900    -25.96900     -3.38845     -2.37220     -2.37220     -2.37220     -0.22975     -0.21331     -0.21331     -0.21331     -0.21331     -0.21331     -0.05704     -0.05704     -0.05704      2.15765 \n   </alphaeps>\n   <betaeps>\n  -254.85010    -29.04540    -25.92225    -25.92225    -25.92225     -3.16271     -2.14355     -2.14355     -2.14355     -0.18555     -0.01403     -0.01403     -0.01403      0.00971      0.00971      0.00971      0.00971      0.00971      2.30010 \n   </betaeps>\n   <alphavectors>\n    -0.99651     -0.40222      0.00000      0.00000     -0.00000      0.16074      0.00000      0.00000     -0.00000      0.04444     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.18916 \n    -0.00932      1.01284     -0.00000     -0.00000     -0.00000     -0.47050     -0.00000     -0.00000      0.00000     -0.13650      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.63323 \n    -0.00000      0.00000      0.00000     -0.00000      0.99084      0.00000      0.00000     -0.00000      0.37088     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.09162     -0.00000 \n    -0.00000      0.00000      0.00000      0.99084      0.00000     -0.00000      0.00000      0.37088     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.09162      0.00000      0.00000 \n     0.00000     -0.00000      0.99084     -0.00000     -0.00000     -0.00000      0.37088     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.09162      0.00000      0.00000     -0.00000 \n     0.01079      0.47248      0.00000     -0.00000     -0.00000      0.97868      0.00000      0.00000     -0.00000      0.58443     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      6.06730 \n     0.00000     -0.00000      0.00000     -0.00000      0.02681     -0.00000     -0.00000      0.00000     -1.04551      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.28220      0.00000 \n     0.00000     -0.00000      0.00000      0.02681     -0.00000      0.00000     -0.00000     -1.04551      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.28220      0.00000     -0.00000 \n    -0.00000      0.00000      0.02681     -0.00000     -0.00000      0.00000     -1.04551      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.28220     -0.00000     -0.00000      0.00000 \n    -0.00416     -0.17876     -0.00000      0.00000      0.00000      0.03734     -0.00000      0.00000     -0.00000     -0.15154      0.50000     -0.00000     -0.00000      0.86603      0.00000     -0.00000     -0.00000     -0.00000     -2.73638 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00416     -0.17876      0.00000      0.00000      0.00000      0.03734      0.00000      0.00000     -0.00000     -0.15154      0.50000     -0.00000     -0.00000     -0.86603      0.00000     -0.00000     -0.00000     -0.00000     -2.73638 \n     0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00416     -0.17876     -0.00000      0.00000      0.00000      0.03734     -0.00000      0.00000     -0.00000     -0.15154     -1.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -2.73638 \n     0.00054      0.02278     -0.00000     -0.00000     -0.00000      0.01254     -0.00000      0.00000     -0.00000     -0.99138      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.58714 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00337      0.00000     -0.00000      0.00000     -0.05619     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      1.02064     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00337      0.00000     -0.00000     -0.00000     -0.05619     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.02064     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00337      0.00000      0.00000     -0.00000     -0.05619      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.02064     -0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99651      0.40280      0.00000      0.00000      0.00000      0.15914     -0.00000     -0.00000      0.00000      0.04253     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.18971 \n     0.00931     -1.01467     -0.00000     -0.00000     -0.00000     -0.46584      0.00000      0.00000     -0.00000     -0.12985      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.63514 \n     0.00000      0.00000      0.00000      0.00000      0.99149     -0.00000     -0.00000     -0.00000     -0.36811     -0.00000     -0.00000      0.00000     -0.09562      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.99149     -0.00000     -0.00000     -0.00000      0.36811      0.00000     -0.00000     -0.00000     -0.09562     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.99149     -0.00000      0.00000      0.00000      0.36811      0.00000     -0.00000      0.00000      0.09562     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.01078     -0.46205      0.00000     -0.00000     -0.00000      0.95799     -0.00000     -0.00000      0.00000      0.50389     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -6.07862 \n    -0.00000     -0.00000      0.00000      0.00000      0.02495      0.00000      0.00000      0.00000      1.04216      0.00000      0.00000     -0.00000      0.29450     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.02495      0.00000      0.00000      0.00000     -1.04216     -0.00000      0.00000      0.00000      0.29450      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.02495     -0.00000      0.00000      0.00000     -1.04216     -0.00000      0.00000     -0.00000     -0.29450      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00415      0.17502     -0.00000      0.00000      0.00000      0.04605      0.00000      0.00000     -0.00000     -0.11233      0.00000      0.00000      0.00000      0.50000      0.00000      0.00000     -0.00000      0.86603      2.73838 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.73205     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000 \n     0.00415      0.17502     -0.00000      0.00000      0.00000      0.04605     -0.00000     -0.00000      0.00000     -0.11233      0.00000      0.00000      0.00000      0.50000      0.00000      0.00000      0.00000     -0.86603      2.73838 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000 \n     0.00415      0.17502      0.00000      0.00000      0.00000      0.04605      0.00000      0.00000     -0.00000     -0.11233      0.00000      0.00000      0.00000     -1.00000      0.00000      0.00000     -0.00000     -0.00000      2.73838 \n    -0.00054     -0.02239     -0.00000     -0.00000     -0.00000      0.01686      0.00000      0.00000     -0.00000     -0.99956      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.57302 \n    -0.00000      0.00000      0.00000      0.00000     -0.00311     -0.00000      0.00000      0.00000      0.06820     -0.00000      0.00000      0.00000     -1.01991     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.00311     -0.00000     -0.00000      0.00000     -0.06820      0.00000     -0.00000     -0.00000     -1.01991      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00311      0.00000     -0.00000     -0.00000     -0.06820     -0.00000      0.00000     -0.00000      1.01991      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Co\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.37130     -0.96624      0.00000      0.00000      0.00000     -0.16252      0.00000      0.00000      0.00000      0.20612      0.00000      0.00000      0.20604      0.00000      0.20612     -0.09567      0.00000      0.00000      0.00000 \n    -0.96624      2.52501      0.00000      0.00000      0.00000      0.20922      0.00000      0.00000      0.00000     -0.49801      0.00000      0.00000     -0.49777      0.00000     -0.49801      0.28527      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.25184      0.00000      0.00000      0.00000     -0.74974      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00552      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25166      0.00000      0.00000      0.00000     -0.74920      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00764      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25184      0.00000      0.00000      0.00000     -0.74974      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00552 \n    -0.16252      0.20922      0.00000      0.00000      0.00000      3.06266      0.00000      0.00000      0.00000     -0.37124      0.00000      0.00000     -0.37156      0.00000     -0.37124     -1.25237      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.74974      0.00000      0.00000      0.00000      2.23244      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00864      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.74920      0.00000      0.00000      0.00000      2.23080      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00220      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.74974      0.00000      0.00000      0.00000      2.23244      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00864 \n     0.20612     -0.49801      0.00000      0.00000      0.00000     -0.37124      0.00000      0.00000      0.00000      1.33559      0.00000      0.00000     -0.35098      0.00000     -0.40061      0.37169      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.24181      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.21581      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.20604     -0.49777      0.00000      0.00000      0.00000     -0.37156      0.00000      0.00000      0.00000     -0.35098      0.00000      0.00000      1.28554      0.00000     -0.35098      0.37150      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.24181      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.20612     -0.49801      0.00000      0.00000      0.00000     -0.37124      0.00000      0.00000      0.00000     -0.40061      0.00000      0.00000     -0.35098      0.00000      1.33559      0.37169      0.00000      0.00000      0.00000 \n    -0.09567      0.28527      0.00000      0.00000      0.00000     -1.25237      0.00000      0.00000      0.00000      0.37169      0.00000      0.00000      0.37150      0.00000      0.37169      1.96661      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00552      0.00000      0.00000      0.00000     -0.00864      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.53761      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00764      0.00000      0.00000      0.00000     -0.00220      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.51235      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00552      0.00000      0.00000      0.00000     -0.00864      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.53761 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.51333      0.51333      0.48914      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.15745      0.09111      0.08060      0.08060      0.07194      0.00094      0.00094      0.00063      0.00000 \n   </betaocc>\n   <alphaeps>\n  -276.39130    -31.93679    -28.65264    -28.65264    -28.65078     -3.71312     -2.62185     -2.62185     -2.61714     -0.28183     -0.27388     -0.27388     -0.26982     -0.26971     -0.26616     -0.09057     -0.09057     -0.08971      2.49827 \n   </alphaeps>\n   <betaeps>\n  -276.38940    -31.87219    -28.60375    -28.60375    -28.60236     -3.51216     -2.41590     -2.41590     -2.41364     -0.22036     -0.07588     -0.07123     -0.07028     -0.07028     -0.06943     -0.04613     -0.04613     -0.04447      2.62792 \n   </betaeps>\n   <alphavectors>\n    -0.99716     -0.40423     -0.00000      0.00000      0.00000     -0.16179      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00170      0.00000      0.04295     -0.00000     -0.00000     -0.00000      0.19669 \n    -0.00754      1.01182      0.00000     -0.00000     -0.00000      0.47132      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00529     -0.00000     -0.13303      0.00000      0.00000      0.00000     -0.67338 \n     0.00000     -0.00000     -0.99176      0.00000      0.00000      0.00000      0.37524      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.08369     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000      0.99177      0.00000      0.00000     -0.00000      0.37520      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.08375      0.00000 \n     0.00000     -0.00000     -0.00000      0.99176     -0.00000      0.00000     -0.00000     -0.37524     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.08369      0.00000     -0.00000 \n     0.01015      0.59564      0.00000     -0.00000     -0.00000     -0.88404      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.02872      0.00000      0.68948     -0.00000     -0.00000      0.00000      7.93067 \n    -0.00000      0.00000     -0.02380     -0.00000     -0.00000     -0.00000     -1.04956     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.25407      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.02377      0.00000      0.00000     -0.00000     -1.04952      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.25425      0.00000 \n    -0.00000      0.00000      0.00000      0.02380      0.00000     -0.00000      0.00000      1.04956      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.25407     -0.00000      0.00000 \n    -0.00400     -0.23231     -0.00000      0.00000      0.00000     -0.08069     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.49057     -0.86603     -0.22871      0.00000      0.00000      0.00000     -3.53223 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00400     -0.23236     -0.00000      0.00000      0.00000     -0.07921     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.00804     -0.00000     -0.16422      0.00000      0.00000     -0.00000     -3.53224 \n    -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00400     -0.23231     -0.00000      0.00000      0.00000     -0.08069     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.49057      0.86603     -0.22871     -0.00000      0.00000     -0.00000     -3.53223 \n     0.00033      0.01921      0.00000     -0.00000      0.00000     -0.01232      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.04254     -0.00000     -0.98809      0.00000      0.00000      0.00000      0.50984 \n     0.00000     -0.00000      0.00259      0.00000      0.00000      0.00000     -0.05452      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.01570     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00258     -0.00000     -0.00000      0.00000     -0.05469      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.01569     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00259     -0.00000      0.00000     -0.00000      0.05452     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.01570      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99716     -0.40475     -0.00000      0.00000     -0.00000     -0.16015      0.00000      0.00000     -0.00000     -0.04182      0.00000     -0.00007      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.19720 \n    -0.00753      1.01348      0.00000     -0.00000      0.00000      0.46637      0.00000     -0.00000      0.00000      0.12885     -0.00000      0.00021     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.67517 \n     0.00000     -0.00000     -0.99233      0.00000     -0.00000     -0.00000     -0.37300      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.08688      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.99233      0.00000      0.00000      0.00000      0.37299     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.08689      0.00000 \n    -0.00000     -0.00000     -0.00000      0.99233     -0.00000     -0.00000     -0.00000      0.37300     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.08688      0.00000      0.00000 \n     0.01014      0.58409      0.00000     -0.00000     -0.00000     -0.85083      0.00000     -0.00000     -0.00000     -0.62037      0.00000     -0.00063      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      7.94091 \n    -0.00000      0.00000     -0.02220     -0.00000      0.00000      0.00000      1.04719     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.26382     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.02219      0.00000      0.00000      0.00000     -1.04718      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.26385     -0.00000 \n     0.00000      0.00000      0.00000      0.02220      0.00000      0.00000      0.00000     -1.04719      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.26382     -0.00000     -0.00000 \n    -0.00400     -0.22798     -0.00000      0.00000      0.00000     -0.09475     -0.00000      0.00000      0.00000      0.17400     -0.86603      0.50007     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -3.53395 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00400     -0.22801     -0.00000      0.00000     -0.00000     -0.09404     -0.00000      0.00000      0.00000      0.17379      0.00000     -0.99993      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -3.53401 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00400     -0.22798     -0.00000      0.00000      0.00000     -0.09475     -0.00000      0.00000     -0.00000      0.17400      0.86603      0.50007      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -3.53395 \n     0.00033      0.01891      0.00000     -0.00000      0.00000     -0.01548      0.00000     -0.00000      0.00000      0.99366     -0.00000     -0.00017     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.50062 \n     0.00000     -0.00000      0.00238      0.00000     -0.00000     -0.00000      0.06395      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.01515      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00238     -0.00000     -0.00000     -0.00000     -0.06398     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.01515     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00238     -0.00000     -0.00000     -0.00000     -0.06395     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.01515      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ni\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.37721     -0.97429      0.00000      0.00000      0.00000     -0.21866      0.00000      0.00000      0.00000      0.22967      0.00000      0.00000      0.22780      0.00000      0.22967     -0.01261      0.00000      0.00000      0.00000 \n    -0.97429      2.52771      0.00000      0.00000      0.00000      0.32317      0.00000      0.00000      0.00000     -0.54366      0.00000      0.00000     -0.53758      0.00000     -0.54366      0.02814      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.25126      0.00000      0.00000      0.00000     -0.74798      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02847      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25109      0.00000      0.00000      0.00000     -0.74752      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02952      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25126      0.00000      0.00000      0.00000     -0.74798      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02847 \n    -0.21866      0.32317      0.00000      0.00000      0.00000      3.27309      0.00000      0.00000      0.00000     -0.36559      0.00000      0.00000     -0.42111      0.00000     -0.36559      0.04534      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.74798      0.00000      0.00000      0.00000      2.22710      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06765      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.74752      0.00000      0.00000      0.00000      2.22568      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.07084      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.74798      0.00000      0.00000      0.00000      2.22710      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.06765 \n     0.22967     -0.54366      0.00000      0.00000      0.00000     -0.36559      0.00000      0.00000      0.00000      2.13207      0.00000      0.00000     -0.84564      0.00000     -0.86796     -0.01871      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.22780     -0.53758      0.00000      0.00000      0.00000     -0.42111      0.00000      0.00000      0.00000     -0.84564      0.00000      0.00000      2.17627      0.00000     -0.84564      0.00745      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.22967     -0.54366      0.00000      0.00000      0.00000     -0.36559      0.00000      0.00000      0.00000     -0.86796      0.00000      0.00000     -0.84564      0.00000      2.13207     -0.01871      0.00000      0.00000      0.00000 \n    -0.01261      0.02814      0.00000      0.00000      0.00000      0.04534      0.00000      0.00000      0.00000     -0.01871      0.00000      0.00000      0.00745      0.00000     -0.01871      0.00101      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.02847      0.00000      0.00000      0.00000      0.06765      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00208      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.02952      0.00000      0.00000      0.00000      0.07084      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00227      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.02847      0.00000      0.00000      0.00000      0.06765      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00208 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -299.75900    -35.82194    -32.48484    -32.48484    -32.46022     -4.68309     -3.53826     -3.53826     -3.48851     -0.96688     -0.96687     -0.92875     -0.92875     -0.92314     -0.63803     -0.45659     -0.45659     -0.44842      2.26696 \n   </alphaeps>\n   <betaeps>\n  -299.75810    -35.79209    -32.46124    -32.46124    -32.44065     -4.59062     -3.44063     -3.44063     -3.40170     -0.86924     -0.86924     -0.83730     -0.83730     -0.83727     -0.60449     -0.42250     -0.42250     -0.41636      2.32644 \n   </betaeps>\n   <alphavectors>\n    -0.99694     -0.40783      0.00000      0.00000      0.00000      0.16856      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00074     -0.04033      0.00000     -0.00000     -0.00000     -0.19510 \n    -0.00808      1.01186     -0.00000     -0.00000     -0.00000     -0.49010     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00198      0.12533     -0.00000      0.00000      0.00000      0.67611 \n     0.00000      0.00000     -0.00000     -0.99257     -0.00000     -0.00000      0.00000     -0.37484     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.07281     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.99267      0.00000      0.00000     -0.00000     -0.37445      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.07338     -0.00000 \n    -0.00000     -0.00000      0.99257      0.00000     -0.00000     -0.00000     -0.37484     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.07281      0.00000     -0.00000     -0.00000 \n     0.01295      0.68525     -0.00000     -0.00000      0.00000      1.08962      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.01076     -0.75767      0.00000     -0.00000     -0.00000     -9.16572 \n    -0.00000     -0.00000      0.00000     -0.02154      0.00000      0.00000     -0.00000      1.05534      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.22382      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.02124     -0.00000      0.00000     -0.00000      1.05498     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.22557      0.00000 \n     0.00000      0.00000      0.02154     -0.00000      0.00000      0.00000      1.05534      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.22382     -0.00000      0.00000      0.00000 \n    -0.00519     -0.27162      0.00000      0.00000     -0.00000     -0.00526     -0.00000      0.00000     -0.00000     -0.00000     -0.86603      0.00000      0.00000     -0.49155      0.25187     -0.00000      0.00000      0.00000      4.08649 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00519     -0.27218      0.00000      0.00000     -0.00000     -0.01933     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.00831      0.23743     -0.00000     -0.00000      0.00000      4.08421 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00519     -0.27162      0.00000      0.00000     -0.00000     -0.00526      0.00000      0.00000     -0.00000      0.00000      0.86603     -0.00000     -0.00000     -0.49155      0.25187      0.00000     -0.00000      0.00000      4.08649 \n     0.00036      0.01852     -0.00000     -0.00000     -0.00000      0.00890      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00886      0.98857      0.00000     -0.00000     -0.00000     -0.49092 \n     0.00000      0.00000     -0.00000      0.00227     -0.00000     -0.00000     -0.00000      0.03070     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.01574     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00224      0.00000     -0.00000      0.00000      0.03238     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.01569     -0.00000 \n    -0.00000     -0.00000     -0.00227      0.00000     -0.00000     -0.00000      0.03070      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.01574     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99694     -0.40805     -0.00000     -0.00000      0.00000      0.16789      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00056      0.04022     -0.00000      0.00000      0.00000      0.19523 \n     0.00808      1.01256      0.00000      0.00000     -0.00000     -0.48810     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00148     -0.12485      0.00000     -0.00000     -0.00000     -0.67659 \n    -0.00000      0.00000      0.00000      0.99281     -0.00000     -0.00000     -0.37401     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.07374      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.99288      0.00000      0.00000      0.00000     -0.37373     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.07421      0.00000 \n     0.00000     -0.00000     -0.99281     -0.00000      0.00000      0.00000     -0.00000      0.37401     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.07374     -0.00000      0.00000 \n    -0.01295      0.67973      0.00000      0.00000      0.00000      1.07411      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00770      0.74347     -0.00000      0.00000      0.00000      9.16912 \n     0.00000     -0.00000     -0.00000      0.02085      0.00000      0.00000      1.05473      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.22675     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.02065     -0.00000      0.00000      0.00000      1.05443     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.22816     -0.00000 \n    -0.00000      0.00000     -0.02085      0.00000     -0.00000     -0.00000     -0.00000     -1.05473      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.22675      0.00000      0.00000 \n     0.00519     -0.26955     -0.00000     -0.00000     -0.00000      0.00050      0.00000      0.00000      0.00000      0.86603      0.00000     -0.00000      0.00000      0.49388     -0.24452      0.00000     -0.00000     -0.00000     -4.08680 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00519     -0.26998     -0.00000     -0.00000     -0.00000     -0.01051     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.00602     -0.23066     -0.00000      0.00000     -0.00000     -4.08534 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000 \n     0.00519     -0.26955     -0.00000     -0.00000      0.00000      0.00050      0.00000      0.00000     -0.00000     -0.86603     -0.00000      0.00000     -0.00000      0.49388     -0.24452     -0.00000      0.00000     -0.00000     -4.08680 \n    -0.00036      0.01839      0.00000      0.00000     -0.00000      0.00987      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00875     -0.98941     -0.00000      0.00000      0.00000      0.48920 \n    -0.00000      0.00000      0.00000     -0.00219      0.00000     -0.00000      0.03351     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -1.01566      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.00000      0.00216      0.00000     -0.00000     -0.00000      0.03487     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.01561      0.00000 \n     0.00000     -0.00000      0.00219     -0.00000     -0.00000      0.00000      0.00000     -0.03351     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.01566     -0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cu\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.40327     -1.04720      0.00000      0.00000      0.00000      0.39952      0.00000      0.00000      0.00000     -0.02520      0.00000      0.00000     -0.02578      0.00000     -0.02591     -0.08438      0.00000      0.00000      0.00000 \n    -1.04720      2.73951      0.00000      0.00000      0.00000     -1.71184      0.00000      0.00000      0.00000      0.29510      0.00000      0.00000      0.29710      0.00000      0.29759      0.27414      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.26007      0.00000      0.00000      0.00000     -0.76789      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00539      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25997      0.00000      0.00000      0.00000     -0.76761      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00446      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25994      0.00000      0.00000      0.00000     -0.76749      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00414 \n     0.39952     -1.71184      0.00000      0.00000      0.00000     24.10886      0.00000      0.00000      0.00000     -8.75702      0.00000      0.00000     -8.78523      0.00000     -8.79212     -3.16267      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.76789      0.00000      0.00000      0.00000      2.26753      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02471      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.76761      0.00000      0.00000      0.00000      2.26659      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02168      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.76749      0.00000      0.00000      0.00000      2.26625      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.02061 \n    -0.02520      0.29510      0.00000      0.00000      0.00000     -8.75702      0.00000      0.00000      0.00000      5.48074      0.00000      0.00000      2.49317      0.00000      2.49620      1.36969      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02578      0.29710      0.00000      0.00000      0.00000     -8.78523      0.00000      0.00000      0.00000      2.49317      0.00000      0.00000      5.50558      0.00000      2.50860      1.37169      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.02591      0.29759      0.00000      0.00000      0.00000     -8.79212      0.00000      0.00000      0.00000      2.49620      0.00000      0.00000      2.50860      0.00000      5.51161      1.37235      0.00000      0.00000      0.00000 \n    -0.08438      0.27414      0.00000      0.00000      0.00000     -3.16267      0.00000      0.00000      0.00000      1.36969      0.00000      0.00000      1.37169      0.00000      1.37235      0.61049      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00539      0.00000      0.00000      0.00000     -0.02471      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00028      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00446      0.00000      0.00000      0.00000     -0.02168      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00022      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00414      0.00000      0.00000      0.00000     -0.02061      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00020 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.98971      0.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.01029      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -326.46580    -42.47173    -39.08737    -39.02145    -38.99544     -7.84828     -6.66456     -6.55470     -6.50520     -3.77581     -3.75331     -3.71769     -3.64515     -3.64068     -0.95095     -0.52203     -0.50645     -0.50033      0.80960 \n   </alphaeps>\n   <betaeps>\n  -326.46550    -42.36526    -39.02808    -38.93485    -38.90500     -7.52297     -6.40512     -6.19354     -6.12933     -3.50781     -3.44966     -3.40151     -3.26769     -3.26675     -0.88545     -0.49886     -0.48065     -0.47412      0.95929 \n   </betaeps>\n   <alphavectors>\n    -0.99715      0.41107     -0.00000     -0.00000      0.00000     -0.18481     -0.00000     -0.00000      0.00000     -0.00367     -0.00000      0.00000     -0.00000     -0.00177     -0.09214     -0.00000      0.00000      0.00000     -0.16358 \n    -0.00747     -1.01302      0.00000      0.00000     -0.00000      0.54301      0.00000      0.00000     -0.00000      0.01094      0.00000     -0.00000      0.00000      0.00526      0.31432      0.00000     -0.00000     -0.00000      0.58193 \n    -0.00000     -0.00000     -0.99333     -0.00000      0.00000      0.00000      0.37865     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05031      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.99347      0.00000     -0.00000      0.00000     -0.37824      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05058     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000      0.99354      0.00000     -0.00000      0.00000      0.37803      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.05070      0.00000 \n     0.01262     -0.74367      0.00000     -0.00000      0.00000     -1.79620      0.00000     -0.00000     -0.00000     -0.03879     -0.00000      0.00000     -0.00000     -0.01834     -4.09639     -0.00000      0.00000      0.00000     -9.22724 \n     0.00000     -0.00000     -0.01924      0.00000     -0.00000     -0.00000     -1.06481      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.15738     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.01883      0.00000     -0.00000      0.00000      1.06469     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.15825      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.01863      0.00000     -0.00000     -0.00000     -1.06463     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.15866      0.00000 \n    -0.00509      0.29651     -0.00000      0.00000     -0.00000      0.29861     -0.00000     -0.00000     -0.00000      0.99466      0.00000     -0.00000      0.00000      0.15671      1.77231      0.00000     -0.00000     -0.00000      4.15299 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00509      0.29761     -0.00000      0.00000     -0.00000      0.32734     -0.00000     -0.00000     -0.00000     -0.62033     -0.00000      0.00000     -0.00000      0.78199      1.77170     -0.00000     -0.00000      0.00000      4.15312 \n     0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.00509      0.29810     -0.00000      0.00000     -0.00000      0.33967     -0.00000      0.00000      0.00000     -0.35391     -0.00000      0.00000     -0.00000     -0.92940      1.77131      0.00000     -0.00000     -0.00000      4.15314 \n     0.00028     -0.01594      0.00000     -0.00000      0.00000     -0.00236      0.00000      0.00000      0.00000     -0.00052     -0.00000     -0.00000     -0.00000     -0.00029      0.78068     -0.00000     -0.00000      0.00000     -0.75100 \n    -0.00000      0.00000      0.00178     -0.00000      0.00000      0.00000      0.01284     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.01277      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00173     -0.00000      0.00000     -0.00000     -0.01202     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.01278     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.00171     -0.00000      0.00000      0.00000      0.01163      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.01279     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99716     -0.41179      0.00000      0.00000      0.00000      0.18273     -0.00000     -0.00000      0.00000      0.00663     -0.00000      0.00000      0.00000      0.00218      0.08565      0.00000     -0.00000     -0.00000      0.16746 \n    -0.00746      1.01534     -0.00000     -0.00000     -0.00000     -0.53683      0.00000      0.00000     -0.00000     -0.01954      0.00000     -0.00000     -0.00000     -0.00642     -0.29108     -0.00000      0.00000      0.00000     -0.59532 \n     0.00000      0.00000      0.99390      0.00000      0.00000      0.00000     -0.37703     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.05110     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.99427     -0.00000     -0.00000      0.00000     -0.37597      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.05174     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.99438      0.00000      0.00000     -0.00000      0.37566      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.05194     -0.00000 \n     0.01261      0.72398     -0.00000      0.00000      0.00000      1.74659     -0.00000     -0.00000      0.00000      0.05310     -0.00000      0.00000      0.00000      0.01800      3.71106     -0.00000     -0.00000     -0.00000      9.39967 \n     0.00000      0.00000      0.01762      0.00000      0.00000      0.00000      1.06444      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.16004      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.01657     -0.00000     -0.00000     -0.00000      1.06414      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.16217     -0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.01627      0.00000     -0.00000     -0.00000     -1.06405      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.16281     -0.00000 \n    -0.00509     -0.28822      0.00000     -0.00000     -0.00000     -0.25681      0.00000      0.00000     -0.00000     -0.99654      0.00000     -0.00000     -0.00000     -0.11182     -1.59910     -0.00000      0.00000      0.00000     -4.22701 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.00509     -0.29025     -0.00000     -0.00000     -0.00000     -0.31394      0.00000      0.00000      0.00000      0.58889      0.00000     -0.00000     -0.00000     -0.80690     -1.59528     -0.00000      0.00000      0.00000     -4.22538 \n     0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00509     -0.29086      0.00000     -0.00000     -0.00000     -0.32963     -0.00000      0.00000      0.00000      0.39685     -0.00000     -0.00000      0.00000      0.91440     -1.59419      0.00000     -0.00000     -0.00000     -4.22505 \n     0.00028      0.01560      0.00000      0.00000      0.00000      0.00336      0.00000     -0.00000     -0.00000      0.00162      0.00000     -0.00000      0.00000      0.00059     -0.81171     -0.00000     -0.00000     -0.00000      0.71735 \n     0.00000     -0.00000     -0.00160     -0.00000      0.00000      0.00000     -0.01031     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.01280     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000      0.00149      0.00000     -0.00000      0.00000     -0.00829     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.01282      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.00145     -0.00000      0.00000      0.00000      0.00768     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.01282      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Zn\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.38653     -0.97904      0.00000      0.00000      0.00000     -0.71024      0.00000      0.00000      0.00000      0.45162      0.00000      0.00000      0.45161      0.00000      0.45160     -0.10024      0.00000      0.00000      0.00000 \n    -0.97904      2.49048      0.00000      0.00000      0.00000      1.58371      0.00000      0.00000      0.00000     -1.10421      0.00000      0.00000     -1.10417      0.00000     -1.10412      0.28592      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.27267      0.00000      0.00000      0.00000     -0.80470      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15128      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.27266      0.00000      0.00000      0.00000     -0.80470      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15128      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.27266      0.00000      0.00000      0.00000     -0.80471      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.15128 \n    -0.71024      1.58371      0.00000      0.00000      0.00000      2.95118      0.00000      0.00000      0.00000     -0.70593      0.00000      0.00000     -0.70648      0.00000     -0.70713     -0.77798      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.80470      0.00000      0.00000      0.00000      2.37579      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.48939      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.80470      0.00000      0.00000      0.00000      2.37579      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.48938      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.80471      0.00000      0.00000      0.00000      2.37579      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.48939 \n     0.45162     -1.10421      0.00000      0.00000      0.00000     -0.70593      0.00000      0.00000      0.00000      2.34417      0.00000      0.00000     -0.39235      0.00000     -0.38098      0.10704      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.39697      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.37849      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.45161     -1.10417      0.00000      0.00000      0.00000     -0.70648      0.00000      0.00000      0.00000     -0.39235      0.00000      0.00000      2.33455      0.00000     -0.37066      0.10705      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.36230      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.45160     -1.10412      0.00000      0.00000      0.00000     -0.70713      0.00000      0.00000      0.00000     -0.38098      0.00000      0.00000     -0.37066      0.00000      2.32396      0.10708      0.00000      0.00000      0.00000 \n    -0.10024      0.28592      0.00000      0.00000      0.00000     -0.77798      0.00000      0.00000      0.00000      0.10704      0.00000      0.00000      0.10705      0.00000      0.10708      2.08213      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.15128      0.00000      0.00000      0.00000     -0.48939      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.10093      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.15128      0.00000      0.00000      0.00000     -0.48938      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.10090      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.15128      0.00000      0.00000      0.00000     -0.48939      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.10091 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.91157      0.89934      0.06637      0.06329      0.06058      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.91105      0.89878      0.06595      0.06288      0.06019      0.00000 \n   </betaocc>\n   <alphaeps>\n  -345.37760    -40.24439    -36.70345    -36.70319    -36.70289     -4.02781     -2.71496     -2.71444     -2.71387     -0.17781      0.06807      0.06816      0.06825      0.25005      0.25107      0.29041      0.29075      0.29106      4.29091 \n   </alphaeps>\n   <betaeps>\n  -345.37760    -40.24438    -36.70344    -36.70317    -36.70288     -4.02776     -2.71491     -2.71440     -2.71383     -0.17781      0.06807      0.06816      0.06825      0.25009      0.25112      0.29045      0.29080      0.29111      4.29094 \n   </betaeps>\n   <alphavectors>\n     0.99737     -0.41245      0.00000     -0.00000      0.00000      0.16272     -0.00000     -0.00000      0.00000      0.04389     -0.00000     -0.00000      0.00000     -0.00002     -0.00002      0.00000      0.00000      0.00000     -0.20840 \n     0.00690      1.00769     -0.00000      0.00000     -0.00000     -0.46145      0.00000      0.00000     -0.00000     -0.12968      0.00000     -0.00000     -0.00000      0.00005      0.00005     -0.00000     -0.00000     -0.00000      0.75397 \n     0.00000      0.00000      0.99306     -0.00000      0.00000     -0.00000     -0.37185     -0.00000     -0.00000      0.00000     -0.10907     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.99306     -0.00000     -0.00000      0.00000     -0.37184     -0.00000     -0.00000      0.00000     -0.10908     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.99306     -0.00000     -0.00000     -0.00000      0.37184     -0.00000     -0.00000     -0.00000      0.10909      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000 \n    -0.01532      1.04730     -0.00000      0.00000     -0.00000      0.45417     -0.00000     -0.00000      0.00000      0.41504      0.00000      0.00000      0.00000      0.00014      0.00016      0.00000      0.00000     -0.00000    -14.08933 \n    -0.00000     -0.00000      0.01996     -0.00000      0.00000     -0.00000      1.03834      0.00000      0.00000      0.00000      0.33067      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.01996      0.00000      0.00000     -0.00000      1.03833      0.00000      0.00000     -0.00000      0.33070      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.01995      0.00000      0.00000      0.00000     -1.03832      0.00000      0.00000      0.00000     -0.33074     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.00636     -0.43190     -0.00000      0.00000     -0.00000      0.26900      0.00000      0.00000     -0.00000     -0.05512      0.00000     -0.00000     -0.00000      0.96204      0.27231     -0.00000     -0.00000     -0.00000      6.25712 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000 \n     0.00636     -0.43190      0.00000     -0.00000      0.00000      0.26887     -0.00000     -0.00000      0.00000     -0.05527      0.00000      0.00000     -0.00000     -0.71716      0.69690      0.00000      0.00000      0.00000      6.25710 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000 \n     0.00636     -0.43191     -0.00000      0.00000     -0.00000      0.26873     -0.00000     -0.00000      0.00000     -0.05544     -0.00000     -0.00000      0.00000     -0.24527     -0.96963      0.00000      0.00000      0.00000      6.25708 \n    -0.00033      0.02197      0.00000     -0.00000      0.00000      0.02475      0.00000      0.00000     -0.00000     -1.01979      0.00000     -0.00000     -0.00000      0.00013      0.00014     -0.00000     -0.00000      0.00000     -0.51247 \n     0.00000      0.00000     -0.00244      0.00000     -0.00000      0.00000      0.08954      0.00000      0.00000     -0.00000     -1.02100     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00244     -0.00000     -0.00000     -0.00000      0.08957      0.00000      0.00000      0.00000     -1.02099     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000      0.00244     -0.00000      0.00000      0.00000     -0.08960      0.00000     -0.00000     -0.00000      1.02099     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99737      0.41245      0.00000     -0.00000     -0.00000      0.16272     -0.00000     -0.00000      0.00000     -0.04389      0.00000     -0.00000      0.00000      0.00002      0.00002     -0.00000      0.00000      0.00000     -0.20840 \n     0.00690     -1.00769      0.00000      0.00000      0.00000     -0.46145      0.00000      0.00000     -0.00000      0.12968     -0.00000      0.00000     -0.00000     -0.00005     -0.00005      0.00000     -0.00000     -0.00000      0.75398 \n    -0.00000      0.00000      0.99306     -0.00000     -0.00000      0.00000     -0.37185     -0.00000     -0.00000      0.00000      0.10907      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.99306      0.00000      0.00000     -0.00000      0.37184     -0.00000      0.00000     -0.00000      0.10908      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.99306      0.00000     -0.00000      0.00000      0.37183      0.00000      0.00000     -0.00000      0.10909     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.01532     -1.04730     -0.00000     -0.00000     -0.00000      0.45416     -0.00000     -0.00000      0.00000     -0.41502      0.00000     -0.00000      0.00000     -0.00014     -0.00016     -0.00000      0.00000      0.00000    -14.08933 \n     0.00000     -0.00000      0.01996      0.00000      0.00000     -0.00000      1.03834      0.00000      0.00000     -0.00000     -0.33068     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.01995      0.00000      0.00000      0.00000     -1.03833      0.00000      0.00000      0.00000     -0.33071     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.01995      0.00000      0.00000     -0.00000     -1.03832      0.00000     -0.00000      0.00000     -0.33074      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00636      0.43190      0.00000      0.00000     -0.00000      0.26901     -0.00000      0.00000     -0.00000      0.05511     -0.00000      0.00000     -0.00000     -0.96204     -0.27231      0.00000      0.00000      0.00000      6.25712 \n     0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73205      0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000 \n     0.00636      0.43190      0.00000     -0.00000      0.00000      0.26888      0.00000     -0.00000      0.00000      0.05526      0.00000     -0.00000      0.00000      0.71716     -0.69690      0.00000      0.00000     -0.00000      6.25710 \n    -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.73205      0.00000 \n     0.00636      0.43191      0.00000      0.00000     -0.00000      0.26874     -0.00000      0.00000      0.00000      0.05543     -0.00000      0.00000     -0.00000      0.24527      0.96963     -0.00000     -0.00000      0.00000      6.25708 \n    -0.00033     -0.02197     -0.00000      0.00000     -0.00000      0.02475      0.00000      0.00000     -0.00000      1.01979     -0.00000      0.00000      0.00000     -0.00013     -0.00014      0.00000     -0.00000     -0.00000     -0.51246 \n    -0.00000      0.00000     -0.00244     -0.00000     -0.00000      0.00000      0.08954      0.00000      0.00000     -0.00000      1.02100      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.00244     -0.00000     -0.00000      0.00000     -0.08957      0.00000      0.00000     -0.00000      1.02099      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00244     -0.00000      0.00000     -0.00000     -0.08960     -0.00000      0.00000     -0.00000      1.02099      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Al\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.21273     -0.71874      0.00000      0.00000      0.00000      0.19376      0.00000      0.00000      0.00000 \n    -0.71874      2.43074      0.00000      0.00000      0.00000     -0.72133      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.89585      0.00000      0.00000      0.00000      0.07956      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.89585      0.00000      0.00000      0.00000      0.07956      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.89585      0.00000      0.00000      0.00000      0.07956 \n     0.19376     -0.72133      0.00000      0.00000      0.00000      2.21424      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.07956      0.00000      0.00000      0.00000      0.38976      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.07956      0.00000      0.00000      0.00000      0.38976      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.07956      0.00000      0.00000      0.00000      0.38976 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33201      0.33201      0.33201 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00132      0.00132      0.00132 \n   </betaocc>\n   <alphaeps>\n   -54.92410     -3.51852     -2.11221     -2.11221     -2.11221     -0.10425      0.17959      0.17959      0.17959 \n   </alphaeps>\n   <betaeps>\n   -54.91735     -3.50803     -2.10018     -2.10018     -2.10018     -0.06754      0.21596      0.21596      0.21596 \n   </betaeps>\n   <alphavectors>\n     0.99617      0.31717     -0.00000     -0.00000      0.00000      0.11580     -0.00000     -0.00000      0.00000 \n     0.01270     -1.02278      0.00000      0.00000     -0.00000     -0.41126      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.95745     -0.00000     -0.00000      0.00000     -0.42682     -0.00000 \n     0.00000     -0.00000     -0.95745     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.42682 \n    -0.00000     -0.00000      0.00000      0.00000      0.95745      0.00000      0.42682      0.00000     -0.00000 \n    -0.00265     -0.06956      0.00000      0.00000     -0.00000      1.04989     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.11995      0.00000      0.00000     -0.00000      1.04139      0.00000 \n    -0.00000     -0.00000     -0.11995      0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.04139 \n     0.00000     -0.00000      0.00000      0.00000      0.11995     -0.00000     -1.04139     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99619     -0.31726      0.00000     -0.00000      0.00000      0.11541     -0.00000     -0.00000      0.00000 \n     0.01264      1.02327     -0.00000      0.00000     -0.00000     -0.41003     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.95834      0.00000     -0.00000     -0.00000     -0.00000     -0.42482 \n    -0.00000     -0.00000     -0.95834     -0.00000     -0.00000      0.00000     -0.42482     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.95834     -0.00000      0.00000     -0.42482     -0.00000 \n    -0.00263      0.06830     -0.00000      0.00000     -0.00000      1.04998      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.11778     -0.00000      0.00000      0.00000      0.00000      1.04164 \n     0.00000      0.00000     -0.11778      0.00000      0.00000     -0.00000      1.04164      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.11778      0.00000     -0.00000      1.04164     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Si\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.22821     -0.73847      0.00000      0.00000      0.00000      0.17392      0.00000      0.00000      0.00000 \n    -0.73847      2.39134      0.00000      0.00000      0.00000     -0.61860      0.00000      0.00000      0.00000 \n     0.00000      0.00000      1.97871      0.00000      0.00000      0.00000     -0.07281      0.00000      0.00000 \n     0.00000      0.00000      0.00000      1.97871      0.00000      0.00000      0.00000     -0.07281      0.00000 \n     0.00000      0.00000      0.00000      0.00000      1.97871      0.00000      0.00000      0.00000     -0.07281 \n     0.17392     -0.61860      0.00000      0.00000      0.00000      2.16016      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.07281      0.00000      0.00000      0.00000      0.72606      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.07281      0.00000      0.00000      0.00000      0.72606      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.07281      0.00000      0.00000      0.00000      0.72606 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.66666      0.66666      0.66666 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n   -64.91340     -4.62393     -3.04902     -3.04902     -3.04902     -0.26521      0.03558      0.03558      0.03558 \n   </alphaeps>\n   <betaeps>\n   -64.90233     -4.60675     -3.02955     -3.02955     -3.02955     -0.19480      0.10564      0.10564      0.10564 \n   </betaeps>\n   <alphavectors>\n     0.99648     -0.33178      0.00000      0.00000     -0.00000     -0.10515      0.00000     -0.00000     -0.00000 \n     0.01122      1.03294     -0.00000     -0.00000      0.00000      0.35859      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.97254     -0.00000     -0.00000      0.00000      0.35731     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.97254      0.00000     -0.00000     -0.00000     -0.35731      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.97254      0.00000     -0.00000      0.00000     -0.35731 \n    -0.00198      0.06075     -0.00000     -0.00000      0.00000     -1.03749     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.09036      0.00000      0.00000     -0.00000     -1.03216      0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.09036     -0.00000      0.00000      0.00000      1.03216      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.09036     -0.00000      0.00000     -0.00000      1.03216 \n   </alphavectors>\n   <betavectors>\n    -0.99650     -0.33191      0.00000     -0.00000     -0.00000     -0.10452      0.00000      0.00000      0.00000 \n    -0.01114      1.03359     -0.00000      0.00000      0.00000      0.35670     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.97353     -0.00000     -0.00000      0.00000      0.00000      0.35461      0.00000 \n    -0.00000     -0.00000      0.00000     -0.97353     -0.00000      0.00000     -0.35461      0.00000      0.00000 \n     0.00000      0.00000     -0.00000      0.00000     -0.97353     -0.00000      0.00000      0.00000     -0.35461 \n     0.00196      0.05886     -0.00000      0.00000     -0.00000     -1.03760     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.08749      0.00000      0.00000     -0.00000     -0.00000     -1.03240     -0.00000 \n     0.00000      0.00000     -0.00000     -0.08749      0.00000     -0.00000      1.03240     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000     -0.08749      0.00000      0.00000     -0.00000      1.03240 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"P\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.24686     -0.76999      0.00000      0.00000      0.00000      0.17648      0.00000      0.00000      0.00000 \n    -0.76999      2.40312      0.00000      0.00000      0.00000     -0.60630      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.02861      0.00000      0.00000      0.00000     -0.20282      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.02861      0.00000      0.00000      0.00000     -0.20282      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.02861      0.00000      0.00000      0.00000     -0.20282 \n     0.17648     -0.60630      0.00000      0.00000      0.00000      2.15312      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.20282      0.00000      0.00000      0.00000      1.07503      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.20282      0.00000      0.00000      0.00000      1.07503      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.20282      0.00000      0.00000      0.00000      1.07503 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99990      0.99990      0.99990 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00010      0.00010      0.00010 \n   </betaocc>\n   <alphaeps>\n   -75.74191     -5.81905     -4.08626     -4.08626     -4.08626     -0.38175     -0.04133     -0.04133     -0.04133 \n   </alphaeps>\n   <betaeps>\n   -75.72517     -5.79387     -4.05790     -4.05790     -4.05790     -0.27603      0.06421      0.06421      0.06421 \n   </betaeps>\n   <alphavectors>\n     0.99675      0.34434      0.00000      0.00000     -0.00000      0.10653      0.00000      0.00000      0.00000 \n     0.00998     -1.03799     -0.00000     -0.00000      0.00000     -0.35220     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.97816     -0.00000      0.00000     -0.00000      0.33621 \n     0.00000     -0.00000      0.00000     -0.97816     -0.00000     -0.00000     -0.00000      0.33621      0.00000 \n     0.00000     -0.00000      0.97816      0.00000     -0.00000      0.00000     -0.33621     -0.00000     -0.00000 \n    -0.00165     -0.05944     -0.00000     -0.00000      0.00000      1.03587      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.07513      0.00000      0.00000      0.00000     -1.03160 \n     0.00000      0.00000      0.00000     -0.07513      0.00000      0.00000     -0.00000     -1.03160     -0.00000 \n     0.00000     -0.00000      0.07513      0.00000     -0.00000     -0.00000      1.03160     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99678     -0.34450     -0.00000     -0.00000     -0.00000      0.10573     -0.00000      0.00000      0.00000 \n     0.00988      1.03878      0.00000      0.00000      0.00000     -0.34985      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.97917     -0.00000     -0.33327     -0.00000     -0.00000 \n     0.00000     -0.00000      0.97917     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.33327 \n    -0.00000      0.00000      0.00000      0.97917      0.00000     -0.00000     -0.00000      0.33327     -0.00000 \n    -0.00163      0.05710      0.00000      0.00000      0.00000      1.03600     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.07203      0.00000      1.03182      0.00000      0.00000 \n     0.00000     -0.00000      0.07203      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.03182 \n     0.00000     -0.00000     -0.00000      0.07203     -0.00000      0.00000      0.00000     -1.03182      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"S\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.26396     -0.79813      0.00000      0.00000      0.00000      0.17874      0.00000      0.00000      0.00000 \n    -0.79813      2.41470      0.00000      0.00000      0.00000     -0.59635      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.06662      0.00000      0.00000      0.00000     -0.31609      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.06662      0.00000      0.00000      0.00000     -0.31609      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.06662      0.00000      0.00000      0.00000     -0.31609 \n     0.17874     -0.59635      0.00000      0.00000      0.00000      2.14744      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.31609      0.00000      0.00000      0.00000      1.42500      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.31609      0.00000      0.00000      0.00000      1.42500      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.31609      0.00000      0.00000      0.00000      1.42500 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99999      0.99999      0.99999 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33334      0.33334      0.33334 \n   </betaocc>\n   <alphaeps>\n   -87.48800     -7.16492     -5.27931     -5.27931     -5.27931     -0.48571     -0.10206     -0.10206     -0.10206 \n   </alphaeps>\n   <betaeps>\n   -87.47669     -7.14843     -5.26081     -5.26081     -5.26081     -0.41757     -0.03388     -0.03388     -0.03388 \n   </betaeps>\n   <alphavectors>\n     0.99707      0.35542      0.00000      0.00000     -0.00000     -0.10728      0.00000     -0.00000      0.00000 \n     0.00874     -1.04295     -0.00000      0.00000     -0.00000      0.34572      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.98249     -0.00000     -0.00000     -0.00000     -0.31874      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.98249      0.00000      0.00000     -0.00000      0.31874      0.00000 \n    -0.00000      0.00000      0.00000      0.00000     -0.98249      0.00000     -0.00000     -0.00000      0.31874 \n    -0.00134     -0.05708      0.00000     -0.00000      0.00000     -1.03463     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.06261     -0.00000     -0.00000     -0.00000      1.03100      0.00000      0.00000 \n    -0.00000      0.00000      0.00000     -0.06261     -0.00000     -0.00000     -0.00000     -1.03100      0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.06261     -0.00000     -0.00000      0.00000     -1.03100 \n   </alphavectors>\n   <betavectors>\n     0.99709     -0.35550      0.00000     -0.00000      0.00000     -0.10684      0.00000     -0.00000      0.00000 \n     0.00868      1.04337      0.00000     -0.00000      0.00000      0.34447      0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.98294     -0.00000     -0.00000      0.31733     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.98294      0.00000     -0.00000      0.00000      0.00000     -0.31733     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.98294     -0.00000     -0.00000     -0.00000      0.31733 \n    -0.00133      0.05584     -0.00000      0.00000     -0.00000     -1.03470     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.06113     -0.00000      0.00000     -1.03109     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.06113      0.00000     -0.00000     -0.00000      0.00000      1.03109      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.06113      0.00000     -0.00000      0.00000     -1.03109 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Cl\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.27630     -0.81367      0.00000      0.00000      0.00000      0.16414      0.00000      0.00000      0.00000 \n    -0.81367      2.39733      0.00000      0.00000      0.00000     -0.53230      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.08152      0.00000      0.00000      0.00000     -0.38026      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.08152      0.00000      0.00000      0.00000     -0.38026      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.08152      0.00000      0.00000      0.00000     -0.38026 \n     0.16414     -0.53230      0.00000      0.00000      0.00000      2.11832      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.38026      0.00000      0.00000      0.00000      1.75643      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.38026      0.00000      0.00000      0.00000      1.75643      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.38026      0.00000      0.00000      0.00000      1.75643 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99628      0.99628      0.99628 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.67039      0.67039      0.67039 \n   </betaocc>\n   <alphaeps>\n  -100.43930     -8.88820     -6.85138     -6.85138     -6.85138     -0.66937     -0.25785     -0.25785     -0.25785 \n   </alphaeps>\n   <betaeps>\n  -100.43470     -8.88140     -6.84379     -6.84379     -6.84379     -0.63781     -0.22624     -0.22624     -0.22624 \n   </betaeps>\n   <alphavectors>\n     0.99759     -0.36534     -0.00000      0.00000      0.00000      0.09742     -0.00000      0.00000      0.00000 \n     0.00702      1.05090      0.00000     -0.00000      0.00000     -0.30696      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000      0.00000      0.98851      0.00000      0.00000      0.00000     -0.27617      0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.98851      0.00000     -0.00000      0.00000      0.27617 \n    -0.00000      0.00000     -0.98851      0.00000     -0.00000      0.00000      0.27617      0.00000     -0.00000 \n    -0.00090      0.04704      0.00000     -0.00000     -0.00000      1.02808     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.04645     -0.00000     -0.00000      0.00000      1.02532     -0.00000 \n     0.00000     -0.00000      0.00000      0.00000     -0.04645     -0.00000      0.00000     -0.00000     -1.02532 \n    -0.00000      0.00000     -0.04645      0.00000     -0.00000      0.00000     -1.02532      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99760      0.36536      0.00000      0.00000     -0.00000      0.09726      0.00000      0.00000     -0.00000 \n    -0.00700     -1.05103     -0.00000     -0.00000      0.00000     -0.30651     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.98865     -0.00000     -0.00000     -0.00000      0.27570      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.98865     -0.00000     -0.00000     -0.00000      0.27570 \n     0.00000      0.00000      0.98865      0.00000     -0.00000     -0.00000     -0.27570     -0.00000     -0.00000 \n     0.00090     -0.04660      0.00000      0.00000     -0.00000      1.02810      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.04596      0.00000      0.00000      0.00000     -1.02534     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.04596      0.00000      0.00000      0.00000     -1.02534 \n     0.00000      0.00000      0.04596      0.00000     -0.00000     -0.00000      1.02534      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ar\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.29281     -0.84342      0.00000      0.00000      0.00000      0.17956      0.00000      0.00000      0.00000 \n    -0.84342      2.43103      0.00000      0.00000      0.00000     -0.57212      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.12116      0.00000      0.00000      0.00000     -0.50694      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.12116      0.00000      0.00000      0.00000     -0.50694      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.12116      0.00000      0.00000      0.00000     -0.50694 \n     0.17956     -0.57212      0.00000      0.00000      0.00000      2.13484      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.50694      0.00000      0.00000      0.00000      2.12116      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.50694      0.00000      0.00000      0.00000      2.12116      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.50694      0.00000      0.00000      0.00000      2.12116 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000 \n   </betaocc>\n   <alphaeps>\n  -113.80770    -10.38066     -8.19913     -8.19913     -8.19913     -0.74355     -0.26560     -0.26560     -0.26560 \n   </alphaeps>\n   <betaeps>\n  -113.80770    -10.38066     -8.19913     -8.19913     -8.19913     -0.74355     -0.26560     -0.26560     -0.26560 \n   </betaeps>\n   <alphavectors>\n     0.99790     -0.37335      0.00000      0.00000      0.00000     -0.10588     -0.00000      0.00000      0.00000 \n     0.00600      1.05244     -0.00000     -0.00000     -0.00000      0.32840     -0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.98875     -0.00000     -0.00000      0.00000     -0.28802 \n    -0.00000     -0.00000     -0.98875      0.00000     -0.00000     -0.00000     -0.28802      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.98875     -0.00000     -0.00000      0.00000      0.28802      0.00000 \n    -0.00074      0.05020     -0.00000     -0.00000     -0.00000     -1.03194      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.04337      0.00000      0.00000     -0.00000      1.02893 \n     0.00000      0.00000     -0.04337     -0.00000      0.00000      0.00000      1.02893      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.04337      0.00000      0.00000     -0.00000     -1.02893      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99790     -0.37335     -0.00000     -0.00000      0.00000     -0.10588     -0.00000      0.00000      0.00000 \n    -0.00600      1.05244     -0.00000     -0.00000      0.00000      0.32840      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.98875     -0.00000     -0.00000     -0.00000     -0.28802 \n     0.00000     -0.00000      0.00000      0.98875     -0.00000      0.00000     -0.28802      0.00000      0.00000 \n    -0.00000      0.00000      0.98875     -0.00000      0.00000      0.00000      0.00000     -0.28802      0.00000 \n     0.00074      0.05020      0.00000      0.00000     -0.00000     -1.03194     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.04337      0.00000      0.00000      0.00000      1.02893 \n    -0.00000      0.00000     -0.00000      0.04337      0.00000     -0.00000      1.02893     -0.00000     -0.00000 \n     0.00000     -0.00000      0.04337      0.00000     -0.00000     -0.00000     -0.00000      1.02893     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"K\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.30667     -0.87835      0.00000      0.00000      0.00000      0.23600      0.00000      0.00000      0.00000     -0.03681      0.00000      0.00000      0.00000 \n    -0.87835      2.51883      0.00000      0.00000      0.00000     -0.75920      0.00000      0.00000      0.00000      0.12956      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.12943      0.00000      0.00000      0.00000     -0.47653      0.00000      0.00000      0.00000     -0.15017      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.12943      0.00000      0.00000      0.00000     -0.47653      0.00000      0.00000      0.00000     -0.15017      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.12943      0.00000      0.00000      0.00000     -0.47653      0.00000      0.00000      0.00000     -0.15017 \n     0.23600     -0.75920      0.00000      0.00000      0.00000      2.46151      0.00000      0.00000      0.00000     -0.58101      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.47653      0.00000      0.00000      0.00000      1.76052      0.00000      0.00000      0.00000      0.35407      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.47653      0.00000      0.00000      0.00000      1.76052      0.00000      0.00000      0.00000      0.35407      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.47653      0.00000      0.00000      0.00000      1.76052      0.00000      0.00000      0.00000      0.35407 \n    -0.03681      0.12956      0.00000      0.00000      0.00000     -0.58101      0.00000      0.00000      0.00000      1.26819      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.15017      0.00000      0.00000      0.00000      0.35407      0.00000      0.00000      0.00000      0.07268      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.15017      0.00000      0.00000      0.00000      0.35407      0.00000      0.00000      0.00000      0.07268      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.15017      0.00000      0.00000      0.00000      0.35407      0.00000      0.00000      0.00000      0.07268 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.50000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -128.27960    -12.31122    -10.06715    -10.06715    -10.06715     -1.15464     -0.61600     -0.61600     -0.61600      0.01852      0.17915      0.17915      0.17915 \n   </alphaeps>\n   <betaeps>\n  -128.27960    -12.31122    -10.06715    -10.06715    -10.06715     -1.15464     -0.61600     -0.61600     -0.61600      0.01852      0.17915      0.17915      0.17915 \n   </betaeps>\n   <alphavectors>\n     0.99503      0.38007      0.00000     -0.00000     -0.00000      0.13044     -0.00000      0.00000     -0.00000      0.05967      0.00000      0.00000      0.00000 \n     0.01399     -1.04110     -0.00000      0.00000      0.00000     -0.39768      0.00000     -0.00000      0.00000     -0.18536     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.98368     -0.00000     -0.00000     -0.00000     -0.31159     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.20217 \n     0.00000      0.00000      0.00000      0.98368      0.00000      0.00000     -0.00000     -0.31159     -0.00000      0.00000     -0.00000     -0.20217      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.98368      0.00000      0.00000      0.00000     -0.31159      0.00000     -0.20217     -0.00000      0.00000 \n    -0.00311     -0.07987     -0.00000     -0.00000      0.00000      1.03173      0.00000     -0.00000     -0.00000      0.56551      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.05447      0.00000      0.00000      0.00000      0.93664      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.70358 \n     0.00000     -0.00000     -0.00000      0.05447      0.00000      0.00000     -0.00000      0.93664      0.00000     -0.00000     -0.00000      0.70358     -0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.05447     -0.00000     -0.00000     -0.00000      0.93664     -0.00000      0.70358      0.00000     -0.00000 \n     0.00117      0.02693      0.00000      0.00000     -0.00000      0.02877     -0.00000      0.00000     -0.00000     -1.12476     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000     -0.01616     -0.00000     -0.00000     -0.00000      0.18995     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.10818 \n     0.00000      0.00000      0.00000     -0.01616     -0.00000     -0.00000      0.00000      0.18995      0.00000      0.00000      0.00000     -1.10818      0.00000 \n     0.00000     -0.00000     -0.00000     -0.00000      0.01616      0.00000      0.00000     -0.00000      0.18995      0.00000     -1.10818      0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99503     -0.38007     -0.00000     -0.00000     -0.00000      0.13044      0.00000     -0.00000     -0.00000     -0.05967     -0.00000      0.00000      0.00000 \n    -0.01399      1.04110      0.00000      0.00000      0.00000     -0.39768     -0.00000      0.00000      0.00000      0.18536      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.98368      0.00000     -0.00000     -0.31159     -0.00000      0.00000      0.00000      0.00000     -0.20217      0.00000 \n    -0.00000     -0.00000      0.98368      0.00000     -0.00000     -0.00000      0.00000      0.31159     -0.00000     -0.00000      0.00000     -0.00000      0.20217 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.98368      0.00000      0.00000      0.00000      0.31159     -0.00000      0.20217     -0.00000     -0.00000 \n     0.00311      0.07987     -0.00000      0.00000      0.00000      1.03173      0.00000      0.00000     -0.00000     -0.56551     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.05447     -0.00000      0.00000      0.93664      0.00000     -0.00000     -0.00000     -0.00000      0.70358     -0.00000 \n     0.00000      0.00000      0.05447      0.00000     -0.00000      0.00000      0.00000     -0.93664      0.00000     -0.00000      0.00000      0.00000     -0.70358 \n     0.00000      0.00000     -0.00000     -0.00000     -0.05447     -0.00000     -0.00000     -0.00000     -0.93664      0.00000     -0.70358     -0.00000      0.00000 \n    -0.00117     -0.02693      0.00000     -0.00000     -0.00000      0.02877      0.00000     -0.00000     -0.00000      1.12476     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.01616      0.00000     -0.00000      0.18995     -0.00000      0.00000      0.00000      0.00000     -1.10818      0.00000 \n     0.00000      0.00000     -0.01616     -0.00000      0.00000      0.00000     -0.00000     -0.18995      0.00000      0.00000      0.00000      0.00000      1.10818 \n    -0.00000      0.00000      0.00000      0.00000      0.01616     -0.00000     -0.00000     -0.00000     -0.18995     -0.00000      1.10818      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ca\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.32411     -0.91311      0.00000      0.00000      0.00000      0.26676      0.00000      0.00000      0.00000     -0.07976      0.00000      0.00000      0.00000 \n    -0.91311      2.57600      0.00000      0.00000      0.00000     -0.84224      0.00000      0.00000      0.00000      0.25570      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.16935      0.00000      0.00000      0.00000     -0.57871      0.00000      0.00000      0.00000     -0.10582      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.16935      0.00000      0.00000      0.00000     -0.57871      0.00000      0.00000      0.00000     -0.10582      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.16935      0.00000      0.00000      0.00000     -0.57871      0.00000      0.00000      0.00000     -0.10582 \n     0.26676     -0.84224      0.00000      0.00000      0.00000      2.53689      0.00000      0.00000      0.00000     -0.85195      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.57871      0.00000      0.00000      0.00000      1.98018      0.00000      0.00000      0.00000      0.24622      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.57871      0.00000      0.00000      0.00000      1.98018      0.00000      0.00000      0.00000      0.24622      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.57871      0.00000      0.00000      0.00000      1.98018      0.00000      0.00000      0.00000      0.24622 \n    -0.07976      0.25570      0.00000      0.00000      0.00000     -0.85195      0.00000      0.00000      0.00000      2.28641      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.10582      0.00000      0.00000      0.00000      0.24622      0.00000      0.00000      0.00000      0.03119      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.10582      0.00000      0.00000      0.00000      0.24622      0.00000      0.00000      0.00000      0.03119      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.10582      0.00000      0.00000      0.00000      0.24622      0.00000      0.00000      0.00000      0.03119 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -143.74150    -14.41125    -12.03707    -12.03707    -12.03707     -1.55747     -0.94656     -0.94656     -0.94656     -0.08713      0.05120      0.05120      0.05120 \n   </alphaeps>\n   <betaeps>\n  -143.74150    -14.41125    -12.03707    -12.03707    -12.03707     -1.55747     -0.94656     -0.94656     -0.94656     -0.08713      0.05120      0.05120      0.05120 \n   </betaeps>\n   <alphavectors>\n     0.99540      0.38643     -0.00000     -0.00000     -0.00000     -0.13998     -0.00000      0.00000     -0.00000      0.04806      0.00000     -0.00000     -0.00000 \n     0.01273     -1.04291      0.00000      0.00000      0.00000      0.42238      0.00000     -0.00000      0.00000     -0.14756     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000     -0.98483      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.33880     -0.00000      0.15546      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.98483     -0.00000     -0.00000     -0.00000     -0.33880     -0.00000      0.00000      0.00000      0.00000     -0.15546 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.98483     -0.00000      0.33880     -0.00000     -0.00000      0.00000     -0.00000      0.15546      0.00000 \n    -0.00266     -0.07777      0.00000      0.00000      0.00000     -1.04304      0.00000      0.00000      0.00000      0.41768     -0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.04810     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.99387      0.00000     -0.51322     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.04810      0.00000      0.00000      0.00000      0.99387      0.00000     -0.00000     -0.00000     -0.00000      0.51322 \n     0.00000     -0.00000      0.00000      0.00000     -0.04810      0.00000     -0.99387      0.00000      0.00000     -0.00000      0.00000     -0.51322     -0.00000 \n     0.00077      0.02010     -0.00000     -0.00000     -0.00000     -0.02110     -0.00000      0.00000     -0.00000     -1.06881     -0.00000      0.00000     -0.00000 \n     0.00000     -0.00000      0.01093      0.00000      0.00000     -0.00000      0.00000      0.00000      0.12440     -0.00000      1.06129      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000      0.01093     -0.00000      0.00000     -0.00000      0.12440     -0.00000      0.00000      0.00000      0.00000     -1.06129 \n     0.00000     -0.00000      0.00000      0.00000      0.01093      0.00000     -0.12440     -0.00000     -0.00000      0.00000     -0.00000      1.06129      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99540     -0.38643      0.00000      0.00000      0.00000     -0.13998      0.00000      0.00000      0.00000      0.04806      0.00000      0.00000     -0.00000 \n     0.01273      1.04291     -0.00000     -0.00000     -0.00000      0.42238     -0.00000     -0.00000     -0.00000     -0.14756      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.98483      0.00000     -0.00000      0.00000      0.33880      0.00000      0.00000      0.15546     -0.00000      0.00000 \n     0.00000      0.00000      0.98483      0.00000      0.00000      0.00000      0.33880      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.15546 \n    -0.00000      0.00000     -0.00000      0.00000      0.98483     -0.00000      0.00000     -0.00000      0.33880     -0.00000     -0.00000     -0.15546      0.00000 \n    -0.00266      0.07777      0.00000      0.00000     -0.00000     -1.04304      0.00000     -0.00000      0.00000      0.41768     -0.00000      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.04810      0.00000      0.00000      0.00000     -0.99387     -0.00000     -0.00000     -0.51322     -0.00000      0.00000 \n    -0.00000     -0.00000      0.04810      0.00000      0.00000     -0.00000     -0.99387      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.51322 \n    -0.00000     -0.00000     -0.00000      0.00000      0.04810      0.00000      0.00000     -0.00000     -0.99387     -0.00000      0.00000      0.51322     -0.00000 \n     0.00077     -0.02010     -0.00000     -0.00000     -0.00000     -0.02110      0.00000      0.00000      0.00000     -1.06881      0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.01093     -0.00000     -0.00000     -0.00000     -0.12440      0.00000      0.00000      1.06129      0.00000     -0.00000 \n     0.00000     -0.00000     -0.01093     -0.00000     -0.00000     -0.00000     -0.12440     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.06129 \n    -0.00000      0.00000      0.00000     -0.00000     -0.01093     -0.00000     -0.00000      0.00000     -0.12440     -0.00000      0.00000     -1.06129     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ga\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.41428     -1.03939      0.00000      0.00000      0.00000     -1.94774      0.00000      0.00000      0.00000      1.00547      0.00000      0.00000      1.00492      0.00000      1.00492     -0.06095      0.00000      0.00000      0.00000 \n    -1.03939      2.63152      0.00000      0.00000      0.00000      3.58698      0.00000      0.00000      0.00000     -2.02043      0.00000      0.00000     -2.01905      0.00000     -2.01905      0.21651      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.24592      0.00000      0.00000      0.00000     -0.75500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12185      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.24591      0.00000      0.00000      0.00000     -0.75500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12184      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.24591      0.00000      0.00000      0.00000     -0.75500      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.12184 \n    -1.94774      3.58698      0.00000      0.00000      0.00000     50.66835      0.00000      0.00000      0.00000    -19.47222      0.00000      0.00000    -19.44963      0.00000    -19.44959     -5.61091      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.75500      0.00000      0.00000      0.00000      2.31844      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40630      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.75500      0.00000      0.00000      0.00000      2.31846      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40631      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.75500      0.00000      0.00000      0.00000      2.31846      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.40631 \n     1.00547     -2.02043      0.00000      0.00000      0.00000    -19.47222      0.00000      0.00000      0.00000      8.76070      0.00000      0.00000      7.24875      0.00000      7.24873      2.32854      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     1.00492     -2.01905      0.00000      0.00000      0.00000    -19.44963      0.00000      0.00000      0.00000      7.24875      0.00000      0.00000      8.73682      0.00000      7.23681      2.33211      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      3.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     1.00492     -2.01905      0.00000      0.00000      0.00000    -19.44959      0.00000      0.00000      0.00000      7.24873      0.00000      0.00000      7.23681      0.00000      8.73680      2.33211      0.00000      0.00000      0.00000 \n    -0.06095      0.21651      0.00000      0.00000      0.00000     -5.61091      0.00000      0.00000      0.00000      2.32854      0.00000      0.00000      2.33211      0.00000      2.33211      2.01827      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.12185      0.00000      0.00000      0.00000     -0.40630      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.07126      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.12184      0.00000      0.00000      0.00000     -0.40631      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.07125      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.12184      0.00000      0.00000      0.00000     -0.40631      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.07125 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -368.96840    -42.11493    -38.63956    -38.63955    -38.63627     -3.76022     -2.36290     -2.36289     -2.34979     -0.16446      0.07299      0.07299      0.07462      0.86155      0.86155      0.87401      0.87408      0.90972      4.66812 \n   </alphaeps>\n   <betaeps>\n  -368.96580    -42.01749    -38.56561    -38.55964    -38.55964     -3.51690     -2.12247     -2.11073     -2.11073     -0.11467      0.12217      0.12217      0.13565      1.12709      1.12709      1.14194      1.14616      1.14619      4.82199 \n   </betaeps>\n   <alphavectors>\n     0.99764      0.42714     -0.00000     -0.00000     -0.00000     -0.16749      0.00000     -0.00000      0.00000     -0.03723      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00035      0.02718 \n     0.00673     -1.02906      0.00000      0.00000      0.00000      0.49171     -0.00000      0.00000     -0.00000      0.13196     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00085     -0.80555 \n     0.00000      0.00000     -0.00000      0.00000      0.99319     -0.00000     -0.00000     -0.00000     -0.35583     -0.00000     -0.00000     -0.00000      0.09959     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000      0.99316     -0.00000      0.00000     -0.00000     -0.35599      0.00000     -0.00000     -0.00000      0.09932      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.99316     -0.00000      0.00000     -0.00000      0.35599     -0.00000     -0.00000     -0.00000      0.09932      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000 \n    -0.09447     -3.31133      0.00000     -0.00000     -0.00000     -2.72792      0.00000     -0.00000      0.00000     -3.19427      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00001     -0.00000     -0.01682     88.65542 \n    -0.00000     -0.00000     -0.00000     -0.00000      0.02034     -0.00000      0.00000      0.00000      1.03135     -0.00000      0.00000      0.00000     -0.30842      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.02043     -0.00000      0.00000      0.00000      1.03160     -0.00000     -0.00000      0.00000     -0.30759     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.00000     -0.00000      0.02043     -0.00000      0.00000     -0.00000     -1.03160      0.00000      0.00000     -0.00000     -0.30759     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.04176      1.44385     -0.00000      0.00000      0.00000      0.74949      0.00000      0.00000      0.00000      1.31434     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00007      0.00000      1.00862    -39.58612 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.04176      1.44373      0.00000      0.00000      0.00000      0.74634     -0.00000      0.00000     -0.00000      1.31282      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.86600     -0.00000     -0.49143    -39.58656 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000 \n     0.04176      1.44373     -0.00000      0.00000      0.00000      0.74634      0.00000      0.00000      0.00000      1.31282     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.86605      0.00000     -0.49133    -39.58656 \n    -0.00032     -0.00519      0.00000      0.00000      0.00000     -0.05669      0.00000      0.00000     -0.00000      1.00173      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00104      0.47049 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00226      0.00000      0.00000      0.00000      0.10575      0.00000     -0.00000     -0.00000      1.01215      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000     -0.00227      0.00000     -0.00000      0.00000      0.10493     -0.00000     -0.00000     -0.00000      1.01223      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000     -0.00227      0.00000     -0.00000      0.00000     -0.10493      0.00000      0.00000      0.00000      1.01223      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99764      0.42744      0.00000      0.00000      0.00000     -0.16625     -0.00000     -0.00000     -0.00000      0.03849     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00032     -0.00000      0.00000      0.02810 \n     0.00672     -1.03078     -0.00000     -0.00000     -0.00000      0.48315      0.00000      0.00000      0.00000     -0.13164      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00032      0.00000      0.00000     -0.80858 \n     0.00000      0.00000     -0.99367      0.00000      0.00000     -0.00000      0.35290     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.10508      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000      0.99370      0.00000     -0.00000      0.00000      0.35252      0.00000      0.00000      0.10603     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.99370     -0.00000     -0.00000     -0.00000     -0.35252      0.00000     -0.00000      0.10603     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.09435     -3.20962     -0.00000     -0.00000     -0.00000     -2.08398     -0.00000     -0.00000     -0.00000      2.71952     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.15116      0.00007     -0.00000     88.69233 \n    -0.00000     -0.00000     -0.01894     -0.00000      0.00000     -0.00000     -1.02617      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.32533     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000      0.01884     -0.00000      0.00000     -0.00000     -1.02527     -0.00000     -0.00000     -0.32817      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.01884     -0.00000     -0.00000      0.00000      1.02527      0.00000     -0.00000     -0.32817      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000 \n     0.04171      1.39904      0.00000      0.00000      0.00000      0.45889     -0.00000      0.00000     -0.00000     -1.09457      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.93128      0.00039     -0.00000    -39.60074 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.73205      0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205     -0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n     0.04171      1.39922      0.00000      0.00000      0.00000      0.46191      0.00000      0.00000      0.00000     -1.09810     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.56834     -0.86627     -0.00000    -39.59800 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.73205      0.00000 \n     0.04171      1.39922      0.00000      0.00000      0.00000      0.46190      0.00000      0.00000      0.00000     -1.09810      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.56908      0.86578      0.00000    -39.59800 \n    -0.00032     -0.00493     -0.00000      0.00000      0.00000     -0.06285      0.00000     -0.00000      0.00000     -1.00379     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00308      0.00000     -0.00000      0.46527 \n     0.00000      0.00000      0.00207      0.00000     -0.00000      0.00000     -0.12236      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.01027     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.00206      0.00000      0.00000     -0.00000     -0.12515     -0.00000      0.00000      1.00993     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00206      0.00000      0.00000      0.00000      0.12515     -0.00000      0.00000      1.00993     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Ge\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.42419     -1.06244      0.00000      0.00000      0.00000     -1.62706      0.00000      0.00000      0.00000      0.87087      0.00000      0.00000      0.87086      0.00000      0.87086     -0.06970      0.00000      0.00000      0.00000 \n    -1.06244      2.69098      0.00000      0.00000      0.00000      2.30504      0.00000      0.00000      0.00000     -1.48212      0.00000      0.00000     -1.48206      0.00000     -1.48206      0.27495      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.25902      0.00000      0.00000      0.00000     -0.76389      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02051      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.25904      0.00000      0.00000      0.00000     -0.76388      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02049      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.25903      0.00000      0.00000      0.00000     -0.76387      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.02046 \n    -1.62706      2.30504      0.00000      0.00000      0.00000     89.37763      0.00000      0.00000      0.00000    -35.64817      0.00000      0.00000    -35.65316      0.00000    -35.65383     -9.50915      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.76389      0.00000      0.00000      0.00000      2.25339      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08859      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.76388      0.00000      0.00000      0.00000      2.25336      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08851      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.76387      0.00000      0.00000      0.00000      2.25333      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.08840 \n     0.87087     -1.48212      0.00000      0.00000      0.00000    -35.64817      0.00000      0.00000      0.00000     16.43729      0.00000      0.00000     13.52737      0.00000     13.52840      4.05262      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.80641      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.80425      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.87086     -1.48206      0.00000      0.00000      0.00000    -35.65316      0.00000      0.00000      0.00000     13.52737      0.00000      0.00000     16.43280      0.00000     13.53950      4.05265      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.78649      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.87086     -1.48206      0.00000      0.00000      0.00000    -35.65383      0.00000      0.00000      0.00000     13.52840      0.00000      0.00000     13.53950      0.00000     16.43269      4.05265      0.00000      0.00000      0.00000 \n    -0.06970      0.27495      0.00000      0.00000      0.00000     -9.50915      0.00000      0.00000      0.00000      4.05262      0.00000      0.00000      4.05265      0.00000      4.05265      1.98809      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.02051      0.00000      0.00000      0.00000     -0.08859      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.81890      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.02049      0.00000      0.00000      0.00000     -0.08851      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.81850      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.02046      0.00000      0.00000      0.00000     -0.08840      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.81817 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.95680      0.95288      0.95242      0.94220      0.94219      0.77734      0.77696      0.77664      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.98664      0.98663      0.98437      0.98259      0.98233      0.00001      0.00001      0.00001      0.00000 \n   </betaocc>\n   <alphaeps>\n  -396.00920    -46.74423    -43.19253    -43.19179    -43.19174     -4.97835     -3.51609     -3.51425     -3.51416     -0.32815     -0.05971     -0.05913     -0.05906     -0.05771     -0.05771     -0.04625     -0.04624     -0.04622      4.93838 \n   </alphaeps>\n   <betaeps>\n  -396.00610    -46.74716    -43.19333    -43.19327    -43.19291     -4.98435     -3.52075     -3.52064     -3.51934     -0.25639     -0.06679     -0.06679     -0.06592     -0.06531     -0.06522      0.02590      0.02592      0.02630      4.95292 \n   </betaeps>\n   <alphavectors>\n     0.99783      0.42904      0.00000      0.00000     -0.00000     -0.17515      0.00000     -0.00000      0.00000      0.04087     -0.00008      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.02399 \n     0.00619     -1.02715     -0.00000     -0.00000      0.00000      0.51520     -0.00000     -0.00000     -0.00000     -0.15662      0.00020     -0.00000     -0.00000      0.00000      0.00001      0.00000      0.00000     -0.00000     -0.82926 \n     0.00000     -0.00000     -0.99355      0.00000     -0.00000      0.00000      0.37204      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.09942     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000      0.00000      0.99356      0.00000      0.00000      0.00000     -0.37202      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.09946      0.00000      0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.99356      0.00000      0.00000     -0.00000     -0.37202      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.09946     -0.00000 \n    -0.08925     -3.37445      0.00000     -0.00000     -0.00000     -2.96331     -0.00000      0.00000      0.00000      4.82226      0.00266      0.00000     -0.00000      0.00000      0.00006     -0.00000     -0.00000      0.00000     90.77962 \n    -0.00000      0.00000     -0.01858      0.00000     -0.00000     -0.00000     -1.04389     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.30290      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000      0.01857     -0.00000     -0.00000     -0.00000      1.04386     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.30301     -0.00000     -0.00000 \n    -0.00000      0.00000      0.00000     -0.00000     -0.01857     -0.00000     -0.00000      0.00000      1.04386     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.30301     -0.00000 \n     0.03947      1.47086     -0.00000      0.00000     -0.00000      0.84888     -0.00000      0.00000      0.00000     -2.03190      0.99838     -0.00000     -0.00000      0.00000      0.01977      0.00000      0.00000     -0.00000    -40.53949 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.03947      1.47088     -0.00000      0.00000      0.00000      0.84930      0.00000     -0.00000     -0.00000     -2.03319     -0.51849     -0.00000     -0.00000      0.00000      0.85591      0.00000      0.00000     -0.00000    -40.53937 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.03947      1.47088     -0.00000      0.00000     -0.00000      0.84932      0.00000     -0.00000      0.00000     -2.03323     -0.48417      0.00000      0.00000     -0.00000     -0.87580      0.00000      0.00000     -0.00000    -40.53936 \n    -0.00033     -0.00538      0.00000     -0.00000     -0.00000     -0.04856      0.00000     -0.00000     -0.00000     -0.99650      0.00090      0.00000     -0.00000      0.00000      0.00004      0.00000      0.00000     -0.00000      0.53602 \n     0.00000     -0.00000      0.00215     -0.00000      0.00000      0.00000     -0.07417     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.01975     -0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00214     -0.00000      0.00000     -0.00000      0.07427     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.01974      0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00214      0.00000     -0.00000      0.00000      0.07427      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.01974      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99783      0.42903      0.00000      0.00000      0.00000      0.17527      0.00000      0.00000     -0.00000      0.04060     -0.00001     -0.00000     -0.00006      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.02383 \n    -0.00619     -1.02708     -0.00000     -0.00000     -0.00000     -0.51587     -0.00000     -0.00000      0.00000     -0.15776      0.00002      0.00000      0.00016     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.82870 \n     0.00000      0.00000      0.00000     -0.00000     -0.99353     -0.00000      0.00000      0.00000     -0.37240      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.09828     -0.00000 \n     0.00000      0.00000     -0.99353     -0.00000      0.00000     -0.00000     -0.37241     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.09826     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.99353     -0.00000     -0.00000      0.00000     -0.37241      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.09826      0.00000      0.00000 \n     0.08920     -3.37785     -0.00000     -0.00000     -0.00000      3.00608      0.00000      0.00000     -0.00000      5.04906     -0.00005     -0.00000      0.00007     -0.00000     -0.00000     -0.00000     -0.00000      0.00000    -90.76576 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.01864      0.00000     -0.00000     -0.00000      1.04483     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.29965      0.00000 \n     0.00000     -0.00000     -0.01865      0.00000     -0.00000      0.00000      1.04484      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.29960      0.00000      0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000      0.01865     -0.00000     -0.00000     -0.00000      1.04484     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.29960     -0.00000      0.00000 \n    -0.03945      1.47237      0.00000      0.00000      0.00000     -0.86824      0.00000     -0.00000      0.00000     -2.13564     -0.05639      0.00000     -0.99862      0.00000      0.00000      0.00000      0.00000     -0.00000     40.53366 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000      0.00000      0.00000      0.00000 \n    -0.03945      1.47235      0.00000      0.00000      0.00000     -0.86793      0.00000     -0.00000     -0.00000     -2.13459      0.89284      0.00000      0.45016      0.00000      0.00000     -0.00000     -0.00000     -0.00000     40.53373 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.03945      1.47236      0.00000      0.00000      0.00000     -0.86795     -0.00000     -0.00000      0.00000     -2.13467     -0.83646     -0.00000      0.54783     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     40.53372 \n     0.00033     -0.00539     -0.00000      0.00000     -0.00000      0.04685     -0.00000      0.00000      0.00000     -0.99522      0.00009      0.00000      0.00069     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.53855 \n     0.00000      0.00000      0.00000      0.00000      0.00215     -0.00000     -0.00000     -0.00000      0.07099      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -1.01997     -0.00000 \n     0.00000      0.00000      0.00215     -0.00000      0.00000     -0.00000      0.07094      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.01998      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00215      0.00000      0.00000     -0.00000      0.07095      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -1.01998      0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"As\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.43164     -1.07247      0.00000      0.00000      0.00000     -2.28663      0.00000      0.00000      0.00000      1.17210      0.00000      0.00000      1.17210      0.00000      1.17210     -0.07637      0.00000      0.00000      0.00000 \n    -1.07247      2.69160      0.00000      0.00000      0.00000      4.27258      0.00000      0.00000      0.00000     -2.36697      0.00000      0.00000     -2.36697      0.00000     -2.36697      0.29081      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.28383      0.00000      0.00000      0.00000     -0.80686      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04409      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.28383      0.00000      0.00000      0.00000     -0.80686      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04409      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.28383      0.00000      0.00000      0.00000     -0.80686      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.04409 \n    -2.28663      4.27258      0.00000      0.00000      0.00000     69.08434      0.00000      0.00000      0.00000    -28.21462      0.00000      0.00000    -28.21462      0.00000    -28.21462     -8.95673      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.80686      0.00000      0.00000      0.00000      2.29452      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15575      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.80686      0.00000      0.00000      0.00000      2.29452      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15575      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.80686      0.00000      0.00000      0.00000      2.29452      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.15575 \n     1.17210     -2.36697      0.00000      0.00000      0.00000    -28.21462      0.00000      0.00000      0.00000     13.91001      0.00000      0.00000     10.91002      0.00000     10.91003      3.79202      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     1.17210     -2.36697      0.00000      0.00000      0.00000    -28.21462      0.00000      0.00000      0.00000     10.91002      0.00000      0.00000     13.91002      0.00000     10.91003      3.79202      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n     1.17210     -2.36697      0.00000      0.00000      0.00000    -28.21462      0.00000      0.00000      0.00000     10.91003      0.00000      0.00000     10.91003      0.00000     13.91003      3.79202      0.00000      0.00000      0.00000 \n    -0.07637      0.29081      0.00000      0.00000      0.00000     -8.95673      0.00000      0.00000      0.00000      3.79202      0.00000      0.00000      3.79202      0.00000      3.79202      1.99762      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.04409      0.00000      0.00000      0.00000     -0.15575      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05206      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.04409      0.00000      0.00000      0.00000     -0.15575      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05206      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.04409      0.00000      0.00000      0.00000     -0.15575      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.05206 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99948      0.99948      0.99948      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00052      0.00052      0.00052      0.00000 \n   </betaocc>\n   <alphaeps>\n  -422.71380    -50.33420    -46.67684    -46.67684    -46.67684     -5.48128     -3.97824     -3.97824     -3.97824     -0.38058     -0.27139     -0.27139     -0.27139     -0.27139     -0.27139     -0.07231     -0.07231     -0.07231      5.63239 \n   </alphaeps>\n   <betaeps>\n  -422.70910    -50.32963    -46.67151    -46.67151    -46.67151     -5.47114     -3.96724     -3.96724     -3.96724     -0.28833     -0.26178     -0.26178     -0.26178     -0.26178     -0.26178      0.02048      0.02048      0.02048      5.66148 \n   </betaeps>\n   <alphavectors>\n    -0.99793      0.43003      0.00000      0.00000      0.00000     -0.18173     -0.00000      0.00000      0.00000     -0.04462     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.02747 \n    -0.00590     -1.02387     -0.00000     -0.00000     -0.00000      0.51947      0.00000     -0.00000     -0.00000      0.16498     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.86150 \n     0.00000     -0.00000     -0.00000     -0.00000      0.99361      0.00000     -0.38596     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.10550      0.00000 \n     0.00000      0.00000      0.00000     -0.99361      0.00000     -0.00000     -0.00000      0.00000     -0.38596      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.10550      0.00000      0.00000 \n    -0.00000     -0.00000      0.99361     -0.00000     -0.00000      0.00000      0.00000      0.38596     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.10550     -0.00000     -0.00000      0.00000 \n     0.08536     -3.47178     -0.00000     -0.00000     -0.00000     -1.26398      0.00000     -0.00000     -0.00000     -4.46213      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     91.64936 \n    -0.00000      0.00000      0.00000      0.00000      0.01778     -0.00000      1.04761      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.31142     -0.00000 \n    -0.00000     -0.00000     -0.00000     -0.01778     -0.00000      0.00000      0.00000     -0.00000      1.04761     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.31142     -0.00000     -0.00000 \n     0.00000      0.00000      0.01778      0.00000      0.00000     -0.00000     -0.00000     -1.04761      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.31142      0.00000      0.00000     -0.00000 \n    -0.03775      1.51259      0.00000      0.00000      0.00000      0.08909     -0.00000      0.00000      0.00000      1.86472      0.98916     -0.14681     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000    -40.91186 \n    -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000 \n    -0.03775      1.51259      0.00000      0.00000      0.00000      0.08909     -0.00000      0.00000      0.00000      1.86472     -0.62173     -0.78323     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000    -40.91186 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -1.73205     -0.00000      0.00000      0.00000     -0.00000 \n    -0.03775      1.51259      0.00000      0.00000      0.00000      0.08909     -0.00000      0.00000      0.00000      1.86472     -0.36744      0.93005     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000    -40.91186 \n     0.00032     -0.00542     -0.00000     -0.00000     -0.00000     -0.04967      0.00000     -0.00000     -0.00000      0.99878      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.53608 \n     0.00000     -0.00000     -0.00000     -0.00000     -0.00194      0.00000      0.07877     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.01986      0.00000 \n     0.00000      0.00000      0.00000      0.00194      0.00000     -0.00000     -0.00000      0.00000      0.07877      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.01986      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00194     -0.00000     -0.00000      0.00000      0.00000     -0.07877     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      1.01986      0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99794     -0.43003      0.00000      0.00000      0.00000     -0.18181     -0.00000      0.00000     -0.00000     -0.04434      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.02735 \n     0.00589      1.02391     -0.00000     -0.00000     -0.00000      0.51981      0.00000     -0.00000      0.00000      0.16601     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.86105 \n     0.00000     -0.00000      0.00000      0.00000     -0.99362      0.00000     -0.38625      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.10435     -0.00000 \n     0.00000     -0.00000      0.00000     -0.99362      0.00000     -0.00000     -0.00000      0.00000     -0.38625     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.10435      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.99362     -0.00000     -0.00000      0.00000      0.00000     -0.38625      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.10435      0.00000      0.00000 \n    -0.08527      3.46939     -0.00000     -0.00000     -0.00000     -1.27913      0.00000     -0.00000      0.00000     -4.67284     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000    -91.63874 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.01777     -0.00000      1.04853     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.30830      0.00000 \n    -0.00000      0.00000     -0.00000     -0.01777     -0.00000      0.00000      0.00000     -0.00000      1.04853      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.30830     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000      0.01777      0.00000      0.00000     -0.00000     -0.00000      1.04853     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.30830     -0.00000     -0.00000 \n     0.03771     -1.51153      0.00000      0.00000      0.00000      0.09562     -0.00000      0.00000     -0.00000      1.95966      0.99665     -0.08177      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     40.90745 \n    -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000      0.00000 \n     0.03771     -1.51153      0.00000      0.00000      0.00000      0.09562     -0.00000      0.00000     -0.00000      1.95966     -0.56914     -0.82224      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     40.90745 \n    -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000 \n     0.03771     -1.51153      0.00000      0.00000      0.00000      0.09562     -0.00000      0.00000     -0.00000      1.95966     -0.42751      0.90401      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     40.90745 \n    -0.00032      0.00542     -0.00000     -0.00000     -0.00000     -0.04786      0.00000      0.00000     -0.00000      0.99762     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.53839 \n     0.00000     -0.00000      0.00000      0.00000      0.00194      0.00000      0.07573      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      1.02009     -0.00000 \n     0.00000     -0.00000      0.00000      0.00194      0.00000     -0.00000     -0.00000      0.00000      0.07573     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      1.02009      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.00194     -0.00000     -0.00000      0.00000      0.00000      0.07573      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -1.02009      0.00000      0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Se\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.43850     -1.08490      0.00000      0.00000      0.00000     -2.57595      0.00000      0.00000      0.00000      1.30769      0.00000      0.00000      1.30769      0.00000      1.30769     -0.07978      0.00000      0.00000      0.00000 \n    -1.08490      2.71102      0.00000      0.00000      0.00000      5.00438      0.00000      0.00000      0.00000     -2.70665      0.00000      0.00000     -2.70665      0.00000     -2.70665      0.31323      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.31135      0.00000      0.00000      0.00000     -0.85547      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08331      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.31135      0.00000      0.00000      0.00000     -0.85547      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08331      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.31135      0.00000      0.00000      0.00000     -0.85547      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.08331 \n    -2.57595      5.00438      0.00000      0.00000      0.00000     77.88196      0.00000      0.00000      0.00000    -32.88465      0.00000      0.00000    -32.88465      0.00000    -32.88465    -10.19105      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.85547      0.00000      0.00000      0.00000      2.35127      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.26233      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.85547      0.00000      0.00000      0.00000      2.35127      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.26233      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.85547      0.00000      0.00000      0.00000      2.35127      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.26233 \n     1.30769     -2.70665      0.00000      0.00000      0.00000    -32.88465      0.00000      0.00000      0.00000     16.33162      0.00000      0.00000     13.33161      0.00000     13.33159      4.33904      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     1.30769     -2.70665      0.00000      0.00000      0.00000    -32.88465      0.00000      0.00000      0.00000     13.33161      0.00000      0.00000     16.33161      0.00000     13.33161      4.33904      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n     1.30769     -2.70665      0.00000      0.00000      0.00000    -32.88465      0.00000      0.00000      0.00000     13.33159      0.00000      0.00000     13.33161      0.00000     16.33162      4.33904      0.00000      0.00000      0.00000 \n    -0.07978      0.31323      0.00000      0.00000      0.00000    -10.19105      0.00000      0.00000      0.00000      4.33904      0.00000      0.00000      4.33904      0.00000      4.33904      1.98237      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.08331      0.00000      0.00000      0.00000     -0.26233      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.39668      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.08331      0.00000      0.00000      0.00000     -0.26233      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.39668      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.08331      0.00000      0.00000      0.00000     -0.26233      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.39668 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99987      0.99987      0.99987      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.33346      0.33346      0.33346      0.00000 \n   </betaocc>\n   <alphaeps>\n  -450.81780    -54.57346    -50.79264    -50.79264    -50.79264     -6.33743     -4.79075     -4.79075     -4.79075     -0.84620     -0.84620     -0.84620     -0.84620     -0.84620     -0.47418     -0.13951     -0.13951     -0.13951      6.11317 \n   </alphaeps>\n   <betaeps>\n  -450.81460    -54.57041    -50.78907    -50.78907    -50.78907     -6.33079     -4.78370     -4.78370     -4.78370     -0.83993     -0.83993     -0.83993     -0.83993     -0.83993     -0.41695     -0.08178     -0.08178     -0.08178      6.13208 \n   </betaeps>\n   <alphavectors>\n    -0.99813     -0.43070     -0.00000     -0.00000     -0.00000     -0.18804     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.04603      0.00000     -0.00000     -0.00000     -0.02943 \n    -0.00533      1.02174      0.00000      0.00000      0.00000      0.52962      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.17548     -0.00000      0.00000      0.00000      0.88608 \n     0.00000      0.00000     -0.00000      0.00000      0.99403     -0.00000      0.00000     -0.00000      0.40027     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.10475     -0.00000 \n     0.00000     -0.00000      0.99403     -0.00000      0.00000      0.00000      0.40027      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -0.10475      0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000     -0.00000     -0.99403     -0.00000      0.00000      0.00000      0.40027     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.10475      0.00000      0.00000 \n     0.07699      3.50023     -0.00000      0.00000      0.00000     -0.30904      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -5.09797     -0.00000     -0.00000     -0.00000    -92.10462 \n     0.00000     -0.00000     -0.00000      0.00000      0.01609      0.00000     -0.00000      0.00000     -1.05569      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.30144      0.00000 \n     0.00000      0.00000      0.01609     -0.00000      0.00000     -0.00000     -1.05569      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.30144     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.01609      0.00000     -0.00000      0.00000     -1.05569      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.30144     -0.00000     -0.00000 \n    -0.03406     -1.52419      0.00000     -0.00000     -0.00000     -0.33979     -0.00000      0.00000     -0.00000      0.50000      0.00000     -0.00000     -0.86603      0.00000      2.14818      0.00000      0.00000      0.00000     41.10227 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000     -0.00000     -0.00000 \n    -0.03406     -1.52419      0.00000     -0.00000     -0.00000     -0.33979     -0.00000      0.00000     -0.00000     -1.00000     -0.00000      0.00000      0.00000      0.00000      2.14818      0.00000      0.00000      0.00000     41.10227 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000 \n    -0.03406     -1.52419      0.00000     -0.00000     -0.00000     -0.33979     -0.00000      0.00000     -0.00000      0.50000      0.00000     -0.00000      0.86603     -0.00000      2.14818      0.00000      0.00000      0.00000     41.10227 \n     0.00029      0.00531      0.00000      0.00000      0.00000     -0.04507      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.99489      0.00000      0.00000      0.00000     -0.53703 \n     0.00000      0.00000      0.00000     -0.00000     -0.00159     -0.00000      0.00000     -0.00000     -0.07042     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.01989     -0.00000 \n     0.00000     -0.00000     -0.00159      0.00000     -0.00000      0.00000     -0.07042     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.01989      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00159     -0.00000      0.00000     -0.00000     -0.07042     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.01989      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99813     -0.43071      0.00000      0.00000      0.00000     -0.18808     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.04587      0.00000      0.00000     -0.00000     -0.02935 \n    -0.00533      1.02176     -0.00000     -0.00000     -0.00000      0.52984      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.17606     -0.00000     -0.00000      0.00000      0.88581 \n     0.00000      0.00000     -0.00000     -0.99404     -0.00000     -0.00000      0.00000     -0.00000     -0.40042     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.10415      0.00000      0.00000 \n     0.00000     -0.00000      0.99404     -0.00000     -0.00000     -0.00000      0.40042     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.10415      0.00000      0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000      0.99404      0.00000     -0.00000     -0.40042     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.10415     -0.00000 \n     0.07694      3.49880      0.00000     -0.00000     -0.00000     -0.32039     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -5.21435     -0.00000     -0.00000      0.00000    -92.09812 \n     0.00000     -0.00000     -0.00000     -0.01608      0.00000      0.00000     -0.00000      0.00000      1.05614      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.29987      0.00000     -0.00000 \n     0.00000      0.00000      0.01608     -0.00000     -0.00000      0.00000     -1.05614      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.29987     -0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.01608     -0.00000      0.00000      1.05614      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.29987      0.00000 \n    -0.03403     -1.52356     -0.00000      0.00000      0.00000     -0.33485     -0.00000      0.00000     -0.00000     -0.50000      0.00000      0.00000     -0.86603      0.00000      2.20060      0.00000      0.00000     -0.00000     41.09956 \n     0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      1.73205     -0.00000      0.00000      0.00000      0.00000     -0.00000 \n    -0.03403     -1.52356     -0.00000      0.00000      0.00000     -0.33485      0.00000      0.00000     -0.00000      1.00000     -0.00000     -0.00000      0.00000      0.00000      2.20060      0.00000      0.00000     -0.00000     41.09956 \n     0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.03403     -1.52356      0.00000      0.00000      0.00000     -0.33485     -0.00000      0.00000     -0.00000     -0.50000      0.00000      0.00000      0.86603     -0.00000      2.20060      0.00000      0.00000     -0.00000     41.09956 \n     0.00029      0.00530     -0.00000     -0.00000     -0.00000     -0.04410      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.99425      0.00000      0.00000     -0.00000     -0.53828 \n     0.00000      0.00000      0.00000      0.00159     -0.00000     -0.00000     -0.00000      0.00000      0.06890     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -1.01999     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00159      0.00000      0.00000     -0.00000     -0.06890      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -1.01999      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00159      0.00000      0.00000      0.06890     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.01999     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Br\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.44587     -1.09750      0.00000      0.00000      0.00000     -2.93948      0.00000      0.00000      0.00000      1.47699      0.00000      0.00000      1.47699      0.00000      1.47699     -0.08783      0.00000      0.00000      0.00000 \n    -1.09750      2.72820      0.00000      0.00000      0.00000      5.95425      0.00000      0.00000      0.00000     -3.14496      0.00000      0.00000     -3.14496      0.00000     -3.14496      0.33898      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.33872      0.00000      0.00000      0.00000     -0.90397      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13003      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.33872      0.00000      0.00000      0.00000     -0.90397      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13003      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.33872      0.00000      0.00000      0.00000     -0.90397      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.13003 \n    -2.93948      5.95425      0.00000      0.00000      0.00000     80.00932      0.00000      0.00000      0.00000    -34.56015      0.00000      0.00000    -34.56015      0.00000    -34.56015    -10.33088      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.90397      0.00000      0.00000      0.00000      2.41355      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.38847      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.90397      0.00000      0.00000      0.00000      2.41355      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.38847      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.90397      0.00000      0.00000      0.00000      2.41355      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.38847 \n     1.47699     -3.14496      0.00000      0.00000      0.00000    -34.56015      0.00000      0.00000      0.00000     17.41125      0.00000      0.00000     14.41123      0.00000     14.41122      4.38352      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     1.47699     -3.14496      0.00000      0.00000      0.00000    -34.56015      0.00000      0.00000      0.00000     14.41123      0.00000      0.00000     17.41123      0.00000     14.41123      4.38352      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n     1.47699     -3.14496      0.00000      0.00000      0.00000    -34.56015      0.00000      0.00000      0.00000     14.41122      0.00000      0.00000     14.41123      0.00000     17.41125      4.38352      0.00000      0.00000      0.00000 \n    -0.08783      0.33898      0.00000      0.00000      0.00000    -10.33088      0.00000      0.00000      0.00000      4.38352      0.00000      0.00000      4.38352      0.00000      4.38352      1.98818      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.13003      0.00000      0.00000      0.00000     -0.38847      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.75168      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.13003      0.00000      0.00000      0.00000     -0.38847      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.75167      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.13003      0.00000      0.00000      0.00000     -0.38847      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      1.75168 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.99014      0.99014      0.99014      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.67653      0.67653      0.67653      0.00000 \n   </betaocc>\n   <alphaeps>\n  -479.73150    -58.88461    -55.00390    -55.00390    -55.00390     -7.15842     -5.58052     -5.58052     -5.58052     -1.39528     -1.39528     -1.39528     -1.39528     -1.39528     -0.54117     -0.16964     -0.16964     -0.16964      6.82850 \n   </alphaeps>\n   <betaeps>\n  -479.72970    -58.88299    -55.00199    -55.00199    -55.00199     -7.15499     -5.57693     -5.57693     -5.57693     -1.39206     -1.39206     -1.39206     -1.39206     -1.39206     -0.51493     -0.14315     -0.14315     -0.14315      6.83777 \n   </betaeps>\n   <alphavectors>\n     0.99823     -0.43164     -0.00000     -0.00000     -0.00000     -0.19404      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.05007     -0.00000      0.00000      0.00000     -0.03030 \n     0.00506      1.01893     -0.00000     -0.00000      0.00000      0.53877      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.18836     -0.00000     -0.00000     -0.00000      0.91379 \n     0.00000      0.00000      0.99429     -0.00000      0.00000     -0.00000      0.00000      0.41294     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.11074     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000     -0.99429      0.00000     -0.00000      0.00000      0.41294     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.11074      0.00000 \n     0.00000      0.00000     -0.00000      0.99429     -0.00000     -0.00000     -0.41294     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.11074      0.00000     -0.00000      0.00000 \n    -0.07333      3.58432      0.00000      0.00000     -0.00000      0.56319     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -5.15735      0.00000      0.00000      0.00000    -93.46513 \n    -0.00000     -0.00000      0.01497      0.00000     -0.00000      0.00000     -0.00000     -1.06079      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.31219      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.01497      0.00000     -0.00000      0.00000     -1.06079     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.31219     -0.00000 \n    -0.00000     -0.00000      0.00000      0.01497      0.00000      0.00000      1.06079      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.31219     -0.00000      0.00000     -0.00000 \n     0.03244     -1.56038     -0.00000     -0.00000     -0.00000     -0.73070      0.00000     -0.00000      0.00000      0.86603     -0.00000      0.00000     -0.00000      0.50000      2.16615     -0.00000     -0.00000     -0.00000     41.70275 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.73205      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n     0.03244     -1.56038     -0.00000     -0.00000     -0.00000     -0.73070      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -1.00000      2.16615      0.00000      0.00000     -0.00000     41.70275 \n     0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.03244     -1.56038     -0.00000     -0.00000      0.00000     -0.73070      0.00000     -0.00000      0.00000     -0.86603     -0.00000      0.00000     -0.00000      0.50000      2.16615     -0.00000     -0.00000     -0.00000     41.70275 \n    -0.00029      0.00544      0.00000      0.00000      0.00000     -0.04433     -0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.99618     -0.00000     -0.00000     -0.00000     -0.55937 \n     0.00000      0.00000     -0.00141     -0.00000      0.00000     -0.00000      0.00000     -0.06778     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -1.02250     -0.00000      0.00000 \n    -0.00000     -0.00000      0.00000      0.00000      0.00141     -0.00000      0.00000     -0.00000     -0.06778      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      1.02250     -0.00000 \n     0.00000      0.00000     -0.00000     -0.00141     -0.00000     -0.00000      0.06778     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      1.02250     -0.00000     -0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n     0.99823     -0.43164     -0.00000      0.00000     -0.00000      0.19406      0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.05000     -0.00000      0.00000      0.00000      0.03027 \n     0.00506      1.01894      0.00000     -0.00000      0.00000     -0.53887     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.18857      0.00000     -0.00000     -0.00000     -0.91367 \n    -0.00000     -0.00000     -0.99429      0.00000     -0.00000      0.00000      0.00000      0.41300     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.11049      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000     -0.99429      0.00000     -0.00000      0.00000      0.41300     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000      0.11049      0.00000 \n     0.00000      0.00000      0.00000      0.99429     -0.00000      0.00000      0.41300      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.11049     -0.00000     -0.00000 \n    -0.07331      3.58364      0.00000     -0.00000      0.00000     -0.55791     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -5.20404     -0.00000      0.00000      0.00000     93.46260 \n     0.00000      0.00000     -0.01497     -0.00000      0.00000     -0.00000     -0.00000     -1.06097      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.31156     -0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.01497     -0.00000     -0.00000      0.00000     -1.06097     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.31156      0.00000 \n    -0.00000     -0.00000     -0.00000      0.01497      0.00000     -0.00000     -1.06097     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.31156      0.00000      0.00000 \n     0.03243     -1.56008     -0.00000      0.00000     -0.00000      0.72840      0.00000      0.00000     -0.00000      0.86603     -0.00000     -0.00000      0.00000     -0.50000      2.18719      0.00000     -0.00000     -0.00000    -41.70170 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      1.73205      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.73205      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000 \n     0.03243     -1.56008     -0.00000      0.00000     -0.00000      0.72840      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.00000      2.18719      0.00000     -0.00000     -0.00000    -41.70170 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.73205     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.03243     -1.56008     -0.00000      0.00000      0.00000      0.72840      0.00000      0.00000     -0.00000     -0.86603     -0.00000     -0.00000      0.00000     -0.50000      2.18719      0.00000     -0.00000     -0.00000    -41.70170 \n    -0.00029      0.00544      0.00000     -0.00000     -0.00000      0.04391      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.99592      0.00000     -0.00000     -0.00000      0.55987 \n    -0.00000     -0.00000      0.00140      0.00000     -0.00000      0.00000      0.00000     -0.06717     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -1.02254      0.00000      0.00000      0.00000 \n    -0.00000     -0.00000     -0.00000      0.00000      0.00140      0.00000      0.00000     -0.00000     -0.06717      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      1.02254      0.00000 \n     0.00000      0.00000      0.00000     -0.00140     -0.00000      0.00000     -0.06717      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.02254     -0.00000     -0.00000 \n   </betavectors>\n</atomicguess>\n<atomicguess symbol=\"Kr\" basis=\"sto-6g\">\n   <guessdensitymatrix>\n     2.45338     -1.11027      0.00000      0.00000      0.00000     -3.29941      0.00000      0.00000      0.00000      1.64455      0.00000      0.00000      1.64455      0.00000      1.64455     -0.09576      0.00000      0.00000      0.00000 \n    -1.11027      2.74484      0.00000      0.00000      0.00000      6.90988      0.00000      0.00000      0.00000     -3.58523      0.00000      0.00000     -3.58523      0.00000     -3.58523      0.36308      0.00000      0.00000      0.00000 \n     0.00000      0.00000      2.36673      0.00000      0.00000      0.00000     -0.95345      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18089      0.00000      0.00000 \n     0.00000      0.00000      0.00000      2.36673      0.00000      0.00000      0.00000     -0.95345      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18089      0.00000 \n     0.00000      0.00000      0.00000      0.00000      2.36673      0.00000      0.00000      0.00000     -0.95345      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.18089 \n    -3.29941      6.90988      0.00000      0.00000      0.00000     83.29486      0.00000      0.00000      0.00000    -36.73520      0.00000      0.00000    -36.73520      0.00000    -36.73520    -10.31638      0.00000      0.00000      0.00000 \n     0.00000      0.00000     -0.95345      0.00000      0.00000      0.00000      2.48020      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.52166      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.95345      0.00000      0.00000      0.00000      2.48020      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.52166      0.00000 \n     0.00000      0.00000      0.00000      0.00000     -0.95345      0.00000      0.00000      0.00000      2.48020      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000     -0.52166 \n     1.64455     -3.58523      0.00000      0.00000      0.00000    -36.73520      0.00000      0.00000      0.00000     18.70586      0.00000      0.00000     15.70588      0.00000     15.70588      4.35966      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000 \n     1.64455     -3.58523      0.00000      0.00000      0.00000    -36.73520      0.00000      0.00000      0.00000     15.70588      0.00000      0.00000     18.70588      0.00000     15.70587      4.35966      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      5.99999      0.00000      0.00000      0.00000      0.00000      0.00000 \n     1.64455     -3.58523      0.00000      0.00000      0.00000    -36.73520      0.00000      0.00000      0.00000     15.70588      0.00000      0.00000     15.70587      0.00000     18.70590      4.35966      0.00000      0.00000      0.00000 \n    -0.09576      0.36308      0.00000      0.00000      0.00000    -10.31638      0.00000      0.00000      0.00000      4.35966      0.00000      0.00000      4.35966      0.00000      4.35966      1.99590      0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.18089      0.00000      0.00000      0.00000     -0.52166      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.10990      0.00000      0.00000 \n     0.00000      0.00000      0.00000      0.18089      0.00000      0.00000      0.00000     -0.52166      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.10990      0.00000 \n     0.00000      0.00000      0.00000      0.00000      0.18089      0.00000      0.00000      0.00000     -0.52166      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      0.00000      2.10990 \n   </guessdensitymatrix>\n   <alphaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000 \n   </alphaocc>\n   <betaocc>\n     1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      1.00000      0.00000 \n   </betaocc>\n   <alphaeps>\n  -509.55820    -63.36822    -59.38328    -59.38328    -59.38328     -8.01006     -6.40584     -6.40584     -6.40584     -1.97955     -1.97955     -1.97955     -1.97955     -1.97955     -0.60893     -0.20083     -0.20083     -0.20083      7.60816 \n   </alphaeps>\n   <betaeps>\n  -509.55820    -63.36822    -59.38328    -59.38328    -59.38328     -8.01006     -6.40584     -6.40584     -6.40584     -1.97955     -1.97955     -1.97955     -1.97955     -1.97955     -0.60893     -0.20083     -0.20083     -0.20083      7.60816 \n   </betaeps>\n   <alphavectors>\n     0.99841      0.43253      0.00000     -0.00000     -0.00000     -0.19966     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.05403     -0.00000      0.00000     -0.00000      0.03120 \n     0.00453     -1.01635     -0.00000      0.00000      0.00000      0.54713      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.20020      0.00000     -0.00000      0.00000     -0.94055 \n     0.00000      0.00000      0.00000      0.99459     -0.00000     -0.00000     -0.00000      0.00000     -0.42489     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.11673     -0.00000 \n     0.00000      0.00000     -0.99459     -0.00000     -0.00000     -0.00000      0.42489      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000      0.11673      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000     -0.99459     -0.00000     -0.00000     -0.42489      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.11673      0.00000      0.00000 \n    -0.06550     -3.66375     -0.00000      0.00000      0.00000      1.38590      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      5.12829      0.00000     -0.00000      0.00000     94.76856 \n     0.00000     -0.00000     -0.00000      0.01383      0.00000      0.00000      0.00000     -0.00000      1.06564      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000     -0.32299      0.00000 \n     0.00000     -0.00000     -0.01383      0.00000      0.00000      0.00000     -1.06564     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.32299      0.00000     -0.00000     -0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.01383      0.00000      0.00000      1.06564     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000      0.32299     -0.00000     -0.00000 \n     0.02900      1.59461      0.00000     -0.00000     -0.00000     -1.09934     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.50057      0.86569     -2.14494     -0.00000      0.00000     -0.00000    -42.27796 \n     0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      0.00000 \n     0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.73205      0.00000      0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000 \n     0.02900      1.59461      0.00000     -0.00000     -0.00000     -1.09934     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      1.00000      0.00066     -2.14494     -0.00000      0.00000     -0.00000    -42.27796 \n     0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000 \n     0.02900      1.59461      0.00000     -0.00000     -0.00000     -1.09934     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.49943     -0.86636     -2.14494     -0.00000      0.00000     -0.00000    -42.27796 \n    -0.00028     -0.00558     -0.00000      0.00000      0.00000     -0.04374     -0.00000      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.99800     -0.00000      0.00000     -0.00000      0.57926 \n     0.00000      0.00000      0.00000     -0.00120     -0.00000     -0.00000     -0.00000      0.00000      0.06592     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000      1.02499     -0.00000 \n     0.00000      0.00000      0.00120     -0.00000     -0.00000     -0.00000     -0.06592      0.00000      0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000      1.02499      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000     -0.00000      0.00000      0.00120     -0.00000     -0.00000      0.06592      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000     -1.02499      0.00000      0.00000 \n   </alphavectors>\n   <betavectors>\n    -0.99841      0.43253     -0.00000     -0.00000     -0.00000      0.19966      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.05403      0.00000     -0.00000      0.00000      0.03120 \n    -0.00453     -1.01635      0.00000      0.00000      0.00000     -0.54713     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000     -0.20020     -0.00000      0.00000     -0.00000     -0.94055 \n     0.00000     -0.00000      0.00000     -0.99459      0.00000     -0.00000     -0.00000     -0.42489      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.11673      0.00000      0.00000 \n     0.00000     -0.00000     -0.99459      0.00000      0.00000     -0.00000      0.42489      0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.00000      0.00000     -0.11673     -0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000      0.99459      0.00000      0.00000     -0.00000      0.42489      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      0.11673      0.00000 \n     0.06550     -3.66375      0.00000      0.00000      0.00000     -1.38590     -0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      5.12829      0.00000     -0.00000      0.00000     94.76856 \n    -0.00000      0.00000     -0.00000     -0.01383     -0.00000      0.00000      0.00000      1.06564     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.32299     -0.00000     -0.00000 \n    -0.00000      0.00000     -0.01383     -0.00000     -0.00000      0.00000     -1.06564     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      0.32299      0.00000     -0.00000      0.00000 \n     0.00000     -0.00000      0.00000      0.00000      0.01383     -0.00000     -0.00000      0.00000     -1.06564     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.32299     -0.00000 \n    -0.02900      1.59461     -0.00000     -0.00000     -0.00000      1.09934      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.49827     -0.86702     -2.14494     -0.00000      0.00000     -0.00000    -42.27796 \n     0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.73205     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000      0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000     -0.00000      1.73205     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000      0.00000 \n    -0.02900      1.59461     -0.00000     -0.00000     -0.00000      1.09934      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -1.00000      0.00199     -2.14494     -0.00000      0.00000     -0.00000    -42.27796 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00000      0.00000      0.00000     -0.00000     -0.00000     -1.73205     -0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000     -0.00000     -0.00000      0.00000 \n    -0.02900      1.59461     -0.00000     -0.00000     -0.00000      1.09934      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.50173      0.86503     -2.14494     -0.00000      0.00000     -0.00000    -42.27796 \n     0.00028     -0.00558      0.00000      0.00000      0.00000      0.04374      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.99800     -0.00000      0.00000     -0.00000      0.57926 \n     0.00000     -0.00000      0.00000      0.00120      0.00000     -0.00000     -0.00000      0.06592      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000      0.00000      1.02499      0.00000      0.00000 \n     0.00000     -0.00000      0.00120      0.00000      0.00000     -0.00000     -0.06592      0.00000      0.00000     -0.00000      0.00000      0.00000      0.00000     -0.00000      0.00000     -1.02499      0.00000      0.00000     -0.00000 \n    -0.00000      0.00000     -0.00000     -0.00000     -0.00120      0.00000      0.00000     -0.00000     -0.06592      0.00000      0.00000     -0.00000     -0.00000      0.00000     -0.00000     -0.00000      0.00000      1.02499      0.00000 \n   </betavectors>\n</atomicguess>\n"
  },
  {
    "path": "src/madness/chem/structure_library",
    "content": "structure=h\ngeometry\nmolecule\nh 0 0 0\nend\n\nstructure=he\ngeometry\nmolecule\nhe 0 0 0\nend\n\nstructure=li\ngeometry\nmolecule\nli 0 0 0\nend\n\nstructure=be\ngeometry\nmolecule\nbe 0 0 0\nend\n\nstructure=b\ngeometry\nmolecule\nb 0 0 0\nend\n\nstructure=c\ngeometry\nmolecule\nc 0 0 0\nend\n\nstructure=n\ngeometry\nmolecule\nn 0 0 0\nend\n\nstructure=o\ngeometry\nmolecule\no 0 0 0\nend\n\nstructure=f\ngeometry\nmolecule\nf 0 0 0\nend\n\nstructure=ne\ngeometry\nmolecule\nne 0 0 0\nend\n\nstructure=na\ngeometry\nmolecule\nna 0 0 0\nend\n\nstructure=mg\ngeometry\nmolecule\nmg 0 0 0\nend\n\nstructure=al\ngeometry\nmolecule\nal 0 0 0\nend\n\nstructure=si\ngeometry\nmolecule\nsi 0 0 0\nend\n\nstructure=p\ngeometry\nmolecule\np 0 0 0\nend\n\nstructure=s\ngeometry\nmolecule\ns 0 0 0\nend\n\nstructure=cl\ngeometry\nmolecule\ncl 0 0 0\nend\n\nstructure=ar\ngeometry\nmolecule\nar 0 0 0\nend\n\nstructure=k\ngeometry\nmolecule\nk 0 0 0\nend\n\nstructure=ca\ngeometry\nmolecule\nca 0 0 0\nend\n\nstructure=sc\ngeometry\nmolecule\nsc 0 0 0\nend\n\nstructure=ti\ngeometry\nmolecule\nti 0 0 0\nend\n\nstructure=v\ngeometry\nmolecule\nv 0 0 0\nend\n\nstructure=cr\ngeometry\nmolecule\ncr 0 0 0\nend\n\nstructure=mn\ngeometry\nmolecule\nmn 0 0 0\nend\n\nstructure=fe\ngeometry\nmolecule\nfe 0 0 0\nend\n\nstructure=co\ngeometry\nmolecule\nco 0 0 0\nend\n\nstructure=ni\ngeometry\nmolecule\nni 0 0 0\nend\n\nstructure=cu\ngeometry\nmolecule\ncu 0 0 0\nend\n\nstructure=zn\ngeometry\nmolecule\nzn 0 0 0\nend\n\nstructure=ga\ngeometry\nmolecule\nga 0 0 0\nend\n\nstructure=ge\ngeometry\nmolecule\nge 0 0 0\nend\n\nstructure=as\ngeometry\nmolecule\nas 0 0 0\nend\n\nstructure=se\ngeometry\nmolecule\nse 0 0 0\nend\n\nstructure=br\ngeometry\nmolecule\nbr 0 0 0\nend\n\nstructure=kr\ngeometry\nmolecule\nkr 0 0 0\nend\n\nstructure=rb\ngeometry\nmolecule\nrb 0 0 0\nend\n\nstructure=sr\ngeometry\nmolecule\nsr 0 0 0\nend\n\nstructure=y\ngeometry\nmolecule\ny 0 0 0\nend\n\nstructure=zr\ngeometry\nmolecule\nzr 0 0 0\nend\n\nstructure=nb\ngeometry\nmolecule\nnb 0 0 0\nend\n\nstructure=mo\ngeometry\nmolecule\nmo 0 0 0\nend\n\nstructure=tc\ngeometry\nmolecule\ntc 0 0 0\nend\n\nstructure=ru\ngeometry\nmolecule\nru 0 0 0\nend\n\nstructure=rh\ngeometry\nmolecule\nrh 0 0 0\nend\n\nstructure=pd\ngeometry\nmolecule\npd 0 0 0\nend\n\nstructure=ag\ngeometry\nmolecule\nag 0 0 0\nend\n\nstructure=cd\ngeometry\nmolecule\ncd 0 0 0\nend\n\nstructure=in\ngeometry\nmolecule\nin 0 0 0\nend\n\nstructure=sn\ngeometry\nmolecule\nsn 0 0 0\nend\n\nstructure=sb\ngeometry\nmolecule\nsb 0 0 0\nend\n\nstructure=te\ngeometry\nmolecule\nte 0 0 0\nend\n\nstructure=i\ngeometry\nmolecule\ni 0 0 0\nend\n\nstructure=xe\ngeometry\nmolecule\nxe 0 0 0\nend\n\nstructure=ch4\nstructure=methane\ngeometry\nmolecule\nc   -0.00000000000000      0.00000000000000     -0.00000000000000\nh    1.19183538194102     -1.19183538194102      1.19183538194102\nh   -1.19183538194102      1.19183538194102      1.19183538194102\nh   -1.19183538194102     -1.19183538194102     -1.19183538194102\nh    1.19183538194102      1.19183538194102     -1.19183538194102\nend\n\nstructure=c2h4\nstructure=ethylene\ngeometry\nmolecule\nc    1.25925675384707      0.00000000000000      0.00000000000000  \nc   -1.25925675384707      0.00000000000000      0.00000000000000  \nh    2.34326800978054      1.75410867131933      0.00000000000000  \nh    2.34326800978054     -1.75410867131933      0.00000000000000  \nh   -2.34326800978054      1.75410867131933      0.00000000000000  \nh   -2.34326800978054     -1.75410867131933      0.00000000000000  \nend\n\n\nstructure=water\nstructure=water1\nstructure=h2o\ngeometry\nmolecule\no    0.00000000000000      0.00000000000000      0.71002389091700  \nh   -1.42650808202133      0.00000000000000     -0.35501194545850  \nh    1.42650808202133      0.00000000000000     -0.35501194545850  \nend\n\nstructure=water2\ngeometry\nmolecule\n h  -3.70186011075500     -0.06059028899871      1.37109835461971\n h  -1.14798027983604      0.02070194978576      0.10614969633645\n o  -2.90821859864409      0.00859447445236     -0.22172345689761\n h   3.26470409525617      1.44020185984707     -0.66497005972273\n h   3.22068292499060     -1.41303137750844     -0.75428607566744\n o   2.70377479750559     -0.00700332504847      0.21447446745186\nend\n\nstructure=water3\ngeometry\nmolecule\n o  -0.31707147865848      3.11003757018401      0.20550204777292\n h   1.15917879689952      2.08364982864237      0.21490721473629\n h  -0.17729599551346      4.17576563036006     -1.21626364392172\n o   2.86778979775713     -1.26124857451507     -0.15245176604442\n h   3.75988415166526     -2.07642918508861      1.15660121045426\n h   1.26308727804237     -2.06319921243228     -0.26407788871397\n o  -2.55186349313518     -1.82335706137257     -0.17424786726112\n h  -3.60747018014350     -2.28902148531211      1.18335973249592\n h  -2.38821132030115     -0.03421727108816     -0.10494783051594\nend\n\nstructure=water4\ngeometry\nmolecule\n o   0.40909925160388     -3.75867472694021      0.06670166331246\n h  -1.14122639863710     -2.84455561495330     -0.06340409121058\n h   0.26205210229952     -4.79210925723138      1.51096076516684\n h   2.84455939440557     -1.14124340617230      0.06331527408233\n o   3.75867283721408      0.40909358242548     -0.06669977358633\n h   4.79219807435963      0.26208611736991     -1.51090029393059\n o  -3.75866716803568     -0.40910114133001     -0.06670166331246\n h  -4.79224531751295     -0.26208233791764     -1.51086060968180\n h  -2.84455372522717      1.14124340617230      0.06329259736874\n o  -0.40909736187775      3.75867850639247      0.06669599413407\n h  -0.26209367627444      4.79211681613591      1.51095887544071\n h   1.14124151644616      2.84456128413170     -0.06333039189140\nend\n\n\nstructure=water5\ngeometry\nmolecule\n o  -1.07954384793358      4.38979601217069     -0.00599799074578\n o   3.85203853626156      2.38318842823994     -0.19328307859768\n o   3.46046082536179     -2.90278752573817      0.29587442062591\n o  -1.68292962271170     -4.19138799630063     -0.18909922493947\n o  -4.53321299757378      0.30198012576126     -0.00949020463935\n h  -1.02352480645032      5.65905891521533      1.24244390976672\n h   4.81078353087656      2.62736750077462     -1.67544252777321\n h   4.02130886488866     -3.72486941614902      1.77376308874112\n h  -2.21547334422020     -5.00113942369439     -1.68453400019852\n h  -5.70646836443716      0.60233697677437      1.29659968128296\n h   0.60417190084940      3.75398631640452     -0.15195854752373\n h   3.79551493790081      0.59846870738035      0.07634493576858\n h   1.74273000618687     -3.40746912514341      0.05882717451673\n h  -2.70048478430824     -2.70773566348012     -0.03518670059433\n h  -3.46307242687744      1.75368852803147     -0.08488460816309\nend\n\n\nstructure=water6\ngeometry\nmolecule \no    2.88546818573028     -0.77067756014409      2.77239264311680\nh    1.16273526148161     -1.31300250411641      2.96607256420238\nh    3.78317691597920     -1.34567019977560      4.20024514268546\no    1.57224080420406      3.81103525863020     -0.13852826389731\nh    2.21092477341835      2.89973372830743      1.26682515633321\nh    2.23178546019927      2.93641898172514     -1.55524649709102\no    3.23041879402722     -0.93086019579814     -2.59053673844468\nh    4.57576774036023     -1.70190436281201     -3.46867168540918\nh    3.47578083512110     -1.24303917349858     -0.83465423837293\no   -3.57410706526740      2.41477520055112     -0.14313919566156\nh   -1.91435871302781      3.12699975195279     -0.14790319524256\nh   -4.72573451653991      3.76598040816994     -0.29224992590303\no   -2.21512374488562     -2.46931458647233     -2.67737721315531\nh   -0.49740237434136     -2.11106975483054     -3.04298252808469\nh   -3.00748780213070     -0.87441218648271     -2.48389760303981\no   -2.14594087116068     -2.13455905066231      2.74387667577156\nh   -2.26906597734884     -2.90285366615283      1.12107435915601\nh   -3.04977609353242     -0.60036032323937      2.53787574029956\nend\n\nstructure=water7\ngeometry\nmolecule\n o  -1.87508831426031     -3.59568206852656     -0.11905463609793\n o  -5.58028946081825      0.13937297147871     -1.30913612444852\n o  -2.15545753196589      3.36954799083480      1.18257360642464\n o   0.28366490008133     -0.70328992624539      4.14986693370887\n h  -1.43424166362395     -3.00130650795003      1.51499155100829\n h  -3.32210830599483     -2.64294073383573     -0.61203883074060\n h  -7.22283563607019      0.27898404845017     -0.63429413540760\n h  -4.59692322441789      1.45334490510129     -0.55618041597864\n h  -0.77963108256170      3.63610142078285      0.06231560895804\n h  -1.52674753728097      2.27645858598069      2.45839574887652\n h   0.46406382590499     -0.98516147622661      5.90022765402033\n h   1.94799394846704     -0.56694051657929      3.45452897503066\n o   2.25157656198899      3.13089636723880     -2.27274905358184\n o   4.81085723019574     -0.16539639005468      1.44870562744506\n o   2.20333752299481     -2.19900816042437     -2.99697903510573\n h   4.52393633198745     -1.29679810252691      0.08649654455444\n h   4.64332167015863      1.45443527707997      0.70420455369370\n h   2.49117871782982      4.23553577821710     -3.65045767021438\n h   2.08721952130739      1.46473617423033     -2.93792509345305\n h   0.73465182114676     -2.79565139236036     -2.10403997361620\n h   2.48132946522522     -3.32232184504785     -4.35205251211857\nend\n\n\nstructure=water8\ngeometry\nmolecule\no    2.83949303864330     -3.49066242841757      1.66633404781270\nh    4.00054644386664     -4.55226710617167      2.50365280003300\nh    2.96783756841050     -1.84731311955916      2.42420682368035\no   -2.83485754043934     -1.68183547128076     -3.48661841449319\nh   -3.99460136545258     -2.52511630945031     -4.54492363041927\nh   -2.95585292527574     -2.43946447247727     -1.84253022271682\no   -2.81809189018837      1.67106025287105      3.50434782507193\nh   -2.95340950938592      2.42858909858252      1.86130276212091\nh   -3.97511639929640      2.50822404754845      4.57046705855749\no    2.69022357140667     -1.41297657545059     -3.47191256572708\nh    0.96247720372745     -1.66280025994420     -3.89219332685924\nh    2.98725639415203     -2.42451484904001     -2.01861301405298\no   -2.68788975963255     -3.46837121895405      1.42695865910781\nh   -2.97838224023200     -2.01418538572362      2.43915644711761\nh   -0.95933269944233     -3.89030360072636      1.66832014997836\no    2.70798132787739      1.42299401368102      3.45555509632082\nh    0.98158989383545      1.66554036283689      3.88551125525336\nh    2.99228495539164      2.43571336610349      2.00052644523513\no    2.81390992625630      3.50136205778197     -1.68496485775682\nh    3.96729104338012      4.56593738501696     -2.52910741104297\nh    2.94300467729825      1.85801274892356     -2.44287353842100\no   -2.71062127528503      3.45877707937739     -1.40977726910761\nh   -0.98527297006845      3.88756160810754     -1.66186673523456\nh   -3.00150303946786      2.00361803718853     -2.42044437894978\nend\n\nstructure=water9\ngeometry\nmolecule\no    0.73767160350711     -2.25861012265559      4.08267016214959\no    0.68055652086677      2.94472999725757      3.45509967232279\no   -3.23872414038126      3.95401004811820     -0.32094919668316\no   -2.87421486660894     -4.00956043752051      0.25059469275583\no   -6.44616386463259     -0.17098053077736     -0.11896581896968\no    4.71833623872966     -2.53144311254322      0.25266394287134\no    4.84404649026761      2.68510430331268     -0.16339517007996\no    0.72618773779756      2.24509102190092     -3.82248699899549\no    0.88224510130352     -2.99304840474932     -3.69384956167770\nh    3.74302590483378     -3.05535456507670     -1.16116111961291\nh    3.66603468272776     -2.79792473289822      1.68294474052076\nh   -1.78760344293837     -3.98171532295244     -1.17828770755526\nh   -1.81883683646270     -3.66834770751441      1.66218231949875\nh   -0.66495116246140      2.89734133502320     -2.89279654367361\nh    2.19347126285502      2.72699386250035     -2.90807686918412\nh    2.16276699264789      3.24539109417808      2.48798319093911\nh   -0.69183629615397      3.47602272006610      2.42593214363968\nh    0.62216020390834     -0.44983040867210      3.99672919707821\nh    0.79853401306895     -2.69730248550046      5.80899356605074\nh    0.73030356131499     -1.19524233041951     -3.88492921960443\nh    0.94049779907586     -3.69009656557779     -5.33311895181521\nh    5.02778456216808      0.88607557617488     -0.01548063648060\nh    6.48250140844185      3.38318425460970     -0.22261540763233\nh   -4.45659027206367      2.61486696240559     -0.22315020012793\nh   -4.14054491469534      5.45784087658566     -0.64042440698268\nh   -7.71193455378365     -0.47352379492622      1.09719955919313\nh   -5.33430947927893     -1.60070763866985     -0.07300012051337\nend\n\nstructure=water10\ngeometry\nmolecule\no   -1.83399432977458      4.63801720890362      2.21888996906846\no   -4.89339668822792      0.23868941811865      2.34852518178442\no   -1.84495096189305     -3.93968781375706      2.75530195997098\no   -1.22201597027023     -4.57134578120928     -2.68790109798935\no    3.96573579877275     -2.90362845386731     -1.96038866217264\no    4.23093051563126      2.27001650959368     -2.64525375862239\no   -0.97309368514200      4.08503043008956     -3.33506804781416\no   -4.10964222324426     -0.29495223427306     -3.24120346106760\no    3.37683666452934      2.81932588135315      2.76982639502834\no    3.34825644649557     -2.34589846245971      3.54210266348085\nh   -2.96378977503386      3.24060819733574      2.38701890311130\nh   -2.56900708861272      6.02018179975751      3.07083331183116\nh   -3.83508391339731     -1.21706299807594      2.61235929582725\nh   -6.40989435096412     -0.05976636840477      3.23657930122043\nh   -0.17126209997116     -3.55772502942142      3.28679499374960\nh   -1.69198896979276     -4.56622651311529      1.07903362187770\nh    4.46484837526438     -2.80540426893218      4.85307749145667\nh    3.36774519210402     -0.53377393322101      3.43612304249636\nh    3.92239115046276      2.97301352828847      1.06545593961292\nh    1.73834773128471      3.55073493245587      2.82428830217810\nh   -1.24277272211384      4.68133162159549     -1.66745276568337\nh    0.75360955371186      3.59964671395335     -3.39795246433820\nh   -4.80513702919149     -0.02201719917425     -1.61286802633497\nh   -3.13488368937919      1.18095600085489     -3.59791383508949\nh   -2.21349291123294     -3.09055071430169     -3.04850241811885\nh   -1.78647716616317     -5.85655419336321     -3.78614000655557\nh    4.03988109332266     -3.07305562976344     -0.17549697623496\nh    2.37963007393172     -3.59420052323837     -2.44680605850353\nh    4.16805743746402      0.45716632551996     -2.58114668929037\nh    5.63196402192201      2.70817030049068     -3.65591330956002\nend\n\nstructure=water20\ngeometry\nmolecule\no   -4.10674023381281      5.04818604549868      1.20352248042511      \nh   -3.62542698776684      5.08787029428927     -0.62422063530190      \nh   -5.42973749944605      3.72537775247872      1.47564304356064      \no    1.12987985302658     -0.33375398095961     -8.10243386097025      \nh    2.72858816144785     -0.07675122688715     -7.12979182037401      \nh   -0.29932002127481      0.51473305270602     -7.20235730387679      \no   -0.44048256340139      0.92480362354220      1.98964855170553      \nh   -1.35662179262434     -0.69695934370026      1.67028483524788      \nh   -1.69223715382483      2.29674479601721      2.33357870789072      \no   -2.34910595761588     -3.46465223792455     -4.57507106132590      \nh   -0.50076482704043     -3.21010612782484     -4.27536049665022      \nh   -3.07135928560476     -1.92584824791578     -5.40050343617037      \no    1.32263191858092     -0.34320261162404      6.72152278845121      \nh    1.15444629275410      0.53363031403489      5.05667406537896      \nh    0.10942774126835     -1.78959899373473      6.79711183376662      \no   -3.73559802131408     -3.45577052509998      0.48920600219435      \nh   -5.43162722557895     -2.77225658283524      0.96541698768152      \nh   -3.50183889867611     -3.31347414729370     -1.38143389674917      \no   -2.83287584763460      1.73738586068305     -5.53788652603114      \nh   -2.56661343551102      3.39089622695798     -4.66407716218481      \nh   -4.01981283170008      1.97549135342663     -6.98881825086073      \no    7.27715896330358     -3.62395615092683     -0.36778479906931      \nh    5.60853078796558     -3.19498831876177     -1.14408429445871      \nh    7.71179597386728     -5.42032981284791     -0.76160372516267      \no   -1.66389126183154     -7.37657430561114      2.91750408295238      \nh   -2.27502869320676     -5.93187867702005      1.86492662693507      \nh   -0.76192497860524     -8.62076999150304      1.81768347361296      \no    5.37420474748777      0.93803170647243     -5.10513924160034      \nh    7.16188566919757      0.59788100255301     -5.61139687260038      \nh    5.33074104643137      1.55030297352735     -3.31783626511708      \no   -7.21855225683561      1.21771117413948      2.87026092963023      \nh   -7.36670678565386      0.14434673066043      4.41794663246358      \nh   -8.94500605183995      1.68447352896223      2.25987938870819      \no   -2.23421060873642     -4.01210589862154      7.06356321850350      \nh   -2.07358388744117     -5.44735289654818      5.84468986279225      \nh   -1.87516264348815     -4.62834559055554      8.81344961755559      \no    8.56217273366582     -0.58697728276630      3.35025136738321      \nh    8.26170627853699      1.25739542293007      3.06679244745038      \nh    7.85919461223236     -1.56982384448011      1.89894169732702      \no    4.50115127409458      7.01917040209841      2.20885678312027      \nh    3.23125531279544      6.27272857960861      3.39182534230670      \nh    4.08541152485975      8.83519721580151      1.90083142345992      \no   -2.53014172114632      6.43713475316963     -3.65628621551690      \nh   -3.11803552108705      7.34798274922051     -5.20378294573695      \nh   -0.84771854503825      7.11554643487560     -3.12697392569564      \no   -8.34652978555505     -0.65954276626911     -3.65420751677073      \nh   -6.62669003201580      0.12167001706581     -3.60979895264791      \nh   -9.56993848398520      0.55252757536377     -4.43069598477342      \no    4.37076017092548      2.27784753468833     -0.40557932172700      \nh    4.96602390278443      3.82553323752168      0.50054435899165      \nh    2.85142036008540      1.57675913938778      0.47408819313128      \no    3.38054367729339     -5.47815543251420      3.64882809637913      \nh    1.53617097159699     -5.57131893086546      3.24820615620737      \nh    3.67345122789067     -6.07020662994728      5.41950148289297      \no    3.05740050856997     -3.83522753258342     -3.51436778293717      \nh    3.50904505432962     -2.10102586043428     -4.11416685751510      \nh    4.11375741685302     -5.11117061750781     -4.42464886114820      \no   -0.11790631251779      5.53006620938453      4.02110414455760      \nh   -0.76797210223046      5.21259221905973      5.76721109134394      \nh   -1.56959392780055      5.87210663943685      2.86081229896581      \nend\n\nstructure=water47\ngeometry\nmolecule\no  191.12690108005395    195.08209787618361    199.74027279374670       \nh  192.37412032775848    195.73216366589628    201.00072012438144       \nh  192.03207989770618    194.08810193028575    198.41368504846099       \no  195.89279038719155    194.56998209417159    180.78159536557149       \nh  197.60677198971882    194.60588689069641    181.57962671148911       \nh  194.86477937090174    193.18670256489932    181.55808383357422       \no  184.95486655743616    194.67391703148030    190.51462981299900       \nh  185.43617980348213    194.71360128027089    188.68688669727200       \nh  183.63186929180293    193.35110873846034    190.78675037613453       \no  191.04942230860564    198.13778503305969    187.14090174795825       \nh  191.77507714363375    197.02284661465717    188.48222935708048       \nh  192.42892238561217    199.16957550161527    186.36422430734225       \no  190.19148664427556    189.29197700502201    181.20867347160365       \nh  191.79019495269682    189.54897975909446    182.18131551219989       \nh  188.76228676997417    190.14046403868764    182.10875002869710       \no  188.62112422784759    190.55053460952382    191.30075588427943       \nh  187.70498499862464    188.92877164228136    190.98139216782178       \nh  187.36936963742414    191.92247578199883    191.64468604046462       \no  186.71250083363310    186.16107874805707    184.73603627124800       \nh  188.56084196420855    186.41562485815678    185.03574683592367       \nh  185.99024750564422    187.69988273806584    183.91060389640353       \no  190.38423870982990    189.28252837435758    196.03263012102511       \nh  190.21605308400308    190.15936130001651    194.36778139795285       \nh  189.17103453251733    187.83613199224689    196.10821916634052       \no  185.32600876993490    186.16996046088164    189.80031333476825       \nh  183.62997956567003    186.85347440314638    190.27652432025542       \nh  185.55976789257286    186.31225683868792    187.92967343582472       \no  182.11952146765455    187.40055011861676    195.89468011332443       \nh  181.47531382895383    187.81080966206622    197.62377952491480       \nh  183.94197335020945    186.91243385849239    196.00239450289891       \no  182.81342890365016    192.07365387262968    179.98998908850572       \nh  180.97000106102018    192.04341825450351    179.57613906540377       \nh  183.78739375253943    192.67080733062153    178.48520016888887       \no  183.03074740893200    180.73170659566333    194.18636768919581       \nh  181.71096267772467    181.88651823546977    193.48149984162947       \nh  184.70504476266868    181.14291100217923    193.41157997471271       \no  196.47293630998743    181.05447181916020    190.12723595575747       \nh  197.77117816327990    180.98190633565738    191.49728740209954       \nh  194.92903005941989    181.93584008753805    190.76785311480569       \no  186.06848216754568    195.85877531679961    198.14723366372414       \nh  187.93118521673102    195.98349724157006    198.43825148818851       \nh  185.23662472384939    195.14256911243595    199.68547073589303       \no  186.22873094361438    191.36311684666467    183.77322080654275       \nh  186.49499335573796    193.01662721293960    184.64703017038909       \nh  185.04179395954890    191.60122233940825    182.32228908171317       \no  197.97526858563151    194.46604715686289    192.61789499890074       \nh  196.82820482296995    195.87011367359693    192.08688195555985       \nh  199.54941045432525    195.18792253962522    193.37189572592212       \no  197.90534871871478    180.34733630023439    185.26629342413571       \nh  196.43136233506397    179.64832660367998    184.31462734361449       \nh  197.46882198201817    180.47791637601679    187.09989469087466       \no  196.33876575455255    186.00177483505479    188.94332253350458       \nh  194.67013757921455    186.43074266721985    188.16702303811519       \nh  196.77340276511626    184.20540117313371    188.54950360741122       \no  187.39771552941744    182.24915668037048    192.22861141552627       \nh  186.78657809804221    183.69385230896157    191.17603395950897       \nh  188.29968181264374    181.00496099447858    191.12879080618686       \no  194.43581153873674    190.56376269245405    184.20596809097356       \nh  196.22349246044655    190.22361198853463    183.69971045997352       \nh  194.39234783768035    191.17603395950897    185.99327106745682       \no  181.84305453441337    190.84344216012110    192.18136826220413       \nh  181.69490000559512    189.77007771664205    193.72905396503748       \nh  180.11660073940902    191.31020451494385    191.57098672128208       \no  180.04951546169158    183.62279860636505    187.01825852193400       \nh  179.79761496817795    184.01586164200526    188.84940314470018       \nh  180.63495261765959    185.17634246021035    186.11553634825452       \no  186.82739618251256    185.61362508736008    196.37467055107740       \nh  186.98802290380780    184.17837808943344    195.15579719536615       \nh  187.18644414776082    184.99738539542608    198.12455695012949       \no  197.62377952491480    189.03875370321532    192.66135869995711       \nh  197.32331306978597    190.88312640891169    192.37789978002428       \nh  196.92080140348133    188.05590714150151    191.21004902990092       \no  193.56275806534356    196.64490138808003    191.51996411569417       \nh  192.29286210404442    195.89845956559023    192.70293267488060       \nh  193.14701831610873    198.46092820178313    191.21193875603382       \no  182.92171021106449    177.52880977303545    190.04597773204335       \nh  184.26379371063987    178.55398620012591    189.19749069837772       \nh  183.27017570996861    177.44603976841506    191.90168879453708       \no  179.74829311610964    184.62737701860706    192.36845114935983       \nh  177.95796657781378    184.10392287979775    192.67080733062153       \nh  180.23697629407388    185.95509859957252    193.62133957546300       \no  199.65712484389974    190.11778732509302    183.39962195007126       \nh  199.96515020356009    188.81595499214811    182.06490838241413       \nh  199.55318990659106    189.27496946982603    185.08828122241789       \no  186.53146507010266    196.06286573915125    185.65482111705700       \nh  185.94357127016193    196.97371373520213    184.10732438683695       \nh  188.21388824621073    196.74127742085722    186.18413340687826       \no  187.96727898586917    198.95603644859918    180.82883851889363       \nh  189.71905511105416    198.25305832716572    180.75532817232440       \nh  188.05023796310283    200.83820367695327    180.98341811656368       \no  193.05442173559732    178.29471577469400    186.60516438928519       \nh  193.74795122636635    176.75421103116562    185.75875605436570       \nh  193.57598614827376    178.30435337797172    188.42138017560157       \no  186.65127370692761    190.36912090076683    200.68324613405667       \nh  187.83518712918047    191.19871067310362    201.89834003750212       \nh  187.64451376237230    189.40914002526091    199.39256318529576       \no  195.49972735155131    184.41818433569662    182.21079523987294       \nh  196.31419931482506    185.44846302334588    180.85151523248828       \nh  196.79985893097665    183.32195420600968    183.03414891597120       \no  180.71507700569393    188.96618821971251    185.65689981580317       \nh  182.43491675923318    189.74740100304743    185.70130837992599       \nh  179.49166830726378    190.17825856134539    184.88041134780048       \no  188.03852166107896    178.76809217098184    188.52285846893756       \nh  186.92226043438342    178.06964939226734    187.16754688643195       \nh  189.83243867902729    178.76185607474332    187.92702781923870       \no  177.11250310596074    191.77318741750085    190.09133115923262       \nh  176.28366922407710    193.08087790145774    189.00851808508915       \nh  176.45261074035707    190.06298526723933    189.62834825667562       \no  193.43236696217446    191.90357852066995    188.90552801084689       \nh  194.02763069403341    193.45126422350330    189.81165169156554       \nh  191.91302715133438    191.20249012536939    189.78519552570518       \no  187.32628388159435    181.37610320697732    182.55151286163218       \nh  187.15337394043533    183.19307488374687    183.04114090266287       \nh  189.15591672345423    180.90197092023632    182.52505669577178       \no  195.66980270351104    187.15564161179478    197.31008498685580       \nh  196.87544797629209    187.43097470935624    195.87956230426136       \nh  193.89534986473143    187.27658408429949    196.66946782780755       \no  187.99486898740929    185.64121508890022    178.11916021694893       \nh  187.02298283726620    186.63785665138411    176.84132740589163       \nh  189.00662835895628    186.81700268878168    179.19762692098675       \no  183.51451729895072    200.10121048512787    191.39902164318951       \nh  184.81994011154811    201.07252971743111    192.35900251869541       \nh  184.22486535230243    198.42502340525832    190.88879558731037       \no  194.89312526289504    192.71616075781077    197.54252130120071       \nh  195.73972257042783    193.16024639903890    195.91357737465330       \nh  194.03329987243208    191.04186340407409    197.37055622310814       \no  192.48372444346586    181.33774176647975    197.59921308518727       \nh  193.67236218105091    179.87773935621232    197.43480691162623       \nh  190.76974284093856    180.70354967628333    198.07731379680735       \no  200.95536669719218    187.72898452051228    187.83027384123494       \nh  199.31130496158170    186.95155118944311    188.34220065063366       \nh  202.27628526407926    187.30965429162498    189.11434274853076       \no  192.44215046854237    184.14757555346742    192.95993542895303       \nh  190.59777776284596    184.05441205511616    192.55931348878127       \nh  192.73505801913964    183.55552435603434    194.73060881546687       \no  192.11900729981895    185.79050345339820    185.79673954963673       \nh  192.57065184557860    187.52470512554734    185.19694047505880       \nh  193.17536420810200    184.51456036847381    184.88645847142570       \no  188.94370047873119    195.15579719536615    193.33221147713149       \nh  188.29363468901852    194.83832320504135    195.07831842391784       \nh  187.49201286344842    195.49783762541847    192.17191963153971       \nend\n"
  },
  {
    "path": "src/madness/chem/test_BSHApply.cc",
    "content": "/*\n * test_BSHApply.cc\n *\n *  Created on: May 1, 2020\n *      Author: fbischoff\n */\n\n#include<madness/mra/mra.h>\n#include<madness/chem/BSHApply.h>\n#include<madness/world/test_utilities.h>\n\nusing namespace madness;\n\nint factorial(int n) {\n  return (n == 1 || n == 0) ? 1 : factorial(n - 1) * n;\n}\n\ndouble hermite(int n, double x) {\n\tif (n==0) return 1;\n\tif (n==1) return 2.0*x;\n\tif (n==2) return 4.0*x*x - 2;\n\telse throw std::runtime_error(\"hermite number too large..\");\n}\n\ntemplate<std::size_t NDIM>\nstruct HO_function {\n\tdouble alpha;\n\tdouble normalization;\n\tstd::vector<int> n;\n\tHO_function(const double m, const double k, const std::vector<int> n)\n\t\t: alpha(sqrt(m*k)),n(n) {\n\n\t\tnormalization=std::pow(alpha/constants::pi,0.25*double(NDIM));\n\t\tfor (size_t idim=0; idim<NDIM; ++idim) {\n\t\t\tdouble term2=1.0/sqrt(std::pow(2.0,double(n[idim])*factorial(n[idim])));\n\t\t\tnormalization*=term2;\n\t\t}\n\t}\n\n\tdouble operator()(const Vector<double,NDIM>& r) const {\n\t\tdouble result=normalization;\n\t\tfor (size_t i=0; i<NDIM; ++i) result*=hermite(n[i],r[i]*sqrt(alpha));\n\t\tresult*=exp(-0.5*alpha*inner(r,r));\n\t\treturn result;\n\t}\n};\n\ntemplate<typename T, std::size_t NDIM>\nT compute_energy(const Function<double,NDIM>& potential, const Function<T,NDIM>& f) {\n\tstd::vector<Function<T,NDIM> > g=grad(f);\n\treturn inner(f,potential*f) + 0.5*inner(g,g);\n}\n\ndouble compute_energy(const std::vector<int>& n) {\n\tdouble ntotal=0.0;\n\tfor (size_t i=0; i<n.size(); ++i) ntotal+=0.5+n[i];\n\treturn ntotal;\n}\n\n/// compute the Fock (aka coupling) matrix\ntemplate<typename T, std::size_t NDIM>\nTensor<T> compute_fock_matrix(World& world, const Function<double,NDIM>& potential,\n\t\tconst std::vector<Function<T,NDIM> > f) {\n\n\tTensor<T> fock=matrix_inner(world,f,potential*f);\n\n\tfor (size_t i=0; i<f.size(); ++i) {\n\t\tstd::vector<Function<T,NDIM> > gi=grad(f[i]);\n\t\tfor (size_t j=0; j<f.size(); ++j) {\n\t\t\tstd::vector<Function<T,NDIM> > gj=grad(f[j]);\n\t\t\tfock(i,j)+=0.5*inner(gi,gj);\n\t\t}\n\t}\n\treturn fock;\n}\n\nTensor<double_complex> su_complex(const double theta) {\n\tdouble_complex z1=std::polar(sqrt(0.5),theta);\n\tdouble_complex z2=std::polar(sqrt(0.5),2.0*theta);\n\tTensor<double_complex> su(2,2);\n\tsu(0,0)=z1;\n\tsu(0,1)=z2;\n\tsu(1,0)=-std::conj(z2);\n\tsu(1,1)=std::conj(z1);\n\tTensor<double_complex> one=inner(su,conj(su),0,0);\n\tif (std::abs(one.sum()-double_complex(2.0,0.0))>1.e-5) {\n\t\tprint(\"error\",one.sum());\n\t\tprint(su);\n\t\tprint(one);\n\t}\n\treturn su;\n}\n\nTensor<double> su_real(const double theta) {\n\tTensor<double> su(2,2);\n\tsu(0,0)=cos(theta);\n\tsu(0,1)=-sin(theta);\n\tsu(1,0)=sin(theta);\n\tsu(1,1)=cos(theta);\n\treturn su;\n}\n\ntemplate<std::size_t NDIM>\nstd::vector<Function<double,NDIM> > mix(const std::vector<Function<double,NDIM> >& vf, const double theta) {\n\tMADNESS_ASSERT(vf.size()==2);\n\treturn transform(vf.front().world(),vf,su_real(theta));\n}\n\ntemplate<std::size_t NDIM>\nstd::vector<Function<double_complex,NDIM> > mix(const std::vector<Function<double_complex,NDIM> >& vf, const double theta) {\n\tMADNESS_ASSERT(vf.size()==2);\n\treturn transform(vf.front().world(),vf,su_complex(theta));\n}\n\n/// test the n-dimensional harmonic oscillator\ntemplate<typename T, std::size_t NDIM>\nint test_converged_function(World& world, double shift, bool coupling) {\n\tint result=0;\n\ttest_output test(\"testing NDIM= \"+std::to_string(NDIM)+\" coupling= \"+std::to_string(coupling)+\" shift= \"+std::to_string(shift));\n\n\t// the potential is V(r) = 0.5 k r^2 = 0.5 omega^2 r^2 (m=1)\n\tconst double k=1.0;\n\tconst double m=1.0;\n\n\tFunction<double,NDIM> potential=FunctionFactory<double,NDIM>(world)\n\t\t\t.functor([&k](const Vector<double,NDIM>& coord_nd){return 0.5*k*inner(coord_nd,coord_nd);});\n\n\t// set up and test HO function 1\n\tstd::vector<int> n0(NDIM,0);\n\tFunction<T,NDIM> f0=FunctionFactory<T,NDIM>(world)\n\t\t\t.functor(HO_function<NDIM>(m,k,n0));\n\n\tdouble norm0=f0.norm2();\n\tT e0=compute_energy(potential,f0);\n\tif(fabs(norm0-1.0)>1.e-4) MADNESS_EXCEPTION(\"failure 0\",1);\n\tif(std::abs(T(e0)-T(compute_energy(n0)))>1.e-4) {\n\t\tprint(e0);\n\t\tprint(n0,compute_energy(n0));\n\t\tMADNESS_EXCEPTION(\"failure 1\",1);\n\t}\n\n\t// set up and test HO function 2\n\tstd::vector<int> n1(NDIM,1);\n\tFunction<T,NDIM> f1=FunctionFactory<T,NDIM>(world)\n\t\t\t.functor(HO_function<NDIM>(m,k,n1));\n\n\tdouble norm1=f1.norm2();\n\tT e1=compute_energy(potential,f1);\n\tif(fabs(norm1-1.0)>1.e-4) MADNESS_EXCEPTION(\"failure 2\",1);\n\tif(std::abs(T(e1)-T(compute_energy(n1)))>1.e-4) {\n\t\tprint(e1);\n\t\tprint(n1,compute_energy(n1));\n\t\tMADNESS_EXCEPTION(\"failure 3\",1);\n\t}\n\n\n\tstd::vector<Function<T,NDIM> > vf={f0,f1};\n\n\n\tif (coupling) vf=mix(vf,0.3);\n\tTensor<T> fock=compute_fock_matrix<T,NDIM>(world,potential,vf);\n\n\t// apply the BSH operator\n\tBSHApply<T,NDIM> bsh_apply(world);\n\tbsh_apply.levelshift=shift;\n\tauto [residual,eps_update]=bsh_apply(vf,fock,potential*vf);\n\n\t// test residual norm\n\tdouble rnorm=norm2(world,residual);\n\ttest.logger<< \"rnorm \" << rnorm;\n\tconst double thresh=FunctionDefaults<NDIM>::get_thresh();\n\tbool success=rnorm<sqrt(thresh)*0.1;\n\n\t// test orbital energy update\n\ttest.logger << \"eps update \" <<\t eps_update;\n\t//double loose=(shift!=0.0) ? 10.0 : 1.0; \t // loosen the threshold if shifts are used\n\t//success=success and eps_update.normf()*loose;\n\n\ttest.end(success);\n\tif (not success) print(fock);\n    if (!success) result++;\n\n    return result;\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_convergence(World& world, double shift, bool coupling) {\n\tint result=0;\n\ttest_output test(\"testing convergence= \"+std::to_string(NDIM)+\" coupling= \"+std::to_string(coupling)+\" shift= \"+std::to_string(shift));\n\n\t// the potential is V(r) = 0.5 k r^2 = 0.5 omega^2 r^2 (m=1)\n\tconst double k_pot=0.05;\n\tconst double m=1.0;\n\tconst double global_shift=-12.0;\n\n\tFunction<double,NDIM> potential=FunctionFactory<double,NDIM>(world)\n\t\t\t.functor([&k_pot](const Vector<double,NDIM>& coord_nd){return 0.5*k_pot*inner(coord_nd,coord_nd);});\n\n\tpotential=potential+global_shift;\n\t// set up and test HO function 1\n\tstd::vector<int> n0(NDIM,0);\n\tconst double k_wf=0.15;\n\tFunction<T,NDIM> f0=FunctionFactory<T,NDIM>(world).functor(HO_function<NDIM>(m,k_wf,n0));\n\tstd::vector<Function<T,NDIM> > vf(1,f0);\n\tnormalize(world,vf);\n\tTensor<double> fock=compute_fock_matrix(world,potential,vf);\n\n\tdouble delta=0.0;\n\tfor (int i=0; i<100; ++i) {\n\n\t\tBSHApply<T,NDIM> bsh_apply(world);\n\t\tbsh_apply.levelshift=shift;\n\t\tauto [residual,eps_update]=bsh_apply(vf,fock,potential*vf);\n\t\tvf-=residual;\n\t\tdouble rnorm=norm2(world,residual);\n\t\ttest.logger <<  \"rnorm \" << rnorm << \" eps \" << fock(0,0)-global_shift << \" eps-update \" <<eps_update[0] << std::endl;\n\t\tnormalize(world,vf);\n\t\tfock(0,0)-=eps_update[0];\n\t\tdelta=eps_update[0];\n\t}\n\n//\ttest.print_and_clear_log();\n\n\tbool success=fabs(delta)<1.e-5;\n\ttest.end(success);\n    if (!success) result++;\n\treturn result;\n}\n\nint main(int argc, char** argv) {\n    madness::initialize(argc, argv);\n\n    madness::World world(SafeMPI::COMM_WORLD);\n    world.gop.fence();\n    startup(world,argc,argv);\n    const int k=7;\n    const double thresh=1.e-5;\n    const double L=24.0;\n    FunctionDefaults<1>::set_cubic_cell(-L,L);\n    FunctionDefaults<2>::set_cubic_cell(-L,L);\n    FunctionDefaults<3>::set_cubic_cell(-L,L);\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<2>::set_thresh(thresh);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<2>::set_k(k);\n    FunctionDefaults<3>::set_k(k);\n\n\n    int result=0;\n    for (bool coupling : {true,false}) {\n    \tfor (double shift : {0.0, -5.0}) {\n    \t    result+=test_converged_function<double,1>(world,shift,coupling);\n    \t    result+=test_converged_function<double,2>(world,shift,coupling);\n    \t    result+=test_converged_function<double,3>(world,shift,coupling);\n#ifndef USE_GENTENSOR\n    \t    result+=test_converged_function<double_complex,1>(world,shift,coupling);\n    \t    result+=test_converged_function<double_complex,2>(world,shift,coupling);\n//    \t    result+=test_converged_function<double_complex,3>(world,shift,coupling);\n#endif\n    \t    result+=test_convergence<double,2>(world,shift,coupling);\n    \t}\n    }\n\n    print(\"result\",result);\n    madness::finalize();\n    return result;\n\n}\n\n"
  },
  {
    "path": "src/madness/chem/test_IntegratorXX.cc",
    "content": "//\n// Created by Florian Bischoff on 4/11/24.\n//\n\n#include <madness.h>\n#include<madness/world/test_utilities.h>\n#include<madness/chem/IntegratorXX.h>\n\nusing namespace madness;\n\n\n// \\int s*s dV = (pi/2)^(3/2)\ndouble s_func(const Vector<double,3>& r) { return exp(-inner(r,r)); }\n// \\int px*px dV = pi^(3/2)/(8 Sqrt(2))\ndouble px_func(const Vector<double,3>& r) { return r[0]*exp(-inner(r,r)); }\ndouble py_func(const Vector<double,3>& r) { return r[1]*exp(-inner(r,r)); }\ndouble pz_func(const Vector<double,3>& r) { return r[2]*exp(-inner(r,r)); }\ndouble dxy_func(const Vector<double,3>& r) { return r[0]*r[1]*exp(-inner(r,r)); }\ndouble dxz_func(const Vector<double,3>& r) { return r[0]*r[2]*exp(-inner(r,r)); }\ndouble dyz_func(const Vector<double,3>& r) { return r[1]*r[2]*exp(-inner(r,r)); }\ndouble dx2y2_func(const Vector<double,3>& r) { return (r[0]*r[0]-r[1]*r[1])*exp(-inner(r,r)); }\ndouble dz2_func(const Vector<double,3>& r) { return (r[2]*r[2]-0.5)*exp(-inner(r,r)); }\n\nstruct spherical_harmonic {\n    int l,m;\n    Vector<double,3> origin;\n    spherical_harmonic(int l1, int m1, Vector<double,3> origin1=Vector<double,3>()) : l(l1), m(m1), origin(origin1) {\n        if (l==0) func=s_func;\n        else if (l==1) {\n            if (m==-1) func=px_func;\n            else if (m==0) func=py_func;\n            else if (m==1) func=pz_func;\n        } else if (l==2) {\n            if (m==-2) func=dxy_func;\n            else if (m==-1) func=dxz_func;\n            else if (m==0) func=dyz_func;\n            else if (m==1) func=dx2y2_func;\n            else if (m==2) func=dz2_func;\n        } else {\n            MADNESS_EXCEPTION(\"unsupported spherical harmonic\",1);\n        }\n    }\n\n    double operator()(const Vector<double,3>& r) const {\n        return func(r-origin);\n    }\n\n    std::function<double(const Vector<double,3>&)> func;\n};\n\n\n\nint test_construction() {\n    test_output t(\"DFT grid construction\");\n    GridBuilder builder;\n    builder.make_grid();\n    auto points=builder.get_points();\n    return t.end();\n}\n\nint test_integration(World& world) {\n\n    test_output t(\"DFT grid integration\");\n\n    // center the grid off the origin\n    Vector<double,3> gridcenter={1,0,-0.5};\n\n\n    auto error=[&world, &gridcenter](const int l, const int m, const auto points, const auto weights) {\n        auto f=spherical_harmonic(l,m,gridcenter);\n        double integral=0.0;\n        for (size_t i=0; i<points.size(); i++) {\n            double r2=inner(points[i],points[i]);\n            integral+=weights[i]*f(points[i])*f(points[i]);\n        }\n        // print(\"integral by grid\",integral);\n\n        real_function_3d ff=real_factory_3d(world).functor(f);\n        double integral2=ff.norm2();\n        // print(\"integral by MRA \",integral2*integral2);\n        double exact=0.0;\n        if (l==0) exact=std::pow(M_PI*0.5,1.5);\n        else if (l==1) exact=std::pow(M_PI,1.5)/8.0/std::sqrt(2.0);\n        else exact=integral2*integral2;\n        return std::abs(integral-exact)/std::abs(exact);\n    };\n\n    // expected error(nrad,angular order,l)\n    std::map<std::tuple<int,int,int>,double> errors;\n    errors[std::tuple(10l,3l,0l)]=1.0e-2;\n    errors[std::tuple(30,3,0)]=1.0e-4;\n    errors[std::tuple(50,3,0)]=1.0e-6;\n\n    errors[std::tuple(10,3,1)]=1.0e-1;\n    errors[std::tuple(30,3,1)]=1.0e-4;\n    errors[std::tuple(50,3,1)]=1.0e-5;\n\n    errors[std::tuple(10,3,2)]=1.0e1;       // l=2 will fail by construction\n    errors[std::tuple(30,3,2)]=1.0e1;       // l=2 will fail by construction\n    errors[std::tuple(50,3,2)]=1.0e1;       // l=2 will fail by construction\n\n    errors[std::tuple(10,4,0)]=1.0e-2;\n    errors[std::tuple(30,4,0)]=1.0e-4;\n    errors[std::tuple(50,4,0)]=1.0e-6;\n\n    errors[std::tuple(10,4,1)]=1.0e-1;\n    errors[std::tuple(30,4,1)]=1.0e-4;\n    errors[std::tuple(50,4,1)]=1.0e-5;\n\n    errors[std::tuple(10,4,2)]=2.0e-1;\n    errors[std::tuple(30,4,2)]=2.0e-3;\n    errors[std::tuple(50,4,2)]=1.0e-4;\n\n    for (std::size_t order=3; order<5; ++order) {\n        for (std::size_t nrad=10; nrad<61; nrad+=20) {\n            GridBuilder builder;\n            builder.set_nradial(nrad);\n            builder.set_origin(gridcenter);\n            builder.set_angular_order(order);\n            builder.make_grid();\n            auto points=builder.get_points();\n            auto weights=builder.get_weights();\n            for (int l=0; l<3; ++l) {\n                for (int m=-l; m<l+1; ++m) {\n                    double err=error(l,m,points,weights);\n                    std::stringstream ss;\n                    ss << std::setprecision(1) << std::scientific <<  err;\n                    print(\"error, l,m, nrad, angular_order\",l,m,builder.get_nradial(),builder.get_angular_order(),err);\n                    std::string msg=\"nrad, ang order, l, rel. error: \" +std::to_string(nrad)\n                        + \" \" + std::to_string(builder.get_angular_order())\n                        + \" \" + std::to_string(l)\n                        + \" \" + ss.str();\n                    t.checkpoint(err<errors[std::tie(nrad,order,l)],msg);\n                }\n            }\n        }\n    }\n    return t.end();\n}\n\n\n\nint main(int argc, char **argv) {\n\n    madness::World& world = madness::initialize(argc, argv);\n    startup(world, argc, argv);\n    FunctionDefaults<3>::set_cubic_cell(-10,10);\n    FunctionDefaults<3>::set_thresh(1.e-6);\n    FunctionDefaults<3>::set_k(7);\n\n    int success=0;\n    success+=test_construction();\n    success+=test_integration(world);\n\n    world.gop.fence();\n    madness::finalize();\n\n    return success;\n}\n"
  },
  {
    "path": "src/madness/chem/test_MolecularOrbitals.cc",
    "content": "/*\n * MolecularOrbitals_test.cpp\n *\n *  Created on: 11 Jul 2019\n *      Author: fbischoff\n */\n\n#include<madness/chem/MolecularOrbitals.h>\n#include<madness/chem/SCF.h>\n#include<madness/chem/write_test_input.h>\n\nusing namespace madness;\n\nint compare_calc_and_mos(World& world, const SCF& calc, const MolecularOrbitals<double,3>& amo) {\n\tint success=0;\n\tdouble eps_error=(amo.get_eps()-calc.aeps).normf();\n\tdouble mo_error=norm2(world,amo.get_mos()-calc.amo);\n\tdouble occ_error=(amo.get_occ()-calc.aocc).normf();\n\tdouble set_error=(amo.get_localize_sets() != calc.aset);\n\tprint(\"errors\", eps_error, mo_error, occ_error, set_error);\n\n\tif (eps_error>1.e-12) success++;\n\tif (mo_error>1.e-12) success++;\n\tif (occ_error>1.e-12) success++;\n\tif (set_error>1.e-12) success++;\n\treturn success;\n}\n\nint test_read_restartdata(World& world) {\n        //int success=0;\n\tCalculationParameters param1;\n\tparam1.set_user_defined_value(\"maxiter\",2);\n\tparam1.set_user_defined_value(\"protocol\",std::vector<double>({1.e-4}));\n\n\t// write restart file\n\twrite_test_input test_input(param1);\n\tcommandlineparser parser;\n\tparser.set_keyval(\"input\",test_input.filename());\n\tSCF calc(world,parser);\n    calc.set_protocol<3>(world, 1e-4);\n\tMolecularEnergy ME(world, calc);\n\t//double energy=ME.value(calc.molecule.get_all_coords().flat()); // ugh!\n\tME.value(calc.molecule.get_all_coords().flat()); // ugh!\n\n\t// this has the derived parameters as well\n\tCalculationParameters param=calc.param;\n\n\t// read restart file (shorthand notation)\n\t{\n\t\tauto [amo, bmo]=MolecularOrbitals<double,3>::read_restartdata(world,\n\t\t\t\tparam.prefix()+\".restartdata\",calc.molecule, param.nmo_alpha(), param.nmo_beta());\n\t}\n\t// read restart file (less shorthand notation, but with autocomplete enabled)\n\t{\n\t\tauto mos=MolecularOrbitals<double,3>::read_restartdata(world,\n\t\t\t\tparam.prefix()+\".restartdata\",calc.molecule, param.nmo_alpha(), param.nmo_beta());\n\t\tMolecularOrbitals<double,3> amo=mos.first,bmo=mos.second;\n\t}\n\t// read restart file (long notation)\n\tstd::pair<MolecularOrbitals<double,3>, MolecularOrbitals<double,3> > mos;\n\tmos=MolecularOrbitals<double,3>::read_restartdata(world,\n\t\t\tparam.prefix()+\".restartdata\",calc.molecule, param.nmo_alpha(), param.nmo_beta());\n\tMolecularOrbitals<double,3> amo,bmo;\n\tamo=mos.first;\n\tbmo=mos.second;\n\n\treturn compare_calc_and_mos(world,calc,amo);\n}\n\nint test_read_restartaodata(World& world) {\n\tCalculationParameters param1;\n\tparam1.set_user_defined_value(\"maxiter\",2);\n\tparam1.set_user_defined_value(\"protocol\",std::vector<double>({1.e-3}));\n\n\t// write restart file\n    write_test_input test_input(param1);\n    commandlineparser parser;\n    parser.set_keyval(\"input\",test_input.filename());\n    SCF calc(world,parser);\n    calc.set_protocol<3>(world, 1e-4);\n\tMolecularEnergy ME(world, calc);\n\t//double energy=ME.value(calc.molecule.get_all_coords().flat()); // ugh!\n\tME.value(calc.molecule.get_all_coords().flat()); // ugh!\n\n\t// this has the derived parameters as well\n\tCalculationParameters param=calc.param;\n\n\t// read MOs from file and save them as AO projection\n\tstd::vector<Function<double,3> > aos=SCF::project_ao_basis_only(world, calc.aobasis, calc.molecule);\n\tauto mos=MolecularOrbitals<double,3>::read_restartdata(world,\n\t\t\tparam.prefix()+\".restartdata\",calc.molecule, param.nmo_alpha(), param.nmo_beta());\n\tMolecularOrbitals<double,3> amo=mos.first,bmo=mos.second;\n\tMolecularOrbitals<double,3>::save_restartaodata(world,calc.molecule,amo,bmo,calc.aobasis);\n\n\t// read AO projections\n\tauto mos1=MolecularOrbitals<double,3>::read_restartaodata(world, calc.molecule, param.have_beta());\n\tMolecularOrbitals<double,3> amo1=mos1.first,bmo1=mos.second;\n\n\t// accept error in the MOs (by construction)\n\tint success=similar(amo,amo1) and similar(bmo,bmo1);\n\treturn success;\n}\n\n\n\nint main(int argc, char** argv) {\n\tWorld& world=madness::initialize(argc, argv);\n\tint result=0;\n\tworld.gop.fence();\n\tstartup(world,argc,argv);\n\n\tresult+=test_read_restartdata(world);\n\tresult+=test_read_restartaodata(world);\n\tprint(\"result\",result);\n\tmadness::finalize();\n\treturn result;\n}\n"
  },
  {
    "path": "src/madness/chem/test_SCFOperators.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness.h>\n#include<madness/chem/SCFOperators.h>\n#include<madness/chem/SCF.h>\n#include<madness/chem/nemo.h>\n#include<madness/chem/correlationfactor.h>\n#include<madness/chem/write_test_input.h>\n#include<typeinfo>\n\nusing namespace madness;\nusing namespace madchem;\n\nbool smalltest = false;\n\nbool similar(double val1, double val2, double thresh=1.e-6) {\n    return std::fabs(val1-val2)<thresh;\n}\n\n/// an N-dimensional real-valued Gaussian function\n\n/// the function looks like\n/// \\[\n/// f(r) = x^i y^j .. z^k exp(-alpha r^2)\n/// \\]\ntemplate<typename T, std::size_t NDIM>\nclass GaussianGuess : public FunctionFunctorInterface<T,NDIM> {\n    typedef Vector<double,NDIM> coordT;\n\npublic:\n\n    /// ctor\n\n    /// @param[in]  origin  the origin of the Gauss function\n    /// @param[in]  alpha   the exponent exp(-alpha r^2)\n    /// @param[in]  ijk     the monomial x^i y^j z^k exp(-alpha r^2) (for NDIM)\n    GaussianGuess(const coordT& origin, const double alpha,\n    \t\tconst std::vector<int> ijk=std::vector<int>(NDIM))\n            : origin(origin), exponent(alpha), ijk(ijk) {\n    \tfor (auto i : ijk) l+=i;\n    }\n\n    /// ctor\n\n    /// @param[in]  origin  the origin of the Gauss function\n    /// @param[in]  alpha   the exponent exp(-alpha r^2)\n    /// @param[in]  ijk     the monomial x^i y^j z^k exp(-alpha r^2) (for NDIM)\n    GaussianGuess(const coordT& origin, const double alpha, int l)\n            : origin(origin), exponent(alpha), ijk(0), l(l) {\n    \tijk=std::vector<int>(NDIM);\n    \tfor (int i=0; i<std::abs(l); ++i) {\n    \t\tint v1 = rand() % NDIM;\n    \t\tijk[v1]++;\n    \t}\n//    \tprint(\"in GaussianGuess : l, ijk\", l, ijk,\"phase\", phase);\n    }\n\n    coordT origin;\n    double exponent;        ///< exponent of the guess\n    std::vector<int> ijk;   ///< cartesian exponents\n    int l=0;\t\t\t\t///< magnetic quantum number (if T=double_complex)\n    double phase=double(rand()%1000)/1000.0;\t\t///< complex phase (if applicable)\n\n    /// virtual function cannot be SFINAE'ed\n    T operator()(const coordT& xyz) const {\n    \treturn val(xyz);\n    }\n\n\n    template<class R = T>\n    typename std::enable_if<std::is_same<R,std::complex<double> >::value, R>::type\n\tval(const coordT& xyz) const {\n\n\t\tdouble prefac=1.0;\n    \tdouble r=(xyz-origin).normf();\n\t\tconst double e=exponent*r*r;\n\n\t\tfor (std::size_t i=0; i<NDIM;++i) prefac*=pow(xyz[i]-origin[i],ijk[i]);\n\n\t\tT result=prefac*exp(-e);\n\t\tresult*=exp(T(0.0,1.0)*phase); \t// this term introduces a random complex phase\n\t\treturn result;\n    }\n\n\n    template<class R = T>\n    typename std::enable_if<std::is_same<R,double>::value, R>::type\n\tval(const coordT& xyz) const {\n\t\tdouble prefac=1.0;\n    \tdouble r=(xyz-origin).normf();\n\t\tconst double e=exponent*r*r;\n\t\tfor (std::size_t i=0; i<NDIM;++i) prefac*=pow(xyz[i]-origin[i],ijk[i]);\n\t\treturn prefac*exp(-e);\n    }\n\n};\n\n/// reference potential for the Poisson solver of a Gaussian\n\n/// Given a unnormalized Gaussian return the result of the Poisson equation:\n/// \\[\n///     V(r) = \\int dr' 1/|r-r'| exp(-alpha r'^2)\n/// \\]\n/// Formulas taken from wikipedia:\n/// http://en.wikipedia.org/wiki/Poisson%27s_equation#Potential_of_a_Gaussian_charge_density\n/// \\[\n///     \\nabla^2 \\phi = \\rho\n///     \\rho(r) = Q * exp(-alpha r^2)\n///     \\phi(r) = Q * 1/r erf(r/\\sqrt{2} \\sigma)\n/// \\]\n/// where the Gaussian function is NOT normalized, and alpha = 1/(2 sigma^2)\nstruct refpotfunctor {\n    double exponent;    // exponent of the corresponding Gaussian\n    double sigma;       // parameter in the formulas\n    double arg;         // argument of the error function\n    double prefac;      // prefactor to account for unnormalized Gaussian\n\n    /// ctor takes the exponent of the corresponding Gaussian exp(-alpha r^2)\n    refpotfunctor(double alpha) : exponent(alpha) {\n        // convert exponent into parameters of the above equations: sigma\n        sigma=1.0/sqrt(2.0*exponent);\n        arg=1./sqrt(2.)/sigma;\n        prefac=pow(sigma*sqrt(2.*constants::pi),3.);\n    }\n\n    double operator()(const coord_3d& xyz) const {\n        double r=xyz.normf();\n        return prefac * erf(r*arg)/r;\n    }\n};\n\n\n// /// will write a test input and remove it from disk upon destruction\n// struct write_test_input {\n//\n//     double eprec=FunctionDefaults<3>::get_thresh()*0.1;\n//\n//     std::string filename_;\n//     write_test_input(std::string mol=\"lih\") : filename_(\"test_SCFOperators_input\") {\n//         std::ofstream of(filename_);\n//         of << \"dft\\n\";\n//         of << \"xc hf\\n\";\n//         of << \"no_orient true\\n\";\n//         of << \"k 8\\n\";\n//         of << \"protocol [1.e-5] \\n\";\n//         of << \"ncf (slater,2.0)\\n\";\n//         of << \"end\\n\";\n//\n//         if (mol==\"lih\") {\n//             of << \"geometry\\n\";\n//             of << \"eprec \" << eprec << std::endl;\n//             of << \"Li 0.0    0.0 0.0\\n\";\n//             of << \"H  1.4375 0.0 0.0\\n\";\n//             of << \"end\\n\";\n//         } else if (mol==\"hf\") {\n//             double eprec=1.e-5;\n//             of << \"geometry\\n\";\n//             of << \"eprec \" << eprec << std::endl;\n//             of << \"F  0.1    0.0 0.2\\n\";\n//             of << \"H  1.4375 0.0 0.0\\n\";\n//             of << \"end\\n\";\n//         }\n//         of.close();\n//     }\n//\n//     ~write_test_input() {\n//         std::remove(filename_.c_str());\n//     }\n//\n//     std::string filename() const {return filename_;}\n// };\n\n/// complex function p-orbital with m_l=1\nstatic double_complex p_plus(const coord_3d& xyz) {\n\tdouble r=xyz.normf();\n\tdouble theta=acos(xyz[2]/r);\n\tdouble phi=atan2(xyz[1],xyz[0]);\n\treturn r*exp(-r/2.0)*sin(theta)*exp(double_complex(0.0,1.0)*phi);\n}\n\n/// complex function p-orbital with m_l=-1\nstatic double_complex p_minus(const coord_3d& xyz) {\n\tdouble r=xyz.normf();\n\tdouble theta=acos(xyz[2]/r);\n\tdouble phi=atan2(xyz[1],xyz[0]);\n\treturn r*exp(-r/2.0)*sin(theta)*exp(double_complex(0.0,-1.0)*phi);\n}\n\n\n\nbool check_err(double err, double thresh, std::string msg) {\n    if (fabs(err)>thresh) {\n        print(\"\\nfailing test:\",msg,\"\\n\");\n        return true;\n    }\n    return false;\n}\n\n/// test the hermiticity of the operator op and its translational invariance\n\n/// @param[in]  world   the world\n/// @param[in]  op      the operator to be tested, must implement op(vecfuncT,vecfuncT)\n/// @param[in]  thresh  the accuracy threshold\n/// @return     0 if test passes, 1 if test fails\ntemplate<typename T, typename opT, std::size_t NDIM>\nint test_hermiticity(World& world, const opT& op, double thresh) {\n\n    print(\"hermiticity error/translational invariance\");\n    print(\"abs err       op(ij).normf()\");\n    for (int ml=-1; ml<2; ++ml) {\t// complex magnetic number (ignored if T == double)\n\t\tfor (int i=0; i<3; ++i) {\n\t\t\tVector<double,NDIM> origin(double(i)*0.43);\n\n\t\t\t// test hermiticity of the T operator\n\t\t\tstd::vector<Function<T,NDIM> > amo(2);\n\t\t\tamo[0]=FunctionFactory<T,NDIM>(world)\n\t\t\t\t\t.functor(GaussianGuess<T,NDIM>(origin,1.0,ml)).truncate_on_project();\n\t\t\tamo[1]=FunctionFactory<T,NDIM>(world)\n\t\t\t\t\t.functor(GaussianGuess<T,NDIM>(origin,2.0,(ml+1)*2)).truncate_on_project();\n\n\t\t\tTensor<T> tmat=op(amo,copy(world,amo));\t// deep copy triggers asymmetric evaluation\n\t\t\tTensor<T> tmp=tmat-conj_transpose(tmat);\n\t\t\tdouble err=double(tmp.normf()/tmp.size());\n//\t\t\tprint(\"origin\",origin);\n//\t\t\tprint(\"ml \",ml,(ml+1)*2);\n\t\t\tprint(err,tmat.normf());\n//\t\t\tprint(tmat);\n\t\t\tif (check_err(abs(err),thresh*2.0,\"hermiticity error\")) return 1;  // tolerance 2\n\t\t}\n    }\n\n    return 0;\n}\n\n/// test if the operator return correct matrix elements if bra!=ket\n\n/// @param[in]  world   the world\n/// @param[in]  op      the operator to be tested, must implement op(vecfuncT,vecfuncT)\n/// @param[in]  thresh  the accuracy threshold\n/// @return     0 if test passes, 1 if test fails\ntemplate<typename T, typename opT, std::size_t NDIM>\nint test_asymmetric(World& world, const opT& op, double thresh) {\n\n    Vector<double,NDIM> origin(1.2);\n    const std::vector<int> ijk(NDIM);   // s-symmetry\n    std::vector<int> ijk_p(NDIM);       // p-symmetry\n    ijk_p[NDIM-1]=1;\n    std::vector<int> ijk_d(NDIM);       // d-symmetry (not quite actually..)\n    ijk_d[NDIM-1]=2;\n\n    std::vector<Function<T,NDIM> > amo(2);\n    amo[0]=FunctionFactory<T,NDIM>(world)\n            .functor(GaussianGuess<T,NDIM>(origin,1.0,ijk)).truncate_on_project();\n    amo[1]=FunctionFactory<T,NDIM>(world)\n            .functor(GaussianGuess<T,NDIM>(origin,2.0,ijk)).truncate_on_project();\n\n    // test asymmetric T operator\n    std::vector<Function<T,NDIM> > bmo(5);\n    bmo[0]=copy(amo[0]);\n    bmo[1]=copy(amo[1]);\n    bmo[2]=FunctionFactory<T,NDIM>(world).functor(GaussianGuess<T,NDIM>(origin,1.0,ijk_p))\n                .truncate_on_project();\n    bmo[3]=FunctionFactory<T,NDIM>(world).functor(GaussianGuess<T,NDIM>(origin,1.0,ijk_d))\n                .truncate_on_project();\n    bmo[4]=FunctionFactory<T,NDIM>(world).functor(GaussianGuess<T,NDIM>(origin,0.5,ijk))\n                .truncate_on_project();\n\n    Tensor<T> tmat=op(amo,amo);\n    Tensor<T> tmat1=op(amo,bmo);\n    Tensor<T> tmp=tmat1(_,Slice(0,1))-tmat;\n    double err=tmp.normf()/tmp.size();\n    print(\"a/symmetric algorithm error\",err);\n    if (check_err(err,thresh*2.0,\"symmetry error\")) return 1;\n    return 0;\n\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_kinetic(World& world) {\n    if (world.rank()==0) print(\"entering test_kinetic with dimension, type \",NDIM,typeid(T).name());\n\n    FunctionDefaults<NDIM>::set_cubic_cell(-10, 10);\n    double thresh=FunctionDefaults<NDIM>::get_thresh();\n\n    Kinetic<T,NDIM> Top(world);\n\n    Vector<double,NDIM> origin(0.0);\n    origin[NDIM-1]+=1.303;\n    const std::vector<int> ijk(NDIM);   // s-symmetry\n\n    // compare T operator with integration by parts\n    double expo=2.0;\n    Function<T,NDIM> f=FunctionFactory<T,NDIM>(world)\n            .functor(GaussianGuess<T,NDIM>(origin,expo,ijk)).truncate_on_project();\n    T ip_amo=0.0;\n    for (std::size_t i=0; i<NDIM; ++i) {\n        std::vector<int> dijk(NDIM);\n        dijk[i]=1;\n        Function<T,NDIM> df=FunctionFactory<T,NDIM>(world).truncate_on_project()\n                .functor(GaussianGuess<T,NDIM>(origin,expo,dijk));\n        df.scale(2.0*expo);\n        ip_amo+=0.5*inner(df,df);\n    }\n    T T_amo=Top(f,f);\n    double err=std::abs(ip_amo-T_amo);\n    print(\"<Damo|Damo>\",ip_amo,T_amo,err);\n    if (check_err(abs(err),thresh*2.0,\"kinetic error\")) return 1;\n\n    // compute an off-diagonal element\n    Function<T,NDIM> ff=FunctionFactory<T,NDIM>(world)\n            .functor(GaussianGuess<T,NDIM>(origin,expo,2)).truncate_on_project();\n\n    print(\"<f | T | ff > :\",Top(f,ff));\n    print(\"ff.norm2(), abs(ff.norms())\",ff.norm2(),abs(ff).norm2(),real(ff).norm2());\n\n    // test hermiticity of the T operator\n    int success=test_hermiticity<T,Kinetic<T,NDIM>,NDIM>(world, Top, thresh);\n    if (success>0) return 1;\n\n    success=test_asymmetric<T,Kinetic<T,NDIM>,NDIM>(world, Top, thresh);\n    if (err>thresh) return 1;\n\n    return 0;\n}\n\ntemplate<typename T>\nint test_coulomb(World& world) {\n    if (world.rank()==0) print(\"\\nentering test_coulomb\");\n\n    FunctionDefaults<3>::set_cubic_cell(-10, 10);\n    FunctionDefaults<3>::set_thresh(1.e-5);\n    double thresh=FunctionDefaults<3>::get_thresh();\n    if (world.rank()==0) print(\"thresh\",thresh);\n\n    // A Gaussian charge density yields an erf potential\n    // \\rho(r) = Q/(sigma (2\\pi)^3/2 ) exp(-r^2/(2 sigma^2)\n    // V(r)    = 1/(4\\pi)Q/r erf(r/(sqrt(2)*sigma))\n\n    const double alpha=1.5;\n    Vector<double,3> origin(0.0);\n\n    // compute a trial density and the reference potential\n    real_function_3d density=real_factory_3d(world).truncate_on_project()\n                .functor(GaussianGuess<double,3>(origin,alpha)).thresh(thresh*0.1);\n    real_function_3d refpot=real_factory_3d(world).truncate_on_project()\n            .functor(refpotfunctor(alpha)).thresh(thresh*0.1);\n    double refpotnorm=refpot.norm2();\n    print(\"refpotnorm\",refpotnorm);\n\n    // compute the potential from the trial density\n    Coulomb<double,3> J(world);\n    J.reset_poisson_operator_ptr(1.e-5,FunctionDefaults<3>::get_thresh());\n    J.potential()=J.compute_potential(density);\n    double Jpotnorm=J.potential().norm2();\n    print(\"Jpotnorm  \",Jpotnorm);\n\n    // compare potentials\n    real_function_3d diffdensity=J.potential()-refpot;\n    double err=diffdensity.norm2()/Jpotnorm;\n    print(\"relative error in the densities: \",err);\n    if (check_err(err,thresh,\"Coulomb density error\")) return 1;\n\n    // test matrix element\n    Function<T,3> g=FunctionFactory<T,3>(world).truncate_on_project()\n                    .functor(GaussianGuess<T,3>(origin,3.0));\n    Function<double,3> g2=abs_square(copy(g));\n    T refelement=inner(g2,refpot);\n    T element=J(g,g);\n    err=std::abs(element-refelement);\n    print(\"element, refelement, error\",element,refelement,err);\n    if (check_err(err,thresh,\"Coulomb matrix element error\"))  return 1;\n\n\n    // test hermiticity of the T operator\n    int success=test_hermiticity<T,Coulomb<double,3>,3>(world, J, thresh);\n    if (success>0) return 1;\n\n    success=test_asymmetric<T,Coulomb<double,3>,3>(world, J, thresh);\n    if (err>thresh) return 1;\n\n    return 0;\n}\n\n/// anchor test for the exchange operator -- partially hardwired\ntemplate<typename T>\nint exchange_anchor_test(World& world, Exchange<T,3>& K, const double thresh) {\n\n    const int nmo=2;\n    Tensor<double> alpha(nmo);\n    alpha(0l)=1.0;\n    alpha(1l)=2.0;\n    Vector<double,3> origin(0.0);\n\n    // construct two dummy orbitals\n    std::vector<Function<T,3> > amo(nmo);\n    for (int i=0; i<nmo; ++i) {\n        amo[i]=FunctionFactory<T,3>(world).truncate_on_project()\n                .functor(GaussianGuess<T,3>(origin,alpha(i))).thresh(thresh*0.1);\n    }\n    Tensor<double> aocc(nmo);\n    aocc.fill(1.0);\n\n    // compute the reference result functions\n    std::vector<Function<T,3> > Kamo=zero_functions_compressed<T,3>(world,nmo,true);\n    for (int i=0; i<nmo; ++i) {\n        for (int k=0; k<nmo; ++k) {\n            const double sum_alpha=alpha(i)+alpha(k);\n            real_function_3d refpot=real_factory_3d(world).truncate_on_project()\n                    .functor(refpotfunctor(sum_alpha)).thresh(thresh*0.1);\n            Kamo[i]+=amo[k]*refpot;\n        }\n    }\n\n    // compute the result functions with the exchange operator\n    std::vector<Function<T,3> > Kamo1=K(amo);\n\n    std::vector<Function<T,3> > diff=sub(world,Kamo,Kamo1);\n    std::vector<double> norms=norm2s(world,diff);\n    if (world.rank()==0) print(\"diffnorm in K\",norms);\n    int ierr=0;\n    for (double& n : norms) {\n        if (n>thresh*5.0) ierr++;           // tolerance 5.0 in the density\n    }\n\n    Tensor<T> Kmat=matrix_inner(world,amo,Kamo);\n    Tensor<T> Kmat1=matrix_inner(world,amo,Kamo1);\n//    print(\"kmat, kmat1\");\n//    print(Kmat);\n//    print(Kmat1);\n    double err=(Kmat-Kmat1).normf()/Kmat.size();\n    if (world.rank()==0)\n    \tprint(\"diff in Kmat compared to reference potential\",err);\n\tif (check_err(err,thresh,\"Exchange potential error\")) return 1;\n\n    // hard-wire!\n    Tensor<double> hardwire(2,2);\n    hardwire(0,0)=5.96038972;\n    hardwire(0,1)=3.70974661;\n    hardwire(1,0)=3.70974661;\n    hardwire(1,1)=2.36014231;\n    err=(hardwire-Kmat1).normf()/Kmat.size();\n    if (world.rank()==0)\n    \tprint(\"diff in Kmat compared to hardwired result \",err);\n\tif (check_err(err,thresh,\"Exchange matrix element error\")) return 1;\n    return 0;\n}\n\ntemplate<typename T>\nint test_exchange(World& world) {\n\n    FunctionDefaults<3>::set_thresh(1.e-5);\n    double thresh=FunctionDefaults<3>::get_thresh();\n    if (world.rank()==0) print(\"\\nentering test_exchange\",thresh,typeid(T).name());\n    FunctionDefaults<3>::set_cubic_cell(-10, 10);\n\n    // construct exchange operator\n    double lo=1.e-4;\n    Exchange<T,3> K(world,lo);\n\n    const int nmo=2;\n    Tensor<double> alpha(nmo);\n    alpha(0l)=1.0;\n    alpha(1l)=2.0;\n    Vector<double,3> origin(0.0);\n\n    // construct two dummy orbitals\n    std::vector<Function<T,3> > amo(nmo);\n    for (int i=0; i<nmo; ++i) {\n        amo[i]=FunctionFactory<T,3>(world).truncate_on_project()\n                .functor(GaussianGuess<T,3>(origin,alpha(i))).thresh(thresh*0.1);\n    }\n    Tensor<double> aocc(nmo);\n    aocc.fill(1.0);\n\n    K.set_bra_and_ket(conj(world, amo), amo);\n    K.set_algorithm(Exchange<T,3>::multiworld_efficient);\n\n    // compare the exchange operator to precomputed reference values\n    int success=0;\n    if (typeid(T)==typeid(double)) success+=exchange_anchor_test(world, K, thresh);\n    if (success>0) return 1;\n\n    if (!smalltest) {\n    \t// test hermiticity of the K operator\n    \tsuccess=test_hermiticity<T,Exchange<T,3> ,3>(world, K, thresh);\n    \tif (success>0) return 1;\n\n    \t// test bra/ket sets being different\n    \tsuccess=test_asymmetric<T,Exchange<T,3> ,3>(world, K, thresh);\n    \tif (success>0) return 1;\n\t}\n\n    return 0;\n}\n\ntemplate<typename T>\nint test_XCOperator(World& world) {\n\n    FunctionDefaults<3>::set_thresh(1.e-6); // neeed for xc test to work\n    double thresh=FunctionDefaults<3>::get_thresh();\n    if (world.rank()==0) print(\"\\nentering test_XCOperator\",thresh);\n    FunctionDefaults<3>::set_cubic_cell(-10, 10);\n\n    const double alpha=1.5;\n    const double beta=10.0;\n    Vector<double,3> origin1(0.0);\n    Vector<double,3> origin2={1.0,3.0,-1.5};\n\n    // test refine_to_common_level\n    Function<T,3> empty;\n    Function<T,3> f1=FunctionFactory<T,3>(world).functor(GaussianGuess<T,3>(origin1,alpha));\n    Function<T,3> f2=FunctionFactory<T,3>(world).functor(GaussianGuess<T,3>(origin2,beta));\n    std::vector<Function<T,3> > v(3);\n    v[0]=empty;\n    v[1]=f1;\n    v[2]=f2;\n    refine_to_common_level(world,v);\n    MADNESS_CHECK(v[1].tree_size()==v[2].tree_size()); // should be identical\n    MADNESS_CHECK(v[0].tree_size()==0);    // no change here\n\n    real_function_3d arho=abs_square(f1);\n\n    // hardwire-check several functionals for their energy, potential, and kernels\n    // for Slater exchange their ratios must be 3/4 and 9/4\n    std::vector<double> refvalues{\n        -1.435302e+00, -1.884266e+00, -5.937228e-01,    // lda energy, pot, kernel\n        -1.295368e+00, -1.727158e+00, -5.757192e-01,    // LDA_X energy, pot, kernel\n        -1.515767e+00, -1.954087e+00, -5.796946e-01,    // pbe energy, pot, kernel\n        -1.541359e+00, -1.972863e+00, -5.764567e-01     // bp energy, pot, kernel\n    };\n\n    std::vector<std::string> xcfuncs{\"lda\",\"LDA_X\",\"pbe\",\"bp\"};\n#ifndef MADNESS_HAS_LIBXC\n    xcfuncs=std::vector<std::string>(1,\"lda\");\n#endif\n    int i=0;\n    for (std::string xcfunc : xcfuncs) {\n        if (smalltest && xcfunc==\"bp\") break;\n        \n        /// custom ctor with information about the XC functional\n        XCOperator<double,3> xc(world,xcfunc,false,arho,arho);\n        double tol = 1e-6;\n        if (xcfunc==\"bp\") tol = 2e-6;\n        print(\"xc functional \",xcfunc,tol);\n\n        double a0=xc.compute_xc_energy();\n        print(\"energy \",a0);\n        MADNESS_CHECK(similar(a0,refvalues[i++]));\n\n        // compare xc potential to hardwired results\n        double a1=2.0*std::real(inner(f1,xc(f1))); // factor 2 for RHF\n        real_function_3d lda_pot=xc.make_xc_potential();\n        double a11=2.0*inner(arho,lda_pot);\n        print(\"potential \",a1);\n        print(\"potential \",a11);\n        print(\"ratio \",a0,a1*3.0/4.0);\n        if (xcfunc==\"LDA_X\") MADNESS_CHECK(std::fabs(a0-a1*3.0/4.0)<1.e-6);\n        MADNESS_CHECK(similar(a1,refvalues[i++]));\n\n        // compare xc kernel to hardwired results\n        double a2=inner(2.0*arho,xc.apply_xc_kernel(2.0*arho)); // factors 2 for RHF\n        print(\"kernel \",a2);\n        print(\"ratio \",a0,a2*9.0/4.0);\n        if (xcfunc==\"LDA_X\") MADNESS_CHECK(std::fabs(a0-a2*9.0/4.0)<tol);\n        MADNESS_CHECK(similar(a2,refvalues[i++],tol));  // bp fails this without relaxed tol\n\n        // do spin-polarized\n        for (int ispin=0; ispin<2   ; ++ispin) {\n            XCOperator<double,3> xc1(world,xcfunc,true,arho,arho);\n            xc1.set_ispin(ispin);\n\n            double a0a=xc1.compute_xc_energy();\n            print(\"energy \", a0a);\n            MADNESS_CHECK(similar(a0,a0a));\n\n            double a1a=2.0*std::real(inner(f1,xc(f1))); // factor 2 for RHF\n            real_function_3d lda_pot=xc.make_xc_potential();\n            double a11a=2.0*inner(arho,lda_pot);\n            print(\"potential \",a1a);\n            print(\"potential \",a11a);\n            print(\"ratio \",a0a,a1a*3.0/4.0);\n            if (xcfunc==\"LDA_X\") MADNESS_CHECK(std::fabs(a0a-a1a*3.0/4.0)<1.e-6);\n            MADNESS_CHECK(similar(a1,a1a));\n\n        }\n        print(\"\\n\");\n\n    }\n\n    return 0;\n}\n\nint nuclear_anchor_test(World& world) {\n    double thresh=FunctionDefaults<3>::get_thresh();\n    CalculationParameters param;\n    param.set_user_defined_value<std::vector<double>>(\"protocol\",{1.e-5});\n    param.set_user_defined_value(\"k\",8);\n    write_test_input test_input(param);\n    commandlineparser parser;\n    parser.set_keyval(\"input\",test_input.filename());\n    SCF calc(world,parser);\n    calc.make_nuclear_potential(world);\n\n    // test ncf=none\n    std::shared_ptr<NuclearCorrelationFactor> ncf_none=\n            std::shared_ptr<NuclearCorrelationFactor>(\n                new PseudoNuclearCorrelationFactor(world,\n                calc.molecule,calc.potentialmanager,1.0));\n    ncf_none->initialize(FunctionDefaults<3>::get_thresh());\n\n    Nuclear<double,3> Vnuc(world,ncf_none);\n\n    std::vector<int> ijk(3);\n    Vector<double,3> origin{0,0.1,1.0};\n\n    real_function_3d gaussian=FunctionFactory<double,3>(world)\n                    .functor(GaussianGuess<double,3>(origin,2.0,ijk)).truncate_on_project();\n    real_function_3d gaussian2=copy(gaussian).square();\n\n    double V=Vnuc(gaussian,gaussian);\n    double Vref=inner(calc.potentialmanager->vnuclear(),gaussian2);\n    double err=fabs(V-Vref);\n    print(\"V,Vref\",V,Vref,err);\n    if (check_err(err,thresh,\"Nuclear matrix element error 1\")) return 1;\n\n    // test ncf=slater\n    Nemo::NemoCalculationParameters nemo_param(world,parser);\n    std::shared_ptr<NuclearCorrelationFactor> ncf=\n    create_nuclear_correlation_factor(world, calc.molecule, calc.potentialmanager, nemo_param.ncf());\n    ncf->initialize(FunctionDefaults<3>::get_thresh());\n\n    Nuclear<double,3> Vnuc1(world,ncf);\n    Kinetic<double,3> T(world);\n    real_function_3d R2gaussian=(gaussian*ncf->square());\n    real_function_3d Rgaussian=(gaussian*ncf->function());\n    double V0=inner(copy(Rgaussian).square(),calc.potentialmanager->vnuclear());\n    double V1=Vnuc1(R2gaussian,gaussian);\n    double T1=T(R2gaussian,gaussian);\n    double V2=Vnuc(Rgaussian,Rgaussian);\n    double T2=T(Rgaussian,Rgaussian);\n\n    // < nemo | R (T + V) R | nemo > = < nemo | R^2 (T + U) | nemo >\n    err=fabs(T2+V2 - T1-V1);\n    print(\"T1,V1,T2,V2,err\",T1,V1,T2,V2,err);\n    print(\"V0\",V0);\n    if (check_err(err,thresh,\"Nuclear matrix element error ncf\")) return 1;\n\n    return 0;\n}\n\n\nint test_nuclear(World& world) {\n\n    FunctionDefaults<3>::set_thresh(1.e-5);\n    double thresh=FunctionDefaults<3>::get_thresh();\n    if (world.rank()==0) print(\"\\nentering test_nuclear\",thresh);\n    FunctionDefaults<3>::set_cubic_cell(-10, 10);\n\n    int ierr=0;\n    ierr+=nuclear_anchor_test(world);\n    return ierr;\n}\n\nint dnuclear_anchor_test(World& world) {\n    double thresh=FunctionDefaults<3>::get_thresh();\n//    NemoCalculationParameters\n    CalculationParameters param;\n    param.set_user_defined_value<std::vector<double>>(\"protocol\",{1.e-5});\n    param.set_user_defined_value(\"k\",8);\n    // param.set_user_defined_value<std::pair<std::string,double>>(\"ncf\",{\"slater\",2.0});\n    write_test_input test_input(param,\"hf\");\n    commandlineparser parser;\n    parser.set_keyval(\"input\",test_input.filename());\n    SCF calc(world,parser);\n    calc.molecule.update_rcut_with_eprec(thresh*0.1);\n    calc.make_nuclear_potential(world);\n\n    // derivative of atom wrt axis\n    int iatom=0;\n\n    std::vector<int> ijk(3);\n    Vector<double,3> origin{0.7,0.2,0.0};\n\n    const real_function_3d gaussian=FunctionFactory<double,3>(world)\n                    .functor(GaussianGuess<double,3>(origin,2.0,ijk)).truncate_on_project();\n    const real_function_3d gaussian2=copy(gaussian).square();\n\n    // test ncf=none\n    std::shared_ptr<NuclearCorrelationFactor> ncf_none=\n            std::shared_ptr<NuclearCorrelationFactor>(\n                new PseudoNuclearCorrelationFactor(world,\n                calc.molecule,calc.potentialmanager,1.0));\n    ncf_none->initialize(FunctionDefaults<3>::get_thresh());\n\n    for (int iaxis=0; iaxis<3; ++iaxis) {\n        // compute matrix element and reference matrix element\n        DNuclear<double,3> DVnuc(world,ncf_none,iatom,iaxis);\n        double V=DVnuc(gaussian,gaussian);\n        MolecularDerivativeFunctor mdf(calc.molecule, iatom, iaxis);\n        double Vref=inner(gaussian2,mdf);\n\n        double err=fabs(V-Vref);\n        print(\"V,Vref\",V,Vref,err);\n//        if (check_err(err,thresh,\"DNuclear matrix element error 1\")) return 1;\n    }\n\n    // reference values for ncf=slater, HF molecule\n    const double u2ref=-23.758103991373474;\n    const double u3ref=-0.0005781745459595776;\n    Vector<double,9> u1xref{            // 3 * u1axis + derivativeaxis  // f\n        0.002332606981637648,  0.002860180008999843, -0.0028602426401998825,\n        0.002860180008999843, -0.00529473396843896,  -0.0009534186090795483,\n       -0.002860242640199882, -0.0009534186090795483,-0.005294723600284016};\n    Vector<double,6> u2xref{\n        -13.737236204145585, -4.5791011175397855, 4.5790826623248995,   // f\n         0.8528620408203597, -0.2312846148777162, 0.0                   // h\n    };\n    Vector<double,6> u3xref{\n        -0.001241050130475841,-0.0003208126486983482,0.0003624837425800077, // hf: f\n         0.000767304127536402,-0.0001325268685442912,-0.00004166157789034493 // hf: h\n    };\n\n//    // reference values for ncf=slater, LiH molecule\n//    const double u2ref=-8.8837766341272;\n//    const double u3ref=-0.008762753661850198;\n//    Vector<double,9> u1xref{            // 3 * u1axis + derivativeaxis  // li\n//        0.04211909838428108,  0.037540023223296595, 0.0,\n//        0.037540023223296595,-0.07854524189957111,  0.0,\n//        0.0,                  0.0,                  -0.08927218015277515};\n//    Vector<double,6> u2xref{\n//        -4.661029872588109, -1.3317228199701656,0.0,  // li\n//        0.8528620408203597,-0.2312846148777162,0.0\n//    };\n//    Vector<double,6> u3xref{\n//        -0.012460779625385277,-0.003938479758437209,0.0, // lih: li\n//        0.008163434617542605,-0.002572827376788745,0.0 // lih: h\n//    };\n\n\n    // test ncf=slater\n\n    // test U2 and U3\n    Nemo::NemoCalculationParameters nemo_param(world,parser);\n    CalculationParameters calc_param(world,parser);\n\n    std::shared_ptr<NuclearCorrelationFactor> ncf=\n    create_nuclear_correlation_factor(world, calc.molecule, calc.potentialmanager, nemo_param.ncf());\n    ncf->initialize(FunctionDefaults<3>::get_thresh());\n    NuclearCorrelationFactor::U2_functor u2f(ncf.get());\n    const double u2=inner(gaussian,u2f);\n    double err1=fabs(u2-u2ref);\n    print(\"u2,u2ref\",u2,u2ref,err1);\n    if (check_err(err1,thresh,\"DNuclear matrix element error U2\")) return 1;\n\n    NuclearCorrelationFactor::U3_functor u3f(ncf.get());\n    const double u3=-inner(gaussian,u3f);\n    err1=fabs(u3-u3ref);\n    print(\"u3,u3ref\",u3,u3ref,err1);\n    if (check_err(err1,thresh,\"DNuclear matrix element error U3\")) return 1;\n    print(\"\");\n\n    // test U1X\n    for (int iaxis=0; iaxis<3; ++iaxis) {\n        for (int u1axis=0; u1axis<3; ++u1axis) {\n            NuclearCorrelationFactor::U1X_functor u1xf(ncf.get(),iatom,u1axis,iaxis);\n            const double u1x=-inner(gaussian,u1xf);     // note the sign\n            double err2=fabs(u1x-u1xref[3*u1axis + iaxis]);\n            print(\"u1x,u1xref, u1axis=\",u1axis,\"  \",u1x,u1xref[3*u1axis + iaxis],err2);\n            if (check_err(err2,thresh,\"DNuclear matrix element error u1x\")) return 1;\n        }\n    }\n    print(\"\");\n\n    // test U2X\n    for (int iatom=0; iatom<2; ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis) {\n            NuclearCorrelationFactor::U2X_functor u2xf(ncf.get(),iatom,iaxis);\n            const double u2x=inner(gaussian,u2xf);\n            double err2=fabs(u2x-u2xref[3*iatom+iaxis]);\n            print(\"u2x,u2xref, daxis=\",iaxis,\"  \",u2x,u2xref[3*iatom+iaxis],err2);\n            if (check_err(err2,thresh*3.0,\"DNuclear matrix element error u2x\")) return 1;\n        }\n    }\n    print(\"\");\n\n    // test U3X\n    for (int iatom=0; iatom<2; ++iatom) {\n        for (int iaxis=0; iaxis<3; ++iaxis) {\n            NuclearCorrelationFactor::U3X_functor u3xf(ncf.get(),iatom,iaxis);\n            const double u3x=inner(gaussian,u3xf);     // note the sign\n            double err2=fabs(u3x-u3xref[3*iatom+iaxis]);\n            print(\"u3x,u3xref, daxis=\",iaxis,\"  \",u3x,u3xref[3*iatom+iaxis],err2);\n        if (check_err(err2,thresh,\"DNuclear matrix element error u3x\")) return 1;\n        }\n    }\n\n//    int iaxis=0;\n//    DNuclear DVnuc(world,ncf,iatom,iaxis);\n//    double V=DVnuc(gaussian,gaussian);\n//    double Vref=0.0;       // computed by mathematica\n//    double err=fabs(V-Vref);\n//    print(\"V,Vref\",V,Vref,err);\n//\n//    if (check_err(err,thresh,\"Nuclear matrix element error ncf\")) return 1;\n\n    return 0;\n}\n\nint test_dnuclear(World& world) {\n    FunctionDefaults<3>::set_thresh(1.e-5);\n    double thresh=FunctionDefaults<3>::get_thresh();\n    if (world.rank()==0) print(\"\\nentering test_dnuclear\",thresh);\n    FunctionDefaults<3>::set_cubic_cell(-10, 10);\n\n    int ierr=0;\n    ierr+=dnuclear_anchor_test(world);\n    return ierr;\n}\n\n//int test_macrotask(World& world) {\n//    auto J=Coulomb<double,3>(world);\n//    auto Jtasks=J.make_macrotasks();\n//\n//}\n\nint test_nemo(World& world) {\n    FunctionDefaults<3>::set_thresh(1.e-5);\n    double thresh=FunctionDefaults<3>::get_thresh();\n    if (world.rank()==0) print(\"\\nentering test_nemo\",thresh);\n\n    CalculationParameters param;\n    param.set_user_defined_value<std::vector<double>>(\"protocol\",{1.e-5});\n    param.set_user_defined_value(\"k\",8);\n    write_test_input test_input(param);\n    commandlineparser parser;\n    parser.set_keyval(\"input\",test_input.filename());\n    Nemo nemo(world,parser);\n    auto calc_ptr=nemo.get_calc();\n    double energy=nemo.value(calc_ptr->molecule.get_all_coords().flat()); // ugh!\n    print(\"energy(LiH)\",energy);\n    // hard-wire test\n    if (check_err(energy+7.703832e+00,thresh,\"nemo error\")) return 1;\n\n\n    // test other functionality\n    auto fock = nemo.make_fock_operator();\n    Tensor<double> fmat=(*fock)(nemo.R_square*nemo.get_calc()->get_amo(),nemo.get_calc()->get_amo());\n    print(\"Fock matrix new\");\n    print(fmat);\n    Tensor<double> fmat2=nemo.compute_fock_matrix(nemo.get_calc()->get_amo(),nemo.get_calc()->get_aocc());\n    print(\"Fock matrix old\");\n    print(fmat2);\n    if (check_err((fmat-fmat2).normf(),thresh,\"fock matrix error\")) return 1;\n\n    return 0;\n}\n\nint test_fock(World& world) {\n    FunctionDefaults<3>::set_thresh(1.e-5);\n    double thresh=FunctionDefaults<3>::get_thresh();\n    if (world.rank()==0) print(\"\\nentering test_nemo\",thresh);\n\n    CalculationParameters param;\n    param.set_user_defined_value<std::vector<double>>(\"protocol\",{1.e-5});\n    param.set_user_defined_value(\"k\",8);\n    write_test_input test_input(param);\n    commandlineparser parser;\n    parser.set_keyval(\"input\",test_input.filename());\n    Nemo nemo(world,parser);\n    auto calc_ptr=nemo.get_calc();\n    calc_ptr->param.set_user_defined_value(\"maxiter\",0);\n    nemo.value();\n\n    Fock<double,3> f(world,&nemo);\n    print(\"computing Fock operator:\",f.info());\n\n    coord_3d origin({0.3,0,-1.0});\n    std::vector<int> ijk={0,1,1};\n    std::vector<Function<double,3> > amo(2);\n    amo[0]=FunctionFactory<double,3>(world).functor(GaussianGuess<double,3>(origin,1.0,ijk)).truncate_on_project();\n    amo[1]=FunctionFactory<double,3>(world).functor(GaussianGuess<double,3>(origin,2.0,ijk)).truncate_on_project();\n\n    Tensor<double> fmat=f(amo,amo);\n\n    // reference\n    Coulomb<double,3> J(world,&nemo);\n    Exchange<double,3> K(world,&nemo,0);\n    Nuclear<double,3> V(world,&nemo);\n    Kinetic<double,3> T(world);\n    Tensor<double> ref=T(amo,amo) + J(amo,amo) - K(amo,amo) + V(amo,amo);\n    print(\"T\");\n    print(T(amo,amo));\n    print(\"J\");\n    print(J(amo,amo));\n    print(\"K\");\n    print(K(amo,amo));\n    print(\"V\");\n    print(V(amo,amo));\n    print(fmat);\n    print(ref);\n    if (check_err((fmat-ref).normf(),thresh,\"fock error\")) return 1;\n\n\n    Fock<double,3> f1(world);\n    f1.add_operator(\"J\",std::make_shared<Coulomb<double,3> >(world,&nemo));\n    Tensor<double> f1mat=f1(amo,amo);\n    Tensor<double> ref1=J(amo,amo);\n    print(f1mat);\n    print(ref1);\n    if (check_err((f1mat-ref1).normf(),thresh,\"custom fock error\")) return 1;\n    return 0;\n}\n\n\nint main(int argc, char** argv) {\n    madness::initialize(argc, argv);\n\n    madness::World world(SafeMPI::COMM_WORLD);\n    world.gop.fence();\n    startup(world,argc,argv);\n    srand (time(NULL));\n\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n\n    FunctionDefaults<3>::set_k(8); // needed for XC test to work\n\n    int result=0;\n//    result+=test_fock(world);\n    result+=test_kinetic<double,1>(world);\n    result+=test_kinetic<double,2>(world);\n    result+=test_kinetic<double,3>(world);\n#ifndef HAVE_GENTENSOR\n    result+=test_kinetic<double_complex,1>(world);\n    result+=test_kinetic<double_complex,2>(world);\n    result+=test_kinetic<double_complex,3>(world);\n#endif\n\n//    result+=test_kinetic<double,4>(world);\n//    result+=test_kinetic<double_complex,4>(world);\n\n    result+=test_coulomb<double>(world);\n#ifndef HAVE_GENTENSOR\n    result+=test_coulomb<double_complex>(world);\n#endif\n    if (!smalltest) {\n    \tresult+=test_exchange<double>(world);\n#ifndef HAVE_GENTENSOR\n    \tresult+=test_exchange<double_complex>(world);\n#endif\n    \tresult+=test_XCOperator<double>(world);\n#ifndef HAVE_GENTENSOR\n    \tresult+=test_XCOperator<double_complex>(world);\n#endif\n    \tresult+=test_nuclear(world);\n    \tresult+=test_dnuclear(world);\n//    \tresult+=test_nemo(world);\n\t}\n\n    if (world.rank()==0) {\n        if (result==0) print(\"\\ntests passed\\n\");\n        else print(\"\\ntests failed\\n\");\n    }\n    madness::finalize();\n    return result;\n}\n"
  },
  {
    "path": "src/madness/chem/test_ccpairfunction.cc",
    "content": "//\n// Created by Florian Bischoff on 6/27/22.\n//\n\n\n#include<madness/mra/mra.h>\n#include<madness/chem/ccpairfunction.h>\n#include<madness/chem/correlationfactor.h>\n#include<madness/chem/electronic_correlation_factor.h>\n#include<madness/chem/CCStructures.h>\n#include<madness/chem/CCPotentials.h>\n#include<madness/chem/projector.h>\n\n#include<madness/world/test_utilities.h>\n#include<random>\n\nusing namespace madness;\n\n\nbool longtest=false;\ntemplate<typename T, std::size_t NDIM>\nstruct data {\n    static constexpr std::size_t LDIM=NDIM/2;\n    Function<T,LDIM> f1,f2,f3,f4,f5;\n    Function<T,NDIM> f12,f23;\n    World& world;\n    CCParameters parameters;\n\n    std::shared_ptr<CCConvolutionOperator<T,LDIM>> f12_op;\n\n    data(World& world, const CCParameters& parameters) : world(world), parameters(parameters){}\n\n    bool is_initialized() const {\n        return f1.is_initialized();\n    }\n\n    void initialize() {\n        print(\"initializing data for NDIM=\",NDIM);\n        f12_op.reset(new CCConvolutionOperator<T,LDIM>(world,OT_F12,parameters));\n        auto g1 = [](const Vector<double,LDIM>& r) { return exp(-1.0 * inner(r, r)); };\n        auto g2 = [](const Vector<double,LDIM>& r) { return exp(-2.0 * inner(r, r)); };\n        auto g3 = [](const Vector<double,LDIM>& r) { return exp(-3.0 * inner(r, r)); };\n        auto g4 = [](const Vector<double,LDIM>& r) { return exp(-4.0 * inner(r, r)); };\n        auto g5 = [](const Vector<double,LDIM>& r) { return exp(-5.0 * inner(r, r)); };\n        f1=FunctionFactory<T,LDIM>(world).f(g1);\n        f2=FunctionFactory<T,LDIM>(world).f(g2);\n        f3=FunctionFactory<T,LDIM>(world).f(g3);\n        f4=FunctionFactory<T,LDIM>(world).f(g4);\n        f5=FunctionFactory<T,LDIM>(world).f(g5);\n\n        auto g = [](const Vector<double,NDIM>& r) {\n            double r1=0.0, r2=0.0;\n            for (int i=0; i<LDIM; ++i) {\n                r1+=r[i]*r[i];\n                r2+=r[i+LDIM]*r[i+LDIM];\n            }\n            return exp(-1.0*r1 - 2.0*r2);\n        };\n        auto g23 = [](const Vector<double,NDIM>& r) {\n            double r1=0.0, r2=0.0;\n            for (int i=0; i<LDIM; ++i) {\n                r1+=r[i]*r[i];\n                r2+=r[i+LDIM]*r[i+LDIM];\n            }\n            return exp(-1.0*r1 - 2.0*r2) + exp(-2.0*r1 - 3.0*r2);\n        };\n\n        f12=FunctionFactory<T,NDIM>(world);\n        f23=FunctionFactory<T,NDIM>(world);\n        std::string name_f12=\"test_ccpairfunction_f12_ndim_\"+std::to_string(NDIM);\n        std::string name_f23=\"test_ccpairfunction_f23_ndim_\"+std::to_string(NDIM);\n//        try {\n//            load(f12,name_f12);\n//        } catch (...) {\n            f12 = FunctionFactory<T,NDIM>(world).f(g);\n//            save(f12,name_f12);\n//        }\n//        try {\n//            load(f23,name_f23);\n//        } catch (...) {\n            f23 = FunctionFactory<T,NDIM>(world).f(g23);\n//            save(f23,name_f23);\n//        }\n\n    }\n    void clear() {\n        f12_op.reset();\n        f1.clear();\n        f2.clear();\n        f3.clear();\n        f4.clear();\n        f5.clear();\n        f12.clear();\n        f23.clear();\n    }\n\n    /// get some standard functions\n\n    /// f1: exp(-1.0 r^2)\n    /// f2: exp(-2.0 r^2)\n    /// f3: exp(-3.0 r^2)\n    /// f4: exp(-4.0 r^2)\n    /// f5: exp(-5.0 r^2)\n    /// f12: exp(-r_1^2 - 2 r_2^2)\n    /// f23: exp(-r_1^2 - 2 r_2^2) + exp(-2 r_1^2 - 3 r_2^2)\n    auto get_functions() {\n        if (not is_initialized()) initialize();\n        return std::make_tuple(f1,f2,f3,f4,f5,f12);\n    }\n\n    /// get some standard ccpairfunctions\n\n    /// p1: pure, corresponds to f12\n    /// p2: dec, corresponds to f23\n    /// p3: op_dec, corresponds to f23\n    /// p4: pure, corresponds to f23\n    /// p5: op_pure, corresponds to f23\n    auto get_ccpairfunctions() {\n        if (not is_initialized()) initialize();\n        CCPairFunction<T,NDIM> p1(copy(f12));\n        CCPairFunction<T,NDIM> p2({f1,f2},{f2,f3});\n        CCPairFunction<T,NDIM> p3(f12_op,{f1,f2},{f2,f3});\n        CCPairFunction<T,NDIM> p4(copy(f23)); // two-term, corresponds to p2\n        CCPairFunction<T,NDIM> p5(f12_op,copy(f23)); // two-term, corresponds to p2\n        return std::make_tuple(p1,p2,p3,p4,p5);\n    }\n\n};\n\n\ntemplate<typename T, std::size_t NDIM>\nint test_constructor(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                     const CCParameters& parameter) {\n    test_output t1(\"constructor<T,\"+std::to_string(NDIM)+\">\");\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n\n    Function<T,NDIM> f=FunctionFactory<T,NDIM>(world);\n    auto [f1,f2,f3,f4,f5,ff]=data.get_functions();\n\n    std::vector<Function<T,LDIM>>  a= zero_functions<T,LDIM>(world,LDIM);\n    std::vector<Function<T,LDIM>>  b= zero_functions<T,LDIM>(world,LDIM);\n    auto f12=CCConvolutionOperatorPtr<double,LDIM>(world, OT_F12, parameter);\n    t1.checkpoint(true,\"preparation\");\n\n    auto f_copy=copy(f);\n    CCPairFunction<T,NDIM> p1;\n    CCPairFunction<T,NDIM> p2(f_copy);\n    CCPairFunction<T,NDIM> p3({f1,f2},{f1,f3});\n    CCPairFunction<T,NDIM> p4(f12,{f1,f2},{f2,f3});\n    t1.checkpoint(true,\"construction\");\n\n    {\n        MADNESS_CHECK(p2.is_pure());\n        MADNESS_CHECK(!p2.is_decomposed());\n        MADNESS_CHECK(!p2.is_op_decomposed());\n        auto p = p2.pure();\n        auto ff = p2.pure().get_function();\n        MADNESS_CHECK((ff.get_impl()==f_copy.get_impl())); // shallow copy of f\n    }\n    t1.checkpoint(true,\"checks on pure\");\n\n    {\n        MADNESS_CHECK(!p3.is_pure());\n        MADNESS_CHECK(p3.is_decomposed());\n        MADNESS_CHECK(!p3.is_op_decomposed());\n        auto a1=p3.get_a();\n        auto b1=p3.get_b();\n    }\n    t1.checkpoint(true,\"checks on decomposed\");\n\n    {\n        MADNESS_CHECK(!p4.is_pure());\n        MADNESS_CHECK(p4.is_decomposed());\n        MADNESS_CHECK(p4.is_op_decomposed());\n        auto a1=p4.get_a();\n        auto b1=p4.get_b();\n        auto op=p4.get_operator();\n    }\n    t1.checkpoint(true,\"checks on op_decomposed\");\n\n    {\n        CCPairFunction<T,NDIM> tmp;\n        tmp=p2;\n        MADNESS_CHECK(tmp.is_pure());\n        MADNESS_CHECK(tmp.component==p2.component);\n\n        tmp=p3;\n        MADNESS_CHECK(!tmp.is_pure());\n        MADNESS_CHECK(tmp.component==p3.component);\n\n    }\n    t1.checkpoint(true,\"checks on assignment\");\n\n    return t1.end();\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_norm(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                     const CCParameters& parameter) {\n    test_output t1(\"norm of <T,\"+std::to_string(NDIM)+\">\");\n\n    auto [p1,p2,p3,p4,p5]=data.get_ccpairfunctions();  // p2-p5 correspond to f230\n    for (const CCPairFunction<T,NDIM>& p : {p2,p3,p4,p5}) {\n        double n=p.norm2();\n        print(\"norm of \",p.name(),n);\n        double n1=sqrt(inner(p,p));\n        print(\"inner\",n1);\n        t1.checkpoint(n,n1,FunctionDefaults<NDIM>::get_thresh(),\"norm of p\");\n    }\n\n    double n2=p2.norm2();\n    double n3=p3.norm2();\n    double n4=p4.norm2();\n    double n5=p5.norm2();\n    t1.checkpoint(n2,n4,FunctionDefaults<NDIM>::get_thresh(),\"norm of p2/4\");\n    t1.checkpoint(n3,n5,FunctionDefaults<NDIM>::get_thresh(),\"norm of p3/5\");\n\n    return t1.end();\n\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_load_store(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                     const CCParameters& parameter) {\n    test_output t1(\"load/store of <T,\"+std::to_string(NDIM)+\">\");\n\n//    t1.set_cout_to_terminal();\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n\n    auto [p1,p2,p3,p4,p5]=data.get_ccpairfunctions();  // p2-p5 correspond to f23\n    auto [f1,f2,f3,f4,f5,ff]=data.get_functions();\n\n    auto compute_diff_norm = [](const CCPairFunction<T,NDIM>& f1, const CCPairFunction<T,NDIM> f2) {\n        std::vector<CCPairFunction<T,NDIM>> diff;\n        diff+={f1};\n        diff-={f2};\n        double in = inner(diff,diff);\n        if (in<0) return -sqrt(-in);\n        return sqrt(in);\n    };\n\n    std::string fname=\"ccpairfunction_test\";\n    {\n        archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, fname, 1);\n        ar & f1;\n        ar & p2;\n        ar & p3;\n        ar & p4;\n        ar & p5;\n    }\n    {\n        archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, fname, 1);\n        CCPairFunction<T,NDIM> g2, g3, g4, g5;\n        ar & f1;\n        ar & g2;\n        ar & g3;\n        ar & g4;\n        ar & g5;\n\n        double n2=compute_diff_norm(g2,p2);\n        double n3=compute_diff_norm(g3,p3);\n        double n4=compute_diff_norm(g4,p4);\n        double n5=compute_diff_norm(g5,p5);\n        t1.checkpoint(n2,FunctionDefaults<LDIM>::get_thresh(),\"store/load \"+p2.name());\n        t1.checkpoint(n3,FunctionDefaults<LDIM>::get_thresh(),\"store/load \"+p3.name());\n        t1.checkpoint(n4,FunctionDefaults<LDIM>::get_thresh(),\"store/load \"+p4.name());\n        t1.checkpoint(n5,FunctionDefaults<LDIM>::get_thresh(),\"store/load \"+p5.name());\n    }\n    t1.checkpoint(true,\"checks on load/store\");\n    return t1.end();\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nint test_operator_apply(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                        const CCParameters& parameter) {\n    test_output t1(\"test_operator_apply<double,\"+std::to_string(NDIM)+\">\");\n//    t1.set_cout_to_terminal();\n\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n\n    double exponent=1.0; // corresponds to the exponent of data::f1 and data::ff\n//    double coefficient=pow(1.0/constants::pi*exponent,0.5*3);\n    double coefficient=1.0;\n    const Vector<double,LDIM> center(0.0);\n\n    auto Gaussian = [&center, &exponent, &coefficient](const Vector<double,LDIM>& r) {\n        return coefficient * exp(-exponent*inner(r-center,r-center));\n    };\n\n    exponent=1.5;\n    Function<T,LDIM> i=FunctionFactory<T,LDIM>(world).functor(Gaussian);\n    exponent=2.5;\n    Function<T,LDIM> j=FunctionFactory<T,LDIM>(world).functor(Gaussian);\n\n    auto gop= BSHOperator<LDIM>(world,0.5,1.e-5,std::min(1.e-4,FunctionDefaults<LDIM>::get_thresh()));\n\n    auto [f1,f2,f3,f4,f5,ff]=data.get_functions();\n    auto [p1,p2,p3,p4,p5]=data.get_ccpairfunctions();  // p2-p5 correspond to f23\n    // p2: dec, corresponds to f23\n    // p3: op_dec, corresponds to f23\n    // p4: pure, corresponds to f23\n    // p5: op_pure, corresponds to f23\n\n    // integrate over particle 2: | u(1,3)> = g(1,2) uu(2,3), project u(1,3) onto bra <i(1) j(3) |\n    // reference for p2, p4:\n    // <i(1) j(3) | g(1,2) f(2,3) | k(2) l(3)> = <g_i(2) | k(2) f_lj(2)>\n    // reference for p1, p3:\n    // <i(1) j(3) | g(1,2) | k(2) l(3)> = <g_i(2) *j(3) | k(2) l(3)> = <g_i(2) | k(2)> <j(3)|l(3)>\n    //\n    // note that the ccpairfunctions always have 2 terms\n    // CCPairFunction<T,NDIM> p2({f1,f2},{f2,f3});\n    // with l=f1, k=f2; and l=f2, k=f3\n\n    auto& fop=*(data.f12_op->get_op());\n    Function<T,LDIM> gi=gop(i);\n\n    Function<T,LDIM> k_1=f1;\n    Function<T,LDIM> l_1=f2;\n    Function<T,LDIM> f_lj_1=fop(l_1*j);\n    Function<T,LDIM> f_kj_1=fop(k_1*j);\n\n    Function<T,LDIM> k_2=f2;\n    Function<T,LDIM> l_2=f3;\n    Function<T,LDIM> f_lj_2=fop(l_2*j);\n    Function<T,LDIM> f_kj_2=fop(k_2*j);\n\n    CCPairFunction<T,NDIM> bra(i,j);\n\n    double ref_p2p4=(gi*k_1*f_lj_1).trace() + (gi*k_2*f_lj_2).trace();\n    double ref_p1p3=(gi*k_1).trace() * (j*l_1).trace() + (gi*k_2).trace() * (j*l_2).trace();\n    std::vector<double> reference({ref_p1p3,ref_p2p4,ref_p1p3,ref_p2p4});\n\n    int counter=0;\n\n    for (auto& p : {p2,p3,p4,p5}) {\n        gop.particle() = 1;\n        auto tmp1=gop(p);\n        double result=inner(bra,tmp1);\n        double ref=reference[counter++];\n        print(\"p=\",p.name(),\"result=\",result,\"reference=\",ref);\n        t1.checkpoint(result,ref,FunctionDefaults<LDIM>::get_thresh(),\"op(1) to \"+p.name());\n    }\n\n    // integrate over particle 3: | u(1,2)> = g(1,3) uu(2,3), project u(1,2) onto bra <i(1) j(2) |\n    // reference for p2, p4:\n    // <i(1) j(2) | g(1,3) f(2,3) | k(2) l(3)> = <g_i(3) | l(3) f_kj(3)>\n    // reference for p1, p3:\n    // <i(1) j(2) | g(1,3) | k(2) l(3)> = <g_i(3) j(2) | k(2) l(3)> = <j(2) | k(2)> <g_i(3)|l(3)>\n    // note the ordering of the indices in the ket! the above line is equivalent to\n    // <i(1) j(2) | g(1,3) | k(2) l(3)> = <i(1) j(2) | g_l(1) k(2)>\n    ref_p2p4=(gi*l_1*f_kj_1).trace() + (gi*l_2*f_kj_2).trace();\n    ref_p1p3=(gi*l_1).trace() * (j*k_1).trace() + (gi*l_2).trace() * (j*k_2).trace();\n    reference=std::vector<double>({ref_p1p3,ref_p2p4,ref_p1p3,ref_p2p4});\n\n    counter=0;\n    CCPairFunction<T,NDIM> bra_ji(j,i);\n    for (auto& p : {p2,p3,p4,p5}) {\n        gop.particle() = 2;\n        auto tmp1=gop(p);\n        double result=inner(bra,tmp1);\n        double ref=reference[counter++];\n        print(\"p=\",p.name(),\"result=\",result,\"reference=\",ref);\n        t1.checkpoint(result,ref,FunctionDefaults<LDIM>::get_thresh(),\"op(2) to \"+p.name());\n    }\n\n\n\n    return t1.end();\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nint test_transformations(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                         const CCParameters& parameter) {\n    test_output t1(\"test_transformations<double,\"+std::to_string(NDIM)+\">\");\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n\n//    auto data=get_data<NDIM>(world,parameter);\n    auto [f1,f2,f3,f4,f5,ff]=data.get_functions();\n    auto f12=CCConvolutionOperatorPtr<double,LDIM>(world, OT_F12, parameter);\n    auto g12=CCConvolutionOperatorPtr<double,LDIM>(world, OT_G12, parameter);\n\n    auto compute_diff_norm = [](const CCPairFunction<T,NDIM>& f1, const CCPairFunction<T,NDIM> f2) {\n        std::vector<CCPairFunction<T,NDIM>> diff;\n        diff+={f1};\n        diff-={f2};\n        return sqrt(inner(diff,diff));\n    };\n\n    CCPairFunction<T,NDIM> p1(copy(ff));\n    t1.checkpoint(p1.is_pure(),\"is_pure\");\n    t1.checkpoint(p1.is_pure_no_op(),\"is_pure_no_op\");\n\n    CCPairFunction<T,NDIM> p2(f12,ff);\n    t1.checkpoint(p2.is_pure(),\"is_pure\");\n    t1.checkpoint(p2.is_op_pure(),\"is_op_pure\");\n    t1.checkpoint(p2.is_convertible_to_pure_no_op(),\"is_convertible_to_pure_no_op\");\n    CCPairFunction<T,NDIM> p3=copy(p2);\n    p3.convert_to_pure_no_op_inplace();\n    t1.checkpoint(p2.is_op_pure(),\"is_op_pure\");\n    t1.checkpoint(p3.is_pure_no_op(),\"is_pure_no_op\");\n\n    CCPairFunction<T,NDIM> p4(g12,copy(ff));\n    t1.checkpoint(p4.is_pure(),\"is_pure\");\n    t1.checkpoint(p4.is_op_pure(),\"is_op_pure\");\n    t1.checkpoint(not p4.is_convertible_to_pure_no_op(),\"not is_convertible_to_pure_no_op\");\n\n    // convert f12 f1 f2 to pure_op_op\n    CCPairFunction<T,NDIM> p5(f12,f1,f2);\n    t1.checkpoint(not p5.is_pure(),\"is_pure\");\n    t1.checkpoint(p5.is_op_decomposed(),\"is_op_decomposed\");\n    t1.checkpoint(p5.is_convertible_to_pure_no_op(),\"is_convertible_to_pure_no_op\");\n    CCPairFunction<T,NDIM> p6=copy(p5);\n    p6.convert_to_pure_no_op_inplace();\n    t1.checkpoint(p6.is_pure_no_op(),\"is_pure_no_op\");\n    double d6=compute_diff_norm(p5,p6);\n    t1.checkpoint(d6,FunctionDefaults<NDIM>::get_thresh()*50,\"numerics\");\n\n    // convert \\sum_i f12 f1_i f2_i to pure_op_op\n    CCPairFunction<T,NDIM> p7(f12,{f1,f2,f3},{f1,f2,f3});\n    t1.checkpoint(not p7.is_pure(),\"is_pure\");\n    t1.checkpoint(p7.is_op_decomposed(),\"is_op_decomposed\");\n    t1.checkpoint(p7.is_convertible_to_pure_no_op(),\"is_convertible_to_pure_no_op\");\n    CCPairFunction<T,NDIM> p8=copy(p7);\n    p8.convert_to_pure_no_op_inplace();\n    t1.checkpoint(p8.is_pure_no_op(),\"is_pure_no_op\");\n    double d8=compute_diff_norm(p7,p8);\n    t1.checkpoint(d8,FunctionDefaults<NDIM>::get_thresh()*50,\"numerics\");\n\n\n\n    return t1.end();\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_multiply_with_f12(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                           const CCParameters& parameters) {\n    test_output t1(\"test_multiply_with_f12<double,\"+std::to_string(NDIM)+\">\");\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n\n    // p1: pure, corresponds to f12\n    // p2: dec, corresponds to f23\n    // p3: op_dec, corresponds to f23\n    // p4: pure, corresponds to f23\n    // p5: op_pure, corresponds to f23\n//    auto data=get_data<NDIM>(world,parameters);\n    auto [p1,p2,p3,p4,p5]=data.get_ccpairfunctions();  // p2-p5 correspond to f23\n    auto f12=data.f12_op;\n\n    double thresh=FunctionDefaults<LDIM>::get_thresh();\n\n    // decomposed\n    CCPairFunction<double,NDIM> tmp1=f12*p2;         // should now be identical to p3\n    CCPairFunction<double,NDIM> tmp2=p2*f12;         // should now be identical to p3\n    double ref=inner(p2,p3);\n\n    double r1=inner(p2,tmp1);\n    bool good=(fabs(ref-r1)<thresh);\n    t1.checkpoint(good,\"f(1,2)*\"+p2.name());\n\n    double r2=inner(p2,tmp2);\n    good=(fabs(ref-r2)<thresh);\n    t1.checkpoint(good,p2.name() + \"f(1,2)\");\n\n    // pure\n    tmp1=f12*p4;         // should now be identical to p5\n    tmp2=p4*f12;         // should now be identical to p5\n    ref=inner(p2,p5);\n\n    r1=inner(p2,tmp1);\n    good=(fabs(ref-r1)<thresh);\n    t1.checkpoint(good,\"f(1,2)*\"+p4.name());\n\n    r2=inner(p2,tmp2);\n    good=(fabs(ref-r2)<thresh);\n    t1.checkpoint(good,p4.name() + \"f(1,2)\");\n    return t1.end();\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_multiply(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                  const CCParameters& parameters) {\n    test_output t1(\"test_multiply<\"+std::to_string(NDIM)+\">\");\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n\n    // consistency check, relies on CCPairFunction<double,6>::inner to work correctly\n    double thresh=FunctionDefaults<LDIM>::get_thresh();\n//    auto data=get_data<NDIM>(world,parameters);\n    auto [p1,p2,p3,p4,p5]=data.get_ccpairfunctions();  // p2-p5 correspond to f23\n    auto [f1,f2,f3,f4,f5,f]=data.get_functions();\n\n    auto particle1=std::array<int,LDIM>();\n    auto particle2=std::array<int,LDIM>();\n    for (int i=0; i<LDIM; ++i) {\n        particle1[i]=i;\n        particle2[i]=i+LDIM;\n    }\n\n    // reference value is <bra | f(1/2) p>  = <f1 f | p>\n    CCPairFunction<T,NDIM> bra(f1,f2);\n    CCPairFunction<T,NDIM> bra1(f1*f2,f2);\n    CCPairFunction<T,NDIM> bra2(f1,f2*f2);\n    for (auto& p : {p2,p3,p4,p5}) {\n\n        auto tmp1=multiply(p,f2,particle1);\n        double ovlp1=inner(bra,tmp1);\n        double ref1=p.has_operator() ? inner(bra1,p3) : inner(bra1,p2);\n\n        bool good=(fabs(ovlp1-ref1)<thresh);\n        t1.checkpoint(good,\"f(1)*\"+p.name());\n\n        auto tmp2=multiply(p,f2,particle2);\n        double ovlp2=inner(bra,tmp2);\n        double ref2=p.has_operator() ? inner(bra2,p3) : inner(bra2,p2);\n\n        good=(fabs(ovlp2-ref2)<thresh);\n        t1.checkpoint(good,\"f(2)*\"+p.name());\n    }\n\n    return t1.end();\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_inner(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n               const CCParameters& parameters) {\n    test_output t1(\"test_inner<\"+std::to_string(NDIM)+\">\");\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n//    t1.set_cout_to_terminal();\n\n    /// f1: exp(-1.0 r^2)\n    /// f2: exp(-2.0 r^2)\n    /// f3: exp(-3.0 r^2)\n    /// f4: exp(-4.0 r^2)\n    /// f5: exp(-5.0 r^2)\n    /// f: exp(-r_1^2 - 2 r_2^2)\n    /// f23: exp(-r_1^2 - 2 r_2^2) + exp(-2 r_1^2 - 3 r_2^2)\n//    auto data=get_data<NDIM>(world,parameters);\n    auto [f1,f2,f3,f4,f5,f]=data.get_functions();\n    /// p1: pure, corresponds to f12\n    /// p2: dec, corresponds to f23\n    /// p3: op_dec, corresponds to f23\n    /// p4: pure, corresponds to f23\n    /// p5: op_pure, corresponds to f23\n    auto [p1,p2,p3,p4,p5]=data.get_ccpairfunctions();\n    auto f12 = *(data.f12_op);\n\n    /// results\n    auto a=std::vector<Function<T,LDIM>>({f1,f2});\n    auto b=std::vector<Function<T,LDIM>>({f2,f3});\n    std::vector<Function<T,LDIM>> a_ij_functions, b_ij_functions;\n    for (int i=0; i<a.size(); ++i) {\n        for (int j=0; j<a.size(); ++j) {\n            a_ij_functions.push_back(a[i]*a[j]);\n        }\n    }\n    for (int i=0; i<b.size(); ++i) {\n        for (int j=0; j<b.size(); ++j) {\n            b_ij_functions.push_back(b[i]*b[j]);\n        }\n    }\n\n    auto aij=matrix_inner(world,a,a);\n    auto bij=matrix_inner(world,b,b);\n\n    // <a_ib_i | a_jb_j> = \\sum_{ij} <a_i|a_j> <b_i|b_j>\n    double ab_ab=aij.trace(bij);\n\n    // <a_ib_i | f | a_jb_j> = \\sum_{ij}  < <a_i|f|a_j>_1(2) | b_ib_j(2) >\n    double ab_f_ab=dot(world,f12(a_ij_functions),b_ij_functions).trace();\n\n    // <a_ib_i | f2 | a_jb_j> = \\sum_{ij}  < <a_i|f^2|a_j>_2 | b_ib_j(2) >\n    // f^2 = 1/(4y^2)(1 - 2*f(y) + f2(2y)) , f2(2y) =f2(y)^2\n    // operator apply of SlaterF12Operator includes a factor of 1/(2 gamma) and the identity\n    // operator apply of SlaterOperator has no further terms\n    const double y = parameters.gamma();\n    SeparatedConvolution<double, LDIM> fop= SlaterOperator<LDIM>(world, y, parameters.lo(), parameters.thresh_bsh_3D());\n    SeparatedConvolution<double, LDIM> fsq = SlaterOperator<LDIM>(world, 2.0 * y, parameters.lo(), parameters.thresh_bsh_3D());\n\n    const double prefactor = 1.0 / (4 * y * y);\n    const double ab_f2_ab = prefactor*( ab_ab\n                                        -2.0*dot(world,apply(world,fop,a_ij_functions),b_ij_functions).trace()\n                                        +dot(world,apply(world,fsq,a_ij_functions),b_ij_functions).trace() );\n\n\n    for (auto& ket : {p2, p3, p4, p5}) {\n        for (auto& bra : {p2, p3, p4, p5}) {\n            double ref=0.0;\n            if (bra.has_operator() and ket.has_operator()) ref=ab_f2_ab;\n            if (bra.has_operator() and (not ket.has_operator())) ref=ab_f_ab;\n            if ((not bra.has_operator()) and ket.has_operator()) ref=ab_f_ab;\n            if ((not bra.has_operator()) and (not ket.has_operator())) ref=ab_ab;\n            double result=inner(bra,ket);\n\n            print(bra.name(true)+ket.name(),\"ref, result, diff\", ref, result, ref-result);\n            double thresh=FunctionDefaults<LDIM>::get_thresh();\n            t1.checkpoint(result,ref,thresh,bra.name(true)+ket.name());\n        }\n    }\n    return t1.end();\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nint test_partial_inner_6d(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                          const CCParameters& parameter) {\n\n    test_output t1(\"test_partial_inner6d<\"+std::to_string(NDIM)+\">\");\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n//    t1.set_cout_to_terminal();\n//    auto data=get_data<6>(world,parameter);\n    auto [f1,f2,f3,f4,f5,f] = data.get_functions();\n\n    std::vector<Function<T,LDIM>> a = {f1, f2};\n    std::vector<Function<T,LDIM>> b = {f2, f3};\n\n    auto f12=CCConvolutionOperatorPtr<double,LDIM>(world, OT_F12, parameter);\n\n    auto [p1,p2,p3,p4,nil]=data.get_ccpairfunctions();\n    CCPairFunction<T,NDIM> p11({f1},{f1});\n    CCPairFunction<T,NDIM> p12({f1},{f2});\n\n    double g11=inner(f1,f1);\n    double g22=inner(f2,f2);\n    double g12=inner(f1,f2);\n    double g13=inner(f1,f3);\n    double g23=inner(f2,f3);\n    double g33=inner(f3,f3);\n    Function<T,LDIM> gf11=(*f12)(f1*f1);\n    Function<T,LDIM> gf12=(*f12)(f1*f2);\n    Function<T,LDIM> gf22=(*f12)(f2*f2);\n    Function<T,LDIM> gf13=(*f12)(f1*f3);\n    Function<T,LDIM> gf23=(*f12)(f2*f3);\n\n    t1.checkpoint(true,\"prep\");\n\n    auto particle1=std::array<int,LDIM>();\n    auto particle2=std::array<int,LDIM>();\n    for (int i=0; i<LDIM; ++i) {\n        particle1[i]=i;\n        particle2[i]=i+LDIM;\n    }\n\n    // p1 = p12 = e(-r1 -2r2)\n    // p2 = e(-r1) * e(-2r2) + e(-2r1) * e(-3e2)  separated\n    // p4 = e(-r1) * e(-2r2) + e(-2r1) * e(-3e2)  6d\n    for (auto test_p1 : {p2,p4}) {\n        for (auto test_p2 : {p2,p4}) {\n            CCPairFunction<T,NDIM> r1=inner(test_p1,test_p2,particle1,particle1);\n            CCPairFunction<T,NDIM> r2=inner(test_p1,test_p2,particle1,particle2);\n            CCPairFunction<T,NDIM> r3=inner(test_p1,test_p2,particle2,particle1);\n            CCPairFunction<T,NDIM> r4=inner(test_p1,test_p2,particle2,particle2);\n\n            double n1=inner(r1,p11);\n            double n2=inner(r2,p11);\n            double n3=inner(r3,p11);\n            double n4=inner(r4,p11);\n\n            double ref_n1=g11*g12*g12 + g12*g12*g13 + g12*g13*g12 + g22*g13*g13;\n            double ref_n2=g12*g12*g11 + g13*g12*g12 + g22*g13*g11 + g23*g13*g12;\n            double ref_n3=ref_n2;\n            double ref_n4=g22*g11*g11 + g23*g11*g12 + g23*g12*g11 + g33*g12*g12;\n\n            bool good=fabs(n1-ref_n1)<FunctionDefaults<3>::get_thresh();\n            t1.checkpoint(good,test_p1.name(true)+test_p2.name()+\" -- 1\");\n            good=fabs(n2-ref_n2)<FunctionDefaults<3>::get_thresh();\n            t1.checkpoint(good,test_p1.name(true)+test_p2.name()+\" -- 2\");\n            good=fabs(n3-ref_n3)<FunctionDefaults<3>::get_thresh();\n            t1.checkpoint(good,test_p1.name(true)+test_p2.name()+\" -- 3\");\n            good=fabs(n4-ref_n4)<FunctionDefaults<3>::get_thresh();\n            t1.checkpoint(good,test_p1.name(true)+test_p2.name()+\" -- 4\");\n\n        }\n    }\n\n    // test < sth | f(1,2) a(1)b(2) >\n    // CCPairFunction<double,6> p2({f1,f2},{f2,f3});\n    // CCPairFunction<double,6> p4(f23); // two-term, corresponds to p2\n    CCPairFunction<T,NDIM> p5(f12,std::vector<Function<T,LDIM>>({f1}),std::vector<Function<T,LDIM>>({f2}));\n    for (auto& test_p1 : {p2, p4}) {\n        CCPairFunction<T,NDIM> r1=inner(test_p1,p5,particle1,particle1);\n        CCPairFunction<T,NDIM> r2=inner(test_p1,p5,particle1,particle2);\n        CCPairFunction<T,NDIM> r3=inner(test_p1,p5,particle2,particle1);\n        CCPairFunction<T,NDIM> r4=inner(test_p1,p5,particle2,particle2);\n\n        double ref_n1=inner(gf11,f2*f1) * g12 + inner(gf12,f1*f2) * g13;\n        double ref_n2=inner(gf12,f1*f1) * g12 + inner(gf22,f1*f1) * g13;\n        double ref_n3=inner(gf12,f2*f1) * g11 + inner(gf13,f1*f2) * g12;\n        double ref_n4=inner(gf22,f1*f1) * g11 + inner(gf23,f1*f1) * g12;\n\n        double n1=inner(r1,p11);\n        double n2=inner(r2,p11);\n        double n3=inner(r3,p11);\n        double n4=inner(r4,p11);\n//        print(\"n1, ref_n1\",n1,ref_n1, n1-ref_n1);\n//        print(\"n2, ref_n2\",n2,ref_n2, n2-ref_n2);\n//        print(\"n3, ref_n3\",n3,ref_n3, n3-ref_n3);\n//        print(\"n4, ref_n4\",n4,ref_n4, n4-ref_n4);\n\n        bool good=fabs(n1-ref_n1)<FunctionDefaults<3>::get_thresh();\n        t1.checkpoint(good,test_p1.name(true)+p5.name()+\" -- 1\");\n        good=fabs(n2-ref_n2)<FunctionDefaults<3>::get_thresh();\n        t1.checkpoint(good,test_p1.name(true)+p5.name()+\" -- 2\");\n        good=fabs(n3-ref_n3)<FunctionDefaults<3>::get_thresh();\n        t1.checkpoint(good,test_p1.name(true)+p5.name()+\" -- 3\");\n        good=fabs(n4-ref_n4)<FunctionDefaults<3>::get_thresh();\n        t1.checkpoint(good,test_p1.name(true)+p5.name()+\" -- 4\");\n\n    }\n\n    // test < a(1) b(2) f(1,2) | f(1,3) c(1)d(3) >\n    // CCPairFunction<double,6> p3(f12_op.get(),{f1,f2},{f2,f3});\n    // CCPairFunction<double,6> p5(&f12,{f1},{f2});\n    if (longtest) {\n        CCPairFunction<T,NDIM> r1=inner(p3,p5,particle1,particle1);\n        double n1=inner(r1,p11);\n        p3.convert_to_pure_no_op_inplace();\n        p5.convert_to_pure_no_op_inplace();\n        print(\"n1\",n1);\n        CCPairFunction<T,NDIM> r1a=inner(p3,p5,particle1,particle1);\n        double n1a=inner(r1a,p11);\n        print(\"n1a\",n1a);\n        print(\"diff\",n1-n1a);\n        CCPairFunction<T,NDIM> r2=inner(p3,p5,particle1,particle2);\n        CCPairFunction<T,NDIM> r3=inner(p3,p5,particle2,particle1);\n        CCPairFunction<T,NDIM> r4=inner(p3,p5,particle2,particle2);\n\n    }\n    return t1.end();\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nint test_partial_inner_3d(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                          const CCParameters& parameter) {\n\n    test_output t1(\"test_partial_inner<\"+std::to_string(NDIM)+\">\");\n//    t1.set_cout_to_terminal();\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n    auto [f1,f2,f3,f4,f5,f] = data.get_functions();\n\n    auto particle1=std::array<int,LDIM>();\n    auto particle2=std::array<int,LDIM>();\n    for (int i=0; i<LDIM; ++i) {\n        particle1[i]=i;\n        particle2[i]=i+LDIM;\n    }\n\n    std::vector<Function<T,LDIM>> a = {f1, f2};\n    std::vector<Function<T,LDIM>> b = {f2, f3};\n\n    auto f12=CCConvolutionOperatorPtr<double,LDIM>(world, OT_F12, parameter);\n\n    CCPairFunction<T,NDIM> p1(copy(f));   // e(-r1 - 2r2)\n    CCPairFunction<T,NDIM> p2(a,b);\n    CCPairFunction<T,NDIM> p3(f12,a,b);\n    CCPairFunction<T,NDIM> p11({f1},{f1});\n    CCPairFunction<T,NDIM> p12({f1},{f2});\n\n    double g11=inner(f1,f1);\n    double g22=inner(f2,f2);\n    double g12=inner(f1,f2);\n    double g13=inner(f1,f3);\n    double g23=inner(f2,f3);\n    Function<T,LDIM> gf11=(*f12)(f1*f1);\n    Function<T,LDIM> gf12=(*f12)(f1*f2);\n    Function<T,LDIM> gf13=(*f12)(f1*f3);\n    print(\"g11, g22\",g11,g22);\n\n    double thresh=FunctionDefaults<LDIM>::get_thresh();\n\n    t1.checkpoint(true,\"prep\");\n\n    // test pure/3d\n    {\n        double aa=inner(p1,p1);\n        print(\"aa\",aa);\n        // < e1 e2 | e1 >_1 = | e2 > ||e1||\n        Function<T,LDIM> r=inner(p1,f1,particle1,particle1);\n        double norm=inner(r,f2);\n        double ref_norm=g11 * g22;\n        print(\"norm    \",norm);\n        print(\"ref_norm\", ref_norm);\n        Function<T,LDIM> r_swap=inner(p1,f1,particle2,particle1);\n        double norm_swap=inner(r_swap,f2);\n        print(\"norm1 swap\",norm_swap);\n        t1.checkpoint(norm,ref_norm,thresh,\"pure -- 1\");\n    }\n    // test pure/3d\n    {\n        Function<T,LDIM> r=inner(p1,f1,particle2,particle1);\n        double norm=inner(r,f2);\n        double ref_norm=g12 * g12;\n        t1.checkpoint(norm, ref_norm, thresh,\"pure -- 2\");\n    }\n    // test decomposed\n    {\n        Function<T,LDIM> r=inner(p2,f1,particle1,particle1);\n        double norm=inner(r,f2);\n        double ref_norm=g11 * g22 + g12 * g23;\n        t1.checkpoint(norm, ref_norm, thresh,\"decomposed -- 1\");\n    }\n    // test decomposed\n    {\n        Function<T,LDIM> r=inner(p2,f1,particle2,particle1);\n        double norm=inner(r,f2);\n        double ref_norm=g12 * g12 + g13 * g22;\n        t1.checkpoint(norm, ref_norm, thresh,\"decomposed -- 2\");\n    }\n    // test op_decomposed\n    {\n        // < f1 f2 | f | f1 f2 > + < f1 f2 | f | f2 f3>\n        Function<T,LDIM> r=inner(p3,f1,particle1,particle1);\n        double norm=inner(r,f2);\n        double ref_norm=inner(gf11*f2,f2) + inner(gf12*f2,f3);\n        t1.checkpoint(norm, ref_norm, thresh,\"op_decomposed -- 1\");\n    }\n    // test op_decomposed\n    {\n        // < f1 f2 | f | f2 f1 > + < f1 f2 | f | f3 f2>\n        Function<T,LDIM> r=inner(p3,f1,particle2,particle1);\n        double norm=inner(r,f2);\n        double ref_norm=inner(gf12*f1,f2) + inner(gf13*f2,f2);\n        t1.checkpoint(norm, ref_norm, thresh,\"op_decomposed -- 2\");\n    }\n\n    return t1.end();\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nint test_consolidate(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n               const CCParameters& parameter) {\n    test_output t1(\"CCPairFunction::test_consolidate\");\n    static_assert(NDIM % 2 == 0, \"NDIM must be even\");\n    constexpr std::size_t LDIM = NDIM / 2;\n//    t1.set_cout_to_terminal();\n\n    /// f12: exp(-r_1^2 - 2 r_2^2)\n    /// f23: exp(-r_1^2 - 2 r_2^2) + exp(-2 r_1^2 - 3 r_2^2)\n    /// p1: pure, corresponds to f12\n    /// p2: dec, corresponds to f23\n    /// p3: op_dec, corresponds to f23\n    /// p4: pure, corresponds to f23\n    /// p5: op_pure, corresponds to f23\n    auto [p1,p2,p3,p4,p5]=data.get_ccpairfunctions();\n\n    // collect all terms of similar type, no conversions\n    for (const auto& p : {p1,p4,p5}) {\n        auto tmp=std::vector<CCPairFunction<T,NDIM>>({p,p});\n        double r0=inner(p,{p1});\n        double r1=inner(tmp,{p1});\n        auto tmp1=consolidate(tmp,{});\n        double r2=inner(tmp1,{p1});\n        t1.checkpoint(tmp1.size()==1 && tmp.size()==2,\"vector size\");\n        t1.checkpoint(2.0*r0,r1,FunctionDefaults<LDIM>::get_thresh(),\"consolidate\");\n        t1.checkpoint(2.0*r0,r2,FunctionDefaults<LDIM>::get_thresh(),\"consolidate\");\n    }\n\n    // convert op_pure to pure\n    for (const auto& p : {p5}) {\n        auto tmp=std::vector<CCPairFunction<T,NDIM>>({p});\n        t1.checkpoint(tmp.front().is_op_pure(),\"correct initial type: op_pure\");\n        auto tmp1=consolidate(tmp,{\"op_pure_to_pure\"});\n        t1.checkpoint(tmp1.front().is_pure_no_op(),\"correct final type: pure\");\n        t1.checkpoint(is_collected(tmp1),\"is_collected\");\n\n        double r0=inner(p,{p1});\n        double r1=inner(tmp,{p1});\n        t1.checkpoint(r0,r1,FunctionDefaults<LDIM>::get_thresh(),\"correct numbers\");\n    }\n\n    // convert op_decomposed to decomposed\n    for (const auto& p : {p3}) {\n        auto tmp=std::vector<CCPairFunction<T,NDIM>>({p});\n        t1.checkpoint(tmp.front().is_op_decomposed(),\"correct initial type: op_decomposed\");\n        auto tmp1=consolidate(tmp,{\"op_dec_to_dec\"});\n        t1.checkpoint(tmp1.front().is_decomposed_no_op(),\"correct final type: decomposed\");\n\n        double r0=inner(p,{p1});\n        double r1=inner(tmp,{p1});\n        t1.checkpoint(r0,r1,FunctionDefaults<LDIM>::get_thresh(),\"correct numbers\");\n    }\n\n    // remove linear dependencies\n    for (const auto& p : {p3}) {\n        auto tmp=std::vector<CCPairFunction<T,NDIM>>({p});\n        tmp+=tmp;\n        t1.checkpoint(tmp.size()==2,\"correct number of terms\");\n        t1.checkpoint(tmp.front().get_a().size()==2,\"correct number of vectors in a\");\n        t1.checkpoint(tmp.front().is_op_decomposed(),\"correct initial type: op_decomposed\");\n        auto tmp1=consolidate(tmp,{\"remove_lindep\"});\n        t1.checkpoint(tmp1.front().is_decomposed(),\"correct final type: decomposed\");\n        t1.checkpoint(tmp1.size()==1,\"correct number of terms\");\n        t1.checkpoint(tmp1.front().get_a().size()==2,\"correct number of vectors in a\");\n\n        double r0=2*inner(p,{p1});\n        double r1=inner(tmp,{p1});\n        t1.checkpoint(r0,r1,FunctionDefaults<LDIM>::get_thresh(),\"correct numbers\");\n    }\n\n\n\n    // some random composition of the above\n    // a vector of numerically identical terms is created, then a random permutation is applied, and the result is checked\n    for (int i=0; i<5; ++i) {\n        std::vector<CCPairFunction<T,NDIM>> pvec={p2,p3,p4,p5};     // numerically all the same\n\n        std::random_device rd;  // a seed source for the random number engine\n        std::mt19937 gen(rd()); // mersenne_twister_engine seeded with rd()\n        std::uniform_int_distribution<> distrib(0, 3);\n        std::vector<int> mapping(5);\n        for (int i=0; i<5; ++i) mapping[i]=distrib(gen);\n        print(\"mapping\",mapping);\n\n        std::vector<CCPairFunction<T,NDIM>> tmp;\n        for (auto m: mapping) tmp.push_back(pvec[m]);\n\n        double n0=inner({p1},tmp);\n\n        auto tmp1=consolidate(tmp,{}); // collect only, no conversions\n        print(\"tmp\");\n        for (auto& c : tmp) c.print_size();\n        print(\"tmp1\");\n        for (auto& c : tmp1) c.print_size();\n\n        t1.checkpoint(is_collected(tmp1),\"random is_collected\");\n        double n1=inner({p1},tmp1);\n        t1.checkpoint(n0,n1,FunctionDefaults<LDIM>::get_thresh(),\"random collect numerics\");\n\n        tmp1=consolidate(tmp1,{\"op_pure_to_pure\"}); //\n        print(\"tmp1 after op_pure_to_pure\");\n        for (auto& c : tmp1) c.print_size();\n        t1.checkpoint(is_collected(tmp1),\"random is_collected\");\n        double n2=inner({p1},tmp1);\n        t1.checkpoint(n0,n2,FunctionDefaults<LDIM>::get_thresh(),\"random op_pure_to_pure numerics\");\n\n        tmp1=consolidate(tmp1,{\"op_dec_to_dec\"}); //\n        print(\"tmp1 after op_dec_to_dec\");\n        for (auto& c : tmp1) c.print_size();\n        t1.checkpoint(is_collected(tmp1),\"random is_collected\");\n        double n3=inner({p1},tmp1);\n        t1.checkpoint(n0,n3,FunctionDefaults<LDIM>::get_thresh(),\"random op_dec_to_dec numerics\");\n        t1.checkpoint(tmp1.size()<=2,\"only max. two types of terms after consolidate\");\n    }\n\n    return t1.end();\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nint test_apply(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n               const CCParameters& parameter) {\n    test_output t1(\"CCPairFunction::test_apply\");\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n//    t1.set_cout_to_terminal();\n\n    /// f12: exp(-r_1^2 - 2 r_2^2)\n    /// f23: exp(-r_1^2 - 2 r_2^2) + exp(-2 r_1^2 - 3 r_2^2)\n    /// p1: pure, corresponds to f12\n    /// p2: dec, corresponds to f23\n    /// p3: op_dec, corresponds to f23\n    /// p4: pure, corresponds to f23\n    /// p5: op_pure, corresponds to f23\n    auto [p1,p2,p3,p4,p5]=data.get_ccpairfunctions();\n    auto [f1,f2,f3,f4,f5,f]=data.get_functions();\n\n    auto f12=CCConvolutionOperatorPtr<T,LDIM>(world, OT_F12, parameter);\n    auto& op=*(f12->get_op());\n    std::vector<CCPairFunction<T,NDIM>> vp2({p2});\n    std::vector<CCPairFunction<T,NDIM>> vp2ex({p2.swap_particles()});\n\n    // tmp(2) = \\int a(1)b(2') f(1,2) d1\n    // result=inner(tmp,f1);\n    for (auto& p : {p1,p2,p3,p4,p5}) {\n        print(\"working on \",p.name());\n        std::vector<CCPairFunction<T,NDIM>> vp({p});\n        op.set_particle(1);\n        auto op1_p=op(vp);\n        double r1=inner(vp2,op1_p);\n        double r1ex=inner(vp2ex,op1_p);\n        printf(\"r1   %12.8f\\n\",r1);\n        printf(\"r1ex %12.8f\\n\",r1ex);\n        op.set_particle(2);\n        auto op2_p=op(vp);\n        double r2=inner(vp2,op2_p);\n        double r2ex=inner(vp2ex,op2_p);\n        printf(\"r2   %12.8f\\n\",r2);\n        printf(\"r2ex %12.8f\\n\",r2ex);\n    }\n\n    return t1.end();\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_scalar_multiplication(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                               const CCParameters& parameter) {\n    CCTimer timer(world, \"testing\");\n    test_output t1(\"CCPairFunction<double,6>::test_scalar_multiplication\");\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n\n//    auto data=get_data<NDIM>(world,parameter);\n    auto [f1,f2,f3,f4,f5,f] = data.get_functions();\n\n    std::vector<Function<T,LDIM>> a = {f1, f2};\n    std::vector<Function<T,LDIM>> b = {f3, f1};\n\n    print(\"time in preparation\",timer.reset());\n    t1.checkpoint(true,\"prep\");\n\n    CCPairFunction<T,NDIM> p(copy(f));\n    CCPairFunction<T,NDIM> p1(a,b);\n    double norm1=inner(p,p1);\n    double pnorm=inner(p,p);\n    double p1norm=inner(p1,p1);\n    print(\"pnorm,p1norm\",pnorm,p1norm);\n    double anorm=norm2(world,p1.get_a());\n    double bnorm=norm2(world,p1.get_b());\n    print(\"anorm,bornm\",anorm,bnorm);\n\n    p*=2.0;\n    p1*=2.0;\n    anorm=norm2(world,p1.get_a());\n    bnorm=norm2(world,p1.get_b());\n    print(\"anorm,bornm\",anorm,bnorm);\n    pnorm=inner(p,p);\n    p1norm=inner(p1,p1);\n    print(\"pnorm,p1norm\",pnorm,p1norm);\n    double norm2=inner(p,p1);\n    print(\"norm1,norm2\",norm1,norm2);\n\n    bool bsuccess=fabs(4.0*norm1-norm2)<FunctionDefaults<LDIM>::get_thresh();\n    t1.checkpoint(bsuccess,\"scaling\");\n\n    return t1.end();\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_swap_particles(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                        const CCParameters& parameters) {\n    test_output t1(\"swap_particles<\"+std::to_string(NDIM)+\">\");\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n\n    // prepare\n    auto one = [](const Vector<double,LDIM>& r) { return 1.0; };\n    Function<T,LDIM> R2 = FunctionFactory<T,LDIM>(world).f(one);\n\n//    auto data=get_data<NDIM>(world,parameters);\n    auto [f1,f2,f3,f4,f5,f] = data.get_functions();\n    std::vector<Function<T,LDIM>> a = {f1, f2};\n    std::vector<Function<T,LDIM>> b = {f3, f1};\n\n    // test decomposed\n    {\n        CCPairFunction<T,NDIM> p1(a, b);\n        CCPairFunction<T,NDIM> p2(b, a);\n\n        double norm1 = inner(p1, p2.swap_particles(), R2);\n        double norm1a = inner(p1, p1, R2);\n        // <p1 | p2> = \\sum_ij <a_i b_i | a_j b_j> = \\sum_ij <a_i|a_j> <b_i|b_j>\n        double norm2 = matrix_inner(world, a, a).emul(matrix_inner(world, b, b)).sum();\n        print(\"norm1 \", norm1);\n        print(\"norm1a\", norm1a);\n        print(\"norm2 \", norm2);\n        t1.checkpoint(std::abs(norm1 - norm2) < FunctionDefaults<LDIM>::get_thresh(), \"swap_particles a,b\");\n    }\n\n    // test pure\n    {\n        CCPairFunction<T,NDIM> p(copy(f));\n        CCPairFunction<T,NDIM> p_swapped=p.swap_particles();\n        double pnorm=p.get_function().norm2();\n        double psnorm=p_swapped.get_function().norm2();\n        print(\"p/s norm\",pnorm,psnorm);\n\n        CCPairFunction<T,NDIM> p1({f1}, {f2});\n        CCPairFunction<T,NDIM> p2({f2}, {f1});\n        double ref1=inner(f1,f1)*inner(f2,f2);\n        double ref2=inner(f1,f2)*inner(f2,f1);\n        print(\"ref1/2\",ref1,ref2);\n        print(\"pref1/2\",inner(p1,p1),inner(p1,p2));\n\n        double norm12_12=inner(p,p1);\n        double norm12_21=inner(p,p1.swap_particles());\n        double norm12_12_again=inner(p,p1);\n        double norm21_12=inner(p_swapped,p1);\n        double norm21_21=inner(p_swapped,p1.swap_particles());\n\n        print(\"norms in exp(-12 - 12):\",norm12_12);\n        print(\"norms in exp(-12 - 21):\",norm12_21);\n        print(\"norms in exp(-12 - 12) again:\",norm12_12_again);\n        print(\"norms in exp(-21 - 12):\",norm21_12);\n        print(\"norms in exp(-21 - 21):\",norm21_21);\n\n        double ref_12_12=inner(p1,p1);\n        double ref_12_21=inner(p1,p2);\n\n        print(\"difference norms in exp(-12 - 12):\",norm12_12,ref_12_12);\n        print(\"difference norms in exp(-12 - 21):\",norm12_21,ref_12_21);\n        print(\"difference norms in exp(-21 - 12):\",norm21_12,ref_12_21);\n        print(\"difference norms in exp(-21 - 21):\",norm21_21,ref_12_12);\n\n        double total_error= fabs(norm12_12-ref_12_12)+ fabs(norm12_21-ref_12_21)\n                            + fabs(norm21_12-ref_12_21)+ fabs(norm21_21-ref_12_12);\n\n\n        t1.checkpoint(total_error < FunctionDefaults<3>::get_thresh(), \"swap_particles u\");\n    };\n\n    return t1.end();\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nint test_projector(World& world, std::shared_ptr<NuclearCorrelationFactor> ncf, data<T,NDIM>& data,\n                   const CCParameters& parameter) {\n    test_output t1(\"test_projector<\"+std::to_string(NDIM)+\">\");\n    static_assert(NDIM%2==0, \"NDIM must be even\");\n    constexpr std::size_t LDIM=NDIM/2;\n\n//    t1.set_cout_to_logger();\n//    t1.set_cout_to_terminal();\n    const auto [f11,f22,f3,f4,f5,f] = data.get_functions();\n    auto f1=copy(f11);  // keep f1, f2 constant for use in other tests!\n    auto f2=copy(f22);\n    double nf1=f1.norm2();\n    f1.scale(1.0/nf1);\n    f2.scale(1.0/nf1);\n    std::vector<Function<T,LDIM>> a = {f1+f2, f2+f3, f3+f4};\n    std::vector<Function<T,LDIM>> b = {f3, f1, f2};\n    std::vector<Function<T,LDIM>> o = orthonormalize_cd<T,LDIM>({f1-f3, f5});  // projects on an orthonormal basis\n    a = orthonormalize_cd<T,LDIM>(a);  // projects on an orthonormal basis\n    auto f12=CCConvolutionOperatorPtr<double,LDIM>(world, OT_F12, parameter);\n\n    {\n        auto ovlp=matrix_inner(world,o,o);\n        print(\"<o | o>\", ovlp);\n    }\n\n    CCPairFunction<T,NDIM> p1(a,b);\n    CCPairFunction<T,NDIM> p2(f12,a,b);\n    CCPairFunction<T,NDIM> p3(copy(f)); // outer (f1,f2)\n\n    std::vector<CCPairFunction<T,NDIM>> vp1({p1});\n    std::vector<CCPairFunction<T,NDIM>> vp2({p2});\n    std::vector<CCPairFunction<T,NDIM>> vp3({p3});\n\n    Projector<T,LDIM> O(o,o);\n    QProjector<T,LDIM> Q(o,o);\n    StrongOrthogonalityProjector<T,LDIM> Q12(world);\n    Q12.set_spaces(o);\n\n    double thresh=FunctionDefaults<LDIM>::get_thresh();\n\n    // compute reference values as: (<f1 f2 | projector) | px >\n    // compute result values as:    <f1 f2 | (projector | px >)\n    Function<T,LDIM> of1=O(f1);\n    Function<T,LDIM> of2=O(f2);\n    Function<T,LDIM> qf1=Q(f1);\n    Function<T,LDIM> qf2=Q(f2);\n    std::vector<std::vector<CCPairFunction<T,NDIM>>> vp({vp1,vp2,vp3});\n    for (int i=0; i<3; ++i) {\n        // O1\n        O.set_particle(0);\n        {\n            double ref=inner({CCPairFunction<T,NDIM>({of1},{f2})},vp[i]);\n            auto tmp=O(vp[i]);\n            t1.checkpoint(tmp.size()==1,\"vector size correct\");\n            t1.checkpoint(tmp[0].is_decomposed(),\"O(argument) is decomposed\");\n            double result=inner({CCPairFunction<T,NDIM>({f1},{f2})},tmp);\n            t1.checkpoint(result,ref,thresh,\"O1 p\"+std::to_string(i));\n        }\n\n        // O2\n        O.set_particle(1);\n        {\n            double ref=inner({CCPairFunction<T,NDIM>({f1},{of2})},vp[i]);\n            auto tmp=O(vp[i]);\n            t1.checkpoint(tmp.size()==1,\"vector size correct\");\n            t1.checkpoint(tmp[0].is_decomposed(),\"O(argument) is decomposed\");\n            double result=inner({CCPairFunction<T,NDIM>({f1},{f2})},tmp);\n            t1.checkpoint(result,ref,thresh,\"O2 p\"+std::to_string(i));\n        }\n        // Q1\n        Q.set_particle(0);\n        {\n            double ref=inner({CCPairFunction<T,NDIM>({qf1},{f2})},vp[i]);\n            double result=inner({CCPairFunction<T,NDIM>({f1},{f2})},Q(vp[i]));\n            t1.checkpoint(result,ref,thresh,\"Q1 p\"+std::to_string(i));\n        }\n        // Q2\n        Q.set_particle(1);\n        {\n            double ref=inner({CCPairFunction<T,NDIM>({f1},{qf2})},vp[i]);\n            double result=inner({CCPairFunction<T,NDIM>({f1},{f2})},Q(vp[i]));\n            t1.checkpoint(result,ref,thresh,\"Q2 p\"+std::to_string(i));\n        }\n    }\n\n    // some hardwire test\n    {\n        // <ab|k ><k |ab>  = <a|k><k|a><b|b>\n        auto ak_tensor=matrix_inner(world,a,o);\n        auto aa=matrix_inner(world,a,a);\n        auto bb=matrix_inner(world,b,b);\n        Projector<double,LDIM> O1(a,a);\n        O.set_particle(0);\n        O1.set_particle(0);\n        Projector<double,LDIM> O2(a,a);\n        O2.set_particle(1);\n        double n1=inner(vp1,O1(vp2));\n        double n1a=inner(O1(vp1),vp2);\n        t1.checkpoint(fabs(n1-n1a)<thresh,\"O1\");\n        print(\"n1,n1a\",n1,n1a);\n        double n2=inner(vp1,O2(vp2));\n        double n2a=inner(O2(vp1),vp2);\n        t1.checkpoint(fabs(n2-n2a)<thresh,\"O2\");\n        print(\"n2,n2a\",n2,n2a);\n\n    }\n\n\n    // test {O,Q} with particles 1,2 on all three CCPairFunction<double,6> types\n    {\n        int i=0;\n        for (auto p : {p1,p2,p3}) {\n            std::string s=\"CCPairFunction<double,\"+std::to_string(NDIM)+\"> p\"+std::to_string(++i);\n            std::vector<CCPairFunction<T,NDIM>> vp({p});\n            for (int particle : {0,1}) {\n                O.set_particle(particle);\n                Q.set_particle(particle);\n                auto Op = O(vp);\n                auto Qp = Q(vp);\n\n                double n1 = inner(Op, vp3) + inner(Qp, vp3);\n                double n2 = inner(vp, vp3);\n                print(\"n1 (RI), n2\", n1, n2, fabs(n1 - n2));\n                t1.checkpoint(fabs(n1 - n2) < FunctionDefaults<LDIM>::get_thresh(), \"RI with particle \"+std::to_string(particle)+\" on \"+s);\n\n                auto Op1 = O(Op);\n                double n3=inner(Op, vp3);\n                double n4=inner(Op1, vp3);\n                print(\"n3, n4\", n3, n4);\n                t1.checkpoint(fabs(n3-n4) < FunctionDefaults<LDIM>::get_thresh(), \"idempotency with particle \"+std::to_string(particle)+\" on \"+s);\n\n            }\n            // testing SO projector\n            auto SOp=Q12(vp);\n            double n1,n2,n3;\n            {\n                Q.set_particle(0);\n                auto tmp = Q(vp);\n                Q.set_particle(1);\n                auto tmp1 = Q(tmp);\n                n2=inner(vp3,tmp1);\n            }\n            {\n                Q.set_particle(1);\n                auto tmp = Q(vp);\n                Q.set_particle(0);\n                auto tmp1 = Q(tmp);\n                n3=inner(vp3,tmp1);\n            }\n            n1 = inner(SOp, vp3);\n            print(\"SO: n1, n2, n3\", n1, n2, n3, fabs(n1 - n2));\n            double zero=fabs(n1-n2) + fabs(n1-n3) + fabs(n2-n3);\n            t1.checkpoint(zero, FunctionDefaults<3>::get_thresh(), \"SO operator on \"+s);\n        }\n    }\n    return t1.end();\n}\n\n\n\n/** functionality\n *\n *  - ctor                      OK\n *  - assignment                OK\n *  - add\n *  - scalar multiplication     OK\n *  - inner                     OK\n *  - inner_partial             OK\n *  - swap_particles            OK\n *  - apply\n *  - apply_partial (i.e. exchange)\n *  - serialize\n *  - collapse_to_pure (excl g!)\n *  - mul_partial\n */\n\nint main(int argc, char **argv) {\n\n    madness::World& world = madness::initialize(argc, argv);\n    startup(world, argc, argv);\n    commandlineparser parser(argc, argv);\n    int k=5;\n    double thresh=1.e-4;\n    if (parser.key_exists(\"k\")) k=std::stoi(parser.value(\"k\"));\n    if (parser.key_exists(\"thresh\")) thresh=std::stod(parser.value(\"thresh\"));\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<2>::set_k(k);\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<4>::set_k(k);\n    FunctionDefaults<5>::set_k(k);\n    FunctionDefaults<6>::set_k(k);\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<2>::set_thresh(thresh);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<4>::set_thresh(thresh);\n    FunctionDefaults<5>::set_thresh(thresh);\n    FunctionDefaults<6>::set_thresh(thresh);\n    FunctionDefaults<6>::set_tensor_type(TT_2D);\n    FunctionDefaults<1>::set_cubic_cell(-10.,10.);\n    FunctionDefaults<2>::set_cubic_cell(-10.,10.);\n    FunctionDefaults<3>::set_cubic_cell(-10.,10.);\n    FunctionDefaults<4>::set_cubic_cell(-10.,10.);\n    FunctionDefaults<5>::set_cubic_cell(-10.,10.);\n    FunctionDefaults<6>::set_cubic_cell(-10.,10.);\n    print(\"numerical parameters: k, eps(3D), eps(6D)\", FunctionDefaults<3>::get_k(), FunctionDefaults<3>::get_thresh(),\n          FunctionDefaults<6>::get_thresh());\n    int isuccess=0;\n#ifdef USE_GENTENSOR\n\n    CCParameters ccparam(world, parser);\n    try {\n        parser.set_keyval(\"geometry\", \"he\");\n        parser.print_map();\n        Molecule mol(world, parser);\n        mol.print();\n        std::shared_ptr<NuclearCorrelationFactor> ncf = create_nuclear_correlation_factor(world,\n                                             mol, nullptr, std::make_pair(\"slater\", 2.0));\n\n        auto data2=data<double,2>(world,ccparam);\n        auto data4=data<double,4>(world,ccparam);\n        auto data6=data<double,6>(world,ccparam);\n\n        isuccess+=test_constructor<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_load_store<double,2>(world,ncf,data2,ccparam);\n        isuccess+=test_operator_apply<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_norm<double,2>(world,ncf,data2,ccparam);\n        isuccess+=test_transformations<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_multiply_with_f12<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_inner<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_multiply<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_swap_particles<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_scalar_multiplication<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_projector<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_partial_inner_3d<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_partial_inner_6d<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_apply<double,2>(world, ncf, data2, ccparam);\n        isuccess+=test_consolidate<double,2>(world, ncf, data2, ccparam);\n\n\n//        isuccess+=test_constructor<double,4>(world, ncf, data4, ccparam);\n//        isuccess+=test_load_store<double,4>(world,ncf,data2,ccparam);\n//        isuccess+=test_operator_apply<double,4>(world, ncf, data4, ccparam);\n//        isuccess+=test_transformations<double,4>(world, ncf, data4, ccparam);\n//        isuccess+=test_multiply_with_f12<double,4>(world, ncf, data4, ccparam);\n//        isuccess+=test_inner<double,4>(world, ncf, data4, ccparam);\n//        isuccess+=test_multiply<double,4>(world, ncf, data4, ccparam);\n//        isuccess+=test_swap_particles<double,4>(world, ncf, data4, ccparam);\n//        isuccess+=test_scalar_multiplication<double,4>(world, ncf, data4, ccparam);\n//        isuccess+=test_projector<double,4>(world, ncf, data4, ccparam);\n//        isuccess+=test_partial_inner_3d<double,4>(world, ncf, data4, ccparam);\n//        isuccess+=test_partial_inner_6d(world, ncf, data4, ccparam);\n//        isuccess+=test_apply(world, ncf, data, ccparam);\n\n\n//        isuccess+=test_projector<double,6>(world, ncf, data6, ccparam);\n\n        data2.clear();\n        data4.clear();\n        data6.clear();\n        world.gop.fence();\n    } catch (std::exception& e) {\n        madness::print(\"an error occurred\");\n        madness::print(e.what());\n        world.gop.fence();\n    }\n    world.gop.fence();\n#else\n    print(\"could not run test_ccpairfunction: U need to compile with ENABLE_GENTENSOR=1\");\n#endif\n    finalize();\n\n    return isuccess;\n}"
  },
  {
    "path": "src/madness/chem/test_dft.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness.h>\n#include<madness/chem/SCFOperators.h>\n\nusing namespace madness;\n\nstatic double alpha=10.0;   // exponent of the density\n\n// slater function centered at the origin\ndouble slater(const coord_3d& xyz) {\n    return exp(-alpha*xyz.normf());\n}\n// slater function centered at the origin\ndouble slater2(const coord_3d& xyz) {\n    double s=slater(xyz);\n    return s*s;\n}\n\nbool check_err(double err, double thresh, std::string msg) {\n    if (fabs(err)>thresh) {\n        print(\"\\nfailing test:\",msg,\"\\n\");\n        return true;\n    }\n    return false;\n}\n\n\n/// test the Slater exchange potential and the kernel\n\n/// The Slater exchange is a simple function of rho,\n/// \\f[\n///    E_\\mathrm{xc} = \\int\\epsilon_\\mathrm{xc}[\\rho]\\rho(r) d^3r\n/// \\f]\n/// with\n/// \\f[\n///    v_\\mathrm{xc} = \\epsilon_\\mathrm{xc} + \\rho\\frac{\\partial \\epsilon}{\\partial \\rho}\n///                  = 4/3\\epsilon_\\mathrm{xc}\n/// \\f]\n/// and\n/// \\f[\n///    k_\\mathrm{xc} = \\frac{\\partial^2\\epsilon}{\\partial \\rho^2} = 4/3*1/3 * \\epsilon_\\mathrm{xc}\n/// \\f]\nint test_slater_exchange(World& world) {\n\n    const double thresh=FunctionDefaults<3>::get_thresh();\n    real_function_3d dens=real_factory_3d(world).f(slater2).truncate_on_project();\n\n    // construct the XC operator\n    const bool spin_polarized=false;\n    const std::string xc_data=\"LDA_X\";\n    XCOperator<double,3> xc(world,xc_data,spin_polarized,copy(dens),copy(dens));\n\n    double energy=xc.compute_xc_energy();\n    print(\"xc energy:\",energy);\n\n    const real_function_3d potential=xc.make_xc_potential();\n    const real_function_3d vphi=potential*dens;\n    double energy2=inner(dens,potential);\n    energy2=energy2 * 2.0/(4./3.); // fac 2 for closed shell\n    print(\"xc energy via potential:\",energy2);\n    double ratio=energy/energy2;\n    print(\"ratio \",ratio);\n    double err=std::abs(ratio-1.0);\n    if (check_err(err,thresh,\"dft potential error\")) return 1;\n\n    const real_function_3d vphiphi=xc.apply_xc_kernel(dens);\n    double energy3=inner(dens,vphiphi);\n    energy3=energy3*4.0/(4./3.)/(1./3.);// 2 fac 2 for closed shell\n    print(\"xc energy via kernel:\",energy3);\n    ratio=energy/energy3;\n    print(\"ratio \",ratio);\n    if (check_err(err,thresh,\"dft kernel error\")) return 1;\n//    plot_plane(world,kernel,dens,vphiphi,\"kernel\");\n\n\n    return 0;\n\n}\n\nint main(int argc, char** argv) {\n    madness::initialize(argc, argv);\n\n    madness::World world(SafeMPI::COMM_WORLD);\n    world.gop.fence();\n    startup(world,argc,argv);\n\n    FunctionDefaults<3>::set_thresh(1.e-6);\n    FunctionDefaults<3>::set_cubic_cell(-10, 10);\n\n\n    int result=0;\n\n    result+=test_slater_exchange(world);\n\n    if (world.rank()==0) {\n        if (result==0) print(\"\\ntests passed\\n\");\n        else print(\"\\ntests failed\\n\");\n    }\n    madness::finalize();\n    return result;\n}\n"
  },
  {
    "path": "src/madness/chem/test_exchangeoperator.cc",
    "content": "/*\n * test_exchangeoperator.cc\n *\n *  Created on: Sep 4, 2020\n *      Author: fbischoff\n */\n\n#include <madness.h>\n#include<madness/chem/SCFOperators.h>\n#include<madness/chem/SCF.h>\n#include<madness/chem/nemo.h>\n#include<madness/chem/correlationfactor.h>\n#include<typeinfo>\n\nusing namespace madness;\nnamespace madness {\n\n/// anchor test for the exchange operator -- partially hardwired\ntemplate<typename T>\nint exchange_anchor_test(World& world, Exchange<T,3>& K, const double thresh) {\n\n    const int nmo=2;\n    Tensor<double> alpha(nmo);\n    alpha(0l)=1.0;\n    alpha(1l)=2.0;\n    Vector<double,3> origin(0.0);\n\n    // construct two dummy orbitals\n    std::vector<Function<T,3> > amo(nmo);\n    for (int i=0; i<nmo; ++i) {\n        amo[i]=FunctionFactory<T,3>(world).truncate_on_project()\n                .functor(GaussianGuess<T,3>(origin,alpha(i))).thresh(thresh*0.1);\n    }\n    Tensor<double> aocc(nmo);\n    aocc.fill(1.0);\n\n    // compute the reference result functions\n    std::vector<Function<T,3> > Kamo=zero_functions_compressed<T,3>(world,nmo,true);\n    for (int i=0; i<nmo; ++i) {\n        for (int k=0; k<nmo; ++k) {\n            const double sum_alpha=alpha(i)+alpha(k);\n            real_function_3d refpot=real_factory_3d(world).truncate_on_project()\n                    .functor(refpotfunctor(sum_alpha)).thresh(thresh*0.1);\n            Kamo[i]+=amo[k]*refpot;\n        }\n    }\n\n    // compute the result functions with the exchange operator\n    std::vector<Function<T,3> > Kamo1=K(amo);\n\n    std::vector<Function<T,3> > diff=sub(world,Kamo,Kamo1);\n    std::vector<double> norms=norm2s(world,diff);\n    print(\"diffnorm in K\",norms);\n    int ierr=0;\n    for (double& n : norms) {\n        if (n>thresh*5.0) ierr++;           // tolerance 5.0 in the density\n    }\n\n    Tensor<T> Kmat=matrix_inner(world,amo,Kamo);\n    Tensor<T> Kmat1=matrix_inner(world,amo,Kamo1);\n//    print(\"kmat, kmat1\");\n//    print(Kmat);\n//    print(Kmat1);\n    double err=(Kmat-Kmat1).normf()/Kmat.size();\n    print(\"diff in Kmat compared to reference potential\",err);\n    if (check_err(err,thresh,\"Exchange potential error\")) return 1;\n\n    // hard-wire!\n    Tensor<double> hardwire(2,2);\n    hardwire(0,0)=5.96038972;\n    hardwire(0,1)=3.70974661;\n    hardwire(1,0)=3.70974661;\n    hardwire(1,1)=2.36014231;\n    err=(hardwire-Kmat1).normf()/Kmat.size();\n    print(\"diff in Kmat compared to hardwired result \",err);\n    if (check_err(err,thresh,\"Exchange matrix element error\")) return 1;\n    return 0;\n}\n\n\n\n\n\ntemplate<typename T>\nint test_exchange(World& world) {\n\n    FunctionDefaults<3>::set_thresh(1.e-5);\n    double thresh=FunctionDefaults<3>::get_thresh();\n    if (world.rank()==0) print(\"\\nentering test_exchange\",thresh,typeid(T).name());\n    FunctionDefaults<3>::set_cubic_cell(-10, 10);\n\n    // construct exchange operator\n    Exchange<T,3> K(world);\n\n    const int nmo=2;\n    Tensor<double> alpha(nmo);\n    alpha(0l)=1.0;\n    alpha(1l)=2.0;\n    Vector<double,3> origin(0.0);\n\n    // construct two dummy orbitals\n    std::vector<Function<T,3> > amo(nmo);\n    for (int i=0; i<nmo; ++i) {\n        amo[i]=FunctionFactory<T,3>(world).truncate_on_project()\n                .functor(GaussianGuess<T,3>(origin,alpha(i))).thresh(thresh*0.1);\n    }\n    Tensor<double> aocc(nmo);\n    aocc.fill(1.0);\n\n    K.set_parameters(conj(world,amo),amo,aocc);\n\n    // compare the exchange operator to precomputed reference values\n    int success=0;\n    if (typeid(T)==typeid(double)) success+=exchange_anchor_test(world, K, thresh);\n    if (success>0) return 1;\n\n    if (!smalltest) {\n    \t// test hermiticity of the K operator\n    \tsuccess=test_hermiticity<T,Exchange<T,3> ,3>(world, K, thresh);\n    \tif (success>0) return 1;\n\n    \t// test bra/ket sets being different\n    \tsuccess=test_asymmetric<T,Exchange<T,3> ,3>(world, K, thresh);\n    \tif (success>0) return 1;\n\t}\n\n    return 0;\n}\n\n\nint main(int argc, char** argv) {\n    madness::initialize(argc, argv);\n\n    madness::World world(SafeMPI::COMM_WORLD);\n    world.gop.fence();\n    startup(world,argc,argv);\n    srand (time(NULL));\n    bool smalltest=false;\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n\n    FunctionDefaults<3>::set_k(8); // needed for XC test to work\n\n    int result=0;\n    result+=test_exchange<double>(world);\n#ifndef HAVE_GENTENSOR\n    result+=test_exchange<double_complex>(world);\n#endif\n\n    if (world.rank()==0) {\n        if (result==0) print(\"\\ntests passed\\n\");\n        else print(\"\\ntests failed\\n\");\n    }\n    madness::finalize();\n    return result;\n}\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/test_localizer.cc",
    "content": "//\n// Created by Florian Bischoff on 11/1/21.\n//\n\n\n\n#include<madness/mra/mra.h>\n#include<madness/mra/vmra.h>\n#include<madness/chem/localizer.h>\n#include<madness/chem/molecularbasis.h>\n#include<madness/chem/MolecularOrbitals.h>\n#include<madness/chem/potentialmanager.h>\n#include<madness/chem/correlationfactor.h>\n#include<madness/world/test_utilities.h>\n#include<madness/chem/SCFOperators.h>\n#include<madness/chem/SCF.h>\n#include<madness/world/timing_utilities.h>\n#include<nemo.h>\n#include<write_test_input.h>\n\n#include<vector>\n\nusing namespace madness;\n\n/*\n * test different localization methods including core-valence separation\n */\n\ndouble fock_trace(const Tensor<double>& fock) {\n    MADNESS_CHECK(fock.ndim()==2);\n    MADNESS_CHECK(fock.dim(0)==fock.dim(1));\n    double result=0.0;\n    for (int i=0; i<fock.dim(0); ++i) result+=fock(i,i);\n    return result;\n}\n\n/// distance between v1 and v2\ndouble dist(const Vector<double,3> v1, const Vector<double,3> v2) {\n    return (v1-v2).normf();\n}\n\n/// angle in degrees between v1--v2--v3 (v2 being the center)\ndouble bend(const Vector<double,3> v1, const Vector<double,3> v2, const Vector<double,3> v3) {\n    Vector<double,3> w1=v1-v2;\n    Vector<double,3> w2=v3-v2;\n    double denom=inner(w1,w2);\n    double num=w1.normf()*w2.normf();\n    return acos(denom/num)/constants::pi*180.0;\n}\n\nbool is_close(const Vector<double,3>& v1, const Vector<double,3>& v2, const double thresh=1.e-3) {\n    return ((v1-v2).normf()<thresh);\n}\nbool is_aligned(const Vector<double,3>& v1, const Vector<double,3>& v2, const Vector<double,3>& v3,\n                const double thresh=1.e-3) {\n    const Vector<double,3> a1=(v1-v2)*(1.0/(v1-v2).normf());\n    const Vector<double,3> a2=(v1-v3)*(1.0/(v1-v3).normf());\n    return (fabs(fabs(inner(a1,a2))-1.0)<thresh);\n}\n\n/// check if v3 is orthogonal on v1-v2 midbond\nbool is_centered_normal(const Vector<double,3>& v1, const Vector<double,3>& v2, const Vector<double,3>& v3,\n                   const double thresh=1.e-3) {\n    const Vector<double,3> midbond=v2+0.5*(v1-v2);\n    const Vector<double,3> normal=v1-v2;\n    double inplane=fabs(inner(v3-midbond,normal));\n    return (inplane<thresh);\n}\n\n\n/// test localized orbitals: should be pointing towards the edges of a tetrahedron\nbool test_ne_boys(World& world, const Nemo& nemo) {\n    test_output tout(\"testing ne boys localization\");\n\n    MolecularOrbitals<double,3> mos;\n    mos.update_mos_and_eps(nemo.get_calc()->amo,nemo.get_calc()->aeps);\n    mos.set_all_orbitals_occupied();\n    mos.recompute_localize_sets();\n    mos.pretty_print(\"initial orbitals after a few SCF iterations\");\n\n    Localizer localizer(world,nemo.get_calc()->aobasis,nemo.molecule(),nemo.get_calc()->ao);\n\n    localizer.set_method(\"boys\");\n    localizer.set_enforce_core_valence_separation(true);\n    localizer.print_info();\n    Tensor<double> fock1 =nemo.compute_fock_matrix(mos.get_mos(), mos.get_occ());\n\n    auto lmo=localizer.localize(mos, fock1, true);\n    Tensor<double> fock2 =nemo.compute_fock_matrix(lmo.get_mos(), lmo.get_occ());\n    lmo.pretty_print(\"cv-localized MOs\");\n    print(fock2);\n    std::vector<Vector<double,3>> center=lmo.compute_center(nemo.get_ncf_ptr()->square());\n    for (size_t i=0; i<lmo.get_mos().size(); ++i) {\n        print(\"center of mo\",i,center[i][0],center[i][1],center[i][2]);\n    }\n    print(\"distances ne tetrahedron\",dist(center[1],center[2]),\n          dist(center[1],center[3]),\n          dist(center[1],center[4]),\n          dist(center[2],center[3]),\n          dist(center[2],center[4]),\n          dist(center[3],center[4]));\n    print(\"angles ne tetrahedron\",\n          bend(center[1],center[0],center[2]),\n          bend(center[1],center[0],center[3]),\n          bend(center[1],center[0],center[4]),\n          bend(center[2],center[0],center[3]),\n          bend(center[2],center[0],center[4]),\n          bend(center[3],center[0],center[4]));\n\n    bool success=true;\n    // distances depend on the ao basis..\n//    double refdistance=localizer.get_aobasis().get_name()==\"STO-3G\" ? 0.7158 :  0.51877 ;\n//    success=success and (fabs(dist(center[1],center[2])-refdistance)<0.001);\n//    success=success and (fabs(dist(center[1],center[3])-refdistance)<0.001);\n//    success=success and (fabs(dist(center[1],center[4])-refdistance)<0.001);\n//    success=success and (fabs(dist(center[2],center[3])-refdistance)<0.001);\n//    success=success and (fabs(dist(center[2],center[4])-refdistance)<0.001);\n//    success=success and (fabs(dist(center[3],center[4])-refdistance)<0.001);\n\n    success=success and (fabs(bend(center[1],center[0],center[2])-109.4712)<0.001);\n    success=success and (fabs(bend(center[1],center[0],center[3])-109.4712)<0.001);\n    success=success and (fabs(bend(center[1],center[0],center[4])-109.4712)<0.001);\n    success=success and (fabs(bend(center[2],center[0],center[3])-109.4712)<0.001);\n    success=success and (fabs(bend(center[2],center[0],center[4])-109.4712)<0.001);\n    success=success and (fabs(bend(center[3],center[0],center[4])-109.4712)<0.001);\n\n    tout.end(success);\n    return success;\n\n}\n\n/// test localized orbitals\n\n/// tests invariance of the Fock matrix trace, core-valence separation and location of orbitals on bonds\nbool test_ethylene(World& world, const Nemo& nemo, const std::string geometry=\"ethylene\") {\n    test_output tout(\"testing localization on: \"+geometry);\n//    tout.set_cout_to_terminal();\n    bool success=true;\n\n    // number of orbitals per bond\n    std::map<std::pair<int,int>,int> bonds;\n    std::map<std::pair<int,int>,int> bananabonds;\n    if (geometry==\"ethylene\") {\n        bonds[{0,2}]=0; // C1--H1\n        bonds[{0,3}]=0; // C1--H2\n        bonds[{1,4}]=0; // C2--H3\n        bonds[{1,5}]=0; // C2--H4\n        bonds[{0,1}]=0; // C1--C2\n        bananabonds[{0,1}]=0; // C1--C2\n    } else if (geometry==\"methane\") {\n        bonds[{0, 1}] = 0; // C1--H1\n        bonds[{0, 2}] = 0; // C1--H2\n        bonds[{0, 3}] = 0; // C1--H3\n        bonds[{0, 4}] = 0; // C1--H4\n    }\n\n    Molecule mol=nemo.molecule();\n    MolecularOrbitals<double,3> mos;\n    mos.update_mos_and_eps(nemo.get_calc()->amo,nemo.get_calc()->aeps);\n    mos.set_all_orbitals_occupied();\n    mos.recompute_localize_sets();\n    mos.pretty_print(\"initial orbitals after a few SCF iterations\");\n\n    Tensor<double> fock =nemo.compute_fock_matrix(mos.get_mos(), mos.get_occ());\n\n//    Tensor<double> fock, overlap;\n    double trace_canonical=fock_trace(fock);\n    print(\"initial fock matrix\");\n    print(fock);\n\n    Localizer localizer(world,nemo.get_calc()->aobasis,nemo.molecule(),nemo.get_calc()->ao);\n\n//    for (std::string method : {\"boys\",\"pm\",\"new\"}) {\n    for (std::string method : {\"boys\",\"new\"}) {\n        for (bool enforce_cv : {true, false}) {\n\n            for (auto& bond : bonds) bond.second=0;\n            for (auto& bond : bananabonds) bond.second=0;\n            localizer.set_method(method);\n            localizer.set_enforce_core_valence_separation(enforce_cv);\n            localizer.set_metric(nemo.get_ncf_ptr()->function());\n            localizer.print_info();\n\n            auto lmo=localizer.localize(mos, fock, true);\n//            if (enforce_cv) lmo.print_cubefiles(\"mo_ethylene\"+method,mol.cubefile_header());\n            nemo.get_calc()->amo=lmo.get_mos();\n\n            Tensor<double> fock2 = nemo.compute_fock_matrix(lmo.get_mos(), lmo.get_occ());\n            print(\"final fock matrix for\",method);\n            print(fock2);\n            if (enforce_cv) {\n                bool success1=Localizer::check_core_valence_separation(fock2, lmo.get_localize_sets());\n                tout.checkpoint(success1,\"core-valence separation for \"+method);\n                success=success and success1;\n            }\n            double trace_local=fock_trace(fock2);\n            print(\"canonical trace\",trace_canonical);\n            print(\"local trace    \",trace_local);\n            print(\"difference, rel. error, thresh \",fabs(trace_local-trace_canonical),\n                  fabs(trace_local-trace_canonical)/trace_canonical,FunctionDefaults<3>::get_thresh());\n            bool success1=(fabs(trace_local-trace_canonical)/trace_local<FunctionDefaults<3>::get_thresh());\n            tout.checkpoint(success1,\"trace of the fock matrix for \"+method);\n            success=success and success1;\n\n\n            std::vector<Vector<double,3>> center=lmo.compute_center(nemo.get_ncf_ptr()->square());\n            for (auto c : center) {\n                for (auto& bond : bonds) {\n                    int i=bond.first.first;\n                    int j=bond.first.second;\n                    Vector<double,3> iatom=mol.get_atom(i).get_coords();\n                    Vector<double,3> jatom=mol.get_atom(j).get_coords();\n                    if (is_close(c,iatom) or is_close(c,jatom)) continue; // ignore core orbitals\n                    if (is_aligned(iatom,jatom,c)) bond.second++;\n                }\n                for (auto& bond : bananabonds) {\n                    int i=bond.first.first;\n                    int j=bond.first.second;\n                    Vector<double,3> iatom=mol.get_atom(i).get_coords();\n                    Vector<double,3> jatom=mol.get_atom(j).get_coords();\n                    if (is_centered_normal(iatom,jatom,c) and\n                            (not is_aligned(iatom,jatom,c))) bond.second++;\n                }\n            }\n            mol.print();\n            for (auto bond : bonds) {\n                print(\"found \",bond.second,\"bonds between atoms\",bond.first.first,bond.first.second);\n            }\n            for (auto bond : bananabonds) {\n                print(\"found \",bond.second,\"banana bonds between atoms\",bond.first.first,bond.first.second);\n            }\n            bool success2=true;\n            if (geometry==\"ethylene\") {\n                success2=success2 and bonds[{0,2}]==1; // C1--H1\n                success2=success2 and bonds[{0,3}]==1; // C1--H2\n                success2=success2 and bonds[{1,4}]==1; // C2--H3\n                success2=success2 and bonds[{1,5}]==1; // C2--H4\n                if (method==\"boys\") success2=success2 and bananabonds[{0,1}]==2; // C1-C2\n                if (method==\"new\" or method==\"pm\") success2=success2 and bonds[{0,1}]==2;\n            } else if (geometry==\"methane\") {\n                success2=success2 and bonds[{0,1}]==1; // C--H1\n                success2=success2 and bonds[{0,2}]==1; // C--H2\n                success2=success2 and bonds[{0,3}]==1; // C--H3\n                success2=success2 and bonds[{0,4}]==1; // C--H4\n            }\n            tout.checkpoint(success2,\"center of the local orbitals for \"+method);\n            success=success and success2;\n\n        }\n    }\n    tout.end(success);\n    return success;\n\n}\n\nint main(int argc, char **argv) {\n    int result = 0;\n    {\n        World& world = madness::initialize(argc, argv);\n        startup(world, argc, argv);\n        print(\"entering test_localizer\");\n        timer t(world);\n        commandlineparser parser(argc,argv);\n        parser.print_map();\n        const int k = 8;\n        const double thresh = 1.e-5;\n//        const double L = 20.0;\n        const double L = 50.0;\n        FunctionDefaults<3>::set_cubic_cell(-L, L);\n        FunctionDefaults<3>::set_thresh(thresh);\n        FunctionDefaults<3>::set_k(k);\n\n        std::string geometry=\"ethylene\";\n        Nemo::NemoCalculationParameters nemo_param;\n        CalculationParameters param;\n        param.set_user_defined_value<std::vector<double>>(\"protocol\",{1.e-5});\n        param.set_user_defined_value(\"k\",8);\n        param.set_user_defined_value(\"econv\",1.e-4);\n        param.set_user_defined_value(\"maxiter\",0);\n        param.set_user_defined_value(\"xc\",std::string(\"lda\"));\n        param.set_user_defined_value(\"localize\",std::string(\"canon\"));\n        param.set_user_defined_value(\"print_level\",2);\n//        param.set_user_defined_value(\"ncf\",std::pair<std::string,double>(\"none\",0.0));\n        write_test_input test_input(param);\n        parser.set_keyval(\"input\",test_input.filename());\n        parser.set_keyval(\"geometry\",\"source_type=library\");\n        parser.set_keyval(\"geometry\",\"source_name=\"+geometry);\n        Molecule molecule(world, parser);\n        Nemo nemo(world,param,nemo_param,molecule);\n        param.print(\"dft\",\"end\");\n\n        test_output tout1(geometry+\" prep calculation\");\n        nemo.value();\n        tout1.end(true);\n\n        bool success=test_ethylene(world,nemo,geometry);\n        if (not success) result++;\n\n//        parser.set_keyval(\"structure\",\"ne\");\n        parser.set_keyval(\"geometry\",\"source_type = library\");\n        parser.set_keyval(\"geometry\",\"source_name = ne\");\n        Nemo nemo1(world,parser);\n        test_output tout(\"ne prep calculation\");\n        nemo1.value();\n        tout.end(true);\n        success=test_ne_boys(world,nemo1);\n        if (not success) result++;\n        print(\"result\", result);\n        t.end(\"finished localizer test\");\n    }\n    madness::finalize();\n    return result;\n\n}\n"
  },
  {
    "path": "src/madness/chem/test_low_rank_function.cc",
    "content": "//\n// Created by Florian Bischoff on 4/24/23.\n//\n\n\n#include<madness.h>\n#include<madness/chem/lowrankfunction.h>\n\n\n#include<madness/world/test_utilities.h>\n#include<madness/world/timing_utilities.h>\n#include <random>\n\n\nusing namespace madness;\n\n\n\nint test_lowrank_function(World& world, LowRankFunctionParameters parameters) {\n    test_output t1(\"CCPairFunction::low rank function\");\n    t1.set_cout_to_terminal();\n    madness::default_random_generator.setstate(int(cpu_time())%4149);\n    madness::default_random_generator.setstate(int(cpu_time())%4149);\n    std::string id=unique_fileid();\n\n    constexpr std::size_t LDIM=3;\n    constexpr std::size_t NDIM=2*LDIM;\n    print(\"eps, k, NDIM, id\",FunctionDefaults<NDIM>::get_thresh(),FunctionDefaults<NDIM>::get_k(),NDIM,id);\n\n    parameters.print(\"grid\",\"end\");\n    std::string f12type=parameters.f12type();\n    std::string transpose=parameters.get<std::string>(\"transpose\");\n\n    json j;\n    std::string jsonfilename=\"test_low_rank_function.\"+id+\".json\";\n    j[\"radius\"]=parameters.radius();\n    j[\"f12type\"]=parameters.f12type();\n    j[\"gamma\"]=parameters.gamma();\n    j[\"volume_element\"]=parameters.volume_element();\n    j[\"tol\"]=parameters.tol();\n    j[\"transpose\"]=transpose;\n    j[\"orthomethod\"]=parameters.orthomethod();\n    j[\"gridtype\"]=parameters.gridtype();\n    j[\"rhsfunctiontype\"]=parameters.rhsfunctiontype();\n    j[\"optimize\"]=parameters.optimize();\n    std::ofstream of(jsonfilename,std::ios::out);\n    of<<j;\n    of.close();\n\n    Vector<double,LDIM> offset;\n    offset.fill(0.0);\n    Function<double,LDIM> phi1=FunctionFactory<double,LDIM>(world).functor([](const Vector<double,LDIM>& r)\n                                                                           { return 1.0;});\n    Function<double,LDIM> phi2=FunctionFactory<double,LDIM>(world).functor([&offset](const Vector<double,LDIM>& r)\n                                                                           { return exp(-1.0*(r-offset).normf());});\n    if (transpose==\"slater1\") std::swap(phi1,phi2);\n    {\n        double n1 = phi1.norm2();\n        double n2 = phi2.norm2();\n        bool first_one = (fabs(phi1({1, 1, 1}) - 1.0) < 1.e-6);\n        if (world.rank() == 0) {\n            if (first_one) print(\"1(1) phi(2)\");\n            else print(\"phi(1) 1(2)\");\n            print(\"norms\", n1, n2);\n        }\n    }\n\n    Function<double,LDIM> one=FunctionFactory<double,LDIM>(world)\n            .functor([](const Vector<double,LDIM>& r) { return 1.0;});\n\n\n    std::shared_ptr<real_convolution_3d> f12;\n    if (f12type==\"slaterf12\") f12.reset(SlaterF12OperatorPtr(world,parameters.gamma(),1.e-6,FunctionDefaults<LDIM>::get_thresh()));\n    else if (f12type==\"slater\") f12.reset(SlaterOperatorPtr(world,parameters.gamma(),1.e-6,FunctionDefaults<LDIM>::get_thresh()));\n    else {\n        MADNESS_EXCEPTION(std::string(\"unknown f12type\"+f12type).c_str(),1);\n    }\n\n\n    auto compute_result = [&world, &one](const auto& lrf) {\n        real_function_3d result=real_factory_3d(world);\n        for (int r=0; r<lrf.rank(); ++r) result+=lrf.g[r]*inner(one,lrf.h[r]);\n        return result;\n    };\n    auto compute_relative_error = [](const auto reference, const auto result, const auto lrf) {\n        auto diff=reference-result;\n        double refnorm=reference.norm2();\n        // double resultnorm=result.norm2();\n        double error=diff.norm2();\n        return error/refnorm;\n    };\n\n    auto output=[&parameters] (const double projection_error, const long projection_rank, const double projection_time,\n                               const double optimized_error, const long optimized_rank, const double optimized_time) {\n        print(\"error\",parameters.radius(),parameters.gridtype(),parameters.rhsfunctiontype(),parameters.volume_element(),\n              parameters.tol(),\n              projection_error,projection_rank,projection_time,\n              optimized_error,optimized_rank,optimized_time);\n    };\n\n    // \\phi(1) \\bar \\phi(1) = \\intn phi(1) \\phi(2) f(1,2) d2\n    auto reference = phi1* (*f12)(phi2);\n//    plot_plane<3>(world,reference,\"reference.\"+id,PlotParameters(world).set_plane({\"x1\",\"x2\"}));\n    double n2=reference.norm2();\n    print(\"reference.norm2() = int f12 phi2 d2\",n2);\n    output(0.0,0.0,0.0,0.0,0.0,0.0);\n\n    LRFunctorF12<double,6> lrfunctor(f12,phi1,phi1);\n    double cpu0=cpu_time();\n    auto lrf=LowRankFunctionFactory<double,6>(parameters).project(lrfunctor);\n    lrf.do_print=true;\n//    plot_plane<6>(world,lrfunctor,\"plot_original.\"+id,PlotParameters(world).set_plane({\"x1\",\"x4\"}));\n    double cpu1=cpu_time();\n    double error1=lrf.l2error(lrfunctor);\n    print(\"l2error projection\",error1);\n//    plot_plane<6>(world,lrf,\"plot_lrf_projection.\"+id,PlotParameters(world).set_plane({\"x1\",\"x4\"}));\n\n    // compare\n    // \\phi(1) \\bar \\phi(1) = \\int phi(1) \\phi(2) f(1,2) d2\n    //       = \\int \\sum_r g_r(1) h_r(2)  d2\n    //       = \\sum_r g_r(1) <\\phi|h_r>\n    real_function_3d result=compute_result(lrf);\n    double projection_error=compute_relative_error(reference,result,lrf);\n    auto diff=reference-result;\n//    plot_plane<3>(world,diff,\"plot_diff_int_projection.\"+id,PlotParameters(world).set_plane({\"x1\",\"x2\"}));\n//    plot_plane<3>(world,result,\"plot_lrf_int_projection.\"+id,PlotParameters(world).set_plane({\"x1\",\"x2\"}));\n    output(projection_error,lrf.rank(),cpu1-cpu0,0.0,0.0,0.0);\n    j[\"projection_error_integrated\"]=projection_error;\n    j[\"projection_error_l2\"]=error1;\n    j[\"projection_time\"]=cpu1-cpu0;\n    std::ofstream of1(jsonfilename,std::ios::out);\n    of1<<j;\n    of1.close();\n\n    double cpu2=cpu_time();\n    lrf.optimize(lrfunctor,parameters.optimize());\n    double error2=lrf.l2error(lrfunctor);\n    print(\"l2error optimization\",error2);\n    double cpu3=cpu_time();\n    result=compute_result(lrf);\n    diff=reference-result;\n    plot_plane<3>(world,diff,\"plot_diff_int_optimization.\"+id,PlotParameters(world).set_plane({\"x1\",\"x2\"}));\n    plot_plane<3>(world,result,\"plot_lrf_int_optimization.\"+id,PlotParameters(world).set_plane({\"x1\",\"x2\"}));\n    double optimization_error=compute_relative_error(reference,result,lrf);\n    output(projection_error,lrf.rank(),cpu1-cpu0,optimization_error,lrf.rank(),cpu3-cpu2);\n    bool success=(projection_error<5.e-2) and (optimization_error<1.e-2);\n\n    j[\"optimization_error_integrated\"]=optimization_error;\n    j[\"optimization_error_l2\"]=error2;\n    j[\"optimization_time\"]=cpu3-cpu2;\n\n    std::ofstream of2(jsonfilename,std::ios::out);\n    of2<<j;\n    of2.close();\n\n    return t1.end(success);\n\n}\n\n/// test the K commutator of the He atom\n\n/// < ij | K f12 | ij >\nint test_Kcommutator(World& world, LowRankFunctionParameters& parameters) {\n    test_output t1(\"CCPairFunction::low exchange commutator\");\n    t1.set_cout_to_terminal();\n    madness::default_random_generator.setstate(int(cpu_time())%4149);\n    std::string id=unique_fileid();\n\n    constexpr std::size_t LDIM=3;\n    constexpr std::size_t NDIM=2*LDIM;\n    print(\"eps, k, NDIM, id\",FunctionDefaults<NDIM>::get_thresh(),FunctionDefaults<NDIM>::get_k(),NDIM,id);\n    parameters.print(\"grid\");\n\n    real_convolution_3d g12=(CoulombOperator(world,1.e-6,FunctionDefaults<LDIM>::get_thresh()));\n    g12.particle()=1;\n    std::shared_ptr<real_convolution_3d> f12ptr;\n    std::string f12type=parameters.f12type();\n    if (f12type==\"slaterf12\") f12ptr.reset(SlaterF12OperatorPtr(world,parameters.gamma(),1.e-6,FunctionDefaults<LDIM>::get_thresh()));\n    else if (f12type==\"slater\") f12ptr.reset(SlaterOperatorPtr(world,parameters.gamma(),1.e-6,FunctionDefaults<LDIM>::get_thresh()));\n    else {\n        MADNESS_EXCEPTION(std::string(\"unknown f12type\"+f12type).c_str(),1);\n    }\n    real_convolution_3d& f12=*f12ptr;\n\n    real_function_3d phi=real_factory_3d(world).f([](const coord_3d& r){return exp(-r.normf());});\n    double n=phi.norm2();\n    phi.scale(1/n);\n    real_function_3d phi_k=phi; // looks silly, helps reading.\n\n\n    // reference term ( < ij | K(1) )  = <Ki(1) j(2) |\n    real_function_3d Ki=phi_k*g12(phi*phi_k);\n    // < ij | K(1) f12 | ij > = < Ki(1) j(2) | f12 | i(1) j(2) > = <i* Ki(1) f12( j*j(2))\n    double reference=inner(Ki*phi,f12(phi*phi));\n    print(\"reference <ij | K(1) f12 | ij>\",reference);\n\n    json j;\n    std::string jsonfilename=\"test_kcommuntator.\"+id+\".json\";\n    j[\"radius\"]=parameters.radius();\n    j[\"f12type\"]=parameters.f12type();\n    j[\"gamma\"]=parameters.gamma();\n    j[\"thresh\"]=FunctionDefaults<3>::get_thresh();\n    j[\"volume_element\"]=parameters.volume_element();\n    j[\"tol\"]=parameters.tol();\n    j[\"orthomethod\"]=parameters.orthomethod();\n    j[\"gridtype\"]=parameters.gridtype();\n    j[\"rhsfunctiontype\"]=parameters.rhsfunctiontype();\n    j[\"optimize\"]=parameters.optimize();\n    j[\"reference\"]=reference;\n\n    auto json2file= [](const json& j, const std::string& jsonfilename) {\n        std::ofstream of(jsonfilename, std::ios::out);\n        of << j;\n        of.close();\n    };\n\n    json2file(j,jsonfilename);\n    timer t(world);\n    auto compute_error = [&](const std::string msg, const LowRankFunction<double,6>& lrf) {\n        auto gk = mul(world, phi_k, g12(lrf.g * phi_k)); // function of 1\n        auto hj = lrf.h * phi; // function of 2\n        Tensor<double> j_hj = inner(world, phi, hj);\n        Tensor<double> i_gk = inner(world, phi, gk);\n        double result_right = j_hj.trace(i_gk);\n        print(msg,\"norm \", result_right);\n        print(msg,\"error\", result_right-reference);\n        print(msg,\"rank \", lrf.rank());\n        j[msg]=result_right-reference;\n        j[msg+\"_rank\"]=lrf.rank();\n        j[msg+\"_compute_time\"]=t.tag(msg+\"_compute_time\");\n        json2file(j,jsonfilename);\n    };\n\n\n    if (1) {\n        // lowrankfunction left phi: lrf(1',2) = f12(1',2) i(1')\n        // K f12 ij = \\sum_k k(1) \\int g(1,1') f12(1'2) i(1') j(2) k(1') d1'\n        //          = \\sum_kr k(1) j(2) \\int g(1,1') g_r(1') h_r(2) k(1') d1'\n        //          = \\sum_r j(2) h_r(2) \\sum_k k(1) \\int g(1,1') g_r(1') k(1') d1'\n        real_function_3d one = real_factory_3d(world).f([](const coord_3d& r) { return 1.0; });\n        LRFunctorF12<double,6> lrfunctor(f12ptr,phi,one);\n//        LowRankFunction<double, 6> fi_one(f12ptr, copy(phi), copy(one));\n        auto fi_one=LowRankFunctionFactory<double,6>(parameters).project(lrfunctor);\n//        fi_one.project(parameters);\n        double l2error=fi_one.l2error(lrfunctor);\n        print(\"left_project_l2error\",l2error);\n\n        j[\"left_project_time\"]=t.tag(\"left_project_time\");\n        json2file(j,jsonfilename);\n        compute_error(\"left_project\",fi_one);\n\n        fi_one.optimize(lrfunctor);\n        l2error=fi_one.l2error(lrfunctor);\n        print(\"left_optimize_l2error\",l2error);\n        j[\"left_optimize_time\"]=t.tag(\"left_optimize_time\");\n        json2file(j,jsonfilename);\n        compute_error(\"left_optimize\",fi_one);\n\n//        fi_one.reorthonormalize();\n//        j[\"left_reorthonormalize\"]=t.tag(\"left_reorthonormalize\");\n//        json2file(j,jsonfilename);\n//        compute_error(\"left_reorthonormalize\",fi_one);\n\n        LowRankFunction<double,6> phi0(world);\n        phi0.g={phi};\n        phi0.h={phi};\n\n        timer t2(world);\n        // this is f12|ij>\n        auto f12ij=copy(fi_one);\n        f12ij.h=f12ij.h*phi;\n        double result1=inner(phi0,f12ij);\n        print(\"<ij | f12 | ij>\",result1);\n        t2.tag(\"multiply 1(1)* phi(1))\");\n\n        // this is f12|(ki) j>\n        auto f12kij=copy(f12ij);\n        f12kij.g=f12kij.g*phi;\n        double result3=inner(phi0,f12kij);\n        print(\"<ij | f12 | (ki) j>\",result3);\n        t2.tag(\"multiply 1\");\n\n        // this is g(f12|(ki) j>);\n        auto gf12kij=copy(f12kij);\n        gf12kij.g=g12(f12kij.g);\n        double result2=inner(phi0,gf12kij);\n        print(\"<ij | g(f12 | (ki) j>)\",result2);\n        t2.tag(\"apply g \");\n\n        // this is kg(f12|(ki) j>);\n        auto kgf12kij=copy(gf12kij);\n        kgf12kij.g=gf12kij.g * phi;\n        double result4=inner(phi0,kgf12kij);\n        print(\"<ij | k g(f12 | (ki) j>)\",result4);\n        t2.tag(\"apply g \");\n    }\n\n\n    // apply exchange operator in 6d\n//    if (f12type==\"slaterf12\") {\n    if (1) {\n//        FunctionDefaults<3>::print();\n//        FunctionDefaults<6>::print();\n        real_function_6d phi0=CompositeFactory<double,6,3>(world).particle1(phi).particle2(phi);\n\n        double thresh=FunctionDefaults<3>::get_thresh();\n        double dcut=1.e-6;\n        real_function_6d tmp=TwoElectronFactory(world).dcut(dcut).gamma(parameters.gamma()).f12().thresh(thresh);\n        real_function_6d f12ij=CompositeFactory<double,6,3>(world).g12(tmp).particle1(copy(phi)).particle2(copy(phi));\n\n        timer t(world);\n        f12ij.fill_tree();\n        t.tag(\"exchange: fill_tree\");\n        f12ij.print_size(\"f12ij\");\n\n        auto result1=madness::inner(phi0,f12ij);\n        print(\"<ij | f12 | ij>\", result1);\n        double reference1=inner(phi*phi,f12(phi*phi));\n        print(\"reference <ij |f12 | ij>\",reference1);\n\n\n        real_function_6d kf12ij=multiply(f12ij,copy(phi_k),1);\n        kf12ij.print_size(\"kf12ij\");\n        t.tag(\"exchange: multiply 1\");\n\n        auto result2=madness::inner(phi0,kf12ij);\n        print(\"<ij | f12 | (ki) j>\", result2);\n        double reference2=inner(phi*phi,f12(phi*phi*phi));\n        print(\"reference <ij |f12 | (ki) j>\",reference2);\n\n        kf12ij.change_tree_state(reconstructed);\n        real_function_6d gkf12ij=g12(kf12ij).truncate();\n        gkf12ij.print_size(\"gkf12ij\");\n        t.tag(\"exchange: apply g\");\n\n        auto result3=madness::inner(phi0,gkf12ij);\n        print(\"<ij | g(1'1) f12 | (ki) j>\", result3);\n        double reference3=inner(phi*phi,f12(phi*phi*g12(copy(phi))));\n        print(\"reference <ij | g(1'1) f12 | (ki) j>\",reference3);\n\n\n        auto exf12ij=multiply(gkf12ij,copy(phi_k),1).truncate();\n        exf12ij.print_size(\"exf12ij\");\n        t.tag(\"exchange: multiply 2\");\n\n        auto result=madness::inner(phi0,exf12ij);\n        print(\"<ij | K1 f12 | ij>\", result);\n        print(\"error\",result-reference);\n\n\n    }\n\n    return t1.end();\n\n}\n\ntemplate<std::size_t LDIM>\nint test_full_rank_functor(World& world, LowRankFunctionParameters parameters) {\n\n    test_output t1(\"test_full_rank_functor\");\n    t1.set_cout_to_terminal();\n    print_header2(\"entering test_full_rank_functor\");\n    constexpr int NDIM=2*LDIM;\n//    FunctionDefaults<LDIM>::set_thresh(1.e-6);\n//    FunctionDefaults<NDIM>::set_thresh(1.e-6);\n    double tol=6.e-3;\n    double gaussexponent=2.0;\n\n    // const particle<LDIM> p1=particle<LDIM>::particle1();\n    // const particle<LDIM> p2=particle<LDIM>::particle2();\n\n    LRFunctorPure<double,NDIM> functorpure;\n    Function<double,NDIM> gauss=FunctionFactory<double,NDIM>(world)\n            .functor([&gaussexponent](const Vector<double,NDIM>& r){\n                Vector<double,LDIM> a,b;\n                for (int i=0; i<LDIM; ++i) {\n                    a[i]=r[i];\n                    b[i]=r[i+LDIM];\n                }\n                return exp(-gaussexponent*inner(a-b,a-b));\n            });\n    functorpure.f=gauss;\n    t1.checkpoint(true,\"prep\");\n\n    auto gaussop=std::shared_ptr<SeparatedConvolution<double,LDIM>>(GaussOperatorPtr<LDIM>(world,gaussexponent));\n    LRFunctorF12<double,NDIM> functorf12(gaussop,std::vector<Function<double,LDIM>>({}),{});\n//    functorf12.f12.reset(GaussOperatorPtr<LDIM>(world,gaussexponent));\n\n    auto builder= LowRankFunctionFactory<double,NDIM>(parameters).set_radius(8)\n            .set_volume_element(0.1).set_rank_revealing_tol(1.e-10).set_orthomethod(\"canonical\");\n\n    auto lrfunction1=builder.project(functorf12);\n    t1.checkpoint(true,\"construction f12 functor\");\n    auto lrfunction2=builder.project(functorpure);\n    t1.checkpoint(true,\"construction full rank functor\");\n    lrfunction1.optimize(functorf12);\n    t1.checkpoint(true,\"optimization f12 functor\");\n    lrfunction2.optimize(functorpure);\n    t1.checkpoint(true,\"optimization full rank functor\");\n\n\n    try {\n        double error1=lrfunction1.l2error(functorf12);\n        t1.checkpoint(error1,tol,\"f12 functor, f12 l2 error: \");\n    } catch (...) {\n        print(\"l2 error negative 1\");\n    }\n    try {\n        double error2=lrfunction2.l2error(functorpure);\n        t1.checkpoint(error2,tol,\"full rank functor, full rank l2 error\");\n    } catch (...) {\n        print(\"l2 error negative 2\");\n    }\n    try {\n        double error3=lrfunction2.l2error(functorf12);\n        t1.checkpoint(error3,tol,\"full rank functor, f12 l2 error:\");\n    } catch (...) {\n        print(\"l2 error negative 3\");\n    }\n    try {\n        double error4=lrfunction1.l2error(functorpure);\n        t1.checkpoint(error4,tol,\"f12 functor, full rank l2 error: \");\n    } catch (...) {\n        print(\"l2 error negative 4\");\n    }\n//    print(\"errors\",error2,error4);\n\n    print_header2(\"leaving test_full_rank_functor\");\n    return t1.end();\n}\n\n\ntemplate<std::size_t LDIM>\nint test_arithmetic(World& world, LowRankFunctionParameters parameters) {\n    constexpr std::size_t NDIM = 2 * LDIM;\n    test_output t1(\"LowRankFunction::arithmetic in dimension \" + std::to_string(NDIM));\n    t1.set_cout_to_terminal();\n    double thresh=FunctionDefaults<LDIM>::get_thresh();\n    double thresh_ndim=FunctionDefaults<LDIM>::get_thresh();\n    print(\"thresh ldim/ndim\",thresh,thresh_ndim);\n    Function<double,LDIM> phi=FunctionFactory<double,LDIM>(world)\n            .functor([](const Vector<double,LDIM>& r){return exp(-4.0*inner(r,r));});\n\n    auto gauss1=std::shared_ptr<SeparatedConvolution<double,LDIM>>(GaussOperatorPtr<LDIM>(world,1.0));\n    LRFunctorF12<double,NDIM> functor1(gauss1,{phi},{});\n    auto gauss2=std::shared_ptr<SeparatedConvolution<double,LDIM>>(GaussOperatorPtr<LDIM>(world,2.0));\n    LRFunctorF12<double,NDIM> functor2(gauss2,{phi},{});\n\n    // auto p1=particle<LDIM>::particle1();\n    // auto p2=particle<LDIM>::particle2();\n\n    auto builder= LowRankFunctionFactory<double,NDIM>(parameters).set_radius(4)\n            .set_volume_element(0.1).set_rank_revealing_tol(1.e-10).set_orthomethod(\"canonical\");\n    auto lrf1=builder.project(functor1);\n    auto lrf2=builder.project(functor2);\n\n    Vector<double,NDIM> r;\n    r.fill(0.2);\n\n    // addition/subtraction\n    {\n        auto l1=lrf1+lrf1;\n        t1.checkpoint(fabs(l1(r)-2.0*lrf1(r))<thresh,\"addition - value\");\n        t1.checkpoint(l1.rank()==lrf1.rank()*2,\"addition - rank\");\n        t1.checkpoint(&l1.get_g().front()!=&lrf1.get_g().front(),\"addition - deep copy\");\n\n        auto l2=l1-lrf1;\n        t1.checkpoint(fabs(l2(r)-lrf1(r))<thresh,\"subtraction - value\");\n        t1.checkpoint(l2.rank()==lrf1.rank()*3,\"subtraction - rank\");\n        t1.checkpoint(&l2.get_g().front()!=&lrf1.get_g().front(),\"subtraction - deep copy\");\n\n        l2+=lrf1;\n        t1.checkpoint(fabs(l2(r)-2.0*lrf1(r))<thresh,\"in-place-addition - value\");\n        t1.checkpoint(l2.rank()==lrf1.rank()*4,\"in-place-addition - rank\");\n\n        l2-=lrf1;\n        t1.checkpoint(fabs(l2(r)-lrf1(r))<thresh,\"in-place-subtraction - value\");\n        t1.checkpoint(l2.rank()==lrf1.rank()*5,\"in-place-subtraction - rank\");\n    }\n\n\n    // norm\n    {\n        double n1=lrf1.norm2();\n        double refn1=functor1.norm2();\n        t1.checkpoint(fabs(n1-refn1)<thresh,\"norm2 computation\");\n        double n2=lrf2.norm2();\n        double refn2=functor2.norm2();\n        t1.checkpoint(fabs(n2-refn2)<thresh,\"norm2 computation\");\n    }\n\n\n    // scalar multiplication\n    {\n        auto l1=2.0*lrf1;\n        t1.checkpoint(fabs(l1(r)-2.0*lrf1(r))<thresh,\"oop-place multiplication\");\n        t1.checkpoint(&l1.get_g().front()!=&lrf1.get_g().front(),\"subtraction - deep copy\");\n        l1*=0.5;\n        t1.checkpoint(fabs(l1(r)-lrf1(r))<thresh,\"in-place multiplication\");\n\n    }\n\n    return t1.end();\n}\n\n/// test partial inner products\n\n/// with\n/// f1(x,y) = exp(-a*x^2) * exp(-(x-y)^2)\n/// f2(x,y) = exp(-a*x^2) * exp(-g (x-y)^2)\n/// test the inner products\n///   a) inner(f1,f2,i,j) for i,j=0,1\n///   b) inner(f1,\ntemplate<std::size_t LDIM>\nint test_inner(World& world, LowRankFunctionParameters parameters) {\n\n    static_assert(LDIM==1 or LDIM==2);\n    constexpr std::size_t NDIM = 2 * LDIM;\n    test_output t1(\"LowRankFunction::test_inner in dimension \" + std::to_string(NDIM));\n//    t1.set_cout_to_terminal();\n    double thresh=FunctionDefaults<LDIM>::get_thresh();\n    double thresh_ndim=FunctionDefaults<LDIM>::get_thresh();\n    print(\"thresh ldim/ndim\",thresh,thresh_ndim);\n    Function<double,LDIM> phi=FunctionFactory<double,LDIM>(world)\n            .functor([](const Vector<double,LDIM>& r){return exp(-4.0*inner(r,r));});\n\n    auto gauss1=std::shared_ptr<SeparatedConvolution<double,LDIM>>(GaussOperatorPtr<LDIM>(world,1.0));\n    LRFunctorF12<double,NDIM> functor1(gauss1,{phi},{});\n    auto gauss2=std::shared_ptr<SeparatedConvolution<double,LDIM>>(GaussOperatorPtr<LDIM>(world,2.0));\n    LRFunctorF12<double,NDIM> functor2(gauss2,{phi},{});\n//   functor2.a={phi};\n\n    auto p1=particle<LDIM>::particle1();\n    auto p2=particle<LDIM>::particle2();\n\n    auto builder= LowRankFunctionFactory<double,NDIM>(parameters).set_radius(4)\n            .set_volume_element(0.1).set_rank_revealing_tol(1.e-10).set_orthomethod(\"canonical\");\n    auto lrf1=builder.project(functor1);\n    auto lrf2=builder.project(functor2);\n\n    // reference numbers: (by mathematica)\n    // f1(x,y) = exp(-a*x^2) * exp(-(x-y)^2)\n    // f2(x,y) = exp(-a*x^2) * exp(-g (x-y)^2)\n    // with a=4, g=2\n    // int f1(x,y),f2(x,z) dx = inner(f1,f2,0,0) : norm^2 = Pi^2/(2 Sqrt[2] Sqrt[a gamma] Sqrt[1 + 2 a + gamma]) = 0.37197471167788324677\n    // int f1(x,y),f2(z,x) dx = inner(f1,f2,0,1) : norm^2 = Pi^2/(2 Sqrt[a (1 + a + gamma) (a + 2 gamma)]) = 0.32972034117743393239\n    // int f1(y,x),f2(x,z) dx = inner(f1,f2,1,0) : norm^2 = 0.26921553123369812300\n    // int f1(y,x),f2(z,x) dx = inner(f1,f2,1,1) : norm^2 = 0.35613867236025352322\n\n    // inner f(1,2) f(2,3)\n    auto fullrank1=lrf1.reconstruct();\n    auto fullrank2=lrf2.reconstruct();\n    t1.checkpoint(true,\"prep inner\");\n    {\n        std::vector<double> reference={ 0.37197471167788324677, 0.32972034117743393239, 0.26921553123369812300, 0.35613867236025352322};\n        int counter=0;\n        for (auto p11 : {p1,p2}) {\n            for (auto p22 : {p1,p2}) {\n                double ref=reference[counter];\n                if (LDIM==2) ref*=ref;\n\n                // full/full\n                auto lhs1=inner(fullrank1,fullrank2,p11.get_tuple(),p22.get_tuple());\n                const double l1=lhs1.norm2();\n                print(\"l1\",l1,l1*l1,ref);\n                t1.checkpoint(l1*l1,ref,thresh,\"inner(full,full,\"+p11.str()+\",\"+p22.str()+\")\");\n                double asymmetric_ref=inner(fullrank1,lhs1);\n                double asymmetric1=inner(fullrank1,lhs1);\n                t1.checkpoint(asymmetric1,asymmetric_ref,thresh,\"asymmetric(full,full,\"+p11.str()+\",\"+p22.str()+\")\");\n\n                // low rank/full\n                auto lhs2=inner(lrf1,fullrank2,p11,p22);\n                double l2=lhs2.norm2();\n                t1.checkpoint(l2*l2,ref,thresh,\"inner(lrf,full,\"+p11.str()+\",\"+p22.str()+\")\");\n                double asymmetric2=inner(lrf1,lhs2);\n                t1.checkpoint(asymmetric2,asymmetric_ref,thresh,\"asymmetric(lrf,full,\"+p11.str()+\",\"+p22.str()+\")\");\n\n                // full/low rank\n                auto lhs3=inner(fullrank1,lrf2,p11,p22);\n                double l3=lhs3.norm2();\n                t1.checkpoint(l3*l3,ref,thresh,\"inner(full,lrf,\"+p11.str()+\",\"+p22.str()+\")\");\n                double asymmetric3=inner(lrf1,lhs3);\n                t1.checkpoint(asymmetric3,asymmetric_ref,thresh,\"asymmetric(full,lrf,\"+p11.str()+\",\"+p22.str()+\")\");\n\n\n                // low rank/low rank\n                auto lhs4=inner(lrf1,lrf2,p11,p22);\n                double l4=lhs4.norm2();\n                t1.checkpoint(l4*l4,ref,thresh,\"inner(lrf,lrf,\"+p11.str()+\",\"+p22.str()+\")\");\n                double asymmetric4=inner(lrf1,lhs4);\n                t1.checkpoint(asymmetric4,asymmetric_ref,thresh,\"asymmetric(lrf,lrf,\"+p11.str()+\",\"+p22.str()+\")\");\n\n                print(\"result norm\",p11,p22,\"), reference \",l1*l1,l2*l2,l3*l3,l4*l4,ref);\n                // l2 norm cannot distinguish between f(1,2) and f(2,1)\n                print(\"result asym\",p11,p22,\")\",asymmetric1,asymmetric2,asymmetric3,asymmetric4);\n\n                counter++;\n            }\n        }\n    }\n\n    // inner f(1,2) g(2)\n    // this is surprisingly inaccurate, but algorithm is correct, the error can be systematically decreased\n    {\n        thresh=FunctionDefaults<LDIM>::get_thresh()*50.0;\n        // fresh start\n        lrf1=builder.project(functor1);\n        fullrank1=FunctionFactory<double,NDIM>(world).functor(functor1);\n\n        std::vector<Function<double,LDIM>> arg(3);\n        for (int i=0; i<3; ++i) arg[i]=FunctionFactory<double,LDIM>(world)\n                    .functor([&i](const Vector<double,LDIM>& r)\n                             {return exp(-(i+1)*r.normf());});\n\n        std::vector<Function<double,LDIM>> lhs_full1, lhs_full2,lhs_func1,lhs_func2;\n        for (auto& a : arg) {\n            lhs_full1.push_back(inner(fullrank1,a,p1.get_tuple(),p1.get_tuple()));\n            lhs_full2.push_back(inner(fullrank1,a,p2.get_tuple(),p1.get_tuple()));\n\n            lhs_func1.push_back(inner(functor1,a,p1,p1));\n            lhs_func2.push_back(inner(functor1,a,p2,p1));\n        }\n        auto lhs_lrf1=inner(lrf1,arg,p1,p1);\n        auto lhs_lrf2=inner(lrf1,arg,p2,p1);\n\n        double norm_func1=norm2(world,lhs_func1);\n        double norm_func2=norm2(world,lhs_func2);\n        double norm_full1=norm2(world,lhs_full1);\n        double norm_full2=norm2(world,lhs_full2);\n        double norm_lrf1=norm2(world,lhs_lrf1);\n        double norm_lrf2=norm2(world,lhs_lrf2);\n        print(\"norms 1\",norm_func1,norm_full1,norm_lrf1);\n        print(\"norms 2\",norm_func2,norm_full2,norm_lrf2);\n\n        double error1=norm2(world,lhs_full1-lhs_func1);\n        double error2=norm2(world,lhs_full2-lhs_func2);\n        double error3=norm2(world,lhs_lrf1 -lhs_func1);\n        double error4=norm2(world,lhs_lrf2 -lhs_func2);\n\n        print(\"error1/2\",error1,error2,error3,error4);\n//        t1.checkpoint(error1<thresh,\"inner(full(1,2),g(1)\");      // particularly inaccurate, but we're not testing this\n//        t1.checkpoint(error2<thresh,\"inner(full(1,2),g(2)\");      // particularly inaccurate, but we're not testing this\n        t1.checkpoint(error3<thresh,\"inner(lrf(1,2),g(1)\");\n        t1.checkpoint(error4<thresh,\"inner(lrf(1,2),g(2)\");\n    }\n    return t1.end();\n}\n\ntemplate<std::size_t LDIM>\nint test_construction_optimization(World& world, LowRankFunctionParameters parameters) {\n    constexpr std::size_t NDIM=2*LDIM;\n    test_output t1(\"LowRankFunction::construction/optimization in dimension \"+std::to_string(NDIM));\n    t1.set_cout_to_terminal();\n    OperatorInfo info(1.0,1.e-6,FunctionDefaults<LDIM>::get_thresh(),OT_SLATER);\n    auto slater=std::shared_ptr<SeparatedConvolution<double,LDIM> >(new SeparatedConvolution<double,LDIM>(world,info));\n    Function<double,LDIM> one=FunctionFactory<double,LDIM>(world).functor([](const Vector<double,LDIM>& r){return exp(-0.4*inner(r,r));});\n    Function<double,LDIM> half=FunctionFactory<double,LDIM>(world).functor([](const Vector<double,LDIM>& r){return sqrt(0.5)*exp(-0.4*inner(r,r));});\n\n    LRFunctorF12<double,NDIM> lrfunctor1(slater,one,one);\n    LRFunctorF12<double,NDIM> lrfunctor2(slater,{half,half},{half,half});\n\n    for (auto& lrfunctor : {lrfunctor1,lrfunctor2}) {\n        LowRankFunctionFactory<double, NDIM> builder(parameters);\n        auto lrf = builder.project(lrfunctor);\n        t1.checkpoint(lrf.rank() > 0, \"construction\");\n\n        // with Slater tol must be relaxed\n        double tol = 2.e-2;\n\n        double error = lrf.l2error(lrfunctor);\n        double norm = lrf.norm2();\n        print(\"lrf.norm\", norm);\n        print(\"l2 error project \", error);\n        t1.checkpoint(error, tol, \"l2 error in projection\");\n\n        auto lrf2(lrf);\n        error = lrf2.l2error(lrfunctor);\n        print(\"l2 error copy ctor  \", error);\n        MADNESS_CHECK(lrf.rank() == lrf2.rank());\n        MADNESS_CHECK(&(lrf.g[0]) != &(lrf2.g[0]));  // deep copy\n        t1.checkpoint(error, tol, \"l2 error in copy ctor\");\n\n        lrf.optimize(lrfunctor);\n        error = lrf.l2error(lrfunctor);\n        print(\"l2 error optimize\", error);\n        t1.checkpoint(error, tol, \"l2 error in optimization\");\n\n        print_header2(lrf.orthomethod);\n        lrf.reorthonormalize();\n        error = lrf.l2error(lrfunctor);\n        print(\"l2 error reorthonormalize\", error);\n        t1.checkpoint(error, tol, \"l2 error in reorthonormalization\");\n\n        lrf+=lrf;\n        lrf*=0.5;\n        lrf.reorthonormalize();\n        error = lrf.l2error(lrfunctor);\n        print(\"l2 error reorthonormalize with lindep\", error);\n        t1.checkpoint(error, tol, \"l2 error in reorthonormalization with lindep\");\n\n    }\n    return t1.end();\n}\n\ntemplate<std::size_t LDIM>\nint test_molecular_grid(World& world, LowRankFunctionParameters parameters) {\n    constexpr std::size_t NDIM=2*LDIM;\n    test_output t1(\"LowRankFunction::molecular_grid in dimension \"+std::to_string(NDIM));\n    t1.set_cout_to_terminal();\n    OperatorInfo info(1.0,1.e-6,FunctionDefaults<LDIM>::get_thresh(),OT_SLATER);\n    auto slater=std::shared_ptr<SeparatedConvolution<double,LDIM> >(new SeparatedConvolution<double,LDIM>(world,info));\n\n    /*\n     * we test the accuracy of the matrix element <dens(1) | f12 | dens(2)>_12\n     */\n\n    // a molecule of hydrogen atoms in the xy plane\n    std::vector<Vector<double,LDIM>> atomic_sites;\n    atomic_sites.push_back(Vector<double,LDIM>( 0.0));\n    atomic_sites.push_back(Vector<double,LDIM>( 2.0));\n    atomic_sites.push_back(Vector<double,LDIM>(-4.0));\n    if (LDIM>1) {\n        atomic_sites.back()[0]=0.0;\n        atomic_sites.back()[1]=-4.0;\n    }\n\n    parameters.print(\"grid parameters in test_molecular_grid\");\n    molecular_grid<LDIM> mgrid(atomic_sites,parameters);\n    auto grid=mgrid.get_grid();\n    mgrid.visualize(\"grid\",grid);\n\n    // something like a density\n    auto dens=[&atomic_sites](const Vector<double,LDIM>& r) {\n        double result=0.0;\n        for (auto& c : atomic_sites) result+=exp(-0.4*inner(r-c,r-c));\n        return result;\n    };\n\n    Function<double,LDIM> density=FunctionFactory<double,LDIM>(world).functor(dens);\n    Function<double,LDIM> one=FunctionFactory<double,LDIM>(world).functor([](const Vector<double,LDIM>& r){return exp(-0.4*inner(r,r));});\n    Function<double,LDIM> half=FunctionFactory<double,LDIM>(world).functor([](const Vector<double,LDIM>& r){return sqrt(0.5)*exp(-0.4*inner(r,r));});\n\n    LRFunctorF12<double,NDIM> lrfunctor(slater,density,density);\n    {\n\n//        atomic_sites.erase(atomic_sites.begin()+1, atomic_sites.end());\n        LowRankFunctionFactory<double, NDIM> builder(parameters, atomic_sites);\n        auto lrf = builder.project(lrfunctor);\n        t1.checkpoint(lrf.rank() > 0, \"construction\");\n\n        // with Slater tol must be relaxed\n        double tol = 1.e-2;\n\n        double error = lrf.l2error(lrfunctor);\n        double norm = lrf.norm2();\n        print(\"lrf.norm\", norm);\n        print(\"l2 error project \", error);\n        t1.checkpoint(error, tol, \"l2 error in projection\");\n\n        auto lrf2(lrf);\n        error = lrf2.l2error(lrfunctor);\n        print(\"l2 error copy ctor  \", error);\n        MADNESS_CHECK(lrf.rank() == lrf2.rank());\n        MADNESS_CHECK(&(lrf.g[0]) != &(lrf2.g[0]));  // deep copy\n        t1.checkpoint(error, tol, \"l2 error in copy ctor\");\n\n        lrf.optimize(lrfunctor,parameters.optimize());\n        error = lrf.l2error(lrfunctor);\n        print(\"l2 error optimize\", error);\n        t1.checkpoint(error, tol, \"l2 error in optimization\");\n\n        lrf.reorthonormalize();\n        error = lrf.l2error(lrfunctor);\n        print(\"l2 error reorthonormalize\", error);\n        t1.checkpoint(error, tol, \"l2 error in reorthonormalization\");\n\n        lrf+=lrf;\n        lrf*=0.5;\n        lrf.reorthonormalize();\n        error = lrf.l2error(lrfunctor);\n        print(\"l2 error reorthonormalize with lindep\", error);\n        t1.checkpoint(error, tol, \"l2 error in reorthonormalization with lindep\");\n\n    }\n    return t1.end();\n}\n\n\n\nint main(int argc, char **argv) {\n\n    madness::World& world = madness::initialize(argc, argv);\n    startup(world, argc, argv);\n    commandlineparser parser(argc, argv);\n    // bool long_test = parser.key_exists(\"long_test\");\n    int k = parser.key_exists(\"k\") ? std::atoi(parser.value(\"k\").c_str()) : 6;\n    double thresh  = parser.key_exists(\"thresh\") ? std::stod(parser.value(\"thresh\")) : 3.e-5;\n    FunctionDefaults<6>::set_tensor_type(TT_2D);\n\n\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<6>::set_truncate_mode(1);\n\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<2>::set_thresh(thresh);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<4>::set_thresh(thresh);\n    FunctionDefaults<5>::set_thresh(thresh);\n    FunctionDefaults<6>::set_thresh(thresh);\n    FunctionDefaults<6>::set_thresh(1.e-3);\n\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<2>::set_k(k);\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<4>::set_k(k);\n    FunctionDefaults<5>::set_k(k);\n    FunctionDefaults<6>::set_k(k);\n\n    FunctionDefaults<1>::set_cubic_cell(-10.,10.);\n    FunctionDefaults<2>::set_cubic_cell(-10.,10.);\n    FunctionDefaults<3>::set_cubic_cell(-10.,10.);\n    FunctionDefaults<4>::set_cubic_cell(-10.,10.);\n    FunctionDefaults<5>::set_cubic_cell(-10.,10.);\n    FunctionDefaults<6>::set_cubic_cell(-10.,10.);\n\n    FunctionDefaults<2>::set_tensor_type(TT_FULL);\n    print(\"numerical parameters: k, eps(3D), eps(6D)\", FunctionDefaults<3>::get_k(), FunctionDefaults<3>::get_thresh(),\n          FunctionDefaults<6>::get_thresh());\n    LowRankFunctionParameters parameters;\n    parameters.set_derived_value(\"f12type\",std::string(\"slaterf12\"));\n    parameters.read_and_set_derived_values(world,parser,\"grid\");\n    parameters.set_user_defined_value(\"radius\",2.5);\n    parameters.set_user_defined_value(\"volume_element\",1.e-1);\n//    parameters.set_user_defined_value(\"tol\",1.0e-10);\n    parameters.print(\"grid\");\n    int isuccess=0;\n#ifdef USE_GENTENSOR\n\n    // parameters.set_user_defined_value(\"volume_element\",3.e-1);\n    // parameters.set_user_defined_value(\"gridtype\",std::string(\"random\"));\n    // isuccess+=test_molecular_grid<3>(world,parameters);\n    // parameters.set_user_defined_value(\"gridtype\",std::string(\"dftgrid\"));\n    // isuccess+=test_molecular_grid<3>(world,parameters);\n    // parameters.set_user_defined_value(\"gridtype\",std::string(\"random\"));\n\n    try {\n\n        // isuccess+=test_full_rank_functor<1>(world, parameters);\n        // parameters.set_user_defined_value(\"orthomethod\",std::string(\"canonical\"));\n        // isuccess+=test_construction_optimization<1>(world,parameters);\n        parameters.set_user_defined_value(\"orthomethod\",std::string(\"cholesky\"));\n        isuccess+=test_construction_optimization<1>(world,parameters);\n        // isuccess+=test_arithmetic<1>(world,parameters);\n        // isuccess+=test_inner<1>(world,parameters);\n\n        if (0) {\n        // if (long_test) {\n            isuccess+=test_construction_optimization<2>(world,parameters);\n            isuccess+=test_arithmetic<2>(world,parameters);\n            isuccess+=test_inner<2>(world,parameters);\n            isuccess+=test_molecular_grid<2>(world,parameters);\n        }\n\n//        parameters.set_user_defined_value(\"volume_element\",1.e-1);\n//        isuccess+=test_lowrank_function(world,parameters);\n//        isuccess+=test_Kcommutator(world,parameters);\n    } catch (std::exception& e) {\n        madness::print(\"an error occured\");\n        madness::print(e.what());\n    }\n#else\n    print(\"could not run test_ccpairfunction: U need to compile with ENABLE_GENTENSOR=1\");\n#endif\n    finalize();\n\n    return isuccess;\n}"
  },
  {
    "path": "src/madness/chem/test_masks_and_boxes.cc",
    "content": "/*\n * test_masks_and_boxes.cc\n *\n *  Created on: 16 May 2019\n *      Author: fbischoff\n */\n\n\n#include<madness/chem/masks_and_boxes.h>\n#include <madness/mra/mra.h>\n\nusing namespace madness;\n\nbool test_smooth_maxout(World& world) {\n\n\tbool success=true;\n\tfor (int itight=3; itight<4; ++itight) { // was 10 ... reduced to speed up the test\n\t\tdouble radius=10.0;\n\t\tdouble deviation=std::pow(10,-double(itight));\n\t\tdouble tightness=max_of_x_1_smooth::compute_tightness(deviation,radius);\n\t\t// plot\n\t\tstd::string filename=\"line_flatten_out_tightness_\"+std::to_string(deviation);\n\t\tstd::function<double(const coord_1d&)> op = [&tightness, &radius] (const coord_1d& r)\n\t\t\t\t\t\t{return max_of_x_1_smooth::compute_factor(r[0],tightness,radius);};\n\t\tplot_line<std::function<double(const coord_1d&)>,1 >(world, filename.c_str(), 100, {0.0}, {2.0*radius}, op);\n\n\t\t// compare values\n\t\tdouble r=0.8*radius;\n\t\tdouble actual_deviation=fabs(r-r*op({r}));\n\t\tprint(\"deviation, tightness, r, maxed(r)\",deviation,tightness,r,r*op({r}), actual_deviation);\n\t\tif (actual_deviation>deviation) {\n\t\t\tprint(\"test failed for demanded deviation \",deviation);\n\t\t\tsuccess=false;\n\t\t}\n\t}\n\treturn success;\n}\n\n\nbool test_spherical_box(World& world) {\n\n\tprint(\"entering test_spherical_box\");\n\tbool success=true;\n\tfor (int ideviation=2; ideviation<3; ++ideviation) { // was 4 ... reduced to speed up test\n\t\tdouble radius=10.0;\n\t\tdouble deviation=std::pow(10,-double(ideviation));\n\n\t\tVector<double,3> offset={0.0,0.0,0.0};\n\t\tVector<double,3> direction={0.0,0.0,1.0};\n\n\t\tspherical_box<3> sbox1(radius,deviation,offset,direction);\n\n\t\t// project\n\t\treal_function_3d sbox=real_factory_3d(world).functor(sbox1);\n\t\tsbox.print_size(\"sbox with deviation 1e.-\"+stringify(ideviation));\n\n\t\t// test accuracy\n\t\tdouble actual=sbox(0.0,0.8*radius,0.0);\n\t\tdouble expect=1.0-std::pow(10.0,-double(ideviation));\n\t\tdouble error=std::abs(actual-expect);\n\n\t\t// compare values\n\t\tprint(\"deviation, actual, expect,error\",deviation,actual,expect,error);\n\t\tif (error>deviation*1.2) {\n\t\t\tprint(\"test failed for demanded deviation \",deviation);\n\t\t\tsuccess=false;\n\t\t}\n\t}\n\treturn success;\n}\n\n\n\nint main(int argc, char** argv) {\n\n\tWorld& world=initialize(argc, argv);\n\tif (world.rank() == 0) {\n\t\tprint(\"\\n  test masks_and_boxes \\n\");\n\t\tprintf(\"starting at time %.1f\\n\", wall_time());\n\n\t}\n\tstartup(world,argc,argv);\n\tstd::cout.precision(6);\n\n\n\tFunctionDefaults<3>::set_k(8); // was 8 but lower order can be faster for deeper refinement\n\tFunctionDefaults<3>::set_thresh(1.e-4); // was 1e-5 but increaesd to speed up test\n\tFunctionDefaults<3>::set_refine(true);\n\tFunctionDefaults<3>::set_initial_level(5);\n\tFunctionDefaults<3>::set_truncate_mode(1);\n\tFunctionDefaults<3>::set_cubic_cell(-20, 20);\n\n\n\ttry {\n\n\t\ttest_smooth_maxout(world);\n\t\ttest_spherical_box(world);\n\n\n\t} catch (const SafeMPI::Exception& e) {\n\t\tprint(e);\n\t\terror(\"caught an MPI exception\");\n\t} catch (const madness::MadnessException& e) {\n\t\tprint(e);\n\t\terror(\"caught a MADNESS exception\");\n\t} catch (const madness::TensorException& e) {\n\t\tprint(e);\n\t\terror(\"caught a Tensor exception\");\n\t} catch (const char* s) {\n\t\tprint(s);\n\t\terror(\"caught a string exception\");\n\t} catch (const std::string& s) {\n\t\tprint(s);\n\t\terror(\"caught a string (class) exception\");\n\t} catch (const std::exception& e) {\n\t\tprint(e.what());\n\t\terror(\"caught an STL exception\");\n\t} catch (...) {\n\t\terror(\"caught unhandled exception\");\n\t}\n\n\tfinalize();\n\treturn 0;\n}\n"
  },
  {
    "path": "src/madness/chem/test_pointgroupsymmetry.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/mra/functypedefs.h>\n#include<madness/chem/pointgroupoperator.h>\n#include<madness/chem/pointgroupsymmetry.h>\n\nusing namespace madness;\n\nnamespace madness {\nextern std::vector<std::string> cubefile_header(std::string filename=\"input\",\n\t\tconst bool& no_orient=false);\n}\n\n\ndouble dgaussian(const coord_3d& r) {\n    double x=r[0]-1, y=r[1]-2, z=r[2]-3;\n    return x*y*exp(-(x*x + y*y + z*z));\n}\n\n// same as dgaussian, but reflected at the xz plane (y -> -y)\ndouble s_xz_dgaussian(const coord_3d& r) {\n    double x=r[0]-1, y=-r[1]-2, z=r[2]-3;\n    return x*y*exp(-(x*x + y*y + z*z));\n}\n\n\ndouble xyyygaussian(const coord_2d& r) {\n    double x=r[0], y=r[1];\n    return x*y*y*y*exp(-(x*x + y*y ));\n}\n\n\ndouble gaussian_shift_2d(const coord_2d& r) {\n    double x=r[0]-2., y=r[1]-1.0;\n    return exp(-(x*x + y*y ));\n}\n\n// same as gaussian_shift_2d, but reflected at the x plane (y -> -y)\ndouble s_x_gaussian_shift_2d(const coord_2d& r) {\n    double x=r[0]-2., y=-r[1]-1.0;\n    return exp(-(x*x + y*y ));\n}\n\n\ndouble gaussian_shift_3d(const coord_3d& r) {\n    double x=r[0]-2., y=r[1]-1.0, z=r[2]-3.0;\n    return exp(-(x*x + y*y + z*z ));\n}\n\ndouble one1(const coord_3d& r) {\n    return 1.0;\n}\n\nvoid plot_symmetry_operators(World& world) {\n\n\tconst real_function_2d f=real_factory_2d(world).f(gaussian_shift_2d);\n\tpg_operator sx=pg_sigma_x();\n    pg_operator sy=pg_sigma_y();\n    pg_operator c4=pg_c4();\n    print(\"applying\",sx);\n\treal_function_2d opf1=sx(f);\n    real_function_2d opf2=sy(f);\n    real_function_2d opf3=c4(f);\n    std::vector<real_function_2d> ff=vector_factory<real_function_2d>(f,opf1,opf2,opf3);\n\tplot_plane(world,ff,\"f\");\n\n\n\t// test function\n\treal_function_3d p=real_factory_3d(world).f(dgaussian);\n\n\t// plot the Gaussian cube file\n\tstd::vector<std::string> molecular_info(1,\"0 0 0.0 0.0 0.0\\n\");\n\n\t// mirroring\n\tpg_operator e=pg_identity();\n\tpg_operator i=pg_inversion();\n\tpg_operator sxy=pg_sigma_xy();\n\tpg_operator sxz=pg_sigma_xz();\n\tpg_operator syz=pg_sigma_yz();\n\tpg_operator c4x=pg_c4x();\n\tpg_operator c4y=pg_c4y();\n\tpg_operator c4z=pg_c4z();\n\tpg_operator c2x=pg_c2x();\n\tpg_operator c2y=pg_c2y();\n\tpg_operator c2z=pg_c2z();\n\n\treal_function_3d opp1=sxy(p);\n\treal_function_3d opp2=syz(p);\n\n\tplot_cubefile<3>(world,p,\"dgaussian.cube\",molecular_info);\n\tplot_cubefile<3>(world,opp1,\"opp1.cube\",molecular_info);\n\tplot_cubefile<3>(world,opp2,\"opp2.cube\",molecular_info);\n\n\treal_function_3d c4x_p=c4x(p);\n\treal_function_3d c4y_p=c4y(p);\n\treal_function_3d c4z_p=c4z(p);\n\tplot_cubefile<3>(world,c4x_p,\"c4x_p.cube\",molecular_info);\n\tplot_cubefile<3>(world,c4y_p,\"c4y_p.cube\",molecular_info);\n\tplot_cubefile<3>(world,c4z_p,\"c4z_p.cube\",molecular_info);\n}\n\n\n/// test a small number of operator multiplications, including a hard-wire test\nint check_operator_multiplications_2d(World& world) {\n\n\tprint(\"test operator multiplications 2D\");\n\n\tpg_operator e=pg_identity();\n\tpg_operator i=pg_inversion();\n\tpg_operator sx=pg_sigma_x();\n\tpg_operator sy=pg_sigma_y();\n\tpg_operator c4=pg_c4();\n\tpg_operator c2=pg_c2();\n\n\treal_function_2d p=real_factory_2d(world).f(gaussian_shift_2d);\n\treal_function_2d sp=real_factory_2d(world).f(s_x_gaussian_shift_2d);\n\n\t// hard-wired test\n\tdouble h1=(sx(p)-sp).norm2();\n//\tprint(\"norm(hardwire) \",h1);\n\n\tdouble n1=(c2(p) - c4(c4(p))).norm2();\n\tdouble n2=(sx(sy(p))-c2(p)).norm2();\n\n\tint result=0;\n\tif (h1+n1+n2>1.e-13) {\n\t\tresult=1;\n\t\tprint(\"large error norm in the operator multiplications\");\n\t\tprint(h1);\n\t\tprint(n1,n2);\n\t} else {\n\t\tprint(\"  .. all good\");\n\t}\n\treturn result;\n\n}\n\n/// test a small number of operator multiplications, including a hard-wire test\nint check_operator_multiplications_3d(World& world) {\n\n\tprint(\"test operator multiplications 3D\");\n\n\tpg_operator e=pg_identity();\n\tpg_operator i=pg_inversion();\n\tpg_operator sxy=pg_sigma_xy();\n\tpg_operator sxz=pg_sigma_xz();\n\tpg_operator syz=pg_sigma_yz();\n\tpg_operator c4x=pg_c4x();\n\tpg_operator c4y=pg_c4y();\n\tpg_operator c4z=pg_c4z();\n\tpg_operator c2x=pg_c2x();\n\tpg_operator c2y=pg_c2y();\n\tpg_operator c2z=pg_c2z();\n\n\treal_function_3d p=real_factory_3d(world).f(dgaussian);\n\treal_function_3d sp=real_factory_3d(world).f(s_xz_dgaussian);\n\n\t// hard-wired test\n\tdouble h1=(sxz(p)-sp).norm2();\n//\tprint(\"norm(hardwire) \",h1);\n\n//\tprint(\"testing the norm of the differences c2-c4*c4 for x,y,z\");\n\treal_function_3d gonex=c2x(p) - c4x(c4x(p));\n\treal_function_3d goney=c2y(p) - c4y(c4y(p));\n\treal_function_3d gonez=c2z(p) - c4z(c4z(p));\n\tdouble nx=gonex.norm2();\n\tdouble ny=goney.norm2();\n\tdouble nz=gonez.norm2();\n//\tprint(\"norm(gone)\",nx,ny,nz);\n\n\n\tdouble n1=(sxy(sxz(syz(p)))-i(p)).norm2();\n//\tprint(\"norm s(s(s(f))) - i(f):\",n1);\n\n\tdouble n2=(sxz(sxy(p))-c2x(p)).norm2();\n//\tprint(\"norm sxz(sxy(p))-c2x(p):\",n2);\n\n\tint result=0;\n\tif (h1+nx+ny+nz+n1+n2>1.e-13) {\n\t\tresult=1;\n\t\tprint(\"large error norm in the operator multiplications\");\n\t\tprint(h1);\n\t\tprint(nx,ny,nz);\n\t\tprint(n1,n2);\n\t} else {\n\t\tprint(\"  .. all good\");\n\t}\n\treturn result;\n\n}\n\n/// perform all operator multiplication of the c2v group, subtract the result\nint check_multiplication_table_c2v(World& world) {\n\n\tprint(\"test multiplication table c2v\");\n\n\treal_function_3d p=real_factory_3d(world).f(dgaussian);\n\n\tpg_operator e=pg_identity();\n\tpg_operator i=pg_inversion();\n\tpg_operator sxy=pg_sigma_xy();\n\tpg_operator sxz=pg_sigma_xz();\n\tpg_operator syz=pg_sigma_yz();\n\tpg_operator c4x=pg_c4x();\n\tpg_operator c4y=pg_c4y();\n\tpg_operator c4z=pg_c4z();\n\tpg_operator c2x=pg_c2x();\n\tpg_operator c2y=pg_c2y();\n\tpg_operator c2z=pg_c2z();\n\n\t// check multiplication table of c2v\n\tdouble a1=(e(e(p))-e(p)).norm2();\n\tdouble a2=(e(c2z(p))-c2z(p)).norm2();\n\tdouble a3=(e(sxz(p))-sxz(p)).norm2();\n\tdouble a4=(e(syz(p))-syz(p)).norm2();\n\n\tdouble b1=(c2z(e(p))-c2z(p)).norm2();\n\tdouble b2=(c2z(c2z(p))-e(p)).norm2();\n\tdouble b3=(c2z(sxz(p))-syz(p)).norm2();\n\tdouble b4=(c2z(syz(p))-sxz(p)).norm2();\n\n\tdouble c1=(sxz(e(p))-sxz(p)).norm2();\n\tdouble c2=(sxz(c2z(p))-syz(p)).norm2();\n\tdouble c3=(sxz(sxz(p))-e(p)).norm2();\n\tdouble c4=(sxz(syz(p))-c2z(p)).norm2();\n\n\tdouble d1=(syz(e(p))-syz(p)).norm2();\n\tdouble d2=(syz(c2z(p))-sxz(p)).norm2();\n\tdouble d3=(syz(sxz(p))-c2z(p)).norm2();\n\tdouble d4=(syz(syz(p))-e(p)).norm2();\n\n\n\tint result=0;\n\tif (a1+a2+a3+a4+b1+b2+b3+b4+c1+c2+c3+c4+d1+d2+d3+d4 > 1.e-13) {\n\t\tprint(\"large error norm in the c2v multiplication table\");\n\t\tprint(a1,a2,a3,a4);\n\t\tprint(b1,b2,b3,b4);\n\t\tprint(c1,c2,c3,c4);\n\t\tprint(d1,d2,d3,d4);\n\t\tresult=1;\n\t} else {\n\t\tprint(\"  .. all good\");\n\t}\n\treturn result;\n}\n\n\n/// symmetrize a trial function, check its behavior according to the group table\nint test_projector(World& world) {\n\n\t// the trial function\n\tconst real_function_3d f=real_factory_3d(world).f(gaussian_shift_3d);\n\n\tdouble error=0.0;\n\tstd::string all_pg[]={\"c1\",\"cs\",\"c2\",\"ci\",\"c2v\",\"c2h\",\"d2\",\"d2h\"};\n\tfor (const std::string& pg : all_pg) {\n\t\tprint(\"point group\",pg);\n\t\tprojector_irrep proj(pg);\n\n\t\tfor (const std::string& irrep : proj.get_all_irreps()) {  // loop over all irreps\n\t\t\tprint(\" irrep\",irrep);\n\t\t\tproj.set_irrep(irrep);\n\t\t\treal_function_3d f1=proj(f)[0];\t// result is the first element of result vector\n\n\t\t\tcharactertable table=proj.get_table();\n\t\t\tfor (int i=0; i<table.order_; ++i) {\t// loop over all symmetry operations\n\t\t\t\tconst pg_operator syop = table.operators_[i];\n\t\t\t\tconst int character=table.irreps_[irrep][i];\n\t\t\t\tdouble n1=(f1 - character * syop(f1)).norm2();\n\t\t\t\tprint(\"  operator, character, norm \",syop.name(),character, n1);\n\t\t\t\terror+=n1;\n\t\t\t}\n\t\t}\n\t}\n\n\tint result=0;\n\tif (error > 1.e-13) {\n\t\tprint(\"large error norm test_projector:\", error);\n\t\tresult=1;\n\t} else {\n\t\tprint(\"  .. all good\");\n\t}\n\treturn result;\n}\n\nint test_orthogonalization(World& world) {\n\n\tint result=0;\n\n\tpg_operator e=pg_identity();\n\tpg_operator i=pg_inversion();\n\tpg_operator sxy=pg_sigma_xy();\n\tpg_operator sxz=pg_sigma_xz();\n\tpg_operator syz=pg_sigma_yz();\n\tpg_operator c4x=pg_c4x();\n\tpg_operator c4y=pg_c4y();\n\tpg_operator c4z=pg_c4z();\n\tpg_operator c2x=pg_c2x();\n\tpg_operator c2y=pg_c2y();\n\tpg_operator c2z=pg_c2z();\n\tstd::vector<std::string> molecular_info(1,\"0 0 0.0 0.0 0.0\\n\");\n\n\t// the trial function\n\treal_function_3d f=real_factory_3d(world).f(gaussian_shift_3d);\n\tdouble fnorm=f.norm2();\n\tf.scale(1.0/fnorm);\n\tconst real_function_3d one=real_factory_3d(world).f(one1);\n\n\t// create a set of symmetry-equivalent functions\n\tstd::string all_pg[]={\"c1\",\"cs\",\"c2\",\"ci\",\"c2v\",\"c2h\",\"d2\",\"d2h\"};\n\tfor (const std::string& pg : all_pg) {\n\t\tprint(\"point group\",pg);\n\t\tprojector_irrep proj(pg);\n\t\tproj.set_verbosity(1);\n\t\tcharactertable table=proj.get_table();\n\n\t\t// create a set of symmetry-adapted functions from one function\n\t\tstd::vector<std::string> sirrep1;\n\t\tvector_real_function_3d sym_adapt1=proj.create_symmetry_adapted_basis(f,sirrep1);\n\t\t                if (sym_adapt1.size()!= (size_t) table.order_) result++;\n\t\t// create a set of symmetry-equivalent functions\n\t\tvector_real_function_3d sym_equiv;\n\t\tfor (auto& syop : table.operators_) sym_equiv.push_back(syop(f));\n\t\tprint(\"sym_equiv.size()\",sym_equiv.size());\n\n\t\t// create a set of symmetry-adapted functions from the set of symm-equiv functions\n\t\tstd::vector<std::string> sirrep;\n\t\tvector_real_function_3d sym_adapt=proj(sym_equiv,one,sirrep);\n\t\tprint(\"sym_adapt.size()\",sym_adapt.size());\n\t\tif (sym_adapt.size()!=sym_equiv.size()) result++;\n\t\tprint(\"sirrep\",sirrep);\n\n\t\t// double check the two sets of functions\n\t\tTensor<double> ovlp=matrix_inner(world,sym_adapt,sym_adapt);\n\n\t\tfor (int i=0; i<ovlp.dim(0); ++i) ovlp(i,i)-=1.0;\n\t\tdouble norm=ovlp.normf()/ovlp.size();\n\t\tif (norm>1.e-5) {\n\t\t\tresult++;\n\t\t\tprint(ovlp);\n\t\t\tprint(\"norm of the overlap matrix (should be zero)\",norm);\n\t\t}\n\t}\n\n\tdouble error=0;\n\tif (error > 1.e-13) {\n\t\tprint(\"large error norm test_orthogonalization:\", error);\n\t\tresult=1;\n\t} else {\n\t\tprint(\"  .. all good\");\n\t}\n\treturn result;\n}\n\nint main(int argc, char** argv) {\n    madness::initialize(argc, argv);\n\n    madness::World world(SafeMPI::COMM_WORLD);\n    world.gop.fence();\n    startup(world,argc,argv);\n    FunctionDefaults<2>::set_cubic_cell(-6.0,6.0);\n    FunctionDefaults<3>::set_cubic_cell(-6.0,6.0);\n\n\n    int result=0;\n    result+=check_operator_multiplications_2d(world);\n    result+=check_operator_multiplications_3d(world);\n    result+=check_multiplication_table_c2v(world);\n    result+=test_projector(world);\n    result+=test_orthogonalization(world);\n//    plot_symmetry_operators(world);\n\n    print(\"result\",result);\n    madness::finalize();\n    return result;\n}\n"
  },
  {
    "path": "src/madness/chem/test_projector.cc",
    "content": "//\n// Created by Florian Bischoff on 12/19/23.\n//\n\n#include <madness/mra/mra.h>\n#include <madness/chem/projector.h>\n#include <madness/world/test_utilities.h>\n\n\nusing namespace madness;\n\ntemplate<typename T, std::size_t NDIM>\nint test_projector(World& world) {\n    test_output t1(\"testing projector for dimension \" + std::to_string(NDIM));\n//    t1.set_cout_to_terminal();\n\n    FunctionDefaults<NDIM>::set_tensor_type(TT_FULL);\n\n    auto g1=[](const Vector<double,NDIM>& r){return exp(-inner(r,r));};\n    auto g2=[](const Vector<double,NDIM>& r){return exp(-2.0*inner(r,r));};\n    auto g3=[](const Vector<double,NDIM>& r){return exp(-3.0*inner(r,r));};\n\n    // set up an orthonormal basis for projection\n    std::vector<Function<T,NDIM>> vphi;\n    vphi.push_back(FunctionFactory<T,NDIM>(world).functor(g1));\n    vphi.push_back(FunctionFactory<T,NDIM>(world).functor(g2));\n    vphi.push_back(FunctionFactory<T,NDIM>(world).functor(g3));\n    vphi=orthonormalize_symmetric(vphi);\n    auto S=matrix_inner(world,vphi,vphi);\n    print(\"overlap\");\n    print(S);\n\n    std::vector<Function<T,NDIM>> pspace1={vphi[0],vphi[1]};\n    std::vector<Function<T,NDIM>> pspace2={vphi[2]};\n\n    // P1 and P2 project onto orthogonal subspaces\n    Projector<T,NDIM> P1(pspace1);\n    Projector<T,NDIM> P2(pspace2);\n    QProjector<T,NDIM> Q1(pspace1);\n\n    // set up trial function\n    auto trial1=[](const Vector<double,NDIM>& r){return inner(r,r)*exp(-inner(r,r));};\n    auto trial2=[](const Vector<double,NDIM>& r){return r.normf()*exp(-inner(r,r));};\n    Function<T,NDIM> f1=FunctionFactory<T,NDIM>(world).functor(trial1);\n    Function<T,NDIM> f2=FunctionFactory<T,NDIM>(world).functor(trial2);\n    std::vector<Function<T,NDIM>> f={f1,f2};\n\n\n    // check that the projector is indeed a projector: idempotency\n    std::vector<Function<T,NDIM>> pf=P1(f);\n    std::vector<Function<T,NDIM>> ppf=P1(pf);\n    double err=norm2(world,(pf-ppf))/norm2(world,pf);\n    print(\"err\",err);\n    t1.checkpoint(fabs(err)<FunctionDefaults<NDIM>::get_thresh(),\"P1 projector is a projector\");\n\n    // check that P1 and P2 are orthogonal\n    std::vector<Function<T,NDIM>> p2f=P2(f);\n    double err2=matrix_inner(world,p2f,pf).normf();\n    print(\"err2\",err2);\n    t1.checkpoint(fabs(err2)<FunctionDefaults<NDIM>::get_thresh(),\"P1 and P2 are orthogonal\");\n\n    // check that P2 projects into a subspace of Q1\n    std::vector<Function<T,NDIM>> q1p2f=Q1(p2f);\n    double err3=norm2(world,(p2f-q1p2f))/norm2(world,p2f);\n    print(\"err3\",err3);\n    t1.checkpoint(fabs(err3)<FunctionDefaults<NDIM>::get_thresh(),\"P2 projects into a subspace of Q1\");\n\n\n\n\n\n\n    return t1.end();\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_projector_outer(World& world) {\n    test_output t1(\"testing projector_outer for dimension \" + std::to_string(NDIM));\n    constexpr std::size_t LDIM=NDIM/2;\n    static_assert(2*LDIM==NDIM);\n\n    auto g1=[](const Vector<double,LDIM>& r){return exp(-inner(r,r));};\n    auto g_hidim=[](const Vector<double,NDIM>& r){return 2.0*exp(-3.0*inner(r,r));};\n    Function<double,LDIM> f1=FunctionFactory<double,LDIM>(world).f(g1);\n    Function<double,NDIM> f_hidim=FunctionFactory<double,NDIM>(world).f(g_hidim);\n\n\n    // compare explicit SO projector Q12 and outer product projector Q1Q2\n    StrongOrthogonalityProjector<double,LDIM> Q1(world);\n    Q1.set_spaces({f1});\n\n    QProjector<double,LDIM> q({f1});\n    auto Q2=outer(q,q);\n\n    auto Q1f=Q1(f_hidim);\n    auto Q2f=Q2(f_hidim);\n    double err=(Q1f-Q2f).norm2();\n    print(\"error\",err);\n    double norm1=Q1f.norm2();\n    double norm2=Q2f.norm2();\n    print(\"norm1/2\",norm1,norm2);\n    double trace1=Q1f.trace();\n    double trace2=Q2f.trace();\n    print(\"trace1/2\",trace1,trace2);\n\n    t1.checkpoint(norm1-norm2,FunctionDefaults<NDIM>::get_thresh(),\"Q1 direct and Q2 outer are the same\");\n    t1.checkpoint(trace1-trace2,FunctionDefaults<NDIM>::get_thresh(),\"Q1 direct and Q2 outer are the same\");\n    // loosen threshold due to outer product\n    t1.checkpoint(err,FunctionDefaults<NDIM>::get_thresh()*3.0,\"Q1 direct and Q2 outer are the same\");\n\n    return t1.end();\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_Q12_projector(World& world) {\n    test_output t1(\"testing Q12 projector for dimension \"+std::to_string(NDIM));\n    t1.set_cout_to_terminal();\n    constexpr std::size_t LDIM=NDIM/2;\n    static_assert(NDIM==LDIM*2);\n    double thresh=FunctionDefaults<NDIM>::get_thresh();\n    FunctionDefaults<NDIM>::set_tensor_type(TT_2D);\n    FunctionDefaults<LDIM>::set_tensor_type(TT_FULL);\n\n    auto g1=[](const Vector<double,LDIM>& r){return exp(-inner(r,r));};\n    auto g2=[](const Vector<double,LDIM>& r){return exp(-2.0*inner(r,r));};\n    auto g_hidim=[](const Vector<double,NDIM>& r){return exp(-3.0*inner(r,r));};\n\n    // set up an orthonormal basis for projection\n    std::vector<Function<T,LDIM>> vphi;\n    vphi.push_back(FunctionFactory<T,LDIM>(world).functor(g1));\n    vphi.push_back(FunctionFactory<T,LDIM>(world).functor(g2));\n    vphi=orthonormalize_symmetric(vphi);\n//    auto S=matrix_inner(world,vphi,vphi);\n//    print(\"overlap\");\n//    print(S);\n\n    StrongOrthogonalityProjector<T,LDIM> SO(world);\n    SO.set_spaces(vphi);\n\n    Function<T,NDIM> f=FunctionFactory<T,NDIM>(world).functor(g_hidim);\n    double fnorm=f.norm2();\n    print(\"fnorm\",fnorm);\n\n    // check that the projector is indeed a projector\n    Function<T,NDIM> f1=SO(f);\n    double sonorm=f1.norm2();\n    print(\"Q12(f) norm\",sonorm);\n    double refnorm;\n    if (NDIM==2) {\n        refnorm=0.0028346312885398958; // according to mathematica\n        print(\"err0\",fabs(sonorm-refnorm));\n        t1.checkpoint(fabs(sonorm-refnorm)<thresh,\"SO projector is correct\");\n    } else if (NDIM==4) {\n        refnorm=5.258329e-03;      // according to madness ..\n        print(\"err0\",fabs(sonorm-refnorm));\n        t1.checkpoint(fabs(sonorm-refnorm)<thresh,\"SO projector is correct\");\n    }\n\n    Function<T,NDIM> f2=SO(f1);\n    double err=(f1-f2).norm2()/f.norm2();\n    print(\"err\",err);\n    t1.checkpoint(fabs(err)<thresh,\"SO projector is a projector\");\n\n\n    // check projector being consistent\n    // SO(f) = f - O1(f) - O2(f) + O1O2(f)\n    Projector<T,LDIM> O1(vphi);\n    Projector<T,LDIM> O2(vphi);\n    O1.set_particle(0);\n    O2.set_particle(1);\n    Function<T,NDIM> f3=f-O1(f)-O2(f)+O1(O2(f));\n    double err1=(f1-f3).norm2()/f.norm2();\n    print(\"err1\",err1);\n    t1.checkpoint(fabs(err1)<thresh*20.0,\"SO projector is consistent with 1-O1-O2+O1O2\");\n\n\n    return t1.end();\n}\n\nint main(int argc, char**argv) {\n\n    World& world=initialize(argc,argv);\n    commandlineparser parser(argc,argv);\n\n    // the parameters\n    double L=40;\n    long k=5;\n    double thresh=1.e-4;\n\n    if (parser.key_exists(\"k\")) k=atoi(parser.value(\"k\").c_str());\n    if (parser.key_exists(\"thresh\")) k=atof(parser.value(\"thresh\").c_str());\n    print(\"k, thresh\", k, thresh);\n\n    srand(time(nullptr));\n    startup(world,argc,argv);\n\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<2>::set_thresh(thresh);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<4>::set_thresh(thresh);\n    FunctionDefaults<5>::set_thresh(thresh);\n    FunctionDefaults<6>::set_thresh(thresh);\n\n    FunctionDefaults<1>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<2>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<4>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<5>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<6>::set_cubic_cell(-L/2,L/2);\n\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<2>::set_k(k);\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<4>::set_k(k);\n    FunctionDefaults<5>::set_k(k);\n    FunctionDefaults<6>::set_k(k);\n\n    print(\"entering testsuite for 6-dimensional functions\\n\");\n    print(\"k            \",k);\n    print(\"thresh       \",thresh);\n    print(\"boxsize      \",L);\n    print(\"tensor type: \", FunctionDefaults<6>::get_tensor_type());\n    print(\"\");\n\n\n    int error=0;\n    {\n        error+=test_projector<double,2>(world);\n        error+=test_projector<double,3>(world);\n        error+=test_projector<double,4>(world);\n\n        error+=test_projector_outer<double,2>(world);\n\n        if (HAVE_GENTENSOR) {\n            error+=test_Q12_projector<double,2>(world);\n            error+=test_Q12_projector<double,4>(world);\n//        error+=test_Q12_projector<double,6>(world);\n        }\n\n    }\n\n\n    world.gop.fence();\n    finalize();\n\n    return error;\n}\n\n"
  },
  {
    "path": "src/madness/chem/test_qc.cc",
    "content": "/*\n * test_qc.cc\n *\n *  Created on: Aug 13, 2019\n *      Author: fbischoff\n */\n\n\n#include <madness/mra/mra.h>\n#include<madness/chem/CalculationParameters.h>\n#include<madness/chem/SCF.h>\n#include<madness/world/test_utilities.h>\n\nusing namespace madness;\n\n\n/// helper class to set up a vector of possible values for a given key\n\n/// derived from the CalculationParameters class; parameters member variable is kept constant,\n/// the variations are kept in the parameter_variations variable.\nclass TestCalculationParameters : public CalculationParameters {\n\ttypedef std::map<std::string,std::vector<QCParameter> > ParameterVectorContainerT;\n\tParameterVectorContainerT parameter_variations;\n\npublic:\n\n\tTestCalculationParameters(const CalculationParameters& cp) : CalculationParameters(cp) {}\n\n\ttemplate<typename T>\n\tvoid extend_parameters(const std::string& key, std::vector<T> values) {\n\n\t\t// check if key exists at all\n\t\tQCParameter parameter=get_parameter(key);\n\t\tif (not check_type_silent<T>(parameter)) {\n\t\t\tthrow std::runtime_error(\"type error in set_user_defined_value\");\n\t\t}\n\n\t\t// set up the different values for this key\n\t\tstd::vector<QCParameter> parametervalues(values.size(),parameter);\n\t\tfor (std::size_t i=0; i<values.size(); i++) {\n\t\t\tparametervalues[i].set_user_defined_value(tostring(values[i]));\n\t\t}\n\t\tparameter_variations.insert(std::make_pair(key,parametervalues));\n\t}\n\n\tCalculationParameters copy_and_replace_key_in_parameters(const CalculationParameters& ref_parameters, const std::string& key, int index) const {\n\n\t\tstd::size_t size=parameter_variations.find(key)->second.size();\n\t\t                if ((size_t)index>size) throw std::runtime_error(\"asdf\");\n\t\tconst QCParameter p=parameter_variations.find(key)->second[index];\n\t\tCalculationParameters cp(ref_parameters);\n\t\tcp.get_parameter(key)=p;\n\t\treturn cp;\n\t}\n\n\tstd::size_t get_parameter_range(const std::string& key) const {\n\t\treturn parameter_variations.find(key)->second.size();\n\t}\n\n\tstd::vector<CalculationParameters> make_all_parameters_for_one_key(const std::string& key) const {\n\t\tstd::vector<CalculationParameters> vcp;\n\t\tfor (std::size_t i=0; i<get_parameter_range(key); ++i) {\n\t\t\tvcp.push_back(copy_and_replace_key_in_parameters(*this,key,i));\n\t\t}\n\t\treturn vcp;\n\t}\n\n\tstd::vector<CalculationParameters> make_all_parameters_for_two_keys(const std::string& key1, const std::string& key2) const {\n\t\tstd::vector<CalculationParameters> vcp;\n\t\tfor (std::size_t i=0; i<get_parameter_range(key1); ++i) {\n\t\t\tfor (std::size_t j=0; j<get_parameter_range(key2); ++j) {\n\t\t\t\tCalculationParameters cp1=copy_and_replace_key_in_parameters(*this,key1,i);\n\t\t\t\tvcp.push_back(copy_and_replace_key_in_parameters(cp1,key2,j));\n\t\t\t}\n\t\t}\n\t\treturn vcp;\n\t}\n\n\tstd::vector<CalculationParameters> make_all_parameter_singles() const {\n\t\tstd::vector<CalculationParameters> vcp;\n\t\tfor (auto pv : parameter_variations) {\n\t\t\tstd::string key=pv.first;\n\t\t\tmadness::print(\"make all single variations for\",key);\n\t\t\tauto vcp1=make_all_parameters_for_one_key(key);\n\t\t\tvcp.insert(vcp.end(),vcp1.begin(),vcp1.end());\n\t\t}\n\t\tmadness::print(\"made \",vcp.size(),\" singles permutations\");\n\t\treturn vcp;\n\t}\n\n\tstd::vector<CalculationParameters> make_all_parameter_doubles() const {\n\t\tstd::vector<CalculationParameters> vcp;\n\t\tfor (ParameterVectorContainerT::const_iterator pv1 = parameter_variations.begin(); pv1 != parameter_variations.end(); ++pv1) {\n\t\t\tfor (ParameterVectorContainerT::const_iterator pv2 = pv1; pv2 != parameter_variations.end(); ++pv2) {\n\t\t\t\tif (pv1==pv2) continue;\n\t\t\t\tstd::string key1=pv1->first;\n\t\t\t\tstd::string key2=pv2->first;\n\t\t\t\tmadness::print(\"make all double variations for keys \",key1, key2);\n\t\t\t\tauto vcp1=make_all_parameters_for_two_keys(key1,key2);\n\t\t\t\tvcp.insert(vcp.end(),vcp1.begin(),vcp1.end());\n\t\t\t}\n\t\t}\n\t\tmadness::print(\"made \",vcp.size(),\" doubles permutations\");\n\t\treturn vcp;\n\t}\n\n};\n\n\n\n/// will write a test input and remove it from disk upon destruction\nstruct write_test_input {\n\n\tdouble eprec=1.e-6;\n\n\tstd::string filename_;\n\twrite_test_input(const TestCalculationParameters& param, const std::string& mol=\"lih\") : filename_(\"test_input\") {\n\t\tstd::ofstream of(filename_);\n\t\tof << \"dft\\n\";\n\t\tof << param.print_to_string({\"defined\"});\n\t\tof << \"end\\n\";\n\n\t\tif (mol==\"lih\") {\n\t\t\tof << \"geometry\\n\";\n\t\t\tof << \"molecule\\n\";\n\t\t\tof << \"eprec \" << eprec << std::endl;\n\t\t\tof << \"Li 0.0    0.0 0.0\\n\";\n\t\t\tof << \"H  1.4375 0.0 0.0\\n\";\n\t\t\tof << \"end\\n\";\n\t\t} else if (mol==\"hf\") {\n\t\t\tdouble eprec=1.e-5;\n\t\t\tof << \"geometry\\n\";\n\t\t\tof << \"molecule\\n\";\n\t\t\tof << \"eprec \" << eprec << std::endl;\n\t\t\tof << \"F  0.1    0.0 0.2\\n\";\n\t\t\tof << \"H  1.4375 0.0 0.0\\n\";\n\t\t\tof << \"end\\n\";\n\t\t}\n\t\tof.close();\n\t}\n\n\t~write_test_input() {\n\t\tstd::remove(filename_.c_str());\n\t}\n\n\tstd::string filename() const {return filename_;}\n};\n\nint run_all_calculations(World& world, const std::vector<CalculationParameters>& all_parameters,\n\t\tbool test_result=false) {\n\tint success=0;\n\tint i=0;\n\tfor (auto cp : all_parameters) {\n\t\tprint(\"\\n\");\n\t\tprint_header2(\"run test \"+std::to_string(i));\n\t\ttest_output t(\"running test \"+std::to_string(i++));\n\t\tt.set_cout_to_terminal(); // cannot redirect to logger, will interfere with macrotaskq-redirections\n\n//\t\tprint(cp.print_to_string(true));\n\t\tprint(cp.print_to_string({\"defined\"}));\n\n\t\twrite_test_input test_input(cp,\"lih\");\n        commandlineparser parser;\n        parser.set_keyval(\"input\",test_input.filename());\n        SCF calc(world,parser);\n\t\tcalc.set_protocol<3>(world, 1e-4);\n\t\tMolecularEnergy ME(world, calc);\n\t\tdouble energy=ME.value(calc.molecule.get_all_coords().flat()); // ugh!\n\t\tprint(\"energy(LiH)\",energy);\n\t\tif (test_result) {\n\t\t\tdouble thresh=cp.econv();\n\t\t\tprint(\"energy, hard-wire, diff\",energy,7.703833,energy+7.703833e+00);\n\t\t\tif (std::abs(energy+7.703833e+00)>thresh) success+=1;\n\t\t}\n\t\tt.checkpoint(success==0, \"energy(LiH) is correct\");\n\t}\n\treturn success;\n}\n\nint main(int argc, char** argv) {\n\n\n    madness::World& world=madness::initialize(argc, argv);\n    startup(world,argc,argv);\n\n    int result=0;\n    bool small = true;\n    \n\n    // default set of parameters for closed shell\n    CalculationParameters cparam;\n    cparam.set_user_defined_value(\"print_level\",10);\n    cparam.set_user_defined_value(\"save\",false);\n\n    try {\n        // check for correct result\n    \t{\n    \t\tresult+=run_all_calculations(world, {cparam},true);\n    \t\tif (result>0) throw std::runtime_error(\"moldft returns incorrect result\");\n    \t}\n\n    \t// check for no error (run 1 iteration only)\n    \t{\n    \t\t// store the variations of the default set\n    \t\tTestCalculationParameters tparam(cparam);\n\t\t\ttparam.set_user_defined_value(\"maxiter\",1);\n\n\t\t\tif (small) {\n\t\t\t\ttparam.extend_parameters<double>(\"econv\",{1.e-4});\n\t\t\t\t//tparam.extend_parameters<bool>(\"derivatives\",{true}); // ,false\n\t\t\t\t//tparam.extend_parameters<int>(\"k\",{6});\n\t\t\t\t//tparam.extend_parameters<double>(\"l\",{25.0});\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttparam.extend_parameters<double>(\"econv\",{1.e-4,1.e-5}); // default and higher accuracy\n\t\t\t\ttparam.extend_parameters<std::string>(\"localize\",{\"canon\",\"boys\",\"new\"}); //\n\t\t\t\ttparam.extend_parameters<bool>(\"spin_restricted\",{false});\n\t\t\t\ttparam.extend_parameters<bool>(\"no_orient\",{true});\n\t\t\t\ttparam.extend_parameters<bool>(\"derivatives\",{true,false}); //\n\t\t\t\ttparam.extend_parameters<bool>(\"dipole\",{true});\n\t\t\t\ttparam.extend_parameters<std::string>(\"xc\",{\"hf\",\"lda\"}); //\n\t\t\t\ttparam.extend_parameters<int>(\"k\",{6});\n\t\t\t\ttparam.extend_parameters<double>(\"l\",{25.0});\n\t\t\t}\n\n\t\t\tstd::vector<CalculationParameters> all_singles=tparam.make_all_parameter_singles();\n\t\t\trun_all_calculations(world, all_singles);\n\t\t}\n\n\t\t// need to modify two parameters for this test\n\t\tif (! small)\n\t\t{\n\t\t\t// store the variations of the default set\n\t\t\tTestCalculationParameters tparam(cparam);\n\t\t\ttparam.set_user_defined_value(\"charge\",1.0);\n\t\t\ttparam.set_user_defined_value(\"nopen\",1);\n\t\t\trun_all_calculations(world, {tparam});\n    \t}\n    } catch (std::exception& e) {\n    \tprint(\"an error occurred, moldft tests failed\");\n    \tprint(e.what());\n    \tresult=1;\n    }\n\n\n//    std::vector<CalculationParameters> all_doubles=tparam.make_all_parameter_doubles();\n//    run_all_calculations(world, all_doubles);\n    madness::finalize();\n    return result;\n}\n"
  },
  {
    "path": "src/madness/chem/testlda.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n#include <madness/mra/mra.h>\n#include <madness/tensor/tensor.h>\n#include <fstream>\n#include \"xcfunctional.h\"\n\nusing namespace madness;\n\nstruct xcfunc_data_point\n{\n  double rhoa, rhob;\n  double sigmaaa, sigmaab, sigmabb;\n  double zk;\n  double vrhoa, vrhob;\n  double vsigmaaa, vsigmaab, vsigmabb;\n  double v2rhoa2, v2rhoab, v2rhob2;\n};\n\nvoid test_lda(World& world)\n{\n    XCfunctional xcfunc;\n    xcfunc.initialize(\"LDA RHOTOL 1e-12 RHOMIN 1e-12\", false, world);\n\n    /*\n\n      generated WITHOUT libxc\n\n100 -887.752 -5.88809\n10 -42.0542 -2.78016\n1 -2.01597 -1.32674\n0.1 -0.0981113 -0.64225\n0.01 -0.00485142 -0.316006\n0.001 -0.000242858 -0.157725\n0.0001 -1.22083e-05 -0.0793057\n1e-05 -6.10474e-07 -0.0397809\n1e-06 -3.01609e-08 -0.0197451\n1e-07 -1.46896e-09 -0.00966166\n1e-08 -7.06144e-11 -0.00466261\n1e-09 -3.35942e-12 -0.00222473\n1e-10 -1.58607e-13 -0.00105256\n1e-11 -7.44811e-15 -0.000494995\n1e-12 -3.48465e-16 -0.000231817\n1e-13 -1.38544e-16 -0.000184377\n1e-14 -1.38544e-16 -0.000184377\n1e-15 -1.38544e-16 -0.000184377\n\n     */\n\n    const long N = 18;\n    Tensor<double> rho(N);\n    double x = 100.0;\n    for (int i=0; i<18; i++) {\n        rho[i] = x;\n        x *= 0.1;\n    }\n\n    std::vector<Tensor<double>> t {rho};\n\n    Tensor<double> e = xcfunc.exc(t);\n    std::vector<Tensor<double>> v = xcfunc.vxc(t, 0);\n\n    for (int i=0; i<N; i++) {\n        print(rho[i], e[i], v[0][i]);\n    }\n}\n\nint main(int argc, char** argv) {\n    madness::initialize(argc, argv);\n\n    madness::World world(SafeMPI::COMM_WORLD);\n    world.gop.fence();\n\n    test_lda(world);\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/chem/testxc.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n#include <madness/mra/mra.h>\n#include <madness/tensor/tensor.h>\n#include <fstream>\n#include \"xcfunctional.h\"\n\nusing namespace madness;\n\nstatic std::string df_repo_functionals[] = {\n\"lda_x\", \n\"lda_c_vwn_rpa\", \n\"lda_c_vwn\", \n\"lda_c_pz\", \n\"lda_c_pw\", \n\"hyb_gga_xc_b3lyp\", \n\"gga_xc_hcth_93\", \n\"gga_xc_hcth_407\", \n\"gga_xc_hcth_147\", \n\"gga_xc_hcth_120\", \n\"gga_xc_edf1\", \n\"gga_xc_b97_2\", \n\"gga_xc_b97_1\", \n\"gga_xc_b97\", \n\"gga_x_pw91\", \n\"gga_x_pbe\", \n\"gga_x_ft97_b\", \n\"gga_x_b88\", \n\"gga_c_pw91\", \n\"gga_c_pbe\", \n\"gga_c_p86\", \n\"gga_c_lyp\"};\n\n\nstruct xcfunc_data_point\n{\n  double rhoa, rhob;\n  double sigmaaa, sigmaab, sigmabb;\n  double zk;\n  double vrhoa, vrhob;\n  double vsigmaaa, vsigmaab, vsigmabb;\n  double v2rhoa2, v2rhoab, v2rhob2;\n};\n\nstd::vector<xcfunc_data_point> read_test_data(const std::string& dfname,\n                                              bool spin_polarized)\n{\n  std::ifstream fstr(dfname.c_str());\n  char buffer[120];\n  fstr.getline(buffer, 120);\n  fstr.getline(buffer, 120);\n\n  std::string tmpstr;\n\n  std::vector<xcfunc_data_point> dps;\n  print(dfname.c_str());\n  int i=1;\n  while(!fstr.eof())\n  {\n    xcfunc_data_point dp;\n\n    fstr >> tmpstr; fstr >> dp.rhoa;\n    fstr >> tmpstr; fstr >> dp.rhob;\n    fstr >> tmpstr; fstr >> dp.sigmaaa;\n    fstr >> tmpstr; fstr >> dp.sigmaab;\n    fstr >> tmpstr; fstr >> dp.sigmabb;\n\n\n\n    fstr >> tmpstr; fstr >> tmpstr; fstr >> dp.zk;\n    fstr >> tmpstr; fstr >> tmpstr; fstr >> dp.vrhoa;\n    fstr >> tmpstr; fstr >> tmpstr; fstr >> dp.vrhob;\n    fstr >> tmpstr; fstr >> tmpstr; fstr >> dp.vsigmaaa;\n    fstr >> tmpstr; fstr >> tmpstr; fstr >> dp.vsigmaab;\n    fstr >> tmpstr; fstr >> tmpstr; fstr >> dp.vsigmabb;\n    fstr >> tmpstr; fstr >> tmpstr; fstr >> dp.v2rhoa2;\n    fstr >> tmpstr; fstr >> tmpstr; fstr >> dp.v2rhoab;\n    fstr >> tmpstr; fstr >> tmpstr; fstr >> dp.v2rhob2;\n\n\n    for (int iskip = 0; iskip < 13; iskip++)\n      fstr.getline(buffer,120);\n    if (!spin_polarized)\n    {\n      if (std::abs(dp.rhoa-dp.rhob) <= 1e-10)\n        dps.push_back(dp);\n    }\n    else\n    {\n      dps.push_back(dp);\n    }\n    i=i+1;\n    if(i == 26) break;\n  }\n\n  return dps;\n\n}\n\nvoid test_xcfunctional(World& world)\n{\n    bool spin_polarized ;\n    //spin_polarized = true;\n    spin_polarized = false;\n\n    int ispin = 0; //alpha=0 beta=1\n    int istr = 0;\n\n//vama5     0  \"lda_x\", \n//vama5     1\t\"lda_c_vwn_rpa\", \n//vama5     2\t\"lda_c_vwn\", \n//vama5     3\t\"lda_c_pz\", \n//vama5     4\t\"lda_c_pw\", \n//vama5     5\t\"hyb_gga_xc_b3lyp\", \n//vama5     6\t\"gga_xc_hcth_93\", \n//vama5     7\t\"gga_xc_hcth_407\", \n//vama5     8\t\"gga_xc_hcth_147\", \n//vama5     9\t\"gga_xc_hcth_120\", \n//vama5    10\t\"gga_xc_edf1\", \n//vama5    11\t\"gga_xc_b97_2\", \n//vama5    12\t\"gga_xc_b97_1\", \n//vama5    13\t\"gga_xc_b97\", \n//vama5    14\t\"gga_x_pw91\", \n//vama5    15\t\"gga_x_pbe\", \n\n//vama5    16\t\"gga_x_ft97_b\", \n//vama5    17\t\"gga_x_b88\", \n//vama5    18\t\"gga_c_pw91\", \n//vama5    19\t\"gga_c_pbe\", \n\n//vama5    20\t\"gga_c_p86\", \n//vama5    21\t\"gga_c_lyp\"};\n\n    XCfunctional xcfunc;\n    std::string xcfuncstr = df_repo_functionals[istr];\n    std::cout << \"Testing exchange-correlation functional:  \"<< xcfuncstr << std::endl;\n\n    xcfuncstr += \" 1.0\";\n    xcfunc.initialize(xcfuncstr,spin_polarized,world);\n\n    std::string fpath(\"df_repo/\");\n    fpath += df_repo_functionals[istr];\n    fpath += \".data\";\n    std::vector<xcfunc_data_point> dps = read_test_data(fpath.c_str(),spin_polarized);\n\n    print(\"hola\");\n    Tensor<double> rhoa_t((long)dps.size());\n    Tensor<double> rhob_t((long)dps.size());\n    Tensor<double> sigmaaa_t((long)dps.size());\n    Tensor<double> sigmaab_t((long)dps.size());\n    Tensor<double> sigmabb_t((long)dps.size());\n    Tensor<double> zk_t((long)dps.size());\n    Tensor<double> vrhoa_t((long)dps.size());\n    Tensor<double> vrhob_t((long)dps.size());\n    Tensor<double> vsigmaaa_t((long)dps.size());\n    Tensor<double> vsigmaab_t((long)dps.size());\n    Tensor<double> vsigmabb_t((long)dps.size());\n\n    Tensor<double> rhoa1_t((long)dps.size());\n    Tensor<double> sigmaaa1_t((long)dps.size());\n\n    std::vector<Tensor<double> > xc_args;\n    for (unsigned int idp = 0; idp < dps.size(); idp++)\n    {\n      rhoa_t(idp) = dps[idp].rhoa;\n      rhob_t(idp) = dps[idp].rhob;\n\n      sigmaaa_t(idp) = dps[idp].sigmaaa;\n      sigmaab_t(idp) = dps[idp].sigmaab;\n      sigmabb_t(idp) = dps[idp].sigmabb;\n\n      zk_t(idp) = dps[idp].zk;\n\n      vrhoa_t(idp) = dps[idp].vrhoa;\n      vrhob_t(idp) = dps[idp].vrhob;\n\n\n      vsigmaaa_t(idp) = dps[idp].vsigmaaa;\n      vsigmaab_t(idp) = dps[idp].vsigmaab;\n      vsigmabb_t(idp) = dps[idp].vsigmabb;\n    }\n    if (spin_polarized)\n    {\n      xc_args.push_back(rhoa_t);\n      xc_args.push_back(rhob_t);\n      if (xcfunc.is_gga()) {\n        xc_args.push_back(sigmaaa_t);\n        xc_args.push_back(sigmaab_t);\n        xc_args.push_back(sigmabb_t);\n      }\n    }\n    else\n    {\n      xc_args.push_back(rhoa_t);\n      if (xcfunc.is_gga()) {\n         xc_args.push_back(sigmaaa_t);\n      }\n    }\n\n    print(\"xc_args_size\", xc_args.size());\n    print(\"ispin \", ispin);\n    print(\"spin polarized \", spin_polarized);\n//vama1  std::cout << \"Testing spin-polarized case: \" << std::endl << std::endl;\n\n    // xc local vr[0] and semilocal vr[1-3] potential\n    std::vector<Tensor<double> > vr =  xcfunc.vxc(xc_args,ispin);\n\n#if 0\n    print(\"\\n\");\n    if(what == 0)\n    print(\"rhoa \\t vr \\t read\\t comp   \\n\");\n    if(what == 1)\n    print(\"rhoa \\t vsigmaa \\t read\\t comp   \\n\");\n    if(what == 2)\n    print(\"rhoa \\t vsigmab \\t read\\t comp   \\n\");\n    if(what == 3)\n    print(\"rhoa \\t zk \\t read\\t comp   \\n\");\n    for (unsigned int idp = 0; idp < dps.size(); idp++)\n    {\n    if (spin_polarized)\n    {\n      if(what == 0)\n      printf(\"%25.12e %25.12e  %25.12e %25.12e  \\n\",\n          rhoa_t[idp], vrhoa_t[idp], dps[idp].vrhoa, vr[idp] );\n      if(what == 1)\n      printf(\"%i %25.12e %25.12e  %25.12e %25.12e  \\n\",\n          idp, rhoa_t[idp], vsigmaaa_t[idp], dps[idp].vsigmaaa, vr[idp]);\n      if(what == 2)\n      printf(\"%i %25.12e %25.12e  %25.12e %25.12e  \\n\",\n          idp, rhoa_t[idp], vsigmaab_t[idp], dps[idp].vsigmaab, vr[idp]);\n      if(what == 3) \n      printf(\"%25.12e %25.12e  %25.12e %25.12e  \\n\",\n          rhoa_t[idp], zk_t[idp], dps[idp].zk, vr[idp]);\n    }\n    else\n    {\n      if(what == 0)\n      printf(\"%25.12e %25.12e  %25.12e %25.12e  \\n\",\n          rhoa_t[idp], vrhoa_t[idp], dps[idp].vrhoa, vr[idp] );\n      if(what == 1)\n      printf(\"vsga %i %25.12e %25.12e  %25.12e %25.12e  \\n\",\n          idp, rhob_t[idp], vsigmaaa_t[idp], dps[idp].vsigmaaa, vr[idp]);\n        //  idp, rhob_t[idp], .5*(vsigmaaa_t[idp] + .5*vsigmaab_t[idp]), dps[idp].vsigmaaa, vr[idp]);\n      if(what == 2)\n       printf (\" \\n bad bad bad\\n \") ;\n      if(what ==3) \n      printf(\"%25.12e %25.12e  %25.12e %25.12e  \\n\",\n          rhoa_t[idp], zk_t[idp], dps[idp].zk, vr[idp]);\n    }\n    }\n    print(\"\\n\\n\");\n#endif\n\n    if (xcfunc.is_spin_polarized())\n    {\n        printf(\"%25s %25s %25s %25s %25s %25s %25s %25s\\n\",\"#rhoa\",\"rhob\",\"sigmaaa\",\"sigmaab\",\"sigmabb\",\"vrhoa (input)\",\"vr (output)\",\"vrhoa-vr\");\n        for (unsigned int idp = 0; idp < dps.size(); idp++)\n        {\n            printf(\"%25.12e %25.12e %25.12e %25.12e %25.12e %25.12e %25.12e %25.12e\\n\",\n                    rhoa_t[idp], rhob_t[idp], sigmaaa_t[idp], sigmaab_t[idp], sigmabb_t[idp],\n                    dps[idp].vrhoa, vr[0][idp],\n                    std::abs(dps[idp].vrhoa - vr[0][idp]));\n        }\n    }\n    else\n    {\n        printf(\"%25s %25s  %25s %25s   %25s\\n\",\"#rhoa\",\"sigmaaa\",\"vrhoa (input)\",\"vr (output)\",\"vrhoa-vr\");\n        for (unsigned int idp = 0; idp < dps.size(); idp++)\n        {\n            printf(\"%25.12e %25.12e  %25.12e %25.12e   %25.12e\\n\",\n                    rhoa_t[idp], sigmaaa_t[idp], dps[idp].vrhoa, vr[0][idp],\n                    std::abs(dps[idp].vrhoa - vr[0][idp]));\n        }\n    }\n    print(\"\\n\\n\");\n\n}\n\nint main(int argc, char** argv) {\n    madness::initialize(argc, argv);\n\n    madness::World world(SafeMPI::COMM_WORLD);\n    world.gop.fence();\n\n    test_xcfunctional(world);\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/chem/vibanal.cc",
    "content": "#include<madness/chem/vibanal.h>\n#include <madness/tensor/tensor_lapack.h>\n\nusing namespace madness;\n\n/// returns the vibrational frequencies\n\n/// @param[in]  hessian the hessian matrix (not mass-weighted)\n/// @param[out] normalmodes the normal modes\n/// @param[in]  project_tr whether to project out translation and rotation\n/// @param[in]  print_hessian   whether to print the hessian matrix\n/// @return the frequencies in atomic units\nTensor<double> compute_frequencies(const Molecule& molecule,\n                                   const Tensor<double>& hessian, Tensor<double>& normalmodes,\n                                   const bool project_tr, const bool print_hessian) {\n    \n    // compute mass-weighing matrices\n    Tensor<double> M=molecule.massweights();\n    Tensor<double> Minv(3*molecule.natom(),3*molecule.natom());\n    for (size_t i=0; i<3*molecule.natom(); ++i) Minv(i,i)=1.0/M(i,i);\n    \n    // mass-weight the hessian\n    Tensor<double> mwhessian=inner(M,inner(hessian,M));\n    \n    // remove translation and rotation\n    if (project_tr) remove_external_dof(mwhessian,molecule);\n    \n    if (print_hessian) {\n        if (project_tr) {\n            print(\"mass-weighted hessian with translation and rotation projected out\");\n        } else {\n            print(\"mass-weighted unprojected hessian\");\n        }\n        Tensor<double> mmhessian=inner(Minv,inner(mwhessian,Minv));\n        print(mwhessian);\n        print(\"mass-weighted unprojected hessian; mass-weighing undone\");\n        print(mmhessian);\n    }\n    \n    Tensor<double> freq;\n    syev(mwhessian,normalmodes,freq);\n    for (long i=0; i<freq.size(); ++i) {\n        if (freq(i)>0.0) freq(i)=sqrt(freq(i)); // real frequencies\n        else freq(i)=-sqrt(-freq(i));           // imaginary frequencies\n    }\n    return freq;\n}\n\n\nTensor<double> compute_reduced_mass(const Molecule& molecule, const Tensor<double>& normalmodes) {\n    \n    Tensor<double> M=molecule.massweights();\n    Tensor<double> D=projector_external_dof(molecule);\n    Tensor<double> L=copy(normalmodes);\n    Tensor<double> DL=inner(D,L);\n    Tensor<double> MDL=inner(M,DL);\n    Tensor<double> mu(3*molecule.natom());\n    \n    for (size_t i=0; i<3*molecule.natom(); ++i) {\n        double mu1=0.0;\n        for (size_t j=0; j<3*molecule.natom(); ++j) mu1+=MDL(j,i)*MDL(j,i);\n        if (mu1>1.e-14) mu(i)=1.0/(mu1*constants::atomic_mass_in_au);\n    }\n    return mu;\n}\n\n\n/// compute the projector to remove transl. and rot. degrees of freedom\n\n/// taken from http://www.gaussian.com/g_whitepap/vib.htm\n/// I don't really understand the concept behind the projectors, but it\n/// seems to work, and it is not written down explicitly anywhere.\n/// NOTE THE ERROR IN THE FORMULAS ON THE WEBPAGE !\nTensor<double> projector_external_dof(const Molecule& mol) {\n    \n    // compute the translation vectors\n    Tensor<double> transx(3*mol.natom());\n    Tensor<double> transy(3*mol.natom());\n    Tensor<double> transz(3*mol.natom());\n    for (size_t i=0; i<mol.natom(); ++i) {\n        transx[3*i  ]=sqrt(mol.get_atom(i).get_mass_in_au());\n        transy[3*i+1]=sqrt(mol.get_atom(i).get_mass_in_au());\n        transz[3*i+2]=sqrt(mol.get_atom(i).get_mass_in_au());\n    }\n    \n    // compute the rotation vectors\n    \n    // move the molecule to its center of mass and compute\n    // the moment of inertia tensor\n    Tensor<double> com=mol.center_of_mass();\n    Molecule mol2=mol;\n    mol2.translate(-1.0*com);\n    Tensor<double> I=mol2.moment_of_inertia();\n    I.scale(constants::atomic_mass_in_au);\n    \n    // diagonalize the moment of inertia\n    Tensor<double> v,e;\n    syev(I, v, e);  // v being the \"X\" tensor on the web site\n    v=transpose(v);\n    \n    //        Tensor<double> B(e.size());\n    //        for (long i=0; i<e.size(); ++i) B(i)=1.0/(2.0*e(i));\n    //        print(\"rotational constants in cm-1\");\n    //        print(constants::au2invcm*B);\n    \n    // rotation vectors\n    Tensor<double> rotx(3*mol.natom());\n    Tensor<double> roty(3*mol.natom());\n    Tensor<double> rotz(3*mol.natom());\n    \n    for (size_t iatom=0; iatom<mol.natom(); ++iatom) {\n        \n        // coordinates wrt the center of mass (\"R\" on the web site)\n        Tensor<double> coord(3);\n        coord(0l)=mol.get_atom(iatom).x-com(0l);\n        coord(1l)=mol.get_atom(iatom).y-com(1l);\n        coord(2l)=mol.get_atom(iatom).z-com(2l);\n        \n        // note the wrong formula on the Gaussian website:\n        // multiply with sqrt(mass), do not divide!\n        coord.scale(sqrt(mol.get_atom(iatom).get_mass_in_au()));\n        \n        // p is the dot product of R and X on the web site\n        Tensor<double> p=inner(coord,v);\n        \n        // Eq. (5)\n        rotx(3*iatom + 0)=p(1)*v(0,2)-p(2)*v(0,1);\n        rotx(3*iatom + 1)=p(1)*v(1,2)-p(2)*v(1,1);\n        rotx(3*iatom + 2)=p(1)*v(2,2)-p(2)*v(2,1);\n        \n        roty(3*iatom + 0)=p(2)*v(0,0)-p(0l)*v(0,2);\n        roty(3*iatom + 1)=p(2)*v(1,0)-p(0l)*v(1,2);\n        roty(3*iatom + 2)=p(2)*v(2,0)-p(0l)*v(2,2);\n        \n        rotz(3*iatom + 0)=p(0l)*v(0,1)-p(1)*v(0,0);\n        rotz(3*iatom + 1)=p(0l)*v(1,1)-p(1)*v(1,0);\n        rotz(3*iatom + 2)=p(0l)*v(2,1)-p(1)*v(2,0);\n        \n    }\n    \n    // move the translational and rotational vectors to a common tensor\n    Tensor<double> ext_dof(6,3*mol.natom());\n    ext_dof(0l,_)=transx;\n    ext_dof(1l,_)=transy;\n    ext_dof(2l,_)=transz;\n    ext_dof(3l,_)=rotx;\n    ext_dof(4l,_)=roty;\n    ext_dof(5l,_)=rotz;\n    \n    // normalize\n    for (int i=0; i<6; ++i) {\n        double norm=ext_dof(i,_).normf();\n        if (norm>1.e-14) ext_dof(i,_).scale(1.0/norm);\n        else ext_dof(i,_)=0.0;\n    }\n    \n    // compute overlap to orthonormalize the projectors\n    Tensor<double> ovlp=inner(ext_dof,ext_dof,1,1);\n    syev(ovlp,v,e);\n    ext_dof=inner(v,ext_dof,0,0);\n    \n    // normalize or remove the dof if necessary (e.g. linear molecules)\n    for (int i=0; i<6; ++i) {\n        if (e(i)<1.e-14) {\n            ext_dof(i,_).scale(0.0);      // take out this degree of freedom\n        } else {\n            ext_dof(i,_).scale(1.0/sqrt(e(i)));   // normalize\n        }\n    }\n    \n    // construct projector on the complement of the rotations\n    Tensor<double> projector(3*mol.natom(),3*mol.natom());\n    for (size_t i=0; i<3*mol.natom(); ++i) projector(i,i)=1.0;\n    \n    // compute the outer products of the projectors\n    // 1- \\sum_i | t_i >< t_i |\n    projector-=inner(ext_dof,ext_dof,0,0);\n    \n    // construct random tensor for orthogonalization\n    Tensor<double> D(3*mol.natom(),3*mol.natom());\n    D.fillrandom();\n    for (int i=0; i<6; ++i) D(i,_)=ext_dof(i,_);\n    \n    // this works only for non-linear molecules -- projector seems simpler\n    //        ovlp=inner(D,D,1,1);\n    //        cholesky(ovlp); // destroys ovlp\n    //        Tensor<double> L=transpose(ovlp);\n    //        Tensor<double> Linv=inverse(L);\n    //        D=inner(Linv,D,1,0);\n    //        ovlp=inner(D,D,1,1);\n    //\n    //        for (int i=0; i<6; ++i) D(i,_)=0.0;\n    //        D=copy(D(Slice(6,8),_));\n    \n    //        return transpose(D);\n    \n    return projector;\n    \n}\n\n/// remove translational degrees of freedom from the hessian\nvoid remove_external_dof(Tensor<double>& hessian,\n                                const Molecule& mol) {\n    \n    // compute the translation of the center of mass\n    Tensor<double> projector_ext=projector_external_dof(mol);\n    \n    // this is P^T * H * P\n    hessian=inner(projector_ext,inner(hessian,projector_ext),0,0);\n}\n"
  },
  {
    "path": "src/madness/chem/vibanal.h",
    "content": "#ifndef MADNESS_VIBANAL_INCLUDED\n#define MADNESS_VIBANAL_INCLUDED\n\n#include <madness/tensor/tensor.h>\n#include<madness/chem/molecule.h>\n\nmadness::Tensor<double> compute_frequencies(const madness::Molecule& molecule,\n                                            const madness::Tensor<double>& hessian, madness::Tensor<double>& normalmodes,\n                                            const bool project_tr=true, const bool print_hessian=false);\n\n\nmadness::Tensor<double> compute_reduced_mass(const madness::Molecule& molecule, const madness::Tensor<double>& normalmodes);\n\n\nmadness::Tensor<double> projector_external_dof(const madness::Molecule& mol);\n\n\nvoid remove_external_dof(madness::Tensor<double>& hessian, const madness::Molecule& mol);\n\n#endif //  MADNESS_VIBANAL_INCLUDED\n\n\n\n \n"
  },
  {
    "path": "src/madness/chem/write_test_input.h",
    "content": "//\n// Created by Florian Bischoff on 5/27/21.\n//\n\n#ifndef MADNESS_WRITE_TEST_INPUT_H\n#define MADNESS_WRITE_TEST_INPUT_H\n\n#include<madness/chem/CalculationParameters.h>\n\nnamespace madness {\n\n/// will write a test input and remove it from disk upon destruction\nstruct write_test_input {\n\n    double eprec = 1.e-3; // was 1e-4 ... trying to make test faster\n\n    std::string filename_;\n    bool keepfile=false;\n\n    write_test_input() : filename_(\"testinput\") {}\n\n    write_test_input(const CalculationParameters& param, const std::string& mol = \"lih\") : filename_(\"test_mo_input\") {\n        std::ofstream of(filename_);\n        write_to_test_input(\"dft\", &param, of);\n        write_molecule_to_test_input(mol, of);\n        of.close();\n    }\n\n    ~write_test_input() {\n        if (not keepfile) std::remove(filename_.c_str());\n    }\n\n    std::string filename() const { return filename_; }\n\n    static std::ostream&\n    write_to_test_input(const std::string groupname, const QCCalculationParametersBase *param, std::ostream& of) {\n        of << groupname << endl;\n        of << param->print_to_string({\"defined\"});\n        of << \"end\\n\";\n        return of;\n    }\n\n    static std::ostream& write_molecule_to_test_input(std::string mol, std::ostream& of) {\n        if (mol == \"lih\") {\n            of << \"geometry\\n\";\n            of << \"no_orient true\\n\";\n            of << \"molecule \\n\";\n            of << \"Li 0.0    0.0 0.0\\n\";\n            of << \"H  1.4375 0.0 0.0\\n\";\n            of << \"end\\n\";\n            of << \"end\\n\";\n        } else if (mol == \"hf\") {\n            //double eprec=1.e-5; // trying to make test faster\n            of << \"geometry\\n\";\n            of << \"no_orient true\\n\";\n            of << \"molecule \\n\";\n            of << \"F  0.1    0.0 0.2\\n\";\n            of << \"H  1.4375 0.0 0.0\\n\";\n            of << \"end\\n\";\n            of << \"end\\n\";\n        }\n        return of;\n    }\n\n};\n\n} // namespace madness\n\n\n#endif //MADNESS_WRITE_TEST_INPUT_H\n"
  },
  {
    "path": "src/madness/chem/xcfunctional.h",
    "content": "#ifndef MADNESS_CHEM_XCFUNCTIONAL_H__INCLUDED\n#define MADNESS_CHEM_XCFUNCTIONAL_H__INCLUDED\n\n#include <madness/madness_config.h>\n\nMADNESS_PRAGMA_GCC(diagnostic push)\nMADNESS_PRAGMA_GCC(diagnostic ignored \"-Wcomment\")\nMADNESS_PRAGMA_CLANG(diagnostic push)\nMADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wcomment\")\n\n/// \\file moldft/xcfunctional.h\n/// \\brief Defines interface for DFT XC functionals\n/// \\ingroup chemistry\n\n#include <madness/tensor/tensor.h>\n#include <vector>\n#include <algorithm>\n#include <utility>\n#include <madness/mra/key.h>\n#include <madness/world/MADworld.h>\n#include <madness/mra/function_common_data.h>\n\n#ifdef MADNESS_HAS_LIBXC\n#include <xc.h>\n#endif\n\nnamespace madness {\n/// Compute the spin-restricted LDA potential using unaryop (only for the initial guess)\nstruct xc_lda_potential {\n    xc_lda_potential() {}\n\n    void operator()(const Key<3> & key, Tensor<double>& t) const\n    {\n        int x_rks_s__(const double *r__, double *f, double * dfdra);\n        int c_rks_vwn5__(const double *r__, double *f, double * dfdra);\n        double* rho = t.ptr();\n        for (int i=0; i<t.size(); i++) {\n            double r = std::max(rho[i],1e-12);\n            double q, dq1, dq2;\n            x_rks_s__(&r, &q, &dq1);\n            c_rks_vwn5__(&r, &q, &dq2);\n            rho[i] = dq1 + dq2;\n        }\n    }\n};\n\n/// Simplified interface to XC functionals\nclass XCfunctional {\npublic:\n\n    /// The ordering of the intermediates is fixed, but the code can handle\n    /// non-initialized functions, so if e.g. no GGA is requested, all the\n    /// corresponding vector components may be left empty.\n    ///\n    /// Note the additional quantities \\f$ \\zeta \\f$ and \\f$ \\chi \\f$, which are defined as\n    /// \\f[\n    /// \\rho = \\exp(\\zeta)\n    /// \\f]\n    /// and thus the derivative of rho is given by\n    /// \\f[\n    /// \\nabla_x\\rho = \\exp(\\zeta)\\nabla_x\\zeta = \\rho \\nabla_x\\zeta\n    /// \\f]\n    /// The reduced gradients \\sigma may then be expressed as\n    /// \\f[\n    ///   \\sigma = |\\nabla\\rho|^2 = |\\rho|^2 |\\nabla\\zeta|^2 = |\\rho|^2 \\chi\n    /// \\f]\n    enum xc_arg {\n        enum_rhoa=0,            ///< alpha density \\f$ \\rho_\\alpha \\f$\n        enum_rhob=1,            ///< beta density \\f$ \\rho_\\beta \\f$\n        enum_rho_pt=2,          ///< perturbed density (CPHF, TDKS) \\f$ \\rho_{pt} \\f$\n        enum_saa=10,            ///< \\f$ \\sigma_{aa} = \\nabla \\rho_{\\alpha}.\\nabla \\rho_{\\alpha} \\f$\n        enum_sab=11,            ///< \\f$ \\sigma_{ab} = \\nabla \\rho_{\\alpha}.\\nabla \\rho_{\\beta} \\f$\n        enum_sbb=12,            ///< \\f$ \\sigma_{bb} = \\nabla \\rho_{\\beta}.\\nabla \\rho_{\\beta} \\f$\n        enum_sigtot=13,         ///< \\f$ \\sigma = \\nabla \\rho.\\nabla \\rho \\f$\n        enum_sigma_pta_div_rho=14,      ///< \\f$ \\zeta_{\\alpha}.\\nabla\\rho_{pt} \\f$\n        enum_sigma_ptb_div_rho=15,      ///< \\f$ \\zeta_{\\beta}.\\nabla\\rho_{pt} \\f$\n        enum_zetaa_x=16,        ///< \\f$ \\zeta_{a,x}=\\partial/{\\partial x} \\ln(\\rho_a)  \\f$\n        enum_zetaa_y=17,        ///< \\f$ \\zeta_{a,y}=\\partial/{\\partial y} \\ln(\\rho_a)  \\f$\n        enum_zetaa_z=18,        ///< \\f$ \\zeta_{a,z}=\\partial/{\\partial z} \\ln(\\rho_a)  \\f$\n        enum_zetab_x=19,        ///< \\f$ \\zeta_{b,x} = \\partial/{\\partial x} \\ln(\\rho_b)  \\f$\n        enum_zetab_y=20,        ///< \\f$ \\zeta_{b,y} = \\partial/{\\partial y} \\ln(\\rho_b)  \\f$\n        enum_zetab_z=21,        ///< \\f$ \\zeta_{b,z} = \\partial/{\\partial z} \\ln(\\rho_b)  \\f$\n        enum_chi_aa=22,         ///< \\f$ \\chi_{aa} = \\nabla \\zeta_{\\alpha}.\\nabla \\zeta_{\\alpha} \\f$\n        enum_chi_ab=23,         ///< \\f$ \\chi_{ab} = \\nabla \\zeta_{\\alpha}.\\nabla \\zeta_{\\beta} \\f$\n        enum_chi_bb=24,         ///< \\f$ \\chi_{bb} = \\nabla \\zeta_{\\beta}.\\nabla \\zeta_{\\beta} \\f$\n        enum_ddens_ptx=25,      ///< \\f$ \\nabla\\rho_{pt}\\f$\n        enum_ddens_pty=26,      ///< \\f$ \\nabla\\rho_{pt}\\f$\n        enum_ddens_ptz=27       ///< \\f$ \\nabla\\rho_{pt}\\f$\n    };\n    const static int number_xc_args=28;     ///< max number of intermediates\n\n    /// return the munging threshold for the density\n    double get_rhotol() const {return rhotol;}\n\n    /// return the binary munging threshold for the final result in the GGA potential/kernel\n\n    /// the GGA potential will be munged based on the smallness of the original\n    /// density, which we call binary munging\n    double get_ggatol() const {return ggatol;}\n\nprotected:\n\n    bool spin_polarized;        ///< True if the functional is spin polarized\n    double hf_coeff;            ///< Factor multiplying HF exchange (+1.0 gives HF)\n    double rhomin, rhotol;      ///< See initialize and munge*\n    double ggatol;              ///< See initialize and munge*\n\n#ifdef MADNESS_HAS_LIBXC\n    std::vector< std::pair<xc_func_type*,double> > funcs;\n#endif\n\n    /// convert the raw density (gradient) data to be used by the xc operators\n\n    /// Involves mainly munging of the densities and multiplying with 2\n    /// if the calculation is spin-restricted.\n    /// Response densities and density gradients are munged based on the\n    /// value of the ground state density, since they may become negative\n    /// and may also be much more diffuse.\n    /// dimensions of the output tensors are for spin-restricted and unrestricted\n    /// (with np the number of grid points in the box):\n    /// rho(np) or rho(2*np)\n    /// sigma(np) sigma(3*np)\n    /// rho_pt(np)\n    /// sigma_pt(2*np)\n    /// @param[in]  t       input density (gradients)\n    /// @param[out] rho     ground state (spin) density, properly munged\n    /// @param[out] sigma   ground state (spin) density gradients, properly munged\n    /// @param[out] rho_pt  response density, properly munged (no spin)\n    /// @param[out] sigma_pt  response (spin) density gradients, properly munged\n    /// @param[out] drho    density derivative, constructed from rho and zeta\n    /// @param[out] drho_pt response density derivative directly from xc_args\n    /// @param[in]  need_response   flag if rho_pt and sigma_pt need to be calculated\n    void make_libxc_args(const std::vector< madness::Tensor<double> >& t,\n                         madness::Tensor<double>& rho,\n                         madness::Tensor<double>& sigma,\n                         madness::Tensor<double>& rho_pt,\n                         madness::Tensor<double>& sigma_pt,\n                         std::vector<madness::Tensor<double> >& drho,\n                         std::vector<madness::Tensor<double> >& drho_pt,\n                         const bool need_response) const;\n\n    /// the number of xc kernel derivatives (lda: 0, gga: 1, etc)\n    int nderiv;\n\n\n    /// Smoothly switches between constant (x<xmin) and linear function (x>xmax)\n\n    /// \\f[\n    /// f(x,x_{\\mathrm{min}},x_{\\mathrm{max}}) = \\left\\{\n    ///   \\begin{array}{ll}\n    ///     x_{\\mathrm{min}}                       & x < x_{\\mathrm{min}} \\\\\n    ///     p(x,x_{\\mathrm{min}},x_{\\mathrm{max}}) & x_{\\mathrm{min}} \\leq x_{\\mathrm{max}} \\\\\n    ///     x                                      & x_{\\mathrm{max}} < x\n    ///   \\end{array}\n    /// \\right.\n    /// \\f]\n    /// where \\f$p(x)\\f$ is the unique quintic polynomial that\n    /// satisfies \\f$p(x_{min})=x_{min}\\f$, \\f$p(x_{max})=x_{max}\\f$,\n    /// \\f$dp(x_{max})/dx=1\\f$, and\n    /// \\f$dp(x_{min})/dx=d^2p(x_{min})/dx^2=d^2p(x_{max})/dx^2=0\\f$.\n    static void polyn(const double x, double& p, double& dpdx) {\n        // All of the static const stuff is evaluated at compile time\n\n        static const double xmin = 1.e-6; // <<<< MINIMUM VALUE OF DENSITY\n        static const double xmax = 5.e-5;  // <<<< DENSITY SMOOTHLY MODIFIED BELOW THIS VALUE\n\n        static const double xmax2 = xmax*xmax;\n        static const double xmax3 = xmax2*xmax;\n        static const double xmin2 = xmin*xmin;\n        static const double xmin3 = xmin2*xmin;\n        static const double r = 1.0/((xmax-xmin)*(-xmin3+(3.0*xmin2+(-3.0*xmin+xmax)*xmax)*xmax));\n        static const double a0 = xmax3*xmin*(xmax-4.0*xmin)*r;\n        static const double a = xmin2*(xmin2+(-4.0*xmin+18.0*xmax)*xmax)*r;\n        static const double b = -6.0*xmin*xmax*(3.0*xmax+2.0*xmin)*r;\n        static const double c = (4.0*xmin2+(20.0*xmin+6.0*xmax)*xmax)*r;\n        static const double d = -(8.0*xmax+7.0*xmin)*r;\n        static const double e = 3.0*r;\n\n        if (x > xmax) {\n            p = x;\n            dpdx = 1.0;\n        }\n        else if (x < xmin) {\n            p = xmin;\n            dpdx = 0.0;\n        }\n        else {\n            p = a0+(a+(b+(c+(d+e*x)*x)*x)*x)*x;\n            dpdx = a+(2.0*b+(3.0*c+(4.0*d+5.0*e*x)*x)*x)*x;\n        }\n    }\npublic:\n    static double munge_old(double rho) {\n        double p, dpdx;\n        polyn(rho, p, dpdx);\n        return p;\n    }\n\nprivate:\n\n    /// simple munging for the density only (LDA)\n    double munge(double rho) const {\n    \tif (rho <= rhotol) rho=rhomin;\n        return rho;\n    }\n\n    /// munge rho if refrho is small\n\n    /// special case for perturbed densities, which might be negative and diffuse.\n    /// Munge rho (e.g. the perturbed density) if the reference density refrho\n    /// e.g. the ground state density is small. Only where the reference density\n    /// is large enough DFT is numerically well-defined.\n    /// @param[in]  rho     number to be munged\n    /// @param[in]  refrho  reference value for munging\n    /// @param[in]  thresh  threshold for munging\n    double binary_munge(double rho, double refrho, const double thresh) const {\n        if (refrho<thresh) rho=rhomin;\n        return rho;\n    }\n\npublic:\n    /// Default constructor is required\n    XCfunctional();\n\n    /// Initialize the object from the user input data\n\n    /// @param[in] input_line User input line (without beginning XC keyword)\n    /// @param[in] polarized Boolean flag indicating if the calculation is spin-polarized\n    void initialize(const std::string& input_line, bool polarized, World& world,\n            const bool verbose=false);\n\n    /// Destructor\n    ~XCfunctional();\n\n    /// Returns true if the potential is lda\n    bool is_lda() const;\n\n    /// Returns true if the potential is gga (needs first derivatives)\n    bool is_gga() const;\n\n    /// Returns true if the potential is meta gga (needs second derivatives ... not yet supported)\n    bool is_meta() const;\n\n    /// Returns true if there is a DFT functional (false probably means Hatree-Fock exchange only)\n    bool is_dft() const;\n\n    /// Returns true if the functional is spin_polarized\n    bool is_spin_polarized() const\n    {\n        return spin_polarized;\n    }\n\n    /// Returns true if the second derivative of the functional is available (not yet supported)\n    bool has_fxc() const;\n\n    /// Returns true if the third derivative of the functional is available (not yet supported)\n    bool has_kxc() const;\n\n    /// Returns the value of the hf exact exchange coefficient\n    double hf_exchange_coefficient() const\n    {\n        return hf_coeff;\n    }\n\n    /// Computes the energy functional at given points\n\n    /// This uses the convention that the total energy is\n    /// \\f$ E[\\rho] = \\int \\epsilon[\\rho(x)] dx\\f$\n    /// Any HF exchange contribution must be separately computed. Items in the\n    /// vector argument \\c t are interpreted similarly to the xc_arg enum.\n    /// @param[in] t The input densities and derivatives as required by the functional\n    /// @return The exchange-correlation energy functional\n    madness::Tensor<double> exc(const std::vector< madness::Tensor<double> >& t) const;\n\n    /// Computes components of the potential (derivative of the energy functional) at np points\n\n    /// Any HF exchange contribution must be separately computed. Items in the\n    /// vector argument \\c t are interpreted similarly to the xc_arg enum.\n    ///\n    /// We define \\f$ \\sigma_{\\mu \\nu} = \\nabla \\rho_{\\mu} . \\nabla \\rho_{\\nu} \\f$\n    /// with \\f$ \\mu, \\nu = \\alpha\\f$ or \\f$ \\beta \\f$.\n    ///\n    /// For unpolarized GGA, matrix elements of the potential are\n    /// \\f[\n    ///   < \\phi | \\hat V | \\psi > = \\int \\left( \\frac{\\partial \\epsilon}{\\partial \\rho} \\phi \\psi\n    ///                  +  \\left( 2 \\frac{\\partial \\epsilon}{\\partial \\sigma} \\right)\n    ///                  \\nabla \\rho \\cdot \\nabla \\left( \\phi \\psi \\right) \\right) dx\n    /// \\f]\n    ///\n    /// For polarized GGA, matrix elements of the potential are\n    /// \\f[\n    ///   < \\phi_{\\alpha} | \\hat V | \\psi_{\\alpha} > = \\int \\left( \\frac{\\partial \\epsilon}{\\partial \\rho_{\\alpha}} \\phi \\psi\n    ///            +  \\left( 2 \\frac{\\partial \\epsilon}{\\partial \\sigma_{\\alpha \\alpha}} \\nabla \\rho_{\\alpha}\n    ///            + \\frac{\\partial \\epsilon}{\\partial \\sigma_{\\alpha \\beta}} \\nabla \\rho_{\\beta}  \\right) . \\nabla \\left( \\phi \\psi \\right) \\right) dx\n    /// \\f]\n    ///\n    /// Integrating the above by parts and assuming free-space or periodic boundary conditions\n    /// we obtain that the local multiplicative form of the GGA potential is\n    /// \\f[\n    ///    V_{\\alpha} =  \\frac{\\partial \\epsilon}{\\partial \\rho_{\\alpha}}\n    ///                  - \\left(\\nabla . \\left(2 \\frac{\\partial \\epsilon}{\\partial \\sigma_{\\alpha \\alpha}} \\nabla \\rho_{\\alpha}\n    ///                  + \\frac{\\partial \\epsilon}{\\partial \\sigma_{\\alpha \\beta}} \\nabla \\rho_{\\beta}  \\right)  \\right)\n    /// \\f]\n    ///\n    /// Return the following quantities for RHF: (see Yanai2005, Eq. (12))\n    /// \\f{eqnarray*}{\n    ///     \\mbox{result[0]}    &:& \\qquad \\frac{\\partial \\epsilon}{\\partial \\rho} \\\\\n    ///     \\mbox{result[1-3]}  &:& \\qquad 2 \\rho \\frac{\\partial \\epsilon}{\\partial \\sigma} \\nabla\\rho\n    /// \\f}\n    /// and for UHF same-spin and other-spin quantities\n    /// \\f{eqnarray*}{\n    ///     \\mbox{result[0]}    &:& \\qquad \\frac{\\partial \\epsilon}{\\partial \\rho_{\\alpha}} \\\\\n    ///     \\mbox{result[1-3]}  &:& \\qquad \\rho_\\alpha \\frac{\\partial \\epsilon}{\\partial \\sigma_{\\alpha \\alpha}} \\nabla\\rho_\\alpha\\\\\n    ///     \\mbox{result[4-6]}  &:& \\qquad \\rho_\\alpha \\frac{\\partial \\epsilon}{\\partial \\sigma_{\\alpha \\beta}} \\nabla\\rho_\\beta\n    /// \\f}\n    /// @param[in] t The input densities and derivatives as required by the functional\n    /// @param[in] ispin Specifies which component of the potential is to be computed as described above\n    /// @return the requested quantity, based on ispin (0: same spin, 1: other spin)\n    std::vector<madness::Tensor<double> > vxc(const std::vector< madness::Tensor<double> >& t,\n            const int ispin) const;\n\n\n    /// compute the second derivative of the XC energy wrt the density and apply\n\n    /// Return the following quantities (RHF only) (see Yanai2005, Eq. (13))\n    /// \\f{eqnarray*}{\n    ///     \\mbox{result[0]}    &:& \\qquad \\frac{\\partial^2 \\epsilon}{\\partial \\rho^2} \\rho_\\mathrm{pt}\n    ///                             + 2.0 * \\frac{\\partial^2 \\epsilon}{\\partial \\rho\\partial\\sigma}\\sigma_\\mathrm{pt}\\\\\n    ///     \\mbox{result[1-3]}  &:& \\qquad 2.0 * \\frac{\\partial\\epsilon}{\\partial\\sigma}\\nabla\\rho_\\mathrm{pt}\n    ///                             + 2.0 * \\frac{\\partial^2\\epsilon}{\\partial\\rho\\partial\\sigma} \\rho_\\mathrm{pt}\\nabla\\rho\n    ///                             + 4.0 * \\frac{\\partial^2\\epsilon}{\\partial^2\\sigma} \\sigma_\\mathrm{pt}\\nabla\\rho\n    /// \\f}\n    /// @param[in]  t   The input densities and derivatives as required by the functional,\n    ///                 as in the xc_arg enum\n    /// @param[in]  ispin not referenced since only RHF is implemented, always 0\n    /// @return a vector of Functions containing the contributions to the kernel apply\n    std::vector<madness::Tensor<double> > fxc_apply(\n            const std::vector< madness::Tensor<double> >& t, const int ispin) const;\n\n\n    /// Crude function to plot the energy and potential functionals\n    void plot() const {\n        long npt = 1001;\n        double lo=1e-6, hi=1e+1, s=std::pow(hi/lo, 1.0/(npt-1));\n\n        madness::Tensor<double> rho(npt);\n        for (int i=0; i<npt; i++) {\n            rho[i] = lo;\n            lo *= s;\n        }\n        std::vector< madness::Tensor<double> > t(13);\n        t[enum_rhoa]=(rho);\n        if (is_spin_polarized()) t[enum_rhob]=(rho);\n//        if (is_gga()) t[enum_saa]=madness::Tensor<double>(npt); // sigma_aa=0\n        if (is_gga()) t[enum_saa]=0.5*rho; // sigma_aa=0\n        madness::Tensor<double> f  = exc(t); //pending UGHHHHH\n        std::vector<madness::Tensor<double> > va = vxc(t,0);\n        for (long i=0; i<npt; i++) {\n            printf(\"%.3e %.3e %.3e\\n\", rho[i], f[i], va[0][i]);\n        }\n    }\n};\n\n/// Class to compute the energy functional\nstruct xc_functional {\n    const XCfunctional* xc;\n\n    xc_functional(const XCfunctional& xc) : xc(&xc) {}\n\n    madness::Tensor<double> operator()(const madness::Key<3> & key,\n            const std::vector< madness::Tensor<double> >& t) const {\n        MADNESS_ASSERT(xc);\n        return xc->exc(t);\n    }\n};\n\n\n/// Class to compute terms of the potential\nstruct xc_potential {\n    const XCfunctional* xc;\n    const int ispin;\n\n    xc_potential(const XCfunctional& xc, int ispin) : xc(&xc), ispin(ispin)\n    {}\n\n    std::size_t get_result_size() const {\n        // local terms, same spin\n        if (xc->is_lda()) return 1;\n        // local terms,  3x semilocal terms (x,y,z)\n        if (xc->is_gga() and (not xc->is_spin_polarized())) return 4;\n        // local terms,  3x semilocal terms (x,y,z) for same spin and opposite spin\n        if (xc->is_gga() and (xc->is_spin_polarized())) return 7;\n\n        MADNESS_EXCEPTION(\"only lda and gga in xc_potential_multi\",1);\n        return 0;\n    }\n\n    std::vector<madness::Tensor<double> > operator()(const madness::Key<3> & key,\n            const std::vector< madness::Tensor<double> >& t) const {\n        MADNESS_ASSERT(xc);\n        std::vector<madness::Tensor<double> > r = xc->vxc(t, ispin);\n        return r;\n    }\n};\n\n\n/// Class to compute terms of the kernel\nstruct xc_kernel_apply {\n    const XCfunctional* xc;\n    const int ispin;\n    const FunctionCommonData<double,3>& cdata;\n\n    xc_kernel_apply(const XCfunctional& xc, int ispin) : xc(&xc), ispin(ispin),\n          cdata(FunctionCommonData<double,3>::get(FunctionDefaults<3>::get_k())) {\n        MADNESS_ASSERT(ispin==0);   // closed shell only!\n    }\n\n    std::size_t get_result_size() const {\n        // all spin-restricted\n        if (xc->is_gga()) return 4; // local terms,  3x semilocal terms (x,y,z)\n        return 1;   // local terms only\n    }\n\n    std::vector<madness::Tensor<double> > operator()(const madness::Key<3> & key,\n            const std::vector< madness::Tensor<double> >& t) const {\n        MADNESS_ASSERT(xc);\n        std::vector<madness::Tensor<double> > r = xc->fxc_apply(t, ispin);\n        return r;\n    }\n};\n\n}\n\nMADNESS_PRAGMA_CLANG(diagnostic pop)\nMADNESS_PRAGMA_GCC(diagnostic pop)\n\n#endif\n"
  },
  {
    "path": "src/madness/chem/xcfunctional_ldaonly.cc",
    "content": "#include <madness/madness_config.h>\n\n#ifndef MADNESS_HAS_LIBXC\n\n#include<madness/chem/xcfunctional.h>\n#include <madness/tensor/tensor.h>\n#include <sstream>\n#include <cmath>\n#include <madness/world/MADworld.h>\n\nnamespace madness {\n\n\nint x_rks_s__(const double *r__, double *f, double * dfdra);\nint c_rks_vwn5__(const double *r__, double *f, double * dfdra);\nint x_uks_s__(double *ra, double *rb, double *f, double *dfdra, double *dfdrb);\nint c_uks_vwn5__(double *ra, double *rb, double *f, double *dfdra, double *dfdrb);\n\nXCfunctional::XCfunctional() : hf_coeff(0.0) {\n    rhotol=1e-7; rhomin=1e-12; // default values\n}\n\nvoid XCfunctional::initialize(const std::string& input_line, bool polarized,\n        World& world, bool verbose) {\n    rhotol=1e-7; rhomin=1e-12; // default values\n\n    spin_polarized = polarized;\n\n    std::stringstream s(input_line);\n    std::string token;\n    bool found_valid_token = false;\n    while (s >> token) {\n        std::transform(token.begin(), token.end(), token.begin(), ::toupper);\n        if (token == \"LDA\") {\n            hf_coeff = 0.0;\n            found_valid_token = true;\n        }\n        else if (token == \"RHOMIN\") {\n            s >> rhomin;\n        }\n        else if (token == \"RHOTOL\") {\n            s >> rhotol;\n        }\n        else if (token == \"HF\") {\n            hf_coeff = 1.0;\n            found_valid_token = true;\n        }\n    }\n    if (not found_valid_token)\n        throw \"XCfunctional(ldaonly)::initialize() -- did not find a valid XC functional\";\n}\n\nXCfunctional::~XCfunctional() {}\n\nbool XCfunctional::is_lda() const {\n    return (hf_coeff == 0.0);\n}\n\nbool XCfunctional::is_gga() const {\n    return false;\n}\n\nbool XCfunctional::is_meta() const {\n    return false;\n}\n\nbool XCfunctional::is_dft() const {\n    return (is_lda() || is_gga() || is_meta());\n}\n\nbool XCfunctional::has_fxc() const\n{\n    return false;\n}\n\nbool XCfunctional::has_kxc() const\n{\n    return false;\n}\n\nmadness::Tensor<double> XCfunctional::exc(const std::vector< madness::Tensor<double> >& t) const\n{\n    const double* arho = t[0].ptr();\n    madness::Tensor<double> result(3L, t[0].dims(), false);\n    double* f = result.ptr();\n    MADNESS_PRAGMA_CLANG(diagnostic push)\n    MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wtautological-constant-compare\")\n    auto isnan = [](double v) { return std::isnan(v); };\n    MADNESS_PRAGMA_CLANG(diagnostic pop)\n    if (spin_polarized) {\n        const double* brho = t[1].ptr();\n        for (unsigned int i=0; i<result.size(); i++) {\n            double ra = munge(arho[i]);\n            double rb = munge(brho[i]);\n            double xf, cf, xdfdr[2], cdfdr[2];\n\n            x_uks_s__(&ra, &rb, &xf, xdfdr, xdfdr+1);\n            c_uks_vwn5__(&ra, &rb, &cf, cdfdr, cdfdr+1);\n\n            f[i] = xf + cf;\n            if (isnan(f[i])) {\n                print(\"bad 1?\", ra, rb);\n                throw \"numerical error in lda functional\";\n            }\n        }\n    }\n    else {\n        double q1, q2, dq;\n        for (unsigned int i=0; i<result.size(); i++) {\n            double r = munge(2.0 * arho[i]);\n            x_rks_s__(&r, &q1, &dq);\n            c_rks_vwn5__(&r, &q2, &dq);\n            f[i] = q1 + q2;\n            if (isnan(f[i])) {\n                print(\"bad? 2\", r);\n                throw \"numerical error in lda functional\";\n            }\n        }\n    }\n    return result;\n}\n\nstd::vector<madness::Tensor<double> > XCfunctional::vxc(const std::vector< madness::Tensor<double> >& t,\n        const int ispin) const\n{\n    //MADNESS_ASSERT(what == 0);\n    const double* arho = t[0].ptr();\n    std::vector<madness::Tensor<double> > result(1);\n    result[0]=madness::Tensor<double>(3L, t[0].dims(), false);\n    double* f = result[0].ptr();\n    MADNESS_PRAGMA_CLANG(diagnostic push)\n    MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wtautological-constant-compare\")\n    auto isnan = [](double v) { return std::isnan(v); };\n    MADNESS_PRAGMA_CLANG(diagnostic pop)\n\n    if (spin_polarized) {\n        const double* brho = t[1].ptr();\n        for (unsigned int i=0; i<result[0].size(); i++) {\n            double ra = munge(arho[i]);\n            double rb = munge(brho[i]);\n            double xf, cf, xdfdr[2], cdfdr[2];\n\n            x_uks_s__(&ra, &rb, &xf, xdfdr, xdfdr+1);\n            c_uks_vwn5__(&ra, &rb, &cf, cdfdr, cdfdr+1);\n\n//            f[i] = xdfdr[what] + cdfdr[what];\n            f[i] = xdfdr[ispin] + cdfdr[ispin];\n            if (isnan(f[i])) {\n                print(\"bad? 3\", ra, rb);\n                throw \"numerical error in lda functional\";\n            }\n        }\n    }\n    else {\n        const double* arho = t[0].ptr();\n        for (unsigned int i=0; i<result[0].size(); i++) {\n            double r = munge(2.0 * arho[i]);\n            double q, dq1, dq2;\n            x_rks_s__(&r, &q, &dq1);\n            c_rks_vwn5__(&r, &q, &dq2);\n            f[i] = dq1 + dq2;\n            if (isnan(f[i])) {\n                print(\"bad? 4\", r);\n                throw \"numerical error in lda functional\";\n            }\n        }\n    }\n    return result;\n}\n\nstd::vector<madness::Tensor<double> > XCfunctional::fxc_apply(const std::vector<Tensor<double> >& t,\n        const int ispin) const{\n\tMADNESS_EXCEPTION(\"fxc_apply not implemented in xcfunctional_ldaonly.cc... use libxc\",1);\n}\n\nvoid XCfunctional::make_libxc_args(const std::vector< madness::Tensor<double> >& t,\n                        madness::Tensor<double>& rho,\n                        madness::Tensor<double>& sigma,\n                        madness::Tensor<double>& rho_pt,\n                        madness::Tensor<double>& sigma_pt,\n                        std::vector<madness::Tensor<double> >& drho,\n                        std::vector<madness::Tensor<double> >& drho_pt,\n                        const bool need_response) const {\n    MADNESS_EXCEPTION(\"no make_libxc_args without libxc\",1);\n}\n\n}\n#endif\n"
  },
  {
    "path": "src/madness/chem/xcfunctional_libxc.cc",
    "content": "#include <madness/madness_config.h>\n#include<madness/chem/xcfunctional.h>\n#include <madness/tensor/tensor.h>\n#include <iostream>\n#include <string>\n#include <sstream>\n#include <utility>\n#include <madness/world/madness_exception.h>\n#include <madness/world/MADworld.h>\n#include <xc.h>\n#include <xc_funcs.h>\n\n// This function is here because compiling with -ffast-math breaks the C\n// function isnan. Also, there is a bug in some compilers where isnan is\n// undefined when <cmath> is included.\nnamespace {\n    inline int isnan_x(double x) {\n        volatile double y = x;\n        return x != y;\n    }\n}\n\nnamespace madness {\n\nstatic int lookup_name(const std::string& name) {\n    // Call libxc routine\n    //return XC(functional_get_number(name.c_str()));\n    return xc_functional_get_number(name.c_str());\n}\n\nstatic std::string lookup_id(const int id) {\n    // Call libxc routine, needs memory handling\n    //char *namep(XC(functional_get_name(id)));\n    //std::string name = (namep==NULL) ? \"Functional not found\" : std::string(namep);\n    //free(namep);\n    //return name;\n    return std::string(xc_functional_get_name(id));\n}\n\nstatic xc_func_type* make_func(int id, bool polarized) {\n    xc_func_type* func = new xc_func_type;\n    int POLARIZED = polarized ? XC_POLARIZED : XC_UNPOLARIZED;\n    //MADNESS_ASSERT(xc_func_init(func, id, POLARIZED) == 0); // SHOULD BE CHECK\n    if (xc_func_init(func, id, POLARIZED) != 0) throw \"bad stuff!!!!!!!!!!\";\n    return func;\n}\n\nstatic xc_func_type* lookup_func(const std::string& name, bool polarized) {\n    int id = lookup_name(name);\n    //MADNESS_ASSERT(id > 0); // SHOULD BE CHECK\n    if(id <= 0) throw \"bad stuff xxx\";\n    return make_func(id, polarized);\n}\n\n//XCfunctional::XCfunctional() {}\n//XCfunctional::XCfunctional() : hf_coeff(0.0) {std::printf(\"Construct XC Functional from LIBXC Library\");}\nXCfunctional::XCfunctional() : hf_coeff(0.0) {\n    rhotol=1e-7; rhomin=0.0;\n    ggatol=1.e-4;\n    nderiv=0;\n    spin_polarized=false;\n}\n\nvoid XCfunctional::initialize(const std::string& input_line, bool polarized,\n        World& world, const bool verbose) {\n    rhotol=1e-7; rhomin=0.0; // default values\n    ggatol=1.e-4;\n\n    bool printit=verbose and (world.rank()==0);\n    double factor;      // weight factor for the various functionals\n    spin_polarized = polarized;\n\n\n    std::stringstream line(input_line);\n    std::string name;\n\n    nderiv = 0;\n    hf_coeff = 0.0;\n    funcs.clear();\n\n    if (printit) print(\"\\nConstruct XC Functional from LIBXC Library\");\n    while (line >> name) {\n        std::transform(name.begin(), name.end(), name.begin(), ::toupper);\n        if (name == \"LDA\") {\n            // Slater exchange and VWN-5 correlation\n            funcs.push_back(std::make_pair(lookup_func(\"LDA_X\",polarized),1.0));\n            funcs.push_back(std::make_pair(lookup_func(\"LDA_C_VWN\",polarized),1.0));\n        } else if ((name == \"BP86\") or (name==\"BP\")) {\n            // Becke exchange, VWN-3 correlation, Perdew correction\n            funcs.push_back(std::make_pair(lookup_func(\"GGA_X_B88\",polarized),1.0));\n            funcs.push_back(std::make_pair(lookup_func(\"GGA_C_P86\",polarized),1.0));\n        } else if (name == \"PBE\") {\n            funcs.push_back(std::make_pair(lookup_func(\"GGA_X_PBE\",polarized),1.0));\n            funcs.push_back(std::make_pair(lookup_func(\"GGA_C_PBE\",polarized),1.0));\n        } else if (name == \"PBE0\") {\n            funcs.push_back(std::make_pair(lookup_func(\"GGA_X_PBE\",polarized),0.75));\n            funcs.push_back(std::make_pair(lookup_func(\"GGA_C_PBE\",polarized),1.0));\n            hf_coeff=0.25;\n        } else if (name == \"B3LYP\") {\n            // VWN-3 correlation\n            funcs.push_back(std::make_pair(lookup_func(\"HYB_GGA_XC_B3LYP\",polarized),1.0));\n            hf_coeff=0.2;\n        } else if (name == \"RHOMIN\") {\n            line >> rhomin;\n        } else if (name == \"RHOTOL\") {\n            line >> rhotol;\n        } else if (name == \"GGATOL\") {\n            line >> ggatol;\n        } else if (name == \"HF\" || name == \"HF_X\") {\n            if (! (line >> factor)) factor = 1.0;\n            hf_coeff = factor;\n        } else {\n            if (! (line >> factor)) factor = 1.0;\n            funcs.push_back(std::make_pair(lookup_func(name,polarized), factor));\n        }\n    }\n\n    for (unsigned int i=0; i<funcs.size(); i++) {\n        if (funcs[i].first->info->family == XC_FAMILY_GGA) nderiv = std::max(nderiv,1);\n        if (funcs[i].first->info->family == XC_FAMILY_HYB_GGA) nderiv = std::max(nderiv,1);\n        if (funcs[i].first->info->family == XC_FAMILY_MGGA)nderiv = std::max(nderiv,2);\n //       if (funcs[i].first->info->family == XC_FAMILY_LDA) nderiv = std::max(nderiv,0);\n    }\n    if (printit) {\n        print(\"\\ninput line was:\",input_line);\n        for (std::size_t i=0; i<funcs.size(); ++i) {\n            int id=funcs[i].first->info->number;\n//            print(lookup_id(id),\"with weight:\",funcs[i].second);\n            printf(\" %4.3f %s \\n\",funcs[i].second,lookup_id(id).c_str());\n        }\n        if (hf_coeff>0.0) printf(\" %4.3f %s \\n\",hf_coeff,\"HF exchange\");\n        print(\"\\nscreening parameters\");\n        print(\" rhotol, rhomin\",rhotol,rhomin);\n        print(\"         ggatol\",ggatol);\n        if (printit) print(\"polarized \",polarized,\"\\n\");\n\n    }\n}\n\nXCfunctional::~XCfunctional() {\n    for (unsigned int i=0; i<funcs.size(); i++) {\n        xc_func_end(funcs[i].first);\n        delete funcs[i].first;\n    }\n    funcs.clear();\n}\n\nbool XCfunctional::is_lda() const {\n    return nderiv == 0;\n}\n\nbool XCfunctional::is_gga() const {\n    return nderiv == 1;\n}\n\nbool XCfunctional::is_meta() const {\n    return nderiv == 2;\n}\n\nbool XCfunctional::is_dft() const {\n//    return (is_lda() || is_gga() || is_meta());\n    return (funcs.size()>0);\n}\n\nbool XCfunctional::has_fxc() const\n{\n    return false; // not thought about this yet\n}\n\nbool XCfunctional::has_kxc() const\n{\n    return false;\n}\n\n\nvoid XCfunctional::make_libxc_args(const std::vector< madness::Tensor<double> >& xc_args,\n           madness::Tensor<double>& rho, madness::Tensor<double>& sigma,\n           madness::Tensor<double>& rho_pt, madness::Tensor<double>& sigma_pt,\n           std::vector<madness::Tensor<double> >& drho,\n           std::vector<madness::Tensor<double> >& drho_pt,\n           bool need_response) const {\n\n    // number of grid points in this box\n    const int np = xc_args[0].size();\n\n\n    if (not spin_polarized) {\n        if (is_lda()) {\n            rho  = madness::Tensor<double>(np);\n            const double * MADNESS_RESTRICT rhoa = xc_args[enum_rhoa].ptr();\n            double * MADNESS_RESTRICT dens = rho.ptr();\n            for (long i=0; i<np; i++) {\n                dens[i] = munge(2.0*rhoa[i]);   // full dens is twice alpha dens\n            }\n\n            // add perturbed density in response calculations\n            // note rho_pt does not depend on the spin\n            if (need_response) {\n                rho_pt  = madness::Tensor<double>(np);\n                const double * MADNESS_RESTRICT rho_pt1 = xc_args[enum_rho_pt].ptr();\n                double * MADNESS_RESTRICT dens_pt = rho_pt.ptr();\n                for (long i=0; i<np; i++) {\n                    dens_pt[i] = binary_munge(rho_pt1[i],rhoa[i],rhotol); // no factor 2\n                }\n            }\n        }\n        else if (is_gga()) {\n            // rho is the density\n            // the reduced density gradient sigma is given by\n            // sigma = rho * rho * chi\n            const double * MADNESS_RESTRICT rhoa = xc_args[enum_rhoa].ptr();\n            const double * MADNESS_RESTRICT chiaa = xc_args[enum_chi_aa].ptr();\n            const double * MADNESS_RESTRICT zetaa_x = xc_args[enum_zetaa_x].ptr();\n            const double * MADNESS_RESTRICT zetaa_y = xc_args[enum_zetaa_y].ptr();\n            const double * MADNESS_RESTRICT zetaa_z = xc_args[enum_zetaa_z].ptr();\n\n            // output\n            rho  = madness::Tensor<double>(np);\n            drho[0]  = madness::Tensor<double>(np);\n            drho[1]  = madness::Tensor<double>(np);\n            drho[2]  = madness::Tensor<double>(np);\n            sigma  = madness::Tensor<double>(np);\n\n            double * MADNESS_RESTRICT dens = rho.ptr();\n            double * MADNESS_RESTRICT sig = sigma.ptr();\n            double * MADNESS_RESTRICT ddensx = drho[0].ptr();\n            double * MADNESS_RESTRICT ddensy = drho[1].ptr();\n            double * MADNESS_RESTRICT ddensz = drho[2].ptr();\n\n            for (long i=0; i<np; i++) {\n                dens[i]=munge(2.0*rhoa[i]);     // full dens is twice alpha dens\n                sig[i] = std::max(1.e-14,dens[i]*dens[i] * chiaa[i]);   // 2 factors 2 included in dens\n                ddensx[i]=dens[i]*zetaa_x[i];\n                ddensy[i]=dens[i]*zetaa_y[i];\n                ddensz[i]=dens[i]*zetaa_z[i];\n            }\n\n            // add perturbed density and density gradients in response calculations\n            // note rho_pt does not depend on the spin\n            if (need_response) {\n\n                // input\n                const double * MADNESS_RESTRICT rho_pt1 = xc_args[enum_rho_pt].ptr();\n                const double * MADNESS_RESTRICT sig_pt1 = xc_args[enum_sigma_pta_div_rho].ptr();\n                const double * MADNESS_RESTRICT drho_ptx1 = xc_args[enum_ddens_ptx].ptr();\n                const double * MADNESS_RESTRICT drho_pty1 = xc_args[enum_ddens_pty].ptr();\n                const double * MADNESS_RESTRICT drho_ptz1 = xc_args[enum_ddens_ptz].ptr();\n\n                // output\n                rho_pt  = madness::Tensor<double>(np);\n                sigma_pt  = madness::Tensor<double>(np);\n                drho_pt[0]  = madness::Tensor<double>(np);\n                drho_pt[1]  = madness::Tensor<double>(np);\n                drho_pt[2]  = madness::Tensor<double>(np);\n\n                double * MADNESS_RESTRICT ddens_ptx = drho_pt[0].ptr();\n                double * MADNESS_RESTRICT ddens_pty = drho_pt[1].ptr();\n                double * MADNESS_RESTRICT ddens_ptz = drho_pt[2].ptr();\n                double * MADNESS_RESTRICT dens_pt = rho_pt.ptr();\n                double * MADNESS_RESTRICT sig_pt = sigma_pt.ptr();\n\n                for (long i=0; i<np; i++) {\n                    dens_pt[i] = binary_munge(rho_pt1[i],rhoa[i],rhotol);  // no factor 2\n                    sig_pt[i] = dens[i]*sig_pt1[i];\n                    ddens_ptx[i] = binary_munge(drho_ptx1[i],rhoa[i],rhotol);  // no factor 2\n                    ddens_pty[i] = binary_munge(drho_pty1[i],rhoa[i],rhotol);  // no factor 2\n                    ddens_ptz[i] = binary_munge(drho_ptz1[i],rhoa[i],rhotol);  // no factor 2\n                    // dens is munged and includes factor of 2 for full density\n                }\n            }\n\n        }\n        else {\n            MADNESS_EXCEPTION(\"only LDA and GGA available in xcfunctional\",1);\n        }\n\n    } else if (spin_polarized) {\n        if (is_lda()) {\n            const double * MADNESS_RESTRICT rhoa = xc_args[enum_rhoa].ptr();\n            const double * MADNESS_RESTRICT rhob = xc_args[enum_rhob].ptr();\n            rho  = madness::Tensor<double>(np*2L);\n            double * MADNESS_RESTRICT dens = rho.ptr();\n\n            // might happen if there are no beta electrons\n            madness::Tensor<double> dummy;\n            if (rhob==NULL) {\n                dummy=madness::Tensor<double>(np);\n                rhob=dummy.ptr();\n            }\n\n            for (long i=0; i<np; i++) {\n                dens[2*i  ] = munge(rhoa[i]);\n                dens[2*i+1] = munge(rhob[i]);\n            }\n            if (need_response) {\n                MADNESS_EXCEPTION(\"no spin polarized DFT response in xcfunctional\",1);\n            }\n        }\n        else if (is_gga()) {\n            // input\n            const double * MADNESS_RESTRICT rhoa  = xc_args[enum_rhoa].ptr();\n            const double * MADNESS_RESTRICT rhob  = xc_args[enum_rhob].ptr();\n\n            const double * MADNESS_RESTRICT chiaa = xc_args[enum_chi_aa].ptr();\n            const double * MADNESS_RESTRICT chiab = xc_args[enum_chi_ab].ptr();\n            const double * MADNESS_RESTRICT chibb = xc_args[enum_chi_bb].ptr();\n\n            const double * MADNESS_RESTRICT zetaa_x = xc_args[enum_zetaa_x].ptr();\n            const double * MADNESS_RESTRICT zetaa_y = xc_args[enum_zetaa_y].ptr();\n            const double * MADNESS_RESTRICT zetaa_z = xc_args[enum_zetaa_z].ptr();\n\n            const double * MADNESS_RESTRICT zetab_x = xc_args[enum_zetaa_x].ptr();\n            const double * MADNESS_RESTRICT zetab_y = xc_args[enum_zetaa_y].ptr();\n            const double * MADNESS_RESTRICT zetab_z = xc_args[enum_zetaa_z].ptr();\n\n            // might happen if there are no beta electrons\n            madness::Tensor<double> dummy;\n            if ((rhob==NULL) or (chiab==NULL) or (chibb==NULL)) {\n                dummy=madness::Tensor<double>(np);\n            }\n            if (rhob==NULL) rhob=dummy.ptr();\n            if (chiab==NULL) chiab=dummy.ptr();\n            if (chibb==NULL) chibb=dummy.ptr();\n\n            rho   = madness::Tensor<double>(np*2L);\n            drho[0]  = madness::Tensor<double>(np*2L);\n            drho[1]  = madness::Tensor<double>(np*2L);\n            drho[2]  = madness::Tensor<double>(np*2L);\n            sigma = madness::Tensor<double>(np*3L);\n\n            double * MADNESS_RESTRICT dens = rho.ptr();\n            double * MADNESS_RESTRICT sig  = sigma.ptr();\n            double * MADNESS_RESTRICT ddensx  = drho[0].ptr();\n            double * MADNESS_RESTRICT ddensy  = drho[1].ptr();\n            double * MADNESS_RESTRICT ddensz  = drho[2].ptr();\n\n\n            for (long i=0; i<np; i++) {\n\n                double ra=munge(rhoa[i]);\n                double rb=munge(rhob[i]);\n\n                dens[2*i  ] = ra;\n                dens[2*i+1] = rb;\n                sig[3*i  ]  = std::max(1.e-14,ra * ra * chiaa[i]);  // aa\n                sig[3*i+1]  = std::max(1.e-14,ra * rb * chiab[i]);  // ab\n                sig[3*i+2]  = std::max(1.e-14,rb * rb * chibb[i]);  // bb\n\n                ddensx[2*i  ]=ra * zetaa_x[i];\n                ddensx[2*i+1]=rb * zetab_x[i];\n                ddensy[2*i  ]=ra * zetaa_y[i];\n                ddensy[2*i+1]=rb * zetab_y[i];\n                ddensz[2*i  ]=ra * zetaa_z[i];\n                ddensz[2*i+1]=rb * zetab_z[i];\n\n\n            }\n            if (need_response) {\n                MADNESS_EXCEPTION(\"no spin polarized DFT response in xcfunctional\",1);\n            }\n        }\n        else {\n            MADNESS_EXCEPTION(\"only LDA and GGA available in xcfunctional\",1);\n        }\n    }\n}\n\n\nmadness::Tensor<double> XCfunctional::exc(const std::vector< madness::Tensor<double> >& t) const {\n    madness::Tensor<double> rho, sigma, rho_pt, sigma_pt;\n    std::vector<Tensor<double> > ddens(3), ddens_pt(3);\n    make_libxc_args(t, rho, sigma, rho_pt, sigma_pt, ddens, ddens_pt, false);\n\n    const int np = t[0].size();\n    const double * MADNESS_RESTRICT dens = rho.ptr();\n    const double * MADNESS_RESTRICT sig = sigma.ptr();\n\n    madness::Tensor<double> result(3L, t[0].dims());\n    double * MADNESS_RESTRICT res = result.ptr();\n    for (long j=0; j<np; j++) res[j] = 0.0;\n\n    for (unsigned int i=0; i<funcs.size(); i++) {\n        madness::Tensor<double> zk(3L, t[0].dims(), false);\n        double * MADNESS_RESTRICT work = zk.ptr();\n\n        switch(funcs[i].first->info->family) {\n        case XC_FAMILY_LDA:\n            xc_lda_exc(funcs[i].first, np, dens, work);\n            break;\n        case XC_FAMILY_GGA:\n            xc_gga_exc(funcs[i].first, np, dens, sig, work);\n            break;\n        case XC_FAMILY_HYB_GGA:\n            xc_gga_exc(funcs[i].first, np, dens, sig, work);\n            break;\n        default:\n            throw \"HOW DID WE GET HERE?\";\n        }\n        if (spin_polarized) {\n            for (long j=0; j<np; j++) {\n                res[j] +=  work[j]*(dens[2*j+1] + dens[2*j])*funcs[i].second;\n            }\n        }\n        else {\n            for (long j=0; j<np; j++) {\n                res[j] += work[j]*dens[j]*funcs[i].second;\n            }\n        }\n    }\n    return result;\n}\n\n\nstd::vector<madness::Tensor<double> > XCfunctional::vxc(\n        const std::vector< madness::Tensor<double> >& t, const int ispin) const {\n    madness::Tensor<double> rho, sigma, dummy;\n    std::vector<Tensor<double> > drho(3), ddens_pt(3);\n    make_libxc_args(t, rho, sigma, dummy, dummy, drho, ddens_pt, false);\n\n    // number of grid points\n    const int np = t[0].size();\n\n    // number of intermediates depends on the spin\n\n//    dens[2*i  ] = ra;\n//    dens[2*i+1] = rb;\n//    sig[3*i  ]  = std::max(1.e-14,ra * ra * chiaa[i]);  // aa\n//    sig[3*i+1]  = std::max(1.e-14,ra * rb * chiab[i]);  // ab\n//    sig[3*i+2]  = std::max(1.e-14,rb * rb * chibb[i]);  // bb\n\n    int nvsig=1, nvrho=1;\n    if (spin_polarized) {\n        nvrho = 2;\n        nvsig = 3;\n    }\n\n    int result_size=0;\n    // local terms, same spin\n    if (is_lda()) result_size= 1;\n    // local terms,  3x semilocal terms (x,y,z)\n    if (is_gga() and (not is_spin_polarized())) result_size= 4;\n    // local terms,  3x semilocal terms (x,y,z) for same spin and opposite spin\n    if (is_gga() and (is_spin_polarized())) result_size= 7;\n    MADNESS_ASSERT(result_size>0);\n\n    Tensor<double> r(3L, t[0].dims());\n    r=0.0;\n    std::vector<Tensor<double> > result(result_size);\n    for (Tensor<double>& rr : result) rr=copy(r);\n\n    const double * MADNESS_RESTRICT dens = rho.ptr();   // nspin * np\n    const double * MADNESS_RESTRICT ddensx = drho[0].ptr();  // nspin * np\n    const double * MADNESS_RESTRICT ddensy = drho[1].ptr();  // nspin * np\n    const double * MADNESS_RESTRICT ddensz = drho[2].ptr();  // nspin * np\n\n    for (unsigned int i=0; i<funcs.size(); i++) {\n        switch(funcs[i].first->info->family) {\n        case XC_FAMILY_LDA:\n        {\n            madness::Tensor<double> vrho(nvrho*np);\n            double * MADNESS_RESTRICT vr = vrho.ptr();\n            xc_lda_vxc(funcs[i].first, np, dens, vr);\n            double * MADNESS_RESTRICT r0 = result[0].ptr();\n\n            for (long j=0; j<np; j++) r0[j] += vr[nvrho*j+ispin]*funcs[i].second;\n        }\n\n        break;\n\n        case XC_FAMILY_HYB_GGA:\n        case XC_FAMILY_GGA:\n        {\n            madness::Tensor<double> vrho(nvrho*np), vsig(nvsig*np);\n            double * MADNESS_RESTRICT vr = vrho.ptr();\n            double * MADNESS_RESTRICT vs = vsig.ptr();\n            const double * MADNESS_RESTRICT sig = sigma.ptr();\n            // in: funcs[i].first\n            // in: np      number of points\n            // in: dens    the density [a,b]\n            // in: sig     contracted density gradients \\nabla \\rho . \\nabla \\rho [aa,ab,bb]\n            // out: vr     \\del e/\\del \\rho_alpha [a,b]\n            // out: vs     \\del e/\\del sigma_alpha [aa,ab,bb]\n            xc_gga_vxc(funcs[i].first, np, dens, sig, vr, vs);\n\n            if (spin_polarized) {\n                double * MADNESS_RESTRICT r0 = result[0].ptr();\n                double * MADNESS_RESTRICT r1 = result[1].ptr();\n                double * MADNESS_RESTRICT r2 = result[2].ptr();\n                double * MADNESS_RESTRICT r3 = result[3].ptr();\n                double * MADNESS_RESTRICT r4 = result[4].ptr();\n                double * MADNESS_RESTRICT r5 = result[5].ptr();\n                double * MADNESS_RESTRICT r6 = result[6].ptr();\n\n                for (long j=0; j<np; j++) {\n                    // Vrhoa\n                    r0[j] += vr[nvrho*j+ispin] * funcs[i].second;\n\n                    // Vsigaa/Vsigbb * rho\n                    r1[j] += 2.0 * vs[nvsig*j + 2*ispin] * funcs[i].second       // aa or bb in steps of 3\n                            *ddensx[nvrho*j + ispin];                         // a or b in steps of 2\n                    r2[j] += 2.0 * vs[nvsig*j + 2*ispin] * funcs[i].second       // aa or bb in steps of 3\n                            *ddensy[nvrho*j + ispin];                         // a or b in steps of 2\n                    r3[j] += 2.0 * vs[nvsig*j + 2*ispin] * funcs[i].second       // aa or bb in steps of 3\n                            *ddensz[nvrho*j + ispin];                         // a or b in steps of 2\n\n                    // Vsigab * rho_other_spin\n                    r4[j] += vs[nvsig*j + 1] * funcs[i].second             // ab in steps of 3\n                            *ddensx[nvrho*j + (1-ispin)];                     // b or a in steps of 2\n                    r5[j] += vs[nvsig*j + 1] * funcs[i].second             // ab in steps of 3\n                            *ddensy[nvrho*j + (1-ispin)];                     // b or a in steps of 2\n                    r6[j] += vs[nvsig*j + 1] * funcs[i].second             // ab in steps of 3\n                            *ddensz[nvrho*j + (1-ispin)];                     // b or a in steps of 2\n\n                }\n            }\n            else {\n                double * MADNESS_RESTRICT r0 = result[0].ptr();\n                double * MADNESS_RESTRICT r1 = result[1].ptr();\n                double * MADNESS_RESTRICT r2 = result[2].ptr();\n                double * MADNESS_RESTRICT r3 = result[3].ptr();\n\n                for (long j=0; j<np; j++) {\n                    // Vrhoa\n                    r0[j] += vr[j]*funcs[i].second;\n\n                    // Vsigaa\n                    r1[j] += 2.0 * vs[j]*funcs[i].second*ddensx[j];    // total density\n                    r2[j] += 2.0 * vs[j]*funcs[i].second*ddensy[j];    // total density\n                    r3[j] += 2.0 * vs[j]*funcs[i].second*ddensz[j];    // total density\n                }\n            }\n        }\n        break;\n        default:\n            MADNESS_EXCEPTION(\"unknown XC_FAMILY xcfunctional::vxc\",1);\n        }\n    }\n\n    // check for NaNs\n    for (Tensor<double>& rr : result) {\n        double * MADNESS_RESTRICT res = rr.ptr();\n        for (long j=0; j<np; j++) {\n            if (isnan_x(res[j])) MADNESS_EXCEPTION(\"NaN in xcfunctional::vxc\",1);\n        }\n    }\n\n    return result;\n}\n\n\nstd::vector<madness::Tensor<double> > XCfunctional::fxc_apply(\n        const std::vector<Tensor<double> >& t, const int ispin) const {\n\n    //MADNESS_CHECK(!spin_polarized);    // for now\n    //MADNESS_CHECK(ispin==0);           // for now\n    if (spin_polarized || ispin!=0) throw \"bad stuff yyy\";\n\n    // copy quantities from t to rho and sigma\n    Tensor<double> rho,sigma, rho_pt, sigma_pt;   // rho=2rho_alpha, sigma=4sigma_alpha\n    std::vector<Tensor<double> > drho(3), drho_pt(3);\n    make_libxc_args(t, rho, sigma, rho_pt, sigma_pt, drho, drho_pt, true);\n\n    // number of grid points\n    const int np = t[0].size();\n\n    // spin dimensions of the tensors\n    const int nspin=(spin_polarized ? 2 : 1);   // rhf: 1; uhf: 2\n    const int nspin2=nspin*(nspin+1)/2;         // rhf: 1; uhf: 3\n    const int nspin3=nspin2*(nspin2+1)/2;       // rhf: 1; uhf: 6\n\n    // intermediate tensors: partial derivatives of f_xc wrt rho/sigma\n    Tensor<double> v2rho2(nspin2*np);       // lda, gga\n    Tensor<double> v2rhosigma(nspin3*np);   // gga\n    Tensor<double> v2sigma2(nspin3*np);     // gga\n    Tensor<double> vrho(nspin*np);          // gga\n    Tensor<double> vsigma(nspin2*np);       // gga\n\n    // result tensor\n    Tensor<double> r(3L, t[0].dims());\n    int result_size= this->is_gga() ? 4 : 1;\n    std::vector<Tensor<double> > result(result_size);\n    for (Tensor<double>& rr : result) rr=copy(r);\n\n    for (unsigned int i=0; i<funcs.size(); i++) {\n        switch(funcs[i].first->info->family) {\n        case XC_FAMILY_LDA: {\n            double * MADNESS_RESTRICT vr = v2rho2.ptr();\n            const double * MADNESS_RESTRICT dens = rho.ptr();\n            xc_lda_fxc(funcs[i].first, np, dens, vr);\n\n            // only local terms\n            result[0]+=v2rho2.emul(rho_pt);\n\n        }\n        break;\n\n        case XC_FAMILY_HYB_GGA:\n        case XC_FAMILY_GGA:\n        {\n            const double * MADNESS_RESTRICT sig = sigma.ptr();\n            const double * MADNESS_RESTRICT dens = rho.ptr();\n            const double * MADNESS_RESTRICT sig_pt = sigma_pt.ptr();\n            const double * MADNESS_RESTRICT dens_pt = rho_pt.ptr();\n            const double * MADNESS_RESTRICT ddens_ptx = drho_pt[0].ptr();\n            const double * MADNESS_RESTRICT ddens_pty = drho_pt[1].ptr();\n            const double * MADNESS_RESTRICT ddens_ptz = drho_pt[2].ptr();\n            const double * MADNESS_RESTRICT ddensx = drho[0].ptr();\n            const double * MADNESS_RESTRICT ddensy = drho[1].ptr();\n            const double * MADNESS_RESTRICT ddensz = drho[2].ptr();\n\n            double * MADNESS_RESTRICT vr = vrho.ptr();\n            double * MADNESS_RESTRICT vs = vsigma.ptr();\n            double * MADNESS_RESTRICT vrr = v2rho2.ptr();\n            double * MADNESS_RESTRICT vrs = v2rhosigma.ptr();\n            double * MADNESS_RESTRICT vss = v2sigma2.ptr();\n\n            double * MADNESS_RESTRICT r0 = result[0].ptr();\n            double * MADNESS_RESTRICT r1 = result[1].ptr();\n            double * MADNESS_RESTRICT r2 = result[2].ptr();\n            double * MADNESS_RESTRICT r3 = result[3].ptr();\n\n            // in: funcs[i].first\n            // in: np      number of points\n            // in: dens    the density [a,b], or 2*\\rho_alpha\n            // in: sig     contracted density gradients \\nabla \\rho . \\nabla \\rho [aa,ab,bb]\n            // out: vrr     \\del^2 e/\\del \\rho^2_alpha [a,b]\n            // out: vrs     \\del^2 e/\\del \\sigma_alpha\\rho [aa,ab,bb]\n            // out: vss     \\del^2 e/\\del \\sigma^2_alpha [aa,ab,bb]\n            xc_gga_fxc(funcs[i].first, np, dens, sig, vrr, vrs, vss);\n\n            // in: funcs[i].first\n            // in: np      number of points\n            // in: dens    the density [a,b]\n            // in: sig     contracted density gradients \\nabla \\rho . \\nabla \\rho [aa,ab,bb]\n            // out: vr     \\del e/\\del \\rho_alpha [a,b]\n            // out: vs     \\del e/\\del sigma_alpha [aa,ab,bb]\n            xc_gga_vxc(funcs[i].first, np, dens, sig, vr, vs);\n\n\n            for (long i=0; i<np; i++) {\n\n                // local terms\n                r0[i]+=vrr[i]*dens_pt[i] + 2.0*vrs[i] * sig_pt[i];\n\n                // semilocal terms -- x,y,z\n                r1[i]+= binary_munge(\n                          2.0*vrs[i] * dens_pt[i] * ddensx[i]\n                          + 4.0 * vss[i] * sig_pt[i] * ddensx[i]\n                          + 2.0 * vs[i]*ddens_ptx[i],\n                        dens[i],ggatol);\n\n                r2[i]+=binary_munge(\n                        2.0*vrs[i] * dens_pt[i] * ddensy[i]\n                        + 4.0 * vss[i] * sig_pt[i] * ddensy[i]\n                        + 2.0 * vs[i]*ddens_pty[i],\n                        dens[i],ggatol);\n\n                r3[i]+=binary_munge(\n                        2.0*vrs[i] * dens_pt[i] * ddensz[i]\n                        + 4.0 * vss[i] * sig_pt[i] * ddensz[i]\n                        + 2.0 * vs[i]*ddens_ptz[i],\n                        dens[i],ggatol);\n\n            }\n        }\n        break;\n        default:\n            MADNESS_EXCEPTION(\"unknown XC_FAMILY xcfunctional::fxc\",1);\n        }\n\n        // accumulate into result tensor with proper weighting\n        for (std::size_t j=0; j<result.size(); ++j) {\n            result[j]*=funcs[i].second;\n\n            // check for NaNs\n            double * MADNESS_RESTRICT res = result[j].ptr();\n            for (long jj=0; jj<np; jj++) if (isnan_x(res[jj]))\n                MADNESS_EXCEPTION(\"NaN in xcfunctional::fxc_apply\",1);\n\n        }\n    }\n\n    return result;\n}\n\n}\n"
  },
  {
    "path": "src/madness/chem/zcis.cc",
    "content": "/*\n * Complexcis.cpp\n *\n *  Created on: 21 Nov 2018\n *      Author: fbischoff\n */\n\n#include<madness/chem/GuessFactory.h>\n#include<madness/chem/SCFOperators.h>\n#include \"zcis.h\"\n\nnamespace madness {\n\ndouble Zcis::value() {\n\tif (cis_param.swap_ab()) {\n\t\tstd::swap(nemo->aeps,nemo->beps);\n\t\tstd::swap(nemo->amo,nemo->bmo);\n\t\tstd::swap(Qa,Qb);\n\t}\n\tstd::vector<root> roots;\n\ttry {\n\t\troots=read_guess();\n\t} catch (...) {\n\t\troots=make_guess();\n\t}\n\titerate(roots);\n\tsave_guess(roots);\n\treturn 0.0;\n}\n\n/// iterate the roots\nvoid Zcis::iterate(std::vector<root>& roots) const {\n\n\t// timings\n\tdouble wall0=wall_time(), wall1=wall_time();\n\n\t// compute ground state densities\n\tconst real_function_3d adens=real(dot(world,conj(world,nemo->amo),nemo->amo)).truncate();\n\tconst real_function_3d bdens=real(dot(world,conj(world,nemo->bmo),nemo->bmo)).truncate();\n\treal_function_3d totdens=(adens+bdens).truncate();\n\tif (nemo->get_calc_param().spin_restricted()) totdens.scale(2.0);\n\tdouble nelectron=totdens.trace();\n\tprint(\"nelectron from the total density\",nelectron);\n\ttotdens.print_size(\"totdens\");\n\n\t//const double shift=nemo->param.shift();\n\tconst bool use_kain=true;\n\n\tXNonlinearSolver<std::vector<complex_function_3d> ,double_complex, vector_function_allocator<double_complex,3> >\n\t\t\tallsolver(vector_function_allocator<double_complex,3> (world,(active_mo(nemo->amo).size()+active_mo(nemo->bmo).size())*roots.size()));\n\n\tfor (int iter=0; iter<cis_param.maxiter(); ++iter) {\n\t\twall1=wall_time();\n\t\tprintf(\"iteration %2d  %4.1fs\\n\",iter,wall1-wall0);\n\t\twall0=wall1;\n\t\tprint(\"root     energy         wf delta      energy change \");\n\n\t\tfor (size_t i=0; i<roots.size(); ++i)\n\t\t\tprintf(\"  %2lu   %12.8f     %4.2e      %5.2e\\n\",i, roots[i].omega, roots[i].delta, roots[i].energy_change);\n\n\t\tbool do_kain=use_kain and (iter>cis_param.guess_maxiter());\n\t\tif (not do_kain) allsolver.clear_subspace();\t// fock_pt diag reshuffles the roots and confuses solver\n\n\t\t// compute the perturbed fock matrix and the excitation energy expectation values\n\t\tcompute_potentials(roots, totdens);\n\n\t\tTensor<double> omega;\n\t\tif (not do_kain) {\n\t\t\tTensor<double_complex> fock_pt = compute_fock_pt(roots);\n\n\t\t\t// compute the expectation value of the excitation energy Eq. (34) of Kottmann2015\n\t\t\tTensor<double_complex> ovlp(roots.size()),eovlp(roots.size());\n\t\t\tfor (std::size_t i=0; i<roots.size(); ++i) {\n\t\t\t\tovlp(i)=inner(roots[i],roots[i]);\n\t\t\t\teovlp(i)=(inner(world,roots[i].afunction,roots[i].afunction)).trace(noct(nemo->aeps))\n\t\t\t\t\t\t+(inner(world,roots[i].bfunction,roots[i].bfunction)).trace(noct(nemo->beps));\n\t\t\t}\n\n\t\t\tif (cis_param.printlevel()>2) {\n\t\t\t\tprint(\"fock_pt\");\n\t\t\t\tprint(fock_pt);\n\n\t\t\t\tprint(\"ovlp (ab), eovlp (ab)\");\n\t\t\t\tprint(ovlp);\n\t\t\t\tprint(eovlp);\n\t\t\t}\n\n\t\t\tomega=Tensor<double>(roots.size());\n\t\t\tfor (std::size_t i=0; i<roots.size(); ++i) {\n\t\t\t\tomega(i)=real((fock_pt(i,i)-eovlp(i,i))/(ovlp(i,i)));\n\t\t\t}\n\t\t\tprint(\"omega from the perturbed fock matrix approach\");\n\t\t\tprint(omega);\n\n\t\t\torthonormalize(roots, fock_pt);\n//\t\t\torthonormalize(roots);\n\t\t} else {\t\t// do_kain\n\n\t\t\t// update the residuals\n\t\t\tstd::vector<complex_function_3d> allres, oldx;\n\t\t\tfor (int iroot=0; iroot<cis_param.guess_excitations(); ++iroot) {\n\t\t\t\troot& thisroot=roots[iroot];\n\n\t\t\t\tstd::vector<complex_function_3d> residuals=compute_residuals(thisroot);\n\t\t\t\tallres=append(allres,residuals);\n\t\t\t\toldx=append(oldx,thisroot.afunction);\n\t\t\t\toldx=append(oldx,thisroot.bfunction);\n\n\t\t\t\tthisroot.delta=norm2(world,residuals);\n\n\t\t\t\tif (omega.size()>0) thisroot.omega=omega(iroot);\n\t\t\t\tif (cis_param.omega()!=0) {\n\t\t\t\t\tthisroot.omega=cis_param.omega();\n\t\t\t\t\tprintf(\"\\n\\nset excitation energy manually to %8.4f\\n\\n\",thisroot.omega);\n\t\t\t\t}\n\n\t\t\t\tprint_size(world,thisroot.afunction,\"afunction1\");\n\t\t\t\tprint_size(world,thisroot.bfunction,\"bfunction1\");\n\t\t\t\tint i=0;\n\t\t\t\tfor (auto& f : thisroot.afunction) save(abs_square(f),\"afunction_root\"+stringify(iroot)+\"mo\"+stringify(i++));\n\n\t\t\t}\n\n\t\t\ttruncate(world,allres);\n\t\t\ttruncate(world,oldx);\n\t\t\tstd::vector<complex_function_3d> newx=allsolver.update(oldx,allres,0.01,3);\n\t\t\ttruncate(world,newx);\n\n\t\t\t// distribute new x functions\n\t\t\tfor (int iroot=0; iroot<cis_param.guess_excitations(); ++iroot) {\n\t\t\t\troot& thisroot=roots[iroot];\n\t\t\t\tauto [atmp, rest] = split(newx,thisroot.afunction.size());\n\t\t\t\tauto [btmp, rest2] = split(rest,thisroot.bfunction.size());\n\t\t\t\tnewx=rest2;\n\t\t\t\tthisroot.afunction=atmp;\n\t\t\t\tthisroot.bfunction=btmp;\n\n\t\t\t}\n\t\t\tMADNESS_ASSERT(newx.size()==0);\n\n\n\t\t\torthonormalize(roots);\n\t\t\tnormalize(roots);\n\n\t\t\tstd::vector<double> rnorm=norm2s(world,allres);\n\t\t\tdouble rmax=*(std::max_element(rnorm.begin(),rnorm.end()));\n\t\t\tif (rmax<cis_param.dconv()) break;\n\t\t}\t// if do_kain\n\t}\t// iter\n}\n\nvoid Zcis::compute_potentials(std::vector<root>& roots, const real_function_3d& totdens) const {\n\t// some numbers\n\tconst int anoct=noct(nemo->aeps).size();\n\tconst int bnoct=noct(nemo->beps).size();\n\t//const int noct=anoct+bnoct;\n\n\tfor (int iroot=0; iroot<cis_param.guess_excitations(); ++iroot) {\n\t\troot& thisroot=roots[iroot];\n\t\tif (thisroot.delta<cis_param.dconv()) continue;\n\n\t\tstd::vector<complex_function_3d> td_a=mul(world,thisroot.afunction,active_mo(nemo->amo));\n\t\tstd::vector<complex_function_3d> td_b=mul(world,thisroot.bfunction,active_mo(nemo->bmo));\n\t\tint i=cis_param.freeze();\n\t\tfor (auto& a : td_a) save(abs_square(a),\"transition_density_a\"+stringify(i++)+\"root\"+stringify(iroot));\n\n\t\tstd::vector<complex_function_3d> apot=zero_functions_compressed<double_complex,3>(world,anoct);\n\t\tstd::vector<complex_function_3d> bpot=zero_functions_compressed<double_complex,3>(world,bnoct);\n\n\t\t// compute the perturbed density\n\t\tcomplex_function_3d denspt=((dot(world,conj(world,thisroot.afunction),active_mo(nemo->amo)) +\n\t\t\t\tdot(world,conj(world,thisroot.bfunction),active_mo(nemo->bmo))));\n\t\tif (nemo->get_calc_param().spin_restricted()) denspt.scale(2.0);\n\n\t\tdenspt=conj(denspt);\n\t\tdenspt.truncate();\n\t\tdenspt.print_size(\"denspt\");\n\t\tsave(abs_square(denspt),\"denspt_root\"+stringify(iroot));\n\n\t\tfor (std::string spin : {\"alpha\",\"beta\"}) {\n\t\t\tif (nemo->get_calc_param().spin_restricted() and (spin==\"beta\")) continue;\n\n\t\t\tconst std::vector<complex_function_3d>& mo=(spin==\"alpha\") ? nemo->amo : nemo->bmo;\n\t\t\tconst std::vector<complex_function_3d>& act_mo=(spin==\"alpha\") ? active_mo(nemo->amo) : active_mo(nemo->bmo);\n\t\t\tif (act_mo.size()==0) continue;\n\n\t\t\tstd::vector<complex_function_3d>& pot=(spin==\"alpha\") ? apot : bpot;\n\t\t\tstd::vector<complex_function_3d> x= (spin==\"alpha\") ? thisroot.afunction : thisroot.bfunction;\n\t\t\tconst QProjector<double_complex,3>& Q=(spin==\"alpha\") ? Qa : Qb;\n\t\t\tTensor<double> occ = (spin==\"alpha\") ? Tensor<double>(nemo->amo.size()) : Tensor<double>(nemo->bmo.size());\n\t\t\tocc=1.0;\n\n\t\t\t/// zeroth order Fock operator acting on the x functions\n\t\t\tZnemo::potentials pot_mo=nemo->compute_potentials(mo,totdens,x);\n\t\t\tif (spin==\"beta\") scale(world,pot_mo.spin_zeeman_mo,-1.0);\n\n//\t\t\tnemo->compute_vmat(mo,vnemo,vlznemo,dianemo,spin_zeeman_nemo,knemo,jnemo);\n\n\n\t\t\tpot+=(pot_mo.vnuc_mo+pot_mo.lz_mo+pot_mo.diamagnetic_mo+pot_mo.spin_zeeman_mo\n\t\t\t\t\t-pot_mo.K_mo+pot_mo.J_mo);\t// need += b/c of reference\n\t\t\ttruncate(world,pot);\n\n\t\t\t// perturbed Fock operator acting on the reference orbitals\n\t\t\tCoulomb<double_complex,3> Jp(world);\n\t\t\tcomplex_function_3d Jp_pot = Jp.compute_potential(denspt);\n\n\t\t\tExchange<double_complex,3> Kp(world,nemo->get_calc_param().lo());\n            Kp.set_bra_and_ket(conj(world, act_mo), x);\n\t\t\tpot+=Q(Jp_pot*act_mo - Kp(act_mo));\n\t\t\ttruncate(world,pot);\n\t\t}\n\t\tthisroot.apot=copy(world,apot);\n\t\tthisroot.bpot=copy(world,bpot);\n\t}\n\n}\n\nTensor<double_complex> Zcis::compute_fock_pt(const std::vector<root>& roots) const {\n\n\tstd::size_t dim=roots.size();\n\tKinetic<double_complex,3> T(world);\n\tTensor<double_complex> fock_pt_a(dim,dim), fock_pt_b(dim,dim);\n\tTensor<double_complex> Tmat;\n\tfor (std::size_t r=0; r<dim; ++r) {\n\n\t\tfor (std::size_t p=0; p<dim; ++p) {\n\t\t\tfock_pt_a(r,p) = inner(roots[r].afunction,roots[p].apot);\n\t\t\tTmat=T(roots[r].afunction,roots[p].afunction);\n\t\t\tfor (int i=0; i<Tmat.dim(0); ++i) fock_pt_a(r,p)+=Tmat(i,i);\n\n\t\t\tif (roots[p].bpot.size()>0) {\n\t\t\t\tfock_pt_b(r,p) = inner(roots[r].bfunction,roots[p].bpot);\n\t\t\t\tTmat=T(roots[r].bfunction,roots[p].bfunction);\n\t\t\t\tfor (int i=0; i<Tmat.dim(0); ++i) fock_pt_b(r,p)+=Tmat(i,i);\n\t\t\t}\n\t\t}\n\t}\n\treturn fock_pt_a+fock_pt_b;\n\n}\n\n\nstd::vector<complex_function_3d> Zcis::compute_residuals(root& root) const {\n\n\n\tstd::vector<complex_function_3d> x=append(root.afunction,root.bfunction);\n\tstd::vector<complex_function_3d> pot = append(root.apot,root.bpot);\n\tTensor<double> eps=copy(concatenate(noct(nemo->aeps),noct(nemo->beps))) + root.omega;\n\n\tdouble global_shift=nemo->param.shift();\n\teps+=global_shift;\n//\tprint(\"compute_residuals, eps\",eps);\n\n\t// make the BSH operator\n\tstd::vector<std::shared_ptr<SeparatedConvolution<double,3> > > bsh(pot.size());\n\n\tfor (std::size_t p = 0; p < bsh.size(); p++) {\n\n\t\t// if eps is above zero we have an unbound state (or are early in the iteration)\n\t\t// however this needs a shift of the potential\n\t\t// we shift to -0.05 (same as moldft does, no particular reason)\n\t\tif(eps[p]>0.0){\n\t\t\tprint(\"potential shift needed for V\" + std::to_string(p+cis_param.freeze()));\n\t\t\tdouble shift = eps[p]+0.05;\n\t\t\teps[p] -= shift;\n\t\t\tpot[p] -= (-2.0*shift*x[p]);\n\t\t}\n\t\tMADNESS_ASSERT(not(eps[p]>0.0));\n//\t\tprint(\"assigning eps to bsh \",p,eps[p]);\n\t\tbsh[p] = std::shared_ptr<real_convolution_3d>(BSHOperatorPtr3D(world,\n\t\t\t\tsqrt(-2.0 * (eps[p])), 1.e-4, cis_param.thresh()));\n\t}\n\n\t// apply the BSH operator\n\tstd::vector<complex_function_3d> tmp0=(apply(world,bsh,-2.0*pot-2.0*global_shift*x));\n\n\tauto [atmp, btmp] = split(tmp0,root.afunction.size());\n\tstd::vector<complex_function_3d> tmp=append(Qa(atmp),Qb(btmp));\n\n\tstd::vector<complex_function_3d> residual=x-tmp;\n\ttruncate(world,residual);\n\n\t// Calculate Second Order Energy Update\t(complex conjugate implicit in inner)\n\tdouble_complex tmp1 = inner(world,residual,pot+global_shift*x).sum();\n//\tdouble_complex tmp11= inner(world,pot,x).sum();\n\t// squared norm of GVpsi (Psi_tilde)\n\tdouble_complex tmp2 = inner(world,tmp,tmp).sum();\n\n//\tprint(\" sou = Vp * res / Vp * tmp\");\n//\tdouble_complex tmp1=inner(pot,residual);\n//\tdouble_complex tmp2=inner(x,tmp);\n\n\tprint(\"tmp1,tmp2,tmp11\",tmp1,tmp2);\n\tconst double sou=-real(tmp1)/real(tmp2);\n\troot.omega+=sou;\n\troot.energy_change=sou;\n\n\treturn residual*nemo->sbox;\n\n}\n\nstd::vector<Zcis::root> Zcis::read_guess() const {\n\tstd::vector<root> guess(cis_param.guess_excitations());\n\tstd::string name=\"cis_guess\";\n\tprint(\"reading cis guess from file\",name);\n\n\tarchive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, name.c_str(), 1);\n\tstd::size_t size1=0, size2=0, size3=0, size4=0; // zeroed to silence clang++ uninit warnings\n\n\tfor (root& g : guess) {\n\t\tar & g.omega & g.delta & g.energy_change ;\n\t\tar & size1 & size2 & size3 & size4;\n        g.afunction.resize(size1);\n        g.bfunction.resize(size2);\n        g.apot.resize(size3);\n        g.bpot.resize(size4);\n        for (auto& a: g.afunction) ar & a;\n        for (auto& a: g.bfunction) ar & a;\n        for (auto& a: g.apot) ar & a;\n        for (auto& a: g.bpot) ar & a;\n\t}\n\treturn guess;\n}\n\nvoid Zcis::save_guess(const std::vector<root>& roots) const {\n\tstd::string name=\"cis_guess\";\n\tprint(\"saving cis guess to file\",name);\n\tarchive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, name.c_str(), 1);\n\tfor (const root& g : roots) {\n\t\tar & g.omega & g.delta & g.energy_change ;\n\t\tstd::size_t size1=g.afunction.size();\n\t\tstd::size_t size2=g.bfunction.size();\n\t\tstd::size_t size3=g.apot.size();\n\t\tstd::size_t size4=g.bpot.size();\n\t\tar & size1 & size2 & size3 & size4;\n        for (const auto& a: g.afunction) ar & a;\n        for (const auto& a: g.bfunction) ar & a;\n        for (const auto& a: g.apot) ar & a;\n        for (const auto& a: g.bpot) ar & a;\n\t}\n}\n\n\nstd::vector<Zcis::root> Zcis::make_guess() const {\n\n\tstd::vector<complex_function_3d> avirtuals, bvirtuals;\n\tTensor<double> aveps,bveps;\t\t// virtual orbital energies for alpha and beta\n\treal_function_3d adens=real(dot(world,conj(world,nemo->amo),nemo->amo)).truncate();\n\treal_function_3d bdens=real(dot(world,conj(world,nemo->bmo),nemo->bmo)).truncate();\n\treal_function_3d density=adens + bdens;\n\tif (nemo->get_calc_param().spin_restricted()) density.scale(2.0);\n\n\tdensity.print_size(\"density in make_guess\");\n\n\tstd::vector<root> guess(cis_param.guess_excitations());\n\n\tfor (std::string spin : {\"alpha\",\"beta\"}) {\n\t\tprint(\"spin \" ,spin);\n\t\tstd::vector<complex_function_3d>& virtuals =(spin==\"alpha\") ? avirtuals : bvirtuals;\n\t\tstd::vector<complex_function_3d> mo= (spin==\"alpha\") ? active_mo(nemo->amo) : active_mo(nemo->bmo);\n\t\tif (mo.size()==0) continue;\n\n\t\t// prepare the list of excitation operators and copied seeds\n\t\tstd::vector<coord_3d> centers = guessfactory::compute_centroids(mo);\n\t\tstd::vector<std::pair<std::vector<complex_function_3d>, std::string> > exlist;\n\t\t{\n\t//\t\tstd::vector<std::string> exop_strings=cis_param.exops();\n\t\t\tstd::vector<std::string> exop_strings=(guessfactory::make_predefined_exop_strings(cis_param.guess_excitation_operators()));\n\t\t\tfor(const auto& ex: exop_strings){\n\t\t\t\tstd::vector<complex_function_3d> cseed=copy(world,mo,false);\n\t\t\t\texlist.push_back(std::make_pair(cseed,ex));\n\t\t\t}\n\t\t\tprint(exop_strings);\n\t\t}\n\t\tworld.gop.fence();\n\t\tstd::cout << \"will create \" << exlist.size()*centers.size() << \" virtuals, from \" << centers.size()\n\t\t\t\t<< \" seeds and \" << exlist.size() << \" excitation operators\"   << std::endl;\n\n\t\t// create the virtuals by unary operations: multiply excitation operators with seeds\n\t\tfor(auto it : exlist){\n\t\t\tvirtuals=append(virtuals,guessfactory::apply_trigonometric_exop(it.first,it.second,centers,false));\n\t\t}\n\t\tworld.gop.fence();\n\n\n\t\tif (spin==\"alpha\") virtuals=Qa(virtuals);\n\t\telse if (spin==\"beta\") virtuals=Qb(virtuals);\n\n\t\t// remove linear dependencies\n\t\tconst size_t spre=virtuals.size();\n\t\tvirtuals=orthonormalize_canonical(virtuals,1.e-6);\n\t\tif(virtuals.size()!=spre) std::cout << \"removed \" << spre-virtuals.size() << \" virtuals due to linear dependencies\" << std::endl;\n\t}\n\n\t// canonicalize virtuals and set up the CIS matrix\n\tif (avirtuals.size()>0) canonicalize(nemo->amo,density,avirtuals,aveps);\n\tif (bvirtuals.size()>0) canonicalize(nemo->bmo,density,bvirtuals,bveps);\n\n\t// active orbital energies only\n\tint anoct=noct(nemo->aeps).size();\n\tint bnoct=noct(nemo->beps).size();\n\tTensor<double> oeps=concatenate(noct(nemo->aeps),noct(nemo->beps));\n\tTensor<double> veps=concatenate(aveps,bveps);\n//\tauto [ae,be] = split(veps,nemo->aeps.size());\n\n\tTensor<double_complex> MCISa=make_CIS_matrix(aveps,noct(nemo->aeps));\n\tTensor<double_complex> MCISb=make_CIS_matrix(bveps,noct(nemo->beps));\n\tTensor<double_complex> MCIS(MCISa.dim(0)+MCISb.dim(0),MCISa.dim(1)+MCISb.dim(1));\n\tif (MCISa.size()>0) MCIS(Slice(0,MCISa.dim(0)-1,1),Slice(0,MCISa.dim(0)-1,1))=MCISa;\n\tif (MCISb.size()>0) MCIS(Slice(MCISa.dim(0),-1,1),Slice(MCISa.dim(0),-1,1))=MCISb;\n\n\t// compute matrix CIS excitation energies\n\tTensor<double_complex> U,UU;\n\tTensor<double> evals;\n\tsyev(MCIS, U, evals);\n\tprint(\"MCIS excitation energies \",evals);\n\tif (evals.size()<cis_param.guess_excitations()) {\n\t\tprint(\"number of requested excitations larger than the number of MCIS energies\");\n\t\tMADNESS_EXCEPTION(\"increase the guess\",1);\n\t}\n//\tprint(real(U));\n//\tprint(\"MCIS excitation vectors\");\n//\tfor (int i=0; i<cis_param.guess_excitations(); ++i) print(real(U(_,i)));\n\n\n\t// assemble the guess vectors\n\n\tstd::vector<complex_function_3d> abvirtuals=append(avirtuals,bvirtuals);\n\t//int nvirt = abvirtuals.size();\n\tint nva=avirtuals.size();\n\tint nvb=bvirtuals.size();\n\tauto get_vir_idx_a = [nva](int I) {return I%nva;};\n\tauto get_occ_idx_a = [nva](int I) {return I/nva;};\n\tauto get_vir_idx_b = [nvb](int I) {return I%nvb;};\n\tauto get_occ_idx_b = [nvb](int I) {return I/nvb;};\n\n//\tprint_size(world,avirtuals,\"avirtuals\");\n//\tprint_size(world,bvirtuals,\"bvirtuals\");\n\n\t// split U into alpha and beta parts\n\tTensor<double_complex> Ua,Ub;\n\tif (nva>0) Ua=U(Slice(0,MCISa.dim(0)-1),_);\t// alpha part for all excitations\n\tif (nvb>0) Ub=U(Slice(MCISa.dim(0),-1),_);\t// beta part for all excitations\n//\tprint(\"Ua, Ub\");\n//\tprint(Ua);\n//\tprint(Ub);\n\n\n\tfor (size_t I = 0, iexcitation=0; I < size_t(MCIS.dim(1)); ++I, iexcitation++) {\n\t        if (iexcitation >= size_t(cis_param.guess_excitations())) break;\n\n\t\tguess[iexcitation].afunction=zero_functions_compressed<double_complex,3>(world,anoct);\n\t\tguess[iexcitation].bfunction=zero_functions_compressed<double_complex,3>(world,bnoct);\n\n\t\tif (evals(I) < 0.0 && world.rank() == 0)\n\t\t\tMADNESS_EXCEPTION(\"NEGATIVE EIGENVALUE IN INITIAL DIAGONALIZATION: CHECK YOUR REFERENCE!\\n\",0);\n\n\t\tguess[iexcitation].omega = evals(I);\n\n\t\t// alpha part\n\t\tif (Ua.size()>0) {\n\t\t        for (size_t J = 0; J < size_t(Ua.dim(0)); ++J) {\n\t\t\t\tconst int b = get_vir_idx_a(J);\n\t\t\t\tconst int j = get_occ_idx_a(J);\n\t\t\t\tconst double_complex xjb = Ua(J, I);\n\t\t\t\tguess[iexcitation].afunction[j] += xjb * avirtuals[b];\n\t\t\t}\n\t\t}\n\n\t\t// beta part\n\t\tif (Ub.size()>0) {\n\t\t        for (size_t J = 0; J < size_t(Ub.dim(0)); ++J) {\n\t\t\t\tconst int b = get_vir_idx_b(J);\n\t\t\t\tconst int j = get_occ_idx_b(J);\n\t\t\t\tconst double_complex xjb = Ub(J, I);\n\t\t\t\tguess[iexcitation].bfunction[j] += xjb * bvirtuals[b];\n\t\t\t}\n\t\t}\n\t\tprint_size(world,guess[iexcitation].afunction,\"afunction\");\n\t\tprint_size(world,guess[iexcitation].bfunction,\"bfunction\");\n\t}\n\tfor (auto& x : guess) truncate(world, x.afunction, cis_param.thresh());\n\tfor (auto& x : guess) truncate(world, x.bfunction, cis_param.thresh());\n\torthonormalize(guess);\n\n\treturn guess;\n\n}\n\nvoid Zcis::canonicalize(const std::vector<complex_function_3d>& mo, const real_function_3d& density,\n\t\tstd::vector<complex_function_3d>& virtuals, Tensor<double>& veps) const {\n\n\tZnemo::potentials pot=nemo->compute_potentials(mo,density,virtuals);\n\tTensor<double_complex> fock=nemo->compute_vmat(virtuals,pot);\n\tKinetic<double_complex,3> T(world);\n\tfock+=T(virtuals,virtuals);\n//\tprint(\"virtual Fock\");\n//\tprint(fock);\n\n\t// get the fock transformation matrix\n\tTensor<double_complex> U;\n\tTensor<double_complex> overlap=matrix_inner(world,virtuals,virtuals);\n    sygvp(world, fock, overlap, 1, U, veps);\n//    print(\"virtual orbital energies\",veps);\n    virtuals = madness::transform(world, virtuals, U);\n\n\n}\n\nTensor<double_complex> Zcis::make_CIS_matrix(const Tensor<double>& veps, const Tensor<double>& act) const {\n\n\t// the cis matrix is indexed by ij and ab\n\t// we will use the combined indixes from ia and jb named I and J\n\t// in order to not be confused we use the following helper functions\n\tconst int nact = act.size();\n\t// determines for which orbitals (couting from the HOMO downwards) the off-diagonal elements will be computed\n\t// this simplifies the guess\n\tconst int nvirt = veps.size();\n\n//\tprint(\"eps(occ), eps(vir)\");\n//\tprint(act);\n//\tprint(veps);\n\tconst int dim=(nvirt*nact);\n\tstd::cout << \"CIS-Matrix for guess calculation will be of size \" << dim << \"x\" << dim <<std::endl;\n\t// the number of the matrix where elements which are not determined by orbital energies and the fock matrix are computed (controlled over active_guess_orbitals parameter)\n\tTensor<double> MCIS(dim,dim);\n\n\tauto get_vir_idx = [nvirt](int I) {return I%nvirt;};\n\tauto get_occ_idx = [nvirt](int I) {return I/nvirt;};\n\n\tfor(int I=0;I<dim;++I){\n\t\tconst int a=get_vir_idx(I);\n\t\tconst int i=get_occ_idx(I);\n\t\tMCIS(I,I) = veps(a)-act(i);\n\t}\n\treturn MCIS;\n\n}\n\nvoid Zcis::orthonormalize(std::vector<root>& roots, const Tensor<double_complex>& fock_pt) const {\n\tnormalize(roots);\n\tTensor<double_complex> ovlp(roots.size(),roots.size());\n\tfor (size_t i=0; i<roots.size(); ++i) {\n\t\tfor (size_t j=0; j<roots.size(); ++j) {\n\t\t\tovlp(i,j)=inner(roots[i],roots[j]);\n\t\t}\n\t}\n\n\t// orthonormalize alpha and beta part\n\tTensor<double_complex> U;\n\tTensor<double> e;\n\tsygv(fock_pt, ovlp, 1, U, e);\n\tstd::vector<root> tmp = transform(world,roots,U);\n\tfor (size_t i=0; i<tmp.size(); ++i) {\n\t\troots[i].afunction=tmp[i].afunction;\n\t\troots[i].bfunction=tmp[i].bfunction;\n\t\troots[i].apot=tmp[i].apot;\n\t\troots[i].bpot=tmp[i].bpot;\n\t}\n\tnormalize(roots);\n}\n\n\nvoid Zcis::orthonormalize(std::vector<root>& roots) const {\n\tnormalize(roots);\n\n\tdouble maxq;\n\tdo {\n\n\t\tTensor<double_complex> ovlp(roots.size(),roots.size());\n\t\tfor (size_t i=0; i<roots.size(); ++i) {\n\t\t\tfor (size_t j=0; j<roots.size(); ++j) {\n\t\t\t\tovlp(i,j)=inner(roots[i].afunction,roots[j].afunction)+inner(roots[i].bfunction,roots[j].bfunction);\n\t\t\t}\n\t\t}\n\n\t\tTensor<double_complex> Q = NemoBase::Q2(ovlp);\n\t\tmaxq = 0.0;\n\t\tfor (int j=1; j<Q.dim(0); j++)\n\t\t\tfor (int i=0; i<j; i++) {\n\t\t\t\tmaxq = std::max(std::abs(Q(j,i)),maxq);\n\t\t\t}\n//\t\tamo = transform(world, amo, Q, 0.0, true);\n\t\tstd::vector<root> tmp = transform(world,roots,Q);\n\t\tfor (size_t i=0; i<tmp.size(); ++i) {\n\t\t\troots[i].afunction=tmp[i].afunction;\n\t\t\troots[i].bfunction=tmp[i].bfunction;\n\t\t\troots[i].apot=tmp[i].apot;\n\t\t\troots[i].bpot=tmp[i].bpot;\n\t\t}\n//\t\tprint(\"maxq\",maxq);\n\t} while (maxq>0.01);\n\n\tnormalize(roots);\n}\n\n\nvoid Zcis::normalize(std::vector<root>& roots) const {\n\n\tfor (auto root : roots) {\n\t\tdouble na=0.0, nb=0.0;\n        if (root.afunction.size()>0) na = norm2(world, root.afunction);\n        if (root.bfunction.size()>0) nb = norm2(world, root.bfunction);\n        double n=sqrt(na*na + nb*nb);\n        scale(world,root.afunction,1.0/n);\n        scale(world,root.bfunction,1.0/n);\n\t}\n}\n\n\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/chem/zcis.h",
    "content": "/*\n * Complexcis.h\n *\n *  Created on: 21 Nov 2018\n *      Author: fbischoff\n */\n\n#ifndef SRC_APPS_CHEM_ZCIS_H_\n#define SRC_APPS_CHEM_ZCIS_H_\n\n#include<madness/chem/projector.h>\n#include<madness/mra/mra.h>\n#include<tuple>\n#include<madness/chem/znemo.h>\n\n\nnamespace madness {\n\n\n\nclass Complex_CIS_Parameters : public QCCalculationParametersBase {\npublic:\n\n\t/// ctor reading out the input file\n    Complex_CIS_Parameters(World& world, const commandlineparser& parser) : Complex_CIS_Parameters() {\n        read_input_and_commandline_options(world,parser,\"response\");\n    }\n\n\tComplex_CIS_Parameters() {\n\n\t\t/// the parameters with the enum key, the constructor taking the input file key and a default value\n\t\tinitialize<std::string>(\"guess_excitation_operators\",\"dipole+\");\n\t\tinitialize<std::vector<std::string> >(\"exops\",{\"x 1.0\",\"y 1.0\",\"z 1.0\",\"x 2.0 , y 2.0 , z 2.0\"});\n\t\tinitialize<int>(\"freeze\",0);\n\t\tinitialize<int>(\"guess_excitations\",4);\n\t\tinitialize<int>(\"guess_maxiter\",4);\n\t\tinitialize<double>(\"thresh\",FunctionDefaults<3>::get_thresh());\n\t\tinitialize<double>(\"omega\",0.0);\n\t\tinitialize<int>(\"maxiter\",10);\n\t\tinitialize<bool>(\"swap_ab\",false);\n\t\tinitialize<double>(\"dconv\",1.e-3);\n\t\tinitialize<int>(\"printlevel\",1);\n\n    }\n\n\tstd::string get_tag() const override {\n    \treturn std::string(\"response\");\n    }\n\n\n\tstd::string guess_excitation_operators() const {return get<std::string>(\"guess_excitation_operators\");};\n\tstd::vector<std::string> exops() const {return get<std::vector<std::string> >(\"exops\");};\n\tint freeze() const {return get<int>(\"freeze\");};\n\tint guess_excitations() const {return get<int>(\"guess_excitations\");};\n\tdouble thresh() const {return get<double>(\"thresh\");};\n\tdouble omega() const {return get<double>(\"omega\");};\n\tint maxiter() const {return get<int>(\"maxiter\");};\n\tint guess_maxiter() const {return get<int>(\"guess_maxiter\");};\n\tbool swap_ab() const {return get<bool>(\"swap_ab\");};\n\tdouble dconv() const {return get<double>(\"dconv\");};\n\tint printlevel() const {return get<int>(\"printlevel\");};\n\n\n};\n\n\nclass Zcis : public QCPropertyInterface {\npublic:\n\n\tstruct root {\n\t\tstd::vector<complex_function_3d> afunction;\n\t\tstd::vector<complex_function_3d> bfunction;\n\t\tstd::vector<complex_function_3d> apot;\n\t\tstd::vector<complex_function_3d> bpot;\n\t\tdouble omega=0.0;\n\t\tdouble delta=1.e3;\t\t\t\t// last wave function error\n\t\tdouble energy_change=1.e3;\t\t// last energy_change\n\n\t\t/// inner product for the KAIN solver\n\t\tfriend\n\t    double_complex inner(const root& f, const root& g){\n\t\t\tMADNESS_ASSERT(f.afunction.size()==g.afunction.size());\n\t\t\tMADNESS_ASSERT(f.bfunction.size()==g.bfunction.size());\n\t\t\tdouble_complex result=inner(f.afunction,g.afunction) + inner(f.bfunction,g.bfunction);\n\t\t\treturn result;\n\t\t}\n\n\n\t};\n\n\tstatic std::vector<root> transform(World& world,\n\t\t\t  const std::vector<root>& v,\n\t\t\t  const Tensor<double_complex>& c,\n\t\t\t  bool fence=true) {\n\n\t\tint n = v.size();  // n is the old dimension\n\t\tint m = c.dim(1);  // m is the new dimension\n\n\t\tint nocca=v.front().afunction.size();\n\t\tint noccb=v.front().bfunction.size();\n\n\t\tstd::vector<root> result(m);\n\n\t\tfor (auto&& r : result) {\n\t\t\tr.afunction= zero_functions_compressed<double_complex,3>(world, nocca, false);\n\t\t\tr.bfunction= zero_functions_compressed<double_complex,3>(world, noccb, false);\n\t\t\tr.apot= zero_functions_compressed<double_complex,3>(world, nocca, false);\n\t\t\tr.bpot= zero_functions_compressed<double_complex,3>(world, noccb, false);\n\t\t}\n\t\tfor (auto&& vv : v) {\n\t\t\tcompress(world, vv.afunction,false);\n\t\t\tcompress(world, vv.bfunction,false);\n\t\t\tcompress(world, vv.apot,false);\n\t\t\tcompress(world, vv.bpot,false);\n\t\t}\n\t\tworld.gop.fence();\n\n\t\tfor (int i=0; i<m; ++i) {\n\t\t\tfor (int j=0; j<n; ++j) {\n\t\t\t\tgaxpy(world,double_complex(1.0),result[i].afunction,c(j,i),v[j].afunction,false);\n\t\t\t\tgaxpy(world,double_complex(1.0),result[i].bfunction,c(j,i),v[j].bfunction,false);\n\t\t\t\tif (v[j].apot.size()>0) gaxpy(world,double_complex(1.0),result[i].apot,c(j,i),v[j].apot,false);\n\t\t\t\tif (v[j].bpot.size()>0) gaxpy(world,double_complex(1.0),result[i].bpot,c(j,i),v[j].bpot,false);\n\t\t\t}\n\t\t}\n\n\t\tif (fence) world.gop.fence();\n\t\treturn result;\n\t}\n\n\n\n\tZcis(World& w, const commandlineparser& parser, std::shared_ptr<Znemo> n) : world(w), cis_param(world, parser), nemo(n),\n\t\tQa(nemo->amo,nemo->amo), Qb(nemo->bmo,nemo->bmo) {\n\t\tcis_param.print(\"response\",\"end\");\n\t\tprint(\"Qa projector\",Qa.get_ket_vector().size());\n\t\tprint(\"Qb projector\",Qb.get_ket_vector().size());\n\n\t}\n\n\tvirtual ~Zcis() {};\n\n\tdouble value();\n\n    static void help() {\n        print_header2(\"help page for ZCIS\");\n        print(\"The zcis code computes excited states for a znemo calculation in the CIS approximation\");\n        print(\"\\nYou can print all available calculation parameters by running\\n\");\n        print(\"zcis --print_parameters\\n\");\n        print(\"You can perform a simple calculation by running\\n\");\n        print(\"zcis --geometry=h2o.xyz\\n\");\n        print(\"provided you have an xyz file in your directory.\");\n\n    }\n\n    static void print_parameters() {\n        Complex_CIS_Parameters param;\n        print(\"The zcis program requires converged znemo orbitals\");\n        print(\"\\ndefault parameters for the response part of the zcis program are\");\n        param.print(\"response\",\"end\");\n        print(\"\\n\\nthe molecular geometry must be specified in a separate block:\");\n        Molecule::print_parameters();\n    }\n\n\n    std::string name() const {return \"zcis\";};\n\n    virtual bool selftest() {\n        return true;\n    };\n\tvoid iterate(std::vector<root>& roots) const;\n\n\tvoid compute_potentials(std::vector<root>& roots, const real_function_3d& totdens) const;\n\n\tstd::vector<complex_function_3d> compute_residuals(root& root) const;\n\n\tstd::vector<root> read_guess() const;\n\n\tvoid save_guess(const std::vector<root>& roots) const;\n\n\tstd::vector<root> make_guess() const;\n\n\tvoid canonicalize(const std::vector<complex_function_3d>& mo, const real_function_3d& density,\n\t\t\tstd::vector<complex_function_3d>& virtuals, Tensor<double>& veps) const;\n\n\tTensor<double_complex> make_CIS_matrix(const Tensor<double>& veps, const Tensor<double>& oeps) const;\n\n\tTensor<double_complex> compute_fock_pt(const std::vector<root>& roots) const;\n\n\n\t/// return the active orbitals only\n\tTensor<double> noct(const Tensor<double>& eps) const {\n\t\tif (eps.size()<=cis_param.freeze()) return Tensor<double>();\n\t\treturn eps(Slice(cis_param.freeze(),-1,1));\n\t}\n\n\t/// return the active orbitals only\n\tstd::vector<complex_function_3d> active_mo(const std::vector<complex_function_3d>& mo) const {\n\t     if (mo.size()<=size_t(cis_param.freeze())) return std::vector<complex_function_3d> ();\n\t\tstd::vector<complex_function_3d> result;\n\t\tresult.insert(result.end(),mo.begin()+cis_param.freeze(),mo.end());\n\t\treturn result;\n\t}\n\n\t/// little helper function\n\ttemplate<typename T>\n\tstatic Tensor<T> concatenate(const Tensor<T>& t1, const Tensor<T>& t2) {\n\t\tMADNESS_ASSERT(t1.ndim()==1 or t1.size()==0);\n\t\tMADNESS_ASSERT(t2.ndim()==1 or t2.size()==0);\n\t\tTensor<T> result(t1.size()+t2.size());\n\t\tif (t1.size()>0) result(Slice(0,t1.size()-1,1))=t1;\t// slices count inclusive\n\t\tif (t2.size()>0) result(Slice(t1.size(),-1,1))=t2;\n\t\treturn result;\n\t}\n\n\ttemplate<typename T>\n\tstatic std::tuple<Tensor<T>, Tensor<T> > split(const Tensor<T>& rhs, int dim1) {\n\n\t\tMADNESS_ASSERT(dim1>=0 and dim1<=rhs.size());\n\t\tif (dim1==0) return std::make_tuple(Tensor<T>(),rhs);\n\t\tif (dim1==rhs.size()) return std::make_tuple(rhs,Tensor<T>());\n\n\t\tTensor<T> t1=rhs(Slice(0,dim1-1,1));\n\t\tTensor<T> t2=rhs(Slice(dim1,-1,1));\n\t\treturn std::make_tuple(t1,t2);\n\t}\n\n\tvoid orthonormalize(std::vector<root>& roots, const Tensor<double_complex>& fock_pt_a) const;\n\n\tvoid orthonormalize(std::vector<root>& roots) const;\n\n\tvoid normalize(std::vector<root>& roots) const;\n\n\tvoid compare_to_file(const std::vector<complex_function_3d>& rhs, const std::string name) const {\n\t\tif (nemo->get_calc_param().spin_restricted()) {\n\t\t\tsave_function(rhs,name);\n\n\t\t} else {\n\t\t\tstd::vector<complex_function_3d> rhs_file=zero_functions_compressed<double_complex,3>(world,rhs.size());\n\t\t\tstd::vector<complex_function_3d> rhs_file1;\n\t\t\tload_function(world,rhs_file1,name);\n\t\t\tfor (size_t i=0; i<rhs_file1.size(); ++i) rhs_file[i]=rhs_file1[i];\n\t\t\tstd::vector<double> dnorm=norm2s(world,rhs-rhs_file);\n\t\t\tprint(name,\"diffnorm\",dnorm);\n\t\t}\n\t}\n\n\n\tstatic std::tuple<std::vector<complex_function_3d>, std::vector<complex_function_3d> >\n\tsplit(const std::vector<complex_function_3d>& rhs, int dim1) {\n\n\t        MADNESS_ASSERT(dim1>=0 and size_t(dim1)<=rhs.size());\n\t\tif (dim1==0) return std::make_tuple(std::vector<complex_function_3d>(),rhs);\n\t\tif (size_t(dim1)==rhs.size()) return std::make_tuple(rhs,std::vector<complex_function_3d>());\n\n\t\tstd::vector<complex_function_3d> t1,t2;\n\t\tcopy(rhs.begin(),rhs.begin()+dim1,back_inserter(t1));\n\t\tcopy(rhs.begin()+dim1,rhs.end(),back_inserter(t2));\n\n\t\treturn std::make_tuple(t1,t2);\n\t}\n\n\t/// the world\n\tWorld& world;\n\n\t/// the parameters\n\tComplex_CIS_Parameters cis_param;\n\n\t/// the reference\n\tstd::shared_ptr<Znemo> nemo;\n\n\t/// orthogonality projector\n\tQProjector<double_complex,3> Qa, Qb;\n\n\t/// the x vectors\n\tstd::vector<root> roots;\n\n};\n\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_ZCIS_H_ */\n"
  },
  {
    "path": "src/madness/chem/znemo.cc",
    "content": "/*\n * Nemocomplex.cc\n *\n *  Created on: 14 Nov 2018\n *      Author: fbischoff\n */\n\n#include <madness/mra/mra.h>\n#include \"znemo.h\"\n#include<madness/chem/diamagneticpotentialfactor.h>\n#include <madness/world/test_utilities.h>\n#include<madness/chem/masks_and_boxes.h>\n#include<madness/chem/MolecularOrbitals.h>\n\n\n\nnamespace madness {\n\nZnemo::Znemo(World& world, const commandlineparser& parser) : NemoBase(world), mol(world,parser), param(world,parser),\n                    calc_param(world,parser) {\n\tcalc_param.set_derived_value(\"k\",9);\n\tcalc_param.read_input_and_commandline_options(world,parser,\"dft\");\n\n    FunctionDefaults<3>::set_k(calc_param.k());\n    FunctionDefaults<3>::set_thresh(calc_param.econv());\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_initial_level(5);\n    FunctionDefaults<3>::set_truncate_mode(1);\n\n    aobasis.read_file(calc_param.aobasis());\n//    cparam.set_molecular_info(mol, aobasis, 0);\n    calc_param.set_derived_values(mol);\n\n    FunctionDefaults<3>::set_cubic_cell(-calc_param.L(), calc_param.L());\n    calc_param.set_derived_value(\"spin_restricted\",false);\n\n\tparam.set_derived_values();\n\n\tprint_info=printleveler(param.printlevel());\n\n\tif (world.rank()==0 and print_info.print_setup()) {\n\t\tparam.print(\"complex\",\"end\");\n\t\tcalc_param.print(\"dft\",\"end\");\n\t\tmol.print();\n\t}\n\n\tB={0,0,param.physical_B()};\n\n\n    // set the linear moments\n    for (int i=0; i<3; ++i) rvec.push_back(real_factory_3d(world).functor([&i] (const coord_3d& r) {return r[i];}));\n\n\tcoulop=std::shared_ptr<real_convolution_3d>(CoulombOperatorPtr(world,calc_param.lo(),calc_param.econv()));\n};\n\nbool Znemo::need_recompute_factors_and_potentials(const double thresh) const {\n\tbool need=NemoBase::need_recompute_factors_and_potentials(thresh);\n\tif ((not (potentialmanager.get() and potentialmanager->vnuclear().is_initialized()))\n\t        \t\tor (potentialmanager->vnuclear().thresh()>thresh)) need=true;\n    if (not diafac.get()) need=true;\n    return need;\n}\n\nvoid Znemo::invalidate_factors_and_potentials() {\n    NemoBase::invalidate_factors_and_potentials();\n\tdiafac.reset();\n\tpotentialmanager.reset();\n}\n\nvoid Znemo::recompute_factors_and_potentials(const double thresh) {\n\n\tprint(\"recomputing factors and potentials in znemo\");\n    // compute the nuclei's positions in the \"A\" space\n\tdiafac.reset(new Diamagnetic_potential_factor(world,param,mol.get_all_coords_vec()));\n\n\tcoord_3d box_offset={0.0,0.0,0.0};\n\tif (param.box().size()==5) box_offset={param.box()[2],param.box()[3],param.box()[4]};\n\tspherical_box<3> sbox2(param.box()[0],param.box()[1],box_offset);\n\tsbox=real_factory_3d(world).functor(sbox2);\n\n\t// the guess is read from a previous nemo calculation\n\t// make sure the molecule was not reoriented there\n\tif (not mol.parameters.no_orient()) {\n\t\tMADNESS_EXCEPTION(\"the molecule of the reference calculation was reoriented\\n\\n\",1);\n\t}\n\n\tpotentialmanager=std::shared_ptr<PotentialManager>(new PotentialManager(mol, molecule().parameters.core_type()));\n\tpotentialmanager->make_nuclear_potential(world);\n    construct_nuclear_correlation_factor(mol, potentialmanager, nemo_param.ncf());\n\n\t// currently we cannot have the diamagnetic factor and the nuclear correlation factor\n\t// at the same time\n\tif (ncf->type()!=NuclearCorrelationFactor::None and (param.explicit_B()!=0.0)) {\n\t\tMADNESS_EXCEPTION(\"no use of diamagnetic factor and nuclear correlation factor at the same time\",1);\n\t}\n\n    // (re) construct the Poisson solver\n\tcoulop=std::shared_ptr<real_convolution_3d>(CoulombOperatorPtr(world,get_calc_param().lo(),get_calc_param().econv()));\n\n}\n\nbool Znemo::test() const {\n\tbool success=true;\n\ttry {\n\t\tsuccess=success and diafac->test_me(1);\n\t\tsuccess=success and test_U_potentials();\n\t} catch (...) {\n\t\tprint(\"tests failed..\");\n//\t\tMADNESS_EXCEPTION(\"tests failed\",1);\n\t}\n\treturn success;\n}\n\n/// test the identity <F| f (T + Vdia ) f |F> = <F|f^2 (T + Udia) |F>\nbool Znemo::test_U_potentials() const {\n\n\ttest_output t(\"entering Znemo::test_U_potentials .. \");\n\n\tstd::vector<complex_function_3d> ket=diafac->make_fake_orbitals(2,{0.0,1.0,0.5});\n\tstd::vector<complex_function_3d> bra=diafac->make_fake_orbitals(2,{0.1,-0.1,0.3});\n\tstd::vector<complex_function_3d> ket_R2=diafac->factor_square()*ket;\n\tstd::vector<complex_function_3d> bra_R2=diafac->factor_square()*bra;\n\tstd::vector<complex_function_3d> ket_R=diafac->factor()*ket;\n\tstd::vector<complex_function_3d> bra_R=diafac->factor()*bra;\n\n\tdouble thresh=FunctionDefaults<3>::get_thresh();\n\tKinetic<double_complex,3> T(world);\n\n\tdouble_complex t1,t2;\n\tfor (size_t i=0; i<ket_R.size(); ++i) {\n\t\tt1+=T(bra_R[i],ket_R[i]);\n\t\tt2+=T(bra_R2[i],ket[i]);\n\t}\n\tdouble_complex vdia=inner(bra_R,diafac->bare_diamagnetic_potential()*ket_R);\n\tdouble_complex udia=inner(bra_R2,diafac->apply_potential(ket));\n\n\tt.logger << \"<amo | R T R | amo>    \"<< t1 << std::endl;\n\tt.logger << \"<amo | R2 T  | amo>    \"<< t2 << std::endl;\n\tt.logger << \"<amo | R2 V_dia | amo> \"<< vdia<< std::endl;\n\tt.logger << \"<amo | R2 U_dia | amo> \"<< udia<< std::endl;\n\n\tdouble error=std::abs(t1 + vdia - t2 - udia);\n\tt.logger << \"error  \"<< error<< std::endl;\n\tt.logger << \"Note: if all individual potentials are correct and precise, check \\n\"\n\t\t\t<< \"diamagnetic_height and box_softness as the most probable source of imprecision \" << std::endl;\n\n\treturn t.end(error<thresh);\n}\n\n\n/// compute the molecular energy\ndouble Znemo::value(const Tensor<double>& x) {\n\n\tif ((x-mol.get_all_coords()).normf()>1.e-12) invalidate_factors_and_potentials();\n\n\t// compute the molecular potential\n\tmol.set_all_coords(x.reshape(mol.natom(),3));\n\tif (need_recompute_factors_and_potentials(get_calc_param().econv()))\n\t\trecompute_factors_and_potentials(get_calc_param().econv());\n\n\tget_initial_orbitals();\n\n\titerate();\n\n\tsave_orbitals(\"final\");\n\tsave_orbitals();\n\n\tdouble energy=analyze();\n    output_calc_info_schema(energy);\n\n\treturn energy;\n}\n\nvoid Znemo::output_calc_info_schema(const double& energy) const {\n    nlohmann::json j;\n    j[\"scf_eigenvalues_a\"]=tensor_to_json(aeps);\n    j[\"scf_eigenvalues_b\"]=tensor_to_json(beps);\n    j[\"model\"]=\"UHF\";\n    j[\"B\"]=this->B;\n    j[\"driver\"]=\"energy\";\n    j[\"return_energy\"]=energy;\n    update_schema(get_calc_param().prefix()+\".calc_info\", j);\n}\n\nTensor<double> Znemo::gradient(const Tensor<double>& x) {\n\n\tMADNESS_ASSERT(param.explicit_B()==0.0);\n\tconst real_function_3d rhonemo=compute_nemo_density(amo,bmo);\n\tconst Tensor<double> grad=NemoBase::compute_gradient(rhonemo,mol);\n\n    if (world.rank() == 0) {\n        print(\"\\n Derivatives (a.u.)\\n -----------\\n\");\n        print(\"  atom        x            y            z          dE/dx        dE/dy        dE/dz\");\n        print(\" ------ ------------ ------------ ------------ ------------ ------------ ------------\");\n        for (size_t i = 0; i < mol.natom(); ++i) {\n            const Atom& atom = mol.get_atom(i);\n            printf(\" %5d %12.6f %12.6f %12.6f %12.6f %12.6f %12.6f\\n\", int(i),\n                   atom.x, atom.y, atom.z, grad[i * 3 + 0], grad[i * 3 + 1],\n                   grad[i * 3 + 2]);\n        }\n    }\n    return grad;\n}\n\n\nvoid Znemo::iterate() {\n\n\tdouble thresh=FunctionDefaults<3>::get_thresh();\n\tdouble energy=1.e10;\n\tdouble oldenergy=0.0;\n\n\t// the diamagnetic box\n\n//\tXNonlinearSolver<std::vector<complex_function_3d> ,double_complex, allocator<double_complex,3> > solvera(allocator<double_complex,3> (world,amo.size()));\n//\tXNonlinearSolver<std::vector<complex_function_3d> ,double_complex, allocator<double_complex,3> > solverb(allocator<double_complex,3> (world,bmo.size()));\n    auto solvera= nonlinear_vector_solver<double_complex,3>(world,amo.size());\n    auto solverb= nonlinear_vector_solver<double_complex,3>(world,bmo.size());\n\tsolvera.set_maxsub(get_calc_param().maxsub()); // @suppress(\"Method cannot be resolved\")\n\tsolvera.do_print=(param.printlevel()>2);\n\tsolverb.set_maxsub(get_calc_param().maxsub());\n\tsolverb.do_print=(param.printlevel()>2);\n\n\t// set end of iteration cycles for intermediate calculations\n\tint maxiter = get_calc_param().maxiter();\n\tdouble dconv=get_calc_param().dconv();\n\tdouble na=1.0,nb=1.0;\t// residual norms\n\n\tsolvera.clear_subspace();\n\tsolverb.clear_subspace();\n\tbool converged=false;\n\n\t// iterate the SCF cycles\n\tfor (int iter=0; iter<maxiter; ++iter) {\n//\t\tif (iter%10==0) save_orbitals(\"iteration\"+stringify(iter));\n\t\tsave_orbitals();\n\n\t\t// compute the density\n\t\treal_function_3d density=compute_density(amo,bmo);\n\n\t\t// compute the dual of the orbitals\n\t\tstd::vector<complex_function_3d> R2amo=make_bra(amo);\n\t\tstd::vector<complex_function_3d> R2bmo=make_bra(bmo);\n\n\t\t// compute the fock matrix\n\t\tstd::vector<complex_function_3d> Vnemoa, Vnemob;\n\t\tTensor<double_complex> focka, fockb(0l,0l);\n\t\tpotentials apot(world,amo.size()), bpot(world,bmo.size());\n\n\t\tapot=compute_potentials(amo, density, amo);\t\t// 4.53\n\t\tVnemoa=apot.vnuc_mo+apot.lz_mo+apot.lz_commutator+\n\t\t\t\tapot.diamagnetic_mo+apot.spin_zeeman_mo-apot.K_mo+apot.J_mo+apot.zeeman_R_comm;\n\t\ttruncate(world,Vnemoa,thresh*0.1);\n\t\tKinetic<double_complex,3> T(world);\n\t\tfocka=T(R2amo,amo) + compute_vmat(amo,apot);\t\t// 0.5??\n\n\t\tif (have_beta()) {\n\t\t\tbpot=compute_potentials(bmo, density, bmo);\n\t\t\tscale(world,bpot.spin_zeeman_mo,-1.0);\n\t\t\tVnemob=bpot.vnuc_mo+bpot.lz_mo+bpot.lz_commutator+\n\t\t\t\t\tbpot.diamagnetic_mo+bpot.spin_zeeman_mo-bpot.K_mo+bpot.J_mo+bpot.zeeman_R_comm;\n\t\t\ttruncate(world,Vnemob,thresh*0.1);\n\t\t\tfockb=T(R2bmo,bmo) + compute_vmat(bmo,bpot);\n\t\t}\n\n\t\tif (world.rank()==0 and (print_info.print_convergence())) {\n\t\t\tprint(\"Fock matrix\");\n\t\t\tprint(focka);\n\t\t\tprint(fockb);\n\t\t}\n\n\t\toldenergy=energy;\n\t\tenergy=compute_energy(amo,apot,bmo,bpot,print_info.print_convergence(),false);\n//\t\tenergy=compute_energy_no_confinement(amo,apot,bmo,bpot,print_info.print_convergence());\t// 2.48\n\n\t\tTensor<double_complex> ovlp=matrix_inner(world,R2amo,amo);\n\t\tcanonicalize(amo,Vnemoa,apot,solvera,focka,ovlp);\n\t\ttruncate(world,Vnemoa);\n\t\tif (have_beta()) {\n\t\t\tTensor<double_complex> ovlp=matrix_inner(world,R2bmo,bmo);\n\t\t\tcanonicalize(bmo,Vnemob,bpot,solverb,fockb,ovlp);\n\t\t}\n\n\t\tif (world.rank()==0 and (print_info.print_convergence())) print(\"using fock matrix for the orbital energies\");\n\t\tfor (int i=0; i<focka.dim(0); ++i) aeps(i)=real(focka(i,i));\n\t\tfor (int i=0; i<fockb.dim(0); ++i) beps(i)=real(fockb(i,i));\n\n\n\t\tif (world.rank()==0 and (print_info.print_convergence())) {\n\t\t\tprint(\"orbital energies alpha\",aeps);\n\t\t\tprint(\"orbital energies beta \",beps);\n\t\t}\n\t\tif ((world.rank() == 0) and print_info.print_energies()) {\n\t\t\tprintf(\"finished iteration %2d at time %8.1fs with energy, norms %12.8f %12.8f %12.8f\\n\",\n\t\t\t\t\titer, wall_time(), energy, na, nb);\n\t\t}\n\n\t\tif (std::abs(oldenergy-energy)<get_calc_param().econv() and (sqrt(na*na+nb*nb)<dconv)) {\n\t\t\tprint(\"energy converged\");\n\t\t\tsave_orbitals(\"converged\");\n\t\t\tconverged=true;\n\t\t}\n\t\tif (converged) break;\n\n\t\t// compute the residual of the Greens' function\n\t\tdouble levelshifta=param.shift()-param.physical_B()*0.5;\t// account for spin zeeman term\n\t\tstd::vector<complex_function_3d> resa=compute_residuals(Vnemoa,amo,aeps,levelshifta);\t// 2.16\n\n\t\tTensor<double> normsa=real(inner(world,make_bra(resa),resa));\n\t\tna=sqrt(normsa.sumsq());\n\n\t\tstd::vector<complex_function_3d> amo_new=solvera.update(amo,resa,0.01,3);\n\t\tamo_new=truncate(sbox*amo_new);\n\n\t\tdo_step_restriction(amo,amo_new);\n\n\t\tamo=truncate(orthonormalize(amo_new));\n\n\t\tif (have_beta()) {\n\t\t\tdouble levelshiftb=param.shift()+param.physical_B()*0.5;\t// account for spin zeeman term\n\t\t\tstd::vector<complex_function_3d> resb=compute_residuals(Vnemob,bmo,beps,levelshiftb);\n\t\t\ttruncate(world,resb);\n\t\t\tTensor<double> normsb=real(inner(world,make_bra(resb),resb));\n\t\t\tnb=sqrt(normsb.sumsq());\n\n\t\t\tstd::vector<complex_function_3d> bmo_new=solverb.update(bmo,resb,0.01,3);\n\t\t\tbmo_new=truncate(sbox*bmo_new);\n\t\t\tdo_step_restriction(bmo,bmo_new);\n\t\t\tbmo=truncate(orthonormalize(bmo_new));\n\t\t} else {\n\t\t\tnb=0.0;\n\t\t}\n\t}\n}\n\n\nstd::vector<complex_function_3d> Znemo::orthonormalize(const std::vector<complex_function_3d>& mo) const {\n\tstd::vector<complex_function_3d> result=copy(world,mo);\n\tNemoBase::orthonormalize(result,diafac->factor()*R);\n\treturn result;\n}\n\nstd::vector<complex_function_3d> Znemo::normalize(const std::vector<complex_function_3d>& mo) const {\n\tstd::vector<complex_function_3d> result=copy(world,mo);\n\tNemoBase::normalize(result,diafac->factor()*R);\n\treturn result;\n}\n\n\nreal_function_3d Znemo::compute_density(const std::vector<complex_function_3d>& amo,\n\t\tconst std::vector<complex_function_3d>& bmo) const {\n\treturn (compute_nemo_density(amo,bmo)*diafac->factor_square()*R_square).truncate();\n}\n\nreal_function_3d Znemo::compute_spin_density(const std::vector<complex_function_3d>& amo,\n\t\tconst std::vector<complex_function_3d>& bmo) const {\n\treturn (compute_nemo_spin_density(amo,bmo)*diafac->factor_square()*R_square).truncate();\n}\n\nstd::vector<complex_function_3d> Znemo::make_bra(const std::vector<complex_function_3d>& rhs) const {\n\treturn truncate((diafac->factor_square()*R_square)*rhs);\n}\n\n\ndouble Znemo::analyze() {\n\n\tif (need_recompute_factors_and_potentials(get_calc_param().econv()))\n\t\trecompute_factors_and_potentials(get_calc_param().econv());\n\n\treal_function_3d density=compute_density(amo,bmo);\n\treal_function_3d spindensity=compute_spin_density(amo,bmo);\n\n\tpotentials apot(world,amo.size()), bpot(world,bmo.size());\n\tapot=compute_potentials(amo,density,amo);\n\tif (have_beta()) {\n\t\tbpot=compute_potentials(bmo,density,bmo);\n\t\tscale(world,bpot.spin_zeeman_mo,-1.0);\n\t}\n\n\tdouble energy=compute_energy(amo,apot,bmo,bpot,true,true);\n\n\tif (world.rank()==0) {\n\t\tprint(\"orbital energies alpha\",aeps);\n\t\tprint(\"orbital energies beta \",beps);\n\t}\n\n\t// compute the current density\n\tstd::vector<real_function_3d> j=compute_current_density(amo,bmo);\n\tsave(j[0],\"j0\");\n\tsave(j[1],\"j1\");\n\tsave(j[2],\"j2\");\n\n\tLz<double_complex,3> lz(world);\n\t// compute the expectation values of the Lz operator\n\tstd::vector<complex_function_3d> lzamo=0.5*B[2]*lz(amo);\n\tstd::vector<complex_function_3d> lzbmo=0.5*B[2]*lz(bmo);\n\tTensor<double_complex> lza_exp=inner(world,amo,lzamo);\n\tTensor<double_complex> lzb_exp=inner(world,bmo,lzbmo);\n\tprint(\"< amo | lz | amo >\",lza_exp);\n\tprint(\"< bmo | lz | bmo >\",lzb_exp);\n\n    std::vector<real_function_3d> A=compute_magnetic_vector_potential(world,B);\n\n    Tensor<double> p_exp=compute_kinetic_momentum();\n    Tensor<double> A_exp=compute_magnetic_potential_expectation(A);\n\n    print(\"<p>       \",p_exp);\n    print(\"<A>       \",A_exp);\n    print(\"(p-eA)    \",p_exp+A_exp);\n\n    // compute the standard kinetic gauge origin, defined as the gauge origin, where the\n    // expectation value of the kinetic momentum p vanishes\n    const long nmo=amo.size()+bmo.size();\n    Tensor<double> v=-1.0/nmo*p_exp;\n    Tensor<double> S=compute_standard_gauge_shift(p_exp);\n    print(\"standard gauge shift S\",S);\n\n    // compute the standardized components of the canonical momentum square\n    const double v2=v.trace(v);\t// term B^2(Sx^2+Sy^2)\n    const double vp=v.trace(p_exp);\n    const double vA=v.trace(A_exp);\n    print(\"v2, vp, vA\", v2, vp, vA);\n\n    print(\"expectation values in standard gauge\");\n    print(\"Delta 1/2 <p^2>  \",0.5*(nmo*v2 + 2.0*vp));\n\n    print(\"saving orbitals for plotting\");\n\tsave_orbitals(\"plot\");\n\tsave(density,\"density\");\n\tsave(spindensity,\"spindensity\");\n\n\tauto components=std::vector<std::vector<real_function_3d>>({real(amo),imag(amo),real(bmo),imag(bmo)});\n\tauto component_names=std::vector<std::string>({\"real_amo\",\"imag_amo\",\"real_bmo\",\"imag_bmo\"});\n\tstd::vector<real_function_3d> real_aos=SCF::project_ao_basis_only(world, aobasis, mol);\n\tfor (size_t i=0; i<components.size(); ++i) {\n\t\tif (world.rank()==0) print(\"analysis of MO component \",component_names[i]);\n\t\tif (components[i].size()>0) SCF::analyze_vectors(world, components[i], real_aos,\n\t\t\tFunctionDefaults<3>::get_thresh()*0.1, molecule(), get_calc_param().print_level(), aobasis);\n\n\t}\n\n    return energy;\n}\n\n\n//double Znemo::compute_energy_no_confinement(const std::vector<complex_function_3d>& amo, const Znemo::potentials& apot,\n//\t\tconst std::vector<complex_function_3d>& bmo, const Znemo::potentials& bpot, const bool do_print) const {\n//\n//\tMADNESS_EXCEPTION(\"Znemo::compute_energy_no_confinement is inaccurate\",1);\n//\ttimer tenergy(world,print_info.print_timings());\n//    double fac= cparam.spin_restricted() ? 2.0 : 1.0;\n//    std::vector<complex_function_3d> dia2amo=make_bra(amo);\n//    std::vector<complex_function_3d> dia2bmo=make_bra(bmo);\n//    std::vector<complex_function_3d> diaamo=truncate(amo*diafac->factor()*R);\n//    std::vector<complex_function_3d> diabmo=truncate(bmo*diafac->factor()*R);\n//\n//    double_complex kinetic=0.0;\n//    for (int axis = 0; axis < 3; axis++) {\n//        complex_derivative_3d D = free_space_derivative<double_complex, 3>(world, axis);\n//        const std::vector<complex_function_3d> damo = apply(world, D, amo, false);\n//        const std::vector<complex_function_3d> dbmo = apply(world, D, bmo);\n//        double k1a=norm2(world,R*damo-R*ncf->U1(axis)*amo);\n//        double k1b=norm2(world,R*dbmo-R*ncf->U1(axis)*bmo);\n//        kinetic+=fac * 0.5* (k1a*k1a + k1b*k1b);\n//    }\n//\n//    const real_function_3d diapot=diafac->bare_diamagnetic_potential();\n//    const real_function_3d vnuc=potentialmanager->vnuclear();\n//    const complex_function_3d lzcomm=diafac->compute_lz_commutator();\n//    const real_function_3d density=compute_density(amo,bmo);\n//\n//    Lz lz(world,false);\n//    double_complex nuclear_potential=inner(density,vnuc);\n//    double_complex diamagnetic=inner(density,diapot);\n//    double_complex lzval=fac*(inner(world,diaamo,0.5*B[2]*lz(diaamo)).sum()+inner(world,diabmo,0.5*B[2]*lz(diabmo)).sum())\n//    \t\t+fac*(inner(world,diaamo,lzcomm*diaamo).sum()+inner(world,diabmo,lzcomm*diabmo).sum());\n//    double_complex spin_zeeman=fac*(inner(world,dia2amo,apot.spin_zeeman_mo).sum()+inner(world,dia2bmo,bpot.spin_zeeman_mo).sum());\n//    double_complex coulomb=fac*0.5*(inner(world,dia2amo,apot.J_mo).sum()+inner(world,dia2bmo,bpot.J_mo).sum());\n//    double_complex exchange=fac*0.5*(inner(world,dia2amo,apot.K_mo).sum()+inner(world,dia2bmo,bpot.K_mo).sum());\n//    double_complex zeeman_R_comm=0.0;//fac*(inner(world,dia2amo,apot.zeeman_R_comm).sum()+inner(world,dia2bmo,bpot.zeeman_R_comm).sum());\n//\n//    double_complex energy=kinetic + nuclear_potential + mol.nuclear_repulsion_energy() +\n//    \t\tdiamagnetic + lzval + spin_zeeman + coulomb - exchange + zeeman_R_comm;\n//\n//\tif (world.rank()==0 and do_print) {\n//\t\tprintf(\"  kinetic energy        %12.8f \\n\", real(kinetic));\n//\t\tprintf(\"  nuclear potential     %12.8f \\n\", real(nuclear_potential));\n//\t\tprintf(\"  nuclear repulsion     %12.8f \\n\", mol.nuclear_repulsion_energy());\n//\t\tprintf(\"  diamagnetic term      %12.8f \\n\", real(diamagnetic));\n//\t\tprintf(\"  orbital zeeman term   %12.8f \\n\", real(lzval));\n//\t\tprintf(\"  orbital zeeman R comm %12.8f \\n\", real(zeeman_R_comm));\n//\t\tprintf(\"  spin zeeman term      %12.8f \\n\", real(spin_zeeman));\n//\t\tprintf(\"  Coulomb               %12.8f \\n\", real(coulomb));\n//\t\tprintf(\"  exchange              %12.8f \\n\", real(exchange));\n//\t\tprintf(\"  total                 %12.8f \\n\", real(energy));\n//\t}\n//\n//\tif(fabs(imag(energy))>1.e-7) {\n//\n//\n//\t\tprint(\"real part\");\n//\t\tprintf(\"  kinetic energy      %12.8f \\n\", real(kinetic));\n//\t\tprintf(\"  nuclear potential   %12.8f \\n\", real(nuclear_potential));\n//\t\tprintf(\"  nuclear repulsion   %12.8f \\n\", mol.nuclear_repulsion_energy());\n//\t\tprintf(\"  diamagnetic term    %12.8f \\n\", real(diamagnetic));\n//\t\tprintf(\"  orbital zeeman term %12.8f \\n\", real(lzval));\n//\t\tprintf(\"  spin zeeman term    %12.8f \\n\", real(spin_zeeman));\n//\t\tprintf(\"  orbital zeeman R comm %12.8f \\n\", real(zeeman_R_comm));\n//\t\tprintf(\"  Coulomb             %12.8f \\n\", real(coulomb));\n//\t\tprintf(\"  exchange            %12.8f \\n\", real(exchange));\n//\t\tprintf(\"  total               %12.8f \\n\", real(energy));\n//\n//\t\tprint(\"imaginary part\");\n//\t\tprintf(\"  kinetic energy      %12.8f \\n\", imag(kinetic));\n//\t\tprintf(\"  nuclear potential   %12.8f \\n\", imag(nuclear_potential));\n//\t\tprintf(\"  nuclear repulsion   %12.8f \\n\", 0.0);\n//\t\tprintf(\"  diamagnetic term    %12.8f \\n\", imag(diamagnetic));\n//\t\tprintf(\"  orbital zeeman term %12.8f \\n\", imag(lzval));\n//\t\tprintf(\"  orbital zeeman R comm %12.8f \\n\", imag(zeeman_R_comm));\n//\t\tprintf(\"  spin zeeman term    %12.8f \\n\", imag(spin_zeeman));\n//\t\tprintf(\"  Coulomb             %12.8f \\n\", imag(coulomb));\n//\t\tprintf(\"  exchange            %12.8f \\n\", imag(exchange));\n//\t\tprintf(\"  total               %12.8f \\n\", imag(energy));\n//\n//\t\tprint(\"imaginary part of the energy\",energy.imag());\n//\n//\t\tMADNESS_EXCEPTION(\"complex energy computation.. \",1);\n//\t}\n//\n//\ttenergy.end(\"compute_energy no confinement\");\n//\treturn real(energy);\n//}\n\n\n\ndouble Znemo::compute_energy(const std::vector<complex_function_3d>& amo, const Znemo::potentials& apot,\n\t\tconst std::vector<complex_function_3d>& bmo, const Znemo::potentials& bpot, const bool do_print,\n\t\tconst bool no_confinement) const {\n\n\ttimer tenergy(world,print_info.print_timings());\n    double fac= get_calc_param().spin_restricted() ? 2.0 : 1.0;\n    std::vector<complex_function_3d> dia2amo=make_bra(amo);\n    std::vector<complex_function_3d> dia2bmo=make_bra(bmo);\n\n\n    double_complex kinetic=0.0;\n    for (int axis = 0; axis < 3; axis++) {\n        complex_derivative_3d D = free_space_derivative<double_complex, 3>(world, axis);\n        const std::vector<complex_function_3d> damo = apply(world, D, amo);\n        const std::vector<complex_function_3d> ddia2amo = apply(world, D, dia2amo);\n        const std::vector<complex_function_3d> dbmo = apply(world, D, bmo);\n        const std::vector<complex_function_3d> ddia2bmo = apply(world, D, dia2bmo);\n        kinetic += fac* 0.5 * (inner(world, ddia2amo, damo).sum() + inner(world, ddia2bmo, dbmo).sum());\n    }\n\n    double_complex diamagnetic=double_complex(0.0);\n    if (no_confinement) {\n        const real_function_3d diapot=diafac->bare_diamagnetic_potential();\n        const real_function_3d density=compute_density(amo,bmo);\n    \tdiamagnetic=inner(density,diapot);\n    } else {\n    \tdiamagnetic=fac*(inner(world,dia2amo,apot.diamagnetic_mo).sum()+inner(world,dia2bmo,bpot.diamagnetic_mo).sum());\n    }\n\n    double_complex nuclear_potential=fac*(inner(world,dia2amo,apot.vnuc_mo).sum()+inner(world,dia2bmo,bpot.vnuc_mo).sum());\n    double_complex lz=fac*(inner(world,dia2amo,apot.lz_mo).sum()+inner(world,dia2bmo,bpot.lz_mo).sum());\n    double_complex lz_comm=fac*(inner(world,dia2amo,apot.lz_commutator).sum()+inner(world,dia2bmo,bpot.lz_commutator).sum());\n    double_complex spin_zeeman=fac*(inner(world,dia2amo,apot.spin_zeeman_mo).sum()+inner(world,dia2bmo,bpot.spin_zeeman_mo).sum());\n    double_complex coulomb=fac*0.5*(inner(world,dia2amo,apot.J_mo).sum()+inner(world,dia2bmo,bpot.J_mo).sum());\n    double_complex exchange=fac*0.5*(inner(world,dia2amo,apot.K_mo).sum()+inner(world,dia2bmo,bpot.K_mo).sum());\n    double_complex zeeman_R_comm=fac*(inner(world,dia2amo,apot.zeeman_R_comm).sum()+inner(world,dia2bmo,bpot.zeeman_R_comm).sum());\n\n    double_complex energy=kinetic + nuclear_potential + mol.nuclear_repulsion_energy() +\n    \t\tdiamagnetic + lz + lz_comm + spin_zeeman + coulomb - exchange + zeeman_R_comm;\n\n\tif (world.rank()==0 and do_print) {\n\t\tprintf(\"  kinetic energy        %12.8f \\n\", real(kinetic));\n\t\tprintf(\"  nuclear potential     %12.8f \\n\", real(nuclear_potential));\n\t\tprintf(\"  nuclear repulsion     %12.8f \\n\", mol.nuclear_repulsion_energy());\n\t\tprintf(\"  diamagnetic term      %12.8f \\n\", real(diamagnetic));\n\t\tprintf(\"  orbital zeeman term   %12.8f \\n\", real(lz));\n\t\tprintf(\"  orbital zeeman comm   %12.8f \\n\", real(lz_comm));\n\t\tprintf(\"  orbital zeeman R comm %12.8f \\n\", real(zeeman_R_comm));\n\t\tprintf(\"  spin zeeman term      %12.8f \\n\", real(spin_zeeman));\n\t\tprintf(\"  Coulomb               %12.8f \\n\", real(coulomb));\n\t\tprintf(\"  exchange              %12.8f \\n\", real(exchange));\n\t\tprintf(\"  total                 %12.8f \\n\", real(energy));\n\t}\n\n\tif(fabs(imag(energy))>1.e-7) {\n\n\n\t\tprint(\"real part\");\n\t\tprintf(\"  kinetic energy      %12.8f \\n\", real(kinetic));\n\t\tprintf(\"  nuclear potential   %12.8f \\n\", real(nuclear_potential));\n\t\tprintf(\"  nuclear repulsion   %12.8f \\n\", mol.nuclear_repulsion_energy());\n\t\tprintf(\"  diamagnetic term    %12.8f \\n\", real(diamagnetic));\n\t\tprintf(\"  orbital zeeman term %12.8f \\n\", real(lz));\n\t\tprintf(\"  orbital zeeman comm %12.8f \\n\", real(lz_comm));\n\t\tprintf(\"  orbital zeeman R comm %12.8f \\n\", real(zeeman_R_comm));\n\t\tprintf(\"  spin zeeman term    %12.8f \\n\", real(spin_zeeman));\n\t\tprintf(\"  Coulomb             %12.8f \\n\", real(coulomb));\n\t\tprintf(\"  exchange            %12.8f \\n\", real(exchange));\n\t\tprintf(\"  total               %12.8f \\n\", real(energy));\n\n\t\tprint(\"imaginary part\");\n\t\tprintf(\"  kinetic energy      %12.8f \\n\", imag(kinetic));\n\t\tprintf(\"  nuclear potential   %12.8f \\n\", imag(nuclear_potential));\n\t\tprintf(\"  nuclear repulsion   %12.8f \\n\", 0.0);\n\t\tprintf(\"  diamagnetic term    %12.8f \\n\", imag(diamagnetic));\n\t\tprintf(\"  orbital zeeman term %12.8f \\n\", imag(lz));\n\t\tprintf(\"  orbital zeeman comm %12.8f \\n\", imag(lz_comm));\n\t\tprintf(\"  orbital zeeman R comm %12.8f \\n\", imag(zeeman_R_comm));\n\t\tprintf(\"  spin zeeman term    %12.8f \\n\", imag(spin_zeeman));\n\t\tprintf(\"  Coulomb             %12.8f \\n\", imag(coulomb));\n\t\tprintf(\"  exchange            %12.8f \\n\", imag(exchange));\n\t\tprintf(\"  total               %12.8f \\n\", imag(energy));\n\n\t\tprint(\"imaginary part of the energy\",energy.imag());\n\n\t\tMADNESS_EXCEPTION(\"complex energy computation.. \",1);\n\t}\n\n\ttenergy.end(\"compute_energy\");\n\treturn real(energy);\n}\n\n/// following Lazzeretti, J. Mol. Struct, 313 (1994)\n\n/// see also the first three terms of Eq. (47) of Hodge, Am. J. Phys., 82 (2014)\nstd::vector<real_function_3d> Znemo::compute_current_density(\n\t\tconst std::vector<complex_function_3d>& alpha_mo,\n\t\tconst std::vector<complex_function_3d>& beta_mo) const {\n\n\t// compute density and spin density\n\treal_function_3d adens=real_factory_3d(world);\n\treal_function_3d bdens=real_factory_3d(world);\n\tfor (auto& mo : alpha_mo) adens+=abs_square(mo);\n\tfor (auto& mo : beta_mo) bdens+=abs_square(mo);\n\treal_function_3d density=adens+bdens;\n\treal_function_3d spin_density=adens-bdens;\n\n//\tdouble ndiff=(spin_density*R_square).trace();\n//\tprint(\"nalpha - nbeta\",ndiff);\n//\tdouble nel=(density*R_square).trace();\n//\tprint(\"nelectron\",nel);\n\n\tstd::vector<real_function_3d> vspin_density=zero_functions_compressed<double,3>(world,3);;\n\tvspin_density[2]=spin_density;\n\n\t// compute first contribution to current density from orbitals: Re (\\Psi \\hat p \\Psi)\n\t// p = -i del\n\t// Re(-i z) + Re( -i a - i^2 b) = b  =Im (z)\n\tstd::vector<real_function_3d> j=zero_functions_compressed<double,3>(world,3);\n\tfor (auto& mo : alpha_mo) j+=imag(conj(mo)*grad(mo));\n\tfor (auto& mo : beta_mo) j+=imag(conj(mo)*grad(mo));\n//\n//\treal_function_3d null1=div(j*R_square);\n//\tdouble n31=null1.norm2();\n//\tprint(\"div(j)\",n31);\n\n    // compute the magnetic potential and density contribution: A \\rho\n\tstd::vector<real_function_3d> A=compute_magnetic_vector_potential(world,B);\n//\tauto vAdens=A*density;\n\tj+=A*density;\n//\treal_function_3d null2=div(vAdens*R_square);\n//\tdouble n32=null2.norm2();\n//\tprint(\"div(A*dens)\",n32);\n\n\t// spin density contribution: rot(\\Psi \\hat S \\Psi)\n\tj+=0.5*rot(vspin_density);\n\tj[0]+=0.5*2.0*(-1.0)*ncf->U1(1)*spin_density;\n\tj[1]-=0.5*2.0*(-1.0)*ncf->U1(0)*spin_density;\n\n//\treal_function_3d null3=div(j*R_square);\n//\tdouble n33=null3.norm2();\n//\tprint(\"div(j)\",n33);\n\n//\tsave(j[0],\"j0reg\");\n//\tsave(j[1],\"j1reg\");\n//\tsave(j[2],\"j2reg\");\n\n//\tauto divj=div(j);\n//\tsave(divj,\"div_reg_j\");\n//\tauto term1=2.0*dot(world,ncf->U1vec(),j);\n//\tsave(term1,\"U1term\");\n\n\t// sanity check\n\treal_function_3d null=R_square*(-2.0*dot(world,ncf->U1vec(),j) + div(j,true));\n\tsave(null,\"null\");\n\tdouble n3=null.norm2();\n\tprint(\"final div(j)\",n3);\n\n\tj=truncate(j*R_square);\n//\tauto jnorm=norm2s(world,j);\n//\tprint(\"norm(j)\",jnorm);\n\n\treturn j;\n}\n\n\nvoid Znemo::test_compute_current_density() const {\n\n\tLz<double_complex,3> lz(world);\n\tcomplex_function_3d pp=complex_factory_3d(world).functor(p_orbital(1,1.0,{0,0,0}));\n\tdouble norm=pp.norm2();\n\tpp.scale(1/norm);\n\tdouble_complex l=inner(amo[0],0.5*B[2]*lz(amo[0]));\n\tprint(\"<p+|Lz|p+>\",l);\n\n//\tstd::vector<complex_function_3d> vpp(1,amo);\n\tstd::vector<real_function_3d> j=compute_current_density(amo,std::vector<complex_function_3d>());\n\n\tsave(j[0],\"j0\");\n\tsave(j[1],\"j1\");\n\tsave(j[2],\"j2\");\n\n}\n\nvoid Znemo::test_landau_wave_function() {\n\trecompute_factors_and_potentials(get_calc_param().econv());\n\n\tint m=1;\n\tdouble B=param.physical_B();\n\tcomplex_function_3d f=complex_factory_3d(world).functor(landau_wave_function(m,-B));\n\tdouble fnorm=f.norm2();\n\tf.scale(1.0/fnorm);\n\n\tLz<double_complex,3> lz(world);\n\tdouble_complex expval=0.5*B*lz(f,f);\n\tprint(\"<f(m) | Lz | f(m)> \", m, expval);\n\tdouble_complex diaexpval=inner(f,diafac->bare_diamagnetic_potential()*f);\n\tprint(\"<f(m) | dia | f(m)>\", m, diaexpval);\n\tKinetic<double_complex,3> T(world);\n\tdouble_complex kinexpval=T(f,f);\n\tprint(\"<f(m) | T | f(m)>  \", m, kinexpval);\n\n\tprint(\"total energy\",expval + diaexpval +kinexpval);\n\tprint(\"expect some contribution from the confinement in z-direction\");\n\n\n\n\tMADNESS_EXCEPTION(\"end of test\",1);\n}\n\n\n\nvoid Znemo::do_step_restriction(const std::vector<complex_function_3d>& mo,\n\t\tstd::vector<complex_function_3d>& mo_new) const {\n    PROFILE_MEMBER_FUNC(SCF);\n    std::vector<double> anorm = norm2s(world, sub(world, mo, mo_new));\n    int nres = 0;\n    for (unsigned int i = 0; i < mo.size(); ++i) {\n        if (anorm[i] > get_calc_param().maxrotn()) {\n            double s = get_calc_param().maxrotn() / anorm[i];\n            ++nres;\n            if (world.rank() == 0 and print_info.print_convergence()) {\n                if (nres == 1)\n                    printf(\"  restricting step \");\n                printf(\" %d\", i);\n            }\n            mo_new[i].gaxpy(s, mo[i], 1.0 - s, false);\n        }\n    }\n    if (nres > 0 && (world.rank() == 0) and print_info.print_convergence())\n        printf(\"\\n\");\n\n    world.gop.fence();\n}\n\n\nvoid Znemo::get_initial_orbitals() {\n\n\t/* possible guesses\n\t *\n\t * 1) guess_functions as specified in the user input\n\t * 2) custom guess (l,ml,exponenent) for atoms as specified in the user input\n\t * 3) reference file from a previous znemo calculation\n\t * 4) ao restart data from a previous znemo calculations\n\t * 5) restartdata file from a previous moldft calculation\n\t * 6) hcore guess\n\t */\n\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> > zmos;\n\tbool gotit=false;\n\n\tif (param.guess_functions().size()>0) {\n\t\tzmos=read_explicit_guess_functions();\n\t\tgotit=true;\n\t} else if (param.guess().size()>0) {\n\t\tzmos=custom_guess();\n\t\tgotit=true;\n\t} else {\n\n\t\ttry {\n\t\t\tzmos=read_reference();\n\t\t\tgotit=true;\n\t\t} catch (...) {\n\t\t\tprint(\"could not read reference orbitals\");\n\t\t}\n\n//\t\tzmos=read_complex_guess();\n\t\tif (not gotit) {\n\t\t\ttry {\n\t\t\t\tzmos=read_real_guess();\n\t\t\t\tprint(\"successful read real guess orbitals\");\n\t\t\t\tgotit=true;\n\t\t\t} catch (...) {\n\t\t\t\tprint(\"could not read real guess orbitals\");\n\t\t\t}\n\t\t}\n\t\tif (not gotit) {\n\t\t\ttry {\n\t\t\t\tzmos=read_restartaodata();\n\t\t\t\tgotit=true;\n\t\t\t} catch (...) {\n\t\t\t\tprint(\"could not read ao restart data\");\n\t\t\t}\n\t\t}\n\t\tif (not gotit) {\n\t\t\ttry {\n\t\t\t\tzmos=hcore_guess();\n\t\t\t\tgotit=true;\n\t\t\t} catch (...) {\n\t\t\t\tprint(\"could not do an hcore guess\");\n\t\t\t}\n\t\t}\n\t}\n\tif (not gotit) {\n\t\tMADNESS_EXCEPTION(\"unable to generate guess functions\",1);\n\t}\n\n\tamo.clear();\n\tbmo.clear();\n\tfor (int i=0; i<get_calc_param().nalpha(); ++i) amo.push_back(zmos.first.get_mos()[i]);\n\tfor (int i=0; i<get_calc_param().nbeta(); ++i) bmo.push_back(zmos.second.get_mos()[i]);\n\taeps=Tensor<double>(amo.size());\n\tbeps=Tensor<double>(bmo.size());\n\n\tamo=orthonormalize(amo);\n\tbmo=orthonormalize(bmo);\n\tset_thresh(world,amo,FunctionDefaults<3>::get_thresh());\n\tset_thresh(world,bmo,FunctionDefaults<3>::get_thresh());\n\n}\n\n\n/// read the guess orbitals from a previous nemo or moldft calculation\nstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\nZnemo::read_real_guess() const {\n\n\tprint(\"reading mos from restartdata\");\n\tauto mos=MolecularOrbitals<double,3>::read_restartdata(world, \"restartdata\", molecule(), get_calc_param().nalpha(), get_calc_param().nbeta());\n\tMolecularOrbitals<double,3> amo=mos.first,bmo=mos.second;\n\n\t// check for correct polynomial order\n\tauto k1=amo.get_mos()[0].get_impl()->get_k();\n\tauto k2=FunctionDefaults<3>::get_k();\n\tMADNESS_CHECK_THROW(k1==k2,\"reference polynomial order is not equal to the current polynomial order\");\n\n\t// check if beta orbitals are present if they should be\n\tif (get_calc_param().have_beta() and bmo.size()==0) {\n\t\tprint(\"reading from a closed-shell reference -> replicating alpha to beta orbitals\");\n\t\tstd::vector<real_function_3d> tmp;\n\t\tfor (int i=0; i<get_calc_param().nmo_beta(); ++i) tmp.push_back(amo.get_mos()[i]);\n\t\tbmo.set_mos(tmp);\n\t}\n\n    // confine the orbitals to an approximate Gaussian form corresponding to the\n    // diamagnetic (harmonic) potential\n    coord_3d remaining_B=B-coord_3d{0,0,param.explicit_B()};\n    real_function_3d gauss=diafac->custom_factor(remaining_B,diafac->get_v(),1.0);\n\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> > zmos;\n\tauto inv=ncf->inverse();\n\tzmos.first.set_mos(truncate(convert<double,double_complex,3>(world,amo.get_mos()*inv)));\t\t// alpha\n\tzmos.second.set_mos(truncate(convert<double,double_complex,3>(world,bmo.get_mos()*inv)));\t\t// beta\n\n\treturn zmos;\n}\n\n\n/// read the guess orbitals from a previous nemo or moldft calculation\nstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\nZnemo::read_complex_guess() const {\n\tprint(\"reading mos from complex restartdata\");\n\tauto zmos=MolecularOrbitals<double_complex,3>::read_restartdata(world, \"restartdata\", molecule(), get_calc_param().nalpha(), get_calc_param().nbeta());\n\treturn zmos;\n}\n\n/// read a list of functions for the guess\nstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\nZnemo::read_explicit_guess_functions() const {\n\t// loop over all provided functions\n        if (param.guess_functions().size()<size_t(std::max(get_calc_param().nalpha(),get_calc_param().nbeta()))) {\n\t\tMADNESS_EXCEPTION(\"you did not provide enough guess functions for this calculations\",1);\n\t}\n\tstd::vector<complex_function_3d> guess_vector;\n\tfor (auto filename : param.guess_functions()) {\n\t\tcomplex_function_3d mo=complex_factory_3d(world);\n\t\tprint(\"loading file\",filename,\"as guess function\");\n\t\tload(mo,filename);\n\t\tguess_vector.push_back(mo);\n\t}\n\n\tstd::vector<complex_function_3d> amos,bmos;\n\tfor (int i=0; i<get_calc_param().nalpha(); ++i) amos.push_back(guess_vector[i]);\n\tfor (int i=0; i<get_calc_param().nbeta(); ++i) bmos.push_back(guess_vector[i]);\n\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> > zmos;\n\tzmos.first.set_mos(amos);\n\tzmos.second.set_mos(bmos);\n\n\treturn zmos;\n}\n\n/// read a list of functions for the guess\nstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\nZnemo::read_restartaodata() const {\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> > zmos;\n\n\tprint(\"reading orbitals ao projection from complex calculation\");\n\tzmos=MolecularOrbitals<double_complex,3>::read_restartaodata(world, mol, get_calc_param().have_beta());\n//\t\tprint(\"  .. failed \");\n//\t\ttry {\n//\t\t\tprint(\"reading orbitals ao projection from real calculation\");\n//\t\t\tauto mos=MolecularOrbitals<double,3>::read_restartaodata(world, mol, get_calc_param().have_beta());\n//\t\t\tzmos.first.set_mos(convert<double,double_complex,3>(world,mos.first.get_mos()));\n//\t\t\tzmos.second.set_mos(convert<double,double_complex,3>(world,mos.second.get_mos()));\n//\n//\t\t} catch (...) {\n//\t\t\tprint(\"  .. failed \");\n//\t\t}\n\treturn zmos;\n}\n\n/// read a list of functions for the guess\nstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\nZnemo::read_reference() const {\n\tstd::string name=\"reference\";\n\tprint(\"reading orbitals from file\",name);\n\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> > zmos;\n\n\tarchive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, name.c_str(), 1);\n\tstd::size_t namo=0, nbmo=0;\n\n\tstd::vector<complex_function_3d> amos,bmos;\n\tTensor<double> aeps,beps;\n\n\tar & namo & nbmo & aeps & beps;\n\tamos.resize(namo);\n\tbmos.resize(nbmo);\n\tfor (auto& a: amos) ar & a;\n\tfor (auto& a: bmos) ar & a;\n\tzmos.first.set_mos(amos);\n\tzmos.second.set_mos(bmos);\n\n\treturn zmos;\n}\n\n\nstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\nZnemo::custom_guess() const {\n\tMADNESS_ASSERT(molecule().natom()==1);\n\n\tLz<double_complex,3> lz(world);\n\n\tstd::vector<std::string> guess=param.guess();\n\tstd::vector<complex_function_3d> guess_vector;\n\tfor (size_t i=0; i<guess.size(); i+=3) {\n\t\tlong l=atol(guess[i].c_str());\n\t\tlong ml=atol(guess[i+1].c_str());\n\t\tdouble exponent=atof(guess[i+2].c_str());\n\t\tprint(\"making guess with l,ml,e\",l,ml,exponent);\n\n\t\tcomplex_function_3d g;\n\t\tcoord_3d origin=molecule().get_atoms()[0].get_coords();\n\t\tif (l==0) g=complex_factory_3d(world).functor(s_orbital(exponent,origin));\n\t\tif (l==1) g=complex_factory_3d(world).functor(p_orbital(ml,exponent,origin));\n\t\tdouble norm=g.norm2();\n\t\tg.scale(1/norm);\n\t\tdouble_complex ii=inner(g,lz(g));\n\t\tprint(\"<p|Lz|p>, ml\",ii, ml);\n\n\t\tguess_vector.push_back(g);\n\t}\n\n\tstd::vector<complex_function_3d> amos,bmos;\n\tamos.resize(get_calc_param().nalpha());\n\tbmos.resize(get_calc_param().nbeta());\n\tstd::copy(guess_vector.begin(),guess_vector.begin()+get_calc_param().nalpha(),amos.begin());\n\tstd::copy(guess_vector.begin(),guess_vector.begin()+get_calc_param().nbeta(),bmos.begin());\n\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> > zmos;\n\tzmos.first.set_mos(amos);\n\tzmos.second.set_mos(bmos);\n\n\treturn zmos;\n}\n\nstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\nZnemo::hcore_guess() const {\n\n\tprint(\"computing mos from hcore guess\");\n\n\t// get the AOs from the basis set ..\n\tstd::vector<real_function_3d> real_aos=SCF::project_ao_basis_only(world, aobasis, mol);\n\tstd::vector<complex_function_3d> aos = convert<double,double_complex,3>(world,real_aos);\n\n\t// .. and from the Landau wave function (the eigenfunction of the free particle in the B-field)\n    if (param.physical_B()>0.0) {\n\t\tfor (int n=0; n<2; ++n) {\n//\t\t\tcoord_3d origin=mol.get_atom(i).get_coords();\n\t\t\tcoord_3d origin;\n\t\t\tdouble B=param.physical_B();\n\t\t\tcomplex_function_3d f=complex_factory_3d(world).functor(landau_wave_function(n,-B,origin));\n\t\t\tdouble fnorm=f.norm2();\n\t\t\tf.scale(1.0/fnorm);\n\n\t\t\taos.push_back(conj(f));\n\t\t}\n    }\n\n\t// compute the Hamilton matrix\n\n\t// nuclear and diamagnetic potential\n\treal_function_3d vlocal=(potentialmanager->vnuclear()+diafac->bare_diamagnetic_potential()).truncate();\n\tTensor<double_complex> potential=matrix_inner(world,aos,vlocal*aos);\n\n\t// zeeman term\n\tLz<double_complex,3> lz_operator(world,false);\n\tTensor<double_complex> lzmat=0.5*B[2]*lz_operator(aos,aos);\n\tpotential+=lzmat;\n\n\t// kinetic term\n\tKinetic<double_complex,3> T(world);\n\tTensor<double_complex>  kinetic=T(aos,aos);\n\n\tTensor<double_complex> fock = convert<double_complex>(kinetic) + potential;\n\tfock = 0.5 * (fock + conj_transpose(fock));\n\n\t// diagonalize the Fock matrix\n\tTensor<double_complex> c;\n\tTensor<double> e;\n\tTensor<double_complex> overlap =matrix_inner(world, aos, aos, true);\n\tsygvp(world, fock, overlap, 1, c, e);\n\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> > zmos;\n\tstd::vector<complex_function_3d> amo = transform(world, aos, c(_, Slice(0, get_calc_param().nmo_alpha() - 1)));\n\tamo=truncate(normalize(amo));\n\tzmos.first.set_mos(truncate(amo*ncf->inverse()));\t\t// alpha\n\n\tif (get_calc_param().have_beta()) {\n\t\tstd::vector<complex_function_3d>\n\t\tbmo = transform(world, aos, c(_, Slice(0, get_calc_param().nmo_beta() - 1)));\n\t\tbmo=truncate(normalize(bmo));\n\t\tzmos.second.set_mos(truncate(bmo*ncf->inverse()));\t\t// beta\n\t}\n\n\treturn zmos;\n}\n\n/// compute the potential operators applied on the orbitals\nZnemo::potentials Znemo::compute_potentials(const std::vector<complex_function_3d>& mo,\n\t\tconst real_function_3d& density,\n\t\tconst std::vector<complex_function_3d>& rhs) const {\n\n\ttimer potential_timer(world,print_info.print_timings());\n\tstd::vector<complex_function_3d> dia2mo=make_bra(mo);\n\n\t// prepare exchange operator\n\tExchange<double_complex,3> K(world,get_calc_param().lo());\n\tTensor<double> occ(mo.size());\n\tocc=1.0;\n    K.set_bra_and_ket(conj(world, dia2mo), mo);\n\n\tNuclear<double_complex,3> nuc(world,ncf);\n\n\tpotentials pot(world,rhs.size());\n\n\tpot.J_mo=(*coulop)(density)*rhs;\n\tpot.K_mo=K(rhs);\n\tpot.vnuc_mo=nuc(rhs);\n\n\tpot.lz_mo=0.5*B[2]*Lz<double_complex,3>(world,false)(rhs);\n\tpot.lz_commutator=diafac->compute_lz_commutator()*rhs;\n\n\tpot.diamagnetic_mo=diafac->apply_potential(rhs);\n\n\tMADNESS_ASSERT(diafac->B_along_z(B));\n\tpot.spin_zeeman_mo=B[2]*0.5*rhs;\n\tpot.zeeman_R_comm = double_complex(0.0,0.5)*B[2]*(rvec[0]* ncf->U1(1)-rvec[1]* ncf->U1(0))*rhs;\n\n\ttruncate(world,pot.J_mo);\n\ttruncate(world,pot.K_mo);\n\ttruncate(world,pot.vnuc_mo);\n\ttruncate(world,pot.lz_mo);\n\ttruncate(world,pot.diamagnetic_mo);\n\ttruncate(world,pot.spin_zeeman_mo);\n\tpotential_timer.end(\"compute_potentials\");\n\treturn pot;\n};\n\n\nTensor<double_complex> Znemo::compute_vmat(const std::vector<complex_function_3d>& mo,\n\t\tconst potentials& pot) const {\n\n\tstd::vector<complex_function_3d> dia2mo=make_bra(mo);\n\ttruncate(world,dia2mo);\n\tTensor<double_complex> Vnucmat=matrix_inner(world,dia2mo,pot.vnuc_mo);\n\tTensor<double_complex> lzmat=matrix_inner(world,dia2mo,pot.lz_mo);\n\tTensor<double_complex> lz_comm_mat=matrix_inner(world,dia2mo,pot.lz_commutator);\n\tTensor<double_complex> diamat=matrix_inner(world,dia2mo,pot.diamagnetic_mo);\n\tTensor<double_complex> spin_zeeman_mat=matrix_inner(world,dia2mo,pot.spin_zeeman_mo);\n\tTensor<double_complex> Kmat=matrix_inner(world,dia2mo,pot.K_mo);\n\tTensor<double_complex> Jmat=matrix_inner(world,dia2mo,pot.J_mo);\n\tTensor<double_complex> ZRcom_mat=matrix_inner(world,dia2mo,pot.zeeman_R_comm);\n\n\tTensor<double_complex> vmat=Vnucmat+lzmat+lz_comm_mat+diamat+spin_zeeman_mat-Kmat+Jmat+ZRcom_mat;\n\treturn vmat;\n};\n\n\nstd::vector<complex_function_3d>\nZnemo::compute_residuals(\n\t\tconst std::vector<complex_function_3d>& Vpsi,\n\t\tconst std::vector<complex_function_3d>& psi,\n\t\tTensor<double>& eps,\n\t\tdouble levelshift) const {\n\ttimer residual_timer(world,print_info.print_timings());\n\n\tdouble tol = FunctionDefaults < 3 > ::get_thresh();\n\n    std::vector < std::shared_ptr<real_convolution_3d> > ops(psi.size());\n    for (int i=0; i<eps.size(); ++i) {\n    \tops[i]=std::shared_ptr<real_convolution_3d>(\n    \t\t\tBSHOperatorPtr3D(world, sqrt(-2.*std::min(-0.05,eps(i)+levelshift)),\n    \t\t\t\t\tget_calc_param().lo()*0.001, tol*0.001));\n    }\n\n    std::vector<complex_function_3d> tmp = apply(world,ops,-2.0*Vpsi-2.0*levelshift*psi);\n\n    const std::vector<complex_function_3d> res=truncate(psi-tmp);\n    const std::vector<complex_function_3d> bra_res=make_bra(res);\n\n    // update eps\n    Tensor<double> norms=real(inner(world,make_bra(tmp),tmp));\n    Tensor<double_complex> rnorms=inner(world,bra_res,res);\n    for (int i=0; i<norms.size(); ++i) {\n    \tnorms(i)=sqrt(norms(i));\n    \trnorms(i)=sqrt(rnorms(i));\n    }\n    if ((world.rank()==0) and (print_info.print_convergence())) {\n    \tprint(\"norm2(tmp)\",norms);\n    \tprint(\"norm2(res)\",rnorms);\n    }\n    Tensor<double_complex> in=inner(world,Vpsi,bra_res);\t// no shift here!\n    Tensor<double> delta_eps(eps.size());\n    for (int i=0; i<eps.size(); ++i) delta_eps(i)=real(in(i))/(norms[i]*norms[i]);\n    eps-=delta_eps;\n\n    if ((world.rank()==0) and (print_info.print_convergence())) {\n    \tprint(\"orbital energy update\",delta_eps);\n    }\n    residual_timer.end(\"compute_residuals\");\n    return res;\n\n}\n\n\nvoid\nZnemo::canonicalize(std::vector<complex_function_3d>& amo,\n\t\tstd::vector<complex_function_3d>& vnemo,\n\t\tpotentials& pot,\n\t\tXNonlinearSolver<std::vector<complex_function_3d> ,double_complex, vector_function_allocator<double_complex,3> >& solver,\n\t\tTensor<double_complex> fock, Tensor<double_complex> ovlp) const {\n\n    Tensor<double_complex> U;\n    Tensor<double> evals;\n    sygv(fock, ovlp, 1, U, evals);\n    // Fix phases.\n    for (size_t i = 0; i < amo.size(); ++i) if (real(U(i, i)) < 0.0) U(_, i).scale(-1.0);\n\n    fock = 0.0;\n    for (unsigned int i = 0; i < amo.size(); ++i) fock(i, i) = evals(i);\n    amo = transform(world, amo, U);\n    vnemo = transform(world, vnemo, U);\n    rotate_subspace(U,solver);\n    pot.transform(U);\n\n}\n\nvoid Znemo::save_orbitals(std::string suffix) const\n{\n\tsuffix = \"_\" + suffix;\n\tconst real_function_3d &dia = diafac->factor();\n\tfor (size_t i = 0; i < amo.size(); ++i)\n\t\tsave(amo[i], \"amo\" + stringify(i) + suffix);\n\tfor (size_t i = 0; i < bmo.size(); ++i)\n\t\tsave(bmo[i], \"bmo\" + stringify(i) + suffix);\n\tfor (size_t i = 0; i < amo.size(); ++i)\n\t\tsave(real(amo[i]), \"amo_real\" + stringify(i) + suffix);\n\tfor (size_t i = 0; i < amo.size(); ++i)\n\t\tsave(imag(amo[i]), \"amo_imag\" + stringify(i) + suffix);\n\tfor (size_t i = 0; i < bmo.size(); ++i)\n\t\tsave(real(bmo[i]), \"bmo_real\" + stringify(i) + suffix);\n\tfor (size_t i = 0; i < bmo.size(); ++i)\n\t\tsave(imag(bmo[i]), \"bmo_imag\" + stringify(i) + suffix);\n\tfor (size_t i = 0; i < amo.size(); ++i)\n\t\tsave(madness::abs(amo[i]), \"absamo\" + stringify(i) + suffix);\n\tfor (size_t i = 0; i < bmo.size(); ++i)\n\t\tsave(madness::abs(bmo[i]), \"absbmo\" + stringify(i) + suffix);\n\tfor (size_t i = 0; i < amo.size(); ++i)\n\t\tsave(madness::abs(amo[i] * dia), \"diaamo\" + stringify(i) + suffix);\n\tfor (size_t i = 0; i < bmo.size(); ++i)\n\t\tsave(madness::abs(bmo[i] * dia), \"diabmo\" + stringify(i) + suffix);\n}\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/chem/znemo.h",
    "content": "/*\n * Nemocomplex.h\n *\n *  Created on: 14 Nov 2018\n *      Author: fbischoff\n */\n\n#ifndef SRC_APPS_CHEM_ZNEMO_H_\n#define SRC_APPS_CHEM_ZNEMO_H_\n\n#include <madness/chem/CalculationParameters.h>\n#include <madness/chem/MolecularOrbitals.h>\n#include \"madness/mra/QCCalculationParametersBase.h\"\n#include <madness/chem/SCFOperators.h>\n#include <madness/chem/molecular_optimizer.h>\n#include <madness/chem/molecularbasis.h>\n#include <madness/chem/molecule.h>\n#include <madness/chem/nemo.h>\n#include <madness/misc/info.h>\n#include <madness/mra/mra.h>\n#include <madness/mra/nonlinsol.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/vmra.h>\n\nnamespace madness {\n\nclass Diamagnetic_potential_factor;\n\n\n\nstruct printleveler {\n\tbool print_nothing_=true;\n\tbool print_setup_=false;\n\tbool print_energies_=false;\n\tbool print_timings_=false;\n\tbool print_convergence_=false;\n\tbool print_debug_information_=false;\n\n\tprintleveler(int printlevel) {\n\t\tprint_debug_information_=(printlevel>=10);\n\t\tprint_convergence_=(printlevel>=4);\n\t\tprint_timings_=(printlevel>=3);\n\t\tprint_energies_=(printlevel>=2);\n\t\tprint_setup_=(printlevel>=1);\n\t}\n\n\tbool print_setup() const {return print_setup_;}\n\tbool print_energies() const {return print_energies_;}\n\tbool print_timings() const {return print_timings_;}\n\tbool print_convergence() const {return print_convergence_;}\n\tbool print_debug() const {return print_debug_information_;}\n\n};\n\n\nclass Nemo_complex_Parameters : public QCCalculationParametersBase {\npublic:\n\n\t/// ctor reading out the input file\n    Nemo_complex_Parameters() {\n        initialize<double>(\"physical_B\",0.0);\n        initialize<double>(\"explicit_B\",0.0);\n        initialize<std::vector<double> >(\"box\",{1.0, 0.01, 0.0, 0.0, 0.0});\n        initialize<double>(\"shift\",0.0);\n        initialize<int>(\"printlevel\",2);\t\t// 0: energies, 1: fock matrix, 2: function sizes\n        initialize<bool>(\"use_v_vector\",false);\n        initialize<double>(\"potential_radius\",-1.0);\n        initialize<std::vector<std::string> >(\"guess\",std::vector<std::string>(),\"list of l,m,exponent\");\t// atomic guess functions l, ml, exponent\n        initialize<std::vector<std::string> >(\"guess_functions\",std::vector<std::string>(),\"list function names\");\t// atomic guess functions l, ml, exponent\n    }\n\n\tNemo_complex_Parameters(World& world, const commandlineparser& parser) : Nemo_complex_Parameters() {\n\t\t// read input file\n        read_input_and_commandline_options(world,parser,\"complex\");\n\t}\n\n    std::string get_tag() const override {\n\t\treturn std::string(\"complex\");\n\t}\n\n\tvoid set_derived_values() {\n\t\tdouble pb=physical_B();\n\t\tdouble eb=explicit_B();\n\t\tdouble remaining_B=fabs(pb-eb);\n\t\tdouble thresh=FunctionDefaults<3>::get_thresh()*0.1;\n\n\t\tdouble wave_function_radius=2.0*sqrt(-log(thresh)/remaining_B);\n\t\tdouble potential_radius=wave_function_radius*1.6;\n\t\tdouble box_radius=wave_function_radius*1.33;\n\n\t\tset_derived_value(\"box\",std::vector<double>{box_radius,0.01});\n\t\tset_derived_value(\"potential_radius\",potential_radius);\n\t\tset_derived_value(\"shift\",physical_B());\n\n\t}\n\n\tint printlevel() const {return get<int>(\"printlevel\");}\n\tdouble shift() const {return get<double>(\"shift\");}\n\tdouble physical_B() const {return get<double>(\"physical_b\");}\n\tdouble explicit_B() const {return get<double>(\"explicit_b\");}\n\tstd::vector<double> box() const {return get<std::vector<double> >(\"box\");}\n\tdouble potential_radius() const {return get<double>(\"potential_radius\");}\n\tbool use_v_vector() const {return get<bool>(\"use_v_vector\");}\n\tstd::vector<std::string> guess() const {return get<std::vector<std::string>>(\"guess\");}\n\tstd::vector<std::string> guess_functions() const {return get<std::vector<std::string>>(\"guess_functions\");}\n\n};\n\n\nclass Znemo : public NemoBase, public QCPropertyInterface {\n\tfriend class Zcis;\n\n\tstruct potentials {\n\t\tpotentials(World& world, const std::size_t nmo) {\n\t\t\tvnuc_mo=zero_functions<double_complex,3>(world,nmo);\n\t\t\tdiamagnetic_mo=zero_functions<double_complex,3>(world,nmo);\n\t\t\tlz_mo=zero_functions<double_complex,3>(world,nmo);\n\t\t\tJ_mo=zero_functions<double_complex,3>(world,nmo);\n\t\t\tK_mo=zero_functions<double_complex,3>(world,nmo);\n\t\t\tspin_zeeman_mo=zero_functions<double_complex,3>(world,nmo);\n\t\t\tzeeman_R_comm=zero_functions<double_complex,3>(world,nmo);\n\n\t\t}\n\n\t\tvoid transform(const Tensor<double_complex>& U) {\n\t\t\tWorld& world=vnuc_mo[0].world();\n\t\t\tvnuc_mo = ::madness::transform(world, vnuc_mo, U);\n\t\t\tdiamagnetic_mo = ::madness::transform(world, diamagnetic_mo, U);\n\t\t\tlz_mo = ::madness::transform(world, lz_mo, U);\n\t\t\tJ_mo = ::madness::transform(world, J_mo, U);\n\t\t\tK_mo = ::madness::transform(world, K_mo, U);\n\t\t\tspin_zeeman_mo = ::madness::transform(world, spin_zeeman_mo, U);\n\t\t\tzeeman_R_comm = ::madness::transform(world, zeeman_R_comm, U);\n\t\t}\n\n\n\t\tstd::vector<complex_function_3d> vnuc_mo;\n\t\tstd::vector<complex_function_3d> diamagnetic_mo;\n\t\tstd::vector<complex_function_3d> lz_mo;\n\t\tstd::vector<complex_function_3d> J_mo;\n\t\tstd::vector<complex_function_3d> K_mo;\n\t\tstd::vector<complex_function_3d> spin_zeeman_mo;\n\t\tstd::vector<complex_function_3d> lz_commutator;\n\t\tstd::vector<complex_function_3d> zeeman_R_comm;\n\t};\npublic:\n\tstruct timer {\n        World& world;\n\t    double ttt,sss;\n\t    bool do_print=true;\n\n\t    timer(World& world, bool do_print=true) : world(world), do_print(do_print) {\n\t        world.gop.fence();\n\t        ttt=wall_time();\n\t        sss=cpu_time();\n\t    }\n\n\t    void tag(const std::string msg) {\n            world.gop.fence();\n\t        double tt1=wall_time()-ttt;\n\t        double ss1=cpu_time()-sss;\n\t        if (world.rank()==0 and do_print) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg.c_str(), ss1, tt1);\n\t        ttt=wall_time();\n\t        sss=cpu_time();\n\t    }\n\n\t    void end(const std::string msg) {\n            world.gop.fence();\n            double tt1=wall_time()-ttt;\n            double ss1=cpu_time()-sss;\n            if (world.rank()==0 and do_print) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg.c_str(), ss1, tt1);\n        }\n\t};\n\n\npublic:\n\tZnemo(World& w, const commandlineparser& parser);\n\n\t/// compute the molecular energy\n\tdouble value() {return value(mol.get_all_coords());}\n\n\t/// compute the molecular energy\n\tdouble value(const Tensor<double>& x) override;\n\n    void output_calc_info_schema(const double& energy) const;\n\n    std::string name() const override {return \"znemo\";};\n\n    static void help() {\n        print_header2(\"help page for ZNEMO \");\n        print(\"The znemo code computes Hartree-Fock energies and gradients in the presence of a strong\");\n        print(\"magnetic field\");\n        print(\"\");\n        print(\"You can print all available calculation parameters by running\\n\");\n        print(\"znemo --print_parameters\\n\");\n        print(\"You can perform a simple calculation by running\\n\");\n        print(\"znemo --geometry=h2o.xyz\\n\");\n        print(\"provided you have an xyz file in your directory.\");\n\n    }\n\n    static void print_parameters() {\n        Nemo_complex_Parameters zparam;\n        Nemo::NemoCalculationParameters param;\n        print(\"default calculations parameters for the znemo program are the same as for the nemo program\");\n        print(\"default parameters for the magnetic field of the znemo program are\");\n        zparam.print(\"complex\",\"end\");\n        print(\"\\n\\nthe molecular geometry must be specified in a separate block:\");\n        Molecule::print_parameters();\n    }\n\n    bool selftest() override {\n        return true;\n    };\n\n\t/// adapt the thresholds consistently to a common value\n    void recompute_factors_and_potentials(const double thresh);\n\n    bool need_recompute_factors_and_potentials(const double thresh) const override;\n    void invalidate_factors_and_potentials() override;\n\n\tvoid iterate();\n\n\tTensor<double> gradient(const Tensor<double>& x) override;\n\tTensor<double> gradient() {\n\t\treturn gradient(mol.get_all_coords());\n\t}\n\n\tbool test() const;\n\n\tconst CalculationParameters& get_calc_param() const {return calc_param;};\n\tMolecule& molecule() override {return mol;};\n\tconst Molecule& molecule() const {return mol;};\n\n\t/// test the identity <F| f (T + Vdia ) f |F> = <F|f^2 (T + Udia) |F>\n\tbool test_U_potentials() const;\n\n\t/// analyse the results only\n\n\t/// @return\tthe energy\n\tdouble analyze();\n\n\t/// compute the expectation value of the kinetic momentum p\n\tTensor<double> compute_kinetic_momentum() const {\n\t    Tensor<double> p_exp(3);\n\t    for (auto& mo : amo) p_exp+=imag(inner(world,mo,grad(mo)));\n\t    for (auto& mo : bmo) p_exp+=imag(inner(world,mo,grad(mo)));\n\t    return p_exp;\n\t}\n\n\t/// compute the expectation value of the linear moment r\n\tTensor<double> compute_linear_moment() const {\n\t\tstd::vector<real_function_3d> r(3);\n\t    r[0]=real_factory_3d(world).functor([] (const coord_3d& r) {return r[0];});\n\t    r[1]=real_factory_3d(world).functor([] (const coord_3d& r) {return r[1];});\n\t    r[2]=real_factory_3d(world).functor([] (const coord_3d& r) {return r[2];});\n\n\t    Tensor<double> r_exp(3);\n\t    for (auto& mo : amo) r_exp+=real(inner(world,mo,r*mo));\n\t    for (auto& mo : bmo) r_exp+=real(inner(world,mo,r*mo));\n\t    return r_exp;\n\t}\n\n\t/// compute the expectation value of the magnetic vector potential A\n\tTensor<double> compute_magnetic_potential_expectation(const std::vector<real_function_3d>& A) const {\n\t    Tensor<double> A_exp(3);\n\t    for (auto& mo : amo) A_exp+=real(inner(world,mo,A*mo));\n\t    for (auto& mo : bmo) A_exp+=real(inner(world,mo,A*mo));\n\t    return A_exp;\n\t}\n\n\t/// compute the shift of the molecule such that the kinetic momentum vanishes\n\tTensor<double> compute_standard_gauge_shift(const Tensor<double>& p_exp) const {\n\t\tTensor<double> S(3);\n\t\tconst double B=param.physical_B();\n\n\t    S(0l)=-p_exp(1);\n\t    S(1) =p_exp(0l);\n\t    S(2) =p_exp(2);\n\t    S*=-2.0/(B*(amo.size()+bmo.size()));\n\t    return S;\n\t}\n\n\t/// compute the current density\n\tstd::vector<real_function_3d> compute_current_density(\n\t\t\tconst std::vector<complex_function_3d>& alpha_mo,\n\t\t\tconst std::vector<complex_function_3d>& beta_mo) const;\n\n\t/// compute the magnetic vector potential A\n\tstatic std::vector<real_function_3d> compute_magnetic_vector_potential(World& world,\n\t\t\tconst coord_3d& Bvec) {\n\t\tstd::vector<real_function_3d> r(3), A(3);\n\t    r[0]=real_factory_3d(world).functor([] (const coord_3d& r) {return r[0];});\n\t    r[1]=real_factory_3d(world).functor([] (const coord_3d& r) {return r[1];});\n\t    r[2]=real_factory_3d(world).functor([] (const coord_3d& r) {return r[2];});\n\n\t    A[0]=Bvec[1]*r[2]-Bvec[2]*r[1];\n\t    A[1]=Bvec[2]*r[0]-Bvec[0l]*r[2];\n\t    A[2]=Bvec[0l]*r[1]-Bvec[1]*r[0];\n\n\t\treturn 0.5*A;\n\t}\n\n\t/// are there explicit beta orbitals\n\tbool have_beta() const {\n\t\treturn ((not get_calc_param().spin_restricted()) and (get_calc_param().nbeta()>0));\n\t}\n\n\tvoid save_orbitals(std::string suffix) const;\n\n\t/// get initial orbitals from guesses\n\tvoid get_initial_orbitals();\n\n\t/// read the guess orbitals from a previous nemo or moldft calculation\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\n\tread_real_guess() const;\n\n\t/// read the guess orbitals from a previous nemo or moldft calculation\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\n\tread_complex_guess() const;\n\n\t/// read a list of functions for the guess\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\n\tread_explicit_guess_functions() const;\n\n\t/// read guess as projection of the orbitals onto an AO basis set (for geometry optimization)\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\n\tread_restartaodata() const;\n\n\t/// read orbitals from a znemo calculation\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\n\tread_reference() const;\n\n\t/// hcore guess including the magnetic field\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\n\thcore_guess() const;\n\n\tstd::pair<MolecularOrbitals<double_complex,3>, MolecularOrbitals<double_complex,3> >\n\tcustom_guess() const;\n\n\tvoid save_orbitals() const {\n\t\tstd::string name=\"reference\";\n\t\tprint(\"saving orbitals to file\",name);\n\n\t\tarchive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, name.c_str(), 1);\n\n\t\tar & amo.size() & bmo.size() & aeps & beps;\n\t\tfor (auto& a: amo) ar & a;\n\t\tfor (auto& a: bmo) ar & a;\n\n\t\t// save AO restart data\n\t\tMolecularOrbitals<double_complex,3> amo1, bmo1;\n\t\tamo1.update_mos_and_eps(amo,aeps);\n\t\tbmo1.update_mos_and_eps(bmo,beps);\n\n\t\tMolecularOrbitals<double_complex,3>::save_restartaodata(world, mol, amo1, bmo1, aobasis);\n\t}\n\n\tvoid do_step_restriction(const std::vector<complex_function_3d>& mo,\n\t\t\tstd::vector<complex_function_3d>& mo_new) const;\n\n\t/// rotate the KAIN subspace (cf. SCF.cc)\n\ttemplate<typename solverT>\n\tvoid rotate_subspace(const Tensor<double_complex>& U, solverT& solver) const {\n\t\tdouble trantol=FunctionDefaults<3>::get_thresh()*0.1;\n\t    std::vector < std::vector<Function<double_complex, 3> > >&ulist = solver.get_ulist();\n\t    std::vector < std::vector<Function<double_complex, 3> > >&rlist = solver.get_rlist();\n\t    for (unsigned int iter = 0; iter < ulist.size(); ++iter) {\n\t    \tstd::vector<Function<double_complex, 3> >& v = ulist[iter];\n\t    \tstd::vector<Function<double_complex, 3> >& r = rlist[iter];\n\t    \tstd::vector<Function<double_complex, 3> > vnew = transform(world, v, U, trantol, false);\n\t    \tstd::vector<Function<double_complex, 3> > rnew = transform(world, r, U, trantol, true);\n\n\t        world.gop.fence();\n\t        for (size_t i=0; i<v.size(); i++) {\n\t            v[i] = vnew[i];\n\t            r[i] = rnew[i];\n\t        }\n\t    }\n\t    world.gop.fence();\n\t}\n\n\tdouble compute_energy(const std::vector<complex_function_3d>& amo, const potentials& apot,\n\t\t\tconst std::vector<complex_function_3d>& bmo, const potentials& bpot, const bool do_print, const bool no_confinement) const;\n\n\t/// compute the potential operators applied on the orbitals\n\tpotentials compute_potentials(const std::vector<complex_function_3d>& mo,\n\t\t\tconst real_function_3d& density,\n\t\t\tconst std::vector<complex_function_3d>& rhs) const;\n\n\tTensor<double_complex> compute_vmat(\n\t\t\tconst std::vector<complex_function_3d>& mo,\n\t\t\tconst potentials& pot) const;\n\n\tstd::vector<complex_function_3d> compute_residuals(\n\t\t\tconst std::vector<complex_function_3d>& Vpsi,\n\t\t\tconst std::vector<complex_function_3d>& psi,\n\t\t\tTensor<double>& eps,\n\t\t\tconst double levelshift=0.0) const;\n\n\tvoid canonicalize(std::vector<complex_function_3d>& amo,\n\t\t\tstd::vector<complex_function_3d>& vnemo,\n\t\t\tpotentials& pot,\n\t\t\tXNonlinearSolver<std::vector<complex_function_3d> ,double_complex, vector_function_allocator<double_complex,3> >& solver,\n\t\t\tTensor<double_complex> fock, Tensor<double_complex> ovlp) const;\n\n\tstd::vector<complex_function_3d> orthonormalize(const std::vector<complex_function_3d>& mo) const;\n\n\tstd::vector<complex_function_3d> normalize(const std::vector<complex_function_3d>& mo) const;\n\n\n\treal_function_3d compute_nemo_density(const std::vector<complex_function_3d>& amo,\n\t\t\tconst std::vector<complex_function_3d>& bmo) const {\n\t\treal_function_3d density=NemoBase::compute_density(amo);\n\t\tif (have_beta()) density+=NemoBase::compute_density(bmo);\n\t\tif (get_calc_param().spin_restricted()) density=density.scale(2.0);\n\t\treturn density;\n\t}\n\n\n\treal_function_3d compute_nemo_spin_density(const std::vector<complex_function_3d>& amo,\n\t\t\tconst std::vector<complex_function_3d>& bmo) const {\n\t\tif (get_calc_param().spin_restricted()) return real_function_3d(world);\n\n\t\treal_function_3d density=NemoBase::compute_density(amo);\n\t\tif (have_beta()) density-=NemoBase::compute_density(bmo);\n\t\treturn density;\n\t}\n\n\n\treal_function_3d compute_density(const std::vector<complex_function_3d>& amo,\n\t\t\tconst std::vector<complex_function_3d>& bmo) const;\n\n\n\treal_function_3d compute_spin_density(const std::vector<complex_function_3d>& amo,\n\t\t\tconst std::vector<complex_function_3d>& bmo) const;\n\n\tstd::vector<complex_function_3d> make_bra(const std::vector<complex_function_3d>& mo) const;\n\n\nprotected:\n\n\tMolecule mol;\n\tNemo_complex_Parameters param;\n    AtomicBasisSet aobasis;\n    printleveler print_info=printleveler(2);\n\n\t/// standard calculation parameters\n    Nemo::NemoCalculationParameters nemo_param;\n\tCalculationParameters calc_param;\n\n\tstd::shared_ptr<Diamagnetic_potential_factor> diafac;\n\n\t/// the magnetic field B=rot(A)\n\tcoord_3d B;\n\n\t/// nuclear potential\n\tstd::shared_ptr<PotentialManager> potentialmanager;\npublic:\n\t/// the molecular orbitals -- alpha\n\tstd::vector<complex_function_3d> amo, bmo;\nprotected:\n\t/// the orbital energies\n\tTensor<double> aeps, beps;\n\n\t/// the spherical damping box\n\treal_function_3d sbox;\n\n\t/// the linear moments r={x,y,z}\n\tstd::vector<real_function_3d> rvec;\n\n\tstd::shared_ptr<real_convolution_3d> coulop;\n\n\n\tstruct s_orbital : public FunctionFunctorInterface<double_complex,3> {\n\n\t\tdouble exponent=1.0;\n\t\tcoord_3d origin={0.0,0.0,0.0};\n\t\ts_orbital(const double& expo, const coord_3d& o) :\n\t\t\texponent(expo), origin(o) {\n\t\t\tMADNESS_ASSERT(exponent>0.0);\n\t\t}\n\n\t\tdouble_complex operator()(const coord_3d& xyz1) const {\n\t\t\tcoord_3d xyz=xyz1-origin;\n\t\t\tdouble r=xyz.normf();\n\t\t\treturn exp(-exponent*r);\n\t\t}\n\n\t};\n\n\tstruct p_orbital : public FunctionFunctorInterface<double_complex,3> {\n\n\t\tlong m=0;\n\t\tdouble exponent=1.0;\n\t\tcoord_3d origin={0.0,0.0,0.0};\n\t\tp_orbital(const long& mm, const double& expo, const coord_3d& o)\n\t\t\t: m(mm), exponent(expo), origin(o) {\n\t\t\tMADNESS_ASSERT(m>-2 and m<2);\n\t\t\tMADNESS_ASSERT(exponent>0.0);\n\t\t}\n\n\t\tdouble_complex operator()(const coord_3d& xyz1) const {\n\t\t\tcoord_3d xyz=xyz1-origin;\n\t\t\tdouble r=xyz.normf();\n\n\t\t\tif (m==0) {\n\t\t\t\tdouble theta=acos(xyz[2]/r);\n\t\t\t\t//double phi=atan2(xyz[1],xyz[0]);\n\t\t\t\treturn r*exp(-exponent*r)*cos(theta);\n\t\t\t} else {\n\t\t\t\tdouble theta=acos(xyz[2]/r);\n\t\t\t\tdouble phi=atan2(xyz[1],xyz[0]);\n\t\t\t\treturn r*exp(-exponent*r)*sin(theta)*exp(double(m)*double_complex(0.0,1.0)*phi);\n\t\t\t}\n\t\t}\n\n\t};\n\n\t/// following Doucot Pascier 2005\n\tstruct landau_wave_function {\n\n\t\tint m=0;\n\t\tdouble l=0.0;\t\t///< radius Eq. (29)\n\t\tcoord_3d origin={0.0,0.0,0.0};\n\n\t\tlandau_wave_function(const int m, const double B,\n\t\t\t\tconst coord_3d& origin={0.0,0.0,0.0})\n\t\t\t: m(m), l(1.0/sqrt(B)), origin(origin) {\n\t\t\tprint(\"origin\",origin);\n\t\t\tMADNESS_ASSERT(m>=0);\n\t\t\tMADNESS_ASSERT(B>0);\n\t\t}\n\n\t\t/// following Eq. (43)\n\t\tdouble_complex operator()(const coord_3d& xyz1) const {\n\t\t\tconst coord_3d xyz=xyz1-origin;\n\t\t\tconst double_complex z(xyz[0],xyz[1]);\t\t\t// z = x + iy\n\t\t\tconst double_complex zbar(xyz[0],-xyz[1]);\n\n\t\t\tdouble z_confinement=exp(-0.01*xyz[2]*xyz[2]);\t\t// make wf decay in z-direction\n\t\t\treturn std::pow(zbar/l,double(m)) * exp(-0.25*zbar*z/(l*l)) * z_confinement;\n\t\t}\n\t};\n\n\tpublic:\n\tvoid test_compute_current_density() const;\n\npublic:\n\tvoid test_landau_wave_function();\n};\n\n\n\n\n} // namespace madness\n#endif /* SRC_APPS_CHEM_ZNEMO_H_ */\n"
  },
  {
    "path": "src/madness/constants.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file constants.h\n \\brief Defines common mathematical and physical constants.\n \\ingroup libraries\n\n \\todo We should consider a more uniform naming scheme for all of the conversion ratios.\n*/\n\n#ifndef MADNESS_CONSTANTS_H\n#define MADNESS_CONSTANTS_H\n\nnamespace madness {\n\n    namespace constants {\n\n        // Mathematical constants\n        constexpr double pi = 3.14159265358979323846264338328; ///< Mathematical constant \\f$\\pi\\f$.\n        constexpr double sqrt_pi = 1.77245385090551602729816748334; ///< Mathematical constant \\f$\\sqrt{\\pi}\\f$.\n        constexpr double inv_sqrt_pi = 0.564189583547756286948079451561; ///< Mathematical constant \\f$\\pi^{-1/2}\\f$.\n\n        // Misc physical constants and units\n\n        constexpr double calorie_joule_relationship = 4.184000000 ; ///< 1 kcal/mol = 4.184 kJ/mol.\n\n        constexpr double Debye = 3.3356409519815204e-30 ; ///< Cm (coulomb metre).\n\n        // The following physical constants and units were obtained from NIST http://physics.nist.gov/constants\n        // on 29/09/2025.  The comments contain the uncertainty and units.\n\n        /// Mass constant in atomic units.\n        constexpr double atomic_mass_constant = 1.66053906892e-27 ; //    0.00000000052e-27    kg\n\n        /// First hyperpolarizability in atomic units.\n        constexpr double atomic_unit_of_1st_hyperpolarizablity = 3.2063612996e-53 ; //   0.0000000015e-53    C^3 m^3 J^-2\n\n        /// Second hyperpolarizability in atomic units.\n        constexpr double atomic_unit_of_2nd_hyperpolarizablity = 6.2353799735e-65  ; //    0.0000000039e-65     C^4 m^4 J^-3\n\n        /// Action in atomic units.\n        constexpr double atomic_unit_of_action = 1.054571817e-34 ; //   (exact)    J s\n\n        /// Charge in atomic units.\n        constexpr double atomic_unit_of_charge = 1.602176634e-19 ; //   (exact)    C\n\n        /// Charge density in atomic units.\n        constexpr double atomic_unit_of_charge_density = 1.08120238677e12 ; //     0.00000000051 e12     C m^-3\n\n        /// Current in atomic units.\n        constexpr double atomic_unit_of_current = 6.6236182375082e-3 ; //     0.0000000000072e-3      A\n\n        /// Electric dipole moment in atomic units.\n        constexpr double atomic_unit_of_electric_dipole_moment = 8.4783536198e-30 ; //    0.0000000013e-30     C m\n\n        /// Electric quadrupole moment in atomic units.\n        constexpr double atomic_unit_of_electric_quadrupole_moment = 4.4865515185e-40 ; //    0.0000000014e-40     C m^2\n\n        /// Electric field in atomic units.\n        constexpr double atomic_unit_of_electric_field = 5.14220675112e11 ; //      0.00000000080e11      V m^-1\n\n        /// Electric field gradient in atomic units.\n        constexpr double atomic_unit_of_electric_field_gradient = 9.7173624424e21 ; //  0.0000000030e21      V m^-2\n\n        /// Electric polarizability in atomic units.\n        constexpr double atomic_unit_of_electric_polarizablity = 1.64877727212e-41 ; //   0.00000000051e-41   C^2 m^2 J^-1\n\n        /// Electric potential in atomic units.\n        constexpr double atomic_unit_of_electric_potential = 27.211386245981 ; //        0.000000000030          V\n\n        /// Energy in atomic units.\n        constexpr double atomic_unit_of_energy = 4.3597447222060e-18 ; //     0.0000000000048e-18     J\n\n        /// Force in atomic units.\n        constexpr double atomic_unit_of_force = 8.2387235038e-8 ; //     0.0000000013e-8      N\n\n        /// Length in atomic units.\n        constexpr double atomic_unit_of_length = 0.529177210544e-10 ; // 0.000000000082e-10 m\n\n        /// Magnetic dipole moment in atomic units.\n        constexpr double atomic_unit_of_magnetic_dipole_moment = 1.85480201315e-23 ; //   0.00000000058e-23    J T^-1\n\n        /// Magnetic flux density in atomic units.\n        constexpr double atomic_unit_of_magnetic_flux_density = 2.35051757077e5 ; //      0.00000000073 e5      T\n\n        /// Magnetizability in atomic units.\n        constexpr double atomic_unit_of_magnetizability = 7.8910365794e-29 ; //    0.0000000049e-29    J T^-2\n\n        /// Mass in atomic units.\n        constexpr double atomic_unit_of_mass = 9.1093837139e-31 ; //    0.0000000028e-31     kg\n\n        /// Momentum in atomic units.\n        constexpr double atomic_unit_of_momentum = 1.99285191545e-24 ; //   0.00000000031e-24    kg m s^-1\n\n        /// Permittivity in atomic units.\n        constexpr double atomic_unit_of_permittivity = 1.11265005620e-10 ; //  0.00000000017e-10            F m^-1\n\n        /// Time in atomic units.\n        constexpr double atomic_unit_of_time = 2.4188843265864e-17 ; // 0.0000000000026e-17 s\n\n        /// Velocity in atomic units.\n        constexpr double atomic_unit_of_velocity = 2.18769126216e6 ; //  0.00000000034 e6     m s^-1\n\n        /// Avogadro's number.\n        constexpr double Avogadro_constant =  6.02214076e23 ; //     (exact)      mol^-1\n\n        /// Bohr magneton.\n        constexpr double Bohr_magneton = 927.40100657e-26  ; //    0.00000029e-26        J T^-1\n\n        /// Bohr radius.\n        constexpr double Bohr_radius = 0.529177210544e-10 ; // 0.000000000082e-10 m\n\n        /// Boltzmann constant.\n        constexpr double Boltzmann_constant = 1.380649e-23 ; //       (exact)       J K^-1\n\n        /// Compton wavelength.\n        constexpr double Compton_wavelength = 2.42631023538e-12 ; //  0.00000000076e-12   m\n\n        /// Quantum of conductance, \\f$ 2e^2/h \\f$.\n        constexpr double conductance_quantum = 7.748091729e-5 ; //  (exact)    S\n\n        /// Electron \\f$g\\f$ factor.\n        constexpr double electron_g_factor = -2.00231930436092 ; //  0.00000000000036\n\n        /// Electron gyromagnetic ratio.\n        constexpr double electron_gyromagnetic_ratio = 1.76085962784e11 ; //   0.00000000055 e11     s^-1 T^-1\n\n        /// Electron magnetic moment.\n        constexpr double electron_magnetic_moment = -928.47646917e-26 ; //    0.00000029e-26        J T^-1\n\n        /// Electron magnetic moment anomaly.\n        constexpr double electron_magnetic_moment_anomaly =  1.15965218046e-3 ; // 0.00000000018e-3\n\n        /// Ratio between the electron magnetic moment and Bohr magneton.\n        constexpr double electron_magnetic_moment_to_Bohr_magneton_ratio =  -1.00115965218046 ; // 0.00000000000018\n\n        /// Ratio between the electron magnetic moment and nuclear magneton.\n        constexpr double electron_magnetic_moment_to_nuclear_magneton_ratio = -1838.281971877 ; //     0.000000032\n\n        /// Electron mass.\n        constexpr double electron_mass = 9.1093837139e-31 ; //    0.0000000028e-31     kg\n\n        /// Ratio of the electron to proton mass.\n        constexpr double electron_proton_mass_ratio = 5.446170214889e-4 ; //   0.000000000094e-4\n\n        /// Electron volt.\n        constexpr double electron_volt = 1.602176634e-19 ; //   (exact)    J\n\n        /// Electron volt to Hartree conversion.\n        constexpr double electron_volt_hartree_relationship = 3.6749322175665e-2 ; //     0.0000000000040e-2     E_h\n\n        /// Electron volt to Hertz relationship.\n        constexpr double electron_volt_hertz_relationship = 2.417989242e14 ; //     (exact)     Hz\n\n        /// Electron volt to Joule relationship.\n        constexpr double electron_volt_joule_relationship = 1.602176634e-19 ; //   (exact)    J\n\n        /// Elementary charge.\n        constexpr double elementary_charge = 1.602176634e-19 ; //    (exact)    C\n\n        /// Faraday constant.\n        constexpr double Faraday_constant = 96485.33212 ; //      (exact)     C mol^-1\n\n        /// Fermi coupling constant.\n        constexpr double Fermi_coupling_constant = 1.1663787e-5 ; // 0.0000006e-5          GeV^-2\n\n        /// Fine structure constant.\n        constexpr double fine_structure_constant = 7.2973525643e-3 ;  //   0.0000000011e-3\n\n        /// Hartree to electron volt relationship.\n        constexpr double hartree_electron_volt_relationship = 27.211386245981 ; //        0.000000000030          eV\n\n        /// Hartree energy in Joules.\n        constexpr double Hartree_energy = 4.3597447222060e-18 ; //     0.0000000000048e-18     J\n\n        /// Hartree energy in Hertz.\n        constexpr double hartree_hertz_relationship = 6.5796839204999e15 ; // 0.0000000000072e15 Hz\n\n        /// Hartree energy in inverse meters.\n        constexpr double hartree_inverse_meter_relationship = 2.1947463136314e7 ; //  0.0000000000024 e7  m^-1\n\n        /// Hartree energy in Joules.\n        constexpr double hartree_joule_relationship = 4.3597447222060e-18 ; //    0.0000000000048e-18     J\n\n        /// Hartree energy in Kelvin.\n        constexpr double hartree_kelvin_relationship = 3.1577502480398e5 ; //        0.0000000000034 e5         K\n\n        /// Hertz energy in electron volts.\n        constexpr double hertz_electron_volt_relationship = 4.135667696e-15 ; //     (exact)     eV\n\n        /// Hertz energy in Hartrees.\n        constexpr double hertz_hartree_relationship = 1.5198298460574e-16 ; // 0.0000000000017e-16 E_h\n\n        /// Hertz energy in Joules.\n        constexpr double hertz_joule_relationship = 6.62607015e-34 ; //  (exact)     J\n\n        /// Hertz energy in Kelvin.\n        constexpr double hertz_kelvin_relationship = 4.799243073e-11 ; //      (exact)       K\n\n        /// Nuclear magneton.\n        constexpr double nuclear_magneton = 5.0507837393e-27 ; //     0.0000000016e-27     J T^-1\n\n        /// Nuclear magneton in electron volts per Tesla.\n        constexpr double nuclear_magneton_in_eV_per_T = 3.15245125417e-8 ; //   0.00000000098e-8    eV T^-1\n\n        /// Planck's constant.\n        constexpr double Planck_constant = 6.62607015e-34 ; //    (exact)     J s\n\n        /// Reduced Planck's constant.\n        constexpr double Planck_constant_over_2_pi = 1.054571817e-34 ; //   (exact)    J s\n\n        /// Ratio of proton to electron mass.\n        constexpr double proton_electron_mass_ratio = 1836.152673426 ; //      0.000000032\n\n        /// Proton \\f$ g \\f$ factor.\n        constexpr double proton_g_factor = 5.5856946893 ; //        0.0000000016\n\n        /// Proton gyromagnetic ratio.\n        constexpr double proton_gyromagnetic_ratio = 2.6752218708e8 ; //     0.0000000011 e8      s^-1 T^-1\n\n        /// Proton magnetic moment.\n        constexpr double proton_magnetic_moment = 1.41060679545e-26 ; //   0.00000000060e-26    J T^-1\n\n        /// Proton mass.\n        constexpr double proton_mass = 1.67262192595e-27 ; //   0.00000000052e-27    kg\n\n        /// Rydberg constant.\n        constexpr double Rydberg_constant = 10973731.568157 ; //    0.000012             m^-1\n\n        /// Speed of light in a vacuum.\n        constexpr double speed_of_light_in_vacuum = 299792458 ; //           (exact)               m s^-1\n\n        /// Stefan-Boltzmann constant.\n        constexpr double Stefan_Boltzmann_constant = 5.670374419e-8 ; //      (exact)         W m^-2 K^-4\n\n        /// Unified atomic mass unit.\n        constexpr double unified_atomic_mass_unit = 1.66053906892e-27 ; //   0.00000000052e-27    kg\n\n        /// Atomic mass in atomic units\n        constexpr double atomic_mass_in_au = atomic_mass_constant/atomic_unit_of_mass;\n\n        /// conversion from atomic units in reciprocal centimeter\n        constexpr double au2invcm = 219474.63136314;  // 0.00000024  cm^-1\n\n        /// the dielectric constant \\f$\\epsilon_0\\f$, or the permittivity of vacuum\n        constexpr double dielectric_constant = 8.8541878188e-12;     //   0.0000000014   F m^{-1}\n\n        /// speed of light in vacuum in au\n        constexpr double speed_of_light_in_vacuum_in_au = 1.0/fine_structure_constant;   // \\approx 137\n\n    }\n\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/external/CMakeLists.txt",
    "content": "# src/madness/external\n\nif(BUILD_TESTING)\n  add_subdirectory(gtest)\nendif()\n\nif (NOT MADNESS_BUILD_MADWORLD_ONLY)\n  add_subdirectory(muParser)\n  add_subdirectory(tinyxml)\n  add_subdirectory(nlohmann_json)\nendif (NOT MADNESS_BUILD_MADWORLD_ONLY)\n\n# if want embedded elemental ...\nif(ENABLE_ELEMENTAL AND ENABLE_ELEMENTAL_EMBEDDED)\n\n  # Note: Here we are changing the build configuration of for Elemental since it\n  # requires [Hybrid|Pure][Debug|Release] as the build configuratino. This\n  # should not be required if we upgrade Elemental to v0.85.\n  \n  # Store the build configuratin\n  set(PUSH_CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE})\n  \n  # Set the build type used by Elemental. We use Pure (MPI only/no OpenMP) since\n  # MADNESS threads do not play nice with Elemental threads.\n  if(CMAKE_BUILD_TYPE STREQUAL \"Debug\")\n    set(CMAKE_BUILD_TYPE \"PureDebug\" \n        CACHE STRING \"Specifies the build type on single-configuration generators\" FORCE)\n  else()\n    set(CMAKE_BUILD_TYPE \"PureRelease\" \n        CACHE STRING \"Specifies the build type on single-configuration generators\" FORCE)\n  endif()\n  \n  # Set the configuration variables used by elemental\n  set(MATH_LIBS \"${LAPACK_LIBRARIES}\")\n  if(((NOT ENABLE_SPINLOCKS) OR ENABLE_NEVER_SPIN) OR (CMAKE_SYSTEM_NAME MATCHES \"Darwin\"))\n    set(HAVE_SPINLOCKS OFF CACHE BOOL \"Enable if pthread lib supports spinlocks\")\n  else()\n    set(HAVE_SPINLOCKS ON CACHE BOOL \"Enable if pthread lib supports spinlocks\")\n  endif()\n\n  message(STATUS \"Begin Elemental Configure\")\n  add_subdirectory(elemental)\n  message(STATUS \"End Elemental Configure\")\n  set(ELEMENTAL_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/elemental/include\n      ${CMAKE_CURRENT_BINARY_DIR}/elemental/include PARENT_SCOPE)\n  set(ELEMENTAL_LIBRARIES elemental PARENT_SCOPE)\n  \n  # Restore the build configuration.\n  set(CMAKE_BUILD_TYPE ${PUSH_CMAKE_BUILD_TYPE}\n      CACHE STRING \"Specifies the build type on single-configuration generators\" FORCE) \n\n  set(ELEMENTAL_FOUND 1 PARENT_SCOPE)\n  set(ELEMENTAL_PACKAGE_NAME elemental CACHE INTERNAL \"Elemental package name (component name is same)\" FORCE)\n  set(HAVE_ELEMENTAL_H ON CACHE INTERNAL \"Have elemental.hpp\" FORCE)\n  \n  # Add build-elemental target\n  add_custom_target(build-elemental ALL\n      COMMAND ${CMAKE_COMMAND} --build . --target elemental\n      WORKING_DIRECTORY ${PROJECT_BINARY_DIR}\n      COMMENT \"Building elemental\"\n      USES_TERMINAL)\n  \n  # Add a component install target for elemental \n  add_custom_target(install-elemental\n      COMMAND ${CMAKE_COMMAND} -DCOMPONENT=elemental -P ${PROJECT_BINARY_DIR}/cmake_install.cmake\n      COMMENT \"Installing elemental library components\"\n      USES_TERMINAL)\n  add_dependencies(install-elemental elemental)\n  \n  # elemental target has been added to the list of exported targets in hacked CMakeFiles.txt in elemental subdir\n  \nendif(ENABLE_ELEMENTAL AND ENABLE_ELEMENTAL_EMBEDDED)\n"
  },
  {
    "path": "src/madness/external/catch/catch.hpp",
    "content": "/*\n *  Catch v2.13.9\n *  Generated: 2022-04-12 22:37:23.260201\n *  ----------------------------------------------------------\n *  This file has been merged from multiple headers. Please don't edit it directly\n *  Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved.\n *\n *  Distributed under the Boost Software License, Version 1.0. (See accompanying\n *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n */\n#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED\n#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED\n// start catch.hpp\n\n\n#define CATCH_VERSION_MAJOR 2\n#define CATCH_VERSION_MINOR 13\n#define CATCH_VERSION_PATCH 9\n\n#ifdef __clang__\n#    pragma clang system_header\n#elif defined __GNUC__\n#    pragma GCC system_header\n#endif\n\n// start catch_suppress_warnings.h\n\n#ifdef __clang__\n#   ifdef __ICC // icpc defines the __clang__ macro\n#       pragma warning(push)\n#       pragma warning(disable: 161 1682)\n#   else // __ICC\n#       pragma clang diagnostic push\n#       pragma clang diagnostic ignored \"-Wpadded\"\n#       pragma clang diagnostic ignored \"-Wswitch-enum\"\n#       pragma clang diagnostic ignored \"-Wcovered-switch-default\"\n#    endif\n#elif defined __GNUC__\n// Because REQUIREs trigger GCC's -Wparentheses, and because still\n// supported version of g++ have only buggy support for _Pragmas,\n// Wparentheses have to be suppressed globally.\n#    pragma GCC diagnostic ignored \"-Wparentheses\" // See #674 for details\n\n#    pragma GCC diagnostic push\n#    pragma GCC diagnostic ignored \"-Wunused-variable\"\n#    pragma GCC diagnostic ignored \"-Wpadded\"\n#endif\n// end catch_suppress_warnings.h\n#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER)\n#  define CATCH_IMPL\n#  define CATCH_CONFIG_ALL_PARTS\n#endif\n\n// In the impl file, we want to have access to all parts of the headers\n// Can also be used to sanely support PCHs\n#if defined(CATCH_CONFIG_ALL_PARTS)\n#  define CATCH_CONFIG_EXTERNAL_INTERFACES\n#  if defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#    undef CATCH_CONFIG_DISABLE_MATCHERS\n#  endif\n#  if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)\n#    define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n#  endif\n#endif\n\n#if !defined(CATCH_CONFIG_IMPL_ONLY)\n// start catch_platform.h\n\n// See e.g.:\n// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html\n#ifdef __APPLE__\n#  include <TargetConditionals.h>\n#  if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \\\n      (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1)\n#    define CATCH_PLATFORM_MAC\n#  elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1)\n#    define CATCH_PLATFORM_IPHONE\n#  endif\n\n#elif defined(linux) || defined(__linux) || defined(__linux__)\n#  define CATCH_PLATFORM_LINUX\n\n#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__)\n#  define CATCH_PLATFORM_WINDOWS\n#endif\n\n// end catch_platform.h\n\n#ifdef CATCH_IMPL\n#  ifndef CLARA_CONFIG_MAIN\n#    define CLARA_CONFIG_MAIN_NOT_DEFINED\n#    define CLARA_CONFIG_MAIN\n#  endif\n#endif\n\n// start catch_user_interfaces.h\n\nnamespace Catch {\n    unsigned int rngSeed();\n}\n\n// end catch_user_interfaces.h\n// start catch_tag_alias_autoregistrar.h\n\n// start catch_common.h\n\n// start catch_compiler_capabilities.h\n\n// Detect a number of compiler features - by compiler\n// The following features are defined:\n//\n// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported?\n// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported?\n// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported?\n// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled?\n// ****************\n// Note to maintainers: if new toggles are added please document them\n// in configuration.md, too\n// ****************\n\n// In general each macro has a _NO_<feature name> form\n// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature.\n// Many features, at point of detection, define an _INTERNAL_ macro, so they\n// can be combined, en-mass, with the _NO_ forms later.\n\n#ifdef __cplusplus\n\n#  if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)\n#    define CATCH_CPP14_OR_GREATER\n#  endif\n\n#  if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)\n#    define CATCH_CPP17_OR_GREATER\n#  endif\n\n#endif\n\n// Only GCC compiler should be used in this block, so other compilers trying to\n// mask themselves as GCC should be ignored.\n#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__)\n#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( \"GCC diagnostic push\" )\n#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( \"GCC diagnostic pop\" )\n\n#    define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__)\n\n#endif\n\n#if defined(__clang__)\n\n#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( \"clang diagnostic push\" )\n#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  _Pragma( \"clang diagnostic pop\" )\n\n// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug\n// which results in calls to destructors being emitted for each temporary,\n// without a matching initialization. In practice, this can result in something\n// like `std::string::~string` being called on an uninitialized value.\n//\n// For example, this code will likely segfault under IBM XL:\n// ```\n// REQUIRE(std::string(\"12\") + \"34\" == \"1234\")\n// ```\n//\n// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.\n#  if !defined(__ibmxl__) && !defined(__CUDACC__)\n#    define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */\n#  endif\n\n#    define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wexit-time-destructors\\\"\" ) \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wglobal-constructors\\\"\")\n\n#    define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wparentheses\\\"\" )\n\n#    define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wunused-variable\\\"\" )\n\n#    define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wgnu-zero-variadic-macro-arguments\\\"\" )\n\n#    define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n         _Pragma( \"clang diagnostic ignored \\\"-Wunused-template\\\"\" )\n\n#endif // __clang__\n\n////////////////////////////////////////////////////////////////////////////////\n// Assume that non-Windows platforms support posix signals by default\n#if !defined(CATCH_PLATFORM_WINDOWS)\n#define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// We know some environments not to support full POSIX signals\n#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__)\n#define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS\n#endif\n\n#ifdef __OS400__\n#       define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS\n#       define CATCH_CONFIG_COLOUR_NONE\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// Android somehow still does not support std::to_string\n#if defined(__ANDROID__)\n#    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING\n#    define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// Not all Windows environments support SEH properly\n#if defined(__MINGW32__)\n#    define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// PS4\n#if defined(__ORBIS__)\n#    define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// Cygwin\n#ifdef __CYGWIN__\n\n// Required for some versions of Cygwin to declare gettimeofday\n// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin\n#   define _BSD_SOURCE\n// some versions of cygwin (most) do not support std::to_string. Use the libstd check.\n// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813\n# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \\\n           && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))\n\n#    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING\n\n# endif\n#endif // __CYGWIN__\n\n////////////////////////////////////////////////////////////////////////////////\n// Visual C++\n#if defined(_MSC_VER)\n\n// Universal Windows platform does not support SEH\n// Or console colours (or console at all...)\n#  if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)\n#    define CATCH_CONFIG_COLOUR_NONE\n#  else\n#    define CATCH_INTERNAL_CONFIG_WINDOWS_SEH\n#  endif\n\n#  if !defined(__clang__) // Handle Clang masquerading for msvc\n\n// MSVC traditional preprocessor needs some workaround for __VA_ARGS__\n// _MSVC_TRADITIONAL == 0 means new conformant preprocessor\n// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor\n#    if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL)\n#      define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#    endif // MSVC_TRADITIONAL\n\n// Only do this if we're not using clang on Windows, which uses `diagnostic push` & `diagnostic pop`\n#    define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) )\n#    define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION  __pragma( warning(pop) )\n#  endif // __clang__\n\n#endif // _MSC_VER\n\n#if defined(_REENTRANT) || defined(_MSC_VER)\n// Enable async processing, as -pthread is specified or no additional linking is required\n# define CATCH_INTERNAL_CONFIG_USE_ASYNC\n#endif // _MSC_VER\n\n////////////////////////////////////////////////////////////////////////////////\n// Check if we are compiled with -fno-exceptions or equivalent\n#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND)\n#  define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// DJGPP\n#ifdef __DJGPP__\n#  define CATCH_INTERNAL_CONFIG_NO_WCHAR\n#endif // __DJGPP__\n\n////////////////////////////////////////////////////////////////////////////////\n// Embarcadero C++Build\n#if defined(__BORLANDC__)\n#define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n\n// Use of __COUNTER__ is suppressed during code analysis in\n// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly\n// handled by it.\n// Otherwise all supported compilers support COUNTER macro,\n// but user still might want to turn it off\n#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L )\n#define CATCH_INTERNAL_CONFIG_COUNTER\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n\n// RTX is a special version of Windows that is real time.\n// This means that it is detected as Windows, but does not provide\n// the same set of capabilities as real Windows does.\n#if defined(UNDER_RTSS) || defined(RTX64_BUILD)\n#define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH\n    #define CATCH_INTERNAL_CONFIG_NO_ASYNC\n    #define CATCH_CONFIG_COLOUR_NONE\n#endif\n\n#if !defined(_GLIBCXX_USE_C99_MATH_TR1)\n#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER\n#endif\n\n// Various stdlib support checks that require __has_include\n#if defined(__has_include)\n// Check if string_view is available and usable\n#if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)\n#    define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW\n#endif\n\n// Check if optional is available and usable\n#  if __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)\n#    define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL\n#  endif // __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)\n\n// Check if byte is available and usable\n#  if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)\n#    include <cstddef>\n#    if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0)\n#      define CATCH_INTERNAL_CONFIG_CPP17_BYTE\n#    endif\n#  endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)\n\n// Check if variant is available and usable\n#  if __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)\n#    if defined(__clang__) && (__clang_major__ < 8)\n// work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852\n         // fix should be in clang 8, workaround in libstdc++ 8.2\n  #      include <ciso646>\n  #      if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)\n  #        define CATCH_CONFIG_NO_CPP17_VARIANT\n  #      else\n  #        define CATCH_INTERNAL_CONFIG_CPP17_VARIANT\n  #      endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)\n#    else\n#      define CATCH_INTERNAL_CONFIG_CPP17_VARIANT\n#    endif // defined(__clang__) && (__clang_major__ < 8)\n#  endif // __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)\n#endif // defined(__has_include)\n\n#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER)\n#   define CATCH_CONFIG_COUNTER\n#endif\n#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH)\n#   define CATCH_CONFIG_WINDOWS_SEH\n#endif\n// This is set by default, because we assume that unix compilers are posix-signal-compatible by default.\n#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS)\n#   define CATCH_CONFIG_POSIX_SIGNALS\n#endif\n// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions.\n#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR)\n#   define CATCH_CONFIG_WCHAR\n#endif\n\n#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING)\n#    define CATCH_CONFIG_CPP11_TO_STRING\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL)\n#  define CATCH_CONFIG_CPP17_OPTIONAL\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW)\n#  define CATCH_CONFIG_CPP17_STRING_VIEW\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT)\n#  define CATCH_CONFIG_CPP17_VARIANT\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE)\n#  define CATCH_CONFIG_CPP17_BYTE\n#endif\n\n#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)\n#  define CATCH_INTERNAL_CONFIG_NEW_CAPTURE\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE)\n#  define CATCH_CONFIG_NEW_CAPTURE\n#endif\n\n#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n#  define CATCH_CONFIG_DISABLE_EXCEPTIONS\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN)\n#  define CATCH_CONFIG_POLYFILL_ISNAN\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC)  && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC)\n#  define CATCH_CONFIG_USE_ASYNC\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_NO_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_ANDROID_LOGWRITE)\n#  define CATCH_CONFIG_ANDROID_LOGWRITE\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)\n#  define CATCH_CONFIG_GLOBAL_NEXTAFTER\n#endif\n\n// Even if we do not think the compiler has that warning, we still have\n// to provide a macro that can be used by the code.\n#if !defined(CATCH_INTERNAL_START_WARNINGS_SUPPRESSION)\n#   define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION\n#endif\n#if !defined(CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION)\n#   define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS\n#endif\n#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS\n#endif\n\n// The goal of this macro is to avoid evaluation of the arguments, but\n// still have the compiler warn on problems inside...\n#if !defined(CATCH_INTERNAL_IGNORE_BUT_WARN)\n#   define CATCH_INTERNAL_IGNORE_BUT_WARN(...)\n#endif\n\n#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10)\n#   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS\n#elif defined(__clang__) && (__clang_major__ < 5)\n#   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS\n#endif\n\n#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS)\n#   define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS\n#endif\n\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n#define CATCH_TRY if ((true))\n#define CATCH_CATCH_ALL if ((false))\n#define CATCH_CATCH_ANON(type) if ((false))\n#else\n#define CATCH_TRY try\n#define CATCH_CATCH_ALL catch (...)\n#define CATCH_CATCH_ANON(type) catch (type)\n#endif\n\n#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR)\n#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#endif\n\n// end catch_compiler_capabilities.h\n#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line\n#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )\n#ifdef CATCH_CONFIG_COUNTER\n#  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ )\n#else\n#  define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ )\n#endif\n\n#include <iosfwd>\n#include <string>\n#include <cstdint>\n\n// We need a dummy global operator<< so we can bring it into Catch namespace later\nstruct Catch_global_namespace_dummy {};\nstd::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy);\n\nnamespace Catch {\n\n    struct CaseSensitive { enum Choice {\n            Yes,\n            No\n        }; };\n\n    class NonCopyable {\n        NonCopyable( NonCopyable const& )              = delete;\n        NonCopyable( NonCopyable && )                  = delete;\n        NonCopyable& operator = ( NonCopyable const& ) = delete;\n        NonCopyable& operator = ( NonCopyable && )     = delete;\n\n    protected:\n        NonCopyable();\n        virtual ~NonCopyable();\n    };\n\n    struct SourceLineInfo {\n\n        SourceLineInfo() = delete;\n        SourceLineInfo( char const* _file, std::size_t _line ) noexcept\n                :   file( _file ),\n                    line( _line )\n        {}\n\n        SourceLineInfo( SourceLineInfo const& other )            = default;\n        SourceLineInfo& operator = ( SourceLineInfo const& )     = default;\n        SourceLineInfo( SourceLineInfo&& )              noexcept = default;\n        SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default;\n\n        bool empty() const noexcept { return file[0] == '\\0'; }\n        bool operator == ( SourceLineInfo const& other ) const noexcept;\n        bool operator < ( SourceLineInfo const& other ) const noexcept;\n\n        char const* file;\n        std::size_t line;\n    };\n\n    std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info );\n\n    // Bring in operator<< from global namespace into Catch namespace\n    // This is necessary because the overload of operator<< above makes\n    // lookup stop at namespace Catch\n    using ::operator<<;\n\n    // Use this in variadic streaming macros to allow\n    //    >> +StreamEndStop\n    // as well as\n    //    >> stuff +StreamEndStop\n    struct StreamEndStop {\n        std::string operator+() const;\n    };\n    template<typename T>\n    T const& operator + ( T const& value, StreamEndStop ) {\n        return value;\n    }\n}\n\n#define CATCH_INTERNAL_LINEINFO \\\n    ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )\n\n// end catch_common.h\nnamespace Catch {\n\n    struct RegistrarForTagAliases {\n        RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo );\n    };\n\n} // end namespace Catch\n\n#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n    namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n// end catch_tag_alias_autoregistrar.h\n// start catch_test_registry.h\n\n// start catch_interfaces_testcase.h\n\n#include <vector>\n\nnamespace Catch {\n\n    class TestSpec;\n\n    struct ITestInvoker {\n        virtual void invoke () const = 0;\n        virtual ~ITestInvoker();\n    };\n\n    class TestCase;\n    struct IConfig;\n\n    struct ITestCaseRegistry {\n        virtual ~ITestCaseRegistry();\n        virtual std::vector<TestCase> const& getAllTests() const = 0;\n        virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const = 0;\n    };\n\n    bool isThrowSafe( TestCase const& testCase, IConfig const& config );\n    bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );\n    std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );\n    std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );\n\n}\n\n// end catch_interfaces_testcase.h\n// start catch_stringref.h\n\n#include <cstddef>\n#include <string>\n#include <iosfwd>\n#include <cassert>\n\nnamespace Catch {\n\n    /// A non-owning string class (similar to the forthcoming std::string_view)\n    /// Note that, because a StringRef may be a substring of another string,\n    /// it may not be null terminated.\n    class StringRef {\n    public:\n        using size_type = std::size_t;\n        using const_iterator = const char*;\n\n    private:\n        static constexpr char const* const s_empty = \"\";\n\n        char const* m_start = s_empty;\n        size_type m_size = 0;\n\n    public: // construction\n        constexpr StringRef() noexcept = default;\n\n        StringRef( char const* rawChars ) noexcept;\n\n        constexpr StringRef( char const* rawChars, size_type size ) noexcept\n                :   m_start( rawChars ),\n                    m_size( size )\n        {}\n\n        StringRef( std::string const& stdString ) noexcept\n                :   m_start( stdString.c_str() ),\n                    m_size( stdString.size() )\n        {}\n\n        explicit operator std::string() const {\n            return std::string(m_start, m_size);\n        }\n\n    public: // operators\n        auto operator == ( StringRef const& other ) const noexcept -> bool;\n        auto operator != (StringRef const& other) const noexcept -> bool {\n            return !(*this == other);\n        }\n\n        auto operator[] ( size_type index ) const noexcept -> char {\n            assert(index < m_size);\n            return m_start[index];\n        }\n\n    public: // named queries\n        constexpr auto empty() const noexcept -> bool {\n            return m_size == 0;\n        }\n        constexpr auto size() const noexcept -> size_type {\n            return m_size;\n        }\n\n        // Returns the current start pointer. If the StringRef is not\n        // null-terminated, throws std::domain_exception\n        auto c_str() const -> char const*;\n\n    public: // substrings and searches\n        // Returns a substring of [start, start + length).\n        // If start + length > size(), then the substring is [start, size()).\n        // If start > size(), then the substring is empty.\n        auto substr( size_type start, size_type length ) const noexcept -> StringRef;\n\n        // Returns the current start pointer. May not be null-terminated.\n        auto data() const noexcept -> char const*;\n\n        constexpr auto isNullTerminated() const noexcept -> bool {\n            return m_start[m_size] == '\\0';\n        }\n\n    public: // iterators\n        constexpr const_iterator begin() const { return m_start; }\n        constexpr const_iterator end() const { return m_start + m_size; }\n    };\n\n    auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&;\n    auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&;\n\n    constexpr auto operator \"\" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef {\n        return StringRef( rawChars, size );\n    }\n} // namespace Catch\n\nconstexpr auto operator \"\" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef {\n    return Catch::StringRef( rawChars, size );\n}\n\n// end catch_stringref.h\n// start catch_preprocessor.hpp\n\n\n#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__\n#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__)))\n#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__)))\n\n#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__\n// MSVC needs more evaluations\n#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__)))\n#define CATCH_RECURSE(...)  CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__))\n#else\n#define CATCH_RECURSE(...)  CATCH_RECURSION_LEVEL5(__VA_ARGS__)\n#endif\n\n#define CATCH_REC_END(...)\n#define CATCH_REC_OUT\n\n#define CATCH_EMPTY()\n#define CATCH_DEFER(id) id CATCH_EMPTY()\n\n#define CATCH_REC_GET_END2() 0, CATCH_REC_END\n#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2\n#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1\n#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT\n#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0)\n#define CATCH_REC_NEXT(test, next)  CATCH_REC_NEXT1(CATCH_REC_GET_END test, next)\n\n#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST2(f, x, peek, ...)   f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ )\n\n#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ )\n#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...)   f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ )\n\n// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results,\n// and passes userdata as the first parameter to each invocation,\n// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c)\n#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0))\n\n#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))\n\n#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param)\n#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__\n#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__\n#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF\n#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__)\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__\n#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param))\n#else\n// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF\n#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__)\n#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__\n#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1)\n#endif\n\n#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__\n#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name)\n\n#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__)\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>())\n#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))\n#else\n#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>()))\n#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)))\n#endif\n\n#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\\\n    CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__)\n\n#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0)\n#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1)\n#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2)\n#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3)\n#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4)\n#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5)\n#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6)\n#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7)\n#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8)\n#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9)\n#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10)\n\n#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N\n\n#define INTERNAL_CATCH_TYPE_GEN\\\n    template<typename...> struct TypeList {};\\\n    template<typename...Ts>\\\n    constexpr auto get_wrapper() noexcept -> TypeList<Ts...> { return {}; }\\\n    template<template<typename...> class...> struct TemplateTypeList{};\\\n    template<template<typename...> class...Cs>\\\n    constexpr auto get_wrapper() noexcept -> TemplateTypeList<Cs...> { return {}; }\\\n    template<typename...>\\\n    struct append;\\\n    template<typename...>\\\n    struct rewrap;\\\n    template<template<typename...> class, typename...>\\\n    struct create;\\\n    template<template<typename...> class, typename>\\\n    struct convert;\\\n    \\\n    template<typename T> \\\n    struct append<T> { using type = T; };\\\n    template< template<typename...> class L1, typename...E1, template<typename...> class L2, typename...E2, typename...Rest>\\\n    struct append<L1<E1...>, L2<E2...>, Rest...> { using type = typename append<L1<E1...,E2...>, Rest...>::type; };\\\n    template< template<typename...> class L1, typename...E1, typename...Rest>\\\n    struct append<L1<E1...>, TypeList<mpl_::na>, Rest...> { using type = L1<E1...>; };\\\n    \\\n    template< template<typename...> class Container, template<typename...> class List, typename...elems>\\\n    struct rewrap<TemplateTypeList<Container>, List<elems...>> { using type = TypeList<Container<elems...>>; };\\\n    template< template<typename...> class Container, template<typename...> class List, class...Elems, typename...Elements>\\\n    struct rewrap<TemplateTypeList<Container>, List<Elems...>, Elements...> { using type = typename append<TypeList<Container<Elems...>>, typename rewrap<TemplateTypeList<Container>, Elements...>::type>::type; };\\\n    \\\n    template<template <typename...> class Final, template< typename...> class...Containers, typename...Types>\\\n    struct create<Final, TemplateTypeList<Containers...>, TypeList<Types...>> { using type = typename append<Final<>, typename rewrap<TemplateTypeList<Containers>, Types...>::type...>::type; };\\\n    template<template <typename...> class Final, template <typename...> class List, typename...Ts>\\\n    struct convert<Final, List<Ts...>> { using type = typename append<Final<>,TypeList<Ts>...>::type; };\n\n#define INTERNAL_CATCH_NTTP_1(signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> struct Nttp{};\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    constexpr auto get_wrapper() noexcept -> Nttp<__VA_ARGS__> { return {}; } \\\n    template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...> struct NttpTemplateTypeList{};\\\n    template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Cs>\\\n    constexpr auto get_wrapper() noexcept -> NttpTemplateTypeList<Cs...> { return {}; } \\\n    \\\n    template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>> { using type = TypeList<Container<__VA_ARGS__>>; };\\\n    template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature), typename...Elements>\\\n    struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>, Elements...> { using type = typename append<TypeList<Container<__VA_ARGS__>>, typename rewrap<NttpTemplateTypeList<Container>, Elements...>::type>::type; };\\\n    template<template <typename...> class Final, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Containers, typename...Types>\\\n    struct create<Final, NttpTemplateTypeList<Containers...>, TypeList<Types...>> { using type = typename append<Final<>, typename rewrap<NttpTemplateTypeList<Containers>, Types...>::type...>::type; };\n\n#define INTERNAL_CATCH_DECLARE_SIG_TEST0(TestName)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST1(TestName, signature)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_X(TestName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n\n#define INTERNAL_CATCH_DEFINE_SIG_TEST0(TestName)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST1(TestName, signature)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_X(TestName, signature,...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    static void TestName()\n\n#define INTERNAL_CATCH_NTTP_REGISTER0(TestFunc, signature)\\\n    template<typename Type>\\\n    void reg_test(TypeList<Type>, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<Type>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_NTTP_REGISTER(TestFunc, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    void reg_test(Nttp<__VA_ARGS__>, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<__VA_ARGS__>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_NTTP_REGISTER_METHOD0(TestName, signature, ...)\\\n    template<typename Type>\\\n    void reg_test(TypeList<Type>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestName<Type>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_NTTP_REGISTER_METHOD(TestName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\\\n    void reg_test(Nttp<__VA_ARGS__>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\\\n    {\\\n        Catch::AutoReg( Catch::makeTestInvoker(&TestName<__VA_ARGS__>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\\\n    }\n\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0(TestName, ClassName)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1(TestName, ClassName, signature)\\\n    template<typename TestType> \\\n    struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName)<TestType> { \\\n        void test();\\\n    }\n\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X(TestName, ClassName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> \\\n    struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName)<__VA_ARGS__> { \\\n        void test();\\\n    }\n\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0(TestName)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1(TestName, signature)\\\n    template<typename TestType> \\\n    void INTERNAL_CATCH_MAKE_NAMESPACE(TestName)::TestName<TestType>::test()\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X(TestName, signature, ...)\\\n    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> \\\n    void INTERNAL_CATCH_MAKE_NAMESPACE(TestName)::TestName<__VA_ARGS__>::test()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_NTTP_0\n#define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__),INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_0)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__)\n#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__)\n#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__)\n#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__)\n#else\n#define INTERNAL_CATCH_NTTP_0(signature)\n#define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1,INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_0)( __VA_ARGS__))\n#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__))\n#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__))\n#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( \"dummy\", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__))\n#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__))\n#endif\n\n// end catch_preprocessor.hpp\n// start catch_meta.hpp\n\n\n#include <type_traits>\n\nnamespace Catch {\n    template<typename T>\n    struct always_false : std::false_type {};\n\n    template <typename> struct true_given : std::true_type {};\n    struct is_callable_tester {\n        template <typename Fun, typename... Args>\n        true_given<decltype(std::declval<Fun>()(std::declval<Args>()...))> static test(int);\n        template <typename...>\n        std::false_type static test(...);\n    };\n\n    template <typename T>\n    struct is_callable;\n\n    template <typename Fun, typename... Args>\n    struct is_callable<Fun(Args...)> : decltype(is_callable_tester::test<Fun, Args...>(0)) {};\n\n#if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703\n    // std::result_of is deprecated in C++17 and removed in C++20. Hence, it is\n    // replaced with std::invoke_result here.\n    template <typename Func, typename... U>\n    using FunctionReturnType = std::remove_reference_t<std::remove_cv_t<std::invoke_result_t<Func, U...>>>;\n#else\n    // Keep ::type here because we still support C++11\n    template <typename Func, typename... U>\n    using FunctionReturnType = typename std::remove_reference<typename std::remove_cv<typename std::result_of<Func(U...)>::type>::type>::type;\n#endif\n\n} // namespace Catch\n\nnamespace mpl_{\n    struct na;\n}\n\n// end catch_meta.hpp\nnamespace Catch {\n\n    template<typename C>\n    class TestInvokerAsMethod : public ITestInvoker {\n        void (C::*m_testAsMethod)();\n    public:\n        TestInvokerAsMethod( void (C::*testAsMethod)() ) noexcept : m_testAsMethod( testAsMethod ) {}\n\n        void invoke() const override {\n            C obj;\n            (obj.*m_testAsMethod)();\n        }\n    };\n\n    auto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker*;\n\n    template<typename C>\n    auto makeTestInvoker( void (C::*testAsMethod)() ) noexcept -> ITestInvoker* {\n        return new(std::nothrow) TestInvokerAsMethod<C>( testAsMethod );\n    }\n\n    struct NameAndTags {\n        NameAndTags( StringRef const& name_ = StringRef(), StringRef const& tags_ = StringRef() ) noexcept;\n        StringRef name;\n        StringRef tags;\n    };\n\n    struct AutoReg : NonCopyable {\n        AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept;\n        ~AutoReg();\n    };\n\n} // end namespace Catch\n\n#if defined(CATCH_CONFIG_DISABLE)\n#define INTERNAL_CATCH_TESTCASE_NO_REGISTRATION( TestName, ... ) \\\n        static void TestName()\n    #define INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... ) \\\n        namespace{                        \\\n            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \\\n                void test();              \\\n            };                            \\\n        }                                 \\\n        void TestName::test()\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( TestName, TestFunc, Name, Tags, Signature, ... )  \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature))\n    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... )    \\\n        namespace{                                                                                  \\\n            namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                      \\\n            INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, INTERNAL_CATCH_REMOVE_PARENS(Signature));\\\n        }                                                                                           \\\n        }                                                                                           \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) )\n    #endif\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) )\n    #endif\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) )\n    #endif\n\n    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \\\n            INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ )\n    #else\n        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \\\n            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) )\n    #endif\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \\\n        static void TestName(); \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        static void TestName()\n#define INTERNAL_CATCH_TESTCASE( ... ) \\\n        INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), __VA_ARGS__ )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, \"&\" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        namespace{ \\\n            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \\\n                void test(); \\\n            }; \\\n            Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \\\n        } \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        void TestName::test()\n#define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \\\n        INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), ClassName, __VA_ARGS__ )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, Signature, ... )\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        INTERNAL_CATCH_DECLARE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature));\\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\\\n            INTERNAL_CATCH_TYPE_GEN\\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            INTERNAL_CATCH_NTTP_REG_GEN(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            template<typename...Types> \\\n            struct TestName{\\\n                TestName(){\\\n                    int index = 0;                                    \\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\\\n                    using expander = int[];\\\n                    (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n            TestName<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\\\n            return 0;\\\n        }();\\\n        }\\\n        }\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ )\n#else\n#define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ )\n#else\n#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) )\n#endif\n\n#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, Signature, TmplTypes, TypesList) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION                      \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS                      \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS                \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS              \\\n        template<typename TestType> static void TestFuncName();       \\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                     \\\n            INTERNAL_CATCH_TYPE_GEN                                                  \\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))         \\\n            template<typename... Types>                               \\\n            struct TestName {                                         \\\n                void reg_tests() {                                          \\\n                    int index = 0;                                    \\\n                    using expander = int[];                           \\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\\\n                    constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\\\n                    constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\\\n                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index / num_types]) + \"<\" + std::string(types_list[index % num_types]) + \">\", Tags } ), index++)... };/* NOLINT */\\\n                }                                                     \\\n            };                                                        \\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \\\n                using TestInit = typename create<TestName, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type; \\\n                TestInit t;                                           \\\n                t.reg_tests();                                        \\\n                return 0;                                             \\\n            }();                                                      \\\n        }                                                             \\\n        }                                                             \\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION                       \\\n        template<typename TestType>                                   \\\n        static void TestFuncName()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename T,__VA_ARGS__)\n#else\n#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename T, __VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__)\n#else\n#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) )\n#endif\n\n#define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2(TestName, TestFunc, Name, Tags, TmplList)\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        template<typename TestType> static void TestFunc();       \\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\\\n        INTERNAL_CATCH_TYPE_GEN\\\n        template<typename... Types>                               \\\n        struct TestName {                                         \\\n            void reg_tests() {                                          \\\n                int index = 0;                                    \\\n                using expander = int[];                           \\\n                (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name \" - \" + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + \" - \" + std::to_string(index), Tags } ), index++)... };/* NOLINT */\\\n            }                                                     \\\n        };\\\n        static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \\\n                using TestInit = typename convert<TestName, TmplList>::type; \\\n                TestInit t;                                           \\\n                t.reg_tests();                                        \\\n                return 0;                                             \\\n            }();                                                      \\\n        }}\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION                       \\\n        template<typename TestType>                                   \\\n        static void TestFunc()\n\n#define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(Name, Tags, TmplList) \\\n        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, TmplList )\n\n#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... ) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \\\n            INTERNAL_CATCH_TYPE_GEN\\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, INTERNAL_CATCH_REMOVE_PARENS(Signature));\\\n            INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            template<typename...Types> \\\n            struct TestNameClass{\\\n                TestNameClass(){\\\n                    int index = 0;                                    \\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\\\n                    using expander = int[];\\\n                    (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n                TestNameClass<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\\\n                return 0;\\\n        }();\\\n        }\\\n        }\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ )\n#else\n#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \\\n        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ )\n#else\n#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) )\n#endif\n\n#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, Signature, TmplTypes, TypesList)\\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        template<typename TestType> \\\n            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \\\n                void test();\\\n            };\\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestNameClass) {\\\n            INTERNAL_CATCH_TYPE_GEN                  \\\n            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\\\n            template<typename...Types>\\\n            struct TestNameClass{\\\n                void reg_tests(){\\\n                    int index = 0;\\\n                    using expander = int[];\\\n                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\\\n                    constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\\\n                    constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\\\n                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name \" - \" + std::string(tmpl_types[index / num_types]) + \"<\" + std::string(types_list[index % num_types]) + \">\", Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n                using TestInit = typename create<TestNameClass, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type;\\\n                TestInit t;\\\n                t.reg_tests();\\\n                return 0;\\\n            }(); \\\n        }\\\n        }\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        template<typename TestType> \\\n        void TestName<TestType>::test()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, typename T, __VA_ARGS__ )\n#else\n#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, typename T,__VA_ARGS__ ) )\n#endif\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\\\n        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, Signature, __VA_ARGS__ )\n#else\n#define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\\\n        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, Signature,__VA_ARGS__ ) )\n#endif\n\n#define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, TmplList) \\\n        CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \\\n        template<typename TestType> \\\n        struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \\\n            void test();\\\n        };\\\n        namespace {\\\n        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \\\n            INTERNAL_CATCH_TYPE_GEN\\\n            template<typename...Types>\\\n            struct TestNameClass{\\\n                void reg_tests(){\\\n                    int index = 0;\\\n                    using expander = int[];\\\n                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name \" - \" + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + \" - \" + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \\\n                }\\\n            };\\\n            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\\\n                using TestInit = typename convert<TestNameClass, TmplList>::type;\\\n                TestInit t;\\\n                t.reg_tests();\\\n                return 0;\\\n            }(); \\\n        }}\\\n        CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        template<typename TestType> \\\n        void TestName<TestType>::test()\n\n#define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD(ClassName, Name, Tags, TmplList) \\\n        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, TmplList )\n\n// end catch_test_registry.h\n// start catch_capture.hpp\n\n// start catch_assertionhandler.h\n\n// start catch_assertioninfo.h\n\n// start catch_result_type.h\n\nnamespace Catch {\n\n    // ResultWas::OfType enum\n    struct ResultWas { enum OfType {\n            Unknown = -1,\n            Ok = 0,\n            Info = 1,\n            Warning = 2,\n\n            FailureBit = 0x10,\n\n            ExpressionFailed = FailureBit | 1,\n            ExplicitFailure = FailureBit | 2,\n\n            Exception = 0x100 | FailureBit,\n\n            ThrewException = Exception | 1,\n            DidntThrowException = Exception | 2,\n\n            FatalErrorCondition = 0x200 | FailureBit\n\n        }; };\n\n    bool isOk( ResultWas::OfType resultType );\n    bool isJustInfo( int flags );\n\n    // ResultDisposition::Flags enum\n    struct ResultDisposition { enum Flags {\n            Normal = 0x01,\n\n            ContinueOnFailure = 0x02,   // Failures fail test, but execution continues\n            FalseTest = 0x04,           // Prefix expression with !\n            SuppressFail = 0x08         // Failures are reported but do not fail the test\n        }; };\n\n    ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs );\n\n    bool shouldContinueOnFailure( int flags );\n    inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; }\n    bool shouldSuppressFailure( int flags );\n\n} // end namespace Catch\n\n// end catch_result_type.h\nnamespace Catch {\n\n    struct AssertionInfo\n    {\n        StringRef macroName;\n        SourceLineInfo lineInfo;\n        StringRef capturedExpression;\n        ResultDisposition::Flags resultDisposition;\n\n        // We want to delete this constructor but a compiler bug in 4.8 means\n        // the struct is then treated as non-aggregate\n        //AssertionInfo() = delete;\n    };\n\n} // end namespace Catch\n\n// end catch_assertioninfo.h\n// start catch_decomposer.h\n\n// start catch_tostring.h\n\n#include <vector>\n#include <cstddef>\n#include <type_traits>\n#include <string>\n// start catch_stream.h\n\n#include <iosfwd>\n#include <cstddef>\n#include <ostream>\n\nnamespace Catch {\n\n    std::ostream& cout();\n    std::ostream& cerr();\n    std::ostream& clog();\n\n    class StringRef;\n\n    struct IStream {\n        virtual ~IStream();\n        virtual std::ostream& stream() const = 0;\n    };\n\n    auto makeStream( StringRef const &filename ) -> IStream const*;\n\n    class ReusableStringStream : NonCopyable {\n        std::size_t m_index;\n        std::ostream* m_oss;\n    public:\n        ReusableStringStream();\n        ~ReusableStringStream();\n\n        auto str() const -> std::string;\n\n        template<typename T>\n        auto operator << ( T const& value ) -> ReusableStringStream& {\n            *m_oss << value;\n            return *this;\n        }\n        auto get() -> std::ostream& { return *m_oss; }\n    };\n}\n\n// end catch_stream.h\n// start catch_interfaces_enum_values_registry.h\n\n#include <vector>\n\nnamespace Catch {\n\n    namespace Detail {\n        struct EnumInfo {\n            StringRef m_name;\n            std::vector<std::pair<int, StringRef>> m_values;\n\n            ~EnumInfo();\n\n            StringRef lookup( int value ) const;\n        };\n    } // namespace Detail\n\n    struct IMutableEnumValuesRegistry {\n        virtual ~IMutableEnumValuesRegistry();\n\n        virtual Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values ) = 0;\n\n        template<typename E>\n        Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::initializer_list<E> values ) {\n            static_assert(sizeof(int) >= sizeof(E), \"Cannot serialize enum to int\");\n            std::vector<int> intValues;\n            intValues.reserve( values.size() );\n            for( auto enumValue : values )\n                intValues.push_back( static_cast<int>( enumValue ) );\n            return registerEnum( enumName, allEnums, intValues );\n        }\n    };\n\n} // Catch\n\n// end catch_interfaces_enum_values_registry.h\n\n#ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n#include <string_view>\n#endif\n\n#ifdef __OBJC__\n// start catch_objc_arc.hpp\n\n#import <Foundation/Foundation.h>\n\n#ifdef __has_feature\n#define CATCH_ARC_ENABLED __has_feature(objc_arc)\n#else\n#define CATCH_ARC_ENABLED 0\n#endif\n\nvoid arcSafeRelease( NSObject* obj );\nid performOptionalSelector( id obj, SEL sel );\n\n#if !CATCH_ARC_ENABLED\ninline void arcSafeRelease( NSObject* obj ) {\n    [obj release];\n}\ninline id performOptionalSelector( id obj, SEL sel ) {\n    if( [obj respondsToSelector: sel] )\n        return [obj performSelector: sel];\n    return nil;\n}\n#define CATCH_UNSAFE_UNRETAINED\n#define CATCH_ARC_STRONG\n#else\ninline void arcSafeRelease( NSObject* ){}\ninline id performOptionalSelector( id obj, SEL sel ) {\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Warc-performSelector-leaks\"\n#endif\n    if( [obj respondsToSelector: sel] )\n        return [obj performSelector: sel];\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n    return nil;\n}\n#define CATCH_UNSAFE_UNRETAINED __unsafe_unretained\n#define CATCH_ARC_STRONG __strong\n#endif\n\n// end catch_objc_arc.hpp\n#endif\n\n#ifdef _MSC_VER\n#pragma warning(push)\n#pragma warning(disable:4180) // We attempt to stream a function (address) by const&, which MSVC complains about but is harmless\n#endif\n\nnamespace Catch {\n    namespace Detail {\n\n        extern const std::string unprintableString;\n\n        std::string rawMemoryToString( const void *object, std::size_t size );\n\n        template<typename T>\n        std::string rawMemoryToString( const T& object ) {\n            return rawMemoryToString( &object, sizeof(object) );\n        }\n\n        template<typename T>\n        class IsStreamInsertable {\n            template<typename Stream, typename U>\n            static auto test(int)\n            -> decltype(std::declval<Stream&>() << std::declval<U>(), std::true_type());\n\n            template<typename, typename>\n            static auto test(...)->std::false_type;\n\n        public:\n            static const bool value = decltype(test<std::ostream, const T&>(0))::value;\n        };\n\n        template<typename E>\n        std::string convertUnknownEnumToString( E e );\n\n        template<typename T>\n        typename std::enable_if<\n                !std::is_enum<T>::value && !std::is_base_of<std::exception, T>::value,\n                std::string>::type convertUnstreamable( T const& ) {\n            return Detail::unprintableString;\n        }\n        template<typename T>\n        typename std::enable_if<\n                !std::is_enum<T>::value && std::is_base_of<std::exception, T>::value,\n                std::string>::type convertUnstreamable(T const& ex) {\n            return ex.what();\n        }\n\n        template<typename T>\n        typename std::enable_if<\n                std::is_enum<T>::value\n                , std::string>::type convertUnstreamable( T const& value ) {\n            return convertUnknownEnumToString( value );\n        }\n\n#if defined(_MANAGED)\n        //! Convert a CLR string to a utf8 std::string\n        template<typename T>\n        std::string clrReferenceToString( T^ ref ) {\n            if (ref == nullptr)\n                return std::string(\"null\");\n            auto bytes = System::Text::Encoding::UTF8->GetBytes(ref->ToString());\n            cli::pin_ptr<System::Byte> p = &bytes[0];\n            return std::string(reinterpret_cast<char const *>(p), bytes->Length);\n        }\n#endif\n\n    } // namespace Detail\n\n    // If we decide for C++14, change these to enable_if_ts\n    template <typename T, typename = void>\n    struct StringMaker {\n        template <typename Fake = T>\n        static\n        typename std::enable_if<::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type\n        convert(const Fake& value) {\n            ReusableStringStream rss;\n            // NB: call using the function-like syntax to avoid ambiguity with\n            // user-defined templated operator<< under clang.\n            rss.operator<<(value);\n            return rss.str();\n        }\n\n        template <typename Fake = T>\n        static\n        typename std::enable_if<!::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type\n        convert( const Fake& value ) {\n#if !defined(CATCH_CONFIG_FALLBACK_STRINGIFIER)\n            return Detail::convertUnstreamable(value);\n#else\n            return CATCH_CONFIG_FALLBACK_STRINGIFIER(value);\n#endif\n        }\n    };\n\n    namespace Detail {\n\n        // This function dispatches all stringification requests inside of Catch.\n        // Should be preferably called fully qualified, like ::Catch::Detail::stringify\n        template <typename T>\n        std::string stringify(const T& e) {\n            return ::Catch::StringMaker<typename std::remove_cv<typename std::remove_reference<T>::type>::type>::convert(e);\n        }\n\n        template<typename E>\n        std::string convertUnknownEnumToString( E e ) {\n            return ::Catch::Detail::stringify(static_cast<typename std::underlying_type<E>::type>(e));\n        }\n\n#if defined(_MANAGED)\n        template <typename T>\n        std::string stringify( T^ e ) {\n            return ::Catch::StringMaker<T^>::convert(e);\n        }\n#endif\n\n    } // namespace Detail\n\n    // Some predefined specializations\n\n    template<>\n    struct StringMaker<std::string> {\n        static std::string convert(const std::string& str);\n    };\n\n#ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n    template<>\n    struct StringMaker<std::string_view> {\n        static std::string convert(std::string_view str);\n    };\n#endif\n\n    template<>\n    struct StringMaker<char const *> {\n        static std::string convert(char const * str);\n    };\n    template<>\n    struct StringMaker<char *> {\n        static std::string convert(char * str);\n    };\n\n#ifdef CATCH_CONFIG_WCHAR\n    template<>\n    struct StringMaker<std::wstring> {\n        static std::string convert(const std::wstring& wstr);\n    };\n\n# ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n    template<>\n    struct StringMaker<std::wstring_view> {\n        static std::string convert(std::wstring_view str);\n    };\n# endif\n\n    template<>\n    struct StringMaker<wchar_t const *> {\n        static std::string convert(wchar_t const * str);\n    };\n    template<>\n    struct StringMaker<wchar_t *> {\n        static std::string convert(wchar_t * str);\n    };\n#endif\n\n    // TBD: Should we use `strnlen` to ensure that we don't go out of the buffer,\n    //      while keeping string semantics?\n    template<int SZ>\n    struct StringMaker<char[SZ]> {\n        static std::string convert(char const* str) {\n            return ::Catch::Detail::stringify(std::string{ str });\n        }\n    };\n    template<int SZ>\n    struct StringMaker<signed char[SZ]> {\n        static std::string convert(signed char const* str) {\n            return ::Catch::Detail::stringify(std::string{ reinterpret_cast<char const *>(str) });\n        }\n    };\n    template<int SZ>\n    struct StringMaker<unsigned char[SZ]> {\n        static std::string convert(unsigned char const* str) {\n            return ::Catch::Detail::stringify(std::string{ reinterpret_cast<char const *>(str) });\n        }\n    };\n\n#if defined(CATCH_CONFIG_CPP17_BYTE)\n    template<>\n    struct StringMaker<std::byte> {\n        static std::string convert(std::byte value);\n    };\n#endif // defined(CATCH_CONFIG_CPP17_BYTE)\n    template<>\n    struct StringMaker<int> {\n        static std::string convert(int value);\n    };\n    template<>\n    struct StringMaker<long> {\n        static std::string convert(long value);\n    };\n    template<>\n    struct StringMaker<long long> {\n        static std::string convert(long long value);\n    };\n    template<>\n    struct StringMaker<unsigned int> {\n        static std::string convert(unsigned int value);\n    };\n    template<>\n    struct StringMaker<unsigned long> {\n        static std::string convert(unsigned long value);\n    };\n    template<>\n    struct StringMaker<unsigned long long> {\n        static std::string convert(unsigned long long value);\n    };\n\n    template<>\n    struct StringMaker<bool> {\n        static std::string convert(bool b);\n    };\n\n    template<>\n    struct StringMaker<char> {\n        static std::string convert(char c);\n    };\n    template<>\n    struct StringMaker<signed char> {\n        static std::string convert(signed char c);\n    };\n    template<>\n    struct StringMaker<unsigned char> {\n        static std::string convert(unsigned char c);\n    };\n\n    template<>\n    struct StringMaker<std::nullptr_t> {\n        static std::string convert(std::nullptr_t);\n    };\n\n    template<>\n    struct StringMaker<float> {\n        static std::string convert(float value);\n        static int precision;\n    };\n\n    template<>\n    struct StringMaker<double> {\n        static std::string convert(double value);\n        static int precision;\n    };\n\n    template <typename T>\n    struct StringMaker<T*> {\n        template <typename U>\n        static std::string convert(U* p) {\n            if (p) {\n                return ::Catch::Detail::rawMemoryToString(p);\n            } else {\n                return \"nullptr\";\n            }\n        }\n    };\n\n    template <typename R, typename C>\n    struct StringMaker<R C::*> {\n        static std::string convert(R C::* p) {\n            if (p) {\n                return ::Catch::Detail::rawMemoryToString(p);\n            } else {\n                return \"nullptr\";\n            }\n        }\n    };\n\n#if defined(_MANAGED)\n    template <typename T>\n    struct StringMaker<T^> {\n        static std::string convert( T^ ref ) {\n            return ::Catch::Detail::clrReferenceToString(ref);\n        }\n    };\n#endif\n\n    namespace Detail {\n        template<typename InputIterator, typename Sentinel = InputIterator>\n        std::string rangeToString(InputIterator first, Sentinel last) {\n            ReusableStringStream rss;\n            rss << \"{ \";\n            if (first != last) {\n                rss << ::Catch::Detail::stringify(*first);\n                for (++first; first != last; ++first)\n                    rss << \", \" << ::Catch::Detail::stringify(*first);\n            }\n            rss << \" }\";\n            return rss.str();\n        }\n    }\n\n#ifdef __OBJC__\n    template<>\n    struct StringMaker<NSString*> {\n        static std::string convert(NSString * nsstring) {\n            if (!nsstring)\n                return \"nil\";\n            return std::string(\"@\") + [nsstring UTF8String];\n        }\n    };\n    template<>\n    struct StringMaker<NSObject*> {\n        static std::string convert(NSObject* nsObject) {\n            return ::Catch::Detail::stringify([nsObject description]);\n        }\n\n    };\n    namespace Detail {\n        inline std::string stringify( NSString* nsstring ) {\n            return StringMaker<NSString*>::convert( nsstring );\n        }\n\n    } // namespace Detail\n#endif // __OBJC__\n\n} // namespace Catch\n\n//////////////////////////////////////////////////////\n// Separate std-lib types stringification, so it can be selectively enabled\n// This means that we do not bring in\n\n#if defined(CATCH_CONFIG_ENABLE_ALL_STRINGMAKERS)\n#  define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n#  define CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER\n#endif\n\n// Separate std::pair specialization\n#if defined(CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER)\n#include <utility>\nnamespace Catch {\n    template<typename T1, typename T2>\n    struct StringMaker<std::pair<T1, T2> > {\n        static std::string convert(const std::pair<T1, T2>& pair) {\n            ReusableStringStream rss;\n            rss << \"{ \"\n                << ::Catch::Detail::stringify(pair.first)\n                << \", \"\n                << ::Catch::Detail::stringify(pair.second)\n                << \" }\";\n            return rss.str();\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER\n\n#if defined(CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER) && defined(CATCH_CONFIG_CPP17_OPTIONAL)\n#include <optional>\nnamespace Catch {\n    template<typename T>\n    struct StringMaker<std::optional<T> > {\n        static std::string convert(const std::optional<T>& optional) {\n            ReusableStringStream rss;\n            if (optional.has_value()) {\n                rss << ::Catch::Detail::stringify(*optional);\n            } else {\n                rss << \"{ }\";\n            }\n            return rss.str();\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER\n\n// Separate std::tuple specialization\n#if defined(CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER)\n#include <tuple>\nnamespace Catch {\n    namespace Detail {\n        template<\n            typename Tuple,\n            std::size_t N = 0,\n            bool = (N < std::tuple_size<Tuple>::value)\n            >\n            struct TupleElementPrinter {\n            static void print(const Tuple& tuple, std::ostream& os) {\n                os << (N ? \", \" : \" \")\n                    << ::Catch::Detail::stringify(std::get<N>(tuple));\n                TupleElementPrinter<Tuple, N + 1>::print(tuple, os);\n            }\n        };\n\n        template<\n            typename Tuple,\n            std::size_t N\n        >\n            struct TupleElementPrinter<Tuple, N, false> {\n            static void print(const Tuple&, std::ostream&) {}\n        };\n\n    }\n\n    template<typename ...Types>\n    struct StringMaker<std::tuple<Types...>> {\n        static std::string convert(const std::tuple<Types...>& tuple) {\n            ReusableStringStream rss;\n            rss << '{';\n            Detail::TupleElementPrinter<std::tuple<Types...>>::print(tuple, rss.get());\n            rss << \" }\";\n            return rss.str();\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER\n\n#if defined(CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER) && defined(CATCH_CONFIG_CPP17_VARIANT)\n#include <variant>\nnamespace Catch {\n    template<>\n    struct StringMaker<std::monostate> {\n        static std::string convert(const std::monostate&) {\n            return \"{ }\";\n        }\n    };\n\n    template<typename... Elements>\n    struct StringMaker<std::variant<Elements...>> {\n        static std::string convert(const std::variant<Elements...>& variant) {\n            if (variant.valueless_by_exception()) {\n                return \"{valueless variant}\";\n            } else {\n                return std::visit(\n                    [](const auto& value) {\n                        return ::Catch::Detail::stringify(value);\n                    },\n                    variant\n                );\n            }\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER\n\nnamespace Catch {\n    // Import begin/ end from std here\n    using std::begin;\n    using std::end;\n\n    namespace detail {\n        template <typename...>\n        struct void_type {\n            using type = void;\n        };\n\n        template <typename T, typename = void>\n        struct is_range_impl : std::false_type {\n        };\n\n        template <typename T>\n        struct is_range_impl<T, typename void_type<decltype(begin(std::declval<T>()))>::type> : std::true_type {\n        };\n    } // namespace detail\n\n    template <typename T>\n    struct is_range : detail::is_range_impl<T> {\n    };\n\n#if defined(_MANAGED) // Managed types are never ranges\n    template <typename T>\n    struct is_range<T^> {\n        static const bool value = false;\n    };\n#endif\n\n    template<typename Range>\n    std::string rangeToString( Range const& range ) {\n        return ::Catch::Detail::rangeToString( begin( range ), end( range ) );\n    }\n\n    // Handle vector<bool> specially\n    template<typename Allocator>\n    std::string rangeToString( std::vector<bool, Allocator> const& v ) {\n        ReusableStringStream rss;\n        rss << \"{ \";\n        bool first = true;\n        for( bool b : v ) {\n            if( first )\n                first = false;\n            else\n                rss << \", \";\n            rss << ::Catch::Detail::stringify( b );\n        }\n        rss << \" }\";\n        return rss.str();\n    }\n\n    template<typename R>\n    struct StringMaker<R, typename std::enable_if<is_range<R>::value && !::Catch::Detail::IsStreamInsertable<R>::value>::type> {\n        static std::string convert( R const& range ) {\n            return rangeToString( range );\n        }\n    };\n\n    template <typename T, int SZ>\n    struct StringMaker<T[SZ]> {\n        static std::string convert(T const(&arr)[SZ]) {\n            return rangeToString(arr);\n        }\n    };\n\n} // namespace Catch\n\n// Separate std::chrono::duration specialization\n#if defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)\n#include <ctime>\n#include <ratio>\n#include <chrono>\n\nnamespace Catch {\n\n    template <class Ratio>\n    struct ratio_string {\n        static std::string symbol();\n    };\n\n    template <class Ratio>\n    std::string ratio_string<Ratio>::symbol() {\n        Catch::ReusableStringStream rss;\n        rss << '[' << Ratio::num << '/'\n            << Ratio::den << ']';\n        return rss.str();\n    }\n    template <>\n    struct ratio_string<std::atto> {\n        static std::string symbol();\n    };\n    template <>\n    struct ratio_string<std::femto> {\n        static std::string symbol();\n    };\n    template <>\n    struct ratio_string<std::pico> {\n        static std::string symbol();\n    };\n    template <>\n    struct ratio_string<std::nano> {\n        static std::string symbol();\n    };\n    template <>\n    struct ratio_string<std::micro> {\n        static std::string symbol();\n    };\n    template <>\n    struct ratio_string<std::milli> {\n        static std::string symbol();\n    };\n\n    ////////////\n    // std::chrono::duration specializations\n    template<typename Value, typename Ratio>\n    struct StringMaker<std::chrono::duration<Value, Ratio>> {\n        static std::string convert(std::chrono::duration<Value, Ratio> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << ' ' << ratio_string<Ratio>::symbol() << 's';\n            return rss.str();\n        }\n    };\n    template<typename Value>\n    struct StringMaker<std::chrono::duration<Value, std::ratio<1>>> {\n        static std::string convert(std::chrono::duration<Value, std::ratio<1>> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << \" s\";\n            return rss.str();\n        }\n    };\n    template<typename Value>\n    struct StringMaker<std::chrono::duration<Value, std::ratio<60>>> {\n        static std::string convert(std::chrono::duration<Value, std::ratio<60>> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << \" m\";\n            return rss.str();\n        }\n    };\n    template<typename Value>\n    struct StringMaker<std::chrono::duration<Value, std::ratio<3600>>> {\n        static std::string convert(std::chrono::duration<Value, std::ratio<3600>> const& duration) {\n            ReusableStringStream rss;\n            rss << duration.count() << \" h\";\n            return rss.str();\n        }\n    };\n\n    ////////////\n    // std::chrono::time_point specialization\n    // Generic time_point cannot be specialized, only std::chrono::time_point<system_clock>\n    template<typename Clock, typename Duration>\n    struct StringMaker<std::chrono::time_point<Clock, Duration>> {\n        static std::string convert(std::chrono::time_point<Clock, Duration> const& time_point) {\n            return ::Catch::Detail::stringify(time_point.time_since_epoch()) + \" since epoch\";\n        }\n    };\n    // std::chrono::time_point<system_clock> specialization\n    template<typename Duration>\n    struct StringMaker<std::chrono::time_point<std::chrono::system_clock, Duration>> {\n        static std::string convert(std::chrono::time_point<std::chrono::system_clock, Duration> const& time_point) {\n            auto converted = std::chrono::system_clock::to_time_t(time_point);\n\n#ifdef _MSC_VER\n            std::tm timeInfo = {};\n            gmtime_s(&timeInfo, &converted);\n#else\n            std::tm* timeInfo = std::gmtime(&converted);\n#endif\n\n            auto const timeStampSize = sizeof(\"2017-01-16T17:06:45Z\");\n            char timeStamp[timeStampSize];\n            const char * const fmt = \"%Y-%m-%dT%H:%M:%SZ\";\n\n#ifdef _MSC_VER\n            std::strftime(timeStamp, timeStampSize, fmt, &timeInfo);\n#else\n            std::strftime(timeStamp, timeStampSize, fmt, timeInfo);\n#endif\n            return std::string(timeStamp);\n        }\n    };\n}\n#endif // CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n\n#define INTERNAL_CATCH_REGISTER_ENUM( enumName, ... ) \\\nnamespace Catch { \\\n    template<> struct StringMaker<enumName> { \\\n        static std::string convert( enumName value ) { \\\n            static const auto& enumInfo = ::Catch::getMutableRegistryHub().getMutableEnumValuesRegistry().registerEnum( #enumName, #__VA_ARGS__, { __VA_ARGS__ } ); \\\n            return static_cast<std::string>(enumInfo.lookup( static_cast<int>( value ) )); \\\n        } \\\n    }; \\\n}\n\n#define CATCH_REGISTER_ENUM( enumName, ... ) INTERNAL_CATCH_REGISTER_ENUM( enumName, __VA_ARGS__ )\n\n#ifdef _MSC_VER\n#pragma warning(pop)\n#endif\n\n// end catch_tostring.h\n#include <iosfwd>\n\n#ifdef _MSC_VER\n#pragma warning(push)\n#pragma warning(disable:4389) // '==' : signed/unsigned mismatch\n#pragma warning(disable:4018) // more \"signed/unsigned mismatch\"\n#pragma warning(disable:4312) // Converting int to T* using reinterpret_cast (issue on x64 platform)\n#pragma warning(disable:4180) // qualifier applied to function type has no meaning\n#pragma warning(disable:4800) // Forcing result to true or false\n#endif\n\nnamespace Catch {\n\n    struct ITransientExpression {\n        auto isBinaryExpression() const -> bool { return m_isBinaryExpression; }\n        auto getResult() const -> bool { return m_result; }\n        virtual void streamReconstructedExpression( std::ostream &os ) const = 0;\n\n        ITransientExpression( bool isBinaryExpression, bool result )\n                :   m_isBinaryExpression( isBinaryExpression ),\n                    m_result( result )\n        {}\n\n        // We don't actually need a virtual destructor, but many static analysers\n        // complain if it's not here :-(\n        virtual ~ITransientExpression();\n\n        bool m_isBinaryExpression;\n        bool m_result;\n\n    };\n\n    void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs );\n\n    template<typename LhsT, typename RhsT>\n    class BinaryExpr  : public ITransientExpression {\n        LhsT m_lhs;\n        StringRef m_op;\n        RhsT m_rhs;\n\n        void streamReconstructedExpression( std::ostream &os ) const override {\n            formatReconstructedExpression\n                    ( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) );\n        }\n\n    public:\n        BinaryExpr( bool comparisonResult, LhsT lhs, StringRef op, RhsT rhs )\n                :   ITransientExpression{ true, comparisonResult },\n                    m_lhs( lhs ),\n                    m_op( op ),\n                    m_rhs( rhs )\n        {}\n\n        template<typename T>\n        auto operator && ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n                          \"chained comparisons are not supported inside assertions, \"\n                          \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator || ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n                          \"chained comparisons are not supported inside assertions, \"\n                          \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator == ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n                          \"chained comparisons are not supported inside assertions, \"\n                          \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator != ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n                          \"chained comparisons are not supported inside assertions, \"\n                          \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator > ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n                          \"chained comparisons are not supported inside assertions, \"\n                          \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator < ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n                          \"chained comparisons are not supported inside assertions, \"\n                          \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator >= ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n                          \"chained comparisons are not supported inside assertions, \"\n                          \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename T>\n        auto operator <= ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<T>::value,\n                          \"chained comparisons are not supported inside assertions, \"\n                          \"wrap the expression inside parentheses, or decompose it\");\n        }\n    };\n\n    template<typename LhsT>\n    class UnaryExpr : public ITransientExpression {\n        LhsT m_lhs;\n\n        void streamReconstructedExpression( std::ostream &os ) const override {\n            os << Catch::Detail::stringify( m_lhs );\n        }\n\n    public:\n        explicit UnaryExpr( LhsT lhs )\n                :   ITransientExpression{ false, static_cast<bool>(lhs) },\n                    m_lhs( lhs )\n        {}\n    };\n\n    // Specialised comparison functions to handle equality comparisons between ints and pointers (NULL deduces as an int)\n    template<typename LhsT, typename RhsT>\n    auto compareEqual( LhsT const& lhs, RhsT const& rhs ) -> bool { return static_cast<bool>(lhs == rhs); }\n    template<typename T>\n    auto compareEqual( T* const& lhs, int rhs ) -> bool { return lhs == reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareEqual( T* const& lhs, long rhs ) -> bool { return lhs == reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) == rhs; }\n    template<typename T>\n    auto compareEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) == rhs; }\n\n    template<typename LhsT, typename RhsT>\n    auto compareNotEqual( LhsT const& lhs, RhsT&& rhs ) -> bool { return static_cast<bool>(lhs != rhs); }\n    template<typename T>\n    auto compareNotEqual( T* const& lhs, int rhs ) -> bool { return lhs != reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareNotEqual( T* const& lhs, long rhs ) -> bool { return lhs != reinterpret_cast<void const*>( rhs ); }\n    template<typename T>\n    auto compareNotEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) != rhs; }\n    template<typename T>\n    auto compareNotEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast<void const*>( lhs ) != rhs; }\n\n    template<typename LhsT>\n    class ExprLhs {\n        LhsT m_lhs;\n    public:\n        explicit ExprLhs( LhsT lhs ) : m_lhs( lhs ) {}\n\n        template<typename RhsT>\n        auto operator == ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { compareEqual( m_lhs, rhs ), m_lhs, \"==\", rhs };\n        }\n        auto operator == ( bool rhs ) -> BinaryExpr<LhsT, bool> const {\n            return { m_lhs == rhs, m_lhs, \"==\", rhs };\n        }\n\n        template<typename RhsT>\n        auto operator != ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { compareNotEqual( m_lhs, rhs ), m_lhs, \"!=\", rhs };\n        }\n        auto operator != ( bool rhs ) -> BinaryExpr<LhsT, bool> const {\n            return { m_lhs != rhs, m_lhs, \"!=\", rhs };\n        }\n\n        template<typename RhsT>\n        auto operator > ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs > rhs), m_lhs, \">\", rhs };\n        }\n        template<typename RhsT>\n        auto operator < ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs < rhs), m_lhs, \"<\", rhs };\n        }\n        template<typename RhsT>\n        auto operator >= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs >= rhs), m_lhs, \">=\", rhs };\n        }\n        template<typename RhsT>\n        auto operator <= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs <= rhs), m_lhs, \"<=\", rhs };\n        }\n        template <typename RhsT>\n        auto operator | (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs | rhs), m_lhs, \"|\", rhs };\n        }\n        template <typename RhsT>\n        auto operator & (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs & rhs), m_lhs, \"&\", rhs };\n        }\n        template <typename RhsT>\n        auto operator ^ (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {\n            return { static_cast<bool>(m_lhs ^ rhs), m_lhs, \"^\", rhs };\n        }\n\n        template<typename RhsT>\n        auto operator && ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<RhsT>::value,\n                          \"operator&& is not supported inside assertions, \"\n                          \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        template<typename RhsT>\n        auto operator || ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const {\n            static_assert(always_false<RhsT>::value,\n                          \"operator|| is not supported inside assertions, \"\n                          \"wrap the expression inside parentheses, or decompose it\");\n        }\n\n        auto makeUnaryExpr() const -> UnaryExpr<LhsT> {\n            return UnaryExpr<LhsT>{ m_lhs };\n        }\n    };\n\n    void handleExpression( ITransientExpression const& expr );\n\n    template<typename T>\n    void handleExpression( ExprLhs<T> const& expr ) {\n        handleExpression( expr.makeUnaryExpr() );\n    }\n\n    struct Decomposer {\n        template<typename T>\n        auto operator <= ( T const& lhs ) -> ExprLhs<T const&> {\n            return ExprLhs<T const&>{ lhs };\n        }\n\n        auto operator <=( bool value ) -> ExprLhs<bool> {\n            return ExprLhs<bool>{ value };\n        }\n    };\n\n} // end namespace Catch\n\n#ifdef _MSC_VER\n#pragma warning(pop)\n#endif\n\n// end catch_decomposer.h\n// start catch_interfaces_capture.h\n\n#include <string>\n#include <chrono>\n\nnamespace Catch {\n\n    class AssertionResult;\n    struct AssertionInfo;\n    struct SectionInfo;\n    struct SectionEndInfo;\n    struct MessageInfo;\n    struct MessageBuilder;\n    struct Counts;\n    struct AssertionReaction;\n    struct SourceLineInfo;\n\n    struct ITransientExpression;\n    struct IGeneratorTracker;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    struct BenchmarkInfo;\n    template <typename Duration = std::chrono::duration<double, std::nano>>\n    struct BenchmarkStats;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    struct IResultCapture {\n\n        virtual ~IResultCapture();\n\n        virtual bool sectionStarted(    SectionInfo const& sectionInfo,\n                                        Counts& assertions ) = 0;\n        virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0;\n        virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0;\n\n        virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        virtual void benchmarkPreparing( std::string const& name ) = 0;\n        virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0;\n        virtual void benchmarkEnded( BenchmarkStats<> const& stats ) = 0;\n        virtual void benchmarkFailed( std::string const& error ) = 0;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        virtual void pushScopedMessage( MessageInfo const& message ) = 0;\n        virtual void popScopedMessage( MessageInfo const& message ) = 0;\n\n        virtual void emplaceUnscopedMessage( MessageBuilder const& builder ) = 0;\n\n        virtual void handleFatalErrorCondition( StringRef message ) = 0;\n\n        virtual void handleExpr\n                (   AssertionInfo const& info,\n                    ITransientExpression const& expr,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleMessage\n                (   AssertionInfo const& info,\n                    ResultWas::OfType resultType,\n                    StringRef const& message,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleUnexpectedExceptionNotThrown\n                (   AssertionInfo const& info,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleUnexpectedInflightException\n                (   AssertionInfo const& info,\n                    std::string const& message,\n                    AssertionReaction& reaction ) = 0;\n        virtual void handleIncomplete\n                (   AssertionInfo const& info ) = 0;\n        virtual void handleNonExpr\n                (   AssertionInfo const &info,\n                    ResultWas::OfType resultType,\n                    AssertionReaction &reaction ) = 0;\n\n        virtual bool lastAssertionPassed() = 0;\n        virtual void assertionPassed() = 0;\n\n        // Deprecated, do not use:\n        virtual std::string getCurrentTestName() const = 0;\n        virtual const AssertionResult* getLastResult() const = 0;\n        virtual void exceptionEarlyReported() = 0;\n    };\n\n    IResultCapture& getResultCapture();\n}\n\n// end catch_interfaces_capture.h\nnamespace Catch {\n\n    struct TestFailureException{};\n    struct AssertionResultData;\n    struct IResultCapture;\n    class RunContext;\n\n    class LazyExpression {\n        friend class AssertionHandler;\n        friend struct AssertionStats;\n        friend class RunContext;\n\n        ITransientExpression const* m_transientExpression = nullptr;\n        bool m_isNegated;\n    public:\n        LazyExpression( bool isNegated );\n        LazyExpression( LazyExpression const& other );\n        LazyExpression& operator = ( LazyExpression const& ) = delete;\n\n        explicit operator bool() const;\n\n        friend auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream&;\n    };\n\n    struct AssertionReaction {\n        bool shouldDebugBreak = false;\n        bool shouldThrow = false;\n    };\n\n    class AssertionHandler {\n        AssertionInfo m_assertionInfo;\n        AssertionReaction m_reaction;\n        bool m_completed = false;\n        IResultCapture& m_resultCapture;\n\n    public:\n        AssertionHandler\n                (   StringRef const& macroName,\n                    SourceLineInfo const& lineInfo,\n                    StringRef capturedExpression,\n                    ResultDisposition::Flags resultDisposition );\n        ~AssertionHandler() {\n            if ( !m_completed ) {\n                m_resultCapture.handleIncomplete( m_assertionInfo );\n            }\n        }\n\n        template<typename T>\n        void handleExpr( ExprLhs<T> const& expr ) {\n            handleExpr( expr.makeUnaryExpr() );\n        }\n        void handleExpr( ITransientExpression const& expr );\n\n        void handleMessage(ResultWas::OfType resultType, StringRef const& message);\n\n        void handleExceptionThrownAsExpected();\n        void handleUnexpectedExceptionNotThrown();\n        void handleExceptionNotThrownAsExpected();\n        void handleThrowingCallSkipped();\n        void handleUnexpectedInflightException();\n\n        void complete();\n        void setCompleted();\n\n        // query\n        auto allowThrows() const -> bool;\n    };\n\n    void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString );\n\n} // namespace Catch\n\n// end catch_assertionhandler.h\n// start catch_message.h\n\n#include <string>\n#include <vector>\n\nnamespace Catch {\n\n    struct MessageInfo {\n        MessageInfo(    StringRef const& _macroName,\n                        SourceLineInfo const& _lineInfo,\n                        ResultWas::OfType _type );\n\n        StringRef macroName;\n        std::string message;\n        SourceLineInfo lineInfo;\n        ResultWas::OfType type;\n        unsigned int sequence;\n\n        bool operator == ( MessageInfo const& other ) const;\n        bool operator < ( MessageInfo const& other ) const;\n    private:\n        static unsigned int globalCount;\n    };\n\n    struct MessageStream {\n\n        template<typename T>\n        MessageStream& operator << ( T const& value ) {\n            m_stream << value;\n            return *this;\n        }\n\n        ReusableStringStream m_stream;\n    };\n\n    struct MessageBuilder : MessageStream {\n        MessageBuilder( StringRef const& macroName,\n                        SourceLineInfo const& lineInfo,\n                        ResultWas::OfType type );\n\n        template<typename T>\n        MessageBuilder& operator << ( T const& value ) {\n            m_stream << value;\n            return *this;\n        }\n\n        MessageInfo m_info;\n    };\n\n    class ScopedMessage {\n    public:\n        explicit ScopedMessage( MessageBuilder const& builder );\n        ScopedMessage( ScopedMessage& duplicate ) = delete;\n        ScopedMessage( ScopedMessage&& old );\n        ~ScopedMessage();\n\n        MessageInfo m_info;\n        bool m_moved;\n    };\n\n    class Capturer {\n        std::vector<MessageInfo> m_messages;\n        IResultCapture& m_resultCapture = getResultCapture();\n        size_t m_captured = 0;\n    public:\n        Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names );\n        ~Capturer();\n\n        void captureValue( size_t index, std::string const& value );\n\n        template<typename T>\n        void captureValues( size_t index, T const& value ) {\n            captureValue( index, Catch::Detail::stringify( value ) );\n        }\n\n        template<typename T, typename... Ts>\n        void captureValues( size_t index, T const& value, Ts const&... values ) {\n            captureValue( index, Catch::Detail::stringify(value) );\n            captureValues( index+1, values... );\n        }\n    };\n\n} // end namespace Catch\n\n// end catch_message.h\n#if !defined(CATCH_CONFIG_DISABLE)\n\n#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION)\n#define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__\n#else\n#define CATCH_INTERNAL_STRINGIFY(...) \"Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION\"\n#endif\n\n#if defined(CATCH_CONFIG_FAST_COMPILE) || defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n\n///////////////////////////////////////////////////////////////////////////////\n// Another way to speed-up compilation is to omit local try-catch for REQUIRE*\n// macros.\n#define INTERNAL_CATCH_TRY\n#define INTERNAL_CATCH_CATCH( capturer )\n\n#else // CATCH_CONFIG_FAST_COMPILE\n\n#define INTERNAL_CATCH_TRY try\n#define INTERNAL_CATCH_CATCH( handler ) catch(...) { handler.handleUnexpectedInflightException(); }\n\n#endif\n\n#define INTERNAL_CATCH_REACT( handler ) handler.complete();\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_TEST( macroName, resultDisposition, ... ) \\\n    do { \\\n        CATCH_INTERNAL_IGNORE_BUT_WARN(__VA_ARGS__); \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \\\n        INTERNAL_CATCH_TRY { \\\n            CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n            CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \\\n            catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \\\n            CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n        } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( (void)0, (false) && static_cast<bool>( !!(__VA_ARGS__) ) )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \\\n    INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \\\n    if( Catch::getResultCapture().lastAssertionPassed() )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_ELSE( macroName, resultDisposition, ... ) \\\n    INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \\\n    if( !Catch::getResultCapture().lastAssertionPassed() )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_NO_THROW( macroName, resultDisposition, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \\\n        try { \\\n            static_cast<void>(__VA_ARGS__); \\\n            catchAssertionHandler.handleExceptionNotThrownAsExpected(); \\\n        } \\\n        catch( ... ) { \\\n            catchAssertionHandler.handleUnexpectedInflightException(); \\\n        } \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_THROWS( macroName, resultDisposition, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(__VA_ARGS__); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( ... ) { \\\n                catchAssertionHandler.handleExceptionThrownAsExpected(); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_THROWS_AS( macroName, exceptionType, resultDisposition, expr ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(expr) \", \" CATCH_INTERNAL_STRINGIFY(exceptionType), resultDisposition ); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(expr); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( exceptionType const& ) { \\\n                catchAssertionHandler.handleExceptionThrownAsExpected(); \\\n            } \\\n            catch( ... ) { \\\n                catchAssertionHandler.handleUnexpectedInflightException(); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::StringRef(), resultDisposition ); \\\n        catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \\\n    auto varName = Catch::Capturer( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \\\n    varName.captureValues( 0, __VA_ARGS__ )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_INFO( macroName, log ) \\\n    Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log );\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_UNSCOPED_INFO( macroName, log ) \\\n    Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log )\n\n///////////////////////////////////////////////////////////////////////////////\n// Although this is matcher-based, it can be used with just a string\n#define INTERNAL_CATCH_THROWS_STR_MATCHES( macroName, resultDisposition, matcher, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) \", \" CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(__VA_ARGS__); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( ... ) { \\\n                Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher, #matcher##_catch_sr ); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n#endif // CATCH_CONFIG_DISABLE\n\n// end catch_capture.hpp\n// start catch_section.h\n\n// start catch_section_info.h\n\n// start catch_totals.h\n\n#include <cstddef>\n\nnamespace Catch {\n\n    struct Counts {\n        Counts operator - ( Counts const& other ) const;\n        Counts& operator += ( Counts const& other );\n\n        std::size_t total() const;\n        bool allPassed() const;\n        bool allOk() const;\n\n        std::size_t passed = 0;\n        std::size_t failed = 0;\n        std::size_t failedButOk = 0;\n    };\n\n    struct Totals {\n\n        Totals operator - ( Totals const& other ) const;\n        Totals& operator += ( Totals const& other );\n\n        Totals delta( Totals const& prevTotals ) const;\n\n        int error = 0;\n        Counts assertions;\n        Counts testCases;\n    };\n}\n\n// end catch_totals.h\n#include <string>\n\nnamespace Catch {\n\n    struct SectionInfo {\n        SectionInfo\n                (   SourceLineInfo const& _lineInfo,\n                    std::string const& _name );\n\n        // Deprecated\n        SectionInfo\n                (   SourceLineInfo const& _lineInfo,\n                    std::string const& _name,\n                    std::string const& ) : SectionInfo( _lineInfo, _name ) {}\n\n        std::string name;\n        std::string description; // !Deprecated: this will always be empty\n        SourceLineInfo lineInfo;\n    };\n\n    struct SectionEndInfo {\n        SectionInfo sectionInfo;\n        Counts prevAssertions;\n        double durationInSeconds;\n    };\n\n} // end namespace Catch\n\n// end catch_section_info.h\n// start catch_timer.h\n\n#include <cstdint>\n\nnamespace Catch {\n\n    auto getCurrentNanosecondsSinceEpoch() -> uint64_t;\n    auto getEstimatedClockResolution() -> uint64_t;\n\n    class Timer {\n        uint64_t m_nanoseconds = 0;\n    public:\n        void start();\n        auto getElapsedNanoseconds() const -> uint64_t;\n        auto getElapsedMicroseconds() const -> uint64_t;\n        auto getElapsedMilliseconds() const -> unsigned int;\n        auto getElapsedSeconds() const -> double;\n    };\n\n} // namespace Catch\n\n// end catch_timer.h\n#include <string>\n\nnamespace Catch {\n\n    class Section : NonCopyable {\n    public:\n        Section( SectionInfo const& info );\n        ~Section();\n\n        // This indicates whether the section should be executed or not\n        explicit operator bool() const;\n\n    private:\n        SectionInfo m_info;\n\n        std::string m_name;\n        Counts m_assertions;\n        bool m_sectionIncluded;\n        Timer m_timer;\n    };\n\n} // end namespace Catch\n\n#define INTERNAL_CATCH_SECTION( ... ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \\\n    if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n#define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \\\n    if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, (Catch::ReusableStringStream() << __VA_ARGS__).str() ) ) \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n// end catch_section.h\n// start catch_interfaces_exception.h\n\n// start catch_interfaces_registry_hub.h\n\n#include <string>\n#include <memory>\n\nnamespace Catch {\n\n    class TestCase;\n    struct ITestCaseRegistry;\n    struct IExceptionTranslatorRegistry;\n    struct IExceptionTranslator;\n    struct IReporterRegistry;\n    struct IReporterFactory;\n    struct ITagAliasRegistry;\n    struct IMutableEnumValuesRegistry;\n\n    class StartupExceptionRegistry;\n\n    using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;\n\n    struct IRegistryHub {\n        virtual ~IRegistryHub();\n\n        virtual IReporterRegistry const& getReporterRegistry() const = 0;\n        virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0;\n        virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0;\n        virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0;\n\n        virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0;\n    };\n\n    struct IMutableRegistryHub {\n        virtual ~IMutableRegistryHub();\n        virtual void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) = 0;\n        virtual void registerListener( IReporterFactoryPtr const& factory ) = 0;\n        virtual void registerTest( TestCase const& testInfo ) = 0;\n        virtual void registerTranslator( const IExceptionTranslator* translator ) = 0;\n        virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0;\n        virtual void registerStartupException() noexcept = 0;\n        virtual IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() = 0;\n    };\n\n    IRegistryHub const& getRegistryHub();\n    IMutableRegistryHub& getMutableRegistryHub();\n    void cleanUp();\n    std::string translateActiveException();\n\n}\n\n// end catch_interfaces_registry_hub.h\n#if defined(CATCH_CONFIG_DISABLE)\n#define INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( translatorName, signature) \\\n        static std::string translatorName( signature )\n#endif\n\n#include <exception>\n#include <string>\n#include <vector>\n\nnamespace Catch {\n    using exceptionTranslateFunction = std::string(*)();\n\n    struct IExceptionTranslator;\n    using ExceptionTranslators = std::vector<std::unique_ptr<IExceptionTranslator const>>;\n\n    struct IExceptionTranslator {\n        virtual ~IExceptionTranslator();\n        virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0;\n    };\n\n    struct IExceptionTranslatorRegistry {\n        virtual ~IExceptionTranslatorRegistry();\n\n        virtual std::string translateActiveException() const = 0;\n    };\n\n    class ExceptionTranslatorRegistrar {\n        template<typename T>\n        class ExceptionTranslator : public IExceptionTranslator {\n        public:\n\n            ExceptionTranslator( std::string(*translateFunction)( T& ) )\n                    : m_translateFunction( translateFunction )\n            {}\n\n            std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override {\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n                return \"\";\n#else\n                try {\n                    if( it == itEnd )\n                        std::rethrow_exception(std::current_exception());\n                    else\n                        return (*it)->translate( it+1, itEnd );\n                }\n                catch( T& ex ) {\n                    return m_translateFunction( ex );\n                }\n#endif\n            }\n\n        protected:\n            std::string(*m_translateFunction)( T& );\n        };\n\n    public:\n        template<typename T>\n        ExceptionTranslatorRegistrar( std::string(*translateFunction)( T& ) ) {\n            getMutableRegistryHub().registerTranslator\n                    ( new ExceptionTranslator<T>( translateFunction ) );\n        }\n    };\n}\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_TRANSLATE_EXCEPTION2( translatorName, signature ) \\\n    static std::string translatorName( signature ); \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \\\n    namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \\\n    static std::string translatorName( signature )\n\n#define INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION2( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )\n\n// end catch_interfaces_exception.h\n// start catch_approx.h\n\n#include <type_traits>\n\nnamespace Catch {\n    namespace Detail {\n\n        class Approx {\n        private:\n            bool equalityComparisonImpl(double other) const;\n            // Validates the new margin (margin >= 0)\n            // out-of-line to avoid including stdexcept in the header\n            void setMargin(double margin);\n            // Validates the new epsilon (0 < epsilon < 1)\n            // out-of-line to avoid including stdexcept in the header\n            void setEpsilon(double epsilon);\n\n        public:\n            explicit Approx ( double value );\n\n            static Approx custom();\n\n            Approx operator-() const;\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            Approx operator()( T const& value ) const {\n                Approx approx( static_cast<double>(value) );\n                approx.m_epsilon = m_epsilon;\n                approx.m_margin = m_margin;\n                approx.m_scale = m_scale;\n                return approx;\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            explicit Approx( T const& value ): Approx(static_cast<double>(value))\n            {}\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            friend bool operator == ( const T& lhs, Approx const& rhs ) {\n                auto lhs_v = static_cast<double>(lhs);\n                return rhs.equalityComparisonImpl(lhs_v);\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            friend bool operator == ( Approx const& lhs, const T& rhs ) {\n                return operator==( rhs, lhs );\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            friend bool operator != ( T const& lhs, Approx const& rhs ) {\n                return !operator==( lhs, rhs );\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            friend bool operator != ( Approx const& lhs, T const& rhs ) {\n                return !operator==( rhs, lhs );\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            friend bool operator <= ( T const& lhs, Approx const& rhs ) {\n                return static_cast<double>(lhs) < rhs.m_value || lhs == rhs;\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            friend bool operator <= ( Approx const& lhs, T const& rhs ) {\n                return lhs.m_value < static_cast<double>(rhs) || lhs == rhs;\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            friend bool operator >= ( T const& lhs, Approx const& rhs ) {\n                return static_cast<double>(lhs) > rhs.m_value || lhs == rhs;\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            friend bool operator >= ( Approx const& lhs, T const& rhs ) {\n                return lhs.m_value > static_cast<double>(rhs) || lhs == rhs;\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            Approx& epsilon( T const& newEpsilon ) {\n                double epsilonAsDouble = static_cast<double>(newEpsilon);\n                setEpsilon(epsilonAsDouble);\n                return *this;\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            Approx& margin( T const& newMargin ) {\n                double marginAsDouble = static_cast<double>(newMargin);\n                setMargin(marginAsDouble);\n                return *this;\n            }\n\n            template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n            Approx& scale( T const& newScale ) {\n                m_scale = static_cast<double>(newScale);\n                return *this;\n            }\n\n            std::string toString() const;\n\n        private:\n            double m_epsilon;\n            double m_margin;\n            double m_scale;\n            double m_value;\n        };\n    } // end namespace Detail\n\n    namespace literals {\n        Detail::Approx operator \"\" _a(long double val);\n        Detail::Approx operator \"\" _a(unsigned long long val);\n    } // end namespace literals\n\n    template<>\n    struct StringMaker<Catch::Detail::Approx> {\n        static std::string convert(Catch::Detail::Approx const& value);\n    };\n\n} // end namespace Catch\n\n// end catch_approx.h\n// start catch_string_manip.h\n\n#include <string>\n#include <iosfwd>\n#include <vector>\n\nnamespace Catch {\n\n    bool startsWith( std::string const& s, std::string const& prefix );\n    bool startsWith( std::string const& s, char prefix );\n    bool endsWith( std::string const& s, std::string const& suffix );\n    bool endsWith( std::string const& s, char suffix );\n    bool contains( std::string const& s, std::string const& infix );\n    void toLowerInPlace( std::string& s );\n    std::string toLower( std::string const& s );\n    //! Returns a new string without whitespace at the start/end\n    std::string trim( std::string const& str );\n    //! Returns a substring of the original ref without whitespace. Beware lifetimes!\n    StringRef trim(StringRef ref);\n\n    // !!! Be aware, returns refs into original string - make sure original string outlives them\n    std::vector<StringRef> splitStringRef( StringRef str, char delimiter );\n    bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis );\n\n    struct pluralise {\n        pluralise( std::size_t count, std::string const& label );\n\n        friend std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser );\n\n        std::size_t m_count;\n        std::string m_label;\n    };\n}\n\n// end catch_string_manip.h\n#ifndef CATCH_CONFIG_DISABLE_MATCHERS\n// start catch_capture_matchers.h\n\n// start catch_matchers.h\n\n#include <string>\n#include <vector>\n\nnamespace Catch {\n    namespace Matchers {\n        namespace Impl {\n\n            template<typename ArgT> struct MatchAllOf;\n            template<typename ArgT> struct MatchAnyOf;\n            template<typename ArgT> struct MatchNotOf;\n\n            class MatcherUntypedBase {\n            public:\n                MatcherUntypedBase() = default;\n                MatcherUntypedBase ( MatcherUntypedBase const& ) = default;\n                MatcherUntypedBase& operator = ( MatcherUntypedBase const& ) = delete;\n                std::string toString() const;\n\n            protected:\n                virtual ~MatcherUntypedBase();\n                virtual std::string describe() const = 0;\n                mutable std::string m_cachedToString;\n            };\n\n#ifdef __clang__\n            #    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wnon-virtual-dtor\"\n#endif\n\n            template<typename ObjectT>\n            struct MatcherMethod {\n                virtual bool match( ObjectT const& arg ) const = 0;\n            };\n\n#if defined(__OBJC__)\n            // Hack to fix Catch GH issue #1661. Could use id for generic Object support.\n        // use of const for Object pointers is very uncommon and under ARC it causes some kind of signature mismatch that breaks compilation\n        template<>\n        struct MatcherMethod<NSString*> {\n            virtual bool match( NSString* arg ) const = 0;\n        };\n#endif\n\n#ifdef __clang__\n#    pragma clang diagnostic pop\n#endif\n\n            template<typename T>\n            struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {\n\n                MatchAllOf<T> operator && ( MatcherBase const& other ) const;\n                MatchAnyOf<T> operator || ( MatcherBase const& other ) const;\n                MatchNotOf<T> operator ! () const;\n            };\n\n            template<typename ArgT>\n            struct MatchAllOf : MatcherBase<ArgT> {\n                bool match( ArgT const& arg ) const override {\n                    for( auto matcher : m_matchers ) {\n                        if (!matcher->match(arg))\n                            return false;\n                    }\n                    return true;\n                }\n                std::string describe() const override {\n                    std::string description;\n                    description.reserve( 4 + m_matchers.size()*32 );\n                    description += \"( \";\n                    bool first = true;\n                    for( auto matcher : m_matchers ) {\n                        if( first )\n                            first = false;\n                        else\n                            description += \" and \";\n                        description += matcher->toString();\n                    }\n                    description += \" )\";\n                    return description;\n                }\n\n                MatchAllOf<ArgT> operator && ( MatcherBase<ArgT> const& other ) {\n                    auto copy(*this);\n                    copy.m_matchers.push_back( &other );\n                    return copy;\n                }\n\n                std::vector<MatcherBase<ArgT> const*> m_matchers;\n            };\n            template<typename ArgT>\n            struct MatchAnyOf : MatcherBase<ArgT> {\n\n                bool match( ArgT const& arg ) const override {\n                    for( auto matcher : m_matchers ) {\n                        if (matcher->match(arg))\n                            return true;\n                    }\n                    return false;\n                }\n                std::string describe() const override {\n                    std::string description;\n                    description.reserve( 4 + m_matchers.size()*32 );\n                    description += \"( \";\n                    bool first = true;\n                    for( auto matcher : m_matchers ) {\n                        if( first )\n                            first = false;\n                        else\n                            description += \" or \";\n                        description += matcher->toString();\n                    }\n                    description += \" )\";\n                    return description;\n                }\n\n                MatchAnyOf<ArgT> operator || ( MatcherBase<ArgT> const& other ) {\n                    auto copy(*this);\n                    copy.m_matchers.push_back( &other );\n                    return copy;\n                }\n\n                std::vector<MatcherBase<ArgT> const*> m_matchers;\n            };\n\n            template<typename ArgT>\n            struct MatchNotOf : MatcherBase<ArgT> {\n\n                MatchNotOf( MatcherBase<ArgT> const& underlyingMatcher ) : m_underlyingMatcher( underlyingMatcher ) {}\n\n                bool match( ArgT const& arg ) const override {\n                    return !m_underlyingMatcher.match( arg );\n                }\n\n                std::string describe() const override {\n                    return \"not \" + m_underlyingMatcher.toString();\n                }\n                MatcherBase<ArgT> const& m_underlyingMatcher;\n            };\n\n            template<typename T>\n            MatchAllOf<T> MatcherBase<T>::operator && ( MatcherBase const& other ) const {\n                return MatchAllOf<T>() && *this && other;\n            }\n            template<typename T>\n            MatchAnyOf<T> MatcherBase<T>::operator || ( MatcherBase const& other ) const {\n                return MatchAnyOf<T>() || *this || other;\n            }\n            template<typename T>\n            MatchNotOf<T> MatcherBase<T>::operator ! () const {\n                return MatchNotOf<T>( *this );\n            }\n\n        } // namespace Impl\n\n    } // namespace Matchers\n\n    using namespace Matchers;\n    using Matchers::Impl::MatcherBase;\n\n} // namespace Catch\n\n// end catch_matchers.h\n// start catch_matchers_exception.hpp\n\nnamespace Catch {\n    namespace Matchers {\n        namespace Exception {\n\n            class ExceptionMessageMatcher : public MatcherBase<std::exception> {\n                std::string m_message;\n            public:\n\n                ExceptionMessageMatcher(std::string const& message):\n                        m_message(message)\n                {}\n\n                bool match(std::exception const& ex) const override;\n\n                std::string describe() const override;\n            };\n\n        } // namespace Exception\n\n        Exception::ExceptionMessageMatcher Message(std::string const& message);\n\n    } // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_exception.hpp\n// start catch_matchers_floating.h\n\nnamespace Catch {\n    namespace Matchers {\n\n        namespace Floating {\n\n            enum class FloatingPointKind : uint8_t;\n\n            struct WithinAbsMatcher : MatcherBase<double> {\n                WithinAbsMatcher(double target, double margin);\n                bool match(double const& matchee) const override;\n                std::string describe() const override;\n            private:\n                double m_target;\n                double m_margin;\n            };\n\n            struct WithinUlpsMatcher : MatcherBase<double> {\n                WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType);\n                bool match(double const& matchee) const override;\n                std::string describe() const override;\n            private:\n                double m_target;\n                uint64_t m_ulps;\n                FloatingPointKind m_type;\n            };\n\n            // Given IEEE-754 format for floats and doubles, we can assume\n            // that float -> double promotion is lossless. Given this, we can\n            // assume that if we do the standard relative comparison of\n            // |lhs - rhs| <= epsilon * max(fabs(lhs), fabs(rhs)), then we get\n            // the same result if we do this for floats, as if we do this for\n            // doubles that were promoted from floats.\n            struct WithinRelMatcher : MatcherBase<double> {\n                WithinRelMatcher(double target, double epsilon);\n                bool match(double const& matchee) const override;\n                std::string describe() const override;\n            private:\n                double m_target;\n                double m_epsilon;\n            };\n\n        } // namespace Floating\n\n        // The following functions create the actual matcher objects.\n        // This allows the types to be inferred\n        Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff);\n        Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff);\n        Floating::WithinAbsMatcher WithinAbs(double target, double margin);\n        Floating::WithinRelMatcher WithinRel(double target, double eps);\n        // defaults epsilon to 100*numeric_limits<double>::epsilon()\n        Floating::WithinRelMatcher WithinRel(double target);\n        Floating::WithinRelMatcher WithinRel(float target, float eps);\n        // defaults epsilon to 100*numeric_limits<float>::epsilon()\n        Floating::WithinRelMatcher WithinRel(float target);\n\n    } // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_floating.h\n// start catch_matchers_generic.hpp\n\n#include <functional>\n#include <string>\n\nnamespace Catch {\n    namespace Matchers {\n        namespace Generic {\n\n            namespace Detail {\n                std::string finalizeDescription(const std::string& desc);\n            }\n\n            template <typename T>\n            class PredicateMatcher : public MatcherBase<T> {\n                std::function<bool(T const&)> m_predicate;\n                std::string m_description;\n            public:\n\n                PredicateMatcher(std::function<bool(T const&)> const& elem, std::string const& descr)\n                        :m_predicate(std::move(elem)),\n                         m_description(Detail::finalizeDescription(descr))\n                {}\n\n                bool match( T const& item ) const override {\n                    return m_predicate(item);\n                }\n\n                std::string describe() const override {\n                    return m_description;\n                }\n            };\n\n        } // namespace Generic\n\n        // The following functions create the actual matcher objects.\n        // The user has to explicitly specify type to the function, because\n        // inferring std::function<bool(T const&)> is hard (but possible) and\n        // requires a lot of TMP.\n        template<typename T>\n        Generic::PredicateMatcher<T> Predicate(std::function<bool(T const&)> const& predicate, std::string const& description = \"\") {\n            return Generic::PredicateMatcher<T>(predicate, description);\n        }\n\n    } // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_generic.hpp\n// start catch_matchers_string.h\n\n#include <string>\n\nnamespace Catch {\n    namespace Matchers {\n\n        namespace StdString {\n\n            struct CasedString\n            {\n                CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity );\n                std::string adjustString( std::string const& str ) const;\n                std::string caseSensitivitySuffix() const;\n\n                CaseSensitive::Choice m_caseSensitivity;\n                std::string m_str;\n            };\n\n            struct StringMatcherBase : MatcherBase<std::string> {\n                StringMatcherBase( std::string const& operation, CasedString const& comparator );\n                std::string describe() const override;\n\n                CasedString m_comparator;\n                std::string m_operation;\n            };\n\n            struct EqualsMatcher : StringMatcherBase {\n                EqualsMatcher( CasedString const& comparator );\n                bool match( std::string const& source ) const override;\n            };\n            struct ContainsMatcher : StringMatcherBase {\n                ContainsMatcher( CasedString const& comparator );\n                bool match( std::string const& source ) const override;\n            };\n            struct StartsWithMatcher : StringMatcherBase {\n                StartsWithMatcher( CasedString const& comparator );\n                bool match( std::string const& source ) const override;\n            };\n            struct EndsWithMatcher : StringMatcherBase {\n                EndsWithMatcher( CasedString const& comparator );\n                bool match( std::string const& source ) const override;\n            };\n\n            struct RegexMatcher : MatcherBase<std::string> {\n                RegexMatcher( std::string regex, CaseSensitive::Choice caseSensitivity );\n                bool match( std::string const& matchee ) const override;\n                std::string describe() const override;\n\n            private:\n                std::string m_regex;\n                CaseSensitive::Choice m_caseSensitivity;\n            };\n\n        } // namespace StdString\n\n        // The following functions create the actual matcher objects.\n        // This allows the types to be inferred\n\n        StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n        StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n        StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n        StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n        StdString::RegexMatcher Matches( std::string const& regex, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes );\n\n    } // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_string.h\n// start catch_matchers_vector.h\n\n#include <algorithm>\n\nnamespace Catch {\n    namespace Matchers {\n\n        namespace Vector {\n            template<typename T, typename Alloc>\n            struct ContainsElementMatcher : MatcherBase<std::vector<T, Alloc>> {\n\n                ContainsElementMatcher(T const &comparator) : m_comparator( comparator) {}\n\n                bool match(std::vector<T, Alloc> const &v) const override {\n                    for (auto const& el : v) {\n                        if (el == m_comparator) {\n                            return true;\n                        }\n                    }\n                    return false;\n                }\n\n                std::string describe() const override {\n                    return \"Contains: \" + ::Catch::Detail::stringify( m_comparator );\n                }\n\n                T const& m_comparator;\n            };\n\n            template<typename T, typename AllocComp, typename AllocMatch>\n            struct ContainsMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n\n                ContainsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {}\n\n                bool match(std::vector<T, AllocMatch> const &v) const override {\n                    // !TBD: see note in EqualsMatcher\n                    if (m_comparator.size() > v.size())\n                        return false;\n                    for (auto const& comparator : m_comparator) {\n                        auto present = false;\n                        for (const auto& el : v) {\n                            if (el == comparator) {\n                                present = true;\n                                break;\n                            }\n                        }\n                        if (!present) {\n                            return false;\n                        }\n                    }\n                    return true;\n                }\n                std::string describe() const override {\n                    return \"Contains: \" + ::Catch::Detail::stringify( m_comparator );\n                }\n\n                std::vector<T, AllocComp> const& m_comparator;\n            };\n\n            template<typename T, typename AllocComp, typename AllocMatch>\n            struct EqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n\n                EqualsMatcher(std::vector<T, AllocComp> const &comparator) : m_comparator( comparator ) {}\n\n                bool match(std::vector<T, AllocMatch> const &v) const override {\n                    // !TBD: This currently works if all elements can be compared using !=\n                    // - a more general approach would be via a compare template that defaults\n                    // to using !=. but could be specialised for, e.g. std::vector<T, Alloc> etc\n                    // - then just call that directly\n                    if (m_comparator.size() != v.size())\n                        return false;\n                    for (std::size_t i = 0; i < v.size(); ++i)\n                        if (m_comparator[i] != v[i])\n                            return false;\n                    return true;\n                }\n                std::string describe() const override {\n                    return \"Equals: \" + ::Catch::Detail::stringify( m_comparator );\n                }\n                std::vector<T, AllocComp> const& m_comparator;\n            };\n\n            template<typename T, typename AllocComp, typename AllocMatch>\n            struct ApproxMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n\n                ApproxMatcher(std::vector<T, AllocComp> const& comparator) : m_comparator( comparator ) {}\n\n                bool match(std::vector<T, AllocMatch> const &v) const override {\n                    if (m_comparator.size() != v.size())\n                        return false;\n                    for (std::size_t i = 0; i < v.size(); ++i)\n                        if (m_comparator[i] != approx(v[i]))\n                            return false;\n                    return true;\n                }\n                std::string describe() const override {\n                    return \"is approx: \" + ::Catch::Detail::stringify( m_comparator );\n                }\n                template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n                ApproxMatcher& epsilon( T const& newEpsilon ) {\n                    approx.epsilon(newEpsilon);\n                    return *this;\n                }\n                template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n                ApproxMatcher& margin( T const& newMargin ) {\n                    approx.margin(newMargin);\n                    return *this;\n                }\n                template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>\n                ApproxMatcher& scale( T const& newScale ) {\n                    approx.scale(newScale);\n                    return *this;\n                }\n\n                std::vector<T, AllocComp> const& m_comparator;\n                mutable Catch::Detail::Approx approx = Catch::Detail::Approx::custom();\n            };\n\n            template<typename T, typename AllocComp, typename AllocMatch>\n            struct UnorderedEqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {\n                UnorderedEqualsMatcher(std::vector<T, AllocComp> const& target) : m_target(target) {}\n                bool match(std::vector<T, AllocMatch> const& vec) const override {\n                    if (m_target.size() != vec.size()) {\n                        return false;\n                    }\n                    return std::is_permutation(m_target.begin(), m_target.end(), vec.begin());\n                }\n\n                std::string describe() const override {\n                    return \"UnorderedEquals: \" + ::Catch::Detail::stringify(m_target);\n                }\n            private:\n                std::vector<T, AllocComp> const& m_target;\n            };\n\n        } // namespace Vector\n\n        // The following functions create the actual matcher objects.\n        // This allows the types to be inferred\n\n        template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n        Vector::ContainsMatcher<T, AllocComp, AllocMatch> Contains( std::vector<T, AllocComp> const& comparator ) {\n            return Vector::ContainsMatcher<T, AllocComp, AllocMatch>( comparator );\n        }\n\n        template<typename T, typename Alloc = std::allocator<T>>\n        Vector::ContainsElementMatcher<T, Alloc> VectorContains( T const& comparator ) {\n            return Vector::ContainsElementMatcher<T, Alloc>( comparator );\n        }\n\n        template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n        Vector::EqualsMatcher<T, AllocComp, AllocMatch> Equals( std::vector<T, AllocComp> const& comparator ) {\n            return Vector::EqualsMatcher<T, AllocComp, AllocMatch>( comparator );\n        }\n\n        template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n        Vector::ApproxMatcher<T, AllocComp, AllocMatch> Approx( std::vector<T, AllocComp> const& comparator ) {\n            return Vector::ApproxMatcher<T, AllocComp, AllocMatch>( comparator );\n        }\n\n        template<typename T, typename AllocComp = std::allocator<T>, typename AllocMatch = AllocComp>\n        Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch> UnorderedEquals(std::vector<T, AllocComp> const& target) {\n            return Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch>( target );\n        }\n\n    } // namespace Matchers\n} // namespace Catch\n\n// end catch_matchers_vector.h\nnamespace Catch {\n\n    template<typename ArgT, typename MatcherT>\n    class MatchExpr : public ITransientExpression {\n        ArgT const& m_arg;\n        MatcherT m_matcher;\n        StringRef m_matcherString;\n    public:\n        MatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef const& matcherString )\n                :   ITransientExpression{ true, matcher.match( arg ) },\n                    m_arg( arg ),\n                    m_matcher( matcher ),\n                    m_matcherString( matcherString )\n        {}\n\n        void streamReconstructedExpression( std::ostream &os ) const override {\n            auto matcherAsString = m_matcher.toString();\n            os << Catch::Detail::stringify( m_arg ) << ' ';\n            if( matcherAsString == Detail::unprintableString )\n                os << m_matcherString;\n            else\n                os << matcherAsString;\n        }\n    };\n\n    using StringMatcher = Matchers::Impl::MatcherBase<std::string>;\n\n    void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef const& matcherString  );\n\n    template<typename ArgT, typename MatcherT>\n    auto makeMatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef const& matcherString  ) -> MatchExpr<ArgT, MatcherT> {\n        return MatchExpr<ArgT, MatcherT>( arg, matcher, matcherString );\n    }\n\n} // namespace Catch\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CHECK_THAT( macroName, matcher, resultDisposition, arg ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) \", \" CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \\\n        INTERNAL_CATCH_TRY { \\\n            catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \\\n        } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n///////////////////////////////////////////////////////////////////////////////\n#define INTERNAL_CATCH_THROWS_MATCHES( macroName, exceptionType, resultDisposition, matcher, ... ) \\\n    do { \\\n        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) \", \" CATCH_INTERNAL_STRINGIFY(exceptionType) \", \" CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \\\n        if( catchAssertionHandler.allowThrows() ) \\\n            try { \\\n                static_cast<void>(__VA_ARGS__ ); \\\n                catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \\\n            } \\\n            catch( exceptionType const& ex ) { \\\n                catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \\\n            } \\\n            catch( ... ) { \\\n                catchAssertionHandler.handleUnexpectedInflightException(); \\\n            } \\\n        else \\\n            catchAssertionHandler.handleThrowingCallSkipped(); \\\n        INTERNAL_CATCH_REACT( catchAssertionHandler ) \\\n    } while( false )\n\n// end catch_capture_matchers.h\n#endif\n// start catch_generators.hpp\n\n// start catch_interfaces_generatortracker.h\n\n\n#include <memory>\n\nnamespace Catch {\n\n    namespace Generators {\n        class GeneratorUntypedBase {\n        public:\n            GeneratorUntypedBase() = default;\n            virtual ~GeneratorUntypedBase();\n            // Attempts to move the generator to the next element\n            //\n            // Returns true iff the move succeeded (and a valid element\n            // can be retrieved).\n            virtual bool next() = 0;\n        };\n        using GeneratorBasePtr = std::unique_ptr<GeneratorUntypedBase>;\n\n    } // namespace Generators\n\n    struct IGeneratorTracker {\n        virtual ~IGeneratorTracker();\n        virtual auto hasGenerator() const -> bool = 0;\n        virtual auto getGenerator() const -> Generators::GeneratorBasePtr const& = 0;\n        virtual void setGenerator( Generators::GeneratorBasePtr&& generator ) = 0;\n    };\n\n} // namespace Catch\n\n// end catch_interfaces_generatortracker.h\n// start catch_enforce.h\n\n#include <exception>\n\nnamespace Catch {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n    template <typename Ex>\n    [[noreturn]]\n    void throw_exception(Ex const& e) {\n        throw e;\n    }\n#else // ^^ Exceptions are enabled //  Exceptions are disabled vv\n    [[noreturn]]\n    void throw_exception(std::exception const& e);\n#endif\n\n    [[noreturn]]\n    void throw_logic_error(std::string const& msg);\n    [[noreturn]]\n    void throw_domain_error(std::string const& msg);\n    [[noreturn]]\n    void throw_runtime_error(std::string const& msg);\n\n} // namespace Catch;\n\n#define CATCH_MAKE_MSG(...) \\\n    (Catch::ReusableStringStream() << __VA_ARGS__).str()\n\n#define CATCH_INTERNAL_ERROR(...) \\\n    Catch::throw_logic_error(CATCH_MAKE_MSG( CATCH_INTERNAL_LINEINFO << \": Internal Catch2 error: \" << __VA_ARGS__))\n\n#define CATCH_ERROR(...) \\\n    Catch::throw_domain_error(CATCH_MAKE_MSG( __VA_ARGS__ ))\n\n#define CATCH_RUNTIME_ERROR(...) \\\n    Catch::throw_runtime_error(CATCH_MAKE_MSG( __VA_ARGS__ ))\n\n#define CATCH_ENFORCE( condition, ... ) \\\n    do{ if( !(condition) ) CATCH_ERROR( __VA_ARGS__ ); } while(false)\n\n// end catch_enforce.h\n#include <memory>\n#include <vector>\n#include <cassert>\n\n#include <utility>\n#include <exception>\n\nnamespace Catch {\n\n    class GeneratorException : public std::exception {\n        const char* const m_msg = \"\";\n\n    public:\n        GeneratorException(const char* msg):\n                m_msg(msg)\n        {}\n\n        const char* what() const noexcept final;\n    };\n\n    namespace Generators {\n\n        // !TBD move this into its own location?\n        namespace pf{\n            template<typename T, typename... Args>\n            std::unique_ptr<T> make_unique( Args&&... args ) {\n                return std::unique_ptr<T>(new T(std::forward<Args>(args)...));\n            }\n        }\n\n        template<typename T>\n        struct IGenerator : GeneratorUntypedBase {\n            virtual ~IGenerator() = default;\n\n            // Returns the current element of the generator\n            //\n            // \\Precondition The generator is either freshly constructed,\n            // or the last call to `next()` returned true\n            virtual T const& get() const = 0;\n            using type = T;\n        };\n\n        template<typename T>\n        class SingleValueGenerator final : public IGenerator<T> {\n            T m_value;\n        public:\n            SingleValueGenerator(T&& value) : m_value(std::move(value)) {}\n\n            T const& get() const override {\n                return m_value;\n            }\n            bool next() override {\n                return false;\n            }\n        };\n\n        template<typename T>\n        class FixedValuesGenerator final : public IGenerator<T> {\n            static_assert(!std::is_same<T, bool>::value,\n                          \"FixedValuesGenerator does not support bools because of std::vector<bool>\"\n                          \"specialization, use SingleValue Generator instead.\");\n            std::vector<T> m_values;\n            size_t m_idx = 0;\n        public:\n            FixedValuesGenerator( std::initializer_list<T> values ) : m_values( values ) {}\n\n            T const& get() const override {\n                return m_values[m_idx];\n            }\n            bool next() override {\n                ++m_idx;\n                return m_idx < m_values.size();\n            }\n        };\n\n        template <typename T>\n        class GeneratorWrapper final {\n            std::unique_ptr<IGenerator<T>> m_generator;\n        public:\n            GeneratorWrapper(std::unique_ptr<IGenerator<T>> generator):\n                    m_generator(std::move(generator))\n            {}\n            T const& get() const {\n                return m_generator->get();\n            }\n            bool next() {\n                return m_generator->next();\n            }\n        };\n\n        template <typename T>\n        GeneratorWrapper<T> value(T&& value) {\n            return GeneratorWrapper<T>(pf::make_unique<SingleValueGenerator<T>>(std::forward<T>(value)));\n        }\n        template <typename T>\n        GeneratorWrapper<T> values(std::initializer_list<T> values) {\n            return GeneratorWrapper<T>(pf::make_unique<FixedValuesGenerator<T>>(values));\n        }\n\n        template<typename T>\n        class Generators : public IGenerator<T> {\n            std::vector<GeneratorWrapper<T>> m_generators;\n            size_t m_current = 0;\n\n            void populate(GeneratorWrapper<T>&& generator) {\n                m_generators.emplace_back(std::move(generator));\n            }\n            void populate(T&& val) {\n                m_generators.emplace_back(value(std::forward<T>(val)));\n            }\n            template<typename U>\n            void populate(U&& val) {\n                populate(T(std::forward<U>(val)));\n            }\n            template<typename U, typename... Gs>\n            void populate(U&& valueOrGenerator, Gs &&... moreGenerators) {\n                populate(std::forward<U>(valueOrGenerator));\n                populate(std::forward<Gs>(moreGenerators)...);\n            }\n\n        public:\n            template <typename... Gs>\n            Generators(Gs &&... moreGenerators) {\n                m_generators.reserve(sizeof...(Gs));\n                populate(std::forward<Gs>(moreGenerators)...);\n            }\n\n            T const& get() const override {\n                return m_generators[m_current].get();\n            }\n\n            bool next() override {\n                if (m_current >= m_generators.size()) {\n                    return false;\n                }\n                const bool current_status = m_generators[m_current].next();\n                if (!current_status) {\n                    ++m_current;\n                }\n                return m_current < m_generators.size();\n            }\n        };\n\n        template<typename... Ts>\n        GeneratorWrapper<std::tuple<Ts...>> table( std::initializer_list<std::tuple<typename std::decay<Ts>::type...>> tuples ) {\n            return values<std::tuple<Ts...>>( tuples );\n        }\n\n        // Tag type to signal that a generator sequence should convert arguments to a specific type\n        template <typename T>\n        struct as {};\n\n        template<typename T, typename... Gs>\n        auto makeGenerators( GeneratorWrapper<T>&& generator, Gs &&... moreGenerators ) -> Generators<T> {\n            return Generators<T>(std::move(generator), std::forward<Gs>(moreGenerators)...);\n        }\n        template<typename T>\n        auto makeGenerators( GeneratorWrapper<T>&& generator ) -> Generators<T> {\n            return Generators<T>(std::move(generator));\n        }\n        template<typename T, typename... Gs>\n        auto makeGenerators( T&& val, Gs &&... moreGenerators ) -> Generators<T> {\n            return makeGenerators( value( std::forward<T>( val ) ), std::forward<Gs>( moreGenerators )... );\n        }\n        template<typename T, typename U, typename... Gs>\n        auto makeGenerators( as<T>, U&& val, Gs &&... moreGenerators ) -> Generators<T> {\n            return makeGenerators( value( T( std::forward<U>( val ) ) ), std::forward<Gs>( moreGenerators )... );\n        }\n\n        auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&;\n\n        template<typename L>\n        // Note: The type after -> is weird, because VS2015 cannot parse\n        //       the expression used in the typedef inside, when it is in\n        //       return type. Yeah.\n        auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) {\n            using UnderlyingType = typename decltype(generatorExpression())::type;\n\n            IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo );\n            if (!tracker.hasGenerator()) {\n                tracker.setGenerator(pf::make_unique<Generators<UnderlyingType>>(generatorExpression()));\n            }\n\n            auto const& generator = static_cast<IGenerator<UnderlyingType> const&>( *tracker.getGenerator() );\n            return generator.get();\n        }\n\n    } // namespace Generators\n} // namespace Catch\n\n#define GENERATE( ... ) \\\n    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \\\n                                 CATCH_INTERNAL_LINEINFO, \\\n                                 [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)\n#define GENERATE_COPY( ... ) \\\n    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \\\n                                 CATCH_INTERNAL_LINEINFO, \\\n                                 [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)\n#define GENERATE_REF( ... ) \\\n    Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \\\n                                 CATCH_INTERNAL_LINEINFO, \\\n                                 [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)\n\n// end catch_generators.hpp\n// start catch_generators_generic.hpp\n\nnamespace Catch {\n    namespace Generators {\n\n        template <typename T>\n        class TakeGenerator : public IGenerator<T> {\n            GeneratorWrapper<T> m_generator;\n            size_t m_returned = 0;\n            size_t m_target;\n        public:\n            TakeGenerator(size_t target, GeneratorWrapper<T>&& generator):\n                    m_generator(std::move(generator)),\n                    m_target(target)\n            {\n                assert(target != 0 && \"Empty generators are not allowed\");\n            }\n            T const& get() const override {\n                return m_generator.get();\n            }\n            bool next() override {\n                ++m_returned;\n                if (m_returned >= m_target) {\n                    return false;\n                }\n\n                const auto success = m_generator.next();\n                // If the underlying generator does not contain enough values\n                // then we cut short as well\n                if (!success) {\n                    m_returned = m_target;\n                }\n                return success;\n            }\n        };\n\n        template <typename T>\n        GeneratorWrapper<T> take(size_t target, GeneratorWrapper<T>&& generator) {\n            return GeneratorWrapper<T>(pf::make_unique<TakeGenerator<T>>(target, std::move(generator)));\n        }\n\n        template <typename T, typename Predicate>\n        class FilterGenerator : public IGenerator<T> {\n            GeneratorWrapper<T> m_generator;\n            Predicate m_predicate;\n        public:\n            template <typename P = Predicate>\n            FilterGenerator(P&& pred, GeneratorWrapper<T>&& generator):\n                    m_generator(std::move(generator)),\n                    m_predicate(std::forward<P>(pred))\n            {\n                if (!m_predicate(m_generator.get())) {\n                    // It might happen that there are no values that pass the\n                    // filter. In that case we throw an exception.\n                    auto has_initial_value = nextImpl();\n                    if (!has_initial_value) {\n                        Catch::throw_exception(GeneratorException(\"No valid value found in filtered generator\"));\n                    }\n                }\n            }\n\n            T const& get() const override {\n                return m_generator.get();\n            }\n\n            bool next() override {\n                return nextImpl();\n            }\n\n        private:\n            bool nextImpl() {\n                bool success = m_generator.next();\n                if (!success) {\n                    return false;\n                }\n                while (!m_predicate(m_generator.get()) && (success = m_generator.next()) == true);\n                return success;\n            }\n        };\n\n        template <typename T, typename Predicate>\n        GeneratorWrapper<T> filter(Predicate&& pred, GeneratorWrapper<T>&& generator) {\n            return GeneratorWrapper<T>(std::unique_ptr<IGenerator<T>>(pf::make_unique<FilterGenerator<T, Predicate>>(std::forward<Predicate>(pred), std::move(generator))));\n        }\n\n        template <typename T>\n        class RepeatGenerator : public IGenerator<T> {\n            static_assert(!std::is_same<T, bool>::value,\n                          \"RepeatGenerator currently does not support bools\"\n                          \"because of std::vector<bool> specialization\");\n            GeneratorWrapper<T> m_generator;\n            mutable std::vector<T> m_returned;\n            size_t m_target_repeats;\n            size_t m_current_repeat = 0;\n            size_t m_repeat_index = 0;\n        public:\n            RepeatGenerator(size_t repeats, GeneratorWrapper<T>&& generator):\n                    m_generator(std::move(generator)),\n                    m_target_repeats(repeats)\n            {\n                assert(m_target_repeats > 0 && \"Repeat generator must repeat at least once\");\n            }\n\n            T const& get() const override {\n                if (m_current_repeat == 0) {\n                    m_returned.push_back(m_generator.get());\n                    return m_returned.back();\n                }\n                return m_returned[m_repeat_index];\n            }\n\n            bool next() override {\n                // There are 2 basic cases:\n                // 1) We are still reading the generator\n                // 2) We are reading our own cache\n\n                // In the first case, we need to poke the underlying generator.\n                // If it happily moves, we are left in that state, otherwise it is time to start reading from our cache\n                if (m_current_repeat == 0) {\n                    const auto success = m_generator.next();\n                    if (!success) {\n                        ++m_current_repeat;\n                    }\n                    return m_current_repeat < m_target_repeats;\n                }\n\n                // In the second case, we need to move indices forward and check that we haven't run up against the end\n                ++m_repeat_index;\n                if (m_repeat_index == m_returned.size()) {\n                    m_repeat_index = 0;\n                    ++m_current_repeat;\n                }\n                return m_current_repeat < m_target_repeats;\n            }\n        };\n\n        template <typename T>\n        GeneratorWrapper<T> repeat(size_t repeats, GeneratorWrapper<T>&& generator) {\n            return GeneratorWrapper<T>(pf::make_unique<RepeatGenerator<T>>(repeats, std::move(generator)));\n        }\n\n        template <typename T, typename U, typename Func>\n        class MapGenerator : public IGenerator<T> {\n            // TBD: provide static assert for mapping function, for friendly error message\n            GeneratorWrapper<U> m_generator;\n            Func m_function;\n            // To avoid returning dangling reference, we have to save the values\n            T m_cache;\n        public:\n            template <typename F2 = Func>\n            MapGenerator(F2&& function, GeneratorWrapper<U>&& generator) :\n                    m_generator(std::move(generator)),\n                    m_function(std::forward<F2>(function)),\n                    m_cache(m_function(m_generator.get()))\n            {}\n\n            T const& get() const override {\n                return m_cache;\n            }\n            bool next() override {\n                const auto success = m_generator.next();\n                if (success) {\n                    m_cache = m_function(m_generator.get());\n                }\n                return success;\n            }\n        };\n\n        template <typename Func, typename U, typename T = FunctionReturnType<Func, U>>\n        GeneratorWrapper<T> map(Func&& function, GeneratorWrapper<U>&& generator) {\n            return GeneratorWrapper<T>(\n                    pf::make_unique<MapGenerator<T, U, Func>>(std::forward<Func>(function), std::move(generator))\n            );\n        }\n\n        template <typename T, typename U, typename Func>\n        GeneratorWrapper<T> map(Func&& function, GeneratorWrapper<U>&& generator) {\n            return GeneratorWrapper<T>(\n                    pf::make_unique<MapGenerator<T, U, Func>>(std::forward<Func>(function), std::move(generator))\n            );\n        }\n\n        template <typename T>\n        class ChunkGenerator final : public IGenerator<std::vector<T>> {\n            std::vector<T> m_chunk;\n            size_t m_chunk_size;\n            GeneratorWrapper<T> m_generator;\n            bool m_used_up = false;\n        public:\n            ChunkGenerator(size_t size, GeneratorWrapper<T> generator) :\n                    m_chunk_size(size), m_generator(std::move(generator))\n            {\n                m_chunk.reserve(m_chunk_size);\n                if (m_chunk_size != 0) {\n                    m_chunk.push_back(m_generator.get());\n                    for (size_t i = 1; i < m_chunk_size; ++i) {\n                        if (!m_generator.next()) {\n                            Catch::throw_exception(GeneratorException(\"Not enough values to initialize the first chunk\"));\n                        }\n                        m_chunk.push_back(m_generator.get());\n                    }\n                }\n            }\n            std::vector<T> const& get() const override {\n                return m_chunk;\n            }\n            bool next() override {\n                m_chunk.clear();\n                for (size_t idx = 0; idx < m_chunk_size; ++idx) {\n                    if (!m_generator.next()) {\n                        return false;\n                    }\n                    m_chunk.push_back(m_generator.get());\n                }\n                return true;\n            }\n        };\n\n        template <typename T>\n        GeneratorWrapper<std::vector<T>> chunk(size_t size, GeneratorWrapper<T>&& generator) {\n            return GeneratorWrapper<std::vector<T>>(\n                    pf::make_unique<ChunkGenerator<T>>(size, std::move(generator))\n            );\n        }\n\n    } // namespace Generators\n} // namespace Catch\n\n// end catch_generators_generic.hpp\n// start catch_generators_specific.hpp\n\n// start catch_context.h\n\n#include <memory>\n\nnamespace Catch {\n\n    struct IResultCapture;\n    struct IRunner;\n    struct IConfig;\n    struct IMutableContext;\n\n    using IConfigPtr = std::shared_ptr<IConfig const>;\n\n    struct IContext\n    {\n        virtual ~IContext();\n\n        virtual IResultCapture* getResultCapture() = 0;\n        virtual IRunner* getRunner() = 0;\n        virtual IConfigPtr const& getConfig() const = 0;\n    };\n\n    struct IMutableContext : IContext\n    {\n        virtual ~IMutableContext();\n        virtual void setResultCapture( IResultCapture* resultCapture ) = 0;\n        virtual void setRunner( IRunner* runner ) = 0;\n        virtual void setConfig( IConfigPtr const& config ) = 0;\n\n    private:\n        static IMutableContext *currentContext;\n        friend IMutableContext& getCurrentMutableContext();\n        friend void cleanUpContext();\n        static void createContext();\n    };\n\n    inline IMutableContext& getCurrentMutableContext()\n    {\n        if( !IMutableContext::currentContext )\n            IMutableContext::createContext();\n        // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn)\n        return *IMutableContext::currentContext;\n    }\n\n    inline IContext& getCurrentContext()\n    {\n        return getCurrentMutableContext();\n    }\n\n    void cleanUpContext();\n\n    class SimplePcg32;\n    SimplePcg32& rng();\n}\n\n// end catch_context.h\n// start catch_interfaces_config.h\n\n// start catch_option.hpp\n\nnamespace Catch {\n\n    // An optional type\n    template<typename T>\n    class Option {\n    public:\n        Option() : nullableValue( nullptr ) {}\n        Option( T const& _value )\n                : nullableValue( new( storage ) T( _value ) )\n        {}\n        Option( Option const& _other )\n                : nullableValue( _other ? new( storage ) T( *_other ) : nullptr )\n        {}\n\n        ~Option() {\n            reset();\n        }\n\n        Option& operator= ( Option const& _other ) {\n            if( &_other != this ) {\n                reset();\n                if( _other )\n                    nullableValue = new( storage ) T( *_other );\n            }\n            return *this;\n        }\n        Option& operator = ( T const& _value ) {\n            reset();\n            nullableValue = new( storage ) T( _value );\n            return *this;\n        }\n\n        void reset() {\n            if( nullableValue )\n                nullableValue->~T();\n            nullableValue = nullptr;\n        }\n\n        T& operator*() { return *nullableValue; }\n        T const& operator*() const { return *nullableValue; }\n        T* operator->() { return nullableValue; }\n        const T* operator->() const { return nullableValue; }\n\n        T valueOr( T const& defaultValue ) const {\n            return nullableValue ? *nullableValue : defaultValue;\n        }\n\n        bool some() const { return nullableValue != nullptr; }\n        bool none() const { return nullableValue == nullptr; }\n\n        bool operator !() const { return nullableValue == nullptr; }\n        explicit operator bool() const {\n            return some();\n        }\n\n    private:\n        T *nullableValue;\n        alignas(alignof(T)) char storage[sizeof(T)];\n    };\n\n} // end namespace Catch\n\n// end catch_option.hpp\n#include <chrono>\n#include <iosfwd>\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    enum class Verbosity {\n        Quiet = 0,\n        Normal,\n        High\n    };\n\n    struct WarnAbout { enum What {\n            Nothing = 0x00,\n            NoAssertions = 0x01,\n            NoTests = 0x02\n        }; };\n\n    struct ShowDurations { enum OrNot {\n            DefaultForReporter,\n            Always,\n            Never\n        }; };\n    struct RunTests { enum InWhatOrder {\n            InDeclarationOrder,\n            InLexicographicalOrder,\n            InRandomOrder\n        }; };\n    struct UseColour { enum YesOrNo {\n            Auto,\n            Yes,\n            No\n        }; };\n    struct WaitForKeypress { enum When {\n            Never,\n            BeforeStart = 1,\n            BeforeExit = 2,\n            BeforeStartAndExit = BeforeStart | BeforeExit\n        }; };\n\n    class TestSpec;\n\n    struct IConfig : NonCopyable {\n\n        virtual ~IConfig();\n\n        virtual bool allowThrows() const = 0;\n        virtual std::ostream& stream() const = 0;\n        virtual std::string name() const = 0;\n        virtual bool includeSuccessfulResults() const = 0;\n        virtual bool shouldDebugBreak() const = 0;\n        virtual bool warnAboutMissingAssertions() const = 0;\n        virtual bool warnAboutNoTests() const = 0;\n        virtual int abortAfter() const = 0;\n        virtual bool showInvisibles() const = 0;\n        virtual ShowDurations::OrNot showDurations() const = 0;\n        virtual double minDuration() const = 0;\n        virtual TestSpec const& testSpec() const = 0;\n        virtual bool hasTestFilters() const = 0;\n        virtual std::vector<std::string> const& getTestsOrTags() const = 0;\n        virtual RunTests::InWhatOrder runOrder() const = 0;\n        virtual unsigned int rngSeed() const = 0;\n        virtual UseColour::YesOrNo useColour() const = 0;\n        virtual std::vector<std::string> const& getSectionsToRun() const = 0;\n        virtual Verbosity verbosity() const = 0;\n\n        virtual bool benchmarkNoAnalysis() const = 0;\n        virtual int benchmarkSamples() const = 0;\n        virtual double benchmarkConfidenceInterval() const = 0;\n        virtual unsigned int benchmarkResamples() const = 0;\n        virtual std::chrono::milliseconds benchmarkWarmupTime() const = 0;\n    };\n\n    using IConfigPtr = std::shared_ptr<IConfig const>;\n}\n\n// end catch_interfaces_config.h\n// start catch_random_number_generator.h\n\n#include <cstdint>\n\nnamespace Catch {\n\n    // This is a simple implementation of C++11 Uniform Random Number\n    // Generator. It does not provide all operators, because Catch2\n    // does not use it, but it should behave as expected inside stdlib's\n    // distributions.\n    // The implementation is based on the PCG family (http://pcg-random.org)\n    class SimplePcg32 {\n        using state_type = std::uint64_t;\n    public:\n        using result_type = std::uint32_t;\n        static constexpr result_type (min)() {\n            return 0;\n        }\n        static constexpr result_type (max)() {\n            return static_cast<result_type>(-1);\n        }\n\n        // Provide some default initial state for the default constructor\n        SimplePcg32():SimplePcg32(0xed743cc4U) {}\n\n        explicit SimplePcg32(result_type seed_);\n\n        void seed(result_type seed_);\n        void discard(uint64_t skip);\n\n        result_type operator()();\n\n    private:\n        friend bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs);\n        friend bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs);\n\n        // In theory we also need operator<< and operator>>\n        // In practice we do not use them, so we will skip them for now\n\n        std::uint64_t m_state;\n        // This part of the state determines which \"stream\" of the numbers\n        // is chosen -- we take it as a constant for Catch2, so we only\n        // need to deal with seeding the main state.\n        // Picked by reading 8 bytes from `/dev/random` :-)\n        static const std::uint64_t s_inc = (0x13ed0cc53f939476ULL << 1ULL) | 1ULL;\n    };\n\n} // end namespace Catch\n\n// end catch_random_number_generator.h\n#include <random>\n\nnamespace Catch {\n    namespace Generators {\n\n        template <typename Float>\n        class RandomFloatingGenerator final : public IGenerator<Float> {\n            Catch::SimplePcg32& m_rng;\n            std::uniform_real_distribution<Float> m_dist;\n            Float m_current_number;\n        public:\n\n            RandomFloatingGenerator(Float a, Float b):\n                    m_rng(rng()),\n                    m_dist(a, b) {\n                static_cast<void>(next());\n            }\n\n            Float const& get() const override {\n                return m_current_number;\n            }\n            bool next() override {\n                m_current_number = m_dist(m_rng);\n                return true;\n            }\n        };\n\n        template <typename Integer>\n        class RandomIntegerGenerator final : public IGenerator<Integer> {\n            Catch::SimplePcg32& m_rng;\n            std::uniform_int_distribution<Integer> m_dist;\n            Integer m_current_number;\n        public:\n\n            RandomIntegerGenerator(Integer a, Integer b):\n                    m_rng(rng()),\n                    m_dist(a, b) {\n                static_cast<void>(next());\n            }\n\n            Integer const& get() const override {\n                return m_current_number;\n            }\n            bool next() override {\n                m_current_number = m_dist(m_rng);\n                return true;\n            }\n        };\n\n// TODO: Ideally this would be also constrained against the various char types,\n//       but I don't expect users to run into that in practice.\n        template <typename T>\n        typename std::enable_if<std::is_integral<T>::value && !std::is_same<T, bool>::value,\n                GeneratorWrapper<T>>::type\n        random(T a, T b) {\n            return GeneratorWrapper<T>(\n                    pf::make_unique<RandomIntegerGenerator<T>>(a, b)\n            );\n        }\n\n        template <typename T>\n        typename std::enable_if<std::is_floating_point<T>::value,\n                GeneratorWrapper<T>>::type\n        random(T a, T b) {\n            return GeneratorWrapper<T>(\n                    pf::make_unique<RandomFloatingGenerator<T>>(a, b)\n            );\n        }\n\n        template <typename T>\n        class RangeGenerator final : public IGenerator<T> {\n            T m_current;\n            T m_end;\n            T m_step;\n            bool m_positive;\n\n        public:\n            RangeGenerator(T const& start, T const& end, T const& step):\n                    m_current(start),\n                    m_end(end),\n                    m_step(step),\n                    m_positive(m_step > T(0))\n            {\n                assert(m_current != m_end && \"Range start and end cannot be equal\");\n                assert(m_step != T(0) && \"Step size cannot be zero\");\n                assert(((m_positive && m_current <= m_end) || (!m_positive && m_current >= m_end)) && \"Step moves away from end\");\n            }\n\n            RangeGenerator(T const& start, T const& end):\n                    RangeGenerator(start, end, (start < end) ? T(1) : T(-1))\n            {}\n\n            T const& get() const override {\n                return m_current;\n            }\n\n            bool next() override {\n                m_current += m_step;\n                return (m_positive) ? (m_current < m_end) : (m_current > m_end);\n            }\n        };\n\n        template <typename T>\n        GeneratorWrapper<T> range(T const& start, T const& end, T const& step) {\n            static_assert(std::is_arithmetic<T>::value && !std::is_same<T, bool>::value, \"Type must be numeric\");\n            return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end, step));\n        }\n\n        template <typename T>\n        GeneratorWrapper<T> range(T const& start, T const& end) {\n            static_assert(std::is_integral<T>::value && !std::is_same<T, bool>::value, \"Type must be an integer\");\n            return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end));\n        }\n\n        template <typename T>\n        class IteratorGenerator final : public IGenerator<T> {\n            static_assert(!std::is_same<T, bool>::value,\n                          \"IteratorGenerator currently does not support bools\"\n                          \"because of std::vector<bool> specialization\");\n\n            std::vector<T> m_elems;\n            size_t m_current = 0;\n        public:\n            template <typename InputIterator, typename InputSentinel>\n            IteratorGenerator(InputIterator first, InputSentinel last):m_elems(first, last) {\n                if (m_elems.empty()) {\n                    Catch::throw_exception(GeneratorException(\"IteratorGenerator received no valid values\"));\n                }\n            }\n\n            T const& get() const override {\n                return m_elems[m_current];\n            }\n\n            bool next() override {\n                ++m_current;\n                return m_current != m_elems.size();\n            }\n        };\n\n        template <typename InputIterator,\n                typename InputSentinel,\n                typename ResultType = typename std::iterator_traits<InputIterator>::value_type>\n        GeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to) {\n            return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(from, to));\n        }\n\n        template <typename Container,\n                typename ResultType = typename Container::value_type>\n        GeneratorWrapper<ResultType> from_range(Container const& cnt) {\n            return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(cnt.begin(), cnt.end()));\n        }\n\n    } // namespace Generators\n} // namespace Catch\n\n// end catch_generators_specific.hpp\n\n// These files are included here so the single_include script doesn't put them\n// in the conditionally compiled sections\n// start catch_test_case_info.h\n\n#include <string>\n#include <vector>\n#include <memory>\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wpadded\"\n#endif\n\nnamespace Catch {\n\n    struct ITestInvoker;\n\n    struct TestCaseInfo {\n        enum SpecialProperties{\n            None = 0,\n            IsHidden = 1 << 1,\n            ShouldFail = 1 << 2,\n            MayFail = 1 << 3,\n            Throws = 1 << 4,\n            NonPortable = 1 << 5,\n            Benchmark = 1 << 6\n        };\n\n        TestCaseInfo(   std::string const& _name,\n                        std::string const& _className,\n                        std::string const& _description,\n                        std::vector<std::string> const& _tags,\n                        SourceLineInfo const& _lineInfo );\n\n        friend void setTags( TestCaseInfo& testCaseInfo, std::vector<std::string> tags );\n\n        bool isHidden() const;\n        bool throws() const;\n        bool okToFail() const;\n        bool expectedToFail() const;\n\n        std::string tagsAsString() const;\n\n        std::string name;\n        std::string className;\n        std::string description;\n        std::vector<std::string> tags;\n        std::vector<std::string> lcaseTags;\n        SourceLineInfo lineInfo;\n        SpecialProperties properties;\n    };\n\n    class TestCase : public TestCaseInfo {\n    public:\n\n        TestCase( ITestInvoker* testCase, TestCaseInfo&& info );\n\n        TestCase withName( std::string const& _newName ) const;\n\n        void invoke() const;\n\n        TestCaseInfo const& getTestCaseInfo() const;\n\n        bool operator == ( TestCase const& other ) const;\n        bool operator < ( TestCase const& other ) const;\n\n    private:\n        std::shared_ptr<ITestInvoker> test;\n    };\n\n    TestCase makeTestCase(  ITestInvoker* testCase,\n                            std::string const& className,\n                            NameAndTags const& nameAndTags,\n                            SourceLineInfo const& lineInfo );\n}\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_test_case_info.h\n// start catch_interfaces_runner.h\n\nnamespace Catch {\n\n    struct IRunner {\n        virtual ~IRunner();\n        virtual bool aborting() const = 0;\n    };\n}\n\n// end catch_interfaces_runner.h\n\n#ifdef __OBJC__\n// start catch_objc.hpp\n\n#import <objc/runtime.h>\n\n#include <string>\n\n// NB. Any general catch headers included here must be included\n// in catch.hpp first to make sure they are included by the single\n// header for non obj-usage\n\n///////////////////////////////////////////////////////////////////////////////\n// This protocol is really only here for (self) documenting purposes, since\n// all its methods are optional.\n@protocol OcFixture\n\n@optional\n\n-(void) setUp;\n-(void) tearDown;\n\n@end\n\nnamespace Catch {\n\n    class OcMethod : public ITestInvoker {\n\n    public:\n        OcMethod( Class cls, SEL sel ) : m_cls( cls ), m_sel( sel ) {}\n\n        virtual void invoke() const {\n            id obj = [[m_cls alloc] init];\n\n            performOptionalSelector( obj, @selector(setUp)  );\n            performOptionalSelector( obj, m_sel );\n            performOptionalSelector( obj, @selector(tearDown)  );\n\n            arcSafeRelease( obj );\n        }\n    private:\n        virtual ~OcMethod() {}\n\n        Class m_cls;\n        SEL m_sel;\n    };\n\n    namespace Detail{\n\n        inline std::string getAnnotation(   Class cls,\n                                            std::string const& annotationName,\n                                            std::string const& testCaseName ) {\n            NSString* selStr = [[NSString alloc] initWithFormat:@\"Catch_%s_%s\", annotationName.c_str(), testCaseName.c_str()];\n            SEL sel = NSSelectorFromString( selStr );\n            arcSafeRelease( selStr );\n            id value = performOptionalSelector( cls, sel );\n            if( value )\n                return [(NSString*)value UTF8String];\n            return \"\";\n        }\n    }\n\n    inline std::size_t registerTestMethods() {\n        std::size_t noTestMethods = 0;\n        int noClasses = objc_getClassList( nullptr, 0 );\n\n        Class* classes = (CATCH_UNSAFE_UNRETAINED Class *)malloc( sizeof(Class) * noClasses);\n        objc_getClassList( classes, noClasses );\n\n        for( int c = 0; c < noClasses; c++ ) {\n            Class cls = classes[c];\n            {\n                u_int count;\n                Method* methods = class_copyMethodList( cls, &count );\n                for( u_int m = 0; m < count ; m++ ) {\n                    SEL selector = method_getName(methods[m]);\n                    std::string methodName = sel_getName(selector);\n                    if( startsWith( methodName, \"Catch_TestCase_\" ) ) {\n                        std::string testCaseName = methodName.substr( 15 );\n                        std::string name = Detail::getAnnotation( cls, \"Name\", testCaseName );\n                        std::string desc = Detail::getAnnotation( cls, \"Description\", testCaseName );\n                        const char* className = class_getName( cls );\n\n                        getMutableRegistryHub().registerTest( makeTestCase( new OcMethod( cls, selector ), className, NameAndTags( name.c_str(), desc.c_str() ), SourceLineInfo(\"\",0) ) );\n                        noTestMethods++;\n                    }\n                }\n                free(methods);\n            }\n        }\n        return noTestMethods;\n    }\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n\n    namespace Matchers {\n        namespace Impl {\n        namespace NSStringMatchers {\n\n            struct StringHolder : MatcherBase<NSString*>{\n                StringHolder( NSString* substr ) : m_substr( [substr copy] ){}\n                StringHolder( StringHolder const& other ) : m_substr( [other.m_substr copy] ){}\n                StringHolder() {\n                    arcSafeRelease( m_substr );\n                }\n\n                bool match( NSString* str ) const override {\n                    return false;\n                }\n\n                NSString* CATCH_ARC_STRONG m_substr;\n            };\n\n            struct Equals : StringHolder {\n                Equals( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str isEqualToString:m_substr];\n                }\n\n                std::string describe() const override {\n                    return \"equals string: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n\n            struct Contains : StringHolder {\n                Contains( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str rangeOfString:m_substr].location != NSNotFound;\n                }\n\n                std::string describe() const override {\n                    return \"contains string: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n\n            struct StartsWith : StringHolder {\n                StartsWith( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str rangeOfString:m_substr].location == 0;\n                }\n\n                std::string describe() const override {\n                    return \"starts with: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n            struct EndsWith : StringHolder {\n                EndsWith( NSString* substr ) : StringHolder( substr ){}\n\n                bool match( NSString* str ) const override {\n                    return  (str != nil || m_substr == nil ) &&\n                            [str rangeOfString:m_substr].location == [str length] - [m_substr length];\n                }\n\n                std::string describe() const override {\n                    return \"ends with: \" + Catch::Detail::stringify( m_substr );\n                }\n            };\n\n        } // namespace NSStringMatchers\n        } // namespace Impl\n\n        inline Impl::NSStringMatchers::Equals\n            Equals( NSString* substr ){ return Impl::NSStringMatchers::Equals( substr ); }\n\n        inline Impl::NSStringMatchers::Contains\n            Contains( NSString* substr ){ return Impl::NSStringMatchers::Contains( substr ); }\n\n        inline Impl::NSStringMatchers::StartsWith\n            StartsWith( NSString* substr ){ return Impl::NSStringMatchers::StartsWith( substr ); }\n\n        inline Impl::NSStringMatchers::EndsWith\n            EndsWith( NSString* substr ){ return Impl::NSStringMatchers::EndsWith( substr ); }\n\n    } // namespace Matchers\n\n    using namespace Matchers;\n\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n} // namespace Catch\n\n///////////////////////////////////////////////////////////////////////////////\n#define OC_MAKE_UNIQUE_NAME( root, uniqueSuffix ) root##uniqueSuffix\n#define OC_TEST_CASE2( name, desc, uniqueSuffix ) \\\n+(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Name_test_, uniqueSuffix ) \\\n{ \\\nreturn @ name; \\\n} \\\n+(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Description_test_, uniqueSuffix ) \\\n{ \\\nreturn @ desc; \\\n} \\\n-(void) OC_MAKE_UNIQUE_NAME( Catch_TestCase_test_, uniqueSuffix )\n\n#define OC_TEST_CASE( name, desc ) OC_TEST_CASE2( name, desc, __LINE__ )\n\n// end catch_objc.hpp\n#endif\n\n// Benchmarking needs the externally-facing parts of reporters to work\n#if defined(CATCH_CONFIG_EXTERNAL_INTERFACES) || defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n// start catch_external_interfaces.h\n\n// start catch_reporter_bases.hpp\n\n// start catch_interfaces_reporter.h\n\n// start catch_config.hpp\n\n// start catch_test_spec_parser.h\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wpadded\"\n#endif\n\n// start catch_test_spec.h\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wpadded\"\n#endif\n\n// start catch_wildcard_pattern.h\n\nnamespace Catch\n{\n    class WildcardPattern {\n        enum WildcardPosition {\n            NoWildcard = 0,\n            WildcardAtStart = 1,\n            WildcardAtEnd = 2,\n            WildcardAtBothEnds = WildcardAtStart | WildcardAtEnd\n        };\n\n    public:\n\n        WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity );\n        virtual ~WildcardPattern() = default;\n        virtual bool matches( std::string const& str ) const;\n\n    private:\n        std::string normaliseString( std::string const& str ) const;\n        CaseSensitive::Choice m_caseSensitivity;\n        WildcardPosition m_wildcard = NoWildcard;\n        std::string m_pattern;\n    };\n}\n\n// end catch_wildcard_pattern.h\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    struct IConfig;\n\n    class TestSpec {\n        class Pattern {\n        public:\n            explicit Pattern( std::string const& name );\n            virtual ~Pattern();\n            virtual bool matches( TestCaseInfo const& testCase ) const = 0;\n            std::string const& name() const;\n        private:\n            std::string const m_name;\n        };\n        using PatternPtr = std::shared_ptr<Pattern>;\n\n        class NamePattern : public Pattern {\n        public:\n            explicit NamePattern( std::string const& name, std::string const& filterString );\n            bool matches( TestCaseInfo const& testCase ) const override;\n        private:\n            WildcardPattern m_wildcardPattern;\n        };\n\n        class TagPattern : public Pattern {\n        public:\n            explicit TagPattern( std::string const& tag, std::string const& filterString );\n            bool matches( TestCaseInfo const& testCase ) const override;\n        private:\n            std::string m_tag;\n        };\n\n        class ExcludedPattern : public Pattern {\n        public:\n            explicit ExcludedPattern( PatternPtr const& underlyingPattern );\n            bool matches( TestCaseInfo const& testCase ) const override;\n        private:\n            PatternPtr m_underlyingPattern;\n        };\n\n        struct Filter {\n            std::vector<PatternPtr> m_patterns;\n\n            bool matches( TestCaseInfo const& testCase ) const;\n            std::string name() const;\n        };\n\n    public:\n        struct FilterMatch {\n            std::string name;\n            std::vector<TestCase const*> tests;\n        };\n        using Matches = std::vector<FilterMatch>;\n        using vectorStrings = std::vector<std::string>;\n\n        bool hasFilters() const;\n        bool matches( TestCaseInfo const& testCase ) const;\n        Matches matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const;\n        const vectorStrings & getInvalidArgs() const;\n\n    private:\n        std::vector<Filter> m_filters;\n        std::vector<std::string> m_invalidArgs;\n        friend class TestSpecParser;\n    };\n}\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_test_spec.h\n// start catch_interfaces_tag_alias_registry.h\n\n#include <string>\n\nnamespace Catch {\n\n    struct TagAlias;\n\n    struct ITagAliasRegistry {\n        virtual ~ITagAliasRegistry();\n        // Nullptr if not present\n        virtual TagAlias const* find( std::string const& alias ) const = 0;\n        virtual std::string expandAliases( std::string const& unexpandedTestSpec ) const = 0;\n\n        static ITagAliasRegistry const& get();\n    };\n\n} // end namespace Catch\n\n// end catch_interfaces_tag_alias_registry.h\nnamespace Catch {\n\n    class TestSpecParser {\n        enum Mode{ None, Name, QuotedName, Tag, EscapedName };\n        Mode m_mode = None;\n        Mode lastMode = None;\n        bool m_exclusion = false;\n        std::size_t m_pos = 0;\n        std::size_t m_realPatternPos = 0;\n        std::string m_arg;\n        std::string m_substring;\n        std::string m_patternName;\n        std::vector<std::size_t> m_escapeChars;\n        TestSpec::Filter m_currentFilter;\n        TestSpec m_testSpec;\n        ITagAliasRegistry const* m_tagAliases = nullptr;\n\n    public:\n        TestSpecParser( ITagAliasRegistry const& tagAliases );\n\n        TestSpecParser& parse( std::string const& arg );\n        TestSpec testSpec();\n\n    private:\n        bool visitChar( char c );\n        void startNewMode( Mode mode );\n        bool processNoneChar( char c );\n        void processNameChar( char c );\n        bool processOtherChar( char c );\n        void endMode();\n        void escape();\n        bool isControlChar( char c ) const;\n        void saveLastMode();\n        void revertBackToLastMode();\n        void addFilter();\n        bool separate();\n\n        // Handles common preprocessing of the pattern for name/tag patterns\n        std::string preprocessPattern();\n        // Adds the current pattern as a test name\n        void addNamePattern();\n        // Adds the current pattern as a tag\n        void addTagPattern();\n\n        inline void addCharToPattern(char c) {\n            m_substring += c;\n            m_patternName += c;\n            m_realPatternPos++;\n        }\n\n    };\n    TestSpec parseTestSpec( std::string const& arg );\n\n} // namespace Catch\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_test_spec_parser.h\n// Libstdc++ doesn't like incomplete classes for unique_ptr\n\n#include <memory>\n#include <vector>\n#include <string>\n\n#ifndef CATCH_CONFIG_CONSOLE_WIDTH\n#define CATCH_CONFIG_CONSOLE_WIDTH 80\n#endif\n\nnamespace Catch {\n\n    struct IStream;\n\n    struct ConfigData {\n        bool listTests = false;\n        bool listTags = false;\n        bool listReporters = false;\n        bool listTestNamesOnly = false;\n\n        bool showSuccessfulTests = false;\n        bool shouldDebugBreak = false;\n        bool noThrow = false;\n        bool showHelp = false;\n        bool showInvisibles = false;\n        bool filenamesAsTags = false;\n        bool libIdentify = false;\n\n        int abortAfter = -1;\n        unsigned int rngSeed = 0;\n\n        bool benchmarkNoAnalysis = false;\n        unsigned int benchmarkSamples = 100;\n        double benchmarkConfidenceInterval = 0.95;\n        unsigned int benchmarkResamples = 100000;\n        std::chrono::milliseconds::rep benchmarkWarmupTime = 100;\n\n        Verbosity verbosity = Verbosity::Normal;\n        WarnAbout::What warnings = WarnAbout::Nothing;\n        ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter;\n        double minDuration = -1;\n        RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder;\n        UseColour::YesOrNo useColour = UseColour::Auto;\n        WaitForKeypress::When waitForKeypress = WaitForKeypress::Never;\n\n        std::string outputFilename;\n        std::string name;\n        std::string processName;\n#ifndef CATCH_CONFIG_DEFAULT_REPORTER\n#define CATCH_CONFIG_DEFAULT_REPORTER \"console\"\n#endif\n        std::string reporterName = CATCH_CONFIG_DEFAULT_REPORTER;\n#undef CATCH_CONFIG_DEFAULT_REPORTER\n\n        std::vector<std::string> testsOrTags;\n        std::vector<std::string> sectionsToRun;\n    };\n\n    class Config : public IConfig {\n    public:\n\n        Config() = default;\n        Config( ConfigData const& data );\n        virtual ~Config() = default;\n\n        std::string const& getFilename() const;\n\n        bool listTests() const;\n        bool listTestNamesOnly() const;\n        bool listTags() const;\n        bool listReporters() const;\n\n        std::string getProcessName() const;\n        std::string const& getReporterName() const;\n\n        std::vector<std::string> const& getTestsOrTags() const override;\n        std::vector<std::string> const& getSectionsToRun() const override;\n\n        TestSpec const& testSpec() const override;\n        bool hasTestFilters() const override;\n\n        bool showHelp() const;\n\n        // IConfig interface\n        bool allowThrows() const override;\n        std::ostream& stream() const override;\n        std::string name() const override;\n        bool includeSuccessfulResults() const override;\n        bool warnAboutMissingAssertions() const override;\n        bool warnAboutNoTests() const override;\n        ShowDurations::OrNot showDurations() const override;\n        double minDuration() const override;\n        RunTests::InWhatOrder runOrder() const override;\n        unsigned int rngSeed() const override;\n        UseColour::YesOrNo useColour() const override;\n        bool shouldDebugBreak() const override;\n        int abortAfter() const override;\n        bool showInvisibles() const override;\n        Verbosity verbosity() const override;\n        bool benchmarkNoAnalysis() const override;\n        int benchmarkSamples() const override;\n        double benchmarkConfidenceInterval() const override;\n        unsigned int benchmarkResamples() const override;\n        std::chrono::milliseconds benchmarkWarmupTime() const override;\n\n    private:\n\n        IStream const* openStream();\n        ConfigData m_data;\n\n        std::unique_ptr<IStream const> m_stream;\n        TestSpec m_testSpec;\n        bool m_hasTestFilters = false;\n    };\n\n} // end namespace Catch\n\n// end catch_config.hpp\n// start catch_assertionresult.h\n\n#include <string>\n\nnamespace Catch {\n\n    struct AssertionResultData\n    {\n        AssertionResultData() = delete;\n\n        AssertionResultData( ResultWas::OfType _resultType, LazyExpression const& _lazyExpression );\n\n        std::string message;\n        mutable std::string reconstructedExpression;\n        LazyExpression lazyExpression;\n        ResultWas::OfType resultType;\n\n        std::string reconstructExpression() const;\n    };\n\n    class AssertionResult {\n    public:\n        AssertionResult() = delete;\n        AssertionResult( AssertionInfo const& info, AssertionResultData const& data );\n\n        bool isOk() const;\n        bool succeeded() const;\n        ResultWas::OfType getResultType() const;\n        bool hasExpression() const;\n        bool hasMessage() const;\n        std::string getExpression() const;\n        std::string getExpressionInMacro() const;\n        bool hasExpandedExpression() const;\n        std::string getExpandedExpression() const;\n        std::string getMessage() const;\n        SourceLineInfo getSourceInfo() const;\n        StringRef getTestMacroName() const;\n\n        //protected:\n        AssertionInfo m_info;\n        AssertionResultData m_resultData;\n    };\n\n} // end namespace Catch\n\n// end catch_assertionresult.h\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n// start catch_estimate.hpp\n\n // Statistics estimates\n\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct Estimate {\n            Duration point;\n            Duration lower_bound;\n            Duration upper_bound;\n            double confidence_interval;\n\n            template <typename Duration2>\n            operator Estimate<Duration2>() const {\n                return { point, lower_bound, upper_bound, confidence_interval };\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_estimate.hpp\n// start catch_outlier_classification.hpp\n\n// Outlier information\n\nnamespace Catch {\n    namespace Benchmark {\n        struct OutlierClassification {\n            int samples_seen = 0;\n            int low_severe = 0;     // more than 3 times IQR below Q1\n            int low_mild = 0;       // 1.5 to 3 times IQR below Q1\n            int high_mild = 0;      // 1.5 to 3 times IQR above Q3\n            int high_severe = 0;    // more than 3 times IQR above Q3\n\n            int total() const {\n                return low_severe + low_mild + high_mild + high_severe;\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_outlier_classification.hpp\n\n#include <iterator>\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n#include <string>\n#include <iosfwd>\n#include <map>\n#include <set>\n#include <memory>\n#include <algorithm>\n\nnamespace Catch {\n\n    struct ReporterConfig {\n        explicit ReporterConfig( IConfigPtr const& _fullConfig );\n\n        ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream );\n\n        std::ostream& stream() const;\n        IConfigPtr fullConfig() const;\n\n    private:\n        std::ostream* m_stream;\n        IConfigPtr m_fullConfig;\n    };\n\n    struct ReporterPreferences {\n        bool shouldRedirectStdOut = false;\n        bool shouldReportAllAssertions = false;\n    };\n\n    template<typename T>\n    struct LazyStat : Option<T> {\n        LazyStat& operator=( T const& _value ) {\n            Option<T>::operator=( _value );\n            used = false;\n            return *this;\n        }\n        void reset() {\n            Option<T>::reset();\n            used = false;\n        }\n        bool used = false;\n    };\n\n    struct TestRunInfo {\n        TestRunInfo( std::string const& _name );\n        std::string name;\n    };\n    struct GroupInfo {\n        GroupInfo(  std::string const& _name,\n                    std::size_t _groupIndex,\n                    std::size_t _groupsCount );\n\n        std::string name;\n        std::size_t groupIndex;\n        std::size_t groupsCounts;\n    };\n\n    struct AssertionStats {\n        AssertionStats( AssertionResult const& _assertionResult,\n                        std::vector<MessageInfo> const& _infoMessages,\n                        Totals const& _totals );\n\n        AssertionStats( AssertionStats const& )              = default;\n        AssertionStats( AssertionStats && )                  = default;\n        AssertionStats& operator = ( AssertionStats const& ) = delete;\n        AssertionStats& operator = ( AssertionStats && )     = delete;\n        virtual ~AssertionStats();\n\n        AssertionResult assertionResult;\n        std::vector<MessageInfo> infoMessages;\n        Totals totals;\n    };\n\n    struct SectionStats {\n        SectionStats(   SectionInfo const& _sectionInfo,\n                        Counts const& _assertions,\n                        double _durationInSeconds,\n                        bool _missingAssertions );\n        SectionStats( SectionStats const& )              = default;\n        SectionStats( SectionStats && )                  = default;\n        SectionStats& operator = ( SectionStats const& ) = default;\n        SectionStats& operator = ( SectionStats && )     = default;\n        virtual ~SectionStats();\n\n        SectionInfo sectionInfo;\n        Counts assertions;\n        double durationInSeconds;\n        bool missingAssertions;\n    };\n\n    struct TestCaseStats {\n        TestCaseStats(  TestCaseInfo const& _testInfo,\n                        Totals const& _totals,\n                        std::string const& _stdOut,\n                        std::string const& _stdErr,\n                        bool _aborting );\n\n        TestCaseStats( TestCaseStats const& )              = default;\n        TestCaseStats( TestCaseStats && )                  = default;\n        TestCaseStats& operator = ( TestCaseStats const& ) = default;\n        TestCaseStats& operator = ( TestCaseStats && )     = default;\n        virtual ~TestCaseStats();\n\n        TestCaseInfo testInfo;\n        Totals totals;\n        std::string stdOut;\n        std::string stdErr;\n        bool aborting;\n    };\n\n    struct TestGroupStats {\n        TestGroupStats( GroupInfo const& _groupInfo,\n                        Totals const& _totals,\n                        bool _aborting );\n        TestGroupStats( GroupInfo const& _groupInfo );\n\n        TestGroupStats( TestGroupStats const& )              = default;\n        TestGroupStats( TestGroupStats && )                  = default;\n        TestGroupStats& operator = ( TestGroupStats const& ) = default;\n        TestGroupStats& operator = ( TestGroupStats && )     = default;\n        virtual ~TestGroupStats();\n\n        GroupInfo groupInfo;\n        Totals totals;\n        bool aborting;\n    };\n\n    struct TestRunStats {\n        TestRunStats(   TestRunInfo const& _runInfo,\n                        Totals const& _totals,\n                        bool _aborting );\n\n        TestRunStats( TestRunStats const& )              = default;\n        TestRunStats( TestRunStats && )                  = default;\n        TestRunStats& operator = ( TestRunStats const& ) = default;\n        TestRunStats& operator = ( TestRunStats && )     = default;\n        virtual ~TestRunStats();\n\n        TestRunInfo runInfo;\n        Totals totals;\n        bool aborting;\n    };\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    struct BenchmarkInfo {\n        std::string name;\n        double estimatedDuration;\n        int iterations;\n        int samples;\n        unsigned int resamples;\n        double clockResolution;\n        double clockCost;\n    };\n\n    template <class Duration>\n    struct BenchmarkStats {\n        BenchmarkInfo info;\n\n        std::vector<Duration> samples;\n        Benchmark::Estimate<Duration> mean;\n        Benchmark::Estimate<Duration> standardDeviation;\n        Benchmark::OutlierClassification outliers;\n        double outlierVariance;\n\n        template <typename Duration2>\n        operator BenchmarkStats<Duration2>() const {\n            std::vector<Duration2> samples2;\n            samples2.reserve(samples.size());\n            std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });\n            return {\n                info,\n                std::move(samples2),\n                mean,\n                standardDeviation,\n                outliers,\n                outlierVariance,\n            };\n        }\n    };\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    struct IStreamingReporter {\n        virtual ~IStreamingReporter() = default;\n\n        // Implementing class must also provide the following static methods:\n        // static std::string getDescription();\n        // static std::set<Verbosity> getSupportedVerbosities()\n\n        virtual ReporterPreferences getPreferences() const = 0;\n\n        virtual void noMatchingTestCases( std::string const& spec ) = 0;\n\n        virtual void reportInvalidArguments(std::string const&) {}\n\n        virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0;\n        virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0;\n\n        virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0;\n        virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        virtual void benchmarkPreparing( std::string const& ) {}\n        virtual void benchmarkStarting( BenchmarkInfo const& ) {}\n        virtual void benchmarkEnded( BenchmarkStats<> const& ) {}\n        virtual void benchmarkFailed( std::string const& ) {}\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0;\n\n        // The return value indicates if the messages buffer should be cleared:\n        virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0;\n\n        virtual void sectionEnded( SectionStats const& sectionStats ) = 0;\n        virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0;\n        virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0;\n        virtual void testRunEnded( TestRunStats const& testRunStats ) = 0;\n\n        virtual void skipTest( TestCaseInfo const& testInfo ) = 0;\n\n        // Default empty implementation provided\n        virtual void fatalErrorEncountered( StringRef name );\n\n        virtual bool isMulti() const;\n    };\n    using IStreamingReporterPtr = std::unique_ptr<IStreamingReporter>;\n\n    struct IReporterFactory {\n        virtual ~IReporterFactory();\n        virtual IStreamingReporterPtr create( ReporterConfig const& config ) const = 0;\n        virtual std::string getDescription() const = 0;\n    };\n    using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;\n\n    struct IReporterRegistry {\n        using FactoryMap = std::map<std::string, IReporterFactoryPtr>;\n        using Listeners = std::vector<IReporterFactoryPtr>;\n\n        virtual ~IReporterRegistry();\n        virtual IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const = 0;\n        virtual FactoryMap const& getFactories() const = 0;\n        virtual Listeners const& getListeners() const = 0;\n    };\n\n} // end namespace Catch\n\n// end catch_interfaces_reporter.h\n#include <algorithm>\n#include <cstring>\n#include <cfloat>\n#include <cstdio>\n#include <cassert>\n#include <memory>\n#include <ostream>\n\nnamespace Catch {\n    void prepareExpandedExpression(AssertionResult& result);\n\n    // Returns double formatted as %.3f (format expected on output)\n    std::string getFormattedDuration( double duration );\n\n    //! Should the reporter show\n    bool shouldShowDuration( IConfig const& config, double duration );\n\n    std::string serializeFilters( std::vector<std::string> const& container );\n\n    template<typename DerivedT>\n    struct StreamingReporterBase : IStreamingReporter {\n\n        StreamingReporterBase( ReporterConfig const& _config )\n                :   m_config( _config.fullConfig() ),\n                    stream( _config.stream() )\n        {\n            m_reporterPrefs.shouldRedirectStdOut = false;\n            if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )\n                CATCH_ERROR( \"Verbosity level not supported by this reporter\" );\n        }\n\n        ReporterPreferences getPreferences() const override {\n            return m_reporterPrefs;\n        }\n\n        static std::set<Verbosity> getSupportedVerbosities() {\n            return { Verbosity::Normal };\n        }\n\n        ~StreamingReporterBase() override = default;\n\n        void noMatchingTestCases(std::string const&) override {}\n\n        void reportInvalidArguments(std::string const&) override {}\n\n        void testRunStarting(TestRunInfo const& _testRunInfo) override {\n            currentTestRunInfo = _testRunInfo;\n        }\n\n        void testGroupStarting(GroupInfo const& _groupInfo) override {\n            currentGroupInfo = _groupInfo;\n        }\n\n        void testCaseStarting(TestCaseInfo const& _testInfo) override  {\n            currentTestCaseInfo = _testInfo;\n        }\n        void sectionStarting(SectionInfo const& _sectionInfo) override {\n            m_sectionStack.push_back(_sectionInfo);\n        }\n\n        void sectionEnded(SectionStats const& /* _sectionStats */) override {\n            m_sectionStack.pop_back();\n        }\n        void testCaseEnded(TestCaseStats const& /* _testCaseStats */) override {\n            currentTestCaseInfo.reset();\n        }\n        void testGroupEnded(TestGroupStats const& /* _testGroupStats */) override {\n            currentGroupInfo.reset();\n        }\n        void testRunEnded(TestRunStats const& /* _testRunStats */) override {\n            currentTestCaseInfo.reset();\n            currentGroupInfo.reset();\n            currentTestRunInfo.reset();\n        }\n\n        void skipTest(TestCaseInfo const&) override {\n            // Don't do anything with this by default.\n            // It can optionally be overridden in the derived class.\n        }\n\n        IConfigPtr m_config;\n        std::ostream& stream;\n\n        LazyStat<TestRunInfo> currentTestRunInfo;\n        LazyStat<GroupInfo> currentGroupInfo;\n        LazyStat<TestCaseInfo> currentTestCaseInfo;\n\n        std::vector<SectionInfo> m_sectionStack;\n        ReporterPreferences m_reporterPrefs;\n    };\n\n    template<typename DerivedT>\n    struct CumulativeReporterBase : IStreamingReporter {\n        template<typename T, typename ChildNodeT>\n        struct Node {\n            explicit Node( T const& _value ) : value( _value ) {}\n            virtual ~Node() {}\n\n            using ChildNodes = std::vector<std::shared_ptr<ChildNodeT>>;\n            T value;\n            ChildNodes children;\n        };\n        struct SectionNode {\n            explicit SectionNode(SectionStats const& _stats) : stats(_stats) {}\n            virtual ~SectionNode() = default;\n\n            bool operator == (SectionNode const& other) const {\n                return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo;\n            }\n            bool operator == (std::shared_ptr<SectionNode> const& other) const {\n                return operator==(*other);\n            }\n\n            SectionStats stats;\n            using ChildSections = std::vector<std::shared_ptr<SectionNode>>;\n            using Assertions = std::vector<AssertionStats>;\n            ChildSections childSections;\n            Assertions assertions;\n            std::string stdOut;\n            std::string stdErr;\n        };\n\n        struct BySectionInfo {\n            BySectionInfo( SectionInfo const& other ) : m_other( other ) {}\n            BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {}\n            bool operator() (std::shared_ptr<SectionNode> const& node) const {\n                return ((node->stats.sectionInfo.name == m_other.name) &&\n                        (node->stats.sectionInfo.lineInfo == m_other.lineInfo));\n            }\n            void operator=(BySectionInfo const&) = delete;\n\n        private:\n            SectionInfo const& m_other;\n        };\n\n        using TestCaseNode = Node<TestCaseStats, SectionNode>;\n        using TestGroupNode = Node<TestGroupStats, TestCaseNode>;\n        using TestRunNode = Node<TestRunStats, TestGroupNode>;\n\n        CumulativeReporterBase( ReporterConfig const& _config )\n                :   m_config( _config.fullConfig() ),\n                    stream( _config.stream() )\n        {\n            m_reporterPrefs.shouldRedirectStdOut = false;\n            if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) )\n                CATCH_ERROR( \"Verbosity level not supported by this reporter\" );\n        }\n        ~CumulativeReporterBase() override = default;\n\n        ReporterPreferences getPreferences() const override {\n            return m_reporterPrefs;\n        }\n\n        static std::set<Verbosity> getSupportedVerbosities() {\n            return { Verbosity::Normal };\n        }\n\n        void testRunStarting( TestRunInfo const& ) override {}\n        void testGroupStarting( GroupInfo const& ) override {}\n\n        void testCaseStarting( TestCaseInfo const& ) override {}\n\n        void sectionStarting( SectionInfo const& sectionInfo ) override {\n            SectionStats incompleteStats( sectionInfo, Counts(), 0, false );\n            std::shared_ptr<SectionNode> node;\n            if( m_sectionStack.empty() ) {\n                if( !m_rootSection )\n                    m_rootSection = std::make_shared<SectionNode>( incompleteStats );\n                node = m_rootSection;\n            }\n            else {\n                SectionNode& parentNode = *m_sectionStack.back();\n                auto it =\n                        std::find_if(   parentNode.childSections.begin(),\n                                        parentNode.childSections.end(),\n                                        BySectionInfo( sectionInfo ) );\n                if( it == parentNode.childSections.end() ) {\n                    node = std::make_shared<SectionNode>( incompleteStats );\n                    parentNode.childSections.push_back( node );\n                }\n                else\n                    node = *it;\n            }\n            m_sectionStack.push_back( node );\n            m_deepestSection = std::move(node);\n        }\n\n        void assertionStarting(AssertionInfo const&) override {}\n\n        bool assertionEnded(AssertionStats const& assertionStats) override {\n            assert(!m_sectionStack.empty());\n            // AssertionResult holds a pointer to a temporary DecomposedExpression,\n            // which getExpandedExpression() calls to build the expression string.\n            // Our section stack copy of the assertionResult will likely outlive the\n            // temporary, so it must be expanded or discarded now to avoid calling\n            // a destroyed object later.\n            prepareExpandedExpression(const_cast<AssertionResult&>( assertionStats.assertionResult ) );\n            SectionNode& sectionNode = *m_sectionStack.back();\n            sectionNode.assertions.push_back(assertionStats);\n            return true;\n        }\n        void sectionEnded(SectionStats const& sectionStats) override {\n            assert(!m_sectionStack.empty());\n            SectionNode& node = *m_sectionStack.back();\n            node.stats = sectionStats;\n            m_sectionStack.pop_back();\n        }\n        void testCaseEnded(TestCaseStats const& testCaseStats) override {\n            auto node = std::make_shared<TestCaseNode>(testCaseStats);\n            assert(m_sectionStack.size() == 0);\n            node->children.push_back(m_rootSection);\n            m_testCases.push_back(node);\n            m_rootSection.reset();\n\n            assert(m_deepestSection);\n            m_deepestSection->stdOut = testCaseStats.stdOut;\n            m_deepestSection->stdErr = testCaseStats.stdErr;\n        }\n        void testGroupEnded(TestGroupStats const& testGroupStats) override {\n            auto node = std::make_shared<TestGroupNode>(testGroupStats);\n            node->children.swap(m_testCases);\n            m_testGroups.push_back(node);\n        }\n        void testRunEnded(TestRunStats const& testRunStats) override {\n            auto node = std::make_shared<TestRunNode>(testRunStats);\n            node->children.swap(m_testGroups);\n            m_testRuns.push_back(node);\n            testRunEndedCumulative();\n        }\n        virtual void testRunEndedCumulative() = 0;\n\n        void skipTest(TestCaseInfo const&) override {}\n\n        IConfigPtr m_config;\n        std::ostream& stream;\n        std::vector<AssertionStats> m_assertions;\n        std::vector<std::vector<std::shared_ptr<SectionNode>>> m_sections;\n        std::vector<std::shared_ptr<TestCaseNode>> m_testCases;\n        std::vector<std::shared_ptr<TestGroupNode>> m_testGroups;\n\n        std::vector<std::shared_ptr<TestRunNode>> m_testRuns;\n\n        std::shared_ptr<SectionNode> m_rootSection;\n        std::shared_ptr<SectionNode> m_deepestSection;\n        std::vector<std::shared_ptr<SectionNode>> m_sectionStack;\n        ReporterPreferences m_reporterPrefs;\n    };\n\n    template<char C>\n    char const* getLineOfChars() {\n        static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};\n        if( !*line ) {\n            std::memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 );\n            line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0;\n        }\n        return line;\n    }\n\n    struct TestEventListenerBase : StreamingReporterBase<TestEventListenerBase> {\n        TestEventListenerBase( ReporterConfig const& _config );\n\n        static std::set<Verbosity> getSupportedVerbosities();\n\n        void assertionStarting(AssertionInfo const&) override;\n        bool assertionEnded(AssertionStats const&) override;\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_bases.hpp\n// start catch_console_colour.h\n\nnamespace Catch {\n\n    struct Colour {\n        enum Code {\n            None = 0,\n\n            White,\n            Red,\n            Green,\n            Blue,\n            Cyan,\n            Yellow,\n            Grey,\n\n            Bright = 0x10,\n\n            BrightRed = Bright | Red,\n            BrightGreen = Bright | Green,\n            LightGrey = Bright | Grey,\n            BrightWhite = Bright | White,\n            BrightYellow = Bright | Yellow,\n\n            // By intention\n            FileName = LightGrey,\n            Warning = BrightYellow,\n            ResultError = BrightRed,\n            ResultSuccess = BrightGreen,\n            ResultExpectedFailure = Warning,\n\n            Error = BrightRed,\n            Success = Green,\n\n            OriginalExpression = Cyan,\n            ReconstructedExpression = BrightYellow,\n\n            SecondaryText = LightGrey,\n            Headers = White\n        };\n\n        // Use constructed object for RAII guard\n        Colour( Code _colourCode );\n        Colour( Colour&& other ) noexcept;\n        Colour& operator=( Colour&& other ) noexcept;\n        ~Colour();\n\n        // Use static method for one-shot changes\n        static void use( Code _colourCode );\n\n    private:\n        bool m_moved = false;\n    };\n\n    std::ostream& operator << ( std::ostream& os, Colour const& );\n\n} // end namespace Catch\n\n// end catch_console_colour.h\n// start catch_reporter_registrars.hpp\n\n\nnamespace Catch {\n\n    template<typename T>\n    class ReporterRegistrar {\n\n        class ReporterFactory : public IReporterFactory {\n\n            IStreamingReporterPtr create( ReporterConfig const& config ) const override {\n                return std::unique_ptr<T>( new T( config ) );\n            }\n\n            std::string getDescription() const override {\n                return T::getDescription();\n            }\n        };\n\n    public:\n\n        explicit ReporterRegistrar( std::string const& name ) {\n            getMutableRegistryHub().registerReporter( name, std::make_shared<ReporterFactory>() );\n        }\n    };\n\n    template<typename T>\n    class ListenerRegistrar {\n\n        class ListenerFactory : public IReporterFactory {\n\n            IStreamingReporterPtr create( ReporterConfig const& config ) const override {\n                return std::unique_ptr<T>( new T( config ) );\n            }\n            std::string getDescription() const override {\n                return std::string();\n            }\n        };\n\n    public:\n\n        ListenerRegistrar() {\n            getMutableRegistryHub().registerListener( std::make_shared<ListenerFactory>() );\n        }\n    };\n}\n\n#if !defined(CATCH_CONFIG_DISABLE)\n\n#define CATCH_REGISTER_REPORTER( name, reporterType ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION         \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS          \\\n    namespace{ Catch::ReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name ); } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n#define CATCH_REGISTER_LISTENER( listenerType ) \\\n    CATCH_INTERNAL_START_WARNINGS_SUPPRESSION   \\\n    CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS    \\\n    namespace{ Catch::ListenerRegistrar<listenerType> catch_internal_RegistrarFor##listenerType; } \\\n    CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n#else // CATCH_CONFIG_DISABLE\n\n#define CATCH_REGISTER_REPORTER(name, reporterType)\n#define CATCH_REGISTER_LISTENER(listenerType)\n\n#endif // CATCH_CONFIG_DISABLE\n\n// end catch_reporter_registrars.hpp\n// Allow users to base their work off existing reporters\n// start catch_reporter_compact.h\n\nnamespace Catch {\n\n    struct CompactReporter : StreamingReporterBase<CompactReporter> {\n\n        using StreamingReporterBase::StreamingReporterBase;\n\n        ~CompactReporter() override;\n\n        static std::string getDescription();\n\n        void noMatchingTestCases(std::string const& spec) override;\n\n        void assertionStarting(AssertionInfo const&) override;\n\n        bool assertionEnded(AssertionStats const& _assertionStats) override;\n\n        void sectionEnded(SectionStats const& _sectionStats) override;\n\n        void testRunEnded(TestRunStats const& _testRunStats) override;\n\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_compact.h\n// start catch_reporter_console.h\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch\n                              // Note that 4062 (not all labels are handled\n                              // and default is missing) is enabled\n#endif\n\nnamespace Catch {\n    // Fwd decls\n    struct SummaryColumn;\n    class TablePrinter;\n\n    struct ConsoleReporter : StreamingReporterBase<ConsoleReporter> {\n        std::unique_ptr<TablePrinter> m_tablePrinter;\n\n        ConsoleReporter(ReporterConfig const& config);\n        ~ConsoleReporter() override;\n        static std::string getDescription();\n\n        void noMatchingTestCases(std::string const& spec) override;\n\n        void reportInvalidArguments(std::string const&arg) override;\n\n        void assertionStarting(AssertionInfo const&) override;\n\n        bool assertionEnded(AssertionStats const& _assertionStats) override;\n\n        void sectionStarting(SectionInfo const& _sectionInfo) override;\n        void sectionEnded(SectionStats const& _sectionStats) override;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing(std::string const& name) override;\n        void benchmarkStarting(BenchmarkInfo const& info) override;\n        void benchmarkEnded(BenchmarkStats<> const& stats) override;\n        void benchmarkFailed(std::string const& error) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        void testCaseEnded(TestCaseStats const& _testCaseStats) override;\n        void testGroupEnded(TestGroupStats const& _testGroupStats) override;\n        void testRunEnded(TestRunStats const& _testRunStats) override;\n        void testRunStarting(TestRunInfo const& _testRunInfo) override;\n    private:\n\n        void lazyPrint();\n\n        void lazyPrintWithoutClosingBenchmarkTable();\n        void lazyPrintRunInfo();\n        void lazyPrintGroupInfo();\n        void printTestCaseAndSectionHeader();\n\n        void printClosedHeader(std::string const& _name);\n        void printOpenHeader(std::string const& _name);\n\n        // if string has a : in first line will set indent to follow it on\n        // subsequent lines\n        void printHeaderString(std::string const& _string, std::size_t indent = 0);\n\n        void printTotals(Totals const& totals);\n        void printSummaryRow(std::string const& label, std::vector<SummaryColumn> const& cols, std::size_t row);\n\n        void printTotalsDivider(Totals const& totals);\n        void printSummaryDivider();\n        void printTestFilters();\n\n    private:\n        bool m_headerPrinted = false;\n    };\n\n} // end namespace Catch\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n\n// end catch_reporter_console.h\n// start catch_reporter_junit.h\n\n// start catch_xmlwriter.h\n\n#include <vector>\n\nnamespace Catch {\n    enum class XmlFormatting {\n        None = 0x00,\n        Indent = 0x01,\n        Newline = 0x02,\n    };\n\n    XmlFormatting operator | (XmlFormatting lhs, XmlFormatting rhs);\n    XmlFormatting operator & (XmlFormatting lhs, XmlFormatting rhs);\n\n    class XmlEncode {\n    public:\n        enum ForWhat { ForTextNodes, ForAttributes };\n\n        XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes );\n\n        void encodeTo( std::ostream& os ) const;\n\n        friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode );\n\n    private:\n        std::string m_str;\n        ForWhat m_forWhat;\n    };\n\n    class XmlWriter {\n    public:\n\n        class ScopedElement {\n        public:\n            ScopedElement( XmlWriter* writer, XmlFormatting fmt );\n\n            ScopedElement( ScopedElement&& other ) noexcept;\n            ScopedElement& operator=( ScopedElement&& other ) noexcept;\n\n            ~ScopedElement();\n\n            ScopedElement& writeText( std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent );\n\n            template<typename T>\n            ScopedElement& writeAttribute( std::string const& name, T const& attribute ) {\n                m_writer->writeAttribute( name, attribute );\n                return *this;\n            }\n\n        private:\n            mutable XmlWriter* m_writer = nullptr;\n            XmlFormatting m_fmt;\n        };\n\n        XmlWriter( std::ostream& os = Catch::cout() );\n        ~XmlWriter();\n\n        XmlWriter( XmlWriter const& ) = delete;\n        XmlWriter& operator=( XmlWriter const& ) = delete;\n\n        XmlWriter& startElement( std::string const& name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        ScopedElement scopedElement( std::string const& name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        XmlWriter& endElement(XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        XmlWriter& writeAttribute( std::string const& name, std::string const& attribute );\n\n        XmlWriter& writeAttribute( std::string const& name, bool attribute );\n\n        template<typename T>\n        XmlWriter& writeAttribute( std::string const& name, T const& attribute ) {\n            ReusableStringStream rss;\n            rss << attribute;\n            return writeAttribute( name, rss.str() );\n        }\n\n        XmlWriter& writeText( std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        XmlWriter& writeComment(std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent);\n\n        void writeStylesheetRef( std::string const& url );\n\n        XmlWriter& writeBlankLine();\n\n        void ensureTagClosed();\n\n    private:\n\n        void applyFormatting(XmlFormatting fmt);\n\n        void writeDeclaration();\n\n        void newlineIfNecessary();\n\n        bool m_tagIsOpen = false;\n        bool m_needsNewline = false;\n        std::vector<std::string> m_tags;\n        std::string m_indent;\n        std::ostream& m_os;\n    };\n\n}\n\n// end catch_xmlwriter.h\nnamespace Catch {\n\n    class JunitReporter : public CumulativeReporterBase<JunitReporter> {\n    public:\n        JunitReporter(ReporterConfig const& _config);\n\n        ~JunitReporter() override;\n\n        static std::string getDescription();\n\n        void noMatchingTestCases(std::string const& /*spec*/) override;\n\n        void testRunStarting(TestRunInfo const& runInfo) override;\n\n        void testGroupStarting(GroupInfo const& groupInfo) override;\n\n        void testCaseStarting(TestCaseInfo const& testCaseInfo) override;\n        bool assertionEnded(AssertionStats const& assertionStats) override;\n\n        void testCaseEnded(TestCaseStats const& testCaseStats) override;\n\n        void testGroupEnded(TestGroupStats const& testGroupStats) override;\n\n        void testRunEndedCumulative() override;\n\n        void writeGroup(TestGroupNode const& groupNode, double suiteTime);\n\n        void writeTestCase(TestCaseNode const& testCaseNode);\n\n        void writeSection( std::string const& className,\n                           std::string const& rootName,\n                           SectionNode const& sectionNode,\n                           bool testOkToFail );\n\n        void writeAssertions(SectionNode const& sectionNode);\n        void writeAssertion(AssertionStats const& stats);\n\n        XmlWriter xml;\n        Timer suiteTimer;\n        std::string stdOutForSuite;\n        std::string stdErrForSuite;\n        unsigned int unexpectedExceptions = 0;\n        bool m_okToFail = false;\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_junit.h\n// start catch_reporter_xml.h\n\nnamespace Catch {\n    class XmlReporter : public StreamingReporterBase<XmlReporter> {\n    public:\n        XmlReporter(ReporterConfig const& _config);\n\n        ~XmlReporter() override;\n\n        static std::string getDescription();\n\n        virtual std::string getStylesheetRef() const;\n\n        void writeSourceInfo(SourceLineInfo const& sourceInfo);\n\n    public: // StreamingReporterBase\n\n        void noMatchingTestCases(std::string const& s) override;\n\n        void testRunStarting(TestRunInfo const& testInfo) override;\n\n        void testGroupStarting(GroupInfo const& groupInfo) override;\n\n        void testCaseStarting(TestCaseInfo const& testInfo) override;\n\n        void sectionStarting(SectionInfo const& sectionInfo) override;\n\n        void assertionStarting(AssertionInfo const&) override;\n\n        bool assertionEnded(AssertionStats const& assertionStats) override;\n\n        void sectionEnded(SectionStats const& sectionStats) override;\n\n        void testCaseEnded(TestCaseStats const& testCaseStats) override;\n\n        void testGroupEnded(TestGroupStats const& testGroupStats) override;\n\n        void testRunEnded(TestRunStats const& testRunStats) override;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing(std::string const& name) override;\n        void benchmarkStarting(BenchmarkInfo const&) override;\n        void benchmarkEnded(BenchmarkStats<> const&) override;\n        void benchmarkFailed(std::string const&) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    private:\n        Timer m_testCaseTimer;\n        XmlWriter m_xml;\n        int m_sectionDepth = 0;\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_xml.h\n\n// end catch_external_interfaces.h\n#endif\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n// start catch_benchmarking_all.hpp\n\n// A proxy header that includes all of the benchmarking headers to allow\n// concise include of the benchmarking features. You should prefer the\n// individual includes in standard use.\n\n// start catch_benchmark.hpp\n\n // Benchmark\n\n// start catch_chronometer.hpp\n\n// User-facing chronometer\n\n\n// start catch_clock.hpp\n\n// Clocks\n\n\n#include <chrono>\n#include <ratio>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Clock>\n        using ClockDuration = typename Clock::duration;\n        template <typename Clock>\n        using FloatDuration = std::chrono::duration<double, typename Clock::period>;\n\n        template <typename Clock>\n        using TimePoint = typename Clock::time_point;\n\n        using default_clock = std::chrono::steady_clock;\n\n        template <typename Clock>\n        struct now {\n            TimePoint<Clock> operator()() const {\n                return Clock::now();\n            }\n        };\n\n        using fp_seconds = std::chrono::duration<double, std::ratio<1>>;\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_clock.hpp\n// start catch_optimizer.hpp\n\n // Hinting the optimizer\n\n\n#if defined(_MSC_VER)\n#   include <atomic> // atomic_thread_fence\n#endif\n\nnamespace Catch {\n    namespace Benchmark {\n#if defined(__GNUC__) || defined(__clang__)\n        template <typename T>\n        inline void keep_memory(T* p) {\n            asm volatile(\"\" : : \"g\"(p) : \"memory\");\n        }\n        inline void keep_memory() {\n            asm volatile(\"\" : : : \"memory\");\n        }\n\n        namespace Detail {\n            inline void optimizer_barrier() { keep_memory(); }\n        } // namespace Detail\n#elif defined(_MSC_VER)\n\n#pragma optimize(\"\", off)\n        template <typename T>\n        inline void keep_memory(T* p) {\n            // thanks @milleniumbug\n            *reinterpret_cast<char volatile*>(p) = *reinterpret_cast<char const volatile*>(p);\n        }\n        // TODO equivalent keep_memory()\n#pragma optimize(\"\", on)\n\n        namespace Detail {\n            inline void optimizer_barrier() {\n                std::atomic_thread_fence(std::memory_order_seq_cst);\n            }\n        } // namespace Detail\n\n#endif\n\n        template <typename T>\n        inline void deoptimize_value(T&& x) {\n            keep_memory(&x);\n        }\n\n        template <typename Fn, typename... Args>\n        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<!std::is_same<void, decltype(fn(args...))>::value>::type {\n            deoptimize_value(std::forward<Fn>(fn) (std::forward<Args...>(args...)));\n        }\n\n        template <typename Fn, typename... Args>\n        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<std::is_same<void, decltype(fn(args...))>::value>::type {\n            std::forward<Fn>(fn) (std::forward<Args...>(args...));\n        }\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_optimizer.hpp\n// start catch_complete_invoke.hpp\n\n// Invoke with a special case for void\n\n\n#include <type_traits>\n#include <utility>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename T>\n            struct CompleteType { using type = T; };\n            template <>\n            struct CompleteType<void> { struct type {}; };\n\n            template <typename T>\n            using CompleteType_t = typename CompleteType<T>::type;\n\n            template <typename Result>\n            struct CompleteInvoker {\n                template <typename Fun, typename... Args>\n                static Result invoke(Fun&& fun, Args&&... args) {\n                    return std::forward<Fun>(fun)(std::forward<Args>(args)...);\n                }\n            };\n            template <>\n            struct CompleteInvoker<void> {\n                template <typename Fun, typename... Args>\n                static CompleteType_t<void> invoke(Fun&& fun, Args&&... args) {\n                    std::forward<Fun>(fun)(std::forward<Args>(args)...);\n                    return {};\n                }\n            };\n\n            // invoke and not return void :(\n            template <typename Fun, typename... Args>\n            CompleteType_t<FunctionReturnType<Fun, Args...>> complete_invoke(Fun&& fun, Args&&... args) {\n                return CompleteInvoker<FunctionReturnType<Fun, Args...>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...);\n            }\n\n            const std::string benchmarkErrorMsg = \"a benchmark failed to run successfully\";\n        } // namespace Detail\n\n        template <typename Fun>\n        Detail::CompleteType_t<FunctionReturnType<Fun>> user_code(Fun&& fun) {\n            CATCH_TRY{\n                return Detail::complete_invoke(std::forward<Fun>(fun));\n            } CATCH_CATCH_ALL{\n                getResultCapture().benchmarkFailed(translateActiveException());\n                CATCH_RUNTIME_ERROR(Detail::benchmarkErrorMsg);\n            }\n        }\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_complete_invoke.hpp\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            struct ChronometerConcept {\n                virtual void start() = 0;\n                virtual void finish() = 0;\n                virtual ~ChronometerConcept() = default;\n            };\n            template <typename Clock>\n            struct ChronometerModel final : public ChronometerConcept {\n                void start() override { started = Clock::now(); }\n                void finish() override { finished = Clock::now(); }\n\n                ClockDuration<Clock> elapsed() const { return finished - started; }\n\n                TimePoint<Clock> started;\n                TimePoint<Clock> finished;\n            };\n        } // namespace Detail\n\n        struct Chronometer {\n        public:\n            template <typename Fun>\n            void measure(Fun&& fun) { measure(std::forward<Fun>(fun), is_callable<Fun(int)>()); }\n\n            int runs() const { return k; }\n\n            Chronometer(Detail::ChronometerConcept& meter, int k)\n                : impl(&meter)\n                , k(k) {}\n\n        private:\n            template <typename Fun>\n            void measure(Fun&& fun, std::false_type) {\n                measure([&fun](int) { return fun(); }, std::true_type());\n            }\n\n            template <typename Fun>\n            void measure(Fun&& fun, std::true_type) {\n                Detail::optimizer_barrier();\n                impl->start();\n                for (int i = 0; i < k; ++i) invoke_deoptimized(fun, i);\n                impl->finish();\n                Detail::optimizer_barrier();\n            }\n\n            Detail::ChronometerConcept* impl;\n            int k;\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_chronometer.hpp\n// start catch_environment.hpp\n\n// Environment information\n\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct EnvironmentEstimate {\n            Duration mean;\n            OutlierClassification outliers;\n\n            template <typename Duration2>\n            operator EnvironmentEstimate<Duration2>() const {\n                return { mean, outliers };\n            }\n        };\n        template <typename Clock>\n        struct Environment {\n            using clock_type = Clock;\n            EnvironmentEstimate<FloatDuration<Clock>> clock_resolution;\n            EnvironmentEstimate<FloatDuration<Clock>> clock_cost;\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_environment.hpp\n// start catch_execution_plan.hpp\n\n // Execution plan\n\n\n// start catch_benchmark_function.hpp\n\n // Dumb std::function implementation for consistent call overhead\n\n\n#include <cassert>\n#include <type_traits>\n#include <utility>\n#include <memory>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename T>\n            using Decay = typename std::decay<T>::type;\n            template <typename T, typename U>\n            struct is_related\n                : std::is_same<Decay<T>, Decay<U>> {};\n\n            /// We need to reinvent std::function because every piece of code that might add overhead\n            /// in a measurement context needs to have consistent performance characteristics so that we\n            /// can account for it in the measurement.\n            /// Implementations of std::function with optimizations that aren't always applicable, like\n            /// small buffer optimizations, are not uncommon.\n            /// This is effectively an implementation of std::function without any such optimizations;\n            /// it may be slow, but it is consistently slow.\n            struct BenchmarkFunction {\n            private:\n                struct callable {\n                    virtual void call(Chronometer meter) const = 0;\n                    virtual callable* clone() const = 0;\n                    virtual ~callable() = default;\n                };\n                template <typename Fun>\n                struct model : public callable {\n                    model(Fun&& fun) : fun(std::move(fun)) {}\n                    model(Fun const& fun) : fun(fun) {}\n\n                    model<Fun>* clone() const override { return new model<Fun>(*this); }\n\n                    void call(Chronometer meter) const override {\n                        call(meter, is_callable<Fun(Chronometer)>());\n                    }\n                    void call(Chronometer meter, std::true_type) const {\n                        fun(meter);\n                    }\n                    void call(Chronometer meter, std::false_type) const {\n                        meter.measure(fun);\n                    }\n\n                    Fun fun;\n                };\n\n                struct do_nothing { void operator()() const {} };\n\n                template <typename T>\n                BenchmarkFunction(model<T>* c) : f(c) {}\n\n            public:\n                BenchmarkFunction()\n                    : f(new model<do_nothing>{ {} }) {}\n\n                template <typename Fun,\n                    typename std::enable_if<!is_related<Fun, BenchmarkFunction>::value, int>::type = 0>\n                    BenchmarkFunction(Fun&& fun)\n                    : f(new model<typename std::decay<Fun>::type>(std::forward<Fun>(fun))) {}\n\n                BenchmarkFunction(BenchmarkFunction&& that)\n                    : f(std::move(that.f)) {}\n\n                BenchmarkFunction(BenchmarkFunction const& that)\n                    : f(that.f->clone()) {}\n\n                BenchmarkFunction& operator=(BenchmarkFunction&& that) {\n                    f = std::move(that.f);\n                    return *this;\n                }\n\n                BenchmarkFunction& operator=(BenchmarkFunction const& that) {\n                    f.reset(that.f->clone());\n                    return *this;\n                }\n\n                void operator()(Chronometer meter) const { f->call(meter); }\n\n            private:\n                std::unique_ptr<callable> f;\n            };\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_benchmark_function.hpp\n// start catch_repeat.hpp\n\n// repeat algorithm\n\n\n#include <type_traits>\n#include <utility>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Fun>\n            struct repeater {\n                void operator()(int k) const {\n                    for (int i = 0; i < k; ++i) {\n                        fun();\n                    }\n                }\n                Fun fun;\n            };\n            template <typename Fun>\n            repeater<typename std::decay<Fun>::type> repeat(Fun&& fun) {\n                return { std::forward<Fun>(fun) };\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_repeat.hpp\n// start catch_run_for_at_least.hpp\n\n// Run a function for a minimum amount of time\n\n\n// start catch_measure.hpp\n\n// Measure\n\n\n// start catch_timing.hpp\n\n// Timing\n\n\n#include <tuple>\n#include <type_traits>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration, typename Result>\n        struct Timing {\n            Duration elapsed;\n            Result result;\n            int iterations;\n        };\n        template <typename Clock, typename Func, typename... Args>\n        using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>;\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_timing.hpp\n#include <utility>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Clock, typename Fun, typename... Args>\n            TimingOf<Clock, Fun, Args...> measure(Fun&& fun, Args&&... args) {\n                auto start = Clock::now();\n                auto&& r = Detail::complete_invoke(fun, std::forward<Args>(args)...);\n                auto end = Clock::now();\n                auto delta = end - start;\n                return { delta, std::forward<decltype(r)>(r), 1 };\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_measure.hpp\n#include <utility>\n#include <type_traits>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Clock, typename Fun>\n            TimingOf<Clock, Fun, int> measure_one(Fun&& fun, int iters, std::false_type) {\n                return Detail::measure<Clock>(fun, iters);\n            }\n            template <typename Clock, typename Fun>\n            TimingOf<Clock, Fun, Chronometer> measure_one(Fun&& fun, int iters, std::true_type) {\n                Detail::ChronometerModel<Clock> meter;\n                auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters));\n\n                return { meter.elapsed(), std::move(result), iters };\n            }\n\n            template <typename Clock, typename Fun>\n            using run_for_at_least_argument_t = typename std::conditional<is_callable<Fun(Chronometer)>::value, Chronometer, int>::type;\n\n            struct optimized_away_error : std::exception {\n                const char* what() const noexcept override {\n                    return \"could not measure benchmark, maybe it was optimized away\";\n                }\n            };\n\n            template <typename Clock, typename Fun>\n            TimingOf<Clock, Fun, run_for_at_least_argument_t<Clock, Fun>> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) {\n                auto iters = seed;\n                while (iters < (1 << 30)) {\n                    auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());\n\n                    if (Timing.elapsed >= how_long) {\n                        return { Timing.elapsed, std::move(Timing.result), iters };\n                    }\n                    iters *= 2;\n                }\n                Catch::throw_exception(optimized_away_error{});\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_run_for_at_least.hpp\n#include <algorithm>\n#include <iterator>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct ExecutionPlan {\n            int iterations_per_sample;\n            Duration estimated_duration;\n            Detail::BenchmarkFunction benchmark;\n            Duration warmup_time;\n            int warmup_iterations;\n\n            template <typename Duration2>\n            operator ExecutionPlan<Duration2>() const {\n                return { iterations_per_sample, estimated_duration, benchmark, warmup_time, warmup_iterations };\n            }\n\n            template <typename Clock>\n            std::vector<FloatDuration<Clock>> run(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {\n                // warmup a bit\n                Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_iterations, Detail::repeat(now<Clock>{}));\n\n                std::vector<FloatDuration<Clock>> times;\n                times.reserve(cfg.benchmarkSamples());\n                std::generate_n(std::back_inserter(times), cfg.benchmarkSamples(), [this, env] {\n                    Detail::ChronometerModel<Clock> model;\n                    this->benchmark(Chronometer(model, iterations_per_sample));\n                    auto sample_time = model.elapsed() - env.clock_cost.mean;\n                    if (sample_time < FloatDuration<Clock>::zero()) sample_time = FloatDuration<Clock>::zero();\n                    return sample_time / iterations_per_sample;\n                });\n                return times;\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_execution_plan.hpp\n// start catch_estimate_clock.hpp\n\n // Environment measurement\n\n\n// start catch_stats.hpp\n\n// Statistical analysis tools\n\n\n#include <algorithm>\n#include <functional>\n#include <vector>\n#include <iterator>\n#include <numeric>\n#include <tuple>\n#include <cmath>\n#include <utility>\n#include <cstddef>\n#include <random>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            using sample = std::vector<double>;\n\n            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last);\n\n            template <typename Iterator>\n            OutlierClassification classify_outliers(Iterator first, Iterator last) {\n                std::vector<double> copy(first, last);\n\n                auto q1 = weighted_average_quantile(1, 4, copy.begin(), copy.end());\n                auto q3 = weighted_average_quantile(3, 4, copy.begin(), copy.end());\n                auto iqr = q3 - q1;\n                auto los = q1 - (iqr * 3.);\n                auto lom = q1 - (iqr * 1.5);\n                auto him = q3 + (iqr * 1.5);\n                auto his = q3 + (iqr * 3.);\n\n                OutlierClassification o;\n                for (; first != last; ++first) {\n                    auto&& t = *first;\n                    if (t < los) ++o.low_severe;\n                    else if (t < lom) ++o.low_mild;\n                    else if (t > his) ++o.high_severe;\n                    else if (t > him) ++o.high_mild;\n                    ++o.samples_seen;\n                }\n                return o;\n            }\n\n            template <typename Iterator>\n            double mean(Iterator first, Iterator last) {\n                auto count = last - first;\n                double sum = std::accumulate(first, last, 0.);\n                return sum / count;\n            }\n\n            template <typename URng, typename Iterator, typename Estimator>\n            sample resample(URng& rng, int resamples, Iterator first, Iterator last, Estimator& estimator) {\n                auto n = last - first;\n                std::uniform_int_distribution<decltype(n)> dist(0, n - 1);\n\n                sample out;\n                out.reserve(resamples);\n                std::generate_n(std::back_inserter(out), resamples, [n, first, &estimator, &dist, &rng] {\n                    std::vector<double> resampled;\n                    resampled.reserve(n);\n                    std::generate_n(std::back_inserter(resampled), n, [first, &dist, &rng] { return first[dist(rng)]; });\n                    return estimator(resampled.begin(), resampled.end());\n                });\n                std::sort(out.begin(), out.end());\n                return out;\n            }\n\n            template <typename Estimator, typename Iterator>\n            sample jackknife(Estimator&& estimator, Iterator first, Iterator last) {\n                auto n = last - first;\n                auto second = std::next(first);\n                sample results;\n                results.reserve(n);\n\n                for (auto it = first; it != last; ++it) {\n                    std::iter_swap(it, first);\n                    results.push_back(estimator(second, last));\n                }\n\n                return results;\n            }\n\n            inline double normal_cdf(double x) {\n                return std::erfc(-x / std::sqrt(2.0)) / 2.0;\n            }\n\n            double erfc_inv(double x);\n\n            double normal_quantile(double p);\n\n            template <typename Iterator, typename Estimator>\n            Estimate<double> bootstrap(double confidence_level, Iterator first, Iterator last, sample const& resample, Estimator&& estimator) {\n                auto n_samples = last - first;\n\n                double point = estimator(first, last);\n                // Degenerate case with a single sample\n                if (n_samples == 1) return { point, point, point, confidence_level };\n\n                sample jack = jackknife(estimator, first, last);\n                double jack_mean = mean(jack.begin(), jack.end());\n                double sum_squares, sum_cubes;\n                std::tie(sum_squares, sum_cubes) = std::accumulate(jack.begin(), jack.end(), std::make_pair(0., 0.), [jack_mean](std::pair<double, double> sqcb, double x) -> std::pair<double, double> {\n                    auto d = jack_mean - x;\n                    auto d2 = d * d;\n                    auto d3 = d2 * d;\n                    return { sqcb.first + d2, sqcb.second + d3 };\n                });\n\n                double accel = sum_cubes / (6 * std::pow(sum_squares, 1.5));\n                int n = static_cast<int>(resample.size());\n                double prob_n = std::count_if(resample.begin(), resample.end(), [point](double x) { return x < point; }) / (double)n;\n                // degenerate case with uniform samples\n                if (prob_n == 0) return { point, point, point, confidence_level };\n\n                double bias = normal_quantile(prob_n);\n                double z1 = normal_quantile((1. - confidence_level) / 2.);\n\n                auto cumn = [n](double x) -> int {\n                    return std::lround(normal_cdf(x) * n); };\n                auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); };\n                double b1 = bias + z1;\n                double b2 = bias - z1;\n                double a1 = a(b1);\n                double a2 = a(b2);\n                auto lo = (std::max)(cumn(a1), 0);\n                auto hi = (std::min)(cumn(a2), n - 1);\n\n                return { point, resample[lo], resample[hi], confidence_level };\n            }\n\n            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n);\n\n            struct bootstrap_analysis {\n                Estimate<double> mean;\n                Estimate<double> standard_deviation;\n                double outlier_variance;\n            };\n\n            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last);\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_stats.hpp\n#include <algorithm>\n#include <iterator>\n#include <tuple>\n#include <vector>\n#include <cmath>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Clock>\n            std::vector<double> resolution(int k) {\n                std::vector<TimePoint<Clock>> times;\n                times.reserve(k + 1);\n                std::generate_n(std::back_inserter(times), k + 1, now<Clock>{});\n\n                std::vector<double> deltas;\n                deltas.reserve(k);\n                std::transform(std::next(times.begin()), times.end(), times.begin(),\n                    std::back_inserter(deltas),\n                    [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); });\n\n                return deltas;\n            }\n\n            const auto warmup_iterations = 10000;\n            const auto warmup_time = std::chrono::milliseconds(100);\n            const auto minimum_ticks = 1000;\n            const auto warmup_seed = 10000;\n            const auto clock_resolution_estimation_time = std::chrono::milliseconds(500);\n            const auto clock_cost_estimation_time_limit = std::chrono::seconds(1);\n            const auto clock_cost_estimation_tick_limit = 100000;\n            const auto clock_cost_estimation_time = std::chrono::milliseconds(10);\n            const auto clock_cost_estimation_iterations = 10000;\n\n            template <typename Clock>\n            int warmup() {\n                return run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_seed, &resolution<Clock>)\n                    .iterations;\n            }\n            template <typename Clock>\n            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations) {\n                auto r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_resolution_estimation_time), iterations, &resolution<Clock>)\n                    .result;\n                return {\n                    FloatDuration<Clock>(mean(r.begin(), r.end())),\n                    classify_outliers(r.begin(), r.end()),\n                };\n            }\n            template <typename Clock>\n            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) {\n                auto time_limit = (std::min)(\n                    resolution * clock_cost_estimation_tick_limit,\n                    FloatDuration<Clock>(clock_cost_estimation_time_limit));\n                auto time_clock = [](int k) {\n                    return Detail::measure<Clock>([k] {\n                        for (int i = 0; i < k; ++i) {\n                            volatile auto ignored = Clock::now();\n                            (void)ignored;\n                        }\n                    }).elapsed;\n                };\n                time_clock(1);\n                int iters = clock_cost_estimation_iterations;\n                auto&& r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_cost_estimation_time), iters, time_clock);\n                std::vector<double> times;\n                int nsamples = static_cast<int>(std::ceil(time_limit / r.elapsed));\n                times.reserve(nsamples);\n                std::generate_n(std::back_inserter(times), nsamples, [time_clock, &r] {\n                    return static_cast<double>((time_clock(r.iterations) / r.iterations).count());\n                });\n                return {\n                    FloatDuration<Clock>(mean(times.begin(), times.end())),\n                    classify_outliers(times.begin(), times.end()),\n                };\n            }\n\n            template <typename Clock>\n            Environment<FloatDuration<Clock>> measure_environment() {\n                static Environment<FloatDuration<Clock>>* env = nullptr;\n                if (env) {\n                    return *env;\n                }\n\n                auto iters = Detail::warmup<Clock>();\n                auto resolution = Detail::estimate_clock_resolution<Clock>(iters);\n                auto cost = Detail::estimate_clock_cost<Clock>(resolution.mean);\n\n                env = new Environment<FloatDuration<Clock>>{ resolution, cost };\n                return *env;\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_estimate_clock.hpp\n// start catch_analyse.hpp\n\n // Run and analyse one benchmark\n\n\n// start catch_sample_analysis.hpp\n\n// Benchmark results\n\n\n#include <algorithm>\n#include <vector>\n#include <string>\n#include <iterator>\n\nnamespace Catch {\n    namespace Benchmark {\n        template <typename Duration>\n        struct SampleAnalysis {\n            std::vector<Duration> samples;\n            Estimate<Duration> mean;\n            Estimate<Duration> standard_deviation;\n            OutlierClassification outliers;\n            double outlier_variance;\n\n            template <typename Duration2>\n            operator SampleAnalysis<Duration2>() const {\n                std::vector<Duration2> samples2;\n                samples2.reserve(samples.size());\n                std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });\n                return {\n                    std::move(samples2),\n                    mean,\n                    standard_deviation,\n                    outliers,\n                    outlier_variance,\n                };\n            }\n        };\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_sample_analysis.hpp\n#include <algorithm>\n#include <iterator>\n#include <vector>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename Duration, typename Iterator>\n            SampleAnalysis<Duration> analyse(const IConfig &cfg, Environment<Duration>, Iterator first, Iterator last) {\n                if (!cfg.benchmarkNoAnalysis()) {\n                    std::vector<double> samples;\n                    samples.reserve(last - first);\n                    std::transform(first, last, std::back_inserter(samples), [](Duration d) { return d.count(); });\n\n                    auto analysis = Catch::Benchmark::Detail::analyse_samples(cfg.benchmarkConfidenceInterval(), cfg.benchmarkResamples(), samples.begin(), samples.end());\n                    auto outliers = Catch::Benchmark::Detail::classify_outliers(samples.begin(), samples.end());\n\n                    auto wrap_estimate = [](Estimate<double> e) {\n                        return Estimate<Duration> {\n                            Duration(e.point),\n                                Duration(e.lower_bound),\n                                Duration(e.upper_bound),\n                                e.confidence_interval,\n                        };\n                    };\n                    std::vector<Duration> samples2;\n                    samples2.reserve(samples.size());\n                    std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](double d) { return Duration(d); });\n                    return {\n                        std::move(samples2),\n                        wrap_estimate(analysis.mean),\n                        wrap_estimate(analysis.standard_deviation),\n                        outliers,\n                        analysis.outlier_variance,\n                    };\n                } else {\n                    std::vector<Duration> samples;\n                    samples.reserve(last - first);\n\n                    Duration mean = Duration(0);\n                    int i = 0;\n                    for (auto it = first; it < last; ++it, ++i) {\n                        samples.push_back(Duration(*it));\n                        mean += Duration(*it);\n                    }\n                    mean /= i;\n\n                    return {\n                        std::move(samples),\n                        Estimate<Duration>{mean, mean, mean, 0.0},\n                        Estimate<Duration>{Duration(0), Duration(0), Duration(0), 0.0},\n                        OutlierClassification{},\n                        0.0\n                    };\n                }\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n// end catch_analyse.hpp\n#include <algorithm>\n#include <functional>\n#include <string>\n#include <vector>\n#include <cmath>\n\nnamespace Catch {\n    namespace Benchmark {\n        struct Benchmark {\n            Benchmark(std::string &&name)\n                : name(std::move(name)) {}\n\n            template <class FUN>\n            Benchmark(std::string &&name, FUN &&func)\n                : fun(std::move(func)), name(std::move(name)) {}\n\n            template <typename Clock>\n            ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {\n                auto min_time = env.clock_resolution.mean * Detail::minimum_ticks;\n                auto run_time = std::max(min_time, std::chrono::duration_cast<decltype(min_time)>(cfg.benchmarkWarmupTime()));\n                auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(run_time), 1, fun);\n                int new_iters = static_cast<int>(std::ceil(min_time * test.iterations / test.elapsed));\n                return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FloatDuration<Clock>>(cfg.benchmarkWarmupTime()), Detail::warmup_iterations };\n            }\n\n            template <typename Clock = default_clock>\n            void run() {\n                IConfigPtr cfg = getCurrentContext().getConfig();\n\n                auto env = Detail::measure_environment<Clock>();\n\n                getResultCapture().benchmarkPreparing(name);\n                CATCH_TRY{\n                    auto plan = user_code([&] {\n                        return prepare<Clock>(*cfg, env);\n                    });\n\n                    BenchmarkInfo info {\n                        name,\n                        plan.estimated_duration.count(),\n                        plan.iterations_per_sample,\n                        cfg->benchmarkSamples(),\n                        cfg->benchmarkResamples(),\n                        env.clock_resolution.mean.count(),\n                        env.clock_cost.mean.count()\n                    };\n\n                    getResultCapture().benchmarkStarting(info);\n\n                    auto samples = user_code([&] {\n                        return plan.template run<Clock>(*cfg, env);\n                    });\n\n                    auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end());\n                    BenchmarkStats<FloatDuration<Clock>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };\n                    getResultCapture().benchmarkEnded(stats);\n\n                } CATCH_CATCH_ALL{\n                    if (translateActiveException() != Detail::benchmarkErrorMsg) // benchmark errors have been reported, otherwise rethrow.\n                        std::rethrow_exception(std::current_exception());\n                }\n            }\n\n            // sets lambda to be used in fun *and* executes benchmark!\n            template <typename Fun,\n                typename std::enable_if<!Detail::is_related<Fun, Benchmark>::value, int>::type = 0>\n                Benchmark & operator=(Fun func) {\n                fun = Detail::BenchmarkFunction(func);\n                run();\n                return *this;\n            }\n\n            explicit operator bool() {\n                return true;\n            }\n\n        private:\n            Detail::BenchmarkFunction fun;\n            std::string name;\n        };\n    }\n} // namespace Catch\n\n#define INTERNAL_CATCH_GET_1_ARG(arg1, arg2, ...) arg1\n#define INTERNAL_CATCH_GET_2_ARG(arg1, arg2, ...) arg2\n\n#define INTERNAL_CATCH_BENCHMARK(BenchmarkName, name, benchmarkIndex)\\\n    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \\\n        BenchmarkName = [&](int benchmarkIndex)\n\n#define INTERNAL_CATCH_BENCHMARK_ADVANCED(BenchmarkName, name)\\\n    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \\\n        BenchmarkName = [&]\n\n// end catch_benchmark.hpp\n// start catch_constructor.hpp\n\n// Constructor and destructor helpers\n\n\n#include <type_traits>\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n            template <typename T, bool Destruct>\n            struct ObjectStorage\n            {\n                using TStorage = typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type;\n\n                ObjectStorage() : data() {}\n\n                ObjectStorage(const ObjectStorage& other)\n                {\n                    new(&data) T(other.stored_object());\n                }\n\n                ObjectStorage(ObjectStorage&& other)\n                {\n                    new(&data) T(std::move(other.stored_object()));\n                }\n\n                ~ObjectStorage() { destruct_on_exit<T>(); }\n\n                template <typename... Args>\n                void construct(Args&&... args)\n                {\n                    new (&data) T(std::forward<Args>(args)...);\n                }\n\n                template <bool AllowManualDestruction = !Destruct>\n                typename std::enable_if<AllowManualDestruction>::type destruct()\n                {\n                    stored_object().~T();\n                }\n\n            private:\n                // If this is a constructor benchmark, destruct the underlying object\n                template <typename U>\n                void destruct_on_exit(typename std::enable_if<Destruct, U>::type* = 0) { destruct<true>(); }\n                // Otherwise, don't\n                template <typename U>\n                void destruct_on_exit(typename std::enable_if<!Destruct, U>::type* = 0) { }\n\n                T& stored_object() {\n                    return *static_cast<T*>(static_cast<void*>(&data));\n                }\n\n                T const& stored_object() const {\n                    return *static_cast<T*>(static_cast<void*>(&data));\n                }\n\n                TStorage data;\n            };\n        }\n\n        template <typename T>\n        using storage_for = Detail::ObjectStorage<T, true>;\n\n        template <typename T>\n        using destructable_object = Detail::ObjectStorage<T, false>;\n    }\n}\n\n// end catch_constructor.hpp\n// end catch_benchmarking_all.hpp\n#endif\n\n#endif // ! CATCH_CONFIG_IMPL_ONLY\n\n#ifdef CATCH_IMPL\n// start catch_impl.hpp\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wweak-vtables\"\n#endif\n\n// Keep these here for external reporters\n// start catch_test_case_tracker.h\n\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n    namespace TestCaseTracking {\n\n        struct NameAndLocation {\n            std::string name;\n            SourceLineInfo location;\n\n            NameAndLocation( std::string const& _name, SourceLineInfo const& _location );\n            friend bool operator==(NameAndLocation const& lhs, NameAndLocation const& rhs) {\n                return lhs.name == rhs.name\n                       && lhs.location == rhs.location;\n            }\n        };\n\n        class ITracker;\n\n        using ITrackerPtr = std::shared_ptr<ITracker>;\n\n        class  ITracker {\n            NameAndLocation m_nameAndLocation;\n\n        public:\n            ITracker(NameAndLocation const& nameAndLoc) :\n                    m_nameAndLocation(nameAndLoc)\n            {}\n\n            // static queries\n            NameAndLocation const& nameAndLocation() const {\n                return m_nameAndLocation;\n            }\n\n            virtual ~ITracker();\n\n            // dynamic queries\n            virtual bool isComplete() const = 0; // Successfully completed or failed\n            virtual bool isSuccessfullyCompleted() const = 0;\n            virtual bool isOpen() const = 0; // Started but not complete\n            virtual bool hasChildren() const = 0;\n            virtual bool hasStarted() const = 0;\n\n            virtual ITracker& parent() = 0;\n\n            // actions\n            virtual void close() = 0; // Successfully complete\n            virtual void fail() = 0;\n            virtual void markAsNeedingAnotherRun() = 0;\n\n            virtual void addChild( ITrackerPtr const& child ) = 0;\n            virtual ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) = 0;\n            virtual void openChild() = 0;\n\n            // Debug/ checking\n            virtual bool isSectionTracker() const = 0;\n            virtual bool isGeneratorTracker() const = 0;\n        };\n\n        class TrackerContext {\n\n            enum RunState {\n                NotStarted,\n                Executing,\n                CompletedCycle\n            };\n\n            ITrackerPtr m_rootTracker;\n            ITracker* m_currentTracker = nullptr;\n            RunState m_runState = NotStarted;\n\n        public:\n\n            ITracker& startRun();\n            void endRun();\n\n            void startCycle();\n            void completeCycle();\n\n            bool completedCycle() const;\n            ITracker& currentTracker();\n            void setCurrentTracker( ITracker* tracker );\n        };\n\n        class TrackerBase : public ITracker {\n        protected:\n            enum CycleState {\n                NotStarted,\n                Executing,\n                ExecutingChildren,\n                NeedsAnotherRun,\n                CompletedSuccessfully,\n                Failed\n            };\n\n            using Children = std::vector<ITrackerPtr>;\n            TrackerContext& m_ctx;\n            ITracker* m_parent;\n            Children m_children;\n            CycleState m_runState = NotStarted;\n\n        public:\n            TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );\n\n            bool isComplete() const override;\n            bool isSuccessfullyCompleted() const override;\n            bool isOpen() const override;\n            bool hasChildren() const override;\n            bool hasStarted() const override {\n                return m_runState != NotStarted;\n            }\n\n            void addChild( ITrackerPtr const& child ) override;\n\n            ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) override;\n            ITracker& parent() override;\n\n            void openChild() override;\n\n            bool isSectionTracker() const override;\n            bool isGeneratorTracker() const override;\n\n            void open();\n\n            void close() override;\n            void fail() override;\n            void markAsNeedingAnotherRun() override;\n\n        private:\n            void moveToParent();\n            void moveToThis();\n        };\n\n        class SectionTracker : public TrackerBase {\n            std::vector<std::string> m_filters;\n            std::string m_trimmed_name;\n        public:\n            SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );\n\n            bool isSectionTracker() const override;\n\n            bool isComplete() const override;\n\n            static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation );\n\n            void tryOpen();\n\n            void addInitialFilters( std::vector<std::string> const& filters );\n            void addNextFilters( std::vector<std::string> const& filters );\n            //! Returns filters active in this tracker\n            std::vector<std::string> const& getFilters() const;\n            //! Returns whitespace-trimmed name of the tracked section\n            std::string const& trimmedName() const;\n        };\n\n    } // namespace TestCaseTracking\n\n    using TestCaseTracking::ITracker;\n    using TestCaseTracking::TrackerContext;\n    using TestCaseTracking::SectionTracker;\n\n} // namespace Catch\n\n// end catch_test_case_tracker.h\n\n// start catch_leak_detector.h\n\nnamespace Catch {\n\n    struct LeakDetector {\n        LeakDetector();\n        ~LeakDetector();\n    };\n\n}\n// end catch_leak_detector.h\n// Cpp files will be included in the single-header file here\n// start catch_stats.cpp\n\n// Statistical analysis tools\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n\n#include <cassert>\n#include <random>\n\n#if defined(CATCH_CONFIG_USE_ASYNC)\n#include <future>\n#endif\n\nnamespace {\n    double erf_inv(double x) {\n        // Code accompanying the article \"Approximating the erfinv function\" in GPU Computing Gems, Volume 2\n        double w, p;\n\n        w = -log((1.0 - x) * (1.0 + x));\n\n        if (w < 6.250000) {\n            w = w - 3.125000;\n            p = -3.6444120640178196996e-21;\n            p = -1.685059138182016589e-19 + p * w;\n            p = 1.2858480715256400167e-18 + p * w;\n            p = 1.115787767802518096e-17 + p * w;\n            p = -1.333171662854620906e-16 + p * w;\n            p = 2.0972767875968561637e-17 + p * w;\n            p = 6.6376381343583238325e-15 + p * w;\n            p = -4.0545662729752068639e-14 + p * w;\n            p = -8.1519341976054721522e-14 + p * w;\n            p = 2.6335093153082322977e-12 + p * w;\n            p = -1.2975133253453532498e-11 + p * w;\n            p = -5.4154120542946279317e-11 + p * w;\n            p = 1.051212273321532285e-09 + p * w;\n            p = -4.1126339803469836976e-09 + p * w;\n            p = -2.9070369957882005086e-08 + p * w;\n            p = 4.2347877827932403518e-07 + p * w;\n            p = -1.3654692000834678645e-06 + p * w;\n            p = -1.3882523362786468719e-05 + p * w;\n            p = 0.0001867342080340571352 + p * w;\n            p = -0.00074070253416626697512 + p * w;\n            p = -0.0060336708714301490533 + p * w;\n            p = 0.24015818242558961693 + p * w;\n            p = 1.6536545626831027356 + p * w;\n        } else if (w < 16.000000) {\n            w = sqrt(w) - 3.250000;\n            p = 2.2137376921775787049e-09;\n            p = 9.0756561938885390979e-08 + p * w;\n            p = -2.7517406297064545428e-07 + p * w;\n            p = 1.8239629214389227755e-08 + p * w;\n            p = 1.5027403968909827627e-06 + p * w;\n            p = -4.013867526981545969e-06 + p * w;\n            p = 2.9234449089955446044e-06 + p * w;\n            p = 1.2475304481671778723e-05 + p * w;\n            p = -4.7318229009055733981e-05 + p * w;\n            p = 6.8284851459573175448e-05 + p * w;\n            p = 2.4031110387097893999e-05 + p * w;\n            p = -0.0003550375203628474796 + p * w;\n            p = 0.00095328937973738049703 + p * w;\n            p = -0.0016882755560235047313 + p * w;\n            p = 0.0024914420961078508066 + p * w;\n            p = -0.0037512085075692412107 + p * w;\n            p = 0.005370914553590063617 + p * w;\n            p = 1.0052589676941592334 + p * w;\n            p = 3.0838856104922207635 + p * w;\n        } else {\n            w = sqrt(w) - 5.000000;\n            p = -2.7109920616438573243e-11;\n            p = -2.5556418169965252055e-10 + p * w;\n            p = 1.5076572693500548083e-09 + p * w;\n            p = -3.7894654401267369937e-09 + p * w;\n            p = 7.6157012080783393804e-09 + p * w;\n            p = -1.4960026627149240478e-08 + p * w;\n            p = 2.9147953450901080826e-08 + p * w;\n            p = -6.7711997758452339498e-08 + p * w;\n            p = 2.2900482228026654717e-07 + p * w;\n            p = -9.9298272942317002539e-07 + p * w;\n            p = 4.5260625972231537039e-06 + p * w;\n            p = -1.9681778105531670567e-05 + p * w;\n            p = 7.5995277030017761139e-05 + p * w;\n            p = -0.00021503011930044477347 + p * w;\n            p = -0.00013871931833623122026 + p * w;\n            p = 1.0103004648645343977 + p * w;\n            p = 4.8499064014085844221 + p * w;\n        }\n        return p * x;\n    }\n\n    double standard_deviation(std::vector<double>::iterator first, std::vector<double>::iterator last) {\n        auto m = Catch::Benchmark::Detail::mean(first, last);\n        double variance = std::accumulate(first, last, 0., [m](double a, double b) {\n            double diff = b - m;\n            return a + diff * diff;\n            }) / (last - first);\n            return std::sqrt(variance);\n    }\n\n}\n\nnamespace Catch {\n    namespace Benchmark {\n        namespace Detail {\n\n            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last) {\n                auto count = last - first;\n                double idx = (count - 1) * k / static_cast<double>(q);\n                int j = static_cast<int>(idx);\n                double g = idx - j;\n                std::nth_element(first, first + j, last);\n                auto xj = first[j];\n                if (g == 0) return xj;\n\n                auto xj1 = *std::min_element(first + (j + 1), last);\n                return xj + g * (xj1 - xj);\n            }\n\n            double erfc_inv(double x) {\n                return erf_inv(1.0 - x);\n            }\n\n            double normal_quantile(double p) {\n                static const double ROOT_TWO = std::sqrt(2.0);\n\n                double result = 0.0;\n                assert(p >= 0 && p <= 1);\n                if (p < 0 || p > 1) {\n                    return result;\n                }\n\n                result = -erfc_inv(2.0 * p);\n                // result *= normal distribution standard deviation (1.0) * sqrt(2)\n                result *= /*sd * */ ROOT_TWO;\n                // result += normal disttribution mean (0)\n                return result;\n            }\n\n            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n) {\n                double sb = stddev.point;\n                double mn = mean.point / n;\n                double mg_min = mn / 2.;\n                double sg = (std::min)(mg_min / 4., sb / std::sqrt(n));\n                double sg2 = sg * sg;\n                double sb2 = sb * sb;\n\n                auto c_max = [n, mn, sb2, sg2](double x) -> double {\n                    double k = mn - x;\n                    double d = k * k;\n                    double nd = n * d;\n                    double k0 = -n * nd;\n                    double k1 = sb2 - n * sg2 + nd;\n                    double det = k1 * k1 - 4 * sg2 * k0;\n                    return (int)(-2. * k0 / (k1 + std::sqrt(det)));\n                };\n\n                auto var_out = [n, sb2, sg2](double c) {\n                    double nc = n - c;\n                    return (nc / n) * (sb2 - nc * sg2);\n                };\n\n                return (std::min)(var_out(1), var_out((std::min)(c_max(0.), c_max(mg_min)))) / sb2;\n            }\n\n            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last) {\n                CATCH_INTERNAL_START_WARNINGS_SUPPRESSION\n                CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS\n                static std::random_device entropy;\n                CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION\n\n                auto n = static_cast<int>(last - first); // seriously, one can't use integral types without hell in C++\n\n                auto mean = &Detail::mean<std::vector<double>::iterator>;\n                auto stddev = &standard_deviation;\n\n#if defined(CATCH_CONFIG_USE_ASYNC)\n                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {\n                    auto seed = entropy();\n                    return std::async(std::launch::async, [=] {\n                        std::mt19937 rng(seed);\n                        auto resampled = resample(rng, n_resamples, first, last, f);\n                        return bootstrap(confidence_level, first, last, resampled, f);\n                    });\n                };\n\n                auto mean_future = Estimate(mean);\n                auto stddev_future = Estimate(stddev);\n\n                auto mean_estimate = mean_future.get();\n                auto stddev_estimate = stddev_future.get();\n#else\n                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {\n                    auto seed = entropy();\n                    std::mt19937 rng(seed);\n                    auto resampled = resample(rng, n_resamples, first, last, f);\n                    return bootstrap(confidence_level, first, last, resampled, f);\n                };\n\n                auto mean_estimate = Estimate(mean);\n                auto stddev_estimate = Estimate(stddev);\n#endif // CATCH_USE_ASYNC\n\n                double outlier_variance = Detail::outlier_variance(mean_estimate, stddev_estimate, n);\n\n                return { mean_estimate, stddev_estimate, outlier_variance };\n            }\n        } // namespace Detail\n    } // namespace Benchmark\n} // namespace Catch\n\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n// end catch_stats.cpp\n// start catch_approx.cpp\n\n#include <cmath>\n#include <limits>\n\nnamespace {\n\n// Performs equivalent check of std::fabs(lhs - rhs) <= margin\n// But without the subtraction to allow for INFINITY in comparison\n    bool marginComparison(double lhs, double rhs, double margin) {\n        return (lhs + margin >= rhs) && (rhs + margin >= lhs);\n    }\n\n}\n\nnamespace Catch {\n    namespace Detail {\n\n        Approx::Approx ( double value )\n                :   m_epsilon( std::numeric_limits<float>::epsilon()*100 ),\n                    m_margin( 0.0 ),\n                    m_scale( 0.0 ),\n                    m_value( value )\n        {}\n\n        Approx Approx::custom() {\n            return Approx( 0 );\n        }\n\n        Approx Approx::operator-() const {\n            auto temp(*this);\n            temp.m_value = -temp.m_value;\n            return temp;\n        }\n\n        std::string Approx::toString() const {\n            ReusableStringStream rss;\n            rss << \"Approx( \" << ::Catch::Detail::stringify( m_value ) << \" )\";\n            return rss.str();\n        }\n\n        bool Approx::equalityComparisonImpl(const double other) const {\n            // First try with fixed margin, then compute margin based on epsilon, scale and Approx's value\n            // Thanks to Richard Harris for his help refining the scaled margin value\n            return marginComparison(m_value, other, m_margin)\n                   || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(std::isinf(m_value)? 0 : m_value)));\n        }\n\n        void Approx::setMargin(double newMargin) {\n            CATCH_ENFORCE(newMargin >= 0,\n                          \"Invalid Approx::margin: \" << newMargin << '.'\n                                                     << \" Approx::Margin has to be non-negative.\");\n            m_margin = newMargin;\n        }\n\n        void Approx::setEpsilon(double newEpsilon) {\n            CATCH_ENFORCE(newEpsilon >= 0 && newEpsilon <= 1.0,\n                          \"Invalid Approx::epsilon: \" << newEpsilon << '.'\n                                                      << \" Approx::epsilon has to be in [0, 1]\");\n            m_epsilon = newEpsilon;\n        }\n\n    } // end namespace Detail\n\n    namespace literals {\n        Detail::Approx operator \"\" _a(long double val) {\n            return Detail::Approx(val);\n        }\n        Detail::Approx operator \"\" _a(unsigned long long val) {\n            return Detail::Approx(val);\n        }\n    } // end namespace literals\n\n    std::string StringMaker<Catch::Detail::Approx>::convert(Catch::Detail::Approx const& value) {\n        return value.toString();\n    }\n\n} // end namespace Catch\n// end catch_approx.cpp\n// start catch_assertionhandler.cpp\n\n// start catch_debugger.h\n\nnamespace Catch {\n    bool isDebuggerActive();\n}\n\n#ifdef CATCH_PLATFORM_MAC\n\n#if defined(__i386__) || defined(__x86_64__)\n        #define CATCH_TRAP() __asm__(\"int $3\\n\" : : ) /* NOLINT */\n    #elif defined(__aarch64__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xd4200000\")\n    #endif\n\n#elif defined(CATCH_PLATFORM_IPHONE)\n\n// use inline assembler\n    #if defined(__i386__) || defined(__x86_64__)\n        #define CATCH_TRAP()  __asm__(\"int $3\")\n    #elif defined(__aarch64__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xd4200000\")\n    #elif defined(__arm__) && !defined(__thumb__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xe7f001f0\")\n    #elif defined(__arm__) &&  defined(__thumb__)\n        #define CATCH_TRAP()  __asm__(\".inst 0xde01\")\n    #endif\n\n#elif defined(CATCH_PLATFORM_LINUX)\n// If we can use inline assembler, do it because this allows us to break\n// directly at the location of the failing check instead of breaking inside\n// raise() called from it, i.e. one stack frame below.\n#if defined(__GNUC__) && (defined(__i386) || defined(__x86_64))\n#define CATCH_TRAP() asm volatile (\"int $3\") /* NOLINT */\n#else // Fall back to the generic way.\n#include <signal.h>\n\n        #define CATCH_TRAP() raise(SIGTRAP)\n#endif\n#elif defined(_MSC_VER)\n#define CATCH_TRAP() __debugbreak()\n#elif defined(__MINGW32__)\n    extern \"C\" __declspec(dllimport) void __stdcall DebugBreak();\n    #define CATCH_TRAP() DebugBreak()\n#endif\n\n#ifndef CATCH_BREAK_INTO_DEBUGGER\n#ifdef CATCH_TRAP\n#define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }()\n#else\n#define CATCH_BREAK_INTO_DEBUGGER() []{}()\n#endif\n#endif\n\n// end catch_debugger.h\n// start catch_run_context.h\n\n// start catch_fatal_condition.h\n\n#include <cassert>\n\nnamespace Catch {\n\n    // Wrapper for platform-specific fatal error (signals/SEH) handlers\n    //\n    // Tries to be cooperative with other handlers, and not step over\n    // other handlers. This means that unknown structured exceptions\n    // are passed on, previous signal handlers are called, and so on.\n    //\n    // Can only be instantiated once, and assumes that once a signal\n    // is caught, the binary will end up terminating. Thus, there\n    class FatalConditionHandler {\n        bool m_started = false;\n\n        // Install/disengage implementation for specific platform.\n        // Should be if-defed to work on current platform, can assume\n        // engage-disengage 1:1 pairing.\n        void engage_platform();\n        void disengage_platform();\n    public:\n        // Should also have platform-specific implementations as needed\n        FatalConditionHandler();\n        ~FatalConditionHandler();\n\n        void engage() {\n            assert(!m_started && \"Handler cannot be installed twice.\");\n            m_started = true;\n            engage_platform();\n        }\n\n        void disengage() {\n            assert(m_started && \"Handler cannot be uninstalled without being installed first\");\n            m_started = false;\n            disengage_platform();\n        }\n    };\n\n    //! Simple RAII guard for (dis)engaging the FatalConditionHandler\n    class FatalConditionHandlerGuard {\n        FatalConditionHandler* m_handler;\n    public:\n        FatalConditionHandlerGuard(FatalConditionHandler* handler):\n                m_handler(handler) {\n            m_handler->engage();\n        }\n        ~FatalConditionHandlerGuard() {\n            m_handler->disengage();\n        }\n    };\n\n} // end namespace Catch\n\n// end catch_fatal_condition.h\n#include <string>\n\nnamespace Catch {\n\n    struct IMutableContext;\n\n    ///////////////////////////////////////////////////////////////////////////\n\n    class RunContext : public IResultCapture, public IRunner {\n\n    public:\n        RunContext( RunContext const& ) = delete;\n        RunContext& operator =( RunContext const& ) = delete;\n\n        explicit RunContext( IConfigPtr const& _config, IStreamingReporterPtr&& reporter );\n\n        ~RunContext() override;\n\n        void testGroupStarting( std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount );\n        void testGroupEnded( std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount );\n\n        Totals runTest(TestCase const& testCase);\n\n        IConfigPtr config() const;\n        IStreamingReporter& reporter() const;\n\n    public: // IResultCapture\n\n        // Assertion handlers\n        void handleExpr\n                (   AssertionInfo const& info,\n                    ITransientExpression const& expr,\n                    AssertionReaction& reaction ) override;\n        void handleMessage\n                (   AssertionInfo const& info,\n                    ResultWas::OfType resultType,\n                    StringRef const& message,\n                    AssertionReaction& reaction ) override;\n        void handleUnexpectedExceptionNotThrown\n                (   AssertionInfo const& info,\n                    AssertionReaction& reaction ) override;\n        void handleUnexpectedInflightException\n                (   AssertionInfo const& info,\n                    std::string const& message,\n                    AssertionReaction& reaction ) override;\n        void handleIncomplete\n                (   AssertionInfo const& info ) override;\n        void handleNonExpr\n                (   AssertionInfo const &info,\n                    ResultWas::OfType resultType,\n                    AssertionReaction &reaction ) override;\n\n        bool sectionStarted( SectionInfo const& sectionInfo, Counts& assertions ) override;\n\n        void sectionEnded( SectionEndInfo const& endInfo ) override;\n        void sectionEndedEarly( SectionEndInfo const& endInfo ) override;\n\n        auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override;\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing( std::string const& name ) override;\n        void benchmarkStarting( BenchmarkInfo const& info ) override;\n        void benchmarkEnded( BenchmarkStats<> const& stats ) override;\n        void benchmarkFailed( std::string const& error ) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        void pushScopedMessage( MessageInfo const& message ) override;\n        void popScopedMessage( MessageInfo const& message ) override;\n\n        void emplaceUnscopedMessage( MessageBuilder const& builder ) override;\n\n        std::string getCurrentTestName() const override;\n\n        const AssertionResult* getLastResult() const override;\n\n        void exceptionEarlyReported() override;\n\n        void handleFatalErrorCondition( StringRef message ) override;\n\n        bool lastAssertionPassed() override;\n\n        void assertionPassed() override;\n\n    public:\n        // !TBD We need to do this another way!\n        bool aborting() const final;\n\n    private:\n\n        void runCurrentTest( std::string& redirectedCout, std::string& redirectedCerr );\n        void invokeActiveTestCase();\n\n        void resetAssertionInfo();\n        bool testForMissingAssertions( Counts& assertions );\n\n        void assertionEnded( AssertionResult const& result );\n        void reportExpr\n                (   AssertionInfo const &info,\n                    ResultWas::OfType resultType,\n                    ITransientExpression const *expr,\n                    bool negated );\n\n        void populateReaction( AssertionReaction& reaction );\n\n    private:\n\n        void handleUnfinishedSections();\n\n        TestRunInfo m_runInfo;\n        IMutableContext& m_context;\n        TestCase const* m_activeTestCase = nullptr;\n        ITracker* m_testCaseTracker = nullptr;\n        Option<AssertionResult> m_lastResult;\n\n        IConfigPtr m_config;\n        Totals m_totals;\n        IStreamingReporterPtr m_reporter;\n        std::vector<MessageInfo> m_messages;\n        std::vector<ScopedMessage> m_messageScopes; /* Keeps owners of so-called unscoped messages. */\n        AssertionInfo m_lastAssertionInfo;\n        std::vector<SectionEndInfo> m_unfinishedSections;\n        std::vector<ITracker*> m_activeSections;\n        TrackerContext m_trackerContext;\n        FatalConditionHandler m_fatalConditionhandler;\n        bool m_lastAssertionPassed = false;\n        bool m_shouldReportUnexpected = true;\n        bool m_includeSuccessfulResults;\n    };\n\n    void seedRng(IConfig const& config);\n    unsigned int rngSeed();\n} // end namespace Catch\n\n// end catch_run_context.h\nnamespace Catch {\n\n    namespace {\n        auto operator <<( std::ostream& os, ITransientExpression const& expr ) -> std::ostream& {\n            expr.streamReconstructedExpression( os );\n            return os;\n        }\n    }\n\n    LazyExpression::LazyExpression( bool isNegated )\n            :   m_isNegated( isNegated )\n    {}\n\n    LazyExpression::LazyExpression( LazyExpression const& other ) : m_isNegated( other.m_isNegated ) {}\n\n    LazyExpression::operator bool() const {\n        return m_transientExpression != nullptr;\n    }\n\n    auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream& {\n        if( lazyExpr.m_isNegated )\n            os << \"!\";\n\n        if( lazyExpr ) {\n            if( lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression() )\n                os << \"(\" << *lazyExpr.m_transientExpression << \")\";\n            else\n                os << *lazyExpr.m_transientExpression;\n        }\n        else {\n            os << \"{** error - unchecked empty expression requested **}\";\n        }\n        return os;\n    }\n\n    AssertionHandler::AssertionHandler\n            (   StringRef const& macroName,\n                SourceLineInfo const& lineInfo,\n                StringRef capturedExpression,\n                ResultDisposition::Flags resultDisposition )\n            :   m_assertionInfo{ macroName, lineInfo, capturedExpression, resultDisposition },\n                m_resultCapture( getResultCapture() )\n    {}\n\n    void AssertionHandler::handleExpr( ITransientExpression const& expr ) {\n        m_resultCapture.handleExpr( m_assertionInfo, expr, m_reaction );\n    }\n    void AssertionHandler::handleMessage(ResultWas::OfType resultType, StringRef const& message) {\n        m_resultCapture.handleMessage( m_assertionInfo, resultType, message, m_reaction );\n    }\n\n    auto AssertionHandler::allowThrows() const -> bool {\n        return getCurrentContext().getConfig()->allowThrows();\n    }\n\n    void AssertionHandler::complete() {\n        setCompleted();\n        if( m_reaction.shouldDebugBreak ) {\n\n            // If you find your debugger stopping you here then go one level up on the\n            // call-stack for the code that caused it (typically a failed assertion)\n\n            // (To go back to the test and change execution, jump over the throw, next)\n            CATCH_BREAK_INTO_DEBUGGER();\n        }\n        if (m_reaction.shouldThrow) {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n            throw Catch::TestFailureException();\n#else\n            CATCH_ERROR( \"Test failure requires aborting test!\" );\n#endif\n        }\n    }\n    void AssertionHandler::setCompleted() {\n        m_completed = true;\n    }\n\n    void AssertionHandler::handleUnexpectedInflightException() {\n        m_resultCapture.handleUnexpectedInflightException( m_assertionInfo, Catch::translateActiveException(), m_reaction );\n    }\n\n    void AssertionHandler::handleExceptionThrownAsExpected() {\n        m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction);\n    }\n    void AssertionHandler::handleExceptionNotThrownAsExpected() {\n        m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction);\n    }\n\n    void AssertionHandler::handleUnexpectedExceptionNotThrown() {\n        m_resultCapture.handleUnexpectedExceptionNotThrown( m_assertionInfo, m_reaction );\n    }\n\n    void AssertionHandler::handleThrowingCallSkipped() {\n        m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction);\n    }\n\n    // This is the overload that takes a string and infers the Equals matcher from it\n    // The more general overload, that takes any string matcher, is in catch_capture_matchers.cpp\n    void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString  ) {\n        handleExceptionMatchExpr( handler, Matchers::Equals( str ), matcherString );\n    }\n\n} // namespace Catch\n// end catch_assertionhandler.cpp\n// start catch_assertionresult.cpp\n\nnamespace Catch {\n    AssertionResultData::AssertionResultData(ResultWas::OfType _resultType, LazyExpression const & _lazyExpression):\n            lazyExpression(_lazyExpression),\n            resultType(_resultType) {}\n\n    std::string AssertionResultData::reconstructExpression() const {\n\n        if( reconstructedExpression.empty() ) {\n            if( lazyExpression ) {\n                ReusableStringStream rss;\n                rss << lazyExpression;\n                reconstructedExpression = rss.str();\n            }\n        }\n        return reconstructedExpression;\n    }\n\n    AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData const& data )\n            :   m_info( info ),\n                m_resultData( data )\n    {}\n\n    // Result was a success\n    bool AssertionResult::succeeded() const {\n        return Catch::isOk( m_resultData.resultType );\n    }\n\n    // Result was a success, or failure is suppressed\n    bool AssertionResult::isOk() const {\n        return Catch::isOk( m_resultData.resultType ) || shouldSuppressFailure( m_info.resultDisposition );\n    }\n\n    ResultWas::OfType AssertionResult::getResultType() const {\n        return m_resultData.resultType;\n    }\n\n    bool AssertionResult::hasExpression() const {\n        return !m_info.capturedExpression.empty();\n    }\n\n    bool AssertionResult::hasMessage() const {\n        return !m_resultData.message.empty();\n    }\n\n    std::string AssertionResult::getExpression() const {\n        // Possibly overallocating by 3 characters should be basically free\n        std::string expr; expr.reserve(m_info.capturedExpression.size() + 3);\n        if (isFalseTest(m_info.resultDisposition)) {\n            expr += \"!(\";\n        }\n        expr += m_info.capturedExpression;\n        if (isFalseTest(m_info.resultDisposition)) {\n            expr += ')';\n        }\n        return expr;\n    }\n\n    std::string AssertionResult::getExpressionInMacro() const {\n        std::string expr;\n        if( m_info.macroName.empty() )\n            expr = static_cast<std::string>(m_info.capturedExpression);\n        else {\n            expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 );\n            expr += m_info.macroName;\n            expr += \"( \";\n            expr += m_info.capturedExpression;\n            expr += \" )\";\n        }\n        return expr;\n    }\n\n    bool AssertionResult::hasExpandedExpression() const {\n        return hasExpression() && getExpandedExpression() != getExpression();\n    }\n\n    std::string AssertionResult::getExpandedExpression() const {\n        std::string expr = m_resultData.reconstructExpression();\n        return expr.empty()\n               ? getExpression()\n               : expr;\n    }\n\n    std::string AssertionResult::getMessage() const {\n        return m_resultData.message;\n    }\n    SourceLineInfo AssertionResult::getSourceInfo() const {\n        return m_info.lineInfo;\n    }\n\n    StringRef AssertionResult::getTestMacroName() const {\n        return m_info.macroName;\n    }\n\n} // end namespace Catch\n// end catch_assertionresult.cpp\n// start catch_capture_matchers.cpp\n\nnamespace Catch {\n\n    using StringMatcher = Matchers::Impl::MatcherBase<std::string>;\n\n    // This is the general overload that takes a any string matcher\n    // There is another overload, in catch_assertionhandler.h/.cpp, that only takes a string and infers\n    // the Equals matcher (so the header does not mention matchers)\n    void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef const& matcherString  ) {\n        std::string exceptionMessage = Catch::translateActiveException();\n        MatchExpr<std::string, StringMatcher const&> expr( exceptionMessage, matcher, matcherString );\n        handler.handleExpr( expr );\n    }\n\n} // namespace Catch\n// end catch_capture_matchers.cpp\n// start catch_commandline.cpp\n\n// start catch_commandline.h\n\n// start catch_clara.h\n\n// Use Catch's value for console width (store Clara's off to the side, if present)\n#ifdef CLARA_CONFIG_CONSOLE_WIDTH\n#define CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#undef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#endif\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH-1\n\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wweak-vtables\"\n#pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#pragma clang diagnostic ignored \"-Wshadow\"\n#endif\n\n// start clara.hpp\n// Copyright 2017 Two Blue Cubes Ltd. All rights reserved.\n//\n// Distributed under the Boost Software License, Version 1.0. (See accompanying\n// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n//\n// See https://github.com/philsquared/Clara for more details\n\n// Clara v1.1.5\n\n\n#ifndef CATCH_CLARA_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_CONFIG_CONSOLE_WIDTH 80\n#endif\n\n#ifndef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CLARA_CONFIG_CONSOLE_WIDTH\n#endif\n\n#ifndef CLARA_CONFIG_OPTIONAL_TYPE\n#ifdef __has_include\n#if __has_include(<optional>) && __cplusplus >= 201703L\n#include <optional>\n#define CLARA_CONFIG_OPTIONAL_TYPE std::optional\n#endif\n#endif\n#endif\n\n// ----------- #included from clara_textflow.hpp -----------\n\n// TextFlowCpp\n//\n// A single-header library for wrapping and laying out basic text, by Phil Nash\n//\n// Distributed under the Boost Software License, Version 1.0. (See accompanying\n// file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n//\n// This project is hosted at https://github.com/philsquared/textflowcpp\n\n\n#include <cassert>\n#include <ostream>\n#include <sstream>\n#include <vector>\n\n#ifndef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH 80\n#endif\n\nnamespace Catch {\n    namespace clara {\n        namespace TextFlow {\n\n            inline auto isWhitespace(char c) -> bool {\n                static std::string chars = \" \\t\\n\\r\";\n                return chars.find(c) != std::string::npos;\n            }\n            inline auto isBreakableBefore(char c) -> bool {\n                static std::string chars = \"[({<|\";\n                return chars.find(c) != std::string::npos;\n            }\n            inline auto isBreakableAfter(char c) -> bool {\n                static std::string chars = \"])}>.,:;*+-=&/\\\\\";\n                return chars.find(c) != std::string::npos;\n            }\n\n            class Columns;\n\n            class Column {\n                std::vector<std::string> m_strings;\n                size_t m_width = CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH;\n                size_t m_indent = 0;\n                size_t m_initialIndent = std::string::npos;\n\n            public:\n                class iterator {\n                    friend Column;\n\n                    Column const& m_column;\n                    size_t m_stringIndex = 0;\n                    size_t m_pos = 0;\n\n                    size_t m_len = 0;\n                    size_t m_end = 0;\n                    bool m_suffix = false;\n\n                    iterator(Column const& column, size_t stringIndex)\n                            : m_column(column),\n                              m_stringIndex(stringIndex) {}\n\n                    auto line() const -> std::string const& { return m_column.m_strings[m_stringIndex]; }\n\n                    auto isBoundary(size_t at) const -> bool {\n                        assert(at > 0);\n                        assert(at <= line().size());\n\n                        return at == line().size() ||\n                               (isWhitespace(line()[at]) && !isWhitespace(line()[at - 1])) ||\n                               isBreakableBefore(line()[at]) ||\n                               isBreakableAfter(line()[at - 1]);\n                    }\n\n                    void calcLength() {\n                        assert(m_stringIndex < m_column.m_strings.size());\n\n                        m_suffix = false;\n                        auto width = m_column.m_width - indent();\n                        m_end = m_pos;\n                        if (line()[m_pos] == '\\n') {\n                            ++m_end;\n                        }\n                        while (m_end < line().size() && line()[m_end] != '\\n')\n                            ++m_end;\n\n                        if (m_end < m_pos + width) {\n                            m_len = m_end - m_pos;\n                        } else {\n                            size_t len = width;\n                            while (len > 0 && !isBoundary(m_pos + len))\n                                --len;\n                            while (len > 0 && isWhitespace(line()[m_pos + len - 1]))\n                                --len;\n\n                            if (len > 0) {\n                                m_len = len;\n                            } else {\n                                m_suffix = true;\n                                m_len = width - 1;\n                            }\n                        }\n                    }\n\n                    auto indent() const -> size_t {\n                        auto initial = m_pos == 0 && m_stringIndex == 0 ? m_column.m_initialIndent : std::string::npos;\n                        return initial == std::string::npos ? m_column.m_indent : initial;\n                    }\n\n                    auto addIndentAndSuffix(std::string const &plain) const -> std::string {\n                        return std::string(indent(), ' ') + (m_suffix ? plain + \"-\" : plain);\n                    }\n\n                public:\n                    using difference_type = std::ptrdiff_t;\n                    using value_type = std::string;\n                    using pointer = value_type * ;\n                    using reference = value_type & ;\n                    using iterator_category = std::forward_iterator_tag;\n\n                    explicit iterator(Column const& column) : m_column(column) {\n                        assert(m_column.m_width > m_column.m_indent);\n                        assert(m_column.m_initialIndent == std::string::npos || m_column.m_width > m_column.m_initialIndent);\n                        calcLength();\n                        if (m_len == 0)\n                            m_stringIndex++; // Empty string\n                    }\n\n                    auto operator *() const -> std::string {\n                        assert(m_stringIndex < m_column.m_strings.size());\n                        assert(m_pos <= m_end);\n                        return addIndentAndSuffix(line().substr(m_pos, m_len));\n                    }\n\n                    auto operator ++() -> iterator& {\n                        m_pos += m_len;\n                        if (m_pos < line().size() && line()[m_pos] == '\\n')\n                            m_pos += 1;\n                        else\n                            while (m_pos < line().size() && isWhitespace(line()[m_pos]))\n                                ++m_pos;\n\n                        if (m_pos == line().size()) {\n                            m_pos = 0;\n                            ++m_stringIndex;\n                        }\n                        if (m_stringIndex < m_column.m_strings.size())\n                            calcLength();\n                        return *this;\n                    }\n                    auto operator ++(int) -> iterator {\n                        iterator prev(*this);\n                        operator++();\n                        return prev;\n                    }\n\n                    auto operator ==(iterator const& other) const -> bool {\n                        return\n                                m_pos == other.m_pos &&\n                                m_stringIndex == other.m_stringIndex &&\n                                &m_column == &other.m_column;\n                    }\n                    auto operator !=(iterator const& other) const -> bool {\n                        return !operator==(other);\n                    }\n                };\n                using const_iterator = iterator;\n\n                explicit Column(std::string const& text) { m_strings.push_back(text); }\n\n                auto width(size_t newWidth) -> Column& {\n                    assert(newWidth > 0);\n                    m_width = newWidth;\n                    return *this;\n                }\n                auto indent(size_t newIndent) -> Column& {\n                    m_indent = newIndent;\n                    return *this;\n                }\n                auto initialIndent(size_t newIndent) -> Column& {\n                    m_initialIndent = newIndent;\n                    return *this;\n                }\n\n                auto width() const -> size_t { return m_width; }\n                auto begin() const -> iterator { return iterator(*this); }\n                auto end() const -> iterator { return { *this, m_strings.size() }; }\n\n                inline friend std::ostream& operator << (std::ostream& os, Column const& col) {\n                    bool first = true;\n                    for (auto line : col) {\n                        if (first)\n                            first = false;\n                        else\n                            os << \"\\n\";\n                        os << line;\n                    }\n                    return os;\n                }\n\n                auto operator + (Column const& other)->Columns;\n\n                auto toString() const -> std::string {\n                    std::ostringstream oss;\n                    oss << *this;\n                    return oss.str();\n                }\n            };\n\n            class Spacer : public Column {\n\n            public:\n                explicit Spacer(size_t spaceWidth) : Column(\"\") {\n                    width(spaceWidth);\n                }\n            };\n\n            class Columns {\n                std::vector<Column> m_columns;\n\n            public:\n\n                class iterator {\n                    friend Columns;\n                    struct EndTag {};\n\n                    std::vector<Column> const& m_columns;\n                    std::vector<Column::iterator> m_iterators;\n                    size_t m_activeIterators;\n\n                    iterator(Columns const& columns, EndTag)\n                            : m_columns(columns.m_columns),\n                              m_activeIterators(0) {\n                        m_iterators.reserve(m_columns.size());\n\n                        for (auto const& col : m_columns)\n                            m_iterators.push_back(col.end());\n                    }\n\n                public:\n                    using difference_type = std::ptrdiff_t;\n                    using value_type = std::string;\n                    using pointer = value_type * ;\n                    using reference = value_type & ;\n                    using iterator_category = std::forward_iterator_tag;\n\n                    explicit iterator(Columns const& columns)\n                            : m_columns(columns.m_columns),\n                              m_activeIterators(m_columns.size()) {\n                        m_iterators.reserve(m_columns.size());\n\n                        for (auto const& col : m_columns)\n                            m_iterators.push_back(col.begin());\n                    }\n\n                    auto operator ==(iterator const& other) const -> bool {\n                        return m_iterators == other.m_iterators;\n                    }\n                    auto operator !=(iterator const& other) const -> bool {\n                        return m_iterators != other.m_iterators;\n                    }\n                    auto operator *() const -> std::string {\n                        std::string row, padding;\n\n                        for (size_t i = 0; i < m_columns.size(); ++i) {\n                            auto width = m_columns[i].width();\n                            if (m_iterators[i] != m_columns[i].end()) {\n                                std::string col = *m_iterators[i];\n                                row += padding + col;\n                                if (col.size() < width)\n                                    padding = std::string(width - col.size(), ' ');\n                                else\n                                    padding = \"\";\n                            } else {\n                                padding += std::string(width, ' ');\n                            }\n                        }\n                        return row;\n                    }\n                    auto operator ++() -> iterator& {\n                        for (size_t i = 0; i < m_columns.size(); ++i) {\n                            if (m_iterators[i] != m_columns[i].end())\n                                ++m_iterators[i];\n                        }\n                        return *this;\n                    }\n                    auto operator ++(int) -> iterator {\n                        iterator prev(*this);\n                        operator++();\n                        return prev;\n                    }\n                };\n                using const_iterator = iterator;\n\n                auto begin() const -> iterator { return iterator(*this); }\n                auto end() const -> iterator { return { *this, iterator::EndTag() }; }\n\n                auto operator += (Column const& col) -> Columns& {\n                    m_columns.push_back(col);\n                    return *this;\n                }\n                auto operator + (Column const& col) -> Columns {\n                    Columns combined = *this;\n                    combined += col;\n                    return combined;\n                }\n\n                inline friend std::ostream& operator << (std::ostream& os, Columns const& cols) {\n\n                    bool first = true;\n                    for (auto line : cols) {\n                        if (first)\n                            first = false;\n                        else\n                            os << \"\\n\";\n                        os << line;\n                    }\n                    return os;\n                }\n\n                auto toString() const -> std::string {\n                    std::ostringstream oss;\n                    oss << *this;\n                    return oss.str();\n                }\n            };\n\n            inline auto Column::operator + (Column const& other) -> Columns {\n                Columns cols;\n                cols += *this;\n                cols += other;\n                return cols;\n            }\n        }\n\n    }\n}\n\n// ----------- end of #include from clara_textflow.hpp -----------\n// ........... back in clara.hpp\n\n#include <cctype>\n#include <string>\n#include <memory>\n#include <set>\n#include <algorithm>\n\n#if !defined(CATCH_PLATFORM_WINDOWS) && ( defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) )\n#define CATCH_PLATFORM_WINDOWS\n#endif\n\nnamespace Catch { namespace clara {\n        namespace detail {\n\n            // Traits for extracting arg and return type of lambdas (for single argument lambdas)\n            template<typename L>\n            struct UnaryLambdaTraits : UnaryLambdaTraits<decltype( &L::operator() )> {};\n\n            template<typename ClassT, typename ReturnT, typename... Args>\n            struct UnaryLambdaTraits<ReturnT( ClassT::* )( Args... ) const> {\n                static const bool isValid = false;\n            };\n\n            template<typename ClassT, typename ReturnT, typename ArgT>\n            struct UnaryLambdaTraits<ReturnT( ClassT::* )( ArgT ) const> {\n                static const bool isValid = true;\n                using ArgType = typename std::remove_const<typename std::remove_reference<ArgT>::type>::type;\n                using ReturnType = ReturnT;\n            };\n\n            class TokenStream;\n\n            // Transport for raw args (copied from main args, or supplied via init list for testing)\n            class Args {\n                friend TokenStream;\n                std::string m_exeName;\n                std::vector<std::string> m_args;\n\n            public:\n                Args( int argc, char const* const* argv )\n                        : m_exeName(argv[0]),\n                          m_args(argv + 1, argv + argc) {}\n\n                Args( std::initializer_list<std::string> args )\n                        :   m_exeName( *args.begin() ),\n                            m_args( args.begin()+1, args.end() )\n                {}\n\n                auto exeName() const -> std::string {\n                    return m_exeName;\n                }\n            };\n\n            // Wraps a token coming from a token stream. These may not directly correspond to strings as a single string\n            // may encode an option + its argument if the : or = form is used\n            enum class TokenType {\n                Option, Argument\n            };\n            struct Token {\n                TokenType type;\n                std::string token;\n            };\n\n            inline auto isOptPrefix( char c ) -> bool {\n                return c == '-'\n#ifdef CATCH_PLATFORM_WINDOWS\n                    || c == '/'\n#endif\n                        ;\n            }\n\n            // Abstracts iterators into args as a stream of tokens, with option arguments uniformly handled\n            class TokenStream {\n                using Iterator = std::vector<std::string>::const_iterator;\n                Iterator it;\n                Iterator itEnd;\n                std::vector<Token> m_tokenBuffer;\n\n                void loadBuffer() {\n                    m_tokenBuffer.resize( 0 );\n\n                    // Skip any empty strings\n                    while( it != itEnd && it->empty() )\n                        ++it;\n\n                    if( it != itEnd ) {\n                        auto const &next = *it;\n                        if( isOptPrefix( next[0] ) ) {\n                            auto delimiterPos = next.find_first_of( \" :=\" );\n                            if( delimiterPos != std::string::npos ) {\n                                m_tokenBuffer.push_back( { TokenType::Option, next.substr( 0, delimiterPos ) } );\n                                m_tokenBuffer.push_back( { TokenType::Argument, next.substr( delimiterPos + 1 ) } );\n                            } else {\n                                if( next[1] != '-' && next.size() > 2 ) {\n                                    std::string opt = \"- \";\n                                    for( size_t i = 1; i < next.size(); ++i ) {\n                                        opt[1] = next[i];\n                                        m_tokenBuffer.push_back( { TokenType::Option, opt } );\n                                    }\n                                } else {\n                                    m_tokenBuffer.push_back( { TokenType::Option, next } );\n                                }\n                            }\n                        } else {\n                            m_tokenBuffer.push_back( { TokenType::Argument, next } );\n                        }\n                    }\n                }\n\n            public:\n                explicit TokenStream( Args const &args ) : TokenStream( args.m_args.begin(), args.m_args.end() ) {}\n\n                TokenStream( Iterator it, Iterator itEnd ) : it( it ), itEnd( itEnd ) {\n                    loadBuffer();\n                }\n\n                explicit operator bool() const {\n                    return !m_tokenBuffer.empty() || it != itEnd;\n                }\n\n                auto count() const -> size_t { return m_tokenBuffer.size() + (itEnd - it); }\n\n                auto operator*() const -> Token {\n                    assert( !m_tokenBuffer.empty() );\n                    return m_tokenBuffer.front();\n                }\n\n                auto operator->() const -> Token const * {\n                    assert( !m_tokenBuffer.empty() );\n                    return &m_tokenBuffer.front();\n                }\n\n                auto operator++() -> TokenStream & {\n                    if( m_tokenBuffer.size() >= 2 ) {\n                        m_tokenBuffer.erase( m_tokenBuffer.begin() );\n                    } else {\n                        if( it != itEnd )\n                            ++it;\n                        loadBuffer();\n                    }\n                    return *this;\n                }\n            };\n\n            class ResultBase {\n            public:\n                enum Type {\n                    Ok, LogicError, RuntimeError\n                };\n\n            protected:\n                ResultBase( Type type ) : m_type( type ) {}\n                virtual ~ResultBase() = default;\n\n                virtual void enforceOk() const = 0;\n\n                Type m_type;\n            };\n\n            template<typename T>\n            class ResultValueBase : public ResultBase {\n            public:\n                auto value() const -> T const & {\n                    enforceOk();\n                    return m_value;\n                }\n\n            protected:\n                ResultValueBase( Type type ) : ResultBase( type ) {}\n\n                ResultValueBase( ResultValueBase const &other ) : ResultBase( other ) {\n                    if( m_type == ResultBase::Ok )\n                        new( &m_value ) T( other.m_value );\n                }\n\n                ResultValueBase( Type, T const &value ) : ResultBase( Ok ) {\n                    new( &m_value ) T( value );\n                }\n\n                auto operator=( ResultValueBase const &other ) -> ResultValueBase & {\n                    if( m_type == ResultBase::Ok )\n                        m_value.~T();\n                    ResultBase::operator=(other);\n                    if( m_type == ResultBase::Ok )\n                        new( &m_value ) T( other.m_value );\n                    return *this;\n                }\n\n                ~ResultValueBase() override {\n                    if( m_type == Ok )\n                        m_value.~T();\n                }\n\n                union {\n                    T m_value;\n                };\n            };\n\n            template<>\n            class ResultValueBase<void> : public ResultBase {\n            protected:\n                using ResultBase::ResultBase;\n            };\n\n            template<typename T = void>\n            class BasicResult : public ResultValueBase<T> {\n            public:\n                template<typename U>\n                explicit BasicResult( BasicResult<U> const &other )\n                        :   ResultValueBase<T>( other.type() ),\n                            m_errorMessage( other.errorMessage() )\n                {\n                    assert( type() != ResultBase::Ok );\n                }\n\n                template<typename U>\n                static auto ok( U const &value ) -> BasicResult { return { ResultBase::Ok, value }; }\n                static auto ok() -> BasicResult { return { ResultBase::Ok }; }\n                static auto logicError( std::string const &message ) -> BasicResult { return { ResultBase::LogicError, message }; }\n                static auto runtimeError( std::string const &message ) -> BasicResult { return { ResultBase::RuntimeError, message }; }\n\n                explicit operator bool() const { return m_type == ResultBase::Ok; }\n                auto type() const -> ResultBase::Type { return m_type; }\n                auto errorMessage() const -> std::string { return m_errorMessage; }\n\n            protected:\n                void enforceOk() const override {\n\n                    // Errors shouldn't reach this point, but if they do\n                    // the actual error message will be in m_errorMessage\n                    assert( m_type != ResultBase::LogicError );\n                    assert( m_type != ResultBase::RuntimeError );\n                    if( m_type != ResultBase::Ok )\n                        std::abort();\n                }\n\n                std::string m_errorMessage; // Only populated if resultType is an error\n\n                BasicResult( ResultBase::Type type, std::string const &message )\n                        :   ResultValueBase<T>(type),\n                            m_errorMessage(message)\n                {\n                    assert( m_type != ResultBase::Ok );\n                }\n\n                using ResultValueBase<T>::ResultValueBase;\n                using ResultBase::m_type;\n            };\n\n            enum class ParseResultType {\n                Matched, NoMatch, ShortCircuitAll, ShortCircuitSame\n            };\n\n            class ParseState {\n            public:\n\n                ParseState( ParseResultType type, TokenStream const &remainingTokens )\n                        : m_type(type),\n                          m_remainingTokens( remainingTokens )\n                {}\n\n                auto type() const -> ParseResultType { return m_type; }\n                auto remainingTokens() const -> TokenStream { return m_remainingTokens; }\n\n            private:\n                ParseResultType m_type;\n                TokenStream m_remainingTokens;\n            };\n\n            using Result = BasicResult<void>;\n            using ParserResult = BasicResult<ParseResultType>;\n            using InternalParseResult = BasicResult<ParseState>;\n\n            struct HelpColumns {\n                std::string left;\n                std::string right;\n            };\n\n            template<typename T>\n            inline auto convertInto( std::string const &source, T& target ) -> ParserResult {\n                std::stringstream ss;\n                ss << source;\n                ss >> target;\n                if( ss.fail() )\n                    return ParserResult::runtimeError( \"Unable to convert '\" + source + \"' to destination type\" );\n                else\n                    return ParserResult::ok( ParseResultType::Matched );\n            }\n            inline auto convertInto( std::string const &source, std::string& target ) -> ParserResult {\n                target = source;\n                return ParserResult::ok( ParseResultType::Matched );\n            }\n            inline auto convertInto( std::string const &source, bool &target ) -> ParserResult {\n                std::string srcLC = source;\n                std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( std::tolower(c) ); } );\n                if (srcLC == \"y\" || srcLC == \"1\" || srcLC == \"true\" || srcLC == \"yes\" || srcLC == \"on\")\n                    target = true;\n                else if (srcLC == \"n\" || srcLC == \"0\" || srcLC == \"false\" || srcLC == \"no\" || srcLC == \"off\")\n                    target = false;\n                else\n                    return ParserResult::runtimeError( \"Expected a boolean value but did not recognise: '\" + source + \"'\" );\n                return ParserResult::ok( ParseResultType::Matched );\n            }\n#ifdef CLARA_CONFIG_OPTIONAL_TYPE\n            template<typename T>\n            inline auto convertInto( std::string const &source, CLARA_CONFIG_OPTIONAL_TYPE<T>& target ) -> ParserResult {\n                T temp;\n                auto result = convertInto( source, temp );\n                if( result )\n                    target = std::move(temp);\n                return result;\n            }\n#endif // CLARA_CONFIG_OPTIONAL_TYPE\n\n            struct NonCopyable {\n                NonCopyable() = default;\n                NonCopyable( NonCopyable const & ) = delete;\n                NonCopyable( NonCopyable && ) = delete;\n                NonCopyable &operator=( NonCopyable const & ) = delete;\n                NonCopyable &operator=( NonCopyable && ) = delete;\n            };\n\n            struct BoundRef : NonCopyable {\n                virtual ~BoundRef() = default;\n                virtual auto isContainer() const -> bool { return false; }\n                virtual auto isFlag() const -> bool { return false; }\n            };\n            struct BoundValueRefBase : BoundRef {\n                virtual auto setValue( std::string const &arg ) -> ParserResult = 0;\n            };\n            struct BoundFlagRefBase : BoundRef {\n                virtual auto setFlag( bool flag ) -> ParserResult = 0;\n                virtual auto isFlag() const -> bool { return true; }\n            };\n\n            template<typename T>\n            struct BoundValueRef : BoundValueRefBase {\n                T &m_ref;\n\n                explicit BoundValueRef( T &ref ) : m_ref( ref ) {}\n\n                auto setValue( std::string const &arg ) -> ParserResult override {\n                    return convertInto( arg, m_ref );\n                }\n            };\n\n            template<typename T>\n            struct BoundValueRef<std::vector<T>> : BoundValueRefBase {\n                std::vector<T> &m_ref;\n\n                explicit BoundValueRef( std::vector<T> &ref ) : m_ref( ref ) {}\n\n                auto isContainer() const -> bool override { return true; }\n\n                auto setValue( std::string const &arg ) -> ParserResult override {\n                    T temp;\n                    auto result = convertInto( arg, temp );\n                    if( result )\n                        m_ref.push_back( temp );\n                    return result;\n                }\n            };\n\n            struct BoundFlagRef : BoundFlagRefBase {\n                bool &m_ref;\n\n                explicit BoundFlagRef( bool &ref ) : m_ref( ref ) {}\n\n                auto setFlag( bool flag ) -> ParserResult override {\n                    m_ref = flag;\n                    return ParserResult::ok( ParseResultType::Matched );\n                }\n            };\n\n            template<typename ReturnType>\n            struct LambdaInvoker {\n                static_assert( std::is_same<ReturnType, ParserResult>::value, \"Lambda must return void or clara::ParserResult\" );\n\n                template<typename L, typename ArgType>\n                static auto invoke( L const &lambda, ArgType const &arg ) -> ParserResult {\n                    return lambda( arg );\n                }\n            };\n\n            template<>\n            struct LambdaInvoker<void> {\n                template<typename L, typename ArgType>\n                static auto invoke( L const &lambda, ArgType const &arg ) -> ParserResult {\n                    lambda( arg );\n                    return ParserResult::ok( ParseResultType::Matched );\n                }\n            };\n\n            template<typename ArgType, typename L>\n            inline auto invokeLambda( L const &lambda, std::string const &arg ) -> ParserResult {\n                ArgType temp{};\n                auto result = convertInto( arg, temp );\n                return !result\n                       ? result\n                       : LambdaInvoker<typename UnaryLambdaTraits<L>::ReturnType>::invoke( lambda, temp );\n            }\n\n            template<typename L>\n            struct BoundLambda : BoundValueRefBase {\n                L m_lambda;\n\n                static_assert( UnaryLambdaTraits<L>::isValid, \"Supplied lambda must take exactly one argument\" );\n                explicit BoundLambda( L const &lambda ) : m_lambda( lambda ) {}\n\n                auto setValue( std::string const &arg ) -> ParserResult override {\n                    return invokeLambda<typename UnaryLambdaTraits<L>::ArgType>( m_lambda, arg );\n                }\n            };\n\n            template<typename L>\n            struct BoundFlagLambda : BoundFlagRefBase {\n                L m_lambda;\n\n                static_assert( UnaryLambdaTraits<L>::isValid, \"Supplied lambda must take exactly one argument\" );\n                static_assert( std::is_same<typename UnaryLambdaTraits<L>::ArgType, bool>::value, \"flags must be boolean\" );\n\n                explicit BoundFlagLambda( L const &lambda ) : m_lambda( lambda ) {}\n\n                auto setFlag( bool flag ) -> ParserResult override {\n                    return LambdaInvoker<typename UnaryLambdaTraits<L>::ReturnType>::invoke( m_lambda, flag );\n                }\n            };\n\n            enum class Optionality { Optional, Required };\n\n            struct Parser;\n\n            class ParserBase {\n            public:\n                virtual ~ParserBase() = default;\n                virtual auto validate() const -> Result { return Result::ok(); }\n                virtual auto parse( std::string const& exeName, TokenStream const &tokens) const -> InternalParseResult  = 0;\n                virtual auto cardinality() const -> size_t { return 1; }\n\n                auto parse( Args const &args ) const -> InternalParseResult {\n                    return parse( args.exeName(), TokenStream( args ) );\n                }\n            };\n\n            template<typename DerivedT>\n            class ComposableParserImpl : public ParserBase {\n            public:\n                template<typename T>\n                auto operator|( T const &other ) const -> Parser;\n\n                template<typename T>\n                auto operator+( T const &other ) const -> Parser;\n            };\n\n            // Common code and state for Args and Opts\n            template<typename DerivedT>\n            class ParserRefImpl : public ComposableParserImpl<DerivedT> {\n            protected:\n                Optionality m_optionality = Optionality::Optional;\n                std::shared_ptr<BoundRef> m_ref;\n                std::string m_hint;\n                std::string m_description;\n\n                explicit ParserRefImpl( std::shared_ptr<BoundRef> const &ref ) : m_ref( ref ) {}\n\n            public:\n                template<typename T>\n                ParserRefImpl( T &ref, std::string const &hint )\n                        :   m_ref( std::make_shared<BoundValueRef<T>>( ref ) ),\n                            m_hint( hint )\n                {}\n\n                template<typename LambdaT>\n                ParserRefImpl( LambdaT const &ref, std::string const &hint )\n                        :   m_ref( std::make_shared<BoundLambda<LambdaT>>( ref ) ),\n                            m_hint(hint)\n                {}\n\n                auto operator()( std::string const &description ) -> DerivedT & {\n                    m_description = description;\n                    return static_cast<DerivedT &>( *this );\n                }\n\n                auto optional() -> DerivedT & {\n                    m_optionality = Optionality::Optional;\n                    return static_cast<DerivedT &>( *this );\n                };\n\n                auto required() -> DerivedT & {\n                    m_optionality = Optionality::Required;\n                    return static_cast<DerivedT &>( *this );\n                };\n\n                auto isOptional() const -> bool {\n                    return m_optionality == Optionality::Optional;\n                }\n\n                auto cardinality() const -> size_t override {\n                    if( m_ref->isContainer() )\n                        return 0;\n                    else\n                        return 1;\n                }\n\n                auto hint() const -> std::string { return m_hint; }\n            };\n\n            class ExeName : public ComposableParserImpl<ExeName> {\n                std::shared_ptr<std::string> m_name;\n                std::shared_ptr<BoundValueRefBase> m_ref;\n\n                template<typename LambdaT>\n                static auto makeRef(LambdaT const &lambda) -> std::shared_ptr<BoundValueRefBase> {\n                    return std::make_shared<BoundLambda<LambdaT>>( lambda) ;\n                }\n\n            public:\n                ExeName() : m_name( std::make_shared<std::string>( \"<executable>\" ) ) {}\n\n                explicit ExeName( std::string &ref ) : ExeName() {\n                    m_ref = std::make_shared<BoundValueRef<std::string>>( ref );\n                }\n\n                template<typename LambdaT>\n                explicit ExeName( LambdaT const& lambda ) : ExeName() {\n                    m_ref = std::make_shared<BoundLambda<LambdaT>>( lambda );\n                }\n\n                // The exe name is not parsed out of the normal tokens, but is handled specially\n                auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override {\n                    return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) );\n                }\n\n                auto name() const -> std::string { return *m_name; }\n                auto set( std::string const& newName ) -> ParserResult {\n\n                    auto lastSlash = newName.find_last_of( \"\\\\/\" );\n                    auto filename = ( lastSlash == std::string::npos )\n                                    ? newName\n                                    : newName.substr( lastSlash+1 );\n\n                    *m_name = filename;\n                    if( m_ref )\n                        return m_ref->setValue( filename );\n                    else\n                        return ParserResult::ok( ParseResultType::Matched );\n                }\n            };\n\n            class Arg : public ParserRefImpl<Arg> {\n            public:\n                using ParserRefImpl::ParserRefImpl;\n\n                auto parse( std::string const &, TokenStream const &tokens ) const -> InternalParseResult override {\n                    auto validationResult = validate();\n                    if( !validationResult )\n                        return InternalParseResult( validationResult );\n\n                    auto remainingTokens = tokens;\n                    auto const &token = *remainingTokens;\n                    if( token.type != TokenType::Argument )\n                        return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) );\n\n                    assert( !m_ref->isFlag() );\n                    auto valueRef = static_cast<detail::BoundValueRefBase*>( m_ref.get() );\n\n                    auto result = valueRef->setValue( remainingTokens->token );\n                    if( !result )\n                        return InternalParseResult( result );\n                    else\n                        return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) );\n                }\n            };\n\n            inline auto normaliseOpt( std::string const &optName ) -> std::string {\n#ifdef CATCH_PLATFORM_WINDOWS\n                if( optName[0] == '/' )\n            return \"-\" + optName.substr( 1 );\n        else\n#endif\n                return optName;\n            }\n\n            class Opt : public ParserRefImpl<Opt> {\n            protected:\n                std::vector<std::string> m_optNames;\n\n            public:\n                template<typename LambdaT>\n                explicit Opt( LambdaT const &ref ) : ParserRefImpl( std::make_shared<BoundFlagLambda<LambdaT>>( ref ) ) {}\n\n                explicit Opt( bool &ref ) : ParserRefImpl( std::make_shared<BoundFlagRef>( ref ) ) {}\n\n                template<typename LambdaT>\n                Opt( LambdaT const &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {}\n\n                template<typename T>\n                Opt( T &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {}\n\n                auto operator[]( std::string const &optName ) -> Opt & {\n                    m_optNames.push_back( optName );\n                    return *this;\n                }\n\n                auto getHelpColumns() const -> std::vector<HelpColumns> {\n                    std::ostringstream oss;\n                    bool first = true;\n                    for( auto const &opt : m_optNames ) {\n                        if (first)\n                            first = false;\n                        else\n                            oss << \", \";\n                        oss << opt;\n                    }\n                    if( !m_hint.empty() )\n                        oss << \" <\" << m_hint << \">\";\n                    return { { oss.str(), m_description } };\n                }\n\n                auto isMatch( std::string const &optToken ) const -> bool {\n                    auto normalisedToken = normaliseOpt( optToken );\n                    for( auto const &name : m_optNames ) {\n                        if( normaliseOpt( name ) == normalisedToken )\n                            return true;\n                    }\n                    return false;\n                }\n\n                using ParserBase::parse;\n\n                auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override {\n                    auto validationResult = validate();\n                    if( !validationResult )\n                        return InternalParseResult( validationResult );\n\n                    auto remainingTokens = tokens;\n                    if( remainingTokens && remainingTokens->type == TokenType::Option ) {\n                        auto const &token = *remainingTokens;\n                        if( isMatch(token.token ) ) {\n                            if( m_ref->isFlag() ) {\n                                auto flagRef = static_cast<detail::BoundFlagRefBase*>( m_ref.get() );\n                                auto result = flagRef->setFlag( true );\n                                if( !result )\n                                    return InternalParseResult( result );\n                                if( result.value() == ParseResultType::ShortCircuitAll )\n                                    return InternalParseResult::ok( ParseState( result.value(), remainingTokens ) );\n                            } else {\n                                auto valueRef = static_cast<detail::BoundValueRefBase*>( m_ref.get() );\n                                ++remainingTokens;\n                                if( !remainingTokens )\n                                    return InternalParseResult::runtimeError( \"Expected argument following \" + token.token );\n                                auto const &argToken = *remainingTokens;\n                                if( argToken.type != TokenType::Argument )\n                                    return InternalParseResult::runtimeError( \"Expected argument following \" + token.token );\n                                auto result = valueRef->setValue( argToken.token );\n                                if( !result )\n                                    return InternalParseResult( result );\n                                if( result.value() == ParseResultType::ShortCircuitAll )\n                                    return InternalParseResult::ok( ParseState( result.value(), remainingTokens ) );\n                            }\n                            return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) );\n                        }\n                    }\n                    return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) );\n                }\n\n                auto validate() const -> Result override {\n                    if( m_optNames.empty() )\n                        return Result::logicError( \"No options supplied to Opt\" );\n                    for( auto const &name : m_optNames ) {\n                        if( name.empty() )\n                            return Result::logicError( \"Option name cannot be empty\" );\n#ifdef CATCH_PLATFORM_WINDOWS\n                        if( name[0] != '-' && name[0] != '/' )\n                    return Result::logicError( \"Option name must begin with '-' or '/'\" );\n#else\n                        if( name[0] != '-' )\n                            return Result::logicError( \"Option name must begin with '-'\" );\n#endif\n                    }\n                    return ParserRefImpl::validate();\n                }\n            };\n\n            struct Help : Opt {\n                Help( bool &showHelpFlag )\n                        :   Opt([&]( bool flag ) {\n                    showHelpFlag = flag;\n                    return ParserResult::ok( ParseResultType::ShortCircuitAll );\n                })\n                {\n                    static_cast<Opt &>( *this )\n                            (\"display usage information\")\n                    [\"-?\"][\"-h\"][\"--help\"]\n                            .optional();\n                }\n            };\n\n            struct Parser : ParserBase {\n\n                mutable ExeName m_exeName;\n                std::vector<Opt> m_options;\n                std::vector<Arg> m_args;\n\n                auto operator|=( ExeName const &exeName ) -> Parser & {\n                    m_exeName = exeName;\n                    return *this;\n                }\n\n                auto operator|=( Arg const &arg ) -> Parser & {\n                    m_args.push_back(arg);\n                    return *this;\n                }\n\n                auto operator|=( Opt const &opt ) -> Parser & {\n                    m_options.push_back(opt);\n                    return *this;\n                }\n\n                auto operator|=( Parser const &other ) -> Parser & {\n                    m_options.insert(m_options.end(), other.m_options.begin(), other.m_options.end());\n                    m_args.insert(m_args.end(), other.m_args.begin(), other.m_args.end());\n                    return *this;\n                }\n\n                template<typename T>\n                auto operator|( T const &other ) const -> Parser {\n                    return Parser( *this ) |= other;\n                }\n\n                // Forward deprecated interface with '+' instead of '|'\n                template<typename T>\n                auto operator+=( T const &other ) -> Parser & { return operator|=( other ); }\n                template<typename T>\n                auto operator+( T const &other ) const -> Parser { return operator|( other ); }\n\n                auto getHelpColumns() const -> std::vector<HelpColumns> {\n                    std::vector<HelpColumns> cols;\n                    for (auto const &o : m_options) {\n                        auto childCols = o.getHelpColumns();\n                        cols.insert( cols.end(), childCols.begin(), childCols.end() );\n                    }\n                    return cols;\n                }\n\n                void writeToStream( std::ostream &os ) const {\n                    if (!m_exeName.name().empty()) {\n                        os << \"usage:\\n\" << \"  \" << m_exeName.name() << \" \";\n                        bool required = true, first = true;\n                        for( auto const &arg : m_args ) {\n                            if (first)\n                                first = false;\n                            else\n                                os << \" \";\n                            if( arg.isOptional() && required ) {\n                                os << \"[\";\n                                required = false;\n                            }\n                            os << \"<\" << arg.hint() << \">\";\n                            if( arg.cardinality() == 0 )\n                                os << \" ... \";\n                        }\n                        if( !required )\n                            os << \"]\";\n                        if( !m_options.empty() )\n                            os << \" options\";\n                        os << \"\\n\\nwhere options are:\" << std::endl;\n                    }\n\n                    auto rows = getHelpColumns();\n                    size_t consoleWidth = CATCH_CLARA_CONFIG_CONSOLE_WIDTH;\n                    size_t optWidth = 0;\n                    for( auto const &cols : rows )\n                        optWidth = (std::max)(optWidth, cols.left.size() + 2);\n\n                    optWidth = (std::min)(optWidth, consoleWidth/2);\n\n                    for( auto const &cols : rows ) {\n                        auto row =\n                                TextFlow::Column( cols.left ).width( optWidth ).indent( 2 ) +\n                                TextFlow::Spacer(4) +\n                                TextFlow::Column( cols.right ).width( consoleWidth - 7 - optWidth );\n                        os << row << std::endl;\n                    }\n                }\n\n                friend auto operator<<( std::ostream &os, Parser const &parser ) -> std::ostream& {\n                    parser.writeToStream( os );\n                    return os;\n                }\n\n                auto validate() const -> Result override {\n                    for( auto const &opt : m_options ) {\n                        auto result = opt.validate();\n                        if( !result )\n                            return result;\n                    }\n                    for( auto const &arg : m_args ) {\n                        auto result = arg.validate();\n                        if( !result )\n                            return result;\n                    }\n                    return Result::ok();\n                }\n\n                using ParserBase::parse;\n\n                auto parse( std::string const& exeName, TokenStream const &tokens ) const -> InternalParseResult override {\n\n                    struct ParserInfo {\n                        ParserBase const* parser = nullptr;\n                        size_t count = 0;\n                    };\n                    const size_t totalParsers = m_options.size() + m_args.size();\n                    assert( totalParsers < 512 );\n                    // ParserInfo parseInfos[totalParsers]; // <-- this is what we really want to do\n                    ParserInfo parseInfos[512];\n\n                    {\n                        size_t i = 0;\n                        for (auto const &opt : m_options) parseInfos[i++].parser = &opt;\n                        for (auto const &arg : m_args) parseInfos[i++].parser = &arg;\n                    }\n\n                    m_exeName.set( exeName );\n\n                    auto result = InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) );\n                    while( result.value().remainingTokens() ) {\n                        bool tokenParsed = false;\n\n                        for( size_t i = 0; i < totalParsers; ++i ) {\n                            auto&  parseInfo = parseInfos[i];\n                            if( parseInfo.parser->cardinality() == 0 || parseInfo.count < parseInfo.parser->cardinality() ) {\n                                result = parseInfo.parser->parse(exeName, result.value().remainingTokens());\n                                if (!result)\n                                    return result;\n                                if (result.value().type() != ParseResultType::NoMatch) {\n                                    tokenParsed = true;\n                                    ++parseInfo.count;\n                                    break;\n                                }\n                            }\n                        }\n\n                        if( result.value().type() == ParseResultType::ShortCircuitAll )\n                            return result;\n                        if( !tokenParsed )\n                            return InternalParseResult::runtimeError( \"Unrecognised token: \" + result.value().remainingTokens()->token );\n                    }\n                    // !TBD Check missing required options\n                    return result;\n                }\n            };\n\n            template<typename DerivedT>\n            template<typename T>\n            auto ComposableParserImpl<DerivedT>::operator|( T const &other ) const -> Parser {\n                return Parser() | static_cast<DerivedT const &>( *this ) | other;\n            }\n        } // namespace detail\n\n// A Combined parser\n        using detail::Parser;\n\n// A parser for options\n        using detail::Opt;\n\n// A parser for arguments\n        using detail::Arg;\n\n// Wrapper for argc, argv from main()\n        using detail::Args;\n\n// Specifies the name of the executable\n        using detail::ExeName;\n\n// Convenience wrapper for option parser that specifies the help option\n        using detail::Help;\n\n// enum of result types from a parse\n        using detail::ParseResultType;\n\n// Result type for parser operation\n        using detail::ParserResult;\n\n    }} // namespace Catch::clara\n\n// end clara.hpp\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// Restore Clara's value for console width, if present\n#ifdef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH\n#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH\n#undef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH\n#endif\n\n// end catch_clara.h\nnamespace Catch {\n\n    clara::Parser makeCommandLineParser( ConfigData& config );\n\n} // end namespace Catch\n\n// end catch_commandline.h\n#include <fstream>\n#include <ctime>\n\nnamespace Catch {\n\n    clara::Parser makeCommandLineParser( ConfigData& config ) {\n\n        using namespace clara;\n\n        auto const setWarning = [&]( std::string const& warning ) {\n            auto warningSet = [&]() {\n                if( warning == \"NoAssertions\" )\n                    return WarnAbout::NoAssertions;\n\n                if ( warning == \"NoTests\" )\n                    return WarnAbout::NoTests;\n\n                return WarnAbout::Nothing;\n            }();\n\n            if (warningSet == WarnAbout::Nothing)\n                return ParserResult::runtimeError( \"Unrecognised warning: '\" + warning + \"'\" );\n            config.warnings = static_cast<WarnAbout::What>( config.warnings | warningSet );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n        auto const loadTestNamesFromFile = [&]( std::string const& filename ) {\n            std::ifstream f( filename.c_str() );\n            if( !f.is_open() )\n                return ParserResult::runtimeError( \"Unable to load input file: '\" + filename + \"'\" );\n\n            std::string line;\n            while( std::getline( f, line ) ) {\n                line = trim(line);\n                if( !line.empty() && !startsWith( line, '#' ) ) {\n                    if( !startsWith( line, '\"' ) )\n                        line = '\"' + line + '\"';\n                    config.testsOrTags.push_back( line );\n                    config.testsOrTags.emplace_back( \",\" );\n                }\n            }\n            //Remove comma in the end\n            if(!config.testsOrTags.empty())\n                config.testsOrTags.erase( config.testsOrTags.end()-1 );\n\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n        auto const setTestOrder = [&]( std::string const& order ) {\n            if( startsWith( \"declared\", order ) )\n                config.runOrder = RunTests::InDeclarationOrder;\n            else if( startsWith( \"lexical\", order ) )\n                config.runOrder = RunTests::InLexicographicalOrder;\n            else if( startsWith( \"random\", order ) )\n                config.runOrder = RunTests::InRandomOrder;\n            else\n                return clara::ParserResult::runtimeError( \"Unrecognised ordering: '\" + order + \"'\" );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n        auto const setRngSeed = [&]( std::string const& seed ) {\n            if( seed != \"time\" )\n                return clara::detail::convertInto( seed, config.rngSeed );\n            config.rngSeed = static_cast<unsigned int>( std::time(nullptr) );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n        auto const setColourUsage = [&]( std::string const& useColour ) {\n            auto mode = toLower( useColour );\n\n            if( mode == \"yes\" )\n                config.useColour = UseColour::Yes;\n            else if( mode == \"no\" )\n                config.useColour = UseColour::No;\n            else if( mode == \"auto\" )\n                config.useColour = UseColour::Auto;\n            else\n                return ParserResult::runtimeError( \"colour mode must be one of: auto, yes or no. '\" + useColour + \"' not recognised\" );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n        auto const setWaitForKeypress = [&]( std::string const& keypress ) {\n            auto keypressLc = toLower( keypress );\n            if (keypressLc == \"never\")\n                config.waitForKeypress = WaitForKeypress::Never;\n            else if( keypressLc == \"start\" )\n                config.waitForKeypress = WaitForKeypress::BeforeStart;\n            else if( keypressLc == \"exit\" )\n                config.waitForKeypress = WaitForKeypress::BeforeExit;\n            else if( keypressLc == \"both\" )\n                config.waitForKeypress = WaitForKeypress::BeforeStartAndExit;\n            else\n                return ParserResult::runtimeError( \"keypress argument must be one of: never, start, exit or both. '\" + keypress + \"' not recognised\" );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n        auto const setVerbosity = [&]( std::string const& verbosity ) {\n            auto lcVerbosity = toLower( verbosity );\n            if( lcVerbosity == \"quiet\" )\n                config.verbosity = Verbosity::Quiet;\n            else if( lcVerbosity == \"normal\" )\n                config.verbosity = Verbosity::Normal;\n            else if( lcVerbosity == \"high\" )\n                config.verbosity = Verbosity::High;\n            else\n                return ParserResult::runtimeError( \"Unrecognised verbosity, '\" + verbosity + \"'\" );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n        auto const setReporter = [&]( std::string const& reporter ) {\n            IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();\n\n            auto lcReporter = toLower( reporter );\n            auto result = factories.find( lcReporter );\n\n            if( factories.end() != result )\n                config.reporterName = lcReporter;\n            else\n                return ParserResult::runtimeError( \"Unrecognized reporter, '\" + reporter + \"'. Check available with --list-reporters\" );\n            return ParserResult::ok( ParseResultType::Matched );\n        };\n\n        auto cli\n                = ExeName( config.processName )\n                  | Help( config.showHelp )\n                  | Opt( config.listTests )\n                  [\"-l\"][\"--list-tests\"]\n                          ( \"list all/matching test cases\" )\n                  | Opt( config.listTags )\n                  [\"-t\"][\"--list-tags\"]\n                          ( \"list all/matching tags\" )\n                  | Opt( config.showSuccessfulTests )\n                  [\"-s\"][\"--success\"]\n                          ( \"include successful tests in output\" )\n                  | Opt( config.shouldDebugBreak )\n                  [\"-b\"][\"--break\"]\n                          ( \"break into debugger on failure\" )\n                  | Opt( config.noThrow )\n                  [\"-e\"][\"--nothrow\"]\n                          ( \"skip exception tests\" )\n                  | Opt( config.showInvisibles )\n                  [\"-i\"][\"--invisibles\"]\n                          ( \"show invisibles (tabs, newlines)\" )\n                  | Opt( config.outputFilename, \"filename\" )\n                  [\"-o\"][\"--out\"]\n                          ( \"output filename\" )\n                  | Opt( setReporter, \"name\" )\n                  [\"-r\"][\"--reporter\"]\n                          ( \"reporter to use (defaults to console)\" )\n                  | Opt( config.name, \"name\" )\n                  [\"-n\"][\"--name\"]\n                          ( \"suite name\" )\n                  | Opt( [&]( bool ){ config.abortAfter = 1; } )\n                  [\"-a\"][\"--abort\"]\n                          ( \"abort at first failure\" )\n                  | Opt( [&]( int x ){ config.abortAfter = x; }, \"no. failures\" )\n                  [\"-x\"][\"--abortx\"]\n                          ( \"abort after x failures\" )\n                  | Opt( setWarning, \"warning name\" )\n                  [\"-w\"][\"--warn\"]\n                          ( \"enable warnings\" )\n                  | Opt( [&]( bool flag ) { config.showDurations = flag ? ShowDurations::Always : ShowDurations::Never; }, \"yes|no\" )\n                  [\"-d\"][\"--durations\"]\n                          ( \"show test durations\" )\n                  | Opt( config.minDuration, \"seconds\" )\n                  [\"-D\"][\"--min-duration\"]\n                          ( \"show test durations for tests taking at least the given number of seconds\" )\n                  | Opt( loadTestNamesFromFile, \"filename\" )\n                  [\"-f\"][\"--input-file\"]\n                          ( \"load test names to run from a file\" )\n                  | Opt( config.filenamesAsTags )\n                  [\"-#\"][\"--filenames-as-tags\"]\n                          ( \"adds a tag for the filename\" )\n                  | Opt( config.sectionsToRun, \"section name\" )\n                  [\"-c\"][\"--section\"]\n                          ( \"specify section to run\" )\n                  | Opt( setVerbosity, \"quiet|normal|high\" )\n                  [\"-v\"][\"--verbosity\"]\n                          ( \"set output verbosity\" )\n                  | Opt( config.listTestNamesOnly )\n                  [\"--list-test-names-only\"]\n                          ( \"list all/matching test cases names only\" )\n                  | Opt( config.listReporters )\n                  [\"--list-reporters\"]\n                          ( \"list all reporters\" )\n                  | Opt( setTestOrder, \"decl|lex|rand\" )\n                  [\"--order\"]\n                          ( \"test case order (defaults to decl)\" )\n                  | Opt( setRngSeed, \"'time'|number\" )\n                  [\"--rng-seed\"]\n                          ( \"set a specific seed for random numbers\" )\n                  | Opt( setColourUsage, \"yes|no\" )\n                  [\"--use-colour\"]\n                          ( \"should output be colourised\" )\n                  | Opt( config.libIdentify )\n                  [\"--libidentify\"]\n                          ( \"report name and version according to libidentify standard\" )\n                  | Opt( setWaitForKeypress, \"never|start|exit|both\" )\n                  [\"--wait-for-keypress\"]\n                          ( \"waits for a keypress before exiting\" )\n                  | Opt( config.benchmarkSamples, \"samples\" )\n                  [\"--benchmark-samples\"]\n                          ( \"number of samples to collect (default: 100)\" )\n                  | Opt( config.benchmarkResamples, \"resamples\" )\n                  [\"--benchmark-resamples\"]\n                          ( \"number of resamples for the bootstrap (default: 100000)\" )\n                  | Opt( config.benchmarkConfidenceInterval, \"confidence interval\" )\n                  [\"--benchmark-confidence-interval\"]\n                          ( \"confidence interval for the bootstrap (between 0 and 1, default: 0.95)\" )\n                  | Opt( config.benchmarkNoAnalysis )\n                  [\"--benchmark-no-analysis\"]\n                          ( \"perform only measurements; do not perform any analysis\" )\n                  | Opt( config.benchmarkWarmupTime, \"benchmarkWarmupTime\" )\n                  [\"--benchmark-warmup-time\"]\n                          ( \"amount of time in milliseconds spent on warming up each test (default: 100)\" )\n                  | Arg( config.testsOrTags, \"test name|pattern|tags\" )\n                          ( \"which test or tests to use\" );\n\n        return cli;\n    }\n\n} // end namespace Catch\n// end catch_commandline.cpp\n// start catch_common.cpp\n\n#include <cstring>\n#include <ostream>\n\nnamespace Catch {\n\n    bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept {\n        return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);\n    }\n    bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const noexcept {\n        // We can assume that the same file will usually have the same pointer.\n        // Thus, if the pointers are the same, there is no point in calling the strcmp\n        return line < other.line || ( line == other.line && file != other.file && (std::strcmp(file, other.file) < 0));\n    }\n\n    std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) {\n#ifndef __GNUG__\n        os << info.file << '(' << info.line << ')';\n#else\n        os << info.file << ':' << info.line;\n#endif\n        return os;\n    }\n\n    std::string StreamEndStop::operator+() const {\n        return std::string();\n    }\n\n    NonCopyable::NonCopyable() = default;\n    NonCopyable::~NonCopyable() = default;\n\n}\n// end catch_common.cpp\n// start catch_config.cpp\n\nnamespace Catch {\n\n    Config::Config( ConfigData const& data )\n            :   m_data( data ),\n                m_stream( openStream() )\n    {\n        // We need to trim filter specs to avoid trouble with superfluous\n        // whitespace (esp. important for bdd macros, as those are manually\n        // aligned with whitespace).\n\n        for (auto& elem : m_data.testsOrTags) {\n            elem = trim(elem);\n        }\n        for (auto& elem : m_data.sectionsToRun) {\n            elem = trim(elem);\n        }\n\n        TestSpecParser parser(ITagAliasRegistry::get());\n        if (!m_data.testsOrTags.empty()) {\n            m_hasTestFilters = true;\n            for (auto const& testOrTags : m_data.testsOrTags) {\n                parser.parse(testOrTags);\n            }\n        }\n        m_testSpec = parser.testSpec();\n    }\n\n    std::string const& Config::getFilename() const {\n        return m_data.outputFilename ;\n    }\n\n    bool Config::listTests() const          { return m_data.listTests; }\n    bool Config::listTestNamesOnly() const  { return m_data.listTestNamesOnly; }\n    bool Config::listTags() const           { return m_data.listTags; }\n    bool Config::listReporters() const      { return m_data.listReporters; }\n\n    std::string Config::getProcessName() const { return m_data.processName; }\n    std::string const& Config::getReporterName() const { return m_data.reporterName; }\n\n    std::vector<std::string> const& Config::getTestsOrTags() const { return m_data.testsOrTags; }\n    std::vector<std::string> const& Config::getSectionsToRun() const { return m_data.sectionsToRun; }\n\n    TestSpec const& Config::testSpec() const { return m_testSpec; }\n    bool Config::hasTestFilters() const { return m_hasTestFilters; }\n\n    bool Config::showHelp() const { return m_data.showHelp; }\n\n    // IConfig interface\n    bool Config::allowThrows() const                   { return !m_data.noThrow; }\n    std::ostream& Config::stream() const               { return m_stream->stream(); }\n    std::string Config::name() const                   { return m_data.name.empty() ? m_data.processName : m_data.name; }\n    bool Config::includeSuccessfulResults() const      { return m_data.showSuccessfulTests; }\n    bool Config::warnAboutMissingAssertions() const    { return !!(m_data.warnings & WarnAbout::NoAssertions); }\n    bool Config::warnAboutNoTests() const              { return !!(m_data.warnings & WarnAbout::NoTests); }\n    ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; }\n    double Config::minDuration() const                 { return m_data.minDuration; }\n    RunTests::InWhatOrder Config::runOrder() const     { return m_data.runOrder; }\n    unsigned int Config::rngSeed() const               { return m_data.rngSeed; }\n    UseColour::YesOrNo Config::useColour() const       { return m_data.useColour; }\n    bool Config::shouldDebugBreak() const              { return m_data.shouldDebugBreak; }\n    int Config::abortAfter() const                     { return m_data.abortAfter; }\n    bool Config::showInvisibles() const                { return m_data.showInvisibles; }\n    Verbosity Config::verbosity() const                { return m_data.verbosity; }\n\n    bool Config::benchmarkNoAnalysis() const                      { return m_data.benchmarkNoAnalysis; }\n    int Config::benchmarkSamples() const                          { return m_data.benchmarkSamples; }\n    double Config::benchmarkConfidenceInterval() const            { return m_data.benchmarkConfidenceInterval; }\n    unsigned int Config::benchmarkResamples() const               { return m_data.benchmarkResamples; }\n    std::chrono::milliseconds Config::benchmarkWarmupTime() const { return std::chrono::milliseconds(m_data.benchmarkWarmupTime); }\n\n    IStream const* Config::openStream() {\n        return Catch::makeStream(m_data.outputFilename);\n    }\n\n} // end namespace Catch\n// end catch_config.cpp\n// start catch_console_colour.cpp\n\n#if defined(__clang__)\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#endif\n\n// start catch_errno_guard.h\n\nnamespace Catch {\n\n    class ErrnoGuard {\n    public:\n        ErrnoGuard();\n        ~ErrnoGuard();\n    private:\n        int m_oldErrno;\n    };\n\n}\n\n// end catch_errno_guard.h\n// start catch_windows_h_proxy.h\n\n\n#if defined(CATCH_PLATFORM_WINDOWS)\n\n#if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX)\n#  define CATCH_DEFINED_NOMINMAX\n#  define NOMINMAX\n#endif\n#if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN)\n#  define CATCH_DEFINED_WIN32_LEAN_AND_MEAN\n#  define WIN32_LEAN_AND_MEAN\n#endif\n\n#ifdef __AFXDLL\n#include <AfxWin.h>\n#else\n#include <windows.h>\n#endif\n\n#ifdef CATCH_DEFINED_NOMINMAX\n#  undef NOMINMAX\n#endif\n#ifdef CATCH_DEFINED_WIN32_LEAN_AND_MEAN\n#  undef WIN32_LEAN_AND_MEAN\n#endif\n\n#endif // defined(CATCH_PLATFORM_WINDOWS)\n\n// end catch_windows_h_proxy.h\n#include <sstream>\n\nnamespace Catch {\n    namespace {\n\n        struct IColourImpl {\n            virtual ~IColourImpl() = default;\n            virtual void use( Colour::Code _colourCode ) = 0;\n        };\n\n        struct NoColourImpl : IColourImpl {\n            void use( Colour::Code ) override {}\n\n            static IColourImpl* instance() {\n                static NoColourImpl s_instance;\n                return &s_instance;\n            }\n        };\n\n    } // anon namespace\n} // namespace Catch\n\n#if !defined( CATCH_CONFIG_COLOUR_NONE ) && !defined( CATCH_CONFIG_COLOUR_WINDOWS ) && !defined( CATCH_CONFIG_COLOUR_ANSI )\n#   ifdef CATCH_PLATFORM_WINDOWS\n#       define CATCH_CONFIG_COLOUR_WINDOWS\n#   else\n#       define CATCH_CONFIG_COLOUR_ANSI\n#   endif\n#endif\n\n#if defined ( CATCH_CONFIG_COLOUR_WINDOWS ) /////////////////////////////////////////\n\nnamespace Catch {\nnamespace {\n\n    class Win32ColourImpl : public IColourImpl {\n    public:\n        Win32ColourImpl() : stdoutHandle( GetStdHandle(STD_OUTPUT_HANDLE) )\n        {\n            CONSOLE_SCREEN_BUFFER_INFO csbiInfo;\n            GetConsoleScreenBufferInfo( stdoutHandle, &csbiInfo );\n            originalForegroundAttributes = csbiInfo.wAttributes & ~( BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY );\n            originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY );\n        }\n\n        void use( Colour::Code _colourCode ) override {\n            switch( _colourCode ) {\n                case Colour::None:      return setTextAttribute( originalForegroundAttributes );\n                case Colour::White:     return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );\n                case Colour::Red:       return setTextAttribute( FOREGROUND_RED );\n                case Colour::Green:     return setTextAttribute( FOREGROUND_GREEN );\n                case Colour::Blue:      return setTextAttribute( FOREGROUND_BLUE );\n                case Colour::Cyan:      return setTextAttribute( FOREGROUND_BLUE | FOREGROUND_GREEN );\n                case Colour::Yellow:    return setTextAttribute( FOREGROUND_RED | FOREGROUND_GREEN );\n                case Colour::Grey:      return setTextAttribute( 0 );\n\n                case Colour::LightGrey:     return setTextAttribute( FOREGROUND_INTENSITY );\n                case Colour::BrightRed:     return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED );\n                case Colour::BrightGreen:   return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN );\n                case Colour::BrightWhite:   return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );\n                case Colour::BrightYellow:  return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN );\n\n                case Colour::Bright: CATCH_INTERNAL_ERROR( \"not a colour\" );\n\n                default:\n                    CATCH_ERROR( \"Unknown colour requested\" );\n            }\n        }\n\n    private:\n        void setTextAttribute( WORD _textAttribute ) {\n            SetConsoleTextAttribute( stdoutHandle, _textAttribute | originalBackgroundAttributes );\n        }\n        HANDLE stdoutHandle;\n        WORD originalForegroundAttributes;\n        WORD originalBackgroundAttributes;\n    };\n\n    IColourImpl* platformColourInstance() {\n        static Win32ColourImpl s_instance;\n\n        IConfigPtr config = getCurrentContext().getConfig();\n        UseColour::YesOrNo colourMode = config\n            ? config->useColour()\n            : UseColour::Auto;\n        if( colourMode == UseColour::Auto )\n            colourMode = UseColour::Yes;\n        return colourMode == UseColour::Yes\n            ? &s_instance\n            : NoColourImpl::instance();\n    }\n\n} // end anon namespace\n} // end namespace Catch\n\n#elif defined( CATCH_CONFIG_COLOUR_ANSI ) //////////////////////////////////////\n\n#include <unistd.h>\n\nnamespace Catch {\n    namespace {\n\n        // use POSIX/ ANSI console terminal codes\n        // Thanks to Adam Strzelecki for original contribution\n        // (http://github.com/nanoant)\n        // https://github.com/philsquared/Catch/pull/131\n        class PosixColourImpl : public IColourImpl {\n        public:\n            void use( Colour::Code _colourCode ) override {\n                switch( _colourCode ) {\n                    case Colour::None:\n                    case Colour::White:     return setColour( \"[0m\" );\n                    case Colour::Red:       return setColour( \"[0;31m\" );\n                    case Colour::Green:     return setColour( \"[0;32m\" );\n                    case Colour::Blue:      return setColour( \"[0;34m\" );\n                    case Colour::Cyan:      return setColour( \"[0;36m\" );\n                    case Colour::Yellow:    return setColour( \"[0;33m\" );\n                    case Colour::Grey:      return setColour( \"[1;30m\" );\n\n                    case Colour::LightGrey:     return setColour( \"[0;37m\" );\n                    case Colour::BrightRed:     return setColour( \"[1;31m\" );\n                    case Colour::BrightGreen:   return setColour( \"[1;32m\" );\n                    case Colour::BrightWhite:   return setColour( \"[1;37m\" );\n                    case Colour::BrightYellow:  return setColour( \"[1;33m\" );\n\n                    case Colour::Bright: CATCH_INTERNAL_ERROR( \"not a colour\" );\n                    default: CATCH_INTERNAL_ERROR( \"Unknown colour requested\" );\n                }\n            }\n            static IColourImpl* instance() {\n                static PosixColourImpl s_instance;\n                return &s_instance;\n            }\n\n        private:\n            void setColour( const char* _escapeCode ) {\n                getCurrentContext().getConfig()->stream()\n                        << '\\033' << _escapeCode;\n            }\n        };\n\n        bool useColourOnPlatform() {\n            return\n#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)\n                !isDebuggerActive() &&\n#endif\n#if !(defined(__DJGPP__) && defined(__STRICT_ANSI__))\n                    isatty(STDOUT_FILENO)\n#else\n                false\n#endif\n                    ;\n        }\n        IColourImpl* platformColourInstance() {\n            ErrnoGuard guard;\n            IConfigPtr config = getCurrentContext().getConfig();\n            UseColour::YesOrNo colourMode = config\n                                            ? config->useColour()\n                                            : UseColour::Auto;\n            if( colourMode == UseColour::Auto )\n                colourMode = useColourOnPlatform()\n                             ? UseColour::Yes\n                             : UseColour::No;\n            return colourMode == UseColour::Yes\n                   ? PosixColourImpl::instance()\n                   : NoColourImpl::instance();\n        }\n\n    } // end anon namespace\n} // end namespace Catch\n\n#else  // not Windows or ANSI ///////////////////////////////////////////////\n\nnamespace Catch {\n\n    static IColourImpl* platformColourInstance() { return NoColourImpl::instance(); }\n\n} // end namespace Catch\n\n#endif // Windows/ ANSI/ None\n\nnamespace Catch {\n\n    Colour::Colour( Code _colourCode ) { use( _colourCode ); }\n    Colour::Colour( Colour&& other ) noexcept {\n        m_moved = other.m_moved;\n        other.m_moved = true;\n    }\n    Colour& Colour::operator=( Colour&& other ) noexcept {\n        m_moved = other.m_moved;\n        other.m_moved  = true;\n        return *this;\n    }\n\n    Colour::~Colour(){ if( !m_moved ) use( None ); }\n\n    void Colour::use( Code _colourCode ) {\n        static IColourImpl* impl = platformColourInstance();\n        // Strictly speaking, this cannot possibly happen.\n        // However, under some conditions it does happen (see #1626),\n        // and this change is small enough that we can let practicality\n        // triumph over purity in this case.\n        if (impl != nullptr) {\n            impl->use( _colourCode );\n        }\n    }\n\n    std::ostream& operator << ( std::ostream& os, Colour const& ) {\n        return os;\n    }\n\n} // end namespace Catch\n\n#if defined(__clang__)\n#    pragma clang diagnostic pop\n#endif\n\n// end catch_console_colour.cpp\n// start catch_context.cpp\n\nnamespace Catch {\n\n    class Context : public IMutableContext, NonCopyable {\n\n    public: // IContext\n        IResultCapture* getResultCapture() override {\n            return m_resultCapture;\n        }\n        IRunner* getRunner() override {\n            return m_runner;\n        }\n\n        IConfigPtr const& getConfig() const override {\n            return m_config;\n        }\n\n        ~Context() override;\n\n    public: // IMutableContext\n        void setResultCapture( IResultCapture* resultCapture ) override {\n            m_resultCapture = resultCapture;\n        }\n        void setRunner( IRunner* runner ) override {\n            m_runner = runner;\n        }\n        void setConfig( IConfigPtr const& config ) override {\n            m_config = config;\n        }\n\n        friend IMutableContext& getCurrentMutableContext();\n\n    private:\n        IConfigPtr m_config;\n        IRunner* m_runner = nullptr;\n        IResultCapture* m_resultCapture = nullptr;\n    };\n\n    IMutableContext *IMutableContext::currentContext = nullptr;\n\n    void IMutableContext::createContext()\n    {\n        currentContext = new Context();\n    }\n\n    void cleanUpContext() {\n        delete IMutableContext::currentContext;\n        IMutableContext::currentContext = nullptr;\n    }\n    IContext::~IContext() = default;\n    IMutableContext::~IMutableContext() = default;\n    Context::~Context() = default;\n\n    SimplePcg32& rng() {\n        static SimplePcg32 s_rng;\n        return s_rng;\n    }\n\n}\n// end catch_context.cpp\n// start catch_debug_console.cpp\n\n// start catch_debug_console.h\n\n#include <string>\n\nnamespace Catch {\n    void writeToDebugConsole( std::string const& text );\n}\n\n// end catch_debug_console.h\n#if defined(CATCH_CONFIG_ANDROID_LOGWRITE)\n#include <android/log.h>\n\n    namespace Catch {\n        void writeToDebugConsole( std::string const& text ) {\n            __android_log_write( ANDROID_LOG_DEBUG, \"Catch\", text.c_str() );\n        }\n    }\n\n#elif defined(CATCH_PLATFORM_WINDOWS)\n\nnamespace Catch {\n        void writeToDebugConsole( std::string const& text ) {\n            ::OutputDebugStringA( text.c_str() );\n        }\n    }\n\n#else\n\nnamespace Catch {\n    void writeToDebugConsole( std::string const& text ) {\n        // !TBD: Need a version for Mac/ XCode and other IDEs\n        Catch::cout() << text;\n    }\n}\n\n#endif // Platform\n// end catch_debug_console.cpp\n// start catch_debugger.cpp\n\n#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)\n\n#  include <cassert>\n#  include <sys/types.h>\n#  include <unistd.h>\n#  include <cstddef>\n#  include <ostream>\n\n#ifdef __apple_build_version__\n    // These headers will only compile with AppleClang (XCode)\n    // For other compilers (Clang, GCC, ... ) we need to exclude them\n#  include <sys/sysctl.h>\n#endif\n\n    namespace Catch {\n        #ifdef __apple_build_version__\n        // The following function is taken directly from the following technical note:\n        // https://developer.apple.com/library/archive/qa/qa1361/_index.html\n\n        // Returns true if the current process is being debugged (either\n        // running under the debugger or has a debugger attached post facto).\n        bool isDebuggerActive(){\n            int                 mib[4];\n            struct kinfo_proc   info;\n            std::size_t         size;\n\n            // Initialize the flags so that, if sysctl fails for some bizarre\n            // reason, we get a predictable result.\n\n            info.kp_proc.p_flag = 0;\n\n            // Initialize mib, which tells sysctl the info we want, in this case\n            // we're looking for information about a specific process ID.\n\n            mib[0] = CTL_KERN;\n            mib[1] = KERN_PROC;\n            mib[2] = KERN_PROC_PID;\n            mib[3] = getpid();\n\n            // Call sysctl.\n\n            size = sizeof(info);\n            if( sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, nullptr, 0) != 0 ) {\n                Catch::cerr() << \"\\n** Call to sysctl failed - unable to determine if debugger is active **\\n\" << std::endl;\n                return false;\n            }\n\n            // We're being debugged if the P_TRACED flag is set.\n\n            return ( (info.kp_proc.p_flag & P_TRACED) != 0 );\n        }\n        #else\n        bool isDebuggerActive() {\n            // We need to find another way to determine this for non-appleclang compilers on macOS\n            return false;\n        }\n        #endif\n    } // namespace Catch\n\n#elif defined(CATCH_PLATFORM_LINUX)\n#include <fstream>\n#include <string>\n\nnamespace Catch{\n    // The standard POSIX way of detecting a debugger is to attempt to\n    // ptrace() the process, but this needs to be done from a child and not\n    // this process itself to still allow attaching to this process later\n    // if wanted, so is rather heavy. Under Linux we have the PID of the\n    // \"debugger\" (which doesn't need to be gdb, of course, it could also\n    // be strace, for example) in /proc/$PID/status, so just get it from\n    // there instead.\n    bool isDebuggerActive(){\n        // Libstdc++ has a bug, where std::ifstream sets errno to 0\n        // This way our users can properly assert over errno values\n        ErrnoGuard guard;\n        std::ifstream in(\"/proc/self/status\");\n        for( std::string line; std::getline(in, line); ) {\n            static const int PREFIX_LEN = 11;\n            if( line.compare(0, PREFIX_LEN, \"TracerPid:\\t\") == 0 ) {\n                // We're traced if the PID is not 0 and no other PID starts\n                // with 0 digit, so it's enough to check for just a single\n                // character.\n                return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0';\n            }\n        }\n\n        return false;\n    }\n} // namespace Catch\n#elif defined(_MSC_VER)\nextern \"C\" __declspec(dllimport) int __stdcall IsDebuggerPresent();\n    namespace Catch {\n        bool isDebuggerActive() {\n            return IsDebuggerPresent() != 0;\n        }\n    }\n#elif defined(__MINGW32__)\n    extern \"C\" __declspec(dllimport) int __stdcall IsDebuggerPresent();\n    namespace Catch {\n        bool isDebuggerActive() {\n            return IsDebuggerPresent() != 0;\n        }\n    }\n#else\n    namespace Catch {\n       bool isDebuggerActive() { return false; }\n    }\n#endif // Platform\n// end catch_debugger.cpp\n// start catch_decomposer.cpp\n\nnamespace Catch {\n\n    ITransientExpression::~ITransientExpression() = default;\n\n    void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) {\n        if( lhs.size() + rhs.size() < 40 &&\n            lhs.find('\\n') == std::string::npos &&\n            rhs.find('\\n') == std::string::npos )\n            os << lhs << \" \" << op << \" \" << rhs;\n        else\n            os << lhs << \"\\n\" << op << \"\\n\" << rhs;\n    }\n}\n// end catch_decomposer.cpp\n// start catch_enforce.cpp\n\n#include <stdexcept>\n\nnamespace Catch {\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER)\n    [[noreturn]]\n    void throw_exception(std::exception const& e) {\n        Catch::cerr() << \"Catch will terminate because it needed to throw an exception.\\n\"\n                      << \"The message was: \" << e.what() << '\\n';\n        std::terminate();\n    }\n#endif\n\n    [[noreturn]]\n    void throw_logic_error(std::string const& msg) {\n        throw_exception(std::logic_error(msg));\n    }\n\n    [[noreturn]]\n    void throw_domain_error(std::string const& msg) {\n        throw_exception(std::domain_error(msg));\n    }\n\n    [[noreturn]]\n    void throw_runtime_error(std::string const& msg) {\n        throw_exception(std::runtime_error(msg));\n    }\n\n} // namespace Catch;\n// end catch_enforce.cpp\n// start catch_enum_values_registry.cpp\n// start catch_enum_values_registry.h\n\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    namespace Detail {\n\n        std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values );\n\n        class EnumValuesRegistry : public IMutableEnumValuesRegistry {\n\n            std::vector<std::unique_ptr<EnumInfo>> m_enumInfos;\n\n            EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values) override;\n        };\n\n        std::vector<StringRef> parseEnums( StringRef enums );\n\n    } // Detail\n\n} // Catch\n\n// end catch_enum_values_registry.h\n\n#include <map>\n#include <cassert>\n\nnamespace Catch {\n\n    IMutableEnumValuesRegistry::~IMutableEnumValuesRegistry() {}\n\n    namespace Detail {\n\n        namespace {\n            // Extracts the actual name part of an enum instance\n            // In other words, it returns the Blue part of Bikeshed::Colour::Blue\n            StringRef extractInstanceName(StringRef enumInstance) {\n                // Find last occurrence of \":\"\n                size_t name_start = enumInstance.size();\n                while (name_start > 0 && enumInstance[name_start - 1] != ':') {\n                    --name_start;\n                }\n                return enumInstance.substr(name_start, enumInstance.size() - name_start);\n            }\n        }\n\n        std::vector<StringRef> parseEnums( StringRef enums ) {\n            auto enumValues = splitStringRef( enums, ',' );\n            std::vector<StringRef> parsed;\n            parsed.reserve( enumValues.size() );\n            for( auto const& enumValue : enumValues ) {\n                parsed.push_back(trim(extractInstanceName(enumValue)));\n            }\n            return parsed;\n        }\n\n        EnumInfo::~EnumInfo() {}\n\n        StringRef EnumInfo::lookup( int value ) const {\n            for( auto const& valueToName : m_values ) {\n                if( valueToName.first == value )\n                    return valueToName.second;\n            }\n            return \"{** unexpected enum value **}\"_sr;\n        }\n\n        std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {\n            std::unique_ptr<EnumInfo> enumInfo( new EnumInfo );\n            enumInfo->m_name = enumName;\n            enumInfo->m_values.reserve( values.size() );\n\n            const auto valueNames = Catch::Detail::parseEnums( allValueNames );\n            assert( valueNames.size() == values.size() );\n            std::size_t i = 0;\n            for( auto value : values )\n                enumInfo->m_values.emplace_back(value, valueNames[i++]);\n\n            return enumInfo;\n        }\n\n        EnumInfo const& EnumValuesRegistry::registerEnum( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {\n            m_enumInfos.push_back(makeEnumInfo(enumName, allValueNames, values));\n            return *m_enumInfos.back();\n        }\n\n    } // Detail\n} // Catch\n\n// end catch_enum_values_registry.cpp\n// start catch_errno_guard.cpp\n\n#include <cerrno>\n\nnamespace Catch {\n    ErrnoGuard::ErrnoGuard():m_oldErrno(errno){}\n    ErrnoGuard::~ErrnoGuard() { errno = m_oldErrno; }\n}\n// end catch_errno_guard.cpp\n// start catch_exception_translator_registry.cpp\n\n// start catch_exception_translator_registry.h\n\n#include <vector>\n#include <string>\n#include <memory>\n\nnamespace Catch {\n\n    class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry {\n    public:\n        ~ExceptionTranslatorRegistry();\n        virtual void registerTranslator( const IExceptionTranslator* translator );\n        std::string translateActiveException() const override;\n        std::string tryTranslators() const;\n\n    private:\n        std::vector<std::unique_ptr<IExceptionTranslator const>> m_translators;\n    };\n}\n\n// end catch_exception_translator_registry.h\n#ifdef __OBJC__\n#import \"Foundation/Foundation.h\"\n#endif\n\nnamespace Catch {\n\n    ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() {\n    }\n\n    void ExceptionTranslatorRegistry::registerTranslator( const IExceptionTranslator* translator ) {\n        m_translators.push_back( std::unique_ptr<const IExceptionTranslator>( translator ) );\n    }\n\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n    std::string ExceptionTranslatorRegistry::translateActiveException() const {\n        try {\n#ifdef __OBJC__\n            // In Objective-C try objective-c exceptions first\n            @try {\n                return tryTranslators();\n            }\n            @catch (NSException *exception) {\n                return Catch::Detail::stringify( [exception description] );\n            }\n#else\n            // Compiling a mixed mode project with MSVC means that CLR\n            // exceptions will be caught in (...) as well. However, these\n            // do not fill-in std::current_exception and thus lead to crash\n            // when attempting rethrow.\n            // /EHa switch also causes structured exceptions to be caught\n            // here, but they fill-in current_exception properly, so\n            // at worst the output should be a little weird, instead of\n            // causing a crash.\n            if (std::current_exception() == nullptr) {\n                return \"Non C++ exception. Possibly a CLR exception.\";\n            }\n            return tryTranslators();\n#endif\n        }\n        catch( TestFailureException& ) {\n            std::rethrow_exception(std::current_exception());\n        }\n        catch( std::exception& ex ) {\n            return ex.what();\n        }\n        catch( std::string& msg ) {\n            return msg;\n        }\n        catch( const char* msg ) {\n            return msg;\n        }\n        catch(...) {\n            return \"Unknown exception\";\n        }\n    }\n\n    std::string ExceptionTranslatorRegistry::tryTranslators() const {\n        if (m_translators.empty()) {\n            std::rethrow_exception(std::current_exception());\n        } else {\n            return m_translators[0]->translate(m_translators.begin() + 1, m_translators.end());\n        }\n    }\n\n#else // ^^ Exceptions are enabled // Exceptions are disabled vv\n    std::string ExceptionTranslatorRegistry::translateActiveException() const {\n        CATCH_INTERNAL_ERROR(\"Attempted to translate active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!\");\n    }\n\n    std::string ExceptionTranslatorRegistry::tryTranslators() const {\n        CATCH_INTERNAL_ERROR(\"Attempted to use exception translators under CATCH_CONFIG_DISABLE_EXCEPTIONS!\");\n    }\n#endif\n\n}\n// end catch_exception_translator_registry.cpp\n// start catch_fatal_condition.cpp\n\n#include <algorithm>\n\n#if !defined( CATCH_CONFIG_WINDOWS_SEH ) && !defined( CATCH_CONFIG_POSIX_SIGNALS )\n\nnamespace Catch {\n\n    // If neither SEH nor signal handling is required, the handler impls\n    // do not have to do anything, and can be empty.\n    void FatalConditionHandler::engage_platform() {}\n    void FatalConditionHandler::disengage_platform() {}\n    FatalConditionHandler::FatalConditionHandler() = default;\n    FatalConditionHandler::~FatalConditionHandler() = default;\n\n} // end namespace Catch\n\n#endif // !CATCH_CONFIG_WINDOWS_SEH && !CATCH_CONFIG_POSIX_SIGNALS\n\n#if defined( CATCH_CONFIG_WINDOWS_SEH ) && defined( CATCH_CONFIG_POSIX_SIGNALS )\n#error \"Inconsistent configuration: Windows' SEH handling and POSIX signals cannot be enabled at the same time\"\n#endif // CATCH_CONFIG_WINDOWS_SEH && CATCH_CONFIG_POSIX_SIGNALS\n\n#if defined( CATCH_CONFIG_WINDOWS_SEH ) || defined( CATCH_CONFIG_POSIX_SIGNALS )\n\nnamespace {\n    //! Signals fatal error message to the run context\n    void reportFatal( char const * const message ) {\n        Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message );\n    }\n\n    //! Minimal size Catch2 needs for its own fatal error handling.\n    //! Picked anecdotally, so it might not be sufficient on all\n    //! platforms, and for all configurations.\n    constexpr std::size_t minStackSizeForErrors = 32 * 1024;\n} // end unnamed namespace\n\n#endif // CATCH_CONFIG_WINDOWS_SEH || CATCH_CONFIG_POSIX_SIGNALS\n\n#if defined( CATCH_CONFIG_WINDOWS_SEH )\n\nnamespace Catch {\n\n    struct SignalDefs { DWORD id; const char* name; };\n\n    // There is no 1-1 mapping between signals and windows exceptions.\n    // Windows can easily distinguish between SO and SigSegV,\n    // but SigInt, SigTerm, etc are handled differently.\n    static SignalDefs signalDefs[] = {\n        { static_cast<DWORD>(EXCEPTION_ILLEGAL_INSTRUCTION),  \"SIGILL - Illegal instruction signal\" },\n        { static_cast<DWORD>(EXCEPTION_STACK_OVERFLOW), \"SIGSEGV - Stack overflow\" },\n        { static_cast<DWORD>(EXCEPTION_ACCESS_VIOLATION), \"SIGSEGV - Segmentation violation signal\" },\n        { static_cast<DWORD>(EXCEPTION_INT_DIVIDE_BY_ZERO), \"Divide by zero error\" },\n    };\n\n    static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) {\n        for (auto const& def : signalDefs) {\n            if (ExceptionInfo->ExceptionRecord->ExceptionCode == def.id) {\n                reportFatal(def.name);\n            }\n        }\n        // If its not an exception we care about, pass it along.\n        // This stops us from eating debugger breaks etc.\n        return EXCEPTION_CONTINUE_SEARCH;\n    }\n\n    // Since we do not support multiple instantiations, we put these\n    // into global variables and rely on cleaning them up in outlined\n    // constructors/destructors\n    static PVOID exceptionHandlerHandle = nullptr;\n\n    // For MSVC, we reserve part of the stack memory for handling\n    // memory overflow structured exception.\n    FatalConditionHandler::FatalConditionHandler() {\n        ULONG guaranteeSize = static_cast<ULONG>(minStackSizeForErrors);\n        if (!SetThreadStackGuarantee(&guaranteeSize)) {\n            // We do not want to fully error out, because needing\n            // the stack reserve should be rare enough anyway.\n            Catch::cerr()\n                << \"Failed to reserve piece of stack.\"\n                << \" Stack overflows will not be reported successfully.\";\n        }\n    }\n\n    // We do not attempt to unset the stack guarantee, because\n    // Windows does not support lowering the stack size guarantee.\n    FatalConditionHandler::~FatalConditionHandler() = default;\n\n    void FatalConditionHandler::engage_platform() {\n        // Register as first handler in current chain\n        exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException);\n        if (!exceptionHandlerHandle) {\n            CATCH_RUNTIME_ERROR(\"Could not register vectored exception handler\");\n        }\n    }\n\n    void FatalConditionHandler::disengage_platform() {\n        if (!RemoveVectoredExceptionHandler(exceptionHandlerHandle)) {\n            CATCH_RUNTIME_ERROR(\"Could not unregister vectored exception handler\");\n        }\n        exceptionHandlerHandle = nullptr;\n    }\n\n} // end namespace Catch\n\n#endif // CATCH_CONFIG_WINDOWS_SEH\n\n#if defined( CATCH_CONFIG_POSIX_SIGNALS )\n\n#include <signal.h>\n\nnamespace Catch {\n\n    struct SignalDefs {\n        int id;\n        const char* name;\n    };\n\n    static SignalDefs signalDefs[] = {\n            { SIGINT,  \"SIGINT - Terminal interrupt signal\" },\n            { SIGILL,  \"SIGILL - Illegal instruction signal\" },\n            { SIGFPE,  \"SIGFPE - Floating point error signal\" },\n            { SIGSEGV, \"SIGSEGV - Segmentation violation signal\" },\n            { SIGTERM, \"SIGTERM - Termination request signal\" },\n            { SIGABRT, \"SIGABRT - Abort (abnormal termination) signal\" }\n    };\n\n// Older GCCs trigger -Wmissing-field-initializers for T foo = {}\n// which is zero initialization, but not explicit. We want to avoid\n// that.\n#if defined(__GNUC__)\n#    pragma GCC diagnostic push\n#    pragma GCC diagnostic ignored \"-Wmissing-field-initializers\"\n#endif\n\n    static char* altStackMem = nullptr;\n    static std::size_t altStackSize = 0;\n    static stack_t oldSigStack{};\n    static struct sigaction oldSigActions[sizeof(signalDefs) / sizeof(SignalDefs)]{};\n\n    static void restorePreviousSignalHandlers() {\n        // We set signal handlers back to the previous ones. Hopefully\n        // nobody overwrote them in the meantime, and doesn't expect\n        // their signal handlers to live past ours given that they\n        // installed them after ours..\n        for (std::size_t i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) {\n            sigaction(signalDefs[i].id, &oldSigActions[i], nullptr);\n        }\n        // Return the old stack\n        sigaltstack(&oldSigStack, nullptr);\n    }\n\n    static void handleSignal( int sig ) {\n        char const * name = \"<unknown signal>\";\n        for (auto const& def : signalDefs) {\n            if (sig == def.id) {\n                name = def.name;\n                break;\n            }\n        }\n        // We need to restore previous signal handlers and let them do\n        // their thing, so that the users can have the debugger break\n        // when a signal is raised, and so on.\n        restorePreviousSignalHandlers();\n        reportFatal( name );\n        raise( sig );\n    }\n\n    FatalConditionHandler::FatalConditionHandler() {\n        assert(!altStackMem && \"Cannot initialize POSIX signal handler when one already exists\");\n        if (altStackSize == 0) {\n            altStackSize = std::max(static_cast<size_t>(SIGSTKSZ), minStackSizeForErrors);\n        }\n        altStackMem = new char[altStackSize]();\n    }\n\n    FatalConditionHandler::~FatalConditionHandler() {\n        delete[] altStackMem;\n        // We signal that another instance can be constructed by zeroing\n        // out the pointer.\n        altStackMem = nullptr;\n    }\n\n    void FatalConditionHandler::engage_platform() {\n        stack_t sigStack;\n        sigStack.ss_sp = altStackMem;\n        sigStack.ss_size = altStackSize;\n        sigStack.ss_flags = 0;\n        sigaltstack(&sigStack, &oldSigStack);\n        struct sigaction sa = { };\n\n        sa.sa_handler = handleSignal;\n        sa.sa_flags = SA_ONSTACK;\n        for (std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i) {\n            sigaction(signalDefs[i].id, &sa, &oldSigActions[i]);\n        }\n    }\n\n#if defined(__GNUC__)\n#    pragma GCC diagnostic pop\n#endif\n\n    void FatalConditionHandler::disengage_platform() {\n        restorePreviousSignalHandlers();\n    }\n\n} // end namespace Catch\n\n#endif // CATCH_CONFIG_POSIX_SIGNALS\n// end catch_fatal_condition.cpp\n// start catch_generators.cpp\n\n#include <limits>\n#include <set>\n\nnamespace Catch {\n\n    IGeneratorTracker::~IGeneratorTracker() {}\n\n    const char* GeneratorException::what() const noexcept {\n        return m_msg;\n    }\n\n    namespace Generators {\n\n        GeneratorUntypedBase::~GeneratorUntypedBase() {}\n\n        auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& {\n            return getResultCapture().acquireGeneratorTracker( generatorName, lineInfo );\n        }\n\n    } // namespace Generators\n} // namespace Catch\n// end catch_generators.cpp\n// start catch_interfaces_capture.cpp\n\nnamespace Catch {\n    IResultCapture::~IResultCapture() = default;\n}\n// end catch_interfaces_capture.cpp\n// start catch_interfaces_config.cpp\n\nnamespace Catch {\n    IConfig::~IConfig() = default;\n}\n// end catch_interfaces_config.cpp\n// start catch_interfaces_exception.cpp\n\nnamespace Catch {\n    IExceptionTranslator::~IExceptionTranslator() = default;\n    IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() = default;\n}\n// end catch_interfaces_exception.cpp\n// start catch_interfaces_registry_hub.cpp\n\nnamespace Catch {\n    IRegistryHub::~IRegistryHub() = default;\n    IMutableRegistryHub::~IMutableRegistryHub() = default;\n}\n// end catch_interfaces_registry_hub.cpp\n// start catch_interfaces_reporter.cpp\n\n// start catch_reporter_listening.h\n\nnamespace Catch {\n\n    class ListeningReporter : public IStreamingReporter {\n        using Reporters = std::vector<IStreamingReporterPtr>;\n        Reporters m_listeners;\n        IStreamingReporterPtr m_reporter = nullptr;\n        ReporterPreferences m_preferences;\n\n    public:\n        ListeningReporter();\n\n        void addListener( IStreamingReporterPtr&& listener );\n        void addReporter( IStreamingReporterPtr&& reporter );\n\n    public: // IStreamingReporter\n\n        ReporterPreferences getPreferences() const override;\n\n        void noMatchingTestCases( std::string const& spec ) override;\n\n        void reportInvalidArguments(std::string const&arg) override;\n\n        static std::set<Verbosity> getSupportedVerbosities();\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n        void benchmarkPreparing(std::string const& name) override;\n        void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override;\n        void benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) override;\n        void benchmarkFailed(std::string const&) override;\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n        void testRunStarting( TestRunInfo const& testRunInfo ) override;\n        void testGroupStarting( GroupInfo const& groupInfo ) override;\n        void testCaseStarting( TestCaseInfo const& testInfo ) override;\n        void sectionStarting( SectionInfo const& sectionInfo ) override;\n        void assertionStarting( AssertionInfo const& assertionInfo ) override;\n\n        // The return value indicates if the messages buffer should be cleared:\n        bool assertionEnded( AssertionStats const& assertionStats ) override;\n        void sectionEnded( SectionStats const& sectionStats ) override;\n        void testCaseEnded( TestCaseStats const& testCaseStats ) override;\n        void testGroupEnded( TestGroupStats const& testGroupStats ) override;\n        void testRunEnded( TestRunStats const& testRunStats ) override;\n\n        void skipTest( TestCaseInfo const& testInfo ) override;\n        bool isMulti() const override;\n\n    };\n\n} // end namespace Catch\n\n// end catch_reporter_listening.h\nnamespace Catch {\n\n    ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig )\n            :   m_stream( &_fullConfig->stream() ), m_fullConfig( _fullConfig ) {}\n\n    ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream )\n            :   m_stream( &_stream ), m_fullConfig( _fullConfig ) {}\n\n    std::ostream& ReporterConfig::stream() const { return *m_stream; }\n    IConfigPtr ReporterConfig::fullConfig() const { return m_fullConfig; }\n\n    TestRunInfo::TestRunInfo( std::string const& _name ) : name( _name ) {}\n\n    GroupInfo::GroupInfo(  std::string const& _name,\n                           std::size_t _groupIndex,\n                           std::size_t _groupsCount )\n            :   name( _name ),\n                groupIndex( _groupIndex ),\n                groupsCounts( _groupsCount )\n    {}\n\n    AssertionStats::AssertionStats( AssertionResult const& _assertionResult,\n                                    std::vector<MessageInfo> const& _infoMessages,\n                                    Totals const& _totals )\n            :   assertionResult( _assertionResult ),\n                infoMessages( _infoMessages ),\n                totals( _totals )\n    {\n        assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression;\n\n        if( assertionResult.hasMessage() ) {\n            // Copy message into messages list.\n            // !TBD This should have been done earlier, somewhere\n            MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() );\n            builder << assertionResult.getMessage();\n            builder.m_info.message = builder.m_stream.str();\n\n            infoMessages.push_back( builder.m_info );\n        }\n    }\n\n    AssertionStats::~AssertionStats() = default;\n\n    SectionStats::SectionStats(  SectionInfo const& _sectionInfo,\n                                 Counts const& _assertions,\n                                 double _durationInSeconds,\n                                 bool _missingAssertions )\n            :   sectionInfo( _sectionInfo ),\n                assertions( _assertions ),\n                durationInSeconds( _durationInSeconds ),\n                missingAssertions( _missingAssertions )\n    {}\n\n    SectionStats::~SectionStats() = default;\n\n    TestCaseStats::TestCaseStats(  TestCaseInfo const& _testInfo,\n                                   Totals const& _totals,\n                                   std::string const& _stdOut,\n                                   std::string const& _stdErr,\n                                   bool _aborting )\n            : testInfo( _testInfo ),\n              totals( _totals ),\n              stdOut( _stdOut ),\n              stdErr( _stdErr ),\n              aborting( _aborting )\n    {}\n\n    TestCaseStats::~TestCaseStats() = default;\n\n    TestGroupStats::TestGroupStats( GroupInfo const& _groupInfo,\n                                    Totals const& _totals,\n                                    bool _aborting )\n            :   groupInfo( _groupInfo ),\n                totals( _totals ),\n                aborting( _aborting )\n    {}\n\n    TestGroupStats::TestGroupStats( GroupInfo const& _groupInfo )\n            :   groupInfo( _groupInfo ),\n                aborting( false )\n    {}\n\n    TestGroupStats::~TestGroupStats() = default;\n\n    TestRunStats::TestRunStats(   TestRunInfo const& _runInfo,\n                                  Totals const& _totals,\n                                  bool _aborting )\n            :   runInfo( _runInfo ),\n                totals( _totals ),\n                aborting( _aborting )\n    {}\n\n    TestRunStats::~TestRunStats() = default;\n\n    void IStreamingReporter::fatalErrorEncountered( StringRef ) {}\n    bool IStreamingReporter::isMulti() const { return false; }\n\n    IReporterFactory::~IReporterFactory() = default;\n    IReporterRegistry::~IReporterRegistry() = default;\n\n} // end namespace Catch\n// end catch_interfaces_reporter.cpp\n// start catch_interfaces_runner.cpp\n\nnamespace Catch {\n    IRunner::~IRunner() = default;\n}\n// end catch_interfaces_runner.cpp\n// start catch_interfaces_testcase.cpp\n\nnamespace Catch {\n    ITestInvoker::~ITestInvoker() = default;\n    ITestCaseRegistry::~ITestCaseRegistry() = default;\n}\n// end catch_interfaces_testcase.cpp\n// start catch_leak_detector.cpp\n\n#ifdef CATCH_CONFIG_WINDOWS_CRTDBG\n#include <crtdbg.h>\n\nnamespace Catch {\n\n    LeakDetector::LeakDetector() {\n        int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);\n        flag |= _CRTDBG_LEAK_CHECK_DF;\n        flag |= _CRTDBG_ALLOC_MEM_DF;\n        _CrtSetDbgFlag(flag);\n        _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);\n        _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);\n        // Change this to leaking allocation's number to break there\n        _CrtSetBreakAlloc(-1);\n    }\n}\n\n#else\n\nCatch::LeakDetector::LeakDetector() {}\n\n#endif\n\nCatch::LeakDetector::~LeakDetector() {\n    Catch::cleanUp();\n}\n// end catch_leak_detector.cpp\n// start catch_list.cpp\n\n// start catch_list.h\n\n#include <set>\n\nnamespace Catch {\n\n    std::size_t listTests( Config const& config );\n\n    std::size_t listTestsNamesOnly( Config const& config );\n\n    struct TagInfo {\n        void add( std::string const& spelling );\n        std::string all() const;\n\n        std::set<std::string> spellings;\n        std::size_t count = 0;\n    };\n\n    std::size_t listTags( Config const& config );\n\n    std::size_t listReporters();\n\n    Option<std::size_t> list( std::shared_ptr<Config> const& config );\n\n} // end namespace Catch\n\n// end catch_list.h\n// start catch_text.h\n\nnamespace Catch {\n    using namespace clara::TextFlow;\n}\n\n// end catch_text.h\n#include <limits>\n#include <algorithm>\n#include <iomanip>\n\nnamespace Catch {\n\n    std::size_t listTests( Config const& config ) {\n        TestSpec const& testSpec = config.testSpec();\n        if( config.hasTestFilters() )\n            Catch::cout() << \"Matching test cases:\\n\";\n        else {\n            Catch::cout() << \"All available test cases:\\n\";\n        }\n\n        auto matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );\n        for( auto const& testCaseInfo : matchedTestCases ) {\n            Colour::Code colour = testCaseInfo.isHidden()\n                                  ? Colour::SecondaryText\n                                  : Colour::None;\n            Colour colourGuard( colour );\n\n            Catch::cout() << Column( testCaseInfo.name ).initialIndent( 2 ).indent( 4 ) << \"\\n\";\n            if( config.verbosity() >= Verbosity::High ) {\n                Catch::cout() << Column( Catch::Detail::stringify( testCaseInfo.lineInfo ) ).indent(4) << std::endl;\n                std::string description = testCaseInfo.description;\n                if( description.empty() )\n                    description = \"(NO DESCRIPTION)\";\n                Catch::cout() << Column( description ).indent(4) << std::endl;\n            }\n            if( !testCaseInfo.tags.empty() )\n                Catch::cout() << Column( testCaseInfo.tagsAsString() ).indent( 6 ) << \"\\n\";\n        }\n\n        if( !config.hasTestFilters() )\n            Catch::cout() << pluralise( matchedTestCases.size(), \"test case\" ) << '\\n' << std::endl;\n        else\n            Catch::cout() << pluralise( matchedTestCases.size(), \"matching test case\" ) << '\\n' << std::endl;\n        return matchedTestCases.size();\n    }\n\n    std::size_t listTestsNamesOnly( Config const& config ) {\n        TestSpec const& testSpec = config.testSpec();\n        std::size_t matchedTests = 0;\n        std::vector<TestCase> matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );\n        for( auto const& testCaseInfo : matchedTestCases ) {\n            matchedTests++;\n            if( startsWith( testCaseInfo.name, '#' ) )\n                Catch::cout() << '\"' << testCaseInfo.name << '\"';\n            else\n                Catch::cout() << testCaseInfo.name;\n            if ( config.verbosity() >= Verbosity::High )\n                Catch::cout() << \"\\t@\" << testCaseInfo.lineInfo;\n            Catch::cout() << std::endl;\n        }\n        return matchedTests;\n    }\n\n    void TagInfo::add( std::string const& spelling ) {\n        ++count;\n        spellings.insert( spelling );\n    }\n\n    std::string TagInfo::all() const {\n        size_t size = 0;\n        for (auto const& spelling : spellings) {\n            // Add 2 for the brackes\n            size += spelling.size() + 2;\n        }\n\n        std::string out; out.reserve(size);\n        for (auto const& spelling : spellings) {\n            out += '[';\n            out += spelling;\n            out += ']';\n        }\n        return out;\n    }\n\n    std::size_t listTags( Config const& config ) {\n        TestSpec const& testSpec = config.testSpec();\n        if( config.hasTestFilters() )\n            Catch::cout() << \"Tags for matching test cases:\\n\";\n        else {\n            Catch::cout() << \"All available tags:\\n\";\n        }\n\n        std::map<std::string, TagInfo> tagCounts;\n\n        std::vector<TestCase> matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );\n        for( auto const& testCase : matchedTestCases ) {\n            for( auto const& tagName : testCase.getTestCaseInfo().tags ) {\n                std::string lcaseTagName = toLower( tagName );\n                auto countIt = tagCounts.find( lcaseTagName );\n                if( countIt == tagCounts.end() )\n                    countIt = tagCounts.insert( std::make_pair( lcaseTagName, TagInfo() ) ).first;\n                countIt->second.add( tagName );\n            }\n        }\n\n        for( auto const& tagCount : tagCounts ) {\n            ReusableStringStream rss;\n            rss << \"  \" << std::setw(2) << tagCount.second.count << \"  \";\n            auto str = rss.str();\n            auto wrapper = Column( tagCount.second.all() )\n                    .initialIndent( 0 )\n                    .indent( str.size() )\n                    .width( CATCH_CONFIG_CONSOLE_WIDTH-10 );\n            Catch::cout() << str << wrapper << '\\n';\n        }\n        Catch::cout() << pluralise( tagCounts.size(), \"tag\" ) << '\\n' << std::endl;\n        return tagCounts.size();\n    }\n\n    std::size_t listReporters() {\n        Catch::cout() << \"Available reporters:\\n\";\n        IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();\n        std::size_t maxNameLen = 0;\n        for( auto const& factoryKvp : factories )\n            maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );\n\n        for( auto const& factoryKvp : factories ) {\n            Catch::cout()\n                    << Column( factoryKvp.first + \":\" )\n                               .indent(2)\n                               .width( 5+maxNameLen )\n                       +  Column( factoryKvp.second->getDescription() )\n                               .initialIndent(0)\n                               .indent(2)\n                               .width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 )\n                    << \"\\n\";\n        }\n        Catch::cout() << std::endl;\n        return factories.size();\n    }\n\n    Option<std::size_t> list( std::shared_ptr<Config> const& config ) {\n        Option<std::size_t> listedCount;\n        getCurrentMutableContext().setConfig( config );\n        if( config->listTests() )\n            listedCount = listedCount.valueOr(0) + listTests( *config );\n        if( config->listTestNamesOnly() )\n            listedCount = listedCount.valueOr(0) + listTestsNamesOnly( *config );\n        if( config->listTags() )\n            listedCount = listedCount.valueOr(0) + listTags( *config );\n        if( config->listReporters() )\n            listedCount = listedCount.valueOr(0) + listReporters();\n        return listedCount;\n    }\n\n} // end namespace Catch\n// end catch_list.cpp\n// start catch_matchers.cpp\n\nnamespace Catch {\n    namespace Matchers {\n        namespace Impl {\n\n            std::string MatcherUntypedBase::toString() const {\n                if( m_cachedToString.empty() )\n                    m_cachedToString = describe();\n                return m_cachedToString;\n            }\n\n            MatcherUntypedBase::~MatcherUntypedBase() = default;\n\n        } // namespace Impl\n    } // namespace Matchers\n\n    using namespace Matchers;\n    using Matchers::Impl::MatcherBase;\n\n} // namespace Catch\n// end catch_matchers.cpp\n// start catch_matchers_exception.cpp\n\nnamespace Catch {\n    namespace Matchers {\n        namespace Exception {\n\n            bool ExceptionMessageMatcher::match(std::exception const& ex) const {\n                return ex.what() == m_message;\n            }\n\n            std::string ExceptionMessageMatcher::describe() const {\n                return \"exception message matches \\\"\" + m_message + \"\\\"\";\n            }\n\n        }\n        Exception::ExceptionMessageMatcher Message(std::string const& message) {\n            return Exception::ExceptionMessageMatcher(message);\n        }\n\n// namespace Exception\n    } // namespace Matchers\n} // namespace Catch\n// end catch_matchers_exception.cpp\n// start catch_matchers_floating.cpp\n\n// start catch_polyfills.hpp\n\nnamespace Catch {\n    bool isnan(float f);\n    bool isnan(double d);\n}\n\n// end catch_polyfills.hpp\n// start catch_to_string.hpp\n\n#include <string>\n\nnamespace Catch {\n    template <typename T>\n    std::string to_string(T const& t) {\n#if defined(CATCH_CONFIG_CPP11_TO_STRING)\n        return std::to_string(t);\n#else\n        ReusableStringStream rss;\n        rss << t;\n        return rss.str();\n#endif\n    }\n} // end namespace Catch\n\n// end catch_to_string.hpp\n#include <algorithm>\n#include <cmath>\n#include <cstdlib>\n#include <cstdint>\n#include <cstring>\n#include <sstream>\n#include <type_traits>\n#include <iomanip>\n#include <limits>\n\nnamespace Catch {\n    namespace {\n\n        int32_t convert(float f) {\n            static_assert(sizeof(float) == sizeof(int32_t), \"Important ULP matcher assumption violated\");\n            int32_t i;\n            std::memcpy(&i, &f, sizeof(f));\n            return i;\n        }\n\n        int64_t convert(double d) {\n            static_assert(sizeof(double) == sizeof(int64_t), \"Important ULP matcher assumption violated\");\n            int64_t i;\n            std::memcpy(&i, &d, sizeof(d));\n            return i;\n        }\n\n        template <typename FP>\n        bool almostEqualUlps(FP lhs, FP rhs, uint64_t maxUlpDiff) {\n            // Comparison with NaN should always be false.\n            // This way we can rule it out before getting into the ugly details\n            if (Catch::isnan(lhs) || Catch::isnan(rhs)) {\n                return false;\n            }\n\n            auto lc = convert(lhs);\n            auto rc = convert(rhs);\n\n            if ((lc < 0) != (rc < 0)) {\n                // Potentially we can have +0 and -0\n                return lhs == rhs;\n            }\n\n            // static cast as a workaround for IBM XLC\n            auto ulpDiff = std::abs(static_cast<FP>(lc - rc));\n            return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff;\n        }\n\n#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)\n\n        float nextafter(float x, float y) {\n        return ::nextafterf(x, y);\n    }\n\n    double nextafter(double x, double y) {\n        return ::nextafter(x, y);\n    }\n\n#endif // ^^^ CATCH_CONFIG_GLOBAL_NEXTAFTER ^^^\n\n        template <typename FP>\n        FP step(FP start, FP direction, uint64_t steps) {\n            for (uint64_t i = 0; i < steps; ++i) {\n#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)\n                start = Catch::nextafter(start, direction);\n#else\n                start = std::nextafter(start, direction);\n#endif\n            }\n            return start;\n        }\n\n// Performs equivalent check of std::fabs(lhs - rhs) <= margin\n// But without the subtraction to allow for INFINITY in comparison\n        bool marginComparison(double lhs, double rhs, double margin) {\n            return (lhs + margin >= rhs) && (rhs + margin >= lhs);\n        }\n\n        template <typename FloatingPoint>\n        void write(std::ostream& out, FloatingPoint num) {\n            out << std::scientific\n                << std::setprecision(std::numeric_limits<FloatingPoint>::max_digits10 - 1)\n                << num;\n        }\n\n    } // end anonymous namespace\n\n    namespace Matchers {\n        namespace Floating {\n\n            enum class FloatingPointKind : uint8_t {\n                Float,\n                Double\n            };\n\n            WithinAbsMatcher::WithinAbsMatcher(double target, double margin)\n                    :m_target{ target }, m_margin{ margin } {\n                CATCH_ENFORCE(margin >= 0, \"Invalid margin: \" << margin << '.'\n                                                              << \" Margin has to be non-negative.\");\n            }\n\n            // Performs equivalent check of std::fabs(lhs - rhs) <= margin\n            // But without the subtraction to allow for INFINITY in comparison\n            bool WithinAbsMatcher::match(double const& matchee) const {\n                return (matchee + m_margin >= m_target) && (m_target + m_margin >= matchee);\n            }\n\n            std::string WithinAbsMatcher::describe() const {\n                return \"is within \" + ::Catch::Detail::stringify(m_margin) + \" of \" + ::Catch::Detail::stringify(m_target);\n            }\n\n            WithinUlpsMatcher::WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType)\n                    :m_target{ target }, m_ulps{ ulps }, m_type{ baseType } {\n                CATCH_ENFORCE(m_type == FloatingPointKind::Double\n                              || m_ulps < (std::numeric_limits<uint32_t>::max)(),\n                              \"Provided ULP is impossibly large for a float comparison.\");\n            }\n\n#if defined(__clang__)\n            #pragma clang diagnostic push\n// Clang <3.5 reports on the default branch in the switch below\n#pragma clang diagnostic ignored \"-Wunreachable-code\"\n#endif\n\n            bool WithinUlpsMatcher::match(double const& matchee) const {\n                switch (m_type) {\n                    case FloatingPointKind::Float:\n                        return almostEqualUlps<float>(static_cast<float>(matchee), static_cast<float>(m_target), m_ulps);\n                    case FloatingPointKind::Double:\n                        return almostEqualUlps<double>(matchee, m_target, m_ulps);\n                    default:\n                        CATCH_INTERNAL_ERROR( \"Unknown FloatingPointKind value\" );\n                }\n            }\n\n#if defined(__clang__)\n#pragma clang diagnostic pop\n#endif\n\n            std::string WithinUlpsMatcher::describe() const {\n                std::stringstream ret;\n\n                ret << \"is within \" << m_ulps << \" ULPs of \";\n\n                if (m_type == FloatingPointKind::Float) {\n                    write(ret, static_cast<float>(m_target));\n                    ret << 'f';\n                } else {\n                    write(ret, m_target);\n                }\n\n                ret << \" ([\";\n                if (m_type == FloatingPointKind::Double) {\n                    write(ret, step(m_target, static_cast<double>(-INFINITY), m_ulps));\n                    ret << \", \";\n                    write(ret, step(m_target, static_cast<double>( INFINITY), m_ulps));\n                } else {\n                    // We have to cast INFINITY to float because of MinGW, see #1782\n                    write(ret, step(static_cast<float>(m_target), static_cast<float>(-INFINITY), m_ulps));\n                    ret << \", \";\n                    write(ret, step(static_cast<float>(m_target), static_cast<float>( INFINITY), m_ulps));\n                }\n                ret << \"])\";\n\n                return ret.str();\n            }\n\n            WithinRelMatcher::WithinRelMatcher(double target, double epsilon):\n                    m_target(target),\n                    m_epsilon(epsilon){\n                CATCH_ENFORCE(m_epsilon >= 0., \"Relative comparison with epsilon <  0 does not make sense.\");\n                CATCH_ENFORCE(m_epsilon  < 1., \"Relative comparison with epsilon >= 1 does not make sense.\");\n            }\n\n            bool WithinRelMatcher::match(double const& matchee) const {\n                const auto relMargin = m_epsilon * (std::max)(std::fabs(matchee), std::fabs(m_target));\n                return marginComparison(matchee, m_target,\n                                        std::isinf(relMargin)? 0 : relMargin);\n            }\n\n            std::string WithinRelMatcher::describe() const {\n                Catch::ReusableStringStream sstr;\n                sstr << \"and \" << m_target << \" are within \" << m_epsilon * 100. << \"% of each other\";\n                return sstr.str();\n            }\n\n        }// namespace Floating\n\n        Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff) {\n            return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Double);\n        }\n\n        Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff) {\n            return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Float);\n        }\n\n        Floating::WithinAbsMatcher WithinAbs(double target, double margin) {\n            return Floating::WithinAbsMatcher(target, margin);\n        }\n\n        Floating::WithinRelMatcher WithinRel(double target, double eps) {\n            return Floating::WithinRelMatcher(target, eps);\n        }\n\n        Floating::WithinRelMatcher WithinRel(double target) {\n            return Floating::WithinRelMatcher(target, std::numeric_limits<double>::epsilon() * 100);\n        }\n\n        Floating::WithinRelMatcher WithinRel(float target, float eps) {\n            return Floating::WithinRelMatcher(target, eps);\n        }\n\n        Floating::WithinRelMatcher WithinRel(float target) {\n            return Floating::WithinRelMatcher(target, std::numeric_limits<float>::epsilon() * 100);\n        }\n\n    } // namespace Matchers\n} // namespace Catch\n// end catch_matchers_floating.cpp\n// start catch_matchers_generic.cpp\n\nstd::string Catch::Matchers::Generic::Detail::finalizeDescription(const std::string& desc) {\n    if (desc.empty()) {\n        return \"matches undescribed predicate\";\n    } else {\n        return \"matches predicate: \\\"\" + desc + '\"';\n    }\n}\n// end catch_matchers_generic.cpp\n// start catch_matchers_string.cpp\n\n#include <regex>\n\nnamespace Catch {\n    namespace Matchers {\n\n        namespace StdString {\n\n            CasedString::CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity )\n                    :   m_caseSensitivity( caseSensitivity ),\n                        m_str( adjustString( str ) )\n            {}\n            std::string CasedString::adjustString( std::string const& str ) const {\n                return m_caseSensitivity == CaseSensitive::No\n                       ? toLower( str )\n                       : str;\n            }\n            std::string CasedString::caseSensitivitySuffix() const {\n                return m_caseSensitivity == CaseSensitive::No\n                       ? \" (case insensitive)\"\n                       : std::string();\n            }\n\n            StringMatcherBase::StringMatcherBase( std::string const& operation, CasedString const& comparator )\n                    : m_comparator( comparator ),\n                      m_operation( operation ) {\n            }\n\n            std::string StringMatcherBase::describe() const {\n                std::string description;\n                description.reserve(5 + m_operation.size() + m_comparator.m_str.size() +\n                                    m_comparator.caseSensitivitySuffix().size());\n                description += m_operation;\n                description += \": \\\"\";\n                description += m_comparator.m_str;\n                description += \"\\\"\";\n                description += m_comparator.caseSensitivitySuffix();\n                return description;\n            }\n\n            EqualsMatcher::EqualsMatcher( CasedString const& comparator ) : StringMatcherBase( \"equals\", comparator ) {}\n\n            bool EqualsMatcher::match( std::string const& source ) const {\n                return m_comparator.adjustString( source ) == m_comparator.m_str;\n            }\n\n            ContainsMatcher::ContainsMatcher( CasedString const& comparator ) : StringMatcherBase( \"contains\", comparator ) {}\n\n            bool ContainsMatcher::match( std::string const& source ) const {\n                return contains( m_comparator.adjustString( source ), m_comparator.m_str );\n            }\n\n            StartsWithMatcher::StartsWithMatcher( CasedString const& comparator ) : StringMatcherBase( \"starts with\", comparator ) {}\n\n            bool StartsWithMatcher::match( std::string const& source ) const {\n                return startsWith( m_comparator.adjustString( source ), m_comparator.m_str );\n            }\n\n            EndsWithMatcher::EndsWithMatcher( CasedString const& comparator ) : StringMatcherBase( \"ends with\", comparator ) {}\n\n            bool EndsWithMatcher::match( std::string const& source ) const {\n                return endsWith( m_comparator.adjustString( source ), m_comparator.m_str );\n            }\n\n            RegexMatcher::RegexMatcher(std::string regex, CaseSensitive::Choice caseSensitivity): m_regex(std::move(regex)), m_caseSensitivity(caseSensitivity) {}\n\n            bool RegexMatcher::match(std::string const& matchee) const {\n                auto flags = std::regex::ECMAScript; // ECMAScript is the default syntax option anyway\n                if (m_caseSensitivity == CaseSensitive::Choice::No) {\n                    flags |= std::regex::icase;\n                }\n                auto reg = std::regex(m_regex, flags);\n                return std::regex_match(matchee, reg);\n            }\n\n            std::string RegexMatcher::describe() const {\n                return \"matches \" + ::Catch::Detail::stringify(m_regex) + ((m_caseSensitivity == CaseSensitive::Choice::Yes)? \" case sensitively\" : \" case insensitively\");\n            }\n\n        } // namespace StdString\n\n        StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n            return StdString::EqualsMatcher( StdString::CasedString( str, caseSensitivity) );\n        }\n        StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n            return StdString::ContainsMatcher( StdString::CasedString( str, caseSensitivity) );\n        }\n        StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n            return StdString::EndsWithMatcher( StdString::CasedString( str, caseSensitivity) );\n        }\n        StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) {\n            return StdString::StartsWithMatcher( StdString::CasedString( str, caseSensitivity) );\n        }\n\n        StdString::RegexMatcher Matches(std::string const& regex, CaseSensitive::Choice caseSensitivity) {\n            return StdString::RegexMatcher(regex, caseSensitivity);\n        }\n\n    } // namespace Matchers\n} // namespace Catch\n// end catch_matchers_string.cpp\n// start catch_message.cpp\n\n// start catch_uncaught_exceptions.h\n\nnamespace Catch {\n    bool uncaught_exceptions();\n} // end namespace Catch\n\n// end catch_uncaught_exceptions.h\n#include <cassert>\n#include <stack>\n\nnamespace Catch {\n\n    MessageInfo::MessageInfo(   StringRef const& _macroName,\n                                SourceLineInfo const& _lineInfo,\n                                ResultWas::OfType _type )\n            :   macroName( _macroName ),\n                lineInfo( _lineInfo ),\n                type( _type ),\n                sequence( ++globalCount )\n    {}\n\n    bool MessageInfo::operator==( MessageInfo const& other ) const {\n        return sequence == other.sequence;\n    }\n\n    bool MessageInfo::operator<( MessageInfo const& other ) const {\n        return sequence < other.sequence;\n    }\n\n    // This may need protecting if threading support is added\n    unsigned int MessageInfo::globalCount = 0;\n\n    ////////////////////////////////////////////////////////////////////////////\n\n    Catch::MessageBuilder::MessageBuilder( StringRef const& macroName,\n                                           SourceLineInfo const& lineInfo,\n                                           ResultWas::OfType type )\n            :m_info(macroName, lineInfo, type) {}\n\n    ////////////////////////////////////////////////////////////////////////////\n\n    ScopedMessage::ScopedMessage( MessageBuilder const& builder )\n            : m_info( builder.m_info ), m_moved()\n    {\n        m_info.message = builder.m_stream.str();\n        getResultCapture().pushScopedMessage( m_info );\n    }\n\n    ScopedMessage::ScopedMessage( ScopedMessage&& old )\n            : m_info( old.m_info ), m_moved()\n    {\n        old.m_moved = true;\n    }\n\n    ScopedMessage::~ScopedMessage() {\n        if ( !uncaught_exceptions() && !m_moved ){\n            getResultCapture().popScopedMessage(m_info);\n        }\n    }\n\n    Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) {\n        auto trimmed = [&] (size_t start, size_t end) {\n            while (names[start] == ',' || isspace(static_cast<unsigned char>(names[start]))) {\n                ++start;\n            }\n            while (names[end] == ',' || isspace(static_cast<unsigned char>(names[end]))) {\n                --end;\n            }\n            return names.substr(start, end - start + 1);\n        };\n        auto skipq = [&] (size_t start, char quote) {\n            for (auto i = start + 1; i < names.size() ; ++i) {\n                if (names[i] == quote)\n                    return i;\n                if (names[i] == '\\\\')\n                    ++i;\n            }\n            CATCH_INTERNAL_ERROR(\"CAPTURE parsing encountered unmatched quote\");\n        };\n\n        size_t start = 0;\n        std::stack<char> openings;\n        for (size_t pos = 0; pos < names.size(); ++pos) {\n            char c = names[pos];\n            switch (c) {\n                case '[':\n                case '{':\n                case '(':\n                    // It is basically impossible to disambiguate between\n                    // comparison and start of template args in this context\n//            case '<':\n                    openings.push(c);\n                    break;\n                case ']':\n                case '}':\n                case ')':\n//           case '>':\n                    openings.pop();\n                    break;\n                case '\"':\n                case '\\'':\n                    pos = skipq(pos, c);\n                    break;\n                case ',':\n                    if (start != pos && openings.empty()) {\n                        m_messages.emplace_back(macroName, lineInfo, resultType);\n                        m_messages.back().message = static_cast<std::string>(trimmed(start, pos));\n                        m_messages.back().message += \" := \";\n                        start = pos;\n                    }\n            }\n        }\n        assert(openings.empty() && \"Mismatched openings\");\n        m_messages.emplace_back(macroName, lineInfo, resultType);\n        m_messages.back().message = static_cast<std::string>(trimmed(start, names.size() - 1));\n        m_messages.back().message += \" := \";\n    }\n    Capturer::~Capturer() {\n        if ( !uncaught_exceptions() ){\n            assert( m_captured == m_messages.size() );\n            for( size_t i = 0; i < m_captured; ++i  )\n                m_resultCapture.popScopedMessage( m_messages[i] );\n        }\n    }\n\n    void Capturer::captureValue( size_t index, std::string const& value ) {\n        assert( index < m_messages.size() );\n        m_messages[index].message += value;\n        m_resultCapture.pushScopedMessage( m_messages[index] );\n        m_captured++;\n    }\n\n} // end namespace Catch\n// end catch_message.cpp\n// start catch_output_redirect.cpp\n\n// start catch_output_redirect.h\n#ifndef TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H\n#define TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H\n\n#include <cstdio>\n#include <iosfwd>\n#include <string>\n\nnamespace Catch {\n\n    class RedirectedStream {\n        std::ostream& m_originalStream;\n        std::ostream& m_redirectionStream;\n        std::streambuf* m_prevBuf;\n\n    public:\n        RedirectedStream( std::ostream& originalStream, std::ostream& redirectionStream );\n        ~RedirectedStream();\n    };\n\n    class RedirectedStdOut {\n        ReusableStringStream m_rss;\n        RedirectedStream m_cout;\n    public:\n        RedirectedStdOut();\n        auto str() const -> std::string;\n    };\n\n    // StdErr has two constituent streams in C++, std::cerr and std::clog\n    // This means that we need to redirect 2 streams into 1 to keep proper\n    // order of writes\n    class RedirectedStdErr {\n        ReusableStringStream m_rss;\n        RedirectedStream m_cerr;\n        RedirectedStream m_clog;\n    public:\n        RedirectedStdErr();\n        auto str() const -> std::string;\n    };\n\n    class RedirectedStreams {\n    public:\n        RedirectedStreams(RedirectedStreams const&) = delete;\n        RedirectedStreams& operator=(RedirectedStreams const&) = delete;\n        RedirectedStreams(RedirectedStreams&&) = delete;\n        RedirectedStreams& operator=(RedirectedStreams&&) = delete;\n\n        RedirectedStreams(std::string& redirectedCout, std::string& redirectedCerr);\n        ~RedirectedStreams();\n    private:\n        std::string& m_redirectedCout;\n        std::string& m_redirectedCerr;\n        RedirectedStdOut m_redirectedStdOut;\n        RedirectedStdErr m_redirectedStdErr;\n    };\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n\n    // Windows's implementation of std::tmpfile is terrible (it tries\n    // to create a file inside system folder, thus requiring elevated\n    // privileges for the binary), so we have to use tmpnam(_s) and\n    // create the file ourselves there.\n    class TempFile {\n    public:\n        TempFile(TempFile const&) = delete;\n        TempFile& operator=(TempFile const&) = delete;\n        TempFile(TempFile&&) = delete;\n        TempFile& operator=(TempFile&&) = delete;\n\n        TempFile();\n        ~TempFile();\n\n        std::FILE* getFile();\n        std::string getContents();\n\n    private:\n        std::FILE* m_file = nullptr;\n    #if defined(_MSC_VER)\n        char m_buffer[L_tmpnam] = { 0 };\n    #endif\n    };\n\n    class OutputRedirect {\n    public:\n        OutputRedirect(OutputRedirect const&) = delete;\n        OutputRedirect& operator=(OutputRedirect const&) = delete;\n        OutputRedirect(OutputRedirect&&) = delete;\n        OutputRedirect& operator=(OutputRedirect&&) = delete;\n\n        OutputRedirect(std::string& stdout_dest, std::string& stderr_dest);\n        ~OutputRedirect();\n\n    private:\n        int m_originalStdout = -1;\n        int m_originalStderr = -1;\n        TempFile m_stdoutFile;\n        TempFile m_stderrFile;\n        std::string& m_stdoutDest;\n        std::string& m_stderrDest;\n    };\n\n#endif\n\n} // end namespace Catch\n\n#endif // TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H\n// end catch_output_redirect.h\n#include <cstdio>\n#include <cstring>\n#include <fstream>\n#include <sstream>\n#include <stdexcept>\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n#if defined(_MSC_VER)\n    #include <io.h>      //_dup and _dup2\n    #define dup _dup\n    #define dup2 _dup2\n    #define fileno _fileno\n    #else\n    #include <unistd.h>  // dup and dup2\n    #endif\n#endif\n\nnamespace Catch {\n\n    RedirectedStream::RedirectedStream( std::ostream& originalStream, std::ostream& redirectionStream )\n            :   m_originalStream( originalStream ),\n                m_redirectionStream( redirectionStream ),\n                m_prevBuf( m_originalStream.rdbuf() )\n    {\n        m_originalStream.rdbuf( m_redirectionStream.rdbuf() );\n    }\n\n    RedirectedStream::~RedirectedStream() {\n        m_originalStream.rdbuf( m_prevBuf );\n    }\n\n    RedirectedStdOut::RedirectedStdOut() : m_cout( Catch::cout(), m_rss.get() ) {}\n    auto RedirectedStdOut::str() const -> std::string { return m_rss.str(); }\n\n    RedirectedStdErr::RedirectedStdErr()\n            :   m_cerr( Catch::cerr(), m_rss.get() ),\n                m_clog( Catch::clog(), m_rss.get() )\n    {}\n    auto RedirectedStdErr::str() const -> std::string { return m_rss.str(); }\n\n    RedirectedStreams::RedirectedStreams(std::string& redirectedCout, std::string& redirectedCerr)\n            :   m_redirectedCout(redirectedCout),\n                m_redirectedCerr(redirectedCerr)\n    {}\n\n    RedirectedStreams::~RedirectedStreams() {\n        m_redirectedCout += m_redirectedStdOut.str();\n        m_redirectedCerr += m_redirectedStdErr.str();\n    }\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n\n    #if defined(_MSC_VER)\n    TempFile::TempFile() {\n        if (tmpnam_s(m_buffer)) {\n            CATCH_RUNTIME_ERROR(\"Could not get a temp filename\");\n        }\n        if (fopen_s(&m_file, m_buffer, \"w+\")) {\n            char buffer[100];\n            if (strerror_s(buffer, errno)) {\n                CATCH_RUNTIME_ERROR(\"Could not translate errno to a string\");\n            }\n            CATCH_RUNTIME_ERROR(\"Could not open the temp file: '\" << m_buffer << \"' because: \" << buffer);\n        }\n    }\n#else\n    TempFile::TempFile() {\n        m_file = std::tmpfile();\n        if (!m_file) {\n            CATCH_RUNTIME_ERROR(\"Could not create a temp file.\");\n        }\n    }\n\n#endif\n\n    TempFile::~TempFile() {\n         // TBD: What to do about errors here?\n         std::fclose(m_file);\n         // We manually create the file on Windows only, on Linux\n         // it will be autodeleted\n#if defined(_MSC_VER)\n         std::remove(m_buffer);\n#endif\n    }\n\n    FILE* TempFile::getFile() {\n        return m_file;\n    }\n\n    std::string TempFile::getContents() {\n        std::stringstream sstr;\n        char buffer[100] = {};\n        std::rewind(m_file);\n        while (std::fgets(buffer, sizeof(buffer), m_file)) {\n            sstr << buffer;\n        }\n        return sstr.str();\n    }\n\n    OutputRedirect::OutputRedirect(std::string& stdout_dest, std::string& stderr_dest) :\n        m_originalStdout(dup(1)),\n        m_originalStderr(dup(2)),\n        m_stdoutDest(stdout_dest),\n        m_stderrDest(stderr_dest) {\n        dup2(fileno(m_stdoutFile.getFile()), 1);\n        dup2(fileno(m_stderrFile.getFile()), 2);\n    }\n\n    OutputRedirect::~OutputRedirect() {\n        Catch::cout() << std::flush;\n        fflush(stdout);\n        // Since we support overriding these streams, we flush cerr\n        // even though std::cerr is unbuffered\n        Catch::cerr() << std::flush;\n        Catch::clog() << std::flush;\n        fflush(stderr);\n\n        dup2(m_originalStdout, 1);\n        dup2(m_originalStderr, 2);\n\n        m_stdoutDest += m_stdoutFile.getContents();\n        m_stderrDest += m_stderrFile.getContents();\n    }\n\n#endif // CATCH_CONFIG_NEW_CAPTURE\n\n} // namespace Catch\n\n#if defined(CATCH_CONFIG_NEW_CAPTURE)\n#if defined(_MSC_VER)\n    #undef dup\n    #undef dup2\n    #undef fileno\n    #endif\n#endif\n// end catch_output_redirect.cpp\n// start catch_polyfills.cpp\n\n#include <cmath>\n\nnamespace Catch {\n\n#if !defined(CATCH_CONFIG_POLYFILL_ISNAN)\n    bool isnan(float f) {\n        return std::isnan(f);\n    }\n    bool isnan(double d) {\n        return std::isnan(d);\n    }\n#else\n    // For now we only use this for embarcadero\n    bool isnan(float f) {\n        return std::_isnan(f);\n    }\n    bool isnan(double d) {\n        return std::_isnan(d);\n    }\n#endif\n\n} // end namespace Catch\n// end catch_polyfills.cpp\n// start catch_random_number_generator.cpp\n\nnamespace Catch {\n\n    namespace {\n\n#if defined(_MSC_VER)\n        #pragma warning(push)\n#pragma warning(disable:4146) // we negate uint32 during the rotate\n#endif\n        // Safe rotr implementation thanks to John Regehr\n        uint32_t rotate_right(uint32_t val, uint32_t count) {\n            const uint32_t mask = 31;\n            count &= mask;\n            return (val >> count) | (val << (-count & mask));\n        }\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n\n    }\n\n    SimplePcg32::SimplePcg32(result_type seed_) {\n        seed(seed_);\n    }\n\n    void SimplePcg32::seed(result_type seed_) {\n        m_state = 0;\n        (*this)();\n        m_state += seed_;\n        (*this)();\n    }\n\n    void SimplePcg32::discard(uint64_t skip) {\n        // We could implement this to run in O(log n) steps, but this\n        // should suffice for our use case.\n        for (uint64_t s = 0; s < skip; ++s) {\n            static_cast<void>((*this)());\n        }\n    }\n\n    SimplePcg32::result_type SimplePcg32::operator()() {\n        // prepare the output value\n        const uint32_t xorshifted = static_cast<uint32_t>(((m_state >> 18u) ^ m_state) >> 27u);\n        const auto output = rotate_right(xorshifted, m_state >> 59u);\n\n        // advance state\n        m_state = m_state * 6364136223846793005ULL + s_inc;\n\n        return output;\n    }\n\n    bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {\n        return lhs.m_state == rhs.m_state;\n    }\n\n    bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {\n        return lhs.m_state != rhs.m_state;\n    }\n}\n// end catch_random_number_generator.cpp\n// start catch_registry_hub.cpp\n\n// start catch_test_case_registry_impl.h\n\n#include <vector>\n#include <set>\n#include <algorithm>\n#include <ios>\n\nnamespace Catch {\n\n    class TestCase;\n    struct IConfig;\n\n    std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases );\n\n    bool isThrowSafe( TestCase const& testCase, IConfig const& config );\n    bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );\n\n    void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions );\n\n    std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );\n    std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );\n\n    class TestRegistry : public ITestCaseRegistry {\n    public:\n        virtual ~TestRegistry() = default;\n\n        virtual void registerTest( TestCase const& testCase );\n\n        std::vector<TestCase> const& getAllTests() const override;\n        std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const override;\n\n    private:\n        std::vector<TestCase> m_functions;\n        mutable RunTests::InWhatOrder m_currentSortOrder = RunTests::InDeclarationOrder;\n        mutable std::vector<TestCase> m_sortedFunctions;\n        std::size_t m_unnamedCount = 0;\n        std::ios_base::Init m_ostreamInit; // Forces cout/ cerr to be initialised\n    };\n\n    ///////////////////////////////////////////////////////////////////////////\n\n    class TestInvokerAsFunction : public ITestInvoker {\n        void(*m_testAsFunction)();\n    public:\n        TestInvokerAsFunction( void(*testAsFunction)() ) noexcept;\n\n        void invoke() const override;\n    };\n\n    std::string extractClassName( StringRef const& classOrQualifiedMethodName );\n\n    ///////////////////////////////////////////////////////////////////////////\n\n} // end namespace Catch\n\n// end catch_test_case_registry_impl.h\n// start catch_reporter_registry.h\n\n#include <map>\n\nnamespace Catch {\n\n    class ReporterRegistry : public IReporterRegistry {\n\n    public:\n\n        ~ReporterRegistry() override;\n\n        IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const override;\n\n        void registerReporter( std::string const& name, IReporterFactoryPtr const& factory );\n        void registerListener( IReporterFactoryPtr const& factory );\n\n        FactoryMap const& getFactories() const override;\n        Listeners const& getListeners() const override;\n\n    private:\n        FactoryMap m_factories;\n        Listeners m_listeners;\n    };\n}\n\n// end catch_reporter_registry.h\n// start catch_tag_alias_registry.h\n\n// start catch_tag_alias.h\n\n#include <string>\n\nnamespace Catch {\n\n    struct TagAlias {\n        TagAlias(std::string const& _tag, SourceLineInfo _lineInfo);\n\n        std::string tag;\n        SourceLineInfo lineInfo;\n    };\n\n} // end namespace Catch\n\n// end catch_tag_alias.h\n#include <map>\n\nnamespace Catch {\n\n    class TagAliasRegistry : public ITagAliasRegistry {\n    public:\n        ~TagAliasRegistry() override;\n        TagAlias const* find( std::string const& alias ) const override;\n        std::string expandAliases( std::string const& unexpandedTestSpec ) const override;\n        void add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo );\n\n    private:\n        std::map<std::string, TagAlias> m_registry;\n    };\n\n} // end namespace Catch\n\n// end catch_tag_alias_registry.h\n// start catch_startup_exception_registry.h\n\n#include <vector>\n#include <exception>\n\nnamespace Catch {\n\n    class StartupExceptionRegistry {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n    public:\n        void add(std::exception_ptr const& exception) noexcept;\n        std::vector<std::exception_ptr> const& getExceptions() const noexcept;\n    private:\n        std::vector<std::exception_ptr> m_exceptions;\n#endif\n    };\n\n} // end namespace Catch\n\n// end catch_startup_exception_registry.h\n// start catch_singletons.hpp\n\nnamespace Catch {\n\n    struct ISingleton {\n        virtual ~ISingleton();\n    };\n\n    void addSingleton( ISingleton* singleton );\n    void cleanupSingletons();\n\n    template<typename SingletonImplT, typename InterfaceT = SingletonImplT, typename MutableInterfaceT = InterfaceT>\n    class Singleton : SingletonImplT, public ISingleton {\n\n        static auto getInternal() -> Singleton* {\n            static Singleton* s_instance = nullptr;\n            if( !s_instance ) {\n                s_instance = new Singleton;\n                addSingleton( s_instance );\n            }\n            return s_instance;\n        }\n\n    public:\n        static auto get() -> InterfaceT const& {\n            return *getInternal();\n        }\n        static auto getMutable() -> MutableInterfaceT& {\n            return *getInternal();\n        }\n    };\n\n} // namespace Catch\n\n// end catch_singletons.hpp\nnamespace Catch {\n\n    namespace {\n\n        class RegistryHub : public IRegistryHub, public IMutableRegistryHub,\n                            private NonCopyable {\n\n        public: // IRegistryHub\n            RegistryHub() = default;\n            IReporterRegistry const& getReporterRegistry() const override {\n                return m_reporterRegistry;\n            }\n            ITestCaseRegistry const& getTestCaseRegistry() const override {\n                return m_testCaseRegistry;\n            }\n            IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const override {\n                return m_exceptionTranslatorRegistry;\n            }\n            ITagAliasRegistry const& getTagAliasRegistry() const override {\n                return m_tagAliasRegistry;\n            }\n            StartupExceptionRegistry const& getStartupExceptionRegistry() const override {\n                return m_exceptionRegistry;\n            }\n\n        public: // IMutableRegistryHub\n            void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) override {\n                m_reporterRegistry.registerReporter( name, factory );\n            }\n            void registerListener( IReporterFactoryPtr const& factory ) override {\n                m_reporterRegistry.registerListener( factory );\n            }\n            void registerTest( TestCase const& testInfo ) override {\n                m_testCaseRegistry.registerTest( testInfo );\n            }\n            void registerTranslator( const IExceptionTranslator* translator ) override {\n                m_exceptionTranslatorRegistry.registerTranslator( translator );\n            }\n            void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) override {\n                m_tagAliasRegistry.add( alias, tag, lineInfo );\n            }\n            void registerStartupException() noexcept override {\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n                m_exceptionRegistry.add(std::current_exception());\n#else\n                CATCH_INTERNAL_ERROR(\"Attempted to register active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!\");\n#endif\n            }\n            IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() override {\n                return m_enumValuesRegistry;\n            }\n\n        private:\n            TestRegistry m_testCaseRegistry;\n            ReporterRegistry m_reporterRegistry;\n            ExceptionTranslatorRegistry m_exceptionTranslatorRegistry;\n            TagAliasRegistry m_tagAliasRegistry;\n            StartupExceptionRegistry m_exceptionRegistry;\n            Detail::EnumValuesRegistry m_enumValuesRegistry;\n        };\n    }\n\n    using RegistryHubSingleton = Singleton<RegistryHub, IRegistryHub, IMutableRegistryHub>;\n\n    IRegistryHub const& getRegistryHub() {\n        return RegistryHubSingleton::get();\n    }\n    IMutableRegistryHub& getMutableRegistryHub() {\n        return RegistryHubSingleton::getMutable();\n    }\n    void cleanUp() {\n        cleanupSingletons();\n        cleanUpContext();\n    }\n    std::string translateActiveException() {\n        return getRegistryHub().getExceptionTranslatorRegistry().translateActiveException();\n    }\n\n} // end namespace Catch\n// end catch_registry_hub.cpp\n// start catch_reporter_registry.cpp\n\nnamespace Catch {\n\n    ReporterRegistry::~ReporterRegistry() = default;\n\n    IStreamingReporterPtr ReporterRegistry::create( std::string const& name, IConfigPtr const& config ) const {\n        auto it =  m_factories.find( name );\n        if( it == m_factories.end() )\n            return nullptr;\n        return it->second->create( ReporterConfig( config ) );\n    }\n\n    void ReporterRegistry::registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) {\n        m_factories.emplace(name, factory);\n    }\n    void ReporterRegistry::registerListener( IReporterFactoryPtr const& factory ) {\n        m_listeners.push_back( factory );\n    }\n\n    IReporterRegistry::FactoryMap const& ReporterRegistry::getFactories() const {\n        return m_factories;\n    }\n    IReporterRegistry::Listeners const& ReporterRegistry::getListeners() const {\n        return m_listeners;\n    }\n\n}\n// end catch_reporter_registry.cpp\n// start catch_result_type.cpp\n\nnamespace Catch {\n\n    bool isOk( ResultWas::OfType resultType ) {\n        return ( resultType & ResultWas::FailureBit ) == 0;\n    }\n    bool isJustInfo( int flags ) {\n        return flags == ResultWas::Info;\n    }\n\n    ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ) {\n        return static_cast<ResultDisposition::Flags>( static_cast<int>( lhs ) | static_cast<int>( rhs ) );\n    }\n\n    bool shouldContinueOnFailure( int flags )    { return ( flags & ResultDisposition::ContinueOnFailure ) != 0; }\n    bool shouldSuppressFailure( int flags )      { return ( flags & ResultDisposition::SuppressFail ) != 0; }\n\n} // end namespace Catch\n// end catch_result_type.cpp\n// start catch_run_context.cpp\n\n#include <cassert>\n#include <algorithm>\n#include <sstream>\n\nnamespace Catch {\n\n    namespace Generators {\n        struct GeneratorTracker : TestCaseTracking::TrackerBase, IGeneratorTracker {\n            GeneratorBasePtr m_generator;\n\n            GeneratorTracker( TestCaseTracking::NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )\n                    :   TrackerBase( nameAndLocation, ctx, parent )\n            {}\n            ~GeneratorTracker();\n\n            static GeneratorTracker& acquire( TrackerContext& ctx, TestCaseTracking::NameAndLocation const& nameAndLocation ) {\n                std::shared_ptr<GeneratorTracker> tracker;\n\n                ITracker& currentTracker = ctx.currentTracker();\n                // Under specific circumstances, the generator we want\n                // to acquire is also the current tracker. If this is\n                // the case, we have to avoid looking through current\n                // tracker's children, and instead return the current\n                // tracker.\n                // A case where this check is important is e.g.\n                //     for (int i = 0; i < 5; ++i) {\n                //         int n = GENERATE(1, 2);\n                //     }\n                //\n                // without it, the code above creates 5 nested generators.\n                if (currentTracker.nameAndLocation() == nameAndLocation) {\n                    auto thisTracker = currentTracker.parent().findChild(nameAndLocation);\n                    assert(thisTracker);\n                    assert(thisTracker->isGeneratorTracker());\n                    tracker = std::static_pointer_cast<GeneratorTracker>(thisTracker);\n                } else if ( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) {\n                    assert( childTracker );\n                    assert( childTracker->isGeneratorTracker() );\n                    tracker = std::static_pointer_cast<GeneratorTracker>( childTracker );\n                } else {\n                    tracker = std::make_shared<GeneratorTracker>( nameAndLocation, ctx, &currentTracker );\n                    currentTracker.addChild( tracker );\n                }\n\n                if( !tracker->isComplete() ) {\n                    tracker->open();\n                }\n\n                return *tracker;\n            }\n\n            // TrackerBase interface\n            bool isGeneratorTracker() const override { return true; }\n            auto hasGenerator() const -> bool override {\n                return !!m_generator;\n            }\n            void close() override {\n                TrackerBase::close();\n                // If a generator has a child (it is followed by a section)\n                // and none of its children have started, then we must wait\n                // until later to start consuming its values.\n                // This catches cases where `GENERATE` is placed between two\n                // `SECTION`s.\n                // **The check for m_children.empty cannot be removed**.\n                // doing so would break `GENERATE` _not_ followed by `SECTION`s.\n                const bool should_wait_for_child = [&]() {\n                    // No children -> nobody to wait for\n                    if ( m_children.empty() ) {\n                        return false;\n                    }\n                    // If at least one child started executing, don't wait\n                    if ( std::find_if(\n                            m_children.begin(),\n                            m_children.end(),\n                            []( TestCaseTracking::ITrackerPtr tracker ) {\n                                return tracker->hasStarted();\n                            } ) != m_children.end() ) {\n                        return false;\n                    }\n\n                    // No children have started. We need to check if they _can_\n                    // start, and thus we should wait for them, or they cannot\n                    // start (due to filters), and we shouldn't wait for them\n                    auto* parent = m_parent;\n                    // This is safe: there is always at least one section\n                    // tracker in a test case tracking tree\n                    while ( !parent->isSectionTracker() ) {\n                        parent = &( parent->parent() );\n                    }\n                    assert( parent &&\n                                    \"Missing root (test case) level section\" );\n\n                    auto const& parentSection =\n                            static_cast<SectionTracker&>( *parent );\n                    auto const& filters = parentSection.getFilters();\n                    // No filters -> no restrictions on running sections\n                    if ( filters.empty() ) {\n                        return true;\n                    }\n\n                    for ( auto const& child : m_children ) {\n                        if ( child->isSectionTracker() &&\n                             std::find( filters.begin(),\n                                        filters.end(),\n                                        static_cast<SectionTracker&>( *child )\n                                                .trimmedName() ) !=\n                             filters.end() ) {\n                            return true;\n                        }\n                    }\n                    return false;\n                }();\n\n                // This check is a bit tricky, because m_generator->next()\n                // has a side-effect, where it consumes generator's current\n                // value, but we do not want to invoke the side-effect if\n                // this generator is still waiting for any child to start.\n                if ( should_wait_for_child ||\n                     ( m_runState == CompletedSuccessfully &&\n                       m_generator->next() ) ) {\n                    m_children.clear();\n                    m_runState = Executing;\n                }\n            }\n\n            // IGeneratorTracker interface\n            auto getGenerator() const -> GeneratorBasePtr const& override {\n                return m_generator;\n            }\n            void setGenerator( GeneratorBasePtr&& generator ) override {\n                m_generator = std::move( generator );\n            }\n        };\n        GeneratorTracker::~GeneratorTracker() {}\n    }\n\n    RunContext::RunContext(IConfigPtr const& _config, IStreamingReporterPtr&& reporter)\n            :   m_runInfo(_config->name()),\n                m_context(getCurrentMutableContext()),\n                m_config(_config),\n                m_reporter(std::move(reporter)),\n                m_lastAssertionInfo{ StringRef(), SourceLineInfo(\"\",0), StringRef(), ResultDisposition::Normal },\n                m_includeSuccessfulResults( m_config->includeSuccessfulResults() || m_reporter->getPreferences().shouldReportAllAssertions )\n    {\n        m_context.setRunner(this);\n        m_context.setConfig(m_config);\n        m_context.setResultCapture(this);\n        m_reporter->testRunStarting(m_runInfo);\n    }\n\n    RunContext::~RunContext() {\n        m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, aborting()));\n    }\n\n    void RunContext::testGroupStarting(std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount) {\n        m_reporter->testGroupStarting(GroupInfo(testSpec, groupIndex, groupsCount));\n    }\n\n    void RunContext::testGroupEnded(std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount) {\n        m_reporter->testGroupEnded(TestGroupStats(GroupInfo(testSpec, groupIndex, groupsCount), totals, aborting()));\n    }\n\n    Totals RunContext::runTest(TestCase const& testCase) {\n        Totals prevTotals = m_totals;\n\n        std::string redirectedCout;\n        std::string redirectedCerr;\n\n        auto const& testInfo = testCase.getTestCaseInfo();\n\n        m_reporter->testCaseStarting(testInfo);\n\n        m_activeTestCase = &testCase;\n\n        ITracker& rootTracker = m_trackerContext.startRun();\n        assert(rootTracker.isSectionTracker());\n        static_cast<SectionTracker&>(rootTracker).addInitialFilters(m_config->getSectionsToRun());\n        do {\n            m_trackerContext.startCycle();\n            m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo));\n            runCurrentTest(redirectedCout, redirectedCerr);\n        } while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());\n\n        Totals deltaTotals = m_totals.delta(prevTotals);\n        if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {\n            deltaTotals.assertions.failed++;\n            deltaTotals.testCases.passed--;\n            deltaTotals.testCases.failed++;\n        }\n        m_totals.testCases += deltaTotals.testCases;\n        m_reporter->testCaseEnded(TestCaseStats(testInfo,\n                                                deltaTotals,\n                                                redirectedCout,\n                                                redirectedCerr,\n                                                aborting()));\n\n        m_activeTestCase = nullptr;\n        m_testCaseTracker = nullptr;\n\n        return deltaTotals;\n    }\n\n    IConfigPtr RunContext::config() const {\n        return m_config;\n    }\n\n    IStreamingReporter& RunContext::reporter() const {\n        return *m_reporter;\n    }\n\n    void RunContext::assertionEnded(AssertionResult const & result) {\n        if (result.getResultType() == ResultWas::Ok) {\n            m_totals.assertions.passed++;\n            m_lastAssertionPassed = true;\n        } else if (!result.isOk()) {\n            m_lastAssertionPassed = false;\n            if( m_activeTestCase->getTestCaseInfo().okToFail() )\n                m_totals.assertions.failedButOk++;\n            else\n                m_totals.assertions.failed++;\n        }\n        else {\n            m_lastAssertionPassed = true;\n        }\n\n        // We have no use for the return value (whether messages should be cleared), because messages were made scoped\n        // and should be let to clear themselves out.\n        static_cast<void>(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)));\n\n        if (result.getResultType() != ResultWas::Warning)\n            m_messageScopes.clear();\n\n        // Reset working state\n        resetAssertionInfo();\n        m_lastResult = result;\n    }\n    void RunContext::resetAssertionInfo() {\n        m_lastAssertionInfo.macroName = StringRef();\n        m_lastAssertionInfo.capturedExpression = \"{Unknown expression after the reported line}\"_sr;\n    }\n\n    bool RunContext::sectionStarted(SectionInfo const & sectionInfo, Counts & assertions) {\n        ITracker& sectionTracker = SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(sectionInfo.name, sectionInfo.lineInfo));\n        if (!sectionTracker.isOpen())\n            return false;\n        m_activeSections.push_back(&sectionTracker);\n\n        m_lastAssertionInfo.lineInfo = sectionInfo.lineInfo;\n\n        m_reporter->sectionStarting(sectionInfo);\n\n        assertions = m_totals.assertions;\n\n        return true;\n    }\n    auto RunContext::acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& {\n        using namespace Generators;\n        GeneratorTracker& tracker = GeneratorTracker::acquire(m_trackerContext,\n                                                              TestCaseTracking::NameAndLocation( static_cast<std::string>(generatorName), lineInfo ) );\n        m_lastAssertionInfo.lineInfo = lineInfo;\n        return tracker;\n    }\n\n    bool RunContext::testForMissingAssertions(Counts& assertions) {\n        if (assertions.total() != 0)\n            return false;\n        if (!m_config->warnAboutMissingAssertions())\n            return false;\n        if (m_trackerContext.currentTracker().hasChildren())\n            return false;\n        m_totals.assertions.failed++;\n        assertions.failed++;\n        return true;\n    }\n\n    void RunContext::sectionEnded(SectionEndInfo const & endInfo) {\n        Counts assertions = m_totals.assertions - endInfo.prevAssertions;\n        bool missingAssertions = testForMissingAssertions(assertions);\n\n        if (!m_activeSections.empty()) {\n            m_activeSections.back()->close();\n            m_activeSections.pop_back();\n        }\n\n        m_reporter->sectionEnded(SectionStats(endInfo.sectionInfo, assertions, endInfo.durationInSeconds, missingAssertions));\n        m_messages.clear();\n        m_messageScopes.clear();\n    }\n\n    void RunContext::sectionEndedEarly(SectionEndInfo const & endInfo) {\n        if (m_unfinishedSections.empty())\n            m_activeSections.back()->fail();\n        else\n            m_activeSections.back()->close();\n        m_activeSections.pop_back();\n\n        m_unfinishedSections.push_back(endInfo);\n    }\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    void RunContext::benchmarkPreparing(std::string const& name) {\n        m_reporter->benchmarkPreparing(name);\n    }\n    void RunContext::benchmarkStarting( BenchmarkInfo const& info ) {\n        m_reporter->benchmarkStarting( info );\n    }\n    void RunContext::benchmarkEnded( BenchmarkStats<> const& stats ) {\n        m_reporter->benchmarkEnded( stats );\n    }\n    void RunContext::benchmarkFailed(std::string const & error) {\n        m_reporter->benchmarkFailed(error);\n    }\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    void RunContext::pushScopedMessage(MessageInfo const & message) {\n        m_messages.push_back(message);\n    }\n\n    void RunContext::popScopedMessage(MessageInfo const & message) {\n        m_messages.erase(std::remove(m_messages.begin(), m_messages.end(), message), m_messages.end());\n    }\n\n    void RunContext::emplaceUnscopedMessage( MessageBuilder const& builder ) {\n        m_messageScopes.emplace_back( builder );\n    }\n\n    std::string RunContext::getCurrentTestName() const {\n        return m_activeTestCase\n               ? m_activeTestCase->getTestCaseInfo().name\n               : std::string();\n    }\n\n    const AssertionResult * RunContext::getLastResult() const {\n        return &(*m_lastResult);\n    }\n\n    void RunContext::exceptionEarlyReported() {\n        m_shouldReportUnexpected = false;\n    }\n\n    void RunContext::handleFatalErrorCondition( StringRef message ) {\n        // First notify reporter that bad things happened\n        m_reporter->fatalErrorEncountered(message);\n\n        // Don't rebuild the result -- the stringification itself can cause more fatal errors\n        // Instead, fake a result data.\n        AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } );\n        tempResult.message = static_cast<std::string>(message);\n        AssertionResult result(m_lastAssertionInfo, tempResult);\n\n        assertionEnded(result);\n\n        handleUnfinishedSections();\n\n        // Recreate section for test case (as we will lose the one that was in scope)\n        auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();\n        SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);\n\n        Counts assertions;\n        assertions.failed = 1;\n        SectionStats testCaseSectionStats(testCaseSection, assertions, 0, false);\n        m_reporter->sectionEnded(testCaseSectionStats);\n\n        auto const& testInfo = m_activeTestCase->getTestCaseInfo();\n\n        Totals deltaTotals;\n        deltaTotals.testCases.failed = 1;\n        deltaTotals.assertions.failed = 1;\n        m_reporter->testCaseEnded(TestCaseStats(testInfo,\n                                                deltaTotals,\n                                                std::string(),\n                                                std::string(),\n                                                false));\n        m_totals.testCases.failed++;\n        testGroupEnded(std::string(), m_totals, 1, 1);\n        m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, false));\n    }\n\n    bool RunContext::lastAssertionPassed() {\n        return m_lastAssertionPassed;\n    }\n\n    void RunContext::assertionPassed() {\n        m_lastAssertionPassed = true;\n        ++m_totals.assertions.passed;\n        resetAssertionInfo();\n        m_messageScopes.clear();\n    }\n\n    bool RunContext::aborting() const {\n        return m_totals.assertions.failed >= static_cast<std::size_t>(m_config->abortAfter());\n    }\n\n    void RunContext::runCurrentTest(std::string & redirectedCout, std::string & redirectedCerr) {\n        auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();\n        SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);\n        m_reporter->sectionStarting(testCaseSection);\n        Counts prevAssertions = m_totals.assertions;\n        double duration = 0;\n        m_shouldReportUnexpected = true;\n        m_lastAssertionInfo = { \"TEST_CASE\"_sr, testCaseInfo.lineInfo, StringRef(), ResultDisposition::Normal };\n\n        seedRng(*m_config);\n\n        Timer timer;\n        CATCH_TRY {\n            if (m_reporter->getPreferences().shouldRedirectStdOut) {\n#if !defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)\n                RedirectedStreams redirectedStreams(redirectedCout, redirectedCerr);\n\n                timer.start();\n                invokeActiveTestCase();\n#else\n                OutputRedirect r(redirectedCout, redirectedCerr);\n                timer.start();\n                invokeActiveTestCase();\n#endif\n            } else {\n                timer.start();\n                invokeActiveTestCase();\n            }\n            duration = timer.getElapsedSeconds();\n        } CATCH_CATCH_ANON (TestFailureException&) {\n            // This just means the test was aborted due to failure\n        } CATCH_CATCH_ALL {\n            // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions\n            // are reported without translation at the point of origin.\n            if( m_shouldReportUnexpected ) {\n                AssertionReaction dummyReaction;\n                handleUnexpectedInflightException( m_lastAssertionInfo, translateActiveException(), dummyReaction );\n            }\n        }\n        Counts assertions = m_totals.assertions - prevAssertions;\n        bool missingAssertions = testForMissingAssertions(assertions);\n\n        m_testCaseTracker->close();\n        handleUnfinishedSections();\n        m_messages.clear();\n        m_messageScopes.clear();\n\n        SectionStats testCaseSectionStats(testCaseSection, assertions, duration, missingAssertions);\n        m_reporter->sectionEnded(testCaseSectionStats);\n    }\n\n    void RunContext::invokeActiveTestCase() {\n        FatalConditionHandlerGuard _(&m_fatalConditionhandler);\n        m_activeTestCase->invoke();\n    }\n\n    void RunContext::handleUnfinishedSections() {\n        // If sections ended prematurely due to an exception we stored their\n        // infos here so we can tear them down outside the unwind process.\n        for (auto it = m_unfinishedSections.rbegin(),\n                     itEnd = m_unfinishedSections.rend();\n             it != itEnd;\n             ++it)\n            sectionEnded(*it);\n        m_unfinishedSections.clear();\n    }\n\n    void RunContext::handleExpr(\n            AssertionInfo const& info,\n            ITransientExpression const& expr,\n            AssertionReaction& reaction\n    ) {\n        m_reporter->assertionStarting( info );\n\n        bool negated = isFalseTest( info.resultDisposition );\n        bool result = expr.getResult() != negated;\n\n        if( result ) {\n            if (!m_includeSuccessfulResults) {\n                assertionPassed();\n            }\n            else {\n                reportExpr(info, ResultWas::Ok, &expr, negated);\n            }\n        }\n        else {\n            reportExpr(info, ResultWas::ExpressionFailed, &expr, negated );\n            populateReaction( reaction );\n        }\n    }\n    void RunContext::reportExpr(\n            AssertionInfo const &info,\n            ResultWas::OfType resultType,\n            ITransientExpression const *expr,\n            bool negated ) {\n\n        m_lastAssertionInfo = info;\n        AssertionResultData data( resultType, LazyExpression( negated ) );\n\n        AssertionResult assertionResult{ info, data };\n        assertionResult.m_resultData.lazyExpression.m_transientExpression = expr;\n\n        assertionEnded( assertionResult );\n    }\n\n    void RunContext::handleMessage(\n            AssertionInfo const& info,\n            ResultWas::OfType resultType,\n            StringRef const& message,\n            AssertionReaction& reaction\n    ) {\n        m_reporter->assertionStarting( info );\n\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( resultType, LazyExpression( false ) );\n        data.message = static_cast<std::string>(message);\n        AssertionResult assertionResult{ m_lastAssertionInfo, data };\n        assertionEnded( assertionResult );\n        if( !assertionResult.isOk() )\n            populateReaction( reaction );\n    }\n    void RunContext::handleUnexpectedExceptionNotThrown(\n            AssertionInfo const& info,\n            AssertionReaction& reaction\n    ) {\n        handleNonExpr(info, Catch::ResultWas::DidntThrowException, reaction);\n    }\n\n    void RunContext::handleUnexpectedInflightException(\n            AssertionInfo const& info,\n            std::string const& message,\n            AssertionReaction& reaction\n    ) {\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) );\n        data.message = message;\n        AssertionResult assertionResult{ info, data };\n        assertionEnded( assertionResult );\n        populateReaction( reaction );\n    }\n\n    void RunContext::populateReaction( AssertionReaction& reaction ) {\n        reaction.shouldDebugBreak = m_config->shouldDebugBreak();\n        reaction.shouldThrow = aborting() || (m_lastAssertionInfo.resultDisposition & ResultDisposition::Normal);\n    }\n\n    void RunContext::handleIncomplete(\n            AssertionInfo const& info\n    ) {\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) );\n        data.message = \"Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE\";\n        AssertionResult assertionResult{ info, data };\n        assertionEnded( assertionResult );\n    }\n    void RunContext::handleNonExpr(\n            AssertionInfo const &info,\n            ResultWas::OfType resultType,\n            AssertionReaction &reaction\n    ) {\n        m_lastAssertionInfo = info;\n\n        AssertionResultData data( resultType, LazyExpression( false ) );\n        AssertionResult assertionResult{ info, data };\n        assertionEnded( assertionResult );\n\n        if( !assertionResult.isOk() )\n            populateReaction( reaction );\n    }\n\n    IResultCapture& getResultCapture() {\n        if (auto* capture = getCurrentContext().getResultCapture())\n            return *capture;\n        else\n            CATCH_INTERNAL_ERROR(\"No result capture instance\");\n    }\n\n    void seedRng(IConfig const& config) {\n        if (config.rngSeed() != 0) {\n            std::srand(config.rngSeed());\n            rng().seed(config.rngSeed());\n        }\n    }\n\n    unsigned int rngSeed() {\n        return getCurrentContext().getConfig()->rngSeed();\n    }\n\n}\n// end catch_run_context.cpp\n// start catch_section.cpp\n\nnamespace Catch {\n\n    Section::Section( SectionInfo const& info )\n            :   m_info( info ),\n                m_sectionIncluded( getResultCapture().sectionStarted( m_info, m_assertions ) )\n    {\n        m_timer.start();\n    }\n\n    Section::~Section() {\n        if( m_sectionIncluded ) {\n            SectionEndInfo endInfo{ m_info, m_assertions, m_timer.getElapsedSeconds() };\n            if( uncaught_exceptions() )\n                getResultCapture().sectionEndedEarly( endInfo );\n            else\n                getResultCapture().sectionEnded( endInfo );\n        }\n    }\n\n    // This indicates whether the section should be executed or not\n    Section::operator bool() const {\n        return m_sectionIncluded;\n    }\n\n} // end namespace Catch\n// end catch_section.cpp\n// start catch_section_info.cpp\n\nnamespace Catch {\n\n    SectionInfo::SectionInfo\n            (   SourceLineInfo const& _lineInfo,\n                std::string const& _name )\n            :   name( _name ),\n                lineInfo( _lineInfo )\n    {}\n\n} // end namespace Catch\n// end catch_section_info.cpp\n// start catch_session.cpp\n\n// start catch_session.h\n\n#include <memory>\n\nnamespace Catch {\n\n    class Session : NonCopyable {\n    public:\n\n        Session();\n        ~Session() override;\n\n        void showHelp() const;\n        void libIdentify();\n\n        int applyCommandLine( int argc, char const * const * argv );\n#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)\n        int applyCommandLine( int argc, wchar_t const * const * argv );\n#endif\n\n        void useConfigData( ConfigData const& configData );\n\n        template<typename CharT>\n        int run(int argc, CharT const * const argv[]) {\n            if (m_startupExceptions)\n                return 1;\n            int returnCode = applyCommandLine(argc, argv);\n            if (returnCode == 0)\n                returnCode = run();\n            return returnCode;\n        }\n\n        int run();\n\n        clara::Parser const& cli() const;\n        void cli( clara::Parser const& newParser );\n        ConfigData& configData();\n        Config& config();\n    private:\n        int runInternal();\n\n        clara::Parser m_cli;\n        ConfigData m_configData;\n        std::shared_ptr<Config> m_config;\n        bool m_startupExceptions = false;\n    };\n\n} // end namespace Catch\n\n// end catch_session.h\n// start catch_version.h\n\n#include <iosfwd>\n\nnamespace Catch {\n\n    // Versioning information\n    struct Version {\n        Version( Version const& ) = delete;\n        Version& operator=( Version const& ) = delete;\n        Version(    unsigned int _majorVersion,\n                    unsigned int _minorVersion,\n                    unsigned int _patchNumber,\n                    char const * const _branchName,\n                    unsigned int _buildNumber );\n\n        unsigned int const majorVersion;\n        unsigned int const minorVersion;\n        unsigned int const patchNumber;\n\n        // buildNumber is only used if branchName is not null\n        char const * const branchName;\n        unsigned int const buildNumber;\n\n        friend std::ostream& operator << ( std::ostream& os, Version const& version );\n    };\n\n    Version const& libraryVersion();\n}\n\n// end catch_version.h\n#include <cstdlib>\n#include <iomanip>\n#include <set>\n#include <iterator>\n\nnamespace Catch {\n\n    namespace {\n        const int MaxExitCode = 255;\n\n        IStreamingReporterPtr createReporter(std::string const& reporterName, IConfigPtr const& config) {\n            auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, config);\n            CATCH_ENFORCE(reporter, \"No reporter registered with name: '\" << reporterName << \"'\");\n\n            return reporter;\n        }\n\n        IStreamingReporterPtr makeReporter(std::shared_ptr<Config> const& config) {\n            if (Catch::getRegistryHub().getReporterRegistry().getListeners().empty()) {\n                return createReporter(config->getReporterName(), config);\n            }\n\n            // On older platforms, returning std::unique_ptr<ListeningReporter>\n            // when the return type is std::unique_ptr<IStreamingReporter>\n            // doesn't compile without a std::move call. However, this causes\n            // a warning on newer platforms. Thus, we have to work around\n            // it a bit and downcast the pointer manually.\n            auto ret = std::unique_ptr<IStreamingReporter>(new ListeningReporter);\n            auto& multi = static_cast<ListeningReporter&>(*ret);\n            auto const& listeners = Catch::getRegistryHub().getReporterRegistry().getListeners();\n            for (auto const& listener : listeners) {\n                multi.addListener(listener->create(Catch::ReporterConfig(config)));\n            }\n            multi.addReporter(createReporter(config->getReporterName(), config));\n            return ret;\n        }\n\n        class TestGroup {\n        public:\n            explicit TestGroup(std::shared_ptr<Config> const& config)\n                    : m_config{config}\n                    , m_context{config, makeReporter(config)}\n            {\n                auto const& allTestCases = getAllTestCasesSorted(*m_config);\n                m_matches = m_config->testSpec().matchesByFilter(allTestCases, *m_config);\n                auto const& invalidArgs = m_config->testSpec().getInvalidArgs();\n\n                if (m_matches.empty() && invalidArgs.empty()) {\n                    for (auto const& test : allTestCases)\n                        if (!test.isHidden())\n                            m_tests.emplace(&test);\n                } else {\n                    for (auto const& match : m_matches)\n                        m_tests.insert(match.tests.begin(), match.tests.end());\n                }\n            }\n\n            Totals execute() {\n                auto const& invalidArgs = m_config->testSpec().getInvalidArgs();\n                Totals totals;\n                m_context.testGroupStarting(m_config->name(), 1, 1);\n                for (auto const& testCase : m_tests) {\n                    if (!m_context.aborting())\n                        totals += m_context.runTest(*testCase);\n                    else\n                        m_context.reporter().skipTest(*testCase);\n                }\n\n                for (auto const& match : m_matches) {\n                    if (match.tests.empty()) {\n                        m_context.reporter().noMatchingTestCases(match.name);\n                        totals.error = -1;\n                    }\n                }\n\n                if (!invalidArgs.empty()) {\n                    for (auto const& invalidArg: invalidArgs)\n                        m_context.reporter().reportInvalidArguments(invalidArg);\n                }\n\n                m_context.testGroupEnded(m_config->name(), totals, 1, 1);\n                return totals;\n            }\n\n        private:\n            using Tests = std::set<TestCase const*>;\n\n            std::shared_ptr<Config> m_config;\n            RunContext m_context;\n            Tests m_tests;\n            TestSpec::Matches m_matches;\n        };\n\n        void applyFilenamesAsTags(Catch::IConfig const& config) {\n            auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config));\n            for (auto& testCase : tests) {\n                auto tags = testCase.tags;\n\n                std::string filename = testCase.lineInfo.file;\n                auto lastSlash = filename.find_last_of(\"\\\\/\");\n                if (lastSlash != std::string::npos) {\n                    filename.erase(0, lastSlash);\n                    filename[0] = '#';\n                }\n                else\n                {\n                    filename.insert(0, \"#\");\n                }\n\n                auto lastDot = filename.find_last_of('.');\n                if (lastDot != std::string::npos) {\n                    filename.erase(lastDot);\n                }\n\n                tags.push_back(std::move(filename));\n                setTags(testCase, tags);\n            }\n        }\n\n    } // anon namespace\n\n    Session::Session() {\n        static bool alreadyInstantiated = false;\n        if( alreadyInstantiated ) {\n            CATCH_TRY { CATCH_INTERNAL_ERROR( \"Only one instance of Catch::Session can ever be used\" ); }\n            CATCH_CATCH_ALL { getMutableRegistryHub().registerStartupException(); }\n        }\n\n        // There cannot be exceptions at startup in no-exception mode.\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n        const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions();\n        if ( !exceptions.empty() ) {\n            config();\n            getCurrentMutableContext().setConfig(m_config);\n\n            m_startupExceptions = true;\n            Colour colourGuard( Colour::Red );\n            Catch::cerr() << \"Errors occurred during startup!\" << '\\n';\n            // iterate over all exceptions and notify user\n            for ( const auto& ex_ptr : exceptions ) {\n                try {\n                    std::rethrow_exception(ex_ptr);\n                } catch ( std::exception const& ex ) {\n                    Catch::cerr() << Column( ex.what() ).indent(2) << '\\n';\n                }\n            }\n        }\n#endif\n\n        alreadyInstantiated = true;\n        m_cli = makeCommandLineParser( m_configData );\n    }\n    Session::~Session() {\n        Catch::cleanUp();\n    }\n\n    void Session::showHelp() const {\n        Catch::cout()\n                << \"\\nCatch v\" << libraryVersion() << \"\\n\"\n                << m_cli << std::endl\n                << \"For more detailed usage please see the project docs\\n\" << std::endl;\n    }\n    void Session::libIdentify() {\n        Catch::cout()\n                << std::left << std::setw(16) << \"description: \" << \"A Catch2 test executable\\n\"\n                << std::left << std::setw(16) << \"category: \" << \"testframework\\n\"\n                << std::left << std::setw(16) << \"framework: \" << \"Catch Test\\n\"\n                << std::left << std::setw(16) << \"version: \" << libraryVersion() << std::endl;\n    }\n\n    int Session::applyCommandLine( int argc, char const * const * argv ) {\n        if( m_startupExceptions )\n            return 1;\n\n        auto result = m_cli.parse( clara::Args( argc, argv ) );\n        if( !result ) {\n            config();\n            getCurrentMutableContext().setConfig(m_config);\n            Catch::cerr()\n                    << Colour( Colour::Red )\n                    << \"\\nError(s) in input:\\n\"\n                    << Column( result.errorMessage() ).indent( 2 )\n                    << \"\\n\\n\";\n            Catch::cerr() << \"Run with -? for usage\\n\" << std::endl;\n            return MaxExitCode;\n        }\n\n        if( m_configData.showHelp )\n            showHelp();\n        if( m_configData.libIdentify )\n            libIdentify();\n        m_config.reset();\n        return 0;\n    }\n\n#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)\n    int Session::applyCommandLine( int argc, wchar_t const * const * argv ) {\n\n        char **utf8Argv = new char *[ argc ];\n\n        for ( int i = 0; i < argc; ++i ) {\n            int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, nullptr, 0, nullptr, nullptr );\n\n            utf8Argv[ i ] = new char[ bufSize ];\n\n            WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, nullptr, nullptr );\n        }\n\n        int returnCode = applyCommandLine( argc, utf8Argv );\n\n        for ( int i = 0; i < argc; ++i )\n            delete [] utf8Argv[ i ];\n\n        delete [] utf8Argv;\n\n        return returnCode;\n    }\n#endif\n\n    void Session::useConfigData( ConfigData const& configData ) {\n        m_configData = configData;\n        m_config.reset();\n    }\n\n    int Session::run() {\n        if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) {\n            Catch::cout() << \"...waiting for enter/ return before starting\" << std::endl;\n            static_cast<void>(std::getchar());\n        }\n        int exitCode = runInternal();\n        if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) {\n            Catch::cout() << \"...waiting for enter/ return before exiting, with code: \" << exitCode << std::endl;\n            static_cast<void>(std::getchar());\n        }\n        return exitCode;\n    }\n\n    clara::Parser const& Session::cli() const {\n        return m_cli;\n    }\n    void Session::cli( clara::Parser const& newParser ) {\n        m_cli = newParser;\n    }\n    ConfigData& Session::configData() {\n        return m_configData;\n    }\n    Config& Session::config() {\n        if( !m_config )\n            m_config = std::make_shared<Config>( m_configData );\n        return *m_config;\n    }\n\n    int Session::runInternal() {\n        if( m_startupExceptions )\n            return 1;\n\n        if (m_configData.showHelp || m_configData.libIdentify) {\n            return 0;\n        }\n\n        CATCH_TRY {\n            config(); // Force config to be constructed\n\n            seedRng( *m_config );\n\n            if( m_configData.filenamesAsTags )\n                applyFilenamesAsTags( *m_config );\n\n            // Handle list request\n            if( Option<std::size_t> listed = list( m_config ) )\n                return static_cast<int>( *listed );\n\n            TestGroup tests { m_config };\n            auto const totals = tests.execute();\n\n            if( m_config->warnAboutNoTests() && totals.error == -1 )\n                return 2;\n\n            // Note that on unices only the lower 8 bits are usually used, clamping\n            // the return value to 255 prevents false negative when some multiple\n            // of 256 tests has failed\n            return (std::min) (MaxExitCode, (std::max) (totals.error, static_cast<int>(totals.assertions.failed)));\n        }\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n        catch( std::exception& ex ) {\n            Catch::cerr() << ex.what() << std::endl;\n            return MaxExitCode;\n        }\n#endif\n    }\n\n} // end namespace Catch\n// end catch_session.cpp\n// start catch_singletons.cpp\n\n#include <vector>\n\nnamespace Catch {\n\n    namespace {\n        static auto getSingletons() -> std::vector<ISingleton*>*& {\n            static std::vector<ISingleton*>* g_singletons = nullptr;\n            if( !g_singletons )\n                g_singletons = new std::vector<ISingleton*>();\n            return g_singletons;\n        }\n    }\n\n    ISingleton::~ISingleton() {}\n\n    void addSingleton(ISingleton* singleton ) {\n        getSingletons()->push_back( singleton );\n    }\n    void cleanupSingletons() {\n        auto& singletons = getSingletons();\n        for( auto singleton : *singletons )\n            delete singleton;\n        delete singletons;\n        singletons = nullptr;\n    }\n\n} // namespace Catch\n// end catch_singletons.cpp\n// start catch_startup_exception_registry.cpp\n\n#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\nnamespace Catch {\n    void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept {\n        CATCH_TRY {\n            m_exceptions.push_back(exception);\n        } CATCH_CATCH_ALL {\n            // If we run out of memory during start-up there's really not a lot more we can do about it\n            std::terminate();\n        }\n    }\n\n    std::vector<std::exception_ptr> const& StartupExceptionRegistry::getExceptions() const noexcept {\n        return m_exceptions;\n    }\n\n} // end namespace Catch\n#endif\n// end catch_startup_exception_registry.cpp\n// start catch_stream.cpp\n\n#include <cstdio>\n#include <iostream>\n#include <fstream>\n#include <sstream>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    Catch::IStream::~IStream() = default;\n\n    namespace Detail { namespace {\n            template<typename WriterF, std::size_t bufferSize=256>\n            class StreamBufImpl : public std::streambuf {\n                char data[bufferSize];\n                WriterF m_writer;\n\n            public:\n                StreamBufImpl() {\n                    setp( data, data + sizeof(data) );\n                }\n\n                ~StreamBufImpl() noexcept {\n                    StreamBufImpl::sync();\n                }\n\n            private:\n                int overflow( int c ) override {\n                    sync();\n\n                    if( c != EOF ) {\n                        if( pbase() == epptr() )\n                            m_writer( std::string( 1, static_cast<char>( c ) ) );\n                        else\n                            sputc( static_cast<char>( c ) );\n                    }\n                    return 0;\n                }\n\n                int sync() override {\n                    if( pbase() != pptr() ) {\n                        m_writer( std::string( pbase(), static_cast<std::string::size_type>( pptr() - pbase() ) ) );\n                        setp( pbase(), epptr() );\n                    }\n                    return 0;\n                }\n            };\n\n            ///////////////////////////////////////////////////////////////////////////\n\n            struct OutputDebugWriter {\n\n                void operator()( std::string const&str ) {\n                    writeToDebugConsole( str );\n                }\n            };\n\n            ///////////////////////////////////////////////////////////////////////////\n\n            class FileStream : public IStream {\n                mutable std::ofstream m_ofs;\n            public:\n                FileStream( StringRef filename ) {\n                    m_ofs.open( filename.c_str() );\n                    CATCH_ENFORCE( !m_ofs.fail(), \"Unable to open file: '\" << filename << \"'\" );\n                }\n                ~FileStream() override = default;\n            public: // IStream\n                std::ostream& stream() const override {\n                    return m_ofs;\n                }\n            };\n\n            ///////////////////////////////////////////////////////////////////////////\n\n            class CoutStream : public IStream {\n                mutable std::ostream m_os;\n            public:\n                // Store the streambuf from cout up-front because\n                // cout may get redirected when running tests\n                CoutStream() : m_os( Catch::cout().rdbuf() ) {}\n                ~CoutStream() override = default;\n\n            public: // IStream\n                std::ostream& stream() const override { return m_os; }\n            };\n\n            ///////////////////////////////////////////////////////////////////////////\n\n            class DebugOutStream : public IStream {\n                std::unique_ptr<StreamBufImpl<OutputDebugWriter>> m_streamBuf;\n                mutable std::ostream m_os;\n            public:\n                DebugOutStream()\n                        :   m_streamBuf( new StreamBufImpl<OutputDebugWriter>() ),\n                            m_os( m_streamBuf.get() )\n                {}\n\n                ~DebugOutStream() override = default;\n\n            public: // IStream\n                std::ostream& stream() const override { return m_os; }\n            };\n\n        }} // namespace anon::detail\n\n    ///////////////////////////////////////////////////////////////////////////\n\n    auto makeStream( StringRef const &filename ) -> IStream const* {\n        if( filename.empty() )\n            return new Detail::CoutStream();\n        else if( filename[0] == '%' ) {\n            if( filename == \"%debug\" )\n                return new Detail::DebugOutStream();\n            else\n                CATCH_ERROR( \"Unrecognised stream: '\" << filename << \"'\" );\n        }\n        else\n            return new Detail::FileStream( filename );\n    }\n\n    // This class encapsulates the idea of a pool of ostringstreams that can be reused.\n    struct StringStreams {\n        std::vector<std::unique_ptr<std::ostringstream>> m_streams;\n        std::vector<std::size_t> m_unused;\n        std::ostringstream m_referenceStream; // Used for copy state/ flags from\n\n        auto add() -> std::size_t {\n            if( m_unused.empty() ) {\n                m_streams.push_back( std::unique_ptr<std::ostringstream>( new std::ostringstream ) );\n                return m_streams.size()-1;\n            }\n            else {\n                auto index = m_unused.back();\n                m_unused.pop_back();\n                return index;\n            }\n        }\n\n        void release( std::size_t index ) {\n            m_streams[index]->copyfmt( m_referenceStream ); // Restore initial flags and other state\n            m_unused.push_back(index);\n        }\n    };\n\n    ReusableStringStream::ReusableStringStream()\n            :   m_index( Singleton<StringStreams>::getMutable().add() ),\n                m_oss( Singleton<StringStreams>::getMutable().m_streams[m_index].get() )\n    {}\n\n    ReusableStringStream::~ReusableStringStream() {\n        static_cast<std::ostringstream*>( m_oss )->str(\"\");\n        m_oss->clear();\n        Singleton<StringStreams>::getMutable().release( m_index );\n    }\n\n    auto ReusableStringStream::str() const -> std::string {\n        return static_cast<std::ostringstream*>( m_oss )->str();\n    }\n\n    ///////////////////////////////////////////////////////////////////////////\n\n#ifndef CATCH_CONFIG_NOSTDOUT // If you #define this you must implement these functions\n    std::ostream& cout() { return std::cout; }\n    std::ostream& cerr() { return std::cerr; }\n    std::ostream& clog() { return std::clog; }\n#endif\n}\n// end catch_stream.cpp\n// start catch_string_manip.cpp\n\n#include <algorithm>\n#include <ostream>\n#include <cstring>\n#include <cctype>\n#include <vector>\n\nnamespace Catch {\n\n    namespace {\n        char toLowerCh(char c) {\n            return static_cast<char>( std::tolower( static_cast<unsigned char>(c) ) );\n        }\n    }\n\n    bool startsWith( std::string const& s, std::string const& prefix ) {\n        return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());\n    }\n    bool startsWith( std::string const& s, char prefix ) {\n        return !s.empty() && s[0] == prefix;\n    }\n    bool endsWith( std::string const& s, std::string const& suffix ) {\n        return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());\n    }\n    bool endsWith( std::string const& s, char suffix ) {\n        return !s.empty() && s[s.size()-1] == suffix;\n    }\n    bool contains( std::string const& s, std::string const& infix ) {\n        return s.find( infix ) != std::string::npos;\n    }\n    void toLowerInPlace( std::string& s ) {\n        std::transform( s.begin(), s.end(), s.begin(), toLowerCh );\n    }\n    std::string toLower( std::string const& s ) {\n        std::string lc = s;\n        toLowerInPlace( lc );\n        return lc;\n    }\n    std::string trim( std::string const& str ) {\n        static char const* whitespaceChars = \"\\n\\r\\t \";\n        std::string::size_type start = str.find_first_not_of( whitespaceChars );\n        std::string::size_type end = str.find_last_not_of( whitespaceChars );\n\n        return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string();\n    }\n\n    StringRef trim(StringRef ref) {\n        const auto is_ws = [](char c) {\n            return c == ' ' || c == '\\t' || c == '\\n' || c == '\\r';\n        };\n        size_t real_begin = 0;\n        while (real_begin < ref.size() && is_ws(ref[real_begin])) { ++real_begin; }\n        size_t real_end = ref.size();\n        while (real_end > real_begin && is_ws(ref[real_end - 1])) { --real_end; }\n\n        return ref.substr(real_begin, real_end - real_begin);\n    }\n\n    bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) {\n        bool replaced = false;\n        std::size_t i = str.find( replaceThis );\n        while( i != std::string::npos ) {\n            replaced = true;\n            str = str.substr( 0, i ) + withThis + str.substr( i+replaceThis.size() );\n            if( i < str.size()-withThis.size() )\n                i = str.find( replaceThis, i+withThis.size() );\n            else\n                i = std::string::npos;\n        }\n        return replaced;\n    }\n\n    std::vector<StringRef> splitStringRef( StringRef str, char delimiter ) {\n        std::vector<StringRef> subStrings;\n        std::size_t start = 0;\n        for(std::size_t pos = 0; pos < str.size(); ++pos ) {\n            if( str[pos] == delimiter ) {\n                if( pos - start > 1 )\n                    subStrings.push_back( str.substr( start, pos-start ) );\n                start = pos+1;\n            }\n        }\n        if( start < str.size() )\n            subStrings.push_back( str.substr( start, str.size()-start ) );\n        return subStrings;\n    }\n\n    pluralise::pluralise( std::size_t count, std::string const& label )\n            :   m_count( count ),\n                m_label( label )\n    {}\n\n    std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ) {\n        os << pluraliser.m_count << ' ' << pluraliser.m_label;\n        if( pluraliser.m_count != 1 )\n            os << 's';\n        return os;\n    }\n\n}\n// end catch_string_manip.cpp\n// start catch_stringref.cpp\n\n#include <algorithm>\n#include <ostream>\n#include <cstring>\n#include <cstdint>\n\nnamespace Catch {\n    StringRef::StringRef( char const* rawChars ) noexcept\n            : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )\n    {}\n\n    auto StringRef::c_str() const -> char const* {\n        CATCH_ENFORCE(isNullTerminated(), \"Called StringRef::c_str() on a non-null-terminated instance\");\n        return m_start;\n    }\n    auto StringRef::data() const noexcept -> char const* {\n        return m_start;\n    }\n\n    auto StringRef::substr( size_type start, size_type size ) const noexcept -> StringRef {\n        if (start < m_size) {\n            return StringRef(m_start + start, (std::min)(m_size - start, size));\n        } else {\n            return StringRef();\n        }\n    }\n    auto StringRef::operator == ( StringRef const& other ) const noexcept -> bool {\n        return m_size == other.m_size\n               && (std::memcmp( m_start, other.m_start, m_size ) == 0);\n    }\n\n    auto operator << ( std::ostream& os, StringRef const& str ) -> std::ostream& {\n        return os.write(str.data(), str.size());\n    }\n\n    auto operator+=( std::string& lhs, StringRef const& rhs ) -> std::string& {\n        lhs.append(rhs.data(), rhs.size());\n        return lhs;\n    }\n\n} // namespace Catch\n// end catch_stringref.cpp\n// start catch_tag_alias.cpp\n\nnamespace Catch {\n    TagAlias::TagAlias(std::string const & _tag, SourceLineInfo _lineInfo): tag(_tag), lineInfo(_lineInfo) {}\n}\n// end catch_tag_alias.cpp\n// start catch_tag_alias_autoregistrar.cpp\n\nnamespace Catch {\n\n    RegistrarForTagAliases::RegistrarForTagAliases(char const* alias, char const* tag, SourceLineInfo const& lineInfo) {\n        CATCH_TRY {\n            getMutableRegistryHub().registerTagAlias(alias, tag, lineInfo);\n        } CATCH_CATCH_ALL {\n            // Do not throw when constructing global objects, instead register the exception to be processed later\n            getMutableRegistryHub().registerStartupException();\n        }\n    }\n\n}\n// end catch_tag_alias_autoregistrar.cpp\n// start catch_tag_alias_registry.cpp\n\n#include <sstream>\n\nnamespace Catch {\n\n    TagAliasRegistry::~TagAliasRegistry() {}\n\n    TagAlias const* TagAliasRegistry::find( std::string const& alias ) const {\n        auto it = m_registry.find( alias );\n        if( it != m_registry.end() )\n            return &(it->second);\n        else\n            return nullptr;\n    }\n\n    std::string TagAliasRegistry::expandAliases( std::string const& unexpandedTestSpec ) const {\n        std::string expandedTestSpec = unexpandedTestSpec;\n        for( auto const& registryKvp : m_registry ) {\n            std::size_t pos = expandedTestSpec.find( registryKvp.first );\n            if( pos != std::string::npos ) {\n                expandedTestSpec =  expandedTestSpec.substr( 0, pos ) +\n                                    registryKvp.second.tag +\n                                    expandedTestSpec.substr( pos + registryKvp.first.size() );\n            }\n        }\n        return expandedTestSpec;\n    }\n\n    void TagAliasRegistry::add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) {\n        CATCH_ENFORCE( startsWith(alias, \"[@\") && endsWith(alias, ']'),\n                       \"error: tag alias, '\" << alias << \"' is not of the form [@alias name].\\n\" << lineInfo );\n\n        CATCH_ENFORCE( m_registry.insert(std::make_pair(alias, TagAlias(tag, lineInfo))).second,\n                       \"error: tag alias, '\" << alias << \"' already registered.\\n\"\n                                             << \"\\tFirst seen at: \" << find(alias)->lineInfo << \"\\n\"\n                                             << \"\\tRedefined at: \" << lineInfo );\n    }\n\n    ITagAliasRegistry::~ITagAliasRegistry() {}\n\n    ITagAliasRegistry const& ITagAliasRegistry::get() {\n        return getRegistryHub().getTagAliasRegistry();\n    }\n\n} // end namespace Catch\n// end catch_tag_alias_registry.cpp\n// start catch_test_case_info.cpp\n\n#include <cctype>\n#include <exception>\n#include <algorithm>\n#include <sstream>\n\nnamespace Catch {\n\n    namespace {\n        TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) {\n            if( startsWith( tag, '.' ) ||\n                tag == \"!hide\" )\n                return TestCaseInfo::IsHidden;\n            else if( tag == \"!throws\" )\n                return TestCaseInfo::Throws;\n            else if( tag == \"!shouldfail\" )\n                return TestCaseInfo::ShouldFail;\n            else if( tag == \"!mayfail\" )\n                return TestCaseInfo::MayFail;\n            else if( tag == \"!nonportable\" )\n                return TestCaseInfo::NonPortable;\n            else if( tag == \"!benchmark\" )\n                return static_cast<TestCaseInfo::SpecialProperties>( TestCaseInfo::Benchmark | TestCaseInfo::IsHidden );\n            else\n                return TestCaseInfo::None;\n        }\n        bool isReservedTag( std::string const& tag ) {\n            return parseSpecialTag( tag ) == TestCaseInfo::None && tag.size() > 0 && !std::isalnum( static_cast<unsigned char>(tag[0]) );\n        }\n        void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) {\n            CATCH_ENFORCE( !isReservedTag(tag),\n                           \"Tag name: [\" << tag << \"] is not allowed.\\n\"\n                                         << \"Tag names starting with non alphanumeric characters are reserved\\n\"\n                                         << _lineInfo );\n        }\n    }\n\n    TestCase makeTestCase(  ITestInvoker* _testCase,\n                            std::string const& _className,\n                            NameAndTags const& nameAndTags,\n                            SourceLineInfo const& _lineInfo )\n    {\n        bool isHidden = false;\n\n        // Parse out tags\n        std::vector<std::string> tags;\n        std::string desc, tag;\n        bool inTag = false;\n        for (char c : nameAndTags.tags) {\n            if( !inTag ) {\n                if( c == '[' )\n                    inTag = true;\n                else\n                    desc += c;\n            }\n            else {\n                if( c == ']' ) {\n                    TestCaseInfo::SpecialProperties prop = parseSpecialTag( tag );\n                    if( ( prop & TestCaseInfo::IsHidden ) != 0 )\n                        isHidden = true;\n                    else if( prop == TestCaseInfo::None )\n                        enforceNotReservedTag( tag, _lineInfo );\n\n                    // Merged hide tags like `[.approvals]` should be added as\n                    // `[.][approvals]`. The `[.]` is added at later point, so\n                    // we only strip the prefix\n                    if (startsWith(tag, '.') && tag.size() > 1) {\n                        tag.erase(0, 1);\n                    }\n                    tags.push_back( tag );\n                    tag.clear();\n                    inTag = false;\n                }\n                else\n                    tag += c;\n            }\n        }\n        if( isHidden ) {\n            // Add all \"hidden\" tags to make them behave identically\n            tags.insert( tags.end(), { \".\", \"!hide\" } );\n        }\n\n        TestCaseInfo info( static_cast<std::string>(nameAndTags.name), _className, desc, tags, _lineInfo );\n        return TestCase( _testCase, std::move(info) );\n    }\n\n    void setTags( TestCaseInfo& testCaseInfo, std::vector<std::string> tags ) {\n        std::sort(begin(tags), end(tags));\n        tags.erase(std::unique(begin(tags), end(tags)), end(tags));\n        testCaseInfo.lcaseTags.clear();\n\n        for( auto const& tag : tags ) {\n            std::string lcaseTag = toLower( tag );\n            testCaseInfo.properties = static_cast<TestCaseInfo::SpecialProperties>( testCaseInfo.properties | parseSpecialTag( lcaseTag ) );\n            testCaseInfo.lcaseTags.push_back( lcaseTag );\n        }\n        testCaseInfo.tags = std::move(tags);\n    }\n\n    TestCaseInfo::TestCaseInfo( std::string const& _name,\n                                std::string const& _className,\n                                std::string const& _description,\n                                std::vector<std::string> const& _tags,\n                                SourceLineInfo const& _lineInfo )\n            :   name( _name ),\n                className( _className ),\n                description( _description ),\n                lineInfo( _lineInfo ),\n                properties( None )\n    {\n        setTags( *this, _tags );\n    }\n\n    bool TestCaseInfo::isHidden() const {\n        return ( properties & IsHidden ) != 0;\n    }\n    bool TestCaseInfo::throws() const {\n        return ( properties & Throws ) != 0;\n    }\n    bool TestCaseInfo::okToFail() const {\n        return ( properties & (ShouldFail | MayFail ) ) != 0;\n    }\n    bool TestCaseInfo::expectedToFail() const {\n        return ( properties & (ShouldFail ) ) != 0;\n    }\n\n    std::string TestCaseInfo::tagsAsString() const {\n        std::string ret;\n        // '[' and ']' per tag\n        std::size_t full_size = 2 * tags.size();\n        for (const auto& tag : tags) {\n            full_size += tag.size();\n        }\n        ret.reserve(full_size);\n        for (const auto& tag : tags) {\n            ret.push_back('[');\n            ret.append(tag);\n            ret.push_back(']');\n        }\n\n        return ret;\n    }\n\n    TestCase::TestCase( ITestInvoker* testCase, TestCaseInfo&& info ) : TestCaseInfo( std::move(info) ), test( testCase ) {}\n\n    TestCase TestCase::withName( std::string const& _newName ) const {\n        TestCase other( *this );\n        other.name = _newName;\n        return other;\n    }\n\n    void TestCase::invoke() const {\n        test->invoke();\n    }\n\n    bool TestCase::operator == ( TestCase const& other ) const {\n        return  test.get() == other.test.get() &&\n                name == other.name &&\n                className == other.className;\n    }\n\n    bool TestCase::operator < ( TestCase const& other ) const {\n        return name < other.name;\n    }\n\n    TestCaseInfo const& TestCase::getTestCaseInfo() const\n    {\n        return *this;\n    }\n\n} // end namespace Catch\n// end catch_test_case_info.cpp\n// start catch_test_case_registry_impl.cpp\n\n#include <algorithm>\n#include <sstream>\n\nnamespace Catch {\n\n    namespace {\n        struct TestHasher {\n            using hash_t = uint64_t;\n\n            explicit TestHasher( hash_t hashSuffix ):\n                    m_hashSuffix{ hashSuffix } {}\n\n            uint32_t operator()( TestCase const& t ) const {\n                // FNV-1a hash with multiplication fold.\n                const hash_t prime = 1099511628211u;\n                hash_t hash = 14695981039346656037u;\n                for ( const char c : t.name ) {\n                    hash ^= c;\n                    hash *= prime;\n                }\n                hash ^= m_hashSuffix;\n                hash *= prime;\n                const uint32_t low{ static_cast<uint32_t>( hash ) };\n                const uint32_t high{ static_cast<uint32_t>( hash >> 32 ) };\n                return low * high;\n            }\n\n        private:\n            hash_t m_hashSuffix;\n        };\n    } // end unnamed namespace\n\n    std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases ) {\n        switch( config.runOrder() ) {\n            case RunTests::InDeclarationOrder:\n                // already in declaration order\n                break;\n\n            case RunTests::InLexicographicalOrder: {\n                std::vector<TestCase> sorted = unsortedTestCases;\n                std::sort( sorted.begin(), sorted.end() );\n                return sorted;\n            }\n\n            case RunTests::InRandomOrder: {\n                seedRng( config );\n                TestHasher h{ config.rngSeed() };\n\n                using hashedTest = std::pair<TestHasher::hash_t, TestCase const*>;\n                std::vector<hashedTest> indexed_tests;\n                indexed_tests.reserve( unsortedTestCases.size() );\n\n                for (auto const& testCase : unsortedTestCases) {\n                    indexed_tests.emplace_back(h(testCase), &testCase);\n                }\n\n                std::sort(indexed_tests.begin(), indexed_tests.end(),\n                          [](hashedTest const& lhs, hashedTest const& rhs) {\n                              if (lhs.first == rhs.first) {\n                                  return lhs.second->name < rhs.second->name;\n                              }\n                              return lhs.first < rhs.first;\n                          });\n\n                std::vector<TestCase> sorted;\n                sorted.reserve( indexed_tests.size() );\n\n                for (auto const& hashed : indexed_tests) {\n                    sorted.emplace_back(*hashed.second);\n                }\n\n                return sorted;\n            }\n        }\n        return unsortedTestCases;\n    }\n\n    bool isThrowSafe( TestCase const& testCase, IConfig const& config ) {\n        return !testCase.throws() || config.allowThrows();\n    }\n\n    bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ) {\n        return testSpec.matches( testCase ) && isThrowSafe( testCase, config );\n    }\n\n    void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions ) {\n        std::set<TestCase> seenFunctions;\n        for( auto const& function : functions ) {\n            auto prev = seenFunctions.insert( function );\n            CATCH_ENFORCE( prev.second,\n                           \"error: TEST_CASE( \\\"\" << function.name << \"\\\" ) already defined.\\n\"\n                                                  << \"\\tFirst seen at \" << prev.first->getTestCaseInfo().lineInfo << \"\\n\"\n                                                  << \"\\tRedefined at \" << function.getTestCaseInfo().lineInfo );\n        }\n    }\n\n    std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config ) {\n        std::vector<TestCase> filtered;\n        filtered.reserve( testCases.size() );\n        for (auto const& testCase : testCases) {\n            if ((!testSpec.hasFilters() && !testCase.isHidden()) ||\n                (testSpec.hasFilters() && matchTest(testCase, testSpec, config))) {\n                filtered.push_back(testCase);\n            }\n        }\n        return filtered;\n    }\n    std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config ) {\n        return getRegistryHub().getTestCaseRegistry().getAllTestsSorted( config );\n    }\n\n    void TestRegistry::registerTest( TestCase const& testCase ) {\n        std::string name = testCase.getTestCaseInfo().name;\n        if( name.empty() ) {\n            ReusableStringStream rss;\n            rss << \"Anonymous test case \" << ++m_unnamedCount;\n            return registerTest( testCase.withName( rss.str() ) );\n        }\n        m_functions.push_back( testCase );\n    }\n\n    std::vector<TestCase> const& TestRegistry::getAllTests() const {\n        return m_functions;\n    }\n    std::vector<TestCase> const& TestRegistry::getAllTestsSorted( IConfig const& config ) const {\n        if( m_sortedFunctions.empty() )\n            enforceNoDuplicateTestCases( m_functions );\n\n        if(  m_currentSortOrder != config.runOrder() || m_sortedFunctions.empty() ) {\n            m_sortedFunctions = sortTests( config, m_functions );\n            m_currentSortOrder = config.runOrder();\n        }\n        return m_sortedFunctions;\n    }\n\n    ///////////////////////////////////////////////////////////////////////////\n    TestInvokerAsFunction::TestInvokerAsFunction( void(*testAsFunction)() ) noexcept : m_testAsFunction( testAsFunction ) {}\n\n    void TestInvokerAsFunction::invoke() const {\n        m_testAsFunction();\n    }\n\n    std::string extractClassName( StringRef const& classOrQualifiedMethodName ) {\n        std::string className(classOrQualifiedMethodName);\n        if( startsWith( className, '&' ) )\n        {\n            std::size_t lastColons = className.rfind( \"::\" );\n            std::size_t penultimateColons = className.rfind( \"::\", lastColons-1 );\n            if( penultimateColons == std::string::npos )\n                penultimateColons = 1;\n            className = className.substr( penultimateColons, lastColons-penultimateColons );\n        }\n        return className;\n    }\n\n} // end namespace Catch\n// end catch_test_case_registry_impl.cpp\n// start catch_test_case_tracker.cpp\n\n#include <algorithm>\n#include <cassert>\n#include <stdexcept>\n#include <memory>\n#include <sstream>\n\n#if defined(__clang__)\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#endif\n\nnamespace Catch {\n    namespace TestCaseTracking {\n\n        NameAndLocation::NameAndLocation( std::string const& _name, SourceLineInfo const& _location )\n                :   name( _name ),\n                    location( _location )\n        {}\n\n        ITracker::~ITracker() = default;\n\n        ITracker& TrackerContext::startRun() {\n            m_rootTracker = std::make_shared<SectionTracker>( NameAndLocation( \"{root}\", CATCH_INTERNAL_LINEINFO ), *this, nullptr );\n            m_currentTracker = nullptr;\n            m_runState = Executing;\n            return *m_rootTracker;\n        }\n\n        void TrackerContext::endRun() {\n            m_rootTracker.reset();\n            m_currentTracker = nullptr;\n            m_runState = NotStarted;\n        }\n\n        void TrackerContext::startCycle() {\n            m_currentTracker = m_rootTracker.get();\n            m_runState = Executing;\n        }\n        void TrackerContext::completeCycle() {\n            m_runState = CompletedCycle;\n        }\n\n        bool TrackerContext::completedCycle() const {\n            return m_runState == CompletedCycle;\n        }\n        ITracker& TrackerContext::currentTracker() {\n            return *m_currentTracker;\n        }\n        void TrackerContext::setCurrentTracker( ITracker* tracker ) {\n            m_currentTracker = tracker;\n        }\n\n        TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ):\n                ITracker(nameAndLocation),\n                m_ctx( ctx ),\n                m_parent( parent )\n        {}\n\n        bool TrackerBase::isComplete() const {\n            return m_runState == CompletedSuccessfully || m_runState == Failed;\n        }\n        bool TrackerBase::isSuccessfullyCompleted() const {\n            return m_runState == CompletedSuccessfully;\n        }\n        bool TrackerBase::isOpen() const {\n            return m_runState != NotStarted && !isComplete();\n        }\n        bool TrackerBase::hasChildren() const {\n            return !m_children.empty();\n        }\n\n        void TrackerBase::addChild( ITrackerPtr const& child ) {\n            m_children.push_back( child );\n        }\n\n        ITrackerPtr TrackerBase::findChild( NameAndLocation const& nameAndLocation ) {\n            auto it = std::find_if( m_children.begin(), m_children.end(),\n                                    [&nameAndLocation]( ITrackerPtr const& tracker ){\n                                        return\n                                                tracker->nameAndLocation().location == nameAndLocation.location &&\n                                                tracker->nameAndLocation().name == nameAndLocation.name;\n                                    } );\n            return( it != m_children.end() )\n                  ? *it\n                  : nullptr;\n        }\n        ITracker& TrackerBase::parent() {\n            assert( m_parent ); // Should always be non-null except for root\n            return *m_parent;\n        }\n\n        void TrackerBase::openChild() {\n            if( m_runState != ExecutingChildren ) {\n                m_runState = ExecutingChildren;\n                if( m_parent )\n                    m_parent->openChild();\n            }\n        }\n\n        bool TrackerBase::isSectionTracker() const { return false; }\n        bool TrackerBase::isGeneratorTracker() const { return false; }\n\n        void TrackerBase::open() {\n            m_runState = Executing;\n            moveToThis();\n            if( m_parent )\n                m_parent->openChild();\n        }\n\n        void TrackerBase::close() {\n\n            // Close any still open children (e.g. generators)\n            while( &m_ctx.currentTracker() != this )\n                m_ctx.currentTracker().close();\n\n            switch( m_runState ) {\n                case NeedsAnotherRun:\n                    break;\n\n                case Executing:\n                    m_runState = CompletedSuccessfully;\n                    break;\n                case ExecutingChildren:\n                    if( std::all_of(m_children.begin(), m_children.end(), [](ITrackerPtr const& t){ return t->isComplete(); }) )\n                        m_runState = CompletedSuccessfully;\n                    break;\n\n                case NotStarted:\n                case CompletedSuccessfully:\n                case Failed:\n                    CATCH_INTERNAL_ERROR( \"Illogical state: \" << m_runState );\n\n                default:\n                    CATCH_INTERNAL_ERROR( \"Unknown state: \" << m_runState );\n            }\n            moveToParent();\n            m_ctx.completeCycle();\n        }\n        void TrackerBase::fail() {\n            m_runState = Failed;\n            if( m_parent )\n                m_parent->markAsNeedingAnotherRun();\n            moveToParent();\n            m_ctx.completeCycle();\n        }\n        void TrackerBase::markAsNeedingAnotherRun() {\n            m_runState = NeedsAnotherRun;\n        }\n\n        void TrackerBase::moveToParent() {\n            assert( m_parent );\n            m_ctx.setCurrentTracker( m_parent );\n        }\n        void TrackerBase::moveToThis() {\n            m_ctx.setCurrentTracker( this );\n        }\n\n        SectionTracker::SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )\n                :   TrackerBase( nameAndLocation, ctx, parent ),\n                    m_trimmed_name(trim(nameAndLocation.name))\n        {\n            if( parent ) {\n                while( !parent->isSectionTracker() )\n                    parent = &parent->parent();\n\n                SectionTracker& parentSection = static_cast<SectionTracker&>( *parent );\n                addNextFilters( parentSection.m_filters );\n            }\n        }\n\n        bool SectionTracker::isComplete() const {\n            bool complete = true;\n\n            if (m_filters.empty()\n                || m_filters[0] == \"\"\n                || std::find(m_filters.begin(), m_filters.end(), m_trimmed_name) != m_filters.end()) {\n                complete = TrackerBase::isComplete();\n            }\n            return complete;\n        }\n\n        bool SectionTracker::isSectionTracker() const { return true; }\n\n        SectionTracker& SectionTracker::acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ) {\n            std::shared_ptr<SectionTracker> section;\n\n            ITracker& currentTracker = ctx.currentTracker();\n            if( ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) {\n                assert( childTracker );\n                assert( childTracker->isSectionTracker() );\n                section = std::static_pointer_cast<SectionTracker>( childTracker );\n            }\n            else {\n                section = std::make_shared<SectionTracker>( nameAndLocation, ctx, &currentTracker );\n                currentTracker.addChild( section );\n            }\n            if( !ctx.completedCycle() )\n                section->tryOpen();\n            return *section;\n        }\n\n        void SectionTracker::tryOpen() {\n            if( !isComplete() )\n                open();\n        }\n\n        void SectionTracker::addInitialFilters( std::vector<std::string> const& filters ) {\n            if( !filters.empty() ) {\n                m_filters.reserve( m_filters.size() + filters.size() + 2 );\n                m_filters.emplace_back(\"\"); // Root - should never be consulted\n                m_filters.emplace_back(\"\"); // Test Case - not a section filter\n                m_filters.insert( m_filters.end(), filters.begin(), filters.end() );\n            }\n        }\n        void SectionTracker::addNextFilters( std::vector<std::string> const& filters ) {\n            if( filters.size() > 1 )\n                m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() );\n        }\n\n        std::vector<std::string> const& SectionTracker::getFilters() const {\n            return m_filters;\n        }\n\n        std::string const& SectionTracker::trimmedName() const {\n            return m_trimmed_name;\n        }\n\n    } // namespace TestCaseTracking\n\n    using TestCaseTracking::ITracker;\n    using TestCaseTracking::TrackerContext;\n    using TestCaseTracking::SectionTracker;\n\n} // namespace Catch\n\n#if defined(__clang__)\n#    pragma clang diagnostic pop\n#endif\n// end catch_test_case_tracker.cpp\n// start catch_test_registry.cpp\n\nnamespace Catch {\n\n    auto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker* {\n        return new(std::nothrow) TestInvokerAsFunction( testAsFunction );\n    }\n\n    NameAndTags::NameAndTags( StringRef const& name_ , StringRef const& tags_ ) noexcept : name( name_ ), tags( tags_ ) {}\n\n    AutoReg::AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept {\n        CATCH_TRY {\n            getMutableRegistryHub()\n                    .registerTest(\n                            makeTestCase(\n                                    invoker,\n                                    extractClassName( classOrMethod ),\n                                    nameAndTags,\n                                    lineInfo));\n        } CATCH_CATCH_ALL {\n            // Do not throw when constructing global objects, instead register the exception to be processed later\n            getMutableRegistryHub().registerStartupException();\n        }\n    }\n\n    AutoReg::~AutoReg() = default;\n}\n// end catch_test_registry.cpp\n// start catch_test_spec.cpp\n\n#include <algorithm>\n#include <string>\n#include <vector>\n#include <memory>\n\nnamespace Catch {\n\n    TestSpec::Pattern::Pattern( std::string const& name )\n            : m_name( name )\n    {}\n\n    TestSpec::Pattern::~Pattern() = default;\n\n    std::string const& TestSpec::Pattern::name() const {\n        return m_name;\n    }\n\n    TestSpec::NamePattern::NamePattern( std::string const& name, std::string const& filterString )\n            : Pattern( filterString )\n            , m_wildcardPattern( toLower( name ), CaseSensitive::No )\n    {}\n\n    bool TestSpec::NamePattern::matches( TestCaseInfo const& testCase ) const {\n        return m_wildcardPattern.matches( testCase.name );\n    }\n\n    TestSpec::TagPattern::TagPattern( std::string const& tag, std::string const& filterString )\n            : Pattern( filterString )\n            , m_tag( toLower( tag ) )\n    {}\n\n    bool TestSpec::TagPattern::matches( TestCaseInfo const& testCase ) const {\n        return std::find(begin(testCase.lcaseTags),\n                         end(testCase.lcaseTags),\n                         m_tag) != end(testCase.lcaseTags);\n    }\n\n    TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern )\n            : Pattern( underlyingPattern->name() )\n            , m_underlyingPattern( underlyingPattern )\n    {}\n\n    bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const {\n        return !m_underlyingPattern->matches( testCase );\n    }\n\n    bool TestSpec::Filter::matches( TestCaseInfo const& testCase ) const {\n        return std::all_of( m_patterns.begin(), m_patterns.end(), [&]( PatternPtr const& p ){ return p->matches( testCase ); } );\n    }\n\n    std::string TestSpec::Filter::name() const {\n        std::string name;\n        for( auto const& p : m_patterns )\n            name += p->name();\n        return name;\n    }\n\n    bool TestSpec::hasFilters() const {\n        return !m_filters.empty();\n    }\n\n    bool TestSpec::matches( TestCaseInfo const& testCase ) const {\n        return std::any_of( m_filters.begin(), m_filters.end(), [&]( Filter const& f ){ return f.matches( testCase ); } );\n    }\n\n    TestSpec::Matches TestSpec::matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const\n    {\n        Matches matches( m_filters.size() );\n        std::transform( m_filters.begin(), m_filters.end(), matches.begin(), [&]( Filter const& filter ){\n            std::vector<TestCase const*> currentMatches;\n            for( auto const& test : testCases )\n                if( isThrowSafe( test, config ) && filter.matches( test ) )\n                    currentMatches.emplace_back( &test );\n            return FilterMatch{ filter.name(), currentMatches };\n        } );\n        return matches;\n    }\n\n    const TestSpec::vectorStrings& TestSpec::getInvalidArgs() const{\n        return  (m_invalidArgs);\n    }\n\n}\n// end catch_test_spec.cpp\n// start catch_test_spec_parser.cpp\n\nnamespace Catch {\n\n    TestSpecParser::TestSpecParser( ITagAliasRegistry const& tagAliases ) : m_tagAliases( &tagAliases ) {}\n\n    TestSpecParser& TestSpecParser::parse( std::string const& arg ) {\n        m_mode = None;\n        m_exclusion = false;\n        m_arg = m_tagAliases->expandAliases( arg );\n        m_escapeChars.clear();\n        m_substring.reserve(m_arg.size());\n        m_patternName.reserve(m_arg.size());\n        m_realPatternPos = 0;\n\n        for( m_pos = 0; m_pos < m_arg.size(); ++m_pos )\n            //if visitChar fails\n            if( !visitChar( m_arg[m_pos] ) ){\n                m_testSpec.m_invalidArgs.push_back(arg);\n                break;\n            }\n        endMode();\n        return *this;\n    }\n    TestSpec TestSpecParser::testSpec() {\n        addFilter();\n        return m_testSpec;\n    }\n    bool TestSpecParser::visitChar( char c ) {\n        if( (m_mode != EscapedName) && (c == '\\\\') ) {\n            escape();\n            addCharToPattern(c);\n            return true;\n        }else if((m_mode != EscapedName) && (c == ',') )  {\n            return separate();\n        }\n\n        switch( m_mode ) {\n            case None:\n                if( processNoneChar( c ) )\n                    return true;\n                break;\n            case Name:\n                processNameChar( c );\n                break;\n            case EscapedName:\n                endMode();\n                addCharToPattern(c);\n                return true;\n            default:\n            case Tag:\n            case QuotedName:\n                if( processOtherChar( c ) )\n                    return true;\n                break;\n        }\n\n        m_substring += c;\n        if( !isControlChar( c ) ) {\n            m_patternName += c;\n            m_realPatternPos++;\n        }\n        return true;\n    }\n    // Two of the processing methods return true to signal the caller to return\n    // without adding the given character to the current pattern strings\n    bool TestSpecParser::processNoneChar( char c ) {\n        switch( c ) {\n            case ' ':\n                return true;\n            case '~':\n                m_exclusion = true;\n                return false;\n            case '[':\n                startNewMode( Tag );\n                return false;\n            case '\"':\n                startNewMode( QuotedName );\n                return false;\n            default:\n                startNewMode( Name );\n                return false;\n        }\n    }\n    void TestSpecParser::processNameChar( char c ) {\n        if( c == '[' ) {\n            if( m_substring == \"exclude:\" )\n                m_exclusion = true;\n            else\n                endMode();\n            startNewMode( Tag );\n        }\n    }\n    bool TestSpecParser::processOtherChar( char c ) {\n        if( !isControlChar( c ) )\n            return false;\n        m_substring += c;\n        endMode();\n        return true;\n    }\n    void TestSpecParser::startNewMode( Mode mode ) {\n        m_mode = mode;\n    }\n    void TestSpecParser::endMode() {\n        switch( m_mode ) {\n            case Name:\n            case QuotedName:\n                return addNamePattern();\n            case Tag:\n                return addTagPattern();\n            case EscapedName:\n                revertBackToLastMode();\n                return;\n            case None:\n            default:\n                return startNewMode( None );\n        }\n    }\n    void TestSpecParser::escape() {\n        saveLastMode();\n        m_mode = EscapedName;\n        m_escapeChars.push_back(m_realPatternPos);\n    }\n    bool TestSpecParser::isControlChar( char c ) const {\n        switch( m_mode ) {\n            default:\n                return false;\n            case None:\n                return c == '~';\n            case Name:\n                return c == '[';\n            case EscapedName:\n                return true;\n            case QuotedName:\n                return c == '\"';\n            case Tag:\n                return c == '[' || c == ']';\n        }\n    }\n\n    void TestSpecParser::addFilter() {\n        if( !m_currentFilter.m_patterns.empty() ) {\n            m_testSpec.m_filters.push_back( m_currentFilter );\n            m_currentFilter = TestSpec::Filter();\n        }\n    }\n\n    void TestSpecParser::saveLastMode() {\n        lastMode = m_mode;\n    }\n\n    void TestSpecParser::revertBackToLastMode() {\n        m_mode = lastMode;\n    }\n\n    bool TestSpecParser::separate() {\n        if( (m_mode==QuotedName) || (m_mode==Tag) ){\n            //invalid argument, signal failure to previous scope.\n            m_mode = None;\n            m_pos = m_arg.size();\n            m_substring.clear();\n            m_patternName.clear();\n            m_realPatternPos = 0;\n            return false;\n        }\n        endMode();\n        addFilter();\n        return true; //success\n    }\n\n    std::string TestSpecParser::preprocessPattern() {\n        std::string token = m_patternName;\n        for (std::size_t i = 0; i < m_escapeChars.size(); ++i)\n            token = token.substr(0, m_escapeChars[i] - i) + token.substr(m_escapeChars[i] - i + 1);\n        m_escapeChars.clear();\n        if (startsWith(token, \"exclude:\")) {\n            m_exclusion = true;\n            token = token.substr(8);\n        }\n\n        m_patternName.clear();\n        m_realPatternPos = 0;\n\n        return token;\n    }\n\n    void TestSpecParser::addNamePattern() {\n        auto token = preprocessPattern();\n\n        if (!token.empty()) {\n            TestSpec::PatternPtr pattern = std::make_shared<TestSpec::NamePattern>(token, m_substring);\n            if (m_exclusion)\n                pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);\n            m_currentFilter.m_patterns.push_back(pattern);\n        }\n        m_substring.clear();\n        m_exclusion = false;\n        m_mode = None;\n    }\n\n    void TestSpecParser::addTagPattern() {\n        auto token = preprocessPattern();\n\n        if (!token.empty()) {\n            // If the tag pattern is the \"hide and tag\" shorthand (e.g. [.foo])\n            // we have to create a separate hide tag and shorten the real one\n            if (token.size() > 1 && token[0] == '.') {\n                token.erase(token.begin());\n                TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(\".\", m_substring);\n                if (m_exclusion) {\n                    pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);\n                }\n                m_currentFilter.m_patterns.push_back(pattern);\n            }\n\n            TestSpec::PatternPtr pattern = std::make_shared<TestSpec::TagPattern>(token, m_substring);\n\n            if (m_exclusion) {\n                pattern = std::make_shared<TestSpec::ExcludedPattern>(pattern);\n            }\n            m_currentFilter.m_patterns.push_back(pattern);\n        }\n        m_substring.clear();\n        m_exclusion = false;\n        m_mode = None;\n    }\n\n    TestSpec parseTestSpec( std::string const& arg ) {\n        return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec();\n    }\n\n} // namespace Catch\n// end catch_test_spec_parser.cpp\n// start catch_timer.cpp\n\n#include <chrono>\n\nstatic const uint64_t nanosecondsInSecond = 1000000000;\n\nnamespace Catch {\n\n    auto getCurrentNanosecondsSinceEpoch() -> uint64_t {\n        return std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();\n    }\n\n    namespace {\n        auto estimateClockResolution() -> uint64_t {\n            uint64_t sum = 0;\n            static const uint64_t iterations = 1000000;\n\n            auto startTime = getCurrentNanosecondsSinceEpoch();\n\n            for( std::size_t i = 0; i < iterations; ++i ) {\n\n                uint64_t ticks;\n                uint64_t baseTicks = getCurrentNanosecondsSinceEpoch();\n                do {\n                    ticks = getCurrentNanosecondsSinceEpoch();\n                } while( ticks == baseTicks );\n\n                auto delta = ticks - baseTicks;\n                sum += delta;\n\n                // If we have been calibrating for over 3 seconds -- the clock\n                // is terrible and we should move on.\n                // TBD: How to signal that the measured resolution is probably wrong?\n                if (ticks > startTime + 3 * nanosecondsInSecond) {\n                    return sum / ( i + 1u );\n                }\n            }\n\n            // We're just taking the mean, here. To do better we could take the std. dev and exclude outliers\n            // - and potentially do more iterations if there's a high variance.\n            return sum/iterations;\n        }\n    }\n    auto getEstimatedClockResolution() -> uint64_t {\n        static auto s_resolution = estimateClockResolution();\n        return s_resolution;\n    }\n\n    void Timer::start() {\n        m_nanoseconds = getCurrentNanosecondsSinceEpoch();\n    }\n    auto Timer::getElapsedNanoseconds() const -> uint64_t {\n        return getCurrentNanosecondsSinceEpoch() - m_nanoseconds;\n    }\n    auto Timer::getElapsedMicroseconds() const -> uint64_t {\n        return getElapsedNanoseconds()/1000;\n    }\n    auto Timer::getElapsedMilliseconds() const -> unsigned int {\n        return static_cast<unsigned int>(getElapsedMicroseconds()/1000);\n    }\n    auto Timer::getElapsedSeconds() const -> double {\n        return getElapsedMicroseconds()/1000000.0;\n    }\n\n} // namespace Catch\n// end catch_timer.cpp\n// start catch_tostring.cpp\n\n#if defined(__clang__)\n#    pragma clang diagnostic push\n#    pragma clang diagnostic ignored \"-Wexit-time-destructors\"\n#    pragma clang diagnostic ignored \"-Wglobal-constructors\"\n#endif\n\n// Enable specific decls locally\n#if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)\n#define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER\n#endif\n\n#include <cmath>\n#include <iomanip>\n\nnamespace Catch {\n\n    namespace Detail {\n\n        const std::string unprintableString = \"{?}\";\n\n        namespace {\n            const int hexThreshold = 255;\n\n            struct Endianness {\n                enum Arch { Big, Little };\n\n                static Arch which() {\n                    int one = 1;\n                    // If the lowest byte we read is non-zero, we can assume\n                    // that little endian format is used.\n                    auto value = *reinterpret_cast<char*>(&one);\n                    return value ? Little : Big;\n                }\n            };\n        }\n\n        std::string rawMemoryToString( const void *object, std::size_t size ) {\n            // Reverse order for little endian architectures\n            int i = 0, end = static_cast<int>( size ), inc = 1;\n            if( Endianness::which() == Endianness::Little ) {\n                i = end-1;\n                end = inc = -1;\n            }\n\n            unsigned char const *bytes = static_cast<unsigned char const *>(object);\n            ReusableStringStream rss;\n            rss << \"0x\" << std::setfill('0') << std::hex;\n            for( ; i != end; i += inc )\n                rss << std::setw(2) << static_cast<unsigned>(bytes[i]);\n            return rss.str();\n        }\n    }\n\n    template<typename T>\n    std::string fpToString( T value, int precision ) {\n        if (Catch::isnan(value)) {\n            return \"nan\";\n        }\n\n        ReusableStringStream rss;\n        rss << std::setprecision( precision )\n            << std::fixed\n            << value;\n        std::string d = rss.str();\n        std::size_t i = d.find_last_not_of( '0' );\n        if( i != std::string::npos && i != d.size()-1 ) {\n            if( d[i] == '.' )\n                i++;\n            d = d.substr( 0, i+1 );\n        }\n        return d;\n    }\n\n//// ======================================================= ////\n//\n//   Out-of-line defs for full specialization of StringMaker\n//\n//// ======================================================= ////\n\n    std::string StringMaker<std::string>::convert(const std::string& str) {\n        if (!getCurrentContext().getConfig()->showInvisibles()) {\n            return '\"' + str + '\"';\n        }\n\n        std::string s(\"\\\"\");\n        for (char c : str) {\n            switch (c) {\n                case '\\n':\n                    s.append(\"\\\\n\");\n                    break;\n                case '\\t':\n                    s.append(\"\\\\t\");\n                    break;\n                default:\n                    s.push_back(c);\n                    break;\n            }\n        }\n        s.append(\"\\\"\");\n        return s;\n    }\n\n#ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n    std::string StringMaker<std::string_view>::convert(std::string_view str) {\n        return ::Catch::Detail::stringify(std::string{ str });\n    }\n#endif\n\n    std::string StringMaker<char const*>::convert(char const* str) {\n        if (str) {\n            return ::Catch::Detail::stringify(std::string{ str });\n        } else {\n            return{ \"{null string}\" };\n        }\n    }\n    std::string StringMaker<char*>::convert(char* str) {\n        if (str) {\n            return ::Catch::Detail::stringify(std::string{ str });\n        } else {\n            return{ \"{null string}\" };\n        }\n    }\n\n#ifdef CATCH_CONFIG_WCHAR\n    std::string StringMaker<std::wstring>::convert(const std::wstring& wstr) {\n        std::string s;\n        s.reserve(wstr.size());\n        for (auto c : wstr) {\n            s += (c <= 0xff) ? static_cast<char>(c) : '?';\n        }\n        return ::Catch::Detail::stringify(s);\n    }\n\n# ifdef CATCH_CONFIG_CPP17_STRING_VIEW\n    std::string StringMaker<std::wstring_view>::convert(std::wstring_view str) {\n        return StringMaker<std::wstring>::convert(std::wstring(str));\n    }\n# endif\n\n    std::string StringMaker<wchar_t const*>::convert(wchar_t const * str) {\n        if (str) {\n            return ::Catch::Detail::stringify(std::wstring{ str });\n        } else {\n            return{ \"{null string}\" };\n        }\n    }\n    std::string StringMaker<wchar_t *>::convert(wchar_t * str) {\n        if (str) {\n            return ::Catch::Detail::stringify(std::wstring{ str });\n        } else {\n            return{ \"{null string}\" };\n        }\n    }\n#endif\n\n#if defined(CATCH_CONFIG_CPP17_BYTE)\n#include <cstddef>\n    std::string StringMaker<std::byte>::convert(std::byte value) {\n        return ::Catch::Detail::stringify(std::to_integer<unsigned long long>(value));\n    }\n#endif // defined(CATCH_CONFIG_CPP17_BYTE)\n\n    std::string StringMaker<int>::convert(int value) {\n        return ::Catch::Detail::stringify(static_cast<long long>(value));\n    }\n    std::string StringMaker<long>::convert(long value) {\n        return ::Catch::Detail::stringify(static_cast<long long>(value));\n    }\n    std::string StringMaker<long long>::convert(long long value) {\n        ReusableStringStream rss;\n        rss << value;\n        if (value > Detail::hexThreshold) {\n            rss << \" (0x\" << std::hex << value << ')';\n        }\n        return rss.str();\n    }\n\n    std::string StringMaker<unsigned int>::convert(unsigned int value) {\n        return ::Catch::Detail::stringify(static_cast<unsigned long long>(value));\n    }\n    std::string StringMaker<unsigned long>::convert(unsigned long value) {\n        return ::Catch::Detail::stringify(static_cast<unsigned long long>(value));\n    }\n    std::string StringMaker<unsigned long long>::convert(unsigned long long value) {\n        ReusableStringStream rss;\n        rss << value;\n        if (value > Detail::hexThreshold) {\n            rss << \" (0x\" << std::hex << value << ')';\n        }\n        return rss.str();\n    }\n\n    std::string StringMaker<bool>::convert(bool b) {\n        return b ? \"true\" : \"false\";\n    }\n\n    std::string StringMaker<signed char>::convert(signed char value) {\n        if (value == '\\r') {\n            return \"'\\\\r'\";\n        } else if (value == '\\f') {\n            return \"'\\\\f'\";\n        } else if (value == '\\n') {\n            return \"'\\\\n'\";\n        } else if (value == '\\t') {\n            return \"'\\\\t'\";\n        } else if ('\\0' <= value && value < ' ') {\n            return ::Catch::Detail::stringify(static_cast<unsigned int>(value));\n        } else {\n            char chstr[] = \"' '\";\n            chstr[1] = value;\n            return chstr;\n        }\n    }\n    std::string StringMaker<char>::convert(char c) {\n        return ::Catch::Detail::stringify(static_cast<signed char>(c));\n    }\n    std::string StringMaker<unsigned char>::convert(unsigned char c) {\n        return ::Catch::Detail::stringify(static_cast<char>(c));\n    }\n\n    std::string StringMaker<std::nullptr_t>::convert(std::nullptr_t) {\n        return \"nullptr\";\n    }\n\n    int StringMaker<float>::precision = 5;\n\n    std::string StringMaker<float>::convert(float value) {\n        return fpToString(value, precision) + 'f';\n    }\n\n    int StringMaker<double>::precision = 10;\n\n    std::string StringMaker<double>::convert(double value) {\n        return fpToString(value, precision);\n    }\n\n    std::string ratio_string<std::atto>::symbol() { return \"a\"; }\n    std::string ratio_string<std::femto>::symbol() { return \"f\"; }\n    std::string ratio_string<std::pico>::symbol() { return \"p\"; }\n    std::string ratio_string<std::nano>::symbol() { return \"n\"; }\n    std::string ratio_string<std::micro>::symbol() { return \"u\"; }\n    std::string ratio_string<std::milli>::symbol() { return \"m\"; }\n\n} // end namespace Catch\n\n#if defined(__clang__)\n#    pragma clang diagnostic pop\n#endif\n\n// end catch_tostring.cpp\n// start catch_totals.cpp\n\nnamespace Catch {\n\n    Counts Counts::operator - ( Counts const& other ) const {\n        Counts diff;\n        diff.passed = passed - other.passed;\n        diff.failed = failed - other.failed;\n        diff.failedButOk = failedButOk - other.failedButOk;\n        return diff;\n    }\n\n    Counts& Counts::operator += ( Counts const& other ) {\n        passed += other.passed;\n        failed += other.failed;\n        failedButOk += other.failedButOk;\n        return *this;\n    }\n\n    std::size_t Counts::total() const {\n        return passed + failed + failedButOk;\n    }\n    bool Counts::allPassed() const {\n        return failed == 0 && failedButOk == 0;\n    }\n    bool Counts::allOk() const {\n        return failed == 0;\n    }\n\n    Totals Totals::operator - ( Totals const& other ) const {\n        Totals diff;\n        diff.assertions = assertions - other.assertions;\n        diff.testCases = testCases - other.testCases;\n        return diff;\n    }\n\n    Totals& Totals::operator += ( Totals const& other ) {\n        assertions += other.assertions;\n        testCases += other.testCases;\n        return *this;\n    }\n\n    Totals Totals::delta( Totals const& prevTotals ) const {\n        Totals diff = *this - prevTotals;\n        if( diff.assertions.failed > 0 )\n            ++diff.testCases.failed;\n        else if( diff.assertions.failedButOk > 0 )\n            ++diff.testCases.failedButOk;\n        else\n            ++diff.testCases.passed;\n        return diff;\n    }\n\n}\n// end catch_totals.cpp\n// start catch_uncaught_exceptions.cpp\n\n// start catch_config_uncaught_exceptions.hpp\n\n//              Copyright Catch2 Authors\n// Distributed under the Boost Software License, Version 1.0.\n//   (See accompanying file LICENSE_1_0.txt or copy at\n//        https://www.boost.org/LICENSE_1_0.txt)\n\n// SPDX-License-Identifier: BSL-1.0\n\n#ifndef CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP\n#define CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP\n\n#if defined(_MSC_VER)\n#  if _MSC_VER >= 1900 // Visual Studio 2015 or newer\n#    define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS\n#  endif\n#endif\n\n#include <exception>\n\n#if defined(__cpp_lib_uncaught_exceptions) \\\n    && !defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)\n\n#  define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS\n#endif // __cpp_lib_uncaught_exceptions\n\n#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) \\\n    && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) \\\n    && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)\n\n#  define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS\n#endif\n\n#endif // CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP\n// end catch_config_uncaught_exceptions.hpp\n#include <exception>\n\nnamespace Catch {\n    bool uncaught_exceptions() {\n#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)\n        return false;\n#elif defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)\n        return std::uncaught_exceptions() > 0;\n#else\n        return std::uncaught_exception();\n#endif\n    }\n} // end namespace Catch\n// end catch_uncaught_exceptions.cpp\n// start catch_version.cpp\n\n#include <ostream>\n\nnamespace Catch {\n\n    Version::Version\n            (   unsigned int _majorVersion,\n                unsigned int _minorVersion,\n                unsigned int _patchNumber,\n                char const * const _branchName,\n                unsigned int _buildNumber )\n            :   majorVersion( _majorVersion ),\n                minorVersion( _minorVersion ),\n                patchNumber( _patchNumber ),\n                branchName( _branchName ),\n                buildNumber( _buildNumber )\n    {}\n\n    std::ostream& operator << ( std::ostream& os, Version const& version ) {\n        os  << version.majorVersion << '.'\n            << version.minorVersion << '.'\n            << version.patchNumber;\n        // branchName is never null -> 0th char is \\0 if it is empty\n        if (version.branchName[0]) {\n            os << '-' << version.branchName\n               << '.' << version.buildNumber;\n        }\n        return os;\n    }\n\n    Version const& libraryVersion() {\n        static Version version( 2, 13, 9, \"\", 0 );\n        return version;\n    }\n\n}\n// end catch_version.cpp\n// start catch_wildcard_pattern.cpp\n\nnamespace Catch {\n\n    WildcardPattern::WildcardPattern( std::string const& pattern,\n                                      CaseSensitive::Choice caseSensitivity )\n            :   m_caseSensitivity( caseSensitivity ),\n                m_pattern( normaliseString( pattern ) )\n    {\n        if( startsWith( m_pattern, '*' ) ) {\n            m_pattern = m_pattern.substr( 1 );\n            m_wildcard = WildcardAtStart;\n        }\n        if( endsWith( m_pattern, '*' ) ) {\n            m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );\n            m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );\n        }\n    }\n\n    bool WildcardPattern::matches( std::string const& str ) const {\n        switch( m_wildcard ) {\n            case NoWildcard:\n                return m_pattern == normaliseString( str );\n            case WildcardAtStart:\n                return endsWith( normaliseString( str ), m_pattern );\n            case WildcardAtEnd:\n                return startsWith( normaliseString( str ), m_pattern );\n            case WildcardAtBothEnds:\n                return contains( normaliseString( str ), m_pattern );\n            default:\n                CATCH_INTERNAL_ERROR( \"Unknown enum\" );\n        }\n    }\n\n    std::string WildcardPattern::normaliseString( std::string const& str ) const {\n        return trim( m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str );\n    }\n}\n// end catch_wildcard_pattern.cpp\n// start catch_xmlwriter.cpp\n\n#include <iomanip>\n#include <type_traits>\n\nnamespace Catch {\n\n    namespace {\n\n        size_t trailingBytes(unsigned char c) {\n            if ((c & 0xE0) == 0xC0) {\n                return 2;\n            }\n            if ((c & 0xF0) == 0xE0) {\n                return 3;\n            }\n            if ((c & 0xF8) == 0xF0) {\n                return 4;\n            }\n            CATCH_INTERNAL_ERROR(\"Invalid multibyte utf-8 start byte encountered\");\n        }\n\n        uint32_t headerValue(unsigned char c) {\n            if ((c & 0xE0) == 0xC0) {\n                return c & 0x1F;\n            }\n            if ((c & 0xF0) == 0xE0) {\n                return c & 0x0F;\n            }\n            if ((c & 0xF8) == 0xF0) {\n                return c & 0x07;\n            }\n            CATCH_INTERNAL_ERROR(\"Invalid multibyte utf-8 start byte encountered\");\n        }\n\n        void hexEscapeChar(std::ostream& os, unsigned char c) {\n            std::ios_base::fmtflags f(os.flags());\n            os << \"\\\\x\"\n               << std::uppercase << std::hex << std::setfill('0') << std::setw(2)\n               << static_cast<int>(c);\n            os.flags(f);\n        }\n\n        bool shouldNewline(XmlFormatting fmt) {\n            return !!(static_cast<std::underlying_type<XmlFormatting>::type>(fmt & XmlFormatting::Newline));\n        }\n\n        bool shouldIndent(XmlFormatting fmt) {\n            return !!(static_cast<std::underlying_type<XmlFormatting>::type>(fmt & XmlFormatting::Indent));\n        }\n\n    } // anonymous namespace\n\n    XmlFormatting operator | (XmlFormatting lhs, XmlFormatting rhs) {\n        return static_cast<XmlFormatting>(\n                static_cast<std::underlying_type<XmlFormatting>::type>(lhs) |\n                static_cast<std::underlying_type<XmlFormatting>::type>(rhs)\n        );\n    }\n\n    XmlFormatting operator & (XmlFormatting lhs, XmlFormatting rhs) {\n        return static_cast<XmlFormatting>(\n                static_cast<std::underlying_type<XmlFormatting>::type>(lhs) &\n                static_cast<std::underlying_type<XmlFormatting>::type>(rhs)\n        );\n    }\n\n    XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat )\n            :   m_str( str ),\n                m_forWhat( forWhat )\n    {}\n\n    void XmlEncode::encodeTo( std::ostream& os ) const {\n        // Apostrophe escaping not necessary if we always use \" to write attributes\n        // (see: http://www.w3.org/TR/xml/#syntax)\n\n        for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) {\n            unsigned char c = m_str[idx];\n            switch (c) {\n                case '<':   os << \"&lt;\"; break;\n                case '&':   os << \"&amp;\"; break;\n\n                case '>':\n                    // See: http://www.w3.org/TR/xml/#syntax\n                    if (idx > 2 && m_str[idx - 1] == ']' && m_str[idx - 2] == ']')\n                        os << \"&gt;\";\n                    else\n                        os << c;\n                    break;\n\n                case '\\\"':\n                    if (m_forWhat == ForAttributes)\n                        os << \"&quot;\";\n                    else\n                        os << c;\n                    break;\n\n                default:\n                    // Check for control characters and invalid utf-8\n\n                    // Escape control characters in standard ascii\n                    // see http://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0\n                    if (c < 0x09 || (c > 0x0D && c < 0x20) || c == 0x7F) {\n                        hexEscapeChar(os, c);\n                        break;\n                    }\n\n                    // Plain ASCII: Write it to stream\n                    if (c < 0x7F) {\n                        os << c;\n                        break;\n                    }\n\n                    // UTF-8 territory\n                    // Check if the encoding is valid and if it is not, hex escape bytes.\n                    // Important: We do not check the exact decoded values for validity, only the encoding format\n                    // First check that this bytes is a valid lead byte:\n                    // This means that it is not encoded as 1111 1XXX\n                    // Or as 10XX XXXX\n                    if (c <  0xC0 ||\n                        c >= 0xF8) {\n                        hexEscapeChar(os, c);\n                        break;\n                    }\n\n                    auto encBytes = trailingBytes(c);\n                    // Are there enough bytes left to avoid accessing out-of-bounds memory?\n                    if (idx + encBytes - 1 >= m_str.size()) {\n                        hexEscapeChar(os, c);\n                        break;\n                    }\n                    // The header is valid, check data\n                    // The next encBytes bytes must together be a valid utf-8\n                    // This means: bitpattern 10XX XXXX and the extracted value is sane (ish)\n                    bool valid = true;\n                    uint32_t value = headerValue(c);\n                    for (std::size_t n = 1; n < encBytes; ++n) {\n                        unsigned char nc = m_str[idx + n];\n                        valid &= ((nc & 0xC0) == 0x80);\n                        value = (value << 6) | (nc & 0x3F);\n                    }\n\n                    if (\n                        // Wrong bit pattern of following bytes\n                            (!valid) ||\n                            // Overlong encodings\n                            (value < 0x80) ||\n                            (0x80 <= value && value < 0x800   && encBytes > 2) ||\n                            (0x800 < value && value < 0x10000 && encBytes > 3) ||\n                            // Encoded value out of range\n                            (value >= 0x110000)\n                            ) {\n                        hexEscapeChar(os, c);\n                        break;\n                    }\n\n                    // If we got here, this is in fact a valid(ish) utf-8 sequence\n                    for (std::size_t n = 0; n < encBytes; ++n) {\n                        os << m_str[idx + n];\n                    }\n                    idx += encBytes - 1;\n                    break;\n            }\n        }\n    }\n\n    std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) {\n        xmlEncode.encodeTo( os );\n        return os;\n    }\n\n    XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer, XmlFormatting fmt )\n            :   m_writer( writer ),\n                m_fmt(fmt)\n    {}\n\n    XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) noexcept\n            :   m_writer( other.m_writer ),\n                m_fmt(other.m_fmt)\n    {\n        other.m_writer = nullptr;\n        other.m_fmt = XmlFormatting::None;\n    }\n    XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) noexcept {\n        if ( m_writer ) {\n            m_writer->endElement();\n        }\n        m_writer = other.m_writer;\n        other.m_writer = nullptr;\n        m_fmt = other.m_fmt;\n        other.m_fmt = XmlFormatting::None;\n        return *this;\n    }\n\n    XmlWriter::ScopedElement::~ScopedElement() {\n        if (m_writer) {\n            m_writer->endElement(m_fmt);\n        }\n    }\n\n    XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, XmlFormatting fmt ) {\n        m_writer->writeText( text, fmt );\n        return *this;\n    }\n\n    XmlWriter::XmlWriter( std::ostream& os ) : m_os( os )\n    {\n        writeDeclaration();\n    }\n\n    XmlWriter::~XmlWriter() {\n        while (!m_tags.empty()) {\n            endElement();\n        }\n        newlineIfNecessary();\n    }\n\n    XmlWriter& XmlWriter::startElement( std::string const& name, XmlFormatting fmt ) {\n        ensureTagClosed();\n        newlineIfNecessary();\n        if (shouldIndent(fmt)) {\n            m_os << m_indent;\n            m_indent += \"  \";\n        }\n        m_os << '<' << name;\n        m_tags.push_back( name );\n        m_tagIsOpen = true;\n        applyFormatting(fmt);\n        return *this;\n    }\n\n    XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name, XmlFormatting fmt ) {\n        ScopedElement scoped( this, fmt );\n        startElement( name, fmt );\n        return scoped;\n    }\n\n    XmlWriter& XmlWriter::endElement(XmlFormatting fmt) {\n        m_indent = m_indent.substr(0, m_indent.size() - 2);\n\n        if( m_tagIsOpen ) {\n            m_os << \"/>\";\n            m_tagIsOpen = false;\n        } else {\n            newlineIfNecessary();\n            if (shouldIndent(fmt)) {\n                m_os << m_indent;\n            }\n            m_os << \"</\" << m_tags.back() << \">\";\n        }\n        m_os << std::flush;\n        applyFormatting(fmt);\n        m_tags.pop_back();\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, std::string const& attribute ) {\n        if( !name.empty() && !attribute.empty() )\n            m_os << ' ' << name << \"=\\\"\" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, bool attribute ) {\n        m_os << ' ' << name << \"=\\\"\" << ( attribute ? \"true\" : \"false\" ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeText( std::string const& text, XmlFormatting fmt) {\n        if( !text.empty() ){\n            bool tagWasOpen = m_tagIsOpen;\n            ensureTagClosed();\n            if (tagWasOpen && shouldIndent(fmt)) {\n                m_os << m_indent;\n            }\n            m_os << XmlEncode( text );\n            applyFormatting(fmt);\n        }\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeComment( std::string const& text, XmlFormatting fmt) {\n        ensureTagClosed();\n        if (shouldIndent(fmt)) {\n            m_os << m_indent;\n        }\n        m_os << \"<!--\" << text << \"-->\";\n        applyFormatting(fmt);\n        return *this;\n    }\n\n    void XmlWriter::writeStylesheetRef( std::string const& url ) {\n        m_os << \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"\" << url << \"\\\"?>\\n\";\n    }\n\n    XmlWriter& XmlWriter::writeBlankLine() {\n        ensureTagClosed();\n        m_os << '\\n';\n        return *this;\n    }\n\n    void XmlWriter::ensureTagClosed() {\n        if( m_tagIsOpen ) {\n            m_os << '>' << std::flush;\n            newlineIfNecessary();\n            m_tagIsOpen = false;\n        }\n    }\n\n    void XmlWriter::applyFormatting(XmlFormatting fmt) {\n        m_needsNewline = shouldNewline(fmt);\n    }\n\n    void XmlWriter::writeDeclaration() {\n        m_os << \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n    }\n\n    void XmlWriter::newlineIfNecessary() {\n        if( m_needsNewline ) {\n            m_os << std::endl;\n            m_needsNewline = false;\n        }\n    }\n}\n// end catch_xmlwriter.cpp\n// start catch_reporter_bases.cpp\n\n#include <cstring>\n#include <cfloat>\n#include <cstdio>\n#include <cassert>\n#include <memory>\n\nnamespace Catch {\n    void prepareExpandedExpression(AssertionResult& result) {\n        result.getExpandedExpression();\n    }\n\n    // Because formatting using c++ streams is stateful, drop down to C is required\n    // Alternatively we could use stringstream, but its performance is... not good.\n    std::string getFormattedDuration( double duration ) {\n        // Max exponent + 1 is required to represent the whole part\n        // + 1 for decimal point\n        // + 3 for the 3 decimal places\n        // + 1 for null terminator\n        const std::size_t maxDoubleSize = DBL_MAX_10_EXP + 1 + 1 + 3 + 1;\n        char buffer[maxDoubleSize];\n\n        // Save previous errno, to prevent sprintf from overwriting it\n        ErrnoGuard guard;\n#ifdef _MSC_VER\n        sprintf_s(buffer, \"%.3f\", duration);\n#else\n        std::sprintf(buffer, \"%.3f\", duration);\n#endif\n        return std::string(buffer);\n    }\n\n    bool shouldShowDuration( IConfig const& config, double duration ) {\n        if ( config.showDurations() == ShowDurations::Always ) {\n            return true;\n        }\n        if ( config.showDurations() == ShowDurations::Never ) {\n            return false;\n        }\n        const double min = config.minDuration();\n        return min >= 0 && duration >= min;\n    }\n\n    std::string serializeFilters( std::vector<std::string> const& container ) {\n        ReusableStringStream oss;\n        bool first = true;\n        for (auto&& filter : container)\n        {\n            if (!first)\n                oss << ' ';\n            else\n                first = false;\n\n            oss << filter;\n        }\n        return oss.str();\n    }\n\n    TestEventListenerBase::TestEventListenerBase(ReporterConfig const & _config)\n            :StreamingReporterBase(_config) {}\n\n    std::set<Verbosity> TestEventListenerBase::getSupportedVerbosities() {\n        return { Verbosity::Quiet, Verbosity::Normal, Verbosity::High };\n    }\n\n    void TestEventListenerBase::assertionStarting(AssertionInfo const &) {}\n\n    bool TestEventListenerBase::assertionEnded(AssertionStats const &) {\n        return false;\n    }\n\n} // end namespace Catch\n// end catch_reporter_bases.cpp\n// start catch_reporter_compact.cpp\n\nnamespace {\n\n#ifdef CATCH_PLATFORM_MAC\n    const char* failedString() { return \"FAILED\"; }\n    const char* passedString() { return \"PASSED\"; }\n#else\n    const char* failedString() { return \"failed\"; }\n    const char* passedString() { return \"passed\"; }\n#endif\n\n    // Colour::LightGrey\n    Catch::Colour::Code dimColour() { return Catch::Colour::FileName; }\n\n    std::string bothOrAll( std::size_t count ) {\n        return count == 1 ? std::string() :\n               count == 2 ? \"both \" : \"all \" ;\n    }\n\n} // anon namespace\n\nnamespace Catch {\n    namespace {\n// Colour, message variants:\n// - white: No tests ran.\n// -   red: Failed [both/all] N test cases, failed [both/all] M assertions.\n// - white: Passed [both/all] N test cases (no assertions).\n// -   red: Failed N tests cases, failed M assertions.\n// - green: Passed [both/all] N tests cases with M assertions.\n        void printTotals(std::ostream& out, const Totals& totals) {\n            if (totals.testCases.total() == 0) {\n                out << \"No tests ran.\";\n            } else if (totals.testCases.failed == totals.testCases.total()) {\n                Colour colour(Colour::ResultError);\n                const std::string qualify_assertions_failed =\n                        totals.assertions.failed == totals.assertions.total() ?\n                        bothOrAll(totals.assertions.failed) : std::string();\n                out <<\n                    \"Failed \" << bothOrAll(totals.testCases.failed)\n                    << pluralise(totals.testCases.failed, \"test case\") << \", \"\n                                                                          \"failed \" << qualify_assertions_failed <<\n                    pluralise(totals.assertions.failed, \"assertion\") << '.';\n            } else if (totals.assertions.total() == 0) {\n                out <<\n                    \"Passed \" << bothOrAll(totals.testCases.total())\n                    << pluralise(totals.testCases.total(), \"test case\")\n                    << \" (no assertions).\";\n            } else if (totals.assertions.failed) {\n                Colour colour(Colour::ResultError);\n                out <<\n                    \"Failed \" << pluralise(totals.testCases.failed, \"test case\") << \", \"\n                                                                                    \"failed \" << pluralise(totals.assertions.failed, \"assertion\") << '.';\n            } else {\n                Colour colour(Colour::ResultSuccess);\n                out <<\n                    \"Passed \" << bothOrAll(totals.testCases.passed)\n                    << pluralise(totals.testCases.passed, \"test case\") <<\n                    \" with \" << pluralise(totals.assertions.passed, \"assertion\") << '.';\n            }\n        }\n\n// Implementation of CompactReporter formatting\n        class AssertionPrinter {\n        public:\n            AssertionPrinter& operator= (AssertionPrinter const&) = delete;\n            AssertionPrinter(AssertionPrinter const&) = delete;\n            AssertionPrinter(std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages)\n                    : stream(_stream)\n                    , result(_stats.assertionResult)\n                    , messages(_stats.infoMessages)\n                    , itMessage(_stats.infoMessages.begin())\n                    , printInfoMessages(_printInfoMessages) {}\n\n            void print() {\n                printSourceInfo();\n\n                itMessage = messages.begin();\n\n                switch (result.getResultType()) {\n                    case ResultWas::Ok:\n                        printResultType(Colour::ResultSuccess, passedString());\n                        printOriginalExpression();\n                        printReconstructedExpression();\n                        if (!result.hasExpression())\n                            printRemainingMessages(Colour::None);\n                        else\n                            printRemainingMessages();\n                        break;\n                    case ResultWas::ExpressionFailed:\n                        if (result.isOk())\n                            printResultType(Colour::ResultSuccess, failedString() + std::string(\" - but was ok\"));\n                        else\n                            printResultType(Colour::Error, failedString());\n                        printOriginalExpression();\n                        printReconstructedExpression();\n                        printRemainingMessages();\n                        break;\n                    case ResultWas::ThrewException:\n                        printResultType(Colour::Error, failedString());\n                        printIssue(\"unexpected exception with message:\");\n                        printMessage();\n                        printExpressionWas();\n                        printRemainingMessages();\n                        break;\n                    case ResultWas::FatalErrorCondition:\n                        printResultType(Colour::Error, failedString());\n                        printIssue(\"fatal error condition with message:\");\n                        printMessage();\n                        printExpressionWas();\n                        printRemainingMessages();\n                        break;\n                    case ResultWas::DidntThrowException:\n                        printResultType(Colour::Error, failedString());\n                        printIssue(\"expected exception, got none\");\n                        printExpressionWas();\n                        printRemainingMessages();\n                        break;\n                    case ResultWas::Info:\n                        printResultType(Colour::None, \"info\");\n                        printMessage();\n                        printRemainingMessages();\n                        break;\n                    case ResultWas::Warning:\n                        printResultType(Colour::None, \"warning\");\n                        printMessage();\n                        printRemainingMessages();\n                        break;\n                    case ResultWas::ExplicitFailure:\n                        printResultType(Colour::Error, failedString());\n                        printIssue(\"explicitly\");\n                        printRemainingMessages(Colour::None);\n                        break;\n                        // These cases are here to prevent compiler warnings\n                    case ResultWas::Unknown:\n                    case ResultWas::FailureBit:\n                    case ResultWas::Exception:\n                        printResultType(Colour::Error, \"** internal error **\");\n                        break;\n                }\n            }\n\n        private:\n            void printSourceInfo() const {\n                Colour colourGuard(Colour::FileName);\n                stream << result.getSourceInfo() << ':';\n            }\n\n            void printResultType(Colour::Code colour, std::string const& passOrFail) const {\n                if (!passOrFail.empty()) {\n                    {\n                        Colour colourGuard(colour);\n                        stream << ' ' << passOrFail;\n                    }\n                    stream << ':';\n                }\n            }\n\n            void printIssue(std::string const& issue) const {\n                stream << ' ' << issue;\n            }\n\n            void printExpressionWas() {\n                if (result.hasExpression()) {\n                    stream << ';';\n                    {\n                        Colour colour(dimColour());\n                        stream << \" expression was:\";\n                    }\n                    printOriginalExpression();\n                }\n            }\n\n            void printOriginalExpression() const {\n                if (result.hasExpression()) {\n                    stream << ' ' << result.getExpression();\n                }\n            }\n\n            void printReconstructedExpression() const {\n                if (result.hasExpandedExpression()) {\n                    {\n                        Colour colour(dimColour());\n                        stream << \" for: \";\n                    }\n                    stream << result.getExpandedExpression();\n                }\n            }\n\n            void printMessage() {\n                if (itMessage != messages.end()) {\n                    stream << \" '\" << itMessage->message << '\\'';\n                    ++itMessage;\n                }\n            }\n\n            void printRemainingMessages(Colour::Code colour = dimColour()) {\n                if (itMessage == messages.end())\n                    return;\n\n                const auto itEnd = messages.cend();\n                const auto N = static_cast<std::size_t>(std::distance(itMessage, itEnd));\n\n                {\n                    Colour colourGuard(colour);\n                    stream << \" with \" << pluralise(N, \"message\") << ':';\n                }\n\n                while (itMessage != itEnd) {\n                    // If this assertion is a warning ignore any INFO messages\n                    if (printInfoMessages || itMessage->type != ResultWas::Info) {\n                        printMessage();\n                        if (itMessage != itEnd) {\n                            Colour colourGuard(dimColour());\n                            stream << \" and\";\n                        }\n                        continue;\n                    }\n                    ++itMessage;\n                }\n            }\n\n        private:\n            std::ostream& stream;\n            AssertionResult const& result;\n            std::vector<MessageInfo> messages;\n            std::vector<MessageInfo>::const_iterator itMessage;\n            bool printInfoMessages;\n        };\n\n    } // anon namespace\n\n    std::string CompactReporter::getDescription() {\n        return \"Reports test results on a single line, suitable for IDEs\";\n    }\n\n    void CompactReporter::noMatchingTestCases( std::string const& spec ) {\n        stream << \"No test cases matched '\" << spec << '\\'' << std::endl;\n    }\n\n    void CompactReporter::assertionStarting( AssertionInfo const& ) {}\n\n    bool CompactReporter::assertionEnded( AssertionStats const& _assertionStats ) {\n        AssertionResult const& result = _assertionStats.assertionResult;\n\n        bool printInfoMessages = true;\n\n        // Drop out if result was successful and we're not printing those\n        if( !m_config->includeSuccessfulResults() && result.isOk() ) {\n            if( result.getResultType() != ResultWas::Warning )\n                return false;\n            printInfoMessages = false;\n        }\n\n        AssertionPrinter printer( stream, _assertionStats, printInfoMessages );\n        printer.print();\n\n        stream << std::endl;\n        return true;\n    }\n\n    void CompactReporter::sectionEnded(SectionStats const& _sectionStats) {\n        double dur = _sectionStats.durationInSeconds;\n        if ( shouldShowDuration( *m_config, dur ) ) {\n            stream << getFormattedDuration( dur ) << \" s: \" << _sectionStats.sectionInfo.name << std::endl;\n        }\n    }\n\n    void CompactReporter::testRunEnded( TestRunStats const& _testRunStats ) {\n        printTotals( stream, _testRunStats.totals );\n        stream << '\\n' << std::endl;\n        StreamingReporterBase::testRunEnded( _testRunStats );\n    }\n\n    CompactReporter::~CompactReporter() {}\n\n    CATCH_REGISTER_REPORTER( \"compact\", CompactReporter )\n\n} // end namespace Catch\n// end catch_reporter_compact.cpp\n// start catch_reporter_console.cpp\n\n#include <cfloat>\n#include <cstdio>\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch\n // Note that 4062 (not all labels are handled and default is missing) is enabled\n#endif\n\n#if defined(__clang__)\n#  pragma clang diagnostic push\n// For simplicity, benchmarking-only helpers are always enabled\n#  pragma clang diagnostic ignored \"-Wunused-function\"\n#endif\n\nnamespace Catch {\n\n    namespace {\n\n// Formatter impl for ConsoleReporter\n        class ConsoleAssertionPrinter {\n        public:\n            ConsoleAssertionPrinter& operator= (ConsoleAssertionPrinter const&) = delete;\n            ConsoleAssertionPrinter(ConsoleAssertionPrinter const&) = delete;\n            ConsoleAssertionPrinter(std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages)\n                    : stream(_stream),\n                      stats(_stats),\n                      result(_stats.assertionResult),\n                      colour(Colour::None),\n                      message(result.getMessage()),\n                      messages(_stats.infoMessages),\n                      printInfoMessages(_printInfoMessages) {\n                switch (result.getResultType()) {\n                    case ResultWas::Ok:\n                        colour = Colour::Success;\n                        passOrFail = \"PASSED\";\n                        //if( result.hasMessage() )\n                        if (_stats.infoMessages.size() == 1)\n                            messageLabel = \"with message\";\n                        if (_stats.infoMessages.size() > 1)\n                            messageLabel = \"with messages\";\n                        break;\n                    case ResultWas::ExpressionFailed:\n                        if (result.isOk()) {\n                            colour = Colour::Success;\n                            passOrFail = \"FAILED - but was ok\";\n                        } else {\n                            colour = Colour::Error;\n                            passOrFail = \"FAILED\";\n                        }\n                        if (_stats.infoMessages.size() == 1)\n                            messageLabel = \"with message\";\n                        if (_stats.infoMessages.size() > 1)\n                            messageLabel = \"with messages\";\n                        break;\n                    case ResultWas::ThrewException:\n                        colour = Colour::Error;\n                        passOrFail = \"FAILED\";\n                        messageLabel = \"due to unexpected exception with \";\n                        if (_stats.infoMessages.size() == 1)\n                            messageLabel += \"message\";\n                        if (_stats.infoMessages.size() > 1)\n                            messageLabel += \"messages\";\n                        break;\n                    case ResultWas::FatalErrorCondition:\n                        colour = Colour::Error;\n                        passOrFail = \"FAILED\";\n                        messageLabel = \"due to a fatal error condition\";\n                        break;\n                    case ResultWas::DidntThrowException:\n                        colour = Colour::Error;\n                        passOrFail = \"FAILED\";\n                        messageLabel = \"because no exception was thrown where one was expected\";\n                        break;\n                    case ResultWas::Info:\n                        messageLabel = \"info\";\n                        break;\n                    case ResultWas::Warning:\n                        messageLabel = \"warning\";\n                        break;\n                    case ResultWas::ExplicitFailure:\n                        passOrFail = \"FAILED\";\n                        colour = Colour::Error;\n                        if (_stats.infoMessages.size() == 1)\n                            messageLabel = \"explicitly with message\";\n                        if (_stats.infoMessages.size() > 1)\n                            messageLabel = \"explicitly with messages\";\n                        break;\n                        // These cases are here to prevent compiler warnings\n                    case ResultWas::Unknown:\n                    case ResultWas::FailureBit:\n                    case ResultWas::Exception:\n                        passOrFail = \"** internal error **\";\n                        colour = Colour::Error;\n                        break;\n                }\n            }\n\n            void print() const {\n                printSourceInfo();\n                if (stats.totals.assertions.total() > 0) {\n                    printResultType();\n                    printOriginalExpression();\n                    printReconstructedExpression();\n                } else {\n                    stream << '\\n';\n                }\n                printMessage();\n            }\n\n        private:\n            void printResultType() const {\n                if (!passOrFail.empty()) {\n                    Colour colourGuard(colour);\n                    stream << passOrFail << \":\\n\";\n                }\n            }\n            void printOriginalExpression() const {\n                if (result.hasExpression()) {\n                    Colour colourGuard(Colour::OriginalExpression);\n                    stream << \"  \";\n                    stream << result.getExpressionInMacro();\n                    stream << '\\n';\n                }\n            }\n            void printReconstructedExpression() const {\n                if (result.hasExpandedExpression()) {\n                    stream << \"with expansion:\\n\";\n                    Colour colourGuard(Colour::ReconstructedExpression);\n                    stream << Column(result.getExpandedExpression()).indent(2) << '\\n';\n                }\n            }\n            void printMessage() const {\n                if (!messageLabel.empty())\n                    stream << messageLabel << ':' << '\\n';\n                for (auto const& msg : messages) {\n                    // If this assertion is a warning ignore any INFO messages\n                    if (printInfoMessages || msg.type != ResultWas::Info)\n                        stream << Column(msg.message).indent(2) << '\\n';\n                }\n            }\n            void printSourceInfo() const {\n                Colour colourGuard(Colour::FileName);\n                stream << result.getSourceInfo() << \": \";\n            }\n\n            std::ostream& stream;\n            AssertionStats const& stats;\n            AssertionResult const& result;\n            Colour::Code colour;\n            std::string passOrFail;\n            std::string messageLabel;\n            std::string message;\n            std::vector<MessageInfo> messages;\n            bool printInfoMessages;\n        };\n\n        std::size_t makeRatio(std::size_t number, std::size_t total) {\n            std::size_t ratio = total > 0 ? CATCH_CONFIG_CONSOLE_WIDTH * number / total : 0;\n            return (ratio == 0 && number > 0) ? 1 : ratio;\n        }\n\n        std::size_t& findMax(std::size_t& i, std::size_t& j, std::size_t& k) {\n            if (i > j && i > k)\n                return i;\n            else if (j > k)\n                return j;\n            else\n                return k;\n        }\n\n        struct ColumnInfo {\n            enum Justification { Left, Right };\n            std::string name;\n            int width;\n            Justification justification;\n        };\n        struct ColumnBreak {};\n        struct RowBreak {};\n\n        class Duration {\n            enum class Unit {\n                Auto,\n                Nanoseconds,\n                Microseconds,\n                Milliseconds,\n                Seconds,\n                Minutes\n            };\n            static const uint64_t s_nanosecondsInAMicrosecond = 1000;\n            static const uint64_t s_nanosecondsInAMillisecond = 1000 * s_nanosecondsInAMicrosecond;\n            static const uint64_t s_nanosecondsInASecond = 1000 * s_nanosecondsInAMillisecond;\n            static const uint64_t s_nanosecondsInAMinute = 60 * s_nanosecondsInASecond;\n\n            double m_inNanoseconds;\n            Unit m_units;\n\n        public:\n            explicit Duration(double inNanoseconds, Unit units = Unit::Auto)\n                    : m_inNanoseconds(inNanoseconds),\n                      m_units(units) {\n                if (m_units == Unit::Auto) {\n                    if (m_inNanoseconds < s_nanosecondsInAMicrosecond)\n                        m_units = Unit::Nanoseconds;\n                    else if (m_inNanoseconds < s_nanosecondsInAMillisecond)\n                        m_units = Unit::Microseconds;\n                    else if (m_inNanoseconds < s_nanosecondsInASecond)\n                        m_units = Unit::Milliseconds;\n                    else if (m_inNanoseconds < s_nanosecondsInAMinute)\n                        m_units = Unit::Seconds;\n                    else\n                        m_units = Unit::Minutes;\n                }\n\n            }\n\n            auto value() const -> double {\n                switch (m_units) {\n                    case Unit::Microseconds:\n                        return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMicrosecond);\n                    case Unit::Milliseconds:\n                        return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMillisecond);\n                    case Unit::Seconds:\n                        return m_inNanoseconds / static_cast<double>(s_nanosecondsInASecond);\n                    case Unit::Minutes:\n                        return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMinute);\n                    default:\n                        return m_inNanoseconds;\n                }\n            }\n            auto unitsAsString() const -> std::string {\n                switch (m_units) {\n                    case Unit::Nanoseconds:\n                        return \"ns\";\n                    case Unit::Microseconds:\n                        return \"us\";\n                    case Unit::Milliseconds:\n                        return \"ms\";\n                    case Unit::Seconds:\n                        return \"s\";\n                    case Unit::Minutes:\n                        return \"m\";\n                    default:\n                        return \"** internal error **\";\n                }\n\n            }\n            friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {\n                return os << duration.value() << ' ' << duration.unitsAsString();\n            }\n        };\n    } // end anon namespace\n\n    class TablePrinter {\n        std::ostream& m_os;\n        std::vector<ColumnInfo> m_columnInfos;\n        std::ostringstream m_oss;\n        int m_currentColumn = -1;\n        bool m_isOpen = false;\n\n    public:\n        TablePrinter( std::ostream& os, std::vector<ColumnInfo> columnInfos )\n                :   m_os( os ),\n                    m_columnInfos( std::move( columnInfos ) ) {}\n\n        auto columnInfos() const -> std::vector<ColumnInfo> const& {\n            return m_columnInfos;\n        }\n\n        void open() {\n            if (!m_isOpen) {\n                m_isOpen = true;\n                *this << RowBreak();\n\n                Columns headerCols;\n                Spacer spacer(2);\n                for (auto const& info : m_columnInfos) {\n                    headerCols += Column(info.name).width(static_cast<std::size_t>(info.width - 2));\n                    headerCols += spacer;\n                }\n                m_os << headerCols << '\\n';\n\n                m_os << Catch::getLineOfChars<'-'>() << '\\n';\n            }\n        }\n        void close() {\n            if (m_isOpen) {\n                *this << RowBreak();\n                m_os << std::endl;\n                m_isOpen = false;\n            }\n        }\n\n        template<typename T>\n        friend TablePrinter& operator << (TablePrinter& tp, T const& value) {\n            tp.m_oss << value;\n            return tp;\n        }\n\n        friend TablePrinter& operator << (TablePrinter& tp, ColumnBreak) {\n            auto colStr = tp.m_oss.str();\n            const auto strSize = colStr.size();\n            tp.m_oss.str(\"\");\n            tp.open();\n            if (tp.m_currentColumn == static_cast<int>(tp.m_columnInfos.size() - 1)) {\n                tp.m_currentColumn = -1;\n                tp.m_os << '\\n';\n            }\n            tp.m_currentColumn++;\n\n            auto colInfo = tp.m_columnInfos[tp.m_currentColumn];\n            auto padding = (strSize + 1 < static_cast<std::size_t>(colInfo.width))\n                           ? std::string(colInfo.width - (strSize + 1), ' ')\n                           : std::string();\n            if (colInfo.justification == ColumnInfo::Left)\n                tp.m_os << colStr << padding << ' ';\n            else\n                tp.m_os << padding << colStr << ' ';\n            return tp;\n        }\n\n        friend TablePrinter& operator << (TablePrinter& tp, RowBreak) {\n            if (tp.m_currentColumn > 0) {\n                tp.m_os << '\\n';\n                tp.m_currentColumn = -1;\n            }\n            return tp;\n        }\n    };\n\n    ConsoleReporter::ConsoleReporter(ReporterConfig const& config)\n            : StreamingReporterBase(config),\n              m_tablePrinter(new TablePrinter(config.stream(),\n                                              [&config]() -> std::vector<ColumnInfo> {\n                                                  if (config.fullConfig()->benchmarkNoAnalysis())\n                                                  {\n                                                      return{\n                                                              { \"benchmark name\", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left },\n                                                              { \"     samples\", 14, ColumnInfo::Right },\n                                                              { \"  iterations\", 14, ColumnInfo::Right },\n                                                              { \"        mean\", 14, ColumnInfo::Right }\n                                                      };\n                                                  }\n                                                  else\n                                                  {\n                                                      return{\n                                                              { \"benchmark name\", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left },\n                                                              { \"samples      mean       std dev\", 14, ColumnInfo::Right },\n                                                              { \"iterations   low mean   low std dev\", 14, ColumnInfo::Right },\n                                                              { \"estimated    high mean  high std dev\", 14, ColumnInfo::Right }\n                                                      };\n                                                  }\n                                              }())) {}\n    ConsoleReporter::~ConsoleReporter() = default;\n\n    std::string ConsoleReporter::getDescription() {\n        return \"Reports test results as plain lines of text\";\n    }\n\n    void ConsoleReporter::noMatchingTestCases(std::string const& spec) {\n        stream << \"No test cases matched '\" << spec << '\\'' << std::endl;\n    }\n\n    void ConsoleReporter::reportInvalidArguments(std::string const&arg){\n        stream << \"Invalid Filter: \" << arg << std::endl;\n    }\n\n    void ConsoleReporter::assertionStarting(AssertionInfo const&) {}\n\n    bool ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) {\n        AssertionResult const& result = _assertionStats.assertionResult;\n\n        bool includeResults = m_config->includeSuccessfulResults() || !result.isOk();\n\n        // Drop out if result was successful but we're not printing them.\n        if (!includeResults && result.getResultType() != ResultWas::Warning)\n            return false;\n\n        lazyPrint();\n\n        ConsoleAssertionPrinter printer(stream, _assertionStats, includeResults);\n        printer.print();\n        stream << std::endl;\n        return true;\n    }\n\n    void ConsoleReporter::sectionStarting(SectionInfo const& _sectionInfo) {\n        m_tablePrinter->close();\n        m_headerPrinted = false;\n        StreamingReporterBase::sectionStarting(_sectionInfo);\n    }\n    void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) {\n        m_tablePrinter->close();\n        if (_sectionStats.missingAssertions) {\n            lazyPrint();\n            Colour colour(Colour::ResultError);\n            if (m_sectionStack.size() > 1)\n                stream << \"\\nNo assertions in section\";\n            else\n                stream << \"\\nNo assertions in test case\";\n            stream << \" '\" << _sectionStats.sectionInfo.name << \"'\\n\" << std::endl;\n        }\n        double dur = _sectionStats.durationInSeconds;\n        if (shouldShowDuration(*m_config, dur)) {\n            stream << getFormattedDuration(dur) << \" s: \" << _sectionStats.sectionInfo.name << std::endl;\n        }\n        if (m_headerPrinted) {\n            m_headerPrinted = false;\n        }\n        StreamingReporterBase::sectionEnded(_sectionStats);\n    }\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    void ConsoleReporter::benchmarkPreparing(std::string const& name) {\n\tlazyPrintWithoutClosingBenchmarkTable();\n\n\tauto nameCol = Column(name).width(static_cast<std::size_t>(m_tablePrinter->columnInfos()[0].width - 2));\n\n\tbool firstLine = true;\n\tfor (auto line : nameCol) {\n\t\tif (!firstLine)\n\t\t\t(*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak();\n\t\telse\n\t\t\tfirstLine = false;\n\n\t\t(*m_tablePrinter) << line << ColumnBreak();\n\t}\n}\n\nvoid ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) {\n    (*m_tablePrinter) << info.samples << ColumnBreak()\n        << info.iterations << ColumnBreak();\n    if (!m_config->benchmarkNoAnalysis())\n        (*m_tablePrinter) << Duration(info.estimatedDuration) << ColumnBreak();\n}\nvoid ConsoleReporter::benchmarkEnded(BenchmarkStats<> const& stats) {\n    if (m_config->benchmarkNoAnalysis())\n    {\n        (*m_tablePrinter) << Duration(stats.mean.point.count()) << ColumnBreak();\n    }\n    else\n    {\n        (*m_tablePrinter) << ColumnBreak()\n            << Duration(stats.mean.point.count()) << ColumnBreak()\n            << Duration(stats.mean.lower_bound.count()) << ColumnBreak()\n            << Duration(stats.mean.upper_bound.count()) << ColumnBreak() << ColumnBreak()\n            << Duration(stats.standardDeviation.point.count()) << ColumnBreak()\n            << Duration(stats.standardDeviation.lower_bound.count()) << ColumnBreak()\n            << Duration(stats.standardDeviation.upper_bound.count()) << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak();\n    }\n}\n\nvoid ConsoleReporter::benchmarkFailed(std::string const& error) {\n\tColour colour(Colour::Red);\n    (*m_tablePrinter)\n        << \"Benchmark failed (\" << error << ')'\n        << ColumnBreak() << RowBreak();\n}\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    void ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) {\n        m_tablePrinter->close();\n        StreamingReporterBase::testCaseEnded(_testCaseStats);\n        m_headerPrinted = false;\n    }\n    void ConsoleReporter::testGroupEnded(TestGroupStats const& _testGroupStats) {\n        if (currentGroupInfo.used) {\n            printSummaryDivider();\n            stream << \"Summary for group '\" << _testGroupStats.groupInfo.name << \"':\\n\";\n            printTotals(_testGroupStats.totals);\n            stream << '\\n' << std::endl;\n        }\n        StreamingReporterBase::testGroupEnded(_testGroupStats);\n    }\n    void ConsoleReporter::testRunEnded(TestRunStats const& _testRunStats) {\n        printTotalsDivider(_testRunStats.totals);\n        printTotals(_testRunStats.totals);\n        stream << std::endl;\n        StreamingReporterBase::testRunEnded(_testRunStats);\n    }\n    void ConsoleReporter::testRunStarting(TestRunInfo const& _testInfo) {\n        StreamingReporterBase::testRunStarting(_testInfo);\n        printTestFilters();\n    }\n\n    void ConsoleReporter::lazyPrint() {\n\n        m_tablePrinter->close();\n        lazyPrintWithoutClosingBenchmarkTable();\n    }\n\n    void ConsoleReporter::lazyPrintWithoutClosingBenchmarkTable() {\n\n        if (!currentTestRunInfo.used)\n            lazyPrintRunInfo();\n        if (!currentGroupInfo.used)\n            lazyPrintGroupInfo();\n\n        if (!m_headerPrinted) {\n            printTestCaseAndSectionHeader();\n            m_headerPrinted = true;\n        }\n    }\n    void ConsoleReporter::lazyPrintRunInfo() {\n        stream << '\\n' << getLineOfChars<'~'>() << '\\n';\n        Colour colour(Colour::SecondaryText);\n        stream << currentTestRunInfo->name\n               << \" is a Catch v\" << libraryVersion() << \" host application.\\n\"\n               << \"Run with -? for options\\n\\n\";\n\n        if (m_config->rngSeed() != 0)\n            stream << \"Randomness seeded to: \" << m_config->rngSeed() << \"\\n\\n\";\n\n        currentTestRunInfo.used = true;\n    }\n    void ConsoleReporter::lazyPrintGroupInfo() {\n        if (!currentGroupInfo->name.empty() && currentGroupInfo->groupsCounts > 1) {\n            printClosedHeader(\"Group: \" + currentGroupInfo->name);\n            currentGroupInfo.used = true;\n        }\n    }\n    void ConsoleReporter::printTestCaseAndSectionHeader() {\n        assert(!m_sectionStack.empty());\n        printOpenHeader(currentTestCaseInfo->name);\n\n        if (m_sectionStack.size() > 1) {\n            Colour colourGuard(Colour::Headers);\n\n            auto\n                    it = m_sectionStack.begin() + 1, // Skip first section (test case)\n            itEnd = m_sectionStack.end();\n            for (; it != itEnd; ++it)\n                printHeaderString(it->name, 2);\n        }\n\n        SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;\n\n        stream << getLineOfChars<'-'>() << '\\n';\n        Colour colourGuard(Colour::FileName);\n        stream << lineInfo << '\\n';\n        stream << getLineOfChars<'.'>() << '\\n' << std::endl;\n    }\n\n    void ConsoleReporter::printClosedHeader(std::string const& _name) {\n        printOpenHeader(_name);\n        stream << getLineOfChars<'.'>() << '\\n';\n    }\n    void ConsoleReporter::printOpenHeader(std::string const& _name) {\n        stream << getLineOfChars<'-'>() << '\\n';\n        {\n            Colour colourGuard(Colour::Headers);\n            printHeaderString(_name);\n        }\n    }\n\n// if string has a : in first line will set indent to follow it on\n// subsequent lines\n    void ConsoleReporter::printHeaderString(std::string const& _string, std::size_t indent) {\n        std::size_t i = _string.find(\": \");\n        if (i != std::string::npos)\n            i += 2;\n        else\n            i = 0;\n        stream << Column(_string).indent(indent + i).initialIndent(indent) << '\\n';\n    }\n\n    struct SummaryColumn {\n\n        SummaryColumn( std::string _label, Colour::Code _colour )\n                :   label( std::move( _label ) ),\n                    colour( _colour ) {}\n        SummaryColumn addRow( std::size_t count ) {\n            ReusableStringStream rss;\n            rss << count;\n            std::string row = rss.str();\n            for (auto& oldRow : rows) {\n                while (oldRow.size() < row.size())\n                    oldRow = ' ' + oldRow;\n                while (oldRow.size() > row.size())\n                    row = ' ' + row;\n            }\n            rows.push_back(row);\n            return *this;\n        }\n\n        std::string label;\n        Colour::Code colour;\n        std::vector<std::string> rows;\n\n    };\n\n    void ConsoleReporter::printTotals( Totals const& totals ) {\n        if (totals.testCases.total() == 0) {\n            stream << Colour(Colour::Warning) << \"No tests ran\\n\";\n        } else if (totals.assertions.total() > 0 && totals.testCases.allPassed()) {\n            stream << Colour(Colour::ResultSuccess) << \"All tests passed\";\n            stream << \" (\"\n                   << pluralise(totals.assertions.passed, \"assertion\") << \" in \"\n                   << pluralise(totals.testCases.passed, \"test case\") << ')'\n                   << '\\n';\n        } else {\n\n            std::vector<SummaryColumn> columns;\n            columns.push_back(SummaryColumn(\"\", Colour::None)\n                                      .addRow(totals.testCases.total())\n                                      .addRow(totals.assertions.total()));\n            columns.push_back(SummaryColumn(\"passed\", Colour::Success)\n                                      .addRow(totals.testCases.passed)\n                                      .addRow(totals.assertions.passed));\n            columns.push_back(SummaryColumn(\"failed\", Colour::ResultError)\n                                      .addRow(totals.testCases.failed)\n                                      .addRow(totals.assertions.failed));\n            columns.push_back(SummaryColumn(\"failed as expected\", Colour::ResultExpectedFailure)\n                                      .addRow(totals.testCases.failedButOk)\n                                      .addRow(totals.assertions.failedButOk));\n\n            printSummaryRow(\"test cases\", columns, 0);\n            printSummaryRow(\"assertions\", columns, 1);\n        }\n    }\n    void ConsoleReporter::printSummaryRow(std::string const& label, std::vector<SummaryColumn> const& cols, std::size_t row) {\n        for (auto col : cols) {\n            std::string value = col.rows[row];\n            if (col.label.empty()) {\n                stream << label << \": \";\n                if (value != \"0\")\n                    stream << value;\n                else\n                    stream << Colour(Colour::Warning) << \"- none -\";\n            } else if (value != \"0\") {\n                stream << Colour(Colour::LightGrey) << \" | \";\n                stream << Colour(col.colour)\n                       << value << ' ' << col.label;\n            }\n        }\n        stream << '\\n';\n    }\n\n    void ConsoleReporter::printTotalsDivider(Totals const& totals) {\n        if (totals.testCases.total() > 0) {\n            std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total());\n            std::size_t failedButOkRatio = makeRatio(totals.testCases.failedButOk, totals.testCases.total());\n            std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total());\n            while (failedRatio + failedButOkRatio + passedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1)\n                findMax(failedRatio, failedButOkRatio, passedRatio)++;\n            while (failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH - 1)\n                findMax(failedRatio, failedButOkRatio, passedRatio)--;\n\n            stream << Colour(Colour::Error) << std::string(failedRatio, '=');\n            stream << Colour(Colour::ResultExpectedFailure) << std::string(failedButOkRatio, '=');\n            if (totals.testCases.allPassed())\n                stream << Colour(Colour::ResultSuccess) << std::string(passedRatio, '=');\n            else\n                stream << Colour(Colour::Success) << std::string(passedRatio, '=');\n        } else {\n            stream << Colour(Colour::Warning) << std::string(CATCH_CONFIG_CONSOLE_WIDTH - 1, '=');\n        }\n        stream << '\\n';\n    }\n    void ConsoleReporter::printSummaryDivider() {\n        stream << getLineOfChars<'-'>() << '\\n';\n    }\n\n    void ConsoleReporter::printTestFilters() {\n        if (m_config->testSpec().hasFilters()) {\n            Colour guard(Colour::BrightYellow);\n            stream << \"Filters: \" << serializeFilters(m_config->getTestsOrTags()) << '\\n';\n        }\n    }\n\n    CATCH_REGISTER_REPORTER(\"console\", ConsoleReporter)\n\n} // end namespace Catch\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n\n#if defined(__clang__)\n#  pragma clang diagnostic pop\n#endif\n// end catch_reporter_console.cpp\n// start catch_reporter_junit.cpp\n\n#include <cassert>\n#include <sstream>\n#include <ctime>\n#include <algorithm>\n#include <iomanip>\n\nnamespace Catch {\n\n    namespace {\n        std::string getCurrentTimestamp() {\n            // Beware, this is not reentrant because of backward compatibility issues\n            // Also, UTC only, again because of backward compatibility (%z is C++11)\n            time_t rawtime;\n            std::time(&rawtime);\n            auto const timeStampSize = sizeof(\"2017-01-16T17:06:45Z\");\n\n#ifdef _MSC_VER\n            std::tm timeInfo = {};\n            gmtime_s(&timeInfo, &rawtime);\n#else\n            std::tm* timeInfo;\n            timeInfo = std::gmtime(&rawtime);\n#endif\n\n            char timeStamp[timeStampSize];\n            const char * const fmt = \"%Y-%m-%dT%H:%M:%SZ\";\n\n#ifdef _MSC_VER\n            std::strftime(timeStamp, timeStampSize, fmt, &timeInfo);\n#else\n            std::strftime(timeStamp, timeStampSize, fmt, timeInfo);\n#endif\n            return std::string(timeStamp, timeStampSize-1);\n        }\n\n        std::string fileNameTag(const std::vector<std::string> &tags) {\n            auto it = std::find_if(begin(tags),\n                                   end(tags),\n                                   [] (std::string const& tag) {return tag.front() == '#'; });\n            if (it != tags.end())\n                return it->substr(1);\n            return std::string();\n        }\n\n        // Formats the duration in seconds to 3 decimal places.\n        // This is done because some genius defined Maven Surefire schema\n        // in a way that only accepts 3 decimal places, and tools like\n        // Jenkins use that schema for validation JUnit reporter output.\n        std::string formatDuration( double seconds ) {\n            ReusableStringStream rss;\n            rss << std::fixed << std::setprecision( 3 ) << seconds;\n            return rss.str();\n        }\n\n    } // anonymous namespace\n\n    JunitReporter::JunitReporter( ReporterConfig const& _config )\n            :   CumulativeReporterBase( _config ),\n                xml( _config.stream() )\n    {\n        m_reporterPrefs.shouldRedirectStdOut = true;\n        m_reporterPrefs.shouldReportAllAssertions = true;\n    }\n\n    JunitReporter::~JunitReporter() {}\n\n    std::string JunitReporter::getDescription() {\n        return \"Reports test results in an XML format that looks like Ant's junitreport target\";\n    }\n\n    void JunitReporter::noMatchingTestCases( std::string const& /*spec*/ ) {}\n\n    void JunitReporter::testRunStarting( TestRunInfo const& runInfo )  {\n        CumulativeReporterBase::testRunStarting( runInfo );\n        xml.startElement( \"testsuites\" );\n    }\n\n    void JunitReporter::testGroupStarting( GroupInfo const& groupInfo ) {\n        suiteTimer.start();\n        stdOutForSuite.clear();\n        stdErrForSuite.clear();\n        unexpectedExceptions = 0;\n        CumulativeReporterBase::testGroupStarting( groupInfo );\n    }\n\n    void JunitReporter::testCaseStarting( TestCaseInfo const& testCaseInfo ) {\n        m_okToFail = testCaseInfo.okToFail();\n    }\n\n    bool JunitReporter::assertionEnded( AssertionStats const& assertionStats ) {\n        if( assertionStats.assertionResult.getResultType() == ResultWas::ThrewException && !m_okToFail )\n            unexpectedExceptions++;\n        return CumulativeReporterBase::assertionEnded( assertionStats );\n    }\n\n    void JunitReporter::testCaseEnded( TestCaseStats const& testCaseStats ) {\n        stdOutForSuite += testCaseStats.stdOut;\n        stdErrForSuite += testCaseStats.stdErr;\n        CumulativeReporterBase::testCaseEnded( testCaseStats );\n    }\n\n    void JunitReporter::testGroupEnded( TestGroupStats const& testGroupStats ) {\n        double suiteTime = suiteTimer.getElapsedSeconds();\n        CumulativeReporterBase::testGroupEnded( testGroupStats );\n        writeGroup( *m_testGroups.back(), suiteTime );\n    }\n\n    void JunitReporter::testRunEndedCumulative() {\n        xml.endElement();\n    }\n\n    void JunitReporter::writeGroup( TestGroupNode const& groupNode, double suiteTime ) {\n        XmlWriter::ScopedElement e = xml.scopedElement( \"testsuite\" );\n\n        TestGroupStats const& stats = groupNode.value;\n        xml.writeAttribute( \"name\", stats.groupInfo.name );\n        xml.writeAttribute( \"errors\", unexpectedExceptions );\n        xml.writeAttribute( \"failures\", stats.totals.assertions.failed-unexpectedExceptions );\n        xml.writeAttribute( \"tests\", stats.totals.assertions.total() );\n        xml.writeAttribute( \"hostname\", \"tbd\" ); // !TBD\n        if( m_config->showDurations() == ShowDurations::Never )\n            xml.writeAttribute( \"time\", \"\" );\n        else\n            xml.writeAttribute( \"time\", formatDuration( suiteTime ) );\n        xml.writeAttribute( \"timestamp\", getCurrentTimestamp() );\n\n        // Write properties if there are any\n        if (m_config->hasTestFilters() || m_config->rngSeed() != 0) {\n            auto properties = xml.scopedElement(\"properties\");\n            if (m_config->hasTestFilters()) {\n                xml.scopedElement(\"property\")\n                        .writeAttribute(\"name\", \"filters\")\n                        .writeAttribute(\"value\", serializeFilters(m_config->getTestsOrTags()));\n            }\n            if (m_config->rngSeed() != 0) {\n                xml.scopedElement(\"property\")\n                        .writeAttribute(\"name\", \"random-seed\")\n                        .writeAttribute(\"value\", m_config->rngSeed());\n            }\n        }\n\n        // Write test cases\n        for( auto const& child : groupNode.children )\n            writeTestCase( *child );\n\n        xml.scopedElement( \"system-out\" ).writeText( trim( stdOutForSuite ), XmlFormatting::Newline );\n        xml.scopedElement( \"system-err\" ).writeText( trim( stdErrForSuite ), XmlFormatting::Newline );\n    }\n\n    void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) {\n        TestCaseStats const& stats = testCaseNode.value;\n\n        // All test cases have exactly one section - which represents the\n        // test case itself. That section may have 0-n nested sections\n        assert( testCaseNode.children.size() == 1 );\n        SectionNode const& rootSection = *testCaseNode.children.front();\n\n        std::string className = stats.testInfo.className;\n\n        if( className.empty() ) {\n            className = fileNameTag(stats.testInfo.tags);\n            if ( className.empty() )\n                className = \"global\";\n        }\n\n        if ( !m_config->name().empty() )\n            className = m_config->name() + \".\" + className;\n\n        writeSection( className, \"\", rootSection, stats.testInfo.okToFail() );\n    }\n\n    void JunitReporter::writeSection( std::string const& className,\n                                      std::string const& rootName,\n                                      SectionNode const& sectionNode,\n                                      bool testOkToFail) {\n        std::string name = trim( sectionNode.stats.sectionInfo.name );\n        if( !rootName.empty() )\n            name = rootName + '/' + name;\n\n        if( !sectionNode.assertions.empty() ||\n            !sectionNode.stdOut.empty() ||\n            !sectionNode.stdErr.empty() ) {\n            XmlWriter::ScopedElement e = xml.scopedElement( \"testcase\" );\n            if( className.empty() ) {\n                xml.writeAttribute( \"classname\", name );\n                xml.writeAttribute( \"name\", \"root\" );\n            }\n            else {\n                xml.writeAttribute( \"classname\", className );\n                xml.writeAttribute( \"name\", name );\n            }\n            xml.writeAttribute( \"time\", formatDuration( sectionNode.stats.durationInSeconds ) );\n            // This is not ideal, but it should be enough to mimic gtest's\n            // junit output.\n            // Ideally the JUnit reporter would also handle `skipTest`\n            // events and write those out appropriately.\n            xml.writeAttribute( \"status\", \"run\" );\n\n            if (sectionNode.stats.assertions.failedButOk) {\n                xml.scopedElement(\"skipped\")\n                        .writeAttribute(\"message\", \"TEST_CASE tagged with !mayfail\");\n            }\n\n            writeAssertions( sectionNode );\n\n            if( !sectionNode.stdOut.empty() )\n                xml.scopedElement( \"system-out\" ).writeText( trim( sectionNode.stdOut ), XmlFormatting::Newline );\n            if( !sectionNode.stdErr.empty() )\n                xml.scopedElement( \"system-err\" ).writeText( trim( sectionNode.stdErr ), XmlFormatting::Newline );\n        }\n        for( auto const& childNode : sectionNode.childSections )\n            if( className.empty() )\n                writeSection( name, \"\", *childNode, testOkToFail );\n            else\n                writeSection( className, name, *childNode, testOkToFail );\n    }\n\n    void JunitReporter::writeAssertions( SectionNode const& sectionNode ) {\n        for( auto const& assertion : sectionNode.assertions )\n            writeAssertion( assertion );\n    }\n\n    void JunitReporter::writeAssertion( AssertionStats const& stats ) {\n        AssertionResult const& result = stats.assertionResult;\n        if( !result.isOk() ) {\n            std::string elementName;\n            switch( result.getResultType() ) {\n                case ResultWas::ThrewException:\n                case ResultWas::FatalErrorCondition:\n                    elementName = \"error\";\n                    break;\n                case ResultWas::ExplicitFailure:\n                case ResultWas::ExpressionFailed:\n                case ResultWas::DidntThrowException:\n                    elementName = \"failure\";\n                    break;\n\n                    // We should never see these here:\n                case ResultWas::Info:\n                case ResultWas::Warning:\n                case ResultWas::Ok:\n                case ResultWas::Unknown:\n                case ResultWas::FailureBit:\n                case ResultWas::Exception:\n                    elementName = \"internalError\";\n                    break;\n            }\n\n            XmlWriter::ScopedElement e = xml.scopedElement( elementName );\n\n            xml.writeAttribute( \"message\", result.getExpression() );\n            xml.writeAttribute( \"type\", result.getTestMacroName() );\n\n            ReusableStringStream rss;\n            if (stats.totals.assertions.total() > 0) {\n                rss << \"FAILED\" << \":\\n\";\n                if (result.hasExpression()) {\n                    rss << \"  \";\n                    rss << result.getExpressionInMacro();\n                    rss << '\\n';\n                }\n                if (result.hasExpandedExpression()) {\n                    rss << \"with expansion:\\n\";\n                    rss << Column(result.getExpandedExpression()).indent(2) << '\\n';\n                }\n            } else {\n                rss << '\\n';\n            }\n\n            if( !result.getMessage().empty() )\n                rss << result.getMessage() << '\\n';\n            for( auto const& msg : stats.infoMessages )\n                if( msg.type == ResultWas::Info )\n                    rss << msg.message << '\\n';\n\n            rss << \"at \" << result.getSourceInfo();\n            xml.writeText( rss.str(), XmlFormatting::Newline );\n        }\n    }\n\n    CATCH_REGISTER_REPORTER( \"junit\", JunitReporter )\n\n} // end namespace Catch\n// end catch_reporter_junit.cpp\n// start catch_reporter_listening.cpp\n\n#include <cassert>\n\nnamespace Catch {\n\n    ListeningReporter::ListeningReporter() {\n        // We will assume that listeners will always want all assertions\n        m_preferences.shouldReportAllAssertions = true;\n    }\n\n    void ListeningReporter::addListener( IStreamingReporterPtr&& listener ) {\n        m_listeners.push_back( std::move( listener ) );\n    }\n\n    void ListeningReporter::addReporter(IStreamingReporterPtr&& reporter) {\n        assert(!m_reporter && \"Listening reporter can wrap only 1 real reporter\");\n        m_reporter = std::move( reporter );\n        m_preferences.shouldRedirectStdOut = m_reporter->getPreferences().shouldRedirectStdOut;\n    }\n\n    ReporterPreferences ListeningReporter::getPreferences() const {\n        return m_preferences;\n    }\n\n    std::set<Verbosity> ListeningReporter::getSupportedVerbosities() {\n        return std::set<Verbosity>{ };\n    }\n\n    void ListeningReporter::noMatchingTestCases( std::string const& spec ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->noMatchingTestCases( spec );\n        }\n        m_reporter->noMatchingTestCases( spec );\n    }\n\n    void ListeningReporter::reportInvalidArguments(std::string const&arg){\n        for ( auto const& listener : m_listeners ) {\n            listener->reportInvalidArguments( arg );\n        }\n        m_reporter->reportInvalidArguments( arg );\n    }\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    void ListeningReporter::benchmarkPreparing( std::string const& name ) {\n\t\tfor (auto const& listener : m_listeners) {\n\t\t\tlistener->benchmarkPreparing(name);\n\t\t}\n\t\tm_reporter->benchmarkPreparing(name);\n\t}\n    void ListeningReporter::benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->benchmarkStarting( benchmarkInfo );\n        }\n        m_reporter->benchmarkStarting( benchmarkInfo );\n    }\n    void ListeningReporter::benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->benchmarkEnded( benchmarkStats );\n        }\n        m_reporter->benchmarkEnded( benchmarkStats );\n    }\n\n\tvoid ListeningReporter::benchmarkFailed( std::string const& error ) {\n\t\tfor (auto const& listener : m_listeners) {\n\t\t\tlistener->benchmarkFailed(error);\n\t\t}\n\t\tm_reporter->benchmarkFailed(error);\n\t}\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    void ListeningReporter::testRunStarting( TestRunInfo const& testRunInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testRunStarting( testRunInfo );\n        }\n        m_reporter->testRunStarting( testRunInfo );\n    }\n\n    void ListeningReporter::testGroupStarting( GroupInfo const& groupInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testGroupStarting( groupInfo );\n        }\n        m_reporter->testGroupStarting( groupInfo );\n    }\n\n    void ListeningReporter::testCaseStarting( TestCaseInfo const& testInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testCaseStarting( testInfo );\n        }\n        m_reporter->testCaseStarting( testInfo );\n    }\n\n    void ListeningReporter::sectionStarting( SectionInfo const& sectionInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->sectionStarting( sectionInfo );\n        }\n        m_reporter->sectionStarting( sectionInfo );\n    }\n\n    void ListeningReporter::assertionStarting( AssertionInfo const& assertionInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->assertionStarting( assertionInfo );\n        }\n        m_reporter->assertionStarting( assertionInfo );\n    }\n\n    // The return value indicates if the messages buffer should be cleared:\n    bool ListeningReporter::assertionEnded( AssertionStats const& assertionStats ) {\n        for( auto const& listener : m_listeners ) {\n            static_cast<void>( listener->assertionEnded( assertionStats ) );\n        }\n        return m_reporter->assertionEnded( assertionStats );\n    }\n\n    void ListeningReporter::sectionEnded( SectionStats const& sectionStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->sectionEnded( sectionStats );\n        }\n        m_reporter->sectionEnded( sectionStats );\n    }\n\n    void ListeningReporter::testCaseEnded( TestCaseStats const& testCaseStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testCaseEnded( testCaseStats );\n        }\n        m_reporter->testCaseEnded( testCaseStats );\n    }\n\n    void ListeningReporter::testGroupEnded( TestGroupStats const& testGroupStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testGroupEnded( testGroupStats );\n        }\n        m_reporter->testGroupEnded( testGroupStats );\n    }\n\n    void ListeningReporter::testRunEnded( TestRunStats const& testRunStats ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->testRunEnded( testRunStats );\n        }\n        m_reporter->testRunEnded( testRunStats );\n    }\n\n    void ListeningReporter::skipTest( TestCaseInfo const& testInfo ) {\n        for ( auto const& listener : m_listeners ) {\n            listener->skipTest( testInfo );\n        }\n        m_reporter->skipTest( testInfo );\n    }\n\n    bool ListeningReporter::isMulti() const {\n        return true;\n    }\n\n} // end namespace Catch\n// end catch_reporter_listening.cpp\n// start catch_reporter_xml.cpp\n\n#if defined(_MSC_VER)\n#pragma warning(push)\n#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch\n                              // Note that 4062 (not all labels are handled\n                              // and default is missing) is enabled\n#endif\n\nnamespace Catch {\n    XmlReporter::XmlReporter( ReporterConfig const& _config )\n            :   StreamingReporterBase( _config ),\n                m_xml(_config.stream())\n    {\n        m_reporterPrefs.shouldRedirectStdOut = true;\n        m_reporterPrefs.shouldReportAllAssertions = true;\n    }\n\n    XmlReporter::~XmlReporter() = default;\n\n    std::string XmlReporter::getDescription() {\n        return \"Reports test results as an XML document\";\n    }\n\n    std::string XmlReporter::getStylesheetRef() const {\n        return std::string();\n    }\n\n    void XmlReporter::writeSourceInfo( SourceLineInfo const& sourceInfo ) {\n        m_xml\n                .writeAttribute( \"filename\", sourceInfo.file )\n                .writeAttribute( \"line\", sourceInfo.line );\n    }\n\n    void XmlReporter::noMatchingTestCases( std::string const& s ) {\n        StreamingReporterBase::noMatchingTestCases( s );\n    }\n\n    void XmlReporter::testRunStarting( TestRunInfo const& testInfo ) {\n        StreamingReporterBase::testRunStarting( testInfo );\n        std::string stylesheetRef = getStylesheetRef();\n        if( !stylesheetRef.empty() )\n            m_xml.writeStylesheetRef( stylesheetRef );\n        m_xml.startElement( \"Catch\" );\n        if( !m_config->name().empty() )\n            m_xml.writeAttribute( \"name\", m_config->name() );\n        if (m_config->testSpec().hasFilters())\n            m_xml.writeAttribute( \"filters\", serializeFilters( m_config->getTestsOrTags() ) );\n        if( m_config->rngSeed() != 0 )\n            m_xml.scopedElement( \"Randomness\" )\n                    .writeAttribute( \"seed\", m_config->rngSeed() );\n    }\n\n    void XmlReporter::testGroupStarting( GroupInfo const& groupInfo ) {\n        StreamingReporterBase::testGroupStarting( groupInfo );\n        m_xml.startElement( \"Group\" )\n                .writeAttribute( \"name\", groupInfo.name );\n    }\n\n    void XmlReporter::testCaseStarting( TestCaseInfo const& testInfo ) {\n        StreamingReporterBase::testCaseStarting(testInfo);\n        m_xml.startElement( \"TestCase\" )\n                .writeAttribute( \"name\", trim( testInfo.name ) )\n                .writeAttribute( \"description\", testInfo.description )\n                .writeAttribute( \"tags\", testInfo.tagsAsString() );\n\n        writeSourceInfo( testInfo.lineInfo );\n\n        if ( m_config->showDurations() == ShowDurations::Always )\n            m_testCaseTimer.start();\n        m_xml.ensureTagClosed();\n    }\n\n    void XmlReporter::sectionStarting( SectionInfo const& sectionInfo ) {\n        StreamingReporterBase::sectionStarting( sectionInfo );\n        if( m_sectionDepth++ > 0 ) {\n            m_xml.startElement( \"Section\" )\n                    .writeAttribute( \"name\", trim( sectionInfo.name ) );\n            writeSourceInfo( sectionInfo.lineInfo );\n            m_xml.ensureTagClosed();\n        }\n    }\n\n    void XmlReporter::assertionStarting( AssertionInfo const& ) { }\n\n    bool XmlReporter::assertionEnded( AssertionStats const& assertionStats ) {\n\n        AssertionResult const& result = assertionStats.assertionResult;\n\n        bool includeResults = m_config->includeSuccessfulResults() || !result.isOk();\n\n        if( includeResults || result.getResultType() == ResultWas::Warning ) {\n            // Print any info messages in <Info> tags.\n            for( auto const& msg : assertionStats.infoMessages ) {\n                if( msg.type == ResultWas::Info && includeResults ) {\n                    m_xml.scopedElement( \"Info\" )\n                            .writeText( msg.message );\n                } else if ( msg.type == ResultWas::Warning ) {\n                    m_xml.scopedElement( \"Warning\" )\n                            .writeText( msg.message );\n                }\n            }\n        }\n\n        // Drop out if result was successful but we're not printing them.\n        if( !includeResults && result.getResultType() != ResultWas::Warning )\n            return true;\n\n        // Print the expression if there is one.\n        if( result.hasExpression() ) {\n            m_xml.startElement( \"Expression\" )\n                    .writeAttribute( \"success\", result.succeeded() )\n                    .writeAttribute( \"type\", result.getTestMacroName() );\n\n            writeSourceInfo( result.getSourceInfo() );\n\n            m_xml.scopedElement( \"Original\" )\n                    .writeText( result.getExpression() );\n            m_xml.scopedElement( \"Expanded\" )\n                    .writeText( result.getExpandedExpression() );\n        }\n\n        // And... Print a result applicable to each result type.\n        switch( result.getResultType() ) {\n            case ResultWas::ThrewException:\n                m_xml.startElement( \"Exception\" );\n                writeSourceInfo( result.getSourceInfo() );\n                m_xml.writeText( result.getMessage() );\n                m_xml.endElement();\n                break;\n            case ResultWas::FatalErrorCondition:\n                m_xml.startElement( \"FatalErrorCondition\" );\n                writeSourceInfo( result.getSourceInfo() );\n                m_xml.writeText( result.getMessage() );\n                m_xml.endElement();\n                break;\n            case ResultWas::Info:\n                m_xml.scopedElement( \"Info\" )\n                        .writeText( result.getMessage() );\n                break;\n            case ResultWas::Warning:\n                // Warning will already have been written\n                break;\n            case ResultWas::ExplicitFailure:\n                m_xml.startElement( \"Failure\" );\n                writeSourceInfo( result.getSourceInfo() );\n                m_xml.writeText( result.getMessage() );\n                m_xml.endElement();\n                break;\n            default:\n                break;\n        }\n\n        if( result.hasExpression() )\n            m_xml.endElement();\n\n        return true;\n    }\n\n    void XmlReporter::sectionEnded( SectionStats const& sectionStats ) {\n        StreamingReporterBase::sectionEnded( sectionStats );\n        if( --m_sectionDepth > 0 ) {\n            XmlWriter::ScopedElement e = m_xml.scopedElement( \"OverallResults\" );\n            e.writeAttribute( \"successes\", sectionStats.assertions.passed );\n            e.writeAttribute( \"failures\", sectionStats.assertions.failed );\n            e.writeAttribute( \"expectedFailures\", sectionStats.assertions.failedButOk );\n\n            if ( m_config->showDurations() == ShowDurations::Always )\n                e.writeAttribute( \"durationInSeconds\", sectionStats.durationInSeconds );\n\n            m_xml.endElement();\n        }\n    }\n\n    void XmlReporter::testCaseEnded( TestCaseStats const& testCaseStats ) {\n        StreamingReporterBase::testCaseEnded( testCaseStats );\n        XmlWriter::ScopedElement e = m_xml.scopedElement( \"OverallResult\" );\n        e.writeAttribute( \"success\", testCaseStats.totals.assertions.allOk() );\n\n        if ( m_config->showDurations() == ShowDurations::Always )\n            e.writeAttribute( \"durationInSeconds\", m_testCaseTimer.getElapsedSeconds() );\n\n        if( !testCaseStats.stdOut.empty() )\n            m_xml.scopedElement( \"StdOut\" ).writeText( trim( testCaseStats.stdOut ), XmlFormatting::Newline );\n        if( !testCaseStats.stdErr.empty() )\n            m_xml.scopedElement( \"StdErr\" ).writeText( trim( testCaseStats.stdErr ), XmlFormatting::Newline );\n\n        m_xml.endElement();\n    }\n\n    void XmlReporter::testGroupEnded( TestGroupStats const& testGroupStats ) {\n        StreamingReporterBase::testGroupEnded( testGroupStats );\n        // TODO: Check testGroupStats.aborting and act accordingly.\n        m_xml.scopedElement( \"OverallResults\" )\n                .writeAttribute( \"successes\", testGroupStats.totals.assertions.passed )\n                .writeAttribute( \"failures\", testGroupStats.totals.assertions.failed )\n                .writeAttribute( \"expectedFailures\", testGroupStats.totals.assertions.failedButOk );\n        m_xml.scopedElement( \"OverallResultsCases\")\n                .writeAttribute( \"successes\", testGroupStats.totals.testCases.passed )\n                .writeAttribute( \"failures\", testGroupStats.totals.testCases.failed )\n                .writeAttribute( \"expectedFailures\", testGroupStats.totals.testCases.failedButOk );\n        m_xml.endElement();\n    }\n\n    void XmlReporter::testRunEnded( TestRunStats const& testRunStats ) {\n        StreamingReporterBase::testRunEnded( testRunStats );\n        m_xml.scopedElement( \"OverallResults\" )\n                .writeAttribute( \"successes\", testRunStats.totals.assertions.passed )\n                .writeAttribute( \"failures\", testRunStats.totals.assertions.failed )\n                .writeAttribute( \"expectedFailures\", testRunStats.totals.assertions.failedButOk );\n        m_xml.scopedElement( \"OverallResultsCases\")\n                .writeAttribute( \"successes\", testRunStats.totals.testCases.passed )\n                .writeAttribute( \"failures\", testRunStats.totals.testCases.failed )\n                .writeAttribute( \"expectedFailures\", testRunStats.totals.testCases.failedButOk );\n        m_xml.endElement();\n    }\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n    void XmlReporter::benchmarkPreparing(std::string const& name) {\n        m_xml.startElement(\"BenchmarkResults\")\n            .writeAttribute(\"name\", name);\n    }\n\n    void XmlReporter::benchmarkStarting(BenchmarkInfo const &info) {\n        m_xml.writeAttribute(\"samples\", info.samples)\n            .writeAttribute(\"resamples\", info.resamples)\n            .writeAttribute(\"iterations\", info.iterations)\n            .writeAttribute(\"clockResolution\", info.clockResolution)\n            .writeAttribute(\"estimatedDuration\", info.estimatedDuration)\n            .writeComment(\"All values in nano seconds\");\n    }\n\n    void XmlReporter::benchmarkEnded(BenchmarkStats<> const& benchmarkStats) {\n        m_xml.startElement(\"mean\")\n            .writeAttribute(\"value\", benchmarkStats.mean.point.count())\n            .writeAttribute(\"lowerBound\", benchmarkStats.mean.lower_bound.count())\n            .writeAttribute(\"upperBound\", benchmarkStats.mean.upper_bound.count())\n            .writeAttribute(\"ci\", benchmarkStats.mean.confidence_interval);\n        m_xml.endElement();\n        m_xml.startElement(\"standardDeviation\")\n            .writeAttribute(\"value\", benchmarkStats.standardDeviation.point.count())\n            .writeAttribute(\"lowerBound\", benchmarkStats.standardDeviation.lower_bound.count())\n            .writeAttribute(\"upperBound\", benchmarkStats.standardDeviation.upper_bound.count())\n            .writeAttribute(\"ci\", benchmarkStats.standardDeviation.confidence_interval);\n        m_xml.endElement();\n        m_xml.startElement(\"outliers\")\n            .writeAttribute(\"variance\", benchmarkStats.outlierVariance)\n            .writeAttribute(\"lowMild\", benchmarkStats.outliers.low_mild)\n            .writeAttribute(\"lowSevere\", benchmarkStats.outliers.low_severe)\n            .writeAttribute(\"highMild\", benchmarkStats.outliers.high_mild)\n            .writeAttribute(\"highSevere\", benchmarkStats.outliers.high_severe);\n        m_xml.endElement();\n        m_xml.endElement();\n    }\n\n    void XmlReporter::benchmarkFailed(std::string const &error) {\n        m_xml.scopedElement(\"failed\").\n            writeAttribute(\"message\", error);\n        m_xml.endElement();\n    }\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n    CATCH_REGISTER_REPORTER( \"xml\", XmlReporter )\n\n} // end namespace Catch\n\n#if defined(_MSC_VER)\n#pragma warning(pop)\n#endif\n// end catch_reporter_xml.cpp\n\nnamespace Catch {\n    LeakDetector leakDetector;\n}\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n\n// end catch_impl.hpp\n#endif\n\n#ifdef CATCH_CONFIG_MAIN\n// start catch_default_main.hpp\n\n#ifndef __OBJC__\n\n#if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN)\n// Standard C/C++ Win32 Unicode wmain entry point\nextern \"C\" int wmain (int argc, wchar_t * argv[], wchar_t * []) {\n#else\n// Standard C/C++ main entry point\nint main (int argc, char * argv[]) {\n#endif\n\n    return Catch::Session().run( argc, argv );\n}\n\n#else // __OBJC__\n\n// Objective-C entry point\nint main (int argc, char * const argv[]) {\n#if !CATCH_ARC_ENABLED\n    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];\n#endif\n\n    Catch::registerTestMethods();\n    int result = Catch::Session().run( argc, (char**)argv );\n\n#if !CATCH_ARC_ENABLED\n    [pool drain];\n#endif\n\n    return result;\n}\n\n#endif // __OBJC__\n\n// end catch_default_main.hpp\n#endif\n\n#if !defined(CATCH_CONFIG_IMPL_ONLY)\n\n#ifdef CLARA_CONFIG_MAIN_NOT_DEFINED\n#  undef CLARA_CONFIG_MAIN\n#endif\n\n#if !defined(CATCH_CONFIG_DISABLE)\n//////\n// If this config identifier is defined then all CATCH macros are prefixed with CATCH_\n#ifdef CATCH_CONFIG_PREFIX_ALL\n\n#define CATCH_REQUIRE( ... ) INTERNAL_CATCH_TEST( \"CATCH_REQUIRE\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define CATCH_REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( \"CATCH_REQUIRE_FALSE\", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n\n#define CATCH_REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( \"CATCH_REQUIRE_THROWS\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"CATCH_REQUIRE_THROWS_AS\", exceptionType, Catch::ResultDisposition::Normal, expr )\n#define CATCH_REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"CATCH_REQUIRE_THROWS_WITH\", Catch::ResultDisposition::Normal, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"CATCH_REQUIRE_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )\n#endif// CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"CATCH_REQUIRE_NOTHROW\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n\n#define CATCH_CHECK( ... ) INTERNAL_CATCH_TEST( \"CATCH_CHECK\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( \"CATCH_CHECK_FALSE\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n#define CATCH_CHECKED_IF( ... ) INTERNAL_CATCH_IF( \"CATCH_CHECKED_IF\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( \"CATCH_CHECKED_ELSE\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( \"CATCH_CHECK_NOFAIL\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ )\n\n#define CATCH_CHECK_THROWS( ... )  INTERNAL_CATCH_THROWS( \"CATCH_CHECK_THROWS\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"CATCH_CHECK_THROWS_AS\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )\n#define CATCH_CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"CATCH_CHECK_THROWS_WITH\", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"CATCH_CHECK_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"CATCH_CHECK_NOTHROW\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"CATCH_CHECK_THAT\", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )\n\n#define CATCH_REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"CATCH_REQUIRE_THAT\", matcher, Catch::ResultDisposition::Normal, arg )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( \"CATCH_INFO\", msg )\n#define CATCH_UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( \"CATCH_UNSCOPED_INFO\", msg )\n#define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( \"CATCH_WARN\", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )\n#define CATCH_CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), \"CATCH_CAPTURE\",__VA_ARGS__ )\n\n#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ )\n#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ )\n#define CATCH_REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )\n#define CATCH_SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ )\n#define CATCH_DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ )\n#define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( \"CATCH_FAIL\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( \"CATCH_FAIL_CHECK\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( \"CATCH_SUCCEED\", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n\n#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#else\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#endif\n\n#if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)\n#define CATCH_STATIC_REQUIRE( ... )       static_assert(   __VA_ARGS__ ,      #__VA_ARGS__ );     CATCH_SUCCEED( #__VA_ARGS__ )\n#define CATCH_STATIC_REQUIRE_FALSE( ... ) static_assert( !(__VA_ARGS__), \"!(\" #__VA_ARGS__ \")\" ); CATCH_SUCCEED( #__VA_ARGS__ )\n#else\n#define CATCH_STATIC_REQUIRE( ... )       CATCH_REQUIRE( __VA_ARGS__ )\n#define CATCH_STATIC_REQUIRE_FALSE( ... ) CATCH_REQUIRE_FALSE( __VA_ARGS__ )\n#endif\n\n// \"BDD-style\" convenience wrappers\n#define CATCH_SCENARIO( ... ) CATCH_TEST_CASE( \"Scenario: \" __VA_ARGS__ )\n#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, \"Scenario: \" __VA_ARGS__ )\n#define CATCH_GIVEN( desc )     INTERNAL_CATCH_DYNAMIC_SECTION( \"    Given: \" << desc )\n#define CATCH_AND_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( \"And given: \" << desc )\n#define CATCH_WHEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     When: \" << desc )\n#define CATCH_AND_WHEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \" And when: \" << desc )\n#define CATCH_THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     Then: \" << desc )\n#define CATCH_AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \"      And: \" << desc )\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n#define CATCH_BENCHMARK(...) \\\n    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))\n#define CATCH_BENCHMARK_ADVANCED(name) \\\n    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), name)\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\n// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required\n#else\n\n#define REQUIRE( ... ) INTERNAL_CATCH_TEST( \"REQUIRE\", Catch::ResultDisposition::Normal, __VA_ARGS__  )\n#define REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( \"REQUIRE_FALSE\", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n\n#define REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( \"REQUIRE_THROWS\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"REQUIRE_THROWS_AS\", exceptionType, Catch::ResultDisposition::Normal, expr )\n#define REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"REQUIRE_THROWS_WITH\", Catch::ResultDisposition::Normal, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"REQUIRE_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"REQUIRE_NOTHROW\", Catch::ResultDisposition::Normal, __VA_ARGS__ )\n\n#define CHECK( ... ) INTERNAL_CATCH_TEST( \"CHECK\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( \"CHECK_FALSE\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )\n#define CHECKED_IF( ... ) INTERNAL_CATCH_IF( \"CHECKED_IF\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( \"CHECKED_ELSE\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( \"CHECK_NOFAIL\", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ )\n\n#define CHECK_THROWS( ... )  INTERNAL_CATCH_THROWS( \"CHECK_THROWS\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( \"CHECK_THROWS_AS\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )\n#define CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( \"CHECK_THROWS_WITH\", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( \"CHECK_THROWS_MATCHES\", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( \"CHECK_NOTHROW\", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"CHECK_THAT\", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )\n\n#define REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( \"REQUIRE_THAT\", matcher, Catch::ResultDisposition::Normal, arg )\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define INFO( msg ) INTERNAL_CATCH_INFO( \"INFO\", msg )\n#define UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( \"UNSCOPED_INFO\", msg )\n#define WARN( msg ) INTERNAL_CATCH_MSG( \"WARN\", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )\n#define CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), \"CAPTURE\",__VA_ARGS__ )\n\n#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ )\n#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ )\n#define REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ )\n#define SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ )\n#define DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ )\n#define FAIL( ... ) INTERNAL_CATCH_MSG( \"FAIL\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )\n#define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( \"FAIL_CHECK\", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define SUCCEED( ... ) INTERNAL_CATCH_MSG( \"SUCCEED\", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )\n#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE()\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ )\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )\n#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(__VA_ARGS__)\n#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#else\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )\n#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE( __VA_ARGS__ ) )\n#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ ) )\n#endif\n\n#if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)\n#define STATIC_REQUIRE( ... )       static_assert(   __VA_ARGS__,  #__VA_ARGS__ ); SUCCEED( #__VA_ARGS__ )\n#define STATIC_REQUIRE_FALSE( ... ) static_assert( !(__VA_ARGS__), \"!(\" #__VA_ARGS__ \")\" ); SUCCEED( \"!(\" #__VA_ARGS__ \")\" )\n#else\n#define STATIC_REQUIRE( ... )       REQUIRE( __VA_ARGS__ )\n#define STATIC_REQUIRE_FALSE( ... ) REQUIRE_FALSE( __VA_ARGS__ )\n#endif\n\n#endif\n\n#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature )\n\n// \"BDD-style\" convenience wrappers\n#define SCENARIO( ... ) TEST_CASE( \"Scenario: \" __VA_ARGS__ )\n#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, \"Scenario: \" __VA_ARGS__ )\n\n#define GIVEN( desc )     INTERNAL_CATCH_DYNAMIC_SECTION( \"    Given: \" << desc )\n#define AND_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( \"And given: \" << desc )\n#define WHEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     When: \" << desc )\n#define AND_WHEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \" And when: \" << desc )\n#define THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( \"     Then: \" << desc )\n#define AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( \"      And: \" << desc )\n\n#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)\n#define BENCHMARK(...) \\\n    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))\n#define BENCHMARK_ADVANCED(name) \\\n    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), name)\n#endif // CATCH_CONFIG_ENABLE_BENCHMARKING\n\nusing Catch::Detail::Approx;\n\n#else // CATCH_CONFIG_DISABLE\n\n//////\n// If this config identifier is defined then all CATCH macros are prefixed with CATCH_\n#ifdef CATCH_CONFIG_PREFIX_ALL\n\n#define CATCH_REQUIRE( ... )        (void)(0)\n#define CATCH_REQUIRE_FALSE( ... )  (void)(0)\n\n#define CATCH_REQUIRE_THROWS( ... ) (void)(0)\n#define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0)\n#define CATCH_REQUIRE_THROWS_WITH( expr, matcher )     (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif// CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_REQUIRE_NOTHROW( ... ) (void)(0)\n\n#define CATCH_CHECK( ... )         (void)(0)\n#define CATCH_CHECK_FALSE( ... )   (void)(0)\n#define CATCH_CHECKED_IF( ... )    if (__VA_ARGS__)\n#define CATCH_CHECKED_ELSE( ... )  if (!(__VA_ARGS__))\n#define CATCH_CHECK_NOFAIL( ... )  (void)(0)\n\n#define CATCH_CHECK_THROWS( ... )  (void)(0)\n#define CATCH_CHECK_THROWS_AS( expr, exceptionType ) (void)(0)\n#define CATCH_CHECK_THROWS_WITH( expr, matcher )     (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CATCH_CHECK_NOTHROW( ... ) (void)(0)\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CATCH_CHECK_THAT( arg, matcher )   (void)(0)\n\n#define CATCH_REQUIRE_THAT( arg, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define CATCH_INFO( msg )          (void)(0)\n#define CATCH_UNSCOPED_INFO( msg ) (void)(0)\n#define CATCH_WARN( msg )          (void)(0)\n#define CATCH_CAPTURE( msg )       (void)(0)\n\n#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define CATCH_METHOD_AS_TEST_CASE( method, ... )\n#define CATCH_REGISTER_TEST_CASE( Function, ... ) (void)(0)\n#define CATCH_SECTION( ... )\n#define CATCH_DYNAMIC_SECTION( ... )\n#define CATCH_FAIL( ... ) (void)(0)\n#define CATCH_FAIL_CHECK( ... ) (void)(0)\n#define CATCH_SUCCEED( ... ) (void)(0)\n\n#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__)\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__)\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__)\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#else\n#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) )\n#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#endif\n\n// \"BDD-style\" convenience wrappers\n#define CATCH_SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), className )\n#define CATCH_GIVEN( desc )\n#define CATCH_AND_GIVEN( desc )\n#define CATCH_WHEN( desc )\n#define CATCH_AND_WHEN( desc )\n#define CATCH_THEN( desc )\n#define CATCH_AND_THEN( desc )\n\n#define CATCH_STATIC_REQUIRE( ... )       (void)(0)\n#define CATCH_STATIC_REQUIRE_FALSE( ... ) (void)(0)\n\n// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required\n#else\n\n#define REQUIRE( ... )       (void)(0)\n#define REQUIRE_FALSE( ... ) (void)(0)\n\n#define REQUIRE_THROWS( ... ) (void)(0)\n#define REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0)\n#define REQUIRE_THROWS_WITH( expr, matcher ) (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define REQUIRE_NOTHROW( ... ) (void)(0)\n\n#define CHECK( ... ) (void)(0)\n#define CHECK_FALSE( ... ) (void)(0)\n#define CHECKED_IF( ... ) if (__VA_ARGS__)\n#define CHECKED_ELSE( ... ) if (!(__VA_ARGS__))\n#define CHECK_NOFAIL( ... ) (void)(0)\n\n#define CHECK_THROWS( ... )  (void)(0)\n#define CHECK_THROWS_AS( expr, exceptionType ) (void)(0)\n#define CHECK_THROWS_WITH( expr, matcher ) (void)(0)\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n#define CHECK_NOTHROW( ... ) (void)(0)\n\n#if !defined(CATCH_CONFIG_DISABLE_MATCHERS)\n#define CHECK_THAT( arg, matcher ) (void)(0)\n\n#define REQUIRE_THAT( arg, matcher ) (void)(0)\n#endif // CATCH_CONFIG_DISABLE_MATCHERS\n\n#define INFO( msg ) (void)(0)\n#define UNSCOPED_INFO( msg ) (void)(0)\n#define WARN( msg ) (void)(0)\n#define CAPTURE( ... ) (void)(0)\n\n#define TEST_CASE( ... )  INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n#define METHOD_AS_TEST_CASE( method, ... )\n#define REGISTER_TEST_CASE( Function, ... ) (void)(0)\n#define SECTION( ... )\n#define DYNAMIC_SECTION( ... )\n#define FAIL( ... ) (void)(0)\n#define FAIL_CHECK( ... ) (void)(0)\n#define SUCCEED( ... ) (void)(0)\n#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ))\n\n#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__)\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__)\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__)\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#else\n#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) )\n#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__) )\n#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ ) )\n#define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )\n#endif\n\n#define STATIC_REQUIRE( ... )       (void)(0)\n#define STATIC_REQUIRE_FALSE( ... ) (void)(0)\n\n#endif\n\n#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature )\n\n// \"BDD-style\" convenience wrappers\n#define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ) )\n#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), className )\n\n#define GIVEN( desc )\n#define AND_GIVEN( desc )\n#define WHEN( desc )\n#define AND_WHEN( desc )\n#define THEN( desc )\n#define AND_THEN( desc )\n\nusing Catch::Detail::Approx;\n\n#endif\n\n#endif // ! CATCH_CONFIG_IMPL_ONLY\n\n// start catch_reenable_warnings.h\n\n\n#ifdef __clang__\n#    ifdef __ICC // icpc defines the __clang__ macro\n#        pragma warning(pop)\n#    else\n#        pragma clang diagnostic pop\n#    endif\n#elif defined __GNUC__\n#    pragma GCC diagnostic pop\n#endif\n\n// end catch_reenable_warnings.h\n// end catch.hpp\n#endif // TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED\n"
  },
  {
    "path": "src/madness/external/elemental/AUTHORS",
    "content": "Authors of Elemental\n====================\n\nJack Poulson:\n  The complement of the following contributions.\n\nMatthias Petschow, Paolo Bientinesi, and RWTH Aachen University:\n  The PMRRR library for hybrid symmetric tridiagonal eigensolutions and a bug\n  fix for the Grid class.\n\nUniv. of Tennessee, Univ. of California Berkeley, and NAG Ltd.:\n  The serial code for the safe inversion process during the calculation of \n  Householder reflectors (found in LAPACK's dlarfg.f and zlarfg.f) and \n  several of the serial routines used within PMRRR.\n\nMartin Schatz and The University of Texas at Austin:\n  The experimental 3D Gemm and the AxpyInterface class for easily filling \n  distributed matrices.\n\nBryan Marker and The University of Texas at Austin (via DxTer):\n  Several significant performance improvements for Trmm, Trsm, and Hegst.\n\nJed Brown and Argonne National Laboratory:\n  Fixed several problems with Elemental installation,\n  as well as fixing an MPI_Group leakage in the Grid class.\n\nJeff Hammond and Argonne National Laboratory:\n  Several bug fixes and toolchain files for BlueGene/P and BlueGene/Q, and an \n  improvement for Elemental's threading support.\n\nMichael Grant:\n  The SWIG Python interface and a large number of bugfixes.\n"
  },
  {
    "path": "src/madness/external/elemental/CMakeLists.txt",
    "content": "#\n#  Copyright (c) 2009-2014, Jack Poulson\n#                     2012, Jed Brown \n#  All rights reserved.\n#\n#  This file is part of Elemental and is under the BSD 2-Clause License, \n#  which can be found in the LICENSE file in the root directory, or at \n#  http://opensource.org/licenses/BSD-2-Clause\n#\ncmake_minimum_required(VERSION 2.8.12)\ninclude(CheckCSourceCompiles)\ninclude(CheckCXXSourceCompiles)\ninclude(CheckFunctionExists)\n\nlist(APPEND CMAKE_MODULE_PATH \"${CMAKE_CURRENT_SOURCE_DIR}/external/cmake/\")\ninclude(GetGitRevisionDescription)\ninclude(language_support_v2)\n\nproject(Elemental)\nset(Elemental_VERSION_MAJOR 0)\nset(Elemental_VERSION_MINOR 84-dev)\n\n################################################################################\n# Common build options                                                         #\n################################################################################\n\n# By default, Elemental builds static libraries, but shared libraries are \n# also supported through this option.\noption(BUILD_SHARED_LIBS \"Switch to shared libraries\" OFF)\n\n# Whether or not to build a collection of simple example drivers.\noption(ELEM_EXAMPLES \"A collection of simple examples\" OFF)\n\n# Whether or not to build a collection of performance and correctness tests\noption(ELEM_TESTS \"A collection of performance and correctness tests\" OFF)\n\n# Whether or not to force the Memory class zero initialize what it allocates.\n# If valgrind was detected and is running, this will be forced anyway.\noption(ELEM_ZERO_INIT \"Initialize buffers to zero by default?\" OFF)\n\n# Whether or not to build current 'experimental' code, such as:\n# Martin's 3D Gemm code\noption(ELEM_EXPERIMENTAL \"Build experimental code\" OFF)\n\n# Attempt to use 64-bit integers\noption(ELEM_USE_64BIT_INTS \"Use 64-bit integers where possible\" OFF)\n\n# Whether or not to use Qt5 for visualization if it is found (experimental)\n# NOTE: Setting Qt5Widgets_DIR, Qt5_DIR, or Qt5_LIBDIR overrides this variable\noption(ELEM_USE_QT5 \"Attempt to use Qt5?\" OFF)\n\n################################################################################\n# Advanced build options                                                       #\n################################################################################\n\n# Since it is surprisingly common for MPI libraries to have bugs in their \n# support for complex data, the following option forces Elemental to cast \n# all possible MPI communications in terms of twice as many real units of data.\noption(ELEM_AVOID_COMPLEX_MPI \"Avoid potentially buggy complex MPI routines\" ON)\nmark_as_advanced(ELEM_AVOID_COMPLEX_MPI)\n\n# At one point, a bug was found in IBM's C++ compiler for Blue Gene/P, \n# where OpenMP statements of the form a[i] += alpha b[i], with complex data,\n# would segfault and/or return incorrect results\noption(ELEM_AVOID_OMP_FMA \"Avoid a bug in the IBM compilers.\" OFF)\nmark_as_advanced(ELEM_AVOID_OMP_FMA)\n\n# Due to a subtle flaw in the Blue Gene/P extensions for MPICH2, treating \n# floating-point data as a collection of byte-sized objects results in a \n# better algorithm being chosen for MPI_Allgather. This should not effect\n# performance on most machines.\noption(ELEM_USE_BYTE_ALLGATHERS \"Avoid BG/P allgather performance bug.\" ON)\nmark_as_advanced(ELEM_USE_BYTE_ALLGATHERS)\n\n# If MPI_Reduce_scatter_block doesn't exist, perform it by composing \n# MPI_Allreduce and std::memcpy rather than MPI_Reduce and MPI_Scatter\noption(ELEM_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE\n       \"AllReduce based block MPI_Reduce_scatter\" OFF)\nmark_as_advanced(ELEM_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE)\n\n# This can easily be performed, but is likely not a good idea\noption(ELEM_POOL_MEMORY \n       \"Make Memory class accumulate memory until destruction\" OFF)\nmark_as_advanced(ELEM_POOL_MEMORY)\n\n################################################################################\n# Elemental-development build options                                          #\n################################################################################\n\n# Print a warning any time a redistribution is performed which unpacks a \n# large amount of data with a non-unit stride\noption(ELEM_CACHE_WARNINGS \"Warns when using cache-unfriendly routines\" OFF)\nmark_as_advanced(ELEM_CACHE_WARNINGS)\n\n# Print a warning when an improperly aligned redistribution is performed, \n# i.e., if an unnecessary permutation communication stage must take place\noption(ELEM_UNALIGNED_WARNINGS \n       \"Warn when performing unaligned redistributions\" OFF)\nmark_as_advanced(ELEM_UNALIGNED_WARNINGS)\n\n# Print a warning if an opportunity was missed to implement a redistribution\n# approach specifically for vectors (instead of matrices)\noption(ELEM_VECTOR_WARNINGS \n       \"Warn when vector redistribution chances are missed\" OFF)\nmark_as_advanced(ELEM_VECTOR_WARNINGS)\n\n################################################################################\n# Significant command-line variable definitions                                #\n################################################################################\n\n# \"CMAKE_BUILD_TYPE\"\n#   Elemental requires it to be one of the following choices:\n#     1. \"PureDebug\": Vanilla MPI build meant for development and debugging\n#     2. \"PureRelease\": Vanilla MPI build meant for production runs\n#     3. \"HybridDebug\": MPI+OpenMP build meant for development and debugging\n#     4. \"HybridRelease\": MPI+OpenMP build meant for production runs\n#   If \"CMAKE_BUILD_TYPE\" is not defined, the default is \"PureRelease\".\n\n# \"CXX_FLAGS\"\n#   Optimization and debugging/symbol flags\n\n# \"OpenMP_CXX_FLAGS\"\n#   Overrides the default compile flags for adding OpenMP support to CXX code\n\n# TODO: Add list of MPI variables here, such as \"MPI_CXX_COMPILE_FLAGS\"\n\n# TODO: Add discussion of \"MATH_LIBS\"\n\n# TODO: Add discussion of \"REFERENCE_ROOT\"\n\n# TODO: Check to see if there are any others...\n\n################################################################################\n# Build logic starts here                                                      #\n################################################################################\n\n# Elemental must be built \"out-of-source\", so we start by ensuring that the\n# source and build directories are different.\nif(\"${PROJECT_SOURCE_DIR}\" STREQUAL \"${PROJECT_BINARY_DIR}\")\n  message(FATAL_ERROR \"In-source build attempted; please clean the CMake cache and then switch to an out-of-source build, e.g., rm CMakeCache.txt && rm -Rf CMakeFiles/ && mkdir build/ && cd build/ && cmake ..\")\nendif()\n\n# ccache for caching builds\nfind_program(CCACHE ccache)\nif(CCACHE)\n    message (STATUS \"Found ccache: ${CCACHE}\")\n    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})\n    set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})\nendif(CCACHE)\n\n# Get the Git revision\nget_git_head_revision(GIT_REFSPEC GIT_SHA1)\n\n# Extract a few booleans from the build type and default to PureRelease\nif(NOT CMAKE_BUILD_TYPE)\n  message(STATUS \"Build mode not specified, defaulting to PureRelease build.\")\n  set(CMAKE_BUILD_TYPE PureRelease)\nendif()\nif(CMAKE_BUILD_TYPE STREQUAL \"HybridDebug\")\n  set(ELEM_HYBRID TRUE)\n  set(ELEM_DEBUG TRUE)\nelseif(CMAKE_BUILD_TYPE STREQUAL \"HybridRelease\")\n  set(ELEM_HYBRID TRUE)\n  set(ELEM_RELEASE TRUE)\nelseif(CMAKE_BUILD_TYPE STREQUAL \"PureDebug\")\n  set(ELEM_PURE TRUE)\n  set(ELEM_DEBUG TRUE)\nelseif(CMAKE_BUILD_TYPE STREQUAL \"PureRelease\")\n  set(ELEM_PURE TRUE)\n  set(ELEM_RELEASE TRUE)\nelse()\n  message(FATAL_ERROR \"CMAKE_BUILD_TYPE must be [Hybrid,Pure][Debug,Release]\")\nendif()\nstring(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_BUILD_TYPE)\n\n# Set the basic compile flags from the build type\nif(NOT WIN32) # I forget why we need this guard\n  set(LANGUAGES CXX C Fortran)\n  foreach(LANG ${LANGUAGES})\n    if(NOT ${LANG}_FLAGS)\n      if(ELEM_DEBUG)\n        # set(${LANG}_FLAGS \"-O2 -g -Wunused-variable -Wunused-but-set-variable -Wunused-local-typedefs\" CACHE STRING\n        set(${LANG}_FLAGS \"-O2 -g\" CACHE STRING\n          \"${LANG} optimization/debug flags for ${UPPER_BUILD_TYPE} mode\")\n      else()\n        set(${LANG}_FLAGS \"-O3\" CACHE STRING\n          \"${LANG} optimization flags for ${UPPER_BUILD_TYPE} mode\")\n      endif()\n    endif()\n  endforeach()\nendif()\n\nlist(APPEND CMAKE_MODULE_PATH \"${CMAKE_CURRENT_SOURCE_DIR}/cmake/\")\ninclude(tests/Fortran)\ninclude(tests/CXX)\ninclude(tests/MPI)\ninclude(tests/OpenMP)\n\ninclude(tests/Qt5)\nif(ELEM_HAVE_QT5)\n  set(ELEM_HEADERS_PREMOC \n      \"include/elemental/io/DisplayWindow-premoc.hpp;include/elemental/io/ComplexDisplayWindow-premoc.hpp\")\n  qt_wrap_cpp(elemental ELEM_MOC_SRC ${ELEM_HEADERS_PREMOC})\n  include_directories(${Qt5Widgets_INCLUDE_DIRS})\n  add_definitions(${Qt5Widgets_DEFINITIONS})\n  set(EXTRA_FLAGS \"${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} ${EXTRA_FLAGS}\")\n\n  # Qt5Widgets_DIR = Qt5_LIBDIR/cmake/Qt5Widgets\n  get_filename_component(Qt5_CMAKEDIR ${Qt5Widgets_DIR} PATH)\n  get_filename_component(Qt5_LIBDIR ${Qt5_CMAKEDIR} PATH)\nendif()\n\ninclude(FindValgrind)\nif(VALGRIND_FOUND)\n  include_directories(${VALGRIND_INCLUDE_DIR})\n  set(ELEM_HAVE_VALGRIND TRUE)\nendif()\n\ninclude(tests/Math)\n\n# Now append the extra flags\nset(CXX_FLAGS \"${CXX_FLAGS} ${EXTRA_FLAGS}\")\nset(CMAKE_CXX_FLAGS_${UPPER_BUILD_TYPE} ${CXX_FLAGS})\n\n# Add the Parallel Multiple Relatively Robust Representations (PMRRR) project\nadd_subdirectory(external/pmrrr)\n\n# Create the Elemental configuration header\nconfigure_file(${PROJECT_SOURCE_DIR}/cmake/config.h.cmake\n               ${PROJECT_BINARY_DIR}/include/elemental/config.h)\ninstall(FILES ${PROJECT_BINARY_DIR}/include/elemental/config.h \n        DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}/madness/external/elemental/\"\n        COMPONENT elemental)\n\n# Create a file which can be included in Makefile's.\n# This is meant to be analogous to PETSc's 'conf/petscvariables' file\nset(MPI_CXX_INCSTRING)\nforeach(INC_PATH ${MPI_CXX_INCLUDE_PATH})\n  set(MPI_CXX_INCSTRING \"${MPI_CXX_INCSTRING} -I${INC_PATH}\")  \nendforeach()\nset(MATH_LIBSTRING)\nforeach(LIB ${MATH_LIBS})\n  set(MATH_LIBSTRING \"${MATH_LIBSTRING} ${LIB}\")\nendforeach()\nset(MPI_CXX_LIBSTRING)\nforeach(LIB ${MPI_CXX_LIBRARIES})\n  set(MPI_CXX_LIBSTRING \"${MPI_CXX_LIBSTRING} ${LIB}\")\nendforeach()\nset(LAPACK_ADDONSTRING)\nforeach(LIB ${LAPACK_ADDONS_LIBS})\n  set(LAPACK_ADDONSTRING \"${LAPACK_ADDONSTRING} ${LIB}\")\nendforeach()\nset(QT5_DEFSTRING)\nforeach(DEF ${Qt5Widgets_DEFINITIONS})\n  set(QT5_DEFSTRING \"${QT5_DEFSTRING} ${DEF}\")\nendforeach()\nset(QT5_INCSTRING)\nforeach(INC ${Qt5Widgets_INCLUDE_DIRS})\n  set(QT5_INCSTRING \"${QT5_INCSTRING} -I${INC}\")\nendforeach()\nset(QT5_COMPILESTRING)\nforeach(FLAG ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS})\n  set(QT5_COMPILESTRING \"${QT5_COMPILE_STRING} ${FLAG}\")\nendforeach()\nset(QT5_LIBSTRING \"-L${Qt5_LIBDIR} -lQt5Widgets -lQt5Gui -lQt5Core\")\nconfigure_file(${PROJECT_SOURCE_DIR}/cmake/ElemVars.cmake\n               ${PROJECT_BINARY_DIR}/conf/ElemVars @ONLY)\ninstall(FILES ${PROJECT_BINARY_DIR}/conf/ElemVars DESTINATION conf\n        COMPONENT elemental)\n\n# Grab all of the .c, .cpp, .h, and .hpp Elemental files\nfile(GLOB_RECURSE ELEM_CPP RELATIVE ${PROJECT_SOURCE_DIR} \"src/*.c\" \"src/*.cpp\")\nfile(GLOB_RECURSE ELEM_HEADERS RELATIVE ${PROJECT_SOURCE_DIR} \n  \"include/*.h\" \"include/*.hpp\")\nset(ELEM_SRC \"${ELEM_CPP};${ELEM_HEADERS};${ELEM_MOC_SRC}\")\n\n# The main library\nset(LINK_LIBS ${MATH_LIBS} ${MPI_CXX_LIBRARIES})\nif(ELEM_HAVE_QT5)\n  set(LINK_LIBS ${LINK_LIBS} ${Qt5Widgets_LIBRARIES})  \nendif()\nadd_library(elemental ${LIBRARY_TYPE} ${ELEM_SRC})\ntarget_link_libraries(elemental pmrrr ${LINK_LIBS})\nif(MPI_CXX_LINK_FLAGS AND MPI_C_LINK_FLAGS)\n  set(MPI_LINK_FLAGS \"${MPI_CXX_LINK_FLAGS} ${MPI_C_LINK_FLAGS}\")\nelseif(MPI_CXX_LINK_FLAGS)\n  set(MPI_LINK_FLAGS \"${MPI_CXX_LINK_FLAGS}\")\nelseif(MPI_C_LINK_FLAGS)\n  set(MPI_LINK_FLAGS \"${MPI_C_LINK_FLAGS}\")\nendif()\ntarget_include_directories(elemental PUBLIC\n    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>\n    $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>\n    $<INSTALL_INTERFACE:${MADNESS_INSTALL_INCLUDEDIR}/madness/external>\n  )\ninstall(TARGETS elemental EXPORT madness\n    COMPONENT elemental\n    DESTINATION \"${MADNESS_INSTALL_LIBDIR}\"\n    INCLUDES DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}/madness/external\")\n\n# Define the header-file preparation rules\nset(PREPARED_HEADERS)\nforeach(HEADER ${ELEM_HEADERS})\n  add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/${HEADER}\n    COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/${HEADER}\n            ${PROJECT_BINARY_DIR}/${HEADER}\n    DEPENDS \"${PROJECT_SOURCE_DIR}/${HEADER}\")\n  list(APPEND PREPARED_HEADERS ${PROJECT_BINARY_DIR}/${HEADER})\n\n  get_filename_component(HEADER_PATH ${HEADER} PATH)\n  string(REGEX REPLACE \"include/?(.*)\" \"\\\\1\" HEADER_PATH \"${HEADER_PATH}\")\n  install(FILES ${PROJECT_BINARY_DIR}/${HEADER} \n      DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}/madness/external/${HEADER_PATH}/\"\n      COMPONENT elemental)\nendforeach()\nadd_custom_target(prepare_elemental_headers DEPENDS ${PREPARED_HEADERS})\nadd_dependencies(elemental prepare_elemental_headers)\n\n# TODO: Ensure that source files depend on header files\n\n# Make sure the Elemental headers can be found\ninclude_directories(\"${PROJECT_BINARY_DIR}/include\")\n\n# Build the test drivers if necessary\nif(ELEM_TESTS)\n  set(TEST_DIR ${PROJECT_SOURCE_DIR}/tests)\n  set(TEST_TYPES core blas-like lapack-like convex)\n  foreach(TYPE ${TEST_TYPES})\n    file(GLOB_RECURSE ${TYPE}_TESTS RELATIVE ${PROJECT_SOURCE_DIR}/tests/${TYPE}/ \n         \"tests/${TYPE}/*.cpp\")\n    set(OUTPUT_DIR \"${PROJECT_BINARY_DIR}/bin/tests/${TYPE}\")\n    foreach(TEST ${${TYPE}_TESTS})\n      set(DRIVER ${TEST_DIR}/${TYPE}/${TEST})\n      get_filename_component(TESTNAME ${TEST} NAME_WE)\n      add_executable(tests-${TYPE}-${TESTNAME} ${DRIVER})\n      set_source_files_properties(${DRIVER} PROPERTIES \n        OBJECT_DEPENDS \"${PREPARED_HEADERS}\")\n      target_link_libraries(tests-${TYPE}-${TESTNAME} elemental)\n      set_target_properties(tests-${TYPE}-${TESTNAME} PROPERTIES\n        OUTPUT_NAME ${TESTNAME} RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR})\n      if(MPI_LINK_FLAGS)\n        set_target_properties(tests-${TYPE}-${TESTNAME} PROPERTIES\n          LINK_FLAGS ${MPI_LINK_FLAGS})\n      endif()\n      install(TARGETS tests-${TYPE}-${TESTNAME}\n          RUNTIME DESTINATION bin/tests/${TYPE}\n          COMPONENT elemental)\n    endforeach()\n  endforeach()\nendif()\n\n# Build the example drivers if necessary\nif(ELEM_EXAMPLES)\n  set(EXAMPLE_DIR ${PROJECT_SOURCE_DIR}/examples)\n  set(EXAMPLE_TYPES convex core blas-like io lapack-like matrices)\n  foreach(TYPE ${EXAMPLE_TYPES})\n    file(GLOB_RECURSE ${TYPE}_EXAMPLES RELATIVE \n         ${PROJECT_SOURCE_DIR}/examples/${TYPE}/ \"examples/${TYPE}/*.cpp\")\n    set(OUTPUT_DIR \"${PROJECT_BINARY_DIR}/bin/examples/${TYPE}\")\n    foreach(EXAMPLE ${${TYPE}_EXAMPLES})\n      set(DRIVER ${EXAMPLE_DIR}/${TYPE}/${EXAMPLE})\n      get_filename_component(EXNAME ${EXAMPLE} NAME_WE)\n      add_executable(examples-${TYPE}-${EXNAME} ${DRIVER})\n      set_source_files_properties(${DRIVER} PROPERTIES \n        OBJECT_DEPENDS \"${PREPARED_HEADERS}\")\n      target_link_libraries(examples-${TYPE}-${EXNAME} elemental)\n      set_target_properties(examples-${TYPE}-${EXNAME} PROPERTIES \n        OUTPUT_NAME ${EXNAME} RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR})\n      if(MPI_LINK_FLAGS)\n        set_target_properties(examples-${TYPE}-${EXNAME} PROPERTIES\n          LINK_FLAGS ${MPI_LINK_FLAGS})\n      endif()\n      install(TARGETS examples-${TYPE}-${EXNAME} \n          RUNTIME DESTINATION bin/examples/${TYPE}\n          COMPONENT elemental)\n    endforeach()\n  endforeach()\nendif()\n\n# Build experimental drivers\nif(ELEM_EXPERIMENTAL)\n  set(EXPERIMENTAL_DIR ${PROJECT_SOURCE_DIR}/experimental)\n\n  # Build the G3D example(s)\n  set(G3D_EXPERS G3DGemm)\n  set(OUTPUT_DIR \"${PROJECT_BINARY_DIR}/bin/experimental/g3d\")\n  foreach(EXPER ${G3D_EXPERS})\n    set(DRIVER ${EXPERIMENTAL_DIR}/g3d/${EXPER}.cpp)\n    add_executable(experimental-g3d-${EXPER} ${DRIVER})\n    set_source_files_properties(${DRIVER} PROPERTIES \n      OBJECT_DEPENDS \"${PREPARED_HEADERS}\")\n    target_link_libraries(experimental-g3d-${EXPER} elemental)\n    set_target_properties(experimental-g3d-${EXPER} PROPERTIES \n      OUTPUT_NAME ${EXPER} RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR})\n    if(MPI_LINK_FLAGS)\n      set_target_properties(experimental-g3d-${EXPER} PROPERTIES\n        LINK_FLAGS ${MPI_LINK_FLAGS})\n    endif()\n    install(TARGETS experimental-g3d-${EXPER} \n        RUNTIME DESTINATION bin/experimental/g3d\n        COMPONENT elemental)\n  endforeach()\nendif()\n\n# If Elemental is a subproject, then pass some variables to the parent\nif(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)\n  include(./cmake/ElemSub.cmake)\nendif()\n"
  },
  {
    "path": "src/madness/external/elemental/LICENSE",
    "content": "Redistribution and use in source and binary forms, with or without \nmodification, are permitted provided that the following conditions are met:\n\n  - Redistributions of source code must retain the above copyright notice, \n    this list of conditions and the following disclaimer.\n\n  - Redistributions in binary form must reproduce the above copyright notice, \n    this list of conditions and the following disclaimer in the documentation \n    and/or other materials provided with the distribution.\n\n  - Neither the name of the owner nor the names of its contributors \n    may be used to endorse or promote products derived from this software \n    without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" \nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE \nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN \nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \nPOSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "src/madness/external/elemental/PUBLICATIONS.bib",
    "content": "Journal publications\n====================\n\nAn in-preparation publication on Elemental's pseudospectra routines\n@article{\n  author={J. Poulson and G. Henry},\n  title={High-performance computation of pseudospectra},\n  note={In preparation},\n  year=2014\n}\n\nThe first major publication on Elemental, which includes numerous benchmarks on\nBlue Gene/P.\n@article{\n  author={J. Poulson and B. Marker and R.A. van de Geijn and \n          J.R. Hammond and N.A. Romero},\n  title={Elemental: {A} new framework for distributed memory dense matrix\n         computations},\n  journal={ACM Trans. Math. Soft},\n  volume=39,\n  number=2,\n  pages={13:1--13:24},\n  year=2013\n}\n\nContains detailed benchmarks of Elemental's MRRR-based Hermitian eigensolvers.\n@article{\n  author={M. Petschow and E. Peise and P. Bientinesi},\n  title={High-performance solvers for dense {H}ermitian eigenproblems},\n  journal={SIAM J. Sci. Comput},\n  volume=35, \n  number=1,\n  pages={C1--C22},\n  year=2013\n}\n\nUsed Elemental (via the sparse-direct solver Clique) for the solution of \nhigh-frequency heterogeneous Helmholtz equations via a sweeping preconditioner\n@article{\n  author={J. Poulson and B. Engquist and S. Li and L. Ying},\n  title={A parallel sweeping preconditioner for heterogeneous {3D} {H}elmholtz \n         equations},\n  journal={SIAM J. Sci. Comput},\n  volume=35,\n  number=3,\n  pages={C194--C212},\n  year=2013 \n}\n\nDistributed-memory parallelization of the butterfly algorithm which motivated\nElemental's implementation of pivoted QR and interpolative decompositions\n@article{\n  author={J. Poulson and L. Demanet and N. Maxwell and L. Ying},\n  title={A parallel butterfly algorithm},\n  journal={SIAM J. Sci. Comput},\n  note={To appear.}\n}\n\nCase study of porting an early version of Elemental to the Intel SCC\n@article{\n  author={B. Marker and E. Chan and J. Poulson and R. van de Geijn and \n          R.F. van der Wijngaart and T.G. Mattson and T.E. Kubaska},\n  title={Programming many-core architectures - a case study: dense matrix\n         computations on the {I}ntel single-chip cloud computer processor},\n  journal = {Concurrency and Computation: Practice and Experience},\n  volume=24,\n  number=12,\n  pages={1317--1333},\n  year=2012\n}\n\nTechnical Reports\n=================\n\n@techreport{\n  author={J. Poulson and R.A. van de Geijn and J. Bennighof},\n  title={Parallel algorithms for reducing the generalized {H}ermitian-definite\n         eigenvalue problem},\n  institution={University of Texas at Austin},\n  number={TR-11-05},\n  year=2011\n}\n\n@techreport{\n  author={M. Schatz and J. Poulson and R.A. van de Geijn},\n  title={Parallel Matrix Multiplication: {2D} and {3D}},\n  institution={University of Texas at Austin},\n  number={TR-12-13},\n  year=2012\n}\n"
  },
  {
    "path": "src/madness/external/elemental/README.md",
    "content": "<p align=\"left\" style=\"padding: 20px\">\n<img src=\"http://libelemental.org/_static/elemental.png\">\n</p>\n\n**Elemental** is a modern C++ library for distributed-memory dense linear \nalgebra.\nThe library was initially released in\n[Elemental: A new framework for distributed memory dense linear algebra](https://dl.acm.org/citation.cfm?doid=2427023.2427030) \nand is the key building block for the distributed-memory sparse-direct solver \n[Clique](http://www.github.com/poulson/Clique.git).\n\nPlease visit [the download page](http://libelemental.org/download/) for \ndownload instructions.\n\n### Documentation\n\nThe [documentation for the development version of Elemental](http://libelemental.org/documentation) is built using [Sphinx](http://sphinx.pocoo.org).\n\n### Related open-source packages\n\nImplementations:\n\n1. [DPLASMA](http://icl.eecs.utk.edu/dplasma/)\n2. [PLAPACK](http://www.cs.utexas.edu/~plapack)\n3. [ScaLAPACK](http://www.netlib.org/scalapack) (and the add-on, [ELPA](http://elpa.rzg.mpg.de/))\n\nWrappers:\n\n1. [PETSc](https://www.mcs.anl.gov/petsc/)\n2. [Trilinos](http://trilinos.sandia.gov)\n\nNote that [PETSc](https://www.mcs.anl.gov/petsc/) contains interfaces for both \n[Elemental](http://github.com/elemental/Elemental.git) and\n[Clique](http://github.com/poulson/Clique.git).\n\n### Elemental's root directory\n\nThis is the root directory of the entire project, and it contains:\n\n-  `AUTHORS`: the list of source code contributors\n-  `cmake/`: auxiliary files for CMake configuration\n-  `CMakeLists.txt`: the CMake configuration file\n-  `doc/`: Sphinx documentation \n-  `examples/`: various concise examples of Elemental's functionality\n-  `experimental/`: experimental code which is not yet library quality\n-  `external/`: non-standard external code which Elemental builds on top of\n-  `include/`: Elemental's header files; most of the library resides here\n-  `LICENSE`: the New BSD License file\n-  `octave/`: pedagogical versions of algorithms used in Elemental\n-  `PUBLICATIONS`: publications directly related to this source code\n-  `README.md`: this file\n-  `REFERENCES`: some publications referenced in the creation of this software\n-  `src/`: Elemental's source files; a small portion of the library is here\n-  `tests/`: programs meant to test the accuracy of Elemental\n-  `TODO`: a list of near/long-term goals of the project\n-  `vagrant/`: lightweight preconfigured virtual-machines for Elemental\n"
  },
  {
    "path": "src/madness/external/elemental/REFERENCES.bib",
    "content": "NOTE: This list is still missing a large number of important papers\n\nPseudospectra\n=============\n\nSingle-input single-pass algorithm for shifted Hessenberg system solves.\nCited as the impetus for BischofDattaPurkayastha-1994\n@article{Datta-1989,\n  author={Biswa N. Datta},\n  title={Parallel and large-scale matrix computations in control: some ideas},\n  journal={Linear Algebra and its Applications},\n  volume=121,\n  pages={243--264},\n  year=1989\n}\n\nIntroduced single-pass shifted Hessenberg solves for A X - X H = C and a\nblocked extension. This computational kernel is the basis for Elemental's \nproposed interleaved Lancozs pseudospectra algorithm.\n@article{BischofDattaPurkayastha-1994,\n  author={Christian H. Bischof and Biswa N. Datta and Avijit Purkayastha},\n  title={A parallel algorithm for the Sylvester-Observer Equation},\n  journal={SIAM Journal on Scientific Computing}, \n  volume=17,\n  number=3,\n  pages={686--698},\n  year=1994\n}\n\nNumerically-robust extensions of BischofDattaPurkayastha-1994's \nmultiplication-based shifted Hessenberg solver (discussed in the \nupper-Hessenberg setting)\n@techreport{Henry-1994,\n  author={Greg Henry},\n  title={The shifted Hessenberg system solve computation},\n  type={{T}echnical {R}eport},\n  institution={Cornell University}, \n  year=1994\n}\n\nIntroduced the triangularization + inverse iteration approach\n@article{Lui-1997,\n  author={Shiu-Hong Lui},\n  title={Computation of pseudospectra by continuation},\n  journal={SIAM Journal on Scientific Computing},\n  volume=18,\n  number=2,\n  pages={567--573},\n  year=1997\n}\n\nA comprehensive review paper on computing pseudospectra.\n@article{Trefethen-1999,\n  author={Lloyd N. Trefethen},\n  title={Computation of pseudospectra},\n  journal={Acta Numerica}, \n  volume=8,\n  pages={247--295},\n  year=1999\n}\n\nSpectral Divide and Conquer\n===========================\n\nElemental contains preliminary implementations of spectral divide and conquer\nalgorithms derived from the following paper:\n@article{BaiEtAl-1997,\n  author={Zhaojun Bai and James Demmel and Jack Dongarra and Antoine Petitet \n          and Howard Robinson and Ken Stanley},\n  title={The spectral decomposition of nonsymmetric matrices on distributed\n         memory parallel computers},\n  journal={SIAM Journal on Scientific Computing},\n  volume=18,\n  number=5,\n  pages={1446--1461}, \n  year=1997\n}\n\nThe randomized approach from the following paper is used in order to avoid a\npivoted QR decomposition:\n@article{DemmelDumitriuHoltz-2007,\n  author={James Demmel and Ioana Dumitriu and Olga Holtz},\n  title={Fast linear algebra is stable},\n  journal={Numerische Mathematik},\n  volume=108,\n  number=1,\n  pages={59--91},\n  year=2007\n}\n\nSubsequent developments and refinement of the randomized approach from \n\"Fast linear algebra is stable\"\n@techreport{BallardDemmelDumitiu-2011,\n  author={Grey Ballard and James Demmel and Ioana Dumitiu},\n  title={Minimizing communication for eigenproblems and the {S}ingular {V}alue\n         {D}ecomposition},\n  type={{T}echnical {R}eport},\n  institution={University of California at Berkeley}, \n  number={UCB/EECS-2011-14},\n  year=2011\n}\n\nSDC algorithms based upon QWDH\n@article{NakatsukasaHigham-2013,\n  author={Yuji Nakatsukasa and Nicholas J. Higham},\n  title={Stable and efficient {S}pectral {D}ivide and {C}onquer algorithms for\n         the symmetric eigenvalue decomposition and the {SVD}},\n  journal={SIAM Journal on Scientific Computing},\n  volume=35,\n  number=3,\n  pages={A1325--A1349},\n  year=2013\n}\n\nHessenberg QR algorithm\n=======================\n\nCited by HenryWatkinsDongarra-2002 as the inspiration for Watkins-1994\n@techreport{Dubrulle-1992,\n  author={A. Dubrulle},\n  title={The multishift QR algorithm -- Is it worth the trouble?},\n  type={{T}echnical {R}eport},\n  institution={IBM Scientific Center, Palo Alto, CA},\n  year=1992\n}\n\n@article{Watkins-1994,\n  author={David S. Watkins},\n  title={Shifting strategies for the parallel QR algorithm},\n  journal={SIAM Journal on Scientific Computing},\n  volume=15,\n  pages={953--958},\n  year=1994\n}\n\n@article{HenryVanDeGeijn-1997,\n  author={Greg Henry and Robert van de Geijn},\n  title={Parallelizing the QR algorithm for the unsymmetric algebraic \n         eigenvalue problem: Myths and reality},\n  journal={SIAM Journal on Scientific Computing},\n  volume=17,\n  pages={870--883},\n  year=1997\n}\n\n@article{HenryWatkinsDongarra-2002,\n  author={Greg Henry and David S. Watkins and Jack J. Dongarra},\n  title={A parallel implementation of the nonsymmetric QR algorithm for \n         distributed memory architectures},\n  journal={SIAM Journal on Scientific Computing},\n  volume=24,\n  number=1,\n  pages={284--311},\n  year=2002\n}\n\nThe resulting TOMS publication from LAWN 153 on extending ScaLAPACK's\npdlahqr to complex arithmetic (pzlahqr)\n@article{Fahey-2003,\n  author={Mark R. Fahey},\n  title={A parallel eigenvalue routine for complex Hessenberg matrices},\n  journal={ACM Transactions on Mathematical Software},\n  volume=29,\n  number=3,\n  pages={326--336},\n  year=2003\n}\n\nIntroduced a parallel and high-performance \"computational window\" scheme for \nreordering eigenvalues in Schur form\n@article{GranatKagstromKressner-2009,\n  author={Robert Granat and Bo Kagstrom and Daniel Kressner},\n  title={Parallel eigenvalue reordering in real Schur forms},\n  journal={Concurrency and Computation: Practice and Experience},\n  volume=21,\n  number=9,\n  pages={1225--1250},\n  year=2009\n}\n\nThe first major publication for the parallel QR algorithm with \nAggressive Early Deflation and computational windows\n@article{GranatKagstromKressner-2010,\n  author={Robert Granat and Bo Kagstrom and Daniel Kressner},\n  title={A novel parallel QR algorithm for hybrid distributed memory HPC \n         systems},\n  journal={SIAM Journal on Scientific Computing},\n  volume=32,\n  number=4,\n  pages={2345--2378},\n  year=2010\n}\n\nPivoted QR\n==========\n\nIntroduced the Businger-Golub algorithm for column-pivoted QR decompositions.\n@article{BusingerGolub-1965,\n  author={Peter A. Businger and Gene H. Golub},\n  title={Linear least squares solutions by {H}ouseholder transformations},\n  journal={Numerische Mathematik},\n  volume=7,\n  number=3,\n  pages={269--276},\n  year=1965\n}\n\nIntroduced GKS matrix, which the greedy RRQR fails on.\n@techreport{GolubKlemaStewart-1976,\n  author={Gene H. Golub and Virginia Klema and G.W. Stewart},\n  title={Rank degeneracy and least squares problems},\n  institution={Stanford University}, \n  number={STAN-CS-76-559},\n  year=1976\n}\n\nStandard reference for (strong) RRQR factorizations, which will hopefully be \nadded to Elemental in the near future.\n@article{GuEisenstat-1996,\n  author={Ming Gu and Stanley Eisenstat},\n  title={Efficient algorithms for computing a strong rank-revealing {QR}\n         factorization},\n  journal={SIAM Journal on Scientific Computing},\n  volume=17,\n  number=4,\n  pages={848--869},\n  year=1996\n}\n\nElemental uses the same norm updating strategy as this paper and the \ncorresponding LAPACK implementation of dgeqpf.f\n@article{DrmacBujanovic-2008,\n  author={Zlatko Drmac and Zvonimir Bujanovic},\n  title={On the failure of {R}ank-{R}evealing {QR} factorization software --\n         a case study},\n  journal={ACM Transactions on Mathematical Software},\n  volume=35,\n  number=2,\n  pages={12:1--12:28},\n  year=2008\n}\n\nUp-/downdating LU factorizations\n================================\n\nElemental's LUMod closely follows the discussion of Algorithm I from the \nfollowing paper, which is attributed to the textbook \n\"Numerische lineare Algebra\" by A. Kielbasinski and H. Schwetlick.\n@article{StangeGriewankBollhofer-2007,\n  author={Peter Stange and Andreas Griewank and Matthias Bollhofer},\n  title={On the efficient update of rectangular {LU}-factorizations subject\n         to low rank modifications},\n  journal={Electronic Transactions on Numerical Analysis},\n  volume=26,\n  pages={161--177},\n  year=2007\n}\n\nUp-/downdating Cholesky factorizations\n======================================\n\nIt is demonstrated that downdated Cholesky factorizations can be an\nill-conditioned function of the original Cholesky factor and the update vector.\n@article{Stewart-1979,\n  author={G.W. Stewart},\n  title={The effects of rounding error on an algorithm for downdating a \n         Cholesky factorization},\n  journal={IMA Journal of Applied Mathematics},\n  volume=23,\n  number=2,\n  pages={203--213},\n  year=1979\n}\n\nA general analysis of the stability of triangularizing matrices via \nhyperbolic Householder transformations.\n@article{StewartStewart-1998,\n  author={Michael Stewart and G.W. Stewart},\n  title={On hyperbolic triangularization: stability and pivoting},\n  journal={SIAM Journal on Matrix Analysis and Applications},\n  volume=19,\n  number=4,\n  pages={847--860},\n  year=1998\n}\n\nA review of generalized/hyperbolic Householder transforms which also introduces\nblocked algorithms for up-/downdating via accumulated generalized Householder\ntransforms.\n@article{VanDeGeijnVanZee-2011,\n  author={Robert A. van de Geijn and Field G. van Zee},\n  title={High-performance up-and-downdating via Householder-like \n    transformations},\n  journal={ACM Transactions on Mathematical Software},\n  volume=38,\n  number=1,\n  pages={4:1--4:17},\n  year=2011\n}\n\nSingular Value Decomposition\n============================\n\nThis paper introduced the standard algorithm for computing the SVD.\n@article{GolubReinsch-1970,\n  author={Gene H. Golub and Christian Reinsch},\n  title={Singular value decomposition and least squares solutions},\n  journal={Numerische Mathematik},\n  volume=14,\n  number=5,\n  pages={403--420},\n  year=1970\n}\n\nThis paper introduced the idea of using a QR decomposition as a first\nstep in the SVD of a non-square matrix in order to accelerate the \ncomputation (well, an earlier Golub paper mentioned it as well).\n@article{Chan-1982,\n  author={Tony F. Chan},\n  title={An improved algorithm for computing the {S}ingular {V}alue\n         {D}ecomposition},\n  journal={ACM Transactions on Mathematical Software},\n  volume=8,\n  number=1,\n  pages={72--83},\n  year=1982\n}\n\nThis could serve as a foundation for achieving high absolute accuracy\nin a cross-product based algorithm for computing the SVD. Such an\napproach should be more scalable than the current \nbidiagonalization-based approach.\n@article{Jia-2006,\n  author={Zhongxiao Jia},\n  title={Using cross-product matrices to compute the {SVD}},\n  journal={Numerical Algorithms},\n  volume=42,\n  number=1,\n  pages={31--61},\n  year=2006\n}\n\nSymmetric positive-definite inversion\n=====================================\n\nThe variant 2 single-sweep algorithm from Fig. 9 was parallelized for\nElemental's HPD inversion.\n@article{BientinesiGunterVanDeGeijn-2008,\n  author={Paolo Bientinesi and Brian Gunter and Robert A. van de Geijn},\n  title={Families of algorithms related to the inversion of a {S}ymmetric\n         {P}ositive {D}efinite matrix},\n  journal={ACM Transactions on Mathematical Software},\n  volume=35,\n  number=1,\n  pages={3:1--3:22},\n  year=2008\n}\n\nInterpolative and skeleton decompositions\n=========================================\n\nStandard reference for (pseudo-)skeleton approximations, which are also referred\nto as CUR decompositions, especially when the center matrix is non-square.\n@article{GoreinovTyrtyshnikovZamarashkin-1997,\n  author={S.A. Goreinov and E.E. Tyrtyshnikov and N.L. Zamarashkin},\n  title={A theory of pseudoskeleton approximations},\n  journal={Linear Algebra and Appl},\n  volume=261,\n  number=1--3,\n  pages={1--21}, \n  year=1997\n}\n\nIntroduced effective randomized approximations of interpolative decompositions\n@article{LibertyEtAl-2007,\n  author={Edo Liberty and Franco Woolfe and Per-Gunnar Martinsson and \n          Vladimir Rokhlin and Mark Tygert},\n  title={Randomized algorithms for the low-rank approximation of matrices},\n  journal={Proceedings of the National Academy of Sciences, USA},\n  volume=104,\n  pages={20167--20172},\n  year=2007\n}\n\nContains a thorough analysis of many randomized algorithms for (pseudoskeleton)\ndecompositions using RRQR factorizations.\n@article{ChiuDemanet-2013,\n  author={Jiawei Chiu and Laurent Demanet},\n  title={Sublinear randomized algorithms for skeleton decompositions},\n  journal={SIAM Journal on Matrix Analysis and Applications},\n  volume=34, \n  number=3,\n  pages={1361--1383},\n  year=2013\n}\n\nHouseholder tridiagonalization\n==============================\n\nContains the algorithm used for Elemental's square-grid tridiagonalization.\n@techreport{Stanley-1997,\n  author={Ken Stanley},\n  title={Execution time of symmetric eigensolvers},\n  type={{Ph.D.} {D}issertation},\n  institution={University of California at Berkeley},\n  number={CSD-99-1039},\n  pages=183,\n  year=1997\n}\n\nOne of the origins for the square-grid tridiagonalization algorithm used in\nElemental (which was later refined by Stanley et al.).\n@article{HendricksonJessupSmith-1999,\n  author={Bruce Hendrickson and Elizabeth Jessup and Christopher Smith},\n  title={Towards an efficient parallel eigensolver for dense symmetric \n         matrices},\n  journal={SIAM Journal on Scientific Computing},\n  volume=20,\n  number=3,\n  pages={1132--1154},\n  year=1999\n}\n\nTwo-sided triangular transformations\n====================================\n\nContains the main algorithm used for Elemental's two-sided triangular solves.\n@inproceedings{SearsStanleyHenry-1998,\n  author={Mark P. Sears and Ken Stanley and Greg Henry},\n  title={Application of a high performance parallel eigensolver to electronic\n         structure calculation},\n  booktitle={Proceedings of the ACM/IEEE Conference on Supercomputing},\n  publisher={IEEE Computer Society},\n  year=1998\n}\n\nMatrix functions\n================\n\nHeavily used for Elemental's Sign implementation\nTODO: Cite paper(s) instead\n@book{Higham-2008,\n  author={Nicholas J. Higham},\n  title={Functions of {M}atrices: {T}heory and {C}omputation}, \n  publisher={SIAM},\n  year=2008\n}\n\nAlgorithm for the polar decomposition which typically converges in less than\nseven iterations\n@article{NakatsukasaBaiGygi-2010,\n  author={Yuji Nakatsukasa and Zhaojun Bai and Francois Gygi},\n  title={Optimizing {H}alley's iteration for computing the matrix polar \n         decomposition},\n  journal={SIAM Journal on Matrix Analysis and Applications},\n  volume=31,\n  number=5,\n  pages={2700--2720},\n  year=2010\n}\n\nFast Haar generation\n====================\n\nUseful for randomized rank-revealing factorizations of rank-deficient matrices\n@article{Stewart-1980,\n  author={G.W. Stewart},\n  title={The efficient generation of random orthogonal matrices with an \n         application to condition estimators},\n  journal={SIAM Journal on Numerical Analysis},\n  volume=17,\n  number=3,\n  pages={403--409},\n  year=1980\n}\n\nConvex optimization\n===================\n\nThe line search reference for the L-BFGS algorithm of ByrdEtAl-1995\n@article{MoreThuente-1994,\n  author={Jorge J. Mor\\'e and David J. Thuente},\n  title={Line search algorithms with guaranteed sufficient decrease},\n  journal={ACM Transactions on Mathematical Software},\n  volume=20,\n  number=3,\n  pages={286--307},\n  year=1994\n} \n\nIntroduced the lasso\n@article{Tibshirani-1995,\n  author={Robert Tibshirani},\n  title={Regression shrinkage and selection via the lasso},\n  journal={Journal of the Royal Statistical Society, Series B (Methodological)},\n  volume=58,\n  number=1,\n  pages={267--288},\n  year=1996\n} \n\nThe basis for Elemental's (upcoming) L-BFGS implementation\n@article{ByrdEtAl-1995,\n  author={Richard H. Byrd and Peihuang Lu and Jorge Nocedal and Ciyou Zhu},\n  title={A limited memory algorithm for bound constrained optimization},\n  journal={SIAM Journal on Scientific Computing},\n  volume=16,\n  number=5,\n  pages={1190--1208},\n  year=1995\n}\n\nSection 4 contains the sparse covariance selection experiment used in \nexamples/convex/SparseInvCov.cpp\n@article{dAspremontBanerjeeElGhaoui-2008,\n  author={Alexandre d'Aspremont and Onureena Banerjee and Laurent El Ghaoui},\n  title={First-order methods for sparse covariance selection},\n  journal={SIAM Journal on Matrix Analysis and Applications},\n  volume=30,\n  number=1,\n  pages={56--66},\n  year=2008\n}\n\nIntroduces techniques for L+S decompositions and proves that exact recovery\nis often possible\n@article{CandesEtAl-2011,\n  author={Emmanuel J. Cand\\`es and Xiaodong Li and Yi Ma and John Wright},\n  title={Robust principal component analysis?},\n  journal={Journal of the ACM},\n  volume=58,\n  number=3,\n  pages={11:1--11:37},\n  year=2011\n}\n\nContains a wide variety of ADMM solvers which can be mapped to parallel\narchitectures via parallel factorizations/SVD/etc.\n@article{BoydEtAl-2011,\n  author={Stephen Boyd and Neal Parikh and Eric Chu and Borja Peleato and\n          Jonathan Eckstein},\n  title={Distributed optimization and statistical learning via the \n         Alternating Direction Method of Multipliers},\n  journal={Foundations and Trends in Machine Learning},\n  volume=3,\n  number=1,\n  pages={1--122},\n  year=2011\n}\n\nMiscellaneous\n=============\n\nAdded for definition of Kahan matrix (pg. 260)\n@book{GolubVanLoan-1996,\n  author={Gene H. Golub and Charles F. van Loan},\n  title={Matrix {C}omputations},\n  edition={3rd}, \n  publisher={Johns Hopkins University Press},\n  address={Baltimore},\n  year=1996\n}\n"
  },
  {
    "path": "src/madness/external/elemental/TODO",
    "content": "Each of the following categories lists goals in an order which roughly \ncorresponds to the order in which they are hoped to be added.\nItems are marked using the following code:\n  [x] ~ planned to be finished before the next release \n  [o] ~ hopefully started in the near future \n  [-] ~ marked for eventual development\n\nFunctionality priorities\n========================\n\nFundamental functionality additions\n-----------------------------------\n[o] Estimate for spectral radius\n[o] Low-rank modifications of QR\n[o] Banded Cholesky factorization\n[o] QR with full pivoting (Businger-Golub plus row-sorting or row-pivoting)\n[o] Finishing prototype generalized Spectral Divide and Conquer\n[-] Windowed QR with column pivoting\n[-] Power-method-like p-norm estimation\n[-] QL factorization and ql::SolveAfter\n[-] Strong RRQR and RRLQ \n[-] CUR decompositions (already have (pseudo-)skeleton)\n[-] Complete Orthogonal Decompositions (especially URV)\n[-] LU and LDL with rook pivoting\n[-] (Blocked) Aasen's\n[-] TSQR for non-powers-of-two\n[-] TSLU (via tournament pivoting)\n[-] Successive Band Reduction\n[-] Native nonsymmetric (generalized) eigensolver via QR (QZ) algorithm\n[-] Generalized Sylvester equations\n\nIncremental functionality improvements\n--------------------------------------\n[o] Add Bunch-Kaufman C now that explicit permutations are used\n[o] Simplify MPI wrappers by allowing for displacements to be automatically\n    computed from counts if not specified\n[o] Extend Grid class to support mappings from, e.g., (MDRank,root) -> VCRank\n    and use these mappings to build an (owner,root) -> VCRank mapping for \n    [Block]DistMatrix\n[o] Rescaled multi-shift Hessenberg solves\n[o] Blocked algorithms for low-rank Cholesky updates\n[o] Relative interval subset computation for HermitianEig (i.e., in [-1,1])\n[o] Sequential blocked reduction to tridiagonal form\n[o] Quadratic-time Haar generation via random Householder reflectors\n[-] 'Control' equivalents to 'Attach' for DistMatrix, and ability to forfeit\n    buffers in (Dist)Matrix\n[-] Axpy interface implementation using one-sided communication\n[-] Square process grid specializations of LDL and Bunch-Kaufman\n[-] Businger-esque element-growth monitoring in GEPP and Bunch-Kaufman\n[-] More Sign algorithms (switch to Newton-Schulz near convergence)\n[-] Distribute between different grids for any distribution\n[-] Way for DistMatrix with single process to view Matrix, and operator=\n[-] Ostrowski matrices\n[-] Various approaches (e.g., HJS) for parallel tridiagonalization\n[-] Wrappers for more LAPACK eigensolvers\n[-] Sequential versions of Trr2k \n[-] More explicit expansions of packed Householder reflectors\n[-] More Trtrmm/Trtrsm routines\n[-] Compressed pseudoinverse solves which avoid unnecessary backtransformations\n[-] Additional CIRC distributions, e.g., (MC,CIRC)\n\nPerformance priorities\n======================\n[o] Accelerator support for local Gemm calls\n[o] Support for BLIS and fused Trmv's to accelerate HermitianEig\n[-] Optimized version of ApplySymmetricPivots\n[-] Exploit structure in matrix sign based control solvers\n\nMaintenance priorities\n======================\n\nBug avoidance\n-------------\n\nInstrumentation/visualization/testing\n-------------------------------------\n[-] Global command-line options which are automatic for every driver, e.g.,\n    \"--colMajor <true/false>\" for column-major process grids and \n    \"--nb <blocksize>\" for the algorithmic blocksize\n[-] Means of easily tracking/plotting heap memory usage over time\n[-] Provide way to zoom in/out and add colorbar to DisplayWidget\n[-] Better organization of test matrices into relevant classes, e.g., Hermitian,\n    normal, triangular, Hessenberg, etc., so that each test driver can easily\n    test each member from that class.\n\nConsistency/modularity\n----------------------\n[-] Extract BLAS/LAPACK/MPI wrappers into a separate project\n[-] Make transpose-options of LocalTrr(2)k more consistent with Trr(2)k\n[-] Consistent implementation of unblocked routines\n[-] Separate out local blas-like and lapack-like operations\n[-] Safe down-casting of integers in BLAS/LAPACK calls\n\nDocumentation\n-------------\n[o] Finish adding per-directory README's (e.g., cmake/toolchains/)\n\nExternal Interfaces\n-------------------\n[o] Manually expose a C interface\n[o] Use the C interface to interact with other languages (e.g., Python, R, etc.)\n\nBuild system\n------------\n[o] Ensure that src/ is rebuilt when headers are modified\n[o] Support PMRRR when pthreads are not available (e.g., Windows)\n[o] Support for OpenBLAS [-D MATH_LIBS=\"-lopenblas;-lpthread;-lm;-lgfortran\"]\n[o] Support for BLIS\n[o] Support for automatically downloading and building netlib BLAS and LAPACK\n[o] Speed up build with C++11's extern templates\n\nMPI and Threading\n-----------------\n[-] Implement message-splitting in collectives for count > 2^31\n[-] Use MPI contiguous datatype for all messages with count > 2^31 \n    (may not work with older MPIs)\n[-] Detect oversubsription using sysconf/sysctl and {OMP,MKL,*}_NUM_THREADS\n[-] Add MPI wrappers for all nonblocking collectives\n[-] Add MPI wrappers for RMA\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/ElemSub.cmake",
    "content": "# Version information\nset(Elemental_SHA1 \n  ${Elemental_SHA1} PARENT_SCOPE)\nset(Elemental_VERSION_MAJOR \n  ${Elemental_VERSION_MAJOR} PARENT_SCOPE)\nset(Elemental_VERSION_MINOR \n  ${Elemental_VERSION_MINOR} PARENT_SCOPE)\nset(LIBRARY_TYPE \n  ${LIBRARY_TYPE} PARENT_SCOPE)\nset(CMAKE_BUILD_TYPE \n  ${CMAKE_BUILD_TYPE} PARENT_SCOPE)\nstring(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_BUILD_TYPE)\nset(RELEASE \n  ${RELEASE} PARENT_SCOPE)\n\n# C compiler info\nset(MPI_C_COMPILER \n  ${MPI_C_COMPILER} PARENT_SCOPE)\nset(MPI_C_INCLUDE_PATH \n  ${MPI_C_INCLUDE_PATH} PARENT_SCOPE)\nset(MPI_C_COMPILE_FLAGS \n  ${MPI_C_COMPILE_FLAGS} PARENT_SCOPE)\nset(MPI_C_LINK_FLAGS \n  ${MPI_C_LINK_FLAGS} PARENT_SCOPE)\nset(MPI_C_LIBRARIES \n  ${MPI_C_LIBRARIES} PARENT_SCOPE)\n\n# C++ compiler info\nset(CMAKE_CXX_FLAGS_${UPPER_BUILD_TYPE} \n  ${CMAKE_CXX_FLAGS_${UPPER_BUILD_TYPE}} PARENT_SCOPE)\nset(MPI_CXX_COMPILER \n  ${MPI_CXX_COMPILER} PARENT_SCOPE)\nset(MPI_CXX_INCLUDE_PATH \n  ${MPI_CXX_INCLUDE_PATH} PARENT_SCOPE)\nset(MPI_CXX_COMPILE_FLAGS \n  ${MPI_CXX_COMPILE_FLAGS} PARENT_SCOPE)\nset(MPI_CXX_LINK_FLAGS \n  ${MPI_CXX_LINK_FLAGS} PARENT_SCOPE)\nset(MPI_CXX_LIBRARIES \n  ${MPI_CXX_LIBRARIES} PARENT_SCOPE)\n\n# MPI and math link flags\nset(MPI_LINK_FLAGS \n  ${MPI_LINK_FLAGS} PARENT_SCOPE)\nset(MATH_LIBS \n  ${MATH_LIBS} PARENT_SCOPE)\n\n# Miscellaneous\nset(RESTRICT \n  ${RESTRICT} PARENT_SCOPE)\nset(ELEM_BLAS_POST \n  ${ELEM_BLAS_POST} PARENT_SCOPE)\nset(ELEM_LAPACK_POST \n  ${ELEM_LAPACK_POST} PARENT_SCOPE)\nset(ELEM_HAVE_OPENMP \n  ${ELEM_HAVE_OPENMP} PARENT_SCOPE)\nset(ELEM_HAVE_QT5 \n  ${ELEM_HAVE_QT5} PARENT_SCOPE)\nif(ELEM_HAVE_QT5)\n  set(Qt5Widgets_INCLUDE_DIRS \n    ${Qt5Widgets_INCLUDE_DIRS} PARENT_SCOPE)\n  set(Qt5Widgets_DEFINITIONS \n    ${Qt5Widgets_DEFINITIONS} PARENT_SCOPE)\nendif()\nset(ELEM_HAVE_F90_INTERFACE \n  ${ELEM_HAVE_F90_INTERFACE} PARENT_SCOPE)\nset(ELEM_AVOID_COMPLEX_MPI \n  ${ELEM_AVOID_COMPLEX_MPI} PARENT_SCOPE)\nset(ELEM_HAVE_MPI_REDUCE_SCATTER_BLOCK \n  ${ELEM_HAVE_MPI_REDUCE_SCATTER_BLOCK} PARENT_SCOPE)\nset(ELEM_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE \n  ${ELEM_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE} PARENT_SCOPE)\nset(ELEM_USE_BYTE_ALLGATHERS \n  ${ELEM_USE_BYTE_ALLGATHERS} PARENT_SCOPE)\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/ElemVars.cmake",
    "content": "# To help simplify including Elemental in external projects\n# TODO: Complain if Qt5 was used\n\nELEM_INC = @CMAKE_INSTALL_PREFIX@/include\nELEM_LIB = @CMAKE_INSTALL_PREFIX@/lib\n\nCC = @CMAKE_C_COMPILER@\nCXX = @CMAKE_CXX_COMPILER@\nCXX_FLAGS = @CXX_FLAGS@\n\nMATH_LIBS = @MATH_LIBSTRING@\n\nMPI_CXX_COMPILE_FLAGS = @MPI_CXX_COMPILE_FLAGS@\nMPI_CXX_LINK_FLAGS = @MPI_CXX_LINK_FLAGS@\nMPI_CXX_INCSTRING = @MPI_CXX_INCSTRING@\nMPI_CXX_LIBSTRING = @MPI_CXX_LIBSTRING@\n\nELEM_LINK_FLAGS = -L${ELEM_LIB} ${MPI_CXX_LINK_FLAGS}\n\nTHREAD_INIT = @CMAKE_THREAD_LIBS_INIT@\nPMRRR_LIBS = -lpmrrr ${THREAD_INIT}\n\n# Attempt to add Qt5 support if needed\nELEM_HAVE_QT5 = @ELEM_HAVE_QT5@\nifeq (${ELEM_HAVE_QT5},TRUE)\n  ELEM_COMPILE_FLAGS = ${CXX_FLAGS} -I${ELEM_INC} ${MPI_CXX_INCSTRING} \\\n                       @QT5_COMPILESTRING@ @QT5_INCSTRING@ @QT5_DEFSTRING@\n  ELEM_LIBS = -lelemental ${PMRRR_LIBS} ${MATH_LIBS} ${MPI_CXX_LIBSTRING} \\\n              @QT5_LIBSTRING@\nelse\n  ELEM_COMPILE_FLAGS = ${CXX_FLAGS} -I${ELEM_INC} ${MPI_CXX_INCSTRING}\n  ELEM_LIBS = -lelemental ${PMRRR_LIBS} ${MATH_LIBS} ${MPI_CXX_LIBSTRING}\nendif\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/README.md",
    "content": "### `cmake/`\n\nThis folder contains Elemental's auxiliary files for its CMake configuration\nsystem:\n\n-  `config.h.cmake`: The preprocessor definitions passed to Elemental\n-  `ElemSub.cmake`: A CMake include file for simplifying the usage of\n   Elemental as a CMake subproject\n-  `ElemVars.cmake`: A Makefile include meant to simplify the usage of\n   Elemental as a dependency in a project directly using 'make'\n-  `tests/`: Various configuration tests\n-  `toolchains/`: Toolchain files for various specialized architectures \n   (e.g., Blue Gene/Q)\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/config.h.cmake",
    "content": "/*\n   Copyright (c) 2009-2013, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_CONFIG_H\n#define ELEM_CONFIG_H\n\n/* Build type and version information */\n#define ELEM_GIT_SHA1 \"@GIT_SHA1@\"\n#define Elemental_VERSION_MAJOR \"@Elemental_VERSION_MAJOR@\"\n#define Elemental_VERSION_MINOR \"@Elemental_VERSION_MINOR@\"\n#define ELEM_CMAKE_BUILD_TYPE \"@CMAKE_BUILD_TYPE@\"\n#cmakedefine ELEM_RELEASE\n\n/* C compiler info */\n#define ELEM_CMAKE_C_COMPILER    \"@CMAKE_C_COMPILER@\"\n#define ELEM_MPI_C_COMPILER      \"@MPI_C_COMPILER@\"\n#define ELEM_MPI_C_INCLUDE_PATH  \"@MPI_C_INCLUDE_PATH@\"\n#define ELEM_MPI_C_COMPILE_FLAGS \"@MPI_C_COMPILE_FLAGS@\"\n#define ELEM_MPI_C_LINK_FLAGS    \"@MPI_C_LINK_FLAGS@\"\n#define ELEM_MPI_C_LIBRARIES     \"@MPI_C_LIBRARIES@\"\n\n/* C++ compiler info */\n#define ELEM_CMAKE_CXX_COMPILER    \"@CMAKE_CXX_COMPILER@\"\n#define ELEM_CXX_FLAGS             \"@CXX_FLAGS@\"\n#define ELEM_MPI_CXX_COMPILER      \"@MPI_CXX_COMPILER@\"\n#define ELEM_MPI_CXX_INCLUDE_PATH  \"@MPI_CXX_INCLUDE_PATH@\"\n#define ELEM_MPI_CXX_COMPILE_FLAGS \"@MPI_CXX_COMPILE_FLAGS@\"\n#define ELEM_MPI_CXX_LINK_FLAGS    \"@MPI_CXX_LINK_FLAGS@\"\n#define ELEM_MPI_CXX_LIBRARIES     \"@MPI_CXX_LIBRARIES@\"\n\n/* Math libraries */\n#define ELEM_MATH_LIBS \"@MATH_LIBS@\"\n#cmakedefine ELEM_BLAS_POST\n#cmakedefine ELEM_LAPACK_POST\n#cmakedefine ELEM_HAVE_SCALAPACK\n#cmakedefine ELEM_SCALAPACK_POST\n#cmakedefine ELEM_HAVE_FLA_BSVD\n#define ELEM_FORT_LOGICAL @ELEM_FORT_LOGICAL@\n#define ELEM_FORT_TRUE    @ELEM_FORT_TRUE@\n#define ELEM_FORT_FALSE   @ELEM_FORT_FALSE@\n\n/* Basic configuration options */\n#define ELEM_RESTRICT @RESTRICT@\n#cmakedefine ELEM_HAVE_OPENMP\n#cmakedefine ELEM_HAVE_OMP_COLLAPSE\n#cmakedefine ELEM_HAVE_QT5\n#cmakedefine ELEM_HAVE_F90_INTERFACE\n#cmakedefine ELEM_AVOID_COMPLEX_MPI\n#cmakedefine ELEM_HAVE_CXX11RANDOM\n#cmakedefine ELEM_HAVE_STEADYCLOCK\n#cmakedefine ELEM_HAVE_NOEXCEPT\n#cmakedefine ELEM_HAVE_MPI_REDUCE_SCATTER_BLOCK\n#cmakedefine ELEM_HAVE_MPI_IN_PLACE\n#cmakedefine ELEM_HAVE_MPI_LONG_LONG\n#cmakedefine ELEM_HAVE_MPI_COMM_SET_ERRHANDLER\n#cmakedefine ELEM_HAVE_MPI_INIT_THREAD\n#cmakedefine ELEM_HAVE_MPI_QUERY_THREAD\n#cmakedefine ELEM_HAVE_MPI3_NONBLOCKING_COLLECTIVES\n#cmakedefine ELEM_HAVE_MPIX_NONBLOCKING_COLLECTIVES\n#cmakedefine ELEM_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE\n#cmakedefine ELEM_USE_BYTE_ALLGATHERS\n#cmakedefine ELEM_USE_64BIT_INTS\n\n/* Advanced configuration options */\n#cmakedefine ELEM_ZERO_INIT\n#cmakedefine ELEM_CACHE_WARNINGS\n#cmakedefine ELEM_UNALIGNED_WARNINGS\n#cmakedefine ELEM_VECTOR_WARNINGS\n#cmakedefine ELEM_POOL_MEMORY\n#cmakedefine ELEM_AVOID_OMP_FMA\n\n#cmakedefine ELEM_HAVE_VALGRIND\n\n#endif /* ELEM_CONFIG_H */\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/tests/CXX.cmake",
    "content": "include(FindCXXFeatures)\nmessage(STATUS \"CXX11_COMPILER_FLAGS=${CXX11_COMPILER_FLAGS}\")\nset(EXTRA_FLAGS \"${CXX11_COMPILER_FLAGS}\")\nset(CMAKE_REQUIRED_FLAGS ${CXX11_COMPILER_FLAGS})\n\n# Required features\n# =================\nset(ALIAS_CODE\n    \"#include <complex>\n     template<typename Real>\n     using Complex = std::complex<Real>;\n     int main()\n     {\n         Complex<double> a;\n     }\")\ncheck_cxx_source_compiles(\"${ALIAS_CODE}\" ELEM_HAVE_TEMPLATE_ALIAS)\nif(NOT ELEM_HAVE_TEMPLATE_ALIAS)\n  message(FATAL_ERROR \"C++11 template aliasing not detected. You may want to make sure that your compiler is sufficiently up-to-date (e.g., g++ >= 4.7)\")\nendif()\n\n# Standard but inconsistently supported features\n# ==============================================\nset(STEADYCLOCK_CODE\n    \"#include <chrono>\n     int main()\n     {\n         std::chrono::steady_clock clock;\n         return 0;\n     }\")\nset(NOEXCEPT_CODE\n    \"#include <vector>\n     void Foo( const std::vector<int>& x ) noexcept { }\n     int main()\n     { return 0; }\")\ncheck_cxx_source_compiles(\"${STEADYCLOCK_CODE}\" ELEM_HAVE_STEADYCLOCK)\ncheck_cxx_source_compiles(\"${NOEXCEPT_CODE}\" ELEM_HAVE_NOEXCEPT)\n\n# C++11 random number generation\n# ==============================\n# Note: It was noticed that, for certain relatively recent Intel compiler\n#       releases, the following snippets will suggest that normal distributions\n#       are supported, but not uniform integer or real distributions. \n#       Unfortunately, it has been observed that, when one attempts to sample\n#       from a normal distribution, the application hangs indefinitely.\n#       Thus, Elemental takes the approach of requiring all of the following\n#       to be detected before any are used.\nset(NORMAL_CODE\n    \"#include <random>\n     int main()\n     {\n         std::random_device rd;\n         std::mt19937 mt(rd());\n         std::normal_distribution<double> dist(0,1);\n         const double x = dist(mt);\n         return 0;\n     }\")\nset(UNIFORM_INT_CODE\n    \"#include <random>\n     int main()\n     {\n         std::random_device rd;\n         std::mt19937 mt(rd());\n         std::uniform_int_distribution<int> dist(0,10);\n         const int x = dist(mt);\n         return 0;\n     }\")\nset(UNIFORM_REAL_CODE\n    \"#include <random>\n     int main()\n     {\n         std::random_device rd;\n         std::mt19937 mt(rd());\n         std::uniform_real_distribution<double> dist(0,1);\n         const double x = dist(mt);\n         return 0;\n     }\")\ncheck_cxx_source_compiles(\"${NORMAL_CODE}\" ELEM_HAVE_NORMAL_DIST)\ncheck_cxx_source_compiles(\"${UNIFORM_INT_CODE}\" ELEM_HAVE_UNIFORM_INT_DIST)\ncheck_cxx_source_compiles(\"${UNIFORM_REAL_CODE}\" ELEM_HAVE_UNIFORM_REAL_DIST)\nif(ELEM_HAVE_NORMAL_DIST AND \n   ELEM_HAVE_UNIFORM_INT_DIST AND\n   ELEM_HAVE_UNIFORM_REAL_DIST)\n  set(ELEM_HAVE_CXX11RANDOM TRUE)\nelse()\n  set(ELEM_HAVE_CXX11RANDOM FALSE)\nendif()\n\n# \"restrict\" support\n# ==================\nset(RESTRICT_CODE \"int main() { int* RESTRICT a; return 0; }\")\nset(CMAKE_REQUIRED_DEFINITIONS \"-DRESTRICT=__restrict__\")\ncheck_cxx_source_compiles(\"${RESTRICT_CODE}\" HAVE___restrict__)\nset(CMAKE_REQUIRED_DEFINITIONS \"-DRESTRICT=__restrict\")\ncheck_cxx_source_compiles(\"${RESTRICT_CODE}\" HAVE___restrict)\nset(CMAKE_REQUIRED_DEFINITIONS \"-DRESTRICT=restrict\")\ncheck_cxx_source_compiles(\"${RESTRICT_CODE}\" HAVE_restrict)\nif(HAVE___restrict__)\n  set(RESTRICT \"__restrict__\")\n  message(STATUS \"Using __restrict__ keyword.\")\nelseif(HAVE___restrict)\n  set(RESTRICT \"__restrict\")\n  message(STATUS \"Using __restrict keyword.\")\nelseif(HAVE_restrict)\n  set(RESTRICT \"restrict\")\n  message(STATUS \"Using restrict keyword.\")\nelse()\n  set(RESTRICT \"\")\n  message(STATUS \"Could not find a restrict keyword.\")\nendif()\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/tests/Fortran.cmake",
    "content": "# NOTE: There is not a consistent ABI for Fortran's LOGICAL. Though it is\n#       standard for it to be represented in the same manner as INTEGER,\n#       the value for .true. is often +1 but sometimes -1, whereas .false.\n#       is almost always 0. We will thus standardize on .true.=+1 and .false=0,\n#       though this is known to occasionally break. Unfortunately it is\n#       nontrivial to determine this value since the same Fortran compiler\n#       which compiled ScaLAPACK would need to be known in order to create\n#       a custom routine which sets the input to .true. or .false.\nif(NOT ELEM_FORT_LOGICAL)\n  set(ELEM_FORT_LOGICAL int)\nendif()\nif(NOT ELEM_FORT_TRUE)\n  set(ELEM_FORT_TRUE 1)\nendif()\nif(NOT ELEM_FORT_FALSE)\n  set(ELEM_FORT_FALSE 0)\nendif()\n\n# Go ahead and check for Fortran, but keep in mind that CMake's 'OPTIONAL' \n# argument for enable_language is still completely broken as of 2.8.8\nworkaround_9220(Fortran FORTRAN_WORKS)\nif(FORTRAN_WORKS)\n  enable_language(Fortran OPTIONAL)\n  set(ELEM_HAVE_F90_INTERFACE FALSE)\n  if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)\n    include(FortranCInterface)\n    FortranCInterface_VERIFY(CXX)\n    if(FortranCInterface_VERIFIED_CXX)\n      set(ELEM_HAVE_F90_INTERFACE TRUE)\n      FortranCInterface_HEADER(\n        ${CMAKE_CURRENT_BINARY_DIR}/include/elemental/FCMangle.h \n        MACRO_NAMESPACE \"FC_\")\n      install(FILES ${PROJECT_BINARY_DIR}/include/elemental/FCMangle.h\n              DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}/madness/external/elemental/\"\n              COMPONENT elemental)\n    endif()\n  else()\n    message(STATUS \"${CMAKE_Fortran_COMPILER} does not appear to support F90\")\n  endif()\nelse()\n  message(STATUS \"Could not find working Fortran compiler\")\nendif()\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/tests/MPI.cmake",
    "content": "find_package(MPI)\nif(NOT MPI_CXX_FOUND)\n  message(FATAL_ERROR \"MPI C++ compiler was not found and is required\")\nendif()\ninclude_directories(${MPI_CXX_INCLUDE_PATH})\nset(EXTRA_FLAGS \"${EXTRA_FLAGS} ${MPI_CXX_COMPILE_FLAGS}\")\n# Look for MPI_Reduce_scatter_block (and MPI_Reduce_scatter as sanity check)\nset(CMAKE_REQUIRED_FLAGS \"${MPI_C_COMPILE_FLAGS} ${MPI_C_LINK_FLAGS}\")\nset(CMAKE_REQUIRED_INCLUDES ${MPI_C_INCLUDE_PATH})\nset(CMAKE_REQUIRED_LIBRARIES ${MPI_C_LIBRARIES})\ncheck_function_exists(MPI_Reduce_scatter ELEM_HAVE_MPI_REDUCE_SCATTER)\nif(NOT ELEM_HAVE_MPI_REDUCE_SCATTER)\n  message(FATAL_ERROR \"Could not find MPI_Reduce_scatter\")\nendif()\ncheck_function_exists(\n  MPI_Reduce_scatter_block ELEM_HAVE_MPI_REDUCE_SCATTER_BLOCK)\ncheck_function_exists(MPI_Iallgather ELEM_HAVE_MPI3_NONBLOCKING_COLLECTIVES)\ncheck_function_exists(MPIX_Iallgather ELEM_HAVE_MPIX_NONBLOCKING_COLLECTIVES)\ncheck_function_exists(MPI_Init_thread ELEM_HAVE_MPI_INIT_THREAD)\ncheck_function_exists(MPI_Query_thread ELEM_HAVE_MPI_QUERY_THREAD)\ncheck_function_exists(MPI_Comm_set_errhandler ELEM_HAVE_MPI_COMM_SET_ERRHANDLER)\ncheck_function_exists(MPI_Type_create_struct ELEM_HAVE_MPI_TYPE_CREATE_STRUCT)\nif(NOT ELEM_HAVE_MPI_TYPE_CREATE_STRUCT)\n  message(FATAL_ERROR \"Could not find MPI_Type_create_struct\")\nendif()\n# Check for MPI_IN_PLACE (essentially MPI2 support)\nset(MPI_IN_PLACE_CODE\n    \"#include \\\"mpi.h\\\"\n     int main( int argc, char* argv[] )\n     {\n         MPI_Init( &argc, &argv );\n         float a;\n         MPI_Allreduce\n         ( MPI_IN_PLACE, &a, 1, MPI_FLOAT, MPI_SUM, MPI_COMM_WORLD );\n         MPI_Finalize();\n         return 0;\n     }\")\nset(MPI_LONG_LONG_CODE\n    \"#include \\\"mpi.h\\\"\n     int main( int argc, char* argv[] )\n     {\n         MPI_Init( &argc, &argv );\n         MPI_Datatype lli = MPI_LONG_LONG_INT;\n         MPI_Datatype llu = MPI_UNSIGNED_LONG_LONG;\n         MPI_Finalize();\n         return 0;\n     }\")\ncheck_c_source_compiles(\"${MPI_IN_PLACE_CODE}\" ELEM_HAVE_MPI_IN_PLACE)\ncheck_c_source_compiles(\"${MPI_LONG_LONG_CODE}\" ELEM_HAVE_MPI_LONG_LONG)\nif(ELEM_USE_64BIT_INTS AND NOT ELEM_HAVE_MPI_LONG_LONG)\n  message(FATAL_ERROR \n    \"Did not detect MPI_LONG_LONG_INT and MPI_UNSIGNED_LONG_LONG\")\nendif()\n# We cannot simply use check_function_exists, since MPI_Comm_f2c is \n# a macro in some MPI implementations\nset(MPI_COMM_F2C_CODE\n\"#include \\\"mpi.h\\\"\n int main( int argc, char* argv[] )\n {\n     MPI_Init( &argc, &argv );\n     MPI_Fint fint;\n     MPI_Comm comm = MPI_Comm_f2c( fint );\n     MPI_Finalize();\n     return 0;\n }\")\ncheck_c_source_compiles(\"${MPI_COMM_F2C_CODE}\" ELEM_HAVE_MPI_COMM_F2C)\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/tests/Math.cmake",
    "content": "# Check for BLAS and LAPACK support\n# =================================\nif(PURE)\n  set(MATH_DESC \"Unthreaded BLAS/LAPACK link flags\")\nelse()\n  set(MATH_DESC \"Threaded BLAS/LAPACK link flags\")\nendif()\nif(MATH_LIBS)\n  message(STATUS \"Using user-defined MATH_LIBS=${MATH_LIBS}\")\nelseif(APPLE)\n  set(MATH_LIBS \"-framework vecLib\" CACHE STRING ${MATH_DESC})\n  message(STATUS \"Using Apple vecLib framework.\")\nelse()\n  # Look for default BLAS and LAPACK\n  if(REFERENCE_ROOT)\n    message(STATUS \"Searching REFERENCE_ROOT=${REFERENCE_ROOT} for math libs\")\n  endif()\n  set(REFERENCE_REQUIRED LAPACK BLAS)\n  find_library(BLAS_LIB NAMES blas PATHS ${REFERENCE_ROOT})\n  find_library(LAPACK_LIB NAMES lapack reflapack PATHS ${REFERENCE_ROOT})\n  set(REFERENCE_FOUND TRUE)\n  foreach(NAME ${REFERENCE_REQUIRED})\n    if(${NAME}_LIB)\n      message(STATUS \"Found ${NAME}_LIB: ${${NAME}_LIB}\")\n      list(APPEND MATH_LIBS ${${NAME}_LIB})\n    else()\n      message(STATUS \"Could not find ${NAME}_LIB\")\n      set(MATH_LIBS \"\")\n      set(REFERENCE_FOUND FALSE)\n    endif()\n  endforeach()\n  if(REFERENCE_FOUND)\n    message(WARNING \"Using reference BLAS/LAPACK; performance will be poor\")\n  else()\n    message(FATAL_ERROR \"Could not find BLAS/LAPACK. Please specify MATH_LIBS\")\n  endif()\nendif()\n# Check the BLAS and LAPACK underscore conventions\nset(CMAKE_REQUIRED_FLAGS \"${MPI_C_COMPILE_FLAGS} ${MPI_C_LINK_FLAGS}\")\nset(CMAKE_REQUIRED_INCLUDES ${MPI_C_INCLUDE_PATH})\nset(CMAKE_REQUIRED_LIBRARIES \"${MATH_LIBS};${MPI_C_LIBRARIES}\")\ncheck_function_exists(daxpy  ELEM_HAVE_DAXPY)\ncheck_function_exists(daxpy_ ELEM_HAVE_DAXPY_POST)\ncheck_function_exists(dpotrf  ELEM_HAVE_DPOTRF)\ncheck_function_exists(dpotrf_ ELEM_HAVE_DPOTRF_POST)\nif(ELEM_HAVE_DAXPY)\n  set(ELEM_BLAS_POST FALSE)\n  set(ELEM_BLAS_DEFS \"\")\nelseif(ELEM_HAVE_DAXPY_POST)\n  set(ELEM_BLAS_POST TRUE)\n  set(ELEM_BLAS_DEFS \"-DBLAS_POST\")\nelse()\n  message(FATAL_ERROR \"Could not determine BLAS format.\")\nendif()\nif(ELEM_HAVE_DPOTRF)\n  set(ELEM_LAPACK_POST FALSE)\n  set(ELEM_LAPACK_DEFS \"\")\nelseif(ELEM_HAVE_DPOTRF_POST)\n  set(ELEM_LAPACK_POST TRUE)\n  set(ELEM_LAPACK_DEFS \"-DLAPACK_POST\")\nelse()\n  message(FATAL_ERROR \"Could not determine LAPACK format.\")\nendif()\n# Ensure that we have a relatively new version of LAPACK\nif(ELEM_HAVE_DPOTRF)\n  check_function_exists(dsyevr ELEM_HAVE_DSYEVR)\n  if(NOT ELEM_HAVE_DSYEVR)\n    message(FATAL_ERROR \"LAPACK is missing dsyevr\")\n  endif()\nelse()\n  check_function_exists(dsyevr_ ELEM_HAVE_DSYEVR_POST)\n  if(NOT ELEM_HAVE_DSYEVR_POST)\n    message(FATAL_ERROR \"LAPACK is missing dsyevr_\")\n  endif()\nendif()\n\n# Check for libFLAME support\n# ==========================\ncheck_function_exists(FLA_Bsvd_v_opd_var1 ELEM_HAVE_FLA_BSVD)\n\n# Check for ScaLAPACK support\n# ===========================\n# NOTE: pdsyngst was chosen because MKL's ScaLAPACK only defines pdsyngst_,\n#       but not pdsyngst, despite defining both pdpotrf and pdpotrf_. \ncheck_function_exists(pdsyngst  ELEM_HAVE_PDSYNGST)\ncheck_function_exists(pdsyngst_ ELEM_HAVE_PDSYNGST_POST)\ncheck_function_exists(Csys2blacs_handle ELEM_HAVE_CSYS2BLACS)\nif(ELEM_HAVE_PDSYNGST)\n  check_function_exists(pdlaqr0 ELEM_HAVE_PDLAQR0)\n  check_function_exists(pdlaqr1 ELEM_HAVE_PDLAQR1)\n  if(NOT ELEM_HAVE_PDLAQR0 OR NOT ELEM_HAVE_PDLAQR1 OR \n     NOT ELEM_HAVE_CSYS2BLACS)\n    message(STATUS \"ScaLAPACK must support PDLAQR{0,1} and Csys2blacs_handle.\")\n    set(ELEM_HAVE_SCALAPACK FALSE)\n  else()\n    set(ELEM_HAVE_SCALAPACK TRUE)\n  endif()\n  set(ELEM_SCALAPACK_POST FALSE)\n  set(ELEM_SCALAPACK_DEFS \"\")\nelseif(ELEM_HAVE_PDSYNGST_POST)\n  check_function_exists(pdlaqr0_ ELEM_HAVE_PDLAQR0_POST)\n  check_function_exists(pdlaqr1_ ELEM_HAVE_PDLAQR1_POST)\n  if(NOT ELEM_HAVE_PDLAQR0_POST OR NOT ELEM_HAVE_PDLAQR1_POST OR\n     NOT ELEM_HAVE_CSYS2BLACS)\n    message(STATUS \"ScaLAPACK must support PDLAQR{0,1} and Csys2blacs_handle.\")\n  else()\n    set(ELEM_HAVE_SCALAPACK TRUE)\n  endif()\n  set(ELEM_SCALAPACK_POST TRUE)\n  set(ELEM_SCALAPACK_DEFS \"-DBLAS_POST\")\nelse()\n  set(ELEM_HAVE_SCALAPACK FALSE)\n  message(STATUS \"ScaLAPACK was NOT detected.\")\nendif()\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/tests/OpenMP.cmake",
    "content": "if(HYBRID)\n  if(OpenMP_CXX_FLAGS)\n    set(ELEM_HAVE_OPENMP TRUE)\n    set(OpenMP_CXX_FLAGS ${OpenMP_CXX_FLAGS})\n    message(STATUS \"Using OpenMP_CXX_FLAGS=${OpenMP_CXX_FLAGS}\")\n  else()\n    find_package(OpenMP)\n    if(OPENMP_FOUND)\n      set(ELEM_HAVE_OPENMP TRUE)\n    else()\n      set(OpenMP_CXX_FLAGS \"\" CACHE STRING \"OpenMP CXX FLAGS\")\n      message(FATAL_ERROR\n        \"Hybrid build failed because OpenMP support not detected. Please specify OpenMP_CXX_FLAGS.\")\n    endif()\n  endif()\n  set(EXTRA_FLAGS \"${OpenMP_CXX_FLAGS} ${EXTRA_FLAGS}\")\nendif()\n# See if we have 'collapse' support, since Clang is currently setting _OPENMP\n# greater than 200805 despite not supporting OpenMP 3.0 (i.e., collapse)\nset(CMAKE_REQUIRED_FLAGS ${OpenMP_CXX_FLAGS})\nset(OMP_COLLAPSE_CODE\n    \"#include <omp.h>\n     int main( int argc, char* argv[] ) \n     {\n         int k[100];\n     #pragma omp collapse(2)\n         for( int i=0; i<10; ++i ) \n             for( int j=0; j<10; ++j )\n                 k[i+j*10] = i+j; \n         return 0; \n     }\")\ncheck_cxx_source_compiles(\"${OMP_COLLAPSE_CODE}\" ELEM_HAVE_OMP_COLLAPSE)\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/tests/Qt5.cmake",
    "content": "set(ELEM_HAVE_QT5 FALSE)\nif(Qt5_DIR)\n  set(Qt5_LIBDIR \"${Qt5_DIR}/lib\")\nendif()\nif(Qt5_LIBDIR)\n  set(Qt5Widgets_DIR \"${Qt5_LIBDIR}/cmake/Qt5Widgets\")\nendif()\nif(ELEM_USE_QT5 OR Qt5Widgets_DIR)\n  # Search for Qt5\n  find_package(Qt5Widgets)\n  if(Qt5Widgets_FOUND)\n    set(ELEM_HAVE_QT5 TRUE)\n    message(STATUS \"Found Qt5\")\n  else()\n    message(STATUS \"Did NOT find Qt5\")\n  endif()\nendif()\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/BGQ-Mira-clang-essl.cmake",
    "content": "#set(CMAKE_SYSTEM_NAME BlueGeneQ-static)\n\nset(GCC_ROOT  \"/bgsys/drivers/ppcfloor/gnu-linux\")\nset(GCC_NAME  \"powerpc64-bgq-linux\")\nset(CLANG_ROOT \"/home/projects/llvm\")\nset(CLANG_MPI_ROOT \"/home/projects/llvm/mpi/bgclang\")\nset(IBMCMP_ROOT \"$ENV{IBM_MAIN_DIR}\")\n\nset(BLAS_LIB \"/soft/libraries/alcf/current/xl/BLAS/lib\")\nset(LAPACK_LIB \"/soft/libraries/alcf/current/xl/LAPACK/lib\")\nset(ESSL_LIB \"/soft/libraries/essl/current/essl/5.1/lib64\")\n\nset(MPI_ROOT   \"/bgsys/drivers/ppcfloor/comm/gcc\")\nset(PAMI_ROOT  \"/bgsys/drivers/ppcfloor/comm/sys\")\nset(SPI_ROOT   \"/bgsys/drivers/ppcfloor/spi\")\n\n# The serial compilers\nset(CMAKE_C_COMPILER       \"${CLANG_ROOT}/wbin/bgclang\")\nset(CMAKE_CXX_COMPILER     \"${CLANG_ROOT}/wbin/bgclang++11\")\nset(CMAKE_Fortran_COMPILER \"${GCC_ROOT}/bin/${GCC_NAME}-gfortran\")\n\n# The MPI wrappers for the C and C++ compilers\nset(MPI_C_COMPILER   \"${CLANG_MPI_ROOT}/bin/mpiclang\")\nset(MPI_CXX_COMPILER \"${CLANG_MPI_ROOT}/bin/mpiclang++11\")\n\nset(MPI_C_COMPILE_FLAGS    \"\")\nset(MPI_CXX_COMPILE_FLAGS  \"\")\nset(MPI_C_INCLUDE_PATH     \"${MPI_ROOT}/include\")\nset(MPI_CXX_INCLUDE_PATH   \"${MPI_ROOT}/include\")\nset(MPI_C_LINK_FLAGS       \"-L${MPI_ROOT}/lib -L${PAMI_ROOT}/lib -L${SPI_ROOT}/lib\")\nset(MPI_CXX_LINK_FLAGS     \"${MPI_C_LINK_FLAGS}\")\nset(MPI_C_LIBRARIES       \"${MPI_C_LINK_FLAGS}   -lmpich -lopa -lmpl -lpami -lSPI -lSPI_cnk -lrt -lpthread -lstdc++ -lpthread\")\nset(MPI_CXX_LIBRARIES     \"${MPI_CXX_LINK_FLAGS} -lcxxmpich ${MPI_C_LIBRARIES}\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-O3\")\nendif()\n\nset(CMAKE_THREAD_LIBS_INIT \"-fopenmp\")\nset(OpenMP_CXX_FLAGS \"-fopenmp\")\n\n##############################################################\n\n# set the search path for the environment coming with the compiler\n# and a directory where you can install your own compiled software\nset(CMAKE_FIND_ROOT_PATH\n    /bgsys/drivers/ppcfloor\n    /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux\n    /bgsys/drivers/ppcfloor/comm/xl\n    /bgsys/drivers/ppcfloor/comm/sys\n    /bgsys/drivers/ppcfloor/spi\n)\n\n# adjust the default behaviour of the FIND_XXX() commands:\n# search headers and libraries in the target environment, search\n# programs in the host environment\nset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\n##############################################################\n\nset(XLF_LIB \"${IBMCMP_ROOT}/xlf/bg/14.1/bglib64\")\nset(XLSMP_LIB \"${IBMCMP_ROOT}/xlsmp/bg/3.1/bglib64\")\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES PureRelease)\n  set(MATH_LIBS \"-L${ESSL_LIB} -lesslbg -L${LAPACK_LIB} -llapack -L${ESSL_LIB} -lesslbg -L${XLF_LIB} -lxlf90_r -L${XLSMP_LIB} -lxlomp_ser -lxlopt -lxlfmath -lxl -lpthread -ldl -Wl,--allow-multiple-definition\")\nelse()\n  set(MATH_LIBS \"-L${ESSL_LIB} -lesslsmpbg -L${LAPACK_LIB} -llapack -L${ESSL_LIB} -lesslsmpbg -L${XLF_LIB} -lxlf90_r -L${XLSMP_LIB} -lxlsmp -lxlopt -lxlfmath -lxl -lpthread -ldl -Wl,--allow-multiple-definition\")\nendif()\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/BGQ-Vesta-clang-essl.cmake",
    "content": "#set(CMAKE_SYSTEM_NAME BlueGeneQ-static)\n\nset(GCC_ROOT  \"/bgsys/drivers/ppcfloor/gnu-linux\")\nset(GCC_NAME  \"powerpc64-bgq-linux\")\nset(CLANG_ROOT \"/home/projects/llvm\")\nset(CLANG_MPI_ROOT \"/home/projects/llvm/mpi/bgclang\")\nset(IBMCMP_ROOT \"$ENV{IBM_MAIN_DIR}\")\n\nset(MATH_ROOT \"/soft/libraries/alcf/current/xl\")\nset(ESSL_ROOT \"/soft/libraries/essl/current/essl/5.1\")\nset(BLAS_LIB \"${MATH_ROOT}/BLAS/lib\")\nset(LAPACK_LIB \"${MATH_ROOT}/LAPACK/lib\")\nset(ESSL_LIB \"${ESSL_ROOT}/lib64\")\nset(MASS_LIB \"${IBMCMP_ROOT}/xlmass/bg/7.3/bglib64\")\nset(XLF_LIB \"${IBMCMP_ROOT}/xlf/bg/14.1/bglib64\")\nset(XLSMP_LIB \"${IBMCMP_ROOT}/xlsmp/bg/3.1/bglib64\")\n\n# V1R2M0\n#set(MPI_ROOT  \"/bgsys/drivers/ppcfloor/comm/gcc\")\n#set(PAMI_ROOT \"/bgsys/drivers/ppcfloor/comm/sys\")\n# V1R2M1\nset(MPI_ROOT  \"/bgsys/drivers/ppcfloor/comm\")\nset(PAMI_ROOT \"/bgsys/drivers/ppcfloor/comm\")\nset(SPI_ROOT  \"/bgsys/drivers/ppcfloor/spi\")\n\n# The serial compilers\nset(CMAKE_C_COMPILER       \"${CLANG_ROOT}/wbin/bgclang\")\nset(CMAKE_CXX_COMPILER     \"${CLANG_ROOT}/wbin/bgclang++11\")\nset(CMAKE_Fortran_COMPILER \"${GCC_ROOT}/bin/${GCC_NAME}-gfortran\")\n\n# The MPI wrappers for the C and C++ compilers\nset(MPI_C_COMPILER   \"${CLANG_MPI_ROOT}/bin/mpiclang\")\nset(MPI_CXX_COMPILER \"${CLANG_MPI_ROOT}/bin/mpiclang++11\")\n\nset(MPI_C_COMPILE_FLAGS    \"\")\nset(MPI_CXX_COMPILE_FLAGS  \"\")\nset(MPI_C_INCLUDE_PATH     \"${MPI_ROOT}/include\")\nset(MPI_CXX_INCLUDE_PATH   \"${MPI_ROOT}/include\")\nset(MPI_C_LINK_FLAGS       \"-L${MPI_ROOT}/lib -L${PAMI_ROOT}/lib -L${SPI_ROOT}/lib\")\nset(MPI_CXX_LINK_FLAGS     \"${MPI_C_LINK_FLAGS}\")\n\n# V1R2M0\n#set(MPI_C_LIBRARIES       \"-lmpich -lopa -lmpl -ldl -lpami -lSPI -lSPI_cnk -lpthread -lrt -lstdc++\")\n#set(MPI_CXX_LIBRARIES     \"-lcxxmpich ${MPI_C_LIBRARIES}\")\n# V1R2M1\nset(MPI_C_LIBRARIES       \"${MPI_C_LINK_FLAGS}   -lmpich-xl -lopa-xl -lmpl-xl -lpami-gcc -lSPI -lSPI_cnk -lrt -lpthread -lstdc++ -lpthread\")\nset(MPI_CXX_LIBRARIES     \"${MPI_CXX_LINK_FLAGS} -lmpichcxx-xl ${MPI_C_LIBRARIES}\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-g -O3\")\nendif()\n\nset(CMAKE_THREAD_LIBS_INIT \"-fopenmp\")\nset(OpenMP_CXX_FLAGS \"-fopenmp\")\n\n##############################################################\n\n# set the search path for the environment coming with the compiler\n# and a directory where you can install your own compiled software\nset(CMAKE_FIND_ROOT_PATH\n    /bgsys/drivers/ppcfloor/\n    ${MPI_ROOT}\n    ${PAMI_ROOT}\n    ${SPI_ROOT}\n    ${GCC_ROOT}\n    ${IBMCMP_ROOT}\n    ${MATH_ROOT}\n    ${ESSL_ROOT})\n\n# adjust the default behaviour of the FIND_XXX() commands:\n# search headers and libraries in the target environment, search\n# programs in the host environment\nset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\n##############################################################\n\nset(LAPACK_FLAGS \"-L${LAPACK_LIB} -llapack\")\nset(XLF_FLAGS \"-L${XLF_LIB} -lxlf90_r\")\nset(MASS_FLAGS \"-L${MASS_LIB} -lmassv -lmass\")\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES PureRelease OR \n   NOT CMAKE_BUILD_TYPE)\n  set(ESSL_FLAGS \"-L${ESSL_LIB} -lesslbg\")\n  set(XL_FLAGS \"-L${XLSMP_LIB} -lxlomp_ser\")\nelse()\n  set(ESSL_FLAGS \"-L${ESSL_LIB} -lesslsmpbg\")\n  set(XL_FLAGS \"-L${XLSMP_LIB} -lxlsmp\")\nendif()\n\n#set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})\n#set(CMAKE_EXE_LINKER_FLAGS \"-static\")\n#set(MATH_LIBS \"${LAPACK_FLAGS} ${ESSL_FLAGS} ${XLF_FLAGS} ${XL_FLAGS} -lxlopt -lxlfmath -lxl -lgfortran -lm -lpthread -ldl -Wl,--allow-multiple-definition\")\n\n# NOTE: It is apparently important that MATH_LIBS not begin with a full path\n#       to a particular file, e.g., /path/to/libname.a, as CMake is \n#       prepending -L for some reason.\nset(MATH_LIBS \"-L/soft/libraries/alcf/current/xl/SCALAPACK/lib -lscalapack ${LAPACK_FLAGS} ${ESSL_FLAGS} ${MASS_FLAGS} ${XLF_FLAGS} ${XL_FLAGS} -lxlopt -lxlfmath -lxl -lpthread -ldl -Wl,--allow-multiple-definition\")\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/BGQ-Vesta-clang-netlib.cmake",
    "content": "#set(CMAKE_SYSTEM_NAME BlueGeneQ-static)\n\n# The serial compilers\nset(GCC_ROOT \"/bgsys/drivers/ppcfloor/gnu-linux\")\nset(GCC_NAME \"powerpc64-bgq-linux\")\nset(CLANG_ROOT \"/home/projects/llvm\")\nset(CMAKE_C_COMPILER       \"${CLANG_ROOT}/bin/bgclang\")\nset(CMAKE_CXX_COMPILER     \"${CLANG_ROOT}/bin/bgclang++\")\nset(CMAKE_Fortran_COMPILER \"${GCC_ROOT}/bin/${GCC_NAME}-gfortran\")\n\n# The MPI wrappers for the C and C++ compilers\nset(MPI_ROOT  \"/bgsys/drivers/ppcfloor/comm/gcc\")\nset(PAMI_ROOT \"/bgsys/drivers/ppcfloor/comm/sys\")\nset(SPI_ROOT  \"/bgsys/drivers/ppcfloor/spi\")\nset(MPI_C_COMPILE_FLAGS   \"\")\nset(MPI_CXX_COMPILE_FLAGS \"\")\nset(MPI_C_INCLUDE_PATH   \"${MPI_ROOT}/include\")\nset(MPI_CXX_INCLUDE_PATH \"${MPI_ROOT}/include\")\nset(MPI_C_LINK_FLAGS   \"-L${MPI_ROOT}/lib -L${PAMI_ROOT}/lib -L${SPI_ROOT}/lib\")\nset(MPI_CXX_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_C_LIBRARIES \"-lmpich -lopa -lmpl -ldl -lpami -lSPI -lSPI_cnk -lpthread -lrt -lstdc++\")\nset(MPI_CXX_LIBRARIES \"-lcxxmpich ${MPI_C_LIBRARIES}\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-g -O3\")\nendif()\n\n#set(CMAKE_THREAD_LIBS_INIT \"-fopenmp\")\n#set(OpenMP_CXX_FLAGS \"-fopenmp\")\n\n##############################################################\n\n# set the search path for the environment coming with the compiler\n# and a directory where you can install your own compiled software\nset(CMAKE_FIND_ROOT_PATH\n    /bgsys/drivers/ppcfloor/\n    /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux\n    /bgsys/drivers/ppcfloor/comm/gcc\n    /bgsys/drivers/ppcfloor/comm/sys/\n    /bgsys/drivers/ppcfloor/spi/)\n\n# adjust the default behaviour of the FIND_XXX() commands:\n# search headers and libraries in the target environment, search\n# programs in the host environment\nset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\n##############################################################\n\n#set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})\n#set(CMAKE_EXE_LINKER_FLAGS \"-static\")\nset(MATH_LIBS \"-L/soft/libraries/alcf/current/gcc/SCALAPACK/lib -lscalapack -L/soft/libraries/alcf/current/gcc/LAPACK/lib -llapack -L/soft/libraries/alcf/current/gcc/BLAS/lib -lblas -lgfortran -lm\")\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/BGQ-Vesta-gnu-essl.cmake",
    "content": "#set(CMAKE_SYSTEM_NAME BlueGeneQ-static)\n\n# The serial compilers are typically set here, but, at least at some point,\n# it was easier to set them to the MPI compilers.\nset(MPI_ROOT  \"/bgsys/drivers/ppcfloor/comm/gcc\")\nset(CMAKE_C_COMPILER       ${MPI_ROOT}/bin/mpicc)\nset(CMAKE_CXX_COMPILER     ${MPI_ROOT}/bin/mpicxx)\nset(CMAKE_Fortran_COMPILER ${MPI_ROOT}/bin/mpif77)\n\n# The MPI wrappers for the C and C++ compilers\nset(MPI_C_COMPILER   ${MPI_ROOT}/bin/mpicc)\nset(MPI_CXX_COMPILER ${MPI_ROOT}/bin/mpicxx)\n\nset(PAMI_ROOT \"/bgsys/drivers/ppcfloor/comm/sys\")\nset(SPI_ROOT  \"/bgsys/drivers/ppcfloor/spi\")\nset(MPI_C_COMPILE_FLAGS   \"\")\nset(MPI_CXX_COMPILE_FLAGS \"\")\nset(MPI_C_INCLUDE_PATH   \"${MPI_ROOT}/include\")\nset(MPI_CXX_INCLUDE_PATH \"${MPI_ROOT}/include\")\nset(MPI_C_LINK_FLAGS   \"-L${MPI_ROOT}/lib -L${PAMI_ROOT}/lib -L${SPI_ROOT}/lib\")\nset(MPI_CXX_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_C_LIBRARIES \"-lmpich -lopa -lmpl -ldl -lpami -lSPI -lSPI_cnk -lpthread -lrt -lstdc++\")\nset(MPI_CXX_LIBRARIES \"-lcxxmpich ${MPI_C_LIBRARIES}\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-g -O3\")\nendif()\n\nset(CMAKE_THREAD_LIBS_INIT \"-fopenmp\")\nset(OpenMP_CXX_FLAGS \"-fopenmp\")\n\n##############################################################\n\n# set the search path for the environment coming with the compiler\n# and a directory where you can install your own compiled software\nset(CMAKE_FIND_ROOT_PATH\n    /bgsys/drivers/ppcfloor/\n    /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux\n    /bgsys/drivers/ppcfloor/comm/gcc\n    /bgsys/drivers/ppcfloor/comm/sys/\n    /bgsys/drivers/ppcfloor/spi/)\n\n# adjust the default behaviour of the FIND_XXX() commands:\n# search headers and libraries in the target environment, search\n# programs in the host environment\nset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\n##############################################################\n\nset(LAPACK_LIB \"/soft/libraries/alcf/current/gcc/LAPACK/lib\")\nset(ESSL_LIB \"/soft/libraries/essl/current/essl/5.1/lib64\")\nset(IBMCMP_ROOT \"/soft/compilers/ibmcmp-nov2012\")\nset(XLF_LIB \"${IBMCMP_ROOT}/xlf/bg/14.1/bglib64\")\nset(XLSMP_LIB \"${IBMCMP_ROOT}/xlsmp/bg/3.1/bglib64\")\n\nset(LAPACK_FLAGS \"-L${LAPACK_LIB} -llapack\")\nset(XLF_FLAGS \"-L${XLF_LIB} -lxlf90_r\")\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES PureRelease OR \n   NOT CMAKE_BUILD_TYPE)\n  set(ESSL_FLAGS \"-L${ESSL_LIB} -lesslbg\")\n  set(XL_FLAGS \"-L${XLSMP_LIB} -lxlomp_ser\")\nelse()\n  set(ESSL_FLAGS \"-L${ESSL_LIB} -lesslsmpbg\") \n  set(XL_FLAGS \"-L${XLSMP_LIB} -lxlsmp\")\nendif()\n\n#set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})\n#set(CMAKE_EXE_LINKER_FLAGS \"-static\")\nset(MATH_LIBS \"-L/soft/libraries/alcf/current/gcc/SCALAPACK/lib -lscalapack ${LAPACK_FLAGS} ${ESSL_FLAGS} ${XLF_FLAGS} ${XL_FLAGS} -lxlopt -lxlfmath -lxl -lgfortran -lm -lpthread -ldl -Wl,--allow-multiple-definition\")\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/BGQ-Vesta-gnu-netlib.cmake",
    "content": "#set(CMAKE_SYSTEM_NAME BlueGeneQ-static)\n\n# The serial compilers are typically set here, but, at least at some point,\n# it was easier to set them to the MPI compilers.\nset(MPI_ROOT  \"/bgsys/drivers/ppcfloor/comm/gcc\")\nset(CMAKE_C_COMPILER       ${MPI_ROOT}/bin/mpicc)\nset(CMAKE_CXX_COMPILER     ${MPI_ROOT}/bin/mpicxx)\nset(CMAKE_Fortran_COMPILER ${MPI_ROOT}/bin/mpif77)\n\n# The MPI wrappers for the C and C++ compilers\nset(MPI_C_COMPILER   ${MPI_ROOT}/bin/mpicc)\nset(MPI_CXX_COMPILER ${MPI_ROOT}/bin/mpicxx)\n\nset(PAMI_ROOT \"/bgsys/drivers/ppcfloor/comm/sys\")\nset(SPI_ROOT  \"/bgsys/drivers/ppcfloor/spi\")\nset(MPI_C_COMPILE_FLAGS   \"\")\nset(MPI_CXX_COMPILE_FLAGS \"\")\nset(MPI_C_INCLUDE_PATH   \"${MPI_ROOT}/include\")\nset(MPI_CXX_INCLUDE_PATH \"${MPI_ROOT}/include\")\nset(MPI_C_LINK_FLAGS   \"-L${MPI_ROOT}/lib -L${PAMI_ROOT}/lib -L${SPI_ROOT}/lib\")\nset(MPI_CXX_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_C_LIBRARIES \"-lmpich -lopa -lmpl -ldl -lpami -lSPI -lSPI_cnk -lpthread -lrt -lstdc++\")\nset(MPI_CXX_LIBRARIES \"-lcxxmpich ${MPI_C_LIBRARIES}\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-g -O3\")\nendif()\n\nset(CMAKE_THREAD_LIBS_INIT \"-fopenmp\")\nset(OpenMP_CXX_FLAGS \"-fopenmp\")\n\n##############################################################\n\n# set the search path for the environment coming with the compiler\n# and a directory where you can install your own compiled software\nset(CMAKE_FIND_ROOT_PATH\n    /bgsys/drivers/ppcfloor/\n    /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux\n    /bgsys/drivers/ppcfloor/comm/gcc\n    /bgsys/drivers/ppcfloor/comm/sys/\n    /bgsys/drivers/ppcfloor/spi/)\n\n# adjust the default behaviour of the FIND_XXX() commands:\n# search headers and libraries in the target environment, search\n# programs in the host environment\nset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\n##############################################################\n\n#set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})\n#set(CMAKE_EXE_LINKER_FLAGS \"-static\")\nset(MATH_LIBS \"-L/soft/libraries/alcf/current/gcc/SCALAPACK/lib -lscalapack -L/soft/libraries/alcf/current/gcc/LAPACK/lib -llapack -L/soft/libraries/alcf/current/gcc/BLAS/lib -lblas -lgfortran -lm\")\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/Edison-gnu-mpich-libsci.cmake",
    "content": "# NOTE: You will need to have the GNU environment loaded, e.g., via the command\n#       \n# module swap PrgEnv-intel PrgEnv-gnu\n#\n\n# The Cray wrappers\nset(COMPILER_DIR /opt/cray/craype/1.01/bin)\nset(CMAKE_C_COMPILER       ${COMPILER_DIR}/cc)\nset(CMAKE_CXX_COMPILER     ${COMPILER_DIR}/CC)\nset(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/ftn)\n\n# This is just a hack, as this machine always uses the above wrappers\nset(MPI_C_COMPILER ${CMAKE_C_COMPILER})\nset(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})\nset(MPI_Fortran_COMPILER ${CMAKE_Fortran_COMPILER})\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(C_FLAGS   \"-g -static -Wl,-Bstatic\")\n  set(CXX_FLAGS \"-g -static -Wl,-Bstatic\")\nelse()\n  set(C_FLAGS   \"-O3 -static -Wl,-Bstatic\")\n  set(CXX_FLAGS \"-O3 -static -Wl,-Bstatic\")\nendif()\n\nset(OpenMP_CXX_FLAGS \"-fopenmp\")\n\n#set(MATH_LIBS \"/opt/xt-libsci/11.0.06/gnu/46/mc12/lib/libsci_gnu.a;/opt/gcc/4.7.1/snos/lib64/libgfortran.a;-lm\")\n#set(MATH_LIBS \"/opt/cray/libsci/default/GNU/47/sandybridge/lib/libsci_gnu.a;/opt/gcc/4.7.2/snos/lib64/libgfortran.a;-lm\")\n#set(MATH_LIBS \"/opt/cray/libsci/default/GNU/47/sandybridge/lib/libsci_gnu.a;/opt/gcc/4.7.2/snos/lib64/libgfortran.a;/opt/cray/xc-sysroot/5.0.15/usr/lib64/libm.a\")\nset(MATH_LIBS \"/opt/cray/libsci/default/GNU/47/sandybridge/lib/libsci_gnu.a\")\nset(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})\nset(BUILD_SHARED_LIBS OFF)\nset(CMAKE_EXE_LINKER_FLAGS \"-static\")\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/Hopper-gnu-mpich2-libsci.cmake",
    "content": "# NOTE: You will need to have the GNU environment loaded, e.g., via the command\n#       \n#       module swap PrgEnv-pgi PrgEnv-gnu\n#\n\n# The Cray wrappers\nset(COMPILER_DIR /opt/cray/xt-asyncpe/5.10/bin)\nset(CMAKE_C_COMPILER       ${COMPILER_DIR}/cc)\nset(CMAKE_CXX_COMPILER     ${COMPILER_DIR}/CC)\nset(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/ftn)\n\n# This is just a hack, as this machine always uses the above wrappers\nset(MPI_C_COMPILER ${CMAKE_C_COMPILER})\nset(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})\nset(MPI_Fortran_COMPILER ${CMAKE_Fortran_COMPILER})\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-O3 -ffast-math\")\nendif()\n\nset(OpenMP_CXX_FLAGS \"-fopenmp\")\n\nset(MATH_LIBS \"/opt/xt-libsci/11.0.06/gnu/46/mc12/lib/libsci_gnu.a;/opt/gcc/4.7.1/snos/lib64/libgfortran.a;-lm\")\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/Lonestar-intel-mvapich2-mkl.cmake",
    "content": "# The serial Intel compilers\nset(COMPILER_DIR /opt/apps/intel/11.1/bin/intel64)\nset(CMAKE_C_COMPILER       ${COMPILER_DIR}/icc)\nset(CMAKE_CXX_COMPILER     ${COMPILER_DIR}/icpc)\nset(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/ifort)\n\n# The MPI wrappers for the C and C++ compilers\nset(MPI_COMPILER_DIR /opt/apps/intel11_1/mvapich2/1.6/bin)\nset(MPI_C_COMPILER       ${MPI_COMPILER_DIR}/mpicc)\nset(MPI_CXX_COMPILER     ${MPI_COMPILER_DIR}/mpicxx)\nset(MPI_Fortran_COMPILER ${MPI_COMPILER_DIR}/mpif90)\n\nset(MPI_C_COMPILE_FLAGS \"\")\nset(MPI_CXX_COMPILE_FLAGS \"\")\nset(MPI_Fortran_COMPILE_FLAGS \"\")\nset(MPI_C_INCLUDE_PATH       /opt/apps/intel11_1/mvapich2/1.6/include)\nset(MPI_CXX_INCLUDE_PATH     ${MPI_C_INCLUDE_PATH})\nset(MPI_Fortran_INCLUDE_PATH ${MPI_C_INCLUDE_PATH})\nset(MPI_C_LINK_FLAGS \"-Wl,-rpath,/opt/apps/intel/11.1/lib/intel64 -L/opt/apps/intel/11.1/lib/intel64 -Wl,-rpath,/opt/apps/limic2/0.5.4/lib -L/opt/apps/limic2/0.5.4/lib -L/opt/apps/intel11_1/mvapich2/1.6/lib -L/opt/ofed/lib64/\")\nset(MPI_CXX_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_Fortran_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_BASE_LIBS \n    \"-lmpich -lopa -llimic2 -lpthread -lrdmacm -libverbs -libumad -ldl -lrt\")\nset(MPI_C_LIBRARIES \"-limf ${MPI_BASE_LIBS}\")\nset(MPI_CXX_LIBRARIES \"-limf -lmpichcxx ${MPI_BASE_LIBS}\")\nset(MPI_Fortran_LIBRARIES \"-limf -lmpichf90 ${MPI_BASE_LIBS}\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-O3\")\nendif()\n\nset(OpenMP_CXX_FLAGS \"-openmp\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES PureRelease OR\n   NOT CMAKE_BUILD_TYPE)\n  set(MATH_LIBS \"-L/opt/apps/intel/11.1/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core /opt/apps/intel/11.1/lib/intel64/libifcore.a /opt/apps/intel/11.1/lib/intel64/libsvml.a\")\nelse()\n  set(MATH_LIBS \"-L/opt/apps/intel/11.1/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide -lpthread /opt/apps/intel/11.1/lib/intel64/libifcore.a /opt/apps/intel/11.1/lib/intel64/libsvml.a\")\nendif()\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/Longhorn-intel-mvapich2-mkl.cmake",
    "content": "# The serial Intel compilers\nset(COMPILER_DIR /opt/apps/intel/11.1/bin/intel64)\nset(CMAKE_C_COMPILER       ${COMPILER_DIR}/icc)\nset(CMAKE_CXX_COMPILER     ${COMPILER_DIR}/icpc)\nset(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/ifort)\n\n# The MPI wrappers for the C and C++ compilers\nset(MPI_COMPILER_DIR /opt/apps/intel11_1/mvapich2/1.4/bin)\nset(MPI_C_COMPILER       ${MPI_COMPILER_DIR}/mpicc)\nset(MPI_CXX_COMPILER     ${MPI_COMPILER_DIR}/mpicxx)\nset(MPI_Fortran_COMPILER ${MPI_COMPILER_DIR}/mpif90)\nset(MPI_C_COMPILE_FLAGS \"\")\nset(MPI_CXX_COMPILE_FLAGS \"\")\nset(MPI_Fortran_COMPILE_FLAGS \"\")\nset(MPI_C_INCLUDE_PATH   /opt/apps/intel11_1/mvapich2/1.4/include)\nset(MPI_CXX_INCLUDE_PATH ${MPI_C_INCLUDE_PATH})\nset(MPI_Fortran_INCLUDE_PATH ${MPI_C_INCLUDE_PATH})\nset(MPI_C_LINK_FLAGS \"-Wl,-rpath,/opt/apps/intel/11.1/lib/intel64 -Wl,-rpath,/opt/apps/intel/11.1/lib/intel64 -Wl,-rpath -L/opt/apps/intel11_1/mvapich2/1.4/lib -L/opt/ofed/lib64/\")\nset(MPI_CXX_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_Fortran_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_BASE_LIBS \"-lmpich -lpthread -lrdmacm -libverbs -libumad -ldl -lrt\")\nset(MPI_C_LIBRARIES \"-limf ${MPI_BASE_LIBS}\")\nset(MPI_CXX_LIBRARIES \"-limf -lmpichcxx ${MPI_BASE_LIBS}\")\nset(MPI_Fortran_LIBRARIES \"-limf -lmpichf90 ${MPI_BASE_LIBS}\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-O3\")\nendif()\n\nset(OpenMP_CXX_FLAGS \"-openmp\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES PureRelease)\n  set(MATH_LIBS \"-L/opt/apps/intel/mkl/10.2.2.025/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm\")\nelse()\n  set(MATH_LIBS \"-L/opt/apps/intel/11.1/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide -lpthread -lm\")\nendif()\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/README.md",
    "content": "### `cmake/toolchains/`\n\nThis folder contains a variety of toolchain files (several user-contributed)\nwhich are in different states of repair. They are provided in the hopes that\nthey might be useful but it is likely that at least one is non-functional.\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/Ranger-gnu-mvapich-mkl.cmake",
    "content": "# Set the serial GCC compilers\nset(COMPILER_DIR /opt/apps/gcc_amd/4.4.5/bin)\nset(CMAKE_C_COMPILER       ${COMPILER_DIR}/gcc)\nset(CMAKE_CXX_COMPILER     ${COMPILER_DIR}/g++)\nset(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/gfortran)\n\n# Set the MPI wrappers for the C and C++ compilers\nset(MPI_COMPILER_DIR /opt/apps/gcc4_4/mvapich/1.0.1/bin)\nset(MPI_C_COMPILER       ${MPI_COMPILER_DIR}/mpicc)\nset(MPI_CXX_COMPILER     ${MPI_COMPILER_DIR}/mpicxx)\nset(MPI_Fortran_COMPILER ${MPI_COMPILER_DIR}/mpif90)\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-O3\")\nendif()\n\nset(OpenMP_CXX_FLAGS \"-fopenmp\")\n\nset(MATH_LIBS \n    \"-L/opt/apps/intel/mkl/10.0.1.014/lib/em64t -lmkl_em64t -lmkl -lguide -lpthread /opt/apps/gcc_amd/4.4.5/lib64/libgfortran.a -lm\")\n\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/Ranger-gnu-mvapich2-mkl.cmake",
    "content": "# Set the serial GCC compilers\nset(COMPILER_DIR /opt/apps/gcc_amd/4.4.5/bin)\nset(CMAKE_C_COMPILER       ${COMPILER_DIR}/gcc)\nset(CMAKE_CXX_COMPILER     ${COMPILER_DIR}/g++)\nset(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/gfortran)\n\n# Set the MPI wrappers for the C and C++ compilers\nset(MPI_COMPILER_DIR /opt/apps/gcc4_4/mvapich2/1.2/bin)\nset(MPI_C_COMPILER       ${MPI_COMPILER_DIR}/mpicc)\nset(MPI_CXX_COMPILER     ${MPI_COMPILER_DIR}/mpicxx)\nset(MPI_Fortran_COMPILER ${MPI_COMPILER_DIR}/mpif90)\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-O3\")\nendif()\n\nset(OpenMP_CXX_FLAGS \"-fopenmp\")\n\nset(MATH_LIBS \n    \"-L/opt/apps/intel/mkl/10.0.1.014/lib/em64t -lmkl_em64t -lmkl -lguide -lpthread /opt/apps/gcc_amd/4.4.5/lib64/libgfortran.a -lm\")\n\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/Ranger-intel-mvapich-mkl.cmake",
    "content": "# Set the serial Intel compilers\nset(COMPILER_DIR /opt/apps/intel/10.1)\nset(CMAKE_C_COMPILER       ${COMPILER_DIR}/cc/bin/icc)\nset(CMAKE_CXX_COMPILER     ${COMPILER_DIR}/cc/bin/icpc)\nset(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/fc/bin/ifort)\n\n# Set the MPI wrappers for the C and C++ compilers\nset(MPI_COMPILER_DIR /opt/apps/intel10_1/mvapich/1.0.1/bin)\nset(MPI_C_COMPILER       ${MPI_COMPILER_DIR}/mpicc)\nset(MPI_CXX_COMPILER     ${MPI_COMPILER_DIR}/mpicxx)\nset(MPI_Fortran_COMPILER ${MPI_COMPILER_DIR}/mpif90)\n\nset(MPI_C_COMPILE_FLAGS \"\")\nset(MPI_CXX_COMPILE_FLAGS \"\")\nset(MPI_Fortran_COMPILE_FLAGS \"\")\nset(MPI_C_INCLUDE_PATH   /opt/apps/intel10_1/mvapich/1.0.1/include)\nset(MPI_CXX_INCLUDE_PATH ${MPI_C_INCLUDE_PATH})\nset(MPI_Fortran_INCLUDE_PATH ${MPI_C_INCLUDE_PATH})\nset(MPI_C_LINK_FLAGS \"-Wl,-rpath,/opt/apps/intel10_1/mvapich/1.0.1/lib/shared -Wl,-rpath,/opt/apps/intel10_1/mvapich/1.0.1/lib -i-dynamic -Wl,-rpath,/opt/apps/intel/10.1/fc/lib -Wl,-rpath,/opt/apps/intel/10.1/cc/lib -i-dynamic -L/opt/apps/intel10_1/mvapich/1.0.1/lib -L/opt/apps/intel10_1/mvapich/1.0.1/lib/shared  -L/usr/lib64 -L/opt/ofed/lib64\")\nset(MPI_CXX_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_Fortran_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_BASE_LIBS \"-lmpich -libverbs -libumad -lpthread -lrt\")\nset(MPI_C_LIBRARIES \"${MPI_BASE_LIBS}\")\nset(MPI_CXX_LIBRARIES \"-lpmpich++ ${MPI_BASE_LIBS}\")\nset(MPI_Fortran_LIBRARIES \"-lmpichf90nc -lmpichfarg ${MPI_BASE_LIBS}\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-O3\")\nendif()\n\nset(OpenMP_CXX_FLAGS \"-openmp\")\n\nset(MATH_LIBS \n    \"-L/opt/apps/intel/mkl/10.0.1.014/lib/em64t -lmkl_em64t -lmkl -lguide -lpthread /opt/apps/intel/10.1/fc/lib/libifcore.a /opt/apps/intel/10.1/fc/lib/libsvml.a -lm\")\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/Ranger-intel-mvapich2-mkl.cmake",
    "content": "# Set the serial Intel compilers\nset(COMPILER_DIR /opt/apps/intel/10.1)\nset(CMAKE_C_COMPILER       ${COMPILER_DIR}/cc/bin/icc)\nset(CMAKE_CXX_COMPILER     ${COMPILER_DIR}/cc/bin/icpc)\nset(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/fc/bin/ifort)\n\n# Set the MPI wrappers for the C and C++ compilers\nset(MPI_COMPILER_DIR /opt/apps/intel10_1/mvapich2/1.2/bin)\nset(MPI_C_COMPILER       ${MPI_COMPILER_DIR}/mpicc)\nset(MPI_CXX_COMPILER     ${MPI_COMPILER_DIR}/mpicxx)\nset(MPI_Fortran_COMPILER ${MPI_COMPILER_DIR}/mpif90)\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-O3\")\nendif()\n\nset(OpenMP_CXX_FLAGS \"-openmp\")\n\nset(MATH_LIBS \n    \"-L/opt/apps/intel/mkl/10.0.1.014/lib/em64t -lmkl_em64t -lmkl -lguide -lpthread /opt/apps/intel/10.1/fc/lib/libifcore.a /opt/apps/intel/10.1/fc/lib/libsvml.a -lm\")\n\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/Stampede-gnu-mvapich2-mkl.cmake",
    "content": "# The serial GNU compilers\nset(COMPILER_DIR /opt/apps/gcc/4.7.1/bin)\nset(CMAKE_C_COMPILER       ${COMPILER_DIR}/gcc)\nset(CMAKE_CXX_COMPILER     ${COMPILER_DIR}/g++)\nset(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/gfortran)\n\n# The MPI wrappers for the C and C++ compilers\nset(MPI_COMPILER_DIR /opt/apps/gcc4_7/mvapich2/1.9/bin)\nset(MPI_C_COMPILER       ${MPI_COMPILER_DIR}/mpicc)\nset(MPI_CXX_COMPILER     ${MPI_COMPILER_DIR}/mpicxx)\nset(MPI_Fortran_COMPILER ${MPI_COMPILER_DIR}/mpif90)\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-O3\")\nendif()\n\nset(OpenMP_CXX_FLAGS \"-fopenmp\")\n\nset(MATH_LIBS \"-L/opt/apps/intel/13/composer_xe_2013.2.146/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 -lmkl_sequential -lpthread /opt/apps/gcc/4.7.1/lib64/libgfortran.a /opt/apps/intel/13/composer_xe_2013.2.146/compiler/lib/intel64/libimf.a /opt/apps/intel/13/composer_xe_2013.2.146/compiler/lib/intel64/libirc.a -lm\")\n"
  },
  {
    "path": "src/madness/external/elemental/cmake/toolchains/Stampede-intel-mvapich2-mkl.cmake",
    "content": "# The serial Intel compilers\nset(COMPILER_DIR /opt/apps/intel/13/composer_xe_2013_sp1.1.106/bin/intel64)\nset(CMAKE_C_COMPILER       ${COMPILER_DIR}/icc)\nset(CMAKE_CXX_COMPILER     ${COMPILER_DIR}/icpc)\nset(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/ifort)\n\n# The MPI wrappers for the C and C++ compilers\nset(MPI_COMPILER_DIR /opt/apps/intel14/mvapich2/2.0b/bin)\nset(MPI_C_COMPILER       ${MPI_COMPILER_DIR}/mpicc)\nset(MPI_CXX_COMPILER     ${MPI_COMPILER_DIR}/mpicxx)\nset(MPI_Fortran_COMPILER ${MPI_COMPILER_DIR}/mpif90)\n\nset(MPI_C_COMPILE_FLAGS \"\")\nset(MPI_CXX_COMPILE_FLAGS \"\")\nset(MPI_Fortran_COMPILE_FLAGS \"\")\nset(MPI_C_INCLUDE_PATH       /opt/apps/intel14/mvapich2/2.0b/include)\nset(MPI_CXX_INCLUDE_PATH     ${MPI_C_INCLUDE_PATH})\nset(MPI_Fortran_INCLUDE_PATH ${MPI_C_INCLUDE_PATH})\nset(MPI_C_LINK_FLAGS \"-Wl,-rpath,/opt/apps/limic2/0.5.5/lib -L/opt/apps/limic2/0.5.5/lib -L/opt/apps/intel14/mvapich2/2.0b/lib -L/opt/ofed/lib64/\")\nset(MPI_CXX_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_Fortran_LINK_FLAGS ${MPI_C_LINK_FLAGS})\nset(MPI_BASE_LIBS \n    \"-lmpich -lopa -llimic2 -lpthread -lrdmacm -libverbs -libumad -ldl -lrt\")\nset(MPI_C_LIBRARIES \"-limf ${MPI_BASE_LIBS}\")\nset(MPI_CXX_LIBRARIES \"-limf -lmpichcxx ${MPI_BASE_LIBS}\")\nset(MPI_Fortran_LIBRARIES \"-limf -lmpichf90 ${MPI_BASE_LIBS}\")\n\nif(CMAKE_BUILD_TYPE MATCHES PureDebug OR\n   CMAKE_BUILD_TYPE MATCHES HybridDebug)\n  set(CXX_FLAGS \"-g\")\nelse()\n  set(CXX_FLAGS \"-O3\")\nendif()\n\nset(OpenMP_CXX_FLAGS \"-openmp\")\n\nset(MATH_LIBS \"-lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -mkl\")\n"
  },
  {
    "path": "src/madness/external/elemental/examples/README.md",
    "content": "### `examples/`\n\nThis folder contains (hopefully) concise examples of Elemental's functionality.\nIt is divided into the following subfolders:\n\n-  `blas-like/`: BLAS-like functionality\n-  `convex/`: convex optimization\n-  `core/`: core data structures\n-  `lapack-like/`: LAPACK-like functionality\n-  `matrices/`: special matrices\n"
  },
  {
    "path": "src/madness/external/elemental/examples/blas-like/Cannon.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMM_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--m\",\"height of C\",1000);\n        const Int n = Input(\"--n\",\"width of C\",1000);\n        const Int k = Input(\"--k\",\"inner dimension\",1000);\n        const double alpha = Input(\"--alpha\",\"scale of A B\",2.);\n        const double beta = Input(\"--beta\",\"scale of C\",3.);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        Grid g( mpi::COMM_WORLD );\n        if( g.Height() != g.Width() )\n            LogicError(\"This routine requires a square grid\");\n\n        DistMatrix<double> A(g), B(g), C(g);\n        Uniform( A, m, k );\n        Uniform( B, k, n );\n        Uniform( C, m, n );\n        if( print )\n        {\n            Print( A, \"A\" );\n            Print( B, \"B\" );\n            Print( C, \"C\" );\n        }\n\n        Timer timer;\n        timer.Start();\n        gemm::Cannon_NN( alpha, A, B, beta, C );\n        const double gemmTime = timer.Stop();\n        if( g.Rank() == 0 )\n        {\n            const double gflops = (2.*m*n*k) / (1.e9*gemmTime);\n            std::cout << \"Gemm took \" << gemmTime << \" seconds and achieved \"\n                      << gflops << \" GFlops\" << std::endl;\n        }\n        if( print )\n            Print( C, \"C := alpha A B + beta C\" );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/blas-like/Gemm.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental.hpp\"\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename T>\nvoid TimedGemm\n( T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C );\n\nint main( int argc, char *argv[] ) \n{\n    Initialize( argc, argv );\n    const mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try \n    {\n        const Int m = Input(\"--m\",\"height of C\",1000);\n        const Int n = Input(\"--n\",\"width of C\",1000);     \n        const Int k = Input(\"--k\",\"inner dimension\",1000);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",128);\n        const bool inst = Input(\"--inst\",\"instrument Gemm?\",true);\n        Int r = Input(\"--r\",\"process grid height\",0);\n        ProcessInput();\n\n        SetBlocksize( nb );\n        // If no process grid height was specified, try for a square\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        Grid g( MPI_COMM_WORLD, r );\n        if( commRank == 0 )\n            std::cout << \"g: \" << g.Height() << \" x \" << g.Width() << std::endl;\n\n        Matrix<double> A, B, C;\n        Uniform( A, m, k );\n        Uniform( B, k, n );\n        Uniform( C, m, n );\n        mpi::Barrier( comm );\n\n        Timer timer;\n        if( commRank == 0 ) \n        {\n            timer.Start();\n            Gemm( NORMAL, NORMAL, 1., A, B, C );    \n            const double gemmTime = timer.Stop();\n            const double gflops = (2.*m*n*k)/(gemmTime*1.e9);\n            std::cout << \"Sequential: \" << gemmTime << \" secs and \" \n                      << gflops << \" GFLops\" << std::endl;\n        }\n\n        DistMatrix<double,CIRC,CIRC> ARoot(g), BRoot(g); \n        if( commRank == 0 ) \n        {\n            timer.Start();\n            ARoot.CopyFromRoot( A );\n            BRoot.CopyFromRoot( B );\n            std::cout << \"Populate root node: \" << timer.Stop() << \" secs\"\n                      << std::endl;\n        }\n        else\n        {\n            ARoot.CopyFromNonRoot();\n            BRoot.CopyFromNonRoot();\n        }\n\n        mpi::Barrier( comm );\n        if( commRank == 0 )\n            timer.Start();\n        DistMatrix<double> ADist( ARoot ), BDist( BRoot ), CDist(g);\n        Zeros( CDist, m, n );\n        mpi::Barrier( comm );\n        if( commRank == 0 ) \n            std::cout << \"Spread from root: \" << timer.Stop() << \" secs\"\n                      << std::endl;\n\n        if( commRank == 0 )\n            timer.Start();\n        if( inst )\n            TimedGemm( 1., ADist, BDist, 0., CDist );\n        else\n            Gemm( NORMAL, NORMAL, 1., ADist, BDist, 0., CDist );    \n        mpi::Barrier( comm );\n        if( commRank == 0 ) \n            std::cout << \"Distributed Gemm: \" << timer.Stop() << \" secs\"\n                      << std::endl;\n\n        if( commRank == 0 )\n            timer.Start();\n        DistMatrix<double,CIRC,CIRC> CRoot( CDist );\n        mpi::Barrier( comm );\n        if( commRank == 0 )\n            std::cout << \"Gathered to root: \" << timer.Stop() << \" secs\" \n                      << std::endl;\n    } catch( std::exception& e ) { ReportException(e); }\n    Finalize();\n    return 0;\n}\n\ntemplate<typename T>\nvoid TimedGemm\n( T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,STAR> A1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> B1Trans_MR_STAR(g);\n\n    A1_MC_STAR.AlignWith( C );\n    B1Trans_MR_STAR.AlignWith( C );\n\n    Timer timerMC, timerMR, timerGemm;\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    while( AR.Width() > 0 )\n    {\n        LockedRepartitionRight( AL, /**/ AR,\n                                A0, /**/ A1, A2 );\n\n        LockedRepartitionDown( BT,  B0,\n                              /**/ /**/\n                                    B1,\n                               BB,  B2 );\n\n        //--------------------------------------------------------------------//\n        timerMC.Start();\n        A1_MC_STAR = A1;\n        mpi::Barrier( g.Comm() );\n        const double timeMC = timerMC.Stop();\n        if( g.Rank() == 0 )\n        {\n            const Int mLocal = A1_MC_STAR.LocalHeight();\n            const Int nLocal = A1_MC_STAR.LocalWidth();\n            const double mbps = (1.*mLocal*nLocal*sizeof(T))/(timeMC*1.e6);\n            std::cout << \"[MC,* ] AllGather: \" << timeMC\n                      << \" secs, \" << mbps << \" MB/s\" << \" for \"\n                      << mLocal << \" x \" << nLocal << \" local matrix\"\n                      << std::endl;\n        }\n        timerMR.Start();\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        mpi::Barrier( g.Comm() );\n        const double timeMR = timerMR.Stop();\n        if( g.Rank() == 0 )\n        {\n            const Int nLocal = B1Trans_MR_STAR.LocalHeight();\n            const Int mLocal = B1Trans_MR_STAR.LocalWidth();\n            const double mbps = (1.*mLocal*nLocal*sizeof(T))/(timeMR*1.e6);\n            std::cout << \"[* ,MR] AllGather: \" << timeMR\n                      << \" secs, \" << mbps << \" MB/s\" << \" for \"\n                      << mLocal << \" x \" << nLocal << \" local matrix\"\n                      << std::endl;\n        }\n\n        // C[MC,MR] += alpha A1[MC,*] (B1^T[MR,*])^T\n        //           = alpha A1[MC,*] B1[*,MR]\n        timerGemm.Start();\n        LocalGemm\n        ( NORMAL, TRANSPOSE, alpha, A1_MC_STAR, B1Trans_MR_STAR, T(1), C );\n        mpi::Barrier( g.Comm() );\n        const double gemmTime = timerGemm.Stop();\n        if( g.Rank() == 0 )\n        {\n            const Int mLocal = C.LocalHeight();\n            const Int nLocal = C.LocalWidth();\n            const Int kLocal = A1_MC_STAR.LocalWidth();\n            const double gflops = (2.*mLocal*nLocal*kLocal)/(gemmTime*1.e9);\n            std::cout << \"Local gemm: \" << gemmTime << \" secs and \"\n                      << gflops << \" GFlops for \" << mLocal << \" x \" << nLocal\n                      << \" x \" << kLocal << \" product\" << std::endl;\n        }\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight( AL,     /**/ AR,\n                                   A0, A1, /**/ A2 );\n\n        SlideLockedPartitionDown( BT,  B0,\n                                       B1,\n                                 /**/ /**/\n                                  BB,  B2 );\n    }\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/blas-like/Gemv.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMV_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const bool adjoint = Input(\"--adjoint\",\"apply adjoint?\",false);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const Orientation orientation = ( adjoint ? ADJOINT : NORMAL );\n\n        DistMatrix<C> A;\n        Uniform( A, m, n );\n\n        // Draw the entries of the original x and y from uniform distributions \n        // over the complex unit ball\n        DistMatrix<C,VC,STAR> x, y;\n        if( orientation == NORMAL )\n        {\n            Uniform( x, n, 1 );\n            Uniform( y, m, 1 );\n        }\n        else\n        {\n            Uniform( x, m, 1 );\n            Uniform( y, n, 1 );\n        }\n\n        if( print )\n        {\n            Print( A, \"A\" );\n            Print( x, \"x\" );\n            Print( y, \"y\" );\n        }\n\n        // Run the matrix-vector product\n        Gemv( orientation, C(3), A, x, C(4), y );\n\n        if( print )\n        {\n            if( orientation == NORMAL )\n                Print( y, \"y := 3 A x + 4 y\" );\n            else\n                Print( y, \"y := 3 A^H x + 4 y\" );\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/blas-like/README.md",
    "content": "### `examples/blas-like`\n\nThis folder contains a few examples of Elemental's BLAS-like functionality:\n\n-  `Cannon.cpp`: An unoptimized implementation of Cannon's algorithm for \n   matrix-matrix multiplication\n-  `Gemv.cpp`: Matrix-vector multiplication\n-  `Gemm.cpp`: Matrix-matrix multiplication\n"
  },
  {
    "path": "src/madness/external/elemental/examples/convex/BasisPursuit.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_ZERONORM_INC\n#include ELEM_BASISPURSUIT_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\n// This driver is an adaptation of the solver described at\n//    http://www.stanford.edu/~boyd/papers/admm/basis_pursuit/basis_pursuit.html\n// which is derived from the distributed ADMM article of Boyd et al.\n//\n// Basis pursuit seeks the solution to A x = b which minimizes || x ||_1\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int m = Input(\"--m\",\"height of matrix\",100);\n        const Int n = Input(\"--n\",\"width of matrix\",200);\n        const Int maxIter = Input(\"--maxIter\",\"maximum # of iter's\",500);\n        const Real probNnz = Input(\"--probNnz\",\"prob. of nonzero x entry\",0.1);\n        const Real rho = Input(\"--rho\",\"augmented Lagrangian param.\",1.);\n        const Real alpha = Input(\"--alpha\",\"over-relaxation\",1.2);\n        const Real absTol = Input(\"--absTol\",\"absolute tolerance\",1e-6);\n        const Real relTol = Input(\"--relTol\",\"relative tolerance\",1e-4);\n        const Real pinvTol = Input(\"--pinvTol\",\"pseudoinv tolerance\",0.);\n        const bool usePinv = Input(\"--usePinv\",\"Directly compute pinv(A)\",true);\n        const bool progress = Input(\"--progress\",\"print progress?\",true);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        const bool print = Input(\"--print\",\"print matrices\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> A, b, xTrue;\n        Uniform( A, m, n );\n        Zeros( xTrue, n, 1 );\n        if( xTrue.LocalWidth() == 1 )\n        {\n            for( Int iLoc=0; iLoc<xTrue.LocalHeight(); ++iLoc )\n                if( SampleUniform<Real>() <= probNnz )\n                    xTrue.SetLocal( iLoc, 0, SampleBall<C>() );\n        }\n        const Int trueZeroNorm = ZeroNorm( xTrue );\n        Gemv( NORMAL, C(1), A, xTrue, b ); \n        if( print )\n        {\n            Print( A,     \"A\"     );\n            Print( xTrue, \"xTrue\" );\n            Print( b,     \"b\"     );\n        }\n        if( display )\n            Display( A, \"A\" );\n\n        DistMatrix<C> x, z, u;\n        BasisPursuit\n        ( A, b, x, z, u, alpha, rho, maxIter, absTol, relTol, usePinv, pinvTol,\n          progress );\n        if( print )\n        {\n            Print( x, \"x\" );\n            Print( z, \"z\" );\n            Print( u, \"u\" );\n        }\n        const Int xZeroNorm = ZeroNorm( x );\n        const Int zZeroNorm = ZeroNorm( z );\n        const Int uZeroNorm = ZeroNorm( u );\n        if( mpi::Rank(mpi::COMM_WORLD) == 0 )\n        {\n            std::cout << \"|| xTrue ||_0 = \" << trueZeroNorm << \"\\n\"\n                      << \"|| x     ||_0 = \" << xZeroNorm << \"\\n\"\n                      << \"|| z     ||_0 = \" << zZeroNorm << \"\\n\" \n                      << \"|| u     ||_0 = \" << uZeroNorm << \"\\n\" << std::endl;\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/convex/LinearProgram.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_LINEARPROGRAM_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\n// This driver uses an adaptation of the solver described at\n//    http://www.stanford.edu/~boyd/papers/admm/linprog/linprog.html\n// which is derived from the distributed ADMM article of Boyd et al.\n//\n// It attempts to solve the following linear program:\n//     minimize    c' x\n//     subject to  A x = b, x >= 0\n//\n\ntypedef double Real;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int m = Input(\"--m\",\"height of matrix\",100);\n        const Int n = Input(\"--n\",\"width of matrix\",200);\n        const Int maxIter = Input(\"--maxIter\",\"maximum # of iter's\",500);\n        const Real rho = Input(\"--rho\",\"augmented Lagrangian param.\",1.);\n        const Real alpha = Input(\"--alpha\",\"over-relaxation\",1.2);\n        const Real absTol = Input(\"--absTol\",\"absolute tolerance\",1e-4);\n        const Real relTol = Input(\"--relTol\",\"relative tolerance\",1e-2);\n        const bool inv = Input(\"--inv\",\"form inv(LU) to avoid trsv?\",true);\n        const bool progress = Input(\"--progress\",\"print progress?\",true);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        const bool print = Input(\"--print\",\"print matrices\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<Real> A, b, c, xTrue;\n        Uniform( A, m, n, 1., 1. ); // mean=radius=1, so sample in [0,2]\n        Zeros( xTrue, n, 1 );\n        if( xTrue.LocalWidth() == 1 )\n            for( Int iLoc=0; iLoc<xTrue.LocalHeight(); ++iLoc )\n                xTrue.SetLocal( iLoc, 0, Abs(SampleNormal<Real>()) );\n        Gemv( NORMAL, Real(1), A, xTrue, b ); \n        Uniform( c, n, 1, 1., 1. ); // mean=radius=1, so sample in [0,2]\n        if( print )\n        {\n            Print( A,     \"A\"     );\n            Print( xTrue, \"xTrue\" );\n            Print( b,     \"b\"     );\n            Print( c,     \"c\"     );\n        }\n        if( display )\n            Display( A, \"A\" );\n        const Real objectiveTrue = Dot( c, xTrue );\n        if( mpi::WorldRank() == 0 )\n            std::cout << \"c'xTrue=\" << objectiveTrue << std::endl;\n\n        DistMatrix<Real> x, z, u;\n        LinearProgram\n        ( A, b, c, x, z, u, rho, alpha, maxIter, absTol, relTol, inv, \n          progress );\n\n        if( print )\n        {\n            Print( x, \"x\" );\n            Print( z, \"z\" );\n            Print( u, \"u\" );\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/convex/LogDetDiv.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_LOGDETDIV_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of HPD matrix\",100);\n        const double lower = Input(\"--lower\",\"lower bound on spectrum\",1.);\n        const double upper = Input(\"--upper\",\"upper bound on spectrum\",10.);\n        const bool display = Input(\"--display\",\"display matrices?\",true);\n        const bool print = Input(\"--print\",\"print matrices\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> A, B;\n        HermitianUniformSpectrum( A, n, lower, upper );\n        HermitianUniformSpectrum( B, n, lower, upper );\n        if( display )\n        {\n            Display( A, \"A\" );\n            Display( B, \"B\" );\n        }\n        if( print )\n        {\n            Print( A, \"A\" );\n            Print( B, \"B\" );\n        }\n        const double logDetDiv = LogDetDiv( LOWER, A, B );\n        if( mpi::WorldRank() == 0 )\n            std::cout << \"LogDetDiv(A,B) = \" << logDetDiv << std::endl;\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/convex/QuadraticProgram.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HEMV_INC\n#include ELEM_QUADRATICPROGRAM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\n#include ELEM_GAUSSIAN_INC\nusing namespace elem;\n\n// This driver is an adaptation of the solver described at\n//    http://www.stanford.edu/~boyd/papers/admm/quadprog/quadprog.html\n// which is derived from the distributed ADMM article of Boyd et al.\n//\n// This example attempts to solve the following convex optimization problem:\n//     minimize    (1/2) x' P x + q' x \n//     subject to  lb <= x <= ub\n//\n\ntypedef double Real;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--n\",\"problem size\",200);\n        const Int maxIter = Input(\"--maxIter\",\"maximum # of iter's\",500);\n        const Real lb = Input(\"--lb\",\"lower bound for x\",0.5);\n        const Real ub = Input(\"--ub\",\"upper bound for x\",1.0);\n        const Real lbEig = Input(\"--lbEig\",\"spectral lower bound\",1.);\n        const Real ubEig = Input(\"--ubEig\",\"spectral upper bound\",2.);\n        const Real rho = Input(\"--rho\",\"augmented Lagrangian param.\",1.);\n        const Real alpha = Input(\"--alpha\",\"over-relaxation\",1.2);\n        const Real absTol = Input(\"--absTol\",\"absolute tolerance\",1e-6);\n        const Real relTol = Input(\"--relTol\",\"relative tolerance\",1e-4);\n        const bool inv = Input(\"--inv\",\"form inv(LU) to avoid trsv?\",true);\n        const bool progress = Input(\"--progress\",\"print progress?\",true);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        const bool print = Input(\"--print\",\"print matrices\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<Real> P, q, xTrue;\n        HermitianUniformSpectrum( P, n, lbEig, ubEig );\n        // Alternate the entries of xTrue between ub and lb\n        Zeros( xTrue, n, 1 );\n        if( xTrue.LocalWidth() == 1 )\n            for( Int iLoc=0; iLoc<xTrue.LocalHeight(); ++iLoc )\n                xTrue.SetLocal( iLoc, 0, \n                    ( xTrue.GlobalRow(iLoc)%2==0 ? lb : ub ) );\n        // Set q := - P xTrue - du + dl\n        Zeros( q, n, 1 );\n        Hemv( LOWER, Real(-1), P, xTrue, Real(0), q );\n        if( q.LocalWidth() == 1 )\n            for( Int iLoc=0; iLoc<q.LocalHeight(); ++iLoc )\n                q.UpdateLocal( iLoc, 0,\n                    ( q.GlobalRow(iLoc)%2==0 ? 0.5 : -0.5 ) );\n        if( print )\n        {\n            Print( P, \"P\" );\n            Print( q, \"q\" );\n            Print( xTrue, \"xTrue\" );\n        }\n        if( display )\n            Display( P, \"P\" );\n\n        DistMatrix<Real> x, z, u;\n        QuadraticProgram\n        ( P, q, lb, ub, x, z, u, rho, alpha, maxIter, absTol, relTol, inv, \n          progress );\n\n        if( print )\n        {\n            Print( x, \"x\" );\n            Print( z, \"z\" );\n            Print( u, \"u\" );\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/convex/README.md",
    "content": "### `examples/convex`\n\nThis folder contains a few examples of using Elemental for tasks related to\nconvex optimization:\n\n-  `LogDetDivergence.cpp`: Compute a divergence based upon the log of the \n   determinant of an HPD matrix\n-  `RPCA.cpp`: A simple Robust Principal Component Analysis example which allows\n   for choosing between several different SVT algorithms\n"
  },
  {
    "path": "src/madness/external/elemental/examples/convex/RPCA.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_ENTRYWISEONENORM_INC\n#include ELEM_MAXNORM_INC\n#include ELEM_TWONORM_INC\n#include ELEM_ZERONORM_INC\n#include ELEM_SVT_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\n//\n// This driver generates a random low-rank matrix and then randomly corrupts\n// a large percentage of the entries (by default 10%). Robust Principal \n// Component Analysis (RPCA) is then used to recover both the underlying \n// low-rank and sparse matrices.\n//\n// Please see <http://perception.csl.illinois.edu/matrix-rank/sample_code.html>\n// for references and documentation on the Augmented Lagrange Multiplier (ALM) \n// and Alternating Direction Method of Multipliers (ADMM) for Robust PCA.\n//\n\n// Corrupt a portion of the entries with uniform samples from the unit ball\ntemplate<typename F>\nint Corrupt( DistMatrix<F>& A, double probCorrupt )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Corrupt\"))\n    typedef Base<F> Real;\n\n    Int numLocalCorrupt = 0;\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            if( SampleUniform<Real>() <= probCorrupt )\n            {\n                ++numLocalCorrupt;\n                const F perturb = SampleBall<F>();\n                A.SetLocal( iLoc, jLoc, A.GetLocal(iLoc,jLoc)+perturb );\n            }\n        }\n    }\n    \n    return mpi::AllReduce( numLocalCorrupt, A.DistComm() );\n}\n\ntemplate<typename F,Distribution U,Distribution V>\nvoid NormalizeEntries( DistMatrix<F,U,V>& A )\n{\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const F alpha = A.GetLocal( iLoc, jLoc );\n            A.SetLocal( iLoc, jLoc, alpha/Abs(alpha) );\n        }\n    }\n}\n\n// If 'tau' is passed in as zero, it is set to 1/sqrt(max(m,n))\ntemplate<typename F>\nvoid RPCA_ADMM\n( const DistMatrix<F>& M, DistMatrix<F>& L, DistMatrix<F>& S, \n  Base<F> beta, \n  Base<F> tau, \n  Base<F> tol, \n  Int numStepsQR,\n  Int maxIts,\n  bool print )\n{\n    typedef Base<F> Real;\n    const Int m = M.Height();\n    const Int n = M.Width();\n    const Int commRank = mpi::Rank( M.Grid().Comm() );\n\n    // If tau is not specified, then set it to 1/sqrt(max(m,n))\n    if( tau == Real(0) )\n        tau = Real(1)/sqrt(Real(std::max(m,n)));\n\n    if( beta <= Real(0) )\n        LogicError(\"beta cannot be non-positive\");\n    if( tau <=  Real(0) )\n        LogicError(\"tau cannot be non-positive\");\n    if( tol <= Real(0) )\n        LogicError(\"tol cannot be non-positive\");\n\n    const double startTime = mpi::Time();\n    if( commRank == 0 )\n        std::cout << \"Starting RPCA_ADMM\" << std::endl;\n\n    DistMatrix<F> E( M.Grid() ), Y( M.Grid() );\n    Zeros( Y, m, n );\n\n    const Real frobM = FrobeniusNorm( M );\n    const Real maxM = MaxNorm( M );\n    if( commRank == 0 )\n        std::cout << \"|| M ||_F = \" << frobM << \"\\n\"\n                  << \"|| M ||_max = \" << maxM << std::endl;\n\n    Int numIts = 0;\n    while( true )\n    {\n        ++numIts;\n\n        // ST_{tau/beta}(M - L + Y/beta)\n        S = M;\n        Axpy( F(-1), L, S );\n        Axpy( F(1)/beta, Y, S );\n        SoftThreshold( S, tau/beta );\n        const Int numNonzeros = ZeroNorm( S );\n\n        // SVT_{1/beta}(M - S + Y/beta)\n        L = M;\n        Axpy( F(-1), S, L );\n        Axpy( F(1)/beta, Y, L );\n        Int rank;\n        if( numStepsQR == -1 )\n            rank = SVT( L, Real(1)/beta );\n        else\n            rank = SVT( L, Real(1)/beta, numStepsQR );\n      \n        // E := M - (L + S)\n        E = M;    \n        Axpy( F(-1), L, E );\n        Axpy( F(-1), S, E );\n        const Real frobE = FrobeniusNorm( E );\n\n        if( frobE/frobM <= tol )            \n        {\n            if( commRank == 0 )\n                std::cout << \"Converged after \" << numIts << \" iterations \"\n                          << \" with rank=\" << rank \n                          << \", numNonzeros=\" << numNonzeros << \" and \"\n                          << \"|| E ||_F / || M ||_F = \" << frobE/frobM\n                          << \", and \" << mpi::Time()-startTime << \" total secs\"\n                          << std::endl;\n            break;\n        }\n        else if( numIts >= maxIts )\n        {\n            if( commRank == 0 )\n                std::cout << \"Aborting after \" << maxIts << \" iterations and \"\n                          << mpi::Time()-startTime << \" total secs\" \n                          << std::endl;\n            break;\n        }\n        else\n        {\n            if( commRank == 0 )\n                std::cout << numIts << \": || E ||_F / || M ||_F = \" \n                          << frobE/frobM << \", rank=\" << rank \n                          << \", numNonzeros=\" << numNonzeros \n                          << \", \" << mpi::Time()-startTime << \" total secs\"\n                          << std::endl;\n        }\n        \n        // Y := Y + beta E\n        Axpy( beta, E, Y );\n    }\n}\n\n// If 'beta' or 'tau' is passed in as zero, then an estimate is used instead\ntemplate<typename F>\nvoid RPCA_ALM\n( const DistMatrix<F>& M, DistMatrix<F>& L, DistMatrix<F>& S, \n  Base<F> beta, Base<F> tau, Base<F> rho, Base<F> tol, \n  Int numStepsQR, Int maxIts, bool print )\n{\n    typedef Base<F> Real;\n\n    const Int m = M.Height();\n    const Int n = M.Width();\n    const Int commRank = mpi::Rank( M.Grid().Comm() );\n\n    // If tau is unspecified, set it to 1/sqrt(max(m,n))\n    if( tau == Real(0) )\n        tau = Real(1) / sqrt(Real(std::max(m,n)));\n\n    if( tol <= Real(0) )\n        LogicError(\"tol cannot be non-positive\");\n    if( tau <= Real(0) )\n        LogicError(\"tau cannot be non-positive\");\n\n    const double startTime = mpi::Time();\n    if( commRank == 0 )\n        std::cout << \"Starting RPCA_ALM\" << std::endl;\n\n    DistMatrix<F> Y( M );\n    NormalizeEntries( Y );\n    const Real twoNorm = TwoNorm( Y );\n    const Real maxNorm = MaxNorm( Y );\n    const Real infNorm = maxNorm / tau; \n    const Real dualNorm = std::max( twoNorm, infNorm );\n    Scale( F(1)/dualNorm, Y );\n\n    // If beta is unspecified, set it to 1 / 2 || sign(M) ||_2\n    if( beta == Real(0) )\n        beta = Real(1) / (2*twoNorm);\n\n    if( beta <= Real(0) )\n        LogicError(\"beta cannot be non-positive\");\n\n    const Real frobM = FrobeniusNorm( M );\n    const Real maxM = MaxNorm( M );\n    if( commRank == 0 )\n        std::cout << \"|| M ||_F = \" << frobM << \"\\n\"\n                  << \"|| M ||_max = \" << maxM << std::endl;\n\n    Int numIts=0, numPrimalIts=0;\n    DistMatrix<F> LLast( M.Grid() ), SLast( M.Grid() ), E( M.Grid() );\n    while( true )\n    {\n        ++numIts;\n       \n        Int rank, numNonzeros;\n        while( true )\n        {\n            ++numPrimalIts;\n\n            LLast = L;\n            SLast = S;\n\n            // ST_{tau/beta}(M - L + Y/beta)\n            S = M;\n            Axpy( F(-1), L, S );\n            Axpy( F(1)/beta, Y, S );\n            SoftThreshold( S, tau/beta );\n            numNonzeros = ZeroNorm( S );\n\n            // SVT_{1/beta}(M - S + Y/beta)\n            L = M;\n            Axpy( F(-1), S, L );\n            Axpy( F(1)/beta, Y, L );\n            if( commRank == 0 )\n                std::cout << \"beta=\" << beta << std::endl;\n            if( numStepsQR == -1 )\n                rank = SVT( L, Real(1)/beta );\n            else\n                rank = SVT( L, Real(1)/beta, numStepsQR );\n\n            Axpy( F(-1), L, LLast );\n            Axpy( F(-1), S, SLast );\n            const Real frobLDiff = FrobeniusNorm( LLast );\n            const Real frobSDiff = FrobeniusNorm( SLast );\n\n            if( frobLDiff/frobM < tol && frobSDiff/frobM < tol )\n            {\n                if( commRank == 0 )\n                    std::cout << \"Primal loop converged: \" \n                              << mpi::Time()-startTime << \" total secs\"\n                              << std::endl;\n                break;\n            }\n            else \n            {\n                if( commRank == 0 )\n                    std::cout << \"  \" << numPrimalIts \n                              << \": \\n\"\n                              << \"   || Delta L ||_F / || M ||_F = \" \n                              << frobLDiff/frobM << \"\\n\"\n                              << \"   || Delta S ||_F / || M ||_F = \"\n                              << frobSDiff/frobM << \"\\n\"\n                              << \"   rank=\" << rank\n                              << \", numNonzeros=\" << numNonzeros \n                              << \", \" << mpi::Time()-startTime << \" total secs\" \n                              << std::endl;\n            } \n        }\n\n        // E := M - (L + S)\n        E = M;    \n        Axpy( -1., L, E );\n        Axpy( -1., S, E );\n        const Real frobE = FrobeniusNorm( E );\n\n        if( frobE/frobM <= tol )            \n        {\n            if( commRank == 0 )\n                std::cout << \"Converged after \" << numIts << \" iterations and \"\n                          << numPrimalIts << \" primal iterations with rank=\" \n                          << rank << \", numNonzeros=\" << numNonzeros << \" and \"\n                          << \"|| E ||_F / || M ||_F = \" << frobE/frobM\n                          << \", \" << mpi::Time()-startTime << \" total secs\"\n                          << std::endl;\n            break;\n        }\n        else if( numIts >= maxIts )\n        {\n            if( commRank == 0 )\n                std::cout << \"Aborting after \" << maxIts << \" iterations and \"\n                          << mpi::Time()-startTime << \" total secs\" \n                          << std::endl;\n            break;\n        }\n        else\n        {\n            if( commRank == 0 )\n                std::cout << numPrimalIts << \": || E ||_F / || M ||_F = \" \n                          << frobE/frobM << \", rank=\" << rank \n                          << \", numNonzeros=\" << numNonzeros << \", \"\n                          << mpi::Time()-startTime << \" total secs\" \n                          << std::endl;\n        }\n        \n        // Y := Y + beta E\n        Axpy( beta, E, Y );\n        beta *= rho;\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    typedef Complex<double> C;\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int rank = Input(\"--rank\",\"rank of structured matrix\",10);\n        const double probCorrupt = \n            Input(\"--probCorrupt\",\"probability of corruption\",0.1);\n        const double tau = Input(\"--tau\",\"sparse weighting factor\",0.);\n        const double beta = Input(\"--beta\",\"step size\",1.);\n        const double rho = Input(\"--rho\",\"stepsize multiple in ALM\",6.);\n        const Int maxIts = Input(\"--maxIts\",\"maximum iterations\",1000);\n        const double tol = Input(\"--tol\",\"tolerance\",1.e-5);\n        const Int numStepsQR = Input(\"--numStepsQR\",\"number of steps of QR\",-1);\n        const bool useALM = Input(\"--useALM\",\"use ALM algorithm?\",true);\n        const bool display = Input(\"--display\",\"display matrices\",true);\n        const bool print = Input(\"--print\",\"print matrices\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> LTrue;\n        {\n            DistMatrix<C> U, V;\n            Uniform( U, m, rank );\n            Uniform( V, n, rank );\n            Zeros( LTrue, m, n );\n            // Since each entry of U and V is lies in the unit ball, every entry\n            // of U V' will lie in the ball of radius 'rank', so scale this ball\n            Gemm( NORMAL, ADJOINT, C(1./rank), U, V, C(0), LTrue );\n        }\n        const double frobLTrue = FrobeniusNorm( LTrue );\n        const double maxLTrue = MaxNorm( LTrue );\n        if( commRank == 0 )\n            std::cout << \"|| L ||_F = \" << frobLTrue << \"\\n\"\n                      << \"|| L ||_max = \" << maxLTrue << std::endl;\n        if( display )\n            Display( LTrue, \"True low-rank\" );\n        if( print )\n            Print( LTrue, \"True low-rank\" );\n\n        DistMatrix<C> STrue;\n        Zeros( STrue, m, n );\n        const Int numCorrupt = Corrupt( STrue, probCorrupt );\n        const double frobSTrue = FrobeniusNorm( STrue );\n        const double maxSTrue = MaxNorm( STrue );\n        if( commRank == 0 )\n            std::cout << \"number of corrupted entries: \" << numCorrupt << \"\\n\"\n                      << \"|| S ||_F = \" << frobSTrue << \"\\n\"\n                      << \"|| S ||_max = \" << maxSTrue << std::endl;\n        if( display )\n        {\n            Display( STrue, \"True sparse matrix\" );\n#ifdef ELEM_HAVE_QT5\n            Spy( STrue, \"True sparse spy plot\" );\n#endif\n        }\n        if( print )\n            Print( STrue, \"True sparse\" );\n\n        if( commRank == 0 )\n            std::cout << \"Using \" << STrue.Grid().Height() << \" x \" \n                      << STrue.Grid().Width() \n                      << \" process grid and blocksize of \" << Blocksize() \n                      << std::endl;\n\n        // M = LTrue + STrue\n        DistMatrix<C> M( LTrue );\n        Axpy( C(1), STrue, M );\n        if( display )\n            Display( M, \"Sum of low-rank and sparse\");\n        if( print )\n            Print( M, \"Sum of low-rank and sparse\" );\n\n        DistMatrix<C> L, S;\n        Zeros( L, m, n );\n        Zeros( S, m, n ); \n\n        if( useALM )\n            RPCA_ALM( M, L, S, beta, tau, rho, tol, numStepsQR, maxIts, print );\n        else\n            RPCA_ADMM( M, L, S, beta, tau, tol, numStepsQR, maxIts, print );\n\n        if( display )\n        {\n            Display( L, \"Estimated low-rank matrix\" );\n            Display( S, \"Estimated sparse matrix\" );\n#ifdef ELEM_HAVE_QT5\n            Spy( S, \"Estimated sparse spy plot\" );\n#endif\n        }\n        if( print )\n        {\n            Print( L, \"Estimated low-rank matrix\" );\n            Print( S, \"Estimated sparse matrix\" );\n        }\n\n        Axpy( C(-1), LTrue, L );\n        Axpy( C(-1), STrue, S );\n        const double frobLDiff = FrobeniusNorm( L );\n        const double frobSDiff = FrobeniusNorm( S );\n        if( commRank == 0 )\n            std::cout << \"\\n\"\n                      << \"Error in computed decomposition:\\n\"\n                      << \"  || L - LTrue ||_F / || LTrue ||_F = \" \n                      << frobLDiff/frobLTrue << \"\\n\"\n                      << \"  || S - STrue ||_F / || STrue ||_F = \" \n                      << frobSDiff/frobSTrue << \"\\n\"\n                      << std::endl;\n\n        if( display )\n        {\n            Display( L, \"Error in low-rank estimate\" );\n            Display( S, \"Error in sparse estimate\" );\n        }\n        if( print )\n        {\n            Print( L, \"Error in low-rank estimate\" );\n            Print( S, \"Error in sparse estimate\" );\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/convex/SparseInvCov.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_MIN_INC\n#include ELEM_UPDATEDIAGONAL_INC\n#include ELEM_TRMM_INC\n#include ELEM_CHOLESKY_INC\n#include ELEM_HERMITIANEIG_INC\n#include ELEM_HERMITIANINVERSE_INC\n#include ELEM_GAUSSIAN_INC\n#include ELEM_UNIFORM_INC\n#include ELEM_COVARIANCE_INC\n#include ELEM_SPARSEINVCOV_INC\nusing namespace elem;\n\n// This driver is an adaptation of the solver described at\n//    http://www.stanford.edu/~boyd/papers/admm/covsel/covsel.html\n// which is derived from the distributed ADMM article of Boyd et al.\n//\n// The experiment is described in detail in Section 4 of:\n//     A. D'Aspremont, O. Banerjee, and L. El Ghaoui,\n//     \"First-order methods for sparse covariance selection\"\n\ntypedef double Real;\ntypedef Real F;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--n\",\"problem size\",200);\n        const Int N = Input(\"--N\",\"number of samples\",2000);\n        const Real probNnz = Input(\"--probNnz\",\"probability of nonzero\",0.01);\n        const Real sigma = Input(\"--sigma\",\"scaling of noise matrix\",0.0);\n        const Int maxIter = Input(\"--maxIter\",\"maximum # of iter's\",500);\n        const Real lambda = Input(\"--lambda\",\"vector l1 penalty\",0.01);\n        const Real rho = Input(\"--rho\",\"augmented Lagrangian param.\",1.);\n        const Real alpha = Input(\"--alpha\",\"over-relaxation\",1.2);\n        const Real absTol = Input(\"--absTol\",\"absolute tolerance\",1e-5);\n        const Real relTol = Input(\"--relTol\",\"relative tolerance\",1e-3);\n        const Real shift = Input(\"--shift\",\"shift for noisy B\",1e-8);\n        const Real shiftScale = Input(\"--shiftScale\",\"scaling for shift\",1.1);\n        const bool progress = Input(\"--progress\",\"print progress?\",true);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        const bool print = Input(\"--print\",\"print matrices\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<F> SInv;\n        Zeros( SInv, n, n );\n        for( Int jLoc=0; jLoc<SInv.LocalWidth(); ++jLoc )\n        {\n            const Int j = SInv.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<SInv.LocalHeight(); ++iLoc )\n            {\n                const Int i = SInv.GlobalRow(iLoc);\n                if( i == j )\n                {\n                    SInv.SetLocal( iLoc, jLoc, F(1) );\n                }\n                else\n                {\n                    if( SampleUniform<Real>() <= probNnz )\n                    {\n                        if( SampleUniform<Real>() <= 0.5 )\n                            SInv.SetLocal( iLoc, jLoc, F(1) );\n                        else\n                            SInv.SetLocal( iLoc, jLoc, F(-1) );\n                    }\n                }\n            }\n        }\n        MakeHermitian( LOWER, SInv );\n        // Shift SInv so that it is sufficiently SPD\n        DistMatrix<F> G( SInv );\n        DistMatrix<Real,VR,STAR> w;\n        HermitianEig( LOWER, G, w );\n        Real minEig = Min(w).value;\n        if( minEig <= Real(0) )\n            UpdateDiagonal( SInv, shift-shiftScale*minEig );\n\n        // Inverse SInv\n        DistMatrix<F> S( SInv );\n        HermitianInverse( LOWER, S );\n        MakeHermitian( LOWER, S );\n       \n        // Add noise and force said matrix to stay SPD\n        DistMatrix<F> V;\n        Uniform( V, n, n );\n        MakeHermitian( LOWER, V );\n        DistMatrix<F> SNoisy( S );\n        Axpy( sigma, V, SNoisy );\n        G = SNoisy;\n        HermitianEig( LOWER, G, w );\n        minEig = Min(w).value;\n        if( minEig <= Real(0) )\n            UpdateDiagonal( SNoisy, shift-shiftScale*minEig );\n\n        // Sample from the noisy covariance matrix\n        DistMatrix<F> D;\n        Gaussian( D, N, n );\n        Covariance( D, G );\n        UpdateDiagonal( G, F(-1) );\n        const Real unitCovErrNorm = FrobeniusNorm( G );\n        G = SNoisy;\n        Cholesky( LOWER, G );\n        Trmm( RIGHT, LOWER, TRANSPOSE, NON_UNIT, F(1), G, D );\n        Covariance( D, G );\n        Axpy( F(-1), SNoisy, G );\n        const Real SNorm = FrobeniusNorm( S );\n        const Real SNoisyNorm = FrobeniusNorm( SNoisy );\n        const Real covErrNorm = FrobeniusNorm( G );\n\n        if( print )\n        {\n            Print( SInv, \"SInv\" );\n            Print( S, \"S\" );\n            Print( SNoisy, \"SNoisy\" );\n            Print( D, \"D\" );\n        }\n        if( display )\n        {\n            Display( SInv, \"SInv\" );\n            Display( S, \"S\" );\n            Display( SNoisy, \"SNoisy\" );\n            Display( D, \"D\" );\n        }\n        if( mpi::Rank(mpi::COMM_WORLD) == 0 )\n            std::cout << \"|| S            ||_F         = \" << SNorm << \"\\n\"\n                      << \"|| SNoisy       ||_F         = \" << SNoisyNorm << \"\\n\"\n                      << \"|| cov(Omega)-I ||_F         = \" << unitCovErrNorm \n                      << \"\\n\"\n                      << \"|| cov(D)-SNoisy ||_F / || S ||_F = \" \n                      << covErrNorm/SNorm << \"\\n\"\n                      << std::endl;\n\n        DistMatrix<F> X, Z, U;\n        SparseInvCov\n        ( D, X, Z, U, lambda, rho, alpha, maxIter, absTol, relTol, progress );\n\n        const Real SInvNorm = FrobeniusNorm( SInv );\n        G = X;\n        Axpy( F(-1), SInv, G );\n        const Real XErrNorm = FrobeniusNorm( G );\n        G = Z;\n        Axpy( F(-1), SInv, G );\n        const Real ZErrNorm = FrobeniusNorm( G );\n        if( print )\n        {\n            Print( X, \"X\" );\n            Print( Z, \"Z\" );\n            Print( U, \"U\" );\n        }\n        if( mpi::Rank(mpi::COMM_WORLD) == 0 )\n            std::cout << \"|| SInv     ||_F                = \" \n                      << SInvNorm << \"\\n\"\n                      << \"|| X - SInv ||_F / || SInv ||_F = \" \n                      << XErrNorm/SInvNorm << \"\\n\"\n                      << \"|| Z - SInv ||_F / || SInv ||_F = \"\n                      << ZErrNorm/SInvNorm << \"\\n\"\n                      << std::endl;\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/core/Arbitrary.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_FOURIER_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--n\",\"size of matrix\",20);\n        const Int numRows = Input(\"--numRows\",\"num rows of submatrix\",5);\n        const Int numCols = Input(\"--numCols\",\"num cols of submatrix\",5);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( numRows > n || numCols > n )\n            LogicError(\"Submatrix too large\");\n\n        DistMatrix<Complex<double>> A;\n        Fourier( A, n );\n        if( display )\n            Display( A, \"Fourier Matrix\" );\n        if( print )\n            Print( A, \"Fourier matrix:\" );\n\n        // Get a consistent set of row and column indices (duplication is okay)\n        std::vector<Int> rowInds(numRows), colInds(numCols);\n        if( mpi::WorldRank() == 0 )\n        {\n            for( Int j=0; j<numRows; ++j )\n                rowInds[j] = SampleUniform<Int>(0,n);\n            for( Int j=0; j<numCols; ++j )\n                colInds[j] = SampleUniform<Int>(0,n);\n        }\n        mpi::Broadcast( rowInds.data(), numRows, 0, mpi::COMM_WORLD );\n        mpi::Broadcast( colInds.data(), numCols, 0, mpi::COMM_WORLD );\n        if( mpi::WorldRank() == 0 && print )\n        {\n            std::cout << \"rowInds: \\n\";\n            for( Int j=0; j<numRows; ++j )\n                std::cout << rowInds[j] << \"\\n\";\n            std::cout << \"\\n\";\n            std::cout << \"colInds: \\n\";\n            for( Int j=0; j<numCols; ++j )\n                std::cout << colInds[j] << \"\\n\";\n            std::cout << std::endl;\n        }\n        \n        auto ASub = A.GetSubmatrix( rowInds, colInds );\n        if( display )\n            Display( ASub, \"ASub\" );\n        if( print )\n            Print( ASub, \"ASub\" );\n      \n        MakeUniform( ASub );\n        if( display )\n            Display( ASub, \"Scrambled ASub\" );\n        if( print )\n            Print( ASub, \"Scrambled ASub\" );\n        A.SetSubmatrix( rowInds, colInds, ASub );\n       \n        if( display )\n            Display( A, \"Modified Fourier matrix\" );\n        if( print )\n            Print( A, \"Modified Fourier matrix\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/core/Constructors.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_IDENTITY_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrices to test\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( mpi::WorldRank() == 0 )\n        {\n            const Int commSize = mpi::Size( comm );\n            std::cout << \"Will create matrices distributed over \" \n                      << commSize << \" process(es) in various ways\" \n                      << std::endl;\n        }\n\n        // Built-in\n        const Grid grid( comm );\n        {\n            DistMatrix<double> X(grid);\n            Identity( X, n, n );\n            if( print )\n                Print( X, \"Built-in identity\" );\n        }\n\n        // Local buffers\n        {\n            // Allocate local data\n            const Int gridHeight = grid.Height();\n            const Int gridWidth = grid.Width();\n            const Int gridRow = grid.Row();\n            const Int gridCol = grid.Col();\n            const Int localHeight = Length( n, gridRow, gridHeight );\n            const Int localWidth = Length( n, gridCol, gridWidth );\n            std::vector<double> localData( localHeight*localWidth );\n\n            // Fill local data for identity\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                // Form global column index from local column index\n                const Int j = gridCol + jLoc*gridWidth;\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                {\n                    // Form global row index from local row index\n                    const Int i = gridRow + iLoc*gridHeight;     \n                    // If diagonal entry, set to one, otherwise zero\n                    if( i == j )\n                        localData[iLoc+jLoc*localHeight] = 1.;\n                    else\n                        localData[iLoc+jLoc*localHeight] = 0.;\n                }\n            }\n\n            DistMatrix<double> X(grid);\n            X.Attach( n, n, grid, 0, 0, localData.data(), localHeight );\n            if( print )\n                Print( X, \"Identity constructed from local buffers\" );\n\n            // Build another set of local buffers and attach it to X.\n            // This time, make it all two's.\n            std::vector<double> localTwos( localHeight*localWidth, 2 ); \n            X.Attach( n, n, grid, 0, 0, localTwos.data(), localHeight );\n            if( print )\n                Print( X, \"After viewing local buffers of all two's\" );\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/core/LogicError.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    { LogicError(\"Phone number: \",4+4,3*2,7,\"-\",5,3,0,3*3); }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/core/README.md",
    "content": "### `examples/core`\n\nThis (currently sparse) folder contains:\n\n-  `Constructors.cpp`: A few examples of DistMatrix constructors\n"
  },
  {
    "path": "src/madness/external/elemental/examples/io/Read.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",10);\n        const Int n = Input(\"--width\",\"width of matrix\",10);\n        const std::string filename = \n            Input(\"--filename\",\"filename\",std::string(\"\"));\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( filename == \"\" )\n            LogicError(\"Please specify a filename to read\");\n\n        DistMatrix<double> A(m,n);\n        Read( A, filename );\n        if( display )\n            Display( A, \"A (distributed read)\" );\n        if( print )\n            Print( A, \"A (distributed read)\" );\n        Read( A, filename, AUTO, true );\n        if( display )\n            Display( A, \"A (sequential read)\" );\n        if( print )\n            Print( A, \"A (sequential read)\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/io/Write.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_FOXLI_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",100);\n        const double omega = Input(\"--omega\",\"frequency of FoxLi\",16*M_PI);\n        const std::string basename = \n            Input(\"--basename\",\"basename of file\",std::string(\"\"));\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( basename == \"\" )\n            LogicError(\"Please specify a basename for writing\");\n\n        DistMatrix<Complex<double>> A;\n        FoxLi( A, n, omega );\n        if( display )\n            Display( A, \"A\" );\n        if( print )\n            Print( A, \"A\" );\n        Write( A, basename, MATRIX_MARKET );\n\n        DistMatrix<Complex<double>> B;\n        Read( B, basename+\".mm\" );\n        if( display )\n            Display( B, \"B\" );\n        if( print )\n            Print( B, \"B\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/BunchKaufman.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_AXPY_INC\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_MAKESYMMETRIC_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n#include ELEM_SYMM_INC\n\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n#include ELEM_LDL_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INERTIA_INC\n\n#include ELEM_UNIFORM_INC\n#include ELEM_WIGNER_INC\n#include ELEM_ZEROS_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix to factor\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int numRhs = Input(\"--numRhs\",\"number of random r.h.s.\",100);\n        const double realMean = Input(\"--realMean\",\"real mean\",0.); \n        const double imagMean = Input(\"--imagMean\",\"imag mean\",0.);\n        const double stddev = Input(\"--stddev\",\"standard dev.\",1.);\n        const bool conjugate = Input(\"--conjugate\",\"LDL^H?\",false);\n        const Int pivotInt = Input(\"--pivot\",\"pivot type\",0);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        SetBlocksize( nb );\n        const auto pivotType = static_cast<LDLPivotType>(pivotInt);\n\n        C mean( realMean, imagMean );\n        DistMatrix<C> A;\n        if( conjugate )\n        {\n            Wigner( A, n, mean, stddev );\n        }\n        else\n        {\n            Gaussian( A, n, n, mean, stddev );\n            MakeSymmetric( LOWER, A );\n        }\n\n        // Make a copy of A and then overwrite it with its LDL factorization\n        DistMatrix<Int,VC,STAR> p;\n        DistMatrix<C,MD,STAR> dSub;\n        DistMatrix<C> factA( A );\n        MakeTriangular( LOWER, factA );\n        if( conjugate )\n            LDLH( factA, dSub, p, pivotType );\n        else\n            LDLT( factA, dSub, p, pivotType );\n        if( print )\n        {\n            Print( A,     \"A\"     );\n            Print( factA, \"factA\" );\n            Print( dSub,  \"dSub\"  );\n            Print( p,     \"p\"     );\n        }\n\n        // Generate a random set of vectors\n        DistMatrix<C> X;\n        Uniform( X, n, numRhs );\n        DistMatrix<C> B;\n        Zeros( B, n, numRhs );\n        Symm( LEFT, LOWER, C(1), A, X, C(0), B, conjugate );\n        if( print )\n        {\n            Print( X, \"X\" );\n            Print( B, \"B\" );\n        }\n        ldl::SolveAfter( factA, dSub, p, B, conjugate );\n        const Real AFrob = HermitianFrobeniusNorm( LOWER, A );\n        const Real XFrob = FrobeniusNorm( X );\n        Axpy( C(-1), B, X );\n        const Real errFrob = FrobeniusNorm( X );\n        if( print )\n        {\n            Print( B, \"XComp\" );\n            Print( X, \"E\" );\n        }\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"|| A ||_F = \" << AFrob << \"\\n\"\n                      << \"|| X ||_F = \" << XFrob << \"\\n\"\n                      << \"|| X - inv(A) A X ||_F = \" << errFrob << std::endl;\n        }\n\n        if( conjugate )\n        {\n            // Compute the inertia of A now that we are done with it.\n            auto inertia = Inertia( LOWER, A, pivotType );\n            if( mpi::WorldRank() == 0 )\n            {\n                std::cout << \"numPositive=\" << inertia.numPositive << \"\\n\"\n                          << \"numNegative=\" << inertia.numNegative << \"\\n\"\n                          << \"numZero    =\" << inertia.numZero << \"\\n\"\n                          << std::endl;\n            }\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/BusingerGolub.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_UPDATEDIAGONAL_INC\n\n#include ELEM_QR_INC\n#include ELEM_FROBENIUSNORM_INC\n\n#include ELEM_PERMUTECOLS_INC\n\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    const Int worldRank = mpi::WorldRank();\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const bool alwaysRecompute = Input(\"--always\",\"no norm updates?\",false);\n        const bool blockedUnpiv = \n            Input(\"--blockUnpiv\",\"blocked unpivoted QR?\",false);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> A;\n        Uniform( A, m, n );\n        const Real frobA = FrobeniusNorm( A );\n        if( display )\n            Display( A, \"A\" );\n        if( print )\n            Print( A, \"A\" );\n\n        // Compute the pivoted QR decomposition of A, but do not overwrite A\n        auto QRPiv( A );\n        DistMatrix<C,MD,STAR> tPiv;\n        DistMatrix<Real,MD,STAR> dPiv;\n        DistMatrix<Int,VR,STAR> perm;\n        qr::BusingerGolub( QRPiv, tPiv, dPiv, perm, alwaysRecompute );\n        if( display )\n        {\n            Display( QRPiv, \"QRPiv\" );\n            Display( tPiv, \"tPiv\" );\n            Display( dPiv, \"dPiv\" );\n            Display( perm, \"perm\" );\n        }\n        if( print )\n        {\n            Print( QRPiv, \"QRPiv\" );\n            Print( tPiv, \"tPiv\" );\n            Print( dPiv, \"dPiv\" );\n            Print( perm, \"perm\" );\n        }\n\n        // Compute the standard QR decomposition of A\n        auto QRNoPiv( A );\n        DistMatrix<C,MD,STAR> tNoPiv;\n        DistMatrix<Real,MD,STAR> dNoPiv;\n        if( blockedUnpiv )\n            QR( QRNoPiv, tNoPiv, dNoPiv );\n        else\n            qr::PanelHouseholder( QRNoPiv, tNoPiv, dNoPiv );\n        if( display )\n        {\n            Display( QRNoPiv, \"QRNoPiv\" );\n            Display( tNoPiv, \"tNoPiv\" );\n            Display( dNoPiv, \"dNoPiv\" );\n        }\n        if( print )\n        {\n            Print( QRNoPiv, \"QRNoPiv\" );\n            Print( tNoPiv, \"tNoPiv\" );\n            Print( dNoPiv, \"dNoPiv\" );\n        }\n\n        // Check the error in the pivoted QR factorization, \n        // || A P - Q R ||_F / || A ||_F\n        auto E( QRPiv );\n        MakeTriangular( UPPER, E );\n        qr::ApplyQ( LEFT, NORMAL, QRPiv, tPiv, dPiv, E );\n        PermuteCols( E, perm );\n        Axpy( C(-1), A, E );\n        const Real frobQRPiv = FrobeniusNorm( E );\n        if( display )\n            Display( E, \"A P - Q R\" );\n        if( print )\n            Print( E, \"A P - Q R\" );\n\n        // Check the error in the standard QR factorization, \n        // || A - Q R ||_F / || A ||_F\n        E = QRNoPiv;\n        MakeTriangular( UPPER, E );\n        qr::ApplyQ( LEFT, NORMAL, QRNoPiv, tNoPiv, dNoPiv, E );\n        Axpy( C(-1), A, E );\n        const Real frobQRNoPiv = FrobeniusNorm( E );\n        if( display )\n            Display( E, \"A - Q R\" );\n        if( print )\n            Print( E, \"A - Q R\" );\n\n        // Check orthogonality of pivoted Q, || I - Q^H Q ||_F / || A ||_F\n        Identity( E, m, n );\n        qr::ApplyQ( LEFT, NORMAL, QRPiv, tPiv, dPiv, E );\n        qr::ApplyQ( LEFT, ADJOINT, QRPiv, tPiv, dPiv, E );\n        const Int k = std::min(m,n);\n        auto EUpper = View( E, 0, 0, k, k );\n        UpdateDiagonal( EUpper, C(-1) );\n        const Real frobOrthogPiv = FrobeniusNorm( EUpper ); \n        if( display )\n            Display( E, \"pivoted I - Q^H Q\" );\n        if( print )\n            Print( E, \"pivoted I - Q^H Q\" );\n\n        // Check orthogonality of unpivoted Q, || I - Q^H Q ||_F / || A ||_F\n        Identity( E, m, n );\n        qr::ApplyQ( LEFT, NORMAL, QRPiv, tPiv, dPiv, E );\n        qr::ApplyQ( LEFT, ADJOINT, QRPiv, tPiv, dPiv, E );\n        EUpper = View( E, 0, 0, k, k );\n        UpdateDiagonal( EUpper, C(-1) );\n        const Real frobOrthogNoPiv = FrobeniusNorm( EUpper ); \n        if( display )\n            Display( E, \"unpivoted I - Q^H Q\" );\n        if( print )\n            Print( E, \"unpivoted I - Q^H Q\" );\n\n        if( worldRank == 0 )\n        {\n            std::cout << \"|| A ||_F = \" << frobA << \"\\n\\n\"\n                      << \"With pivoting: \\n\" \n                      << \"    || A P - Q R ||_F / || A ||_F = \" \n                      << frobQRPiv/frobA << \"\\n\"\n                      << \"    || I - Q^H Q ||_F / || A ||_F = \"\n                      << frobOrthogPiv/frobA << \"\\n\\n\"\n                      << \"Without pivoting: \\n\"\n                      << \"    || A - Q R ||_F / || A ||_F = \"\n                      << frobQRNoPiv/frobA << \"\\n\"\n                      << \"    || I - Q^H Q ||_F / || A ||_F = \"\n                      << frobOrthogNoPiv/frobA << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/ChunkedPseudospectrum.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_ENTRYWISEMAP_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_PSEUDOSPECTRUM_INC\n\n#include ELEM_BULLSHEAD_INC\n#include ELEM_FOXLI_INC\n#include ELEM_GRCAR_INC\n#include ELEM_HATANONELSON_INC\n#include ELEM_HELMHOLTZPML_INC\n#include ELEM_LOTKIN_INC\n#include ELEM_TREFETHEN_INC\n#include ELEM_TRIANGLE_INC\n#include ELEM_UNIFORM_INC\n#include ELEM_UNIFORMHELMHOLTZGREENS_INC\n#include ELEM_WHALE_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        Int r = Input(\"--gridHeight\",\"process grid height\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int matType = \n            Input(\"--matType\",\"0:uniform,1:Haar,2:Lotkin,3:Grcar,4:FoxLi,\"\n                              \"5:HelmholtzPML1D,6:HelmholtzPML2D,7:Trefethen,\"\n                              \"8:Bull's head,9:Triangle,10:Whale,\"\n                              \"11:UniformHelmholtzGreen's,12:HatanoNelson\",4);\n        const Int n = Input(\"--size\",\"height of matrix\",100);\n        const Int nbAlg = Input(\"--nbAlg\",\"algorithmic blocksize\",96);\n#ifdef ELEM_HAVE_SCALAPACK\n        // QR algorithm options\n        const Int nbDist = Input(\"--nbDist\",\"distribution blocksize\",32);\n#else\n        // Spectral Divide and Conquer options\n        const Int cutoff = Input(\"--cutoff\",\"problem size for QR\",256);\n        const Int maxInnerIts = Input(\"--maxInnerIts\",\"SDC limit\",2);\n        const Int maxOuterIts = Input(\"--maxOuterIts\",\"SDC limit\",10);\n        const bool random = Input(\"--random\",\"Random RRQR in SDC\",true);\n        const Real sdcTol = Input(\"--sdcTol\",\"Rel. tol. for SDC\",1e-6);\n        const Real spreadFactor = Input(\"--spreadFactor\",\"median pert.\",1e-6);\n        const Real signTol = Input(\"--signTol\",\"Sign tolerance for SDC\",1e-9);\n#endif\n        const Real realCenter = Input(\"--realCenter\",\"real center\",0.);\n        const Real imagCenter = Input(\"--imagCenter\",\"imag center\",0.);\n        Real realWidth = Input(\"--realWidth\",\"x width of image\",0.);\n        Real imagWidth = Input(\"--imagWidth\",\"y width of image\",0.);\n        const Real numReal = Input(\"--numReal\",\"num real chunks\",2);\n        const Real numImag = Input(\"--numImag\",\"num imag chunks\",2);\n        const Int realSize = Input(\"--realSize\",\"number of x samples\",100);\n        const Int imagSize = Input(\"--imagSize\",\"number of y samples\",100);\n        const bool arnoldi = Input(\"--arnoldi\",\"use Arnoldi?\",true);\n        const Int basisSize = Input(\"--basisSize\",\"num basis vectors\",10);\n        const Int maxIts = Input(\"--maxIts\",\"maximum pseudospec iter's\",200);\n        const Real psTol = Input(\"--psTol\",\"tolerance for pseudospectra\",1e-6);\n        // Uniform options\n        const Real uniformRealCenter = \n            Input(\"--uniformRealCenter\",\"real center of uniform dist\",0.);\n        const Real uniformImagCenter =\n            Input(\"--uniformImagCenter\",\"imag center of uniform dist\",0.);\n        const Real uniformRadius =\n            Input(\"--uniformRadius\",\"radius of uniform dist\",1.);\n        // Grcar options\n        const Int numBands = Input(\"--numBands\",\"num bands for Grcar\",3);\n        // Fox-Li options\n        const Real omega = Input(\"--omega\",\"frequency for Fox-Li/Helm\",16*M_PI);\n        // Helmholtz-PML options [also uses omega from Fox-Li]\n        const Int mx = Input(\"--mx\",\"number of x points for HelmholtzPML\",30);\n        const Int my = Input(\"--my\",\"number of y points for HelmholtzPML\",30);\n        const Int numPmlPoints = Input(\"--numPml\",\"num PML points for Helm\",5);\n        const double sigma = Input(\"--sigma\",\"PML amplitude\",1.5);\n        const double pmlExp = Input(\"--pmlExp\",\"PML takeoff exponent\",3.);\n        // Uniform Helmholtz Green's options\n        const double lambda = Input(\"--lambda\",\"wavelength of U.H.Green's\",0.1);\n        // Hatano-Nelson options \n        const double gHatano = Input(\"--gHatano\",\"g in Hatano-Nelson\",0.5);\n        const bool periodic = Input(\"--periodic\",\"periodic HatanoNelson?\",true);\n        // Input/Output options\n        const bool progress = Input(\"--progress\",\"print progress?\",true);\n        const bool deflate = Input(\"--deflate\",\"deflate?\",true);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        const bool write = Input(\"--write\",\"write matrices?\",false);\n        const bool saveSchur = Input(\"--saveSchur\",\"save Schur factor?\",true);\n        const Int numSaveFreq = \n            Input(\"--numSaveFreq\",\"numerical save frequency\",-1);\n        const Int imgSaveFreq = \n            Input(\"--imgSaveFreq\",\"image save frequency\",-1);\n        const Int imgDispFreq =\n            Input(\"--imgDispFreq\",\"image display frequency\",-1);\n        const std::string numBase = \n            Input(\"--numBase\",\"numerical save basename\",std::string(\"num\"));\n        const std::string imgBase = \n            Input(\"--imgBase\",\"image save basename\",std::string(\"img\"));\n        const Int numFormatInt = Input(\"--numFormat\",\"numerical format\",2);\n        const Int imgFormatInt = Input(\"--imgFormat\",\"image format\",8);\n        const Int colorMapInt = Input(\"--colorMap\",\"color map\",0);\n        const bool itCounts = Input(\"--itCounts\",\"display iter. counts?\",true);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( mpi::Size(mpi::COMM_WORLD) );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( mpi::COMM_WORLD, r, order );\n        SetBlocksize( nbAlg );\n        if( numFormatInt < 1 || numFormatInt >= FileFormat_MAX )\n            LogicError(\"Invalid numerical format integer, should be in [1,\",\n                       FileFormat_MAX,\")\");\n        if( imgFormatInt < 1 || imgFormatInt >= FileFormat_MAX )\n            LogicError(\"Invalid image format integer, should be in [1,\",\n                       FileFormat_MAX,\")\");\n\n        const FileFormat numFormat = static_cast<FileFormat>(numFormatInt);\n        const FileFormat imgFormat = static_cast<FileFormat>(imgFormatInt);\n        const ColorMap colorMap = static_cast<ColorMap>(colorMapInt);\n        SetColorMap( colorMap );\n        const C center(realCenter,imagCenter);\n        const C uniformCenter(uniformRealCenter,uniformImagCenter);\n\n        bool isReal = true;\n        std::string matName;\n        DistMatrix<Real> AReal(g);\n        DistMatrix<C> ACpx(g);\n        switch( matType )\n        {\n        case 0: matName=\"uniform\"; \n                Uniform( ACpx, n, n, uniformCenter, uniformRadius ); \n                isReal = false;\n                break;\n        case 1: matName=\"Haar\"; \n                Haar( ACpx, n ); \n                isReal = false;\n                break;\n        case 2: matName=\"Lotkin\"; \n                Lotkin( AReal, n ); \n                isReal = true;\n                break;\n        case 3: matName=\"Grcar\"; \n                Grcar( AReal, n, numBands ); \n                isReal = true;\n                break;\n        case 4: matName=\"FoxLi\"; \n                FoxLi( ACpx, n, omega ); \n                isReal = false;\n                break;\n        case 5: matName=\"HelmholtzPML\"; \n                HelmholtzPML\n                ( ACpx, n, C(omega), numPmlPoints, sigma, pmlExp ); \n                isReal = false;\n                break;\n        case 6: matName=\"HelmholtzPML2D\"; \n                HelmholtzPML\n                ( ACpx, mx, my, C(omega), numPmlPoints, sigma, pmlExp ); \n                isReal = false;\n                break;\n        case 7: matName=\"Trefethen\";\n                Trefethen( ACpx, n );\n                isReal = false;\n                break;\n        case 8: matName=\"BullsHead\";\n                BullsHead( ACpx, n );\n                isReal = false;\n                break;\n        case 9: matName=\"Triangle\";\n                Triangle( AReal, n );\n                isReal = true;\n                break;\n        case 10: matName=\"Whale\";\n                 Whale( ACpx, n );\n                 isReal = false;\n                 break;\n        case 11: matName=\"UniformHelmholtzGreens\";\n                 UniformHelmholtzGreens( ACpx, n, lambda );\n                 isReal = false;\n                 break;\n        case 12: matName=\"HatanoNelson\";\n                 HatanoNelson\n                 ( AReal, n, realCenter, uniformRadius, gHatano, periodic );\n                 isReal = true;\n                 break;\n        default: LogicError(\"Invalid matrix type\");\n        }\n        if( display )\n        {\n            if( isReal )\n                Display( AReal, \"A\" );\n            else\n                Display( ACpx, \"A\" );\n        }\n        if( write )\n        {\n            if( isReal )\n            {\n                Write( AReal, \"A\", numFormat );\n                Write( AReal, \"A\", imgFormat );\n            }\n            else\n            {\n                Write( ACpx, \"A\", numFormat );\n                Write( ACpx, \"A\", imgFormat );\n            }\n        }\n\n        // Begin by computing the Schur decomposition\n        Timer timer;\n        DistMatrix<C,VR,STAR> w(g);\n        mpi::Barrier( mpi::COMM_WORLD );\n        const bool formATR = true;\n#ifdef ELEM_HAVE_SCALAPACK\n        SetDefaultBlockHeight( nbDist );\n        SetDefaultBlockWidth( nbDist );\n        timer.Start();\n        if( isReal )\n            schur::QR( AReal, w, formATR );\n        else\n            schur::QR( ACpx, w, formATR );\n        mpi::Barrier( mpi::COMM_WORLD );\n        const double qrTime = timer.Stop();\n        if( mpi::WorldRank() == 0 )\n            std::cout << \"QR algorithm took \" << qrTime << \" seconds\" \n                      << std::endl; \n#else\n        SdcCtrl<Real> sdcCtrl;\n        sdcCtrl.cutoff = cutoff;\n        sdcCtrl.maxInnerIts = maxInnerIts;\n        sdcCtrl.maxOuterIts = maxOuterIts;\n        sdcCtrl.tol = sdcTol;\n        sdcCtrl.spreadFactor = spreadFactor;\n        sdcCtrl.random = random;\n        sdcCtrl.progress = progress;\n        sdcCtrl.signCtrl.tol = signTol;\n        sdcCtrl.signCtrl.progress = progress;\n        timer.Start();\n        if( isReal )\n        {\n            DistMatrix<Real> XReal(g);\n            schur::SDC( AReal, w, XReal, formATR, sdcCtrl );\n        }\n        else\n        {\n            DistMatrix<C> XCpx(g);\n            schur::SDC( ACpx, w, XCpx, formATR, sdcCtrl );\n        }\n        mpi::Barrier( mpi::COMM_WORLD );\n        const double sdcTime = timer.Stop();\n        if( mpi::WorldRank() == 0 )\n            std::cout << \"SDC took \" << sdcTime << \" seconds\" << std::endl; \n#endif\n        if( saveSchur )\n        {\n            if( mpi::WorldRank() == 0 )\n            {\n                std::cout << \"Writing Schur decomposition to file...\";\n                std::cout.flush();\n            }\n            timer.Start();\n            if( isReal )\n            {\n                std::ostringstream os;\n                os << matName << \"-\" \n                   << AReal.ColStride() << \"x\" << AReal.RowStride()\n                   << \"-\" << AReal.DistRank();\n                write::Binary( AReal.LockedMatrix(), os.str() );\n            } \n            else\n            {\n                std::ostringstream os;\n                os << matName << \"-\" \n                   << ACpx.ColStride() << \"x\" << ACpx.RowStride()\n                   << \"-\" << ACpx.DistRank();\n                write::Binary( ACpx.LockedMatrix(), os.str() );\n            }\n            mpi::Barrier( mpi::COMM_WORLD );\n            const double saveSchurTime = timer.Stop();\n            if( mpi::WorldRank() == 0 )\n                std::cout << \"DONE. \" << saveSchurTime << \" seconds\" \n                          << std::endl;\n        }\n\n        // Find a window if none is specified\n        if( realWidth == 0. || imagWidth == 0. )\n        {\n            const Real radius = MaxNorm( w );\n            const Real oneNorm = ( isReal ? OneNorm(AReal) : OneNorm(ACpx) );\n            Real width;\n            if( oneNorm == 0. && radius == 0. )\n            {\n                width = 1;\n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Setting width to 1 to handle zero matrix\"\n                              << std::endl;\n            }\n            else if( radius >= 0.2*oneNorm )\n            {\n                width = 2.5*radius;\n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Setting width to \" << width\n                              << \" based on the spectral radius, \" \n                              << radius << std::endl;\n            }\n            else\n            {\n                width = 0.8*oneNorm;\n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Setting width to \" << width\n                              << \" based on the one norm, \" << oneNorm \n                              << std::endl;\n            }\n            realWidth = width;\n            imagWidth = width;\n        }\n\n        PseudospecCtrl<Real> psCtrl;\n        psCtrl.schur = true;\n        psCtrl.maxIts = maxIts;\n        psCtrl.tol = psTol;\n        psCtrl.deflate = deflate;\n        psCtrl.arnoldi = arnoldi;\n        psCtrl.basisSize = basisSize;\n        psCtrl.progress = progress;\n        psCtrl.snapCtrl.imgSaveFreq = imgSaveFreq;\n        psCtrl.snapCtrl.numSaveFreq = numSaveFreq;\n        psCtrl.snapCtrl.imgDispFreq = imgDispFreq;\n        psCtrl.snapCtrl.imgFormat = imgFormat;\n        psCtrl.snapCtrl.numFormat = numFormat;\n        psCtrl.snapCtrl.itCounts = itCounts;\n\n        // Visualize/write the pseudospectrum within each window\n        DistMatrix<Real> invNormMap(g);\n        DistMatrix<Int> itCountMap(g);\n        const Int xBlock = realSize / numReal;\n        const Int yBlock = imagSize / numImag;\n        const Int xLeftover = realSize - (numReal-1)*xBlock;\n        const Int yLeftover = imagSize - (numImag-1)*yBlock;\n        const Real realStep = realWidth/realSize;\n        const Real imagStep = imagWidth/imagSize;\n        const C corner = center - C(realWidth/2,imagWidth/2);\n        for( Int realChunk=0; realChunk<numReal; ++realChunk )\n        {\n            const Int realChunkSize = \n                ( realChunk==numReal-1 ? xLeftover : xBlock );\n            const Real realChunkWidth = realStep*realChunkSize;\n            for( Int imagChunk=0; imagChunk<numImag; ++imagChunk )\n            {\n                std::ostringstream chunkStream;\n                chunkStream << \"_\" << realChunk << \"_\" << imagChunk;\n                const std::string chunkTag = chunkStream.str();\n\n                const Int imagChunkSize = \n                    ( imagChunk==numImag-1 ? yLeftover : yBlock );\n                const Real imagChunkWidth = imagStep*imagChunkSize;\n\n                const C chunkCorner = corner + \n                    C(realStep*realChunk*xBlock,imagStep*imagChunk*yBlock);\n                const C chunkCenter = chunkCorner + \n                    0.5*C(realStep*realChunkSize,imagStep*imagChunkSize);\n\n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Starting computation for chunk centered at \"\n                              << chunkCenter << std::endl;\n                mpi::Barrier( mpi::COMM_WORLD );\n                timer.Start();\n                psCtrl.snapCtrl.numBase = matName+\"-\"+numBase+chunkTag;\n                psCtrl.snapCtrl.imgBase = matName+\"-\"+imgBase+chunkTag;\n                if( isReal )\n                {\n                    itCountMap = QuasiTriangularPseudospectrum\n                    ( AReal, invNormMap, chunkCenter, \n                      realChunkWidth, imagChunkWidth, \n                      realChunkSize, imagChunkSize, psCtrl );\n                }\n                else\n                {\n                    itCountMap = TriangularPseudospectrum\n                    ( ACpx, invNormMap, chunkCenter, \n                      realChunkWidth, imagChunkWidth, \n                      realChunkSize, imagChunkSize, psCtrl );\n                }\n                mpi::Barrier( mpi::COMM_WORLD );\n                const double pseudoTime = timer.Stop();\n                const Int numIts = MaxNorm( itCountMap );\n                if( mpi::WorldRank() == 0 )\n                {\n                    std::cout << \"num seconds=\" << pseudoTime << \"\\n\"\n                              << \"num iterations=\" << numIts << std::endl;\n                }\n            }\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/ChunkedTriangularPseudospectrum.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_ENTRYWISEMAP_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_PSEUDOSPECTRUM_INC\n\n#include ELEM_FOXLI_INC\n#include ELEM_DEMMEL_INC\n#include ELEM_GRCAR_INC\n#include ELEM_LOTKIN_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        Int r = Input(\"--gridHeight\",\"process grid height\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int matType =\n            Input(\"--matType\",\"0:uniform,1:Demmel,2:Lotkin,3:Grcar,4:FoxLi,\"\n                  \"5:custom real,6:custom complex\",1);\n        bool quasi = Input(\"--quasi\",\"Quasi-triang. real matrix?\",true);\n        const std::string basename =\n            Input(\"--basename\",\"basename of distributed Schur factor\",\n                  std::string(\"default\"));\n        const Int n = Input(\"--size\",\"height of matrix\",100);\n        const Int nbAlg = Input(\"--nbAlg\",\"algorithmic blocksize\",96);\n        const Real realCenter = Input(\"--realCenter\",\"real center\",0.);\n        const Real imagCenter = Input(\"--imagCenter\",\"imag center\",0.);\n        Real realWidth = Input(\"--realWidth\",\"x width of image\",0.);\n        Real imagWidth = Input(\"--imagWidth\",\"y width of image\",0.);\n        const Real numReal = Input(\"--numReal\",\"num real chunks\",2);\n        const Real numImag = Input(\"--numImag\",\"num imag chunks\",2);\n        const Int realSize = Input(\"--realSize\",\"number of x samples\",100);\n        const Int imagSize = Input(\"--imagSize\",\"number of y samples\",100);\n        const bool arnoldi = Input(\"--arnoldi\",\"use Arnoldi?\",true);\n        const Int basisSize = Input(\"--basisSize\",\"num Arnoldi vectors\",10);\n        const Int maxIts = Input(\"--maxIts\",\"maximum pseudospec iter's\",200);\n        const Real psTol = Input(\"--psTol\",\"tolerance for pseudospectra\",1e-6);\n        const Real uniformRealCenter = \n            Input(\"--uniformRealCenter\",\"real center of uniform dist\",0.);\n        const Real uniformImagCenter =\n            Input(\"--uniformImagCenter\",\"imag center of uniform dist\",0.);\n        const Real uniformRadius =\n            Input(\"--uniformRadius\",\"radius of uniform dist\",1.);\n        const Int numBands = Input(\"--numBands\",\"num bands for Grcar\",3);\n        const Real omega = Input(\"--omega\",\"frequency for Fox-Li\",16*M_PI);\n        const bool progress = Input(\"--progress\",\"print progress?\",true);\n        const bool deflate = Input(\"--deflate\",\"deflate?\",true);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        const bool write = Input(\"--write\",\"write matrices?\",false);\n        const Int numSaveFreq = \n            Input(\"--numSaveFreq\",\"numerical save frequency\",-1);\n        const Int imgSaveFreq = \n            Input(\"--imgSaveFreq\",\"image save frequency\",-1);\n        const Int imgDispFreq =\n            Input(\"--imgDispFreq\",\"image display frequency\",-1);\n        const std::string numBase =\n            Input(\"--numBase\",\"numerical save basename\",std::string(\"num\"));\n        const std::string imgBase =\n            Input(\"--imgBase\",\"image save basename\",std::string(\"img\"));\n        const Int numFormatInt = Input(\"--numFormat\",\"numerical format\",2);\n        const Int imgFormatInt = Input(\"--imgFormat\",\"image format\",8);\n        const Int colorMapInt = Input(\"--colorMap\",\"color map\",0);\n        const bool itCounts = Input(\"--itCounts\",\"display iter. counts?\",true);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( mpi::Size(mpi::COMM_WORLD) );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( mpi::COMM_WORLD, r, order );\n        SetBlocksize( nbAlg );\n        if( numFormatInt < 1 || numFormatInt >= FileFormat_MAX )\n            LogicError(\"Invalid numerical format integer, should be in [1,\",\n                       FileFormat_MAX,\")\");\n        if( imgFormatInt < 1 || imgFormatInt >= FileFormat_MAX )\n            LogicError(\"Invalid image format integer, should be in [1,\",\n                       FileFormat_MAX,\")\");\n\n        const FileFormat numFormat = static_cast<FileFormat>(numFormatInt);\n        const FileFormat imgFormat = static_cast<FileFormat>(imgFormatInt);\n        const ColorMap colorMap = static_cast<ColorMap>(colorMapInt);\n        SetColorMap( colorMap );\n        const C center(realCenter,imagCenter);\n        const C uniformCenter(uniformRealCenter,uniformImagCenter);\n\n        bool isReal = true;\n        std::string matName;\n        std::ostringstream os;\n        DistMatrix<Real> AReal(g);\n        DistMatrix<C> ACpx(g);\n        switch( matType )\n        {\n        case 0: matName=\"uniform\";\n            Uniform( ACpx, n, n, uniformCenter, uniformRadius ); \n            MakeTriangular( UPPER, ACpx );\n            isReal = false;\n            break;\n        case 1: matName=\"Demmel\";\n            Demmel( AReal, n ); \n            MakeTriangular( UPPER, AReal );\n            isReal = true;\n            break;\n        case 2: matName=\"Lotkin\";\n            Lotkin( AReal, n );\n            MakeTriangular( UPPER, AReal );\n            isReal = true;\n            break;\n        case 3: matName=\"Grcar\";\n            Grcar( AReal, n, numBands ); \n            MakeTriangular( UPPER, AReal );\n            isReal = true;\n            break;\n        case 4: matName=\"FoxLi\";\n            FoxLi( ACpx, n, omega );\n            MakeTriangular( UPPER, ACpx );\n            isReal = false;\n            break;\n        case 5: matName=basename;\n            os << basename << \"-\" \n               << AReal.ColStride() << \"x\" << AReal.RowStride()\n               << \"-\" << AReal.DistRank() << \".bin\";\n            AReal.Resize( n, n );\n            read::Binary( AReal.Matrix(), os.str() );\n            isReal = true;\n            break;\n        case 6: matName=basename;\n            os << basename << \"-\" << ACpx.ColStride() << \"x\" << ACpx.RowStride()\n               << \"-\" << ACpx.DistRank() << \".bin\";\n            ACpx.Resize( n, n );\n            read::Binary( ACpx.Matrix(), os.str() );\n            isReal = false;\n            break;\n        default:\n            LogicError(\"Invalid matrix type\");\n        }\n        if( display )\n        {\n            if( isReal )\n                Display( AReal, \"A\" );\n            else\n                Display( ACpx, \"A\" );\n        }\n        if( write )\n        {\n            if( isReal )\n            {\n                Write( AReal, \"A\", numFormat );\n                Write( AReal, \"A\", imgFormat );\n            }\n            else\n            {\n                Write( ACpx, \"A\", numFormat );\n                Write( ACpx, \"A\", imgFormat );\n            }\n        }\n\n        // Find a window if none is specified\n        if( realWidth == 0. || imagWidth == 0. )\n        {\n            Real radius;\n            if( isReal )\n            {\n                if( quasi )\n                    radius = MaxNorm( schur::QuasiTriangEig( AReal ) );\n                else\n                    radius = MaxNorm( AReal.GetDiagonal() );\n            }\n            else\n                radius = MaxNorm( ACpx.GetDiagonal() );\n        \n            const Real oneNorm = ( isReal ? OneNorm(AReal) : OneNorm(ACpx) );\n            Real width;\n            if( oneNorm == 0. && radius == 0. )\n            {\n                width = 1;\n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Setting width to 1 to handle zero matrix\"\n                              << std::endl;\n            }\n            else if( radius >= 0.2*oneNorm )\n            {\n                width = 2.5*radius;\n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Setting width to \" << width\n                              << \" based on the spectral radius, \" \n                              << radius << std::endl;\n            }\n            else\n            {\n                width = 0.8*oneNorm;\n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Setting width to \" << width\n                              << \" based on the one norm, \" << oneNorm \n                              << std::endl;\n            }\n            realWidth = width;\n            imagWidth = width;\n        }\n\n        PseudospecCtrl<Real> psCtrl;\n        psCtrl.schur = true;\n        psCtrl.maxIts = maxIts;\n        psCtrl.tol = psTol;\n        psCtrl.deflate = deflate;\n        psCtrl.arnoldi = arnoldi;\n        psCtrl.basisSize = basisSize;\n        psCtrl.progress = progress;\n        psCtrl.snapCtrl.imgSaveFreq = imgSaveFreq;\n        psCtrl.snapCtrl.numSaveFreq = numSaveFreq;\n        psCtrl.snapCtrl.imgDispFreq = imgDispFreq;\n        psCtrl.snapCtrl.imgFormat = imgFormat;\n        psCtrl.snapCtrl.numFormat = numFormat;\n        psCtrl.snapCtrl.itCounts = itCounts;\n\n        // Visualize/write the pseudospectrum within each window\n        Timer timer;\n        DistMatrix<Real> invNormMap(g);\n        DistMatrix<Int> itCountMap(g);\n        const Int xBlock = realSize / numReal;\n        const Int yBlock = imagSize / numImag;\n        const Int xLeftover = realSize - (numReal-1)*xBlock;\n        const Int yLeftover = imagSize - (numImag-1)*yBlock;\n        const Real xStep = realWidth/realSize;\n        const Real yStep = imagWidth/imagSize;\n        const C corner = center - C(realWidth/2,imagWidth/2);\n        for( Int realChunk=0; realChunk<numReal; ++realChunk )\n        {\n            const Int realChunkSize = \n                ( realChunk==numReal-1 ? xLeftover : xBlock );\n            const Real realChunkWidth = xStep*realChunkSize;\n            for( Int imagChunk=0; imagChunk<numImag; ++imagChunk )\n            {\n                std::ostringstream chunkStream;\n                chunkStream << \"_\" << realChunk << \"_\" << imagChunk;\n                const std::string chunkTag = chunkStream.str();\n\n                const Int imagChunkSize = \n                    ( imagChunk==numImag-1 ? yLeftover : yBlock );\n                const Real imagChunkWidth = yStep*imagChunkSize;\n\n                const C chunkCorner = corner + \n                    C(xStep*realChunk*xBlock,yStep*imagChunk*yBlock);\n                const C chunkCenter = chunkCorner + \n                    0.5*C(xStep*realChunkSize,yStep*imagChunkSize);\n\n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Starting computation for chunk centered at \"\n                              << chunkCenter << std::endl;\n                mpi::Barrier( mpi::COMM_WORLD );\n                timer.Start();\n                psCtrl.snapCtrl.imgBase = matName+\"-\"+imgBase+chunkTag;\n                psCtrl.snapCtrl.numBase = matName+\"-\"+numBase+chunkTag;\n                if( isReal )\n                {\n                    if( quasi )\n                        itCountMap = QuasiTriangularPseudospectrum\n                        ( AReal, invNormMap, chunkCenter, \n                          realChunkWidth, imagChunkWidth, \n                          realChunkSize, imagChunkSize, psCtrl );\n                    else\n                        itCountMap = TriangularPseudospectrum\n                        ( AReal, invNormMap, chunkCenter, \n                          realChunkWidth, imagChunkWidth, \n                          realChunkSize, imagChunkSize, psCtrl );\n                }\n                else\n                {\n                    itCountMap = TriangularPseudospectrum\n                    ( ACpx, invNormMap, chunkCenter, \n                      realChunkWidth, imagChunkWidth, \n                      realChunkSize, imagChunkSize, psCtrl );\n                }\n                mpi::Barrier( mpi::COMM_WORLD );\n                const double pseudoTime = timer.Stop();\n                const Int numIts = MaxNorm( itCountMap );\n                if( mpi::WorldRank() == 0 )\n                {\n                    std::cout << \"num seconds=\" << pseudoTime << \"\\n\"\n                              << \"num iterations=\" << numIts << std::endl;\n                }\n            }\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/ComplexHermitianFunction.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HERMITIANFUNCTION_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> H( n, n );\n\n        // Fill the matrix since we did not pass in a buffer. \n        //\n        // We will fill entry (i,j) with the complex value (i+j,i-j) so that \n        // the global matrix is Hermitian. However, only one triangle of the \n        // matrix actually needs to be filled, the symmetry can be implicit.\n        //\n        const Int localHeight = H.LocalHeight();\n        const Int localWidth = H.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            // Our process owns the rows colShift:colStride:n-1,\n            //           and the columns rowShift:rowStride:n-1\n            const Int j = H.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = H.GlobalRow(iLoc);\n                H.SetLocal( iLoc, jLoc, C(i+j,i-j) );\n            }\n        }\n        if( print )\n            Print( H, \"H\" );\n\n        // Reform H with the exponentials of the original eigenvalues\n        ComplexHermitianFunction\n        ( LOWER, H, []( Real alpha ) { return Exp(Complex<Real>(0,alpha)); } );\n        if( print )\n            Print( H, \"exp(i*H)\" );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/GLM.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_GLM_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> F;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try \n    {\n        const Int m = Input(\"--m\",\"height of A\",100);\n        const Int n = Input(\"--n\",\"width of A\",100);\n        const Int p = Input(\"--p\",\"width of B\",20);\n        const Int numRhs = Input(\"--numRhs\",\"# of right-hand sides\",5);\n        const Int blocksize = Input(\"--blocksize\",\"algorithmic blocksize\",64);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        Int gridHeight = Input(\"--gridHeight\",\"grid height\",0);\n        ProcessInput();\n        PrintInputReport();\n\n        // Set the algorithmic blocksize\n        SetBlocksize( blocksize );\n\n        // If the grid height wasn't specified, then we should attempt to build\n        // a nearly-square process grid\n        if( gridHeight == 0 )\n            gridHeight = Grid::FindFactor( commSize );\n        Grid g( comm, gridHeight );\n\n        DistMatrix<F> A(g), B(g), D(g), Y(g);\n        Uniform( A, m, n );\n        Uniform( B, m, p );\n        Uniform( D, m, numRhs );\n        auto ACopy( A );\n        auto BCopy( B );\n        auto DCopy( D );\n\n        if( print )\n        {\n            Print( A, \"A\" );\n            Print( B, \"B\" );\n            Print( D, \"D\" );\n        }\n\n        GLM( A, B, D, Y );\n\n        if( print ) \n        {\n            Print( D, \"X\" );\n            Print( Y, \"Y\" );\n        }\n        \n        const Real DFrob = FrobeniusNorm( DCopy ); \n        Gemm( NORMAL, NORMAL, F(-1), ACopy, D, F(1), DCopy );\n        Gemm( NORMAL, NORMAL, F(-1), BCopy, Y, F(1), DCopy );\n        const Real EFrob = FrobeniusNorm( DCopy );\n        if( print )\n            Print( DCopy, \"D - A X - B Y\" );\n        if( commRank == 0 )\n            std::cout << \"|| D             ||_F = \" << DFrob << \"\\n\"\n                      << \"|| A X + B Y - D ||_F = \" << EFrob << \"\\n\"\n                      << std::endl;\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/GaussianElimination.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GAUSSIANELIMINATION_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix\",100);\n        const Int numRhs = Input(\"--numRhs\",\"# of right-hand sides\",1); \n        const Int blocksize = Input(\"--blocksize\",\"algorithmic blocksize\",64);\n        Int gridHeight = Input(\"--gridHeight\",\"grid height\",0);\n        const bool details = Input(\"--details\",\"print norm details?\",false);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        // Set the algorithmic blocksize\n        SetBlocksize( blocksize );\n\n        // If the grid height wasn't specified, then we should attempt to build\n        // a nearly-square process grid\n        if( gridHeight == 0 )\n            gridHeight = Grid::FindFactor( commSize );\n        Grid grid( comm, gridHeight );\n\n        // Set up random A and B, then make the copies X := B and ACopy := A\n        DistMatrix<double> A(grid), B(grid), ACopy(grid), X(grid);\n        for( Int test=0; test<3; ++test )\n        {\n            Uniform( A, n, n );\n            Uniform( B, n, numRhs );\n            ACopy = A;\n            X = B;\n            if( print )\n            {\n                Print( A, \"A\" );\n                Print( B, \"B\" );\n            }\n\n            // Perform the LU factorization and simultaneous solve\n            if( commRank == 0 )\n            {\n                std::cout << \"Starting GaussianElimination...\";\n                std::cout.flush();\n            }\n            mpi::Barrier( comm );\n            double startTime = mpi::Time();\n            GaussianElimination( A, X );\n            mpi::Barrier( comm );\n            double stopTime = mpi::Time();\n            if( commRank == 0 )\n                std::cout << stopTime-startTime << \" seconds.\" << std::endl;\n\n            // Form R := A X - B\n            DistMatrix<double> R( B );\n            Gemm( NORMAL, NORMAL, 1., ACopy, X, -1., R );\n\n            // Compute the relevant Frobenius norms and a relative residual\n            const double epsilon = lapack::MachineEpsilon<double>();\n            const double AFrobNorm = FrobeniusNorm( ACopy );\n            const double BFrobNorm = FrobeniusNorm( B );\n            const double XFrobNorm = FrobeniusNorm( X );\n            const double RFrobNorm = FrobeniusNorm( R );\n            const double frobResidual = \n                RFrobNorm / (AFrobNorm*XFrobNorm*epsilon*n);\n            if( commRank == 0 )\n            {\n                if( details )\n                    std::cout << \"||A||_F       = \" << AFrobNorm << \"\\n\"\n                              << \"||B||_F       = \" << BFrobNorm << \"\\n\"\n                              << \"||X||_F       = \" << XFrobNorm << \"\\n\"\n                              << \"||A X - B||_F = \" << RFrobNorm << \"\\n\";\n                std::cout << \"||A X - B||_F / (||A||_F ||X||_F epsilon n) = \" \n                          << frobResidual << \"\\n\";\n            }\n\n            // Compute the relevant infinity norms and a relative residual\n            const double AInfNorm = InfinityNorm( ACopy );\n            const double BInfNorm = InfinityNorm( B );\n            const double XInfNorm = InfinityNorm( X );\n            const double RInfNorm = InfinityNorm( R );\n            const double infResidual = RInfNorm / (AInfNorm*XInfNorm*epsilon*n);\n            if( commRank == 0 )\n            {\n                if( details )\n                    std::cout << \"\\n\"\n                              << \"||A||_oo       = \" << AInfNorm << \"\\n\"\n                              << \"||B||_oo       = \" << BInfNorm << \"\\n\"\n                              << \"||X||_oo       = \" << XInfNorm << \"\\n\"\n                              << \"||A X - B||_oo = \" << RInfNorm << \"\\n\";\n                std::cout << \"||A X - B||_oo / (||A||_oo ||X||_oo epsilon n) = \"\n                          << infResidual << \"\\n\";\n            }\n\n            // Compute the relevant one norms and a relative residual\n            const double AOneNorm = OneNorm( ACopy );\n            const double BOneNorm = OneNorm( B );\n            const double XOneNorm = OneNorm( X );\n            const double ROneNorm = OneNorm( R );\n            const double oneResidual = ROneNorm / (AOneNorm*XOneNorm*epsilon*n);\n            if( commRank == 0 )\n            {\n                if( details )\n                    std::cout << \"\\n\"\n                              << \"||A||_1       = \" << AOneNorm << \"\\n\"\n                              << \"||B||_1       = \" << BOneNorm << \"\\n\"\n                              << \"||X||_1       = \" << XOneNorm << \"\\n\"\n                              << \"||A X - B||_1 = \" << ROneNorm << \"\\n\";\n                std::cout << \"||A X - B||_1 / (||A||_1 ||X||_1 epsilon n) = \" \n                          << oneResidual << \"\\n\" << std::endl;\n            }\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/HPDInverse.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_HEMM_INC\n#include ELEM_INVERSE_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\n#include ELEM_IDENTITY_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of HPD matrix\",100);\n        const bool upper = Input(\"--upper\",\"upper storage?\",false);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> A;\n        HermitianUniformSpectrum( A, n, Real(1), Real(20) );\n        if( print )\n            Print( A, \"A\" );\n\n        // Make a copy of A and then overwrite it with its inverse\n        const UpperOrLower uplo = ( upper ? UPPER : LOWER );\n        DistMatrix<C> invA( A );\n        HPDInverse( uplo, invA );\n        if( print )\n        {\n            MakeHermitian( uplo, invA );\n            Print( invA, \"inv(A)\" );\n        }\n\n        // Form I - invA*A and print the relevant norms\n        DistMatrix<C> E;\n        Identity( E, n, n );\n        Hemm( LEFT, uplo, C(-1), invA, A, C(1), E );\n\n        const Real frobNormA = HermitianFrobeniusNorm( uplo, A );\n        const Real frobNormInvA = HermitianFrobeniusNorm( uplo, invA );\n        const Real frobNormError = FrobeniusNorm( E );\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"|| A          ||_F = \" << frobNormA << \"\\n\"\n                      << \"|| invA       ||_F = \" << frobNormInvA << \"\\n\"\n                      << \"|| I - invA A ||_F = \" << frobNormError << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/HPSDCholesky.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_CHOLESKY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of HPSD matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> L;\n        Uniform( L, n, n );\n        MakeTrapezoidal( LOWER, L, -1 );\n        DistMatrix<C> A;\n        Zeros( A, n, n );\n        Herk( LOWER, NORMAL, C(1), L, C(0), A );\n        if( print )\n            Print( A, \"A\" );\n\n        // Replace A with its Cholesky factor\n        HPSDCholesky( LOWER, A );\n        if( print )\n        {\n            MakeTriangular( LOWER, A );\n            Print( A, \"chol(A)\" );\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/HPSDSquareRoot.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_HERK_INC\n#include ELEM_SQUAREROOT_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of HPSD matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> L;\n        Uniform( L, n, n );\n        MakeTrapezoidal( LOWER, L, -1 );\n        DistMatrix<C> A;\n        Zeros( A, n, n );\n        Herk( LOWER, NORMAL, C(1), L, C(0), A );\n        if( print )\n            Print( A, \"A\" );\n\n        // Replace A with its matrix square root\n        HPSDSquareRoot( LOWER, A );\n        if( print )\n        {\n            MakeHermitian( LOWER, A );\n            Print( A, \"sqrt(A)\" );\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/HermitianEig.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_HEMM_INC\n#include ELEM_HERK_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    // This detects whether or not you have already initialized MPI and \n    // does so if necessary. The full routine is elem::Initialize.\n    Initialize( argc, argv );\n\n    // Surround the Elemental calls with try/catch statements in order to \n    // safely handle any exceptions that were thrown during execution.\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        // Create a 2d process grid from a communicator. In our case, it is\n        // MPI_COMM_WORLD. There is another constructor that allows you to \n        // specify the grid dimensions, Grid g( comm, r ), which creates a\n        // grid of height r.\n        Grid g( mpi::COMM_WORLD );\n    \n        // Create an n x n complex distributed matrix, \n        // We distribute the matrix using grid 'g'.\n        //\n        // There are quite a few available constructors, including ones that \n        // allow you to pass in your own local buffer and to specify the \n        // distribution alignments (i.e., which process row and column owns the\n        // top-left element)\n        DistMatrix<C> H( n, n, g );\n\n        // Fill the matrix since we did not pass in a buffer. \n        //\n        // We will fill entry (i,j) with the complex value (i+j,i-j) so that \n        // the global matrix is Hermitian. However, only one triangle of the \n        // matrix actually needs to be filled, the symmetry can be implicit.\n        //\n        const Int localHeight = H.LocalHeight();\n        const Int localWidth = H.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            // Our process owns the rows colShift:colStride:n,\n            //           and the columns rowShift:rowStride:n\n            const Int j = H.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = H.GlobalRow(iLoc);\n                H.SetLocal( iLoc, jLoc, C(i+j,i-j) );\n            }\n        }\n\n        // Make a backup of H before we overwrite it within the eigensolver\n        auto HCopy( H );\n\n        // Call the eigensolver. We first create an empty complex eigenvector \n        // matrix, X[MC,MR], and an eigenvalue column vector, w[VR,* ]\n        //\n        // Optional: set blocksizes and algorithmic choices here. See the \n        //           'Tuning' section of the README for details.\n        DistMatrix<Real,VR,STAR> w( g );\n        DistMatrix<C> X( g );\n        HermitianEig( LOWER, H, w, X, ASCENDING ); \n\n        if( print )\n        {\n            Print( HCopy, \"H\" );\n            Print( X, \"X\" );\n            Print( w, \"w\" );\n        }\n\n        // Check the residual, || H X - Omega X ||_F\n        const Real frobH = HermitianFrobeniusNorm( LOWER, HCopy );\n        auto E( X );\n        DiagonalScale( RIGHT, NORMAL, w, E );\n        Hemm( LEFT, LOWER, C(-1), HCopy, X, C(1), E );\n        const Real frobResid = FrobeniusNorm( E );\n\n        // Check the orthogonality of X\n        Identity( E, n, n );\n        Herk( LOWER, NORMAL, C(-1), X, C(1), E );\n        const Real frobOrthog = HermitianFrobeniusNorm( LOWER, E );\n\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"|| H ||_F = \" << frobH << \"\\n\"\n                      << \"|| H X - X Omega ||_F / || A ||_F = \" \n                      << frobResid / frobH << \"\\n\"\n                      << \"|| X X^H - I ||_F = \" << frobOrthog / frobH\n                      << \"\\n\" << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/HermitianEigFromSequential.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\nusing namespace elem;\nusing namespace std;\n \n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    // This detects whether or not you have already initialized MPI and \n    // does so if necessary. The full routine is elem::Initialize.\n    Initialize( argc, argv );\n\n    // Surround the Elemental calls with try/catch statements in order to \n    // safely handle any exceptions that were thrown during execution.\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        // Create an n x n complex matrix residing on a single process.\n        DistMatrix<C,CIRC,CIRC> HRoot( n, n );\n        if( mpi::WorldRank() == 0 )\n        {\n            // Set entry (i,j) to (i+j,i-j)\n            for( Int j=0; j<n; ++j )\n                for( Int i=0; i<n; ++i )\n                    HRoot.SetLocal( i, j, C(i+j,i-j) );\n        }\n        if( print )\n            Print( HRoot, \"H on process 0\" );\n\n        // Redistribute into the usual matrix distribution\n        DistMatrix<C> H( HRoot );\n        if( print )\n            Print( H, \"H\" );\n\n        // Call the eigensolver. We first create an empty complex eigenvector \n        // matrix, X, and an eigenvalue column vector, w[VR,* ]\n        DistMatrix<Real,VR,STAR> w_VR_STAR;\n        DistMatrix<C> X;\n        // Optional: set blocksizes and algorithmic choices here. See the \n        //           'Tuning' section of the README for details.\n        HermitianEig( LOWER, H, w_VR_STAR, X, ASCENDING );\n        if( print )\n        {\n            Print( w_VR_STAR, \"Eigenvalues of H\" );\n            Print( X, \"Eigenvectors of H\" );\n        }\n\n        // Store a complete copy of w and X on the root\n        DistMatrix<Real,CIRC,CIRC> wRoot( w_VR_STAR );\n        DistMatrix<C,CIRC,CIRC> XRoot( X );\n        if( print )\n        {\n            Print( wRoot, \"Eigenvalues on root process\" );\n            Print( XRoot, \"Eigenvectors on root process\" );\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/HermitianPseudoinverse.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_PSEUDOINVERSE_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'R' and 'C' for convenience\ntypedef double R;\ntypedef Complex<R> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> H( n, n );\n\n        // Fill the matrix since we did not pass in a buffer. \n        //\n        // We will fill entry (i,j) with the complex value (i+j,i-j) so that \n        // the global matrix is Hermitian. However, only one triangle of the \n        // matrix actually needs to be filled, the symmetry can be implicit.\n        //\n        const Int localHeight = H.LocalHeight();\n        const Int localWidth = H.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = H.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = H.GlobalRow(iLoc);\n                H.SetLocal( iLoc, jLoc, C(i+j,i-j) );\n            }\n        }\n        if( print )\n            Print( H, \"H\" );\n\n        // Replace H with its pseudoinverse\n        HermitianPseudoinverse( LOWER, H );\n        MakeHermitian( LOWER, H );\n\n        if( print )\n            Print( H, \"pinv(H)\" );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/HermitianQDWH.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_POLAR_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of Hermitian matrix\",100);\n        const bool colPiv = Input(\"--colPiv\",\"QR with col pivoting?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> A, Q, P;\n        HermitianUniformSpectrum( A, n, 1, 2 );\n        const Real frobA = FrobeniusNorm( A );\n\n        // Compute the polar decomp of A using a QR-based Dynamically Weighted\n        // Halley (QDWH) iteration\n        Q = A;\n        const Int numItsQDWH = herm_polar::QDWH( LOWER, Q, colPiv );\n        Zeros( P, n, n );\n        Gemm( ADJOINT, NORMAL, C(1), Q, A, C(0), P );\n\n        // Check and report overall and orthogonality error\n        DistMatrix<C> B( A );\n        Gemm( NORMAL, NORMAL, C(-1), Q, P, C(1), B );\n        const Real frobQDWH = FrobeniusNorm( B );\n        Identity( B, n, n );\n        Herk( LOWER, NORMAL, C(1), Q, C(-1), B );\n        const Real frobQDWHOrthog = HermitianFrobeniusNorm( LOWER, B );\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << numItsQDWH << \" iterations of QDWH\\n\"\n                      << \"||A - QP||_F / ||A||_F = \" \n                      << frobQDWH/frobA << \"\\n\"\n                      << \"||I - QQ^H||_F / ||A||_F = \" \n                      << frobQDWHOrthog/frobA << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/HermitianSDC.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HERMITIANEIG_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_WIGNER_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"height of matrix\",100);\n        const Int cutoff = Input(\"--cutoff\",\"cutoff for QR alg.\",256);\n        const Int maxInnerIts = Input(\"--maxInnerIts\",\"maximum RURV its\",1);\n        const Int maxOuterIts = Input(\"--maxOuterIts\",\"maximum it's/split\",10);\n        const Real tol = Input(\"--tol\",\"relative tol.\",Real(0));\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> A;\n        Wigner( A, n );\n        const Real frobA = FrobeniusNorm( A );\n\n        HermitianSdcCtrl<Real> sdcCtrl;\n        sdcCtrl.cutoff = cutoff;\n        sdcCtrl.maxInnerIts = maxInnerIts;\n        sdcCtrl.maxOuterIts = maxOuterIts;\n        sdcCtrl.tol = tol;\n\n        // Attempt to compute the spectral decomposition of A, \n        // but do not overwrite A\n        DistMatrix<C> ACopy( A ), Q;\n        DistMatrix<Real,VR,STAR>  w;\n        herm_eig::SDC( LOWER, ACopy, w, Q, sdcCtrl );\n\n        if( display )\n        {\n            Display( A, \"A\" );\n            Display( Q, \"Q\" );\n            Display( w, \"w\" );\n        }\n\n        auto G( Q );\n        DiagonalScale( RIGHT, NORMAL, w, G );\n        Gemm( NORMAL, ADJOINT, C(-1), G, Q, C(1), A );\n        const Real frobE = FrobeniusNorm( A ); \n        MakeIdentity( A );\n        Herk( LOWER, ADJOINT, C(-1), Q, C(1), A );\n        const Real frobOrthog = HermitianFrobeniusNorm( LOWER, A );\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \" || A - Q D Q^H ||_F / || A ||_F = \" << frobE/frobA \n                      << \"\\n\"\n                      << \" || I - Q^H Q ||_F   / || A ||_F = \" \n                      << frobOrthog/frobA << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/HermitianSVD.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_SVD_INC\n#include ELEM_TRACE_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'R' and 'C' for convenience\ntypedef double R;\ntypedef Complex<R> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    // This detects whether or not you have already initialized MPI and \n    // does so if necessary. The full routine is elem::Initialize.\n    Initialize( argc, argv );\n\n    // Extract our MPI rank\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    // Surround the Elemental calls with try/catch statements in order to \n    // safely handle any exceptions that were thrown during execution.\n    try \n    {\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        // Create a 2d process grid from a communicator. In our case, it is\n        // MPI_COMM_WORLD. There is another constructor that allows you to \n        // specify the grid dimensions, Grid g( comm, r, c ), which creates an \n        // r x c grid.\n        Grid g( comm );\n    \n        // Create an n x n complex distributed matrix.\n        // We distribute the matrix using grid 'g'.\n        //\n        // There are quite a few available constructors, including ones that \n        // allow you to pass in your own local buffer and to specify the \n        // distribution alignments (i.e., which process row and column owns the\n        // top-left element)\n        const Int n = 6; // choose a small problem size since we will print\n        DistMatrix<C> H( n, n, g );\n\n        // Fill the matrix since we did not pass in a buffer. \n        //\n        // We will fill entry (i,j) with the complex value (i+j,i-j) so that \n        // the global matrix is Hermitian. However, only one triangle of the \n        // matrix actually needs to be filled, the symmetry can be implicit.\n        //\n        const Int localHeight = H.LocalHeight();\n        const Int localWidth = H.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            // Our process owns the rows colShift:colStride:n,\n            //           and the columns rowShift:rowStride:n\n            const Int j = H.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = H.GlobalRow(iLoc);\n                H.SetLocal( iLoc, jLoc, C(i+j,i-j) );\n            }\n        }\n        // Alternatively, we could have sequentially filled the matrix with \n        // for( Int j=0; j<A.Width(); ++j )\n        //   for( Int i=0; i<A.Height(); ++i )\n        //     A.Set( i, j, C(i+j,i-j) );\n        //\n        // More convenient interfaces are being investigated.\n        //\n        if( print )\n            Print( H, \"H\" );\n\n        // Print its trace\n        const C trace = Trace( H );\n        if( commRank == 0 )\n            std::cout << \"Tr(H) = \" << trace << std::endl;\n\n        // Build the singular value decomposition through the Hermitian EVD.\n        //\n        // Optional: set blocksizes and algorithmic choices here. See the \n        //           'Tuning' section of the README for details.\n        //\n        DistMatrix<R,VR,STAR> s( g );\n        DistMatrix<C> U( g ), V( g );\n        HermitianSVD( LOWER, H, s, U, V ); // only use lower half of H\n        if( print )\n        {\n            Print( s, \"Singular values of H\" );\n            Print( U, \"Left singular vectors of H\" );\n            Print( V, \"Right singular vectors of H\" );\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/ID.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMM_INC\n#include ELEM_ID_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_PERMUTECOLS_INC\n#include ELEM_UNIFORM_INC\n#include ELEM_ZEROS_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",20);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int r = Input(\"--rank\",\"rank of matrix\",5);\n        const Int maxSteps = Input(\"--maxSteps\",\"max # of steps of QR\",10);\n        const double tol = Input(\"--tol\",\"tolerance for ID\",-1.);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const Grid& g = DefaultGrid();\n        DistMatrix<C> U(g), V(g), A(g);\n        Uniform( U, m, r );\n        Uniform( V, n, r );\n        Gemm( NORMAL, ADJOINT, C(1), U, V, A );\n        const Real frobA = FrobeniusNorm( A );\n        if( print )\n            Print( A, \"A\" );\n\n        DistMatrix<Int,VR,STAR> perm(g);\n        DistMatrix<C,STAR,VR> Z(g);\n        ID( A, perm, Z, maxSteps, tol );\n        const Int rank = Z.Height();\n        if( print )\n        {\n            Print( perm, \"perm\" );\n            Print( Z, \"Z\" );\n        }\n\n        // Pivot A and form the matrix of its (hopefully) dominant columns\n        InversePermuteCols( A, perm );\n        auto hatA( A );\n        hatA.Resize( m, rank );\n        if( print )\n        {\n            Print( A, \"A P\" );\n            Print( hatA, \"\\\\hat{A}\" );\n        }\n\n        // Check || A P - \\hat{A} [I, Z] ||_F / || A ||_F\n        DistMatrix<C> AL(g), AR(g);\n        PartitionRight( A, AL, AR, rank );\n        MakeZeros( AL );\n        {\n            DistMatrix<C,MC,STAR> hatA_MC_STAR(g);\n            DistMatrix<C,STAR,MR> Z_STAR_MR(g);\n            hatA_MC_STAR.AlignWith( AR );\n            Z_STAR_MR.AlignWith( AR );\n            hatA_MC_STAR = hatA;\n            Z_STAR_MR = Z;\n            LocalGemm\n            ( NORMAL, NORMAL, C(-1), hatA_MC_STAR, Z_STAR_MR, C(1), AR );\n        }\n        const Real frobError = FrobeniusNorm( A );\n        if( print )\n            Print( A, \"A P - \\\\hat{A} [I, Z]\" );\n\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"|| A ||_F = \" << frobA << \"\\n\\n\"\n                      << \"|| A P - \\\\hat{A} [I, Z] ||_F / || A ||_F = \" \n                      << frobError/frobA << \"\\n\" << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/KyFanAndSchatten.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_ENTRYWISENORM_INC\n#include ELEM_KYFANNORM_INC\n#include ELEM_SCHATTENNORM_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int k = Input(\"--k\",\"index of KyFan norm\",10);\n        const double p = Input(\"--p\",\"power of Schatten norm\",2);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        SetBlocksize( nb );\n\n        DistMatrix<C> A;\n        Uniform( A, m, n );\n        if( print )\n            Print( A, \"A\" );\n\n        const double kyFanNorm = KyFanNorm( A, k );\n        const double schattenNorm = SchattenNorm( A, p );\n        const double entrywiseNorm = EntrywiseNorm( A, p );\n        if( mpi::WorldRank() == 0 )\n            cout << \"|| A ||_K(p)   = \" << kyFanNorm << \"\\n\"\n                 << \"|| A ||_S(p)   = \" << schattenNorm << \"\\n\"\n                 << \"|| vec(A) ||_p = \" << entrywiseNorm << std::endl;\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/LDL.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_AXPY_INC\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_MAKESYMMETRIC_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n#include ELEM_LDL_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_WIGNER_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix to factor\",100);\n        const double realMean = Input(\"--realMean\",\"real mean\",0.); \n        const double imagMean = Input(\"--imagMean\",\"imag mean\",0.);\n        const double stddev = Input(\"--stddev\",\"standard dev.\",1.);\n        const bool conjugate = Input(\"--conjugate\",\"LDL^H?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n        C mean( realMean, imagMean );\n        DistMatrix<C> A;\n        if( conjugate )\n        {\n            Wigner( A, n, mean, stddev );\n        }\n        else\n        {\n            Gaussian( A, n, n, mean, stddev );\n            MakeSymmetric( LOWER, A );\n        }\n\n        // Make a copy of A and then overwrite it with its LDL factorization\n        // WARNING: There is no pivoting here!\n        DistMatrix<C> factA( A );\n        if( conjugate )\n            LDLH( factA );\n        else\n            LDLT( factA );\n        auto d = factA.GetDiagonal();\n\n        DistMatrix<C> L( factA );\n        MakeTriangular( LOWER, L );\n        SetDiagonal( L, C(1) );\n\n        DistMatrix<C> LD( L );\n        DiagonalScale( RIGHT, NORMAL, d, LD );\n        Gemm( NORMAL, orientation, C(-1), LD, L, C(1), A );\n        const Real frobNormOfError = FrobeniusNorm( A );\n        if( mpi::WorldRank() == 0 )\n            std::cout << \"|| A - L D L^[T/H] ||_F = \" << frobNormOfError << \"\\n\"\n                      << std::endl;\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/LDLInverse.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKESYMMETRIC_INC\n#include ELEM_HEMM_INC\n#include ELEM_SYMM_INC\n#include ELEM_TRDTRMM_INC\n#include ELEM_INVERSE_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_TRIANGULARINVERSE_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\n#include ELEM_WIGNER_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix to factor\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const double realMean = Input(\"--realMean\",\"real mean\",0.);\n        const double imagMean = Input(\"--imagMean\",\"imag mean\",0.);\n        const double stddev = Input(\"--stddev\",\"standard dev.\",1.);\n        const bool conjugate = Input(\"--conjugate\",\"LDL^H?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        SetBlocksize( nb );\n\n        C mean( realMean, imagMean );\n        DistMatrix<C> A;\n        if( conjugate )\n        {\n            Wigner( A, n, mean, stddev );\n            //HermitianUniformSpectrum( A, n, 1, 2 );\n        }\n        else\n        {\n            Gaussian( A, n, n, mean, stddev );\n            MakeSymmetric( LOWER, A );\n        }\n\n        // Make a copy of A and then overwrite it with its inverse\n        DistMatrix<C> invA( A );\n        SymmetricInverse( LOWER, invA, conjugate );\n\n        // Form I - invA*A and print the relevant norms\n        DistMatrix<C> E;\n        Identity( E, n, n );\n        Symm( LEFT, LOWER, C(-1), invA, A, C(1), E, conjugate );\n\n        const Real frobNormA = FrobeniusNorm( A );\n        const Real frobNormInvA = SymmetricFrobeniusNorm( LOWER, invA );\n        const Real frobNormError = FrobeniusNorm( E );\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"|| A          ||_F = \" << frobNormA << \"\\n\"\n                      << \"|| invA       ||_F = \" << frobNormInvA << \"\\n\"\n                      << \"|| I - invA A ||_F = \" << frobNormError << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/LSE.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_LSE_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> F;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try \n    {\n        const Int m = Input(\"--m\",\"height of A\",100);\n        const Int n = Input(\"--n\",\"width of A\",100);\n        const Int p = Input(\"--p\",\"number of constraints\",20);\n        const Int numRhs = Input(\"--numRhs\",\"# of right-hand sides\",5);\n        const Int blocksize = Input(\"--blocksize\",\"algorithmic blocksize\",64);\n        const bool resid = Input(\"--resid\",\"compute residual?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        Int gridHeight = Input(\"--gridHeight\",\"grid height\",0);\n        ProcessInput();\n        PrintInputReport();\n\n        // Set the algorithmic blocksize\n        SetBlocksize( blocksize );\n\n        // If the grid height wasn't specified, then we should attempt to build\n        // a nearly-square process grid\n        if( gridHeight == 0 )\n            gridHeight = Grid::FindFactor( commSize );\n        Grid g( comm, gridHeight );\n\n        DistMatrix<F> A(g), B(g), C(g), D(g), X(g);\n        Uniform( A, m, n );\n        Uniform( B, p, n );\n        Uniform( C, m, numRhs );\n        Uniform( D, p, numRhs );\n        auto BCopy( B );\n        auto DCopy( D );\n\n        const Real AFrob = FrobeniusNorm( A );\n        const Real BFrob = FrobeniusNorm( B );\n        const Real CFrob = FrobeniusNorm( C );\n        const Real DFrob = FrobeniusNorm( D );\n        if( print )\n        {\n            Print( A, \"A\" );\n            Print( B, \"B\" );\n            Print( C, \"C\" );\n            Print( D, \"D\" );\n        }\n\n        LSE( A, B, C, D, X, resid );\n\n        if( print ) \n        { \n            Print( X, \"X\" );\n            if( resid )\n                Print( C, \"rotated residuals\" );\n        }\n        \n        Gemm( NORMAL, NORMAL, F(-1), BCopy, X, F(1), DCopy );\n        const Real EFrob = FrobeniusNorm( DCopy );\n        if( print )\n            Print( DCopy, \"D - B X\" );\n        if( commRank == 0 )\n            std::cout << \"|| A       ||_F = \" << AFrob << \"\\n\"\n                      << \"|| B       ||_F = \" << BFrob << \"\\n\"\n                      << \"|| C       ||_F = \" << CFrob << \"\\n\"\n                      << \"|| D       ||_F = \" << DFrob << \"\\n\"\n                      << \"|| B X - D ||_F = \" << EFrob << \"\\n\"\n                      << std::endl;\n        if( resid )\n        {\n            const Real residFrob = FrobeniusNorm( C );\n            if( commRank == 0 )\n                std::cout << \"|| A X - C ||_F = \" << residFrob << std::endl;\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/LeastSquares.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_LEASTSQUARES_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try \n    {\n        const char trans = Input(\"--trans\",\"orientation\",'N');\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int numRhs = Input(\"--numRhs\",\"# of right-hand sides\",1);\n        const Int blocksize = Input(\"--blocksize\",\"algorithmic blocksize\",64);\n        Int gridHeight = Input(\"--gridHeight\",\"grid height\",0);\n        ProcessInput();\n        PrintInputReport();\n\n        const Orientation orientation = CharToOrientation( trans );\n\n        // Set the algorithmic blocksize\n        SetBlocksize( blocksize );\n\n        // If the grid height wasn't specified, then we should attempt to build\n        // a nearly-square process grid\n        if( gridHeight == 0 )\n            gridHeight = Grid::FindFactor( commSize );\n        Grid grid( comm, gridHeight );\n\n        // Set up random A and B, then make the copies X := B and ACopy := A\n        typedef Complex<double> F;\n        DistMatrix<F> A(grid), B(grid), ACopy(grid), X(grid), Z(grid);\n        for( Int test=0; test<3; ++test )\n        {\n            const Int k = ( orientation==NORMAL ? m : n );\n            const Int N = ( orientation==NORMAL ? n : m );\n            Uniform( A, m, n );\n            Zeros( B, k, numRhs );\n            ACopy = A;\n\n            // Form B in the range of op(A)\n            Uniform( Z, N, numRhs );\n            Gemm( orientation, NORMAL, F(1), A, Z, F(0), B );\n\n            // Perform the QR/LQ factorization and solve\n            if( commRank == 0 )\n            {\n                std::cout << \"Starting LeastSquares...\";\n                std::cout.flush();\n            }\n            mpi::Barrier( comm );\n            double startTime = mpi::Time();\n            LeastSquares( orientation, A, B, X );\n            mpi::Barrier( comm );\n            double stopTime = mpi::Time();\n            if( commRank == 0 )\n                std::cout << stopTime-startTime << \" seconds.\" << std::endl;\n\n            // Form R := op(A) X - B\n            DistMatrix<F> R( B );\n            Gemm( orientation, NORMAL, F(1), ACopy, X, F(-1), R );\n\n            // Compute the relevant Frobenius norms and a relative residual\n            const double epsilon = lapack::MachineEpsilon<double>();\n            const double AFrobNorm = FrobeniusNorm( ACopy );\n            const double BFrobNorm = FrobeniusNorm( B );\n            const double XFrobNorm = FrobeniusNorm( X );\n            const double RFrobNorm = FrobeniusNorm( R );\n            const double frobResidual = \n                RFrobNorm / (AFrobNorm*XFrobNorm*epsilon*n);\n            if( commRank == 0 )\n                std::cout << \"||A||_F       = \" << AFrobNorm << \"\\n\"\n                          << \"||B||_F       = \" << BFrobNorm << \"\\n\"\n                          << \"||X||_F       = \" << XFrobNorm << \"\\n\"\n                          << \"||A X - B||_F = \" << RFrobNorm << \"\\n\"\n                          << \"||op(A)X-B||_F / (||A||_F ||X||_F epsilon n) = \" \n                          << frobResidual << \"\\n\" << std::endl;\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/Polar.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_POLAR_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"matrix height\",100);\n        const Int n = Input(\"--width\",\"matrix width\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        Grid g( mpi::COMM_WORLD );\n        DistMatrix<Complex<double>> A( g ), Q( g ), P( g );\n        Uniform( A, m, n );\n\n        // Compute the polar decomp of A (but do not overwrite A)\n        Q = A;\n        Polar( Q, P );\n\n        if( print )\n        {\n            Print( A, \"A\" );\n            Print( Q, \"Q\" );\n            Print( P, \"P\" );\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/Pseudoinverse.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_PSEUDOINVERSE_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> A;\n        Uniform( A, m, n );\n\n        // Compute the pseudoinverseof A (but do not overwrite A)\n        DistMatrix<C> pinvA( A );\n        Pseudoinverse( pinvA );\n        if( print )\n        {\n            Print( A, \"A\" );\n            Print( pinvA, \"pinv(A)\" );\n        }\n\n        const Real frobOfA = FrobeniusNorm( A );\n        const Real frobOfPinvA = FrobeniusNorm( pinvA );\n\n        if( mpi::WorldRank() == 0 )\n        {\n            cout << \"||   A   ||_F =  \" << frobOfA << \"\\n\"\n                 << \"||pinv(A)||_F =  \" << frobOfPinvA << \"\\n\"\n                 << endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/Pseudospectrum.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_ENTRYWISEMAP_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_PSEUDOSPECTRUM_INC\n\n#include ELEM_BULLSHEAD_INC\n#include ELEM_GRCAR_INC\n#include ELEM_HATANONELSON_INC\n#include ELEM_FOXLI_INC\n#include ELEM_HELMHOLTZPML_INC\n#include ELEM_LOTKIN_INC\n#include ELEM_TREFETHEN_INC\n#include ELEM_TRIANGLE_INC\n#include ELEM_UNIFORM_INC\n#include ELEM_UNIFORMHELMHOLTZGREENS_INC\n#include ELEM_WHALE_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        Int r = Input(\"--gridHeight\",\"process grid height\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int matType =\n            Input(\"--matType\",\"0:uniform,1:Haar,2:Lotkin,3:Grcar,4:FoxLi,\"\n                              \"5:HelmholtzPML1D,6:HelmholtzPML2D,7:Trefethen,\"\n                              \"8:Bull's head,9:Triangle,10:Whale,\"\n                              \"11:UniformHelmholtzGreen's,12:HatanoNelson\",4);\n        const Int n = Input(\"--size\",\"height of matrix\",100);\n        const Int nbAlg = Input(\"--nbAlg\",\"algorithmic blocksize\",96);\n#ifdef ELEM_HAVE_SCALAPACK\n        // QR algorithm options\n        const Int nbDist = Input(\"--nbDist\",\"distribution blocksize\",32);\n#else\n        // Spectral Divide and Conquer options\n        const Int cutoff = Input(\"--cutoff\",\"problem size for QR\",256);\n        const Int maxInnerIts = Input(\"--maxInnerIts\",\"SDC limit\",2);\n        const Int maxOuterIts = Input(\"--maxOuterIts\",\"SDC limit\",10);\n        const bool random = Input(\"--random\",\"Random RRQR in SDC\",true);\n        const Real sdcTol = Input(\"--sdcTol\",\"Rel. tol. for SDC\",1e-6);\n        const Real spreadFactor = Input(\"--spreadFactor\",\"median pert.\",1e-6);\n        const Real signTol = Input(\"--signTol\",\"Sign tolerance for SDC\",1e-9);\n#endif\n        const Real realCenter = Input(\"--realCenter\",\"real center\",0.);\n        const Real imagCenter = Input(\"--imagCenter\",\"imag center\",0.);\n        const Real realWidth = Input(\"--realWidth\",\"x width of image\",0.);\n        const Real imagWidth = Input(\"--imagWidth\",\"y width of image\",0.);\n        const Int realSize = Input(\"--realSize\",\"number of x samples\",100);\n        const Int imagSize = Input(\"--imagSize\",\"number of y samples\",100);\n        const bool schur = Input(\"--schur\",\"Schur decomposition?\",true);\n        const bool forceComplexSchur = \n            Input(\"--forceComplexSchur\",\n                  \"switch to complex arithmetic for QR alg.\",false);\n        const bool forceComplexPs = \n            Input(\"--forceComplexPs\",\n                  \"switch to complex arithmetic for PS iter's\",true);\n        const bool arnoldi = Input(\"--arnoldi\",\"use Arnoldi?\",true);\n        const Int basisSize = Input(\"--basisSize\",\"num Arnoldi vectors\",10);\n        const Int maxIts = Input(\"--maxIts\",\"maximum pseudospec iter's\",200);\n        const Real psTol = Input(\"--psTol\",\"tolerance for pseudospectra\",1e-6);\n        // Uniform options\n        const Real uniformRealCenter = \n            Input(\"--uniformRealCenter\",\"real center of uniform dist\",0.);\n        const Real uniformImagCenter =\n            Input(\"--uniformImagCenter\",\"imag center of uniform dist\",0.);\n        const Real uniformRadius = \n            Input(\"--uniformRadius\",\"radius of uniform dist\",1.);\n        // Grcar options\n        const Int numBands = Input(\"--numBands\",\"num bands for Grcar\",3);\n        // Fox-Li options\n        const Real omega = Input(\"--omega\",\"frequency for Fox-Li/Helm\",16*M_PI);\n        // Helmholtz-PML options [also uses Fox-Li omega]\n        const Int mx = Input(\"--mx\",\"number of x points for HelmholtzPML\",30);\n        const Int my = Input(\"--my\",\"number of y points for HelmholtzPML\",30);\n        const Int numPmlPoints = Input(\"--numPml\",\"num PML points for Helm\",5);\n        const double sigma = Input(\"--sigma\",\"PML amplitude\",1.5);\n        const double pmlExp = Input(\"--pmlExp\",\"PML takeoff exponent\",3.);\n        // Uniform Helmholtz Green's options\n        const double lambda = Input(\"--lambda\",\"wavelength of U.H.Green's\",0.1);\n        // Hatano-Nelson options [also uses uniform real center]\n        const double gHatano = Input(\"--gHatano\",\"g in Hatano-Nelson\",0.5);\n        const bool periodic = Input(\"--periodic\",\"periodic HatanoNelson?\",true);\n        // Input/Output options\n        const bool progress = Input(\"--progress\",\"print progress?\",true);\n        const bool deflate = Input(\"--deflate\",\"deflate?\",true);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        const bool write = Input(\"--write\",\"write matrices?\",false);\n        const Int numSaveFreq = \n            Input(\"--numSaveFreq\",\"numerical save frequency\",-1);\n        const Int imgSaveFreq = \n            Input(\"--imgSaveFreq\",\"image save frequency\",-1);\n        const Int imgDispFreq =\n            Input(\"--imgDispFreq\",\"image display frequency\",-1);\n        const std::string numBase =\n            Input(\"--numBase\",\"numerical save basename\",std::string(\"num\"));\n        const std::string imgBase =\n            Input(\"--imgBase\",\"image save basename\",std::string(\"img\"));\n        const Int numFormatInt = Input(\"--numFormat\",\"numerical format\",2);\n        const Int imgFormatInt = Input(\"--imgFormat\",\"image format\",8);\n        const Int colorMapInt = Input(\"--colorMap\",\"color map\",0);\n        const bool itCounts = Input(\"--itCounts\",\"display iter. counts?\",true);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( mpi::Size(mpi::COMM_WORLD) );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( mpi::COMM_WORLD, r, order );\n        SetBlocksize( nbAlg );\n#ifdef ELEM_HAVE_SCALAPACK\n        SetDefaultBlockHeight( nbDist );\n        SetDefaultBlockWidth( nbDist );\n#endif\n        if( numFormatInt < 1 || numFormatInt >= FileFormat_MAX )\n            LogicError(\"Invalid numerical format integer, should be in [1,\",\n                       FileFormat_MAX,\")\");\n        if( imgFormatInt < 1 || imgFormatInt >= FileFormat_MAX )\n            LogicError(\"Invalid image format integer, should be in [1,\",\n                       FileFormat_MAX,\")\");\n\n        const FileFormat numFormat = static_cast<FileFormat>(numFormatInt);\n        const FileFormat imgFormat = static_cast<FileFormat>(imgFormatInt);\n        const ColorMap colorMap = static_cast<ColorMap>(colorMapInt);\n        SetColorMap( colorMap );\n        const C center(realCenter,imagCenter);\n        const C uniformCenter(uniformRealCenter,uniformImagCenter);\n\n        bool isReal = true;\n        std::string matName;\n        DistMatrix<Real> AReal(g);\n        DistMatrix<C> ACpx(g);\n        switch( matType )\n        {\n        case 0: matName=\"uniform\";\n                Uniform( ACpx, n, n, uniformCenter, uniformRadius );\n                isReal = false;\n                break;\n        case 1: matName=\"Haar\";\n                Haar( ACpx, n );\n                isReal = false;\n                break;\n        case 2: matName=\"Lotkin\";\n                Lotkin( AReal, n );\n                isReal = true;\n                break;\n        case 3: matName=\"Grcar\";\n                Grcar( AReal, n, numBands );\n                isReal = true;\n                break;\n        case 4: matName=\"FoxLi\";\n                FoxLi( ACpx, n, omega );\n                isReal = false;\n                break;\n        case 5: matName=\"HelmholtzPML\";\n                HelmholtzPML\n                ( ACpx, n, C(omega), numPmlPoints, sigma, pmlExp );\n                isReal = false;\n                break;\n        case 6: matName=\"HelmholtzPML2D\";\n                HelmholtzPML\n                ( ACpx, mx, my, C(omega), numPmlPoints, sigma, pmlExp );\n                isReal = false;\n                break;\n        case 7: matName=\"Trefethen\";\n                Trefethen( ACpx, n );\n                isReal = false;\n                break;\n        case 8: matName=\"BullsHead\";\n                BullsHead( ACpx, n );\n                isReal = false;\n                break;\n        case 9: matName=\"Triangle\";\n                Triangle( AReal, n );\n                isReal = true;\n                break;\n        case 10: matName=\"Whale\";\n                 Whale( ACpx, n );\n                 isReal = false;\n                 break;\n        case 11: matName=\"UniformHelmholtzGreens\";\n                 UniformHelmholtzGreens( ACpx, n, lambda );\n                 isReal = false;\n                 break;\n        case 12: matName=\"HatanoNelson\";\n                 HatanoNelson\n                 ( AReal, n, realCenter, uniformRadius, gHatano, periodic );\n                 isReal = true;\n                 break;\n        default: LogicError(\"Invalid matrix type\");\n        }\n        if( display )\n        {\n            if( isReal )\n                Display( AReal, \"A\" );\n            else\n                Display( ACpx, \"A\" );\n        }\n        if( write )\n        {\n            if( isReal )\n            {\n                Write( AReal, \"A\", numFormat );\n                Write( AReal, \"A\", imgFormat );\n            }\n            else\n            {\n                Write( ACpx, \"A\", numFormat );\n                Write( ACpx, \"A\", imgFormat );\n            }\n        }\n\n        PseudospecCtrl<Real> psCtrl;\n        psCtrl.schur = schur;\n        psCtrl.forceComplexSchur = forceComplexSchur;\n        psCtrl.forceComplexPs = forceComplexPs;\n        psCtrl.maxIts = maxIts;\n        psCtrl.tol = psTol;\n        psCtrl.deflate = deflate;\n        psCtrl.arnoldi = arnoldi;\n        psCtrl.basisSize = basisSize;\n        psCtrl.progress = progress;\n#ifndef ELEM_HAVE_SCALAPACK\n        psCtrl.sdcCtrl.cutoff = cutoff;\n        psCtrl.sdcCtrl.maxInnerIts = maxInnerIts;\n        psCtrl.sdcCtrl.maxOuterIts = maxOuterIts;\n        psCtrl.sdcCtrl.tol = sdcTol;\n        psCtrl.sdcCtrl.spreadFactor = spreadFactor;\n        psCtrl.sdcCtrl.random = random;\n        psCtrl.sdcCtrl.progress = progress;\n        psCtrl.sdcCtrl.signCtrl.tol = signTol;\n        psCtrl.sdcCtrl.signCtrl.progress = progress;\n#endif\n        psCtrl.snapCtrl.imgSaveFreq = imgSaveFreq;\n        psCtrl.snapCtrl.numSaveFreq = numSaveFreq;\n        psCtrl.snapCtrl.imgDispFreq = imgDispFreq;\n        psCtrl.snapCtrl.imgFormat = imgFormat;\n        psCtrl.snapCtrl.numFormat = numFormat;\n        psCtrl.snapCtrl.imgBase = matName+\"-\"+imgBase;\n        psCtrl.snapCtrl.numBase = matName+\"-\"+numBase;\n        psCtrl.snapCtrl.itCounts = itCounts;\n\n        // Visualize the pseudospectrum by evaluating ||inv(A-sigma I)||_2 \n        // for a grid of complex sigma's.\n        DistMatrix<Real> invNormMap(g);\n        DistMatrix<Int> itCountMap(g);\n        if( realWidth != 0. && imagWidth != 0. )\n        {\n            if( isReal )\n                itCountMap = Pseudospectrum\n                ( AReal, invNormMap, center, realWidth, imagWidth, \n                  realSize, imagSize, psCtrl );\n            else\n                itCountMap = Pseudospectrum\n                ( ACpx, invNormMap, center, realWidth, imagWidth, \n                  realSize, imagSize, psCtrl );\n        }\n        else\n        {\n            if( isReal )\n                itCountMap = Pseudospectrum\n                ( AReal, invNormMap, center, realSize, imagSize, psCtrl );\n            else\n                itCountMap = Pseudospectrum\n                ( ACpx, invNormMap, center, realSize, imagSize, psCtrl );\n        }\n        const Int numIts = MaxNorm( itCountMap );\n        if( mpi::WorldRank() == 0 )\n            std::cout << \"num iterations=\" << numIts << std::endl;\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/QDWH.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_POLAR_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const bool colPiv = Input(\"--colPiv\",\"QR with col pivoting?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> A, Q, P;\n        Uniform( A, m, n );\n        const Real frobA = FrobeniusNorm( A );\n\n        // Compute the polar decomp of A using a QR-based Dynamically Weighted\n        // Halley (QDWH) iteration\n        Q = A;\n        const Int numItsQDWH = polar::QDWH( Q, colPiv );\n        Zeros( P, n, n );\n        Gemm( ADJOINT, NORMAL, C(1), Q, A, C(0), P );\n\n        // Check and report overall and orthogonality error\n        DistMatrix<C> B( A );\n        Gemm( NORMAL, NORMAL, C(-1), Q, P, C(1), B );\n        const Real frobQDWH = FrobeniusNorm( B );\n        Identity( B, n, n );\n        Herk( LOWER, ADJOINT, C(1), Q, C(-1), B );\n        const Real frobQDWHOrthog = HermitianFrobeniusNorm( LOWER, B );\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << numItsQDWH << \" iterations of QDWH\\n\"\n                      << \"||A - QP||_F / ||A||_F = \" \n                      << frobQDWH/frobA << \"\\n\"\n                      << \"||I - QQ^H||_F / ||A||_F = \" \n                      << frobQDWHOrthog/frobA << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/QR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_QR_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"blocksize\",96);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        SetBlocksize( nb );\n\n        DistMatrix<C> A;\n        Uniform( A, m, n );\n        if( print )\n            Print( A, \"A\" );\n        const Real frobA = FrobeniusNorm( A );\n\n        // Compute the QR decomposition of A, but do not overwrite A\n        DistMatrix<C> Q( A ), R;\n        qr::Explicit( Q, R );\n        if( print )\n        {\n            Print( Q, \"Q\" );\n            Print( R, \"R\" );\n        }\n\n        // Check the error in the QR factorization, || A - Q R ||_F / || A ||_F\n        DistMatrix<C> E( A );\n        Gemm( NORMAL, NORMAL, C(-1), Q, R, C(1), E );\n        const Real frobQR = FrobeniusNorm( E );\n\n        // Check the numerical orthogonality of Q, || I - Q^H Q ||_F / || A ||_F\n        const Int k = std::min(m,n);\n        Identity( E, k, k );\n        Herk( LOWER, ADJOINT, C(-1), Q, C(1), E );\n        const Real frobOrthog = HermitianFrobeniusNorm( LOWER, E ); \n\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"|| A ||_F = \" << frobA << \"\\n\"\n                      << \"|| A - Q R ||_F / || A ||_F   = \" \n                      << frobQR/frobA << \"\\n\"\n                      << \"|| I - Q^H Q ||_F / || A ||_F = \"\n                      << frobOrthog/frobA << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/README.md",
    "content": "### `examples/lapack-like`\n\nThis folder contains several examples of Elemental's LAPACK-like functionality:\n\n-  `BunchKaufman.cpp`: Accurate symmetric/Hermitian-indefinite factorization\n-  `BusingerGolub.cpp`: Column-pivoted QR decomposition\n-  `ComplexHermitianFunction.cpp`: Applies a complex function to the eigenvalues\n   of a Hermitian matrix\n-  `GaussianElimination.cpp`: Solves systems of equations via Gaussian elim.\n-  `HermitianEig.cpp`: Computes the eigen{values/pairs} of a Hermitian matrix\n-  `HermitianEigFromSequential.cpp`: Distributes a sequential Hermitian matrix, computes its EVD, and then gathers the result back to the original process\n-  `HermitianPseudoinverse.cpp`: Forms the pseudoinverse of a Hermitian matrix\n-  `HermitianQDWH.cpp`: A variant of the QDWH algorithm for the polar \n   decomposition which is specialized for Hermitian matrices\n-  `HermitianSDC.cpp`: Spectral Divide and Conquer eigensolver for Hermitian \n   matrices\n-  `HermitianSVD.cpp`: Singular Value Decomposition of a Hermitian matrix\n-  `HPDInverse.cpp`: Inverts a Hermitian Positive-Definite matrix\n-  `HPSDCholesky.cpp`: Computes the (non-unique) Cholesky decomposition of a \n   Hermitian Positive-SemiDefinite matrix via its eigenvalue decomposition\n-  `HPSDSquareRoot.cpp`: Computes the square-root of a Hermitian \n   Positive-SemiDefinite matrix via its eigenvalue decomposition\n-  `ID.cpp`: Computes an Interpolate Decomposition \n   (closely related to pivoted QR)\n-  `KyFanAndSchatten.cpp`: Compute Ky Fan and Schatten norms\n-  `LDL.cpp`: Unpivoted LDL^T/LDL^H factorization\n-  `LDLInverse.cpp`: Invert a symmetric/Hermitian matrix via a pivoted \n   symmetric factorization (e.g., Bunch-Kaufman)\n-  `LeastSquares.cpp`: Solve a least-squares problem via a QR decomposition\n-  `Polar.cpp`: Compute a polar decomposition (unitary times HPD)\n-  `Pseudoinverse.cpp`: Compute the pseudoinverse of an arbitrary matrix\n-  `QDWH.cpp`: Compute the polar factor of an arbitrary matrix via the QDWH \n   algorithm\n-  `QR.cpp`: Compute a QR decomposition\n-  `RealHermitianFunction.cpp`: Apply a real function to the eigenvalues of a\n   Hermitian matrix\n-  `RealSchur.cpp`: Compute the Schur decomposition of a real matrix\n-  `RealSymmetricFunction.cpp`: Apply a real function to the eigenvalues of a \n   (real) symmetric matrix\n-  `Schur.cpp`: Compute the Schur decomposition of a matrix\n-  `SequentialBunchKaufman.cpp`: Test the sequential algorithm for Bunch-Kaufman\n-  `SequentialQR.cpp`: Test the sequential algorithm for QR decomposition\n-  `SequentialSVD.cpp`: Test the sequential algorithm for SVD\n-  `Sign.cpp`: Test the matrix sign function (maps eigenvalues to {-1,+1})\n-  `SimpleSVD.cpp`: An extremely simple SVD driver\n-  `Skeleton.cpp`: Compute a matrix skeleton\n-  `SkewHermitianEig.cpp`: Compute the EVD of a skew-Hermitian matrix\n-  `SVD.cpp`: Compute the SVD of an arbitrary matrix\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/RealHermitianFunction.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_HERMITIANFUNCTION_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of Hermitian matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> H( n, n );\n\n        // We will fill entry (i,j) with the complex value (i+j,i-j) so that \n        // the global matrix is Hermitian. However, only one triangle of the \n        // matrix actually needs to be filled, the symmetry can be implicit.\n        const Int localHeight = H.LocalHeight();\n        const Int localWidth = H.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            // Our process owns the rows colShift:colStride:n,\n            //           and the columns rowShift:rowStride:n\n            const Int j = H.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = H.GlobalRow(iLoc);\n                H.SetLocal( iLoc, jLoc, C(i+j,i-j) );\n            }\n        }\n        if( print )\n            Print( H, \"H\" );\n\n        // Reform H with the exponentials of the original eigenvalues\n        RealHermitianFunction\n        ( LOWER, H, []( Real alpha ) { return Exp(alpha); } );\n        if( print )\n        {\n            MakeHermitian( LOWER, H );\n            Print( H, \"exp(H)\" );\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/RealSchur.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_SCHUR_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int matType = Input(\"--matType\",\"0: uniform, 1: Haar\",0);\n        const Int n = Input(\"--size\",\"height of matrix\",100);\n#ifdef ELEM_HAVE_SCALAPACK\n        // QR algorithm options\n        const bool fullTriangle = Input(\"--fullTriangle\",\"full Schur?\",true);\n        const bool aed = Input(\"--aed\",\"use Agg. Early Deflat.?\",false);\n#else\n        // Spectral Divide and Conquer options\n        const Int cutoff = Input(\"--cutoff\",\"cutoff for QR alg.\",256);\n        const Int maxInnerIts = Input(\"--maxInnerIts\",\"maximum RURV its\",2);\n        const Int maxOuterIts = Input(\"--maxOuterIts\",\"maximum it's/split\",10);\n        const Real signTol = Input(\"--signTol\",\"sign tolerance\",Real(0));\n        const Real sdcTol = Input(\"--sdcTol\",\"SDC split tolerance\",Real(0));\n        const Real spreadFactor = Input(\"--spreadFactor\",\"median pert.\",1e-6);\n        const bool random = Input(\"--random\",\"random RRQR?\",true);\n        const bool progress = Input(\"--progress\",\"output progress?\",false);\n#endif\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<Real> A;\n        if( matType == 0 )\n            Uniform( A, n, n );\n        else\n            Haar( A, n );\n        const Real frobA = FrobeniusNorm( A );\n\n        // Compute the Schur decomposition of A, but do not overwrite A\n        DistMatrix<Real> T( A ), Q;\n        DistMatrix<Complex<Real>,VR,STAR> w;\n#ifdef ELEM_HAVE_SCALAPACK\n        schur::QR( T, w, Q, fullTriangle, aed );\n#else\n        SdcCtrl<Real> sdcCtrl;\n        sdcCtrl.cutoff = cutoff;\n        sdcCtrl.maxInnerIts = maxInnerIts;\n        sdcCtrl.maxOuterIts = maxOuterIts;\n        sdcCtrl.tol = sdcTol;\n        sdcCtrl.spreadFactor = spreadFactor;\n        sdcCtrl.random = random;\n        sdcCtrl.progress = progress;\n        sdcCtrl.signCtrl.tol = signTol;\n        sdcCtrl.signCtrl.progress = progress;\n        schur::SDC( T, w, Q, true, sdcCtrl );\n#endif\n        MakeTrapezoidal( UPPER, T, -1 );\n        if( display )\n        {\n            Display( A, \"A\" );\n            Display( T, \"T\" );\n            Display( Q, \"Q\" );\n            Display( w, \"w\" );\n        }\n\n        DistMatrix<Real> G;\n        Gemm( NORMAL, NORMAL, Real(1), Q, T, G );\n        Gemm( NORMAL, ADJOINT, Real(-1), G, Q, Real(1), A );\n        const Real frobE = FrobeniusNorm( A );\n        MakeIdentity( A );\n        Herk( LOWER, ADJOINT, Real(-1), Q, Real(1), A );\n        const Real frobOrthog = HermitianFrobeniusNorm( LOWER, A );\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \" || A - Q T Q^H ||_F / || A ||_F = \" << frobE/frobA\n                      << \"\\n\"\n                      << \" || I - Q^H Q ||_F   / || A ||_F = \"\n                      << frobOrthog/frobA << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/RealSymmetricFunction.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_HERMITIANFUNCTION_INC\nusing namespace std;\nusing namespace elem;\n\n// Create a typedef for convenience\ntypedef double Real;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<Real> H( n, n );\n\n        // We will fill entry (i,j) with the value i+j so that\n        // the global matrix is symmetric. However, only one triangle of the \n        // matrix actually needs to be filled, the symmetry can be implicit.\n        const Int localHeight = H.LocalHeight();\n        const Int localWidth = H.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            // Our process owns the rows colShift:colStride:n,\n            //           and the columns rowShift:rowStride:n\n            const Int j = H.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = H.GlobalRow(iLoc);\n                H.SetLocal( iLoc, jLoc, Real(i+j) );\n            }\n        }\n        if( print )\n            Print( H, \"H\" );\n\n        // Reform the matrix with the exponentials of the original eigenvalues\n        RealHermitianFunction\n        ( LOWER, H, []( Real alpha ) { return Exp(alpha); } );\n        if( print )\n        {\n            MakeHermitian( LOWER, H );\n            Print( H, \"exp(H)\" );\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/SVD.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_MAXNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_SVD_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        SetBlocksize( nb );\n\n        Grid g( mpi::COMM_WORLD );\n        if( mpi::WorldRank() == 0 )\n            std::cout << \"Grid is \" \n                      << g.Height() << \" x \" << g.Width() << std::endl;\n        DistMatrix<C> A(g);\n        Uniform( A, m, n );\n        if( print )\n            Print( A, \"A\" );\n\n        // Compute just the singular values \n        DistMatrix<Real,VR,STAR> sOnly(g);\n        auto U( A );\n        SVD( U, sOnly );\n\n        // Compute the SVD of A \n        DistMatrix<C> V(g);\n        DistMatrix<Real,VR,STAR> s(g);\n        U = A;\n        SVD( U, s, V );\n        if( print )\n        {\n            Print( U, \"U\" );\n            Print( V, \"V\" );\n            Print( s, \"s\" );\n        }\n\n        // Compare the singular values from both methods\n        Axpy( Real(-1), s, sOnly );\n        const Real singValDiff = FrobeniusNorm( sOnly );\n        const Real twoNormOfA = MaxNorm( s );\n        const Real maxNormOfA = MaxNorm( A );\n        const Real oneNormOfA = OneNorm( A );\n        const Real infNormOfA = InfinityNorm( A );\n        const Real frobNormOfA = FrobeniusNorm( A );\n\n        DiagonalScale( RIGHT, NORMAL, s, U );\n        Gemm( NORMAL, ADJOINT, C(-1), U, V, C(1), A );\n        const Real maxNormOfE = MaxNorm( A );\n        const Real oneNormOfE = OneNorm( A );\n        const Real infNormOfE = InfinityNorm( A );\n        const Real frobNormOfE = FrobeniusNorm( A );\n        const Real epsilon = lapack::MachineEpsilon<Real>();\n        const Real scaledResidual = frobNormOfE / (max(m,n)*epsilon*twoNormOfA);\n\n        if( mpi::WorldRank() == 0 )\n        {\n            cout << \"||A||_max   = \" << maxNormOfA << \"\\n\"\n                 << \"||A||_1     = \" << oneNormOfA << \"\\n\"\n                 << \"||A||_oo    = \" << infNormOfA << \"\\n\"\n                 << \"||A||_F     = \" << frobNormOfA << \"\\n\"\n                 << \"||A||_2     = \" << twoNormOfA << \"\\n\"\n                 << \"\\n\"\n                 << \"||A - U Sigma V^H||_max = \" << maxNormOfE << \"\\n\"\n                 << \"||A - U Sigma V^H||_1   = \" << oneNormOfE << \"\\n\"\n                 << \"||A - U Sigma V^H||_oo  = \" << infNormOfE << \"\\n\"\n                 << \"||A - U Sigma V^H||_F   = \" << frobNormOfE << \"\\n\"\n                 << \"||A - U Sigma V_H||_F / (max(m,n) eps ||A||_2) = \" \n                 << scaledResidual << \"\\n\" \n                 << \"\\n\"\n                 << \"|| sError ||_2 = \" << singValDiff << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/Schur.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_SCHUR_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int matType = Input(\"--matType\",\"0: uniform, 1: Haar\",0);\n        const Int n = Input(\"--size\",\"height of matrix\",100);\n        const bool fullTriangle = Input(\"--fullTriangle\",\"full Schur?\",true);\n#ifdef ELEM_HAVE_SCALAPACK\n        // QR algorithm options (none so far)\n#else\n        // Spectral Divide and Conquer options\n        const Int cutoff = Input(\"--cutoff\",\"cutoff for QR alg.\",256);\n        const Int maxInnerIts = Input(\"--maxInnerIts\",\"maximum RURV its\",2);\n        const Int maxOuterIts = Input(\"--maxOuterIts\",\"maximum it's/split\",10);\n        const Real signTol = Input(\"--signTol\",\"sign tolerance\",Real(0));\n        const Real sdcTol = Input(\"--sdcTol\",\"SDC split tolerance\",Real(0));\n        const Real spreadFactor = Input(\"--spreadFactor\",\"median pert.\",1e-6);\n        const bool random = Input(\"--random\",\"random RRQR?\",true);\n        const bool progress = Input(\"--progress\",\"output progress?\",false);\n#endif\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const Grid& g = DefaultGrid();\n        DistMatrix<C> A(g);\n        if( matType == 0 )\n            Uniform( A, n, n );\n        else\n            Haar( A, n );\n        const Real frobA = FrobeniusNorm( A );\n\n        // Compute the Schur decomposition of A, but do not overwrite A\n        DistMatrix<C> T( A ), Q(g);\n        DistMatrix<C,VR,STAR> w(g);\n#ifdef ELEM_HAVE_SCALAPACK\n        schur::QR( T, w, Q, fullTriangle );\n#else\n        SdcCtrl<Real> sdcCtrl;\n        sdcCtrl.cutoff = cutoff;\n        sdcCtrl.maxInnerIts = maxInnerIts;\n        sdcCtrl.maxOuterIts = maxOuterIts;\n        sdcCtrl.tol = sdcTol;\n        sdcCtrl.spreadFactor = spreadFactor;\n        sdcCtrl.random = random;\n        sdcCtrl.progress = progress;\n        sdcCtrl.signCtrl.tol = signTol;\n        sdcCtrl.signCtrl.progress = progress;\n        schur::SDC( T, w, Q, fullTriangle, sdcCtrl );\n#endif\n        MakeTriangular( UPPER, T );\n\n        if( display )\n        {\n            Display( A, \"A\" );\n            Display( T, \"T\" );\n            Display( Q, \"Q\" );\n            Display( w, \"w\" );\n        }\n\n        DistMatrix<C> G(g);\n        Gemm( NORMAL, NORMAL, C(1), Q, T, G );\n        Gemm( NORMAL, ADJOINT, C(-1), G, Q, C(1), A );\n        const Real frobE = FrobeniusNorm( A ); \n        MakeIdentity( A );\n        Herk( LOWER, ADJOINT, C(-1), Q, C(1), A );\n        const Real frobOrthog = HermitianFrobeniusNorm( LOWER, A );\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \" || A - Q T Q^H ||_F / || A ||_F = \" << frobE/frobA \n                      << \"\\n\"\n                      << \" || I - Q^H Q ||_F   / || A ||_F = \" \n                      << frobOrthog/frobA << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/SequentialBunchKaufman.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_AXPY_INC\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_MAKESYMMETRIC_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n#include ELEM_SYMM_INC\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n#include ELEM_LDL_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INERTIA_INC\n#include ELEM_UNIFORM_INC\n#include ELEM_WIGNER_INC\n#include ELEM_ZEROS_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix to factor\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int numRhs = Input(\"--numRhs\",\"number of random r.h.s.\",100);\n        const double realMean = Input(\"--realMean\",\"real mean\",0.); \n        const double imagMean = Input(\"--imagMean\",\"imag mean\",0.);\n        const double stddev = Input(\"--stddev\",\"standard dev.\",1.);\n        const bool conjugate = Input(\"--conjugate\",\"LDL^H?\",false);\n        const Int pivotInt = Input(\"--pivot\",\"pivot type\",0);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        SetBlocksize( nb );\n        const auto pivotType = static_cast<LDLPivotType>(pivotInt);\n\n        C mean( realMean, imagMean );\n        Matrix<C> A;\n        if( conjugate )\n        {\n            Wigner( A, n, mean, stddev );\n        }\n        else\n        {\n            Gaussian( A, n, n, mean, stddev );\n            MakeSymmetric( LOWER, A );\n        }\n\n        // Make a copy of A and then overwrite it with its LDL factorization\n        Matrix<Int> perm;\n        Matrix<C> dSub, factA( A );\n        MakeTriangular( LOWER, factA );\n        if( conjugate )\n            LDLH( factA, dSub, perm, pivotType );\n        else\n            LDLT( factA, dSub, perm, pivotType );\n        if( print && mpi::WorldRank()==0 )\n        {\n            Print( A,     \"A\"     );\n            Print( factA, \"factA\" );\n            Print( dSub,  \"dSub\"  );\n            Print( perm,  \"perm\" );\n        }\n\n        // Generate a random set of vectors\n        Matrix<C> X;\n        Uniform( X, n, numRhs );\n        Matrix<C> B;\n        Zeros( B, n, numRhs );\n        Symm( LEFT, LOWER, C(1), A, X, C(0), B, conjugate );\n        if( print && mpi::WorldRank()==0 )\n        {\n            Print( X, \"X\" );\n            Print( B, \"B\" );\n        }\n        ldl::SolveAfter( factA, dSub, perm, B, conjugate );\n        const Real AFrob = HermitianFrobeniusNorm( LOWER, A );\n        const Real XFrob = FrobeniusNorm( X );\n        Axpy( C(-1), B, X );\n        const Real errFrob = FrobeniusNorm( X );\n        if( print && mpi::WorldRank() == 0 )\n        {\n            Print( B, \"XComp\" );\n            Print( X, \"E\" );\n        }\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"|| A ||_F = \" << AFrob << \"\\n\"\n                      << \"|| X ||_F = \" << XFrob << \"\\n\"\n                      << \"|| X - inv(A) A X ||_F = \" << errFrob << std::endl;\n        }\n\n        if( conjugate )\n        {\n            // Compute the inertia of A now that we are done with it.\n            auto inertia = Inertia( LOWER, A, pivotType );\n            if( mpi::WorldRank() == 0 )\n            {\n                std::cout << \"numPositive=\" << inertia.numPositive << \"\\n\"\n                          << \"numNegative=\" << inertia.numNegative << \"\\n\"\n                          << \"numZero    =\" << inertia.numZero << \"\\n\"\n                          << std::endl;\n            }\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/SequentialQR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_QR_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        ProcessInput();\n        PrintInputReport();\n\n        Matrix<C> A;\n        Uniform( A, m, n );\n        const Real frobA = FrobeniusNorm( A );\n\n        // Compute the QR decomposition of A, but do not overwrite A\n        Matrix<C> Q( A ), R;\n        qr::Explicit( Q, R );\n\n        // Check the error in the QR factorization, || A - Q R ||_F / || A ||_F\n        Matrix<C> E( A );\n        Gemm( NORMAL, NORMAL, C(-1), Q, R, C(1), E );\n        const Real frobQR = FrobeniusNorm( E );\n\n        // Check the numerical orthogonality of Q, || I - Q^H Q ||_F / || A ||_F\n        const Int k = std::min(m,n);\n        Identity( E, k, k );\n        Herk( LOWER, ADJOINT, C(-1), Q, C(1), E );\n        const Real frobOrthog = HermitianFrobeniusNorm( LOWER, E );\n\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"|| A ||_F = \" << frobA << \"\\n\"\n                      << \"|| A - Q R ||_F / || A ||_F   = \"\n                      << frobQR/frobA << \"\\n\"\n                      << \"|| I - Q^H Q ||_F / || A ||_F = \"\n                      << frobOrthog/frobA << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/SequentialSVD.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_MAXNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_TWONORMESTIMATE_INC\n#include ELEM_SVD_INC\n#include ELEM_MATRICES_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    enum TestType { FOURIER=0, HILBERT=1, IDENTITY=2, ONES=3, ONE_TWO_ONE=4,\n                    UNIFORM=5, WILKINSON=6, ZEROS=7 }; \n\n    try \n    {\n        const Int k = Input(\"--size\",\"problem size\",100);\n        ProcessInput();\n        PrintInputReport();\n\n        Matrix<C> A, U, V;\n        Matrix<Real> s;\n\n        for( Int test=0; test<16; ++test )\n        {\n            Int n;\n            const TestType testType = TestType(test/2);\n            const bool useQR = test % 2;\n            const std::string qrString = ( useQR ? \"with QR:\" : \"with D&C:\" );\n            switch( testType )\n            {\n            case FOURIER:     \n                if( mpi::WorldRank() == 0 ) \n                    std::cout << \"Testing Fourier \" \n                              << qrString << std::endl;\n                n = k;\n                Fourier( A, n ); \n                break;\n            case HILBERT:     \n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Testing Hilbert \" << qrString << std::endl;\n                n = k;\n                Hilbert( A, n ); \n                break;\n            case IDENTITY:    \n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Testing Identity \" << qrString << std::endl;\n                n = k;\n                Identity( A, n, n ); \n                break;\n            case ONES:        \n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Testing Ones \" << qrString << std::endl;\n                n = k;\n                Ones( A, n, n ); \n                break;\n            case ONE_TWO_ONE: \n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Testing OneTwoOne \" << qrString << std::endl;\n                n = k;\n                OneTwoOne( A, n ); \n                break;\n            case UNIFORM:     \n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Testing Uniform \" << qrString << std::endl;\n                n = k;\n                Uniform( A, n, n ); \n                break;\n            case WILKINSON:   \n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Testing Wilkinson \" << qrString << std::endl;\n                Wilkinson( A, k ); \n                n = 2*k+1;\n                break;\n            case ZEROS:       \n                if( mpi::WorldRank() == 0 )\n                    std::cout << \"Testing Zeros \" << qrString << std::endl;\n                n = k;\n                Zeros( A, n, n ); \n                break;\n            };\n\n            // Make a copy of A and then perform the SVD\n            U = A;\n            SVD( U, s, V, useQR );\n\n            const Real twoNormOfA = MaxNorm( s );\n            const Real maxNormOfA = MaxNorm( A );\n            const Real oneNormOfA = OneNorm( A );\n            const Real infNormOfA = InfinityNorm( A );\n            const Real frobNormOfA = FrobeniusNorm( A );\n            const Real twoEstOfA = TwoNormEstimate( A );\n\n            DiagonalScale( RIGHT, NORMAL, s, U );\n            Gemm( NORMAL, ADJOINT, C(-1), U, V, C(1), A );\n            const Real maxNormOfE = MaxNorm( A );\n            const Real oneNormOfE = OneNorm( A );\n            const Real infNormOfE = InfinityNorm( A );\n            const Real frobNormOfE = FrobeniusNorm( A );\n            const Real epsilon = lapack::MachineEpsilon<Real>();\n            const Real scaledResidual = frobNormOfE/(n*epsilon*twoNormOfA);\n\n            if( mpi::WorldRank() == 0 )\n            {\n                cout << \"||A||_max   = \" << maxNormOfA << \"\\n\"\n                     << \"||A||_1     = \" << oneNormOfA << \"\\n\"\n                     << \"||A||_oo    = \" << infNormOfA << \"\\n\"\n                     << \"||A||_F     = \" << frobNormOfA << \"\\n\"\n                     << \"\\n\"\n                     << \"||A||_2     = \" << twoNormOfA << \"\\n\"\n                     << \"||A||_2 est = \" << twoEstOfA << \"\\n\"\n                     << \"\\n\"\n                     << \"||A - U Sigma V^H||_max = \" << maxNormOfE << \"\\n\"\n                     << \"||A - U Sigma V^H||_1   = \" << oneNormOfE << \"\\n\"\n                     << \"||A - U Sigma V^H||_oo  = \" << infNormOfE << \"\\n\"\n                     << \"||A - U Sigma V^H||_F   = \" << frobNormOfE << \"\\n\"\n                     << \"||A - U Sigma V_H||_F / (n eps ||A||_2) = \" \n                     << scaledResidual << \"\\n\" << endl;\n            }\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/Sign.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_SIGN_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const SignScaling scaling = \n            static_cast<SignScaling>(Input(\"--scaling\",\"scaling strategy\",0));\n        const Int maxIts = Input(\"--maxIts\",\"max number of iter's\",100);\n        const double tol = Input(\"--tol\",\"convergence tolerance\",1e-6);\n        const bool progress = Input(\"--progress\",\"print sign progress?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        const bool display = Input(\"--display\",\"display matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> A;\n        Uniform( A, m, n );\n        if( print )\n            Print( A, \"A\" );\n        if( display )\n            Display( A, \"A\" );\n\n        SignCtrl<Real> signCtrl;\n        signCtrl.maxIts = maxIts;\n        signCtrl.tol = tol;\n        signCtrl.progress = progress;\n        signCtrl.scaling = scaling;\n\n        // Compute sgn(A)\n        Sign( A, signCtrl );\n        if( print )\n            Print( A, \"A\" );\n        if( display )\n            Display( A, \"A\" );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/SimpleSVD.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental.hpp\"\nusing namespace elem;\n\nconst Int m=300, n=300;  // run SVD on m x n matrix\ntypedef double R;        // real datatype is `R'\ntypedef Complex<R> C;    // complex datatype `C'\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    DistMatrix<C> A;\n    Uniform( A, m, n );\n\n    DistMatrix<C> U, V;\n    DistMatrix<R,VR,STAR> s;\n    U = A;\n    SVD( U, s, V );\n    const R twoNormOfA = MaxNorm( s );\n\n    DiagonalScale( RIGHT, NORMAL, s, U );\n    Gemm( NORMAL, ADJOINT, C(-1), U, V, C(1), A );\n    const R frobNormOfE = FrobeniusNorm( A );\n    const R eps = lapack::MachineEpsilon<R>();\n    const R scaledResidual = frobNormOfE / (std::max(m,n)*eps*twoNormOfA);\n    if( mpi::WorldRank() == 0 )\n    {\n        std::cout << \"||A||_2 = \" << twoNormOfA << \"\\n\"\n                  << \"||A - U Sigma V^H||_F / (max(m,n) eps ||A||_2) = \" \n                  << scaledResidual << \"\\n\" << std::endl;\n    }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/Skeleton.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMM_INC\n#include ELEM_SKELETON_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_PERMUTECOLS_INC\n#include ELEM_PERMUTEROWS_INC\n#include ELEM_UNIFORM_INC\n#include ELEM_ZEROS_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",20);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int r = Input(\"--rank\",\"rank of matrix\",5);\n        const Int maxSteps = Input(\"--maxSteps\",\"max # of steps of QR\",10);\n        const double tol = Input(\"--tol\",\"tolerance for ID\",-1.);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> U, V;\n        Uniform( U, m, r );\n        Uniform( V, n, r );\n        DistMatrix<C> A;\n        Gemm( NORMAL, ADJOINT, C(1), U, V, A );\n        const Real frobA = FrobeniusNorm( A );\n        if( print )\n            Print( A, \"A\" );\n\n        const Grid& g = A.Grid();\n        DistMatrix<Int,VR,STAR> permR(g), permC(g);\n        DistMatrix<C> Z(g);\n        Skeleton( A, permR, permC, Z, maxSteps, tol );\n        const Int rank = Z.Height();\n        if( print )\n        {\n            Print( permR, \"permR\" );\n            Print( permC, \"permC\" );\n            Print( Z, \"Z\" );\n        }\n\n        // Form the matrices of A's (hopefully) dominant rows and columns\n        DistMatrix<C> AR( A );\n        InversePermuteRows( AR, permR );\n        AR.Resize( rank, A.Width() );\n        DistMatrix<C> AC( A );\n        InversePermuteCols( AC, permC );\n        AC.Resize( A.Height(), rank );\n        if( print )\n        {\n            Print( AC, \"AC\" );\n            Print( AR, \"AR\" );\n        }\n\n        // Check || A - AC Z AR ||_F / || A ||_F\n        DistMatrix<C> B(g);\n        Gemm( NORMAL, NORMAL, C(1), Z, AR, B );\n        Gemm( NORMAL, NORMAL, C(-1), AC, B, C(1), A );\n        const Real frobError = FrobeniusNorm( A );\n        if( print )\n            Print( A, \"A - AC Z AR\" );\n\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"|| A ||_F = \" << frobA << \"\\n\\n\"\n                      << \"|| A - AC Z AR ||_F / || A ||_F = \" \n                      << frobError/frobA << \"\\n\" << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/SkewHermitianEig.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_SCALE_INC\n#include ELEM_GEMM_INC\n#include ELEM_HERK_INC\n#include ELEM_SKEWHERMITIANEIG_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\nusing namespace std;\nusing namespace elem;\n\n// Typedef our real and complex types to 'Real' and 'C' for convenience\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    // This detects whether or not you have already initialized MPI and \n    // does so if necessary. The full routine is elem::Initialize.\n    Initialize( argc, argv );\n\n    // Surround the Elemental calls with try/catch statements in order to \n    // safely handle any exceptions that were thrown during execution.\n    try \n    {\n        const Int n = Input(\"--size\",\"size of matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<C> S( n, n );\n\n        // We will fill entry (i,j) with the complex value (i-j,i+j) so that \n        // the global matrix is skew-Hermitian. However, only one triangle of \n        // the matrix actually needs to be filled, the symmetry can be implicit.\n        //\n        const Int localHeight = S.LocalHeight();\n        const Int localWidth = S.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = S.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = S.GlobalRow(iLoc);\n                S.SetLocal( iLoc, jLoc, C(i-j,i+j) );\n            }\n        }\n\n        // Make a backup of S before we overwrite it within the eigensolver\n        auto SCopy( S );\n\n        // Call the eigensolver. We first create an empty complex eigenvector \n        // matrix, X[MC,MR], and an eigenvalue column vector, w[VR,* ]\n        //\n        // Optional: set blocksizes and algorithmic choices here. See the \n        //           'Tuning' section of the README for details.\n        DistMatrix<Real,VR,STAR> wImag;\n        DistMatrix<C> X;\n        SkewHermitianEig( LOWER, S, wImag, X, ASCENDING );\n\n        if( print )\n        {\n            Print( SCopy, \"S\" );\n            Print( X, \"X\" );\n            Print( wImag, \"wImag\" );\n        }\n\n        // Check the residual, || S X - Omega X ||_F\n        const Real frobS = HermitianFrobeniusNorm( LOWER, SCopy );\n        auto E( X );\n        Scale( C(0,1), E );\n        DiagonalScale( RIGHT, NORMAL, wImag, E );\n        Gemm( NORMAL, NORMAL, C(-1), SCopy, X, C(1), E );\n        const Real frobResid = FrobeniusNorm( E );\n\n        // Check the orthogonality of X\n        Identity( E, n, n );\n        Herk( LOWER, NORMAL, C(-1), X, C(1), E );\n        const Real frobOrthog = HermitianFrobeniusNorm( LOWER, E );\n\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"|| H ||_F = \" << frobS << \"\\n\"\n                      << \"|| H X - X Omega ||_F / || A ||_F = \" \n                      << frobResid / frobS << \"\\n\"\n                      << \"|| X X^H - I ||_F = \" << frobOrthog / frobS\n                      << \"\\n\" << std::endl;\n        }\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/lapack-like/TriangularPseudospectrum.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_ENTRYWISEMAP_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_PSEUDOSPECTRUM_INC\n#include ELEM_DEMMEL_INC\n#include ELEM_FOXLI_INC\n#include ELEM_GRCAR_INC\n#include ELEM_LOTKIN_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try \n    {\n        Int r = Input(\"--gridHeight\",\"process grid height\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int matType =\n            Input(\"--matType\",\"0:uniform,1:Demmel,2:Lotkin,3:Grcar,4:FoxLi,\"\n                  \"5:custom real,6:custom complex\",1);\n        bool quasi = Input(\"--quasi\",\"Quasi-triang real matrix?\",true);\n        const std::string basename = \n            Input(\"--basename\",\"basename of distributed Schur factor\",\n                  std::string(\"default\"));\n        const Int n = Input(\"--size\",\"height of matrix\",100);\n        const Int nbAlg = Input(\"--nbAlg\",\"algorithmic blocksize\",96);\n        const Real realCenter = Input(\"--realCenter\",\"real center\",0.);\n        const Real imagCenter = Input(\"--imagCenter\",\"imag center\",0.);\n        const Real realWidth = Input(\"--realWidth\",\"x width of image\",0.);\n        const Real imagWidth = Input(\"--imagWidth\",\"y width of image\",0.);\n        const Int realSize = Input(\"--realSize\",\"number of x samples\",100);\n        const Int imagSize = Input(\"--imagSize\",\"number of y samples\",100);\n        const bool arnoldi = Input(\"--arnoldi\",\"use Arnoldi?\",true);\n        const Int basisSize = Input(\"--basisSize\",\"num Arnoldi vectors\",10);\n        const Int maxIts = Input(\"--maxIts\",\"maximum pseudospec iter's\",200);\n        const Real psTol = Input(\"--psTol\",\"tolerance for pseudospectra\",1e-6);\n        const Real uniformRealCenter = \n            Input(\"--uniformRealCenter\",\"real center of uniform dist\",0.);\n        const Real uniformImagCenter =\n            Input(\"--uniformImagCenter\",\"imag center of uniform dist\",0.);\n        const Real uniformRadius =\n            Input(\"--uniformRadius\",\"radius of uniform dist\",1.);\n        const Int numBands = Input(\"--numBands\",\"num bands for Grcar\",3);\n        const Real omega = Input(\"--omega\",\"frequency for Fox-Li\",16*M_PI);\n        const bool progress = Input(\"--progress\",\"print progress?\",true);\n        const bool deflate = Input(\"--deflate\",\"deflate?\",true);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        const bool write = Input(\"--write\",\"write matrices?\",false);\n        const Int numSaveFreq = \n            Input(\"--numSaveFreq\",\"numerical save frequency\",-1);\n        const Int imgSaveFreq = \n            Input(\"--imgSaveFreq\",\"image save frequency\",-1);\n        const Int imgDispFreq =\n            Input(\"--imgDispFreq\",\"image display frequency\",-1);\n        const std::string numBase =\n            Input(\"--numBase\",\"numerical save basename\",std::string(\"num\"));\n        const std::string imgBase =\n            Input(\"--imgBase\",\"image save basename\",std::string(\"img\"));\n        const Int numFormatInt = Input(\"--numFormat\",\"numerical format\",2);\n        const Int imgFormatInt = Input(\"--imgFormat\",\"image format\",8);\n        const Int colorMapInt = Input(\"--colorMap\",\"color map\",0);\n        const bool itCounts = Input(\"--itCounts\",\"display iter. counts?\",true);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( mpi::Size(mpi::COMM_WORLD) );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( mpi::COMM_WORLD, r, order );\n        SetBlocksize( nbAlg );\n        if( numFormatInt < 1 || numFormatInt >= FileFormat_MAX )\n            LogicError(\"Invalid numerical format integer, should be in [1,\",\n                       FileFormat_MAX,\")\");\n        if( imgFormatInt < 1 || imgFormatInt >= FileFormat_MAX )\n            LogicError(\"Invalid image format integer, should be in [1,\",\n                       FileFormat_MAX,\")\");\n\n        const FileFormat numFormat = static_cast<FileFormat>(numFormatInt);\n        const FileFormat imgFormat = static_cast<FileFormat>(imgFormatInt);\n        const ColorMap colorMap = static_cast<ColorMap>(colorMapInt);\n        SetColorMap( colorMap );\n        const C center(realCenter,imagCenter);\n        const C uniformCenter(uniformRealCenter,uniformImagCenter);\n\n        bool isReal = true;\n        std::string matName;\n        std::ostringstream os;\n        DistMatrix<Real> AReal(g);\n        DistMatrix<C> ACpx(g);\n        switch( matType )\n        {\n        case 0: matName=\"uniform\";\n            Uniform( ACpx, n, n, uniformCenter, uniformRadius ); \n            MakeTriangular( UPPER, ACpx );\n            isReal = false;\n            break;\n        case 1:  matName=\"Demmel\";\n            Demmel( AReal, n );\n            MakeTriangular( UPPER, AReal );\n            isReal = true;\n            break;\n        case 2: matName=\"Lotkin\";\n            Lotkin( AReal, n );\n            MakeTriangular( UPPER, AReal );\n            isReal = true;\n            break;\n        case 3: matName=\"Grcar\";\n            Grcar( AReal, n, numBands ); \n            MakeTriangular( UPPER, AReal );\n            isReal = true;\n            break;\n        case 4: matName=\"FoxLi\";\n            FoxLi( ACpx, n, omega );\n            MakeTriangular( UPPER, ACpx );\n            isReal = false;\n            break;\n        case 5: matName=basename;\n            os << basename << \"-\" \n               << AReal.ColStride() << \"x\" << AReal.RowStride() << \"-\"\n               << AReal.DistRank() << \".bin\";\n            AReal.Resize( n, n );\n            read::Binary( AReal.Matrix(), os.str() ); \n            isReal = true;\n            break;\n        case 6: matName=basename;\n            os << basename << \"-\" \n               << ACpx.ColStride() << \"x\" << ACpx.RowStride() << \"-\"\n               << ACpx.DistRank() << \".bin\";\n            ACpx.Resize( n, n );\n            read::Binary( ACpx.Matrix(), os.str() ); \n            isReal = false;\n            break;\n        default:\n            LogicError(\"Invalid matrix type\");\n        }\n        if( display )\n        {\n            if( isReal ) \n                Display( AReal, \"A\" );\n            else\n                Display( ACpx, \"A\" );\n        }\n        if( write )\n        {\n            if( isReal )\n            {\n                Write( AReal, \"A\", numFormat );\n                Write( AReal, \"A\", imgFormat );\n            }\n            else\n            {\n                Write( ACpx, \"A\", numFormat );\n                Write( ACpx, \"A\", imgFormat );\n            }\n        }\n\n        PseudospecCtrl<Real> psCtrl;\n        psCtrl.schur = true;\n        psCtrl.maxIts = maxIts;\n        psCtrl.tol = psTol;\n        psCtrl.deflate = deflate;\n        psCtrl.arnoldi = arnoldi;\n        psCtrl.basisSize = basisSize;\n        psCtrl.progress = progress;\n        psCtrl.snapCtrl.imgSaveFreq = imgSaveFreq;\n        psCtrl.snapCtrl.numSaveFreq = numSaveFreq;\n        psCtrl.snapCtrl.imgDispFreq = imgDispFreq;\n        psCtrl.snapCtrl.imgFormat = imgFormat;\n        psCtrl.snapCtrl.numFormat = numFormat;\n        psCtrl.snapCtrl.imgBase = matName+\"-\"+imgBase;\n        psCtrl.snapCtrl.numBase = matName+\"-\"+numBase;\n        psCtrl.snapCtrl.itCounts = itCounts;\n\n        // Visualize the pseudospectrum by evaluating ||inv(A-sigma I)||_2 \n        // for a grid of complex sigma's.\n        DistMatrix<Real> invNormMap(g);\n        DistMatrix<Int> itCountMap(g);\n        if( realWidth != 0. && imagWidth != 0. )\n        {\n            if( isReal )\n            {\n                if( quasi )\n                    itCountMap = QuasiTriangularPseudospectrum\n                    ( AReal, invNormMap, center, realWidth, imagWidth, \n                      realSize, imagSize, psCtrl );\n                else\n                    itCountMap = TriangularPseudospectrum\n                    ( AReal, invNormMap, center, realWidth, imagWidth, \n                      realSize, imagSize, psCtrl );\n            }\n            else\n                itCountMap = TriangularPseudospectrum\n                ( ACpx, invNormMap, center, realWidth, imagWidth, \n                  realSize, imagSize, psCtrl );\n        }\n        else\n        {\n            if( isReal )\n            {\n                if( quasi )\n                {\n                    itCountMap = QuasiTriangularPseudospectrum\n                    ( AReal, invNormMap, center, realSize, imagSize, psCtrl );\n                }\n                else\n                    itCountMap = TriangularPseudospectrum\n                    ( AReal, invNormMap, center, realSize, imagSize, psCtrl );\n            }\n            else\n                itCountMap = TriangularPseudospectrum\n                ( ACpx, invNormMap, center, realSize, imagSize, psCtrl );\n        }\n        const Int numIts = MaxNorm( itCountMap );\n        if( mpi::WorldRank() == 0 )\n            std::cout << \"num iterations=\" << numIts << std::endl;\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Cauchy.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_CAUCHY_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",10);\n        const Int n = Input(\"--width\",\"width of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        std::vector<double> x( m ), y( n );\n        for( Int j=0; j<m; ++j )\n            x[j] = j;\n        for( Int j=0; j<n; ++j )\n            y[j] = j+m;\n\n        DistMatrix<double> A;\n        Cauchy( A, x, y );\n        if( display )\n            Display( A, \"Cauchy\");\n        if( print )\n            Print( A, \"Cauchy:\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/CauchyLike.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_CAUCHYLIKE_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",10);\n        const Int n = Input(\"--width\",\"width of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        std::vector<double> r(m), s(n), x(m), y(n);\n        for( Int j=0; j<m; ++j )\n            r[j] = 1./(j+1);\n        for( Int j=0; j<n; ++j )\n            s[j] = 1./(j+1);\n        for( Int j=0; j<m; ++j )\n            x[j] = j;\n        for( Int j=0; j<n; ++j )\n            y[j] = j+m;\n\n        DistMatrix<double> A;\n        CauchyLike( A, r, s, x, y );\n        if( display )\n            Display( A, \"Cauchy-like\" );\n        if( print )\n            Print( A, \"CauchyLike matrix:\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Circulant.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMM_INC\n#include ELEM_CIRCULANT_INC\n#include ELEM_FOURIER_INC\n#include ELEM_ZEROS_INC\nusing namespace elem;\n\ntypedef double Real;\ntypedef Complex<Real> C;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrices?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        // Create a circulant matrix\n        std::vector<C> a( n );\n        for( Int j=0; j<n; ++j )\n            a[j] = j;\n        DistMatrix<C> A;\n        Circulant( A, a );\n        if( display )\n            Display( A, \"Circulant\" );\n        if( print )\n            Print( A, \"Circulant matrix:\" );\n\n        // Create a Fourier matrix, which can be used to diagonalize circulant\n        // matrices\n        DistMatrix<C> F;\n        Fourier( F, n );\n        if( display )\n            Display( F, \"DFT matrix\" );\n        if( print )\n            Print( F, \"DFT matrix:\" );\n        \n        // Form B := A F\n        DistMatrix<C> B;\n        Zeros( B, n, n );\n        Gemm( NORMAL, NORMAL, C(1), A, F, C(0), B );\n\n        // Form A := F^H B = F^H \\hat A F\n        Gemm( ADJOINT, NORMAL, C(1), F, B, C(0), A );\n        if( display )\n            Display( A, \"F^H A F\" );\n        if( print )\n            Print( A, \"A := F^H A F\" );\n\n        // Form the thresholded result\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const double absValue = Abs(A.GetLocal(iLoc,jLoc));\n                if( absValue < 1e-13 )\n                    A.SetLocal(iLoc,jLoc,0);\n            }\n        }\n        if( display )\n            Display( A, \"Thresholded (1e-13) A\" );\n        if( print )\n            Print( A, \"A with values below 1e-13 removed\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Diagonal.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_DIAGONAL_INC\n#include ELEM_ZEROS_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        std::vector<double> d( n );\n        for( Int j=0; j<n; ++j )\n            d[j] = j;\n\n        DistMatrix<double> D;\n        Diagonal( D, d );\n        if( display )\n        {\n            Display( D, \"Diagonal matrix\" );\n#ifdef ELEM_HAVE_QT5\n            Spy( D, \"Diagonal spy plot\" );\n#endif\n        }\n        if( print )\n            Print( D, \"D:\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Egorov.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_EGOROV_INC\nusing namespace elem;\n\ntemplate<typename Real>\nclass FourierPhase {\npublic:\n    FourierPhase( Int n ) : n_(n), pi_(4*Atan(Real(1))) { }\n    Real operator()( Int i, Int j ) const { return (-2*pi_*i*j)/n_; }\nprivate:\n    Int n_;\n    Real pi_;\n};\n\ntemplate<typename Real>\nclass Phase {\npublic:\n    Phase( Int n ) : n_(n), pi_(4*Atan(Real(1))) { }\n    Real operator()( Int i, Int j ) const \n    { return (-2*pi_*i*j)/n_ + Sqrt(Real(i)*Real(i) + Real(j)*Real(j)); }\nprivate:\n    Int n_;\n    Real pi_;\n};\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n\n        FourierPhase<double> fourier( n );\n        Phase<double> phase( n );\n\n        DistMatrix<Complex<double>> F, G;\n        Egorov( F, fourier, n );\n        Egorov( G, phase,   n );\n\n        if( display )\n        {\n            Display( F, \"Egorov with Fourier phase\" );\n            Display( G, \"Egorov with more general phase\" );\n        }\n        if( print )\n        {\n            Print( F, \"Egorov with Fourier phase:\" );\n            Print( G, \"Egorov with more general phase:\" );\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Fourier.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_SVD_INC\n#include ELEM_FOURIER_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<Complex<double>> A;\n        Fourier( A, n );\n        if( display )\n            Display( A, \"Fourier Matrix\" );\n        if( print )\n            Print( A, \"Fourier matrix:\" );\n\n        if( n >= 50 )\n        {\n            const Int nSqrt = Sqrt( double(n) );\n            if( mpi::WorldRank() == 0 )\n                std::cout << \"Viewing \" << nSqrt << \" x \" << nSqrt << \" block \"\n                          << \"starting at (\" \n                          << (n-nSqrt)/2 << \",\" << (n-nSqrt)/2 << \")\"\n                          << std::endl;\n            auto AMid = View( A, (n-nSqrt)/2, (n-nSqrt)/2, nSqrt, nSqrt );\n            if( display )\n                Display( AMid, \"Middle block\" );\n            if( print )\n                Print( AMid, \"Middle block\" );\n            auto AMidCopy = AMid;\n             \n            DistMatrix<double,VR,STAR> s;\n            SVD( AMidCopy, s );\n            Print( s, \"singular values of middle block\" );\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Hankel.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HANKEL_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",10);\n        const Int n = Input(\"--width\",\"width of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const Int length = m+n-1;\n        std::vector<double> a( length );\n        for( Int j=0; j<length; ++j )\n            a[j] = j;\n\n        DistMatrix<double> H;\n        Hankel( H, m, n, a );\n        if( display )\n            Display( H, \"Hankel\" );\n        if( print )\n            Print( H, \"Hankel matrix:\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Helmholtz1D.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_INVERSE_INC\n#include ELEM_HELMHOLTZ_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--n\",\"size of matrix\",100);\n        const double realShift = Input(\"--realShift\",\"real part of shift\",0.);\n        const double imagShift = Input(\"--imagShift\",\"imag part of shift\",0.);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        const bool write = Input(\"--write\",\"write matrix?\",false);\n        const Int formatInt = Input(\"--format\",\"write format\",2);\n        const Int colorMapInt = Input(\"--colorMap\",\"color map\",0);\n        ProcessInput();\n        PrintInputReport();\n\n        if( formatInt < 1 || formatInt >= FileFormat_MAX )\n            LogicError(\"Invalid file format integer, should be in [1,\",\n                       FileFormat_MAX,\")\");\n\n        FileFormat format = static_cast<FileFormat>(formatInt);\n        ColorMap colorMap = static_cast<ColorMap>(colorMapInt);\n        SetColorMap( colorMap );\n\n        Complex<double> shift( realShift, imagShift );\n        DistMatrix<Complex<double>> H;\n        Helmholtz( H, n, shift );\n        if( display )\n            Display( H, \"Helmholtz matrix\" );\n        if( print )\n            Print( H, \"Helmholtz matrix:\" );\n        if( write )\n            Write( H, \"H\", format );\n\n        // (Attempt to) invert the Helmholtz matrix\n        Inverse( H );\n        if( display )\n            Display( H, \"Inverse of Helmholtz matrix\" );\n        if( print )\n            Print( H, \"Inverse of Helmholtz matrix:\" );\n        if( write )\n            Write( H, \"invH\", format );\n\n        // TODO: Extend to allow for computing SVD of submatrix\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Helmholtz2D.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_INVERSE_INC\n#include ELEM_HELMHOLTZ_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int nx = Input(\"--nx\",\"size of x dimension\",30);\n        const Int ny = Input(\"--ny\",\"size of y dimension\",30);\n        const double realShift = Input(\"--realShift\",\"real part of shift\",0.);\n        const double imagShift = Input(\"--imagShift\",\"imag part of shift\",0.);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        Complex<double> shift( realShift, imagShift );\n        DistMatrix<Complex<double>> H;\n        Helmholtz( H, nx, ny, shift );\n        if( display )\n            Display( H, \"Helmholtz matrix\" );\n        if( print )\n            Print( H, \"Helmholtz matrix:\" );\n\n        // (Attempt to) invert the Helmholtz matrix\n        Inverse( H );\n        if( display )\n            Display( H, \"Inverse of Helmholtz matrix\" );\n        if( print )\n            Print( H, \"Inverse of Helmholtz matrix:\" );\n\n        // TODO: Extend to allow for computing SVD of submatrix\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Helmholtz3D.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_INVERSE_INC\n#include ELEM_HELMHOLTZ_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int nx = Input(\"--nx\",\"size of x dimension\",10);\n        const Int ny = Input(\"--ny\",\"size of y dimension\",10);\n        const Int nz = Input(\"--nz\",\"size of z dimension\",10);\n        const double realShift = Input(\"--realShift\",\"real part of shift\",0.);\n        const double imagShift = Input(\"--imagShift\",\"imag part of shift\",0.);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        Complex<double> shift( realShift, imagShift );\n        DistMatrix<Complex<double>> H;\n        Helmholtz( H, nx, ny, nz, shift );\n        if( display )\n            Display( H, \"Helmholtz matrix\" );\n        if( print )\n            Print( H, \"Helmholtz matrix:\" );\n\n        // (Attempt to) invert the Helmholtz matrix\n        Inverse( H );\n        if( display )\n            Display( H, \"Inverse of Helmholtz matrix\" );\n        if( print )\n            Print( H, \"Inverse of Helmholtz matrix:\" );\n\n        // TODO: Extend to allow for computing SVD of submatrix\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/HermitianUniformSpectrum.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_NORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of Hermitian matrix\",10);\n        const double lower = Input(\"--lower\",\"lower bound on spectrum\",1.);\n        const double upper = Input(\"--upper\",\"upper bound on spectrum\",10.);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> X;\n        HermitianUniformSpectrum( X, n, lower, upper );\n        if( display )\n            Display( X, \"Hermitian uniform spectrum\" );\n        if( print )\n            Print( X, \"X\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Hilbert.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_CONDITION_INC\n#include ELEM_DETERMINANT_INC\n#include ELEM_HILBERTSCHMIDT_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_NUCLEARNORM_INC\n#include ELEM_TWONORM_INC\n#include ELEM_HILBERT_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> H;\n        Hilbert( H, n );\n        if( display )\n            Display( H, \"Hilbert\" );\n        if( print )\n            Print( H, \"Hilbert matrix:\" );\n\n        // This is grossly inefficient due to recomputing the singular values\n        // and Cholesky decomposition for several different operations, \n        // but it serves as an example of each function's usage\n        const double cond = TwoCondition( H );\n        const double det = HPDDeterminant( LOWER, H );\n        const double hilbertSchmidt = HilbertSchmidt( H, H );\n        const double twoNorm = HermitianTwoNorm( LOWER, H );\n        const double frobNorm = HermitianFrobeniusNorm( LOWER, H );\n        const double nuclearNorm = HermitianNuclearNorm( LOWER, H );\n\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"kappa_2(H)   = \" << cond << \"\\n\"\n                      << \"det(H)       = \" << det << \"\\n\"\n                      << \"Tr(H' H)     = \" << hilbertSchmidt << \"\\n\"\n                      << \"|| H ||_F    = \" << frobNorm << \"\\n\"\n                      << \"|| H ||_*    = \" << nuclearNorm << \"\\n\"\n                      << \"|| H ||_2    = \" << twoNorm << \"\\n\"\n                      << std::endl;\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Identity.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_IDENTITY_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of identity matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> I;\n        Identity( I, n, n );\n        if( display )\n        {\n            Display( I, \"Identity matrix\" );\n#ifdef ELEM_HAVE_QT5\n            Spy( I, \"Identity spy plot\" );\n#endif\n        }\n        if( print )\n            Print( I, \"Identity\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Kahan.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_KAHAN_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of identity matrix\",10);\n        const double phi = Input(\"--phi\",\"number in (0,1)\",0.2);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> A;\n        Kahan( A, n, phi );\n        if( display )\n            Display( A, \"Kahan\" );\n        if( print )\n            Print( A, \"Kahan\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Legendre.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HERMITIANTRIDIAGEIG_INC\n#include ELEM_LEGENDRE_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> J;\n        Legendre( J, n );\n        if( display )\n        {\n            Display( J, \"Jacobi matrix for Legendre polynomials\" );\n#ifdef ELEM_HAVE_QT5\n            Spy( J, \"Spy plot for Jacobi matrix\" );\n#endif\n        }\n        if( print )\n            Print( J, \"Jacobi matrix for Legendre polynomials\" );\n\n        // We will compute Gaussian quadrature points and weights over [-1,+1]\n        // using the eigenvalue decomposition of the Jacobi matrix for the \n        // Legendre polynomials.\n        DistMatrix<double,VR,  STAR> points;\n        DistMatrix<double,STAR,VR  > X;\n        HermitianTridiagEig\n        ( J.GetDiagonal(), J.GetDiagonal(-1), points, X, ASCENDING );\n        if( display )\n            Display( points, \"Quadrature points\" );\n        if( print )\n            Print( points, \"points\" );\n        auto firstRow = View( X, 0, 0, 1, n );\n        DistMatrix<double,STAR,STAR> weights = firstRow;\n        for( Int j=0; j<n; ++j )\n        {\n            const double gamma = weights.Get( 0, j );\n            weights.Set( 0, j, 2*gamma*gamma );\n        }\n        if( display )\n            Display( weights, \"Quadrature weights\" );\n        if( print )\n            Print( weights, \"weights\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/LehmerParterRis.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_LEHMER_INC\n#include ELEM_PARTER_INC\n#include ELEM_RIS_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> A, B, C;\n        Lehmer( A, n );\n        Parter( B, n );\n        Ris( C, n );\n        if( display )\n        {\n            Display( A, \"Lehmer\" );\n            Display( B, \"Parter\" );\n            Display( C, \"Ris\" );\n        }\n        if( print )\n        {\n            Print( A, \"Lehmer:\" );\n            Print( B, \"Parter:\" );\n            Print( C, \"Ris:\" );\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/NormalUniformSpectrum.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_NORMALUNIFORMSPECTRUM_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",10);\n        const double realCenter = Input\n            (\"--realCenter\",\"real center of uniform eigval distribution\",3.);\n        const double imagCenter = Input\n            (\"--imagCenter\",\"imag center of uniform eigval distribution\",-4.);\n        const double radius = Input\n            (\"--radius\",\"radius of uniform eigval distribution\",2.);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const Complex<double> center( realCenter, imagCenter );\n        DistMatrix<Complex<double>> X;\n        NormalUniformSpectrum( X, n, center, radius );\n        if( display )\n            Display( X, \"Normal uniform spectrum\" );\n        if( print )\n            Print( X, \"X\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/OneTwoOne.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_ONETWOONE_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> A;\n        OneTwoOne( A, n );\n        if( display )\n        {\n            Display( A, \"1-2-1 matrix\" );\n#ifdef ELEM_HAVE_QT5\n            Spy( A, \"1-2-1 spy plot\" );\n#endif\n        }\n        if( print )\n            Print( A, \"1-2-1 matrix:\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Ones.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_ONES_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",10);\n        const Int n = Input(\"--width\",\"width of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> A;\n        Ones( A, m, n );\n        if( display )\n            Display( A, \"Ones\" );\n        if( print )\n            Print( A, \"Ones matrix:\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/PSFW.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HERMITIANTRIDIAGEIG_INC\n#include ELEM_ZEROS_INC\nusing namespace elem;\n\n/*\n   This is a testbed for some of the formulas for \n   Prolate Spheroidal Wave Functions (PSFWs) found in Osipov and Rokhlin's\n   \"On the evaluation of prolate spheroidal wave functions and associated\n    quadrature rules\", arXiv:1301.1707.\n */\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--n\",\"maximum k value\",10);\n        const double c = Input(\"--c\",\"coefficient for PSFW\",100.);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const Int nOdd = n/2;\n        const Int nEven = n - nOdd;\n        DistMatrix<double> AEven, AOdd;\n        Zeros( AEven, nEven, nEven );\n        Zeros( AOdd, nOdd, nOdd );\n        \n        // Fill AEven and AOdd\n        for( Int k=0; k<n; ++k )\n        {\n            const Int kHalf = k/2;\n            const double kd = k;\n            const double diag = \n                kd*(kd+1) + (2*kd*(kd+1)-1)/((2*kd+3)*(2*kd-1))*c*c;\n            const double offDiag = \n                (kd+2)*(kd+1)/((2*kd+3)*Sqrt((2*kd+1)*(2*kd+5)))*c*c;\n            if( k % 2 == 0 )\n            {\n                // Fill relevant entries of AEven\n                AEven.Set(kHalf,kHalf,diag);\n                if( kHalf+1 < nEven )\n                {\n                    AEven.Set(kHalf+1,kHalf,  offDiag);\n                    AEven.Set(kHalf,  kHalf+1,offDiag);\n                }\n            }\n            else\n            {\n                // Fill relevant entries of AOdd\n                AOdd.Set(kHalf,kHalf,diag); \n                if( kHalf+1 < nOdd )\n                {\n                    AOdd.Set(kHalf+1,kHalf,  offDiag);\n                    AOdd.Set(kHalf,  kHalf+1,offDiag);\n                }\n            }\n        }\n        if( display )\n        {\n            Display( AEven, \"Even matrix\" );\n            Display( AOdd, \"Odd matrix\" );\n        }\n        if( print )\n        {\n            Print( AEven, \"AEven\" );\n            Print( AOdd, \"AOdd\" );\n        }\n\n        DistMatrix<double,VR,  STAR> wEven, wOdd;\n        DistMatrix<double> XEven, XOdd;\n        HermitianTridiagEig\n        ( AEven.GetDiagonal(), AEven.GetDiagonal(-1), wEven, XEven, ASCENDING );\n        HermitianTridiagEig\n        ( AOdd.GetDiagonal(), AOdd.GetDiagonal(-1), wOdd, XOdd, ASCENDING );\n        if( display )\n        {\n            Display( XEven, \"Even eigenvectors\" );\n            Display( XOdd, \"Odd eigenvectors\" );\n            Display( wEven, \"Even eigenvalues\" );\n            Display( wOdd, \"Odd eigenvalues\" );\n        }\n        if( print )\n        {\n            Print( XEven, \"XEven\" );\n            Print( XOdd, \"XOdd\" );\n            Print( wEven, \"wEven\" );\n            Print( wOdd, \"wOdd\" );\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/README.md",
    "content": "### `examples/matrices`\n\nThis folder contains several examples of Elemental's special matrices.\nDetails behind them will hopefully be added soon.\n\n-  `Cauchy.cpp`:\n-  `CauchLike.cpp`:\n-  `Circulant.cpp`:\n-  `Diagonal.cpp`:\n-  `Egorov.cpp`:\n-  `Fourier.cpp`:\n-  `Hankel.cpp`:\n-  `Helmholtz1D.cpp`:\n-  `Helmholtz2D.cpp`:\n-  `Helmholtz3D.cpp`:\n-  `HermitianUniformSpectrum.cpp`:\n-  `Hilbert.cpp`:\n-  `Identity.cpp`:\n-  `Kahan.cpp`:\n-  `Legendre.cpp`:\n-  `LehmerParterRis.cpp`:\n-  `NormalUniformSpectrum.cpp`:\n-  `Ones.cpp`:\n-  `OneTwoOne.cpp`:\n-  `PSFW.cpp`:\n-  `RiemannRedhefferGCD.cpp`:\n-  `Toeplitz.cpp`:\n-  `Uniform.cpp`:\n-  `Walsh.cpp`:\n-  `Wilkinson.cpp`:\n-  `Zeros.cpp`:\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/RiemannRedhefferGCD.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GCDMATRIX_INC\n#include ELEM_REDHEFFER_INC\n#include ELEM_RIEMANN_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int n = Input(\"--size\",\"size of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> A, B, C;\n        Riemann( A, n );\n        Redheffer( B, n );\n        GCDMatrix( C, n, n );\n        if( display )\n        {\n            Display( A, \"Riemann\" );\n            Display( B, \"Redheffer\" );\n            Display( C, \"GCDMatrix\" );\n        }\n        if( print )\n        {\n            Print( A, \"Riemann matrix:\" );\n            Print( B, \"Redheffer matrix:\" );\n            Print( C, \"GCD matrix:\" );\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Toeplitz.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_TOEPLITZ_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",10);\n        const Int n = Input(\"--width\",\"width of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const Int length = m+n-1;\n        std::vector<double> a( length );\n        for( Int j=0; j<length; ++j )\n            a[j] = j;\n\n        DistMatrix<double> A;\n        Toeplitz( A, m, n, a );\n        if( display )\n            Display( A, \"Toeplitz\" );\n        if( print )\n            Print( A, \"Toeplitz matrix:\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Uniform.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",10);\n        const Int n = Input(\"--width\",\"width of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> X;\n        Uniform( X, m, n );\n        if( display )\n            Display( X, \"Uniform matrix\" );\n        if( print )\n            Print( X, \"Uniform matrix\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Walsh.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_LDL_INC\n#include ELEM_WALSH_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int k = Input(\"--order\",\"generate 2^k x 2^k matrix\",4);\n        const bool binary = Input(\"--binary\",\"binary data?\",false);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        // Generate a Walsh matrix of order k (a 2^k x 2^k matrix)\n        DistMatrix<double> W;\n        Walsh( W, k, binary );\n        if( display )\n            Display( W, \"Walsh matrix\" );\n        if( print )\n            Print( W, \"W(2^k)\");\n\n        if( !binary )\n        {\n            LDLH( W );\n            auto d = W.GetDiagonal();\n            MakeTriangular( LOWER, W );\n            SetDiagonal( W, 1. );\n\n            if( display )\n            {\n                Display( W, \"Lower factor\" );\n                Display( d, \"Diagonal factor\" );\n            }\n            if( print )\n            {\n                Print( W, \"L\" ); \n                Print( d, \"d\" ); \n            }\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Wilkinson.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_WILKINSON_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int k = Input(\"--order\",\"generate 2k+1 x 2k+1 matrix\",5);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> W;\n        Wilkinson( W, k );\n        if( display )\n        {\n            Display( W, \"Wilkinson matrix\" );\n#ifdef ELEM_HAVE_QT5\n            Spy( W, \"Wilkinson spy plot\" );\n#endif\n        }\n        if( print )\n            Print( W, \"Wilkinson matrix\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/examples/matrices/Zeros.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_ZEROS_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",10);\n        const Int n = Input(\"--width\",\"width of matrix\",10);\n        const bool display = Input(\"--display\",\"display matrix?\",true);\n        const bool print = Input(\"--print\",\"print matrix?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        DistMatrix<double> A;\n        Zeros( A, m, n );\n        if( display )\n            Display( A, \"Zeros\" );\n        if( print )\n            Print( A, \"Zeros matrix:\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/experimental/g3d/G3DGemm.cpp",
    "content": "/*\n   Copyright (c) The University of Texas at Austin, 2013.\n   Copyright (c) Jack Poulson, 2013.\n\n   Authors: Martin Schatz (primary) and Jack Poulson (maintenance)\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include <cstdio>\n#include \"elemental.hpp\"\nusing namespace elem;\n\n// Initialize auxiliary communicators for depth dimension\nvoid InitDepthComms( int meshSize, mpi::Comm& depthComm, mpi::Comm& meshComm )\n{\n    const int rank = mpi::Rank( mpi::COMM_WORLD );\n\n    // Build this process's meshComm (2d grid)\n    const int depthRank = rank / meshSize;\n    const int depthColor = rank % meshSize;\n    mpi::Split( mpi::COMM_WORLD, depthColor, depthRank, depthComm );\n\n    // Build this process's depthComm (depth communicator)\n    const int meshRank = rank % meshSize;\n    const int meshColor = rank / meshSize;\n    mpi::Split( mpi::COMM_WORLD, meshColor, meshRank, meshComm );\n}\n\n// Have the top layer initialize the distributed matrix, A\nvoid InitA( DistMatrix<double>& A, bool print )\n{\n    const int rank = mpi::Rank(mpi::COMM_WORLD);\n    const Grid& g = A.Grid();\n    const int meshSize = g.Size();\n    const int depthRank = rank / meshSize;\n\n    if( depthRank == 0 )\n    {\n        MakeIdentity( A );\n        Scale( 10.0, A );\n        if( print )\n            Print( A, \"A\" );\n    }\n}\n\n// Have the top layer initialize the distributed matrix, B\nvoid InitB( DistMatrix<double>& B, bool print )\n{\n    const int rank = mpi::Rank(mpi::COMM_WORLD);\n    const Grid& g = B.Grid();\n    const int meshSize = g.Size();\n    const int depthRank = rank / meshSize;\n\n    if( depthRank == 0 )\n    {\n        if( B.LocalHeight() != B.LDim() )\n            throw std::logic_error(\"Ldim of B was too large\");\n\n        double* localBuffer = B.Buffer();\n        const int localSize = B.LocalHeight()*B.LocalWidth();\n        for( int iLocal=0; iLocal<localSize; ++iLocal )\n            localBuffer[iLocal] = iLocal*meshSize + rank;\n\n        if( print )\n            Print( B, \"B\" );\n    }\n}\n\n// Have the top layer initialize the distributed matrix, C\nvoid InitC( DistMatrix<double>& C, bool print )\n{\n    const int rank = mpi::Rank(mpi::COMM_WORLD);\n    const Grid& g = C.Grid();\n    const int meshSize = g.Size();\n    const int depthRank = rank / meshSize;\n\n    if( depthRank == 0 )\n        MakeZeros( C );\n}\n\n// Create a new set of distributed matrices, so that, \n//    if depthRank == 0, B = A,\n//    otherwise,         B = 0.\nvoid CopyOrReset\n( const DistMatrix<double>& A, DistMatrix<double>& B )\n{\n    const int rank = mpi::Rank( mpi::COMM_WORLD );\n    const Grid& meshGrid = A.Grid();\n    const int meshSize = meshGrid.Size();\n    const int depthRank = rank / meshSize;\n\n    //Layer 0\n    if( depthRank == 0 )\n        B = A;\n    else\n    {\n        B.AlignWith( A );\n        Zeros( B, A.Height(), A.Width() );\n    }\n}\n\n// Broadcast a matrix from the root grid to the others\nvoid DepthBroadcast\n( const mpi::Comm& depthComm,\n  const DistMatrix<double>& A, DistMatrix<double>& B )\n{\n    const int rank = mpi::Rank(mpi::COMM_WORLD);\n    const Grid& meshGrid = A.Grid();\n    const int meshSize = meshGrid.Size();\n    const int depthRank = rank / meshSize;\n\n    const int localSize = A.LocalHeight()*A.LocalWidth();\n    if( A.LocalHeight() != A.LDim() )\n        throw std::logic_error(\"Leading dimension did not match local height\");\n\n    B.Empty();\n    B.AlignWith( A );\n    B.Resize( A.Height(), A.Width() );\n\n    // Have the root pack the broadcast data\n    if( depthRank == 0 )\n        MemCopy( B.Buffer(), A.LockedBuffer(), localSize );\n\n    // Broadcast from the root\n    mpi::Broadcast( B.Buffer(), localSize, 0, depthComm );\n}\n\n/*\n * Distributes A in such a way that\n *   Layer 0 <- A(:, 0:(n/h - 1))\n *   Layer 1 <- A(:, (n/h):(2n/h - 1))\n *     .\n *     .\n *     .\n *   Layer h-1 <- A(:, ((h-1)n/h):n)\n */\nvoid DistributeCols\n( const mpi::Comm& depthComm,\n  const DistMatrix<double>& A, DistMatrix<double>& B )\n{\n    const int depthSize = mpi::Size( depthComm );\n    const int depthRank = mpi::Rank( depthComm );\n\n    const int sendCount = A.LocalHeight()*A.LocalWidth();\n    const int recvCount = sendCount / depthSize;\n\n    // For now, we will make B as large as A...\n    // TODO: NOT DO THIS\n    if( A.LocalHeight() != A.LDim() )\n        throw std::logic_error(\"Local height did not match ldim\");\n    B.Empty();\n    B.AlignWith( A );\n    Zeros( B, A.Height(), A.Width() );\n\n    // Scatter\n    const int localColOffset = (A.LocalWidth()/depthSize)*depthRank;\n    mpi::Scatter\n    ( A.LockedBuffer(), recvCount, \n      B.Buffer(0,localColOffset), recvCount, 0, depthComm );\n}\n\n/*\n * Distributes A in such a way that\n *   Layer 0 <- A(0:(m/h - 1), :)\n *   Layer 1 <- A((m/h):(2m/h - 1), :)\n *     .\n *     .\n *     .\n *   Layer h-1 <- A(((h-1)m/h):m, :)\n */\nvoid DistributeRows\n( const mpi::Comm& depthComm,\n  const DistMatrix<double>& A, DistMatrix<double>& B )\n{\n    const int depthRank = mpi::Rank( depthComm );\n    const int depthSize = mpi::Size( depthComm );\n    const Grid& meshGrid = A.Grid();\n\n    const int sendCount = A.LocalHeight()*A.LocalWidth();\n    const int recvCount = sendCount / depthSize;\n\n    // Have the root mesh pack the data for scattering\n    std::vector<double> sendBuf;\n    const int blockSize = A.Height() / depthSize;\n    if( depthRank == 0 )\n    {\n        sendBuf.resize( sendCount );\n        MemZero( &sendBuf[0], sendCount ); // TODO: Is this necessary?!?\n\n        DistMatrix<double> \n            AT(meshGrid), A0(meshGrid),\n            AB(meshGrid), A1(meshGrid),\n                          A2(meshGrid);\n\n        // Pack rows block by block for each layer\n        LockedPartitionDown\n        ( A, AT, \n             AB, 0 );\n        for( int i=0; i<depthSize; ++i )\n        {\n            LockedRepartitionDown\n            ( AT,  A0,\n             /**/ /**/\n                   A1,\n              AB,  A2, blockSize );\n\n            const int dataSize = A1.LocalWidth()*A1.LocalHeight();\n            const int offset = i*dataSize;\n\n            // TODO: Avoid the extra copy...\n            DistMatrix<double> A1Contig( A1 );\n            MemCopy( &sendBuf[offset], A1Contig.LockedBuffer(), dataSize );\n\n            SlideLockedPartitionDown\n            ( AT,  A0, \n                   A1,\n             /**/ /**/\n              AB,  A2 );\n        }\n    }\n\n    // Scatter the packed data\n    std::vector<double> recvBuf( recvCount );\n    mpi::Scatter\n    ( &sendBuf[0], recvCount, &recvBuf[0], recvCount, 0, depthComm );\n\n    // Pad received data by zero\n    DistMatrix<double> dataBlock( meshGrid );\n    dataBlock.Attach\n    ( blockSize, A.Width(), meshGrid, 0, 0, \n      &recvBuf[0], blockSize/meshGrid.Height() );\n\n    // TODO: We can probably heavily simplify this...\n    //\n    // dataBlock_T <- transpose(dataBlock)\n    // tmp_T <- padWithZeros(dataBlockT)\n    // tmp <- transpose(tmp_T)\n    // Layer x <- M((x*Mm/h):((x+1)*Mm/h - 1), :)\n    DistMatrix<double> dataBlockTrans( meshGrid );\n    Transpose( dataBlock, dataBlockTrans );\n\n    std::vector<double> newData( sendCount );\n    MemZero( &newData[0], sendCount );\n    const int offset = depthRank*recvCount;\n\n    MemCopy( &newData[offset], dataBlockTrans.LockedBuffer(), recvCount );\n\n    DistMatrix<double> tmpTrans( meshGrid );\n    tmpTrans.Attach\n    ( A.Width(), A.Height(), meshGrid, 0, 0, \n      &newData[0], A.Width()/meshGrid.Width() );\n    DistMatrix<double> tmp( meshGrid );\n    Transpose( tmpTrans, tmp );\n\n    Transpose( tmpTrans, B );\n}\n\n// Initialize all matrices in order to set up for the G3D GEMM\nvoid InitializeMatrices\n( int type, mpi::Comm& depthComm,\n  int m, int n, int k,\n  DistMatrix<double>& AOut,\n  DistMatrix<double>& BOut,\n  DistMatrix<double>& COut,\n  bool print )\n{\n    const Grid& meshGrid = AOut.Grid();\n\n    DistMatrix<double> A( m, k, meshGrid ),\n                       B( k, n, meshGrid ),\n                       C( m, n, meshGrid );\n\n    //Initialize top layer with desired matrices\n    InitA( A, print );\n    InitB( B, print );\n    InitC( C, print );\n\n    //Distribute matrices according to which matrix is stationary\n    switch (type)\n    {\n    case 'A':\n        DepthBroadcast( depthComm, A, AOut );\n        DistributeCols( depthComm, B, BOut);\n        DistributeCols( depthComm, C, COut);\n        break;\n    case 'B':\n        DistributeRows( depthComm, A, AOut);\n        DepthBroadcast( depthComm, B, BOut );\n        DistributeRows( depthComm, C, COut);\n        break;\n    case 'C':\n        DistributeCols( depthComm, A, AOut);\n        DistributeRows( depthComm, B, BOut);\n        CopyOrReset( C, COut );\n        break;\n    default:\n        throw std::logic_error(\"Unknown stationary type\");\n    }\n}\n\n// Reduce across depth to get end result C\nvoid SumContributions\n( mpi::Comm& depthComm,\n  const DistMatrix<double>& APartial, DistMatrix<double>& A )\n{\n    A.Empty();\n    A.AlignWith( APartial );\n    A.Resize( APartial.Height(), APartial.Width() );\n\n    if( APartial.LocalHeight() != APartial.LDim() )\n        throw std::logic_error\n        (\"APartial did not have matching local height/ldim\");\n    if( A.LocalHeight() != A.LDim() )\n        throw std::logic_error(\"A did not have matching local height/ldim\");\n\n    const int dataSize = APartial.LocalHeight()*APartial.LocalWidth();\n    mpi::AllReduce\n    ( APartial.LockedBuffer(), A.Buffer(), dataSize, mpi::SUM, depthComm );\n}\n\nint main( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const int commRank = mpi::Rank( comm );\n\n    try\n    {\n        const char type = Input(\"--type\",\"'A', 'B', or 'C' algorithm\",'C');\n        const int r = Input<int>(\"--gridHeight\",\"height of process grid\");\n        const int c = Input<int>(\"--gridWidth\",\"width of process grid\");\n        const int depth = Input<int>(\"--depth\",\"amount of redundancy\");\n        const int m = Input(\"--m\",\"height of result\",500);\n        const int n = Input(\"--n\",\"width of result\",500);\n        const int k = Input(\"--k\",\"inner dimension\",500);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        // Sanity check on inputs\n        if( m % r != 0 || m % c != 0 || m % depth != 0 || \n            k % r != 0 || k % c != 0 || k % depth != 0 ||\n            n % r != 0 || n % c != 0 || n % depth != 0 )\n        {\n            if( commRank == 0 )\n                std::cout << \"Dimensions of matrices must be multiples of \"\n                             \"grid dimensions (for now)\" << std::endl;\n            Finalize();\n            return 0;\n        }\n        if( type < 'A' || type > 'C' )\n        {\n            if( commRank == 0 )\n                std::cout << \"Algorithm must be 'A', 'B', or 'C'\" << std::endl;\n            Finalize();\n            return 0;\n        }\n\n        DEBUG_ONLY(\n            if( commRank == 0 )\n            {\n                std::cout \n                     << \"==========================================\\n\"\n                     << \" In debug mode! Performance will be poor! \\n\"\n                     << \"==========================================\" \n                     << std::endl;\n            }\n        )\n\n        mpi::Comm depthComm, meshComm;\n        InitDepthComms( r*c, depthComm, meshComm );\n        const int depthRank = mpi::Rank( depthComm );\n        const Grid meshGrid( meshComm, r, c );\n\n        DistMatrix<double> A( m, k, meshGrid ),\n                           B( k, n, meshGrid ),\n                           CPartial( m, n, meshGrid ),\n                           C( m, n, meshGrid );\n\n        InitializeMatrices( type, depthComm, m, n, k, A, B, CPartial, print );\n\n        // Compute within our mesh\n        mpi::Barrier( comm );\n        const double startTime = mpi::Time();\n        Gemm( NORMAL, NORMAL, 1.0, A, B, 1.0, CPartial );\n        SumContributions( depthComm, CPartial, C );\n        mpi::Barrier( comm );\n        const double stopTime = mpi::Time();\n        if( commRank == 0 )\n            std::cout << \"Runtime: \" << stopTime-startTime << \" seconds\" \n                      << std::endl;\n\n        if( depthRank == 0 && print )\n            Print( C, \"C\" );\n    } \n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-auto.cxx",
    "content": "int main()\n{\n    auto i = 5;\n    auto f = 3.14159f;\n    auto d = 3.14159;\n    bool ret = (\n        (sizeof(f) < sizeof(d)) &&\n        (sizeof(i) == sizeof(int))\n    );\n    return ret ? 0 : 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-auto_fail_compile.cxx",
    "content": "int main(void)\n{\n    // must fail because there is no initializer\n    auto i;\n\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-class_override_final.cxx",
    "content": "class base {\npublic:\n    virtual int foo(int a)\n     { return 4 + a; }\n    virtual int bar(int a) final\n     { return a - 2; }\n};\n\nclass sub final : public base {\npublic:\n    virtual int foo(int a) override\n     { return 8 + 2 * a; };\n};\n\nint main(void)\n{\n    base b;\n    sub s;\n\n    return (b.foo(2) * 2 == s.foo(2)) ? 0 : 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-class_override_final_fail_compile.cxx",
    "content": "class base {\npublic:\n    virtual int foo(int a)\n     { return 4 + a; }\n    virtual int bar(int a) final\n     { return a - 2; }\n};\n\nclass sub final : public base {\npublic:\n    virtual int foo(int a) override\n     { return 8 + 2 * a; };\n    virtual int bar(int a)\n     { return a; }\n};\n\nclass impossible : public sub { };\n\nint main(void)\n{\n    base b;\n    sub s;\n\n    return 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-constexpr.cxx",
    "content": "constexpr int square(int x)\n{\n    return x * x;\n}\n\nconstexpr int the_answer()\n{\n    return 42;\n}\n\nint main()\n{\n    int test_arr[square(3)];\n    bool ret = (\n        (square(the_answer()) == 1764) &&\n        (sizeof(test_arr)/sizeof(test_arr[0]) == 9)\n    );\n    return ret ? 0 : 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-cstdint_header.cxx",
    "content": "#include <cstdint>\n\nint main()\n{\n    bool test =\n        (sizeof(int8_t) == 1) &&\n        (sizeof(int16_t) == 2) &&\n        (sizeof(int32_t) == 4) &&\n        (sizeof(int64_t) == 8);\n    return test ? 0 : 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-decltype.cxx",
    "content": "bool check_size(int i)\n{\n    return sizeof(int) == sizeof(decltype(i));\n}\n\nint main()\n{\n    bool ret = check_size(42);\n    return ret ? 0 : 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-defaulted_functions.cxx",
    "content": "struct A {\n    int foo;\n\n    A(int foo): foo(foo) {}\n    A() = default;\n};\n\nint main(void)\n{\n    A bar;\n    A baz(10);\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-delegating_constructors.cxx",
    "content": "class del {\npublic:\n    del();\n    del(int k);\n\n    int m_k;\n};\n\ndel::del()\n    : del(42)\n{\n}\n\ndel::del(int k)\n    : m_k(k)\n{\n}\n\nint main()\n{\n    del q(41);\n    del a;\n\n    return a.m_k - q.m_k - 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-deleted_functions.cxx",
    "content": "struct A {\n    A() = delete;\n    A(int) {}\n};\n\nint main(void)\n{\n    A bar(10);\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-deleted_functions_fail_compile.cxx",
    "content": "struct A {\n    A() = delete;\n    ~A() = delete;\n    int m;\n    int ret();\n};\n\nint A::ret()\n{\n    return 2 * m;\n}\n\nint main(void)\n{\n    A bar;\n    bar.m = 1;\n    return bar.ret();\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-func_identifier.cxx",
    "content": "#include <string.h>\n\nint main(void)\n{\n    if (!__func__)\n        return 1;\n    if (!(*__func__))\n        return 1;\n    return strstr(__func__, \"main\") != 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-initializer_list.cxx",
    "content": "#include <initializer_list>\n#include <vector>\n\nclass seq {\npublic:\n    seq(std::initializer_list<int> list);\n\n    int length() const;\nprivate:\n    std::vector<int> m_v;\n};\n\nseq::seq(std::initializer_list<int> list)\n    : m_v(list)\n{\n}\n\nint seq::length() const\n{\n    return m_v.size();\n}\n\nint main(void)\n{\n    seq a = {18, 20, 2, 0, 4, 7};\n\n    return (a.length() == 6) ? 0 : 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-lambda.cxx",
    "content": "int main()\n{\n    int ret = 0;\n    return ([&ret]() -> int { return ret; })();\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-long_long.cxx",
    "content": "int main(void)\n{\n    long long l;\n    unsigned long long ul;\n\n    return ((sizeof(l) >= 8) && (sizeof(ul) >= 8)) ? 0 : 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-nullptr.cxx",
    "content": "int func(int)\n{\n    return 1;\n}\n\nint func(void *)\n{\n    return 0;\n}\n\nint main(void)\n{\n    void *v = nullptr;\n\n    if (v)\n        return 1;\n\n    return func(nullptr);\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-nullptr_fail_compile.cxx",
    "content": "int main(void)\n{\n    int i = nullptr;\n\n    return 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-rvalue_references.cxx",
    "content": "#include <cassert>\n\nclass rvmove {\npublic:\n   void *ptr;\n   char *array;\n\n   rvmove()\n    : ptr(0),\n    array(new char[10])\n   {\n     ptr = this;\n   }\n\n   rvmove(rvmove &&other)\n    : ptr(other.ptr),\n    array(other.array)\n   {\n    other.array = 0;\n    other.ptr = 0;\n   }\n\n   ~rvmove()\n   {\n    assert(((ptr != 0) && (array != 0)) || ((ptr == 0) && (array == 0)));\n    delete[] array;\n   }\n\n   rvmove &operator=(rvmove &&other)\n   {\n     delete[] array;\n     ptr = other.ptr;\n     array = other.array;\n     other.array = 0;\n     other.ptr = 0;\n     return *this;\n   }\n\n   static rvmove create()\n   {\n     return rvmove();\n   }\nprivate:\n  rvmove(const rvmove &);\n  rvmove &operator=(const rvmove &);\n};\n\nint main()\n{\n  rvmove mine;\n  if (mine.ptr != &mine)\n    return 1;\n  mine = rvmove::create();\n  if (mine.ptr == &mine)\n    return 1;\n  return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-sizeof_member.cxx",
    "content": "struct foo {\n    char bar;\n    int baz;\n};\n\nint main(void)\n{\n    bool ret = (\n        (sizeof(foo::bar) == 1) &&\n        (sizeof(foo::baz) >= sizeof(foo::bar)) &&\n        (sizeof(foo) >= sizeof(foo::bar) + sizeof(foo::baz))\n    );\n    return ret ? 0 : 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-static_assert.cxx",
    "content": "int main(void)\n{\n    static_assert(0 < 1, \"your ordering of integers is screwed\");\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-static_assert_fail_compile.cxx",
    "content": "int main(void)\n{\n    static_assert(1 < 0, \"your ordering of integers is screwed\");\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures/cxx11-variadic_templates.cxx",
    "content": "int Accumulate()\n{\n    return 0;\n}\n\ntemplate<typename T, typename... Ts>\nint Accumulate(T v, Ts... vs)\n{\n    return v + Accumulate(vs...);\n}\n\ntemplate<int... Is>\nint CountElements()\n{\n    return sizeof...(Is);\n}\n\nint main()\n{\n    int acc = Accumulate(1, 2, 3, 4, -5);\n    int count = CountElements<1,2,3,4,5>();\n    return ((acc == 5) && (count == 5)) ? 0 : 1;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindCXXFeatures.cmake",
    "content": "#.rst:\n# FindCXXFeatures\n# ---------------\n#\n# Check which features of the C++ standard the compiler supports\n#\n# When found it will set the following variables::\n#\n#  CXX11_COMPILER_FLAGS                      - the compiler flags needed to get C++11 features\n#\n#  CXXFeatures_auto_FOUND                    - auto keyword\n#  CXXFeatures_class_override_final_FOUND    - override and final keywords for classes and methods\n#  CXXFeatures_constexpr_FOUND               - constexpr keyword\n#  CXXFeatures_cstdint_header_FOUND          - cstdint header\n#  CXXFeatures_decltype_FOUND                - decltype keyword\n#  CXXFeatures_defaulted_functions_FOUND     - default keyword for functions\n#  CXXFeatures_delegating_constructors_FOUND - delegating constructors\n#  CXXFeatures_deleted_functions_FOUND       - delete keyword for functions\n#  CXXFeatures_func_identifier_FOUND         - __func__ preprocessor constant\n#  CXXFeatures_initializer_list_FOUND        - initializer list\n#  CXXFeatures_lambda_FOUND                  - lambdas\n#  CXXFeatures_long_long_FOUND               - long long signed & unsigned types\n#  CXXFeatures_nullptr_FOUND                 - nullptr\n#  CXXFeatures_rvalue_references_FOUND       - rvalue references\n#  CXXFeatures_sizeof_member_FOUND           - sizeof() non-static members\n#  CXXFeatures_static_assert_FOUND           - static_assert()\n#  CXXFeatures_variadic_templates_FOUND      - variadic templates\n\n#=============================================================================\n# Copyright 2011-2013 Rolf Eike Beer <eike@sf-mail.de>\n# Copyright 2012 Andreas Weis\n# Copyright 2013 Jan KundrÃ¡t\n#\n# Distributed under the OSI-approved BSD License (the \"License\");\n# see accompanying file Copyright.txt for details.\n#\n# This software is distributed WITHOUT ANY WARRANTY; without even the\n# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the License for more information.\n#=============================================================================\n# (To distribute this file outside of CMake, substitute the full\n#  License text for the above reference.)\n\nif (NOT CMAKE_CXX_COMPILER_LOADED)\n    message(FATAL_ERROR \"CXXFeatures modules only works if language CXX is enabled\")\nendif ()\n\n#\n### Check for needed compiler flags\n#\ninclude(CheckCXXCompilerFlag)\n\nfunction(test_set_flag FLAG NAME)\n    check_cxx_compiler_flag(\"${FLAG}\" _HAS_${NAME}_FLAG)\n    if (_HAS_${NAME}_FLAG)\n        set(CXX11_COMPILER_FLAGS \"${FLAG}\" PARENT_SCOPE)\n    endif ()\nendfunction()\n\nif (CMAKE_CXX_COMPILER_ID STREQUAL \"XL\")\n    test_set_flag(\"-qlanglvl=extended0x\" CXX0x)\nelseif (CMAKE_CXX_COMPILER_ID MATCHES \"(Borland|Watcom)\")\n    # No C++11 flag for those compilers, but check_cxx_compiler_flag()\n    # can't detect because they either will not always complain (Borland)\n    # or will hang (Watcom).\nelseif (CMAKE_CXX_COMPILER_ID STREQUAL \"Intel\" AND WIN32)\n    # The Intel compiler on Windows may use these flags.\n    test_set_flag(\"/Qstd=c++11\" CXX11)\n    if (NOT CXX11_COMPILER_FLAGS)\n        test_set_flag(\"/Qstd=c++0x\" CXX0x)\n    endif ()\nelse ()\n    test_set_flag(\"-std=c++11\" CXX11)\n    if (NOT CXX11_COMPILER_FLAGS)\n        test_set_flag(\"-std=c++0x\" CXX0x)\n    endif ()\nendif ()\n\nfunction(cxx_check_feature FEATURE_NAME)\n    set(RESULT_VAR \"CXXFeatures_${FEATURE_NAME}_FOUND\")\n    if (DEFINED ${RESULT_VAR})\n        return()\n    endif()\n\n    set(_bindir \"${CMAKE_CURRENT_BINARY_DIR}/cxx_${FEATURE_NAME}\")\n\n    set(_SRCFILE_BASE ${CMAKE_CURRENT_LIST_DIR}/FindCXXFeatures/cxx11-${FEATURE_NAME})\n    set(_LOG_NAME \"\\\"${FEATURE_NAME}\\\"\")\n    message(STATUS \"Checking C++ support for ${_LOG_NAME}\")\n\n    set(_SRCFILE \"${_SRCFILE_BASE}.cxx\")\n    set(_SRCFILE_FAIL_COMPILE \"${_SRCFILE_BASE}_fail_compile.cxx\")\n\n    try_compile(${RESULT_VAR} \"${_bindir}\" \"${_SRCFILE}\"\n                COMPILE_DEFINITIONS \"${CXX11_COMPILER_FLAGS}\"\n                OUTPUT_VARIABLE _SRCFILE_COMPILE_PASS_OUTPUT)\n\n    if (${RESULT_VAR} AND EXISTS ${_SRCFILE_FAIL_COMPILE})\n        try_compile(_TMP_RESULT \"${_bindir}_fail_compile\" \"${_SRCFILE_FAIL_COMPILE}\"\n                    COMPILE_DEFINITIONS \"${CXX11_COMPILER_FLAGS}\"\n                    OUTPUT_VARIABLE _SRCFILE_COMPILE_FAIL_OUTPUT)\n        if (_TMP_RESULT)\n            set(${RESULT_VAR} FALSE)\n        else ()\n            set(${RESULT_VAR} TRUE)\n        endif ()\n    endif ()\n\n    if (${RESULT_VAR})\n        message(STATUS \"Checking C++ support for ${_LOG_NAME}: works\")\n        file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log\n          \"Checking C++ support for ${_LOG_NAME} passed.\\n\"\n          \"Compile pass output:\\n${_SRCFILE_COMPILE_PASS_OUTPUT}\\n\"\n          \"Compile fail output:\\n${_SRCFILE_COMPILE_FAIL_OUTPUT}\\n\")\n    else ()\n        message(STATUS \"Checking C++ support for ${_LOG_NAME}: not supported\")\n        file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log\n          \"Checking C++ support for ${_LOG_NAME} failed.\\n\"\n          \"Compile pass output:\\n${_SRCFILE_COMPILE_PASS_OUTPUT}\\n\"\n          \"Compile fail output:\\n${_SRCFILE_COMPILE_FAIL_OUTPUT}\\n\")\n    endif ()\n    set(${RESULT_VAR} \"${${RESULT_VAR}}\" CACHE INTERNAL \"C++ support for ${_LOG_NAME}\")\nendfunction(cxx_check_feature)\n\nset(_CXX_ALL_FEATURES\n    auto\n    class_override_final\n    constexpr\n    cstdint_header\n    decltype\n    defaulted_functions\n    delegating_constructors\n    deleted_functions\n    func_identifier\n    initializer_list\n    lambda\n    long_long\n    nullptr\n    rvalue_references\n    sizeof_member\n    static_assert\n    variadic_templates\n)\n\nif (CXXFeatures_FIND_COMPONENTS)\n    foreach (_cxx_feature IN LISTS CXXFeatures_FIND_COMPONENTS)\n        list(FIND _CXX_ALL_FEATURES \"${_cxx_feature}\" _feature_index)\n        if (_feature_index EQUAL -1)\n            message(FATAL_ERROR \"Unknown component: '${_cxx_feature}'\")\n        endif ()\n    endforeach ()\n    unset(_feature_index)\nelse ()\n    set(CXXFEATURES_FIND_COMPONENTS ${_CXX_ALL_FEATURES})\nendif ()\n\nforeach (_cxx_feature IN LISTS CXXFEATURES_FIND_COMPONENTS)\n    cxx_check_feature(${_cxx_feature} ${FEATURE_NAME})\nendforeach (_cxx_feature)\n\ninclude(FindPackageHandleStandardArgs)\nset(DUMMY_VAR TRUE)\nfind_package_handle_standard_args(CXXFeatures REQUIRED_VARS DUMMY_VAR HANDLE_COMPONENTS)\nunset(DUMMY_VAR)\nunset(_CXX_ALL_FEATURES)\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindNumPy.cmake",
    "content": "# - Find the NumPy libraries\n# This module finds if NumPy is installed, and sets the following variables\n# indicating where it is.\n#\n# TODO: Update to provide the libraries and paths for linking npymath lib.\n#\n# NUMPY_FOUND - was NumPy found\n# NUMPY_VERSION - the version of NumPy found as a string\n# NUMPY_VERSION_MAJOR - the major version number of NumPy\n# NUMPY_VERSION_MINOR - the minor version number of NumPy\n# NUMPY_VERSION_PATCH - the patch version number of NumPy\n# NUMPY_VERSION_DECIMAL - e.g. version 1.6.1 is 10601\n# NUMPY_INCLUDE_DIRS - path to the NumPy include files\n\n#============================================================================\n# Copyright 2012 Continuum Analytics, Inc.\n#\n# MIT License\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files\n# (the \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to permit\n# persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n# OTHER DEALINGS IN THE SOFTWARE.\n#\n#============================================================================\n\n# Finding NumPy involves calling the Python interpreter\nif(NumPy_FIND_REQUIRED)\nfind_package(PythonInterp REQUIRED)\nelse()\nfind_package(PythonInterp)\nendif()\n\nif(NOT PYTHONINTERP_FOUND)\nset(NUMPY_FOUND FALSE)\nreturn()\nendif()\n\nexecute_process(COMMAND \"${PYTHON_EXECUTABLE}\" \"-c\"\n\"import numpy as n; print(n.__version__); print(n.get_include());\"\nRESULT_VARIABLE _NUMPY_SEARCH_SUCCESS\nOUTPUT_VARIABLE _NUMPY_VALUES_OUTPUT\nERROR_VARIABLE _NUMPY_ERROR_VALUE\nOUTPUT_STRIP_TRAILING_WHITESPACE)\n\nif(NOT _NUMPY_SEARCH_SUCCESS MATCHES 0)\nif(NumPy_FIND_REQUIRED)\nmessage(FATAL_ERROR\n\"NumPy import failure:\\n${_NUMPY_ERROR_VALUE}\")\nendif()\nset(NUMPY_FOUND FALSE)\nreturn()\nendif()\n\n# Convert the process output into a list\nstring(REGEX REPLACE \";\" \"\\\\\\\\;\" _NUMPY_VALUES ${_NUMPY_VALUES_OUTPUT})\nstring(REGEX REPLACE \"\\n\" \";\" _NUMPY_VALUES ${_NUMPY_VALUES})\n# Just in case there is unexpected output from the Python command.\nlist(GET _NUMPY_VALUES -2 NUMPY_VERSION)\nlist(GET _NUMPY_VALUES -1 NUMPY_INCLUDE_DIRS)\n\nstring(REGEX MATCH \"^[0-9]+\\\\.[0-9]+\\\\.[0-9]+\" _VER_CHECK \"${NUMPY_VERSION}\")\nif(\"${_VER_CHECK}\" STREQUAL \"\")\n# The output from Python was unexpected. Raise an error always\n# here, because we found NumPy, but it appears to be corrupted somehow.\nmessage(FATAL_ERROR\n\"Requested version and include path from NumPy, got instead:\\n${_NUMPY_VALUES_OUTPUT}\\n\")\nreturn()\nendif()\n\n# Make sure all directory separators are '/'\nstring(REGEX REPLACE \"\\\\\\\\\" \"/\" NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIRS})\n\n# Get the major and minor version numbers\nstring(REGEX REPLACE \"\\\\.\" \";\" _NUMPY_VERSION_LIST ${NUMPY_VERSION})\nlist(GET _NUMPY_VERSION_LIST 0 NUMPY_VERSION_MAJOR)\nlist(GET _NUMPY_VERSION_LIST 1 NUMPY_VERSION_MINOR)\nlist(GET _NUMPY_VERSION_LIST 2 NUMPY_VERSION_PATCH)\nstring(REGEX MATCH \"[0-9]*\" NUMPY_VERSION_PATCH ${NUMPY_VERSION_PATCH})\nmath(EXPR NUMPY_VERSION_DECIMAL\n\"(${NUMPY_VERSION_MAJOR} * 10000) + (${NUMPY_VERSION_MINOR} * 100) + ${NUMPY_VERSION_PATCH}\")\n\nfind_package_message(NUMPY\n\"Found NumPy: version \\\"${NUMPY_VERSION}\\\" ${NUMPY_INCLUDE_DIRS}\"\n\"${NUMPY_INCLUDE_DIRS}${NUMPY_VERSION}\")\n\nset(NUMPY_FOUND TRUE)\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/FindValgrind.cmake",
    "content": "# Find Valgrind.\n#\n# This module defines:\n#  VALGRIND_INCLUDE_DIR, where to find valgrind/memcheck.h, etc.\n#  VALGRIND_PROGRAM, the valgrind executable.\n#  VALGRIND_FOUND, If false, do not try to use valgrind.\n#\n# If you have valgrind installed in a non-standard place, you can define\n# VALGRIND_PREFIX to tell cmake where it is.\n#\n# NOTE: Copied from the opencog project, where it is distributed under the\n#       terms of the New BSD License.\n\nmessage(STATUS \"Valgrind Prefix: ${VALGRIND_PREFIX}\")\n\nfind_path(VALGRIND_INCLUDE_DIR memcheck.h\n  /usr/include /usr/include/valgrind /usr/local/include \n  /usr/local/include/valgrind\n  ${VALGRIND_PREFIX}/include ${VALGRIND_PREFIX}/include/valgrind)\nfind_program(VALGRIND_PROGRAM NAMES valgrind PATH \n  /usr/bin /usr/local/bin ${VALGRIND_PREFIX}/bin)\n\nfind_package_handle_standard_args(VALGRIND DEFAULT_MSG\n    VALGRIND_INCLUDE_DIR\n    VALGRIND_PROGRAM)\n\nmark_as_advanced(VALGRIND_INCLUDE_DIR VALGRIND_PROGRAM)\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/GetGitRevisionDescription.cmake",
    "content": "# - Returns a version string from Git\n#\n# These functions force a re-configure on each git commit so that you can\n# trust the values of the variables in your build system.\n#\n# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])\n#\n# Returns the refspec and sha hash of the current head revision\n#\n# git_describe(<var> [<additional arguments to git describe> ...])\n#\n# Returns the results of git describe on the source tree, and adjusting\n# the output so that it tests false if an error occurs.\n#\n# git_get_exact_tag(<var> [<additional arguments to git describe> ...])\n#\n# Returns the results of git describe --exact-match on the source tree,\n# and adjusting the output so that it tests false if there was no exact\n# matching tag.\n#\n# Requires CMake 2.6 or newer (uses the 'function' command)\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nif(__get_git_revision_description)\nreturn()\nendif()\nset(__get_git_revision_description YES)\n\n# We must run the following at \"include\" time, not at function call time,\n# to find the path to this module rather than the path to a calling list file\nget_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)\n\nfunction(get_git_head_revision _refspecvar _hashvar)\nset(GIT_PARENT_DIR \"${CMAKE_SOURCE_DIR}\")\nset(GIT_DIR \"${GIT_PARENT_DIR}/.git\")\nwhile(NOT EXISTS \"${GIT_DIR}\")\t# .git dir not found, search parent directories\nset(GIT_PREVIOUS_PARENT \"${GIT_PARENT_DIR}\")\nget_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)\nif(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)\n# We have reached the root directory, we are not in git\nset(${_refspecvar} \"GITDIR-NOTFOUND\" PARENT_SCOPE)\nset(${_hashvar} \"GITDIR-NOTFOUND\" PARENT_SCOPE)\nreturn()\nendif()\nset(GIT_DIR \"${GIT_PARENT_DIR}/.git\")\nendwhile()\nset(GIT_DATA \"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data\")\nif(NOT EXISTS \"${GIT_DATA}\")\nfile(MAKE_DIRECTORY \"${GIT_DATA}\")\nendif()\n\nif(NOT EXISTS \"${GIT_DIR}/HEAD\")\nreturn()\nendif()\nset(HEAD_FILE \"${GIT_DATA}/HEAD\")\nconfigure_file(\"${GIT_DIR}/HEAD\" \"${HEAD_FILE}\" COPYONLY)\n\nconfigure_file(\"${_gitdescmoddir}/GetGitRevisionDescription.cmake.in\"\n\"${GIT_DATA}/grabRef.cmake\"\n@ONLY)\ninclude(\"${GIT_DATA}/grabRef.cmake\")\n\nset(${_refspecvar} \"${HEAD_REF}\" PARENT_SCOPE)\nset(${_hashvar} \"${HEAD_HASH}\" PARENT_SCOPE)\nendfunction()\n\nfunction(git_describe _var)\nif(NOT GIT_FOUND)\nfind_package(Git QUIET)\nendif()\nget_git_head_revision(refspec hash)\nif(NOT GIT_FOUND)\nset(${_var} \"GIT-NOTFOUND\" PARENT_SCOPE)\nreturn()\nendif()\nif(NOT hash)\nset(${_var} \"HEAD-HASH-NOTFOUND\" PARENT_SCOPE)\nreturn()\nendif()\n\n# TODO sanitize\n#if((${ARGN}\" MATCHES \"&&\") OR\n# (ARGN MATCHES \"||\") OR\n# (ARGN MATCHES \"\\\\;\"))\n# message(\"Please report the following error to the project!\")\n# message(FATAL_ERROR \"Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}\")\n#endif()\n\n#message(STATUS \"Arguments to execute_process: ${ARGN}\")\n\nexecute_process(COMMAND\n\"${GIT_EXECUTABLE}\"\ndescribe\n${hash}\n${ARGN}\nWORKING_DIRECTORY\n\"${CMAKE_SOURCE_DIR}\"\nRESULT_VARIABLE\nres\nOUTPUT_VARIABLE\nout\nERROR_QUIET\nOUTPUT_STRIP_TRAILING_WHITESPACE)\nif(NOT res EQUAL 0)\nset(out \"${out}-${res}-NOTFOUND\")\nendif()\n\nset(${_var} \"${out}\" PARENT_SCOPE)\nendfunction()\n\nfunction(git_get_exact_tag _var)\ngit_describe(out --exact-match ${ARGN})\nset(${_var} \"${out}\" PARENT_SCOPE)\nendfunction()\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/GetGitRevisionDescription.cmake.in",
    "content": "#\n# Internal file for GetGitRevisionDescription.cmake\n#\n# Requires CMake 2.6 or newer (uses the 'function' command)\n#\n# Original Author:\n# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>\n# http://academic.cleardefinition.com\n# Iowa State University HCI Graduate Program/VRAC\n#\n# Copyright Iowa State University 2009-2010.\n# Distributed under the Boost Software License, Version 1.0.\n# (See accompanying file LICENSE_1_0.txt or copy at\n# http://www.boost.org/LICENSE_1_0.txt)\n\nset(HEAD_HASH)\n\nfile(READ \"@HEAD_FILE@\" HEAD_CONTENTS LIMIT 1024)\n\nstring(STRIP \"${HEAD_CONTENTS}\" HEAD_CONTENTS)\nif(HEAD_CONTENTS MATCHES \"ref\")\n# named branch\nstring(REPLACE \"ref: \" \"\" HEAD_REF \"${HEAD_CONTENTS}\")\nif(EXISTS \"@GIT_DIR@/${HEAD_REF}\")\nconfigure_file(\"@GIT_DIR@/${HEAD_REF}\" \"@GIT_DATA@/head-ref\" COPYONLY)\nelseif(EXISTS \"@GIT_DIR@/logs/${HEAD_REF}\")\nconfigure_file(\"@GIT_DIR@/logs/${HEAD_REF}\" \"@GIT_DATA@/head-ref\" COPYONLY)\nset(HEAD_HASH \"${HEAD_REF}\")\nendif()\nelse()\n# detached HEAD\nconfigure_file(\"@GIT_DIR@/HEAD\" \"@GIT_DATA@/head-ref\" COPYONLY)\nendif()\n\nif(NOT HEAD_HASH)\nfile(READ \"@GIT_DATA@/head-ref\" HEAD_HASH LIMIT 1024)\nstring(STRIP \"${HEAD_HASH}\" HEAD_HASH)\nendif()\n"
  },
  {
    "path": "src/madness/external/elemental/external/cmake/language_support_v2.cmake",
    "content": "# cmake/modules/language_support.cmake\n#\n# Temporary additional general language support is contained within this\n# file.  \n\n# This additional function definition is needed to provide a workaround for\n# CMake bug 9220.\n\n# On debian testing (cmake 2.6.2), I get return code zero when calling \n# cmake the first time, but cmake crashes when running a second time\n# as follows:\n#\n#  -- The Fortran compiler identification is unknown\n#  CMake Error at /usr/share/cmake-2.6/Modules/CMakeFortranInformation.cmake:7 (GET_FILENAME_COMPONENT):\n#    get_filename_component called with incorrect number of arguments\n#  Call Stack (most recent call first):\n#    CMakeLists.txt:3 (enable_language)\n#\n# My workaround is to invoke cmake twice.  If both return codes are zero, \n# it is safe to invoke ENABLE_LANGUAGE(Fortran OPTIONAL)\n\nfunction(workaround_9220 language language_works)\n  set(text\n    \"project(test NONE)\ncmake_minimum_required(VERSION 2.6.0)\nset(CMAKE_${language}_COMPILER ${CMAKE_${language}_COMPILER})\nenable_language(${language} OPTIONAL)\n\"\n    )\n  file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/language_tests/${language})\n  file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language})\n  file(WRITE ${CMAKE_BINARY_DIR}/language_tests/${language}/CMakeLists.txt\n    ${text})\n  execute_process(\n    COMMAND ${CMAKE_COMMAND} .\n    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language}\n    RESULT_VARIABLE return_code\n    OUTPUT_QUIET\n    ERROR_QUIET\n    )\n\n  if(return_code EQUAL 0)\n    # Second run\n    execute_process (\n      COMMAND ${CMAKE_COMMAND} .\n      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language}\n      RESULT_VARIABLE return_code\n      OUTPUT_QUIET\n      ERROR_QUIET\n      )\n    if(return_code EQUAL 0)\n      set(${language_works} ON PARENT_SCOPE)\n    else(return_code EQUAL 0)\n      set(${language_works} OFF PARENT_SCOPE)\n    endif(return_code EQUAL 0)\n  else(return_code EQUAL 0)\n    set(${language_works} OFF PARENT_SCOPE)\n  endif(return_code EQUAL 0)\nendfunction(workaround_9220)\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/CMakeLists.txt",
    "content": "#\n#  Copyright (c) 2009-2013, Jack Poulson\n#                     2013, Jed Brown \n#  All rights reserved.\n#\n#  This file is part of Elemental and is under the BSD 2-Clause License, \n#  which can be found in the LICENSE file in the root directory, or at \n#  http://opensource.org/licenses/BSD-2-Clause\n#\n\noption(HAVE_SPINLOCKS \"Enable if pthread lib supports spinlocks\" OFF)\nMARK_AS_ADVANCED(HAVE_SPINLOCKS)\n\nset(CMAKE_REQUIRED_FLAGS \"${MPI_C_COMPILE_FLAGS} ${MPI_C_LINK_FLAGS}\")\nset(CMAKE_REQUIRED_INCLUDES ${MPI_C_INCLUDE_PATH})\nset(CMAKE_REQUIRED_LIBRARIES ${MPI_C_LIBRARIES})\ncheck_function_exists(MPI_Query_thread HAVE_MPI_QUERY_THREAD)\nif(NOT HAVE_MPI_QUERY_THREAD)\n  message(FATAL_ERROR \"Do not have MPI_Query_thread, so cannot build PMRRR\")\nendif()\n\n# Add in the preprocessor definitions and fortran name-mangling\nadd_definitions(${ELEM_BLAS_DEFS} ${ELEM_LAPACK_DEFS})\nif(NOT HAVE_SPINLOCKS)\n  add_definitions(-DNOSPINLOCKS=1)\nendif()\n\n# Ensure that an MPI C compiler was found\nif(NOT MPI_C_FOUND)\n  message(FATAL_ERROR \"No MPI C compiler was found, so PMRRR cannot be built\")\nendif()\ninclude_directories(${MPI_C_INCLUDE_PATH})\n    \nset(CMAKE_C_FLAGS_${UPPER_BUILD_TYPE} \"${C_BASE_FLAGS} ${C_FLAGS}\")\n\n# Look for a PTHREADS library unless one was already specified\nif(NOT CMAKE_THREAD_LIBS_INIT)\n  set(CMAKE_THREAD_PREFER_PTHREAD ON)\n  find_package(Threads)\n  if(NOT CMAKE_USE_PTHREADS_INIT)\n    message(WARNING \"Could not find a pthreads library, cannot build PMRRR\")\n    return()\n  endif()\nendif()\n\n# Grab all of the .c and .h files\nfile(GLOB_RECURSE PMRRR_C RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} \"*.c\")\nfile(GLOB_RECURSE PMRRR_H RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} \"*.h\")\nset(PMRRR_SRC \"${PMRRR_C};${PMRRR_H}\")\n\n# Define the main library and its link libraries\nadd_library(pmrrr ${LIBRARY_TYPE} ${PMRRR_SRC})\ntarget_link_libraries(pmrrr \n  ${MPI_C_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIBS})\ninstall(TARGETS pmrrr EXPORT madness\n    COMPONENT elemental\n    LIBRARY DESTINATION \"${MADNESS_INSTALL_LIBDIR}\"\n    ARCHIVE DESTINATION \"${MADNESS_INSTALL_LIBDIR}\"\n    INCLUDES DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}/madness/external/\")\n\nset(CMAKE_THREAD_LIBS_INIT ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE)\n\n# Define the header-preparation rules\nset(PREPARED_HEADERS)\nforeach(HEADER ${PMRRR_H})\n  add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${HEADER}\n    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}\n            ${CMAKE_CURRENT_BINARY_DIR}/${HEADER}\n    DEPENDS \"${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}\")\n  list(APPEND PREPARED_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/${HEADER})\n\n  get_filename_component(HEADER_PATH ${HEADER} PATH)\n  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HEADER} \n      DESTINATION \"${MADNESS_INSTALL_INCLUDEDIR}/madness/external/\"\n      COMPONENT elemental)\nendforeach()\nadd_custom_target(prepare_pmrrr_headers DEPENDS ${PREPARED_HEADERS})\nadd_dependencies(pmrrr prepare_pmrrr_headers)\n\n# Make sure that the PMRRR headers can be found\ninclude_directories(\"${CMAKE_CURRENT_BINARY_DIR}/include\")\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/LICENSE",
    "content": "Copyright (c) 2010, RWTH Aachen University\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or \nwithout modification, are permitted provided that the following\nconditions are met:\n  * Redistributions of source code must retain the above \n    copyright notice, this list of conditions and the following\n    disclaimer.\n  * Redistributions in binary form must reproduce the above \n    copyright notice, this list of conditions and the following \n    disclaimer in the documentation and/or other materials \n    provided with the distribution.\n  * Neither the name of the RWTH Aachen University nor the\n    names of its contributors may be used to endorse or promote \n    products derived from this software without specific prior \n    written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \nFOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \nAACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \nUSE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \nOF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \nSUCH DAMAGE.\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/README",
    "content": "These files provide the routine 'pmrrr'. Its purpose is to compute all \nor a subset of eigenvalues and optionally eigenvectors of a symmetric \ntridiagonal matrix. 'pmrrr' is based on the algorithm of Multiple \nRelatively Robust Representations (MRRR). The routine thereby targets \nhybrid architectures consisting of multiple SMP nodes. It also runs in \nfully distributed mode, with each node having only one processor, and \nfully SMP mode, in which case no message passing is required. The \nimplementation is based on LAPACK's routine 'dstemr'.\n\n\nUsing libmrrr.a:\n----------------\nThe folder EXAMPLES contains examples of how to use the routine \n'pmrrr' in C and Fortran code. Edit the 'Makefile' in these folders if \nyou do not use the GNU compilers and run 'make' to compile the \nexamples.\n\nIn general, the code that calls 'pmrrr' needs to be linked to the \nlibrary 'libpmrrr.a', which is created in the LIB folder. \nAdditionally, it has to be linked to the libraries on which it \ndepends (see example files).\n\nBelow are given the C and Fortran prototypes of the function 'pmrrr'.\nFor more information please see 'INCLUDE/pmrrr.h'.\n\n\n######################################################################\n# C function prototype:                                              #\n###################################################################### \n# int pmrrr(char *jobz, char *range, int *n, double  *D,             #\n#           double *E, double *vl, double *vu, int *il, int *iu,     #\n#           int *tryrac, MPI_Comm comm, int *nz, int *offset,        #\n#           double *W, double *Z, int *ldz, int *Zsupp);             #\n#                                                                    #\n# Arguments:                                                         #\n# ----------                                                         #\n#                                                                    #\n# INPUTS:                                                            #\n# -------                                                            #\n# jobz              \"N\" or \"n\" - compute only eigenvalues            #\n#                   \"V\" or \"v\" - compute also eigenvectors           #\n#                   \"C\" or \"c\" - count the maximal number of         #\n#                                locally computed eigenvectors       #\n# range             \"A\" or \"a\" - all                                 #\n#                   \"V\" or \"v\" - by interval: (VL,VU]                #\n#                   \"I\" or \"i\" - by index:     IL-IU                 #\n# n                 matrix size                                      #\n# ldz               must be set on input to the leading dimension    #\n#                   of of eigenvector matrix Z; this is often equal  #\n#                   to matrix size n (not changed on output)         #\n#                                                                    #\n# INPUT + OUTPUT:                                                    #\n# ---------------                                                    #\n# D (double[n])     Diagonal elements of tridiagonal T.              #\n#                   (On output the array will be overwritten).       #\n# E (double[n])     Off-diagonal elements of tridiagonal T.          #\n#                   First n-1 elements contain off-diagonals,        #\n#                   the last element can have an abitrary value.     #\n#                   (On output the array will be overwritten.)       #\n# vl                If range=\"V\", lower bound of interval            #\n#                   (vl,vu], on output refined.                      #\n#                   If range=\"A\" or \"I\" not referenced as input.     #\n#                   On output the interval (vl,vu] contains ALL      #\n#                   the computed eigenvalues.                        #\n# vu                If range=\"V\", upper bound of interval            #\n#                   (vl,vu], on output refined.                      #\n#                   If range=\"A\" or \"I\" not referenced as input.     #\n#                   On output the interval (vl,vu] contains ALL      #\n#                   the computed eigenvalues.                        #\n# il                If range=\"I\", lower index (1-based indexing) of  #\n#                   the subset 'il' to 'iu'.                         #\n#                   If range=\"A\" or \"V\" not referenced as input.     #\n#                   On output the eigenvalues with index il to iu    #\n#                   are computed by ALL processes.                   #\n# iu                If range=\"I\", upper index (1-based indexing) of  #\n#                   the subset 'il' to 'iu'.                         #\n#                   If range=\"A\" or \"V\" not referenced as input.     #\n#                   On output the eigenvalues with index il to iu    # \n#                   are computed by ALL processes.                   #\n# tryrac            0 - do not try to achieve high relative accuracy.#\n#                   1 - relative accuracy will be attempted;         #\n#                       on output it is set to zero if high relative #\n#                       accuracy is not achieved.                    #\n# comm              MPI communicator; commonly: MPI_COMM_WORLD.      #\n#                                                                    #\n# OUTPUT:                                                            #\n# -------                                                            #\n# nz                Number of eigenvalues and eigenvectors computed  #\n#                   locally.                                         #\n#                   If jobz=\"C\", 'nz' will be set to the maximal     #\n#                   number of locally computed eigenvectors such     #\n#                   that double[n*nz] will provide enough memory     #\n#                   for the local eigenvectors;  this is only        #\n#                   important in case of range=\"V\" since             #\n#                   '#eigenpairs' are not known in advance           #\n# offset            Index, relative to the computed eigenvalues, of  #\n#                   the smallest eigenvalue computed locally         #\n#                   (0-based indexing).                              #\n# W (double[n])     Locally computed eigenvalues;                    #\n#                   The first nz entries contain the eigenvalues     #\n#                   computed locally; the first entry contains the   #\n#                   'offset + 1'-th eigenvalue computed and the      #\n#                   'offset + il'-th eigenvalue of the input matrix  #\n#                   (1-based indexing in both cases).                #\n#                   In some situations it is desirable to have all   #\n#                   computed eigenvalues in W, instead of only       #\n#                   those computed locally. In this case the         #\n#                   routine 'PMR_comm_eigvals' can be called right   #\n#                   after 'pmrrr' returns (see below).               #\n# Z                 Locally computed eigenvectors.                   #\n# (double[n*nz])    Enough space must be provided to store the       #\n#                   vectors. 'nz' should be bigger or equal          #\n#                   to ceil('#eigenpairs'/'#processes'), where       #\n#                   '#eigenpairs' is 'n' in case of range=\"A\" and    #\n#                  'iu-il+1' in case of range=\"I\". Alternatively,    #\n#                   and for range=\"V\" 'nz' can be obtained           #\n#                   by running the routine with jobz=\"C\".            #\n# Zsupp             Support of eigenvectors, which is given by       #\n# (double[2*n])     Z[2*i] to Z[2*i+1] for the i-th eigenvector      #\n#                   stored locally (1-based indexing in both         #\n#                   cases).                                          #\n#                                                                    #\n# RETURN VALUE:                                                      #\n# -------------                                                      #\n#                 0 - success                                        #\n#                 1 - wrong input parameter                          #\n#                 2 - misc errors                                    #\n#                                                                    #\n######################################################################\n\n######################################################################\n# Fortran prototype:                                                 #\n######################################################################\n# PMRRR(JOBZ, RANGE, N, D, E, VL, VU, IL, IU, TRYRAC,                #\n#       MPI_COMM, NZ, OFFSET, W, Z, LDZ, ZSUPP, INFO)                #\n#                                                                    #\n# CHARACTER        JOBZ, RANGE                                       #\n# INTEGER          N, IL, IU, TRYRAC, MPI_COMM, NZ, OFFSET, LDZ,     # \n#                  ZSUPP(*), INFO                                    #\n# DOUBLE PRECISION D(*), D(*), VL, VU, W(*), Z(*,*)                  #\n######################################################################\n\n\nThe function is called by every process of the MPI communicator \nspecified as an argument. Each process is assumed to have the diagonal \nand sub-diagonal of the symmetric tridiagonal input matrix. It is \nthereby important that MPI is always initialized by \n'MPI_Init_thread' (as opposed to 'MPI_Init'!). If multithreading is \ndesired, the thread level support MPI_THREAD_MULTIPLE has to be \nrequested in 'MPI_Init_thread'. If no multithreading is used, the \nthread support 'MPI_THREAD_SINGLE' can be requested. Notice that \nmultithreading is disabled if the implementation of the MPI library \ndoes not support MPI_THREAD_MULTIPLE.\nThe number of threads created in each process can be specified via the \nenvironment variable PMR_NUM_THREADS. In case this variable is not \ndefined, then the routine will create as many threads as specified by \nthe variable DEFAULT_NUM_THREADS (which is set in 'pmrrr.h'). \nNote: Do not forget to tell mpiexec/mpirun about the environment \nvariable PMR_NUM_THREADS if you use it. This is typically done via the \noption '-env' or '-x'.\n\n\nSome additinal comments:\n------------------------\n\nCOMMUNICATING COMPUTED EIGENVALUES:\nUpon completion of routine 'pmrrr', each process has a subset of the \neigenvalues, stored in the array W (see 'pmrrr.h'). In some situations\nit is desirable to let all processes have all the computed eigenvalues. \nTo this end, an additional routine 'PMR_comm_eigvals' is provided. It \ncan be called right after 'pmrrr' returned. Upon completion, each \nprocess has all the computed eigenvalues, stored in W.\nThe C and Fortran prototypes of the function 'PMR_comm_eigvals' are \ngiven below. For more information please see 'pmrrr.h'.\n\n######################################################################\n# C function prototype:                                              #\n###################################################################### \n# int PMR_comm_eigvals(MPI_Comm comm, int *nz, int *offset,          # \n#                      double *W);                                   #\n######################################################################\n\n######################################################################\n# Fortran prototype:                                                 #\n######################################################################\n# PMR_COMM_EIGVALS(MPI_COMM, NZ, OFFSET, W, INFO)                    #\n#                                                                    #\n# INTEGER          MPI_COMM, NZ, OFFSET, INFO                        #\n# DOUBLE PRECISION W(*)                                              #\n######################################################################\n\n\nCOMMENTS AND BUGS:\npetschow@aices.rwth-aachen.de\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/include/counter.h",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#ifndef CCOUNTER_H\n#define CCOUNTER_H\n\n#include <pthread.h>\n#include \"global.h\"\n\ntypedef struct {\n  int             value;\n#ifdef NOSPINLOCKS\n  pthread_mutex_t    lock;\n#else\n  pthread_spinlock_t lock;\n#endif\n} counter_t;\n\ncounter_t *PMR_create_counter(int init_value);\nint PMR_get_counter_value(counter_t *counter);\nint PMR_set_counter_value(counter_t *counter, int value);\nint PMR_decrement_counter(counter_t *counter, int amount);\nint PMR_increment_counter(counter_t *counter, int amount);\nvoid PMR_destroy_counter(counter_t *counter);\n\n#endif\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/include/global.h",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#ifndef GGLOBAL_H\n#define GGLOBAL_H\n\n#ifdef __STDC__\n /* Some version of Standard C */\n#if defined (__STDC_VERSION__) && __STDC_VERSION__>=199901L\n /* C99 */\n\n#include <stdbool.h>\n/* #pragma STDC FP_CONTRACT ON|OFF|DEFAULT */\n\n#else\n /* C89 with or without Amendment 1, see H&S p.53 */\n\n#define restrict /*nothing*/\n#define inline   /*nothing*/\n\n#define fmax(a,b) ( (a) > (b) ? (a) : (b) )\n#define fmin(a,b) ( (a) < (b) ? (a) : (b) )\n\ntypedef int    bool;\n#define false  0\n#define true   1\n\n#endif\n#else  /* __STDC__ not defined */\n /* Not Standard C */\n\n#define inline /*nothing*/\n\n /* in case compiler does not support type qualifiers\n  * see Harbison and Steele p. 89*/\n#define const /*nothing*/\n#define volatile /*nothing*/\n#define restrict /*nothing*/\n\n#define fmax(a,b) ( (a) > (b) ? (a) : (b) )\n#define fmin(a,b) ( (a) < (b) ? (a) : (b) )\n\ntypedef int    bool;\n#define false  0\n#define true   1\n \n /* need also remove all // style comments */\n /* inline ... */\n\n#endif\n/* see H&S p.70 to include C++ in the list above */\n\n/* max/min/ceil for integers */\n#define imax(a,b) ( (a) > (b) ? (a) : (b) )\n#define imin(a,b) ( (a) < (b) ? (a) : (b) )\n#define iceil(a,b) ( (((a)%(b))!=0) ? (((a)/(b))+1) : ((a)/(b)) )\n\n/* End of header file */\n#endif\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/include/plarre.h",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#ifndef PPLARRE_H\n#define PPLARRE_H\n\n#include \"global.h\"\n#include \"structs.h\"\n\n/*\n * Computing the eigenvalues and of a symmetric tridiagonal matrix \n * by bisection implemented in LAPACK routines 'dlarrd' and 'dlarrb'.\n *\n * Note: this implementation is here is not really optimized in\n * terms of performance and memory usage.\n */\nint plarre(proc_t *procinfo, char *jobz, char *range, in_t *Dstruct, \n\t       val_t *Wstruct, tol_t *tolstruct, int *nzp, int *offsetp);\n\n/* Perturb the initial root representation by \"1 + eps*RAND_FACTOR*rand\"; \n * default: 8.0 */ \n#define RAND_FACTOR         8.0 \n\n/* Fudge of shift, to get root rrr; default: 2.0 */\n#define FUDGE_FACTOR        2.0 \n\n#endif\n\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/include/plarrv.h",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#ifndef PPLARRV_H\n#define PPLARRV_H\n\n#include \"global.h\"\n#include \"structs.h\"\n\n/*\n * Computation of eigenvectors of a symmetric tridiagonal\n */\nint plarrv(proc_t *procinfo, in_t *Dstruct, val_t *Wstruct,\n\t   vec_t *Zstruct, tol_t *tolstruct, int *nzp,\n\t   int *myfirstp);\n\n#define COMM_COMPLETE        0\n#define COMM_INCOMPLETE      1\n#define C_TASK_PROCESSED     0\n#define C_TASK_NOT_PROCESSED 1\n\n#endif\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/include/pmrrr.h",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#ifndef PPMRRR_H\n#define PPMRRR_H\n\n#include \"mpi.h\"\n#include \"global.h\"\n\n/* Parallel computation of all or a subset of eigenvalues and \n * optionally eigenvectors of a symmetric tridiagonal matrix based on \n * the algorithm of Multiple Relatively Robust Representations (MRRR). \n * The routine targets hybrid architectures consisting of multiple SMP \n * nodes. It also runs in fully distributed mode, with each node \n * having only one processor, and fully SMP mode, in which case no \n * message passing is required. The implementation is based on \n * LAPACK's routine 'dstemr'.\n *\n * Function prototype: */\n\nint pmrrr(char *jobz, char *range, int *n, double  *D,\n\t  double *E, double *vl, double *vu, int *il, int *iu,\n\t  int *tryrac, MPI_Comm comm, int *nz, int *offset,\n\t  double *W, double *Z, int *ldz, int *Zsupp);\n\n/* Arguments:\n * ----------\n *\n * INPUTS: \n * -------\n * jobz              \"N\" or \"n\" - compute only eigenvalues\n *                   \"V\" or \"v\" - compute also eigenvectors\n *                   \"C\" or \"c\" - count the maximal number of \n *                                locally computed eigenvectors\n * range             \"A\" or \"a\" - all\n *                   \"V\" or \"v\" - by interval: (VL,VU]\n *                   \"I\" or \"i\" - by index:     IL-IU\n * n                 matrix size\n * ldz               must be set on input to the leading dimension \n *                   of of eigenvector matrix Z; this is often equal \n *                   to matrix size n (not changed on output)\n *\n * INPUT + OUTPUT: \n * ---------------\n * D (double[n])     Diagonal elements of tridiagonal T.\n *                   (On output the array will be overwritten).\n * E (double[n])     Off-diagonal elements of tridiagonal T.\n *                   First n-1 elements contain off-diagonals,\n *                   the last element can have an abitrary value. \n *                   (On output the array will be overwritten.)\n * vl                If range=\"V\", lower bound of interval\n *                   (vl,vu], on output refined.\n *                   If range=\"A\" or \"I\" not referenced as input.\n *                   On output the interval (vl,vu] contains ALL\n *                   the computed eigenvalues.\n * vu                If range=\"V\", upper bound of interval\n *                   (vl,vu], on output refined.\n *                   If range=\"A\" or \"I\" not referenced as input.\n *                   On output the interval (vl,vu] contains ALL\n *                   the computed eigenvalues.\n * il                If range=\"I\", lower index (1-based indexing) of \n *                   the subset 'il' to 'iu'.\n *                   If range=\"A\" or \"V\" not referenced as input.\n *                   On output the eigenvalues with index il to iu are \n *                   computed by ALL processes.\n * iu                If range=\"I\", upper index (1-based indexing) of \n *                   the subset 'il' to 'iu'.\n *                   If range=\"A\" or \"V\" not referenced as input.\n *                   On output the eigenvalues with index il to iu are \n *                   computed by ALL processes.\n * tryrac            0 - do not try to achieve high relative accuracy.\n *                   NOTE: this should be the default in context of  \n *                         dense eigenproblems.\n *                   1 - relative accuracy will be attempted; \n *                       on output it is set to zero if high relative \n *                       accuracy is not achieved.\n * comm              MPI communicator; commonly: MPI_COMM_WORLD.\n *\n * OUTPUT: \n * -------\n * nz                Number of eigenvalues and eigenvectors computed \n *                   locally.\n *                   If jobz=\"C\", 'nz' will be set to the maximal\n *                   number of locally computed eigenvectors such \n *                   that double[n*nz] will provide enough memory \n *                   for the local eigenvectors;  this is only \n *                   important in case of range=\"V\" since \n *                   '#eigenpairs' are not known in advance\n * offset            Index, relative to the computed eigenvalues, of \n *                   the smallest eigenvalue computed locally\n *                   (0-based indexing).\n * W (double[n])     Locally computed eigenvalues;\n *                   The first nz entries contain the eigenvalues \n *                   computed locally; the first entry contains the \n *                   'offset + 1'-th computed eigenvalue, which is the \n *                   'offset + il'-th eigenvalue of the input matrix \n *                   (1-based indexing in both cases).\n *                   In some situations it is desirable to have all \n *                   computed eigenvalues in W, instead of only \n *                   those computed locally. In this case, call \n *                   routine 'PMR_comm_eigvals' after \n *                   'pmrrr' returns (see example and interface below).\n * Z                 Locally computed eigenvectors.\n * (double[n*nz])    Enough space must be provided to store the\n *                   vectors. 'nz' should be bigger or equal \n *                   to ceil('#eigenpairs'/'#processes'), where \n *                   '#eigenpairs' is 'n' in case of range=\"A\" and\n *                   'iu-il+1' in case of range=\"I\". Alternatively, \n *                   and for range=\"V\" 'nz' can be obtained \n *                   by running the routine with jobz=\"C\". \n * Zsupp             Support of eigenvectors, which is given by\n * (double[2*n])     i1=Zsupp[2*i] to i2=Zsupp[2*i+1] for the i-th local eigenvector\n *                   (returns 1-based indexing; e.g. in C Z[i1-1:i2-1] are non-zero and\n *                   in Fotran Z(i1:i2) are non-zero).\n *\n * RETURN VALUE: \n * -------------\n *                 0 - success  \n *                 1 - wrong input parameter\n *                 2 - misc errors  \n *\n * The Fortran interface takes an additinal integer argument INFO\n * to retrieve the return value. \n * An example call in Fortran looks therefore like\n *\n * CALL PMRRR('V', 'A', N, D, E, VL, VU, IL, IU, TRYRAC, \n *            MPI_COMM_WORLD, NZ, MYFIRST, W, Z, LDZ, ZSUPP, INFO)\n *\n *\n * EXAMPLE CALL: \n * -------------\n * char    *jobz, *range;\n * int     n, il, iu, tryRAC=0, nz, offset, ldz, *Zsupp;\n * double  *D, *E, *W, *Z, vl, vu;\n *\n * // allocate space for D, E, W, Z\n * // initialize D, E\n * // set jobz, range, ldz, and if necessary, il, iu or vl, vu  \n * \n * info = pmrrr(jobz, range, &n, D, E, &vl, &vu, &il, &iu,\n *              &tryRAC, MPI_COMM_WORLD, &nz, &myfirst, W,\n *\t        Z, &ldz , Zsupp);\n *\n * // optional: \n * PMR_comm_eigvals(MPI_COMM_WORLD, &nz, &myfirst, W);\n *\n */\n\n\n\n/* Set the number of threads in case PMR_NUM_THREADS is not \n * specified */\n#define DEFAULT_NUM_THREADS 1\n\n/* Call LAPACK's dstemr in every process to compute all desiered \n * eigenpairs redundantly (and discard the once that would usually \n * not be computed by the process) if n < DSTEMR_IF_SMALLER; \n * default: 4 */ \n#define DSTEMR_IF_SMALLER   4\n\n/* Make sure that eigenpairs are sorted globally; if set to false\n * they are in most cases sorted, but it is not double checked and \n * can therefore not be guaranteed; default: true */\n#define ASSERT_SORTED_EIGENPAIRS false\n\n/* Set flag if Rayleigh Quotient Correction should be used, \n * which is usually faster; default: true */\n#define TRY_RQC          true\n\n/* Maximum numver of iterations of inverse iteration;\n * default: 10 */\n#define MAXITER            10\n\n/* Set the min. relative gap for an eigenvalue to be considered \n * well separated, that is a singleton; this is a very important \n * parameter of the computation; default: 10e-3 */\n#define MIN_RELGAP       1e-3\n\n/* Set the maximal allowed element growth for being accepted as \n * an RRR, that is if max. pivot < MAX_GROWTH * 'spectral diameter'\n * the RRR is accepted; default: 64.0 */\n#define MAX_GROWTH         64.0\n\n/* Set how many iterations should be executed to find the root \n * representation; default: 6 */\n#define MAX_TRY_RRR       10\n\n\n\n/*\n * Routine to communicate eigenvalues such that every process has\n * all computed eigenvalues (iu-il+1) in W; this routine is designed \n * to be called right after 'pmrrr'.\n */\nint PMR_comm_eigvals(MPI_Comm comm, int *nz, int *ifirst, double *W);\n/* Arguments:\n * ----------\n *\n * INPUTS: \n * -------\n * comm              MPI communicator; commonly: MPI_COMM_WORLD.\n * nz                Number of eigenvalues local in W as returned \n *                   from 'pmrrr'.\n * offset            Index, relative to the computed eigenvalues, of \n *                   the smallest eigenvalue computed locally\n *                   (0-based indexing).\n *\n * INPUT + OUTPUT: \n * ---------------\n * W (double[n])     Eigenvalues. \n *                   On input the first nz elements of W contain \n *                   the eigenvalues computed locally.\n *                   On output the first 'iu-il+1' of W contain \n *                   all computed eigenvalues.\n *\n * The Fortran interface takes an additinal integer argument INFO \n * to retrieve the return value. \n * An example call in Fortran looks therefore like\n *\n * CALL PMR_COMM_EIGVALS(MPI_COMM_WORLD, NZ, OFFSET, W, INFO)\n *\n */\n\n\n/* LAPACK and BLAS function prototypes\n * Note: type specifier 'extern' does not matter in declaration\n * so here used to mark routines from LAPACK and BLAS libraries */\nextern void pmrrr_dscal(int*, double*, double*, int*);\n\nextern double odnst(char*, int*, double*, double*);\nextern void   odrrr(int*, double*, double*, int*);\nextern void   odrra(int*, double*, double*, double*, double*, \n\t\t    double*, int*, int*, int*);\nextern void   odrrc(char*, int*, double*, double*, double*, double*,\n\t\t    double*, int*, int*, int*, int*);\nextern void   odrrd(char*, char*, int*, double*, double*, int*, \n\t\t    int*, double*, double*, double*, double*, \n\t\t    double*, double*, int*, int*, int*, double*, \n\t\t    double*, double*, double*, int*, int*, double*, \n\t\t    int*, int*);\nextern void   odrrb(int*, double*, double*, int*, int*, double*,\n\t\t    double*, int*, double*, double*, double*, double*,\n\t\t    int*, double*, double*, int*, int*);\nextern void   odrrk(int*, int*, double*, double*, double*, double*,\n\t\t    double*, double*, double*, double*, int*);\nextern void   odebz(int*, int*, int*, int*, int*, int*, double*, \n\t\t    double*, double*, double*, double*, double*,\n\t\t    int*, double*, double*, int*, int*, double*,\n\t\t    int*, int*);\nextern void   odrnv(int*, int*, int*, double*);\nextern void   odrrf(int*, double*, double*, double*, int*, int*, \n\t\t    double*, double*, double*, double*, double*, \n\t\t    double*, double*, double*, double*, double*, \n\t\t    double*, int*);\nextern void   odr1v(int*, int*, int*, double*, double*, double*, \n\t\t    double*, double*, double*, double*, double*, \n\t\t    bool*, int*, double*, double*, int*, int*, \n\t\t    double*, double*, double*, double*);\nextern void   odrrj(int*, double*, double*, int*, int*, double*, \n\t\t    int*, double*, double*, double*, int*, double*, \n\t\t    double*, int*);\nextern void   odstmr(char*, char*, int*, double*, double*, double*, \n\t\t     double*, int*, int*, int*, double*, double*, \n\t\t     int*, int*, int*, int*, double*, int*, int*, \n\t\t     int*, int*);\n\n#endif /* End of header file */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/include/process_task.h",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#ifndef PPROCESS_TASK_H\n#define PPROCESS_TASK_H\n\n#include \"global.h\"\n#include \"structs.h\"\n#include \"tasks.h\"\n#include \"counter.h\"\n#include \"queue.h\"\n\n/* Function prototypes */\nint PMR_process_c_task(cluster_t *cl, int tid, proc_t *procinfo,\n\t\t       val_t *Wstruct, vec_t *Zstruct, \n\t\t       tol_t *tolstruct, workQ_t *workQ, \n\t\t       counter_t *num_left, double *work, int *iwork);\n\nint PMR_process_s_task(singleton_t *sng, int tid, proc_t *procinfo,\n\t\t       val_t *Wstruct, vec_t *Zstruct, \n\t\t       tol_t *tolstruct, counter_t *num_left, \n\t\t       double *work, int *iwork);\n\nint PMR_process_r_task(refine_t *rf, proc_t *procinfo, val_t *Wstruct,\n\t\t       tol_t *tolstruct, double *work, int *iwork);\n\nvoid PMR_process_r_queue(int tid, proc_t *procinfo, val_t *Wstruct,\n\t\t\t vec_t *Zstruct, tol_t *tolstruct,\n\t\t\t workQ_t *workQ, \n\t\t\t counter_t *num_left, double *work, \n\t\t\t int *iwork);\n\n#endif /* End of header file */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/include/queue.h",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#ifndef QQUEUE_H\n#define QQUEUE_H\n\n#include <pthread.h>\n#include \"global.h\"\n\ntypedef struct task_aux task_t;\nstruct task_aux {\n  void       *data;       /* ptr to data, has to be casted */\n  int         flag;       /* flag specifying the task */\n  task_t     *next;       /* ptr to next  task; NULL if non-existing; */\n  task_t     *prev;       /* ptr to prev. task; NULL if non-existing; */\n};\n\ntypedef struct {\n  int                num_tasks;\n  task_t            *head;\n  task_t            *back;\n#ifdef NOSPINLOCKS\n  pthread_mutex_t    lock;\n#else\n  pthread_spinlock_t lock;\n#endif\n} queue_t;\n\n\n/* functionality of the queue */\nqueue_t *PMR_create_empty_queue  (void);\nint     PMR_insert_task_at_front (queue_t *queue, task_t *task);\nint     PMR_insert_task_at_back  (queue_t *queue, task_t *task);\ntask_t  *PMR_remove_task_at_front(queue_t *queue);\ntask_t  *PMR_remove_task_at_back (queue_t *queue);\nint     PMR_get_num_tasks(queue_t *queue);\nvoid    PMR_destroy_queue(queue_t *queue);\n\n#endif\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/include/rrr.h",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#ifndef RRR_H\n#define RRR_H\n\n#include <pthread.h>\n#include \"global.h\"\n\ntypedef struct {\n  double          *restrict D;\n  double          *restrict L;\n  double          *restrict DL;\n  double          *restrict DLL;\n  int             size;\n  int             depth;\n  bool            parent_processed;\n  bool            copied_parent_rrr;\n  int             ndepend;\n  pthread_mutex_t mutex;\n} rrr_t;\n\n\nrrr_t *PMR_create_rrr(double *restrict D, double *restrict L,\n\t\t      double *restrict DL, double *restrict DLL,\n\t\t      int size, int depth);\n\nrrr_t *PMR_reset_rrr (rrr_t *restrict RRR, double *restrict D,\n\t\t      double *restrict L, double *restrict DL,\n\t\t      double *restrict DLL, int size, int depth);\n\nint  PMR_increment_rrr_dependencies(rrr_t *RRR);\nint  PMR_set_parent_processed_flag (rrr_t *RRR);\nint  PMR_set_copied_parent_rrr_flag(rrr_t *RRR, bool val);\nint  PMR_try_destroy_rrr(rrr_t *RRR);\n\n#endif\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/include/structs.h",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#ifndef SSTRUCTS_H\n#define SSTRUCTS_H\n\n#include \"mpi.h\"\n#include \"global.h\"\n#include \"counter.h\"\n#include \"queue.h\"\n\ntypedef struct {\n  int              n;\n  double *restrict D;\n  double *restrict E;\n  int              nsplit;\n  int    *restrict isplit ;\n  double           spdiam;\n} in_t;\n\ntypedef struct {\n  int              n;\n  double           *vl;\n  double           *vu;\n  int              *il;\n  int              *iu;\n  double *restrict W;\n  double *restrict Werr;\n  double *restrict Wgap;\n  int    *restrict Windex;\n  int    *restrict iblock;\n  int    *restrict iproc;\n  double *restrict Wshifted;\n  double *restrict gersch;\n} val_t;\n\ntypedef struct {\n  int              ldz;\n  int              nz;\n  double *restrict Z;\n  int    *restrict Zsupp;\n  int    *restrict Zindex;\n} vec_t;\n\ntypedef struct {\n  int      pid;\n  int      nproc;\n  MPI_Comm comm;\n  int      nthreads;\n  int      thread_support;\n} proc_t;\n\ntypedef struct {\n  double split;\n  double rtol1;\n  double rtol2;\n  double pivmin;\n} tol_t;\n\ntypedef struct {\n  int         num_messages;\n  MPI_Request *requests;\n  MPI_Status  *stats;\n} comm_t;\n\ntypedef struct {\n  queue_t *r_queue;\n  queue_t *s_queue;\n  queue_t *c_queue;\n} workQ_t;\n\ntypedef struct {\n  double lambda;\n  int    local_ind;\n  int    block_ind;\n  int    ind;\n} sort_struct_t;\n\ntypedef struct {\n  int    n;\n  double *D;\n  double *E;\n  double *E2;\n  int    il;\n  int    iu;\n  int    my_il;\n  int    my_iu;\n  int    nsplit;\n  int    *isplit;\n  double bsrtol;\n  double pivmin;\n  double *gersch;\n  double *W;\n  double *Werr;\n  int    *Windex;\n  int    *iblock;\n} auxarg1_t;\n\ntypedef struct {\n  int          bl_size;\n  double       *D;\n  double       *DE2;\n  int          rf_begin;\n  int          rf_end;\n  double        *W;\n  double        *Werr;\n  double        *Wgap;\n  int            *Windex;\n  double       rtol1;\n  double       rtol2;\n  double       pivmin;\n  double       bl_spdiam;\n} auxarg2_t;\n\ntypedef struct {\n  int          tid;\n  proc_t       *procinfo;\n  val_t        *Wstruct;\n  vec_t        *Zstruct;\n  tol_t        *tolstruct;\n  workQ_t      *workQ;\n  counter_t    *num_left;\n} auxarg3_t;\n\n#endif\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/include/tasks.h",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#ifndef TTASKS_H\n#define TTASKS_H\n\n#include <semaphore.h>\n#include \"global.h\"\n#include \"queue.h\"\n#include \"rrr.h\"\n#include \"structs.h\"\n\n#define SINGLETON_TASK_FLAG  0\n#define CLUSTER_TASK_FLAG    1\n#define REFINE_TASK_FLAG     2\n\ntypedef struct {\n  int        begin;\n  int        end;\n  int        depth;\n  int        bl_begin;\n  int        bl_end;\n  double     bl_spdiam;\n  double     lgap;\n  rrr_t      *RRR;\n} singleton_t;\n\ntypedef struct {\n  int        begin;\n  int        end;\n  int        depth;\n  int        bl_begin;   /* In priciple not needed since info */\n  int        bl_end;     /* also contained in iblock+isplit */\n  double     bl_spdiam;\n  double     lgap;\n  int        proc_W_begin;\n  int        proc_W_end;\n  int        left_pid;\n  int        right_pid;\n  rrr_t      *RRR;\n  bool       wait_until_refined;\n  comm_t     *messages;\n} cluster_t;\n\n\ntypedef struct {\n  int        begin;\n  int        end;\n  double     *D;\n  double     *DLL;\n  int        p;\n  int        q;\n  int        bl_size;\n  double     bl_spdiam;\n  int        producer_tid; // not longer needed\n  sem_t      *sem; /* since semt_t is a handle could also store it\n\t\t      instead of pointer to it, but pointer is all\n                      that is needed */\n} refine_t;\n\n\ntask_t *PMR_create_s_task(int first, int last, int depth,\n\t\t\t  int bl_begin, int bl_end, double spdiam,\n\t\t\t  double lgap, rrr_t *RRR);\n\ntask_t *PMR_create_c_task(int first, int last, int depth,\n\t\t\t  int bl_begin, int bl_end, double spdiam,\n\t\t\t  double lgap, int proc_W_begin, \n\t\t\t  int proc_W_end, int left_pid, int right_pid, \n\t\t\t  rrr_t *RRR);\n\ntask_t *PMR_create_r_task(int begin, int end, double *D,\n\t\t\t  double *DLL, int p, int q, int bl_size,\n\t\t\t  double bl_spdiam, int tid, sem_t *sem);\n\n#endif\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/blas/LICENSE",
    "content": "Copyright (c) 1992-2009 The University of Tennessee.  All rights reserved.\n\n$COPYRIGHT$\n\nAdditional copyrights may follow\n\n$HEADER$\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n- Redistributions of source code must retain the above copyright\n  notice, this list of conditions and the following disclaimer. \n  \n- Redistributions in binary form must reproduce the above copyright\n  notice, this list of conditions and the following disclaimer listed\n  in this license in the documentation and/or other materials\n  provided with the distribution.\n  \n- Neither the name of the copyright holders nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n  \nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT  \nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  \n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \n\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/blas/odcpy.c",
    "content": "/* odcpy.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odcpy(int *n, double *dx, int *incx, double *dy, int *incy)\n{\n    /* System generated locals */\n    int i__1;\n\n    /* Local variables */\n    int i__, m, ix, iy, mp1;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*     copies a vector, x, to a vector, y. */\n/*     uses unrolled loops for increments equal to one. */\n/*     jack dongarra, linpack, 3/11/78. */\n/*     modified 12/3/93, array(1) declarations changed to array(*) */\n\n\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n    /* Parameter adjustments */\n    --dy;\n    --dx;\n\n    /* Function Body */\n    if (*n <= 0) {\n\treturn 0;\n    }\n    if (*incx == 1 && *incy == 1) {\n\tgoto L20;\n    }\n\n/*        code for unequal increments or equal increments */\n/*          not equal to 1 */\n\n    ix = 1;\n    iy = 1;\n    if (*incx < 0) {\n\tix = (-(*n) + 1) * *incx + 1;\n    }\n    if (*incy < 0) {\n\tiy = (-(*n) + 1) * *incy + 1;\n    }\n    i__1 = *n;\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\tdy[iy] = dx[ix];\n\tix += *incx;\n\tiy += *incy;\n/* L10: */\n    }\n    return 0;\n\n/*        code for both increments equal to 1 */\n\n\n/*        clean-up loop */\n\nL20:\n    m = *n % 7;\n    if (m == 0) {\n\tgoto L40;\n    }\n    i__1 = m;\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\tdy[i__] = dx[i__];\n/* L30: */\n    }\n    if (*n < 7) {\n\treturn 0;\n    }\nL40:\n    mp1 = m + 1;\n    i__1 = *n;\n    for (i__ = mp1; i__ <= i__1; i__ += 7) {\n\tdy[i__] = dx[i__];\n\tdy[i__ + 1] = dx[i__ + 1];\n\tdy[i__ + 2] = dx[i__ + 2];\n\tdy[i__ + 3] = dx[i__ + 3];\n\tdy[i__ + 4] = dx[i__ + 4];\n\tdy[i__ + 5] = dx[i__ + 5];\n\tdy[i__ + 6] = dx[i__ + 6];\n/* L50: */\n    }\n    return 0;\n} \n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/blas/odscal.c",
    "content": "/* dscal.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odscal(int *n, double *da, double *dx, int *incx)\n{\n    /* System generated locals */\n    int i__1, i__2;\n\n    /* Local variables */\n    int i__, m, mp1, nincx;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n/* * */\n/*     scales a vector by a constant. */\n/*     uses unrolled loops for increment equal to one. */\n/*     jack dongarra, linpack, 3/11/78. */\n/*     modified 3/93 to return if incx .le. 0. */\n/*     modified 12/3/93, array(1) declarations changed to array(*) */\n\n\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n    /* Parameter adjustments */\n    --dx;\n\n    /* Function Body */\n    if (*n <= 0 || *incx <= 0) {\n\treturn 0;\n    }\n    if (*incx == 1) {\n\tgoto L20;\n    }\n\n/*        code for increment not equal to 1 */\n\n    nincx = *n * *incx;\n    i__1 = nincx;\n    i__2 = *incx;\n    for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {\n\tdx[i__] = *da * dx[i__];\n/* L10: */\n    }\n    return 0;\n\n/*        code for increment equal to 1 */\n\n\n/*        clean-up loop */\n\nL20:\n    m = *n % 5;\n    if (m == 0) {\n\tgoto L40;\n    }\n    i__2 = m;\n    for (i__ = 1; i__ <= i__2; ++i__) {\n\tdx[i__] = *da * dx[i__];\n/* L30: */\n    }\n    if (*n < 5) {\n\treturn 0;\n    }\nL40:\n    mp1 = m + 1;\n    i__2 = *n;\n    for (i__ = mp1; i__ <= i__2; i__ += 5) {\n\tdx[i__] = *da * dx[i__];\n\tdx[i__ + 1] = *da * dx[i__ + 1];\n\tdx[i__ + 2] = *da * dx[i__ + 2];\n\tdx[i__ + 3] = *da * dx[i__ + 3];\n\tdx[i__ + 4] = *da * dx[i__ + 4];\n/* L50: */\n    }\n    return 0;\n} \n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/blas/odswap.c",
    "content": "/* dswap.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odswap(int *n, double *dx, int *incx, double *dy, int *incy)\n{\n    /* System generated locals */\n    int i__1;\n\n    /* Local variables */\n    int i__, m, ix, iy, mp1;\n    double dtemp;\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*     interchanges two vectors. */\n/*     uses unrolled loops for increments equal one. */\n/*     jack dongarra, linpack, 3/11/78. */\n/*     modified 12/3/93, array(1) declarations changed to array(*) */\n\n\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n    /* Parameter adjustments */\n    --dy;\n    --dx;\n\n    /* Function Body */\n    if (*n <= 0) {\n\treturn 0;\n    }\n    if (*incx == 1 && *incy == 1) {\n\tgoto L20;\n    }\n\n/*       code for unequal increments or equal increments not equal */\n/*         to 1 */\n\n    ix = 1;\n    iy = 1;\n    if (*incx < 0) {\n\tix = (-(*n) + 1) * *incx + 1;\n    }\n    if (*incy < 0) {\n\tiy = (-(*n) + 1) * *incy + 1;\n    }\n    i__1 = *n;\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\tdtemp = dx[ix];\n\tdx[ix] = dy[iy];\n\tdy[iy] = dtemp;\n\tix += *incx;\n\tiy += *incy;\n/* L10: */\n    }\n    return 0;\n\n/*       code for both increments equal to 1 */\n\n\n/*       clean-up loop */\n\nL20:\n    m = *n % 3;\n    if (m == 0) {\n\tgoto L40;\n    }\n    i__1 = m;\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\tdtemp = dx[i__];\n\tdx[i__] = dy[i__];\n\tdy[i__] = dtemp;\n/* L30: */\n    }\n    if (*n < 3) {\n\treturn 0;\n    }\nL40:\n    mp1 = m + 1;\n    i__1 = *n;\n    for (i__ = mp1; i__ <= i__1; i__ += 3) {\n\tdtemp = dx[i__];\n\tdx[i__] = dy[i__];\n\tdy[i__] = dtemp;\n\tdtemp = dx[i__ + 1];\n\tdx[i__ + 1] = dy[i__ + 1];\n\tdy[i__ + 1] = dtemp;\n\tdtemp = dx[i__ + 2];\n\tdx[i__ + 2] = dy[i__ + 2];\n\tdy[i__ + 2] = dtemp;\n/* L50: */\n    }\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/counter.c",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#include <stdlib.h>\n#include <pthread.h>\n#include <assert.h>\n#include \"global.h\"\n#include \"counter.h\"\n\n\n\ncounter_t *PMR_create_counter(int init_value)\n{\n  int info;\n  counter_t *counter;\n\n  counter = (counter_t *) malloc( sizeof(counter_t) );\n  \n  counter->value = init_value;\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_init(&counter->lock, NULL);\n#else\n  info = pthread_spin_init(&counter->lock, PTHREAD_PROCESS_PRIVATE);\n#endif\n  assert(info == 0);\n  \n  return(counter);\n}\n\n\n\nvoid PMR_destroy_counter(counter_t *counter)\n{\n#ifdef NOSPINLOCKS\n  pthread_mutex_destroy(&counter->lock);\n#else\n  pthread_spin_destroy(&counter->lock);\n#endif\n  free(counter);\n}\n\n\n\nint PMR_get_counter_value(counter_t *counter)\n{\n  int value, info;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_lock(&counter->lock);\n#else\n  info = pthread_spin_lock(&counter->lock);\n#endif\n  assert(info == 0);\n\n  value = counter->value;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_unlock(&counter->lock);\n#else\n  info = pthread_spin_unlock(&counter->lock);\n#endif\n  assert(info == 0);\n\n  return(value);\n}\n\n\n\ninline int PMR_set_counter_value(counter_t *counter, int value)\n{\n  int info;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_lock(&counter->lock);\n#else\n  info = pthread_spin_lock(&counter->lock);\n#endif\n  assert(info == 0);\n\n  counter->value = value;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_unlock(&counter->lock);\n#else\n  info = pthread_spin_unlock(&counter->lock);\n#endif\n  assert(info == 0);\n  \n  return(value);\n}\n\n\n\nint PMR_decrement_counter(counter_t *counter, int amount)\n{\n  int value, info;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_lock(&counter->lock);\n#else\n  info = pthread_spin_lock(&counter->lock);\n#endif\n  assert(info == 0);\n\n  counter->value -= amount;\n  value = counter->value;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_unlock(&counter->lock);\n#else\n  info = pthread_spin_unlock(&counter->lock);\n#endif\n  assert(info == 0);\n\n  return(value);\n}\n\n\n\n\nint PMR_increment_counter(counter_t *counter, int amount)\n{\n  int value, info;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_lock(&counter->lock);\n#else\n  info = pthread_spin_lock(&counter->lock);\n#endif\n  assert(info == 0);\n\n  counter->value += amount;\n  value = counter->value;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_unlock(&counter->lock);\n#else\n  info = pthread_spin_unlock(&counter->lock);\n#endif\n  assert(info == 0);\n\n  return(value);\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/LICENSE",
    "content": "Copyright (c) 1992-2009 The University of Tennessee.  All rights reserved.\n\n$COPYRIGHT$\n\nAdditional copyrights may follow\n\n$HEADER$\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n- Redistributions of source code must retain the above copyright\n  notice, this list of conditions and the following disclaimer. \n  \n- Redistributions in binary form must reproduce the above copyright\n  notice, this list of conditions and the following disclaimer listed\n  in this license in the documentation and/or other materials\n  provided with the distribution.\n  \n- Neither the name of the copyright holders nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n  \nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT  \nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  \n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \n\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/ode2.c",
    "content": "/* dlae2.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint ode2(double *a, double *b, double *c__, double *rt1, double *rt2)\n{\n    /* System generated locals */\n    double d__1;\n\n    /* Builtin functions */\n    // double sqrt(double);\n\n    /* Local variables */\n    double ab, df, tb, sm, rt, adf, acmn, acmx;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODE2  computes the eigenvalues of a 2-by-2 symmetric matrix */\n/*     [  A   B  ] */\n/*     [  B   C  ]. */\n/*  On return, RT1 is the eigenvalue of larger absolute value, and RT2 */\n/*  is the eigenvalue of smaller absolute value. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  A       (input) DOUBLE PRECISION */\n/*          The (1,1) element of the 2-by-2 matrix. */\n\n/*  B       (input) DOUBLE PRECISION */\n/*          The (1,2) and (2,1) elements of the 2-by-2 matrix. */\n\n/*  C       (input) DOUBLE PRECISION */\n/*          The (2,2) element of the 2-by-2 matrix. */\n\n/*  RT1     (output) DOUBLE PRECISION */\n/*          The eigenvalue of larger absolute value. */\n\n/*  RT2     (output) DOUBLE PRECISION */\n/*          The eigenvalue of smaller absolute value. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  RT1 is accurate to a few ulps barring over/underflow. */\n\n/*  RT2 may be inaccurate if there is massive cancellation in the */\n/*  determinant A*C-B*B; higher precision or correctly rounded or */\n/*  correctly truncated arithmetic would be needed to compute RT2 */\n/*  accurately in all cases. */\n\n/*  Overflow is possible only if RT1 is within a factor of 5 of overflow. */\n/*  Underflow is harmless if the input data is 0 or exceeds */\n/*     underflow_threshold / macheps. */\n\n/* ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n/*     Compute the eigenvalues */\n\n    sm = *a + *c__;\n    df = *a - *c__;\n    adf = fabs(df);\n    tb = *b + *b;\n    ab = fabs(tb);\n    if (fabs(*a) > fabs(*c__)) {\n\tacmx = *a;\n\tacmn = *c__;\n    } else {\n\tacmx = *c__;\n\tacmn = *a;\n    }\n    if (adf > ab) {\n/* Computing 2nd power */\n\td__1 = ab / adf;\n\trt = adf * sqrt(d__1 * d__1 + 1.);\n    } else if (adf < ab) {\n/* Computing 2nd power */\n\td__1 = adf / ab;\n\trt = ab * sqrt(d__1 * d__1 + 1.);\n    } else {\n\n/*        Includes case AB=ADF=0 */\n\n\trt = ab * sqrt(2.);\n    }\n    if (sm < 0.) {\n\t*rt1 = (sm - rt) * .5;\n\n/*        Order of execution important. */\n/*        To get fully accurate smaller eigenvalue, */\n/*        next line needs to be executed in higher precision. */\n\n\t*rt2 = acmx / *rt1 * acmn - *b / *rt1 * *b;\n    } else if (sm > 0.) {\n\t*rt1 = (sm + rt) * .5;\n\n/*        Order of execution important. */\n/*        To get fully accurate smaller eigenvalue, */\n/*        next line needs to be executed in higher precision. */\n\n\t*rt2 = acmx / *rt1 * acmn - *b / *rt1 * *b;\n    } else {\n\n/*        Includes case RT1 = RT2 = 0 */\n\n\t*rt1 = rt * .5;\n\t*rt2 = rt * -.5;\n    }\n    return 0;\n\n/*     End of ODE2 */\n\n} /* ode2_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odebz.c",
    "content": "/* dlaebz.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n#define imax(a,b) ( (a) > (b) ? (a) : (b) )\n#define imin(a,b) ( (a) < (b) ? (a) : (b) )\n\n/* Subroutine */ \nint odebz(int *ijob, int *nitmax, int *n, \n\tint *mmax, int *minp, int *nbmin, double *abstol, \n\tdouble *reltol, double *pivmin, double *d__, double *\n\te, double *e2, int *nval, double *ab, double *c__, \n\tint *mout, int *nab, double *work, int *iwork, \n\tint *info)\n{\n    /* System generated locals */\n    int nab_dim1, nab_offset, ab_dim1, ab_offset, i__1, i__2, i__3, i__4, \n\t    i__5, i__6;\n    double d__1, d__2, d__3, d__4;\n\n    /* Local variables */\n    int j, kf, ji, kl, jp, jit;\n    double tmp1, tmp2;\n    int itmp1, itmp2, kfnew, klnew;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODEBZ contains the iteration loops which compute and use the */\n/*  function N(w), which is the count of eigenvalues of a symmetric */\n/*  tridiagonal matrix T less than or equal to its argument  w.  It */\n/*  performs a choice of two types of loops: */\n\n/*  IJOB=1, followed by */\n/*  IJOB=2: It takes as input a list of intervals and returns a list of */\n/*          sufficiently small intervals whose union contains the same */\n/*          eigenvalues as the union of the original intervals. */\n/*          The input intervals are (AB(j,1),AB(j,2)], j=1,...,MINP. */\n/*          The output interval (AB(j,1),AB(j,2)] will contain */\n/*          eigenvalues NAB(j,1)+1,...,NAB(j,2), where 1 <= j <= MOUT. */\n\n/*  IJOB=3: It performs a binary search in each input interval */\n/*          (AB(j,1),AB(j,2)] for a point  w(j)  such that */\n/*          N(w(j))=NVAL(j), and uses  C(j)  as the starting point of */\n/*          the search.  If such a w(j) is found, then on output */\n/*          AB(j,1)=AB(j,2)=w.  If no such w(j) is found, then on output */\n/*          (AB(j,1),AB(j,2)] will be a small interval containing the */\n/*          point where N(w) jumps through NVAL(j), unless that point */\n/*          lies outside the initial interval. */\n\n/*  Note that the intervals are in all cases half-open intervals, */\n/*  i.e., of the form  (a,b] , which includes  b  but not  a . */\n\n/*  To avoid underflow, the matrix should be scaled so that its largest */\n/*  element is no greater than  overflow**(1/2) * underflow**(1/4) */\n/*  in absolute value.  To assure the most accurate computation */\n/*  of small eigenvalues, the matrix should be scaled to be */\n/*  not much smaller than that, either. */\n\n/*  See W. Kahan \"Accurate Eigenvalues of a Symmetric Tridiagonal */\n/*  Matrix\", Report CS41, Computer Science Dept., Stanford */\n/*  University, July 21, 1966 */\n\n/*  Note: the arguments are, in general, *not* checked for unreasonable */\n/*  values. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  IJOB    (input) INT */\n/*          Specifies what is to be done: */\n/*          = 1:  Compute NAB for the initial intervals. */\n/*          = 2:  Perform bisection iteration to find eigenvalues of T. */\n/*          = 3:  Perform bisection iteration to invert N(w), i.e., */\n/*                to find a point which has a specified number of */\n/*                eigenvalues of T to its left. */\n/*          Other values will cause ODEBZ to return with INFO=-1. */\n\n/*  NITMAX  (input) INT */\n/*          The maximum number of \"levels\" of bisection to be */\n/*          performed, i.e., an interval of width W will not be made */\n/*          smaller than 2^(-NITMAX) * W.  If not all intervals */\n/*          have converged after NITMAX iterations, then INFO is set */\n/*          to the number of non-converged intervals. */\n\n/*  N       (input) INT */\n/*          The dimension n of the tridiagonal matrix T.  It must be at */\n/*          least 1. */\n\n/*  MMAX    (input) INT */\n/*          The maximum number of intervals.  If more than MMAX intervals */\n/*          are generated, then ODEBZ will quit with INFO=MMAX+1. */\n\n/*  MINP    (input) INT */\n/*          The initial number of intervals.  It may not be greater than */\n/*          MMAX. */\n\n/*  NBMIN   (input) INT */\n/*          The smallest number of intervals that should be processed */\n/*          using a vector loop.  If zero, then only the scalar loop */\n/*          will be used. */\n\n/*  ABSTOL  (input) DOUBLE PRECISION */\n/*          The minimum (absolute) width of an interval.  When an */\n/*          interval is narrower than ABSTOL, or than RELTOL times the */\n/*          larger (in magnitude) endpoint, then it is considered to be */\n/*          sufficiently small, i.e., converged.  This must be at least */\n/*          zero. */\n\n/*  RELTOL  (input) DOUBLE PRECISION */\n/*          The minimum relative width of an interval.  When an interval */\n/*          is narrower than ABSTOL, or than RELTOL times the larger (in */\n/*          magnitude) endpoint, then it is considered to be */\n/*          sufficiently small, i.e., converged.  Note: this should */\n/*          always be at least radix*machine epsilon. */\n\n/*  PIVMIN  (input) DOUBLE PRECISION */\n/*          The minimum absolute value of a \"pivot\" in the Sturm */\n/*          sequence loop.  This *must* be at least  max |e(j)**2| * */\n/*          safe_min  and at least safe_min, where safe_min is at least */\n/*          the smallest number that can divide one without overflow. */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The diagonal elements of the tridiagonal matrix T. */\n\n/*  E       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The offdiagonal elements of the tridiagonal matrix T in */\n/*          positions 1 through N-1.  E(N) is arbitrary. */\n\n/*  E2      (input) DOUBLE PRECISION array, dimension (N) */\n/*          The squares of the offdiagonal elements of the tridiagonal */\n/*          matrix T.  E2(N) is ignored. */\n\n/*  NVAL    (input/output) INT array, dimension (MINP) */\n/*          If IJOB=1 or 2, not referenced. */\n/*          If IJOB=3, the desired values of N(w).  The elements of NVAL */\n/*          will be reordered to correspond with the intervals in AB. */\n/*          Thus, NVAL(j) on output will not, in general be the same as */\n/*          NVAL(j) on input, but it will correspond with the interval */\n/*          (AB(j,1),AB(j,2)] on output. */\n\n/*  AB      (input/output) DOUBLE PRECISION array, dimension (MMAX,2) */\n/*          The endpoints of the intervals.  AB(j,1) is  a(j), the left */\n/*          endpoint of the j-th interval, and AB(j,2) is b(j), the */\n/*          right endpoint of the j-th interval.  The input intervals */\n/*          will, in general, be modified, split, and reordered by the */\n/*          calculation. */\n\n/*  C       (input/output) DOUBLE PRECISION array, dimension (MMAX) */\n/*          If IJOB=1, ignored. */\n/*          If IJOB=2, workspace. */\n/*          If IJOB=3, then on input C(j) should be initialized to the */\n/*          first search point in the binary search. */\n\n/*  MOUT    (output) INT */\n/*          If IJOB=1, the number of eigenvalues in the intervals. */\n/*          If IJOB=2 or 3, the number of intervals output. */\n/*          If IJOB=3, MOUT will equal MINP. */\n\n/*  NAB     (input/output) INT array, dimension (MMAX,2) */\n/*          If IJOB=1, then on output NAB(i,j) will be set to N(AB(i,j)). */\n/*          If IJOB=2, then on input, NAB(i,j) should be set.  It must */\n/*             satisfy the condition: */\n/*             N(AB(i,1)) <= NAB(i,1) <= NAB(i,2) <= N(AB(i,2)), */\n/*             which means that in interval i only eigenvalues */\n/*             NAB(i,1)+1,...,NAB(i,2) will be considered.  Usually, */\n/*             NAB(i,j)=N(AB(i,j)), from a previous call to ODEBZ with */\n/*             IJOB=1. */\n/*             On output, NAB(i,j) will contain */\n/*             max(na(k),min(nb(k),N(AB(i,j)))), where k is the index of */\n/*             the input interval that the output interval */\n/*             (AB(j,1),AB(j,2)] came from, and na(k) and nb(k) are the */\n/*             the input values of NAB(k,1) and NAB(k,2). */\n/*          If IJOB=3, then on output, NAB(i,j) contains N(AB(i,j)), */\n/*             unless N(w) > NVAL(i) for all search points  w , in which */\n/*             case NAB(i,1) will not be modified, i.e., the output */\n/*             value will be the same as the input value (modulo */\n/*             reorderings -- see NVAL and AB), or unless N(w) < NVAL(i) */\n/*             for all search points  w , in which case NAB(i,2) will */\n/*             not be modified.  Normally, NAB should be set to some */\n/*             distinctive value(s) before ODEBZ is called. */\n\n/*  WORK    (workspace) DOUBLE PRECISION array, dimension (MMAX) */\n/*          Workspace. */\n\n/*  IWORK   (workspace) INT array, dimension (MMAX) */\n/*          Workspace. */\n\n/*  INFO    (output) INT */\n/*          = 0:       All intervals converged. */\n/*          = 1--MMAX: The last INFO intervals did not converge. */\n/*          = MMAX+1:  More than MMAX intervals were generated. */\n\n/*  Further Details */\n/*  =============== */\n\n/*      This routine is intended to be called only by other LAPACK */\n/*  routines, thus the interface is less user-friendly.  It is intended */\n/*  for two purposes: */\n\n/*  (a) finding eigenvalues.  In this case, ODEBZ should have one or */\n/*      more initial intervals set up in AB, and ODEBZ should be called */\n/*      with IJOB=1.  This sets up NAB, and also counts the eigenvalues. */\n/*      Intervals with no eigenvalues would usually be thrown out at */\n/*      this point.  Also, if not all the eigenvalues in an interval i */\n/*      are desired, NAB(i,1) can be increased or NAB(i,2) decreased. */\n/*      For example, set NAB(i,1)=NAB(i,2)-1 to get the largest */\n/*      eigenvalue.  ODEBZ is then called with IJOB=2 and MMAX */\n/*      no smaller than the value of MOUT returned by the call with */\n/*      IJOB=1.  After this (IJOB=2) call, eigenvalues NAB(i,1)+1 */\n/*      through NAB(i,2) are approximately AB(i,1) (or AB(i,2)) to the */\n/*      tolerance specified by ABSTOL and RELTOL. */\n\n/*  (b) finding an interval (a',b'] containing eigenvalues w(f),...,w(l). */\n/*      In this case, start with a Gershgorin interval  (a,b).  Set up */\n/*      AB to contain 2 search intervals, both initially (a,b).  One */\n/*      NVAL element should contain  f-1  and the other should contain  l */\n/*      , while C should contain a and b, resp.  NAB(i,1) should be -1 */\n/*      and NAB(i,2) should be N+1, to flag an error if the desired */\n/*      interval does not lie in (a,b).  ODEBZ is then called with */\n/*      IJOB=3.  On exit, if w(f-1) < w(f), then one of the intervals -- */\n/*      j -- will have AB(j,1)=AB(j,2) and NAB(j,1)=NAB(j,2)=f-1, while */\n/*      if, to the specified tolerance, w(f-k)=...=w(f+r), k > 0 and r */\n/*      >= 0, then the interval will have  N(AB(j,1))=NAB(j,1)=f-k and */\n/*      N(AB(j,2))=NAB(j,2)=f+r.  The cases w(l) < w(l+1) and */\n/*      w(l-r)=...=w(l+k) are handled similarly. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n/*     Check for Errors */\n\n    /* Parameter adjustments */\n    nab_dim1 = *mmax;\n    nab_offset = 1 + nab_dim1;\n    nab -= nab_offset;\n    ab_dim1 = *mmax;\n    ab_offset = 1 + ab_dim1;\n    ab -= ab_offset;\n    --d__;\n    --e;\n    --e2;\n    --nval;\n    --c__;\n    --work;\n    --iwork;\n\n    /* Function Body */\n    *info = 0;\n    if (*ijob < 1 || *ijob > 3) {\n\t*info = -1;\n\treturn 0;\n    }\n\n/*     Initialize NAB */\n\n    if (*ijob == 1) {\n\n/*        Compute the number of eigenvalues in the initial intervals. */\n\n\t*mout = 0;\n\ti__1 = *minp;\n\tfor (ji = 1; ji <= i__1; ++ji) {\n\t    for (jp = 1; jp <= 2; ++jp) {\n\t\ttmp1 = d__[1] - ab[ji + jp * ab_dim1];\n\t\tif (fabs(tmp1) < *pivmin) {\n\t\t    tmp1 = -(*pivmin);\n\t\t}\n\t\tnab[ji + jp * nab_dim1] = 0;\n\t\tif (tmp1 <= 0.) {\n\t\t    nab[ji + jp * nab_dim1] = 1;\n\t\t}\n\n\t\ti__2 = *n;\n\t\tfor (j = 2; j <= i__2; ++j) {\n\t\t    tmp1 = d__[j] - e2[j - 1] / tmp1 - ab[ji + jp * ab_dim1];\n\t\t    if (fabs(tmp1) < *pivmin) {\n\t\t\ttmp1 = -(*pivmin);\n\t\t    }\n\t\t    if (tmp1 <= 0.) {\n\t\t\t++nab[ji + jp * nab_dim1];\n\t\t    }\n/* L10: */\n\t\t}\n/* L20: */\n\t    }\n\t    *mout = *mout + nab[ji + (nab_dim1 << 1)] - nab[ji + nab_dim1];\n/* L30: */\n\t}\n\treturn 0;\n    }\n\n/*     Initialize for loop */\n\n/*     KF and KL have the following meaning: */\n/*        Intervals 1,...,KF-1 have converged. */\n/*        Intervals KF,...,KL  still need to be refined. */\n\n    kf = 1;\n    kl = *minp;\n\n/*     If IJOB=2, initialize C. */\n/*     If IJOB=3, use the user-supplied starting point. */\n\n    if (*ijob == 2) {\n\ti__1 = *minp;\n\tfor (ji = 1; ji <= i__1; ++ji) {\n\t    c__[ji] = (ab[ji + ab_dim1] + ab[ji + (ab_dim1 << 1)]) * .5;\n/* L40: */\n\t}\n    }\n\n/*     Iteration loop */\n\n    i__1 = *nitmax;\n    for (jit = 1; jit <= i__1; ++jit) {\n\n/*        Loop over intervals */\n\n\tif (kl - kf + 1 >= *nbmin && *nbmin > 0) {\n\n/*           Begin of Parallel Version of the loop */\n\n\t    i__2 = kl;\n\t    for (ji = kf; ji <= i__2; ++ji) {\n\n/*              Compute N(c), the number of eigenvalues less than c */\n\n\t\twork[ji] = d__[1] - c__[ji];\n\t\tiwork[ji] = 0;\n\t\tif (work[ji] <= *pivmin) {\n\t\t    iwork[ji] = 1;\n/* Computing MIN */\n\t\t    d__1 = work[ji], d__2 = -(*pivmin);\n\t\t    work[ji] = fmin(d__1,d__2);\n\t\t}\n\n\t\ti__3 = *n;\n\t\tfor (j = 2; j <= i__3; ++j) {\n\t\t    work[ji] = d__[j] - e2[j - 1] / work[ji] - c__[ji];\n\t\t    if (work[ji] <= *pivmin) {\n\t\t\t++iwork[ji];\n/* Computing MIN */\n\t\t\td__1 = work[ji], d__2 = -(*pivmin);\n\t\t\twork[ji] = fmin(d__1,d__2);\n\t\t    }\n/* L50: */\n\t\t}\n/* L60: */\n\t    }\n\n\t    if (*ijob <= 2) {\n\n/*              IJOB=2: Choose all intervals containing eigenvalues. */\n\n\t\tklnew = kl;\n\t\ti__2 = kl;\n\t\tfor (ji = kf; ji <= i__2; ++ji) {\n\n/*                 Insure that N(w) is monotone */\n\n/* Computing MIN */\n/* Computing MAX */\n\t\t    i__5 = nab[ji + nab_dim1], i__6 = iwork[ji];\n\t\t    i__3 = nab[ji + (nab_dim1 << 1)], i__4 = imax(i__5,i__6);\n\t\t    iwork[ji] = imin(i__3,i__4);\n\n/*                 Update the Queue -- add intervals if both halves */\n/*                 contain eigenvalues. */\n\n\t\t    if (iwork[ji] == nab[ji + (nab_dim1 << 1)]) {\n\n/*                    No eigenvalue in the upper interval: */\n/*                    just use the lower interval. */\n\n\t\t\tab[ji + (ab_dim1 << 1)] = c__[ji];\n\n\t\t    } else if (iwork[ji] == nab[ji + nab_dim1]) {\n\n/*                    No eigenvalue in the lower interval: */\n/*                    just use the upper interval. */\n\n\t\t\tab[ji + ab_dim1] = c__[ji];\n\t\t    } else {\n\t\t\t++klnew;\n\t\t\tif (klnew <= *mmax) {\n\n/*                       Eigenvalue in both intervals -- add upper to */\n/*                       queue. */\n\n\t\t\t    ab[klnew + (ab_dim1 << 1)] = ab[ji + (ab_dim1 << \n\t\t\t\t    1)];\n\t\t\t    nab[klnew + (nab_dim1 << 1)] = nab[ji + (nab_dim1 \n\t\t\t\t    << 1)];\n\t\t\t    ab[klnew + ab_dim1] = c__[ji];\n\t\t\t    nab[klnew + nab_dim1] = iwork[ji];\n\t\t\t    ab[ji + (ab_dim1 << 1)] = c__[ji];\n\t\t\t    nab[ji + (nab_dim1 << 1)] = iwork[ji];\n\t\t\t} else {\n\t\t\t    *info = *mmax + 1;\n\t\t\t}\n\t\t    }\n/* L70: */\n\t\t}\n\t\tif (*info != 0) {\n\t\t    return 0;\n\t\t}\n\t\tkl = klnew;\n\t    } else {\n\n/*              IJOB=3: Binary search.  Keep only the interval containing */\n/*                      w   s.t. N(w) = NVAL */\n\n\t\ti__2 = kl;\n\t\tfor (ji = kf; ji <= i__2; ++ji) {\n\t\t    if (iwork[ji] <= nval[ji]) {\n\t\t\tab[ji + ab_dim1] = c__[ji];\n\t\t\tnab[ji + nab_dim1] = iwork[ji];\n\t\t    }\n\t\t    if (iwork[ji] >= nval[ji]) {\n\t\t\tab[ji + (ab_dim1 << 1)] = c__[ji];\n\t\t\tnab[ji + (nab_dim1 << 1)] = iwork[ji];\n\t\t    }\n/* L80: */\n\t\t}\n\t    }\n\n\t} else {\n\n/*           End of Parallel Version of the loop */\n\n/*           Begin of Serial Version of the loop */\n\n\t    klnew = kl;\n\t    i__2 = kl;\n\t    for (ji = kf; ji <= i__2; ++ji) {\n\n/*              Compute N(w), the number of eigenvalues less than w */\n\n\t\ttmp1 = c__[ji];\n\t\ttmp2 = d__[1] - tmp1;\n\t\titmp1 = 0;\n\t\tif (tmp2 <= *pivmin) {\n\t\t    itmp1 = 1;\n/* Computing MIN */\n\t\t    d__1 = tmp2, d__2 = -(*pivmin);\n\t\t    tmp2 = fmin(d__1,d__2);\n\t\t}\n\n\t\ti__3 = *n;\n\t\tfor (j = 2; j <= i__3; ++j) {\n\t\t    tmp2 = d__[j] - e2[j - 1] / tmp2 - tmp1;\n\t\t    if (tmp2 <= *pivmin) {\n\t\t\t++itmp1;\n/* Computing MIN */\n\t\t\td__1 = tmp2, d__2 = -(*pivmin);\n\t\t\ttmp2 = fmin(d__1,d__2);\n\t\t    }\n/* L90: */\n\t\t}\n\n\t\tif (*ijob <= 2) {\n\n/*                 IJOB=2: Choose all intervals containing eigenvalues. */\n\n/*                 Insure that N(w) is monotone */\n\n/* Computing MIN */\n/* Computing MAX */\n\t\t    i__5 = nab[ji + nab_dim1];\n\t\t    i__3 = nab[ji + (nab_dim1 << 1)], i__4 = imax(i__5,itmp1);\n\t\t    itmp1 = imin(i__3,i__4);\n\n/*                 Update the Queue -- add intervals if both halves */\n/*                 contain eigenvalues. */\n\n\t\t    if (itmp1 == nab[ji + (nab_dim1 << 1)]) {\n\n/*                    No eigenvalue in the upper interval: */\n/*                    just use the lower interval. */\n\n\t\t\tab[ji + (ab_dim1 << 1)] = tmp1;\n\n\t\t    } else if (itmp1 == nab[ji + nab_dim1]) {\n\n/*                    No eigenvalue in the lower interval: */\n/*                    just use the upper interval. */\n\n\t\t\tab[ji + ab_dim1] = tmp1;\n\t\t    } else if (klnew < *mmax) {\n\n/*                    Eigenvalue in both intervals -- add upper to queue. */\n\n\t\t\t++klnew;\n\t\t\tab[klnew + (ab_dim1 << 1)] = ab[ji + (ab_dim1 << 1)];\n\t\t\tnab[klnew + (nab_dim1 << 1)] = nab[ji + (nab_dim1 << \n\t\t\t\t1)];\n\t\t\tab[klnew + ab_dim1] = tmp1;\n\t\t\tnab[klnew + nab_dim1] = itmp1;\n\t\t\tab[ji + (ab_dim1 << 1)] = tmp1;\n\t\t\tnab[ji + (nab_dim1 << 1)] = itmp1;\n\t\t    } else {\n\t\t\t*info = *mmax + 1;\n\t\t\treturn 0;\n\t\t    }\n\t\t} else {\n\n/*                 IJOB=3: Binary search.  Keep only the interval */\n/*                         containing  w  s.t. N(w) = NVAL */\n\n\t\t    if (itmp1 <= nval[ji]) {\n\t\t\tab[ji + ab_dim1] = tmp1;\n\t\t\tnab[ji + nab_dim1] = itmp1;\n\t\t    }\n\t\t    if (itmp1 >= nval[ji]) {\n\t\t\tab[ji + (ab_dim1 << 1)] = tmp1;\n\t\t\tnab[ji + (nab_dim1 << 1)] = itmp1;\n\t\t    }\n\t\t}\n/* L100: */\n\t    }\n\t    kl = klnew;\n\n/*           End of Serial Version of the loop */\n\n\t}\n\n/*        Check for convergence */\n\n\tkfnew = kf;\n\ti__2 = kl;\n\tfor (ji = kf; ji <= i__2; ++ji) {\n\t    tmp1 = (d__1 = ab[ji + (ab_dim1 << 1)] - ab[ji + ab_dim1], fabs(\n\t\t    d__1));\n/* Computing MAX */\n\t    d__3 = (d__1 = ab[ji + (ab_dim1 << 1)], fabs(d__1)), d__4 = (d__2 =\n\t\t     ab[ji + ab_dim1], fabs(d__2));\n\t    tmp2 = fmax(d__3,d__4);\n/* Computing MAX */\n\t    d__1 = fmax(*abstol,*pivmin), d__2 = *reltol * tmp2;\n\t    if (tmp1 < fmax(d__1,d__2) || nab[ji + nab_dim1] >= nab[ji + (\n\t\t    nab_dim1 << 1)]) {\n\n/*              Converged -- Swap with position KFNEW, */\n/*                           then increment KFNEW */\n\n\t\tif (ji > kfnew) {\n\t\t    tmp1 = ab[ji + ab_dim1];\n\t\t    tmp2 = ab[ji + (ab_dim1 << 1)];\n\t\t    itmp1 = nab[ji + nab_dim1];\n\t\t    itmp2 = nab[ji + (nab_dim1 << 1)];\n\t\t    ab[ji + ab_dim1] = ab[kfnew + ab_dim1];\n\t\t    ab[ji + (ab_dim1 << 1)] = ab[kfnew + (ab_dim1 << 1)];\n\t\t    nab[ji + nab_dim1] = nab[kfnew + nab_dim1];\n\t\t    nab[ji + (nab_dim1 << 1)] = nab[kfnew + (nab_dim1 << 1)];\n\t\t    ab[kfnew + ab_dim1] = tmp1;\n\t\t    ab[kfnew + (ab_dim1 << 1)] = tmp2;\n\t\t    nab[kfnew + nab_dim1] = itmp1;\n\t\t    nab[kfnew + (nab_dim1 << 1)] = itmp2;\n\t\t    if (*ijob == 3) {\n\t\t\titmp1 = nval[ji];\n\t\t\tnval[ji] = nval[kfnew];\n\t\t\tnval[kfnew] = itmp1;\n\t\t    }\n\t\t}\n\t\t++kfnew;\n\t    }\n/* L110: */\n\t}\n\tkf = kfnew;\n\n/*        Choose Midpoints */\n\n\ti__2 = kl;\n\tfor (ji = kf; ji <= i__2; ++ji) {\n\t    c__[ji] = (ab[ji + ab_dim1] + ab[ji + (ab_dim1 << 1)]) * .5;\n/* L120: */\n\t}\n\n/*        If no more intervals to refine, quit. */\n\n\tif (kf > kl) {\n\t    goto L140;\n\t}\n/* L130: */\n    }\n\n/*     Converged */\n\nL140:\n/* Computing MAX */\n    i__1 = kl + 1 - kf;\n    *info = imax(i__1,0);\n    *mout = kl;\n\n    return 0;\n\n/*     End of ODEBZ */\n\n} /* odebz_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odev2.c",
    "content": "/* dlaev2.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odev2(double *a, double *b, double *c__, \n\tdouble *rt1, double *rt2, double *cs1, double *sn1)\n{\n    /* System generated locals */\n    double d__1;\n\n    /* Builtin functions */\n    // double sqrt(double);\n\n    /* Local variables */\n    double ab, df, cs, ct, tb, sm, tn, rt, adf, acs;\n    int sgn1, sgn2;\n    double acmn, acmx;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODEV2 computes the eigendecomposition of a 2-by-2 symmetric matrix */\n/*     [  A   B  ] */\n/*     [  B   C  ]. */\n/*  On return, RT1 is the eigenvalue of larger absolute value, RT2 is the */\n/*  eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right */\n/*  eigenvector for RT1, giving the decomposition */\n\n/*     [ CS1  SN1 ] [  A   B  ] [ CS1 -SN1 ]  =  [ RT1  0  ] */\n/*     [-SN1  CS1 ] [  B   C  ] [ SN1  CS1 ]     [  0  RT2 ]. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  A       (input) DOUBLE PRECISION */\n/*          The (1,1) element of the 2-by-2 matrix. */\n\n/*  B       (input) DOUBLE PRECISION */\n/*          The (1,2) element and the conjugate of the (2,1) element of */\n/*          the 2-by-2 matrix. */\n\n/*  C       (input) DOUBLE PRECISION */\n/*          The (2,2) element of the 2-by-2 matrix. */\n\n/*  RT1     (output) DOUBLE PRECISION */\n/*          The eigenvalue of larger absolute value. */\n\n/*  RT2     (output) DOUBLE PRECISION */\n/*          The eigenvalue of smaller absolute value. */\n\n/*  CS1     (output) DOUBLE PRECISION */\n/*  SN1     (output) DOUBLE PRECISION */\n/*          The vector (CS1, SN1) is a unit right eigenvector for RT1. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  RT1 is accurate to a few ulps barring over/underflow. */\n\n/*  RT2 may be inaccurate if there is massive cancellation in the */\n/*  determinant A*C-B*B; higher precision or correctly rounded or */\n/*  correctly truncated arithmetic would be needed to compute RT2 */\n/*  accurately in all cases. */\n\n/*  CS1 and SN1 are accurate to a few ulps barring over/underflow. */\n\n/*  Overflow is possible only if RT1 is within a factor of 5 of overflow. */\n/*  Underflow is harmless if the input data is 0 or exceeds */\n/*     underflow_threshold / macheps. */\n\n/* ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n/*     Compute the eigenvalues */\n\n    sm = *a + *c__;\n    df = *a - *c__;\n    adf = fabs(df);\n    tb = *b + *b;\n    ab = fabs(tb);\n    if (fabs(*a) > fabs(*c__)) {\n\tacmx = *a;\n\tacmn = *c__;\n    } else {\n\tacmx = *c__;\n\tacmn = *a;\n    }\n    if (adf > ab) {\n/* Computing 2nd power */\n\td__1 = ab / adf;\n\trt = adf * sqrt(d__1 * d__1 + 1.);\n    } else if (adf < ab) {\n/* Computing 2nd power */\n\td__1 = adf / ab;\n\trt = ab * sqrt(d__1 * d__1 + 1.);\n    } else {\n\n/*        Includes case AB=ADF=0 */\n\n\trt = ab * sqrt(2.);\n    }\n    if (sm < 0.) {\n\t*rt1 = (sm - rt) * .5;\n\tsgn1 = -1;\n\n/*        Order of execution important. */\n/*        To get fully accurate smaller eigenvalue, */\n/*        next line needs to be executed in higher precision. */\n\n\t*rt2 = acmx / *rt1 * acmn - *b / *rt1 * *b;\n    } else if (sm > 0.) {\n\t*rt1 = (sm + rt) * .5;\n\tsgn1 = 1;\n\n/*        Order of execution important. */\n/*        To get fully accurate smaller eigenvalue, */\n/*        next line needs to be executed in higher precision. */\n\n\t*rt2 = acmx / *rt1 * acmn - *b / *rt1 * *b;\n    } else {\n\n/*        Includes case RT1 = RT2 = 0 */\n\n\t*rt1 = rt * .5;\n\t*rt2 = rt * -.5;\n\tsgn1 = 1;\n    }\n\n/*     Compute the eigenvector */\n\n    if (df >= 0.) {\n\tcs = df + rt;\n\tsgn2 = 1;\n    } else {\n\tcs = df - rt;\n\tsgn2 = -1;\n    }\n    acs = fabs(cs);\n    if (acs > ab) {\n\tct = -tb / cs;\n\t*sn1 = 1. / sqrt(ct * ct + 1.);\n\t*cs1 = ct * *sn1;\n    } else {\n\tif (ab == 0.) {\n\t    *cs1 = 1.;\n\t    *sn1 = 0.;\n\t} else {\n\t    tn = -cs / tb;\n\t    *cs1 = 1. / sqrt(tn * tn + 1.);\n\t    *sn1 = tn * *cs1;\n\t}\n    }\n    if (sgn1 == sgn2) {\n\ttn = *cs1;\n\t*cs1 = -(*sn1);\n\t*sn1 = tn;\n    }\n    return 0;\n\n/*     End of ODEV2 */\n\n} /* odev2_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odnan.c",
    "content": "/* disnan.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\nint odnan(double *din)\n{\n    /* System generated locals */\n    int ret_val;\n\n    /* Local variables */\n    extern int odsnan(double *, double *);\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  DISNAN returns .TRUE. if its argument is NaN, and .FALSE. */\n/*  otherwise.  To be replaced by the Fortran 2003 intrinsic in the */\n/*  future. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  DIN      (input) DOUBLE PRECISION */\n/*          Input to test for NaN. */\n\n/*  ===================================================================== */\n\n/*  .. External Functions .. */\n/*  .. */\n/*  .. Executable Statements .. */\n    ret_val = odsnan(din, din);\n    return ret_val;\n} /* odnan_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odneg.c",
    "content": "/* dlaneg.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n#define imax(a,b) ( (a) > (b) ? (a) : (b) )\n#define imin(a,b) ( (a) < (b) ? (a) : (b) )\n\nint odneg(int *n, double *d__, double *lld, double *\n\tsigma, double *pivmin, int *r__)\n{\n    /* System generated locals */\n    int ret_val, i__1, i__2, i__3, i__4;\n\n    /* Local variables */\n    int j;\n    double p, t;\n    int bj;\n    double tmp;\n    int neg1, neg2;\n    double bsav, gamma, dplus;\n    extern int odnan(double *);\n    int negcnt;\n    int sawnan;\n    double dminus;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODNEG computes the Sturm count, the number of negative pivots */\n/*  encountered while factoring tridiagonal T - sigma I = L D L^T. */\n/*  This implementation works directly on the factors without forming */\n/*  the tridiagonal matrix T.  The Sturm count is also the number of */\n/*  eigenvalues of T less than sigma. */\n\n/*  This routine is called from DLARRB. */\n\n/*  The current routine does not use the PIVMIN parameter but rather */\n/*  requires IEEE-754 propagation of Infinities and NaNs.  This */\n/*  routine also has no input range restrictions but does require */\n/*  default exception handling such that x/0 produces Inf when x is */\n/*  non-zero, and Inf/Inf produces NaN.  For more information, see: */\n\n/*    Marques, Riedy, and Voemel, \"Benefits of IEEE-754 Features in */\n/*    Modern Symmetric Tridiagonal Eigensolvers,\" SIAM Journal on */\n/*    Scientific Computing, v28, n5, 2006.  DOI 10.1137/050641624 */\n/*    (Tech report version in LAWN 172 with the same title.) */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N       (input) INT */\n/*          The order of the matrix. */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The N diagonal elements of the diagonal matrix D. */\n\n/*  LLD     (input) DOUBLE PRECISION array, dimension (N-1) */\n/*          The (N-1) elements L(i)*L(i)*D(i). */\n\n/*  SIGMA   (input) DOUBLE PRECISION */\n/*          Shift amount in T - sigma I = L D L^T. */\n\n/*  PIVMIN  (input) DOUBLE PRECISION */\n/*          The minimum pivot in the Sturm sequence.  May be used */\n/*          when zero pivots are encountered on non-IEEE-754 */\n/*          architectures. */\n\n/*  R       (input) INT */\n/*          The twist index for the twisted factorization that is used */\n/*          for the negcount. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n/*     Jason Riedy, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     Some architectures propagate Infinities and NaNs very slowly, so */\n/*     the code computes counts in BLKLEN chunks.  Then a NaN can */\n/*     propagate at most BLKLEN columns before being detected.  This is */\n/*     not a general tuning parameter; it needs only to be just large */\n/*     enough that the overhead is tiny in common cases. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n    /* Parameter adjustments */\n    --lld;\n    --d__;\n\n    /* Function Body */\n    negcnt = 0;\n/*     I) upper part: L D L^T - SIGMA I = L+ D+ L+^T */\n    t = -(*sigma);\n    i__1 = *r__ - 1;\n    for (bj = 1; bj <= i__1; bj += 128) {\n\tneg1 = 0;\n\tbsav = t;\n/* Computing MIN */\n\ti__3 = bj + 127, i__4 = *r__ - 1;\n\ti__2 = imin(i__3,i__4);\n\tfor (j = bj; j <= i__2; ++j) {\n\t    dplus = d__[j] + t;\n\t    if (dplus < 0.) {\n\t\t++neg1;\n\t    }\n\t    tmp = t / dplus;\n\t    t = tmp * lld[j] - *sigma;\n/* L21: */\n\t}\n\tsawnan = odnan(&t);\n/*     Run a slower version of the above loop if a NaN is detected. */\n/*     A NaN should occur only with a zero pivot after an infinite */\n/*     pivot.  In that case, substituting 1 for T/DPLUS is the */\n/*     correct limit. */\n\tif (sawnan) {\n\t    neg1 = 0;\n\t    t = bsav;\n/* Computing MIN */\n\t    i__3 = bj + 127, i__4 = *r__ - 1;\n\t    i__2 = imin(i__3,i__4);\n\t    for (j = bj; j <= i__2; ++j) {\n\t\tdplus = d__[j] + t;\n\t\tif (dplus < 0.) {\n\t\t    ++neg1;\n\t\t}\n\t\ttmp = t / dplus;\n\t\tif (odnan(&tmp)) {\n\t\t    tmp = 1.;\n\t\t}\n\t\tt = tmp * lld[j] - *sigma;\n/* L22: */\n\t    }\n\t}\n\tnegcnt += neg1;\n/* L210: */\n    }\n\n/*     II) lower part: L D L^T - SIGMA I = U- D- U-^T */\n    p = d__[*n] - *sigma;\n    i__1 = *r__;\n    for (bj = *n - 1; bj >= i__1; bj += -128) {\n\tneg2 = 0;\n\tbsav = p;\n/* Computing MAX */\n\ti__3 = bj - 127;\n\ti__2 = imax(i__3,*r__);\n\tfor (j = bj; j >= i__2; --j) {\n\t    dminus = lld[j] + p;\n\t    if (dminus < 0.) {\n\t\t++neg2;\n\t    }\n\t    tmp = p / dminus;\n\t    p = tmp * d__[j] - *sigma;\n/* L23: */\n\t}\n\tsawnan = odnan(&p);\n/*     As above, run a slower version that substitutes 1 for Inf/Inf. */\n\n\tif (sawnan) {\n\t    neg2 = 0;\n\t    p = bsav;\n/* Computing MAX */\n\t    i__3 = bj - 127;\n\t    i__2 = imax(i__3,*r__);\n\t    for (j = bj; j >= i__2; --j) {\n\t\tdminus = lld[j] + p;\n\t\tif (dminus < 0.) {\n\t\t    ++neg2;\n\t\t}\n\t\ttmp = p / dminus;\n\t\tif (odnan(&tmp)) {\n\t\t    tmp = 1.;\n\t\t}\n\t\tp = tmp * d__[j] - *sigma;\n/* L24: */\n\t    }\n\t}\n\tnegcnt += neg2;\n/* L230: */\n    }\n\n/*     III) Twist index */\n/*       T was shifted by SIGMA initially. */\n    gamma = t + *sigma + p;\n    if (gamma < 0.) {\n\t++negcnt;\n    }\n    ret_val = negcnt;\n    return ret_val;\n} /* odneg_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odnst.c",
    "content": "/* dlanst.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Table of constant values */\nstatic int c__1 = 1;\n\ndouble odnst(char *norm, int *n, double *d__, double *e)\n{\n    /* System generated locals */\n    int i__1;\n    double ret_val, d__1, d__2, d__3, d__4, d__5;\n\n    /* Builtin functions */\n    // double sqrt(double);\n\n    /* Local variables */\n    int i__;\n    double sum, scale;\n    extern int olsame(char *, char *);\n    double anorm;\n    extern /* Subroutine */ int odssq(int *, double *, int *, \n\t    double *, double *);\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODNST  returns the value of the one norm,  or the Frobenius norm, or */\n/*  the  infinity norm,  or the  element of  largest absolute value  of a */\n/*  real symmetric tridiagonal matrix A. */\n\n/*  Description */\n/*  =========== */\n\n/*  ODNST returns the value */\n\n/*     ODNST = ( max(abs(A(i,j))), NORM = 'M' or 'm' */\n/*              ( */\n/*              ( norm1(A),         NORM = '1', 'O' or 'o' */\n/*              ( */\n/*              ( normI(A),         NORM = 'I' or 'i' */\n/*              ( */\n/*              ( normF(A),         NORM = 'F', 'f', 'E' or 'e' */\n\n/*  where  norm1  denotes the  one norm of a matrix (maximum column sum), */\n/*  normI  denotes the  infinity norm  of a matrix  (maximum row sum) and */\n/*  normF  denotes the  Frobenius norm of a matrix (square root of sum of */\n/*  squares).  Note that  max(abs(A(i,j)))  is not a consistent matrix norm. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  NORM    (input) CHARACTER*1 */\n/*          Specifies the value to be returned in ODNST as described */\n/*          above. */\n\n/*  N       (input) INT */\n/*          The order of the matrix A.  N >= 0.  When N = 0, ODNST is */\n/*          set to zero. */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The diagonal elements of A. */\n\n/*  E       (input) DOUBLE PRECISION array, dimension (N-1) */\n/*          The (n-1) sub-diagonal or super-diagonal elements of A. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --e;\n    --d__;\n\n    /* Function Body */\n    if (*n <= 0) {\n\tanorm = 0.;\n    } else if (olsame(norm, \"M\")) {\n\n/*        Find max(abs(A(i,j))). */\n\n\tanorm = (d__1 = d__[*n], fabs(d__1));\n\ti__1 = *n - 1;\n\tfor (i__ = 1; i__ <= i__1; ++i__) {\n/* Computing MAX */\n\t    d__2 = anorm, d__3 = (d__1 = d__[i__], fabs(d__1));\n\t    anorm = fmax(d__2,d__3);\n/* Computing MAX */\n\t    d__2 = anorm, d__3 = (d__1 = e[i__], fabs(d__1));\n\t    anorm = fmax(d__2,d__3);\n/* L10: */\n\t}\n    } else if (olsame(norm, \"O\") || *(unsigned char *)\n\t    norm == '1' || olsame(norm, \"I\")) {\n\n/*        Find norm1(A). */\n\n\tif (*n == 1) {\n\t    anorm = fabs(d__[1]);\n\t} else {\n/* Computing MAX */\n\t    d__3 = fabs(d__[1]) + fabs(e[1]), d__4 = (d__1 = e[*n - 1], fabs(\n\t\t    d__1)) + (d__2 = d__[*n], fabs(d__2));\n\t    anorm = fmax(d__3,d__4);\n\t    i__1 = *n - 1;\n\t    for (i__ = 2; i__ <= i__1; ++i__) {\n/* Computing MAX */\n\t\td__4 = anorm, d__5 = (d__1 = d__[i__], fabs(d__1)) + (d__2 = e[\n\t\t\ti__], fabs(d__2)) + (d__3 = e[i__ - 1], fabs(d__3));\n\t\tanorm = fmax(d__4,d__5);\n/* L20: */\n\t    }\n\t}\n    } else if (olsame(norm, \"F\") || olsame(norm, \"E\")) {\n\n/*        Find normF(A). */\n\n\tscale = 0.;\n\tsum = 1.;\n\tif (*n > 1) {\n\t    i__1 = *n - 1;\n\t    odssq(&i__1, &e[1], &c__1, &scale, &sum);\n\t    sum *= 2;\n\t}\n\todssq(n, &d__[1], &c__1, &scale, &sum);\n\tanorm = scale * sqrt(sum);\n    }\n\n    ret_val = anorm;\n    return ret_val;\n\n/*     End of ODNST */\n\n} /* odnst_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odr1v.c",
    "content": "/* odr1v.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n#define TRUE_ (1)\n#define FALSE_ (0)\n\n/* Subroutine */ \nint odr1v(int *n, int *b1, int *bn, double \n\t*lambda, double *d__, double *l, double *ld, double *\n\tlld, double *pivmin, double *gaptol, double *z__, int \n\t*wantnc, int *negcnt, double *ztz, double *mingma, \n\tint *r__, int *isuppz, double *nrminv, double *resid, \n\tdouble *rqcorr, double *work)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1, d__2, d__3;\n\n    /* Builtin functions */\n    //    double sqrt(double);\n\n    /* Local variables */\n    int i__;\n    double s;\n    int r1, r2;\n    double eps, tmp;\n    int neg1, neg2, indp, inds;\n    double dplus;\n    // extern double odmch(char *);\n    extern int odnan(double *);\n    int indlpl, indumn;\n    double dminus;\n    int sawnan1, sawnan2;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODR1V computes the (scaled) r-th column of the inverse of */\n/*  the sumbmatrix in rows B1 through BN of the tridiagonal matrix */\n/*  L D L^T - sigma I. When sigma is close to an eigenvalue, the */\n/*  computed vector is an accurate eigenvector. Usually, r corresponds */\n/*  to the index where the eigenvector is largest in magnitude. */\n/*  The following steps accomplish this computation : */\n/*  (a) Stationary qd transform,  L D L^T - sigma I = L(+) D(+) L(+)^T, */\n/*  (b) Progressive qd transform, L D L^T - sigma I = U(-) D(-) U(-)^T, */\n/*  (c) Computation of the diagonal elements of the inverse of */\n/*      L D L^T - sigma I by combining the above transforms, and choosing */\n/*      r as the index where the diagonal of the inverse is (one of the) */\n/*      largest in magnitude. */\n/*  (d) Computation of the (scaled) r-th column of the inverse using the */\n/*      twisted factorization obtained by combining the top part of the */\n/*      the stationary and the bottom part of the progressive transform. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N        (input) INT */\n/*           The order of the matrix L D L^T. */\n\n/*  B1       (input) INT */\n/*           First index of the submatrix of L D L^T. */\n\n/*  BN       (input) INT */\n/*           Last index of the submatrix of L D L^T. */\n\n/*  LAMBDA    (input) DOUBLE PRECISION */\n/*           The shift. In order to compute an accurate eigenvector, */\n/*           LAMBDA should be a good approximation to an eigenvalue */\n/*           of L D L^T. */\n\n/*  L        (input) DOUBLE PRECISION array, dimension (N-1) */\n/*           The (n-1) subdiagonal elements of the unit bidiagonal matrix */\n/*           L, in elements 1 to N-1. */\n\n/*  D        (input) DOUBLE PRECISION array, dimension (N) */\n/*           The n diagonal elements of the diagonal matrix D. */\n\n/*  LD       (input) DOUBLE PRECISION array, dimension (N-1) */\n/*           The n-1 elements L(i)*D(i). */\n\n/*  LLD      (input) DOUBLE PRECISION array, dimension (N-1) */\n/*           The n-1 elements L(i)*L(i)*D(i). */\n\n/*  PIVMIN   (input) DOUBLE PRECISION */\n/*           The minimum pivot in the Sturm sequence. */\n\n/*  GAPTOL   (input) DOUBLE PRECISION */\n/*           Tolerance that indicates when eigenvector entries are negligible */\n/*           w.r.t. their contribution to the residual. */\n\n/*  Z        (input/output) DOUBLE PRECISION array, dimension (N) */\n/*           On input, all entries of Z must be set to 0. */\n/*           On output, Z contains the (scaled) r-th column of the */\n/*           inverse. The scaling is such that Z(R) equals 1. */\n\n/*  WANTNC   (input) INT */\n/*           Specifies whether NEGCNT has to be computed. */\n\n/*  NEGCNT   (output) INT */\n/*           If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin */\n/*           in the  matrix factorization L D L^T, and NEGCNT = -1 otherwise. */\n\n/*  ZTZ      (output) DOUBLE PRECISION */\n/*           The square of the 2-norm of Z. */\n\n/*  MINGMA   (output) DOUBLE PRECISION */\n/*           The reciprocal of the largest (in magnitude) diagonal */\n/*           element of the inverse of L D L^T - sigma I. */\n\n/*  R        (input/output) INT */\n/*           The twist index for the twisted factorization used to */\n/*           compute Z. */\n/*           On input, 0 <= R <= N. If R is input as 0, R is set to */\n/*           the index where (L D L^T - sigma I)^{-1} is largest */\n/*           in magnitude. If 1 <= R <= N, R is unchanged. */\n/*           On output, R contains the twist index used to compute Z. */\n/*           Ideally, R designates the position of the maximum entry in the */\n/*           eigenvector. */\n\n/*  ISUPPZ   (output) INT array, dimension (2) */\n/*           The support of the vector in Z, i.e., the vector Z is */\n/*           nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ). */\n\n/*  NRMINV   (output) DOUBLE PRECISION */\n/*           NRMINV = 1/SQRT( ZTZ ) */\n\n/*  RESID    (output) DOUBLE PRECISION */\n/*           The residual of the FP vector. */\n/*           RESID = ABS( MINGMA )/SQRT( ZTZ ) */\n\n/*  RQCORR   (output) DOUBLE PRECISION */\n/*           The Rayleigh Quotient correction to LAMBDA. */\n/*           RQCORR = MINGMA*TMP */\n\n/*  WORK     (workspace) DOUBLE PRECISION array, dimension (4*N) */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --work;\n    --isuppz;\n    --z__;\n    --lld;\n    --ld;\n    --l;\n    --d__;\n\n    /* Function Body */\n    eps = DBL_EPSILON; // eps = odmch(\"Precision\");\n    if (*r__ == 0) {\n\tr1 = *b1;\n\tr2 = *bn;\n    } else {\n\tr1 = *r__;\n\tr2 = *r__;\n    }\n/*     Storage for LPLUS */\n    indlpl = 0;\n/*     Storage for UMINUS */\n    indumn = *n;\n    inds = (*n << 1) + 1;\n    indp = *n * 3 + 1;\n    if (*b1 == 1) {\n\twork[inds] = 0.;\n    } else {\n\twork[inds + *b1 - 1] = lld[*b1 - 1];\n    }\n\n/*     Compute the stationary transform (using the differential form) */\n/*     until the index R2. */\n\n    sawnan1 = FALSE_;\n    neg1 = 0;\n    s = work[inds + *b1 - 1] - *lambda;\n    i__1 = r1 - 1;\n    for (i__ = *b1; i__ <= i__1; ++i__) {\n\tdplus = d__[i__] + s;\n\twork[indlpl + i__] = ld[i__] / dplus;\n\tif (dplus < 0.) {\n\t    ++neg1;\n\t}\n\twork[inds + i__] = s * work[indlpl + i__] * l[i__];\n\ts = work[inds + i__] - *lambda;\n/* L50: */\n    }\n    sawnan1 = odnan(&s);\n    if (sawnan1) {\n\tgoto L60;\n    }\n    i__1 = r2 - 1;\n    for (i__ = r1; i__ <= i__1; ++i__) {\n\tdplus = d__[i__] + s;\n\twork[indlpl + i__] = ld[i__] / dplus;\n\twork[inds + i__] = s * work[indlpl + i__] * l[i__];\n\ts = work[inds + i__] - *lambda;\n/* L51: */\n    }\n    sawnan1 = odnan(&s);\n\nL60:\n    if (sawnan1) {\n/*        Runs a slower version of the above loop if a NaN is detected */\n\tneg1 = 0;\n\ts = work[inds + *b1 - 1] - *lambda;\n\ti__1 = r1 - 1;\n\tfor (i__ = *b1; i__ <= i__1; ++i__) {\n\t    dplus = d__[i__] + s;\n\t    if (fabs(dplus) < *pivmin) {\n\t\tdplus = -(*pivmin);\n\t    }\n\t    work[indlpl + i__] = ld[i__] / dplus;\n\t    if (dplus < 0.) {\n\t\t++neg1;\n\t    }\n\t    work[inds + i__] = s * work[indlpl + i__] * l[i__];\n\t    if (work[indlpl + i__] == 0.) {\n\t\twork[inds + i__] = lld[i__];\n\t    }\n\t    s = work[inds + i__] - *lambda;\n/* L70: */\n\t}\n\ti__1 = r2 - 1;\n\tfor (i__ = r1; i__ <= i__1; ++i__) {\n\t    dplus = d__[i__] + s;\n\t    if (fabs(dplus) < *pivmin) {\n\t\tdplus = -(*pivmin);\n\t    }\n\t    work[indlpl + i__] = ld[i__] / dplus;\n\t    work[inds + i__] = s * work[indlpl + i__] * l[i__];\n\t    if (work[indlpl + i__] == 0.) {\n\t\twork[inds + i__] = lld[i__];\n\t    }\n\t    s = work[inds + i__] - *lambda;\n/* L71: */\n\t}\n    }\n\n/*     Compute the progressive transform (using the differential form) */\n/*     until the index R1 */\n\n    sawnan2 = FALSE_;\n    neg2 = 0;\n    work[indp + *bn - 1] = d__[*bn] - *lambda;\n    i__1 = r1;\n    for (i__ = *bn - 1; i__ >= i__1; --i__) {\n\tdminus = lld[i__] + work[indp + i__];\n\ttmp = d__[i__] / dminus;\n\tif (dminus < 0.) {\n\t    ++neg2;\n\t}\n\twork[indumn + i__] = l[i__] * tmp;\n\twork[indp + i__ - 1] = work[indp + i__] * tmp - *lambda;\n/* L80: */\n    }\n    tmp = work[indp + r1 - 1];\n    sawnan2 = odnan(&tmp);\n    if (sawnan2) {\n/*        Runs a slower version of the above loop if a NaN is detected */\n\tneg2 = 0;\n\ti__1 = r1;\n\tfor (i__ = *bn - 1; i__ >= i__1; --i__) {\n\t    dminus = lld[i__] + work[indp + i__];\n\t    if (fabs(dminus) < *pivmin) {\n\t\tdminus = -(*pivmin);\n\t    }\n\t    tmp = d__[i__] / dminus;\n\t    if (dminus < 0.) {\n\t\t++neg2;\n\t    }\n\t    work[indumn + i__] = l[i__] * tmp;\n\t    work[indp + i__ - 1] = work[indp + i__] * tmp - *lambda;\n\t    if (tmp == 0.) {\n\t\twork[indp + i__ - 1] = d__[i__] - *lambda;\n\t    }\n/* L100: */\n\t}\n    }\n\n/*     Find the index (from R1 to R2) of the largest (in magnitude) */\n/*     diagonal element of the inverse */\n\n    *mingma = work[inds + r1 - 1] + work[indp + r1 - 1];\n    if (*mingma < 0.) {\n\t++neg1;\n    }\n    if (*wantnc) {\n\t*negcnt = neg1 + neg2;\n    } else {\n\t*negcnt = -1;\n    }\n    if (fabs(*mingma) == 0.) {\n\t*mingma = eps * work[inds + r1 - 1];\n    }\n    *r__ = r1;\n    i__1 = r2 - 1;\n    for (i__ = r1; i__ <= i__1; ++i__) {\n\ttmp = work[inds + i__] + work[indp + i__];\n\tif (tmp == 0.) {\n\t    tmp = eps * work[inds + i__];\n\t}\n\tif (fabs(tmp) <= fabs(*mingma)) {\n\t    *mingma = tmp;\n\t    *r__ = i__ + 1;\n\t}\n/* L110: */\n    }\n\n/*     Compute the FP vector: solve N^T v = e_r */\n\n    isuppz[1] = *b1;\n    isuppz[2] = *bn;\n    z__[*r__] = 1.;\n    *ztz = 1.;\n\n/*     Compute the FP vector upwards from R */\n\n    if (! sawnan1 && ! sawnan2) {\n\ti__1 = *b1;\n\tfor (i__ = *r__ - 1; i__ >= i__1; --i__) {\n\t    z__[i__] = -(work[indlpl + i__] * z__[i__ + 1]);\n\t    if (((d__1 = z__[i__], fabs(d__1)) + (d__2 = z__[i__ + 1], fabs(\n\t\t    d__2))) * (d__3 = ld[i__], fabs(d__3)) < *gaptol) {\n\t\tz__[i__] = 0.;\n\t\tisuppz[1] = i__ + 1;\n\t\tgoto L220;\n\t    }\n\t    *ztz += z__[i__] * z__[i__];\n/* L210: */\n\t}\nL220:\n\t;\n    } else {\n/*        Run slower loop if NaN occurred. */\n\ti__1 = *b1;\n\tfor (i__ = *r__ - 1; i__ >= i__1; --i__) {\n\t    if (z__[i__ + 1] == 0.) {\n\t\tz__[i__] = -(ld[i__ + 1] / ld[i__]) * z__[i__ + 2];\n\t    } else {\n\t\tz__[i__] = -(work[indlpl + i__] * z__[i__ + 1]);\n\t    }\n\t    if (((d__1 = z__[i__], fabs(d__1)) + (d__2 = z__[i__ + 1], fabs(\n\t\t    d__2))) * (d__3 = ld[i__], fabs(d__3)) < *gaptol) {\n\t\tz__[i__] = 0.;\n\t\tisuppz[1] = i__ + 1;\n\t\tgoto L240;\n\t    }\n\t    *ztz += z__[i__] * z__[i__];\n/* L230: */\n\t}\nL240:\n\t;\n    }\n/*     Compute the FP vector downwards from R in blocks of size BLKSIZ */\n    if (! sawnan1 && ! sawnan2) {\n\ti__1 = *bn - 1;\n\tfor (i__ = *r__; i__ <= i__1; ++i__) {\n\t    z__[i__ + 1] = -(work[indumn + i__] * z__[i__]);\n\t    if (((d__1 = z__[i__], fabs(d__1)) + (d__2 = z__[i__ + 1], fabs(\n\t\t    d__2))) * (d__3 = ld[i__], fabs(d__3)) < *gaptol) {\n\t\tz__[i__ + 1] = 0.;\n\t\tisuppz[2] = i__;\n\t\tgoto L260;\n\t    }\n\t    *ztz += z__[i__ + 1] * z__[i__ + 1];\n/* L250: */\n\t}\nL260:\n\t;\n    } else {\n/*        Run slower loop if NaN occurred. */\n\ti__1 = *bn - 1;\n\tfor (i__ = *r__; i__ <= i__1; ++i__) {\n\t    if (z__[i__] == 0.) {\n\t\tz__[i__ + 1] = -(ld[i__ - 1] / ld[i__]) * z__[i__ - 1];\n\t    } else {\n\t\tz__[i__ + 1] = -(work[indumn + i__] * z__[i__]);\n\t    }\n\t    if (((d__1 = z__[i__], fabs(d__1)) + (d__2 = z__[i__ + 1], fabs(\n\t\t    d__2))) * (d__3 = ld[i__], fabs(d__3)) < *gaptol) {\n\t\tz__[i__ + 1] = 0.;\n\t\tisuppz[2] = i__;\n\t\tgoto L280;\n\t    }\n\t    *ztz += z__[i__ + 1] * z__[i__ + 1];\n/* L270: */\n\t}\nL280:\n\t;\n    }\n\n/*     Compute quantities for convergence test */\n\n    tmp = 1. / *ztz;\n    *nrminv = sqrt(tmp);\n    *resid = fabs(*mingma) * *nrminv;\n    *rqcorr = *mingma * tmp;\n\n\n    return 0;\n\n/*     End of ODR1V */\n\n} /* odr1v_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrnv.c",
    "content": "/* dlarnv.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n#define imin(a,b) ( (a) < (b) ? (a) : (b) )\n\n/* Subroutine */ \nint odrnv(int *idist, int *iseed, int *n, double *x)\n{\n    /* System generated locals */\n    int i__1, i__2, i__3;\n\n    /* Builtin functions */\n    // double log(double), sqrt(double), cos(double);\n\n    /* Local variables */\n    int i__;\n    double u[128];\n    int il, iv, il2;\n    extern int odruv(int *, int *, double *);\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODRNV returns a vector of n random real numbers from a uniform or */\n/*  normal distribution. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  IDIST   (input) INT */\n/*          Specifies the distribution of the random numbers: */\n/*          = 1:  uniform (0,1) */\n/*          = 2:  uniform (-1,1) */\n/*          = 3:  normal (0,1) */\n\n/*  ISEED   (input/output) INT array, dimension (4) */\n/*          On entry, the seed of the random number generator; the array */\n/*          elements must be between 0 and 4095, and ISEED(4) must be */\n/*          odd. */\n/*          On exit, the seed is updated. */\n\n/*  N       (input) INT */\n/*          The number of random numbers to be generated. */\n\n/*  X       (output) DOUBLE PRECISION array, dimension (N) */\n/*          The generated random numbers. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  This routine calls the auxiliary routine ODRUV to generate random */\n/*  real numbers from a uniform (0,1) distribution, in batches of up to */\n/*  128 using vectorisable code. The Box-Muller method is used to */\n/*  transform numbers from a uniform to a normal distribution. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Local Arrays .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --x;\n    --iseed;\n\n    /* Function Body */\n    i__1 = *n;\n    for (iv = 1; iv <= i__1; iv += 64) {\n/* Computing MIN */\n\ti__2 = 64, i__3 = *n - iv + 1;\n\til = imin(i__2,i__3);\n\tif (*idist == 3) {\n\t    il2 = il << 1;\n\t} else {\n\t    il2 = il;\n\t}\n\n/*        Call ODRUV to generate IL2 numbers from a uniform (0,1) */\n/*        distribution (IL2 <= LV) */\n\n\todruv(&iseed[1], &il2, u);\n\n\tif (*idist == 1) {\n\n/*           Copy generated numbers */\n\n\t    i__2 = il;\n\t    for (i__ = 1; i__ <= i__2; ++i__) {\n\t\tx[iv + i__ - 1] = u[i__ - 1];\n/* L10: */\n\t    }\n\t} else if (*idist == 2) {\n\n/*           Convert generated numbers to uniform (-1,1) distribution */\n\n\t    i__2 = il;\n\t    for (i__ = 1; i__ <= i__2; ++i__) {\n\t\tx[iv + i__ - 1] = u[i__ - 1] * 2. - 1.;\n/* L20: */\n\t    }\n\t} else if (*idist == 3) {\n\n/*           Convert generated numbers to normal (0,1) distribution */\n\n\t    i__2 = il;\n\t    for (i__ = 1; i__ <= i__2; ++i__) {\n\t\tx[iv + i__ - 1] = sqrt(log(u[(i__ << 1) - 2]) * -2.) * cos(u[(\n\t\t\ti__ << 1) - 1] * 6.2831853071795864769252867663);\n/* L30: */\n\t    }\n\t}\n/* L40: */\n    }\n    return 0;\n\n/*     End of ODRNV */\n\n} /* odrnv_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrra.c",
    "content": "/* dlarra.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odrra(int *n, double *d__, double *e, \n\tdouble *e2, double *spltol, double *tnrm, int *nsplit, \n\t int *isplit, int *info)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1, d__2;\n\n    /* Builtin functions */\n    // double sqrt(double);\n\n    /* Local variables */\n    int i__;\n    double tmp1, eabs;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  Compute the splitting points with threshold SPLTOL. */\n/*  ODRRA sets any \"small\" off-diagonal elements to zero. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N       (input) INT */\n/*          The order of the matrix. N > 0. */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the N diagonal elements of the tridiagonal */\n/*          matrix T. */\n\n/*  E       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the first (N-1) entries contain the subdiagonal */\n/*          elements of the tridiagonal matrix T; E(N) need not be set. */\n/*          On exit, the entries E( ISPLIT( I ) ), 1 <= I <= NSPLIT, */\n/*          are set to zero, the other entries of E are untouched. */\n\n/*  E2      (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the first (N-1) entries contain the SQUARES of the */\n/*          subdiagonal elements of the tridiagonal matrix T; */\n/*          E2(N) need not be set. */\n/*          On exit, the entries E2( ISPLIT( I ) ), */\n/*          1 <= I <= NSPLIT, have been set to zero */\n\n/*  SPLTOL (input) DOUBLE PRECISION */\n/*          The threshold for splitting. Two criteria can be used: */\n/*          SPLTOL<0 : criterion based on absolute off-diagonal value */\n/*          SPLTOL>0 : criterion that preserves relative accuracy */\n\n/*  TNRM (input) DOUBLE PRECISION */\n/*          The norm of the matrix. */\n\n/*  NSPLIT  (output) INT */\n/*          The number of blocks T splits into. 1 <= NSPLIT <= N. */\n\n/*  ISPLIT  (output) INT array, dimension (N) */\n/*          The splitting points, at which T breaks up into blocks. */\n/*          The first block consists of rows/columns 1 to ISPLIT(1), */\n/*          the second of rows/columns ISPLIT(1)+1 through ISPLIT(2), */\n/*          etc., and the NSPLIT-th consists of rows/columns */\n/*          ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N. */\n\n\n/*  INFO    (output) INT */\n/*          = 0:  successful exit */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --isplit;\n    --e2;\n    --e;\n    --d__;\n\n    /* Function Body */\n    *info = 0;\n/*     Compute splitting points */\n    *nsplit = 1;\n    if (*spltol < 0.) {\n/*        Criterion based on absolute off-diagonal value */\n\ttmp1 = fabs(*spltol) * *tnrm;\n\ti__1 = *n - 1;\n\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t    eabs = (d__1 = e[i__], fabs(d__1));\n\t    if (eabs <= tmp1) {\n\t\te[i__] = 0.;\n\t\te2[i__] = 0.;\n\t\tisplit[*nsplit] = i__;\n\t\t++(*nsplit);\n\t    }\n/* L9: */\n\t}\n    } else {\n/*        Criterion that guarantees relative accuracy */\n\ti__1 = *n - 1;\n\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t    eabs = (d__1 = e[i__], fabs(d__1));\n\t    if (eabs <= *spltol * sqrt((d__1 = d__[i__], fabs(d__1))) * sqrt((\n\t\t    d__2 = d__[i__ + 1], fabs(d__2)))) {\n\t\te[i__] = 0.;\n\t\te2[i__] = 0.;\n\t\tisplit[*nsplit] = i__;\n\t\t++(*nsplit);\n\t    }\n/* L10: */\n\t}\n    }\n    isplit[*nsplit] = *n;\n    return 0;\n\n/*     End of ODRRA */\n\n} /* odrra_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrrb.c",
    "content": "/* dlarrb.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odrrb(int *n, double *d__, double *lld, \n\tint *ifirst, int *ilast, double *rtol1, double *rtol2, \n\t int *offset, double *w, double *wgap, double *werr, \n\tdouble *work, int *iwork, double *pivmin, double *\n\tspdiam, int *twist, int *info)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1, d__2;\n\n    /* Builtin functions */\n    //    double log(double);\n\n    /* Local variables */\n    int i__, k, r__, i1, ii, ip;\n    double gap, mid, tmp, back, lgap, rgap, left;\n    int iter, nint, prev, next;\n    double cvrgd, right, width;\n    extern int odneg(int *, double *, double *, double *\n, double *, int *);\n    int negcnt;\n    double mnwdth;\n    int olnint, maxitr;\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  Given the relatively robust representation(RRR) L D L^T, ODRRB */\n/*  does \"limited\" bisection to refine the eigenvalues of L D L^T, */\n/*  W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial */\n/*  guesses for these eigenvalues are input in W, the corresponding estimate */\n/*  of the error in these guesses and their gaps are input in WERR */\n/*  and WGAP, respectively. During bisection, intervals */\n/*  [left, right] are maintained by storing their mid-points and */\n/*  semi-widths in the arrays W and WERR respectively. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N       (input) INT */\n/*          The order of the matrix. */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The N diagonal elements of the diagonal matrix D. */\n\n/*  LLD     (input) DOUBLE PRECISION array, dimension (N-1) */\n/*          The (N-1) elements L(i)*L(i)*D(i). */\n\n/*  IFIRST  (input) INT */\n/*          The index of the first eigenvalue to be computed. */\n\n/*  ILAST   (input) INT */\n/*          The index of the last eigenvalue to be computed. */\n\n/*  RTOL1   (input) DOUBLE PRECISION */\n/*  RTOL2   (input) DOUBLE PRECISION */\n/*          Tolerance for the convergence of the bisection intervals. */\n/*          An interval [LEFT,RIGHT] has converged if */\n/*          RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) ) */\n/*          where GAP is the (estimated) distance to the nearest */\n/*          eigenvalue. */\n\n/*  OFFSET  (input) INT */\n/*          Offset for the arrays W, WGAP and WERR, i.e., the IFIRST-OFFSET */\n/*          through ILAST-OFFSET elements of these arrays are to be used. */\n\n/*  W       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are */\n/*          estimates of the eigenvalues of L D L^T indexed IFIRST throug */\n/*          ILAST. */\n/*          On output, these estimates are refined. */\n\n/*  WGAP    (input/output) DOUBLE PRECISION array, dimension (N-1) */\n/*          On input, the (estimated) gaps between consecutive */\n/*          eigenvalues of L D L^T, i.e., WGAP(I-OFFSET) is the gap between */\n/*          eigenvalues I and I+1. Note that if IFIRST.EQ.ILAST */\n/*          then WGAP(IFIRST-OFFSET) must be set to ZERO. */\n/*          On output, these gaps are refined. */\n\n/*  WERR    (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are */\n/*          the errors in the estimates of the corresponding elements in W. */\n/*          On output, these errors are refined. */\n\n/*  WORK    (workspace) DOUBLE PRECISION array, dimension (2*N) */\n/*          Workspace. */\n\n/*  IWORK   (workspace) INT array, dimension (2*N) */\n/*          Workspace. */\n\n/*  PIVMIN  (input) DOUBLE PRECISION */\n/*          The minimum pivot in the Sturm sequence. */\n\n/*  SPDIAM  (input) DOUBLE PRECISION */\n/*          The spectral diameter of the matrix. */\n\n/*  TWIST   (input) INT */\n/*          The twist index for the twisted factorization that is used */\n/*          for the negcount. */\n/*          TWIST = N: Compute negcount from L D L^T - LAMBDA I = L+ D+ L+^T */\n/*          TWIST = 1: Compute negcount from L D L^T - LAMBDA I = U- D- U-^T */\n/*          TWIST = R: Compute negcount from L D L^T - LAMBDA I = N(r) D(r) N(r) */\n\n/*  INFO    (output) INT */\n/*          Error flag. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --iwork;\n    --work;\n    --werr;\n    --wgap;\n    --w;\n    --lld;\n    --d__;\n\n    /* Function Body */\n    *info = 0;\n\n    maxitr = (int) ((log(*spdiam + *pivmin) - log(*pivmin)) / log(2.)) + \n\t    2;\n    mnwdth = *pivmin * 2.;\n\n    r__ = *twist;\n    if (r__ < 1 || r__ > *n) {\n\tr__ = *n;\n    }\n\n/*     Initialize unconverged intervals in [ WORK(2*I-1), WORK(2*I) ]. */\n/*     The Sturm Count, Count( WORK(2*I-1) ) is arranged to be I-1, while */\n/*     Count( WORK(2*I) ) is stored in IWORK( 2*I ). The int IWORK( 2*I-1 ) */\n/*     for an unconverged interval is set to the index of the next unconverged */\n/*     interval, and is -1 or 0 for a converged interval. Thus a linked */\n/*     list of unconverged intervals is set up. */\n\n    i1 = *ifirst;\n/*     The number of unconverged intervals */\n    nint = 0;\n/*     The last unconverged interval found */\n    prev = 0;\n    rgap = wgap[i1 - *offset];\n    i__1 = *ilast;\n    for (i__ = i1; i__ <= i__1; ++i__) {\n\tk = i__ << 1;\n\tii = i__ - *offset;\n\tleft = w[ii] - werr[ii];\n\tright = w[ii] + werr[ii];\n\tlgap = rgap;\n\trgap = wgap[ii];\n\tgap = fmin(lgap,rgap);\n/*        Make sure that [LEFT,RIGHT] contains the desired eigenvalue */\n/*        Compute negcount from dstqds facto L+D+L+^T = L D L^T - LEFT */\n\n/*        Do while( NEGCNT(LEFT).GT.I-1 ) */\n\n\tback = werr[ii];\nL20:\n\tnegcnt = odneg(n, &d__[1], &lld[1], &left, pivmin, &r__);\n\tif (negcnt > i__ - 1) {\n\t    left -= back;\n\t    back *= 2.;\n\t    goto L20;\n\t}\n\n/*        Do while( NEGCNT(RIGHT).LT.I ) */\n/*        Compute negcount from dstqds facto L+D+L+^T = L D L^T - RIGHT */\n\n\tback = werr[ii];\nL50:\n\tnegcnt = odneg(n, &d__[1], &lld[1], &right, pivmin, &r__);\n\tif (negcnt < i__) {\n\t    right += back;\n\t    back *= 2.;\n\t    goto L50;\n\t}\n\twidth = (d__1 = left - right, fabs(d__1)) * .5;\n/* Computing MAX */\n\td__1 = fabs(left), d__2 = fabs(right);\n\ttmp = fmax(d__1,d__2);\n/* Computing MAX */\n\td__1 = *rtol1 * gap, d__2 = *rtol2 * tmp;\n\tcvrgd = fmax(d__1,d__2);\n\tif (width <= cvrgd || width <= mnwdth) {\n/*           This interval has already converged and does not need refinement. */\n/*           (Note that the gaps might change through refining the */\n/*            eigenvalues, however, they can only get bigger.) */\n/*           Remove it from the list. */\n\t    iwork[k - 1] = -1;\n/*           Make sure that I1 always points to the first unconverged interval */\n\t    if (i__ == i1 && i__ < *ilast) {\n\t\ti1 = i__ + 1;\n\t    }\n\t    if (prev >= i1 && i__ <= *ilast) {\n\t\tiwork[(prev << 1) - 1] = i__ + 1;\n\t    }\n\t} else {\n/*           unconverged interval found */\n\t    prev = i__;\n\t    ++nint;\n\t    iwork[k - 1] = i__ + 1;\n\t    iwork[k] = negcnt;\n\t}\n\twork[k - 1] = left;\n\twork[k] = right;\n/* L75: */\n    }\n\n/*     Do while( NINT.GT.0 ), i.e. there are still unconverged intervals */\n/*     and while (ITER.LT.MAXITR) */\n\n    iter = 0;\nL80:\n    prev = i1 - 1;\n    i__ = i1;\n    olnint = nint;\n    i__1 = olnint;\n    for (ip = 1; ip <= i__1; ++ip) {\n\tk = i__ << 1;\n\tii = i__ - *offset;\n\trgap = wgap[ii];\n\tlgap = rgap;\n\tif (ii > 1) {\n\t    lgap = wgap[ii - 1];\n\t}\n\tgap = fmin(lgap,rgap);\n\tnext = iwork[k - 1];\n\tleft = work[k - 1];\n\tright = work[k];\n\tmid = (left + right) * .5;\n/*        semiwidth of interval */\n\twidth = right - mid;\n/* Computing MAX */\n\td__1 = fabs(left), d__2 = fabs(right);\n\ttmp = fmax(d__1,d__2);\n/* Computing MAX */\n\td__1 = *rtol1 * gap, d__2 = *rtol2 * tmp;\n\tcvrgd = fmax(d__1,d__2);\n\tif (width <= cvrgd || width <= mnwdth || iter == maxitr) {\n/*           reduce number of unconverged intervals */\n\t    --nint;\n/*           Mark interval as converged. */\n\t    iwork[k - 1] = 0;\n\t    if (i1 == i__) {\n\t\ti1 = next;\n\t    } else {\n/*              Prev holds the last unconverged interval previously examined */\n\t\tif (prev >= i1) {\n\t\t    iwork[(prev << 1) - 1] = next;\n\t\t}\n\t    }\n\t    i__ = next;\n\t    goto L100;\n\t}\n\tprev = i__;\n\n/*        Perform one bisection step */\n\n\tnegcnt = odneg(n, &d__[1], &lld[1], &mid, pivmin, &r__);\n\tif (negcnt <= i__ - 1) {\n\t    work[k - 1] = mid;\n\t} else {\n\t    work[k] = mid;\n\t}\n\ti__ = next;\nL100:\n\t;\n    }\n    ++iter;\n/*     do another loop if there are still unconverged intervals */\n/*     However, in the last iteration, all intervals are accepted */\n/*     since this is the best we can do. */\n    if (nint > 0 && iter <= maxitr) {\n\tgoto L80;\n    }\n\n\n/*     At this point, all the intervals have converged */\n    i__1 = *ilast;\n    for (i__ = *ifirst; i__ <= i__1; ++i__) {\n\tk = i__ << 1;\n\tii = i__ - *offset;\n/*        All intervals marked by '0' have been refined. */\n\tif (iwork[k - 1] == 0) {\n\t    w[ii] = (work[k - 1] + work[k]) * .5;\n\t    werr[ii] = work[k] - w[ii];\n\t}\n/* L110: */\n    }\n\n    i__1 = *ilast;\n    for (i__ = *ifirst + 1; i__ <= i__1; ++i__) {\n\tk = i__ << 1;\n\tii = i__ - *offset;\n/* Computing MAX */\n\td__1 = 0., d__2 = w[ii] - werr[ii] - w[ii - 1] - werr[ii - 1];\n\twgap[ii - 1] = fmax(d__1,d__2);\n/* L111: */\n    }\n    return 0;\n\n/*     End of ODRRB */\n\n} /* odrrb_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrrc.c",
    "content": "/* dlarrc.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n\n/* Subroutine */ \nint odrrc(char *jobt, int *n, double *vl, \n\tdouble *vu, double *d__, double *e, double *pivmin, \n\tint *eigcnt, int *lcnt, int *rcnt, int *info)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1;\n\n    /* Local variables */\n    int i__;\n    double sl, su, tmp, tmp2;\n    int matt;\n    extern int olsame(char *, char *);\n    double lpivot, rpivot;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  Find the number of eigenvalues of the symmetric tridiagonal matrix T */\n/*  that are in the interval (VL,VU] if JOBT = 'T', and of L D L^T */\n/*  if JOBT = 'L'. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  JOBT    (input) CHARACTER*1 */\n/*          = 'T':  Compute Sturm count for matrix T. */\n/*          = 'L':  Compute Sturm count for matrix L D L^T. */\n\n/*  N       (input) INT */\n/*          The order of the matrix. N > 0. */\n\n/*  VL      (input) DOUBLE PRECISION */\n/*  VU      (input) DOUBLE PRECISION */\n/*          The lower and upper bounds for the eigenvalues. */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          JOBT = 'T': The N diagonal elements of the tridiagonal matrix T. */\n/*          JOBT = 'L': The N diagonal elements of the diagonal matrix D. */\n\n/*  E       (input) DOUBLE PRECISION array, dimension (N) */\n/*          JOBT = 'T': The N-1 offdiagonal elements of the matrix T. */\n/*          JOBT = 'L': The N-1 offdiagonal elements of the matrix L. */\n\n/*  PIVMIN  (input) DOUBLE PRECISION */\n/*          The minimum pivot in the Sturm sequence for T. */\n\n/*  EIGCNT  (output) INT */\n/*          The number of eigenvalues of the symmetric tridiagonal matrix T */\n/*          that are in the interval (VL,VU] */\n\n/*  LCNT    (output) INT */\n/*  RCNT    (output) INT */\n/*          The left and right negcounts of the interval. */\n\n/*  INFO    (output) INT */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --e;\n    --d__;\n\n    /* Function Body */\n    *info = 0;\n    *lcnt = 0;\n    *rcnt = 0;\n    *eigcnt = 0;\n    matt = olsame(jobt, \"T\");\n    if (matt) {\n/*        Sturm sequence count on T */\n\tlpivot = d__[1] - *vl;\n\trpivot = d__[1] - *vu;\n\tif (lpivot <= 0.) {\n\t    ++(*lcnt);\n\t}\n\tif (rpivot <= 0.) {\n\t    ++(*rcnt);\n\t}\n\ti__1 = *n - 1;\n\tfor (i__ = 1; i__ <= i__1; ++i__) {\n/* Computing 2nd power */\n\t    d__1 = e[i__];\n\t    tmp = d__1 * d__1;\n\t    lpivot = d__[i__ + 1] - *vl - tmp / lpivot;\n\t    rpivot = d__[i__ + 1] - *vu - tmp / rpivot;\n\t    if (lpivot <= 0.) {\n\t\t++(*lcnt);\n\t    }\n\t    if (rpivot <= 0.) {\n\t\t++(*rcnt);\n\t    }\n/* L10: */\n\t}\n    } else {\n/*        Sturm sequence count on L D L^T */\n\tsl = -(*vl);\n\tsu = -(*vu);\n\ti__1 = *n - 1;\n\tfor (i__ = 1; i__ <= i__1; ++i__) {\n\t    lpivot = d__[i__] + sl;\n\t    rpivot = d__[i__] + su;\n\t    if (lpivot <= 0.) {\n\t\t++(*lcnt);\n\t    }\n\t    if (rpivot <= 0.) {\n\t\t++(*rcnt);\n\t    }\n\t    tmp = e[i__] * d__[i__] * e[i__];\n\n\t    tmp2 = tmp / lpivot;\n\t    if (tmp2 == 0.) {\n\t\tsl = tmp - *vl;\n\t    } else {\n\t\tsl = sl * tmp2 - *vl;\n\t    }\n\n\t    tmp2 = tmp / rpivot;\n\t    if (tmp2 == 0.) {\n\t\tsu = tmp - *vu;\n\t    } else {\n\t\tsu = su * tmp2 - *vu;\n\t    }\n/* L20: */\n\t}\n\tlpivot = d__[*n] + sl;\n\trpivot = d__[*n] + su;\n\tif (lpivot <= 0.) {\n\t    ++(*lcnt);\n\t}\n\tif (rpivot <= 0.) {\n\t    ++(*rcnt);\n\t}\n    }\n    *eigcnt = *rcnt - *lcnt;\n    return 0;\n\n/*     end of ODRRC */\n\n} /* odrrc_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrrd.c",
    "content": "/* dlarrd.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n#define imax(a,b) ( (a) > (b) ? (a) : (b) )\n#define imin(a,b) ( (a) < (b) ? (a) : (b) )\n#define TRUE_ (1)\n#define FALSE_ (0)\n\n/* Table of constant values */\nstatic int c__1 = 1;\nstatic int c_n1 = -1;\nstatic int c__3 = 3;\nstatic int c__2 = 2;\nstatic int c__0 = 0;\n\n/* Subroutine */ \nint odrrd(char *range, char *order, int *n, double *vl,  \n\tdouble *vu, int *il, int *iu, double *gers, \n\tdouble *reltol, double *d__, double *e, double *e2, \n\tdouble *pivmin, int *nsplit, int *isplit, int *m, \n\tdouble *w, double *werr, double *wl, double *wu, \n\tint *iblock, int *indexw, double *work, int *iwork, \n\tint *info)\n{\n    /* System generated locals */\n    int i__1, i__2, i__3;\n    double d__1, d__2;\n\n    /* Builtin functions */\n    // double log(double);\n\n    /* Local variables */\n    int i__, j, ib, ie, je, nb;\n    double gl;\n    int im, in;\n    double gu;\n    int iw, jee;\n    double eps;\n    int nwl;\n    double wlu, wul;\n    int nwu;\n    double tmp1, tmp2;\n    int iend, jblk, ioff, iout, itmp1, itmp2, jdisc;\n    extern int olsame(char *, char *);\n    int iinfo;\n    double atoli;\n    int iwoff, itmax;\n    double wkill, rtoli, uflow, tnorm;\n    // extern double dlamch(char *);\n    int ibegin;\n    extern /* Subroutine */ int odebz(int *, int *, int *, \n\t    int *, int *, int *, double *, double *, \n\t    double *, double *, double *, double *, int *, \n\t     double *, double *, int *, int *, double *, \n\t    int *, int *);\n    int irange, idiscl, idumma[1];\n    /* extern int ilaenv(int *, char *, char *, int *, int *,  */\n    /* \t    int *, int *); */\n    int idiscu;\n    int ncnvrg, toofew;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2.1)                        -- */\n/*  -- LAPACK is a software package provided by Univ. of Tennessee,    -- */\n/*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */\n/*  -- April 2009                                                      -- */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODRRD computes the eigenvalues of a symmetric tridiagonal */\n/*  matrix T to suitable accuracy. This is an auxiliary code to be */\n/*  called from DSTEMR. */\n/*  The user may ask for all eigenvalues, all eigenvalues */\n/*  in the half-open interval (VL, VU], or the IL-th through IU-th */\n/*  eigenvalues. */\n\n/*  To avoid overflow, the matrix must be scaled so that its */\n/*  largest element is no greater than overflow**(1/2) * */\n/*  underflow**(1/4) in absolute value, and for greatest */\n/*  accuracy, it should not be much smaller than that. */\n\n/*  See W. Kahan \"Accurate Eigenvalues of a Symmetric Tridiagonal */\n/*  Matrix\", Report CS41, Computer Science Dept., Stanford */\n/*  University, July 21, 1966. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  RANGE   (input) CHARACTER */\n/*          = 'A': (\"All\")   all eigenvalues will be found. */\n/*          = 'V': (\"Value\") all eigenvalues in the half-open interval */\n/*                           (VL, VU] will be found. */\n/*          = 'I': (\"Index\") the IL-th through IU-th eigenvalues (of the */\n/*                           entire matrix) will be found. */\n\n/*  ORDER   (input) CHARACTER */\n/*          = 'B': (\"By Block\") the eigenvalues will be grouped by */\n/*                              split-off block (see IBLOCK, ISPLIT) and */\n/*                              ordered from smallest to largest within */\n/*                              the block. */\n/*          = 'E': (\"Entire matrix\") */\n/*                              the eigenvalues for the entire matrix */\n/*                              will be ordered from smallest to */\n/*                              largest. */\n\n/*  N       (input) INT */\n/*          The order of the tridiagonal matrix T.  N >= 0. */\n\n/*  VL      (input) DOUBLE PRECISION */\n/*  VU      (input) DOUBLE PRECISION */\n/*          If RANGE='V', the lower and upper bounds of the interval to */\n/*          be searched for eigenvalues.  Eigenvalues less than or equal */\n/*          to VL, or greater than VU, will not be returned.  VL < VU. */\n/*          Not referenced if RANGE = 'A' or 'I'. */\n\n/*  IL      (input) INT */\n/*  IU      (input) INT */\n/*          If RANGE='I', the indices (in ascending order) of the */\n/*          smallest and largest eigenvalues to be returned. */\n/*          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. */\n/*          Not referenced if RANGE = 'A' or 'V'. */\n\n/*  GERS    (input) DOUBLE PRECISION array, dimension (2*N) */\n/*          The N Gerschgorin intervals (the i-th Gerschgorin interval */\n/*          is (GERS(2*i-1), GERS(2*i)). */\n\n/*  RELTOL  (input) DOUBLE PRECISION */\n/*          The minimum relative width of an interval.  When an interval */\n/*          is narrower than RELTOL times the larger (in */\n/*          magnitude) endpoint, then it is considered to be */\n/*          sufficiently small, i.e., converged.  Note: this should */\n/*          always be at least radix*machine epsilon. */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The n diagonal elements of the tridiagonal matrix T. */\n\n/*  E       (input) DOUBLE PRECISION array, dimension (N-1) */\n/*          The (n-1) off-diagonal elements of the tridiagonal matrix T. */\n\n/*  E2      (input) DOUBLE PRECISION array, dimension (N-1) */\n/*          The (n-1) squared off-diagonal elements of the tridiagonal matrix T. */\n\n/*  PIVMIN  (input) DOUBLE PRECISION */\n/*          The minimum pivot allowed in the Sturm sequence for T. */\n\n/*  NSPLIT  (input) INT */\n/*          The number of diagonal blocks in the matrix T. */\n/*          1 <= NSPLIT <= N. */\n\n/*  ISPLIT  (input) INT array, dimension (N) */\n/*          The splitting points, at which T breaks up into submatrices. */\n/*          The first submatrix consists of rows/columns 1 to ISPLIT(1), */\n/*          the second of rows/columns ISPLIT(1)+1 through ISPLIT(2), */\n/*          etc., and the NSPLIT-th consists of rows/columns */\n/*          ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N. */\n/*          (Only the first NSPLIT elements will actually be used, but */\n/*          since the user cannot know a priori what value NSPLIT will */\n/*          have, N words must be reserved for ISPLIT.) */\n\n/*  M       (output) INT */\n/*          The actual number of eigenvalues found. 0 <= M <= N. */\n/*          (See also the description of INFO=2,3.) */\n\n/*  W       (output) DOUBLE PRECISION array, dimension (N) */\n/*          On exit, the first M elements of W will contain the */\n/*          eigenvalue approximations. ODRRD computes an interval */\n/*          I_j = (a_j, b_j] that includes eigenvalue j. The eigenvalue */\n/*          approximation is given as the interval midpoint */\n/*          W(j)= ( a_j + b_j)/2. The corresponding error is bounded by */\n/*          WERR(j) = abs( a_j - b_j)/2 */\n\n/*  WERR    (output) DOUBLE PRECISION array, dimension (N) */\n/*          The error bound on the corresponding eigenvalue approximation */\n/*          in W. */\n\n/*  WL      (output) DOUBLE PRECISION */\n/*  WU      (output) DOUBLE PRECISION */\n/*          The interval (WL, WU] contains all the wanted eigenvalues. */\n/*          If RANGE='V', then WL=VL and WU=VU. */\n/*          If RANGE='A', then WL and WU are the global Gerschgorin bounds */\n/*                        on the spectrum. */\n/*          If RANGE='I', then WL and WU are computed by ODEBZ from the */\n/*                        index range specified. */\n\n/*  IBLOCK  (output) INT array, dimension (N) */\n/*          At each row/column j where E(j) is zero or small, the */\n/*          matrix T is considered to split into a block diagonal */\n/*          matrix.  On exit, if INFO = 0, IBLOCK(i) specifies to which */\n/*          block (from 1 to the number of blocks) the eigenvalue W(i) */\n/*          belongs.  (ODRRD may use the remaining N-M elements as */\n/*          workspace.) */\n\n/*  INDEXW  (output) INT array, dimension (N) */\n/*          The indices of the eigenvalues within each block (submatrix); */\n/*          for example, INDEXW(i)= j and IBLOCK(i)=k imply that the */\n/*          i-th eigenvalue W(i) is the j-th eigenvalue in block k. */\n\n/*  WORK    (workspace) DOUBLE PRECISION array, dimension (4*N) */\n\n/*  IWORK   (workspace) INT array, dimension (3*N) */\n\n/*  INFO    (output) INT */\n/*          = 0:  successful exit */\n/*          < 0:  if INFO = -i, the i-th argument had an illegal value */\n/*          > 0:  some or all of the eigenvalues failed to converge or */\n/*                were not computed: */\n/*                =1 or 3: Bisection failed to converge for some */\n/*                        eigenvalues; these eigenvalues are flagged by a */\n/*                        negative block number.  The effect is that the */\n/*                        eigenvalues may not be as accurate as the */\n/*                        absolute and relative tolerances.  This is */\n/*                        generally caused by unexpectedly inaccurate */\n/*                        arithmetic. */\n/*                =2 or 3: RANGE='I' only: Not all of the eigenvalues */\n/*                        IL:IU were found. */\n/*                        Effect: M < IU+1-IL */\n/*                        Cause:  non-monotonic arithmetic, causing the */\n/*                                Sturm sequence to be non-monotonic. */\n/*                        Cure:   recalculate, using RANGE='A', and pick */\n/*                                out eigenvalues IL:IU.  In some cases, */\n/*                                increasing the PARAMETER \"FUDGE\" may */\n/*                                make things work. */\n/*                = 4:    RANGE='I', and the Gershgorin interval */\n/*                        initially used was too small.  No eigenvalues */\n/*                        were computed. */\n/*                        Probable cause: your machine has sloppy */\n/*                                        floating-point arithmetic. */\n/*                        Cure: Increase the PARAMETER \"FUDGE\", */\n/*                              recompile, and try again. */\n\n/*  Internal Parameters */\n/*  =================== */\n\n/*  FUDGE   DOUBLE PRECISION, default = 2 */\n/*          A \"fudge factor\" to widen the Gershgorin intervals.  Ideally, */\n/*          a value of 1 should work, but on machines with sloppy */\n/*          arithmetic, this needs to be larger.  The default for */\n/*          publicly released versions should be large enough to handle */\n/*          the worst machine around.  Note that this has no effect */\n/*          on accuracy of the solution. */\n\n/*  Based on contributions by */\n/*     W. Kahan, University of California, Berkeley, USA */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Local Arrays .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --iwork;\n    --work;\n    --indexw;\n    --iblock;\n    --werr;\n    --w;\n    --isplit;\n    --e2;\n    --e;\n    --d__;\n    --gers;\n\n    /* Function Body */\n    *info = 0;\n\n/*     Decode RANGE */\n\n    if (olsame(range, \"A\")) {\n\tirange = 1;\n    } else if (olsame(range, \"V\")) {\n\tirange = 2;\n    } else if (olsame(range, \"I\")) {\n\tirange = 3;\n    } else {\n\tirange = 0;\n    }\n\n/*     Check for Errors */\n\n    if (irange <= 0) {\n\t*info = -1;\n    } else if (! (olsame(order, \"B\") || olsame(order, \"E\"))) {\n\t*info = -2;\n    } else if (*n < 0) {\n\t*info = -3;\n    } else if (irange == 2) {\n\tif (*vl >= *vu) {\n\t    *info = -5;\n\t}\n    } else if (irange == 3 && (*il < 1 || *il > imax(1,*n))) {\n\t*info = -6;\n    } else if (irange == 3 && (*iu < imin(*n,*il) || *iu > *n)) {\n\t*info = -7;\n    }\n\n    if (*info != 0) {\n\treturn 0;\n    }\n/*     Initialize error flags */\n    *info = 0;\n    ncnvrg = FALSE_;\n    toofew = FALSE_;\n/*     Quick return if possible */\n    *m = 0;\n    if (*n == 0) {\n\treturn 0;\n    }\n/*     Simplification: */\n    if (irange == 3 && *il == 1 && *iu == *n) {\n\tirange = 1;\n    }\n/*     Get machine constants */\n    eps = DBL_EPSILON; // odmch(\"P\");\n    uflow = DBL_MIN;  // odmch(\"U\");\n/*     Special Case when N=1 */\n/*     Treat case of 1x1 matrix for quick return */\n    if (*n == 1) {\n\tif (irange == 1 || irange == 2 && d__[1] > *vl && d__[1] <= *vu || \n\t\tirange == 3 && *il == 1 && *iu == 1) {\n\t    *m = 1;\n\t    w[1] = d__[1];\n/*           The computation error of the eigenvalue is zero */\n\t    werr[1] = 0.;\n\t    iblock[1] = 1;\n\t    indexw[1] = 1;\n\t}\n\treturn 0;\n    }\n/*     NB is the minimum vector length for vector bisection, or 0 */\n/*     if only scalar is to be done. */\n    nb = 1; // ilaenv(&c__1, \"DSTEBZ\", \" \", n, &c_n1, &c_n1, &c_n1);\n    if (nb <= 1) {\n\tnb = 0;\n    }\n/*     Find global spectral radius */\n    gl = d__[1];\n    gu = d__[1];\n    i__1 = *n;\n    for (i__ = 1; i__ <= i__1; ++i__) {\n/* Computing MIN */\n\td__1 = gl, d__2 = gers[(i__ << 1) - 1];\n\tgl = fmin(d__1,d__2);\n/* Computing MAX */\n\td__1 = gu, d__2 = gers[i__ * 2];\n\tgu = fmax(d__1,d__2);\n/* L5: */\n    }\n/*     Compute global Gerschgorin bounds and spectral diameter */\n/* Computing MAX */\n    d__1 = fabs(gl), d__2 = fabs(gu);\n    tnorm = fmax(d__1,d__2);\n    gl = gl - tnorm * 2. * eps * *n - *pivmin * 4.;\n    gu = gu + tnorm * 2. * eps * *n + *pivmin * 4.;\n/*     [JAN/28/2009] remove the line below since SPDIAM variable not use */\n/*     SPDIAM = GU - GL */\n/*     Input arguments for ODEBZ: */\n/*     The relative tolerance.  An interval (a,b] lies within */\n/*     \"relative tolerance\" if  b-a < RELTOL*max(|a|,|b|), */\n    rtoli = *reltol;\n/*     Set the absolute tolerance for interval convergence to zero to force */\n/*     interval convergence based on relative size of the interval. */\n/*     This is dangerous because intervals might not converge when RELTOL is */\n/*     small. But at least a very small number should be selected so that for */\n/*     strongly graded matrices, the code can get relatively accurate */\n/*     eigenvalues. */\n    atoli = uflow * 4. + *pivmin * 4.;\n    if (irange == 3) {\n/*        RANGE='I': Compute an interval containing eigenvalues */\n/*        IL through IU. The initial interval [GL,GU] from the global */\n/*        Gerschgorin bounds GL and GU is refined by ODEBZ. */\n\titmax = (int) ((log(tnorm + *pivmin) - log(*pivmin)) / log(2.)) + \n\t\t2;\n\twork[*n + 1] = gl;\n\twork[*n + 2] = gl;\n\twork[*n + 3] = gu;\n\twork[*n + 4] = gu;\n\twork[*n + 5] = gl;\n\twork[*n + 6] = gu;\n\tiwork[1] = -1;\n\tiwork[2] = -1;\n\tiwork[3] = *n + 1;\n\tiwork[4] = *n + 1;\n\tiwork[5] = *il - 1;\n\tiwork[6] = *iu;\n\n\todebz(&c__3, &itmax, n, &c__2, &c__2, &nb, &atoli, &rtoli, pivmin, &\n\t\td__[1], &e[1], &e2[1], &iwork[5], &work[*n + 1], &work[*n + 5]\n, &iout, &iwork[1], &w[1], &iblock[1], &iinfo);\n\tif (iinfo != 0) {\n\t    *info = iinfo;\n\t    return 0;\n\t}\n/*        On exit, output intervals may not be ordered by ascending negcount */\n\tif (iwork[6] == *iu) {\n\t    *wl = work[*n + 1];\n\t    wlu = work[*n + 3];\n\t    nwl = iwork[1];\n\t    *wu = work[*n + 4];\n\t    wul = work[*n + 2];\n\t    nwu = iwork[4];\n\t} else {\n\t    *wl = work[*n + 2];\n\t    wlu = work[*n + 4];\n\t    nwl = iwork[2];\n\t    *wu = work[*n + 3];\n\t    wul = work[*n + 1];\n\t    nwu = iwork[3];\n\t}\n/*        On exit, the interval [WL, WLU] contains a value with negcount NWL, */\n/*        and [WUL, WU] contains a value with negcount NWU. */\n\tif (nwl < 0 || nwl >= *n || nwu < 1 || nwu > *n) {\n\t    *info = 4;\n\t    return 0;\n\t}\n    } else if (irange == 2) {\n\t*wl = *vl;\n\t*wu = *vu;\n    } else if (irange == 1) {\n\t*wl = gl;\n\t*wu = gu;\n    }\n/*     Find Eigenvalues -- Loop Over blocks and recompute NWL and NWU. */\n/*     NWL accumulates the number of eigenvalues .le. WL, */\n/*     NWU accumulates the number of eigenvalues .le. WU */\n    *m = 0;\n    iend = 0;\n    *info = 0;\n    nwl = 0;\n    nwu = 0;\n\n    i__1 = *nsplit;\n    for (jblk = 1; jblk <= i__1; ++jblk) {\n\tioff = iend;\n\tibegin = ioff + 1;\n\tiend = isplit[jblk];\n\tin = iend - ioff;\n\n\tif (in == 1) {\n/*           1x1 block */\n\t    if (*wl >= d__[ibegin] - *pivmin) {\n\t\t++nwl;\n\t    }\n\t    if (*wu >= d__[ibegin] - *pivmin) {\n\t\t++nwu;\n\t    }\n\t    if (irange == 1 || *wl < d__[ibegin] - *pivmin && *wu >= d__[\n\t\t    ibegin] - *pivmin) {\n\t\t++(*m);\n\t\tw[*m] = d__[ibegin];\n\t\twerr[*m] = 0.;\n/*              The gap for a single block doesn't matter for the later */\n/*              algorithm and is assigned an arbitrary large value */\n\t\tiblock[*m] = jblk;\n\t\tindexw[*m] = 1;\n\t    }\n/*        Disabled 2x2 case because of a failure on the following matrix */\n/*        RANGE = 'I', IL = IU = 4 */\n/*          Original Tridiagonal, d = [ */\n/*           -0.150102010615740E+00 */\n/*           -0.849897989384260E+00 */\n/*           -0.128208148052635E-15 */\n/*            0.128257718286320E-15 */\n/*          ]; */\n/*          e = [ */\n/*           -0.357171383266986E+00 */\n/*           -0.180411241501588E-15 */\n/*           -0.175152352710251E-15 */\n/*          ]; */\n\n/*         ELSE IF( IN.EQ.2 ) THEN */\n/* *           2x2 block */\n/*            DISC = SQRT( (HALF*(D(IBEGIN)-D(IEND)))**2 + E(IBEGIN)**2 ) */\n/*            TMP1 = HALF*(D(IBEGIN)+D(IEND)) */\n/*            L1 = TMP1 - DISC */\n/*            IF( WL.GE. L1-PIVMIN ) */\n/*     $         NWL = NWL + 1 */\n/*            IF( WU.GE. L1-PIVMIN ) */\n/*     $         NWU = NWU + 1 */\n/*            IF( IRANGE.EQ.ALLRNG .OR. ( WL.LT.L1-PIVMIN .AND. WU.GE. */\n/*     $          L1-PIVMIN ) ) THEN */\n/*               M = M + 1 */\n/*               W( M ) = L1 */\n/* *              The uncertainty of eigenvalues of a 2x2 matrix is very small */\n/*               WERR( M ) = EPS * ABS( W( M ) ) * TWO */\n/*               IBLOCK( M ) = JBLK */\n/*               INDEXW( M ) = 1 */\n/*            ENDIF */\n/*            L2 = TMP1 + DISC */\n/*            IF( WL.GE. L2-PIVMIN ) */\n/*     $         NWL = NWL + 1 */\n/*            IF( WU.GE. L2-PIVMIN ) */\n/*     $         NWU = NWU + 1 */\n/*            IF( IRANGE.EQ.ALLRNG .OR. ( WL.LT.L2-PIVMIN .AND. WU.GE. */\n/*     $          L2-PIVMIN ) ) THEN */\n/*               M = M + 1 */\n/*               W( M ) = L2 */\n/* *              The uncertainty of eigenvalues of a 2x2 matrix is very small */\n/*               WERR( M ) = EPS * ABS( W( M ) ) * TWO */\n/*               IBLOCK( M ) = JBLK */\n/*               INDEXW( M ) = 2 */\n/*            ENDIF */\n\t} else {\n/*           General Case - block of size IN >= 2 */\n/*           Compute local Gerschgorin interval and use it as the initial */\n/*           interval for ODEBZ */\n\t    gu = d__[ibegin];\n\t    gl = d__[ibegin];\n\t    tmp1 = 0.;\n\t    i__2 = iend;\n\t    for (j = ibegin; j <= i__2; ++j) {\n/* Computing MIN */\n\t\td__1 = gl, d__2 = gers[(j << 1) - 1];\n\t\tgl = fmin(d__1,d__2);\n/* Computing MAX */\n\t\td__1 = gu, d__2 = gers[j * 2];\n\t\tgu = fmax(d__1,d__2);\n/* L40: */\n\t    }\n/*           [JAN/28/2009] */\n/*           change SPDIAM by TNORM in lines 2 and 3 thereafter */\n/*           line 1: remove computation of SPDIAM (not useful anymore) */\n/*           SPDIAM = GU - GL */\n/*           GL = GL - FUDGE*SPDIAM*EPS*IN - FUDGE*PIVMIN */\n/*           GU = GU + FUDGE*SPDIAM*EPS*IN + FUDGE*PIVMIN */\n\t    gl = gl - tnorm * 2. * eps * in - *pivmin * 2.;\n\t    gu = gu + tnorm * 2. * eps * in + *pivmin * 2.;\n\n\t    if (irange > 1) {\n\t\tif (gu < *wl) {\n/*                 the local block contains none of the wanted eigenvalues */\n\t\t    nwl += in;\n\t\t    nwu += in;\n\t\t    goto L70;\n\t\t}\n/*              refine search interval if possible, only range (WL,WU] matters */\n\t\tgl = fmax(gl,*wl);\n\t\tgu = fmin(gu,*wu);\n\t\tif (gl >= gu) {\n\t\t    goto L70;\n\t\t}\n\t    }\n/*           Find negcount of initial interval boundaries GL and GU */\n\t    work[*n + 1] = gl;\n\t    work[*n + in + 1] = gu;\n\t    odebz(&c__1, &c__0, &in, &in, &c__1, &nb, &atoli, &rtoli, \n\t\t    pivmin, &d__[ibegin], &e[ibegin], &e2[ibegin], idumma, &\n\t\t    work[*n + 1], &work[*n + (in << 1) + 1], &im, &iwork[1], &\n\t\t    w[*m + 1], &iblock[*m + 1], &iinfo);\n\t    if (iinfo != 0) {\n\t\t*info = iinfo;\n\t\treturn 0;\n\t    }\n\n\t    nwl += iwork[1];\n\t    nwu += iwork[in + 1];\n\t    iwoff = *m - iwork[1];\n/*           Compute Eigenvalues */\n\t    itmax = (int) ((log(gu - gl + *pivmin) - log(*pivmin)) / log(\n\t\t    2.)) + 2;\n\t    odebz(&c__2, &itmax, &in, &in, &c__1, &nb, &atoli, &rtoli, \n\t\t    pivmin, &d__[ibegin], &e[ibegin], &e2[ibegin], idumma, &\n\t\t    work[*n + 1], &work[*n + (in << 1) + 1], &iout, &iwork[1], \n\t\t     &w[*m + 1], &iblock[*m + 1], &iinfo);\n\t    if (iinfo != 0) {\n\t\t*info = iinfo;\n\t\treturn 0;\n\t    }\n\n/*           Copy eigenvalues into W and IBLOCK */\n/*           Use -JBLK for block number for unconverged eigenvalues. */\n/*           Loop over the number of output intervals from ODEBZ */\n\t    i__2 = iout;\n\t    for (j = 1; j <= i__2; ++j) {\n/*              eigenvalue approximation is middle point of interval */\n\t\ttmp1 = (work[j + *n] + work[j + in + *n]) * .5;\n/*              semi length of error interval */\n\t\ttmp2 = (d__1 = work[j + *n] - work[j + in + *n], fabs(d__1)) * \n\t\t\t.5;\n\t\tif (j > iout - iinfo) {\n/*                 Flag non-convergence. */\n\t\t    ncnvrg = TRUE_;\n\t\t    ib = -jblk;\n\t\t} else {\n\t\t    ib = jblk;\n\t\t}\n\t\ti__3 = iwork[j + in] + iwoff;\n\t\tfor (je = iwork[j] + 1 + iwoff; je <= i__3; ++je) {\n\t\t    w[je] = tmp1;\n\t\t    werr[je] = tmp2;\n\t\t    indexw[je] = je - iwoff;\n\t\t    iblock[je] = ib;\n/* L50: */\n\t\t}\n/* L60: */\n\t    }\n\n\t    *m += im;\n\t}\nL70:\n\t;\n    }\n/*     If RANGE='I', then (WL,WU) contains eigenvalues NWL+1,...,NWU */\n/*     If NWL+1 < IL or NWU > IU, discard extra eigenvalues. */\n    if (irange == 3) {\n\tidiscl = *il - 1 - nwl;\n\tidiscu = nwu - *iu;\n\n\tif (idiscl > 0) {\n\t    im = 0;\n\t    i__1 = *m;\n\t    for (je = 1; je <= i__1; ++je) {\n/*              Remove some of the smallest eigenvalues from the left so that */\n/*              at the end IDISCL =0. Move all eigenvalues up to the left. */\n\t\tif (w[je] <= wlu && idiscl > 0) {\n\t\t    --idiscl;\n\t\t} else {\n\t\t    ++im;\n\t\t    w[im] = w[je];\n\t\t    werr[im] = werr[je];\n\t\t    indexw[im] = indexw[je];\n\t\t    iblock[im] = iblock[je];\n\t\t}\n/* L80: */\n\t    }\n\t    *m = im;\n\t}\n\tif (idiscu > 0) {\n/*           Remove some of the largest eigenvalues from the right so that */\n/*           at the end IDISCU =0. Move all eigenvalues up to the left. */\n\t    im = *m + 1;\n\t    for (je = *m; je >= 1; --je) {\n\t\tif (w[je] >= wul && idiscu > 0) {\n\t\t    --idiscu;\n\t\t} else {\n\t\t    --im;\n\t\t    w[im] = w[je];\n\t\t    werr[im] = werr[je];\n\t\t    indexw[im] = indexw[je];\n\t\t    iblock[im] = iblock[je];\n\t\t}\n/* L81: */\n\t    }\n\t    jee = 0;\n\t    i__1 = *m;\n\t    for (je = im; je <= i__1; ++je) {\n\t\t++jee;\n\t\tw[jee] = w[je];\n\t\twerr[jee] = werr[je];\n\t\tindexw[jee] = indexw[je];\n\t\tiblock[jee] = iblock[je];\n/* L82: */\n\t    }\n\t    *m = *m - im + 1;\n\t}\n\tif (idiscl > 0 || idiscu > 0) {\n/*           Code to deal with effects of bad arithmetic. (If N(w) is */\n/*           monotone non-decreasing, this should never happen.) */\n/*           Some low eigenvalues to be discarded are not in (WL,WLU], */\n/*           or high eigenvalues to be discarded are not in (WUL,WU] */\n/*           so just kill off the smallest IDISCL/largest IDISCU */\n/*           eigenvalues, by marking the corresponding IBLOCK = 0 */\n\t    if (idiscl > 0) {\n\t\twkill = *wu;\n\t\ti__1 = idiscl;\n\t\tfor (jdisc = 1; jdisc <= i__1; ++jdisc) {\n\t\t    iw = 0;\n\t\t    i__2 = *m;\n\t\t    for (je = 1; je <= i__2; ++je) {\n\t\t\tif (iblock[je] != 0 && (w[je] < wkill || iw == 0)) {\n\t\t\t    iw = je;\n\t\t\t    wkill = w[je];\n\t\t\t}\n/* L90: */\n\t\t    }\n\t\t    iblock[iw] = 0;\n/* L100: */\n\t\t}\n\t    }\n\t    if (idiscu > 0) {\n\t\twkill = *wl;\n\t\ti__1 = idiscu;\n\t\tfor (jdisc = 1; jdisc <= i__1; ++jdisc) {\n\t\t    iw = 0;\n\t\t    i__2 = *m;\n\t\t    for (je = 1; je <= i__2; ++je) {\n\t\t\tif (iblock[je] != 0 && (w[je] >= wkill || iw == 0)) {\n\t\t\t    iw = je;\n\t\t\t    wkill = w[je];\n\t\t\t}\n/* L110: */\n\t\t    }\n\t\t    iblock[iw] = 0;\n/* L120: */\n\t\t}\n\t    }\n/*           Now erase all eigenvalues with IBLOCK set to zero */\n\t    im = 0;\n\t    i__1 = *m;\n\t    for (je = 1; je <= i__1; ++je) {\n\t\tif (iblock[je] != 0) {\n\t\t    ++im;\n\t\t    w[im] = w[je];\n\t\t    werr[im] = werr[je];\n\t\t    indexw[im] = indexw[je];\n\t\t    iblock[im] = iblock[je];\n\t\t}\n/* L130: */\n\t    }\n\t    *m = im;\n\t}\n\tif (idiscl < 0 || idiscu < 0) {\n\t    toofew = TRUE_;\n\t}\n    }\n\n    if (irange == 1 && *m != *n || irange == 3 && *m != *iu - *il + 1) {\n\ttoofew = TRUE_;\n    }\n/*     If ORDER='B', do nothing the eigenvalues are already sorted by */\n/*        block. */\n/*     If ORDER='E', sort the eigenvalues from smallest to largest */\n    if (olsame(order, \"E\") && *nsplit > 1) {\n\ti__1 = *m - 1;\n\tfor (je = 1; je <= i__1; ++je) {\n\t    ie = 0;\n\t    tmp1 = w[je];\n\t    i__2 = *m;\n\t    for (j = je + 1; j <= i__2; ++j) {\n\t\tif (w[j] < tmp1) {\n\t\t    ie = j;\n\t\t    tmp1 = w[j];\n\t\t}\n/* L140: */\n\t    }\n\t    if (ie != 0) {\n\t\ttmp2 = werr[ie];\n\t\titmp1 = iblock[ie];\n\t\titmp2 = indexw[ie];\n\t\tw[ie] = w[je];\n\t\twerr[ie] = werr[je];\n\t\tiblock[ie] = iblock[je];\n\t\tindexw[ie] = indexw[je];\n\t\tw[je] = tmp1;\n\t\twerr[je] = tmp2;\n\t\tiblock[je] = itmp1;\n\t\tindexw[je] = itmp2;\n\t    }\n/* L150: */\n\t}\n    }\n\n    *info = 0;\n    if (ncnvrg) {\n\t++(*info);\n    }\n    if (toofew) {\n\t*info += 2;\n    }\n    return 0;\n\n/*     End of ODRRD */\n\n} /* odrrd_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrre.c",
    "content": "/* dlarre.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Table of constant values */\nstatic int c__1 = 1;\nstatic int c__2 = 2;\n#define TRUE_ (1)\n#define FALSE_ (0)\n\n/* Subroutine */ \nint odrre(char *range, int *n, double *vl, \n\tdouble *vu, int *il, int *iu, double *d__, double *e, \n\tdouble *e2, double *rtol1, double *rtol2, double *spltol, \n\tint *nsplit, int *isplit, int *m, double *w, \n\tdouble *werr, double *wgap, int *iblock, int *indexw, \n\tdouble *gers, double *pivmin, double *work, int *\n\tiwork, int *info)\n{\n    /* System generated locals */\n    int i__1, i__2;\n    double d__1, d__2, d__3;\n\n    /* Builtin functions */\n    //    double sqrt(double), log(double);\n\n    /* Local variables */\n    int i__, j;\n    double s1, s2;\n    int mb;\n    double gl;\n    int in, mm;\n    double gu;\n    int cnt;\n    double eps, tau, tmp, rtl;\n    int cnt1, cnt2;\n    double tmp1, eabs;\n    int iend, jblk;\n    double eold;\n    int indl;\n    double dmax__, emax;\n    int wend, idum, indu;\n    double rtol;\n    int iseed[4];\n    double avgap, sigma;\n    extern int olsame(char *, char *);\n    int iinfo;\n    extern /* Subroutine */ int odcpy(int *, double *, int *, \n\t    double *, int *);\n    long double norep;\n    extern /* Subroutine */ int odsq2(int *, double *, int *);\n    // extern double odmch(char *);\n    int ibegin;\n    long double forceb;\n    int irange;\n    double sgndef;\n    extern /* Subroutine */ int odrra(int *, double *, double *, \n\t     double *, double *, double *, int *, int *, \n\t    int *), odrrb(int *, double *, double *, \n\t    int *, int *, double *, double *, int *, \n\t    double *, double *, double *, double *, int *, \n\t     double *, double *, int *, int *), odrrc(char *\n, int *, double *, double *, double *, double \n\t    *, double *, int *, int *, int *, int *);\n    int wbegin;\n    extern /* Subroutine */ int odrrd(char *, char *, int *, double \n\t    *, double *, int *, int *, double *, double *, \n\t     double *, double *, double *, double *, int *\n, int *, int *, double *, double *, double *, \n\t    double *, int *, int *, double *, int *, \n\t    int *);\n    double safmin, spdiam;\n    extern /* Subroutine */ int odrrk(int *, int *, double *, \n\t    double *, double *, double *, double *, \n\t    double *, double *, double *, int *);\n    long double usedqd;\n    double clwdth, isleft;\n    extern /* Subroutine */ int odrnv(int *, int *, int *, \n\t    double *);\n    double isrght, bsrtol, dpivot;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  To find the desired eigenvalues of a given real symmetric */\n/*  tridiagonal matrix T, ODRRE sets any \"small\" off-diagonal */\n/*  elements to zero, and for each unreduced block T_i, it finds */\n/*  (a) a suitable shift at one end of the block's spectrum, */\n/*  (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and */\n/*  (c) eigenvalues of each L_i D_i L_i^T. */\n/*  The representations and eigenvalues found are then used by */\n/*  DSTEMR to compute the eigenvectors of T. */\n/*  The accuracy varies depending on whether bisection is used to */\n/*  find a few eigenvalues or the dqds algorithm (subroutine ODSQ2) to */\n/*  conpute all and then discard any unwanted one. */\n/*  As an added benefit, ODRRE also outputs the n */\n/*  Gerschgorin intervals for the matrices L_i D_i L_i^T. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  RANGE   (input) CHARACTER */\n/*          = 'A': (\"All\")   all eigenvalues will be found. */\n/*          = 'V': (\"Value\") all eigenvalues in the half-open interval */\n/*                           (VL, VU] will be found. */\n/*          = 'I': (\"Index\") the IL-th through IU-th eigenvalues (of the */\n/*                           entire matrix) will be found. */\n\n/*  N       (input) INT */\n/*          The order of the matrix. N > 0. */\n\n/*  VL      (input/output) DOUBLE PRECISION */\n/*  VU      (input/output) DOUBLE PRECISION */\n/*          If RANGE='V', the lower and upper bounds for the eigenvalues. */\n/*          Eigenvalues less than or equal to VL, or greater than VU, */\n/*          will not be returned.  VL < VU. */\n/*          If RANGE='I' or ='A', ODRRE computes bounds on the desired */\n/*          part of the spectrum. */\n\n/*  IL      (input) INT */\n/*  IU      (input) INT */\n/*          If RANGE='I', the indices (in ascending order) of the */\n/*          smallest and largest eigenvalues to be returned. */\n/*          1 <= IL <= IU <= N. */\n\n/*  D       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the N diagonal elements of the tridiagonal */\n/*          matrix T. */\n/*          On exit, the N diagonal elements of the diagonal */\n/*          matrices D_i. */\n\n/*  E       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the first (N-1) entries contain the subdiagonal */\n/*          elements of the tridiagonal matrix T; E(N) need not be set. */\n/*          On exit, E contains the subdiagonal elements of the unit */\n/*          bidiagonal matrices L_i. The entries E( ISPLIT( I ) ), */\n/*          1 <= I <= NSPLIT, contain the base points sigma_i on output. */\n\n/*  E2      (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the first (N-1) entries contain the SQUARES of the */\n/*          subdiagonal elements of the tridiagonal matrix T; */\n/*          E2(N) need not be set. */\n/*          On exit, the entries E2( ISPLIT( I ) ), */\n/*          1 <= I <= NSPLIT, have been set to zero */\n\n/*  RTOL1   (input) DOUBLE PRECISION */\n/*  RTOL2   (input) DOUBLE PRECISION */\n/*           Parameters for bisection. */\n/*           An interval [LEFT,RIGHT] has converged if */\n/*           RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) ) */\n\n/*  SPLTOL (input) DOUBLE PRECISION */\n/*          The threshold for splitting. */\n\n/*  NSPLIT  (output) INT */\n/*          The number of blocks T splits into. 1 <= NSPLIT <= N. */\n\n/*  ISPLIT  (output) INT array, dimension (N) */\n/*          The splitting points, at which T breaks up into blocks. */\n/*          The first block consists of rows/columns 1 to ISPLIT(1), */\n/*          the second of rows/columns ISPLIT(1)+1 through ISPLIT(2), */\n/*          etc., and the NSPLIT-th consists of rows/columns */\n/*          ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N. */\n\n/*  M       (output) INT */\n/*          The total number of eigenvalues (of all L_i D_i L_i^T) */\n/*          found. */\n\n/*  W       (output) DOUBLE PRECISION array, dimension (N) */\n/*          The first M elements contain the eigenvalues. The */\n/*          eigenvalues of each of the blocks, L_i D_i L_i^T, are */\n/*          sorted in ascending order ( ODRRE may use the */\n/*          remaining N-M elements as workspace). */\n\n/*  WERR    (output) DOUBLE PRECISION array, dimension (N) */\n/*          The error bound on the corresponding eigenvalue in W. */\n\n/*  WGAP    (output) DOUBLE PRECISION array, dimension (N) */\n/*          The separation from the right neighbor eigenvalue in W. */\n/*          The gap is only with respect to the eigenvalues of the same block */\n/*          as each block has its own representation tree. */\n/*          Exception: at the right end of a block we store the left gap */\n\n/*  IBLOCK  (output) INT array, dimension (N) */\n/*          The indices of the blocks (submatrices) associated with the */\n/*          corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue */\n/*          W(i) belongs to the first block from the top, =2 if W(i) */\n/*          belongs to the second block, etc. */\n\n/*  INDEXW  (output) INT array, dimension (N) */\n/*          The indices of the eigenvalues within each block (submatrix); */\n/*          for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the */\n/*          i-th eigenvalue W(i) is the 10-th eigenvalue in block 2 */\n\n/*  GERS    (output) DOUBLE PRECISION array, dimension (2*N) */\n/*          The N Gerschgorin intervals (the i-th Gerschgorin interval */\n/*          is (GERS(2*i-1), GERS(2*i)). */\n\n/*  PIVMIN  (output) DOUBLE PRECISION */\n/*          The minimum pivot in the Sturm sequence for T. */\n\n/*  WORK    (workspace) DOUBLE PRECISION array, dimension (6*N) */\n/*          Workspace. */\n\n/*  IWORK   (workspace) INT array, dimension (5*N) */\n/*          Workspace. */\n\n/*  INFO    (output) INT */\n/*          = 0:  successful exit */\n/*          > 0:  A problem occured in ODRRE. */\n/*          < 0:  One of the called subroutines signaled an internal problem. */\n/*                Needs inspection of the corresponding parameter IINFO */\n/*                for further information. */\n\n/*          =-1:  Problem in ODRRD. */\n/*          = 2:  No base representation could be found in MAXTRY iterations. */\n/*                Increasing MAXTRY and recompilation might be a remedy. */\n/*          =-3:  Problem in ODRRB when computing the refined root */\n/*                representation for ODSQ2. */\n/*          =-4:  Problem in ODRRB when preforming bisection on the */\n/*                desired part of the spectrum. */\n/*          =-5:  Problem in ODSQ2. */\n/*          =-6:  Problem in ODSQ2. */\n\n/*  Further Details */\n/*  The base representations are required to suffer very little */\n/*  element growth and consequently define all their eigenvalues to */\n/*  high relative accuracy. */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Local Arrays .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --iwork;\n    --work;\n    --gers;\n    --indexw;\n    --iblock;\n    --wgap;\n    --werr;\n    --w;\n    --isplit;\n    --e2;\n    --e;\n    --d__;\n\n    /* Function Body */\n    *info = 0;\n\n/*     Decode RANGE */\n\n    if (olsame(range, \"A\")) {\n\tirange = 1;\n    } else if (olsame(range, \"V\")) {\n\tirange = 3;\n    } else if (olsame(range, \"I\")) {\n\tirange = 2;\n    }\n    *m = 0;\n/*     Get machine constants */\n    safmin = DBL_MIN; // odmch(\"S\");\n    eps = DBL_EPSILON; // odmch(\"P\");\n/*     Set parameters */\n    rtl = sqrt(eps);\n    bsrtol = sqrt(eps);\n/*     Treat case of 1x1 matrix for quick return */\n    if (*n == 1) {\n\tif (irange == 1 || irange == 3 && d__[1] > *vl && d__[1] <= *vu || \n\t\tirange == 2 && *il == 1 && *iu == 1) {\n\t    *m = 1;\n\t    w[1] = d__[1];\n/*           The computation error of the eigenvalue is zero */\n\t    werr[1] = 0.;\n\t    wgap[1] = 0.;\n\t    iblock[1] = 1;\n\t    indexw[1] = 1;\n\t    gers[1] = d__[1];\n\t    gers[2] = d__[1];\n\t}\n/*        store the shift for the initial RRR, which is zero in this case */\n\te[1] = 0.;\n\treturn 0;\n    }\n/*     General case: tridiagonal matrix of order > 1 */\n\n/*     Init WERR, WGAP. Compute Gerschgorin intervals and spectral diameter. */\n/*     Compute maximum off-diagonal entry and pivmin. */\n    gl = d__[1];\n    gu = d__[1];\n    eold = 0.;\n    emax = 0.;\n    e[*n] = 0.;\n    i__1 = *n;\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\twerr[i__] = 0.;\n\twgap[i__] = 0.;\n\teabs = (d__1 = e[i__], fabs(d__1));\n\tif (eabs >= emax) {\n\t    emax = eabs;\n\t}\n\ttmp1 = eabs + eold;\n\tgers[(i__ << 1) - 1] = d__[i__] - tmp1;\n/* Computing MIN */\n\td__1 = gl, d__2 = gers[(i__ << 1) - 1];\n\tgl = fmin(d__1,d__2);\n\tgers[i__ * 2] = d__[i__] + tmp1;\n/* Computing MAX */\n\td__1 = gu, d__2 = gers[i__ * 2];\n\tgu = fmax(d__1,d__2);\n\teold = eabs;\n/* L5: */\n    }\n/*     The minimum pivot allowed in the Sturm sequence for T */\n/* Computing MAX */\n/* Computing 2nd power */\n    d__3 = emax;\n    d__1 = 1., d__2 = d__3 * d__3;\n    *pivmin = safmin * fmax(d__1,d__2);\n/*     Compute spectral diameter. The Gerschgorin bounds give an */\n/*     estimate that is wrong by at most a factor of SQRT(2) */\n    spdiam = gu - gl;\n/*     Compute splitting points */\n    odrra(n, &d__[1], &e[1], &e2[1], spltol, &spdiam, nsplit, &isplit[1], &\n\t    iinfo);\n/*     Can force use of bisection instead of faster DQDS. */\n/*     Option left in the code for future multisection work. */\n    forceb = FALSE_;\n/*     Initialize USEDQD, DQDS should be used for ALLRNG unless someone */\n/*     explicitly wants bisection. */\n    usedqd = irange == 1 && ! forceb;\n    if (irange == 1 && ! forceb) {\n/*        Set interval [VL,VU] that contains all eigenvalues */\n\t*vl = gl;\n\t*vu = gu;\n    } else {\n/*        We call ODRRD to find crude approximations to the eigenvalues */\n/*        in the desired range. In case IRANGE = INDRNG, we also obtain the */\n/*        interval (VL,VU] that contains all the wanted eigenvalues. */\n/*        An interval [LEFT,RIGHT] has converged if */\n/*        RIGHT-LEFT.LT.RTOL*MAX(ABS(LEFT),ABS(RIGHT)) */\n/*        ODRRD needs a WORK of size 4*N, IWORK of size 3*N */\n\todrrd(range, \"B\", n, vl, vu, il, iu, &gers[1], &bsrtol, &d__[1], &e[\n\t\t1], &e2[1], pivmin, nsplit, &isplit[1], &mm, &w[1], &werr[1], \n\t\tvl, vu, &iblock[1], &indexw[1], &work[1], &iwork[1], &iinfo);\n\tif (iinfo != 0) {\n\t    *info = -1;\n\t    return 0;\n\t}\n/*        Make sure that the entries M+1 to N in W, WERR, IBLOCK, INDEXW are 0 */\n\ti__1 = *n;\n\tfor (i__ = mm + 1; i__ <= i__1; ++i__) {\n\t    w[i__] = 0.;\n\t    werr[i__] = 0.;\n\t    iblock[i__] = 0;\n\t    indexw[i__] = 0;\n/* L14: */\n\t}\n    }\n/* ** */\n/*     Loop over unreduced blocks */\n    ibegin = 1;\n    wbegin = 1;\n    i__1 = *nsplit;\n    for (jblk = 1; jblk <= i__1; ++jblk) {\n\tiend = isplit[jblk];\n\tin = iend - ibegin + 1;\n/*        1 X 1 block */\n\tif (in == 1) {\n\t    if (irange == 1 || irange == 3 && d__[ibegin] > *vl && d__[ibegin]\n\t\t     <= *vu || irange == 2 && iblock[wbegin] == jblk) {\n\t\t++(*m);\n\t\tw[*m] = d__[ibegin];\n\t\twerr[*m] = 0.;\n/*              The gap for a single block doesn't matter for the later */\n/*              algorithm and is assigned an arbitrary large value */\n\t\twgap[*m] = 0.;\n\t\tiblock[*m] = jblk;\n\t\tindexw[*m] = 1;\n\t\t++wbegin;\n\t    }\n/*           E( IEND ) holds the shift for the initial RRR */\n\t    e[iend] = 0.;\n\t    ibegin = iend + 1;\n\t    goto L170;\n\t}\n\n/*        Blocks of size larger than 1x1 */\n\n/*        E( IEND ) will hold the shift for the initial RRR, for now set it =0 */\n\te[iend] = 0.;\n\n/*        Find local outer bounds GL,GU for the block */\n\tgl = d__[ibegin];\n\tgu = d__[ibegin];\n\ti__2 = iend;\n\tfor (i__ = ibegin; i__ <= i__2; ++i__) {\n/* Computing MIN */\n\t    d__1 = gers[(i__ << 1) - 1];\n\t    gl = fmin(d__1,gl);\n/* Computing MAX */\n\t    d__1 = gers[i__ * 2];\n\t    gu = fmax(d__1,gu);\n/* L15: */\n\t}\n\tspdiam = gu - gl;\n\tif (! (irange == 1 && ! forceb)) {\n/*           Count the number of eigenvalues in the current block. */\n\t    mb = 0;\n\t    i__2 = mm;\n\t    for (i__ = wbegin; i__ <= i__2; ++i__) {\n\t\tif (iblock[i__] == jblk) {\n\t\t    ++mb;\n\t\t} else {\n\t\t    goto L21;\n\t\t}\n/* L20: */\n\t    }\nL21:\n\t    if (mb == 0) {\n/*              No eigenvalue in the current block lies in the desired range */\n/*              E( IEND ) holds the shift for the initial RRR */\n\t\te[iend] = 0.;\n\t\tibegin = iend + 1;\n\t\tgoto L170;\n\t    } else {\n/*              Decide whether dqds or bisection is more efficient */\n\t\tusedqd = (double) mb > in * .5 && ! forceb;\n\t\twend = wbegin + mb - 1;\n/*              Calculate gaps for the current block */\n/*              In later stages, when representations for individual */\n/*              eigenvalues are different, we use SIGMA = E( IEND ). */\n\t\tsigma = 0.;\n\t\ti__2 = wend - 1;\n\t\tfor (i__ = wbegin; i__ <= i__2; ++i__) {\n/* Computing MAX */\n\t\t    d__1 = 0., d__2 = w[i__ + 1] - werr[i__ + 1] - (w[i__] + \n\t\t\t    werr[i__]);\n\t\t    wgap[i__] = fmax(d__1,d__2);\n/* L30: */\n\t\t}\n/* Computing MAX */\n\t\td__1 = 0., d__2 = *vu - sigma - (w[wend] + werr[wend]);\n\t\twgap[wend] = fmax(d__1,d__2);\n/*              Find local index of the first and last desired evalue. */\n\t\tindl = indexw[wbegin];\n\t\tindu = indexw[wend];\n\t    }\n\t}\n\tif (irange == 1 && ! forceb || usedqd) {\n/*           Case of DQDS */\n/*           Find approximations to the extremal eigenvalues of the block */\n\t    odrrk(&in, &c__1, &gl, &gu, &d__[ibegin], &e2[ibegin], pivmin, &\n\t\t    rtl, &tmp, &tmp1, &iinfo);\n\t    if (iinfo != 0) {\n\t\t*info = -1;\n\t\treturn 0;\n\t    }\n/* Computing MAX */\n\t    d__2 = gl, d__3 = tmp - tmp1 - eps * 100. * (d__1 = tmp - tmp1, \n\t\t    fabs(d__1));\n\t    isleft = fmax(d__2,d__3);\n\t    odrrk(&in, &in, &gl, &gu, &d__[ibegin], &e2[ibegin], pivmin, &\n\t\t    rtl, &tmp, &tmp1, &iinfo);\n\t    if (iinfo != 0) {\n\t\t*info = -1;\n\t\treturn 0;\n\t    }\n/* Computing MIN */\n\t    d__2 = gu, d__3 = tmp + tmp1 + eps * 100. * (d__1 = tmp + tmp1, \n\t\t    fabs(d__1));\n\t    isrght = fmin(d__2,d__3);\n/*           Improve the estimate of the spectral diameter */\n\t    spdiam = isrght - isleft;\n\t} else {\n/*           Case of bisection */\n/*           Find approximations to the wanted extremal eigenvalues */\n/* Computing MAX */\n\t    d__2 = gl, d__3 = w[wbegin] - werr[wbegin] - eps * 100. * (d__1 = \n\t\t    w[wbegin] - werr[wbegin], fabs(d__1));\n\t    isleft = fmax(d__2,d__3);\n/* Computing MIN */\n\t    d__2 = gu, d__3 = w[wend] + werr[wend] + eps * 100. * (d__1 = w[\n\t\t    wend] + werr[wend], fabs(d__1));\n\t    isrght = fmin(d__2,d__3);\n\t}\n/*        Decide whether the base representation for the current block */\n/*        L_JBLK D_JBLK L_JBLK^T = T_JBLK - sigma_JBLK I */\n/*        should be on the left or the right end of the current block. */\n/*        The strategy is to shift to the end which is \"more populated\" */\n/*        Furthermore, decide whether to use DQDS for the computation of */\n/*        the eigenvalue approximations at the end of ODRRE or bisection. */\n/*        dqds is chosen if all eigenvalues are desired or the number of */\n/*        eigenvalues to be computed is large compared to the blocksize. */\n\tif (irange == 1 && ! forceb) {\n/*           If all the eigenvalues have to be computed, we use dqd */\n\t    usedqd = TRUE_;\n/*           INDL is the local index of the first eigenvalue to compute */\n\t    indl = 1;\n\t    indu = in;\n/*           MB =  number of eigenvalues to compute */\n\t    mb = in;\n\t    wend = wbegin + mb - 1;\n/*           Define 1/4 and 3/4 points of the spectrum */\n\t    s1 = isleft + spdiam * .25;\n\t    s2 = isrght - spdiam * .25;\n\t} else {\n/*           ODRRD has computed IBLOCK and INDEXW for each eigenvalue */\n/*           approximation. */\n/*           choose sigma */\n\t    if (usedqd) {\n\t\ts1 = isleft + spdiam * .25;\n\t\ts2 = isrght - spdiam * .25;\n\t    } else {\n\t\ttmp = fmin(isrght,*vu) - fmax(isleft,*vl);\n\t\ts1 = fmax(isleft,*vl) + tmp * .25;\n\t\ts2 = fmin(isrght,*vu) - tmp * .25;\n\t    }\n\t}\n/*        Compute the negcount at the 1/4 and 3/4 points */\n\tif (mb > 1) {\n\t    odrrc(\"T\", &in, &s1, &s2, &d__[ibegin], &e[ibegin], pivmin, &\n\t\t    cnt, &cnt1, &cnt2, &iinfo);\n\t}\n\tif (mb == 1) {\n\t    sigma = gl;\n\t    sgndef = 1.;\n\t} else if (cnt1 - indl >= indu - cnt2) {\n\t    if (irange == 1 && ! forceb) {\n\t\tsigma = fmax(isleft,gl);\n\t    } else if (usedqd) {\n/*              use Gerschgorin bound as shift to get pos def matrix */\n/*              for dqds */\n\t\tsigma = isleft;\n\t    } else {\n/*              use approximation of the first desired eigenvalue of the */\n/*              block as shift */\n\t\tsigma = fmax(isleft,*vl);\n\t    }\n\t    sgndef = 1.;\n\t} else {\n\t    if (irange == 1 && ! forceb) {\n\t\tsigma = fmin(isrght,gu);\n\t    } else if (usedqd) {\n/*              use Gerschgorin bound as shift to get neg def matrix */\n/*              for dqds */\n\t\tsigma = isrght;\n\t    } else {\n/*              use approximation of the first desired eigenvalue of the */\n/*              block as shift */\n\t\tsigma = fmin(isrght,*vu);\n\t    }\n\t    sgndef = -1.;\n\t}\n/*        An initial SIGMA has been chosen that will be used for computing */\n/*        T - SIGMA I = L D L^T */\n/*        Define the increment TAU of the shift in case the initial shift */\n/*        needs to be refined to obtain a factorization with not too much */\n/*        element growth. */\n\tif (usedqd) {\n/*           The initial SIGMA was to the outer end of the spectrum */\n/*           the matrix is definite and we need not retreat. */\n\t    tau = spdiam * eps * *n + *pivmin * 2.;\n\t    tau = fmax(tau, 2 * eps * fabs(sigma));\n\t} else {\n\t    if (mb > 1) {\n\t\tclwdth = w[wend] + werr[wend] - w[wbegin] - werr[wbegin];\n\t\tavgap = (d__1 = clwdth / (double) (wend - wbegin), fabs(\n\t\t\td__1));\n\t\tif (sgndef == 1.) {\n/* Computing MAX */\n\t\t    d__1 = wgap[wbegin];\n\t\t    tau = fmax(d__1,avgap) * .5;\n/* Computing MAX */\n\t\t    d__1 = tau, d__2 = werr[wbegin];\n\t\t    tau = fmax(d__1,d__2);\n\t\t} else {\n/* Computing MAX */\n\t\t    d__1 = wgap[wend - 1];\n\t\t    tau = fmax(d__1,avgap) * .5;\n/* Computing MAX */\n\t\t    d__1 = tau, d__2 = werr[wend];\n\t\t    tau = fmax(d__1,d__2);\n\t\t}\n\t    } else {\n\t\ttau = werr[wbegin];\n\t    }\n\t}\n\n\tfor (idum = 1; idum <= 6; ++idum) {\n/*           Compute L D L^T factorization of tridiagonal matrix T - sigma I. */\n/*           Store D in WORK(1:IN), L in WORK(IN+1:2*IN), and reciprocals of */\n/*           pivots in WORK(2*IN+1:3*IN) */\n\t    dpivot = d__[ibegin] - sigma;\n\t    work[1] = dpivot;\n\t    dmax__ = fabs(work[1]);\n\t    j = ibegin;\n\t    i__2 = in - 1;\n\t    for (i__ = 1; i__ <= i__2; ++i__) {\n\t\twork[(in << 1) + i__] = 1. / work[i__];\n\t\ttmp = e[j] * work[(in << 1) + i__];\n\t\twork[in + i__] = tmp;\n\t\tdpivot = d__[j + 1] - sigma - tmp * e[j];\n\t\twork[i__ + 1] = dpivot;\n/* Computing MAX */\n\t\td__1 = dmax__, d__2 = fabs(dpivot);\n\t\tdmax__ = fmax(d__1,d__2);\n\t\t++j;\n/* L70: */\n\t    }\n/*           check for element growth */\n\t    if (dmax__ > spdiam * 64.) {\n\t\tnorep = TRUE_;\n\t    } else {\n\t\tnorep = FALSE_;\n\t    }\n\t    if (usedqd && ! norep) {\n/*              Ensure the definiteness of the representation */\n/*              All entries of D (of L D L^T) must have the same sign */\n\t\ti__2 = in;\n\t\tfor (i__ = 1; i__ <= i__2; ++i__) {\n\t\t    tmp = sgndef * work[i__];\n\t\t    if (tmp < 0.) {\n\t\t\tnorep = TRUE_;\n\t\t    }\n/* L71: */\n\t\t}\n\t    }\n\t    if (norep) {\n/*              Note that in the case of IRANGE=ALLRNG, we use the Gerschgorin */\n/*              shift which makes the matrix definite. So we should end up */\n/*              here really only in the case of IRANGE = VALRNG or INDRNG. */\n\t\tif (idum == 5) {\n\t\t    if (sgndef == 1.) {\n/*                    The fudged Gerschgorin shift should succeed */\n\t\t\tsigma = gl - spdiam * 2. * eps * *n - *pivmin * 4.;\n\t\t    } else {\n\t\t\tsigma = gu + spdiam * 2. * eps * *n + *pivmin * 4.;\n\t\t    }\n\t\t} else {\n\t\t    sigma -= sgndef * tau;\n\t\t    tau *= 2.;\n\t\t}\n\t    } else {\n/*              an initial RRR is found */\n\t\tgoto L83;\n\t    }\n/* L80: */\n\t}\n/*        if the program reaches this point, no base representation could be */\n/*        found in MAXTRY iterations. */\n\t*info = 2;\n\treturn 0;\nL83:\n/*        At this point, we have found an initial base representation */\n/*        T - SIGMA I = L D L^T with not too much element growth. */\n/*        Store the shift. */\n\te[iend] = sigma;\n/*        Store D and L. */\n\todcpy(&in, &work[1], &c__1, &d__[ibegin], &c__1);\n\ti__2 = in - 1;\n\todcpy(&i__2, &work[in + 1], &c__1, &e[ibegin], &c__1);\n\tif (mb > 1) {\n\n/*           Perturb each entry of the base representation by a small */\n/*           (but random) relative amount to overcome difficulties with */\n/*           glued matrices. */\n\n\t    for (i__ = 1; i__ <= 4; ++i__) {\n\t\tiseed[i__ - 1] = 1;\n/* L122: */\n\t    }\n\t    i__2 = (in << 1) - 1;\n\t    odrnv(&c__2, iseed, &i__2, &work[1]);\n\t    i__2 = in - 1;\n\t    for (i__ = 1; i__ <= i__2; ++i__) {\n\t\td__[ibegin + i__ - 1] *= eps * 8. * work[i__] + 1.;\n\t\te[ibegin + i__ - 1] *= eps * 8. * work[in + i__] + 1.;\n/* L125: */\n\t    }\n\t    d__[iend] *= eps * 4. * work[in] + 1.;\n\n\t}\n\n/*        Don't update the Gerschgorin intervals because keeping track */\n/*        of the updates would be too much work in DLARRV. */\n/*        We update W instead and use it to locate the proper Gerschgorin */\n/*        intervals. */\n/*        Compute the required eigenvalues of L D L' by bisection or dqds */\n\tif (! usedqd) {\n/*           If ODRRD has been used, shift the eigenvalue approximations */\n/*           according to their representation. This is necessary for */\n/*           a uniform DLARRV since dqds computes eigenvalues of the */\n/*           shifted representation. In DLARRV, W will always hold the */\n/*           UNshifted eigenvalue approximation. */\n\t    i__2 = wend;\n\t    for (j = wbegin; j <= i__2; ++j) {\n\t\tw[j] -= sigma;\n\t\twerr[j] += (d__1 = w[j], fabs(d__1)) * eps;\n/* L134: */\n\t    }\n/*           call ODRRB to reduce eigenvalue error of the approximations */\n/*           from ODRRD */\n\t    i__2 = iend - 1;\n\t    for (i__ = ibegin; i__ <= i__2; ++i__) {\n/* Computing 2nd power */\n\t\td__1 = e[i__];\n\t\twork[i__] = d__[i__] * (d__1 * d__1);\n/* L135: */\n\t    }\n/*           use bisection to find EV from INDL to INDU */\n\t    i__2 = indl - 1;\n\t    odrrb(&in, &d__[ibegin], &work[ibegin], &indl, &indu, rtol1, \n\t\t    rtol2, &i__2, &w[wbegin], &wgap[wbegin], &werr[wbegin], &\n\t\t    work[(*n << 1) + 1], &iwork[1], pivmin, &spdiam, &in, &\n\t\t    iinfo);\n\t    if (iinfo != 0) {\n\t\t*info = -4;\n\t\treturn 0;\n\t    }\n/*           ODRRB computes all gaps correctly except for the last one */\n/*           Record distance to VU/GU */\n/* Computing MAX */\n\t    d__1 = 0., d__2 = *vu - sigma - (w[wend] + werr[wend]);\n\t    wgap[wend] = fmax(d__1,d__2);\n\t    i__2 = indu;\n\t    for (i__ = indl; i__ <= i__2; ++i__) {\n\t\t++(*m);\n\t\tiblock[*m] = jblk;\n\t\tindexw[*m] = i__;\n/* L138: */\n\t    }\n\t} else {\n/*           Call dqds to get all eigs (and then possibly delete unwanted */\n/*           eigenvalues). */\n/*           Note that dqds finds the eigenvalues of the L D L^T representation */\n/*           of T to high relative accuracy. High relative accuracy */\n/*           might be lost when the shift of the RRR is subtracted to obtain */\n/*           the eigenvalues of T. However, T is not guaranteed to define its */\n/*           eigenvalues to high relative accuracy anyway. */\n/*           Set RTOL to the order of the tolerance used in ODSQ2 */\n/*           This is an ESTIMATED error, the worst case bound is 4*N*EPS */\n/*           which is usually too large and requires unnecessary work to be */\n/*           done by bisection when computing the eigenvectors */\n\t    rtol = log((double) in) * 4. * eps;\n\t    j = ibegin;\n\t    i__2 = in - 1;\n\t    for (i__ = 1; i__ <= i__2; ++i__) {\n\t\twork[(i__ << 1) - 1] = (d__1 = d__[j], fabs(d__1));\n\t\twork[i__ * 2] = e[j] * e[j] * work[(i__ << 1) - 1];\n\t\t++j;\n/* L140: */\n\t    }\n\t    work[(in << 1) - 1] = (d__1 = d__[iend], fabs(d__1));\n\t    work[in * 2] = 0.;\n\t    odsq2(&in, &work[1], &iinfo);\n\t    if (iinfo != 0) {\n/*              If IINFO = -5 then an index is part of a tight cluster */\n/*              and should be changed. The index is in IWORK(1) and the */\n/*              gap is in WORK(N+1) */\n\t\t*info = -5;\n\t\treturn 0;\n\t    } else {\n/*              Test that all eigenvalues are positive as expected */\n\t\ti__2 = in;\n\t\tfor (i__ = 1; i__ <= i__2; ++i__) {\n\t\t    if (work[i__] < 0.) {\n\t\t\t*info = -6;\n\t\t\treturn 0;\n\t\t    }\n/* L149: */\n\t\t}\n\t    }\n\t    if (sgndef > 0.) {\n\t\ti__2 = indu;\n\t\tfor (i__ = indl; i__ <= i__2; ++i__) {\n\t\t    ++(*m);\n\t\t    w[*m] = work[in - i__ + 1];\n\t\t    iblock[*m] = jblk;\n\t\t    indexw[*m] = i__;\n/* L150: */\n\t\t}\n\t    } else {\n\t\ti__2 = indu;\n\t\tfor (i__ = indl; i__ <= i__2; ++i__) {\n\t\t    ++(*m);\n\t\t    w[*m] = -work[i__];\n\t\t    iblock[*m] = jblk;\n\t\t    indexw[*m] = i__;\n/* L160: */\n\t\t}\n\t    }\n\t    i__2 = *m;\n\t    for (i__ = *m - mb + 1; i__ <= i__2; ++i__) {\n/*              the value of RTOL below should be the tolerance in ODSQ2 */\n\t\twerr[i__] = rtol * (d__1 = w[i__], fabs(d__1));\n/* L165: */\n\t    }\n\t    i__2 = *m - 1;\n\t    for (i__ = *m - mb + 1; i__ <= i__2; ++i__) {\n/*              compute the right gap between the intervals */\n/* Computing MAX */\n\t\td__1 = 0., d__2 = w[i__ + 1] - werr[i__ + 1] - (w[i__] + werr[\n\t\t\ti__]);\n\t\twgap[i__] = fmax(d__1,d__2);\n/* L166: */\n\t    }\n/* Computing MAX */\n\t    d__1 = 0., d__2 = *vu - sigma - (w[*m] + werr[*m]);\n\t    wgap[*m] = fmax(d__1,d__2);\n\t}\n/*        proceed with next block */\n\tibegin = iend + 1;\n\twbegin = wend + 1;\nL170:\n\t;\n    }\n\n    return 0;\n\n/*     end of ODRRE */\n\n} /* odrre_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrrf.c",
    "content": "/* dlarrf.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Table of constant values */\n#define TRUE_ (1)\n#define FALSE_ (0)\nstatic int c__1 = 1;\n\n/* Subroutine */ \nint odrrf(int *n, double *d__, double *l, \n\tdouble *ld, int *clstrt, int *clend, double *w, \n\tdouble *wgap, double *werr, double *spdiam, double *\n\tclgapl, double *clgapr, double *pivmin, double *sigma, \n\tdouble *dplus, double *lplus, double *work, int *info)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1, d__2, d__3;\n\n    /* Builtin functions */\n    //    double sqrt(double);\n\n    /* Local variables */\n    int i__;\n    double s, bestshift, smlgrowth, eps, tmp, max1, max2, rrr1, rrr2, \n\t    znm2, growthbound, fail, fact, oldp;\n    int indx;\n    double prod;\n    int ktry;\n    double fail2, avgap, ldmax, rdmax;\n    int shift;\n    extern /* Subroutine */ int odcpy(int *, double *, int *, \n\t    double *, int *);\n    int dorrr1;\n    // extern double odmch(char *);\n    double ldelta;\n    int nofail;\n    double mingap, lsigma, rdelta;\n    extern int odnan(double *);\n    int forcer;\n    double rsigma, clwdth;\n    int sawnan1, sawnan2, tryrrr1;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n/* * */\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  Given the initial representation L D L^T and its cluster of close */\n/*  eigenvalues (in a relative measure), W( CLSTRT ), W( CLSTRT+1 ), ... */\n/*  W( CLEND ), ODRRF finds a new relatively robust representation */\n/*  L D L^T - SIGMA I = L(+) D(+) L(+)^T such that at least one of the */\n/*  eigenvalues of L(+) D(+) L(+)^T is relatively isolated. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N       (input) INT */\n/*          The order of the matrix (subblock, if the matrix splitted). */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The N diagonal elements of the diagonal matrix D. */\n\n/*  L       (input) DOUBLE PRECISION array, dimension (N-1) */\n/*          The (N-1) subdiagonal elements of the unit bidiagonal */\n/*          matrix L. */\n\n/*  LD      (input) DOUBLE PRECISION array, dimension (N-1) */\n/*          The (N-1) elements L(i)*D(i). */\n\n/*  CLSTRT  (input) INT */\n/*          The index of the first eigenvalue in the cluster. */\n\n/*  CLEND   (input) INT */\n/*          The index of the last eigenvalue in the cluster. */\n\n/*  W       (input) DOUBLE PRECISION array, dimension >=  (CLEND-CLSTRT+1) */\n/*          The eigenvalue APPROXIMATIONS of L D L^T in ascending order. */\n/*          W( CLSTRT ) through W( CLEND ) form the cluster of relatively */\n/*          close eigenalues. */\n\n/*  WGAP    (input/output) DOUBLE PRECISION array, dimension >=  (CLEND-CLSTRT+1) */\n/*          The separation from the right neighbor eigenvalue in W. */\n\n/*  WERR    (input) DOUBLE PRECISION array, dimension >=  (CLEND-CLSTRT+1) */\n/*          WERR contain the semiwidth of the uncertainty */\n/*          interval of the corresponding eigenvalue APPROXIMATION in W */\n\n/*  SPDIAM (input) estimate of the spectral diameter obtained from the */\n/*          Gerschgorin intervals */\n\n/*  CLGAPL, CLGAPR (input) absolute gap on each end of the cluster. */\n/*          Set by the calling routine to protect against shifts too close */\n/*          to eigenvalues outside the cluster. */\n\n/*  PIVMIN  (input) DOUBLE PRECISION */\n/*          The minimum pivot allowed in the Sturm sequence. */\n\n/*  SIGMA   (output) DOUBLE PRECISION */\n/*          The shift used to form L(+) D(+) L(+)^T. */\n\n/*  DPLUS   (output) DOUBLE PRECISION array, dimension (N) */\n/*          The N diagonal elements of the diagonal matrix D(+). */\n\n/*  LPLUS   (output) DOUBLE PRECISION array, dimension (N-1) */\n/*          The first (N-1) elements of LPLUS contain the subdiagonal */\n/*          elements of the unit bidiagonal matrix L(+). */\n\n/*  WORK    (workspace) DOUBLE PRECISION array, dimension (2*N) */\n/*          Workspace. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --work;\n    --lplus;\n    --dplus;\n    --werr;\n    --wgap;\n    --w;\n    --ld;\n    --l;\n    --d__;\n\n    /* Function Body */\n    *info = 0;\n    fact = 2.;\n    eps = DBL_EPSILON; // eps = odmch(\"Precision\");\n    shift = 0;\n    forcer = FALSE_;\n/*     Note that we cannot guarantee that for any of the shifts tried, */\n/*     the factorization has a small or even moderate element growth. */\n/*     There could be Ritz values at both ends of the cluster and despite */\n/*     backing off, there are examples where all factorizations tried */\n/*     (in IEEE mode, allowing zero pivots & infinities) have INFINITE */\n/*     element growth. */\n/*     For this reason, we should use PIVMIN in this subroutine so that at */\n/*     least the L D L^T factorization exists. It can be checked afterwards */\n/*     whether the element growth caused bad residuals/orthogonality. */\n/*     Decide whether the code should accept the best among all */\n/*     representations despite large element growth or signal INFO=1 */\n    nofail = TRUE_;\n\n/*     Compute the average gap length of the cluster */\n    clwdth = (d__1 = w[*clend] - w[*clstrt], fabs(d__1)) + werr[*clend] + werr[\n\t    *clstrt];\n    avgap = clwdth / (double) (*clend - *clstrt);\n    mingap = fmin(*clgapl,*clgapr);\n/*     Initial values for shifts to both ends of cluster */\n/* Computing MIN */\n    d__1 = w[*clstrt], d__2 = w[*clend];\n    lsigma = fmin(d__1,d__2) - werr[*clstrt];\n/* Computing MAX */\n    d__1 = w[*clstrt], d__2 = w[*clend];\n    rsigma = fmax(d__1,d__2) + werr[*clend];\n/*     Use a small fudge to make sure that we really shift to the outside */\n    lsigma -= fabs(lsigma) * 4. * eps;\n    rsigma += fabs(rsigma) * 4. * eps;\n/*     Compute upper bounds for how much to back off the initial shifts */\n    ldmax = mingap * .25 + *pivmin * 2.;\n    rdmax = mingap * .25 + *pivmin * 2.;\n/* Computing MAX */\n    d__1 = avgap, d__2 = wgap[*clstrt];\n    ldelta = fmax(d__1,d__2) / fact;\n/* Computing MAX */\n    d__1 = avgap, d__2 = wgap[*clend - 1];\n    rdelta = fmax(d__1,d__2) / fact;\n\n/*     Initialize the record of the best representation found */\n\n    // s = DBL_MIN; // s = odmch(\"S\");\n    smlgrowth = DBL_MAX;\n    fail = (double) (*n - 1) * mingap / (*spdiam * eps);\n    fail2 = (double) (*n - 1) * mingap / (*spdiam * sqrt(eps));\n    bestshift = lsigma;\n\n/*     while (KTRY <= KTRYMAX) */\n    ktry = 0;\n    growthbound = *spdiam * 8.;\nL5:\n    sawnan1 = FALSE_;\n    sawnan2 = FALSE_;\n/*     Ensure that we do not back off too much of the initial shifts */\n    ldelta = fmin(ldmax,ldelta);\n    rdelta = fmin(rdmax,rdelta);\n/*     Compute the element growth when shifting to both ends of the cluster */\n/*     accept the shift if there is no element growth at one of the two ends */\n/*     Left end */\n    s = -lsigma;\n    dplus[1] = d__[1] + s;\n    if (fabs(dplus[1]) < *pivmin) {\n\tdplus[1] = -(*pivmin);\n/*        Need to set SAWNAN1 because refined RRR test should not be used */\n/*        in this case */\n\tsawnan1 = TRUE_;\n    }\n    max1 = fabs(dplus[1]);\n    i__1 = *n - 1;\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\tlplus[i__] = ld[i__] / dplus[i__];\n\ts = s * lplus[i__] * l[i__] - lsigma;\n\tdplus[i__ + 1] = d__[i__ + 1] + s;\n\tif ((d__1 = dplus[i__ + 1], fabs(d__1)) < *pivmin) {\n\t    dplus[i__ + 1] = -(*pivmin);\n/*           Need to set SAWNAN1 because refined RRR test should not be used */\n/*           in this case */\n\t    sawnan1 = TRUE_;\n\t}\n/* Computing MAX */\n\td__2 = max1, d__3 = (d__1 = dplus[i__ + 1], fabs(d__1));\n\tmax1 = fmax(d__2,d__3);\n/* L6: */\n    }\n    sawnan1 = sawnan1 || odnan(&max1);\n    if (forcer || max1 <= growthbound && ! sawnan1) {\n\t*sigma = lsigma;\n\tshift = 1;\n\tgoto L100;\n    }\n/*     Right end */\n    s = -rsigma;\n    work[1] = d__[1] + s;\n    if (fabs(work[1]) < *pivmin) {\n\twork[1] = -(*pivmin);\n/*        Need to set SAWNAN2 because refined RRR test should not be used */\n/*        in this case */\n\tsawnan2 = TRUE_;\n    }\n    max2 = fabs(work[1]);\n    i__1 = *n - 1;\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\twork[*n + i__] = ld[i__] / work[i__];\n\ts = s * work[*n + i__] * l[i__] - rsigma;\n\twork[i__ + 1] = d__[i__ + 1] + s;\n\tif ((d__1 = work[i__ + 1], fabs(d__1)) < *pivmin) {\n\t    work[i__ + 1] = -(*pivmin);\n/*           Need to set SAWNAN2 because refined RRR test should not be used */\n/*           in this case */\n\t    sawnan2 = TRUE_;\n\t}\n/* Computing MAX */\n\td__2 = max2, d__3 = (d__1 = work[i__ + 1], fabs(d__1));\n\tmax2 = fmax(d__2,d__3);\n/* L7: */\n    }\n    sawnan2 = sawnan2 || odnan(&max2);\n    if (forcer || max2 <= growthbound && ! sawnan2) {\n\t*sigma = rsigma;\n\tshift = 2;\n\tgoto L100;\n    }\n/*     If we are at this point, both shifts led to too much element growth */\n/*     Record the better of the two shifts (provided it didn't lead to NaN) */\n    if (sawnan1 && sawnan2) {\n/*        both MAX1 and MAX2 are NaN */\n\tgoto L50;\n    } else {\n\tif (! sawnan1) {\n\t    indx = 1;\n\t    if (max1 <= smlgrowth) {\n\t\tsmlgrowth = max1;\n\t\tbestshift = lsigma;\n\t    }\n\t}\n\tif (! sawnan2) {\n\t    if (sawnan1 || max2 <= max1) {\n\t\tindx = 2;\n\t    }\n\t    if (max2 <= smlgrowth) {\n\t\tsmlgrowth = max2;\n\t\tbestshift = rsigma;\n\t    }\n\t}\n    }\n/*     If we are here, both the left and the right shift led to */\n/*     element growth. If the element growth is moderate, then */\n/*     we may still accept the representation, if it passes a */\n/*     refined test for RRR. This test supposes that no NaN occurred. */\n/*     Moreover, we use the refined RRR test only for isolated clusters. */\n    if (clwdth < mingap / 128. && fmin(max1,max2) < fail2 && ! sawnan1 && ! \n\t    sawnan2) {\n\tdorrr1 = TRUE_;\n    } else {\n\tdorrr1 = FALSE_;\n    }\n    tryrrr1 = TRUE_;\n    if (tryrrr1 && dorrr1) {\n\tif (indx == 1) {\n\t    tmp = (d__1 = dplus[*n], fabs(d__1));\n\t    znm2 = 1.;\n\t    prod = 1.;\n\t    oldp = 1.;\n\t    for (i__ = *n - 1; i__ >= 1; --i__) {\n\t\tif (prod <= eps) {\n\t\t    prod = dplus[i__ + 1] * work[*n + i__ + 1] / (dplus[i__] *\n\t\t\t     work[*n + i__]) * oldp;\n\t\t} else {\n\t\t    prod *= (d__1 = work[*n + i__], fabs(d__1));\n\t\t}\n\t\toldp = prod;\n/* Computing 2nd power */\n\t\td__1 = prod;\n\t\tznm2 += d__1 * d__1;\n/* Computing MAX */\n\t\td__2 = tmp, d__3 = (d__1 = dplus[i__] * prod, fabs(d__1));\n\t\ttmp = fmax(d__2,d__3);\n/* L15: */\n\t    }\n\t    rrr1 = tmp / (*spdiam * sqrt(znm2));\n\t    if (rrr1 <= 8.) {\n\t\t*sigma = lsigma;\n\t\tshift = 1;\n\t\tgoto L100;\n\t    }\n\t} else if (indx == 2) {\n\t    tmp = (d__1 = work[*n], fabs(d__1));\n\t    znm2 = 1.;\n\t    prod = 1.;\n\t    oldp = 1.;\n\t    for (i__ = *n - 1; i__ >= 1; --i__) {\n\t\tif (prod <= eps) {\n\t\t    prod = work[i__ + 1] * lplus[i__ + 1] / (work[i__] * \n\t\t\t    lplus[i__]) * oldp;\n\t\t} else {\n\t\t    prod *= (d__1 = lplus[i__], fabs(d__1));\n\t\t}\n\t\toldp = prod;\n/* Computing 2nd power */\n\t\td__1 = prod;\n\t\tznm2 += d__1 * d__1;\n/* Computing MAX */\n\t\td__2 = tmp, d__3 = (d__1 = work[i__] * prod, fabs(d__1));\n\t\ttmp = fmax(d__2,d__3);\n/* L16: */\n\t    }\n\t    rrr2 = tmp / (*spdiam * sqrt(znm2));\n\t    if (rrr2 <= 8.) {\n\t\t*sigma = rsigma;\n\t\tshift = 2;\n\t\tgoto L100;\n\t    }\n\t}\n    }\nL50:\n    if (ktry < 1) {\n/*        If we are here, both shifts failed also the RRR test. */\n/*        Back off to the outside */\n/* Computing MAX */\n\td__1 = lsigma - ldelta, d__2 = lsigma - ldmax;\n\tlsigma = fmax(d__1,d__2);\n/* Computing MIN */\n\td__1 = rsigma + rdelta, d__2 = rsigma + rdmax;\n\trsigma = fmin(d__1,d__2);\n\tldelta *= 2.;\n\trdelta *= 2.;\n\t++ktry;\n\tgoto L5;\n    } else {\n/*        None of the representations investigated satisfied our */\n/*        criteria. Take the best one we found. */\n\tif (smlgrowth < fail || nofail) {\n\t    lsigma = bestshift;\n\t    rsigma = bestshift;\n\t    forcer = TRUE_;\n\t    goto L5;\n\t} else {\n\t    *info = 1;\n\t    return 0;\n\t}\n    }\nL100:\n    if (shift == 1) {\n    } else if (shift == 2) {\n/*        store new L and D back into DPLUS, LPLUS */\n\todcpy(n, &work[1], &c__1, &dplus[1], &c__1);\n\ti__1 = *n - 1;\n\todcpy(&i__1, &work[*n + 1], &c__1, &lplus[1], &c__1);\n    }\n    return 0;\n\n/*     End of ODRRF */\n\n} /* odrrf_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrrj.c",
    "content": "/* dlarrj.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odrrj(int *n, double *d__, double *e2, \n\tint *ifirst, int *ilast, double *rtol, int *offset, \n\tdouble *w, double *werr, double *work, int *iwork, \n\tdouble *pivmin, double *spdiam, int *info)\n{\n    /* System generated locals */\n    int i__1, i__2;\n    double d__1, d__2;\n\n    /* Builtin functions */\n    // double log(double);\n\n    /* Local variables */\n    int i__, j, k, p;\n    double s;\n    int i1, i2, ii;\n    double fac, mid;\n    int cnt;\n    double tmp, left;\n    int iter, nint, prev, next, savi1;\n    double right, width, dplus;\n    int olnint, maxitr;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  Given the initial eigenvalue approximations of T, ODRRJ */\n/*  does  bisection to refine the eigenvalues of T, */\n/*  W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial */\n/*  guesses for these eigenvalues are input in W, the corresponding estimate */\n/*  of the error in these guesses in WERR. During bisection, intervals */\n/*  [left, right] are maintained by storing their mid-points and */\n/*  semi-widths in the arrays W and WERR respectively. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N       (input) INT */\n/*          The order of the matrix. */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The N diagonal elements of T. */\n\n/*  E2      (input) DOUBLE PRECISION array, dimension (N-1) */\n/*          The Squares of the (N-1) subdiagonal elements of T. */\n\n/*  IFIRST  (input) INT */\n/*          The index of the first eigenvalue to be computed. */\n\n/*  ILAST   (input) INT */\n/*          The index of the last eigenvalue to be computed. */\n\n/*  RTOL   (input) DOUBLE PRECISION */\n/*          Tolerance for the convergence of the bisection intervals. */\n/*          An interval [LEFT,RIGHT] has converged if */\n/*          RIGHT-LEFT.LT.RTOL*MAX(|LEFT|,|RIGHT|). */\n\n/*  OFFSET  (input) INT */\n/*          Offset for the arrays W and WERR, i.e., the IFIRST-OFFSET */\n/*          through ILAST-OFFSET elements of these arrays are to be used. */\n\n/*  W       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are */\n/*          estimates of the eigenvalues of L D L^T indexed IFIRST through */\n/*          ILAST. */\n/*          On output, these estimates are refined. */\n\n/*  WERR    (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are */\n/*          the errors in the estimates of the corresponding elements in W. */\n/*          On output, these errors are refined. */\n\n/*  WORK    (workspace) DOUBLE PRECISION array, dimension (2*N) */\n/*          Workspace. */\n\n/*  IWORK   (workspace) INT array, dimension (2*N) */\n/*          Workspace. */\n\n/*  PIVMIN  (input) DOUBLE PRECISION */\n/*          The minimum pivot in the Sturm sequence for T. */\n\n/*  SPDIAM  (input) DOUBLE PRECISION */\n/*          The spectral diameter of T. */\n\n/*  INFO    (output) INT */\n/*          Error flag. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --iwork;\n    --work;\n    --werr;\n    --w;\n    --e2;\n    --d__;\n\n    /* Function Body */\n    *info = 0;\n\n    maxitr = (int) ((log(*spdiam + *pivmin) - log(*pivmin)) / log(2.)) + \n\t    2;\n\n/*     Initialize unconverged intervals in [ WORK(2*I-1), WORK(2*I) ]. */\n/*     The Sturm Count, Count( WORK(2*I-1) ) is arranged to be I-1, while */\n/*     Count( WORK(2*I) ) is stored in IWORK( 2*I ). The int IWORK( 2*I-1 ) */\n/*     for an unconverged interval is set to the index of the next unconverged */\n/*     interval, and is -1 or 0 for a converged interval. Thus a linked */\n/*     list of unconverged intervals is set up. */\n\n    i1 = *ifirst;\n    i2 = *ilast;\n/*     The number of unconverged intervals */\n    nint = 0;\n/*     The last unconverged interval found */\n    prev = 0;\n    i__1 = i2;\n    for (i__ = i1; i__ <= i__1; ++i__) {\n\tk = i__ << 1;\n\tii = i__ - *offset;\n\tleft = w[ii] - werr[ii];\n\tmid = w[ii];\n\tright = w[ii] + werr[ii];\n\twidth = right - mid;\n/* Computing MAX */\n\td__1 = fabs(left), d__2 = fabs(right);\n\ttmp = fmax(d__1,d__2);\n/*        The following test prevents the test of converged intervals */\n\tif (width < *rtol * tmp) {\n/*           This interval has already converged and does not need refinement. */\n/*           (Note that the gaps might change through refining the */\n/*            eigenvalues, however, they can only get bigger.) */\n/*           Remove it from the list. */\n\t    iwork[k - 1] = -1;\n/*           Make sure that I1 always points to the first unconverged interval */\n\t    if (i__ == i1 && i__ < i2) {\n\t\ti1 = i__ + 1;\n\t    }\n\t    if (prev >= i1 && i__ <= i2) {\n\t\tiwork[(prev << 1) - 1] = i__ + 1;\n\t    }\n\t} else {\n/*           unconverged interval found */\n\t    prev = i__;\n/*           Make sure that [LEFT,RIGHT] contains the desired eigenvalue */\n\n/*           Do while( CNT(LEFT).GT.I-1 ) */\n\n\t    fac = 1.;\nL20:\n\t    cnt = 0;\n\t    s = left;\n\t    dplus = d__[1] - s;\n\t    if (dplus < 0.) {\n\t\t++cnt;\n\t    }\n\t    i__2 = *n;\n\t    for (j = 2; j <= i__2; ++j) {\n\t\tdplus = d__[j] - s - e2[j - 1] / dplus;\n\t\tif (dplus < 0.) {\n\t\t    ++cnt;\n\t\t}\n/* L30: */\n\t    }\n\t    if (cnt > i__ - 1) {\n\t\tleft -= werr[ii] * fac;\n\t\tfac *= 2.;\n\t\tgoto L20;\n\t    }\n\n/*           Do while( CNT(RIGHT).LT.I ) */\n\n\t    fac = 1.;\nL50:\n\t    cnt = 0;\n\t    s = right;\n\t    dplus = d__[1] - s;\n\t    if (dplus < 0.) {\n\t\t++cnt;\n\t    }\n\t    i__2 = *n;\n\t    for (j = 2; j <= i__2; ++j) {\n\t\tdplus = d__[j] - s - e2[j - 1] / dplus;\n\t\tif (dplus < 0.) {\n\t\t    ++cnt;\n\t\t}\n/* L60: */\n\t    }\n\t    if (cnt < i__) {\n\t\tright += werr[ii] * fac;\n\t\tfac *= 2.;\n\t\tgoto L50;\n\t    }\n\t    ++nint;\n\t    iwork[k - 1] = i__ + 1;\n\t    iwork[k] = cnt;\n\t}\n\twork[k - 1] = left;\n\twork[k] = right;\n/* L75: */\n    }\n    savi1 = i1;\n\n/*     Do while( NINT.GT.0 ), i.e. there are still unconverged intervals */\n/*     and while (ITER.LT.MAXITR) */\n\n    iter = 0;\nL80:\n    prev = i1 - 1;\n    i__ = i1;\n    olnint = nint;\n    i__1 = olnint;\n    for (p = 1; p <= i__1; ++p) {\n\tk = i__ << 1;\n\tii = i__ - *offset;\n\tnext = iwork[k - 1];\n\tleft = work[k - 1];\n\tright = work[k];\n\tmid = (left + right) * .5;\n/*        semiwidth of interval */\n\twidth = right - mid;\n/* Computing MAX */\n\td__1 = fabs(left), d__2 = fabs(right);\n\ttmp = fmax(d__1,d__2);\n\tif (width < *rtol * tmp || iter == maxitr) {\n/*           reduce number of unconverged intervals */\n\t    --nint;\n/*           Mark interval as converged. */\n\t    iwork[k - 1] = 0;\n\t    if (i1 == i__) {\n\t\ti1 = next;\n\t    } else {\n/*              Prev holds the last unconverged interval previously examined */\n\t\tif (prev >= i1) {\n\t\t    iwork[(prev << 1) - 1] = next;\n\t\t}\n\t    }\n\t    i__ = next;\n\t    goto L100;\n\t}\n\tprev = i__;\n\n/*        Perform one bisection step */\n\n\tcnt = 0;\n\ts = mid;\n\tdplus = d__[1] - s;\n\tif (dplus < 0.) {\n\t    ++cnt;\n\t}\n\ti__2 = *n;\n\tfor (j = 2; j <= i__2; ++j) {\n\t    dplus = d__[j] - s - e2[j - 1] / dplus;\n\t    if (dplus < 0.) {\n\t\t++cnt;\n\t    }\n/* L90: */\n\t}\n\tif (cnt <= i__ - 1) {\n\t    work[k - 1] = mid;\n\t} else {\n\t    work[k] = mid;\n\t}\n\ti__ = next;\nL100:\n\t;\n    }\n    ++iter;\n/*     do another loop if there are still unconverged intervals */\n/*     However, in the last iteration, all intervals are accepted */\n/*     since this is the best we can do. */\n    if (nint > 0 && iter <= maxitr) {\n\tgoto L80;\n    }\n\n\n/*     At this point, all the intervals have converged */\n    i__1 = *ilast;\n    for (i__ = savi1; i__ <= i__1; ++i__) {\n\tk = i__ << 1;\n\tii = i__ - *offset;\n/*        All intervals marked by '0' have been refined. */\n\tif (iwork[k - 1] == 0) {\n\t    w[ii] = (work[k - 1] + work[k]) * .5;\n\t    werr[ii] = work[k] - w[ii];\n\t}\n/* L110: */\n    }\n\n    return 0;\n\n/*     End of ODRRJ */\n\n} /* odrrj_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrrk.c",
    "content": "/* dlarrk.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odrrk(int *n, int *iw, double *gl, \n\tdouble *gu, double *d__, double *e2, double *pivmin, \n\tdouble *reltol, double *w, double *werr, int *info)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1, d__2;\n\n    /* Builtin functions */\n    // double log(double);\n\n    /* Local variables */\n    int i__, it;\n    double mid, eps, tmp1, tmp2, left, atoli, right;\n    int itmax;\n    double rtoli, tnorm;\n    // extern double odmch(char *);\n    int negcnt;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODRRK computes one eigenvalue of a symmetric tridiagonal */\n/*  matrix T to suitable accuracy. This is an auxiliary code to be */\n/*  called from DSTEMR. */\n\n/*  To avoid overflow, the matrix must be scaled so that its */\n/*  largest element is no greater than overflow**(1/2) * */\n/*  underflow**(1/4) in absolute value, and for greatest */\n/*  accuracy, it should not be much smaller than that. */\n\n/*  See W. Kahan \"Accurate Eigenvalues of a Symmetric Tridiagonal */\n/*  Matrix\", Report CS41, Computer Science Dept., Stanford */\n/*  University, July 21, 1966. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N       (input) INT */\n/*          The order of the tridiagonal matrix T.  N >= 0. */\n\n/*  IW      (input) INT */\n/*          The index of the eigenvalues to be returned. */\n\n/*  GL      (input) DOUBLE PRECISION */\n/*  GU      (input) DOUBLE PRECISION */\n/*          An upper and a lower bound on the eigenvalue. */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The n diagonal elements of the tridiagonal matrix T. */\n\n/*  E2      (input) DOUBLE PRECISION array, dimension (N-1) */\n/*          The (n-1) squared off-diagonal elements of the tridiagonal matrix T. */\n\n/*  PIVMIN  (input) DOUBLE PRECISION */\n/*          The minimum pivot allowed in the Sturm sequence for T. */\n\n/*  RELTOL  (input) DOUBLE PRECISION */\n/*          The minimum relative width of an interval.  When an interval */\n/*          is narrower than RELTOL times the larger (in */\n/*          magnitude) endpoint, then it is considered to be */\n/*          sufficiently small, i.e., converged.  Note: this should */\n/*          always be at least radix*machine epsilon. */\n\n/*  W       (output) DOUBLE PRECISION */\n\n/*  WERR    (output) DOUBLE PRECISION */\n/*          The error bound on the corresponding eigenvalue approximation */\n/*          in W. */\n\n/*  INFO    (output) INT */\n/*          = 0:       Eigenvalue converged */\n/*          = -1:      Eigenvalue did NOT converge */\n\n/*  Internal Parameters */\n/*  =================== */\n\n/*  FUDGE   DOUBLE PRECISION, default = 2 */\n/*          A \"fudge factor\" to widen the Gershgorin intervals. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n/*     Get machine constants */\n    /* Parameter adjustments */\n    --e2;\n    --d__;\n\n    /* Function Body */\n    eps = DBL_EPSILON; // odmch(\"P\");\n/* Computing MAX */\n    d__1 = fabs(*gl), d__2 = fabs(*gu);\n    tnorm = fmax(d__1,d__2);\n    rtoli = *reltol;\n    atoli = *pivmin * 4.;\n    itmax = (int) ((log(tnorm + *pivmin) - log(*pivmin)) / log(2.)) + 2;\n    *info = -1;\n    left = *gl - tnorm * 2. * eps * *n - *pivmin * 4.;\n    right = *gu + tnorm * 2. * eps * *n + *pivmin * 4.;\n    it = 0;\nL10:\n\n/*     Check if interval converged or maximum number of iterations reached */\n\n    tmp1 = (d__1 = right - left, fabs(d__1));\n/* Computing MAX */\n    d__1 = fabs(right), d__2 = fabs(left);\n    tmp2 = fmax(d__1,d__2);\n/* Computing MAX */\n    d__1 = fmax(atoli,*pivmin), d__2 = rtoli * tmp2;\n    if (tmp1 < fmax(d__1,d__2)) {\n\t*info = 0;\n\tgoto L30;\n    }\n    if (it > itmax) {\n\tgoto L30;\n    }\n\n/*     Count number of negative pivots for mid-point */\n\n    ++it;\n    mid = (left + right) * .5;\n    negcnt = 0;\n    tmp1 = d__[1] - mid;\n    if (fabs(tmp1) < *pivmin) {\n\ttmp1 = -(*pivmin);\n    }\n    if (tmp1 <= 0.) {\n\t++negcnt;\n    }\n\n    i__1 = *n;\n    for (i__ = 2; i__ <= i__1; ++i__) {\n\ttmp1 = d__[i__] - e2[i__ - 1] / tmp1 - mid;\n\tif (fabs(tmp1) < *pivmin) {\n\t    tmp1 = -(*pivmin);\n\t}\n\tif (tmp1 <= 0.) {\n\t    ++negcnt;\n\t}\n/* L20: */\n    }\n    if (negcnt >= *iw) {\n\tright = mid;\n    } else {\n\tleft = mid;\n    }\n    goto L10;\nL30:\n\n/*     Converged or maximum number of iterations reached */\n\n    *w = (left + right) * .5;\n    *werr = (d__1 = right - left, fabs(d__1)) * .5;\n    return 0;\n\n/*     End of ODRRK */\n\n} /* odrrk_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrrr.c",
    "content": "/* dlarrr.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n#define TRUE_ (1)\n#define FALSE_ (0)\n\n/* Subroutine */ \nint odrrr(int *n, double *d__, double *e, int *info)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1;\n\n    /* Builtin functions */\n    // double sqrt(double);\n\n    /* Local variables */\n    int i__;\n    double eps, tmp, tmp2, rmin;\n    // extern double odmch(char *);\n    double offdig, safmin;\n    int yesrel;\n    double smlnum, offdig2;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n\n/*  Purpose */\n/*  ======= */\n\n/*  Perform tests to decide whether the symmetric tridiagonal matrix T */\n/*  warrants expensive computations which guarantee high relative accuracy */\n/*  in the eigenvalues. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N       (input) INT */\n/*          The order of the matrix. N > 0. */\n\n/*  D       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The N diagonal elements of the tridiagonal matrix T. */\n\n/*  E       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the first (N-1) entries contain the subdiagonal */\n/*          elements of the tridiagonal matrix T; E(N) is set to ZERO. */\n\n/*  INFO    (output) INT */\n/*          INFO = 0(default) : the matrix warrants computations preserving */\n/*                              relative accuracy. */\n/*          INFO = 1          : the matrix warrants computations guaranteeing */\n/*                              only absolute accuracy. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n/*     As a default, do NOT go for relative-accuracy preserving computations. */\n    /* Parameter adjustments */\n    --e;\n    --d__;\n\n    /* Function Body */\n    *info = 1;\n    safmin = DBL_MIN; // safmin = odmch(\"Safe minimum\");\n    eps = DBL_EPSILON; // eps = odmch(\"Precision\");\n    smlnum = safmin / eps;\n    rmin = sqrt(smlnum);\n/*     Tests for relative accuracy */\n\n/*     Test for scaled diagonal dominance */\n/*     Scale the diagonal entries to one and check whether the sum of the */\n/*     off-diagonals is less than one */\n\n/*     The sdd relative error bounds have a 1/(1- 2*x) factor in them, */\n/*     x = max(OFFDIG + OFFDIG2), so when x is close to 1/2, no relative */\n/*     accuracy is promised.  In the notation of the code fragment below, */\n/*     1/(1 - (OFFDIG + OFFDIG2)) is the condition number. */\n/*     We don't think it is worth going into \"sdd mode\" unless the relative */\n/*     condition number is reasonable, not 1/macheps. */\n/*     The threshold should be compatible with other thresholds used in the */\n/*     code. We set  OFFDIG + OFFDIG2 <= .999 =: RELCOND, it corresponds */\n/*     to losing at most 3 decimal digits: 1 / (1 - (OFFDIG + OFFDIG2)) <= 1000 */\n/*     instead of the current OFFDIG + OFFDIG2 < 1 */\n\n    yesrel = TRUE_;\n    offdig = 0.;\n    tmp = sqrt((fabs(d__[1])));\n    if (tmp < rmin) {\n\tyesrel = FALSE_;\n    }\n    if (! yesrel) {\n\tgoto L11;\n    }\n    i__1 = *n;\n    for (i__ = 2; i__ <= i__1; ++i__) {\n\ttmp2 = sqrt((d__1 = d__[i__], fabs(d__1)));\n\tif (tmp2 < rmin) {\n\t    yesrel = FALSE_;\n\t}\n\tif (! yesrel) {\n\t    goto L11;\n\t}\n\toffdig2 = (d__1 = e[i__ - 1], fabs(d__1)) / (tmp * tmp2);\n\tif (offdig + offdig2 >= .999) {\n\t    yesrel = FALSE_;\n\t}\n\tif (! yesrel) {\n\t    goto L11;\n\t}\n\ttmp = tmp2;\n\toffdig = offdig2;\n/* L10: */\n    }\nL11:\n    if (yesrel) {\n\t*info = 0;\n\treturn 0;\n    } else {\n    }\n\n\n/*     *** MORE TO BE IMPLEMENTED *** */\n\n\n/*     Test if the lower bidiagonal matrix L from T = L D L^T */\n/*     (zero shift facto) is well conditioned */\n\n\n/*     Test if the upper bidiagonal matrix U from T = U D U^T */\n/*     (zero shift facto) is well conditioned. */\n/*     In this case, the matrix needs to be flipped and, at the end */\n/*     of the eigenvector computation, the flip needs to be applied */\n/*     to the computed eigenvectors (and the support) */\n\n\n    return 0;\n\n/*     END OF ODRRR */\n\n} /* odrrr_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odrrv.c",
    "content": "/* dlarrv.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n#define imax(a,b) ( (a) > (b) ? (a) : (b) )\n#define imin(a,b) ( (a) < (b) ? (a) : (b) )\n#define TRUE_ (1)\n#define FALSE_ (0)\n\n/* Table of constant values */\nstatic double c_b5 = 0.;\nstatic int c__1 = 1;\nstatic int c__2 = 2;\n\n/* Subroutine */ int odrrv(int *n, double *vl, double *vu, \n\tdouble *d__, double *l, double *pivmin, int *isplit, \n\tint *m, int *dol, int *dou, double *minrgp, \n\tdouble *rtol1, double *rtol2, double *w, double *werr, \n\t double *wgap, int *iblock, int *indexw, double *gers, \n\t double *z__, int *ldz, int *isuppz, double *work, \n\tint *iwork, int *info)\n{\n    /* System generated locals */\n    int z_dim1, z_offset, i__1, i__2, i__3, i__4, i__5;\n    double d__1, d__2;\n    int L__1;\n\n    /* Builtin functions */\n    // double log(double);\n\n    /* Local variables */\n    int minwsize, i__, j, k, p, q, miniwsize, ii;\n    double gl;\n    int im, in;\n    double gu, gap, eps, tau, tol, tmp;\n    int zto;\n    double ztz;\n    int iend, jblk;\n    double lgap;\n    int done;\n    double rgap, left;\n    int wend, iter;\n    double bstw;\n    int itmp1;\n    extern /* Subroutine */ int odscal(int *, double *, double *, \n\t    int *);\n    int indld;\n    double fudge;\n    int idone;\n    double sigma;\n    int iinfo, iindr;\n    double resid;\n    int eskip;\n    double right;\n    extern /* Subroutine */ int odcpy(int *, double *, int *, \n\t    double *, int *);\n    int nclus, zfrom;\n    double rqtol;\n    int iindc1, iindc2;\n    extern /* Subroutine */ int odr1v(int *, int *, int *, \n\t    double *, double *, double *, double *, \n\t    double *, double *, double *, double *, int *, \n\t     int *, double *, double *, int *, int *, \n\t    double *, double *, double *, double *);\n    int stp2ii;\n    double lambda;\n    // extern double odmch(char *);\n    int ibegin, indeig;\n    int needbs;\n    int indlld;\n    double sgndef, mingma;\n    extern /* Subroutine */ int odrrb(int *, double *, double *, \n\t     int *, int *, double *, double *, int *, \n\t    double *, double *, double *, double *, int *, \n\t     double *, double *, int *, int *);\n    int oldien, oldncl, wbegin;\n    double spdiam;\n    int negcnt;\n    extern /* Subroutine */ int odrrf(int *, double *, double *, \n\t     double *, int *, int *, double *, double *, \n\t    double *, double *, double *, double *, \n\t    double *, double *, double *, double *, \n\t    double *, int *);\n    int oldcls;\n    double savgap;\n    int ndepth;\n    double ssigma;\n    extern /* Subroutine */ int odset(char *, int *, int *, \n\t    double *, double *, double *, int *);\n    int usedbs;\n    int iindwk, offset;\n    double gaptol;\n    int newcls, oldfst, indwrk, windex, oldlst;\n    int usedrq;\n    int newfst, newftt, parity, windmn, windpl, isupmn, newlst, zusedl;\n    double bstres;\n    int newsiz, zusedu, zusedw;\n    double nrminv, rqcorr;\n    int tryrqc;\n    int isupmx;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODRRV computes the eigenvectors of the tridiagonal matrix */\n/*  T = L D L^T given L, D and APPROXIMATIONS to the eigenvalues of L D L^T. */\n/*  The input eigenvalues should have been computed by DLARRE. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N       (input) INT */\n/*          The order of the matrix.  N >= 0. */\n\n/*  VL      (input) DOUBLE PRECISION */\n/*  VU      (input) DOUBLE PRECISION */\n/*          Lower and upper bounds of the interval that contains the desired */\n/*          eigenvalues. VL < VU. Needed to compute gaps on the left or right */\n/*          end of the extremal eigenvalues in the desired RANGE. */\n\n/*  D       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the N diagonal elements of the diagonal matrix D. */\n/*          On exit, D may be overwritten. */\n\n/*  L       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the (N-1) subdiagonal elements of the unit */\n/*          bidiagonal matrix L are in elements 1 to N-1 of L */\n/*          (if the matrix is not splitted.) At the end of each block */\n/*          is stored the corresponding shift as given by DLARRE. */\n/*          On exit, L is overwritten. */\n\n/*  PIVMIN  (in) DOUBLE PRECISION */\n/*          The minimum pivot allowed in the Sturm sequence. */\n\n/*  ISPLIT  (input) INT array, dimension (N) */\n/*          The splitting points, at which T breaks up into blocks. */\n/*          The first block consists of rows/columns 1 to */\n/*          ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1 */\n/*          through ISPLIT( 2 ), etc. */\n\n/*  M       (input) INT */\n/*          The total number of input eigenvalues.  0 <= M <= N. */\n\n/*  DOL     (input) INT */\n/*  DOU     (input) INT */\n/*          If the user wants to compute only selected eigenvectors from all */\n/*          the eigenvalues supplied, he can specify an index range DOL:DOU. */\n/*          Or else the setting DOL=1, DOU=M should be applied. */\n/*          Note that DOL and DOU refer to the order in which the eigenvalues */\n/*          are stored in W. */\n/*          If the user wants to compute only selected eigenpairs, then */\n/*          the columns DOL-1 to DOU+1 of the eigenvector space Z contain the */\n/*          computed eigenvectors. All other columns of Z are set to zero. */\n\n/*  MINRGP  (input) DOUBLE PRECISION */\n\n/*  RTOL1   (input) DOUBLE PRECISION */\n/*  RTOL2   (input) DOUBLE PRECISION */\n/*           Parameters for bisection. */\n/*           An interval [LEFT,RIGHT] has converged if */\n/*           RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) ) */\n\n/*  W       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          The first M elements of W contain the APPROXIMATE eigenvalues for */\n/*          which eigenvectors are to be computed.  The eigenvalues */\n/*          should be grouped by split-off block and ordered from */\n/*          smallest to largest within the block ( The output array */\n/*          W from DLARRE is expected here ). Furthermore, they are with */\n/*          respect to the shift of the corresponding root representation */\n/*          for their block. On exit, W holds the eigenvalues of the */\n/*          UNshifted matrix. */\n\n/*  WERR    (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          The first M elements contain the semiwidth of the uncertainty */\n/*          interval of the corresponding eigenvalue in W */\n\n/*  WGAP    (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          The separation from the right neighbor eigenvalue in W. */\n\n/*  IBLOCK  (input) INT array, dimension (N) */\n/*          The indices of the blocks (submatrices) associated with the */\n/*          corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue */\n/*          W(i) belongs to the first block from the top, =2 if W(i) */\n/*          belongs to the second block, etc. */\n\n/*  INDEXW  (input) INT array, dimension (N) */\n/*          The indices of the eigenvalues within each block (submatrix); */\n/*          for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the */\n/*          i-th eigenvalue W(i) is the 10-th eigenvalue in the second block. */\n\n/*  GERS    (input) DOUBLE PRECISION array, dimension (2*N) */\n/*          The N Gerschgorin intervals (the i-th Gerschgorin interval */\n/*          is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should */\n/*          be computed from the original UNshifted matrix. */\n\n/*  Z       (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) ) */\n/*          If INFO = 0, the first M columns of Z contain the */\n/*          orthonormal eigenvectors of the matrix T */\n/*          corresponding to the input eigenvalues, with the i-th */\n/*          column of Z holding the eigenvector associated with W(i). */\n/*          Note: the user must ensure that at least max(1,M) columns are */\n/*          supplied in the array Z. */\n\n/*  LDZ     (input) INT */\n/*          The leading dimension of the array Z.  LDZ >= 1, and if */\n/*          JOBZ = 'V', LDZ >= max(1,N). */\n\n/*  ISUPPZ  (output) INT array, dimension ( 2*max(1,M) ) */\n/*          The support of the eigenvectors in Z, i.e., the indices */\n/*          indicating the nonzero elements in Z. The I-th eigenvector */\n/*          is nonzero only in elements ISUPPZ( 2*I-1 ) through */\n/*          ISUPPZ( 2*I ). */\n\n/*  WORK    (workspace) DOUBLE PRECISION array, dimension (12*N) */\n\n/*  IWORK   (workspace) INT array, dimension (7*N) */\n\n/*  INFO    (output) INT */\n/*          = 0:  successful exit */\n\n/*          > 0:  A problem occured in ODRRV. */\n/*          < 0:  One of the called subroutines signaled an internal problem. */\n/*                Needs inspection of the corresponding parameter IINFO */\n/*                for further information. */\n\n/*          =-1:  Problem in ODRRB when refining a child's eigenvalues. */\n/*          =-2:  Problem in ODRRF when computing the RRR of a child. */\n/*                When a child is inside a tight cluster, it can be difficult */\n/*                to find an RRR. A partial remedy from the user's point of */\n/*                view is to make the parameter MINRGP smaller and recompile. */\n/*                However, as the orthogonality of the computed vectors is */\n/*                proportional to 1/MINRGP, the user should be aware that */\n/*                he might be trading in precision when he decreases MINRGP. */\n/*          =-3:  Problem in ODRRB when refining a single eigenvalue */\n/*                after the Rayleigh correction was rejected. */\n/*          = 5:  The Rayleigh Quotient Iteration failed to converge to */\n/*                full accuracy in MAXITR steps. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n/*     .. */\n/*     The first N entries of WORK are reserved for the eigenvalues */\n    /* Parameter adjustments */\n    --d__;\n    --l;\n    --isplit;\n    --w;\n    --werr;\n    --wgap;\n    --iblock;\n    --indexw;\n    --gers;\n    z_dim1 = *ldz;\n    z_offset = 1 + z_dim1;\n    z__ -= z_offset;\n    --isuppz;\n    --work;\n    --iwork;\n\n    /* Function Body */\n    indld = *n + 1;\n    indlld = (*n << 1) + 1;\n    indwrk = *n * 3 + 1;\n    minwsize = *n * 12;\n    i__1 = minwsize;\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\twork[i__] = 0.;\n/* L5: */\n    }\n/*     IWORK(IINDR+1:IINDR+N) hold the twist indices R for the */\n/*     factorization used to compute the FP vector */\n    iindr = 0;\n/*     IWORK(IINDC1+1:IINC2+N) are used to store the clusters of the current */\n/*     layer and the one above. */\n    iindc1 = *n;\n    iindc2 = *n << 1;\n    iindwk = *n * 3 + 1;\n    miniwsize = *n * 7;\n    i__1 = miniwsize;\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\tiwork[i__] = 0;\n/* L10: */\n    }\n    zusedl = 1;\n    if (*dol > 1) {\n/*        Set lower bound for use of Z */\n\tzusedl = *dol - 1;\n    }\n    zusedu = *m;\n    if (*dou < *m) {\n/*        Set lower bound for use of Z */\n\tzusedu = *dou + 1;\n    }\n/*     The width of the part of Z that is used */\n    zusedw = zusedu - zusedl + 1;\n    odset(\"Full\", n, &zusedw, &c_b5, &c_b5, &z__[zusedl * z_dim1 + 1], ldz);\n    eps = DBL_EPSILON; // eps = odmch(\"Precision\");\n    rqtol = eps * 2.;\n\n/*     Set expert flags for standard code. */\n    tryrqc = TRUE_;\n    if (*dol == 1 && *dou == *m) {\n    } else {\n/*        Only selected eigenpairs are computed. Since the other evalues */\n/*        are not refined by RQ iteration, bisection has to compute to full */\n/*        accuracy. */\n\t*rtol1 = eps * 4.;\n\t*rtol2 = eps * 4.;\n    }\n/*     The entries WBEGIN:WEND in W, WERR, WGAP correspond to the */\n/*     desired eigenvalues. The support of the nonzero eigenvector */\n/*     entries is contained in the interval IBEGIN:IEND. */\n/*     Remark that if k eigenpairs are desired, then the eigenvectors */\n/*     are stored in k contiguous columns of Z. */\n/*     DONE is the number of eigenvectors already computed */\n    done = 0;\n    ibegin = 1;\n    wbegin = 1;\n    i__1 = iblock[*m];\n    for (jblk = 1; jblk <= i__1; ++jblk) {\n\tiend = isplit[jblk];\n\tsigma = l[iend];\n/*        Find the eigenvectors of the submatrix indexed IBEGIN */\n/*        through IEND. */\n\twend = wbegin - 1;\nL15:\n\tif (wend < *m) {\n\t    if (iblock[wend + 1] == jblk) {\n\t\t++wend;\n\t\tgoto L15;\n\t    }\n\t}\n\tif (wend < wbegin) {\n\t    ibegin = iend + 1;\n\t    goto L170;\n\t} else if (wend < *dol || wbegin > *dou) {\n\t    ibegin = iend + 1;\n\t    wbegin = wend + 1;\n\t    goto L170;\n\t}\n/*        Find local spectral diameter of the block */\n\tgl = gers[(ibegin << 1) - 1];\n\tgu = gers[ibegin * 2];\n\ti__2 = iend;\n\tfor (i__ = ibegin + 1; i__ <= i__2; ++i__) {\n/* Computing MIN */\n\t    d__1 = gers[(i__ << 1) - 1];\n\t    gl = fmin(d__1,gl);\n/* Computing MAX */\n\t    d__1 = gers[i__ * 2];\n\t    gu = fmax(d__1,gu);\n/* L20: */\n\t}\n\tspdiam = gu - gl;\n/*        OLDIEN is the last index of the previous block */\n\toldien = ibegin - 1;\n/*        Calculate the size of the current block */\n\tin = iend - ibegin + 1;\n/*        The number of eigenvalues in the current block */\n\tim = wend - wbegin + 1;\n/*        This is for a 1x1 block */\n\tif (ibegin == iend) {\n\t    ++done;\n\t    z__[ibegin + wbegin * z_dim1] = 1.;\n\t    isuppz[(wbegin << 1) - 1] = ibegin;\n\t    isuppz[wbegin * 2] = ibegin;\n\t    w[wbegin] += sigma;\n\t    work[wbegin] = w[wbegin];\n\t    ibegin = iend + 1;\n\t    ++wbegin;\n\t    goto L170;\n\t}\n/*        The desired (shifted) eigenvalues are stored in W(WBEGIN:WEND) */\n/*        Note that these can be approximations, in this case, the corresp. */\n/*        entries of WERR give the size of the uncertainty interval. */\n/*        The eigenvalue approximations will be refined when necessary as */\n/*        high relative accuracy is required for the computation of the */\n/*        corresponding eigenvectors. */\n\todcpy(&im, &w[wbegin], &c__1, &work[wbegin], &c__1);\n/*        We store in W the eigenvalue approximations w.r.t. the original */\n/*        matrix T. */\n\ti__2 = im;\n\tfor (i__ = 1; i__ <= i__2; ++i__) {\n\t    w[wbegin + i__ - 1] += sigma;\n/* L30: */\n\t}\n/*        NDEPTH is the current depth of the representation tree */\n\tndepth = 0;\n/*        PARITY is either 1 or 0 */\n\tparity = 1;\n/*        NCLUS is the number of clusters for the next level of the */\n/*        representation tree, we start with NCLUS = 1 for the root */\n\tnclus = 1;\n\tiwork[iindc1 + 1] = 1;\n\tiwork[iindc1 + 2] = im;\n/*        IDONE is the number of eigenvectors already computed in the current */\n/*        block */\n\tidone = 0;\n/*        loop while( IDONE.LT.IM ) */\n/*        generate the representation tree for the current block and */\n/*        compute the eigenvectors */\nL40:\n\tif (idone < im) {\n/*           This is a crude protection against infinitely deep trees */\n\t    if (ndepth > *m) {\n\t\t*info = -2;\n\t\treturn 0;\n\t    }\n/*           breadth first processing of the current level of the representation */\n/*           tree: OLDNCL = number of clusters on current level */\n\t    oldncl = nclus;\n/*           reset NCLUS to count the number of child clusters */\n\t    nclus = 0;\n\n\t    parity = 1 - parity;\n\t    if (parity == 0) {\n\t\toldcls = iindc1;\n\t\tnewcls = iindc2;\n\t    } else {\n\t\toldcls = iindc2;\n\t\tnewcls = iindc1;\n\t    }\n/*           Process the clusters on the current level */\n\t    i__2 = oldncl;\n\t    for (i__ = 1; i__ <= i__2; ++i__) {\n\t\tj = oldcls + (i__ << 1);\n/*              OLDFST, OLDLST = first, last index of current cluster. */\n/*                               cluster indices start with 1 and are relative */\n/*                               to WBEGIN when accessing W, WGAP, WERR, Z */\n\t\toldfst = iwork[j - 1];\n\t\toldlst = iwork[j];\n\t\tif (ndepth > 0) {\n/*                 Retrieve relatively robust representation (RRR) of cluster */\n/*                 that has been computed at the previous level */\n/*                 The RRR is stored in Z and overwritten once the eigenvectors */\n/*                 have been computed or when the cluster is refined */\n\t\t    if (*dol == 1 && *dou == *m) {\n/*                    Get representation from location of the leftmost evalue */\n/*                    of the cluster */\n\t\t\tj = wbegin + oldfst - 1;\n\t\t    } else {\n\t\t\tif (wbegin + oldfst - 1 < *dol) {\n/*                       Get representation from the left end of Z array */\n\t\t\t    j = *dol - 1;\n\t\t\t} else if (wbegin + oldfst - 1 > *dou) {\n/*                       Get representation from the right end of Z array */\n\t\t\t    j = *dou;\n\t\t\t} else {\n\t\t\t    j = wbegin + oldfst - 1;\n\t\t\t}\n\t\t    }\n\t\t    odcpy(&in, &z__[ibegin + j * z_dim1], &c__1, &d__[ibegin]\n, &c__1);\n\t\t    i__3 = in - 1;\n\t\t    odcpy(&i__3, &z__[ibegin + (j + 1) * z_dim1], &c__1, &l[\n\t\t\t    ibegin], &c__1);\n\t\t    sigma = z__[iend + (j + 1) * z_dim1];\n/*                 Set the corresponding entries in Z to zero */\n\t\t    odset(\"Full\", &in, &c__2, &c_b5, &c_b5, &z__[ibegin + j \n\t\t\t    * z_dim1], ldz);\n\t\t}\n/*              Compute DL and DLL of current RRR */\n\t\ti__3 = iend - 1;\n\t\tfor (j = ibegin; j <= i__3; ++j) {\n\t\t    tmp = d__[j] * l[j];\n\t\t    work[indld - 1 + j] = tmp;\n\t\t    work[indlld - 1 + j] = tmp * l[j];\n/* L50: */\n\t\t}\n\t\tif (ndepth > 0) {\n/*                 P and Q are index of the first and last eigenvalue to compute */\n/*                 within the current block */\n\t\t    p = indexw[wbegin - 1 + oldfst];\n\t\t    q = indexw[wbegin - 1 + oldlst];\n/*                 Offset for the arrays WORK, WGAP and WERR, i.e., th P-OFFSET */\n/*                 thru' Q-OFFSET elements of these arrays are to be used. */\n/*                  OFFSET = P-OLDFST */\n\t\t    offset = indexw[wbegin] - 1;\n/*                 perform limited bisection (if necessary) to get approximate */\n/*                 eigenvalues to the precision needed. */\n\t\t    odrrb(&in, &d__[ibegin], &work[indlld + ibegin - 1], &p, \n\t\t\t     &q, rtol1, rtol2, &offset, &work[wbegin], &wgap[\n\t\t\t    wbegin], &werr[wbegin], &work[indwrk], &iwork[\n\t\t\t    iindwk], pivmin, &spdiam, &in, &iinfo);\n\t\t    if (iinfo != 0) {\n\t\t\t*info = -1;\n\t\t\treturn 0;\n\t\t    }\n/*                 We also recompute the extremal gaps. W holds all eigenvalues */\n/*                 of the unshifted matrix and must be used for computation */\n/*                 of WGAP, the entries of WORK might stem from RRRs with */\n/*                 different shifts. The gaps from WBEGIN-1+OLDFST to */\n/*                 WBEGIN-1+OLDLST are correctly computed in ODRRB. */\n/*                 However, we only allow the gaps to become greater since */\n/*                 this is what should happen when we decrease WERR */\n\t\t    if (oldfst > 1) {\n/* Computing MAX */\n\t\t\td__1 = wgap[wbegin + oldfst - 2], d__2 = w[wbegin + \n\t\t\t\toldfst - 1] - werr[wbegin + oldfst - 1] - w[\n\t\t\t\twbegin + oldfst - 2] - werr[wbegin + oldfst - \n\t\t\t\t2];\n\t\t\twgap[wbegin + oldfst - 2] = fmax(d__1,d__2);\n\t\t    }\n\t\t    if (wbegin + oldlst - 1 < wend) {\n/* Computing MAX */\n\t\t\td__1 = wgap[wbegin + oldlst - 1], d__2 = w[wbegin + \n\t\t\t\toldlst] - werr[wbegin + oldlst] - w[wbegin + \n\t\t\t\toldlst - 1] - werr[wbegin + oldlst - 1];\n\t\t\twgap[wbegin + oldlst - 1] = fmax(d__1,d__2);\n\t\t    }\n/*                 Each time the eigenvalues in WORK get refined, we store */\n/*                 the newly found approximation with all shifts applied in W */\n\t\t    i__3 = oldlst;\n\t\t    for (j = oldfst; j <= i__3; ++j) {\n\t\t\tw[wbegin + j - 1] = work[wbegin + j - 1] + sigma;\n/* L53: */\n\t\t    }\n\t\t}\n/*              Process the current node. */\n\t\tnewfst = oldfst;\n\t\ti__3 = oldlst;\n\t\tfor (j = oldfst; j <= i__3; ++j) {\n\t\t    if (j == oldlst) {\n/*                    we are at the right end of the cluster, this is also the */\n/*                    boundary of the child cluster */\n\t\t\tnewlst = j;\n\t\t    } else if (wgap[wbegin + j - 1] >= *minrgp * (d__1 = work[\n\t\t\t    wbegin + j - 1], fabs(d__1))) {\n/*                    the right relative gap is big enough, the child cluster */\n/*                    (NEWFST,..,NEWLST) is well separated from the following */\n\t\t\tnewlst = j;\n\t\t    } else {\n/*                    inside a child cluster, the relative gap is not */\n/*                    big enough. */\n\t\t\tgoto L140;\n\t\t    }\n/*                 Compute size of child cluster found */\n\t\t    newsiz = newlst - newfst + 1;\n/*                 NEWFTT is the place in Z where the new RRR or the computed */\n/*                 eigenvector is to be stored */\n\t\t    if (*dol == 1 && *dou == *m) {\n/*                    Store representation at location of the leftmost evalue */\n/*                    of the cluster */\n\t\t\tnewftt = wbegin + newfst - 1;\n\t\t    } else {\n\t\t\tif (wbegin + newfst - 1 < *dol) {\n/*                       Store representation at the left end of Z array */\n\t\t\t    newftt = *dol - 1;\n\t\t\t} else if (wbegin + newfst - 1 > *dou) {\n/*                       Store representation at the right end of Z array */\n\t\t\t    newftt = *dou;\n\t\t\t} else {\n\t\t\t    newftt = wbegin + newfst - 1;\n\t\t\t}\n\t\t    }\n\t\t    if (newsiz > 1) {\n\n/*                    Current child is not a singleton but a cluster. */\n/*                    Compute and store new representation of child. */\n\n\n/*                    Compute left and right cluster gap. */\n\n/*                    LGAP and RGAP are not computed from WORK because */\n/*                    the eigenvalue approximations may stem from RRRs */\n/*                    different shifts. However, W hold all eigenvalues */\n/*                    of the unshifted matrix. Still, the entries in WGAP */\n/*                    have to be computed from WORK since the entries */\n/*                    in W might be of the same order so that gaps are not */\n/*                    exhibited correctly for very close eigenvalues. */\n\t\t\tif (newfst == 1) {\n/* Computing MAX */\n\t\t\t    d__1 = 0., d__2 = w[wbegin] - werr[wbegin] - *vl;\n\t\t\t    lgap = fmax(d__1,d__2);\n\t\t\t} else {\n\t\t\t    lgap = wgap[wbegin + newfst - 2];\n\t\t\t}\n\t\t\trgap = wgap[wbegin + newlst - 1];\n\n/*                    Compute left- and rightmost eigenvalue of child */\n/*                    to high precision in order to shift as close */\n/*                    as possible and obtain as large relative gaps */\n/*                    as possible */\n\n\t\t\tfor (k = 1; k <= 2; ++k) {\n\t\t\t    if (k == 1) {\n\t\t\t\tp = indexw[wbegin - 1 + newfst];\n\t\t\t    } else {\n\t\t\t\tp = indexw[wbegin - 1 + newlst];\n\t\t\t    }\n\t\t\t    offset = indexw[wbegin] - 1;\n\t\t\t    odrrb(&in, &d__[ibegin], &work[indlld + ibegin \n\t\t\t\t    - 1], &p, &p, &rqtol, &rqtol, &offset, &\n\t\t\t\t    work[wbegin], &wgap[wbegin], &werr[wbegin]\n, &work[indwrk], &iwork[iindwk], pivmin, &\n\t\t\t\t    spdiam, &in, &iinfo);\n/* L55: */\n\t\t\t}\n\n\t\t\tif (wbegin + newlst - 1 < *dol || wbegin + newfst - 1 \n\t\t\t\t> *dou) {\n/*                       if the cluster contains no desired eigenvalues */\n/*                       skip the computation of that branch of the rep. tree */\n\n/*                       We could skip before the refinement of the extremal */\n/*                       eigenvalues of the child, but then the representation */\n/*                       tree could be different from the one when nothing is */\n/*                       skipped. For this reason we skip at this place. */\n\t\t\t    idone = idone + newlst - newfst + 1;\n\t\t\t    goto L139;\n\t\t\t}\n\n/*                    Compute RRR of child cluster. */\n/*                    Note that the new RRR is stored in Z */\n\n/*                    ODRRF needs LWORK = 2*N */\n\t\t\todrrf(&in, &d__[ibegin], &l[ibegin], &work[indld + \n\t\t\t\tibegin - 1], &newfst, &newlst, &work[wbegin], \n\t\t\t\t&wgap[wbegin], &werr[wbegin], &spdiam, &lgap, \n\t\t\t\t&rgap, pivmin, &tau, &z__[ibegin + newftt * \n\t\t\t\tz_dim1], &z__[ibegin + (newftt + 1) * z_dim1], \n\t\t\t\t &work[indwrk], &iinfo);\n\t\t\tif (iinfo == 0) {\n/*                       a new RRR for the cluster was found by ODRRF */\n/*                       update shift and store it */\n\t\t\t    ssigma = sigma + tau;\n\t\t\t    z__[iend + (newftt + 1) * z_dim1] = ssigma;\n/*                       WORK() are the midpoints and WERR() the semi-width */\n/*                       Note that the entries in W are unchanged. */\n\t\t\t    i__4 = newlst;\n\t\t\t    for (k = newfst; k <= i__4; ++k) {\n\t\t\t\tfudge = eps * 3. * (d__1 = work[wbegin + k - \n\t\t\t\t\t1], fabs(d__1));\n\t\t\t\twork[wbegin + k - 1] -= tau;\n\t\t\t\tfudge += eps * 4. * (d__1 = work[wbegin + k - \n\t\t\t\t\t1], fabs(d__1));\n/*                          Fudge errors */\n\t\t\t\twerr[wbegin + k - 1] += fudge;\n/*                          Gaps are not fudged. Provided that WERR is small */\n/*                          when eigenvalues are close, a zero gap indicates */\n/*                          that a new representation is needed for resolving */\n/*                          the cluster. A fudge could lead to a wrong decision */\n/*                          of judging eigenvalues 'separated' which in */\n/*                          reality are not. This could have a negative impact */\n/*                          on the orthogonality of the computed eigenvectors. */\n/* L116: */\n\t\t\t    }\n\t\t\t    ++nclus;\n\t\t\t    k = newcls + (nclus << 1);\n\t\t\t    iwork[k - 1] = newfst;\n\t\t\t    iwork[k] = newlst;\n\t\t\t} else {\n\t\t\t    *info = -2;\n\t\t\t    return 0;\n\t\t\t}\n\t\t    } else {\n\n/*                    Compute eigenvector of singleton */\n\n\t\t\titer = 0;\n\n\t\t\ttol = log((double) in) * 4. * eps;\n\n\t\t\tk = newfst;\n\t\t\twindex = wbegin + k - 1;\n/* Computing MAX */\n\t\t\ti__4 = windex - 1;\n\t\t\twindmn = imax(i__4,1);\n/* Computing MIN */\n\t\t\ti__4 = windex + 1;\n\t\t\twindpl = imin(i__4,*m);\n\t\t\tlambda = work[windex];\n\t\t\t++done;\n/*                    Check if eigenvector computation is to be skipped */\n\t\t\tif (windex < *dol || windex > *dou) {\n\t\t\t    eskip = TRUE_;\n\t\t\t    goto L125;\n\t\t\t} else {\n\t\t\t    eskip = FALSE_;\n\t\t\t}\n\t\t\tleft = work[windex] - werr[windex];\n\t\t\tright = work[windex] + werr[windex];\n\t\t\tindeig = indexw[windex];\n/*                    Note that since we compute the eigenpairs for a child, */\n/*                    all eigenvalue approximations are w.r.t the same shift. */\n/*                    In this case, the entries in WORK should be used for */\n/*                    computing the gaps since they exhibit even very small */\n/*                    differences in the eigenvalues, as opposed to the */\n/*                    entries in W which might \"look\" the same. */\n\t\t\tif (k == 1) {\n/*                       In the case RANGE='I' and with not much initial */\n/*                       accuracy in LAMBDA and VL, the formula */\n/*                       LGAP = MAX( ZERO, (SIGMA - VL) + LAMBDA ) */\n/*                       can lead to an overestimation of the left gap and */\n/*                       thus to inadequately early RQI 'convergence'. */\n/*                       Prevent this by forcing a small left gap. */\n/* Computing MAX */\n\t\t\t    d__1 = fabs(left), d__2 = fabs(right);\n\t\t\t    lgap = eps * fmax(d__1,d__2);\n\t\t\t} else {\n\t\t\t    lgap = wgap[windmn];\n\t\t\t}\n\t\t\tif (k == im) {\n/*                       In the case RANGE='I' and with not much initial */\n/*                       accuracy in LAMBDA and VU, the formula */\n/*                       can lead to an overestimation of the right gap and */\n/*                       thus to inadequately early RQI 'convergence'. */\n/*                       Prevent this by forcing a small right gap. */\n/* Computing MAX */\n\t\t\t    d__1 = fabs(left), d__2 = fabs(right);\n\t\t\t    rgap = eps * fmax(d__1,d__2);\n\t\t\t} else {\n\t\t\t    rgap = wgap[windex];\n\t\t\t}\n\t\t\tgap = fmin(lgap,rgap);\n\t\t\tif (k == 1 || k == im) {\n/*                       The eigenvector support can become wrong */\n/*                       because significant entries could be cut off due to a */\n/*                       large GAPTOL parameter in LAR1V. Prevent this. */\n\t\t\t    gaptol = 0.;\n\t\t\t} else {\n\t\t\t    gaptol = gap * eps;\n\t\t\t}\n\t\t\tisupmn = in;\n\t\t\tisupmx = 1;\n/*                    Update WGAP so that it holds the minimum gap */\n/*                    to the left or the right. This is crucial in the */\n/*                    case where bisection is used to ensure that the */\n/*                    eigenvalue is refined up to the required precision. */\n/*                    The correct value is restored afterwards. */\n\t\t\tsavgap = wgap[windex];\n\t\t\twgap[windex] = gap;\n/*                    We want to use the Rayleigh Quotient Correction */\n/*                    as often as possible since it converges quadratically */\n/*                    when we are close enough to the desired eigenvalue. */\n/*                    However, the Rayleigh Quotient can have the wrong sign */\n/*                    and lead us away from the desired eigenvalue. In this */\n/*                    case, the best we can do is to use bisection. */\n\t\t\tusedbs = FALSE_;\n\t\t\tusedrq = FALSE_;\n/*                    Bisection is initially turned off unless it is forced */\n\t\t\tneedbs = ! tryrqc;\nL120:\n/*                    Check if bisection should be used to refine eigenvalue */\n\t\t\tif (needbs) {\n/*                       Take the bisection as new iterate */\n\t\t\t    usedbs = TRUE_;\n\t\t\t    itmp1 = iwork[iindr + windex];\n\t\t\t    offset = indexw[wbegin] - 1;\n\t\t\t    d__1 = eps * 2.;\n\t\t\t    odrrb(&in, &d__[ibegin], &work[indlld + ibegin \n\t\t\t\t    - 1], &indeig, &indeig, &c_b5, &d__1, &\n\t\t\t\t    offset, &work[wbegin], &wgap[wbegin], &\n\t\t\t\t    werr[wbegin], &work[indwrk], &iwork[\n\t\t\t\t    iindwk], pivmin, &spdiam, &itmp1, &iinfo);\n\t\t\t    if (iinfo != 0) {\n\t\t\t\t*info = -3;\n\t\t\t\treturn 0;\n\t\t\t    }\n\t\t\t    lambda = work[windex];\n/*                       Reset twist index from inaccurate LAMBDA to */\n/*                       force computation of true MINGMA */\n\t\t\t    iwork[iindr + windex] = 0;\n\t\t\t}\n/*                    Given LAMBDA, compute the eigenvector. */\n\t\t\tL__1 = ! usedbs;\n\t\t\todr1v(&in, &c__1, &in, &lambda, &d__[ibegin], &l[\n\t\t\t\tibegin], &work[indld + ibegin - 1], &work[\n\t\t\t\tindlld + ibegin - 1], pivmin, &gaptol, &z__[\n\t\t\t\tibegin + windex * z_dim1], &L__1, &negcnt, &\n\t\t\t\tztz, &mingma, &iwork[iindr + windex], &isuppz[\n\t\t\t\t(windex << 1) - 1], &nrminv, &resid, &rqcorr, \n\t\t\t\t&work[indwrk]);\n\t\t\tif (iter == 0) {\n\t\t\t    bstres = resid;\n\t\t\t    bstw = lambda;\n\t\t\t} else if (resid < bstres) {\n\t\t\t    bstres = resid;\n\t\t\t    bstw = lambda;\n\t\t\t}\n/* Computing MIN */\n\t\t\ti__4 = isupmn, i__5 = isuppz[(windex << 1) - 1];\n\t\t\tisupmn = imin(i__4,i__5);\n/* Computing MAX */\n\t\t\ti__4 = isupmx, i__5 = isuppz[windex * 2];\n\t\t\tisupmx = imax(i__4,i__5);\n\t\t\t++iter;\n/*                    sin alpha <= |resid|/gap */\n/*                    Note that both the residual and the gap are */\n/*                    proportional to the matrix, so ||T|| doesn't play */\n/*                    a role in the quotient */\n\n/*                    Convergence test for Rayleigh-Quotient iteration */\n/*                    (omitted when Bisection has been used) */\n\n\t\t\tif (resid > tol * gap && fabs(rqcorr) > rqtol * fabs(\n\t\t\t\tlambda) && ! usedbs) {\n/*                       We need to check that the RQCORR update doesn't */\n/*                       move the eigenvalue away from the desired one and */\n/*                       towards a neighbor. -> protection with bisection */\n\t\t\t    if (indeig <= negcnt) {\n/*                          The wanted eigenvalue lies to the left */\n\t\t\t\tsgndef = -1.;\n\t\t\t    } else {\n/*                          The wanted eigenvalue lies to the right */\n\t\t\t\tsgndef = 1.;\n\t\t\t    }\n/*                       We only use the RQCORR if it improves the */\n/*                       the iterate reasonably. */\n\t\t\t    if (rqcorr * sgndef >= 0. && lambda + rqcorr <= \n\t\t\t\t    right && lambda + rqcorr >= left) {\n\t\t\t\tusedrq = TRUE_;\n/*                          Store new midpoint of bisection interval in WORK */\n\t\t\t\tif (sgndef == 1.) {\n/*                             The current LAMBDA is on the left of the true */\n/*                             eigenvalue */\n\t\t\t\t    left = lambda;\n/*                             We prefer to assume that the error estimate */\n/*                             is correct. We could make the interval not */\n/*                             as a bracket but to be modified if the RQCORR */\n/*                             chooses to. In this case, the RIGHT side should */\n/*                             be modified as follows: */\n/*                              RIGHT = MAX(RIGHT, LAMBDA + RQCORR) */\n\t\t\t\t} else {\n/*                             The current LAMBDA is on the right of the true */\n/*                             eigenvalue */\n\t\t\t\t    right = lambda;\n/*                             See comment about assuming the error estimate is */\n/*                             correct above. */\n/*                              LEFT = MIN(LEFT, LAMBDA + RQCORR) */\n\t\t\t\t}\n\t\t\t\twork[windex] = (right + left) * .5;\n/*                          Take RQCORR since it has the correct sign and */\n/*                          improves the iterate reasonably */\n\t\t\t\tlambda += rqcorr;\n/*                          Update width of error interval */\n\t\t\t\twerr[windex] = (right - left) * .5;\n\t\t\t    } else {\n\t\t\t\tneedbs = TRUE_;\n\t\t\t    }\n\t\t\t    if (right - left < rqtol * fabs(lambda)) {\n/*                             The eigenvalue is computed to bisection accuracy */\n/*                             compute eigenvector and stop */\n\t\t\t\tusedbs = TRUE_;\n\t\t\t\tgoto L120;\n\t\t\t    } else if (iter < 10) {\n\t\t\t\tgoto L120;\n\t\t\t    } else if (iter == 10) {\n\t\t\t\tneedbs = TRUE_;\n\t\t\t\tgoto L120;\n\t\t\t    } else {\n\t\t\t\t*info = 5;\n\t\t\t\treturn 0;\n\t\t\t    }\n\t\t\t} else {\n\t\t\t    stp2ii = FALSE_;\n\t\t\t    if (usedrq && usedbs && bstres <= resid) {\n\t\t\t\tlambda = bstw;\n\t\t\t\tstp2ii = TRUE_;\n\t\t\t    }\n\t\t\t    if (stp2ii) {\n/*                          improve error angle by second step */\n\t\t\t\tL__1 = ! usedbs;\n\t\t\t\todr1v(&in, &c__1, &in, &lambda, &d__[ibegin]\n, &l[ibegin], &work[indld + ibegin - \n\t\t\t\t\t1], &work[indlld + ibegin - 1], \n\t\t\t\t\tpivmin, &gaptol, &z__[ibegin + windex \n\t\t\t\t\t* z_dim1], &L__1, &negcnt, &ztz, &\n\t\t\t\t\tmingma, &iwork[iindr + windex], &\n\t\t\t\t\tisuppz[(windex << 1) - 1], &nrminv, &\n\t\t\t\t\tresid, &rqcorr, &work[indwrk]);\n\t\t\t    }\n\t\t\t    work[windex] = lambda;\n\t\t\t}\n\n/*                    Compute FP-vector support w.r.t. whole matrix */\n\n\t\t\tisuppz[(windex << 1) - 1] += oldien;\n\t\t\tisuppz[windex * 2] += oldien;\n\t\t\tzfrom = isuppz[(windex << 1) - 1];\n\t\t\tzto = isuppz[windex * 2];\n\t\t\tisupmn += oldien;\n\t\t\tisupmx += oldien;\n/*                    Ensure vector is ok if support in the RQI has changed */\n\t\t\tif (isupmn < zfrom) {\n\t\t\t    i__4 = zfrom - 1;\n\t\t\t    for (ii = isupmn; ii <= i__4; ++ii) {\n\t\t\t\tz__[ii + windex * z_dim1] = 0.;\n/* L122: */\n\t\t\t    }\n\t\t\t}\n\t\t\tif (isupmx > zto) {\n\t\t\t    i__4 = isupmx;\n\t\t\t    for (ii = zto + 1; ii <= i__4; ++ii) {\n\t\t\t\tz__[ii + windex * z_dim1] = 0.;\n/* L123: */\n\t\t\t    }\n\t\t\t}\n\t\t\ti__4 = zto - zfrom + 1;\n\t\t\todscal(&i__4, &nrminv, &z__[zfrom + windex * z_dim1], \n                               &c__1);\nL125:\n/*                    Update W */\n\t\t\tw[windex] = lambda + sigma;\n/*                    Recompute the gaps on the left and right */\n/*                    But only allow them to become larger and not */\n/*                    smaller (which can only happen through \"bad\" */\n/*                    cancellation and doesn't reflect the theory */\n/*                    where the initial gaps are underestimated due */\n/*                    to WERR being too crude.) */\n\t\t\tif (! eskip) {\n\t\t\t    if (k > 1) {\n/* Computing MAX */\n\t\t\t\td__1 = wgap[windmn], d__2 = w[windex] - werr[\n\t\t\t\t\twindex] - w[windmn] - werr[windmn];\n\t\t\t\twgap[windmn] = fmax(d__1,d__2);\n\t\t\t    }\n\t\t\t    if (windex < wend) {\n/* Computing MAX */\n\t\t\t\td__1 = savgap, d__2 = w[windpl] - werr[windpl]\n\t\t\t\t\t - w[windex] - werr[windex];\n\t\t\t\twgap[windex] = fmax(d__1,d__2);\n\t\t\t    }\n\t\t\t}\n\t\t\t++idone;\n\t\t    }\n/*                 here ends the code for the current child */\n\nL139:\n/*                 Proceed to any remaining child nodes */\n\t\t    newfst = j + 1;\nL140:\n\t\t    ;\n\t\t}\n/* L150: */\n\t    }\n\t    ++ndepth;\n\t    goto L40;\n\t}\n\tibegin = iend + 1;\n\twbegin = wend + 1;\nL170:\n\t;\n    }\n\n    return 0;\n\n/*     End of ODRRV */\n\n} /* odrrv_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odruv.c",
    "content": "/* dlaruv.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n#define imax(a,b) ( (a) > (b) ? (a) : (b) )\n#define imin(a,b) ( (a) < (b) ? (a) : (b) )\n\n/* Subroutine */ \nint odruv(int *iseed, int *n, double *x)\n{\n    /* Initialized data */\n\n    static int mm[512]\t/* was [128][4] */ = { 494,2637,255,2008,1253,\n\t    3344,4084,1739,3143,3468,688,1657,1238,3166,1292,3422,1270,2016,\n\t    154,2862,697,1706,491,931,1444,444,3577,3944,2184,1661,3482,657,\n\t    3023,3618,1267,1828,164,3798,3087,2400,2870,3876,1905,1593,1797,\n\t    1234,3460,328,2861,1950,617,2070,3331,769,1558,2412,2800,189,287,\n\t    2045,1227,2838,209,2770,3654,3993,192,2253,3491,2889,2857,2094,\n\t    1818,688,1407,634,3231,815,3524,1914,516,164,303,2144,3480,119,\n\t    3357,837,2826,2332,2089,3780,1700,3712,150,2000,3375,1621,3090,\n\t    3765,1149,3146,33,3082,2741,359,3316,1749,185,2784,2202,2199,1364,\n\t    1244,2020,3160,2785,2772,1217,1822,1245,2252,3904,2774,997,2573,\n\t    1148,545,322,789,1440,752,2859,123,1848,643,2405,2638,2344,46,\n\t    3814,913,3649,339,3808,822,2832,3078,3633,2970,637,2249,2081,4019,\n\t    1478,242,481,2075,4058,622,3376,812,234,641,4005,1122,3135,2640,\n\t    2302,40,1832,2247,2034,2637,1287,1691,496,1597,2394,2584,1843,336,\n\t    1472,2407,433,2096,1761,2810,566,442,41,1238,1086,603,840,3168,\n\t    1499,1084,3438,2408,1589,2391,288,26,512,1456,171,1677,2657,2270,\n\t    2587,2961,1970,1817,676,1410,3723,2803,3185,184,663,499,3784,1631,\n\t    1925,3912,1398,1349,1441,2224,2411,1907,3192,2786,382,37,759,2948,\n\t    1862,3802,2423,2051,2295,1332,1832,2405,3638,3661,327,3660,716,\n\t    1842,3987,1368,1848,2366,2508,3754,1766,3572,2893,307,1297,3966,\n\t    758,2598,3406,2922,1038,2934,2091,2451,1580,1958,2055,1507,1078,\n\t    3273,17,854,2916,3971,2889,3831,2621,1541,893,736,3992,787,2125,\n\t    2364,2460,257,1574,3912,1216,3248,3401,2124,2762,149,2245,166,466,\n\t    4018,1399,190,2879,153,2320,18,712,2159,2318,2091,3443,1510,449,\n\t    1956,2201,3137,3399,1321,2271,3667,2703,629,2365,2431,1113,3922,\n\t    2554,184,2099,3228,4012,1921,3452,3901,572,3309,3171,817,3039,\n\t    1696,1256,3715,2077,3019,1497,1101,717,51,981,1978,1813,3881,76,\n\t    3846,3694,1682,124,1660,3997,479,1141,886,3514,1301,3604,1888,\n\t    1836,1990,2058,692,1194,20,3285,2046,2107,3508,3525,3801,2549,\n\t    1145,2253,305,3301,1065,3133,2913,3285,1241,1197,3729,2501,1673,\n\t    541,2753,949,2361,1165,4081,2725,3305,3069,3617,3733,409,2157,\n\t    1361,3973,1865,2525,1409,3445,3577,77,3761,2149,1449,3005,225,85,\n\t    3673,3117,3089,1349,2057,413,65,1845,697,3085,3441,1573,3689,2941,\n\t    929,533,2841,4077,721,2821,2249,2397,2817,245,1913,1997,3121,997,\n\t    1833,2877,1633,981,2009,941,2449,197,2441,285,1473,2741,3129,909,\n\t    2801,421,4073,2813,2337,1429,1177,1901,81,1669,2633,2269,129,1141,\n\t    249,3917,2481,3941,2217,2749,3041,1877,345,2861,1809,3141,2825,\n\t    157,2881,3637,1465,2829,2161,3365,361,2685,3745,2325,3609,3821,\n\t    3537,517,3017,2141,1537 };\n\n    /* System generated locals */\n    int i__1;\n\n    /* Local variables */\n    int i__, i1, i2, i3, i4, it1, it2, it3, it4;\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODRUV returns a vector of n random real numbers from a uniform (0,1) */\n/*  distribution (n <= 128). */\n\n/*  This is an auxiliary routine called by DLARNV and ZLARNV. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  ISEED   (input/output) INT array, dimension (4) */\n/*          On entry, the seed of the random number generator; the array */\n/*          elements must be between 0 and 4095, and ISEED(4) must be */\n/*          odd. */\n/*          On exit, the seed is updated. */\n\n/*  N       (input) INT */\n/*          The number of random numbers to be generated. N <= 128. */\n\n/*  X       (output) DOUBLE PRECISION array, dimension (N) */\n/*          The generated random numbers. */\n\n/*  Further Details */\n/*  =============== */\n\n/*  This routine uses a multiplicative congruential method with modulus */\n/*  2**48 and multiplier 33952834046453 (see G.S.Fishman, */\n/*  'Multiplicative congruential random number generators with modulus */\n/*  2**b: an exhaustive analysis for b = 32 and a partial analysis for */\n/*  b = 48', Math. Comp. 189, pp 331-344, 1990). */\n\n/*  48-bit ints are stored in 4 int array elements with 12 bits */\n/*  per element. Hence the routine is portable across machines with */\n/*  ints of 32 bits or more. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Local Arrays .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Data statements .. */\n    /* Parameter adjustments */\n    --iseed;\n    --x;\n\n    /* Function Body */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    i1 = iseed[1];\n    i2 = iseed[2];\n    i3 = iseed[3];\n    i4 = iseed[4];\n\n    i__1 = imin(*n,128);\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\nL20:\n\n/*        Multiply the seed by i-th power of the multiplier modulo 2**48 */\n\n\tit4 = i4 * mm[i__ + 383];\n\tit3 = it4 / 4096;\n\tit4 -= it3 << 12;\n\tit3 = it3 + i3 * mm[i__ + 383] + i4 * mm[i__ + 255];\n\tit2 = it3 / 4096;\n\tit3 -= it2 << 12;\n\tit2 = it2 + i2 * mm[i__ + 383] + i3 * mm[i__ + 255] + i4 * mm[i__ + \n\t\t127];\n\tit1 = it2 / 4096;\n\tit2 -= it1 << 12;\n\tit1 = it1 + i1 * mm[i__ + 383] + i2 * mm[i__ + 255] + i3 * mm[i__ + \n\t\t127] + i4 * mm[i__ - 1];\n\tit1 %= 4096;\n\n/*        Convert 48-bit int to a real number in the interval (0,1) */\n\n\tx[i__] = ((double) it1 + ((double) it2 + ((double) it3 + (\n\t\tdouble) it4 * 2.44140625e-4) * 2.44140625e-4) * \n\t\t2.44140625e-4) * 2.44140625e-4;\n\n\tif (x[i__] == 1.) {\n/*           If a real number has n bits of precision, and the first */\n/*           n bits of the 48-bit int above happen to be all 1 (which */\n/*           will occur about once every 2**n calls), then X( I ) will */\n/*           be rounded to exactly 1.0. */\n/*           Since X( I ) is not supposed to return exactly 0.0 or 1.0, */\n/*           the statistically correct thing to do in this situation is */\n/*           simply to iterate again. */\n/*           N.B. the case X( I ) = 0.0 should not be possible. */\n\t    i1 += 2;\n\t    i2 += 2;\n\t    i3 += 2;\n\t    i4 += 2;\n\t    goto L20;\n\t}\n\n/* L10: */\n    }\n\n/*     Return final value of seed */\n\n    iseed[1] = it1;\n    iseed[2] = it2;\n    iseed[3] = it3;\n    iseed[4] = it4;\n    return 0;\n\n/*     End of ODRUV */\n\n} /* odruv_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odset.c",
    "content": "/* dlaset.f -- translated by f2c (version 20061008).\n*/\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n#define imin(a,b) ( (a) < (b) ? (a) : (b) )\n\n/* Subroutine */ int odset(char *uplo, int *m, int *n, double *alpha, \ndouble *beta, double *a, int *lda)\n{\n    /* System generated locals */\n    int a_dim1, a_offset, i__1, i__2, i__3;\n\n    /* Local variables */\n    int i__, j;\n    extern int olsame(char *, char *);\n\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODSET initializes an m-by-n matrix A to BETA on the diagonal and */\n/*  ALPHA on the offdiagonals. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  UPLO    (input) CHARACTER*1 */\n/*          Specifies the part of the matrix A to be set. */\n/*          = 'U':      Upper triangular part is set; the strictly lower */\n/*                      triangular part of A is not changed. */\n/*          = 'L':      Lower triangular part is set; the strictly upper */\n/*                      triangular part of A is not changed. */\n/*          Otherwise:  All of the matrix A is set. */\n\n/*  M       (input) INT */\n/*          The number of rows of the matrix A.  M >= 0. */\n\n/*  N       (input) INT */\n/*          The number of columns of the matrix A.  N >= 0. */\n\n/*  ALPHA   (input) DOUBLE PRECISION */\n/*          The constant to which the offdiagonal elements are to be set. */\n\n/*  BETA    (input) DOUBLE PRECISION */\n/*          The constant to which the diagonal elements are to be set. */\n\n/*  A       (input/output) DOUBLE PRECISION array, dimension (LDA,N) */\n/*          On exit, the leading m-by-n submatrix of A is set as follows: */\n\n/*          if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n, */\n/*          if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n, */\n/*          otherwise,     A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j, */\n\n/*          and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n). */\n\n/*  LDA     (input) INT */\n/*          The leading dimension of the array A.  LDA >= max(1,M). */\n\n/* ===================================================================== */\n\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    a_dim1 = *lda;\n    a_offset = 1 + a_dim1;\n    a -= a_offset;\n\n    /* Function Body */\n    if (olsame(uplo, \"U\")) {\n\n/*        Set the strictly upper triangular or trapezoidal part of the */\n/*        array to ALPHA. */\n\n\ti__1 = *n;\n\tfor (j = 2; j <= i__1; ++j) {\n/* Computing MIN */\n\t    i__3 = j - 1;\n\t    i__2 = imin(i__3,*m);\n\t    for (i__ = 1; i__ <= i__2; ++i__) {\n\t\ta[i__ + j * a_dim1] = *alpha;\n/* L10: */\n\t    }\n/* L20: */\n\t}\n\n    } else if (olsame(uplo, \"L\")) {\n\n/*        Set the strictly lower triangular or trapezoidal part of the */\n/*        array to ALPHA. */\n\n\ti__1 = imin(*m,*n);\n\tfor (j = 1; j <= i__1; ++j) {\n\t    i__2 = *m;\n\t    for (i__ = j + 1; i__ <= i__2; ++i__) {\n\t\ta[i__ + j * a_dim1] = *alpha;\n/* L30: */\n\t    }\n/* L40: */\n\t}\n\n    } else {\n\n/*        Set the leading m-by-n submatrix to ALPHA. */\n\n\ti__1 = *n;\n\tfor (j = 1; j <= i__1; ++j) {\n\t    i__2 = *m;\n\t    for (i__ = 1; i__ <= i__2; ++i__) {\n\t\ta[i__ + j * a_dim1] = *alpha;\n/* L50: */\n\t    }\n/* L60: */\n\t}\n    }\n\n/*     Set the first imin(M,N) diagonal elements to BETA. */\n\n    i__1 = imin(*m,*n);\n    for (i__ = 1; i__ <= i__1; ++i__) {\n\ta[i__ + i__ * a_dim1] = *beta;\n/* L70: */\n    }\n\n    return 0;\n\n/*     End of ODSET */\n\n} /* odset_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odsnan.c",
    "content": "/* dlaisnan.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\nint odsnan(double *din1, double *din2)\n{\n    /* System generated locals */\n    int ret_val;\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  This routine is not for general use.  It exists solely to avoid */\n/*  over-optimization in DISNAN. */\n\n/*  ODSNAN checks for NaNs by comparing its two arguments for */\n/*  inequality.  NaN is the only floating-point value where NaN != NaN */\n/*  returns .TRUE.  To check for NaNs, pass the same variable as both */\n/*  arguments. */\n\n/*  A compiler must assume that the two arguments are */\n/*  not the same variable, and the test will not be optimized away. */\n/*  Interprocedural or whole-program optimization may delete this */\n/*  test.  The ISNAN functions will be replaced by the correct */\n/*  Fortran 03 intrinsic once the intrinsic is widely available. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  DIN1     (input) DOUBLE PRECISION */\n/*  DIN2     (input) DOUBLE PRECISION */\n/*          Two numbers to compare for inequality. */\n\n/*  ===================================================================== */\n\n/*  .. Executable Statements .. */\n    ret_val = *din1 != *din2;\n    return ret_val;\n} /* odsnan_ */\n\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odsq2.c",
    "content": "/* dlasq2.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Table of constant values */\nstatic int c__1 = 1;\nstatic int c__2 = 2;\nstatic int c__10 = 10;\nstatic int c__3 = 3;\nstatic int c__4 = 4;\nstatic int c__11 = 11;\n\n/* Subroutine */ \nint odsq2(int *n, double *z__, int *info)\n{\n    /* System generated locals */\n    int i__1, i__2, i__3;\n    double d__1, d__2;\n\n    /* Builtin functions */\n    // double sqrt(double);\n\n    /* Local variables */\n    double d__, e, g;\n    int k;\n    double s, t;\n    int i0, i4, n0;\n    double dn;\n    int pp;\n    double dn1, dn2, dee, eps, tau, tol;\n    int ipn4;\n    double tol2;\n    int ieee;\n    int nbig;\n    double dmin__, emin, emax;\n    int kmin, ndiv, iter;\n    double qmin, temp, qmax, zmax;\n    int splt;\n    double dmin1, dmin2;\n    int nfail;\n    double desig, trace, sigma;\n    int iinfo, ttype;\n    extern /* Subroutine */ int odsq3(int *, int *, double *, \n\t    int *, double *, double *, double *, double *, \n\t     int *, int *, int *, int *, int *, \n\t    double *, double *, double *, double *, \n\t    double *, double *, double *);\n    // extern double odmch(char *);\n    double deemin;\n    int iwhila, iwhilb;\n    double oldemn, safmin;\n    extern /* Subroutine */ int oerbla(char *, int *);\n    /* extern int oienv(int *, char *, char *, int *, int *,  */\n    /* \t    int *, int *); */\n    extern /* Subroutine */ int odsrt(char *, int *, double *, \n\t    int *);\n\n\n/*  -- LAPACK routine (version 3.2)                                    -- */\n\n/*  -- Contributed by Osni Marques of the Lawrence Berkeley National   -- */\n/*  -- Laboratory and Beresford Parlett of the Univ. of California at  -- */\n/*  -- Berkeley                                                        -- */\n/*  -- November 2008                                                   -- */\n\n/*  -- LAPACK is a software package provided by Univ. of Tennessee,    -- */\n/*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODSQ2 computes all the eigenvalues of the symmetric positive */\n/*  definite tridiagonal matrix associated with the qd array Z to high */\n/*  relative accuracy are computed to high relative accuracy, in the */\n/*  absence of denormalization, underflow and overflow. */\n\n/*  To see the relation of Z to the tridiagonal matrix, let L be a */\n/*  unit lower bidiagonal matrix with subdiagonals Z(2,4,6,,..) and */\n/*  let U be an upper bidiagonal matrix with 1's above and diagonal */\n/*  Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the */\n/*  symmetric tridiagonal to which it is similar. */\n\n/*  Note : ODSQ2 defines a int variable, IEEE, which is true */\n/*  on machines which follow ieee-754 floating-point standard in their */\n/*  handling of infinities and NaNs, and false otherwise. This variable */\n/*  is passed to ODSQ3. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N     (input) INT */\n/*        The number of rows and columns in the matrix. N >= 0. */\n\n/*  Z     (input/output) DOUBLE PRECISION array, dimension ( 4*N ) */\n/*        On entry Z holds the qd array. On exit, entries 1 to N hold */\n/*        the eigenvalues in decreasing order, Z( 2*N+1 ) holds the */\n/*        trace, and Z( 2*N+2 ) holds the sum of the eigenvalues. If */\n/*        N > 2, then Z( 2*N+3 ) holds the iteration count, Z( 2*N+4 ) */\n/*        holds NDIVS/NIN^2, and Z( 2*N+5 ) holds the percentage of */\n/*        shifts that failed. */\n\n/*  INFO  (output) INT */\n/*        = 0: successful exit */\n/*        < 0: if the i-th argument is a scalar and had an illegal */\n/*             value, then INFO = -i, if the i-th argument is an */\n/*             array and the j-entry had an illegal value, then */\n/*             INFO = -(i*100+j) */\n/*        > 0: the algorithm failed */\n/*              = 1, a split was marked by a positive value in E */\n/*              = 2, current block of Z not diagonalized after 30*N */\n/*                   iterations (in inner while loop) */\n/*              = 3, termination criterion of outer while loop not met */\n/*                   (program created more than N unreduced blocks) */\n\n/*  Further Details */\n/*  =============== */\n/*  Local Variables: I0:N0 defines a current unreduced segment of Z. */\n/*  The shifts are accumulated in SIGMA. Iteration count is in ITER. */\n/*  Ping-pong is controlled by PP (alternates between 0 and 1). */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n/*     Test the input arguments. */\n/*     (in case ODSQ2 is not called by DLASQ1) */\n\n    /* Parameter adjustments */\n    --z__;\n\n    /* Function Body */\n    *info = 0;\n    eps = DBL_EPSILON; // odmch(\"Precision\");\n    safmin = DBL_MIN; // odmch(\"Safe minimum\");\n    tol = eps * 100.;\n/* Computing 2nd power */\n    d__1 = tol;\n    tol2 = d__1 * d__1;\n\n    if (*n < 0) {\n\t*info = -1;\n\toerbla(\"ODSQ2\", &c__1);\n\treturn 0;\n    } else if (*n == 0) {\n\treturn 0;\n    } else if (*n == 1) {\n\n/*        1-by-1 case. */\n\n\tif (z__[1] < 0.) {\n\t    *info = -201;\n\t    oerbla(\"ODSQ2\", &c__2);\n\t}\n\treturn 0;\n    } else if (*n == 2) {\n\n/*        2-by-2 case. */\n\n\tif (z__[2] < 0. || z__[3] < 0.) {\n\t    *info = -2;\n\t    oerbla(\"ODSQ2\", &c__2);\n\t    return 0;\n\t} else if (z__[3] > z__[1]) {\n\t    d__ = z__[3];\n\t    z__[3] = z__[1];\n\t    z__[1] = d__;\n\t}\n\tz__[5] = z__[1] + z__[2] + z__[3];\n\tif (z__[2] > z__[3] * tol2) {\n\t    t = (z__[1] - z__[3] + z__[2]) * .5;\n\t    s = z__[3] * (z__[2] / t);\n\t    if (s <= t) {\n\t\ts = z__[3] * (z__[2] / (t * (sqrt(s / t + 1.) + 1.)));\n\t    } else {\n\t\ts = z__[3] * (z__[2] / (t + sqrt(t) * sqrt(t + s)));\n\t    }\n\t    t = z__[1] + (s + z__[2]);\n\t    z__[3] *= z__[1] / t;\n\t    z__[1] = t;\n\t}\n\tz__[2] = z__[3];\n\tz__[6] = z__[2] + z__[1];\n\treturn 0;\n    }\n\n/*     Check for negative data and compute sums of q's and e's. */\n\n    z__[*n * 2] = 0.;\n    emin = z__[2];\n    qmax = 0.;\n    zmax = 0.;\n    d__ = 0.;\n    e = 0.;\n\n    i__1 = *n - 1 << 1;\n    for (k = 1; k <= i__1; k += 2) {\n\tif (z__[k] < 0.) {\n\t    *info = -(k + 200);\n\t    oerbla(\"ODSQ2\", &c__2);\n\t    return 0;\n\t} else if (z__[k + 1] < 0.) {\n\t    *info = -(k + 201);\n\t    oerbla(\"ODSQ2\", &c__2);\n\t    return 0;\n\t}\n\td__ += z__[k];\n\te += z__[k + 1];\n/* Computing MAX */\n\td__1 = qmax, d__2 = z__[k];\n\tqmax = fmax(d__1,d__2);\n/* Computing MIN */\n\td__1 = emin, d__2 = z__[k + 1];\n\temin = fmin(d__1,d__2);\n/* Computing MAX */\n\td__1 = fmax(qmax,zmax), d__2 = z__[k + 1];\n\tzmax = fmax(d__1,d__2);\n/* L10: */\n    }\n    if (z__[(*n << 1) - 1] < 0.) {\n\t*info = -((*n << 1) + 199);\n\toerbla(\"ODSQ2\", &c__2);\n\treturn 0;\n    }\n    d__ += z__[(*n << 1) - 1];\n/* Computing MAX */\n    d__1 = qmax, d__2 = z__[(*n << 1) - 1];\n    qmax = fmax(d__1,d__2);\n    zmax = fmax(qmax,zmax);\n\n/*     Check for diagonality. */\n\n    if (e == 0.) {\n\ti__1 = *n;\n\tfor (k = 2; k <= i__1; ++k) {\n\t    z__[k] = z__[(k << 1) - 1];\n/* L20: */\n\t}\n\todsrt(\"D\", n, &z__[1], &iinfo);\n\tz__[(*n << 1) - 1] = d__;\n\treturn 0;\n    }\n\n    trace = d__ + e;\n\n/*     Check for zero data. */\n\n    if (trace == 0.) {\n\tz__[(*n << 1) - 1] = 0.;\n\treturn 0;\n    }\n\n/*     Check whether the machine is IEEE conformable. */\n    /* ieee = oienv(&c__10, \"ODSQ2\", \"N\", &c__1, &c__2, &c__3, &c__4) == 1 && oienv(&c__11, \"ODSQ2\", \"N\", &c__1, &c__2,  */\n    /* \t     &c__3, &c__4) == 1; */\n    ieee = 1;\n\n/*     Rearrange data for locality: Z=(q1,qq1,e1,ee1,q2,qq2,e2,ee2,...). */\n\n    for (k = *n << 1; k >= 2; k += -2) {\n\tz__[k * 2] = 0.;\n\tz__[(k << 1) - 1] = z__[k];\n\tz__[(k << 1) - 2] = 0.;\n\tz__[(k << 1) - 3] = z__[k - 1];\n/* L30: */\n    }\n\n    i0 = 1;\n    n0 = *n;\n\n/*     Reverse the qd-array, if warranted. */\n\n    if (z__[(i0 << 2) - 3] * 1.5 < z__[(n0 << 2) - 3]) {\n\tipn4 = i0 + n0 << 2;\n\ti__1 = i0 + n0 - 1 << 1;\n\tfor (i4 = i0 << 2; i4 <= i__1; i4 += 4) {\n\t    temp = z__[i4 - 3];\n\t    z__[i4 - 3] = z__[ipn4 - i4 - 3];\n\t    z__[ipn4 - i4 - 3] = temp;\n\t    temp = z__[i4 - 1];\n\t    z__[i4 - 1] = z__[ipn4 - i4 - 5];\n\t    z__[ipn4 - i4 - 5] = temp;\n/* L40: */\n\t}\n    }\n\n/*     Initial split checking via dqd and Li's test. */\n\n    pp = 0;\n\n    for (k = 1; k <= 2; ++k) {\n\n\td__ = z__[(n0 << 2) + pp - 3];\n\ti__1 = (i0 << 2) + pp;\n\tfor (i4 = (n0 - 1 << 2) + pp; i4 >= i__1; i4 += -4) {\n\t    if (z__[i4 - 1] <= tol2 * d__) {\n\t\tz__[i4 - 1] = -0.;\n\t\td__ = z__[i4 - 3];\n\t    } else {\n\t\td__ = z__[i4 - 3] * (d__ / (d__ + z__[i4 - 1]));\n\t    }\n/* L50: */\n\t}\n\n/*        dqd maps Z to ZZ plus Li's test. */\n\n\temin = z__[(i0 << 2) + pp + 1];\n\td__ = z__[(i0 << 2) + pp - 3];\n\ti__1 = (n0 - 1 << 2) + pp;\n\tfor (i4 = (i0 << 2) + pp; i4 <= i__1; i4 += 4) {\n\t    z__[i4 - (pp << 1) - 2] = d__ + z__[i4 - 1];\n\t    if (z__[i4 - 1] <= tol2 * d__) {\n\t\tz__[i4 - 1] = -0.;\n\t\tz__[i4 - (pp << 1) - 2] = d__;\n\t\tz__[i4 - (pp << 1)] = 0.;\n\t\td__ = z__[i4 + 1];\n\t    } else if (safmin * z__[i4 + 1] < z__[i4 - (pp << 1) - 2] && \n\t\t    safmin * z__[i4 - (pp << 1) - 2] < z__[i4 + 1]) {\n\t\ttemp = z__[i4 + 1] / z__[i4 - (pp << 1) - 2];\n\t\tz__[i4 - (pp << 1)] = z__[i4 - 1] * temp;\n\t\td__ *= temp;\n\t    } else {\n\t\tz__[i4 - (pp << 1)] = z__[i4 + 1] * (z__[i4 - 1] / z__[i4 - (\n\t\t\tpp << 1) - 2]);\n\t\td__ = z__[i4 + 1] * (d__ / z__[i4 - (pp << 1) - 2]);\n\t    }\n/* Computing MIN */\n\t    d__1 = emin, d__2 = z__[i4 - (pp << 1)];\n\t    emin = fmin(d__1,d__2);\n/* L60: */\n\t}\n\tz__[(n0 << 2) - pp - 2] = d__;\n\n/*        Now find qmax. */\n\n\tqmax = z__[(i0 << 2) - pp - 2];\n\ti__1 = (n0 << 2) - pp - 2;\n\tfor (i4 = (i0 << 2) - pp + 2; i4 <= i__1; i4 += 4) {\n/* Computing MAX */\n\t    d__1 = qmax, d__2 = z__[i4];\n\t    qmax = fmax(d__1,d__2);\n/* L70: */\n\t}\n\n/*        Prepare for the next iteration on K. */\n\n\tpp = 1 - pp;\n/* L80: */\n    }\n\n/*     Initialise variables to pass to ODSQ3. */\n\n    ttype = 0;\n    dmin1 = 0.;\n    dmin2 = 0.;\n    dn = 0.;\n    dn1 = 0.;\n    dn2 = 0.;\n    g = 0.;\n    tau = 0.;\n\n    iter = 2;\n    nfail = 0;\n    ndiv = n0 - i0 << 1;\n\n    i__1 = *n + 1;\n    for (iwhila = 1; iwhila <= i__1; ++iwhila) {\n\tif (n0 < 1) {\n\t    goto L170;\n\t}\n\n/*        While array unfinished do */\n\n/*        E(N0) holds the value of SIGMA when submatrix in I0:N0 */\n/*        splits from the rest of the array, but is negated. */\n\n\tdesig = 0.;\n\tif (n0 == *n) {\n\t    sigma = 0.;\n\t} else {\n\t    sigma = -z__[(n0 << 2) - 1];\n\t}\n\tif (sigma < 0.) {\n\t    *info = 1;\n\t    return 0;\n\t}\n\n/*        Find last unreduced submatrix's top index I0, find QMAX and */\n/*        EMIN. Find Gershgorin-type bound if Q's much greater than E's. */\n\n\temax = 0.;\n\tif (n0 > i0) {\n\t    emin = (d__1 = z__[(n0 << 2) - 5], fabs(d__1));\n\t} else {\n\t    emin = 0.;\n\t}\n\tqmin = z__[(n0 << 2) - 3];\n\tqmax = qmin;\n\tfor (i4 = n0 << 2; i4 >= 8; i4 += -4) {\n\t    if (z__[i4 - 5] <= 0.) {\n\t\tgoto L100;\n\t    }\n\t    if (qmin >= emax * 4.) {\n/* Computing MIN */\n\t\td__1 = qmin, d__2 = z__[i4 - 3];\n\t\tqmin = fmin(d__1,d__2);\n/* Computing MAX */\n\t\td__1 = emax, d__2 = z__[i4 - 5];\n\t\temax = fmax(d__1,d__2);\n\t    }\n/* Computing MAX */\n\t    d__1 = qmax, d__2 = z__[i4 - 7] + z__[i4 - 5];\n\t    qmax = fmax(d__1,d__2);\n/* Computing MIN */\n\t    d__1 = emin, d__2 = z__[i4 - 5];\n\t    emin = fmin(d__1,d__2);\n/* L90: */\n\t}\n\ti4 = 4;\n\nL100:\n\ti0 = i4 / 4;\n\tpp = 0;\n\n\tif (n0 - i0 > 1) {\n\t    dee = z__[(i0 << 2) - 3];\n\t    deemin = dee;\n\t    kmin = i0;\n\t    i__2 = (n0 << 2) - 3;\n\t    for (i4 = (i0 << 2) + 1; i4 <= i__2; i4 += 4) {\n\t\tdee = z__[i4] * (dee / (dee + z__[i4 - 2]));\n\t\tif (dee <= deemin) {\n\t\t    deemin = dee;\n\t\t    kmin = (i4 + 3) / 4;\n\t\t}\n/* L110: */\n\t    }\n\t    if (kmin - i0 << 1 < n0 - kmin && deemin <= z__[(n0 << 2) - 3] * \n\t\t    .5) {\n\t\tipn4 = i0 + n0 << 2;\n\t\tpp = 2;\n\t\ti__2 = i0 + n0 - 1 << 1;\n\t\tfor (i4 = i0 << 2; i4 <= i__2; i4 += 4) {\n\t\t    temp = z__[i4 - 3];\n\t\t    z__[i4 - 3] = z__[ipn4 - i4 - 3];\n\t\t    z__[ipn4 - i4 - 3] = temp;\n\t\t    temp = z__[i4 - 2];\n\t\t    z__[i4 - 2] = z__[ipn4 - i4 - 2];\n\t\t    z__[ipn4 - i4 - 2] = temp;\n\t\t    temp = z__[i4 - 1];\n\t\t    z__[i4 - 1] = z__[ipn4 - i4 - 5];\n\t\t    z__[ipn4 - i4 - 5] = temp;\n\t\t    temp = z__[i4];\n\t\t    z__[i4] = z__[ipn4 - i4 - 4];\n\t\t    z__[ipn4 - i4 - 4] = temp;\n/* L120: */\n\t\t}\n\t    }\n\t}\n\n/*        Put -(initial shift) into DMIN. */\n\n/* Computing MAX */\n\td__1 = 0., d__2 = qmin - sqrt(qmin) * 2. * sqrt(emax);\n\tdmin__ = -fmax(d__1,d__2);\n\n/*        Now I0:N0 is unreduced. */\n/*        PP = 0 for ping, PP = 1 for pong. */\n/*        PP = 2 indicates that flipping was applied to the Z array and */\n/*               and that the tests for deflation upon entry in ODSQ3 */\n/*               should not be performed. */\n\n\tnbig = (n0 - i0 + 1) * 100;\n\ti__2 = nbig;\n\tfor (iwhilb = 1; iwhilb <= i__2; ++iwhilb) {\n\t    if (i0 > n0) {\n\t\tgoto L150;\n\t    }\n\n/*           While submatrix unfinished take a good dqds step. */\n\n\t    odsq3(&i0, &n0, &z__[1], &pp, &dmin__, &sigma, &desig, &qmax, &\n\t\t    nfail, &iter, &ndiv, &ieee, &ttype, &dmin1, &dmin2, &dn, &\n\t\t    dn1, &dn2, &g, &tau);\n\n\t    pp = 1 - pp;\n\n/*           When EMIN is very small check for splits. */\n\n\t    if (pp == 0 && n0 - i0 >= 3) {\n\t\tif (z__[n0 * 4] <= tol2 * qmax || z__[(n0 << 2) - 1] <= tol2 *\n\t\t\t sigma) {\n\t\t    splt = i0 - 1;\n\t\t    qmax = z__[(i0 << 2) - 3];\n\t\t    emin = z__[(i0 << 2) - 1];\n\t\t    oldemn = z__[i0 * 4];\n\t\t    i__3 = n0 - 3 << 2;\n\t\t    for (i4 = i0 << 2; i4 <= i__3; i4 += 4) {\n\t\t\tif (z__[i4] <= tol2 * z__[i4 - 3] || z__[i4 - 1] <= \n\t\t\t\ttol2 * sigma) {\n\t\t\t    z__[i4 - 1] = -sigma;\n\t\t\t    splt = i4 / 4;\n\t\t\t    qmax = 0.;\n\t\t\t    emin = z__[i4 + 3];\n\t\t\t    oldemn = z__[i4 + 4];\n\t\t\t} else {\n/* Computing MAX */\n\t\t\t    d__1 = qmax, d__2 = z__[i4 + 1];\n\t\t\t    qmax = fmax(d__1,d__2);\n/* Computing MIN */\n\t\t\t    d__1 = emin, d__2 = z__[i4 - 1];\n\t\t\t    emin = fmin(d__1,d__2);\n/* Computing MIN */\n\t\t\t    d__1 = oldemn, d__2 = z__[i4];\n\t\t\t    oldemn = fmin(d__1,d__2);\n\t\t\t}\n/* L130: */\n\t\t    }\n\t\t    z__[(n0 << 2) - 1] = emin;\n\t\t    z__[n0 * 4] = oldemn;\n\t\t    i0 = splt + 1;\n\t\t}\n\t    }\n\n/* L140: */\n\t}\n\n\t*info = 2;\n\treturn 0;\n\n/*        end IWHILB */\n\nL150:\n\n/* L160: */\n\t;\n    }\n\n    *info = 3;\n    return 0;\n\n/*     end IWHILA */\n\nL170:\n\n/*     Move q's to the front. */\n    i__1 = *n;\n    for (k = 2; k <= i__1; ++k) {\n\tz__[k] = z__[(k << 2) - 3];\n/* L180: */\n    }\n\n/*     Sort and compute sum of eigenvalues. */\n    odsrt(\"D\", n, &z__[1], &iinfo);\n\n    e = 0.;\n    for (k = *n; k >= 1; --k) {\n\te += z__[k];\n/* L190: */\n    }\n\n/*     Store trace, sum(eigenvalues) and information on performance. */\n    z__[(*n << 1) + 1] = trace;\n    z__[(*n << 1) + 2] = e;\n    z__[(*n << 1) + 3] = (double) iter;\n/* Computing 2nd power */\n    i__1 = *n;\n    z__[(*n << 1) + 4] = (double) ndiv / (double) (i__1 * i__1);\n    z__[(*n << 1) + 5] = nfail * 100. / (double) iter;\n    return 0;\n\n/*     End of ODSQ2 */\n\n} /* odsq2_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odsq3.c",
    "content": "/* dlasq3.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ int odsq3(int *i0, int *n0, double *z__, \n\tint *pp, double *dmin__, double *sigma, double *desig, \n\t double *qmax, int *nfail, int *iter, int *ndiv, \n\tint *ieee, int *ttype, double *dmin1, double *dmin2, \n\tdouble *dn, double *dn1, double *dn2, double *g, \n\tdouble *tau)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1, d__2;\n\n    /* Builtin functions */\n    // double sqrt(double);\n\n    /* Local variables */\n    double s, t;\n    int j4, nn;\n    double eps, tol;\n    int n0in, ipn4;\n    double tol2, temp;\n    extern /* Subroutine */ int odsq4(int *, int *, double *, \n\t    int *, int *, double *, double *, double *, \n\t    double *, double *, double *, double *, int *, \n\t     double *), odsq5(int *, int *, double *, \n\t    int *, double *, double *, double *, double *, \n\t     double *, double *, double *, int *), odsq6(\n\t    int *, int *, double *, int *, double *, \n\t    double *, double *, double *, double *, \n\t    double *);\n    // extern double odmch(char *);\n    extern int odnan(double *);\n\n\n/*  -- LAPACK routine (version 3.2)                                    -- */\n\n/*  -- Contributed by Osni Marques of the Lawrence Berkeley National   -- */\n/*  -- Laboratory and Beresford Parlett of the Univ. of California at  -- */\n/*  -- Berkeley                                                        -- */\n/*  -- November 2008                                                   -- */\n\n/*  -- LAPACK is a software package provided by Univ. of Tennessee,    -- */\n/*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODSQ3 checks for deflation, computes a shift (TAU) and calls dqds. */\n/*  In case of failure it changes shifts, and tries again until output */\n/*  is positive. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  I0     (input) INT */\n/*         First index. */\n\n/*  N0     (input) INT */\n/*         Last index. */\n\n/*  Z      (input) DOUBLE PRECISION array, dimension ( 4*N ) */\n/*         Z holds the qd array. */\n\n/*  PP     (input/output) INT */\n/*         PP=0 for ping, PP=1 for pong. */\n/*         PP=2 indicates that flipping was applied to the Z array */\n/*         and that the initial tests for deflation should not be */\n/*         performed. */\n\n/*  DMIN   (output) DOUBLE PRECISION */\n/*         Minimum value of d. */\n\n/*  SIGMA  (output) DOUBLE PRECISION */\n/*         Sum of shifts used in current segment. */\n\n/*  DESIG  (input/output) DOUBLE PRECISION */\n/*         Lower order part of SIGMA */\n\n/*  QMAX   (input) DOUBLE PRECISION */\n/*         Maximum value of q. */\n\n/*  NFAIL  (output) INT */\n/*         Number of times shift was too big. */\n\n/*  ITER   (output) INT */\n/*         Number of iterations. */\n\n/*  NDIV   (output) INT */\n/*         Number of divisions. */\n\n/*  IEEE   (input) INT */\n/*         Flag for IEEE or non IEEE arithmetic (passed to ODSQ5). */\n\n/*  TTYPE  (input/output) INT */\n/*         Shift type. */\n\n/*  DMIN1, DMIN2, DN, DN1, DN2, G, TAU (input/output) DOUBLE PRECISION */\n/*         These are passed as arguments in order to save their values */\n/*         between calls to ODSQ3. */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. External Function .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --z__;\n\n    /* Function Body */\n    n0in = *n0;\n    eps = DBL_EPSILON; // odmch(\"Precision\");\n    tol = eps * 100.;\n/* Computing 2nd power */\n    d__1 = tol;\n    tol2 = d__1 * d__1;\n\n/*     Check for deflation. */\n\nL10:\n\n    if (*n0 < *i0) {\n\treturn 0;\n    }\n    if (*n0 == *i0) {\n\tgoto L20;\n    }\n    nn = (*n0 << 2) + *pp;\n    if (*n0 == *i0 + 1) {\n\tgoto L40;\n    }\n\n/*     Check whether E(N0-1) is negligible, 1 eigenvalue. */\n\n    if (z__[nn - 5] > tol2 * (*sigma + z__[nn - 3]) && z__[nn - (*pp << 1) - \n\t    4] > tol2 * z__[nn - 7]) {\n\tgoto L30;\n    }\n\nL20:\n\n    z__[(*n0 << 2) - 3] = z__[(*n0 << 2) + *pp - 3] + *sigma;\n    --(*n0);\n    goto L10;\n\n/*     Check  whether E(N0-2) is negligible, 2 eigenvalues. */\n\nL30:\n\n    if (z__[nn - 9] > tol2 * *sigma && z__[nn - (*pp << 1) - 8] > tol2 * z__[\n\t    nn - 11]) {\n\tgoto L50;\n    }\n\nL40:\n\n    if (z__[nn - 3] > z__[nn - 7]) {\n\ts = z__[nn - 3];\n\tz__[nn - 3] = z__[nn - 7];\n\tz__[nn - 7] = s;\n    }\n    if (z__[nn - 5] > z__[nn - 3] * tol2) {\n\tt = (z__[nn - 7] - z__[nn - 3] + z__[nn - 5]) * .5;\n\ts = z__[nn - 3] * (z__[nn - 5] / t);\n\tif (s <= t) {\n\t    s = z__[nn - 3] * (z__[nn - 5] / (t * (sqrt(s / t + 1.) + 1.)));\n\t} else {\n\t    s = z__[nn - 3] * (z__[nn - 5] / (t + sqrt(t) * sqrt(t + s)));\n\t}\n\tt = z__[nn - 7] + (s + z__[nn - 5]);\n\tz__[nn - 3] *= z__[nn - 7] / t;\n\tz__[nn - 7] = t;\n    }\n    z__[(*n0 << 2) - 7] = z__[nn - 7] + *sigma;\n    z__[(*n0 << 2) - 3] = z__[nn - 3] + *sigma;\n    *n0 += -2;\n    goto L10;\n\nL50:\n    if (*pp == 2) {\n\t*pp = 0;\n    }\n\n/*     Reverse the qd-array, if warranted. */\n\n    if (*dmin__ <= 0. || *n0 < n0in) {\n\tif (z__[(*i0 << 2) + *pp - 3] * 1.5 < z__[(*n0 << 2) + *pp - 3]) {\n\t    ipn4 = *i0 + *n0 << 2;\n\t    i__1 = *i0 + *n0 - 1 << 1;\n\t    for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {\n\t\ttemp = z__[j4 - 3];\n\t\tz__[j4 - 3] = z__[ipn4 - j4 - 3];\n\t\tz__[ipn4 - j4 - 3] = temp;\n\t\ttemp = z__[j4 - 2];\n\t\tz__[j4 - 2] = z__[ipn4 - j4 - 2];\n\t\tz__[ipn4 - j4 - 2] = temp;\n\t\ttemp = z__[j4 - 1];\n\t\tz__[j4 - 1] = z__[ipn4 - j4 - 5];\n\t\tz__[ipn4 - j4 - 5] = temp;\n\t\ttemp = z__[j4];\n\t\tz__[j4] = z__[ipn4 - j4 - 4];\n\t\tz__[ipn4 - j4 - 4] = temp;\n/* L60: */\n\t    }\n\t    if (*n0 - *i0 <= 4) {\n\t\tz__[(*n0 << 2) + *pp - 1] = z__[(*i0 << 2) + *pp - 1];\n\t\tz__[(*n0 << 2) - *pp] = z__[(*i0 << 2) - *pp];\n\t    }\n/* Computing MIN */\n\t    d__1 = *dmin2, d__2 = z__[(*n0 << 2) + *pp - 1];\n\t    *dmin2 = fmin(d__1,d__2);\n/* Computing MIN */\n\t    d__1 = z__[(*n0 << 2) + *pp - 1], d__2 = z__[(*i0 << 2) + *pp - 1]\n\t\t    , d__1 = fmin(d__1,d__2), d__2 = z__[(*i0 << 2) + *pp + 3];\n\t    z__[(*n0 << 2) + *pp - 1] = fmin(d__1,d__2);\n/* Computing MIN */\n\t    d__1 = z__[(*n0 << 2) - *pp], d__2 = z__[(*i0 << 2) - *pp], d__1 =\n\t\t     fmin(d__1,d__2), d__2 = z__[(*i0 << 2) - *pp + 4];\n\t    z__[(*n0 << 2) - *pp] = fmin(d__1,d__2);\n/* Computing MAX */\n\t    d__1 = *qmax, d__2 = z__[(*i0 << 2) + *pp - 3], d__1 = fmax(d__1,\n\t\t    d__2), d__2 = z__[(*i0 << 2) + *pp + 1];\n\t    *qmax = fmax(d__1,d__2);\n\t    *dmin__ = -0.;\n\t}\n    }\n\n/*     Choose a shift. */\n\n    odsq4(i0, n0, &z__[1], pp, &n0in, dmin__, dmin1, dmin2, dn, dn1, dn2, \n\t    tau, ttype, g);\n\n/*     Call dqds until DMIN > 0. */\n\nL70:\n\n    odsq5(i0, n0, &z__[1], pp, tau, dmin__, dmin1, dmin2, dn, dn1, dn2, \n\t    ieee);\n\n    *ndiv += *n0 - *i0 + 2;\n    ++(*iter);\n\n/*     Check status. */\n\n    if (*dmin__ >= 0. && *dmin1 > 0.) {\n\n/*        Success. */\n\n\tgoto L90;\n\n    } else if (*dmin__ < 0. && *dmin1 > 0. && z__[(*n0 - 1 << 2) - *pp] < tol \n\t    * (*sigma + *dn1) && fabs(*dn) < tol * *sigma) {\n\n/*        Convergence hidden by negative DN. */\n\n\tz__[(*n0 - 1 << 2) - *pp + 2] = 0.;\n\t*dmin__ = 0.;\n\tgoto L90;\n    } else if (*dmin__ < 0.) {\n\n/*        TAU too big. Select new TAU and try again. */\n\n\t++(*nfail);\n\tif (*ttype < -22) {\n\n/*           Failed twice. Play it safe. */\n\n\t    *tau = 0.;\n\t} else if (*dmin1 > 0.) {\n\n/*           Late failure. Gives excellent shift. */\n\n\t    *tau = (*tau + *dmin__) * (1. - eps * 2.);\n\t    *ttype += -11;\n\t} else {\n\n/*           Early failure. Divide by 4. */\n\n\t    *tau *= .25;\n\t    *ttype += -12;\n\t}\n\tgoto L70;\n    } else if (odnan(dmin__)) {\n\n/*        NaN. */\n\n\tif (*tau == 0.) {\n\t    goto L80;\n\t} else {\n\t    *tau = 0.;\n\t    goto L70;\n\t}\n    } else {\n\n/*        Possible underflow. Play it safe. */\n\n\tgoto L80;\n    }\n\n/*     Risk of underflow. */\n\nL80:\n    odsq6(i0, n0, &z__[1], pp, dmin__, dmin1, dmin2, dn, dn1, dn2);\n    *ndiv += *n0 - *i0 + 2;\n    ++(*iter);\n    *tau = 0.;\n\nL90:\n    if (*tau < *sigma) {\n\t*desig += *tau;\n\tt = *sigma + *desig;\n\t*desig -= t - *sigma;\n    } else {\n\tt = *sigma + *tau;\n\t*desig = *sigma - (t - *tau) + *desig;\n    }\n    *sigma = t;\n\n    return 0;\n\n/*     End of ODSQ3 */\n\n} /* odsq3_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odsq4.c",
    "content": "/* dlasq4.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odsq4(int *i0, int *n0, double *z__, \n\t    int *pp, int *n0in, double *dmin__, double *dmin1, \n\t    double *dmin2, double *dn, double *dn1, double *dn2, \n\t    double *tau, int *ttype, double *g)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1, d__2;\n\n    /* Builtin functions */\n    // double sqrt(double);\n\n    /* Local variables */\n    double s, a2, b1, b2;\n    int i4, nn, np;\n    double gam, gap1, gap2;\n\n\n/*  -- LAPACK routine (version 3.2)                                    -- */\n\n/*  -- Contributed by Osni Marques of the Lawrence Berkeley National   -- */\n/*  -- Laboratory and Beresford Parlett of the Univ. of California at  -- */\n/*  -- Berkeley                                                        -- */\n/*  -- November 2008                                                   -- */\n\n/*  -- LAPACK is a software package provided by Univ. of Tennessee,    -- */\n/*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODSQ4 computes an approximation TAU to the smallest eigenvalue */\n/*  using values of d from the previous transform. */\n\n/*  I0    (input) INT */\n/*        First index. */\n\n/*  N0    (input) INT */\n/*        Last index. */\n\n/*  Z     (input) DOUBLE PRECISION array, dimension ( 4*N ) */\n/*        Z holds the qd array. */\n\n/*  PP    (input) INT */\n/*        PP=0 for ping, PP=1 for pong. */\n\n/*  NOIN  (input) INT */\n/*        The value of N0 at start of EIGTEST. */\n\n/*  DMIN  (input) DOUBLE PRECISION */\n/*        Minimum value of d. */\n\n/*  DMIN1 (input) DOUBLE PRECISION */\n/*        Minimum value of d, excluding D( N0 ). */\n\n/*  DMIN2 (input) DOUBLE PRECISION */\n/*        Minimum value of d, excluding D( N0 ) and D( N0-1 ). */\n\n/*  DN    (input) DOUBLE PRECISION */\n/*        d(N) */\n\n/*  DN1   (input) DOUBLE PRECISION */\n/*        d(N-1) */\n\n/*  DN2   (input) DOUBLE PRECISION */\n/*        d(N-2) */\n\n/*  TAU   (output) DOUBLE PRECISION */\n/*        This is the shift. */\n\n/*  TTYPE (output) INT */\n/*        Shift type. */\n\n/*  G     (input/output) REAL */\n/*        G is passed as an argument in order to save its value between */\n/*        calls to ODSQ4. */\n\n/*  Further Details */\n/*  =============== */\n/*  CNST1 = 9/16 */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n/*     A negative DMIN forces the shift to take that absolute value */\n/*     TTYPE records the type of shift. */\n\n    /* Parameter adjustments */\n    --z__;\n\n    /* Function Body */\n    if (*dmin__ <= 0.) {\n\t*tau = -(*dmin__);\n\t*ttype = -1;\n\treturn 0;\n    }\n\n    nn = (*n0 << 2) + *pp;\n    if (*n0in == *n0) {\n\n/*        No eigenvalues deflated. */\n\n\tif (*dmin__ == *dn || *dmin__ == *dn1) {\n\n\t    b1 = sqrt(z__[nn - 3]) * sqrt(z__[nn - 5]);\n\t    b2 = sqrt(z__[nn - 7]) * sqrt(z__[nn - 9]);\n\t    a2 = z__[nn - 7] + z__[nn - 5];\n\n/*           Cases 2 and 3. */\n\n\t    if (*dmin__ == *dn && *dmin1 == *dn1) {\n\t\tgap2 = *dmin2 - a2 - *dmin2 * .25;\n\t\tif (gap2 > 0. && gap2 > b2) {\n\t\t    gap1 = a2 - *dn - b2 / gap2 * b2;\n\t\t} else {\n\t\t    gap1 = a2 - *dn - (b1 + b2);\n\t\t}\n\t\tif (gap1 > 0. && gap1 > b1) {\n/* Computing MAX */\n\t\t    d__1 = *dn - b1 / gap1 * b1, d__2 = *dmin__ * .5;\n\t\t    s = fmax(d__1,d__2);\n\t\t    *ttype = -2;\n\t\t} else {\n\t\t    s = 0.;\n\t\t    if (*dn > b1) {\n\t\t\ts = *dn - b1;\n\t\t    }\n\t\t    if (a2 > b1 + b2) {\n/* Computing MIN */\n\t\t\td__1 = s, d__2 = a2 - (b1 + b2);\n\t\t\ts = fmin(d__1,d__2);\n\t\t    }\n/* Computing MAX */\n\t\t    d__1 = s, d__2 = *dmin__ * .333;\n\t\t    s = fmax(d__1,d__2);\n\t\t    *ttype = -3;\n\t\t}\n\t    } else {\n\n/*              Case 4. */\n\n\t\t*ttype = -4;\n\t\ts = *dmin__ * .25;\n\t\tif (*dmin__ == *dn) {\n\t\t    gam = *dn;\n\t\t    a2 = 0.;\n\t\t    if (z__[nn - 5] > z__[nn - 7]) {\n\t\t\treturn 0;\n\t\t    }\n\t\t    b2 = z__[nn - 5] / z__[nn - 7];\n\t\t    np = nn - 9;\n\t\t} else {\n\t\t    np = nn - (*pp << 1);\n\t\t    b2 = z__[np - 2];\n\t\t    gam = *dn1;\n\t\t    if (z__[np - 4] > z__[np - 2]) {\n\t\t\treturn 0;\n\t\t    }\n\t\t    a2 = z__[np - 4] / z__[np - 2];\n\t\t    if (z__[nn - 9] > z__[nn - 11]) {\n\t\t\treturn 0;\n\t\t    }\n\t\t    b2 = z__[nn - 9] / z__[nn - 11];\n\t\t    np = nn - 13;\n\t\t}\n\n/*              Approximate contribution to norm squared from I < NN-1. */\n\n\t\ta2 += b2;\n\t\ti__1 = (*i0 << 2) - 1 + *pp;\n\t\tfor (i4 = np; i4 >= i__1; i4 += -4) {\n\t\t    if (b2 == 0.) {\n\t\t\tgoto L20;\n\t\t    }\n\t\t    b1 = b2;\n\t\t    if (z__[i4] > z__[i4 - 2]) {\n\t\t\treturn 0;\n\t\t    }\n\t\t    b2 *= z__[i4] / z__[i4 - 2];\n\t\t    a2 += b2;\n\t\t    if (fmax(b2,b1) * 100. < a2 || .563 < a2) {\n\t\t\tgoto L20;\n\t\t    }\n/* L10: */\n\t\t}\nL20:\n\t\ta2 *= 1.05;\n\n/*              Rayleigh quotient residual bound. */\n\n\t\tif (a2 < .563) {\n\t\t    s = gam * (1. - sqrt(a2)) / (a2 + 1.);\n\t\t}\n\t    }\n\t} else if (*dmin__ == *dn2) {\n\n/*           Case 5. */\n\n\t    *ttype = -5;\n\t    s = *dmin__ * .25;\n\n/*           Compute contribution to norm squared from I > NN-2. */\n\n\t    np = nn - (*pp << 1);\n\t    b1 = z__[np - 2];\n\t    b2 = z__[np - 6];\n\t    gam = *dn2;\n\t    if (z__[np - 8] > b2 || z__[np - 4] > b1) {\n\t\treturn 0;\n\t    }\n\t    a2 = z__[np - 8] / b2 * (z__[np - 4] / b1 + 1.);\n\n/*           Approximate contribution to norm squared from I < NN-2. */\n\n\t    if (*n0 - *i0 > 2) {\n\t\tb2 = z__[nn - 13] / z__[nn - 15];\n\t\ta2 += b2;\n\t\ti__1 = (*i0 << 2) - 1 + *pp;\n\t\tfor (i4 = nn - 17; i4 >= i__1; i4 += -4) {\n\t\t    if (b2 == 0.) {\n\t\t\tgoto L40;\n\t\t    }\n\t\t    b1 = b2;\n\t\t    if (z__[i4] > z__[i4 - 2]) {\n\t\t\treturn 0;\n\t\t    }\n\t\t    b2 *= z__[i4] / z__[i4 - 2];\n\t\t    a2 += b2;\n\t\t    if (fmax(b2,b1) * 100. < a2 || .563 < a2) {\n\t\t\tgoto L40;\n\t\t    }\n/* L30: */\n\t\t}\nL40:\n\t\ta2 *= 1.05;\n\t    }\n\n\t    if (a2 < .563) {\n\t\ts = gam * (1. - sqrt(a2)) / (a2 + 1.);\n\t    }\n\t} else {\n\n/*           Case 6, no information to guide us. */\n\n\t    if (*ttype == -6) {\n\t\t*g += (1. - *g) * .333;\n\t    } else if (*ttype == -18) {\n\t\t*g = .083250000000000005;\n\t    } else {\n\t\t*g = .25;\n\t    }\n\t    s = *g * *dmin__;\n\t    *ttype = -6;\n\t}\n\n    } else if (*n0in == *n0 + 1) {\n\n/*        One eigenvalue just deflated. Use DMIN1, DN1 for DMIN and DN. */\n\n\tif (*dmin1 == *dn1 && *dmin2 == *dn2) {\n\n/*           Cases 7 and 8. */\n\n\t    *ttype = -7;\n\t    s = *dmin1 * .333;\n\t    if (z__[nn - 5] > z__[nn - 7]) {\n\t\treturn 0;\n\t    }\n\t    b1 = z__[nn - 5] / z__[nn - 7];\n\t    b2 = b1;\n\t    if (b2 == 0.) {\n\t\tgoto L60;\n\t    }\n\t    i__1 = (*i0 << 2) - 1 + *pp;\n\t    for (i4 = (*n0 << 2) - 9 + *pp; i4 >= i__1; i4 += -4) {\n\t\ta2 = b1;\n\t\tif (z__[i4] > z__[i4 - 2]) {\n\t\t    return 0;\n\t\t}\n\t\tb1 *= z__[i4] / z__[i4 - 2];\n\t\tb2 += b1;\n\t\tif (fmax(b1,a2) * 100. < b2) {\n\t\t    goto L60;\n\t\t}\n/* L50: */\n\t    }\nL60:\n\t    b2 = sqrt(b2 * 1.05);\n/* Computing 2nd power */\n\t    d__1 = b2;\n\t    a2 = *dmin1 / (d__1 * d__1 + 1.);\n\t    gap2 = *dmin2 * .5 - a2;\n\t    if (gap2 > 0. && gap2 > b2 * a2) {\n/* Computing MAX */\n\t\td__1 = s, d__2 = a2 * (1. - a2 * 1.01 * (b2 / gap2) * b2);\n\t\ts = fmax(d__1,d__2);\n\t    } else {\n/* Computing MAX */\n\t\td__1 = s, d__2 = a2 * (1. - b2 * 1.01);\n\t\ts = fmax(d__1,d__2);\n\t\t*ttype = -8;\n\t    }\n\t} else {\n\n/*           Case 9. */\n\n\t    s = *dmin1 * .25;\n\t    if (*dmin1 == *dn1) {\n\t\ts = *dmin1 * .5;\n\t    }\n\t    *ttype = -9;\n\t}\n\n    } else if (*n0in == *n0 + 2) {\n\n/*        Two eigenvalues deflated. Use DMIN2, DN2 for DMIN and DN. */\n\n/*        Cases 10 and 11. */\n\n\tif (*dmin2 == *dn2 && z__[nn - 5] * 2. < z__[nn - 7]) {\n\t    *ttype = -10;\n\t    s = *dmin2 * .333;\n\t    if (z__[nn - 5] > z__[nn - 7]) {\n\t\treturn 0;\n\t    }\n\t    b1 = z__[nn - 5] / z__[nn - 7];\n\t    b2 = b1;\n\t    if (b2 == 0.) {\n\t\tgoto L80;\n\t    }\n\t    i__1 = (*i0 << 2) - 1 + *pp;\n\t    for (i4 = (*n0 << 2) - 9 + *pp; i4 >= i__1; i4 += -4) {\n\t\tif (z__[i4] > z__[i4 - 2]) {\n\t\t    return 0;\n\t\t}\n\t\tb1 *= z__[i4] / z__[i4 - 2];\n\t\tb2 += b1;\n\t\tif (b1 * 100. < b2) {\n\t\t    goto L80;\n\t\t}\n/* L70: */\n\t    }\nL80:\n\t    b2 = sqrt(b2 * 1.05);\n/* Computing 2nd power */\n\t    d__1 = b2;\n\t    a2 = *dmin2 / (d__1 * d__1 + 1.);\n\t    gap2 = z__[nn - 7] + z__[nn - 9] - sqrt(z__[nn - 11]) * sqrt(z__[\n\t\t    nn - 9]) - a2;\n\t    if (gap2 > 0. && gap2 > b2 * a2) {\n/* Computing MAX */\n\t\td__1 = s, d__2 = a2 * (1. - a2 * 1.01 * (b2 / gap2) * b2);\n\t\ts = fmax(d__1,d__2);\n\t    } else {\n/* Computing MAX */\n\t\td__1 = s, d__2 = a2 * (1. - b2 * 1.01);\n\t\ts = fmax(d__1,d__2);\n\t    }\n\t} else {\n\t    s = *dmin2 * .25;\n\t    *ttype = -11;\n\t}\n    } else if (*n0in > *n0 + 2) {\n\n/*        Case 12, more than two eigenvalues deflated. No information. */\n\n\ts = 0.;\n\t*ttype = -12;\n    }\n\n    *tau = s;\n    return 0;\n\n/*     End of ODSQ4 */\n\n} /* odsq4_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odsq5.c",
    "content": "/* dlasq5.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odsq5(int *i0, int *n0, double *z__, \n\tint *pp, double *tau, double *dmin__, double *dmin1, \n\tdouble *dmin2, double *dn, double *dnm1, double *dnm2, \n\t int *ieee)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1, d__2;\n\n    /* Local variables */\n    double d__;\n    int j4, j4p2;\n    double emin, temp;\n\n\n/*  -- LAPACK routine (version 3.2)                                    -- */\n\n/*  -- Contributed by Osni Marques of the Lawrence Berkeley National   -- */\n/*  -- Laboratory and Beresford Parlett of the Univ. of California at  -- */\n/*  -- Berkeley                                                        -- */\n/*  -- November 2008                                                   -- */\n\n/*  -- LAPACK is a software package provided by Univ. of Tennessee,    -- */\n/*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODSQ5 computes one dqds transform in ping-pong form, one */\n/*  version for IEEE machines another for non IEEE machines. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  I0    (input) INT */\n/*        First index. */\n\n/*  N0    (input) INT */\n/*        Last index. */\n\n/*  Z     (input) DOUBLE PRECISION array, dimension ( 4*N ) */\n/*        Z holds the qd array. EMIN is stored in Z(4*N0) to avoid */\n/*        an extra argument. */\n\n/*  PP    (input) INT */\n/*        PP=0 for ping, PP=1 for pong. */\n\n/*  TAU   (input) DOUBLE PRECISION */\n/*        This is the shift. */\n\n/*  DMIN  (output) DOUBLE PRECISION */\n/*        Minimum value of d. */\n\n/*  DMIN1 (output) DOUBLE PRECISION */\n/*        Minimum value of d, excluding D( N0 ). */\n\n/*  DMIN2 (output) DOUBLE PRECISION */\n/*        Minimum value of d, excluding D( N0 ) and D( N0-1 ). */\n\n/*  DN    (output) DOUBLE PRECISION */\n/*        d(N0), the last value of d. */\n\n/*  DNM1  (output) DOUBLE PRECISION */\n/*        d(N0-1). */\n\n/*  DNM2  (output) DOUBLE PRECISION */\n/*        d(N0-2). */\n\n/*  IEEE  (input) INT */\n/*        Flag for IEEE or non IEEE arithmetic. */\n\n/*  ===================================================================== */\n\n/*     .. Parameter .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --z__;\n\n    /* Function Body */\n    if (*n0 - *i0 - 1 <= 0) {\n\treturn 0;\n    }\n\n    j4 = (*i0 << 2) + *pp - 3;\n    emin = z__[j4 + 4];\n    d__ = z__[j4] - *tau;\n    *dmin__ = d__;\n    *dmin1 = -z__[j4];\n\n    if (*ieee) {\n\n/*        Code for IEEE arithmetic. */\n\n\tif (*pp == 0) {\n\t    i__1 = *n0 - 3 << 2;\n\t    for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {\n\t\tz__[j4 - 2] = d__ + z__[j4 - 1];\n\t\ttemp = z__[j4 + 1] / z__[j4 - 2];\n\t\td__ = d__ * temp - *tau;\n\t\t*dmin__ = fmin(*dmin__,d__);\n\t\tz__[j4] = z__[j4 - 1] * temp;\n/* Computing MIN */\n\t\td__1 = z__[j4];\n\t\temin = fmin(d__1,emin);\n/* L10: */\n\t    }\n\t} else {\n\t    i__1 = *n0 - 3 << 2;\n\t    for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {\n\t\tz__[j4 - 3] = d__ + z__[j4];\n\t\ttemp = z__[j4 + 2] / z__[j4 - 3];\n\t\td__ = d__ * temp - *tau;\n\t\t*dmin__ = fmin(*dmin__,d__);\n\t\tz__[j4 - 1] = z__[j4] * temp;\n/* Computing MIN */\n\t\td__1 = z__[j4 - 1];\n\t\temin = fmin(d__1,emin);\n/* L20: */\n\t    }\n\t}\n\n/*        Unroll last two steps. */\n\n\t*dnm2 = d__;\n\t*dmin2 = *dmin__;\n\tj4 = (*n0 - 2 << 2) - *pp;\n\tj4p2 = j4 + (*pp << 1) - 1;\n\tz__[j4 - 2] = *dnm2 + z__[j4p2];\n\tz__[j4] = z__[j4p2 + 2] * (z__[j4p2] / z__[j4 - 2]);\n\t*dnm1 = z__[j4p2 + 2] * (*dnm2 / z__[j4 - 2]) - *tau;\n\t*dmin__ = fmin(*dmin__,*dnm1);\n\n\t*dmin1 = *dmin__;\n\tj4 += 4;\n\tj4p2 = j4 + (*pp << 1) - 1;\n\tz__[j4 - 2] = *dnm1 + z__[j4p2];\n\tz__[j4] = z__[j4p2 + 2] * (z__[j4p2] / z__[j4 - 2]);\n\t*dn = z__[j4p2 + 2] * (*dnm1 / z__[j4 - 2]) - *tau;\n\t*dmin__ = fmin(*dmin__,*dn);\n\n    } else {\n\n/*        Code for non IEEE arithmetic. */\n\n\tif (*pp == 0) {\n\t    i__1 = *n0 - 3 << 2;\n\t    for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {\n\t\tz__[j4 - 2] = d__ + z__[j4 - 1];\n\t\tif (d__ < 0.) {\n\t\t    return 0;\n\t\t} else {\n\t\t    z__[j4] = z__[j4 + 1] * (z__[j4 - 1] / z__[j4 - 2]);\n\t\t    d__ = z__[j4 + 1] * (d__ / z__[j4 - 2]) - *tau;\n\t\t}\n\t\t*dmin__ = fmin(*dmin__,d__);\n/* Computing MIN */\n\t\td__1 = emin, d__2 = z__[j4];\n\t\temin = fmin(d__1,d__2);\n/* L30: */\n\t    }\n\t} else {\n\t    i__1 = *n0 - 3 << 2;\n\t    for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {\n\t\tz__[j4 - 3] = d__ + z__[j4];\n\t\tif (d__ < 0.) {\n\t\t    return 0;\n\t\t} else {\n\t\t    z__[j4 - 1] = z__[j4 + 2] * (z__[j4] / z__[j4 - 3]);\n\t\t    d__ = z__[j4 + 2] * (d__ / z__[j4 - 3]) - *tau;\n\t\t}\n\t\t*dmin__ = fmin(*dmin__,d__);\n/* Computing MIN */\n\t\td__1 = emin, d__2 = z__[j4 - 1];\n\t\temin = fmin(d__1,d__2);\n/* L40: */\n\t    }\n\t}\n\n/*        Unroll last two steps. */\n\n\t*dnm2 = d__;\n\t*dmin2 = *dmin__;\n\tj4 = (*n0 - 2 << 2) - *pp;\n\tj4p2 = j4 + (*pp << 1) - 1;\n\tz__[j4 - 2] = *dnm2 + z__[j4p2];\n\tif (*dnm2 < 0.) {\n\t    return 0;\n\t} else {\n\t    z__[j4] = z__[j4p2 + 2] * (z__[j4p2] / z__[j4 - 2]);\n\t    *dnm1 = z__[j4p2 + 2] * (*dnm2 / z__[j4 - 2]) - *tau;\n\t}\n\t*dmin__ = fmin(*dmin__,*dnm1);\n\n\t*dmin1 = *dmin__;\n\tj4 += 4;\n\tj4p2 = j4 + (*pp << 1) - 1;\n\tz__[j4 - 2] = *dnm1 + z__[j4p2];\n\tif (*dnm1 < 0.) {\n\t    return 0;\n\t} else {\n\t    z__[j4] = z__[j4p2 + 2] * (z__[j4p2] / z__[j4 - 2]);\n\t    *dn = z__[j4p2 + 2] * (*dnm1 / z__[j4 - 2]) - *tau;\n\t}\n\t*dmin__ = fmin(*dmin__,*dn);\n\n    }\n\n    z__[j4 + 2] = *dn;\n    z__[(*n0 << 2) - *pp] = emin;\n    return 0;\n\n/*     End of ODSQ5 */\n\n} /* odsq5_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odsq6.c",
    "content": "/* dlasq6.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odsq6(int *i0, int *n0, double *z__, \n\tint *pp, double *dmin__, double *dmin1, double *dmin2, \n\t double *dn, double *dnm1, double *dnm2)\n{\n    /* System generated locals */\n    int i__1;\n    double d__1, d__2;\n\n    /* Local variables */\n    double d__;\n    int j4, j4p2;\n    double emin, temp;\n    //    extern double odmch(char *);\n    double safmin;\n\n\n/*  -- LAPACK routine (version 3.2)                                    -- */\n\n/*  -- Contributed by Osni Marques of the Lawrence Berkeley National   -- */\n/*  -- Laboratory and Beresford Parlett of the Univ. of California at  -- */\n/*  -- Berkeley                                                        -- */\n/*  -- November 2008                                                   -- */\n\n/*  -- LAPACK is a software package provided by Univ. of Tennessee,    -- */\n/*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODSQ6 computes one dqd (shift equal to zero) transform in */\n/*  ping-pong form, with protection against underflow and overflow. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  I0    (input) INT */\n/*        First index. */\n\n/*  N0    (input) INT */\n/*        Last index. */\n\n/*  Z     (input) DOUBLE PRECISION array, dimension ( 4*N ) */\n/*        Z holds the qd array. EMIN is stored in Z(4*N0) to avoid */\n/*        an extra argument. */\n\n/*  PP    (input) INT */\n/*        PP=0 for ping, PP=1 for pong. */\n\n/*  DMIN  (output) DOUBLE PRECISION */\n/*        Minimum value of d. */\n\n/*  DMIN1 (output) DOUBLE PRECISION */\n/*        Minimum value of d, excluding D( N0 ). */\n\n/*  DMIN2 (output) DOUBLE PRECISION */\n/*        Minimum value of d, excluding D( N0 ) and D( N0-1 ). */\n\n/*  DN    (output) DOUBLE PRECISION */\n/*        d(N0), the last value of d. */\n\n/*  DNM1  (output) DOUBLE PRECISION */\n/*        d(N0-1). */\n\n/*  DNM2  (output) DOUBLE PRECISION */\n/*        d(N0-2). */\n\n/*  ===================================================================== */\n\n/*     .. Parameter .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. External Function .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --z__;\n\n    /* Function Body */\n    if (*n0 - *i0 - 1 <= 0) {\n\treturn 0;\n    }\n\n    safmin = DBL_MIN; // odmch(\"Safe minimum\");\n    j4 = (*i0 << 2) + *pp - 3;\n    emin = z__[j4 + 4];\n    d__ = z__[j4];\n    *dmin__ = d__;\n\n    if (*pp == 0) {\n\ti__1 = (*n0-3) << 2;\n\tfor (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {\n\t    z__[j4 - 2] = d__ + z__[j4 - 1];\n\t    if (z__[j4 - 2] == 0.) {\n\t\tz__[j4] = 0.;\n\t\td__ = z__[j4 + 1];\n\t\t*dmin__ = d__;\n\t\temin = 0.;\n\t    } else if (safmin * z__[j4 + 1] < z__[j4 - 2] && safmin * z__[j4 \n\t\t    - 2] < z__[j4 + 1]) {\n\t\ttemp = z__[j4 + 1] / z__[j4 - 2];\n\t\tz__[j4] = z__[j4 - 1] * temp;\n\t\td__ *= temp;\n\t    } else {\n\t\tz__[j4] = z__[j4 + 1] * (z__[j4 - 1] / z__[j4 - 2]);\n\t\td__ = z__[j4 + 1] * (d__ / z__[j4 - 2]);\n\t    }\n\t    *dmin__ = fmin(*dmin__,d__);\n/* Computing MIN */\n\t    d__1 = emin, d__2 = z__[j4];\n\t    emin = fmin(d__1,d__2);\n/* L10: */\n\t}\n    } else {\n\ti__1 = (*n0-3) << 2;\n\tfor (j4 = *i0 << 2; j4 <= i__1; j4 += 4) {\n\t    z__[j4 - 3] = d__ + z__[j4];\n\t    if (z__[j4 - 3] == 0.) {\n\t\tz__[j4 - 1] = 0.;\n\t\td__ = z__[j4 + 2];\n\t\t*dmin__ = d__;\n\t\temin = 0.;\n\t    } else if (safmin * z__[j4 + 2] < z__[j4 - 3] && safmin * z__[j4 \n\t\t    - 3] < z__[j4 + 2]) {\n\t\ttemp = z__[j4 + 2] / z__[j4 - 3];\n\t\tz__[j4 - 1] = z__[j4] * temp;\n\t\td__ *= temp;\n\t    } else {\n\t\tz__[j4 - 1] = z__[j4 + 2] * (z__[j4] / z__[j4 - 3]);\n\t\td__ = z__[j4 + 2] * (d__ / z__[j4 - 3]);\n\t    }\n\t    *dmin__ = fmin(*dmin__,d__);\n/* Computing MIN */\n\t    d__1 = emin, d__2 = z__[j4 - 1];\n\t    emin = fmin(d__1,d__2);\n/* L20: */\n\t}\n    }\n\n/*     Unroll last two steps. */\n\n    *dnm2 = d__;\n    *dmin2 = *dmin__;\n    j4 = ((*n0-2) << 2) - *pp;\n    j4p2 = j4 + (*pp << 1) - 1;\n    z__[j4 - 2] = *dnm2 + z__[j4p2];\n    if (z__[j4 - 2] == 0.) {\n\tz__[j4] = 0.;\n\t*dnm1 = z__[j4p2 + 2];\n\t*dmin__ = *dnm1;\n\temin = 0.;\n    } else if (safmin * z__[j4p2 + 2] < z__[j4 - 2] && safmin * z__[j4 - 2] < \n\t    z__[j4p2 + 2]) {\n\ttemp = z__[j4p2 + 2] / z__[j4 - 2];\n\tz__[j4] = z__[j4p2] * temp;\n\t*dnm1 = *dnm2 * temp;\n    } else {\n\tz__[j4] = z__[j4p2 + 2] * (z__[j4p2] / z__[j4 - 2]);\n\t*dnm1 = z__[j4p2 + 2] * (*dnm2 / z__[j4 - 2]);\n    }\n    *dmin__ = fmin(*dmin__,*dnm1);\n\n    *dmin1 = *dmin__;\n    j4 += 4;\n    j4p2 = j4 + (*pp << 1) - 1;\n    z__[j4 - 2] = *dnm1 + z__[j4p2];\n    if (z__[j4 - 2] == 0.) {\n\tz__[j4] = 0.;\n\t*dn = z__[j4p2 + 2];\n\t*dmin__ = *dn;\n\temin = 0.;\n    } else if (safmin * z__[j4p2 + 2] < z__[j4 - 2] && safmin * z__[j4 - 2] < \n\t    z__[j4p2 + 2]) {\n\ttemp = z__[j4p2 + 2] / z__[j4 - 2];\n\tz__[j4] = z__[j4p2] * temp;\n\t*dn = *dnm1 * temp;\n    } else {\n\tz__[j4] = z__[j4p2 + 2] * (z__[j4p2] / z__[j4 - 2]);\n\t*dn = z__[j4p2 + 2] * (*dnm1 / z__[j4 - 2]);\n    }\n    *dmin__ = fmin(*dmin__,*dn);\n\n    z__[j4 + 2] = *dn;\n    z__[(*n0 << 2) - *pp] = emin;\n    return 0;\n\n/*     End of ODSQ6 */\n\n} /* odsq6_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odsrt.c",
    "content": "/* dlasrt.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odsrt(char *id, int *n, double *d__, int *info)\n{\n    /* System generated locals */\n    int i__1, i__2;\n\n    /* Local variables */\n    int i__, j;\n    double d1, d2, d3;\n    int dir;\n    double tmp;\n    int endd;\n    extern int olsame(char *, char *);\n    int stack[64]\t/* was [2][32] */;\n    double dmnmx;\n    int start;\n    extern /* Subroutine */ int oerbla(char *, int *);\n    int stkpnt;\n\n\n/*  -- LAPACK routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  Sort the numbers in D in increasing order (if ID = 'I') or */\n/*  in decreasing order (if ID = 'D' ). */\n\n/*  Use Quick Sort, reverting to Insertion sort on arrays of */\n/*  size <= 20. Dimension of STACK limits N to about 2**32. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  ID      (input) CHARACTER*1 */\n/*          = 'I': sort D in increasing order; */\n/*          = 'D': sort D in decreasing order. */\n\n/*  N       (input) INT */\n/*          The length of the array D. */\n\n/*  D       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the array to be sorted. */\n/*          On exit, D has been sorted into increasing order */\n/*          (D(1) <= ... <= D(N) ) or into decreasing order */\n/*          (D(1) >= ... >= D(N) ), depending on ID. */\n\n/*  INFO    (output) INT */\n/*          = 0:  successful exit */\n/*          < 0:  if INFO = -i, the i-th argument had an illegal value */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Local Arrays .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n/*     Test the input paramters. */\n\n    /* Parameter adjustments */\n    --d__;\n\n    /* Function Body */\n    *info = 0;\n    dir = -1;\n    if (olsame(id, \"D\")) {\n\tdir = 0;\n    } else if (olsame(id, \"I\")) {\n\tdir = 1;\n    }\n    if (dir == -1) {\n\t*info = -1;\n    } else if (*n < 0) {\n\t*info = -2;\n    }\n    if (*info != 0) {\n\ti__1 = -(*info);\n\toerbla(\"ODSRT\", &i__1);\n\treturn 0;\n    }\n\n/*     Quick return if possible */\n\n    if (*n <= 1) {\n\treturn 0;\n    }\n\n    stkpnt = 1;\n    stack[0] = 1;\n    stack[1] = *n;\nL10:\n    start = stack[(stkpnt << 1) - 2];\n    endd = stack[(stkpnt << 1) - 1];\n    --stkpnt;\n    if (endd - start <= 20 && endd - start > 0) {\n\n/*        Do Insertion sort on D( START:ENDD ) */\n\n\tif (dir == 0) {\n\n/*           Sort into decreasing order */\n\n\t    i__1 = endd;\n\t    for (i__ = start + 1; i__ <= i__1; ++i__) {\n\t\ti__2 = start + 1;\n\t\tfor (j = i__; j >= i__2; --j) {\n\t\t    if (d__[j] > d__[j - 1]) {\n\t\t\tdmnmx = d__[j];\n\t\t\td__[j] = d__[j - 1];\n\t\t\td__[j - 1] = dmnmx;\n\t\t    } else {\n\t\t\tgoto L30;\n\t\t    }\n/* L20: */\n\t\t}\nL30:\n\t\t;\n\t    }\n\n\t} else {\n\n/*           Sort into increasing order */\n\n\t    i__1 = endd;\n\t    for (i__ = start + 1; i__ <= i__1; ++i__) {\n\t\ti__2 = start + 1;\n\t\tfor (j = i__; j >= i__2; --j) {\n\t\t    if (d__[j] < d__[j - 1]) {\n\t\t\tdmnmx = d__[j];\n\t\t\td__[j] = d__[j - 1];\n\t\t\td__[j - 1] = dmnmx;\n\t\t    } else {\n\t\t\tgoto L50;\n\t\t    }\n/* L40: */\n\t\t}\nL50:\n\t\t;\n\t    }\n\n\t}\n\n    } else if (endd - start > 20) {\n\n/*        Partition D( START:ENDD ) and stack parts, largest one first */\n\n/*        Choose partition entry as median of 3 */\n\n\td1 = d__[start];\n\td2 = d__[endd];\n\ti__ = (start + endd) / 2;\n\td3 = d__[i__];\n\tif (d1 < d2) {\n\t    if (d3 < d1) {\n\t\tdmnmx = d1;\n\t    } else if (d3 < d2) {\n\t\tdmnmx = d3;\n\t    } else {\n\t\tdmnmx = d2;\n\t    }\n\t} else {\n\t    if (d3 < d2) {\n\t\tdmnmx = d2;\n\t    } else if (d3 < d1) {\n\t\tdmnmx = d3;\n\t    } else {\n\t\tdmnmx = d1;\n\t    }\n\t}\n\n\tif (dir == 0) {\n\n/*           Sort into decreasing order */\n\n\t    i__ = start - 1;\n\t    j = endd + 1;\nL60:\nL70:\n\t    --j;\n\t    if (d__[j] < dmnmx) {\n\t\tgoto L70;\n\t    }\nL80:\n\t    ++i__;\n\t    if (d__[i__] > dmnmx) {\n\t\tgoto L80;\n\t    }\n\t    if (i__ < j) {\n\t\ttmp = d__[i__];\n\t\td__[i__] = d__[j];\n\t\td__[j] = tmp;\n\t\tgoto L60;\n\t    }\n\t    if (j - start > endd - j - 1) {\n\t\t++stkpnt;\n\t\tstack[(stkpnt << 1) - 2] = start;\n\t\tstack[(stkpnt << 1) - 1] = j;\n\t\t++stkpnt;\n\t\tstack[(stkpnt << 1) - 2] = j + 1;\n\t\tstack[(stkpnt << 1) - 1] = endd;\n\t    } else {\n\t\t++stkpnt;\n\t\tstack[(stkpnt << 1) - 2] = j + 1;\n\t\tstack[(stkpnt << 1) - 1] = endd;\n\t\t++stkpnt;\n\t\tstack[(stkpnt << 1) - 2] = start;\n\t\tstack[(stkpnt << 1) - 1] = j;\n\t    }\n\t} else {\n\n/*           Sort into increasing order */\n\n\t    i__ = start - 1;\n\t    j = endd + 1;\nL90:\nL100:\n\t    --j;\n\t    if (d__[j] > dmnmx) {\n\t\tgoto L100;\n\t    }\nL110:\n\t    ++i__;\n\t    if (d__[i__] < dmnmx) {\n\t\tgoto L110;\n\t    }\n\t    if (i__ < j) {\n\t\ttmp = d__[i__];\n\t\td__[i__] = d__[j];\n\t\td__[j] = tmp;\n\t\tgoto L90;\n\t    }\n\t    if (j - start > endd - j - 1) {\n\t\t++stkpnt;\n\t\tstack[(stkpnt << 1) - 2] = start;\n\t\tstack[(stkpnt << 1) - 1] = j;\n\t\t++stkpnt;\n\t\tstack[(stkpnt << 1) - 2] = j + 1;\n\t\tstack[(stkpnt << 1) - 1] = endd;\n\t    } else {\n\t\t++stkpnt;\n\t\tstack[(stkpnt << 1) - 2] = j + 1;\n\t\tstack[(stkpnt << 1) - 1] = endd;\n\t\t++stkpnt;\n\t\tstack[(stkpnt << 1) - 2] = start;\n\t\tstack[(stkpnt << 1) - 1] = j;\n\t    }\n\t}\n    }\n    if (stkpnt > 0) {\n\tgoto L10;\n    }\n    return 0;\n\n/*     End of ODSRT */\n\n} /* odsrt_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odssq.c",
    "content": "/* dlassq.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Subroutine */ \nint odssq(int *n, double *x, int *incx, double *scale, double *sumsq)\n{\n    /* System generated locals */\n    int i__1, i__2;\n    double d__1;\n\n    /* Local variables */\n    int ix;\n    double absxi;\n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODSSQ  returns the values  scl  and  smsq  such that */\n\n/*     ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq, */\n\n/*  where  x( i ) = X( 1 + ( i - 1 )*INCX ). The value of  sumsq  is */\n/*  assumed to be non-negative and  scl  returns the value */\n\n/*     scl = max( scale, abs( x( i ) ) ). */\n\n/*  scale and sumsq must be supplied in SCALE and SUMSQ and */\n/*  scl and smsq are overwritten on SCALE and SUMSQ respectively. */\n\n/*  The routine makes only one pass through the vector x. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  N       (input) INT */\n/*          The number of elements to be used from the vector X. */\n\n/*  X       (input) DOUBLE PRECISION array, dimension (N) */\n/*          The vector for which a scaled sum of squares is computed. */\n/*             x( i )  = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n. */\n\n/*  INCX    (input) INT */\n/*          The increment between successive values of the vector X. */\n/*          INCX > 0. */\n\n/*  SCALE   (input/output) DOUBLE PRECISION */\n/*          On entry, the value  scale  in the equation above. */\n/*          On exit, SCALE is overwritten with  scl , the scaling factor */\n/*          for the sum of squares. */\n\n/*  SUMSQ   (input/output) DOUBLE PRECISION */\n/*          On entry, the value  sumsq  in the equation above. */\n/*          On exit, SUMSQ is overwritten with  smsq , the basic sum of */\n/*          squares from which  scl  has been factored out. */\n\n/* ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    /* Parameter adjustments */\n    --x;\n\n    /* Function Body */\n    if (*n > 0) {\n\ti__1 = (*n - 1) * *incx + 1;\n\ti__2 = *incx;\n\tfor (ix = 1; i__2 < 0 ? ix >= i__1 : ix <= i__1; ix += i__2) {\n\t    if (x[ix] != 0.) {\n\t\tabsxi = (d__1 = x[ix], fabs(d__1));\n\t\tif (*scale < absxi) {\n/* Computing 2nd power */\n\t\t    d__1 = *scale / absxi;\n\t\t    *sumsq = *sumsq * (d__1 * d__1) + 1;\n\t\t    *scale = absxi;\n\t\t} else {\n/* Computing 2nd power */\n\t\t    d__1 = absxi / *scale;\n\t\t    *sumsq += d__1 * d__1;\n\t\t}\n\t    }\n/* L10: */\n\t}\n    }\n    return 0;\n\n/*     End of ODSSQ */\n\n} /* odssq_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/odstmr.c",
    "content": "/* dstemr.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Table of constant values */\nstatic int c__1 = 1;\nstatic double c_b18 = .001;\n#define TRUE_ (1)\n#define FALSE_ (0)\n#define iabs(a) ( (a) > (0) ? (a) : (-a) )\n\n\n/* Subroutine */ \nint odstmr(char *jobz, char *range, int *n, double *d__, \n\tdouble *e, double *vl, double *vu, int *il, \n\tint *iu, int *m, double *w, double *z__, int *ldz, \n\t int *nzc, int *isuppz, int *tryrac, double *work, \n\tint *lwork, int *iwork, int *liwork, int *info)\n{\n    /* System generated locals */\n    int z_dim1, z_offset, i__1, i__2;\n    double d__1, d__2;\n\n    /* Builtin functions */\n    // double sqrt(double);\n\n    /* Local variables */\n    int i__, j;\n    double r1, r2;\n    int jj;\n    double cs;\n    int in;\n    double sn, wl, wu;\n    int iil, iiu;\n    double eps, tmp;\n    int indd, iend, jblk, wend;\n    double rmin, rmax;\n    int itmp;\n    double tnrm;\n    extern /* Subroutine */ int ode2(double *, double *, double \n\t    *, double *, double *);\n    int inde2, itmp2;\n    double rtol1, rtol2;\n    extern /* Subroutine */ int odscal(int *, double *, double *, \n\t    int *);\n    double scale;\n    int indgp;\n    extern int olsame(char *, char *);\n    int iinfo, iindw, ilast;\n    extern /* Subroutine */ int odcpy(int *, double *, int *, \n\t    double *, int *), odswap(int *, double *, int \n\t    *, double *, int *);\n    int lwmin;\n    int wantz;\n    extern /* Subroutine */ int odev2(double *, double *, \n\t    double *, double *, double *, double *, \n\t    double *);\n    // extern double odmch(char *);\n    int alleig;\n    int ibegin;\n    int indeig;\n    int iindbl;\n    int valeig;\n    extern /* Subroutine */ int odrrc(char *, int *, double *, \n\t    double *, double *, double *, double *, int *, \n\t     int *, int *, int *), odrre(char *, \n\t    int *, double *, double *, int *, int *, \n\t    double *, double *, double *, double *, \n\t    double *, double *, int *, int *, int *, \n\t    double *, double *, double *, int *, int *, \n\t    double *, double *, double *, int *, int *);\n    int wbegin;\n    double safmin;\n    extern /* Subroutine */ int odrrj(int *, double *, double *, \n\t     int *, int *, double *, int *, double *, \n\t    double *, double *, int *, double *, double *, \n\t     int *), oerbla(char *, int *);\n    double bignum;\n    int inderr, iindwk, indgrs, offset;\n    extern double odnst(char *, int *, double *, double *);\n    extern /* Subroutine */ int odrrr(int *, double *, double *, \n\t     int *), odrrv(int *, double *, double *, \n\t    double *, double *, double *, int *, int *, \n\t    int *, int *, double *, double *, double *, \n\t    double *, double *, double *, int *, int *, \n\t    double *, double *, int *, int *, double *, \n\t    int *, int *), odsrt(char *, int *, double *, \n\t    int *);\n    double thresh;\n    int iinspl, ifirst, indwrk, liwmin, nzcmin;\n    double pivmin;\n    int nsplit;\n    double smlnum;\n    int lquery, zquery;\n\n\n/*  -- LAPACK computational routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n/*     .. Array Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  ODSTMR computes selected eigenvalues and, optionally, eigenvectors */\n/*  of a real symmetric tridiagonal matrix T. Any such unreduced matrix has */\n/*  a well defined set of pairwise different real eigenvalues, the corresponding */\n/*  real eigenvectors are pairwise orthogonal. */\n\n/*  The spectrum may be computed either completely or partially by specifying */\n/*  either an interval (VL,VU] or a range of indices IL:IU for the desired */\n/*  eigenvalues. */\n\n/*  Depending on the number of desired eigenvalues, these are computed either */\n/*  by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are */\n/*  computed by the use of various suitable L D L^T factorizations near clusters */\n/*  of close eigenvalues (referred to as RRRs, Relatively Robust */\n/*  Representations). An informal sketch of the algorithm follows. */\n\n/*  For each unreduced block (submatrix) of T, */\n/*     (a) Compute T - sigma I  = L D L^T, so that L and D */\n/*         define all the wanted eigenvalues to high relative accuracy. */\n/*         This means that small relative changes in the entries of D and L */\n/*         cause only small relative changes in the eigenvalues and */\n/*         eigenvectors. The standard (unfactored) representation of the */\n/*         tridiagonal matrix T does not have this property in general. */\n/*     (b) Compute the eigenvalues to suitable accuracy. */\n/*         If the eigenvectors are desired, the algorithm attains full */\n/*         accuracy of the computed eigenvalues only right before */\n/*         the corresponding vectors have to be computed, see steps c) and d). */\n/*     (c) For each cluster of close eigenvalues, select a new */\n/*         shift close to the cluster, find a new factorization, and refine */\n/*         the shifted eigenvalues to suitable accuracy. */\n/*     (d) For each eigenvalue with a large enough relative separation compute */\n/*         the corresponding eigenvector by forming a rank revealing twisted */\n/*         factorization. Go back to (c) for any clusters that remain. */\n\n/*  For more details, see: */\n/*  - Inderjit S. Dhillon and Beresford N. Parlett: \"Multiple representations */\n/*    to compute orthogonal eigenvectors of symmetric tridiagonal matrices,\" */\n/*    Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004. */\n/*  - Inderjit Dhillon and Beresford Parlett: \"Orthogonal Eigenvectors and */\n/*    Relative Gaps,\" SIAM Journal on Matrix Analysis and Applications, Vol. 25, */\n/*    2004.  Also LAPACK Working Note 154. */\n/*  - Inderjit Dhillon: \"A new O(n^2) algorithm for the symmetric */\n/*    tridiagonal eigenvalue/eigenvector problem\", */\n/*    Computer Science Division Technical Report No. UCB/CSD-97-971, */\n/*    UC Berkeley, May 1997. */\n\n/*  Notes: */\n/*  1.ODSTMR works only on machines which follow IEEE-754 */\n/*  floating-point standard in their handling of infinities and NaNs. */\n/*  This permits the use of efficient inner loops avoiding a check for */\n/*  zero divisors. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  JOBZ    (input) CHARACTER*1 */\n/*          = 'N':  Compute eigenvalues only; */\n/*          = 'V':  Compute eigenvalues and eigenvectors. */\n\n/*  RANGE   (input) CHARACTER*1 */\n/*          = 'A': all eigenvalues will be found. */\n/*          = 'V': all eigenvalues in the half-open interval (VL,VU] */\n/*                 will be found. */\n/*          = 'I': the IL-th through IU-th eigenvalues will be found. */\n\n/*  N       (input) INT */\n/*          The order of the matrix.  N >= 0. */\n\n/*  D       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the N diagonal elements of the tridiagonal matrix */\n/*          T. On exit, D is overwritten. */\n\n/*  E       (input/output) DOUBLE PRECISION array, dimension (N) */\n/*          On entry, the (N-1) subdiagonal elements of the tridiagonal */\n/*          matrix T in elements 1 to N-1 of E. E(N) need not be set on */\n/*          input, but is used internally as workspace. */\n/*          On exit, E is overwritten. */\n\n/*  VL      (input) DOUBLE PRECISION */\n/*  VU      (input) DOUBLE PRECISION */\n/*          If RANGE='V', the lower and upper bounds of the interval to */\n/*          be searched for eigenvalues. VL < VU. */\n/*          Not referenced if RANGE = 'A' or 'I'. */\n\n/*  IL      (input) INT */\n/*  IU      (input) INT */\n/*          If RANGE='I', the indices (in ascending order) of the */\n/*          smallest and largest eigenvalues to be returned. */\n/*          1 <= IL <= IU <= N, if N > 0. */\n/*          Not referenced if RANGE = 'A' or 'V'. */\n\n/*  M       (output) INT */\n/*          The total number of eigenvalues found.  0 <= M <= N. */\n/*          If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1. */\n\n/*  W       (output) DOUBLE PRECISION array, dimension (N) */\n/*          The first M elements contain the selected eigenvalues in */\n/*          ascending order. */\n\n/*  Z       (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) ) */\n/*          If JOBZ = 'V', and if INFO = 0, then the first M columns of Z */\n/*          contain the orthonormal eigenvectors of the matrix T */\n/*          corresponding to the selected eigenvalues, with the i-th */\n/*          column of Z holding the eigenvector associated with W(i). */\n/*          If JOBZ = 'N', then Z is not referenced. */\n/*          Note: the user must ensure that at least max(1,M) columns are */\n/*          supplied in the array Z; if RANGE = 'V', the exact value of M */\n/*          is not known in advance and can be computed with a workspace */\n/*          query by setting NZC = -1, see below. */\n\n/*  LDZ     (input) INT */\n/*          The leading dimension of the array Z.  LDZ >= 1, and if */\n/*          JOBZ = 'V', then LDZ >= max(1,N). */\n\n/*  NZC     (input) INT */\n/*          The number of eigenvectors to be held in the array Z. */\n/*          If RANGE = 'A', then NZC >= max(1,N). */\n/*          If RANGE = 'V', then NZC >= the number of eigenvalues in (VL,VU]. */\n/*          If RANGE = 'I', then NZC >= IU-IL+1. */\n/*          If NZC = -1, then a workspace query is assumed; the */\n/*          routine calculates the number of columns of the array Z that */\n/*          are needed to hold the eigenvectors. */\n/*          This value is returned as the first entry of the Z array, and */\n/*          no error message related to NZC is issued by OERBLA. */\n\n/*  ISUPPZ  (output) INT ARRAY, dimension ( 2*max(1,M) ) */\n/*          The support of the eigenvectors in Z, i.e., the indices */\n/*          indicating the nonzero elements in Z. The i-th computed eigenvector */\n/*          is nonzero only in elements ISUPPZ( 2*i-1 ) through */\n/*          ISUPPZ( 2*i ). This is relevant in the case when the matrix */\n/*          is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0. */\n\n/*  TRYRAC  (input/output) INT */\n/*          If TRYRAC.EQ..TRUE., indicates that the code should check whether */\n/*          the tridiagonal matrix defines its eigenvalues to high relative */\n/*          accuracy.  If so, the code uses relative-accuracy preserving */\n/*          algorithms that might be (a bit) slower depending on the matrix. */\n/*          If the matrix does not define its eigenvalues to high relative */\n/*          accuracy, the code can uses possibly faster algorithms. */\n/*          If TRYRAC.EQ..FALSE., the code is not required to guarantee */\n/*          relatively accurate eigenvalues and can use the fastest possible */\n/*          techniques. */\n/*          On exit, a .TRUE. TRYRAC will be set to .FALSE. if the matrix */\n/*          does not define its eigenvalues to high relative accuracy. */\n\n/*  WORK    (workspace/output) DOUBLE PRECISION array, dimension (LWORK) */\n/*          On exit, if INFO = 0, WORK(1) returns the optimal */\n/*          (and minimal) LWORK. */\n\n/*  LWORK   (input) INT */\n/*          The dimension of the array WORK. LWORK >= max(1,18*N) */\n/*          if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'. */\n/*          If LWORK = -1, then a workspace query is assumed; the routine */\n/*          only calculates the optimal size of the WORK array, returns */\n/*          this value as the first entry of the WORK array, and no error */\n/*          message related to LWORK is issued by OERBLA. */\n\n/*  IWORK   (workspace/output) INT array, dimension (LIWORK) */\n/*          On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK. */\n\n/*  LIWORK  (input) INT */\n/*          The dimension of the array IWORK.  LIWORK >= max(1,10*N) */\n/*          if the eigenvectors are desired, and LIWORK >= max(1,8*N) */\n/*          if only the eigenvalues are to be computed. */\n/*          If LIWORK = -1, then a workspace query is assumed; the */\n/*          routine only calculates the optimal size of the IWORK array, */\n/*          returns this value as the first entry of the IWORK array, and */\n/*          no error message related to LIWORK is issued by OERBLA. */\n\n/*  INFO    (output) INT */\n/*          On exit, INFO */\n/*          = 0:  successful exit */\n/*          < 0:  if INFO = -i, the i-th argument had an illegal value */\n/*          > 0:  if INFO = 1X, internal error in ODRRE, */\n/*                if INFO = 2X, internal error in ODRRV. */\n/*                Here, the digit X = ABS( IINFO ) < 10, where IINFO is */\n/*                the nonzero error code returned by ODRRE or */\n/*                ODRRV, respectively. */\n\n\n/*  Further Details */\n/*  =============== */\n\n/*  Based on contributions by */\n/*     Beresford Parlett, University of California, Berkeley, USA */\n/*     Jim Demmel, University of California, Berkeley, USA */\n/*     Inderjit Dhillon, University of Texas, Austin, USA */\n/*     Osni Marques, LBNL/NERSC, USA */\n/*     Christof Voemel, University of California, Berkeley, USA */\n\n/*  ===================================================================== */\n\n/*     .. Parameters .. */\n/*     .. */\n/*     .. Local Scalars .. */\n/*     .. */\n/*     .. */\n/*     .. External Functions .. */\n/*     .. */\n/*     .. External Subroutines .. */\n/*     .. */\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n/*     Test the input parameters. */\n\n    /* Parameter adjustments */\n    --d__;\n    --e;\n    --w;\n    z_dim1 = *ldz;\n    z_offset = 1 + z_dim1;\n    z__ -= z_offset;\n    --isuppz;\n    --work;\n    --iwork;\n\n    /* Function Body */\n    wantz = olsame(jobz, \"V\");\n    alleig = olsame(range, \"A\");\n    valeig = olsame(range, \"V\");\n    indeig = olsame(range, \"I\");\n\n    lquery = *lwork == -1 || *liwork == -1;\n    zquery = *nzc == -1;\n/*     ODSTMR needs WORK of size 6*N, IWORK of size 3*N. */\n/*     In addition, ODRRE needs WORK of size 6*N, IWORK of size 5*N. */\n/*     Furthermore, ODRRV needs WORK of size 12*N, IWORK of size 7*N. */\n    if (wantz) {\n\tlwmin = *n * 18;\n\tliwmin = *n * 10;\n    } else {\n/*        need less workspace if only the eigenvalues are wanted */\n\tlwmin = *n * 12;\n\tliwmin = *n << 3;\n    }\n    wl = 0.;\n    wu = 0.;\n    iil = 0;\n    iiu = 0;\n    if (valeig) {\n/*        We do not reference VL, VU in the cases RANGE = 'I','A' */\n/*        The interval (WL, WU] contains all the wanted eigenvalues. */\n/*        It is either given by the user or computed in ODRRE. */\n\twl = *vl;\n\twu = *vu;\n    } else if (indeig) {\n/*        We do not reference IL, IU in the cases RANGE = 'V','A' */\n\tiil = *il;\n\tiiu = *iu;\n    }\n\n    *info = 0;\n    if (! (wantz || olsame(jobz, \"N\"))) {\n\t*info = -1;\n    } else if (! (alleig || valeig || indeig)) {\n\t*info = -2;\n    } else if (*n < 0) {\n\t*info = -3;\n    } else if (valeig && *n > 0 && wu <= wl) {\n\t*info = -7;\n    } else if (indeig && (iil < 1 || iil > *n)) {\n\t*info = -8;\n    } else if (indeig && (iiu < iil || iiu > *n)) {\n\t*info = -9;\n    } else if (*ldz < 1 || wantz && *ldz < *n) {\n\t*info = -13;\n    } else if (*lwork < lwmin && ! lquery) {\n\t*info = -17;\n    } else if (*liwork < liwmin && ! lquery) {\n\t*info = -19;\n    }\n\n/*     Get machine constants. */\n\n    safmin = DBL_MIN; // safmin = odmch(\"Safe minimum\");\n    eps = DBL_EPSILON; // eps = odmch(\"Precision\");\n    smlnum = safmin / eps;\n    bignum = 1. / smlnum;\n    rmin = sqrt(smlnum);\n/* Computing MIN */\n    d__1 = sqrt(bignum), d__2 = 1. / sqrt(sqrt(safmin));\n    rmax = fmin(d__1,d__2);\n\n    if (*info == 0) {\n\twork[1] = (double) lwmin;\n\tiwork[1] = liwmin;\n\n\tif (wantz && alleig) {\n\t    nzcmin = *n;\n\t} else if (wantz && valeig) {\n\t    odrrc(\"T\", n, vl, vu, &d__[1], &e[1], &safmin, &nzcmin, &itmp, &\n\t\t    itmp2, info);\n\t} else if (wantz && indeig) {\n\t    nzcmin = iiu - iil + 1;\n\t} else {\n/*           WANTZ .EQ. FALSE. */\n\t    nzcmin = 0;\n\t}\n\tif (zquery && *info == 0) {\n\t    z__[z_dim1 + 1] = (double) nzcmin;\n\t} else if (*nzc < nzcmin && ! zquery) {\n\t    *info = -14;\n\t}\n    }\n    if (*info != 0) {\n\n\ti__1 = -(*info);\n\toerbla(\"ODSTMR\", &i__1);\n\n\treturn 0;\n    } else if (lquery || zquery) {\n\treturn 0;\n    }\n\n/*     Handle N = 0, 1, and 2 cases immediately */\n\n    *m = 0;\n    if (*n == 0) {\n\treturn 0;\n    }\n\n    if (*n == 1) {\n\tif (alleig || indeig) {\n\t    *m = 1;\n\t    w[1] = d__[1];\n\t} else {\n\t    if (wl < d__[1] && wu >= d__[1]) {\n\t\t*m = 1;\n\t\tw[1] = d__[1];\n\t    }\n\t}\n\tif (wantz && ! zquery) {\n\t    z__[z_dim1 + 1] = 1.;\n\t    isuppz[1] = 1;\n\t    isuppz[2] = 1;\n\t}\n\treturn 0;\n    }\n\n    if (*n == 2) {\n\tif (! wantz) {\n\t    ode2(&d__[1], &e[1], &d__[2], &r1, &r2);\n\t} else if (wantz && ! zquery) {\n\t    odev2(&d__[1], &e[1], &d__[2], &r1, &r2, &cs, &sn);\n\t}\n\tif (alleig || valeig && r2 > wl && r2 <= wu || indeig && iil == 1) {\n\t    ++(*m);\n\t    w[*m] = r2;\n\t    if (wantz && ! zquery) {\n\t\tz__[*m * z_dim1 + 1] = -sn;\n\t\tz__[*m * z_dim1 + 2] = cs;\n/*              Note: At most one of SN and CS can be zero. */\n\t\tif (sn != 0.) {\n\t\t    if (cs != 0.) {\n\t\t\tisuppz[(*m << 1) - 1] = 1;\n\t\t\tisuppz[(*m << 1) - 1] = 2;\n\t\t    } else {\n\t\t\tisuppz[(*m << 1) - 1] = 1;\n\t\t\tisuppz[(*m << 1) - 1] = 1;\n\t\t    }\n\t\t} else {\n\t\t    isuppz[(*m << 1) - 1] = 2;\n\t\t    isuppz[*m * 2] = 2;\n\t\t}\n\t    }\n\t}\n\tif (alleig || valeig && r1 > wl && r1 <= wu || indeig && iiu == 2) {\n\t    ++(*m);\n\t    w[*m] = r1;\n\t    if (wantz && ! zquery) {\n\t\tz__[*m * z_dim1 + 1] = cs;\n\t\tz__[*m * z_dim1 + 2] = sn;\n/*              Note: At most one of SN and CS can be zero. */\n\t\tif (sn != 0.) {\n\t\t    if (cs != 0.) {\n\t\t\tisuppz[(*m << 1) - 1] = 1;\n\t\t\tisuppz[(*m << 1) - 1] = 2;\n\t\t    } else {\n\t\t\tisuppz[(*m << 1) - 1] = 1;\n\t\t\tisuppz[(*m << 1) - 1] = 1;\n\t\t    }\n\t\t} else {\n\t\t    isuppz[(*m << 1) - 1] = 2;\n\t\t    isuppz[*m * 2] = 2;\n\t\t}\n\t    }\n\t}\n\treturn 0;\n    }\n/*     Continue with general N */\n    indgrs = 1;\n    inderr = (*n << 1) + 1;\n    indgp = *n * 3 + 1;\n    indd = (*n << 2) + 1;\n    inde2 = *n * 5 + 1;\n    indwrk = *n * 6 + 1;\n\n    iinspl = 1;\n    iindbl = *n + 1;\n    iindw = (*n << 1) + 1;\n    iindwk = *n * 3 + 1;\n\n/*     Scale matrix to allowable range, if necessary. */\n/*     The allowable range is related to the PIVMIN parameter; see the */\n/*     comments in DLARRD.  The preference for scaling small values */\n/*     up is heuristic; we expect users' matrices not to be close to the */\n/*     RMAX threshold. */\n\n    scale = 1.;\n    tnrm = odnst(\"M\", n, &d__[1], &e[1]);\n    if (tnrm > 0. && tnrm < rmin) {\n\tscale = rmin / tnrm;\n    } else if (tnrm > rmax) {\n\tscale = rmax / tnrm;\n    }\n    if (scale != 1.) {\n\todscal(n, &scale, &d__[1], &c__1);\n\ti__1 = *n - 1;\n\todscal(&i__1, &scale, &e[1], &c__1);\n\ttnrm *= scale;\n\tif (valeig) {\n/*           If eigenvalues in interval have to be found, */\n/*           scale (WL, WU] accordingly */\n\t    wl *= scale;\n\t    wu *= scale;\n\t}\n    }\n\n/*     Compute the desired eigenvalues of the tridiagonal after splitting */\n/*     into smaller subblocks if the corresponding off-diagonal elements */\n/*     are small */\n/*     THRESH is the splitting parameter for ODRRE */\n/*     A negative THRESH forces the old splitting criterion based on the */\n/*     size of the off-diagonal. A positive THRESH switches to splitting */\n/*     which preserves relative accuracy. */\n\n    if (*tryrac) {\n/*        Test whether the matrix warrants the more expensive relative approach. */\n\todrrr(n, &d__[1], &e[1], &iinfo);\n    } else {\n/*        The user does not care about relative accurately eigenvalues */\n\tiinfo = -1;\n    }\n/*     Set the splitting criterion */\n    if (iinfo == 0) {\n\tthresh = eps;\n    } else {\n\tthresh = -eps;\n/*        relative accuracy is desired but T does not guarantee it */\n\t*tryrac = FALSE_;\n    }\n\n    if (*tryrac) {\n/*        Copy original diagonal, needed to guarantee relative accuracy */\n\todcpy(n, &d__[1], &c__1, &work[indd], &c__1);\n    }\n/*     Store the squares of the offdiagonal values of T */\n    i__1 = *n - 1;\n    for (j = 1; j <= i__1; ++j) {\n/* Computing 2nd power */\n\td__1 = e[j];\n\twork[inde2 + j - 1] = d__1 * d__1;\n/* L5: */\n    }\n/*     Set the tolerance parameters for bisection */\n    if (! wantz) {\n/*        ODRRE computes the eigenvalues to full precision. */\n\trtol1 = eps * 4.;\n\trtol2 = eps * 4.;\n    } else {\n/*        ODRRE computes the eigenvalues to less than full precision. */\n/*        ODRRV will refine the eigenvalue approximations, and we can */\n/*        need less accurate initial bisection in ODRRE. */\n/*        Note: these settings do only affect the subset case and ODRRE */\n\trtol1 = sqrt(eps);\n/* Computing MAX */\n\td__1 = sqrt(eps) * .005, d__2 = eps * 4.;\n\trtol2 = fmax(d__1,d__2);\n    }\n    odrre(range, n, &wl, &wu, &iil, &iiu, &d__[1], &e[1], &work[inde2], &\n\t    rtol1, &rtol2, &thresh, &nsplit, &iwork[iinspl], m, &w[1], &work[\n\t    inderr], &work[indgp], &iwork[iindbl], &iwork[iindw], &work[\n\t    indgrs], &pivmin, &work[indwrk], &iwork[iindwk], &iinfo);\n    if (iinfo != 0) {\n\t*info = iabs(iinfo) + 10;\n\treturn 0;\n    }\n/*     Note that if RANGE .NE. 'V', ODRRE computes bounds on the desired */\n/*     part of the spectrum. All desired eigenvalues are contained in */\n/*     (WL,WU] */\n    if (wantz) {\n\n/*        Compute the desired eigenvectors corresponding to the computed */\n/*        eigenvalues */\n\n\todrrv(n, &wl, &wu, &d__[1], &e[1], &pivmin, &iwork[iinspl], m, &\n\t\tc__1, m, &c_b18, &rtol1, &rtol2, &w[1], &work[inderr], &work[\n\t\tindgp], &iwork[iindbl], &iwork[iindw], &work[indgrs], &z__[\n\t\tz_offset], ldz, &isuppz[1], &work[indwrk], &iwork[iindwk], &\n\t\tiinfo);\n\tif (iinfo != 0) {\n\t    *info = iabs(iinfo) + 20;\n\t    return 0;\n\t}\n    } else {\n/*        ODRRE computes eigenvalues of the (shifted) root representation */\n/*        ODRRV returns the eigenvalues of the unshifted matrix. */\n/*        However, if the eigenvectors are not desired by the user, we need */\n/*        to apply the corresponding shifts from ODRRE to obtain the */\n/*        eigenvalues of the original matrix. */\n\ti__1 = *m;\n\tfor (j = 1; j <= i__1; ++j) {\n\t    itmp = iwork[iindbl + j - 1];\n\t    w[j] += e[iwork[iinspl + itmp - 1]];\n/* L20: */\n\t}\n    }\n\n    if (*tryrac) {\n/*        Refine computed eigenvalues so that they are relatively accurate */\n/*        with respect to the original matrix T. */\n\tibegin = 1;\n\twbegin = 1;\n\ti__1 = iwork[iindbl + *m - 1];\n\tfor (jblk = 1; jblk <= i__1; ++jblk) {\n\t    iend = iwork[iinspl + jblk - 1];\n\t    in = iend - ibegin + 1;\n\t    wend = wbegin - 1;\n/*           check if any eigenvalues have to be refined in this block */\nL36:\n\t    if (wend < *m) {\n\t\tif (iwork[iindbl + wend] == jblk) {\n\t\t    ++wend;\n\t\t    goto L36;\n\t\t}\n\t    }\n\t    if (wend < wbegin) {\n\t\tibegin = iend + 1;\n\t\tgoto L39;\n\t    }\n\t    offset = iwork[iindw + wbegin - 1] - 1;\n\t    ifirst = iwork[iindw + wbegin - 1];\n\t    ilast = iwork[iindw + wend - 1];\n\t    rtol2 = eps * 4.;\n\t    odrrj(&in, &work[indd + ibegin - 1], &work[inde2 + ibegin - 1], \n\t\t    &ifirst, &ilast, &rtol2, &offset, &w[wbegin], &work[\n\t\t    inderr + wbegin - 1], &work[indwrk], &iwork[iindwk], &\n\t\t    pivmin, &tnrm, &iinfo);\n\t    ibegin = iend + 1;\n\t    wbegin = wend + 1;\nL39:\n\t    ;\n\t}\n    }\n\n/*     If matrix was scaled, then rescale eigenvalues appropriately. */\n\n    if (scale != 1.) {\n\td__1 = 1. / scale;\n\todscal(m, &d__1, &w[1], &c__1);\n    }\n\n/*     If eigenvalues are not in increasing order, then sort them, */\n/*     possibly along with eigenvectors. */\n\n    if (nsplit > 1) {\n\tif (! wantz) {\n\t    odsrt(\"I\", m, &w[1], &iinfo);\n\t    if (iinfo != 0) {\n\t\t*info = 3;\n\t\treturn 0;\n\t    }\n\t} else {\n\t    i__1 = *m - 1;\n\t    for (j = 1; j <= i__1; ++j) {\n\t\ti__ = 0;\n\t\ttmp = w[j];\n\t\ti__2 = *m;\n\t\tfor (jj = j + 1; jj <= i__2; ++jj) {\n\t\t    if (w[jj] < tmp) {\n\t\t\ti__ = jj;\n\t\t\ttmp = w[jj];\n\t\t    }\n/* L50: */\n\t\t}\n\t\tif (i__ != 0) {\n\t\t    w[i__] = w[j];\n\t\t    w[j] = tmp;\n\t\t    if (wantz) {\n\t\t\todswap(n, &z__[i__ * z_dim1 + 1], &c__1, &z__[j * \n\t\t\t\tz_dim1 + 1], &c__1);\n\t\t\titmp = isuppz[(i__ << 1) - 1];\n\t\t\tisuppz[(i__ << 1) - 1] = isuppz[(j << 1) - 1];\n\t\t\tisuppz[(j << 1) - 1] = itmp;\n\t\t\titmp = isuppz[i__ * 2];\n\t\t\tisuppz[i__ * 2] = isuppz[j * 2];\n\t\t\tisuppz[j * 2] = itmp;\n\t\t    }\n\t\t}\n/* L60: */\n\t    }\n\t}\n    }\n\n\n    work[1] = (double) lwmin;\n    iwork[1] = liwmin;\n    return 0;\n\n/*     End of ODSTMR */\n\n} /* odstmr_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/oerbla.c",
    "content": "/* xerbla.f -- translated by f2c (version 20061008) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\n/* Table of constant values */\nstatic int c__1 = 1;\n\n/* Subroutine */ \nint oerbla(char *srname, int *info)\n{\n    \n\n/*  -- LAPACK auxiliary routine (version 3.2) -- */\n/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */\n/*     November 2006 */\n\n/*     .. Scalar Arguments .. */\n/*     .. */\n\n/*  Purpose */\n/*  ======= */\n\n/*  OERBLA  is an error handler for the LAPACK routines. */\n/*  It is called by an LAPACK routine if an input parameter has an */\n/*  invalid value.  A message is printed and execution stops. */\n\n/*  Installers may consider modifying the STOP statement in order to */\n/*  call system-specific exception-handling facilities. */\n\n/*  Arguments */\n/*  ========= */\n\n/*  SRNAME  (input) CHARACTER*(*) */\n/*          The name of the routine which called OERBLA. */\n\n/*  INFO    (input) INT */\n/*          The position of the invalid parameter in the parameter list */\n/*          of the calling routine. */\n\n/* ===================================================================== */\n\n/*     .. Intrinsic Functions .. */\n/*     .. */\n/*     .. Executable Statements .. */\n\n    printf(\"** On entry to %6s, parameter number %2i had an illegal value\\n\",\n\t\tsrname, *info);\n\n\n/*     End of OERBLA */\n\n    return 0;\n} /* oerbla_ */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/lapack/olsame.c",
    "content": "/*  -- translated by f2c (version 19940927) */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n\nint olsame(char *ca, char *cb)\n{\n\n\n    /* System generated locals */\n    int ret_val;\n\n    /* Local variables */\n    static int inta, intb, zcode;\n\n\n/*  -- LAPACK auxiliary routine (version 2.0) --   \n       Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,   \n       Courant Institute, Argonne National Lab, and Rice University   \n       January 31, 1994   \n\n\n    Purpose   \n    =======   \n\n    OLSAME returns .TRUE. if CA is the same letter as CB regardless of   \n    case.   \n\n    Arguments   \n    =========   \n\n    CA      (input) CHARACTER*1   \n    CB      (input) CHARACTER*1   \n            CA and CB specify the single characters to be compared.   \n\n   ===================================================================== \n  \n\n\n       Test if the characters are equal */\n\n    ret_val = *(unsigned char *)ca == *(unsigned char *)cb;\n    if (ret_val) {\n\treturn ret_val;\n    }\n\n/*     Now test for equivalence if both characters are alphabetic. */\n\n    zcode = 'Z';\n\n/*     Use 'Z' rather than 'A' so that ASCII can be detected on Prime   \n       machines, on which ICHAR returns a value with bit 8 set.   \n       ICHAR('A') on Prime machines returns 193 which is the same as   \n       ICHAR('A') on an EBCDIC machine. */\n\n    inta = *(unsigned char *)ca;\n    intb = *(unsigned char *)cb;\n\n    if (zcode == 90 || zcode == 122) {\n\n/*        ASCII is assumed - ZCODE is the ASCII code of either lower o\nr   \n          upper case 'Z'. */\n\n\tif (inta >= 97 && inta <= 122) {\n\t    inta += -32;\n\t}\n\tif (intb >= 97 && intb <= 122) {\n\t    intb += -32;\n\t}\n\n    } else if (zcode == 233 || zcode == 169) {\n\n/*        EBCDIC is assumed - ZCODE is the EBCDIC code of either lower\n or   \n          upper case 'Z'. */\n\n\tif (inta >= 129 && inta <= 137 || inta >= 145 && inta <= 153 || inta \n\t\t>= 162 && inta <= 169) {\n\t    inta += 64;\n\t}\n\tif (intb >= 129 && intb <= 137 || intb >= 145 && intb <= 153 || intb \n\t\t>= 162 && intb <= 169) {\n\t    intb += 64;\n\t}\n\n    } else if (zcode == 218 || zcode == 250) {\n\n/*        ASCII is assumed, on Prime machines - ZCODE is the ASCII cod\ne   \n          plus 128 of either lower or upper case 'Z'. */\n\n\tif (inta >= 225 && inta <= 250) {\n\t    inta += -32;\n\t}\n\tif (intb >= 225 && intb <= 250) {\n\t    intb += -32;\n\t}\n    }\n    ret_val = inta == intb;\n\n/*     RETURN   \n\n       End of OLSAME */\n\n    return ret_val;\n} /* olsame_ */\n\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/plarre.c",
    "content": "/* Parallel computation of eigenvalues and symmetric tridiagonal \n * matrix T, given by its diagonal elements D and its super-/sub-\n * diagonal elements E.\n *\n * Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.7\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n#include <pthread.h>\n#include \"mpi.h\"\n#include \"pmrrr.h\" \n#include \"plarre.h\"\n#include \"global.h\"\n#include \"structs.h\" \n\n\n#define ONE                1.0\n#define HUNDRED          100.0\n#define HALF               0.5\n#define FOURTH             0.25\n\n\nstatic void *eigval_subset_thread_a(void *argin);\nstatic void *eigval_subset_thread_r(void *argin);\nstatic void clean_up_plarre(double*, double*, int*, int*, int*);\n\n\nstatic\nint eigval_approx_proc(proc_t *procinfo, int ifirst, int ilast, \n\t\t\t   int n, double *D, double *E, double *E2,  \n\t\t\t   int *Windex, int *iblock, double *gersch, tol_t *tolstruct, \n\t\t\t   double *W, double *Werr, double *Wgap, double *work,\n\t\t\t   int *iwork);\n\nstatic\nint eigval_root_proc(proc_t *procinfo, int ifirst, int ilast, \n\t\t\t   int n, double *D, double *E, double *E2,  \n\t\t\t   int *Windex, int *iblock, double *gersch, tol_t *tolstruct, \n\t\t\t   double *W, double *Werr, double *Wgap, double *work,\n\t\t\t int *iwork);\n\nstatic\nint eigval_refine_proc(proc_t *procinfo, int ifirst, int ilast, \n\t\t\t   int n, double *D, double *E, double *E2,  \n\t\t\t   int *Windex, int *iblock, double *gersch, tol_t *tolstruct, \n\t\t\t   double *W, double *Werr, double *Wgap, double *work,\n\t\t\t   int *iwork);\n\nstatic \nauxarg1_t *create_auxarg1(int, double*, double*, double*, int, int, \n\t\t\t  int, int, int, int*, double,  double,\n\t\t\t  double*, double*, double*, int*, int*);\nstatic \nvoid retrieve_auxarg1(auxarg1_t*, int*, double**, double**, double**,\n\t\t      int*, int*, int*, int*, int*, int**, double*, \n\t\t      double*, double**, double**, double**, int**, \n\t\t      int**);\nstatic\nauxarg2_t *create_auxarg2(int, double*, double*, int, int, double*,\n\t\t\t      double*,double*,int*,double, double, double, double);\nstatic\nvoid retrieve_auxarg2(auxarg2_t*, int*, double**, double**, int*,\n\t\t\t  int*, double**, double**, double**, int**, double*, double*, double*,\n\t\t      double*);\n\nstatic int cmp(const void*, const void*);\n\n\n\n\n/* Routine to compute eigenvalues */\nint plarre(proc_t *procinfo, char *jobz, char *range, in_t *Dstruct, \n\t       val_t *Wstruct, tol_t *tolstruct, int *nzp, int *offsetp)\n{\n  /* input variables */\n  int              pid    = procinfo->pid;\n  int              nproc  = procinfo->nproc;\n  bool             wantZ  = (jobz[0]  == 'V' || jobz[0]  == 'v');\n  bool             cntval = (jobz[0]  == 'C' || jobz[0]  == 'c');\n  int              n      = Dstruct->n;\n  double *restrict D      = Dstruct->D;\n  double *restrict E      = Dstruct->E;\n  int    *restrict isplit = Dstruct->isplit;\n  double           *vl    = Wstruct->vl;\n  double           *vu    = Wstruct->vu;\n  int              *il    = Wstruct->il;\n  int              *iu    = Wstruct->iu;\n  double *restrict W      = Wstruct->W;\n  double *restrict Werr   = Wstruct->Werr;\n  double *restrict Wgap   = Wstruct->Wgap;\n  int    *restrict Windex = Wstruct->Windex;\n  int    *restrict iblock = Wstruct->iblock;\n  double *restrict gersch = Wstruct->gersch;\n\n  /* constants */\n  int             IZERO = 0,   IONE = 1;\n  double          DZERO = 0.0;\n\n  /* work space */\n  double          *E2;\n  double         *work;\n  int             *iwork;\n\n  /* compute geschgorin disks and spectral diameter */\n  double          gl, gu, eold, emax, eabs;\n\n  /* compute splitting points */\n  int             bl_begin, bl_end, bl_size;\n\n  /* distribute work among processes */\n  int             ifirst, ilast, ifirst_tmp, ilast_tmp;\n  int             chunk, isize, iil, iiu;\n\n  /* gather results */\n  int             *rcount, *rdispl;\n\n  /* others */\n  int             info, i, j, jbl, idummy;\n  double          tmp1, dummy;\n  bool             sorted;\n  enum range_enum {allrng=1, valrng=2, indrng=3} irange;\n  double          intervals[2];\n  int             negcounts[2];\n  double          sigma;\n\n  if (range[0] == 'A' || range[0] == 'a') {\n    irange = allrng;\n  } else if (range[0] == 'V' || range[0] == 'v') {\n    irange = valrng;\n  } else if (range[0] == 'I' || range[0] == 'i') {\n    irange = indrng;\n  } else {\n    return(1);\n  }\n\n  /* allocate work space */\n  E2     = (double *) malloc(     n * sizeof(double) );\n  assert(E2 != NULL);\n  work   = (double *) malloc(   4*n * sizeof(double) );\n  assert(work != NULL);\n  iwork  = (int *)    malloc(   3*n * sizeof(int) );\n  assert(iwork != NULL);\n  rcount = (int *)    malloc( nproc * sizeof(int) );\n  assert(rcount != NULL);\n  rdispl = (int *)    malloc( nproc * sizeof(int) );\n  assert(rdispl != NULL);\n\n  /* Compute square of off-diagonal elements */\n  for (i=0; i<n-1; i++) {\n    E2[i] = E[i]*E[i];\n  }\n\n  /* compute geschgorin disks and spectral diameter */\n  gl     = D[0];\n  gu     = D[0];\n  eold   =  0.0;\n  emax   =  0.0;\n  E[n-1] =  0.0;\n\n  for (i=0; i<n; i++) {\n    eabs = fabs(E[i]);\n    if (eabs >= emax) emax = eabs;\n    tmp1 = eabs + eold;\n    gersch[2*i] = D[i] - tmp1;\n    gl = fmin(gl, gersch[2*i]);\n    gersch[2*i+1] = D[i] + tmp1;\n    gu = fmax(gu, gersch[2*i+1]);\n    eold = eabs;\n  }\n  /* min. pivot allowed in the Sturm sequence of T */\n  tolstruct->pivmin = DBL_MIN * fmax(1.0, emax*emax);\n  /* estimate of spectral diameter */\n  Dstruct->spdiam = gu - gl;\n\n  /* compute splitting points with threshold \"split\" */\n  odrra(&n, D, E, E2, &tolstruct->split, &Dstruct->spdiam,\n        &Dstruct->nsplit, isplit, &info);\n  assert(info == 0);\n\n  if (irange == allrng || irange == indrng) {\n    *vl = gl;\n    *vu = gu;\n  }\n\n  /* set eigenvalue indices in case of all or subset by value has\n   * to be computed; thereby convert all problem to subset by index\n   * computation */\n  if (irange == allrng) {\n    *il = 1;\n    *iu = n;\n  } else if (irange == valrng) {\n    intervals[0] = *vl; intervals[1] = *vu;\n    \n    /* find negcount at boundaries 'vl' and 'vu';\n     * needs work of dim(n) and iwork of dim(n) */\n    odebz(&IONE, &IZERO, &n, &IONE, &IONE, &IZERO,\n  \t  &DZERO, &DZERO, &tolstruct->pivmin, D, E, E2, &idummy,\n  \t  intervals, &dummy, &idummy, negcounts, work, iwork, &info);\n    assert(info == 0);\n    \n    /* update negcounts of whole matrix with negcounts found for block */\n    *il = negcounts[0] + 1;\n    *iu = negcounts[1];\n  }\n\n  if (cntval && irange == valrng) {\n    /* clean up and return */\n    *nzp = iceil(*iu-*il+1, nproc);\n    clean_up_plarre(E2, work, iwork, rcount, rdispl);\n    return(0);\n  }\n\n\n  /* loop over unreduced blocks */  \n  bl_begin  = 0;\n  \n  for (jbl=0; jbl<Dstruct->nsplit; jbl++) {\n    \n    bl_end  = isplit[jbl] - 1;\n    bl_size = bl_end - bl_begin + 1;\n    \n    /* deal with 1x1 block immediately */\n    if (bl_size == 1) {\n      E[bl_end] = 0.0;\n      W[bl_begin]      = D[bl_begin];\n      Werr[bl_begin]   = 0.0;\n      Werr[bl_begin]   = 0.0;\n      iblock[bl_begin] = jbl + 1;\n      Windex[bl_begin] = 1;\n      bl_begin  = bl_end + 1;\n      continue;\n    }\n\n    /* Indix range of block */\n    iil = 1;\n    iiu = bl_size;\n\n    /* each process computes a subset of the eigenvalues of the block */\n    ifirst_tmp = iil;\n    for (i=0; i<nproc; i++) {\n      chunk  = (iiu-iil+1)/nproc + (i < (iiu-iil+1)%nproc);\n      if (i == nproc-1) {\n\tilast_tmp = iiu;\n      } else {\n\tilast_tmp = ifirst_tmp + chunk - 1;\n\tilast_tmp = imin(ilast_tmp, iiu);\n      }\n      if (i == pid) {\n\tifirst    = ifirst_tmp;\n\tilast     = ilast_tmp;\n\tisize     = ilast - ifirst + 1;\n\t*offsetp = ifirst - iil;\n\t*nzp      = isize;\n      }\n      rcount[i]  = ilast_tmp - ifirst_tmp + 1;\n      rdispl[i]  = ifirst_tmp - iil;\n      ifirst_tmp = ilast_tmp + 1;\n      ifirst_tmp = imin(ifirst_tmp, iiu + 1);\n    }\n    \n    /* approximate eigenvalues of input assigned to process */\n    if (isize != 0) {      \n      info = eigval_approx_proc(procinfo, ifirst, ilast,\n\t\t\t\t    bl_size, &D[bl_begin], &E[bl_begin], &E2[bl_begin], \n\t\t\t\t    &Windex[bl_begin], &iblock[bl_begin], &gersch[2*bl_begin],\n\t\t\t\t    tolstruct, &W[bl_begin], &Werr[bl_begin], &Wgap[bl_begin], \n\t\t\t\t    work, iwork);\n      assert(info == 0);    \n    }\n\n    /* compute root representation of block */\n    info = eigval_root_proc(procinfo, ifirst, ilast,\n\t\t\t\t  bl_size, &D[bl_begin], &E[bl_begin], &E2[bl_begin], \n\t\t\t\t  &Windex[bl_begin], &iblock[bl_begin], &gersch[2*bl_begin],\n\t\t\t\t  tolstruct, &W[bl_begin], &Werr[bl_begin], &Wgap[bl_begin], \n\t\t\t\t  work, iwork);\n    assert(info == 0);    \n\n    /* refine eigenvalues assigned to process w.r.t root */\n    if (isize != 0) {\n      info = eigval_refine_proc(procinfo, ifirst, ilast,\n\t\t\t\t    bl_size, &D[bl_begin], &E[bl_begin], &E2[bl_begin], \n\t\t\t\t    &Windex[bl_begin], &iblock[bl_begin], &gersch[2*bl_begin],\n\t\t\t\t    tolstruct, &W[bl_begin], &Werr[bl_begin], &Wgap[bl_begin], \n\t\t\t\t    work, iwork);\n      assert(info == 0);    \n    }\n    \n    memcpy(work, &W[bl_begin], isize * sizeof(double) );\n    MPI_Allgatherv(work, isize, MPI_DOUBLE, &W[bl_begin], rcount, rdispl,\n\t\t   MPI_DOUBLE, procinfo->comm);\n    \n    memcpy(work, &Werr[bl_begin], isize * sizeof(double) );\n    MPI_Allgatherv(work, isize, MPI_DOUBLE, &Werr[bl_begin], rcount, rdispl,\n\t\t   MPI_DOUBLE, procinfo->comm);\n    \n    memcpy(iwork, &Windex[bl_begin], isize * sizeof(int) );\n    MPI_Allgatherv(iwork, isize, MPI_INT, &Windex[bl_begin], rcount, rdispl,\n\t\t   MPI_INT, procinfo->comm);\n    \n    /* Ensure that within block eigenvalues sorted */\n    sorted = false;\n    while (sorted == false) {\n    \tsorted = true;\n    \tfor (j=bl_begin; j < bl_end; j++) {\n    \t  if (W[j+1] < W[j]) {\n    \t    sorted = false;\n    \t    tmp1 = W[j];\n    \t    W[j] = W[j+1];\n    \t    W[j+1] = tmp1;\n    \t    tmp1 = Werr[j];\n    \t    Werr[j] = Werr[j+1];\n    \t    Werr[j+1] = tmp1;\n    \t  }\n    \t}\n    }\n    \n    /* Set indices index correctly */\n    for (j=bl_begin; j <= bl_end; j++)\n      iblock[j] = jbl + 1;\n    \n    /* Recompute gaps within the blocks */\n    for (j = bl_begin; j < bl_end; j++) {\n      Wgap[j] = fmax(0.0, (W[j+1] - Werr[j+1]) - (W[j] + Werr[j]) );\n    }\n    sigma = E[bl_end];\n    Wgap[bl_end] = fmax(0.0, (gu - sigma) - (W[bl_end] + Werr[bl_end]) );\n\n    /* Compute UNSHIFTED eigenvalues */\n    if (!wantZ) {\n      sigma = E[bl_end];\n      for (i=bl_begin; i<=bl_end; i++) {\n\tW[i]   += sigma;\n      }\n    }\n    \n    /* Proceed with next block */\n    bl_begin  = bl_end  + 1;\n  }\n  /* end of loop over unreduced blocks */    \n  \n  /* free memory */\n  clean_up_plarre(E2, work, iwork, rcount, rdispl);\n  \n  return(0);\n}\n  \n\n\n\n/*\n * Free's on allocated memory of plarre routine\n */\nstatic  \nvoid clean_up_plarre(double *E2, double *work, int *iwork, \n\t\t     int *rcount, int *rdispl)\n{\n  free(E2);\n  free(work);\n  free(iwork);\n  free(rcount);\n  free(rdispl);\n}\n\n\n\n\nstatic \nint eigval_approx_proc(proc_t *procinfo, int ifirst, int ilast, \n\t\t\t   int n, double *D, double *E, double *E2,  \n\t\t\t   int *Windex, int *iblock, double *gersch, tol_t *tolstruct, \n\t\t\t   double *W, double *Werr, double *Wgap, double *work,\n\t\t\t   int *iwork)\n{\n  /* Input parameter */\n  int              pid = procinfo->pid;\n  int              isize        = ilast-ifirst+1;\n  double       pivmin       = tolstruct->pivmin;\n\n  /* double gl, gu, wl, wu; */\n  double wl, wu;\n\n  /* Tolerances */\n  double bsrtol;\n\n  /* /\\* Multithreading *\\/ */\n  int            nthreads;\n  int              max_nthreads = procinfo->nthreads;\n  int            iifirst, iilast, chunk;\n  pthread_t      *threads;\n  pthread_attr_t attr;\n  auxarg1_t      *auxarg1;\n  void           *status;\n\n  /* Others */\n  int    nsplit, *isplit;\n  int    info, m, i, j;\n  double dummy;\n  \n  /* Allocate workspace */\n  isplit = (int *) malloc( n * sizeof(int) );\n  assert(isplit != NULL);\n  threads = (pthread_t *) malloc( max_nthreads * sizeof(pthread_t) );\n  assert(threads != NULL);\n\n  /* This is an unreduced block */\n  nsplit = 1;\n  isplit[0] = n;\n  \n  if (max_nthreads > 1) {\n    pthread_attr_init(&attr);\n    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);\n    pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);\n  }\n\n  /* Set tolerance parameters */\n  bsrtol = sqrt(DBL_EPSILON);    \n\n\n  /* APPROXIMATE EIGENVALUES */\n\n  /* compute approximations of the eigenvalues with muliple threads */\n  /* equivalent to: */\n  /* dlarrd(\"I\", \"B\", &n, &dummy, &dummy, &ifirst, &ilast, gersch, */\n  /*        &bsrtol, D, E, E2, &pivmin, &nsplit, isplit, &m, W, Werr, */\n  /*        &wl, &wu, iblock, Windex, work, iwork, &info); */\n  /* assert(info == 0); */\n  /* assert(m == ilast-ifirst+1); */\n  \n  nthreads = max_nthreads;\n  while (nthreads > 1 && isize / nthreads < 2)\n    nthreads--;\n\n  if (nthreads > 1) {\n    \n    /* each threads computes W[iifirst:iilast] and places them in\n     * work[0:n-1]; the corresponding errors in work[n:2*n-1];\n     * the blocks they belong in iwork[0:n-1]; and their indices in\n     * iwork[n:2*n-1]; */\n    \n    iifirst = ifirst;\n    chunk = isize / nthreads;\n    for (i=1; i<nthreads; i++) {\n      \n      iilast = iifirst + chunk - 1;\n\n      auxarg1 = create_auxarg1(n, D, E, E2, ifirst, ilast, iifirst, iilast,\n\t\t\t       nsplit, isplit, bsrtol, pivmin, gersch,\n\t\t\t       &work[0], &work[n], &iwork[n], &iwork[0]);\n      \n      info = pthread_create(&threads[i], &attr,\n\t\t\t    eigval_subset_thread_a,\n\t\t\t    (void *) auxarg1);\n      assert(info == 0);\n      \n      iifirst = iilast + 1;\n    }\n    iilast = ilast;\n\n    auxarg1 = create_auxarg1(n, D, E, E2, ifirst, ilast, iifirst, iilast,\n\t\t\t     nsplit, isplit, bsrtol, pivmin, gersch,\n\t\t\t     &work[0], &work[n], &iwork[n], &iwork[0]);\n    \n    status = eigval_subset_thread_a( (void *) auxarg1 );\n    assert(status == NULL);\n    \n    /* join threads */\n    for (i=1; i<nthreads; i++) {\n      info = pthread_join(threads[i], &status);\n      assert(info == 0 && status == NULL);\n    }\n    \n    /* m counts the numbers of eigenvalues computed by process */\n    m = isize;\n    for (j=0; j<isize; j++) {\n      W[j]      = work[j];\n      Werr[j]   = work[j+n];\n      iblock[j] = iwork[j];\n      Windex[j] = iwork[j+n];\n    }\n    \n  } else {\n    /* no multithreaded computation */\n    \n    odrrd(\"I\", \"B\", &n, &dummy, &dummy, &ifirst, &ilast, gersch,\n  \t  &bsrtol, D, E, E2, &pivmin, &nsplit, isplit, &m, W, Werr,\n  \t  &wl, &wu, iblock, Windex, work, iwork, &info);\n    assert(info == 0);\n    assert(m == ilast-ifirst+1);\n  }\n\n  /* clean up */\n  free(threads);\n  free(isplit);\n\n  if (max_nthreads > 1) {\n    pthread_attr_destroy(&attr);\n  }\n\n  return(0);\n}\n\n\n\nstatic \nint eigval_root_proc(proc_t *procinfo, int ifirst, int ilast, \n\t\t\t   int n, double *D, double *E, double *E2,  \n\t\t\t   int *Windex, int *iblock, double *gersch, tol_t *tolstruct, \n\t\t\t   double *W, double *Werr, double *Wgap, double *work,\n\t\t\t   int *iwork)\n{\n  /* Input parameter */\n  int              pid = procinfo->pid;\n  /* int              isize        = ilast-ifirst+1; */\n  double       pivmin       = tolstruct->pivmin;\n\n  /* Tolerances */\n  double rtl;\n\n  /* Create random vector to perturb rrr, same seed */\n  int    two_n = 2*n;\n  int    iseed[4] = {1,1,1,1};\n  double *randvec;\n\n  double isleft, isright, spdiam;\n  double sigma, s1, s2;\n  int    sgndef, cnt, negcnt_lft, negcnt_rgt;\n  double tau;\n\n  int    jtry, off_L, off_invD;\n  double Dpivot, Dmax;\n  bool   noREP;\n\n  int   info, i, j;\n  int   IONE = 1, ITWO = 2;\n  double tmp, tmp1, tmp2;\n  double gl, gu;\n\n  /* Set tolerance parameters (need to be same as in refine function) */\n  rtl    = sqrt(DBL_EPSILON);\n  \n  /* Allocate workspace */\n  randvec = (double *) malloc( 2*n * sizeof(double) );\n  assert(randvec != NULL);\n\n  /* create random vector to perturb rrr and broadcast it */\n  odrnv(&ITWO, iseed, &two_n, randvec);\n  \n  /* store shift of initial RRR, here set to zero */\n  E[n-1] = 0.0;\n\n  /* find outer bounds GL, GU for block and spectral diameter */\n  gl = D[0];\n  gu = D[0];\n  for (i = 0; i < n; i++) {\n    gl = fmin(gl, gersch[2*i]  );\n    gu = fmax(gu, gersch[2*i+1]);\n  }\n  spdiam = gu - gl;\n  \n  /* find approximation of extremal eigenvalues of the block\n   * odrrk computes one eigenvalue of tridiagonal matrix T\n   * tmp1 and tmp2 one hold the eigenvalue and error, respectively */\n  odrrk(&n, &IONE, &gl, &gu, D, E2,\n        &pivmin, &rtl, &tmp1, &tmp2, &info);\n  assert(info == 0);  /* if info=-1 => eigenvalue did not converge */\n    \n  isleft = fmax(gl, tmp1-tmp2 - HUNDRED*DBL_EPSILON*fabs(tmp1-tmp2) );\n    \n  odrrk(&n, &n, &gl, &gu, D, E2, &pivmin, &rtl, &tmp1, &tmp2, &info);\n  assert(info == 0);  /* if info=-1 => eigenvalue did not converge */\n    \n  isright = fmin(gu, tmp1+tmp2 + HUNDRED*DBL_EPSILON*fabs(tmp1+tmp2) );\n  \n  spdiam = isright - isleft;\n  \n  /* compute negcount at points s1 and s2 */\n  s1 = isleft  + HALF   * spdiam;\n  s2 = isright - FOURTH * spdiam;  /* not needed currently */\n\n  /* compute negcount at points s1 and s2 */\n  /* cnt = number of eigenvalues in (s1,s2] = count_right - count_left\n   * negcnt_lft = number of eigenvalues smaller equals than s1\n   * negcnt_rgt = number of eigenvalues smaller equals than s2 */\n  odrrc(\"T\", &n, &s1, &s2, D, E, &pivmin,\n        &cnt, &negcnt_lft, &negcnt_rgt, &info);\n  assert(info == 0);\n  \n  /* if more of the desired eigenvectors are in the left part shift left\n   * and the other way around */\n  if ( negcnt_lft >= n - negcnt_lft ) {\n    /* shift left */\n    sigma = isleft;\n    sgndef = ONE;\n  } else {\n    /* shift right */\n    sigma = isright;\n    sgndef = -ONE;\n  }\n\n  /* define increment to perturb initial shift to find RRR\n   * with not too much element growth */\n  tau = spdiam*DBL_EPSILON*n + 2.0*pivmin;\n\n\n  /* try to find initial RRR of block:\n   * need work space of 3*n here to store D, L, D^-1 of possible\n   * representation:\n   * D_try      = work[0  :  n-1]\n   * L_try      = work[n  :2*n-1]\n   * inv(D_try) = work[2*n:3*n-1] */\n\n  off_L    = n;\n  off_invD = 2*n;\n    \n  for (jtry = 0; jtry < MAX_TRY_RRR; jtry++) {\n\n    Dpivot  = D[0] - sigma;\n    work[0] = Dpivot;\n    Dmax    = fabs( work[0] );\n    j = 0;\n\n    for (i = 0; i < n-1; i++) {\n      work[i+off_invD] = 1.0 / work[i];\n      tmp = E[j] * work[i+off_invD];\n      work[i+off_L] = tmp;\n      Dpivot = (D[j+1] - sigma) - tmp*E[j];\n      work[i+1] = Dpivot;\n      Dmax = fmax(Dmax, fabs(Dpivot) );\n      j++;\n    }\n      \n    /* except representation only if not too much element growth */\n    if (Dmax > MAX_GROWTH*spdiam) {\n      noREP = true;\n    } else {\n      noREP = false;\n    }\n      \n    if (noREP == true) {\n      /* if all eigenvalues are desired shift is made definite to use DQDS\n       * so we should not end here */\n      if (jtry == MAX_TRY_RRR-2) {\n\tif (sgndef == ONE) { /* floating point comparison okay here */\n\t  sigma = gl - FUDGE_FACTOR*spdiam*DBL_EPSILON*n\n\t    - FUDGE_FACTOR*2.0*pivmin;\n\t} else {\n\t  sigma = gu + FUDGE_FACTOR*spdiam*DBL_EPSILON*n\n\t    + FUDGE_FACTOR*2.0*pivmin;\n\t}\n      } else if (jtry == MAX_TRY_RRR-1) {\n\tfprintf(stderr,\"No initial representation could be found.\\n\");\n\texit(3);\n      } else {\n\tsigma -= sgndef*tau;\n\ttau   *= 2.0;\n\tcontinue;\n      }\n    } else {   /* found representation */\n      break;\n    }\n  }\n  /* end trying to find initial RRR of block */\n\n  /* save initial RRR and corresponding shift */\n  memcpy(D, &work[0],  n    * sizeof(double) );\n  memcpy(E, &work[n], (n-1) * sizeof(double) );\n  E[n-1] = sigma;\n  /* work[0:4*n-1] can now be used again for anything */\n\n  /* perturb root rrr by small relative amount, first make sure\n   * that at least two values are actually disturbed enough,\n   * which might not be necessary */\n  while( fabs(randvec[0])*RAND_FACTOR < 1.0 )\n    randvec[0] *= 2.0;\n  while( fabs(randvec[n-1])  *RAND_FACTOR < 1.0 )\n    randvec[n-1]   *= 2.0;\n\n  for (i=0; i<n-1; i++) {\n    D[i] *= 1.0 + DBL_EPSILON*RAND_FACTOR*randvec[i];\n    E[i] *= 1.0 + DBL_EPSILON*RAND_FACTOR*randvec[i+n];\n  }\n  D[n-1] *= 1.0 + DBL_EPSILON*RAND_FACTOR*randvec[n-1];\n\n  /* clean up */\n  free(randvec);\n\n  return(0);\n}\n\n\n\n\nstatic \nint eigval_refine_proc(proc_t *procinfo, int ifirst, int ilast, \n\t\t\t   int n, double *D, double *E, double *E2,  \n\t\t\t   int *Windex, int *iblock, double *gersch, tol_t *tolstruct, \n\t\t\t   double *W, double *Werr, double *Wgap, double *work,\n\t\t\t   int *iwork)\n{\n  /* Input parameter */\n  int              pid = procinfo->pid;\n  int              isize        = ilast-ifirst+1;\n  double       pivmin       = tolstruct->pivmin;\n\n  /* double gl, gu, wl, wu; */\n  double gl, gu;\n\n  /* Multithreading */\n  int            nthreads;\n  int              max_nthreads = procinfo->nthreads;\n  int            iifirst, iilast, chunk;\n  pthread_t      *threads;\n  pthread_attr_t attr;\n  auxarg2_t      *auxarg2;\n  void           *status;\n\n  /* Others */\n  int    nsplit, *isplit;\n  double spdiam;\n  int    i_low, i_upp;\n  double sigma;\n\n  int    off_DE2, offset;\n  int    rf_begin, rf_end;\n\n  int    info, i;\n\n  /* Allocate space */\n  threads = (pthread_t *) malloc( max_nthreads * sizeof(pthread_t) );\n  assert(threads != NULL);\n  isplit = (int *) malloc( n * sizeof(int) );\n  assert(isplit != NULL);\n\n  /* This is an unreduced block */\n  nsplit = 1;\n  isplit[0] = n;\n  \n  /* Prepare multi-threading */\n  if (max_nthreads > 1) {\n    pthread_attr_init(&attr);\n    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);\n    pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);\n  }\n\n  /* find outer bounds GL, GU for block and spectral diameter */\n  gl = D[0];\n  gu = D[0];\n  for (i = 0; i < n; i++) {\n    gl = fmin(gl, gersch[2*i]  );\n    gu = fmax(gu, gersch[2*i+1]);\n  }\n  spdiam = gu - gl;\n\n  /* REFINE EIGENVALUES i_low:i_upp WITH REPECT TO RRR */\n  \n  i_low = Windex[0];\n  i_upp = Windex[isize-1];\n  sigma = E[n-1];\n\n  /* calculate gaps */\n  for (i=0; i<isize-1; i++) {\n    Wgap[i] = fmax(0.0, (W[i+1] - Werr[i+1]) - (W[i] + Werr[i]) );\n  }\n  Wgap[isize-1] = fmax(0.0, gu - (W[isize-1] + Werr[isize-1]) );\n    \n  /* shift eigenvalues to be consistent with dqds\n   * and compute eigenvalues of SHIFTED matrix */\n  for (i=0; i<isize; i++) {\n    W[i]    -= sigma;\n    Werr[i] += fabs(W[i])*DBL_EPSILON;\n  }\n\n  /* work  for sequential odrrb = work[0:2*n-1]\n   * iwork for sequential odrrb = iwork[0:2*n-1]\n   * DE2 = work[2*n:3*n-1] strting at bl_begin */\n  off_DE2 = 2*n;\n    \n  /* compute DE2 at store it in work[bl_begin+2*n:bl_end-1+2*n] */\n  for (i=0; i<n; i++) {\n    work[i+off_DE2] = D[i]*E[i]*E[i];\n  }\n    \n  nthreads = max_nthreads;\n  while (nthreads > 1 && isize/nthreads < 2) {\n    nthreads--;\n  }\n\n  if (nthreads > 1) {\n\n    rf_begin = 0;\n    chunk    = isize / nthreads;\n    for (i=1; i<nthreads; i++) {\n      \n      rf_end = rf_begin + chunk - 1;\n            \n      auxarg2 = create_auxarg2(n, D,\n\t\t\t       &work[off_DE2],\n\t\t\t       rf_begin, rf_end, W, Werr, Wgap, Windex,\n\t\t\t       tolstruct->rtol1, tolstruct->rtol2,\n\t\t\t       pivmin, spdiam);\n      \n      info = pthread_create(&threads[i], &attr,\n  \t\t\t      eigval_subset_thread_r,\n\t\t\t    (void *) auxarg2);\n      assert(info == 0);\n      \n      rf_begin = rf_end + 1;\n    }\n    rf_end = isize-1;\n\n    auxarg2 = create_auxarg2(n, D,\n\t\t\t     &work[off_DE2],\n\t\t\t     rf_begin, rf_end, W, Werr, Wgap, Windex,\n\t\t\t     tolstruct->rtol1, tolstruct->rtol2,\n\t\t\t     pivmin, spdiam);\n      \n    status = eigval_subset_thread_r( (void *) auxarg2 );\n    assert(status == NULL);\n    \n    /* join threads */\n    for (i=1; i<nthreads; i++) {\n      info = pthread_join(threads[i], &status);\n      assert(info == 0 && status == NULL);\n    }\n    /* should update gaps at splitting points here, but the gaps\n     * will be recomputed anyway */\n      \n  } else {\n    \n    offset = i_low-1;\n    \n    /* refine eigenvalues found by odrrb for i_low:i_upp */\n    odrrb(&n, D, &work[off_DE2], &i_low,\n\t  &i_upp, &tolstruct->rtol1, &tolstruct->rtol2, &offset, W, Wgap, \n\t  Werr, work, iwork, &pivmin, &spdiam, &n, &info);\n    assert(info == 0);\n    /* needs work of dim(2*n) and iwork of dim(2*n) */\n  }\n  /* odrrb computes gaps correctly, but not last one;\n   * this is ignored since the gaps are recomputed anyway */\n  \n  /* clean up */\n  free(threads);\n  free(isplit);\n  \n  if (max_nthreads > 1) {\n    pthread_attr_destroy(&attr);\n  }\n  \n  return(0);\n}\n\n\n\n\nstatic \nvoid *eigval_subset_thread_a(void *argin)\n{\n  /* from input argument */\n  int    n, il, iu, my_il, my_iu;\n  double *D, *E, *E2, *gersch;\n  double bsrtol, pivmin;\n  int    nsplit, *isplit;\n\n  /* others */\n  int    info;\n  double dummy1, dummy2;\n  int    num_vals;\n  double *W_tmp, *Werr_tmp, *W, *Werr;\n  int    *iblock_tmp, *Windex_tmp, *iblock, *Windex;\n  double *work;\n  int    *iwork;\n  \n  retrieve_auxarg1((auxarg1_t *) argin, &n, &D, &E, &E2,\n\t\t   &il, &iu, &my_il, &my_iu, &nsplit,\n\t\t   &isplit, &bsrtol, &pivmin, &gersch,\n\t\t   &W, &Werr, &Windex, &iblock);\n\n  /* allocate memory */\n  W_tmp = (double *) malloc( n * sizeof(double) );\n  assert(W_tmp != NULL);\n  \n  Werr_tmp = (double *) malloc( n * sizeof(double) );\n  assert(Werr_tmp != NULL);\n  \n  Windex_tmp = (int *) malloc( n * sizeof(int) );\n  assert(Windex_tmp != NULL);\n\n  iblock_tmp = (int *) malloc( n * sizeof(int) );\n  assert(iblock_tmp != NULL);\n\n  work  = (double *) malloc( 4*n * sizeof(double) );\n  assert (work != NULL);\n\n  iwork = (int *) malloc( 3*n * sizeof(int) );\n  assert (iwork != NULL);\n\n  /* compute eigenvalues 'my_il' to 'my_iu', put into temporary arrays */\n  odrrd(\"I\", \"B\", &n, &dummy1, &dummy2, &my_il, &my_iu, gersch,\n        &bsrtol, D, E, E2, &pivmin, &nsplit, isplit, &num_vals,\n        W_tmp, Werr_tmp, &dummy1, &dummy2, iblock_tmp, Windex_tmp,\n        work, iwork, &info);\n\n  assert(info == 0);\n\n  /* copy computed values in W, Werr, Windex, iblock (which are work space) */\n  memcpy(&W[my_il-il],      W_tmp,      num_vals * sizeof(double) );\n  memcpy(&Werr[my_il-il],   Werr_tmp,   num_vals * sizeof(double) );\n  memcpy(&Windex[my_il-il], Windex_tmp, num_vals * sizeof(int)    );\n  memcpy(&iblock[my_il-il], iblock_tmp, num_vals * sizeof(int)    );\n  \n  free(W_tmp);\n  free(Werr_tmp);\n  free(Windex_tmp);\n  free(iblock_tmp);\n  free(work);\n  free(iwork);\n\n  return(NULL);\n}\n\n\n\n\nstatic \nauxarg1_t *create_auxarg1(int n, double *D, double *E, double *E2,\n\t\t\t  int il, int iu, int my_il, int my_iu, \n\t\t\t  int nsplit, int *isplit, double bsrtol, \n\t\t\t  double pivmin, double *gersch, double *W, \n\t\t\t  double *Werr, int *Windex, int *iblock)\n{\n  auxarg1_t *arg;\n\n  arg = (auxarg1_t *) malloc( sizeof(auxarg1_t) );\n  assert(arg != NULL);\n\n  arg->n       = n;\n  arg->D       = D;\n  arg->E       = E;\n  arg->E2      = E2;\n  arg->il      = il;\n  arg->iu      = iu;\n  arg->my_il   = my_il;\n  arg->my_iu   = my_iu;\n  arg->nsplit  = nsplit;\n  arg->isplit  = isplit;\n  arg->bsrtol  = bsrtol;\n  arg->pivmin  = pivmin;\n  arg->gersch  = gersch;\n  arg->W       = W;\n  arg->Werr    = Werr;\n  arg->Windex  = Windex;\n  arg->iblock  = iblock;\n\n  return(arg);\n}\n\n\n\n\nstatic \nvoid retrieve_auxarg1(auxarg1_t *arg, int *n, double **D, double **E,\n\t\t      double **E2, int *il, int *iu, int *my_il, \n\t\t      int *my_iu, int *nsplit, int **isplit, \n\t\t      double *bsrtol, double *pivmin, double **gersch, \n\t\t      double **W, double **Werr, int **Windex, \n\t\t      int **iblock)\n{\n  *n      = arg->n;\n  *D      = arg->D;\n  *E      = arg->E;\n  *E2     = arg->E2;\n  *il     = arg->il;\n  *iu     = arg->iu;\n  *my_il  = arg->my_il;\n  *my_iu  = arg->my_iu;\n  *nsplit = arg->nsplit;\n  *isplit = arg->isplit;\n  *bsrtol = arg->bsrtol;\n  *pivmin = arg->pivmin;\n  *gersch = arg->gersch;\n  *W      = arg->W;\n  *Werr   = arg->Werr;\n  *Windex = arg->Windex;\n  *iblock = arg->iblock;\n\n  free(arg);\n}\n\n\n\n\nstatic \nvoid *eigval_subset_thread_r(void *argin)\n{\n  /* from input argument */\n  int          bl_size, rf_begin, rf_end;\n  double       *D, *DE2;\n  double       rtol1, rtol2, pivmin;\n  double       bl_spdiam;\n  val_t        *Wstruct;\n\n  /* others */\n  int          info, offset;\n  double       *W, *Werr, *Wgap;\n  int          *Windex;\n  double       *work;\n  int          *iwork;\n\n  retrieve_auxarg2((auxarg2_t *) argin, &bl_size, &D, &DE2,\n\t\t   &rf_begin, &rf_end, &W, &Werr, &Wgap, &Windex, &rtol1, &rtol2,\n\t\t   &pivmin, &bl_spdiam);\n\n  /* malloc work space */\n  work = (double *) malloc( 2*bl_size * sizeof(double) );\n  assert(work != NULL);\n  \n  iwork = (int *)   malloc( 2*bl_size * sizeof(int) );\n  assert(iwork != NULL);\n\n  /* special case of only one eigenvalue */\n  if (rf_begin == rf_end)\n    Wgap[rf_begin] = 0.0;\n \n  offset = Windex[rf_begin] - 1;\n  \n  /* call bisection routine to refine the eigenvalues */\n  odrrb(&bl_size, D, DE2, &Windex[rf_begin], &Windex[rf_end],\n        &rtol1, &rtol2, &offset, &W[rf_begin], &Wgap[rf_begin],\n        &Werr[rf_begin], work, iwork, &pivmin, &bl_spdiam,\n        &bl_size, &info);\n  assert(info == 0);\n\n  /* clean up */\n  free(work);\n  free(iwork);\n\n  return(NULL);\n}\n\n\n\n\nstatic \nauxarg2_t *create_auxarg2(int bl_size, double *D, double *DE2,\n\t\t\t  int rf_begin, int rf_end, double *W, double *Werr,\n\t\t\t  double *Wgap, int *Windex,    \n\t\t\t  double rtol1, double rtol2, double pivmin, \n\t\t\t  double bl_spdiam)\n{\n  auxarg2_t *arg;\n\n  arg = (auxarg2_t *) malloc( sizeof(auxarg2_t) );\n  assert(arg != NULL);\n\n  arg->bl_size   = bl_size;\n  arg->D         = D;\n  arg->DE2       = DE2;\n  arg->rf_begin  = rf_begin;\n  arg->rf_end    = rf_end;\n  arg->W   = W;\n  arg->Werr   = Werr;\n  arg->Wgap   = Wgap;\n  arg->Windex   = Windex;\n  arg->rtol1     = rtol1;\n  arg->rtol2     = rtol2;\n  arg->pivmin    = pivmin;\n  arg->bl_spdiam = bl_spdiam;\n\n  return(arg);\n}\n\n\n\n\nstatic \nvoid retrieve_auxarg2(auxarg2_t *arg, int *bl_size, double **D,\n\t\t      double **DE2, int *rf_begin, int *rf_end,\n\t\t      double **W, double **Werr, double **Wgap, int **Windex, \n\t\t      double *rtol1, double *rtol2,\n\t\t      double *pivmin, double *bl_spdiam)\n{\n  *bl_size   = arg->bl_size;\n  *D         = arg->D;\n  *DE2       = arg->DE2;\n  *rf_begin  = arg->rf_begin;\n  *rf_end    = arg->rf_end;\n  *W   = arg->W;\n  *Werr   = arg->Werr;\n  *Wgap   = arg->Wgap;\n  *Windex   = arg->Windex;\n  *rtol1     = arg->rtol1;\n  *rtol2     = arg->rtol2;\n  *pivmin    = arg->pivmin;\n  *bl_spdiam = arg->bl_spdiam;\n\n  free(arg);\n}\n\n\n\n/*\n * Compare function for using qsort() on an array\n * of doubles\n */\nstatic \nint cmp(const void *a1, const void *a2)\n{\n  double arg1 = *(double *)a1;\n  double arg2 = *(double *)a2;\n\n  if (arg1 < arg2)\n    return(-1);\n  else\n    return(1);\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/plarrv.c",
    "content": "/* Parallel computation of eigenvectors and symmetric tridiagonal \n * matrix T, which is preprocessed by the routine 'plarre'.\n *\n * Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <assert.h>\n#include <pthread.h>\n#include \"mpi.h\"\n#include \"pmrrr.h\"\n#include \"plarrv.h\"\n#include \"process_task.h\"\n#include \"global.h\"\n#include \"rrr.h\"\n#include \"queue.h\"\n#include \"structs.h\"\n#include \"counter.h\"\n\n\nstatic int assign_to_proc(proc_t *procinfo, in_t *Dstruct,\n\t\t\t  val_t *Wstruct, vec_t *Zstruct, int *nzp,\n\t\t\t  int *myfirstp);\nstatic int cmpa(const void*, const void*);\nstatic int init_workQ(proc_t *procinfo, in_t *Dstruct,\n\t\t\t   val_t *Wstruct, int *nzp,\n\t\t\t   workQ_t *workQ);\nstatic void *empty_workQ(void*);\nstatic workQ_t *create_workQ();\nstatic void destroy_workQ(workQ_t*);\nstatic auxarg3_t *create_auxarg3(int, proc_t*, val_t*, vec_t*,\n\t\t\t\t tol_t*, workQ_t*, counter_t*);\nstatic void retrieve_auxarg3(auxarg3_t*, int*, proc_t**, val_t**,\n\t\t\t     vec_t**, tol_t**, workQ_t**, \n\t\t\t     counter_t**);\n\n\n\n/*\n * Computation of eigenvectors of a symmetric tridiagonal\n */\nint plarrv(proc_t *procinfo, in_t *Dstruct, val_t *Wstruct,\n\t   vec_t *Zstruct, tol_t *tolstruct, int *nzp,\n\t   int *myfirstp)\n{\n  /* Input variables */\n  int            pid     = procinfo->pid;\n  int            nthreads = procinfo->nthreads;\n  int            n        = Dstruct->n;\n  double         *W       = Wstruct->W;\n\n  /* Work space */\n  double         *Wshifted;\n \n  /* Multi-threading */\n  pthread_t      *threads;   \n  pthread_attr_t attr;\n  void           *status;\n  auxarg3_t      *auxarg;\n  counter_t      *num_left;\n  \n  /* Others */\n  int            info, i;\n  workQ_t        *workQ;\n\n\n  /* Allocate work space and copy eigenvalues */\n  Wshifted = (double *) malloc( n * sizeof(double) );\n  assert(Wshifted != NULL);\n\n  memcpy(Wshifted, W, n*sizeof(double));\n  Wstruct->Wshifted = Wshifted;\n\n  threads = (pthread_t *) malloc(nthreads * sizeof(pthread_t));\n  assert(threads != NULL);\n\n  /* Assign eigenvectors to processes */\n  assign_to_proc(procinfo, Dstruct, Wstruct, Zstruct, nzp,\n\t\t            myfirstp);\n\n  /* Create work queue Q, counter, threads to empty Q */\n  workQ    = create_workQ( );\n  num_left = PMR_create_counter(*nzp);\n\n  threads[0] = pthread_self();\n  pthread_attr_init(&attr);\n  pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);\n  pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); \n\n  for (i=1; i<nthreads; i++) {\n    auxarg = create_auxarg3(i, procinfo, Wstruct, Zstruct, tolstruct,\n\t\t\t    workQ, num_left);\n    info = pthread_create(&threads[i], &attr, empty_workQ, \n\t\t\t  (void *) auxarg);\n    assert(info == 0);\n  }\n\n  /* Initialize work queue of process */\n  info = init_workQ(procinfo, Dstruct, Wstruct, nzp, workQ);\n  assert(info == 0);\n\n  /* Empty the work queue */\n  auxarg = create_auxarg3(0, procinfo, Wstruct, Zstruct, tolstruct,\n\t\t\t  workQ, num_left);\n  status = empty_workQ((void *) auxarg);\n  assert(status == NULL);\n\n  /* Join all the worker thread */\n  for (i=1; i<nthreads; i++) {\n    info = pthread_join(threads[i], &status);\n    assert(info == 0 && status == NULL);\n  }\n\n  /* Clean up */\n  free(Wshifted);\n  free(threads);\n  pthread_attr_destroy(&attr);\n  destroy_workQ(workQ);\n  PMR_destroy_counter(num_left);\n\n  return(0);\n}\n\n\n\n\n/* \n * Assign the computation of eigenvectors to the processes\n */\nstatic  \nint assign_to_proc(proc_t *procinfo, in_t *Dstruct, val_t *Wstruct,\n\t\t   vec_t *Zstruct, int *nzp, int *myfirstp)\n{\n  /* From inputs */\n  int              pid     = procinfo->pid;\n  int              nproc   = procinfo->nproc;\n  double *restrict L       = Dstruct->E;\n  int    *restrict isplit  = Dstruct->isplit;\n  int              n       = Wstruct->n;\n  int              il      = *(Wstruct->il);\n  int              iu      = *(Wstruct->iu);\n  double *restrict W       = Wstruct->W;\n  int    *restrict Windex  = Wstruct->Windex;\n  int    *restrict iblock  = Wstruct->iblock;\n  int    *restrict iproc   = Wstruct->iproc;\n  int    *restrict Zindex  = Zstruct->Zindex;\n  \n  /* Others */\n  int               i, id, j, k, isize, iblk, ishift,\n                    ibegin, iend, chunk, ind;\n  double            sigma;\n  sort_struct_t     *array;\n\n  array = (sort_struct_t *) malloc(n*sizeof(sort_struct_t));\n  \n  for (i=0; i<n; i++) {\n    /* Find shift of block */\n    iblk                    = iblock[i];\n    ishift                  = isplit[iblk-1] - 1;\n    sigma                   = L[ishift];\n    /* Apply shift so that unshifted eigenvalues can be sorted */\n    array[i].lambda    = W[i] + sigma; \n    array[i].local_ind = Windex[i];\n    array[i].block_ind = iblk;\n    array[i].ind       = i;\n  }\n  /* Alternatively could sort list of pointers, which\n     requires less data copying */\n\n  qsort(array, n, sizeof(sort_struct_t), cmpa);\n\n  /* Mark eigenvectors that do not need to be computed */\n  for (j = 0; j < il-1; j++ ) {\n    ind = array[j].ind;\n    iproc[ind]  = -1;\n    Zindex[ind] = -1;\n  }\n\n  isize = iu - il + 1;\n\n  ibegin = il - 1;\n  for (id=0; id<nproc; id++) {\n\n    chunk = imax(1, isize/nproc + (id < isize%nproc));\n    \n    if (id==nproc-1) {\n      iend = iu - 1;\n    } else {\n      iend = ibegin + chunk - 1;\n      iend = imin(iend, iu -1);\n    }\n\n    k = 0;\n    for (j=ibegin; j<=iend; j++) {\n      ind = array[j].ind;\n      iproc[ind]  = id;\n      Zindex[ind] = k;\n      k++;\n    }\n\n    if (id == pid) {\n      *myfirstp   = ibegin - il + 1;\n      *nzp        = iend - ibegin + 1;\n      Zstruct->nz = *nzp; \n    }\n\n    ibegin = iend + 1;\n    ibegin = imin(ibegin, iu);\n  } /* end id */\n\n  for (j = iend+1; j < n; j++ ) {\n    ind = array[j].ind;\n    iproc[ind]  = -1;\n    Zindex[ind] = -1;\n  }\n  \n  free(array);\n  return(0);\n}\n\n\n\n\n/* \n * Compare function for using qsort() on an array of \n * sort_structs\n */\nstatic \nint cmpa(const void *a1, const void *a2)\n{\n  sort_struct_t *arg1, *arg2;\n\n  arg1 = (sort_struct_t *) a1;\n  arg2 = (sort_struct_t *) a2;\n\n  /* Within block local index decides */\n  if (arg1->block_ind == arg2->block_ind) {\n    return (arg1->local_ind - arg2->local_ind);\n  } else {\n    if (arg1->lambda < arg2->lambda) {\n      return(-1);\n    } else if (arg1->lambda > arg2->lambda) {\n      return(1);\n    } else {\n      if (arg1->local_ind < arg2->local_ind)\n\treturn(-1);\n      else\n\treturn(1);\n    }\n  }\n}\n\n\n\n\n/*\n * Initialize work queue by putting all tasks for the process\n * into the work queue.\n */\nstatic \nint init_workQ(proc_t *procinfo, in_t *Dstruct, val_t *Wstruct,\n\t       int *nzp, workQ_t *workQ)\n{\n  /* Input arguments */\n  int              pid      = procinfo->pid;\n  int              nproc    = procinfo->nproc;\n  int              nthreads = procinfo->nthreads;\n  double *restrict D        = Dstruct->D;\n  double *restrict L        = Dstruct->E;\n  int              nsplit   = Dstruct->nsplit;\n  int    *restrict isplit   = Dstruct->isplit;\n  double *restrict W        = Wstruct->W;\n  double *restrict Werr     = Wstruct->Werr;\n  double *restrict Wgap     = Wstruct->Wgap;\n  int    *restrict iproc    = Wstruct->iproc;\n  double *restrict Wshifted = Wstruct->Wshifted;\n  double *restrict gersch   = Wstruct->gersch;\n  int              nz       = *nzp;\n\n  /* Loop over blocks */\n  int              ibegin, iend, isize, iWbegin, iWend, nbl;\n  double           sigma, gl, gu, avggap, spdiam;\n  double *restrict DL;\n  double *restrict DLL;\n  rrr_t            *RRR, *RRR_parent;\n\n  /* Splitting into singletons and cluster */\n  int              new_first, new_last, new_size;\n  int              sn_first,  sn_last,  sn_size;\n  int              cl_first,  cl_last,  cl_size;\n  bool             task_inserted;\n  int              max_size, left_pid, right_pid;\n  double           lgap;\n \n  /* Others */\n  int              i, j, k, l;\n  double           tmp;\n  task_t           *task;\n\n  /* Loop over blocks */\n  ibegin  = 0;\n  for ( j=0; j<nsplit; j++ ) {\n\n    iend   = isplit[j] - 1;\n    isize  = iend - ibegin + 1;\n    sigma  = L[iend];\n\n    /* Use Gerschgorin disks to find spectral diameter */\n    gl = gersch[2*ibegin    ];\n    gu = gersch[2*ibegin + 1];\n    for (i=ibegin+1; i<iend; i++) {\n      gl = fmin(gl, gersch[2*i    ]);\n      gu = fmax(gu, gersch[2*i + 1]);\n    }\n    spdiam = gu - gl;\n    avggap = spdiam / (isize-1);\n\n    /* Find eigenvalues in block */\n    nbl = 0;\n    iWbegin = iend   + 1;\n    iWend   = ibegin - 1;\n    for (i=ibegin; i<=iend; i++) {\n      if (nbl == 0 && iproc[i] == pid) {\n\tiWbegin = i;\n\tiWend   = i;\n\tnbl++;\n\tk = i+1;\n\twhile (k <=iend && iproc[k] == pid) {\n\t  iWend++;\n\t  nbl++;\n\t  k++;\n\t}\n\t/* iWend = iWbegin + nbl - 1; instead of incrementing in loop */\n      }\n    }\n\n    /* If no eigenvalues for process in block continue */\n    if (nbl == 0) {\n      ibegin = iend + 1;\n      continue;\n    }\n\n    /* Compute DL and DLL for later computation of singletons\n     * (freed when all singletons of root are computed) */\n    DL  = (double *) malloc(isize * sizeof(double));\n    assert(DL != NULL);\n    \n    DLL = (double *) malloc(isize * sizeof(double));\n    assert(DLL != NULL);\n\n    for (i=0; i<isize-1; i++) {\n      tmp    = D[i+ibegin]*L[i+ibegin];\n      DL[i]  = tmp;\n      DLL[i] = tmp*L[i+ibegin];\n    }\n\n    RRR = PMR_create_rrr(&D[ibegin], &L[ibegin], DL, DLL, isize, 0);\n    PMR_increment_rrr_dependencies(RRR);\n    \n    /* In W apply shift of current block to eigenvalues\n     * to get unshifted values w.r.t. T */\n    for (i=ibegin; i<=iend; i++) {\n      W[i] += sigma;\n    }\n\n    /* Split eigenvalues of block into singletons and clusters\n     * and add them to process work queue */\n    max_size = imax(1, nz/nthreads);\n    task_inserted = false;\n    new_first = ibegin;\n    for (i=ibegin; i<=iend; i++) {    \n\n      if (i == iend)\n\tnew_last = i;\n      else if (Wgap[i] >= MIN_RELGAP*fabs(Wshifted[i]))\n\tnew_last = i;\n      else\n\tcontinue;\n\n      /* Skip rest if no eigenvalues of process */\n      if (new_first > iWend || new_last < iWbegin) {\n\tnew_first = i + 1;\n\tcontinue;\n      }\n\n      new_size = new_last - new_first + 1;\n      \n      if (new_size == 1) {\n\t/* Singleton was found */\n\t\n\tif (new_first < iWbegin || new_first > iWend) {\n\t  new_first = i + 1;\n\t  continue;\n\t} else {\n\t  if (new_first==iWbegin || task_inserted==true) {\n\t    /* Initialize new singleton task */\n\t    sn_first = new_first;\n\t    sn_last  = new_first;\n\t    sn_size  = 1;\n\t  } else {\n\t    /* Extend singleton task by one */\n\t    sn_last++;\n\t    sn_size++;\n\t  }\n\t}\n\n\t/* Insert task if ... */\n\tif (i==iWend || sn_size>=max_size ||\n\t    Wgap[i+1] < MIN_RELGAP*fabs(Wshifted[i+1])) {\n\n\t  if (sn_first == ibegin) {\n\t    lgap = fmax(0.0, W[ibegin] - Werr[ibegin] - gl );\n\t  } else {\n\t    lgap = Wgap[sn_first-1];\n\t  }\n\n\t  PMR_increment_rrr_dependencies(RRR);\n\n\t  task = PMR_create_s_task(sn_first, sn_last, 1, ibegin, \n\t\t\t\t   iend, spdiam, lgap, RRR);\n\t  \n \t  PMR_insert_task_at_back(workQ->s_queue, task);\n\t  \n\t  task_inserted = true;\n\t} else {\n\t  task_inserted = false;\n\t}\n\n      } else {\n\t/* Cluster was found */\n\n\tcl_first = new_first;\n\tcl_last  = new_last;\n\tcl_size  = new_size;\n\n\t/* Split cluster into clusters by absolut criterion */\n\tif (cl_size > 3) {\n\n\t  /* Split cluster to smaller clusters [cl_first:cl_last] */\n\t  for (k=new_first+1; k<new_last; k++) {\n\n\t    if (k == new_last-1)\n\t      cl_last = new_last;\n\t    else if (k != cl_first && Wgap[k] > 0.8*avggap)\n\t      cl_last = k;\n\t    else\n\t      continue;\n\n\t    /* Skip cluster if no eigenvalues of process in it */\n\t    if (cl_last < iWbegin || cl_first > iWend) {\n\t      cl_first = k + 1;\n\t      continue;\n\t    }\n\n\t    /* Record left gap of cluster */\n\t    if (cl_first == ibegin) {\n\t      lgap = fmax(0.0, W[ibegin] - Werr[ibegin] - gl);\n\t    } else {\n\t      lgap = Wgap[cl_first-1];\n\t    }\n\n\t    /* Determine processes involved in processing the cluster */\n\t    left_pid  = nproc-1;\n\t    right_pid = 0;\n\t    for (l=cl_first; l<=cl_last; l++) {\n\t      if (iproc[l] != -1) {\n\t\tleft_pid  = imin(left_pid,  iproc[l]);\n\t\tright_pid = imax(right_pid, iproc[l]);\n\t      }\n\t    }\n\n\t    RRR_parent = PMR_create_rrr(&D[ibegin], &L[ibegin], \n\t\t\t\t\tNULL, NULL, isize, 0);\n\n\t    task = PMR_create_c_task(cl_first, cl_last, 1, ibegin, \n\t\t\t\t     iend, spdiam, lgap, iWbegin, \n\t\t\t\t     iWend, left_pid, right_pid, \n\t\t\t\t     RRR_parent);\n\n\t    /* Insert task into queue, depending if cluster need\n\t     * communication with other processes */\n\t    if (left_pid != right_pid)\n\t      PMR_insert_task_at_back(workQ->r_queue, task);\n\t    else\n\t      PMR_insert_task_at_back(workQ->c_queue, task);\n\t    \n\t    cl_first = k + 1;\n\t  } /* end k */\n\n\t} else {\n\t  /* Cluster is too small to split, so insert it to queue */\n\n\t  /* Record left gap of cluster */\n\t  if (cl_first == ibegin) {\n\t    lgap = fmax(0.0, W[ibegin] - Werr[ibegin] - gl );\n\t  } else {\n\t    lgap = Wgap[cl_first-1];\n\t  }\n\n\t  /* Determine processes involved */\n\t  left_pid  = nproc-1;\n\t  right_pid = 0;\n\t  for (l=cl_first; l<=cl_last; l++) {\n\t    if (iproc[l] != -1) {\n\t      left_pid  = imin(left_pid,  iproc[l]);\n\t      right_pid = imax(right_pid, iproc[l]);\n\t    }\n\t  }\n\n\t  RRR_parent = PMR_create_rrr(&D[ibegin], &L[ibegin], \n\t\t\t\t      NULL, NULL, isize, 0);\n\n\t  task = PMR_create_c_task(cl_first, cl_last, 1, ibegin, \n\t\t\t\t   iend, spdiam, lgap, iWbegin, iWend,\n\t\t\t\t   left_pid, right_pid, RRR_parent);\n\n\t  /* Insert task into queue, depending if cluster need\n\t   * communication with other processes */\n\t  if (left_pid != right_pid)\n\t    PMR_insert_task_at_back(workQ->r_queue, task);\n\t  else\n\t    PMR_insert_task_at_back(workQ->c_queue, task);\n\t  \n\t}\n\ttask_inserted = true;\n\n      } /* end new_size */\n\n      new_first = i + 1;\n    } /* end of splitting eigenvalues into tasks */\n\n    /* Set flag in RRR that last singleton is created */\n    PMR_set_parent_processed_flag(RRR);\n    PMR_try_destroy_rrr(RRR);\n\n    ibegin = iend + 1;\n  } /* end loop over blocks */ \n\n  return(0);\n}\n\n\n\n\n/*\n * Processes all the tasks put in the work queue.\n */\nstatic \nvoid *empty_workQ(void *argin)\n{\n  /* input arguments */\n  int          tid;\n  proc_t       *procinfo;\n  val_t        *Wstruct;\n  vec_t        *Zstruct;\n  tol_t        *tolstruct;\n  workQ_t *workQ;\n  counter_t    *num_left;\n  int          n;\n\n  /* others */\n  task_t       *task;\n  double       *work;\n  int          *iwork;\n\n  /* retrieve necessary arguments from structures */\n  retrieve_auxarg3((auxarg3_t *) argin, &tid, &procinfo, &Wstruct,\n\t\t   &Zstruct, &tolstruct, &workQ, &num_left);\n\n  n        = Wstruct->n;\n\n  /* max. needed double precision work space: odr1v */\n  work      = (double *) malloc(4*n * sizeof(double));\n  assert(work != NULL);\n\n  /* max. needed double precision work space: odrrb */\n  iwork     = (int *)    malloc(2*n * sizeof(int)   );\n  assert(iwork != NULL);\n\n\n  /* while loop to empty the work queue */\n  while (PMR_get_counter_value(num_left) > 0) {\n\n    /* empty r-queue before processing other tasks */\n    PMR_process_r_queue(tid, procinfo, Wstruct, Zstruct, tolstruct,\n\t\t\tworkQ, num_left, work, iwork);\n\n    task = PMR_remove_task_at_front(workQ->s_queue);\n    if ( task != NULL ) {\n      assert(task->flag == SINGLETON_TASK_FLAG);\n\n      PMR_process_s_task((singleton_t *) task->data, tid, procinfo,\n\t\t\t Wstruct, Zstruct, tolstruct, num_left, \n\t\t\t work, iwork);\n      free(task);\n      continue;\n    }\n    \n    task = PMR_remove_task_at_front(workQ->c_queue);\n    if ( task != NULL ) {\n      assert(task->flag == CLUSTER_TASK_FLAG);\n\n      PMR_process_c_task((cluster_t *) task->data, tid, procinfo,\n\t\t\t Wstruct, Zstruct, tolstruct, workQ,\n\t\t\t num_left, work, iwork);\n      free(task);\n      continue;\n    }\n    \n  } /* end while */\n\n  free(work);\n  free(iwork);\n\n  return(NULL);\n}\n\n\n\n\nstatic workQ_t *create_workQ()\n{\n  workQ_t *wq;\n\n  wq = (workQ_t *) malloc(sizeof(workQ_t));\n\n  wq->r_queue = PMR_create_empty_queue();\n  wq->s_queue = PMR_create_empty_queue();\n  wq->c_queue = PMR_create_empty_queue();\n\n  return(wq);\n}\n\n\n\n\nstatic void destroy_workQ(workQ_t *wq)\n{\n  PMR_destroy_queue(wq->r_queue);\n  PMR_destroy_queue(wq->s_queue);\n  PMR_destroy_queue(wq->c_queue);\n  free(wq);\n}\n\n\n\n\nstatic auxarg3_t*\ncreate_auxarg3(int tid, proc_t *procinfo, val_t *Wstruct,\n\t       vec_t *Zstruct, tol_t *tolstruct,\n\t       workQ_t *workQ, counter_t *num_left)\n{\n  auxarg3_t *arg;\n\n  arg = (auxarg3_t *) malloc( sizeof(auxarg3_t) );\n  assert(arg != NULL);\n\n  arg->tid         = tid;\n  arg->procinfo    = procinfo;\n  arg->Wstruct     = Wstruct;\n  arg->Zstruct     = Zstruct;\n  arg->tolstruct   = tolstruct; \n  arg->workQ  = workQ;\n  arg->num_left    = num_left;\n\n  return(arg);\n}\n\n\n\n\nstatic void \nretrieve_auxarg3(auxarg3_t *arg, int *tid, proc_t **procinfo,\n\t\t val_t **Wstruct, vec_t **Zstruct,\n\t\t tol_t **tolstruct, workQ_t **workQ,\n\t\t counter_t **num_left)\n{\n  *tid         = arg->tid;\n  *procinfo    = arg->procinfo;\n  *Wstruct     = arg->Wstruct;\n  *Zstruct     = arg->Zstruct;\n  *tolstruct   = arg->tolstruct;\n  *workQ  = arg->workQ;\n  *num_left    = arg->num_left;\n\n  free(arg);\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/pmrrr.c",
    "content": "/* Computation of eigenvalues and eigenvectors of a symmetric\n * tridiagonal matrix T, given by its diagonal elements D\n * and its super-/subdiagonal elements E.\n *\n * See INCLUDE/pmrrr.h for more information.\n *\n * Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <math.h>\n#include <string.h>\n#include <assert.h>\n#include <float.h>\n\n#include \"mpi.h\"\n#include \"pmrrr.h\"\n#include \"global.h\"\n#include \"plarre.h\"\n#include \"plarrv.h\"\n#include \"structs.h\"\n\n\nstatic int handle_small_cases(char*, char*, int*, double*, double*,\n\t\t\t      double*, double*, int*, int*, int*,\n\t\t\t      MPI_Comm, int*, int*, double*, double*,\n\t\t\t      int*, int*);\nstatic int cmp(const void*, const void*);\nstatic int cmpb(const void*, const void*);\nstatic double scale_matrix(in_t*, val_t*, bool);\nstatic void invscale_eigenvalues(val_t*, double, int);\nstatic int sort_eigenpairs(proc_t*, val_t*, vec_t*);\nstatic void clean_up(MPI_Comm, double*, double*, double*, \n\t\t     int*, int*, int*, int*, int*, proc_t*, \n\t\t     in_t*, val_t*, vec_t*, tol_t*);\nstatic int refine_to_highrac(proc_t*, char*, double*, double*,\n\t\t\t     in_t*, int*, val_t*, tol_t*);\n\n\n\n\n/* \n * Computation of eigenvalues and eigenvectors of a symmetric\n * tridiagonal matrix T, given by its diagonal elements D\n * and its super-/subdiagonal elements E.\n * See README or 'pmrrr.h' for details.\n */\n\nint pmrrr(char *jobz, char *range, int *np, double  *D,\n\t  double *E, double *vl, double *vu, int *il,\n\t  int *iu, int *tryracp, MPI_Comm comm, int *nzp,\n\t  int *offsetp, double *W, double *Z, int *ldz,\n\t  int *Zsupp)\n{\n  /* Input parameter */\n  int         n      = *np;\n  bool        onlyW  = (jobz[0]  == 'N' || jobz[0]  == 'n');\n  bool        wantZ  = (jobz[0]  == 'V' || jobz[0]  == 'v');\n  bool        cntval = (jobz[0]  == 'C' || jobz[0]  == 'c');\n  bool        alleig = (range[0] == 'A' || range[0] == 'a');\n  bool        valeig = (range[0] == 'V' || range[0] == 'v');\n  bool        indeig = (range[0] == 'I' || range[0] == 'i');\n\n  /* Work space */\n  double      *Werr,   *Wgap,  *gersch, *Dcopy, *E2copy;\n  int         *iblock, *iproc, *Windex, *Zindex, *isplit;\n\n  /* Structures to store variables */\n  proc_t      *procinfo;\n  in_t        *Dstruct;  \n  val_t       *Wstruct;\n  vec_t       *Zstruct;\n  tol_t       *tolstruct;\n\n  /* Multiprocessing and multithreading */\n  int         nproc, pid, nthreads;             \n  char        *ompvar;\n  MPI_Comm    comm_dup;\n  int         is_init, is_final, thread_support;\n\n  /* Others */\n  double      scale;              \n  int         i, info;\n  int         ifirst, ilast, isize, ifirst_tmp, ilast_tmp, chunk, iil, iiu;\n\n  /* Check input parameters */\n  if(!(onlyW  || wantZ  || cntval)) return(1);\n  if(!(alleig || valeig || indeig)) return(1);\n  if(n <= 0) return(1);\n  if (valeig) {\n    if(*vu<=*vl) return(1);\n  } else if (indeig) {\n    if (*il<1 || *il>n || *iu<*il || *iu>n) return(1);\n  }\n  \n  /* MPI & multithreading info */\n  MPI_Initialized(&is_init);\n  MPI_Finalized(&is_final);\n  if (is_init!=1 || is_final==1) {\n    fprintf(stderr, \"ERROR: MPI is not active! (init=%d, final=%d) \\n\", is_init, is_final);\n    exit(1);\n  }\n  MPI_Comm_dup(comm, &comm_dup);\n  MPI_Comm_size(comm_dup, &nproc);\n  MPI_Comm_rank(comm_dup, &pid);\n  MPI_Query_thread(&thread_support);\n\n  if ( !(thread_support == MPI_THREAD_MULTIPLE ||\n         thread_support == MPI_THREAD_FUNNELED) ) {\n    /* Disable multithreading; note: to support multithreading with \n     * MPI_THREAD_SERIALIZED the code must be changed slightly; this \n     * is not supported at the moment */\n    nthreads = 1;\n  } else {\n    ompvar = getenv(\"PMR_NUM_THREADS\");\n    if (ompvar == NULL) {\n      nthreads = DEFAULT_NUM_THREADS;\n    } else {\n      nthreads = atoi(ompvar);\n    }\n  }\n\n#if defined(MVAPICH2_VERSION)\n  if (nthreads>1) {\n    int           mv2_affinity=1;\n    char        *mv2_string = getenv(\"MV2_ENABLE_AFFINITY\");\n    if (mv2_string != NULL) {\n      mv2_affinity = atoi(mv2_string);\n    }    \n    if (mv2_affinity!=0 && pid==0) {\n      fprintf(stderr, \"WARNING: You are using MVAPICH2 with affinity enabled, probably by default. \\n\");\n      fprintf(stderr, \"WARNING: This will cause performance issues if MRRR uses Pthreads. \\n\");\n      fprintf(stderr, \"WARNING: Please rerun your job with MV2_ENABLE_AFFINITY=0 or PMR_NUM_THREADS=1. \\n\");\n      fflush(stderr);\n    }    \n    nthreads = 1; \n  }\n#endif\n\n  /* If only maximal number of local eigenvectors are queried\n   * return if possible here */\n  *nzp     = 0;\n  *offsetp = 0;\n  if (cntval) {\n    if ( alleig || n < DSTEMR_IF_SMALLER ) {\n      *nzp = iceil(n,nproc);\n      MPI_Comm_free(&comm_dup);\n      return(0);\n    } else if (indeig) {\n      *nzp = iceil(*iu-*il+1,nproc);\n      MPI_Comm_free(&comm_dup);\n      return(0);\n    }\n  }\n\n  /* Check if computation should be done by multiple processes */\n  if (n < DSTEMR_IF_SMALLER) {\n    info = handle_small_cases(jobz, range, np, D, E, vl, vu, il,\n\t\t\t      iu, tryracp, comm, nzp, offsetp, W,\n\t\t\t      Z, ldz, Zsupp);\n    MPI_Comm_free(&comm_dup);\n    return(info);\n  }\n\n  /* Allocate memory */\n  Werr    = (double *)   malloc( n * sizeof(double) );\n  assert(Werr != NULL);\n  Wgap      = (double *) malloc( n * sizeof(double) );\n  assert(Wgap != NULL);\n  gersch    = (double *) malloc( 2*n*sizeof(double) );\n  assert(gersch != NULL);\n  iblock    = (int *)    calloc( n , sizeof(int) );\n  assert(iblock != NULL);\n  iproc     = (int *)    malloc( n * sizeof(int) );\n  assert(iproc != NULL);\n  Windex    = (int *)    malloc( n * sizeof(int) );\n  assert(Windex != NULL);\n  isplit    = (int *)    malloc( n * sizeof(int) );\n  assert(isplit != NULL);\n  Zindex    = (int *)    malloc( n * sizeof(int) );\n  assert(Zindex != NULL);\n  procinfo  = (proc_t *) malloc( sizeof(proc_t) );\n  assert(procinfo != NULL);\n  Dstruct   = (in_t *)   malloc( sizeof(in_t) );\n  assert(Dstruct != NULL);\n  Wstruct   = (val_t *)  malloc( sizeof(val_t) );\n  assert(Wstruct != NULL);\n  Zstruct   = (vec_t *)  malloc( sizeof(vec_t) );\n  assert(Zstruct != NULL);\n  tolstruct = (tol_t *)  malloc( sizeof(tol_t) );\n  assert(tolstruct != NULL);\n\n  /* Bundle variables into a structures */\n  procinfo->pid            = pid;\n  procinfo->nproc          = nproc;\n  procinfo->comm           = comm_dup;\n  procinfo->nthreads       = nthreads;\n  procinfo->thread_support = thread_support;\n\n  Dstruct->n               = n;\n  Dstruct->D               = D;\n  Dstruct->E               = E;\n  Dstruct->isplit          = isplit;\n\n  Wstruct->n               = n;\n  Wstruct->vl              = vl;\n  Wstruct->vu              = vu;\n  Wstruct->il              = il;\n  Wstruct->iu              = iu;\n  Wstruct->W               = W;\n  Wstruct->Werr            = Werr;\n  Wstruct->Wgap            = Wgap;\n  Wstruct->Windex          = Windex;\n  Wstruct->iblock          = iblock;\n  Wstruct->iproc           = iproc;\n  Wstruct->gersch          = gersch;\n\n  Zstruct->ldz             = *ldz;\n  Zstruct->nz              = 0;\n  Zstruct->Z               = Z;\n  Zstruct->Zsupp           = Zsupp;\n  Zstruct->Zindex          = Zindex;\n\n  /* Scale matrix to allowable range, returns 1.0 if not scaled */\n  scale = scale_matrix(Dstruct, Wstruct, valeig);\n\n  /*  Test if matrix warrants more expensive computations which\n   *  guarantees high relative accuracy */\n  if (*tryracp) {\n    odrrr(&n, D, E, &info); /* 0 - rel acc */\n  }\n  else info = -1;\n\n  if (info == 0) {\n    /* This case is extremely rare in practice */ \n    tolstruct->split = DBL_EPSILON;\n    /* Copy original data needed for refinement later */\n    Dcopy  = (double *) malloc( n * sizeof(double) );\n    assert(Dcopy != NULL);\n    memcpy(Dcopy, D, n*sizeof(double));  \n    E2copy = (double *) malloc( n * sizeof(double) );\n    assert(E2copy != NULL);\n    for (i=0; i<n-1; i++) E2copy[i] = E[i]*E[i];\n  } else {\n    /* Neg. threshold forces old splitting criterion */\n    tolstruct->split = -DBL_EPSILON; \n    *tryracp = 0;\n  }\n\n  if (!wantZ) {\n    /* Compute eigenvalues to full precision */\n    tolstruct->rtol1 = 4.0 * DBL_EPSILON;\n    tolstruct->rtol2 = 4.0 * DBL_EPSILON;\n  } else {\n    /* Do not compute to full accuracy first, but refine later */\n    tolstruct->rtol1 = sqrt(DBL_EPSILON);\n    tolstruct->rtol1 = fmin(1e-2*MIN_RELGAP, tolstruct->rtol1);\n    tolstruct->rtol2 = sqrt(DBL_EPSILON)*5.0E-3;\n    tolstruct->rtol2 = fmin(5e-6*MIN_RELGAP, tolstruct->rtol2);\n    tolstruct->rtol2 = fmax(4.0 * DBL_EPSILON, tolstruct->rtol2);\n  }\n\n  /*  Compute all eigenvalues: sorted by block */\n  info = plarre(procinfo, jobz, range, Dstruct, Wstruct, tolstruct, nzp, offsetp);\n  assert(info == 0);\n\n  /* If just number of local eigenvectors are queried */\n  if (cntval & valeig) {    \n    clean_up(comm_dup, Werr, Wgap, gersch, iblock, iproc, Windex,\n\t     isplit, Zindex, procinfo, Dstruct, Wstruct, Zstruct,\n\t     tolstruct);\n    return(0);\n  }\n\n  /* If only eigenvalues are to be computed */\n  if (!wantZ) {\n\n    /* Refine to high relative with respect to input T */\n    if (*tryracp) {\n      info = refine_to_highrac(procinfo, jobz, Dcopy, E2copy, \n\t\t\t                        Dstruct, nzp, Wstruct, tolstruct);\n      assert(info == 0);\n    }\n\n    /* Sort eigenvalues */\n    qsort(W, n, sizeof(double), cmp);\n\n    /* Only keep subset ifirst:ilast */\n    iil = *il;\n    iiu = *iu;    \n    ifirst_tmp = iil;\n    for (i=0; i<nproc; i++) {\n      chunk  = (iiu-iil+1)/nproc + (i < (iiu-iil+1)%nproc);\n      if (i == nproc-1) {\n\tilast_tmp = iiu;\n      } else {\n\tilast_tmp = ifirst_tmp + chunk - 1;\n\tilast_tmp = imin(ilast_tmp, iiu);\n      }\n      if (i == pid) {\n\tifirst    = ifirst_tmp;\n\tilast     = ilast_tmp;\n\tisize     = ilast - ifirst + 1;\n\t*offsetp = ifirst - iil;\n\t*nzp      = isize;\n      }\n      ifirst_tmp = ilast_tmp + 1;\n      ifirst_tmp = imin(ifirst_tmp, iiu + 1);\n    }\n    if (isize > 0) {\n      memmove(W, &W[ifirst-1], *nzp * sizeof(double));\n    }\n\n    /* If matrix was scaled, rescale eigenvalues */\n    invscale_eigenvalues(Wstruct, scale, *nzp);\n\n    clean_up(comm_dup, Werr, Wgap, gersch, iblock, iproc, Windex,\n\t     isplit, Zindex, procinfo, Dstruct, Wstruct, Zstruct,\n\t     tolstruct);\n\n    return(0);\n  } /* end of only eigenvalues to compute */\n\n  /* Compute eigenvectors */\n  info = plarrv(procinfo, Dstruct, Wstruct, Zstruct, tolstruct, \n\t\tnzp, offsetp);\n  assert(info == 0);\n\n  /* Refine to high relative with respect to input matrix */\n  if (*tryracp) {\n    info = refine_to_highrac(procinfo, jobz, Dcopy, E2copy, \n\t\t\t     Dstruct, nzp, Wstruct, tolstruct);\n    assert(info == 0);\n  }\n\n  /* If matrix was scaled, rescale eigenvalues */\n  invscale_eigenvalues(Wstruct, scale, n);\n\n  /* Sort eigenvalues and eigenvectors of process */\n  sort_eigenpairs(procinfo, Wstruct, Zstruct);\n\n  clean_up(comm_dup, Werr, Wgap, gersch, iblock, iproc, Windex,\n\t   isplit, Zindex, procinfo, Dstruct, Wstruct, Zstruct,\n\t   tolstruct);\n  if (*tryracp) {\n    free(Dcopy);\n    free(E2copy);\n  }\n\n  return(0);\n} /* end pmrrr */\n\n\n\n\n/*\n * Free's on allocated memory of pmrrr routine\n */\nstatic  \nvoid clean_up(MPI_Comm comm, double *Werr, double *Wgap,\n\t      double *gersch, int *iblock, int *iproc,\n\t      int *Windex, int *isplit, int *Zindex,\n\t      proc_t *procinfo, in_t *Dstruct,\n\t      val_t *Wstruct, vec_t *Zstruct,\n\t      tol_t *tolstruct)\n{\n  MPI_Comm_free(&comm);\n  free(Werr);\n  free(Wgap);\n  free(gersch);\n  free(iblock);\n  free(iproc);\n  free(Windex);\n  free(isplit);\n  free(Zindex);\n  free(procinfo);\n  free(Dstruct);\n  free(Wstruct);\n  free(Zstruct);\n  free(tolstruct);\n}\n\n\n\n\n/*\n * Wrapper to call LAPACKs DSTEMR for small matrices\n */\nstatic\nint handle_small_cases(char *jobz, char *range, int *np, double  *D,\n\t\t       double *E, double *vlp, double *vup, int *ilp,\n\t\t       int *iup, int *tryracp, MPI_Comm comm, int *nzp,\n\t\t       int *myfirstp, double *W, double *Z, int *ldzp,\n\t\t       int *Zsupp)\n{\n  bool   cntval  = (jobz[0]  == 'C' || jobz[0]  == 'c');\n  bool   onlyW   = (jobz[0]  == 'N' || jobz[0]  == 'n');\n  bool   wantZ   = (jobz[0]  == 'V' || jobz[0]  == 'v');\n  bool   indeig  = (range[0] == 'I' || range[0] == 'i');\n  int    n       = *np;\n  int    ldz_tmp = *np;\n  int    ldz     = *ldzp;\n\n  int    nproc, pid;\n  int    m, lwork, *iwork, liwork, info;\n  double *Z_tmp, *work, cnt;\n  int    i, itmp, MINUSONE=-1;\n  int    chunk, myfirst, mylast, mysize;\n\n  MPI_Comm_size(comm, &nproc);\n  MPI_Comm_rank(comm, &pid);\n  \n  if (onlyW) {\n    lwork  = 12*n;\n    liwork =  8*n;\n  } else if (cntval) {\n    lwork  = 18*n;\n    liwork = 10*n;\n  } else if (wantZ) {\n    lwork  = 18*n;\n    liwork = 10*n;\n    if (indeig) itmp = *iup-*ilp+1;\n    else        itmp = n;\n    Z_tmp = (double *) malloc(n*itmp * sizeof(double));\n    assert(Z_tmp != NULL);\n  } else {\n    return(1);\n  }\n\n  work = (double *) malloc( lwork  * sizeof(double));\n  assert(work != NULL);\n  iwork = (int *)   malloc( liwork * sizeof(int));\n  assert(iwork != NULL);\n\n  if (cntval) {\n    /* Note: at the moment, jobz=\"C\" should never get here, since\n     * it is blocked before. */\n    odstmr(\"V\", \"V\", np, D, E, vlp, vup, ilp, iup, &m, W, &cnt,\n\t   &ldz_tmp, &MINUSONE, Zsupp, tryracp, work, &lwork, iwork,\n\t   &liwork, &info);\n    assert(info == 0);\n    \n    *nzp = (int) ceil(cnt/nproc);\n    free(work); free(iwork);\n    return(0);\n  }\n\n  odstmr(jobz, range, np, D, E, vlp, vup, ilp, iup, &m, W, Z_tmp,\n\t &ldz_tmp, np, Zsupp, tryracp, work, &lwork, iwork,\n\t &liwork, &info);\n  assert(info == 0);\n\n  chunk   = iceil(m,nproc);\n  myfirst = imin(pid * chunk, m);\n  mylast  = imin((pid+1)*chunk - 1, m - 1);\n  mysize  = mylast - myfirst + 1;\n\n  if (mysize > 0) {\n    memmove(W, &W[myfirst], mysize*sizeof(double));\n    if (wantZ) {\n      if (ldz == ldz_tmp) {\n\t/* copy everything in one chunk */\n\tmemcpy(Z, &Z_tmp[myfirst*ldz_tmp], n*mysize*sizeof(double));\n      } else {\n\t/* copy each vector seperately */\n\tfor (i=0; i<mysize; i++)\n\t  memcpy(&Z[i*ldz], &Z_tmp[(myfirst+i)*ldz_tmp], \n\t\t n*sizeof(double));\n      } \n    } /* if (wantZ) */\n  } \n  \n  *myfirstp = myfirst;\n  *nzp      = mysize;\n\n  if (wantZ) free(Z_tmp);\n  free(work);\n  free(iwork);\n\n  return(0);\n}\n\n\n\n\n/*\n * Scale matrix to allowable range, returns 1.0 if not scaled\n */\nstatic \ndouble scale_matrix(in_t *Dstruct, val_t *Wstruct, bool valeig)\n{\n  int              n  = Dstruct->n;\n  double *restrict D  = Dstruct->D;\n  double *restrict E  = Dstruct->E;\n  double          *vl = Wstruct->vl;\n  double          *vu = Wstruct->vu;\n\n  double           scale = 1.0;\n  double           T_norm;              \n  double           smlnum, bignum, rmin, rmax;\n  int              IONE = 1, itmp;\n\n  /* Set some machine dependent constants */\n  smlnum = DBL_MIN / DBL_EPSILON;\n  bignum = 1.0 / smlnum;\n  rmin   = sqrt(smlnum);\n  rmax   = fmin(sqrt(bignum), 1.0 / sqrt(sqrt(DBL_MIN)));\n\n  /*  Scale matrix to allowable range */\n  T_norm = odnst(\"M\", &n, D, E);  /* returns max(|T(i,j)|) */\n  if (T_norm > 0 && T_norm < rmin) {\n    scale = rmin / T_norm;\n  } else if (T_norm > rmax) {\n    scale = rmax / T_norm;\n  }\n\n  if (scale != 1.0) {  /* FP cmp okay */\n    /* Scale matrix and matrix norm */\n    itmp = n-1;\n    pmrrr_dscal(&n,    &scale, D, &IONE);\n    pmrrr_dscal(&itmp, &scale, E, &IONE);\n    if (valeig == true) {\n      /* Scale eigenvalue bounds */\n      *vl *= scale;\n      *vu *= scale;\n    }\n  } /* end scaling */\n\n  return(scale);\n}\n\n\n\n\n/*\n * If matrix scaled, rescale eigenvalues\n */\nstatic \nvoid invscale_eigenvalues(val_t *Wstruct, double scale,\n\t\t\t  int size)\n{\n  double *vl = Wstruct->vl;\n  double *vu = Wstruct->vu;\n  double *W  = Wstruct->W;\n  double invscale = 1.0 / scale;\n  int    IONE = 1;\n\n  if (scale != 1.0) {  /* FP cmp okay */\n    *vl *= invscale;\n    *vu *= invscale;\n    pmrrr_dscal(&size, &invscale, W, &IONE);\n  }\n}\n\n\n\n\nstatic \nint sort_eigenpairs_local(proc_t *procinfo, int m, val_t *Wstruct, vec_t *Zstruct)\n{\n  int              pid        = procinfo->pid;\n  int              n        = Wstruct->n;\n  double *restrict W        = Wstruct->W;\n  double *restrict work     = Wstruct->gersch;\n  int              ldz      = Zstruct->ldz;\n  double *restrict Z        = Zstruct->Z;\n  int    *restrict Zsupp    = Zstruct->Zsupp;\n \n  bool             sorted;\n  int              j;\n  double           tmp;\n  int              itmp1, itmp2;\n  \n  /* Make sure that sorted correctly; ineffective implementation,\n   * but usually no or very little swapping should be done here */\n  sorted = false;\n  while (sorted == false) {\n    sorted = true;\n    for (j=0; j<m-1; j++) {\n      if (W[j] > W[j+1]) {\n\tsorted = false;\n\t/* swap eigenvalue */\n\ttmp    = W[j];\n\tW[j]   = W[j+1];\n\tW[j+1] = tmp;\n\t/* swap eigenvalue support */\n\titmp1 = Zsupp[2*j];\n\tZsupp[2*j] = Zsupp[2*(j+1)];\n\tZsupp[2*(j+1)] = itmp1;\n\titmp2 = Zsupp[2*j + 1];\n\tZsupp[2*j + 1] = Zsupp[2*(j+1) + 1];\n\tZsupp[2*(j+1) +1 ] = itmp2;\n\t/* swap eigenvector */\n\tmemcpy(work, &Z[j*ldz], n*sizeof(double));\n\tmemcpy(&Z[j*ldz], &Z[(j+1)*ldz], n*sizeof(double));\n\tmemcpy(&Z[(j+1)*ldz], work, n*sizeof(double));\n      }\n    }\n  } /* end while */\n\n  return(0);\n}\n\n\n\n\nstatic \nint sort_eigenpairs_global(proc_t *procinfo, int m, val_t *Wstruct, \n\t\t\t   vec_t *Zstruct)\n{\n  int              pid   = procinfo->pid;\n  int              nproc = procinfo->nproc;\n  int              n     = Wstruct->n;\n  double *restrict W     = Wstruct->W;\n  double *restrict work  = Wstruct->gersch;\n  int              ldz   = Zstruct->ldz;\n  double *restrict Z     = Zstruct->Z;\n  int    *restrict Zsupp = Zstruct->Zsupp;\n\n  double           *minW, *maxW, *minmax; \n  int              i, p, lp, itmp[2];\n  bool             sorted;\n  MPI_Status       status;\n  double              nan_value = 0.0/0.0;\n  \n  minW   = (double *) malloc(  nproc*sizeof(double));\n  assert(minW != NULL);\n  maxW   = (double *) malloc(  nproc*sizeof(double));\n  assert(maxW != NULL);\n  minmax = (double *) malloc(2*nproc*sizeof(double));\n  assert(minmax != NULL);\n\n  if (m == 0) {\n    MPI_Allgather(&nan_value, 1, MPI_DOUBLE, minW, 1, MPI_DOUBLE, \n\t\t  procinfo->comm); \n    MPI_Allgather(&nan_value, 1, MPI_DOUBLE, maxW, 1, MPI_DOUBLE, \n\t\t  procinfo->comm); \n  } else {\n    MPI_Allgather(&W[0], 1, MPI_DOUBLE, minW, 1, MPI_DOUBLE, \n\t\t  procinfo->comm); \n    MPI_Allgather(&W[m-1], 1, MPI_DOUBLE, maxW, 1, MPI_DOUBLE, \n\t\t  procinfo->comm); \n  }\n\n  for (i=0; i<nproc; i++) {\n    minmax[2*i]   = minW[i];\n    minmax[2*i+1] = maxW[i];\n  }\n\n  sorted = true;\n  for (i=0; i<2*nproc-1; i++) {\n    if (minmax[i] > minmax[i+1]) sorted = false;\n  }\n\n  /* Make sure that sorted correctly; ineffective implementation,\n   * but usually no or very little swapping should be done here */\n  while (sorted == false) {\n\n    sorted = true;\n\n    for (p=1; p<nproc; p++) {\n\n      lp =  p - 1;\n\n      /* swap one pair of eigenvalues and eigenvectors */\n      if ((pid == lp || pid == p) && minW[p] < maxW[lp]) {\n\tif (pid == lp) {\n\t  W[m-1] = minW[p];\n          MPI_Sendrecv(&Z[(m-1)*ldz], n, MPI_DOUBLE, p, lp, \n\t\t       work, n, MPI_DOUBLE, p, p, \n\t\t       procinfo->comm, &status);\n\t  memcpy(&Z[(m-1)*ldz], work, n*sizeof(double));\n\t}\n\tif (pid == p) {\n\t  W[0]   = maxW[p-1];\n          MPI_Sendrecv(&Z[0], n, MPI_DOUBLE, lp, p, \n\t\t       work,  n, MPI_DOUBLE, lp, lp, \n\t\t       procinfo->comm, &status);\n\t  memcpy(&Z[0], work, n*sizeof(double));\n\t}\n      }\n\n      /* swap eigenvector support as well; \n       * (would better be recomputed here though) */\n      if ((pid == lp || pid == p) && minW[p] < maxW[lp]) {\n\tif (pid == lp) {\n          MPI_Sendrecv(&Zsupp[2*(m-1)], 2, MPI_INT, p, lp, \n\t\t       itmp, 2, MPI_INT, p, p, \n\t\t       procinfo->comm, &status);\n\t  Zsupp[2*(m-1)]     = itmp[0];\n\t  Zsupp[2*(m-1) + 1] = itmp[1];\n\t}\n\tif (pid == p) {\n          MPI_Sendrecv(&Zsupp[0], 2, MPI_INT, lp, p, \n\t\t       itmp,  2, MPI_INT, lp, lp, \n\t\t       procinfo->comm, &status);\n\t  Zsupp[0] = itmp[0];\n\t  Zsupp[1] = itmp[1];\n\t}\n      }\n    }\n\n    /* sort local again */\n    sort_eigenpairs_local(procinfo, m, Wstruct, Zstruct);\n    \n    /* check again if globally sorted */\n    if (m == 0) {\n      MPI_Allgather(&nan_value, 1, MPI_DOUBLE, minW, 1, MPI_DOUBLE, \n\t\t    procinfo->comm); \n      MPI_Allgather(&nan_value, 1, MPI_DOUBLE, maxW, 1, MPI_DOUBLE, \n\t\t    procinfo->comm);       \n    } else {\n      MPI_Allgather(&W[0], 1, MPI_DOUBLE, minW, 1, MPI_DOUBLE, \n\t\t    procinfo->comm); \n      MPI_Allgather(&W[m-1], 1, MPI_DOUBLE, maxW, 1, MPI_DOUBLE, \n\t\t    procinfo->comm); \n    }\n    \n    for (i=0; i<nproc; i++) {\n      minmax[2*i]   = minW[i];\n      minmax[2*i+1] = maxW[i];\n    }\n    \n    for (i=0; i<2*nproc-1; i++) {\n      if (minmax[i] > minmax[i+1]) sorted = false;\n    }\n    \n  } /* end while not sorted */\n\n  free(minW);\n  free(maxW);\n  free(minmax);\n\n  return(0);\n}\n\n\n\n\n/* Routine to sort the eigenpairs */\nstatic \nint sort_eigenpairs(proc_t *procinfo, val_t *Wstruct, vec_t *Zstruct)\n{\n  /* From inputs */\n  int              pid      = procinfo->pid;\n  int              n        = Wstruct->n;\n  double *restrict W        = Wstruct->W;\n  int    *restrict Windex   = Wstruct->Windex;\n  int    *restrict iproc    = Wstruct->iproc;\n  int    *restrict Zindex   = Zstruct->Zindex;\n\n  /* Others */\n  int           im, j;\n  sort_struct_t *sort_array;\n\n  /* Make the first nz elements of W contains the eigenvalues\n   * associated to the process */\n  im = 0;\n  for (j=0; j<n; j++) {\n    if (iproc[j] == pid) {\n      W[im]      = W[j];\n      Windex[im] = Windex[j];\n      Zindex[im] = Zindex[j];\n      im++;\n    }\n  }\n\n  sort_array = (sort_struct_t *) malloc(im*sizeof(sort_struct_t));\n\n  for (j=0; j<im; j++) {\n    sort_array[j].lambda    = W[j]; \n    sort_array[j].local_ind = Windex[j];\n    sort_array[j].block_ind = 0;\n    sort_array[j].ind       = Zindex[j];\n  }\n\n  /* Sort according to Zindex */\n  qsort(sort_array, im, sizeof(sort_struct_t), cmpb);\n\n  for (j=0; j<im; j++) {\n    W[j]      = sort_array[j].lambda; \n    Windex[j] = sort_array[j].local_ind;\n  }\n\n  /* Make sure eigenpairs are sorted locally; this is a very \n   * inefficient way sorting, but in general no or very little \n   * swapping of eigenpairs is expected here */\n  sort_eigenpairs_local(procinfo, im, Wstruct, Zstruct);\n\n  /* Make sure eigenpairs are sorted globally; this is a very \n   * inefficient way sorting, but in general no or very little \n   * swapping of eigenpairs is expected here */\n  if (ASSERT_SORTED_EIGENPAIRS == true)\n    sort_eigenpairs_global(procinfo, im, Wstruct, Zstruct);\n\n  free(sort_array);\n\n  return(0);\n}\n\n\n\n\n\n/*\n * Refines the eigenvalue to high relative accuracy with\n * respect to the input matrix;\n * Note: In principle this part could be fully parallel too,\n * but it will only rarely be called and not much work\n * is involved, if the eigenvalues are not small in magnitude\n * even no work at all is not uncommon. \n */\nstatic \nint refine_to_highrac(proc_t *procinfo, char *jobz, double *D,\n\t\t      double *E2, in_t *Dstruct, int *nzp,\n\t\t      val_t *Wstruct, tol_t *tolstruct)\n{\n  int              pid    = procinfo->pid;\n  bool             wantZ  = (jobz[0]  == 'V' || jobz[0]  == 'v');\n  int              n      = Dstruct->n;\n  int              nsplit = Dstruct->nsplit;\n  int    *restrict isplit = Dstruct->isplit;\n  double           spdiam = Dstruct->spdiam;\n  int              nz     = *nzp;\n  double *restrict W      = Wstruct->W;\n  double *restrict Werr   = Wstruct->Werr;\n  int    *restrict Windex = Wstruct->Windex;\n  int    *restrict iblock = Wstruct->iblock;\n  int    *restrict iproc  = Wstruct->iproc;\n  double           pivmin = tolstruct->pivmin; \n  double           tol    = 4 * DBL_EPSILON; \n  \n  double *work;\n  int    *iwork;\n  int    ifirst, ilast, offset, info;\n  int    i, j, k;\n  int    ibegin, iend, isize, nbl;\n\n  work  = (double *) malloc( 2*n * sizeof(double) );\n  assert (work != NULL);\n  iwork = (int *)    malloc( 2*n * sizeof(int)    );\n  assert (iwork != NULL);\n\n  ibegin  = 0;\n  for (j=0; j<nsplit; j++) {\n    \n    iend   = isplit[j] - 1;\n    isize  = iend - ibegin + 1;\n    nbl    = isize;\n    \n    if (nbl == 1) {\n      ibegin = iend + 1;\n      continue;\n    }\n    \n    ifirst  = 1;\n    ilast   = nbl;\n    offset  = 0;\n\n    odrrj(&isize, &D[ibegin], &E2[ibegin], &ifirst, &ilast, &tol,\n\t  &offset, &W[ibegin], &Werr[ibegin], work, iwork, &pivmin,\n\t  &spdiam, &info);\n    assert(info == 0);\n    \n    ibegin = iend + 1;\n  } /* end j */\n  \n  free(work);\n  free(iwork);\n  return(0);\n}\n\n\n\n\n/* \n * Compare function for using qsort() on an array of \n * sort_structs\n */\nstatic \nint cmpb(const void *a1, const void *a2)\n{\n  sort_struct_t *arg1, *arg2;\n\n  arg1 = (sort_struct_t *) a1;\n  arg2 = (sort_struct_t *) a2;\n\n  /* Within block local index decides */\n  if (arg1->ind < arg2->ind) \n    return(-1);\n  else\n    return(1);\n}\n\n\n\n\n/*\n * Compare function for using qsort() on an array\n * of doubles\n */\nstatic \nint cmp(const void *a1, const void *a2)\n{\n  double arg1 = *(double *)a1;\n  double arg2 = *(double *)a2;\n\n  if (arg1 < arg2)\n    return(-1);\n  else\n    return(1);\n}\n\n\n\n\n/*\n * Routine to communicate eigenvalues such that every process has\n * all computed eigenvalues (iu-il+1) in W; this routine is designed \n * to be called right after 'pmrrr'.\n */\nint PMR_comm_eigvals(MPI_Comm comm, int *nz, int *myfirstp, double *W)\n{\n  MPI_Comm comm_dup;\n  int      nproc;\n  double   *work;\n  int      *rcount, *rdispl;\n\n  MPI_Comm_dup(comm, &comm_dup);\n  MPI_Comm_size(comm_dup, &nproc);\n\n  rcount = (int *) malloc( nproc * sizeof(int) );\n  assert(rcount != NULL);\n  rdispl = (int *) malloc( nproc * sizeof(int) );\n  assert(rdispl != NULL);\n  work = (double *) malloc((*nz+1) * sizeof(double));\n  assert(work != NULL);\n\n  if (*nz > 0) {\n    memcpy(work, W, (*nz) * sizeof(double) );\n  }\n\n  MPI_Allgather(nz, 1, MPI_INT, rcount, 1, MPI_INT, comm_dup);\n\n  MPI_Allgather(myfirstp, 1, MPI_INT, rdispl, 1, MPI_INT, comm_dup);\n  \n  MPI_Allgatherv(work, *nz, MPI_DOUBLE, W, rcount, rdispl,\n \t\t MPI_DOUBLE, comm_dup);\n\n  MPI_Comm_free(&comm_dup);\n  free(rcount);\n  free(rdispl);\n  free(work);\n\n  return(0);\n}\n\nvoid pmr_comm_eigvals_(MPI_Fint *comm, int *nz, int *myfirstp, \n\t\t       double *W, int *info)\n{\n  MPI_Comm c_comm = MPI_Comm_f2c(*comm);\n\n  *info = PMR_comm_eigvals(c_comm, nz, myfirstp, W);\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/pmrrr_dscal.c",
    "content": "#include <stdlib.h>\n#include \"global.h\"\n\n/* non-optimized, non-threaded DSCAL replacement */\nvoid pmrrr_dscal(int *n, double *alpha, double *restrict x, int *incx)\n{\n  int i;\n  int stride = *incx;\n  int size   = *n;\n  double s   = *alpha;\n\n  for (i=0; i<size; i++)\n    x[i * stride] *= s; \n\n  return;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/process_c_task.c",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n#include <semaphore.h>\n#include \"mpi.h\"\n#include \"pmrrr.h\"\n#include \"plarrv.h\"\n#include \"global.h\"\n#include \"queue.h\"\n#include \"counter.h\"\n#include \"rrr.h\"\n#include \"structs.h\"\n#include \"process_task.h\"\n\n\n#define THREE            3.0\n#define FOUR             4.0\n\n\nstatic inline \nrrr_t* compute_new_rrr(cluster_t *cl, int tid, proc_t *procinfo,\n\t\t       val_t *Wstruct, vec_t *Zstruct,\n\t\t       tol_t *tolstruct, double *work, int *iwork);\n\nstatic inline \nint refine_eigvals(cluster_t *cl, int rf_begin, int rf_end,\n\t\t   int tid, proc_t *procinfo,\n\t\t   rrr_t *RRR, val_t *Wstruct, vec_t *Zstruct,\n\t\t   tol_t *tolstruct, counter_t *num_left, \n\t\t   workQ_t *workQ, double *work, \n\t\t   int *iwork);\n\nstatic inline \nint communicate_refined_eigvals(cluster_t *cl, proc_t *procinfo,\n\t\t\t\tint tid, val_t *Wstruct, rrr_t *RRR);\n\nstatic inline \nint test_comm_status(cluster_t *cl, val_t *Wstruct);\n\nstatic inline \nint create_subtasks(cluster_t *cl, int tid, proc_t *procinfo,\n\t\t    rrr_t *RRR, val_t *Wstruct, vec_t *Zstruct,\n\t\t    workQ_t *workQ,\n\t\t    counter_t *num_left);\n\n\n\n\nint PMR_process_c_task(cluster_t *cl, int tid, proc_t *procinfo,\n\t\t       val_t *Wstruct, vec_t *Zstruct, \n\t\t       tol_t *tolstruct, workQ_t *workQ, \n\t\t       counter_t *num_left, double *work, int *iwork)\n{\n  /* From inputs */\n  int   depth      = cl->depth;\n  int   left_pid   = cl->left_pid;\n  int   right_pid  = cl->right_pid;\n  int   pid        = procinfo->pid;\n  int   n          = Wstruct->n;\n\n  /* Others */\n  rrr_t *RRR;\n  int   rf_begin, rf_end;\n  int   status;\n\n  /* Protection against infinitely deep trees */\n  assert(depth < n);\n\n  /* Check if task only need to be split into subtasks */\n  if (cl->wait_until_refined == true) {\n    status = test_comm_status(cl, Wstruct);\n    if (status == COMM_COMPLETE) {\n      create_subtasks(cl, tid, procinfo, cl->RRR, Wstruct, Zstruct,\n\t\t      workQ, num_left);\n      return(C_TASK_PROCESSED);\n    } else {\n      return(C_TASK_NOT_PROCESSED);\n    }\n  }\n\n  /* Otherwise: compute new rrr, refine part own cluster,\n   * communicate the refined eigenvalues if necessary,\n   * and create subtasks if possible */\n\n  RRR = compute_new_rrr(cl, tid, procinfo, Wstruct, Zstruct,\n\t\t\ttolstruct, work, iwork);\n\n  /* Refine eigenvalues 'rf_begin' to 'rf_end' */\n  if (left_pid != right_pid) {\n    rf_begin = imax(cl->begin, cl->proc_W_begin);\n    rf_end   = imin(cl->end,   cl->proc_W_end);\n  } \n  if (pid == left_pid ) rf_begin = cl->begin;\n  if (pid == right_pid) rf_end   = cl->end;\n\n  refine_eigvals(cl, rf_begin, rf_end, tid, procinfo, RRR,\n\t\t Wstruct, Zstruct, tolstruct, num_left,\n\t\t workQ, work, iwork);\n\n  /* Communicate results: non-blocking */\n  status = COMM_COMPLETE;\n  if (left_pid != right_pid) {\n\n    status = communicate_refined_eigvals(cl, procinfo, tid,\n\t\t\t\t\t Wstruct, RRR);\n    /* status = COMM_INCOMPLETE if communication not finished */\n  }\n\n  if (status == COMM_COMPLETE) {\n    \n    create_subtasks(cl, tid, procinfo, RRR, Wstruct, Zstruct,\n\t\t    workQ, num_left);\n\n    return(C_TASK_PROCESSED);\n  } else {\n    return(C_TASK_NOT_PROCESSED);\n  }\n\n} /* end process_c_task */\n\n\n\n\n\nstatic inline \nrrr_t* compute_new_rrr(cluster_t *cl, int tid, proc_t *procinfo,\n\t\t       val_t *Wstruct, vec_t *Zstruct,\n\t\t       tol_t *tolstruct, double *work, int *iwork)\n{\n  /* From inputs */\n  int              cl_begin    = cl->begin;\n  int              cl_end      = cl->end;\n  int              cl_size     = cl_end - cl_begin + 1;\n  int              depth       = cl->depth;\n  int              bl_begin    = cl->bl_begin;\n  int              bl_end      = cl->bl_end;\n  int              bl_size     = bl_end - bl_begin + 1;\n  double           bl_spdiam   = cl->bl_spdiam;\n  rrr_t            *RRR_parent = cl->RRR;\n\n  double *restrict Werr        = Wstruct->Werr;\n  double *restrict Wgap        = Wstruct->Wgap;\n  int    *restrict Windex      = Wstruct->Windex;\n  double *restrict Wshifted    = Wstruct->Wshifted;\n\n  double           pivmin      = tolstruct->pivmin;\n\n  /* New RRR */\n  double           *restrict D,         *restrict L;\n  double           *restrict DL,        *restrict DLL;\n  double           *restrict D_parent,  *restrict L_parent;\n  double           *DL_parent,          *DLL_parent;\n  double           left_gap, right_gap, tau, fudge;\n  rrr_t            *RRR;\n  double           RQtol = 2*DBL_EPSILON;\n  double           savegap;\n\n  /* Others */\n  int              i, k, p, info;\n  double           tmp;\n  int              offset, IONE=1;\n\n  /* Allocate memory for new representation for cluster */\n  D   = (double *) malloc(bl_size * sizeof(double));\n  assert(D != NULL);\n  \n  L   = (double *) malloc(bl_size * sizeof(double));\n  assert(L != NULL);\n  \n  DL  = (double *) malloc(bl_size * sizeof(double));\n  assert(DL != NULL);\n  \n  DLL = (double *) malloc(bl_size * sizeof(double));\n  assert(DLL != NULL);\n\n  /* Recompute DL and DLL */\n  D_parent = RRR_parent->D;\n  L_parent = RRR_parent->L;\n  for (i=0; i<bl_size-1; i++) {\n    tmp    = D_parent[i]*L_parent[i];\n    DL[i]  = tmp;\n    DLL[i] = tmp*L_parent[i];\n  }\n  DL_parent  = DL;\n  DLL_parent = DLL;\n\n  /* to shift as close as possible refine extremal eigenvalues */\n  for (k=0; k<2; k++) {\n    if (k == 0) {\n      p              = Windex[cl_begin];\n      savegap        = Wgap[cl_begin];\n      Wgap[cl_begin] = 0.0;\n    } else {\n      p              = Windex[cl_end  ];\n      savegap        = Wgap[cl_end];\n      Wgap[cl_end]   = 0.0;\n    }\n    \n    offset  = Windex[cl_begin] - 1;\n\n    odrrb(&bl_size, D_parent, DLL_parent, &p, &p, &RQtol,\n\t  &RQtol, &offset, &Wshifted[cl_begin], &Wgap[cl_begin],\n\t  &Werr[cl_begin], work, iwork, &pivmin, &bl_spdiam,\n\t  &bl_size, &info);\n    assert( info == 0 );\n\n    if (k == 0) {\n      Wgap[cl_begin] = fmax(0, (Wshifted[cl_begin+1]-Werr[cl_begin+1])\n\t\t\t    - (Wshifted[cl_begin]+Werr[cl_begin]) );\n    } else {\n      Wgap[cl_end]   = savegap;\n    }\n  } /* end k */\n\n  left_gap  = cl->lgap;\n  right_gap = Wgap[cl_end];\n\n  /* Compute new RRR and store it in D and L */\n  odrrf(&bl_size, D_parent, L_parent, DL_parent,\n        &IONE, &cl_size, &Wshifted[cl_begin], &Wgap[cl_begin],\n        &Werr[cl_begin], &bl_spdiam, &left_gap, &right_gap,\n        &pivmin, &tau, D, L, work, &info);\n  assert(info == 0);\n\n  /* Update shift and store it */\n  tmp = L_parent[bl_size-1] + tau;\n  L[bl_size-1] = tmp;\n\n  /* Compute D*L and D*L*L */\n  for (i=0; i<bl_size-1; i++) {\n    tmp    = D[i]*L[i];\n    DL[i]  = tmp;\n    DLL[i] = tmp*L[i];\n  }\n\n  /* New RRR of cluster is usually created at the parent level and\n   * initialized to parent RRR, now reset to contain new RRR */\n  if (RRR_parent->copied_parent_rrr == true) {\n    free(RRR_parent->D);\n    free(RRR_parent->L);\n  }\n  RRR = PMR_reset_rrr(RRR_parent, D, L, DL, DLL, bl_size, depth+1);\n  \n  /* Update shifted eigenvalues */\n  for (k=cl_begin; k<=cl_end; k++) {\n    fudge  = THREE * DBL_EPSILON * fabs( Wshifted[k] );\n    Wshifted[k] -= tau;\n    fudge += FOUR * DBL_EPSILON * fabs( Wshifted[k] );\n    Werr[k] += fudge;\n  }\n\n  /* Assure that structure is not freed while it is processed */\n  PMR_increment_rrr_dependencies(RRR);\n\n  return(RRR);\n} /* end compute_new_rrr */\n\n\n\n\n\n/* \n * Refine eigenvalues with respect to new rrr \n */\nstatic inline \nint refine_eigvals(cluster_t *cl, int rf_begin, int rf_end,\n\t\t   int tid, proc_t *procinfo, rrr_t *RRR, \n\t\t   val_t *Wstruct, vec_t *Zstruct,\n\t\t   tol_t *tolstruct, counter_t *num_left,\n\t\t   workQ_t *workQ, double *work,\n\t\t   int *iwork)\n{\n  /* From inputs */\n  int              rf_size   = rf_end-rf_begin+1;\n  int              bl_begin  = cl->bl_begin;\n  int              bl_end    = cl->bl_end;\n  int              bl_size   = bl_end - bl_begin + 1;\n  double           bl_spdiam = cl->bl_spdiam;\n\n  int              nthreads  = procinfo->nthreads;\n\n  double *restrict D         = RRR->D;\n  double *restrict L         = RRR->L;\n  double *restrict DLL       = RRR->DLL;\n\n  double *restrict W         = Wstruct->W;\n  double *restrict Werr      = Wstruct->Werr;\n  double *restrict Wgap      = Wstruct->Wgap;\n  int    *restrict Windex    = Wstruct->Windex;\n  double *restrict Wshifted  = Wstruct->Wshifted;\n\n  int              nz        = Zstruct->nz;\n\n  double           pivmin    = tolstruct->pivmin;\n  double           rtol1     = tolstruct->rtol1;\n  double           rtol2     = tolstruct->rtol2;\n\n  /* Others */\n  int              info, i, p, q, offset;\n  double           sigma, savegap;\n  int              MIN_REFINE_CHUNK = fmax(2,nz/(4*nthreads));\n  int              left, own_part, others_part, num_tasks;\n  int              ts_begin, ts_end, chunk, count;\n  task_t           *task;\n  sem_t            sem;\n  int              num_iter;\n\n  /* Determine if refinement should be split into tasks */\n  left = PMR_get_counter_value(num_left);\n  own_part = (int) fmax( ceil( (double) left / nthreads ),\n\t\t\t MIN_REFINE_CHUNK);\n\n  if (own_part < rf_size) {\n\n    others_part = rf_size - own_part;\n    num_tasks   = iceil(rf_size, own_part) - 1; /* >1 */\n    chunk       = others_part/num_tasks;        /* floor */\n\n    sem_init(&sem, 0, 0);\n    ts_begin = rf_begin;\n    p        = Windex[rf_begin];\n    for (i=0; i<num_tasks; i++) {\n      ts_end = ts_begin + chunk - 1;\n      q      = p        + chunk - 1;\n\n      task = PMR_create_r_task(ts_begin, ts_end, D, DLL, p, q, \n\t\t\t       bl_size, bl_spdiam, tid, &sem);\n     \n      if (ts_begin <= ts_end)\n\tPMR_insert_task_at_back(workQ->r_queue, task);\n      else\n\tsem_post(&sem); /* case chunk=0 */\n\n      ts_begin = ts_end + 1;\n      p        = q      + 1;\n    }\n    ts_end = rf_end;\n    q      = Windex[rf_end];\n    offset = Windex[ts_begin] - 1;\n\n    /* Call bisection routine to refine the values */\n    if (ts_begin <= ts_end) {\n      odrrb(&bl_size, D, DLL, &p, &q, &rtol1, &rtol2, &offset, \n\t    &Wshifted[ts_begin], &Wgap[ts_begin], &Werr[ts_begin],\n\t    work, iwork, &pivmin, &bl_spdiam, &bl_size, &info);\n      assert( info == 0 );\n    }\n\n    /* Empty \"all\" r-queue refine tasks before waiting */\n    num_iter = PMR_get_num_tasks(workQ->r_queue);\n    for (i=0; i<num_iter; i++) {\n      task = PMR_remove_task_at_front(workQ->r_queue);\n      if (task != NULL) {\n\tif (task->flag == REFINE_TASK_FLAG) {\n\t  PMR_process_r_task((refine_t *) task->data, procinfo, \n\t\t\t     Wstruct, tolstruct, work, iwork);\n\t  free(task);\n\t} else {\n\t  PMR_insert_task_at_back(workQ->r_queue, task);\n\t}\n      } /* if task */\n    } /* end for i */\n    \n    /* Barrier: wait until all created tasks finished */\n    count = num_tasks;\n    while (count > 0) {\n      while (sem_wait(&sem) != 0) { };\n      count--;\n    }\n    sem_destroy(&sem);\n\n    /* Edit right gap at splitting point */\n    ts_begin = rf_begin;\n    for (i=0; i<num_tasks; i++) {\n      ts_end = ts_begin + chunk - 1;\n      \n      Wgap[ts_end] = fmax(0.0, Wshifted[ts_end + 1] - Werr[ts_end + 1]\n\t\t\t  - Wshifted[ts_end] - Werr[ts_end]);\n      \n      ts_begin = ts_end + 1;\n    }\n\n  } else {\n    /* Refinement of cluster without creating tasks */\n    \n    /* 'p' and 'q' are local (within block) indices of\n     * the first/last eigenvalue of the cluster */\n    p = Windex[rf_begin];\n    q = Windex[rf_end];\n    \n    offset = Windex[rf_begin] - 1;    /* = p - 1 */\n    \n    if (p == q) {\n      savegap = Wgap[rf_begin];\n      Wgap[rf_begin] = 0.0;\n    }  \n    \n    /* Bisection routine to refine the values */\n    odrrb(&bl_size, D, DLL, &p, &q, &rtol1, &rtol2, &offset, \n\t  &Wshifted[rf_begin], &Wgap[rf_begin], &Werr[rf_begin],\n\t  work, iwork, &pivmin, &bl_spdiam, &bl_size, &info);\n    assert( info == 0 );\n    \n    if (p == q) {\n      Wgap[rf_begin] = savegap;\n    }  \n  \n  } /* end refine with or without creating tasks */\n\n  sigma     = L[bl_size-1];\n  \n  /* refined eigenvalues with all shifts applied in W */\n  for (i=rf_begin; i<=rf_end; i++) {\n    W[i] = Wshifted[i] + sigma;\n  }\n\n  return(0);\n} /* end refine_eigvals */\n\n\n\n\n\n\n\n\nstatic inline \nint communicate_refined_eigvals(cluster_t *cl, proc_t *procinfo,\n\t\t\t\tint tid, val_t *Wstruct, rrr_t *RRR)\n{\n  /* From inputs */\n  int              cl_begin     = cl->begin;\n  int              cl_end       = cl->end;\n  int              bl_begin     = cl->bl_begin;\n  int              bl_end       = cl->bl_end;\n  int              proc_W_begin = cl->proc_W_begin;\n  int              proc_W_end   = cl->proc_W_end;\n  int              left_pid     = cl->left_pid;\n  int              right_pid    = cl->right_pid;\n  int              num_messages;\n  //  int              num_messages = 4*(right_pid - left_pid);\n\n  int              pid          = procinfo->pid;\n\n  double *restrict W            = Wstruct->W;\n  double *restrict Werr         = Wstruct->Werr;\n  double *restrict Wgap         = Wstruct->Wgap;\n  double *restrict Wshifted     = Wstruct->Wshifted;\n  int    *restrict iproc        = Wstruct->iproc;\n\n  /* Others */\n  int              p, i_msg, u, k, i;\n  int              my_begin, my_end, my_size;\n  int              other_begin, other_end, other_size;\n  double           sigma;\n  int              status, communication_done;\n  MPI_Request      *requests;\n  MPI_Status       *stats;\n  comm_t           *comm;\n  bool             proc_involved;\n\n  my_begin = imax(cl_begin, proc_W_begin);\n  my_end   = imin(cl_end,   proc_W_end);\n  if (pid == left_pid ) my_begin = cl_begin;\n  if (pid == right_pid) my_end   = cl_end;\n  my_size  = my_end - my_begin + 1;\n\n  num_messages = 0;\n  for (i=left_pid; i<=right_pid; i++) {\n    for (k=cl_begin; k<=cl_end; k++) {\n      if (iproc[k] == i) {\n\tnum_messages += 4;\n\tbreak;\n      }\n    }    \n  }\n\n  requests = (MPI_Request *) malloc( num_messages *\n\t\t\t\t\t  sizeof(MPI_Request) );\n  stats    = (MPI_Status  *) malloc( num_messages * \n\t\t\t\t\t  sizeof(MPI_Status) );\n\n  i_msg = 0;\n  for (p=left_pid; p<=right_pid; p++) {\n\n    proc_involved = false;\n    for (k=cl_begin; k<=cl_end; k++) {\n      if (iproc[k] == p) {\n\tproc_involved = true;\n\tbreak;\n      }\n    }\n\n    if (p != pid && proc_involved == true) {\n\n      /* send message to process p (non-blocking) */\n      MPI_Isend(&Wshifted[my_begin], my_size, MPI_DOUBLE, p,\n\t\tmy_begin, procinfo->comm, &requests[4*i_msg]);\n\n      MPI_Isend(&Werr[my_begin], my_size, MPI_DOUBLE, p,\n\t\tmy_begin, procinfo->comm, &requests[4*i_msg+1]);\n\n      /* Find eigenvalues in of process p */\n      other_size = 0;\n      for (k=cl_begin; k<=cl_end; k++) {\n\tif (other_size == 0 && iproc[k] == p) {\n\t  other_begin = k;\n\t  other_end   = k;\n\t  other_size++;\n\t  u = k+1;\n\t  while (u <=cl_end && iproc[u] == p) {\n\t    other_end++;\n\t    other_size++;\n\t    u++;\n\t  }\n\t}\n      }\n      if (p == left_pid) {\n\tother_begin = cl_begin;\n\tu = cl_begin;\n\twhile (iproc[u] == -1) {\n\t  other_size++;\n\t  u++;\n\t}\n      }\n      if (p == right_pid) {\n\tother_end = cl_end;\n\tu = cl_end;\n\twhile (iproc[u] == -1) {\n\t  other_size++;\n\t  u--;\n\t}\n      }\n\n      /* receive message from process p (non-blocking) */\n      MPI_Irecv(&Wshifted[other_begin], other_size, MPI_DOUBLE,\tp,\n\t\tother_begin, procinfo->comm, &requests[4*i_msg+2]);\n\n      MPI_Irecv(&Werr[other_begin], other_size, MPI_DOUBLE, p,\n\t\tother_begin, procinfo->comm, &requests[4*i_msg+3]);\n     \n      i_msg++;\n    }\n\n  } /* end for p */\n  num_messages = 4*i_msg; /* messages actually send */\n\n  status = MPI_Testall(num_messages, requests, \n\t\t       &communication_done, stats);\n  assert(status == MPI_SUCCESS);\n\n  if (communication_done == true) {\n\n    sigma     = RRR->L[bl_end-bl_begin];\n    for (k=cl_begin; k<cl_end; k++) {\n      W[k]    = Wshifted[k] + sigma;\n      Wgap[k] = fmax(0, Wshifted[k+1]-Werr[k+1] \n                        - (Wshifted[k]-Werr[k]));\n    }\n    W[cl_end] = Wshifted[cl_end] + sigma;\n\n    free(requests);\n    free(stats);\n    status = COMM_COMPLETE;\n  } else {\n   \n    comm = (comm_t *) malloc( sizeof(comm_t) );\n    assert(comm != NULL);\n\n    comm->num_messages      = num_messages;\n    comm->requests          = requests;\n    comm->stats             = stats;\n    cl->wait_until_refined  = true;\n    cl->messages            = comm;\n    \n    status = COMM_INCOMPLETE;\n  }\n  \n  return(status);\n} /* end communicate_refined_eigvals */\n\n\n\n\n\n\nstatic inline \nint test_comm_status(cluster_t *cl, val_t *Wstruct)\n{\n  int         cl_begin            = cl->begin;\n  int         cl_end              = cl->end;\n  int         bl_begin            = cl->bl_begin;\n  int         bl_end              = cl->bl_end;\n  rrr_t       *RRR                = cl->RRR;\n  comm_t      *comm               = cl->messages;\n  int         num_messages        = comm->num_messages;\n  MPI_Request *requests           = comm->requests;\n  MPI_Status  *stats              = comm->stats;\n  double      *restrict W         = Wstruct->W;\n  double      *restrict Werr      = Wstruct->Werr;\n  double      *restrict Wgap      = Wstruct->Wgap;\n  double      *restrict Wshifted  = Wstruct->Wshifted;\n\n  int         status, k, communication_done;\n  double      sigma;\n\n  /* Test if communication complete */\n  status = MPI_Testall(num_messages, requests, \n\t\t       &communication_done, stats);\n  assert(status == MPI_SUCCESS);\n\n  if (communication_done == true) {\n\n    cl->wait_until_refined = false;\n\n    sigma     = RRR->L[bl_end-bl_begin];\n    for (k=cl_begin; k<cl_end; k++) {\n      W[k]    = Wshifted[k] + sigma;\n      Wgap[k] = fmax(0, Wshifted[k+1]-Werr[k+1] \n\t\t        - (Wshifted[k]-Werr[k]));\n    }\n    W[cl_end] = Wshifted[cl_end] + sigma;\n    \n    free(comm);\n    free(requests);\n    free(stats);\n    status = COMM_COMPLETE;\n  } else {\n    status = COMM_INCOMPLETE;\n  }\n\n  return(status);\n} /* test_comm_status */\n\n\n\n\n\nstatic inline \nint create_subtasks(cluster_t *cl, int tid, proc_t *procinfo, \n\t\t    rrr_t *RRR, val_t *Wstruct, vec_t *Zstruct,\n\t\t    workQ_t *workQ, counter_t *num_left)\n{\n  /* From inputs */\n  int              cl_begin  = cl->begin;\n  int              cl_end    = cl->end;\n  int              depth     = cl->depth;\n  int              bl_begin  = cl->bl_begin;\n  int              bl_end    = cl->bl_end;\n  int              bl_size   = bl_end - bl_begin + 1;\n  double           bl_spdiam = cl->bl_spdiam;\n  double           lgap;\n\n  int              pid       = procinfo->pid;\n  int              nproc     = procinfo->nproc;\n  int              nthreads  = procinfo->nthreads;\n  bool           proc_involved=true;\n\n  double *restrict Wgap      = Wstruct->Wgap;\n  double *restrict Wshifted  = Wstruct->Wshifted;\n  int    *restrict iproc     = Wstruct->iproc;\n\n  int              ldz       = Zstruct->ldz;\n  double *restrict Z         = Zstruct->Z;\n  int    *restrict Zindex    = Zstruct->Zindex;\n\n  /* others */\n  int    i, l, k;\n  int    max_size;\n  task_t *task;\n  bool   task_inserted;\n  int    new_first, new_last, new_size, new_ftt1, new_ftt2;\n  int    sn_first, sn_last, sn_size;\n  rrr_t  *RRR_parent;\n  int    new_lpid, new_rpid;\n  double *restrict D_parent;\n  double *restrict L_parent;\n  int    my_first, my_last;\n  bool   copy_parent_rrr;\n\n\n  max_size = fmax(1, PMR_get_counter_value(num_left) /\n\t\t     (fmin(depth+1,4)*nthreads) );\n  task_inserted = true;\n  new_first = cl_begin;\n  for (i=cl_begin; i<=cl_end; i++) {    \n\n    if ( i == cl_end )\n      new_last = i;\n    else if ( Wgap[i] >= MIN_RELGAP*fabs(Wshifted[i]) )\n      new_last = i;\n    else\n      continue;\n\n    new_size = new_last - new_first + 1;\n\n    if (new_size == 1) {\n      /* singleton was found */\n      \n      if (new_first==cl_begin || task_inserted==true) {\n\t/* initialize new singleton task */\n\tsn_first = new_first;\n\tsn_last  = new_first;\n\tsn_size  = 1;\n      } else {\n\t/* extend singleton task by one */\n\tsn_last++;\n\tsn_size++;\n      }\n      \n      /* insert task if ... */\n      if (i==cl_end || sn_size>=max_size ||\n\t    Wgap[i+1] < MIN_RELGAP*fabs(Wshifted[i+1])) {\n\n\t/* Check if process involved in s-task */\n\tproc_involved = false;\n\tfor (k=sn_first; k<=sn_last; k++) {\n\t  if (iproc[k] == pid) {\n\t    proc_involved = true;\n\t    break;\n\t  }\n\t}\n\tif (proc_involved == false) {\n\t  task_inserted = true;\n\t  new_first = i + 1;\n\t  continue;\n\t}\n\n\t/* Insert task as process is involved */\n\tif (sn_first == cl_begin) {\n\t  lgap = cl->lgap;\n\t} else {\n\t  lgap = Wgap[sn_first-1];\n\t}\n\t\n\tPMR_increment_rrr_dependencies(RRR);\n\t\n\ttask = PMR_create_s_task(sn_first, sn_last, depth+1, bl_begin,\n\t\t\t\t bl_end, bl_spdiam, lgap, RRR);\n\t\n\tPMR_insert_task_at_back(workQ->s_queue, task);\n\t  \n\ttask_inserted = true;\n      } else {\n\ttask_inserted = false;\n      }\n      \n    } else {\n      /* cluster was found */\n\n      /* check if process involved in processing the new cluster */\n      new_lpid = nproc-1;\n      new_rpid = -1;\n      for (l=new_first; l<=new_last; l++) {\n\tif (iproc[l] != -1) {\n\t  new_lpid = imin(new_lpid, iproc[l]);\n\t  new_rpid = imax(new_rpid, iproc[l]);\n\t  }\n      }\n      if (new_lpid > pid || new_rpid < pid) {\n\ttask_inserted = true;\n\tnew_first = i + 1;\n\tcontinue;\n      }\n\n      /* find gap to the left */\n      if (new_first == cl_begin) {\n\tlgap = cl->lgap;\n      } else {\n\tlgap = Wgap[new_first - 1];\n      }\n    \n      /* determine where to store the parent rrr needed by the\n       * cluster to find its new rrr */\n      my_first = imax(new_first, cl->proc_W_begin);\n      my_last  = imin(new_last,  cl->proc_W_end);\n      if ( my_first == my_last ) {\n\t/* only one eigenvalue of cluster belongs to process */\n\tcopy_parent_rrr = true;\n      } else {\n\t/* store parent rrr in Z at column new_ftt */\n\tcopy_parent_rrr = false;\n      }\n      new_ftt1 = Zindex[my_first    ];\n      new_ftt2 = Zindex[my_first + 1];\n\n      if (copy_parent_rrr == true) {\n\t/* Copy parent RRR into alloceted arrays and mark them\n\t * for freeing later */\n\tD_parent = (double *) malloc(bl_size * sizeof(double));\n\tassert(D_parent != NULL);\n\t\n\tL_parent = (double *) malloc(bl_size * sizeof(double));\n\tassert(L_parent != NULL);\n\n\tmemcpy(D_parent, RRR->D, bl_size*sizeof(double));\n\tmemcpy(L_parent, RRR->L, bl_size*sizeof(double));\n\n\tRRR_parent = PMR_create_rrr(D_parent, L_parent, NULL, \n\t\t\t\t    NULL, bl_size, depth);\n\tPMR_set_copied_parent_rrr_flag(RRR_parent, true);\n\n      } else {\n\t/* copy parent RRR into Z to make cluster task independent */\n\tmemcpy(&Z[new_ftt1*ldz+bl_begin], RRR->D, \n\t       bl_size*sizeof(double));\n\tmemcpy(&Z[new_ftt2*ldz+bl_begin], RRR->L, \n\t       bl_size*sizeof(double));\n\n\tRRR_parent = PMR_create_rrr(&Z[new_ftt1*ldz + bl_begin],\n\t\t\t\t    &Z[new_ftt2*ldz + bl_begin],\n\t\t\t\t    NULL, NULL, bl_size, depth);\n      }\n      \n      /* Create the task for the cluster and put it in the queue */ \n      task = PMR_create_c_task(new_first, new_last, depth+1, \n\t\t\t       bl_begin, bl_end, bl_spdiam, lgap, \n\t\t\t       cl->proc_W_begin, cl->proc_W_end, \n\t\t\t       new_lpid, new_rpid, RRR_parent);\n\n      if (new_lpid != new_rpid)\n\tPMR_insert_task_at_back(workQ->r_queue, task);\n      else\n\tPMR_insert_task_at_back(workQ->c_queue, task);\n\n      task_inserted = true;\n      \n    } /* if singleton or cluster found */\n\n    new_first = i + 1;\n  } /* end i */\n  \n  /* set flag in RRR that last singleton is created */\n  PMR_set_parent_processed_flag(RRR);\n  \n  /* clean up */\n  PMR_try_destroy_rrr(RRR);\n  free(cl);\n\n  return(0);\n} /* end create_subtasks */\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/process_r_task.c",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <semaphore.h>\n#include <assert.h>\n#include \"mpi.h\"\n#include \"pmrrr.h\"\n#include \"global.h\"\n#include \"plarrv.h\"\n#include \"queue.h\"\n#include \"counter.h\"\n#include \"structs.h\"\n#include \"tasks.h\"\n#include \"process_task.h\"\n\n\nint PMR_process_r_task(refine_t *rf, proc_t *procinfo, val_t *Wstruct,\n\t\t       tol_t *tolstruct, double *work, int *iwork);\n\n\n/*\n * Executes all tasks which are in the r-queue at the moment of the \n * call. This routine is called to make sure that all tasks in the \n * queue are dequeued before continueing with other tasks.\n */\nvoid PMR_process_r_queue(int tid, proc_t *procinfo, val_t *Wstruct, \n\t\t\t vec_t *Zstruct, tol_t *tolstruct, \n\t\t\t workQ_t *workQ, counter_t *num_left, \n\t\t\t double *work, int *iwork)\n{\n  int        thread_support = procinfo->thread_support;\n  int        t, num_tasks;\n  int        status;\n  task_t     *task;\n\n  num_tasks = PMR_get_num_tasks(workQ->r_queue);\n\n  for (t=0; t<num_tasks; t++) {\n    \n    task = PMR_remove_task_at_front(workQ->r_queue);\n\n    if ( task != NULL ) {\n    \n      if (task->flag == CLUSTER_TASK_FLAG) {\n\n\tif (thread_support != MPI_THREAD_FUNNELED || tid == 0) {\n\t  /* if MPI_THREAD_FUNNELED only tid==0 should process \n           * these tasks, otherwise any thread can do it */\n\t  status = PMR_process_c_task((cluster_t *) task->data,\n\t\t\t\t      tid, procinfo, Wstruct,\n\t\t\t\t      Zstruct, tolstruct, workQ,\n\t\t\t\t      num_left, work, iwork);\n\t  \n\t  if (status == C_TASK_PROCESSED) {\n\t    free(task);\n\t  } else {\n\t    PMR_insert_task_at_back(workQ->r_queue, task);\n\t  }\n\t} else {\n\t    PMR_insert_task_at_back(workQ->r_queue, task);\n\t}\n\n      } /* end if cluster task */\n\n      if (task->flag == REFINE_TASK_FLAG) {\n\tPMR_process_r_task((refine_t *) task->data, procinfo,\n\t\t\t   Wstruct, tolstruct, work, iwork);\n\tfree(task);\n      }\n \n    } /* end if task removed */\n  } /* end for t */\n} /* end process_entire_r_queue */\n  \n\n\n\n/*\n * Process the task of refining a subset of eigenvalues.\n */\nint PMR_process_r_task(refine_t *rf, proc_t *procinfo, \n\t\t       val_t *Wstruct, tol_t *tolstruct, \n\t\t       double *work, int *iwork)\n{\n  /* From inputs */\n  int              ts_begin  = rf->begin;\n  double *restrict D         = rf->D;\n  double *restrict DLL       = rf->DLL;\n  int              p         = rf->p;\n  int              q         = rf->q;\n  int              bl_size   = rf->bl_size;\n  double           bl_spdiam = rf->bl_spdiam;\n  sem_t            *sem      = rf->sem;\n\n  double *restrict Werr      = Wstruct->Werr;\n  double *restrict Wgap      = Wstruct->Wgap;\n  int    *restrict Windex    = Wstruct->Windex;\n  double *restrict Wshifted  = Wstruct->Wshifted;\n  \n  double           rtol1     = tolstruct->rtol1;\n  double           rtol2     = tolstruct->rtol2;\n  double           pivmin    = tolstruct->pivmin;\n\n  /* Others */\n  int    info, offset;\n  double savegap;\n\n  offset = Windex[ts_begin] - 1;\n\n  if (p == q) {\n    savegap = Wgap[ts_begin];\n    Wgap[ts_begin] = 0.0;\n  }  \n\n  odrrb(&bl_size, D, DLL, &p, &q, &rtol1, &rtol2, &offset, \n        &Wshifted[ts_begin], &Wgap[ts_begin], &Werr[ts_begin],\n        work, iwork, &pivmin, &bl_spdiam, &bl_size, &info);\n  assert(info == 0);\n\n  if (p == q) {\n    Wgap[ts_begin] = savegap;\n  }  \n\n  sem_post(sem);\n  free(rf);\n\n  return(0);\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/process_s_task.c",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <float.h>\n#include <assert.h>\n#include \"pmrrr.h\"\n#include \"global.h\"\n#include \"rrr.h\"\n#include \"counter.h\"\n#include \"structs.h\"\n#include \"tasks.h\"\n#include \"process_task.h\"\n\n\nint PMR_process_s_task(singleton_t *sng, int tid, proc_t *procinfo,\n\t\t       val_t *Wstruct, vec_t *Zstruct, \n\t\t       tol_t *tolstruct, counter_t *num_left, \n\t\t       double *work, int *iwork)\n{\n  /* Inputs */\n  int    begin         = sng->begin; \n  int    end           = sng->end;\n  int    bl_begin      = sng->bl_begin;\n  int    bl_end        = sng->bl_end;\n  int    bl_size       = bl_end - bl_begin + 1;\n  double bl_spdiam     = sng->bl_spdiam; \n  rrr_t  *RRR          = sng->RRR;\n  double *restrict D   = RRR->D; \n  double *restrict L   = RRR->L; \n  double *restrict DL  = RRR->DL;\n  double *restrict DLL = RRR->DLL;\n\n  int              pid      = procinfo->pid;  \n  int              n        = Wstruct->n;\n  double *restrict W        = Wstruct->W;\n  double *restrict Werr     = Wstruct->Werr;\n  double *restrict Wgap     = Wstruct->Wgap;\n  int    *restrict Windex   = Wstruct->Windex;  \n  int    *restrict iproc    = Wstruct->iproc;  \n  double *restrict Wshifted = Wstruct->Wshifted;\n  int              ldz      = Zstruct->ldz;\n  double *restrict Z        = Zstruct->Z;\n  int    *restrict isuppZ   = Zstruct->Zsupp;;\n  int    *restrict Zindex   = Zstruct->Zindex;\n  double           pivmin   = tolstruct->pivmin;\n\n  /* others */\n  int              info, i, k, itmp, num_decrement=0;\n  int              IONE = 1;\n  double           DZERO = 0.0;\n  double           tol, lambda, left, right;\n  int              i_local, zind;\n  double           gap, lgap, rgap, gaptol, savedgap, tmp;\n  bool             usedBS, usedRQ, needBS, wantNC, step2II;\n  int              r, offset;\n  double           twoeps = 2*DBL_EPSILON, RQtol = 2*DBL_EPSILON;\n  double           residual, bstres, bstw; \n  int              i_supmn, i_supmx;\n  double           RQcorr;\n  int              negcount;\n  int              sgndef, suppsize;\n  double           sigma;\n  int              i_Zfrom, i_Zto;\n  double           ztz, norminv, mingma;\n\n\n  /* set tolerance parameter */\n  tol  = 4.0 * log( (double) bl_size ) * DBL_EPSILON;\n\n  /* loop over all singletons in the task */\n  for (i=begin; i<=end; i++) {\n\n    /* check if eigenvector is supposed to be computed by\n     * the process */\n    if (iproc[i] != pid)\n      continue;\n    num_decrement++;\n\n    if (bl_size == 1) {\n      /* set eigenvector to column of identity matrix */\n      zind = Zindex[i];\n      memset(&Z[zind*ldz], 0.0, n*sizeof(double) );\n      Z[zind*ldz + bl_begin] = 1.0;\n      isuppZ[2*zind    ]     = bl_begin + 1;\n      isuppZ[2*zind + 1]     = bl_begin + 1;\n      continue;\n    }\n\n    lambda  = Wshifted[i];  \n    left    = Wshifted[i] - Werr[i];\n    right   = Wshifted[i] + Werr[i];\n    i_local = Windex[i];\n    r       = 0;\n    \n    /* compute left and right gap */\n    if (i == bl_begin)\n      lgap = DBL_EPSILON * fmax( fabs(left), fabs(right) );\n    else if (i == begin)\n      lgap = sng->lgap;\n    else\n      lgap = Wgap[i-1];\n\n    if (i == bl_end) {\n      rgap = DBL_EPSILON * fmax( fabs(left), fabs(right) );\n    } else {\n      rgap = Wgap[i];\n    }\n\n    gap = fmin(lgap, rgap);\n\n    if ( i == bl_begin || i == bl_end ) {\n      gaptol = 0.0;\n    } else {\n      gaptol = gap * DBL_EPSILON;\n    }\n\n    /* initialize lower and upper value of support */\n    i_supmn = bl_size;\n    i_supmx = 1;\n\n    /* update Wgap so that it holds minimum gap and save the \n     * old value */\n    savedgap  = Wgap[i];\n    Wgap[i]   = gap;\n    \n    /* initialize flags indicating if bisection or Rayleigh-Quotient\n     * correction was used */\n    usedBS = false;\n    usedRQ = false;\n  \n    /* the need for bisection is initially turned off */\n    needBS = !TRY_RQC;\n\n    /* IEEE floating point is assumed, so that all 0 bits are 0.0 */\n    zind = Zindex[i];\n    memset(&Z[zind*ldz], 0.0, n*sizeof(double));\n\n    /* inverse iteration with twisted factorization */\n    for (k=1; k<=MAXITER; k++) {\n\n      if (needBS == true) {\n\tusedBS = true;\n\titmp   = r;\n\t\n\toffset  = Windex[i] - 1;\n\ttmp     = Wgap[i]; \n\tWgap[i] = 0.0;\n\t\n\todrrb(&bl_size, D, DLL, &i_local, &i_local, &DZERO, \n\t      &twoeps, &offset, &Wshifted[i], &Wgap[i],\n\t      &Werr[i], work, iwork, &pivmin, &bl_spdiam,\n\t      &itmp, &info);\n\tassert(info == 0);\n\t\n\tWgap[i] = tmp;\n\tlambda = Wshifted[i];\n\tr = 0;\n      }\n      wantNC = (usedBS == true) ? false : true;\n\n      /* compute the eigenvector corresponding to lambda */\n      odr1v(&bl_size, &IONE, &bl_size, &lambda, D, L, DL, DLL,\n\t    &pivmin, &gaptol, &Z[zind*ldz+bl_begin], &wantNC,\n\t    &negcount, &ztz, &mingma, &r, &isuppZ[2*zind],\n\t    &norminv, &residual, &RQcorr, work);\n\n      if (k == 1) {\n\tbstres = residual;\n\tbstw   = lambda;\n      } else if (residual < bstres) {\n\tbstres = residual;\n\tbstw   = lambda;\n      }\n      \n      /* update support held */\n      i_supmn = imin(i_supmn, isuppZ[2*zind    ]);\n      i_supmx = imax(i_supmx, isuppZ[2*zind + 1]);\n\n      /* Convergence test for Rayleigh Quotient Iteration\n       * not done if bisection was used */\n      if ( !usedBS && residual > tol*gap \n\t   && fabs(RQcorr) > RQtol*fabs(lambda) ) {\n      \n\tif (i_local <= negcount) {\n\t  sgndef = -1;    /* wanted eigenvalue lies to the left  */\n\t} else {\n\t  sgndef =  1;    /* wanted eigenvalue lies to the right */\n\t}\n\t\n\tif ( RQcorr*sgndef >= 0.0\n\t     && lambda+RQcorr <= right \n\t     && lambda+RQcorr >= left ) {\n\t  usedRQ = true;\n\t  if ( sgndef == 1 )\n\t    left  = lambda;\n\t  else\n\t    right = lambda;\n\t  Wshifted[i] = 0.5*(left + right);\n\t  lambda     += RQcorr;\n\t} else { /* bisection is needed */\n\t  needBS = true;\n\t}\n\t\n\tif ( right-left < RQtol*fabs(lambda) ) {\n\t  /* eigenvalue computed to bisection accuracy\n\t   * => compute eigenvector */\n\t  usedBS = true;\n\t} else if ( k == MAXITER-1 ) {\n\t  /* for last iteration use bisection */\n\t  needBS = true;\n\t}\n      } else {\n\t/* go to next iteration */\n\tbreak;\n      }\n\n    } /* end k */\n\n    /* if necessary call odr1v to improve error angle by 2nd step */\n    step2II = false;\n    if ( usedRQ && usedBS && (bstres <= residual) ) {\n      lambda = bstw;\n      step2II = true;\n    }\n    if ( step2II == true ) {\n      odr1v(&bl_size, &IONE, &bl_size, &lambda, D, L, DL, DLL,\n\t    &pivmin, &gaptol, &Z[zind*ldz+bl_begin], &wantNC,\n\t    &negcount, &ztz, &mingma, &r, &isuppZ[2*zind],\n\t    &norminv, &residual, &RQcorr, work);\n    }\n    Wshifted[i] = lambda;\n\n    /* compute support w.r.t. whole matrix\n     * block beginning is offset for each support */\n    isuppZ[2*zind    ] += bl_begin;\n    isuppZ[2*zind + 1] += bl_begin;\n  \n    /* ensure vector is okay if support changed in RQI \n     * minus ones because of indices starting from zero */\n    i_Zfrom    = isuppZ[2*zind    ] - 1;\n    i_Zto      = isuppZ[2*zind + 1] - 1;\n    i_supmn   += bl_begin - 1;\n    i_supmx   += bl_begin - 1;\n    if ( i_supmn < i_Zfrom ) {\n      for ( k=i_supmn; k < i_Zfrom; k++ ) {\n\tZ[k + zind*ldz] = 0.0;\n      }\n    }\n    if ( i_supmx > i_Zto ) {\n      for ( k=i_Zto+1; k <= i_supmx; k++ ) {\n\tZ[k + zind*ldz] = 0.0;\n      }\n    }\n    \n    /* normalize eigenvector */\n    suppsize = i_Zto - i_Zfrom + 1;\n    pmrrr_dscal(&suppsize, &norminv, &Z[i_Zfrom + zind*ldz], &IONE);\n\n    sigma = L[bl_size-1];\n    W[i]  = lambda + sigma;\n    \n    if (i < end)\n      Wgap[i] = fmax(savedgap, W[i+1]-Werr[i+1] - W[i]-Werr[i]);\n\n  } /* end i */\n\n  /* decrement counter */\n  PMR_decrement_counter(num_left, num_decrement);\n\n  /* clean up */\n  free(sng);\n  PMR_try_destroy_rrr(RRR);\n\n  return(0);\n}\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/queue.c",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <pthread.h>\n#include <assert.h>\n#include \"global.h\"\n#include \"queue.h\"\n\n\n\nqueue_t *PMR_create_empty_queue(void)\n{\n  int     info;\n  queue_t *queue;\n  \n  queue = (queue_t *) malloc(sizeof(queue_t));\n  assert(queue != NULL);\n  \n  queue->num_tasks = 0;\n  queue->head      = NULL;\n  queue->back      = NULL;\n  \n#ifdef NOSPINLOCKS\n  info = pthread_mutex_init(&queue->lock, NULL);\n#else\n  info = pthread_spin_init(&queue->lock, PTHREAD_PROCESS_PRIVATE);\n#endif\n  assert(info == 0);\n\n  return(queue);\n}\n\n\n\nvoid PMR_destroy_queue(queue_t *queue)\n{\n#ifdef NOSPINLOCKS\n  pthread_mutex_destroy(&queue->lock);\n#else\n  pthread_spin_destroy(&queue->lock);\n#endif\n  free(queue);\n}\n\n\n\nint PMR_insert_task_at_front(queue_t *queue, task_t *task)\n{\n  int info;\n  \n#ifdef NOSPINLOCKS\n  info = pthread_mutex_lock(&queue->lock);\n#else\n  info = pthread_spin_lock(&queue->lock);\n#endif\n  assert(info == 0);\n\n  queue->num_tasks++;\n\n  task->next = queue->head;\n  if (queue->head == NULL)\n    queue->back = task;\n  else\n    queue->head->prev = task;\n  queue->head = task;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_unlock(&queue->lock);\n#else\n  info = pthread_spin_unlock(&queue->lock);\n#endif\n  assert( info == 0);\n\n  return(info);\n}\n\n\n\nint PMR_insert_task_at_back(queue_t *queue, task_t *task)\n{\n  int info;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_lock(&queue->lock);\n#else\n  info = pthread_spin_lock(&queue->lock);\n#endif\n  assert(info == 0);\n\n  queue->num_tasks++;\n\n  task->prev = queue->back;\n  task->next = NULL;\n  if (queue->head == NULL)\n    queue->head = task;\n  else\n    queue->back->next = task;\n  queue->back = task;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_unlock(&queue->lock);\n#else\n  info = pthread_spin_unlock(&queue->lock);\n#endif\n  assert(info == 0);\n  \n  return(info);\n}\n\n\n\ntask_t *PMR_remove_task_at_front(queue_t *queue)\n{\n  int    info;\n  task_t *task;\n  \n#ifdef NOSPINLOCKS\n  info = pthread_mutex_lock(&queue->lock);\n#else\n  info = pthread_spin_lock(&queue->lock);\n#endif\n  assert(info == 0);\n  \n  task = queue->head;\n\n  if (queue->head != NULL) {\n    /* at least one element */\n    queue->num_tasks--;\n    if (queue->head->next == NULL) {\n      /* last task removed */\n      queue->head = NULL;\n      queue->back = NULL;\n    } else {\n      /* at least two tasks */\n      queue->head->next->prev = NULL;\n      queue->head = queue->head->next;\n    }\n  }\n  \n#ifdef NOSPINLOCKS\n  info = pthread_mutex_unlock(&queue->lock);\n#else\n  info = pthread_spin_unlock(&queue->lock);\n#endif\n  assert(info == 0);\n  \n  return(task);\n  /* returns NULL when empty */\n}\n\n\n\ntask_t *PMR_remove_task_at_back (queue_t *queue)\n{\n  int    info;\n  task_t *task;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_lock(&queue->lock);\n#else\n  info = pthread_spin_lock(&queue->lock);\n#endif\n  assert(info == 0);\n  \n  task = queue->back;\n\n  if (queue->back != NULL) {\n    /* at least one element */\n    queue->num_tasks--;\n    if (queue->back->prev == NULL) {\n      /* last task removed */\n      queue->head = NULL;\n      queue->back = NULL;\n    } else {\n      /* at least two tasks */\n      queue->back->prev->next = NULL;\n      queue->back = queue->back->prev;\n    }\n  }\n  \n#ifdef NOSPINLOCKS\n  info = pthread_mutex_unlock(&queue->lock);\n#else\n  info = pthread_spin_unlock(&queue->lock);\n#endif\n  assert(info == 0);\n\n  return(task);\n  /* returns NULL when empty */\n}\n\n\n\nint PMR_get_num_tasks(queue_t *queue)\n{\n  int info, num_tasks;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_lock(&queue->lock);\n#else\n  info = pthread_spin_lock(&queue->lock);\n#endif\n  assert(info == 0);\n\n  num_tasks = queue->num_tasks;\n\n#ifdef NOSPINLOCKS\n  info = pthread_mutex_unlock(&queue->lock);\n#else\n  info = pthread_spin_unlock(&queue->lock);\n#endif\n  assert(info == 0);\n\n  return(num_tasks);\n}\n\n\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/rrr.c",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <assert.h>\n#include \"rrr.h\"\n#include \"global.h\"\n\n\n\nrrr_t *PMR_create_rrr(double *restrict D, double *restrict L,\n\t\t      double *restrict DL, double *restrict DLL,\n\t\t      int size, int depth)\n{\n  int   info;\n  rrr_t *RRR;\n\n  RRR = (rrr_t *) malloc( sizeof(rrr_t) );\n  assert(RRR != NULL);\n\n  RRR->D                 = D;\n  RRR->L                 = L;\n  RRR->DL                = DL;\n  RRR->DLL               = DLL;\n  RRR->size              = size;\n  RRR->depth             = depth;\n  RRR->parent_processed  = false;\n  RRR->copied_parent_rrr = false;\n  RRR->ndepend           = 0;\n\n  info = pthread_mutex_init(&RRR->mutex, NULL);\n  assert(info == 0);\n\n  return(RRR);\n}\n\n\n \nrrr_t *PMR_reset_rrr(rrr_t *RRR, double *restrict D, \n\t\t     double *restrict L, double *restrict DL, \n\t\t     double *restrict DLL, int size, int depth)\n{\n  RRR->D                = D;\n  RRR->L                = L;\n  RRR->DL               = DL;\n  RRR->DLL              = DLL;\n  RRR->size             = size;\n  RRR->depth            = depth;\n  RRR->parent_processed = false;\n\n  return(RRR);\n}\n\n\n\nint PMR_increment_rrr_dependencies(rrr_t *RRR)\n{\n  /* returns number of dependencies */\n  int i, info;\n\n  info = pthread_mutex_lock(&RRR->mutex);\n  assert(info == 0);\n  \n  RRR->ndepend++;\n  i = RRR->ndepend;\n  \n  info = pthread_mutex_unlock(&RRR->mutex);\n  assert(info == 0);\n  \n  return(i);\n}\n\n\n\nint PMR_set_parent_processed_flag(rrr_t *RRR)\n{\n  int info;\n  \n  info = pthread_mutex_lock(&RRR->mutex);\n  assert(info == 0);\n  \n  RRR->parent_processed = true;\n  \n  info = pthread_mutex_unlock(&RRR->mutex);\n  assert(info == 0);\n\n  return(info);\n}\n\n\n\nint PMR_set_copied_parent_rrr_flag(rrr_t *RRR, bool val)\n{\n  int info;\n  \n  info = pthread_mutex_lock(&RRR->mutex);\n  assert(info == 0);\n  \n  RRR->copied_parent_rrr = val;\n  \n  info = pthread_mutex_unlock(&RRR->mutex);\n  assert(info == 0);\n\n  return(info);\n}\n\n\n\nint PMR_try_destroy_rrr(rrr_t *RRR)\n{\n  /* return 0 on success, otherwise 1 */\n  \n  int info, tmp=0;\n\n  info = pthread_mutex_lock(&RRR->mutex);\n  assert(info == 0);\n\n  RRR->ndepend--;\n\n  if (RRR->ndepend == 0 &&\n      RRR->parent_processed == true) {\n\n    if (RRR->depth >0) {\n      free(RRR->D);\n      free(RRR->L);\n    }\n\n    if (RRR->depth >=0) {\n      free(RRR->DL);\n      free(RRR->DLL);\n    }\n    \n    tmp = 1;\n  }\n  \n  info = pthread_mutex_unlock(&RRR->mutex);\n  assert(info == 0);\n\n  if (tmp == 1) {\n    free(RRR);\n    return(0);\n  } else {\n    return(1);\n  }\n}\n\n"
  },
  {
    "path": "src/madness/external/elemental/external/pmrrr/src/tasks.c",
    "content": "/* Copyright (c) 2010, RWTH Aachen University\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or \n * without modification, are permitted provided that the following\n * conditions are met:\n *   * Redistributions of source code must retain the above \n *     copyright notice, this list of conditions and the following\n *     disclaimer.\n *   * Redistributions in binary form must reproduce the above \n *     copyright notice, this list of conditions and the following \n *     disclaimer in the documentation and/or other materials \n *     provided with the distribution.\n *   * Neither the name of the RWTH Aachen University nor the\n *     names of its contributors may be used to endorse or promote \n *     products derived from this software without specific prior \n *     written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS \n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RWTH \n * AACHEN UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \n * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT \n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n * SUCH DAMAGE.\n *\n * Coded by Matthias Petschow (petschow@aices.rwth-aachen.de),\n * August 2010, Version 0.6\n *\n * This code was the result of a collaboration between \n * Matthias Petschow and Paolo Bientinesi. When you use this \n * code, kindly reference a paper related to this work.\n *\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <assert.h>\n#include \"global.h\"\n#include \"tasks.h\"\n#include \"rrr.h\"\n\n\ntask_t *PMR_create_s_task(int first, int last, int depth,\n\t\t\t  int bl_begin, int bl_end, \n\t\t\t  double spdiam, double lgap, rrr_t *RRR)\n{\n  task_t      *t;\n  singleton_t *s;\n\n  t = (task_t *) malloc(sizeof(task_t));\n  assert(t != NULL);\n  \n  s = (singleton_t *) malloc( sizeof(singleton_t) );\n  assert(s != NULL);\n\n  s->begin        = first;\n  s->end          = last;\n  s->depth        = depth;  \n  s->bl_begin     = bl_begin;\n  s->bl_end       = bl_end;\n  s->bl_spdiam    = spdiam;\n  s->lgap         = lgap;\n  s->RRR          = RRR;\n\n  t->data = (void *) s;\n  t->flag = SINGLETON_TASK_FLAG;\n  t->next = NULL;\n  t->prev = NULL;\n\n  return(t);\n}\n\n\ntask_t *PMR_create_c_task(int first, int last, int depth, \n\t\t\t  int bl_begin, int bl_end, double spdiam,\n\t\t\t  double lgap, int proc_W_begin, \n\t\t\t  int proc_W_end, int lpid, int rpid, \n\t\t\t  rrr_t *RRR)\n{\n  task_t    *t;\n  cluster_t *c;\n\n  t = (task_t *) malloc(sizeof(task_t));\n  assert(t != NULL);\n  \n  c = (cluster_t *) malloc( sizeof(cluster_t) );\n  assert(c != NULL);\n\n  c->begin              = first;\n  c->end                = last;\n  c->depth              = depth;  \n  c->bl_begin           = bl_begin;\n  c->bl_end             = bl_end;\n  c->bl_spdiam          = spdiam;\n  c->lgap               = lgap;\n  c->proc_W_begin       = proc_W_begin;\n  c->proc_W_end         = proc_W_end;\n  c->left_pid           = lpid;\n  c->right_pid          = rpid;\n  c->RRR                = RRR;\n  c->wait_until_refined = false;\n\n  t->data = (void *) c;\n  t->flag = CLUSTER_TASK_FLAG;\n  t->next = NULL;\n  t->prev = NULL;\n\n  return(t);\n}\n\n\n\ntask_t *PMR_create_r_task(int begin, int end, double *D,\n\t\t\t  double *DLL, int p, int q, int bl_size,\n\t\t\t  double bl_spdiam, int tid, sem_t *sem)\n{\n  task_t   *t;\n  refine_t *r;\n\n  t = (task_t *) malloc(sizeof(task_t));\n  assert(t != NULL);\n  \n  r = (refine_t *) malloc( sizeof(refine_t) );\n  assert(r != NULL); \n\n  r->begin        = begin;\n  r->end          = end;\n  r->D            = D;\n  r->DLL          = DLL;\n  r->p            = p;\n  r->q            = q;\n  r->bl_size      = bl_size;\n  r->bl_spdiam    = bl_spdiam;\n  r->producer_tid = tid;\n  r->sem          = sem;\n\n  t->data = (void *) r;\n  t->flag = REFINE_TASK_FLAG;\n  t->next = NULL;\n  t->prev = NULL;\n\n  return(t);\n}\n"
  },
  {
    "path": "src/madness/external/elemental/include/README.md",
    "content": "### `include/`\n\nThis is the root of the include folder, which is where most of the library is \ncontained. In addition to this README, this folder holds:\n\n-  `elemental/`: the supporting header files\n-  `elemental.hpp`: the catch-all header file (users should start by just \n   including this)\n-  `elemental-lite.hpp`: the minimal header file, which can be used in \n   combination with manually including header files from `elemental/` in order\n   to decrease build times\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/README.md",
    "content": "### `include/elemental/`\n\n-  `blas-like/`: BLAS-like functionality (e.g., GEMM)\n-  `control/`: solvers for control theory (e.g., Sylvester equations)\n-  `convex/`: convex optimization routines (e.g., SVT)\n-  `core/`: core data structures (e.g., `DistMatrix`)\n-  `io/`: input/output functionality (e.g., printing and visualization)\n-  `lapack-like/`: LAPACK-like functionality (e.g., SVD)\n-  `matrices/`: special matrices (e.g., uniform random, Wilkinson, etc.)\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/README.md",
    "content": "### `include/elemental/blas-like/`\n\n- `decl.hpp`: include all declarations of BLAS-like routines\n- `impl.hpp`: include all implementations of BLAS-like routines\n\nElemental's BLAS-like functionality is categorized into the typical 'levels':\n\n-  level 1: operations with essentially no data reuse (e.g., DOT)\n-  level 2: matrix/vector-like operations (e.g., GEMV)\n-  level 3: matrix/matrix-like operations (e.g., GEMM)\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLAS_DECL_HPP\n#define ELEM_BLAS_DECL_HPP\n\nnamespace elem {\n\ntemplate<typename T>\nvoid Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C );\ntemplate<typename T>\nvoid Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C );\ntemplate<typename T>\nvoid LocalTrrk\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T,MC,  STAR>& A,\n           const DistMatrix<T,STAR,MR  >& B,\n  T beta,        DistMatrix<T,MC,  MR  >& C );\ntemplate<typename T>\nvoid LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T,MC,STAR>& A,\n           const DistMatrix<T,MR,STAR>& B,\n  T beta,        DistMatrix<T>& C );\ntemplate<typename T>\nvoid LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  T alpha, const DistMatrix<T,STAR,MC>& A,\n           const DistMatrix<T,STAR,MR>& B,\n  T beta,        DistMatrix<T,MC,  MR>& C );\ntemplate<typename T>\nvoid LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T,STAR,MC  >& A,\n           const DistMatrix<T,MR,  STAR>& B,\n  T beta,        DistMatrix<T,MC,  MR  >& C );\n\ntemplate<typename T>\nvoid Trr2k\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC, Orientation orientationOfD,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n           const Matrix<T>& C, const Matrix<T>& D,\n  T beta,        Matrix<T>& E );\ntemplate<typename T>\nvoid Trr2k\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC, Orientation orientationOfD,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E );\n\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T,MC,  STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,  STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,  STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,  STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  T alpha, const DistMatrix<T,MC,  STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC  >& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,  STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC  >& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T,MC,  STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,  STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T,MC,MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  T alpha, const DistMatrix<T,MC,  STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC  >& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,  STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC  >& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  T alpha, const DistMatrix<T,STAR,MC  >& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,  STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC  >& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,  STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T,MC,  MR>& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T,MC,  MR>& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T,STAR,MC  >& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,  STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC  >& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,  STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T,MC,  MR  >& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T,MC,  MR>& E  );\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T,MC,  MR>& E  );\n\n\nnamespace internal {\n\ntemplate<typename T>\nvoid TrrkNN\n( UpperOrLower uplo,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C );\ntemplate<typename T>\nvoid TrrkNT\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C );\ntemplate<typename T>\nvoid TrrkTN\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C );\ntemplate<typename T>\nvoid TrrkTT\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C );\n\n} // namespace internal\n\n//----------------------------------------------------------------------------//\n// Tuning parameters                                                          //\n//----------------------------------------------------------------------------//\n\ntemplate<typename T> void SetLocalSymvBlocksize( Int blocksize );\ntemplate<> void SetLocalSymvBlocksize<float>( Int blocksize );\ntemplate<> void SetLocalSymvBlocksize<double>( Int blocksize );\ntemplate<> void SetLocalSymvBlocksize<Complex<float>>( Int blocksize );\ntemplate<> void SetLocalSymvBlocksize<Complex<double>>( Int blocksize );\n\ntemplate<typename T> void SetLocalTrrkBlocksize( Int blocksize );\ntemplate<> void SetLocalTrrkBlocksize<float>( Int blocksize );\ntemplate<> void SetLocalTrrkBlocksize<double>( Int blocksize );\ntemplate<> void \nSetLocalTrrkBlocksize<Complex<float>>( Int blocksize );\ntemplate<> void \nSetLocalTrrkBlocksize<Complex<double>>( Int blocksize );\n\ntemplate<typename T> void SetLocalTrr2kBlocksize( Int blocksize );\ntemplate<> void SetLocalTrr2kBlocksize<float>( Int blocksize );\ntemplate<> void SetLocalTrr2kBlocksize<double>( Int blocksize );\ntemplate<> void SetLocalTrr2kBlocksize<Complex<float>>( Int blocksize );\ntemplate<> void SetLocalTrr2kBlocksize<Complex<double>>( Int blocksize );\n\ntemplate<typename T> Int LocalSymvBlocksize();\ntemplate<> Int LocalSymvBlocksize<float>();\ntemplate<> Int LocalSymvBlocksize<double>();\ntemplate<> Int LocalSymvBlocksize<Complex<float>>();\ntemplate<> Int LocalSymvBlocksize<Complex<double>>();\n\ntemplate<typename T> Int LocalTrrkBlocksize();\ntemplate<> Int LocalTrrkBlocksize<float>();\ntemplate<> Int LocalTrrkBlocksize<double>();\ntemplate<> Int LocalTrrkBlocksize<Complex<float>>();\ntemplate<> Int LocalTrrkBlocksize<Complex<double>>();\n\ntemplate<typename T> Int LocalTrr2kBlocksize();\ntemplate<> Int LocalTrr2kBlocksize<float>();\ntemplate<> Int LocalTrr2kBlocksize<double>();\ntemplate<> Int LocalTrr2kBlocksize<Complex<float>>();\ntemplate<> Int LocalTrr2kBlocksize<Complex<double>>();\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLAS_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLAS_IMPL_HPP\n#define ELEM_BLAS_IMPL_HPP\n\n#include \"elemental/matrices/decl.hpp\"\n#include \"elemental/matrices/Identity.hpp\"\n#include \"elemental/matrices/Zeros.hpp\"\n\n#include \"./level1.hpp\"\n#include \"./level2.hpp\"\n#include \"./level3.hpp\"\n\n#endif // ifndef ELEM_BLAS_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Adjoint.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_ADJOINT_HPP\n#define ELEM_ADJOINT_HPP\n\n#include \"./Transpose.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nAdjoint( const Matrix<T>& A, Matrix<T>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Adjoint\"))\n    Transpose( A, B, true );\n}\n\ntemplate<typename T,Dist U,Dist V,\n                    Dist W,Dist Z>\ninline void\nAdjoint( const DistMatrix<T,U,V>& A, DistMatrix<T,W,Z>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Adjoint\"))\n    Transpose( A, B, true );\n}\n\ntemplate<typename T,Dist U,Dist V,\n                    Dist W,Dist Z>\ninline void\nAdjoint( const BlockDistMatrix<T,U,V>& A, BlockDistMatrix<T,W,Z>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Adjoint\"))\n    Transpose( A, B, true );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_ADJOINT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Axpy.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_AXPY_HPP\n#define ELEM_AXPY_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nAxpy( T alpha, const Matrix<T>& X, Matrix<T>& Y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Axpy\"))\n    // If X and Y are vectors, we can allow one to be a column and the other\n    // to be a row. Otherwise we force X and Y to be the same dimension.\n    if( X.Height()==1 || X.Width()==1 )\n    {\n        const Int XLength = ( X.Width()==1 ? X.Height() : X.Width() );\n        const Int XStride = ( X.Width()==1 ? 1          : X.LDim() );\n        const Int YStride = ( Y.Width()==1 ? 1          : Y.LDim() );\n        DEBUG_ONLY(\n            const Int YLength = ( Y.Width()==1 ? Y.Height() : Y.Width() );\n            if( XLength != YLength )\n                LogicError(\"Nonconformal Axpy\");\n        )\n        blas::Axpy\n        ( XLength, alpha, X.LockedBuffer(), XStride, Y.Buffer(), YStride );\n    }\n    else\n    {\n        DEBUG_ONLY(\n            if( X.Height() != Y.Height() || X.Width() != Y.Width() )\n                LogicError(\"Nonconformal Axpy\");\n        )\n        if( X.Width() <= X.Height() )\n        {\n            for( Int j=0; j<X.Width(); ++j )\n            {\n                blas::Axpy\n                ( X.Height(), alpha, X.LockedBuffer(0,j), 1, Y.Buffer(0,j), 1 );\n            }\n        }\n        else\n        {\n            for( Int i=0; i<X.Height(); ++i )\n            {\n                blas::Axpy\n                ( X.Width(), alpha, X.LockedBuffer(i,0), X.LDim(),\n                                    Y.Buffer(i,0),       Y.LDim() );\n            }\n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nAxpy( Base<T> alpha, const Matrix<T>& X, Matrix<T>& Y )\n{ Axpy( T(alpha), X, Y ); }\n\ntemplate<typename T,Dist U1,Dist V1,\n                    Dist U2,Dist V2>\ninline void\nAxpy( T alpha, const DistMatrix<T,U1,V1>& X, DistMatrix<T,U2,V2>& Y )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Axpy\");\n        if( X.Grid() != Y.Grid() )\n            LogicError(\"X and Y must be distributed over the same grid\");\n    )\n    if( U1 == V1 && U2 == V2 && \n        X.ColAlign() == Y.ColAlign() && X.RowAlign() == Y.RowAlign() )\n    {\n        Axpy( alpha, X.LockedMatrix(), Y.Matrix() );\n    }\n    else\n    {\n        DistMatrix<T,U2,V2> XCopy( X.Grid() );\n        XCopy.AlignWith( Y );\n        XCopy = X;\n        Axpy( alpha, XCopy.LockedMatrix(), Y.Matrix() );\n    }\n}\n\ntemplate<typename T,Dist U1,Dist V1,\n                    Dist U2,Dist V2>\ninline void\nAxpy\n( Base<T> alpha,\n  const DistMatrix<T,U1,V1>& X, DistMatrix<T,U2,V2>& Y )\n{ Axpy( T(alpha), X, Y ); }\n\n} // namespace elem\n\n#endif // ifndef ELEM_AXPY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/AxpyTriangle.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_AXPYTRIANGLE_HPP\n#define ELEM_AXPYTRIANGLE_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nAxpyTriangle( UpperOrLower uplo, T alpha, const Matrix<T>& X, Matrix<T>& Y )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"AxpyTriangle\");\n        if( X.Height() != X.Width() || Y.Height() != Y.Width() || \n            X.Height() != Y.Height() )\n            LogicError(\"Nonconformal AxpyTriangle\");\n    )\n    if( uplo == UPPER )\n    {\n        for( Int j=0; j<X.Width(); ++j )\n            blas::Axpy( j+1, alpha, X.LockedBuffer(0,j), 1, Y.Buffer(0,j), 1 );\n    }\n    else\n    {\n        const Int n = X.Height();\n        for( Int j=0; j<X.Width(); ++j )\n            blas::Axpy( n-j, alpha, X.LockedBuffer(j,j), 1, Y.Buffer(j,j), 1 );\n    }\n}\n\ntemplate<typename T>\ninline void\nAxpyTriangle\n( UpperOrLower uplo, Base<T> alpha, \n  const Matrix<T>& X, Matrix<T>& Y )\n{ AxpyTriangle( uplo, T(alpha), X, Y ); }\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nAxpyTriangle\n( UpperOrLower uplo, T alpha, const DistMatrix<T,U,V>& X, DistMatrix<T,U,V>& Y )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"AxpyTriangle\");\n        if( X.Grid() != Y.Grid() )\n            LogicError\n            (\"X and Y must be distributed over the same grid\");\n        if( X.Height() != X.Width() || Y.Height() != Y.Width() || \n            X.Height() != Y.Height() )\n            LogicError(\"Nonconformal AxpyTriangle\");\n    )\n    if( X.ColAlign() == Y.ColAlign() && X.RowAlign() == Y.RowAlign() )\n    {\n        const Int localHeight = X.LocalHeight();\n        const Int localWidth = X.LocalWidth();\n        const T* XBuffer = X.LockedBuffer();\n        T* YBuffer = Y.Buffer();\n        const Int XLDim = X.LDim();\n        const Int YLDim = Y.LDim();\n        if( uplo == UPPER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = X.GlobalCol(jLoc);\n                const Int localHeightAbove = X.LocalRowOffset(j+1);\n                blas::Axpy\n                ( localHeightAbove, alpha, \n                  &XBuffer[jLoc*XLDim], 1, &YBuffer[jLoc*YLDim], 1 );\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = X.GlobalCol(jLoc);\n                const Int localHeightAbove = X.LocalRowOffset(j);\n                const Int localHeightBelow = localHeight - localHeightAbove;\n                blas::Axpy\n                ( localHeightBelow, alpha, \n                  &XBuffer[localHeightAbove+jLoc*XLDim], 1,\n                  &YBuffer[localHeightAbove+jLoc*YLDim], 1 );\n            }\n        }\n    }\n    else\n    {\n        DistMatrix<T,U,V> XCopy( X.Grid() );\n        XCopy.AlignWith( Y );\n        XCopy = X;\n        AxpyTriangle( uplo, alpha, XCopy, Y );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nAxpyTriangle\n( UpperOrLower uplo, Base<T> alpha,\n  const DistMatrix<T,U,V>& X, DistMatrix<T,U,V>& Y )\n{ AxpyTriangle( uplo, T(alpha), X, Y ); }\n\n} // namespace elem\n\n#endif // ifndef ELEM_AXPYTRIANGLE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Conjugate.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONJUGATE_HPP\n#define ELEM_CONJUGATE_HPP\n\nnamespace elem {\n\n// Default case is for real datatypes\ntemplate<typename Z>\ninline void\nConjugate( Matrix<Z>& A )\n{ }\n\n// Specialization is to complex datatypes\ntemplate<typename Z>\ninline void\nConjugate( Matrix<Complex<Z>>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Conjugate (in-place)\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            A.Set(i,j,Conj(A.Get(i,j)));\n}\n\ntemplate<typename T>\ninline void\nConjugate( const Matrix<T>& A, Matrix<T>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Conjugate\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    B.Resize( m, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            B.Set(i,j,Conj(A.Get(i,j)));\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nConjugate( DistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Conjugate (in-place)\"))\n    Conjugate( A.Matrix() );\n}\n\ntemplate<typename T,Dist U,Dist V,\n                    Dist W,Dist Z>\ninline void\nConjugate( const DistMatrix<T,U,V>& A, DistMatrix<T,W,Z>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Conjugate\"))\n    B = A;\n    Conjugate( B );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CONJUGATE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Copy.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_COPY_HPP\n#define ELEM_COPY_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nCopy( const Matrix<T>& A, Matrix<T>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Copy\"))\n    B = A;\n}\n\ntemplate<typename Real>\ninline void\nCopy( const Matrix<Real>& A, Matrix<Complex<Real>>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Copy\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    B.Resize( m, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            B.Set( i, j, A.Get(i,j) );\n}\n\ntemplate<typename T,Dist U,Dist V,Dist W,Dist Z>\ninline void\nCopy( const DistMatrix<T,U,V>& A, DistMatrix<T,W,Z>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Copy\"))\n    B = A;\n}\n\ntemplate<typename Real,Dist U,Dist V,Dist W,Dist Z>\ninline void\nCopy( const DistMatrix<Real,U,V>& A, DistMatrix<Complex<Real>,W,Z>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Copy\"))\n\n    if( U == W && V == Z )\n    {\n        if( !B.ColConstrained() )\n            B.AlignCols( A.ColAlign() );\n        if( !B.RowConstrained() )\n            B.AlignRows( A.RowAlign() );\n        if( A.ColAlign() == B.ColAlign() && A.RowAlign() == B.RowAlign() )\n        {\n            B.Resize( A.Height(), A.Width() );\n            Copy( A.LockedMatrix(), B.Matrix() );\n            return;\n        }\n    }\n\n    DistMatrix<Real,W,Z> BReal(A.Grid());\n    BReal.AlignWith( B );\n    BReal = A;\n    B.Resize( A.Height(), A.Width() );\n    Copy( BReal.LockedMatrix(), B.Matrix() );\n}\n\ntemplate<typename T,Dist U,Dist V,Dist W,Dist Z>\ninline void\nCopy( const BlockDistMatrix<T,U,V>& A, BlockDistMatrix<T,W,Z>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Copy\"))\n    B = A;\n}\n\ntemplate<typename Real,Dist U,Dist V,Dist W,Dist Z>\ninline void\nCopy\n( const BlockDistMatrix<Real,U,V>& A, BlockDistMatrix<Complex<Real>,W,Z>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Copy\"))\n\n    if( U == W && V == Z )\n    {\n        if( !B.ColConstrained() )\n            B.AlignCols( A.ColAlign() );\n        if( !B.RowConstrained() )\n            B.AlignRows( A.RowAlign() );\n        if( A.ColAlign() == B.ColAlign() && \n            A.RowAlign() == B.RowAlign() && \n            A.ColCut() == B.ColCut() &&\n            A.RowCut() == B.RowCut() )\n        {\n            B.Resize( A.Height(), A.Width() );\n            Copy( A.LockedMatrix(), B.Matrix() );\n            return;\n        }\n    }\n\n    BlockDistMatrix<Real,W,Z> BReal(A.Grid());\n    BReal.AlignWith( B );\n    BReal = A;\n    B.Resize( A.Height(), A.Width() );\n    Copy( BReal.LockedMatrix(), B.Matrix() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_COPY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/DiagonalScale.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DIAGONALSCALE_HPP\n#define ELEM_DIAGONALSCALE_HPP\n\nnamespace elem {\n\ntemplate<typename T,typename TDiag>\ninline void\nDiagonalScale\n( LeftOrRight side, Orientation orientation,\n  const Matrix<TDiag>& d, Matrix<T>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalScale\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int ldim = X.LDim();\n    if( side == LEFT )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            const T delta = d.Get(i,0);\n            T* XBuffer = X.Buffer(i,0);\n            if( orientation == ADJOINT )\n                for( Int j=0; j<n; ++j )\n                    XBuffer[j*ldim] *= Conj(delta);\n            else\n                for( Int j=0; j<n; ++j )\n                    XBuffer[j*ldim] *= delta;\n        }\n    }\n    else\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            const T delta = d.Get(j,0);\n            T* XBuffer = X.Buffer(0,j);\n            if( orientation == ADJOINT )\n                for( Int i=0; i<m; ++i )\n                    XBuffer[i] *= Conj(delta);\n            else\n                for( Int i=0; i<m; ++i )\n                    XBuffer[i] *= delta;\n        }\n    }\n}\n\ntemplate<typename T,typename TDiag,\n         Dist U,Dist V,\n         Dist W,Dist Z>\ninline void\nDiagonalScale\n( LeftOrRight side, Orientation orientation,\n  const DistMatrix<TDiag,U,V>& d, DistMatrix<T,W,Z>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalScale\"))\n    if( side == LEFT )\n    {\n        DistMatrix<TDiag,W,STAR> d_W_STAR( X.Grid() );\n        if( U == W && V == STAR && d.ColAlign() == X.ColAlign() )\n        {\n            d_W_STAR = LockedView( d );\n        }\n        else\n        {\n            d_W_STAR.AlignWith( X );\n            d_W_STAR = d;\n        }\n        DiagonalScale( LEFT, orientation, d_W_STAR.LockedMatrix(), X.Matrix() );\n    }\n    else\n    {\n        DistMatrix<TDiag,Z,STAR> d_Z_STAR( X.Grid() );\n        if( U == Z && V == STAR && d.ColAlign() == X.RowAlign() )\n        {\n            d_Z_STAR = LockedView( d );\n        }\n        else\n        {\n            d_Z_STAR.AlignWith( X );\n            d_Z_STAR = d;\n        }\n        DiagonalScale\n        ( RIGHT, orientation, d_Z_STAR.LockedMatrix(), X.Matrix() );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_DIAGONALSCALE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/DiagonalScaleTrapezoid.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DIAGONALSCALETRAPEZOID_HPP\n#define ELEM_DIAGONALSCALETRAPEZOID_HPP\n\n#include ELEM_SCALE_INC\n\nnamespace elem {\n\ntemplate<typename T,typename TDiag>\ninline void\nDiagonalScaleTrapezoid\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  const Matrix<TDiag>& d, Matrix<T>& A, Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"DiagonalScaleTrapezoid\");\n        if( side==LEFT && (d.Height()!=A.Height() || d.Width()!=1) )\n            LogicError(\"d should have been a vector of the height of A\");\n        if( side==RIGHT && (d.Height()!=A.Width() || d.Width()!=1) )\n            LogicError(\"d should have been a vector of the width of A\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int diagLength = A.DiagonalLength(offset);\n    const Int ldim = A.LDim();\n    T* ABuf = A.Buffer();\n    const bool conjugate = ( orientation==ADJOINT );\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    if( uplo == LOWER && side == LEFT )\n    {\n        // Scale from the left up to the diagonal\n        for( Int i=iOff; i<m; ++i )\n        {\n            const Int k = i-iOff;\n            const Int j = k+jOff;\n            const TDiag alpha = ( conjugate ? Conj(d.Get(i,0)) : d.Get(i,0) );\n            blas::Scal( Min(j+1,n), alpha, &ABuf[i], ldim );\n        }\n    }\n    else if( uplo == UPPER && side == LEFT )\n    {\n        // Scale from the diagonal to the right\n        for( Int i=0; i<iOff+diagLength; ++i )\n        {\n            const Int k = i-iOff;\n            const Int j = k+jOff;\n            const Int jLeft = Max(j,0);\n            const TDiag alpha = ( conjugate ? Conj(d.Get(i,0)) : d.Get(i,0) );\n            blas::Scal( n-jLeft, alpha, &ABuf[i+jLeft*ldim], ldim );\n        }\n    }\n    else if( uplo == LOWER && side == RIGHT )\n    {\n        // Scale from the diagonal downwards\n        for( Int j=0; j<jOff+diagLength; ++j )\n        {\n            const Int k = j-jOff;\n            const Int i = k+iOff;\n            const Int iTop = Max(i,0);\n            const TDiag alpha = ( conjugate ? Conj(d.Get(j,0)) : d.Get(j,0) );\n            blas::Scal( m-iTop, alpha, &ABuf[iTop+j*ldim], 1 );\n        }\n    }\n    else /* uplo == UPPER && side == RIGHT */\n    {\n        // Scale downward to the diagonal\n        for( Int j=jOff; j<n; ++j )\n        {\n            const Int k = j-jOff;\n            const Int i = k+iOff;\n            const TDiag alpha = ( conjugate ? Conj(d.Get(j,0)) : d.Get(j,0) );\n            blas::Scal( Min(i+1,m), alpha, &ABuf[j*ldim], 1 );\n        }\n    }\n}\n\ntemplate<typename T,typename TDiag,Dist U,Dist V,Dist W,Dist Z>\ninline void\nDiagonalScaleTrapezoid\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation,\n  const DistMatrix<TDiag,U,V>& d, DistMatrix<T,W,Z>& A, Int offset=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalScaleTrapezoid\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int mLoc = A.LocalHeight();\n    const Int nLoc = A.LocalWidth();\n    const bool conjugate = ( orientation==ADJOINT );\n\n    const Int diagLength = A.DiagonalLength(offset);\n    const Int ldim = A.LDim();\n    T* ABuf = A.Buffer();\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    if( side == LEFT )\n    {\n        DistMatrix<TDiag,W,STAR> d_W_STAR( A.Grid() );\n        if( U == W && V == STAR && d.ColAlign() == A.ColAlign() )\n        {\n            d_W_STAR = LockedView( d );\n        }\n        else\n        {\n            d_W_STAR.AlignWith( A );\n            d_W_STAR = d;\n        }\n\n        if( uplo == LOWER )\n        {\n            // Scale from the left up to the diagonal\n            for( Int iLoc=0; iLoc<mLoc; ++iLoc )            \n            {\n                const Int i = A.GlobalRow(iLoc);\n                if( i >= iOff )\n                {\n                    const Int k = i-iOff;\n                    const Int j = k+jOff;\n                    const Int width = Min(j+1,n);\n                    const Int localWidth = A.LocalColOffset(width);\n                    const TDiag alpha = \n                        ( conjugate ? Conj(d_W_STAR.GetLocal(iLoc,0))\n                                    : d_W_STAR.GetLocal(iLoc,0) );\n                    blas::Scal( localWidth, alpha, &ABuf[iLoc], ldim );\n                }\n            }\n        }\n        else\n        {\n            // Scale from the diagonal to the right\n            for( Int iLoc=0; iLoc<mLoc; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                if( i < iOff+diagLength )\n                {\n                    const Int k = i-iOff;\n                    const Int j = k+jOff;\n                    const Int jLeft = Max(j,0);\n                    const Int jLeftLoc = A.LocalColOffset(jLeft);\n                    const TDiag alpha = \n                        ( conjugate ? Conj(d_W_STAR.GetLocal(iLoc,0))\n                                    : d_W_STAR.GetLocal(iLoc,0) );\n                    blas::Scal\n                    ( nLoc-jLeftLoc, alpha, &ABuf[iLoc+jLeftLoc*ldim], ldim );\n                }\n            }\n        }    \n    }\n    else\n    {\n        DistMatrix<TDiag,Z,STAR> d_Z_STAR( A.Grid() );\n        if( U == Z && V == STAR && d.ColAlign() == A.RowAlign() )\n        {\n            d_Z_STAR = LockedView( d );\n        }\n        else\n        {\n            d_Z_STAR.AlignWith( A );\n            d_Z_STAR = d;\n        }\n\n        if( uplo == LOWER )\n        {\n            // Scale from the diagonal downwards\n            for( Int jLoc=0; jLoc<nLoc; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                if( j < jOff+diagLength )\n                {\n                    const Int k = j-jOff;\n                    const Int i = k+iOff;\n                    const Int iTop = Max(i,0);\n                    const Int iTopLoc = A.LocalRowOffset(iTop);\n                    const TDiag alpha = \n                        ( conjugate ? Conj(d_Z_STAR.GetLocal(jLoc,0))\n                                    : d_Z_STAR.GetLocal(jLoc,0) );\n                    blas::Scal\n                    ( mLoc-iTopLoc, alpha, &ABuf[iTopLoc+jLoc*ldim], 1 );\n                }\n            }\n        }\n        else \n        {\n            // Scale downward to the diagonal\n            for( Int jLoc=0; jLoc<nLoc; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                if( j >= jOff )\n                {\n                    const Int k = j-jOff;\n                    const Int i = k+iOff;\n                    const Int height = Min(i+1,m);\n                    const Int localHeight = A.LocalRowOffset(height);\n                    const TDiag alpha = \n                        ( conjugate ? Conj(d_Z_STAR.GetLocal(jLoc,0))\n                                    : d_Z_STAR.GetLocal(jLoc,0) );\n                    blas::Scal( localHeight, alpha, &ABuf[jLoc*ldim], 1 );\n                }\n            }\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_DIAGONALSCALETRAPEZOID_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/DiagonalSolve.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DIAGONALSOLVE_HPP\n#define ELEM_DIAGONALSOLVE_HPP\n\nnamespace elem {\n\ntemplate<typename F,typename FDiag>\ninline void\nDiagonalSolve\n( LeftOrRight side, Orientation orientation,\n  const Matrix<FDiag>& d, Matrix<F>& X, bool checkIfSingular=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalSolve\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int ldim = X.LDim();\n    if( side == LEFT )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            const F delta = d.Get(i,0);\n            if( checkIfSingular && delta == F(0) )\n                throw SingularMatrixException();\n            const F deltaInv = F(1)/delta;\n            F* XBuffer = X.Buffer(i,0);\n            if( orientation == ADJOINT )\n                for( Int j=0; j<n; ++j )\n                    XBuffer[j*ldim] *= Conj(deltaInv);\n            else\n                for( Int j=0; j<n; ++j )\n                    XBuffer[j*ldim] *= deltaInv;\n        }\n    }\n    else\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            const F delta = d.Get(j,0);\n            if( checkIfSingular && delta == F(0) )\n                throw SingularMatrixException();\n            const F deltaInv = F(1)/delta;\n            F* XBuffer = X.Buffer(0,j);\n            if( orientation == ADJOINT )\n                for( Int i=0; i<m; ++i )\n                    XBuffer[i] *= Conj(deltaInv);\n            else\n                for( Int i=0; i<m; ++i )\n                    XBuffer[i] *= deltaInv;\n        }\n    }\n}\n\ntemplate<typename F,typename FDiag,\n         Dist U,Dist V,\n         Dist W,Dist Z>\ninline void\nDiagonalSolve\n( LeftOrRight side, Orientation orientation,\n  const DistMatrix<FDiag,U,V>& d, DistMatrix<F,W,Z>& X,\n  bool checkIfSingular=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalSolve\"))\n    if( side == LEFT )\n    {\n        if( U == W && V == STAR && d.ColAlign() == X.ColAlign() )\n        {\n            DiagonalSolve\n            ( LEFT, orientation, d.LockedMatrix(), X.Matrix(),\n              checkIfSingular );\n        }\n        else\n        {\n            DistMatrix<FDiag,W,STAR> d_W_STAR( X.Grid() );\n            d_W_STAR = d;\n            DiagonalSolve\n            ( LEFT, orientation,\n              d_W_STAR.LockedMatrix(), X.Matrix(), checkIfSingular );\n        }\n    }\n    else\n    {\n        if( U == Z && V == STAR && d.ColAlign() == X.RowAlign() )\n        {\n            DiagonalSolve\n            ( RIGHT, orientation, d.LockedMatrix(), X.Matrix(),\n              checkIfSingular );\n        }\n        else\n        {\n            DistMatrix<FDiag,Z,STAR> d_Z_STAR( X.Grid() );\n            d_Z_STAR = d;\n            DiagonalSolve\n            ( RIGHT, orientation,\n              d_Z_STAR.LockedMatrix(), X.Matrix(), checkIfSingular );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_DIAGONALSOLVE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Dot.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DOT_HPP\n#define ELEM_DOT_HPP\n\n#include \"./HilbertSchmidt.hpp\"\n\nnamespace elem {\n\ntemplate<typename F> \ninline F\nDot( const Matrix<F>& A, const Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Dot\"))\n    return HilbertSchmidt( A, B );\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline F\nDot( const DistMatrix<F,U,V>& A, const DistMatrix<F,U,V>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Dot\"))\n    return HilbertSchmidt( A, B );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_DOT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Dotu.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DOTU_HPP\n#define ELEM_DOTU_HPP\n\nnamespace elem {\n\n// TODO: Think about using a more stable accumulation algorithm?\n\ntemplate<typename F> \ninline F\nDotu( const Matrix<F>& A, const Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Dotu\"))\n    if( A.Height() != B.Height() || A.Width() != B.Width() )\n        LogicError(\"Matrices must be the same size\");\n    F sum(0);\n    const Int width = A.Width();\n    const Int height = A.Height();\n    for( Int j=0; j<width; ++j )\n        for( Int i=0; i<height; ++i )\n            sum += A.Get(i,j)*B.Get(i,j);\n    return sum;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline F\nDotu( const DistMatrix<F,U,V>& A, const DistMatrix<F,U,V>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Dotu\"))\n    if( A.Height() != B.Height() || A.Width() != B.Width() )\n        LogicError(\"Matrices must be the same size\");\n    if( A.Grid() != B.Grid() )\n        LogicError(\"Grids must match\");\n    if( A.ColAlign() != B.ColAlign() || \n        A.RowAlign() != B.RowAlign() )\n        LogicError(\"Matrices must be aligned\");\n\n    F innerProd;\n    if( A.Participating() )\n    {\n        F localInnerProd(0);\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                localInnerProd += A.GetLocal(iLoc,jLoc)*B.GetLocal(iLoc,jLoc);\n        innerProd = mpi::AllReduce( localInnerProd, A.DistComm() );\n    }\n    mpi::Broadcast( innerProd, A.Root(), A.CrossComm() );\n    return innerProd;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_DOTU_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/EntrywiseMap.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_ENTRYWISEMAP_HPP\n#define ELEM_ENTRYWISEMAP_HPP\n\nnamespace elem {\n\ntemplate<typename T,class Function>\ninline void\nEntrywiseMap( Matrix<T>& A, Function func )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"EntrywiseMap\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            A.Set( i, j, func(A.Get(i,j)) );\n}\n\ntemplate<typename T,Dist U,Dist V,class Function>\ninline void\nEntrywiseMap( DistMatrix<T,U,V>& A, Function func )\n{ EntrywiseMap( A.Matrix(), func ); }\n\ntemplate<typename T,Dist U,Dist V,class Function>\ninline void\nEntrywiseMap( BlockDistMatrix<T,U,V>& A, Function func )\n{ EntrywiseMap( A.Matrix(), func ); }\n\n} // namespace elem\n\n#endif // ifndef ELEM_ENTRYWISEMAP_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Hadamard.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HADAMARD_HPP\n#define ELEM_HADAMARD_HPP\n\n// C(i,j) := A(i,j) B(i,j)\n\nnamespace elem {\n\ntemplate<typename T> \ninline void Hadamard( const Matrix<T>& A, const Matrix<T>& B, Matrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hadamard\"))\n    if( A.Height() != B.Height() || A.Width() != B.Width() )\n        LogicError(\"Hadamard product requires equal dimensions\");\n    C.Resize( A.Height(), A.Width() );\n\n    const Int height = A.Height();\n    const Int width = A.Width();\n    for( Int j=0; j<width; ++j )\n        for( Int i=0; i<height; ++i )\n            C.Set( i, j, A.Get(i,j)*B.Get(i,j) );\n}\n\ntemplate<typename T,Dist U,Dist V> \ninline void Hadamard\n( const DistMatrix<T,U,V>& A, const DistMatrix<T,U,V>& B, DistMatrix<T,U,V>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hadamard\"))\n    if( A.Height() != B.Height() || A.Width() != B.Width() )\n        LogicError(\"Hadamard product requires equal dimensions\");\n    if( A.Grid() != B.Grid() )\n        LogicError(\"A and B must have the same grids\");\n    if( A.ColAlign() != B.ColAlign() || A.RowAlign() != B.RowAlign() )\n        LogicError(\"A and B must be aligned\");\n    C.AlignWith( A );\n    C.Resize( A.Height(), A.Width() );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const T alpha = A.GetLocal(iLoc,jLoc); \n            const T beta = B.GetLocal(iLoc,jLoc);\n            C.SetLocal( iLoc, jLoc, alpha*beta );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HADAMARD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/HilbertSchmidt.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HILBERTSCHMIDT_HPP\n#define ELEM_HILBERTSCHMIDT_HPP\n\nnamespace elem {\n\n// TODO: Think about using a more stable accumulation algorithm?\n\ntemplate<typename F> \ninline F\nHilbertSchmidt( const Matrix<F>& A, const Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HilbertSchmidt\"))\n    if( A.Height() != B.Height() || A.Width() != B.Width() )\n        LogicError(\"Matrices must be the same size\");\n    F innerProd(0);\n    const Int width = A.Width();\n    const Int height = A.Height();\n    for( Int j=0; j<width; ++j )\n        for( Int i=0; i<height; ++i )\n            innerProd += Conj(A.Get(i,j))*B.Get(i,j);\n    return innerProd;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline F\nHilbertSchmidt( const DistMatrix<F,U,V>& A, const DistMatrix<F,U,V>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HilbertSchmidt\"))\n    if( A.Height() != B.Height() || A.Width() != B.Width() )\n        LogicError(\"Matrices must be the same size\");\n    if( A.Grid() != B.Grid() )\n        LogicError(\"Grids must match\");\n    if( A.ColAlign() != B.ColAlign() || A.RowAlign() != B.RowAlign() )\n        LogicError(\"Matrices must be aligned\");\n\n    F innerProd;\n    if( A.Participating() )\n    {\n        F localInnerProd(0);\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                localInnerProd += Conj(A.GetLocal(iLoc,jLoc))*\n                                       B.GetLocal(iLoc,jLoc);\n        innerProd = mpi::AllReduce( localInnerProd, A.DistComm() );\n    }\n    mpi::Broadcast( innerProd, A.Root(), A.CrossComm() );\n    return innerProd;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HILBERTSCHMIDT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/MakeHermitian.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MAKEHERMITIAN_HPP\n#define ELEM_MAKEHERMITIAN_HPP\n\n#include ELEM_MAKESYMMETRIC_INC\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nMakeHermitian( UpperOrLower uplo, Matrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeHermitian\"))\n    MakeSymmetric( uplo, A, true );\n}\n\ntemplate<typename T>\ninline void\nMakeHermitian( UpperOrLower uplo, DistMatrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeHermitian\"))\n    MakeSymmetric( uplo, A, true );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MAKEHERMITIAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/MakeReal.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MAKEREAL_HPP\n#define ELEM_MAKEREAL_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nMakeReal( Matrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeReal\"))\n    T* ABuffer = A.Buffer();\n    const Int height = A.Height();\n    const Int width = A.Width();\n    const Int ldim = A.LDim();\n    for( Int j=0; j<width; ++j )\n        for( Int i=0; i<height; ++i )\n            ABuffer[i+j*ldim] = RealPart(ABuffer[i+j*ldim]);\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeReal( DistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeReal\"))\n    MakeReal( A.Matrix() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MAKEREAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/MakeSymmetric.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MAKESYMMETRIC_HPP\n#define ELEM_MAKESYMMETRIC_HPP\n\n#include \"./Axpy.hpp\"\n#include \"./MakeReal.hpp\"\n#include \"./MakeTriangular.hpp\"\n#include \"./SetDiagonal.hpp\"\n#include \"./Transpose.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nMakeSymmetric( UpperOrLower uplo, Matrix<T>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeSymmetric\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make non-square matrix symmetric\");\n\n    Matrix<T> d;\n    A.GetDiagonal( d );\n    if( conjugate )\n        MakeReal( d );\n\n    if( uplo == LOWER )\n        MakeTriangular( LOWER, A );\n    else\n        MakeTriangular( UPPER, A );\n    SetDiagonal( A, T(0) );\n    Matrix<T> ATrans;\n    Transpose( A, ATrans, conjugate );\n    Axpy( T(1), ATrans, A );\n\n    A.SetDiagonal( d );\n}\n\ntemplate<typename T>\ninline void\nMakeSymmetric( UpperOrLower uplo, DistMatrix<T>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeSymmetric\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make non-square matrix symmetric\");\n\n    const Grid& g = A.Grid();\n    DistMatrix<T,MD,STAR> d(g);\n    A.GetDiagonal( d );\n    if( conjugate )\n        MakeReal( d );\n\n    if( uplo == LOWER )\n        MakeTriangular( LOWER, A );\n    else\n        MakeTriangular( UPPER, A );\n    SetDiagonal( A, T(0) );\n    DistMatrix<T> ATrans(g);\n    Transpose( A, ATrans, conjugate );\n    Axpy( T(1), ATrans, A );\n\n    A.SetDiagonal( d );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MAKESYMMETRIC_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/MakeTrapezoidal.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MAKETRAPEZOIDAL_HPP\n#define ELEM_MAKETRAPEZOIDAL_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nMakeTrapezoidal( UpperOrLower uplo, Matrix<T>& A, Int offset=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeTrapezoidal\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    const Int ldim = A.LDim();\n    T* buffer = A.Buffer();\n\n    if( uplo == LOWER )\n    {\n        ELEM_PARALLEL_FOR\n        for( Int j=Max(0,offset+1); j<width; ++j )\n        {\n            const Int lastZeroRow = j-offset-1;\n            const Int numZeroRows = Min( lastZeroRow+1, height );\n            MemZero( &buffer[j*ldim], numZeroRows );\n        }\n    }\n    else\n    {\n        ELEM_PARALLEL_FOR\n        for( Int j=0; j<width; ++j )\n        {\n            const Int firstZeroRow = Max(j-offset+1,0);\n            if( firstZeroRow < height )\n                MemZero( &buffer[firstZeroRow+j*ldim], height-firstZeroRow );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeTrapezoidal( UpperOrLower uplo, DistMatrix<T,U,V>& A, Int offset=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeTrapezoidal\"))\n    const Int height = A.Height();\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n\n    T* buffer = A.Buffer();\n    const Int ldim = A.LDim();\n\n    if( uplo == LOWER )\n    {\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int lastZeroRow = j-offset-1;\n            if( lastZeroRow >= 0 )\n            {\n                const Int boundary = Min( lastZeroRow+1, height );\n                const Int numZeroRows = A.LocalRowOffset(boundary);\n                MemZero( &buffer[jLoc*ldim], numZeroRows );\n            }\n        }\n    }\n    else\n    {\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int firstZeroRow = Max(j-offset+1,0);\n            const Int numNonzeroRows = A.LocalRowOffset(firstZeroRow);\n            if( numNonzeroRows < localHeight )\n            {\n                T* col = &buffer[numNonzeroRows+jLoc*ldim];\n                MemZero( col, localHeight-numNonzeroRows );\n            }\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeTrapezoidal( UpperOrLower uplo, BlockDistMatrix<T,U,V>& A, Int offset=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeTrapezoidal\"))\n    const Int height = A.Height();\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n\n    T* buffer = A.Buffer();\n    const Int ldim = A.LDim();\n\n    if( uplo == LOWER )\n    {\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int lastZeroRow = j-offset-1;\n            if( lastZeroRow >= 0 )\n            {\n                const Int boundary = Min( lastZeroRow+1, height );\n                const Int numZeroRows = A.LocalRowOffset(boundary);\n                MemZero( &buffer[jLoc*ldim], numZeroRows );\n            }\n        }\n    }\n    else\n    {\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int firstZeroRow = Max(j-offset+1,0);\n            const Int numNonzeroRows = A.LocalRowOffset(firstZeroRow);\n            if( numNonzeroRows < localHeight )\n            {\n                T* col = &buffer[numNonzeroRows+jLoc*ldim];\n                MemZero( col, localHeight-numNonzeroRows );\n            }\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MAKETRAPEZOIDAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/MakeTriangular.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MAKETRIANGULAR_HPP\n#define ELEM_MAKETRIANGULAR_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nMakeTriangular( UpperOrLower uplo, Matrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeTriangular\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    const Int ldim = A.LDim();\n    T* buffer = A.Buffer();\n\n    if( uplo == LOWER )\n    {\n        ELEM_PARALLEL_FOR\n        for( Int j=1; j<width; ++j )\n        {\n            const Int numZeroRows = Min( j, height );\n            MemZero( &buffer[j*ldim], numZeroRows );\n        }\n    }\n    else\n    {\n        ELEM_PARALLEL_FOR\n        for( Int j=0; j<Min(width,height); ++j )\n        {\n            const Int firstZeroRow = j+1;\n            MemZero( &buffer[firstZeroRow+j*ldim], height-firstZeroRow );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeTriangular( UpperOrLower uplo, DistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeTriangular\"))\n    const Int height = A.Height();\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n\n    T* buffer = A.Buffer();\n    const Int ldim = A.LDim();\n\n    if( uplo == LOWER )\n    {\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int lastZeroRow = j-1;\n            if( lastZeroRow >= 0 )\n            {\n                const Int boundary = Min( lastZeroRow+1, height );\n                const Int numZeroRows = A.LocalRowOffset(boundary);\n                MemZero( &buffer[jLoc*ldim], numZeroRows );\n            }\n        }\n    }\n    else\n    {\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int firstZeroRow = j+1;\n            const Int numNonzeroRows = A.LocalRowOffset(firstZeroRow);\n            if( numNonzeroRows < localHeight )\n            {\n                T* col = &buffer[numNonzeroRows+jLoc*ldim];\n                MemZero( col, localHeight-numNonzeroRows );\n            }\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeTriangular( UpperOrLower uplo, BlockDistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeTriangular\"))\n    const Int height = A.Height();\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n\n    T* buffer = A.Buffer();\n    const Int ldim = A.LDim();\n\n    if( uplo == LOWER )\n    {\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int lastZeroRow = j-1;\n            if( lastZeroRow >= 0 )\n            {\n                const Int boundary = Min( lastZeroRow+1, height );\n                const Int numZeroRows = A.LocalRowOffset(boundary);\n                MemZero( &buffer[jLoc*ldim], numZeroRows );\n            }\n        }\n    }\n    else\n    {\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int firstZeroRow = j+1;\n            const Int numNonzeroRows = A.LocalRowOffset(firstZeroRow);\n            if( numNonzeroRows < localHeight )\n            {\n                T* col = &buffer[numNonzeroRows+jLoc*ldim];\n                MemZero( col, localHeight-numNonzeroRows );\n            }\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MAKETRIANGULAR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Max.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MAX_HPP\n#define ELEM_MAX_HPP\n\nnamespace elem {\n\ntemplate<typename Real>\ninline ValueInt<Real>\nVectorMax( const Matrix<Real>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"VectorMax\"))\n    const Int m = x.Height();\n    const Int n = x.Width();\n    DEBUG_ONLY(\n        if( m != 1 && n != 1 )\n            LogicError(\"Input should have been a vector\");\n    )\n    ValueInt<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.index = -1;    \n        return pivot;\n    }\n\n    pivot.value = x.Get(0,0);\n    pivot.index = 0;\n    if( n == 1 )\n    {\n        for( Int i=1; i<m; ++i )\n        {\n            const Real value = x.Get(i,0);\n            if( value > pivot.value )\n            {\n                pivot.value = value;\n                pivot.index = i;\n            }\n        }\n    }\n    else\n    {\n        for( Int j=1; j<n; ++j )\n        {\n            const Real value = x.Get(0,j);\n            if( value > pivot.value )\n            {\n                pivot.value = value;\n                pivot.index = j;\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline ValueInt<Real>\nVectorMax( const DistMatrix<Real,U,V>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"VectorMax\"))\n    const Int m = x.Height();\n    const Int n = x.Width();\n    DEBUG_ONLY(\n        if( m != 1 && n != 1 )\n            LogicError(\"Input should have been a vector\");\n        if( !x.Grid().InGrid() )\n            LogicError(\"viewing processes are not allowed\");\n    )\n    ValueInt<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.index = -1;\n        return pivot;\n    }\n \n    ValueInt<Real> localPivot;\n    localPivot.value = x.Get(0,0);\n    localPivot.index = 0;\n    if( x.Participating() )\n    {\n        if( n == 1 )\n        {\n            if( x.RowRank() == x.RowAlign() )\n            {\n                const Int mLocal = x.LocalHeight();\n                for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                {\n                    const Real value = x.GetLocal(iLoc,0);\n                    if( value > localPivot.value )\n                    {\n                        localPivot.value = value;\n                        localPivot.index = x.GlobalRow(iLoc);\n                    }\n                }\n            }\n        }\n        else\n        {\n            if( x.ColRank() == x.ColAlign() )\n            {\n                const Int nLocal = x.LocalWidth();\n                for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n                {\n                    const Real value = x.GetLocal(0,jLoc);\n                    if( value > localPivot.value )\n                    {\n                        localPivot.value = value;\n                        localPivot.index = x.GlobalCol(jLoc);\n                    }\n                }\n            }\n        }\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MaxLocOp<Real>(), x.DistComm() );\n    }\n    mpi::Broadcast( pivot.index, x.Root(), x.CrossComm() );\n    mpi::Broadcast( pivot.value, x.Root(), x.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename Real>\ninline ValueIntPair<Real>\nMax( const Matrix<Real>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Max\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    ValueIntPair<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    pivot.value = A.Get(0,0);\n    pivot.indices[0] = 0;\n    pivot.indices[1] = 0;\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            const Real value = A.Get(i,j);\n            if( value > pivot.value )\n            {\n                pivot.value = value;\n                pivot.indices[0] = i;\n                pivot.indices[1] = j;\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline ValueIntPair<Real>\nMax( const DistMatrix<Real,U,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Max\");\n        if( !A.Grid().InGrid() )\n            LogicError(\"Viewing processes are not allowed\");\n    )\n    ValueIntPair<Real> pivot;\n    if( Min(A.Height(),A.Width()) == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    ValueIntPair<Real> localPivot;\n    localPivot.value = A.Get(0,0);\n    localPivot.indices[0] = 0;\n    localPivot.indices[1] = 0;\n    if( A.Participating() )\n    {\n        // Store the index/value of the local pivot candidate\n        const Int mLocal = A.LocalHeight();\n        const Int nLocal = A.LocalWidth();\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n            {\n                const Real value = A.GetLocal(iLoc,jLoc);\n                if( value > localPivot.value )\n                {\n                    const Int i = A.GlobalRow(iLoc);\n                    localPivot.value = value;\n                    localPivot.indices[0] = i;\n                    localPivot.indices[1] = j;\n                }\n            }\n        }\n\n        // Compute and store the location of the new pivot\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MaxLocPairOp<Real>(), A.DistComm() );\n    }\n    mpi::Broadcast( pivot.indices, 2, A.Root(), A.CrossComm() );\n    mpi::Broadcast( pivot.value, A.Root(), A.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename Real>\ninline ValueIntPair<Real>\nSymmetricMax( UpperOrLower uplo, const Matrix<Real>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SymmetricMax\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Width();\n    ValueIntPair<Real> pivot;\n    if( n == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    pivot.value = A.Get(0,0);\n    pivot.indices[0] = 0;\n    pivot.indices[1] = 0;\n    if( uplo == LOWER )\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            for( Int i=j; i<n; ++i )\n            {\n                const Real value = A.Get(i,j);\n                if( value > pivot.value )\n                {\n                    pivot.value = value;\n                    pivot.indices[0] = i;\n                    pivot.indices[1] = j;\n                }\n            }\n        }\n    }\n    else\n    {\n        for( Int j=0; j<n; ++j ) \n        { \n            for( Int i=0; i<=j; ++i )\n            {\n                const Real value = A.Get(i,j);\n                if( value > pivot.value )\n                {\n                    pivot.value = value;\n                    pivot.indices[0] = i;\n                    pivot.indices[1] = j;\n                }\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline ValueIntPair<Real>\nSymmetricMax( UpperOrLower uplo, const DistMatrix<Real,U,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SymmetricMax\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( !A.Grid().InGrid() )\n            LogicError(\"Viewing processes are not allowed\");\n    )\n    const Int mLocal = A.LocalHeight();\n    const Int nLocal = A.LocalWidth();\n\n    ValueIntPair<Real> pivot;\n    if( A.Height() == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    ValueIntPair<Real> localPivot;\n    localPivot.value = A.Get(0,0);\n    localPivot.indices[0] = 0;\n    localPivot.indices[1] = 0;\n    if( A.Participating() )\n    {\n        if( uplo == LOWER )\n        {\n            for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int mLocBefore = A.LocalRowOffset(j);\n                for( Int iLoc=mLocBefore; iLoc<mLocal; ++iLoc )\n                {\n                    const Real value = A.GetLocal(iLoc,jLoc);\n                    if( value > localPivot.value )\n                    {\n                        const Int i = A.GlobalRow(iLoc);\n                        localPivot.value = value;\n                        localPivot.indices[0] = i;\n                        localPivot.indices[1] = j;\n                    }\n                }\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int mLocBefore = A.LocalRowOffset(j+1);\n                for( Int iLoc=0; iLoc<mLocBefore; ++iLoc )\n                {\n                    const Real value = A.GetLocal(iLoc,jLoc);\n                    if( value > localPivot.value )\n                    {\n                        const Int i = A.GlobalRow(iLoc);\n                        localPivot.value = value;\n                        localPivot.indices[0] = i;\n                        localPivot.indices[1] = j;\n                    }\n                }\n            }\n        }\n\n        // Compute and store the location of the new pivot\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MaxLocPairOp<Real>(), A.DistComm() );\n    }\n    mpi::Broadcast( pivot.indices, 2, A.Root(), A.CrossComm() );\n    mpi::Broadcast( pivot.value, A.Root(), A.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nDiagonalMax( const Matrix<Real>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalMax\"))\n    return VectorMax( A.GetDiagonal() );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline ValueInt<Real>\nDiagonalMax( const DistMatrix<Real,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalMax\"))\n    return VectorMax( A.GetDiagonal() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MAX_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/MaxAbs.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MAXABS_HPP\n#define ELEM_MAXABS_HPP\n\nnamespace elem {\n\n// TODO: Add options for FastAbs instead of Abs\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nVectorMaxAbs( const Matrix<F>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"VectorMaxAbs\"))\n    typedef Base<F> Real;\n    const Int m = x.Height();\n    const Int n = x.Width();\n    DEBUG_ONLY(\n        if( m != 1 && n != 1 )\n            LogicError(\"Input should have been a vector\");\n    )\n\n    ValueInt<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.index = -1;\n        return pivot;\n    }\n\n    pivot.value = 0;\n    pivot.index = 0;\n    if( n == 1 )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            const Real abs = Abs(x.Get(i,0));\n            if( abs > pivot.value )\n            {\n                pivot.index = i;\n                pivot.value = abs;\n            }\n        }\n    }\n    else\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            const Real abs = Abs(x.Get(0,j));\n            if( abs > pivot.value )\n            {\n                pivot.index = j;\n                pivot.value = abs;\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline ValueInt<Base<F>>\nVectorMaxAbs( const DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"VectorMaxAbs\"))\n    typedef Base<F> Real;\n    const Int m = x.Height();\n    const Int n = x.Width();\n    DEBUG_ONLY(\n        if( m != 1 && n != 1 )\n            LogicError(\"Input should have been a vector\");\n        if( !x.Grid().InGrid() )\n            LogicError(\"Viewing processes are not allowed\");\n    )\n    ValueInt<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.index = -1;\n        pivot.value = 0;\n        return pivot;\n    }\n\n    if( x.Participating() )\n    {\n        ValueInt<Real> localPivot;\n        localPivot.index = 0;\n        localPivot.value = 0;\n        if( n == 1 )\n        {\n            if( x.RowRank() == x.RowAlign() )\n            {\n                const Int mLocal = x.LocalHeight();\n                for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                {\n                    const Real abs = Abs(x.GetLocal(iLoc,0));\n                    if( abs > localPivot.value )\n                    {\n                        localPivot.index = x.GlobalRow(iLoc);\n                        localPivot.value = abs;\n                    }\n                }\n            }\n        }\n        else\n        {\n            if( x.ColRank() == x.ColAlign() )\n            {\n                const Int nLocal = x.LocalWidth();\n                for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n                {\n                    const Real abs = Abs(x.GetLocal(0,jLoc));\n                    if( abs > localPivot.value )\n                    {\n                        localPivot.index = x.GlobalCol(jLoc);\n                        localPivot.value = abs;\n                    }\n                }\n            }\n        }\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MaxLocOp<Real>(), x.DistComm() );\n    }\n    mpi::Broadcast( pivot.index, x.Root(), x.CrossComm() );\n    mpi::Broadcast( pivot.value, x.Root(), x.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename F>\ninline ValueIntPair<Base<F>>\nMaxAbs( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxAbs\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    ValueIntPair<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    pivot.value = 0;\n    pivot.indices[0] = 0;\n    pivot.indices[1] = 0;\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            const Real abs = Abs(A.Get(i,j));\n            if( abs > pivot.value )\n            {\n                pivot.value = abs;\n                pivot.indices[0] = i;\n                pivot.indices[1] = j;\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline ValueIntPair<Base<F>>\nMaxAbs( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"MaxAbs\");\n        if( !A.Grid().InGrid() )\n            LogicError(\"Viewing processes are not allowed\");\n    )\n    typedef Base<F> Real;\n    ValueIntPair<Real> pivot;\n    if( A.Height() == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    if( A.Participating() )\n    {\n        // Store the index/value of the local pivot candidate\n        ValueIntPair<Real> localPivot;\n        localPivot.value = 0;\n        localPivot.indices[0] = 0;\n        localPivot.indices[1] = 0;\n        const Int mLocal = A.LocalHeight();\n        const Int nLocal = A.LocalWidth();\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n            {\n                const Real value = Abs(A.GetLocal(iLoc,jLoc));\n                if( value > localPivot.value )\n                {\n                    const Int i = A.GlobalRow(iLoc);\n                    localPivot.value = value;\n                    localPivot.indices[0] = i;\n                    localPivot.indices[1] = j;\n                }\n            }\n        }\n\n        // Compute and store the location of the new pivot\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MaxLocPairOp<Real>(), A.DistComm() );\n    }\n    mpi::Broadcast( pivot.indices, 2, A.Root(), A.CrossComm() );\n    mpi::Broadcast( pivot.value, A.Root(), A.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename F>\ninline ValueIntPair<Base<F>>\nSymmetricMaxAbs( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SymmetricMaxAbs\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    typedef Base<F> Real;\n    const Int n = A.Width();\n\n    ValueIntPair<Real> pivot;\n    if( n == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    pivot.value = 0;\n    pivot.indices[0] = 0;\n    pivot.indices[1] = 0;\n    if( uplo == LOWER )\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            for( Int i=j; i<n; ++i )\n            {\n                const Real abs = Abs(A.Get(i,j));\n                if( abs > pivot.value )\n                {\n                    pivot.value = abs;\n                    pivot.indices[0] = i;\n                    pivot.indices[1] = j;\n                }\n            }\n        }\n    }\n    else\n    {\n        for( Int j=0; j<n; ++j ) \n        { \n            for( Int i=0; i<=j; ++i )\n            {\n                const Real abs = Abs(A.Get(i,j));\n                if( abs > pivot.value )\n                {\n                    pivot.value = abs;\n                    pivot.indices[0] = i;\n                    pivot.indices[1] = j;\n                }\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline ValueIntPair<Base<F>>\nSymmetricMaxAbs( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SymmetricMaxAbs\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( !A.Grid().InGrid() )\n            LogicError(\"Viewing processes are not allowed\");\n    )\n    typedef Base<F> Real;\n    const Int mLocal = A.LocalHeight();\n    const Int nLocal = A.LocalWidth();\n\n    ValueIntPair<Real> pivot;\n    if( A.Height() == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    if( A.Participating() )\n    {\n        ValueIntPair<Real> localPivot;\n        localPivot.value = 0;\n        localPivot.indices[0] = 0;\n        localPivot.indices[1] = 0;\n\n        if( uplo == LOWER )\n        {\n            for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int mLocBefore = A.LocalRowOffset(j);\n                for( Int iLoc=mLocBefore; iLoc<mLocal; ++iLoc )\n                {\n                    const Real abs = Abs(A.GetLocal(iLoc,jLoc));\n                    if( abs > localPivot.value )\n                    {\n                        const Int i = A.GlobalRow(iLoc);\n                        localPivot.value = abs;\n                        localPivot.indices[0] = i;\n                        localPivot.indices[1] = j;\n                    }\n                }\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int mLocBefore = A.LocalRowOffset(j+1);\n                for( Int iLoc=0; iLoc<mLocBefore; ++iLoc )\n                {\n                    const Real abs = Abs(A.GetLocal(iLoc,jLoc));\n                    if( abs > localPivot.value )\n                    {\n                        const Int i = A.GlobalRow(iLoc);\n                        localPivot.value = abs;\n                        localPivot.indices[0] = i;\n                        localPivot.indices[1] = j;\n                    }\n                }\n            }\n        }\n\n        // Compute and store the location of the new pivot\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MaxLocPairOp<Real>(), A.DistComm() );\n    }\n    mpi::Broadcast( pivot.indices, 2, A.Root(), A.CrossComm() );\n    mpi::Broadcast( pivot.value, A.Root(), A.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nDiagonalMaxAbs( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalMaxAbs\"))\n    return VectorMaxAbs( A.GetDiagonal() );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline ValueInt<Base<F>>\nDiagonalMaxAbs( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalMaxAbs\"))\n    return VectorMaxAbs( A.GetDiagonal() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MAXABS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Min.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MIN_HPP\n#define ELEM_MIN_HPP\n\nnamespace elem {\n\ntemplate<typename Real>\ninline ValueInt<Real>\nVectorMin( const Matrix<Real>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"VectorMin\"))\n    const Int m = x.Height();\n    const Int n = x.Width();\n    DEBUG_ONLY(\n        if( m != 1 && n != 1 )\n            LogicError(\"Input should have been a vector\");\n    )\n    ValueInt<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.index = -1;    \n        return pivot;\n    }\n\n    pivot.value = x.Get(0,0);\n    pivot.index = 0;\n    if( n == 1 )\n    {\n        for( Int i=1; i<m; ++i )\n        {\n            const Real value = x.Get(i,0);\n            if( value < pivot.value )\n            {\n                pivot.value = value;\n                pivot.index = i;\n            }\n        }\n    }\n    else\n    {\n        for( Int j=1; j<n; ++j )\n        {\n            const Real value = x.Get(0,j);\n            if( value < pivot.value )\n            {\n                pivot.value = value;\n                pivot.index = j;\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline ValueInt<Real>\nVectorMin( const DistMatrix<Real,U,V>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"VectorMin\"))\n    const Int m = x.Height();\n    const Int n = x.Width();\n    DEBUG_ONLY(\n        if( m != 1 && n != 1 )\n            LogicError(\"Input should have been a vector\");\n        if( !x.Grid().InGrid() )\n            LogicError(\"viewing processes are not allowed\");\n    )\n    ValueInt<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.index = -1;\n        return pivot;\n    }\n \n    ValueInt<Real> localPivot;\n    localPivot.value = x.Get(0,0);\n    localPivot.index = 0;\n    if( x.Participating() )\n    {\n        if( n == 1 )\n        {\n            if( x.RowRank() == x.RowAlign() )\n            {\n                const Int mLocal = x.LocalHeight();\n                for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                {\n                    const Real value = x.GetLocal(iLoc,0);\n                    if( value < localPivot.value )\n                    {\n                        localPivot.value = value;\n                        localPivot.index = x.GlobalRow(iLoc);\n                    }\n                }\n            }\n        }\n        else\n        {\n            if( x.ColRank() == x.ColAlign() )\n            {\n                const Int nLocal = x.LocalWidth();\n                for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n                {\n                    const Real value = x.GetLocal(0,jLoc);\n                    if( value < localPivot.value )\n                    {\n                        localPivot.value = value;\n                        localPivot.index = x.GlobalCol(jLoc);\n                    }\n                }\n            }\n        }\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MinLocOp<Real>(), x.DistComm() );\n    }\n    mpi::Broadcast( pivot.index, x.Root(), x.CrossComm() );\n    mpi::Broadcast( pivot.value, x.Root(), x.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename Real>\ninline ValueIntPair<Real>\nMin( const Matrix<Real>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Min\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    ValueIntPair<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    pivot.value = A.Get(0,0);\n    pivot.indices[0] = 0;\n    pivot.indices[1] = 0;\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            const Real value = A.Get(i,j);\n            if( value < pivot.value )\n            {\n                pivot.value = value;\n                pivot.indices[0] = i;\n                pivot.indices[1] = j;\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline ValueIntPair<Real>\nMin( const DistMatrix<Real,U,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Min\");\n        if( !A.Grid().InGrid() )\n            LogicError(\"Viewing processes are not allowed\");\n    )\n    ValueIntPair<Real> pivot;\n    if( Min(A.Height(),A.Width()) == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    ValueIntPair<Real> localPivot;\n    localPivot.value = A.Get(0,0);\n    localPivot.indices[0] = 0;\n    localPivot.indices[1] = 0;\n    if( A.Participating() )\n    {\n        // Store the index/value of the local pivot candidate\n        const Int mLocal = A.LocalHeight();\n        const Int nLocal = A.LocalWidth();\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n            {\n                const Real value = A.GetLocal(iLoc,jLoc);\n                if( value < localPivot.value )\n                {\n                    const Int i = A.GlobalRow(iLoc);\n                    localPivot.value = value;\n                    localPivot.indices[0] = i;\n                    localPivot.indices[1] = j;\n                }\n            }\n        }\n\n        // Compute and store the location of the new pivot\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MinLocPairOp<Real>(), A.DistComm() );\n    }\n    mpi::Broadcast( pivot.indices, 2, A.Root(), A.CrossComm() );\n    mpi::Broadcast( pivot.value, A.Root(), A.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename Real>\ninline ValueIntPair<Real>\nSymmetricMin( UpperOrLower uplo, const Matrix<Real>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SymmetricMin\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Width();\n    ValueIntPair<Real> pivot;\n    if( n == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    pivot.value = A.Get(0,0);\n    pivot.indices[0] = 0;\n    pivot.indices[1] = 0;\n    if( uplo == LOWER )\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            for( Int i=j; i<n; ++i )\n            {\n                const Real value = A.Get(i,j);\n                if( value < pivot.value )\n                {\n                    pivot.value = value;\n                    pivot.indices[0] = i;\n                    pivot.indices[1] = j;\n                }\n            }\n        }\n    }\n    else\n    {\n        for( Int j=0; j<n; ++j ) \n        { \n            for( Int i=0; i<=j; ++i )\n            {\n                const Real value = A.Get(i,j);\n                if( value < pivot.value )\n                {\n                    pivot.value = value;\n                    pivot.indices[0] = i;\n                    pivot.indices[1] = j;\n                }\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline ValueIntPair<Real>\nSymmetricMin( UpperOrLower uplo, const DistMatrix<Real,U,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SymmetricMin\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( !A.Grid().InGrid() )\n            LogicError(\"Viewing processes are not allowed\");\n    )\n    const Int mLocal = A.LocalHeight();\n    const Int nLocal = A.LocalWidth();\n\n    ValueIntPair<Real> pivot;\n    if( A.Height() == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    ValueIntPair<Real> localPivot;\n    localPivot.value = A.Get(0,0);\n    localPivot.indices[0] = 0;\n    localPivot.indices[1] = 0;\n    if( A.Participating() )\n    {\n        if( uplo == LOWER )\n        {\n            for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int mLocBefore = A.LocalRowOffset(j);\n                for( Int iLoc=mLocBefore; iLoc<mLocal; ++iLoc )\n                {\n                    const Real value = A.GetLocal(iLoc,jLoc);\n                    if( value < localPivot.value )\n                    {\n                        const Int i = A.GlobalRow(iLoc);\n                        localPivot.value = value;\n                        localPivot.indices[0] = i;\n                        localPivot.indices[1] = j;\n                    }\n                }\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int mLocBefore = A.LocalRowOffset(j+1);\n                for( Int iLoc=0; iLoc<mLocBefore; ++iLoc )\n                {\n                    const Real value = A.GetLocal(iLoc,jLoc);\n                    if( value < localPivot.value )\n                    {\n                        const Int i = A.GlobalRow(iLoc);\n                        localPivot.value = value;\n                        localPivot.indices[0] = i;\n                        localPivot.indices[1] = j;\n                    }\n                }\n            }\n        }\n\n        // Compute and store the location of the new pivot\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MinLocPairOp<Real>(), A.DistComm() );\n    }\n    mpi::Broadcast( pivot.indices, 2, A.Root(), A.CrossComm() );\n    mpi::Broadcast( pivot.value, A.Root(), A.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nDiagonalMin( const Matrix<Real>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalMin\"))\n    return VectorMin( A.GetDiagonal() );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline ValueInt<Real>\nDiagonalMin( const DistMatrix<Real,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalMin\"))\n    return VectorMin( A.GetDiagonal() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MIN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/MinAbs.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MINABS_HPP\n#define ELEM_MINABS_HPP\n\nnamespace elem {\n\n// TODO: Add options for FastAbs instead of Abs\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nVectorMinAbs( const Matrix<F>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"VectorMinAbs\"))\n    typedef Base<F> Real;\n    const Int m = x.Height();\n    const Int n = x.Width();\n    DEBUG_ONLY(\n        if( m != 1 && n != 1 )\n            LogicError(\"Input should have been a vector\");\n    )\n    ValueInt<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.index = -1;    \n        return pivot;\n    }\n\n    pivot.value = Abs(x.Get(0,0));\n    pivot.index = 0;\n    if( n == 1 )\n    {\n        for( Int i=1; i<m; ++i )\n        {\n            const Real abs = Abs(x.Get(i,0));\n            if( abs < pivot.value )\n            {\n                pivot.index = i;\n                pivot.value = abs;\n            }\n        }\n    }\n    else\n    {\n        for( Int j=1; j<n; ++j )\n        {\n            const Real abs = Abs(x.Get(0,j));\n            if( abs < pivot.value )\n            {\n                pivot.index = j;\n                pivot.value = abs;\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline ValueInt<Base<F>>\nVectorMinAbs( const DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"VectorMinAbs\"))\n    typedef Base<F> Real;\n    const Int m = x.Height();\n    const Int n = x.Width();\n    DEBUG_ONLY(\n        if( m != 1 && n != 1 )\n            LogicError(\"Input should have been a vector\");\n        if( !x.Grid().InGrid() )\n            LogicError(\"viewing processes are not allowed\");\n    )\n    ValueInt<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.index = -1;\n        return pivot;\n    }\n \n    ValueInt<Real> localPivot;\n    localPivot.value = Abs(x.Get(0,0));\n    localPivot.index = 0;\n    if( x.Participating() )\n    {\n        if( n == 1 )\n        {\n            if( x.RowRank() == x.RowAlign() )\n            {\n                const Int mLocal = x.LocalHeight();\n                for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                {\n                    const Real abs = Abs(x.GetLocal(iLoc,0));\n                    if( abs < localPivot.value )\n                    {\n                        localPivot.index = x.GlobalRow(iLoc);\n                        localPivot.value = abs;\n                    }\n                }\n            }\n        }\n        else\n        {\n            if( x.ColRank() == x.ColAlign() )\n            {\n                const Int nLocal = x.LocalWidth();\n                for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n                {\n                    const Real abs = Abs(x.GetLocal(0,jLoc));\n                    if( abs < localPivot.value )\n                    {\n                        localPivot.index = x.GlobalCol(jLoc);\n                        localPivot.value = abs;\n                    }\n                }\n            }\n        }\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MinLocOp<Real>(), x.DistComm() );\n    }\n    mpi::Broadcast( pivot.index, x.Root(), x.CrossComm() );\n    mpi::Broadcast( pivot.value, x.Root(), x.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename F>\ninline ValueIntPair<Base<F>>\nMinAbs( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MinAbs\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    ValueIntPair<Real> pivot;\n    if( Min(m,n) == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    pivot.value = Abs(A.Get(0,0));\n    pivot.indices[0] = 0;\n    pivot.indices[1] = 0;\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            const Real abs = Abs(A.Get(i,j));\n            if( abs < pivot.value )\n            {\n                pivot.value = abs;\n                pivot.indices[0] = i;\n                pivot.indices[1] = j;\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline ValueIntPair<Base<F>>\nMinAbs( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"MinAbs\");\n        if( !A.Grid().InGrid() )\n            LogicError(\"Viewing processes are not allowed\");\n    )\n    typedef Base<F> Real;\n    ValueIntPair<Real> pivot;\n    if( Min(A.Height(),A.Width()) == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    ValueIntPair<Real> localPivot;\n    localPivot.value = Abs(A.Get(0,0));\n    localPivot.indices[0] = 0;\n    localPivot.indices[1] = 0;\n    if( A.Participating() )\n    {\n        // Store the index/value of the local pivot candidate\n        const Int mLocal = A.LocalHeight();\n        const Int nLocal = A.LocalWidth();\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n            {\n                const Real value = Abs(A.GetLocal(iLoc,jLoc));\n                if( value < localPivot.value )\n                {\n                    const Int i = A.GlobalRow(iLoc);\n                    localPivot.value = value;\n                    localPivot.indices[0] = i;\n                    localPivot.indices[1] = j;\n                }\n            }\n        }\n\n        // Compute and store the location of the new pivot\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MinLocPairOp<Real>(), A.DistComm() );\n    }\n    mpi::Broadcast( pivot.indices, 2, A.Root(), A.CrossComm() );\n    mpi::Broadcast( pivot.value, A.Root(), A.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename F>\ninline ValueIntPair<Base<F>>\nSymmetricMinAbs( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SymmetricMinAbs\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    typedef Base<F> Real;\n    const Int n = A.Width();\n    ValueIntPair<Real> pivot;\n    if( n == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    pivot.value = Abs(A.Get(0,0));\n    pivot.indices[0] = 0;\n    pivot.indices[1] = 0;\n    if( uplo == LOWER )\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            for( Int i=j; i<n; ++i )\n            {\n                const Real abs = Abs(A.Get(i,j));\n                if( abs < pivot.value )\n                {\n                    pivot.value = abs;\n                    pivot.indices[0] = i;\n                    pivot.indices[1] = j;\n                }\n            }\n        }\n    }\n    else\n    {\n        for( Int j=0; j<n; ++j ) \n        { \n            for( Int i=0; i<=j; ++i )\n            {\n                const Real abs = Abs(A.Get(i,j));\n                if( abs < pivot.value )\n                {\n                    pivot.value = abs;\n                    pivot.indices[0] = i;\n                    pivot.indices[1] = j;\n                }\n            }\n        }\n    }\n    return pivot;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline ValueIntPair<Base<F>>\nSymmetricMinAbs( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SymmetricMinAbs\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( !A.Grid().InGrid() )\n            LogicError(\"Viewing processes are not allowed\");\n    )\n    typedef Base<F> Real;\n    const Int mLocal = A.LocalHeight();\n    const Int nLocal = A.LocalWidth();\n\n    ValueIntPair<Real> pivot;\n    if( A.Height() == 0 )\n    {\n        pivot.value = 0;\n        pivot.indices[0] = -1;\n        pivot.indices[1] = -1;\n        return pivot;\n    }\n\n    ValueIntPair<Real> localPivot;\n    localPivot.value = Abs(A.Get(0,0));\n    localPivot.indices[0] = 0;\n    localPivot.indices[1] = 0;\n    if( A.Participating() )\n    {\n        if( uplo == LOWER )\n        {\n            for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int mLocBefore = A.LocalRowOffset(j);\n                for( Int iLoc=mLocBefore; iLoc<mLocal; ++iLoc )\n                {\n                    const Real abs = Abs(A.GetLocal(iLoc,jLoc));\n                    if( abs < localPivot.value )\n                    {\n                        const Int i = A.GlobalRow(iLoc);\n                        localPivot.value = abs;\n                        localPivot.indices[0] = i;\n                        localPivot.indices[1] = j;\n                    }\n                }\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int mLocBefore = A.LocalRowOffset(j+1);\n                for( Int iLoc=0; iLoc<mLocBefore; ++iLoc )\n                {\n                    const Real abs = Abs(A.GetLocal(iLoc,jLoc));\n                    if( abs < localPivot.value )\n                    {\n                        const Int i = A.GlobalRow(iLoc);\n                        localPivot.value = abs;\n                        localPivot.indices[0] = i;\n                        localPivot.indices[1] = j;\n                    }\n                }\n            }\n        }\n\n        // Compute and store the location of the new pivot\n        pivot = mpi::AllReduce\n                ( localPivot, mpi::MinLocPairOp<Real>(), A.DistComm() );\n    }\n    mpi::Broadcast( pivot.indices, 2, A.Root(), A.CrossComm() );\n    mpi::Broadcast( pivot.value, A.Root(), A.CrossComm() );\n    return pivot;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nDiagonalMinAbs( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalMinAbs\"))\n    return VectorMinAbs( A.GetDiagonal() );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline ValueInt<Base<F>>\nDiagonalMinAbs( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DiagonalMinAbs\"))\n    return VectorMinAbs( A.GetDiagonal() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MIN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Nrm2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NRM2_HPP\n#define ELEM_NRM2_HPP\n\n#include ELEM_FROBENIUSNORM_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline Base<F>\nNrm2( const Matrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Nrm2\");\n        if( x.Height() != 1 && x.Width() != 1 )\n            LogicError(\"Expected vector input\");\n    )\n    Base<F> norm;\n    if( x.Width() == 1 )\n        norm = blas::Nrm2( x.Height(), x.LockedBuffer(), 1 );\n    else\n        norm = blas::Nrm2( x.Width(), x.LockedBuffer(), x.LDim() );\n    return norm;\n}\n\ntemplate<typename F>\ninline Base<F>\nNrm2( const DistMatrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Nrm2\");\n        if( x.Height() != 1 && x.Width() != 1 )\n            LogicError(\"x must be a vector\");\n    )\n    return FrobeniusNorm( x );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NRM2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/QuasiDiagonalScale.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASIDIAGONALSCALE_HPP\n#define ELEM_QUASIDIAGONALSCALE_HPP\n\n#include \"./Symmetric2x2Scale.hpp\"\n\nnamespace elem {\n\ntemplate<typename F,typename FMain>\ninline void\nQuasiDiagonalScale\n( LeftOrRight side, UpperOrLower uplo, \n  const Matrix<FMain>& d, const Matrix<F>& dSub, \n  Matrix<F>& X, bool conjugated=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiDiagonalScale\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    Matrix<F> D( 2, 2 );\n    if( side == LEFT && uplo == LOWER )\n    {\n        Int i=0;\n        while( i < m )\n        {\n            Int nb;\n            if( i < m-1 && Abs(dSub.Get(i,0)) > 0 )\n                nb = 2;\n            else\n                nb = 1;\n\n            if( nb == 1 )\n            {\n                auto xRow = View( X, i, 0, nb, n );\n                Scale( d.Get(i,0), xRow );\n            }\n            else\n            {\n                D.Set(0,0,d.Get(i,0));    \n                D.Set(1,1,d.Get(i+1,0));\n                D.Set(1,0,dSub.Get(i,0));\n                auto XRow = View( X, i, 0, nb, n );\n                Symmetric2x2Scale( LEFT, LOWER, D, XRow, conjugated );\n            }\n\n            i += nb;\n        }\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        Int j=0;\n        while( j < n )\n        {\n            Int nb;\n            if( j < n-1 && Abs(dSub.Get(j,0)) > 0 )\n                nb = 2;\n            else\n                nb = 1;\n\n            if( nb == 1 )\n            {\n                auto xCol = View( X, 0, j, m, nb );\n                Scale( d.Get(j,0), xCol );\n            }\n            else\n            {\n                D.Set(0,0,d.Get(j,0));    \n                D.Set(1,1,d.Get(j+1,0));\n                D.Set(1,0,dSub.Get(j,0));\n                auto XCol = View( X, 0, j, m, nb );\n                Symmetric2x2Scale( RIGHT, LOWER, D, XCol, conjugated );\n            }\n\n            j += nb;\n        }\n    }\n    else\n        LogicError(\"This option not yet supported\");\n}\n\ntemplate<typename F,typename FMain,Dist U,Dist V>\ninline void\nLeftQuasiDiagonalScale\n( UpperOrLower uplo,\n  const DistMatrix<FMain,U,STAR> d,\n  const DistMatrix<FMain,U,STAR> dPrev,\n  const DistMatrix<FMain,U,STAR> dNext,\n  const DistMatrix<FMain,U,STAR> dSub,\n  const DistMatrix<FMain,U,STAR> dSubPrev,\n  const DistMatrix<FMain,U,STAR> dSubNext,\n        DistMatrix<F,U,V>& X,\n  const DistMatrix<F,U,V>& XPrev,\n  const DistMatrix<F,U,V>& XNext,\n  bool conjugated=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LeftQuasiDiagonalScale\"))\n    if( uplo == UPPER )\n        LogicError(\"This option not yet supported\");\n    const Int m = X.Height();\n    const Int mLocal = X.LocalHeight();\n    const Int nLocal = X.LocalWidth();\n    const Int colStride = X.ColStride();\n    DEBUG_ONLY(\n        const Int colAlignPrev = Mod(X.ColAlign()+1,colStride);\n        const Int colAlignNext = Mod(X.ColAlign()-1,colStride);\n        if( d.ColAlign() != X.ColAlign() || dSub.ColAlign() != X.ColAlign() )\n            LogicError(\"data is not properly aligned\");\n        if( XPrev.ColAlign() != colAlignPrev ||\n            dPrev.ColAlign() != colAlignPrev || \n            dSubPrev.ColAlign() != colAlignPrev )\n            LogicError(\"'previous' data is not properly aligned\");\n        if( XNext.ColAlign() != colAlignNext || \n            dNext.ColAlign() != colAlignNext || \n            dSubNext.ColAlign() != colAlignNext )\n            LogicError(\"'next' data is not properly aligned\");\n    )\n    const Int prevOff = ( XPrev.ColShift()==X.ColShift()-1 ? 0 : -1 );\n    const Int nextOff = ( XNext.ColShift()==X.ColShift()+1 ? 0 : +1 );\n    if( !X.Participating() )\n        return;\n\n    // It is best to separate the case where colStride is 1\n    if( colStride == 1 )\n    {\n        QuasiDiagonalScale\n        ( LEFT, uplo, d.LockedMatrix(), dSub.LockedMatrix(), X.Matrix(),\n          conjugated );\n        return;\n    }\n\n    Matrix<F> D11( 2, 2 );\n    for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n    {\n        const Int i = X.GlobalRow(iLoc);\n        const Int iLocPrev = iLoc + prevOff;\n        const Int iLocNext = iLoc + nextOff;\n\n        auto x1Loc = View( X.Matrix(), iLoc, 0, 1, nLocal );\n\n        if( i<m-1 && dSub.GetLocal(iLoc,0) != F(0) )\n        {\n            // Handle 2x2 starting at i\n            D11.Set( 0, 0, d.GetLocal(iLoc,0) ); \n            D11.Set( 1, 1, dNext.GetLocal(iLocNext,0) );\n            D11.Set( 1, 0, dSub.GetLocal(iLoc,0) );\n\n            auto x1NextLoc = \n                LockedView( XNext.LockedMatrix(), iLocNext, 0, 1, nLocal );\n            FirstHalfOfSymmetric2x2Scale\n            ( LEFT, LOWER, D11, x1Loc, x1NextLoc, conjugated );\n        }\n        else if( i>0 && dSubPrev.GetLocal(iLocPrev,0) != F(0) )\n        {\n            // Handle 2x2 starting at i-1\n            D11.Set( 0, 0, dPrev.GetLocal(iLocPrev,0) );\n            D11.Set( 1, 1, d.GetLocal(iLoc,0) );\n            D11.Set( 1, 0, dSubPrev.GetLocal(iLocPrev,0) );\n\n            auto x1PrevLoc = \n                LockedView( XPrev.LockedMatrix(), iLocPrev, 0, 1, nLocal );\n            SecondHalfOfSymmetric2x2Scale\n            ( LEFT, LOWER, D11, x1PrevLoc, x1Loc, conjugated );\n        }\n        else\n        {\n            // Handle 1x1\n            Scale( d.GetLocal(iLoc,0), x1Loc );\n        }\n    }\n}\n\ntemplate<typename F,typename FMain,Dist U,Dist V>\ninline void\nRightQuasiDiagonalScale\n( UpperOrLower uplo,\n  const DistMatrix<FMain,V,STAR> d,\n  const DistMatrix<FMain,V,STAR> dPrev,\n  const DistMatrix<FMain,V,STAR> dNext,\n  const DistMatrix<FMain,V,STAR> dSub,\n  const DistMatrix<FMain,V,STAR> dSubPrev,\n  const DistMatrix<FMain,V,STAR> dSubNext,\n        DistMatrix<F,U,V>& X,\n  const DistMatrix<F,U,V>& XPrev,\n  const DistMatrix<F,U,V>& XNext,\n  bool conjugated=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LeftQuasiDiagonalScale\"))\n    if( uplo == UPPER )\n        LogicError(\"This option not yet supported\");\n    const Int n = X.Width();\n    const Int mLocal = X.LocalHeight();\n    const Int nLocal = X.LocalWidth();\n    const Int rowStride = X.RowStride();\n    DEBUG_ONLY(\n        const Int rowAlignPrev = Mod(X.RowAlign()+1,rowStride);\n        const Int rowAlignNext = Mod(X.RowAlign()-1,rowStride);\n        if( d.ColAlign() != X.RowAlign() || dSub.ColAlign() != X.RowAlign() )\n            LogicError(\"data is not properly aligned\");\n        if( XPrev.RowAlign() != rowAlignPrev ||\n            dPrev.ColAlign() != rowAlignPrev || \n            dSubPrev.ColAlign() != rowAlignPrev )\n            LogicError(\"'previous' data is not properly aligned\");\n        if( XNext.RowAlign() != rowAlignNext || \n            dNext.ColAlign() != rowAlignNext || \n            dSubNext.ColAlign() != rowAlignNext )\n            LogicError(\"'next' data is not properly aligned\");\n    )\n    const Int prevOff = ( XPrev.RowShift()==X.RowShift()-1 ? 0 : -1 );\n    const Int nextOff = ( XNext.RowShift()==X.RowShift()+1 ? 0 : +1 );\n    if( !X.Participating() )\n        return;\n\n    // It is best to separate the case where rowStride is 1\n    if( rowStride == 1 )\n    {\n        QuasiDiagonalScale\n        ( LEFT, uplo, d.LockedMatrix(), dSub.LockedMatrix(), X.Matrix(),\n          conjugated );\n        return;\n    }\n\n    Matrix<F> D11( 2, 2 );\n    for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n    {\n        const Int j = X.GlobalCol(jLoc);\n        const Int jLocPrev = jLoc + prevOff;\n        const Int jLocNext = jLoc + nextOff;\n\n        auto x1Loc = View( X.Matrix(), 0, jLoc, mLocal, 1 );\n\n        if( j<n-1 && dSub.GetLocal(jLoc,0) != F(0) )\n        {\n            // Handle 2x2 starting at j\n            D11.Set( 0, 0, d.GetLocal(jLoc,0) ); \n            D11.Set( 1, 1, dNext.GetLocal(jLocNext,0) );\n            D11.Set( 1, 0, dSub.GetLocal(jLoc,0) );\n\n            auto x1NextLoc = \n                LockedView( XNext.LockedMatrix(), 0, jLocNext, mLocal, 1 );\n            FirstHalfOfSymmetric2x2Scale\n            ( RIGHT, LOWER, D11, x1Loc, x1NextLoc, conjugated );\n        }\n        else if( j>0 && dSubPrev.GetLocal(jLocPrev,0) != F(0) )\n        {\n            // Handle 2x2 starting at j-1\n            D11.Set( 0, 0, dPrev.GetLocal(jLocPrev,0) );\n            D11.Set( 1, 1, d.GetLocal(jLoc,0) );\n            D11.Set( 1, 0, dSubPrev.GetLocal(jLocPrev,0) );\n\n            auto x1PrevLoc = \n                LockedView( XPrev.LockedMatrix(), 0, jLocPrev, mLocal, 1 );\n            SecondHalfOfSymmetric2x2Scale\n            ( RIGHT, LOWER, D11, x1PrevLoc, x1Loc, conjugated );\n        }\n        else\n        {\n            // Handle 1x1\n            Scale( d.GetLocal(jLoc,0), x1Loc );\n        }\n    }\n}\n\ntemplate<typename F,typename FMain,Dist U1,Dist V1,\n                                   Dist U2,Dist V2>\ninline void\nQuasiDiagonalScale\n( LeftOrRight side, UpperOrLower uplo, \n  const DistMatrix<FMain,U1,V1>& d, const DistMatrix<F,U1,V1>& dSub, \n  DistMatrix<F,U2,V2>& X, bool conjugated=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiDiagonalScale\"))\n    const Grid& g = X.Grid();\n    const Int colAlign = X.ColAlign();\n    const Int rowAlign = X.RowAlign();\n    if( side == LEFT )\n    {\n        const Int colStride = X.ColStride();\n        DistMatrix<FMain,U2,STAR> d_U2_STAR(g);\n        DistMatrix<F,U2,STAR> dSub_U2_STAR(g);\n        d_U2_STAR.AlignWith( X );\n        dSub_U2_STAR.AlignWith( X );\n        d_U2_STAR = d;\n        dSub_U2_STAR = dSub;\n        if( colStride == 1 )\n        {\n            QuasiDiagonalScale\n            ( side, uplo, \n              d_U2_STAR.LockedMatrix(), dSub_U2_STAR.LockedMatrix(),\n              X.Matrix(), conjugated );\n            return;\n        }\n\n        DistMatrix<FMain,U2,STAR> dPrev_U2_STAR(g), dNext_U2_STAR(g);\n        DistMatrix<F,U2,STAR> dSubPrev_U2_STAR(g), dSubNext_U2_STAR(g);\n        DistMatrix<F,U2,V2> XPrev(g), XNext(g);\n        const Int colAlignPrev = Mod(colAlign+1,colStride);\n        const Int colAlignNext = Mod(colAlign-1,colStride);\n        dPrev_U2_STAR.AlignCols( colAlignPrev );\n        dNext_U2_STAR.AlignCols( colAlignNext );\n        dSubPrev_U2_STAR.AlignCols( colAlignPrev );\n        dSubNext_U2_STAR.AlignCols( colAlignNext );\n        XPrev.Align( colAlignPrev, rowAlign );\n        XNext.Align( colAlignNext, rowAlign );\n        dPrev_U2_STAR = d;\n        dNext_U2_STAR = d;\n        dSubPrev_U2_STAR = dSub;\n        dSubNext_U2_STAR = dSub;\n        XPrev = X;\n        XNext = X;\n        LeftQuasiDiagonalScale\n        ( uplo, d_U2_STAR, dPrev_U2_STAR, dNext_U2_STAR,\n          dSub_U2_STAR, dSubPrev_U2_STAR, dSubNext_U2_STAR,\n          X, XPrev, XNext, conjugated );\n    }\n    else\n    {\n        const Int rowStride = X.RowStride();\n        DistMatrix<FMain,V2,STAR> d_V2_STAR(g);\n        DistMatrix<F,V2,STAR> dSub_V2_STAR(g);\n        d_V2_STAR.AlignWith( X );\n        dSub_V2_STAR.AlignWith( X );\n        d_V2_STAR = d;\n        dSub_V2_STAR = dSub;\n        if( rowStride == 1 )\n        {\n            QuasiDiagonalScale\n            ( side, uplo, \n              d_V2_STAR.LockedMatrix(), dSub_V2_STAR.LockedMatrix(),\n              X.Matrix(), conjugated );\n            return;\n        }\n\n        DistMatrix<FMain,V2,STAR> dPrev_V2_STAR(g), dNext_V2_STAR(g);\n        DistMatrix<F,V2,STAR> dSubPrev_V2_STAR(g), dSubNext_V2_STAR(g);\n        DistMatrix<F,U2,V2> XPrev(g), XNext(g);\n        const Int rowAlignPrev = Mod(rowAlign+1,rowStride);\n        const Int rowAlignNext = Mod(rowAlign-1,rowStride);\n        dPrev_V2_STAR.AlignCols( rowAlignPrev );\n        dNext_V2_STAR.AlignCols( rowAlignNext );\n        dSubPrev_V2_STAR.AlignCols( rowAlignPrev );\n        dSubNext_V2_STAR.AlignCols( rowAlignNext );\n        XPrev.Align( colAlign, rowAlignPrev );\n        XNext.Align( colAlign, rowAlignNext );\n        dPrev_V2_STAR = d;\n        dNext_V2_STAR = d;\n        dSubPrev_V2_STAR = dSub;\n        dSubNext_V2_STAR = dSub;\n        XPrev = X;\n        XNext = X;\n        RightQuasiDiagonalScale\n        ( uplo, d_V2_STAR, dPrev_V2_STAR, dNext_V2_STAR,\n          dSub_V2_STAR, dSubPrev_V2_STAR, dSubNext_V2_STAR,\n          X, XPrev, XNext, conjugated );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_QUASIDIAGONALSCALE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/QuasiDiagonalSolve.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASIDIAGONALSOLVE_HPP\n#define ELEM_QUASIDIAGONALSOLVE_HPP\n\n#include \"./Symmetric2x2Solve.hpp\"\n\nnamespace elem {\n\ntemplate<typename F,typename FMain>\ninline void\nQuasiDiagonalSolve\n( LeftOrRight side, UpperOrLower uplo, \n  const Matrix<FMain>& d, const Matrix<F>& dSub, \n  Matrix<F>& X, bool conjugated=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiDiagonalSolve\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    Matrix<F> D( 2, 2 );\n    if( side == LEFT && uplo == LOWER )\n    {\n        Int i=0;\n        while( i < m )\n        {\n            Int nb;\n            if( i < m-1 && Abs(dSub.Get(i,0)) > 0 )\n                nb = 2;\n            else\n                nb = 1;\n\n            if( nb == 1 )\n            {\n                auto xRow = View( X, i, 0, nb, n );\n                Scale( F(1)/d.Get(i,0), xRow );\n            }\n            else\n            {\n                D.Set(0,0,d.Get(i,0));    \n                D.Set(1,1,d.Get(i+1,0));\n                D.Set(1,0,dSub.Get(i,0));\n                auto XRow = View( X, i, 0, nb, n );\n                Symmetric2x2Solve( LEFT, LOWER, D, XRow, conjugated );\n            }\n\n            i += nb;\n        }\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        Int j=0;\n        while( j < n )\n        {\n            Int nb;\n            if( j < n-1 && Abs(dSub.Get(j,0)) > 0 )\n                nb = 2;\n            else\n                nb = 1;\n\n            if( nb == 1 )\n            {\n                auto xCol = View( X, 0, j, m, nb );\n                Scale( F(1)/d.Get(j,0), xCol );\n            }\n            else\n            {\n                D.Set(0,0,d.Get(j,0));    \n                D.Set(1,1,d.Get(j+1,0));\n                D.Set(1,0,dSub.Get(j,0));\n                auto XCol = View( X, 0, j, m, nb );\n                Symmetric2x2Solve( RIGHT, LOWER, D, XCol, conjugated );\n            }\n\n            j += nb;\n        }\n    }\n    else\n        LogicError(\"This option not yet supported\");\n}\n\ntemplate<typename F,typename FMain,Dist U,Dist V>\ninline void\nLeftQuasiDiagonalSolve\n( UpperOrLower uplo, \n  const DistMatrix<FMain,U,STAR> d,\n  const DistMatrix<FMain,U,STAR> dPrev,\n  const DistMatrix<FMain,U,STAR> dNext,\n  const DistMatrix<FMain,U,STAR> dSub,\n  const DistMatrix<FMain,U,STAR> dSubPrev,\n  const DistMatrix<FMain,U,STAR> dSubNext,\n        DistMatrix<F,U,V>& X,\n  const DistMatrix<F,U,V>& XPrev,\n  const DistMatrix<F,U,V>& XNext,\n  bool conjugated=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LeftQuasiDiagonalSolve\"))\n    if( uplo == UPPER )\n        LogicError(\"This option not yet supported\");\n    const Int m = X.Height();\n    const Int mLocal = X.LocalHeight();\n    const Int nLocal = X.LocalWidth();\n    const Int colStride = X.ColStride();\n    DEBUG_ONLY(\n        const Int colAlignPrev = Mod(X.ColAlign()+1,colStride);\n        const Int colAlignNext = Mod(X.ColAlign()-1,colStride);\n        if( d.ColAlign() != X.ColAlign() || dSub.ColAlign() != X.ColAlign() )\n            LogicError(\"data is not properly aligned\");\n        if( XPrev.ColAlign() != colAlignPrev ||\n            dPrev.ColAlign() != colAlignPrev || \n            dSubPrev.ColAlign() != colAlignPrev )\n            LogicError(\"'previous' data is not properly aligned\");\n        if( XNext.ColAlign() != colAlignNext || \n            dNext.ColAlign() != colAlignNext || \n            dSubNext.ColAlign() != colAlignNext )\n            LogicError(\"'next' data is not properly aligned\");\n    )\n    const Int prevOff = ( XPrev.ColShift()==X.ColShift()-1 ? 0 : -1 );\n    const Int nextOff = ( XNext.ColShift()==X.ColShift()+1 ? 0 : +1 );\n    if( !X.Participating() )\n        return;\n\n    // It is best to separate the case where colStride is 1\n    if( colStride == 1 )\n    {\n        QuasiDiagonalSolve\n        ( LEFT, uplo, d.LockedMatrix(), dSub.LockedMatrix(), X.Matrix(), \n          conjugated );\n        return;\n    }\n\n    Matrix<F> D11( 2, 2 );\n    for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n    {\n        const Int i = X.GlobalRow(iLoc);\n        const Int iLocPrev = iLoc + prevOff;\n        const Int iLocNext = iLoc + nextOff;\n\n        auto x1Loc = View( X.Matrix(), iLoc, 0, 1, nLocal );\n\n        if( i<m-1 && dSub.GetLocal(iLoc,0) != F(0) )\n        {\n            // Handle 2x2 starting at i\n            D11.Set( 0, 0, d.GetLocal(iLoc,0) ); \n            D11.Set( 1, 1, dNext.GetLocal(iLocNext,0) );\n            D11.Set( 1, 0, dSub.GetLocal(iLoc,0) );\n\n            auto x1NextLoc = \n                LockedView( XNext.LockedMatrix(), iLocNext, 0, 1, nLocal );\n            FirstHalfOfSymmetric2x2Solve\n            ( LEFT, LOWER, D11, x1Loc, x1NextLoc, conjugated );\n        }\n        else if( i>0 && dSubPrev.GetLocal(iLocPrev,0) != F(0) )\n        {\n            // Handle 2x2 starting at i-1\n            D11.Set( 0, 0, dPrev.GetLocal(iLocPrev,0) );\n            D11.Set( 1, 1, d.GetLocal(iLoc,0) );\n            D11.Set( 1, 0, dSubPrev.GetLocal(iLocPrev,0) );\n\n            auto x1PrevLoc = \n                LockedView( XPrev.LockedMatrix(), iLocPrev, 0, 1, nLocal );\n            SecondHalfOfSymmetric2x2Solve\n            ( LEFT, LOWER, D11, x1PrevLoc, x1Loc, conjugated );\n        }\n        else\n        {\n            // Handle 1x1\n            Scale( F(1)/d.GetLocal(iLoc,0), x1Loc );\n        }\n    }\n}\n\ntemplate<typename F,typename FMain,Dist U,Dist V>\ninline void\nRightQuasiDiagonalSolve\n( UpperOrLower uplo, \n  const DistMatrix<FMain,V,STAR> d,\n  const DistMatrix<FMain,V,STAR> dPrev,\n  const DistMatrix<FMain,V,STAR> dNext,\n  const DistMatrix<FMain,V,STAR> dSub,\n  const DistMatrix<FMain,V,STAR> dSubPrev,\n  const DistMatrix<FMain,V,STAR> dSubNext,\n        DistMatrix<F,U,V>& X,\n  const DistMatrix<F,U,V>& XPrev,\n  const DistMatrix<F,U,V>& XNext,\n  bool conjugated=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LeftQuasiDiagonalSolve\"))\n    if( uplo == UPPER )\n        LogicError(\"This option not yet supported\");\n    const Int n = X.Width();\n    const Int mLocal = X.LocalHeight();\n    const Int nLocal = X.LocalWidth();\n    const Int rowStride = X.RowStride();\n    DEBUG_ONLY(\n        const Int rowAlignPrev = Mod(X.RowAlign()+1,rowStride);\n        const Int rowAlignNext = Mod(X.RowAlign()-1,rowStride);\n        if( d.ColAlign() != X.RowAlign() || dSub.RowAlign() != X.RowAlign() )\n            LogicError(\"data is not properly aligned\");\n        if( XPrev.RowAlign() != rowAlignPrev ||\n            dPrev.ColAlign() != rowAlignPrev || \n            dSubPrev.ColAlign() != rowAlignPrev )\n            LogicError(\"'previous' data is not properly aligned\");\n        if( XNext.RowAlign() != rowAlignNext || \n            dNext.ColAlign() != rowAlignNext || \n            dSubNext.ColAlign() != rowAlignNext )\n            LogicError(\"'next' data is not properly aligned\");\n    )\n    const Int prevOff = ( XPrev.RowShift()==X.RowShift()-1 ? 0 : -1 );\n    const Int nextOff = ( XNext.RowShift()==X.RowShift()+1 ? 0 : +1 );\n    if( !X.Participating() )\n        return;\n\n    // It is best to separate the case where rowStride is 1\n    if( rowStride == 1 )\n    {\n        QuasiDiagonalSolve\n        ( LEFT, uplo, d.LockedMatrix(), dSub.LockedMatrix(), X.Matrix(),\n          conjugated );\n        return;\n    }\n\n    Matrix<F> D11( 2, 2 );\n    for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n    {\n        const Int j = X.GlobalCol(jLoc);\n        const Int jLocPrev = jLoc + prevOff;\n        const Int jLocNext = jLoc + nextOff;\n\n        auto x1Loc = View( X.Matrix(), 0, jLoc, mLocal, 1 );\n\n        if( j<n-1 && dSub.GetLocal(jLoc,0) != F(0) )\n        {\n            // Handle 2x2 starting at j\n            D11.Set( 0, 0, d.GetLocal(jLoc,0) ); \n            D11.Set( 1, 1, dNext.GetLocal(jLocNext,0) );\n            D11.Set( 1, 0, dSub.GetLocal(jLoc,0) );\n\n            auto x1NextLoc = \n                LockedView( XNext.LockedMatrix(), 0, jLocNext, mLocal, 1 );\n            FirstHalfOfSymmetric2x2Solve\n            ( RIGHT, LOWER, D11, x1Loc, x1NextLoc, conjugated );\n        }\n        else if( j>0 && dSubPrev.GetLocal(jLocPrev,0) != F(0) )\n        {\n            // Handle 2x2 starting at j-1\n            D11.Set( 0, 0, dPrev.GetLocal(jLocPrev,0) );\n            D11.Set( 1, 1, d.GetLocal(jLoc,0) );\n            D11.Set( 1, 0, dSubPrev.GetLocal(jLocPrev,0) );\n\n            auto x1PrevLoc = \n                LockedView( XPrev.LockedMatrix(), 0, jLocPrev, mLocal, 1 );\n            SecondHalfOfSymmetric2x2Solve\n            ( RIGHT, LOWER, D11, x1PrevLoc, x1Loc, conjugated );\n        }\n        else\n        {\n            // Handle 1x1\n            Scale( F(1)/d.GetLocal(jLoc,0), x1Loc );\n        }\n    }\n}\n\ntemplate<typename F,typename FMain,Dist U1,Dist V1,\n                                   Dist U2,Dist V2>\ninline void\nQuasiDiagonalSolve\n( LeftOrRight side, UpperOrLower uplo, \n  const DistMatrix<FMain,U1,V1>& d, const DistMatrix<F,U1,V1>& dSub, \n  DistMatrix<F,U2,V2>& X, bool conjugated=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiDiagonalSolve\"))\n    const Grid& g = X.Grid();\n    const Int colAlign = X.ColAlign();\n    const Int rowAlign = X.RowAlign();\n    if( side == LEFT )\n    {\n        const Int colStride = X.ColStride();\n        DistMatrix<FMain,U2,STAR> d_U2_STAR(g);\n        DistMatrix<F,U2,STAR> dSub_U2_STAR(g);\n        d_U2_STAR.AlignWith( X );\n        dSub_U2_STAR.AlignWith( X );\n        d_U2_STAR = d;\n        dSub_U2_STAR = dSub;\n        if( colStride == 1 )\n        {\n            QuasiDiagonalSolve\n            ( side, uplo, d_U2_STAR.LockedMatrix(), dSub_U2_STAR.LockedMatrix(),\n              X.Matrix(), conjugated );\n            return;\n        }\n\n        DistMatrix<FMain,U2,STAR> dPrev_U2_STAR(g), dNext_U2_STAR(g);\n        DistMatrix<F,U2,STAR> dSubPrev_U2_STAR(g), dSubNext_U2_STAR(g);\n        DistMatrix<F,U2,V2> XPrev(g), XNext(g);\n        const Int colAlignPrev = Mod(colAlign+1,colStride);\n        const Int colAlignNext = Mod(colAlign-1,colStride);\n        dPrev_U2_STAR.AlignCols( colAlignPrev );\n        dNext_U2_STAR.AlignCols( colAlignNext );\n        dSubPrev_U2_STAR.AlignCols( colAlignPrev );\n        dSubNext_U2_STAR.AlignCols( colAlignNext );\n        XPrev.Align( colAlignPrev, rowAlign );\n        XNext.Align( colAlignNext, rowAlign );\n        dPrev_U2_STAR = d;\n        dNext_U2_STAR = d;\n        dSubPrev_U2_STAR = dSub;\n        dSubNext_U2_STAR = dSub;\n        XPrev = X;\n        XNext = X;\n        LeftQuasiDiagonalSolve\n        ( uplo, d_U2_STAR, dPrev_U2_STAR, dNext_U2_STAR,\n          dSub_U2_STAR, dSubPrev_U2_STAR, dSubNext_U2_STAR,\n          X, XPrev, XNext, conjugated );\n    }\n    else\n    {\n        const Int rowStride = X.RowStride();\n        DistMatrix<FMain,V2,STAR> d_V2_STAR(g);\n        DistMatrix<F,V2,STAR> dSub_V2_STAR(g);\n        d_V2_STAR.AlignWith( X );\n        dSub_V2_STAR.AlignWith( X );\n        d_V2_STAR = d;\n        dSub_V2_STAR = dSub;\n        if( rowStride == 1 )\n        {\n            QuasiDiagonalSolve\n            ( side, uplo, \n              d_V2_STAR.LockedMatrix(), dSub_V2_STAR.LockedMatrix(),\n              X.Matrix(), conjugated );\n            return;\n        }\n\n        DistMatrix<FMain,V2,STAR> dPrev_V2_STAR(g), dNext_V2_STAR(g);\n        DistMatrix<F,V2,STAR> dSubPrev_V2_STAR(g), dSubNext_V2_STAR(g);\n        DistMatrix<F,U2,V2> XPrev(g), XNext(g);\n        const Int rowAlignPrev = Mod(rowAlign+1,rowStride);\n        const Int rowAlignNext = Mod(rowAlign-1,rowStride);\n        dPrev_V2_STAR.AlignCols( rowAlignPrev );\n        dNext_V2_STAR.AlignCols( rowAlignNext );\n        dSubPrev_V2_STAR.AlignCols( rowAlignPrev );\n        dSubNext_V2_STAR.AlignCols( rowAlignNext );\n        XPrev.Align( colAlign, rowAlignPrev );\n        XNext.Align( colAlign, rowAlignNext );\n        dPrev_V2_STAR = d;\n        dNext_V2_STAR = d;\n        dSubPrev_V2_STAR = dSub;\n        dSubNext_V2_STAR = dSub;\n        XPrev = X;\n        XNext = X;\n        RightQuasiDiagonalSolve\n        ( uplo, d_V2_STAR, dPrev_V2_STAR, dNext_V2_STAR,\n          dSub_V2_STAR, dSubPrev_V2_STAR, dSubNext_V2_STAR,\n          X, XPrev, XNext, conjugated );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_QUASIDIAGONALSOLVE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/README.md",
    "content": "### `include/elemental/blas-like/level1/`\n\nThe level-1 BLAS-like routines implemented in this folder are:\n\n-  `Adjoint.hpp`: form the adjoint (conjugate-transpose) of a matrix\n-  `Axpy.hpp`: Y becomes alpha X + Y (AXPY)\n-  `AxpyTriangle.hpp`: Axpy a triangular matrix onto a triangular matrix\n-  `Conjugate.hpp`: form the conjugate of a matrix\n-  `Copy.hpp`: form a copy of a matrix\n-  `DiagonalScale.hpp`: apply a diagonal matrix\n-  `DiagonalSolve.hpp`: apply the inverse of a diagonal matrix\n-  `Dot.hpp`: form the dot product of two vectors\n-  `Dotu.hpp`: form the unconjugated dot product of two vectors\n-  `MakeHermitian.hpp`: force a matrix to be Hermitian\n-  `MakeReal.hpp`: force a matrix to be real\n-  `MakeSymmetric.hpp`: force a matrix to be symmetric\n-  `MakeTrapezoidal.hpp`: force a matrix to be trapezoidal\n-  `MakeTriangular.hpp`: force a matrix to be triangular\n-  `Max.hpp`: return the maximum entry in a vector or matrix\n-  `Nrm2.hpp`: compute the two-norm of a vector\n-  `QuasiDiagonalScale.hpp`: apply a quasi-diagonal matrix\n-  `QuasiDiagonalSolve.hpp`: apply the inverse of a quasi-diagonal matrix\n-  `Scale.hpp`: scale a matrix or vector \n-  `ScaleTrapezoid.hpp`: scale a trapezoid of a matrix or vector\n-  `SetDiagonal.hpp`: set the entire diagonal of a matrix to a particular value\n-  `Swap.hpp`: swap the contents of two matrices, or swap two rows or columns of\n   a particular matrix\n-  `Symmetric2x2Inv.hpp`: form the inverse of a symmetric 2x2 matrix\n-  `Symmetric2x2Scale.hpp`: apply a symmetric 2x2 matrix\n-  `Symmetric2x2Solve.hpp`: apply the inverse of a symmetric 2x2 matrix\n-  `Transpose.hpp`: form the transpose of a matrix\n-  `UpdateDiagonal.hpp`: add a constant value to every diagonal entry of a \n   matrix\n-  `Zero.hpp`: set every entry in a matrix to zero\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Scale.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SCALE_HPP\n#define ELEM_SCALE_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nScale( T alpha, Matrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Scale\"))\n    if( alpha != T(1) )\n    {\n        if( alpha == T(0) )\n            for( Int j=0; j<A.Width(); ++j )\n                for( Int i=0; i<A.Height(); ++i )\n                    A.Set(i,j,0);\n        else\n            for( Int j=0; j<A.Width(); ++j )\n                blas::Scal( A.Height(), alpha, A.Buffer(0,j), 1 );\n    }\n}\n\ntemplate<typename Real>\ninline void\nScale( Complex<Real> alpha, Matrix<Real>& AReal, Matrix<Real>& AImag )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Scale\"))\n    typedef Complex<Real> C;\n    const Int m = AReal.Height();\n    const Int n = AReal.Width();\n    if( alpha != C(1) )\n    {\n        if( alpha == C(0) )\n        {\n            Scale( Real(0), AReal );\n            Scale( Real(0), AImag );\n        }\n        else\n        {\n            Matrix<Real> aReal, aImag, aRealCopy, aImagCopy;\n            for( Int j=0; j<n; ++j )\n            {\n                aReal = View( aReal, 0, j, m, 1 );\n                aImag = View( aImag, 0, j, m, 1 );\n                aRealCopy = aReal;\n                aImagCopy = aImag;\n                Scale( alpha.real(), aReal     );\n                Axpy( -alpha.imag(), aImagCopy, aReal );\n                Scale( alpha.real(), aImag     );\n                Axpy(  alpha.imag(), aRealCopy, aImag );\n            }\n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nScale( Base<T> alpha, Matrix<T>& A )\n{ Scale( T(alpha), A ); }\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nScale( T alpha, DistMatrix<T,U,V>& A )\n{ Scale( alpha, A.Matrix() ); }\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nScale\n( Complex<Real> alpha, \n  DistMatrix<Real,U,V>& AReal, DistMatrix<Real,U,V>& AImag )\n{ Scale( alpha, AReal.Matrix(), AImag.Matrix() ); }\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nScale( T alpha, BlockDistMatrix<T,U,V>& A )\n{ Scale( alpha, A.Matrix() ); }\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nScale\n( Complex<Real> alpha, \n  BlockDistMatrix<Real,U,V>& AReal, BlockDistMatrix<Real,U,V>& AImag )\n{ Scale( alpha, AReal.Matrix(), AImag.Matrix() ); }\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nScale( Base<T> alpha, DistMatrix<T,U,V>& A )\n{ Scale( T(alpha), A.Matrix() ); }\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nScale( Base<T> alpha, BlockDistMatrix<T,U,V>& A )\n{ Scale( T(alpha), A.Matrix() ); }\n\n} // namespace elem\n\n#endif // ifndef ELEM_SCALE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/ScaleTrapezoid.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SCALETRAPEZOID_HPP\n#define ELEM_SCALETRAPEZOID_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nScaleTrapezoid( T alpha, UpperOrLower uplo, Matrix<T>& A, Int offset=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ScaleTrapezoid\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    const Int ldim = A.LDim();\n    T* buffer = A.Buffer();\n\n    if( uplo == UPPER )\n    {\n        ELEM_PARALLEL_FOR\n        for( Int j=Max(0,offset-1); j<width; ++j )\n        {\n            const Int numRows = j-offset+1;\n            for( Int i=0; i<numRows; ++i )\n                buffer[i+j*ldim] *= alpha;\n        }\n    }\n    else\n    {\n        ELEM_PARALLEL_FOR\n        for( Int j=0; j<width; ++j )\n        {\n            const Int numZeroRows = Max(j-offset,0);\n            for( Int i=numZeroRows; i<height; ++i )\n                buffer[i+j*ldim] *= alpha;\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nScaleTrapezoid( T alpha, UpperOrLower uplo, DistMatrix<T,U,V>& A, Int offset=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ScaleTrapezoid\"))\n    const Int height = A.Height();\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n\n    if( uplo == UPPER )\n    {\n        T* buffer = A.Buffer();\n        const Int ldim = A.LDim();\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int lastRow = j-offset;\n            const Int boundary = Min( lastRow+1, height );\n            const Int numRows = A.LocalRowOffset(boundary);\n            T* col = &buffer[jLoc*ldim];\n            for( Int iLoc=0; iLoc<numRows; ++iLoc )\n                col[iLoc] *= alpha;\n        }\n    }\n    else\n    {\n        T* buffer = A.Buffer();\n        const Int ldim = A.LDim();\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int firstRow = Max(j-offset,0);\n            const Int numZeroRows = A.LocalRowOffset(firstRow);\n            T* col = &buffer[numZeroRows+jLoc*ldim];\n            for( Int iLoc=0; iLoc<(localHeight-numZeroRows); ++iLoc )\n                col[iLoc] *= alpha;\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SCALETRAPEZOID_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/SetDiagonal.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SETDIAGONAL_HPP\n#define ELEM_SETDIAGONAL_HPP\n\nnamespace elem {\n\ntemplate<typename T,typename S>\ninline void\nSetDiagonal( Matrix<T>& A, S alpha )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SetDiagonal\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    ELEM_PARALLEL_FOR\n    for( Int j=0; j<Min(height,width); ++j )\n        A.Set(j,j,alpha);\n}\n\ntemplate<typename T,typename S>\ninline void\nSetDiagonal( Matrix<T>& A, S alpha, Int offset, LeftOrRight side=LEFT )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SetDiagonal\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( side == LEFT )\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            const Int i = j-offset;\n            if( i >= 0 && i < height )\n                A.Set(i,j,alpha);\n        }\n    }\n    else\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            const Int i = j-offset+height-width;\n            if( i >= 0 && i < height )\n                A.Set(i,j,alpha);\n        }\n    }\n}\n\ntemplate<typename T,typename S,Dist U,Dist V>\ninline void\nSetDiagonal( DistMatrix<T,U,V>& A, S alpha )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SetDiagonal\"))\n    const Int height = A.Height();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        if( j < height && A.IsLocalRow(j) )\n        {\n            const Int iLoc = A.LocalRow(j);\n            A.SetLocal( iLoc, jLoc, alpha );\n        }\n    }\n}\n\ntemplate<typename T,typename S,Dist U,Dist V>\ninline void\nSetDiagonal\n( DistMatrix<T,U,V>& A, S alpha, Int offset, LeftOrRight side=LEFT )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SetDiagonal\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    const Int localWidth = A.LocalWidth();\n    if( side == LEFT )\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int i = j-offset;\n            if( i >= 0 && i < height && A.IsLocalRow(i) )\n            {\n                const Int iLoc = A.LocalRow(i);\n                A.SetLocal( iLoc, jLoc, alpha );\n            }\n        }\n    }\n    else\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int i = j-offset+height-width;\n            if( i >= 0 && i < height && A.IsLocalRow(i) )\n            {\n                const Int iLoc = A.LocalRow(i);\n                A.SetLocal( iLoc, jLoc, alpha );\n            }\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SETDIAGONAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Swap.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLAS_SWAP_HPP\n#define ELEM_BLAS_SWAP_HPP\n\nnamespace elem {\n\ntemplate<typename F>\ninline void Swap( Orientation orientation, Matrix<F>& X, Matrix<F>& Y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Swap\"))\n    const Int mX = X.Height();\n    const Int nX = X.Width();\n\n    if( orientation == NORMAL )\n    {\n        DEBUG_ONLY(\n            if( Y.Height() != mX || Y.Width() != nX )\n                LogicError(\"Invalid submatrix sizes\");\n        )\n        // TODO: Optimize memory access patterns\n        if( mX > nX )\n        {\n            for( Int j=0; j<nX; ++j )\n                blas::Swap( mX, X.Buffer(0,j), 1, Y.Buffer(0,j), 1 );\n        }\n        else\n        {\n            for( Int i=0; i<mX; ++i )\n                blas::Swap\n                ( nX, X.Buffer(i,0), X.LDim(), Y.Buffer(i,0), Y.LDim() );\n        }\n    }\n    else\n    {\n        const bool conjugate = ( orientation==ADJOINT );\n        DEBUG_ONLY(\n            if( Y.Width() != mX || Y.Height() != nX )\n                LogicError(\"Invalid submatrix sizes\");\n        )\n        // TODO: Optimize memory access patterns\n        for( Int j=0; j<nX; ++j )\n        {\n            if( conjugate )\n            {\n                for( Int i=0; i<mX; ++i )\n                {\n                    const F alpha = X.Get(i,j);\n                    X.Set( i, j, Conj(Y.Get(j,i)) );\n                    Y.Set( j, i, Conj(alpha)      );\n                }\n            }\n            else\n            {\n                blas::Swap( mX, X.Buffer(0,j), 1, Y.Buffer(j,0), Y.LDim() );\n            }\n        }\n    }\n}\n\ntemplate<typename F,Dist U1,Dist V1,\n                    Dist U2,Dist V2>\ninline void Swap\n( Orientation orientation, DistMatrix<F,U1,V1>& X, DistMatrix<F,U2,V2>& Y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Swap\"))\n    const Grid& g = X.Grid();\n    if( orientation == NORMAL )\n    {\n        DEBUG_ONLY(\n            if( Y.Height() != X.Height() || Y.Width() != X.Width() )\n                LogicError(\"Invalid submatrix sizes\");\n        )\n        // TODO: Optimize communication\n\n        DistMatrix<F,U1,V1> YLikeX(g);\n        YLikeX.AlignWith( X );\n        YLikeX = Y;\n\n        DistMatrix<F,U2,V2> XLikeY(g);\n        XLikeY.AlignWith( Y );\n        XLikeY = X; \n\n        Y = XLikeY;\n        X = YLikeX; \n    }\n    else\n    {\n        const bool conjugate = ( orientation==ADJOINT );\n        DEBUG_ONLY(\n            if( Y.Width() != X.Height() || Y.Height() != X.Width() )\n                LogicError(\"Invalid submatrix sizes\");\n        )\n\n        // TODO: Optimize communication\n\n        DistMatrix<F,U1,V1> YTransLikeX(g);\n        YTransLikeX.AlignWith( X );\n        Transpose( Y, YTransLikeX, conjugate );\n\n        DistMatrix<F,U2,V2> XTransLikeY(g);\n        XTransLikeY.AlignWith( Y );\n        Transpose( X, XTransLikeY, conjugate );\n\n        Y = XTransLikeY;\n        X = YTransLikeX;\n    }\n}\n\ntemplate<typename F>\ninline void RowSwap( Matrix<F>& A, Int to, Int from )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RowSwap\"))\n    if( to == from )\n        return;\n    const Int n = A.Width();\n    auto aToRow   = ViewRange( A, to,   0, to+1,   n );\n    auto aFromRow = ViewRange( A, from, 0, from+1, n );\n    Swap( NORMAL, aToRow, aFromRow );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void RowSwap( DistMatrix<F,U,V>& A, Int to, Int from )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RowSwap\"))\n    if( to == from )\n        return;\n    if( !A.Participating() )\n        return;\n    const Int n = A.Width();\n    const Int nLocal = A.LocalWidth();\n    auto aToRow   = ViewRange( A, to,   0, to+1,   n );\n    auto aFromRow = ViewRange( A, from, 0, from+1, n );\n    if( aToRow.ColAlign() == aFromRow.ColAlign() )\n    {\n        if( aToRow.ColShift() == 0 )\n            Swap( NORMAL, aToRow.Matrix(), aFromRow.Matrix() );\n    }\n    else if( aToRow.ColShift() == 0 )\n    {\n        std::vector<F> buf( nLocal );\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            buf[jLoc] = aToRow.GetLocal(0,jLoc);\n        mpi::SendRecv\n        ( buf.data(), nLocal, \n          aFromRow.ColAlign(), aFromRow.ColAlign(), A.ColComm() );\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            aToRow.SetLocal(0,jLoc,buf[jLoc]);\n    }\n    else if( aFromRow.ColShift() == 0 )\n    {\n        std::vector<F> buf( nLocal );\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            buf[jLoc] = aFromRow.GetLocal(0,jLoc);\n        mpi::SendRecv\n        ( buf.data(), nLocal, \n          aToRow.ColAlign(), aToRow.ColAlign(), A.ColComm() );\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            aFromRow.SetLocal(0,jLoc,buf[jLoc]);\n    }\n}\n\ntemplate<typename F>\ninline void ColSwap( Matrix<F>& A, Int to, Int from )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ColSwap\"))\n    if( to == from )\n        return;\n    const Int m = A.Height();\n    auto aToCol   = ViewRange( A, 0, to,   m, to+1   );\n    auto aFromCol = ViewRange( A, 0, from, m, from+1 );\n    Swap( NORMAL, aToCol, aFromCol );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void ColSwap( DistMatrix<F,U,V>& A, Int to, Int from )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ColSwap\"))\n    if( to == from )\n        return;\n    if( !A.Participating() )\n        return;\n    const Int m = A.Height();\n    const Int mLocal = A.LocalHeight();\n    auto aToCol   = ViewRange( A, 0, to,   m, to+1   );\n    auto aFromCol = ViewRange( A, 0, from, m, from+1 );\n    if( aToCol.RowAlign() == aFromCol.RowAlign() )\n    {\n        if( aToCol.RowShift() == 0 )\n            Swap( NORMAL, aToCol.Matrix(), aFromCol.Matrix() );\n    }\n    else if( aToCol.RowShift() == 0 )\n    {\n        mpi::SendRecv\n        ( aToCol.Buffer(), mLocal, \n          aFromCol.RowAlign(), aFromCol.RowAlign(), A.RowComm() );\n    }\n    else if( aFromCol.RowShift() == 0 )\n    {\n        mpi::SendRecv\n        ( aFromCol.Buffer(), mLocal, \n          aToCol.RowAlign(), aToCol.RowAlign(), A.RowComm() );\n    }\n}\n\ntemplate<typename F>\ninline void SymmetricSwap\n( UpperOrLower uplo, Matrix<F>& A, int to, int from, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SymmetricSwap\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( to == from )\n    {\n        if( conjugate )\n            A.MakeReal( to, to );\n        return;\n    }\n    const Int n = A.Height();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n    if( to > from )\n        std::swap( to, from );\n    if( uplo == LOWER )\n    { \n        // Bottom swap\n        if( from+1 < n )\n        {\n            auto ABot = ViewRange( A, from+1, 0, n, n );\n            ColSwap( ABot, to, from );\n        }\n        // Inner swap\n        if( to+1 < from )\n        {\n            auto aToInner   = ViewRange( A, to+1, to,   from,   to+1 );\n            auto aFromInner = ViewRange( A, from, to+1, from+1, from );\n            Swap( orientation, aToInner, aFromInner );\n        }\n        // Corner swap\n        if( conjugate )\n            A.Conjugate( from, to );\n        // Diagonal swap\n        {\n            const F value = A.Get(from,from);\n            A.Set( from, from, A.Get(to,to) );\n            A.Set( to,   to,   value        );\n            if( conjugate )\n            {\n                A.MakeReal( to, to );\n                A.MakeReal( from, from );\n            }\n        }\n        // Left swap\n        if( to > 0 )\n        {\n            auto ALeft = ViewRange( A, 0, 0, n, to );\n            RowSwap( ALeft, to, from ); \n        }\n    }\n    else\n    {\n        // Right swap\n        if( from+1 < n )\n        {\n            auto ARight = ViewRange( A, 0, from+1, n, n );\n            RowSwap( ARight, to, from );\n        }\n        // Inner swap\n        if( to+1 < from )\n        {\n            auto aToInner   = ViewRange( A, to,   to+1, to+1, from   );\n            auto aFromInner = ViewRange( A, to+1, from, from, from+1 );\n            Swap( orientation, aToInner, aFromInner );\n        }\n        // Corner swap\n        if( conjugate )\n            A.Conjugate( to, from );\n        // Diagonal swap\n        {\n            const F value = A.Get(from,from);\n            A.Set( from, from, A.Get(to,to) );\n            A.Set( to,   to,   value        );\n            if( conjugate )\n            {\n                A.MakeReal( to, to );\n                A.MakeReal( from, from );\n            }\n        }\n        // Top swap\n        if( to > 0 )\n        {\n            auto ATop = ViewRange( A, 0, 0, to, n );\n            ColSwap( ATop, to, from ); \n        }\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void SymmetricSwap\n( UpperOrLower uplo, DistMatrix<F,U,V>& A, \n  int to, int from, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SymmetricSwap\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( to == from )\n    {\n        if( conjugate )\n            A.MakeReal( to, to );\n        return;\n    }\n    const Int n = A.Height();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n    if( to > from )\n        std::swap( to, from );\n    if( uplo == LOWER )\n    { \n        // Bottom swap\n        if( from+1 < n )\n        {\n            auto ABot = ViewRange( A, from+1, 0, n, n );\n            ColSwap( ABot, to, from );\n        }\n        // Inner swap\n        if( to+1 < from )\n        {\n            auto aToInner   = ViewRange( A, to+1, to,   from,   to+1 );\n            auto aFromInner = ViewRange( A, from, to+1, from+1, from );\n            Swap( orientation, aToInner, aFromInner );\n        }\n        // Corner swap\n        if( conjugate )\n            A.Conjugate( from, to );\n        // Diagonal swap\n        {\n            const F value = A.Get(from,from);\n            A.Set( from, from, A.Get(to,to) );\n            A.Set( to,   to,   value        );\n            if( conjugate )\n            {\n                A.MakeReal( to, to );\n                A.MakeReal( from, from );\n            }\n        }\n        // Left swap\n        if( to > 0 )\n        {\n            auto ALeft = ViewRange( A, 0, 0, n, to );\n            RowSwap( ALeft, to, from ); \n        }\n    }\n    else\n    {\n        // Right swap\n        if( from+1 < n )\n        {\n            auto ARight = ViewRange( A, 0, from+1, n, n );\n            RowSwap( ARight, to, from );\n        }\n        // Inner swap\n        if( to+1 < from )\n        {\n            auto aToInner   = ViewRange( A, to,   to+1, to+1, from   );\n            auto aFromInner = ViewRange( A, to+1, from, from, from+1 );\n            Swap( orientation, aToInner, aFromInner );\n        }\n        // Corner swap\n        if( conjugate )\n            A.Conjugate( to, from );\n        // Diagonal swap\n        {\n            const F value = A.Get(from,from);\n            A.Set( from, from, A.Get(to,to) );\n            A.Set( to,   to,   value        );\n            if( conjugate )\n            {\n                A.MakeReal( to, to );\n                A.MakeReal( from, from );\n            }\n        }\n        // Top swap\n        if( to > 0 )\n        {\n            auto ATop = ViewRange( A, 0, 0, to, n );\n            ColSwap( ATop, to, from ); \n        }\n    }\n}\n\ntemplate<typename F>\ninline void HermitianSwap( UpperOrLower uplo, Matrix<F>& A, int to, int from )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSwap\"))\n    SymmetricSwap( uplo, A, to, from, true );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void HermitianSwap\n( UpperOrLower uplo, DistMatrix<F,U,V>& A, int to, int from )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSwap\"))\n    SymmetricSwap( uplo, A, to, from, true );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLAS_SWAP_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Symmetric2x2Inv.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMMETRIC2X2INV_HPP\n#define ELEM_SYMMETRIC2X2INV_HPP\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nSymmetric2x2Inv( UpperOrLower uplo, Matrix<F>& D, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Symmetric2x2Inv\"))\n    typedef Base<F> Real;\n    if( uplo == LOWER )\n    {\n        if( conjugate )\n        {\n            const Real delta11 = D.GetRealPart(0,0);\n            const F delta21 = D.Get(1,0);\n            const Real delta22 = D.GetRealPart(1,1);\n            const Real delta21Abs = SafeAbs( delta21 );\n            const Real phi21To11 = delta22 / delta21Abs;\n            const Real phi21To22 = delta11 / delta21Abs;\n            const F phi21 = delta21 / delta21Abs;\n            const Real xi = (Real(1)/(phi21To11*phi21To22-Real(1)))/delta21Abs;\n\n            D.SetRealPart( 0, 0,  xi*phi21To11 );\n            D.Set(         1, 0, -xi*phi21     );\n            D.SetRealPart( 1, 1,  xi*phi21To22 );\n        }\n        else\n        {\n            const F delta11 = D.Get(0,0);\n            const F delta21 = D.Get(1,0);\n            const F delta22 = D.Get(1,1);\n            const F chi21To11 = -delta22 / delta21;\n            const F chi21To22 = -delta11 / delta21;\n            const F chi21 = (F(1)/(F(1)-chi21To11*chi21To22))/delta21;\n\n            D.Set( 0, 0, chi21*chi21To11 );\n            D.Set( 1, 0, chi21           );\n            D.Set( 1, 1, chi21*chi21To22 );\n        }\n    }\n    else\n        LogicError(\"This option not yet supported\");\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYMMETRIC2X2INV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Symmetric2x2Scale.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMMETRIC2X2SCALE_HPP\n#define ELEM_SYMMETRIC2X2SCALE_HPP\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nSymmetric2x2Scale\n( LeftOrRight side, UpperOrLower uplo,\n  const Matrix<F>& D, Matrix<F>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Symmetric2x2Scale\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( m != 2 )\n            LogicError(\"A must have height 2\");\n        const F delta11 = ( conjugate ? D.GetRealPart(0,0) : D.Get(0,0) );\n        const F delta22 = ( conjugate ? D.GetRealPart(1,1) : D.Get(1,1) );\n        const F delta21 = D.Get(1,0);\n        const F delta12 = ( conjugate ? Conj(delta21) : delta21 );\n\n        for( Int j=0; j<n; ++j )\n        {\n            const F alpha1 = A.Get(0,j);\n            const F alpha2 = A.Get(1,j);\n            A.Set( 0, j, delta11*alpha1+delta12*alpha2 );\n            A.Set( 1, j, delta21*alpha1+delta22*alpha2 );\n        }\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( n != 2 )\n            LogicError(\"A must have width 2\");\n        const F delta11 = ( conjugate ? D.GetRealPart(0,0) : D.Get(0,0) );\n        const F delta22 = ( conjugate ? D.GetRealPart(1,1) : D.Get(1,1) );\n        const F delta21 = D.Get(1,0);\n        const F delta12 = ( conjugate ? Conj(delta21) : delta21 );\n\n        for( Int i=0; i<m; ++i )\n        {\n            const F alpha1 = A.Get(i,0);\n            const F alpha2 = A.Get(i,1);\n            A.Set( i, 0, alpha1*delta11+alpha2*delta21 );\n            A.Set( i, 1, alpha1*delta12+alpha2*delta22 );\n        }\n    }\n    else\n        LogicError(\"This option not yet supported\");\n}\n\ntemplate<typename F>\ninline void\nFirstHalfOfSymmetric2x2Scale\n( LeftOrRight side, UpperOrLower uplo,\n  const Matrix<F>& D, Matrix<F>& a1, const Matrix<F>& a2, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"FirstHalfOfSymmetric2x2Scale\");\n        if( a1.Height() != a2.Height() || a1.Width() != a2.Width() )\n            LogicError(\"a1 and a2 must be the same size\");\n    )\n    F* a1Buf = a1.Buffer();\n    const F* a2Buf = a2.LockedBuffer();\n    const Int a1LDim = a1.LDim();\n    const Int a2LDim = a2.LDim();\n    if( side == LEFT && uplo == LOWER )\n    {\n        DEBUG_ONLY(\n            if( a1.Height() != 1 )\n                LogicError(\"a1 and a2 must be row vectors\");\n        )\n        const Int n = a1.Width();\n        const F delta11 = ( conjugate ? D.GetRealPart(0,0) : D.Get(0,0) );\n        const F delta21 = D.Get(1,0);\n        const F delta12 = ( conjugate ? Conj(delta21) : delta21 );\n\n        for( Int j=0; j<n; ++j )\n        {\n            const F alpha1 = a1Buf[j*a1LDim];\n            const F alpha2 = a2Buf[j*a2LDim];\n            a1Buf[j*a1LDim] = delta11*alpha1+delta12*alpha2;\n        }   \n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        DEBUG_ONLY(\n            if( a1.Width() != 1 )\n                LogicError(\"a1 and a2 must be column vectors\");\n        )\n        const Int m = a1.Height();\n        const F delta11 = ( conjugate ? D.GetRealPart(0,0) : D.Get(0,0) );\n        const F delta21 = D.Get(1,0);\n\n        for( Int i=0; i<m; ++i )\n        {\n            const F alpha1 = a1Buf[i];\n            const F alpha2 = a2Buf[i];\n            a1Buf[i] = alpha1*delta11+alpha2*delta21;\n        }\n    }\n    else\n        LogicError(\"This option not yet supported\");\n}\n\ntemplate<typename F>\ninline void\nSecondHalfOfSymmetric2x2Scale\n( LeftOrRight side, UpperOrLower uplo,\n  const Matrix<F>& D, const Matrix<F>& a1, Matrix<F>& a2, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SecondHalfOfSymmetric2x2Scale\");\n        if( a1.Height() != a2.Height() || a1.Width() != a2.Width() )\n            LogicError(\"a1 and a2 must be the same size\");\n    )\n    const F* a1Buf = a1.LockedBuffer();\n    F* a2Buf = a2.Buffer();\n    const Int a1LDim = a1.LDim();\n    const Int a2LDim = a2.LDim();\n    if( side == LEFT && uplo == LOWER )\n    {\n        DEBUG_ONLY(\n            if( a1.Height() != 1 )\n                LogicError(\"a1 and a2 must be row vectors\");\n        )\n        const Int n = a1.Width();\n        const F delta21 = D.Get(1,0);\n        const F delta22 = ( conjugate ? D.GetRealPart(1,1) : D.Get(1,1) );\n\n        for( Int j=0; j<n; ++j )\n        {\n            const F alpha1 = a1Buf[j*a1LDim];\n            const F alpha2 = a2Buf[j*a2LDim];\n            a2Buf[j*a2LDim] = delta21*alpha1+delta22*alpha2;\n        }   \n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        DEBUG_ONLY(\n            if( a1.Width() != 1 )\n                LogicError(\"a1 and a2 must be column vectors\");\n        )\n        const Int m = a1.Height();\n        const F delta21 = D.Get(1,0);\n        const F delta12 = ( conjugate ? Conj(delta21) : delta21 );\n        const F delta22 = ( conjugate ? D.GetRealPart(1,1) : D.Get(1,1) );\n\n        for( Int i=0; i<m; ++i )\n        {\n            const F alpha1 = a1Buf[i];\n            const F alpha2 = a2Buf[i];\n            a2Buf[i] = alpha1*delta12+alpha2*delta22;\n        }\n    }\n    else\n        LogicError(\"This option not yet supported\");\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nSymmetric2x2Scale\n( LeftOrRight side, UpperOrLower uplo,\n  const DistMatrix<F,STAR,STAR>& D, DistMatrix<F,U,V>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Symmetric2x2Scale\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int mLocal = A.LocalHeight();\n    if( side == LEFT )\n    {\n        if( m != 2 )\n            LogicError(\"A must have height 2\");\n        const bool inFirstRow = ( A.ColRank() == A.RowOwner(0) );\n        const bool inSecondRow = ( A.ColRank() == A.RowOwner(1) );\n        if( !inFirstRow && !inSecondRow )\n            return;\n\n        LogicError(\"This option not yet supported\");\n    }\n    else\n    {\n        if( n != 2 )\n            LogicError(\"A must have width 2\");\n        const bool inFirstCol = ( A.RowRank() == A.ColOwner(0) );\n        const bool inSecondCol = ( A.RowRank() == A.ColOwner(1) );\n        if( !inFirstCol && !inSecondCol )\n            return;\n\n        F *ALocCol1=nullptr, *ALocCol2=nullptr;\n        std::vector<F> buffer;\n        {\n            if( inFirstCol && inSecondCol )\n            {\n                ALocCol1 = A.Buffer(0,0);\n                ALocCol2 = A.Buffer(0,1);\n            }\n            else if( inFirstCol )\n            {\n                buffer.resize( mLocal );\n                ALocCol1 = A.Buffer();\n                ALocCol2 = buffer.data();\n                mpi::SendRecv\n                ( ALocCol1, mLocal, A.ColOwner(1),\n                  ALocCol2, mLocal, A.ColOwner(1), A.RowComm() );\n            }\n            else if( inSecondCol )\n            {\n                buffer.resize( mLocal );\n                ALocCol1 = buffer.data();\n                ALocCol2 = A.Buffer();\n                mpi::SendRecv\n                ( ALocCol2, mLocal, A.ColOwner(0),\n                  ALocCol1, mLocal, A.ColOwner(0), A.RowComm() );\n            }\n        }\n        if( uplo == LOWER )\n        {\n            const F delta11 = \n                ( conjugate ? D.GetRealLocalPart(0,0) : D.GetLocal(0,0) );\n            const F delta22 = \n                ( conjugate ? D.GetRealLocalPart(1,1) : D.GetLocal(1,1) );\n            const F delta21 = D.GetLocal(1,0);\n            const F delta12 = ( conjugate ? Conj(delta21) : delta21 );\n\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n            {\n                const F alpha1 = ALocCol1[iLoc];\n                const F alpha2 = ALocCol2[iLoc];\n                ALocCol1[iLoc] = delta11*alpha1+delta21*alpha2;\n                ALocCol2[iLoc] = delta12*alpha1+delta22*alpha2;\n            }\n        }\n        else\n            LogicError(\"This option not yet supported\");\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYMMETRIC2X2SCALE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Symmetric2x2Solve.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMMETRIC2X2SOLVE_HPP\n#define ELEM_SYMMETRIC2X2SOLVE_HPP\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nSymmetric2x2Solve\n( LeftOrRight side, UpperOrLower uplo,\n  const Matrix<F>& D, Matrix<F>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Symmetric2x2Solve\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( m != 2 )\n            LogicError(\"A must have height 2\");\n        if( conjugate )\n        {\n            const Real delta11 = D.GetRealPart(0,0);\n            const F delta21 = D.Get(1,0);\n            const Real delta22 = D.GetRealPart(1,1);\n            const Real delta21Abs = SafeAbs( delta21 );\n            const Real phi21To11 = delta22 / delta21Abs;\n            const Real phi21To22 = delta11 / delta21Abs;\n            const F phi21 = delta21 / delta21Abs;\n            const Real xi = (Real(1)/(phi21To11*phi21To22-Real(1)))/delta21Abs;\n\n            for( Int j=0; j<n; ++j )\n            {\n                const F alpha1 = A.Get(0,j);\n                const F alpha2 = A.Get(1,j);\n                const F eta1 = xi*(phi21To11*alpha1-Conj(phi21)*alpha2);\n                const F eta2 = xi*(phi21To22*alpha2-phi21      *alpha1);\n                A.Set( 0, j, eta1 );\n                A.Set( 1, j, eta2 );\n            }\n        }\n        else\n        {\n            const F delta11 = D.Get(0,0);\n            const F delta21 = D.Get(1,0);\n            const F delta22 = D.Get(1,1);\n            const F chi21To11 = -delta22 / delta21;\n            const F chi21To22 = -delta11 / delta21;\n            const F chi21 = (F(1)/(F(1)-chi21To11*chi21To22))/delta21;\n\n            for( Int j=0; j<n; ++j )\n            {\n                const F alpha1 = A.Get(0,j);\n                const F alpha2 = A.Get(1,j);\n                const F eta1 = chi21*(chi21To11*alpha1+alpha2);\n                const F eta2 = chi21*(chi21To22*alpha2+alpha1);\n                A.Set( 0, j, eta1 );\n                A.Set( 1, j, eta2 );\n            }\n        }\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( n != 2 )\n            LogicError(\"A must have width 2\");\n        if( conjugate )\n        {\n            const Real delta11 = D.GetRealPart(0,0);\n            const F delta21 = D.Get(1,0);\n            const Real delta22 = D.GetRealPart(1,1);\n            const Real delta21Abs = SafeAbs( delta21 );\n            const Real phi21To11 = delta22 / delta21Abs;\n            const Real phi21To22 = delta11 / delta21Abs;\n            const F phi21 = delta21 / delta21Abs;\n            const Real xi = (Real(1)/(phi21To11*phi21To22-Real(1)))/delta21Abs;\n\n            for( Int i=0; i<m; ++i )\n            {\n                const F alpha1 = A.Get(i,0);\n                const F alpha2 = A.Get(i,1);\n                const F eta1 = xi*(phi21To11*alpha1-phi21      *alpha2);\n                const F eta2 = xi*(phi21To22*alpha2-Conj(phi21)*alpha1);\n                A.Set( i, 0, eta1 );\n                A.Set( i, 1, eta2 );\n            }\n        }\n        else\n        {\n            const F delta11 = D.Get(0,0);\n            const F delta21 = D.Get(1,0);\n            const F delta22 = D.Get(1,1);\n            const F chi21To11 = -delta22 / delta21;\n            const F chi21To22 = -delta11 / delta21;\n            const F chi21 = (F(1)/(F(1)-chi21To11*chi21To22))/delta21;\n\n            for( Int i=0; i<m; ++i )\n            {\n                const F alpha1 = A.Get(i,0);\n                const F alpha2 = A.Get(i,1);\n                const F eta1 = chi21*(chi21To11*alpha1+alpha2);\n                const F eta2 = chi21*(chi21To22*alpha2+alpha1);\n                A.Set( i, 0, eta1 );\n                A.Set( i, 1, eta2 );\n            }\n        }\n    }\n    else\n        LogicError(\"This option not yet supported\");\n}\n\ntemplate<typename F>\ninline void\nFirstHalfOfSymmetric2x2Solve\n( LeftOrRight side, UpperOrLower uplo,\n  const Matrix<F>& D, Matrix<F>& a1, const Matrix<F>& a2, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"FirstHalfOfSymmetric2x2Solve\");\n        if( a1.Height() != a2.Height() || a1.Width() != a2.Width() )\n            LogicError(\"a1 and a2 must be the same size\");\n    )\n    typedef Base<F> Real;\n    F* a1Buf = a1.Buffer();\n    const F* a2Buf = a2.LockedBuffer();\n    const Int a1LDim = a1.LDim();\n    const Int a2LDim = a2.LDim();\n    if( side == LEFT && uplo == LOWER )\n    {\n        DEBUG_ONLY(\n            if( a1.Height() != 1 )\n                LogicError(\"a1 and a2 must be row vectors\");\n        )\n        const Int n = a1.Width();\n        if( conjugate )\n        {\n            const Real delta11 = D.GetRealPart(0,0);\n            const F delta21 = D.Get(1,0);\n            const Real delta22 = D.GetRealPart(1,1);\n            const Real delta21Abs = SafeAbs( delta21 );\n            const Real phi21To11 = delta22 / delta21Abs;\n            const Real phi21To22 = delta11 / delta21Abs;\n            const F phi21 = delta21 / delta21Abs;\n            const Real xi = (Real(1)/(phi21To11*phi21To22-Real(1)))/delta21Abs;\n\n            for( Int j=0; j<n; ++j )\n            {\n                const F alpha1 = a1Buf[j*a1LDim];\n                const F alpha2 = a2Buf[j*a2LDim];\n                a1Buf[j*a1LDim] = xi*(phi21To11*alpha1-Conj(phi21)*alpha2);\n            }\n        }\n        else\n        {\n            const F delta11 = D.Get(0,0);\n            const F delta21 = D.Get(1,0);\n            const F delta22 = D.Get(1,1);\n            const F chi21To11 = -delta22 / delta21;\n            const F chi21To22 = -delta11 / delta21;\n            const F chi21 = (F(1)/(F(1)-chi21To11*chi21To22))/delta21;\n\n            for( Int j=0; j<n; ++j )\n            {\n                const F alpha1 = a1Buf[j*a1LDim];\n                const F alpha2 = a2Buf[j*a2LDim];\n                a1Buf[j*a1LDim] = chi21*(chi21To11*alpha1+alpha2);\n            }\n        }\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        DEBUG_ONLY(\n            if( a1.Width() != 1 )\n                LogicError(\"a1 and a2 must be column vectors\");\n        )\n        const Int m = a1.Height();\n        if( conjugate )\n        {\n            const Real delta11 = D.GetRealPart(0,0);\n            const F delta21 = D.Get(1,0);\n            const Real delta22 = D.GetRealPart(1,1);\n            const Real delta21Abs = SafeAbs( delta21 );\n            const Real phi21To11 = delta22 / delta21Abs;\n            const Real phi21To22 = delta11 / delta21Abs;\n            const F phi21 = delta21 / delta21Abs;\n            const Real xi = (Real(1)/(phi21To11*phi21To22-Real(1)))/delta21Abs;\n\n            for( Int i=0; i<m; ++i )\n            {\n                const F alpha1 = a1Buf[i];\n                const F alpha2 = a2Buf[i];\n                a1Buf[i] = xi*(phi21To11*alpha1-phi21*alpha2);\n            }\n        }\n        else\n        {\n            const F delta11 = D.Get(0,0);\n            const F delta21 = D.Get(1,0);\n            const F delta22 = D.Get(1,1);\n            const F chi21To11 = -delta22 / delta21;\n            const F chi21To22 = -delta11 / delta21;\n            const F chi21 = (F(1)/(F(1)-chi21To11*chi21To22))/delta21;\n\n            for( Int i=0; i<m; ++i )\n            {\n                const F alpha1 = a1Buf[i];\n                const F alpha2 = a2Buf[i];\n                a1Buf[i] = chi21*(chi21To11*alpha1+alpha2);\n            }\n        }\n    }\n    else\n        LogicError(\"This option not yet supported\");\n}\n\ntemplate<typename F>\ninline void\nSecondHalfOfSymmetric2x2Solve\n( LeftOrRight side, UpperOrLower uplo,\n  const Matrix<F>& D, const Matrix<F>& a1, Matrix<F>& a2, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SecondHalfOfSymmetric2x2Solve\");\n        if( a1.Height() != a2.Height() || a1.Width() != a2.Width() )\n            LogicError(\"a1 and a2 must be the same size\");\n    )\n    typedef Base<F> Real;\n    const F* a1Buf = a1.LockedBuffer();\n    F* a2Buf = a2.Buffer();\n    const Int a1LDim = a1.LDim();\n    const Int a2LDim = a2.LDim();\n    if( side == LEFT && uplo == LOWER )\n    {\n        DEBUG_ONLY(\n            if( a1.Height() != 1 )\n                LogicError(\"a1 and a2 must be row vectors\");\n        )\n        const Int n = a1.Width();\n        if( conjugate )\n        {\n            const Real delta11 = D.GetRealPart(0,0);\n            const F delta21 = D.Get(1,0);\n            const Real delta22 = D.GetRealPart(1,1);\n            const Real delta21Abs = SafeAbs( delta21 );\n            const Real phi21To11 = delta22 / delta21Abs;\n            const Real phi21To22 = delta11 / delta21Abs;\n            const F phi21 = delta21 / delta21Abs;\n            const Real xi = (Real(1)/(phi21To11*phi21To22-Real(1)))/delta21Abs;\n\n            for( Int j=0; j<n; ++j )\n            {\n                const F alpha1 = a1Buf[j*a1LDim];\n                const F alpha2 = a2Buf[j*a2LDim];\n                a2Buf[j*a2LDim] = xi*(phi21To22*alpha2-phi21*alpha1);\n            }\n        }\n        else\n        {\n            const F delta11 = D.Get(0,0);\n            const F delta21 = D.Get(1,0);\n            const F delta22 = D.Get(1,1);\n            const F chi21To11 = -delta22 / delta21;\n            const F chi21To22 = -delta11 / delta21;\n            const F chi21 = (F(1)/(F(1)-chi21To11*chi21To22))/delta21;\n\n            for( Int j=0; j<n; ++j )\n            {\n                const F alpha1 = a1Buf[j*a1LDim];\n                const F alpha2 = a2Buf[j*a2LDim];\n                a2Buf[j*a2LDim] = chi21*(chi21To22*alpha2+alpha1);\n            }\n        }\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        DEBUG_ONLY(\n            if( a1.Width() != 1 )\n                LogicError(\"a1 and a2 must be column vectors\");\n        )\n        const Int m = a1.Height();\n        if( conjugate )\n        {\n            const Real delta11 = D.GetRealPart(0,0);\n            const F delta21 = D.Get(1,0);\n            const Real delta22 = D.GetRealPart(1,1);\n            const Real delta21Abs = SafeAbs( delta21 );\n            const Real phi21To11 = delta22 / delta21Abs;\n            const Real phi21To22 = delta11 / delta21Abs;\n            const F phi21 = delta21 / delta21Abs;\n            const Real xi = (Real(1)/(phi21To11*phi21To22-Real(1)))/delta21Abs;\n\n            for( Int i=0; i<m; ++i )\n            {\n                const F alpha1 = a1Buf[i];\n                const F alpha2 = a2Buf[i];\n                a2Buf[i] = xi*(phi21To22*alpha2-Conj(phi21)*alpha1);\n            }\n        }\n        else\n        {\n            const F delta11 = D.Get(0,0);\n            const F delta21 = D.Get(1,0);\n            const F delta22 = D.Get(1,1);\n            const F chi21To11 = -delta22 / delta21;\n            const F chi21To22 = -delta11 / delta21;\n            const F chi21 = (F(1)/(F(1)-chi21To11*chi21To22))/delta21;\n\n            for( Int i=0; i<m; ++i )\n            {\n                const F alpha1 = a1Buf[i];\n                const F alpha2 = a2Buf[i];\n                a2Buf[i] = chi21*(chi21To22*alpha2+alpha1);\n            }\n        }\n    }\n    else\n        LogicError(\"This option not yet supported\");\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nSymmetric2x2Solve\n( LeftOrRight side, UpperOrLower uplo,\n  const DistMatrix<F,STAR,STAR>& D, DistMatrix<F,U,V>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Symmetric2x2Solve\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int mLocal = A.LocalHeight();\n    if( side == LEFT )\n    {\n        if( m != 2 )\n            LogicError(\"A must have height 2\");\n        const bool inFirstRow = ( A.ColRank() == A.RowOwner(0) );\n        const bool inSecondRow = ( A.ColRank() == A.RowOwner(1) );\n        if( !inFirstRow && !inSecondRow )\n            return;\n\n        LogicError(\"This option not yet supported\");\n    }\n    else\n    {\n        if( n != 2 )\n            LogicError(\"A must have width 2\");\n        const bool inFirstCol = ( A.RowRank() == A.ColOwner(0) );\n        const bool inSecondCol = ( A.RowRank() == A.ColOwner(1) );\n        if( !inFirstCol && !inSecondCol )\n            return;\n\n        F *ALocCol1=nullptr, *ALocCol2=nullptr;\n        std::vector<F> buffer;\n        {\n            if( inFirstCol && inSecondCol )\n            {\n                ALocCol1 = A.Buffer(0,0);\n                ALocCol2 = A.Buffer(0,1);\n            }\n            else if( inFirstCol )\n            {\n                buffer.resize( mLocal );\n                ALocCol1 = A.Buffer();\n                ALocCol2 = buffer.data();\n                mpi::SendRecv\n                ( ALocCol1, mLocal, A.ColOwner(1),\n                  ALocCol2, mLocal, A.ColOwner(1), A.RowComm() );\n            }\n            else if( inSecondCol )\n            {\n                buffer.resize( mLocal );\n                ALocCol1 = buffer.data();\n                ALocCol2 = A.Buffer();\n                mpi::SendRecv\n                ( ALocCol2, mLocal, A.ColOwner(0),\n                  ALocCol1, mLocal, A.ColOwner(0), A.RowComm() );\n            }\n        }\n        if( uplo == LOWER )\n        {\n            if( conjugate )\n            {\n                const Real delta11 = D.GetLocalRealPart(0,0);\n                const F delta21 = D.GetLocal(1,0);\n                const Real delta22 = D.GetLocalRealPart(1,1);\n                const Real delta21Abs = SafeAbs( delta21 );\n                const Real phi21To11 = delta22 / delta21Abs;\n                const Real phi21To22 = delta11 / delta21Abs;\n                const F phi21 = delta21 / delta21Abs;\n                const Real xi = \n                    (Real(1)/(phi21To11*phi21To22-Real(1)))/delta21Abs;\n\n                for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                {\n                    const F alpha1 = ALocCol1[iLoc];\n                    const F alpha2 = ALocCol2[iLoc];\n                    ALocCol1[iLoc] = xi*(phi21To11*alpha1-phi21      *alpha2);\n                    ALocCol2[iLoc] = xi*(phi21To22*alpha2-Conj(phi21)*alpha1);\n                }\n            }\n            else\n            {\n                const F delta11 = D.GetLocal(0,0);\n                const F delta21 = D.GetLocal(1,0);\n                const F delta22 = D.GetLocal(1,1);\n                const F chi21To11 = -delta22 / delta21;\n                const F chi21To22 = -delta11 / delta21;\n                const F chi21 = (F(1)/(F(1)-chi21To11*chi21To22))/delta21;\n\n                for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                {\n                    const F alpha1 = ALocCol1[iLoc];\n                    const F alpha2 = ALocCol2[iLoc];\n                    ALocCol1[iLoc] = chi21*(chi21To11*alpha1+alpha2);\n                    ALocCol2[iLoc] = chi21*(chi21To22*alpha2+alpha1);\n                }\n            }\n        }\n        else\n            LogicError(\"This option not yet supported\");\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYMMETRIC2X2SOLVE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Transpose.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRANSPOSE_HPP\n#define ELEM_TRANSPOSE_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nTranspose( const Matrix<T>& A, Matrix<T>& B, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Transpose\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    B.Resize( n, m );\n    if( conjugate )\n    {\n        for( Int j=0; j<n; ++j )\n            for( Int i=0; i<m; ++i )\n                B.Set(j,i,Conj(A.Get(i,j)));\n    }\n    else\n    {\n        for( Int j=0; j<n; ++j )\n            for( Int i=0; i<m; ++i )\n                B.Set(j,i,A.Get(i,j));\n    }\n}\n\ntemplate<typename T,Dist U,Dist V,\n                    Dist W,Dist Z>\ninline void\nTranspose\n( const DistMatrix<T,U,V>& A, DistMatrix<T,W,Z>& B, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Transpose\"))\n    if( U == Z && V == W && \n        (A.ColAlign()==B.RowAlign() || !B.RowConstrained()) &&\n        (A.RowAlign()==B.ColAlign() || !B.ColConstrained()) )\n    {\n        B.Align( A.RowAlign(), A.ColAlign() );\n        B.Resize( A.Width(), A.Height() );\n        Transpose( A.LockedMatrix(), B.Matrix(), conjugate );\n    }\n    else\n    {\n        DistMatrix<T,Z,W> C( B.Grid() );\n        C.AlignRowsWith( B );\n        C.AlignColsWith( B );\n        C = A;\n        B.Resize( A.Width(), A.Height() );\n        Transpose( C.LockedMatrix(), B.Matrix(), conjugate );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V,\n                    Dist W,Dist Z>\ninline void\nTranspose\n( const BlockDistMatrix<T,U,V>& A, BlockDistMatrix<T,W,Z>& B, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Transpose\"))\n    // TODO: Member function to quickly query this information?!?\n    //       Perhaps A.ColsAlignedWithRows( B )?\n    //               A.ColsAlignedWithCols( B )?\n    const bool transposeColAligned = \n        U               == Z              &&\n        A.BlockHeight() == B.BlockWidth() &&\n        A.ColAlign()    == B.RowAlign()   &&\n        A.ColCut()      == B.RowCut();\n    const bool transposeRowAligned =\n        V              == W               &&\n        A.BlockWidth() == B.BlockHeight() &&\n        A.RowAlign()   == B.ColAlign()    &&\n        A.RowCut()     == B.ColCut();\n    if( (transposeColAligned || !B.RowConstrained()) &&\n        (transposeRowAligned || !B.ColConstrained()) )\n    {\n        B.Align\n        ( A.BlockWidth(), A.BlockHeight(), \n          A.RowAlign(), A.ColAlign(), A.RowCut(), A.ColCut() );\n        B.Resize( A.Width(), A.Height() );\n        Transpose( A.LockedMatrix(), B.Matrix(), conjugate );\n    }\n    else\n    {\n        BlockDistMatrix<T,Z,W> C( B.Grid() );\n        C.AlignRowsWith( B );\n        C.AlignColsWith( B );\n        C = A;\n        B.Resize( A.Width(), A.Height() );\n        Transpose( C.LockedMatrix(), B.Matrix(), conjugate );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRANSPOSE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/UpdateDiagonal.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_UPDATEDIAGONAL_HPP\n#define ELEM_UPDATEDIAGONAL_HPP\n\n// This is essentially equivalent to SetDiagonal, but with s/Set/Update/g.\n\nnamespace elem {\n\ntemplate<typename T,typename S>\ninline void\nUpdateDiagonal( Matrix<T>& A, S alpha )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"UpdateDiagonal\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    ELEM_PARALLEL_FOR\n    for( Int j=0; j<Min(height,width); ++j )\n        A.Update(j,j,alpha);\n}\n\ntemplate<typename T,typename S>\ninline void\nUpdateDiagonal( Matrix<T>& A, S alpha, Int offset, LeftOrRight side=LEFT )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"UpdateDiagonal\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( side == LEFT )\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            const Int i = j-offset;\n            if( i >= 0 && i < height )\n                A.Update(i,j,alpha);\n        }\n    }\n    else\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            const Int i = j-offset+height-width;\n            if( i >= 0 && i < height )\n                A.Update(i,j,alpha);\n        }\n    }\n}\n\ntemplate<typename T,typename S,Dist U,Dist V>\ninline void\nUpdateDiagonal( DistMatrix<T,U,V>& A, S alpha )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"UpdateDiagonal\"))\n    const Int height = A.Height();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        if( j < height && A.IsLocalRow(j) )\n        {\n            const Int iLoc = A.LocalRow(j);\n            A.UpdateLocal( iLoc, jLoc, alpha );\n        }\n    }\n}\n\ntemplate<typename T,typename S,Dist U,Dist V>\ninline void\nUpdateDiagonal\n( DistMatrix<T,U,V>& A, S alpha, Int offset, LeftOrRight side=LEFT )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"UpdateDiagonal\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    const Int localWidth = A.LocalWidth();\n    if( side == LEFT )\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int i = j-offset;\n            if( i >= 0 && i < height && A.IsLocalRow(i) )\n            {\n                const Int iLoc = A.LocalRow(i);\n                A.UpdateLocal( iLoc, jLoc, alpha );\n            }\n        }\n    }\n    else\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int i = j-offset+height-width;\n            if( i >= 0 && i < height && A.IsLocalRow(i) )\n            {\n                const Int iLoc = A.LocalRow(i);\n                A.UpdateLocal( iLoc, jLoc, alpha );\n            }\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_UPDATEDIAGONAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1/Zero.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_ZERO_HPP\n#define ELEM_ZERO_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nZero( Matrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Zero\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    ELEM_PARALLEL_FOR\n    for( Int j=0; j<width; ++j )\n        MemZero( A.Buffer(0,j), height );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nZero( DistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Zero\"))\n    Zero( A.Matrix() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_ZERO_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level1.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLAS1_HPP\n#define ELEM_BLAS1_HPP\n\n#include \"./level1/Adjoint.hpp\"\n#include \"./level1/Axpy.hpp\"\n#include \"./level1/AxpyTriangle.hpp\"\n#include \"./level1/Conjugate.hpp\"\n#include \"./level1/Copy.hpp\"\n#include \"./level1/DiagonalScale.hpp\"\n#include \"./level1/DiagonalScaleTrapezoid.hpp\"\n#include \"./level1/DiagonalSolve.hpp\"\n#include \"./level1/Dot.hpp\"\n#include \"./level1/Dotu.hpp\"\n#include \"./level1/EntrywiseMap.hpp\"\n#include \"./level1/Hadamard.hpp\"\n#include \"./level1/HilbertSchmidt.hpp\"\n#include \"./level1/MakeHermitian.hpp\"\n#include \"./level1/MakeReal.hpp\"\n#include \"./level1/MakeSymmetric.hpp\"\n#include \"./level1/MakeTrapezoidal.hpp\"\n#include \"./level1/MakeTriangular.hpp\"\n#include \"./level1/Max.hpp\"\n#include \"./level1/MaxAbs.hpp\"\n#include \"./level1/Min.hpp\"\n#include \"./level1/MinAbs.hpp\"\n#include \"./level1/Nrm2.hpp\"\n#include \"./level1/QuasiDiagonalScale.hpp\"\n#include \"./level1/QuasiDiagonalSolve.hpp\"\n#include \"./level1/Scale.hpp\"\n#include \"./level1/ScaleTrapezoid.hpp\"\n#include \"./level1/SetDiagonal.hpp\"\n#include \"./level1/Swap.hpp\"\n#include \"./level1/Symmetric2x2Inv.hpp\"\n#include \"./level1/Symmetric2x2Scale.hpp\"\n#include \"./level1/Symmetric2x2Solve.hpp\"\n#include \"./level1/Transpose.hpp\"\n#include \"./level1/UpdateDiagonal.hpp\"\n#include \"./level1/Zero.hpp\"\n\n#endif // ifndef ELEM_BLAS1_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Gemv/N.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GEMV_N_HPP\n#define ELEM_GEMV_N_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nGemvN\n( T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& x,\n  T beta,        DistMatrix<T>& y )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::GemvN\");\n        if( A.Grid() != x.Grid() || x.Grid() != y.Grid() )\n            LogicError(\"{A,x,y} must be distributed over the same grid\");\n        if( ( x.Width() != 1 && x.Height() != 1 ) ||\n            ( y.Width() != 1 && y.Height() != 1 )   )\n            LogicError(\"x and y are assumed to be vectors\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( A.Height() != yLength || A.Width() != xLength )\n            LogicError\n            (\"Nonconformal GemvN: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\",\n             \"  y ~ \",y.Height(),\" x \",y.Width(),\"\\n\");\n    )\n    const Grid& g = A.Grid();\n    if( x.Width() == 1 && y.Width() == 1 )\n    {\n        DistMatrix<T,MR,STAR> x_MR_STAR(g);\n        DistMatrix<T,MC,STAR> z_MC_STAR(g);\n\n        Scale( beta, y );\n        x_MR_STAR.AlignWith( A );\n        z_MC_STAR.AlignWith( A );\n        //--------------------------------------------------------------------//\n        x_MR_STAR = x;\n        Zeros( z_MC_STAR, A.Height(), 1 );\n        LocalGemv( NORMAL, alpha, A, x_MR_STAR, T(0), z_MC_STAR );\n        y.RowSumScatterUpdate( T(1), z_MC_STAR );\n        //--------------------------------------------------------------------//\n    }\n    else if( x.Width() == 1 )\n    {\n        DistMatrix<T,MR,STAR> x_MR_STAR(g);\n        DistMatrix<T,MC,STAR> z_MC_STAR(g);\n        DistMatrix<T> z(g), zTrans(g);\n\n        Scale( beta, y );\n        x_MR_STAR.AlignWith( A );\n        z_MC_STAR.AlignWith( A );\n        z.AlignWith( y );\n        zTrans.AlignWith( y );\n        //--------------------------------------------------------------------//\n        x_MR_STAR = x;\n        Zeros( z_MC_STAR, A.Height(), 1 );\n        LocalGemv( NORMAL, alpha, A, x_MR_STAR, T(0), z_MC_STAR );\n        z.RowSumScatterFrom( z_MC_STAR );\n        Transpose( z, zTrans );\n        Axpy( T(1), zTrans, y );\n        //--------------------------------------------------------------------//\n    }\n    else if( y.Width() == 1 )\n    {\n        DistMatrix<T,STAR,MR  > x_STAR_MR(g);\n        DistMatrix<T,MC,  STAR> z_MC_STAR(g);\n\n        Scale( beta, y );\n        x_STAR_MR.AlignWith( A );\n        z_MC_STAR.AlignWith( A );\n        //--------------------------------------------------------------------//\n        x_STAR_MR = x;\n        Zeros( z_MC_STAR, A.Height(), 1 );\n        LocalGemv( NORMAL, alpha, A, x_STAR_MR, T(0), z_MC_STAR );\n        y.RowSumScatterUpdate( T(1), z_MC_STAR );\n        //--------------------------------------------------------------------//\n    }\n    else\n    {\n        DistMatrix<T,STAR,MR  > x_STAR_MR(g);\n        DistMatrix<T,MC,  STAR> z_MC_STAR(g);\n        DistMatrix<T> z(g), zTrans(g);\n\n        Scale( beta, y );\n        x_STAR_MR.AlignWith( A );\n        z_MC_STAR.AlignWith( A );\n        z.AlignWith( y );\n        zTrans.AlignWith( y );\n        //--------------------------------------------------------------------//\n        x_STAR_MR = x;\n        Zeros( z_MC_STAR, A.Height(), 1 );\n        LocalGemv( NORMAL, alpha, A, x_STAR_MR, T(0), z_MC_STAR );\n        z.RowSumScatterFrom( z_MC_STAR );\n        Transpose( z, zTrans );\n        Axpy( T(1), zTrans, y );\n        //--------------------------------------------------------------------//\n    }\n}\n\ntemplate<typename T>\ninline void\nGemvN\n( T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T,VC,STAR>& x,\n  T beta,        DistMatrix<T,VC,STAR>& y )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::GemvN\");\n        if( A.Grid() != x.Grid() || x.Grid() != y.Grid() )\n            LogicError(\"{A,x,y} must be distributed over the same grid\");\n        if( x.Width() != 1 || y.Width() != 1 )\n            LogicError(\"x and y are assumed to be column vectors\");\n        if( A.Height() != y.Height() || A.Width() != x.Height() )\n            LogicError\n            (\"Nonconformal GemvN: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\",\n             \"  y ~ \",y.Height(),\" x \",y.Width(),\"\\n\");\n    )\n    const Grid& g = A.Grid();\n\n    DistMatrix<T,MR,STAR> x_MR_STAR(g);\n    DistMatrix<T,MC,STAR> z_MC_STAR(g);\n\n    Scale( beta, y );\n    x_MR_STAR.AlignWith( A );\n    z_MC_STAR.AlignWith( A );\n    //--------------------------------------------------------------------//\n    x_MR_STAR = x;\n    Zeros( z_MC_STAR, A.Height(), 1 );\n    LocalGemv( NORMAL, alpha, A, x_MR_STAR, T(0), z_MC_STAR );\n    y.PartialColSumScatterUpdate( T(1), z_MC_STAR );\n    //--------------------------------------------------------------------//\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_GEMV_N_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Gemv/T.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GEMV_T_HPP\n#define ELEM_GEMV_T_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nGemvT\n( Orientation orientation,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& x,\n  T beta,        DistMatrix<T>& y )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::GemvT\");\n        if( A.Grid() != x.Grid() || x.Grid() != y.Grid() )\n            LogicError(\"{A,x,y} must be distributed over the same grid\");\n        if( ( x.Width() != 1 && x.Height() != 1 ) ||\n            ( y.Width() != 1 && y.Height() != 1 )   )\n            LogicError(\"GemvT expects x and y to be vectors\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( A.Height() != xLength || A.Width() != yLength )\n            LogicError\n            (\"Nonconformal GemvT: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\",\n             \"  y ~ \",y.Height(),\" x \",y.Width(),\"\\n\");\n    )\n    const Grid& g = A.Grid();\n    if( x.Width() == 1 && y.Width() == 1 )\n    {\n        DistMatrix<T,MC,STAR> x_MC_STAR(g);\n        DistMatrix<T,MR,STAR> z_MR_STAR(g);\n        DistMatrix<T,MR,MC  > z_MR_MC(g);\n\n        Scale( beta, y );\n        x_MC_STAR.AlignWith( A );\n        z_MR_STAR.AlignWith( A );\n        z_MR_MC.AlignWith( y );\n        //--------------------------------------------------------------------//\n        x_MC_STAR = x;\n        Zeros( z_MR_STAR, A.Width(), 1 );\n        LocalGemv( orientation, alpha, A, x_MC_STAR, T(0), z_MR_STAR );\n        z_MR_MC.RowSumScatterFrom( z_MR_STAR );\n        Axpy( T(1), z_MR_MC, y );\n        //--------------------------------------------------------------------//\n    }\n    else if( x.Width() == 1 )\n    {\n        DistMatrix<T,MC,STAR> x_MC_STAR(g);\n        DistMatrix<T,MR,STAR> z_MR_STAR(g);\n        DistMatrix<T,MR,MC  > z_MR_MC(g);\n        DistMatrix<T> zTrans(g);\n\n        Scale( beta, y );\n        x_MC_STAR.AlignWith( A );\n        z_MR_STAR.AlignWith( A );\n        z_MR_MC.AlignWith( y );\n        zTrans.AlignWith( y );\n        //--------------------------------------------------------------------//\n        x_MC_STAR = x;\n        Zeros( z_MR_STAR, A.Width(), 1 );\n        LocalGemv( orientation, alpha, A, x_MC_STAR, T(0), z_MR_STAR );\n        z_MR_MC.RowSumScatterFrom( z_MR_STAR );\n        Transpose( z_MR_MC, zTrans );\n        Axpy( T(1), zTrans, y );\n        //--------------------------------------------------------------------//\n    }\n    else if( y.Width() == 1 )\n    {\n        DistMatrix<T,STAR,MC  > x_STAR_MC(g);\n        DistMatrix<T,MR,  STAR> z_MR_STAR(g);\n        DistMatrix<T,MR,  MC  > z_MR_MC(g);\n\n        Scale( beta, y );\n        x_STAR_MC.AlignWith( A );\n        z_MR_STAR.AlignWith( A );\n        z_MR_MC.AlignWith( y );\n        //--------------------------------------------------------------------//\n        x_STAR_MC = x;\n        Zeros( z_MR_STAR, A.Width(), 1 );\n        LocalGemv( orientation, alpha, A, x_STAR_MC, T(0), z_MR_STAR );\n        z_MR_MC.RowSumScatterFrom( z_MR_STAR );\n        Axpy( T(1), z_MR_MC, y );\n        //--------------------------------------------------------------------//\n    }\n    else\n    {\n        DistMatrix<T,STAR,MC  > x_STAR_MC(g);\n        DistMatrix<T,MR,  STAR> z_MR_STAR(g);\n        DistMatrix<T,MR,  MC  > z_MR_MC(g);\n        DistMatrix<T> zTrans(g);\n\n        Scale( beta, y );\n        x_STAR_MC.AlignWith( A );\n        z_MR_STAR.AlignWith( A );\n        z_MR_MC.AlignWith( y );\n        zTrans.AlignWith( y );\n        //--------------------------------------------------------------------//\n        x_STAR_MC = x;\n        Zeros( z_MR_STAR, A.Width(), 1 );\n        LocalGemv( orientation, alpha, A, x_STAR_MC, T(0), z_MR_STAR );\n        z_MR_MC.RowSumScatterFrom( z_MR_STAR );\n        Transpose( z_MR_MC, zTrans );\n        Axpy( T(1), zTrans, y );\n        //--------------------------------------------------------------------//\n    }\n}\n\ntemplate<typename T>\ninline void\nGemvT\n( Orientation orientation,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T,VC,STAR>& x,\n  T beta,        DistMatrix<T,VC,STAR>& y )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::GemvT\");\n        if( A.Grid() != x.Grid() || x.Grid() != y.Grid() )\n            LogicError(\"{A,x,y} must be distributed over the same grid\");\n        if( x.Width() != 1 || y.Width() != 1 )\n            LogicError(\"GemvT expects x and y to be column vectors\");\n        if( A.Height() != x.Height() || A.Width() != y.Height() )\n            LogicError\n            (\"Nonconformal GemvT: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\",\n             \"  y ~ \",y.Height(),\" x \",y.Width(),\"\\n\");\n    )\n    const Grid& g = A.Grid();\n\n    DistMatrix<T,MC,STAR> x_MC_STAR(g);\n    DistMatrix<T,MR,STAR> z_MR_STAR(g);\n    DistMatrix<T,VR,STAR> z_VR_STAR(g);\n\n    Scale( beta, y );\n    x_MC_STAR.AlignWith( A );\n    z_MR_STAR.AlignWith( A );\n    z_VR_STAR.AlignWith( A );\n    //--------------------------------------------------------------------//\n    x_MC_STAR = x;\n    Zeros( z_MR_STAR, A.Width(), 1 );\n    LocalGemv( orientation, alpha, A, x_MC_STAR, T(0), z_MR_STAR );\n    z_VR_STAR.PartialColSumScatterFrom( z_MR_STAR );\n    Axpy( T(1), z_VR_STAR, y );\n    //--------------------------------------------------------------------//\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_GEMV_T_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Gemv.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GEMV_HPP\n#define ELEM_GEMV_HPP\n\n#include ELEM_SCALE_INC\n#include ELEM_ZEROS_INC\n\n#include \"./Gemv/N.hpp\"\n#include \"./Gemv/T.hpp\"\n\nnamespace elem {\n\ntemplate<typename T,Dist AColDist,Dist ARowDist,\n                    Dist xColDist,Dist xRowDist,\n                    Dist yColDist,Dist yRowDist>\ninline void LocalGemv\n( Orientation orientation,\n  T alpha, const DistMatrix<T,AColDist,ARowDist>& A,\n           const DistMatrix<T,xColDist,xRowDist>& x,\n  T beta,        DistMatrix<T,yColDist,yRowDist>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalGemv\"))\n    // TODO: Add error checking here\n    Gemv\n    ( orientation ,\n      alpha, A.LockedMatrix(), x.LockedMatrix(),\n      beta,                    y.Matrix() );\n}\n\ntemplate<typename T>\ninline void\nGemv\n( Orientation orientation,\n  T alpha, const Matrix<T>& A, const Matrix<T>& x, T beta, Matrix<T>& y )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Gemv\");\n        if( ( x.Height() != 1 && x.Width() != 1 ) ||\n            ( y.Height() != 1 && y.Width() != 1 ) )\n            LogicError\n            (\"x and y must be vectors:\\n\",\n             \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\",\n             \"  y ~ \",y.Height(),\" x \",y.Width());\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( orientation == NORMAL )\n        {\n            if( A.Height() != yLength || A.Width() != xLength )\n                LogicError\n                (\"A must conform with x and y:\\n\",\n                 \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n                 \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\",\n                 \"  y ~ \",y.Height(),\" x \",y.Width());\n        }\n        else\n        {\n            if( A.Width() != yLength || A.Height() != xLength )\n                LogicError\n                (\"A must conform with x and y:\\n\",\n                 \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n                 \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\",\n                 \"  y ~ \",y.Height(),\" x \",y.Width());\n        }\n    )\n    const char transChar = OrientationToChar( orientation );\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int k = ( transChar == 'N' ? n : m );\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    const Int incy = ( y.Width()==1 ? 1 : y.LDim() );\n    if( k != 0 )\n    {\n        blas::Gemv\n        ( transChar, m, n,\n          alpha, A.LockedBuffer(), A.LDim(), x.LockedBuffer(), incx,\n          beta,  y.Buffer(), incy );\n    }\n    else\n    {\n        Scale( beta, y );\n    }\n}\n\ntemplate<typename T>\ninline void\nGemv\n( Orientation orientation,\n  T alpha, const Matrix<T>& A, const Matrix<T>& x, Matrix<T>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gemv\"))\n    if( orientation == NORMAL )\n        Zeros( y, A.Height(), 1 );\n    else\n        Zeros( y, A.Width(), 1 );\n    Gemv( orientation, alpha, A, x, T(0), y );\n}\n\ntemplate<typename T>\ninline void\nGemv\n( Orientation orientation,\n  T alpha, const DistMatrix<T>& A, \n           const DistMatrix<T>& x,\n  T beta,        DistMatrix<T>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gemv\"))\n    if( orientation == NORMAL )\n        internal::GemvN( alpha, A, x, beta, y );\n    else\n        internal::GemvT( orientation, alpha, A, x, beta, y );\n}\n\ntemplate<typename T>\ninline void\nGemv\n( Orientation orientation,\n  T alpha, const DistMatrix<T>& A, \n           const DistMatrix<T>& x,\n                 DistMatrix<T>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gemv\"))\n    y.AlignWith( A );\n    if( orientation == NORMAL )\n        Zeros( y, A.Height(), 1 );\n    else\n        Zeros( y, A.Width(), 1 );\n    Gemv( orientation, alpha, A, x, T(0), y );\n}\n\ntemplate<typename T>\ninline void\nGemv\n( Orientation orientation,\n  T alpha, const DistMatrix<T>& A, \n           const DistMatrix<T,VC,STAR>& x,\n  T beta,        DistMatrix<T,VC,STAR>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gemv\"))\n    if( orientation == NORMAL )\n        internal::GemvN( alpha, A, x, beta, y );\n    else\n        internal::GemvT( orientation, alpha, A, x, beta, y );\n}\n\ntemplate<typename T>\ninline void\nGemv\n( Orientation orientation,\n  T alpha, const DistMatrix<T>& A, \n           const DistMatrix<T,VC,STAR>& x,\n                 DistMatrix<T,VC,STAR>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gemv\"))\n    y.AlignWith( A );\n    if( orientation == NORMAL )\n        Zeros( y, A.Height(), 1 );\n    else\n        Zeros( y, A.Width(), 1 );\n    Gemv( orientation, alpha, A, x, T(0), y );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GEMV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Ger.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GER_HPP\n#define ELEM_GER_HPP\n\nnamespace elem {\n\ntemplate<typename T,Dist xColDist,Dist xRowDist,\n                    Dist yColDist,Dist yRowDist,\n                    Dist AColDist,Dist ARowDist>\ninline void LocalGer\n( T alpha, const DistMatrix<T,xColDist,xRowDist>& x,\n           const DistMatrix<T,yColDist,yRowDist>& y,\n                 DistMatrix<T,AColDist,ARowDist>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalGer\"))\n    // TODO: Add error checking here\n    Ger( alpha, x.LockedMatrix(), y.LockedMatrix(), A.Matrix() );\n}\n\ntemplate<typename T>\ninline void\nGer( T alpha, const Matrix<T>& x, const Matrix<T>& y, Matrix<T>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Ger\");\n        if( ( x.Height() != 1 && x.Width() != 1 ) ||\n            ( y.Height() != 1 && y.Width() != 1 ) )\n            LogicError(\"x and y must be vectors\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( xLength != A.Height() || yLength != A.Width() )\n            LogicError\n            (\"Nonconformal Ger:\\n\",\n             DimsString(x,\"x\"),\"\\n\",DimsString(y,\"y\"),\"\\n\",DimsString(A,\"A\"));\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    const Int incy = ( y.Width()==1 ? 1 : y.LDim() );\n    blas::Ger\n    ( m, n, alpha, x.LockedBuffer(), incx, y.LockedBuffer(), incy,\n                   A.Buffer(), A.LDim() );\n}\n\ntemplate<typename T>\ninline void\nGerc( T alpha, const Matrix<T>& x, const Matrix<T>& y, Matrix<T>& A )\n{ Ger( alpha, x, y, A ); }\n\ntemplate<typename T>\ninline void\nGer\n( T alpha, const DistMatrix<T>& x,\n           const DistMatrix<T>& y,\n                 DistMatrix<T>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Ger\");\n        if( A.Grid() != x.Grid() || x.Grid() != y.Grid() )\n            LogicError(\"{A,x,y} must be distributed over the same grid\");\n        if( ( x.Width() != 1 && x.Height() != 1 ) ||\n            ( y.Width() != 1 && y.Height() != 1 )   )\n            LogicError(\"x and y are assumed to be vectors\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( A.Height() != xLength || A.Width() != yLength )\n            LogicError\n            (\"Nonconformal Ger:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(x,\"x\"),\"\\n\",DimsString(y,\"y\"));\n    )\n    const Grid& g = A.Grid();\n    if( x.Width() == 1 && y.Width() == 1 )\n    {\n        // Temporary distributions\n        DistMatrix<T,MC,STAR> x_MC_STAR(g);\n        DistMatrix<T,MR,STAR> y_MR_STAR(g);\n\n        // Begin the algoritm\n        x_MC_STAR.AlignWith( A );\n        y_MR_STAR.AlignWith( A );\n        //--------------------------------------------------------------------//\n        x_MC_STAR = x;\n        y_MR_STAR = y;\n        Ger\n        ( alpha, x_MC_STAR.LockedMatrix(),\n                 y_MR_STAR.LockedMatrix(),\n                 A.Matrix() );\n        //--------------------------------------------------------------------//\n    }\n    else if( x.Width() == 1 )\n    {\n        // Temporary distributions\n        DistMatrix<T,MC,  STAR> x_MC_STAR(g);\n        DistMatrix<T,STAR,MR  > y_STAR_MR(g);\n\n        // Begin the algorithm\n        x_MC_STAR.AlignWith( A );\n        y_STAR_MR.AlignWith( A );\n        //--------------------------------------------------------------------//\n        x_MC_STAR = x;\n        y_STAR_MR = y;\n        Ger\n        ( alpha, x_MC_STAR.LockedMatrix(),\n                 y_STAR_MR.LockedMatrix(),\n                 A.Matrix() );\n        //--------------------------------------------------------------------//\n    }\n    else if( y.Width() == 1 )\n    {\n        // Temporary distributions\n        DistMatrix<T,STAR,MC  > x_STAR_MC(g);\n        DistMatrix<T,MR,  STAR> y_MR_STAR(g);\n\n        // Begin the algorithm\n        x_STAR_MC.AlignWith( A );\n        y_MR_STAR.AlignWith( A );\n        //--------------------------------------------------------------------//\n        x_STAR_MC = x;\n        y_MR_STAR = y;\n        Ger\n        ( alpha, x_STAR_MC.LockedMatrix(),\n                 y_MR_STAR.LockedMatrix(),\n                 A.Matrix() );\n        //--------------------------------------------------------------------//\n    }\n    else\n    {\n        // Temporary distributions\n        DistMatrix<T,STAR,MC> x_STAR_MC(g);\n        DistMatrix<T,STAR,MR> y_STAR_MR(g);\n\n        // Begin the algorithm\n        x_STAR_MC.AlignWith( A );\n        y_STAR_MR.AlignWith( A );\n        //--------------------------------------------------------------------//\n        x_STAR_MC = x;\n        y_STAR_MR = y;\n        Ger\n        ( alpha, x_STAR_MC.LockedMatrix(),\n                 y_STAR_MR.LockedMatrix(),\n                 A.Matrix() );\n        //--------------------------------------------------------------------//\n    }\n}\n\ntemplate<typename T>\ninline void\nGerc\n( T alpha, const DistMatrix<T>& x,\n           const DistMatrix<T>& y,\n                 DistMatrix<T>& A )\n{ Ger( alpha, x, y, A ); }\n\n} // namespace elem\n\n#endif // ifndef ELEM_GER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Geru.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GERU_HPP\n#define ELEM_GERU_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nGeru( T alpha, const Matrix<T>& x, const Matrix<T>& y, Matrix<T>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Geru\");\n        if( ( x.Height() != 1 && x.Width() != 1 ) ||\n            ( y.Height() != 1 && y.Width() != 1 ) )\n            LogicError(\"x and y must be vectors\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( xLength != A.Height() || yLength != A.Width() )\n            LogicError(\"Nonconformal Geru\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    const Int incy = ( y.Width()==1 ? 1 : y.LDim() );\n    blas::Geru\n    ( m, n, alpha, x.LockedBuffer(), incx, y.LockedBuffer(), incy,\n                   A.Buffer(), A.LDim() );\n}\n\ntemplate<typename T>\ninline void\nGeru\n( T alpha, const DistMatrix<T>& x,\n           const DistMatrix<T>& y,\n                 DistMatrix<T>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Geru\");\n        if( A.Grid() != x.Grid() || x.Grid() != y.Grid() )\n           LogicError(\"{A,x,y} must be distributed over the same grid\");\n        if( ( x.Width() != 1 && x.Height() != 1 ) ||\n            ( y.Width() != 1 && y.Height() != 1 )   )\n            LogicError(\"x and y are assumed to be vectors\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( A.Height() != xLength || A.Width() != yLength )\n            LogicError\n            (\"Nonconformal Geru: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\",\n             \"  y ~ \",y.Height(),\" x \",y.Width(),\"\\n\")\n    )\n    const Grid& g = A.Grid();\n    if( x.Width() == 1 && y.Width() == 1 )\n    {\n        // Temporary distributions\n        DistMatrix<T,MC,STAR> x_MC_STAR(g);\n        DistMatrix<T,MR,STAR> y_MR_STAR(g);\n\n        // Begin the algoritm\n        x_MC_STAR.AlignWith( A );\n        y_MR_STAR.AlignWith( A );\n        //--------------------------------------------------------------------//\n        x_MC_STAR = x;\n        y_MR_STAR = y;\n        Geru\n        ( alpha, x_MC_STAR.LockedMatrix(),\n                 y_MR_STAR.LockedMatrix(),\n                 A.Matrix() );\n        //--------------------------------------------------------------------//\n    }\n    else if( x.Width() == 1 )\n    {\n        // Temporary distributions\n        DistMatrix<T,MC,  STAR> x_MC_STAR(g);\n        DistMatrix<T,STAR,MR  > y_STAR_MR(g);\n\n        // Begin the algorithm\n        x_MC_STAR.AlignWith( A );\n        y_STAR_MR.AlignWith( A );\n        //--------------------------------------------------------------------//\n        x_MC_STAR = x;\n        y_STAR_MR = y;\n        Geru\n        ( alpha, x_MC_STAR.LockedMatrix(),\n                 y_STAR_MR.LockedMatrix(),\n                 A.Matrix() );\n        //--------------------------------------------------------------------//\n    }\n    else if( y.Width() == 1 )\n    {\n        // Temporary distributions\n        DistMatrix<T,STAR,MC  > x_STAR_MC(g);\n        DistMatrix<T,MR,  STAR> y_MR_STAR(g);\n\n        // Begin the algorithm\n        x_STAR_MC.AlignWith( A );\n        y_MR_STAR.AlignWith( A );\n        //--------------------------------------------------------------------//\n        x_STAR_MC = x;\n        y_MR_STAR = y;\n        Geru\n        ( alpha, x_STAR_MC.LockedMatrix(),\n                 y_MR_STAR.LockedMatrix(),\n                 A.Matrix() );\n        //--------------------------------------------------------------------//\n    }\n    else\n    {\n        // Temporary distributions\n        DistMatrix<T,STAR,MC> x_STAR_MC(g);\n        DistMatrix<T,STAR,MR> y_STAR_MR(g);\n\n        // Begin the algorithm\n        x_STAR_MC.AlignWith( A );\n        y_STAR_MR.AlignWith( A );\n        //--------------------------------------------------------------------//\n        x_STAR_MC = x;\n        y_STAR_MR = y;\n        Geru\n        ( alpha, x_STAR_MC.LockedMatrix(),\n                 y_STAR_MR.LockedMatrix(),\n                 A.Matrix() );\n        //--------------------------------------------------------------------//\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GERU_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Hemv.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HEMV_HPP\n#define ELEM_HEMV_HPP\n\n#include \"./Symv.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nHemv\n( UpperOrLower uplo,\n  T alpha, const Matrix<T>& A, const Matrix<T>& x, T beta, Matrix<T>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hemv\"))\n    Symv( uplo, alpha, A, x, beta, y, true );\n}\n\ntemplate<typename T>\ninline void\nHemv\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& x,\n  T beta,        DistMatrix<T>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hemv\"))\n    Symv( uplo, alpha, A, x, beta, y, true );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HEMV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Her.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HER_HPP\n#define ELEM_HER_HPP\n\n#include \"./Syr.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nHer( UpperOrLower uplo, T alpha, const Matrix<T>& x, Matrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Her\"))\n    Syr( uplo, alpha, x, A, true );\n}\n\ntemplate<typename T>\ninline void\nHer\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& x,\n                 DistMatrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Her\"))\n    Syr( uplo, alpha, x, A, true );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Her2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HER2_HPP\n#define ELEM_HER2_HPP\n\n#include \"./Syr2.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nHer2\n( UpperOrLower uplo,\n  T alpha, const Matrix<T>& x, const Matrix<T>& y, Matrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Her2\"))\n    Syr2( uplo, alpha, x, y, A, true );\n}\n\ntemplate<typename T>\ninline void\nHer2\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& x,\n           const DistMatrix<T>& y,\n                 DistMatrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Her2\"))\n    Syr2( uplo, alpha, x, y, A, true );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HER2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/QuasiTrsv/LN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASITRSV_LN_HPP\n#define ELEM_QUASITRSV_LN_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_ZEROS_INC\n#include ELEM_GEMV_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nQuasiTrsvLNUnb( const Matrix<F>& L, Matrix<F>& x, bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvLNUnb\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( L.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvLN\");\n    )\n    typedef Base<F> Real;\n\n    F* xBuf = x.Buffer();\n    const F* LBuf = L.LockedBuffer();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    const Int ldl = L.LDim();\n    const Int m = L.Height();\n    for( Int k=0; k<m; ++k )\n    {\n        const bool in2x2 = ( k+1<m && LBuf[k+(k+1)*ldl] != F(0) );\n        if( in2x2 )\n        {\n            // Solve the 2x2 linear system via a 2x2 LQ decomposition produced\n            // by the Givens rotation\n            //    | L(k,k) L(k,k+1) | | c -conj(s) | = | gamma11 0 |\n            //                        | s    c     |\n            // and by also forming the bottom two entries of the 2x2 resulting\n            // lower-triangular matrix, say gamma21 and gamma22\n            //\n            // Extract the 2x2 diagonal block, D\n            const F delta11 = LBuf[ k   + k   *ldl];\n            const F delta12 = LBuf[ k   +(k+1)*ldl];\n            const F delta21 = LBuf[(k+1)+ k   *ldl];\n            const F delta22 = LBuf[(k+1)+(k+1)*ldl];\n            // Decompose D = L Q\n            Real c; F s;\n            const F gamma11 = lapack::Givens( delta11, delta12, &c, &s );\n            const F gamma21 =        c*delta21 + s*delta22;\n            const F gamma22 = -Conj(s)*delta21 + c*delta22; \n            if( checkIfSingular )\n            {\n                // TODO: Instead check if values are too small in magnitude\n                if( gamma11 == F(0) || gamma22 == F(0) ) \n                    LogicError(\"Singular diagonal block detected\");\n            }\n            // Solve against L\n            xBuf[ k   *incx] /= gamma11;\n            xBuf[(k+1)*incx] -= gamma21*xBuf[k*incx];\n            xBuf[(k+1)*incx] /= gamma22;\n            // Solve against Q\n            const F chi1 = xBuf[ k   *incx];\n            const F chi2 = xBuf[(k+1)*incx];\n            xBuf[ k   *incx] = c*chi1 - Conj(s)*chi2;\n            xBuf[(k+1)*incx] = s*chi1 +       c*chi2;\n\n            // Update x2 := x2 - L21 x1\n            blas::Axpy\n            ( m-(k+2), -xBuf[ k   *incx], \n              &LBuf[(k+2)+ k   *ldl], 1, &xBuf[(k+2)*incx], incx );\n            blas::Axpy\n            ( m-(k+2), -xBuf[(k+1)*incx], \n              &LBuf[(k+2)+(k+1)*ldl], 1, &xBuf[(k+2)*incx], incx );\n\n            k += 2;\n        }\n        else\n        {\n            if( checkIfSingular )\n                if( LBuf[k+k*ldl] == F(0) )\n                    LogicError(\"Singular diagonal entry detected\");\n            // Solve the 1x1 linear system\n            xBuf[k] /= LBuf[k+k*ldl];\n\n            // Update x2 := x2 - l21 chi_1\n            blas::Axpy\n            ( m-(k+1), -xBuf[k*incx], \n              &LBuf[(k+1)+k*ldl], 1, &xBuf[(k+1)*incx], incx );\n\n            k += 1;\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nQuasiTrsvLN( const Matrix<F>& L, Matrix<F>& x, bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvLN\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( L.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvLN\");\n    )\n    const bool vert = ( x.Width()==1 );\n\n    Matrix<F> x1, x2;\n    const Int m = L.Height();\n    const Int bsize = Blocksize();\n    Int k=0;\n    while( k < m )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        if( vert )\n        {\n            x1 = ViewRange( x, k,    0, k+nb, 1 );\n            x2 = ViewRange( x, k+nb, 0, m,    1 );\n        }\n        else\n        {\n            x1 = ViewRange( x, 0, k,    1, k+nb );\n            x2 = ViewRange( x, 0, k+nb, 1, m    );\n        }\n\n        QuasiTrsvLNUnb( L11, x1, checkIfSingular );\n        Gemv( NORMAL, F(-1), L21, x1, F(1), x2 );\n\n        k += nb;\n    }\n}\n\ntemplate<typename F>\ninline void\nQuasiTrsvLN\n( const DistMatrix<F>& L, DistMatrix<F>& x, bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvLN\");\n        if( L.Grid() != x.Grid() )\n            LogicError(\"{L,x} must be distributed over the same grid\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( L.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvLN\");\n    )\n    const Int m = L.Height();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    // Matrix views \n    DistMatrix<F> L11(g), L21(g), x1(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), x1_STAR_STAR(g);\n\n    if( x.Width() == 1 )\n    {\n        DistMatrix<F,MR,STAR> x1_MR_STAR(g);\n        DistMatrix<F,MC,STAR> z_MC_STAR(g);\n\n        // Views of z[MC,* ], which will store updates to x\n        DistMatrix<F,MC,STAR> z1_MC_STAR(g), z2_MC_STAR(g);\n\n        z_MC_STAR.AlignWith( L );\n        Zeros( z_MC_STAR, m, 1 );\n\n        Int k=0;\n        while( k < m )\n        {\n            const Int nbProp = Min(bsize,m-k);\n            const bool in2x2 = \n                ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n            const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n            LockedViewRange( L11, L, k,    k, k+nb, k+nb );\n            LockedViewRange( L21, L, k+nb, k, m,    k+nb );\n\n            ViewRange( x1, x, k,    0, k+nb, 1 );\n\n            ViewRange( z1_MC_STAR, z_MC_STAR, k,    0, k+nb, 1 );\n            ViewRange( z2_MC_STAR, z_MC_STAR, k+nb, 0, m,    1 ); \n\n            if( k != 0 )\n                x1.RowSumScatterUpdate( F(1), z1_MC_STAR );\n\n            x1_STAR_STAR = x1;\n            L11_STAR_STAR = L11;\n            QuasiTrsvLN\n            ( L11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix(), \n              checkIfSingular );\n            x1 = x1_STAR_STAR;\n\n            x1_MR_STAR.AlignWith( L21 );\n            x1_MR_STAR = x1_STAR_STAR;\n            LocalGemv( NORMAL, F(-1), L21, x1_MR_STAR, F(1), z2_MC_STAR );\n\n            k += nb;\n        }\n    }\n    else\n    {\n        DistMatrix<F,STAR,MR  > x1_STAR_MR(g);\n        DistMatrix<F,MC,  MR  > z1(g);\n        DistMatrix<F,MR,  MC  > z1_MR_MC(g);\n        DistMatrix<F,STAR,MC  > z_STAR_MC(g);\n\n        // Views of z[* ,MC]\n        DistMatrix<F,STAR,MC> z1_STAR_MC(g), z2_STAR_MC(g);\n\n        z_STAR_MC.AlignWith( L );\n        Zeros( z_STAR_MC, 1, m );\n\n        Int k=0;\n        while( k < m )\n        {\n            const Int nbProp = Min(bsize,m-k);\n            const bool in2x2 = \n                ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n            const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n            LockedViewRange( L11, L, k,    k, k+nb, k+nb );\n            LockedViewRange( L21, L, k+nb, k, m,    k+nb );\n\n            ViewRange( x1, x, 0, k, 1, k+nb );\n\n            ViewRange( z1_STAR_MC, z_STAR_MC, 0, k,    1, k+nb );\n            ViewRange( z2_STAR_MC, z_STAR_MC, 0, k+nb, 1, m    );\n\n            if( k != 0 )\n            {\n                z1_MR_MC.ColSumScatterFrom( z1_STAR_MC );\n                z1.AlignWith( x1 );\n                z1 = z1_MR_MC;\n                Axpy( F(1), z1, x1 );\n            }\n\n            x1_STAR_STAR = x1;\n            L11_STAR_STAR = L11;\n            QuasiTrsvLN\n            ( L11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix(), \n              checkIfSingular );\n            x1 = x1_STAR_STAR;\n\n            x1_STAR_MR.AlignWith( L21 );\n            x1_STAR_MR = x1_STAR_STAR;\n            LocalGemv( NORMAL, F(-1), L21, x1_STAR_MR, F(1), z2_STAR_MC );\n\n            k += nb;\n        }\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_QUASITRSV_LN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/QuasiTrsv/LT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASITRSV_LT_HPP\n#define ELEM_QUASITRSV_LT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_ZEROS_INC\n#include ELEM_GEMV_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nQuasiTrsvLTUnb\n( Orientation orientation, const Matrix<F>& L, Matrix<F>& x, \n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvLTUnb\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( L.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvLT\");\n        if( orientation == NORMAL )\n            LogicError(\"Invalid orientation\");\n    )\n    typedef Base<F> Real;\n    const bool conjugate = ( orientation == ADJOINT );\n    if( conjugate )\n        Conjugate( x );\n\n    F* xBuf = x.Buffer();\n    const F* LBuf = L.LockedBuffer();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    const Int ldl = L.LDim();\n    const Int m = L.Height();\n    Int k=m-1;\n    while( k >= 0 )\n    {\n        const bool in2x2 = ( k>0 && LBuf[(k-1)+k*ldl] != F(0) );\n        if( in2x2 )\n        {\n            --k;\n            // Solve the 2x2 linear system via a 2x2 LQ decomposition produced\n            // by the Givens rotation\n            //    | L(k,k) L(k,k+1) | | c -conj(s) | = | gamma11 0 |\n            //                        | s    c     |\n            // and by also forming the bottom two entries of the 2x2 resulting\n            // lower-triangular matrix, say gamma21 and gamma22\n            //\n            // Extract the 2x2 diagonal block, D\n            const F delta11 = LBuf[   k +   k *ldl];\n            const F delta12 = LBuf[   k +(k+1)*ldl];\n            const F delta21 = LBuf[(k+1)+   k *ldl];\n            const F delta22 = LBuf[(k+1)+(k+1)*ldl];\n            // Decompose D = L Q\n            Real c; F s;\n            const F gamma11 = lapack::Givens( delta11, delta12, &c, &s );\n            const F gamma21 =        c*delta21 + s*delta22;\n            const F gamma22 = -Conj(s)*delta21 + c*delta22;\n            if( checkIfSingular )\n            {\n                // TODO: Instead check if values are too small in magnitude\n                if( gamma11 == F(0) || gamma22 == F(0) )\n                    LogicError(\"Singular diagonal block detected\");\n            }\n            // Solve against Q^T\n            const F chi1 = xBuf[ k   *incx];\n            const F chi2 = xBuf[(k+1)*incx];\n            xBuf[ k   *incx] =        c*chi1 + s*chi2;\n            xBuf[(k+1)*incx] = -Conj(s)*chi1 + c*chi2;\n            // Solve against R^T\n            xBuf[(k+1)*incx] /= gamma22;\n            xBuf[ k   *incx] -= gamma21*xBuf[(k+1)*incx];\n            xBuf[ k   *incx] /= gamma11;\n\n            // Update x0 := x0 - L10^T x1\n            blas::Axpy( k, -xBuf[ k   *incx], &LBuf[k  ], ldl, xBuf, incx );\n            blas::Axpy( k, -xBuf[(k+1)*incx], &LBuf[k+1], ldl, xBuf, incx );\n        }\n        else\n        {\n            if( checkIfSingular )\n                if( LBuf[k+k*ldl] == F(0) )\n                    LogicError(\"Singular diagonal entry detected\");\n            // Solve the 1x1 linear system\n            xBuf[k*incx] /= LBuf[k+k*ldl];\n\n            // Update x0 := x0 - l10^T chi_1\n            blas::Axpy( k, -xBuf[k*incx], &LBuf[k], ldl, xBuf, incx );\n        }\n        --k;\n    }\n    if( conjugate )\n        Conjugate( x );\n}\n\ntemplate<typename F>\ninline void\nQuasiTrsvLT\n( Orientation orientation, const Matrix<F>& L, Matrix<F>& x, \n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvLT\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( L.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvLT\");\n        if( orientation == NORMAL )\n            LogicError(\"Invalid orientation\");\n    )\n    const bool vert = ( x.Width()==1 );\n    const bool conjugate = ( orientation==ADJOINT );\n    if( conjugate )\n        Conjugate( x );\n\n    Matrix<F> x0, x1;\n    const Int m = L.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n\n        auto L10 = LockedViewRange( L, k, 0, kOld, k    );\n        auto L11 = LockedViewRange( L, k, k, kOld, kOld );\n\n        if( vert )\n        {\n            x0 = ViewRange( x, 0, 0, k,    1 );\n            x1 = ViewRange( x, k, 0, kOld, 1 );\n        }\n        else\n        {\n            x0 = ViewRange( x, 0, 0, 1, k    );\n            x1 = ViewRange( x, 0, k, 1, kOld );\n        }\n\n        QuasiTrsvLTUnb( TRANSPOSE, L11, x1, checkIfSingular );\n        Gemv( TRANSPOSE, F(-1), L10, x1, F(1), x0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n    if( conjugate )\n        Conjugate( x );\n}\n\ntemplate<typename F>\ninline void\nQuasiTrsvLT\n( Orientation orientation, const DistMatrix<F>& L, DistMatrix<F>& x,\n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvLT\");\n        if( L.Grid() != x.Grid() )\n            LogicError(\"{L,x} must be distributed over the same grid\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( L.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvLT\");\n        if( orientation == NORMAL )\n            LogicError(\"Invalid orientation\");\n    )\n    const Int m = L.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( m, bsize );\n    const Grid& g = L.Grid();\n    const bool conjugate = ( orientation==ADJOINT );\n    if( conjugate )\n        Conjugate( x );\n\n    // Matrix views \n    DistMatrix<F> L10(g), L11(g), x1(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), x1_STAR_STAR(g);\n\n    if( x.Width() == 1 )\n    {\n        DistMatrix<F,MR,STAR> x1_MR_STAR(g);\n        DistMatrix<F,MC,STAR> z_MC_STAR(g);\n\n        // Views of z[MC,* ], which will store updates to x\n        DistMatrix<F,MC,STAR> z0_MC_STAR(g), z1_MC_STAR(g);\n\n        z_MC_STAR.AlignWith( L );\n        Zeros( z_MC_STAR, m, 1 );\n\n        Int k=kLast, kOld=m;\n        while( true )\n        {\n            const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n            if( in2x2 )\n                --k;\n\n            LockedViewRange( L10, L, k, 0, kOld, k    );\n            LockedViewRange( L11, L, k, k, kOld, kOld );\n\n            ViewRange( x1, x, k, 0, kOld, 1 );\n\n            ViewRange( z0_MC_STAR, z_MC_STAR, 0, 0, k,    1 );\n            ViewRange( z1_MC_STAR, z_MC_STAR, k, 0, kOld, 1 );\n\n            if( kOld != m )\n                x1.RowSumScatterUpdate( F(1), z1_MC_STAR );\n\n            x1_STAR_STAR = x1;\n            L11_STAR_STAR = L11;\n            QuasiTrsvLT\n            ( TRANSPOSE, L11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix(),\n              checkIfSingular );\n            x1 = x1_STAR_STAR;\n\n            x1_MR_STAR.AlignWith( L10 );\n            x1_MR_STAR = x1_STAR_STAR;\n            LocalGemv( TRANSPOSE, F(-1), L10, x1_MR_STAR, F(1), z0_MC_STAR );\n\n            if( k == 0 )\n                break;\n            kOld = k;\n            k -= Min(bsize,k);\n        }\n    }\n    else\n    {\n        DistMatrix<F,STAR,MR  > x1_STAR_MR(g);\n        DistMatrix<F,MC,  MR  > z1(g);\n        DistMatrix<F,MR,  MC  > z1_MR_MC(g);\n        DistMatrix<F,STAR,MC  > z_STAR_MC(g);\n\n        // Views of z[* ,MC]\n        DistMatrix<F,STAR,MC> z0_STAR_MC(g), z1_STAR_MC(g);\n\n        z_STAR_MC.AlignWith( L );\n        Zeros( z_STAR_MC, 1, m );\n\n        Int k=kLast, kOld=m;\n        while( true )\n        {\n            const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n            if( in2x2 )\n                --k;\n\n            LockedViewRange( L10, L, k, 0, kOld, k    );\n            LockedViewRange( L11, L, k, k, kOld, kOld );\n\n            ViewRange( x1, x, 0, k, 1, kOld );\n\n            ViewRange( z0_STAR_MC, z_STAR_MC, 0, 0, 1, k    );\n            ViewRange( z1_STAR_MC, z_STAR_MC, 0, k, 1, kOld );\n\n            if( kOld != m )\n                x1.RowSumScatterUpdate( F(1), z1_STAR_MC );\n\n            x1_STAR_STAR = x1;\n            L11_STAR_STAR = L11;\n            QuasiTrsvLT\n            ( TRANSPOSE, L11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix(),\n              checkIfSingular );\n            x1 = x1_STAR_STAR;\n\n            x1_STAR_MR.AlignWith( L10 );\n            x1_STAR_MR = x1_STAR_STAR;\n            LocalGemv( TRANSPOSE, F(-1), L10, x1_STAR_MR, F(1), z0_STAR_MC );\n\n            if( k == 0 )\n                break;\n            kOld = k;\n            k -= Min(bsize,k);\n        }\n    }\n    if( conjugate )\n        Conjugate( x );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_QUASITRSV_LT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/QuasiTrsv/UN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASITRSV_UN_HPP\n#define ELEM_QUASITRSV_UN_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_ZEROS_INC\n#include ELEM_GEMV_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nQuasiTrsvUNUnb( const Matrix<F>& U, Matrix<F>& x, bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvUNUnb\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( U.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvUN\");\n    )\n    typedef Base<F> Real;\n\n    F* xBuf = x.Buffer();\n    const F* UBuf = U.LockedBuffer();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    const Int ldu = U.LDim();\n    const Int m = U.Height();\n    Int k=m-1;\n    while( k >= 0 )\n    {\n        const bool in2x2 = ( k>0 && UBuf[k+(k-1)*ldu] != F(0) );\n        if( in2x2 )\n        {\n            --k;\n            // Solve the 2x2 linear system via a 2x2 QR decomposition produced\n            // by the Givens rotation\n            //    | c        s | | U(k,  k) | = | gamma11 | \n            //    | -conj(s) c | | U(k+1,k) |   | 0       |\n            //\n            // and by also forming the right two entries of the 2x2 resulting\n            // upper-triangular matrix, say gamma12 and gamma22\n            //\n            // Extract the 2x2 diagonal block, D\n            const F delta11 = UBuf[ k   + k   *ldu];\n            const F delta12 = UBuf[ k   +(k+1)*ldu];\n            const F delta21 = UBuf[(k+1)+ k   *ldu];\n            const F delta22 = UBuf[(k+1)+(k+1)*ldu];\n            // Decompose D = Q R\n            Real c; F s;\n            const F gamma11 = lapack::Givens( delta11, delta21, &c, &s );\n            const F gamma12 =        c*delta12 + s*delta22;\n            const F gamma22 = -Conj(s)*delta12 + c*delta22;\n            if( checkIfSingular )\n            {\n                // TODO: Instead check if values are too small in magnitude\n                if( gamma11 == F(0) || gamma22 == F(0) )\n                    LogicError(\"Singular diagonal block detected\");\n            }\n            // Solve against Q\n            const F chi1 = xBuf[ k   *incx];\n            const F chi2 = xBuf[(k+1)*incx];\n            xBuf[ k   *incx] =        c*chi1 + s*chi2;\n            xBuf[(k+1)*incx] = -Conj(s)*chi1 + c*chi2;\n            // Solve against R\n            xBuf[(k+1)*incx] /= gamma22;\n            xBuf[ k   *incx] -= gamma12*xBuf[(k+1)*incx];\n            xBuf[ k   *incx] /= gamma11;\n\n            // Update x0 := x0 - U01 x1\n            blas::Axpy( k, -xBuf[ k   *incx], &UBuf[ k   *ldu], 1, xBuf, incx );\n            blas::Axpy( k, -xBuf[(k+1)*incx], &UBuf[(k+1)*ldu], 1, xBuf, incx );\n        }\n        else\n        {\n            if( checkIfSingular )\n                if( UBuf[k+k*ldu] == F(0) )\n                    LogicError(\"Singular diagonal entry detected\");\n            // Solve the 1x1 linear system\n            xBuf[k*incx] /= UBuf[k+k*ldu];\n\n            // Update x0 := x0 - u01 chi_1\n            blas::Axpy( k, -xBuf[k*incx], &UBuf[k*ldu], 1, xBuf, incx );\n        }\n        --k;\n    }\n}\n\ntemplate<typename F>\ninline void\nQuasiTrsvUN( const Matrix<F>& U, Matrix<F>& x, bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvUN\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( U.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvUN\");\n    )\n    const bool vert = ( x.Width()==1 );\n\n    Matrix<F> x0, x1;\n    const Int m = U.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n        if( in2x2 )\n            --k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    kOld );\n        auto U11 = LockedViewRange( U, k, k, kOld, kOld );\n\n        if( vert )\n        {\n            x0 = ViewRange( x, 0, 0, k,    1 );\n            x1 = ViewRange( x, k, 0, kOld, 1 );\n        }\n        else\n        {\n            x0 = ViewRange( x, 0, 0, 1, k    );\n            x1 = ViewRange( x, 0, k, 1, kOld );\n        }\n\n        QuasiTrsvUNUnb( U11, x1, checkIfSingular );\n        Gemv( NORMAL, F(-1), U01, x1, F(1), x0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename F>\ninline void\nQuasiTrsvUN\n( const DistMatrix<F>& U, DistMatrix<F>& x, bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvUN\");\n        if( U.Grid() != x.Grid() )\n            LogicError(\"{U,x} must be distributed over the same grid\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( U.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvUN\");\n    )\n    const Int m = U.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( m, bsize );\n    const Grid& g = U.Grid();\n\n    // Matrix views \n    DistMatrix<F> U01(g), U11(g), x1(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g), x1_STAR_STAR(g);\n\n    if( x.Width() == 1 )\n    {\n        DistMatrix<F,MR,STAR> x1_MR_STAR(g);\n        DistMatrix<F,MC,STAR> z_MC_STAR(g);\n\n        // Views of z[MC,* ], which will store updates to x\n        DistMatrix<F,MC,STAR> z0_MC_STAR(g), z1_MC_STAR(g);\n\n        z_MC_STAR.AlignWith( U );\n        Zeros( z_MC_STAR, m, 1 );\n\n        Int k=kLast, kOld=m;\n        while( true )\n        {\n            const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n            if( in2x2 )\n                --k;\n\n            LockedViewRange( U01, U, 0, k, k,    kOld );\n            LockedViewRange( U11, U, k, k, kOld, kOld );\n\n            ViewRange( x1, x, k, 0, kOld, 1 );\n\n            ViewRange( z0_MC_STAR, z_MC_STAR, 0, 0, k,    1 );\n            ViewRange( z1_MC_STAR, z_MC_STAR, k, 0, kOld, 1 );\n\n            if( kOld != m )\n                x1.RowSumScatterUpdate( F(1), z1_MC_STAR );\n\n            x1_STAR_STAR = x1;\n            U11_STAR_STAR = U11;\n            QuasiTrsvUN\n            ( U11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix(), \n              checkIfSingular );\n            x1 = x1_STAR_STAR;\n\n            x1_MR_STAR.AlignWith( U01 );\n            x1_MR_STAR = x1_STAR_STAR;\n            LocalGemv( NORMAL, F(-1), U01, x1_MR_STAR, F(1), z0_MC_STAR );\n\n            if( k == 0 )\n                break;\n            kOld = k;\n            k -= Min(bsize,k);\n        }\n    }\n    else\n    {\n        DistMatrix<F,STAR,MR  > x1_STAR_MR(g);\n        DistMatrix<F,MC,  MR  > z1(g);\n        DistMatrix<F,MR,  MC  > z1_MR_MC(g);\n        DistMatrix<F,STAR,MC  > z_STAR_MC(g);\n\n        // Views of z[* ,MC]\n        DistMatrix<F,STAR,MC> z0_STAR_MC(g), z1_STAR_MC(g);\n\n        z_STAR_MC.AlignWith( U );\n        Zeros( z_STAR_MC, 1, m );\n\n        Int k=kLast, kOld=m;\n        while( true )\n        {\n            const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n            if( in2x2 )\n                --k;\n\n            LockedViewRange( U01, U, 0, k, k,    kOld );\n            LockedViewRange( U11, U, k, k, kOld, kOld );\n\n            ViewRange( x1, x, 0, k, 1, kOld );\n\n            ViewRange( z0_STAR_MC, z_STAR_MC, 0, 0, 1, k    );\n            ViewRange( z1_STAR_MC, z_STAR_MC, 0, k, 1, kOld );\n\n            if( kOld != m )\n                x1.RowSumScatterUpdate( F(1), z1_STAR_MC );\n\n            x1_STAR_STAR = x1;\n            U11_STAR_STAR = U11;\n            QuasiTrsvUN\n            ( U11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix(),\n              checkIfSingular );\n            x1 = x1_STAR_STAR;\n\n            x1_STAR_MR.AlignWith( U01 );\n            x1_STAR_MR = x1_STAR_STAR;\n            LocalGemv( NORMAL, F(-1), U01, x1_STAR_MR, F(1), z0_STAR_MC );\n\n            if( k == 0 )\n                break;\n            kOld = k;\n            k -= Min(bsize,k);\n        }\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_QUASITRSV_UN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/QuasiTrsv/UT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASITRSV_UT_HPP\n#define ELEM_QUASITRSV_UT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_ZEROS_INC\n#include ELEM_GEMV_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nQuasiTrsvUTUnb\n( Orientation orientation, const Matrix<F>& U, Matrix<F>& x, \n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvUTUnb\");\n        if( U.Height() != U.Width() )\n            LogicError(\"L must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( U.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvUT\");\n        if( orientation == NORMAL )\n            LogicError(\"Invalid orientation\");\n    )\n    typedef Base<F> Real;\n    const bool conjugate = ( orientation==ADJOINT );\n    if( conjugate )\n        Conjugate( x );\n\n    F* xBuf = x.Buffer();\n    const F* UBuf = U.LockedBuffer();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    const Int ldu = U.LDim();\n    const Int m = U.Height();\n    for( Int k=0; k<m; ++k )\n    {\n        const bool in2x2 = ( k+1<m && UBuf[(k+1)+k*ldu] != F(0) );\n        if( in2x2 )\n        {\n            // Solve the 2x2 linear system via a 2x2 QR decomposition produced\n            // by the Givens rotation\n            //    | c        s | | U(k,  k) | = | gamma11 | \n            //    | -conj(s) c | | U(k+1,k) |   | 0       |\n            //\n            // and by also forming the right two entries of the 2x2 resulting\n            // upper-triangular matrix, say gamma12 and gamma22\n            //\n            // Extract the 2x2 diagonal block, D\n            const F delta11 = UBuf[ k   + k   *ldu];\n            const F delta12 = UBuf[ k   +(k+1)*ldu];\n            const F delta21 = UBuf[(k+1)+ k   *ldu];\n            const F delta22 = UBuf[(k+1)+(k+1)*ldu];\n            // Decompose D = Q R\n            Real c; F s;\n            const F gamma11 = lapack::Givens( delta11, delta21, &c, &s );\n            const F gamma12 =        c*delta12 + s*delta22;\n            const F gamma22 = -Conj(s)*delta12 + c*delta22;\n            if( checkIfSingular )\n            {\n                // TODO: Instead check if values are too small in magnitude\n                if( gamma11 == F(0) || gamma22 == F(0) )\n                    LogicError(\"Singular diagonal block detected\");\n            }\n            // Solve against R^T\n            xBuf[ k   *incx] /= gamma11;\n            xBuf[(k+1)*incx] -= gamma12*xBuf[k*incx];\n            xBuf[(k+1)*incx] /= gamma22;\n            // Solve against Q^T\n            const F chi1 = xBuf[ k   *incx];\n            const F chi2 = xBuf[(k+1)*incx];\n            xBuf[ k   *incx] = c*chi1 - Conj(s)*chi2;\n            xBuf[(k+1)*incx] = s*chi1 +       c*chi2;\n\n            // Update x2 := x2 - U12^T x1\n            blas::Axpy\n            ( m-(k+2), -xBuf[ k   *incx],\n              &UBuf[ k   +(k+2)*ldu], ldu, &xBuf[(k+2)*incx], incx );\n            blas::Axpy\n            ( m-(k+2), -xBuf[(k+1)*incx],\n              &UBuf[(k+1)+(k+2)*ldu], ldu, &xBuf[(k+2)*incx], incx );\n\n            k += 2;\n        }\n        else\n        {\n            if( checkIfSingular )\n                if( UBuf[k+k*ldu] == F(0) )\n                    LogicError(\"Singular diagonal entry detected\");\n            // Solve the 1x1 linear system\n            xBuf[k] /= UBuf[k+k*ldu];\n\n            // Update x2 := x2 - u12^T chi_1\n            blas::Axpy\n            ( m-(k+1), -xBuf[k*incx],\n              &UBuf[k+(k+1)*ldu], ldu, &xBuf[(k+1)*incx], incx );\n\n            k += 1;\n        }\n        --k;\n    }\n    if( conjugate )\n        Conjugate( x );\n}\n\ntemplate<typename F>\ninline void\nQuasiTrsvUT\n( Orientation orientation, const Matrix<F>& U, Matrix<F>& x,\n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvUT\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( U.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvUT\");\n        if( orientation == NORMAL )\n            LogicError(\"Invalid orientation\");\n    )\n    const bool vert = ( x.Width()==1 );\n    const bool conjugate = ( orientation==ADJOINT );\n    if( conjugate )\n        Conjugate( x );\n\n    Matrix<F> x1, x2;\n    const Int m = U.Height();\n    const Int bsize = Blocksize();\n    Int k=0;\n    while( k < m )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        if( vert )\n        {\n            x1 = ViewRange( x, k,    0, k+nb, 1 );\n            x2 = ViewRange( x, k+nb, 0, m,    1 );\n        }\n        else\n        {\n            x1 = ViewRange( x, 0, k,    1, k+nb );\n            x2 = ViewRange( x, 0, k+nb, 1, m    );\n        }\n\n        QuasiTrsvUTUnb( TRANSPOSE, U11, x1, checkIfSingular );\n        Gemv( TRANSPOSE, F(-1), U12, x1, F(1), x2 );\n\n        k += nb;\n    }\n    if( conjugate )\n        Conjugate( x );\n}\n\ntemplate<typename F>\ninline void\nQuasiTrsvUT\n( Orientation orientation, const DistMatrix<F>& U, DistMatrix<F>& x,\n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::QuasiTrsvUT\");\n        if( U.Grid() != x.Grid() )\n            LogicError(\"{U,x} must be distributed over the same grid\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( U.Width() != xLength )\n            LogicError(\"Nonconformal QuasiTrsvUT\");\n        if( orientation == NORMAL )\n            LogicError(\"Invalid orientation\");\n    )\n    const Int m = U.Height();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n    const bool conjugate = ( orientation==ADJOINT );\n    if( conjugate )\n        Conjugate( x );\n\n    // Matrix views \n    DistMatrix<F> U11(g), U12(g), x1(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g), x1_STAR_STAR(g);\n\n    if( x.Width() == 1 )\n    {\n        DistMatrix<F,MR,STAR> x1_MR_STAR(g);\n        DistMatrix<F,MC,STAR> z_MC_STAR(g);\n\n        // Views of z[MC,* ], which will store updates to x\n        DistMatrix<F,MC,STAR> z1_MC_STAR(g), z2_MC_STAR(g);\n\n        z_MC_STAR.AlignWith( U );\n        Zeros( z_MC_STAR, m, 1 );\n\n        Int k=0;\n        while( k < m )\n        {\n            const Int nbProp = Min(bsize,m-k);\n            const bool in2x2 =\n                ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n            const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n            LockedViewRange( U11, U, k, k,    k+nb, k+nb );\n            LockedViewRange( U12, U, k, k+nb, k+nb, m    );\n\n            ViewRange( x1, x, k,    0, k+nb, 1 );\n\n            ViewRange( z1_MC_STAR, z_MC_STAR, k,    0, k+nb, 1 );\n            ViewRange( z2_MC_STAR, z_MC_STAR, k+nb, 0, m,    1 );\n\n            if( k != 0 )\n                x1.RowSumScatterUpdate( F(1), z1_MC_STAR );\n\n            x1_STAR_STAR = x1;\n            U11_STAR_STAR = U11;\n            QuasiTrsvUT\n            ( TRANSPOSE, U11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix(),\n              checkIfSingular );\n            x1 = x1_STAR_STAR;\n\n            x1_MR_STAR.AlignWith( U12 );\n            x1_MR_STAR = x1_STAR_STAR;\n            LocalGemv( TRANSPOSE, F(-1), U12, x1_MR_STAR, F(1), z2_MC_STAR );\n\n            k += nb;\n        }\n    }\n    else\n    {\n        DistMatrix<F,STAR,MR  > x1_STAR_MR(g);\n        DistMatrix<F,MC,  MR  > z1(g);\n        DistMatrix<F,MR,  MC  > z1_MR_MC(g);\n        DistMatrix<F,STAR,MC  > z_STAR_MC(g);\n\n        // Views of z[* ,MC]\n        DistMatrix<F,STAR,MC> z1_STAR_MC(g), z2_STAR_MC(g);\n\n        z_STAR_MC.AlignWith( U );\n        Zeros( z_STAR_MC, 1, m );\n\n        Int k=0;\n        while( k < m )\n        {\n            const Int nbProp = Min(bsize,m-k);\n            const bool in2x2 =\n                ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n            const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n            LockedViewRange( U11, U, k, k,    k+nb, k+nb );\n            LockedViewRange( U12, U, k, k+nb, k+nb, m    );\n\n            ViewRange( x1, x, 0, k, 1, k+nb );\n\n            ViewRange( z1_STAR_MC, z_STAR_MC, 0, k,    1, k+nb );\n            ViewRange( z2_STAR_MC, z_STAR_MC, 0, k+nb, 1, m    );\n\n            if( k != 0 )\n            {\n                z1_MR_MC.ColSumScatterFrom( z1_STAR_MC );\n                z1.AlignWith( x1 );\n                z1 = z1_MR_MC;\n                Axpy( F(1), z1, x1 );\n            }\n\n            x1_STAR_STAR = x1;\n            U11_STAR_STAR = U11;\n            QuasiTrsvUT\n            ( TRANSPOSE, U11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix(),\n              checkIfSingular );\n            x1 = x1_STAR_STAR;\n\n            x1_STAR_MR.AlignWith( U12 );\n            x1_STAR_MR = x1_STAR_STAR;\n            LocalGemv( TRANSPOSE, F(-1), U12, x1_STAR_MR, F(1), z2_STAR_MC );\n\n            k += nb;\n        }\n    }\n    if( conjugate )\n        Conjugate( x );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_QUASITRSV_UT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/QuasiTrsv.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASITRSV_HPP\n#define ELEM_QUASITRSV_HPP\n\n#include \"./QuasiTrsv/LN.hpp\"\n#include \"./QuasiTrsv/LT.hpp\"\n#include \"./QuasiTrsv/UN.hpp\"\n#include \"./QuasiTrsv/UT.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nQuasiTrsv\n( UpperOrLower uplo, Orientation orientation, const Matrix<F>& A, Matrix<F>& x, \n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiTrsv\"))\n    if( uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            internal::QuasiTrsvLN( A, x, checkIfSingular );\n        else\n            internal::QuasiTrsvLT( orientation, A, x, checkIfSingular );\n    }\n    else\n    {\n        if( orientation == NORMAL )\n            internal::QuasiTrsvUN( A, x, checkIfSingular );\n        else\n            internal::QuasiTrsvUT( orientation, A, x, checkIfSingular );\n    }\n}\n\ntemplate<typename F>\ninline void\nQuasiTrsv\n( UpperOrLower uplo, Orientation orientation, \n  const DistMatrix<F>& A, DistMatrix<F>& x, bool checkIfSingular=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiTrsv\"))\n    if( uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            internal::QuasiTrsvLN( A, x, checkIfSingular );\n        else\n            internal::QuasiTrsvLT( orientation, A, x, checkIfSingular );\n    }\n    else\n    {\n        if( orientation == NORMAL )\n            internal::QuasiTrsvUN( A, x, checkIfSingular );\n        else\n            internal::QuasiTrsvUT( orientation, A, x, checkIfSingular );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_QUASITRSV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/README.md",
    "content": "### `include/elemental/blas-like/level2/`\n\nThe level-2 BLAS-like routines implemented in this folder are:\n\n-  `ApplyColumnPivots.hpp`: apply a permutation matrix from the right\n-  `ApplyRowPivots.hpp`: apply a permutation matrix from the left\n-  `ApplySymmetricPivots.hpp`: apply a symmetric permutation to a symmetric\n   matrix\n-  `ComposePivots.hpp`: form the explicit image and preimage of a permutation\n-  `Gemv/`: supporting routines for GEneral Matrix/Vector multiplication (GEMV)\n-  `Gemv.hpp`: interface for GEMV\n-  `Ger.hpp`: GEneral Rank-one update (GER)\n-  `Geru.hpp`: unconjugated version of GER\n-  `Hemv.hpp`: HErmitian Matrix/Vector multiplication (HEMV)\n-  `Her2.hpp`: HErmitian Rank-2 update (HER2)\n-  `Her.hpp`: HErmitian Rank-1 update (HER)\n-  `Symv/`: supporting routines for SYmmetric Matrix/Vector multiplication \n   (SYMV)\n-  `Symv.hpp`: interface for SYMV\n-  `Syr2.hpp`: SYmmetric Rank-2 update (SYR2)\n-  `Syr.hpp`: SYmmetric Rank-1 update (SYR)\n-  `Trmv.hpp`: TRiangular Matrix/Vector multiplication (TRMV)\n-  `Trr2.hpp`: TRiangular Rank-2 update (TRR2)\n-  `Trr.hpp`: TRiangular Rank-1 update (TRR)\n-  `Trsv/`: supporting routines for TRiangular Solve against Vector (TRSV)\n-  `Trsv.hpp`: interface for TRSV\n\nNOTE: The symmetric pivot applications are not yet optimized.\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Symv/L.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMV_L_HPP\n#define ELEM_SYMV_L_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMV_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nLocalSymvColAccumulateL\n( T alpha, \n  const DistMatrix<T>& A,\n  const DistMatrix<T,MC,STAR>& x_MC_STAR,\n  const DistMatrix<T,MR,STAR>& x_MR_STAR,\n        DistMatrix<T,MC,STAR>& z_MC_STAR,\n        DistMatrix<T,MR,STAR>& z_MR_STAR,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::LocalSymvColAccumulateL\");\n        if( A.Grid() != x_MC_STAR.Grid() ||\n            x_MC_STAR.Grid() != x_MR_STAR.Grid() ||\n            x_MR_STAR.Grid() != z_MC_STAR.Grid() ||\n            z_MC_STAR.Grid() != z_MR_STAR.Grid() )\n            LogicError(\"{A,x,z} must be distributed over the same grid\");\n        if( x_MC_STAR.Width() != 1 || x_MR_STAR.Width() != 1 ||\n            z_MC_STAR.Width() != 1 || z_MR_STAR.Width() != 1 )\n            LogicError(\"Expected x and z to be column vectors\");\n        if( A.Height() != A.Width() || \n            A.Height() != x_MC_STAR.Height() ||\n            A.Height() != x_MR_STAR.Height() ||\n            A.Height() != z_MC_STAR.Height() ||\n            A.Height() != z_MR_STAR.Height() )\n            LogicError\n            (\"Nonconformal LocalSymvColAccumulateL: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x[MC,* ] ~ \",x_MC_STAR.Height(),\" x \",x_MC_STAR.Width(),\"\\n\", \n             \"  x[MR,* ] ~ \",x_MR_STAR.Height(),\" x \",x_MR_STAR.Width(),\"\\n\", \n             \"  z[MC,* ] ~ \",z_MC_STAR.Height(),\" x \",z_MC_STAR.Width(),\"\\n\", \n             \"  z[MR,* ] ~ \",z_MR_STAR.Height(),\" x \",z_MR_STAR.Width(),\"\\n\"); \n        if( x_MC_STAR.ColAlign() != A.ColAlign() ||\n            x_MR_STAR.ColAlign() != A.RowAlign() ||\n            z_MC_STAR.ColAlign() != A.ColAlign() ||\n            z_MR_STAR.ColAlign() != A.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> A11(g),\n                  A21(g);\n    DistMatrix<T> D11(g);\n\n    DistMatrix<T,MC,STAR> \n        xT_MC_STAR(g),  x0_MC_STAR(g),\n        xB_MC_STAR(g),  x1_MC_STAR(g),\n                        x2_MC_STAR(g);\n    DistMatrix<T,MR,STAR>  x1_MR_STAR(g);\n    DistMatrix<T,MC,STAR> z1_MC_STAR(g),\n                          z2_MC_STAR(g);\n    DistMatrix<T,MR,STAR> z1_MR_STAR(g);\n\n    // We want our local gemvs to be of width blocksize, so we will \n    // temporarily change to max(r,c) times the current blocksize\n    const Int ratio = Max( g.Height(), g.Width() );\n    PushBlocksizeStack( ratio*LocalSymvBlocksize<T>() );\n    LockedPartitionDown\n    ( x_MC_STAR, xT_MC_STAR,\n                 xB_MC_STAR, 0 );\n    while( xT_MC_STAR.Height() < x_MC_STAR.Height() )\n    {\n        LockedRepartitionDown\n        ( xT_MC_STAR,  x0_MC_STAR,\n         /**********/ /**********/\n                       x1_MC_STAR,\n          xB_MC_STAR,  x2_MC_STAR );\n\n        const Int n0 = x0_MC_STAR.Height();\n        const Int n1 = x1_MC_STAR.Height();\n        const Int n2 = x2_MC_STAR.Height();\n        LockedView( A11, A, n0,    n0, n1, n1 );\n        LockedView( A21, A, n0+n1, n0, n2, n1 );\n        LockedView( x1_MR_STAR, x_MR_STAR, n0, 0, n1, 1 );\n        View( z1_MC_STAR, z_MC_STAR, n0,    0, n1, 1 );\n        View( z2_MC_STAR, z_MC_STAR, n0+n1, 0, n2, 1 );\n        View( z1_MR_STAR, z_MR_STAR, n0,    0, n1, 1 );\n \n        D11.AlignWith( A11 );\n        //--------------------------------------------------------------------//\n        // TODO: These diagonal block updates can be greatly improved\n        D11 = A11;\n        MakeTriangular( LOWER, D11 );\n        LocalGemv( NORMAL, alpha, D11, x1_MR_STAR, T(1), z1_MC_STAR );\n        SetDiagonal( D11, T(0) );\n        LocalGemv( orientation, alpha, D11, x1_MC_STAR, T(1), z1_MR_STAR );\n\n        LocalGemv( NORMAL, alpha, A21, x1_MR_STAR, T(1), z2_MC_STAR );\n        LocalGemv( orientation, alpha, A21, x2_MC_STAR, T(1), z1_MR_STAR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( xT_MC_STAR,  x0_MC_STAR,\n                       x1_MC_STAR,\n         /**********/ /**********/\n          xB_MC_STAR,  x2_MC_STAR );\n    }\n    PopBlocksizeStack();\n}\n\ntemplate<typename T>\ninline void\nLocalSymvRowAccumulateL\n( T alpha, \n  const DistMatrix<T>& A,\n  const DistMatrix<T,STAR,MC>& x_STAR_MC,\n  const DistMatrix<T,STAR,MR>& x_STAR_MR,\n        DistMatrix<T,STAR,MC>& z_STAR_MC,\n        DistMatrix<T,STAR,MR>& z_STAR_MR,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::LocalSymvRowAccumulateL\");\n        if( A.Grid() != x_STAR_MC.Grid() ||\n            x_STAR_MC.Grid() != x_STAR_MR.Grid() ||\n            x_STAR_MR.Grid() != z_STAR_MC.Grid() ||\n            z_STAR_MC.Grid() != z_STAR_MR.Grid()   )\n            LogicError(\"{A,x,z} must be distributed over the same grid\");\n        if( x_STAR_MC.Height() != 1 || x_STAR_MR.Height() != 1 ||\n            z_STAR_MC.Height() != 1 || z_STAR_MR.Height() != 1    )\n            LogicError(\"Expected x and z to be row vectors\");\n        if( A.Height() != A.Width() || \n            A.Height() != x_STAR_MC.Width() ||\n            A.Height() != x_STAR_MR.Width() ||\n            A.Height() != z_STAR_MC.Width() ||\n            A.Height() != z_STAR_MR.Width()   )\n            LogicError\n            (\"Nonconformal LocalSymvRowAccumulateL: \\n\"\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x[* ,MC] ~ \",x_STAR_MC.Height(),\" x \",x_STAR_MC.Width(),\"\\n\", \n             \"  x[* ,MR] ~ \",x_STAR_MR.Height(),\" x \",x_STAR_MR.Width(),\"\\n\", \n             \"  z[* ,MC] ~ \",z_STAR_MC.Height(),\" x \",z_STAR_MC.Width(),\"\\n\", \n             \"  z[* ,MR] ~ \",z_STAR_MR.Height(),\" x \",z_STAR_MR.Width(),\"\\n\"); \n        if( x_STAR_MC.RowAlign() != A.ColAlign() ||\n            x_STAR_MR.RowAlign() != A.RowAlign() ||\n            z_STAR_MC.RowAlign() != A.ColAlign() ||\n            z_STAR_MR.RowAlign() != A.RowAlign()   )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> A11(g),\n                  A21(g);\n    DistMatrix<T> D11(g);\n\n    DistMatrix<T,STAR,MC> \n        xL_STAR_MC(g), xR_STAR_MC(g),\n        x0_STAR_MC(g), x1_STAR_MC(g), x2_STAR_MC(g);\n    DistMatrix<T,STAR,MR> x1_STAR_MR(g);\n    DistMatrix<T,STAR,MC> z1_STAR_MC(g), z2_STAR_MC(g);\n    DistMatrix<T,STAR,MR> z1_STAR_MR(g);\n\n    // We want our local gemvs to be of width blocksize, so we will \n    // temporarily change to max(r,c) times the current blocksize\n    const Int ratio = Max( g.Height(), g.Width() );\n    PushBlocksizeStack( ratio*LocalSymvBlocksize<T>() );\n                 \n    LockedPartitionRight( x_STAR_MC,  xL_STAR_MC, xR_STAR_MC, 0 );\n    while( xL_STAR_MC.Width() < x_STAR_MC.Width() )\n    {\n        LockedRepartitionRight\n        ( xL_STAR_MC, /**/ xR_STAR_MC, \n          x0_STAR_MC, /**/ x1_STAR_MC, x2_STAR_MC );\n\n        const Int n0 = x0_STAR_MC.Width();\n        const Int n1 = x1_STAR_MC.Width();\n        const Int n2 = x2_STAR_MC.Width();\n        LockedView( A11, A, n0,    n0, n1, n1 );\n        LockedView( A21, A, n0+n1, n0, n2, n1 );\n        LockedView( x1_STAR_MR, x_STAR_MR, 0, n0, 1, n1 );\n        View( z1_STAR_MC, z_STAR_MC, 0, n0,    1, n1 );\n        View( z2_STAR_MC, z_STAR_MC, 0, n0+n1, 1, n2 );\n        View( z1_STAR_MR, z_STAR_MR, 0, n0,    1, n1 );\n\n        D11.AlignWith( A11 );\n        //--------------------------------------------------------------------//\n        // TODO: These diagonal block updates can be greatly improved\n        D11 = A11;\n        MakeTriangular( LOWER, D11 );\n        LocalGemv( NORMAL, alpha, D11, x1_STAR_MR, T(1), z1_STAR_MC );\n        SetDiagonal( D11, T(0) );\n        LocalGemv( orientation, alpha, D11, x1_STAR_MC, T(1), z1_STAR_MR );\n\n        LocalGemv( NORMAL, alpha, A21, x1_STAR_MR, T(1), z2_STAR_MC );\n        LocalGemv( orientation, alpha, A21, x2_STAR_MC, T(1), z1_STAR_MR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( xL_STAR_MC,             /**/ xR_STAR_MC,\n          x0_STAR_MC, x1_STAR_MC, /**/ x2_STAR_MC );\n    }\n    PopBlocksizeStack();\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYMV_L_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Symv/U.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMV_U_HPP\n#define ELEM_SYMV_U_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMV_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nLocalSymvColAccumulateU\n( T alpha, \n  const DistMatrix<T>& A,\n  const DistMatrix<T,MC,STAR>& x_MC_STAR,\n  const DistMatrix<T,MR,STAR>& x_MR_STAR,\n        DistMatrix<T,MC,STAR>& z_MC_STAR,\n        DistMatrix<T,MR,STAR>& z_MR_STAR,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::LocalSymvColAccumulateU\");\n        if( A.Grid() != x_MC_STAR.Grid() ||\n            x_MC_STAR.Grid() != x_MR_STAR.Grid() ||\n            x_MR_STAR.Grid() != z_MC_STAR.Grid() ||\n            z_MC_STAR.Grid() != z_MR_STAR.Grid() )\n            LogicError(\"{A,x,z} must be distributed over the same grid\");\n        if( x_MC_STAR.Width() != 1 || x_MR_STAR.Width() != 1 ||\n            z_MC_STAR.Width() != 1 || z_MR_STAR.Width() != 1 )\n            LogicError(\"Expected x and z to be column vectors\");\n        if( A.Height() != A.Width() || \n            A.Height() != x_MC_STAR.Height() ||\n            A.Height() != x_MR_STAR.Height() ||\n            A.Height() != z_MC_STAR.Height() ||\n            A.Height() != z_MR_STAR.Height() )\n            LogicError\n            (\"Nonconformal LocalSymvColAccumulateU: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x[MC,* ] ~ \",x_MC_STAR.Height(),\" x \",x_MC_STAR.Width(),\"\\n\",\n             \"  x[MR,* ] ~ \",x_MR_STAR.Height(),\" x \",x_MR_STAR.Width(),\"\\n\",\n             \"  z[MC,* ] ~ \",z_MC_STAR.Height(),\" x \",z_MC_STAR.Width(),\"\\n\",\n             \"  z[MR,* ] ~ \",z_MR_STAR.Height(),\" x \",z_MR_STAR.Width(),\"\\n\");\n        if( x_MC_STAR.ColAlign() != A.ColAlign() ||\n            x_MR_STAR.ColAlign() != A.RowAlign() ||\n            z_MC_STAR.ColAlign() != A.ColAlign() ||\n            z_MR_STAR.ColAlign() != A.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> A11(g), A12(g);\n    DistMatrix<T> D11(g);\n\n    DistMatrix<T,MC,STAR> x1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> \n        xT_MR_STAR(g),  x0_MR_STAR(g),\n        xB_MR_STAR(g),  x1_MR_STAR(g),\n                        x2_MR_STAR(g);\n    DistMatrix<T,MC,STAR> z1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> z1_MR_STAR(g),\n                          z2_MR_STAR(g);\n\n    // We want our local gemvs to be of width blocksize, so we will \n    // temporarily change to max(r,c) times the current blocksize\n    const Int ratio = Max( g.Height(), g.Width() );\n    PushBlocksizeStack( ratio*LocalSymvBlocksize<T>() );\n                 \n    LockedPartitionDown\n    ( x_MR_STAR, xT_MR_STAR,\n                 xB_MR_STAR, 0 );\n    while( xT_MR_STAR.Height() < x_MR_STAR.Height() )\n    {\n        LockedRepartitionDown\n        ( xT_MR_STAR,  x0_MR_STAR,\n         /**********/ /**********/\n                       x1_MR_STAR,\n          xB_MR_STAR,  x2_MR_STAR );\n\n        const Int n0 = x0_MR_STAR.Height();\n        const Int n1 = x1_MR_STAR.Height();\n        const Int n2 = x2_MR_STAR.Height();\n        LockedView( A11, A, n0, n0,    n1, n1 );\n        LockedView( A12, A, n0, n0+n1, n1, n2 );\n        LockedView( x1_MC_STAR, x_MC_STAR, n0, 0, n1, 1 );\n        View( z1_MC_STAR, z_MC_STAR, n0,    0, n1, 1 );\n        View( z1_MR_STAR, z_MR_STAR, n0,    0, n1, 1 );\n        View( z2_MR_STAR, z_MR_STAR, n0+n1, 0, n2, 1 );\n\n        D11.AlignWith( A11 );\n        //--------------------------------------------------------------------//\n        // TODO: These diagonal block updates can be greatly improved\n        D11 = A11;\n        MakeTriangular( UPPER, D11 );\n        LocalGemv( NORMAL, alpha, D11, x1_MR_STAR, T(1), z1_MC_STAR );\n        SetDiagonal( D11, T(0) );\n        LocalGemv( orientation, alpha, D11, x1_MC_STAR, T(1), z1_MR_STAR );\n        \n        LocalGemv( NORMAL, alpha, A12, x2_MR_STAR, T(1), z1_MC_STAR );\n        LocalGemv( orientation, alpha, A12, x1_MC_STAR, T(1), z2_MR_STAR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( xT_MR_STAR,  x0_MR_STAR,\n                       x1_MR_STAR,\n         /**********/ /**********/\n          xB_MR_STAR,  x2_MR_STAR );\n    }\n    PopBlocksizeStack();\n}\n\ntemplate<typename T>\ninline void\nLocalSymvRowAccumulateU\n( T alpha, \n  const DistMatrix<T>& A,\n  const DistMatrix<T,STAR,MC>& x_STAR_MC,\n  const DistMatrix<T,STAR,MR>& x_STAR_MR,\n        DistMatrix<T,STAR,MC>& z_STAR_MC,\n        DistMatrix<T,STAR,MR>& z_STAR_MR,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::LocalSymvRowAccumulateU\");\n        if( A.Grid() != x_STAR_MC.Grid() ||\n            x_STAR_MC.Grid() != x_STAR_MR.Grid() ||\n            x_STAR_MR.Grid() != z_STAR_MC.Grid() ||\n            z_STAR_MC.Grid() != z_STAR_MR.Grid() )\n            LogicError(\"{A,x,z} must be distributed over the same grid\");\n        if( x_STAR_MC.Height() != 1 || x_STAR_MR.Height() != 1 ||\n            z_STAR_MC.Height() != 1 || z_STAR_MR.Height() != 1 )\n            LogicError(\"Expected x and z to be row vectors\");\n        if( A.Height() != A.Width() || \n            A.Height() != x_STAR_MC.Width() ||\n            A.Height() != x_STAR_MR.Width() ||\n            A.Height() != z_STAR_MC.Width() ||\n            A.Height() != z_STAR_MR.Width() )\n            LogicError\n            (\"Nonconformal LocalSymvRowAccumulateU: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x[* ,MC] ~ \",x_STAR_MC.Height(),\" x \",x_STAR_MC.Width(),\"\\n\",\n             \"  x[* ,MR] ~ \",x_STAR_MR.Height(),\" x \",x_STAR_MR.Width(),\"\\n\",\n             \"  z[* ,MC] ~ \",z_STAR_MC.Height(),\" x \",z_STAR_MC.Width(),\"\\n\",\n             \"  z[* ,MR] ~ \",z_STAR_MR.Height(),\" x \",z_STAR_MR.Width(),\"\\n\");\n        if( x_STAR_MC.RowAlign() != A.ColAlign() ||\n            x_STAR_MR.RowAlign() != A.RowAlign() ||\n            z_STAR_MC.RowAlign() != A.ColAlign() ||\n            z_STAR_MR.RowAlign() != A.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> A11(g), A12(g);\n    DistMatrix<T> D11(g);\n\n    DistMatrix<T,STAR,MC> x1_STAR_MC(g);\n    DistMatrix<T,STAR,MR> \n        xL_STAR_MR(g), xR_STAR_MR(g),\n        x0_STAR_MR(g), x1_STAR_MR(g), x2_STAR_MR(g);\n    DistMatrix<T,STAR,MC> z1_STAR_MC(g);\n    DistMatrix<T,STAR,MR> z1_STAR_MR(g), z2_STAR_MR(g);\n\n    // We want our local gemvs to be of width blocksize, so we will \n    // temporarily change to max(r,c) times the current blocksize\n    const Int ratio = Max( g.Height(), g.Width() );\n    PushBlocksizeStack( ratio*LocalSymvBlocksize<T>() );\n                 \n    LockedPartitionRight( x_STAR_MR,  xL_STAR_MR, xR_STAR_MR, 0 );\n    while( xL_STAR_MR.Width() < x_STAR_MR.Width() )\n    {\n        LockedRepartitionRight\n        ( xL_STAR_MR, /**/ xR_STAR_MR, \n          x0_STAR_MR, /**/ x1_STAR_MR, x2_STAR_MR );\n\n        const Int n0 = x0_STAR_MR.Width();\n        const Int n1 = x1_STAR_MR.Width();\n        const Int n2 = x2_STAR_MR.Width();\n        LockedView( A11, A, n0, n0,    n1, n1 );\n        LockedView( A12, A, n0, n0+n1, n1, n2 );\n        LockedView( x1_STAR_MC, x_STAR_MC, 0, n0, 1, n1 );\n        View( z1_STAR_MC, z_STAR_MC, 0, n0,    1, n1 );\n        View( z1_STAR_MR, z_STAR_MR, 0, n0,    1, n1 );\n        View( z2_STAR_MR, z_STAR_MR, 0, n0+n1, 1, n2 );\n\n        D11.AlignWith( A11 );\n        //--------------------------------------------------------------------//\n        // TODO: These diagonal block updates can be greatly improved\n        D11 = A11;\n        MakeTriangular( UPPER, D11 );\n        LocalGemv( NORMAL, alpha, D11, x1_STAR_MR, T(1), z1_STAR_MC );\n        SetDiagonal( D11, T(0) );\n        LocalGemv( orientation, alpha, D11, x1_STAR_MC, T(1), z1_STAR_MR );\n\n        LocalGemv( NORMAL, alpha, A12, x2_STAR_MR, T(1), z1_STAR_MC );\n        LocalGemv( orientation, alpha, A12, x1_STAR_MC, T(1), z2_STAR_MR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( xL_STAR_MR,             /**/ xR_STAR_MR,\n          x0_STAR_MR, x1_STAR_MR, /**/ x2_STAR_MR );\n    }\n    PopBlocksizeStack();\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYMV_U_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Symv.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMV_HPP\n#define ELEM_SYMV_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_ZEROS_INC\n\n#include \"./Symv/L.hpp\"\n#include \"./Symv/U.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nSymv\n( UpperOrLower uplo,\n  T alpha, const Matrix<T>& A, const Matrix<T>& x, T beta, Matrix<T>& y,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Symv\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( ( x.Height() != 1 && x.Width() != 1 ) ||\n            ( y.Height() != 1 && y.Width() != 1 ) )\n            LogicError(\"x and y must be vectors\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( A.Height() != xLength || A.Height() != yLength )\n            LogicError(\"A must conform with x and y\");\n    )\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const Int m = A.Height();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    const Int incy = ( y.Width()==1 ? 1 : y.LDim() );\n    if( conjugate )\n    {\n        blas::Hemv\n        ( uploChar, m,\n          alpha, A.LockedBuffer(), A.LDim(), x.LockedBuffer(), incx,\n          beta,  y.Buffer(), incy );\n    }\n    else\n    {\n        blas::Symv\n        ( uploChar, m,\n          alpha, A.LockedBuffer(), A.LDim(), x.LockedBuffer(), incx,\n          beta,  y.Buffer(), incy );\n    }\n}\n\ntemplate<typename T>\ninline void\nSymv\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& x,\n  T beta,        DistMatrix<T>& y,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Symv\");\n        if( A.Grid() != x.Grid() || x.Grid() != y.Grid() )\n            LogicError(\"{A,x,y} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( ( x.Width() != 1 && x.Height() != 1 ) ||\n            ( y.Width() != 1 && y.Height() != 1 ) )\n            LogicError(\"x and y are assumed to be vectors\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( A.Height() != xLength || A.Height() != yLength )\n            LogicError\n            (\"Nonconformal Symv: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\",\n             \"  y ~ \",y.Height(),\" x \",y.Width(),\"\\n\");\n    )\n    const Grid& g = A.Grid();\n\n    if( x.Width() == 1 && y.Width() == 1 )\n    {\n        // Temporary distributions\n        DistMatrix<T,MC,STAR> x_MC_STAR(g), z_MC_STAR(g);\n        DistMatrix<T,MR,STAR> x_MR_STAR(g), z_MR_STAR(g);\n        DistMatrix<T,MR,MC  > z_MR_MC(g);\n        DistMatrix<T> z(g);\n\n        // Begin the algoritm\n        Scale( beta, y );\n        x_MC_STAR.AlignWith( A );\n        x_MR_STAR.AlignWith( A );\n        z_MC_STAR.AlignWith( A );\n        z_MR_STAR.AlignWith( A );\n        z.AlignWith( y );\n        Zeros( z_MC_STAR, y.Height(), 1 );\n        Zeros( z_MR_STAR, y.Height(), 1 );\n        //--------------------------------------------------------------------//\n        x_MC_STAR = x;\n        x_MR_STAR = x_MC_STAR;\n        if( uplo == LOWER )\n        {\n            internal::LocalSymvColAccumulateL\n            ( alpha, A, x_MC_STAR, x_MR_STAR, z_MC_STAR, z_MR_STAR, conjugate );\n        }\n        else\n        {\n            internal::LocalSymvColAccumulateU\n            ( alpha, A, x_MC_STAR, x_MR_STAR, z_MC_STAR, z_MR_STAR, conjugate );\n        }\n\n        z_MR_MC.RowSumScatterFrom( z_MR_STAR );\n        z = z_MR_MC;\n        z.RowSumScatterUpdate( T(1), z_MC_STAR );\n        Axpy( T(1), z, y );\n        //--------------------------------------------------------------------//\n    }\n    else if( x.Width() == 1 )\n    {\n        // Temporary distributions\n        DistMatrix<T,MC,STAR> x_MC_STAR(g), z_MC_STAR(g);\n        DistMatrix<T,MR,STAR> x_MR_STAR(g), z_MR_STAR(g);\n        DistMatrix<T,MR,MC  > z_MR_MC(g);\n        DistMatrix<T> z(g), zTrans(g);\n\n        // Begin the algoritm\n        Scale( beta, y );\n        x_MC_STAR.AlignWith( A );\n        x_MR_STAR.AlignWith( A );\n        z_MC_STAR.AlignWith( A );\n        z_MR_STAR.AlignWith( A );\n        z.AlignWith( y );\n        z_MR_MC.AlignWith( y );\n        Zeros( z_MC_STAR, y.Width(), 1 );\n        Zeros( z_MR_STAR, y.Width(), 1 );\n        //--------------------------------------------------------------------//\n        x_MC_STAR = x;\n        x_MR_STAR = x_MC_STAR;\n        if( uplo == LOWER )\n        {\n            internal::LocalSymvColAccumulateL\n            ( alpha, A, x_MC_STAR, x_MR_STAR, z_MC_STAR, z_MR_STAR, conjugate );\n        }\n        else\n        {\n            internal::LocalSymvColAccumulateU\n            ( alpha, A, x_MC_STAR, x_MR_STAR, z_MC_STAR, z_MR_STAR, conjugate );\n        }\n\n        z.RowSumScatterFrom( z_MC_STAR );\n        z_MR_MC = z;\n        z_MR_MC.RowSumScatterUpdate( T(1), z_MR_STAR );\n        Transpose( z_MR_MC, zTrans );\n        Axpy( T(1), zTrans, y );\n        //--------------------------------------------------------------------//\n    }\n    else if( y.Width() == 1 )\n    {\n        // Temporary distributions\n        DistMatrix<T,STAR,MC> x_STAR_MC(g), z_STAR_MC(g);\n        DistMatrix<T,STAR,MR> x_STAR_MR(g), z_STAR_MR(g);\n        DistMatrix<T,MR,  MC> z_MR_MC(g);\n        DistMatrix<T> z(g), zTrans(g);\n\n        // Begin the algoritm\n        Scale( beta, y );\n        x_STAR_MC.AlignWith( A );\n        x_STAR_MR.AlignWith( A );\n        z_STAR_MC.AlignWith( A );\n        z_STAR_MR.AlignWith( A );\n        z.AlignWith( y );\n        z_MR_MC.AlignWith( y );\n        Zeros( z_STAR_MC, 1, y.Height() );\n        Zeros( z_STAR_MR, 1, y.Height() );\n        //--------------------------------------------------------------------//\n        x_STAR_MR = x;\n        x_STAR_MC = x_STAR_MR;\n        if( uplo == LOWER )\n        {\n            internal::LocalSymvRowAccumulateL\n            ( alpha, A, x_STAR_MC, x_STAR_MR, z_STAR_MC, z_STAR_MR, conjugate );\n        }\n        else\n        {\n            internal::LocalSymvRowAccumulateU\n            ( alpha, A, x_STAR_MC, x_STAR_MR, z_STAR_MC, z_STAR_MR, conjugate );\n        }\n\n        z.ColSumScatterFrom( z_STAR_MR );\n        z_MR_MC = z;\n        z_MR_MC.ColSumScatterUpdate( T(1), z_STAR_MC );\n        Transpose( z_MR_MC, zTrans );\n        Axpy( T(1), zTrans, y );\n        //--------------------------------------------------------------------//\n    }\n    else\n    {\n        // Temporary distributions\n        DistMatrix<T,STAR,MC> x_STAR_MC(g), z_STAR_MC(g);\n        DistMatrix<T,STAR,MR> x_STAR_MR(g), z_STAR_MR(g);\n        DistMatrix<T,MR,  MC> z_MR_MC(g);\n        DistMatrix<T> z(g);\n\n        // Begin the algoritm\n        Scale( beta, y );\n        x_STAR_MC.AlignWith( A );\n        x_STAR_MR.AlignWith( A );\n        z_STAR_MC.AlignWith( A );\n        z_STAR_MR.AlignWith( A );\n        z.AlignWith( y );\n        z_MR_MC.AlignWith( y );\n        Zeros( z_STAR_MC, 1, y.Width() );\n        Zeros( z_STAR_MR, 1, y.Width() );\n        //--------------------------------------------------------------------//\n        x_STAR_MR = x;\n        x_STAR_MC = x_STAR_MR;\n        if( uplo == LOWER )\n        {\n            internal::LocalSymvRowAccumulateL\n            ( alpha, A, x_STAR_MC, x_STAR_MR, z_STAR_MC, z_STAR_MR, conjugate );\n        }\n        else\n        {\n            internal::LocalSymvRowAccumulateU\n            ( alpha, A, x_STAR_MC, x_STAR_MR, z_STAR_MC, z_STAR_MR, conjugate );\n        }\n\n        z_MR_MC.ColSumScatterFrom( z_STAR_MC );\n        z = z_MR_MC;\n        z.ColSumScatterUpdate( T(1), z_STAR_MR );\n        Axpy( T(1), z, y );\n        //--------------------------------------------------------------------//\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYMV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Syr.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYR_HPP\n#define ELEM_SYR_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nSyr\n( UpperOrLower uplo, T alpha, const Matrix<T>& x, Matrix<T>& A, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Syr\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        if( xLength != A.Height() )\n            LogicError(\"x must conform with A\");\n    )\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const Int m = A.Height();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    if( conjugate )\n    {\n        blas::Her\n        ( uploChar, m, alpha, x.LockedBuffer(), incx, A.Buffer(), A.LDim() );\n    }\n    else\n    {\n        blas::Syr\n        ( uploChar, m, alpha, x.LockedBuffer(), incx, A.Buffer(), A.LDim() );\n    }\n}\n\ntemplate<typename T>\ninline void\nSyr\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& x,\n                 DistMatrix<T>& A,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Syr\");\n        if( A.Grid() != x.Grid() )\n            LogicError(\"A and x must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        if( A.Height() != xLength )\n            LogicError\n            (\"A must conform with x: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\");\n    )\n    const Grid& g = A.Grid();\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n\n    if( x.Width() == 1 )\n    {\n        DistMatrix<T,MC,STAR> x_MC_STAR(g);\n        DistMatrix<T,MR,STAR> x_MR_STAR(g);\n\n        x_MC_STAR.AlignWith( A );\n        x_MC_STAR = x;\n        x_MR_STAR.AlignWith( A );\n        x_MR_STAR = x_MC_STAR;\n\n        const T* xBuffer = x_MC_STAR.LockedBuffer();\n        if( uplo == LOWER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightAboveDiag = A.LocalRowOffset(j);\n\n                const T beta = x_MR_STAR.GetLocal(jLoc,0);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=heightAboveDiag; iLoc<localHeight; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc];\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightToDiag = A.LocalRowOffset(j+1);\n\n                const T beta = x_MR_STAR.GetLocal(jLoc,0);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=0; iLoc<heightToDiag; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc];\n            }\n        }\n    }\n    else\n    {\n        DistMatrix<T,STAR,MC> x_STAR_MC(g);\n        DistMatrix<T,STAR,MR> x_STAR_MR(g);\n\n        x_STAR_MR.AlignWith( A );\n        x_STAR_MR = x;\n        x_STAR_MC.AlignWith( A );\n        x_STAR_MC = x_STAR_MR;\n\n        const T* xBuffer = x_STAR_MC.LockedBuffer();\n        const Int incx = x_STAR_MC.LDim();\n        if( uplo == LOWER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightAboveDiag = A.LocalRowOffset(j);\n\n                const T beta = x_STAR_MR.GetLocal(0,jLoc);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=heightAboveDiag; iLoc<localHeight; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc*incx];\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightToDiag = A.LocalRowOffset(j+1);\n\n                const T beta = x_STAR_MR.GetLocal(0,jLoc);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=0; iLoc<heightToDiag; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc*incx];\n            }\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Syr2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYR2_HPP\n#define ELEM_SYR2_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nSyr2\n( UpperOrLower uplo,\n  T alpha, const Matrix<T>& x, const Matrix<T>& y, Matrix<T>& A, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Syr2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( (x.Width() != 1 && x.Height() != 1) ||\n            (y.Width() != 1 && y.Height() != 1) )\n            LogicError(\"x and y must be vectors\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( xLength != A.Height() || yLength != A.Height() )\n            LogicError(\"x and y must conform with A\");\n    )\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const Int m = A.Height();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    const Int incy = ( y.Width()==1 ? 1 : y.LDim() );\n    if( conjugate )\n    {\n        blas::Her2\n        ( uploChar, m,\n          alpha, x.LockedBuffer(), incx, y.LockedBuffer(), incy,\n                 A.Buffer(), A.LDim() );\n    }\n    else\n    {\n        blas::Syr2\n        ( uploChar, m,\n          alpha, x.LockedBuffer(), incx, y.LockedBuffer(), incy,\n                 A.Buffer(), A.LDim() );\n    }\n}\n\ntemplate<typename T>\ninline void\nSyr2\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& x,\n           const DistMatrix<T>& y,\n                 DistMatrix<T>& A,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Syr2\");\n        if( A.Grid() != x.Grid() || x.Grid() != y.Grid() )\n            LogicError(\"{A,x,y} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        const Int yLength = ( y.Width()==1 ? y.Height() : y.Width() );\n        if( A.Height() != xLength || A.Height() != yLength )\n            LogicError\n            (\"A must conform with x: \\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  x ~ \",x.Height(),\" x \",x.Width(),\"\\n\",\n             \"  y ~ \",y.Height(),\" x \",y.Width(),\"\\n\");\n    )\n    const Grid& g = A.Grid();\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n\n    if( x.Width() == 1 && y.Width() == 1 )\n    {\n        DistMatrix<T,MC,STAR> x_MC_STAR(g), y_MC_STAR(g);\n        DistMatrix<T,MR,STAR> x_MR_STAR(g), y_MR_STAR(g);\n\n        x_MC_STAR.AlignWith( A );\n        x_MC_STAR = x;\n        x_MR_STAR.AlignWith( A );\n        x_MR_STAR = x_MC_STAR;\n        y_MC_STAR.AlignWith( A );\n        y_MC_STAR = y;\n        y_MR_STAR.AlignWith( A );\n        y_MR_STAR = y_MC_STAR;\n\n        const T* xBuffer = x_MC_STAR.LockedBuffer();\n        const T* yBuffer = y_MC_STAR.LockedBuffer();\n        if( uplo == LOWER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightAboveDiag = A.LocalRowOffset(j);\n\n                const T beta = y_MR_STAR.GetLocal(jLoc,0);\n                const T kappa = x_MR_STAR.GetLocal(jLoc,0);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                const T delta = ( conjugate ? alpha*Conj(kappa) : alpha*kappa );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=heightAboveDiag; iLoc<localHeight; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc] + delta*yBuffer[iLoc];\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightToDiag = A.LocalRowOffset(j+1);\n\n                const T beta = y_MR_STAR.GetLocal(jLoc,0);\n                const T kappa = x_MR_STAR.GetLocal(jLoc,0);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                const T delta = ( conjugate ? alpha*Conj(kappa) : alpha*kappa );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=0; iLoc<heightToDiag; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc] + delta*yBuffer[iLoc];\n            }\n        }\n    }\n    else if( x.Width() == 1 )\n    {\n        DistMatrix<T,MC,STAR> x_MC_STAR(g);\n        DistMatrix<T,MR,STAR> x_MR_STAR(g);\n        DistMatrix<T,STAR,MC> y_STAR_MC(g);\n        DistMatrix<T,STAR,MR> y_STAR_MR(g);\n\n        x_MC_STAR.AlignWith( A );\n        x_MC_STAR = x;\n        x_MR_STAR.AlignWith( A );\n        x_MR_STAR = x_MC_STAR;\n        y_STAR_MR.AlignWith( A );\n        y_STAR_MR = y;\n        y_STAR_MC.AlignWith( A );\n        y_STAR_MC = y_STAR_MR;\n\n        const T* xBuffer = x_MC_STAR.LockedBuffer();\n        const T* yBuffer = y_STAR_MC.LockedBuffer();\n        const Int incy = y_STAR_MC.LDim();\n        if( uplo == LOWER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightAboveDiag = A.LocalRowOffset(j);\n\n                const T beta = y_STAR_MR.GetLocal(0,jLoc);\n                const T kappa = x_MR_STAR.GetLocal(jLoc,0);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                const T delta = ( conjugate ? alpha*Conj(kappa) : alpha*kappa );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=heightAboveDiag; iLoc<localHeight; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc] +\n                                  delta*yBuffer[iLoc*incy];\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightToDiag = A.LocalRowOffset(j+1);\n\n                const T beta = y_STAR_MR.GetLocal(0,jLoc);\n                const T kappa = x_MR_STAR.GetLocal(jLoc,0);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                const T delta = ( conjugate ? alpha*Conj(kappa) : alpha*kappa );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=0; iLoc<heightToDiag; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc] +\n                                  delta*yBuffer[iLoc*incy];\n            }\n        }\n    }\n    else if( y.Width() == 1 )\n    {\n        DistMatrix<T,STAR,MC> x_STAR_MC(g);\n        DistMatrix<T,STAR,MR> x_STAR_MR(g);\n        DistMatrix<T,MC,STAR> y_MC_STAR(g);\n        DistMatrix<T,MR,STAR> y_MR_STAR(g);\n\n        x_STAR_MR.AlignWith( A );\n        x_STAR_MR = x;\n        x_STAR_MC.AlignWith( A );\n        x_STAR_MC = x_STAR_MR;\n        y_MC_STAR.AlignWith( A );\n        y_MC_STAR = y;\n        y_MR_STAR.AlignWith( A );\n        y_MR_STAR = y_MC_STAR;\n\n        const T* xBuffer = x_STAR_MC.LockedBuffer();\n        const T* yBuffer = y_MC_STAR.LockedBuffer();\n        const Int incx = x_STAR_MC.LDim();\n        if( uplo == LOWER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightAboveDiag = A.LocalRowOffset(j);\n\n                const T beta = x_STAR_MR.GetLocal(0,jLoc);\n                const T kappa = y_MR_STAR.GetLocal(jLoc,0);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                const T delta = ( conjugate ? alpha*Conj(kappa) : alpha*kappa );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=heightAboveDiag; iLoc<localHeight; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc*incx] +\n                                  delta*yBuffer[iLoc]; \n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightToDiag = A.LocalRowOffset(j+1);\n\n                const T beta = x_STAR_MR.GetLocal(0,jLoc);\n                const T kappa = y_MR_STAR.GetLocal(jLoc,0);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                const T delta = ( conjugate ? alpha*Conj(kappa) : alpha*kappa );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=0; iLoc<heightToDiag; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc*incx] +\n                                  delta*yBuffer[iLoc];\n            }\n        }\n    }\n    else\n    {\n        DistMatrix<T,STAR,MC> x_STAR_MC(g), y_STAR_MC(g);\n        DistMatrix<T,STAR,MR> x_STAR_MR(g), y_STAR_MR(g);\n\n        x_STAR_MR.AlignWith( A );\n        x_STAR_MR = x;\n        x_STAR_MC.AlignWith( A );\n        x_STAR_MC = x_STAR_MR;\n        y_STAR_MR.AlignWith( A );\n        y_STAR_MR = y;\n        y_STAR_MC.AlignWith( A );\n        y_STAR_MC = y_STAR_MR;\n\n        const T* xBuffer = x_STAR_MC.LockedBuffer();\n        const T* yBuffer = y_STAR_MC.LockedBuffer();\n        const Int incx = x_STAR_MC.LDim();\n        const Int incy = y_STAR_MC.LDim();\n        if( uplo == LOWER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightAboveDiag = A.LocalRowOffset(j);\n\n                const T beta = y_STAR_MR.GetLocal(0,jLoc);\n                const T kappa = x_STAR_MR.GetLocal(0,jLoc);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                const T delta = ( conjugate ? alpha*Conj(kappa) : alpha*kappa );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=heightAboveDiag; iLoc<localHeight; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc*incx] +\n                                  delta*yBuffer[iLoc*incy];\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int heightToDiag = A.LocalRowOffset(j+1);\n\n                const T beta = y_STAR_MR.GetLocal(0,jLoc);\n                const T kappa = x_STAR_MR.GetLocal(0,jLoc);\n                const T gamma = ( conjugate ? alpha*Conj(beta) : alpha*beta );\n                const T delta = ( conjugate ? alpha*Conj(kappa) : alpha*kappa );\n                T* ACol = A.Buffer(0,jLoc);\n                for( Int iLoc=0; iLoc<heightToDiag; ++iLoc )\n                    ACol[iLoc] += gamma*xBuffer[iLoc*incx] +\n                                  delta*yBuffer[iLoc*incy];\n            }\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYR2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Trmv.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRMV_HPP\n#define ELEM_TRMV_HPP\n\n// TODO: Implement distributed version\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nTrmv\n( UpperOrLower uplo, Orientation orientation, UnitOrNonUnit diag,\n  const Matrix<T>& A, Matrix<T>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trmv\");\n        if( x.Height() != 1 && x.Width() != 1 )\n            LogicError(\"x must be a vector\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        if( xLength != A.Height() )\n            LogicError(\"x must conform with A\");\n    )\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const char transChar = OrientationToChar( orientation );\n    const char diagChar = UnitOrNonUnitToChar( diag );\n    const Int m = A.Height();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    blas::Trmv\n    ( uploChar, transChar, diagChar, m,\n      A.LockedBuffer(), A.LDim(), x.Buffer(), incx );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRMV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Trr.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRR_HPP\n#define ELEM_TRR_HPP\n\nnamespace elem {\n\n// TODO: Generalize to both left and right diagonals\n\n// A := A + alpha x y'\ntemplate<typename T>\ninline void\nTrr\n( UpperOrLower uplo,\n  T alpha, const Matrix<T>& x, const Matrix<T>& y, Matrix<T>& A, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trr\");\n        if( x.Width() != 1 || y.Width() != 1 )\n            LogicError(\"x and y must be of width 1\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    DEBUG_ONLY(\n        if( x.Height() != m || y.Height() != n )\n            LogicError(\"x and y must conform with A\");\n    )\n    const T* xCol = x.LockedBuffer();\n    const T* yCol = y.LockedBuffer();\n    if( uplo == LOWER )\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            const T eta = alpha*( conjugate ? Conj(yCol[j]) : yCol[j] );\n            T* ACol = A.Buffer(0,j);\n            for( Int i=j; i<m; ++i )\n                ACol[i] += xCol[i]*eta;\n            if( conjugate )\n                A.MakeReal( j, j );\n        }\n    }\n    else\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            const T eta = alpha*( conjugate ? Conj(yCol[j]) : yCol[j] );\n            T* ACol = A.Buffer(0,j);\n            for( Int i=0; i<=j; ++i )\n                ACol[i] += xCol[i]*eta;\n            if( conjugate )\n                A.MakeReal( j, j );\n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nTrr\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& x, const DistMatrix<T>& y, DistMatrix<T>& A, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trr\");\n        if( x.Width() != 1 || y.Width() != 1 )\n            LogicError(\"x and y must be of width 1\");\n    )\n    const Int mLocal = A.LocalHeight();\n    const Int nLocal = A.LocalWidth();\n    DEBUG_ONLY(\n        if( x.Height() != A.Height() || y.Height() != A.Width() )\n            LogicError(\"x and y must conform with A\");\n    )\n\n    DistMatrix<T,MC,STAR> x_MC_STAR(A.Grid());\n    DistMatrix<T,MR,STAR> y_MR_STAR(A.Grid());\n    x_MC_STAR.AlignWith( A );\n    y_MR_STAR.AlignWith( A );\n    x_MC_STAR = x;\n    y_MR_STAR = y;\n\n    const T* xLocCol = x_MC_STAR.LockedBuffer();\n    const T* yLocCol = y_MR_STAR.LockedBuffer();\n\n    if( uplo == LOWER )\n    {\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int mLocBefore = A.LocalRowOffset(j);\n\n            const T eta = \n                alpha*( conjugate ? Conj(yLocCol[jLoc]) : yLocCol[jLoc] );\n            T* ALocCol = A.Buffer(0,jLoc);\n            for( Int iLoc=mLocBefore; iLoc<mLocal; ++iLoc )\n                ALocCol[iLoc] += xLocCol[iLoc]*eta;\n            if( conjugate )\n                A.MakeReal( j, j );\n        }\n    }\n    else\n    {\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int mLocBefore = A.LocalRowOffset(j+1);\n\n            const T eta = \n                alpha*( conjugate ? Conj(yLocCol[jLoc]) : yLocCol[jLoc] );\n            T* ALocCol = A.Buffer(0,jLoc);\n            for( Int iLoc=0; iLoc<mLocBefore; ++iLoc )\n                ALocCol[iLoc] += xLocCol[iLoc]*eta;\n            if( conjugate )\n                A.MakeReal( j, j );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Trr2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRR2_HPP\n#define ELEM_TRR2_HPP\n\nnamespace elem {\n\n// TODO: Generalize to both left and right diagonals\n\n// A := A + alpha X Y'\ntemplate<typename T>\ninline void\nTrr2\n( UpperOrLower uplo,\n  T alpha, const Matrix<T>& X, const Matrix<T>& Y, Matrix<T>& A, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trr2\");\n        if( X.Width() != 2 || Y.Width() != 2 )\n            LogicError(\"X and Y must be of width 2\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    DEBUG_ONLY(\n        if( X.Height() != m || Y.Height() != n )\n            LogicError(\"X and Y must conform with A\");\n    )\n    const T* XCol0 = X.LockedBuffer(0,0);\n    const T* XCol1 = X.LockedBuffer(0,1);\n    const T* YCol0 = Y.LockedBuffer(0,0);\n    const T* YCol1 = Y.LockedBuffer(0,1);\n    if( uplo == LOWER )\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            const T eta0 = alpha*( conjugate ? Conj(YCol0[j]) : YCol0[j] );\n            const T eta1 = alpha*( conjugate ? Conj(YCol1[j]) : YCol1[j] );\n            T* ACol = A.Buffer( 0, j );\n            for( Int i=j; i<m; ++i )\n                ACol[i] += XCol0[i]*eta0 + XCol1[i]*eta1;\n            if( conjugate )\n                A.MakeReal( j, j ); \n        }\n    }\n    else\n    {\n        for( Int j=0; j<n; ++j )\n        {\n            const T eta0 = alpha*( conjugate ? Conj(YCol0[j]) : YCol0[j] );\n            const T eta1 = alpha*( conjugate ? Conj(YCol1[j]) : YCol1[j] );\n            T* ACol = A.Buffer( 0, j );\n            for( Int i=0; i<=j; ++i )\n                ACol[i] += XCol0[i]*eta0 + XCol1[i]*eta1;\n            if( conjugate )\n                A.MakeReal( j, j ); \n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nTrr2\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& X, const DistMatrix<T>& Y, DistMatrix<T>& A, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trr2\");\n        if( X.Width() != 2 || Y.Width() != 2 )\n            LogicError(\"X and Y must be of width 2\");\n    )\n    const Int mLocal = A.LocalHeight();\n    const Int nLocal = A.LocalWidth();\n    DEBUG_ONLY(\n        if( X.Height() != A.Height() || Y.Height() != A.Width() )\n            LogicError(\"X and Y must conform with A\");\n    )\n    DistMatrix<T,MC,STAR> X_MC_STAR( A.Grid() );\n    DistMatrix<T,MR,STAR> Y_MR_STAR( A.Grid() );\n    X_MC_STAR.AlignWith( A );\n    X_MC_STAR = X;\n    Y_MR_STAR.AlignWith( A );\n    Y_MR_STAR = Y;\n\n    const T* XLocCol0 = X_MC_STAR.LockedBuffer(0,0);\n    const T* XLocCol1 = X_MC_STAR.LockedBuffer(0,1);\n    const T* YLocCol0 = Y_MR_STAR.LockedBuffer(0,0);\n    const T* YLocCol1 = Y_MR_STAR.LockedBuffer(0,1);\n\n    if( uplo == LOWER )\n    {\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int mLocBefore = A.LocalRowOffset(j);\n\n            const T value0 = YLocCol0[jLoc]; \n            const T value1 = YLocCol1[jLoc]; \n            const T eta0 = alpha*( conjugate ? Conj(value0) : value0 );\n            const T eta1 = alpha*( conjugate ? Conj(value1) : value1 );\n            T* ALocCol = A.Buffer(0,jLoc);\n            for( Int iLoc=mLocBefore; iLoc<mLocal; ++iLoc )\n                ALocCol[iLoc] += XLocCol0[iLoc]*eta0 + XLocCol1[iLoc]*eta1;\n            if( conjugate )\n                A.MakeReal( j, j );\n        }\n    }\n    else\n    {\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int mLocBefore = A.LocalRowOffset(j+1);\n\n            const T value0 = YLocCol0[jLoc];\n            const T value1 = YLocCol1[jLoc];\n            const T eta0 = alpha*( conjugate ? Conj(value0) : value0 );\n            const T eta1 = alpha*( conjugate ? Conj(value1) : value1 );\n            T* ALocCol = A.Buffer(0,jLoc);\n            for( Int iLoc=0; iLoc<mLocBefore; ++iLoc )\n                ALocCol[iLoc] += XLocCol0[iLoc]*eta0 + XLocCol1[iLoc]*eta1;\n            if( conjugate )\n                A.MakeReal( j, j );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Trsv/LN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSV_LN_HPP\n#define ELEM_TRSV_LN_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_ZEROS_INC\n#include ELEM_GEMV_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nTrsvLN( UnitOrNonUnit diag, const DistMatrix<F>& L, DistMatrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrsvLN\");\n        if( L.Grid() != x.Grid() )\n            LogicError(\"{L,x} must be distributed over the same grid\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( L.Width() != xLength )\n            LogicError(\"Nonconformal TrsvLN\");\n    )\n    const Int m = L.Height();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    // Matrix views \n    DistMatrix<F> L11(g), L21(g), x1(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), x1_STAR_STAR(g);\n\n    if( x.Width() == 1 )\n    {\n        DistMatrix<F,MR,STAR> x1_MR_STAR(g);\n        DistMatrix<F,MC,STAR> z_MC_STAR(g);\n\n        // Views of z[MC,* ], which will store updates to x\n        DistMatrix<F,MC,STAR> z1_MC_STAR(g), z2_MC_STAR(g);\n\n        z_MC_STAR.AlignWith( L );\n        Zeros( z_MC_STAR, m, 1 );\n\n        for( Int k=0; k<m; k+=bsize )\n        {\n            const Int nb = Min(bsize,m-k);\n\n            LockedViewRange( L11, L, k,    k, k+nb, k+nb );\n            LockedViewRange( L21, L, k+nb, k, m,    k+nb );\n\n            ViewRange( x1, x, k, 0, k+nb, 1 );\n\n            ViewRange( z1_MC_STAR, z_MC_STAR, k,    0, k+nb, 1 );\n            ViewRange( z2_MC_STAR, z_MC_STAR, k+nb, 0, m,    1 );\n\n            if( k != 0 )\n                x1.RowSumScatterUpdate( F(1), z1_MC_STAR );\n\n            x1_STAR_STAR = x1;\n            L11_STAR_STAR = L11;\n            Trsv\n            ( LOWER, NORMAL, diag,\n              L11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix() );\n            x1 = x1_STAR_STAR;\n\n            x1_MR_STAR.AlignWith( L21 );\n            x1_MR_STAR = x1_STAR_STAR;\n            LocalGemv( NORMAL, F(-1), L21, x1_MR_STAR, F(1), z2_MC_STAR );\n        }\n    }\n    else\n    {\n        DistMatrix<F,STAR,MR> x1_STAR_MR(g);\n        DistMatrix<F,MC,  MR> z1(g);\n        DistMatrix<F,MR,  MC> z1_MR_MC(g);\n        DistMatrix<F,STAR,MC> z_STAR_MC(g);\n\n        // Views of z[* ,MC]\n        DistMatrix<F,STAR,MC> z1_STAR_MC(g), z2_STAR_MC(g);\n\n        z_STAR_MC.AlignWith( L );\n        Zeros( z_STAR_MC, 1, m );\n\n        for( Int k=0; k<m; k+=bsize )\n        {\n            const Int nb = Min(bsize,m-k);\n\n            LockedViewRange( L11, L, k,    k, k+nb, k+nb );\n            LockedViewRange( L21, L, k+nb, k, m,    k+nb );\n\n            ViewRange( x1, x, 0, k, 1, k+nb );\n\n            ViewRange( z1_STAR_MC, z_STAR_MC, 0, k,    1, k+nb );\n            ViewRange( z2_STAR_MC, z_STAR_MC, 0, k+nb, 1, m    );\n\n            if( k != 0 )\n            {\n                z1_MR_MC.ColSumScatterFrom( z1_STAR_MC );\n                z1.AlignWith( x1 );\n                z1 = z1_MR_MC;\n                Axpy( F(1), z1, x1 );\n            }\n\n            x1_STAR_STAR = x1;\n            L11_STAR_STAR = L11;\n            Trsv\n            ( LOWER, NORMAL, diag,\n              L11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix() );\n            x1 = x1_STAR_STAR;\n\n            x1_STAR_MR.AlignWith( L21 );\n            x1_STAR_MR = x1_STAR_STAR;\n            LocalGemv( NORMAL, F(-1), L21, x1_STAR_MR, F(1), z2_STAR_MC );\n        }\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRSV_LN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Trsv/LT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSV_LT_HPP\n#define ELEM_TRSV_LT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_ZEROS_INC\n#include ELEM_GEMV_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nTrsvLT\n( Orientation orientation, UnitOrNonUnit diag, \n  const DistMatrix<F>& L, DistMatrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrsvLT\");\n        if( L.Grid() != x.Grid() )\n            LogicError(\"{L,x} must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsvLT expects a (conjugate-)transpose option\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( L.Width() != xLength )\n            LogicError(\"Nonconformal TrsvLT\");\n    )\n    const Int m = L.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( m, bsize );\n    const Grid& g = L.Grid();\n\n    // Matrix views \n    DistMatrix<F> L10(g), L11(g), x1(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), x1_STAR_STAR(g);\n\n    if( x.Width() == 1 )\n    {\n        DistMatrix<F,MC,STAR> x1_MC_STAR(g);\n        DistMatrix<F,MC,MR  > z1(g);\n        DistMatrix<F,MR,MC  > z1_MR_MC(g);\n        DistMatrix<F,MR,STAR> z_MR_STAR(g);\n\n        // Views of z[MR,* ]\n        DistMatrix<F,MR,STAR> z0_MR_STAR(g), z1_MR_STAR(g);\n\n        z_MR_STAR.AlignWith( L );\n        Zeros( z_MR_STAR, m, 1 );\n\n        for( Int k=kLast; k>=0; k-=bsize )\n        {\n            const Int nb = Min(bsize,m-k);\n\n            LockedViewRange( L10, L, k, 0, k+nb, k    );\n            LockedViewRange( L11, L, k, k, k+nb, k+nb );\n\n            ViewRange( x1, x, k, 0, k+nb, 1 );\n\n            ViewRange( z0_MR_STAR, z_MR_STAR, 0, 0, k,    1 );\n            ViewRange( z1_MR_STAR, z_MR_STAR, k, 0, k+nb, 1 );\n\n            if( k+nb != m )\n            {\n                z1_MR_MC.RowSumScatterFrom( z1_MR_STAR );\n                z1.AlignWith( x1 );\n                z1 = z1_MR_MC;\n                Axpy( F(1), z1, x1 );\n            }\n\n            x1_STAR_STAR = x1;\n            L11_STAR_STAR = L11;\n            Trsv\n            ( LOWER, orientation, diag,\n              L11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix() );\n            x1 = x1_STAR_STAR;\n\n            x1_MC_STAR.AlignWith( L10 );\n            x1_MC_STAR = x1_STAR_STAR;\n            LocalGemv( orientation, F(-1), L10, x1_MC_STAR, F(1), z0_MR_STAR );\n        }\n    }\n    else\n    {\n        DistMatrix<F,STAR,MC> x1_STAR_MC(g);\n        DistMatrix<F,STAR,MR> z_STAR_MR(g);\n\n        // Views of z[* ,MR], which will store updates to x\n        DistMatrix<F,STAR,MR> z0_STAR_MR(g), z1_STAR_MR(g);\n\n        z_STAR_MR.AlignWith( L );\n        Zeros( z_STAR_MR, 1, m );\n\n        for( Int k=kLast; k>=0; k-=bsize )\n        {\n            const Int nb = Min(bsize,m-k);\n\n            LockedViewRange( L10, L, k, 0, k+nb, k    );\n            LockedViewRange( L11, L, k, k, k+nb, k+nb );\n\n            ViewRange( x1, x, 0, k, 1, k+nb );\n\n            ViewRange( z0_STAR_MR, z_STAR_MR, 0, 0, 1, k    );\n            ViewRange( z1_STAR_MR, z_STAR_MR, 0, k, 1, k+nb );\n\n            if( k+nb != m )\n                x1.ColSumScatterUpdate( F(1), z1_STAR_MR );\n\n            x1_STAR_STAR = x1;\n            L11_STAR_STAR = L11;\n            Trsv\n            ( LOWER, orientation, diag,\n              L11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix() );\n            x1 = x1_STAR_STAR;\n\n            x1_STAR_MC.AlignWith( L10 );\n            x1_STAR_MC = x1_STAR_STAR;\n            LocalGemv( orientation, F(-1), L10, x1_STAR_MC, F(1), z0_STAR_MR );\n        }\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRSV_LT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Trsv/UN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSV_UN_HPP\n#define ELEM_TRSV_UN_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_ZEROS_INC\n#include ELEM_GEMV_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nTrsvUN( UnitOrNonUnit diag, const DistMatrix<F>& U, DistMatrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrsvUN\");\n        if( U.Grid() != x.Grid() )\n            LogicError(\"{U,x} must be distributed over the same grid\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( U.Width() != xLength )\n            LogicError(\"Nonconformal TrsvUN\");\n    )\n    const Int m = U.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( m, bsize );\n    const Grid& g = U.Grid();\n\n    // Matrix views\n    DistMatrix<F> U01(g), U11(g), x1(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g), x1_STAR_STAR(g);\n\n    if( x.Width() == 1 )\n    {\n        DistMatrix<F,MR,STAR> x1_MR_STAR(g);\n        DistMatrix<F,MC,STAR> z_MC_STAR(g);\n\n        // Views of z[MC,* ], which will store updates to x\n        DistMatrix<F,MC,STAR> z0_MC_STAR(g), z1_MC_STAR(g);\n\n        z_MC_STAR.AlignWith( U );\n        Zeros( z_MC_STAR, m, 1 );\n\n        for( Int k=kLast; k>=0; k-=bsize )\n        {\n            const Int nb = Min(bsize,m-k);\n\n            LockedViewRange( U01, U, 0, k, k,    k+nb );\n            LockedViewRange( U11, U, k, k, k+nb, k+nb );\n\n            ViewRange( x1, x, k, 0, k+nb, 1 );\n\n            ViewRange( z0_MC_STAR, z_MC_STAR, 0, 0, k,    1 );\n            ViewRange( z1_MC_STAR, z_MC_STAR, k, 0, k+nb, 1 );\n\n            if( k+nb != m )\n                x1.RowSumScatterUpdate( F(1), z1_MC_STAR );\n\n            x1_STAR_STAR = x1;\n            U11_STAR_STAR = U11;\n            Trsv\n            ( UPPER, NORMAL, diag,\n              U11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix() );\n            x1 = x1_STAR_STAR;\n\n            x1_MR_STAR.AlignWith( U01 );\n            x1_MR_STAR = x1_STAR_STAR;\n            LocalGemv( NORMAL, F(-1), U01, x1_MR_STAR, F(1), z0_MC_STAR );\n        }\n    }\n    else\n    {\n        DistMatrix<F,STAR,MR> x1_STAR_MR(g);\n        DistMatrix<F,MC,  MR> z1(g);\n        DistMatrix<F,MR,  MC> z1_MR_MC(g);\n        DistMatrix<F,STAR,MC> z_STAR_MC(g);\n\n        // Views of z[* ,MC]\n        DistMatrix<F,STAR,MC> z0_STAR_MC(g), z1_STAR_MC(g);\n\n        z_STAR_MC.AlignWith( U );\n        Zeros( z_STAR_MC, 1, m );\n\n        for( Int k=kLast; k>=0; k-=bsize )\n        {\n            const Int nb = Min(bsize,m-k);\n\n            LockedViewRange( U01, U, 0, k, k,    k+nb );\n            LockedViewRange( U11, U, k, k, k+nb, k+nb );\n\n            ViewRange( x1, x, 0, k, 1, k+nb );\n\n            ViewRange( z0_STAR_MC, z_STAR_MC, 0, 0, 1, k    );\n            ViewRange( z1_STAR_MC, z_STAR_MC, 0, k, 1, k+nb );\n\n            if( k+nb != m )\n            {\n                z1_MR_MC.ColSumScatterFrom( z1_STAR_MC );\n                z1.AlignWith( x1 );\n                z1 = z1_MR_MC;\n                Axpy( F(1), z1, x1 );\n            }\n\n            x1_STAR_STAR = x1;\n            U11_STAR_STAR = U11;\n            Trsv\n            ( UPPER, NORMAL, diag,\n              U11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix() );\n            x1 = x1_STAR_STAR;\n\n            x1_STAR_MR.AlignWith( U01 );\n            x1_STAR_MR = x1_STAR_STAR;\n            LocalGemv( NORMAL, F(-1), U01, x1_STAR_MR, F(1), z0_STAR_MC );\n        }\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRSV_UN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Trsv/UT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSV_UT_HPP\n#define ELEM_TRSV_UT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_ZEROS_INC\n#include ELEM_GEMV_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nTrsvUT\n( Orientation orientation, UnitOrNonUnit diag, \n  const DistMatrix<F>& U, DistMatrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrsvUT\");\n        if( U.Grid() != x.Grid() )\n            LogicError(\"{U,x} must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsvUT expects a (conjugate-)transpose option\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n        if( x.Width() != 1 && x.Height() != 1 )\n            LogicError(\"x must be a vector\");\n        const Int xLength = ( x.Width() == 1 ? x.Height() : x.Width() );\n        if( U.Width() != xLength )\n            LogicError(\"Nonconformal TrsvUT\");\n    )\n    const Int m = U.Height();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    // Matrix views \n    DistMatrix<F> U11(g), U12(g), x1(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g), x1_STAR_STAR(g);\n\n    if( x.Width() == 1 )\n    {\n        DistMatrix<F,MC,  STAR> x1_MC_STAR(g);\n        DistMatrix<F,MC,  MR  > z1(g);\n        DistMatrix<F,MR,  MC  > z1_MR_MC(g);\n        DistMatrix<F,MR,  STAR> z_MR_STAR(g);\n\n        // Views of z[MR,* ]\n        DistMatrix<F,MR,STAR> z1_MR_STAR(g), z2_MR_STAR(g);\n\n        z_MR_STAR.AlignWith( U );\n        Zeros( z_MR_STAR, m, 1 );\n\n        for( Int k=0; k<m; k+=bsize )\n        {\n            const Int nb = Min(bsize,m-k);\n\n            LockedViewRange( U11, U, k, k,    k+nb, k+nb );\n            LockedViewRange( U12, U, k, k+nb, k+nb, m    );\n\n            ViewRange( x1, x, k, 0, k+nb, 1 );\n\n            ViewRange( z1_MR_STAR, z_MR_STAR, k,    0, k+nb, 1 );\n            ViewRange( z2_MR_STAR, z_MR_STAR, k+nb, 0, m,    1 );\n\n            if( k != 0 )\n            {\n                z1_MR_MC.RowSumScatterFrom( z1_MR_STAR );\n                z1.AlignWith( x1 );\n                z1 = z1_MR_MC;\n                Axpy( F(1), z1, x1 );\n            }\n\n            x1_STAR_STAR = x1;\n            U11_STAR_STAR = U11;\n            Trsv\n            ( UPPER, orientation, diag,\n              U11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix() );\n            x1 = x1_STAR_STAR;\n\n            x1_MC_STAR.AlignWith( U12 );\n            x1_MC_STAR = x1_STAR_STAR;\n            LocalGemv( orientation, F(-1), U12, x1_MC_STAR, F(1), z2_MR_STAR );\n        }\n    }\n    else\n    {\n        DistMatrix<F,STAR,MC> x1_STAR_MC(g);\n        DistMatrix<F,STAR,MR> z_STAR_MR(g);\n\n        // Views of z[* ,MR]\n        DistMatrix<F,STAR,MR> z1_STAR_MR(g), z2_STAR_MR(g);\n\n        z_STAR_MR.AlignWith( U );\n        Zeros( z_STAR_MR, 1, m );\n\n        for( Int k=0; k<m; k+=bsize )\n        {\n            const Int nb = Min(bsize,m-k);\n\n            LockedViewRange( U11, U, k, k,    k+nb, k+nb );\n            LockedViewRange( U12, U, k, k+nb, k+nb, m    );\n\n            ViewRange( x1, x, 0, k, 1, k+nb );\n\n            ViewRange( z1_STAR_MR, z_STAR_MR, 0, k,    1, k+nb );\n            ViewRange( z2_STAR_MR, z_STAR_MR, 0, k+nb, 1, m    );\n\n            if( k != 0 )\n                x1.ColSumScatterUpdate( F(1), z1_STAR_MR );\n\n            x1_STAR_STAR = x1;\n            U11_STAR_STAR = U11;\n            Trsv\n            ( UPPER, orientation, diag,\n              U11_STAR_STAR.LockedMatrix(), x1_STAR_STAR.Matrix() );\n            x1 = x1_STAR_STAR;\n\n            x1_STAR_MC.AlignWith( U12 );\n            x1_STAR_MC = x1_STAR_STAR;\n            LocalGemv( orientation, F(-1), U12, x1_STAR_MC, F(1), z2_STAR_MR );\n        }\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRSV_UT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2/Trsv.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSV_HPP\n#define ELEM_TRSV_HPP\n\n#include \"./Trsv/LN.hpp\"\n#include \"./Trsv/LT.hpp\"\n#include \"./Trsv/UN.hpp\"\n#include \"./Trsv/UT.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nTrsv\n( UpperOrLower uplo, Orientation orientation, UnitOrNonUnit diag,\n  const Matrix<F>& A, Matrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trsv\");\n        if( x.Height() != 1 && x.Width() != 1 )\n            LogicError(\"x must be a vector\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        const Int xLength = ( x.Width()==1 ? x.Height() : x.Width() );\n        if( xLength != A.Height() )\n            LogicError(\"x must conform with A\");\n    )\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const char transChar = OrientationToChar( orientation );\n    const char diagChar = UnitOrNonUnitToChar( diag );\n    const Int m = A.Height();\n    const Int incx = ( x.Width()==1 ? 1 : x.LDim() );\n    blas::Trsv\n    ( uploChar, transChar, diagChar, m,\n      A.LockedBuffer(), A.LDim(), x.Buffer(), incx );\n}\n\ntemplate<typename F>\ninline void\nTrsv\n( UpperOrLower uplo,\n  Orientation orientation,\n  UnitOrNonUnit diag,\n  const DistMatrix<F>& A,\n        DistMatrix<F>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trsv\"))\n    if( uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            internal::TrsvLN( diag, A, x );\n        else\n            internal::TrsvLT( orientation, diag, A, x );\n    }\n    else\n    {\n        if( orientation == NORMAL )\n            internal::TrsvUN( diag, A, x );\n        else\n            internal::TrsvUT( orientation, diag, A, x );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRSV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLAS2_HPP\n#define ELEM_BLAS2_HPP\n\n#include \"./level2/Gemv.hpp\"\n#include \"./level2/Ger.hpp\"\n#include \"./level2/Geru.hpp\"\n#include \"./level2/Hemv.hpp\"\n#include \"./level2/Her.hpp\"\n#include \"./level2/Her2.hpp\"\n#include \"./level2/QuasiTrsv.hpp\"\n#include \"./level2/Symv.hpp\"\n#include \"./level2/Syr.hpp\"\n#include \"./level2/Syr2.hpp\"\n#include \"./level2/Trmv.hpp\"\n#include \"./level2/Trr.hpp\"\n#include \"./level2/Trr2.hpp\"\n#include \"./level2/Trsv.hpp\"\n\n#endif // ifndef ELEM_BLAS2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Gemm/NN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GEMM_NN_HPP\n#define ELEM_GEMM_NN_HPP\n\n#include ELEM_SCALE_INC\n\nnamespace elem {\nnamespace gemm {\n\n// Cannon's algorithm\ntemplate<typename T>\ninline void\nCannon_NN\n( T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::Cannon_NN\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( A.Height() != C.Height() || B.Width() != C.Width() ||\n            A.Width() != B.Height() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n    if( g.Height() != g.Width() )\n        LogicError(\"Process grid must be square for Cannon's\");\n    if( C.ColAlign() != A.ColAlign() || C.RowAlign() != B.RowAlign() )\n        LogicError(\"C is not properly aligned\");\n\n    const Int row = g.Row();\n    const Int col = g.Col();\n    const Int pSqrt = g.Height();\n    mpi::Comm rowComm = g.RowComm();\n    mpi::Comm colComm = g.ColComm(); \n    if( A.Width() % pSqrt != 0 )\n        LogicError(\"For now, width(A) must be integer multiple of sqrt(p)\");\n\n    // Begin by scaling our local portion of C\n    Scale( beta, C );\n\n    // Load the initial A and B packages (may want to transpose B...)\n    const Int localHeightA = A.LocalHeight();\n    const Int localHeightB = B.LocalHeight();\n    const Int localWidthA = A.LocalWidth();\n    const Int localWidthB = B.LocalWidth();\n    Matrix<T> pkgA(localHeightA,localWidthA,localHeightA), \n              pkgB(localHeightB,localWidthB,localHeightB);\n    for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n        MemCopy\n        ( pkgA.Buffer(0,jLoc), A.LockedBuffer(0,jLoc), localHeightA );\n    for( Int jLoc=0; jLoc<localWidthB; ++jLoc )\n        MemCopy\n        ( pkgB.Buffer(0,jLoc), B.LockedBuffer(0,jLoc), localHeightB );\n\n    // Perform the initial circular shifts so that our A and B packages align\n    const Int rowShiftA = A.RowShift();\n    const Int colShiftB = B.ColShift();\n    const Int leftInitA  = Mod(col-colShiftB,pSqrt);\n    const Int rightInitA = Mod(col+colShiftB,pSqrt);\n    const Int aboveInitB = Mod(row-rowShiftA,pSqrt);\n    const Int belowInitB = Mod(row+rowShiftA,pSqrt);\n    const Int pkgSizeA = localHeightA*localWidthA;\n    const Int pkgSizeB = localHeightB*localWidthB;\n    mpi::SendRecv( pkgA.Buffer(), pkgSizeA, leftInitA, rightInitA, rowComm );\n    mpi::SendRecv( pkgB.Buffer(), pkgSizeB, aboveInitB, belowInitB, colComm );\n\n    // Now begin the data flow\n    const Int aboveRow = Mod(row-1,pSqrt);\n    const Int belowRow = Mod(row+1,pSqrt);\n    const Int leftCol  = Mod(col-1,pSqrt);\n    const Int rightCol = Mod(col+1,pSqrt);\n    for( Int q=0; q<pSqrt; ++q )\n    {\n        Gemm( NORMAL, NORMAL, alpha, pkgA, pkgB, T(1), C.Matrix() );\n        if( q != pSqrt-1 )\n        {\n            mpi::SendRecv\n            ( pkgA.Buffer(), pkgSizeA, leftCol, rightCol, rowComm );\n            mpi::SendRecv\n            ( pkgB.Buffer(), pkgSizeB, aboveRow, belowRow, colComm );\n        }\n    }\n}\n\n// Normal Normal Gemm that avoids communicating the matrix A\ntemplate<typename T>\ninline void\nSUMMA_NNA\n( T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_NNA\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( A.Height() != C.Height() || B.Width() != C.Width() ||\n            A.Width() != B.Height() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n    DistMatrix<T> CL(g), CR(g),\n                  C0(g), C1(g), C2(g);\n\n    // Temporary distributions\n    DistMatrix<T,VR,STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR> B1Trans_STAR_MR(g);\n    DistMatrix<T,MC,STAR> D1_MC_STAR(g);\n\n    B1_VR_STAR.AlignWith( A );\n    B1Trans_STAR_MR.AlignWith( A );\n    D1_MC_STAR.AlignWith( A );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionRight( B, BL, BR, 0 );\n    PartitionRight( C, CL, CR, 0 );\n    while( BR.Width() > 0 )\n    {\n        LockedRepartitionRight\n        ( BL, /**/     BR,\n          B0, /**/ B1, B2 );\n\n        RepartitionRight\n        ( CL, /**/     CR,\n          C0, /**/ C1, C2 );\n\n        //--------------------------------------------------------------------//\n        B1_VR_STAR = B1;\n        B1_VR_STAR.TransposePartialColAllGather( B1Trans_STAR_MR );\n\n        // D1[MC,*] := alpha A[MC,MR] B1[MR,*]\n        LocalGemm( NORMAL, TRANSPOSE, alpha, A, B1Trans_STAR_MR, D1_MC_STAR );\n\n        // C1[MC,MR] += scattered result of D1[MC,*] summed over grid rows\n        C1.RowSumScatterUpdate( T(1), D1_MC_STAR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n\n        SlidePartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 );\n    }\n}\n\n// Normal Normal Gemm that avoids communicating the matrix B\ntemplate<typename T>\ninline void \nSUMMA_NNB\n( T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_NNB\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n        if( A.Height() != C.Height() || B.Width() != C.Width() ||\n            A.Width() != B.Height() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n\n    // Temporary distributions\n    DistMatrix<T,STAR,MC> A1_STAR_MC(g);\n    DistMatrix<T,MR,STAR> D1Trans_MR_STAR(g);\n\n    A1_STAR_MC.AlignWith( B );\n    D1Trans_MR_STAR.AlignWith( B );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionDown\n    ( A, AT,\n         AB, 0 );\n    PartitionDown\n    ( C, CT,\n         CB, 0 );\n    while( AB.Height() > 0 )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n\n        RepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n\n        //--------------------------------------------------------------------//\n        A1_STAR_MC = A1; // A1[*,MC] <- A1[MC,MR]\n\n        // D1^T[MR,* ] := alpha B^T[MR,MC] A1^T[MC,* ]\n        LocalGemm\n        ( TRANSPOSE, TRANSPOSE, alpha, B, A1_STAR_MC, D1Trans_MR_STAR );\n\n        C1.TransposeColSumScatterUpdate( T(1), D1Trans_MR_STAR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n \n        SlidePartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n    }\n}                     \n\n// Normal Normal Gemm that avoids communicating the matrix C\ntemplate<typename T>\ninline void \nSUMMA_NNC\n( T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_NNC\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n        if( A.Height() != C.Height() || B.Width() != C.Width() ||\n            A.Width() != B.Height() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);         \n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,STAR> A1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> B1Trans_MR_STAR(g); \n\n    A1_MC_STAR.AlignWith( C );\n    B1Trans_MR_STAR.AlignWith( C );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionRight( A, AL, AR, 0 ); \n    LockedPartitionDown\n    ( B, BT, \n         BB, 0 ); \n    while( AR.Width() > 0 )\n    {\n        LockedRepartitionRight( AL, /**/ AR,\n                                A0, /**/ A1, A2 );\n\n        LockedRepartitionDown( BT,  B0,\n                              /**/ /**/\n                                    B1, \n                               BB,  B2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1; \n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n\n        // C[MC,MR] += alpha A1[MC,*] (B1^T[MR,*])^T\n        //           = alpha A1[MC,*] B1[*,MR]\n        LocalGemm\n        ( NORMAL, TRANSPOSE, alpha, A1_MC_STAR, B1Trans_MR_STAR, T(1), C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight( AL,     /**/ AR,\n                                   A0, A1, /**/ A2 );\n\n        SlideLockedPartitionDown( BT,  B0,\n                                       B1,\n                                 /**/ /**/\n                                  BB,  B2 );\n    }\n}\n\n// Normal Normal Gemm for panel-panel dot products\ntemplate<typename T>\ninline void \nSUMMA_NNDot\n( T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_NNDot\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( A.Height() != C.Height() || B.Width() != C.Width() ||\n            A.Width() != B.Height() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    if( A.Height() > B.Width() )\n    {\n        // Matrix views\n        DistMatrix<T> AT(g), AB(g),\n                      A0(g), A1(g), A2(g);         \n        DistMatrix<T> BL(g),  B0(g),\n                      BR(g),  B1(g),\n                              B2(g);\n        DistMatrix<T> CT(g), C0(g), C1L(g), C1R(g),\n                      CB(g), C1(g), C10(g), C11(g), C12(g),\n                             C2(g);\n\n        // Temporary distributions\n        DistMatrix<T,STAR,VC> A1_STAR_VC(g);\n        DistMatrix<T,VC,STAR> B1_VC_STAR(g);\n        DistMatrix<T,STAR,STAR> C11_STAR_STAR(g);\n\n        // Star the algorithm\n        Scale( beta, C );\n        LockedPartitionDown\n        ( A, AT,\n             AB, 0 );\n        PartitionDown\n        ( C, CT,\n             CB, 0 );\n        while( AB.Height() > 0 )\n        {\n            LockedRepartitionDown\n            ( AT,  A0,\n             /**/ /**/\n                   A1,\n              AB,  A2 );\n\n            RepartitionDown\n            ( CT,  C0,\n             /**/ /**/\n                   C1,\n              CB,  C2 );\n\n            A1_STAR_VC = A1; \n            B1_VC_STAR.AlignWith( A1_STAR_VC );\n\n            LockedPartitionRight( B, BL, BR, 0 );\n            PartitionRight( C1, C1L, C1R, 0 );\n            while( BR.Width() > 0 )\n            {\n                LockedRepartitionRight\n                ( BL, /**/ BR,\n                  B0, /**/ B1, B2 );\n\n                RepartitionRight\n                ( C1L, /**/ C1R,\n                  C10, /**/ C11, C12 );\n\n                //------------------------------------------------------------//\n                B1_VC_STAR = B1;\n                LocalGemm\n                ( NORMAL, NORMAL, \n                  alpha, A1_STAR_VC, B1_VC_STAR, C11_STAR_STAR );\n                C11.SumScatterUpdate( T(1), C11_STAR_STAR );\n                //------------------------------------------------------------//\n\n                SlideLockedPartitionRight\n                ( BL,     /**/ BR,\n                  B0, B1, /**/ B2 );\n\n                SlidePartitionRight\n                ( C1L,      /**/ C1R,\n                  C10, C11, /**/ C12 );\n            }\n\n            SlideLockedPartitionDown\n            ( AT,  A0,\n                   A1,\n             /**/ /**/\n              AB,  A2 );\n\n            SlidePartitionDown\n            ( CT,  C0,\n                   C1,\n             /**/ /**/\n              CB,  C2 );\n        }\n    }\n    else\n    {\n        // Matrix views\n        DistMatrix<T> AT(g), AB(g),\n                      A0(g), A1(g), A2(g);         \n        DistMatrix<T> BL(g),  B0(g),\n                      BR(g),  B1(g),\n                              B2(g);\n        DistMatrix<T> \n            CL(g), CR(g),         C1T(g),  C01(g),\n            C0(g), C1(g), C2(g),  C1B(g),  C11(g),\n                                           C21(g);\n\n        // Temporary distributions\n        DistMatrix<T,STAR,VR> A1_STAR_VR(g);\n        DistMatrix<T,VR,STAR> B1_VR_STAR(g);\n        DistMatrix<T,STAR,STAR> C11_STAR_STAR(g);\n\n        // Star the algorithm\n        Scale( beta, C );\n        LockedPartitionRight( B, BL, BR, 0 );\n        PartitionRight( C, CL, CR, 0 );\n        while( BR.Width() > 0 )\n        {\n            LockedRepartitionRight\n            ( BL, /**/ BR,\n              B0, /**/ B1, B2 );\n\n            RepartitionRight\n            ( CL, /**/ CR,\n              C0, /**/ C1, C2 );\n\n            B1_VR_STAR = B1;\n            A1_STAR_VR.AlignWith( B1_VR_STAR );\n\n            LockedPartitionDown\n            ( A, AT,\n                 AB, 0 );\n            PartitionDown\n            ( C1, C1T,\n                  C1B, 0 );\n            while( AB.Height() > 0 )\n            {\n                LockedRepartitionDown\n                ( AT,  A0,\n                 /**/ /**/\n                       A1,\n                  AB,  A2 );\n\n                RepartitionDown\n                ( C1T,  C01,\n                 /***/ /***/\n                        C11,\n                  C1B,  C21 );\n\n                //------------------------------------------------------------//\n                A1_STAR_VR = A1;\n                LocalGemm\n                ( NORMAL, NORMAL, \n                  alpha, A1_STAR_VR, B1_VR_STAR, C11_STAR_STAR );\n                C11.SumScatterUpdate( T(1), C11_STAR_STAR );\n                //------------------------------------------------------------//\n\n                SlideLockedPartitionDown\n                ( AT,  A0,\n                       A1,\n                 /**/ /**/\n                  AB,  A2 );\n\n                SlidePartitionDown\n                ( C1T,  C01,\n                        C11,\n                 /***/ /***/\n                  C1B,  C21 );\n            }\n\n            SlideLockedPartitionRight\n            ( BL,     /**/ BR,\n              B0, B1, /**/ B2 ); \n\n            SlidePartitionRight\n            ( CL,     /**/ CR,\n              C0, C1, /**/ C2 );\n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nSUMMA_NN\n( T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"gemm::SUMMA_NN\"))\n    const Int m = C.Height();\n    const Int n = C.Width();\n    const Int k = A.Width();\n    const double weightTowardsC = 2.;\n    const double weightAwayFromDot = 10.;\n\n    if( weightAwayFromDot*m <= k && weightAwayFromDot*n <= k )\n        SUMMA_NNDot( alpha, A, B, beta, C );\n    else if( m <= n && weightTowardsC*m <= k )\n        SUMMA_NNB( alpha, A, B, beta, C );    \n    else if( n <= m && weightTowardsC*n <= k )\n        SUMMA_NNA( alpha, A, B, beta, C );\n    else\n        SUMMA_NNC( alpha, A, B, beta, C );\n}\n\n} // namespace gemm\n} // namespace elem\n\n#endif // ifndef ELEM_GEMM_NN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Gemm/NT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GEMM_NT_HPP\n#define ELEM_GEMM_NT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n\nnamespace elem {\nnamespace gemm {\n\n// Normal Transpose Gemm that avoids communicating the matrix A\ntemplate<typename T>\ninline void\nSUMMA_NTA\n( Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_NTA\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( orientationOfB == NORMAL )\n            LogicError(\"B must be (Conjugate)Transposed\");\n        if( A.Height() != C.Height() || B.Height() != C.Width() ||\n            A.Width() != B.Width() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n    const bool conjugate = ( orientationOfB == ADJOINT );\n\n    // Matrix views\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n    DistMatrix<T> CL(g), CR(g),\n                  C0(g), C1(g), C2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MR,STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,MC,STAR> D1_MC_STAR(g);\n\n    B1Trans_MR_STAR.AlignWith( A );\n    D1_MC_STAR.AlignWith( A );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    PartitionRight( C, CL, CR, 0 );\n    while( BB.Height() > 0 )\n    {\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        RepartitionRight\n        ( CL, /**/     CR,\n          C0, /**/ C1, C2 );\n\n        //--------------------------------------------------------------------//\n        B1.TransposeColAllGather( B1Trans_MR_STAR, conjugate );\n\n        // C1[MC,*] := alpha A[MC,MR] (B1^[T/H])[MR,*]\n        LocalGemm( NORMAL, NORMAL, alpha, A, B1Trans_MR_STAR, D1_MC_STAR );\n\n        // C1[MC,MR] += scattered result of D1[MC,*] summed over grid rows\n        C1.RowSumScatterUpdate( T(1), D1_MC_STAR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n\n        SlidePartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 );\n    }\n}\n\n// Normal Transpose Gemm that avoids communicating the matrix B\ntemplate<typename T>\ninline void\nSUMMA_NTB\n( Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_NTB\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( orientationOfB == NORMAL )\n            LogicError(\"B must be (Conjugate)Transposed\");\n        if( A.Height() != C.Height() ||\n            B.Height() != C.Width() ||\n            A.Width() != B.Width() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MR,STAR> A1Trans_MR_STAR(g);\n    DistMatrix<T,STAR,MC> D1_STAR_MC(g);\n    DistMatrix<T,MR,MC> D1_MR_MC(g);\n    DistMatrix<T> D1(g);\n\n    A1Trans_MR_STAR.AlignWith( B );\n    D1_STAR_MC.AlignWith( B );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionDown\n    ( A, AT,\n         AB, 0 );\n    PartitionDown\n    ( C, CT,\n         CB, 0 );\n    while( AB.Height() > 0 )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n\n        RepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n\n        D1.AlignWith( C1 );\n        //--------------------------------------------------------------------//\n        A1.TransposeColAllGather( A1Trans_MR_STAR );\n\n        // D1[*,MC] := alpha A1[*,MR] (B[MC,MR])^T\n        //           = alpha (A1^T)[MR,*] (B^T)[MR,MC]\n        LocalGemm\n        ( TRANSPOSE, orientationOfB, alpha, A1Trans_MR_STAR, B, D1_STAR_MC );\n\n        // C1[MC,MR] += scattered & transposed D1[*,MC] summed over grid rows\n        D1_MR_MC.ColSumScatterFrom( D1_STAR_MC );\n        D1 = D1_MR_MC; \n        Axpy( T(1), D1, C1 );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n    \n        SlidePartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n    }\n}\n\n// Normal Transpose Gemm that avoids communicating the matrix C\ntemplate<typename T>\ninline void\nSUMMA_NTC\n( Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_NTC\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( orientationOfB == NORMAL )\n            LogicError(\"B must be (Conjugate)Transposed\");\n        if( A.Height() != C.Height() ||\n            B.Height() != C.Width() ||\n            A.Width() != B.Width() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n    const bool conjugate = ( orientationOfB == ADJOINT );\n\n    // Matrix views\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,STAR> A1_MC_STAR(g);\n    DistMatrix<T,VR,STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR> B1Trans_STAR_MR(g);\n\n    A1_MC_STAR.AlignWith( C );\n    B1_VR_STAR.AlignWith( C );\n    B1Trans_STAR_MR.AlignWith( C );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    while( AR.Width() > 0 )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );    \n\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1; // A1[MC,*] <- A1[MC,MR]\n        B1_VR_STAR = B1;\n        B1_VR_STAR.TransposePartialColAllGather( B1Trans_STAR_MR, conjugate );\n\n        // C[MC,MR] += alpha A1[MC,*] (B1[MR,*])^T\n        LocalGemm\n        ( NORMAL, NORMAL, alpha, A1_MC_STAR, B1Trans_STAR_MR, T(1), C );\n        //--------------------------------------------------------------------//\n \n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSUMMA_NT\n( Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta, DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"gemm::SUMMA_NT\"))\n    const Int m = C.Height();\n    const Int n = C.Width();\n    const Int k = A.Width();\n    const double weightTowardsC = 2.;\n\n    if( m <= n && weightTowardsC*m <= k )\n        SUMMA_NTB( orientationOfB, alpha, A, B, beta, C );\n    else if( n <= m && weightTowardsC*n <= k )\n        SUMMA_NTA( orientationOfB, alpha, A, B, beta, C );\n    else\n        SUMMA_NTC( orientationOfB, alpha, A, B, beta, C );\n}\n\n} // namespace gemm\n} // namespace elem\n\n#endif // ifndef ELEM_GEMM_NT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Gemm/TN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GEMM_TN_HPP\n#define ELEM_GEMM_TN_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n\nnamespace elem {\nnamespace gemm {\n\n// Transpose Normal Gemm that avoids communicating the matrix A\ntemplate<typename T> \ninline void\nSUMMA_TNA\n( Orientation orientationOfA,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_TNA\");    \n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( orientationOfA == NORMAL )\n            LogicError(\"A must be (Conjugate)Transposed\");\n        if( A.Width() != C.Height() || B.Width() != C.Width() ||\n            A.Height() != B.Height() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n    DistMatrix<T> CL(g), CR(g),\n                  C0(g), C1(g), C2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,STAR> B1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> D1_MR_STAR(g);\n    DistMatrix<T,MR,MC  > D1_MR_MC(g);\n    DistMatrix<T> D1(g);\n\n    B1_MC_STAR.AlignWith( A );\n    D1_MR_STAR.AlignWith( A );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionRight( B, BL, BR, 0 );\n    PartitionRight( C, CL, CR, 0 );\n    while( BR.Width() > 0 )\n    {\n        LockedRepartitionRight\n        ( BL, /**/     BR,\n          B0, /**/ B1, B2 );\n \n        RepartitionRight\n        ( CL, /**/     CR,\n          C0, /**/ C1, C2 );\n\n        D1.AlignWith( C1 );\n        //--------------------------------------------------------------------//\n        B1_MC_STAR = B1; // B1[MC,*] <- B1[MC,MR]\n\n        // D1[MR,*] := alpha (A1[MC,MR])^T B1[MC,*]\n        //           = alpha (A1^T)[MR,MC] B1[MC,*]\n        LocalGemm( orientationOfA, NORMAL, alpha, A, B1_MC_STAR, D1_MR_STAR );\n\n        // C1[MC,MR] += scattered & transposed D1[MR,*] summed over grid cols\n        D1_MR_MC.RowSumScatterFrom( D1_MR_STAR );\n        D1 = D1_MR_MC; \n        Axpy( T(1), D1, C1 );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n\n        SlidePartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 );\n    }\n}\n\n// Transpose Normal Gemm that avoids communicating the matrix B\ntemplate<typename T> \ninline void\nSUMMA_TNB\n( Orientation orientationOfA,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_TNB\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( orientationOfA == NORMAL )\n            LogicError(\"A must be (Conjugate)Transposed\");\n        if( A.Width() != C.Height() || B.Width() != C.Width() ||\n            A.Height() != B.Height() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,STAR> A1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> D1Trans_MR_STAR(g);\n\n    A1_MC_STAR.AlignWith( B );\n    D1Trans_MR_STAR.AlignWith( B );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionRight( A, AL, AR, 0 );\n    PartitionDown\n    ( C, CT,\n         CB, 0 );\n    while( AR.Width() > 0 )\n    {\n        LockedRepartitionRight\n        ( AL, /**/     AR,\n          A0, /**/ A1, A2 );\n\n        RepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1; // A1[MC,*] <- A1[MC,MR]\n\n        // D1[*,MR] := alpha (A1[MC,*])^[T/H] B[MC,MR]\n        //           = alpha (A1^[T/H])[*,MC] B[MC,MR]\n        if( orientationOfA == ADJOINT )\n        {\n            LocalGemm\n            ( ADJOINT, NORMAL, \n              Conj(alpha), B, A1_MC_STAR, D1Trans_MR_STAR );\n            C1.AdjointColSumScatterUpdate( T(1), D1Trans_MR_STAR );\n        }\n        else\n        {\n            LocalGemm\n            ( TRANSPOSE, NORMAL, alpha, B, A1_MC_STAR, D1Trans_MR_STAR );\n            C1.TransposeColSumScatterUpdate( T(1), D1Trans_MR_STAR );\n        }\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n\n        SlidePartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n    }\n}\n\n// Transpose Normal Gemm that avoids communicating the matrix C\ntemplate<typename T> \ninline void\nSUMMA_TNC\n( Orientation orientationOfA,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_TNC\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( orientationOfA == NORMAL )\n            LogicError(\"A must be (Conjugate)Transposed\");\n        if( A.Width() != C.Height() || B.Width() != C.Width() ||\n            A.Height() != B.Height() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    // Temporary distributions\n    DistMatrix<T,STAR,MC> A1_STAR_MC(g);\n    DistMatrix<T,MR,STAR> B1Trans_MR_STAR(g);\n\n    A1_STAR_MC.AlignWith( C );\n    B1Trans_MR_STAR.AlignWith( C );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionDown\n    ( A, AT,\n         AB, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    while( AB.Height() > 0 )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        //--------------------------------------------------------------------//\n        A1_STAR_MC = A1; \n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n\n        // C[MC,MR] += alpha (A1[*,MC])^T B1[*,MR]\n        //           = alpha (A1^T)[MC,*] B1[*,MR]\n        LocalGemm\n        ( orientationOfA, TRANSPOSE, \n          alpha, A1_STAR_MC, B1Trans_MR_STAR, T(1), C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSUMMA_TN\n( Orientation orientationOfA,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"gemm::SUMMA_TN\"))\n    const Int m = C.Height();\n    const Int n = C.Width();\n    const Int k = A.Height();\n    const double weightTowardsC = 2.;\n\n    if( m <= n && weightTowardsC*m <= k )\n        SUMMA_TNB( orientationOfA, alpha, A, B, beta, C );\n    else if( n <= m && weightTowardsC*n <= k )\n        SUMMA_TNA( orientationOfA, alpha, A, B, beta, C );\n    else\n        SUMMA_TNC( orientationOfA, alpha, A, B, beta, C );\n}\n\n} // namespace gemm\n} // namespace elem\n\n#endif // ifndef ELEM_GEMM_TN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Gemm/TT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GEMM_TT_HPP\n#define ELEM_GEMM_TT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n\nnamespace elem {\nnamespace gemm {\n\n// Transpose Transpose Gemm that avoids communicating the matrix A\ntemplate<typename T>\ninline void\nSUMMA_TTA\n( Orientation orientationOfA, \n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_TTA\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( orientationOfA == NORMAL || orientationOfB == NORMAL )\n            LogicError(\"A and B must be (Conjugate)Transposed\");\n        if( A.Width() != C.Height() || B.Height() != C.Width() ||\n            A.Height() != B.Width() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n    DistMatrix<T> CL(g), CR(g),\n                  C0(g), C1(g), C2(g);\n\n    // Temporary distributions\n    DistMatrix<T,STAR,MC  > B1_STAR_MC(g);\n    DistMatrix<T,MR,  STAR> D1_MR_STAR(g);\n    DistMatrix<T,MR,  MC  > D1_MR_MC(g);\n    DistMatrix<T> D1(g);\n\n    B1_STAR_MC.AlignWith( A ); \n    D1_MR_STAR.AlignWith( A );  \n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    PartitionRight( C, CL, CR, 0 );\n    while( BB.Height() > 0 )\n    {\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        RepartitionRight\n        ( CL, /**/     CR,\n          C0, /**/ C1, C2 );\n\n        D1.AlignWith( C1 );  \n        //--------------------------------------------------------------------//\n        B1_STAR_MC = B1; // B1[*,MC] <- B1[MC,MR]\n\n        // D1[MR,*] := alpha (A[MC,MR])^T (B1[*,MC])^T\n        //           = alpha (A^T)[MR,MC] (B1^T)[MC,*]\n        LocalGemm\n        ( orientationOfA, orientationOfB, alpha, A, B1_STAR_MC, D1_MR_STAR );\n\n        // C1[MC,MR] += scattered & transposed D1[MR,*] summed over grid cols\n        D1_MR_MC.RowSumScatterFrom( D1_MR_STAR );\n        D1 = D1_MR_MC; \n        Axpy( T(1), D1, C1 );\n        //--------------------------------------------------------------------//\n        \n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n\n        SlidePartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 ); \n    }\n}\n\n// Transpose Transpose Gemm that avoids communicating the matrix B\ntemplate<typename T>\ninline void\nSUMMA_TTB\n( Orientation orientationOfA, \n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_TTB\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( orientationOfA == NORMAL || orientationOfB == NORMAL )\n            LogicError(\"A and B must be (Conjugate)Transposed\");\n        if( A.Width() != C.Height() || B.Height() != C.Width() ||\n            A.Height() != B.Width() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n\n    // Temporary distributions\n    DistMatrix<T,VR,  STAR> A1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > A1Trans_STAR_MR(g);\n    DistMatrix<T,STAR,MC  > D1_STAR_MC(g);\n    DistMatrix<T,MR,  MC  > D1_MR_MC(g);\n    DistMatrix<T> D1(g);\n\n    A1_VR_STAR.AlignWith( B );\n    A1Trans_STAR_MR.AlignWith( B );\n    D1_STAR_MC.AlignWith( B );\n\n    // Start the algorithm \n    Scale( beta, C );\n    LockedPartitionRight( A, AL, AR, 0 );\n    PartitionDown\n    ( C, CT,\n         CB, 0 );\n    while( AR.Width() > 0 )\n    {\n        LockedRepartitionRight\n        ( AL, /**/     AR,\n          A0, /**/ A1, A2 );\n \n        RepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n\n        D1.AlignWith( C1 );\n        //--------------------------------------------------------------------//\n        A1_VR_STAR = A1;\n        A1_VR_STAR.TransposePartialColAllGather\n        ( A1Trans_STAR_MR, (orientationOfA==ADJOINT) );\n \n        // D1[*,MC] := alpha (A1[MR,*])^[T/H] (B[MC,MR])^[T/H]\n        //           = alpha (A1^[T/H])[*,MR] (B^[T/H])[MR,MC]\n        LocalGemm\n        ( NORMAL, orientationOfB, alpha, A1Trans_STAR_MR, B, D1_STAR_MC );\n\n        // C1[MC,MR] += scattered & transposed D1[*,MC] summed over grid rows\n        D1_MR_MC.ColSumScatterFrom( D1_STAR_MC );\n        D1 = D1_MR_MC; \n        Axpy( T(1), D1, C1 );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n\n        SlidePartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n    }\n}\n\n// Transpose Transpose Gemm that avoids communicating the matrix C\ntemplate<typename T>\ninline void\nSUMMA_TTC\n( Orientation orientationOfA, \n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"gemm::SUMMA_TTC\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must have the same grid\");\n        if( orientationOfA == NORMAL || orientationOfB == NORMAL )\n            LogicError(\"A and B must be (Conjugate)Transposed\");\n        if( A.Width() != C.Height() || B.Height() != C.Width() ||\n            A.Height() != B.Width() )\n            LogicError\n            (\"Nonconformal matrices:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n\n    // Temporary distributions\n    DistMatrix<T,STAR,MC  > A1_STAR_MC(g);\n    DistMatrix<T,VR,  STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > B1Trans_STAR_MR(g);\n\n    A1_STAR_MC.AlignWith( C );\n    B1_VR_STAR.AlignWith( C );\n    B1Trans_STAR_MR.AlignWith( C );\n    \n    // Start the algorithm    \n    Scale( beta, C );\n    LockedPartitionDown( A, AT, AB, 0 ); \n    LockedPartitionRight( B, BL, BR, 0 );\n    while( AB.Height() > 0 )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n\n        LockedRepartitionRight\n        ( BL, /**/     BR,\n          B0, /**/ B1, B2 );\n\n        //--------------------------------------------------------------------//\n        A1_STAR_MC = A1; \n        B1_VR_STAR = B1;\n        B1_VR_STAR.TransposePartialColAllGather\n        ( B1Trans_STAR_MR, (orientationOfB==ADJOINT) );\n\n        // C[MC,MR] += alpha (A1[*,MC])^[T/H] (B1[MR,*])^[T/H]\n        //           = alpha (A1^[T/H])[MC,*] (B1^[T/H])[*,MR]\n        LocalGemm\n        ( orientationOfA, NORMAL, \n          alpha, A1_STAR_MC, B1Trans_STAR_MR, T(1), C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSUMMA_TT\n( Orientation orientationOfA, \n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"gemm::SUMMA_TT\"))\n    const Int m = C.Height();\n    const Int n = C.Width();\n    const Int k = A.Height();\n    const double weightTowardsC = 2.;\n\n    if( m <= n && weightTowardsC*m <= k )\n        SUMMA_TTB( orientationOfA, orientationOfB, alpha, A, B, beta, C );\n    else if( n <= m && weightTowardsC*n <= k )\n        SUMMA_TTA( orientationOfA, orientationOfB, alpha, A, B, beta, C );\n    else\n        SUMMA_TTC( orientationOfA, orientationOfB, alpha, A, B, beta, C );\n}\n\n} // namespace gemm\n} // namespace elem\n\n#endif // ifndef ELEM_GEMM_TT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Gemm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GEMM_HPP\n#define ELEM_GEMM_HPP\n\n#include ELEM_SCALE_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\ntemplate<typename T,Dist AColDist,Dist ARowDist,\n                    Dist BColDist,Dist BRowDist,\n                    Dist CColDist,Dist CRowDist>\ninline void LocalGemm\n( Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T,AColDist,ARowDist>& A,\n           const DistMatrix<T,BColDist,BRowDist>& B,\n  T beta,        DistMatrix<T,CColDist,CRowDist>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalGemm\");\n        if( orientationOfA == NORMAL && orientationOfB == NORMAL )\n        {\n            if( AColDist != CColDist ||\n                ARowDist != BColDist ||\n                BRowDist != CRowDist )\n                LogicError(\"C[X,Y] = A[X,Z] B[Z,Y]\");\n            if( A.ColAlign() != C.ColAlign() )\n                LogicError(\"A's cols must align with C's rows\");\n            if( A.RowAlign() != B.ColAlign() )\n                LogicError(\"A's rows must align with B's cols\");\n            if( B.RowAlign() != C.RowAlign() )\n                LogicError(\"B's rows must align with C's rows\");\n            if( A.Height() != C.Height() ||\n                A.Width() != B.Height() ||\n                B.Width() != C.Width() )\n                LogicError\n                (\"Nonconformal LocalGemmNN:\\n\",\n                 \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n                 \"  B ~ \",B.Height(),\" x \",B.Width(),\"\\n\",\n                 \"  C ~ \",C.Height(),\" x \",C.Width());\n        }\n        else if( orientationOfA == NORMAL )\n        {\n            if( AColDist != CColDist ||\n                ARowDist != BRowDist ||\n                BColDist != CRowDist )\n                LogicError(\"C[X,Y] = A[X,Z] (B[Y,Z])^(T/H)\");\n            if( A.ColAlign() != C.ColAlign() )\n                LogicError(\"A's cols must align with C's rows\");\n            if( A.RowAlign() != B.RowAlign() )\n                LogicError(\"A's rows must align with B's rows\");\n            if( B.ColAlign() != C.RowAlign() )\n                LogicError(\"B's cols must align with C's rows\");\n            if( A.Height() != C.Height() ||\n                A.Width() != B.Width() ||\n                B.Height() != C.Width() )\n                LogicError\n                (\"Nonconformal LocalGemmNT:\\n\",\n                 \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n                 \"  B ~ \",B.Height(),\" x \",B.Width(),\"\\n\",\n                 \"  C ~ \",C.Height(),\" x \",C.Width());\n        }\n        else if( orientationOfB == NORMAL )\n        {\n            if( ARowDist != CColDist ||\n                AColDist != BColDist ||\n                BRowDist != CRowDist )\n                LogicError(\"C[X,Y] = (A[Z,X])^(T/H) B[Z,Y]\");\n            if( A.RowAlign() != C.ColAlign() )\n                LogicError(\"A's rows must align with C's cols\");\n            if( A.ColAlign() != B.ColAlign() )\n                LogicError(\"A's cols must align with B's cols\");\n            if( B.RowAlign() != C.RowAlign() )\n                LogicError(\"B's rows must align with C's rows\");\n            if( A.Width() != C.Height() ||\n                A.Height() != B.Height() ||\n                B.Width() != C.Width() )\n                LogicError\n                (\"Nonconformal LocalGemmTN:\\n\",\n                 \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n                 \"  B ~ \",B.Height(),\" x \",B.Width(),\"\\n\",\n                 \"  C ~ \",C.Height(),\" x \",C.Width());\n        }\n        else\n        {\n            if( ARowDist != CColDist ||\n                AColDist != BRowDist ||\n                BColDist != CRowDist )\n                LogicError(\"C[X,Y] = (A[Z,X])^(T/H) (B[Y,Z])^(T/H)\");\n            if( A.RowAlign() != C.ColAlign() )\n                LogicError(\"A's rows must align with C's cols\");\n            if( A.ColAlign() != B.RowAlign() )\n                LogicError(\"A's cols must align with B's rows\");\n            if( B.ColAlign() != C.RowAlign() )\n                LogicError(\"B's cols must align with C's rows\");\n            if( A.Width() != C.Height() ||\n                A.Height() != B.Width() ||\n                B.Height() != C.Width() )\n                LogicError\n                (\"Nonconformal LocalGemmTT:\\n\",\n                 \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n                 \"  B ~ \",B.Height(),\" x \",B.Width(),\"\\n\",\n                 \"  C ~ \",C.Height(),\" x \",C.Width());\n        }\n    )\n    Gemm\n    ( orientationOfA , orientationOfB,\n      alpha, A.LockedMatrix(), B.LockedMatrix(), beta, C.Matrix() );\n}\n\ntemplate<typename T,Dist AColDist,Dist ARowDist,\n                    Dist BColDist,Dist BRowDist,\n                    Dist CColDist,Dist CRowDist>\ninline void LocalGemm\n( Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T,AColDist,ARowDist>& A,\n           const DistMatrix<T,BColDist,BRowDist>& B,\n                 DistMatrix<T,CColDist,CRowDist>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalGemm\"))\n    const Int m = ( orientationOfA==NORMAL ? A.Height() : A.Width() );\n    const Int n = ( orientationOfB==NORMAL ? B.Width() : B.Height() );\n    Zeros( C, m, n );\n    LocalGemm( orientationOfA, orientationOfB, alpha, A, B, T(0), C );\n}\n\n} // namespace elem\n\n#include \"./Gemm/NN.hpp\"\n#include \"./Gemm/NT.hpp\"\n#include \"./Gemm/TN.hpp\"\n#include \"./Gemm/TT.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nGemm\n( Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B, T beta, Matrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Gemm\");\n        if( orientationOfA == NORMAL && orientationOfB == NORMAL )\n        {\n            if( A.Height() != C.Height() ||\n                B.Width()  != C.Width()  ||\n                A.Width()  != B.Height() )\n                LogicError(\"Nonconformal GemmNN\");\n        }\n        else if( orientationOfA == NORMAL )\n        {\n            if( A.Height() != C.Height() ||\n                B.Height() != C.Width()  ||\n                A.Width()  != B.Width() )\n                LogicError(\"Nonconformal GemmN(T/C)\");\n        }\n        else if( orientationOfB == NORMAL )\n        {\n            if( A.Width()  != C.Height() ||\n                B.Width()  != C.Width()  ||\n                A.Height() != B.Height() )\n                LogicError(\"Nonconformal Gemm(T/C)N\");\n        }\n        else\n        {\n            if( A.Width()  != C.Height() ||\n                B.Height() != C.Width()  ||\n                A.Height() != B.Width() )\n                LogicError(\"Nonconformal Gemm(T/C)(T/C)\");\n        }\n    )\n    const char transA = OrientationToChar( orientationOfA );\n    const char transB = OrientationToChar( orientationOfB );\n    const Int m = C.Height();\n    const Int n = C.Width();\n    const Int k = ( orientationOfA == NORMAL ? A.Width() : A.Height() );\n    if( k != 0 )\n    {\n        blas::Gemm\n        ( transA, transB, m, n, k,\n          alpha, A.LockedBuffer(), A.LDim(), B.LockedBuffer(), B.LDim(),\n          beta,  C.Buffer(),       C.LDim() );\n    }\n    else\n    {\n        Scale( beta, C );\n    }\n}\n\ntemplate<typename T>\ninline void\nGemm\n( Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B, Matrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gemm\"))\n    const Int m = ( orientationOfA==NORMAL ? A.Height() : A.Width() );\n    const Int n = ( orientationOfB==NORMAL ? B.Width() : B.Height() );\n    Zeros( C, m, n );\n    Gemm( orientationOfA, orientationOfB, alpha, A, B, T(0), C );\n}\n\ntemplate<typename T>\ninline void\nGemm\n( Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gemm\"))\n    if( orientationOfA == NORMAL && orientationOfB == NORMAL )\n    {\n        gemm::SUMMA_NN( alpha, A, B, beta, C );\n    }\n    else if( orientationOfA == NORMAL )\n    {\n        gemm::SUMMA_NT( orientationOfB, alpha, A, B, beta, C );\n    }\n    else if( orientationOfB == NORMAL )\n    {\n        gemm::SUMMA_TN( orientationOfA, alpha, A, B, beta, C );\n    }\n    else\n    {\n        gemm::SUMMA_TT( orientationOfA, orientationOfB, alpha, A, B, beta, C );\n    }\n}\n\ntemplate<typename T>\ninline void\nGemm\n( Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n                 DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gemm\"))\n    const Int m = ( orientationOfA==NORMAL ? A.Height() : A.Width() );\n    const Int n = ( orientationOfB==NORMAL ? B.Width() : B.Height() );\n    Zeros( C, m, n );\n    Gemm( orientationOfA, orientationOfB, alpha, A, B, T(0), C );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GEMM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Hemm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HEMM_HPP\n#define ELEM_HEMM_HPP\n\n#include \"./Symm.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nHemm\n( LeftOrRight side, UpperOrLower uplo,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B, T beta, Matrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hemm\"))\n    Symm( side, uplo, alpha, A, B, beta, C, true );\n}\n\ntemplate<typename T>\ninline void\nHemm\n( LeftOrRight side, UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hemm\"))\n    Symm( side, uplo, alpha, A, B, beta, C, true );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HEMM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Her2k.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HER2K_HPP\n#define ELEM_HER2K_HPP\n\n#include \"./Syr2k.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nHer2k\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B, T beta, Matrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Her2k\"))\n    Syr2k( uplo, orientation, alpha, A, B, beta, C, true );\n}\n\ntemplate<typename T>\ninline void\nHer2k\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B, Matrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Her2k\"))\n    const Int n = ( orientation==NORMAL ? A.Height() : A.Width() );\n    Zeros( C, n, n );\n    Syr2k( uplo, orientation, alpha, A, B, T(0), C, true );\n}\n\ntemplate<typename T>\ninline void\nHer2k\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Her2k\"))\n    Syr2k( uplo, orientation, alpha, A, B, beta, C, true );\n}\n\ntemplate<typename T>\ninline void\nHer2k\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n                 DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Her2k\"))\n    const Int n = ( orientation==NORMAL ? A.Height() : A.Width() );\n    Zeros( C, n, n );\n    Syr2k( uplo, orientation, alpha, A, B, T(0), C, true );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HER2K_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Herk.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERK_HPP\n#define ELEM_HERK_HPP\n\n#include \"./Syrk.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nHerk\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const Matrix<T>& A, T beta, Matrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Herk\"))\n    Syrk( uplo, orientation, alpha, A, beta, C, true );\n}\n\ntemplate<typename T>\ninline void\nHerk\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const Matrix<T>& A, Matrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Herk\"))\n    const Int n = ( orientation==NORMAL ? A.Height() : A.Width() );\n    Zeros( C, n, n );\n    Syrk( uplo, orientation, alpha, A, T(0), C, true );\n}\n\ntemplate<typename T>\ninline void\nHerk\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const DistMatrix<T>& A, T beta, DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Herk\"))\n    Syrk( uplo, orientation, alpha, A, beta, C, true );\n}\n\ntemplate<typename T>\ninline void\nHerk\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const DistMatrix<T>& A, DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Herk\"))\n    const Int n = ( orientation==NORMAL ? A.Height() : A.Width() );\n    Zeros( C, n, n );\n    Syrk( uplo, orientation, alpha, A, T(0), C, true );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HERK_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/MultiShiftQuasiTrsm/LLN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MULTISHIFTQUASITRSM_LLN_HPP\n#define ELEM_MULTISHIFTQUASITRSM_LLN_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace msquasitrsm {\n\n// NOTE: The less stable blas::Givens is used instead of blas::Givens due to\n//       the fact that the caching of an expensive-to-compute function of \n//       machine constants is recomputed for every call of the latter to avoid\n//       a thread safety issue.\n\ntemplate<typename F>\ninline void\nLLNUnb( const Matrix<F>& L, const Matrix<F>& shifts, Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LLNUnb\"))\n    typedef Base<F> Real;\n    const Int m = X.Height();\n    const Int n = X.Width();\n\n    const F* LBuf = L.LockedBuffer();\n          F* XBuf = X.Buffer();\n    const Int ldl = L.LDim();\n    const Int ldx = X.LDim();\n\n    Int k=0;\n    while( k < m )\n    {\n        const bool in2x2 = ( k+1<m && LBuf[k+(k+1)*ldl] != F(0) );\n        if( in2x2 ) \n        {\n            // Solve the 2x2 linear systems via 2x2 LQ decompositions produced\n            // by the Givens rotation\n            //    | L(k,k)-shift L(k,k+1) | | c -conj(s) | = | gamma11 0 |\n            //                              | s    c     |\n            // and by also forming the bottom two entries of the 2x2 resulting\n            // lower-triangular matrix, say gamma21 and gamma22\n            //\n            // Extract the constant part of the 2x2 diagonal block, D\n            const F delta12 = LBuf[ k   +(k+1)*ldl];\n            const F delta21 = LBuf[(k+1)+ k   *ldl];\n            for( Int j=0; j<n; ++j )\n            {\n                const F delta11 = LBuf[ k   + k   *ldl] - shifts.Get(j,0);\n                const F delta22 = LBuf[(k+1)+(k+1)*ldl] - shifts.Get(j,0);\n                // Decompose D = L Q\n                Real c; F s;\n                const F gamma11 = blas::Givens( delta11, delta12, &c, &s );\n                const F gamma21 =        c*delta21 + s*delta22;\n                const F gamma22 = -Conj(s)*delta21 + c*delta22;\n\n                F* xBuf = &XBuf[j*ldx];\n\n                // Solve against L\n                xBuf[k  ] /= gamma11;\n                xBuf[k+1] -= gamma21*xBuf[k];\n                xBuf[k+1] /= gamma22;\n\n                // Solve against Q\n                const F chi1 = xBuf[k  ];\n                const F chi2 = xBuf[k+1];\n                xBuf[k  ] = c*chi1 - Conj(s)*chi2;\n                xBuf[k+1] = s*chi1 +       c*chi2;\n\n                // Update x2 := x2 - L21 x1\n                blas::Axpy\n                ( m-(k+2), -xBuf[k  ], \n                  &LBuf[(k+2)+ k   *ldl], 1, &xBuf[k+2], 1 );\n                blas::Axpy\n                ( m-(k+2), -xBuf[k+1], \n                  &LBuf[(k+2)+(k+1)*ldl], 1, &xBuf[k+2], 1 );\n            }\n\n            k += 2;\n        }\n        else\n        {\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldx];\n                xBuf[k] /= LBuf[k+k*ldl] - shifts.Get(j,0);\n                blas::Axpy\n                ( m-(k+1), -xBuf[k], &LBuf[(k+1)+k*ldl], 1, &xBuf[k+1], 1 );\n            }\n            k += 1;\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nLLN( const Matrix<F>& L, const Matrix<F>& shifts, Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LLN\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        LLNUnb( L11, shifts, X1 );\n        Gemm( NORMAL, NORMAL, F(-1), L21, X1, F(1), X2 );\n    }\n}\n\n// For large numbers of RHS's, e.g., width(X) >> p\ntemplate<typename F>\ninline void\nLLNLarge\n( const DistMatrix<F>& L, const DistMatrix<F,VR,STAR>& shifts, \n  DistMatrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LLNLarge\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        X1_STAR_VR.AlignWith( shifts );\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n\n        // X1[* ,VR] := L11^-1[* ,* ] X1[* ,VR]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, LOWER, NORMAL, F(1), L11_STAR_STAR, shifts, X1_STAR_VR );\n\n        X1_STAR_MR.AlignWith( X2 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR] <- X1[* ,MR]\n        L21_MC_STAR.AlignWith( X2 );\n        L21_MC_STAR = L21;        // L21[MC,* ] <- L21[MC,MR]\n        \n        // X2[MC,MR] -= L21[MC,* ] X1[* ,MR]\n        LocalGemm( NORMAL, NORMAL, F(-1), L21_MC_STAR, X1_STAR_MR, F(1), X2 );\n    }\n}\n\n// For medium numbers of RHS's, e.g., width(X) ~= p\ntemplate<typename F,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLLNMedium\n( const DistMatrix<F>& L, \n  const DistMatrix<F,shiftColDist,shiftRowDist>& shifts, \n        DistMatrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LLNMedium\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    DistMatrix<F,MR,  STAR> shifts_MR_STAR( shifts ),\n                            shifts_MR_STAR_Align(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X2 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR ); // X1[* ,MR] <- X1[MC,MR]\n\n        // X1^T[MR,* ] := X1^T[MR,* ] L11^-T[* ,* ]\n        //              = (L11^-1[* ,* ] X1[* ,MR])^T\n        shifts_MR_STAR_Align.AlignWith( X1Trans_MR_STAR );\n        shifts_MR_STAR_Align = shifts_MR_STAR; \n        LocalMultiShiftQuasiTrsm\n        ( RIGHT, LOWER, TRANSPOSE,\n          F(1), L11_STAR_STAR, shifts_MR_STAR_Align, X1Trans_MR_STAR );\n\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR ); // X1[MC,MR] <- X1[* ,MR]\n        L21_MC_STAR.AlignWith( X2 );\n        L21_MC_STAR = L21;                   // L21[MC,* ] <- L21[MC,MR]\n        \n        // X2[MC,MR] -= L21[MC,* ] X1[* ,MR]\n        LocalGemm\n        ( NORMAL, TRANSPOSE, F(-1), L21_MC_STAR, X1Trans_MR_STAR, F(1), X2 );\n    }\n}\n\n// For small numbers of RHS's, e.g., width(X) < p\ntemplate<typename F,Dist colDist,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLLNSmall\n( const DistMatrix<F,     colDist,STAR        >& L, \n  const DistMatrix<F,shiftColDist,shiftRowDist>& shifts, \n        DistMatrix<F,     colDist,STAR        >& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LLNSmall\");\n        if( L.ColAlign() != X.ColAlign() )\n            LogicError(\"L and X are assumed to be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), X1_STAR_STAR(g),\n                            shifts_STAR_STAR(shifts);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[VC,* ]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VC,* ]\n\n        // X1[* ,* ] := (L11[* ,* ])^-1 X1[* ,* ]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, LOWER, NORMAL, \n          F(1), L11_STAR_STAR, shifts_STAR_STAR, X1_STAR_STAR );\n\n        // X2[VC,* ] -= L21[VC,* ] X1[* ,* ]\n        LocalGemm( NORMAL, NORMAL, F(-1), L21, X1_STAR_STAR, F(1), X2 );\n    }\n}\n\n} // namespace msquasitrsm\n} // namespace elem\n\n#endif // ifndef ELEM_MULTISHIFTQUASITRSM_LLN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/MultiShiftQuasiTrsm/LLT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MULTISHIFTQUASITRSM_LLT_HPP\n#define ELEM_MULTISHIFTQUASITRSM_LLT_HPP\n\n#include ELEM_GEMM_INC\n#include ELEM_TRSM_INC\n\nnamespace elem {\nnamespace msquasitrsm {\n\ntemplate<typename F>\ninline void\nLLTUnb\n( bool conjugate, const Matrix<F>& L, const Matrix<F>& shifts, Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LLTUnb\"))\n    typedef Base<F> Real;\n    const Int m = X.Height();\n    const Int n = X.Width();\n\n    const F* LBuf = L.LockedBuffer();\n          F* XBuf = X.Buffer();\n    const Int ldl = L.LDim();\n    const Int ldx = X.LDim();\n\n    if( conjugate )\n        Conjugate( X );\n\n    Int k=m-1;\n    while( k >= 0 )\n    {\n        const bool in2x2 = ( k>0 && LBuf[(k-1)+k*ldl] != F(0) );\n        if( in2x2 )\n        {\n            --k;\n            // Solve the 2x2 linear systems via 2x2 LQ decompositions produced\n            // by the Givens rotation\n            //    | L(k,k)-shift L(k,k+1) | | c -conj(s) | = | gamma11 0 |\n            //                              | s    c     |\n            // and by also forming the bottom two entries of the 2x2 resulting\n            // lower-triangular matrix, say gamma21 and gamma22\n            //\n            // Extract the constant part of the 2x2 diagonal block, D\n            const F delta12 = LBuf[   k +(k+1)*ldl];\n            const F delta21 = LBuf[(k+1)+   k *ldl];\n            for( Int j=0; j<n; ++j )\n            {\n                const F delta11 = LBuf[   k +   k *ldl] - shifts.Get(j,0);\n                const F delta22 = LBuf[(k+1)+(k+1)*ldl] - shifts.Get(j,0);\n                // Decompose D = L Q\n                Real c; F s;\n                const F gamma11 = blas::Givens( delta11, delta12, &c, &s );\n                const F gamma21 =        c*delta21 + s*delta22;\n                const F gamma22 = -Conj(s)*delta21 + c*delta22;\n\n                F* xBuf = &XBuf[j*ldx];\n                // Solve against Q^T\n                const F chi1 = xBuf[k  ];\n                const F chi2 = xBuf[k+1];\n                xBuf[k  ] =        c*chi1 + s*chi2;\n                xBuf[k+1] = -Conj(s)*chi1 + c*chi2;\n\n                // Solve against R^T\n                xBuf[k+1] /= gamma22;\n                xBuf[k  ] -= gamma21*xBuf[k+1];\n                xBuf[k  ] /= gamma11;\n\n                // Update x0 := x0 - L10^T x1\n                blas::Axpy( k, -xBuf[k  ], &LBuf[k  ], ldl, xBuf, 1 );\n                blas::Axpy( k, -xBuf[k+1], &LBuf[k+1], ldl, xBuf, 1 );\n            }\n        }\n        else\n        {\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldx];\n                // Solve the 1x1 linear system\n                xBuf[k] /= LBuf[k+k*ldl] - shifts.Get(j,0);\n\n                // Update x0 := x0 - l10^T chi_1\n                blas::Axpy( k, -xBuf[k], &LBuf[k], ldl, xBuf, 1 );\n            }\n        }\n        --k;\n    }\n    if( conjugate )\n        Conjugate( X );\n}\n\ntemplate<typename F>\ninline void\nLLT\n( Orientation orientation, \n  const Matrix<F>& L, const Matrix<F>& shifts, Matrix<F>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LLT\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n\n    const bool conjugate = ( orientation==ADJOINT );\n    if( conjugate )\n        Conjugate( X );\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        LLTUnb( false, L11, shifts, X1 );\n        Gemm( TRANSPOSE, NORMAL, F(-1), L10, X1, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n\n    if( conjugate )\n        Conjugate( X );\n}\n\n// width(X) >> p\ntemplate<typename F>\ninline void\nLLTLarge\n( Orientation orientation, \n  const DistMatrix<F>& L, const DistMatrix<F,VR,STAR>& shifts, \n        DistMatrix<F>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LLTLarge\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        X1_STAR_VR.AlignWith( shifts );\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n\n        // X1[* ,VR] := L11^-[T/H][* ,* ] X1[* ,VR]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, LOWER, orientation, F(1), L11_STAR_STAR, shifts, X1_STAR_VR );\n\n        X1_STAR_MR.AlignWith( X0 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR] <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR] <- X1[* ,MR]\n        L10_STAR_MC.AlignWith( X0 );\n        L10_STAR_MC = L10;        // L10[* ,MC] <- L10[MC,MR]\n\n        // X0[MC,MR] -= (L10[* ,MC])^(T/H) X1[* ,MR]\n        //            = L10^[T/H][MC,* ] X1[* ,MR]\n        LocalGemm\n        ( orientation, NORMAL, F(-1), L10_STAR_MC, X1_STAR_MR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\n// width(X) ~= p\ntemplate<typename F,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLLTMedium\n( Orientation orientation, const DistMatrix<F>& L, \n  const DistMatrix<F,shiftColDist,shiftRowDist>& shifts, DistMatrix<F>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LLTMedium\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    DistMatrix<F,MR,  STAR> shifts_MR_STAR( shifts ),\n                            shifts_MR_STAR_Align(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        // X1[* ,MR] <- X1[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X0 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR, (orientation==ADJOINT) );\n\n        // X1[* ,MR] := L11^-[T/H][* ,* ] X1[* ,MR]\n        // X1^[T/H][MR,* ] := X1^[T/H][MR,* ] L11^-1[* ,* ]\n        shifts_MR_STAR_Align.AlignWith( X1Trans_MR_STAR );\n        shifts_MR_STAR_Align = shifts_MR_STAR;\n        LocalMultiShiftQuasiTrsm\n        ( RIGHT, LOWER, NORMAL,\n          F(1), L11_STAR_STAR, shifts_MR_STAR_Align, X1Trans_MR_STAR );\n\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR, (orientation==ADJOINT) );\n        L10_STAR_MC.AlignWith( X0 );\n        L10_STAR_MC = L10; // L10[* ,MC] <- L10[MC,MR]\n\n        // X0[MC,MR] -= (L10[* ,MC])^[T/H] X1[* ,MR]\n        //            = L10^[T/H][MC,* ] X1[* ,MR]\n        LocalGemm\n        ( orientation, orientation, \n          F(-1), L10_STAR_MC, X1Trans_MR_STAR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\nusing trsm::AddInLocalData;\n\n// width(X) << p\ntemplate<typename F,Dist colDist,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLLTSmall\n( Orientation orientation, \n  const DistMatrix<F,colDist,STAR>& L, \n  const DistMatrix<F,shiftColDist,shiftRowDist>& shifts, \n        DistMatrix<F,colDist,STAR>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LLTSmall\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( L.Height() != L.Width() || L.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( L.ColAlign() != X.ColAlign() )\n            LogicError(\"L and X must be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), Z1_STAR_STAR(g),\n                            shifts_STAR_STAR(shifts);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        // X1 -= L21' X2\n        LocalGemm( orientation, NORMAL, F(-1), L21, X2, Z1_STAR_STAR );\n        AddInLocalData( X1, Z1_STAR_STAR );\n        Z1_STAR_STAR.SumOver( X1.DistComm() );\n\n        // X1 := L11^-1 X1\n        L11_STAR_STAR = L11;\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, LOWER, orientation, F(1), \n          L11_STAR_STAR, shifts_STAR_STAR, Z1_STAR_STAR );\n        X1 = Z1_STAR_STAR;\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename F,Dist rowDist,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLLTSmall\n( Orientation orientation, \n  const DistMatrix<F,STAR,rowDist>& L, \n  const DistMatrix<F,shiftColDist,shiftRowDist>& shifts, \n        DistMatrix<F,rowDist,STAR>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LLTSmall\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( L.Height() != L.Width() || L.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( L.RowAlign() != X.ColAlign() )\n            LogicError(\"L and X must be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), X1_STAR_STAR(g),\n                            shifts_STAR_STAR(shifts);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[* ,VR]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VR,* ]\n\n        // X1[* ,* ] := L11^-[T/H][* ,* ] X1[* ,* ]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, LOWER, orientation,\n          F(1), L11_STAR_STAR, shifts_STAR_STAR, X1_STAR_STAR );\n\n        X1 = X1_STAR_STAR;\n\n        // X0[VR,* ] -= L10[* ,VR]^(T/H) X1[* ,* ]\n        LocalGemm( orientation, NORMAL, F(-1), L10, X1_STAR_STAR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\n} // namespace msquasitrsm\n} // namespace elem\n\n#endif // ifndef ELEM_MULTISHIFTQUASITRSM_LLT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/MultiShiftQuasiTrsm/LUN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MULTISHIFTQUASITRSM_LUN_HPP\n#define ELEM_MULTISHIFTQUASITRSM_LUN_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace msquasitrsm {\n\ntemplate<typename F>\ninline void\nLUNUnb( const Matrix<F>& U, const Matrix<F>& shifts, Matrix<F>& X )\n{\n    DEBUG_ONLY\n    (\n        CallStackEntry cse(\"msquasitrsm::LUNUnb\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U should be square\");\n        if( X.Height() != U.Height() )\n            LogicError(\"X should be the same height as U's size\");\n    )\n\n    const Int m = X.Height();\n    const Int n = X.Width();\n    typedef Base<F> Real;\n    \n    const F* UBuf = U.LockedBuffer();\n          F* XBuf = X.Buffer();\n    const Int ldu = U.LDim();\n    const Int ldX = X.LDim();\n    \n    Int k=m-1;\n    while( k >= 0 )\n    {\n        const bool in2x2 = ( k>0 && UBuf[k+(k-1)*ldu] != F(0) );\n        if( in2x2 )\n        {\n            --k;\n            // Solve the 2x2 linear systems via 2x2 QR decompositions produced\n            // by the Givens rotation\n            //    | c        s | | U(k,  k)-shift | = | gamma11 | \n            //    | -conj(s) c | | U(k+1,k)       |   | 0       |\n            //\n            // and by also forming the right two entries of the 2x2 resulting\n            // upper-triangular matrix, say gamma12 and gamma22\n            //\n            // Extract the constant part of the 2x2 diagonal block, D\n            const F delta12 = UBuf[ k   +(k+1)*ldu];\n            const F delta21 = UBuf[(k+1)+ k   *ldu];\n            for( Int j=0; j<n; ++j )\n            {\n                const F delta11 = UBuf[ k   + k   *ldu] - shifts.Get(j,0);\n                const F delta22 = UBuf[(k+1)+(k+1)*ldu] - shifts.Get(j,0);\n                // Decompose D = Q R\n                Real c; F s;\n                const F gamma11 = blas::Givens( delta11, delta21, &c, &s );\n                const F gamma12 =        c*delta12 + s*delta22;\n                const F gamma22 = -Conj(s)*delta12 + c*delta22;\n\n                F* xBuf = &XBuf[j*ldX];\n                // Solve against Q\n                const F chi1 = xBuf[k  ];\n                const F chi2 = xBuf[k+1];\n                xBuf[k  ] =        c*chi1 + s*chi2;\n                xBuf[k+1] = -Conj(s)*chi1 + c*chi2;\n\n                // Solve against R\n                xBuf[k+1] /= gamma22;\n                xBuf[k  ] -= gamma12*xBuf[k+1];\n                xBuf[k  ] /= gamma11;\n\n                // Update x0 := x0 - U01 x1\n                blas::Axpy( k, -xBuf[k  ], &UBuf[ k   *ldu], 1, xBuf, 1 );\n                blas::Axpy( k, -xBuf[k+1], &UBuf[(k+1)*ldu], 1, xBuf, 1 );\n            }\n        }\n        else\n        {\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldX];\n                // Solve the 1x1 linear system\n                xBuf[k] /= UBuf[k+k*ldu] - shifts.Get(j,0);\n\n                // Update x0 := x0 - u01 chi_1\n                blas::Axpy( k, -xBuf[k], &UBuf[k*ldu], 1, xBuf, 1 );\n            }\n        }\n        --k;\n    }\n}\n\ntemplate<typename Real>\ninline void\nLUNUnb\n( const Matrix<Real>& U, \n  const Matrix<Complex<Real>>& shifts, \n        Matrix<Real>& XReal, Matrix<Real>& XImag )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUNUnb\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U should be square\");\n        if( XReal.Height() != XImag.Height() ||\n            XReal.Width()  != XImag.Width() )\n            LogicError(\"XReal and XImag should be the same size\");\n        if( XReal.Height() != U.Height() )\n            LogicError(\"X should be the same height as U's size\");\n    )\n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n    typedef Complex<Real> C;\n    \n    const Real* UBuf = U.LockedBuffer();\n          Real* XRealBuf = XReal.Buffer();\n          Real* XImagBuf = XImag.Buffer();\n    const Int ldu = U.LDim();\n    const Int ldXReal = XReal.LDim();\n    const Int ldXImag = XImag.LDim();\n    \n    Int k=m-1;\n    while( k >= 0 )\n    {\n        const bool in2x2 = ( k>0 && UBuf[k+(k-1)*ldu] != Real(0) );\n        if( in2x2 )\n        {\n            --k;\n            // Solve the 2x2 linear systems via 2x2 QR decompositions produced\n            // by the Givens rotation\n            //    | c        s | | U(k,  k)-shift | = | gamma11 | \n            //    | -conj(s) c | | U(k+1,k)       |   | 0       |\n            //\n            // and by also forming the right two entries of the 2x2 resulting\n            // upper-triangular matrix, say gamma12 and gamma22\n            //\n            // Extract the constant part of the 2x2 diagonal block, D\n            const Real delta12 = UBuf[ k   +(k+1)*ldu];\n            const Real delta21 = UBuf[(k+1)+ k   *ldu];\n            for( Int j=0; j<n; ++j )\n            {\n                const C delta11 = UBuf[ k   + k   *ldu] - shifts.Get(j,0);\n                const C delta22 = UBuf[(k+1)+(k+1)*ldu] - shifts.Get(j,0);\n                // Decompose D = Q R\n                Real c; C s;\n                const C gamma11 = blas::Givens( delta11, delta21, &c, &s );\n                const C gamma12 =        c*delta12 + s*delta22;\n                const C gamma22 = -Conj(s)*delta12 + c*delta22;\n\n                Real* xRealBuf = &XRealBuf[j*ldXReal];\n                Real* xImagBuf = &XImagBuf[j*ldXImag];\n                // Solve against Q\n                const C chi1 = C(xRealBuf[k  ],xImagBuf[k  ]);\n                const C chi2 = C(xRealBuf[k+1],xImagBuf[k+1]);\n                C eta1 =        c*chi1 + s*chi2;\n                C eta2 = -Conj(s)*chi1 + c*chi2;\n\n                // Solve against R\n                eta2 /= gamma22;\n                eta1 -= gamma12*eta2;\n                eta1 /= gamma11;\n\n                // Store the separated real and imaginary comp's of eta{1,2}\n                xRealBuf[k+0] = eta1.real();\n                xImagBuf[k+0] = eta1.imag();\n                xRealBuf[k+1] = eta2.real();\n                xImagBuf[k+1] = eta2.imag();\n\n                // Update x0 := x0 - U01 x1\n                blas::Axpy\n                ( k, -xRealBuf[k  ], &UBuf[ k   *ldu], 1, xRealBuf, 1 );\n                blas::Axpy\n                ( k, -xImagBuf[k  ], &UBuf[ k   *ldu], 1, xImagBuf, 1 );\n                blas::Axpy\n                ( k, -xRealBuf[k+1], &UBuf[(k+1)*ldu], 1, xRealBuf, 1 );\n                blas::Axpy\n                ( k, -xImagBuf[k+1], &UBuf[(k+1)*ldu], 1, xImagBuf, 1 );\n            }\n        }\n        else\n        {\n            for( Int j=0; j<n; ++j )\n            {\n                Real* xRealBuf = &XRealBuf[j*ldXReal];\n                Real* xImagBuf = &XImagBuf[j*ldXImag];\n                // Solve the 1x1 linear system\n                C eta1(xRealBuf[k],xImagBuf[k]);\n                eta1 /= UBuf[k+k*ldu] - shifts.Get(j,0);\n                xRealBuf[k] = eta1.real();\n                xImagBuf[k] = eta1.imag();\n\n                // Update x0 := x0 - u01 chi_1\n                blas::Axpy( k, -xRealBuf[k], &UBuf[k*ldu], 1, xRealBuf, 1 );\n                blas::Axpy( k, -xImagBuf[k], &UBuf[k*ldu], 1, xImagBuf, 1 );\n            }\n        }\n        --k;\n    }\n}\n\ntemplate<typename F>\ninline void\nLUN( const Matrix<F>& U, const Matrix<F>& shifts, Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LUN\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        LUNUnb( U11, shifts, X1 );\n        Gemm( NORMAL, NORMAL, F(-1), U01, X1, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename Real>\ninline void\nLUN\n( const Matrix<Real>& U, const Matrix<Complex<Real>>& shifts, \n        Matrix<Real>& XReal, Matrix<Real>& XImag )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LUN\"))\n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n    const Int bsize = Blocksize();\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != Real(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0Real = ViewRange( XReal, 0, 0, k,    n );\n        auto X0Imag = ViewRange( XImag, 0, 0, k,    n );\n        auto X1Real = ViewRange( XReal, k, 0, k+nb, n );\n        auto X1Imag = ViewRange( XImag, k, 0, k+nb, n );\n\n        LUNUnb( U11, shifts, X1Real, X1Imag );\n        Gemm( NORMAL, NORMAL, Real(-1), U01, X1Real, Real(1), X0Real );\n        Gemm( NORMAL, NORMAL, Real(-1), U01, X1Imag, Real(1), X0Imag );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename F>\ninline void\nLUNLarge\n( const DistMatrix<F>& U, const DistMatrix<F,VR,STAR>& shifts, \n        DistMatrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LUNLarge\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1_STAR_VR.AlignWith( shifts );\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n        \n        // X1[* ,VR] := U11^-1[* ,* ] X1[* ,VR]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, UPPER, NORMAL, F(1), U11_STAR_STAR, shifts, X1_STAR_VR );\n\n        X1_STAR_MR.AlignWith( X0 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR] <- X1[* ,MR]\n        U01_MC_STAR.AlignWith( X0 );\n        U01_MC_STAR = U01;        // U01[MC,* ] <- U01[MC,MR]\n\n        // X0[MC,MR] -= U01[MC,* ] X1[* ,MR]\n        LocalGemm( NORMAL, NORMAL, F(-1), U01_MC_STAR, X1_STAR_MR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename Real>\ninline void\nLUNLarge\n( const DistMatrix<Real>& U, const DistMatrix<Complex<Real>,VR,STAR>& shifts, \n        DistMatrix<Real>& XReal, DistMatrix<Real>& XImag )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LUNLarge\"))\n    // TODO: More error checks, especially on alignments?\n    typedef Complex<Real> C; \n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<Real,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<Real,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<Real,STAR,MR  > X1Real_STAR_MR(g), X1Imag_STAR_MR(g);\n    DistMatrix<Real,STAR,VR  > X1Real_STAR_VR(g), X1Imag_STAR_VR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != Real(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0Real = ViewRange( XReal, 0, 0, k,    n );\n        auto X0Imag = ViewRange( XImag, 0, 0, k,    n );\n        auto X1Real = ViewRange( XReal, k, 0, k+nb, n );\n        auto X1Imag = ViewRange( XImag, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1Real_STAR_VR.AlignWith( shifts );\n        X1Imag_STAR_VR.AlignWith( shifts );\n        X1Real_STAR_VR = X1Real;\n        X1Imag_STAR_VR = X1Imag;\n        \n        // X1[* ,VR] := U11^-1[* ,* ] X1[* ,VR]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, UPPER, NORMAL, C(1), \n          U11_STAR_STAR, shifts, X1Real_STAR_VR, X1Imag_STAR_VR );\n\n        X1Real_STAR_MR.AlignWith( X0Real );\n        X1Imag_STAR_MR.AlignWith( X0Imag );\n        X1Real_STAR_MR = X1Real_STAR_VR; \n        X1Imag_STAR_MR = X1Imag_STAR_VR;\n        X1Real = X1Real_STAR_MR;\n        X1Imag = X1Imag_STAR_MR;\n        U01_MC_STAR.AlignWith( X0Real );\n        U01_MC_STAR = U01; \n\n        // X0[MC,MR] -= U01[MC,* ] X1[* ,MR]\n        LocalGemm\n        ( NORMAL, NORMAL, \n          Real(-1), U01_MC_STAR, X1Real_STAR_MR, Real(1), X0Real );\n        LocalGemm\n        ( NORMAL, NORMAL, \n          Real(-1), U01_MC_STAR, X1Imag_STAR_MR, Real(1), X0Imag );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename F,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLUNMedium\n( const DistMatrix<F>& U, \n  const DistMatrix<F,shiftColDist,shiftRowDist>& shifts, \n        DistMatrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LUNMedium\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    DistMatrix<F,MR,  STAR> shifts_MR_STAR(shifts),\n                            shifts_MR_STAR_Align(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X0 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR ); // X1[* ,MR] <- X1[MC,MR]\n        \n        // X1^T[MR,* ] := X1^T[MR,* ] U11^-T[* ,* ]\n        //              = (U11^-1[* ,* ] X1[* ,MR])^T\n        shifts_MR_STAR_Align.AlignWith( X1Trans_MR_STAR );\n        shifts_MR_STAR_Align = shifts_MR_STAR;\n        LocalMultiShiftQuasiTrsm\n        ( RIGHT, UPPER, TRANSPOSE,\n          F(1), U11_STAR_STAR, shifts_MR_STAR_Align, X1Trans_MR_STAR );\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR );\n\n        U01_MC_STAR.AlignWith( X0 );\n        U01_MC_STAR = U01;  // U01[MC,* ] <- U01[MC,MR]\n\n        // X0[MC,MR] -= U01[MC,* ] X1[* ,MR]\n        LocalGemm\n        ( NORMAL, TRANSPOSE, F(-1), U01_MC_STAR, X1Trans_MR_STAR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename Real,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLUNMedium\n( const DistMatrix<Real>& U, \n  const DistMatrix<Complex<Real>,shiftColDist,shiftRowDist>& shifts, \n        DistMatrix<Real>& XReal, DistMatrix<Real>& XImag )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LUNMedium\"))\n    // TODO: Error checks, particularly on alignments?\n    typedef Complex<Real> C;\n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<Real,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<Real,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<Real,MR,  STAR> X1RealTrans_MR_STAR(g),\n                               X1ImagTrans_MR_STAR(g);\n\n    DistMatrix<C,MR,  STAR> shifts_MR_STAR(shifts),\n                            shifts_MR_STAR_Align(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != Real(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0Real = ViewRange( XReal, 0, 0, k,    n );\n        auto X0Imag = ViewRange( XImag, 0, 0, k,    n );\n        auto X1Real = ViewRange( XReal, k, 0, k+nb, n );\n        auto X1Imag = ViewRange( XImag, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1RealTrans_MR_STAR.AlignWith( X0Real );\n        X1ImagTrans_MR_STAR.AlignWith( X0Imag );\n        X1Real.TransposeColAllGather( X1RealTrans_MR_STAR );\n        X1Imag.TransposeColAllGather( X1RealTrans_MR_STAR ); \n        \n        // X1^T[MR,* ] := X1^T[MR,* ] U11^-T[* ,* ]\n        //              = (U11^-1[* ,* ] X1[* ,MR])^T\n        shifts_MR_STAR_Align.AlignWith( X1RealTrans_MR_STAR );\n        shifts_MR_STAR_Align = shifts_MR_STAR;\n        LocalMultiShiftQuasiTrsm\n        ( RIGHT, UPPER, TRANSPOSE,\n          C(1), U11_STAR_STAR, shifts_MR_STAR_Align, \n                X1RealTrans_MR_STAR, X1ImagTrans_MR_STAR );\n        X1Real.TransposeColFilterFrom( X1RealTrans_MR_STAR );\n        X1Imag.TransposeColFilterFrom( X1ImagTrans_MR_STAR );\n\n        U01_MC_STAR.AlignWith( X0Real );\n        U01_MC_STAR = U01;  // U01[MC,* ] <- U01[MC,MR]\n\n        // X0[MC,MR] -= U01[MC,* ] X1[* ,MR]\n        LocalGemm\n        ( NORMAL, TRANSPOSE, \n          Real(-1), U01_MC_STAR, X1RealTrans_MR_STAR, Real(1), X0Real );\n        LocalGemm\n        ( NORMAL, TRANSPOSE, \n          Real(-1), U01_MC_STAR, X1ImagTrans_MR_STAR, Real(1), X0Imag );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename F,Dist colDist,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLUNSmall\n( const DistMatrix<F,     colDist,STAR        >& U, \n  const DistMatrix<F,shiftColDist,shiftRowDist>& shifts,\n        DistMatrix<F,     colDist,STAR        >& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUNSmall\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( U.Height() != U.Width() || U.Width() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( U.ColAlign() != X.ColAlign() )\n            LogicError(\"U and X are assumed to be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g), X1_STAR_STAR(g),\n                            shifts_STAR_STAR(shifts);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[VC,* ]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VC,* ]\n        \n        // X1[* ,* ] := U11^-1[* ,* ] X1[* ,* ]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, UPPER, NORMAL, \n          F(1), U11_STAR_STAR, shifts_STAR_STAR, X1_STAR_STAR );\n        X1 = X1_STAR_STAR;\n\n        // X0[VC,* ] -= U01[VC,* ] X1[* ,* ]\n        LocalGemm( NORMAL, NORMAL, F(-1), U01, X1_STAR_STAR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename Real,Dist colDist,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLUNSmall\n( const DistMatrix<Real,              colDist,STAR        >& U, \n  const DistMatrix<Complex<Real>,shiftColDist,shiftRowDist>& shifts,\n        DistMatrix<Real,              colDist,STAR        >& XReal,\n        DistMatrix<Real,              colDist,STAR        >& XImag )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUNSmall\");\n        if( U.Grid() != XReal.Grid() || XReal.Grid() != XImag.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( XReal.Height() != XImag.Height() || \n            XReal.Width() != XImag.Width() )\n            LogicError(\"XReal and XImag must be the same size\");\n        if( U.Height() != U.Width() || U.Width() != XReal.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",XReal.Height(),\" x \",XReal.Width(),\"\\n\");\n        if( U.ColAlign() != XReal.ColAlign() || \n            U.ColAlign() != XImag.ColAlign() )\n            LogicError(\"U and X are assumed to be aligned\");\n    )\n    typedef Complex<Real> C;\n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<Real,STAR,STAR> U11_STAR_STAR(g), X1Real_STAR_STAR(g),\n                                                 X1Imag_STAR_STAR(g);\n    DistMatrix<C,STAR,STAR> shifts_STAR_STAR(shifts);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != Real(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0Real = ViewRange( XReal, 0, 0, k,    n );\n        auto X0Imag = ViewRange( XImag, 0, 0, k,    n );\n        auto X1Real = ViewRange( XReal, k, 0, k+nb, n );\n        auto X1Imag = ViewRange( XImag, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[VC,* ]\n        X1Real_STAR_STAR = X1Real; \n        X1Imag_STAR_STAR = X1Imag; \n        \n        // X1[* ,* ] := U11^-1[* ,* ] X1[* ,* ]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, UPPER, NORMAL, \n          C(1), U11_STAR_STAR, shifts_STAR_STAR, \n                X1Real_STAR_STAR, X1Imag_STAR_STAR );\n        X1Real = X1Real_STAR_STAR;\n        X1Imag = X1Imag_STAR_STAR;\n\n        // X0[VC,* ] -= U01[VC,* ] X1[* ,* ]\n        LocalGemm\n        ( NORMAL, NORMAL, Real(-1), U01, X1Real_STAR_STAR, Real(1), X0Real );\n        LocalGemm\n        ( NORMAL, NORMAL, Real(-1), U01, X1Imag_STAR_STAR, Real(1), X0Imag );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\n} // namespace msquasitrsm\n} // namespace elem\n\n#endif // ifndef ELEM_MULTISHIFTQUASITRSM_LUN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/MultiShiftQuasiTrsm/LUT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MULTISHIFTQUASITRSM_LUT_HPP\n#define ELEM_MULTISHIFTQUASITRSM_LUT_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace msquasitrsm {\n\ntemplate<typename F>\ninline void\nLUTUnb\n( bool conjugate, const Matrix<F>& U, const Matrix<F>& shifts, Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LUTUnb\"))\n    typedef Base<F> Real;\n    const Int m = X.Height();\n    const Int n = X.Width();\n\n    if( conjugate )\n        Conjugate( X );\n\n    const F* UBuf = U.LockedBuffer();\n          F* XBuf = X.Buffer();\n    const Int ldU = U.LDim();\n    const Int ldX = X.LDim();\n\n    Int k=0;\n    while( k < m )\n    {\n        const bool in2x2 = ( k+1<m && UBuf[(k+1)+k*ldU] != F(0) );\n        if( in2x2 )\n        {\n            // Solve the 2x2 linear systems via 2x2 QR decompositions produced\n            // by the Givens rotation\n            //    | c        s | | U(k,  k)-shift | = | gamma11 | \n            //    | -conj(s) c | | U(k+1,k)       |   | 0       |\n            //\n            // and by also forming the right two entries of the 2x2 resulting\n            // upper-triangular matrix, say gamma12 and gamma22\n            //\n            // Extract the constant part of the 2x2 diagonal block, D\n            const F delta12 = UBuf[ k   +(k+1)*ldU];\n            const F delta21 = UBuf[(k+1)+ k   *ldU];\n            for( Int j=0; j<n; ++j )\n            {\n                const F delta11 = UBuf[ k   + k   *ldU] - shifts.Get(j,0);\n                const F delta22 = UBuf[(k+1)+(k+1)*ldU] - shifts.Get(j,0);\n                // Decompose D = Q R\n                Real c; F s;\n                const F gamma11 = blas::Givens( delta11, delta21, &c, &s );\n                const F gamma12 =        c*delta12 + s*delta22;\n                const F gamma22 = -Conj(s)*delta12 + c*delta22;\n\n                F* xBuf = &XBuf[j*ldX];\n\n                // Solve against R^T\n                F chi1 = xBuf[k  ];\n                F chi2 = xBuf[k+1];\n                chi1 /= gamma11;\n                chi2 -= gamma12*chi1;\n                chi2 /= gamma22;\n\n                // Solve against Q^T\n                xBuf[k  ] = c*chi1 - Conj(s)*chi2;\n                xBuf[k+1] = s*chi1 +       c*chi2;\n\n                // Update x2 := x2 - U12^T x1\n                blas::Axpy\n                ( m-(k+2), -xBuf[k  ],\n                  &UBuf[ k   +(k+2)*ldU], ldU, &xBuf[k+2], 1 );\n                blas::Axpy\n                ( m-(k+2), -xBuf[k+1],\n                  &UBuf[(k+1)+(k+2)*ldU], ldU, &xBuf[k+2], 1 );\n            }\n            k += 2;\n        }\n        else\n        {\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldX];\n                xBuf[k] /= UBuf[k+k*ldU] - shifts.Get(j,0);\n                blas::Axpy\n                ( m-(k+1), -xBuf[k], &UBuf[k+(k+1)*ldU], ldU, &xBuf[k+1], 1 );\n            }\n            k += 1;\n        }\n    }\n    if( conjugate )\n        Conjugate( X );\n}\n\ntemplate<typename Real>\ninline void\nLUTUnb\n( bool conjugate, \n  const Matrix<Real>& U, \n  const Matrix<Complex<Real>>& shifts, \n        Matrix<Real>& XReal, Matrix<Real>& XImag )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"msquasitrsm::LUTUnb\"))\n    typedef Complex<Real> C;\n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n  \n    if( conjugate )\n        Scale( Real(-1), XImag );\n\n    const Real* UBuf = U.LockedBuffer();\n          Real* XRealBuf = XReal.Buffer();\n          Real* XImagBuf = XImag.Buffer();\n    const Int ldU = U.LDim();\n    const Int ldXReal = XReal.LDim();\n    const Int ldXImag = XImag.LDim();\n\n    Int k=0;\n    while( k < m )\n    {\n        const bool in2x2 = ( k+1<m && UBuf[(k+1)+k*ldU] != Real(0) );\n        if( in2x2 )\n        {\n            // Solve the 2x2 linear systems via 2x2 QR decompositions produced\n            // by the Givens rotation\n            //    | c        s | | U(k,  k)-shift | = | gamma11 | \n            //    | -conj(s) c | | U(k+1,k)       |   | 0       |\n            //\n            // and by also forming the right two entries of the 2x2 resulting\n            // upper-triangular matrix, say gamma12 and gamma22\n            //\n            // Extract the constant part of the 2x2 diagonal block, D\n            const Real delta12 = UBuf[ k   +(k+1)*ldU];\n            const Real delta21 = UBuf[(k+1)+ k   *ldU];\n            for( Int j=0; j<n; ++j )\n            {\n                const C delta11 = UBuf[ k   + k   *ldU] - shifts.Get(j,0);\n                const C delta22 = UBuf[(k+1)+(k+1)*ldU] - shifts.Get(j,0);\n                // Decompose D = Q R\n                Real c; C s;\n                const C gamma11 = blas::Givens( delta11, delta21, &c, &s );\n                const C gamma12 =        c*delta12 + s*delta22;\n                const C gamma22 = -Conj(s)*delta12 + c*delta22;\n\n                Real* xRealBuf = &XRealBuf[j*ldXReal];\n                Real* xImagBuf = &XImagBuf[j*ldXImag]; \n\n                // Solve against R^T\n                C chi1(xRealBuf[k  ],xImagBuf[k  ]);\n                C chi2(xRealBuf[k+1],xImagBuf[k+1]);\n                chi1 /= gamma11;\n                chi2 -= gamma12*chi1;\n                chi2 /= gamma22;\n\n                // Solve against Q^T\n                const C eta1 = c*chi1 - Conj(s)*chi2;\n                const C eta2 = s*chi1 +       c*chi2;\n                xRealBuf[k  ] = eta1.real();\n                xImagBuf[k  ] = eta1.imag();\n                xRealBuf[k+1] = eta2.real();\n                xImagBuf[k+1] = eta2.imag();\n\n                // Update x2 := x2 - U12^T x1\n                blas::Axpy\n                ( m-(k+2), -xRealBuf[k  ],\n                  &UBuf[ k   +(k+2)*ldU], ldU, &xRealBuf[k+2], 1 );\n                blas::Axpy\n                ( m-(k+2), -xImagBuf[k  ],\n                  &UBuf[ k   +(k+2)*ldU], ldU, &xImagBuf[k+2], 1 );\n                blas::Axpy\n                ( m-(k+2), -xRealBuf[k+1],\n                  &UBuf[(k+1)+(k+2)*ldU], ldU, &xRealBuf[k+2], 1 );\n                blas::Axpy\n                ( m-(k+2), -xImagBuf[k+1],\n                  &UBuf[(k+1)+(k+2)*ldU], ldU, &xImagBuf[k+2], 1 );\n            }\n            k += 2;\n        }\n        else\n        {\n            for( Int j=0; j<n; ++j )\n            {\n                Real* xRealBuf = &XRealBuf[j*ldXReal];\n                Real* xImagBuf = &XImagBuf[j*ldXImag];\n                C eta1( xRealBuf[k], xImagBuf[k] );\n                eta1 /= UBuf[k+k*ldU] - shifts.Get(j,0);\n                xRealBuf[k] = eta1.real();\n                xImagBuf[k] = eta1.imag();\n                blas::Axpy\n                ( m-(k+1), -xRealBuf[k], \n                  &UBuf[k+(k+1)*ldU], ldU, &xRealBuf[k+1], 1 );\n                blas::Axpy\n                ( m-(k+1), -xImagBuf[k], \n                  &UBuf[k+(k+1)*ldU], ldU, &xImagBuf[k+1], 1 );\n            }\n            k += 1;\n        }\n    }\n    if( conjugate )\n        Scale( Real(-1), XImag );\n}\n\ntemplate<typename F>\ninline void\nLUT\n( Orientation orientation, \n  const Matrix<F>& U, const Matrix<F>& shifts, Matrix<F>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUT\");\n        if( orientation == NORMAL )\n            LogicError(\"QuasiTrsmLUT expects a (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n\n    const bool conjugate = ( orientation==ADJOINT );\n    if( conjugate )\n        Conjugate( X );\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        LUTUnb( false, U11, shifts, X1 );\n        Gemm( TRANSPOSE, NORMAL, F(-1), U12, X1, F(1), X2 );\n    }\n\n    if( conjugate )\n        Conjugate( X );\n}\n\ntemplate<typename Real>\ninline void\nLUT\n( Orientation orientation, \n  const Matrix<Real>& U, \n  const Matrix<Complex<Real>>& shifts, \n        Matrix<Real>& XReal, Matrix<Real>& XImag )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUT\");\n        if( orientation == NORMAL )\n            LogicError(\"QuasiTrsmLUT expects a (Conjugate)Transpose option\");\n    )\n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n    const Int bsize = Blocksize();\n\n    const bool conjugate = ( orientation==ADJOINT );\n    if( conjugate )\n        Scale( Real(-1), XImag );\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = \n            ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != Real(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1Real = ViewRange( XReal, k,    0, k+nb, n );\n        auto X1Imag = ViewRange( XImag, k,    0, k+nb, n );\n        auto X2Real = ViewRange( XReal, k+nb, 0, m,    n );\n        auto X2Imag = ViewRange( XImag, k+nb, 0, m,    n );\n\n        LUTUnb( false, U11, shifts, X1Real, X1Imag );\n        Gemm( TRANSPOSE, NORMAL, Real(-1), U12, X1Real, Real(1), X2Real );\n        Gemm( TRANSPOSE, NORMAL, Real(-1), U12, X1Imag, Real(1), X2Imag );\n    }\n    if( conjugate )\n        Scale( Real(-1), XImag );\n}\n\n// width(X) >> p\ntemplate<typename F>\ninline void\nLUTLarge\n( Orientation orientation, \n  const DistMatrix<F>& U, \n  const DistMatrix<F,VR,STAR>& shifts, \n        DistMatrix<F>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUTLarge\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsmLUT expects a (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1_STAR_VR.AlignWith( shifts );\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n        \n        // X1[* ,VR] := U11^-[T/H][*,*] X1[* ,VR]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, UPPER, orientation, F(1), U11_STAR_STAR, shifts, X1_STAR_VR );\n\n        X1_STAR_MR.AlignWith( X2 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR]  <- X1[* ,MR]\n        U12_STAR_MC.AlignWith( X2 );\n        U12_STAR_MC = U12;        // U12[* ,MC] <- U12[MC,MR]\n\n        // X2[MC,MR] -= (U12[* ,MC])^(T/H) X1[* ,MR]\n        //            = U12^(T/H)[MC,*] X1[* ,MR]\n        LocalGemm\n        ( orientation, NORMAL, F(-1), U12_STAR_MC, X1_STAR_MR, F(1), X2 );\n    }\n}\n\ntemplate<typename Real>\ninline void\nLUTLarge\n( Orientation orientation, \n  const DistMatrix<Real>& U, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts, \n        DistMatrix<Real>& XReal, DistMatrix<Real>& XImag )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUTLarge\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsmLUT expects a (Conjugate)Transpose option\");\n    )\n    typedef Complex<Real> C;\n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<Real,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<Real,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<Real,STAR,MR  > X1Real_STAR_MR(g), X1Imag_STAR_MR(g);\n    DistMatrix<Real,STAR,VR  > X1Real_STAR_VR(g), X1Imag_STAR_VR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = \n            ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != Real(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1Real = ViewRange( XReal, k,    0, k+nb, n );\n        auto X1Imag = ViewRange( XImag, k,    0, k+nb, n );\n        auto X2Real = ViewRange( XReal, k+nb, 0, m,    n );\n        auto X2Imag = ViewRange( XImag, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1Real_STAR_VR.AlignWith( shifts );\n        X1Imag_STAR_VR.AlignWith( shifts );\n        X1Real_STAR_VR = X1Real; \n        X1Imag_STAR_VR = X1Imag; \n        \n        // X1[* ,VR] := U11^-[T/H][*,*] X1[* ,VR]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, UPPER, orientation, \n          C(1), U11_STAR_STAR, shifts, X1Real_STAR_VR, X1Imag_STAR_VR );\n\n        X1Real_STAR_MR.AlignWith( X2Real );\n        X1Imag_STAR_MR.AlignWith( X2Imag );\n        X1Real_STAR_MR = X1Real_STAR_VR; \n        X1Imag_STAR_MR = X1Imag_STAR_VR; \n        X1Real = X1Real_STAR_MR;\n        X1Imag = X1Imag_STAR_MR;\n        U12_STAR_MC.AlignWith( X2Real );\n        U12_STAR_MC = U12; \n\n        // X2[MC,MR] -= (U12[* ,MC])^(T/H) X1[* ,MR]\n        //            = U12^(T/H)[MC,*] X1[* ,MR]\n        LocalGemm\n        ( orientation, NORMAL, \n          Real(-1), U12_STAR_MC, X1Real_STAR_MR, Real(1), X2Real );\n        LocalGemm\n        ( orientation, NORMAL, \n          Real(-1), U12_STAR_MC, X1Imag_STAR_MR, Real(1), X2Imag );\n    }\n}\n\n// width(X) ~= p\ntemplate<typename F,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLUTMedium\n( Orientation orientation, \n  const DistMatrix<F>& U, \n  const DistMatrix<F,shiftColDist,shiftRowDist>& shifts, \n        DistMatrix<F>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUTMedium\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsmLUT expects a (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    DistMatrix<F,MR,  STAR> shifts_MR_STAR(shifts),\n                            shifts_MR_STAR_Align(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        // X1[* ,VR] <- X1[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X2 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR, (orientation==ADJOINT) );\n        \n        // X1[* ,MR] := U11^-[T/H][*,*] X1[* ,MR]\n        // X1^[T/H][MR,* ] := X1^[T/H][MR,* ] U11^-1[* ,* ]\n        shifts_MR_STAR_Align.AlignWith( X1Trans_MR_STAR );\n        shifts_MR_STAR_Align = shifts_MR_STAR;\n        LocalMultiShiftQuasiTrsm\n        ( RIGHT, UPPER, NORMAL, \n          F(1), U11_STAR_STAR, shifts_MR_STAR_Align, X1Trans_MR_STAR );\n\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR, (orientation==ADJOINT) );\n        U12_STAR_MC.AlignWith( X2 );\n        U12_STAR_MC = U12; // U12[* ,MC] <- U12[MC,MR]\n\n        // X2[MC,MR] -= (U12[* ,MC])^[T/H] X1[* ,MR]\n        //            = U12^[T/H][MC,*] X1[* ,MR]\n        LocalGemm\n        ( orientation, orientation, \n          F(-1), U12_STAR_MC, X1Trans_MR_STAR, F(1), X2 );\n    }\n}\n\ntemplate<typename Real,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLUTMedium\n( Orientation orientation, \n  const DistMatrix<Real>& U, \n  const DistMatrix<Complex<Real>,shiftColDist,shiftRowDist>& shifts, \n        DistMatrix<Real>& XReal, DistMatrix<Real>& XImag )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUTMedium\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsmLUT expects a (Conjugate)Transpose option\");\n    )\n    typedef Complex<Real> C;\n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<Real,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<Real,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<Real,MR,  STAR> X1RealTrans_MR_STAR(g), X1ImagTrans_MR_STAR(g);\n\n    DistMatrix<Complex<Real>,MR,STAR> shifts_MR_STAR(shifts),\n                                      shifts_MR_STAR_Align(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = \n            ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != Real(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1Real = ViewRange( XReal, k,    0, k+nb, n );\n        auto X1Imag = ViewRange( XImag, k,    0, k+nb, n );\n        auto X2Real = ViewRange( XReal, k+nb, 0, m,    n );\n        auto X2Imag = ViewRange( XImag, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; \n        X1RealTrans_MR_STAR.AlignWith( X2Real );\n        X1ImagTrans_MR_STAR.AlignWith( X2Imag );\n        X1Real.TransposeColAllGather\n        ( X1RealTrans_MR_STAR, (orientation==ADJOINT) );\n        X1Imag.TransposeColAllGather\n        ( X1ImagTrans_MR_STAR, (orientation==ADJOINT) );\n        \n        // X1[* ,MR] := U11^-[T/H][*,*] X1[* ,MR]\n        // X1^[T/H][MR,* ] := X1^[T/H][MR,* ] U11^-1[* ,* ]\n        shifts_MR_STAR_Align.AlignWith( X1RealTrans_MR_STAR );\n        shifts_MR_STAR_Align = shifts_MR_STAR;\n        LocalMultiShiftQuasiTrsm\n        ( RIGHT, UPPER, NORMAL, \n          C(1), U11_STAR_STAR, shifts_MR_STAR_Align, \n                X1RealTrans_MR_STAR, X1ImagTrans_MR_STAR );\n\n        X1Real.TransposeColFilterFrom\n        ( X1RealTrans_MR_STAR, (orientation==ADJOINT) );\n        X1Imag.TransposeColFilterFrom\n        ( X1ImagTrans_MR_STAR, (orientation==ADJOINT) );\n        U12_STAR_MC.AlignWith( X2Real );\n        U12_STAR_MC = U12;\n\n        // X2[MC,MR] -= (U12[* ,MC])^[T/H] X1[* ,MR]\n        //            = U12^[T/H][MC,*] X1[* ,MR]\n        LocalGemm\n        ( orientation, orientation, \n          Real(-1), U12_STAR_MC, X1RealTrans_MR_STAR, Real(1), X2Real );\n        LocalGemm\n        ( orientation, orientation, \n          Real(-1), U12_STAR_MC, X1ImagTrans_MR_STAR, Real(1), X2Imag );\n    }\n}\n\n// width(X) << p\ntemplate<typename F,Dist rowDist,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLUTSmall\n( Orientation orientation, \n  const DistMatrix<F,STAR,             rowDist>& U, \n  const DistMatrix<F,shiftColDist,shiftRowDist>& shifts,\n        DistMatrix<F,     rowDist,STAR        >& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUTSmall\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsmLUT expects a (Conjugate)Transpose option\");\n        if( U.Height() != U.Width() || U.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( U.RowAlign() != X.ColAlign() )\n            LogicError(\"U and X are assumed to be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g), X1_STAR_STAR(g),\n                            shifts_STAR_STAR(shifts);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[* ,VR]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VR,* ]\n        \n        // X1[* ,* ] := U11^-[T/H][* ,* ] X1[* ,* ]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, UPPER, orientation,\n          F(1), U11_STAR_STAR, shifts_STAR_STAR, X1_STAR_STAR );\n\n        X1 = X1_STAR_STAR;\n\n        // X2[VR,* ] -= U12[* ,VR]^[T/H] X1[* ,* ]\n        LocalGemm( orientation, NORMAL, F(-1), U12, X1_STAR_STAR, F(1), X2 );\n    }\n}\n\ntemplate<typename Real,Dist rowDist,Dist shiftColDist,Dist shiftRowDist>\ninline void\nLUTSmall\n( Orientation orientation, \n  const DistMatrix<Real,STAR,         rowDist>& U, \n  const DistMatrix<Complex<Real>,shiftColDist,shiftRowDist>& shifts,\n        DistMatrix<Real,              rowDist,STAR        >& XReal,\n        DistMatrix<Real,              rowDist,STAR        >& XImag )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"msquasitrsm::LUTSmall\");\n        if( U.Grid() != XReal.Grid() || XReal.Grid() != XImag.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsmLUT expects a (Conjugate)Transpose option\");\n        if( U.Height() != U.Width() || U.Height() != XReal.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",XReal.Height(),\" x \",XReal.Width(),\"\\n\");\n        if( U.RowAlign() != XReal.ColAlign() ||\n            U.RowAlign() != XImag.ColAlign() )\n            LogicError(\"U and X are assumed to be aligned\");\n    )\n    typedef Complex<Real> C;\n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<Real,STAR,STAR> U11_STAR_STAR(g), X1Real_STAR_STAR(g),\n                                                 X1Imag_STAR_STAR(g);\n    DistMatrix<C,STAR,STAR> shifts_STAR_STAR(shifts);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = \n            ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != Real(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1Real = ViewRange( XReal, k,    0, k+nb, n );\n        auto X1Imag = ViewRange( XImag, k,    0, k+nb, n );\n        auto X2Real = ViewRange( XReal, k+nb, 0, m,    n );\n        auto X2Imag = ViewRange( XImag, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11;\n        X1Real_STAR_STAR = X1Real;  \n        X1Imag_STAR_STAR = X1Imag;  \n        \n        // X1[* ,* ] := U11^-[T/H][* ,* ] X1[* ,* ]\n        LocalMultiShiftQuasiTrsm\n        ( LEFT, UPPER, orientation,\n          C(1), U11_STAR_STAR, shifts_STAR_STAR, \n                X1Real_STAR_STAR, X1Imag_STAR_STAR );\n\n        X1Real = X1Real_STAR_STAR;\n        X1Imag = X1Imag_STAR_STAR;\n\n        // X2[VR,* ] -= U12[* ,VR]^[T/H] X1[* ,* ]\n        LocalGemm\n        ( orientation, NORMAL, \n          Real(-1), U12, X1Real_STAR_STAR, Real(1), X2Real );\n        LocalGemm\n        ( orientation, NORMAL, \n          Real(-1), U12, X1Imag_STAR_STAR, Real(1), X2Imag );\n    }\n}\n\n} // namespace msquasitrsm\n} // namespace elem\n\n#endif // ifndef ELEM_MULTISHIFTQUASITRSM_LUT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/MultiShiftQuasiTrsm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MULTISHIFTQUASITRSM_HPP\n#define ELEM_MULTISHIFTQUASITRSM_HPP\n\nnamespace elem {\n\ntemplate<typename F,Dist shiftColDist,\n                    Dist     XColDist,Dist XRowDist>\ninline void\nLocalMultiShiftQuasiTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  F alpha, const DistMatrix<F,STAR,STAR>& A,\n           const DistMatrix<F,shiftColDist,STAR    >& shifts,\n                 DistMatrix<F,    XColDist,XRowDist>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalMultiShiftQuasiTrsm\");\n        if( (side == LEFT &&  (     XColDist != STAR || \n                                shiftColDist != XRowDist) ) ||\n            (side == RIGHT && (     XRowDist != STAR || \n                                shiftColDist != XColDist) ) )\n            LogicError\n            (\"Dist of RHS and shifts must conform with that of triangle\");\n    )\n    // NOTE: Is this prototype available yet?!?\n    MultiShiftQuasiTrsm\n    ( side, uplo, orientation, \n      alpha, A.LockedMatrix(), shifts.LockedMatrix(), X.Matrix() );\n}\n\ntemplate<typename Real,Dist shiftColDist,\n                       Dist     XColDist,Dist XRowDist>\ninline void\nLocalMultiShiftQuasiTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  Complex<Real> alpha, \n  const DistMatrix<Real,         STAR,        STAR    >& A,\n  const DistMatrix<Complex<Real>,shiftColDist,STAR    >& shifts,\n        DistMatrix<Real,             XColDist,XRowDist>& XReal,\n        DistMatrix<Real,             XColDist,XRowDist>& XImag )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalMultiShiftQuasiTrsm\");\n        if( (side == LEFT &&  (     XColDist != STAR || \n                                shiftColDist != XRowDist) ) ||\n            (side == RIGHT && (     XRowDist != STAR || \n                                shiftColDist != XColDist) ) )\n            LogicError\n            (\"Dist of RHS and shifts must conform with that of triangle\");\n    )\n    // NOTE: Is this prototype available yet?!?\n    MultiShiftQuasiTrsm\n    ( side, uplo, orientation, \n      alpha, A.LockedMatrix(), shifts.LockedMatrix(), \n             XReal.Matrix(), XImag.Matrix() );\n}\n\n} // namespace elem\n\n#include \"./MultiShiftQuasiTrsm/LLN.hpp\"\n#include \"./MultiShiftQuasiTrsm/LLT.hpp\"\n#include \"./MultiShiftQuasiTrsm/LUN.hpp\"\n#include \"./MultiShiftQuasiTrsm/LUT.hpp\"\n//#include \"./MultiShiftQuasiTrsm/RLN.hpp\"\n//#include \"./MultiShiftQuasiTrsm/RLT.hpp\"\n//#include \"./MultiShiftQuasiTrsm/RUN.hpp\"\n//#include \"./MultiShiftQuasiTrsm/RUT.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nMultiShiftQuasiTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  F alpha, const Matrix<F>& A, const Matrix<F>& shifts, Matrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"MultiShiftQuasiTrsm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( side == LEFT )\n        {\n            if( A.Height() != B.Height() )\n                LogicError(\"Nonconformal\");\n        }\n        else\n        {\n            if( A.Height() != B.Width() )\n                LogicError(\"Nonconformal\");\n        }\n    )\n    Scale( alpha, B );\n    // TODO: Call the single right-hand side algorithm if appropriate\n\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            msquasitrsm::LLN( A, shifts, B );\n        else\n            msquasitrsm::LLT( orientation, A, shifts, B );\n    }\n    else if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            msquasitrsm::LUN( A, shifts, B );\n        else\n            msquasitrsm::LUT( orientation, A, shifts, B );\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            //msquasitrsm::RLN( A, B );\n            LogicError(\"This case not yet handled\");\n        else\n            //msquasitrsm::RLT( orientation, A, B );\n            LogicError(\"This case not yet handled\");\n    }\n    else if( side == RIGHT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            //msquasitrsm::RUN( A, B );\n            LogicError(\"This case not yet handled\");\n        else\n            //msquasitrsm::RUT( orientation, A, B );\n            LogicError(\"This case not yet handled\");\n    }\n}\n\ntemplate<typename Real>\ninline void\nMultiShiftQuasiTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  Complex<Real> alpha, \n  const Matrix<Real>& A, \n  const Matrix<Complex<Real>>& shifts, \n        Matrix<Real>& BReal, Matrix<Real>& BImag )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"MultiShiftQuasiTrsm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( side == LEFT )\n        {\n            if( A.Height() != BReal.Height() )\n                LogicError(\"Nonconformal\");\n        }\n        else\n        {\n            if( A.Height() != BReal.Width() )\n                LogicError(\"Nonconformal\");\n        }\n    )\n    Scale( alpha, BReal, BImag );\n    // TODO: Call the single right-hand side algorithm if appropriate\n\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            //msquasitrsm::LLN( A, shifts, BReal, BImag );\n            LogicError(\"This case not yet handled\");\n        else\n            //msquasitrsm::LLT( orientation, A, shifts, BReal, BImag );\n            LogicError(\"This case not yet handled\");\n    }\n    else if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            msquasitrsm::LUN( A, shifts, BReal, BImag );\n        else\n            msquasitrsm::LUT( orientation, A, shifts, BReal, BImag );\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            //msquasitrsm::RLN( A, BReal, BImag );\n            LogicError(\"This case not yet handled\");\n        else\n            //msquasitrsm::RLT( orientation, A, BReal, BImag );\n            LogicError(\"This case not yet handled\");\n    }\n    else if( side == RIGHT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            //msquasitrsm::RUN( A, BReal, BImag );\n            LogicError(\"This case not yet handled\");\n        else\n            //msquasitrsm::RUT( orientation, A, BReal, BImag );\n            LogicError(\"This case not yet handled\");\n    }\n}\n\ntemplate<typename F>\ninline void\nMultiShiftQuasiTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  F alpha, const DistMatrix<F>& A, const DistMatrix<F,VR,STAR>& shifts, \n  DistMatrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"MultiShiftQuasiTrsm\");\n        if( A.Grid() != B.Grid() )\n            LogicError(\"A and B must use the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( side == LEFT )\n        {\n            if( A.Height() != B.Height() )\n                LogicError(\"Nonconformal\");\n        }\n        else\n        {\n            if( A.Height() != B.Width() )\n                LogicError(\"Nonconformal\");\n        }\n    )\n    Scale( alpha, B );\n    // TODO: Call the single right-hand side algorithm if appropriate\n\n    //const Int p = B.Grid().Size();\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n        {\n            msquasitrsm::LLNLarge( A, shifts, B );\n            /*\n            if( B.Width() > 5*p )\n                msquasitrsm::LLNLarge( A, shifts, B );\n            else\n                msquasitrsm::LLNMedium( A, shifts, B );\n            */\n        }\n        else\n        {\n            msquasitrsm::LLTLarge( orientation, A, shifts, B );\n            /*\n            if( B.Width() > 5*p )\n                msquasitrsm::LLTLarge( orientation, A, shifts, B );\n            else\n                msquasitrsm::LLTMedium( orientation, A, shifts, B );\n            */\n        }\n    }\n    else if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n        {\n            msquasitrsm::LUNLarge( A, shifts, B );\n            /*\n            if( B.Width() > 5*p )\n                msquasitrsm::LUNLarge( A, shifts, B );\n            else\n                msquasitrsm::LUNMedium( A, shifts, B );\n            */\n        }\n        else\n        {\n            msquasitrsm::LUTLarge( orientation, A, shifts, B );\n            /*\n            if( B.Width() > 5*p )\n                msquasitrsm::LUTLarge( orientation, A, shifts, B );\n            else\n                msquasitrsm::LUTMedium( orientation, A, shifts, B );\n            */\n        }\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            //msquasitrsm::RLN( A, shifts, B );\n            LogicError(\"This case not yet handled\");\n        else\n            //msquasitrsm::RLT( orientation, A, shifts, B );\n            LogicError(\"This case not yet handled\");\n    }\n    else if( side == RIGHT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            //msquasitrsm::RUN( A, shifts, B );\n            LogicError(\"This case not yet handled\");\n        else\n            //msquasitrsm::RUT( orientation, A, shifts, B );\n            LogicError(\"This case not yet handled\");\n    }\n}\n\ntemplate<typename Real>\ninline void\nMultiShiftQuasiTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  Complex<Real> alpha, \n  const DistMatrix<Real>& A, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts, \n        DistMatrix<Real>& BReal, DistMatrix<Real>& BImag )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"MultiShiftQuasiTrsm\");\n        if( A.Grid() != BReal.Grid() || BReal.Grid() != BImag.Grid() )\n            LogicError(\"A and B must use the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( BReal.Height() != BImag.Height() ||\n            BReal.Width() != BImag.Width() )\n            LogicError(\"BReal and BImag must be the same size\");\n        if( side == LEFT )\n        {\n            if( A.Height() != BReal.Height() )\n                LogicError(\"Nonconformal\");\n        }\n        else\n        {\n            if( A.Height() != BReal.Width() )\n                LogicError(\"Nonconformal\");\n        }\n    )\n    Scale( alpha, BReal, BImag );\n    // TODO: Call the single right-hand side algorithm if appropriate\n\n    const Int p = BReal.Grid().Size();\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n        {\n            if( BReal.Width() > 5*p )\n                //msquasitrsm::LLNLarge( A, shifts, BReal, BImag );\n                LogicError(\"This case not yet handled\");\n            else\n                //msquasitrsm::LLNMedium( A, shifts, BReal, BImag );\n                LogicError(\"This case not yet handled\");\n        }\n        else\n        {\n            if( BReal.Width() > 5*p )\n                //msquasitrsm::LLTLarge( orientation, A, shifts, BReal, BImag );\n                LogicError(\"This case not yet handled\");\n            else\n                //msquasitrsm::LLTMedium( orientation, A, shifts, BReal, BImag );\n                LogicError(\"This case not yet handled\");\n        }\n    }\n    else if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n        {\n            msquasitrsm::LUNLarge( A, shifts, BReal, BImag );\n            /*\n            if( BReal.Width() > 5*p )\n                msquasitrsm::LUNLarge( A, shifts, BReal, BImag );\n            else\n                msquasitrsm::LUNMedium( A, shifts, BReal, BImag );\n            */\n        }\n        else\n        {\n            msquasitrsm::LUTLarge( orientation, A, shifts, BReal, BImag );\n            /*\n            if( BReal.Width() > 5*p )\n                msquasitrsm::LUTLarge( orientation, A, shifts, BReal, BImag );\n            else\n                msquasitrsm::LUTMedium( orientation, A, shifts, BReal, BImag );\n            */\n        }\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            //msquasitrsm::RLN( A, shifts, BReal, BImag );\n            LogicError(\"This case not yet handled\");\n        else\n            //msquasitrsm::RLT( orientation, A, shifts, BReal, BImag );\n            LogicError(\"This case not yet handled\");\n    }\n    else if( side == RIGHT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            //msquasitrsm::RUN( A, shifts, BReal, BImag );\n            LogicError(\"This case not yet handled\");\n        else\n            //msquasitrsm::RUT( orientation, A, shifts, BReal, BImag );\n            LogicError(\"This case not yet handled\");\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MULTISHIFTQUASITRSM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/MultiShiftTrsm/LUN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MULTISHIFTTRSM_LUN_HPP\n#define ELEM_MULTISHIFTTRSM_LUN_HPP\n\nnamespace elem {\nnamespace mstrsm {\n\ntemplate<typename F>\ninline void\nLeftUnb\n( UpperOrLower uplo, Orientation orientation, F alpha, \n  Matrix<F>& T, const Matrix<F>& shifts, Matrix<F>& X ) \n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"mstrsm::LeftUnb\");\n        if( shifts.Height() != X.Width() )\n            LogicError(\"Incompatible number of shifts\");\n    )\n    const char uploChar = ( uplo==LOWER ? 'L' : 'U' );\n    char orientChar; \n    switch( orientation )\n    {\n    case NORMAL:    orientChar = 'N'; break;\n    case TRANSPOSE: orientChar = 'T'; break;\n    default:        orientChar = 'C';\n    }\n    auto diag = T.GetDiagonal();\n    const Int n = T.Height();\n    const Int ldim = T.LDim();\n    const Int numShifts = shifts.Height();\n    Scale( alpha, X );\n    for( Int j=0; j<numShifts; ++j )\n    {\n        UpdateDiagonal( T, -shifts.Get(j,0) );\n        blas::Trsv\n        ( uploChar, orientChar, 'N', n, \n          T.LockedBuffer(), ldim, X.Buffer(0,j), 1 );\n        T.SetDiagonal( diag );\n    }\n}\n\ntemplate<typename F>\ninline void\nLUN( F alpha, Matrix<F>& U, const Matrix<F>& shifts, Matrix<F>& X ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"mstrsm::LUN\"))\n    Scale( alpha, X );\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 =       ViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        LeftUnb( UPPER, NORMAL, F(1), U11, shifts, X1 );\n        Gemm( NORMAL, NORMAL, F(-1), U01, X1, F(1), X0 );\n    }\n}\n\ntemplate<typename F>\ninline void\nLUN\n( F alpha, const DistMatrix<F>& U, const DistMatrix<F,VR,STAR>& shifts,\n  DistMatrix<F>& X ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"mstrsm::LUN\"))\n    Scale( alpha, X );\n\n    const Grid& g = U.Grid();\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        // X1[* ,VR] := U11^-1[* ,* ] X1[* ,VR]\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1_STAR_VR.AlignWith( shifts );\n        X1_STAR_VR = X1; // X1[* ,VR] <- X1[MC,MR]\n        LUN\n        ( F(1), U11_STAR_STAR.Matrix(), shifts.LockedMatrix(), \n          X1_STAR_VR.Matrix() );\n\n        X1_STAR_MR.AlignWith( X0 );\n        X1_STAR_MR = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1 = X1_STAR_MR; // X1[MC,MR] <- X1[* ,MR]\n\n        // X0[MC,MR] -= U01[MC,* ] X1[* ,MR]\n        U01_MC_STAR.AlignWith( X0 );\n        U01_MC_STAR = U01; // U01[MC,* ] <- U01[MC,MR]\n        LocalGemm( NORMAL, NORMAL, F(-1), U01_MC_STAR, X1_STAR_MR, F(1), X0 );\n    }\n}\n\n} // namespace mstrsm\n} // namespace elem\n\n#endif // ifndef ELEM_MULTISHIFTTRSM_LUN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/MultiShiftTrsm/LUT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MULTISHIFTTRSM_LUT_HPP\n#define ELEM_MULTISHIFTTRSM_LUT_HPP\n\n// Needed for mstrsm::LeftUnb\n#include \"./LUN.hpp\"\n\nnamespace elem {\nnamespace mstrsm {\n\ntemplate<typename F>\ninline void\nLUT\n( Orientation orientation, F alpha, \n  Matrix<F>& U, const Matrix<F>& shifts, Matrix<F>& X ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"mstrsm::LUT\"))\n    Scale( alpha, X );\n\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U11 =       ViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        LeftUnb( UPPER, orientation, F(1), U11, shifts, X1 );\n        Gemm( orientation, NORMAL, F(-1), U12, X1, F(1), X2 );\n    }\n}\n\ntemplate<typename F>\ninline void\nLUT\n( Orientation orientation, F alpha, \n  const DistMatrix<F>& U, const DistMatrix<F,VR,STAR>& shifts,\n        DistMatrix<F>& X ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"mstrsm::LUT\"))\n    Scale( alpha, X );\n\n    const Grid& g = U.Grid();\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        // X1[* ,VR] := U11^-'[*,*] X1[* ,VR]\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1_STAR_VR.AlignWith( shifts );\n        X1_STAR_VR = X1;  // X1[* ,VR] <- X1[MC,MR]\n        LUT\n        ( orientation, F(1), \n          U11_STAR_STAR.Matrix(), shifts.LockedMatrix(), X1_STAR_VR.Matrix() );\n\n        X1_STAR_MR.AlignWith( X2 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR]  <- X1[* ,MR]\n\n        // X2[MC,MR] -= (U12[* ,MC])' X1[* ,MR]\n        //            = U12'[MC,*] X1[* ,MR]\n        U12_STAR_MC.AlignWith( X2 );\n        U12_STAR_MC = U12; // U12[* ,MC] <- U12[MC,MR]\n        LocalGemm\n        ( orientation, NORMAL, F(-1), U12_STAR_MC, X1_STAR_MR, F(1), X2 );\n    }\n}\n\n} // namespace mstrsm\n} // namespace elem\n\n#endif // ifndef ELEM_MULTISHIFTTRSM_LUT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/MultiShiftTrsm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MULTISHIFTTRSM_HPP\n#define ELEM_MULTISHIFTTRSM_HPP\n\nnamespace elem {\n\ntemplate<typename F,Dist shiftColDist,\n                    Dist     XColDist,Dist XRowDist>\ninline void\nLocalMultiShiftTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation,\n  F alpha, const DistMatrix<F,STAR,STAR>& A,\n           const DistMatrix<F,shiftColDist,STAR    >& shifts,\n                 DistMatrix<F,    XColDist,XRowDist>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalMultiShiftTrsm\");\n        if( (side == LEFT &&  (     XColDist != STAR ||\n                                shiftColDist != XRowDist) ) ||\n            (side == RIGHT && (     XRowDist != STAR ||\n                                shiftColDist != XColDist) ) )\n            LogicError\n            (\"Dist of RHS and shifts must conform with that of triangle\");\n    )\n    // NOTE: Is this prototype available yet?!?\n    MultiShiftTrsm\n    ( side, uplo, orientation, \n      alpha, A.LockedMatrix(), shifts.LockedMatrix(), X.Matrix() );\n}\n\n} // namespace elem\n\n#include \"./MultiShiftTrsm/LUN.hpp\"\n#include \"./MultiShiftTrsm/LUT.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nMultiShiftTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation,\n  F alpha, const Matrix<F>& U, const Matrix<F>& shifts, Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MultiShiftTrsm\"))\n    if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            mstrsm::LUN( alpha, U, shifts, X );\n        else\n            mstrsm::LUT( orientation, alpha, U, shifts, X );\n    }\n    else\n        LogicError(\"This option is not yet supported\");\n}\n\ntemplate<typename F>\ninline void\nMultiShiftTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation,\n  F alpha, const DistMatrix<F>& U, const DistMatrix<F,VR,STAR>& shifts, \n  DistMatrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MultiShiftTrsm\"))\n    if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            mstrsm::LUN( alpha, U, shifts, X );\n        else\n            mstrsm::LUT( orientation, alpha, U, shifts, X );\n    }\n    else\n        LogicError(\"This option is not yet supported\");\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MULTISHIFTTRSM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/QuasiTrsm/LLN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASITRSM_LLN_HPP\n#define ELEM_QUASITRSM_LLN_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace quasitrsm {\n\n// Left Lower NORMAL (Non)Unit QuasiTrsm \n//   X := tril(L)^-1  X, or\n//   X := trilu(L)^-1 X\n\ntemplate<typename F>\ninline void\nLLNUnb( const Matrix<F>& L, Matrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"quasitrsm::LLNUnb\"))\n    typedef Base<F> Real;\n    const Int m = X.Height();\n    const Int n = X.Width();\n\n    const F* LBuf = L.LockedBuffer();\n          F* XBuf = X.Buffer();\n    const Int ldl = L.LDim();\n    const Int ldx = X.LDim();\n\n    Int k=0;\n    while( k < m )\n    {\n        const bool in2x2 = ( k+1<m && LBuf[k+(k+1)*ldl] != F(0) );\n        if( in2x2 ) \n        {\n            // Solve the 2x2 linear systems via a 2x2 LQ decomposition produced\n            // by the Givens rotation\n            //    | L(k,k) L(k,k+1) | | c -conj(s) | = | gamma11 0 |\n            //                        | s    c     |\n            // and by also forming the bottom two entries of the 2x2 resulting\n            // lower-triangular matrix, say gamma21 and gamma22\n            //\n            // Extract the 2x2 diagonal block, D\n            const F delta11 = LBuf[ k   + k   *ldl];\n            const F delta12 = LBuf[ k   +(k+1)*ldl];\n            const F delta21 = LBuf[(k+1)+ k   *ldl];\n            const F delta22 = LBuf[(k+1)+(k+1)*ldl];\n            // Decompose D = L Q\n            Real c; F s;\n            const F gamma11 = lapack::Givens( delta11, delta12, &c, &s );\n            const F gamma21 =        c*delta21 + s*delta22;\n            const F gamma22 = -Conj(s)*delta21 + c*delta22;\n            if( checkIfSingular )\n            {\n                // TODO: Check if sufficiently small instead\n                if( gamma11 == F(0) || gamma22 == F(0) )\n                    LogicError(\"Singular diagonal block detected\");\n            }\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldx];\n\n                // Solve against L\n                xBuf[k  ] /= gamma11;\n                xBuf[k+1] -= gamma21*xBuf[k];\n                xBuf[k+1] /= gamma22;\n\n                // Solve against Q\n                const F chi1 = xBuf[k  ];\n                const F chi2 = xBuf[k+1];\n                xBuf[k  ] = c*chi1 - Conj(s)*chi2;\n                xBuf[k+1] = s*chi1 +       c*chi2;\n\n                // Update x2 := x2 - L21 x1\n                blas::Axpy\n                ( m-(k+2), -xBuf[k  ], \n                  &LBuf[(k+2)+ k   *ldl], 1, &xBuf[k+2], 1 );\n                blas::Axpy\n                ( m-(k+2), -xBuf[k+1], \n                  &LBuf[(k+2)+(k+1)*ldl], 1, &xBuf[k+2], 1 );\n            }\n\n            k += 2;\n        }\n        else\n        {\n            if( checkIfSingular )\n            {\n                // TODO: Check if sufficiently small instead\n                if( LBuf[k+k*ldl] == F(0) )\n                    LogicError(\"Singular diagonal entry detected\");\n            }\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldx];\n                xBuf[k] /= LBuf[k+k*ldl];\n                blas::Axpy\n                ( m-(k+1), -xBuf[k], &LBuf[(k+1)+k*ldl], 1, &xBuf[k+1], 1 );\n            }\n            k += 1;\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nLLN( const Matrix<F>& L, Matrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"quasitrsm::LLN\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        LLNUnb( L11, X1, checkIfSingular );\n        Gemm( NORMAL, NORMAL, F(-1), L21, X1, F(1), X2 );\n    }\n}\n\n// For large numbers of RHS's, e.g., width(X) >> p\ntemplate<typename F>\ninline void\nLLNLarge( const DistMatrix<F>& L, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"quasitrsm::LLNLarge\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n\n        // X1[* ,VR] := L11^-1[* ,* ] X1[* ,VR]\n        LocalQuasiTrsm\n        ( LEFT, LOWER, NORMAL, F(1), L11_STAR_STAR, X1_STAR_VR,\n          checkIfSingular );\n\n        X1_STAR_MR.AlignWith( X2 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR] <- X1[* ,MR]\n        L21_MC_STAR.AlignWith( X2 );\n        L21_MC_STAR = L21;        // L21[MC,* ] <- L21[MC,MR]\n        \n        // X2[MC,MR] -= L21[MC,* ] X1[* ,MR]\n        LocalGemm( NORMAL, NORMAL, F(-1), L21_MC_STAR, X1_STAR_MR, F(1), X2 );\n    }\n}\n\n// For medium numbers of RHS's, e.g., width(X) ~= p\ntemplate<typename F>\ninline void\nLLNMedium( const DistMatrix<F>& L, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"quasitrsm::LLNMedium\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X2 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR ); // X1[* ,MR] <- X1[MC,MR]\n\n        // X1^T[MR,* ] := X1^T[MR,* ] L11^-T[* ,* ]\n        //              = (L11^-1[* ,* ] X1[* ,MR])^T\n        LocalQuasiTrsm\n        ( RIGHT, LOWER, TRANSPOSE,\n          F(1), L11_STAR_STAR, X1Trans_MR_STAR, checkIfSingular );\n\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR ); // X1[MC,MR] <- X1[* ,MR]\n        L21_MC_STAR.AlignWith( X2 );\n        L21_MC_STAR = L21;                   // L21[MC,* ] <- L21[MC,MR]\n        \n        // X2[MC,MR] -= L21[MC,* ] X1[* ,MR]\n        LocalGemm\n        ( NORMAL, TRANSPOSE, F(-1), L21_MC_STAR, X1Trans_MR_STAR, F(1), X2 );\n    }\n}\n\n// For small numbers of RHS's, e.g., width(X) < p\ntemplate<typename F,Dist colDist>\ninline void\nLLNSmall\n( const DistMatrix<F,colDist,STAR>& L, DistMatrix<F,colDist,STAR>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LLNSmall\");\n        if( L.ColAlign() != X.ColAlign() )\n            LogicError(\"L and X are assumed to be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), X1_STAR_STAR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && L.Get(k+nbProp-1,k+nbProp) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[VC,* ]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VC,* ]\n\n        // X1[* ,* ] := (L11[* ,* ])^-1 X1[* ,* ]\n        LocalQuasiTrsm\n        ( LEFT, LOWER, NORMAL, \n          F(1), L11_STAR_STAR, X1_STAR_STAR, checkIfSingular );\n\n        // X2[VC,* ] -= L21[VC,* ] X1[* ,* ]\n        LocalGemm( NORMAL, NORMAL, F(-1), L21, X1_STAR_STAR, F(1), X2 );\n    }\n}\n\n} // namespace quasitrsm\n} // namespace elem\n\n#endif // ifndef ELEM_QUASITRSM_LLN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/QuasiTrsm/LLT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASITRSM_LLT_HPP\n#define ELEM_QUASITRSM_LLT_HPP\n\n#include ELEM_GEMM_INC\n#include ELEM_TRSM_INC\n\nnamespace elem {\nnamespace quasitrsm {\n\n// Left Lower (Conjugate)Transpose (Non)Unit QuasiTrsm\n//   X := tril(L)^-T,\n//   X := tril(L)^-H,\n//   X := trilu(L)^-T, or\n//   X := trilu(L)^-H\n\ntemplate<typename F>\ninline void\nLLTUnb( bool conjugate, const Matrix<F>& L, Matrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"quasitrsm::LLTUnb\"))\n    typedef Base<F> Real;\n    const Int m = X.Height();\n    const Int n = X.Width();\n\n    const F* LBuf = L.LockedBuffer();\n          F* XBuf = X.Buffer();\n    const Int ldl = L.LDim();\n    const Int ldx = X.LDim();\n\n    if( conjugate )\n        Conjugate( X );\n\n    Int k=m-1;\n    while( k >= 0 )\n    {\n        const bool in2x2 = ( k>0 && LBuf[(k-1)+k*ldl] != F(0) );\n        if( in2x2 )\n        {\n            --k;\n            // Solve the 2x2 linear systems via a 2x2 LQ decomposition produced\n            // by the Givens rotation\n            //    | L(k,k) L(k,k+1) | | c -conj(s) | = | gamma11 0 |\n            //                        | s    c     |\n            // and by also forming the bottom two entries of the 2x2 resulting\n            // lower-triangular matrix, say gamma21 and gamma22\n            //\n            // Extract the 2x2 diagonal block, D\n            const F delta11 = LBuf[   k +   k *ldl];\n            const F delta12 = LBuf[   k +(k+1)*ldl];\n            const F delta21 = LBuf[(k+1)+   k *ldl];\n            const F delta22 = LBuf[(k+1)+(k+1)*ldl];\n            // Decompose D = L Q\n            Real c; F s;\n            const F gamma11 = lapack::Givens( delta11, delta12, &c, &s );\n            const F gamma21 =        c*delta21 + s*delta22;\n            const F gamma22 = -Conj(s)*delta21 + c*delta22;\n            if( checkIfSingular )\n            {\n                // TODO: Instead check if values are too small in magnitude\n                if( gamma11 == F(0) || gamma22 == F(0) )\n                    LogicError(\"Singular diagonal block detected\");\n            }\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldx];\n                // Solve against Q^T\n                const F chi1 = xBuf[k  ];\n                const F chi2 = xBuf[k+1];\n                xBuf[k  ] =        c*chi1 + s*chi2;\n                xBuf[k+1] = -Conj(s)*chi1 + c*chi2;\n\n                // Solve against R^T\n                xBuf[k+1] /= gamma22;\n                xBuf[k  ] -= gamma21*xBuf[k+1];\n                xBuf[k  ] /= gamma11;\n\n                // Update x0 := x0 - L10^T x1\n                blas::Axpy( k, -xBuf[k  ], &LBuf[k  ], ldl, xBuf, 1 );\n                blas::Axpy( k, -xBuf[k+1], &LBuf[k+1], ldl, xBuf, 1 );\n            }\n        }\n        else\n        {\n            if( checkIfSingular )\n                if( LBuf[k+k*ldl] == F(0) )\n                    LogicError(\"Singular diagonal entry detected\");\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldx];\n                // Solve the 1x1 linear system\n                xBuf[k] /= LBuf[k+k*ldl];\n\n                // Update x0 := x0 - l10^T chi_1\n                blas::Axpy( k, -xBuf[k], &LBuf[k], ldl, xBuf, 1 );\n            }\n        }\n        --k;\n    }\n    if( conjugate )\n        Conjugate( X );\n}\n\ntemplate<typename F>\ninline void\nLLT\n( Orientation orientation, \n  const Matrix<F>& L, Matrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LLT\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n\n    const bool conjugate = ( orientation==ADJOINT );\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        LLTUnb( conjugate, L11, X1, checkIfSingular );\n        Gemm( orientation, NORMAL, F(-1), L10, X1, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\n// width(X) >> p\ntemplate<typename F>\ninline void\nLLTLarge\n( Orientation orientation, \n  const DistMatrix<F>& L, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LLTLarge\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n\n        // X1[* ,VR] := L11^-[T/H][* ,* ] X1[* ,VR]\n        LocalQuasiTrsm\n        ( LEFT, LOWER, orientation, F(1), L11_STAR_STAR, X1_STAR_VR,\n          checkIfSingular );\n\n        X1_STAR_MR.AlignWith( X0 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR] <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR] <- X1[* ,MR]\n        L10_STAR_MC.AlignWith( X0 );\n        L10_STAR_MC = L10;        // L10[* ,MC] <- L10[MC,MR]\n\n        // X0[MC,MR] -= (L10[* ,MC])^(T/H) X1[* ,MR]\n        //            = L10^[T/H][MC,* ] X1[* ,MR]\n        LocalGemm\n        ( orientation, NORMAL, F(-1), L10_STAR_MC, X1_STAR_MR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\n// width(X) ~= p\ntemplate<typename F>\ninline void\nLLTMedium\n( Orientation orientation, const DistMatrix<F>& L, DistMatrix<F>& X, \n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LLTMedium\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        // X1[* ,MR] <- X1[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X0 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR, (orientation==ADJOINT) );\n\n        // X1[* ,MR] := L11^-[T/H][* ,* ] X1[* ,MR]\n        // X1^[T/H][MR,* ] := X1^[T/H][MR,* ] L11^-1[* ,* ]\n        LocalQuasiTrsm\n        ( RIGHT, LOWER, NORMAL,\n          F(1), L11_STAR_STAR, X1Trans_MR_STAR, checkIfSingular );\n\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR, (orientation==ADJOINT) );\n        L10_STAR_MC.AlignWith( X0 );\n        L10_STAR_MC = L10; // L10[* ,MC] <- L10[MC,MR]\n\n        // X0[MC,MR] -= (L10[* ,MC])^[T/H] X1[* ,MR]\n        //            = L10^[T/H][MC,* ] X1[* ,MR]\n        LocalGemm\n        ( orientation, orientation, \n          F(-1), L10_STAR_MC, X1Trans_MR_STAR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\nusing trsm::AddInLocalData;\n\n// width(X) << p\ntemplate<typename F,Dist colDist>\ninline void\nLLTSmall\n( Orientation orientation, \n  const DistMatrix<F,colDist,STAR>& L, DistMatrix<F,colDist,STAR>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LLTSmall\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( L.Height() != L.Width() || L.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( L.ColAlign() != X.ColAlign() )\n            LogicError(\"L and X must be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> Z1_STAR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        // X1 -= L21' X2\n        LocalGemm( orientation, NORMAL, F(-1), L21, X2, Z1_STAR_STAR );\n        AddInLocalData( X1, Z1_STAR_STAR );\n        Z1_STAR_STAR.SumOver( X1.DistComm() );\n\n        // X1 := L11^-1 X1\n        L11_STAR_STAR = L11;\n        LocalQuasiTrsm\n        ( LEFT, LOWER, orientation, F(1), L11_STAR_STAR, Z1_STAR_STAR,\n          checkIfSingular );\n        X1 = Z1_STAR_STAR;\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename F,Dist rowDist>\ninline void\nLLTSmall\n( Orientation orientation, \n  const DistMatrix<F,STAR,rowDist>& L, DistMatrix<F,rowDist,STAR>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LLTSmall\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( L.Height() != L.Width() || L.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( L.RowAlign() != X.ColAlign() )\n            LogicError(\"L and X must be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), X1_STAR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && L.Get(k-1,k) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[* ,VR]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VR,* ]\n\n        // X1[* ,* ] := L11^-[T/H][* ,* ] X1[* ,* ]\n        LocalQuasiTrsm\n        ( LEFT, LOWER, orientation,\n          F(1), L11_STAR_STAR, X1_STAR_STAR, checkIfSingular );\n\n        X1 = X1_STAR_STAR;\n\n        // X0[VR,* ] -= L10[* ,VR]^(T/H) X1[* ,* ]\n        LocalGemm( orientation, NORMAL, F(-1), L10, X1_STAR_STAR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\n} // namespace quasitrsm\n} // namespace elem\n\n#endif // ifndef ELEM_QUASITRSM_LLT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/QuasiTrsm/LUN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASITRSM_LUN_HPP\n#define ELEM_QUASITRSM_LUN_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace quasitrsm {\n\n// Left Upper Normal (Non)Unit Trsm\n//   X := triu(U)^-1  X, or\n//   X := triuu(U)^-1 X\n\ntemplate<typename F>\ninline void\nLUNUnb( const Matrix<F>& U, Matrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"quasitrsm::LUNUnb\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    typedef Base<F> Real;\n    \n    const F* UBuf = U.LockedBuffer();\n          F* XBuf = X.Buffer();\n    const Int ldu = U.LDim();\n    const Int ldx = X.LDim();\n    \n    Int k=m-1;\n    while( k >= 0 )\n    {\n        const bool in2x2 = ( k>0 && UBuf[k+(k-1)*ldu] != F(0) );\n        if( in2x2 )\n        {\n            --k;\n            // Solve the 2x2 linear systems via a 2x2 QR decomposition produced\n            // by the Givens rotation\n            //    | c        s | | U(k,  k) | = | gamma11 | \n            //    | -conj(s) c | | U(k+1,k) |   | 0       |\n            //\n            // and by also forming the right two entries of the 2x2 resulting\n            // upper-triangular matrix, say gamma12 and gamma22\n            //\n            // Extract the 2x2 diagonal block, D\n            const F delta11 = UBuf[ k   + k   *ldu];\n            const F delta12 = UBuf[ k   +(k+1)*ldu];\n            const F delta21 = UBuf[(k+1)+ k   *ldu];\n            const F delta22 = UBuf[(k+1)+(k+1)*ldu];\n            // Decompose D = Q R\n            Real c; F s;\n            const F gamma11 = lapack::Givens( delta11, delta21, &c, &s );\n            const F gamma12 =        c*delta12 + s*delta22;\n            const F gamma22 = -Conj(s)*delta12 + c*delta22;\n            if( checkIfSingular )\n            {\n                // TODO: Instead check if values are too small in magnitude\n                if( gamma11 == F(0) || gamma22 == F(0) )\n                    LogicError(\"Singular diagonal block detected\");\n            }\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldx];\n                // Solve against Q\n                const F chi1 = xBuf[k  ];\n                const F chi2 = xBuf[k+1];\n                xBuf[k  ] =        c*chi1 + s*chi2;\n                xBuf[k+1] = -Conj(s)*chi1 + c*chi2;\n\n                // Solve against R\n                xBuf[k+1] /= gamma22;\n                xBuf[k  ] -= gamma12*xBuf[k+1];\n                xBuf[k  ] /= gamma11;\n\n                // Update x0 := x0 - U01 x1\n                blas::Axpy( k, -xBuf[k  ], &UBuf[ k   *ldu], 1, xBuf, 1 );\n                blas::Axpy( k, -xBuf[k+1], &UBuf[(k+1)*ldu], 1, xBuf, 1 );\n            }\n        }\n        else\n        {\n            if( checkIfSingular )\n                if( UBuf[k+k*ldu] == F(0) )\n                    LogicError(\"Singular diagonal entry detected\");\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldx];\n                // Solve the 1x1 linear system\n                xBuf[k] /= UBuf[k+k*ldu];\n\n                // Update x0 := x0 - u01 chi_1\n                blas::Axpy( k, -xBuf[k], &UBuf[k*ldu], 1, xBuf, 1 );\n            }\n        }\n        --k;\n    }\n}\n\ntemplate<typename F>\ninline void\nLUN( const Matrix<F>& U, Matrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"quasitrsm::LUN\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        LUNUnb( U11, X1, checkIfSingular );\n        Gemm( NORMAL, NORMAL, F(-1), U01, X1, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename F>\ninline void\nLUNLarge\n( const DistMatrix<F>& U, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"quasitrsm::LUNLarge\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n        \n        // X1[* ,VR] := U11^-1[* ,* ] X1[* ,VR]\n        LocalQuasiTrsm\n        ( LEFT, UPPER, NORMAL, F(1), U11_STAR_STAR, X1_STAR_VR,\n          checkIfSingular );\n\n        X1_STAR_MR.AlignWith( X0 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR] <- X1[* ,MR]\n        U01_MC_STAR.AlignWith( X0 );\n        U01_MC_STAR = U01;        // U01[MC,* ] <- U01[MC,MR]\n\n        // X0[MC,MR] -= U01[MC,* ] X1[* ,MR]\n        LocalGemm( NORMAL, NORMAL, F(-1), U01_MC_STAR, X1_STAR_MR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename F>\ninline void\nLUNMedium\n( const DistMatrix<F>& U, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"quasitrsm::LUNMedium\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X0 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR ); // X1[* ,MR] <- X1[MC,MR]\n        \n        // X1^T[MR,* ] := X1^T[MR,* ] U11^-T[* ,* ]\n        //              = (U11^-1[* ,* ] X1[* ,MR])^T\n        LocalQuasiTrsm\n        ( RIGHT, UPPER, TRANSPOSE,\n          F(1), U11_STAR_STAR, X1Trans_MR_STAR, checkIfSingular );\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR );\n\n        U01_MC_STAR.AlignWith( X0 );\n        U01_MC_STAR = U01;  // U01[MC,* ] <- U01[MC,MR]\n\n        // X0[MC,MR] -= U01[MC,* ] X1[* ,MR]\n        LocalGemm\n        ( NORMAL, TRANSPOSE, F(-1), U01_MC_STAR, X1Trans_MR_STAR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\ntemplate<typename F,Dist colDist>\ninline void\nLUNSmall\n( const DistMatrix<F,colDist,STAR>& U, DistMatrix<F,colDist,STAR>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LUNSmall\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( U.Height() != U.Width() || U.Width() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( U.ColAlign() != X.ColAlign() )\n            LogicError(\"U and X are assumed to be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g), X1_STAR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    Int k=kLast, kOld=m;\n    while( true )\n    {\n        const bool in2x2 = ( k>0 && U.Get(k,k-1) != F(0) );\n        if( in2x2 )\n            --k;\n        const Int nb = kOld-k;\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[VC,* ]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VC,* ]\n        \n        // X1[* ,* ] := U11^-1[* ,* ] X1[* ,* ]\n        LocalQuasiTrsm\n        ( LEFT, UPPER, NORMAL, \n          F(1), U11_STAR_STAR, X1_STAR_STAR, checkIfSingular );\n        X1 = X1_STAR_STAR;\n\n        // X0[VC,* ] -= U01[VC,* ] X1[* ,* ]\n        LocalGemm( NORMAL, NORMAL, F(-1), U01, X1_STAR_STAR, F(1), X0 );\n\n        if( k == 0 )\n            break;\n        kOld = k;\n        k -= Min(bsize,k);\n    }\n}\n\n} // namespace quasitrsm\n} // namespace elem\n\n#endif // ifndef ELEM_QUASITRSM_LUN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/QuasiTrsm/LUT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASITRSM_LUT_HPP\n#define ELEM_QUASITRSM_LUT_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace quasitrsm {\n\n// Left Upper (Conjugate)Transpose (Non)Unit QuasiTrsm\n//   X := triu(U)^-T  X, \n//   X := triu(U)^-H  X,\n//   X := triuu(U)^-T X, or\n//   X := triuu(U)^-H X\n\ntemplate<typename F>\ninline void\nLUTUnb( bool conjugate, const Matrix<F>& U, Matrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"quasitrsm::LUTUnb\"))\n    typedef Base<F> Real;\n    const Int m = X.Height();\n    const Int n = X.Width();\n    if( conjugate )\n        Conjugate( X );\n\n    const F* UBuf = U.LockedBuffer();\n          F* XBuf = X.Buffer();\n    const Int ldu = U.LDim();\n    const Int ldx = X.LDim();\n\n    Int k=0;\n    while( k < m )\n    {\n        const bool in2x2 = ( k+1<m && UBuf[(k+1)+k*ldu] != F(0) );\n        if( in2x2 )\n        {\n            // Solve the 2x2 linear systems via a 2x2 QR decomposition produced\n            // by the Givens rotation\n            //    | c        s | | U(k,  k) | = | gamma11 | \n            //    | -conj(s) c | | U(k+1,k) |   | 0       |\n            //\n            // and by also forming the right two entries of the 2x2 resulting\n            // upper-triangular matrix, say gamma12 and gamma22\n            //\n            // Extract the 2x2 diagonal block, D\n            const F delta11 = UBuf[ k   + k   *ldu];\n            const F delta12 = UBuf[ k   +(k+1)*ldu];\n            const F delta21 = UBuf[(k+1)+ k   *ldu];\n            const F delta22 = UBuf[(k+1)+(k+1)*ldu];\n            // Decompose D = Q R\n            Real c; F s;\n            const F gamma11 = lapack::Givens( delta11, delta21, &c, &s );\n            const F gamma12 =        c*delta12 + s*delta22;\n            const F gamma22 = -Conj(s)*delta12 + c*delta22;\n            if( checkIfSingular )\n            {\n                // TODO: Check if sufficiently small instead\n                if( gamma11 == F(0) || gamma22 == F(0) )\n                    LogicError(\"Singular diagonal block detected\");\n            }\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldx];\n\n                // Solve against R^T\n                xBuf[k  ] /= gamma11;\n                xBuf[k+1] -= gamma12*xBuf[k];\n                xBuf[k+1] /= gamma22;\n\n                // Solve against Q^T\n                const F chi1 = xBuf[k  ];\n                const F chi2 = xBuf[k+1];\n                xBuf[k  ] = c*chi1 - Conj(s)*chi2;\n                xBuf[k+1] = s*chi1 +       c*chi2;\n\n                // Update x2 := x2 - U12^T x1\n                blas::Axpy\n                ( m-(k+2), -xBuf[k  ],\n                  &UBuf[ k   +(k+2)*ldu], ldu, &xBuf[k+2], 1 );\n                blas::Axpy\n                ( m-(k+2), -xBuf[k+1],\n                  &UBuf[(k+1)+(k+2)*ldu], ldu, &xBuf[k+2], 1 );\n            }\n            k += 2;\n        }\n        else\n        {\n            if( checkIfSingular )\n            {\n                // TODO: Check if sufficiently small instead\n                if( UBuf[k+k*ldu] == F(0) )\n                    LogicError(\"Singular diagonal entry detected\");\n            }\n            for( Int j=0; j<n; ++j )\n            {\n                F* xBuf = &XBuf[j*ldx];\n                xBuf[k] /= UBuf[k+k*ldu];\n                blas::Axpy\n                ( m-(k+1), -xBuf[k], &UBuf[k+(k+1)*ldu], ldu, &xBuf[k+1], 1 );\n            }\n            k += 1;\n        }\n    }\n    if( conjugate )\n        Conjugate( X );\n}\n\ntemplate<typename F>\ninline void\nLUT\n( Orientation orientation, const Matrix<F>& U, Matrix<F>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LUT\");\n        if( orientation == NORMAL )\n            LogicError(\"QuasiTrsmLUT expects a (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n\n    const bool conjugate = ( orientation==ADJOINT );\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        LUTUnb( conjugate, U11, X1, checkIfSingular );\n        Gemm( orientation, NORMAL, F(-1), U12, X1, F(1), X2 );\n    }\n}\n\n// width(X) >> p\ntemplate<typename F>\ninline void\nLUTLarge\n( Orientation orientation, const DistMatrix<F>& U, DistMatrix<F>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LUTLarge\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsmLUT expects a (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n        \n        // X1[* ,VR] := U11^-[T/H][*,*] X1[* ,VR]\n        LocalQuasiTrsm\n        ( LEFT, UPPER, orientation, F(1), U11_STAR_STAR, X1_STAR_VR,\n          checkIfSingular );\n\n        X1_STAR_MR.AlignWith( X2 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR]  <- X1[* ,MR]\n        U12_STAR_MC.AlignWith( X2 );\n        U12_STAR_MC = U12;        // U12[* ,MC] <- U12[MC,MR]\n\n        // X2[MC,MR] -= (U12[* ,MC])^(T/H) X1[* ,MR]\n        //            = U12^(T/H)[MC,*] X1[* ,MR]\n        LocalGemm\n        ( orientation, NORMAL, F(-1), U12_STAR_MC, X1_STAR_MR, F(1), X2 );\n    }\n}\n\n// width(X) ~= p\ntemplate<typename F>\ninline void\nLUTMedium\n( Orientation orientation, \n  const DistMatrix<F>& U, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LUTMedium\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsmLUT expects a (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        // X1[* ,VR] <- X1[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X2 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR, (orientation==ADJOINT) );\n        \n        // X1[* ,MR] := U11^-[T/H][*,*] X1[* ,MR]\n        // X1^[T/H][MR,* ] := X1^[T/H][MR,* ] U11^-1[* ,* ]\n        LocalQuasiTrsm\n        ( RIGHT, UPPER, NORMAL, \n          F(1), U11_STAR_STAR, X1Trans_MR_STAR, checkIfSingular );\n\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR, (orientation==ADJOINT) );\n        U12_STAR_MC.AlignWith( X2 );\n        U12_STAR_MC = U12; // U12[* ,MC] <- U12[MC,MR]\n\n        // X2[MC,MR] -= (U12[* ,MC])^[T/H] X1[* ,MR]\n        //            = U12^[T/H][MC,*] X1[* ,MR]\n        LocalGemm\n        ( orientation, orientation, \n          F(-1), U12_STAR_MC, X1Trans_MR_STAR, F(1), X2 );\n    }\n}\n\n// width(X) << p\ntemplate<typename F,Dist rowDist>\ninline void\nLUTSmall\n( Orientation orientation, \n  const DistMatrix<F,STAR,rowDist>& U, DistMatrix<F,rowDist,STAR>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"quasitrsm::LUTSmall\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"TrsmLUT expects a (Conjugate)Transpose option\");\n        if( U.Height() != U.Width() || U.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( U.RowAlign() != X.ColAlign() )\n            LogicError(\"U and X are assumed to be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g), X1_STAR_STAR(g); \n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nbProp = Min(bsize,m-k);\n        const bool in2x2 = ( k+nbProp<m && U.Get(k+nbProp,k+nbProp-1) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[* ,VR]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VR,* ]\n        \n        // X1[* ,* ] := U11^-[T/H][* ,* ] X1[* ,* ]\n        LocalQuasiTrsm\n        ( LEFT, UPPER, orientation,\n          F(1), U11_STAR_STAR, X1_STAR_STAR, checkIfSingular );\n\n        X1 = X1_STAR_STAR;\n\n        // X2[VR,* ] -= U12[* ,VR]^[T/H] X1[* ,* ]\n        LocalGemm( orientation, NORMAL, F(-1), U12, X1_STAR_STAR, F(1), X2 );\n    }\n}\n\n} // namespace quasitrsm\n} // namespace elem\n\n#endif // ifndef ELEM_QUASITRSM_LUT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/QuasiTrsm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUASITRSM_HPP\n#define ELEM_QUASITRSM_HPP\n\n#include ELEM_QUASITRSV_INC\n\nnamespace elem {\n\ntemplate<typename F,Dist XColDist,Dist XRowDist>\ninline void\nLocalQuasiTrsm\n( LeftOrRight side, UpperOrLower uplo,\n  Orientation orientation, \n  F alpha, const DistMatrix<F,STAR,STAR>& A,\n                 DistMatrix<F,XColDist,XRowDist>& X,\n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalQuasiTrsm\");\n        if( (side == LEFT && XColDist != STAR) ||\n            (side == RIGHT && XRowDist != STAR) )\n            LogicError\n            (\"Dist of RHS must conform with that of triangle\");\n    )\n    QuasiTrsm\n    ( side, uplo, orientation, \n      alpha, A.LockedMatrix(), X.Matrix(), checkIfSingular );\n}\n\n} // namespace elem\n\n#include \"./QuasiTrsm/LLN.hpp\"\n#include \"./QuasiTrsm/LLT.hpp\"\n#include \"./QuasiTrsm/LUN.hpp\"\n#include \"./QuasiTrsm/LUT.hpp\"\n//#include \"./QuasiTrsm/RLN.hpp\"\n//#include \"./QuasiTrsm/RLT.hpp\"\n//#include \"./QuasiTrsm/RUN.hpp\"\n//#include \"./QuasiTrsm/RUT.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nQuasiTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  F alpha, const Matrix<F>& A, Matrix<F>& B,\n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"QuasiTrsm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( side == LEFT )\n        {\n            if( A.Height() != B.Height() )\n                LogicError(\"Nonconformal Trsm\");\n        }\n        else\n        {\n            if( A.Height() != B.Width() )\n                LogicError(\"Nonconformal Trsm\");\n        }\n    )\n    Scale( alpha, B );\n    // Call the single right-hand side algorithm if appropriate\n    if( side == LEFT && B.Width() == 1 )\n    {\n        QuasiTrsv( uplo, orientation, A, B );\n        return;\n    }\n    // TODO: Compute appropriate transpose/conjugation options to convert\n    //       to Trsv.\n    /*\n    else if( side == RIGHT && B.Height() == 1 )\n    {\n        QuasiTrsv( uplo, orientation, A, B );\n        return;\n    }\n    */\n\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            quasitrsm::LLN( A, B, checkIfSingular );\n        else\n            quasitrsm::LLT( orientation, A, B, checkIfSingular );\n    }\n    else if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            quasitrsm::LUN( A, B, checkIfSingular );\n        else\n            quasitrsm::LUT( orientation, A, B, checkIfSingular );\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            //quasitrsm::RLN( A, B, checkIfSingular );\n            LogicError(\"This case not yet handled\");\n        else\n            //quasitrsm::RLT( orientation, A, B, checkIfSingular );\n            LogicError(\"This case not yet handled\");\n    }\n    else if( side == RIGHT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            //quasitrsm::RUN( A, B, checkIfSingular );\n            LogicError(\"This case not yet handled\");\n        else\n            //quasitrsm::RUT( orientation, A, B, checkIfSingular );\n            LogicError(\"This case not yet handled\");\n    }\n}\n\ntemplate<typename F>\ninline void\nQuasiTrsm\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  F alpha, const DistMatrix<F>& A, DistMatrix<F>& B,\n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"QuasiTrsm\");\n        if( A.Grid() != B.Grid() )\n            LogicError(\"A and B must use the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( side == LEFT )\n        {\n            if( A.Height() != B.Height() )\n                LogicError(\"Nonconformal Trsm\");\n        }\n        else\n        {\n            if( A.Height() != B.Width() )\n                LogicError(\"Nonconformal Trsm\");\n        }\n    )\n    Scale( alpha, B );\n    // Call the single right-hand side algorithm if appropriate\n    if( side == LEFT && B.Width() == 1 )\n    {\n        QuasiTrsv( uplo, orientation, A, B );\n        return;\n    }\n    // TODO: Compute appropriate transpose/conjugation options to convert\n    //       to Trsv.\n    /*\n    else if( side == RIGHT && B.Height() == 1 )\n    {\n        QuasiTrsv( uplo, orientation, A, B );\n        return;\n    }\n    */\n\n    const Int p = B.Grid().Size();\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n        {\n            if( B.Width() > 5*p )\n                quasitrsm::LLNLarge( A, B, checkIfSingular );\n            else\n                quasitrsm::LLNMedium( A, B, checkIfSingular );\n        }\n        else\n        {\n            if( B.Width() > 5*p )\n                quasitrsm::LLTLarge( orientation, A, B, checkIfSingular );\n            else\n                quasitrsm::LLTMedium( orientation, A, B, checkIfSingular );\n        }\n    }\n    else if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n        {\n            if( B.Width() > 5*p )\n                quasitrsm::LUNLarge( A, B, checkIfSingular );\n            else\n                quasitrsm::LUNMedium( A, B, checkIfSingular );\n        }\n        else\n        {\n            if( B.Width() > 5*p )\n                quasitrsm::LUTLarge( orientation, A, B, checkIfSingular );\n            else\n                quasitrsm::LUTMedium( orientation, A, B, checkIfSingular );\n        }\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            //quasitrsm::RLN( A, B, checkIfSingular );\n            LogicError(\"This case not yet handled\");\n        else\n            //quasitrsm::RLT( orientation, A, B, checkIfSingular );\n            LogicError(\"This case not yet handled\");\n    }\n    else if( side == RIGHT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            //quasitrsm::RUN( A, B, checkIfSingular );\n            LogicError(\"This case not yet handled\");\n        else\n            //quasitrsm::RUT( orientation, A, B, checkIfSingular );\n            LogicError(\"This case not yet handled\");\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_QUASITRSM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/README.md",
    "content": "### `include/elemental/blas-like/level3/`\n\nThe level-3 BLAS-like routines implemented in this folder are:\n\n-  `Gemm/`: supporting routines for GEneral Matrix/Matrix multiplication (GEMM)\n-  `Gemm.hpp`: interface for GEMM\n-  `Hemm.hpp`: HErmitian Matrix/Matrix multiplication (HEMM)\n-  `Her2k.hpp`: HErmitian Rank-2k update (HER2K)\n-  `Herk.hpp`: HErmitian Rank-k update (HERK)\n-  `Symm/`: supporting routines for SYmmetric Matrix/Matrix multiplication \n   (SYMM)\n-  `Symm.hpp`: interface for SYMM\n-  `Syr2k/`: supporting routines for SYmmetric Rank-2k update (SYR2K)\n-  `Syr2k.hpp`: interface for SYR2K\n-  `Syrk/`: supporting routines for SYmmetric Rank-k update (SYRK)\n-  `Syrk.hpp`: interface for SYRK\n-  `Trdtrmm/`: supporting routiens for TRiangular/Diagonal/TRiangular Matrix \n   Multiplication (TRDTRMM)\n-  `Trdtrmm.hpp`: interface for TRDTRMM\n-  `Trmm/`: supporting routines for TRiangular Matrix Multiplication (TRMM)\n-  `Trmm.hpp`: interface for TRMM\n-  `Trsm/`: supporting routines for TRiangular Solve of Matrix (TRSM)\n-  `Trsm.hpp`: interface for TRSM\n-  `Trtrmm/`: supporting routines for TRiangular TRiangular Matrix \n   Multiplication (TRTRMM)\n-  `Trtrmm.hpp`: interface for TRTRMM\n-  `Trstrm/`: supporting routines for TRiangular Solve against TRiangular Matrix\n   (TRSTRM)\n-  `Trstrm.hpp`: interface for TRSTRM\n-  `TwoSidedTrmm/`: supporting routines for overwriting a Hermitian matrix with\n   its congruence relative to a given triangular matrix\n-  `TwoSidedTrmm.hpp`: interface for `TwoSidedTrmm`\n-  `TwoSidedTrsm/`: supporting routines for overwriting a Hermitian matrix with\n   its congruence relative to the inverse of a given triangular matrix\n-  `TwoSidedTrsm.hpp`: interface for `TwoSidedTrsm`\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Symm/LL.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMM_LL_HPP\n#define ELEM_SYMM_LL_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nLocalSymmetricAccumulateLL\n( Orientation orientation, T alpha,\n  const DistMatrix<T>& A,\n  const DistMatrix<T,MC,  STAR>& B_MC_STAR,\n  const DistMatrix<T,STAR,MR  >& BTrans_STAR_MR,\n        DistMatrix<T,MC,  STAR>& Z_MC_STAR,\n        DistMatrix<T,MR,  STAR>& Z_MR_STAR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::LocalSymmetricAccumulateLL\");\n        if( A.Grid() != B_MC_STAR.Grid() ||\n            B_MC_STAR.Grid() != BTrans_STAR_MR.Grid() ||\n            BTrans_STAR_MR.Grid() != Z_MC_STAR.Grid() ||\n            Z_MC_STAR.Grid() != Z_MR_STAR.Grid() )\n            LogicError(\"{A,B,Z} must be distributed over the same grid\");\n        if( A.Height() != A.Width() ||\n            A.Height() != B_MC_STAR.Height() ||\n            A.Height() != BTrans_STAR_MR.Width() ||\n            A.Height() != Z_MC_STAR.Height() ||\n            A.Height() != Z_MR_STAR.Height() ||\n            B_MC_STAR.Width() != BTrans_STAR_MR.Height() ||\n            BTrans_STAR_MR.Height() != Z_MC_STAR.Width() ||\n            Z_MC_STAR.Width() != Z_MR_STAR.Width() )\n            LogicError\n            (\"Nonconformal LocalSymmetricAccumulateLL:\\n\",\n             DimsString(A,\"A\"),\"\\n\",\n             DimsString(B_MC_STAR,\"B[MC,* ]\"),\"\\n\",\n             DimsString(BTrans_STAR_MR,\"B'[* ,MR]\"),\"\\n\",\n             DimsString(Z_MC_STAR,\"Z[MC,* ]\"),\"\\n\",\n             DimsString(Z_MR_STAR,\"Z[MR,* ]\"));\n        if( B_MC_STAR.ColAlign() != A.ColAlign() ||\n            BTrans_STAR_MR.RowAlign() != A.RowAlign() ||\n            Z_MC_STAR.ColAlign() != A.ColAlign() ||\n            Z_MR_STAR.ColAlign() != A.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n\n    DistMatrix<T> D11(g);\n\n    DistMatrix<T,MC,STAR>\n        BT_MC_STAR(g),  B0_MC_STAR(g),\n        BB_MC_STAR(g),  B1_MC_STAR(g),\n                        B2_MC_STAR(g);\n\n    DistMatrix<T,STAR,MR>\n        BLTrans_STAR_MR(g), BRTrans_STAR_MR(g),\n        B0Trans_STAR_MR(g), B1Trans_STAR_MR(g),\n        B2Trans_STAR_MR(g);\n\n    DistMatrix<T,MC,STAR>\n        ZT_MC_STAR(g),  Z0_MC_STAR(g),\n        ZB_MC_STAR(g),  Z1_MC_STAR(g),\n                        Z2_MC_STAR(g);\n\n    DistMatrix<T,MR,STAR>\n        ZT_MR_STAR(g),  Z0_MR_STAR(g),\n        ZB_MR_STAR(g),  Z1_MR_STAR(g),\n                        Z2_MR_STAR(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n    PushBlocksizeStack( ratio*Blocksize() );\n\n    LockedPartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDown\n    ( B_MC_STAR, BT_MC_STAR,\n                 BB_MC_STAR, 0 );\n    LockedPartitionRight\n    ( BTrans_STAR_MR, BLTrans_STAR_MR, BRTrans_STAR_MR, 0 );\n    PartitionDown\n    ( Z_MC_STAR, ZT_MC_STAR,\n                 ZB_MC_STAR, 0 );\n    PartitionDown\n    ( Z_MR_STAR, ZT_MR_STAR,\n                 ZB_MR_STAR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        LockedRepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDown\n        ( BT_MC_STAR,  B0_MC_STAR,\n         /**********/ /**********/\n                       B1_MC_STAR,\n          BB_MC_STAR,  B2_MC_STAR );\n\n        LockedRepartitionRight\n        ( BLTrans_STAR_MR, /**/ BRTrans_STAR_MR,\n          B0Trans_STAR_MR, /**/ B1Trans_STAR_MR,\n                                B2Trans_STAR_MR );\n\n        RepartitionDown\n        ( ZT_MC_STAR,  Z0_MC_STAR,\n         /**********/ /**********/\n                       Z1_MC_STAR,\n          ZB_MC_STAR,  Z2_MC_STAR );\n        RepartitionDown\n        ( ZT_MR_STAR,  Z0_MR_STAR,\n         /**********/ /**********/\n                       Z1_MR_STAR,\n          ZB_MR_STAR,  Z2_MR_STAR );\n\n        D11.AlignWith( A11 );\n        //--------------------------------------------------------------------//\n        D11 = A11;\n        MakeTriangular( LOWER, D11 );\n        LocalGemm\n        ( NORMAL, orientation, alpha, D11, B1Trans_STAR_MR, T(1), Z1_MC_STAR );\n        SetDiagonal( D11, T(0) );\n\n        LocalGemm\n        ( orientation, NORMAL, alpha, D11, B1_MC_STAR, T(1), Z1_MR_STAR );\n\n        LocalGemm\n        ( NORMAL, orientation, alpha, A21, B1Trans_STAR_MR, T(1), Z2_MC_STAR );\n\n        LocalGemm\n        ( orientation, NORMAL, alpha, A21, B2_MC_STAR, T(1), Z1_MR_STAR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDown\n        ( BT_MC_STAR,  B0_MC_STAR,\n                       B1_MC_STAR,\n         /**********/ /**********/\n          BB_MC_STAR,  B2_MC_STAR );\n\n        SlideLockedPartitionRight\n        ( BLTrans_STAR_MR,                  /**/ BRTrans_STAR_MR,\n          B0Trans_STAR_MR, B1Trans_STAR_MR, /**/ B2Trans_STAR_MR );\n\n        SlidePartitionDown\n        ( ZT_MC_STAR,  Z0_MC_STAR,\n                       Z1_MC_STAR,\n         /**********/ /**********/\n          ZB_MC_STAR,  Z2_MC_STAR );\n\n        SlidePartitionDown\n        ( ZT_MR_STAR,  Z0_MR_STAR,\n                       Z1_MR_STAR,\n         /**********/ /**********/\n          ZB_MR_STAR,  Z2_MR_STAR );\n    }\n    PopBlocksizeStack();\n}\n\ntemplate<typename T>\ninline void\nSymmLLA\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SymmLLA\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    DistMatrix<T> \n        BL(g), BR(g),\n        B0(g), B1(g), B2(g);\n\n    DistMatrix<T>\n        CL(g), CR(g),\n        C0(g), C1(g), C2(g);\n\n    DistMatrix<T,MC,STAR> B1_MC_STAR(g);\n    DistMatrix<T,VR,STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR> B1Trans_STAR_MR(g);\n    DistMatrix<T> Z1(g);\n    DistMatrix<T,MC,STAR> Z1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> Z1_MR_STAR(g);\n    DistMatrix<T,MR,MC  > Z1_MR_MC(g);\n\n    B1_MC_STAR.AlignWith( A );\n    B1_VR_STAR.AlignWith( A );\n    B1Trans_STAR_MR.AlignWith( A );\n    Z1_MC_STAR.AlignWith( A );\n    Z1_MR_STAR.AlignWith( A );\n\n    Scale( beta, C );\n    LockedPartitionRight( B, BL, BR, 0 );\n    PartitionRight( C, CL, CR, 0 );\n    while( CL.Width() < C.Width() )\n    {\n        LockedRepartitionRight \n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n\n        RepartitionRight\n        ( CL, /**/ CR,\n          C0, /**/ C1, C2 );\n\n        Z1.AlignWith( C1 );\n        //--------------------------------------------------------------------//\n        B1_MC_STAR = B1;\n        B1_VR_STAR = B1_MC_STAR;\n        B1_VR_STAR.TransposePartialColAllGather( B1Trans_STAR_MR, conjugate );\n        Zeros( Z1_MC_STAR, C1.Height(), C1.Width() );\n        Zeros( Z1_MR_STAR, C1.Height(), C1.Width() );\n        LocalSymmetricAccumulateLL\n        ( orientation, \n          alpha, A, B1_MC_STAR, B1Trans_STAR_MR, Z1_MC_STAR, Z1_MR_STAR );\n\n        Z1_MR_MC.RowSumScatterFrom( Z1_MR_STAR );\n        Z1 = Z1_MR_MC;\n        Z1.RowSumScatterUpdate( T(1), Z1_MC_STAR );\n        Axpy( T(1), Z1, C1 );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n\n        SlidePartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSymmLLC\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SymmLLC\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> \n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),  AB1(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),  A1L(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<T> \n        BT(g),  B0(g),\n        BB(g),  B1(g),\n                B2(g);\n    DistMatrix<T> \n        CT(g),  C0(g),  CAbove(g),\n        CB(g),  C1(g),  CBelow(g),\n                C2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,  STAR> AB1_MC_STAR(g);\n    DistMatrix<T,STAR,MC  > A1L_STAR_MC(g);\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n\n    B1Trans_MR_STAR.AlignWith( C );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    PartitionDown\n    ( C, CT,\n         CB, 0 );\n    while( CB.Height() > 0 )\n    {\n        LockedRepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        RepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n\n        LockedView1x2( A1L, A10, A11 );\n        LockedView2x1( AB1, A11, A21 );\n\n        View2x1( CAbove, C0, C1 );\n        View2x1( CBelow, C1, C2 );\n\n        AB1_MC_STAR.AlignWith( CBelow );\n        A1L_STAR_MC.AlignWith( CAbove );\n        //--------------------------------------------------------------------//\n        AB1_MC_STAR = AB1;\n        A1L_STAR_MC = A1L;\n        MakeTriangular( LOWER, AB1_MC_STAR );\n        MakeTrapezoidal\n        ( LOWER, A1L_STAR_MC, A1L_STAR_MC.Width()-A1L_STAR_MC.Height()-1 );\n\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n\n        LocalGemm\n        ( NORMAL, TRANSPOSE, \n          alpha, AB1_MC_STAR, B1Trans_MR_STAR, T(1), CBelow );\n\n        LocalGemm\n        ( orientation, TRANSPOSE, \n          alpha, A1L_STAR_MC, B1Trans_MR_STAR, T(1), CAbove );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n\n        SlidePartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSymmLL\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::SymmLL\"))\n    // TODO: Come up with a better routing mechanism\n    if( A.Height() > 5*B.Width() )\n        SymmLLA( alpha, A, B, beta, C, conjugate );\n    else\n        SymmLLC( alpha, A, B, beta, C, conjugate );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYMM_LL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Symm/LU.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMM_LU_HPP\n#define ELEM_SYMM_LU_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nLocalSymmetricAccumulateLU\n( Orientation orientation, T alpha,\n  const DistMatrix<T>& A,\n  const DistMatrix<T,MC,  STAR>& B_MC_STAR,\n  const DistMatrix<T,STAR,MR  >& BTrans_STAR_MR,\n        DistMatrix<T,MC,  STAR>& Z_MC_STAR,\n        DistMatrix<T,MR,  STAR>& Z_MR_STAR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::LocalSymmetricAccumulateLU\");\n        if( A.Grid() != B_MC_STAR.Grid() ||\n            B_MC_STAR.Grid() != BTrans_STAR_MR.Grid() ||\n            BTrans_STAR_MR.Grid() != Z_MC_STAR.Grid() ||\n            Z_MC_STAR.Grid() != Z_MR_STAR.Grid() )\n            LogicError(\"{A,B,Z} must be distributed over the same grid\");\n        if( A.Height() != A.Width() ||\n            A.Height() != B_MC_STAR.Height() ||\n            A.Height() != BTrans_STAR_MR.Width() ||\n            A.Height() != Z_MC_STAR.Height() ||\n            A.Height() != Z_MR_STAR.Height() ||\n            B_MC_STAR.Width() != BTrans_STAR_MR.Height() ||\n            BTrans_STAR_MR.Height() != Z_MC_STAR.Width() ||\n            Z_MC_STAR.Width() != Z_MR_STAR.Width() )\n            LogicError\n            (\"Nonconformal LocalSymmetricAccumulateLU:\\n\",\n             DimsString(A,\"A\"),\"\\n\",\n             DimsString(B_MC_STAR,\"B[MC,* ]\"),\"\\n\",\n             DimsString(BTrans_STAR_MR,\"B'[* ,MR]\"),\"\\n\",\n             DimsString(Z_MC_STAR,\"Z[MC,* ]\"),\"\\n\",\n             DimsString(Z_MR_STAR,\"Z[MR,* ]\"));\n        if( B_MC_STAR.ColAlign() != A.ColAlign() ||\n            BTrans_STAR_MR.RowAlign() != A.RowAlign() ||\n            Z_MC_STAR.ColAlign() != A.ColAlign() ||\n            Z_MR_STAR.ColAlign() != A.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Grid& g = A.Grid();\n\n    DistMatrix<T>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n\n    DistMatrix<T> D11(g);\n\n    DistMatrix<T,MC,STAR>\n        BT_MC_STAR(g),  B0_MC_STAR(g),\n        BB_MC_STAR(g),  B1_MC_STAR(g),\n                        B2_MC_STAR(g);\n\n    DistMatrix<T,STAR,MR>\n        BLTrans_STAR_MR(g), BRTrans_STAR_MR(g),\n        B0Trans_STAR_MR(g), B1Trans_STAR_MR(g),\n        B2Trans_STAR_MR(g);\n\n    DistMatrix<T,MC,STAR>\n        ZT_MC_STAR(g),  Z0_MC_STAR(g),\n        ZB_MC_STAR(g),  Z1_MC_STAR(g),\n                        Z2_MC_STAR(g);\n\n    DistMatrix<T,MR,STAR>\n        ZT_MR_STAR(g),  Z0_MR_STAR(g),\n        ZB_MR_STAR(g),  Z1_MR_STAR(g),\n                        Z2_MR_STAR(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n    PushBlocksizeStack( ratio*Blocksize() );\n\n    LockedPartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDown\n    ( B_MC_STAR, BT_MC_STAR,\n                 BB_MC_STAR, 0 );\n    LockedPartitionRight\n    ( BTrans_STAR_MR, BLTrans_STAR_MR, BRTrans_STAR_MR, 0 );\n    PartitionDown\n    ( Z_MC_STAR, ZT_MC_STAR,\n                 ZB_MC_STAR, 0 );\n    PartitionDown\n    ( Z_MR_STAR, ZT_MR_STAR,\n                 ZB_MR_STAR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        LockedRepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n          /************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDown\n        ( BT_MC_STAR,  B0_MC_STAR,\n         /**********/ /**********/\n                       B1_MC_STAR,\n          BB_MC_STAR,  B2_MC_STAR );\n\n        LockedRepartitionRight\n        ( BLTrans_STAR_MR, /**/ BRTrans_STAR_MR,\n          B0Trans_STAR_MR, /**/ B1Trans_STAR_MR,\n                                B2Trans_STAR_MR );\n\n        RepartitionDown\n        ( ZT_MC_STAR,  Z0_MC_STAR,\n         /**********/ /**********/\n                       Z1_MC_STAR,\n          ZB_MC_STAR,  Z2_MC_STAR );\n\n        RepartitionDown\n        ( ZT_MR_STAR,  Z0_MR_STAR,\n         /**********/ /**********/\n                       Z1_MR_STAR,\n          ZB_MR_STAR,  Z2_MR_STAR );\n\n        D11.AlignWith( A11 );\n        //--------------------------------------------------------------------//\n        D11 = A11;\n        MakeTriangular( UPPER, D11 );\n        LocalGemm\n        ( NORMAL, orientation, alpha, D11, B1Trans_STAR_MR, T(1), Z1_MC_STAR );\n        SetDiagonal( D11, T(0) );\n\n        LocalGemm\n        ( orientation, NORMAL, alpha, D11, B1_MC_STAR, T(1), Z1_MR_STAR );\n\n        LocalGemm\n        ( NORMAL, orientation, alpha, A12, B2Trans_STAR_MR, T(1), Z1_MC_STAR );\n\n        LocalGemm\n        ( orientation, NORMAL, alpha, A12, B1_MC_STAR, T(1), Z2_MR_STAR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDown\n        ( BT_MC_STAR,  B0_MC_STAR,\n                       B1_MC_STAR,\n         /**********/ /**********/\n          BB_MC_STAR,  B2_MC_STAR );\n\n        SlideLockedPartitionRight\n        ( BLTrans_STAR_MR,                  /**/ BRTrans_STAR_MR,\n          B0Trans_STAR_MR, B1Trans_STAR_MR, /**/ B2Trans_STAR_MR );\n\n        SlidePartitionDown\n        ( ZT_MC_STAR,  Z0_MC_STAR,\n                       Z1_MC_STAR,\n         /**********/ /**********/\n          ZB_MC_STAR,  Z2_MC_STAR );\n\n        SlidePartitionDown\n        ( ZT_MR_STAR,  Z0_MR_STAR,\n                       Z1_MR_STAR,\n         /**********/ /**********/\n          ZB_MR_STAR,  Z2_MR_STAR );\n    }\n    PopBlocksizeStack();\n}\n\ntemplate<typename T>\ninline void\nSymmLUA\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SymmLUA\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    DistMatrix<T>\n        BL(g), BR(g),\n        B0(g), B1(g), B2(g);\n\n    DistMatrix<T>\n        CL(g), CR(g),\n        C0(g), C1(g), C2(g);\n\n    DistMatrix<T,MC,STAR> B1_MC_STAR(g);\n    DistMatrix<T,VR,STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR> B1Trans_STAR_MR(g);\n    DistMatrix<T> Z1(g);\n    DistMatrix<T,MC,STAR> Z1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> Z1_MR_STAR(g);\n    DistMatrix<T,MR,MC  > Z1_MR_MC(g);\n\n    B1_MC_STAR.AlignWith( A );\n    B1_VR_STAR.AlignWith( A );\n    B1Trans_STAR_MR.AlignWith( A );\n    Z1_MC_STAR.AlignWith( A );\n    Z1_MR_STAR.AlignWith( A );\n\n    Scale( beta, C );\n    LockedPartitionRight\n    ( B, BL, BR, 0 );\n    PartitionRight\n    ( C, CL, CR, 0 );\n    while( CL.Width() < C.Width() )\n    {\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n\n        RepartitionRight\n        ( CL, /**/ CR,\n          C0, /**/ C1, C2 );\n\n        Z1.AlignWith( C1 );\n        //--------------------------------------------------------------------//\n        B1_MC_STAR = B1;\n        B1_VR_STAR = B1_MC_STAR;\n        B1_VR_STAR.TransposePartialColAllGather( B1Trans_STAR_MR, conjugate );\n        Zeros( Z1_MC_STAR, C1.Height(), C1.Width() );\n        Zeros( Z1_MR_STAR, C1.Height(), C1.Width() );\n        LocalSymmetricAccumulateLU\n        ( orientation,\n          alpha, A, B1_MC_STAR, B1Trans_STAR_MR, Z1_MC_STAR, Z1_MR_STAR );\n\n        Z1_MR_MC.RowSumScatterFrom( Z1_MR_STAR );\n        Z1 = Z1_MR_MC;\n        Z1.RowSumScatterUpdate( T(1), Z1_MC_STAR );\n        Axpy( T(1), Z1, C1 );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n\n        SlidePartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSymmLUC\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SymmLUC\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> \n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),  AB1(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),  A1R(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n    DistMatrix<T> CT(g),  C0(g),  CAbove(g),\n                  CB(g),  C1(g),  CBelow(g),\n                          C2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,  STAR> AB1_MC_STAR(g);\n    DistMatrix<T,STAR,MC  > A1R_STAR_MC(g);\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n\n    B1Trans_MR_STAR.AlignWith( C );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    PartitionDown\n    ( C, CT,\n         CB, 0 );\n    while( CB.Height() > 0 )\n    {\n        LockedRepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        RepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n\n        LockedView1x2( A1R, A11, A12 );\n        LockedView2x1( AB1, A01, A11 );\n\n        View2x1( CAbove, C0, C1 );\n        View2x1( CBelow, C1, C2 );\n\n        AB1_MC_STAR.AlignWith( CAbove );\n        A1R_STAR_MC.AlignWith( CBelow );\n        //--------------------------------------------------------------------//\n        AB1_MC_STAR = AB1;\n        A1R_STAR_MC = A1R;\n        MakeTrapezoidal\n        ( UPPER, AB1_MC_STAR, AB1_MC_STAR.Width()-AB1_MC_STAR.Height() );\n        MakeTrapezoidal( UPPER, A1R_STAR_MC, 1 );\n\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n\n        LocalGemm\n        ( NORMAL, TRANSPOSE, \n          alpha, AB1_MC_STAR, B1Trans_MR_STAR, T(1), CAbove );\n\n        LocalGemm\n        ( orientation, TRANSPOSE, \n          alpha, A1R_STAR_MC, B1Trans_MR_STAR, T(1), CBelow );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n\n        SlidePartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSymmLU\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::SymmLU\"))\n    // TODO: Come up with a better routing mechanism\n    if( A.Height() > 5*B.Width() )\n        SymmLUA( alpha, A, B, beta, C, conjugate );\n    else\n        SymmLUC( alpha, A, B, beta, C, conjugate );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYMM_LU_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Symm/RL.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMM_RL_HPP\n#define ELEM_SYMM_RL_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nLocalSymmetricAccumulateRL\n( Orientation orientation, T alpha,\n  const DistMatrix<T>& A,\n  const DistMatrix<T,STAR,MC  >& B_STAR_MC,\n  const DistMatrix<T,MR,  STAR>& BTrans_MR_STAR,\n        DistMatrix<T,MC,  STAR>& ZTrans_MC_STAR,\n        DistMatrix<T,MR,  STAR>& ZTrans_MR_STAR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::LocalSymmetricAccumulateRL\");\n        if( A.Grid() != B_STAR_MC.Grid() ||\n            B_STAR_MC.Grid() != BTrans_MR_STAR.Grid() ||\n            BTrans_MR_STAR.Grid() != ZTrans_MC_STAR.Grid() ||\n            ZTrans_MC_STAR.Grid() != ZTrans_MR_STAR.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n        if( A.Height() != A.Width() ||\n            A.Height() != B_STAR_MC.Width() ||\n            A.Height() != BTrans_MR_STAR.Height() ||\n            A.Height() != ZTrans_MC_STAR.Height() ||\n            A.Height() != ZTrans_MR_STAR.Height() ||\n            B_STAR_MC.Height() != BTrans_MR_STAR.Width() ||\n            BTrans_MR_STAR.Width() != ZTrans_MC_STAR.Width() ||\n            ZTrans_MC_STAR.Width() != ZTrans_MR_STAR.Width() )\n            LogicError\n            (\"Nonconformal LocalSymmetricAccumulateRL:\\n\",\n             DimsString(A,\"A\"),\"\\n\",\n             DimsString(B_STAR_MC,\"B[* ,MC]\"),\"\\n\",\n             DimsString(BTrans_MR_STAR,\"B'[MR,* ]\"),\"\\n\",\n             DimsString(ZTrans_MC_STAR,\"Z'[MC,* ]\"),\"\\n\",\n             DimsString(ZTrans_MR_STAR,\"Z'[MR,* ]\"));\n        if( B_STAR_MC.RowAlign() != A.ColAlign() ||\n            BTrans_MR_STAR.ColAlign() != A.RowAlign() ||\n            ZTrans_MC_STAR.ColAlign() != A.ColAlign() ||\n            ZTrans_MR_STAR.ColAlign() != A.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n\n    DistMatrix<T> D11(g);\n\n    DistMatrix<T,STAR,MC>\n        BL_STAR_MC(g), BR_STAR_MC(g),\n        B0_STAR_MC(g), B1_STAR_MC(g), B2_STAR_MC(g);\n\n    DistMatrix<T,MR,STAR>\n        BTTrans_MR_STAR(g),  B0Trans_MR_STAR(g),\n        BBTrans_MR_STAR(g),  B1Trans_MR_STAR(g),\n                             B2Trans_MR_STAR(g);\n\n    DistMatrix<T,MC,STAR>\n        ZTTrans_MC_STAR(g),  Z0Trans_MC_STAR(g),\n        ZBTrans_MC_STAR(g),  Z1Trans_MC_STAR(g),\n                             Z2Trans_MC_STAR(g);\n\n    DistMatrix<T,MR,STAR>\n        ZTTrans_MR_STAR(g),  Z0Trans_MR_STAR(g),\n        ZBTrans_MR_STAR(g),  Z1Trans_MR_STAR(g),\n                             Z2Trans_MR_STAR(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n    PushBlocksizeStack( ratio*Blocksize() );\n\n    LockedPartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionRight( B_STAR_MC,  BL_STAR_MC, BR_STAR_MC, 0 );\n    LockedPartitionDown\n    ( BTrans_MR_STAR, BTTrans_MR_STAR,\n                      BBTrans_MR_STAR, 0 );\n    PartitionDown\n    ( ZTrans_MC_STAR, ZTTrans_MC_STAR,\n                      ZBTrans_MC_STAR, 0 );\n    PartitionDown\n    ( ZTrans_MR_STAR, ZTTrans_MR_STAR,\n                      ZBTrans_MR_STAR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        LockedRepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionRight\n        ( BL_STAR_MC, /**/ BR_STAR_MC,\n          B0_STAR_MC, /**/ B1_STAR_MC, B2_STAR_MC );\n\n        LockedRepartitionDown\n        ( BTTrans_MR_STAR,  B0Trans_MR_STAR,\n         /***************/ /***************/\n                            B1Trans_MR_STAR,\n          BBTrans_MR_STAR,  B2Trans_MR_STAR );\n\n        RepartitionDown\n        ( ZTTrans_MC_STAR,  Z0Trans_MC_STAR,\n         /***************/ /***************/\n                            Z1Trans_MC_STAR,\n          ZBTrans_MC_STAR,  Z2Trans_MC_STAR );\n\n        RepartitionDown\n        ( ZTTrans_MR_STAR,  Z0Trans_MR_STAR,\n         /***************/ /***************/\n                            Z1Trans_MR_STAR,\n          ZBTrans_MR_STAR,  Z2Trans_MR_STAR );\n\n        D11.AlignWith( A11 );\n        //--------------------------------------------------------------------//\n        D11 = A11;\n        MakeTriangular( LOWER, D11 );\n        LocalGemm\n        ( orientation, orientation,\n          alpha, D11, B1_STAR_MC, T(1), Z1Trans_MR_STAR );\n        SetDiagonal( D11, T(0) );\n        LocalGemm\n        ( NORMAL, NORMAL, alpha, D11, B1Trans_MR_STAR, T(1), Z1Trans_MC_STAR );\n\n        LocalGemm\n        ( orientation, orientation,\n          alpha, A21, B2_STAR_MC, T(1), Z1Trans_MR_STAR );\n\n        LocalGemm\n        ( NORMAL, NORMAL, alpha, A21, B1Trans_MR_STAR, T(1), Z2Trans_MC_STAR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionRight\n        ( BL_STAR_MC,             /**/ BR_STAR_MC,\n          B0_STAR_MC, B1_STAR_MC, /**/ B2_STAR_MC );\n\n        SlideLockedPartitionDown\n        ( BTTrans_MR_STAR,  B0Trans_MR_STAR,\n                            B1Trans_MR_STAR,\n         /***************/ /***************/\n          BBTrans_MR_STAR,  B2Trans_MR_STAR );\n\n        SlidePartitionDown\n        ( ZTTrans_MC_STAR,  Z0Trans_MC_STAR,\n                            Z1Trans_MC_STAR,\n         /***************/ /***************/\n          ZBTrans_MC_STAR,  Z2Trans_MC_STAR );\n\n        SlidePartitionDown\n        ( ZTTrans_MR_STAR,  Z0Trans_MR_STAR,\n                            Z1Trans_MR_STAR,\n         /***************/ /***************/\n          ZBTrans_MR_STAR,  Z2Trans_MR_STAR );\n    }\n    PopBlocksizeStack();\n}\n\ntemplate<typename T>\ninline void\nSymmRLA\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SymmRLA\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    DistMatrix<T>\n        BT(g),  B0(g),\n        BB(g),  B1(g),\n                B2(g);\n    DistMatrix<T>\n        CT(g),  C0(g),\n        CB(g),  C1(g),\n                C2(g);\n\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,VC,  STAR> B1Trans_VC_STAR(g);\n    DistMatrix<T,STAR,MC  > B1_STAR_MC(g);\n    DistMatrix<T,MC,  STAR> Z1Trans_MC_STAR(g);\n    DistMatrix<T,MR,  STAR> Z1Trans_MR_STAR(g);\n    DistMatrix<T,MC,  MR  > Z1Trans(g);\n    DistMatrix<T,MR,  MC  > Z1Trans_MR_MC(g);\n\n    B1Trans_MR_STAR.AlignWith( A );\n    B1Trans_VC_STAR.AlignWith( A );\n    B1_STAR_MC.AlignWith( A );\n    Z1Trans_MC_STAR.AlignWith( A );\n    Z1Trans_MR_STAR.AlignWith( A );\n\n    Matrix<T> Z1Local;\n\n    Scale( beta, C );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    PartitionDown\n    ( C, CT,\n         CB, 0 );\n    while( BT.Height() < B.Height() )\n    {\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        RepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n\n        Z1Trans_MR_MC.AlignWith( C1 );\n        //--------------------------------------------------------------------//\n        B1.TransposeColAllGather( B1Trans_MR_STAR, conjugate );\n        B1Trans_VC_STAR = B1Trans_MR_STAR;\n        B1Trans_VC_STAR.TransposePartialColAllGather( B1_STAR_MC, conjugate );\n        Zeros( Z1Trans_MC_STAR, C1.Width(), C1.Height() );\n        Zeros( Z1Trans_MR_STAR, C1.Width(), C1.Height() );\n        LocalSymmetricAccumulateRL\n        ( orientation, alpha, A, B1_STAR_MC, B1Trans_MR_STAR, \n          Z1Trans_MC_STAR, Z1Trans_MR_STAR );\n\n        Z1Trans.RowSumScatterFrom( Z1Trans_MC_STAR );\n        Z1Trans_MR_MC = Z1Trans;\n        Z1Trans_MR_MC.RowSumScatterUpdate( T(1), Z1Trans_MR_STAR );\n        Transpose( Z1Trans_MR_MC.LockedMatrix(), Z1Local, conjugate );\n        Axpy( T(1), Z1Local, C1.Matrix() );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n\n        SlidePartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSymmRLC\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SymmRLC\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> \n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),  AB1(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),  A1L(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n    DistMatrix<T> CL(g), CR(g),\n                  C0(g), C1(g), C2(g),\n                  CLeft(g), CRight(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,  STAR> B1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> AB1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > AB1Trans_STAR_MR(g);\n    DistMatrix<T,MR,  STAR> A1LTrans_MR_STAR(g);\n\n    B1_MC_STAR.AlignWith( C );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    PartitionRight( C, CL, CR, 0 );\n    while( CR.Width() > 0 )\n    {\n        LockedRepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n\n        RepartitionRight\n        ( CL, /**/ CR,\n          C0, /**/ C1, C2 );\n\n        LockedView1x2( A1L, A10, A11 );\n        LockedView2x1( AB1, A11, A21 );\n\n        View1x2( CLeft, C0, C1 );\n        View1x2( CRight, C1, C2 );\n\n        AB1_VR_STAR.AlignWith( CRight );\n        AB1Trans_STAR_MR.AlignWith( CRight );\n        A1LTrans_MR_STAR.AlignWith( CLeft );\n        //--------------------------------------------------------------------//\n        B1_MC_STAR = B1;\n\n        A1L.TransposeColAllGather( A1LTrans_MR_STAR );\n        AB1_VR_STAR = AB1;\n        AB1_VR_STAR.TransposePartialColAllGather( AB1Trans_STAR_MR, conjugate );\n        MakeTrapezoidal\n        ( UPPER, A1LTrans_MR_STAR, \n          A1LTrans_MR_STAR.Width()-A1LTrans_MR_STAR.Height() );\n        MakeTrapezoidal( UPPER, AB1Trans_STAR_MR, 1 );\n\n        LocalGemm\n        ( NORMAL, TRANSPOSE, \n          alpha, B1_MC_STAR, A1LTrans_MR_STAR, T(1), CLeft );\n\n        LocalGemm\n        ( NORMAL, NORMAL, \n          alpha, B1_MC_STAR, AB1Trans_STAR_MR, T(1), CRight );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n\n        SlidePartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSymmRL\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::SymmRL\"))\n    // TODO: Come up with a better routing mechanism\n    if( A.Height() > 5*B.Height() )\n        SymmRLA( alpha, A, B, beta, C, conjugate );\n    else\n        SymmRLC( alpha, A, B, beta, C, conjugate );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYMM_RL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Symm/RU.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMM_RU_HPP\n#define ELEM_SYMM_RU_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nLocalSymmetricAccumulateRU\n( Orientation orientation, T alpha,\n  const DistMatrix<T,MC,  MR  >& A,\n  const DistMatrix<T,STAR,MC  >& B_STAR_MC,\n  const DistMatrix<T,MR,  STAR>& BTrans_MR_STAR,\n        DistMatrix<T,MC,  STAR>& ZTrans_MC_STAR,\n        DistMatrix<T,MR,  STAR>& ZTrans_MR_STAR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::LocalSymmetricAccumulateRU\");\n        if( A.Grid() != B_STAR_MC.Grid() ||\n            B_STAR_MC.Grid() != BTrans_MR_STAR.Grid() ||\n            BTrans_MR_STAR.Grid() != ZTrans_MC_STAR.Grid() ||\n            ZTrans_MC_STAR.Grid() != ZTrans_MR_STAR.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n        if( A.Height() != A.Width() ||\n            A.Height() != B_STAR_MC.Width() ||\n            A.Height() != BTrans_MR_STAR.Height() ||\n            A.Height() != ZTrans_MC_STAR.Height() ||\n            A.Height() != ZTrans_MR_STAR.Height() ||\n            B_STAR_MC.Height() != BTrans_MR_STAR.Width() ||\n            BTrans_MR_STAR.Width() != ZTrans_MC_STAR.Width() ||\n            ZTrans_MC_STAR.Width() != ZTrans_MR_STAR.Width() )\n            LogicError\n            (\"Nonconformal LocalSymmetricAccumulateRU:\\n\",\n             DimsString(A,\"A\"),\"\\n\",\n             DimsString(B_STAR_MC,\"B[* ,MC]\"),\"\\n\",\n             DimsString(BTrans_MR_STAR,\"B'[MR,* ]\"),\"\\n\",\n             DimsString(ZTrans_MC_STAR,\"Z'[MC,* ]\"),\"\\n\",\n             DimsString(ZTrans_MR_STAR,\"Z'[MR,* ]\"));\n        if( B_STAR_MC.RowAlign() != A.ColAlign() ||\n            BTrans_MR_STAR.ColAlign() != A.RowAlign() ||\n            ZTrans_MC_STAR.ColAlign() != A.ColAlign() ||\n            ZTrans_MR_STAR.ColAlign() != A.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n\n    DistMatrix<T> D11(g);\n\n    DistMatrix<T,STAR,MC>\n        BL_STAR_MC(g), BR_STAR_MC(g),\n        B0_STAR_MC(g), B1_STAR_MC(g), B2_STAR_MC(g);\n\n    DistMatrix<T,MR,STAR>\n        BTTrans_MR_STAR(g),  B0Trans_MR_STAR(g),\n        BBTrans_MR_STAR(g),  B1Trans_MR_STAR(g),\n                             B2Trans_MR_STAR(g);\n\n    DistMatrix<T,MC,STAR>\n        ZTTrans_MC_STAR(g),  Z0Trans_MC_STAR(g),\n        ZBTrans_MC_STAR(g),  Z1Trans_MC_STAR(g),\n                             Z2Trans_MC_STAR(g);\n\n    DistMatrix<T,MR,STAR>\n        ZBTrans_MR_STAR(g),  Z0Trans_MR_STAR(g),\n        ZTTrans_MR_STAR(g),  Z1Trans_MR_STAR(g),\n                             Z2Trans_MR_STAR(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n    PushBlocksizeStack( ratio*Blocksize() );\n\n    LockedPartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionRight( B_STAR_MC,  BL_STAR_MC, BR_STAR_MC, 0 );\n    LockedPartitionDown\n    ( BTrans_MR_STAR, BTTrans_MR_STAR,\n                      BBTrans_MR_STAR, 0 );\n    PartitionDown\n    ( ZTrans_MC_STAR, ZTTrans_MC_STAR,\n                      ZBTrans_MC_STAR, 0 );\n    PartitionDown\n    ( ZTrans_MR_STAR, ZTTrans_MR_STAR,\n                      ZBTrans_MR_STAR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        LockedRepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionRight\n        ( BL_STAR_MC, /**/ BR_STAR_MC,\n          B0_STAR_MC, /**/ B1_STAR_MC, B2_STAR_MC );\n\n        LockedRepartitionDown\n        ( BTTrans_MR_STAR,  B0Trans_MR_STAR,\n         /***************/ /***************/\n                            B1Trans_MR_STAR,\n          BBTrans_MR_STAR,  B2Trans_MR_STAR );\n\n        RepartitionDown\n        ( ZTTrans_MC_STAR,  Z0Trans_MC_STAR,\n         /***************/ /***************/\n                            Z1Trans_MC_STAR,\n          ZBTrans_MC_STAR,  Z2Trans_MC_STAR );\n\n        RepartitionDown\n        ( ZTTrans_MR_STAR,  Z0Trans_MR_STAR,\n         /***************/ /***************/\n                            Z1Trans_MR_STAR,\n          ZBTrans_MR_STAR,  Z2Trans_MR_STAR );\n\n        D11.AlignWith( A11 );\n        //--------------------------------------------------------------------//\n        D11 = A11;\n        MakeTriangular( UPPER, D11 );\n        LocalGemm\n        ( orientation, orientation,\n          alpha, D11, B1_STAR_MC, T(1), Z1Trans_MR_STAR );\n        SetDiagonal( D11, T(0) );\n\n        LocalGemm\n        ( NORMAL, NORMAL, alpha, D11, B1Trans_MR_STAR, T(1), Z1Trans_MC_STAR );\n\n        LocalGemm\n        ( orientation, orientation, \n          alpha, A12, B1_STAR_MC, T(1), Z2Trans_MR_STAR );\n\n        LocalGemm\n        ( NORMAL, NORMAL, alpha, A12, B2Trans_MR_STAR, T(1), Z1Trans_MC_STAR );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionRight\n        ( BL_STAR_MC,             /**/ BR_STAR_MC,\n          B0_STAR_MC, B1_STAR_MC, /**/ B2_STAR_MC );\n\n        SlideLockedPartitionDown\n        ( BTTrans_MR_STAR,  B0Trans_MR_STAR,\n                            B1Trans_MR_STAR,\n         /***************/ /***************/\n          BBTrans_MR_STAR,  B2Trans_MR_STAR );\n\n        SlidePartitionDown\n        ( ZTTrans_MC_STAR,  Z0Trans_MC_STAR,\n                            Z1Trans_MC_STAR,\n         /***************/ /***************/\n          ZBTrans_MC_STAR,  Z2Trans_MC_STAR );\n\n        SlidePartitionDown\n        ( ZTTrans_MR_STAR,  Z0Trans_MR_STAR,\n                            Z1Trans_MR_STAR,\n         /***************/ /***************/\n          ZBTrans_MR_STAR,  Z2Trans_MR_STAR );\n    }\n    PopBlocksizeStack();\n}\n\ntemplate<typename T>\ninline void\nSymmRUA\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SymmRUA\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    DistMatrix<T>\n        BT(g),  B0(g),\n        BB(g),  B1(g),\n                B2(g);\n    DistMatrix<T>\n        CT(g),  C0(g),\n        CB(g),  C1(g),\n                C2(g);\n\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,VC,  STAR> B1Trans_VC_STAR(g);\n    DistMatrix<T,STAR,MC  > B1_STAR_MC(g);\n    DistMatrix<T,MC,  STAR> Z1Trans_MC_STAR(g);\n    DistMatrix<T,MR,  STAR> Z1Trans_MR_STAR(g);\n    DistMatrix<T,MC,  MR  > Z1Trans(g);\n    DistMatrix<T,MR,  MC  > Z1Trans_MR_MC(g);\n\n    B1Trans_MR_STAR.AlignWith( A );\n    B1Trans_VC_STAR.AlignWith( A );\n    B1_STAR_MC.AlignWith( A );\n    Z1Trans_MC_STAR.AlignWith( A );\n    Z1Trans_MR_STAR.AlignWith( A );\n\n    Matrix<T> Z1Local;\n\n    Scale( beta, C );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    PartitionDown\n    ( C, CT,\n         CB, 0 );\n    while( CT.Height() < C.Height() )\n    {\n        LockedRepartitionDown\n        ( BT,  B0, \n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        RepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n\n        Z1Trans_MR_MC.AlignWith( C1 );\n        //--------------------------------------------------------------------//\n        B1.TransposeColAllGather( B1Trans_MR_STAR, conjugate );\n        B1Trans_VC_STAR = B1Trans_MR_STAR;\n        B1Trans_VC_STAR.TransposePartialColAllGather( B1_STAR_MC, conjugate );\n        Zeros( Z1Trans_MC_STAR, C1.Width(), C1.Height() );\n        Zeros( Z1Trans_MR_STAR, C1.Width(), C1.Height() );\n        LocalSymmetricAccumulateRU\n        ( orientation, alpha, A, B1_STAR_MC, B1Trans_MR_STAR, \n          Z1Trans_MC_STAR, Z1Trans_MR_STAR );\n\n        Z1Trans.RowSumScatterFrom( Z1Trans_MC_STAR );\n        Z1Trans_MR_MC = Z1Trans;\n        Z1Trans_MR_MC.RowSumScatterUpdate( T(1), Z1Trans_MR_STAR );\n        Transpose( Z1Trans_MR_MC.LockedMatrix(), Z1Local, conjugate );\n        Axpy( T(1), Z1Local, C1.Matrix() );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n\n        SlidePartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSymmRUC\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SymmRUC\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed on the same grid\");\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> \n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),  AB1(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),  A1R(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n    DistMatrix<T> CL(g), CR(g),\n                  C0(g), C1(g), C2(g),\n                  CLeft(g), CRight(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,  STAR> B1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> AB1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > AB1Trans_STAR_MR(g);\n    DistMatrix<T,MR,  STAR> A1RTrans_MR_STAR(g);\n\n    B1_MC_STAR.AlignWith( C );\n\n    // Start the algorithm\n    Scale( beta, C );\n    LockedPartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    PartitionRight( C, CL, CR, 0 );\n    while( CR.Width() > 0 )\n    {\n        LockedRepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n\n        RepartitionRight\n        ( CL, /**/ CR,\n          C0, /**/ C1, C2 );\n\n        LockedView1x2( A1R, A11, A12 );\n        LockedView2x1( AB1, A01, A11 );\n\n        View1x2( CLeft, C0, C1 );\n        View1x2( CRight, C1, C2 );\n\n        AB1_VR_STAR.AlignWith( CLeft );\n        AB1Trans_STAR_MR.AlignWith( CLeft );\n        A1RTrans_MR_STAR.AlignWith( CRight );\n        //--------------------------------------------------------------------//\n        B1_MC_STAR = B1;\n\n        AB1_VR_STAR = AB1;\n        AB1_VR_STAR.TransposePartialColAllGather( AB1Trans_STAR_MR, conjugate );\n        A1R.TransposeColAllGather( A1RTrans_MR_STAR, conjugate );\n        MakeTriangular( LOWER, A1RTrans_MR_STAR );\n        MakeTrapezoidal\n        ( LOWER, AB1Trans_STAR_MR, \n          AB1Trans_STAR_MR.Width()-AB1Trans_STAR_MR.Height()-1 );\n\n        LocalGemm\n        ( NORMAL, orientation, \n          alpha, B1_MC_STAR, A1RTrans_MR_STAR, T(1), CRight );\n\n        LocalGemm\n        ( NORMAL, NORMAL,\n          alpha, B1_MC_STAR, AB1Trans_STAR_MR, T(1), CLeft );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n\n        SlidePartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nSymmRU\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::SymmRU\"))\n    // TODO: Come up with a better routing mechanism\n    if( A.Height() > 5*B.Height() )\n        SymmRUA( alpha, A, B, beta, C, conjugate );\n    else\n        SymmRUC( alpha, A, B, beta, C, conjugate );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYMM_RU_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Symm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMM_HPP\n#define ELEM_SYMM_HPP\n\n#include \"./Symm/LL.hpp\"\n#include \"./Symm/LU.hpp\"\n#include \"./Symm/RL.hpp\"\n#include \"./Symm/RU.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nSymm\n( LeftOrRight side, UpperOrLower uplo,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B, T beta, Matrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Symm\"))\n    const char sideChar = LeftOrRightToChar( side );\n    const char uploChar = UpperOrLowerToChar( uplo );\n    if( conjugate )\n    {\n        blas::Hemm\n        ( sideChar, uploChar, C.Height(), C.Width(),\n          alpha, A.LockedBuffer(), A.LDim(),\n                 B.LockedBuffer(), B.LDim(),\n          beta,  C.Buffer(),       C.LDim() );\n    }\n    else\n    {\n        blas::Symm\n        ( sideChar, uploChar, C.Height(), C.Width(),\n          alpha, A.LockedBuffer(), A.LDim(),\n                 B.LockedBuffer(), B.LDim(),\n          beta,  C.Buffer(),       C.LDim() );\n    }\n}\n\ntemplate<typename T>\ninline void\nSymm\n( LeftOrRight side, UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Symm\"))\n    if( side == LEFT && uplo == LOWER )\n        internal::SymmLL( alpha, A, B, beta, C, conjugate );\n    else if( side == LEFT )\n        internal::SymmLU( alpha, A, B, beta, C, conjugate );\n    else if( uplo == LOWER )\n        internal::SymmRL( alpha, A, B, beta, C, conjugate );\n    else\n        internal::SymmRU( alpha, A, B, beta, C, conjugate );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYMM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Syr2k/LN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYR2K_LN_HPP\n#define ELEM_SYR2K_LN_HPP\n\n#include ELEM_SCALETRAPEZOID_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nSyr2kLN\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Syr2kLN\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n        if( A.Height() != C.Height() || A.Height() != C.Width() ||\n            B.Height() != C.Height() || B.Height() != C.Width() ||\n            A.Width() != B.Width() )\n            LogicError\n            (\"Nonconformal Syr2kLN:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views \n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,MC,  STAR> B1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> A1_VR_STAR(g);\n    DistMatrix<T,VR,  STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > A1Trans_STAR_MR(g);\n    DistMatrix<T,STAR,MR  > B1Trans_STAR_MR(g);\n\n    A1_MC_STAR.AlignWith( C );\n    B1_MC_STAR.AlignWith( C );\n    A1_VR_STAR.AlignWith( C );\n    B1_VR_STAR.AlignWith( C );\n    A1Trans_STAR_MR.AlignWith( C );\n    B1Trans_STAR_MR.AlignWith( C );\n\n    // Start the algorithm\n    ScaleTrapezoid( beta, LOWER, C );\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    while( AR.Width() > 0 )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n\n        //--------------------------------------------------------------------//\n        A1_VR_STAR = A1_MC_STAR = A1;\n        A1_VR_STAR.TransposePartialColAllGather( A1Trans_STAR_MR, conjugate );\n\n        B1_VR_STAR = B1_MC_STAR = B1;\n        B1_VR_STAR.TransposePartialColAllGather( B1Trans_STAR_MR, conjugate );\n\n        LocalTrr2k\n        ( LOWER, \n          alpha, A1_MC_STAR, B1Trans_STAR_MR,\n                 B1_MC_STAR, A1Trans_STAR_MR, T(1), C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYR2K_LN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Syr2k/LT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYR2K_LT_HPP\n#define ELEM_SYR2K_LT_HPP\n\n#include ELEM_SCALETRAPEZOID_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nSyr2kLT\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Syr2kLT\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n        if( A.Width() != C.Height() || A.Width() != C.Width()  ||\n            B.Width() != C.Height() || B.Width() != C.Width()  ||\n            A.Height() != B.Height() )\n            LogicError\n            (\"Nonconformal Syr2kLT:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MR,  STAR> A1Trans_MR_STAR(g);\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,STAR,VR  > A1_STAR_VR(g);\n    DistMatrix<T,STAR,VR  > B1_STAR_VR(g);\n    DistMatrix<T,STAR,MC  > A1_STAR_MC(g);\n    DistMatrix<T,STAR,MC  > B1_STAR_MC(g);\n\n    A1Trans_MR_STAR.AlignWith( C );\n    B1Trans_MR_STAR.AlignWith( C );\n    A1_STAR_MC.AlignWith( C );\n    B1_STAR_MC.AlignWith( C );\n\n    // Start the algorithm\n    ScaleTrapezoid( beta, LOWER, C );\n    LockedPartitionDown\n    ( A, AT, \n         AB, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    while( AB.Height() > 0 )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        //--------------------------------------------------------------------//\n        A1.TransposeColAllGather( A1Trans_MR_STAR );\n        A1_STAR_VR.TransposePartialRowFilterFrom( A1Trans_MR_STAR );\n        A1_STAR_MC = A1_STAR_VR;\n\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        B1_STAR_VR.TransposePartialRowFilterFrom( B1Trans_MR_STAR );\n        B1_STAR_MC = B1_STAR_VR;\n\n        LocalTrr2k\n        ( LOWER, orientation, TRANSPOSE, orientation, TRANSPOSE, \n          alpha, A1_STAR_MC, B1Trans_MR_STAR,\n                 B1_STAR_MC, A1Trans_MR_STAR, T(1), C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYR2K_LT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Syr2k/UN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYR2K_UN_HPP\n#define ELEM_SYR2K_UN_HPP\n\n#include ELEM_SCALETRAPEZOID_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nSyr2kUN\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Syr2kUN\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n        if( A.Height() != C.Height() || A.Height() != C.Width() ||\n            B.Height() != C.Height() || B.Height() != C.Width() ||\n            A.Width() != B.Width() )\n            LogicError\n            (\"Nonconformal Syr2kUN:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = C.Grid();\n\n    // Matrix views \n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,MC,  STAR> B1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> A1_VR_STAR(g);\n    DistMatrix<T,VR,  STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > A1Trans_STAR_MR(g);\n    DistMatrix<T,STAR,MR  > B1Trans_STAR_MR(g);\n\n    A1_MC_STAR.AlignWith( C );\n    B1_MC_STAR.AlignWith( C );\n    A1_VR_STAR.AlignWith( C );\n    B1_VR_STAR.AlignWith( C );\n    A1Trans_STAR_MR.AlignWith( C );\n    B1Trans_STAR_MR.AlignWith( C );\n\n    // Start the algorithm\n    ScaleTrapezoid( beta, UPPER, C );\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    while( AR.Width() > 0 )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n\n        //--------------------------------------------------------------------//\n        A1_VR_STAR = A1_MC_STAR = A1;\n        A1_VR_STAR.TransposePartialColAllGather( A1Trans_STAR_MR, conjugate );\n\n        B1_VR_STAR = B1_MC_STAR = B1;\n        B1_VR_STAR.TransposePartialColAllGather( B1Trans_STAR_MR, conjugate );\n\n        LocalTrr2k\n        ( UPPER, \n          alpha, A1_MC_STAR, B1Trans_STAR_MR,\n                 B1_MC_STAR, A1Trans_STAR_MR, T(1), C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYR2K_UN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Syr2k/UT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYR2K_UT_HPP\n#define ELEM_SYR2K_UT_HPP\n\n#include ELEM_SCALETRAPEZOID_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nSyr2kUT\n( T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Syr2kUT\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"{A,B,C} must be distributed over the same grid\");\n        if( A.Width() != C.Height() || A.Width() != C.Width() ||\n            B.Width() != C.Height() || B.Width() != C.Width() ||\n            A.Height() != B.Height() )\n            LogicError\n            (\"Nonconformal Syr2kUT:\\n\",\n             DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MR,  STAR> A1Trans_MR_STAR(g);\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,STAR,VR  > A1_STAR_VR(g);\n    DistMatrix<T,STAR,VR  > B1_STAR_VR(g);\n    DistMatrix<T,STAR,MC  > A1_STAR_MC(g);\n    DistMatrix<T,STAR,MC  > B1_STAR_MC(g);\n\n    A1Trans_MR_STAR.AlignWith( C );\n    B1Trans_MR_STAR.AlignWith( C );\n    A1_STAR_MC.AlignWith( C );\n    B1_STAR_MC.AlignWith( C );\n\n    // Start the algorithm\n    ScaleTrapezoid( beta, UPPER, C );\n    LockedPartitionDown\n    ( A, AT, \n         AB, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    while( AB.Height() > 0 )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        //--------------------------------------------------------------------//\n        A1.TransposeColAllGather( A1Trans_MR_STAR );\n        A1_STAR_VR.TransposePartialRowFilterFrom( A1Trans_MR_STAR );\n        A1_STAR_MC = A1_STAR_VR;\n\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        B1_STAR_VR.TransposePartialRowFilterFrom( B1Trans_MR_STAR );\n        B1_STAR_MC = B1_STAR_VR;\n\n        LocalTrr2k\n        ( UPPER, orientation, TRANSPOSE, orientation, TRANSPOSE, \n          alpha, A1_STAR_MC, B1Trans_MR_STAR,\n                 B1_STAR_MC, A1Trans_MR_STAR, T(1), C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYR2K_UT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Syr2k.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYR2K_HPP\n#define ELEM_SYR2K_HPP\n\n#include \"./Syr2k/LN.hpp\"\n#include \"./Syr2k/LT.hpp\"\n#include \"./Syr2k/UN.hpp\"\n#include \"./Syr2k/UT.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nSyr2k\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B, T beta, Matrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Syr2k\");\n        if( orientation == NORMAL )\n        {\n            if( A.Height() != C.Height() || A.Height() != C.Width() ||\n                B.Height() != C.Height() ||B.Height() != C.Width()    )\n                LogicError(\"Nonconformal Syr2k\");\n        }\n        else \n        {\n            if( A.Width() != C.Height() || A.Width() != C.Width() ||\n                B.Width() != C.Height() || B.Width() != C.Width()   )\n                LogicError(\"Nonconformal Syr2k\");\n        }\n    )\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const char transChar = OrientationToChar( orientation );\n    const Int k = ( orientation == NORMAL ? A.Width() : A.Height() );\n    if( conjugate )\n    {\n        blas::Her2k\n        ( uploChar, transChar, C.Height(), k,\n          alpha, A.LockedBuffer(), A.LDim(),\n                 B.LockedBuffer(), B.LDim(),\n          beta,  C.Buffer(),       C.LDim() );\n    }\n    else\n    {\n        blas::Syr2k\n        ( uploChar, transChar, C.Height(), k,\n          alpha, A.LockedBuffer(), A.LDim(),\n                 B.LockedBuffer(), B.LDim(),\n          beta,  C.Buffer(),       C.LDim() );\n    }\n}\n\ntemplate<typename T>\ninline void\nSyr2k\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B, Matrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Syr2k\"))\n    const Int n = ( orientation==NORMAL ? A.Height() : A.Width() );\n    Zeros( C, n, n );\n    Syr2k( uplo, orientation, alpha, A, B, T(0), C, conjugate );\n}\n\ntemplate<typename T>\ninline void\nSyr2k\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Syr2k\"))\n    if( uplo == LOWER && orientation == NORMAL )\n        internal::Syr2kLN( alpha, A, B, beta, C, conjugate );\n    else if( uplo == LOWER )\n        internal::Syr2kLT( alpha, A, B, beta, C, conjugate );\n    else if( orientation == NORMAL )\n        internal::Syr2kUN( alpha, A, B, beta, C, conjugate );\n    else\n        internal::Syr2kUT( alpha, A, B, beta, C, conjugate );\n}\n\ntemplate<typename T>\ninline void\nSyr2k\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n                 DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Syr2k\"))\n    const Int n = ( orientation==NORMAL ? A.Height() : A.Width() );\n    Zeros( C, n, n );\n    Syr2k( uplo, orientation, alpha, A, B, T(0), C, conjugate );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYR2K_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Syrk/LN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYRK_LN_HPP\n#define ELEM_SYRK_LN_HPP\n\n#include ELEM_SCALETRAPEZOID_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nSyrkLN\n( T alpha, const DistMatrix<T>& A, T beta, DistMatrix<T>& C, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SyrkLN\");\n        if( A.Grid() != C.Grid() )\n            LogicError(\"A and C must be distributed over the same grid\");\n        if( A.Height() != C.Height() || A.Height() != C.Width() )\n            LogicError\n            (\"Nonconformal SyrkLN:\\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  C ~ \",C.Height(),\" x \",C.Width());\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> A1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > A1Trans_STAR_MR(g);\n\n    A1_MC_STAR.AlignWith( C );\n    A1_VR_STAR.AlignWith( C );\n    A1Trans_STAR_MR.AlignWith( C );\n\n    // Start the algorithm\n    ScaleTrapezoid( beta, LOWER, C );\n    LockedPartitionRight( A, AL, AR, 0 );\n    while( AR.Width() > 0 )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n\n        //--------------------------------------------------------------------//\n        A1_VR_STAR = A1_MC_STAR = A1;\n        A1_VR_STAR.TransposePartialColAllGather( A1Trans_STAR_MR, conjugate );\n        LocalTrrk( LOWER, alpha, A1_MC_STAR, A1Trans_STAR_MR, T(1), C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n    }\n}\n\n} // namespace internal \n} // namespace elem\n\n#endif // ifndef ELEM_SYRK_LN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Syrk/LT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYRK_LT_HPP\n#define ELEM_SYRK_LT_HPP\n\n#include ELEM_SCALETRAPEZOID_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nSyrkLT\n( T alpha, const DistMatrix<T>& A, T beta, DistMatrix<T>& C, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SyrkLT\");\n        if( A.Grid() != C.Grid() )\n            LogicError(\"A and C must be distributed over the same grid\");\n        if( A.Width() != C.Height() || A.Width() != C.Width() )\n            LogicError\n            (\"Nonconformal SyrkLT:\\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  C ~ \",C.Height(),\" x \",C.Width());\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MR,  STAR> A1Trans_MR_STAR(g);\n    DistMatrix<T,STAR,VR  > A1_STAR_VR(g);\n    DistMatrix<T,STAR,MC  > A1_STAR_MC(g);\n\n    A1Trans_MR_STAR.AlignWith( C );\n    A1_STAR_MC.AlignWith( C );\n\n    // Start the algorithm\n    ScaleTrapezoid( beta, LOWER, C );\n    LockedPartitionDown\n    ( A, AT, \n         AB, 0 );\n    while( AB.Height() > 0 )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n\n        //--------------------------------------------------------------------//\n        A1.TransposeColAllGather( A1Trans_MR_STAR );\n        A1_STAR_VR.TransposePartialRowFilterFrom( A1Trans_MR_STAR );\n        A1_STAR_MC = A1_STAR_VR;\n\n        LocalTrrk\n        ( LOWER, orientation, TRANSPOSE, \n          alpha, A1_STAR_MC, A1Trans_MR_STAR, T(1), C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYRK_LT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Syrk/UN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYRK_UN_HPP\n#define ELEM_SYRK_UN_HPP\n\n#include ELEM_SCALETRAPEZOID_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nSyrkUN\n( T alpha, const DistMatrix<T>& A, T beta, DistMatrix<T>& C, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SyrkUN\");\n        if( A.Grid() != C.Grid() )\n            LogicError(\"A and C must be distributed over the same grid\");\n        if( A.Height() != C.Height() || A.Height() != C.Width() )\n            LogicError\n            (\"Nonconformal SyrkUN:\\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  C ~ \",C.Height(),\" x \",C.Width(),\"\\n\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> A1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > A1Trans_STAR_MR(g);\n\n    A1_MC_STAR.AlignWith( C );\n    A1_VR_STAR.AlignWith( C );\n    A1Trans_STAR_MR.AlignWith( C );\n\n    // Start the algorithm\n    ScaleTrapezoid( beta, UPPER, C );\n    LockedPartitionRight( A, AL, AR, 0 );\n    while( AR.Width() > 0 )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n\n        //--------------------------------------------------------------------//\n        A1_VR_STAR = A1_MC_STAR = A1;\n        A1_VR_STAR.TransposePartialColAllGather( A1Trans_STAR_MR, conjugate );\n        LocalTrrk( UPPER, alpha, A1_MC_STAR, A1Trans_STAR_MR, T(1), C ); \n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYRK_UN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Syrk/UT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYRK_UT_HPP\n#define ELEM_SYRK_UT_HPP\n\n#include ELEM_SCALETRAPEZOID_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nSyrkUT\n( T alpha, const DistMatrix<T>& A, T beta, DistMatrix<T>& C, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::SyrkUT\");\n        if( A.Grid() != C.Grid() )\n            LogicError(\"A and C must be distributed over the same grid\");\n        if( A.Width() != C.Height() || A.Width() != C.Width() )\n            LogicError\n            (\"Nonconformal SyrkUT:\\n\",\n             \"  A ~ \",A.Height(),\" x \",A.Width(),\"\\n\",\n             \"  C ~ \",C.Height(),\" x \",C.Width());\n    )\n    const Grid& g = A.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T> AT(g),  A0(g), \n                  AB(g),  A1(g),\n                          A2(g);\n\n    // Temporary distributions\n    DistMatrix<T,MR,  STAR> A1Trans_MR_STAR(g);\n    DistMatrix<T,STAR,VR  > A1_STAR_VR(g);\n    DistMatrix<T,STAR,MC  > A1_STAR_MC(g);\n\n    A1Trans_MR_STAR.AlignWith( C );\n    A1_STAR_MC.AlignWith( C );\n\n    // Start the algorithm\n    ScaleTrapezoid( beta, UPPER, C );\n    LockedPartitionUp\n    ( A, AT, \n         AB, 0 );\n    while( AT.Height() > 0 )\n    {\n        LockedRepartitionUp\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n\n        //--------------------------------------------------------------------//\n        A1.TransposeColAllGather( A1Trans_MR_STAR );\n        A1_STAR_VR.TransposePartialRowFilterFrom( A1Trans_MR_STAR );\n        A1_STAR_MC = A1_STAR_VR;\n\n        LocalTrrk\n        ( UPPER, orientation, TRANSPOSE, \n          alpha, A1_STAR_MC, A1Trans_MR_STAR, T(1), C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionUp\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_SYRK_UT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Syrk.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYRK_HPP\n#define ELEM_SYRK_HPP\n\n#include \"./Syrk/LN.hpp\"\n#include \"./Syrk/LT.hpp\"\n#include \"./Syrk/UN.hpp\"\n#include \"./Syrk/UT.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nSyrk\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const Matrix<T>& A, T beta, Matrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Syrk\");\n        if( orientation == NORMAL )\n        {\n            if( A.Height() != C.Height() || A.Height() != C.Width() )\n                LogicError(\"Nonconformal Syrk\");\n        }\n        else\n        {\n            if( A.Width() != C.Height() || A.Width() != C.Width() )\n                LogicError(\"Nonconformal Syrk\");\n        }\n    )\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const char transChar = OrientationToChar( orientation );\n    const Int k = ( orientation == NORMAL ? A.Width() : A.Height() );\n    if( conjugate )\n    {\n        blas::Herk\n        ( uploChar, transChar, C.Height(), k,\n          alpha, A.LockedBuffer(), A.LDim(),\n          beta,  C.Buffer(),       C.LDim() );\n    }\n    else\n    {\n        blas::Syrk\n        ( uploChar, transChar, C.Height(), k,\n          alpha, A.LockedBuffer(), A.LDim(),\n          beta,  C.Buffer(),       C.LDim() );\n    }\n}\n\ntemplate<typename T>\ninline void\nSyrk\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const Matrix<T>& A, Matrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Syrk\"))\n    const Int n = ( orientation==NORMAL ? A.Height() : A.Width() );\n    Zeros( C, n, n );\n    Syrk( uplo, orientation, alpha, A, T(0), C, conjugate );\n}\n\ntemplate<typename T>\ninline void\nSyrk\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const DistMatrix<T>& A, T beta, DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Syrk\"))\n    if( uplo == LOWER && orientation == NORMAL )\n        internal::SyrkLN( alpha, A, beta, C, conjugate );\n    else if( uplo == LOWER )\n        internal::SyrkLT( alpha, A, beta, C, conjugate );\n    else if( orientation == NORMAL )\n        internal::SyrkUN( alpha, A, beta, C, conjugate );\n    else\n        internal::SyrkUT( alpha, A, beta, C, conjugate );\n}\n\ntemplate<typename T>\ninline void\nSyrk\n( UpperOrLower uplo, Orientation orientation,\n  T alpha, const DistMatrix<T>& A, DistMatrix<T>& C,\n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Syrk\"))\n    const Int n = ( orientation==NORMAL ? A.Height() : A.Width() );\n    Zeros( C, n, n );\n    Syrk( uplo, orientation, alpha, A, T(0), C, conjugate );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYRK_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trdtrmm/LVar1.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRDTRMM_LVAR1_HPP\n#define ELEM_TRDTRMM_LVAR1_HPP\n\n#include ELEM_DIAGONALSOLVE_INC\n#include ELEM_TRMM_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nTrdtrmmLVar1( Matrix<F>& L, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrdtrmmLVar1\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n    )\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n    Matrix<F> S10;\n\n    const Int n = L.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto L00 = ViewRange( L, 0, 0, k,    k    );\n        auto L10 = ViewRange( L, k, 0, k+nb, k    );\n        auto L11 = ViewRange( L, k, k, k+nb, k+nb );\n        auto d1 = L11.GetDiagonal();\n       \n        S10 = L10;\n        DiagonalSolve( LEFT, NORMAL, d1, L10, true );\n        Trrk( LOWER, orientation, NORMAL, F(1), S10, L10, F(1), L00 );\n        Trmm( LEFT, LOWER, orientation, UNIT, F(1), L11, L10 );\n        TrdtrmmLUnblocked( L11, conjugate );\n    }\n}\n\ntemplate<typename F>\ninline void\nTrdtrmmLVar1( Matrix<F>& L, const Matrix<F>& dSub, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrdtrmmLVar1\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n    )\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n    Matrix<F> S10;\n\n    const Int n = L.Height();\n    const Int bsize = Blocksize();\n    Int k=0;\n    while( k < n )\n    {\n        const Int nbProp = Min(bsize,n-k);\n        const bool in2x2 = ( k+nbProp<n && dSub.Get(k+nbProp-1,0) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n        auto dSub1 = LockedViewRange( dSub, k, 0, k+nb-1, 1 );\n\n        auto L00 = ViewRange( L, 0, 0, k,    k    );\n        auto L10 = ViewRange( L, k, 0, k+nb, k    );\n        auto L11 = ViewRange( L, k, k, k+nb, k+nb );\n        auto d1 = L11.GetDiagonal();\n\n        S10 = L10;\n        QuasiDiagonalSolve( LEFT, LOWER, d1, dSub1, L10, conjugate );\n        Trrk( LOWER, orientation, NORMAL, F(1), S10, L10, F(1), L00 );\n        Trmm( LEFT, LOWER, orientation, UNIT, F(1), L11, L10 );\n        TrdtrmmLUnblocked( L11, dSub1, conjugate );\n\n        k += nb;\n    }\n}\n\ntemplate<typename F>\ninline void\nTrdtrmmLVar1( DistMatrix<F>& L, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrdtrmmLVar1\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n    )\n    const Grid& g = L.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    DistMatrix<F,STAR,VR  > L10_STAR_VR(g);\n    DistMatrix<F,STAR,VC  > S10_STAR_VC(g);\n    DistMatrix<F,STAR,MC  > S10_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > L10_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n\n    L10_STAR_VR.AlignWith( L );\n    S10_STAR_VC.AlignWith( L );\n    S10_STAR_MC.AlignWith( L );\n    L10_STAR_MR.AlignWith( L );\n\n    const Int n = L.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto L00 = ViewRange( L, 0, 0, k,    k    );\n        auto L10 = ViewRange( L, k, 0, k+nb, k    );\n        auto L11 = ViewRange( L, k, k, k+nb, k+nb );\n        auto d1 = L11.GetDiagonal();\n\n        L10_STAR_VR = L10;\n        S10_STAR_VC = L10_STAR_VR;\n        S10_STAR_MC = S10_STAR_VC;\n        DiagonalSolve( LEFT, NORMAL, d1, L10_STAR_VR, true );\n        L10_STAR_MR = L10_STAR_VR;\n        LocalTrrk\n        ( LOWER, orientation, F(1), S10_STAR_MC, L10_STAR_MR, F(1), L00 );\n\n        L11_STAR_STAR = L11;\n        LocalTrmm\n        ( LEFT, LOWER, orientation, UNIT, F(1), L11_STAR_STAR, L10_STAR_VR );\n        L10 = L10_STAR_VR;\n\n        LocalTrdtrmm( LOWER, L11_STAR_STAR, conjugate );\n        L11 = L11_STAR_STAR;\n    }\n}\n\ntemplate<typename F>\ninline void\nTrdtrmmLVar1\n( DistMatrix<F>& L, const DistMatrix<F,MD,STAR>& dSub, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrdtrmmLVar1\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n    )\n    const Grid& g = L.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    DistMatrix<F,STAR,VR  > L10_STAR_VR(g);\n    DistMatrix<F,STAR,VC  > S10_STAR_VC(g);\n    DistMatrix<F,STAR,MC  > S10_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > L10_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), \n                            d1_STAR_STAR(g), dSub1_STAR_STAR(g);\n\n    L10_STAR_VR.AlignWith( L );\n    S10_STAR_VC.AlignWith( L );\n    S10_STAR_MC.AlignWith( L );\n    L10_STAR_MR.AlignWith( L );\n\n    const Int n = L.Height();\n    const Int bsize = Blocksize();\n    Int k=0;\n    while( k < n )\n    {\n        const Int nbProp = Min(bsize,n-k);\n        const bool in2x2 = ( k+nbProp<n && dSub.Get(k+nbProp-1,0) != F(0) );\n        const Int nb = ( in2x2 ? nbProp+1 : nbProp );\n        auto dSub1 = LockedViewRange( dSub, k, 0, k+nb-1, 1 );\n\n        auto L00 = ViewRange( L, 0, 0, k,    k    );\n        auto L10 = ViewRange( L, k, 0, k+nb, k    );\n        auto L11 = ViewRange( L, k, k, k+nb, k+nb );\n        auto d1 = L11.GetDiagonal();\n\n        L10_STAR_VR = L10;\n        S10_STAR_VC = L10_STAR_VR;\n        S10_STAR_MC = S10_STAR_VC;\n        d1_STAR_STAR = d1;\n        dSub1_STAR_STAR = dSub1;\n        // TODO: LocalQuasiDiagonalSolve?\n        QuasiDiagonalSolve\n        ( LEFT, LOWER,\n          d1_STAR_STAR.LockedMatrix(), dSub1_STAR_STAR.LockedMatrix(), \n          L10_STAR_VR.Matrix(), conjugate );\n        L10_STAR_MR = L10_STAR_VR;\n        LocalTrrk\n        ( LOWER, orientation, F(1), S10_STAR_MC, L10_STAR_MR, F(1), L00 );\n\n        L11_STAR_STAR = L11;\n        LocalTrmm\n        ( LEFT, LOWER, orientation, UNIT, F(1), L11_STAR_STAR, L10_STAR_VR );\n        L10 = L10_STAR_VR;\n\n        LocalTrdtrmm( LOWER, L11_STAR_STAR, dSub1_STAR_STAR, conjugate );\n        L11 = L11_STAR_STAR;\n\n        k += nb;\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRDTRMM_LVAR1_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trdtrmm/UVar1.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRDTRMM_UVAR1_HPP\n#define ELEM_TRDTRMM_UVAR1_HPP\n\n#include ELEM_DIAGONALSOLVE_INC\n#include ELEM_TRMM_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nTrdtrmmUVar1( Matrix<F>& U, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrtdrmmUVar1\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n    )\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    Matrix<F> S01;\n\n    const Int n = U.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto U00 = LockedView( U, 0, 0, k,    k    );\n        auto U01 = LockedView( U, 0, k, k,    k+nb );\n        auto U11 = LockedView( U, k, k, k+nb, k+nb );\n        auto d1 = U11.GetDiagonal();\n\n        S01 = U01;\n        DiagonalSolve( LEFT, NORMAL, d1, U01, true );\n        Trrk( UPPER, NORMAL, orientation, F(1), U01, S01, F(1), U00 );\n        Trmm( RIGHT, UPPER, orientation, UNIT, F(1), U11, U01 );\n        TrdtrmmUUnblocked( U11, conjugate );\n    }\n}\n\ntemplate<typename F>\ninline void\nTrdtrmmUVar1( DistMatrix<F>& U, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrdtrmmUVar1\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n    )\n    const Grid& g = U.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    DistMatrix<F,MC,  STAR> S01_MC_STAR(g);\n    DistMatrix<F,VC,  STAR> S01_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> U01_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > U01Trans_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n\n    S01_MC_STAR.AlignWith( U );\n    S01_VC_STAR.AlignWith( U );\n    U01_VR_STAR.AlignWith( U );\n    U01Trans_STAR_MR.AlignWith( U );\n\n    const Int n = U.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto U00 = LockedView( U, 0, 0, k,    k    );\n        auto U01 = LockedView( U, 0, k, k,    k+nb );\n        auto U11 = LockedView( U, k, k, k+nb, k+nb );\n        auto d1 = U11.GetDiagonal();\n\n        S01_MC_STAR = U01;\n        S01_VC_STAR = S01_MC_STAR;\n        U01_VR_STAR = S01_VC_STAR;\n        DiagonalSolve( RIGHT, NORMAL, d1, U01_VR_STAR );\n        U01_VR_STAR.TransposePartialColAllGather( U01Trans_STAR_MR, conjugate );\n        LocalTrrk( UPPER, F(1), S01_MC_STAR, U01Trans_STAR_MR, F(1), U00 );\n\n        U11_STAR_STAR = U11;\n        LocalTrmm\n        ( RIGHT, UPPER, orientation, UNIT, F(1), U11_STAR_STAR, U01_VR_STAR );\n        U01 = U01_VR_STAR;\n\n        LocalTrdtrmm( UPPER, U11_STAR_STAR, conjugate );\n        U11 = U11_STAR_STAR;\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRDTRMM_UVAR1_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trdtrmm/Unblocked.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRDTRMM_UNBLOCKED_HPP\n#define ELEM_TRDTRMM_UNBLOCKED_HPP\n\n#include ELEM_SYMMETRIC2X2INV_INC\n#include ELEM_TRR_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nTrdtrmmLUnblocked( Matrix<F>& L, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrdtrmmLUnblocked\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n    )\n    const Int n = L.Height();\n    const Int ldim = L.LDim();\n\n    Matrix<F> s10;\n\n    for( Int k=0; k<n; ++k )\n    {\n        auto L00 = ViewRange( L, 0, 0, k,   k );\n        auto l10 = ViewRange( L, k, 0, k+1, k );\n\n        // S10 := L10\n        s10 = l10;\n\n        // L10 := L10 / delta11\n        const F deltaInv = F(1)/L.Get(k,k);\n        Scale( deltaInv, l10 );\n\n        // L00 := L00 + l10' s10\n        const F* l10Buf = l10.LockedBuffer();\n        if( conjugate )\n        {\n            for( Int j=0; j<k; ++j )\n            {\n                F* L00Col = L00.Buffer(0,j);\n                const F gamma = s10.Get(0,j);\n                for( Int i=j; i<k; ++i )\n                    L00Col[i] += Conj(l10Buf[i*ldim])*gamma;\n            }\n        }\n        else\n        {\n            for( Int j=0; j<k; ++j )\n            {\n                F* L00Col = L00.Buffer(0,j);\n                const F gamma = s10.Get(0,j);\n                for( Int i=j; i<k; ++i )\n                    L00Col[i] += l10Buf[i*ldim]*gamma;\n            }\n        }\n\n        // L11 := 1 / delta11\n        L.Set( k, k, deltaInv );\n    }\n}\n\ntemplate<typename F>\ninline void\nTrdtrmmLUnblocked( Matrix<F>& L, const Matrix<F>& dSub, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrdtrmmLUnblocked\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n    )\n    const Int n = L.Height();\n    const Int ldim = L.LDim();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    Matrix<F> s10, S10, D11(2,2);\n\n    Int k=0;\n    while( k < n )\n    {\n        const Int nb = ( k<n-1 && dSub.Get(k,0) != F(0) ? 2 : 1 );\n\n        if( nb == 1 )\n        {\n            auto L00 = ViewRange( L, 0, 0, k,    k );\n            auto l10 = ViewRange( L, k, 0, k+nb, k );\n\n            // S10 := L10\n            s10 = l10;\n\n            // L10 := L10 / delta11\n            const F deltaInv = F(1)/L.Get(k,k);\n            Scale( deltaInv, l10 );\n\n            // L00 := L00 + l10' s10\n            // TODO: Extend Trr for this case and then switch\n            const F* l10Buf = l10.LockedBuffer();\n            if( conjugate )\n            {\n                for( Int j=0; j<k; ++j )\n                {\n                    F* L00Col = L00.Buffer(0,j);\n                    const F gamma = s10.Get(0,j);\n                    for( Int i=j; i<k; ++i )\n                        L00Col[i] += Conj(l10Buf[i*ldim])*gamma;\n                }\n            }\n            else\n            {\n                for( Int j=0; j<k; ++j )\n                {\n                    F* L00Col = L00.Buffer(0,j);\n                    const F gamma = s10.Get(0,j);\n                    for( Int i=j; i<k; ++i )\n                        L00Col[i] += l10Buf[i*ldim]*gamma;\n                }\n            }\n\n            // lambda11 := 1 / delta11\n            L.Set( k, k, deltaInv );\n        }\n        else\n        {\n            auto L00 = ViewRange( L, 0, 0, k,    k    );\n            auto L10 = ViewRange( L, k, 0, k+nb, k    );\n            auto L11 = ViewRange( L, k, k, k+nb, k+nb );\n\n            // S10 := L10\n            S10 = L10;\n\n            // L10 := inv(D11) L10 \n            D11.Set( 0, 0, L11.Get(0,0) );\n            D11.Set( 1, 1, L11.Get(1,1) );\n            D11.Set( 1, 0, dSub.Get(k,0) );\n            Symmetric2x2Solve( LEFT, LOWER, D11, L10, conjugate );\n\n            // L00 := L00 + L10' S10\n            Trrk( LOWER, orientation, NORMAL, F(1), L10, S10, F(1), L00 );\n\n            // L11 := inv(D11)\n            Symmetric2x2Inv( LOWER, D11, conjugate );\n            L11.Set( 0, 0, D11.Get(0,0) );\n            L11.Set( 1, 0, D11.Get(1,0) );\n            L11.Set( 1, 1, D11.Get(1,1) );\n        }\n\n        k += nb;\n    }\n}\n\ntemplate<typename F>\ninline void\nTrdtrmmUUnblocked( Matrix<F>& U, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrdtrmmUUnblocked\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n    )\n    const Int n = U.Height();\n\n    Matrix<F> s01;\n\n    for( Int k=0; k<n; ++k )\n    {\n        auto U00 = ViewRange( U, 0, 0, k, k   );\n        auto u01 = ViewRange( U, 0, k, k, k+1 );\n\n        s01 = u01;\n\n        // u01 := u01 / delta11\n        const F deltaInv = F(1)/U.Get(k,k);\n        Scale( deltaInv, u01 );\n\n        // U00 := U00 + s01 u01'\n        Trr( UPPER, F(1), s01, u01, U00, conjugate );\n\n        // lambda11 := 1 / delta11\n        U.Set( k, k, deltaInv );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRDTRMM_UNBLOCKED_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trdtrmm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRDTRMM_HPP\n#define ELEM_TRDTRMM_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nLocalTrdtrmm\n( UpperOrLower uplo, DistMatrix<T,STAR,STAR>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalTrdtrmm\"))\n    Trdtrmm( uplo, A.Matrix(), conjugate );\n}\n\ntemplate<typename T>\ninline void\nLocalTrdtrmm\n( UpperOrLower uplo, \n  DistMatrix<T,STAR,STAR>& A, const DistMatrix<T,STAR,STAR>& dOff, \n  bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalTrdtrmm\"))\n    Trdtrmm( uplo, A.Matrix(), dOff.LockedMatrix(), conjugate );\n}\n\n} // namespace elem\n\n#include \"./Trdtrmm/Unblocked.hpp\"\n#include \"./Trdtrmm/LVar1.hpp\"\n#include \"./Trdtrmm/UVar1.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nTrdtrmm( UpperOrLower uplo, Matrix<F>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trdtrdmm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( uplo == LOWER )\n        internal::TrdtrmmLVar1( A, conjugate );\n    else\n        internal::TrdtrmmUVar1( A, conjugate );\n}\n\ntemplate<typename F>\ninline void\nTrdtrmm\n( UpperOrLower uplo, Matrix<F>& A, const Matrix<F>& dOff, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trdtrdmm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( uplo == LOWER )\n        internal::TrdtrmmLVar1( A, dOff, conjugate );\n    else\n        LogicError(\"Not yet written\");\n}\n\ntemplate<typename F>\ninline void\nTrdtrmm( UpperOrLower uplo, DistMatrix<F>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trdtrmm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( uplo == LOWER )\n        internal::TrdtrmmLVar1( A, conjugate );\n    else\n        internal::TrdtrmmUVar1( A, conjugate );\n}\n\ntemplate<typename F>\ninline void\nTrdtrmm\n( UpperOrLower uplo, \n  DistMatrix<F>& A, const DistMatrix<F,MD,STAR>& dOff, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trdtrmm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( uplo == LOWER )\n        internal::TrdtrmmLVar1( A, dOff, conjugate );\n    else\n        LogicError(\"Not yet written\");\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRDTRMM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trmm/LLN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   Copyright (c) 2013, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRMM_LLN_HPP\n#define ELEM_TRMM_LLN_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace trmm {\n\ntemplate<typename T>\ninline void\nLocalAccumulateLLN\n( Orientation orientation, UnitOrNonUnit diag, T alpha,\n  const DistMatrix<T,MC,  MR  >& L,\n  const DistMatrix<T,STAR,MR  >& XTrans,\n        DistMatrix<T,MC,  STAR>& Z )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LocalAccumulateLLN\");\n        if( L.Grid() != XTrans.Grid() ||\n            XTrans.Grid() != Z.Grid() )\n            LogicError(\"{L,X,Z} must be distributed over the same grid\");\n        if( L.Height() != L.Width() ||\n            L.Height() != XTrans.Width() ||\n            L.Height() != Z.Height() ||\n            XTrans.Height() != Z.Width() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X^H/T[* ,MR] ~ \",XTrans.Height(),\" x \",\n                                 XTrans.Width(),\"\\n\",\n             \"  Z[MC,* ] ~ \",Z.Height(),\" x \",Z.Width());\n        if( XTrans.RowAlign() != L.RowAlign() ||\n            Z.ColAlign() != L.ColAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Int m = Z.Height();\n    const Int n = Z.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T> D11(g);\n    const Int ratio = Max( g.Height(), g.Width() );\n    for( Int k=0; k<m; k+=ratio*bsize )\n    {\n        const Int nb = Min(ratio*bsize,m-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1Trans = LockedViewRange( XTrans, 0, k, n, k+nb );\n\n        auto Z1 = ViewRange( Z, k,    0, k+nb, n );\n        auto Z2 = ViewRange( Z, k+nb, 0, m,    n );\n\n        D11.AlignWith( L11 );\n        D11 = L11;\n        MakeTriangular( LOWER, D11 );\n        if( diag == UNIT )\n            SetDiagonal( D11, T(1) );\n        LocalGemm( NORMAL, orientation, alpha, D11, X1Trans, T(1), Z1 );\n        LocalGemm( NORMAL, orientation, alpha, L21, X1Trans, T(1), Z2 );\n    }\n}\n\ntemplate<typename T>\ninline void\nLLNA( UnitOrNonUnit diag, const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LLNA\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( L.Height() != L.Width() || L.Width() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\"\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width());\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T,VR,  STAR> X1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > X1Trans_STAR_MR(g);\n    DistMatrix<T,MC,  STAR> Z1_MC_STAR(g);\n\n    X1_VR_STAR.AlignWith( L );\n    X1Trans_STAR_MR.AlignWith( L );\n    Z1_MC_STAR.AlignWith( L );\n\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto X1 = ViewRange( X, 0, k, m, k+nb );\n\n        X1_VR_STAR = X1;\n        X1_VR_STAR.TransposePartialColAllGather( X1Trans_STAR_MR );\n        Zeros( Z1_MC_STAR, m, nb );\n        LocalAccumulateLLN\n        ( TRANSPOSE, diag, T(1), L, X1Trans_STAR_MR, Z1_MC_STAR );\n        X1.RowSumScatterFrom( Z1_MC_STAR );\n    }\n}\n\ntemplate<typename T>\ninline void\nLLNCOld( UnitOrNonUnit diag, const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LLNCOld\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( L.Height() != L.Width() || L.Width() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width());\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<T,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<T,STAR,VR  > X1_STAR_VR(g);\n    DistMatrix<T,MR,  STAR> D1Trans_MR_STAR(g);\n    DistMatrix<T,MR,  MC  > D1Trans_MR_MC(g);\n    DistMatrix<T,MC,  MR  > D1(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L11_STAR_STAR = L11;\n        X1_STAR_VR = X1;\n        LocalTrmm( LEFT, LOWER, NORMAL, diag, T(1), L11_STAR_STAR, X1_STAR_VR );\n        X1 = X1_STAR_VR;\n\n        L10_STAR_MC.AlignWith( X0 );\n        L10_STAR_MC = L10;\n        D1Trans_MR_STAR.AlignWith( X1 );\n        LocalGemm\n        ( TRANSPOSE, TRANSPOSE, T(1), X0, L10_STAR_MC, D1Trans_MR_STAR );\n        D1Trans_MR_MC.AlignWith( X1 );\n        D1Trans_MR_MC.RowSumScatterFrom( D1Trans_MR_STAR );\n        D1.AlignWith( X1 );\n        Zeros( D1, nb, n );\n        Transpose( D1Trans_MR_MC.Matrix(), D1.Matrix() );\n        Axpy( T(1), D1, X1 );\n    }\n}\n\ntemplate<typename T>\ninline void\nLLNC( UnitOrNonUnit diag, const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LLNC\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( L.Height() != L.Width() || L.Width() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width());\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<T,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<T,STAR,VR  > X1_STAR_VR(g);\n    DistMatrix<T,MR,  STAR> X1Trans_MR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        L21_MC_STAR.AlignWith( X2 );\n        L21_MC_STAR = L21;\n        X1Trans_MR_STAR.AlignWith( X2 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR );\n        LocalGemm\n        ( NORMAL, TRANSPOSE, T(1), L21_MC_STAR, X1Trans_MR_STAR, T(1), X2 );\n\n        L11_STAR_STAR = L11;\n        X1_STAR_VR.AlignWith( X1 );\n        X1_STAR_VR.TransposePartialRowFilterFrom( X1Trans_MR_STAR );\n        LocalTrmm( LEFT, LOWER, NORMAL, diag, T(1), L11_STAR_STAR, X1_STAR_VR );\n        X1 = X1_STAR_VR;\n    }\n}\n\n// Left Lower Normal (Non)Unit Trmm \n//   X := tril(L)  X, or\n//   X := trilu(L) X\ntemplate<typename T>\ninline void\nLLN( UnitOrNonUnit diag, const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trmm::LLN\"))\n    // TODO: Come up with a better routing mechanism\n    if( L.Height() > 5*X.Width() )\n        LLNA( diag, L, X );\n    else\n        LLNC( diag, L, X );\n}\n\n} // namespace trmm\n} // namespace elem\n\n#endif // ifndef ELEM_TRMM_LLN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trmm/LLT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   Copyright (c) 2013, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRMM_LLT_HPP\n#define ELEM_TRMM_LLT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace trmm {\n\ntemplate<typename T>\ninline void\nLocalAccumulateLLT\n( Orientation orientation, UnitOrNonUnit diag, T alpha,\n  const DistMatrix<T>& L,\n  const DistMatrix<T,MC,STAR>& X,\n        DistMatrix<T,MR,STAR>& Z )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LocalAccumulateLLT\");\n        if( L.Grid() != X.Grid() || X.Grid() != Z.Grid() )\n            LogicError(\"{L,X,Z} must be distributed over the same grid\");\n        if( L.Height() != L.Width() ||\n            L.Height() != X.Height() ||\n            L.Height() != Z.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",\n             \"  L        ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X[MC,* ] ~ \",X.Height(),\" x \",X.Width(),\"\\n\",\n             \"  Z[MR,* ] ~ \",Z.Height(),\" x \",Z.Width(),\"\\n\");\n        if( X.ColAlign() != L.ColAlign() ||\n            Z.ColAlign() != L.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Int m = Z.Height();\n    const Int n = Z.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n    \n    DistMatrix<T> D11(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n    for( Int k=0; k<m; k+=ratio*bsize )\n    {\n        const Int nb = Min(ratio*bsize,m-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = LockedViewRange( X, k,    0, k+nb, n );\n        auto X2 = LockedViewRange( X, k+nb, 0, m,    n );\n\n        auto Z1 = ViewRange( Z, k, 0, k+nb, n );\n\n        D11.AlignWith( L11 );\n        D11 = L11;\n        MakeTriangular( LOWER, D11 );\n        if( diag == UNIT )\n            SetDiagonal( D11, T(1) );\n        LocalGemm( orientation, NORMAL, alpha, D11, X1, T(1), Z1 );\n        LocalGemm( orientation, NORMAL, alpha, L21, X2, T(1), Z1 );\n    }\n}\n\ntemplate<typename T>\ninline void\nLLTA\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LLTA\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( L.Height() != L.Width() || L.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T,MC,STAR> X1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> Z1_MR_STAR(g);\n    DistMatrix<T,MR,MC  > Z1_MR_MC(g);\n\n    X1_MC_STAR.AlignWith( L );\n    Z1_MR_STAR.AlignWith( L );\n\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto X1 = LockedViewRange( X, 0, k, m, k+nb );\n\n        X1_MC_STAR = X1;\n        Zeros( Z1_MR_STAR, m, nb );\n        LocalAccumulateLLT\n        ( orientation, diag, T(1), L, X1_MC_STAR, Z1_MR_STAR );\n\n        Z1_MR_MC.RowSumScatterFrom( Z1_MR_STAR );\n        X1 = Z1_MR_MC;\n    }\n}\n   \ntemplate<typename T>\ninline void\nLLTCOld\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LLTCOld\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( L.Height() != L.Width() || L.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n    const bool conjugate = ( orientation == ADJOINT );\n\n    DistMatrix<T,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<T,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<T,STAR,VR  > X1_STAR_VR(g);\n    DistMatrix<T,MR,  STAR> D1Trans_MR_STAR(g);\n    DistMatrix<T,MR,  MC  > D1Trans_MR_MC(g);\n    DistMatrix<T,MC,  MR  > D1(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        X1_STAR_VR = X1;\n        L11_STAR_STAR = L11;\n        LocalTrmm\n        ( LEFT, LOWER, orientation, diag, T(1), L11_STAR_STAR, X1_STAR_VR );\n        X1 = X1_STAR_VR;\n \n        L21_MC_STAR.AlignWith( X2 );\n        L21_MC_STAR = L21;\n        D1Trans_MR_STAR.AlignWith( X1 );\n        LocalGemm\n        ( orientation, NORMAL, T(1), X2, L21_MC_STAR, D1Trans_MR_STAR );\n        D1Trans_MR_MC.AlignWith( X1 );\n        D1Trans_MR_MC.RowSumScatterFrom( D1Trans_MR_STAR );\n        D1.AlignWith( X1 );\n        Zeros( D1, nb, n );\n        Transpose( D1Trans_MR_MC.Matrix(), D1.Matrix(), conjugate );\n        Axpy( T(1), D1, X1 );\n    }\n}\n\ntemplate<typename T>\ninline void\nLLTC\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LLTC\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( L.Height() != L.Width() || L.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<T,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<T,STAR,VR  > X1_STAR_VR(g);\n    DistMatrix<T,MR,  STAR> X1Trans_MR_STAR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L10_STAR_MC.AlignWith( X0 );\n        L10_STAR_MC = L10;\n        X1Trans_MR_STAR.AlignWith( X0 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR );\n        LocalGemm\n        ( orientation, TRANSPOSE, \n          T(1), L10_STAR_MC, X1Trans_MR_STAR, T(1), X0 );\n\n        L11_STAR_STAR = L11;\n        X1_STAR_VR.AlignWith( X1 );\n        X1_STAR_VR.TransposePartialRowFilterFrom( X1Trans_MR_STAR );\n        LocalTrmm\n        ( LEFT, LOWER, orientation, diag, T(1), L11_STAR_STAR, X1_STAR_VR );\n        X1 = X1_STAR_VR;\n    }\n}\n\n// Left Lower (Conjugate)Transpose (Non)Unit Trmm\n//   X := tril(L)^T,\n//   X := tril(L)^H,\n//   X := trilu(L)^T, or\n//   X := trilu(L)^H\ntemplate<typename T>\ninline void\nLLT\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trmm::LLT\"))\n    // TODO: Come up with a better routing mechanism\n    if( L.Height() > 5*X.Width() )\n        LLTA( orientation, diag, L, X );\n    else\n        LLTC( orientation, diag, L, X );\n}\n\n} // namespace trmm\n} // namespace elem\n\n#endif // ifndef ELEM_TRMM_LLT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trmm/LUN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   Copyright (c) 2013, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRMM_LUN_HPP\n#define ELEM_TRMM_LUN_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace trmm {\n\ntemplate<typename T>\ninline void\nLocalAccumulateLUN\n( Orientation orientation, UnitOrNonUnit diag, T alpha,\n  const DistMatrix<T,MC,  MR  >& U,\n  const DistMatrix<T,STAR,MR  >& XTrans,\n        DistMatrix<T,MC,  STAR>& Z )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LocalAccumulateLUN\");\n        if( U.Grid() != XTrans.Grid() ||\n            XTrans.Grid() != Z.Grid() )\n            LogicError(\"{U,X,Z} must be distributed over the same grid\");\n        if( U.Height() != U.Width() ||\n            U.Height() != XTrans.Width() ||\n            U.Height() != Z.Height() ||\n            XTrans.Height() != Z.Width() )\n            LogicError\n            (\"Nonconformal:\\n\",\n             DimsString(U,\"U\"),\"\\n\",\n             DimsString(XTrans,\"X'[* ,MR]\"),\"\\n\",\n             DimsString(Z,\"Z[MC,* ]\"));\n        if( XTrans.RowAlign() != U.RowAlign() ||\n            Z.ColAlign() != U.ColAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Int m = Z.Height();\n    const Int n = Z.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T> D11(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n    for( Int k=0; k<m; k+=ratio*bsize )\n    {\n        const Int nb = Min(ratio*bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X1Trans = LockedViewRange( XTrans, 0, k, n, k+nb );\n\n        auto Z0 = ViewRange( Z, 0, 0, k,    n );\n        auto Z1 = ViewRange( Z, k, 0, k+nb, n );\n\n        D11.AlignWith( U11 );\n        D11 = U11;\n        MakeTriangular( UPPER, D11 );\n        if( diag == UNIT )\n            SetDiagonal( D11, T(1) );\n        LocalGemm( NORMAL, orientation, alpha, D11, X1Trans, T(1), Z1 );\n        LocalGemm( NORMAL, orientation, alpha, U01, X1Trans, T(1), Z0 );\n    }\n}\n\ntemplate<typename T>\ninline void\nLUNA( UnitOrNonUnit diag, const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LUNA\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( U.Height() != U.Width() || U.Width() != X.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",DimsString(U,\"U\"),\"\\n\",DimsString(X,\"X\"));\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T,VR,  STAR> X1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > X1Trans_STAR_MR(g);\n    DistMatrix<T,MC,  STAR> Z1_MC_STAR(g);\n\n    X1_VR_STAR.AlignWith( U );\n    X1Trans_STAR_MR.AlignWith( U );\n    Z1_MC_STAR.AlignWith( U );\n\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto X1 = ViewRange( X, 0, k, m, k+nb );\n\n        X1_VR_STAR = X1;\n        X1_VR_STAR.TransposePartialColAllGather( X1Trans_STAR_MR );\n        Zeros( Z1_MC_STAR, m, nb );\n        LocalAccumulateLUN\n        ( TRANSPOSE, diag, T(1), U, X1Trans_STAR_MR, Z1_MC_STAR );\n\n        X1.RowSumScatterFrom( Z1_MC_STAR );\n    }\n}\n\ntemplate<typename T>\ninline void\nLUNCOld( UnitOrNonUnit diag, const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LUNCOld\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( U.Height() != U.Width() || U.Width() != X.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",DimsString(U,\"U\"),\"\\n\",DimsString(X,\"X\"));\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<T,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<T,STAR,VR  > X1_STAR_VR(g);\n    DistMatrix<T,MR,  STAR> D1Trans_MR_STAR(g);\n    DistMatrix<T,MR,  MC  > D1Trans_MR_MC(g);\n    DistMatrix<T,MC,  MR  > D1(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        X1_STAR_VR = X1;\n        U11_STAR_STAR = U11;\n        LocalTrmm\n        ( LEFT, UPPER, NORMAL, diag, T(1), U11_STAR_STAR, X1_STAR_VR );\n        X1 = X1_STAR_VR;\n \n        U12_STAR_MC.AlignWith( X2 );\n        U12_STAR_MC = U12;\n        D1Trans_MR_STAR.AlignWith( X1 );\n        LocalGemm\n        ( TRANSPOSE, TRANSPOSE, T(1), X2, U12_STAR_MC, D1Trans_MR_STAR );\n        D1Trans_MR_MC.AlignWith( X1 );\n        D1Trans_MR_MC.RowSumScatterFrom( D1Trans_MR_STAR );\n        D1.AlignWith( X1 );\n        Zeros( D1, nb, n );\n        Transpose( D1Trans_MR_MC.Matrix(), D1.Matrix() );\n        Axpy( T(1), D1, X1 );\n    }\n}\n\ntemplate<typename T>\ninline void\nLUNC( UnitOrNonUnit diag, const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LUNC\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( U.Height() != U.Width() || U.Width() != X.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",DimsString(U,\"U\"),\"\\n\",DimsString(X,\"X\"));\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<T,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<T,STAR,VR  > X1_STAR_VR(g);\n    DistMatrix<T,MR,  STAR> X1Trans_MR_STAR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        U01_MC_STAR.AlignWith( X0 );\n        U01_MC_STAR = U01;\n        X1Trans_MR_STAR.AlignWith( X0 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR );\n        LocalGemm\n        ( NORMAL, TRANSPOSE, T(1), U01_MC_STAR, X1Trans_MR_STAR, T(1), X0 );\n\n        U11_STAR_STAR = U11;\n        X1_STAR_VR.AlignWith( X1 );\n        X1_STAR_VR.TransposePartialRowFilterFrom( X1Trans_MR_STAR );\n        LocalTrmm( LEFT, UPPER, NORMAL, diag, T(1), U11_STAR_STAR, X1_STAR_VR );\n        X1 = X1_STAR_VR;\n    }\n}\n\n// Left Upper Normal (Non)Unit Trmm\n//   X := triu(U)  X, or\n//   X := triuu(U) X\ntemplate<typename T>\ninline void\nLUN( UnitOrNonUnit diag, const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trmm::LUN\"))\n    // TODO: Come up with a better routing mechanism\n    if( U.Height() > 5*X.Width() )\n        LUNA( diag, U, X );\n    else\n        LUNC( diag, U, X );\n}\n\n} // namespace trmm\n} // namespace elem\n\n#endif // ifndef ELEM_TRMM_LUN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trmm/LUT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   Copyright (c) 2013, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRMM_LUT_HPP\n#define ELEM_TRMM_LUT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace trmm {\n\ntemplate<typename T>\ninline void\nLocalAccumulateLUT\n( Orientation orientation, UnitOrNonUnit diag, T alpha,\n  const DistMatrix<T>& U,\n  const DistMatrix<T,MC,STAR>& X,\n        DistMatrix<T,MR,STAR>& Z )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LocalAccumulateLUT\");\n        if( U.Grid() != X.Grid() ||\n            X.Grid() != Z.Grid() )\n            LogicError(\"{U,X,Z} must be distributed over the same grid\");\n        if( U.Height() != U.Width() ||\n            U.Height() != X.Height() ||\n            U.Height() != Z.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",\n             \"  U        ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X[MC,* ] ~ \",X.Height(),\" x \",X.Width(),\"\\n\",\n             \"  Z[MR,* ] ~ \",Z.Height(),\" x \",Z.Width(),\"\\n\");\n        if( X.ColAlign() != U.ColAlign() ||\n            Z.ColAlign() != U.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Int m = Z.Height();\n    const Int n = Z.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T> D11(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n    for( Int k=0; k<m; k+=ratio*bsize )\n    {\n        const Int nb = Min(ratio*bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = LockedViewRange( X, 0, 0, k,    n );\n        auto X1 = LockedViewRange( X, k, 0, k+nb, n );\n \n        auto Z1 = ViewRange( Z, k, 0, k+nb, n );\n\n        D11.AlignWith( U11 );\n        D11 = U11;\n        MakeTriangular( UPPER, D11 );\n        if( diag == UNIT )\n            SetDiagonal( D11, T(1) );\n        LocalGemm( orientation, NORMAL, alpha, D11, X1, T(1), Z1 );\n        LocalGemm( orientation, NORMAL, alpha, U01, X0, T(1), Z1 );\n    }\n}\n\ntemplate<typename T>\ninline void\nLUTA\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LUTA\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( U.Height() != U.Width() || U.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T,MC,STAR> X1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> Z1_MR_STAR(g);\n    DistMatrix<T,MR,MC  > Z1_MR_MC(g);\n\n    X1_MC_STAR.AlignWith( U );\n    Z1_MR_STAR.AlignWith( U );\n\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto X1 = ViewRange( X, 0, k, m, k+nb );\n\n        X1_MC_STAR = X1;\n        Zeros( Z1_MR_STAR, m, nb );\n        LocalAccumulateLUT\n        ( orientation, diag, T(1), U, X1_MC_STAR, Z1_MR_STAR );\n\n        Z1_MR_MC.RowSumScatterFrom( Z1_MR_STAR );\n        X1 = Z1_MR_MC;\n    }\n}\n\ntemplate<typename T>\ninline void\nLUTCOld\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LUTCOld\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( U.Height() != U.Width() || U.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n    const bool conjugate = ( orientation == ADJOINT );\n\n    DistMatrix<T,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<T,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<T,STAR,VR  > X1_STAR_VR(g);\n    DistMatrix<T,MR,  STAR> D1Trans_MR_STAR(g);\n    DistMatrix<T,MR,  MC  > D1Trans_MR_MC(g);\n    DistMatrix<T,MC,  MR  > D1(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        X1_STAR_VR = X1;\n        U11_STAR_STAR = U11;\n        LocalTrmm\n        ( LEFT, UPPER, orientation, diag, T(1), U11_STAR_STAR, X1_STAR_VR );\n        X1 = X1_STAR_VR;\n        \n        U01_MC_STAR.AlignWith( X0 );\n        U01_MC_STAR = U01;\n        D1Trans_MR_STAR.AlignWith( X1 );\n        LocalGemm\n        ( orientation, NORMAL, T(1), X0, U01_MC_STAR, D1Trans_MR_STAR );\n        D1Trans_MR_MC.AlignWith( X1 );\n        D1Trans_MR_MC.RowSumScatterFrom( D1Trans_MR_STAR );\n        D1.AlignWith( X1 );\n        Zeros( D1, nb, n );\n        Transpose( D1Trans_MR_MC.Matrix(), D1.Matrix(), conjugate );\n        Axpy( T(1), D1, X1 );\n    }\n}\n\ntemplate<typename T>\ninline void\nLUTC\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LUTC\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( U.Height() != U.Width() || U.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<T,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<T,STAR,VR  > X1_STAR_VR(g);\n    DistMatrix<T,MR,  STAR> X1Trans_MR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        U12_STAR_MC.AlignWith( X2 );\n        U12_STAR_MC = U12;\n        X1Trans_MR_STAR.AlignWith( X2 ); \n        X1.TransposeColAllGather( X1Trans_MR_STAR );\n        LocalGemm\n        ( orientation, TRANSPOSE, \n          T(1), U12_STAR_MC, X1Trans_MR_STAR, T(1), X2 );\n\n        U11_STAR_STAR = U11;\n        X1_STAR_VR.AlignWith( X1 );\n        X1_STAR_VR.TransposePartialRowFilterFrom( X1Trans_MR_STAR );\n        LocalTrmm\n        ( LEFT, UPPER, orientation, diag, T(1), U11_STAR_STAR, X1_STAR_VR );\n        X1 = X1_STAR_VR;\n    }\n}\n\n// Left Upper (Conjugate)Transpose (Non)Unit Trmm\n//   X := triu(U)^T  X, \n//   X := triu(U)^H  X,\n//   X := triuu(U)^T X, or\n//   X := triuu(U)^H X\ntemplate<typename T>\ninline void\nLUT\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trmm::LUT\"))\n    // TODO: Come up with a better routing mechanism\n    if( U.Height() > 5*X.Width() )\n        LUTA( orientation, diag, U, X );\n    else\n        LUTC( orientation, diag, U, X );\n}\n\n} // namespace trmm\n} // namespace elem\n\n#endif // ifndef ELEM_TRMM_LUT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trmm/RLN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   Copyright (c) 2013, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRMM_RLN_HPP\n#define ELEM_TRMM_RLN_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace trmm {\n\ntemplate<typename T>\ninline void\nLocalAccumulateRLN\n( Orientation orientation, UnitOrNonUnit diag, T alpha,\n  const DistMatrix<T,MC,  MR  >& L,\n  const DistMatrix<T,STAR,MC  >& X,\n        DistMatrix<T,MR,  STAR>& ZTrans )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LocalAccumulateRLN\");\n        if( L.Grid() != X.Grid() || \n            X.Grid() != ZTrans.Grid() )\n            LogicError(\"{L,X,Z} must be distributed over the same grid\");\n        if( L.Height() != L.Width() ||\n            L.Height() != X.Width() ||\n            L.Height() != ZTrans.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",\n             DimsString(L,\"L\"),\"\\n\",\n             DimsString(X,\"X[* ,MC]\"),\"\\n\",\n             DimsString(ZTrans,\"Z'[MR,* ]\"));\n        if( X.RowAlign() != L.ColAlign() ||\n            ZTrans.ColAlign() != L.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Int m = ZTrans.Height();\n    const Int n = ZTrans.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T> D11(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n    for( Int k=0; k<m; k+=ratio*bsize )\n    {\n        const Int nb = Min(ratio*bsize,m-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = LockedViewRange( X, 0, k,    n, k+nb );\n        auto X2 = LockedViewRange( X, 0, k+nb, n, m    );\n\n        auto Z1Trans = ViewRange( ZTrans, k, 0, k+nb, n );\n\n        D11.AlignWith( L11 );\n        D11 = L11;\n        MakeTriangular( LOWER, D11 );\n        if( diag == UNIT )\n            SetDiagonal( D11, T(1) );\n        LocalGemm( orientation, orientation, alpha, D11, X1, T(1), Z1Trans );\n        LocalGemm( orientation, orientation, alpha, L21, X2, T(1), Z1Trans );\n    }\n}\n\ntemplate<typename T>\ninline void\nRLNA( UnitOrNonUnit diag, const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::RLNA\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"{L,X} must be distributed over the same grid\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T,STAR,VC  > X1_STAR_VC(g);\n    DistMatrix<T,STAR,MC  > X1_STAR_MC(g);\n    DistMatrix<T,MR,  STAR> Z1Trans_MR_STAR(g);\n    DistMatrix<T,MR,  MC  > Z1Trans_MR_MC(g);\n\n    X1_STAR_VC.AlignWith( L );\n    X1_STAR_MC.AlignWith( L );\n    Z1Trans_MR_STAR.AlignWith( L );\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        X1_STAR_VC = X1;\n        X1_STAR_MC = X1_STAR_VC;\n\n        Zeros( Z1Trans_MR_STAR, n, nb );\n        LocalAccumulateRLN\n        ( TRANSPOSE, diag, T(1), L, X1_STAR_MC, Z1Trans_MR_STAR );\n\n        Z1Trans_MR_MC.AlignWith( X1 );\n        Z1Trans_MR_MC.RowSumScatterFrom( Z1Trans_MR_STAR );\n        Transpose( Z1Trans_MR_MC.Matrix(), X1.Matrix() );\n    }\n}\n\ntemplate<typename T>\ninline void\nRLNCOld( UnitOrNonUnit diag, const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::RLNCOld\");\n        if( L.Grid() != X.Grid() )\n            LogicError\n            (\"L and X must be distributed over the same grid\");\n        if( L.Height() != L.Width() || X.Width() != L.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",DimsString(L,\"L\"),\"\\n\",DimsString(X,\"X\"));\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<T,MR,  STAR> L21_MR_STAR(g);\n    DistMatrix<T,VC,  STAR> X1_VC_STAR(g);\n    DistMatrix<T,MC,  STAR> D1_MC_STAR(g);\n\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, n,    k+nb );\n\n        auto X1 = ViewRange( X, 0, k,    m, k+nb );\n        auto X2 = ViewRange( X, 0, k+nb, m, n    );\n\n        X1_VC_STAR = X1;\n        L11_STAR_STAR = L11;\n        LocalTrmm\n        ( RIGHT, LOWER, NORMAL, diag, T(1), L11_STAR_STAR, X1_VC_STAR );\n        X1 = X1_VC_STAR;\n \n        L21_MR_STAR.AlignWith( X2 );\n        L21_MR_STAR = L21;\n        D1_MC_STAR.AlignWith( X1 );\n        LocalGemm( NORMAL, NORMAL, T(1), X2, L21_MR_STAR, D1_MC_STAR );\n        X1.RowSumScatterUpdate( T(1), D1_MC_STAR );\n    }\n}\n\ntemplate<typename T>\ninline void\nRLNC( UnitOrNonUnit diag, const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::RLNC\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( L.Height() != L.Width() || X.Width() != L.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",DimsString(L,\"L\"),\"\\n\",DimsString(X,\"X\"));\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<T,MR,  STAR> L10Trans_MR_STAR(g);\n    DistMatrix<T,VC,  STAR> X1_VC_STAR(g);\n    DistMatrix<T,MC,  STAR> X1_MC_STAR(g);\n\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, m, k    );\n        auto X1 = ViewRange( X, 0, k, m, k+nb );\n\n        X1_MC_STAR.AlignWith( X0 );\n        X1_MC_STAR = X1;\n        L10Trans_MR_STAR.AlignWith( X0 );\n        L10.TransposeColAllGather( L10Trans_MR_STAR );\n        LocalGemm\n        ( NORMAL, TRANSPOSE, T(1), X1_MC_STAR, L10Trans_MR_STAR, T(1), X0 );\n\n        L11_STAR_STAR = L11;\n        X1_VC_STAR.AlignWith( X1 );\n        X1_VC_STAR = X1_MC_STAR;\n        LocalTrmm\n        ( RIGHT, LOWER, NORMAL, diag, T(1), L11_STAR_STAR, X1_VC_STAR );\n        X1 = X1_VC_STAR;\n    }\n}\n\n// Right Lower Normal (Non)Unit Trmm\n//   X := X tril(L), and\n//   X := X trilu(L)\ntemplate<typename T>\ninline void\nRLN( UnitOrNonUnit diag, const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trmm::RLN\"))\n    // TODO: Come up with a better routing mechanism\n    if( L.Height() > 5*X.Height() )\n        RLNA( diag, L, X );\n    else\n        RLNC( diag, L, X );\n}\n\n} // namespace trmm\n} // namespace elem\n\n#endif // ifndef ELEM_TRMM_RLN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trmm/RLT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   Copyright (c) 2013, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRMM_RLT_HPP\n#define ELEM_TRMM_RLT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace trmm {\n\ntemplate<typename T>\ninline void\nLocalAccumulateRLT\n( UnitOrNonUnit diag, T alpha,\n  const DistMatrix<T>& L,\n  const DistMatrix<T,MR,STAR>& XTrans,\n        DistMatrix<T,MC,STAR>& ZTrans )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LocalAccumulateRLT\");\n        if( L.Grid() != XTrans.Grid() ||\n            XTrans.Grid() != ZTrans.Grid() )\n            LogicError(\"{L,X,Z} must be distributed over the same grid\");\n        if( L.Height() != L.Width() ||\n            L.Height() != XTrans.Height() ||\n            L.Height() != ZTrans.Height() ||\n            XTrans.Width() != ZTrans.Width() )\n            LogicError\n            (\"Nonconformal:\\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X^H/T[MR,* ] ~ \",XTrans.Height(),\" x \",\n                                 XTrans.Width(),\"\\n\",\n             \"  Z^H/T[MC,* ] ~ \",ZTrans.Height(),\" x \",\n                                 ZTrans.Width());\n        if( XTrans.ColAlign() != L.RowAlign() ||\n            ZTrans.ColAlign() != L.ColAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Int m = ZTrans.Height();\n    const Int n = ZTrans.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<T> D11(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n\n    for( Int k=0; k<m; k+=ratio*bsize )\n    {\n        const Int nb = Min(ratio*bsize,m-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1Trans = LockedViewRange( XTrans, k, 0, k+nb, n );\n\n        auto Z1Trans = ViewRange( ZTrans, k,    0, k+nb, n );\n        auto Z2Trans = ViewRange( ZTrans, k+nb, 0, m,    n );\n\n        D11.AlignWith( L11 );\n        D11 = L11;\n        MakeTriangular( LOWER, D11 );\n        if( diag == UNIT )\n            SetDiagonal( D11, T(1) );\n        LocalGemm( NORMAL, NORMAL, alpha, D11, X1Trans, T(1), Z1Trans );\n        LocalGemm( NORMAL, NORMAL, alpha, L21, X1Trans, T(1), Z2Trans );\n    }\n}\n\ntemplate<typename T>\ninline void\nRLTA\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::RLTA\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"{L,X} must be distributed over the same grid\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n    const bool conjugate = ( orientation == ADJOINT );\n\n    DistMatrix<T,MR,  STAR> X1Trans_MR_STAR(g);\n    DistMatrix<T,MC,  STAR> Z1Trans_MC_STAR(g);\n    DistMatrix<T,MC,  MR  > Z1Trans(g);\n    DistMatrix<T,MR,  MC  > Z1Trans_MR_MC(g);\n\n    X1Trans_MR_STAR.AlignWith( L );\n    Z1Trans_MC_STAR.AlignWith( L );\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        X1.TransposeColAllGather( X1Trans_MR_STAR, conjugate );\n        Zeros( Z1Trans_MC_STAR, X1.Width(), X1.Height() );\n        LocalAccumulateRLT\n        ( diag, T(1), L, X1Trans_MR_STAR, Z1Trans_MC_STAR );\n\n        Z1Trans.RowSumScatterFrom( Z1Trans_MC_STAR );\n        Z1Trans_MR_MC.AlignWith( X1 );\n        Z1Trans_MR_MC = Z1Trans;\n        Transpose( Z1Trans_MR_MC.Matrix(), X1.Matrix(), conjugate );\n    }\n}\n\ntemplate<typename T>\ninline void\nRLTC\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::RLTC\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected Adjoint/Transpose option\");\n        if( L.Height() != L.Width() || X.Width() != L.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width());\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n    const bool conjugate = ( orientation == ADJOINT );\n\n    DistMatrix<T,MR,  STAR> L10Trans_MR_STAR(g);\n    DistMatrix<T,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<T,VC,  STAR> X1_VC_STAR(g);\n    DistMatrix<T,MC,  STAR> D1_MC_STAR(g);\n\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n         \n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, m, k    );\n        auto X1 = ViewRange( X, 0, k, m, k+nb );\n\n        X1_VC_STAR = X1;\n        L11_STAR_STAR = L11;\n        LocalTrmm\n        ( RIGHT, LOWER, orientation, diag, T(1), L11_STAR_STAR, X1_VC_STAR );\n        X1 = X1_VC_STAR;\n \n        L10Trans_MR_STAR.AlignWith( X0 );\n        L10.TransposeColAllGather( L10Trans_MR_STAR, conjugate );\n        D1_MC_STAR.AlignWith( X1 );\n        LocalGemm( NORMAL, NORMAL, T(1), X0, L10Trans_MR_STAR, D1_MC_STAR );\n        X1.RowSumScatterUpdate( T(1), D1_MC_STAR );\n    }\n}\n\n// Right Lower Adjoint/Transpose (Non)Unit Trmm\n//   X := X tril(L)^T,\n//   X := X tril(L)^H,\n//   X := X trilu(L)^T, or\n//   X := X trilu(L)^H\ntemplate<typename T>\ninline void\nRLT\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& L, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trmm::RLT\"))\n    // TODO: Come up with a better routing mechanism\n    if( L.Height() > 5*X.Height() )\n        RLTA( orientation, diag, L, X );\n    else\n        RLTC( orientation, diag, L, X );\n}\n\n} // namespace trmm\n} // namespace elem\n\n#endif // ifndef ELEM_TRMM_RLT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trmm/RUN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   Copyright (c) 2013, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRMM_RUN_HPP\n#define ELEM_TRMM_RUN_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace trmm {\n\ntemplate<typename T>\ninline void\nLocalAccumulateRUN\n( Orientation orientation, UnitOrNonUnit diag, T alpha,\n  const DistMatrix<T,MC,  MR  >& U,\n  const DistMatrix<T,STAR,MC  >& X,\n        DistMatrix<T,MR,  STAR>& ZTrans )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LocalAccumulateRUN\");\n        if( U.Grid() != X.Grid() ||\n            X.Grid() != ZTrans.Grid() )\n            LogicError(\"{U,X,Z} must be distributed over the same grid\");\n        if( U.Height() != U.Width() ||\n            U.Height() != X.Width() ||\n            U.Height() != ZTrans.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X[* ,MC] ~ \",X.Height(),\" x \",X.Width(),\"\\n\",\n             \"  Z^H/T[MR,* ] ~ \",ZTrans.Height(),\" x \",\n                                 ZTrans.Width());\n        if( X.RowAlign() != U.ColAlign() ||\n            ZTrans.ColAlign() != U.RowAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Int m = ZTrans.Height();\n    const Int n = ZTrans.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T> D11(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n    for( Int k=0; k<m; k+=ratio*bsize )\n    {\n        const Int nb = Min(ratio*bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = LockedViewRange( X, 0, 0, n, k    );\n        auto X1 = LockedViewRange( X, 0, k, n, k+nb );\n        \n        auto Z1Trans = ViewRange( ZTrans, k, 0, k+nb, n );\n\n        D11.AlignWith( U11 );\n        D11 = U11;\n        MakeTriangular( UPPER, D11 );\n        if( diag == UNIT )\n            SetDiagonal( D11, T(1) );\n        LocalGemm( orientation, orientation, alpha, D11, X1, T(1), Z1Trans );\n        LocalGemm( orientation, orientation, alpha, U01, X0, T(1), Z1Trans );\n    }\n}\n\ntemplate<typename T>\ninline void\nRUNA( UnitOrNonUnit diag, const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::RUNA\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"{U,X} must be distributed over the same grid\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T,STAR,VC  > X1_STAR_VC(g);\n    DistMatrix<T,STAR,MC  > X1_STAR_MC(g);\n    DistMatrix<T,MR,  STAR> Z1Trans_MR_STAR(g);\n    DistMatrix<T,MR,  MC  > Z1Trans_MR_MC(g);\n\n    X1_STAR_VC.AlignWith( U );\n    X1_STAR_MC.AlignWith( U );\n    Z1Trans_MR_STAR.AlignWith( U );\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        X1_STAR_VC = X1;\n        X1_STAR_MC = X1_STAR_VC;\n        Zeros( Z1Trans_MR_STAR, X1.Width(), X1.Height() );\n        LocalAccumulateRUN\n        ( TRANSPOSE, diag, T(1), U, X1_STAR_MC, Z1Trans_MR_STAR );\n\n        Z1Trans_MR_MC.AlignWith( X1 );\n        Z1Trans_MR_MC.RowSumScatterFrom( Z1Trans_MR_STAR );\n        Transpose( Z1Trans_MR_MC.Matrix(), X1.Matrix() );\n    }\n}\n\ntemplate<typename T>\ninline void\nRUNCOld( UnitOrNonUnit diag, const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::RUNCOld\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( U.Height() != U.Width() || X.Width() != U.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width());\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T,MR,  STAR> U01_MR_STAR(g);\n    DistMatrix<T,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<T,VC,  STAR> X1_VC_STAR(g);    \n    DistMatrix<T,MC,  STAR> D1_MC_STAR(g);\n    \n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, m, k    );\n        auto X1 = ViewRange( X, 0, k, m, k+nb );\n\n        X1_VC_STAR = X1;\n        U11_STAR_STAR = U11;\n        LocalTrmm\n        ( RIGHT, UPPER, NORMAL, diag, T(1), U11_STAR_STAR, X1_VC_STAR );\n        X1 = X1_VC_STAR;\n \n        U01_MR_STAR.AlignWith( X0 );\n        U01_MR_STAR = U01;\n        D1_MC_STAR.AlignWith( X1 );\n        LocalGemm( NORMAL, NORMAL, T(1), X0, U01_MR_STAR, D1_MC_STAR );\n        X1.RowSumScatterUpdate( T(1), D1_MC_STAR );\n    }\n}\n\ntemplate<typename T>\ninline void\nRUNC( UnitOrNonUnit diag, const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::RUNC\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( U.Height() != U.Width() || X.Width() != U.Height() )\n            LogicError\n            (\"Nonconformal:\\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width());\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T,MR,  STAR> U12Trans_MR_STAR(g);\n    DistMatrix<T,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<T,VC,  STAR> X1_VC_STAR(g);\n    DistMatrix<T,MC,  STAR> X1_MC_STAR(g);\n    \n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, n    );\n\n        auto X1 = ViewRange( X, 0, k,    m, k+nb );\n        auto X2 = ViewRange( X, 0, k+nb, m, n    );\n\n        X1_MC_STAR.AlignWith( X2 );\n        X1_MC_STAR = X1;\n        U12Trans_MR_STAR.AlignWith( X2 );\n        U12.TransposeColAllGather( U12Trans_MR_STAR );\n        LocalGemm\n        ( NORMAL, TRANSPOSE, T(1), X1_MC_STAR, U12Trans_MR_STAR, T(1), X2 );\n\n        U11_STAR_STAR = U11;\n        X1_VC_STAR.AlignWith( X1 );\n        X1_VC_STAR = X1_MC_STAR;\n        LocalTrmm\n        ( RIGHT, UPPER, NORMAL, diag, T(1), U11_STAR_STAR, X1_VC_STAR );\n        X1 = X1_VC_STAR;\n    }\n}\n\n// Right Upper Normal (Non)Unit Trmm\n//   X := X triu(U), and\n//   X := X triuu(U)\ntemplate<typename T>\ninline void\nRUN( UnitOrNonUnit diag, const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trmm::RUN\"))\n    // TODO: Come up with a better routing mechanism\n    if( U.Height() > 5*X.Height() )\n        RUNA( diag, U, X );\n    else\n        RUNC( diag, U, X );\n}\n\n} // namespace trmm\n} // namespace elem\n\n#endif // ifndef ELEM_TRMM_RUN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trmm/RUT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   Copyright (c) 2013, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRMM_RUT_HPP\n#define ELEM_TRMM_RUT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_GEMM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace trmm {\n\ntemplate<typename T>\ninline void\nLocalAccumulateRUT\n( UnitOrNonUnit diag, T alpha,\n  const DistMatrix<T>& U,\n  const DistMatrix<T,MR,STAR>& XTrans,\n        DistMatrix<T,MC,STAR>& ZTrans )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::LocalAccumulateRUT\");\n        if( U.Grid() != XTrans.Grid() ||\n            XTrans.Grid() != ZTrans.Grid() )\n            LogicError(\"{U,X,Z} must be distributed over the same grid\");\n        if( U.Height() != U.Width() ||\n            U.Height() != XTrans.Height() ||\n            U.Height() != ZTrans.Height() ||\n            XTrans.Width() != ZTrans.Width() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X^H/T[MR,* ] ~ \",XTrans.Height(),\" x \",\n                                 XTrans.Width(),\"\\n\",\n             \"  Z^H/T[MC,* ] ~ \",ZTrans.Height(),\" x \",\n                                 ZTrans.Width());\n        if( XTrans.ColAlign() != U.RowAlign() ||\n            ZTrans.ColAlign() != U.ColAlign() )\n            LogicError(\"Partial matrix distributions are misaligned\");\n    )\n    const Int m = ZTrans.Height();\n    const Int n = ZTrans.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<T> D11(g);\n\n    const Int ratio = Max( g.Height(), g.Width() );\n    for( Int k=0; k<m; k+=ratio*bsize )\n    {\n        const Int nb = Min(ratio*bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X1Trans = LockedViewRange( XTrans, k, 0, k+nb, n );\n   \n        auto Z0Trans = ViewRange( ZTrans, 0, 0, k,    n );\n        auto Z1Trans = ViewRange( ZTrans, k, 0, k+nb, n );\n\n        D11.AlignWith( U11 );\n        D11 = U11;\n        MakeTriangular( UPPER, D11 );\n        if( diag == UNIT )\n            SetDiagonal( D11, T(1) );\n        LocalGemm( NORMAL, NORMAL, alpha, D11, X1Trans, T(1), Z1Trans );\n        LocalGemm( NORMAL, NORMAL, alpha, U01, X1Trans, T(1), Z0Trans );\n    }\n}\n\ntemplate<typename T>\ninline void\nRUTA\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::RUTA\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"{U,X} must be distributed over the same grid\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n    const bool conjugate = ( orientation == ADJOINT );\n\n    DistMatrix<T,MR,  STAR> X1Trans_MR_STAR(g);\n    DistMatrix<T,MC,  STAR> Z1Trans_MC_STAR(g);\n    DistMatrix<T,MC,  MR  > Z1Trans(g);\n    DistMatrix<T,MR,  MC  > Z1Trans_MR_MC(g);\n\n    X1Trans_MR_STAR.AlignWith( U );\n    Z1Trans_MC_STAR.AlignWith( U );\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        X1.TransposeColAllGather( X1Trans_MR_STAR, conjugate );\n        Zeros( Z1Trans_MC_STAR, n, nb );\n        LocalAccumulateRUT\n        ( diag, T(1), U, X1Trans_MR_STAR, Z1Trans_MC_STAR );\n\n        Z1Trans.RowSumScatterFrom( Z1Trans_MC_STAR );\n        Z1Trans_MR_MC.AlignWith( X1 );\n        Z1Trans_MR_MC = Z1Trans;\n        Transpose( Z1Trans_MR_MC.Matrix(), X1.Matrix(), conjugate );\n    }\n}\n\ntemplate<typename T>\ninline void\nRUTC\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trmm::RUTC\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected Adjoint/Transpose option\");\n        if( U.Height() != U.Width() || X.Width() != U.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width());\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n    const bool conjugate = ( orientation == ADJOINT );\n\n    DistMatrix<T,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<T,MR,  STAR> U12Trans_MR_STAR(g);\n    DistMatrix<T,VC,  STAR> X1_VC_STAR(g);\n    DistMatrix<T,MC,  STAR> D1_MC_STAR(g);\n    \n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, n    );\n\n        auto X1 = ViewRange( X, 0, k,    m, k+nb );\n        auto X2 = ViewRange( X, 0, k+nb, m, n    );\n\n        X1_VC_STAR = X1;\n        U11_STAR_STAR = U11;\n        LocalTrmm\n        ( RIGHT, UPPER, orientation, diag, T(1), U11_STAR_STAR, X1_VC_STAR );\n        X1 = X1_VC_STAR;\n \n        U12Trans_MR_STAR.AlignWith( X2 );\n        U12.TransposeColAllGather( U12Trans_MR_STAR, conjugate );\n        D1_MC_STAR.AlignWith( X1 );\n        LocalGemm( NORMAL, NORMAL, T(1), X2, U12Trans_MR_STAR, D1_MC_STAR );\n        X1.RowSumScatterUpdate( T(1), D1_MC_STAR );\n    }\n}\n\n// Right Upper Adjoint/Transpose (Non)Unit Trmm\n//   X := X triu(U)^T, \n//   X := X triu(U)^H,\n//   X := X triuu(U)^T, or\n//   X := X triuu(U)^H\ntemplate<typename T>\ninline void\nRUT\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<T>& U, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trmm::RUT\"))\n    // TODO: Come up with a better routing mechanism\n    if( U.Height() > 5*X.Height() )\n        RUTA( orientation, diag, U, X );\n    else\n        RUTC( orientation, diag, U, X );\n}\n\n} // namespace trmm\n} // namespace elem\n\n#endif // ifndef ELEM_TRMM_RUT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trmm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRMM_HPP\n#define ELEM_TRMM_HPP\n\nnamespace elem {\n\ntemplate<typename T,Dist BColDist,Dist BRowDist>\ninline void\nLocalTrmm\n( LeftOrRight side, UpperOrLower uplo,\n  Orientation orientation, UnitOrNonUnit diag,\n  T alpha, const DistMatrix<T,STAR,STAR>& A,\n                 DistMatrix<T,BColDist,BRowDist>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrmm\");\n        if( (side == LEFT && BColDist != STAR) ||\n            (side == RIGHT && BRowDist != STAR) )\n            LogicError\n            (\"Dist of RHS must conform with that of triangle\");\n    )\n    Trmm\n    ( side, uplo, orientation, diag, alpha, A.LockedMatrix(), B.Matrix() );\n}\n\n} // namespace elem\n\n#include \"./Trmm/LLN.hpp\"\n#include \"./Trmm/LLT.hpp\"\n#include \"./Trmm/LUN.hpp\"\n#include \"./Trmm/LUT.hpp\"\n#include \"./Trmm/RLN.hpp\"\n#include \"./Trmm/RLT.hpp\"\n#include \"./Trmm/RUN.hpp\"\n#include \"./Trmm/RUT.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nTrmm\n( LeftOrRight side, UpperOrLower uplo,\n  Orientation orientation, UnitOrNonUnit diag,\n  T alpha, const Matrix<T>& A, Matrix<T>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trmm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Triangular matrix must be square\");\n        if( side == LEFT )\n        {\n            if( A.Height() != B.Height() )\n                LogicError(\"Nonconformal Trmm\");\n        }\n        else\n        {\n            if( A.Height() != B.Width() )\n                LogicError(\"Nonconformal Trmm\");\n        }\n    )\n    const char sideChar = LeftOrRightToChar( side );\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const char transChar = OrientationToChar( orientation );\n    const char diagChar = UnitOrNonUnitToChar( diag );\n    blas::Trmm\n    ( sideChar, uploChar, transChar, diagChar, B.Height(), B.Width(),\n      alpha, A.LockedBuffer(), A.LDim(), B.Buffer(), B.LDim() );\n}\n\ntemplate<typename T>\ninline void\nTrmm\n( LeftOrRight side, UpperOrLower uplo, \n  Orientation orientation, UnitOrNonUnit diag,\n  T alpha, const DistMatrix<T>& A, DistMatrix<T>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trmm\"))\n    Scale( alpha, X );\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            trmm::LLN( diag, A, X );\n        else\n            trmm::LLT( orientation, diag, A, X );\n    }\n    else if( side == LEFT )\n    {\n        if( orientation == NORMAL )\n            trmm::LUN( diag, A, X );\n        else\n            trmm::LUT( orientation, diag, A, X );\n    }\n    else if( uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            trmm::RLN( diag, A, X );\n        else\n            trmm::RLT( orientation, diag, A, X );\n    }\n    else\n    {\n        if( orientation == NORMAL )\n            trmm::RUN( diag, A, X );\n        else\n            trmm::RUT( orientation, diag, A, X );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRMM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trsm/LLN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSM_LLN_HPP\n#define ELEM_TRSM_LLN_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace trsm {\n\n// Left Lower NORMAL (Non)Unit Trsm \n//   X := tril(L)^-1  X, or\n//   X := trilu(L)^-1 X\n\n// For large numbers of RHS's, e.g., width(X) >> p\ntemplate<typename F>\ninline void\nLLNLarge\n( UnitOrNonUnit diag, const DistMatrix<F>& L, DistMatrix<F>& X, \n  bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trsm::LLNLarge\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n\n        // X1[* ,VR] := L11^-1[* ,* ] X1[* ,VR]\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, X1_STAR_VR,\n          checkIfSingular );\n\n        X1_STAR_MR.AlignWith( X2 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR] <- X1[* ,MR]\n        L21_MC_STAR.AlignWith( X2 );\n        L21_MC_STAR = L21;        // L21[MC,* ] <- L21[MC,MR]\n        \n        // X2[MC,MR] -= L21[MC,* ] X1[* ,MR]\n        LocalGemm( NORMAL, NORMAL, F(-1), L21_MC_STAR, X1_STAR_MR, F(1), X2 );\n    }\n}\n\n// For medium numbers of RHS's, e.g., width(X) ~= p\ntemplate<typename F>\ninline void\nLLNMedium\n( UnitOrNonUnit diag, const DistMatrix<F>& L, DistMatrix<F>& X, \n  bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trsm::LLNMedium\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X2 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR ); // X1[* ,MR] <- X1[MC,MR]\n\n        // X1^T[MR,* ] := X1^T[MR,* ] L11^-T[* ,* ]\n        //              = (L11^-1[* ,* ] X1[* ,MR])^T\n        LocalTrsm\n        ( RIGHT, LOWER, TRANSPOSE, diag, \n          F(1), L11_STAR_STAR, X1Trans_MR_STAR, checkIfSingular );\n\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR ); // X1[MC,MR] <- X1[* ,MR]\n        L21_MC_STAR.AlignWith( X2 );\n        L21_MC_STAR = L21;                   // L21[MC,* ] <- L21[MC,MR]\n        \n        // X2[MC,MR] -= L21[MC,* ] X1[* ,MR]\n        LocalGemm\n        ( NORMAL, TRANSPOSE, F(-1), L21_MC_STAR, X1Trans_MR_STAR, F(1), X2 );\n    }\n}\n\n// For small numbers of RHS's, e.g., width(X) < p\ntemplate<typename F,Dist colDist>\ninline void\nLLNSmall\n( UnitOrNonUnit diag, \n  const DistMatrix<F,colDist,STAR>& L, \n        DistMatrix<F,colDist,STAR>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::LLNSmall\");\n        if( L.ColAlign() != X.ColAlign() )\n            LogicError(\"L and X are assumed to be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), X1_STAR_STAR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[VC,* ]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VC,* ]\n\n        // X1[* ,* ] := (L11[* ,* ])^-1 X1[* ,* ]\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, diag, \n          F(1), L11_STAR_STAR, X1_STAR_STAR, checkIfSingular );\n\n        // X2[VC,* ] -= L21[VC,* ] X1[* ,* ]\n        LocalGemm( NORMAL, NORMAL, F(-1), L21, X1_STAR_STAR, F(1), X2 );\n    }\n}\n\n} // namespace trsm\n} // namespace elem\n\n#endif // ifndef ELEM_TRSM_LLN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trsm/LLT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSM_LLT_HPP\n#define ELEM_TRSM_LLT_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace trsm {\n\n// Left Lower (Conjugate)Transpose (Non)Unit Trsm\n//   X := tril(L)^-T,\n//   X := tril(L)^-H,\n//   X := trilu(L)^-T, or\n//   X := trilu(L)^-H\n\n// width(X) >> p\ntemplate<typename F>\ninline void\nLLTLarge\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<F>& L, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::LLTLarge\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n\n        // X1[* ,VR] := L11^-[T/H][* ,* ] X1[* ,VR]\n        LocalTrsm\n        ( LEFT, LOWER, orientation, diag, F(1), L11_STAR_STAR, X1_STAR_VR,\n          checkIfSingular );\n\n        X1_STAR_MR.AlignWith( X0 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR] <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR] <- X1[* ,MR]\n        L10_STAR_MC.AlignWith( X0 );\n        L10_STAR_MC = L10;        // L10[* ,MC] <- L10[MC,MR]\n\n        // X0[MC,MR] -= (L10[* ,MC])^(T/H) X1[* ,MR]\n        //            = L10^[T/H][MC,* ] X1[* ,MR]\n        LocalGemm\n        ( orientation, NORMAL, F(-1), L10_STAR_MC, X1_STAR_MR, F(1), X0 );\n    }\n}\n\n// width(X) ~= p\ntemplate<typename F>\ninline void\nLLTMedium\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<F>& L, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::LLTMedium\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[MC,MR]\n        // X1[* ,MR] <- X1[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X0 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR, (orientation==ADJOINT) );\n\n        // X1[* ,MR] := L11^-[T/H][* ,* ] X1[* ,MR]\n        // X1^[T/H][MR,* ] := X1^[T/H][MR,* ] L11^-1[* ,* ]\n        LocalTrsm\n        ( RIGHT, LOWER, NORMAL, diag, \n          F(1), L11_STAR_STAR, X1Trans_MR_STAR, checkIfSingular );\n\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR, (orientation==ADJOINT) );\n        L10_STAR_MC.AlignWith( X0 );\n        L10_STAR_MC = L10; // L10[* ,MC] <- L10[MC,MR]\n\n        // X0[MC,MR] -= (L10[* ,MC])^[T/H] X1[* ,MR]\n        //            = L10^[T/H][MC,* ] X1[* ,MR]\n        LocalGemm\n        ( orientation, orientation, \n          F(-1), L10_STAR_MC, X1Trans_MR_STAR, F(1), X0 );\n    }\n}\n\n// TODO: Find a better name and/or namespace for this utility function\ntemplate<typename F,Dist colDist>\ninline void AddInLocalData\n( const DistMatrix<F,colDist,STAR>& X1, DistMatrix<F,STAR,STAR>& Z )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trsm::AddInLocalData\"))\n    const Int width = X1.Width();\n    const Int localHeight = X1.LocalHeight();\n    const Int stride = X1.ColStride();\n    const Int offset = X1.ColShift();\n    for( Int j=0; j<width; ++j )\n    {\n        F* ZColBuffer = Z.Buffer(0,j);\n        const F* X1ColBuffer = X1.LockedBuffer(0,j);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            ZColBuffer[offset+stride*iLoc] += X1ColBuffer[iLoc];\n    }\n}\n\n// width(X) << p\ntemplate<typename F,Dist colDist>\ninline void\nLLTSmall\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<F,colDist,STAR>& L, DistMatrix<F,colDist,STAR>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::LLTSmall\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( L.Height() != L.Width() || L.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( L.ColAlign() != X.ColAlign() )\n            LogicError(\"L and X must be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), Z1_STAR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, m,    k+nb );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        // X1 -= L21' X2\n        LocalGemm( orientation, NORMAL, F(-1), L21, X2, Z1_STAR_STAR );\n        AddInLocalData( X1, Z1_STAR_STAR );\n        Z1_STAR_STAR.SumOver( X1.DistComm() );\n\n        // X1 := L11^-1 X1\n        L11_STAR_STAR = L11;\n        LocalTrsm\n        ( LEFT, LOWER, orientation, diag, F(1), L11_STAR_STAR, Z1_STAR_STAR,\n          checkIfSingular );\n        X1 = Z1_STAR_STAR;\n    }\n}\n\ntemplate<typename F,Dist rowDist>\ninline void\nLLTSmall\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<F,STAR,rowDist>& L, DistMatrix<F,rowDist,STAR>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::LLTSmall\");\n        if( L.Grid() != X.Grid() )\n            LogicError(\"L and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( L.Height() != L.Width() || L.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  L ~ \",L.Height(),\" x \",L.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( L.RowAlign() != X.ColAlign() )\n            LogicError(\"L and X must be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g), X1_STAR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        L11_STAR_STAR = L11; // L11[* ,* ] <- L11[* ,VR]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VR,* ]\n\n        // X1[* ,* ] := L11^-[T/H][* ,* ] X1[* ,* ]\n        LocalTrsm\n        ( LEFT, LOWER, orientation, diag,\n          F(1), L11_STAR_STAR, X1_STAR_STAR, checkIfSingular );\n\n        X1 = X1_STAR_STAR;\n\n        // X0[VR,* ] -= L10[* ,VR]^(T/H) X1[* ,* ]\n        LocalGemm( orientation, NORMAL, F(-1), L10, X1_STAR_STAR, F(1), X0 );\n    }\n}\n\n} // namespace trsm\n} // namespace elem\n\n#endif // ifndef ELEM_TRSM_LLT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trsm/LUN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSM_LUN_HPP\n#define ELEM_TRSM_LUN_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace trsm {\n\n// Left Upper Normal (Non)Unit Trsm\n//   X := triu(U)^-1  X, or\n//   X := triuu(U)^-1 X\n\ntemplate<typename F>\ninline void\nLUNLarge\n( UnitOrNonUnit diag,\n  const DistMatrix<F>& U, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trsm::LUNLarge\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n        \n        // X1[* ,VR] := U11^-1[* ,* ] X1[* ,VR]\n        LocalTrsm\n        ( LEFT, UPPER, NORMAL, diag, F(1), U11_STAR_STAR, X1_STAR_VR,\n          checkIfSingular );\n\n        X1_STAR_MR.AlignWith( X0 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR] <- X1[* ,MR]\n        U01_MC_STAR.AlignWith( X0 );\n        U01_MC_STAR = U01;        // U01[MC,* ] <- U01[MC,MR]\n\n        // X0[MC,MR] -= U01[MC,* ] X1[* ,MR]\n        LocalGemm( NORMAL, NORMAL, F(-1), U01_MC_STAR, X1_STAR_MR, F(1), X0 );\n    }\n}\n\ntemplate<typename F>\ninline void\nLUNMedium\n( UnitOrNonUnit diag, const DistMatrix<F>& U, DistMatrix<F>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trsm::LUNMedium\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X0 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR ); // X1[* ,MR] <- X1[MC,MR]\n        \n        // X1^T[MR,* ] := X1^T[MR,* ] U11^-T[* ,* ]\n        //              = (U11^-1[* ,* ] X1[* ,MR])^T\n        LocalTrsm\n        ( RIGHT, UPPER, TRANSPOSE, diag, \n          F(1), U11_STAR_STAR, X1Trans_MR_STAR, checkIfSingular );\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR );\n\n        U01_MC_STAR.AlignWith( X0 );\n        U01_MC_STAR = U01;  // U01[MC,* ] <- U01[MC,MR]\n\n        // X0[MC,MR] -= U01[MC,* ] X1[* ,MR]\n        LocalGemm\n        ( NORMAL, TRANSPOSE, F(-1), U01_MC_STAR, X1Trans_MR_STAR, F(1), X0 );\n    }\n}\n\ntemplate<typename F,Dist colDist>\ninline void\nLUNSmall\n( UnitOrNonUnit diag,\n  const DistMatrix<F,colDist,STAR>& U, DistMatrix<F,colDist,STAR>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::LUNSmall\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( U.Height() != U.Width() || U.Width() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( U.ColAlign() != X.ColAlign() )\n            LogicError(\"U and X are assumed to be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g), X1_STAR_STAR(g);\n\n    const Int kLast = LastOffset( m, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, k,    n );\n        auto X1 = ViewRange( X, k, 0, k+nb, n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[VC,* ]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VC,* ]\n        \n        // X1[* ,* ] := U11^-1[* ,* ] X1[* ,* ]\n        LocalTrsm\n        ( LEFT, UPPER, NORMAL, diag,\n          F(1), U11_STAR_STAR, X1_STAR_STAR, checkIfSingular );\n        X1 = X1_STAR_STAR;\n\n        // X0[VC,* ] -= U01[VC,* ] X1[* ,* ]\n        LocalGemm( NORMAL, NORMAL, F(-1), U01, X1_STAR_STAR, F(1), X0 );\n    }\n}\n\n} // namespace trsm\n} // namespace elem\n\n#endif // ifndef ELEM_TRSM_LUN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trsm/LUT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSM_LUT_HPP\n#define ELEM_TRSM_LUT_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace trsm {\n\n// Left Upper (Conjugate)Transpose (Non)Unit Trsm\n//   X := triu(U)^-T  X, \n//   X := triu(U)^-H  X,\n//   X := triuu(U)^-T X, or\n//   X := triuu(U)^-H X\n\n// width(X) >> p\ntemplate<typename F>\ninline void\nLUTLarge\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<F>& U, DistMatrix<F>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::LUTLarge\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > X1_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X1_STAR_VR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        X1_STAR_VR    = X1;  // X1[* ,VR] <- X1[MC,MR]\n        \n        // X1[* ,VR] := U11^-[T/H][*,*] X1[* ,VR]\n        LocalTrsm\n        ( LEFT, UPPER, orientation, diag, F(1), U11_STAR_STAR, X1_STAR_VR,\n          checkIfSingular );\n\n        X1_STAR_MR.AlignWith( X2 );\n        X1_STAR_MR  = X1_STAR_VR; // X1[* ,MR]  <- X1[* ,VR]\n        X1          = X1_STAR_MR; // X1[MC,MR]  <- X1[* ,MR]\n        U12_STAR_MC.AlignWith( X2 );\n        U12_STAR_MC = U12;        // U12[* ,MC] <- U12[MC,MR]\n\n        // X2[MC,MR] -= (U12[* ,MC])^(T/H) X1[* ,MR]\n        //            = U12^(T/H)[MC,*] X1[* ,MR]\n        LocalGemm\n        ( orientation, NORMAL, F(-1), U12_STAR_MC, X1_STAR_MR, F(1), X2 );\n    }\n}\n\n// width(X) ~= p\ntemplate<typename F>\ninline void\nLUTMedium\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<F>& U, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::LUTMedium\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,MR,  STAR> X1Trans_MR_STAR(g);\n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[MC,MR]\n        // X1[* ,VR] <- X1[MC,MR]\n        X1Trans_MR_STAR.AlignWith( X2 );\n        X1.TransposeColAllGather( X1Trans_MR_STAR, (orientation==ADJOINT) );\n        \n        // X1[* ,MR] := U11^-[T/H][*,*] X1[* ,MR]\n        // X1^[T/H][MR,* ] := X1^[T/H][MR,* ] U11^-1[* ,* ]\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, diag, \n          F(1), U11_STAR_STAR, X1Trans_MR_STAR, checkIfSingular );\n\n        X1.TransposeColFilterFrom( X1Trans_MR_STAR, (orientation==ADJOINT) );\n        U12_STAR_MC.AlignWith( X2 );\n        U12_STAR_MC = U12; // U12[* ,MC] <- U12[MC,MR]\n\n        // X2[MC,MR] -= (U12[* ,MC])^[T/H] X1[* ,MR]\n        //            = U12^[T/H][MC,*] X1[* ,MR]\n        LocalGemm\n        ( orientation, orientation, \n          F(-1), U12_STAR_MC, X1Trans_MR_STAR, F(1), X2 );\n    }\n}\n\n// width(X) << p\ntemplate<typename F,Dist rowDist>\ninline void\nLUTSmall\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<F,STAR,rowDist>& U, DistMatrix<F,rowDist,STAR>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::LUTSmall\");\n        if( U.Grid() != X.Grid() )\n            LogicError(\"U and X must be distributed over the same grid\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n        if( U.Height() != U.Width() || U.Height() != X.Height() )\n            LogicError\n            (\"Nonconformal: \\n\",\n             \"  U ~ \",U.Height(),\" x \",U.Width(),\"\\n\",\n             \"  X ~ \",X.Height(),\" x \",X.Width(),\"\\n\");\n        if( U.RowAlign() != X.ColAlign() )\n            LogicError(\"U and X are assumed to be aligned\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g), X1_STAR_STAR(g); \n\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, m    );\n\n        auto X1 = ViewRange( X, k,    0, k+nb, n );\n        auto X2 = ViewRange( X, k+nb, 0, m,    n );\n\n        U11_STAR_STAR = U11; // U11[* ,* ] <- U11[* ,VR]\n        X1_STAR_STAR = X1;   // X1[* ,* ] <- X1[VR,* ]\n        \n        // X1[* ,* ] := U11^-[T/H][* ,* ] X1[* ,* ]\n        LocalTrsm\n        ( LEFT, UPPER, orientation, diag,\n          F(1), U11_STAR_STAR, X1_STAR_STAR, checkIfSingular );\n\n        X1 = X1_STAR_STAR;\n\n        // X2[VR,* ] -= U12[* ,VR]^[T/H] X1[* ,* ]\n        LocalGemm( orientation, NORMAL, F(-1), U12, X1_STAR_STAR, F(1), X2 );\n    }\n}\n\n} // namespace trsm\n} // namespace elem\n\n#endif // ifndef ELEM_TRSM_LUT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trsm/RLN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   Copyright (c) 2013, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSM_RLN_HPP\n#define ELEM_TRSM_RLN_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace trsm {\n\n// Right Lower Normal (Non)Unit Trsm\n//   X := X tril(L)^-1, and\n//   X := X trilu(L)^-1\ntemplate<typename F>\ninline void\nRLN\n( UnitOrNonUnit diag, const DistMatrix<F>& L, DistMatrix<F>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trsm::RLN\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,MR,  STAR> L10Trans_MR_STAR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > X1Trans_STAR_MC(g);\n    DistMatrix<F,VC,  STAR> X1_VC_STAR(g);\n\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto L10 = LockedViewRange( L, k, 0, k+nb, k    );\n        auto L11 = LockedViewRange( L, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, m, k    );\n        auto X1 = ViewRange( X, 0, k, m, k+nb );\n\n        L11_STAR_STAR = L11;\n        X1_VC_STAR = X1;\n        LocalTrsm\n        ( RIGHT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, X1_VC_STAR,\n          checkIfSingular );\n\n        // X0[MC,MR] -= X1[MC,* ]   L10[*,MR]\n        //            = X1^T[* ,MC] L10^T[MR,* ]\n        X1Trans_STAR_MC.AlignWith( X0 );\n        X1_VC_STAR.TransposePartialColAllGather( X1Trans_STAR_MC );\n        X1.TransposeRowFilterFrom( X1Trans_STAR_MC );\n        L10Trans_MR_STAR.AlignWith( X0 );\n        L10.TransposeColAllGather( L10Trans_MR_STAR );\n        LocalGemm\n        ( TRANSPOSE, TRANSPOSE, \n          F(-1), X1Trans_STAR_MC, L10Trans_MR_STAR, F(1), X0 );\n    }\n}\n\n} // namespace trsm\n} // namespace elem\n\n#endif // ifndef ELEM_TRSM_RLN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trsm/RLT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSM_RLT_HPP\n#define ELEM_TRSM_RLT_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace trsm {\n\n// Right Lower (Conjugate)Transpose (Non)Unit Trsm\n//   X := X tril(L)^-T,\n//   X := X tril(L)^-H,\n//   X := X trilu(L)^-T, or\n//   X := X trilu(L)^-H\ntemplate<typename F>\ninline void\nRLT\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<F>& L, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::RLT\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = L.Grid();\n\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,VR,  STAR> L21_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > L21Trans_STAR_MR(g);\n    DistMatrix<F,VC,  STAR> X1_VC_STAR(g);\n    DistMatrix<F,STAR,MC  > X1Trans_STAR_MC(g);\n\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto L11 = LockedViewRange( L, k,    k, k+nb, k+nb );\n        auto L21 = LockedViewRange( L, k+nb, k, n,    k+nb ); \n\n        auto X1 = ViewRange( X, 0, k,    m, k+nb );\n        auto X2 = ViewRange( X, 0, k+nb, m, n    );\n\n        L11_STAR_STAR = L11; \n        X1_VC_STAR.AlignWith( X2 );\n        X1_VC_STAR = X1;  \n        \n        LocalTrsm\n        ( RIGHT, LOWER, orientation, diag, \n          F(1), L11_STAR_STAR, X1_VC_STAR, checkIfSingular );\n\n        X1Trans_STAR_MC.AlignWith( X2 );\n        X1_VC_STAR.TransposePartialColAllGather( X1Trans_STAR_MC );\n        X1.TransposeRowFilterFrom( X1Trans_STAR_MC );\n        L21_VR_STAR.AlignWith( X2 );\n        L21_VR_STAR = L21;\n        L21Trans_STAR_MR.AlignWith( X2 );\n        L21_VR_STAR.TransposePartialColAllGather\n        ( L21Trans_STAR_MR, (orientation==ADJOINT) ); \n\n        // X2[MC,MR] -= X1[MC,*] (L21[MR,*])^(T/H)\n        //            = X1^T[* ,MC] (L21^(T/H))[*,MR]\n        LocalGemm\n        ( TRANSPOSE, NORMAL, \n          F(-1), X1Trans_STAR_MC, L21Trans_STAR_MR, F(1), X2 );\n    }\n}\n\n} // namespace trsm\n} // namespace elem\n\n#endif // ifndef ELEM_TRSM_RLT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trsm/RUN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSM_RUN_HPP\n#define ELEM_TRSM_RUN_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace trsm {\n\n// Right Upper Normal (Non)Unit Trsm\n//   X := X triu(U)^-1, and\n//   X := X triuu(U)^-1\ntemplate<typename F>\ninline void\nRUN\n( UnitOrNonUnit diag, const DistMatrix<F>& U, DistMatrix<F>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"trsm::RUN\"))\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g); \n    DistMatrix<F,STAR,MR  > U12_STAR_MR(g);\n    DistMatrix<F,VC,  STAR> X1_VC_STAR(g);    \n    DistMatrix<F,STAR,MC  > X1Trans_STAR_MC(g);\n    \n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto U11 = LockedViewRange( U, k, k,    k+nb, k+nb );\n        auto U12 = LockedViewRange( U, k, k+nb, k+nb, n    );\n\n        auto X1 = ViewRange( X, 0, k,    m, k+nb );\n        auto X2 = ViewRange( X, 0, k+nb, m, n    );\n\n        U11_STAR_STAR = U11; \n        X1_VC_STAR.AlignWith( X2 );\n        X1_VC_STAR = X1;\n\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, diag, F(1), U11_STAR_STAR, X1_VC_STAR,\n          checkIfSingular );\n\n        X1Trans_STAR_MC.AlignWith( X2 );\n        X1_VC_STAR.TransposePartialColAllGather( X1Trans_STAR_MC );\n        X1.TransposeRowFilterFrom( X1Trans_STAR_MC );\n        U12_STAR_MR.AlignWith( X2 );\n        U12_STAR_MR = U12; \n\n        // X2[MC,MR] -= X1[MC,* ] U12[* ,MR]\n        //            = X1^T[* ,MC] U12[* ,MR]\n        LocalGemm\n        ( TRANSPOSE, NORMAL, F(-1), X1Trans_STAR_MC, U12_STAR_MR, F(1), X2 );\n    }\n}\n\n} // namespace trsm\n} // namespace elem\n\n#endif // ifndef ELEM_TRSM_RUN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trsm/RUT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSM_RUT_HPP\n#define ELEM_TRSM_RUT_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace trsm {\n\n// Right Upper (Conjugate)Transpose (Non)Unit Trsm\n//   X := X triu(U)^-T, \n//   X := X triu(U)^-H,\n//   X := X triuu(U)^-T, or\n//   X := X triuu(U)^-H\ntemplate<typename F>\ninline void\nRUT\n( Orientation orientation, UnitOrNonUnit diag,\n  const DistMatrix<F>& U, DistMatrix<F>& X, bool checkIfSingular )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"trsm::RUT\");\n        if( orientation == NORMAL )\n            LogicError(\"Expected (Conjugate)Transpose option\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = U.Grid();\n\n    DistMatrix<F,VR,  STAR> U01_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > U01Trans_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> X1_VC_STAR(g);\n    DistMatrix<F,STAR,MC  > X1Trans_STAR_MC(g);\n    \n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n\n        auto U01 = LockedViewRange( U, 0, k, k,    k+nb );\n        auto U11 = LockedViewRange( U, k, k, k+nb, k+nb );\n\n        auto X0 = ViewRange( X, 0, 0, m, k    );\n        auto X1 = ViewRange( X, 0, k, m, k+nb );\n\n        U11_STAR_STAR = U11;\n        X1_VC_STAR.AlignWith( X0 );\n        X1_VC_STAR = X1; \n\n        LocalTrsm\n        ( RIGHT, UPPER, orientation, diag, \n          F(1), U11_STAR_STAR, X1_VC_STAR, checkIfSingular );\n\n        X1Trans_STAR_MC.AlignWith( X0 );\n        X1_VC_STAR.TransposePartialColAllGather( X1Trans_STAR_MC );\n        X1.TransposeRowFilterFrom( X1Trans_STAR_MC );\n        U01_VR_STAR.AlignWith( X0 );\n        U01_VR_STAR = U01;\n        U01Trans_STAR_MR.AlignWith( X0 );\n        U01_VR_STAR.TransposePartialColAllGather\n        ( U01Trans_STAR_MR, (orientation==ADJOINT) );\n\n        // X0[MC,MR] -= X1[MC,* ] (U01[MR,* ])^(T/H)\n        //            = X1^T[* ,MC] (U01^(T/H))[* ,MR]\n        LocalGemm\n        ( TRANSPOSE, NORMAL, \n          F(-1), X1Trans_STAR_MC, U01Trans_STAR_MR, F(1), X0 );\n    }\n}\n\n} // namespace trsm\n} // namespace elem\n\n#endif // ifndef ELEM_TRSM_RUT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trsm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSM_HPP\n#define ELEM_TRSM_HPP\n\n#include ELEM_TRSV_INC\n\nnamespace elem {\n\ntemplate<typename F,Dist XColDist,Dist XRowDist>\ninline void\nLocalTrsm\n( LeftOrRight side, UpperOrLower uplo,\n  Orientation orientation, UnitOrNonUnit diag,\n  F alpha, const DistMatrix<F,STAR,STAR>& A,\n                 DistMatrix<F,XColDist,XRowDist>& X,\n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrsm\");\n        if( (side == LEFT && XColDist != STAR) ||\n            (side == RIGHT && XRowDist != STAR) )\n            LogicError\n            (\"Dist of RHS must conform with that of triangle\");\n    )\n    // NOTE: Is this prototype available yet?!?\n    Trsm\n    ( side, uplo, orientation, diag,\n      alpha, A.LockedMatrix(), X.Matrix(), checkIfSingular );\n}\n\n} // namespace elem\n\n#include \"./Trsm/LLN.hpp\"\n#include \"./Trsm/LLT.hpp\"\n#include \"./Trsm/LUN.hpp\"\n#include \"./Trsm/LUT.hpp\"\n#include \"./Trsm/RLN.hpp\"\n#include \"./Trsm/RLT.hpp\"\n#include \"./Trsm/RUN.hpp\"\n#include \"./Trsm/RUT.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nTrsm\n( LeftOrRight side, UpperOrLower uplo,\n  Orientation orientation, UnitOrNonUnit diag,\n  F alpha, const Matrix<F>& A, Matrix<F>& B,\n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trsm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Triangular matrix must be square\");\n        if( side == LEFT )\n        {\n            if( A.Height() != B.Height() )\n                LogicError(\"Nonconformal Trsm\");\n        }\n        else\n        {\n            if( A.Height() != B.Width() )\n                LogicError(\"Nonconformal Trsm\");\n        }\n    )\n    const char sideChar = LeftOrRightToChar( side );\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const char transChar = OrientationToChar( orientation );\n    const char diagChar = UnitOrNonUnitToChar( diag );\n    if( checkIfSingular && diag != UNIT )\n    {\n        const Int n = A.Height();\n        for( Int j=0; j<n; ++j )\n            if( A.Get(j,j) == F(0) )\n                throw SingularMatrixException();\n    }\n    blas::Trsm\n    ( sideChar, uploChar, transChar, diagChar, B.Height(), B.Width(),\n      alpha, A.LockedBuffer(), A.LDim(), B.Buffer(), B.LDim() );\n}\n\n// TODO: Greatly improve (and allow the user to modify) the mechanism for \n//       choosing between the different TRSM algorithms.\ntemplate<typename F>\ninline void\nTrsm\n( LeftOrRight side, UpperOrLower uplo, \n  Orientation orientation, UnitOrNonUnit diag,\n  F alpha, const DistMatrix<F>& A, DistMatrix<F>& B,\n  bool checkIfSingular=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trsm\");\n        if( A.Grid() != B.Grid() )\n            LogicError(\"A and B must use the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( side == LEFT )\n        {\n            if( A.Height() != B.Height() )\n                LogicError(\"Nonconformal Trsm\");\n        }\n        else\n        {\n            if( A.Height() != B.Width() )\n                LogicError(\"Nonconformal Trsm\");\n        }\n    )\n    Scale( alpha, B );\n\n    // Call the single right-hand side algorithm if appropriate\n    if( side == LEFT && B.Width() == 1 )\n    {\n        Trsv( uplo, orientation, diag, A, B );\n        return;\n    }\n    // TODO: Compute appropriate transpose/conjugation options to convert\n    //       to Trsv.\n    /*\n    else if( side == RIGHT && B.Height() == 1 )\n    {\n        Trsv( uplo, orientation, diag, alpha, A, B );\n        return;\n    }\n    */\n\n    const Int p = B.Grid().Size();\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n        {\n            if( B.Width() > 5*p )\n                trsm::LLNLarge( diag, A, B, checkIfSingular );\n            else\n                trsm::LLNMedium( diag, A, B, checkIfSingular );\n        }\n        else\n        {\n            if( B.Width() > 5*p )\n                trsm::LLTLarge\n                ( orientation, diag, A, B, checkIfSingular );\n            else\n                trsm::LLTMedium\n                ( orientation, diag, A, B, checkIfSingular );\n        }\n    }\n    else if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n        {\n            if( B.Width() > 5*p )\n                trsm::LUNLarge( diag, A, B, checkIfSingular );\n            else\n                trsm::LUNMedium( diag, A, B, checkIfSingular );\n        }\n        else\n        {\n            if( B.Width() > 5*p )\n                trsm::LUTLarge\n                ( orientation, diag, A, B, checkIfSingular );\n            else\n                trsm::LUTMedium\n                ( orientation, diag, A, B, checkIfSingular );\n        }\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            trsm::RLN( diag, A, B, checkIfSingular );\n        else\n            trsm::RLT( orientation, diag, A, B, checkIfSingular );\n    }\n    else if( side == RIGHT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            trsm::RUN( diag, A, B, checkIfSingular );\n        else\n            trsm::RUT( orientation, diag, A, B, checkIfSingular );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRSM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trstrm/LLN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSTRM_LLN_HPP\n#define ELEM_TRSTRM_LLN_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALETRAPEZOID_INC\n#include ELEM_GEMM_INC\n#include ELEM_TRSM_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nTrstrmLLNUnb( UnitOrNonUnit diag, F alpha, const Matrix<F>& L, Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::TrstrmLLNUnb\"))\n    const bool isUnit = ( diag==UNIT );\n    const Int n = L.Height();\n    const Int LLDim = L.LDim();\n    const Int XLDim = X.LDim();\n    const F* LBuffer = L.LockedBuffer();\n    F* XBuffer = X.Buffer();\n\n    // X := alpha X\n    if( alpha != F(1) )\n        for( Int j=0; j<n; ++j ) \n            for( Int i=j; i<n; ++i )\n                XBuffer[i+j*XLDim] *= alpha;\n\n    for( Int i=0; i<n; ++i )\n    {\n        if( !isUnit )\n        {\n            const F lambda11 = LBuffer[i+i*LLDim];\n            for( Int j=0; j<i; ++j )\n                XBuffer[i+j*XLDim] /= lambda11;\n            XBuffer[i+i*XLDim] /= lambda11;\n        }\n\n        const Int l21Height = n - (i+1);\n        const F* l21 = &LBuffer[(i+1)+i*LLDim];\n        const F* x1L = &XBuffer[i];\n        F* X2L = &XBuffer[i+1];\n        blas::Geru( l21Height, i+1, F(-1), l21, 1, x1L, XLDim, X2L, XLDim );\n    }\n}\n\ntemplate<typename F>\ninline void\nTrstrmLLN\n( UnitOrNonUnit diag, F alpha, const Matrix<F>& L, Matrix<F>& X,\n  bool checkIfSingular=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::TrstrmLLN\"))\n    // Matrix views\n    Matrix<F> \n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n    Matrix<F> \n        XTL, XTR,  X00, X01, X02,\n        XBL, XBR,  X10, X11, X12,\n                   X20, X21, X22;\n\n    Matrix<F> Z11;\n\n    // Start the algorithm\n    ScaleTrapezoid( alpha, LOWER, X );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    PartitionDownDiagonal\n    ( X, XTL, XTR,\n         XBL, XBR, 0 );\n    while( XBR.Height() > 0 )\n    {\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        RepartitionDownDiagonal\n        ( XTL, /**/ XTR,  X00, /**/ X01, X02,\n         /*************/ /******************/\n               /**/       X10, /**/ X11, X12,\n          XBL, /**/ XBR,  X20, /**/ X21, X22 );\n\n        //--------------------------------------------------------------------//\n        Trsm( LEFT, LOWER, NORMAL, diag, F(1), L11, X10, checkIfSingular );\n        TrstrmLLNUnb( diag, F(1), L11, X11 );\n        Gemm( NORMAL, NORMAL, F(-1), L21, X10, F(1), X20 );\n        Z11 = X11;\n        MakeTriangular( LOWER, Z11 );\n        Gemm( NORMAL, NORMAL, F(-1), L21, Z11, F(1), X21 );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12, \n         /*************/ /******************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n\n        SlidePartitionDownDiagonal\n        ( XTL, /**/ XTR,  X00, X01, /**/ X02,\n               /**/       X10, X11, /**/ X12, \n         /*************/ /******************/\n          XBL, /**/ XBR,  X20, X21, /**/ X22 );\n    }\n}\n\ntemplate<typename F>\ninline void\nTrstrmLLN\n( UnitOrNonUnit diag, F alpha, const DistMatrix<F>& L, DistMatrix<F>& X,\n  bool checkIfSingular )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::TrstrmLLN\"))\n    const Grid& g = L.Grid();\n\n    // Matrix views\n    DistMatrix<F> \n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n    DistMatrix<F> \n        XTL(g), XTR(g),  X00(g), X01(g), X02(g),\n        XBL(g), XBR(g),  X10(g), X11(g), X12(g),\n                         X20(g), X21(g), X22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,STAR,MR  > X10_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > X10_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > X11_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> X11_STAR_STAR(g);\n\n    // Start the algorithm\n    ScaleTrapezoid( alpha, LOWER, X );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    PartitionDownDiagonal\n    ( X, XTL, XTR,\n         XBL, XBR, 0 );\n    while( XBR.Height() > 0 )\n    {\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        RepartitionDownDiagonal\n        ( XTL, /**/ XTR,  X00, /**/ X01, X02,\n         /*************/ /******************/\n               /**/       X10, /**/ X11, X12,\n          XBL, /**/ XBR,  X20, /**/ X21, X22 );\n\n        L21_MC_STAR.AlignWith( X20 );\n        X10_STAR_MR.AlignWith( X20 );\n        X11_STAR_MR.AlignWith( X21 );\n        //--------------------------------------------------------------------//\n        L11_STAR_STAR = L11; \n        X11_STAR_STAR = X11; \n        X10_STAR_VR = X10;\n\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, X10_STAR_VR,\n          checkIfSingular );\n        LocalTrstrm\n        ( LEFT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, X11_STAR_STAR,\n          checkIfSingular );\n        X11 = X11_STAR_STAR;\n        X11_STAR_MR = X11_STAR_STAR;\n        MakeTriangular( LOWER, X11_STAR_MR );\n\n        X10_STAR_MR = X10_STAR_VR;\n        X10 = X10_STAR_MR;\n        L21_MC_STAR = L21;\n        \n        LocalGemm\n        ( NORMAL, NORMAL, F(-1), L21_MC_STAR, X10_STAR_MR, F(1), X20 );\n        LocalGemm\n        ( NORMAL, NORMAL, F(-1), L21_MC_STAR, X11_STAR_MR, F(1), X21 );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12, \n         /*************/ /******************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n\n        SlidePartitionDownDiagonal\n        ( XTL, /**/ XTR,  X00, X01, /**/ X02,\n               /**/       X10, X11, /**/ X12, \n         /*************/ /******************/\n          XBL, /**/ XBR,  X20, X21, /**/ X22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRSTRM_LLN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trstrm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRSTRM_HPP\n#define ELEM_TRSTRM_HPP\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nLocalTrstrm\n( LeftOrRight side, UpperOrLower uplo,\n  Orientation orientation, UnitOrNonUnit diag,\n  F alpha, const DistMatrix<F,STAR,STAR>& A,\n                 DistMatrix<F,STAR,STAR>& X,\n  bool checkIfSingular=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalTrstrm\"))\n    Trstrm\n    ( side, uplo, orientation, diag,\n      alpha, A.LockedMatrix(), X.Matrix(), checkIfSingular );\n}\n\n} // namespace elem\n\n#include \"./Trstrm/LLN.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nTrstrm\n( LeftOrRight side, UpperOrLower uplo,\n  Orientation orientation, UnitOrNonUnit diag,\n  F alpha, const Matrix<F>& A, Matrix<F>& X,\n  bool checkIfSingular=true )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trstrm\");\n        if( A.Height() != A.Width() || X.Height() != X.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != X.Height() )\n            LogicError(\"Nonconformal Trstrm\");\n    )\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            internal::TrstrmLLN( diag, alpha, A, X, checkIfSingular );\n        else\n            LogicError(\"This option not yet implemented\");\n        /*\n            internal::TrstrmLLT\n            ( orientation, diag, alpha, A, X, checkIfSingular );\n        */\n    }\n    else\n        LogicError(\"This option not yet implemented\");\n    /*\n    else if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            internal::TrstrmLUN( diag, alpha, A, X, checkIfSingular );\n        else\n            internal::TrstrmLUT\n            ( orientation, diag, alpha, A, X, checkIfSingular );\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            internal::TrstrmRLN( diag, alpha, A, X, checkIfSingular );\n        else\n            internal::TrstrmRLT\n            ( orientation, diag, alpha, A, X, checkIfSingular );\n    }\n    else if( side == RIGHT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            internal::TrstrmRUN( diag, alpha, A, X, checkIfSingular );\n        else\n            internal::TrstrmRUT\n            ( orientation, diag, alpha, A, X, checkIfSingular );\n    }\n    */\n}\n\ntemplate<typename F>\ninline void\nTrstrm\n( LeftOrRight side, UpperOrLower uplo, \n  Orientation orientation, UnitOrNonUnit diag,\n  F alpha, const DistMatrix<F>& A, DistMatrix<F>& X,\n  bool checkIfSingular=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trstrm\"))\n    if( side == LEFT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            internal::TrstrmLLN( diag, alpha, A, X, checkIfSingular );\n        else\n            LogicError(\"This option not yet implemented\");\n        /*\n            internal::TrstrmLLT\n            ( orientation, diag, alpha, A, X, checkIfSingular );\n        */\n    }\n    else\n        LogicError(\"This option not yet implemented\");\n    /*\n    else if( side == LEFT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            internal::TrstrmLUN( diag, alpha, A, X, checkIfSingular );\n        else\n            internal::TrstrmLUT\n            ( orientation, diag, alpha, A, X, checkIfSingular );\n    }\n    else if( side == RIGHT && uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            internal::TrstrmRLN( diag, alpha, A, X, checkIfSingular );\n        else\n            internal::TrstrmRLT\n            ( orientation, diag, alpha, A, X, checkIfSingular );\n    }\n    else if( side == RIGHT && uplo == UPPER )\n    {\n        if( orientation == NORMAL )\n            internal::TrstrmRUN( diag, alpha, A, X, checkIfSingular );\n        else\n            internal::TrstrmRUT\n            ( orientation, diag, alpha, A, X, checkIfSingular );\n    }\n    */\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRSTRM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trtrmm/LVar1.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRTRMM_LVAR1_HPP\n#define ELEM_TRTRMM_LVAR1_HPP\n\n#include ELEM_TRMM_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nTrtrmmLVar1( Matrix<T>& L, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::TrtrmmLVar1\"))\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n    Matrix<T>\n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n\n    PartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( LTL.Height() < L.Height() && LTL.Width() < L.Height() )\n    {\n        RepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------/\n        Trrk( LOWER, orientation, NORMAL, T(1), L10, L10, T(1), L00 );\n        Trmm( LEFT, LOWER, orientation, NON_UNIT, T(1), L11, L10 );\n        TrtrmmLUnblocked( L11, conjugate );\n        //--------------------------------------------------------------------/\n\n        SlidePartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /*************/ /******************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\ntemplate<typename T>\ninline void\nTrtrmmLVar1( DistMatrix<T>& L, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrtrmmLVar1\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n    )\n    const Grid& g = L.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T>\n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n\n    // Temporary distributions\n    DistMatrix<T,STAR,VR  > L10_STAR_VR(g);\n    DistMatrix<T,STAR,VC  > L10_STAR_VC(g);\n    DistMatrix<T,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<T,STAR,MR  > L10_STAR_MR(g);\n    DistMatrix<T,STAR,STAR> L11_STAR_STAR(g);\n\n    L10_STAR_VR.AlignWith( L );\n    L10_STAR_VC.AlignWith( L );\n    L10_STAR_MC.AlignWith( L );\n    L10_STAR_MR.AlignWith( L );\n\n    PartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( LTL.Height() < L.Height() && LTL.Width() < L.Height() )\n    {\n        RepartitionDownDiagonal \n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------//\n        L10_STAR_VR = L10;\n        L10_STAR_VC = L10_STAR_VR;\n        L10_STAR_MC = L10_STAR_VC;\n        L10_STAR_MR = L10_STAR_VR;\n        LocalTrrk\n        ( LOWER, orientation, T(1), L10_STAR_MC, L10_STAR_MR, T(1), L00 );\n\n        L11_STAR_STAR = L11;\n        LocalTrmm\n        ( LEFT, LOWER, orientation, NON_UNIT, \n          T(1), L11_STAR_STAR, L10_STAR_VR );\n        L10 = L10_STAR_VR;\n\n        LocalTrtrmm( LOWER, L11_STAR_STAR, conjugate );\n        L11 = L11_STAR_STAR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /*************/ /******************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRTRMM_LVAR1_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trtrmm/UVar1.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRTRMM_UVAR1_HPP\n#define ELEM_TRTRMM_UVAR1_HPP\n\n#include ELEM_TRMM_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nTrtrmmUVar1( Matrix<T>& U, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::TrtrmmUVar1\"))\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE ); \n    Matrix<T>\n        UTL, UTR,  U00, U01, U02,\n        UBL, UBR,  U10, U11, U12,\n                   U20, U21, U22;\n\n    PartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( UTL.Height() < U.Height() && UTL.Width() < U.Height() )\n    {\n        RepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------/\n        Trrk( UPPER, NORMAL, orientation, T(1), U01, U01, T(1), U00 );\n        Trmm( RIGHT, UPPER, orientation, NON_UNIT, T(1), U11, U01 );\n        TrtrmmUUnblocked( U11, conjugate );\n        //--------------------------------------------------------------------/\n\n        SlidePartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\ntemplate<typename T>\ninline void\nTrtrmmUVar1( DistMatrix<T>& U, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrtrmmUVar1\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n    )\n    const Grid& g = U.Grid();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    // Matrix views\n    DistMatrix<T>\n        UTL(g), UTR(g),  U00(g), U01(g), U02(g),\n        UBL(g), UBR(g),  U10(g), U11(g), U12(g),\n                         U20(g), U21(g), U22(g);\n\n    // Temporary distributions\n    DistMatrix<T,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<T,VC,  STAR> U01_VC_STAR(g);\n    DistMatrix<T,VR,  STAR> U01_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > U01Trans_STAR_MR(g);\n    DistMatrix<T,STAR,STAR> U11_STAR_STAR(g);\n\n    U01_MC_STAR.AlignWith( U );\n    U01_VC_STAR.AlignWith( U );\n    U01_VR_STAR.AlignWith( U );\n    U01Trans_STAR_MR.AlignWith( U );\n\n    PartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( UTL.Height() < U.Height() && UTL.Width() < U.Height() )\n    {\n        RepartitionDownDiagonal \n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------//\n        U01_MC_STAR = U01;\n        U01_VC_STAR = U01_MC_STAR;\n        U01_VR_STAR = U01_VC_STAR;\n        U01_VR_STAR.TransposePartialColAllGather( U01Trans_STAR_MR, conjugate );\n        LocalTrrk( UPPER, T(1), U01_MC_STAR, U01Trans_STAR_MR, T(1), U00 );\n\n        U11_STAR_STAR = U11;\n        LocalTrmm\n        ( RIGHT, UPPER, orientation, NON_UNIT, \n          T(1), U11_STAR_STAR, U01_VC_STAR );\n        U01 = U01_VC_STAR;\n\n        LocalTrtrmm( UPPER, U11_STAR_STAR, conjugate );\n        U11 = U11_STAR_STAR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRTRMM_UVAR1_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trtrmm/Unblocked.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRTRMM_UNBLOCKED_HPP\n#define ELEM_TRTRMM_UNBLOCKED_HPP\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void\nTrtrmmLUnblocked( Matrix<T>& L, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrtrmmLUnblocked\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n    )\n    const Int n = L.Height();\n\n    T* LBuffer = L.Buffer();\n    const Int ldim = L.LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        T* ELEM_RESTRICT l10 = &LBuffer[j];\n        if( conjugate )\n        {\n            // L00 := L00 + l10^H l10\n            for( Int k=0; k<j; ++k )\n            {\n                const T gamma = l10[k*ldim];\n                T* ELEM_RESTRICT L00Col = &LBuffer[k*ldim];\n                for( Int i=k; i<j; ++i )\n                    L00Col[i] += Conj(l10[i*ldim])*gamma;\n            }\n        }\n        else\n        {\n            // L00 := L00 + l10^T l10\n            for( Int k=0; k<j; ++k )\n            {\n                const T gamma = l10[k*ldim];\n                T* ELEM_RESTRICT L00Col = &LBuffer[k*ldim];\n                for( Int i=k; i<j; ++i )\n                    L00Col[i] += l10[i*ldim]*gamma;\n            }\n        }\n\n        // l10 := l10 lambda11\n        const T lambda11 = LBuffer[j+j*ldim];\n        for( Int k=0; k<j; ++k )\n            l10[k*ldim] *= lambda11;\n\n        // lambda11 := lambda11^2 or |lambda11|^2\n        if( conjugate )\n            LBuffer[j+j*ldim] = lambda11*Conj(lambda11);\n        else\n            LBuffer[j+j*ldim] = lambda11*lambda11;\n    }\n}\n\ntemplate<typename T>\ninline void\nTrtrmmUUnblocked( Matrix<T>& U, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrtrmmUUnblocked\");\n        if( U.Height() != U.Width() )\n            LogicError(\"U must be square\");\n    )\n    const Int n = U.Height();\n\n    T* UBuffer = U.Buffer();\n    const Int ldim = U.LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        T* ELEM_RESTRICT u01 = &UBuffer[j*ldim];\n        if( conjugate )\n        {\n            // U00 := U00 + u01 u01^H\n            for( Int k=0; k<j; ++k )\n            {\n                const T gamma = Conj(u01[k]);\n                T* ELEM_RESTRICT U00Col = &UBuffer[k*ldim];\n                for( Int i=0; i<=k; ++i )\n                    U00Col[i] += u01[i]*gamma;\n            }\n        }\n        else\n        {\n            // U00 := U00 + u01 u01^T\n            for( Int k=0; k<j; ++k )\n            {\n                const T gamma = u01[k];\n                T* ELEM_RESTRICT U00Col = &UBuffer[k*ldim];\n                for( Int i=0; i<=k; ++i )\n                    U00Col[i] += u01[i]*gamma;\n            }\n        }\n\n        // u01 := u01 upsilon11\n        const T upsilon11 = UBuffer[j+j*ldim];\n        for( Int k=0; k<j; ++k )\n            u01[k] *= upsilon11;\n\n        // upsilon11 := upsilon11^2 or |upsilon11|^2\n        if( conjugate )\n            UBuffer[j+j*ldim] = upsilon11*Conj(upsilon11);\n        else\n            UBuffer[j+j*ldim] = upsilon11*upsilon11;\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRTRMM_UNBLOCKED_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/Trtrmm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRTRMM_HPP\n#define ELEM_TRTRMM_HPP\n\n#include \"./Trtrmm/Unblocked.hpp\"\n#include \"./Trtrmm/LVar1.hpp\"\n#include \"./Trtrmm/UVar1.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nLocalTrtrmm\n( UpperOrLower uplo, DistMatrix<T,STAR,STAR>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalTrtrmm\"))\n    Trtrmm( uplo, A.Matrix(), conjugate );\n}\n\ntemplate<typename T>\ninline void\nTrtrmm( UpperOrLower uplo, Matrix<T>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trtrmm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( uplo == LOWER )\n        internal::TrtrmmLVar1( A, conjugate );\n    else\n        internal::TrtrmmUVar1( A, conjugate );\n}\n\ntemplate<typename T>\ninline void\nTrtrmm( UpperOrLower uplo, DistMatrix<T>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Trtrmm\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( uplo == LOWER )\n        internal::TrtrmmLVar1( A, conjugate );\n    else\n        internal::TrtrmmUVar1( A, conjugate );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRTRMM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrmm/LVar1.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRMM_LVAR1_HPP\n#define ELEM_TWOSIDEDTRMM_LVAR1_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRMM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\n// The only reason a field is required is for the existence of 1/2, which is \n// an artifact of the algorithm...\ntemplate<typename F> \ninline void\nTwoSidedTrmmLVar1( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmLVar1\");\n        if( A.Height() != A.Width() )\n            LogicError( \"A must be square.\" );\n        if( L.Height() != L.Width() )\n            LogicError( \"Triangular matrices must be square.\" );\n        if( A.Height() != L.Height() )\n            LogicError( \"A and L must be the same size.\" );\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n\n    // Temporary products\n    Matrix<F> Y21;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------//\n        // Y21 := A22 L21\n        Zeros( Y21, A21.Height(), A21.Width() );\n        Hemm( LEFT, LOWER, F(1), A22, L21, F(0), Y21 );\n\n        // A21 := A21 L11\n        Trmm( LEFT, LOWER, NORMAL, diag, F(1), L11, A21 );\n\n        // A21 := A21 + 1/2 Y21\n        Axpy( F(1)/F(2), Y21, A21 );\n\n        // A11 := L11' A11 L11\n        TwoSidedTrmmLUnb( diag, A11, L11 );\n\n        // A11 := A11 + (A21' L21 + L21' A21)\n        Her2k( LOWER, ADJOINT, F(1), A21, L21, F(1), A11 );\n\n        // A21 := A21 + 1/2 Y21\n        Axpy( F(1)/F(2), Y21, A21 );\n\n        // A21 := L22' A21\n        Trmm( LEFT, LOWER, ADJOINT, diag, F(1), L22, A21 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /*************/ /******************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrmmLVar1\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmLVar1\");\n        if( A.Height() != A.Width() )\n            LogicError( \"A must be square.\" );\n        if( L.Height() != L.Width() )\n            LogicError( \"Triangular matrices must be square.\" );\n        if( A.Height() != L.Height() )\n            LogicError( \"A and L must be the same size.\" );\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,STAR,MR  > L21Adj_STAR_MR(g);\n    DistMatrix<F,VC,  STAR> L21_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> L21_VR_STAR(g);\n    DistMatrix<F,STAR,STAR> X11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> Z21_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> Z21_MR_STAR(g);\n    DistMatrix<F,MR,  MC  > Z21_MR_MC(g);\n    DistMatrix<F> Y21(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        A21_VC_STAR.AlignWith( A21 );\n        L21_MC_STAR.AlignWith( A22 );\n        L21Adj_STAR_MR.AlignWith( A22 );\n        L21_VC_STAR.AlignWith( A22 );\n        L21_VR_STAR.AlignWith( A22 );\n        Y21.AlignWith( A21 ); \n        Z21_MC_STAR.AlignWith( A22 );\n        Z21_MR_STAR.AlignWith( A22 );\n        Z21_MR_MC.AlignWith( A21 );\n        //--------------------------------------------------------------------//\n        // Y21 := A22 L21\n        L21_MC_STAR = L21;\n        L21_VC_STAR = L21_MC_STAR;\n        L21_VR_STAR = L21_VC_STAR;\n        L21_VR_STAR.AdjointPartialColAllGather( L21Adj_STAR_MR );\n        Zeros( Z21_MC_STAR, A21.Height(), A21.Width() );\n        Zeros( Z21_MR_STAR, A21.Height(), A21.Width() );\n        LocalSymmetricAccumulateLL\n        ( ADJOINT, \n          F(1), A22, L21_MC_STAR, L21Adj_STAR_MR, Z21_MC_STAR, Z21_MR_STAR );\n        Z21_MR_MC.RowSumScatterFrom( Z21_MR_STAR );\n        Y21 = Z21_MR_MC;\n        Y21.RowSumScatterUpdate( F(1), Z21_MC_STAR ); \n\n        // A21 := A21 L11\n        A21_VC_STAR = A21;\n        L11_STAR_STAR = L11;\n        LocalTrmm\n        ( RIGHT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, A21_VC_STAR );\n        A21 = A21_VC_STAR;\n\n        // A21 := A21 + 1/2 Y21\n        Axpy( F(1)/F(2), Y21, A21 );\n\n        // A11 := L11' A11 L11\n        A11_STAR_STAR = A11;\n        LocalTwoSidedTrmm( LOWER, diag, A11_STAR_STAR, L11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A11 := A11 + (A21' L21 + L21' A21)\n        A21_VC_STAR = A21;\n        Zeros( X11_STAR_STAR, A11.Height(), A11.Width() );\n        Her2k\n        ( LOWER, ADJOINT,\n          F(1), A21_VC_STAR.Matrix(), L21_VC_STAR.Matrix(),\n          F(0), X11_STAR_STAR.Matrix() );\n        A11.SumScatterUpdate( F(1), X11_STAR_STAR );\n\n        // A21 := A21 + 1/2 Y21\n        Axpy( F(1)/F(2), Y21, A21 );\n\n        // A21 := L22' A21\n        Trmm( LEFT, LOWER, ADJOINT, diag, F(1), L22, A21 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /*************/ /******************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRMM_LVAR1_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrmm/LVar2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRMM_LVAR2_HPP\n#define ELEM_TWOSIDEDTRMM_LVAR2_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_GEMM_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRMM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\n// The only reason a field is required is for the existence of 1/2, which is \n// an artifact of the algorithm...\ntemplate<typename F> \ninline void\nTwoSidedTrmmLVar2( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmLVar2\");\n        if( A.Height() != A.Width() )\n            LogicError( \"A must be square.\" );\n        if( L.Height() != L.Width() )\n            LogicError( \"Triangular matrices must be square.\" );\n        if( A.Height() != L.Height() )\n            LogicError( \"A and L must be the same size.\" );\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n\n    // Temporary products\n    Matrix<F> Y21;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------//\n        // A10 := L11' A10\n        Trmm( LEFT, LOWER, ADJOINT, diag, F(1), L11, A10 );\n\n        // A10 := A10 + L21' A20\n        Gemm( ADJOINT, NORMAL, F(1), L21, A20, F(1), A10 );\n\n        // Y21 := A22 L21\n        Zeros( Y21, A21.Height(), A21.Width() );\n        Hemm( LEFT, LOWER, F(1), A22, L21, F(0), Y21 );\n\n        // A21 := A21 L11\n        Trmm( RIGHT, LOWER, NORMAL, diag, F(1), L11, A21 );\n\n        // A21 := A21 + 1/2 Y21\n        Axpy( F(1)/F(2), Y21, A21 );\n\n        // A11 := L11' A11 L11\n        TwoSidedTrmmLUnb( diag, A11, L11 );\n\n        // A11 := A11 + (A21' L21 + L21' A21)\n        Her2k( LOWER, ADJOINT, F(1), A21, L21, F(1), A11 );\n\n        // A21 := A21 + 1/2 Y21\n        Axpy( F(1)/F(2), Y21, A21 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /*************/ /******************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrmmLVar2\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmLVar2\");\n        if( A.Height() != A.Width() )\n            LogicError( \"A must be square.\" );\n        if( L.Height() != L.Width() )\n            LogicError( \"Triangular matrices must be square.\" );\n        if( A.Height() != L.Height() )\n            LogicError( \"A and L must be the same size.\" );\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,VR  > A10_STAR_VR(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,STAR,MR  > L21Adj_STAR_MR(g);\n    DistMatrix<F,VC,  STAR> L21_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> L21_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > X10_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> X11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> Z21_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> Z21_MR_STAR(g);\n    DistMatrix<F,MR,  MC  > Z21_MR_MC(g);\n    DistMatrix<F> Y21(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        A21_VC_STAR.AlignWith( A22 );\n        L21_MC_STAR.AlignWith( A20 );\n        L21_VC_STAR.AlignWith( A22 );\n        L21_VR_STAR.AlignWith( A22 );\n        L21Adj_STAR_MR.AlignWith( A22 );\n        X10_STAR_MR.AlignWith( A10 );\n        Y21.AlignWith( A21 );\n        Z21_MC_STAR.AlignWith( A22 );\n        Z21_MR_STAR.AlignWith( A22 );\n        //--------------------------------------------------------------------//\n        // A10 := L11' A10\n        L11_STAR_STAR = L11;\n        A10_STAR_VR = A10;\n        LocalTrmm\n        ( LEFT, LOWER, ADJOINT, diag, F(1), L11_STAR_STAR, A10_STAR_VR );\n        A10 = A10_STAR_VR;\n\n        // A10 := A10 + L21' A20\n        L21_MC_STAR = L21;\n        LocalGemm( ADJOINT, NORMAL, F(1), L21_MC_STAR, A20, X10_STAR_MR );\n        A10.ColSumScatterUpdate( F(1), X10_STAR_MR );\n\n        // Y21 := A22 L21\n        L21_VC_STAR = L21_MC_STAR;\n        L21_VR_STAR = L21_VC_STAR;\n        L21_VR_STAR.AdjointPartialColAllGather( L21Adj_STAR_MR );\n        Zeros( Z21_MC_STAR, A21.Height(), A21.Width() );\n        Zeros( Z21_MR_STAR, A21.Height(), A21.Width() );\n        LocalSymmetricAccumulateLL\n        ( ADJOINT, \n          F(1), A22, L21_MC_STAR, L21Adj_STAR_MR, Z21_MC_STAR, Z21_MR_STAR );\n        Z21_MR_MC.RowSumScatterFrom( Z21_MR_STAR );\n        Y21 = Z21_MR_MC;\n        Y21.RowSumScatterUpdate( F(1), Z21_MC_STAR ); \n\n        // A21 := A21 L11\n        A21_VC_STAR = A21;\n        LocalTrmm\n        ( RIGHT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, A21_VC_STAR );\n        A21 = A21_VC_STAR;\n\n        // A21 := A21 + 1/2 Y21\n        Axpy( F(1)/F(2), Y21, A21 );\n\n        // A11 := L11' A11 L11\n        A11_STAR_STAR = A11;\n        LocalTwoSidedTrmm( LOWER, diag, A11_STAR_STAR, L11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A11 := A11 + (A21' L21 + L21' A21)\n        A21_VC_STAR = A21;\n        Zeros( X11_STAR_STAR, A11.Height(), A11.Width() );\n        Her2k\n        ( LOWER, ADJOINT,\n          F(1), A21_VC_STAR.Matrix(), L21_VC_STAR.Matrix(),\n          F(0), X11_STAR_STAR.Matrix() );\n        A11.SumScatterUpdate( F(1), X11_STAR_STAR );\n\n        // A21 := A21 + 1/2 Y21\n        Axpy( F(1)/F(2), Y21, A21 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /*************/ /******************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRMM_LVAR2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrmm/LVar4.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   Copyright (c) 2013, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRMM_LVAR4_HPP\n#define ELEM_TWOSIDEDTRMM_LVAR4_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_GEMM_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRMM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\n// The only reason a field is required is for the existence of 1/2, which is \n// an artifact of the algorithm...\ntemplate<typename F>\ninline void\nTwoSidedTrmmLVar4( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmLVar4\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n\n    // Temporary products\n    Matrix<F> Y10;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------//\n        // Y10 := A11 L10\n        Zeros( Y10, A10.Height(), A10.Width() );\n        Hemm( LEFT, LOWER, F(1), A11, L10, F(0), Y10 );\n\n        // A10 := A10 + 1/2 Y10\n        Axpy( F(1)/F(2), Y10, A10 );\n\n        // A00 := A00 + (A10' L10 + L10' A10)\n        Her2k( LOWER, ADJOINT, F(1), A10, L10, F(1), A00 );\n\n        // A10 := A10 + 1/2 Y10\n        Axpy( F(1)/F(2), Y10, A10 );\n\n        // A10 := L11' A10\n        Trmm( LEFT, LOWER, ADJOINT, diag, F(1), L11, A10 );\n\n        // A20 := A20 + A21 L10\n        Gemm( NORMAL, NORMAL, F(1), A21, L10, F(1), A20 );\n\n        // A11 := L11' A11 L11\n        TwoSidedTrmmLUnb( diag, A11, L11 );\n\n        // A21 := A21 L11\n        Trmm( RIGHT, LOWER, NORMAL, diag, F(1), L11, A21 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /*************/ /******************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\ntemplate<typename F>\ninline void\nTwoSidedTrmmLVar4\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmLVar4\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,VR  > A10_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > A10_STAR_MR(g);\n    DistMatrix<F,STAR,MC  > A10_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,MC,  STAR> A21_MC_STAR(g);\n    DistMatrix<F,STAR,VR  > L10_STAR_VR(g);\n    DistMatrix<F,MR,  STAR> L10Adj_MR_STAR(g);\n    DistMatrix<F,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > Y10_STAR_VR(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        A10_STAR_VR.AlignWith( A00 );\n        A10_STAR_MR.AlignWith( A00 );\n        A10_STAR_MC.AlignWith( A00 );\n        A21_MC_STAR.AlignWith( A20 );\n        L10_STAR_VR.AlignWith( A00 );\n        L10Adj_MR_STAR.AlignWith( A00 );\n        L10_STAR_MC.AlignWith( A00 );\n        Y10_STAR_VR.AlignWith( A10 );\n        //--------------------------------------------------------------------//\n        // Y10 := A11 L10\n        A11_STAR_STAR = A11;\n        L10.AdjointColAllGather( L10Adj_MR_STAR );\n        L10_STAR_VR.AdjointPartialRowFilterFrom( L10Adj_MR_STAR );\n        Zeros( Y10_STAR_VR, A10.Height(), A10.Width() );\n        Hemm\n        ( LEFT, LOWER,\n          F(1), A11_STAR_STAR.LockedMatrix(), L10_STAR_VR.LockedMatrix(),\n          F(0), Y10_STAR_VR.Matrix() );\n\n        // A10 := A10 + 1/2 Y10\n        A10_STAR_VR = A10;\n        Axpy( F(1)/F(2), Y10_STAR_VR, A10_STAR_VR );\n\n        // A00 := A00 + (A10' L10 + L10' A10)\n        A10_STAR_MR = A10_STAR_VR;\n        A10_STAR_MC = A10_STAR_VR;\n        L10_STAR_MC = L10_STAR_VR;\n        LocalTrr2k\n        ( LOWER, ADJOINT, ADJOINT, ADJOINT,\n          F(1), A10_STAR_MC, L10Adj_MR_STAR, \n                L10_STAR_MC, A10_STAR_MR, \n          F(1), A00 );\n\n        // A10 := A10 + 1/2 Y10\n        Axpy( F(1)/F(2), Y10_STAR_VR, A10_STAR_VR );\n\n        // A10 := L11' A10\n        L11_STAR_STAR = L11;\n        LocalTrmm\n        ( LEFT, LOWER, ADJOINT, diag, F(1), L11_STAR_STAR, A10_STAR_VR );\n        A10 = A10_STAR_VR;\n\n        // A20 := A20 + A21 L10\n        A21_MC_STAR = A21;\n        LocalGemm\n        ( NORMAL, ADJOINT, F(1), A21_MC_STAR, L10Adj_MR_STAR, F(1), A20 );\n\n        // A11 := L11' A11 L11\n        LocalTwoSidedTrmm( LOWER, diag, A11_STAR_STAR, L11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A21 := A21 L11\n        A21_VC_STAR = A21_MC_STAR;\n        LocalTrmm\n        ( RIGHT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, A21_VC_STAR );\n        A21 = A21_VC_STAR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /*************/ /******************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRMM_LVAR4_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrmm/LVar5.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRMM_LVAR5_HPP\n#define ELEM_TWOSIDEDTRMM_LVAR5_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRMM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\n// The only reason a field is required is for the existence of 1/2, which is \n// an artifact of the algorithm...\ntemplate<typename F> \ninline void\nTwoSidedTrmmLVar5( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmLVar5\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n\n    // Temporary products\n    Matrix<F> Y10;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------//\n        // Y10 := A11 L10\n        Zeros( Y10, A10.Height(), A10.Width() );\n        Hemm( LEFT, LOWER, F(1), A11, L10, F(0), Y10 );\n\n        // A10 := A10 L00\n        Trmm( RIGHT, LOWER, NORMAL, diag, F(1), L00, A10 );\n\n        // A10 := A10 + 1/2 Y10\n        Axpy( F(1)/F(2), Y10, A10 );\n\n        // A00 := A00 + (L10' A10 + A10' L10)\n        Her2k( LOWER, ADJOINT, F(1), L10, A10, F(1), A00 );\n\n        // A10 := A10 + 1/2 Y10\n        Axpy( F(1)/F(2), Y10, A10 );\n\n        // A10 := L11' A10\n        Trmm( LEFT, LOWER, ADJOINT, diag, F(1), L11, A10 );\n\n        // A11 := L11' A11 L11\n        TwoSidedTrmmLUnb( diag, A11, L11 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrmmLVar5\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmLVar5\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    const Grid& g = A.Grid();\n    \n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > A10_STAR_MC(g);\n    DistMatrix<F,MR,  STAR> A10Trans_MR_STAR(g);\n    DistMatrix<F,STAR,VR  > A10_STAR_VR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > L10_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > L10_STAR_VR(g);\n    DistMatrix<F,STAR,VR  > Y10_STAR_VR(g);\n    DistMatrix<F> Y10(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        A10_STAR_MC.AlignWith( A00 );\n        A10Trans_MR_STAR.AlignWith( A00 );\n        A10_STAR_VR.AlignWith( A10 );\n        L10_STAR_MC.AlignWith( A00 );\n        L10_STAR_MR.AlignWith( A00 );\n        L10_STAR_VR.AlignWith( A00 );\n        Y10.AlignWith( A10 );\n        Y10_STAR_VR.AlignWith( A10 );\n        //--------------------------------------------------------------------//\n        // Y10 := A11 L10\n        A11_STAR_STAR = A11;\n        L10_STAR_VR = L10;\n        Zeros( Y10_STAR_VR, A10.Height(), A10.Width() );\n        Hemm\n        ( LEFT, LOWER, \n          F(1), A11_STAR_STAR.Matrix(), L10_STAR_VR.Matrix(),\n          F(0), Y10_STAR_VR.Matrix() );\n        Y10 = Y10_STAR_VR;\n\n        // A10 := A10 L00\n        Trmm( RIGHT, LOWER, NORMAL, diag, F(1), L00, A10 );\n\n        // A10 := A10 + 1/2 Y10\n        Axpy( F(1)/F(2), Y10, A10 );\n\n        // A00 := A00 + (L10' A10 + A10' L10)\n        A10.TransposeColAllGather( A10Trans_MR_STAR );\n        L10_STAR_MR = L10_STAR_VR;\n        A10_STAR_VR = A10;\n        A10_STAR_MC = A10_STAR_VR;\n        L10_STAR_MC = L10_STAR_VR;\n        LocalTrr2k\n        ( LOWER, ADJOINT, TRANSPOSE, ADJOINT,\n          F(1), L10_STAR_MC, A10Trans_MR_STAR, \n                A10_STAR_MC, L10_STAR_MR, \n          F(1), A00 );\n\n        // A10 := A10 + 1/2 Y10\n        Axpy( F(1)/F(2), Y10_STAR_VR, A10_STAR_VR );\n\n        // A10 := L11' A10\n        L11_STAR_STAR = L11;\n        LocalTrmm\n        ( LEFT, LOWER, ADJOINT, diag, F(1), L11_STAR_STAR, A10_STAR_VR );\n        A10 = A10_STAR_VR;\n\n        // A11 := L11' A11 L11\n        LocalTwoSidedTrmm( LOWER, diag, A11_STAR_STAR, L11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRMM_LVAR5_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrmm/UVar1.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRMM_UVAR1_HPP\n#define ELEM_TWOSIDEDTRMM_UVAR1_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRMM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\n// The only reason a field is required is for the existence of 1/2, which is \n// an artifact of the algorithm...\ntemplate<typename F> \ninline void\nTwoSidedTrmmUVar1( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmUVar1\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        UTL, UTR,  U00, U01, U02,\n        UBL, UBR,  U10, U11, U12,\n                   U20, U21, U22;\n\n    // Temporary products\n    Matrix<F> Y12;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------//\n        // Y12 := U12 A22\n        Zeros( Y12, A12.Height(), A12.Width() );\n        Hemm( RIGHT, UPPER, F(1), A22, U12, F(0), Y12 );\n\n        // A12 := U11 A12\n        Trmm( LEFT, UPPER, NORMAL, diag, F(1), U11, A12 );\n\n        // A12 := A12 + 1/2 Y12\n        Axpy( F(1)/F(2), Y12, A12 );\n\n        // A11 := U11 A11 U11'\n        TwoSidedTrmmUUnb( diag, A11, U11 );\n\n        // A11 := A11 + (U12 A12' + A12 U12')\n        Her2k( UPPER, NORMAL, F(1), U12, A12, F(1), A11 );\n\n        // A12 := A12 + 1/2 Y12\n        Axpy( F(1)/F(2), Y12, A12 );\n\n        // A12 := A12 U22'\n        Trmm( RIGHT, UPPER, ADJOINT, diag, F(1), U22, A12 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrmmUVar1\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmUVar1\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        UTL(g), UTR(g),  U00(g), U01(g), U02(g),\n        UBL(g), UBR(g),  U10(g), U11(g), U12(g),\n                         U20(g), U21(g), U22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,STAR,VR  > U12_STAR_VR(g);\n    DistMatrix<F,MR,  STAR> U12Adj_MR_STAR(g);\n    DistMatrix<F,VC,  STAR> U12Adj_VC_STAR(g);\n    DistMatrix<F,STAR,STAR> X11_STAR_STAR(g);\n    DistMatrix<F,MR,  MC  > Z12Adj_MR_MC(g);\n    DistMatrix<F,MC,  STAR> Z12Adj_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> Z12Adj_MR_STAR(g);\n    DistMatrix<F> Z12Adj(g);\n    DistMatrix<F> Y12(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        A12_STAR_VR.AlignWith( A12 );\n        U12_STAR_MC.AlignWith( A22 );\n        U12_STAR_VR.AlignWith( A12 );\n        U12Adj_MR_STAR.AlignWith( A22 );\n        U12Adj_VC_STAR.AlignWith( A22 );\n        Y12.AlignWith( A12 );\n        Z12Adj.AlignWith( A12 );\n        Z12Adj_MR_MC.AlignWith( A12 );\n        Z12Adj_MC_STAR.AlignWith( A22 );\n        Z12Adj_MR_STAR.AlignWith( A22 );\n        //--------------------------------------------------------------------//\n        // Y12 := U12 A22\n        U12.AdjointColAllGather( U12Adj_MR_STAR );\n        U12Adj_VC_STAR = U12Adj_MR_STAR;\n        U12Adj_VC_STAR.AdjointPartialColAllGather( U12_STAR_MC );\n        Zeros( Z12Adj_MC_STAR, A12.Width(), A12.Height() );\n        Zeros( Z12Adj_MR_STAR, A12.Width(), A12.Height() );\n        LocalSymmetricAccumulateRU\n        ( ADJOINT, \n          F(1), A22, U12_STAR_MC, U12Adj_MR_STAR, \n          Z12Adj_MC_STAR, Z12Adj_MR_STAR );\n        Z12Adj.RowSumScatterFrom( Z12Adj_MC_STAR );\n        Z12Adj_MR_MC = Z12Adj;\n        Z12Adj_MR_MC.RowSumScatterUpdate( F(1), Z12Adj_MR_STAR );\n        Y12.Resize( A12.Height(), A12.Width() );\n        Adjoint( Z12Adj_MR_MC.LockedMatrix(), Y12.Matrix() );\n\n        // A12 := U11 A12\n        A12_STAR_VR = A12;\n        U11_STAR_STAR = U11;\n        LocalTrmm\n        ( LEFT, UPPER, NORMAL, diag, F(1), U11_STAR_STAR, A12_STAR_VR );\n        A12 = A12_STAR_VR;\n\n        // A12 := A12 + 1/2 Y12\n        Axpy( F(1)/F(2), Y12, A12 );\n\n        // A11 := U11 A11 U11'\n        A11_STAR_STAR = A11;\n        LocalTwoSidedTrmm( UPPER, diag, A11_STAR_STAR, U11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A11 := A11 + (U12 A12' + A12 U12')\n        A12_STAR_VR = A12;\n        U12_STAR_VR = U12;\n        Zeros( X11_STAR_STAR, A11.Height(), A11.Width() );\n        Her2k\n        ( UPPER, NORMAL,\n          F(1), A12_STAR_VR.Matrix(), U12_STAR_VR.Matrix(),\n          F(0), X11_STAR_STAR.Matrix() );\n        A11.SumScatterUpdate( F(1), X11_STAR_STAR );\n\n        // A12 := A12 + 1/2 Y12\n        Axpy( F(1)/F(2), Y12, A12 );\n\n        // A12 := A12 U22'\n        Trmm( RIGHT, UPPER, ADJOINT, diag, F(1), U22, A12 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRMM_UVAR1_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrmm/UVar2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRMM_UVAR2_HPP\n#define ELEM_TWOSIDEDTRMM_UVAR2_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_GEMM_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRMM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\n// The only reason a field is required is for the existence of 1/2, which is \n// an artifact of the algorithm...\ntemplate<typename F> \ninline void\nTwoSidedTrmmUVar2( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmUVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        UTL, UTR,  U00, U01, U02,\n        UBL, UBR,  U10, U11, U12,\n                   U20, U21, U22;\n\n    // Temporary products\n    Matrix<F> Y12;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------//\n        // A01 := A01 U11'\n        Trmm( RIGHT, UPPER, ADJOINT, diag, F(1), U11, A01 );\n\n        // A01 := A01 + A02 U12'\n        Gemm( NORMAL, ADJOINT, F(1), A02, U12, F(1), A01 );\n\n        // Y12 := U12 A22\n        Zeros( Y12, A12.Height(), A12.Width() );\n        Hemm( RIGHT, UPPER, F(1), A22, U12, F(0), Y12 );\n\n        // A12 := U11 A12\n        Trmm( LEFT, UPPER, NORMAL, diag, F(1), U11, A12 );\n\n        // A12 := A12 + 1/2 Y12\n        Axpy( F(1)/F(2), Y12, A12 );\n\n        // A11 := U11 A11 U11'\n        TwoSidedTrmmUUnb( diag, A11, U11 );\n\n        // A11 := A11 + (A12 U12' + U12 A12')\n        Her2k( UPPER, NORMAL, F(1), A12, U12, F(1), A11 );\n\n        // A12 := A12 + 1/2 Y12\n        Axpy( F(1)/F(2), Y12, A12 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrmmUVar2\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmUVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        UTL(g), UTR(g),  U00(g), U01(g), U02(g),\n        UBL(g), UBR(g),  U10(g), U11(g), U12(g),\n                         U20(g), U21(g), U22(g);\n\n    // Temporary distributions\n    DistMatrix<F,VC,  STAR> A01_VC_STAR(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,STAR,VR  > U12_STAR_VR(g);\n    DistMatrix<F,MR,  STAR> U12Adj_MR_STAR(g);\n    DistMatrix<F,VC,  STAR> U12Adj_VC_STAR(g);\n    DistMatrix<F,MC,  STAR> X01_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> X11_STAR_STAR(g);\n    DistMatrix<F,MR,  MC  > Z12Adj_MR_MC(g);\n    DistMatrix<F,MC,  STAR> Z12Adj_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> Z12Adj_MR_STAR(g);\n    DistMatrix<F> Y12(g);\n    DistMatrix<F> Z12Adj(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        A12_STAR_VR.AlignWith( A12 );\n        U12_STAR_MC.AlignWith( A22 );\n        U12_STAR_VR.AlignWith( A12 );\n        U12Adj_MR_STAR.AlignWith( A22 );\n        U12Adj_VC_STAR.AlignWith( A22 );\n        X01_MC_STAR.AlignWith( A01 );\n        Y12.AlignWith( A12 );\n        Z12Adj.AlignWith( A12 );\n        Z12Adj_MR_MC.AlignWith( A12 );\n        Z12Adj_MC_STAR.AlignWith( A22 );\n        Z12Adj_MR_STAR.AlignWith( A22 );\n        //--------------------------------------------------------------------//\n        // A01 := A01 U11'\n        U11_STAR_STAR = U11;\n        A01_VC_STAR = A01;\n        LocalTrmm\n        ( RIGHT, UPPER, ADJOINT, diag, F(1), U11_STAR_STAR, A01_VC_STAR );\n        A01 = A01_VC_STAR;\n\n        // A01 := A01 + A02 U12'\n        U12.AdjointColAllGather( U12Adj_MR_STAR );\n        LocalGemm( NORMAL, NORMAL, F(1), A02, U12Adj_MR_STAR, X01_MC_STAR );\n        A01.RowSumScatterUpdate( F(1), X01_MC_STAR );\n\n        // Y12 := U12 A22\n        U12Adj_VC_STAR = U12Adj_MR_STAR;\n        U12Adj_VC_STAR.AdjointPartialColAllGather( U12_STAR_MC );\n        Zeros( Z12Adj_MC_STAR, A12.Width(), A12.Height() );\n        Zeros( Z12Adj_MR_STAR, A12.Width(), A12.Height() );\n        LocalSymmetricAccumulateRU\n        ( ADJOINT, \n          F(1), A22, U12_STAR_MC, U12Adj_MR_STAR, \n          Z12Adj_MC_STAR, Z12Adj_MR_STAR );\n        Z12Adj.RowSumScatterFrom( Z12Adj_MC_STAR );\n        Z12Adj_MR_MC = Z12Adj;\n        Z12Adj_MR_MC.RowSumScatterUpdate( F(1), Z12Adj_MR_STAR );\n        Y12.Resize( A12.Height(), A12.Width() );\n        Adjoint( Z12Adj_MR_MC.LockedMatrix(), Y12.Matrix() );\n\n        // A12 := U11 A12\n        A12_STAR_VR = A12;\n        U11_STAR_STAR = U11;\n        LocalTrmm\n        ( LEFT, UPPER, NORMAL, diag, F(1), U11_STAR_STAR, A12_STAR_VR );\n        A12 = A12_STAR_VR;\n\n        // A12 := A12 + 1/2 Y12\n        Axpy( F(1)/F(2), Y12, A12 );\n\n        // A11 := U11 A11 U11'\n        A11_STAR_STAR = A11;\n        LocalTwoSidedTrmm( UPPER, diag, A11_STAR_STAR, U11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A11 := A11 + (A12 U12' + U12 A12')\n        A12_STAR_VR = A12;\n        U12_STAR_VR = U12;\n        Zeros( X11_STAR_STAR, A11.Height(), A11.Width() );\n        Her2k\n        ( UPPER, NORMAL,\n          F(1), A12_STAR_VR.Matrix(), U12_STAR_VR.Matrix(),\n          F(0), X11_STAR_STAR.Matrix() );\n        A11.SumScatterUpdate( F(1), X11_STAR_STAR );\n\n        // A12 := A12 + 1/2 Y12\n        Axpy( F(1)/F(2), Y12, A12 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRMM_UVAR2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrmm/UVar4.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRMM_UVAR4_HPP\n#define ELEM_TWOSIDEDTRMM_UVAR4_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_GEMM_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRMM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\n// The only reason that a field is required is for the existence of 1/2, which\n// is an artifact of this algorithm...\ntemplate<typename F> \ninline void\nTwoSidedTrmmUVar4( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmUVar4\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        UTL, UTR,  U00, U01, U02,\n        UBL, UBR,  U10, U11, U12,\n                   U20, U21, U22;\n\n    // Temporary products\n    Matrix<F> Y01;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------//\n        // Y01 := U01 A11\n        Zeros( Y01, A01.Height(), A01.Width() );\n        Hemm( RIGHT, UPPER, F(1), A11, U01, F(0), Y01 );\n\n        // A01 := A01 + 1/2 Y01\n        Axpy( F(1)/F(2), Y01, A01 );\n\n        // A00 := A00 + (U01 A01' + A01 U01')\n        Her2k( UPPER, NORMAL, F(1), U01, A01, F(1), A00 );\n\n        // A01 := A01 + 1/2 Y01\n        Axpy( F(1)/F(2), Y01, A01 );\n\n        // A01 := A01 U11'\n        Trmm( RIGHT, UPPER, ADJOINT, diag, F(1), U11, A01 );\n\n        // A02 := A02 + U01 A12\n        Gemm( NORMAL, NORMAL, F(1), U01, A12, F(1), A02 );\n\n        // A11 := U11 A11 U11'\n        TwoSidedTrmmUUnb( diag, A11, U11 );\n\n        // A12 := U11 A12\n        Trmm( LEFT, UPPER, NORMAL, diag, F(1), U11, A12 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrmmUVar4\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmUVar4\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        UTL(g), UTR(g),  U00(g), U01(g), U02(g),\n        UBL(g), UBR(g),  U10(g), U11(g), U12(g),\n                         U20(g), U21(g), U22(g);\n\n    // Temporary distributions\n    DistMatrix<F,VC,  STAR> A01_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> A01_VR_STAR(g);\n    DistMatrix<F,STAR,MC  > A01Adj_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A01Adj_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,MR,  STAR> A12Adj_MR_STAR(g);\n    DistMatrix<F,VC,  STAR> U01_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> U01_VR_STAR(g);\n    DistMatrix<F,STAR,MC  > U01Adj_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > U01Adj_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> Y01_VC_STAR(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        A01_VC_STAR.AlignWith( A00 );\n        A01_VR_STAR.AlignWith( A00 );\n        A01Adj_STAR_MC.AlignWith( A00 );\n        A01Adj_STAR_MR.AlignWith( A00 );\n        A12Adj_MR_STAR.AlignWith( A02 );\n        U01_VC_STAR.AlignWith( A00 );\n        U01_VR_STAR.AlignWith( A00 );\n        U01Adj_STAR_MC.AlignWith( A00 );\n        U01Adj_STAR_MR.AlignWith( A00 );\n        Y01_VC_STAR.AlignWith( A01 );\n        //--------------------------------------------------------------------//\n        // Y01 := U01 A11\n        A11_STAR_STAR = A11;\n        U01_VC_STAR = U01;\n        Zeros( Y01_VC_STAR, A01.Height(), A01.Width() );\n        Hemm\n        ( RIGHT, UPPER, \n          F(1), A11_STAR_STAR.LockedMatrix(), U01_VC_STAR.LockedMatrix(), \n          F(0), Y01_VC_STAR.Matrix() );\n\n        // A01 := A01 + 1/2 Y01\n        A01_VC_STAR = A01;\n        Axpy( F(1)/F(2), Y01_VC_STAR, A01_VC_STAR );\n\n        // A00 := A00 + (U01 A01' + A01 U01')\n        A01_VC_STAR.AdjointPartialColAllGather( A01Adj_STAR_MC );\n        U01_VC_STAR.AdjointPartialColAllGather( U01Adj_STAR_MC );\n        A01_VR_STAR = A01_VC_STAR;\n        U01_VR_STAR = U01_VC_STAR;\n        A01_VR_STAR.AdjointPartialColAllGather( A01Adj_STAR_MR );\n        U01_VR_STAR.AdjointPartialColAllGather( U01Adj_STAR_MR );\n        LocalTrr2k\n        ( UPPER, ADJOINT, ADJOINT,\n          F(1), U01Adj_STAR_MC, A01Adj_STAR_MR, \n                A01Adj_STAR_MC, U01Adj_STAR_MR, F(1), A00 );\n\n        // A01 := A01 + 1/2 Y01\n        Axpy( F(1)/F(2), Y01_VC_STAR, A01_VC_STAR );\n\n        // A01 := A01 U11'\n        U11_STAR_STAR = U11;\n        LocalTrmm\n        ( RIGHT, UPPER, ADJOINT, diag, F(1), U11_STAR_STAR, A01_VC_STAR );\n        A01 = A01_VC_STAR;\n\n        // A02 := A02 + U01 A12\n        A12.AdjointColAllGather( A12Adj_MR_STAR );\n        LocalGemm\n        ( ADJOINT, ADJOINT, F(1), U01Adj_STAR_MC, A12Adj_MR_STAR, F(1), A02 );\n\n        // A11 := U11 A11 U11'\n        LocalTwoSidedTrmm( UPPER, diag, A11_STAR_STAR, U11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A12 := U11 A12\n        A12_STAR_VR.AdjointPartialRowFilterFrom( A12Adj_MR_STAR );\n        LocalTrmm\n        ( LEFT, UPPER, NORMAL, diag, F(1), U11_STAR_STAR, A12_STAR_VR );\n        A12 = A12_STAR_VR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRMM_UVAR4_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrmm/UVar5.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRMM_UVAR5_HPP\n#define ELEM_TWOSIDEDTRMM_UVAR5_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRMM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\n// The only requirement that this is a field comes from the necessity for \n// the existence of 1/2, which is artifact of the algorithm...\ntemplate<typename F> \ninline void\nTwoSidedTrmmUVar5( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmUVar5\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        UTL, UTR,  U00, U01, U02,\n        UBL, UBR,  U10, U11, U12,\n                   U20, U21, U22;\n\n    // Temporary products\n    Matrix<F> Y01;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------//\n        // Y01 := U01 A11\n        Zeros( Y01, A01.Height(), A01.Width() );\n        Hemm( RIGHT, UPPER, F(1), A11, U01, F(0), Y01 );\n\n        // A01 := U00 A01\n        Trmm( LEFT, UPPER, NORMAL, diag, F(1), U00, A01 );\n\n        // A01 := A01 + 1/2 Y01\n        Axpy( F(1)/F(2), Y01, A01 );\n\n        // A00 := A00 + (U01 A01' + A01 U01')\n        Her2k( UPPER, NORMAL, F(1), U01, A01, F(1), A00 );\n\n        // A01 := A01 + 1/2 Y01\n        Axpy( F(1)/F(2), Y01, A01 );\n\n        // A01 := A01 U11'\n        Trmm( RIGHT, UPPER, ADJOINT, diag, F(1), U11, A01 );\n\n        // A11 := U11 A11 U11'\n        TwoSidedTrmmUUnb( diag, A11, U11 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrmmUVar5\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrmmUVar5\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        UTL(g), UTR(g),  U00(g), U01(g), U02(g),\n        UBL(g), UBR(g),  U10(g), U11(g), U12(g),\n                         U20(g), U21(g), U22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> A01_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> A01_MR_STAR(g);\n    DistMatrix<F,VC,  STAR> A01_VC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> U01_MR_STAR(g);\n    DistMatrix<F,VC,  STAR> U01_VC_STAR(g);\n    DistMatrix<F,VC,  STAR> Y01_VC_STAR(g);\n    DistMatrix<F> Y01(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        A01_MC_STAR.AlignWith( A00 );\n        A01_MR_STAR.AlignWith( A00 );\n        A01_VC_STAR.AlignWith( A00 );\n        U01_MC_STAR.AlignWith( A00 );\n        U01_MR_STAR.AlignWith( A00 );\n        U01_VC_STAR.AlignWith( A00 );\n        Y01.AlignWith( A01 );\n        Y01_VC_STAR.AlignWith( A01 );\n        //--------------------------------------------------------------------//\n        // Y01 := U01 A11\n        A11_STAR_STAR = A11;\n        U01_VC_STAR = U01;\n        Zeros( Y01_VC_STAR, A01.Height(), A01.Width() );\n        Hemm\n        ( RIGHT, UPPER,\n          F(1), A11_STAR_STAR.Matrix(), U01_VC_STAR.Matrix(),\n          F(0), Y01_VC_STAR.Matrix() );\n        Y01 = Y01_VC_STAR;\n\n        // A01 := U00 A01\n        Trmm( LEFT, UPPER, NORMAL, diag, F(1), U00, A01 );\n\n        // A01 := A01 + 1/2 Y01\n        Axpy( F(1)/F(2), Y01, A01 );\n\n        // A00 := A00 + (U01 A01' + A01 U01')\n        A01_MC_STAR = A01;\n        U01_MC_STAR = U01;\n        A01_VC_STAR = A01_MC_STAR;\n        A01_MR_STAR = A01_VC_STAR;\n        U01_MR_STAR = U01_MC_STAR;\n        LocalTrr2k\n        ( UPPER, ADJOINT, ADJOINT,\n          F(1), U01_MC_STAR, A01_MR_STAR, \n                A01_MC_STAR, U01_MR_STAR,\n          F(1), A00 );\n\n        // A01 := A01 + 1/2 Y01\n        Axpy( F(1)/F(2), Y01_VC_STAR, A01_VC_STAR );\n\n        // A01 := A01 U11'\n        U11_STAR_STAR = U11;\n        LocalTrmm\n        ( RIGHT, UPPER, ADJOINT, diag, F(1), U11_STAR_STAR, A01_VC_STAR );\n        A01 = A01_VC_STAR;\n\n        // A11 := U11 A11 U11'\n        LocalTwoSidedTrmm( UPPER, diag, A11_STAR_STAR, U11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRMM_UVAR5_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrmm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRMM_HPP\n#define ELEM_TWOSIDEDTRMM_HPP\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename T>\ninline void \nTwoSidedTrmmLUnb( UnitOrNonUnit diag, Matrix<T>& A, const Matrix<T>& L )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::TwoSidedTrmmLUnb\"))\n    // Use the Variant 4 algorithm\n    // (which annoyingly requires conjugations for the Her2)\n    const Int n = A.Height();\n    const Int lda = A.LDim();\n    const Int ldl = L.LDim();\n    T* ABuffer = A.Buffer();\n    const T* LBuffer = L.LockedBuffer();\n    std::vector<T> a10Conj( n ), l10Conj( n );\n    for( Int j=0; j<n; ++j )\n    {\n        const Int a21Height = n - (j+1);\n\n        // Extract and store the diagonal values of A and L\n        const T alpha11 = ABuffer[j+j*lda];\n        const T lambda11 = ( diag==UNIT ? 1 : LBuffer[j+j*ldl] );\n\n        // a10 := a10 + (alpha11/2)l10\n        T* a10 = &ABuffer[j];\n        const T* l10 = &LBuffer[j];\n        for( Int k=0; k<j; ++k )\n            a10[k*lda] += (alpha11/T(2))*l10[k*ldl];\n\n        // A00 := A00 + (a10' l10 + l10' a10)\n        T* A00 = ABuffer;\n        for( Int k=0; k<j; ++k )\n            a10Conj[k] = Conj(a10[k*lda]);\n        for( Int k=0; k<j; ++k )\n            l10Conj[k] = Conj(l10[k*ldl]);\n        blas::Her2\n        ( 'L', j, T(1), a10Conj.data(), 1, l10Conj.data(), 1, A00, lda );\n\n        // a10 := a10 + (alpha11/2)l10\n        for( Int k=0; k<j; ++k )\n            a10[k*lda] += (alpha11/T(2))*l10[k*ldl];\n\n        // a10 := conj(lambda11) a10\n        if( diag != UNIT )\n            for( Int k=0; k<j; ++k )\n                a10[k*lda] *= Conj(lambda11);\n\n        // alpha11 := alpha11 * |lambda11|^2\n        ABuffer[j+j*lda] *= Conj(lambda11)*lambda11;\n\n        // A20 := A20 + a21 l10\n        T* a21 = &ABuffer[(j+1)+j*lda];\n        T* A20 = &ABuffer[j+1];\n        blas::Geru( a21Height, j, T(1), a21, 1, l10, ldl, A20, lda );\n\n        // a21 := lambda11 a21\n        if( diag != UNIT )\n            for( Int k=0; k<a21Height; ++k )\n                a21[k] *= lambda11;\n    }\n}\n\ntemplate<typename T>\ninline void \nTwoSidedTrmmUUnb( UnitOrNonUnit diag, Matrix<T>& A, const Matrix<T>& U )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::TwoSidedTrmmUUnb\"))\n    // Use the Variant 4 algorithm\n    const Int n = A.Height();\n    const Int lda = A.LDim();\n    const Int ldu = U.LDim();\n    T* ABuffer = A.Buffer();\n    const T* UBuffer = U.LockedBuffer();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int a21Height = n - (j+1);\n\n        // Extract and store the diagonal values of A and U\n        const T alpha11 = ABuffer[j+j*lda];\n        const T upsilon11 = ( diag==UNIT ? 1 : UBuffer[j+j*ldu] );\n\n        // a01 := a01 + (alpha11/2)u01\n        T* a01 = &ABuffer[j*lda];\n        const T* u01 = &UBuffer[j*ldu];\n        for( Int k=0; k<j; ++k )\n            a01[k] += (alpha11/T(2))*u01[k];\n\n        // A00 := A00 + (u01 a01' + a01 u01')\n        T* A00 = ABuffer;\n        blas::Her2( 'U', j, T(1), u01, 1, a01, 1, A00, lda );\n\n        // a01 := a01 + (alpha11/2)u01\n        for( Int k=0; k<j; ++k )\n            a01[k] += (alpha11/T(2))*u01[k];\n\n        // a01 := conj(upsilon11) a01\n        if( diag != UNIT )\n            for( Int k=0; k<j; ++k )\n                a01[k] *= Conj(upsilon11);\n\n        // A02 := A02 + u01 a12\n        T* a12 = &ABuffer[j+(j+1)*lda];\n        T* A02 = &ABuffer[(j+1)*lda];\n        blas::Geru( j, a21Height, T(1), u01, 1, a12, lda, A02, lda );\n\n        // alpha11 := alpha11 * |upsilon11|^2\n        ABuffer[j+j*lda] *= Conj(upsilon11)*upsilon11;\n\n        // a12 := upsilon11 a12\n        if( diag != UNIT )\n            for( Int k=0; k<a21Height; ++k )\n                a12[k*lda] *= upsilon11;\n    }\n}\n\n} // namespace internal\n\ntemplate<typename T>\ninline void\nLocalTwoSidedTrmm\n( UpperOrLower uplo, UnitOrNonUnit diag,\n  DistMatrix<T,STAR,STAR>& A, const DistMatrix<T,STAR,STAR>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalTwoSidedTrmm\"))\n    TwoSidedTrmm( uplo, diag, A.Matrix(), B.LockedMatrix() );\n}\n\n} // namespace elem\n\n#include \"./TwoSidedTrmm/LVar4.hpp\"\n#include \"./TwoSidedTrmm/UVar4.hpp\"\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nTwoSidedTrmm\n( UpperOrLower uplo, UnitOrNonUnit diag, Matrix<T>& A, const Matrix<T>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TwoSidedTrmm\"))\n    if( uplo == LOWER )\n        internal::TwoSidedTrmmLVar4( diag, A, B );\n    else\n        internal::TwoSidedTrmmUVar4( diag, A, B );\n}\n\ntemplate<typename T> \ninline void\nTwoSidedTrmm\n( UpperOrLower uplo, UnitOrNonUnit diag, \n  DistMatrix<T>& A, const DistMatrix<T>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TwoSidedTrmm\"))\n    if( uplo == LOWER )\n        internal::TwoSidedTrmmLVar4( diag, A, B );\n    else\n        internal::TwoSidedTrmmUVar4( diag, A, B );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRMM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm/LVar1.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_LVAR1_HPP\n#define ELEM_TWOSIDEDTRSM_LVAR1_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRSM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmLVar1( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmLVar1\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n\n    // Temporary products\n    Matrix<F> Y10;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------//\n        // Y10 := L10 A00\n        Zeros( L10, L10.Height(), A00.Width() );\n        Hemm( RIGHT, LOWER, F(1), A00, L10, F(0), Y10 );\n\n        // A10 := A10 inv(L00)'\n        Trsm( RIGHT, LOWER, ADJOINT, diag, F(1), L00, A10 );\n\n        // A10 := A10 - 1/2 Y10\n        Axpy( F(-1)/F(2), Y10, A10 );\n\n        // A11 := A11 - (A10 L10' + L10 A10')\n        Her2k( LOWER, NORMAL, F(-1), A10, L10, F(1), A11 );\n\n        // A11 := inv(L11) A11 inv(L11)'\n        TwoSidedTrsmLUnb( diag, A11, L11 );\n\n        // A10 := A10 - 1/2 Y10\n        Axpy( F(-1)/F(2), Y10, A10 );\n\n        // A10 := inv(L11) A10\n        Trsm( LEFT, LOWER, NORMAL, diag, F(1), L11, A10 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmLVar1\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmLVar1\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    const Grid& g = A.Grid();\n    \n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A10_STAR_VR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<F,STAR,VR  > L10_STAR_VR(g);\n    DistMatrix<F,MR,  STAR> L10Adj_MR_STAR(g);\n    DistMatrix<F,VC,  STAR> L10Adj_VC_STAR(g);\n    DistMatrix<F,STAR,STAR> X11_STAR_STAR(g);\n    DistMatrix<F,MR,  MC  > Z10Adj_MR_MC(g);\n    DistMatrix<F,MC,  STAR> Z10Adj_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> Z10Adj_MR_STAR(g);\n    DistMatrix<F> Y10(g);\n    DistMatrix<F> Z10Adj(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        A10_STAR_VR.AlignWith( A10 );\n        L10_STAR_MC.AlignWith( A00 );\n        L10_STAR_VR.AlignWith( A00 );\n        L10Adj_MR_STAR.AlignWith( A00 );\n        L10Adj_VC_STAR.AlignWith( A00 );\n        Y10.AlignWith( A10 );\n        Z10Adj.AlignWith( A10 );\n        Z10Adj_MR_MC.AlignWith( A10 );\n        Z10Adj_MC_STAR.AlignWith( A00 );\n        Z10Adj_MR_STAR.AlignWith( A00 );\n        //--------------------------------------------------------------------//\n        // Y10 := L10 A00\n        L10.AdjointColAllGather( L10Adj_MR_STAR );\n        L10Adj_VC_STAR = L10Adj_MR_STAR;\n        L10Adj_VC_STAR.AdjointPartialColAllGather( L10_STAR_MC );\n        Zeros( Z10Adj_MC_STAR, A10.Width(), A10.Height() );\n        Zeros( Z10Adj_MR_STAR, A10.Width(), A10.Height() );\n        LocalSymmetricAccumulateRL\n        ( ADJOINT,\n          F(1), A00, L10_STAR_MC, L10Adj_MR_STAR, \n          Z10Adj_MC_STAR, Z10Adj_MR_STAR );\n        Z10Adj.RowSumScatterFrom( Z10Adj_MC_STAR );\n        Z10Adj_MR_MC = Z10Adj;\n        Z10Adj_MR_MC.RowSumScatterUpdate( F(1), Z10Adj_MR_STAR );\n        Y10.Resize( A10.Height(), A10.Width() );\n        Adjoint( Z10Adj_MR_MC.Matrix(), Y10.Matrix() );\n\n        // A10 := A10 inv(L00)'\n        // This is the bottleneck because A10 only has blocksize rows\n        Trsm( RIGHT, LOWER, ADJOINT, diag, F(1), L00, A10 );\n\n        // A10 := A10 - 1/2 Y10\n        Axpy( F(-1)/F(2), Y10, A10 );\n\n        // A11 := A11 - (A10 L10' + L10 A10')\n        A10_STAR_VR = A10;\n        L10_STAR_VR = L10;\n        Zeros( X11_STAR_STAR, A11.Height(), A11.Width() );\n        Her2k\n        ( LOWER, NORMAL,\n          F(-1), A10_STAR_VR.Matrix(), L10_STAR_VR.Matrix(), \n          F(0), X11_STAR_STAR.Matrix() );\n        A11.SumScatterUpdate( F(1), X11_STAR_STAR );\n\n        // A11 := inv(L11) A11 inv(L11)'\n        A11_STAR_STAR = A11;\n        L11_STAR_STAR = L11;\n        LocalTwoSidedTrsm( LOWER, diag, A11_STAR_STAR, L11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A10 := A10 - 1/2 Y10\n        Axpy( F(-1)/F(2), Y10, A10 );\n\n        // A10 := inv(L11) A10\n        A10_STAR_VR = A10;\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, A10_STAR_VR );\n        A10 = A10_STAR_VR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_LVAR1_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm/LVar2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_LVAR2_HPP\n#define ELEM_TWOSIDEDTRSM_LVAR2_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_GEMM_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRSM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nTwoSidedTrsmLVar2( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmLVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                         A20, A21, A22;\n    Matrix<F>\n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n\n    // Temporary products\n    Matrix<F> X11;\n    Matrix<F> Y10;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------//\n        // Y10 := L10 A00\n        Zeros( Y10, L10.Height(), A00.Width() );\n        Hemm( RIGHT, LOWER, F(1), A00, L10, F(0), Y10 );\n\n        // A10 := A10 - 1/2 Y10\n        Axpy( F(-1)/F(2), Y10, A10 );\n\n        // A11 := A11 - (A10 L10' + L10 A10')\n        Her2k( LOWER, NORMAL, F(-1), A10, L10, F(1), A11 );\n\n        // A11 := inv(L11) A11 inv(L11)'\n        TwoSidedTrsmLUnb( diag, A11, L11 );\n\n        // A21 := A21 - A20 L10'\n        Gemm( NORMAL, ADJOINT, F(-1), A20, L10, F(1), A21 );\n\n        // A21 := A21 inv(L11)'\n        Trsm( RIGHT, LOWER, ADJOINT, diag, F(1), L11, A21 );\n\n        // A10 := A10 - 1/2 Y10\n        Axpy( F(-1)/F(2), Y10, A10 );\n\n        // A10 := inv(L11) A10\n        Trsm( LEFT, LOWER, NORMAL, diag, F(1), L11, A10 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n// This routine has only partially been optimized. The ReduceScatter operations\n// need to be (conjugate-)transposed in order to play nice with cache.\ntemplate<typename F>\ninline void\nTwoSidedTrsmLVar2\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmLVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    const Grid& g = A.Grid();\n    \n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n\n    DistMatrix<F>\n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n\n    // Temporary distributions\n    DistMatrix<F,MR,  STAR> A10Adj_MR_STAR(g);\n    DistMatrix<F,STAR,VR  > A10_STAR_VR(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,MR,  STAR> F10Adj_MR_STAR(g);\n    DistMatrix<F,MR,  STAR> L10Adj_MR_STAR(g);\n    DistMatrix<F,VC,  STAR> L10Adj_VC_STAR(g);\n    DistMatrix<F,STAR,MC  > L10_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> X11_MC_STAR(g);\n    DistMatrix<F,MC,  STAR> X21_MC_STAR(g);\n    DistMatrix<F,MC,  STAR> Y10Adj_MC_STAR(g);\n    DistMatrix<F,MR,  MC  > Y10Adj_MR_MC(g);\n    DistMatrix<F> X11(g);\n    DistMatrix<F> Y10Adj(g);\n\n    Matrix<F> Y10Local;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        A10Adj_MR_STAR.AlignWith( L10 );\n        F10Adj_MR_STAR.AlignWith( A00 );\n        L10Adj_MR_STAR.AlignWith( A00 );\n        L10Adj_VC_STAR.AlignWith( A00 );\n        L10_STAR_MC.AlignWith( A00 );\n        X11.AlignWith( A11 );\n        X11_MC_STAR.AlignWith( L10 );\n        X21_MC_STAR.AlignWith( A20 );\n        Y10Adj_MC_STAR.AlignWith( A00 );\n        Y10Adj_MR_MC.AlignWith( A10 );\n        //--------------------------------------------------------------------//\n        // Y10 := L10 A00\n        L10.AdjointColAllGather( L10Adj_MR_STAR );\n        L10Adj_VC_STAR = L10Adj_MR_STAR;\n        L10Adj_VC_STAR.AdjointPartialColAllGather( L10_STAR_MC );\n        Zeros( Y10Adj_MC_STAR, A10.Width(), A10.Height() );\n        Zeros( F10Adj_MR_STAR, A10.Width(), A10.Height() );\n        LocalSymmetricAccumulateRL\n        ( ADJOINT,\n          F(1), A00, L10_STAR_MC, L10Adj_MR_STAR, \n          Y10Adj_MC_STAR, F10Adj_MR_STAR );\n        Y10Adj.RowSumScatterFrom( Y10Adj_MC_STAR );\n        Y10Adj_MR_MC = Y10Adj;\n        Y10Adj_MR_MC.RowSumScatterUpdate( F(1), F10Adj_MR_STAR );\n        Adjoint( Y10Adj_MR_MC.LockedMatrix(), Y10Local );\n\n        // X11 := A10 L10'\n        LocalGemm( NORMAL, NORMAL, F(1), A10, L10Adj_MR_STAR, X11_MC_STAR );\n\n        // A10 := A10 - Y10\n        Axpy( F(-1), Y10Local, A10.Matrix() );\n        A10.AdjointColAllGather( A10Adj_MR_STAR );\n        \n        // A11 := A11 - (X11 + L10 A10') = A11 - (A10 L10' + L10 A10')\n        LocalGemm\n        ( NORMAL, NORMAL, F(1), L10, A10Adj_MR_STAR, F(1), X11_MC_STAR );\n        X11.RowSumScatterFrom( X11_MC_STAR );\n        MakeTriangular( LOWER, X11 );\n        Axpy( F(-1), X11, A11 );\n\n        // A10 := inv(L11) A10\n        L11_STAR_STAR = L11;\n        A10_STAR_VR.AdjointPartialRowFilterFrom( A10Adj_MR_STAR );\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, A10_STAR_VR );\n        A10 = A10_STAR_VR;\n\n        // A11 := inv(L11) A11 inv(L11)'\n        A11_STAR_STAR = A11;\n        LocalTwoSidedTrsm( LOWER, diag, A11_STAR_STAR, L11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A21 := A21 - A20 L10'\n        LocalGemm( NORMAL, NORMAL, F(1), A20, L10Adj_MR_STAR, X21_MC_STAR );\n        A21.RowSumScatterUpdate( F(-1), X21_MC_STAR );\n\n        // A21 := A21 inv(L11)'\n        A21_VC_STAR =  A21;\n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, diag, F(1), L11_STAR_STAR, A21_VC_STAR );\n        A21 = A21_VC_STAR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_LVAR2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm/LVar3.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_LVAR3_HPP\n#define ELEM_TWOSIDEDTRSM_LVAR3_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_GEMM_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRSM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void\nTwoSidedTrsmLVar3( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmLVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        YTL, YTR,  Y00, Y01, Y02,\n        YBL, YBR,  Y10, Y11, Y12,\n                   Y20, Y21, Y22;\n    Matrix<F>\n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n\n    // We will use an entire extra matrix as temporary storage. If this is not\n    // acceptable, use TwoSidedTrsmLVar4 instead.\n    Matrix<F> Y;\n    Zeros( Y, A.Height(), A.Width() );\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    PartitionDownDiagonal\n    ( Y, YTL, YTR,\n         YBL, YBR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        RepartitionDownDiagonal\n        ( YTL, /**/ YTR,  Y00, /**/ Y01, Y02,\n         /*************/ /******************/\n               /**/       Y10, /**/ Y11, Y12,\n          YBL, /**/ YBR,  Y20, /**/ Y21, Y22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------//\n        // A10 := A10 - 1/2 Y10\n        Axpy( F(-1)/F(2), Y10, A10 );\n\n        // A11 := A11 - (A10 L10' + L10 A10')\n        Her2k( LOWER, NORMAL, F(-1), A10, L10, F(1), A11 );\n\n        // A11 := inv(L11) A11 inv(L11)'\n        TwoSidedTrsmLUnb( diag, A11, L11 );\n\n        // A21 := A21 - A20 L10'\n        Gemm( NORMAL, ADJOINT, F(-1), A20, L10, F(1), A21 );\n\n        // A21 := A21 inv(L11)'\n        Trsm( RIGHT, LOWER, ADJOINT, diag, F(1), L11, A21 );\n\n        // A10 := A10 - 1/2 Y10\n        Axpy( F(-1)/F(2), Y10, A10 );\n\n        // A10 := inv(L11) A10\n        Trsm( LEFT, LOWER, NORMAL, diag, F(1), L11, A10 );\n\n        // Y20 := Y20 + L21 A10\n        Gemm( NORMAL, NORMAL, F(1), L21, A10, F(1), Y20 );\n\n        // Y21 := L21 A11\n        Hemm( RIGHT, LOWER, F(1), A11, L21, F(0), Y21 );\n\n        // Y21 := Y21 + L20 A10'\n        Gemm( NORMAL, ADJOINT, F(1), L20, A10, F(1), Y21 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlidePartitionDownDiagonal\n        ( YTL, /**/ YTR,  Y00, Y01, /**/ Y02,\n               /**/       Y10, Y11, /**/ Y12,\n         /*************/ /******************/\n          YBL, /**/ YBR,  Y20, Y21, /**/ Y22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\ntemplate<typename F>\ninline void\nTwoSidedTrsmLVar3\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmLVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        YTL(g), YTR(g),  Y00(g), Y01(g), Y02(g),\n        YBL(g), YBR(g),  Y10(g), Y11(g), Y12(g),\n                         Y20(g), Y21(g), Y22(g);\n    DistMatrix<F>\n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,MR  > A11_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,STAR,VR  > A10_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > A10_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > L10_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > L10_STAR_MR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> X11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> X21_MC_STAR(g);\n    DistMatrix<F,MC,  STAR> Z21_MC_STAR(g);\n\n    // We will use an entire extra matrix as temporary storage. If this is not\n    // acceptable, use TwoSidedTrsmLVar4 instead.\n    DistMatrix<F> Y(g);\n    Y.AlignWith( A );\n    Zeros( Y, A.Height(), A.Width() );\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    PartitionDownDiagonal\n    ( Y, YTL, YTR,\n         YBL, YBR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        RepartitionDownDiagonal\n        ( YTL, /**/ YTR,  Y00, /**/ Y01, Y02,\n         /*************/ /******************/\n               /**/       Y10, /**/ Y11, Y12,\n          YBL, /**/ YBR,  Y20, /**/ Y21, Y22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        A11_STAR_MR.AlignWith( Y21 );\n        A21_VC_STAR.AlignWith( A21 );\n        A10_STAR_VR.AlignWith( A10 );\n        A10_STAR_MR.AlignWith( A10 );\n        L10_STAR_VR.AlignWith( A10 );\n        L10_STAR_MR.AlignWith( A10 );\n        L21_MC_STAR.AlignWith( Y21 );\n        X21_MC_STAR.AlignWith( A20 );\n        Z21_MC_STAR.AlignWith( L20 );\n        //--------------------------------------------------------------------//\n        // A10 := A10 - 1/2 Y10\n        Axpy( F(-1)/F(2), Y10, A10 );\n\n        // A11 := A11 - (A10 L10' + L10 A10')\n        A10_STAR_VR = A10;\n        L10_STAR_VR = L10;\n        Zeros( X11_STAR_STAR, A11.Height(), A11.Width() );\n        Her2k\n        ( LOWER, NORMAL, \n          F(1), A10_STAR_VR.Matrix(), L10_STAR_VR.Matrix(),\n          F(0), X11_STAR_STAR.Matrix() );\n        MakeTriangular( LOWER, X11_STAR_STAR );\n        A11.SumScatterUpdate( F(-1), X11_STAR_STAR );\n\n        // A11 := inv(L11) A11 inv(L11)'\n        A11_STAR_STAR = A11;\n        L11_STAR_STAR = L11;\n        LocalTwoSidedTrsm( LOWER, diag, A11_STAR_STAR, L11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A21 := A21 - A20 L10'\n        L10_STAR_MR = L10_STAR_VR;\n        LocalGemm( NORMAL, ADJOINT, F(1), A20, L10_STAR_MR, X21_MC_STAR );\n        A21.RowSumScatterUpdate( F(-1), X21_MC_STAR );\n\n        // A21 := A21 inv(L11)'\n        A21_VC_STAR = A21;\n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, diag, F(1), L11_STAR_STAR, A21_VC_STAR );\n        A21 = A21_VC_STAR;\n\n        // A10 := A10 - 1/2 Y10\n        Axpy( F(-1)/F(2), Y10, A10 );\n\n        // A10 := inv(L11) A10\n        A10_STAR_VR = A10;\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, A10_STAR_VR );\n\n        // Y20 := Y20 + L21 A10\n        A10_STAR_MR = A10_STAR_VR;\n        A10 = A10_STAR_MR;\n        L21_MC_STAR = L21;\n        LocalGemm( NORMAL, NORMAL, F(1), L21_MC_STAR, A10_STAR_MR, F(1), Y20 );\n\n        // Y21 := L21 A11\n        MakeHermitian( LOWER, A11_STAR_STAR );\n        A11_STAR_MR = A11_STAR_STAR;\n        LocalGemm( NORMAL, NORMAL, F(1), L21_MC_STAR, A11_STAR_MR, F(0), Y21 );\n\n        // Y21 := Y21 + L20 A10'\n        LocalGemm( NORMAL, ADJOINT, F(1), L20, A10_STAR_MR, Z21_MC_STAR );\n        Y21.RowSumScatterUpdate( F(1), Z21_MC_STAR );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlidePartitionDownDiagonal\n        ( YTL, /**/ YTR,  Y00, Y01, /**/ Y02,\n               /**/       Y10, Y11, /**/ Y12,\n         /*************/ /******************/\n          YBL, /**/ YBR,  Y20, Y21, /**/ Y22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_LVAR3_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm/LVar4.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_LVAR4_HPP\n#define ELEM_TWOSIDEDTRSM_LVAR4_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_GEMM_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRSM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmLVar4( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmLVar4\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n\n    // Temporary products\n    Matrix<F> Y21;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------//\n        // A10 := inv(L11) A10\n        Trsm( LEFT, LOWER, NORMAL, diag, F(1), L11, A10 );\n\n        // A11 := inv(L11) A11 inv(L11)'\n        TwoSidedTrsmLUnb( diag, A11, L11 );\n\n        // A20 := A20 - L21 A10\n        Gemm( NORMAL, NORMAL, F(-1), L21, A10, F(1), A20 );\n\n        // Y21 := L21 A11\n        Zeros( Y21, A21.Height(), A21.Width() );\n        Hemm( RIGHT, LOWER, F(1), A11, L21, F(0), Y21 );\n\n        // A21 := A21 inv(L11)'\n        Trsm( RIGHT, LOWER, ADJOINT, diag, F(1), L11, A21 );\n\n        // A21 := A21 - 1/2 Y21\n        Axpy( F(-1)/F(2), Y21, A21 );\n\n        // A22 := A22 - (L21 A21' + A21 L21')\n        Her2k( LOWER, NORMAL, F(-1), L21, A21, F(1), A22 );\n\n        // A21 := A21 - 1/2 Y21\n        Axpy( F(-1)/F(2), Y21, A21 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmLVar4\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmLVar4\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,MR  > A10_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > A10_STAR_VR(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> A21_VR_STAR(g);\n    DistMatrix<F,STAR,MC  > A21Trans_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A21Adj_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> L21_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> L21_VR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,STAR,MR  > L21Adj_STAR_MR(g);\n    DistMatrix<F,VC,  STAR> Y21_VC_STAR(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        A10_STAR_MR.AlignWith( A20 );\n        A10_STAR_VR.AlignWith( A20 );\n        A21_VC_STAR.AlignWith( A22 );\n        A21_VR_STAR.AlignWith( A22 );\n        A21Trans_STAR_MC.AlignWith( A22 );\n        A21Adj_STAR_MR.AlignWith( A22 );\n        L21_VC_STAR.AlignWith( A22 );\n        L21_VR_STAR.AlignWith( A22 );\n        L21_MC_STAR.AlignWith( A22 );\n        L21Adj_STAR_MR.AlignWith( A22 );\n        Y21_VC_STAR.AlignWith( A22 );\n        //--------------------------------------------------------------------//\n        // A10 := inv(L11) A10\n        L11_STAR_STAR = L11;\n        A10_STAR_VR = A10;\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, A10_STAR_VR );\n\n        // A11 := inv(L11) A11 inv(L11)'\n        A11_STAR_STAR = A11; \n        LocalTwoSidedTrsm( LOWER, diag, A11_STAR_STAR, L11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A20 := A20 - L21 A10\n        L21_MC_STAR = L21;\n        A10_STAR_MR = A10_STAR_VR;\n        LocalGemm( NORMAL, NORMAL, F(-1), L21_MC_STAR, A10_STAR_MR, F(1), A20 );\n        A10 = A10_STAR_MR; // delayed write from  A10 := inv(L11) A10\n\n        // Y21 := L21 A11\n        L21_VC_STAR = L21_MC_STAR;\n        Zeros( Y21_VC_STAR, A21.Height(), A21.Width() );\n        Hemm\n        ( RIGHT, LOWER, \n          F(1), A11_STAR_STAR.Matrix(), L21_VC_STAR.Matrix(), \n          F(0), Y21_VC_STAR.Matrix() );\n\n        // A21 := A21 inv(L11)'\n        A21_VC_STAR = A21;\n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, diag, F(1), L11_STAR_STAR, A21_VC_STAR );\n\n        // A21 := A21 - 1/2 Y21\n        Axpy( F(-1)/F(2), Y21_VC_STAR, A21_VC_STAR );\n\n        // A22 := A22 - (L21 A21' + A21 L21')\n        A21_VC_STAR.TransposePartialColAllGather( A21Trans_STAR_MC );\n        A21_VR_STAR = A21_VC_STAR;\n        L21_VR_STAR = L21_VC_STAR;\n        A21_VR_STAR.AdjointPartialColAllGather( A21Adj_STAR_MR );\n        L21_VR_STAR.AdjointPartialColAllGather( L21Adj_STAR_MR );\n        LocalTrr2k\n        ( LOWER, TRANSPOSE,\n          F(-1), L21_MC_STAR,      A21Adj_STAR_MR, \n                 A21Trans_STAR_MC, L21Adj_STAR_MR,\n          F(1),  A22 );\n\n        // A21 := A21 - 1/2 Y21\n        Axpy( F(-1)/F(2), Y21_VC_STAR, A21_VC_STAR );\n        A21 = A21_VC_STAR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_LVAR4_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm/LVar5.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_LVAR5_HPP\n#define ELEM_TWOSIDEDTRSM_LVAR5_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRSM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmLVar5( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmLVar5\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        LTL, LTR,  L00, L01, L02,\n        LBL, LBR,  L10, L11, L12,\n                   L20, L21, L22;\n\n    // Temporary products\n    Matrix<F> Y21;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        //--------------------------------------------------------------------//\n        // A11 := inv(L11) A11 inv(L11)'\n        TwoSidedTrsmLUnb( diag, A11, L11 );\n\n        // Y21 := L21 A11\n        Zeros( Y21, A21.Height(), A21.Width() );\n        Hemm( RIGHT, LOWER, F(1), A11, L21, F(0), Y21 );\n\n        // A21 := A21 inv(L11)'\n        Trsm( RIGHT, LOWER, ADJOINT, diag, F(1), L11, A21 );\n\n        // A21 := A21 - 1/2 Y21\n        Axpy( F(-1)/F(2), Y21, A21 );\n\n        // A22 := A22 - (L21 A21' + A21 L21')\n        Her2k( LOWER, NORMAL, F(-1), L21, A21, F(1), A22 );\n\n        // A21 := A21 - 1/2 Y21\n        Axpy( F(-1)/F(2), Y21, A21 );\n\n        // A21 := inv(L22) A21\n        Trsm( LEFT, LOWER, NORMAL, diag, F(1), L22, A21 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmLVar5\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmLVar5\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != L.Height() )\n            LogicError(\"A and L must be the same size\");\n    )\n    const Grid& g = A.Grid();\n    \n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        LTL(g), LTR(g),  L00(g), L01(g), L02(g),\n        LBL(g), LBR(g),  L10(g), L11(g), L12(g),\n                         L20(g), L21(g), L22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> A21_MC_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> A21_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > A21Adj_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,VC,  STAR> L21_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> L21_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > L21Adj_STAR_MR(g);\n    DistMatrix<F,VC,  STAR> Y21_VC_STAR(g);\n    DistMatrix<F> Y21(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( L, LTL, LTR,\n         LBL, LBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, /**/ L01, L02,\n         /*************/ /******************/\n               /**/       L10, /**/ L11, L12,\n          LBL, /**/ LBR,  L20, /**/ L21, L22 );\n\n        A21_MC_STAR.AlignWith( A22 );\n        A21_VC_STAR.AlignWith( A22 );\n        A21_VR_STAR.AlignWith( A22 );\n        A21Adj_STAR_MR.AlignWith( A22 );\n        L21_MC_STAR.AlignWith( A22 );\n        L21_VC_STAR.AlignWith( A22 );\n        L21_VR_STAR.AlignWith( A22 );\n        L21Adj_STAR_MR.AlignWith( A22 );\n        Y21.AlignWith( A21 );\n        Y21_VC_STAR.AlignWith( A22 );\n        //--------------------------------------------------------------------//\n        // A11 := inv(L11) A11 inv(L11)'\n        L11_STAR_STAR = L11;\n        A11_STAR_STAR = A11;\n        LocalTwoSidedTrsm( LOWER, diag, A11_STAR_STAR, L11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // Y21 := L21 A11\n        L21_VC_STAR = L21;\n        Zeros( Y21_VC_STAR, A21.Height(), A21.Width() );\n        Hemm\n        ( RIGHT, LOWER, \n          F(1), A11_STAR_STAR.Matrix(), L21_VC_STAR.Matrix(), \n          F(0), Y21_VC_STAR.Matrix() );\n        Y21 = Y21_VC_STAR;\n\n        // A21 := A21 inv(L11)'\n        A21_VC_STAR = A21;\n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, diag, F(1), L11_STAR_STAR, A21_VC_STAR );\n        A21 = A21_VC_STAR;\n\n        // A21 := A21 - 1/2 Y21\n        Axpy( F(-1)/F(2), Y21, A21 );\n\n        // A22 := A22 - (L21 A21' + A21 L21')\n        A21_MC_STAR = A21;\n        L21_MC_STAR = L21;\n        A21_VC_STAR = A21_MC_STAR;\n        A21_VR_STAR = A21_VC_STAR;\n        L21_VR_STAR = L21_VC_STAR;\n        A21_VR_STAR.AdjointPartialColAllGather( A21Adj_STAR_MR );\n        L21_VR_STAR.AdjointPartialColAllGather( L21Adj_STAR_MR );\n        LocalTrr2k\n        ( LOWER,\n          F(-1), L21_MC_STAR, A21Adj_STAR_MR,\n                 A21_MC_STAR, L21Adj_STAR_MR, F(1), A22 );\n\n        // A21 := A21 - 1/2 Y21\n        Axpy( F(-1)/F(2), Y21, A21 );\n\n        // A21 := inv(L22) A21\n        //\n        // This is the bottleneck because A21 only has blocksize columns\n        Trsm( LEFT, LOWER, NORMAL, diag, F(1), L22, A21 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( LTL, /**/ LTR,  L00, L01, /**/ L02,\n               /**/       L10, L11, /**/ L12,\n         /**********************************/\n          LBL, /**/ LBR,  L20, L21, /**/ L22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_LVAR5_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm/UVar1.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_UVAR1_HPP\n#define ELEM_TWOSIDEDTRSM_UVAR1_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRSM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmUVar1( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmUVar1\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        UTL, UTR,  U00, U01, U02,\n        UBL, UBR,  U10, U11, U12,\n                   U20, U21, U22;\n\n    // Temporary products\n    Matrix<F> Y01;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------//\n        // Y01 := A00 U01\n        Zeros( Y01, A01.Height(), A01.Width() );\n        Hemm( LEFT, UPPER, F(1), A00, U01, F(0), Y01 );\n\n        // A01 := inv(U00)' A01\n        Trsm( LEFT, UPPER, ADJOINT, diag, F(1), U00, A01 );\n\n        // A01 := A01 - 1/2 Y01\n        Axpy( F(-1)/F(2), Y01, A01 );\n\n        // A11 := A11 - (U01' A01 + A01' U01)\n        Her2k( UPPER, ADJOINT, F(-1), U01, A01, F(1), A11 );\n\n        // A11 := inv(U11)' A11 inv(U11)\n        TwoSidedTrsmUUnb( diag, A11, U11 );\n\n        // A01 := A01 - 1/2 Y01\n        Axpy( F(-1)/F(2), Y01, A01 );\n\n        // A01 := A01 inv(U11)\n        Trsm( RIGHT, UPPER, NORMAL, diag, F(1), U11, A01 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmUVar1\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmUVar1\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        UTL(g), UTR(g),  U00(g), U01(g), U02(g),\n        UBL(g), UBR(g),  U10(g), U11(g), U12(g),\n                         U20(g), U21(g), U22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A01_VC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,VC,  STAR> U01_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> U01_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > U01Adj_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> X11_STAR_STAR(g);\n    DistMatrix<F,MR,  MC  > Z01_MR_MC(g);\n    DistMatrix<F,MC,  STAR> Z01_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> Z01_MR_STAR(g);\n    DistMatrix<F> Y01(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        A01_VC_STAR.AlignWith( A01 );\n        U01_MC_STAR.AlignWith( A00 );\n        U01_VR_STAR.AlignWith( A00 );\n        U01_VC_STAR.AlignWith( A00 );\n        U01Adj_STAR_MR.AlignWith( A00 );\n        Y01.AlignWith( A01 );\n        Z01_MR_MC.AlignWith( A01 );\n        Z01_MC_STAR.AlignWith( A00 );\n        Z01_MR_STAR.AlignWith( A00 );\n        //--------------------------------------------------------------------//\n        // Y01 := A00 U01\n        U01_MC_STAR = U01;\n        U01_VR_STAR = U01_MC_STAR;\n        U01_VR_STAR.AdjointPartialColAllGather( U01Adj_STAR_MR );\n        Zeros( Z01_MC_STAR, A01.Height(), A01.Width() );\n        Zeros( Z01_MR_STAR, A01.Height(), A01.Width() );\n        LocalSymmetricAccumulateLU\n        ( ADJOINT, \n          F(1), A00, U01_MC_STAR, U01Adj_STAR_MR, Z01_MC_STAR, Z01_MR_STAR );\n        Z01_MR_MC.RowSumScatterFrom( Z01_MR_STAR );\n        Y01 = Z01_MR_MC;\n        Y01.RowSumScatterUpdate( F(1), Z01_MC_STAR );\n\n        // A01 := inv(U00)' A01\n        //\n        // This is the bottleneck because A01 only has blocksize columns\n        Trsm( LEFT, UPPER, ADJOINT, diag, F(1), U00, A01 );\n\n        // A01 := A01 - 1/2 Y01\n        Axpy( F(-1)/F(2), Y01, A01 );\n\n        // A11 := A11 - (U01' A01 + A01' U01)\n        A01_VC_STAR = A01;\n        U01_VC_STAR = U01_MC_STAR;\n        Zeros( X11_STAR_STAR, A11.Height(), A11.Width() );\n        Her2k\n        ( UPPER, ADJOINT,\n          F(-1), A01_VC_STAR.Matrix(), U01_VC_STAR.Matrix(),\n          F(0), X11_STAR_STAR.Matrix() );\n        A11.SumScatterUpdate( F(1), X11_STAR_STAR );\n\n        // A11 := inv(U11)' A11 inv(U11)\n        A11_STAR_STAR = A11;\n        U11_STAR_STAR = U11;\n        LocalTwoSidedTrsm( UPPER, diag, A11_STAR_STAR, U11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A01 := A01 - 1/2 Y01\n        Axpy( F(-1)/F(2), Y01, A01 );\n\n        // A01 := A01 inv(U11)\n        A01_VC_STAR = A01;\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, diag, F(1), U11_STAR_STAR, A01_VC_STAR );\n        A01 = A01_VC_STAR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_UVAR1_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm/UVar2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_UVAR2_HPP\n#define ELEM_TWOSIDEDTRSM_UVAR2_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_GEMM_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRSM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmUVar2( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmUVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        UTL, UTR,  U00, U01, U02,\n        UBL, UBR,  U10, U11, U12,\n                   U20, U21, U22;\n\n    // Temporary products\n    Matrix<F> Y01;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------//\n        // Y01 := A00 U01\n        Zeros( Y01, A01.Height(), A01.Width() );\n        Hemm( LEFT, UPPER, F(1), A00, U01, F(0), Y01 );\n\n        // A01 := A01 - 1/2 Y01\n        Axpy( F(-1)/F(2), Y01, A01 );\n        \n        // A11 := A11 - (U01' A01 + A01' U01)\n        Her2k( UPPER, ADJOINT, F(-1), U01, A01, F(1), A11 );\n\n        // A11 := inv(U11)' A11 inv(U11)\n        TwoSidedTrsmUUnb( diag, A11, U11 );\n\n        // A12 := A12 - A02' U01\n        Gemm( ADJOINT, NORMAL, F(-1), A02, U01, F(1), A12 );\n\n        // A12 := inv(U11)' A12\n        Trsm( LEFT, UPPER, ADJOINT, diag, F(1), U11, A12 );\n        \n        // A01 := A01 - 1/2 Y01\n        Axpy( F(-1)/F(2), Y01, A01 );\n\n        // A01 := A01 inv(U11)\n        Trsm( RIGHT, UPPER, NORMAL, diag, F(1), U11, A01 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n// This routine has only partially been optimized. The ReduceScatter operations\n// need to be (conjugate-)transposed in order to play nice with cache.\ntemplate<typename F> \ninline void\nTwoSidedTrsmUVar2\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmUVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        UTL(g), UTR(g),  U00(g), U01(g), U02(g),\n        UBL(g), UBR(g),  U10(g), U11(g), U12(g),\n                         U20(g), U21(g), U22(g);\n\n    // Temporary distributions\n    DistMatrix<F,MC,  STAR> A01_MC_STAR(g);\n    DistMatrix<F,VC,  STAR> A01_VC_STAR(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,MC,  STAR> F01_MC_STAR(g);\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,VR,  STAR> U01_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > U01Adj_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > X11_STAR_MR(g);\n    DistMatrix<F,MR,  STAR> X12Adj_MR_STAR(g);\n    DistMatrix<F,MR,  MC  > X12Adj_MR_MC(g);\n    DistMatrix<F,MR,  MC  > Y01_MR_MC(g);\n    DistMatrix<F,MR,  STAR> Y01_MR_STAR(g);\n    DistMatrix<F> X11(g);\n    DistMatrix<F> Y01(g);\n\n    Matrix<F> X12Local;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        A01_MC_STAR.AlignWith( U01 );\n        Y01.AlignWith( A01 );\n        Y01_MR_STAR.AlignWith( A00 );\n        U01_MC_STAR.AlignWith( A00 );\n        U01_VR_STAR.AlignWith( A00 );\n        U01Adj_STAR_MR.AlignWith( A00 );\n        X11_STAR_MR.AlignWith( U01 );\n        X11.AlignWith( A11 );\n        X12Adj_MR_STAR.AlignWith( A02 );\n        X12Adj_MR_MC.AlignWith( A12 );\n        F01_MC_STAR.AlignWith( A00 );\n        //--------------------------------------------------------------------//\n        // Y01 := A00 U01\n        U01_MC_STAR = U01;\n        U01_VR_STAR = U01_MC_STAR;\n        U01_VR_STAR.AdjointPartialColAllGather( U01Adj_STAR_MR );\n        Zeros( Y01_MR_STAR, A01.Height(), A01.Width() );\n        Zeros( F01_MC_STAR, A01.Height(), A01.Width() );\n        LocalSymmetricAccumulateLU\n        ( ADJOINT, \n          F(1), A00, U01_MC_STAR, U01Adj_STAR_MR, F01_MC_STAR, Y01_MR_STAR );\n        Y01_MR_MC.RowSumScatterFrom( Y01_MR_STAR );\n        Y01 = Y01_MR_MC;\n        Y01.RowSumScatterUpdate( F(1), F01_MC_STAR );\n\n        // X11 := U01' A01\n        LocalGemm( ADJOINT, NORMAL, F(1), U01_MC_STAR, A01, X11_STAR_MR );\n\n        // A01 := A01 - Y01\n        Axpy( F(-1), Y01, A01 );\n        A01_MC_STAR = A01;\n        \n        // A11 := A11 - triu(X11 + A01' U01) = A11 - (U01 A01 + A01' U01)\n        LocalGemm( ADJOINT, NORMAL, F(1), A01_MC_STAR, U01, F(1), X11_STAR_MR );\n        X11.ColSumScatterFrom( X11_STAR_MR );\n        MakeTriangular( UPPER, X11 );\n        Axpy( F(-1), X11, A11 );\n\n        // A01 := A01 inv(U11)\n        U11_STAR_STAR = U11;\n        A01_VC_STAR = A01_MC_STAR;\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, diag, F(1), U11_STAR_STAR, A01_VC_STAR );\n        A01 = A01_VC_STAR;\n\n        // A11 := inv(U11)' A11 inv(U11)\n        A11_STAR_STAR = A11;\n        LocalTwoSidedTrsm( UPPER, diag, A11_STAR_STAR, U11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A12 := A12 - A02' U01\n        LocalGemm( ADJOINT, NORMAL, F(1), A02, U01_MC_STAR, X12Adj_MR_STAR );\n        X12Adj_MR_MC.RowSumScatterFrom( X12Adj_MR_STAR );\n        Adjoint( X12Adj_MR_MC.LockedMatrix(), X12Local );\n        Axpy( F(-1), X12Local, A12.Matrix() );\n\n        // A12 := inv(U11)' A12\n        A12_STAR_VR = A12;\n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, diag, F(1), U11_STAR_STAR, A12_STAR_VR );\n        A12 = A12_STAR_VR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_UVAR2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm/UVar3.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_UVAR3_HPP\n#define ELEM_TWOSIDEDTRSM_UVAR3_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_GEMM_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRSM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmUVar3( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmUVar4\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        YTL, YTR,  Y00, Y01, Y02,\n        YBL, YBR,  Y10, Y11, Y12,\n                   Y20, Y21, Y22;\n    Matrix<F>\n        UTL, UTR,  U00, U01, U02,\n        UBL, UBR,  U10, U11, U12,\n                   U20, U21, U22;\n\n    // We will use an entire extra matrix as temporary storage. If this is not\n    // acceptable, use TwoSidedTrsmUVar4 instead.\n    Matrix<F> Y;\n    Zeros( Y, A.Height(), A.Width() );\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    PartitionDownDiagonal\n    ( Y, YTL, YTR,\n         YBL, YBR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        RepartitionDownDiagonal\n        ( YTL, /**/ YTR,  Y00, /**/ Y01, Y02,\n         /*************/ /******************/\n               /**/       Y10, /**/ Y11, Y12,\n          YBL, /**/ YBR,  Y20, /**/ Y21, Y22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------//\n        // A01 := A01 - 1/2 Y01\n        Axpy( F(-1)/F(2), Y01, A01 );\n\n        // A11 := A11 - (A01' U01 + U01' A01)\n        Her2k( UPPER, ADJOINT, F(-1), A01, U01, F(1), A11 );\n\n        // A11 := inv(U11)' A11 inv(U11)\n        TwoSidedTrsmUUnb( diag, A11, U11 );\n\n        // A12 := A12 - U01' A02\n        Gemm( ADJOINT, NORMAL, F(-1), U01, A02, F(1), A12 );\n\n        // A12 := inv(U11)' A12\n        Trsm( LEFT, UPPER, ADJOINT, diag, F(1), U11, A12 );\n\n        // A01 := A01 - 1/2 Y01\n        Axpy( F(-1)/F(2), Y01, A01 );\n\n        // A01 := A01 inv(U11)\n        Trsm( RIGHT, UPPER, NORMAL, diag, F(1), U11, A01 );\n\n        // Y02 := Y02 + A01 U12\n        Gemm( NORMAL, NORMAL, F(1), A01, U12, F(1), Y02 );\n\n        // Y12 := Y12 + A11 U12\n        Hemm( LEFT, UPPER, F(1), A11, U12, F(1), Y12 );\n\n        // Y12 := Y12 + A01' U02\n        Gemm( ADJOINT, NORMAL, F(1), A01, U02, F(1), Y12 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlidePartitionDownDiagonal\n        ( YTL, /**/ YTR,  Y00, Y01, /**/ Y02,\n               /**/       Y10, Y11, /**/ Y12,\n         /*************/ /******************/\n          YBL, /**/ YBR,  Y20, Y21, /**/ Y22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /**********************************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmUVar3\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmUVar4\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        YTL(g), YTR(g),  Y00(g), Y01(g), Y02(g),\n        YBL(g), YBR(g),  Y10(g), Y11(g), Y12(g),\n                         Y20(g), Y21(g), Y22(g);\n    DistMatrix<F>\n        UTL(g), UTR(g),  U00(g), U01(g), U02(g),\n        UBL(g), UBR(g),  U10(g), U11(g), U12(g),\n                         U20(g), U21(g), U22(g);\n\n    // Temporary distributions\n    DistMatrix<F,MC,  STAR> A11_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,VC,  STAR> A01_VC_STAR(g);\n    DistMatrix<F,MC,  STAR> A01_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> U01_VC_STAR(g);\n    DistMatrix<F,MC,  STAR> U01_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> U12Adj_MR_STAR(g);\n    DistMatrix<F,STAR,STAR> X11_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > X12_STAR_MR(g);\n    DistMatrix<F,STAR,MR  > Z12_STAR_MR(g);\n\n    // We will use an entire extra matrix as temporary storage. If this is not\n    // acceptable, use TwoSidedTrsmUVar4 instead.\n    DistMatrix<F> Y(g);\n    Y.AlignWith( A );\n    Zeros( Y, A.Height(), A.Width() );\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    PartitionDownDiagonal\n    ( Y, YTL, YTR,\n         YBL, YBR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        RepartitionDownDiagonal\n        ( YTL, /**/ YTR,  Y00, /**/ Y01, Y02,\n         /*************/ /******************/\n               /**/       Y10, /**/ Y11, Y12,\n          YBL, /**/ YBR,  Y20, /**/ Y21, Y22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        A11_MC_STAR.AlignWith( Y12 );\n        A12_STAR_VR.AlignWith( A12 );\n        A01_VC_STAR.AlignWith( A01 );\n        A01_MC_STAR.AlignWith( A01 );\n        U01_VC_STAR.AlignWith( A01 );\n        U01_MC_STAR.AlignWith( A01 );\n        U12Adj_MR_STAR.AlignWith( Y12 );\n        X12_STAR_MR.AlignWith( A02 );\n        Z12_STAR_MR.AlignWith( U02 );\n        //--------------------------------------------------------------------//\n        // A01 := A01 - 1/2 Y01\n        Axpy( F(-1)/F(2), Y01, A01 );\n\n        // A11 := A11 - (A01' U01 + U01' A01)\n        A01_VC_STAR = A01;\n        U01_VC_STAR = U01;\n        Zeros( X11_STAR_STAR, A11.Height(), A11.Width() );\n        Her2k\n        ( UPPER, ADJOINT, \n          F(1), A01_VC_STAR.Matrix(), U01_VC_STAR.Matrix(),\n          F(0), X11_STAR_STAR.Matrix() );\n        MakeTriangular( UPPER, X11_STAR_STAR );\n        A11.SumScatterUpdate( F(-1), X11_STAR_STAR );\n\n        // A11 := inv(U11)' A11 inv(U11)\n        A11_STAR_STAR = A11;\n        U11_STAR_STAR = U11;\n        LocalTwoSidedTrsm( UPPER, diag, A11_STAR_STAR, U11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A12 := A12 - U01' A02\n        U01_MC_STAR = U01;\n        LocalGemm( ADJOINT, NORMAL, F(1), U01_MC_STAR, A02, X12_STAR_MR );\n        A12.ColSumScatterUpdate( F(-1), X12_STAR_MR );\n\n        // A12 := inv(U11)' A12\n        A12_STAR_VR = A12;\n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, diag, F(1), U11_STAR_STAR, A12_STAR_VR );\n        A12 = A12_STAR_VR;\n\n        // A01 := A01 - 1/2 Y01\n        Axpy( F(-1)/F(2), Y01, A01 );\n\n        // A01 := A01 inv(U11)\n        A01_VC_STAR = A01;\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, diag, F(1), U11_STAR_STAR, A01_VC_STAR );\n        A01 = A01_VC_STAR;\n\n        // Y02 := Y02 + A01 U12\n        A01_MC_STAR = A01;\n        U12.AdjointColAllGather( U12Adj_MR_STAR );\n        LocalGemm\n        ( NORMAL, ADJOINT, F(1), A01_MC_STAR, U12Adj_MR_STAR, F(1), Y02 );\n\n        // Y12 := Y12 + A11 U12\n        MakeHermitian( UPPER, A11_STAR_STAR );\n        A11_MC_STAR = A11_STAR_STAR;\n        LocalGemm\n        ( NORMAL, ADJOINT, F(1), A11_MC_STAR, U12Adj_MR_STAR, F(0), Y12 );\n\n        // Y12 := Y12 + A01' U02\n        LocalGemm( ADJOINT, NORMAL, F(1), A01_MC_STAR, U02, Z12_STAR_MR );\n        Y12.ColSumScatterUpdate( F(1), Z12_STAR_MR );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlidePartitionDownDiagonal\n        ( YTL, /**/ YTR,  Y00, Y01, /**/ Y02,\n               /**/       Y10, Y11, /**/ Y12,\n         /*************/ /******************/\n          YBL, /**/ YBR,  Y20, Y21, /**/ Y22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /**********************************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_UVAR3_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm/UVar4.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_UVAR4_HPP\n#define ELEM_TWOSIDEDTRSM_UVAR4_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_GEMM_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRSM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmUVar4( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmUVar4\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        UTL, UTR,  U00, U01, U02,\n        UBL, UBR,  U10, U11, U12,\n                   U20, U21, U22;\n\n    // Temporary products\n    Matrix<F> Y12;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------//\n        // A01 := A01 inv(U11)\n        Trsm( RIGHT, UPPER, NORMAL, diag, F(1), U11, A01 );\n\n        // A11 := inv(U11)' A11 inv(U11)\n        TwoSidedTrsmUUnb( diag, A11, U11 );\n\n        // A02 := A02 - A01 U12\n        Gemm( NORMAL, NORMAL, F(-1), A01, U12, F(1), A02 );\n\n        // Y12 := A11 U12\n        Zeros( Y12, A12.Height(), A12.Width() );\n        Hemm( LEFT, UPPER, F(1), A11, U12, F(0), Y12 );\n\n        // A12 := inv(U11)' A12\n        Trsm( LEFT, UPPER, ADJOINT, diag, F(1), U11, A12 );\n\n        // A12 := A12 - 1/2 Y12\n        Axpy( F(-1)/F(2), Y12, A12 );\n\n        // A22 := A22 - (A12' U12 + U12' A12)\n        Her2k( UPPER, ADJOINT, F(-1), A12, U12, F(1), A22 );\n\n        // A12 := A12 - 1/2 Y12\n        Axpy( F(-1)/F(2), Y12, A12 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /**********************************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmUVar4\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmUVar4\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        UTL(g), UTR(g),  U00(g), U01(g), U02(g),\n        UBL(g), UBR(g),  U10(g), U11(g), U12(g),\n                         U20(g), U21(g), U22(g);\n\n    // Temporary distributions\n    DistMatrix<F,VC,  STAR> A01_VC_STAR(g);\n    DistMatrix<F,STAR,MC  > A01Trans_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,STAR,VC  > A12_STAR_VC(g);\n    DistMatrix<F,STAR,MC  > A12_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A12_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,MR,  STAR> U12Trans_MR_STAR(g);\n    DistMatrix<F,VR,  STAR> U12Trans_VR_STAR(g);\n    DistMatrix<F,STAR,VR  > U12_STAR_VR(g);\n    DistMatrix<F,STAR,VC  > U12_STAR_VC(g);\n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,STAR,VR  > Y12_STAR_VR(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        A01_VC_STAR.AlignWith( A02 );\n        A01Trans_STAR_MC.AlignWith( A02 );\n        A12_STAR_VR.AlignWith( A22 );\n        A12_STAR_VC.AlignWith( A22 );\n        A12_STAR_MC.AlignWith( A22 );\n        A12_STAR_MR.AlignWith( A22 );\n        U12Trans_MR_STAR.AlignWith( A02 );\n        U12Trans_VR_STAR.AlignWith( A02 );\n        U12_STAR_VR.AlignWith( A02 );\n        U12_STAR_VC.AlignWith( A22 );\n        U12_STAR_MC.AlignWith( A22 );\n        Y12_STAR_VR.AlignWith( A12 );\n        //--------------------------------------------------------------------//\n        // A01 := A01 inv(U11)\n        A01_VC_STAR = A01;\n        U11_STAR_STAR = U11;\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, diag, F(1), U11_STAR_STAR, A01_VC_STAR );\n        A01 = A01_VC_STAR;\n\n        // A11 := inv(U11)' A11 inv(U11)\n        A11_STAR_STAR = A11;\n        LocalTwoSidedTrsm( UPPER, diag, A11_STAR_STAR, U11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // A02 := A02 - A01 U12\n        A01_VC_STAR.TransposePartialColAllGather( A01Trans_STAR_MC );\n        U12.TransposeColAllGather( U12Trans_MR_STAR );\n        LocalGemm\n        ( TRANSPOSE, TRANSPOSE, \n          F(-1), A01Trans_STAR_MC, U12Trans_MR_STAR, F(1), A02 );\n\n        // Y12 := A11 U12\n        U12Trans_VR_STAR = U12Trans_MR_STAR;\n        Zeros( U12_STAR_VR, A12.Height(), A12.Width() );\n        Transpose( U12Trans_VR_STAR.Matrix(), U12_STAR_VR.Matrix() );\n        Zeros( Y12_STAR_VR, A12.Height(), A12.Width() );\n        Hemm\n        ( LEFT, UPPER, \n          F(1), A11_STAR_STAR.Matrix(), U12_STAR_VR.Matrix(), \n          F(0), Y12_STAR_VR.Matrix() );\n\n        // A12 := inv(U11)' A12\n        A12_STAR_VR = A12;\n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, diag, F(1), U11_STAR_STAR, A12_STAR_VR );\n\n        // A12 := A12 - 1/2 Y12\n        Axpy( F(-1)/F(2), Y12_STAR_VR, A12_STAR_VR );\n\n        // A22 := A22 - (A12' U12 + U12' A12)\n        A12_STAR_MR = A12_STAR_VR;\n        A12_STAR_VC = A12_STAR_VR;\n        U12_STAR_VC = U12_STAR_VR;\n        A12_STAR_MC = A12_STAR_VC;\n        U12_STAR_MC = U12_STAR_VC;\n        LocalTrr2k\n        ( UPPER, ADJOINT, TRANSPOSE, ADJOINT,\n          F(-1), A12_STAR_MC, U12Trans_MR_STAR,\n                 U12_STAR_MC, A12_STAR_MR,\n          F(1), A22 );\n\n        // A12 := A12 - 1/2 Y12\n        Axpy( F(-1)/F(2), Y12_STAR_VR, A12_STAR_VR );\n        A12 = A12_STAR_VR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /**********************************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_UVAR4_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm/UVar5.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_UVAR5_HPP\n#define ELEM_TWOSIDEDTRSM_UVAR5_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_HEMM_INC\n#include ELEM_HER2K_INC\n#include ELEM_TRSM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmUVar5( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmUVar5\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    // Matrix views\n    Matrix<F>\n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n    Matrix<F>\n        UTL, UTR,  U00, U01, U02,\n        UBL, UBR,  U10, U11, U12,\n                   U20, U21, U22;\n\n    // Temporary products\n    Matrix<F> Y12;\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        //--------------------------------------------------------------------//\n        // A11 := inv(U11)' A11 inv(U11)\n        TwoSidedTrsmUUnb( diag, A11, U11 );\n\n        // Y12 := A11 U12\n        Zeros( Y12, A12.Height(), A12.Width() );\n        Hemm( LEFT, UPPER, F(1), A11, U12, F(0), Y12 );\n\n        // A12 := inv(U11)' A12\n        Trsm( LEFT, UPPER, ADJOINT, diag, F(1), U11, A12 );\n\n        // A12 := A12 - 1/2 Y12\n        Axpy( F(-1)/F(2), Y12, A12 );\n\n        // A22 := A22 - (A12' U12 + U12' A12)\n        Her2k( UPPER, ADJOINT, F(-1), A12, U12, F(1), A22 );\n\n        // A12 := A12 - 1/2 Y12\n        Axpy( F(-1)/F(2), Y12, A12 );\n\n        // A12 := A12 inv(U22)\n        Trsm( RIGHT, UPPER, NORMAL, diag, F(1), U22, A12 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrsmUVar5\n( UnitOrNonUnit diag, DistMatrix<F>& A, const DistMatrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TwoSidedTrsmUVar5\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Triangular matrices must be square\");\n        if( A.Height() != U.Height() )\n            LogicError(\"A and U must be the same size\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F>\n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n    DistMatrix<F>\n        UTL(g), UTR(g),  U00(g), U01(g), U02(g),\n        UBL(g), UBR(g),  U10(g), U11(g), U12(g),\n                         U20(g), U21(g), U22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > A12_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A12_STAR_MR(g);\n    DistMatrix<F,STAR,VC  > A12_STAR_VC(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > U12_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > U12_STAR_MR(g);\n    DistMatrix<F,STAR,VC  > U12_STAR_VC(g);\n    DistMatrix<F,STAR,VR  > U12_STAR_VR(g);\n    DistMatrix<F,STAR,VR  > Y12_STAR_VR(g);\n    DistMatrix<F> Y12(g);\n\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    LockedPartitionDownDiagonal\n    ( U, UTL, UTR,\n         UBL, UBR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        LockedRepartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, /**/ U01, U02,\n         /*************/ /******************/\n               /**/       U10, /**/ U11, U12,\n          UBL, /**/ UBR,  U20, /**/ U21, U22 );\n\n        A12_STAR_MC.AlignWith( A22 );\n        A12_STAR_MR.AlignWith( A22 );\n        A12_STAR_VC.AlignWith( A22 );\n        A12_STAR_VR.AlignWith( A22 );\n        U12_STAR_MC.AlignWith( A22 );\n        U12_STAR_MR.AlignWith( A22 );\n        U12_STAR_VC.AlignWith( A22 );\n        U12_STAR_VR.AlignWith( A22 );\n        Y12.AlignWith( A12 );\n        Y12_STAR_VR.AlignWith( A12 );\n        //--------------------------------------------------------------------//\n        // A11 := inv(U11)' A11 inv(U11)\n        U11_STAR_STAR = U11;\n        A11_STAR_STAR = A11;\n        LocalTwoSidedTrsm( UPPER, diag, A11_STAR_STAR, U11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        // Y12 := A11 U12\n        U12_STAR_VR = U12;\n        Zeros( Y12_STAR_VR, A12.Height(), A12.Width() );\n        Hemm\n        ( LEFT, UPPER,\n          F(1), A11_STAR_STAR.Matrix(), U12_STAR_VR.Matrix(),\n          F(0), Y12_STAR_VR.Matrix() );\n        Y12 = Y12_STAR_VR;\n\n        // A12 := inv(U11)' A12\n        A12_STAR_VR = A12;\n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, diag, F(1), U11_STAR_STAR, A12_STAR_VR );\n        A12 = A12_STAR_VR;\n\n        // A12 := A12 - 1/2 Y12\n        Axpy( F(-1)/F(2), Y12, A12 );\n\n        // A22 := A22 - (A12' U12 + U12' A12)\n        A12_STAR_VR = A12;\n        A12_STAR_VC = A12_STAR_VR;\n        U12_STAR_VC = U12_STAR_VR;\n        A12_STAR_MC = A12_STAR_VC;\n        U12_STAR_MC = U12_STAR_VC;\n        A12_STAR_MR = A12_STAR_VR;\n        U12_STAR_MR = U12_STAR_VR;\n        LocalTrr2k\n        ( UPPER, ADJOINT, ADJOINT,\n          F(-1), U12_STAR_MC, A12_STAR_MR,\n                 A12_STAR_MC, U12_STAR_MR,\n          F(1), A22 );\n\n        // A12 := A12 - 1/2 Y12\n        Axpy( F(-1)/F(2), Y12, A12 );\n\n        // A12 := A12 inv(U22)\n        //\n        // This is the bottleneck because A12 only has blocksize rows\n        Trsm( RIGHT, UPPER, NORMAL, diag, F(1), U22, A12 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        SlideLockedPartitionDownDiagonal\n        ( UTL, /**/ UTR,  U00, U01, /**/ U02,\n               /**/       U10, U11, /**/ U12,\n         /*************/ /******************/\n          UBL, /**/ UBR,  U20, U21, /**/ U22 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_UVAR5_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3/TwoSidedTrsm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TWOSIDEDTRSM_HPP\n#define ELEM_TWOSIDEDTRSM_HPP\n\nnamespace elem {\nnamespace internal {\n\ntemplate<typename F>\ninline void \nTwoSidedTrsmLUnb( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& L )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::TwoSidedTrsmLUnb\"))\n    // Use the Variant 4 algorithm\n    const Int n = A.Height();\n    const Int lda = A.LDim();\n    const Int ldl = L.LDim();\n    F* ABuffer = A.Buffer();\n    const F* LBuffer = L.LockedBuffer();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int a21Height = n - (j+1);\n\n        // Extract and store the diagonal value of L\n        const F lambda11 = ( diag==UNIT ? 1 : LBuffer[j+j*ldl] );\n\n        // a10 := a10 / lambda11\n        F* a10 = &ABuffer[j];\n        if( diag != UNIT )\n            for( Int k=0; k<j; ++k )\n                a10[k*lda] /= lambda11;\n\n        // A20 := A20 - l21 a10\n        F* A20 = &ABuffer[j+1];\n        const F* l21 = &LBuffer[(j+1)+j*ldl];\n        blas::Geru( a21Height, j, F(-1), l21, 1, a10, lda, A20, lda );\n\n        // alpha11 := alpha11 / |lambda11|^2\n        ABuffer[j+j*lda] /= lambda11*Conj(lambda11);\n        const F alpha11 = ABuffer[j+j*lda];\n\n        // a21 := a21 / conj(lambda11)\n        F* a21 = &ABuffer[(j+1)+j*lda];\n        if( diag != UNIT )\n            for( Int k=0; k<a21Height; ++k )\n                a21[k] /= Conj(lambda11);\n\n        // a21 := a21 - (alpha11/2)l21\n        for( Int k=0; k<a21Height; ++k )\n            a21[k] -= (alpha11/F(2))*l21[k];\n\n        // A22 := A22 - (l21 a21' + a21 l21')\n        F* A22 = &ABuffer[(j+1)+(j+1)*lda];\n        blas::Her2( 'L', a21Height, F(-1), l21, 1, a21, 1, A22, lda );\n\n        // a21 := a21 - (alpha11/2)l21\n        for( Int k=0; k<a21Height; ++k )\n            a21[k] -= (alpha11/F(2))*l21[k];\n    }\n}\n\ntemplate<typename F>\ninline void \nTwoSidedTrsmUUnb( UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& U )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::TwoSidedTrsmUUnb\"))\n    // Use the Variant 4 algorithm\n    // (which annoyingly requires conjugations for the Her2)\n    const Int n = A.Height();\n    const Int lda = A.LDim();\n    const Int ldu = U.LDim();\n    F* ABuffer = A.Buffer();\n    const F* UBuffer = U.LockedBuffer();\n    std::vector<F> a12Conj( n ), u12Conj( n );\n    for( Int j=0; j<n; ++j )\n    {\n        const Int a21Height = n - (j+1);\n\n        // Extract and store the diagonal value of U\n        const F upsilon11 = ( diag==UNIT ? 1 : UBuffer[j+j*ldu] );\n\n        // a01 := a01 / upsilon11\n        F* a01 = &ABuffer[j*lda];\n        if( diag != UNIT )\n            for( Int k=0; k<j; ++k )\n                a01[k] /= upsilon11;\n\n        // A02 := A02 - a01 u12\n        F* A02 = &ABuffer[(j+1)*lda];\n        const F* u12 = &UBuffer[j+(j+1)*ldu];\n        blas::Geru( j, a21Height, F(-1), a01, 1, u12, ldu, A02, lda );\n\n        // alpha11 := alpha11 / |upsilon11|^2\n        ABuffer[j+j*lda] /= upsilon11*Conj(upsilon11);\n        const F alpha11 = ABuffer[j+j*lda];\n\n        // a12 := a12 / conj(upsilon11)\n        F* a12 = &ABuffer[j+(j+1)*lda];\n        if( diag != UNIT )\n            for( Int k=0; k<a21Height; ++k )\n                a12[k*lda] /= Conj(upsilon11);\n\n        // a12 := a12 - (alpha11/2)u12\n        for( Int k=0; k<a21Height; ++k )\n            a12[k*lda] -= (alpha11/F(2))*u12[k*ldu];\n\n        // A22 := A22 - (a12' u12 + u12' a12)\n        F* A22 = &ABuffer[(j+1)+(j+1)*lda];\n        for( Int k=0; k<a21Height; ++k )\n            a12Conj[k] = Conj(a12[k*lda]);\n        for( Int k=0; k<a21Height; ++k )\n            u12Conj[k] = Conj(u12[k*ldu]);\n        blas::Her2\n        ( 'U', a21Height, \n          F(-1), u12Conj.data(), 1, a12Conj.data(), 1, A22, lda );\n\n        // a12 := a12 - (alpha11/2)u12\n        for( Int k=0; k<a21Height; ++k )\n            a12[k*lda] -= (alpha11/F(2))*u12[k*ldu];\n    }\n}\n\n} // namespace internal\n\ntemplate<typename F>\ninline void\nLocalTwoSidedTrsm\n( UpperOrLower uplo, UnitOrNonUnit diag, \n  DistMatrix<F,STAR,STAR>& A, const DistMatrix<F,STAR,STAR>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalTwoSidedTrsm\"))\n    TwoSidedTrsm( uplo, diag, A.Matrix(), B.LockedMatrix() );\n}\n\n} // namespace elem\n\n#include \"./TwoSidedTrsm/LVar4.hpp\"\n#include \"./TwoSidedTrsm/UVar4.hpp\"\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nTwoSidedTrsm\n( UpperOrLower uplo, UnitOrNonUnit diag, Matrix<F>& A, const Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TwoSidedTrsm\"))\n    if( uplo == LOWER )\n        internal::TwoSidedTrsmLVar4( diag, A, B );\n    else\n        internal::TwoSidedTrsmUVar4( diag, A, B );\n}\n\ntemplate<typename F> \ninline void\nTwoSidedTrsm\n( UpperOrLower uplo, UnitOrNonUnit diag, \n  DistMatrix<F>& A, const DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TwoSidedTrsm\"))\n    if( uplo == LOWER )\n        internal::TwoSidedTrsmLVar4( diag, A, B );\n    else\n        internal::TwoSidedTrsmUVar4( diag, A, B );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TWOSIDEDTRSM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like/level3.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLAS3_HPP\n#define ELEM_BLAS3_HPP\n\n#include \"./level3/Gemm.hpp\"\n#include \"./level3/Hemm.hpp\"\n#include \"./level3/Her2k.hpp\"\n#include \"./level3/Herk.hpp\"\n#include \"./level3/MultiShiftQuasiTrsm.hpp\"\n#include \"./level3/MultiShiftTrsm.hpp\"\n#include \"./level3/QuasiTrsm.hpp\"\n#include \"./level3/Symm.hpp\"\n#include \"./level3/Syr2k.hpp\"\n#include \"./level3/Syrk.hpp\"\n#include \"./level3/Trmm.hpp\"\n#include \"./level3/Trtrmm.hpp\"\n#include \"./level3/Trdtrmm.hpp\"\n#include \"./level3/Trsm.hpp\"\n#include \"./level3/Trstrm.hpp\"\n#include \"./level3/TwoSidedTrmm.hpp\"\n#include \"./level3/TwoSidedTrsm.hpp\"\n\n#endif // ifndef ELEM_BLAS3_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/blas-like.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLASLIKE_HPP\n#define ELEM_BLASLIKE_HPP\n\n#include \"./blas-like/decl.hpp\"\n#include \"./blas-like/impl.hpp\"\n\n#endif // ifndef ELEM_BLASLIKE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/config-internal.h",
    "content": "/*\n   Copyright (c) 2009-2013, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_CONFIGINTERNAL_H\n#define ELEM_CONFIGINTERNAL_H\n\n#include \"elemental/config.h\"\n\n#if defined(ELEM_HAVE_VALGRIND)\n# include \"valgrind.h\"\n# define ELEM_RUNNING_ON_VALGRIND RUNNING_ON_VALGRIND\n#else\n# define ELEM_RUNNING_ON_VALGRIND 0\n#endif\n\n#endif /* ELEM_CONFIGINTERNAL_H */\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/control/Lyapunov.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LYAPUNOV_HPP\n#define ELEM_LYAPUNOV_HPP\n\n#include ELEM_ADJOINT_INC\n#include \"./Sylvester.hpp\"\n\nnamespace elem {\n\n// A is assumed to have all of its eigenvalues in the open right-half plane.\n// X is then returned as the solution of the system of equations:\n//    A X + X A^H = C\n//\n// See Chapter 2 of Nicholas J. Higham's \"Functions of Matrices\"\n\ntemplate<typename F>\ninline void\nLyapunov\n( const Matrix<F>& A, const Matrix<F>& C, Matrix<F>& X, \n  SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Lyapunov\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( C.Height() != A.Height() || C.Width() != A.Height() )\n            LogicError(\"C must conform with A\");\n    )\n    const Int m = A.Height();\n    Matrix<F> W, WTL, WTR,\n                 WBL, WBR;\n    Zeros( W, 2*m, 2*m );\n    PartitionDownDiagonal\n    ( W, WTL, WTR,\n         WBL, WBR, m );\n    WTL = A;\n    Adjoint( A, WBR ); Scale( F(-1), WBR );\n    WTR = C; Scale( F(-1), WTR );\n    Sylvester( m, W, X, signCtrl );\n}\n\ntemplate<typename F>\ninline void\nLyapunov\n( const DistMatrix<F>& A, const DistMatrix<F>& C, DistMatrix<F>& X,\n  SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Sylvester\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( C.Height() != A.Height() || C.Width() != A.Height() )\n            LogicError(\"C must conform with A\");\n        if( A.Grid() != C.Grid() )\n            LogicError(\"A and C must have the same grid\");\n    )\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    DistMatrix<F> W(g), WTL(g), WTR(g),\n                        WBL(g), WBR(g);\n    Zeros( W, 2*m, 2*m );\n    PartitionDownDiagonal\n    ( W, WTL, WTR,\n         WBL, WBR, m );\n    WTL = A;\n    Adjoint( A, WBR ); Scale( F(-1), WBR );\n    WTR = C; Scale( F(-1), WTR );\n    Sylvester( m, W, X, signCtrl );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LYAPUNOV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/control/README.md",
    "content": "### `include/elemental/control/`\n\n- `decl.hpp`: include all declarations of control-related routines\n- `impl.hpp`: include all implementations of control-related routines\n\nA few matrix sign function based solvers for control theory:\n\n-  `Lyapunov.hpp`: Solves A X + X A' = C for X when A has its eigenvalues\n   in the open right-half plane\n-  `Ricatti.hpp`: Solves X K X - A' X - X A = L for X when K and L are \n   Hermitian.\n-  `Sylvester.hpp`: Solves A X + X B = C for X when A and B both have all of \n   their eigenvalues in the open right-half plane\n\n#### TODO\n\nImplement algorithms from Benner, Quintana-Orti, and Quintana-Orti's \n\"Solving Stable Sylvester Equations via Rational Iterative Schemes\".\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/control/Ricatti.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_RICATTI_HPP\n#define ELEM_RICATTI_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_SCALE_INC\n#include ELEM_UPDATEDIAGONAL_INC\n\n#include ELEM_LEASTSQUARES_INC\n#include ELEM_SIGN_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// W = | A^H  L |, where K and L are Hermitian.\n//     | K   -A |\n//\n// The solution, X, to the equation\n//   X K X - A^H X - X A = L\n// is returned, as well as the number of Newton iterations for computing sgn(W).\n//\n// See Chapter 2 of Nicholas J. Higham's \"Functions of Matrices\"\n\ntemplate<typename F>\ninline void\nRicatti\n( Matrix<F>& W, Matrix<F>& X, SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Ricatti\"))\n    Sign( W, signCtrl );\n    const Int n = W.Height()/2;\n    Matrix<F> WTL, WTR,\n              WBL, WBR;\n    PartitionDownDiagonal\n    ( W, WTL, WTR,\n         WBL, WBR, n );\n\n    // (ML, MR) = sgn(W) - I\n    UpdateDiagonal( W, F(-1) );\n\n    // Solve for X in ML X = -MR\n    Matrix<F> ML, MR;\n    PartitionRight( W, ML, MR, n );\n    Scale( F(-1), MR );\n    LeastSquares( NORMAL, ML, MR, X );\n}\n\ntemplate<typename F>\ninline void\nRicatti\n( DistMatrix<F>& W, DistMatrix<F>& X, \n  SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Ricatti\"))\n    const Grid& g = W.Grid();\n    Sign( W, signCtrl );\n    const Int n = W.Height()/2;\n    DistMatrix<F> WTL(g), WTR(g),\n                  WBL(g), WBR(g);\n    PartitionDownDiagonal\n    ( W, WTL, WTR,\n         WBL, WBR, n );\n\n    // (ML, MR) = sgn(W) - I\n    UpdateDiagonal( W, F(-1) );\n\n    // Solve for X in ML X = -MR\n    DistMatrix<F> ML(g), MR(g);\n    PartitionRight( W, ML, MR, n );\n    Scale( F(-1), MR );\n    LeastSquares( NORMAL, ML, MR, X );\n}\n\ntemplate<typename F>\ninline void\nRicatti\n( UpperOrLower uplo, \n  const Matrix<F>& A, const Matrix<F>& K, const Matrix<F>& L, Matrix<F>& X,\n  SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Sylvester\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( K.Height() != K.Width() )\n            LogicError(\"K must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n        if( A.Height() != K.Height() || A.Height() != L.Height() )\n            LogicError(\"A, K, and L must be the same size\");\n    )\n    const Int n = A.Height();\n    Matrix<F> W, WTL, WTR,\n                 WBL, WBR;\n    Zeros( W, 2*n, 2*n );\n    PartitionDownDiagonal\n    ( W, WTL, WTR,\n         WBL, WBR, n );\n\n    Adjoint( A, WTL );\n    WBR = A; Scale( F(-1), WBR );\n    WBL = K; MakeHermitian( uplo, WBL );\n    WTR = L; MakeHermitian( uplo, WTR );\n\n    Ricatti( W, X, signCtrl );\n}\n\ntemplate<typename F>\ninline void\nRicatti\n( UpperOrLower uplo, \n  const DistMatrix<F>& A, const DistMatrix<F>& K, const DistMatrix<F>& L, \n  DistMatrix<F>& X, SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Sylvester\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( K.Height() != K.Width() )\n            LogicError(\"K must be square\");\n        if( L.Height() != L.Width() )\n            LogicError(\"L must be square\");\n        if( A.Height() != K.Height() || A.Height() != L.Height() )\n            LogicError(\"A, K, and L must be the same size\");\n        if( A.Grid() != K.Grid() || K.Grid() != L.Grid() )\n            LogicError(\"A, K, and L must have the same grid\");\n    )\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    DistMatrix<F> W(g), WTL(g), WTR(g),\n                        WBL(g), WBR(g);\n    Zeros( W, 2*n, 2*n );\n    PartitionDownDiagonal\n    ( W, WTL, WTR,\n         WBL, WBR, n );\n\n    Adjoint( A, WTL );\n    WBR = A; Scale( F(-1), WBR );\n    WBL = K; MakeHermitian( uplo, WBL );\n    WTR = L; MakeHermitian( uplo, WTR );\n\n    Ricatti( W, X, signCtrl );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_RICATTI_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/control/Sylvester.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYLVESTER_HPP\n#define ELEM_SYLVESTER_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n#include ELEM_UPDATEDIAGONAL_INC\n\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_SIGN_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// W = | A -C |, where A is m x m, B is n x n, and both are assumed to have \n//     | 0 -B |  all of their eigenvalues in the open right-half plane.\n//\n// The solution, X, to the equation\n//   A X + X B = C\n// is returned, as well as the number of Newton iterations for computing sgn(W).\n//\n// See Chapter 2 of Nicholas J. Higham's \"Functions of Matrices\"\n\ntemplate<typename F>\ninline void\nSylvester\n( Int m, Matrix<F>& W, Matrix<F>& X, \n  SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Sylvester\"))\n    Sign( W, signCtrl );\n    Matrix<F> WTL, WTR,\n              WBL, WBR;\n    PartitionDownDiagonal\n    ( W, WTL, WTR,\n         WBL, WBR, m );\n    // WTL and WBR should be the positive and negative identity, WBL should be \n    // zero, and WTR should be -2 X\n    X = WTR;\n    Scale( -F(1)/F(2), X );\n\n    // TODO: Think of how to probe for checks on other quadrants.\n    /*\n    typedef Base<F> Real; \n    UpdateDiagonal( WTL, F(-1) );\n    const Real errorWTL = FrobeniusNorm( WTL );\n    const Int n = W.Height() - m;\n    UpdateDiagonal( WBR, F(1) );\n    const Real errorWBR = FrobeniusNorm( WBR );\n    const Real errorWBL = FrobeniusNorm( WBL );\n    */\n}\n\ntemplate<typename F>\ninline void\nSylvester\n( Int m, DistMatrix<F>& W, DistMatrix<F>& X, \n  SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Sylvester\"))\n    const Grid& g = W.Grid();\n    Sign( W, signCtrl );\n    DistMatrix<F> WTL(g), WTR(g),\n                  WBL(g), WBR(g);\n    PartitionDownDiagonal\n    ( W, WTL, WTR,\n         WBL, WBR, m );\n    // WTL and WBR should be the positive and negative identity, WBL should be \n    // zero, and WTR should be -2 X\n    X = WTR;\n    Scale( -F(1)/F(2), X );\n\n    // TODO: Think of how to probe for checks on other quadrants.\n    //       Add UpdateDiagonal routine to avoid explicit identity Axpy?\n    /*\n    typedef Base<F> Real; \n    UpdateDiagonal( WTL, F(-1) );\n    const Real errorWTL = FrobeniusNorm( WTL );\n    const Int n = W.Height() - m;\n    UpdateDiagonal( WBR, F(1) );\n    const Real errorWBR = FrobeniusNorm( WBR );\n    const Real errorWBL = FrobeniusNorm( WBL );\n    */\n}\n\ntemplate<typename F>\ninline void\nSylvester\n( const Matrix<F>& A, const Matrix<F>& B, const Matrix<F>& C, Matrix<F>& X,\n  SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Sylvester\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( B.Height() != B.Width() )\n            LogicError(\"B must be square\");\n        if( C.Height() != A.Height() || C.Width() != B.Height() )\n            LogicError(\"C must conform with A and B\");\n    )\n    const Int m = C.Height();\n    const Int n = C.Width();\n    Matrix<F> W, WTL, WTR,\n                 WBL, WBR;\n    Zeros( W, m+n, m+n );\n    PartitionDownDiagonal\n    ( W, WTL, WTR,\n         WBL, WBR, m );\n    WTL = A;\n    WBR = B; Scale( F(-1), WBR );\n    WTR = C; Scale( F(-1), WTR );\n    Sylvester( m, W, X, signCtrl );\n}\n\ntemplate<typename F>\ninline void\nSylvester\n( const DistMatrix<F>& A, const DistMatrix<F>& B, const DistMatrix<F>& C, \n  DistMatrix<F>& X, SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Sylvester\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( B.Height() != B.Width() )\n            LogicError(\"B must be square\");\n        if( C.Height() != A.Height() || C.Width() != B.Height() )\n            LogicError(\"C must conform with A and B\");\n        if( A.Grid() != B.Grid() || B.Grid() != C.Grid() )\n            LogicError(\"A, B, and C must have the same grid\");\n    )\n    const Int m = C.Height();\n    const Int n = C.Width();\n    const Grid& g = A.Grid();\n    DistMatrix<F> W(g), WTL(g), WTR(g),\n                        WBL(g), WBR(g);\n    Zeros( W, m+n, m+n );\n    PartitionDownDiagonal\n    ( W, WTL, WTR,\n         WBL, WBR, m );\n    WTL = A;\n    WBR = B; Scale( F(-1), WBR );\n    WTR = C; Scale( F(-1), WTR );\n    Sylvester( m, W, X, signCtrl );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYLVESTER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/control/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONTROL_DECL_HPP\n#define ELEM_CONTROL_DECL_HPP\n\nnamespace elem {\n\n// No reason to put anything here, yet\n\n} // namespace elem\n\n#endif // ifndef ELEM_CONTROL_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/control/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONTROL_IMPL_HPP\n#define ELEM_CONTROL_IMPL_HPP\n\n#include \"./Lyapunov.hpp\"\n#include \"./Sylvester.hpp\"\n#include \"./Ricatti.hpp\"\n\n#endif // ifndef ELEM_CONTROL_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/control.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONTROL_HPP\n#define ELEM_CONTROL_HPP\n\n#include \"./control/decl.hpp\"\n#include \"./control/impl.hpp\"\n\n#endif // ifndef ELEM_CONTROL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/BasisPursuit.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BASISPURSUIT_HPP\n#define ELEM_BASISPURSUIT_HPP\n\n#include ELEM_GEMV_INC\n#include ELEM_TRSV_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_LQ_INC\n#include ELEM_QR_INC\n#include ELEM_PSEUDOINVERSE_INC\n#include ELEM_SOFTTHRESHOLD_INC\n#include ELEM_ZEROS_INC\n\n// These implementations are adaptations of the solver described at\n//    http://www.stanford.edu/~boyd/papers/admm/basis_pursuit/basis_pursuit.html\n// which is derived from the distributed ADMM article of Boyd et al.\n//\n// Basis pursuit seeks the solution to A x = b which minimizes || x ||_1\n\nnamespace elem {\n\ntemplate<typename F>\ninline Int\nBasisPursuit\n( const Matrix<F>& A, const Matrix<F>& b,\n  Matrix<F>& x, Matrix<F>& z, Matrix<F>& u, Base<F> rho=1., Base<F> alpha=1.2, \n  Int maxIter=500, Base<F> absTol=1e-6, Base<F> relTol=1e-4, bool usePinv=false,\n  Base<F> pinvTol=0, bool progress=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BasisPursuit\"))\n    // Find a means of quickly applyinv pinv(A) and then form pinv(A) b\n    // NOTE: If m >= n and A has full column rank, then basis pursuit is \n    //       irrelevant, as there is a unique solution, which is found \n    //       through least squares. If A does *not* have full column rank,\n    //       then the QR factorization is not enough.\n    //       For the same reason, the LQ factorization will fail if A does\n    //       not have full row rank.\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    Matrix<F> pinvA;\n    Matrix<F> Q, L, R;\n    Matrix<F> q, s;\n    if( usePinv )\n    {\n        pinvA = A;\n        Pseudoinverse( pinvA, pinvTol );\n        Gemv( NORMAL, F(1), pinvA, b, q );\n    }\n    else if( m >= n )\n    {\n        Q = A;\n        qr::Explicit( Q, R );\n        Gemv( ADJOINT, F(1), Q, b, q );\n        Trsv( UPPER, NORMAL, NON_UNIT, R, q );\n    }\n    else\n    {\n        Q = A;\n        lq::Explicit( L, Q );\n        s = b;\n        Trsv( LOWER, NORMAL, NON_UNIT, L, s );\n        Gemv( ADJOINT, F(1), Q, s, q );\n    }\n\n    if( progress )\n    {\n        const Real qOneNorm = OneNorm( q );\n        std::cout << \" || pinv(A) b ||_1 = \" << qOneNorm << std::endl;\n    }\n\n    // Start the basis pursuit\n    Int numIter=0;\n    Matrix<F> t, zOld, xHat;\n    Zeros( x, n, 1 );\n    Zeros( z, n, 1 );\n    Zeros( u, n, 1 );\n    while( numIter < maxIter )\n    {\n        zOld = z;\n\n        // x := P*(z-u) + q\n        //    = (I-pinv(A)*A)(z-u) + q\n        //    = (z-u) - pinv(A)*A*(z-u) + q\n        s = z;\n        Axpy( F(-1), u, s );\n        x = s;\n        Gemv( NORMAL, F(1), A, s, t );\n        if( usePinv )\n        {\n            Gemv( NORMAL, F(1), pinvA, t, s );\n        }\n        else if( m >= n )\n        {\n            Gemv( ADJOINT, F(1), Q, t, s );\n            Trsv( UPPER, NORMAL, NON_UNIT, R, s );\n        }\n        else\n        {\n            Trsv( LOWER, NORMAL, NON_UNIT, L, t );\n            Gemv( ADJOINT, F(1), Q, t, s );\n        }\n        Axpy( F(-1), s, x );\n        Axpy( F(1),  q, x );\n\n        // xHat := alpha x + (1-alpha) zOld\n        xHat = x;\n        Scale( alpha, xHat );\n        Axpy( 1-alpha, zOld, xHat );\n\n        // z := SoftThresh(xHat+u,1/rho)\n        z = xHat;\n        Axpy( F(1), u, z );\n        SoftThreshold( z, 1/rho );\n\n        // u := u + (xHat - z)\n        Axpy( F(1),  xHat, u );\n        Axpy( F(-1), z,    u );\n\n        // rNorm := || x - z ||_2\n        s = x;\n        Axpy( F(-1), z, s );\n        const Real rNorm = FrobeniusNorm( s );\n\n        // sNorm := || rho*(z-zOld) ||_2\n        s = z;\n        Axpy( F(-1), zOld, s );\n        const Real sNorm = Abs(rho)*FrobeniusNorm( s );\n\n        const Real epsPri = Sqrt(Real(n))*absTol +\n            relTol*Max(FrobeniusNorm(x),FrobeniusNorm(z));\n        const Real epsDual = Sqrt(Real(n))*absTol +\n            relTol*Abs(rho)*FrobeniusNorm(u);\n\n        if( progress )\n        {\n            const Real xOneNorm = OneNorm( x );\n            std::cout << numIter << \": ||x-z||_2=\" << rNorm\n                      << \", epsPri=\" << epsPri\n                      << \", |rho| ||z-zOld||_2=\" << sNorm\n                      << \", and epsDual=\" << epsDual << \", ||x||_1=\"\n                      << xOneNorm << std::endl;\n        }\n\n        if( rNorm < epsPri && sNorm < epsDual )\n            break;\n        ++numIter;\n    }\n    if( maxIter == numIter )\n        std::cout << \"Basis pursuit failed to converge\" << std::endl;\n    return numIter;\n}\n\ntemplate<typename F>\ninline Int\nBasisPursuit\n( const DistMatrix<F>& A, const DistMatrix<F>& b, \n  DistMatrix<F>& x, DistMatrix<F>& z, DistMatrix<F>& u, \n  Base<F> rho=1., Base<F> alpha=1.2, \n  Int maxIter=500, Base<F> absTol=1e-6, Base<F> relTol=1e-4, bool usePinv=false,\n  Base<F> pinvTol=0, bool progress=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BasisPursuit\"))\n    // Find a means of quickly applyinv pinv(A) and then form pinv(A) b\n    // NOTE: If m >= n and A has full column rank, then basis pursuit is \n    //       irrelevant, as there is a unique solution, which is found \n    //       through least squares. If A does *not* have full column rank,\n    //       then the QR factorization is not enough.\n    //       For the same reason, the LQ factorization will fail if A does\n    //       not have full row rank.\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Grid& grid = A.Grid();\n    DistMatrix<F> pinvA(grid);\n    DistMatrix<F> Q(grid), L(grid), R(grid);\n    DistMatrix<F> q(grid), s(grid);\n    if( usePinv )\n    {\n        pinvA = A;\n        Pseudoinverse( pinvA, pinvTol );\n        Gemv( NORMAL, F(1), pinvA, b, q );\n    }\n    else if( m >= n )\n    {\n        Q = A;\n        qr::Explicit( Q, R );\n        Gemv( ADJOINT, F(1), Q, b, q );\n        Trsv( UPPER, NORMAL, NON_UNIT, R, q );\n    }\n    else\n    {\n        Q = A;\n        lq::Explicit( L, Q );\n        s = b;\n        Trsv( LOWER, NORMAL, NON_UNIT, L, s );\n        Gemv( ADJOINT, F(1), Q, s, q );\n    }\n\n    if( progress )\n    {\n        const Real qOneNorm = OneNorm( q );\n        if( grid.Rank() == 0 )\n            std::cout << \" || pinv(A) b ||_1 = \" << qOneNorm << std::endl;\n    }\n\n    // Start the basis pursuit\n    Int numIter=0;\n    DistMatrix<F> t(grid), zOld(grid), xHat(grid);\n    Zeros( x, n, 1 );\n    Zeros( z, n, 1 );\n    Zeros( u, n, 1 );\n    while( numIter < maxIter )\n    {\n        zOld = z;\n\n        // x := P*(z-u) + q\n        //    = (I-pinv(A)*A)(z-u) + q\n        //    = (z-u) - pinv(A)*A*(z-u) + q\n        s = z;\n        Axpy( F(-1), u, s );\n        x = s;\n        Gemv( NORMAL, F(1), A, s, t );\n        if( usePinv )\n        {\n            Gemv( NORMAL, F(1), pinvA, t, s );\n        }\n        else if( m >= n )\n        {\n            Gemv( ADJOINT, F(1), Q, t, s );\n            Trsv( UPPER, NORMAL, NON_UNIT, R, s );\n        }\n        else\n        {\n            Trsv( LOWER, NORMAL, NON_UNIT, L, t );\n            Gemv( ADJOINT, F(1), Q, t, s );\n        }\n        Axpy( F(-1), s, x );\n        Axpy( F(1),  q, x );\n\n        // xHat := alpha x + (1-alpha) zOld\n        xHat = x;\n        Scale( alpha, xHat );\n        Axpy( 1-alpha, zOld, xHat );\n\n        // z := SoftThresh(xHat+u,1/rho)\n        z = xHat;\n        Axpy( F(1), u, z );\n        SoftThreshold( z, 1/rho );\n\n        // u := u + (xHat - z)\n        Axpy( F(1),  xHat, u );\n        Axpy( F(-1), z,    u );\n\n        // rNorm := || x - z ||_2\n        s = x;\n        Axpy( F(-1), z, s );\n        const Real rNorm = FrobeniusNorm( s );\n\n        // sNorm := || rho*(z-zOld) ||_2\n        s = z;\n        Axpy( F(-1), zOld, s );\n        const Real sNorm = Abs(rho)*FrobeniusNorm( s );\n\n        const Real epsPri = Sqrt(Real(n))*absTol +\n            relTol*Max(FrobeniusNorm(x),FrobeniusNorm(z));\n        const Real epsDual = Sqrt(Real(n))*absTol +\n            relTol*Abs(rho)*FrobeniusNorm(u);\n\n        if( progress )\n        {\n            const Real xOneNorm = OneNorm( x );\n            if( grid.Rank() == 0 )\n                std::cout << numIter << \": ||x-z||_2=\" << rNorm\n                          << \", epsPri=\" << epsPri\n                          << \", |rho| ||z-zOld||_2=\" << sNorm\n                          << \", and epsDual=\" << epsDual << \", ||x||_1=\"\n                          << xOneNorm << std::endl;\n        }\n\n        if( rNorm < epsPri && sNorm < epsDual )\n            break;\n        ++numIter;\n    }\n    if( maxIter == numIter && grid.Rank() == 0 )\n        std::cout << \"Basis pursuit failed to converge\" << std::endl;\n    return numIter;\n}\n\n} // namepace elem\n\n#endif // ifndef ELEM_BASISPURSUIT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/Clip.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CLIP_HPP\n#define ELEM_CLIP_HPP\n\nnamespace elem {\n\ntemplate<typename Real>\ninline void\nLowerClip( Matrix<Real>& X, Real lowerBound=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LowerClip\");\n        if( IsComplex<Real>::val )\n            LogicError(\"Lower clip does not apply to complex data\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            X.Set( i, j, Max(lowerBound,X.Get(i,j)) );\n}\n\ntemplate<typename Real>\ninline void\nUpperClip( Matrix<Real>& X, Real upperBound=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"UpperClip\");\n        if( IsComplex<Real>::val )\n            LogicError(\"Upper clip does not apply to complex data\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            X.Set( i, j, Min(upperBound,X.Get(i,j)) );\n}\n\ntemplate<typename Real>\ninline void\nClip( Matrix<Real>& X, Real lowerBound=0, Real upperBound=1 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Clip\");\n        if( IsComplex<Real>::val )\n            LogicError(\"Clip does not apply to complex data\");\n    )\n    const Int m = X.Height();\n    const Int n = X.Width();\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            X.Set( i, j, Min(upperBound,Max(lowerBound,X.Get(i,j))) );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nLowerClip( DistMatrix<Real,U,V>& X, Real lowerBound=0 )\n{ LowerClip( X.Matrix(), lowerBound ); }\ntemplate<typename Real,Dist U,Dist V>\ninline void\nUpperClip( DistMatrix<Real,U,V>& X, Real upperBound=0 )\n{ UpperClip( X.Matrix(), upperBound ); }\ntemplate<typename Real,Dist U,Dist V>\ninline void\nClip( DistMatrix<Real,U,V>& X, Real lowerBound=0, Real upperBound=1 )\n{ Clip( X.Matrix(), lowerBound, upperBound ); }\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nLowerClip( BlockDistMatrix<Real,U,V>& X, Real lowerBound=0 )\n{ LowerClip( X.Matrix(), lowerBound ); }\ntemplate<typename Real,Dist U,Dist V>\ninline void\nUpperClip( BlockDistMatrix<Real,U,V>& X, Real upperBound=0 )\n{ UpperClip( X.Matrix(), upperBound ); }\ntemplate<typename Real,Dist U,Dist V>\ninline void\nClip( BlockDistMatrix<Real,U,V>& X, Real lowerBound=0, Real upperBound=1 )\n{ Clip( X.Matrix(), lowerBound, upperBound ); }\n\n} // namespace elem\n\n#endif // ifndef ELEM_CLIP_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/Covariance.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_COVARIANCE_HPP\n#define ELEM_COVARIANCE_HPP\n\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_GEMV_INC\n#include ELEM_HERK_INC\n#include ELEM_ONES_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nCovariance( const Matrix<F>& D, Matrix<F>& S )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Covariance\"))\n    const Int numObs = D.Height();\n    const Int n = D.Width();\n\n    // Compute the average column\n    Matrix<F> ones, xMean;\n    Ones( ones, numObs, 1 );\n    Gemv( TRANSPOSE, F(1)/F(numObs), D, ones, xMean );\n\n    // Subtract the mean from each column of D\n    Matrix<F> DDev( D );\n    for( Int i=0; i<numObs; ++i )\n        blas::Axpy( n, F(-1), xMean.LockedBuffer(), 1, DDev.Buffer(i,0), DDev.LDim() );\n\n    // Form S := 1/(numObs-1) DDev DDev'\n    Herk( LOWER, ADJOINT, F(1)/F(numObs-1), DDev, S );\n    Conjugate( S );\n    MakeHermitian( LOWER, S );\n}\n\ntemplate<typename F>\ninline void\nCovariance( const DistMatrix<F>& D, DistMatrix<F>& S )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Covariance\"))\n    const Grid& g = D.Grid();\n    const Int numObs = D.Height();\n\n    // Compute the average column\n    DistMatrix<F> ones(g), xMean(g);\n    Ones( ones, numObs, 1 );\n    Gemv( TRANSPOSE, F(1)/F(numObs), D, ones, xMean );\n    DistMatrix<F,MR,STAR> xMean_MR_STAR(g);\n    xMean_MR_STAR.AlignWith( D );\n    xMean_MR_STAR = xMean;\n\n    // Subtract the mean from each column of D\n    DistMatrix<F> DDev( D );\n    for( Int iLoc=0; iLoc<DDev.LocalHeight(); ++iLoc )\n        blas::Axpy\n        ( DDev.LocalWidth(), F(-1), \n          xMean_MR_STAR.LockedBuffer(), 1, \n          DDev.Buffer(iLoc,0),          DDev.LDim() );\n\n    // Form S := 1/(numObs-1) DDev DDev'\n    Herk( LOWER, ADJOINT, F(1)/F(numObs-1), DDev, S );\n    Conjugate( S );\n    MakeHermitian( LOWER, S );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_COVARIANCE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/LinearProgram.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LINEARPROGRAM_HPP\n#define ELEM_LINEARPROGRAM_HPP\n\n#include ELEM_ADJOINT_INC\n#include ELEM_DOT_INC\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMV_INC\n#include ELEM_TRSV_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_LU_INC\n#include ELEM_TRIANGULARINVERSE_INC\n#include ELEM_CLIP_INC\n#include ELEM_ZEROS_INC\n\n// These implementations are adaptations of the solver described at\n//    http://www.stanford.edu/~boyd/papers/admm/linprog/linprog.html\n// which is derived from the distributed ADMM article of Boyd et al.\n//\n// This ADMM attempts to solve the following linear program:\n//     minimize    c' x\n//     subject to  A x = b, x >= 0\n//\n\nnamespace elem {\n\ntemplate<typename Real>\ninline Int\nLinearProgram\n( const Matrix<Real>& A, const Matrix<Real>& b, const Matrix<Real>& c, \n  Matrix<Real>& x, Matrix<Real>& z, Matrix<Real>& u,\n  Real rho=1., Real alpha=1.2, Int maxIter=500, \n  Real absTol=1e-6, Real relTol=1e-4, bool inv=false, bool progress=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LinearProgram\"))\n    if( IsComplex<Real>::val ) \n        LogicError(\"The datatype was assumed to be real\");\n    \n    // Cache a custom partially-pivoted LU factorization of \n    //    |  rho*I   A^H | = | B11  B12 |\n    //    |  A       0   |   | B21  B22 |\n    // by (justifiably) avoiding pivoting in the first n steps of\n    // the factorization, so that\n    //    [I,rho*I] = lu(rho*I).\n    // The factorization would then proceed with \n    //    B21 := B21 U11^{-1} = A (rho*I)^{-1} = A/rho\n    //    B12 := L11^{-1} B12 = I A^H = A^H.\n    // The Schur complement would then be\n    //    B22 := B22 - B21 B12 = 0 - (A*A^H)/rho.\n    // We then factor said matrix with LU with partial pivoting and\n    // swap the necessary rows of B21 in order to implicitly commute\n    // the row pivots with the Gauss transforms in the manner standard\n    // for GEPP. Unless A A' is singular, pivoting should not be needed,\n    // as Cholesky factorization of the negative matrix should be valid.\n    //\n    // The result is the factorization\n    //   | I 0   | | rho*I A^H | = | I   0   | | rho*I U12 |,\n    //   | 0 P22 | | A     0   |   | L21 L22 | | 0     U22 |\n    // where [L22,U22] are stored within B22.\n    Matrix<Real> U12, L21, B22, bPiv;\n    Adjoint( A, U12 );\n    L21 = A; Scale( 1/rho, L21 );\n    Herk( LOWER, NORMAL, -1/rho, A, B22 );\n    MakeHermitian( LOWER, B22 );\n    Matrix<Int> perm2;\n    LU( B22, perm2 );\n    PermuteRows( L21, perm2 );\n    bPiv = b;\n    PermuteRows( bPiv, perm2 );\n\n    // Possibly form the inverse of L22 U22\n    Matrix<Real> X22;\n    if( inv )\n    {\n        X22 = B22;\n        MakeTriangular( LOWER, X22 );\n        SetDiagonal( X22, 1. );\n        TriangularInverse( LOWER, UNIT, X22 );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, 1., B22, X22 );\n    }\n\n    Int numIter=0;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    Matrix<Real> g, xTmp, y, t;\n    Zeros( g, m+n, 1 );\n    PartitionDown( g, xTmp, y, n );\n    Matrix<Real> zOld, xHat;\n    Zeros( z, n, 1 );\n    Zeros( u, n, 1 );\n    Zeros( t, n, 1 );\n    while( numIter < maxIter )\n    {\n        zOld = z;\n\n        // Find x from\n        //  | rho*I  A^H | | x | = | rho*(z-u)-c | \n        //  | A      0   | | y |   | b           |\n        // via our cached custom factorization:\n        // \n        // |x| = inv(U) inv(L) P' |rho*(z-u)-c|\n        // |y|                    |b          |\n        //     = |rho*I U12|^{-1} |I   0  | |I 0   | |rho*(z-u)-c|\n        //     = |0     U22|      |L21 L22| |0 P22'| |b          |\n        //     = \"                        \" |rho*(z-u)-c|\n        //                                  | P22' b    |\n        xTmp = z;\n        Axpy( Real(-1), u, xTmp );\n        Scale( rho, xTmp );\n        Axpy( Real(-1), c, xTmp );\n        y = bPiv;\n        Gemv( NORMAL, Real(-1), L21, xTmp, Real(1), y );\n        if( inv )\n        {\n            Gemv( NORMAL, Real(1.), X22, y, t );\n            y = t;\n        }\n        else\n        {\n            Trsv( LOWER, NORMAL, UNIT, B22, y );\n            Trsv( UPPER, NORMAL, NON_UNIT, B22, y );\n        }\n        Gemv( NORMAL, Real(-1), U12, y, Real(1), xTmp );\n        Scale( 1/rho, xTmp );\n\n        // xHat := alpha*x + (1-alpha)*zOld\n        xHat = xTmp;\n        Scale( alpha, xHat );\n        Axpy( 1-alpha, zOld, xHat );\n\n        // z := pos(xHat+u)\n        z = xHat;\n        Axpy( Real(1), u, z );\n        LowerClip( z, Real(0) );\n\n        // u := u + (xHat-z)\n        Axpy( Real(1),  xHat, u );\n        Axpy( Real(-1), z,    u );\n\n        const Real objective = Dot( c, xTmp );\n\n        // rNorm := || x - z ||_2\n        t = xTmp;\n        Axpy( Real(-1), z, t );\n        const Real rNorm = FrobeniusNorm( t );\n        // sNorm := |rho| || z - zOld ||_2\n        t = z;\n        Axpy( Real(-1), zOld, t );\n        const Real sNorm = Abs(rho)*FrobeniusNorm( t );\n\n        const Real epsPri = Sqrt(Real(n))*absTol +\n            relTol*Max(FrobeniusNorm(xTmp),FrobeniusNorm(z));\n        const Real epsDual = Sqrt(Real(n))*absTol +\n            relTol*Abs(rho)*FrobeniusNorm(u);\n\n        if( progress )\n        {\n            t = xTmp;\n            LowerClip( t, Real(0) );\n            Axpy( Real(-1), xTmp, t );\n            const Real clipDist = FrobeniusNorm( t );\n            std::cout << numIter << \": \"\n              << \"||x-z||_2=\" << rNorm << \", \"\n              << \"epsPri=\" << epsPri << \", \"\n              << \"|rho| ||z-zOld||_2=\" << sNorm << \", \"\n              << \"epsDual=\" << epsDual << \", \"\n              << \"||x-Pos(x)||_2=\" << clipDist << \", \"\n              << \"c'x=\" << objective << std::endl;\n        }\n        if( rNorm < epsPri && sNorm < epsDual )\n            break;\n        ++numIter;\n    }\n    if( maxIter == numIter )\n        std::cout << \"ADMM failed to converge\" << std::endl;\n    x = xTmp;\n    return numIter;\n}\n\ntemplate<typename Real>\ninline Int\nLinearProgram\n( const DistMatrix<Real>& A, const DistMatrix<Real>& b,\n  const DistMatrix<Real>& c, DistMatrix<Real>& x, DistMatrix<Real>& z, \n  DistMatrix<Real>& u,\n  Real rho=1., Real alpha=1.2, Int maxIter=500, Real absTol=1e-6, \n  Real relTol=1e-4, bool inv=true, bool progress=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LinearProgram\"))\n    if( IsComplex<Real>::val ) \n        LogicError(\"The datatype was assumed to be real\");\n    \n    // Cache a custom partially-pivoted LU factorization of \n    //    |  rho*I   A^H | = | B11  B12 |\n    //    |  A       0   |   | B21  B22 |\n    // by (justifiably) avoiding pivoting in the first n steps of\n    // the factorization, so that\n    //    [I,rho*I] = lu(rho*I).\n    // The factorization would then proceed with \n    //    B21 := B21 U11^{-1} = A (rho*I)^{-1} = A/rho\n    //    B12 := L11^{-1} B12 = I A^H = A^H.\n    // The Schur complement would then be\n    //    B22 := B22 - B21 B12 = 0 - (A*A^H)/rho.\n    // We then factor said matrix with LU with partial pivoting and\n    // swap the necessary rows of B21 in order to implicitly commute\n    // the row pivots with the Gauss transforms in the manner standard\n    // for GEPP. Unless A A' is singular, pivoting should not be needed,\n    // as Cholesky factorization of the negative matrix should be valid.\n    //\n    // The result is the factorization\n    //   | I 0   | | rho*I A^H | = | I   0   | | rho*I U12 |,\n    //   | 0 P22 | | A     0   |   | L21 L22 | | 0     U22 |\n    // where [L22,U22] are stored within B22.\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Grid& grid = A.Grid();\n    DistMatrix<Real> U12(grid), L21(grid), B22(grid), bPiv(grid);\n    U12.Align( 0,                 n%U12.RowStride() );\n    L21.Align( n%L21.ColStride(), 0                 );\n    B22.Align( n%B22.ColStride(), n%B22.RowStride() );\n    Adjoint( A, U12 );\n    L21 = A; Scale( 1/rho, L21 );\n    Herk( LOWER, NORMAL, -1/rho, A, B22 );\n    MakeHermitian( LOWER, B22 );\n    DistMatrix<Int,VC,STAR> perm2(grid);\n    LU( B22, perm2 );\n    PermuteRows( L21, perm2 );\n    bPiv = b;\n    PermuteRows( bPiv, perm2 );\n\n    // Possibly form the inverse of L22 U22\n    DistMatrix<Real> X22(grid);\n    if( inv )\n    {\n        X22 = B22;\n        MakeTriangular( LOWER, X22 );\n        SetDiagonal( X22, 1. );\n        TriangularInverse( LOWER, UNIT, X22 );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, 1., B22, X22 );\n    }\n\n    Int numIter=0;\n    DistMatrix<Real> g(grid), xTmp(grid), y(grid), t(grid);\n    Zeros( g, m+n, 1 );\n    PartitionDown( g, xTmp, y, n );\n    DistMatrix<Real> zOld(grid), xHat(grid);\n    Zeros( z, n, 1 );\n    Zeros( u, n, 1 );\n    Zeros( t, n, 1 );\n    while( numIter < maxIter )\n    {\n        zOld = z;\n\n        // Find x from\n        //  | rho*I  A^H | | x | = | rho*(z-u)-c | \n        //  | A      0   | | y |   | b           |\n        // via our cached custom factorization:\n        // \n        // |x| = inv(U) inv(L) P' |rho*(z-u)-c|\n        // |y|                    |b          |\n        //     = |rho*I U12|^{-1} |I   0  | |I 0   | |rho*(z-u)-c|\n        //     = |0     U22|      |L21 L22| |0 P22'| |b          |\n        //     = \"                        \" |rho*(z-u)-c|\n        //                                  | P22' b    |\n        xTmp = z;\n        Axpy( Real(-1), u, xTmp );\n        Scale( rho, xTmp );\n        Axpy( Real(-1), c, xTmp );\n        y = bPiv;\n        Gemv( NORMAL, Real(-1), L21, xTmp, Real(1), y );\n        if( inv )\n        {\n            Gemv( NORMAL, Real(1.), X22, y, t );\n            y = t;\n        }\n        else\n        {\n            Trsv( LOWER, NORMAL, UNIT, B22, y );\n            Trsv( UPPER, NORMAL, NON_UNIT, B22, y );\n        }\n        Gemv( NORMAL, Real(-1), U12, y, Real(1), xTmp );\n        Scale( 1/rho, xTmp );\n\n        // xHat := alpha*x + (1-alpha)*zOld\n        xHat = xTmp;\n        Scale( alpha, xHat );\n        Axpy( 1-alpha, zOld, xHat );\n\n        // z := pos(xHat+u)\n        z = xHat;\n        Axpy( Real(1), u, z );\n        LowerClip( z, Real(0) );\n\n        // u := u + (xHat-z)\n        Axpy( Real(1),  xHat, u );\n        Axpy( Real(-1), z,    u );\n\n        const Real objective = Dot( c, xTmp );\n\n        // rNorm := || x - z ||_2\n        t = xTmp;\n        Axpy( Real(-1), z, t );\n        const Real rNorm = FrobeniusNorm( t );\n        // sNorm := |rho| || z - zOld ||_2\n        t = z;\n        Axpy( Real(-1), zOld, t );\n        const Real sNorm = Abs(rho)*FrobeniusNorm( t );\n\n        const Real epsPri = Sqrt(Real(n))*absTol +\n            relTol*Max(FrobeniusNorm(xTmp),FrobeniusNorm(z));\n        const Real epsDual = Sqrt(Real(n))*absTol +\n            relTol*Abs(rho)*FrobeniusNorm(u);\n\n        if( progress )\n        {\n            t = xTmp;\n            LowerClip( t, Real(0) );\n            Axpy( Real(-1), xTmp, t );\n            const Real clipDist = FrobeniusNorm( t );\n            if( grid.Rank() == 0 )\n                std::cout << numIter << \": \"\n                  << \"||x-z||_2=\" << rNorm << \", \"\n                  << \"epsPri=\" << epsPri << \", \"\n                  << \"|rho| ||z-zOld||_2=\" << sNorm << \", \"\n                  << \"epsDual=\" << epsDual << \", \"\n                  << \"||x-Pos(x)||_2=\" << clipDist << \", \"\n                  << \"c'x=\" << objective << std::endl;\n        }\n        if( rNorm < epsPri && sNorm < epsDual )\n            break;\n        ++numIter;\n    }\n    if( maxIter == numIter && grid.Rank() == 0 )\n        std::cout << \"ADMM failed to converge\" << std::endl;\n    x = xTmp;\n    return numIter;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LINEARPROGRAM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/LogBarrier.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LOGBARRIER_HPP\n#define ELEM_LOGBARRIER_HPP\n\n#include ELEM_DETERMINANT_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline Base<F> \nLogBarrier( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LogBarrier\"))\n    SafeProduct<F> safeDet = SafeHPDDeterminant( uplo, A );\n    return -safeDet.kappa*safeDet.n;\n}\n\ntemplate<typename F>\ninline Base<F>\nLogBarrier( UpperOrLower uplo, Matrix<F>& A, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LogBarrier\"))\n    SafeProduct<F> safeDet = SafeHPDDeterminant( uplo, A, canOverwrite );\n    return -safeDet.kappa*safeDet.n;\n}\n\ntemplate<typename F> \ninline Base<F>\nLogBarrier( UpperOrLower uplo, const DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LogBarrier\"))\n    SafeProduct<F> safeDet = SafeHPDDeterminant( uplo, A );\n    return -safeDet.kappa*safeDet.n;\n}\n\ntemplate<typename F> \ninline Base<F>\nLogBarrier( UpperOrLower uplo, DistMatrix<F>& A, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LogBarrier\"))\n    SafeProduct<F> safeDet = SafeHPDDeterminant( uplo, A, canOverwrite );\n    return -safeDet.kappa*safeDet.n;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LOGBARRIER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/LogDetDiv.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LOGDETDIV_HPP\n#define ELEM_LOGDETDIV_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_TRSM_INC\n#include ELEM_TRSTRM_INC\n\n#include ELEM_CHOLESKY_INC\n#include ELEM_FROBENIUSNORM_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline Base<F> \nLogDetDiv( UpperOrLower uplo, const Matrix<F>& A, const Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LogDetDiv\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() ||\n        A.Height() != B.Height() )\n        LogicError(\"A and B must be square matrices of the same size\");\n\n    typedef Base<F> Real;\n    const Int n = A.Height();\n\n    Matrix<F> ACopy( A ), BCopy( B );\n    Cholesky( uplo, ACopy );\n    Cholesky( uplo, BCopy );\n\n    if( uplo == LOWER )\n    {\n        Trstrm( LEFT, uplo, NORMAL, NON_UNIT, F(1), BCopy, ACopy );\n    }\n    else\n    {\n        MakeTriangular( uplo, ACopy );\n        Trsm( LEFT, uplo, NORMAL, NON_UNIT, F(1), BCopy, ACopy );\n    }\n\n    MakeTriangular( uplo, ACopy );\n    const Real frobNorm = FrobeniusNorm( ACopy );\n\n    Matrix<F> d;\n    ACopy.GetDiagonal( d );\n    Real logDet(0);\n    for( Int i=0; i<n; ++i )\n        logDet += 2*Log( RealPart(d.Get(i,0)) );\n\n    return frobNorm*frobNorm - logDet - Real(n);\n}\n\ntemplate<typename F>\ninline Base<F> \nLogDetDiv( UpperOrLower uplo, const DistMatrix<F>& A, const DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LogDetDiv\"))\n    if( A.Grid() != B.Grid() )\n        LogicError(\"A and B must use the same grid\");\n    if( A.Height() != A.Width() || B.Height() != B.Width() ||\n        A.Height() != B.Height() )\n        LogicError(\"A and B must be square matrices of the same size\");\n\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Grid& g = A.Grid();\n\n    DistMatrix<F> ACopy( A ), BCopy( B );\n    Cholesky( uplo, ACopy );\n    Cholesky( uplo, BCopy );\n\n    if( uplo == LOWER )\n    {\n        Trstrm( LEFT, uplo, NORMAL, NON_UNIT, F(1), BCopy, ACopy );\n    }\n    else\n    {\n        MakeTriangular( uplo, ACopy );\n        Trsm( LEFT, uplo, NORMAL, NON_UNIT, F(1), BCopy, ACopy );\n    }\n\n    MakeTriangular( uplo, ACopy );\n    const Real frobNorm = FrobeniusNorm( ACopy );\n\n    Real localLogDet(0);\n    DistMatrix<F,MD,STAR> d(g);\n    ACopy.GetDiagonal( d );\n    if( d.Participating() )\n    {\n        const Int nLocalDiag = d.LocalHeight();\n        for( Int iLocal=0; iLocal<nLocalDiag; ++iLocal )\n        {\n            const Real delta = RealPart(d.GetLocal(iLocal,0));\n            localLogDet += 2*Log(delta);\n        }\n    }\n    const Real logDet = mpi::AllReduce( localLogDet, g.VCComm() );\n    return frobNorm*frobNorm - logDet - Real(n);\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LOGDETDIV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/QuadraticProgram.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QUADRATICPROGRAM_HPP\n#define ELEM_QUADRATICPROGRAM_HPP\n\n#include ELEM_CLIP_INC\n#include ELEM_DOT_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_UPDATEDIAGONAL_INC\n#include ELEM_GEMV_INC\n#include ELEM_HEMV_INC\n#include ELEM_TRSV_INC\n#include ELEM_CHOLESKY_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_TRIANGULARINVERSE_INC\n#include ELEM_ZEROS_INC\n\n// These implementations are adaptations of the solver described at\n//    http://www.stanford.edu/~boyd/papers/admm/quadprog/quadprog.html\n// which is derived from the distributed ADMM article of Boyd et al.\n//\n// This ADMM attempts to solve the following quadratic program:\n//     minimize    (1/2) x' P x + q' x\n//     subject to  lb <= x <= ub\n//\n\nnamespace elem {\n\ntemplate<typename Real>\ninline Int\nQuadraticProgram\n( const Matrix<Real>& P, const Matrix<Real>& q, Real lb, Real ub,\n  Matrix<Real>& x, Matrix<Real>& z, Matrix<Real>& u,\n  Real rho=1., Real alpha=1.2, Int maxIter=500, \n  Real absTol=1e-6, Real relTol=1e-4, bool inv=false, bool progress=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuadraticProgram\"))\n    if( IsComplex<Real>::val ) \n        LogicError(\"The datatype was assumed to be real\");\n    const Int n = P.Height();\n\n    // Cache the factorization of P + rho*I\n    Matrix<Real> LMod( P );\n    UpdateDiagonal( LMod, rho );\n    Cholesky( LOWER, LMod );\n    MakeTriangular( LOWER, LMod );\n\n    // Optionally invert the factor in place\n    if( inv )\n        TriangularInverse( LOWER, NON_UNIT, LMod );\n\n    // Start the ADMM\n    Int numIter=0;\n    Matrix<Real> t, zOld, xHat;\n    Zeros( z, n, 1 );\n    Zeros( u, n, 1 );\n    Zeros( t, n, 1 );\n    while( numIter < maxIter )\n    {\n        zOld = z;\n\n        // x := (P+rho*I)^{-1} (rho(z-u)-q)\n        x = z;\n        Axpy( Real(-1), u, x );\n        Scale( rho, x );\n        Axpy( Real(-1), q, x );\n        if( inv )\n        {\n            // TODO: Trmv\n            Gemv( NORMAL, Real(1), LMod, x, t );\n            Gemv( ADJOINT, Real(1), LMod, t, x );\n        }\n        else\n        {\n            Trsv( LOWER, NORMAL, NON_UNIT, LMod, x );\n            Trsv( LOWER, ADJOINT, NON_UNIT, LMod, x );\n        }\n\n        // xHat := alpha*x + (1-alpha)*zOld\n        xHat = x;\n        Scale( alpha, xHat );\n        Axpy( 1-alpha, zOld, xHat );\n\n        // z := Clip(xHat+u,lb,ub)\n        z = xHat;\n        Axpy( Real(1), u, z );\n        Clip( z, lb, ub );\n\n        // u := u + (xHat-z)\n        Axpy( Real(1),  xHat, u );\n        Axpy( Real(-1), z,    u );\n\n        // Form (1/2) x' P x + q' x\n        Zeros( t, n, 1 );\n        Hemv( LOWER, Real(1), P, x, Real(0), t );\n        const Real objective = Dot(x,t)/2 + Dot(q,x);\n\n        // rNorm := || x - z ||_2\n        t = x;\n        Axpy( Real(-1), z, t );\n        const Real rNorm = FrobeniusNorm( t );\n        // sNorm := |rho| || z - zOld ||_2\n        t = z;\n        Axpy( Real(-1), zOld, t );\n        const Real sNorm = Abs(rho)*FrobeniusNorm( t );\n\n        const Real epsPri = Sqrt(Real(n))*absTol +\n            relTol*Max(FrobeniusNorm(x),FrobeniusNorm(z));\n        const Real epsDual = Sqrt(Real(n))*absTol +\n            relTol*Abs(rho)*FrobeniusNorm(u);\n\n        if( progress )\n        {\n            t = x;\n            Clip( t, lb, ub );\n            Axpy( Real(-1), x, t );\n            const Real clipDist = FrobeniusNorm( t );\n            std::cout << numIter << \": \"\n              << \"||x-z||_2=\" << rNorm << \", \"\n              << \"epsPri=\" << epsPri << \", \"\n              << \"|rho| ||z-zOld||_2=\" << sNorm << \", \"\n              << \"epsDual=\" << epsDual << \", \"\n              << \"||x-Clip(x,lb,ub)||_2=\" << clipDist << \", \"\n              << \"(1/2) x' P x + q' x=\" << objective << std::endl;\n        }\n        if( rNorm < epsPri && sNorm < epsDual )\n            break;\n        ++numIter;\n    }\n    if( maxIter == numIter )\n        std::cout << \"ADMM failed to converge\" << std::endl;\n    return numIter;\n}\n\ntemplate<typename Real>\ninline Int\nQuadraticProgram\n( const DistMatrix<Real>& P, const DistMatrix<Real>& q, Real lb, Real ub,\n  DistMatrix<Real>& x, DistMatrix<Real>& z, DistMatrix<Real>& u,\n  Real rho=1., Real alpha=1.2, Int maxIter=500, Real absTol=1e-6, \n  Real relTol=1e-4, bool inv=true, bool progress=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuadraticProgram\"))\n    if( IsComplex<Real>::val ) \n        LogicError(\"The datatype was assumed to be real\");\n    const Grid& grid = P.Grid();\n    const Int n = P.Height();\n\n    // Cache the factorization of P + rho*I\n    DistMatrix<Real> LMod( P );\n    UpdateDiagonal( LMod, rho );\n    Cholesky( LOWER, LMod );\n    MakeTriangular( LOWER, LMod );\n\n    // Optionally invert the factor in place\n    if( inv )\n        TriangularInverse( LOWER, NON_UNIT, LMod );\n\n    // Start the ADMM\n    Int numIter=0;\n    DistMatrix<Real> t(grid), zOld(grid), xHat(grid);\n    Zeros( z, n, 1 );\n    Zeros( u, n, 1 );\n    Zeros( t, n, 1 );\n    while( numIter < maxIter )\n    {\n        zOld = z;\n\n        // x := (P+rho*I)^{-1} (rho(z-u)-q)\n        x = z;\n        Axpy( Real(-1), u, x );\n        Scale( rho, x );\n        Axpy( Real(-1), q, x );\n        if( inv )\n        {\n            // TODO: Trmv\n            Gemv( NORMAL, Real(1), LMod, x, t );\n            Gemv( ADJOINT, Real(1), LMod, t, x );\n        }\n        else\n        {\n            Trsv( LOWER, NORMAL, NON_UNIT, LMod, x );\n            Trsv( LOWER, ADJOINT, NON_UNIT, LMod, x );\n        }\n\n        // xHat := alpha*x + (1-alpha)*zOld\n        xHat = x;\n        Scale( alpha, xHat );\n        Axpy( 1-alpha, zOld, xHat );\n\n        // z := Clip(xHat+u,lb,ub)\n        z = xHat;\n        Axpy( Real(1), u, z );\n        Clip( z, lb, ub );\n\n        // u := u + (xHat-z)\n        Axpy( Real(1),  xHat, u );\n        Axpy( Real(-1), z,    u );\n\n        // Form (1/2) x' P x + q' x\n        Zeros( t, n, 1 );\n        Hemv( LOWER, Real(1), P, x, Real(0), t );\n        const Real objective = Dot(x,t)/2 + Dot(q,x);\n\n        // rNorm := || x - z ||_2\n        t = x;\n        Axpy( Real(-1), z, t );\n        const Real rNorm = FrobeniusNorm( t );\n        // sNorm := |rho| || z - zOld ||_2\n        t = z;\n        Axpy( Real(-1), zOld, t );\n        const Real sNorm = Abs(rho)*FrobeniusNorm( t );\n\n        const Real epsPri = Sqrt(Real(n))*absTol +\n            relTol*Max(FrobeniusNorm(x),FrobeniusNorm(z));\n        const Real epsDual = Sqrt(Real(n))*absTol +\n            relTol*Abs(rho)*FrobeniusNorm(u);\n\n        if( progress )\n        {\n            t = x;\n            Clip( t, lb, ub );\n            Axpy( Real(-1), x, t );\n            const Real clipDist = FrobeniusNorm( t );\n            if( grid.Rank() == 0 )\n                std::cout << numIter << \": \"\n                  << \"||x-z||_2=\" << rNorm << \", \"\n                  << \"epsPri=\" << epsPri << \", \"\n                  << \"|rho| ||z-zOld||_2=\" << sNorm << \", \"\n                  << \"epsDual=\" << epsDual << \", \"\n                  << \"||x-Clip(x,lb,ub)||_2=\" << clipDist << \", \"\n                  << \"(1/2) x' P x + q' x=\" << objective << std::endl;\n        }\n        if( rNorm < epsPri && sNorm < epsDual )\n            break;\n        ++numIter;\n    }\n    if( maxIter == numIter && grid.Rank() == 0 )\n        std::cout << \"ADMM failed to converge\" << std::endl;\n    return numIter;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_QUADRATICPROGRAM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/README.md",
    "content": "### `include/elemental/convex/`\n\n- `decl.hpp`: include all declarations of convex opt. related routines\n- `impl.hpp`: include all implementations of convex opt. related routines\n\nThis folder contains a few utilities for convex optimization; the only \nnontrivial one is for Singular Value soft-Thresholding (SVT).\n\n-  `LogBarrier.hpp`: negative log of the determinant of an HPD matrix\n-  `LogDetDiv.hpp`: divergence between two HPD matrices\n-  `SoftThreshold.hpp`: soft-threshold each entry of a matrix\n-  `SVT.hpp`: soft-threshold the singular values of a matrix\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/SVT/Cross.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SVT_CROSS_HPP\n#define ELEM_SVT_CROSS_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_ZERONORM_INC\n#include ELEM_SVD_INC\n#include ELEM_SOFTTHRESHOLD_INC\n\nnamespace elem {\n\nnamespace svt {\n\ntemplate<typename F>\ninline Int\nCross( Matrix<F>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svt::Cross\"))\n    typedef Base<F> Real;\n    Matrix<F> U( A );\n    Matrix<Real> s;\n    Matrix<F> V;\n\n    svd::Thresholded( U, s, V, tau, relative );\n    SoftThreshold( s, tau, relative );\n    DiagonalScale( RIGHT, NORMAL, s, U );\n    Gemm( NORMAL, ADJOINT, F(1), U, V, F(0), A );\n\n    return ZeroNorm( s );\n}\n\ntemplate<typename F>\ninline Int\nCross( DistMatrix<F>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svt::Cross\"))\n    typedef Base<F> Real;\n    DistMatrix<F> U( A );\n    DistMatrix<Real,VR,STAR> s( A.Grid() );\n    DistMatrix<F> V( A.Grid() );\n\n    svd::Thresholded( U, s, V, tau, relative );\n    SoftThreshold( s, tau, relative );\n    DiagonalScale( RIGHT, NORMAL, s, U );\n    Gemm( NORMAL, ADJOINT, F(1), U, V, F(0), A );\n\n    return ZeroNorm( s );\n}\n\ntemplate<typename F>\ninline Int\nTallCross( DistMatrix<F,VC,STAR>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svt::TallCross\"))\n    typedef Base<F> Real;\n    DistMatrix<F,VC,STAR> U( A );\n    DistMatrix<Real,STAR,STAR> s( A.Grid() );\n    DistMatrix<F,STAR,STAR> V( A.Grid() );\n\n    svd::TallThresholded( U, s, V, tau, relative );\n    SoftThreshold( s, tau, relative );\n    DiagonalScale( RIGHT, NORMAL, s, U );\n    LocalGemm( NORMAL, ADJOINT, F(1), U, V, F(0), A );\n\n    return ZeroNorm( s );\n}\n\n} // namespace svt\n} // namespace elem\n\n#endif // ifndef ELEM_SVT_CROSS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/SVT/Normal.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SVT_NORMAL_HPP\n#define ELEM_SVT_NORMAL_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_MAXNORM_INC\n#include ELEM_ZERONORM_INC\n#include ELEM_SVD_INC\n#include ELEM_SOFTTHRESHOLD_INC\n\nnamespace elem {\n\nnamespace svt {\n\ntemplate<typename F>\ninline Int\nNormal( Matrix<F>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svt::Normal\"))\n    typedef Base<F> Real;\n    Matrix<F> U( A );\n    Matrix<Real> s;\n    Matrix<F> V;\n\n    SVD( U, s, V );\n    SoftThreshold( s, tau, relative );\n    DiagonalScale( RIGHT, NORMAL, s, U );\n    Gemm( NORMAL, ADJOINT, F(1), U, V, F(0), A );\n\n    return ZeroNorm( s );\n}\n\ntemplate<typename F>\ninline Int\nNormal( DistMatrix<F>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svt::Normal\"))\n    typedef Base<F> Real;\n    DistMatrix<F> U( A );\n    DistMatrix<Real,VR,STAR> s( A.Grid() );\n    DistMatrix<F> V( A.Grid() );\n\n    SVD( U, s, V );\n    SoftThreshold( s, tau, relative );\n    DiagonalScale( RIGHT, NORMAL, s, U );\n    Gemm( NORMAL, ADJOINT, F(1), U, V, F(0), A );\n\n    return ZeroNorm( s );\n}\n\n} // namespace svt\n} // namespace elem\n\n#endif // ifndef ELEM_SVT_NORMAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/SVT/PivotedQR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SVT_PIVOTEDQR_HPP\n#define ELEM_SVT_PIVOTEDQR_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_ZERONORM_INC\n#include ELEM_QR_INC\n#include ELEM_SVD_INC\n#include ELEM_SOFTTHRESHOLD_INC\n\nnamespace elem {\nnamespace svt {\n\n// Preprocess with numSteps iterations of pivoted QR factorization\n\ntemplate<typename F>\ninline Int\nPivotedQR( Matrix<F>& A, Base<F> tau, Int numSteps, bool relative=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svt::PivotedQR\");\n        if( numSteps > std::min(A.Height(),A.Width()) )\n            LogicError(\"number of steps is too large\");\n    )\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    Matrix<F> ACopy( A ), t;\n    Matrix<Real> d;\n    Matrix<Int> pPerm;\n    qr::BusingerGolub( ACopy, t, d, pPerm, numSteps );\n    Matrix<F> ACopyUpper;\n    LockedView( ACopyUpper, ACopy, 0, 0, numSteps, n );\n\n    Matrix<F> U( ACopyUpper ), V;\n    Matrix<Real> s;\n    MakeTriangular( UPPER, U );\n    svd::Thresholded( U, s, V, tau, relative );\n    SoftThreshold( s, tau, relative );\n    DiagonalScale( RIGHT, NORMAL, s, U );\n    InversePermuteRows( V, pPerm );\n    Matrix<F> RThresh;\n    Gemm( NORMAL, ADJOINT, F(1), U, V, RThresh );\n\n    ACopy.Resize( m, numSteps );\n    ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, ACopy, t );\n    DiagonalScale( RIGHT, NORMAL, d, ACopy );\n    Gemm( NORMAL, NORMAL, F(1), ACopy, RThresh, F(0), A );\n\n    return ZeroNorm( s );\n}\n\n\ntemplate<typename F>\ninline Int\nPivotedQR( DistMatrix<F>& A, Base<F> tau, Int numSteps, bool relative=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svt::PivotedQR\");\n        if( numSteps > std::min(A.Height(),A.Width()) )\n            LogicError(\"number of steps is too large\");\n    )\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Grid& g = A.Grid();\n    DistMatrix<F> ACopy( A );\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Real,MD,STAR> d(g);\n    DistMatrix<Int,VR,STAR> pPerm(g);\n    qr::BusingerGolub( ACopy, t, d, pPerm, numSteps );\n    DistMatrix<F> ACopyUpper(g);\n    LockedView( ACopyUpper, ACopy, 0, 0, numSteps, n );\n\n    DistMatrix<F> U( ACopyUpper ), V(g);\n    DistMatrix<Real,VR,STAR> s(g);\n    MakeTriangular( UPPER, U );\n    svd::Thresholded( U, s, V, tau, relative );\n    SoftThreshold( s, tau, relative );\n    DiagonalScale( RIGHT, NORMAL, s, U );\n    InversePermuteRows( V, pPerm );\n    DistMatrix<F> RThresh(g);\n    Gemm( NORMAL, ADJOINT, F(1), U, V, RThresh );\n\n    ACopy.Resize( m, numSteps );\n    ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, ACopy, t );\n    DiagonalScale( RIGHT, NORMAL, d, ACopy );\n    Gemm( NORMAL, NORMAL, F(1), ACopy, RThresh, F(0), A );\n\n    return ZeroNorm( s );\n}\n\n} // namespace svt\n} // namespace elem\n\n#endif // ifndef ELEM_SVT_PIVOTEDQR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/SVT/TSQR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SVT_TSQR_HPP\n#define ELEM_SVT_TSQR_HPP\n\n#include ELEM_ZERONORM_INC\n#include ELEM_QR_INC\n\nnamespace elem {\nnamespace svt {\n\n// Singular-value soft-thresholding based on TSQR\n\ntemplate<typename F,Dist U>\ninline Int\nTSQR( DistMatrix<F,U,STAR>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SVT\"))\n    const Int p = mpi::Size( A.ColComm() );\n    if( p == 1 )\n        return SVT( A.Matrix(), tau, relative );\n\n    Int zeroNorm;\n    qr::TreeData<F> treeData;\n    treeData.QR0 = A.LockedMatrix();\n    QR( treeData.QR0, treeData.t0, treeData.d0 );\n    qr::ts::Reduce( A, treeData );\n    if( A.ColRank() == 0 )\n        zeroNorm = SVT( qr::ts::RootQR(A,treeData), tau, relative );\n    qr::ts::Scatter( A, treeData );\n\n    mpi::Broadcast( zeroNorm, 0, A.ColComm() );\n    return zeroNorm;\n}\n\n} // namespace svt\n} // namespace elem\n\n#endif // ifndef ELEM_SVT_TSQR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/SVT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SVT_HPP\n#define ELEM_SVT_HPP\n\n#include \"./SVT/Normal.hpp\"\n#include \"./SVT/Cross.hpp\"\n#include \"./SVT/PivotedQR.hpp\"\n#include \"./SVT/TSQR.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline Int\nSVT( Matrix<F>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SVT\"))\n    return svt::Normal( A, tau, relative );\n}\n\ntemplate<typename F>\ninline Int\nSVT( DistMatrix<F>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SVT\"))\n    // NOTE: This should be less accurate (but faster) than svt::Normal\n    return svt::Cross( A, tau, relative );\n}\n\ntemplate<typename F>\ninline Int\nSVT( Matrix<F>& A, Base<F> tau, Int relaxedRank, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SVT\"))\n    // Preprocess with numSteps iterations of pivoted QR factorization\n    return svt::PivotedQR( A, tau, relaxedRank, relative );\n}\n\ntemplate<typename F>\ninline Int\nSVT( DistMatrix<F>& A, Base<F> tau, Int relaxedRank, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SVT\"))\n    // Preprocess with numSteps iterations of pivoted QR factorization\n    return svt::PivotedQR( A, tau, relaxedRank, relative );\n}\n\n// Singular-value soft-thresholding based on TSQR\ntemplate<typename F,Dist U>\ninline Int\nSVT( DistMatrix<F,U,STAR>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SVT\"))\n    return svt::TSQR( A, tau, relative );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SVT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/SoftThreshold.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SOFTTHRESHOLD_HPP\n#define ELEM_SOFTTHRESHOLD_HPP\n\n#include ELEM_MAXNORM_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline F\nSoftThreshold( F alpha, Base<F> tau )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"SoftThreshold\");\n        if( tau < 0 )\n            LogicError(\"Negative threshold does not make sense\");\n    )\n    const Base<F> scale = Abs(alpha);\n    return ( scale <= tau ? F(0) : alpha-(alpha/scale)*tau );\n}\n\ntemplate<typename F>\ninline void\nSoftThreshold( Matrix<F>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SoftThreshold\"))\n    if( relative )\n        tau *= MaxNorm(A);\n    const Int height = A.Height();\n    const Int width = A.Width();\n    for( Int j=0; j<width; ++j )\n        for( Int i=0; i<height; ++i )\n            A.Set( i, j, SoftThreshold(A.Get(i,j),tau) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nSoftThreshold( DistMatrix<F,U,V>& A, Base<F> tau, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SoftThreshold\"))\n    if( relative )\n        tau *= MaxNorm(A);\n    SoftThreshold( A.Matrix(), tau, false );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SOFTTHRESHOLD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/SparseInvCov.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SPARSEINVCOV_HPP\n#define ELEM_SPARSEINVCOV_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_HILBERTSCHMIDT_INC\n#include ELEM_SCALE_INC\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_DETERMINANT_INC\n#include ELEM_ENTRYWISEONENORM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_HERMITIANFUNCTION_INC\n#include ELEM_COVARIANCE_INC\n#include ELEM_SOFTTHRESHOLD_INC\n#include ELEM_ZEROS_INC\n\n// These implementations are adaptations of the solver described at\n//    http://www.stanford.edu/~boyd/papers/admm/covsel/covsel.html\n// which is derived from the distributed ADMM article of Boyd et al.\n//\n// This ADMM attempts to solve the problem:\n//     minimize Tr(S*X) - log det X + lambda ||X||_1\n// where S is the empirical covariance of the data matrix D.\n//\n\nnamespace elem {\n\ntemplate<typename F>\ninline Int\nSparseInvCov\n( const Matrix<F>& D, Matrix<F>& X, Matrix<F>& Z, Matrix<F>& U,\n  Base<F> lambda, Base<F> rho=1., Base<F> alpha=1.2, Int maxIter=500, \n  Base<F> absTol=1e-6, Base<F> relTol=1e-4, bool progress=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SparseInvCov\"))\n    typedef Base<F> Real;\n    const Int n = D.Width();\n\n    Matrix<F> S;\n    Covariance( D, S );\n    MakeHermitian( LOWER, S );\n\n    Zeros( X, n, n );\n    Zeros( Z, n, n );\n    Zeros( U, n, n );\n    \n    Int numIter=0;\n    Matrix<F> ZOld, XHat, T;\n    while( numIter < maxIter )\n    {\n        ZOld = Z;\n\n        // X := rho*(Z-U) - S\n        X = Z;\n        Axpy( F(-1), U, X );\n        Scale( rho, X );\n        Axpy( F(-1), S, X );\n\n        // X := f(X), f(gamma) = (gamma+sqrt(gamma+4*rho)) / (2*rho)\n        RealHermitianFunction\n        ( LOWER, X, \n          [rho](Real gamma){return (gamma+Sqrt(gamma*gamma+4*rho))/(2*rho);} );\n        // Make X explicitly Hermitian since HermitianHilbertSchmidt is not\n        // yet available. This should result in Z and U remaining explicitly\n        // Hermitian.\n        MakeHermitian( LOWER, X );\n\n        // XHat := alpha*X + (1-alpha)*ZOld\n        XHat = X;\n        Scale( alpha, XHat );\n        Axpy( 1-alpha, ZOld, XHat );\n\n        // Z := SoftThreshold(XHat+U,lambda/rho)\n        Z = XHat;\n        Axpy( Real(1), U, Z );\n        SoftThreshold( Z, lambda/rho );\n\n        // U := U + (XHat-Z)\n        Axpy( Real(1),  XHat, U );\n        Axpy( Real(-1), Z,    U );\n\n        // rNorm := || X - Z ||_F\n        T = X;\n        Axpy( Real(-1), Z, T );\n        const Real rNorm = FrobeniusNorm(T);\n        // sNorm := |rho| || Z - ZOld ||_F\n        T = Z;\n        Axpy( Real(-1), ZOld, T );\n        const Real sNorm = Abs(rho)*FrobeniusNorm(T);\n\n        const Real epsPri = n*absTol + \n            relTol*Max(FrobeniusNorm(X),FrobeniusNorm(Z));\n        const Real epsDual = n*absTol + relTol*Abs(rho)*FrobeniusNorm(U);\n\n        if( progress )\n        {\n            const Real trace = RealPart(HilbertSchmidt( S, X ));\n            const SafeProduct<Real> safeDet = SafeHPDDeterminant( LOWER, X );\n            const Real ZOne = EntrywiseOneNorm( Z );\n            const Real objective = trace-safeDet.kappa*safeDet.n+lambda*ZOne;\n            std::cout << numIter << \": \"\n              << \"||X-Z||_F=\" << rNorm << \", \"\n              << \"epsPri=\" << epsPri << \", \"\n              << \"|rho| ||Z-ZOld||_F=\" << sNorm << \", \"\n              << \"epsDual=\" << epsDual << \", \"\n              << \"objective=\" << objective << std::endl;\n        }\n        if( rNorm < epsPri && sNorm < epsDual )\n            break;\n        ++numIter;\n    }\n    if( maxIter == numIter )\n        std::cout << \"ADMM failed to converge\" << std::endl;\n    return numIter;\n}\n\ntemplate<typename F>\ninline Int\nSparseInvCov\n( const DistMatrix<F>& D, DistMatrix<F>& X, DistMatrix<F>& Z, DistMatrix<F>& U,\n  Base<F> lambda, Base<F> rho=1., Base<F> alpha=1.2, Int maxIter=500, \n  Base<F> absTol=1e-6, Base<F> relTol=1e-4, bool progress=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SparseInvCov\"))\n    typedef Base<F> Real;\n    const Grid& g = D.Grid();\n    const Int n = D.Width();\n\n    DistMatrix<F> S(g);\n    Covariance( D, S );\n    MakeHermitian( LOWER, S );\n\n    Zeros( X, n, n );\n    Zeros( Z, n, n );\n    Zeros( U, n, n );\n    \n    Int numIter=0;\n    DistMatrix<F> ZOld(g), XHat(g), T(g);\n    while( numIter < maxIter )\n    {\n        ZOld = Z;\n\n        // X := rho*(Z-U) - S\n        X = Z;\n        Axpy( F(-1), U, X );\n        Scale( rho, X );\n        Axpy( F(-1), S, X );\n\n        // X := f(X), f(gamma) = (gamma+sqrt(gamma+4*rho)) / (2*rho)\n        RealHermitianFunction\n        ( LOWER, X, \n          [rho](Real gamma){return (gamma+Sqrt(gamma*gamma+4*rho))/(2*rho);} );\n        // Make X explicitly Hermitian since HermitianHilbertSchmidt is not\n        // yet available. This should result in Z and U remaining explicitly\n        // Hermitian.\n        MakeHermitian( LOWER, X );\n\n        // XHat := alpha*X + (1-alpha)*ZOld\n        XHat = X;\n        Scale( alpha, XHat );\n        Axpy( 1-alpha, ZOld, XHat );\n\n        // Z := SoftThreshold(XHat+U,lambda/rho)\n        Z = XHat;\n        Axpy( Real(1), U, Z );\n        SoftThreshold( Z, lambda/rho );\n\n        // U := U + (XHat-Z)\n        Axpy( Real(1),  XHat, U );\n        Axpy( Real(-1), Z,    U );\n\n        // rNorm := || X - Z ||_F\n        T = X;\n        Axpy( Real(-1), Z, T );\n        const Real rNorm = FrobeniusNorm(T);\n        // sNorm := |rho| || Z - ZOld ||_F\n        T = Z;\n        Axpy( Real(-1), ZOld, T );\n        const Real sNorm = Abs(rho)*FrobeniusNorm(T);\n\n        const Real epsPri = n*absTol + \n            relTol*Max(FrobeniusNorm(X),FrobeniusNorm(Z));\n        const Real epsDual = n*absTol + relTol*Abs(rho)*FrobeniusNorm(U);\n\n        if( progress )\n        {\n            const Real trace = RealPart(HilbertSchmidt( S, X ));\n            const SafeProduct<Real> safeDet = SafeHPDDeterminant( LOWER, X );\n            const Real ZOne = EntrywiseOneNorm( Z );\n            const Real objective = trace-safeDet.kappa*safeDet.n+lambda*ZOne;\n            if( g.Rank() == 0 )\n                std::cout << numIter << \": \"\n                  << \"||X-Z||_F=\" << rNorm << \", \"\n                  << \"epsPri=\" << epsPri << \", \"\n                  << \"|rho| ||Z-ZOld||_F=\" << sNorm << \", \"\n                  << \"epsDual=\" << epsDual << \", \"\n                  << \"objective=\" << objective << std::endl;\n        }\n        if( rNorm < epsPri && sNorm < epsDual )\n            break;\n        ++numIter;\n    }\n    if( maxIter == numIter && g.Rank() == 0 )\n        std::cout << \"ADMM failed to converge\" << std::endl;\n    return numIter;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SPARSEINVCOV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONVEX_DECL_HPP\n#define ELEM_CONVEX_DECL_HPP\n\nnamespace elem {\n\n// No reason to put anything here, yet\n\n} // namespace elem\n\n#endif // ifndef ELEM_CONVEX_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONVEX_IMPL_HPP\n#define ELEM_CONVEX_IMPL_HPP\n\n// Utilities\n#include \"./Clip.hpp\"\n#include \"./LogBarrier.hpp\"\n#include \"./LogDetDiv.hpp\"\n#include \"./SoftThreshold.hpp\"\n#include \"./SVT.hpp\"\n\n// ADMM \n#include \"./BasisPursuit.hpp\"\n#include \"./LinearProgram.hpp\"\n#include \"./QuadraticProgram.hpp\"\n\n#endif // ifndef ELEM_CONVEX_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/convex.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONVEX_HPP\n#define ELEM_CONVEX_HPP\n\n#include \"./convex/decl.hpp\"\n#include \"./convex/impl.hpp\"\n\n#endif // ifndef ELEM_CONVEX_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/AxpyInterface/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   Copyright (c) 2011, The University of Texas at Austin\n   All rights reserved.\n\n   Authors:\n   This interface is mainly due to Martin Schatz, but it was put into its\n   current form by Jack Poulson.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_AXPYINTERFACE_DECL_HPP\n#define ELEM_AXPYINTERFACE_DECL_HPP\n\nnamespace elem {\n\nnamespace AxpyTypeNS {\nenum AxpyType { LOCAL_TO_GLOBAL, GLOBAL_TO_LOCAL };\n}\nusing namespace AxpyTypeNS;\n\ntemplate<typename T>\nclass AxpyInterface\n{   \npublic:\n    AxpyInterface();\n    ~AxpyInterface();\n\n    AxpyInterface( AxpyType type,       DistMatrix<T,MC,MR>& Z );\n    AxpyInterface( AxpyType type, const DistMatrix<T,MC,MR>& Z ); \n\n    void Attach( AxpyType type,       DistMatrix<T,MC,MR>& Z ); \n    void Attach( AxpyType type, const DistMatrix<T,MC,MR>& Z ); \n\n    void Axpy( T alpha,       Matrix<T>& Z, Int i, Int j );\n    void Axpy( T alpha, const Matrix<T>& Z, Int i, Int j );\n\n    void Detach();\n\nprivate:\n    static const Int \n        DATA_TAG        =1, \n        EOM_TAG         =2, \n        DATA_REQUEST_TAG=3, \n        DATA_REPLY_TAG  =4;\n\n    bool attachedForLocalToGlobal_, attachedForGlobalToLocal_;\n    DistMatrix<T,MC,MR>* localToGlobalMat_;\n    const DistMatrix<T,MC,MR>* globalToLocalMat_;\n\n    byte sendDummy_, recvDummy_;\n\n    std::vector<bool> sentEomTo_, haveEomFrom_;\n    std::vector<byte> recvVector_;\n    std::vector<mpi::Request> eomSendRequests_;\n\n    std::vector<std::deque<std::vector<byte>>>\n        dataVectors_, requestVectors_, replyVectors_;\n    std::vector<std::deque<bool>> \n        sendingData_, sendingRequest_, sendingReply_;\n    std::vector<std::deque<mpi::Request>> \n        dataSendRequests_, requestSendRequests_, replySendRequests_;\n\n    // Check if we are done with this attachment's work\n    bool Finished();\n\n    // Progress functions\n    void UpdateRequestStatuses();\n    void HandleEoms();\n    void HandleLocalToGlobalData();\n    void HandleGlobalToLocalRequest();\n    void StartSendingEoms();\n    void FinishSendingEoms();\n\n    void AxpyLocalToGlobal( T alpha, const Matrix<T>& X, Int i, Int j );\n    void AxpyGlobalToLocal( T alpha,       Matrix<T>& Y, Int i, Int j );\n\n    Int ReadyForSend\n    ( Int sendSize,\n      std::deque<std::vector<byte>>& sendVectors,\n      std::deque<mpi::Request>& requests, \n      std::deque<bool>& requestStatuses );\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_AXPYINTERFACE_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/AxpyInterface/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   Copyright (c) 2011, The University of Texas at Austin\n   All rights reserved.\n\n   Authors:\n   This interface is mainly due to Martin Schatz, but it was put into its\n   current form by Jack Poulson.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_AXPYINTERFACE_IMPL_HPP\n#define ELEM_AXPYINTERFACE_IMPL_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline bool\nAxpyInterface<T>::Finished()\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"AxpyInterface::Finished\");\n        if( !attachedForLocalToGlobal_ && !attachedForGlobalToLocal_ )\n            LogicError(\"Not attached\");\n    )\n    const Grid& g = ( attachedForLocalToGlobal_ ? \n                      localToGlobalMat_->Grid() : \n                      globalToLocalMat_->Grid() );\n    const Int p = g.Size();\n\n    bool finished = true; \n    for( Int rank=0; rank<p; ++rank )\n    {\n        if( !sentEomTo_[rank] || !haveEomFrom_[rank] )\n        {\n            finished = false;\n            break;\n        }\n    }\n    return finished;\n}\n\ntemplate<typename T>\ninline void\nAxpyInterface<T>::HandleEoms()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::HandleEoms\"))\n    const Grid& g = ( attachedForLocalToGlobal_ ? \n                      localToGlobalMat_->Grid() : \n                      globalToLocalMat_->Grid() );\n    const Int p = g.Size();\n\n    UpdateRequestStatuses();\n\n    // Try to progress our EOM sends\n    for( Int i=0; i<p; ++i )\n    {\n        if( !sentEomTo_[i] )\n        {\n            bool shouldSendEom = true;\n            const Int numSends = sendingData_[i].size();\n            for( Int j=0; j<numSends; ++j )\n            {\n                if( sendingData_[i][j] )\n                {\n                    shouldSendEom = false;\n                    break;\n                }\n            }\n            const Int numRequests = sendingRequest_[i].size();\n            for( Int j=0; j<numRequests; ++j )\n            {\n                if( !shouldSendEom || sendingRequest_[i][j] )\n                {\n                    shouldSendEom = false; \n                    break;\n                }\n            }\n            const Int numReplies = sendingReply_[i].size();\n            for( Int j=0; j<numReplies; ++j )\n            {\n                if( !shouldSendEom || sendingReply_[i][j] )\n                {\n                    shouldSendEom = false;\n                    break;\n                }\n            }\n            if( shouldSendEom )\n            {\n                mpi::Request& request = eomSendRequests_[i];\n                mpi::TaggedISSend\n                ( &sendDummy_, 1, i, EOM_TAG, g.VCComm(), request );\n                sentEomTo_[i] = true;\n            }\n        }\n    }\n\n    mpi::Status status;\n    if( mpi::IProbe( mpi::ANY_SOURCE, EOM_TAG, g.VCComm(), status ) )\n    {\n        const Int source = status.MPI_SOURCE;\n        mpi::TaggedRecv( &recvDummy_, 1, source, EOM_TAG, g.VCComm() );\n        haveEomFrom_[source] = true;\n    }\n}\n\ntemplate<typename T>\ninline void\nAxpyInterface<T>::HandleLocalToGlobalData()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::HandleLocalToGlobalData\"))\n    DistMatrix<T,MC,MR>& Y = *localToGlobalMat_;\n    const Grid& g = Y.Grid();\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int myRow = g.Row();\n    const Int myCol = g.Col();\n\n    mpi::Status status;\n    if( mpi::IProbe( mpi::ANY_SOURCE, DATA_TAG, g.VCComm(), status ) )\n    {\n        // Message exists, so recv and pack    \n        const Int count = mpi::GetCount<byte>( status );\n        DEBUG_ONLY(\n            if( count < Int(4*sizeof(Int)+sizeof(T)) )\n                LogicError(\"Count was too small\");\n        )\n        const Int source = status.MPI_SOURCE;\n        recvVector_.resize( count );\n        byte* recvBuffer = recvVector_.data();\n        mpi::TaggedRecv( recvBuffer, count, source, DATA_TAG, g.VCComm() );\n\n        // Extract the header\n        byte* head = recvBuffer;\n        const Int i = *reinterpret_cast<const Int*>(head); \n        head += sizeof(Int);\n        const Int j = *reinterpret_cast<const Int*>(head); \n        head += sizeof(Int);\n        const Int height = *reinterpret_cast<const Int*>(head); \n        head += sizeof(Int);\n        const Int width = *reinterpret_cast<const Int*>(head); \n        head += sizeof(Int);\n        const T alpha = *reinterpret_cast<const T*>(head); \n        head += sizeof(T);\n        DEBUG_ONLY(\n            if( height < 0 || width < 0 )\n                RuntimeError\n                (\"Unpacked heights were negative:\\n\",\n                 \"  i=     \",i,std::hex,\"(\",i,\")\\n\",std::dec,\n                 \"  j=     \",j,std::hex,\"(\",j,\")\\n\",std::dec,\n                 \"  height=\",height,std::hex,\"(\",height,\")\\n\",std::dec, \n                 \"  width= \",width,std::hex,\"(\",width,\")\\n\",std::dec,\n                 \"  alpha= \",alpha);\n            if( i < 0 || j < 0 )\n                RuntimeError\n                (\"Unpacked offsets were negative:\\n\",\n                 \"  i=     \",i,std::hex,\"(\",i,\")\\n\",std::dec,\n                 \"  j=     \",j,std::hex,\"(\",j,\")\\n\",std::dec,\n                 \"  height=\",height,std::hex,\"(\",height,\")\\n\",std::dec,\n                 \"  width= \",width,std::hex,\"(\",width,\")\\n\",std::dec,\n                 \"  alpha= \",alpha);\n            if( i+height > Y.Height() || j+width > Y.Width() )\n                RuntimeError\n                (\"Unpacked submatrix was out of bounds:\\n\",\n                 \"  i=     \",i,std::hex,\"(\",i,\")\\n\",std::dec,\n                 \"  j=     \",j,std::hex,\"(\",j,\")\\n\",std::dec,\n                 \"  height=\",height,std::hex,\"(\",height,\")\\n\",std::dec, \n                 \"  width= \",width,std::hex,\"(\",width,\")\\n\",std::dec,\n                 \"  alpha= \",alpha);\n        )\n\n        // Update Y\n        const T* XBuffer = reinterpret_cast<const T*>(head);\n        const Int colAlign = (Y.ColAlign()+i) % r;\n        const Int rowAlign = (Y.RowAlign()+j) % c;\n        const Int colShift = Shift( myRow, colAlign, r );\n        const Int rowShift = Shift( myCol, rowAlign, c );\n\n        const Int localHeight = Length( height, colShift, r );\n        const Int localWidth = Length( width, rowShift, c );\n        const Int iLocalOffset = Length( i, Y.ColShift(), r );\n        const Int jLocalOffset = Length( j, Y.RowShift(), c );\n\n        for( Int t=0; t<localWidth; ++t )\n        {\n            T* YCol = Y.Buffer(iLocalOffset,jLocalOffset+t);\n            const T* XCol = &XBuffer[t*localHeight];\n            for( Int s=0; s<localHeight; ++s )\n                YCol[s] += alpha*XCol[s];\n        }\n\n        // Free the memory for the recv buffer\n        recvVector_.clear();\n    }\n}\n    \ntemplate<typename T>\ninline void\nAxpyInterface<T>::HandleGlobalToLocalRequest()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::HandleGlobalToLocalRequest\"))\n    const DistMatrix<T,MC,MR>& X = *globalToLocalMat_;\n    const Grid& g = X.Grid();\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int myRow = g.Row();\n    const Int myCol = g.Col();\n\n    mpi::Status status;\n    if( mpi::IProbe( mpi::ANY_SOURCE, DATA_REQUEST_TAG, g.VCComm(), status ) )\n    {\n        // Request exists, so recv\n        const Int source = status.MPI_SOURCE;\n        const Int recvSize = 4*sizeof(Int);\n        recvVector_.resize( recvSize );\n        byte* recvBuffer = recvVector_.data();\n        mpi::TaggedRecv\n        ( recvBuffer, recvSize, source, DATA_REQUEST_TAG, g.VCComm() );\n\n        // Extract the header\n        const byte* recvHead = recvBuffer;\n        const Int i = *reinterpret_cast<const Int*>(recvHead); \n        recvHead += sizeof(Int);\n        const Int j = *reinterpret_cast<const Int*>(recvHead);\n        recvHead += sizeof(Int);\n        const Int height = *reinterpret_cast<const Int*>(recvHead);\n        recvHead += sizeof(Int);\n        const Int width = *reinterpret_cast<const Int*>(recvHead);\n        recvHead += sizeof(Int);\n\n        const Int colAlign = (X.ColAlign()+i) % r;\n        const Int rowAlign = (X.RowAlign()+j) % c;\n        const Int colShift = Shift( myRow, colAlign, r );\n        const Int rowShift = Shift( myCol, rowAlign, c );\n\n        const Int iLocalOffset = Length( i, X.ColShift(), r );\n        const Int jLocalOffset = Length( j, X.RowShift(), c );\n        const Int localHeight = Length( height, colShift, r );\n        const Int localWidth = Length( width, rowShift, c );\n        const Int numEntries = localHeight*localWidth;\n\n        const Int bufferSize = 2*sizeof(Int) + numEntries*sizeof(T);\n        const Int index = \n            ReadyForSend\n            ( bufferSize, replyVectors_[source], \n              replySendRequests_[source], sendingReply_[source] );\n\n        // Pack the reply header\n        byte* sendBuffer = replyVectors_[source][index].data();\n        byte* sendHead = sendBuffer;\n        *reinterpret_cast<Int*>(sendHead) = myRow; sendHead += sizeof(Int);\n        *reinterpret_cast<Int*>(sendHead) = myCol; sendHead += sizeof(Int);\n\n        // Pack the payload\n        T* sendData = reinterpret_cast<T*>(sendHead);\n        for( Int t=0; t<localWidth; ++t )\n        {\n            T* sendCol = &sendData[t*localHeight];\n            const T* XCol = X.LockedBuffer(iLocalOffset,jLocalOffset+t);\n            MemCopy( sendCol, XCol, localHeight );\n        }\n\n        // Fire off non-blocking send\n        mpi::TaggedISSend\n        ( sendBuffer, bufferSize, source, DATA_REPLY_TAG, g.VCComm(), \n          replySendRequests_[source][index] );\n    }\n}\n\ntemplate<typename T>\ninline\nAxpyInterface<T>::AxpyInterface()\n: attachedForLocalToGlobal_(false), attachedForGlobalToLocal_(false), \n  localToGlobalMat_(0), globalToLocalMat_(0),\n  sendDummy_(0), recvDummy_(0)\n{ }\n\ntemplate<typename T>\ninline\nAxpyInterface<T>::AxpyInterface( AxpyType type, DistMatrix<T,MC,MR>& Z )\n: sendDummy_(0), recvDummy_(0)\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::AxpyInterface\"))\n    if( type == LOCAL_TO_GLOBAL )\n    {\n        attachedForLocalToGlobal_ = true;\n        attachedForGlobalToLocal_ = false;\n        localToGlobalMat_ = &Z;\n        globalToLocalMat_ = 0;\n    }\n    else\n    {\n        attachedForLocalToGlobal_ = false;\n        attachedForGlobalToLocal_ = true;\n        localToGlobalMat_ = 0;\n        globalToLocalMat_ = &Z;\n    }\n\n    const Int p = Z.Grid().Size();\n    sentEomTo_.resize( p, false );\n    haveEomFrom_.resize( p, false );\n\n    sendingData_.resize( p );\n    sendingRequest_.resize( p );\n    sendingReply_.resize( p );\n\n    dataVectors_.resize( p );\n    requestVectors_.resize( p );\n    replyVectors_.resize( p );\n\n    dataSendRequests_.resize( p );\n    requestSendRequests_.resize( p );\n    replySendRequests_.resize( p );\n\n    eomSendRequests_.resize( p );\n}\n\ntemplate<typename T>\ninline\nAxpyInterface<T>::AxpyInterface\n( AxpyType type, const DistMatrix<T,MC,MR>& X )\n: sendDummy_(0), recvDummy_(0)\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::AxpyInterface\"))\n    if( type == LOCAL_TO_GLOBAL )\n    {\n        LogicError(\"Cannot update a constant matrix\");\n    }\n    else\n    {\n        attachedForLocalToGlobal_ = false;\n        attachedForGlobalToLocal_ = true;\n        localToGlobalMat_ = 0;\n        globalToLocalMat_ = &X;\n    }\n\n    const Int p = X.Grid().Size();\n    sentEomTo_.resize( p, false );\n    haveEomFrom_.resize( p, false );\n\n    sendingData_.resize( p );\n    sendingRequest_.resize( p );\n    sendingReply_.resize( p );\n\n    dataVectors_.resize( p );\n    requestVectors_.resize( p );\n    replyVectors_.resize( p );\n\n    dataSendRequests_.resize( p );\n    requestSendRequests_.resize( p );\n    replySendRequests_.resize( p );\n\n    eomSendRequests_.resize( p );\n}\n\ntemplate<typename T>\ninline\nAxpyInterface<T>::~AxpyInterface()\n{ \n    if( attachedForLocalToGlobal_ || attachedForGlobalToLocal_ )\n    {\n        if( std::uncaught_exception() )\n        {\n           const Grid& g = ( attachedForLocalToGlobal_ ? \n                             localToGlobalMat_->Grid() : \n                             globalToLocalMat_->Grid() );\n           std::ostringstream os;\n           os << g.Rank()\n              << \"Uncaught exception detected during AxpyInterface destructor \"\n                 \"that required a call to Detach. Instead of allowing for the \"\n                 \"possibility of Detach throwing another exception and \"\n                 \"resulting in a 'terminate', we instead immediately dump the \"\n                 \"call stack (if not in RELEASE mode) since the program will \"\n                 \"likely hang:\" << std::endl;\n           std::cerr << os.str();\n           DEBUG_ONLY(DumpCallStack())\n        }\n        else\n        {\n            Detach(); \n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nAxpyInterface<T>::Attach( AxpyType type, DistMatrix<T,MC,MR>& Z )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::Attach\"))\n    if( attachedForLocalToGlobal_ || attachedForGlobalToLocal_ )\n        LogicError(\"Must detach before reattaching.\");\n\n    if( type == LOCAL_TO_GLOBAL )\n    {\n        attachedForLocalToGlobal_ = true;\n        localToGlobalMat_ = &Z;\n    }\n    else\n    {\n        attachedForGlobalToLocal_ = true;\n        globalToLocalMat_ = &Z;\n    }\n\n    const Int p = Z.Grid().Size();\n    sentEomTo_.resize( p, false );\n    haveEomFrom_.resize( p, false );\n\n    sendingData_.resize( p );\n    sendingRequest_.resize( p );\n    sendingReply_.resize( p );\n\n    dataVectors_.resize( p );\n    requestVectors_.resize( p );\n    replyVectors_.resize( p );\n\n    dataSendRequests_.resize( p );\n    requestSendRequests_.resize( p );\n    replySendRequests_.resize( p );\n\n    eomSendRequests_.resize( p );\n}\n\ntemplate<typename T>\ninline void\nAxpyInterface<T>::Attach( AxpyType type, const DistMatrix<T,MC,MR>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::Attach\"))\n    if( attachedForLocalToGlobal_ || attachedForGlobalToLocal_ )\n        LogicError(\"Must detach before reattaching.\");\n\n    if( type == LOCAL_TO_GLOBAL )\n    {\n        LogicError(\"Cannot update a constant matrix\");\n    }\n    else\n    {\n        attachedForGlobalToLocal_ = true;\n        globalToLocalMat_ = &X;\n    }\n\n    const Int p = X.Grid().Size();\n    sentEomTo_.resize( p, false );\n    haveEomFrom_.resize( p, false );\n\n    sendingData_.resize( p );\n    sendingRequest_.resize( p );\n    sendingReply_.resize( p );\n\n    dataVectors_.resize( p );\n    requestVectors_.resize( p );\n    replyVectors_.resize( p );\n\n    dataSendRequests_.resize( p );\n    requestSendRequests_.resize( p );\n    replySendRequests_.resize( p );\n\n    eomSendRequests_.resize( p );\n}\n\ntemplate<typename T>\ninline void \nAxpyInterface<T>::Axpy( T alpha, Matrix<T>& Z, Int i, Int j )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::Axpy\"))\n    if( attachedForLocalToGlobal_ )\n        AxpyLocalToGlobal( alpha, Z, i, j );\n    else if( attachedForGlobalToLocal_ )\n        AxpyGlobalToLocal( alpha, Z, i, j );\n    else\n        LogicError(\"Cannot axpy before attaching.\");\n}\n\ntemplate<typename T>\ninline void \nAxpyInterface<T>::Axpy( T alpha, const Matrix<T>& Z, Int i, Int j )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::Axpy\"))\n    if( attachedForLocalToGlobal_ )\n        AxpyLocalToGlobal( alpha, Z, i, j );\n    else if( attachedForGlobalToLocal_ )\n        LogicError(\"Cannot update a constant matrix.\");\n    else\n        LogicError(\"Cannot axpy before attaching.\");\n}\n\n// Update Y(i:i+height-1,j:j+width-1) += alpha X, where X is height x width\ntemplate<typename T>\ninline void\nAxpyInterface<T>::AxpyLocalToGlobal\n( T alpha, const Matrix<T>& X, Int i, Int j )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::AxpyLocalToGlobal\"))\n    DistMatrix<T,MC,MR>& Y = *localToGlobalMat_;\n    if( i < 0 || j < 0 )\n        LogicError(\"Submatrix offsets must be non-negative\");\n    if( i+X.Height() > Y.Height() || j+X.Width() > Y.Width() )\n        LogicError(\"Submatrix out of bounds of global matrix\");\n\n    const Grid& g = Y.Grid();\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int p = g.Size();\n    const Int myProcessRow = g.Row();\n    const Int myProcessCol = g.Col();\n    const Int colAlign = (Y.ColAlign() + i) % r;\n    const Int rowAlign = (Y.RowAlign() + j) % c;\n\n    const Int height = X.Height();\n    const Int width = X.Width();\n\n    Int receivingRow = myProcessRow;\n    Int receivingCol = myProcessCol;\n    for( Int step=0; step<p; ++step )\n    {\n        const Int colShift = Shift( receivingRow, colAlign, r );\n        const Int rowShift = Shift( receivingCol, rowAlign, c );\n        const Int localHeight = Length( height, colShift, r );\n        const Int localWidth = Length( width, rowShift, c );\n        const Int numEntries = localHeight*localWidth;\n\n        if( numEntries != 0 )\n        {\n            const Int destination = receivingRow + r*receivingCol;\n            const Int bufferSize = 4*sizeof(Int) + (numEntries+1)*sizeof(T);\n\n            const Int index = \n                ReadyForSend\n                ( bufferSize, dataVectors_[destination], \n                  dataSendRequests_[destination], sendingData_[destination] );\n            DEBUG_ONLY(\n                if( Int(dataVectors_[destination][index].size()) != bufferSize )\n                    LogicError(\"Error in ReadyForSend\");\n            )\n\n            // Pack the header\n            byte* sendBuffer = dataVectors_[destination][index].data();\n            byte* head = sendBuffer;\n            *reinterpret_cast<Int*>(head) = i; head += sizeof(Int);\n            *reinterpret_cast<Int*>(head) = j; head += sizeof(Int);\n            *reinterpret_cast<Int*>(head) = height; head += sizeof(Int);\n            *reinterpret_cast<Int*>(head) = width; head += sizeof(Int);\n            *reinterpret_cast<T*>(head) = alpha; head += sizeof(T);\n\n            // Pack the payload\n            T* sendData = reinterpret_cast<T*>(head);\n            const T* XBuffer = X.LockedBuffer();\n            const Int XLDim = X.LDim();\n            for( Int t=0; t<localWidth; ++t )\n            {\n                T* thisSendCol = &sendData[t*localHeight];\n                const T* thisXCol = &XBuffer[(rowShift+t*c)*XLDim];\n                for( Int s=0; s<localHeight; ++s )\n                    thisSendCol[s] = thisXCol[colShift+s*r];\n            }\n\n            // Fire off the non-blocking send\n            mpi::TaggedISSend\n            ( sendBuffer, bufferSize, destination, DATA_TAG, g.VCComm(), \n              dataSendRequests_[destination][index] );\n        }\n\n        receivingRow = (receivingRow + 1) % r;\n        if( receivingRow == 0 )\n            receivingCol = (receivingCol + 1) % c;\n    }\n}\n\n// Update Y += alpha X(i:i+height-1,j:j+width-1), where X is the dist-matrix\ntemplate<typename T>\ninline void\nAxpyInterface<T>::AxpyGlobalToLocal\n( T alpha, Matrix<T>& Y, Int i, Int j )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::AxpyGlobalToLocal\"))\n    const DistMatrix<T,MC,MR>& X = *globalToLocalMat_;\n\n    const Int height = Y.Height();\n    const Int width = Y.Width();\n    if( i+height > X.Height() || j+width > X.Width() )\n        LogicError(\"Invalid AxpyGlobalToLocal submatrix\");\n\n    const Grid& g = X.Grid();\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int p = g.Size();\n\n    // Send out the requests to all processes in the grid\n    for( Int rank=0; rank<p; ++rank )\n    {\n        const Int bufferSize = 4*sizeof(Int);\n        const Int index = \n            ReadyForSend\n            ( bufferSize, requestVectors_[rank], \n              requestSendRequests_[rank], sendingRequest_[rank] );\n\n        // Copy the request header into the send buffer\n        byte* sendBuffer = requestVectors_[rank][index].data();\n        byte* head = sendBuffer;\n        *reinterpret_cast<Int*>(head) = i; head += sizeof(Int);\n        *reinterpret_cast<Int*>(head) = j; head += sizeof(Int);\n        *reinterpret_cast<Int*>(head) = height; head += sizeof(Int);\n        *reinterpret_cast<Int*>(head) = width; head += sizeof(Int);\n\n        // Begin the non-blocking send\n        mpi::TaggedISSend\n        ( sendBuffer, bufferSize, rank, DATA_REQUEST_TAG, g.VCComm(), \n          requestSendRequests_[rank][index] );\n    }\n\n    // Receive all of the replies\n    Int numReplies = 0;\n    while( numReplies < p )\n    {\n        HandleGlobalToLocalRequest();\n\n        mpi::Status status;\n        if( mpi::IProbe( mpi::ANY_SOURCE, DATA_REPLY_TAG, g.VCComm(), status ) )\n        {\n            const Int source = status.MPI_SOURCE;\n\n            // Ensure that we have a recv buffer\n            const Int count = mpi::GetCount<byte>( status );\n            recvVector_.resize( count );\n            byte* recvBuffer = recvVector_.data();\n\n            // Receive the data\n            mpi::TaggedRecv\n            ( recvBuffer, count, source, DATA_REPLY_TAG, g.VCComm() );\n\n            // Unpack the reply header\n            const byte* head = recvBuffer;\n            const Int row = *reinterpret_cast<const Int*>(head); \n            head += sizeof(Int);\n            const Int col = *reinterpret_cast<const Int*>(head); \n            head += sizeof(Int);\n            const T* recvData = reinterpret_cast<const T*>(head);\n\n            // Compute the local heights and offsets\n            const Int colAlign = (X.ColAlign()+i) % r;\n            const Int rowAlign = (X.RowAlign()+j) % c;\n            const Int colShift = Shift( row, colAlign, r );\n            const Int rowShift = Shift( col, rowAlign, c );\n            const Int localHeight = Length( height, colShift, r );\n            const Int localWidth = Length( width, rowShift, c );\n\n            // Unpack the local matrix\n            for( Int t=0; t<localWidth; ++t )\n            {\n                T* YCol = Y.Buffer(0,rowShift+t*c);\n                const T* XCol = &recvData[t*localHeight];\n                for( Int s=0; s<localHeight; ++s )\n                    YCol[colShift+s*r] += alpha*XCol[s];\n            }\n\n            ++numReplies;\n        }\n    }\n}\n\ntemplate<typename T>\ninline Int\nAxpyInterface<T>::ReadyForSend\n( Int sendSize,\n  std::deque<std::vector<byte>>& sendVectors,\n  std::deque<mpi::Request>& requests, \n  std::deque<bool>& requestStatuses )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::ReadyForSend\"))\n    const Int numCreated = sendVectors.size();\n    DEBUG_ONLY(\n        if( numCreated != Int(requests.size()) || \n            numCreated != Int(requestStatuses.size()) )\n            LogicError(\"size mismatch\");\n    )\n    for( Int i=0; i<numCreated; ++i )\n    {\n        // If this request is still running, test to see if it finished.\n        if( requestStatuses[i] )\n        {\n            const bool finished = mpi::Test( requests[i] );\n            requestStatuses[i] = !finished;\n        }\n\n        if( !requestStatuses[i] )    \n        {\n            requestStatuses[i] = true;\n            sendVectors[i].resize( sendSize );\n            return i;\n        }\n    }\n\n    sendVectors.resize( numCreated+1 );\n    sendVectors[numCreated].resize( sendSize );\n    requests.push_back( mpi::REQUEST_NULL );\n    requestStatuses.push_back( true );\n\n    return numCreated;\n}\n\ntemplate<typename T>\ninline void\nAxpyInterface<T>::UpdateRequestStatuses()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::UpdateRequestStatuses\"))\n    const Grid& g = ( attachedForLocalToGlobal_ ? \n                      localToGlobalMat_->Grid() : \n                      globalToLocalMat_->Grid() );\n    const Int p = g.Size();\n\n    for( Int i=0; i<p; ++i )\n    {\n        const Int numDataSendRequests = dataSendRequests_[i].size();\n        for( Int j=0; j<numDataSendRequests; ++j )\n            if( sendingData_[i][j] )\n                sendingData_[i][j] = \n                    !mpi::Test( dataSendRequests_[i][j] );\n        const Int numRequestSendRequests = requestSendRequests_[i].size();\n        for( Int j=0; j<numRequestSendRequests; ++j )\n            if( sendingRequest_[i][j] )\n                sendingRequest_[i][j] = \n                    !mpi::Test( requestSendRequests_[i][j] );\n        const Int numReplySendRequests = replySendRequests_[i].size();\n        for( Int j=0; j<numReplySendRequests; ++j )\n            if( sendingReply_[i][j] )\n                sendingReply_[i][j] = \n                    !mpi::Test( replySendRequests_[i][j] );\n    }\n}\n\ntemplate<typename T>\ninline void\nAxpyInterface<T>::Detach()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"AxpyInterface::Detach\"))\n    if( !attachedForLocalToGlobal_ && !attachedForGlobalToLocal_ )\n        LogicError(\"Must attach before detaching.\");\n\n    const Grid& g = ( attachedForLocalToGlobal_ ? \n                      localToGlobalMat_->Grid() : \n                      globalToLocalMat_->Grid() );\n\n    while( !Finished() )\n    {\n        if( attachedForLocalToGlobal_ )\n            HandleLocalToGlobalData();\n        else\n            HandleGlobalToLocalRequest();\n        HandleEoms();\n    }\n\n    mpi::Barrier( g.VCComm() );\n\n    attachedForLocalToGlobal_ = false;\n    attachedForGlobalToLocal_ = false;\n    recvVector_.clear();\n    sentEomTo_.clear();\n    haveEomFrom_.clear();\n\n    sendingData_.clear();\n    sendingRequest_.clear();\n    sendingReply_.clear();\n\n    dataVectors_.clear();\n    requestVectors_.clear();\n    replyVectors_.clear();\n    \n    dataSendRequests_.clear();\n    requestSendRequests_.clear();\n    replySendRequests_.clear();\n\n    eomSendRequests_.clear();\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_AXPYINTERFACE_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/AxpyInterface.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_AXPYINTERFACE_HPP\n#define ELEM_AXPYINTERFACE_HPP\n\n#include \"./AxpyInterface/decl.hpp\"\n#include \"./AxpyInterface/impl.hpp\"\n\n#endif // ifndef ELEM_AXPYINTERFACE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/Abstract.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_ABSTRACT_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_ABSTRACT_DECL_HPP\n\nnamespace elem {\n\ntemplate<typename T> \nclass AbstractBlockDistMatrix\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> type;\n\n    // Constructors and destructors\n    // ============================\n    // Move constructor\n    AbstractBlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n\n    virtual ~AbstractBlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    // Move assignment\n    type& operator=( type&& A );\n\n    void Empty();\n    void EmptyData();\n    void SetGrid( const elem::Grid& grid );\n    void Resize( Int height, Int width );\n    void Resize( Int height, Int width, Int ldim );\n    void MakeConsistent( bool includingViewers=false );\n    void MakeSizeConsistent( bool includingViewers=false );\n\n    // Realignment\n    // -----------\n    void Align\n    ( Int blockHeight, Int blockWidth, \n      Int colAlign, Int rowAlign, Int colCut=0, Int rowCut=0, \n      bool constrain=true );\n    void AlignCols\n    ( Int blockHeight, Int colAlign, Int colCut=0, bool constrain=true );\n    void AlignRows\n    ( Int blockWidth, Int rowAlign, Int rowCut=0, bool constrain=true );\n    void FreeAlignments();\n    void SetRoot( Int root, bool constrain=true );\n    void AlignWith( const elem::BlockDistData& data, bool constrain=true );\n    virtual void AlignColsWith\n    ( const elem::BlockDistData& data, bool constrain=true );\n    virtual void AlignRowsWith\n    ( const elem::BlockDistData& data, bool constrain=true );\n    // TODO: The interface for these routines could be improved\n    void AlignAndResize\n    ( Int blockHeight, Int blockWidth, \n      Int colAlign, Int rowAlign, Int colCut, Int rowCut, \n      Int height, Int width, bool force=false, bool constrain=true );\n    void AlignColsAndResize\n    ( Int blockHeight, Int colAlign, Int colCut, Int height, Int width, \n      bool force=false, bool constrain=true );\n    void AlignRowsAndResize\n    ( Int blockWidth, Int rowAlign, Int rowCut, Int height, Int width, \n      bool force=false, bool constrain=true );\n\n    // Buffer attachment\n    // -----------------\n    // (Immutable) view of a distributed matrix's buffer\n    void Attach\n    ( Int height, Int width, const elem::Grid& g, \n      Int blockHeight, Int blockWidth,\n      Int colAlign, Int rowAlign, Int colCut, Int rowCut,\n      T* buffer, Int ldim, Int root=0 );\n    void LockedAttach\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth,\n      Int colAlign, Int rowAlign, Int colCut, Int rowCut,\n      const T* buffer, Int ldim, Int root=0 );\n    void Attach\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth,\n      Int colAlign, Int rowAlign, Int colCut, Int rowCut,\n      elem::Matrix<T>& A, Int root=0 );\n    void LockedAttach\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth,\n      Int colAlign, Int rowAlign, Int colCut, Int rowCut,\n      const elem::Matrix<T>& A, Int root=0 );\n\n    // Basic queries\n    // =============\n\n    // Global matrix information\n    // -------------------------\n    Int Height() const;\n    Int Width() const;\n    Int DiagonalLength( Int offset=0 ) const;\n    bool Viewing() const;\n    bool Locked()  const;\n\n    // Local matrix information\n    // ------------------------\n    Int LocalHeight() const;\n    Int LocalWidth() const;\n    Int LDim() const;\n          elem::Matrix<T>& Matrix();\n    const elem::Matrix<T>& LockedMatrix() const;\n    size_t AllocatedMemory() const;\n          T* Buffer();\n          T* Buffer( Int iLoc, Int jLoc );\n    const T* LockedBuffer() const;\n    const T* LockedBuffer( Int iLoc, Int jLoc ) const;\n\n    // Distribution information\n    // ------------------------\n    const elem::Grid& Grid() const;\n    bool ColConstrained() const;\n    bool RowConstrained() const;\n    bool RootConstrained() const;\n    Int BlockHeight() const;\n    Int BlockWidth() const;\n    Int ColAlign() const;\n    Int RowAlign() const;\n    Int ColCut() const;\n    Int RowCut() const;\n    Int ColShift() const;\n    Int RowShift() const;\n    Int ColRank() const;\n    Int RowRank() const;\n    Int PartialColRank() const;\n    Int PartialRowRank() const;\n    Int PartialUnionColRank() const;\n    Int PartialUnionRowRank() const; \n    Int DistRank() const;\n    Int CrossRank() const;\n    Int RedundantRank() const;\n    Int Root() const;\n    bool Participating() const;\n    Int RowOwner( Int i ) const;     // rank in ColComm\n    Int ColOwner( Int j ) const;     // rank in RowComm\n    Int Owner( Int i, Int j ) const; // rank in DistComm\n    Int LocalRow( Int i ) const; // debug throws if row i is not locally owned\n    Int LocalCol( Int j ) const; // debug throws if col j is not locally owned\n    Int LocalRowOffset( Int i ) const; // number of local rows before row i\n    Int LocalColOffset( Int j ) const; // number of local cols before col j\n    Int GlobalRow( Int iLoc ) const;\n    Int GlobalCol( Int jLoc ) const;\n    bool IsLocalRow( Int i ) const; \n    bool IsLocalCol( Int j ) const;\n    bool IsLocal( Int i, Int j ) const;\n    // Must be overridden\n    // ^^^^^^^^^^^^^^^^^^\n    virtual elem::BlockDistData DistData() const = 0;\n    virtual mpi::Comm DistComm() const = 0;\n    virtual mpi::Comm CrossComm() const = 0;\n    virtual mpi::Comm RedundantComm() const = 0;\n    virtual mpi::Comm ColComm() const = 0;\n    virtual mpi::Comm RowComm() const = 0;\n    virtual mpi::Comm PartialColComm() const;\n    virtual mpi::Comm PartialRowComm() const;\n    virtual mpi::Comm PartialUnionColComm() const;\n    virtual mpi::Comm PartialUnionRowComm() const;\n    virtual Int ColStride() const = 0;\n    virtual Int RowStride() const = 0;\n    virtual Int PartialColStride() const;\n    virtual Int PartialRowStride() const;\n    virtual Int PartialUnionColStride() const;\n    virtual Int PartialUnionRowStride() const;\n    virtual Int DistSize() const = 0;\n    virtual Int CrossSize() const = 0;\n    virtual Int RedundantSize() const = 0;\n\n    // Single-entry manipulation\n    // =========================\n\n    // Global entry manipulation \n    // -------------------------\n    // NOTE: Local entry manipulation is often much faster and should be\n    //       preferred in most circumstances where performance matters.\n    T Get( Int i, Int j ) const;\n    Base<T> GetRealPart( Int i, Int j ) const;\n    Base<T> GetImagPart( Int i, Int j ) const;\n    void Set( Int i, Int j, T alpha );\n    void SetRealPart( Int i, Int j, Base<T> alpha );\n    void SetImagPart( Int i, Int j, Base<T> alpha );\n    void Update( Int i, Int j, T alpha );\n    void UpdateRealPart( Int i, Int j, Base<T> alpha );\n    void UpdateImagPart( Int i, Int j, Base<T> alpha );\n    void MakeReal( Int i, Int j );\n    void Conjugate( Int i, Int j );\n\n    // Local entry manipulation\n    // ------------------------\n    T GetLocal( Int iLoc, Int jLoc ) const;\n    Base<T> GetLocalRealPart( Int iLoc, Int jLoc ) const;\n    Base<T> GetLocalImagPart( Int iLoc, Int jLoc ) const;\n    void SetLocal( Int iLoc, Int jLoc, T alpha );\n    void SetLocalRealPart( Int iLoc, Int jLoc, Base<T> alpha );\n    void SetLocalImagPart( Int iLoc, Int jLoc, Base<T> alpha );\n    void UpdateLocal( Int iLoc, Int jLoc, T alpha );\n    void UpdateLocalRealPart( Int iLoc, Int jLoc, Base<T> alpha );\n    void UpdateLocalImagPart( Int iLoc, Int jLoc, Base<T> alpha );\n    void MakeLocalReal( Int iLoc, Int jLoc );\n    void ConjugateLocal( Int iLoc, Int jLoc );\n\n    // Diagonal manipulation\n    // =====================\n    void MakeDiagonalReal( Int offset=0 );\n    void ConjugateDiagonal( Int offset=0 );\n\n    // Arbitrary-submatrix manipulation\n    // ================================\n\n    // Global submatrix manipulation\n    // -----------------------------\n    void GetSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      DistMatrix<T,STAR,STAR>& ASub ) const;\n    void GetRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      DistMatrix<Base<T>,STAR,STAR>& ASub ) const;\n    void GetImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      DistMatrix<Base<T>,STAR,STAR>& ASub ) const;\n    DistMatrix<T,STAR,STAR> GetSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const;\n    DistMatrix<Base<T>,STAR,STAR> GetRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const;\n    DistMatrix<Base<T>,STAR,STAR> GetImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const;\n\n    void SetSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      const DistMatrix<T,STAR,STAR>& ASub );\n    void SetRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      const DistMatrix<Base<T>,STAR,STAR>& ASub );\n    void SetImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      const DistMatrix<Base<T>,STAR,STAR>& ASub );\n\n    void UpdateSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      T alpha, const DistMatrix<T,STAR,STAR>& ASub );\n    void UpdateRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      Base<T> alpha, const DistMatrix<Base<T>,STAR,STAR>& ASub );\n    void UpdateImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      Base<T> alpha, const DistMatrix<Base<T>,STAR,STAR>& ASub );\n\n    void MakeSubmatrixReal\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd );\n    void ConjugateSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd );\n\n    // Local submatrix manipulation\n    // ----------------------------\n    void GetLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      elem::Matrix<T>& ASub ) const;\n    void GetRealPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      elem::Matrix<Base<T>>& ASub ) const;\n    void GetImagPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      elem::Matrix<Base<T>>& ASub ) const;\n    elem::Matrix<T> GetLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, \n      const std::vector<Int>& colIndLoc ) const;\n    elem::Matrix<Base<T>> GetRealPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, \n      const std::vector<Int>& colIndLoc ) const;\n    elem::Matrix<Base<T>> GetImagPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, \n      const std::vector<Int>& colIndLoc ) const;\n\n    void SetLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      const elem::Matrix<T>& ASub );\n    void SetRealPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      const elem::Matrix<Base<T>>& ASub );\n    void SetImagPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      const elem::Matrix<Base<T>>& ASub );\n\n    void UpdateLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      T alpha, const elem::Matrix<T>& ASub );\n    void UpdateRealPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      Base<T> alpha, const elem::Matrix<Base<T>>& ASub );\n    void UpdateImagPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      Base<T> alpha, const elem::Matrix<Base<T>>& ASub );\n\n    void MakeLocalSubmatrixReal\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc );\n    void ConjugateLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc );\n\n    // Sum over a specified communicator\n    // =================================\n    void SumOver( mpi::Comm comm );\n\n    // Assertions\n    // ==========\n    void ComplainIfReal() const;\n    void AssertNotLocked() const;\n    void AssertNotStoringData() const;\n    void AssertValidEntry( Int i, Int j ) const;\n    void AssertValidSubmatrix( Int i, Int j, Int height, Int width ) const;\n    void AssertSameGrid( const elem::Grid& grid ) const;\n    void AssertSameSize( Int height, Int width ) const;\n\nprotected:\n    // Member variables\n    // ================\n\n    // Global and local matrix information \n    // -----------------------------------\n    ViewType viewType_;\n    Int height_, width_;\n    Memory<T> auxMemory_;\n    elem::Matrix<T> matrix_;\n    \n    // Process grid and distribution metadata\n    // --------------------------------------\n    bool colConstrained_, rowConstrained_, rootConstrained_;\n    Int blockHeight_, blockWidth_;\n    Int colAlign_, rowAlign_,\n        colCut_,   rowCut_,\n        colShift_, rowShift_;\n    Int root_;\n    const elem::Grid* grid_;\n\n    // Private constructors\n    // ====================\n    AbstractBlockDistMatrix( const elem::Grid& g=DefaultGrid(),  Int root=0 );\n    AbstractBlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n\n    // Exchange metadata with another matrix\n    // =====================================\n    virtual void ShallowSwap( type& A );\n\n    // Modify the distribution metadata\n    // ================================\n    void SetShifts();\n    void SetColShift();\n    void SetRowShift();\n    void SetGrid();\n\n    // Friend declarations\n    // ===================\n    template<typename S,Dist J,Dist K> friend class GeneralDistMatrix;\n    template<typename S,Dist J,Dist K> friend class DistMatrix;\n    template<typename S,Dist J,Dist K> friend class GeneralBlockDistMatrix;\n    template<typename S,Dist J,Dist K> friend class BlockDistMatrix;\n};\n\ntemplate<typename T>\nvoid AssertConforming1x2\n( const AbstractBlockDistMatrix<T>& AL, const AbstractBlockDistMatrix<T>& AR );\n\ntemplate<typename T>\nvoid AssertConforming2x1\n( const AbstractBlockDistMatrix<T>& AT, const AbstractBlockDistMatrix<T>& AB );\n\ntemplate<typename T>\nvoid AssertConforming2x2\n( const AbstractBlockDistMatrix<T>& ATL, \n  const AbstractBlockDistMatrix<T>& ATR,\n  const AbstractBlockDistMatrix<T>& ABL, \n  const AbstractBlockDistMatrix<T>& ABR );\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_ABSTRACT_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/CIRC_CIRC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_CIRC_CIRC_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_CIRC_CIRC_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[o,o].\n//\n// The entire matrix is only stored on a single process.\ntemplate<typename T>\nclass BlockDistMatrix<T,CIRC,CIRC> : public GeneralBlockDistMatrix<T,CIRC,CIRC>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,CIRC,CIRC> genType;\n    typedef BlockDistMatrix<T,CIRC,CIRC> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,CIRC,CIRC>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    void CopyFromRoot( const Matrix<T>& A, bool includingViewers=false );\n    void CopyFromNonRoot( bool includingViewers=false );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    template<Dist U,Dist V>\n    void CollectFrom( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V>\n    void Scatter( BlockDistMatrix<T,U,V>& A ) const;\n\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_CIRC_CIRC_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/General.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_GENERAL_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_GENERAL_DECL_HPP\n\nnamespace elem {\n\ntemplate<typename T,Dist U,Dist V> \nclass GeneralBlockDistMatrix : public AbstractBlockDistMatrix<T>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,U,V> type;\n    static constexpr Dist UDiag = DiagColDist<U,V>();\n    static constexpr Dist VDiag = DiagRowDist<U,V>();\n    static constexpr Dist UGath = GatheredDist<U>();\n    static constexpr Dist VGath = GatheredDist<V>();\n    static constexpr Dist UPart = PartialDist<U>();\n    static constexpr Dist VPart = PartialDist<V>();\n    static constexpr Dist UScat = ScatteredColDist<U,V>();\n    static constexpr Dist VScat = ScatteredRowDist<U,V>();\n\n    // Constructors and destructors\n    // ============================\n    // Move constructor\n    GeneralBlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n\n    // Assignment and reconfiguration\n    // ==============================\n    // Move assignment\n    type& operator=( type&& A );\n\n    void AlignColsWith\n    ( const elem::BlockDistData& data, bool constrain=true ) override;\n    void AlignRowsWith\n    ( const elem::BlockDistData& data, bool constrain=true ) override;\n\n    void Translate( BlockDistMatrix<T,U,V>& A ) const;\n\n    void AllGather( BlockDistMatrix<T,UGath,VGath>& A ) const;\n    void ColAllGather( BlockDistMatrix<T,UGath,V>& A ) const;\n    void RowAllGather( BlockDistMatrix<T,U,VGath>& A ) const;\n    void PartialColAllGather( BlockDistMatrix<T,UPart,V>& A ) const;\n    void PartialRowAllGather( BlockDistMatrix<T,U,VPart>& A ) const;\n\n    void FilterFrom( const BlockDistMatrix<T,UGath,VGath>& A );\n    void ColFilterFrom( const BlockDistMatrix<T,UGath,V>& A );\n    void RowFilterFrom( const BlockDistMatrix<T,U,VGath>& A );\n    void PartialColFilterFrom( const BlockDistMatrix<T,UPart,V>& A );\n    void PartialRowFilterFrom( const BlockDistMatrix<T,U,VPart>& A );\n\n    void PartialColAllToAllFrom( const BlockDistMatrix<T,UPart,VScat>& A );\n    void PartialRowAllToAllFrom( const BlockDistMatrix<T,UScat,VPart>& A );\n    void PartialColAllToAll( BlockDistMatrix<T,UPart,VScat>& A ) const;\n    void PartialRowAllToAll( BlockDistMatrix<T,UScat,VPart>& A ) const;\n\n    void SumScatterFrom( const BlockDistMatrix<T,UGath,VGath>& A );\n    void RowSumScatterFrom( const BlockDistMatrix<T,U,VGath>& A );\n    void ColSumScatterFrom( const BlockDistMatrix<T,UGath,V>& A );\n    void PartialRowSumScatterFrom( const BlockDistMatrix<T,U,VPart>& A );\n    void PartialColSumScatterFrom( const BlockDistMatrix<T,UPart,V>& A );\n\n    void SumScatterUpdate( T alpha, const BlockDistMatrix<T,UGath,VGath>& A );\n    void RowSumScatterUpdate( T alpha, const BlockDistMatrix<T,U,VGath>& A );\n    void ColSumScatterUpdate( T alpha, const BlockDistMatrix<T,UGath,V>& A );\n    void PartialRowSumScatterUpdate\n    ( T alpha, const BlockDistMatrix<T,U,VPart>& A );\n    void PartialColSumScatterUpdate\n    ( T alpha, const BlockDistMatrix<T,UPart,V>& A );\n\n    // Transposed variants of some of the above routines which avoid \n    // large amounts of non-uniform data access\n    // -------------------------------------------------------------\n    void TransposeColAllGather\n    ( BlockDistMatrix<T,V,UGath>& A, bool conjugate=false ) const;\n    void TransposePartialColAllGather\n    ( BlockDistMatrix<T,V,UPart>& A, bool conjugate=false ) const;\n    void AdjointColAllGather( BlockDistMatrix<T,V,UGath>& A ) const;\n    void AdjointPartialColAllGather( BlockDistMatrix<T,V,UPart>& A ) const;\n\n    void TransposeColFilterFrom\n    ( const BlockDistMatrix<T,V,UGath>& A, bool conjugate=false );\n    void TransposeRowFilterFrom\n    ( const BlockDistMatrix<T,VGath,U>& A, bool conjugate=false );\n    void TransposePartialColFilterFrom\n    ( const BlockDistMatrix<T,V,UPart>& A, bool conjugate=false );\n    void TransposePartialRowFilterFrom\n    ( const BlockDistMatrix<T,VPart,U>& A, bool conjugate=false );\n    void AdjointColFilterFrom( const BlockDistMatrix<T,V,UGath>& A );\n    void AdjointRowFilterFrom( const BlockDistMatrix<T,VGath,U>& A );\n    void AdjointPartialColFilterFrom( const BlockDistMatrix<T,V,UPart>& A );\n    void AdjointPartialRowFilterFrom( const BlockDistMatrix<T,VPart,U>& A );\n\n    void TransposeColSumScatterFrom\n    ( const BlockDistMatrix<T,V,UGath>& A, bool conjugate=false );\n    void TransposePartialColSumScatterFrom\n    ( const BlockDistMatrix<T,V,UPart>& A, bool conjugate=false );\n    void AdjointColSumScatterFrom( const BlockDistMatrix<T,V,UGath>& A );\n    void AdjointPartialColSumScatterFrom( const BlockDistMatrix<T,V,UPart>& A );\n\n    void TransposeColSumScatterUpdate\n    ( T alpha, const BlockDistMatrix<T,V,UGath>& A, bool conjugate=false );\n    void TransposePartialColSumScatterUpdate\n    ( T alpha, const BlockDistMatrix<T,V,UPart>& A, bool conjugate=false );\n    void AdjointColSumScatterUpdate\n    ( T alpha, const BlockDistMatrix<T,V,UGath>& A );\n    void AdjointPartialColSumScatterUpdate\n    ( T alpha, const BlockDistMatrix<T,V,UPart>& A );\n\n    // Diagonal manipulation\n    // =====================\n    bool DiagonalAlignedWith\n    ( const elem::BlockDistData& d, Int offset=0 ) const;\n    Int DiagonalRoot( Int offset=0 ) const;\n    Int DiagonalAlign( Int offset=0 ) const;\n\n    void GetDiagonal( BlockDistMatrix<T,UDiag,VDiag>& d, Int offset=0 ) const;\n    void GetRealPartOfDiagonal\n    ( BlockDistMatrix<Base<T>,UDiag,VDiag>& d, Int offset=0 ) const;\n    void GetImagPartOfDiagonal\n    ( BlockDistMatrix<Base<T>,UDiag,VDiag>& d, Int offset=0 ) const;\n\n    BlockDistMatrix<T,UDiag,VDiag> GetDiagonal( Int offset=0 ) const;\n    BlockDistMatrix<Base<T>,UDiag,VDiag> \n    GetRealPartOfDiagonal( Int offset=0 ) const;\n    BlockDistMatrix<Base<T>,UDiag,VDiag> \n    GetImagPartOfDiagonal( Int offset=0 ) const;\n\n    void SetDiagonal( const BlockDistMatrix<T,UDiag,VDiag>& d, Int offset=0 );\n    void SetRealPartOfDiagonal\n    ( const BlockDistMatrix<Base<T>,UDiag,VDiag>& d, Int offset=0 );\n    void SetImagPartOfDiagonal\n    ( const BlockDistMatrix<Base<T>,UDiag,VDiag>& d, Int offset=0 );\n\n    void UpdateDiagonal\n    ( T alpha, const BlockDistMatrix<T,UDiag,VDiag>& d, Int offset=0 );\n    void UpdateRealPartOfDiagonal\n    ( Base<T> alpha, const BlockDistMatrix<Base<T>,UDiag,VDiag>& d, \n      Int offset=0 );\n    void UpdateImagPartOfDiagonal\n    ( Base<T> alpha, const BlockDistMatrix<Base<T>,UDiag,VDiag>& d, \n      Int offset=0 );\n\nprotected:\n\n    // Private constructors\n    // ====================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using AbstractDistMatrix<T>::AbstractDistMatrix;\n\n    GeneralBlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    GeneralBlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n\n    // Diagonal helper routines\n    // ========================\n    template<typename S,class Function>\n    void GetDiagonalHelper\n    ( BlockDistMatrix<S,UDiag,VDiag>& d, Int offset, Function func ) const;\n    template<typename S,class Function>\n    void SetDiagonalHelper\n    ( const BlockDistMatrix<S,UDiag,VDiag>& d, Int offset, Function func );\n\n    // Friend declarations\n    // ===================\n    template<typename S,Dist J,Dist K> friend class DistMatrix;\n    template<typename S,Dist J,Dist K> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_GENERAL_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/MC_MR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_MC_MR_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_MC_MR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[MC,MR].\n//\n// The columns of these matrices will be distributed among columns of the\n// process grid, and the rows will be distributed among rows of the process\n// grid.\n\ntemplate<typename T>\nclass BlockDistMatrix<T,MC,MR> : public GeneralBlockDistMatrix<T,MC,MR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,MC,MR> genType;\n    typedef BlockDistMatrix<T,MC,MR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralBlockDistMatrix<T,MC,MR>::GeneralBlockDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Redistribute from a different process grid\n    // ==========================================\n    void CopyFromDifferentGrid( const type& A );\n\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_MC_MR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/MC_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_MC_STAR_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_MC_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[MC,* ].\n//\n// The rows of these distributed matrices will be replicated on all \n// processes (*), and the columns will be distributed like \"Matrix Columns\" \n// (MC). Thus the columns will be distributed among columns of the process\n// grid.\ntemplate<typename T>\nclass BlockDistMatrix<T,MC,STAR> : public GeneralBlockDistMatrix<T,MC,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,MC,STAR> genType;\n    typedef BlockDistMatrix<T,MC,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,MC,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_MC_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/MD_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_MD_STAR_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_MD_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[MD,* ].\n// \n// The columns of these distributed matrices will be distributed like \n// \"Matrix Diagonals\" (MD). It is important to recognize that the diagonal\n// of a sufficiently large distributed matrix is distributed amongst the \n// entire process grid if and only if the dimensions of the process grid\n// are coprime.\ntemplate<typename T>\nclass BlockDistMatrix<T,MD,STAR> : public GeneralBlockDistMatrix<T,MD,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,MD,STAR> genType;\n    typedef BlockDistMatrix<T,MD,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,MD,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_MD_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/MR_MC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_MR_MC_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_MR_MC_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[MR,MC].\n//\n// The columns of these distributed matrices will be distributed like \n// \"Matrix Rows\" (MR), and the rows will be distributed like \n// \"Matrix Columns\" (MC). Thus the columns will be distributed within \n// rows of the process grid and the rows will be distributed within columns\n// of the process grid.\ntemplate<typename T>\nclass BlockDistMatrix<T,MR,MC> : public GeneralBlockDistMatrix<T,MR,MC>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,MR,MC> genType;\n    typedef BlockDistMatrix<T,MR,MC> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,MR,MC>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_MR_MC_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/MR_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_MR_STAR_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_MR_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[MR,* ].\n//\n// The rows of these distributed matrices will be replicated on all \n// processes (*), and the columns will be distributed like \"Matrix Rows\" \n// (MR). Thus the columns will be distributed among rows of the process\n// grid.\ntemplate<typename T>\nclass BlockDistMatrix<T,MR,STAR> : public GeneralBlockDistMatrix<T,MR,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,MR,STAR> genType;\n    typedef BlockDistMatrix<T,MR,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,MR,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_MR_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/README.md",
    "content": "### `include/elemental/core/dist_matrix/`\n\nThis folder contains the header files for the various partial specializations of\nthe `DistMatrix` class; please see `src/core/dist_matrix` for the \ncorresponding source files. Each specialization involves choosing a \nsensical pairing of distributions for the rows and columns of the matrix:\n\n-  `CIRC`/\"o\": Only give the data to a single process\n-  `STAR`/\"\\*\": Give the data to every process\n-  `MC`: Distribute round-robin within each column of the 2D process grid (*M*atrix *C*olumn)\n-  `MR`: Distribute round-robin within each row of the 2D process grid (*M*atrix *R*ow)\n-  `VC`: Distribute round-robin within a column-major ordering of the entire \n   2D process grid (*V*ector *C*olumn)\n-  `VR`: Distribute round-robin within a row-major ordering of the entire\n   2D process grid (*V*ector *R*ow)\n-  `MD`: Distribute round-robin over a diagonal of the tiling of the 2D process\n   grid (*M*atrix *D*iagonal)\n\nThe valid pairings are:\n\n| Distribution | ColComm | RowComm | DistComm  | RedundantComm | CrossComm |\n|:------------:|:-------:|:-------:|:---------:|:-------------:|:---------:|\n| `(o ,o )`    | self    | self    | self      | self          | `VC`      |\n| `(* ,* )`    | self    | self    | self      | `VC`          | self      |\n| `(MD,* )`    | `MD`    | self    | `MD`      | self          | `MDPerp`  |\n| `(* ,MD)`    | self    | `MD`    | `MD`      | self          | `MDPerp`  |\n| `(MC,MR)`    | `MC`    | `MR`    | `VC`      | self          | self      |\n| `(MR,MC)`    | `MR`    | `MC`    | `VR`      | self          | self      |\n| `(MC,* )`    | `MC`    | self    | `MC`      | `MR`          | self      |\n| `(* ,MC)`    | self    | `MC`    | `MC`      | `MR`          | self      |\n| `(MR,* )`    | `MR`    | self    | `MR`      | `MC`          | self      |\n| `(* ,MR)`    | self    | `MR`    | `MR`      | `MC`          | self      |\n| `(VC,* )`    | `VC`    | self    | `VC`      | self          | self      |\n| `(* ,VC)`    | self    | `VC`    | `VC`      | self          | self      |\n| `(VR,* )`    | `VR`    | self    | `VR`      | self          | self      |\n| `(* ,VR)`    | self    | `VR`    | `VR`      | self          | self      |\n\nwhere `DistComm` refers to the communicator that the entire matrix (rather than\njust the rows or columns) is distributed over. When the matrix is distributed\nover a communicator which only involves only a subset of the processes, it is\npossible to either assign the data to just that subset or redundantly store \nthe entire matrix on each such subset of processes (e.g., within each row of a \n2D arrangement of the set of processes). The `RedundantComm` refers to the \ncommunicator where each member process stores the same information, and the \n`CrossComm` is the communicator where only a single process (the *root*) is \nassigned any data.\n\nTo make this discussion more precise, each valid matrix distribution for \n`DistMatrix` logically arranges the set of `p` processes of the `r` by `c` \nprocess grid into a 4D mesh: `ColComm` x `RowComm` x `RedundantComm` x `CrossComm`, where `DistComm` is equal to `ColComm` x `RowComm`.\n\nWe are now ready to describe the contents of this folder (in addition to this\nfile):\n\n-  `Abstract.hpp`: The underlying distribution-agnostic base class\n-  `CIRC_CIRC.hpp`: The `<T,CIRC,CIRC>` specialization, which provides a\n   distributed matrix where only one process owns data. It provides a simple\n   mechanism for forming a matrix on a single process and then redistributing\n   into another distribution, e.g., `(MC,MR)`.\n-  `MC_MR.hpp`: The standard matrix distribution\n-  `MC_STAR.hpp`: Only distribute each column like a standard matrix\n   distribution\n-  `MD_STAR.hpp`: Distribute each column like the diagonal of the standard\n   matrix distribution\n-  `MR_MC.hpp`: The transpose of the standard matrix distribution\n-  `MR_STAR.hpp`: Distribute each column like the row of a standard matrix\n   distribution\n-  `STAR_MC.hpp`: Distribute each row like a column of the standard matrix\n   distribution\n-  `STAR_MD.hpp`: Distribute each row like the diagonal of a standard matrix\n   distribution\n-  `STAR_MR.hpp`: Distribute each row like a standard matrix distribution\n-  `STAR_STAR.hpp`: Give each process a full copy of the matrix\n-  `STAR_VC.hpp`: Distribute each row using a round-robin wrapping over a\n   column-major ordering of the process grid\n-  `STAR_VR.hpp`: Distribute each row using a round-robin wrapping over a\n   row-major ordering of the process grid\n-  `VC_STAR.hpp`: Distribute each column using a round-robin wrapping over a\n   column-major ordering of the process grid\n-  `VR_STAR.hpp`: Distribute each column using a round-robin wrapping over a\n   row-major ordering of the process grid\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/STAR_MC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_STAR_MC_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_STAR_MC_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,MC].\n//\n// The columns of these distributed matrices will be replicated on all \n// processes (*), and the rows will be distributed like \"Matrix Columns\" \n// (MC). Thus the rows will be distributed among columns of the process\n// grid.\ntemplate<typename T>\nclass BlockDistMatrix<T,STAR,MC> : public GeneralBlockDistMatrix<T,STAR,MC>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,STAR,MC> genType;\n    typedef BlockDistMatrix<T,STAR,MC> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,MC>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_STAR_MC_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/STAR_MD.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_STAR_MD_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_STAR_MD_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,MD].\n// \n// The rows of these distributed matrices will be distributed like \n// \"Matrix Diagonals\" (MD). It is important to recognize that the diagonal\n// of a sufficiently large distributed matrix is distributed amongst the \n// entire process grid if and only if the dimensions of the process grid\n// are coprime.\ntemplate<typename T>\nclass BlockDistMatrix<T,STAR,MD> : public GeneralBlockDistMatrix<T,STAR,MD>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,STAR,MD> genType;\n    typedef BlockDistMatrix<T,STAR,MD> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,MD>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_STAR_MD_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/STAR_MR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_STAR_MR_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_STAR_MR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,MR].\n//\n// The columns of these distributed matrices will be replicated on all \n// processes (*), and the rows will be distributed like \"Matrix Rows\" (MR).\n// Thus the rows will be distributed among rows of the process grid.\ntemplate<typename T>\nclass BlockDistMatrix<T,STAR,MR> : public GeneralBlockDistMatrix<T,STAR,MR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,STAR,MR> genType;\n    typedef BlockDistMatrix<T,STAR,MR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,MR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_STAR_MR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/STAR_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_STAR_STAR_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_STAR_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,* ].\n//\n// The entire matrix is replicated across all processes.\ntemplate<typename T>\nclass BlockDistMatrix<T,STAR,STAR> : public GeneralBlockDistMatrix<T,STAR,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,STAR,STAR> genType;\n    typedef BlockDistMatrix<T,STAR,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_STAR_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/STAR_VC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_STAR_VC_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_STAR_VC_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,VC].\n//\n// The rows of these distributed matrices are spread throughout the \n// process grid in a column-major fashion, while the columns are not \n// distributed.\ntemplate<typename T>\nclass BlockDistMatrix<T,STAR,VC> : public GeneralBlockDistMatrix<T,STAR,VC>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,STAR,VC> genType;\n    typedef BlockDistMatrix<T,STAR,VC> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,VC>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    mpi::Comm PartialRowComm() const override;\n    mpi::Comm PartialUnionRowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int PartialRowStride() const override;\n    Int PartialUnionRowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_STAR_VC_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/STAR_VR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_STAR_VR_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_STAR_VR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,VR].\n//\n// The rows of these distributed matrices are spread throughout the \n// process grid in a row-major fashion, while the columns are not \n// distributed.\ntemplate<typename T>\nclass BlockDistMatrix<T,STAR,VR> : public GeneralBlockDistMatrix<T,STAR,VR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,STAR,VR> genType;\n    typedef BlockDistMatrix<T,STAR,VR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,VR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    mpi::Comm PartialRowComm() const override;\n    mpi::Comm PartialUnionRowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int PartialRowStride() const override;\n    Int PartialUnionRowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_STAR_VR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/VC_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_VC_STAR_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_VC_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[VC,* ].\n//\n// The columns of these distributed matrices are spread throughout the \n// process grid in a column-major fashion, while the rows are not \n// distributed.\ntemplate<typename T>\nclass BlockDistMatrix<T,VC,STAR> : public GeneralBlockDistMatrix<T,VC,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,VC,STAR> genType;\n    typedef BlockDistMatrix<T,VC,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,VC,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    mpi::Comm PartialColComm() const override;\n    mpi::Comm PartialUnionColComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int PartialColStride() const override;\n    Int PartialUnionColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_VC_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/VR_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_VR_STAR_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_VR_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[VR,* ].\n//\n// The columns of these distributed matrices are spread throughout the \n// process grid in a row-major fashion, while the rows are not \n// distributed.\ntemplate<typename T>\nclass BlockDistMatrix<T,VR,STAR> : public GeneralBlockDistMatrix<T,VR,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractBlockDistMatrix<T> absType;\n    typedef GeneralBlockDistMatrix<T,VR,STAR> genType;\n    typedef BlockDistMatrix<T,VR,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,VR,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix with default (and unpinned) block size\n    BlockDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a 0 x 0 distributed matrix with fixed block size\n    BlockDistMatrix\n    ( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a height x width distributed matrix with default block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix with fixed block size\n    BlockDistMatrix\n    ( Int height, Int width, const elem::Grid& g,\n      Int blockHeight, Int blockWidth, Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    BlockDistMatrix( const type& A );\n    template<Dist U,Dist V> BlockDistMatrix( const BlockDistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> BlockDistMatrix( const DistMatrix<T,U,V>& A );\n    // Move constructor\n    BlockDistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~BlockDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const DistMatrix<T,U,V>& A );\n    type& operator=( const BlockDistMatrix<T,MC,  MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MR  >& A );\n    type& operator=( const BlockDistMatrix<T,MD,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MD  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  MC  >& A );\n    type& operator=( const BlockDistMatrix<T,MR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,MC  >& A );\n    type& operator=( const BlockDistMatrix<T,VC,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VC  >& A );\n    type& operator=( const BlockDistMatrix<T,VR,  STAR>& A );\n    type& operator=( const BlockDistMatrix<T,STAR,VR  >& A );\n    type& operator=( const BlockDistMatrix<T,STAR,STAR>& A );\n    type& operator=( const BlockDistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::BlockDistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    mpi::Comm PartialColComm() const override;\n    mpi::Comm PartialUnionColComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int PartialColStride() const override;\n    Int PartialUnionColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_VR_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix/forward_decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_FORWARD_DECL_HPP\n#define ELEM_BLOCKDISTMATRIX_FORWARD_DECL_HPP\n\nnamespace elem {\n\ntemplate<typename T>\nclass AbstractBlockDistMatrix;\n\ntemplate<typename T,Dist U=MC,Dist V=MR>\nclass GeneralBlockDistMatrix;\n\ntemplate<typename T,Dist U=MC,Dist V=MR>\nclass BlockDistMatrix;\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_FORWARD_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/BlockDistMatrix.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BLOCKDISTMATRIX_HPP\n#define ELEM_BLOCKDISTMATRIX_HPP\n\nnamespace elem {\n\nstruct BlockDistData\n{\n    Dist colDist, rowDist;\n    Int blockHeight, blockWidth;\n    Int colAlign, rowAlign; \n    Int colCut, rowCut;\n    Int root;  // relevant for [o ,o ]/[MD,* ]/[* ,MD]\n    const Grid* grid;\n\n    template<typename T,Dist U,Dist V>\n    BlockDistData( const GeneralBlockDistMatrix<T,U,V>& A )\n    : colDist(U), rowDist(V), \n      blockHeight(A.BlockHeight()), blockWidth(A.BlockWidth()),\n      colAlign(A.ColAlign()), rowAlign(A.RowAlign()),\n      colCut(A.ColCut()), rowCut(A.RowCut()),\n      root(A.Root()), grid(&A.Grid())\n    { }\n};\n\n} // namespace elem\n\n#include \"./BlockDistMatrix/Abstract.hpp\"\n#include \"./BlockDistMatrix/General.hpp\"\n#include \"./BlockDistMatrix/CIRC_CIRC.hpp\"\n#include \"./BlockDistMatrix/MC_MR.hpp\"\n#include \"./BlockDistMatrix/MC_STAR.hpp\"\n#include \"./BlockDistMatrix/MD_STAR.hpp\"\n#include \"./BlockDistMatrix/MR_MC.hpp\"\n#include \"./BlockDistMatrix/MR_STAR.hpp\"\n#include \"./BlockDistMatrix/STAR_MC.hpp\"\n#include \"./BlockDistMatrix/STAR_MD.hpp\"\n#include \"./BlockDistMatrix/STAR_MR.hpp\"\n#include \"./BlockDistMatrix/STAR_STAR.hpp\"\n#include \"./BlockDistMatrix/STAR_VC.hpp\"\n#include \"./BlockDistMatrix/STAR_VR.hpp\"\n#include \"./BlockDistMatrix/VC_STAR.hpp\"\n#include \"./BlockDistMatrix/VR_STAR.hpp\"\n\nnamespace elem {\n\n#ifdef ELEM_HAVE_SCALAPACK\ntemplate<typename T>\ninline typename blacs::Desc\nFillDesc( const BlockDistMatrix<T>& A, int context )\n{\n    if( A.ColCut() != 0 || A.RowCut() != 0 )\n        LogicError(\"Cannot produce a meaningful descriptor if nonzero cut\");\n    typename blacs::Desc desc = \n        { 1, context, A.Height(), A.Width(), A.BlockHeight(), A.BlockWidth(), \n          A.ColAlign(), A.RowAlign(), A.LDim() };\n    return desc;\n}\n#endif\n\n} // namespace elem\n\n#endif // ifndef ELEM_BLOCKDISTMATRIX_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/Complex/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_COMPLEX_DECL_HPP\n#define ELEM_COMPLEX_DECL_HPP\n\nnamespace elem {\n\n\ntemplate<typename Real>\nusing Complex = std::complex<Real>;\n\n// For extracting the underlying real datatype\ntemplate<typename Real>\nstruct BaseHelper { typedef Real type; };\ntemplate<typename Real>\nstruct BaseHelper<Complex<Real>> { typedef Real type; };\n\ntemplate<typename F>\nusing Base = typename BaseHelper<F>::type;\n\ntemplate<typename Real>\nstd::ostream& operator<<( std::ostream& os, Complex<Real> alpha );\n\n// For querying whether or not a scalar is complex,\n// e.g., IsComplex<Scalar>::val\ntemplate<typename Real>\nstruct IsComplex { enum { val=0 }; };\ntemplate<typename Real>\nstruct IsComplex<Complex<Real>> { enum { val=1 }; };\n\n// Return the real/imaginary part of a real or complex number\ntemplate<typename Real>\nReal RealPart( const Real& alpha );\ntemplate<typename Real>\nReal RealPart( const Complex<Real>& alpha );\ntemplate<typename Real>\nReal ImagPart( const Real& alpha );\ntemplate<typename Real>\nReal ImagPart( const Complex<Real>& alpha );\n\n// Set the real/imaginary part of a real or complex number\ntemplate<typename Real>\nvoid SetRealPart( Real& alpha, const Real& beta );\ntemplate<typename Real>\nvoid SetRealPart( Complex<Real>& alpha, const Real& beta );\ntemplate<typename Real>\nvoid SetImagPart( Real& alpha, const Real& beta );\ntemplate<typename Real>\nvoid SetImagPart( Complex<Real>& alpha, const Real& beta );\n\n// Update the real/imaginary part of a real or complex number\ntemplate<typename Real>\nvoid UpdateRealPart( Real& alpha, const Real& beta );\ntemplate<typename Real>\nvoid UpdateRealPart( Complex<Real>& alpha, const Real& beta );\ntemplate<typename Real>\nvoid UpdateImagPart( Real& alpha, const Real& beta );\ntemplate<typename Real>\nvoid UpdateImagPart( Complex<Real>& alpha, const Real& beta );\n\n// Euclidean (l_2) magnitudes\ntemplate<typename F>\nBase<F> Abs( const F& alpha );\ntemplate<typename Real>\nReal SafeAbs( const Real& alpha );\ntemplate<typename Real>\nReal SafeAbs( const Complex<Real>& alpha );\n\n// Square-root free (l_1) magnitudes\ntemplate<typename F>\nBase<F> FastAbs( const F& alpha );\n\n// Conjugation\ntemplate<typename Real>\nReal Conj( const Real& alpha );\ntemplate<typename Real>\nComplex<Real> Conj( const Complex<Real>& alpha );\n\n// Square root\ntemplate<typename F>\nF Sqrt( const F& alpha );\n\n// Cosine\ntemplate<typename F>\nF Cos( const F& alpha );\n\n// Sine\ntemplate<typename F>\nF Sin( const F& alpha );\n\n// Tangent\ntemplate<typename F>\nF Tan( const F& alpha );\n\n// Hyperbolic cosine\ntemplate<typename F>\nF Cosh( const F& alpha );\n\n// Hyperbolic sine\ntemplate<typename F>\nF Sinh( const F& alpha );\n\n// Inverse cosine\ntemplate<typename F>\nF Acos( const F& alpha );\n\n// Inverse sine\ntemplate<typename F>\nF Asin( const F& alpha );\n\n// Inverse tangent\ntemplate<typename F>\nF Atan( const F& alpha );\n\n// Coordinate-based inverse tangent\ntemplate<typename Real>\nReal Atan2( const Real& y, const Real& x );\n\n// Inverse hyperbolic cosine\ntemplate<typename F>\nF Acosh( const F& alpha );\n\n// Inverse hyperbolic sine\ntemplate<typename F>\nF Asinh( const F& alpha );\n\n// Inverse hyperbolic tangent\ntemplate<typename F>\nF Atanh( const F& alpha );\n\n// Complex argument\ntemplate<typename F>\nBase<F> Arg( const F& alpha );\n\n// Convert polar coordinates to the complex number\ntemplate<typename Real>\nComplex<Real> Polar( const Real& r, const Real& theta=0 );\n\n// Exponential\ntemplate<typename F>\nF Exp( const F& alpha );\n\n// Power, return alpha^beta\n// (every combination supported by std::pow)\ntemplate<typename F,typename T>\nF Pow( const F& alpha, const T& beta );\n\n// Logarithm\ntemplate<typename F>\nF Log( const F& alpha );\n\n} // namespace elem\n\n#endif // ifndef ELEM_COMPLEX_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/Complex/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_COMPLEX_IMPL_HPP\n#define ELEM_COMPLEX_IMPL_HPP\n\nnamespace elem {\n\ntemplate<typename Real>\nstd::ostream& operator<<( std::ostream& os, Complex<Real> alpha )\n{\n    os << alpha.real() << \"+\" << alpha.imag() << \"i\";\n    return os;\n}\n\ntemplate<typename Real>\ninline Real\nRealPart( const Real& alpha )\n{ return alpha; }\n\ntemplate<typename Real>\ninline Real\nRealPart( const Complex<Real>& alpha )\n{ return alpha.real(); }\n\ntemplate<typename Real>\ninline Real\nImagPart( const Real& alpha )\n{ return 0; }\n\ntemplate<typename Real>\ninline Real\nImagPart( const Complex<Real>& alpha )\n{ return alpha.imag(); }\n\ntemplate<typename Real>\ninline void\nSetRealPart( Real& alpha, const Real& beta )\n{ alpha = beta; }\n\ntemplate<typename Real>\ninline void\nSetRealPart( Complex<Real>& alpha, const Real& beta )\n{ alpha.real(beta); }\n\ntemplate<typename Real>\ninline void\nSetImagPart( Real& alpha, const Real& beta )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SetImagPart\"))\n    LogicError(\"Nonsensical assignment\");\n}\n\ntemplate<typename Real>\ninline void\nSetImagPart( Complex<Real>& alpha, const Real& beta )\n{ alpha.imag(beta); }\n\ntemplate<typename Real>\ninline void\nUpdateRealPart( Real& alpha, const Real& beta )\n{ alpha += beta; }\n\ntemplate<typename Real>\ninline void\nUpdateRealPart( Complex<Real>& alpha, const Real& beta )\n{ alpha.real( alpha.real()+beta ); }\n\ntemplate<typename Real>\ninline void\nUpdateImagPart( Real& alpha, const Real& beta )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"UpdateImagPart\"))\n    LogicError(\"Nonsensical update\");\n}\n\ntemplate<typename Real>\ninline void\nUpdateImagPart( Complex<Real>& alpha, const Real& beta )\n{ alpha.imag( alpha.imag()+beta ); }\n\ntemplate<typename F>\ninline Base<F>\nAbs( const F& alpha )\n{ return std::abs(alpha); }\n\ntemplate<typename Real>\ninline Real\nSafeAbs( const Real& alpha )\n{ return Abs(alpha); }\n\ntemplate<typename Real>\ninline Real\nSafeAbs( const Complex<Real>& alpha )\n{ return lapack::SafeNorm( alpha.real(), alpha.imag() ); }\n\ntemplate<typename F>\ninline Base<F>\nFastAbs( const F& alpha )\n{ return Abs(RealPart(alpha)) + Abs(ImagPart(alpha)); }\n\ntemplate<typename Real>\ninline Real\nConj( const Real& alpha )\n{ return alpha; }\n\ntemplate<typename Real>\ninline Complex<Real>\nConj( const Complex<Real>& alpha )\n{ return Complex<Real>(alpha.real(),-alpha.imag()); }\n\ntemplate<typename F>\ninline F\nSqrt( const F& alpha )\n{ return std::sqrt(alpha); }\n\ntemplate<typename F>\ninline F\nCos( const F& alpha )\n{ return std::cos(alpha); }\n\ntemplate<typename F>\ninline F\nSin( const F& alpha )\n{ return std::sin(alpha); }\n\ntemplate<typename F>\ninline F\nTan( const F& alpha )\n{ return std::tan(alpha); }\n\ntemplate<typename F>\ninline F\nCosh( const F& alpha )\n{ return std::cosh(alpha); }\n\ntemplate<typename F>\ninline F\nSinh( const F& alpha )\n{ return std::sinh(alpha); }\n\ntemplate<typename F>\ninline F\nTanh( const F& alpha )\n{ return std::tanh(alpha); }\n\ntemplate<typename F>\ninline F\nAcos( const F& alpha )\n{ return std::acos(alpha); }\n\ntemplate<typename F>\ninline F\nAsin( const F& alpha )\n{ return std::asin(alpha); }\n\ntemplate<typename F>\ninline F\nAtan( const F& alpha )\n{ return std::atan(alpha); }\n\ntemplate<typename Real>\ninline Real\nAtan2( const Real& y, const Real& x )\n{ return std::atan2( y, x ); }\n\ntemplate<typename F>\ninline F\nAcosh( const F& alpha )\n{ return std::acosh(alpha); }\n\ntemplate<typename F>\ninline F\nAsinh( const F& alpha )\n{ return std::asinh(alpha); }\n\ntemplate<typename F>\ninline F\nAtanh( const F& alpha )\n{ return std::atanh(alpha); }\n\ntemplate<typename F>\ninline Base<F>\nArg( const F& alpha )\n{ return Atan2( ImagPart(alpha), RealPart(alpha) ); }\n\ntemplate<typename Real>\ninline Complex<Real>\nPolar( const Real& r, const Real& theta )\n{ return std::polar(r,theta); }\n\ntemplate<typename F>\ninline F\nExp( const F& alpha )\n{ return std::exp(alpha); }\n\ntemplate<typename F,typename T>\ninline F\nPow( const F& alpha, const T& beta )\n{ return std::pow(alpha,beta); }\n\ntemplate<typename F>\ninline F\nLog( const F& alpha )\n{ return std::log(alpha); }\n\n} // namespace elem\n\n#endif // ifndef ELEM_COMPLEX_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/Complex.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_COMPLEX_HPP\n#define ELEM_COMPLEX_HPP\n\n#include \"./Complex/decl.hpp\"\n#include \"./Complex/impl.hpp\"\n\n#endif // ifndef ELEM_COMPLEX_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/Abstract.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_ABSTRACT_DECL_HPP\n#define ELEM_DISTMATRIX_ABSTRACT_DECL_HPP\n\nnamespace elem {\n\ntemplate<typename T> \nclass AbstractDistMatrix\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> type;\n\n    // Constructors and destructors\n    // ============================\n    // Move constructor\n    AbstractDistMatrix( type&& A ) ELEM_NOEXCEPT;\n\n    virtual ~AbstractDistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    // Move assignment\n    type& operator=( type&& A );\n\n    void Empty();\n    void EmptyData();\n    void SetGrid( const elem::Grid& grid );\n    void Resize( Int height, Int width );\n    void Resize( Int height, Int width, Int ldim );\n    void MakeConsistent( bool includingViewers=false );\n    void MakeSizeConsistent( bool includingViewers=false );\n\n    // Realignment\n    // -----------\n    void Align( Int colAlign, Int rowAlign, bool constrain=true );\n    void AlignCols( Int colAlign, bool constrain=true );\n    void AlignRows( Int rowAlign, bool constrain=true );\n    void FreeAlignments();\n    void SetRoot( Int root, bool constrain=true );\n    void AlignWith( const elem::DistData& data, bool constrain=true );\n    virtual void AlignColsWith\n    ( const elem::DistData& data, bool constrain=true );\n    virtual void AlignRowsWith\n    ( const elem::DistData& data, bool constrain=true );\n    void AlignAndResize\n    ( Int colAlign, Int rowAlign, Int height, Int width, \n      bool force=false, bool constrain=true );\n    void AlignColsAndResize\n    ( Int colAlign, Int height, Int width, \n      bool force=false, bool constrain=true );\n    void AlignRowsAndResize\n    ( Int rowAlign, Int height, Int width, \n      bool force=false, bool constrain=true );\n\n    // Buffer attachment\n    // -----------------\n    // (Immutable) view of a distributed matrix's buffer\n    void Attach\n    ( Int height, Int width, const elem::Grid& grid, \n      Int colAlign, Int rowAlign, T* buffer, Int ldim, Int root=0 );\n    void LockedAttach\n    ( Int height, Int width, const elem::Grid& grid,\n      Int colAlign, Int rowAlign, const T* buffer, Int ldim, Int root=0 );\n    void Attach\n    ( Int height, Int width, const elem::Grid& grid,\n      Int colAlign, Int rowAlign, elem::Matrix<T>& A, Int root=0 );\n    void LockedAttach\n    ( Int height, Int width, const elem::Grid& grid,\n      Int colAlign, Int rowAlign, const elem::Matrix<T>& A, Int root=0 );\n\n    // Basic queries\n    // =============\n\n    // Global matrix information\n    // -------------------------\n    Int Height() const;\n    Int Width() const;\n    Int DiagonalLength( Int offset=0 ) const;\n    bool Viewing() const;\n    bool Locked()  const;\n\n    // Local matrix information\n    // ------------------------\n    Int LocalHeight() const;\n    Int LocalWidth() const;\n    Int LDim() const;\n          elem::Matrix<T>& Matrix();\n    const elem::Matrix<T>& LockedMatrix() const;\n    size_t AllocatedMemory() const;\n          T* Buffer();\n          T* Buffer( Int iLoc, Int jLoc );\n    const T* LockedBuffer() const;\n    const T* LockedBuffer( Int iLoc, Int jLoc ) const;\n\n    // Distribution information\n    // ------------------------\n    const elem::Grid& Grid() const;\n    bool ColConstrained() const;\n    bool RowConstrained() const;\n    bool RootConstrained() const;\n    Int ColAlign() const;\n    Int RowAlign() const;\n    Int ColShift() const;\n    Int RowShift() const;\n    Int ColRank() const;\n    Int RowRank() const;\n    Int PartialColRank() const;\n    Int PartialRowRank() const;\n    Int PartialUnionColRank() const;\n    Int PartialUnionRowRank() const; \n    Int DistRank() const;\n    Int CrossRank() const;\n    Int RedundantRank() const;\n    Int Root() const;\n    bool Participating() const;\n    Int RowOwner( Int i ) const;     // rank in ColComm\n    Int ColOwner( Int j ) const;     // rank in RowComm\n    Int Owner( Int i, Int j ) const; // rank in DistComm\n    Int LocalRow( Int i ) const; // debug throws if row i is not locally owned\n    Int LocalCol( Int j ) const; // debug throws if col j is not locally owned\n    Int LocalRowOffset( Int i ) const; // number of local rows before row i\n    Int LocalColOffset( Int j ) const; // number of local cols before col j\n    Int GlobalRow( Int iLoc ) const;\n    Int GlobalCol( Int jLoc ) const;\n    bool IsLocalRow( Int i ) const; \n    bool IsLocalCol( Int j ) const;\n    bool IsLocal( Int i, Int j ) const;\n    // Must be overridden\n    // ^^^^^^^^^^^^^^^^^^\n    virtual elem::DistData DistData() const = 0;\n    virtual mpi::Comm DistComm() const = 0;\n    virtual mpi::Comm CrossComm() const = 0;\n    virtual mpi::Comm RedundantComm() const = 0;\n    virtual mpi::Comm ColComm() const = 0;\n    virtual mpi::Comm RowComm() const = 0;\n    virtual mpi::Comm PartialColComm() const;\n    virtual mpi::Comm PartialRowComm() const;\n    virtual mpi::Comm PartialUnionColComm() const;\n    virtual mpi::Comm PartialUnionRowComm() const;\n    virtual Int ColStride() const = 0;\n    virtual Int RowStride() const = 0;\n    virtual Int PartialColStride() const;\n    virtual Int PartialRowStride() const;\n    virtual Int PartialUnionColStride() const;\n    virtual Int PartialUnionRowStride() const;\n    virtual Int DistSize() const = 0;\n    virtual Int CrossSize() const = 0;\n    virtual Int RedundantSize() const = 0;\n\n    // Single-entry manipulation\n    // =========================\n\n    // Global entry manipulation \n    // -------------------------\n    // NOTE: Local entry manipulation is often much faster and should be\n    //       preferred in most circumstances where performance matters.\n    T Get( Int i, Int j ) const;\n    Base<T> GetRealPart( Int i, Int j ) const;\n    Base<T> GetImagPart( Int i, Int j ) const;\n    void Set( Int i, Int j, T alpha );\n    void SetRealPart( Int i, Int j, Base<T> alpha );\n    void SetImagPart( Int i, Int j, Base<T> alpha );\n    void Update( Int i, Int j, T alpha );\n    void UpdateRealPart( Int i, Int j, Base<T> alpha );\n    void UpdateImagPart( Int i, Int j, Base<T> alpha );\n    void MakeReal( Int i, Int j );\n    void Conjugate( Int i, Int j );\n\n    // Local entry manipulation\n    // ------------------------\n    T GetLocal( Int iLoc, Int jLoc ) const;\n    Base<T> GetLocalRealPart( Int iLoc, Int jLoc ) const;\n    Base<T> GetLocalImagPart( Int iLoc, Int jLoc ) const;\n    void SetLocal( Int iLoc, Int jLoc, T alpha );\n    void SetLocalRealPart( Int iLoc, Int jLoc, Base<T> alpha );\n    void SetLocalImagPart( Int iLoc, Int jLoc, Base<T> alpha );\n    void UpdateLocal( Int iLoc, Int jLoc, T alpha );\n    void UpdateLocalRealPart( Int iLoc, Int jLoc, Base<T> alpha );\n    void UpdateLocalImagPart( Int iLoc, Int jLoc, Base<T> alpha );\n    void MakeLocalReal( Int iLoc, Int jLoc );\n    void ConjugateLocal( Int iLoc, Int jLoc );\n\n    // Diagonal manipulation\n    // =====================\n    void MakeDiagonalReal( Int offset=0 );\n    void ConjugateDiagonal( Int offset=0 );\n\n    // Arbitrary-submatrix manipulation\n    // ================================\n\n    // Global submatrix manipulation\n    // -----------------------------\n    void GetSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      DistMatrix<T,STAR,STAR>& ASub ) const;\n    void GetRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      DistMatrix<Base<T>,STAR,STAR>& ASub ) const;\n    void GetImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      DistMatrix<Base<T>,STAR,STAR>& ASub ) const;\n\n    DistMatrix<T,STAR,STAR> GetSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const;\n    DistMatrix<Base<T>,STAR,STAR> GetRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const;\n    DistMatrix<Base<T>,STAR,STAR> GetImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const;\n\n    void SetSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      const DistMatrix<T,STAR,STAR>& ASub );\n    void SetRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      const DistMatrix<Base<T>,STAR,STAR>& ASub );\n    void SetImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      const DistMatrix<Base<T>,STAR,STAR>& ASub );\n\n    void UpdateSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      T alpha, const DistMatrix<T,STAR,STAR>& ASub );\n    void UpdateRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      Base<T> alpha, const DistMatrix<Base<T>,STAR,STAR>& ASub );\n    void UpdateImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      Base<T> alpha, const DistMatrix<Base<T>,STAR,STAR>& ASub );\n\n    void MakeSubmatrixReal\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd );\n    void ConjugateSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd );\n\n    // Local submatrix manipulation\n    // ----------------------------\n    void GetLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      elem::Matrix<T>& ASub ) const;\n    void GetRealPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      elem::Matrix<Base<T>>& ASub ) const;\n    void GetImagPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      elem::Matrix<Base<T>>& ASub ) const;\n\n    elem::Matrix<T> GetLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, \n      const std::vector<Int>& colIndLoc ) const;\n    elem::Matrix<Base<T>> GetRealPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, \n      const std::vector<Int>& colIndLoc ) const;\n    elem::Matrix<Base<T>> GetImagPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, \n      const std::vector<Int>& colIndLoc ) const;\n\n    void SetLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      const elem::Matrix<T>& ASub );\n    void SetRealPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      const elem::Matrix<Base<T>>& ASub );\n    void SetImagPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      const elem::Matrix<Base<T>>& ASub );\n\n    void UpdateLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      T alpha, const elem::Matrix<T>& ASub );\n    void UpdateRealPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      Base<T> alpha, const elem::Matrix<Base<T>>& ASub );\n    void UpdateImagPartOfLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n      Base<T> alpha, const elem::Matrix<Base<T>>& ASub );\n\n    void MakeLocalSubmatrixReal\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc );\n    void ConjugateLocalSubmatrix\n    ( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc );\n\n    // Sum over a specified communicator\n    // =================================\n    void SumOver( mpi::Comm comm );\n\n    // Assertions\n    // ==========\n    void ComplainIfReal() const;\n    void AssertNotLocked() const;\n    void AssertNotStoringData() const;\n    void AssertValidEntry( Int i, Int j ) const;\n    void AssertValidSubmatrix( Int i, Int j, Int height, Int width ) const;\n    void AssertSameGrid( const elem::Grid& grid ) const;\n    void AssertSameSize( Int height, Int width ) const;\n\nprotected:\n    // Member variables\n    // ================\n\n    // Global and local matrix information \n    // -----------------------------------\n    ViewType viewType_;\n    Int height_, width_;\n    Memory<T> auxMemory_;\n    elem::Matrix<T> matrix_;\n    \n    // Process grid and distribution metadata\n    // --------------------------------------\n    bool colConstrained_, rowConstrained_, rootConstrained_;\n    Int colAlign_, rowAlign_,\n        colShift_, rowShift_;\n    Int root_;\n    const elem::Grid* grid_;\n\n    // Private constructors\n    // ====================\n    // Create a 0 x 0 distributed matrix\n    AbstractDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n\n    // Exchange metadata with another matrix\n    // =====================================\n    virtual void ShallowSwap( type& A );\n\n    // Modify the distribution metadata\n    // ================================\n    void SetShifts();\n    void SetColShift();\n    void SetRowShift();\n    void SetGrid();\n\n    // Friend declarations\n    // ===================\n    template<typename S,Dist J,Dist K> friend class GeneralDistMatrix;\n    template<typename S,Dist J,Dist K> friend class DistMatrix;\n\n    template<typename S,Dist J,Dist K> friend class GeneralBlockDistMatrix;\n    template<typename S,Dist J,Dist K> friend class BlockDistMatrix;\n};\n\ntemplate<typename T>\nvoid AssertConforming1x2\n( const AbstractDistMatrix<T>& AL, const AbstractDistMatrix<T>& AR );\n\ntemplate<typename T>\nvoid AssertConforming2x1\n( const AbstractDistMatrix<T>& AT, const AbstractDistMatrix<T>& AB );\n\ntemplate<typename T>\nvoid AssertConforming2x2\n( const AbstractDistMatrix<T>& ATL, const AbstractDistMatrix<T>& ATR,\n  const AbstractDistMatrix<T>& ABL, const AbstractDistMatrix<T>& ABR );\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_ABSTRACT_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/CIRC_CIRC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_CIRC_CIRC_DECL_HPP\n#define ELEM_DISTMATRIX_CIRC_CIRC_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[o,o].\n//\n// The entire matrix is only stored on a single process.\ntemplate<typename T>\nclass DistMatrix<T,CIRC,CIRC> : public GeneralDistMatrix<T,CIRC,CIRC>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,CIRC,CIRC> genType;\n    typedef DistMatrix<T,CIRC,CIRC> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,CIRC,CIRC>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a direct copy (redistributing if necessary)\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    // Redistribute from one distribution to another\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    void CopyFromRoot( const Matrix<T>& A, bool includingViewers=false );\n    void CopyFromNonRoot( bool includingViewers=false );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    template<Dist U,Dist V>\n    void CollectFrom( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V>\n    void Scatter( DistMatrix<T,U,V>& A ) const;\n\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_CIRC_CIRC_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/General.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_GENERAL_DECL_HPP\n#define ELEM_DISTMATRIX_GENERAL_DECL_HPP\n\nnamespace elem {\n\ntemplate<typename T,Dist U,Dist V> \nclass GeneralDistMatrix : public AbstractDistMatrix<T>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,U,V> type;\n    static constexpr Dist UDiag = DiagColDist<U,V>();\n    static constexpr Dist VDiag = DiagRowDist<U,V>();\n    static constexpr Dist UGath = GatheredDist<U>();\n    static constexpr Dist VGath = GatheredDist<V>();\n    static constexpr Dist UPart = PartialDist<U>();\n    static constexpr Dist VPart = PartialDist<V>();\n    static constexpr Dist UScat = ScatteredColDist<U,V>();\n    static constexpr Dist VScat = ScatteredRowDist<U,V>();\n\n    // Constructors and destructors\n    // ============================\n    // Move constructor\n    GeneralDistMatrix( type&& A ) ELEM_NOEXCEPT;\n\n    // Assignment and reconfiguration\n    // ==============================\n    // Move assignment\n    type& operator=( type&& A );\n\n    void AlignColsWith\n    ( const elem::DistData& data, bool constrain=true ) override;\n    void AlignRowsWith\n    ( const elem::DistData& data, bool constrain=true ) override;\n\n    void Translate( DistMatrix<T,U,V>& A ) const;\n\n    void AllGather( DistMatrix<T,UGath,VGath>& A ) const;\n    void ColAllGather( DistMatrix<T,UGath,V>& A ) const;\n    void RowAllGather( DistMatrix<T,U,VGath>& A ) const;\n    void PartialColAllGather( DistMatrix<T,UPart,V>& A ) const;\n    void PartialRowAllGather( DistMatrix<T,U,VPart>& A ) const;\n\n    void FilterFrom( const DistMatrix<T,UGath,VGath>& A );\n    void ColFilterFrom( const DistMatrix<T,UGath,V>& A );\n    void RowFilterFrom( const DistMatrix<T,U,VGath>& A );\n    void PartialColFilterFrom( const DistMatrix<T,UPart,V>& A );\n    void PartialRowFilterFrom( const DistMatrix<T,U,VPart>& A );\n\n    void PartialColAllToAllFrom( const DistMatrix<T,UPart,VScat>& A );\n    void PartialRowAllToAllFrom( const DistMatrix<T,UScat,VPart>& A );\n    void PartialColAllToAll( DistMatrix<T,UPart,VScat>& A ) const;\n    void PartialRowAllToAll( DistMatrix<T,UScat,VPart>& A ) const;\n\n    void SumScatterFrom( const DistMatrix<T,UGath,VGath>& A );\n    void RowSumScatterFrom( const DistMatrix<T,U,VGath>& A );\n    void ColSumScatterFrom( const DistMatrix<T,UGath,V>& A );\n    void PartialRowSumScatterFrom( const DistMatrix<T,U,VPart>& A );\n    void PartialColSumScatterFrom( const DistMatrix<T,UPart,V>& A );\n\n    void SumScatterUpdate( T alpha, const DistMatrix<T,UGath,VGath>& A );\n    void RowSumScatterUpdate( T alpha, const DistMatrix<T,U,VGath>& A );\n    void ColSumScatterUpdate( T alpha, const DistMatrix<T,UGath,V>& A );\n    void PartialRowSumScatterUpdate( T alpha, const DistMatrix<T,U,VPart>& A );\n    void PartialColSumScatterUpdate( T alpha, const DistMatrix<T,UPart,V>& A );\n\n    // Transposed variants of some of the above routines which avoid \n    // large amounts of non-uniform data access\n    // -------------------------------------------------------------\n    void TransposeColAllGather\n    ( DistMatrix<T,V,UGath>& A, bool conjugate=false ) const;\n    void TransposePartialColAllGather\n    ( DistMatrix<T,V,UPart>& A, bool conjugate=false ) const;\n    void AdjointColAllGather( DistMatrix<T,V,UGath>& A ) const;\n    void AdjointPartialColAllGather( DistMatrix<T,V,UPart>& A ) const;\n\n    void TransposeColFilterFrom\n    ( const DistMatrix<T,V,UGath>& A, bool conjugate=false );\n    void TransposeRowFilterFrom\n    ( const DistMatrix<T,VGath,U>& A, bool conjugate=false );\n    void TransposePartialColFilterFrom\n    ( const DistMatrix<T,V,UPart>& A, bool conjugate=false );\n    void TransposePartialRowFilterFrom\n    ( const DistMatrix<T,VPart,U>& A, bool conjugate=false );\n    void AdjointColFilterFrom( const DistMatrix<T,V,UGath>& A );\n    void AdjointRowFilterFrom( const DistMatrix<T,VGath,U>& A );\n    void AdjointPartialColFilterFrom( const DistMatrix<T,V,UPart>& A );\n    void AdjointPartialRowFilterFrom( const DistMatrix<T,VPart,U>& A );\n\n    void TransposeColSumScatterFrom\n    ( const DistMatrix<T,V,UGath>& A, bool conjugate=false );\n    void TransposePartialColSumScatterFrom\n    ( const DistMatrix<T,V,UPart>& A, bool conjugate=false );\n    void AdjointColSumScatterFrom( const DistMatrix<T,V,UGath>& A );\n    void AdjointPartialColSumScatterFrom( const DistMatrix<T,V,UPart>& A );\n\n    void TransposeColSumScatterUpdate\n    ( T alpha, const DistMatrix<T,V,UGath>& A, bool conjugate=false );\n    void TransposePartialColSumScatterUpdate\n    ( T alpha, const DistMatrix<T,V,UPart>& A, bool conjugate=false );\n    void AdjointColSumScatterUpdate\n    ( T alpha, const DistMatrix<T,V,UGath>& A );\n    void AdjointPartialColSumScatterUpdate\n    ( T alpha, const DistMatrix<T,V,UPart>& A );\n\n    // Diagonal manipulation\n    // =====================\n    bool DiagonalAlignedWith( const elem::DistData& d, Int offset=0 ) const;\n    Int DiagonalRoot( Int offset=0 ) const;\n    Int DiagonalAlign( Int offset=0 ) const;\n\n    void GetDiagonal( DistMatrix<T,UDiag,VDiag>& d, Int offset=0 ) const;\n    void GetRealPartOfDiagonal\n    ( DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset=0 ) const;\n    void GetImagPartOfDiagonal\n    ( DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset=0 ) const;\n\n    DistMatrix<T,UDiag,VDiag> GetDiagonal( Int offset=0 ) const;\n    DistMatrix<Base<T>,UDiag,VDiag> GetRealPartOfDiagonal( Int offset=0 ) const;\n    DistMatrix<Base<T>,UDiag,VDiag> GetImagPartOfDiagonal( Int offset=0 ) const;\n\n    void SetDiagonal( const DistMatrix<T,UDiag,VDiag>& d, Int offset=0 );\n    void SetRealPartOfDiagonal\n    ( const DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset=0 );\n    void SetImagPartOfDiagonal\n    ( const DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset=0 );\n\n    void UpdateDiagonal\n    ( T alpha, const DistMatrix<T,UDiag,VDiag>& d, Int offset=0 );\n    void UpdateRealPartOfDiagonal\n    ( Base<T> alpha, const DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset=0 );\n    void UpdateImagPartOfDiagonal\n    ( Base<T> alpha, const DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset=0 );\n\nprotected:\n\n    // Private constructors\n    // ====================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using AbstractDistMatrix<T>::AbstractDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    GeneralDistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n\n    // Diagonal helper routines\n    // ========================\n    template<typename S,class Function>\n    void GetDiagonalHelper\n    ( DistMatrix<S,UDiag,VDiag>& d, Int offset, Function func ) const;\n    template<typename S,class Function>\n    void SetDiagonalHelper\n    ( const DistMatrix<S,UDiag,VDiag>& d, Int offset, Function func );\n\n    // Friend declarations\n    // ===================\n    template<typename S,Dist J,Dist K> friend class DistMatrix;\n    template<typename S,Dist J,Dist K> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_GENERAL_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/MC_MR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_MC_MR_DECL_HPP\n#define ELEM_DISTMATRIX_MC_MR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[MC,MR].\n//\n// The columns of these matrices will be distributed among columns of the\n// process grid, and the rows will be distributed among rows of the process\n// grid.\n\ntemplate<typename T>\nclass DistMatrix<T,MC,MR> : public GeneralDistMatrix<T,MC,MR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,MC,MR> genType;\n    typedef DistMatrix<T,MC,MR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,MC,MR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A (redistributing if necessary)\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    void CopyFromDifferentGrid( const type& );\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_MC_MR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/MC_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_MC_STAR_DECL_HPP\n#define ELEM_DISTMATRIX_MC_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[MC,* ].\n//\n// The rows of these distributed matrices will be replicated on all \n// processes (*), and the columns will be distributed like \"Matrix Columns\" \n// (MC). Thus the columns will be distributed among columns of the process\n// grid.\ntemplate<typename T>\nclass DistMatrix<T,MC,STAR> : public GeneralDistMatrix<T,MC,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,MC,STAR> genType;\n    typedef DistMatrix<T,MC,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,MC,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix (redistribute if necessary)\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int RowStride() const override;\n    Int ColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_MC_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/MD_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_MD_STAR_DECL_HPP\n#define ELEM_DISTMATRIX_MD_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[MD,* ].\n// \n// The columns of these distributed matrices will be distributed like \n// \"Matrix Diagonals\" (MD). It is important to recognize that the diagonal\n// of a sufficiently large distributed matrix is distributed amongst the \n// entire process grid if and only if the dimensions of the process grid\n// are coprime.\ntemplate<typename T>\nclass DistMatrix<T,MD,STAR> : public GeneralDistMatrix<T,MD,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,MD,STAR> genType;\n    typedef DistMatrix<T,MD,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,MD,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int RowStride() const override;\n    Int ColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_MD_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/MR_MC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_MR_MC_DECL_HPP\n#define ELEM_DISTMATRIX_MR_MC_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[MR,MC].\n//\n// The columns of these distributed matrices will be distributed like \n// \"Matrix Rows\" (MR), and the rows will be distributed like \n// \"Matrix Columns\" (MC). Thus the columns will be distributed within \n// rows of the process grid and the rows will be distributed within columns\n// of the process grid.\ntemplate<typename T>\nclass DistMatrix<T,MR,MC> : public GeneralDistMatrix<T,MR,MC>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,MR,MC> genType;\n    typedef DistMatrix<T,MR,MC> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,MR,MC>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int RowStride() const override;\n    Int ColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_MR_MC_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/MR_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_MR_STAR_DECL_HPP\n#define ELEM_DISTMATRIX_MR_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[MR,* ].\n//\n// The rows of these distributed matrices will be replicated on all \n// processes (*), and the columns will be distributed like \"Matrix Rows\" \n// (MR). Thus the columns will be distributed among rows of the process\n// grid.\ntemplate<typename T>\nclass DistMatrix<T,MR,STAR> : public GeneralDistMatrix<T,MR,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,MR,STAR> genType;\n    typedef DistMatrix<T,MR,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,MR,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int RowStride() const override;\n    Int ColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_MR_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/README.md",
    "content": "### `include/elemental/core/dist_matrix/`\n\nThis folder contains the header files for the various partial specializations of\nthe `DistMatrix` class; please see `src/core/dist_matrix` for the \ncorresponding source files. Each specialization involves choosing a \nsensical pairing of distributions for the rows and columns of the matrix:\n\n-  `CIRC`/\"o\": Only give the data to a single process\n-  `STAR`/\"\\*\": Give the data to every process\n-  `MC`: Distribute round-robin within each column of the 2D process grid (*M*atrix *C*olumn)\n-  `MR`: Distribute round-robin within each row of the 2D process grid (*M*atrix *R*ow)\n-  `VC`: Distribute round-robin within a column-major ordering of the entire \n   2D process grid (*V*ector *C*olumn)\n-  `VR`: Distribute round-robin within a row-major ordering of the entire\n   2D process grid (*V*ector *R*ow)\n-  `MD`: Distribute round-robin over a diagonal of the tiling of the 2D process\n   grid (*M*atrix *D*iagonal)\n\nThe valid pairings are:\n\n| Distribution | ColComm | RowComm | DistComm  | RedundantComm | CrossComm |\n|:------------:|:-------:|:-------:|:---------:|:-------------:|:---------:|\n| `(o ,o )`    | self    | self    | self      | self          | `VC`      |\n| `(* ,* )`    | self    | self    | self      | `VC`          | self      |\n| `(MD,* )`    | `MD`    | self    | `MD`      | self          | `MDPerp`  |\n| `(* ,MD)`    | self    | `MD`    | `MD`      | self          | `MDPerp`  |\n| `(MC,MR)`    | `MC`    | `MR`    | `VC`      | self          | self      |\n| `(MR,MC)`    | `MR`    | `MC`    | `VR`      | self          | self      |\n| `(MC,* )`    | `MC`    | self    | `MC`      | `MR`          | self      |\n| `(* ,MC)`    | self    | `MC`    | `MC`      | `MR`          | self      |\n| `(MR,* )`    | `MR`    | self    | `MR`      | `MC`          | self      |\n| `(* ,MR)`    | self    | `MR`    | `MR`      | `MC`          | self      |\n| `(VC,* )`    | `VC`    | self    | `VC`      | self          | self      |\n| `(* ,VC)`    | self    | `VC`    | `VC`      | self          | self      |\n| `(VR,* )`    | `VR`    | self    | `VR`      | self          | self      |\n| `(* ,VR)`    | self    | `VR`    | `VR`      | self          | self      |\n\nwhere `DistComm` refers to the communicator that the entire matrix (rather than\njust the rows or columns) is distributed over. When the matrix is distributed\nover a communicator which only involves only a subset of the processes, it is\npossible to either assign the data to just that subset or redundantly store \nthe entire matrix on each such subset of processes (e.g., within each row of a \n2D arrangement of the set of processes). The `RedundantComm` refers to the \ncommunicator where each member process stores the same information, and the \n`CrossComm` is the communicator where only a single process (the *root*) is \nassigned any data.\n\nTo make this discussion more precise, each valid matrix distribution for \n`DistMatrix` logically arranges the set of `p` processes of the `r` by `c` \nprocess grid into a 4D mesh: `ColComm` x `RowComm` x `RedundantComm` x `CrossComm`, where `DistComm` is equal to `ColComm` x `RowComm`.\n\nWe are now ready to describe the contents of this folder (in addition to this\nfile):\n\n-  `Abstract.hpp`: The underlying distribution-agnostic base class\n-  `CIRC_CIRC.hpp`: The `<T,CIRC,CIRC>` specialization, which provides a\n   distributed matrix where only one process owns data. It provides a simple\n   mechanism for forming a matrix on a single process and then redistributing\n   into another distribution, e.g., `(MC,MR)`.\n-  `MC_MR.hpp`: The standard matrix distribution\n-  `MC_STAR.hpp`: Only distribute each column like a standard matrix \n   distribution\n-  `MD_STAR.hpp`: Distribute each column like the diagonal of the standard\n   matrix distribution\n-  `MR_MC.hpp`: The transpose of the standard matrix distribution\n-  `MR_STAR.hpp`: Distribute each column like the row of a standard matrix \n   distribution\n-  `STAR_MC.hpp`: Distribute each row like a column of the standard matrix \n   distribution\n-  `STAR_MD.hpp`: Distribute each row like the diagonal of a standard matrix\n   distribution\n-  `STAR_MR.hpp`: Distribute each row like a standard matrix distribution\n-  `STAR_STAR.hpp`: Give each process a full copy of the matrix\n-  `STAR_VC.hpp`: Distribute each row using a round-robin wrapping over a \n   column-major ordering of the process grid\n-  `STAR_VR.hpp`: Distribute each row using a round-robin wrapping over a \n   row-major ordering of the process grid\n-  `VC_STAR.hpp`: Distribute each column using a round-robin wrapping over a\n   column-major ordering of the process grid\n-  `VR_STAR.hpp`: Distribute each column using a round-robin wrapping over a \n   row-major ordering of the process grid\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/STAR_MC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_STAR_MC_DECL_HPP\n#define ELEM_DISTMATRIX_STAR_MC_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,MC].\n//\n// The columns of these distributed matrices will be replicated on all \n// processes (*), and the rows will be distributed like \"Matrix Columns\" \n// (MC). Thus the rows will be distributed among columns of the process\n// grid.\ntemplate<typename T>\nclass DistMatrix<T,STAR,MC> : public GeneralDistMatrix<T,STAR,MC>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,STAR,MC> genType;\n    typedef DistMatrix<T,STAR,MC> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,MC>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int RowStride() const override;\n    Int ColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_STAR_MC_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/STAR_MD.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_STAR_MD_DECL_HPP\n#define ELEM_DISTMATRIX_STAR_MD_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,MD].\n// \n// The rows of these distributed matrices will be distributed like \n// \"Matrix Diagonals\" (MD). It is important to recognize that the diagonal\n// of a sufficiently large distributed matrix is distributed amongst the \n// entire process grid if and only if the dimensions of the process grid\n// are coprime.\ntemplate<typename T>\nclass DistMatrix<T,STAR,MD> : public GeneralDistMatrix<T,STAR,MD>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,STAR,MD> genType;\n    typedef DistMatrix<T,STAR,MD> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,MD>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int RowStride() const override;\n    Int ColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_STAR_MD_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/STAR_MR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_STAR_MR_DECL_HPP\n#define ELEM_DISTMATRIX_STAR_MR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,MR].\n//\n// The columns of these distributed matrices will be replicated on all \n// processes (*), and the rows will be distributed like \"Matrix Rows\" (MR).\n// Thus the rows will be distributed among rows of the process grid.\ntemplate<typename T>\nclass DistMatrix<T,STAR,MR> : public GeneralDistMatrix<T,STAR,MR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,STAR,MR> genType;\n    typedef DistMatrix<T,STAR,MR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,MR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int RowStride() const override;\n    Int ColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_STAR_MR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/STAR_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_STAR_STAR_DECL_HPP\n#define ELEM_DISTMATRIX_STAR_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,* ].\n//\n// The entire matrix is replicated across all processes.\ntemplate<typename T>\nclass DistMatrix<T,STAR,STAR> : public GeneralDistMatrix<T,STAR,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,STAR,STAR> genType;\n    typedef DistMatrix<T,STAR,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    Int RowStride() const override;\n    Int ColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_STAR_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/STAR_VC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_STAR_VC_DECL_HPP\n#define ELEM_DISTMATRIX_STAR_VC_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,VC].\n//\n// The rows of these distributed matrices are spread throughout the \n// process grid in a column-major fashion, while the columns are not \n// distributed.\ntemplate<typename T>\nclass DistMatrix<T,STAR,VC> : public GeneralDistMatrix<T,STAR,VC>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,STAR,VC> genType;\n    typedef DistMatrix<T,STAR,VC> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,VC>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    mpi::Comm PartialRowComm() const override;\n    mpi::Comm PartialUnionRowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int PartialRowStride() const override;\n    Int PartialUnionRowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_STAR_VC_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/STAR_VR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_STAR_VR_DECL_HPP\n#define ELEM_DISTMATRIX_STAR_VR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[* ,VR].\n//\n// The rows of these distributed matrices are spread throughout the \n// process grid in a row-major fashion, while the columns are not \n// distributed.\ntemplate<typename T>\nclass DistMatrix<T,STAR,VR> : public GeneralDistMatrix<T,STAR,VR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,STAR,VR> genType;\n    typedef DistMatrix<T,STAR,VR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,STAR,VR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    mpi::Comm PartialRowComm() const override;\n    mpi::Comm PartialUnionRowComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int PartialRowStride() const override;\n    Int PartialUnionRowStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_STAR_VR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/VC_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_VC_STAR_DECL_HPP\n#define ELEM_DISTMATRIX_VC_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[VC,* ].\n//\n// The columns of these distributed matrices are spread throughout the \n// process grid in a column-major fashion, while the rows are not \n// distributed.\ntemplate<typename T>\nclass DistMatrix<T,VC,STAR> : public GeneralDistMatrix<T,VC,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,VC,STAR> genType;\n    typedef DistMatrix<T,VC,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,VC,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    mpi::Comm PartialColComm() const override;\n    mpi::Comm PartialUnionColComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int PartialColStride() const override;\n    Int PartialUnionColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_VC_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/VR_STAR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_VR_STAR_DECL_HPP\n#define ELEM_DISTMATRIX_VR_STAR_DECL_HPP\n\nnamespace elem {\n\n// Partial specialization to A[VR,* ].\n//\n// The columns of these distributed matrices are spread throughout the \n// process grid in a row-major fashion, while the rows are not \n// distributed.\ntemplate<typename T>\nclass DistMatrix<T,VR,STAR> : public GeneralDistMatrix<T,VR,STAR>\n{\npublic:\n    // Typedefs\n    // ========\n    typedef AbstractDistMatrix<T> absType;\n    typedef GeneralDistMatrix<T,VR,STAR> genType;\n    typedef DistMatrix<T,VR,STAR> type;\n\n    // Constructors and destructors\n    // ============================\n\n    // Inherited constructors are part of C++11 but not yet widely supported.\n    //using GeneralDistMatrix<T,VR,STAR>::GeneralDistMatrix;\n\n    // Create a 0 x 0 distributed matrix\n    DistMatrix( const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a height x width distributed matrix\n    DistMatrix\n    ( Int height, Int width, const elem::Grid& g=DefaultGrid(), Int root=0 );\n    // Create a copy of distributed matrix A\n    DistMatrix( const type& A );\n    template<Dist U,Dist V> DistMatrix( const DistMatrix<T,U,V>& A );\n    template<Dist U,Dist V> DistMatrix( const BlockDistMatrix<T,U,V>& A );\n    // Move constructor\n    DistMatrix( type&& A ) ELEM_NOEXCEPT;\n    ~DistMatrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    template<Dist U,Dist V> type& operator=( const BlockDistMatrix<T,U,V>& A );\n    type& operator=( const DistMatrix<T,MC,  MR  >& A );\n    type& operator=( const DistMatrix<T,MC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MR  >& A );\n    type& operator=( const DistMatrix<T,MD,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MD  >& A );\n    type& operator=( const DistMatrix<T,MR,  MC  >& A );\n    type& operator=( const DistMatrix<T,MR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,MC  >& A );\n    type& operator=( const DistMatrix<T,VC,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VC  >& A );\n    type& operator=( const DistMatrix<T,VR,  STAR>& A );\n    type& operator=( const DistMatrix<T,STAR,VR  >& A );\n    type& operator=( const DistMatrix<T,STAR,STAR>& A );\n    type& operator=( const DistMatrix<T,CIRC,CIRC>& A );\n    // Move assignment\n    type& operator=( type&& A );\n\n    // Basic queries\n    // =============\n    elem::DistData DistData() const override;\n    mpi::Comm DistComm() const override;\n    mpi::Comm CrossComm() const override;\n    mpi::Comm RedundantComm() const override;\n    mpi::Comm ColComm() const override;\n    mpi::Comm RowComm() const override;\n    mpi::Comm PartialColComm() const override;\n    mpi::Comm PartialUnionColComm() const override;\n    Int ColStride() const override;\n    Int RowStride() const override;\n    Int PartialColStride() const override;\n    Int PartialUnionColStride() const override;\n    Int DistSize() const override;\n    Int CrossSize() const override;\n    Int RedundantSize() const override;\n\nprivate:\n    // Friend declarations\n    // ===================\n    template<typename S,Dist U,Dist V> friend class DistMatrix;\n    template<typename S,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_VR_STAR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix/forward_decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_FORWARD_DECL_HPP\n#define ELEM_DISTMATRIX_FORWARD_DECL_HPP\n\nnamespace elem {\n\ntemplate<typename T>\nclass AbstractDistMatrix;\n\ntemplate<typename T,Dist U=MC,Dist V=MR>\nclass GeneralDistMatrix;\n\ntemplate<typename T,Dist U=MC,Dist V=MR>\nclass DistMatrix;\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISTMATRIX_FORWARD_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/DistMatrix.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISTMATRIX_HPP\n#define ELEM_DISTMATRIX_HPP\n\nnamespace elem {\n\nstruct DistData\n{\n    Dist colDist, rowDist;\n    Int colAlign, rowAlign; \n    Int root;  // relevant for [o ,o ]/[MD,* ]/[* ,MD]\n    const Grid* grid;\n\n    template<typename T,Dist U,Dist V>\n    DistData( const GeneralDistMatrix<T,U,V>& A )\n    : colDist(U), rowDist(V),\n      colAlign(A.ColAlign()), rowAlign(A.RowAlign()),\n      root(A.Root()), grid(&A.Grid())\n    { }\n};\n\n} // namespace elem\n\n#include \"./DistMatrix/Abstract.hpp\"\n#include \"./DistMatrix/General.hpp\"\n#include \"./DistMatrix/CIRC_CIRC.hpp\"\n#include \"./DistMatrix/MC_MR.hpp\"\n#include \"./DistMatrix/MC_STAR.hpp\"\n#include \"./DistMatrix/MD_STAR.hpp\"\n#include \"./DistMatrix/MR_MC.hpp\"\n#include \"./DistMatrix/MR_STAR.hpp\"\n#include \"./DistMatrix/STAR_MC.hpp\"\n#include \"./DistMatrix/STAR_MD.hpp\"\n#include \"./DistMatrix/STAR_MR.hpp\"\n#include \"./DistMatrix/STAR_STAR.hpp\"\n#include \"./DistMatrix/STAR_VC.hpp\"\n#include \"./DistMatrix/STAR_VR.hpp\"\n#include \"./DistMatrix/VC_STAR.hpp\"\n#include \"./DistMatrix/VR_STAR.hpp\"\n\n#endif // ifndef ELEM_DISTMATRIX_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/Grid/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n                      2013, Jed Brown \n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GRID_DECL_HPP\n#define ELEM_GRID_DECL_HPP\n\nnamespace elem {\n\nclass Grid\n{\npublic:\n    explicit Grid\n    ( mpi::Comm comm=mpi::COMM_WORLD, GridOrder order=COLUMN_MAJOR );\n    explicit Grid( mpi::Comm comm, int height, GridOrder order=COLUMN_MAJOR );\n    ~Grid();\n\n    // Simple interface (simpler version of distributed-based interface)\n    int Row() const;           // MCRank()\n    int Col() const;           // MRRank()\n    int Rank() const;          // VCRank (VRRank) if COLUMN_MAJOR (ROW_MAJOR)\n    int Height() const;        // MCSize()\n    int Width() const;         // MRSize()\n    int Size() const;          // VCSize() and VRSize()\n    GridOrder Order() const;   // either COLUMN_MAJOR or ROW_MAJOR\n    mpi::Comm ColComm() const; // MCComm()\n    mpi::Comm RowComm() const; // MRComm()\n    mpi::Comm Comm() const;    // VCComm (VRComm) if COLUMN_MAJOR (ROW_MAJOR)\n\n    // Distribution-based interface\n    int MCRank() const;\n    int MRRank() const;\n    int VCRank() const;\n    int VRRank() const;\n    int MCSize() const;\n    int MRSize() const;\n    int VCSize() const;\n    int VRSize() const;\n    mpi::Comm MCComm() const;\n    mpi::Comm MRComm() const;\n    mpi::Comm VCComm() const;\n    mpi::Comm VRComm() const;\n    mpi::Comm MDComm() const;\n    mpi::Comm MDPerpComm() const;\n\n    // Advanced routines\n    explicit Grid\n    ( mpi::Comm viewers, mpi::Group owners, int height, \n      GridOrder order=COLUMN_MAJOR );\n    int GCD() const; // greatest common denominator of grid height and width\n    int LCM() const; // lowest common multiple of grid height and width\n    bool InGrid() const;\n    bool HaveViewers() const;\n    int OwningRank() const;\n    int ViewingRank() const;\n    int VCToViewingMap( int VCRank ) const;\n    mpi::Group OwningGroup() const;\n    mpi::Comm OwningComm() const;\n    mpi::Comm ViewingComm() const;\n    int DiagPath() const;\n    int DiagPath( int vectorColRank ) const;\n    int DiagPathRank() const;\n    int DiagPathRank( int vectorColRank ) const;\n    int FirstVCRank( int diagPath ) const;\n\n    static int FindFactor( int p );\n\nprivate:\n    bool haveViewers_;\n    int height_, size_, gcd_;\n    GridOrder order_;\n    std::vector<int> diagPathsAndRanks_;\n\n    mpi::Comm viewingComm_; // all processes that create the grid\n    mpi::Group viewingGroup_;\n    std::vector<int> vectorColToViewingMap_;\n\n    // Create a communicator for our owning team\n    mpi::Comm owningComm_;\n    mpi::Group owningGroup_;\n\n    // These will only be valid if we are in the grid\n    mpi::Comm cartComm_,  // the processes that are in the grid\n              matrixColComm_, matrixRowComm_,\n              matrixDiagComm_, matrixDiagPerpComm_,\n              vectorColComm_, vectorRowComm_;\n\n    void SetUpGrid();\n\n    // Disable copying this class due to MPI_Comm/MPI_Group ownership issues\n    // and potential performance loss from duplicating MPI communicators, e.g.,\n    // on Blue Gene/P there is supposedly a performance loss\n    const Grid& operator=( Grid& );\n    Grid( const Grid& );\n};\n\nbool operator== ( const Grid& A, const Grid& B );\nbool operator!= ( const Grid& A, const Grid& B );\n\n// Return a grid constructed using mpi::COMM_WORLD.\nconst Grid& DefaultGrid();\n\n} // namespace elem\n\n#endif // ifndef ELEM_GRID_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/Grid/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n                      2013, Jed Brown \n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GRID_IMPL_HPP\n#define ELEM_GRID_IMPL_HPP\n\nnamespace elem {\n\ninline int\nGrid::FindFactor( int p )\n{\n    int factor = int(sqrt(double(p)));\n    while( p % factor != 0 )\n        ++factor;\n    return factor;\n}\n\ninline \nGrid::Grid( mpi::Comm comm, GridOrder order )\n: haveViewers_(false), order_(order)\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Grid::Grid\"))\n\n    // Extract our rank, the underlying group, and the number of processes\n    mpi::Dup( comm, viewingComm_ );\n    mpi::CommGroup( viewingComm_, viewingGroup_ );\n    size_ = mpi::Size( viewingComm_ );\n\n    // All processes own the grid, so we have to trivially split viewingGroup_\n    owningGroup_ = viewingGroup_;\n\n    // Factor p\n    height_ = FindFactor( size_ );\n    SetUpGrid();\n}\n\ninline \nGrid::Grid( mpi::Comm comm, int height, GridOrder order )\n: haveViewers_(false), order_(order)\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Grid::Grid\"))\n\n    // Extract our rank, the underlying group, and the number of processes\n    mpi::Dup( comm, viewingComm_ );\n    mpi::CommGroup( viewingComm_, viewingGroup_ );\n    size_ = mpi::Size( viewingComm_ );\n\n    // All processes own the grid, so we have to trivially split viewingGroup_\n    owningGroup_ = viewingGroup_;\n\n    height_ = height;\n    if( height_ < 0 )\n        LogicError(\"Process grid dimensions must be non-negative\");\n\n    SetUpGrid();\n}\n\ninline void \nGrid::SetUpGrid()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Grid::SetUpGrid\"))\n    if( size_ % height_ != 0 )\n        LogicError\n        (\"Grid height, \",height_,\", does not evenly divide grid size, \",size_);\n\n    const int width = size_ / height_;\n    gcd_ = elem::GCD( height_, width );\n    int lcm = size_ / gcd_;\n\n    // Create the communicator for the owning group (mpi::COMM_NULL otherwise)\n    mpi::Create( viewingComm_, owningGroup_, owningComm_ );\n\n    vectorColToViewingMap_.resize(size_);\n    diagPathsAndRanks_.resize(2*size_);\n    MemZero( diagPathsAndRanks_.data(), 2*size_ );\n    const bool colMajor = (order_==COLUMN_MAJOR);\n    if( InGrid() )\n    {\n        // Create a cartesian communicator\n        int dimensions[2];\n        if( colMajor )\n        {\n            dimensions[0] = width;\n            dimensions[1] = height_;\n        }\n        else\n        {\n            dimensions[0] = height_;\n            dimensions[1] = width;\n        }\n        int periods[2] = { true, true };\n        bool reorder = false;\n        mpi::CartCreate\n        ( owningComm_, 2, dimensions, periods, reorder, cartComm_ );\n\n        // Set up the MatrixCol and MatrixRow communicators\n        int remainingDimensions[2];\n        remainingDimensions[0] = ( colMajor ? false : true  );\n        remainingDimensions[1] = ( colMajor ? true  : false );\n        mpi::CartSub( cartComm_, remainingDimensions, matrixColComm_ );\n        remainingDimensions[0] = ( colMajor ? true  : false );\n        remainingDimensions[1] = ( colMajor ? false : true  );\n        mpi::CartSub( cartComm_, remainingDimensions, matrixRowComm_ );\n        const int matrixColRank = mpi::Rank( matrixColComm_ );\n        const int matrixRowRank = mpi::Rank( matrixRowComm_ );\n\n        // Set up the VectorCol and VectorRow communicators\n        const int vectorColRank = matrixColRank + height_*matrixRowRank;\n        const int vectorRowRank = matrixRowRank + width*matrixColRank;\n        mpi::Split( cartComm_, 0, vectorColRank, vectorColComm_ );\n        mpi::Split( cartComm_, 0, vectorRowRank, vectorRowComm_ );\n\n        // Set up the map from the VC group to the viewingGroup_ ranks.\n        mpi::Group vectorColGroup;\n        mpi::CommGroup( vectorColComm_, vectorColGroup ); \n        std::vector<int> ranks(size_);\n        for( int i=0; i<size_; ++i )\n            ranks[i] = i;\n        mpi::Translate\n        ( vectorColGroup, size_, ranks.data(), \n          viewingGroup_,         vectorColToViewingMap_.data() );\n        mpi::Free( vectorColGroup );\n\n        // Compute which diagonal 'path' we're in, and what our rank is, then\n        // perform AllGather world to store everyone's info\n        std::vector<int> myDiagPathAndRank(2);\n        myDiagPathAndRank[0] = Mod(matrixRowRank-matrixColRank,gcd_);\n        int diagPathRank = 0;\n        int row = 0;\n        int col = myDiagPathAndRank[0];\n        for( int j=0; j<lcm; ++j )\n        {\n            if( row == matrixColRank && col == matrixRowRank )\n            {\n                myDiagPathAndRank[1] = diagPathRank;\n                break;\n            }\n            else\n            {\n                row = (row + 1) % height_;\n                col = (col + 1) % width;\n                ++diagPathRank;\n            }\n        }\n        mpi::AllGather\n        ( myDiagPathAndRank.data(),  2, \n          diagPathsAndRanks_.data(), 2, vectorColComm_ );\n\n        mpi::Split( cartComm_, DiagPath(), DiagPathRank(), matrixDiagComm_ );\n        mpi::Split\n        ( cartComm_, DiagPathRank(), DiagPath(), matrixDiagPerpComm_ );\n\n        DEBUG_ONLY(\n            mpi::ErrorHandlerSet( matrixColComm_,      mpi::ERRORS_RETURN );\n            mpi::ErrorHandlerSet( matrixRowComm_,      mpi::ERRORS_RETURN );\n            mpi::ErrorHandlerSet( vectorColComm_,      mpi::ERRORS_RETURN );\n            mpi::ErrorHandlerSet( vectorRowComm_,      mpi::ERRORS_RETURN );\n            mpi::ErrorHandlerSet( matrixDiagComm_,     mpi::ERRORS_RETURN );\n            mpi::ErrorHandlerSet( matrixDiagPerpComm_, mpi::ERRORS_RETURN );\n        )\n    }\n    else\n    {\n        matrixColComm_      = mpi::COMM_NULL;\n        matrixRowComm_      = mpi::COMM_NULL;\n        vectorColComm_      = mpi::COMM_NULL;\n        vectorRowComm_      = mpi::COMM_NULL;\n        matrixDiagComm_     = mpi::COMM_NULL; \n        matrixDiagPerpComm_ = mpi::COMM_NULL;\n        // diag paths and ranks are implicitly set to undefined\n    }\n    // Translate the rank of the root process of the owningGroup so that we can\n    // broadcast data\n    int owningRoot = mpi::Translate( owningGroup_, 0, viewingGroup_ );\n    mpi::Broadcast\n    ( vectorColToViewingMap_.data(), size_, owningRoot, viewingComm_ );\n    mpi::Broadcast\n    ( diagPathsAndRanks_.data(), 2*size_, owningRoot, viewingComm_ );\n}\n\ninline \nGrid::~Grid()\n{\n    if( !mpi::Finalized() )\n    {\n        if( InGrid() )\n        {\n            mpi::Free( matrixDiagComm_ );\n            mpi::Free( matrixDiagPerpComm_ );\n            mpi::Free( matrixColComm_ );\n            mpi::Free( matrixRowComm_ );\n            mpi::Free( vectorColComm_ );\n            mpi::Free( vectorRowComm_ );\n            mpi::Free( cartComm_ );\n            mpi::Free( owningComm_ );\n        }\n        mpi::Free( viewingComm_ );\n        if( HaveViewers() )\n            mpi::Free( owningGroup_ );\n        mpi::Free( viewingGroup_ );\n    }\n}\n\ninline int Grid::MCRank() const { return mpi::Rank(matrixColComm_); }\ninline int Grid::MRRank() const { return mpi::Rank(matrixRowComm_); }\ninline int Grid::VCRank() const { return mpi::Rank(vectorColComm_); }\ninline int Grid::VRRank() const { return mpi::Rank(vectorRowComm_); }\n\ninline int Grid::MCSize() const { return height_;       }\ninline int Grid::MRSize() const { return size_/height_; }\ninline int Grid::VCSize() const { return size_;         }\ninline int Grid::VRSize() const { return size_;         }\n\ninline mpi::Comm Grid::MCComm()     const { return matrixColComm_;      }\ninline mpi::Comm Grid::MRComm()     const { return matrixRowComm_;      }\ninline mpi::Comm Grid::VCComm()     const { return vectorColComm_;      }\ninline mpi::Comm Grid::VRComm()     const { return vectorRowComm_;      }\ninline mpi::Comm Grid::MDComm()     const { return matrixDiagComm_;     }\ninline mpi::Comm Grid::MDPerpComm() const { return matrixDiagPerpComm_; }\n\n// Provided for simplicity, but redundant\n// ======================================\n\ninline int \nGrid::Rank() const { return ( order_==COLUMN_MAJOR ? VCRank() : VRRank() ); }\n\ninline int Grid::Height() const { return MCSize(); }\ninline int Grid::Width()  const { return MRSize(); }\ninline int Grid::Size()   const { return VCSize(); }\n\ninline GridOrder Grid::Order() const { return order_; }\n\ninline int Grid::Row() const { return MCRank(); }\ninline int Grid::Col() const { return MRRank(); }\ninline mpi::Comm Grid::ColComm() const { return MCComm(); }\ninline mpi::Comm Grid::RowComm() const { return MRComm(); }\ninline mpi::Comm Grid::Comm() const\n{ return ( order_==COLUMN_MAJOR ? VCComm() : VRComm() ); }\n\n// Advanced routines\n// =================\n\n// Currently forces a columnMajor absolute rank on the grid\ninline \nGrid::Grid( mpi::Comm viewers, mpi::Group owners, int height, GridOrder order )\n: haveViewers_(true), order_(order)\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Grid::Grid\"))\n\n    // Extract our rank and the underlying group from the viewing comm\n    mpi::Dup( viewers, viewingComm_ );\n    mpi::CommGroup( viewingComm_, viewingGroup_ );\n\n    // Extract our rank and the number of processes from the owning group\n    mpi::Dup( owners, owningGroup_ );\n    size_ = mpi::Size( owningGroup_ );\n\n    height_ = height;\n    if( height_ < 0 )\n        LogicError(\"Process grid dimensions must be non-negative\");\n\n    SetUpGrid();\n}\n\ninline int Grid::GCD() const { return gcd_; }\ninline int Grid::LCM() const { return size_/gcd_; }\n\ninline bool Grid::HaveViewers() const { return haveViewers_; }\ninline bool Grid::InGrid() const \n{ return mpi::Rank(owningGroup_) != mpi::UNDEFINED; }\n\ninline int Grid::OwningRank() const { return mpi::Rank(owningGroup_); }\ninline int Grid::ViewingRank() const { return mpi::Rank(viewingComm_); }\n\ninline int Grid::VCToViewingMap( int VCRank ) const\n{ return vectorColToViewingMap_[VCRank]; }\n\ninline mpi::Group Grid::OwningGroup() const { return owningGroup_; }\ninline mpi::Comm Grid::OwningComm()  const { return owningComm_; }\ninline mpi::Comm Grid::ViewingComm() const { return viewingComm_; }\n\ninline int \nGrid::DiagPath() const\n{ \n    const int vcRank = VCRank();\n    if( vcRank != mpi::UNDEFINED )\n        return diagPathsAndRanks_[2*vcRank];\n    else\n        return mpi::UNDEFINED;\n}\n\ninline int \nGrid::DiagPath( int vectorColRank ) const\n{ \n    if( vectorColRank != mpi::UNDEFINED )\n        return diagPathsAndRanks_[2*vectorColRank]; \n    else\n        return mpi::UNDEFINED;\n}\n\ninline int \nGrid::DiagPathRank() const\n{ \n    const int vcRank = VCRank();\n    if( vcRank != mpi::UNDEFINED )\n        return diagPathsAndRanks_[2*vcRank+1];\n    else\n        return mpi::UNDEFINED;\n}\n\ninline int \nGrid::DiagPathRank( int vectorColRank ) const\n{ \n    if( vectorColRank != mpi::UNDEFINED )\n        return diagPathsAndRanks_[2*vectorColRank+1]; \n    else\n        return mpi::UNDEFINED;\n}\n\ninline int Grid::FirstVCRank( int diagPath ) const{ return diagPath*height_; }\n\n// Comparison functions\n// ====================\n\ninline bool operator==( const Grid& A, const Grid& B ) { return &A == &B; }\ninline bool operator!=( const Grid& A, const Grid& B ) { return &A != &B; }\n\n} // namespace elem\n\n#endif // ifndef ELEM_GRID_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/Matrix/forward_decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MATRIX_FORWARD_DECL_HPP\n#define ELEM_MATRIX_FORWARD_DECL_HPP\n\nnamespace elem {\n\ntemplate<typename T>\nclass Matrix;\n\n} // namespace elem\n\n#endif // ifndef ELEM_MATRIX_FORWARD_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/Matrix.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MATRIX_HPP\n#define ELEM_MATRIX_HPP\n\nnamespace elem {\n\n// Matrix base for arbitrary rings\ntemplate<typename T>\nclass Matrix\n{\npublic:    \n    // Constructors and destructors\n    // ============================\n    // Create a 0x0 matrix\n    Matrix( bool fixed=false );\n    // Create a matrix with the specified dimensions\n    Matrix( Int height, Int width, bool fixed=false );\n    // Create a matrix with the specified dimensions and leading dimension\n    Matrix( Int height, Int width, Int ldim, bool fixed=false );\n    // Construct a matrix around an existing (possibly immutable) buffer\n    Matrix\n    ( Int height, Int width, const T* buffer, Int ldim, bool fixed=false );\n    Matrix( Int height, Int width, T* buffer, Int ldim, bool fixed=false );\n    // Create a copy of a matrix\n    Matrix( const Matrix<T>& A );\n    // Move the metadata from a given matrix\n    Matrix( Matrix<T>&& A ) ELEM_NOEXCEPT;\n    // Destructor\n    ~Matrix();\n\n    // Assignment and reconfiguration\n    // ==============================\n    Matrix<T>& operator=( const Matrix<T>& A );\n    // Move the metadata from the given matrix\n    Matrix<T>& operator=( Matrix<T>&& A );\n    void Empty();\n    void Resize( Int height, Int width );\n    void Resize( Int height, Int width, Int ldim );\n    // Reconfigure around the given buffer, but do not assume ownership\n    void Attach( Int height, Int width, T* buffer, Int ldim );\n    void LockedAttach( Int height, Int width, const T* buffer, Int ldim );\n    // Reconfigure around the given buffer and assume ownership\n    void Control( Int height, Int width, T* buffer, Int ldim );\n\n    // Basic queries\n    // =============\n    Int Height() const;\n    Int Width() const;\n    Int LDim() const;\n    Int MemorySize() const;\n    Int DiagonalLength( Int offset=0 ) const;\n    T* Buffer();\n    const T* LockedBuffer() const;\n    T* Buffer( Int i, Int j );\n    const T* LockedBuffer( Int i, Int j ) const;\n    bool Viewing()   const;\n    bool FixedSize() const;\n    bool Locked()    const;\n\n    // Single-entry manipulation\n    // =========================\n    T Get( Int i, Int j ) const;\n    Base<T> GetRealPart( Int i, Int j ) const;\n    Base<T> GetImagPart( Int i, Int j ) const;\n    void Set( Int i, Int j, T alpha );\n    void SetRealPart( Int i, Int j, Base<T> alpha );\n    void SetImagPart( Int i, Int j, Base<T> alpha );\n    void Update( Int i, Int j, T alpha );\n    void UpdateRealPart( Int i, Int j, Base<T> alpha );\n    void UpdateImagPart( Int i, Int j, Base<T> alpha );\n    void MakeReal( Int i, Int j );\n    void Conjugate( Int i, Int j );\n\n    // Diagonal manipulation\n    // =====================\n    void GetDiagonal( Matrix<T>& d, Int offset=0 ) const;\n    void GetRealPartOfDiagonal( Matrix<Base<T>>& d, Int offset=0 ) const;\n    void GetImagPartOfDiagonal( Matrix<Base<T>>& d, Int offset=0 ) const;\n    Matrix<T> GetDiagonal( Int offset=0 ) const;\n    Matrix<Base<T>> GetRealPartOfDiagonal( Int offset=0 ) const;\n    Matrix<Base<T>> GetImagPartOfDiagonal( Int offset=0 ) const;\n\n    void SetDiagonal( const Matrix<T>& d, Int offset=0 );\n    void SetRealPartOfDiagonal( const Matrix<Base<T>>& d, Int offset=0 );\n    void SetImagPartOfDiagonal( const Matrix<Base<T>>& d, Int offset=0 );\n\n    void UpdateDiagonal( const Matrix<T>& d, Int offset=0 );\n    void UpdateRealPartOfDiagonal( const Matrix<Base<T>>& d, Int offset=0 );\n    void UpdateImagPartOfDiagonal( const Matrix<Base<T>>& d, Int offset=0 );\n\n    void MakeDiagonalReal( Int offset=0 );\n    void ConjugateDiagonal( Int offset=0 );\n\n    // Arbitrary submatrix manipulation\n    // ================================\n    void GetSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      Matrix<T>& ASub ) const;\n    void GetRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      Matrix<Base<T>>& ASub ) const;\n    void GetImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      Matrix<Base<T>>& ASub ) const;\n    Matrix<T> GetSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const;\n    Matrix<Base<T>> GetRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const;\n    Matrix<Base<T>> GetImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const;\n\n    void SetSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      const Matrix<T>& ASub );\n    void SetRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      const Matrix<Base<T>>& ASub );\n    void SetImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      const Matrix<Base<T>>& ASub );\n\n    void UpdateSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      T alpha, const Matrix<T>& ASub );\n    void UpdateRealPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      Base<T> alpha, const Matrix<Base<T>>& ASub );\n    void UpdateImagPartOfSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n      Base<T> alpha, const Matrix<Base<T>>& ASub );\n\n    void MakeSubmatrixReal\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd );\n    void ConjugateSubmatrix\n    ( const std::vector<Int>& rowInd, const std::vector<Int>& colInd );\n\nprivate:\n    // Member variables\n    // ================\n    ViewType viewType_;\n    Int height_, width_, ldim_;\n    const T* data_;\n    Memory<T> memory_;\n\n    // Exchange metadata with another matrix\n    // =====================================\n    void ShallowSwap( Matrix<T>& A );\n\n    // Reconfigure without error-checking\n    // ==================================\n    void Empty_();\n    void Resize_( Int height, Int width );\n    void Resize_( Int height, Int width, Int ldim );\n    void Control_( Int height, Int width, T* buffer, Int ldim );\n    void Attach_( Int height, Int width, T* buffer, Int ldim );\n    void LockedAttach_( Int height, Int width, const T* buffer, Int ldim );\n\n    // Return a reference to a single entry without error-checking\n    // ===========================================================\n    const T& Get_( Int i, Int j ) const;\n    T& Set_( Int i, Int j );\n\n    // Assertions\n    // ==========\n    void ComplainIfReal() const;\n    void AssertValidDimensions( Int height, Int width ) const;\n    void AssertValidDimensions( Int height, Int width, Int ldim ) const;\n    void AssertValidEntry( Int i, Int j ) const;\n   \n    // Friend declarations\n    // ===================\n    template <typename F>               friend class Matrix;\n    template <typename F>               friend class AbstractDistMatrix;\n    template <typename F>               friend class AbstractBlockDistMatrix;\n    template <typename F,Dist U,Dist V> friend class GeneralDistMatrix;\n    template <typename F,Dist U,Dist V> friend class GeneralBlockDistMatrix;\n    template <typename F,Dist U,Dist V> friend class DistMatrix;\n    template <typename F,Dist U,Dist V> friend class BlockDistMatrix;\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_MATRIX_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/Memory.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MEMORY_HPP\n#define ELEM_MEMORY_HPP\n\nnamespace elem {\n\ntemplate<typename G>\nclass Memory\n{\n    std::size_t size_;\n    G* buffer_;\npublic:\n    Memory();\n    Memory( std::size_t size );\n    ~Memory();\n\n    Memory( Memory<G>&& mem );\n    Memory<G>& operator=( Memory<G>&& mem );\n\n    // Exchange metadata with 'mem'\n    void ShallowSwap( Memory<G>& mem );\n\n    G* Buffer() const;\n    std::size_t Size()   const;\n\n    G* Require( std::size_t size );\n    void Release();\n    void Empty();\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_MEMORY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/README.md",
    "content": "### `include/elemental/core/`\n\n#### Axpy interface\n\n-  `AxpyInterface/`:\n-  `AxpyInterface.hpp`:\n\n#### Complex arithmetic \n\n-  `Complex/`:\n-  `Complex.hpp`:\n\n#### `BlockDistMatrix`\n\n-  `BlockDistMatrix/`:\n-  `BlockDistMatrix.hpp`:\n\n#### `DistMatrix`\n\n-  `DistMatrix/`:\n-  `DistMatrix.hpp`:\n\n#### Basic environment\n\n-  `environment/`:\n\n#### Process grid\n\n-  `Grid/`:\n\n#### Imported functionality\n\n-  `imports/`:\n\n#### Indexing utilities\n\n-  `indexing/`:\n\n#### `Matrix`\n\n-  `Matrix/`:\n-  `Matrix.hpp`:\n\n#### Memory\n\n-  `Memory/`:\n\n#### Random number generation\n\n-  `random/`:\n\n#### Matrix view manipulation\n\n-  `views/`:\n\n#### Timings\n\n-  `Timer/`:\n\n#### Datatypes\n\n-  `types/`:\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/Timer/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TIMER_DECL_HPP\n#define ELEM_TIMER_DECL_HPP\n\n#include <chrono>\n\nnamespace elem {\n\nusing std::chrono::duration;\nusing std::chrono::duration_cast;\n#ifdef ELEM_HAVE_STEADYCLOCK\nusing std::chrono::steady_clock;\n#else\nusing std::chrono::high_resolution_clock;\n#endif\n\nclass Timer\n{\npublic:\n    Timer( const std::string& name=\"[blank]\" );\n\n    const std::string& Name() const;\n\n    void Start();\n    double Stop();\n    double Partial() const; // time since last start\n    double Total() const; // total elapsed time\n\n    void Reset( const std::string& name=\"[blank]\" );\nprivate:\n    bool running_ = false;\n    std::string name_ = \"[blank]\";\n    double totalTime_=0, lastPartialTime_=0;\n#ifdef ELEM_HAVE_STEADYCLOCK\n    steady_clock::time_point lastTime_;\n#else\n    high_resolution_clock::time_point lastTime_;\n#endif\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_TIMER_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/Timer/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TIMER_IMPL_HPP\n#define ELEM_TIMER_IMPL_HPP\n\nnamespace elem {\n\ninline Timer::Timer( const std::string& name )\n: name_(name)\n{ }\n\ninline void\nTimer::Start()\n{\n    DEBUG_ONLY(\n        if( running_ )\n            LogicError(\"Forgot to stop timer before restarting.\");\n    )\n#ifdef ELEM_HAVE_STEADYCLOCK\n    lastTime_ = steady_clock::now();\n#else\n    lastTime_ = high_resolution_clock::now();\n#endif\n    running_ = true;\n}\n\ninline double\nTimer::Stop()\n{\n    DEBUG_ONLY(\n        if( !running_ )\n            LogicError(\"Tried to stop a timer before starting it.\");\n    )\n    lastPartialTime_ = Partial();\n    running_ = false;\n    totalTime_ += lastPartialTime_;\n    return lastPartialTime_;\n}\n\ninline void\nTimer::Reset( const std::string& name )\n{ \n    name_ = name;\n    running_ = false;\n    totalTime_ = 0; \n    lastPartialTime_ = 0;\n}\n\ninline const std::string&\nTimer::Name() const\n{ return name_; }\n\ninline double\nTimer::Partial() const\n{ \n    if( running_ )\n    {\n#ifdef ELEM_HAVE_STEADYCLOCK\n        auto now = steady_clock::now();\n#else\n        auto now = high_resolution_clock::now();\n#endif\n        auto timeSpan = duration_cast<duration<double>>(now-lastTime_);\n        return timeSpan.count();\n    }\n    else\n        return lastPartialTime_; \n}\n\ninline double\nTimer::Total() const\n{\n    if( running_ )\n        return totalTime_ + Partial();\n    else\n        return totalTime_;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TIMER_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/environment/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_ENVIRONMENT_DECL_HPP\n#define ELEM_ENVIRONMENT_DECL_HPP\n\nnamespace elem {\n\nvoid PrintVersion( std::ostream& os=std::cout );\nvoid PrintConfig( std::ostream& os=std::cout );\nvoid PrintCCompilerInfo( std::ostream& os=std::cout );\nvoid PrintCxxCompilerInfo( std::ostream& os=std::cout );\n\n// For initializing and finalizing Elemental\nvoid Initialize( int& argc, char**& argv );\nvoid Finalize();\nbool Initialized();\n\n// For getting the MPI argument instance (for internal usage)\nclass Args : public choice::MpiArgs\n{\npublic:\n    Args\n    ( int argc, char** argv,\n      mpi::Comm comm=mpi::COMM_WORLD, std::ostream& error=std::cerr )\n    : choice::MpiArgs(argc,argv,comm,error)\n    { }\n    virtual ~Args() { }\nprotected:\n    virtual void HandleVersion( std::ostream& os=std::cout ) const;\n    virtual void HandleBuild( std::ostream& os=std::cout ) const;\n};\nArgs& GetArgs();\n\n// For processing command-line arguments\ntemplate<typename T>\nT Input( std::string name, std::string desc );\ntemplate<typename T>\nT Input( std::string name, std::string desc, T defaultVal );\nvoid ProcessInput();\nvoid PrintInputReport();\n\n// For getting and setting the algorithmic blocksize\nInt Blocksize();\nvoid SetBlocksize( Int blocksize );\n\n// For manipulating the algorithmic blocksize as a stack\nvoid PushBlocksizeStack( Int blocksize );\nvoid PopBlocksizeStack();\n\nInt DefaultBlockHeight();\nInt DefaultBlockWidth();\nvoid SetDefaultBlockHeight( Int blockHeight );\nvoid SetDefaultBlockWidth( Int blockWidth );\n\nstd::mt19937& Generator();\n\ntemplate<typename T>\ninline T Max( T m, T n )\n{ return std::max(m,n); }\n\ninline Int Max( Int m, Int n )\n{ return std::max(m,n); }\n\ntemplate<typename T>\ninline T Min( T m, T n )\n{ return std::min(m,n); }\n\ninline Int Min( Int m, Int n )\n{ return std::min(m,n); }\n\n// Replacement for std::memcpy, which is known to often be suboptimal.\n// Notice the sizeof(T) is no longer required.\ntemplate<typename T>\nvoid MemCopy( T* dest, const T* source, std::size_t numEntries );\n\ntemplate<typename T>\nvoid MemSwap( T* a, T* b, T* temp, std::size_t numEntries );\n\n// Generalization of std::memcpy so that unit strides are not required\ntemplate<typename T>\nvoid StridedMemCopy\n(       T* dest,   std::size_t destStride,\n  const T* source, std::size_t sourceStride, std::size_t numEntries );\n\n// Replacement for std::memset, which is likely suboptimal and hard to extend\n// to non-POD datatypes. Notice that sizeof(T) is no longer required.\ntemplate<typename T>\nvoid MemZero( T* buffer, std::size_t numEntries );\n\n// Clear the contents of x by swapping with an empty object of the same type\ntemplate<typename T>\nvoid SwapClear( T& x );\n\ninline void BuildStream( std::ostringstream& os ) { }\n\ntemplate<typename T,typename... Args>\ninline void BuildStream( std::ostringstream& os, T item, Args... args )\n{\n    os << item;\n    BuildStream( os, args... );\n}\n\ntemplate<typename... Args>\ninline void LogicError( Args... args )\n{\n    std::ostringstream os;\n    BuildStream( os, args... );\n    os << std::endl;\n    throw std::logic_error( os.str().c_str() );\n}\n\ntemplate<typename... Args>\ninline void RuntimeError( Args... args )\n{\n    std::ostringstream os;\n    BuildStream( os, args... );\n    os << std::endl;\n    throw std::logic_error( os.str().c_str() );\n}\n\n// This is the only place that Elemental is currently using duck-typing.\n// I'm not sure if it's a good idea to use it more often.\ntemplate<class MatType>\ninline std::string \nDimsString( const MatType& A, std::string label=\"Matrix\" )\n{ \n    std::ostringstream os;\n    os << label << \" ~ \" << A.Height() << \" x \" << A.Width();\n    return os.str();\n}\n\n// An exception which signifies that a matrix was unexpectedly singular.\nclass SingularMatrixException : public std::runtime_error \n{\npublic:\n    SingularMatrixException( const char* msg=\"Matrix was singular\" ) \n    : std::runtime_error( msg ) { }\n};\n\n// An exception which signifies a zero pivot was chosen, though the matrix\n// may not actually be singular\nclass ZeroPivotException : public std::runtime_error\n{\npublic:\n    ZeroPivotException( const char* msg=\"Zero pivot was chosen\" )\n    : std::runtime_error( msg ) { }\n};\n\n// An exception which signifies that a matrix was unexpectedly non-HPD\nclass NonHPDMatrixException  : public std::runtime_error\n{\npublic:\n    NonHPDMatrixException( const char* msg=\"Matrix was not HPD\" )\n    : std::runtime_error( msg ) { }\n};\n\n// An exception which signifies that a matrix was unexpectedly non-HPSD\nclass NonHPSDMatrixException  : public std::runtime_error\n{\npublic:\n    NonHPSDMatrixException( const char* msg=\"Matrix was not HPSD\" )\n    : std::runtime_error( msg ) { }\n};\n\nDEBUG_ONLY(\n    void PushCallStack( std::string s );\n    void PopCallStack();\n    void DumpCallStack( std::ostream& os=std::cerr );\n\n    class CallStackEntry \n    {\n    public:\n        CallStackEntry( std::string s ) \n        { \n            if( !std::uncaught_exception() )\n                PushCallStack(s); \n        }\n        ~CallStackEntry() \n        { \n            if( !std::uncaught_exception() )\n                PopCallStack(); \n        }\n    };\n)\n\nvoid ReportException( const std::exception& e, std::ostream& os=std::cerr );\nclass ArgException;\n\nvoid ComplainIfDebug();\n\ntemplate<typename T>\nvoid EnsureConsistent( T alpha, mpi::Comm comm, std::string name=\"\" );\n\n} // namespace elem\n\n#endif // ifndef ELEM_ENVIRONMENT_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/environment/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_ENVIRONMENT_IMPL_HPP\n#define ELEM_ENVIRONMENT_IMPL_HPP\n\nnamespace elem {\n\ninline void Args::HandleVersion( std::ostream& os ) const\n{\n    std::string version = \"--version\";\n    char** arg = std::find( argv_, argv_+argc_, version );\n    const bool foundVersion = ( arg != argv_+argc_ );\n    if( foundVersion )\n    {\n        if( mpi::WorldRank() == 0 )\n            PrintVersion();\n        throw ArgException();\n    }\n}\n\ninline void Args::HandleBuild( std::ostream& os ) const\n{\n    std::string build = \"--build\";\n    char** arg = std::find( argv_, argv_+argc_, build );\n    const bool foundBuild = ( arg != argv_+argc_ );\n    if( foundBuild )\n    {\n        if( mpi::WorldRank() == 0 )\n        {\n            PrintVersion();\n            PrintConfig();\n            PrintCCompilerInfo();\n            PrintCxxCompilerInfo();\n        }\n        throw ArgException();\n    }\n}\n\ntemplate<typename T>\ninline T\nInput( std::string name, std::string desc )\n{ return GetArgs().Input<T>( name, desc ); }\n\ntemplate<typename T>\ninline T\nInput( std::string name, std::string desc, T defaultVal )\n{ return GetArgs().Input( name, desc, defaultVal ); }\n\ninline void\nProcessInput()\n{ GetArgs().Process(); }\n\ninline void\nPrintInputReport()\n{ GetArgs().PrintReport(); }\n\ninline void ReportException( const std::exception& e, std::ostream& os )\n{\n    if( std::string(e.what()) != \"\" )\n    {\n        os << \"Process \" << mpi::WorldRank() << \" caught error message:\\n\"\n           << e.what() << std::endl;\n    }\n    DEBUG_ONLY(DumpCallStack(os))\n}\n\ninline void ComplainIfDebug()\n{\n    DEBUG_ONLY(\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"==========================================\\n\"\n                      << \" In debug mode! Performance will be poor! \\n\"\n                      << \"==========================================\" \n                      << std::endl;\n        }\n    )\n}\n\ntemplate<typename T>\ninline void \nMemCopy( T* dest, const T* source, std::size_t numEntries )\n{\n    // This can be optimized/generalized later\n    std::memcpy( dest, source, numEntries*sizeof(T) );\n}\n\ntemplate<typename T>\ninline void\nMemSwap( T* a, T* b, T* temp, std::size_t numEntries )\n{\n    // temp := a\n    std::memcpy( temp, a, numEntries*sizeof(T) );\n    // a := b\n    std::memcpy( a, b, numEntries*sizeof(T) );\n    // b := temp\n    std::memcpy( b, temp, numEntries*sizeof(T) );\n}\n\ntemplate<typename T>\ninline void\nStridedMemCopy\n(       T* dest,   std::size_t destStride, \n  const T* source, std::size_t sourceStride, std::size_t numEntries )\n{\n    // For now, use the BLAS wrappers/generalization\n    blas::Copy( numEntries, source, sourceStride, dest, destStride );\n}\n\ntemplate<typename T>\ninline void \nMemZero( T* buffer, std::size_t numEntries )\n{\n    // This can be optimized/generalized later\n    std::memset( buffer, 0, numEntries*sizeof(T) );\n}\n\ntemplate<typename T>\ninline void\nSwapClear( T& x )\n{ T().swap( x ); }\n\ntemplate<typename T>\ninline void\nEnsureConsistent( T alpha, mpi::Comm comm, std::string name )\n{\n    std::string tag = ( name==\"\" ? \"\" : name+\" \" );\n    const Int commSize = mpi::Size( comm );\n    const Int commRank = mpi::Rank( comm );\n    std::vector<T> a(commSize);\n    mpi::Gather( &alpha, 1, a.data(), 1, 0, comm );\n    if( commRank == 0 ) \n    {\n        for( Int j=0; j<commSize; ++j )\n            if( a[j] != alpha )\n                std::cout << \"Process \" << j << \"'s \" << tag << \"value, \" \n                          << a[j] << \", mismatched the root's, \" << alpha \n                          << std::endl;\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_ENVIRONMENT_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/imports/README.md",
    "content": "### `include/elemental/core/imports/`\n\nThis folder contains the header files for Elemental's wrappers\nfor external libraries, such as BLAS, LAPACK, and PMRRR. Please see \n`src/core/imports` for the corresponding source files.\n\nIn addition to this file, the folder contains:\n\n-  `blas.hpp`: wrappers for Basic Linear Algebra Subprograms (BLAS)\n-  `choice.hpp`: command-line processing for sequential programs\n-  `flame.hpp`: wrappers for FLAME's QR-based bidiagonal SVD\n-  `lapack.hpp`: wrappers for Linear Algebra PACKage (LAPACK)\n-  `mpi.hpp`: wrappers for the Message Passing Interface (MPI)\n-  `mpi_choice.hpp`: command-line processing for MPI-based programs\n-  `pmrrr.hpp`: wrappers for Parallel Multiple Relatively Robust Representations\n   (PMRRR)\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/imports/blas.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IMPORTS_BLAS_HPP\n#define ELEM_IMPORTS_BLAS_HPP\n\nnamespace elem {\nnamespace blas {\n\n// NOTE: templated routines are custom and not wrappers\n\n// Level 1 BLAS \n// ============\nvoid Axpy\n( int n, float    alpha, const float   * x, int incx, float   * y, int incy );\nvoid Axpy\n( int n, double   alpha, const double  * x, int incx, double  * y, int incy );\nvoid Axpy\n( int n, scomplex alpha, const scomplex* x, int incx, scomplex* y, int incy );\nvoid Axpy\n( int n, dcomplex alpha, const dcomplex* x, int incx, dcomplex* y, int incy );\ntemplate<typename T>\nvoid Axpy( int n, T alpha, const T* x, int incx, T* y, int incy );\n\nvoid Copy( int n, const float   * x, int incx, float   * y, int incy );\nvoid Copy( int n, const double  * x, int incx, double  * y, int incy );\nvoid Copy( int n, const scomplex* x, int incx, scomplex* y, int incy );\nvoid Copy( int n, const dcomplex* x, int incx, dcomplex* y, int incy );\ntemplate<typename T>\nvoid Copy( int n, const T* x, int incx, T* y, int incy );\n\nfloat    Dot( int n, const float   * x, int incx, const float   * y, int incy );\ndouble   Dot( int n, const double  * x, int incx, const double  * y, int incy );\nscomplex Dot( int n, const scomplex* x, int incx, const scomplex* y, int incy );\ndcomplex Dot( int n, const dcomplex* x, int incx, const dcomplex* y, int incy );\ntemplate<typename T>\nT Dot( int n, const T* x, int incx, const T* y, int incy );\n\nfloat    Dotc\n( int n, const float   * x, int incx, const float   * y, int incy );\ndouble   Dotc\n( int n, const double  * x, int incx, const double  * y, int incy );\nscomplex Dotc\n( int n, const scomplex* x, int incx, const scomplex* y, int incy );\ndcomplex Dotc\n( int n, const dcomplex* x, int incx, const dcomplex* y, int incy );\ntemplate<typename T>\nT Dotc( int n, const T* x, int incx, const T* y, int incy );\n\nfloat    Dotu\n( int n, const float   * x, int incx, const float   * y, int incy );\ndouble   Dotu\n( int n, const double  * x, int incx, const double  * y, int incy );\nscomplex Dotu\n( int n, const scomplex* x, int incx, const scomplex* y, int incy );\ndcomplex Dotu\n( int n, const dcomplex* x, int incx, const dcomplex* y, int incy );\ntemplate<typename T>\nT Dotu( int n, const T* x, int incx, const T* y, int incy );\n\nfloat  Nrm2( int n, const float   * x, int incx );\ndouble Nrm2( int n, const double  * x, int incx );\nfloat  Nrm2( int n, const scomplex* x, int incx );\ndouble Nrm2( int n, const dcomplex* x, int incx );\ntemplate<typename F> F Nrm2( int n, const F* x, int incx );\n\nfloat Givens\n( float alpha, float beta, float* c, float* s );\ndouble Givens\n( double alpha, double beta, double* c, double* s );\nscomplex Givens\n( scomplex alpha, scomplex beta, float* c, scomplex* s );\ndcomplex Givens\n( dcomplex alpha, dcomplex beta, double* c, dcomplex* s );\n\nvoid Rot\n( int n, float   * x, int incx, float   * y, int incy, float  c, float    s );\nvoid Rot\n( int n, double  * x, int incx, double  * y, int incy, double c, double   s );\nvoid Rot\n( int n, scomplex* x, int incx, scomplex* y, int incy, float  c, scomplex s );\nvoid Rot\n( int n, dcomplex* x, int incx, dcomplex* y, int incy, double c, dcomplex s );\n\nvoid Scal( int n, float    alpha, float   * x, int incx );\nvoid Scal( int n, double   alpha, double  * x, int incx );\nvoid Scal( int n, scomplex alpha, scomplex* x, int incx );\nvoid Scal( int n, dcomplex alpha, dcomplex* x, int incx );\ntemplate<typename T> void Scal( int n, T alpha, T* x, int incx );\n\nvoid Swap( int n, float   * x, int incx, float   * y, int incy );\nvoid Swap( int n, double  * x, int incx, double  * y, int incy );\nvoid Swap( int n, scomplex* x, int incx, scomplex* y, int incy );\nvoid Swap( int n, dcomplex* x, int incx, dcomplex* y, int incy );\ntemplate<typename T> void Swap( int n, T* x, int incx, T* y, int incy );\n            \n// Level 2 BLAS\n// ============\nvoid Gemv\n( char trans, int m, int n,\n  float alpha, const float* A, int lda, const float* x, int incx,\n  float beta,        float* y, int incy );\nvoid Gemv\n( char trans, int m, int n,\n  double alpha, const double* A, int lda, const double* x, int incx,\n  double beta,        double* y, int incy );\nvoid Gemv\n( char trans, int m, int n,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* x, int incx,\n  scomplex beta,        scomplex* y, int incy );\nvoid Gemv\n( char trans, int m, int n,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* x, int incx,\n  dcomplex beta,        dcomplex* y, int incy );\ntemplate<typename T>\nvoid Gemv\n( char trans, int m, int n,\n  T alpha, const T* A, int lda, const T* x, int incx,\n  T beta,        T* y, int incy );\n\nvoid Ger\n( int m, int n,\n  float alpha, const float* x, int incx, const float* y, int incy,\n                     float* A, int lda );\nvoid Ger\n( int m, int n,\n  double alpha, const double* x, int incx, const double* y, int incy,\n                      double* A, int lda );\nvoid Ger\n( int m, int n,\n  scomplex alpha, const scomplex* x, int incx, const scomplex* y, int incy,\n                        scomplex* A, int lda );\nvoid Ger\n( int m, int n,\n  dcomplex alpha, const dcomplex* x, int incx, const dcomplex* y, int incy,\n                        dcomplex* A, int lda );\ntemplate<typename T>\nvoid Ger\n( char trans, int m, int n,\n  T alpha, const T* x, int incx, const T* y, int incy,\n                 T* A, int lda );\n\nvoid Gerc\n( int m, int n,\n  float alpha, const float* x, int incx, const float* y, int incy,\n                     float* A, int lda );\nvoid Gerc\n( int m, int n,\n  double alpha, const double* x, int incx, const double* y, int incy,\n                      double* A, int lda );\nvoid Gerc\n( int m, int n,\n  scomplex alpha, const scomplex* x, int incx, const scomplex* y, int incy,\n                        scomplex* A, int lda );\nvoid Gerc\n( int m, int n,\n  dcomplex alpha, const dcomplex* x, int incx, const dcomplex* y, int incy,\n                        dcomplex* A, int lda );\ntemplate<typename T>\nvoid Gerc\n( char trans, int m, int n,\n  T alpha, const T* x, int incx, const T* y, int incy,\n                 T* A, int lda );\n\nvoid Geru\n( int m, int n,\n  float alpha, const float* x, int incx, const float* y, int incy,\n                     float* A, int lda );\nvoid Geru\n( int m, int n,\n  double alpha, const double* x, int incx, const double* y, int incy,\n                      double* A, int lda );\nvoid Geru\n( int m, int n,\n  scomplex alpha, const scomplex* x, int incx, const scomplex* y, int incy,\n                        scomplex* A, int lda );\nvoid Geru\n( int m, int n,\n  dcomplex alpha, const dcomplex* x, int incx, const dcomplex* y, int incy,\n                        dcomplex* A, int lda );\ntemplate<typename T>\nvoid Geru\n( char trans, int m, int n,\n  T alpha, const T* x, int incx, const T* y, int incy,\n                 T* A, int lda );\n\nvoid Hemv\n( char uplo, int m,\n  float alpha, const float* A, int lda, const float* x, int incx,\n  float beta,        float* y, int incy );\nvoid Hemv\n( char uplo, int m,\n  double alpha, const double* A, int lda, const double* x, int incx,\n  double beta,        double* y, int incy );\nvoid Hemv\n( char uplo, int m,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* x, int incx,\n  scomplex beta,        scomplex* y, int incy );\nvoid Hemv\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* x, int incx,\n  dcomplex beta,        dcomplex* y, int incy );\ntemplate<typename T>\nvoid Hemv\n( char uplo, int m,\n  T alpha, const T* A, int lda, const T* x, int incx,\n  T beta,        T* y, int incy );\n\nvoid Her\n( char uplo, int m,\n  float alpha, const float* x, int incx, float* A, int lda );\nvoid Her\n( char uplo, int m,\n  double alpha, const double* x, int incx, double* A, int lda );\nvoid Her\n( char uplo, int m,\n  scomplex alpha, const scomplex* x, int incx, scomplex* A, int lda );\nvoid Her\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* x, int incx, dcomplex* A, int lda );\ntemplate<typename T>\nvoid Hemv( char uplo, int m, T alpha, const T* x, int incx, T* A, int lda );\n\nvoid Her2\n( char uplo, int m,\n  float alpha, const float* x, int incx, const float* y, int incy,\n                     float* A, int lda );\nvoid Her2\n( char uplo, int m,\n  double alpha, const double* x, int incx, const double* y, int incy,\n                      double* A, int lda );\nvoid Her2\n( char uplo, int m,\n  scomplex alpha, const scomplex* x, int incx, const scomplex* y, int incy,\n                        scomplex* A, int lda );\nvoid Her2\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* x, int incx, const dcomplex* y, int incy,\n                        dcomplex* A, int lda );\ntemplate<typename T>\nvoid Her2\n( char uplo, int m,\n  T alpha, const T* x, int incx, const T* y, int incy, \n                 T* A, int lda );\n\nvoid Symv\n( char uplo, int m,\n  float alpha, const float* A, int lda, const float* x, int incx,\n  float beta,        float* y, int incy );\nvoid Symv\n( char uplo, int m, \n  double alpha, const double* A, int lda, const double* x, int incx,\n  double beta,        double* y, int incy );\nvoid Symv\n( char uplo, int m,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* x, int incx,\n  scomplex beta,        scomplex* y, int incy );\nvoid Symv\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* x, int incx,\n  dcomplex beta,        dcomplex* y, int incy );\ntemplate<typename T>\nvoid Symv\n( char uplo, int m,\n  T alpha, const T* A, int lda, const T* x, int incx,\n  T beta,        T* y, int incy );\n\nvoid Syr\n( char uplo, int m,\n  float alpha, const float* x, int incx, float* A, int lda );\nvoid Syr\n( char uplo, int m,\n  double alpha, const double* x, int incx, double* A, int lda );\nvoid Syr\n( char uplo, int m,\n  scomplex alpha, const scomplex* x, int incx, scomplex* A, int lda ); \nvoid Syr\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* x, int incx, dcomplex* A, int lda );\ntemplate<typename T>\nvoid Syr( char uplo, int m, T alpha, const T* x, int incx, T* A, int lda );\n\nvoid Syr2\n( char uplo, int m,\n  float alpha, const float* x, int incx, const float* y, int incy,\n                     float* A, int lda );\nvoid Syr2\n( char uplo, int m,\n  double alpha, const double* x, int incx, const double* y, int incy,\n                      double* A, int lda );\nvoid Syr2\n( char uplo, int m,\n  scomplex alpha, const scomplex* x, int incx, const scomplex* y, int incy,\n                        scomplex* A, int lda );\nvoid Syr2\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* x, int incx, const dcomplex* y, int incy,\n                        dcomplex* A, int lda );\ntemplate<typename T>\nvoid Syr2\n( char uplo, int m,\n  T alpha, const T* x, int incx, const T* y, int incy,\n                 T* A, int lda );\n\nvoid Trmv\n( char uplo, char trans, char diag, int m,\n  const float* A, int lda, float* x, int incx );\nvoid Trmv\n( char uplo, char trans, char diag, int m,\n  const double* A, int lda, double* x, int incx );\nvoid Trmv\n( char uplo, char trans, char diag, int m,\n  const scomplex* A, int lda, scomplex* x, int incx );\nvoid Trmv\n( char uplo, char trans, char diag, int m,\n  const dcomplex* A, int lda, dcomplex* x, int incx );\ntemplate<typename T>\nvoid Trmv\n( char uplo, char trans, char diag, int m,\n  const T* A, int lda, T* x, int incx );\n\nvoid Trsv\n( char uplo, char trans, char diag, int m,\n  const float* A, int lda, float* x, int incx );\nvoid Trsv\n( char uplo, char trans, char diag, int m,\n  const double* A, int lda, double* x, int incx );\nvoid Trsv\n( char uplo, char trans, char diag, int m,\n  const scomplex* A, int lda, scomplex* x, int incx );\nvoid Trsv\n( char uplo, char trans, char diag, int m,\n  const dcomplex* A, int lda, dcomplex* x, int incx );\ntemplate<typename T>\nvoid Trsv\n( char uplo, char trans, char diag, int m,\n  const T* A, int lda, T* x, int incx );\n\n// Level 3 BLAS\n// ============\nvoid Gemm\n( char transA, char transB, int m, int n, int k,\n  float alpha, const float* A, int lda, const float* B, int ldb,\n  float beta,        float* C, int ldc );\nvoid Gemm\n( char transA, char transB, int m, int n, int k,\n  double alpha, const double* A, int lda, const double* B, int ldb,\n  double beta,        double* C, int ldc );\nvoid Gemm\n( char transA, char transB, int m, int n, int k,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* B, int ldb,\n  scomplex beta,        scomplex* C, int ldc );\nvoid Gemm\n( char transA, char transB, int m, int n, int k,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* B, int ldb,\n  dcomplex beta,        dcomplex* C, int ldc );\ntemplate<typename T>\nvoid Gemm\n( char transA, char transB, int m, int n, int k,\n  T alpha, const T* A, int lda, const T* B, int ldb,\n  T beta,        T* C, int ldc );\n\nvoid Hemm\n( char side, char uplo, int m, int n,\n  float alpha, const float* A, int lda, const float* B, int ldb,\n  float beta,        float* C, int ldc );\nvoid Hemm\n( char side, char uplo, int m, int n,\n  double alpha, const double* A, int lda, const double* B, int ldb,\n  double beta,        double* C, int ldc );\nvoid Hemm\n( char side, char uplo, int m, int n,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* B, int ldb,\n  scomplex beta,        scomplex* C, int ldc );\nvoid Hemm\n( char side, char uplo, int m, int n,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* B, int ldb,\n  dcomplex beta,        dcomplex* C, int ldc );\ntemplate<typename T>\nvoid Hemm\n( char side, char uplo, int m, int n,\n  T alpha, const T* A, int lda, const T* B, int ldb,\n  T beta,        T* C, int ldc );\n\nvoid Her2k\n( char uplo, char trans, int n, int k,\n  float alpha, const float* A, int lda, const float* B, int ldb,\n  float beta,        float* C, int ldc );\nvoid Her2k\n( char uplo, char trans, int n, int k,\n  double alpha, const double* A, int lda, const double* B, int ldb,\n  double beta,        double* C, int ldc );\nvoid Her2k\n( char uplo, char trans, int n, int k,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* B, int ldb,\n  scomplex beta,        scomplex* C, int ldc );\nvoid Her2k\n( char uplo, char trans, int n, int k,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* B, int ldb,\n  dcomplex beta,        dcomplex* C, int ldc );\ntemplate<typename T>\nvoid Her2k\n( char uplo, char trans, int n, int k,\n  T alpha, const T* A, int lda, const T* B, int ldb,\n  T beta,        T* C, int ldc );\n\nvoid Herk\n( char uplo, char trans, int n, int k,\n  float alpha, const float* A, int lda, float beta, float* C, int ldc );\nvoid Herk\n( char uplo, char trans, int n, int k,\n  double alpha, const double* A, int lda, double beta, double* C, int ldc );\nvoid Herk\n( char uplo, char trans, int n, int k,\n  scomplex alpha, const scomplex* A, int lda,\n  scomplex beta,        scomplex* C, int ldc );\nvoid Herk\n( char uplo, char trans, int n, int k,\n  dcomplex alpha, const dcomplex* A, int lda,\n  dcomplex beta,        dcomplex* C, int ldc );\ntemplate<typename T>\nvoid Herk\n( char uplo, char trans, int n, int k,\n  T alpha, const T* A, int lda,\n  T beta,        T* C, int ldc );\n\nvoid Symm\n( char side, char uplo, int m, int n,\n  float alpha, const float* A, int lda, const float* B, int ldb,\n  float beta,        float* C, int ldc );\nvoid Symm\n( char side, char uplo, int m, int n,\n  double alpha, const double* A, int lda, const double* B, int ldb,\n  double beta,        double* C, int ldc );\nvoid Symm\n( char side, char uplo, int m, int n,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* B, int ldb,\n  scomplex beta,        scomplex* C, int ldc );\nvoid Symm\n( char side, char uplo, int m, int n,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* B, int ldb,\n  dcomplex beta,        dcomplex* C, int ldc );\ntemplate<typename T>\nvoid Symm\n( char side, char uplo, int m, int n,\n  T alpha, const T* A, int lda, const T* B, int ldb,\n  T beta,        T* C, int ldc );\n\nvoid Syr2k\n( char uplo, char trans, int n, int k,\n  float alpha, const float* A, int lda, const float* B, int ldb,\n  float beta,        float* C, int ldc );\nvoid Syr2k\n( char uplo, char trans, int n, int k,\n  double alpha, const double* A, int lda, const double* B, int ldb,\n  double beta,        double* C, int ldc );\nvoid Syr2k\n( char uplo, char trans, int n, int k,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* B, int ldb,\n  scomplex beta,        scomplex* C, int ldc );\nvoid Syr2k\n( char uplo, char trans, int n, int k,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* B, int ldb,\n  dcomplex beta,        dcomplex* C, int ldc );\ntemplate<typename T>\nvoid Syr2k\n( char uplo, char trans, int n, int k,\n  T alpha, const T* A, int lda, const T* B, int ldb,\n  T beta,        T* C, int ldc );\n\nvoid Syrk\n( char uplo, char trans, int n, int k,\n  float alpha, const float* A, int lda,\n  float beta,        float* C, int ldc );\nvoid Syrk\n( char uplo, char trans, int n, int k,\n  double alpha, const double* A, int lda,\n  double beta,        double* C, int ldc );\nvoid Syrk\n( char uplo, char trans, int n, int k,\n  scomplex alpha, const scomplex* A, int lda,\n  scomplex beta,        scomplex* C, int ldc );\nvoid Syrk\n( char uplo, char trans, int n, int k,\n  dcomplex alpha, const dcomplex* A, int lda,\n  dcomplex beta,        dcomplex* C, int ldc );\ntemplate<typename T>\nvoid Syrk\n( char uplo, char trans, int n, int k,\n  T alpha, const T* A, int lda,\n  T beta,        T* C, int ldc );\n\nvoid Trmm\n( char side,  char uplo, char trans, char unit, int m, int n,\n  float alpha, const float* A, int lda, float* B, int ldb );\nvoid Trmm\n( char side,  char uplo, char trans, char unit, int m, int n,\n  double alpha, const double* A, int lda, double* B, int ldb );\nvoid Trmm\n( char side,  char uplo, char trans, char unit, int m, int n,\n  scomplex alpha, const scomplex* A, int lda, scomplex* B, int ldb );\nvoid Trmm\n( char side,  char uplo, char trans, char unit, int m, int n,\n  dcomplex alpha, const dcomplex* A, int lda, dcomplex* B, int ldb );\ntemplate<typename T>\nvoid Trmm\n( char side, char uplo, char trans, char unit, int m, int n,\n  T alpha, const T* A, int lda, T* B, int ldb );\n\nvoid Trsm\n( char side,  char uplo, char trans, char unit, int m, int n,\n  float alpha, const float* A, int lda, float* B, int ldb );\nvoid Trsm\n( char side,  char uplo, char trans, char unit, int m, int n,\n  double alpha, const double* A, int lda, double* B, int ldb );\nvoid Trsm\n( char side,  char uplo, char trans, char unit, int m, int n,\n  scomplex alpha, const scomplex* A, int lda, scomplex* B, int ldb );\nvoid Trsm\n( char side,  char uplo, char trans, char unit, int m, int n,\n  dcomplex alpha, const dcomplex* A, int lda, dcomplex* B, int ldb );\ntemplate<typename T>\nvoid Trsm\n( char side, char uplo, char trans, char unit, int m, int n,\n  T alpha, const T* A, int lda, T* B, int ldb );\n\n} // namespace blas\n} // namespace elem\n\nnamespace elem {\nnamespace blas {\n\n// Templated wrappers\n// ==================\n\n// Level 1 BLAS\n// ------------\n\ntemplate<typename T>\ninline void Axpy\n( int n, T alpha, const T* x, int incx, T* y, int incy )\n{\n    for( int i=0; i<n; ++i )\n        y[i*incy] += alpha*x[i*incx];\n}\n\ntemplate<typename T>\ninline void Copy\n( int n, const T* x, int incx, T* y, int incy )\n{\n    for( int i=0; i<n; ++i )\n        y[i*incy] = x[i*incx];\n}\n\ntemplate<typename T>\ninline T Dot( int n, const T* x, int incx, const T* y, int incy )\n{ Dotc( n, x, incx, y, incy ); }\n\ntemplate<typename T>\ninline T Dotc( int n, const T* x, int incx, const T* y, int incy )\n{\n    T alpha = 0;\n    for( int i=0; i<n; ++i )\n        alpha += Conj(x[i*incx])*y[i*incy];\n    return alpha;\n}\n\ntemplate<typename T>\ninline T Dotu( int n, const T* x, int incx, const T* y, int incy )\n{\n    T alpha = 0;\n    for( int i=0; i<n; ++i )\n        alpha += x[i*incx]*y[i*incy];\n    return alpha;\n}\n\n// TODO: templated Nrm2\n\ntemplate<typename T>\ninline void Scal( int n, T alpha, T* x, int incx )\n{\n    for( int i=0; i<n; ++i )\n        x[i*incx] *= alpha;\n}\n\ntemplate<typename T>\ninline void Swap( int n, T* x, int incx, T* y, int incy )\n{\n    for( int i=0; i<n; ++i )\n    {\n        const T temp = x[i*incx];\n        x[i*incx] = y[i*incy];\n        y[i*incy] = temp;\n    }\n}\n\n\n// Level 2 BLAS\n// ------------\n\ntemplate<typename T>\ninline void Gemv\n( char trans, int m, int n,\n  T alpha, const T* A, int lda, const T* x, int incx,\n  T beta,        T* y, int incy )\n{\n    if( trans == 'N' )\n    {\n        if( m > 0 && n == 0 && beta == 0 )\n        {\n            for( int i=0; i<m; ++i )\n                y[i*incy] = 0;   \n            return;\n        }\n        Scal( m, beta, y, incy );\n        for( int i=0; i<m; ++i ) \n            for( int j=0; j<n; ++j )\n                y[i*incy] += alpha*A[i+j*lda]*x[j*incx];\n    }\n    else if( trans == 'T' ) \n    {\n        if( n > 0 && m == 0 && beta == 0 )\n        {\n            for( int i=0; i<n; ++i )\n                y[i*incy] = 0;   \n            return;\n        }\n        Scal( n, beta, y, incy );\n        for( int i=0; i<n; ++i ) \n            for( int j=0; j<m; ++j )\n                y[i*incy] += alpha*A[j+i*lda]*x[j*incx];\n    }\n    else\n    {\n        if( n > 0 && m == 0 && beta == 0 )\n        {\n            for( int i=0; i<n; ++i )\n                y[i*incy] = 0;   \n            return;\n        }\n        Scal( n, beta, y, incy );\n        for( int i=0; i<n; ++i ) \n            for( int j=0; j<m; ++j )\n                y[i*incy] += alpha*Conj(A[j+i*lda])*x[j*incx];\n    }\n}\n\n// TODO: templated Ger\n// TODO: templated Gerc\n// TODO: templated Geru\n// TODO: templated Hemv\n// TODO: templated Her\n// TODO: templated Her2\n// TODO: templated Symv\n// TODO: templated Syr\n// TODO: templated Syr2\n// TODO: templated Trmv\n// TODO: templated Trsv\n\n// Level 3 BLAS\n// ------------\n\ntemplate<typename T>\ninline void Gemm\n( char transA, char transB, int m, int n, int k,\n  T alpha, const T* A, int lda, const T* B, int ldb,\n  T beta,        T* C, int ldc )\n{\n    if( m > 0 && n > 0 && k == 0 && beta == 0 )\n    {\n        for( int j=0; j<n; ++j )\n            for( int i=0; i<m; ++i )\n                C[i+j*ldc] = 0;\n        return;\n    }\n\n    // Scale C\n    for( int j=0; j<n; ++j )\n        for( int i=0; i<m; ++i )\n            C[i+j*ldc] *= beta;\n\n    // Naive implementation\n    if( transA == 'N' && transB == 'N' )\n    {\n        // C := alpha A B + C\n        for( int j=0; j<n; ++j )\n            for( int i=0; i<m; ++i )\n                for( int l=0; l<k; ++l )\n                    C[i+j*ldc] += alpha*A[i+l*lda]*B[l+j*ldb];\n    }\n    else if( transA == 'N' )\n    {\n        if( transB == 'T' )\n        {\n            // C := alpha A B^T + C\n            for( int j=0; j<n; ++j )\n                for( int i=0; i<m; ++i )\n                    for( int l=0; l<k; ++l )\n                        C[i+j*ldc] += alpha*A[i+l*lda]*B[j+l*ldb];\n        }\n        else\n        {\n            // C := alpha A B^H + C\n            for( int j=0; j<n; ++j )\n                for( int i=0; i<m; ++i )\n                    for( int l=0; l<k; ++l )\n                        C[i+j*ldc] += alpha*A[i+l*lda]*Conj(B[j+l*ldb]);\n        }\n    }\n    else if( transB == 'N' )\n    {\n        if( transA == 'T' )\n        {\n            // C := alpha A^T B + C\n            for( int j=0; j<n; ++j )\n                for( int i=0; i<m; ++i )\n                    for( int l=0; l<k; ++l )\n                        C[i+j*ldc] += alpha*A[l+i*lda]*B[l+j*ldb];\n        }\n        else\n        {\n            // C := alpha A^H B + C\n            for( int j=0; j<n; ++j )\n                for( int i=0; i<m; ++i )\n                    for( int l=0; l<k; ++l )\n                        C[i+j*ldc] += alpha*Conj(A[l+i*lda])*B[l+j*ldb];\n        }\n    }\n    else\n    {\n        if( transA == 'T' && transB == 'T' )\n        {\n            // C := alpha A^T B^T + C\n            for( int j=0; j<n; ++j )\n                for( int i=0; i<m; ++i )\n                    for( int l=0; l<k; ++l )\n                        C[i+j*ldc] += alpha*A[l+i*lda]*B[j+l*ldb];\n        }\n        else if( transA == 'T' )\n        {\n            // C := alpha A^T B^H + C\n            for( int j=0; j<n; ++j )\n                for( int i=0; i<m; ++i )\n                    for( int l=0; l<k; ++l )\n                        C[i+j*ldc] += alpha*A[l+i*lda]*Conj(B[j+l*ldb]);\n        }\n        else if( transB == 'T' )\n        {\n            // C := alpha A^H B^T + C\n            for( int j=0; j<n; ++j )\n                for( int i=0; i<m; ++i )\n                    for( int l=0; l<k; ++l )\n                        C[i+j*ldc] += alpha*Conj(A[l+i*lda])*B[j+l*ldb];\n        }\n        else\n        {\n            // C := alpha A^H B^H + C\n            for( int j=0; j<n; ++j )\n                for( int i=0; i<m; ++i )\n                    for( int l=0; l<k; ++l )\n                        C[i+j*ldc] += alpha*Conj(A[l+i*lda])*Conj(B[j+l*ldb]);\n        }\n    }\n}\n\n// TODO: templated Hemm\n// TODO: templated Her2k\n// TODO: templated Herk\n// TODO: templated Symm\n// TODO: templated Syr2k\n// TODO: templated Syrk\n// TODO: templated Trmm\n// TODO: templated Trsm\n\n} // namespace blas\n} // namespace elem\n\n#endif // ifndef ELEM_IMPORTS_BLAS_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/imports/choice.hpp",
    "content": "/*\n   Copyright (c) 2012-2013, Jack Poulson\n   All rights reserved.\n\n   This file is a modification of Choice, a simple command-line option library.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IMPORTS_CHOICE_HPP\n#define ELEM_IMPORTS_CHOICE_HPP\n\n#include <typeinfo>\n\nnamespace elem {\n\nclass ArgException : public std::logic_error\n{\npublic:\n    ArgException( const char* msg=\"\" ) : std::logic_error( msg ) { }\n};\n\nnamespace choice {\n\ntemplate<typename TOut,typename TIn>\ninline TOut Cast( const TIn& input )\n{\n    std::stringstream stream;\n    TOut output;\n\n    stream << input;\n    stream >> output;\n\n    return output;\n}\n\ntemplate<>\ninline bool Cast( const std::string& input )\n{\n    std::string trueString(\"true\");\n    std::string falseString(\"false\");\n    if( input.compare(trueString) == 0 )\n        return true;\n    else if( input.compare(falseString) == 0 )\n        return false;\n    else\n    {\n        bool output;\n        std::stringstream stream;\n        stream << input;\n        stream >> output;\n        return output;\n    }\n}\n\nclass Args\n{\npublic:\n    Args( int argc, char** argv, std::ostream& error=std::cerr );\n    virtual ~Args() { }\n\n    template<typename T>\n    T Input( std::string name, std::string desc );\n    template<typename T>\n    T Input( std::string name, std::string desc, T defaultVal );\n\n    void Process( std::ostream& os=std::cout ) const;\n    void PrintReport( std::ostream& os=std::cout ) const;\n\nprotected:\n    int argc_;\n    char** argv_;\n    std::vector<bool> usedArgs_;\n    std::ostream& error_;\n\n    virtual void HandleVersion( std::ostream& os=std::cout ) const { }\n    virtual void HandleBuild( std::ostream& os=std::cout ) const { }\n\n    struct RequiredArg\n    { \n        std::string name, desc, typeInfo, usedVal; \n        bool found;\n\n        RequiredArg\n        ( std::string n, std::string d, std::string t, std::string uv, bool f ) \n        : name(n), desc(d), typeInfo(t), usedVal(uv), found(f) { };\n    };\n\n    struct OptionalArg\n    { \n        std::string name, desc, typeInfo, defaultVal, usedVal; \n        bool found;\n\n        OptionalArg\n        ( std::string n, std::string d, std::string t, \n          std::string dv, std::string uv, bool f )\n        : name(n), desc(d), typeInfo(t), \n          defaultVal(dv), usedVal(uv), found(f) { } \n    };\n\n    std::vector<RequiredArg> requiredArgs_;\n    std::vector<OptionalArg> optionalArgs_;\n};\n\ninline\nArgs::Args( int argc, char** argv, std::ostream& error )\n: argc_(argc), argv_(argv), usedArgs_(argc,false), error_(error)\n{ }\n\ntemplate<typename T>\ninline T\nArgs::Input( std::string name, std::string desc )\n{\n    char** arg = std::find( argv_, argv_+argc_, name );\n    const bool found = ( arg != argv_+argc_ );\n    const bool invalidFound = ( arg == argv_+argc_-1 );\n    if( invalidFound )\n    {\n        error_ << \"Missing value for last command-line argument\" << std::endl;\n        throw ArgException();\n    }\n\n    std::string typeInfo( typeid(T).name() );\n    std::string usedVal = ( found ? arg[1] : \"N/A\" );\n    requiredArgs_.push_back( RequiredArg(name,desc,typeInfo,usedVal,found) );\n\n    // Before returning, store the used indices and check for duplication\n    if( found )\n    {\n        const int offset = arg - argv_;\n        if( usedArgs_[offset] || usedArgs_[offset+1] )\n        {\n            error_ << \"WARNING: conflict with \" << name << \" detected at \";\n            if( usedArgs_[offset] && usedArgs_[offset+1] )\n                error_ << \"arguments \" << offset << \" and \" << offset+1\n                       << std::endl;\n            else if( usedArgs_[offset] )\n                error_ << \"argument \" << offset << std::endl;\n            else\n                error_ << \"argument \" << offset+1 << std::endl;\n            error_ << \"Please ensure that you did request argument \"\n                   << name << \" multiple times\" << std::endl;\n        }\n        usedArgs_[offset+0] = true;\n        usedArgs_[offset+1] = true;\n\n        arg = std::find( arg+1, argv_+argc_, name );\n        if( arg != argv_+argc_ )\n            error_ << \"WARNING: \" << name << \" was specified twice and only \"\n                   << \"the first instance is used\" << std::endl;\n    }\n\n    return Cast<T>( usedVal );\n}\n\ntemplate<typename T>\ninline T\nArgs::Input( std::string name, std::string desc, T defaultVal )\n{\n    char** arg = std::find( argv_, argv_+argc_, name );\n    const bool found = ( arg != argv_+argc_ );\n    const bool invalidFound = ( arg == argv_+argc_-1 );\n    if( invalidFound )\n    {\n        error_ << \"Missing value for last command-line argument\" << std::endl;\n        throw ArgException();\n    }\n\n    std::string typeInfo( typeid(T).name() );\n\n    std::string defValString = Cast<std::string>( defaultVal );\n    std::string usedVal = ( found ? arg[1] : defValString );\n\n    optionalArgs_.push_back\n    ( OptionalArg(name,desc,typeInfo,defValString,usedVal,found) );\n\n    // Before returning, store the used indices and check for duplication\n    if( found )\n    {\n        const int offset = arg - argv_;\n        if( usedArgs_[offset] || usedArgs_[offset+1] )\n        {\n            error_ << \"WARNING: conflict with \" << name << \" detected at \";\n            if( usedArgs_[offset] && usedArgs_[offset+1] )\n                error_ << \"arguments \" << offset << \" and \" << offset+1\n                       << std::endl;\n            else if( usedArgs_[offset] )\n                error_ << \"argument \" << offset << std::endl;\n            else\n                error_ << \"argument \" << offset+1 << std::endl;\n            error_ << \"Please ensure that you did request argument \"\n                   << name << \" multiple times\" << std::endl;\n        }\n        usedArgs_[offset+0] = true;\n        usedArgs_[offset+1] = true;\n\n        arg = std::find( arg+1, argv_+argc_, name );\n        if( arg != argv_+argc_ )\n            error_ << \"WARNING: \" << name << \" was specified twice and only \"\n                   << \"the first instance is used\" << std::endl;\n    }\n\n    if( found )\n        return Cast<T>( usedVal );\n    else\n        return defaultVal; // avoid the double-cast\n}\n\ninline void\nArgs::Process( std::ostream& os ) const\n{\n    HandleVersion( os );\n    HandleBuild( os );\n\n    std::string help = \"--help\";\n    char** arg = std::find( argv_, argv_+argc_, help );\n    const bool foundHelp = ( arg != argv_+argc_ );\n\n    int numFailed = 0;\n    const int numRequired = requiredArgs_.size();\n    for( int i=0; i<numRequired; ++i )\n        if( !requiredArgs_[i].found )\n            ++numFailed;\n    if( numFailed > 0 || foundHelp )\n    {\n        PrintReport( os );\n        throw ArgException();\n    }\n}\n\ninline void\nArgs::PrintReport( std::ostream& os ) const\n{\n    const int numRequired = requiredArgs_.size();\n    const int numOptional = optionalArgs_.size();\n\n    if( numRequired > 0 )\n        os << \"Required arguments:\\n\";\n    int numReqFailed = 0;\n    for( int i=0; i<numRequired; ++i )\n    {\n        const RequiredArg& reqArg = requiredArgs_[i];\n        if( !reqArg.found )\n            ++numReqFailed;\n        std::string foundString = ( reqArg.found ? \"found\" : \"NOT found\" );\n        os << \"  \" << reqArg.name\n           << \" [\" << reqArg.typeInfo << \",\" << reqArg.usedVal << \",\"\n           << foundString << \"]\\n\"\n           << \"    \" << reqArg.desc << \"\\n\\n\";\n    }\n\n    if( numOptional > 0 )\n        os << \"Optional arguments:\\n\";\n    int numOptFailed = 0;\n    for( int i=0; i<numOptional; ++i )\n    {\n        const OptionalArg& optArg = optionalArgs_[i];\n        if( !optArg.found )\n            ++numOptFailed;\n        std::string foundString = ( optArg.found ? \"found\" : \"NOT found\" );\n        os << \"  \" << optArg.name\n           << \" [\" << optArg.typeInfo\n           << \",\" << optArg.defaultVal << \",\" << optArg.usedVal << \",\"\n           << foundString << \"]\\n\"\n           << \"    \" << optArg.desc << \"\\n\\n\";\n    }\n\n    os << \"Out of \" << numRequired << \" required arguments, \" \n       << numReqFailed << \" were not specified.\" << std::endl;\n\n    os << \"Out of \" << numOptional << \" optional arguments, \"\n       << numOptFailed << \" were not specified.\\n\" << std::endl;\n}\n\n} // namespace choice\n} // namespace elem\n\n#endif // ifndef ELEM_IMPORTS_CHOICE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/imports/flame.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IMPORTS_FLAME_HPP\n#define ELEM_IMPORTS_FLAME_HPP\n\n#ifdef ELEM_HAVE_FLA_BSVD\nnamespace elem {\n\nvoid FlaBidiagSVD\n( int k, int mU, int mV, double* d, double* e, \n  double* U, int ldu, double* V, int ldv, \n  int numAccum=32, int maxNumIts=30, int bAlg=512 );\n\nvoid FlaBidiagSVD\n( int k, int mU, int mV, double* d, double* e, \n  Complex<double>* U, int ldu, Complex<double>* V, int ldv, \n  int numAccum=32, int maxNumIts=30, int bAlg=512 );\n\n} // namespace elem\n#endif // ifdef ELEM_HAVE_FLA_BSVD\n\n#endif // ifndef ELEM_IMPORTS_FLAME_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/imports/lapack.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IMPORTS_LAPACK_HPP\n#define ELEM_IMPORTS_LAPACK_HPP\n\nnamespace elem {\nnamespace lapack {\n\n// Machine constants\n// =================\n\n// Relative machine precision\ntemplate<typename R> R MachineEpsilon();\ntemplate<> float MachineEpsilon<float>();\ntemplate<> double MachineEpsilon<double>();\n\n// Minimum number which can be inverted without overflow\ntemplate<typename R> R MachineSafeMin();\ntemplate<> float MachineSafeMin<float>();\ntemplate<> double MachineSafeMin<double>();\n\n// Base of the machine, where the number is represented as \n//   (mantissa) x (base)^(exponent)\ntemplate<typename R> R MachineBase();\ntemplate<> float MachineBase<float>();\ntemplate<> double MachineBase<double>();\n\n// Return the relative machine precision multiplied by the base\ntemplate<typename R> R MachinePrecision();\ntemplate<> float MachinePrecision<float>();\ntemplate<> double MachinePrecision<double>();\n\n// Return the minimum exponent before (gradual) underflow occurs\ntemplate<typename R> R MachineUnderflowExponent();\ntemplate<> float MachineUnderflowExponent<float>();\ntemplate<> double MachineUnderflowExponent<double>();\n\n// Return the underflow threshold: (base)^((underflow exponent)-1)\ntemplate<typename R> R MachineUnderflowThreshold();\ntemplate<> float MachineUnderflowThreshold<float>();\ntemplate<> double MachineUnderflowThreshold<double>();\n\n// Return the largest exponent before overflow\ntemplate<typename R> R MachineOverflowExponent();\ntemplate<> float MachineOverflowExponent<float>();\ntemplate<> double MachineOverflowExponent<double>();\n\n// Return the overflow threshold: (1-(rel. prec.)) * (base)^(overflow exponent)\ntemplate<typename R> R MachineOverflowThreshold();\ntemplate<> float MachineOverflowThreshold<float>();\ntemplate<> double MachineOverflowThreshold<double>();\n\n// For safely computing norms without overflow/underflow\n// =====================================================\n\nfloat SafeNorm( float alpha, float beta );\ndouble SafeNorm( double alpha, double beta );\nfloat SafeNorm( float alpha, float beta, float gamma );\ndouble SafeNorm( double alpha, double beta, double gamma );\n\nfloat SafeNorm( Complex<float> alpha, float beta );\ndouble SafeNorm( Complex<double> alpha, double beta );\nfloat SafeNorm( float alpha, Complex<float> beta );\ndouble SafeNorm( double alpha, Complex<double> beta );\n\n// Givens rotations\n// ================\n//\n// Given phi and gamma, compute a Givens rotation such that\n//\n//  |       c   s | |   phi |  = | rho |, where c^2 + |s|^2 = 1\n//  | -conj(s)  c | | gamma |    |  0  |\n//\n// This routine uses the stable approach suggested by Kahan and Demmel and\n// returns the value rho.\n//\n\nfloat    Givens( float    phi, float    gamma, float * c, float   * s );\ndouble   Givens( double   phi, double   gamma, double* c, double  * s );\nscomplex Givens( scomplex phi, scomplex gamma, float * c, scomplex* s );\ndcomplex Givens( dcomplex phi, dcomplex gamma, double* c, dcomplex* s );\n\n// Compute the eigen-values/pairs of a symmetric tridiagonal matrix\n// ================================================================\n\n// Compute eigenvalues\n// -------------------\n\n// All eigenvalues\n// ^^^^^^^^^^^^^^^\nvoid SymmetricTridiagEig\n( int n, float* d, float* e, float* w, float abstol=0 );\nvoid SymmetricTridiagEig\n( int n, double* d, double* e, double* w, double abstol=0 );\n\n// Floating-point range\n// ^^^^^^^^^^^^^^^^^^^^\nint SymmetricTridiagEig\n( int n, float* d, float* e, float* w, \n  float vl, float vu, float abstol=0 );\nint SymmetricTridiagEig\n( int n, double* d, double* e, double* w, \n  double vl, double vu, double abstol=0 );\n\n// Index range\n// ^^^^^^^^^^^\nvoid SymmetricTridiagEig\n( int n, float* d, float* e, float* w,\n  int il, int iu, float abstol=0 );\nvoid SymmetricTridiagEig\n( int n, double* d, double* e, double* w,\n  int il, int iu, double abstol=0 );\n\n// Compute eigenpairs\n// ------------------\n\n// All eigenpairs\n// ^^^^^^^^^^^^^^\nvoid SymmetricTridiagEig\n( int n, float* d, float* e, float* w, float* Z, int ldZ, float abstol=0 );\nvoid SymmetricTridiagEig\n( int n, double* d, double* e, double* w, double* Z, int ldZ, double abstol=0 );\n\n// Floating-point range\n// ^^^^^^^^^^^^^^^^^^^^\nint SymmetricTridiagEig\n( int n, float* d, float* e, float* w, float* Z, int ldZ,\n  float vl, float vu, float abstol=0 );\nint SymmetricTridiagEig\n( int n, double* d, double* e, double* w, double* Z, int ldZ,\n  double vl, double vu, double abstol=0 );\n\n// Index range\n// ^^^^^^^^^^^\nvoid SymmetricTridiagEig\n( int n, float* d, float* e, float* w, float* Z, int ldZ,\n  int il, int iu, float abstol=0 );\nvoid SymmetricTridiagEig\n( int n, double* d, double* e, double* w, double* Z, int ldZ,\n  int il, int iu, double abstol=0 );\n\n// Compute the eigen-values/pairs of a Hermitian matrix\n// ====================================================\n\n// Compute eigenvalues\n// -------------------\n\n// All eigenvalues\n// ^^^^^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, int ldA, float* w, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, double* A, int ldA, double* w, double abstol=0 );\nvoid HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w, double abstol=0 );\n\n// Floating-point range\n// ^^^^^^^^^^^^^^^^^^^^\nint HermitianEig\n( char uplo, int n, float* A, int ldA, float* w,\n  float vl, float vu, float abstol=0 );\nint HermitianEig\n( char uplo, int n, double* A, int ldA, double* w,\n  double vl, double vu, double abstol=0 );\nint HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w,\n  float vl, float vu, float abstol=0 );\nint HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w,\n  double vl, double vu, double abstol=0 );\n\n// Index range\n// ^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, int ldA, float* w,\n  int il, int iu, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, double* A, int ldA, double* w,\n  int il, int iu, double abstol=0 );\nvoid HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w,\n  int il, int iu, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w,\n  int il, int iu, double abstol=0 );\n\n// Compute eigenpairs\n// ------------------\n\n// All eigenpairs\n// ^^^^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, int ldA, float* w, float* Z, int ldZ,\n  float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, double* A, int ldA, double* w, double* Z, int ldZ,\n  double abstol=0 );\nvoid HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w, scomplex* Z, int ldZ,\n  float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w, dcomplex* Z, int ldZ,\n  double abstol=0 );\n\n// Floating-point range\n// ^^^^^^^^^^^^^^^^^^^^\nint HermitianEig\n( char uplo, int n, float* A, int ldA, float* w, float* Z, int ldZ,\n  float vl, float vu, float abstol=0 );\nint HermitianEig\n( char uplo, int n, double* A, int ldA, double* w, double* Z, int ldZ,\n  double vl, double vu, double abstol=0 );\nint HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w, scomplex* Z, int ldZ,\n  float vl, float vu, float abstol=0 );\nint HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w, dcomplex* Z, int ldZ,\n  double vl, double vu, double abstol=0 );\n\n// Index range\n// ^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, int ldA, float* w, float* Z, int ldZ,\n  int il, int iu, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, double* A, int ldA, double* w, double* Z, int ldZ,\n  int il, int iu, double abstol=0 );\nvoid HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w, scomplex* Z, int ldZ,\n  int il, int iu, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w, dcomplex* Z, int ldZ,\n  int il, int iu, double abstol=0 );\n\n// Compute the SVD of a general matrix using a divide and conquer algorithm\n// ========================================================================\n\nvoid DivideAndConquerSVD\n( int m, int n, float* A, int ldA, \n  float* s, float* U, int ldU, float* VT, int ldVT );\nvoid DivideAndConquerSVD\n( int m, int n, double* A, int ldA, \n  double* s, double* U, int ldU, double* VT, int ldVT );\nvoid DivideAndConquerSVD\n( int m, int n, scomplex* A, int ldA, \n  float* s, scomplex* U, int ldU, scomplex* VH, int ldVH );\nvoid DivideAndConquerSVD\n( int m, int n, dcomplex* A, int ldA, \n  double* s, dcomplex* U, int ldU, dcomplex* VH, int ldVH );\n\n// Compute the SVD of a general matrix using the QR algorithm\n// ==========================================================\n\nvoid QRSVD\n( int m, int n, float* A, int ldA, \n  float* s, float* U, int ldU, float* VT, int ldVT );\nvoid QRSVD\n( int m, int n, double* A, int ldA, \n  double* s, double* U, int ldU, double* VT, int ldVT );\nvoid QRSVD\n( int m, int n, scomplex* A, int ldA, \n  float* s, scomplex* U, int ldU, scomplex* VH, int ldVH );\nvoid QRSVD\n( int m, int n, dcomplex* A, int ldA, \n  double* s, dcomplex* U, int ldU, dcomplex* VH, int ldVH );\n\n// Compute the singular values of a general matrix (using the QR algorithm)\n// ========================================================================\n\nvoid SVD( int m, int n, float* A, int ldA, float* s );\nvoid SVD( int m, int n, double* A, int ldA, double* s );\nvoid SVD( int m, int n, scomplex* A, int ldA, float* s );\nvoid SVD( int m, int n, dcomplex* A, int ldA, double* s );\n\n// Compute the singular values of a bidiagonal matrix via dqds\n// ===========================================================\n\nvoid BidiagDQDS( int n, float* d, float* e );\nvoid BidiagDQDS( int n, double* d, double* e );\n\n// Compute the SVD of a bidiagonal matrix using the QR algorithm\n// =============================================================\n\nvoid BidiagQRAlg\n( char uplo, int n, int numColsVT, int numRowsU,\n  float* d, float* e, float* VT, int ldVT, float* U, int ldU );\nvoid BidiagQRAlg\n( char uplo, int n, int numColsVT, int numRowsU, \n  double* d, double* e, double* VT, int ldVT, double* U, int ldU );\nvoid BidiagQRAlg\n( char uplo, int n, int numColsVH, int numRowsU,\n  float* d, float* e, scomplex* VH, int ldVH, scomplex* U, int ldU );\nvoid BidiagQRAlg\n( char uplo, int n, int numColsVH, int numRowsU, \n  double* d, double* e, dcomplex* VH, int ldVH, dcomplex* U, int ldU );\n\n// Compute the Schur decomposition of an upper Hessenberg matrix\n// =============================================================\n\nvoid HessenbergSchur\n( int n, float* H, int ldH, scomplex* w, bool fullTriangle=false );\nvoid HessenbergSchur\n( int n, double* H, int ldH, dcomplex* w, bool fullTriangle=false );\nvoid HessenbergSchur\n( int n, scomplex* H, int ldH, scomplex* w, bool fullTriangle=false );\nvoid HessenbergSchur\n( int n, dcomplex* H, int ldH, dcomplex* w, bool fullTriangle=false );\n\nvoid HessenbergSchur\n( int n, float* H, int ldH, scomplex* w, float* Q, int ldQ, \n  bool fullTriangle=true, bool multiplyQ=false );\nvoid HessenbergSchur\n( int n, double* H, int ldH, dcomplex* w, double* Q, int ldQ, \n  bool fullTriangle=true, bool multiplyQ=false );\nvoid HessenbergSchur\n( int n, scomplex* H, int ldH, scomplex* w, scomplex* Q, int ldQ, \n  bool fullTriangle=false, bool multiplyQ=false );\nvoid HessenbergSchur\n( int n, dcomplex* H, int ldH, dcomplex* w, dcomplex* Q, int ldQ, \n  bool fullTriangle=false, bool multiplyQ=false );\n\n// Compute the eigenvalues/pairs of an upper Hessenberg matrix\n// ===========================================================\n\nvoid HessenbergEig( int n, float* H, int ldH, scomplex* w );\nvoid HessenbergEig( int n, double* H, int ldH, dcomplex* w );\nvoid HessenbergEig( int n, scomplex* H, int ldH, scomplex* w );\nvoid HessenbergEig( int n, dcomplex* H, int ldH, dcomplex* w );\n\n// TODO: A version which computes eigenvectors\n\n// Compute the Schur decomposition of a square matrix\n// ==================================================\n\nvoid Schur\n( int n, float* A, int ldA, scomplex* w, bool fullTriangle=false );\nvoid Schur\n( int n, double* A, int ldA, dcomplex* w, bool fullTriangle=false );\nvoid Schur\n( int n, scomplex* A, int ldA, scomplex* w, bool fullTriangle=false );\nvoid Schur\n( int n, dcomplex* A, int ldA, dcomplex* w, bool fullTriangle=false );\n\nvoid Schur\n( int n, float* A, int ldA, scomplex* w, float* Q, int ldQ, \n  bool fullTriangle=true );\nvoid Schur\n( int n, double* A, int ldA, dcomplex* w, double* Q, int ldQ, \n  bool fullTriangle=true );\nvoid Schur\n( int n, scomplex* A, int ldA, scomplex* w, scomplex* Q, int ldQ, \n  bool fullTriangle=true );\nvoid Schur\n( int n, dcomplex* A, int ldA, dcomplex* w, dcomplex* Q, int ldQ, \n  bool fullTriangle=true );\n\n// Compute the eigenvalues/pairs of a square matrix\n// ================================================\n\nvoid Eig( int n, float* A, int ldA, scomplex* w );\nvoid Eig( int n, double* A, int ldA, dcomplex* w );\nvoid Eig( int n, scomplex* A, int ldA, scomplex* w );\nvoid Eig( int n, dcomplex* A, int ldA, dcomplex* w );\n\nvoid Eig( int n, float* A, int ldA, scomplex* w, scomplex* X, int ldX );\nvoid Eig( int n, float* A, int ldA, scomplex* w, float* XPacked, int ldX );\nvoid Eig( int n, double* A, int ldA, dcomplex* w, dcomplex* X, int ldX );\nvoid Eig( int n, double* A, int ldA, dcomplex* w, double* XPacked, int ldX );\nvoid Eig( int n, scomplex* A, int ldA, scomplex* w, scomplex* X, int ldX );\nvoid Eig( int n, dcomplex* A, int ldA, dcomplex* w, dcomplex* X, int ldX );\n\n} // namespace lapack\n} // namespace elem\n\n#endif // ifndef ELEM_IMPORTS_LAPACK_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/imports/mpi.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n                      2013, Jeff Hammond\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IMPORTS_MPI_HPP\n#define ELEM_IMPORTS_MPI_HPP\n\nnamespace elem {\nnamespace mpi {\n\n#if defined(ELEM_HAVE_MPI3_NONBLOCKING_COLLECTIVES) || \\\n    defined(ELEM_HAVE_MPIX_NONBLOCKING_COLLECTIVES)\n#define ELEM_HAVE_NONBLOCKING 1\n#else\n#define ELEM_HAVE_NONBLOCKING 0\n#endif\n\n#ifdef ELEM_HAVE_NONBLOCKING_COLLECTIVES\n#ifdef ELEM_HAVE_MPI3_NONBLOCKING_COLLECTIVES\n#define ELEM_NONBLOCKING_COLL(name) MPI_ ## name\n#else\n#define ELEM_NONBLOCKING_COLL(name) MPIX_ ## name\n#endif\n#endif\n\nstruct Comm\n{\n    MPI_Comm comm;\n    Comm( MPI_Comm mpiComm=MPI_COMM_NULL ) : comm(mpiComm) { }\n};\ninline bool operator==( const Comm& a, const Comm& b )\n{ return a.comm == b.comm; }\ninline bool operator!=( const Comm& a, const Comm& b )\n{ return a.comm != b.comm; }\n\nstruct Group\n{\n    MPI_Group group;\n    Group( MPI_Group mpiGroup=MPI_GROUP_NULL ) : group(mpiGroup) { }\n};\ninline bool operator==( const Group& a, const Group& b )\n{ return a.group == b.group; }\ninline bool operator!=( const Group& a, const Group& b )\n{ return a.group != b.group; }\n\nstruct Op\n{\n    MPI_Op op;\n    Op( MPI_Op mpiOp=MPI_OP_NULL ) : op(mpiOp) { }\n};\ninline bool operator==( const Op& a, const Op& b )\n{ return a.op == b.op; }\ninline bool operator!=( const Op& a, const Op& b )\n{ return a.op != b.op; }\n\n// Datatype definitions\n// TODO: Convert these to structs/classes\ntypedef MPI_Aint Aint;\ntypedef MPI_Datatype Datatype;\ntypedef MPI_Errhandler ErrorHandler;\ntypedef MPI_Request Request;\ntypedef MPI_Status Status;\ntypedef MPI_User_function UserFunction;\n\n// Standard constants\nconst int ANY_SOURCE = MPI_ANY_SOURCE;\nconst int ANY_TAG = MPI_ANY_TAG;\n#ifdef ELEM_HAVE_MPI_QUERY_THREAD\nconst int THREAD_SINGLE = MPI_THREAD_SINGLE;\nconst int THREAD_FUNNELED = MPI_THREAD_FUNNELED;\nconst int THREAD_SERIALIZED = MPI_THREAD_SERIALIZED;\nconst int THREAD_MULTIPLE = MPI_THREAD_MULTIPLE;\n#else\nconst int THREAD_SINGLE = 0;\nconst int THREAD_FUNNELED = 1;\nconst int THREAD_SERIALIZED = 2;\nconst int THREAD_MULTIPLE = 3;\n#endif\nconst int UNDEFINED = MPI_UNDEFINED;\nconst Group GROUP_NULL = MPI_GROUP_NULL;\nconst Comm COMM_NULL = MPI_COMM_NULL;\nconst Comm COMM_SELF = MPI_COMM_SELF;\nconst Comm COMM_WORLD = MPI_COMM_WORLD;\nconst ErrorHandler ERRORS_RETURN = MPI_ERRORS_RETURN;\nconst ErrorHandler ERRORS_ARE_FATAL = MPI_ERRORS_ARE_FATAL;\nconst Group GROUP_EMPTY = MPI_GROUP_EMPTY;\nconst Request REQUEST_NULL = MPI_REQUEST_NULL;\nconst Op MAX = MPI_MAX;\nconst Op MIN = MPI_MIN;\nconst Op MAXLOC = MPI_MAXLOC;\nconst Op MINLOC = MPI_MINLOC;\nconst Op PROD = MPI_PROD;\nconst Op SUM = MPI_SUM;\nconst Op LOGICAL_AND = MPI_LAND;\nconst Op LOGICAL_OR = MPI_LOR;\nconst Op LOGICAL_XOR = MPI_LXOR;\nconst Op BINARY_AND = MPI_BAND;\nconst Op BINARY_OR = MPI_BOR;\nconst Op BINARY_XOR = MPI_BXOR;\n\n// Added constant(s)\nconst int MIN_COLL_MSG = 1; // minimum message size for collectives\ninline int Pad( int count ) { return std::max(count,MIN_COLL_MSG); }\n\n// Environment routines\nvoid Initialize( int& argc, char**& argv );\nint InitializeThread( int& argc, char**& argv, int required );\nvoid Finalize();\nbool Initialized();\nbool Finalized();\nint QueryThread();\ndouble Time();\nvoid Create( UserFunction* func, bool commutes, Op& op );\nvoid Free( Op& op );\n\n// Communicator manipulation\nint WorldRank();\nint Rank( Comm comm );\nint Size( Comm comm );\nvoid Create( Comm parentComm, Group subsetGroup, Comm& subsetComm );\nvoid Dup( Comm original, Comm& duplicate );\nvoid Split( Comm comm, int color, int key, Comm& newComm );\nvoid Free( Comm& comm );\nbool Congruent( Comm comm1, Comm comm2 );\nvoid ErrorHandlerSet( Comm comm, ErrorHandler errorHandler );\n\n// Cartesian communicator routines\nvoid CartCreate\n( Comm comm, int numDims, const int* dimensions, const int* periods, \n  bool reorder, Comm& cartComm );\nvoid CartSub\n( Comm comm, const int* remainingDims, Comm& subComm );\n\n// Group manipulation\nint Rank( Group group );\nint Size( Group group );\nvoid CommGroup( Comm comm, Group& group );\nvoid Dup( Group group, Group& newGroup );\nvoid Union( Group groupA, Group groupB, Group& newGroup );\nvoid Incl( Group group, int n, const int* ranks, Group& subGroup );\nvoid Excl( Group group, int n, const int* ranks, Group& subGroup );\nvoid Difference( Group parent, Group subset, Group& complement );\nvoid Free( Group& group );\nint Translate( Group origGroup, int origRank, Group newGroup );\nint Translate( Comm  origComm,  int origRank, Group newGroup );\nint Translate( Group origGroup, int origRank, Comm  newComm  );\nint Translate( Comm  origComm,  int origRank, Comm  newComm  );\nvoid Translate\n( Group origGroup, int size, const int* origRanks, \n  Group newGroup,                  int* newRanks );\nvoid Translate\n( Comm origComm,  int size, const int* origRanks, \n  Group newGroup,                 int* newRanks );\nvoid Translate\n( Group origGroup, int size, const int* origRanks, \n  Comm newComm,                    int* newRanks );\nvoid Translate\n( Comm origComm, int size, const int* origRanks, \n  Comm newComm,                  int* newRanks );\n\n// Utilities\nvoid Barrier( Comm comm );\nvoid Wait( Request& request );\nvoid Wait( Request& request, Status& status );\nvoid WaitAll( int numRequests, Request* requests );\nvoid WaitAll( int numRequests, Request* requests, Status* statuses );\nbool Test( Request& request );\nbool IProbe( int source, int tag, Comm comm, Status& status );\n\ntemplate<typename T>\nint GetCount( Status& status );\n\n// Point-to-point communication\n// ============================\n\n// Send\n// ----\ntemplate<typename R>\nvoid TaggedSend( const R* buf, int count, int to, int tag, Comm comm );\ntemplate<typename R>\nvoid TaggedSend( const Complex<R>* buf, int count, int to, int tag, Comm comm );\n// If the tag is irrelevant\ntemplate<typename T>\nvoid Send( const T* buf, int count, int to, Comm comm );\n// If the send-count is one\ntemplate<typename T>\nvoid TaggedSend( T b, int to, int tag, Comm comm );\n// If the send-count is one and the tag is irrelevant\ntemplate<typename T>\nvoid Send( T b, int to, Comm comm );\n\n// Non-blocking send\n// -----------------\ntemplate<typename R>\nvoid TaggedISend\n( const R* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate<typename R>\nvoid TaggedISend\n( const Complex<R>* buf, int count, int to, int tag, Comm comm, \n  Request& request );\n// If the tag is irrelevant\ntemplate<typename T>\nvoid ISend( const T* buf, int count, int to, Comm comm, Request& request );\n// If the send count is one\ntemplate<typename T>\nvoid TaggedISend( T b, int to, int tag, Comm comm, Request& request );\n// If the send count is one and the tag is irrelevant\ntemplate<typename T>\nvoid ISend( T b, int to, Comm comm, Request& request );\n\n// Non-blocking synchronous Send\n// -----------------------------\ntemplate<typename R>\nvoid TaggedISSend\n( const R* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate<typename R>\nvoid TaggedISSend\n( const Complex<R>* buf, int count, int to, int tag, Comm comm, \n  Request& request );\n// If the tag is irrelevant\ntemplate<typename T>\nvoid ISSend( const T* buf, int count, int to, Comm comm, Request& request );\n// If the send count is one\ntemplate<typename T>\nvoid TaggedISSend( T b, int to, int tag, Comm comm, Request& request );\n// If the send count is one and the tag is irrelevant\ntemplate<typename T>\nvoid ISSend( T b, int to, Comm comm, Request& request );\n\n// Recv\n// ----\ntemplate<typename R>\nvoid TaggedRecv( R* buf, int count, int from, int tag, Comm comm );\ntemplate<typename R>\nvoid TaggedRecv( Complex<R>* buf, int count, int from, int tag, Comm comm );\n// If the tag is irrelevant\ntemplate<typename T>\nvoid Recv( T* buf, int count, int from, Comm comm );\n// If the recv count is one\ntemplate<typename T>\nT TaggedRecv( int from, int tag, Comm comm );\n// If the recv count is one and the tag is irrelevant\ntemplate<typename T>\nT Recv( int from, Comm comm );\n\n// Non-blocking recv\n// -----------------\ntemplate<typename R>\nvoid TaggedIRecv\n( R* buf, int count, int from, int tag, Comm comm, Request& request );\ntemplate<typename R>\nvoid TaggedIRecv\n( Complex<R>* buf, int count, int from, int tag, Comm comm, Request& request );\n// If the tag is irrelevant\ntemplate<typename T>\nvoid IRecv( T* buf, int count, int from, Comm comm, Request& request );\n// If the recv count is one\ntemplate<typename T>\nT TaggedIRecv( int from, int tag, Comm comm, Request& request );\n// If the recv count is one and the tag is irrelevant\ntemplate<typename T>\nT IRecv( int from, Comm comm, Request& request );\n\n// SendRecv\n// --------\ntemplate<typename R>\nvoid TaggedSendRecv\n( const R* sbuf, int sc, int to,   int stag,\n        R* rbuf, int rc, int from, int rtag, Comm comm );\ntemplate<typename R>\nvoid TaggedSendRecv\n( const Complex<R>* sbuf, int sc, int to,   int stag,\n        Complex<R>* rbuf, int rc, int from, int rtag, Comm comm );\n// If the tags are irrelevant\ntemplate<typename T>\nvoid SendRecv\n( const T* sbuf, int sc, int to,\n        T* rbuf, int rc, int from, Comm comm );\n// If the send and recv counts are one\ntemplate<typename T>\nT TaggedSendRecv( T sb, int to, int stag, int from, int rtag, Comm comm );\n// If the send and recv counts are one and the tags don't matter\ntemplate<typename T>\nT SendRecv( T sb, int to, int from, Comm comm );\n\n// Single-buffer SendRecv\n// ----------------------\ntemplate<typename R>\nvoid TaggedSendRecv\n( R* buf, int count, int to, int stag, int from, int rtag, Comm comm );\ntemplate<typename R>\nvoid TaggedSendRecv\n( Complex<R>* buf, int count, int to, int stag, int from, int rtag, Comm comm );\n// If the tags don't matter\ntemplate<typename T>\nvoid SendRecv( T* buf, int count, int to, int from, Comm comm );\n\n// Collective communication\n// ========================\n\n// Broadcast\n// ---------\ntemplate<typename R>\nvoid Broadcast( R* buf, int count, int root, Comm comm );\ntemplate<typename R>\nvoid Broadcast( Complex<R>* buf, int count, int root, Comm comm );\n// If the message length is one\ntemplate<typename T>\nvoid Broadcast( T& b, int root, Comm comm );\n\n#ifdef ELEM_HAVE_NONBLOCKING_COLLECTIVES\n// Non-blocking broadcast\n// ----------------------\ntemplate<typename R>\nvoid IBroadcast\n( R* buf, int count, int root, Comm comm, Request& request );\ntemplate<typename R>\nvoid IBroadcast\n( Complex<R>* buf, int count, int root, Comm comm, Request& request );\n// If the message length is one\ntemplate<typename T>\nvoid IBroadcast( T& b, int root, Comm comm, Request& request );\n#endif\n\n// Gather\n// ------\ntemplate<typename R>\nvoid Gather\n( const R* sbuf, int sc,\n        R* rbuf, int rc, int root, Comm comm );\ntemplate<typename R>\nvoid  Gather\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, int rc, int root, Comm comm );\n\n#ifdef ELEM_HAVE_NONBLOCKING_COLLECTIVES\n// Non-blocking gather\n// -------------------\ntemplate<typename R>\nvoid IGather\n( const R* sbuf, int sc,\n        R* rbuf, int rc, int root, Comm comm, Request& request );\ntemplate<typename R>\nvoid IGather\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, int rc, int root, Comm comm, Request& request );\n#endif\n\n// Gather with variable recv sizes\n// -------------------------------\ntemplate<typename R>\nvoid Gather\n( const R* sbuf, int sc,\n        R* rbuf, const int* rcs, const int* rds, int root, Comm comm );\ntemplate<typename R>\nvoid Gather\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, const int* rcs, const int* rds, \n  int root, Comm comm );\n\n// AllGather\n// ---------\ntemplate<typename R>\nvoid AllGather\n( const R* sbuf, int sc,\n        R* rbuf, int rc, Comm comm );\ntemplate<typename R>\nvoid AllGather\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, int rc, Comm comm );\n\n// AllGather with variable recv sizes\n// ----------------------------------\ntemplate<typename R>\nvoid AllGather\n( const R* sbuf, int sc,\n        R* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate<typename R>\nvoid AllGather\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, const int* rcs, const int* rds, Comm comm );\n\n// Scatter\n// -------\ntemplate<typename R>\nvoid Scatter\n( const R* sbuf, int sc,\n        R* rbuf, int rc, int root, Comm comm );\ntemplate<typename R>\nvoid Scatter\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, int rc, int root, Comm comm );\n// In-place option\ntemplate<typename R>\nvoid Scatter( R* buf, int sc, int rc, int root, Comm comm );\ntemplate<typename R>\nvoid Scatter( Complex<R>* buf, int sc, int rc, int root, Comm comm );\n\n// AllToAll\n// --------\ntemplate<typename R>\nvoid AllToAll\n( const R* sbuf, int sc,\n        R* rbuf, int rc, Comm comm );\ntemplate<typename R>\nvoid AllToAll\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, int rc, Comm comm );\n\n// AllToAll with non-uniform send/recv sizes\n// -----------------------------------------\ntemplate<typename R>\nvoid AllToAll\n( const R* sbuf, const int* scs, const int* sds,\n        R* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate<typename R>\nvoid AllToAll\n( const Complex<R>* sbuf, const int* scs, const int* sds,\n        Complex<R>* rbuf, const int* rcs, const int* rds, Comm comm );\n\n// Reduce\n// ------\ntemplate<typename T>\nvoid Reduce\n( const T* sbuf, T* rbuf, int count, Op op, int root, Comm comm );\ntemplate<typename R>\nvoid Reduce\n( const Complex<R>* sbuf, Complex<R>* rbuf, int count, Op op, \n  int root, Comm comm );\n// Default to mpi::SUM\ntemplate<typename T>\nvoid Reduce( const T* sbuf, T* rbuf, int count, int root, Comm comm );\n// With a message-size of one\ntemplate<typename T>\nT Reduce( T sb, Op op, int root, Comm comm );\n// With a message-size of one and default to mpi::SUM\ntemplate<typename T>\nT Reduce( T sb, int root, Comm comm );\n\n// Single-buffer reduce\n// --------------------\ntemplate<typename T>\nvoid Reduce( T* buf, int count, Op op, int root, Comm comm );\ntemplate<typename R>\nvoid Reduce( Complex<R>* buf, int count, Op op, int root, Comm comm );\n// Default to mpi::SUM\ntemplate<typename T>\nvoid Reduce( T* buf, int count, int root, Comm comm );\n\n// AllReduce\n// ---------\ntemplate<typename T>\nvoid AllReduce( const T* sbuf, T* rbuf, int count, Op op, Comm comm );\ntemplate<typename R>\nvoid AllReduce\n( const Complex<R>* sbuf, Complex<R>* rbuf, int count, Op op, Comm comm );\n// Default to mpi::SUM\ntemplate<typename T>\nvoid AllReduce( const T* sbuf, T* rbuf, int count, Comm comm );\n// If the message-length is one\ntemplate<typename T>\nT AllReduce( T sb, Op op, Comm comm );\n// If the message-length is one (and default to mpi::SUM)\ntemplate<typename T>\nT AllReduce( T sb, Comm comm );\n\n// Single-buffer AllReduce\n// -----------------------\ntemplate<typename T>\nvoid AllReduce( T* buf, int count, Op op, Comm comm );\ntemplate<typename R>\nvoid AllReduce( Complex<R>* buf, int count, Op op, Comm comm );\n// Default to mpi::SUM\ntemplate<typename T>\nvoid AllReduce( T* buf, int count, Comm comm );\n\n// ReduceScatter\n// -------------\ntemplate<typename R>\nvoid ReduceScatter\n( R* sbuf, R* rbuf, int rc, Op op, Comm comm );\ntemplate<typename R>\nvoid ReduceScatter\n( Complex<R>* sbuf, Complex<R>* rbuf, int rc, Op op, Comm comm );\n// Default to mpi::SUM\ntemplate<typename T>\nvoid ReduceScatter( T* sbuf, T* rbuf, int rc, Comm comm );\n\n// Single-buffer ReduceScatter\n// ---------------------------\ntemplate<typename R>\nvoid ReduceScatter( R* buf, int rc, Op op, Comm comm );\ntemplate<typename R>\nvoid ReduceScatter( Complex<R>* buf, int rc, Op op, Comm comm );\n// Default to mpi::SUM\ntemplate<typename T>\nvoid ReduceScatter( T* buf, int rc, Comm comm );\n\n// Variable-length ReduceScatter\n// -----------------------------\ntemplate<typename R>\nvoid ReduceScatter\n( const R* sbuf, R* rbuf, const int* rcs, Op op, Comm comm );\ntemplate<typename R>\nvoid ReduceScatter\n( const Complex<R>* sbuf, Complex<R>* rbuf, const int* rcs, Op op, Comm comm );\n// Default to mpi::SUM\ntemplate<typename T>\nvoid ReduceScatter( const T* sbuf, T* rbuf, const int* rcs, Comm comm );\n\ntemplate<typename R>\nvoid MaxLocFunc\n( void* in, void* out, int* length, mpi::Datatype* datatype );\ntemplate<typename R>\nvoid MaxLocPairFunc\n( void* in, void* out, int* length, mpi::Datatype* datatype );\n\ntemplate<typename R>\nvoid MinLocFunc\n( void* in, void* out, int* length, mpi::Datatype* datatype );\ntemplate<typename R>\nvoid MinLocPairFunc\n( void* in, void* out, int* length, mpi::Datatype* datatype );\n\ntemplate<typename R> mpi::Datatype& ValueIntType();\ntemplate<> mpi::Datatype& ValueIntType<Int>();\ntemplate<> mpi::Datatype& ValueIntType<float>();\ntemplate<> mpi::Datatype& ValueIntType<double>();\n\ntemplate<typename R> mpi::Datatype& ValueIntPairType();\ntemplate<> mpi::Datatype& ValueIntPairType<Int>();\ntemplate<> mpi::Datatype& ValueIntPairType<float>();\ntemplate<> mpi::Datatype& ValueIntPairType<double>();\n\ntemplate<typename R> void CreateValueIntType();\ntemplate<typename R> void CreateValueIntPairType();\ntemplate<typename R> void DestroyValueIntType();\ntemplate<typename R> void DestroyValueIntPairType();\n\ntemplate<typename R> mpi::Op MaxLocOp();\ntemplate<> mpi::Op MaxLocOp<Int>();\ntemplate<> mpi::Op MaxLocOp<float>();\ntemplate<> mpi::Op MaxLocOp<double>();\n\ntemplate<typename R> mpi::Op MaxLocPairOp();\ntemplate<> mpi::Op MaxLocPairOp<Int>();\ntemplate<> mpi::Op MaxLocPairOp<float>();\ntemplate<> mpi::Op MaxLocPairOp<double>();\n\ntemplate<typename R> void CreateMaxLocOp();\ntemplate<> void CreateMaxLocOp<Int>();\ntemplate<> void CreateMaxLocOp<float>();\ntemplate<> void CreateMaxLocOp<double>();\n\ntemplate<typename R> void CreateMaxLocPairOp();\ntemplate<> void CreateMaxLocPairOp<Int>();\ntemplate<> void CreateMaxLocPairOp<float>();\ntemplate<> void CreateMaxLocPairOp<double>();\n\ntemplate<typename R> void DestroyMaxLocOp();\ntemplate<> void DestroyMaxLocOp<Int>();\ntemplate<> void DestroyMaxLocOp<float>();\ntemplate<> void DestroyMaxLocOp<double>();\n\ntemplate<typename R> void DestroyMaxLocPairOp();\ntemplate<> void DestroyMaxLocPairOp<Int>();\ntemplate<> void DestroyMaxLocPairOp<float>();\ntemplate<> void DestroyMaxLocPairOp<double>();\n\ntemplate<typename R> mpi::Op MinLocOp();\ntemplate<> mpi::Op MinLocOp<Int>();\ntemplate<> mpi::Op MinLocOp<float>();\ntemplate<> mpi::Op MinLocOp<double>();\n\ntemplate<typename R> mpi::Op MinLocPairOp();\ntemplate<> mpi::Op MinLocPairOp<Int>();\ntemplate<> mpi::Op MinLocPairOp<float>();\ntemplate<> mpi::Op MinLocPairOp<double>();\n\ntemplate<typename R> void CreateMinLocOp();\ntemplate<> void CreateMinLocOp<Int>();\ntemplate<> void CreateMinLocOp<float>();\ntemplate<> void CreateMinLocOp<double>();\n\ntemplate<typename R> void CreateMinLocPairOp();\ntemplate<> void CreateMinLocPairOp<Int>();\ntemplate<> void CreateMinLocPairOp<float>();\ntemplate<> void CreateMinLocPairOp<double>();\n\ntemplate<typename R> void DestroyMinLocOp();\ntemplate<> void DestroyMinLocOp<Int>();\ntemplate<> void DestroyMinLocOp<float>();\ntemplate<> void DestroyMinLocOp<double>();\n\ntemplate<typename R> void DestroyMinLocPairOp();\ntemplate<> void DestroyMinLocPairOp<Int>();\ntemplate<> void DestroyMinLocPairOp<float>();\ntemplate<> void DestroyMinLocPairOp<double>();\n\ntemplate<typename T> Datatype TypeMap();\ntemplate<> inline Datatype TypeMap<byte>() { return MPI_UNSIGNED_CHAR; }\ntemplate<> inline Datatype TypeMap<int>() { return MPI_INT; }\ntemplate<> inline Datatype TypeMap<unsigned>() { return MPI_UNSIGNED; }\ntemplate<> inline Datatype TypeMap<long int>() { return MPI_LONG_INT; }\ntemplate<> inline Datatype TypeMap<long unsigned>()\n{ return MPI_UNSIGNED_LONG; }\ntemplate<> inline Datatype TypeMap<long long int>()\n{\n#ifdef ELEM_HAVE_MPI_LONG_LONG\n    return MPI_LONG_LONG_INT;\n#else\n    throw std::runtime_error(\"MPI_LONG_LONG_INT does not exist\");\n    return 0;\n#endif\n}\ntemplate<>\ninline Datatype TypeMap<unsigned long long>()\n{\n#ifdef ELEM_HAVE_MPI_LONG_LONG\n    return MPI_UNSIGNED_LONG_LONG;\n#else\n    throw std::runtime_error(\"MPI_UNSIGNED_LONG_LONG does not exist\");\n    return 0;\n#endif\n}\ntemplate<> inline Datatype TypeMap<float>() { return MPI_FLOAT; }\ntemplate<> inline Datatype TypeMap<double>() { return MPI_DOUBLE; }\ntemplate<> inline Datatype TypeMap<Complex<float>>()\n{ return MPI_COMPLEX; }\ntemplate<> inline Datatype TypeMap<Complex<double>>()\n{ return MPI_DOUBLE_COMPLEX; }\n\ntemplate<> inline Datatype TypeMap<ValueInt<Int>>()\n{ return ValueIntType<Int>(); }\ntemplate<> inline Datatype TypeMap<ValueInt<float>>()\n{ return ValueIntType<float>(); }\ntemplate<> inline Datatype TypeMap<ValueInt<double>>()\n{ return ValueIntType<double>(); }\n\ntemplate<> inline Datatype TypeMap<ValueIntPair<Int>>()\n{ return ValueIntPairType<Int>(); }\ntemplate<> inline Datatype TypeMap<ValueIntPair<float>>()\n{ return ValueIntPairType<float>(); }\ntemplate<> inline Datatype TypeMap<ValueIntPair<double>>()\n{ return ValueIntPairType<double>(); }\n\n} // mpi\n} // elem\n\n#endif // ifndef ELEM_IMPORTS_MPI_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/imports/mpi_choice.hpp",
    "content": "/*\n   Copyright (c) 2013, Jack Poulson\n   All rights reserved.\n\n   This file is a modification of Choice, a simple command-line option library.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IMPORTS_MPICHOICE_HPP\n#define ELEM_IMPORTS_MPICHOICE_HPP\n\nnamespace elem {\nnamespace choice {\n\nclass MpiArgs\n{\npublic:\n    MpiArgs\n    ( int argc, char** argv, \n      mpi::Comm comm=mpi::COMM_WORLD, std::ostream& error=std::cerr );\n    virtual ~MpiArgs() { }\n\n    template<typename T>\n    T Input( std::string name, std::string desc );\n    template<typename T>\n    T Input( std::string name, std::string desc, T defaultVal );\n\n    void Process( std::ostream& os=std::cout ) const;\n    void PrintReport( std::ostream& os=std::cout ) const;\n\nprotected:\n    int argc_;\n    char** argv_;\n    std::vector<bool> usedArgs_;\n    std::ostream& error_;\n    mpi::Comm comm_;\n\n    virtual void HandleVersion( std::ostream& os=std::cout ) const { }\n    virtual void HandleBuild( std::ostream& os=std::cout ) const { }\n\n    struct RequiredArg\n    { \n        std::string name, desc, typeInfo, usedVal; \n        bool found;\n\n        RequiredArg\n        ( std::string n, std::string d, std::string t, std::string uv, bool f ) \n        : name(n), desc(d), typeInfo(t), usedVal(uv), found(f) { };\n    };\n\n    struct OptionalArg\n    { \n        std::string name, desc, typeInfo, defaultVal, usedVal; \n        bool found;\n\n        OptionalArg\n        ( std::string n, std::string d, std::string t, \n          std::string dv, std::string uv, bool f )\n        : name(n), desc(d), typeInfo(t), \n          defaultVal(dv), usedVal(uv), found(f) { } \n    };\n\n    std::vector<RequiredArg> requiredArgs_;\n    std::vector<OptionalArg> optionalArgs_;\n};\n\ninline\nMpiArgs::MpiArgs( int argc, char** argv, mpi::Comm comm, std::ostream& error )\n: argc_(argc), argv_(argv), usedArgs_(argc,false), error_(error), comm_(comm)\n{ }\n\ntemplate<typename T>\ninline T\nMpiArgs::Input( std::string name, std::string desc )\n{\n    const int commRank = mpi::Rank( comm_ );\n\n    char** arg = std::find( argv_, argv_+argc_, name );\n    const bool found = ( arg != argv_+argc_ );\n    const bool invalidFound = ( arg == argv_+argc_-1 );\n    if( invalidFound )\n    {\n        if( commRank == 0 )\n            error_ << \"Missing value for last command-line argument\" \n                   << std::endl;\n        throw ArgException();\n    }\n\n    std::string typeInfo( typeid(T).name() );\n    std::string usedVal = ( found ? arg[1] : \"N/A\" );\n    requiredArgs_.push_back( RequiredArg(name,desc,typeInfo,usedVal,found) );\n\n    // Before returning, store the used indices and check for duplication\n    if( commRank == 0 && found )\n    {\n        const int offset = arg - argv_;\n        if( usedArgs_[offset] || usedArgs_[offset+1] )\n        {\n            error_ << \"WARNING: conflict with \" << name << \" detected at \";\n            if( usedArgs_[offset] && usedArgs_[offset+1] )\n                error_ << \"arguments \" << offset << \" and \" << offset+1\n                       << std::endl;\n            else if( usedArgs_[offset] )\n                error_ << \"argument \" << offset << std::endl;\n            else\n                error_ << \"argument \" << offset+1 << std::endl;\n            error_ << \"Please ensure that you did request argument \" \n                   << name << \" multiple times\" << std::endl;\n        }\n        usedArgs_[offset+0] = true;\n        usedArgs_[offset+1] = true;\n\n        arg = std::find( arg+1, argv_+argc_, name );\n        if( arg != argv_+argc_ )\n            error_ << \"WARNING: \" << name << \" was specified twice and only \"\n                   << \"the first instance is used\" << std::endl;\n    }\n\n    return Cast<T>( usedVal );\n}\n\ntemplate<typename T>\ninline T\nMpiArgs::Input( std::string name, std::string desc, T defaultVal )\n{\n    const int commRank = mpi::Rank( comm_ );\n\n    char** arg = std::find( argv_, argv_+argc_, name );\n    const bool found = ( arg != argv_+argc_ );\n    const bool invalidFound = ( arg == argv_+argc_-1 );\n    if( invalidFound )\n    {\n        if( commRank == 0 )\n            error_ << \"Missing value for last command-line argument\" \n                   << std::endl;\n        throw ArgException();\n    }\n\n    std::string typeInfo( typeid(T).name() );\n\n    std::string defValString = Cast<std::string>( defaultVal );\n    std::string usedVal = ( found ? arg[1] : defValString );\n\n    optionalArgs_.push_back\n    ( OptionalArg(name,desc,typeInfo,defValString,usedVal,found) );\n\n    // Before returning, store the used indices and check for duplication\n    if( commRank == 0 && found )\n    {\n        const int offset = arg - argv_;\n        if( usedArgs_[offset] || usedArgs_[offset+1] )\n        {\n            error_ << \"WARNING: conflict with \" << name << \" detected at \";\n            if( usedArgs_[offset] && usedArgs_[offset+1] )\n                error_ << \"arguments \" << offset << \" and \" << offset+1\n                       << std::endl;\n            else if( usedArgs_[offset] )\n                error_ << \"argument \" << offset << std::endl;\n            else\n                error_ << \"argument \" << offset+1 << std::endl;\n            error_ << \"Please ensure that you did request argument \" \n                   << name << \" multiple times\" << std::endl;\n        }\n        usedArgs_[offset+0] = true;\n        usedArgs_[offset+1] = true;\n\n        arg = std::find( arg+1, argv_+argc_, name );\n        if( arg != argv_+argc_ )\n            error_ << \"WARNING: \" << name << \" was specified twice and only \"\n                   << \"the first instance is used\" << std::endl;\n    }\n\n    if( found )\n        return Cast<T>( usedVal );\n    else\n        return defaultVal; // avoid the double-cast\n}\n\ninline void \nMpiArgs::Process( std::ostream& os ) const\n{\n    HandleVersion( os );\n    HandleBuild( os );\n\n    std::string help = \"--help\";\n    char** arg = std::find( argv_, argv_+argc_, help );\n    const bool foundHelp = ( arg != argv_+argc_ );\n    \n    int numFailed = 0;\n    const int numRequired = requiredArgs_.size();\n    for( int i=0; i<numRequired; ++i )\n        if( !requiredArgs_[i].found )\n            ++numFailed;\n    if( numFailed > 0 || foundHelp )\n    {\n        PrintReport( os );\n        throw ArgException(); \n    }\n}\n\ninline void \nMpiArgs::PrintReport( std::ostream& os ) const\n{\n    const int commRank = mpi::Rank( comm_ );\n    if( commRank != 0 )\n        return;\n\n    const int numRequired = requiredArgs_.size();\n    const int numOptional = optionalArgs_.size();\n\n    if( numRequired > 0 )\n        os << \"Required arguments:\\n\";\n    int numReqFailed = 0;\n    for( int i=0; i<numRequired; ++i )\n    {\n        const RequiredArg& reqArg = requiredArgs_[i];\n        if( !reqArg.found )\n            ++numReqFailed;\n        std::string foundString = ( reqArg.found ? \"found\" : \"NOT found\" );\n        os << \"  \" << reqArg.name\n           << \" [\" << reqArg.typeInfo << \",\" << reqArg.usedVal << \",\"\n           << foundString << \"]\\n\"\n           << \"    \" << reqArg.desc << \"\\n\\n\";\n    }\n\n    if( numOptional > 0 )\n        os << \"Optional arguments:\\n\";\n    int numOptFailed = 0;\n    for( int i=0; i<numOptional; ++i )\n    {\n        const OptionalArg& optArg = optionalArgs_[i];\n        if( !optArg.found )\n            ++numOptFailed;\n        std::string foundString = ( optArg.found ? \"found\" : \"NOT found\" );\n        os << \"  \" << optArg.name\n           << \" [\" << optArg.typeInfo\n           << \",\" << optArg.defaultVal << \",\" << optArg.usedVal << \",\"\n           << foundString << \"]\\n\"\n           << \"    \" << optArg.desc << \"\\n\\n\";\n    }\n\n    os << \"Out of \" << numRequired << \" required arguments, \" \n       << numReqFailed << \" were not specified.\" << std::endl;\n\n    os << \"Out of \" << numOptional << \" optional arguments, \"\n       << numOptFailed << \" were not specified.\\n\" << std::endl;\n}\n\n} // namespace choice\n} // namespace elem\n\n#endif // ifndef ELEM_IMPORTS_MPICHOICE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/imports/pmrrr.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IMPORTS_PMRRR_HPP\n#define ELEM_IMPORTS_PMRRR_HPP\n\nnamespace elem {\nnamespace herm_tridiag_eig {\n\nstruct Estimate {\n    int numLocalEigenvalues;\n    int numGlobalEigenvalues;\n};\n\n// Return an upper bound on the number of (local) eigenvalues in the given range\nEstimate EigEstimate\n( int n,  double* d, double* e, double* w, mpi::Comm comm, \n  double lowerBound, double upperBound );\n\nstruct Info {\n    int numLocalEigenvalues;\n    int numGlobalEigenvalues;\n\n    int firstLocalEigenvalue;\n};\n\n// Compute all of the eigenvalues\nInfo Eig( int n, double* d, double* e, double* w, mpi::Comm comm );\n\n// Compute all of the eigenpairs\nInfo Eig\n( int n, double* d, double* e, double* w, double* Z, int ldz, mpi::Comm comm );\n\n// Compute all of the eigenvalues in [lowerBound,upperBound)\nInfo Eig\n( int n, double* d, double* e, double* w, mpi::Comm comm, \n  double lowerBound, double upperBound );\n\n// Compute all of the eigenpairs with eigenvalues in [lowerBound,upperBound)\nInfo Eig\n( int n, double* d, double* e, double* w, double* Z, int ldz, mpi::Comm comm, \n  double lowerBound, double upperBound );\n\n// Compute all of the eigenvalues with indices in [lowerBound,upperBound)\nInfo Eig\n( int n, double* d, double* e, double* w, mpi::Comm comm, \n  int lowerBound, int upperBound );\n\n// Compute all of the eigenpairs with ordered eigenvalue indices in \n// [lowerBound,upperBound)\nInfo Eig\n( int n, double* d, double* e, double* w, double* Z, int ldz, mpi::Comm comm, \n  int lowerBound, int upperBound );\n\n} // namespace herm_tridiag_eig\n} // namespace elem\n\n#endif // ifndef ELEM_IMPORTS_PMRRR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/imports/scalapack.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IMPORTS_SCALAPACK_HPP\n#define ELEM_IMPORTS_SCALAPACK_HPP\n\n#ifdef ELEM_HAVE_SCALAPACK\n\nnamespace elem {\n\nnamespace blacs {\n\nint Handle( MPI_Comm comm );\nint GridInit( int bhandle, bool colMajor, int gridHeight, int gridWidth );\nint GridHeight( int context );\nint GridWidth( int context );\nint GridRow( int context );\nint GridCol( int context );\nvoid FreeHandle( int bhandle );\nvoid FreeGrid( int context );\nvoid Exit( bool finished=false );\n\ntypedef typename std::array<int,9> Desc;\n\n} // namespace blacs\n\nnamespace scalapack {\n\n// NOTE: The vast majority of these routines are for benchmarking purposes,\n//       but the Hessenberg QR algorithm is actively used by Elemental's\n//       Pseudospectrum routine.\n\n// Cholesky decomposition\n// ======================\nvoid Cholesky( char uplo, int n, float* A, const int* desca );\nvoid Cholesky( char uplo, int n, double* A, const int* desca );\nvoid Cholesky( char uplo, int n, scomplex* A, const int* desca );\nvoid Cholesky( char uplo, int n, dcomplex* A, const int* desca );\n\n// Hermitian eigenvalue decomposition\n// ==================================\n\n// Compute eigenvalues\n// -------------------\n\n// All eigenvalues\n// ^^^^^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, const int* desca, float* w, \n  float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, double* A, const int* desca, double* w, \n  double abstol=0 );\nvoid HermitianEig\n( char uplo, int n, scomplex* A, const int* desca, float* w, \n  float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, const int* desca, double* w, \n  double abstol=0 );\n\n// Floating-point range\n// ^^^^^^^^^^^^^^^^^^^^\nint HermitianEig\n( char uplo, int n, float* A, const int* desca, float* w,\n  float vl, float vu, float abstol=0 );\nint HermitianEig\n( char uplo, int n, double* A, const int* desca, double* w,\n  double vl, double vu, double abstol=0 );\nint HermitianEig\n( char uplo, int n, scomplex* A, const int* desca, float* w,\n  float vl, float vu, float abstol=0 );\nint HermitianEig\n( char uplo, int n, dcomplex* A, const int* desca, double* w,\n  double vl, double vu, double abstol=0 );\n\n// Index range\n// ^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, const int* desca, float* w,\n  int il, int iu, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, double* A, const int* desca, double* w,\n  int il, int iu, double abstol=0 );\nvoid HermitianEig\n( char uplo, int n, scomplex* A, const int* desca, float* w,\n  int il, int iu, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, const int* desca, double* w,\n  int il, int iu, double abstol=0 );\n\n// Compute eigenpairs\n// ------------------\n\n// All eigenpairs\n// ^^^^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, const int* desca, float* w, \n  float* Z, const int* descz, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, double* A, const int* desca, double* w, \n  double* Z, const int* descz, double abstol=0 );\nvoid HermitianEig\n( char uplo, int n, scomplex* A, const int* desca, float* w, \n  scomplex* Z, const int* descz, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, const int* desca, double* w, \n  dcomplex* Z, const int* descz, double abstol=0 );\n\n// Floating-point range\n// ^^^^^^^^^^^^^^^^^^^^\nint HermitianEig\n( char uplo, int n, float* A, const int* desca, float* w, \n  float* Z, const int* descz, float vl, float vu, float abstol=0 );\nint HermitianEig\n( char uplo, int n, double* A, const int* desca, double* w, \n  double* Z, const int* descz, double vl, double vu, double abstol=0 );\nint HermitianEig\n( char uplo, int n, scomplex* A, const int* desca, float* w, \n  scomplex* Z, const int* descz, float vl, float vu, float abstol=0 );\nint HermitianEig\n( char uplo, int n, dcomplex* A, const int* desca, double* w, \n  dcomplex* Z, const int* descz, double vl, double vu, double abstol=0 );\n\n// Index range\n// ^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, const int* desca, float* w, \n  float* Z, const int* descz, int il, int iu, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, double* A, const int* desca, double* w, \n  double* Z, const int* descz, int il, int iu, double abstol=0 );\nvoid HermitianEig\n( char uplo, int n, scomplex* A, const int* desca, float* w, \n  scomplex* Z, const int* descz, int il, int iu, float abstol=0 );\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, const int* desca, double* w, \n  dcomplex* Z, const int* descz, int il, int iu, double abstol=0 );\n\n// Hessenberg Schur decomposition via the QR algorithm\n// ===================================================\n// NOTE: In all of these routines, the matrix needs to be explicitly \n//       upper-Hessenberg before the call, otherwise behavior is unpredictable\n\nvoid HessenbergSchur\n( int n, float* H, const int* desch, scomplex* w, bool fullTriangle=false, \n  bool aed=false );\nvoid HessenbergSchur\n( int n, double* H, const int* desch, dcomplex* w, bool fullTriangle=false,\n  bool aed=false );\nvoid HessenbergSchur\n( int n, scomplex* H, const int* desch, scomplex* w, bool fullTriangle=false,\n  bool aed=false );\nvoid HessenbergSchur\n( int n, dcomplex* H, const int* desch, dcomplex* w, bool fullTriangle=false,\n  bool aed=false );\n\nvoid HessenbergSchur\n( int n, float* H, const int* desch, scomplex* w, \n  float* Q, const int* descq, bool fullTriangle=true, bool multiplyQ=false,\n  bool aed=false );\nvoid HessenbergSchur\n( int n, double* H, const int* desch, dcomplex* w, \n  double* Q, const int* descq, bool fullTriangle=true, bool multiplyQ=false,\n  bool aed=false );\nvoid HessenbergSchur\n( int n, scomplex* H, const int* desch, scomplex* w, \n  scomplex* Q, const int* descq, bool fullTriangle=true, bool multiplyQ=false,\n  bool aed=false );\nvoid HessenbergSchur\n( int n, dcomplex* H, const int* desch, dcomplex* w, \n  dcomplex* Q, const int* descq, bool fullTriangle=true, bool multiplyQ=false,\n  bool aed=false );\n\n// Hessenberg eigenvalues/pairs\n// ============================\n\nvoid HessenbergEig( int n, float* H, const int* desch, scomplex* w );\nvoid HessenbergEig( int n, double* H, const int* desch, dcomplex* w );\nvoid HessenbergEig( int n, scomplex* H, const int* desch, scomplex* w );\nvoid HessenbergEig( int n, dcomplex* H, const int* desch, dcomplex* w );\n\n// TODO: Compute the eigenvectors\n\n} // namespace scalapack\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_SCALAPACK\n\n#endif // ifndef ELEM_IMPORTS_SCALAPACK_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/indexing/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INDEXING_DECL_HPP\n#define ELEM_INDEXING_DECL_HPP\n\nnamespace elem {\n\n// Indexing for element-wise distributions\n// =======================================\nInt Length( Int n, Int rank, Int firstRank, Int numProcs );\nInt Length_( Int n, Int rank, Int firstRank, Int numProcs );\n\nInt Length( Int n, Int shift, Int numProcs );\nInt Length_( Int n, Int shift, Int numProcs );\n\nInt MaxLength( Int n, Int numProcs );\nInt MaxLength_( Int n, Int numProcs );\n\nInt GlobalIndex( Int iLoc, Int shift, Int numProcs );\nInt LocalOffset( Int i,    Int shift, Int numProcs );\n\n// Indexing for block distributions\n// ================================\nInt BlockedLength\n( Int n, Int rank, Int firstRank, Int bsize, Int cut, Int numProcs );\nInt BlockedLength_\n( Int n, Int rank, Int firstRank, Int bsize, Int cut, Int numProcs );\n\nInt BlockedLength ( Int n, Int shift, Int bsize, Int cut, Int numProcs );\nInt BlockedLength_( Int n, Int shift, Int bsize, Int cut, Int numProcs );\n\nInt MaxBlockedLength ( Int n, Int bsize, Int cut, Int numProcs );\nInt MaxBlockedLength_( Int n, Int bsize, Int cut, Int numProcs );\n\nInt GlobalBlockedIndex( Int iLoc, Int shift, Int bsize, Int cut, Int numProcs );\nInt LocalBlockedOffset( Int i,    Int shift, Int bsize, Int cut, Int numProcs );\n\n// Miscellaneous indexing routines\n// ===============================\n\n// Generalization of \"%\" operator which handles negative a in a way which\n// still returns a result in [0,b). Note that b is assumed to be non-negative.\nInt Mod( Int a, Int b );\nInt Mod_( Int a, Int b );\n\nInt Shift( Int rank, Int firstRank, Int numProcs );\nInt Shift_( Int rank, Int firstRank, Int numProcs );\n\nInt LastOffset( Int n, Int bsize );\n\nInt DiagonalLength( Int height, Int width, Int offset=0 );\n\nInt GCD( Int a, Int b ); \nInt GCD_( Int a, Int b ); \n\nUnsigned Log2( Unsigned n );\nbool PowerOfTwo( Unsigned n );\n\n} // namespace elem\n\n#endif // ifndef ELEM_INDEXING_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/indexing/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INDEXING_IMPL_HPP\n#define ELEM_INDEXING_IMPL_HPP\n\nnamespace elem {\n\n// Indexing for element-wise distributions\n// =======================================\n\ninline Int Length( Int n, Int shift, Int stride )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Length\");\n        if( n < 0 )\n            LogicError(\"n must be non-negative\");\n        if( shift < 0 || shift >= stride )\n            LogicError(\"Invalid shift: shift=\",shift,\", stride=\",stride);\n        if( stride <= 0 )\n            LogicError(\"Modulus must be positive\");\n    )\n    return Length_( n, shift, stride );\n}\n\ninline Int Length_( Int n, Int shift, Int stride )\n{\n    return ( n > shift ? (n - shift - 1)/stride + 1 : 0 );\n}\n\ninline Int\nLength( Int n, Int rank, Int align, Int stride )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Length\"))\n    const Int shift = Shift( rank, align, stride );\n    return Length( n, shift, stride );\n}\n\ninline Int Length_\n( Int n, Int rank, Int align, Int stride )\n{\n    const Int shift = Shift_( rank, align, stride );\n    return Length_( n, shift, stride );\n}\n\ninline Int MaxLength( Int n, Int stride )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"MaxLength\");\n        if( n < 0 )\n            LogicError(\"n must be non-negative\");\n        if( stride <= 0 )\n            LogicError(\"Modulus must be positive\");\n    )\n    return MaxLength_( n, stride );\n}\n\ninline Int MaxLength_( Int n, Int stride )\n{ return ( n>0 ? (n-1)/stride + 1 : 0 ); }\n\ninline Int GlobalIndex( Int iLoc, Int shift, Int numProcs )\n{ return shift + iLoc*numProcs; }\n\n// Indexing for block distributions\n// ================================\n\ninline Int BlockedLength( Int n, Int shift, Int bsize, Int cut, Int stride )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"BlockedLength\");\n        if( n < 0 )\n            LogicError(\"n must be non-negative\");\n        if( shift < 0 || shift >= stride )\n            LogicError(\"Invalid shift: shift=\",shift,\", stride=\",stride);\n        if( stride <= 0 )\n            LogicError(\"Modulus must be positive\");\n        // TODO: bsize and cut checks\n    )\n    return BlockedLength_( n, shift, bsize, cut, stride );\n}\n\ninline Int BlockedLength_( Int n, Int shift, Int bsize, Int cut, Int stride )\n{\n    Int length=0;\n\n    // Handle the first block\n    // ======================\n    const Int firstLeftover = Min(n,bsize-cut);\n    if( shift == 0 )\n        length += firstLeftover;\n    n -= firstLeftover;\n    // Cycle each process's first block left one\n    shift = Mod(shift-1,stride);\n\n    // Handle the middle blocks\n    // ========================\n    const Int nBlock = n/bsize;\n    const Int lengthBlock = Length_( nBlock, shift, stride );\n    length += lengthBlock*bsize;\n    n -= nBlock*bsize;\n    // Cycle each process's first block left by nBlock\n    shift = Mod(shift-nBlock,stride);\n\n    // Handle the (possibly empty) last block\n    // ======================================\n    if( shift == 0 )\n        length += n;\n\n    return length;\n}\n\ninline Int\nBlockedLength( Int n, Int rank, Int align, Int bsize, Int cut, Int stride )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BlockedLength\"))\n    const Int shift = Shift( rank, align, stride );\n    return BlockedLength( n, shift, bsize, cut, stride );\n}\n\ninline Int BlockedLength_\n( Int n, Int rank, Int align, Int bsize, Int cut, Int stride )\n{\n    const Int shift = Shift_( rank, align, stride );\n    return BlockedLength_( n, shift, bsize, cut, stride );\n}\n\ninline Int MaxBlockedLength( Int n, Int bsize, Int cut, Int stride )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"MaxBlockedLength\");\n        if( n < 0 )\n            LogicError(\"n must be non-negative\");\n        if( stride <= 0 )\n            LogicError(\"Modulus must be positive\");\n    )\n    return MaxBlockedLength_( n, bsize, cut, stride );\n}\n\ninline Int MaxBlockedLength_( Int n, Int bsize, Int cut, Int stride )\n{ return BlockedLength_( n, 0, bsize, cut, stride ); }\n\ninline Int \nGlobalBlockedIndex( Int iLoc, Int shift, Int bsize, Int cut, Int numProcs )\n{ \n    // The number of global entries before the first block this process owns\n    // data in begins (NOTE: this is negative if we own the first block and\n    // the cut is nonzero)\n    const Int iBefore = shift*bsize - cut;\n\n    const Int iLocAdj = ( shift==0 ? iLoc+cut : iLoc );\n    const Int numFilledLocalBlocks = iLocAdj / bsize;\n    const Int iMid = numFilledLocalBlocks*bsize*numProcs;\n\n    const Int iPost = iLocAdj-numFilledLocalBlocks*bsize;\n\n    return iBefore + iMid + iPost;\n}\n\n// Miscellaneous indexing routines\n// ===============================\n\ninline Int Mod( Int a, Int b )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Mod\");\n        if( b <= 0 )\n            LogicError(\"b is assumed to be positive\");\n    )\n    return Mod_( a, b );\n}\n\ninline Int Mod_( Int a, Int b )\n{\n    const Int rem = a % b;\n    return ( rem >= 0 ? rem : rem+b );\n}\n\n// For determining the first index assigned to a given rank\ninline Int Shift( Int rank, Int align, Int stride )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Shift\");\n        if( rank < 0 || rank >= stride )\n            LogicError(\"Invalid rank: rank=\",rank,\", stride=\",stride);\n        if( align < 0 || align >= stride )\n            LogicError(\"Invalid alignment: align=\",align,\", stride=\",stride);\n        if( stride <= 0 )\n            LogicError(\"Stride must be positive\");\n    )\n    return Shift_( rank, align, stride );\n}\n\ninline Int Shift_( Int rank, Int align, Int stride )\n{ return Mod(rank-align,stride); }\n\n\ninline Int LastOffset( Int n, Int bsize )\n{ return bsize*( Mod(n,bsize) ? n/bsize : (n/bsize)-1 ); }\n\ninline Int\nDiagonalLength( Int height, Int width, Int offset )\n{\n    if( offset > 0 )\n    {\n        const Int remWidth = Max(width-offset,0);\n        return Min(height,remWidth);\n    }\n    else\n    {\n        const Int remHeight = Max(height+offset,0);\n        return Min(remHeight,width);\n    }\n}\n\ninline Int GCD( Int a, Int b )\n{\n    DEBUG_ONLY(\n        if( a < 0 || b < 0 )\n            LogicError(\"GCD called with negative argument\");\n    )\n    return GCD_( a, b );\n}\n\ninline Int GCD_( Int a, Int b )\n{\n    if( b == 0 )\n        return a;\n    else\n        return GCD_( b, a-b*(a/b) );\n}\n\ninline bool PowerOfTwo( Unsigned n )\n{ return n && !(n & (n-1)); }\n\ninline Unsigned Log2( Unsigned n )\n{\n    Unsigned result = 0;\n    for( Unsigned powerOfTwo=4u*sizeof(Unsigned); powerOfTwo!=0; powerOfTwo/=2 )\n    {\n        if( n >= (1u<<powerOfTwo) )\n        {\n            n >>= powerOfTwo;\n            result += powerOfTwo;\n        }\n    }\n    return result;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_INDEXING_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/random/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_RANDOM_DECL_HPP\n#define ELEM_RANDOM_DECL_HPP\n\nnamespace elem {\n\nconst double Pi = 3.141592653589793;\n\nbool BooleanCoinFlip();\nInt CoinFlip();\n\ntemplate<typename T>\nT UnitCell();\n\ntemplate<typename T=double>\nT SampleUniform( T a=0, T b=UnitCell<T>() );\n\ntemplate<>\nInt SampleUniform<Int>( Int a, Int b );\n\n// The complex extension of the normal distribution can actually be quite\n// technical, and so we will use the simplest case, where both the real and\n// imaginary components are independently drawn with the same standard \n// deviation, but different means.\ntemplate<typename T=double>\nT SampleNormal( T mean=0, Base<T> stddev=1 );\n\n// Generate a sample from a uniform PDF over the (closed) unit ball about the \n// origin of the ring implied by the type T using the most natural metric.\ntemplate<typename T> \nT SampleBall( T center=0, Base<T> radius=1 );\n\n} // namespace elem\n\n#endif // ifndef ELEM_RANDOM_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/random/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_RANDOM_IMPL_HPP\n#define ELEM_RANDOM_IMPL_HPP\n\nnamespace elem {\n\ninline bool BooleanCoinFlip()\n{ return SampleUniform<double>(0,1) >= 0.5; }\n\ninline Int CoinFlip()\n{ return ( BooleanCoinFlip() ? 1 : -1 ); }\n\ntemplate<typename T>\ninline T UnitCell()\n{\n    typedef Base<T> Real;\n    T cell;\n    SetRealPart( cell, Real(1) );\n    if( IsComplex<T>::val )\n        SetImagPart( cell, Real(1) );\n    return cell;\n}\n\ntemplate<typename T>\ninline T SampleUniform( T a, T b )\n{\n    typedef Base<T> Real;\n    T sample;\n\n#ifdef ELEM_HAVE_CXX11RANDOM\n    std::mt19937& gen = Generator();\n    std::uniform_real_distribution<Real> realUni(RealPart(a),RealPart(b));\n    SetRealPart( sample, realUni(gen) ); \n    if( IsComplex<T>::val )\n    {\n        std::uniform_real_distribution<Real> imagUni(ImagPart(a),ImagPart(b));\n        SetImagPart( sample, imagUni(gen) );\n    }\n#else\n    Real aReal = RealPart(a);\n    Real aImag = ImagPart(a);\n    Real bReal = RealPart(b);\n    Real bImag = ImagPart(b);\n    Real realPart = (Real(rand())/(Real(RAND_MAX)+1))*(bReal-aReal) + aReal;\n    SetRealPart( sample, realPart );\n    if( IsComplex<T>::val )\n    {\n        Real imagPart = (Real(rand())/(Real(RAND_MAX)+1))*(bImag-aImag) + aImag;\n        SetImagPart( sample, imagPart );\n    }\n#endif\n\n    return sample;\n}\n\ntemplate<>\ninline Int SampleUniform<Int>( Int a, Int b )\n{\n#ifdef ELEM_HAVE_CXX11RANDOM\n    std::mt19937& gen = Generator();\n    std::uniform_int_distribution<Int> intDist(a,b-1); \n    return intDist(gen);\n#else\n    return a + (rand() % (b-a));\n#endif\n}\n\ntemplate<typename F>\ninline F SampleNormal( F mean, Base<F> stddev )\n{\n    typedef Base<F> Real;\n    F sample;\n\n#ifdef ELEM_HAVE_CXX11RANDOM\n    std::mt19937& gen = Generator();\n    if( IsComplex<F>::val )\n        stddev = stddev / Sqrt(Real(2));\n    std::normal_distribution<Real> realNormal( RealPart(mean), stddev );\n    SetRealPart( sample, realNormal(gen) );\n    if( IsComplex<F>::val )\n    {\n        std::normal_distribution<Real> imagNormal( ImagPart(mean), stddev );\n        SetImagPart( sample, imagNormal(gen) );\n    }\n#else\n    // Run Marsiglia's polar method\n    // ============================\n    // NOTE: Half of the generated samples are thrown away in the case that\n    //       F is real.\n    while( true )\n    {\n        const Real U = SampleUniform<Real>(-1,1);\n        const Real V = SampleUniform<Real>(-1,1);\n        const Real S = Sqrt(U*U+V*V);\n        if( S > 0 && S < 1)\n        {\n            const Real W = Sqrt(-2*Log(S)/S);\n            SetRealPart( sample, RealPart(mean) + stddev*U*W );\n            if( IsComplex<F>::val )\n                SetImagPart( sample, ImagPart(mean) + stddev*V*W );\n            break;\n        }\n    }\n#endif\n\n    return sample;\n}\n\ntemplate<>\ninline float\nSampleBall<float>( float center, float radius )\n{ return SampleUniform<float>(center-radius/2,center+radius/2); }\n\ntemplate<>\ninline double\nSampleBall<double>( double center, double radius )\n{ return SampleUniform<double>(center-radius/2,center+radius/2); }\n\ntemplate<>\ninline Complex<float>\nSampleBall<Complex<float>>( Complex<float> center, float radius )\n{\n    const float r = SampleUniform<float>(0,radius);\n    const float angle = SampleUniform<float>(0.f,float(2*Pi));\n    return center + Complex<float>(r*cos(angle),r*sin(angle));\n}\n\ntemplate<>\ninline Complex<double>\nSampleBall<Complex<double>>( Complex<double> center, double radius )\n{\n    const double r = SampleUniform<double>(0,radius);\n    const double angle = SampleUniform<double>(0.,2*Pi);\n    return center + Complex<double>(r*cos(angle),r*sin(angle));\n}\n\n// I'm not certain if there is any good way to define this\ntemplate<>\ninline Int\nSampleBall<Int>( Int center, Int radius )\n{\n    const double u = SampleBall<double>( center, radius );\n    return round(u);\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_RANDOM_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/types/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TYPES_DECL_HPP\n#define ELEM_TYPES_DECL_HPP\n\nnamespace elem {\n\ntypedef unsigned char byte;\n\n// If these are changes, you must make sure that they have \n// existing MPI datatypes. This is only sometimes true for 'long long'\n#ifdef ELEM_USE_64BIT_INTS\ntypedef long long int Int;\ntypedef long long unsigned Unsigned;\n#else\ntypedef int Int;\ntypedef unsigned Unsigned;\n#endif\n \ntypedef Complex<float>  scomplex; \ntypedef Complex<double> dcomplex;\n\ntemplate<typename Real>\nstruct ValueInt\n{\n    Real value;\n    Int index;\n\n    static bool Lesser( const ValueInt<Real>& a, const ValueInt<Real>& b )\n    { return a.value < b.value; }\n    static bool Greater( const ValueInt<Real>& a, const ValueInt<Real>& b )\n    { return a.value > b.value; }\n};\n\ntemplate<typename Real>\nstruct ValueInt<Complex<Real>>\n{\n    Complex<Real> value;\n    Int index;\n\n    static bool Lesser( const ValueInt<Real>& a, const ValueInt<Real>& b )\n    { return Abs(a.value) < Abs(b.value); }\n    static bool Greater( const ValueInt<Real>& a, const ValueInt<Real>& b )\n    { return Abs(a.value) > Abs(b.value); }\n};\n\ntemplate<typename Real>\nstruct ValueIntPair\n{\n    Real value;\n    Int indices[2];\n    \n    static bool Lesser( const ValueInt<Real>& a, const ValueInt<Real>& b )\n    { return a.value < b.value; }\n    static bool Greater( const ValueInt<Real>& a, const ValueInt<Real>& b )\n    { return a.value > b.value; }\n};\n\ntemplate<typename Real>\nstruct ValueIntPair<Complex<Real>>\n{\n    Complex<Real> value;\n    Int indices[2];\n    \n    static bool Lesser\n    ( const ValueIntPair<Real>& a, const ValueIntPair<Real>& b )\n    { return Abs(a.value) < Abs(b.value); }\n    static bool Greater\n    ( const ValueIntPair<Real>& a, const ValueIntPair<Real>& b )\n    { return Abs(a.value) > Abs(b.value); }\n};\n\n// For the safe computation of products. The result is given by \n//   product = rho * exp(kappa*n)\n// where rho lies in (usually on) the unit circle and kappa is real-valued.\ntemplate<typename F>\nstruct SafeProduct\n{\n    F rho;\n    Base<F> kappa;\n    Int n;\n\n    SafeProduct( Int numEntries );\n};\n\n// The basic eigenvalue structure of a Hermitian matrix\nstruct InertiaType\n{\n    Int numPositive, numNegative, numZero;\n};\n\n// At some point this enum will be a member of each matrix class and will\n// be used to simplify the syntax of various operations\nnamespace MatrixClassNS {\nenum MatrixClass\n{\n    UNSPECIFIED,\n    GENERAL,\n    HERMITIAN,\n    HERMITIAN_LOWER,\n    HERMITIAN_UPPER, \n    SYMMETRIC,\n    SYMMETRIC_LOWER,\n    SYMMETRIC_UPPER,\n    SKEW_SYMMETRIC,\n    SKEW_SYMMETRIC_LOWER,\n    SKEW_SYMMETRIC_UPPER,\n    UNITARY,\n    TRIANGULAR_LOWER,\n    TRIANGULAR_LOWER_UNIT,\n    TRIANGULAR_UPPER,\n    TRIANGULAR_UPPER_UNIT,\n    HESSENBERG_LOWER,\n    HESSENBERG_UPPER,\n    PERMUTATION,\n    PERMUTATION_VECTOR,\n    PIVOT_SEQUENCE,\n    // Packed factorizations/decompositions\n    LU_PACKED,\n    QR_PACKED,\n    RQ_PACKED,\n    LQ_PACKED,\n    QL_PACKED,\n    BIDIAG_PACKED,\n    TRIDIAG_LOWER_PACKED,\n    TRIDIAG_UPPER_PACKED,\n    HESSENBERG_LOWER_PACKED,\n    HESSENBERG_UPPER_PACKED\n};\n}\nusing namespace MatrixClassNS;\n\nnamespace ConjugationNS {\nenum Conjugation\n{\n    UNCONJUGATED,\n    CONJUGATED\n};\n}\nusing namespace ConjugationNS;\n\nnamespace DistNS {\nenum Dist\n{\n    MC,   // Col of a matrix distribution\n    MD,   // Diagonal of a matrix distribution\n    MR,   // Row of a matrix distribution\n    VC,   // Col-major vector distribution\n    VR,   // Row-major vector distribution\n    STAR, // Give to every process\n    CIRC  // Give to a single process\n};\nstd::string DistToString( Dist distribution );\nDist StringToDist( std::string s );\n}\nusing namespace DistNS;\ntypedef Dist Distribution;\n\ntemplate<Dist U,Dist V>\nconstexpr Dist DiagColDist() { return ( U==STAR ? V : U ); }\ntemplate<Dist U,Dist V>\nconstexpr Dist DiagRowDist() { return ( U==STAR ? U : V ); }\n\ntemplate<> constexpr Dist DiagColDist<MC,MR>() { return MD; }\ntemplate<> constexpr Dist DiagRowDist<MC,MR>() { return STAR; }\ntemplate<> constexpr Dist DiagColDist<MR,MC>() { return MD; }\ntemplate<> constexpr Dist DiagRowDist<MR,MC>() { return STAR; }\n\ntemplate<Dist U,Dist V>\nconstexpr Dist DiagInvColDist() { return ( U==STAR ? V : U ); }\ntemplate<Dist U,Dist V>\nconstexpr Dist DiagInvRowDist() { return ( U==STAR ? U : V ); }\n\ntemplate<> constexpr Dist DiagInvColDist<MD,STAR>() { return MC; }\ntemplate<> constexpr Dist DiagInvRowDist<MD,STAR>() { return MR; }\ntemplate<> constexpr Dist DiagInvColDist<STAR,MD>() { return MC; }\ntemplate<> constexpr Dist DiagInvRowDist<STAR,MD>() { return MR; }\n\ntemplate<Dist U> \nconstexpr Dist GatheredDist() { return ( U==CIRC ? CIRC : STAR ); }\n\ntemplate<Dist U> constexpr Dist PartialDist() { return U; }\ntemplate<> constexpr Dist PartialDist<VC>() { return MC; }\ntemplate<> constexpr Dist PartialDist<VR>() { return MR; }\n\ntemplate<Dist U,Dist V> constexpr Dist ScatteredRowDist() { return V; }\ntemplate<> constexpr Dist ScatteredRowDist<VC,STAR>() { return MR; }\ntemplate<> constexpr Dist ScatteredRowDist<VR,STAR>() { return MC; }\n\ntemplate<Dist U,Dist V> constexpr Dist ScatteredColDist() \n{ return ScatteredRowDist<V,U>(); }\n\nnamespace ViewTypeNS {\nenum ViewType\n{\n    OWNER = 0x0,\n    VIEW = 0x1,\n    OWNER_FIXED = 0x2,\n    VIEW_FIXED = 0x3,\n    LOCKED_OWNER = 0x4, // unused\n    LOCKED_VIEW = 0x5,\n    LOCKED_OWNER_FIXED = 0x6, // unused\n    LOCKED_VIEW_FIXED = 0x7\n};\nstatic inline bool IsViewing( ViewType v )\n{ return ( v & VIEW ) != 0; }\nstatic inline bool IsFixedSize( ViewType v )\n{ return ( v & OWNER_FIXED ) != 0; }\nstatic inline bool IsLocked( ViewType v )\n{ return ( v & LOCKED_OWNER ) != 0; }\n}\nusing namespace ViewTypeNS;\n\nnamespace ForwardOrBackwardNS {\nenum ForwardOrBackward\n{\n    FORWARD,\n    BACKWARD\n};\n}\nusing namespace ForwardOrBackwardNS;\n\nnamespace GridOrderNS {\nenum GridOrder\n{\n    ROW_MAJOR,\n    COLUMN_MAJOR\n};\n}\nusing namespace GridOrderNS;\n\nnamespace LeftOrRightNS {\nenum LeftOrRight\n{\n    LEFT,\n    RIGHT\n};\nchar LeftOrRightToChar( LeftOrRight side );\nLeftOrRight CharToLeftOrRight( char c );\n}\nusing namespace LeftOrRightNS;\n\nnamespace SortTypeNS {\nenum SortType\n{\n    UNSORTED,\n    DESCENDING,\n    ASCENDING\n};\n}\nusing namespace SortTypeNS;\n\nnamespace NormTypeNS {\nenum NormType\n{\n    ONE_NORM,           // Operator one norm\n    INFINITY_NORM,      // Operator infinity norm\n    ENTRYWISE_ONE_NORM, // One-norm of vectorized matrix\n    MAX_NORM,           // Maximum entry-wise magnitude\n    NUCLEAR_NORM,       // One-norm of the singular values\n    FROBENIUS_NORM,     // Two-norm of the singular values\n    TWO_NORM            // Infinity-norm of the singular values\n};\n}\nusing namespace NormTypeNS;\n\nnamespace OrientationNS {\nenum Orientation\n{\n    NORMAL,\n    TRANSPOSE,\n    ADJOINT\n};\nchar OrientationToChar( Orientation orientation );\nOrientation CharToOrientation( char c );\n}\nusing namespace OrientationNS;\n\nnamespace UnitOrNonUnitNS {\nenum UnitOrNonUnit\n{\n    NON_UNIT,\n    UNIT\n};\nchar UnitOrNonUnitToChar( UnitOrNonUnit diag );\nUnitOrNonUnit CharToUnitOrNonUnit( char c );\n}\nusing namespace UnitOrNonUnitNS;\n\nnamespace UpperOrLowerNS {\nenum UpperOrLower\n{\n    LOWER,\n    UPPER\n};\nchar UpperOrLowerToChar( UpperOrLower uplo );\nUpperOrLower CharToUpperOrLower( char c );\n}\nusing namespace UpperOrLowerNS;\n\nnamespace VerticalOrHorizontalNS {\nenum VerticalOrHorizontal\n{\n    VERTICAL,\n    HORIZONTAL\n};\n}\nusing namespace VerticalOrHorizontalNS;\n\n} // namespace elem\n\n#endif // ifndef ELEM_TYPES_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/types/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TYPES_IMPL_HPP\n#define ELEM_TYPES_IMPL_HPP\n\nnamespace elem {\n\ntemplate<typename F>\ninline\nSafeProduct<F>::SafeProduct( Int numEntries )\n: rho(1), kappa(0), n(numEntries)\n{ }\n\nnamespace DistNS {\n\ninline std::string \nDistToString( Dist dist )\n{\n    std::string distString;\n    switch( dist )\n    {\n        case MC: distString = \"MC\"; break;\n        case MD: distString = \"MD\"; break;\n        case MR: distString = \"MR\"; break;\n        case VC: distString = \"VC\"; break;\n        case VR: distString = \"VR\"; break;\n        default: distString = \"* \"; break;\n    }\n    return distString;\n}\n\ninline Dist \nStringToDist( std::string s )\n{\n    // Most compilers' logic for detecting potentially uninitialized variables\n    // is horrendously bad.\n    Dist dist=MC;\n    if( s == \"MC\" )\n        dist = MC;\n    else if( s == \"MD\" )\n        dist = MD;\n    else if( s == \"MR\" )\n        dist = MR;\n    else if( s == \"VC\" )\n        dist = VC;\n    else if( s == \"VR\" )\n        dist = VR;\n    else if( s == \"* \" || s == \" *\" || s == \"*\" )\n        dist = STAR;\n    else\n        LogicError\n        (\"StringToDist expects string in \"\n         \"{\\\"MC\\\",\\\"MD\\\",\\\"MR\\\",\\\"VC\\\",\\\"VR\\\",\\\"* \\\",\\\" *\\\",\\\"*\\\"}\");\n    return dist;\n}\n\n} // namespace DistNS\n\nnamespace LeftOrRightNS {\n\ninline char \nLeftOrRightToChar( LeftOrRight side )\n{\n    char sideChar;\n    switch( side )\n    {\n        case LEFT:  sideChar = 'L'; break;\n        default:    sideChar = 'R'; break;\n    }\n    return sideChar;\n}\n    \ninline LeftOrRight \nCharToLeftOrRight( char c )\n{\n    // Most compilers' logic for detecting potentially uninitialized variables\n    // is horrendously bad.\n    LeftOrRight side=LEFT;\n    switch( c )\n    {\n        case 'L': side = LEFT;  break;\n        case 'R': side = RIGHT; break;\n        default:\n            LogicError(\"CharToLeftOrRight expects char in {L,R}\");\n    }\n    return side;\n}\n\n} // namespace LeftOrRightNS\n\nnamespace OrientationNS {\n\ninline char \nOrientationToChar( Orientation orientation )\n{\n    char orientationChar;\n    switch( orientation )\n    {\n        case NORMAL:    orientationChar = 'N'; break;\n        case TRANSPOSE: orientationChar = 'T'; break;\n        default:        orientationChar = 'C'; break;\n    }\n    return orientationChar;\n}\n\ninline Orientation \nCharToOrientation( char c )\n{\n    // Most compilers' logic for detecting potentially uninitialized variables\n    // is horrendously bad.\n    Orientation orientation=NORMAL;\n    switch( c )\n    {\n        case 'N': orientation = NORMAL;    break;\n        case 'T': orientation = TRANSPOSE; break;\n        case 'C': orientation = ADJOINT;   break;\n        default:\n            LogicError\n            (\"CharToOrientation expects char in {N,T,C}\");\n    }\n    return orientation;\n}\n\n} // namespace OrientationNS\n\nnamespace UnitOrNonUnitNS {\n\ninline char \nUnitOrNonUnitToChar( UnitOrNonUnit diag )\n{\n    char diagChar;\n    switch( diag )\n    {\n        case NON_UNIT: diagChar = 'N'; break;\n        default:       diagChar = 'U'; break;\n    }\n    return diagChar;\n}\n\ninline UnitOrNonUnit \nCharToUnitOrNonUnit( char c )\n{\n    // Most compilers' logic for detecting potentially uninitialized variables\n    // is horrendously bad.\n    UnitOrNonUnit diag=NON_UNIT;\n    switch( c )\n    {\n        case 'N': diag = NON_UNIT; break;\n        case 'U': diag = UNIT;     break;\n        default:\n            LogicError(\"CharToUnitOrNonUnit expects char in {N,U}\");\n    }\n    return diag;\n}\n\n} // namespace UnitOrNonUnitNS\n\nnamespace UpperOrLowerNS {\n\ninline char \nUpperOrLowerToChar( UpperOrLower uplo )\n{\n    char uploChar;\n    switch( uplo )\n    {\n        case LOWER: uploChar = 'L'; break;\n        default:    uploChar = 'U'; break;\n    }\n    return uploChar;\n}\n\ninline UpperOrLower \nCharToUpperOrLower( char c )\n{\n    // Most compilers' logic for detecting potentially uninitialized variables\n    // is horrendously bad.\n    UpperOrLower uplo=LOWER;\n    switch( c )\n    {\n        case 'L': uplo = LOWER; break;\n        case 'U': uplo = UPPER; break;\n        default:\n            LogicError(\"CharToUpperOrLower expects char in {L,U}\");\n    }\n    return uplo;\n}\n\n} // namespace UpperOrLowerNS\n\n} // namespace elem\n\n#endif // ifndef ELEM_TYPES_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/views/Partition.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_VIEWS_PARTITION_HPP\n#define ELEM_VIEWS_PARTITION_HPP\n\n#include \"./View.hpp\"\n\nnamespace elem {\n\n// To make our life easier. Undef'd at the bottom of the header\n#define M  Matrix<T>\n#define DM DistMatrix<T,U,V>\n\n// Partition downwards from the top\n// ================================\n\ntemplate<typename T>\ninline void\nPartitionDown\n( M& A, M& AT,\n        M& AB, Int heightAT=Blocksize() ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionDown\"))\n    heightAT = Max(Min(heightAT,A.Height()),0);\n    const Int heightAB = A.Height()-heightAT;\n    View( AT, A, 0,        0, heightAT, A.Width() );\n    View( AB, A, heightAT, 0, heightAB, A.Width() );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nPartitionDown\n( DM& A, DM& AT,\n         DM& AB, Int heightAT=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionDown\"))\n    heightAT = Max(Min(heightAT,A.Height()),0);\n    const Int heightAB = A.Height()-heightAT;\n    View( AT, A, 0,        0, heightAT, A.Width() );\n    View( AB, A, heightAT, 0, heightAB, A.Width() );\n}\n\ntemplate<typename T>\ninline void\nLockedPartitionDown\n( const M& A, M& AT,\n              M& AB, Int heightAT=Blocksize() ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionDown\"))\n    heightAT = Max(Min(heightAT,A.Height()),0);\n    const Int heightAB = A.Height()-heightAT;\n    LockedView( AT, A, 0,        0, heightAT, A.Width() );\n    LockedView( AB, A, heightAT, 0, heightAB, A.Width() );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nLockedPartitionDown\n( const DM& A, DM& AT,\n               DM& AB, Int heightAT=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionDown\"))\n    heightAT = Max(Min(heightAT,A.Height()),0);\n    const Int heightAB = A.Height()-heightAT;\n    LockedView( AT, A, 0,        0, heightAT, A.Width() );\n    LockedView( AB, A, heightAT, 0, heightAB, A.Width() );\n}\n\n// Partition upwards from the bottom\n// =================================\n\ntemplate<typename T>\ninline void\nPartitionUp\n( M& A, M& AT,\n        M& AB, Int heightAB=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionUp\"))\n    PartitionDown( A, AT, AB, A.Height()-heightAB );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nPartitionUp\n( DM& A, DM& AT,\n         DM& AB, Int heightAB=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionUp\"))\n    PartitionDown( A, AT, AB, A.Height()-heightAB );\n}\n\ntemplate<typename T>\ninline void\nLockedPartitionUp\n( const M& A, M& AT,\n              M& AB, Int heightAB=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionUp\"))\n    LockedPartitionDown( A, AT, AB, A.Height()-heightAB );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nLockedPartitionUp\n( const DM& A, DM& AT,\n               DM& AB, Int heightAB=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionUp\"))\n    LockedPartitionDown( A, AT, AB, A.Height()-heightAB );\n}\n\n// Partition rightwards from the left\n// ==================================\n\ntemplate<typename T>\ninline void\nPartitionRight( M& A, M& AL, M& AR, Int widthAL=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionRight\"))\n    widthAL = Max(Min(widthAL,A.Width()),0);\n    const Int widthAR = A.Width()-widthAL;\n    View( AL, A, 0, 0,       A.Height(), widthAL );\n    View( AR, A, 0, widthAL, A.Height(), widthAR );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nPartitionRight( DM& A, DM& AL, DM& AR, Int widthAL=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionRight\"))\n    widthAL = Max(Min(widthAL,A.Width()),0);\n    const Int widthAR = A.Width()-widthAL;\n    View( AL, A, 0, 0,       A.Height(), widthAL );\n    View( AR, A, 0, widthAL, A.Height(), widthAR );\n}\n\ntemplate<typename T>\ninline void\nLockedPartitionRight( const M& A, M& AL, M& AR, Int widthAL=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionRight\"))\n    widthAL = Max(Min(widthAL,A.Width()),0);\n    const Int widthAR = A.Width()-widthAL;\n    LockedView( AL, A, 0, 0,       A.Height(), widthAL );\n    LockedView( AR, A, 0, widthAL, A.Height(), widthAR );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nLockedPartitionRight( const DM& A, DM& AL, DM& AR, Int widthAL=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionRight\"))\n    widthAL = Max(Min(widthAL,A.Width()),0);\n    const Int widthAR = A.Width()-widthAL;\n    LockedView( AL, A, 0, 0,       A.Height(), widthAL );\n    LockedView( AR, A, 0, widthAL, A.Height(), widthAR );\n}\n\n// Partition leftwards from the right\n// ==================================\n\ntemplate<typename T>\ninline void\nPartitionLeft( M& A, M& AL, M& AR, Int widthAR=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionLeft\"))\n    PartitionRight( A, AL, AR, A.Width()-widthAR );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nPartitionLeft( DM& A, DM& AL, DM& AR, Int widthAR=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionLeft\"))\n    PartitionRight( A, AL, AR, A.Width()-widthAR );\n}\n\ntemplate<typename T>\ninline void\nLockedPartitionLeft( const M& A, M& AL, M& AR, Int widthAR=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionLeft\"))\n    LockedPartitionRight( A, AL, AR, A.Width()-widthAR );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nLockedPartitionLeft( const DM& A, DM& AL, DM& AR, Int widthAR=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionLeft\"))\n    LockedPartitionRight( A, AL, AR, A.Width()-widthAR );\n}\n\n// Partition downward on a particular diagonal\n// ===========================================\n\ntemplate<typename T>\ninline void\nPartitionDownOffsetDiagonal\n( Int offset,\n  M& A, M& ATL, M& ATR,\n        M& ABL, M& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionDownOffsetDiagonal\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int diagLength = A.DiagonalLength(offset);\n    diagDist = Max(Min(diagDist,diagLength),0);\n    \n    const Int mCut = ( offset<=0 ? -offset+diagDist : diagDist );\n    const Int nCut = ( offset<=0 ? diagDist : offset+diagDist );\n    View( ATL, A, 0,    0,    mCut,   nCut   );\n    View( ATR, A, 0,    nCut, mCut,   n-nCut );\n    View( ABL, A, mCut, 0,    m-mCut, nCut   );\n    View( ABR, A, mCut, nCut, m-mCut, n-nCut );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nPartitionDownOffsetDiagonal\n( Int offset,\n  DM& A, DM& ATL, DM& ATR,\n         DM& ABL, DM& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionDownOffsetDiagonal\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int diagLength = A.DiagonalLength(offset);\n    diagDist = Max(Min(diagDist,diagLength),0);\n\n    const Int mCut = ( offset<=0 ? -offset+diagDist : diagDist );\n    const Int nCut = ( offset<=0 ? diagDist : offset+diagDist );\n    View( ATL, A, 0,    0,    mCut,   nCut   );\n    View( ATR, A, 0,    nCut, mCut,   n-nCut );\n    View( ABL, A, mCut, 0,    m-mCut, nCut   );\n    View( ABR, A, mCut, nCut, m-mCut, n-nCut );\n}\n\ntemplate<typename T>\ninline void\nLockedPartitionDownOffsetDiagonal\n( Int offset,\n  const M& A, M& ATL, M& ATR,\n              M& ABL, M& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionDownOffsetDiagonal\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int diagLength = A.DiagonalLength(offset);\n    diagDist = Max(Min(diagDist,diagLength),0);\n    \n    const Int mCut = ( offset<=0 ? -offset+diagDist : diagDist );\n    const Int nCut = ( offset<=0 ? diagDist : offset+diagDist );\n    LockedView( ATL, A, 0,    0,    mCut,   nCut   );\n    LockedView( ATR, A, 0,    nCut, mCut,   n-nCut );\n    LockedView( ABL, A, mCut, 0,    m-mCut, nCut   );\n    LockedView( ABR, A, mCut, nCut, m-mCut, n-nCut );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nLockedPartitionDownOffsetDiagonal\n( Int offset,\n  const DM& A, DM& ATL, DM& ATR,\n               DM& ABL, DM& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionDownOffsetDiagonal\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int diagLength = A.DiagonalLength(offset);\n    diagDist = Max(Min(diagDist,diagLength),0);\n    \n    const Int mCut = ( offset<=0 ? -offset+diagDist : diagDist );\n    const Int nCut = ( offset<=0 ? diagDist : offset+diagDist );\n    LockedView( ATL, A, 0,    0,    mCut,   nCut   );\n    LockedView( ATR, A, 0,    nCut, mCut,   n-nCut );\n    LockedView( ABL, A, mCut, 0,    m-mCut, nCut   );\n    LockedView( ABR, A, mCut, nCut, m-mCut, n-nCut );\n}\n\n// Partition upwards on a particular diagonal\n// ==========================================\n\ntemplate<typename T>\ninline void\nPartitionUpOffsetDiagonal\n( Int offset,\n  M& A, M& ATL, M& ATR,\n        M& ABL, M& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionUpOffsetDiagonal\"))\n    PartitionDownOffsetDiagonal\n    ( offset, A, ATL, ATR, ABL, ABR, A.DiagonalLength(offset)-diagDist );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nPartitionUpOffsetDiagonal\n( Int offset,\n  DM& A, DM& ATL, DM& ATR,\n         DM& ABL, DM& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionUpOffsetDiagonal\"))\n    PartitionDownOffsetDiagonal\n    ( offset, A, ATL, ATR, ABL, ABR, A.DiagonalLength(offset)-diagDist );\n}\n\ntemplate<typename T>\ninline void\nLockedPartitionUpOffsetDiagonal\n( Int offset,\n  const M& A, M& ATL, M& ATR,\n              M& ABL, M& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionUpOffsetDiagonal\"))\n    LockedPartitionDownOffsetDiagonal\n    ( offset, A, ATL, ATR, ABL, ABR, A.DiagonalLength(offset)-diagDist );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nLockedPartitionUpOffsetDiagonal\n( Int offset,\n  const DM& A, DM& ATL, DM& ATR,\n               DM& ABL, DM& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionUpOffsetDiagonal\"))\n    LockedPartitionDownOffsetDiagonal\n    ( offset, A, ATL, ATR, ABL, ABR, A.DiagonalLength(offset)-diagDist );\n}\n\n// Partition downwards on the main diagonal\n// ========================================\n\ntemplate<typename T>\ninline void\nPartitionDownDiagonal\n( M& A, M& ATL, M& ATR,\n        M& ABL, M& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionDownDiagonal\"))\n    PartitionDownOffsetDiagonal( 0, A, ATL, ATR, ABL, ABR, diagDist );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nPartitionDownDiagonal\n( DM& A, DM& ATL, DM& ATR,\n         DM& ABL, DM& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionDownDiagonal\"))\n    PartitionDownOffsetDiagonal( 0, A, ATL, ATR, ABL, ABR, diagDist );\n}\n\ntemplate<typename T>\ninline void\nLockedPartitionDownDiagonal\n( const M& A, M& ATL, M& ATR,\n              M& ABL, M& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionDownDiagonal\"))\n    LockedPartitionDownOffsetDiagonal( 0, A, ATL, ATR, ABL, ABR, diagDist );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nLockedPartitionDownDiagonal\n( const DM& A, DM& ATL, DM& ATR,\n               DM& ABL, DM& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionDownDiagonal\"))\n    LockedPartitionDownOffsetDiagonal( 0, A, ATL, ATR, ABL, ABR, diagDist );\n}\n\n// Partition upwards on the main diagonal\n// ======================================\n\ntemplate<typename T>\ninline void\nPartitionUpDiagonal\n( M& A, M& ATL, M& ATR,\n        M& ABL, M& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionUpDiagonal\"))\n    PartitionUpOffsetDiagonal( 0, A, ATL, ATR, ABL, ABR, diagDist );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nPartitionUpDiagonal\n( DM& A, DM& ATL, DM& ATR,\n         DM& ABL, DM& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PartitionUpDiagonal\"))\n    PartitionUpOffsetDiagonal( 0, A, ATL, ATR, ABL, ABR, diagDist );\n}\n\ntemplate<typename T>\ninline void\nLockedPartitionUpDiagonal\n( const M& A, M& ATL, M& ATR,\n              M& ABL, M& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionUpDiagonal\"))\n    LockedPartitionUpOffsetDiagonal( 0, A, ATL, ATR, ABL, ABR, diagDist );\n}\n\ntemplate<typename T, Dist U, Dist V>\ninline void\nLockedPartitionUpDiagonal\n( const DM& A, DM& ATL, DM& ATR,\n               DM& ABL, DM& ABR, Int diagDist=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedPartitionUpDiagonal\"))\n    LockedPartitionUpOffsetDiagonal( 0, A, ATL, ATR, ABL, ABR, diagDist );\n}\n\n#undef DM\n#undef M\n\n} // namespace elem\n\n#endif // ifndef ELEM_VIEWS_PARTITION_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/views/Repartition.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_VIEWS_REPARTITION_HPP\n#define ELEM_VIEWS_REPARTITION_HPP\n\n#include \"./Partition.hpp\"\n\nnamespace elem {\n\n// To make our life easier. Undef'd at the bottom of the header\n#define M  Matrix<T>\n#define DM DistMatrix<T,U,V>\n\n// Repartition upwards from the bottom\n// ===================================\n\ntemplate<typename T>\ninline void\nRepartitionUp\n( M& AT, M& A0,\n         M& A1,\n  M& AB, M& A2, Int A1Height=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionUp\"))\n    PartitionUp( AT, A0, A1, A1Height );\n    View( A2, AB );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRepartitionUp\n( DM& AT, DM& A0,\n          DM& A1,\n  DM& AB, DM& A2, Int A1Height=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionUp\"))\n    PartitionUp( AT, A0, A1, A1Height );\n    View( A2, AB );\n}\n\ntemplate<typename T>\ninline void\nLockedRepartitionUp\n( const M& AT, M& A0,\n               M& A1,\n  const M& AB, M& A2, Int A1Height=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionUp\"))\n    LockedPartitionUp( AT, A0, A1, A1Height );\n    LockedView( A2, AB );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nLockedRepartitionUp\n( const DM& AT, DM& A0,\n                DM& A1,\n  const DM& AB, DM& A2, Int A1Height=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionUp\"))\n    LockedPartitionUp( AT, A0, A1, A1Height );\n    LockedView( A2, AB );\n}\n\n// Repartition downwards from the top\n// ==================================\n\ntemplate<typename T>\ninline void\nRepartitionDown\n( M& AT, M& A0,\n         M& A1,\n  M& AB, M& A2, Int A1Height=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionDown\"))\n    View( A0, AT );\n    PartitionDown( AB, A1, A2, A1Height );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRepartitionDown\n( DM& AT, DM& A0,\n          DM& A1,\n  DM& AB, DM& A2, Int A1Height=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionDown\"))\n    View( A0, AT );\n    PartitionDown( AB, A1, A2, A1Height );\n}\n\ntemplate<typename T>\ninline void\nLockedRepartitionDown\n( const M& AT, M& A0,\n               M& A1,\n  const M& AB, M& A2, Int A1Height=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionDown\"))\n    LockedView( A0, AT );\n    LockedPartitionDown( AB, A1, A2, A1Height );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nLockedRepartitionDown\n( const DM& AT, DM& A0,\n                DM& A1,\n  const DM& AB, DM& A2, Int A1Height=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionDown\"))\n    LockedView( A0, AT );\n    LockedPartitionDown( AB, A1, A2, A1Height );\n}\n\n// Repartition leftwards from the right\n// ====================================\n\ntemplate<typename T>\ninline void\nRepartitionLeft\n( M& AL, M& AR,\n  M& A0, M& A1, M& A2, Int A1Width=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionLeft\"))\n    PartitionLeft( AL, A0, A1, A1Width );\n    View( A2, AR );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRepartitionLeft\n( DM& AL, DM& AR,\n  DM& A0, DM& A1, DM& A2, Int A1Width=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionLeft\"))\n    PartitionLeft( AL, A0, A1, A1Width );\n    View( A2, AR );\n}\n\ntemplate<typename T>\ninline void\nLockedRepartitionLeft\n( const M& AL, const M& AR,\n  M& A0, M& A1, M& A2, Int A1Width=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionLeft\"))\n    LockedPartitionLeft( AL, A0, A1, A1Width );\n    LockedView( A2, AR );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nLockedRepartitionLeft\n( const DM& AL, const DM& AR,\n  DM& A0, DM& A1, DM& A2, Int A1Width=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionLeft\"))\n    LockedPartitionLeft( AL, A0, A1, A1Width );\n    LockedView( A2, AR );\n}\n\n// Repartition rightward from the left\n// ===================================\n\ntemplate<typename T>\ninline void\nRepartitionRight\n( M& AL, M& AR,\n  M& A0, M& A1, M& A2, Int A1Width=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionRight\"))\n    View( A0, AL );\n    PartitionRight( AR, A1, A2, A1Width );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRepartitionRight\n( DM& AL, DM& AR,\n  DM& A0, DM& A1, DM& A2, Int A1Width=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionRight\"))\n    View( A0, AL );\n    PartitionRight( AR, A1, A2, A1Width );\n}\n\ntemplate<typename T>\ninline void\nLockedRepartitionRight\n( const M& AL, const M& AR,\n  M& A0, M& A1, M& A2, Int A1Width=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionRight\"))\n    LockedView( A0, AL );\n    LockedPartitionRight( AR, A1, A2, A1Width );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nLockedRepartitionRight\n( const DM& AL, const DM& AR,\n  DM& A0, DM& A1, DM& A2, Int A1Width=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionRight\"))\n    LockedView( A0, AL );\n    LockedPartitionRight( AR, A1, A2, A1Width );\n}\n\n// Repartition upwards on a diagonal\n// =================================\n\ntemplate<typename T>\ninline void\nRepartitionUpDiagonal\n( M& ATL, M& ATR, M& A00, M& A01, M& A02,\n                  M& A10, M& A11, M& A12,\n  M& ABL, M& ABR, M& A20, M& A21, M& A22, Int bsize=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionUpDiagonal\"))\n    PartitionUpOffsetDiagonal\n    ( ATL.Width()-ATL.Height(),\n      ATL, A00, A01,\n           A10, A11, bsize );\n    PartitionUp( ATR, A02, A12, A11.Height() );\n    PartitionLeft( ABL, A20, A21, A11.Width() );\n    View( A22, ABR );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRepartitionUpDiagonal\n( DM& ATL, DM& ATR, DM& A00, DM& A01, DM& A02,\n                    DM& A10, DM& A11, DM& A12,\n  DM& ABL, DM& ABR, DM& A20, DM& A21, DM& A22, Int bsize=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionUpDiagonal\"))\n    PartitionUpOffsetDiagonal\n    ( ATL.Width()-ATL.Height(),\n      ATL, A00, A01,\n           A10, A11, bsize );\n    PartitionUp( ATR, A02, A12, A11.Height() );\n    PartitionLeft( ABL, A20, A21, A11.Width() );\n    View( A22, ABR );\n}\n\ntemplate<typename T>\ninline void\nLockedRepartitionUpDiagonal\n( const M& ATL, const M& ATR, M& A00, M& A01, M& A02,\n                              M& A10, M& A11, M& A12,\n  const M& ABL, const M& ABR, M& A20, M& A21, M& A22, Int bsize=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionUpDiagonal\"))\n    LockedPartitionUpOffsetDiagonal\n    ( ATL.Width()-ATL.Height(),\n      ATL, A00, A01,\n           A10, A11, bsize );\n    LockedPartitionUp( ATR, A02, A12, A11.Height() );\n    LockedPartitionLeft( ABL, A20, A21, A11.Width() );\n    LockedView( A22, ABR );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nLockedRepartitionUpDiagonal\n( const DM& ATL, const DM& ATR, DM& A00, DM& A01, DM& A02,\n                                DM& A10, DM& A11, DM& A12,\n  const DM& ABL, const DM& ABR, DM& A20, DM& A21, DM& A22, \n  Int bsize=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionUpDiagonal\"))\n    LockedPartitionUpOffsetDiagonal\n    ( ATL.Width()-ATL.Height(),\n      ATL, A00, A01,\n           A10, A11, bsize );\n    LockedPartitionUp( ATR, A02, A12, A11.Height() );\n    LockedPartitionLeft( ABL, A20, A21, A11.Width() );\n    LockedView( A22, ABR );\n}\n\n// Repartition downwards on a diagonal\n// ===================================\n\ntemplate<typename T>\ninline void\nRepartitionDownDiagonal\n( M& ATL, M& ATR, M& A00, M& A01, M& A02,\n                  M& A10, M& A11, M& A12,\n  M& ABL, M& ABR, M& A20, M& A21, M& A22, Int bsize=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionDownDiagonal\"))\n    View( A00, ATL );\n    PartitionDownDiagonal( ABR, A11, A12,\n                                A21, A22, bsize );\n    PartitionDown( ABL, A10, A20, A11.Height() );\n    PartitionRight( ATR, A01, A02, A11.Width() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRepartitionDownDiagonal\n( DM& ATL, DM& ATR, DM& A00, DM& A01, DM& A02,\n                    DM& A10, DM& A11, DM& A12,\n  DM& ABL, DM& ABR, DM& A20, DM& A21, DM& A22, Int bsize=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RepartitionDownDiagonal\"))\n    View( A00, ATL );\n    PartitionDownDiagonal( ABR, A11, A12,\n                                A21, A22, bsize );\n    PartitionDown( ABL, A10, A20, A11.Height() );\n    PartitionRight( ATR, A01, A02, A11.Width() );\n}\n\ntemplate<typename T>\ninline void\nLockedRepartitionDownDiagonal\n( const M& ATL, const M& ATR, M& A00, M& A01, M& A02,\n                              M& A10, M& A11, M& A12,\n  const M& ABL, const M& ABR, M& A20, M& A21, M& A22, Int bsize=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionDownDiagonal\"))\n    LockedView( A00, ATL );\n    LockedPartitionDownDiagonal( ABR, A11, A12,\n                                      A21, A22, bsize );\n    LockedPartitionDown( ABL, A10, A20, A11.Height() );\n    LockedPartitionRight( ATR, A01, A02, A11.Width() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nLockedRepartitionDownDiagonal\n( const DM& ATL, const DM& ATR, DM& A00, DM& A01, DM& A02,\n                                DM& A10, DM& A11, DM& A12,\n  const DM& ABL, const DM& ABR, DM& A20, DM& A21, DM& A22, \n  Int bsize=Blocksize() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedRepartitionDownDiagonal\"))\n    LockedView( A00, ATL );\n    LockedPartitionDownDiagonal( ABR, A11, A12,\n                                      A21, A22, bsize );\n    LockedPartitionDown( ABL, A10, A20, A11.Height() );\n    LockedPartitionRight( ATR, A01, A02, A11.Width() );\n}\n\n#undef DM\n#undef M\n\n} // namespace elem\n\n#endif // ifndef ELEM_VIEWS_REPARTITION_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/views/SlidePartition.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_VIEWS_SLIDEPARTITION_HPP\n#define ELEM_VIEWS_SLIDEPARTITION_HPP\n\n#include \"./View.hpp\"\n\nnamespace elem {\n\n// To make our life easier. Undef'd at the bottom of the header\n#define M  Matrix<T>\n#define DM DistMatrix<T,U,V>\n\n// Slide a partition upward\n// ========================\n\ntemplate<typename T>\ninline void\nSlidePartitionUp\n( M& AT, M& A0,\n         M& A1,\n  M& AB, M& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionUp\"))\n    View( AT, A0 );\n    View2x1( AB, A1, A2 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlidePartitionUp\n( DM& AT, DM& A0,\n          DM& A1,\n  DM& AB, DM& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionUp\"))\n    View( AT, A0 );\n    View2x1( AB, A1, A2 );\n}\n\ntemplate<typename T>\ninline void\nSlideLockedPartitionUp\n( M& AT, const M& A0,\n         const M& A1,\n  M& AB, const M& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionUp\"))\n    LockedView( AT, A0 );\n    LockedView2x1( AB, A1, A2 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlideLockedPartitionUp\n( DM& AT, const DM& A0,\n          const DM& A1,\n  DM& AB, const DM& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionUp\"))\n    LockedView( AT, A0 );\n    LockedView2x1( AB, A1, A2 );\n}\n\n// Slide a partition downward\n// ==========================\n\ntemplate<typename T>\ninline void\nSlidePartitionDown\n( M& AT, M& A0,\n         M& A1,\n  M& AB, M& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionDown\"))\n    View2x1( AT, A0, A1 );\n    View( AB, A2 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlidePartitionDown\n( DM& AT, DM& A0,\n          DM& A1,\n  DM& AB, DM& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionDown\"))\n    View2x1( AT, A0, A1 );\n    View( AB, A2 );\n}\n\ntemplate<typename T>\ninline void\nSlideLockedPartitionDown\n( M& AT, const M& A0,\n         const M& A1,\n  M& AB, const M& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionDown\"))\n    LockedView2x1( AT, A0, A1 );\n    LockedView( AB, A2 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlideLockedPartitionDown\n( DM& AT, const DM& A0,\n          const DM& A1,\n  DM& AB, const DM& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionDown\"))\n    LockedView2x1( AT, A0, A1 );\n    LockedView( AB, A2 );\n}\n\n// Slide a partition leftward\n// ==========================\n\ntemplate<typename T>\ninline void\nSlidePartitionLeft\n( M& AL, M& AR,\n  M& A0, M& A1, M& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionLeft\"))\n    View( AL, A0 );\n    View1x2( AR, A1, A2 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlidePartitionLeft\n( DM& AL, DM& AR,\n  DM& A0, DM& A1, DM& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionLeft\"))\n    View( AL, A0 );\n    View1x2( AR, A1, A2 );\n}\n\ntemplate<typename T>\ninline void\nSlideLockedPartitionLeft\n( M& AL, M& AR,\n  const M& A0, const M& A1, const M& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionLeft\"))\n    LockedView( AL, A0 );\n    LockedView1x2( AR, A1, A2 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlideLockedPartitionLeft\n( DM& AL, DM& AR,\n  const DM& A0, const DM& A1, const DM& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionLeft\"))\n    LockedView( AL, A0 );\n    LockedView1x2( AR, A1, A2 );\n}\n\n// Slide a partition rightward\n// ===========================\n\ntemplate<typename T>\ninline void\nSlidePartitionRight\n( M& AL, M& AR,\n  M& A0, M& A1, M& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionRight\"))\n    View1x2( AL, A0, A1 );\n    View( AR, A2 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlidePartitionRight\n( DM& AL, DM& AR,\n  DM& A0, DM& A1, DM& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionRight\"))\n    View1x2( AL, A0, A1 );\n    View( AR, A2 );\n}\n\ntemplate<typename T>\ninline void\nSlideLockedPartitionRight\n( M& AL, M& AR,\n  const M& A0, const M& A1, const M& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionRight\"))\n    LockedView1x2( AL, A0, A1 );\n    LockedView( AR, A2 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlideLockedPartitionRight\n( DM& AL, DM& AR,\n  const DM& A0, const DM& A1, const DM& A2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionRight\"))\n    LockedView1x2( AL, A0, A1 );\n    LockedView( AR, A2 );\n}\n\n// Slide a partition upward on a diagonal\n// ======================================\n\ntemplate<typename T>\ninline void\nSlidePartitionUpDiagonal\n( M& ATL, M& ATR, M& A00, M& A01, M& A02,\n                  M& A10, M& A11, M& A12,\n  M& ABL, M& ABR, M& A20, M& A21, M& A22 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionUpDiagonal\"))\n    View( ATL, A00 );\n    View1x2( ATR, A01, A02 );\n    View2x1( ABL, A10, A20 );\n    View2x2( ABR, A11, A12,\n                  A21, A22 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlidePartitionUpDiagonal\n( DM& ATL, DM& ATR, DM& A00, DM& A01, DM& A02,\n                    DM& A10, DM& A11, DM& A12,\n  DM& ABL, DM& ABR, DM& A20, DM& A21, DM& A22 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionUpDiagonal\"))\n    View( ATL, A00 );\n    View1x2( ATR, A01, A02 );\n    View2x1( ABL, A10, A20 );\n    View2x2( ABR, A11, A12,\n                  A21, A22 );\n}\n\ntemplate<typename T>\ninline void\nSlideLockedPartitionUpDiagonal\n( M& ATL, M& ATR, const M& A00, const M& A01, const M& A02,\n                  const M& A10, const M& A11, const M& A12,\n  M& ABL, M& ABR, const M& A20, const M& A21, const M& A22 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionUpDiagonal\"))\n    LockedView( ATL, A00 );\n    LockedView1x2( ATR, A01, A02 );\n    LockedView2x1( ABL, A10, A20 );\n    LockedView2x2( ABR, A11, A12,\n                        A21, A22 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlideLockedPartitionUpDiagonal\n( DM& ATL, DM& ATR, const DM& A00, const DM& A01, const DM& A02,\n                    const DM& A10, const DM& A11, const DM& A12,\n  DM& ABL, DM& ABR, const DM& A20, const DM& A21, const DM& A22 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionUpDiagonal\"))\n    LockedView( ATL, A00 );\n    LockedView1x2( ATR, A01, A02 );\n    LockedView2x1( ABL, A10, A20 );\n    LockedView2x2( ABR, A11, A12,\n                        A21, A22 );\n}\n\n// Slide a partition downward on a diagonal\n// ========================================\n\ntemplate<typename T>\ninline void\nSlidePartitionDownDiagonal\n( M& ATL, M& ATR, M& A00, M& A01, M& A02,\n                  M& A10, M& A11, M& A12,\n  M& ABL, M& ABR, M& A20, M& A21, M& A22 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionDownDiagonal\"))\n    View2x2( ATL, A00, A01,\n                  A10, A11 );\n    View2x1( ATR, A02, A12 );\n    View1x2( ABL, A20, A21 );\n    View( ABR, A22 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlidePartitionDownDiagonal\n( DM& ATL, DM& ATR, DM& A00, DM& A01, DM& A02,\n                    DM& A10, DM& A11, DM& A12,\n  DM& ABL, DM& ABR, DM& A20, DM& A21, DM& A22 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlidePartitionDownDiagonal\"))\n    View2x2( ATL, A00, A01,\n                  A10, A11 );\n    View2x1( ATR, A02, A12 );\n    View1x2( ABL, A20, A21 );\n    View( ABR, A22 );\n}\n\ntemplate<typename T>\ninline void\nSlideLockedPartitionDownDiagonal\n( M& ATL, M& ATR, const M& A00, const M& A01, const M& A02,\n                  const M& A10, const M& A11, const M& A12,\n  M& ABL, M& ABR, const M& A20, const M& A21, const M& A22 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionDownDiagonal\"))\n    LockedView2x2( ATL, A00, A01,\n                        A10, A11 );\n    LockedView2x1( ATR, A02, A12 );\n    LockedView1x2( ABL, A20, A21 );\n    LockedView( ABR, A22 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSlideLockedPartitionDownDiagonal\n( DM& ATL, DM& ATR, const DM& A00, const DM& A01, const DM& A02,\n                    const DM& A10, const DM& A11, const DM& A12,\n  DM& ABL, DM& ABR, const DM& A20, const DM& A21, const DM& A22 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SlideLockedPartitionDownDiagonal\"))\n    LockedView2x2( ATL, A00, A01,\n                        A10, A11 );\n    LockedView2x1( ATR, A02, A12 );\n    LockedView1x2( ABL, A20, A21 );\n    LockedView( ABR, A22 );\n}\n\n#undef DM\n#undef M\n\n} // namespace elem\n\n#endif // ifndef ELEM_VIEWS_SLIDEPARTITION_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core/views/View.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_VIEWS_VIEW_HPP\n#define ELEM_VIEWS_VIEW_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void View( Matrix<T>& A, Matrix<T>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"View\"))\n    A.Attach( B.Height(), B.Width(), B.Buffer(), B.LDim() );\n}\n\ntemplate<typename T>\ninline Matrix<T> View( Matrix<T>& B )\n{\n    Matrix<T> A;\n    View( A, B );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void View( DistMatrix<T,U,V>& A, DistMatrix<T,U,V>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"View\"))\n    A.Attach\n    ( B.Height(), B.Width(), B.Grid(), B.ColAlign(), B.RowAlign(), \n      B.Buffer(), B.LDim(), B.Root() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline DistMatrix<T,U,V> View( DistMatrix<T,U,V>& B )\n{\n    DistMatrix<T,U,V> A(B.Grid());\n    View( A, B );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void View( BlockDistMatrix<T,U,V>& A, DistMatrix<T,U,V>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"View\"))\n    A.Attach\n    ( B.Height(), B.Width(), B.Grid(), 1, 1, B.ColAlign(), B.RowAlign(), 0, 0,\n      B.Buffer(), B.LDim(), B.Root() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void View( DistMatrix<T,U,V>& A, BlockDistMatrix<T,U,V>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"View\"))\n    if( B.BlockHeight() != 1 || B.BlockWidth() != 1 )\n        LogicError(\"Block size was \",B.BlockHeight(),\" x \",B.BlockWidth(),\n                    \"instead of 1x1\");\n    A.Attach\n    ( B.Height(), B.Width(), B.Grid(), B.ColAlign(), B.RowAlign(), \n      B.Buffer(), B.LDim(), B.Root() );\n}\n\ntemplate<typename T>\ninline void LockedView( Matrix<T>& A, const Matrix<T>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedView\"))\n    A.LockedAttach( B.Height(), B.Width(), B.LockedBuffer(), B.LDim() );\n}\n\ntemplate<typename T>\ninline Matrix<T> LockedView( const Matrix<T>& B )\n{\n    Matrix<T> A;\n    LockedView( A, B );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void LockedView( DistMatrix<T,U,V>& A, const DistMatrix<T,U,V>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedView\"))\n    A.LockedAttach\n    ( B.Height(), B.Width(), B.Grid(), B.ColAlign(), B.RowAlign(), \n      B.LockedBuffer(), B.LDim(), B.Root() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline DistMatrix<T,U,V> LockedView( const DistMatrix<T,U,V>& B )\n{\n    DistMatrix<T,U,V> A(B.Grid());\n    LockedView( A, B );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void LockedView( BlockDistMatrix<T,U,V>& A, const DistMatrix<T,U,V>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedView\"))\n    A.LockedAttach\n    ( B.Height(), B.Width(), B.Grid(), 1, 1, B.ColAlign(), B.RowAlign(), 0, 0,\n      B.LockedBuffer(), B.LDim(), B.Root() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void LockedView( DistMatrix<T,U,V>& A, const BlockDistMatrix<T,U,V>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedView\"))\n    if( B.BlockHeight() != 1 || B.BlockWidth() != 1 )\n        LogicError(\"Block size was \",B.BlockHeight(),\" x \",B.BlockWidth(),\n                    \"instead of 1x1\");\n    A.LockedAttach\n    ( B.Height(), B.Width(), B.Grid(), B.ColAlign(), B.RowAlign(), \n      B.LockedBuffer(), B.LDim(), B.Root() );\n}\n\ntemplate<typename T>\ninline void View\n( Matrix<T>& A, Matrix<T>& B,\n  Int i, Int j, Int height, Int width )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"View\");\n        if( i < 0 || j < 0 )\n            LogicError(\"Indices must be non-negative\");\n        if( height < 0 || width < 0 )\n            LogicError(\"Height and width must be non-negative\");\n        if( (i+height) > B.Height() || (j+width) > B.Width() )\n            LogicError\n            (\"Trying to view outside of a Matrix: (\",i,\",\",j,\") up to (\", \n             i+height-1,\",\",j+width-1,\") of \",B.Height(),\" x \",B.Width(),\n             \" Matrix\");\n    )\n    A.Attach( height, width, B.Buffer(i,j), B.LDim() );\n}\n\ntemplate<typename T>\ninline Matrix<T> View( Matrix<T>& B, Int i, Int j, Int height, Int width )\n{\n    Matrix<T> A;\n    View( A, B, i, j, height, width );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void View\n( DistMatrix<T,U,V>& A, DistMatrix<T,U,V>& B,\n  Int i, Int j, Int height, Int width )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"View\");\n        B.AssertValidSubmatrix( i, j, height, width );\n    )\n    const Int colAlign = (B.ColAlign()+i) % B.ColStride();\n    const Int rowAlign = (B.RowAlign()+j) % B.RowStride();\n    if( B.Participating() )\n    {\n        const Int iLoc = Length( i, B.ColShift(), B.ColStride() );\n        const Int jLoc = Length( j, B.RowShift(), B.RowStride() );\n        A.Attach\n        ( height, width, B.Grid(), colAlign, rowAlign, \n          B.Buffer(iLoc,jLoc), B.LDim(), B.Root() );\n    }\n    else\n    {\n        A.Attach\n        ( height, width, B.Grid(), colAlign, rowAlign, 0, B.LDim(), B.Root() );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline DistMatrix<T,U,V> View\n( DistMatrix<T,U,V>& B, Int i, Int j, Int height, Int width )\n{\n    DistMatrix<T,U,V> A(B.Grid());\n    View( A, B, i, j, height, width );\n    return A;\n}\n\ntemplate<typename T>\ninline void LockedView\n( Matrix<T>& A, const Matrix<T>& B,\n  Int i, Int j, Int height, Int width )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LockedView\");\n        if( i < 0 || j < 0 )\n            LogicError(\"Indices must be non-negative\");\n        if( height < 0 || width < 0 )\n            LogicError(\"Height and width must be non-negative\");\n        if( (i+height) > B.Height() || (j+width) > B.Width() )\n            LogicError\n            (\"Trying to view outside of a Matrix: (\",i,\",\",j,\") up to (\",\n             i+height-1,\",\",j+width-1,\") of \",B.Height(),\" x \",B.Width(),\n             \" Matrix\");\n    )\n    A.LockedAttach( height, width, B.LockedBuffer(i,j), B.LDim() );\n}\n\ntemplate<typename T>\ninline Matrix<T> LockedView\n( const Matrix<T>& B, Int i, Int j, Int height, Int width )\n{\n    Matrix<T> A;\n    LockedView( A, B, i, j, height, width );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void LockedView\n( DistMatrix<T,U,V>& A, const DistMatrix<T,U,V>& B,\n  Int i, Int j, Int height, Int width )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LockedView\");\n        B.AssertValidSubmatrix( i, j, height, width );\n    )\n    const Int colAlign = (B.ColAlign()+i) % B.ColStride();\n    const Int rowAlign = (B.RowAlign()+j) % B.RowStride();\n    if( B.Participating() )\n    {\n        const Int iLoc = Length( i, B.ColShift(), B.ColStride() );\n        const Int jLoc = Length( j, B.RowShift(), B.RowStride() );\n        A.LockedAttach\n        ( height, width, B.Grid(), colAlign, rowAlign, \n          B.LockedBuffer(iLoc,jLoc), B.LDim(), B.Root() );\n    }\n    else\n    {\n        A.LockedAttach\n        ( height, width, B.Grid(), colAlign, rowAlign, 0, B.LDim(), B.Root() );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline DistMatrix<T,U,V> LockedView\n( const DistMatrix<T,U,V>& B, Int i, Int j, Int height, Int width )\n{\n    DistMatrix<T,U,V> A(B.Grid());\n    LockedView( A, B, i, j, height, width );\n    return A;\n}\n\ntemplate<typename T>\nvoid ViewRange\n( Matrix<T>& A, Matrix<T>& B, Int iBeg, Int jBeg, Int iEnd, Int jEnd )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"ViewRange\"))\n    View( A, B, iBeg, jBeg, iEnd-iBeg, jEnd-jBeg ); \n}\n\ntemplate<typename T>\nMatrix<T> ViewRange\n( Matrix<T>& B, Int iBeg, Int jBeg, Int iEnd, Int jEnd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ViewRange\"))\n    return View( B, iBeg, jBeg, iEnd-iBeg, jEnd-jBeg ); \n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid ViewRange\n( DistMatrix<T,U,V>& A, DistMatrix<T,U,V>& B,\n  Int iBeg, Int jBeg, Int iEnd, Int jEnd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ViewRange\"))\n    View( A, B, iBeg, jBeg, iEnd-iBeg, jEnd-jBeg ); \n}\n\ntemplate<typename T,Dist U,Dist V>\nDistMatrix<T,U,V> ViewRange\n( DistMatrix<T,U,V>& B, Int iBeg, Int jBeg, Int iEnd, Int jEnd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ViewRange\"))\n    return View( B, iBeg, jBeg, iEnd-iBeg, jEnd-jBeg ); \n} \n\ntemplate<typename T>\nvoid LockedViewRange\n( Matrix<T>& A, const Matrix<T>& B, Int iBeg, Int jBeg, Int iEnd, Int jEnd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedViewRange\"))\n    LockedView( A, B, iBeg, jBeg, iEnd-iBeg, jEnd-jBeg ); \n}\n\ntemplate<typename T>\nMatrix<T> LockedViewRange\n( const Matrix<T>& B, Int iBeg, Int jBeg, Int iEnd, Int jEnd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedViewRange\"))\n    return LockedView( B, iBeg, jBeg, iEnd-iBeg, jEnd-jBeg ); \n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid LockedViewRange\n( DistMatrix<T,U,V>& A, const DistMatrix<T,U,V>& B,\n  Int iBeg, Int jBeg, Int iEnd, Int jEnd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedViewRange\"))\n    LockedView( A, B, iBeg, jBeg, iEnd-iBeg, jEnd-jBeg ); \n}\n\ntemplate<typename T,Dist U,Dist V>\nDistMatrix<T,U,V> LockedViewRange\n( const DistMatrix<T,U,V>& B, Int iBeg, Int jBeg, Int iEnd, Int jEnd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LockedViewRange\"))\n    return LockedView( B, iBeg, jBeg, iEnd-iBeg, jEnd-jBeg ); \n}\n\ntemplate<typename T>\ninline void View1x2( Matrix<T>& A, Matrix<T>& BL, Matrix<T>& BR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"View1x2\");\n        if( BL.Locked() || BR.Locked() )\n            LogicError(\"Cannot grab an unlocked view of a locked matrix\");\n        if( BL.Height() != BR.Height() )\n            LogicError(\"1x2 must have consistent height to combine\");\n        if( BL.LDim() != BR.LDim() )\n            LogicError(\"1x2 must have consistent ldims to combine\");\n        if( BR.Buffer() != (BL.Buffer()+BL.LDim()*BL.Width()) )\n            LogicError(\"1x2 must have contiguous memory\");\n    )\n    A.Attach( BL.Height(), BL.Width()+BR.Width(), BL.Buffer(), BL.LDim() );\n}\n\ntemplate<typename T>\ninline Matrix<T> View1x2( Matrix<T>& BL, Matrix<T>& BR )\n{\n    Matrix<T> A;\n    View1x2( A, BL, BR );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void View1x2\n( DistMatrix<T,U,V>& A, DistMatrix<T,U,V>& BL, DistMatrix<T,U,V>& BR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"View1x2\");\n        AssertConforming1x2( BL, BR );\n        BL.AssertSameGrid( BR.Grid() );\n    )\n    A.Attach\n    ( BL.Height(), BL.Width()+BR.Width(), BL.Grid(), \n      BL.ColAlign(), BL.RowAlign(), BL.Buffer(), BL.LDim(), BL.Root() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline DistMatrix<T,U,V> View1x2( DistMatrix<T,U,V>& BL, DistMatrix<T,U,V>& BR )\n{\n    DistMatrix<T,U,V> A(BL.Grid());\n    View1x2( A, BL, BR );\n    return A;\n}\n\ntemplate<typename T>\ninline void LockedView1x2\n( Matrix<T>& A, const Matrix<T>& BL, const Matrix<T>& BR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LockedView1x2\");\n        if( BL.Height() != BR.Height() )\n            LogicError(\"1x2 must have consistent height to combine\");\n        if( BL.LDim() != BR.LDim() )\n            LogicError(\"1x2 must have consistent ldims to combine\");\n        if( BR.LockedBuffer() != (BL.LockedBuffer()+BL.LDim()*BL.Width()) )\n            LogicError(\"1x2 must have contiguous memory\");\n    )\n    A.LockedAttach\n    ( BL.Height(), BL.Width()+BR.Width(), BL.LockedBuffer(), BL.LDim() );\n}\n\ntemplate<typename T>\ninline Matrix<T> LockedView1x2( const Matrix<T>& BL, const Matrix<T>& BR )\n{\n    Matrix<T> A;\n    LockedView1x2( A, BL, BR );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void LockedView1x2\n(       DistMatrix<T,U,V>& A,\n  const DistMatrix<T,U,V>& BL,\n  const DistMatrix<T,U,V>& BR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LockedView1x2\");\n        AssertConforming1x2( BL, BR );\n        BL.AssertSameGrid( BR.Grid() );\n    )\n    A.LockedAttach\n    ( BL.Height(), BL.Width()+BR.Width(), BL.Grid(), \n      BL.ColAlign(), BL.RowAlign(), BL.LockedBuffer(), BL.LDim(), BL.Root() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline DistMatrix<T,U,V> LockedView1x2\n( const DistMatrix<T,U,V>& BL, const DistMatrix<T,U,V>& BR )\n{\n    DistMatrix<T,U,V> A(BL.Grid());\n    LockedView1x2( A, BL, BR );\n    return A;\n}\n\ntemplate<typename T>\ninline void View2x1( Matrix<T>& A, Matrix<T>& BT, Matrix<T>& BB )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"View2x1\");\n        if( BT.Locked() || BB.Locked() )\n            LogicError(\"Cannot grab an unlocked view of a locked matrix\");\n        if( BT.Width() != BB.Width() )\n            LogicError(\"2x1 must have consistent width to combine\");\n        if( BT.LDim() != BB.LDim() )\n            LogicError(\"2x1 must have consistent ldim to combine\");\n        if( BB.Buffer() != (BT.Buffer() + BT.Height()) )\n            LogicError(\"2x1 must have contiguous memory\");\n    )\n    A.Attach( BT.Height()+BB.Height(), BT.Width(), BT.Buffer(), BT.LDim() );\n}\n\ntemplate<typename T>\ninline Matrix<T> View2x1( Matrix<T>& BT, Matrix<T>& BB )\n{\n    Matrix<T> A;\n    View2x1( A, BT, BB );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void View2x1\n( DistMatrix<T,U,V>& A, DistMatrix<T,U,V>& BT, DistMatrix<T,U,V>& BB )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"View2x1\");\n        AssertConforming2x1( BT, BB );\n        BT.AssertSameGrid( BB.Grid() );\n    )\n    A.Attach\n    ( BT.Height()+BB.Height(), BT.Width(), BT.Grid(), \n      BT.ColAlign(), BT.RowAlign(), BT.Buffer(), BT.LDim(), BT.Root() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline DistMatrix<T,U,V> View2x1( DistMatrix<T,U,V>& BT, DistMatrix<T,U,V>& BB )\n{\n    DistMatrix<T,U,V> A(BT.Grid());\n    View2x1( A, BT, BB );\n    return A;\n}\n\ntemplate<typename T>\ninline void LockedView2x1\n( Matrix<T>& A, const Matrix<T>& BT, const Matrix<T>& BB )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LockedView2x1\");\n        if( BT.Width() != BB.Width() )\n            LogicError(\"2x1 must have consistent width to combine\");\n        if( BT.LDim() != BB.LDim() )\n            LogicError(\"2x1 must have consistent ldim to combine\");\n        if( BB.LockedBuffer() != (BT.LockedBuffer() + BT.Height()) )\n            LogicError(\"2x1 must have contiguous memory\");\n    )\n    A.LockedAttach\n    ( BT.Height()+BB.Height(), BT.Width(), BT.LockedBuffer(), BT.LDim() );\n}\n\ntemplate<typename T>\ninline Matrix<T> LockedView2x1\n( const Matrix<T>& BT, const Matrix<T>& BB )\n{\n    Matrix<T> A;\n    LockedView2x1( A, BT, BB );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void LockedView2x1\n(       DistMatrix<T,U,V>& A,\n  const DistMatrix<T,U,V>& BT,\n  const DistMatrix<T,U,V>& BB )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LockedView2x1\");\n        AssertConforming2x1( BT, BB );\n        BT.AssertSameGrid( BB.Grid() );\n    )\n    A.LockedAttach\n    ( BT.Height()+BB.Height(), BT.Width(), BT.Grid(), \n      BT.ColAlign(), BT.RowAlign(), BT.LockedBuffer(), BT.LDim(), BT.Root() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline DistMatrix<T,U,V> LockedView2x1\n( const DistMatrix<T,U,V>& BT, const DistMatrix<T,U,V>& BB )\n{\n    DistMatrix<T,U,V> A(BT.Grid());\n    LockedView2x1( A, BT, BB );\n    return A;\n}\n\ntemplate<typename T>\ninline void View2x2\n( Matrix<T>& A,\n  Matrix<T>& BTL, Matrix<T>& BTR,\n  Matrix<T>& BBL, Matrix<T>& BBR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"View2x2\");\n        if( BTL.Locked() || BTR.Locked() || BBL.Locked() || BBR.Locked() )\n            LogicError(\"Cannot grab an unlocked view of a locked matrix\");\n        if( BTL.Width() != BBL.Width()   ||\n            BTR.Width() != BBR.Width()   ||\n            BTL.Height() != BTR.Height() ||\n            BBL.Height() != BBR.Height()   )\n            LogicError(\"2x2 must conform to combine\");\n        if( BTL.LDim() != BTR.LDim() ||\n            BTR.LDim() != BBL.LDim() ||\n            BBL.LDim() != BBR.LDim()   )\n            LogicError(\"2x2 must have consistent ldims to combine\");\n        if( BBL.Buffer() != (BTL.Buffer() + BTL.Height()) ||\n            BBR.Buffer() != (BTR.Buffer() + BTR.Height()) ||\n            BTR.Buffer() != (BTL.Buffer() + BTL.LDim()*BTL.Width()) )\n            LogicError(\"2x2 must have contiguous memory\");\n    )\n    A.Attach\n    ( BTL.Height()+BBL.Height(), BTL.Width()+BTR.Width(), \n      BTL.Buffer(), BTL.LDim() );\n}\n\ntemplate<typename T>\ninline Matrix<T> View2x2\n( Matrix<T>& BTL, Matrix<T>& BTR,\n  Matrix<T>& BBL, Matrix<T>& BBR )\n{\n    Matrix<T> A;\n    View2x2( A, BTL, BTR, BBL, BBR );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void View2x2\n( DistMatrix<T,U,V>& A,\n  DistMatrix<T,U,V>& BTL, DistMatrix<T,U,V>& BTR,\n  DistMatrix<T,U,V>& BBL, DistMatrix<T,U,V>& BBR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"View2x2\");\n        AssertConforming2x2( BTL, BTR, BBL, BBR );\n        BTL.AssertSameGrid( BTR.Grid() );\n        BTL.AssertSameGrid( BBL.Grid() );\n        BTL.AssertSameGrid( BBR.Grid() );\n    )\n    A.Attach\n    ( BTL.Height()+BBL.Height(), BTL.Width()+BTR.Width(), BTL.Grid(),\n      BTL.ColAlign(), BTL.RowAlign(), BTL.Buffer(), BTL.LDim(), BTL.Root() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline DistMatrix<T,U,V> View2x2\n( DistMatrix<T,U,V>& BTL, DistMatrix<T,U,V>& BTR,\n  DistMatrix<T,U,V>& BBL, DistMatrix<T,U,V>& BBR )\n{\n    DistMatrix<T,U,V> A(BTL.Grid());\n    View2x2( A, BTL, BTR, BBL, BBR );\n    return A;\n}\n\ntemplate<typename T>\ninline void LockedView2x2\n(       Matrix<T>& A,\n  const Matrix<T>& BTL,\n  const Matrix<T>& BTR,\n  const Matrix<T>& BBL,\n  const Matrix<T>& BBR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LockedView2x2\");\n        if( BTL.Width() != BBL.Width()   ||\n            BTR.Width() != BBR.Width()   ||\n            BTL.Height() != BTR.Height() ||\n            BBL.Height() != BBR.Height()   )\n            LogicError(\"2x2 must conform to combine\");\n        if( BTL.LDim() != BTR.LDim() ||\n            BTR.LDim() != BBL.LDim() ||\n            BBL.LDim() != BBR.LDim()   )\n            LogicError(\"2x2 must have consistent ldims to combine\");\n        if( BBL.LockedBuffer() != (BTL.LockedBuffer()+BTL.Height()) ||\n            BBR.LockedBuffer() != (BTR.LockedBuffer()+BTR.Height()) ||\n            BTR.LockedBuffer() != (BTL.LockedBuffer()+BTL.LDim()*BTL.Width()) )\n            LogicError(\"2x2 must have contiguous memory\");\n    )\n    A.LockedAttach\n    ( BTL.Height()+BBL.Height(), BTL.Width()+BTR.Width(), \n      BTL.LockedBuffer(), BTL.LDim() );\n}\n\ntemplate<typename T>\ninline Matrix<T> LockedView2x2\n( const Matrix<T>& BTL, const Matrix<T>& BTR,\n  const Matrix<T>& BBL, const Matrix<T>& BBR )\n{\n    Matrix<T> A;\n    LockedView2x2( A, BTL, BTR, BBL, BBR );\n    return A;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void LockedView2x2\n(       DistMatrix<T,U,V>& A,\n  const DistMatrix<T,U,V>& BTL, const DistMatrix<T,U,V>& BTR,\n  const DistMatrix<T,U,V>& BBL, const DistMatrix<T,U,V>& BBR )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LockedView2x2\");\n        AssertConforming2x2( BTL, BTR, BBL, BBR );\n        BTL.AssertSameGrid( BTR.Grid() );\n        BTL.AssertSameGrid( BBL.Grid() );\n        BTL.AssertSameGrid( BBR.Grid() );\n    )\n    A.LockedAttach\n    ( BTL.Height()+BBL.Height(), BTL.Width()+BTR.Width(), BTL.Grid(),\n      BTL.ColAlign(), BTL.RowAlign(), BTL.LockedBuffer(), BTL.LDim(),\n      BTL.Root() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline DistMatrix<T,U,V> LockedView2x2\n( const DistMatrix<T,U,V>& BTL, const DistMatrix<T,U,V>& BTR,\n  const DistMatrix<T,U,V>& BBL, const DistMatrix<T,U,V>& BBR )\n{\n    DistMatrix<T,U,V> A(BTL.Grid());\n    LockedView2x2( A, BTL, BTR, BBL, BBR );\n    return A;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_VIEWS_VIEW_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/core.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CORE_HPP\n#define ELEM_CORE_HPP\n\n#include \"mpi.h\"\n#include <algorithm>\n#include <array>\n#include <cmath>\n#include <complex>\n#include <cstddef>\n#include <cstdlib>\n#include <cstring>\n#include <ctime>\n#include <fstream>\n#include <iostream>\n#include <memory>\n#include <sstream>\n#include <stack>\n#include <stdexcept>\n#include <string>\n#include <random>\n#include <vector>\n\n// The DEBUG_ONLY macro is, to the best of my knowledge, the only preprocessor\n// name defined by Elemental that is not namespaced with \"ELEM\". Given how\n// frequently it is used, I will leave it as-is unless/until a user/developer \n// complains.\n#ifdef ELEM_RELEASE\n# define DEBUG_ONLY(cmd) \n#else\n# define DEBUG_ONLY(cmd) cmd;\n#endif\n\n// If defined, the _OPENMP macro contains the date of the specification\n#ifdef ELEM_HAVE_OPENMP\n# include <omp.h>\n# define ELEM_PARALLEL_FOR _Pragma(\"omp parallel for\")\n# ifdef ELEM_HAVE_OMP_COLLAPSE\n#  define ELEM_PARALLEL_FOR_COLLAPSE2 _Pragma(\"omp parallel for collapse(2)\")\n# else\n#  define ELEM_PARALLEL_FOR_COLLAPSE2 ELEM_PARALLEL_FOR\n# endif\n#else\n# define ELEM_PARALLEL_FOR \n# define ELEM_PARALLEL_FOR_COLLAPSE2\n#endif\n\n#ifdef ELEM_AVOID_OMP_FMA\n# define ELEM_FMA_PARALLEL_FOR \n#else\n# define ELEM_FMA_PARALLEL_FOR ELEM_PARALLEL_FOR\n#endif\n#ifdef ELEM_PARALLELIZE_INNER_LOOPS\n# define ELEM_INNER_PARALLEL_FOR           ELEM_PARALLEL_FOR\n# define ELEM_INNER_PARALLEL_FOR_COLLAPSE2 ELEM_PARALLEL_FOR_COLLAPSE2\n# define ELEM_OUTER_PARALLEL_FOR \n# define ELEM_OUTER_PARALLEL_FOR_COLLAPSE2\n#else\n# define ELEM_INNER_PARALLEL_FOR\n# define ELEM_INNER_PARALLEL_FOR_COLLAPSE2\n# define ELEM_OUTER_PARALLEL_FOR           ELEM_PARALLEL_FOR\n# define ELEM_OUTER_PARALLEL_FOR_COLLAPSE2 ELEM_PARALLEL_FOR_COLLAPSE2\n#endif\n\n#ifdef ELEM_HAVE_NOEXCEPT\n# define ELEM_NOEXCEPT noexcept\n#else\n# define ELEM_NOEXCEPT\n#endif\n\n#if defined(ELEM_BLAS_POST)\n# define ELEM_BLAS(name) name ## _\n#else\n# define ELEM_BLAS(name) name\n#endif\n\n#if defined(ELEM_LAPACK_POST)\n# define ELEM_LAPACK(name) name ## _\n#else\n# define ELEM_LAPACK(name) name\n#endif\n\n#if defined(ELEM_HAVE_SCALAPACK)\n# if defined(ELEM_SCALAPACK_POST)\n#  define ELEM_SCALAPACK(name) name ## _\n# else\n#  define ELEM_SCALAPACK(name) name\n# endif\n#endif\n\n// TODO: Think of how to better decouple the following components\n\n// Declare the intertwined core parts of our library\n#include \"elemental/core/Timer/decl.hpp\"\n#include \"elemental/core/Memory.hpp\"\n#include \"elemental/core/Complex/decl.hpp\"\n#include \"elemental/core/types/decl.hpp\"\n#include \"elemental/core/imports/mpi.hpp\"\n#include \"elemental/core/imports/choice.hpp\"\n#include \"elemental/core/imports/mpi_choice.hpp\"\n#include \"elemental/core/environment/decl.hpp\"\n#include \"elemental/core/indexing/decl.hpp\"\n#include \"elemental/core/imports/blas.hpp\"\n#include \"elemental/core/imports/lapack.hpp\"\n#include \"elemental/core/imports/flame.hpp\"\n#include \"elemental/core/imports/pmrrr.hpp\"\n#include \"elemental/core/imports/scalapack.hpp\"\n\n#include \"elemental/core/Matrix/forward_decl.hpp\"\n#include \"elemental/core/DistMatrix/forward_decl.hpp\"\n#include \"elemental/core/BlockDistMatrix/forward_decl.hpp\"\n#include \"elemental/core/Matrix.hpp\"\n#include \"elemental/core/Grid/decl.hpp\"\n#include \"elemental/core/DistMatrix.hpp\"\n#include \"elemental/core/BlockDistMatrix.hpp\"\n\n// Implement the intertwined parts of the library\n#include \"elemental/core/Timer/impl.hpp\"\n#include \"elemental/core/Complex/impl.hpp\"\n#include \"elemental/core/types/impl.hpp\"\n#include \"elemental/core/Grid/impl.hpp\"\n#include \"elemental/core/environment/impl.hpp\"\n#include \"elemental/core/indexing/impl.hpp\"\n\n// Declare and implement the decoupled parts of the core of the library\n// (perhaps these should be moved into their own directory?)\n#include \"elemental/core/views/View.hpp\"\n#include \"elemental/core/views/Partition.hpp\"\n#include \"elemental/core/views/Repartition.hpp\"\n#include \"elemental/core/views/SlidePartition.hpp\"\n#include \"elemental/core/random/decl.hpp\"\n#include \"elemental/core/random/impl.hpp\"\n#include \"elemental/core/AxpyInterface/decl.hpp\"\n#include \"elemental/core/AxpyInterface/impl.hpp\"\n\n#endif // ifndef ELEM_CORE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/include-paths.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INCLUDEPATHS_HPP\n#define ELEM_INCLUDEPATHS_HPP\n\n// BLAS-like routines\n// ==================\n#define ELEM_BLAS_INC      \"elemental/blas-like.hpp\"\n#define ELEM_BLAS_DECL_INC \"elemental/blas-like/decl.hpp\"\n#define ELEM_BLAS_IMPL_INC \"elemental/blas-like/impl.hpp\"\n\n// Level 1 routines\n// ----------------\n#define ELEM_BLAS1_INC \"elemental/blas-like/level1.hpp\"\n\n#define ELEM_ADJOINT_INC \\\n  \"elemental/blas-like/level1/Adjoint.hpp\"\n#define ELEM_AXPY_INC \\\n  \"elemental/blas-like/level1/Axpy.hpp\"\n#define ELEM_AXPYTRIANGLE_INC \\\n  \"elemental/blas-like/level1/AxpyTriangle.hpp\"\n#define ELEM_CONJUGATE_INC \\\n  \"elemental/blas-like/level1/Conjugate.hpp\"\n#define ELEM_COPY_INC \\\n  \"elemental/blas-like/level1/Copy.hpp\"\n#define ELEM_DIAGONALSCALE_INC \\\n  \"elemental/blas-like/level1/DiagonalScale.hpp\"\n#define ELEM_DIAGONALSCALETRAPEZOID_INC \\\n  \"elemental/blas-like/level1/DiagonalScaleTrapezoid.hpp\"\n#define ELEM_DIAGONALSOLVE_INC \\\n  \"elemental/blas-like/level1/DiagonalSolve.hpp\"\n#define ELEM_DOT_INC \\\n  \"elemental/blas-like/level1/Dot.hpp\"\n#define ELEM_DOTU_INC \\\n  \"elemental/blas-like/level1/Dotu.hpp\"\n#define ELEM_ENTRYWISEMAP_INC \\\n  \"elemental/blas-like/level1/EntrywiseMap.hpp\"\n#define ELEM_HADAMARD_INC \\\n  \"elemental/blas-like/level1/Hadamard.hpp\"\n#define ELEM_HILBERTSCHMIDT_INC \\\n  \"elemental/blas-like/level1/HilbertSchmidt.hpp\"\n#define ELEM_MAKEHERMITIAN_INC \\\n  \"elemental/blas-like/level1/MakeHermitian.hpp\"\n#define ELEM_MAKEREAL_INC \\\n  \"elemental/blas-like/level1/MakeReal.hpp\"\n#define ELEM_MAKESYMMETRIC_INC \\\n  \"elemental/blas-like/level1/MakeSymmetric.hpp\"\n#define ELEM_MAKETRAPEZOIDAL_INC \\\n  \"elemental/blas-like/level1/MakeTrapezoidal.hpp\"\n#define ELEM_MAKETRIANGULAR_INC \\\n  \"elemental/blas-like/level1/MakeTriangular.hpp\"\n#define ELEM_MAX_INC \\\n  \"elemental/blas-like/level1/Max.hpp\"\n#define ELEM_MAXABS_INC \\\n  \"elemental/blas-like/level1/MaxAbs.hpp\"\n#define ELEM_MIN_INC \\\n  \"elemental/blas-like/level1/Min.hpp\"\n#define ELEM_MINABS_INC \\\n  \"elemental/blas-like/level1/MinAbs.hpp\"\n#define ELEM_NRM2_INC \\\n  \"elemental/blas-like/level1/Nrm2.hpp\"\n#define ELEM_QUASIDIAGONALSCALE_INC \\\n  \"elemental/blas-like/level1/QuasiDiagonalScale.hpp\"\n#define ELEM_QUASIDIAGONALSOLVE_INC \\\n  \"elemental/blas-like/level1/QuasiDiagonalSolve.hpp\"\n#define ELEM_SCALE_INC \\\n  \"elemental/blas-like/level1/Scale.hpp\"\n#define ELEM_SCALETRAPEZOID_INC \\\n  \"elemental/blas-like/level1/ScaleTrapezoid.hpp\"\n#define ELEM_SETDIAGONAL_INC \\\n  \"elemental/blas-like/level1/SetDiagonal.hpp\"\n#define ELEM_SWAP_INC \\\n  \"elemental/blas-like/level1/Swap.hpp\"\n#define ELEM_SYMMETRIC2X2INV_INC \\\n  \"elemental/blas-like/level1/Symmetric2x2Inv.hpp\"\n#define ELEM_SYMMETRIC2X2SCALE_INC \\\n  \"elemental/blas-like/level1/Symmetric2x2Scale.hpp\"\n#define ELEM_SYMMETRIC2X2SOLVE_INC \\\n  \"elemental/blas-like/level1/Symmetric2x2Solve.hpp\"\n#define ELEM_TRANSPOSE_INC \\\n  \"elemental/blas-like/level1/Transpose.hpp\"\n#define ELEM_UPDATEDIAGONAL_INC \\\n  \"elemental/blas-like/level1/UpdateDiagonal.hpp\"\n#define ELEM_ZERO_INC \\\n  \"elemental/blas-like/level1/Zero.hpp\"\n\n// Level 2 routines\n// ----------------\n#define ELEM_BLAS2_INC \"elemental/blas-like/level2.hpp\"\n\n#define ELEM_GEMV_INC \\\n  \"elemental/blas-like/level2/Gemv.hpp\"\n#define ELEM_GER_INC \\\n  \"elemental/blas-like/level2/Ger.hpp\"\n#define ELEM_GERU_INC \\\n  \"elemental/blas-like/level2/Geru.hpp\"\n#define ELEM_HEMV_INC \\\n  \"elemental/blas-like/level2/Hemv.hpp\"\n#define ELEM_HER2_INC \\\n  \"elemental/blas-like/level2/Her2.hpp\"\n#define ELEM_HER_INC \\\n  \"elemental/blas-like/level2/Her.hpp\"\n#define ELEM_QUASITRSV_INC \\\n  \"elemental/blas-like/level2/QuasiTrsv.hpp\"\n#define ELEM_SYMV_INC \\\n  \"elemental/blas-like/level2/Symv.hpp\"\n#define ELEM_SYR2_INC \\\n  \"elemental/blas-like/level2/Syr2.hpp\"\n#define ELEM_SYR_INC \\\n  \"elemental/blas-like/level2/Syr.hpp\"\n#define ELEM_TRMV_INC \\\n  \"elemental/blas-like/level2/Trmv.hpp\"\n#define ELEM_TRR2_INC \\\n  \"elemental/blas-like/level2/Trr2.hpp\"\n#define ELEM_TRR_INC \\\n  \"elemental/blas-like/level2/Trr.hpp\"\n#define ELEM_TRSV_INC \\\n  \"elemental/blas-like/level2/Trsv.hpp\"\n\n// Level 3 routines\n// ----------------\n#define ELEM_BLAS3_INC \"elemental/blas-like/level3.hpp\"\n\n#define ELEM_GEMM_INC         \"elemental/blas-like/level3/Gemm.hpp\"\n#define ELEM_HEMM_INC         \"elemental/blas-like/level3/Hemm.hpp\"\n#define ELEM_HER2K_INC        \"elemental/blas-like/level3/Her2k.hpp\"\n#define ELEM_HERK_INC         \"elemental/blas-like/level3/Herk.hpp\"\n#define ELEM_MULTISHIFTQUASITRSM_INC \\\n                            \"elemental/blas-like/level3/MultiShiftQuasiTrsm.hpp\"\n#define ELEM_MULTISHIFTTRSM_INC \\\n                            \"elemental/blas-like/level3/MultiShiftTrsm.hpp\"\n#define ELEM_QUASITRSM_INC    \"elemental/blas-like/level3/QuasiTrsm.hpp\"\n#define ELEM_SYMM_INC         \"elemental/blas-like/level3/Symm.hpp\"\n#define ELEM_SYR2K_INC        \"elemental/blas-like/level3/Syr2k.hpp\"\n#define ELEM_SYRK_INC         \"elemental/blas-like/level3/Syrk.hpp\"\n#define ELEM_TRDTRMM_INC      \"elemental/blas-like/level3/Trdtrmm.hpp\"\n#define ELEM_TRMM_INC         \"elemental/blas-like/level3/Trmm.hpp\"\n#define ELEM_TRSM_INC         \"elemental/blas-like/level3/Trsm.hpp\"\n#define ELEM_TRSTRM_INC       \"elemental/blas-like/level3/Trstrm.hpp\"\n#define ELEM_TRTRMM_INC       \"elemental/blas-like/level3/Trtrmm.hpp\"\n#define ELEM_TWOSIDEDTRMM_INC \"elemental/blas-like/level3/TwoSidedTrmm.hpp\"\n#define ELEM_TWOSIDEDTRSM_INC \"elemental/blas-like/level3/TwoSidedTrsm.hpp\"\n\n// LAPACK-like routines\n// ====================\n#define ELEM_LAPACK_INC      \"elemental/lapack-like.hpp\"\n#define ELEM_LAPACK_DECL_INC \"elemental/lapack-like/decl.hpp\"\n#define ELEM_LAPACK_IMPL_INC \"elemental/lapack-like/impl.hpp\"\n\n// Reduction to condensed form\n// ---------------------------\n#define ELEM_CONDENSE_INC      \"elemental/lapack-like/condense.hpp\"\n#define ELEM_CONDENSE_DECL_INC \"elemental/lapack-like/condense/decl.hpp\"\n#define ELEM_CONDENSE_IMPL_INC \"elemental/lapack-like/condense/impl.hpp\"\n\n#define ELEM_BIDIAG_INC \\\n  \"elemental/lapack-like/condense/Bidiag.hpp\"\n#define ELEM_HERMITIANTRIDIAG_INC \\\n  \"elemental/lapack-like/condense/HermitianTridiag.hpp\"\n#define ELEM_HESSENBERG_INC \\\n  \"elemental/lapack-like/condense/Hessenberg.hpp\"\n\n// Decompositions\n// --------------\n#define ELEM_DECOMP_INC      \"elemental/lapack-like/decomp.hpp\"\n#define ELEM_DECOMP_DECL_INC \"elemental/lapack-like/decomp/decl.hpp\"\n#define ELEM_DECOMP_IMPL_INC \"elemental/lapack-like/decomp/impl.hpp\"\n\n#define ELEM_HERMITIANEIG_INC \\\n  \"elemental/lapack-like/decomp/HermitianEig.hpp\"\n#define ELEM_HERMITIANGENDEFINITEEIG_INC \\\n  \"elemental/lapack-like/decomp/HermitianGenDefiniteEig.hpp\"\n#define ELEM_HERMITIANTRIDIAGEIG_INC \\\n  \"elemental/lapack-like/decomp/HermitianTridiagEig.hpp\"\n#define ELEM_POLAR_INC \\\n  \"elemental/lapack-like/decomp/Polar.hpp\"\n#define ELEM_SCHUR_INC \\\n  \"elemental/lapack-like/decomp/Schur.hpp\"\n#define ELEM_SKEWHERMITIANEIG_INC \\\n  \"elemental/lapack-like/decomp/SkewHermitianEig.hpp\"\n#define ELEM_SVD_INC \\\n  \"elemental/lapack-like/decomp/SVD.hpp\"\n\n// Specific HermitianEig routines\n// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n#define ELEM_HERMITIANEIG_SDC_INC \\\n  \"elemental/lapack-like/decomp/HermitianEig/SDC.hpp\"\n\n// Specific HermitianTridiagEig routines\n// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n#define ELEM_HERMITIANTRIDIAGEIG_SORT_INC \\\n  \"elemental/lapack-like/decomp/HermitianTridiagEig/Sort.hpp\"\n\n// Specific Polar routines\n// ^^^^^^^^^^^^^^^^^^^^^^^\n#define ELEM_POLAR_QDWH_INC \\\n  \"elemental/lapack-like/decomp/Polar/QDWH.hpp\"\n#define ELEM_POLAR_SVD_INC \\\n  \"elemental/lapack-like/decomp/Polar/SVD.hpp\"\n\n// Specific Schur routines\n// ^^^^^^^^^^^^^^^^^^^^^^^\n#define ELEM_SCHUR_INVERSEFREESDC_INC \\\n  \"elemental/lapack-like/decomp/Schur/InverseFreeSDC.hpp\"\n#define ELEM_SCHUR_QR_INC \\\n  \"elemental/lapack-like/decomp/Schur/QR.hpp\"\n#define ELEM_SCHUR_SDC_INC \\\n  \"elemental/lapack-like/decomp/Schur/SDC.hpp\"\n\n// Factorizations\n// --------------\n#define ELEM_FACTOR_INC      \"elemental/lapack-like/factor.hpp\"\n#define ELEM_FACTOR_DECL_INC \"elemental/lapack-like/factor/decl.hpp\"\n#define ELEM_FACTOR_IMPL_INC \"elemental/lapack-like/factor/impl.hpp\"\n\n#define ELEM_CHOLESKY_INC \\\n  \"elemental/lapack-like/factor/Cholesky.hpp\"\n#define ELEM_LDL_INC \\\n  \"elemental/lapack-like/factor/LDL.hpp\"\n#define ELEM_LU_INC \\\n  \"elemental/lapack-like/factor/LU.hpp\"\n\n#define ELEM_LQ_INC \\\n  \"elemental/lapack-like/factor/LQ.hpp\"\n#define ELEM_QR_INC \\\n  \"elemental/lapack-like/factor/QR.hpp\"\n#define ELEM_RQ_INC \\\n  \"elemental/lapack-like/factor/RQ.hpp\"\n\n#define ELEM_GQR_INC \\\n  \"elemental/lapack-like/factor/GQR.hpp\"\n#define ELEM_GRQ_INC \\\n  \"elemental/lapack-like/factor/GRQ.hpp\"\n\n#define ELEM_ID_INC \\\n  \"elemental/lapack-like/factor/ID.hpp\"\n#define ELEM_SKELETON_INC \\\n  \"elemental/lapack-like/factor/Skeleton.hpp\"\n\n// Specific LDL routines\n// ^^^^^^^^^^^^^^^^^^^^^\n#define ELEM_LDL_INERTIA_INC \\\n  \"elemental/lapack-like/factor/LDL/Inertia.hpp\"\n#define ELEM_LDL_MULTIPLYAFTER_INC \\\n  \"elemental/lapack-like/factor/LDL/MultiplyAfter.hpp\"\n#define ELEM_LDL_PIVOTED_INC \\\n  \"elemental/lapack-like/factor/LDL/Pivoted.hpp\"\n#define ELEM_LDL_SOLVEAFTER_INC \\\n  \"elemental/lapack-like/factor/LDL/SolveAfter.hpp\"\n#define ELEM_LDL_VAR3_INC \\\n  \"elemental/lapack-like/factor/LDL/Var3.hpp\"\n\n// Specific LQ routines\n// ^^^^^^^^^^^^^^^^^^^^\n#define ELEM_LQ_APPLYQ_INC \\\n  \"elemental/lapack-like/factor/LQ/ApplyQ.hpp\"\n#define ELEM_LQ_EXPLICIT_INC \\\n  \"elemental/lapack-like/factor/LQ/Explicit.hpp\"\n#define ELEM_LQ_HOUSEHOLDER_INC \\\n  \"elemental/lapack-like/factor/LQ/Householder.hpp\"\n#define ELEM_LQ_PANELHOUSEHOLDER_INC \\\n  \"elemental/lapack-like/factor/LQ/PanelHouseholder.hpp\"\n\n// Specific LU routines\n// ^^^^^^^^^^^^^^^^^^^^\n#define ELEM_LU_FULL_INC \\\n  \"elemental/lapack-like/factor/LU/Full.hpp\"\n#define ELEM_LU_LOCAL_INC \\\n  \"elemental/lapack-like/factor/LU/Local.hpp\"\n#define ELEM_LU_PANEL_INC \\\n  \"elemental/lapack-like/factor/LU/Panel.hpp\"\n#define ELEM_LU_SOLVEAFTER_INC \\\n  \"elemental/lapack-like/factor/LU/SolveAfter.hpp\"\n\n// Specific QR routines\n// ^^^^^^^^^^^^^^^^^^^^\n#define ELEM_QR_APPLYQ_INC \\\n  \"elemental/lapack-like/factor/QR/ApplyQ.hpp\"\n#define ELEM_QR_BUSINGERGOLUB_INC \\\n  \"elemental/lapack-like/factor/QR/BusingerGolub.hpp\"\n#define ELEM_QR_CHOLESKY_INC \\\n  \"elemental/lapack-like/factor/QR/Cholesky.hpp\"\n#define ELEM_QR_EXPLICIT_INC \\\n  \"elemental/lapack-like/factor/QR/Explicit.hpp\"\n#define ELEM_QR_HOUSEHOLDER_INC \\\n  \"elemental/lapack-like/factor/QR/Householder.hpp\"\n#define ELEM_QR_PANELHOUSEHOLDER_INC \\\n  \"elemental/lapack-like/factor/QR/PanelHouseholder.hpp\"\n#define ELEM_QR_TS_INC \\\n  \"elemental/lapack-like/factor/QR/TS.hpp\"\n\n// Specific RQ routines\n// ^^^^^^^^^^^^^^^^^^^^\n#define ELEM_RQ_APPLYQ_INC \\\n  \"elemental/lapack-like/factor/RQ/ApplyQ.hpp\"\n#define ELEM_RQ_CHOLESKY_INC \\\n  \"elemental/lapack-like/factor/RQ/Cholesky.hpp\"\n#define ELEM_RQ_HOUSEHOLDER_INC \\\n  \"elemental/lapack-like/factor/RQ/Householder.hpp\"\n#define ELEM_RQ_PANELHOUSEHOLDER_INC \\\n  \"elemental/lapack-like/factor/RQ/PanelHouseholder.hpp\"\n\n// Matrix functions\n// ----------------\n#define ELEM_FUNCS_INC      \"elemental/lapack-like/funcs.hpp\"\n#define ELEM_FUNCS_DECL_INC \"elemental/lapack-like/funcs/decl.hpp\"\n#define ELEM_FUNCS_IMPL_INC \"elemental/lapack-like/funcs/impl.hpp\"\n\n#define ELEM_HERMITIANFUNCTION_INC \\\n  \"elemental/lapack-like/funcs/HermitianFunction.hpp\"\n#define ELEM_INVERSE_INC \\\n  \"elemental/lapack-like/funcs/Inverse.hpp\"\n#define ELEM_PSEUDOINVERSE_INC \\\n  \"elemental/lapack-like/funcs/Pseudoinverse.hpp\"\n#define ELEM_SIGN_INC \\\n  \"elemental/lapack-like/funcs/Sign.hpp\"\n#define ELEM_SQUAREROOT_INC \\\n  \"elemental/lapack-like/funcs/SquareRoot.hpp\"\n// Specific inversion routines\n// ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n#define ELEM_TRIANGULARINVERSE_INC \\\n  \"elemental/lapack-like/funcs/Inverse/Triangular.hpp\"\n#define ELEM_GENERALINVERSE_INC \\\n  \"elemental/lapack-like/funcs/Inverse/General.hpp\"\n#define ELEM_HPDINVERSE_INC \\\n  \"elemental/lapack-like/funcs/Inverse/HPD.hpp\"\n#define ELEM_SYMMETRICINVERSE_INC \\\n  \"elemental/lapack-like/funcs/Inverse/Symmetric.hpp\"\n#define ELEM_HERMITIANINVERSE_INC \\\n  \"elemental/lapack-like/funcs/Inverse/Hermitian.hpp\"\n\n// Permutations\n// ------------\n#define ELEM_APPLYCOLPIVOTS_INC \\\n  \"elemental/lapack-like/perm/ApplyColPivots.hpp\"\n#define ELEM_APPLYROWPIVOTS_INC \\\n  \"elemental/lapack-like/perm/ApplyRowPivots.hpp\"\n#define ELEM_APPLYSYMMETRICPIVOTS_INC \\\n  \"elemental/lapack-like/perm/ApplySymmetricPivots.hpp\"\n#define ELEM_EXPLICITPERMUTATION_INC \\\n  \"elemental/lapack-like/perm/ExplicitPermutation.hpp\"\n#define ELEM_INVERTPERMUTATION_INC \\\n  \"elemental/lapack-like/perm/InvertPermutation.hpp\"\n#define ELEM_PERMUTATIONMETA_INC \\\n  \"elemental/lapack-like/perm/PermutationMeta.hpp\"\n#define ELEM_PERMUTECOLS_INC \\\n  \"elemental/lapack-like/perm/PermuteCols.hpp\"\n#define ELEM_PERMUTEROWS_INC \\\n  \"elemental/lapack-like/perm/PermuteRows.hpp\"\n#define ELEM_PIVOTSTOPARTIALPERMUTATION_INC \\\n  \"elemental/lapack-like/perm/PivotsToPartialPermutation.hpp\"\n#define ELEM_PIVOTSTOPERMUTATION_INC \\\n  \"elemental/lapack-like/perm/PivotsToPermutation.hpp\"\n\n// Matrix properties\n// -----------------\n#define ELEM_PROPS_INC      \"elemental/lapack-like/props.hpp\"\n#define ELEM_PROPS_DECL_INC \"elemental/lapack-like/props/decl.hpp\"\n#define ELEM_PROPS_IMPL_INC \"elemental/lapack-like/props/impl.hpp\"\n\n#define ELEM_CONDITION_INC \\\n  \"elemental/lapack-like/props/Condition.hpp\"\n#define ELEM_DETERMINANT_INC \\\n  \"elemental/lapack-like/props/Determinant.hpp\"\n#define ELEM_INERTIA_INC \\\n  \"elemental/lapack-like/props/Inertia.hpp\"\n#define ELEM_NORM_INC \\\n  \"elemental/lapack-like/props/Norm.hpp\"\n#define ELEM_PSEUDOSPECTRUM_INC \\\n  \"elemental/lapack-like/props/Pseudospectrum.hpp\"\n#define ELEM_TRACE_INC \\\n  \"elemental/lapack-like/props/Trace.hpp\"\n// Specific condition-number routines\n// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n#define ELEM_FROBENIUSCONDITION_INC \\\n  \"elemental/lapack-like/props/Condition/Frobenius.hpp\"\n#define ELEM_INFINITYCONDITION_INC \\\n  \"elemental/lapack-like/props/Condition/Infinity.hpp\"\n#define ELEM_MAXCONDITION_INC \\\n  \"elemental/lapack-like/props/Condition/Max.hpp\"\n#define ELEM_ONECONDITION_INC \\\n  \"elemental/lapack-like/props/Condition/One.hpp\"\n#define ELEM_TWOCONDITION_INC \\\n  \"elemental/lapack-like/props/Condition/Two.hpp\"\n// Specific norm routines\n// ^^^^^^^^^^^^^^^^^^^^^^\n#define ELEM_ENTRYWISENORM_INC \\\n  \"elemental/lapack-like/props/Norm/Entrywise.hpp\"\n#define ELEM_ENTRYWISEONENORM_INC \\\n  \"elemental/lapack-like/props/Norm/EntrywiseOne.hpp\"\n#define ELEM_FROBENIUSNORM_INC \\\n  \"elemental/lapack-like/props/Norm/Frobenius.hpp\"\n#define ELEM_INFINITYNORM_INC \\\n  \"elemental/lapack-like/props/Norm/Infinity.hpp\"\n#define ELEM_KYFANNORM_INC \\\n  \"elemental/lapack-like/props/Norm/KyFan.hpp\"\n#define ELEM_MAXNORM_INC \\\n  \"elemental/lapack-like/props/Norm/Max.hpp\"\n#define ELEM_NUCLEARNORM_INC \\\n  \"elemental/lapack-like/props/Norm/Nuclear.hpp\"\n#define ELEM_ONENORM_INC \\\n  \"elemental/lapack-like/props/Norm/One.hpp\"\n#define ELEM_SCHATTENNORM_INC \\\n  \"elemental/lapack-like/props/Norm/Schatten.hpp\"\n#define ELEM_TWONORMESTIMATE_INC \\\n  \"elemental/lapack-like/props/Norm/TwoEstimate.hpp\"\n#define ELEM_TWONORM_INC \\\n  \"elemental/lapack-like/props/Norm/Two.hpp\"\n#define ELEM_ZERONORM_INC \\\n  \"elemental/lapack-like/props/Norm/Zero.hpp\"\n\n// Solvers\n// -------\n#define ELEM_SOLVE_INC      \"elemental/lapack-like/solve.hpp\"\n#define ELEM_SOLVE_DECL_INC \"elemental/lapack-like/solve/decl.hpp\"\n#define ELEM_SOLVE_IMPL_INC \"elemental/lapack-like/solve/impl.hpp\"\n\n#define ELEM_GAUSSIANELIMINATION_INC \\\n  \"elemental/lapack-like/solve/GaussianElimination.hpp\"\n#define ELEM_HPDSOLVE_INC \\\n  \"elemental/lapack-like/solve/HPDSolve.hpp\"\n\n#define ELEM_HERMITIANSOLVE_INC \\\n  \"elemental/lapack-like/solve/HermitianSolve.hpp\"\n#define ELEM_SYMMETRICSOLVE_INC \\\n  \"elemental/lapack-like/solve/SymmetricSolve.hpp\"\n\n#define ELEM_LEASTSQUARES_INC \\\n  \"elemental/lapack-like/solve/LeastSquares.hpp\"\n\n#define ELEM_GLM_INC \\\n  \"elemental/lapack-like/solve/GLM.hpp\"\n#define ELEM_LSE_INC \\\n  \"elemental/lapack-like/solve/LSE.hpp\"\n\n#define ELEM_MULTISHIFTHESSSOLVE_INC \\\n  \"elemental/lapack-like/solve/MultiShiftHessSolve.hpp\"\n\n// Utilities\n// ---------\n#define ELEM_LAPACKUTIL_INC      \"elemental/lapack-like/util.hpp\"\n#define ELEM_LAPACKUTIL_DECL_INC \"elemental/lapack-like/util/decl.hpp\"\n#define ELEM_LAPACKUTIL_IMPL_INC \"elemental/lapack-like/util/impl.hpp\"\n\n#define ELEM_APPLYPACKEDREFLECTORS_INC \\\n  \"elemental/lapack-like/util/ApplyPackedReflectors.hpp\"\n#define ELEM_EXPANDPACKEDREFLECTORS_INC \\\n  \"elemental/lapack-like/util/ExpandPackedReflectors.hpp\"\n#define ELEM_HYPERBOLICREFLECTOR_INC \\\n  \"elemental/lapack-like/util/HyperbolicReflector.hpp\"\n#define ELEM_MEDIAN_INC \\\n  \"elemental/lapack-like/util/Median.hpp\"\n#define ELEM_PERMUTATIONPARITY_INC \\\n  \"elemental/lapack-like/util/PermutationParity.hpp\"\n#define ELEM_PIVOTPARITY_INC \\\n  \"elemental/lapack-like/util/PivotParity.hpp\"\n#define ELEM_REFLECTOR_INC \\\n  \"elemental/lapack-like/util/Reflector.hpp\"\n#define ELEM_SORT_INC \\\n  \"elemental/lapack-like/util/Sort.hpp\"\n\n// Special matrices\n// ================\n#define ELEM_MATRICES_INC      \"elemental/matrices.hpp\"\n#define ELEM_MATRICES_DECL_INC \"elemental/matrices/decl.hpp\"\n#define ELEM_MATRICES_IMPL_INC \"elemental/matrices/impl.hpp\"\n\n// Deterministic matrices\n// ----------------------\n#define ELEM_BULLSHEAD_INC        \"elemental/matrices/BullsHead.hpp\"\n#define ELEM_CAUCHY_INC           \"elemental/matrices/Cauchy.hpp\"\n#define ELEM_CAUCHYLIKE_INC       \"elemental/matrices/CauchyLike.hpp\"\n#define ELEM_CIRCULANT_INC        \"elemental/matrices/Circulant.hpp\"\n#define ELEM_DEMMEL_INC           \"elemental/matrices/Demmel.hpp\"\n#define ELEM_DIAGONAL_INC         \"elemental/matrices/Diagonal.hpp\"\n#define ELEM_EGOROV_INC           \"elemental/matrices/Egorov.hpp\"\n#define ELEM_EXTENDEDKAHAN_INC    \"elemental/matrices/ExtendedKahan.hpp\"\n#define ELEM_FIEDLER_INC          \"elemental/matrices/Fiedler.hpp\"\n#define ELEM_FORSYTHE_INC         \"elemental/matrices/Forsythe.hpp\"\n#define ELEM_FOURIER_INC          \"elemental/matrices/Fourier.hpp\"\n#define ELEM_FOXLI_INC            \"elemental/matrices/FoxLi.hpp\"\n#define ELEM_GCDMATRIX_INC        \"elemental/matrices/GCDMatrix.hpp\"\n#define ELEM_GEAR_INC             \"elemental/matrices/Gear.hpp\"\n#define ELEM_GKS_INC              \"elemental/matrices/GKS.hpp\"\n#define ELEM_GRCAR_INC            \"elemental/matrices/Grcar.hpp\"\n#define ELEM_HANKEL_INC           \"elemental/matrices/Hankel.hpp\"\n#define ELEM_HANOWA_INC           \"elemental/matrices/Hanowa.hpp\"\n#define ELEM_HELMHOLTZ_INC        \"elemental/matrices/Helmholtz.hpp\"\n#define ELEM_HELMHOLTZPML_INC     \"elemental/matrices/HelmholtzPML.hpp\"\n#define ELEM_HERMITIANFROMEVD_INC \"elemental/matrices/HermitianFromEVD.hpp\"\n#define ELEM_HILBERT_INC          \"elemental/matrices/Hilbert.hpp\"\n#define ELEM_IDENTITY_INC         \"elemental/matrices/Identity.hpp\"\n#define ELEM_JORDAN_INC           \"elemental/matrices/Jordan.hpp\"\n#define ELEM_KAHAN_INC            \"elemental/matrices/Kahan.hpp\"\n#define ELEM_KMS_INC              \"elemental/matrices/KMS.hpp\"\n#define ELEM_LAPLACIAN_INC        \"elemental/matrices/Laplacian.hpp\"\n#define ELEM_LAUCHLI_INC          \"elemental/matrices/Lauchli.hpp\"\n#define ELEM_LEGENDRE_INC         \"elemental/matrices/Legendre.hpp\"\n#define ELEM_LEHMER_INC           \"elemental/matrices/Lehmer.hpp\"\n#define ELEM_LOTKIN_INC           \"elemental/matrices/Lotkin.hpp\"\n#define ELEM_MINIJ_INC            \"elemental/matrices/MinIJ.hpp\"\n#define ELEM_NORMALFROMEVD_INC    \"elemental/matrices/NormalFromEVD.hpp\"\n#define ELEM_ONES_INC             \"elemental/matrices/Ones.hpp\"\n#define ELEM_ONETWOONE_INC        \"elemental/matrices/OneTwoOne.hpp\"\n#define ELEM_PARTER_INC           \"elemental/matrices/Parter.hpp\"\n#define ELEM_PEI_INC              \"elemental/matrices/Pei.hpp\"\n#define ELEM_REDHEFFER_INC        \"elemental/matrices/Redheffer.hpp\"\n#define ELEM_RIEMANN_INC          \"elemental/matrices/Riemann.hpp\"\n#define ELEM_RIS_INC              \"elemental/matrices/Ris.hpp\"\n#define ELEM_TOEPLITZ_INC         \"elemental/matrices/Toeplitz.hpp\"\n#define ELEM_TREFETHEN_INC        \"elemental/matrices/Trefethen.hpp\"\n#define ELEM_TRIANGLE_INC         \"elemental/matrices/Triangle.hpp\"\n#define ELEM_TRIW_INC             \"elemental/matrices/TriW.hpp\"\n#define ELEM_WALSH_INC            \"elemental/matrices/Walsh.hpp\"\n#define ELEM_WHALE_INC            \"elemental/matrices/Whale.hpp\"\n#define ELEM_WILKINSON_INC        \"elemental/matrices/Wilkinson.hpp\"\n#define ELEM_ZEROS_INC            \"elemental/matrices/Zeros.hpp\"\n\n// Random matrices\n// ---------------\n#define ELEM_GAUSSIAN_INC \\\n  \"elemental/matrices/Gaussian.hpp\"\n#define ELEM_HAAR_INC \\\n  \"elemental/matrices/Haar.hpp\"\n#define ELEM_HATANONELSON_INC \\\n  \"elemental/matrices/HatanoNelson.hpp\"\n#define ELEM_HERMITIANUNIFORMSPECTRUM_INC \\\n  \"elemental/matrices/HermitianUniformSpectrum.hpp\"\n#define ELEM_NORMALUNIFORMSPECTRUM_INC \\\n  \"elemental/matrices/NormalUniformSpectrum.hpp\"\n#define ELEM_UNIFORM_INC \\\n  \"elemental/matrices/Uniform.hpp\"\n#define ELEM_UNIFORMHELMHOLTZGREENS_INC \\\n  \"elemental/matrices/UniformHelmholtzGreens.hpp\"\n#define ELEM_WIGNER_INC \\\n  \"elemental/matrices/Wigner.hpp\"\n\n// Input/output\n// ============\n#define ELEM_IO_INC      \"elemental/io.hpp\"\n#define ELEM_IO_DECL_INC \"elemental/io/decl.hpp\"\n#define ELEM_IO_IMPL_INC \"elemental/io/impl.hpp\"\n\n#define ELEM_DISPLAY_INC \"elemental/io/Display.hpp\"\n#define ELEM_PRINT_INC   \"elemental/io/Print.hpp\"\n#define ELEM_READ_INC    \"elemental/io/Read.hpp\"\n#define ELEM_SPY_INC     \"elemental/io/Spy.hpp\"\n#define ELEM_WRITE_INC   \"elemental/io/Write.hpp\"\n\n// Convex optimization\n// ===================\n#define ELEM_CONVEX_INC      \"elemental/convex.hpp\"\n#define ELEM_CONVEX_DECL_INC \"elemental/convex/decl.hpp\"\n#define ELEM_CONVEX_IMPL_INC \"elemental/convex/impl.hpp\"\n\n// Utilities\n// ---------\n#define ELEM_CLIP_INC          \"elemental/convex/Clip.hpp\"\n#define ELEM_COVARIANCE_INC    \"elemental/convex/Covariance.hpp\"\n#define ELEM_LOGBARRIER_INC    \"elemental/convex/LogBarrier.hpp\"\n#define ELEM_LOGDETDIV_INC     \"elemental/convex/LogDetDiv.hpp\"\n#define ELEM_SOFTTHRESHOLD_INC \"elemental/convex/SoftThreshold.hpp\"\n#define ELEM_SVT_INC           \"elemental/convex/SVT.hpp\"\n// Specific SVT routines\n// ^^^^^^^^^^^^^^^^^^^^^\n#define ELEM_SVT_CROSS_INC     \"elemental/convex/SVT/Cross.hpp\"\n#define ELEM_SVT_NORMAL_INC    \"elemental/convex/SVT/Normal.hpp\"\n#define ELEM_SVT_PIVOTEDQR_INC \"elemental/convex/SVT/PivotedQR.hpp\"\n#define ELEM_SVT_TSQR_INC      \"elemental/convex/SVT/TSQR.hpp\"\n\n// ADMM\n// ----\n#define ELEM_BASISPURSUIT_INC     \"elemental/convex/BasisPursuit.hpp\"\n#define ELEM_LINEARPROGRAM_INC    \"elemental/convex/LinearProgram.hpp\"\n#define ELEM_QUADRATICPROGRAM_INC \"elemental/convex/QuadraticProgram.hpp\"\n#define ELEM_SPARSEINVCOV_INC     \"elemental/convex/SparseInvCov.hpp\"\n\n\n#endif // ifndef ELEM_INCLUDEPATHS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/ComplexDisplayWindow-premoc.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IO_COMPLEXDISPLAYWINDOW_DECL_HPP\n#define ELEM_IO_COMPLEXDISPLAYWINDOW_DECL_HPP\n\n// Not currently guarded due to CMake MOC handling requiring extra flags\n//#ifdef ELEM_HAVE_QT5\n\n#include <QPushButton>\n#include <QScrollArea>\n#include <QWidget>\n\n#include \"elemental/include-paths.hpp\"\n#include \"elemental/config.h\"\n#ifdef ELEM_HAVE_F90_INTERFACE\n# include \"elemental/FCMangle.h\"\n#endif\n#include \"elemental/core.hpp\"\n#include \"elemental/blas-like/decl.hpp\"\n#include \"elemental/lapack-like/decl.hpp\"\n#include \"elemental/convex/decl.hpp\"\n#include \"elemental/io/DisplayWidget/decl.hpp\"\n\nnamespace elem {\n\n// Unfortunately Q_OBJECT does not support templates...\nclass ComplexDisplayWindow : public QWidget\n{\n    Q_OBJECT\n\npublic:\n    ComplexDisplayWindow( QWidget* parent=0 );    \n    ~ComplexDisplayWindow();\n\n    void Display\n    ( const Matrix<Complex<double>>* A, \n      QString title=QString(\"Default title\") );\n    void Display\n    ( const Matrix<Complex<double>>* A, \n      double minRealVal, double maxRealVal,\n      double minImagVal, double maxImagVal,\n      QString title=QString(\"Default title\") );\n\nprivate:\n    QScrollArea *realScroll_, *imagScroll_;\n    DisplayWidget<Complex<double>> *realDisplay_, *imagDisplay_;\n    const Matrix<Complex<double>> *matrix_;\n\npublic slots:\n    void SaveReal();\n    void SaveImag();\n    void SetScale( bool global );\n};\n\n} // namespace elem\n\n//#endif // ifdef ELEM_HAVE_QT5\n\n#endif // ifndef ELEM_IO_COMPLEXDISPLAYWINDOW_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Display.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISPLAY_HPP\n#define ELEM_DISPLAY_HPP\n\n#ifdef ELEM_HAVE_QT5\n# include \"./DisplayWindow-premoc.hpp\"\n# include \"./ComplexDisplayWindow-premoc.hpp\"\n# include \"./DisplayWidget/impl.hpp\"\n# include <QApplication>\n#endif\n\nnamespace elem {\n\ninline void\nProcessEvents( int numMsecs )\n{\n#ifdef ELEM_HAVE_QT5\n    QCoreApplication::instance()->processEvents\n    ( QEventLoop::AllEvents, numMsecs );\n#endif\n}\n\ntemplate<typename T>\ninline void\nDisplay( const Matrix<T>& A, std::string title=\"Default\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Display\"))\n#ifdef ELEM_HAVE_QT5\n    if( GuiDisabled() )\n    {\n        Print( A, title );\n        return;\n    }\n\n    // Convert A to double-precision since Qt's MOC does not support templates\n    const Int m = A.Height();\n    const Int n = A.Width();\n    Matrix<double>* ADouble = new Matrix<double>( m, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            ADouble->Set( i, j, double(A.Get(i,j)) );\n\n    QString qTitle = QString::fromStdString( title );\n    DisplayWindow* displayWindow = new DisplayWindow;\n    displayWindow->Display( ADouble, qTitle );\n    displayWindow->show();\n\n    // Spend at most 200 milliseconds rendering\n    ProcessEvents( 200 );\n#else\n    Print( A, title );\n#endif\n}\n\ntemplate<typename T>\ninline void\nDisplay( const Matrix<Complex<T>>& A, std::string title=\"Default\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Display\"))\n#ifdef ELEM_HAVE_QT5\n    if( GuiDisabled() )\n    {\n        Print( A, title );\n        return;\n    }\n\n    // Convert A to double-precision since Qt's MOC does not support templates\n    const Int m = A.Height();\n    const Int n = A.Width();\n    Matrix<Complex<double>>* ADouble = new Matrix<Complex<double>>( m, n );\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            const Complex<T> alpha = A.Get(i,j);\n            const Complex<double> alphaDouble = \n                Complex<double>(alpha.real(),alpha.imag()); \n            ADouble->Set( i, j, alphaDouble );\n        }\n    }\n\n    QString qTitle = QString::fromStdString( title );\n    ComplexDisplayWindow* displayWindow = new ComplexDisplayWindow;\n    displayWindow->Display( ADouble, qTitle );\n    displayWindow->show();\n\n    // Spend at most 200 milliseconds rendering\n    ProcessEvents( 200 );\n#else\n    Print( A, title );\n#endif\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nDisplay( const DistMatrix<T,U,V>& A, std::string title=\"Default\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Display\"))\n#ifdef ELEM_HAVE_QT5\n    if( GuiDisabled() )\n    {\n        Print( A, title );\n        return;\n    }\n\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() && A.RedundantRank() == 0 )\n            Display( A.LockedMatrix(), title );\n    }\n    else\n    {\n        DistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n            Display( A_CIRC_CIRC.Matrix(), title );\n    }\n#else\n    Print( A, title );\n#endif\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nDisplay( const BlockDistMatrix<T,U,V>& A, std::string title=\"Default\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Display\"))\n#ifdef ELEM_HAVE_QT5\n    if( GuiDisabled() )\n    {\n        Print( A, title );\n        return;\n    }\n\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() && A.RedundantRank() == 0 )\n            Display( A.LockedMatrix(), title );\n    }\n    else\n    {\n        BlockDistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n            Display( A_CIRC_CIRC.Matrix(), title );\n    }\n#else\n    Print( A, title );\n#endif\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_DISPLAY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/DisplayWidget/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISPLAYWIDGET_DECL_HPP\n#define ELEM_DISPLAYWIDGET_DECL_HPP\n#ifdef ELEM_HAVE_QT5\n\n#include <QWidget>\n\nnamespace elem {\n\ntemplate<typename T>\nclass DisplayWidget : public QWidget\n{\npublic:\n    DisplayWidget( QWidget* parent=0 );\n    ~DisplayWidget();\n    // TODO: Generalize to function which displays f(A), where f is functor\n    void DisplayReal( const Matrix<T>* A );\n    void DisplayReal( const Matrix<T>* A, Base<T> minVal, Base<T> maxVal );\n    void DisplayImag( const Matrix<T>* A );\n    void DisplayImag( const Matrix<T>* A, Base<T> minVal, Base<T> maxVal );\n    // TODO: Add colorbar\n\n    void SavePng( std::string basename ) const;\n\nprotected:\n    void paintEvent( QPaintEvent* event );\n\nprivate:\n    QPixmap pixmap_;\n};\n\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_QT5\n#endif // ifndef ELEM_DISPLAYWIDGET_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/DisplayWidget/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DISPLAYWIDGET_IMPL_HPP\n#define ELEM_DISPLAYWIDGET_IMPL_HPP\n\n#ifdef ELEM_HAVE_QT5\n\n#include <QFile>\n#include <QPainter>\n#include <QPixmap>\n#include <QStylePainter>\n\n#include \"./decl.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline\nDisplayWidget<T>::DisplayWidget( QWidget* parent )\n: QWidget(parent)\n{ }\n\ntemplate<typename T>\ninline\nDisplayWidget<T>::~DisplayWidget()\n{ }\n\ntemplate<typename T>\ninline void \nDisplayWidget<T>::paintEvent( QPaintEvent* event )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWidget::paintEvent\"))\n    QStylePainter painter( this );\n    painter.drawPixmap( 0, 0, pixmap_ );\n}\n\ntemplate<typename T>\ninline void \nDisplayWidget<T>::DisplayReal( const Matrix<T>* A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWidget::DisplayReal\"))\n    typedef Base<T> Real;\n    const Int m = A->Height();\n    const Int n = A->Width();\n    if( m == 0 || n == 0 )\n        return;\n\n    // Compute the range of the real values in A\n    Real minVal=0, maxVal=0;\n    minVal = maxVal = A->GetRealPart( 0, 0 );\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            minVal = std::min( minVal, A->GetRealPart(i,j) );\n            maxVal = std::max( maxVal, A->GetRealPart(i,j) );\n        }\n    }\n\n    DisplayReal( A, minVal, maxVal );\n}\n\ntemplate<typename T>\ninline void \nDisplayWidget<T>::DisplayReal\n( const Matrix<T>* A, Base<T> minVal, Base<T> maxVal )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWidget::DisplayReal\"))\n    const Int m = A->Height();\n    const Int n = A->Width();\n    if( m == 0 || n == 0 )\n        return;\n\n    // TODO: Parameterize these instead\n    const Int mPix = 2*m;\n    const Int nPix = 2*n;\n    const double mRatio = double(m) / double(mPix);\n    const double nRatio = double(n) / double(nPix);\n    pixmap_ = QPixmap( nPix, mPix );\n    resize( nPix, mPix );\n\n    // Paint the matrix\n    QPainter painter( &pixmap_ );\n    painter.initFrom( this );\n    for( Int jPix=0; jPix<nPix; ++jPix ) \n    {\n        const Int j = nRatio*jPix;\n        for( Int iPix=0; iPix<mPix; ++iPix )\n        {\n            const Int i = mRatio*iPix;\n            QRgb color = SampleColorMap( A->GetRealPart(i,j), minVal, maxVal );\n            painter.setPen( color );\n            painter.drawPoint( jPix, iPix );\n        }\n    }\n\n    // Refresh the widget\n    update();\n\n    // Keep track of the extrema to allow for consistent visualization\n    UpdateMinRealWindowVal( minVal );\n    UpdateMaxRealWindowVal( maxVal );\n}\n\ntemplate<typename T>\ninline void \nDisplayWidget<T>::DisplayImag( const Matrix<T>* A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWidget::DisplayImag\"))\n    typedef Base<T> Real;\n    const Int m = A->Height();\n    const Int n = A->Width();\n    if( m == 0 || n == 0 )\n        return;\n\n    // Compute the range of the real values in A\n    Real minVal=0, maxVal=0;\n    minVal = maxVal = A->GetImagPart( 0, 0 );\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            minVal = std::min( minVal, A->GetImagPart(i,j) );\n            maxVal = std::max( maxVal, A->GetImagPart(i,j) );\n        }\n    }\n\n    DisplayImag( A, minVal, maxVal );\n}\n\ntemplate<typename T>\ninline void \nDisplayWidget<T>::DisplayImag\n( const Matrix<T>* A, Base<T> minVal, Base<T> maxVal )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWidget::DisplayImag\"))\n    const Int m = A->Height();\n    const Int n = A->Width();\n    if( m == 0 || n == 0 )\n        return;\n\n    // TODO: Parameterize these instead\n    const Int mPix = 2*m;\n    const Int nPix = 2*n;\n    const double mRatio = double(m) / double(mPix);\n    const double nRatio = double(n) / double(nPix);\n    pixmap_ = QPixmap( nPix, mPix );\n    resize( nPix, mPix );\n\n    // Paint the matrix\n    QPainter painter( &pixmap_ );\n    painter.initFrom( this );\n    for( Int jPix=0; jPix<nPix; ++jPix ) \n    {\n        const Int j = nRatio*jPix;\n        for( Int iPix=0; iPix<mPix; ++iPix )\n        {\n            const Int i = mRatio*iPix;\n            QRgb color = SampleColorMap( A->GetImagPart(i,j), minVal, maxVal );\n            painter.setPen( color );\n            painter.drawPoint( jPix, iPix );\n        }\n    }\n\n    // Refresh the widget\n    update();\n\n    // Keep track of the extrema to allow for consistent visualization\n    UpdateMinImagWindowVal( minVal );\n    UpdateMaxImagWindowVal( maxVal );\n}\n\ntemplate<typename T>\ninline void \nDisplayWidget<T>::SavePng( std::string basename ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWidget::SavePng\"))\n    std::string filename = basename + \".png\";\n    QFile file( filename.c_str() );\n    file.open( QIODevice::WriteOnly );\n    pixmap_.save( &file, \"PNG\" );\n}\n\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_QT5\n\n#endif // ifndef ELEM_DISPLAYWIDGET_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/DisplayWindow-premoc.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IO_DISPLAYWINDOW_DECL_HPP\n#define ELEM_IO_DISPLAYWINDOW_DECL_HPP\n\n// Not currently guarded due to CMake MOC handling requiring extra flags\n//#ifdef ELEM_HAVE_QT5\n\n#include <QPushButton>\n#include <QScrollArea>\n#include <QWidget>\n\n#include \"elemental/include-paths.hpp\"\n#include \"elemental/config.h\"\n#ifdef ELEM_HAVE_F90_INTERFACE\n# include \"elemental/FCMangle.h\"\n#endif\n#include \"elemental/core.hpp\"\n#include \"elemental/blas-like/decl.hpp\"\n#include \"elemental/lapack-like/decl.hpp\"\n#include \"elemental/convex/decl.hpp\"\n#include \"elemental/io/DisplayWidget/decl.hpp\"\n\nnamespace elem {\n\n// Unfortunately Q_OBJECT does not support templates...\nclass DisplayWindow : public QWidget\n{\n    Q_OBJECT\n\npublic:\n    DisplayWindow( QWidget* parent=0 );    \n    ~DisplayWindow();\n\n    void Display\n    ( const Matrix<double>* A, \n      QString title=QString(\"Default title\") );\n    void Display\n    ( const Matrix<double>* A, \n      double minVal, double maxVal,\n      QString title=QString(\"Default title\") );\n\nprivate:\n    QScrollArea *scroll_;\n    DisplayWidget<double> *display_;\n    const Matrix<double> *matrix_;\n\npublic slots:\n    void Save();\n    void SetScale( bool global );\n};\n\n} // namespace elem\n\n//#endif // ifdef ELEM_HAVE_QT5\n\n#endif // ifndef ELEM_IO_DISPLAYWINDOW_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Print.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PRINT_HPP\n#define ELEM_PRINT_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nPrint( const Matrix<T>& A, std::string title=\"\", std::ostream& os=std::cout )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Print\"))\n    if( title != \"\" )\n        os << title << std::endl;\n    \n    const Int height = A.Height();\n    const Int width = A.Width();\n    for( Int i=0; i<height; ++i )\n    {\n        for( Int j=0; j<width; ++j )\n            os << A.Get(i,j) << \" \";\n        os << std::endl;\n    }\n    os << std::endl;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nPrint\n( const DistMatrix<T,U,V>& A, std::string title=\"\", std::ostream& os=std::cout )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Print\"))\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() && A.RedundantRank() == 0 )\n            Print( A.LockedMatrix(), title, os );\n    }\n    else\n    {\n        DistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n            Print( A_CIRC_CIRC.LockedMatrix(), title, os );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nPrint\n( const BlockDistMatrix<T,U,V>& A, \n  std::string title=\"\", std::ostream& os=std::cout )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Print\"))\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() && A.RedundantRank() == 0 )\n            Print( A.LockedMatrix(), title, os );\n    }\n    else\n    {\n        BlockDistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n            Print( A_CIRC_CIRC.LockedMatrix(), title, os );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_PRINT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Read/Ascii.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_READ_ASCII_HPP\n#define ELEM_READ_ASCII_HPP\n\nnamespace elem {\nnamespace read {\n\ntemplate<typename T>\ninline void\nAscii( Matrix<T>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::Ascii\"))\n    std::ifstream file( filename.c_str() );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    // Walk through the file once to both count the number of rows and\n    // columns and to ensure that the number of columns is consistent\n    Int height=0, width=0;\n    std::string line;\n    while( std::getline( file, line ) )\n    {\n        std::stringstream lineStream( line );\n        Int numCols=0;\n        T value;\n        while( lineStream >> value ) ++numCols;\n        if( numCols != 0 )\n        {\n            if( numCols != width && width != 0 )\n                LogicError(\"Inconsistent number of columns\");\n            else\n                width = numCols;\n            ++height;\n        }\n    }\n    file.clear();\n    file.seekg(0,file.beg);\n\n    // Resize the matrix and then read it\n    A.Resize( height, width );\n    Int i=0;\n    while( std::getline( file, line ) )\n    {\n        std::stringstream lineStream( line );\n        Int j=0;\n        T value;\n        while( lineStream >> value )\n        {\n            A.Set( i, j, value );\n            ++j;\n        }\n        ++i;\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nAscii( DistMatrix<T,U,V>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::Ascii\"))\n    std::ifstream file( filename.c_str() );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    // Walk through the file once to both count the number of rows and\n    // columns and to ensure that the number of columns is consistent\n    Int height=0, width=0;\n    std::string line;\n    while( std::getline( file, line ) )\n    {\n        std::stringstream lineStream( line );\n        Int numCols=0;\n        T value;\n        while( lineStream >> value ) ++numCols;\n        if( numCols != 0 )\n        {\n            if( numCols != width && width != 0 )\n                LogicError(\"Inconsistent number of columns\");\n            else\n                width = numCols;\n            ++height;\n        }\n    }\n    file.clear();\n    file.seekg(0,file.beg);\n\n    // Resize the matrix and then read in our local portion\n    A.Resize( height, width );\n    Int i=0;\n    while( std::getline( file, line ) )\n    {\n        std::stringstream lineStream( line );\n        Int j=0;\n        T value;\n        while( lineStream >> value )\n        {\n            A.Set( i, j, value );\n            ++j;\n        }\n        ++i;\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nAscii( BlockDistMatrix<T,U,V>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::Ascii\"))\n    std::ifstream file( filename.c_str() );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    // Walk through the file once to both count the number of rows and\n    // columns and to ensure that the number of columns is consistent\n    Int height=0, width=0;\n    std::string line;\n    while( std::getline( file, line ) )\n    {\n        std::stringstream lineStream( line );\n        Int numCols=0;\n        T value;\n        while( lineStream >> value ) ++numCols;\n        if( numCols != 0 )\n        {\n            if( numCols != width && width != 0 )\n                LogicError(\"Inconsistent number of columns\");\n            else\n                width = numCols;\n            ++height;\n        }\n    }\n    file.clear();\n    file.seekg(0,file.beg);\n\n    // Resize the matrix and then read in our local portion\n    A.Resize( height, width );\n    Int i=0;\n    while( std::getline( file, line ) )\n    {\n        std::stringstream lineStream( line );\n        Int j=0;\n        T value;\n        while( lineStream >> value )\n        {\n            A.Set( i, j, value );\n            ++j;\n        }\n        ++i;\n    }\n}\n\n} // namespace read\n} // namespace elem\n\n#endif // ifndef ELEM_READ_ASCII_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Read/AsciiMatlab.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_READ_ASCIIMATLAB_HPP\n#define ELEM_READ_ASCIIMATLAB_HPP\n\nnamespace elem {\nnamespace read {\n\ntemplate<typename T>\ninline void\nAsciiMatlab( Matrix<T>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::AsciiMatlab\"))\n    std::ifstream file( filename.c_str() );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n    LogicError(\"Not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nAsciiMatlab( DistMatrix<T,U,V>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::AsciiMatlab\"))\n    std::ifstream file( filename.c_str() );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n    LogicError(\"Not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nAsciiMatlab( BlockDistMatrix<T,U,V>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::AsciiMatlab\"))\n    std::ifstream file( filename.c_str() );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n    LogicError(\"Not yet written\");\n}\n\n} // namespace read\n} // namespace elem\n\n#endif // ifndef ELEM_READ_ASCIIMATLAB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Read/Binary.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_READ_BINARY_HPP\n#define ELEM_READ_BINARY_HPP\n\nnamespace elem {\nnamespace read {\n\ntemplate<typename T>\ninline void\nBinary( Matrix<T>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::Binary\"))\n    std::ifstream file( filename.c_str(), std::ios::binary );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    Int height, width;\n    file.read( (char*)&height, sizeof(Int) );\n    file.read( (char*)&width,  sizeof(Int) );\n    const Int numBytes = FileSize( file );\n    const Int metaBytes = 2*sizeof(Int);\n    const Int dataBytes = height*width*sizeof(T);\n    const Int numBytesExp = metaBytes + dataBytes;\n    if( numBytes != numBytesExp )\n        RuntimeError\n        (\"Expected file to be \",numBytesExp,\" bytes but found \",numBytes);\n\n    A.Resize( height, width );\n    if( A.Height() == A.LDim() )\n        file.read( (char*)A.Buffer(), height*width*sizeof(T) );\n    else\n        for( Int j=0; j<width; ++j )\n            file.read( (char*)A.Buffer(0,j), height*sizeof(T) );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nBinary( DistMatrix<T,U,V>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::Binary\"))\n    std::ifstream file( filename.c_str(), std::ios::binary );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    Int height, width;\n    file.read( (char*)&height, sizeof(Int) );\n    file.read( (char*)&width,  sizeof(Int) );\n    const Int numBytes = FileSize( file );\n    const Int metaBytes = 2*sizeof(Int);\n    const Int dataBytes = height*width*sizeof(T);\n    const Int numBytesExp = metaBytes + dataBytes;\n    if( numBytes != numBytesExp )\n        RuntimeError\n        (\"Expected file to be \",numBytesExp,\" bytes but found \",numBytes);\n\n    A.Resize( height, width );\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() )\n        {\n            if( A.Height() == A.LDim() )\n                file.read( (char*)A.Buffer(), height*width*sizeof(T) );\n            else\n                for( Int j=0; j<width; ++j )\n                    file.read( (char*)A.Buffer(0,j), height*sizeof(T) );\n        }\n    }\n    else if( U == A.UGath )\n    {\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int localIndex = j*height;\n            const std::streamoff pos = metaBytes + localIndex*sizeof(T);\n            file.seekg( pos );\n            file.read( (char*)A.Buffer(0,jLoc), height*sizeof(T) );\n        }\n    }\n    else\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                const Int localIndex = i+j*height;\n                const std::streamoff pos = metaBytes + localIndex*sizeof(T);\n                file.seekg( pos );\n                file.read( (char*)A.Buffer(iLoc,jLoc), sizeof(T) );\n            }\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nBinary( BlockDistMatrix<T,U,V>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::Binary\"))\n    std::ifstream file( filename.c_str(), std::ios::binary );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    Int height, width;\n    file.read( (char*)&height, sizeof(Int) );\n    file.read( (char*)&width,  sizeof(Int) );\n    const Int numBytes = FileSize( file );\n    const Int metaBytes = 2*sizeof(Int);\n    const Int dataBytes = height*width*sizeof(T);\n    const Int numBytesExp = metaBytes + dataBytes;\n    if( numBytes != numBytesExp )\n        RuntimeError\n        (\"Expected file to be \",numBytesExp,\" bytes but found \",numBytes);\n\n    A.Resize( height, width );\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() )\n        {\n            if( A.Height() == A.LDim() )\n                file.read( (char*)A.Buffer(), height*width*sizeof(T) );\n            else\n                for( Int j=0; j<width; ++j )\n                    file.read( (char*)A.Buffer(0,j), height*sizeof(T) );\n        }\n    }\n    else if( U == A.UGath )\n    {\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int localIndex = j*height;\n            const std::streamoff pos = metaBytes + localIndex*sizeof(T);\n            file.seekg( pos );\n            file.read( (char*)A.Buffer(0,jLoc), height*sizeof(T) );\n        }\n    }\n    else\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                const Int localIndex = i+j*height;\n                const std::streamoff pos = metaBytes + localIndex*sizeof(T);\n                file.seekg( pos );\n                file.read( (char*)A.Buffer(iLoc,jLoc), sizeof(T) );\n            }\n        }\n    }\n}\n\n} // namespace read\n} // namespace elem\n\n#endif // ifndef ELEM_READ_BINARY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Read/BinaryFlat.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_READ_BINARYFLAT_HPP\n#define ELEM_READ_BINARYFLAT_HPP\n\nnamespace elem {\nnamespace read {\n\ntemplate<typename T>\ninline void\nBinaryFlat( Matrix<T>& A, Int height, Int width, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::BinaryFlat\"))\n    std::ifstream file( filename.c_str(), std::ios::binary );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    const Int numBytes = FileSize( file );\n    const Int numBytesExp = height*width*sizeof(T);\n    if( numBytes != numBytesExp )\n        RuntimeError\n        (\"Expected file to be \",numBytesExp,\" bytes but found \",numBytes);\n\n    A.Resize( height, width );\n    if( A.Height() == A.LDim() )\n        file.read( (char*)A.Buffer(), height*width*sizeof(T) );\n    else\n        for( Int j=0; j<width; ++j )\n            file.read( (char*)A.Buffer(0,j), height*sizeof(T) );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nBinaryFlat\n( DistMatrix<T,U,V>& A, Int height, Int width, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::BinaryFlat\"))\n    std::ifstream file( filename.c_str(), std::ios::binary );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    const Int numBytes = FileSize( file );\n    const Int numBytesExp = height*width*sizeof(T);\n    if( numBytes != numBytesExp )\n        RuntimeError\n        (\"Expected file to be \",numBytesExp,\" bytes but found \",numBytes);\n\n    A.Resize( height, width );\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() )\n        {\n            if( A.Height() == A.LDim() )\n                file.read( (char*)A.Buffer(), height*width*sizeof(T) );\n            else\n                for( Int j=0; j<width; ++j )\n                    file.read( (char*)A.Buffer(0,j), height*sizeof(T) );\n        }\n    }\n    else if( U == A.UGath )\n    {\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int localIndex = j*height;\n            const std::streamoff pos = localIndex*sizeof(T);\n            file.seekg( pos );\n            file.read( (char*)A.Buffer(0,jLoc), height*sizeof(T) );\n        }\n    }\n    else\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                const Int localIndex = i+j*height;\n                const std::streamoff pos = localIndex*sizeof(T);\n                file.seekg( pos );\n                file.read( (char*)A.Buffer(iLoc,jLoc), sizeof(T) );\n            }\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nBinaryFlat\n( BlockDistMatrix<T,U,V>& A, Int height, Int width, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::BinaryFlat\"))\n    std::ifstream file( filename.c_str(), std::ios::binary );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    const Int numBytes = FileSize( file );\n    const Int numBytesExp = height*width*sizeof(T);\n    if( numBytes != numBytesExp )\n        RuntimeError\n        (\"Expected file to be \",numBytesExp,\" bytes but found \",numBytes);\n\n    A.Resize( height, width );\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() )\n        {\n            if( A.Height() == A.LDim() )\n                file.read( (char*)A.Buffer(), height*width*sizeof(T) );\n            else\n                for( Int j=0; j<width; ++j )\n                    file.read( (char*)A.Buffer(0,j), height*sizeof(T) );\n        }\n    }\n    else if( U == A.UGath )\n    {\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            const Int localIndex = j*height;\n            const std::streamoff pos = localIndex*sizeof(T);\n            file.seekg( pos );\n            file.read( (char*)A.Buffer(0,jLoc), height*sizeof(T) );\n        }\n    }\n    else\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                const Int localIndex = i+j*height;\n                const std::streamoff pos = localIndex*sizeof(T);\n                file.seekg( pos );\n                file.read( (char*)A.Buffer(iLoc,jLoc), sizeof(T) );\n            }\n        }\n    }\n}\n\n} // namespace read\n} // namespace elem\n\n#endif // ifndef ELEM_READ_BINARYFLAT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Read/MatrixMarket.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_READ_MATRIXMARKET_HPP\n#define ELEM_READ_MATRIXMARKET_HPP\n\n#include ELEM_SCALETRAPEZOID_INC\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_MAKESYMMETRIC_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace read {\n\ntemplate<typename T>\ninline void\nMatrixMarket( Matrix<T>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::MatrixMarket\"))\n    typedef Base<T> Real;\n    std::ifstream file( filename.c_str() );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    // Read the header\n    // ===============\n    // Attempt to pull in the various header components\n    // ------------------------------------------------\n    std::string line, stamp, object, format, field, symmetry;\n    if( !std::getline( file, line ) )\n        RuntimeError(\"Could not extract header line\");\n    {\n        std::stringstream lineStream( line );\n        lineStream >> stamp; \n        if( stamp != std::string(\"%%MatrixMarket\") )\n            RuntimeError(\"Invalid Matrix Market stamp: \",stamp);\n        if( !(lineStream >> object) ) \n            RuntimeError(\"Missing Matrix Market object\");\n        if( !(lineStream >> format) )\n            RuntimeError(\"Missing Matrix Market format\");\n        if( !(lineStream >> field) )\n            RuntimeError(\"Missing Matrix Market field\");\n        if( !(lineStream >> symmetry) )\n            RuntimeError(\"Missing Matrix Market symmetry\");\n    }\n    // Ensure that the header components are individually valid\n    // --------------------------------------------------------\n    const bool isMatrix = ( object == std::string(\"matrix\") );\n    const bool isArray = ( format == std::string(\"array\") );\n    const bool isComplex = ( field == std::string(\"complex\") );\n    const bool isPattern = ( field == std::string(\"pattern\") );\n    const bool isGeneral = ( symmetry == std::string(\"general\") );\n    const bool isSymmetric = ( symmetry == std::string(\"symmetric\") );\n    const bool isSkewSymmetric = ( symmetry == std::string(\"skew-symmetric\") );\n    const bool isHermitian = ( symmetry == std::string(\"hermitian\") );\n    if( !isMatrix && object != std::string(\"vector\") )\n        RuntimeError(\"Invalid Matrix Market object: \",object);\n    if( !isArray && format != std::string(\"coordinate\") )\n        RuntimeError(\"Invalid Matrix Market format: \",format);\n    if( !isComplex && !isPattern && \n        field != std::string(\"real\") && \n        field != std::string(\"double\") &&\n        field != std::string(\"integer\") )\n        RuntimeError(\"Invalid Matrix Market field: \",field);\n    if( !isGeneral && !isSymmetric && !isSkewSymmetric && !isHermitian )\n        RuntimeError(\"Invalid Matrix Market symmetry: \",symmetry);\n    // Ensure that the components are consistent\n    // -----------------------------------------\n    if( isArray && isPattern )\n        RuntimeError(\"Pattern field requires coordinate format\");\n    // NOTE: This constraint is only enforced because of the note located at\n    //       http://people.sc.fsu.edu/~jburkardt/data/mm/mm.html\n    if( isSkewSymmetric && isPattern )\n        RuntimeError(\"Pattern field incompatible with skew-symmetry\");\n    if( isHermitian && !isComplex )\n        RuntimeError(\"Hermitian symmetry requires complex data\");\n\n    // Skip the comment lines\n    // ======================\n    while( file.peek() == '%' ) \n        std::getline( file, line );\n  \n    int m, n;\n    if( !std::getline( file, line ) )\n        RuntimeError(\"Could not extract the size line\");\n    if( isArray )\n    {\n        // Read in the matrix dimensions\n        // =============================\n        if( isMatrix )\n        {\n            std::stringstream lineStream( line );\n            if( !(lineStream >> m) )\n                RuntimeError(\"Missing matrix height: \",line);\n            if( !(lineStream >> n) )\n                RuntimeError(\"Missing matrix width: \",line);\n        }\n        else\n        {\n            std::stringstream lineStream( line );\n            if( !(lineStream >> m) )\n                RuntimeError(\"Missing vector height: \",line);\n            n = 1;\n        }\n\n        // Resize the matrix\n        // =================\n        Zeros( A, m, n );\n\n        // Now read in the data\n        // ====================\n        Real realPart, imagPart;\n        for( Int j=0; j<n; ++j )\n        {\n            for( Int i=0; i<m; ++i )\n            {\n                if( !std::getline( file, line ) )\n                    RuntimeError(\"Could not get entry (\",i,\",\",j,\")\");\n                std::stringstream lineStream( line );\n                if( !(lineStream >> realPart) )\n                    RuntimeError\n                    (\"Could not extract real part of entry (\",i,\",\",j,\")\");\n                A.SetRealPart( i, j, realPart );\n                if( isComplex )\n                {\n                    if( !(lineStream >> imagPart) )\n                        RuntimeError\n                        (\"Could not extract imag part of entry (\",i,\",\",j,\")\");\n                    A.SetImagPart( i, j, imagPart );\n                }\n            }\n        }\n    }\n    else\n    {\n        // Read in the matrix dimensions and number of nonzeros\n        // ====================================================\n        int numNonzero;\n        if( isMatrix )\n        {\n            std::stringstream lineStream( line );\n            if( !(lineStream >> m) )\n                RuntimeError(\"Missing matrix height: \",line);\n            if( !(lineStream >> n) )\n                RuntimeError(\"Missing matrix width: \",line);\n            if( !(lineStream >> numNonzero) )\n                RuntimeError(\"Missing nonzeros entry: \",line);\n        }\n        else\n        {\n            std::stringstream lineStream( line );\n            if( !(lineStream >> m) )\n                RuntimeError(\"Missing vector height: \",line);\n            n = 1;\n            if( !(lineStream >> numNonzero) )\n                RuntimeError(\"Missing nonzeros entry: \",line);\n        }\n\n        // Create a matrix of zeros\n        // ========================\n        Zeros( A, m, n );\n\n        // Fill in the nonzero entries\n        // ===========================\n        int i, j;\n        Real realPart, imagPart;\n        for( Int k=0; k<numNonzero; ++k )\n        {\n            if( !std::getline( file, line ) )\n                RuntimeError(\"Could not get nonzero \",k);\n            std::stringstream lineStream( line );\n            if( !(lineStream >> i) )\n                RuntimeError(\"Could not extract row coordinate of nonzero \",k);\n            --i; // convert from Fortran to C indexing\n            if( isMatrix )\n            {\n                if( !(lineStream >> j) )\n                    RuntimeError\n                    (\"Could not extract col coordinate of nonzero \",k);\n                --j;\n            }\n            else\n                j = 0;\n\n            if( isPattern )\n            {\n                A.Set( i, j, T(1) );\n            }\n            else\n            {\n                if( !(lineStream >> realPart) )\n                    RuntimeError\n                    (\"Could not extract real part of entry (\",i,\",\",j,\")\");\n                A.UpdateRealPart( i, j, realPart );\n                if( isComplex )\n                {\n                    if( !(lineStream >> imagPart) )\n                        RuntimeError\n                        (\"Could not extract imag part of entry (\",i,\",\",j,\")\");\n                    A.UpdateImagPart( i, j, imagPart );\n                }\n            }\n        }\n    }\n\n    if( isSymmetric )\n        MakeSymmetric( LOWER, A );\n    if( isHermitian )\n        MakeHermitian( LOWER, A );\n    // I'm not certain of what the MM standard is for complex skew-symmetry,\n    // so I'll default to assuming no conjugation\n    const bool conjugateSkew = false;\n    if( isSkewSymmetric )\n    {\n        MakeSymmetric( LOWER, A, conjugateSkew );\n        ScaleTrapezoid( T(-1), UPPER, A, 1 );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMatrixMarket( DistMatrix<T,U,V>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::MatrixMarket\"))\n    DistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A.Grid() );\n    if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n    {\n        MatrixMarket( A_CIRC_CIRC.Matrix(), filename );\n        A_CIRC_CIRC.Resize\n        ( A_CIRC_CIRC.Matrix().Height(), A_CIRC_CIRC.Matrix().Width() );\n    }\n    A_CIRC_CIRC.MakeSizeConsistent();\n    A = A_CIRC_CIRC;\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMatrixMarket( BlockDistMatrix<T,U,V>& A, const std::string filename )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"read::MatrixMarket\"))\n    BlockDistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A.Grid() );\n    if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n    {\n        MatrixMarket( A_CIRC_CIRC.Matrix(), filename );\n        A_CIRC_CIRC.Resize\n        ( A_CIRC_CIRC.Matrix().Height(), A_CIRC_CIRC.Matrix().Width() );\n    }\n    A_CIRC_CIRC.MakeSizeConsistent();\n    A = A_CIRC_CIRC;\n}\n\n} // namespace read\n} // namespace elem\n\n#endif // ifndef ELEM_READ_MATRIXMARKET_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Read.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_READ_HPP\n#define ELEM_READ_HPP\n\n#include \"./Read/Ascii.hpp\"\n#include \"./Read/AsciiMatlab.hpp\"\n#include \"./Read/Binary.hpp\"\n#include \"./Read/BinaryFlat.hpp\"\n#include \"./Read/MatrixMarket.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nRead( Matrix<T>& A, const std::string filename, FileFormat format=AUTO )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Read\"))\n    if( format == AUTO )\n        format = DetectFormat( filename );\n\n    switch( format )\n    {\n    case ASCII:\n        read::Ascii( A, filename );\n        break;\n    case ASCII_MATLAB:\n        read::AsciiMatlab( A, filename );\n        break;\n    case BINARY:\n        read::Binary( A, filename );\n        break;\n    case BINARY_FLAT:\n        read::BinaryFlat( A, A.Height(), A.Width(), filename );\n        break;\n    case MATRIX_MARKET:\n        read::MatrixMarket( A, filename );\n        break;\n    default:\n        LogicError(\"Format unsupported for reading\");\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRead\n( DistMatrix<T,U,V>& A, const std::string filename, FileFormat format=AUTO,\n  bool sequential=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Read\"))\n    if( format == AUTO )\n        format = DetectFormat( filename ); \n\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() && A.RedundantRank() == 0 )\n        {\n            Read( A.Matrix(), filename, format );\n            A.Resize( A.Matrix().Height(), A.Matrix().Width() );\n        }\n        A.MakeSizeConsistent();\n    }\n    else if( sequential )\n    {\n        DistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A.Grid() );\n        if( format == BINARY_FLAT )\n            A_CIRC_CIRC.Resize( A.Height(), A.Width() );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n        {\n            Read( A_CIRC_CIRC.Matrix(), filename, format );\n            A_CIRC_CIRC.Resize\n            ( A_CIRC_CIRC.Matrix().Height(), A_CIRC_CIRC.Matrix().Width() );\n        }\n        A_CIRC_CIRC.MakeSizeConsistent();\n        A = A_CIRC_CIRC;\n    }\n    else\n    {\n        switch( format )\n        {\n        case ASCII:\n            read::Ascii( A, filename );\n            break;\n        case ASCII_MATLAB:\n            read::AsciiMatlab( A, filename );\n            break;\n        case BINARY:\n            read::Binary( A, filename );\n            break;\n        case BINARY_FLAT:\n            read::BinaryFlat( A, A.Height(), A.Width(), filename );\n            break;\n        case MATRIX_MARKET:\n            read::MatrixMarket( A, filename );\n            break;\n        default:\n            LogicError(\"Unsupported distributed read format\"); \n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRead\n( BlockDistMatrix<T,U,V>& A, const std::string filename, FileFormat format=AUTO,\n  bool sequential=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Read\"))\n    if( format == AUTO )\n        format = DetectFormat( filename ); \n\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() && A.RedundantRank() == 0 )\n        {\n            Read( A.Matrix(), filename, format );\n            A.Resize( A.Matrix().Height(), A.Matrix().Width() );\n        }\n        A.MakeSizeConsistent();\n    }\n    else if( sequential )\n    {\n        BlockDistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A.Grid() );\n        if( format == BINARY_FLAT )\n            A_CIRC_CIRC.Resize( A.Height(), A.Width() );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n        {\n            Read( A_CIRC_CIRC.Matrix(), filename, format );\n            A_CIRC_CIRC.Resize\n            ( A_CIRC_CIRC.Matrix().Height(), A_CIRC_CIRC.Matrix().Width() );\n        }\n        A_CIRC_CIRC.MakeSizeConsistent();\n        A = A_CIRC_CIRC;\n    }\n    else\n    {\n        switch( format )\n        {\n        case ASCII:\n            read::Ascii( A, filename );\n            break;\n        case ASCII_MATLAB:\n            read::AsciiMatlab( A, filename );\n            break;\n        case BINARY:\n            read::Binary( A, filename );\n            break;\n        case BINARY_FLAT:\n            read::BinaryFlat( A, A.Height(), A.Width(), filename );\n            break;\n        case MATRIX_MARKET:\n            read::MatrixMarket( A, filename );\n            break;\n        default:\n            LogicError(\"Unsupported distributed read format\"); \n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_READ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Spy.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SPY_HPP\n#define ELEM_SPY_HPP\n\n#include \"./SpyWindow/decl.hpp\"\n#include \"./SpyWidget/impl.hpp\"\n#include \"./Display.hpp\" // for ProcessEvents\n\n#ifdef ELEM_HAVE_QT5\n# include <QApplication>\n#endif\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nSpy( const Matrix<T>& A, std::string title=\"Default\", Base<T> tol=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Spy\"))\n#ifdef ELEM_HAVE_QT5\n    if( GuiDisabled() )\n        LogicError(\"GUI was disabled\");\n\n    // Convert A to double-precision since Qt's MOC does not support templates\n    const Int m = A.Height();\n    const Int n = A.Width();\n    Matrix<Int>* ASpy = new Matrix<Int>( m, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            ASpy->Set( i, j, ( Abs(A.Get(i,j))>tol ? 1 : 0 ) );\n\n    QString qTitle = QString::fromStdString( title );\n    SpyWindow* spyWindow = new SpyWindow;\n    spyWindow->Spy( ASpy, qTitle );\n    spyWindow->show();\n\n    // Spend at most 200 milliseconds rendering\n    ProcessEvents( 200 );\n#else\n    LogicError(\"Qt5 not available\");\n#endif // ifdef ELEM_HAVE_QT5\n}\n\ntemplate<typename T,Distribution U,Distribution V>\ninline void\nSpy( const DistMatrix<T,U,V>& A, std::string title=\"Default\", Base<T> tol=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Spy\"))\n#ifdef ELEM_HAVE_QT5\n    if( GuiDisabled() )\n        LogicError(\"GUI was disabled\");\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() && A.RedundantRank() == 0 )\n            Spy( A.LockedMatrix(), title, tol );\n    }\n    else\n    {\n        DistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n            Spy( A_CIRC_CIRC.Matrix(), title, tol );\n    }\n#else\n    LogicError(\"Qt5 not available\");\n#endif // ifdef ELEM_HAVE_QT5\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nSpy\n( const BlockDistMatrix<T,U,V>& A, std::string title=\"Default\", Base<T> tol=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Spy\"))\n#ifdef ELEM_HAVE_QT5\n    if( GuiDisabled() )\n        LogicError(\"GUI was disabled\");\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() && A.RedundantRank() == 0 )\n            Spy( A.LockedMatrix(), title, tol );\n    }\n    else\n    {\n        BlockDistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n            Spy( A_CIRC_CIRC.Matrix(), title, tol );\n    }\n#else\n    LogicError(\"Qt5 not available\");\n#endif // ifdef ELEM_HAVE_QT5\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SPY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/SpyWidget/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SPYWIDGET_DECL_HPP\n#define ELEM_SPYWIDGET_DECL_HPP\n#ifdef ELEM_HAVE_QT5\n\n#include <QWidget>\n\nnamespace elem {\n\nclass SpyWidget : public QWidget\n{\npublic:\n    SpyWidget( QWidget* parent=0 );\n    ~SpyWidget();\n    void Spy( const Matrix<Int>* A );\n    // TODO: Change style\nprotected:\n    void paintEvent( QPaintEvent* event );\n\nprivate:\n    QPixmap pixmap_;\n};\n\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_QT5\n#endif // ifndef ELEM_SPYWIDGET_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/SpyWidget/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SPYWIDGET_IMPL_HPP\n#define ELEM_SPYWIDGET_IMPL_HPP\n#ifdef ELEM_HAVE_QT5\n\n#include <QPainter>\n#include <QPixmap>\n#include <QStylePainter>\n\n#include \"elemental/io/DisplayWidget/decl.hpp\"\n\nnamespace elem {\n\ninline\nSpyWidget::SpyWidget( QWidget* parent )\n: QWidget(parent)\n{ }\n\ninline\nSpyWidget::~SpyWidget()\n{ }\n\ninline void \nSpyWidget::paintEvent( QPaintEvent* event )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SpyWidget::paintEvent\"))\n    QStylePainter painter( this );\n    painter.drawPixmap( 0, 0, pixmap_ );\n}\n\ninline void \nSpyWidget::Spy( const Matrix<Int>* A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SpyWidget::Spy\"))\n    const Int m = A->Height();\n    const Int n = A->Width();\n\n    // TODO: Parameterize these instead\n    const Int mPix = m;\n    const Int nPix = n;\n    const double mRatio = double(m) / double(mPix);\n    const double nRatio = double(n) / double(nPix);\n    pixmap_ = QPixmap( nPix, mPix );\n    resize( nPix, mPix );\n\n    // Paint the matrix\n    QPainter painter( &pixmap_ );\n    painter.initFrom( this );\n    for( Int jPix=0; jPix<nPix; ++jPix ) \n    {\n        const Int j = nRatio*jPix;\n        for( Int iPix=0; iPix<mPix; ++iPix )\n        {\n            const Int i = mRatio*iPix;\n            const Int z = A->Get(i,j);\n            if( z == 0 )\n                painter.setPen( qRgba(0,0,0,255) );\n            else \n                painter.setPen( qRgba(255,255,255,255) );\n            painter.drawPoint( jPix, iPix );\n        }\n    }\n\n    // Refresh the widget\n    update();\n}\n\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_QT5\n#endif // ifndef ELEM_SPYWIDGET_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/SpyWindow/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SPYWINDOW_DECL_HPP\n#define ELEM_SPYWINDOW_DECL_HPP\n#ifdef ELEM_HAVE_QT5\n\n#include <QScrollArea>\n#include <QWidget>\n\n#include \"elemental-lite.hpp\"\n#include \"elemental/io/SpyWidget/decl.hpp\"\n\nnamespace elem {\n\nclass SpyWindow : public QWidget\n{\npublic:\n    SpyWindow( QWidget* parent=0 );    \n    ~SpyWindow();\n\n    void Spy\n    ( const Matrix<Int>* A, \n      QString title=QString(\"Default title\") );\n\nprivate:\n    QScrollArea *scroll_;\n    SpyWidget *spy_;\n    const Matrix<Int> *matrix_;\n};\n\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_QT5\n#endif // ifndef ELEM_SPYWINDOW_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Write/Ascii.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WRITE_ASCII_HPP\n#define ELEM_WRITE_ASCII_HPP\n\n#include \"../Print.hpp\"\n\nnamespace elem {\nnamespace write {\n\ntemplate<typename T>\ninline void\nAscii( const Matrix<T>& A, std::string basename=\"matrix\", std::string title=\"\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"write::Ascii\"))\n    std::string filename = basename + \".\" + FileExtension(ASCII);\n    std::ofstream file( filename.c_str() );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    file.setf( std::ios::scientific );\n    Print( A, title, file );\n}\n\n} // namespace write\n} // namespace elem\n\n#endif // ifndef ELEM_WRITE_ASCII_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Write/AsciiMatlab.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WRITE_ASCIIMATLAB_HPP\n#define ELEM_WRITE_ASCIIMATLAB_HPP\n\n#include \"../Print.hpp\"\n\nnamespace elem {\nnamespace write {\n\ntemplate<typename T>\ninline void\nAsciiMatlab\n( const Matrix<T>& A, std::string basename=\"matrix\", \n  std::string title=\"matrix\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"write::AsciiMatlab\"))\n    // Empty titles are not legal\n    if( title == \"\" )\n        title = \"matrix\";\n\n    std::string filename = basename + \".\" + FileExtension(ASCII_MATLAB);\n    std::ofstream file( filename.c_str() );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    file.setf( std::ios::scientific );\n    file << title << \" = [\\n\";\n    Print( A, \"\", file );\n    file << \"];\\n\";\n}\n\n} // namespace write\n} // namespace elem\n\n#endif // ifndef ELEM_WRITE_ASCIIMATLAB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Write/Binary.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WRITE_BINARY_HPP\n#define ELEM_WRITE_BINARY_HPP\n\nnamespace elem {\nnamespace write {\n\ntemplate<typename T>\ninline void\nBinary( const Matrix<T>& A, std::string basename=\"matrix\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"write::Binary\"))\n    \n    std::string filename = basename + \".\" + FileExtension(BINARY);\n    std::ofstream file( filename.c_str(), std::ios::binary );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    Int n;\n    n = A.Height();\n    file.write( (char*)&n, sizeof(Int) );\n    n = A.Width();\n    file.write( (char*)&n, sizeof(Int) );\n    if( A.Height() == A.LDim() )\n        file.write( (char*)A.LockedBuffer(), A.Height()*A.Width()*sizeof(T) );\n    else\n        for( Int j=0; j<A.Width(); ++j )\n            file.write( (char*)A.LockedBuffer(0,j), A.Height()*sizeof(T) );\n}\n\n} // namespace write\n} // namespace elem\n\n#endif // ifndef ELEM_WRITE_BINARY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Write/BinaryFlat.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WRITE_BINARYFLAT_HPP\n#define ELEM_WRITE_BINARYFLAT_HPP\n\nnamespace elem {\nnamespace write {\n\ntemplate<typename T>\ninline void\nBinaryFlat( const Matrix<T>& A, std::string basename=\"matrix\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"write::BinaryFlat\"))\n    \n    std::string filename = basename + \".\" + FileExtension(BINARY_FLAT);\n    std::ofstream file( filename.c_str(), std::ios::binary );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    if( A.Height() == A.LDim() )\n        file.write( (char*)A.LockedBuffer(), A.Height()*A.Width()*sizeof(T) );\n    else\n        for( Int j=0; j<A.Width(); ++j )\n            file.write( (char*)A.LockedBuffer(0,j), A.Height()*sizeof(T) );\n}\n\n} // namespace write\n} // namespace elem\n\n#endif // ifndef ELEM_WRITE_BINARYFLAT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Write/Image.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WRITE_IMAGE_HPP\n#define ELEM_WRITE_IMAGE_HPP\n\n#ifdef ELEM_HAVE_QT5\n# include <QFile>\n# include <QImage>\n# include <QPainter>\n# include <QStylePainter>\n#endif\n\nnamespace elem {\nnamespace write {\n\n#ifdef ELEM_HAVE_QT5\ninline void\nSaveQImage\n( const QImage& image, std::string basename=\"matrix\", \n  FileFormat format=PNG )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"write::Image\"))\n    std::string filename = basename + \".\" + FileExtension(format);\n    QFile file( filename.c_str() );\n    file.open( QIODevice::WriteOnly );\n    image.save( &file, QtImageFormat(format) );\n}\n#endif // ifdef ELEM_HAVE_QT5\n\ntemplate<typename T>\ninline void\nRealPartImage\n( const Matrix<T>& A, std::string basename=\"matrix\", FileFormat format=PNG )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"write::RealPartImage\"))\n#ifdef ELEM_HAVE_QT5\n    typedef Base<T> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    // Compute the maximum and minimum values\n    Real minVal=0, maxVal=0; \n    if( m != 0 && n != 0 )\n    {\n        minVal = maxVal = A.GetRealPart( 0, 0 );\n        for( Int j=0; j<n; ++j )\n        {\n            for( Int i=0; i<m; ++i )\n            {\n                minVal = std::min( minVal, A.GetRealPart(i,j) );\n                maxVal = std::max( maxVal, A.GetRealPart(i,j) );\n            }\n        }\n    }\n\n    // TODO: Parameterize these instead\n    const Int mPix = 2*m;\n    const Int nPix = 2*n;\n    const double mRatio = double(m) / double(mPix);\n    const double nRatio = double(n) / double(nPix);\n    QImage image( nPix, mPix, QImage::Format_RGB32 );\n    for( Int jPix=0; jPix<nPix; ++jPix )\n    {\n        const Int j = nRatio*jPix;\n        for( Int iPix=0; iPix<mPix; ++iPix )\n        {\n            const Int i = mRatio*iPix;\n            QRgb color = SampleColorMap( A.GetRealPart(i,j), minVal, maxVal );\n            image.setPixel( jPix, iPix, color );\n        }\n    }\n\n    SaveQImage( image, basename, format );\n#else\n    LogicError(\"Qt5 not available\");\n#endif // ifdef ELEM_HAVE_QT5\n}\n\ntemplate<typename T>\ninline void\nImagPartImage\n( const Matrix<T>& A, std::string basename=\"matrix\", FileFormat format=PNG )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"write::ImagPartImage\"))\n#ifdef ELEM_HAVE_QT5\n    typedef Base<T> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    // Compute the maximum and minimum values\n    Real minVal=0, maxVal=0; \n    if( m != 0 && n != 0 )\n    {\n        minVal = maxVal = A.GetImagPart( 0, 0 );\n        for( Int j=0; j<n; ++j )\n        {\n            for( Int i=0; i<m; ++i )\n            {\n                minVal = std::min( minVal, A.GetImagPart(i,j) );\n                maxVal = std::max( maxVal, A.GetImagPart(i,j) );\n            }\n        }\n    }\n\n    // TODO: Parameterize these instead\n    const Int mPix = 2*m;\n    const Int nPix = 2*n;\n    const double mRatio = double(m) / double(mPix);\n    const double nRatio = double(n) / double(nPix);\n    QImage image( nPix, mPix, QImage::Format_RGB32 );\n    for( Int jPix=0; jPix<nPix; ++jPix )\n    {\n        const Int j = nRatio*jPix;\n        for( Int iPix=0; iPix<mPix; ++iPix )\n        {\n            const Int i = mRatio*iPix;\n            QRgb color = SampleColorMap( A.GetImagPart(i,j), minVal, maxVal );\n            image.setPixel( jPix, iPix, color );\n        }\n    }\n\n    SaveQImage( image, basename, format );\n#else\n    LogicError(\"Qt5 not available\");\n#endif // ifdef ELEM_HAVE_QT5\n}\n\ntemplate<typename Real>\ninline void\nImage\n( const Matrix<Real>& A, std::string basename=\"matrix\", FileFormat format=PNG )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"write::Image\"))\n    RealPartImage( A, basename, format );\n}\n\ntemplate<typename Real>\ninline void\nImage\n( const Matrix<Complex<Real>>& A, std::string basename=\"matrix\", \n  FileFormat format=PNG )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"write::Image\"))\n    RealPartImage( A, basename+\"_real\", format );\n    ImagPartImage( A, basename+\"_imag\", format );\n}\n\n} // namespace write\n} // namespace elem\n\n#endif // ifndef ELEM_WRITE_IMAGE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Write/MatrixMarket.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WRITE_MATRIXMARKET_HPP\n#define ELEM_WRITE_MATRIXMARKET_HPP\n\nnamespace elem {\nnamespace write {\n\ntemplate<typename T>\ninline void\nMatrixMarket( const Matrix<T>& A, std::string basename=\"matrix\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"write::MatrixMarket\"))\n    \n    std::string filename = basename + \".\" + FileExtension(MATRIX_MARKET);\n    std::ofstream file( filename.c_str(), std::ios::binary );\n    if( !file.is_open() )\n        RuntimeError(\"Could not open \",filename);\n\n    // Write the header\n    // ================\n    {\n        std::ostringstream os;\n        os << \"%%MatrixMarket matrix array \";\n        if( IsComplex<T>::val )\n            os << \"complex \"; \n        else\n            os << \"real \";\n        os << \"general\\n\";\n        file << os.str();\n    }\n    \n    // Write the size line\n    // ===================\n    const Int m = A.Height();\n    const Int n = A.Width();\n    {\n        std::ostringstream os; \n        os << m << \" \" << n << \"\\n\";\n        file << os.str();\n    }\n    \n    // Write the entries\n    // =================\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            std::ostringstream os;\n            os << A.GetRealPart(i,j);\n            if( IsComplex<T>::val )\n                os << \" \" << A.GetImagPart(i,j);\n            os << \"\\n\";\n            file << os.str();\n        }\n    }\n}\n\n} // namespace write\n} // namespace elem\n\n#endif // ifndef ELEM_WRITE_MATRIXMARKET_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/Write.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WRITE_HPP\n#define ELEM_WRITE_HPP\n\n#include \"./Write/Ascii.hpp\"\n#include \"./Write/AsciiMatlab.hpp\"\n#include \"./Write/Binary.hpp\"\n#include \"./Write/BinaryFlat.hpp\"\n#include \"./Write/Image.hpp\"\n#include \"./Write/MatrixMarket.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nWrite\n( const Matrix<T>& A, std::string basename=\"matrix\", FileFormat format=BINARY, \n  std::string title=\"\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Write\"))\n    switch( format )\n    {\n    case ASCII:         write::Ascii( A, basename, title );       break;\n    case ASCII_MATLAB:  write::AsciiMatlab( A, basename, title ); break;\n    case BINARY:        write::Binary( A, basename );             break;\n    case BINARY_FLAT:   write::BinaryFlat( A, basename );         break;\n    case MATRIX_MARKET: write::MatrixMarket( A, basename );       break;\n    case BMP:\n    case JPG:\n    case JPEG:\n    case PNG:\n    case PPM:\n    case XBM:\n    case XPM:\n        write::Image( A, basename, format ); break;\n    default:\n        LogicError(\"Invalid file format\");\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nWrite\n( const DistMatrix<T,U,V>& A, std::string basename=\"matrix\", \n  FileFormat format=BINARY, std::string title=\"\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Write\"))\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() && A.RedundantRank() == 0 )\n            Write( A.LockedMatrix(), basename, format, title );\n    }\n    else\n    {\n        DistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n            Write( A_CIRC_CIRC.LockedMatrix(), basename, format, title );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nWrite\n( const BlockDistMatrix<T,U,V>& A, std::string basename=\"matrix\", \n  FileFormat format=BINARY, std::string title=\"\" )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Write\"))\n    if( U == A.UGath && V == A.VGath )\n    {\n        if( A.CrossRank() == A.Root() && A.RedundantRank() == 0 )\n            Write( A.LockedMatrix(), basename, format, title );\n    }\n    else\n    {\n        BlockDistMatrix<T,CIRC,CIRC> A_CIRC_CIRC( A );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n            Write( A_CIRC_CIRC.LockedMatrix(), basename, format, title );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_WRITE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IO_DECL_HPP\n#define ELEM_IO_DECL_HPP\n\nnamespace elem {\n\n// TODO: Distributed file formats?\nnamespace FileFormatNS {\nenum FileFormat\n{\n    AUTO, // Automatically detect from file extension\n    ASCII,\n    ASCII_MATLAB,\n    BINARY,\n    BINARY_FLAT,\n    BMP,\n    JPG,\n    JPEG,\n    MATRIX_MARKET,\n    PNG,\n    PPM,\n    XBM,\n    XPM,\n    FileFormat_MAX // For detecting number of entries in enum\n};\n}\nusing namespace FileFormatNS;\n\nconst char* QtImageFormat( FileFormat format );\nstd::string FileExtension( FileFormat format );\nFileFormat FormatFromExtension( const std::string ext );\nFileFormat DetectFormat( const std::string filename );\n\nstd::ifstream::pos_type FileSize( std::ifstream& file );\n\n// TODO: Many more color maps\nnamespace ColorMapNS {\nenum ColorMap\n{\n    GRAYSCALE,\n    GRAYSCALE_DISCRETE,\n    RED_BLACK_GREEN,\n    BLUE_RED\n};\n}\nusing namespace ColorMapNS;\n\n#ifdef ELEM_HAVE_QT5\n// Return true if Qt5 was detected, but no GUI is allowed.\n// This is useful if images are to be written to file using Qt5's wrappers.\nbool GuiDisabled();\n\n// When Elemental is finalized, if no window was opened, then it must call \n// app.exit() instead\nvoid OpenedWindow();\n\n// For keeping track of the extreme values visualized so far\ndouble MinRealWindowVal();\ndouble MaxRealWindowVal();\ndouble MinImagWindowVal();\ndouble MaxImagWindowVal();\nvoid UpdateMinRealWindowVal( double minVal );\nvoid UpdateMaxRealWindowVal( double maxVal );\nvoid UpdateMinImagWindowVal( double minVal );\nvoid UpdateMaxImagWindowVal( double maxVal );\n#endif\n\n} // namespace elem\n\n#ifdef ELEM_HAVE_QT5\n# include \"./DisplayWidget/decl.hpp\"\n# include \"./DisplayWindow-premoc.hpp\"\n# include \"./ComplexDisplayWindow-premoc.hpp\"\n#endif // ifdef ELEM_HAVE_QT5\n\nnamespace elem {\n\nvoid SetColorMap( ColorMap colorMap );\nColorMap GetColorMap();\nvoid SetNumDiscreteColors( Int numChunks );\nInt NumDiscreteColors();\n#ifdef ELEM_HAVE_QT5\nQRgb SampleColorMap( double value, double minVal, double maxVal );\n#endif \n\n} // namespace elem\n\n#endif // ifndef ELEM_IO_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IO_IMPL_HPP\n#define ELEM_IO_IMPL_HPP\n\n#include \"./Display.hpp\"\n// TODO: Distribution plot\n#include \"./Print.hpp\"\n#include \"./Read.hpp\"\n#include \"./Spy.hpp\"\n#include \"./Write.hpp\"\n\nnamespace elem {\n\ninline const char* QtImageFormat( FileFormat format )\n{\n    switch( format )\n    {\n    case BMP:  return \"BMP\";  break;\n    case JPG:  return \"JPG\";  break;\n    case JPEG: return \"JPEG\"; break;\n    case PNG:  return \"PNG\";  break;\n    case PPM:  return \"PPM\";  break;\n    case XBM:  return \"XBM\";  break;\n    case XPM:  return \"XPM\";  break;\n    default: LogicError(\"Invalid image format\"); return \"N/A\"; break;\n    }\n}\n\ninline std::string FileExtension( FileFormat format )\n{\n    switch( format )\n    {\n    case ASCII:            return \"txt\";  break;\n    case ASCII_MATLAB:     return \"m\";    break;\n    case BINARY:           return \"bin\";  break;\n    case BINARY_FLAT:      return \"dat\";  break;\n    case BMP:              return \"bmp\";  break;\n    case JPG:              return \"jpg\";  break;\n    case JPEG:             return \"jpeg\"; break;\n    case MATRIX_MARKET:    return \"mm\";   break;\n    case PNG:              return \"png\";  break;\n    case PPM:              return \"ppm\";  break;\n    case XBM:              return \"xbm\";  break;\n    case XPM:              return \"xpm\";  break;\n    default: LogicError(\"Format not found\"); return \"N/A\"; break;\n    }\n}\n\ninline FileFormat FormatFromExtension( const std::string ext )\n{\n    bool foundFormat = false;\n    FileFormat format = BINARY;\n    for( int j=1; j<FileFormat_MAX; ++j )\n    {\n        format = static_cast<FileFormat>(j);\n        if( FileExtension(format) == ext )\n        {\n            foundFormat = true;\n            break;\n        }\n    }\n    if( !foundFormat )\n        RuntimeError(\"Did not detect file format\");\n    return format;\n}\n\ninline FileFormat DetectFormat( const std::string filename )\n{\n    const std::string ext = filename.substr(filename.find_last_of(\".\")+1);\n    return FormatFromExtension( ext );\n}\n\ninline std::ifstream::pos_type\nFileSize( std::ifstream& file )\n{\n    auto pos = file.tellg();\n    file.seekg( 0, std::ifstream::end );\n    auto numBytes = file.tellg();\n    file.seekg( pos );\n    return numBytes;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_IO_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/io.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IO_HPP\n#define ELEM_IO_HPP\n\n#include \"./io/decl.hpp\"\n#include \"./io/impl.hpp\"\n\n#endif // ifndef ELEM_IO_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Bidiag/Apply.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BIDIAG_APPLY_HPP\n#define ELEM_BIDIAG_APPLY_HPP\n\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n\nnamespace elem {\nnamespace bidiag {\n\ntemplate<typename F>\ninline void\nApplyQ\n( LeftOrRight side, Orientation orientation, \n  const Matrix<F>& A, const Matrix<F>& t, Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"bidiag::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n    const ForwardOrBackward direction = ( normal==onLeft ? BACKWARD : FORWARD );\n    const Conjugation conjugation = ( normal ? CONJUGATED : UNCONJUGATED );\n    const Int offset = ( A.Height()>=A.Width() ? 0 : -1 );\n    ApplyPackedReflectors\n    ( side, LOWER, VERTICAL, direction, conjugation, offset, A, t, B );\n}\n\ntemplate<typename F>\ninline void\nApplyP\n( LeftOrRight side, Orientation orientation, \n  const Matrix<F>& A, const Matrix<F>& t, Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"bidiag::ApplyP\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n    const ForwardOrBackward direction = ( normal==onLeft ? BACKWARD : FORWARD );\n    const Conjugation conjugation = ( normal ? UNCONJUGATED : CONJUGATED );\n    const Int offset = ( A.Height()>=A.Width() ? 1 : 0 );\n    ApplyPackedReflectors\n    ( side, UPPER, HORIZONTAL, direction, conjugation, offset, A, t, B );\n}\n\ntemplate<typename F>\ninline void\nApplyQ\n( LeftOrRight side, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"bidiag::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n    const ForwardOrBackward direction = ( normal==onLeft ? BACKWARD : FORWARD );\n    const Conjugation conjugation = ( normal ? CONJUGATED : UNCONJUGATED );\n    const Int offset = ( A.Height()>=A.Width() ? 0 : -1 );\n    ApplyPackedReflectors\n    ( side, LOWER, VERTICAL, direction, conjugation, offset, A, t, B );\n}\n\ntemplate<typename F>\ninline void\nApplyQ\n( LeftOrRight side, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,STAR,STAR>& t, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"bidiag::ApplyQ\"))\n    const Int offset = ( A.Height()>=A.Width() ? 0 : -1 );\n    DistMatrix<F,MD,STAR> tDiag(A.Grid());\n    tDiag.SetRoot( A.DiagonalRoot(offset) );\n    tDiag.AlignCols( A.DiagonalAlign(offset) );\n    tDiag = t;\n    ApplyQ( side, orientation, A, tDiag, B );\n}\n\ntemplate<typename F>\ninline void\nApplyP\n( LeftOrRight side, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"bidiag::ApplyP\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n    const ForwardOrBackward direction = ( normal==onLeft ? BACKWARD : FORWARD );\n    const Conjugation conjugation = ( normal ? UNCONJUGATED : CONJUGATED );\n    const Int offset = ( A.Height()>=A.Width() ? 1 : 0 );\n    ApplyPackedReflectors\n    ( side, UPPER, HORIZONTAL, direction, conjugation, offset, A, t, B );\n}\n\ntemplate<typename F>\ninline void\nApplyP\n( LeftOrRight side, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,STAR,STAR>& t, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"bidiag::ApplyP\"))\n    const Int offset = ( A.Height()>=A.Width() ? 1 : 0 );\n    DistMatrix<F,MD,STAR> tDiag(A.Grid());\n    tDiag.SetRoot( A.DiagonalRoot(offset) );\n    tDiag.AlignCols( A.DiagonalAlign(offset) );\n    tDiag = t;\n    ApplyP( side, orientation, A, tDiag, B );\n}\n\n} // namespace bidiag\n} // namespace elem\n\n#endif // ifndef ELEM_BIDIAG_APPLY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Bidiag/L.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BIDIAG_L_HPP\n#define ELEM_BIDIAG_L_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n#include ELEM_GEMM_INC\n\n#include ELEM_REFLECTOR_INC\n\n#include \"./LUnb.hpp\"\n#include \"./LPan.hpp\"\n\nnamespace elem {\nnamespace bidiag {\n\n// NOTE: Very little is changed versus the upper case. Perhaps they should be\n//       combined.\ntemplate<typename F>\ninline void L( Matrix<F>& A, Matrix<F>& tP, Matrix<F>& tQ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"bidiag::L\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    DEBUG_ONLY(\n        if( m > n )\n            LogicError(\"A must be at least as wide as it is tall\");\n        // Are these requirements necessary?!?\n        if( tP.Viewing() || tQ.Viewing() )\n            LogicError(\"tP and tQ must not be views\");\n    )\n    const Int tPHeight = m;\n    const Int tQHeight = Max(m-1,0);\n    tP.Resize( tPHeight, 1 );\n    tQ.Resize( tQHeight, 1 );\n\n    Matrix<F> X, Y;\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n        auto A22 = ViewRange( A, k+nb, k+nb, m, n );\n        auto ABR = ViewRange( A, k,    k,    m, n );\n        if( A22.Height() > 0 )\n        {\n            auto tP1 = View( tP, k, 0, nb, 1 );\n            auto tQ1 = View( tQ, k, 0, nb, 1 );\n            X.Resize( m-k, nb  );\n            Y.Resize( nb,  n-k );\n            bidiag::LPan( ABR, tP1, tQ1, X, Y );\n\n            auto A12 = ViewRange( A, k,    k+nb, k+nb, n    );\n            auto A21 = ViewRange( A, k+nb, k,    m,    k+nb );\n            auto X21 = ViewRange( X, nb, 0,  m-k, nb  );\n            auto Y12 = ViewRange( Y, 0,  nb, nb,  n-k );\n\n            // Set top-right entry of A21 to 1\n            const F epsilon = A21.Get(0,nb-1);\n            A21.Set(0,nb-1,F(1));\n\n            Gemm( NORMAL, NORMAL, F(-1), A21, Y12, F(1), A22 );\n            Conjugate( A12 );\n            Gemm( NORMAL, NORMAL, F(-1), X21, A12, F(1), A22 );\n            Conjugate( A12 );\n\n            // Put back top-right entry of A21\n            A21.Set(0,nb-1,epsilon);\n        }\n        else\n        {\n            auto tP1 = View( tP, k, 0, nb,   1 );\n            auto tQ1 = View( tQ, k, 0, nb-1, 1 );\n            bidiag::LUnb( ABR, tP1, tQ1 );\n        }\n    }\n}\n\n// NOTE: Very little is different from the upper case. Perhaps they should\n//       be combined.\ntemplate<typename F> \ninline void\nL( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& tP, DistMatrix<F,STAR,STAR>& tQ )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"bidiag::U\");\n        if( A.Grid() != tP.Grid() || tP.Grid() != tQ.Grid() )\n            LogicError\n            (\"{A,tP,tQ} must be distributed over the same grid\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    DEBUG_ONLY(\n        if( m > n )\n            LogicError(\"A must be at least as wide as it is tall\");\n        // Are these requirements necessary?!?\n        if( tP.Viewing() || tQ.Viewing() )\n            LogicError(\"tP and tQ must not be views\");\n    )\n    const Grid& g = A.Grid();\n    const Int tPHeight = m;\n    const Int tQHeight = Max(m-1,0);\n    tP.Resize( tPHeight, 1 );\n    tQ.Resize( tQHeight, 1 );\n\n    DistMatrix<F> X(g), Y(g);\n    DistMatrix<F,MC,STAR> X21_MC_STAR(g);\n    DistMatrix<F,MR,STAR> Y12Adj_MR_STAR(g);\n\n    DistMatrix<F,MC,  STAR> AB1_MC_STAR(g);\n    DistMatrix<F,STAR,MR  > A1R_STAR_MR(g);\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<m; k+=bsize )\n    {\n        const Int nb = Min(bsize,m-k);\n\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A12 = ViewRange( A, k,    k+nb, k+nb, n    );\n        auto A21 = ViewRange( A, k+nb, k,    m,    k+nb );\n        auto A22 = ViewRange( A, k+nb, k+nb, m,    n    );\n        auto ABR = ViewRange( A, k,    k,    m,    n    );\n\n        if( A22.Height() > 0 )\n        {\n            X.AlignWith( A11 );\n            Y.AlignWith( A11 );\n            X.Resize( m-k, nb  );\n            Y.Resize( nb,  n-k );\n\n            AB1_MC_STAR.AlignWith( A11 );\n            A1R_STAR_MR.AlignWith( A11 );\n            AB1_MC_STAR.Resize( m-k, nb  );\n            A1R_STAR_MR.Resize( nb,  n-k );\n\n            auto tP1 = View( tP, k, 0, nb, 1 );\n            auto tQ1 = View( tQ, k, 0, nb, 1 );\n            bidiag::LPan( ABR, tP1, tQ1, X, Y, AB1_MC_STAR, A1R_STAR_MR );\n\n            auto X21 = ViewRange( X, nb, 0,  m-k, nb  );\n            auto Y12 = ViewRange( Y, 0,  nb, nb,  n-k );\n            X21_MC_STAR.AlignWith( A21 );\n            Y12Adj_MR_STAR.AlignWith( A12 );\n            X21_MC_STAR = X21;\n            Y12.AdjointColAllGather( Y12Adj_MR_STAR );\n\n            auto A21_MC_STAR = ViewRange( AB1_MC_STAR, nb, 0,  m-k, nb  );\n            auto A12_STAR_MR = ViewRange( A1R_STAR_MR, 0,  nb, nb,  n-k );\n\n            LocalGemm\n            ( NORMAL, ADJOINT, F(-1), A21_MC_STAR, Y12Adj_MR_STAR, F(1), A22 );\n            Conjugate( A12_STAR_MR );\n            LocalGemm\n            ( NORMAL, NORMAL, F(-1), X21_MC_STAR, A12_STAR_MR, F(1), A22 );\n        }\n        else\n        {\n            auto tP1 = View( tP, k, 0, nb,   1 );\n            auto tQ1 = View( tQ, k, 0, nb-1, 1 );\n            bidiag::LUnb( ABR, tP1, tQ1 );\n        }\n    }\n}\n\n} // namespace bidiag\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_CONDENSE_BIDIAG_L_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Bidiag/LPan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BIDIAG_LPAN_HPP\n#define ELEM_BIDIAG_LPAN_HPP\n\n#include ELEM_ADJOINT_INC\n#include ELEM_AXPY_INC\n#include ELEM_CONJUGATE_INC\n#include ELEM_SCALE_INC\n#include ELEM_GEMV_INC\n\n#include ELEM_REFLECTOR_INC\n\nnamespace elem {\nnamespace bidiag {\n\ntemplate<typename F>\ninline void\nLPan( Matrix<F>& A, Matrix<F>& tP, Matrix<F>& tQ, Matrix<F>& X, Matrix<F>& Y )\n{\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int nX = X.Width();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"bidiag::LPan\");\n        if( tP.Height() != nX || tP.Width() != 1 )\n            LogicError(\"tP was not the right size\");\n        if( tQ.Height() != nX || tQ.Width() != 1 )\n            LogicError(\"tQ was not the right size\");\n        if( mA > nA )\n            LogicError(\"A must be at least as wide as it is tall\"); \n        if( mA != X.Height() )\n            LogicError(\"A and X must have the same height\");\n        if( nA != Y.Width() )\n            LogicError(\"A and Y must have the same width\");\n        if( Y.Height() != nX )\n            LogicError(\"X is the wrong height\");\n        if( Y.Width() < nX )\n            LogicError(\"Y must be a row panel\");\n    )\n    typedef Base<F> Real;\n\n    Matrix<F> zT1, z01, z21;\n    \n    Matrix<Real> d, e;\n    d.Resize( nX, 1 );\n    e.Resize( nX, 1 );\n\n    for( Int k=0; k<nX; ++k )\n    {\n        auto a01      = ViewRange( A, 0,   k,   k,   k+1 );\n        auto AT2      = ViewRange( A, 0,   k+1, k+1, nA  );\n        auto A0R      = ViewRange( A, 0,   k,   k,   nA  );\n        auto a10      = ViewRange( A, k,   0,   k+1, k   );\n        auto alpha11  = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a1R      = ViewRange( A, k,   k,   k+1, nA  );\n        auto a12      = ViewRange( A, k,   k+1, k+1, nA  );\n        auto a21      = ViewRange( A, k+1, k,   mA,  k+1 );\n        auto alpha21T = ViewRange( A, k+1, k,   k+2, k+1 );\n        auto a21B     = ViewRange( A, k+2, k,   mA,  k+1 );\n        auto A20      = ViewRange( A, k+1, 0,   mA,  k   );\n        auto A2R      = ViewRange( A, k+1, k,   mA,  nA  );\n        auto A22      = ViewRange( A, k+1, k+1, mA,  nA  );\n\n        auto x10 = ViewRange( X, k,   0,   k+1, k   );\n        auto XB0 = ViewRange( X, k,   0,   mA,  k   );\n        auto X20 = ViewRange( X, k+1, 0,   mA,  k   );\n        auto X2L = ViewRange( X, k+1, 0,   mA,  k+1 );\n        auto x21 = ViewRange( X, k+1, k,   mA,  k+1 );\n\n        auto y01 = ViewRange( Y, 0, k,   k,   k+1 );\n        auto Y0R = ViewRange( Y, 0, k,   k,   nA  );\n        auto Y02 = ViewRange( Y, 0, k+1, k,   nA  );\n        auto y12 = ViewRange( Y, k, k+1, k+1, nA  );\n\n        // Apply all previous reflectors to a1R:    \n        //   a1R := a1R - a10 Y0R         - x10 conj(A0R)\n        //        = a1R - (Y0R^T a10^T)^T - (A0R^H x10^T)^T\n        Gemv( TRANSPOSE, F(-1), Y0R, a10, F(1), a1R );\n        Gemv( ADJOINT,   F(-1), A0R, x10, F(1), a1R );\n\n        // Find tauP and v such that\n        //  |alpha11 a12| /I - tauP |1  | |1 conj(v)|\\ = |delta 0|\n        //                \\         |v^T|            /\n        const F tauP = RightReflector( alpha11, a12 );\n        tP.Set(k,0,tauP);\n\n        // Temporarily set a1R = | 1 v |\n        d.Set(k,0,alpha11.GetRealPart(0,0));\n        alpha11.Set(0,0,F(1));\n\n        // Form half of the right-reflector using an implicitly-updated A2R:\n        // x21 := tauP (A2R - A20 Y0R - X20 conj(A0R)) a1R^T\n        //      = tauP (A2R a1R^T - A20 (Y0R a1R^T) - X20 (conj(A0R) a1R^T))\n        // -----------------------------------------------------------------\n        // x21 := A2R a1R^T\n        Zeros( x21, A2R.Height(), 1 );\n        Gemv( NORMAL, F(1), A2R, a1R, F(0), x21 );\n        // x21 := x21 - A20 (Y0R a1R^T) \n        Gemv( NORMAL, F(1),  Y0R, a1R, z01 );\n        Gemv( NORMAL, F(-1), A20, z01, F(1), x21 );\n        // x21 := x21 - X20 (conj(A0R) a1R^T)\n        //      = x21 - X20 conj(A0R a1R^H)\n        Conjugate( a1R );\n        Gemv( NORMAL, F(1),  A0R, a1R, z01 );\n        Conjugate( a1R );\n        Conjugate( z01 );\n        Gemv( NORMAL, F(-1), X20, z01, F(1), x21 );\n        // x21 := tauP x21\n        Scale( tauP, x21 );\n\n        // Apply all previous reflectors to a21:\n        //   a21 := a21 - A20 y01 - X2L conj(aT1)\n        //        = a21 - A20 y01 - (X20 conj(a01) + x21*1)\n        Gemv( NORMAL, F(-1), A20, y01, F(1), a21 );\n        Conjugate( a01 );\n        Gemv( NORMAL, F(-1), X20, a01, F(1), a21 );\n        Conjugate( a01 );\n        Axpy( F(-1), x21, a21 );\n\n        // Find tauQ and u such that\n        //  / I - tauQ | 1 | | 1, u^H | \\ | alpha21T | = | epsilon |\n        //  \\          | u |            / |     a21B |   |    0    |\n        const F tauQ = LeftReflector( alpha21T, a21B );\n        tQ.Set(k,0,tauQ);\n\n        // Temporarily set a21 = | 1 |\n        //                       | u |\n        e.Set(k,0,alpha21T.GetRealPart(0,0));\n        alpha21T.Set(0,0,F(1));\n\n        // Form half of the left-reflector using an implicitly-updated A22:\n        // y12 := tauQ a21^H ( A22 - A20 Y02 - X2L conj(AT2) )\n        //      = tauQ ( a21^H A22 - (a21^H A20) Y02 - (a21^H X2L) conj(AT2) )\n        //      = tauQ ( A22^H a21 - Y02^H (A20^H a21) - AT2^T (X2L^H a21) )^H\n        // -------------------------------------------------------------------\n        // z21 := A22^H a21\n        Gemv( ADJOINT, F(1), A22, a21, z21 );\n        // z21 := z21 - Y02^H (A20^H a21)\n        Gemv( ADJOINT, F(1),  A20, a21, z01 );\n        Gemv( ADJOINT, F(-1), Y02, z01, F(1), z21 );\n        // z21 := z21 - AT2^T (X2L^H a21)\n        Gemv( ADJOINT, F(1),  X2L, a21, zT1 );\n        Gemv( TRANSPOSE, F(-1), AT2, zT1, F(1), z21 );\n        // y12 := tauQ z21^H\n        Adjoint( z21, y12 );\n        Scale( tauQ, y12 );\n    }\n\n    // Put back d and e\n    auto ATL = View( A, 0, 0, nX, nX );\n    auto ATLExpanded = View( A, 0, 0, nX+1, nX );\n    ATL.SetRealPartOfDiagonal( d, 0 );\n    ATLExpanded.SetRealPartOfDiagonal( e, -1 );\n}\n\ntemplate<typename F>\ninline void\nLPan\n( DistMatrix<F>& A,\n  DistMatrix<F,STAR,STAR>& tP,\n  DistMatrix<F,STAR,STAR>& tQ,\n  DistMatrix<F>& X,\n  DistMatrix<F>& Y,\n  DistMatrix<F,MC,  STAR>& AL_MC_STAR,\n  DistMatrix<F,STAR,MR  >& AT_STAR_MR )\n{\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int nX = X.Width();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"bidiag::LPan\");\n        if( A.Grid() != tP.Grid() || tP.Grid() != tQ.Grid() || \n            tQ.Grid() != X.Grid() || X.Grid() != Y.Grid() ||\n            Y.Grid() != AL_MC_STAR.Grid() || \n            Y.Grid() != AT_STAR_MR.Grid() )\n            LogicError(\"Grids must match\");\n        if( A.ColAlign() != X.ColAlign() ||\n            A.RowAlign() != X.RowAlign() )\n            LogicError(\"A and X must be aligned\");\n        if( A.ColAlign() != Y.ColAlign() ||\n            A.RowAlign() != Y.RowAlign() )\n            LogicError(\"A and Y must be aligned\");\n        if( tP.Height() != nX || tP.Width() != 1 )\n            LogicError(\"tP was not the right size\");\n        if( tQ.Height() != nX || tQ.Width() != 1 )\n            LogicError(\"tQ was not the right size\");\n        if( mA > nA )\n            LogicError(\"A must be at least as wide as it is tall\"); \n        if( mA != X.Height() )\n            LogicError(\"A and X must have the same height\");\n        if( nA != Y.Width() )\n            LogicError(\"A and Y must have the same width\");\n        if( Y.Height() != nX )\n            LogicError(\"X is the wrong height\");\n        if( Y.Width() < nX )\n            LogicError(\"Y must be a row panel\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n\n    DistMatrix<F,MC,  STAR> z01_MC_STAR(g),\n                            zT1_MC_STAR(g),\n                            z21_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> a01_MR_STAR(g),\n                            y01_MR_STAR(g),\n                            z01_MR_STAR(g),\n                            zT1_MR_STAR(g),\n                            z21_MR_STAR(g); \n    DistMatrix<F,STAR,MC  > a10_STAR_MC(g),\n                            x10_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > z1R_STAR_MR(g);\n    \n    DistMatrix<Real,MD,STAR> d(g), e(g);\n    d.SetRoot( A.DiagonalRoot( 0) );\n    e.SetRoot( A.DiagonalRoot(-1) );\n    d.AlignCols( A.DiagonalAlign( 0) );\n    e.AlignCols( A.DiagonalAlign(-1) );\n    d.Resize( nX, 1 );\n    e.Resize( nX, 1 );\n\n    for( Int k=0; k<nX; ++k )\n    {\n        auto a01      = ViewRange( A, 0,   k,   k,   k+1 );\n        auto AT2      = ViewRange( A, 0,   k+1, k+1, nA  );\n        auto A0R      = ViewRange( A, 0,   k,   k,   nA  );\n        auto a10      = ViewRange( A, k,   0,   k+1, k   );\n        auto alpha11  = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a1R      = ViewRange( A, k,   k,   k+1, nA  );\n        auto a12      = ViewRange( A, k,   k+1, k+1, nA  );\n        auto a21      = ViewRange( A, k+1, k,   mA,  k+1 );\n        auto alpha21T = ViewRange( A, k+1, k,   k+2, k+1 );\n        auto a21B     = ViewRange( A, k+2, k,   mA,  k+1 );\n        auto A20      = ViewRange( A, k+1, 0,   mA,  k   );\n        auto A2R      = ViewRange( A, k+1, k,   mA,  nA  );\n        auto A22      = ViewRange( A, k+1, k+1, mA,  nA  );\n\n        auto a1R_STAR_MR = ViewRange( AT_STAR_MR, k,   k, k+1, nA  );\n        auto a21_MC_STAR = ViewRange( AL_MC_STAR, k+1, k, mA,  k+1 ); \n\n        auto x10 = ViewRange( X, k,   0,   k+1, k   );\n        auto XB0 = ViewRange( X, k,   0,   mA,  k   );\n        auto X20 = ViewRange( X, k+1, 0,   mA,  k   );\n        auto X2L = ViewRange( X, k+1, 0,   mA,  k+1 );\n        auto x21 = ViewRange( X, k+1, k,   mA,  k+1 );\n\n        auto y01 = ViewRange( Y, 0, k,   k,   k+1 );\n        auto Y0R = ViewRange( Y, 0, k,   k,   nA  );\n        auto Y02 = ViewRange( Y, 0, k+1, k,   nA  );\n        auto y12 = ViewRange( Y, k, k+1, k+1, nA  );\n\n        auto delta1   = View( d,  k, 0, 1, 1 );\n        auto epsilon1 = View( e,  k, 0, 1, 1 );\n\n        // Apply all previous reflectors to a1R:    \n        //   a1R := a1R - a10 Y0R         - x10 conj(A0R)\n        //        = a1R - (Y0R^T a10^T)^T - (A0R^H x10^T)^T\n        if( k > 0 )\n        {\n            a10_STAR_MC.AlignWith( Y0R );\n            x10_STAR_MC.AlignWith( A0R );\n            a10_STAR_MC = a10;\n            x10_STAR_MC = x10;\n\n            z1R_STAR_MR.AlignWith( a1R );\n            Zeros( z1R_STAR_MR, 1, a1R.Width() );\n            // z1R[* ,MR] := (Y0R^T[MR,MC] a10^T[MC,* ])^T +\n            //               (A0R^H[MR,MC] x10^T[MC,* ])^T\n            LocalGemv( TRANSPOSE, F(1), Y0R, a10_STAR_MC, F(0), z1R_STAR_MR );\n            LocalGemv( ADJOINT,   F(1), A0R, x10_STAR_MC, F(1), z1R_STAR_MR ); \n            // Sum the partial contributions and subtract from a1R\n            a1R.ColSumScatterUpdate( F(-1), z1R_STAR_MR );\n        }\n\n        // Find tauP and v such that\n        //  |alpha11 a12| /I - tauP |1  | |1 conj(v)|\\ = |delta 0|\n        //                \\         |v^T|            /\n        const F tauP = RightReflector( alpha11, a12 );\n        tP.Set(k,0,tauP);\n\n        // Temporarily set a1R = | 1 v |\n        if( alpha11.IsLocal(0,0) )\n        {\n            delta1.SetLocal(0,0,alpha11.GetLocalRealPart(0,0));\n            alpha11.SetLocal(0,0,F(1));\n        }\n\n        // Form half of the right-reflector using an implicitly-updated A2R:\n        // x21 := tauP (A2R - A20 Y0R - X20 conj(A0R)) a1R^T\n        //      = tauP (A2R a1R^T - A20 (Y0R a1R^T) - X20 (conj(A0R) a1R^T))\n        // -----------------------------------------------------------------\n        a1R_STAR_MR = a1R;\n\n        // z21[MC,* ] := A2R[MC,MR] a1R^T[MR,* ]\n        z21_MC_STAR.AlignWith( A2R );\n        Zeros( z21_MC_STAR, A2R.Height(), 1 );\n        LocalGemv( NORMAL, F(1), A2R, a1R_STAR_MR, F(0), z21_MC_STAR );\n\n        // z01[MR,* ] := (Y01 a1R^T)[MR,* ]\n        z01_MC_STAR.AlignWith( Y0R );\n        Zeros( z01_MC_STAR, Y0R.Height(), 1 );\n        LocalGemv( NORMAL, F(1), Y0R, a1R_STAR_MR, F(0), z01_MC_STAR );\n        z01_MC_STAR.SumOver( Y0R.RowComm() );\n        z01_MR_STAR.AlignWith( A20 );\n        z01_MR_STAR = z01_MC_STAR;\n        // z21[MC,* ] -= A20[MC,MR] z01[MR,* ]\n        LocalGemv( NORMAL, F(-1), A20, z01_MR_STAR, F(1), z21_MC_STAR );\n\n        // z01[MR,* ] := conj(A0R a1R^H)[MR,* ]\n        //             = (conj(A0R) a1R^T)[MR,* ]\n        z01_MC_STAR.AlignWith( A0R );\n        Zeros( z01_MC_STAR, A0R.Height(), 1 );\n        Conjugate( a1R_STAR_MR );\n        LocalGemv( NORMAL, F(1), A0R, a1R_STAR_MR, F(0), z01_MC_STAR );\n        z01_MC_STAR.SumOver( A0R.RowComm() );\n        Conjugate( a1R_STAR_MR );\n        Conjugate( z01_MC_STAR );\n        z01_MR_STAR.AlignWith( X20 );\n        z01_MR_STAR = z01_MC_STAR;\n        // z21[MC,* ] -= X20[MC,MR] z01[MR,* ] \n        LocalGemv( NORMAL, F(-1), X20, z01_MR_STAR, F(1), z21_MC_STAR );\n\n        // Finally perform the row summation and then scale by tauP\n        x21.RowSumScatterFrom( z21_MC_STAR );\n        Scale( tauP, x21 );\n\n        // Apply all previous reflectors to a21:\n        //   a21 := a21 - A20 y01 - X2L conj(aT1)\n        //        = a21 - A20 y01 - (X20 conj(a01) + x21*1)\n        // ------------------------------------------------\n        // a21 := a21 - A20 y01 (do not sum over rows yet)\n        // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        y01_MR_STAR.AlignWith( A20 );\n        y01_MR_STAR = y01;\n        // z21[MC,* ] := A20[MC,MR] y01[MR,* ]\n        z21_MC_STAR.AlignWith( A20 );\n        Zeros( z21_MC_STAR, A20.Height(), 1 );\n        LocalGemv( NORMAL, F(1), A20, y01_MR_STAR, F(0), z21_MC_STAR );\n\n        // a21 := a21 - X20 conj(a01) (and incorporate last update into sum)\n        // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        a01_MR_STAR.AlignWith( X20 );\n        a01_MR_STAR = a01;\n        // z21[MC,* ] += X20[MC,MR] conj(a01)[MR,* ]\n        Conjugate( a01_MR_STAR );\n        LocalGemv( NORMAL, F(1), X20, a01_MR_STAR, F(1), z21_MC_STAR );\n        Conjugate( a01_MR_STAR );\n        // Sum the partial contributions from the past two updates\n        a21.RowSumScatterUpdate( F(-1), z21_MC_STAR );\n\n        // a21 := a21 - x21\n        // ^^^^^^^^^^^^^^^^\n        Axpy( F(-1), x21, a21 );\n\n        // Find tauQ and u such that\n        //  / I - tauQ | 1 | | 1, u^H | \\ | alpha21T | = | epsilon |\n        //  \\          | u |            / |     a21B |   |    0    |\n        const F tauQ = LeftReflector( alpha21T, a21B );\n        tQ.Set(k,0,tauQ);\n\n        // Temporarily set a21 = | 1 |\n        //                       | u |\n        if( alpha21T.IsLocal(0,0) )\n        {\n            epsilon1.SetLocal(0,0,alpha21T.GetLocalRealPart(0,0));\n            alpha21T.SetLocal(0,0,F(1));\n        }\n\n        // Form half of the left-reflector using an implicitly-updated A22:\n        // y12 := tauQ a21^H ( A22 - A20 Y02 - X2L conj(AT2) )\n        //      = tauQ ( a21^H A22 - (a21^H A20) Y02 - (a21^H X2L) conj(AT2) )\n        //      = tauQ ( A22^H a21 - Y02^H (A20^H a21) - AT2^T (X2L^H a21) )^H\n        // -------------------------------------------------------------------\n        a21_MC_STAR = a21;\n\n        // z21[MR,* ] := A22^H[MR,MC] a21[MC,* ]\n        z21_MR_STAR.AlignWith( A22 );\n        Zeros( z21_MR_STAR, A22.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), A22, a21_MC_STAR, F(0), z21_MR_STAR );\n\n        // z01[MC,* ] := (A20^H a21)[MC,* ]\n        z01_MR_STAR.AlignWith( A20 );\n        Zeros( z01_MR_STAR, A20.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), A20, a21_MC_STAR, F(0), z01_MR_STAR );\n        z01_MR_STAR.SumOver( A20.ColComm() );\n        z01_MC_STAR.AlignWith( Y02 );\n        z01_MC_STAR = z01_MR_STAR;\n        // z21[MR,* ] -= Y02^H[MR,MC] z01[MC,* ]\n        LocalGemv( ADJOINT, F(-1), Y02, z01_MC_STAR, F(1), z21_MR_STAR );\n\n        // z01[MR,* ] := X2L^H[MR,MC] a21[MC,* ]\n        zT1_MR_STAR.AlignWith( X2L );\n        Zeros( zT1_MR_STAR, X2L.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), X2L, a21_MC_STAR, F(0), zT1_MR_STAR );\n        zT1_MR_STAR.SumOver( X2L.ColComm() );\n        zT1_MC_STAR.AlignWith( AT2 );\n        zT1_MC_STAR = zT1_MR_STAR; \n        // z21[MR,* ] -= AT2^T[MR,MC] (X2L^H a21)[MC,* ]\n        LocalGemv( TRANSPOSE, F(-1), AT2, zT1_MC_STAR, F(1), z21_MR_STAR );\n\n        // Finally perform the column summation and then scale by tauQ\n        y12.AdjointColSumScatterFrom( z21_MR_STAR );\n        Scale( tauQ, y12 );\n    }\n\n    // Put back d and e\n    auto ATL = View( A, 0, 0, nX, nX );\n    auto ATLExpanded = View( A, 0, 0, nX+1, nX );\n    ATL.SetRealPartOfDiagonal( d, 0 );\n    ATLExpanded.SetRealPartOfDiagonal( e, -1 );\n}\n\n} // namespace bidiag\n} // namespace elem\n\n#endif // ifndef ELEM_BIDIAG_LPAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Bidiag/LUnb.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BIDIAG_LUNB_HPP\n#define ELEM_BIDIAG_LUNB_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n\n#include ELEM_REFLECTOR_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace bidiag {\n\ntemplate<typename F>\ninline void LUnb( Matrix<F>& A, Matrix<F>& tP, Matrix<F>& tQ )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"bidiag::LUnb\");\n        if( A.Height() > A.Width() )\n            LogicError(\"A must be at least as wide as it is tall\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int tPHeight = m;\n    const Int tQHeight = Max(m-1,0);\n    tP.Resize( tPHeight, 1 );\n    tQ.Resize( tQHeight, 1 );\n\n    // Views\n    Matrix<F> alpha21T, a21B;\n\n    // Temporaries\n    Matrix<F> x12Adj, w21;\n\n    for( Int k=0; k<m; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a21     = ViewRange( A, k+1, k,   m,   k+1 );\n        auto A22     = ViewRange( A, k+1, k+1, m,   n   );\n        auto a1R     = ViewRange( A, k,   k,   k+1, n   );\n        auto A2R     = ViewRange( A, k+1, k,   m,   n   );\n\n        // Find tauP and v such that\n        //  | alpha11 a12 | / I - tauP | 1   | | 1, conj(v) | \\ = | epsilonP 0 |\n        //                  \\          | v^T |                /\n        const F tauP = RightReflector( alpha11, a12 );\n        tP.Set(k,0,tauP);\n\n        // Temporarily set a1R = | 1 v |\n        const F epsilonP = alpha11.Get(0,0);\n        alpha11.Set(0,0,F(1));\n\n        // A2R := A2R Hous(a1R^T,tauP)\n        //      = A2R (I - tauP a1R^T conj(a1R))\n        //      = A2R - tauP (A2R a1R^T) conj(a1R)\n        // ---------------------------------------\n        // w21 := A2R a1R^T = A2R |   1 |\n        //                        | v^T |\n        Zeros( w21, a21.Height(), 1 );\n        Gemv( NORMAL, F(1), A2R, a1R, F(0), w21 );\n        // A2R := A2R - tauP w21 conj(a1R)\n        Ger( -tauP, w21, a1R, A2R );\n\n        // Put epsilonP back \n        alpha11.Set(0,0,epsilonP);\n\n        if( A22.Height() != 0 )\n        {\n            // Expose the subvector we seek to zero, a21B\n            PartitionDown( a21, alpha21T, a21B, 1 );\n\n            // Find tauQ and u such that\n            //  / I - tauQ | 1 | | 1, u^H | \\ | alpha21T | = | epsilonQ |\n            //  \\          | u |            / | a21B     | = |    0     |\n            const F tauQ = LeftReflector( alpha21T, a21B );\n            tQ.Set(k,0,tauQ);\n\n            // Temporarily set a21 = | 1 |\n            //                       | u |\n            const F epsilonQ = alpha21T.Get(0,0);\n            alpha21T.Set(0,0,F(1));\n\n            // A22 := Hous(a21,tauQ) A22\n            //      = (I - tauQ a21 a21^H) A22\n            //      = A22 - tauQ a21 (A22^H a21)^H\n            // -----------------------------------\n            // x12^H := (a21^H A22)^H = A22^H a21\n            Zeros( x12Adj, a12.Width(), 1 );\n            Gemv( ADJOINT, F(1), A22, a21, F(0), x12Adj );\n            // A22 := A22 - tauQ a21 x12 \n            //      = (I - tauQ a21 a21^H) A22\n            Ger( -tauQ, a21, x12Adj, A22 );\n\n            // Put epsilonQ back\n            alpha21T.Set(0,0,epsilonQ);\n        }\n    }\n}\n\ntemplate<typename F> \ninline void LUnb\n( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& tP, DistMatrix<F,STAR,STAR>& tQ )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"bidiag::LUnb\");\n        if( A.Grid() != tP.Grid() || tP.Grid() != tQ.Grid() )\n            LogicError(\"Process grids do not match\");\n        if( A.Height() > A.Width() )\n            LogicError(\"A must be at least as wide as it is tall\");\n    )\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int tPHeight = m;\n    const Int tQHeight = Max(m-1,0);\n    tP.Resize( tPHeight, 1 );\n    tQ.Resize( tQHeight, 1 );\n\n    DistMatrix<F,MC,  STAR> a21_MC_STAR(g);\n    DistMatrix<F,STAR,MR  > a1R_STAR_MR(g);\n    DistMatrix<F,MR,  STAR> x12Adj_MR_STAR(g);\n    DistMatrix<F,MC,  STAR> w21_MC_STAR(g);\n\n    for( Int k=0; k<m; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a21     = ViewRange( A, k+1, k,   m,   k+1 );\n        auto A22     = ViewRange( A, k+1, k+1, m,   n   );\n        auto a1R     = ViewRange( A, k,   k,   k+1, n   );\n        auto A2R     = ViewRange( A, k+1, k,   m,   n   );\n\n        // Find tauP and v such that\n        //  | alpha11 a12 | / I - tauP | 1   | | 1, conj(v) | \\ = | epsilonP 0 |\n        //                  \\          | v^T |                /\n        const F tauP = RightReflector( alpha11, a12 );\n        tP.Set(k,0,tauP);\n\n        // Temporarily set a1R = | 1 v |\n        F epsilonP=0;\n        if( alpha11.IsLocal(0,0) )\n            epsilonP = alpha11.GetLocal(0,0);\n        alpha11.Set(0,0,F(1));\n\n        // A2R := A2R Hous(a1R^T,tauP)\n        //      = A2R (I - tauP a1R^T conj(a1R))\n        //      = A2R - tauP (A2R a1R^T) conj(a1R)\n        // -------------------------------------\n        // w21 := A2R a1R^T = A2R | 1   |\n        //                        | v^T |\n        alpha11.Set(0,0,F(1));\n        a1R_STAR_MR.AlignWith( A2R );\n        a1R_STAR_MR = a1R;\n        w21_MC_STAR.AlignWith( A2R );\n        Zeros( w21_MC_STAR, a21.Height(), 1 );\n        LocalGemv( NORMAL, F(1), A2R, a1R_STAR_MR, F(0), w21_MC_STAR );\n        w21_MC_STAR.SumOver( A2R.RowComm() );\n        // A2R := A2R - tauP w21 conj(a1R)\n        LocalGer( -tauP, w21_MC_STAR, a1R_STAR_MR, A2R );\n\n        // Put epsilonP back \n        if( alpha11.IsLocal(0,0) )\n            alpha11.SetLocal(0,0,epsilonP);\n\n        if( A22.Height() != 0 )\n        {\n            // Expose the subvector we seek to zero, a21B\n            DistMatrix<F> alpha21T(g), a21B(g);\n            PartitionDown( a21, alpha21T, a21B, 1 );\n\n            // Find tauQ and u such that\n            //  / I - tauQ | 1 | | 1, u^H | \\ | alpha21T | = | epsilonQ |\n            //  \\          | u |            / | a21B     | = |    0     |\n            const F tauQ = LeftReflector( alpha21T, a21B );\n            tQ.Set(k,0,tauQ);\n\n            // Temporarily set a21 = | 1 |\n            //                       | u |\n            F epsilonQ=0;\n            if( alpha21T.IsLocal(0,0) )\n                epsilonQ = alpha21T.GetLocal(0,0);\n            alpha21T.Set(0,0,F(1));\n\n            // A22 := Hous(a21,tauQ) A22\n            //      = (I - tauQ a21 a21^H) A22\n            //      = A22 - tauQ a21 (A22^H a21)^H\n            // ----------------------------------\n            // x12^H := (a21^H A22)^H = A22^H a21\n            a21_MC_STAR.AlignWith( A22 );\n            a21_MC_STAR = a21;\n            x12Adj_MR_STAR.AlignWith( A22 );\n            Zeros( x12Adj_MR_STAR, a12.Width(), 1 );\n            LocalGemv( ADJOINT, F(1), A22, a21_MC_STAR, F(0), x12Adj_MR_STAR );\n            x12Adj_MR_STAR.SumOver( A22.ColComm() );\n            // A22 := A22 - tauQ a21 x12\n            //      = (I - tauQ a21 a21^H) A22\n            LocalGer( -tauQ, a21_MC_STAR, x12Adj_MR_STAR, A22 );\n\n            // Put epsilonQ back\n            if( alpha21T.IsLocal(0,0) )\n                alpha21T.SetLocal(0,0,epsilonQ);\n        }\n    }\n}\n\n} // namespace bidiag\n} // namespace elem\n\n#endif // ifndef ELEM_BIDIAG_LUNB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Bidiag/U.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BIDIAG_U_HPP\n#define ELEM_BIDIAG_U_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n#include ELEM_GEMM_INC\n\n#include ELEM_REFLECTOR_INC\n\n#include \"./UUnb.hpp\"\n#include \"./UPan.hpp\"\n\nnamespace elem {\nnamespace bidiag {\n\ntemplate<typename F>\ninline void U( Matrix<F>& A, Matrix<F>& tP, Matrix<F>& tQ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"bidiag::U\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    DEBUG_ONLY(\n        if( m < n ) \n            LogicError(\"A must be at least as tall as it is wide\");\n        // Are these requirements necessary?!?\n        if( tP.Viewing() || tQ.Viewing() )\n            LogicError(\"tP and tQ must not be views\");\n    )\n    const Int tPHeight = Max(n-1,0);\n    const Int tQHeight = n;\n    tP.Resize( tPHeight, 1 );\n    tQ.Resize( tQHeight, 1 );\n\n    Matrix<F> X, Y;\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto ABR = ViewRange( A, k,    k,    m, n );\n        auto A22 = ViewRange( A, k+nb, k+nb, m, n );\n        if( A22.Width() > 0 )\n        {\n            auto tP1 = View( tP, k, 0, nb, 1 );\n            auto tQ1 = View( tQ, k, 0, nb, 1 );\n            X.Resize( m-k, nb  );\n            Y.Resize( nb,  n-k );\n            bidiag::UPan( ABR, tP1, tQ1, X, Y );\n\n            auto A12 = ViewRange( A, k,    k+nb, k+nb, n    );\n            auto A21 = ViewRange( A, k+nb, k,    m,    k+nb );\n            auto X21 = ViewRange( X, nb, 0,  m-k, nb  );\n            auto Y12 = ViewRange( Y, 0,  nb, nb,  n-k );\n\n            // Set bottom-left entry of A12 to 1\n            const F epsilon = A12.Get(nb-1,0);\n            A12.Set(nb-1,0,F(1));\n\n            Gemm( NORMAL, NORMAL, F(-1), A21, Y12, F(1), A22 );\n            Conjugate( A12 );\n            Gemm( NORMAL, NORMAL, F(-1), X21, A12, F(1), A22 );\n            Conjugate( A12 );\n\n            // Put back bottom-left entry of A12\n            A12.Set(nb-1,0,epsilon);\n        }\n        else\n        {\n            auto tP1 = View( tP, k, 0, nb-1, 1 );\n            auto tQ1 = View( tQ, k, 0, nb,   1 );\n            bidiag::UUnb( ABR, tP1, tQ1 );\n        }\n    }\n}\n\ntemplate<typename F> \ninline void\nU( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& tP, DistMatrix<F,STAR,STAR>& tQ )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"bidiag::U\");\n        if( A.Grid() != tP.Grid() || tP.Grid() != tQ.Grid() )\n            LogicError\n            (\"{A,tP,tQ} must be distributed over the same grid\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    DEBUG_ONLY(\n        if( m < n ) \n            LogicError(\"A must be at least as tall as it is wide\");\n        // Are these requirements necessary?!?\n        if( tP.Viewing() || tQ.Viewing() )\n            LogicError(\"tP and tQ must not be views\");\n    )\n    const Grid& g = A.Grid();\n    const Int tPHeight = Max(n-1,0);\n    const Int tQHeight = n;\n    tP.Resize( tPHeight, 1 );\n    tQ.Resize( tQHeight, 1 );\n\n    DistMatrix<F> X(g), Y(g);\n    DistMatrix<F,MC,STAR> X21_MC_STAR(g);\n    DistMatrix<F,MR,STAR> Y12Adj_MR_STAR(g);\n\n    DistMatrix<F,MC,  STAR> AB1_MC_STAR(g);\n    DistMatrix<F,STAR,MR  > A1R_STAR_MR(g);\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        \n        auto A22 = ViewRange( A, k+nb, k+nb, m,    n    );\n        auto ABR = ViewRange( A, k,    k,    m,    n    );\n\n        if( A22.Width() > 0 )\n        {\n            X.AlignWith( ABR );\n            Y.AlignWith( ABR );\n            X.Resize( m-k, nb  );\n            Y.Resize( nb,  n-k );\n\n            AB1_MC_STAR.AlignWith( ABR );\n            A1R_STAR_MR.AlignWith( ABR );\n            AB1_MC_STAR.Resize( m-k, nb  );\n            A1R_STAR_MR.Resize( nb,  n-k );\n\n            auto tP1 = View( tP, k, 0, nb, 1 );\n            auto tQ1 = View( tQ, k, 0, nb, 1 );\n            bidiag::UPan( ABR, tP1, tQ1, X, Y, AB1_MC_STAR, A1R_STAR_MR );\n\n            auto X21 = ViewRange( X, nb, 0,  m-k, nb  );\n            auto Y12 = ViewRange( Y, 0,  nb, nb,  n-k );\n            X21_MC_STAR.AlignWith( A22 );\n            Y12Adj_MR_STAR.AlignWith( A22 );\n            X21_MC_STAR = X21;\n            Y12.AdjointColAllGather( Y12Adj_MR_STAR );\n\n            auto A21_MC_STAR = ViewRange( AB1_MC_STAR, nb, 0,  m-k, nb  );\n            auto A12_STAR_MR = ViewRange( A1R_STAR_MR, 0,  nb, nb,  n-k );\n\n            LocalGemm\n            ( NORMAL, ADJOINT, F(-1), A21_MC_STAR, Y12Adj_MR_STAR, F(1), A22 );\n            Conjugate( A12_STAR_MR );\n            LocalGemm\n            ( NORMAL, NORMAL, F(-1), X21_MC_STAR, A12_STAR_MR, F(1), A22 );\n        }\n        else\n        {\n            auto tP1 = View( tP, k, 0, nb-1, 1 );\n            auto tQ1 = View( tQ, k, 0, nb,   1 );\n            bidiag::UUnb( ABR, tP1, tQ1 );\n        }\n    }\n}\n\n} // namespace bidiag\n} // namespace elem\n\n#endif // ifndef ELEM_BIDIAG_U_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Bidiag/UPan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BIDIAG_UPAN_HPP\n#define ELEM_BIDIAG_UPAN_HPP\n\n#include ELEM_ADJOINT_INC\n#include ELEM_AXPY_INC\n#include ELEM_CONJUGATE_INC\n#include ELEM_SCALE_INC\n#include ELEM_GEMV_INC\n\n#include ELEM_REFLECTOR_INC\n\nnamespace elem {\nnamespace bidiag {\n\ntemplate<typename F> \ninline void\nUPan( Matrix<F>& A, Matrix<F>& tP, Matrix<F>& tQ, Matrix<F>& X, Matrix<F>& Y )\n{\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int nX = X.Width();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"bidiag::UPan\");\n        if( tP.Height() != nX || tP.Width() != 1 )\n            LogicError(\"tP was not the right size\");\n        if( tQ.Height() != nX || tQ.Width() != 1 )\n            LogicError(\"tQ was not the right size\");\n        if( mA < nA )\n            LogicError(\"A must be at least as tall as it is wide\");\n        if( mA != X.Height() )\n            LogicError(\"A and X must have the same height\");\n        if( nA != Y.Width() )\n            LogicError(\"A and Y must have the same width\");\n        if( X.Height() < nX )\n            LogicError(\"X must be a column panel\");\n        if( Y.Height() != nX )\n            LogicError(\"Y is the wrong height\");\n    )\n    typedef Base<F> Real;\n\n    Matrix<F> zT1, z01, z21;\n\n    Matrix<Real> d, e;\n    d.Resize( nX, 1 );\n    e.Resize( nX, 1 );\n\n    for( Int k=0; k<nX; ++k )\n    {\n        auto a01      = ViewRange( A, 0,   k,   k,   k+1 );\n        auto A02      = ViewRange( A, 0,   k+1, k,   nA  );\n        auto a10      = ViewRange( A, k,   0,   k+1, k   );\n        auto alpha11  = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12      = ViewRange( A, k,   k+1, k+1, nA  );\n        auto alpha12L = ViewRange( A, k,   k+1, k+1, k+2 );\n        auto a12R     = ViewRange( A, k,   k+2, k+1, nA  );\n        auto a21      = ViewRange( A, k+1, k,   mA,  k+1 );\n        auto A22      = ViewRange( A, k+1, k+1, mA,  nA  );\n        auto AB0      = ViewRange( A, k,   0,   mA,  k   );\n        auto aB1      = ViewRange( A, k,   k,   mA,  k+1 );\n        auto AB2      = ViewRange( A, k,   k+1, mA,  nA  );\n        auto A2L      = ViewRange( A, k+1, 0,   mA,  k+1 );\n\n        auto x10 = ViewRange( X, k,   0,   k+1, k   );\n        auto X20 = ViewRange( X, k+1, 0,   mA,  k   );\n        auto x21 = ViewRange( X, k+1, k,   mA,  k+1 );\n        auto XB0 = ViewRange( X, k,   0,   mA,  k   );\n\n        auto y01 = ViewRange( Y, 0, k,   k,   k+1 );\n        auto Y02 = ViewRange( Y, 0, k+1, k,   nA  );\n        auto y12 = ViewRange( Y, k, k+1, k+1, nA  );\n        auto YT2 = ViewRange( Y, 0, k+1, k+1, nA  );\n\n        // Apply all previous reflectors to aB1:\n        //   aB1 := aB1 - AB0 y01 - XB0 conj(a01)\n        Gemv( NORMAL, F(-1), AB0, y01, F(1), aB1 );\n        Conjugate( a01 );\n        Gemv( NORMAL, F(-1), XB0, a01, F(1), aB1 );\n        Conjugate( a01 );\n\n        // Find tauQ and u such that\n        //  / I - tauQ | 1 | | 1, u^H | \\ | alpha11 | = | delta |\n        //  \\          | u |            / |     a21 |   |    0  |\n        const F tauQ = LeftReflector( alpha11, a21 );\n        tQ.Set(k,0,tauQ);\n\n        // Temporarily set aB1 = | 1 |\n        //                       | u |\n        d.Set(k,0,alpha11.GetRealPart(0,0));\n        alpha11.Set(0,0,F(1));\n\n        // Form half of the left-reflector using an implicitly-updated AB2:\n        // y12 := tauQ aB1^H ( AB2 - AB0 Y02 - XB0 conj(A02) )\n        //      = tauQ ( aB1^H AB2 - (aB1^H AB0) Y02 - (aB1^H XB0) conj(A02) )\n        //      = tauQ ( AB2^H aB1 - Y02^H (AB0^H aB1) - A02^T (XB0^H aB1) )^H\n        // -------------------------------------------------------------------\n        // z21 := AB2^H aB1\n        Gemv( ADJOINT, F(1), AB2, aB1, z21 );\n        // z21 := z21 - Y02^H (AB0^H aB1)\n        Gemv( ADJOINT, F(1),  AB0, aB1, z01 );\n        Gemv( ADJOINT, F(-1), Y02, z01, F(1), z21 );\n        // z21 := z21 - A02^T (XB0^H aB1)\n        Gemv( ADJOINT, F(1),  XB0, aB1, z01 );\n        Gemv( TRANSPOSE, F(-1), A02, z01, F(1), z21 );\n        // y12 := tauQ z21^H\n        Adjoint( z21, y12 );\n        Scale( tauQ, y12 ); \n\n        // Apply all previous reflectors to a12:\n        // a12 := a12 - a1L yT2           - x10 conj(A02)\n        //      = a12 - (a10 Y02 + 1*y12) - x10 conj(A02)\n        Gemv( TRANSPOSE, F(-1), Y02, a10, F(1), a12 );\n        Axpy( F(-1), y12, a12 );\n        Gemv( ADJOINT, F(-1), A02, x10, F(1), a12 ); \n\n        // Find tauP and v such that\n        //  |alpha12L a12R| /I - tauP |1  | |1 conj(v)|\\ = |epsilon 0|\n        //                  \\         |v^T|            /\n        const F tauP = RightReflector( alpha12L, a12R );\n        tP.Set(k,0,tauP);\n\n        // Temporarily set a12 = | 1 v |\n        e.Set(k,0,alpha12L.GetRealPart(0,0));\n        alpha12L.Set(0,0,F(1));\n\n        // Form half of the right-reflector using an implicitly-updated A22:\n        // x21 := tauP (A22 - A2L YT2 - X20 conj(A02)) a12^T\n        //      = tauP (A22 a12^T - A2L (YT2 a12^T) - X20 (conj(A02) a12^T))\n        // -----------------------------------------------------------------\n        // x21 := A22 a12^T\n        Zeros( x21, A22.Height(), 1 );\n        Gemv( NORMAL, F(1), A22, a12, F(0), x21 );\n        // x21 := x21 - A2L (YT2 a12^T) \n        Gemv( NORMAL, F(1),  YT2, a12, zT1 );\n        Gemv( NORMAL, F(-1), A2L, zT1, F(1), x21 );\n        // x21 := x21 - X20 (conj(A02) a12^T)\n        //      = x21 - X20 conj(A02 a12^H)\n        Conjugate( a12 );\n        Gemv( NORMAL, F(1),  A02, a12, z01 );\n        Conjugate( a12 );\n        Conjugate( z01 );\n        Gemv( NORMAL, F(-1), X20, z01, F(1), x21 );\n        // x21 := tauP x21\n        Scale( tauP, x21 );\n    }\n\n    // Put back d and e\n    auto ATL = View( A, 0, 0, nX, nX );\n    auto ATLExpanded = View( A, 0, 0, nX, nX+1 );\n    ATL.SetRealPartOfDiagonal( d, 0 );\n    ATLExpanded.SetRealPartOfDiagonal( e, 1 );\n}\n\ntemplate<typename F> \ninline void\nUPan\n( DistMatrix<F>& A, \n  DistMatrix<F,STAR,STAR>& tP,\n  DistMatrix<F,STAR,STAR>& tQ,\n  DistMatrix<F>& X, \n  DistMatrix<F>& Y,\n  DistMatrix<F,MC,  STAR>& AL_MC_STAR,\n  DistMatrix<F,STAR,MR  >& AT_STAR_MR )\n{\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int nX = X.Width();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"bidiag::UPan\");\n        if( A.Grid() != tP.Grid() || tP.Grid() != tQ.Grid() || \n            tQ.Grid() != X.Grid() || X.Grid() != Y.Grid() ||\n            Y.Grid() != AL_MC_STAR.Grid() || \n            Y.Grid() != AT_STAR_MR.Grid() )\n            LogicError(\"Grids must match\");\n        if( A.ColAlign() != X.ColAlign() || \n            A.RowAlign() != X.RowAlign() )\n            LogicError(\"A and X must be aligned\");\n        if( A.ColAlign() != Y.ColAlign() ||\n            A.RowAlign() != Y.RowAlign() )\n            LogicError(\"A and Y must be aligned\");\n        if( tP.Height() != nX || tP.Width() != 1 )\n            LogicError(\"tP was not the right size\");\n        if( tQ.Height() != nX || tQ.Width() != 1 )\n            LogicError(\"tQ was not the right size\");\n        if( mA < nA )\n            LogicError(\"A must be at least as tall as it is wide\");\n        if( mA != X.Height() )\n            LogicError(\"A and X must have the same height\");\n        if( nA != Y.Width() )\n            LogicError(\"A and Y must have the same width\");\n        if( X.Height() < nX )\n            LogicError(\"X must be a column panel\");\n        if( Y.Height() != nX )\n            LogicError(\"Y is the wrong height\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n\n    DistMatrix<F,MC,  STAR> z01_MC_STAR(g),\n                            zT1_MC_STAR(g),\n                            z21_MC_STAR(g),\n                            zB1_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> z01_MR_STAR(g),\n                            zT1_MR_STAR(g),\n                            z21_MR_STAR(g),\n                            y01_MR_STAR(g),\n                            a01_MR_STAR(g);\n    DistMatrix<F,STAR,MC  > x10_STAR_MC(g),\n                            a10_STAR_MC(g);\n\n    DistMatrix<Real,MD,STAR> d(g), e(g);\n    d.SetRoot( A.DiagonalRoot(0) );\n    e.SetRoot( A.DiagonalRoot(1) );\n    d.AlignCols( A.DiagonalAlign(0) );\n    e.AlignCols( A.DiagonalAlign(1) ); \n    d.Resize( nX, 1 );\n    e.Resize( nX, 1 );\n\n    for( Int k=0; k<nX; ++k )\n    {\n        auto a01      = ViewRange( A, 0,   k,   k,   k+1 );\n        auto A02      = ViewRange( A, 0,   k+1, k,   nA  );\n        auto a10      = ViewRange( A, k,   0,   k+1, k   );\n        auto alpha11  = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12      = ViewRange( A, k,   k+1, k+1, nA  );\n        auto alpha12L = ViewRange( A, k,   k+1, k+1, k+2 );\n        auto a12R     = ViewRange( A, k,   k+2, k+1, nA  );\n        auto a21      = ViewRange( A, k+1, k,   mA,  k+1 );\n        auto A22      = ViewRange( A, k+1, k+1, mA,  nA  );\n        auto AB0      = ViewRange( A, k,   0,   mA,  k   );\n        auto aB1      = ViewRange( A, k,   k,   mA,  k+1 );\n        auto AB2      = ViewRange( A, k,   k+1, mA,  nA  );\n        auto A2L      = ViewRange( A, k+1, 0,   mA,  k+1 );\n\n        auto a12_STAR_MR = ViewRange( AT_STAR_MR, k, k+1, k+1, nA  );\n        auto aB1_MC_STAR = ViewRange( AL_MC_STAR, k, k,   mA,  k+1 );\n\n        auto x10 = ViewRange( X, k,   0,   k+1, k   );\n        auto X20 = ViewRange( X, k+1, 0,   mA,  k   );\n        auto x21 = ViewRange( X, k+1, k,   mA,  k+1 );\n        auto XB0 = ViewRange( X, k,   0,   mA,  k   );\n\n        auto y01 = ViewRange( Y, 0, k,   k,   k+1 );\n        auto Y02 = ViewRange( Y, 0, k+1, k,   nA  );\n        auto y12 = ViewRange( Y, k, k+1, k+1, nA  );\n        auto YT2 = ViewRange( Y, 0, k+1, k+1, nA  );\n\n        auto delta1   = View( d,  k, 0, 1, 1 );\n        auto epsilon1 = View( e,  k, 0, 1, 1 );\n\n        // Apply all previous reflectors to aB1:\n        //   aB1 := aB1 - AB0 y01 - XB0 conj(a01)\n        if( k > 0 )\n        {\n            y01_MR_STAR.AlignWith( AB0 );\n            a01_MR_STAR.AlignWith( AB0 );\n            y01_MR_STAR = y01;\n            a01_MR_STAR = a01;\n\n            zB1_MC_STAR.AlignWith( aB1 );\n            Zeros( zB1_MC_STAR, aB1.Height(), 1 );\n            // zB1[MC,* ] := AB0[MC,MR] y01[MR,* ] + XB0[MC,MR] conj(a01[MR,* ])\n            LocalGemv( NORMAL, F(1), AB0, y01_MR_STAR, F(0), zB1_MC_STAR );\n            Conjugate( a01_MR_STAR );\n            LocalGemv( NORMAL, F(1), XB0, a01_MR_STAR, F(1), zB1_MC_STAR );\n            // Sum the partial contributions and subtract from aB1\n            aB1.RowSumScatterUpdate( F(-1), zB1_MC_STAR );\n        }\n\n        // Find tauQ and u such that\n        //  / I - tauQ | 1 | | 1, u^H | \\ | alpha11 | = | delta |\n        //  \\          | u |            / |     a21 |   |    0  |\n        const F tauQ = LeftReflector( alpha11, a21 );\n        tQ.Set(k,0,tauQ);\n\n        // Temporarily set aB1 = | 1 |\n        //                       | u |\n        if( delta1.IsLocal(0,0) )\n        {\n            delta1.SetLocal(0,0,alpha11.GetLocalRealPart(0,0));\n            alpha11.SetLocal(0,0,F(1));\n        }\n\n        // Form half of the left-reflector using an implicitly-updated AB2:\n        // y12 := tauQ aB1^H ( AB2 - AB0 Y02 - XB0 conj(A02) )\n        //      = tauQ ( aB1^H AB2 - (aB1^H AB0) Y02 - (aB1^H XB0) conj(A02) )\n        //      = tauQ ( AB2^H aB1 - Y02^H (AB0^H aB1) - A02^T (XB0^H aB1) )^H\n        // -------------------------------------------------------------------\n        aB1_MC_STAR = aB1;\n\n        // z21[MR,* ] := AB2^H[MR,MC] aB1[MC,* ]\n        z21_MR_STAR.AlignWith( AB2 );\n        Zeros( z21_MR_STAR, A22.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), AB2, aB1_MC_STAR, F(0), z21_MR_STAR );\n\n        // z01[MC,* ] := (AB0^H aB1)[MC,* ]\n        z01_MR_STAR.AlignWith( AB0 );\n        Zeros( z01_MR_STAR, AB0.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), AB0, aB1_MC_STAR, F(0), z01_MR_STAR );\n        z01_MR_STAR.SumOver( AB0.ColComm() );\n        z01_MC_STAR.AlignWith( Y02 );\n        z01_MC_STAR = z01_MR_STAR;\n        // z21[MR,* ] -= Y02^H[MR,MC] z01[MC,* ] \n        LocalGemv( ADJOINT, F(-1), Y02, z01_MC_STAR, F(1), z21_MR_STAR );\n\n        // z01[MR,* ] := XB0^H[MR,MC] aB1[MC,* ]\n        z01_MR_STAR.AlignWith( XB0 );\n        Zeros( z01_MR_STAR, XB0.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), XB0, aB1_MC_STAR, F(0), z01_MR_STAR );\n        z01_MR_STAR.SumOver( XB0.ColComm() );\n        z01_MC_STAR.AlignWith( A02 );\n        z01_MC_STAR = z01_MR_STAR;\n        // z21[MR,* ] -= A02^T[MR,MC] (XB0^H aB1)[MC,* ]\n        LocalGemv( TRANSPOSE, F(-1), A02, z01_MC_STAR, F(1), z21_MR_STAR );\n\n        // Finally perform the column summation and then scale by tauQ\n        y12.AdjointColSumScatterFrom( z21_MR_STAR );\n        Scale( tauQ, y12 );\n\n        // Apply all previous reflectors to a12:\n        // a12 := a12 - a1L yT2           - x10 conj(A02)\n        //      = a12 - (a10 Y02 + 1*y12) - x10 conj(A02)\n        // ----------------------------------------------\n        // a12 := a12 - a10 Y02 (do not sum over columns yet)\n        // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        a10_STAR_MC.AlignWith( Y02 );\n        a10_STAR_MC = a10;\n        // z21[MR,* ] := Y02^T[MR,MC] a10^T[MC,* ]\n        z21_MR_STAR.AlignWith( Y02 );\n        Zeros( z21_MR_STAR, Y02.Width(), 1 );\n        LocalGemv( TRANSPOSE, F(1), Y02, a10_STAR_MC, F(0), z21_MR_STAR );\n\n        // a12 := a12 - x10 conj(A02) (and incorporate last update into sum)\n        // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        x10_STAR_MC.AlignWith( A02 );\n        x10_STAR_MC = x10;\n        // z21[MR,* ] := A02^H[MR,MC] x10^T[MC,* ]\n        LocalGemv( ADJOINT, F(1), A02, x10_STAR_MC, F(1), z21_MR_STAR );\n        // Sum the partial contributions from the past two updates\n        a12.TransposeColSumScatterUpdate( F(-1), z21_MR_STAR );\n\n        // a12 := a12 - y12\n        // ^^^^^^^^^^^^^^^^\n        Axpy( F(-1), y12, a12 );\n\n        // Find tauP and v such that\n        //  |alpha12L a12R| /I - tauP |1  | |1, conj(v)|\\ = |epsilon 0|\n        //                  \\         |v^T|             /\n        const F tauP = RightReflector( alpha12L, a12R );\n        tP.Set(k,0,tauP);\n\n        // Temporarily set a12 = | 1 v |\n        if( epsilon1.IsLocal(0,0) )\n        {\n            epsilon1.SetLocal(0,0,alpha12L.GetLocalRealPart(0,0));\n            alpha12L.SetLocal(0,0,F(1));\n        }\n\n        // Form half of the right-reflector using an implicitly-updated A22:\n        // x21 := tauP (A22 - A2L YT2 - X20 conj(A02)) a12^T\n        //      = tauP (A22 a12^T - A2L (YT2 a12^T) - X20 (conj(A02) a12^T))\n        // -----------------------------------------------------------------\n        a12_STAR_MR = a12;\n\n        // z21[MC,* ] := A22[MC,MR] a12^T[MR,* ]\n        // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        z21_MC_STAR.AlignWith( A22 );\n        Zeros( z21_MC_STAR, A22.Height(), 1 );\n        LocalGemv( NORMAL, F(1), A22, a12_STAR_MR, F(0), z21_MC_STAR );\n       \n        // z21[MC,* ] -= A2L[MC,MR] (YT2 a12^T)[MR,* ]\n        // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        // zT1[MC,* ] := YT2[MC,MR] a12^T[MR,* ]\n        zT1_MC_STAR.AlignWith( YT2 );\n        Zeros( zT1_MC_STAR, YT2.Height(), 1 );\n        LocalGemv( NORMAL, F(1), YT2, a12_STAR_MR, F(0), zT1_MC_STAR );\n        zT1_MC_STAR.SumOver( YT2.RowComm() );\n        // Redistribute and perform local Gemv \n        zT1_MR_STAR.AlignWith( A2L );\n        zT1_MR_STAR = zT1_MC_STAR;\n        LocalGemv( NORMAL, F(-1), A2L, zT1_MR_STAR, F(1), z21_MC_STAR );\n\n        // z21[MC,* ] -= X20[MC,MR] (conj(A02) a12^T)[MR,* ]\n        // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        // z01[MC,* ] := conj(A02[MC,MR] a12^H[MR,* ])\n        z01_MC_STAR.AlignWith( A02 ); \n        Zeros( z01_MC_STAR, A02.Height(), 1 );\n        Conjugate( a12_STAR_MR );\n        LocalGemv( NORMAL, F(1), A02, a12_STAR_MR, F(0), z01_MC_STAR );\n        z01_MC_STAR.SumOver( A02.RowComm() );\n        Conjugate( a12_STAR_MR );\n        Conjugate( z01_MC_STAR );\n        // Redistribute and perform local Gemv\n        z01_MR_STAR.AlignWith( X20 );\n        z01_MR_STAR = z01_MC_STAR;\n        LocalGemv( NORMAL, F(-1), X20, z01_MR_STAR, F(1), z21_MC_STAR );\n        // Sum the various contributions within process rows\n        x21.RowSumScatterFrom( z21_MC_STAR );\n        Scale( tauP, x21 );\n    }\n\n    // Put back d and e\n    auto ATL = View( A, 0, 0, nX, nX );\n    auto ATLExpanded = View( A, 0, 0, nX, nX+1 );\n    ATL.SetRealPartOfDiagonal( d, 0 );\n    ATLExpanded.SetRealPartOfDiagonal( e, 1 );\n}\n\n} // namespace bidiag\n} // namespace elem\n\n#endif // ifndef ELEM_BIDIAG_UPAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Bidiag/UUnb.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BIDIAG_UUNB_HPP\n#define ELEM_BIDIAG_UUNB_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n\n#include ELEM_REFLECTOR_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace bidiag {\n\ntemplate<typename F>\ninline void UUnb( Matrix<F>& A, Matrix<F>& tP, Matrix<F>& tQ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"bidiag::UUnb\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int tPHeight = Max(n-1,0);\n    const Int tQHeight = n;\n    DEBUG_ONLY(\n        if( m < n )\n            LogicError(\"A must be at least as tall as it is wide\");\n    )\n    tP.Resize( tPHeight, 1 );\n    tQ.Resize( tQHeight, 1 );\n\n    Matrix<F> x12Adj, w21;\n\n    for( Int k=0; k<n; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a21     = ViewRange( A, k+1, k,   m,   k+1 );\n        auto A22     = ViewRange( A, k+1, k+1, m,   n   );\n        auto aB1     = ViewRange( A, k,   k,   m,   k+1 );\n        auto AB2     = ViewRange( A, k,   k+1, m,   n   );\n\n        // Find tauQ and u such that\n        //  / I - tauQ | 1 | | 1, u^H | \\ | alpha11 | = | epsilonQ |\n        //  \\          | u |            / |     a21 | = |    0     |\n        const F tauQ = LeftReflector( alpha11, a21 );\n        tQ.Set(k,0,tauQ );\n\n        // Temporarily set aB1 = | 1 |\n        //                       | u |\n        const F epsilonQ = alpha11.Get(0,0);\n        alpha11.Set(0,0,F(1));\n\n        // AB2 := Hous(aB1,tauQ) AB2\n        //      = (I - tauQ aB1 aB1^H) AB2\n        //      = AB2 - tauQ aB1 (AB2^H aB1)^H\n        // -----------------------------------\n        // x12^H := (aB1^H AB2)^H = AB2^H aB1\n        Zeros( x12Adj, a12.Width(), 1 );\n        Gemv( ADJOINT, F(1), AB2, aB1, F(0), x12Adj );\n        // AB2 := AB2 - tauQ aB1 x12\n        //      = (I - tauQ aB1 aB1^H) AB2\n        Ger( -tauQ, aB1, x12Adj, AB2 );\n\n        // Put epsilonQ back \n        alpha11.Set(0,0,epsilonQ);\n\n        if( k+1 < n )\n        {\n            // Expose the subvector we seek to zero, a12R\n            Matrix<F> alpha12L, a12R;\n            PartitionRight( a12, alpha12L, a12R, 1 );\n\n            // Find tauP and v such that\n            //  |alpha12L a12R| /I - tauP |1  | |1, conj(v)|\\ = |epsilonP 0|\n            //                  \\         |v^T|             /\n            const F tauP = RightReflector( alpha12L, a12R );\n            tP.Set(k,0,tauP);\n\n            // Temporarily set a12^T = | 1 | \n            //                         | v |\n            const F epsilonP = alpha12L.Get(0,0);\n            alpha12L.Set(0,0,F(1));\n\n            // A22 := A22 Hous(a12^T,tauP)\n            //      = A22 (I - tauP a12^T conj(a12))\n            //      = A22 - tauP (A22 a12^T) conj(a12)\n            // ---------------------------------------\n            // w21 := A22 a12^T = A22 | 1   |\n            //                        | v^T |\n            Zeros( w21, a21.Height(), 1 );\n            Gemv( NORMAL, F(1), A22, a12, F(0), w21 );\n            // A22 := A22 - tauP w21 conj(a12)\n            Ger( -tauP, w21, a12, A22 );\n\n            // Put epsilonP back \n            alpha12L.Set(0,0,epsilonP);\n        }\n    }\n}\n\ntemplate<typename F> \ninline void UUnb\n( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& tP, DistMatrix<F,STAR,STAR>& tQ )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"bidiag::UUnb\");\n        if( A.Grid() != tP.Grid() || tP.Grid() != tQ.Grid() )\n            LogicError(\"Process grids do not match\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    DEBUG_ONLY(\n        if( m < n )\n            LogicError(\"A must be at least as tall as it is wide\");\n    )\n    const Grid& g = A.Grid();\n    const Int tPHeight = Max(n-1,0);\n    const Int tQHeight = n;\n    tP.Resize( tPHeight, 1 );\n    tQ.Resize( tQHeight, 1 );\n\n    DistMatrix<F,STAR,MR  > a12_STAR_MR(g);\n    DistMatrix<F,MC,  STAR> aB1_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> x12Adj_MR_STAR(g);\n    DistMatrix<F,MC,  STAR> w21_MC_STAR(g);\n\n    for( Int k=0; k<n; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a21     = ViewRange( A, k+1, k,   m,   k+1 );\n        auto A22     = ViewRange( A, k+1, k+1, m,   n   );\n        auto aB1     = ViewRange( A, k,   k,   m,   k+1 );\n        auto AB2     = ViewRange( A, k,   k+1, m,   n   );\n\n        // Find tauQ and u such that\n        //  / I - tauQ | 1 | | 1, u^H | \\ | alpha11 | = | epsilonQ |\n        //  \\          | u |            / |     a21 | = |    0     |\n        const F tauQ = LeftReflector( alpha11, a21 );\n        tQ.Set(k,0,tauQ );\n\n        // Temporarily set aB1 = | 1 |\n        //                       | u |\n        F epsilonQ=0;\n        if( alpha11.IsLocal(0,0) )\n            epsilonQ = alpha11.GetLocal(0,0);\n        alpha11.Set(0,0,F(1));\n\n        // AB2 := Hous(aB1,tauQ) AB2\n        //      = (I - tauQ aB1 aB1^H) AB2\n        //      = AB2 - tauQ aB1 (AB2^H aB1)^H\n        // ----------------------------------\n        // x12^H := (aB1^H AB2)^H = AB2^H aB1\n        aB1_MC_STAR.AlignWith( aB1 );\n        aB1_MC_STAR = aB1;\n        x12Adj_MR_STAR.AlignWith( AB2 );\n        Zeros( x12Adj_MR_STAR, a12.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), AB2, aB1_MC_STAR, F(0), x12Adj_MR_STAR );\n        x12Adj_MR_STAR.SumOver( AB2.ColComm() );\n        // AB2 := AB2 - tauQ aB1 x12\n        LocalGer( -tauQ, aB1_MC_STAR, x12Adj_MR_STAR, AB2 );\n\n        // Put epsilonQ back \n        if( alpha11.IsLocal(0,0) )\n            alpha11.SetLocal(0,0,epsilonQ);\n\n        if( k+1 < n )\n        {\n            // Expose the subvector we seek to zero, a12R\n            DistMatrix<F> alpha12L(g), a12R(g);\n            PartitionRight( a12, alpha12L, a12R, 1 );\n\n            // Find tauP and v such that\n            //  |alpha12L a12R| /I - tauP |1  | |1, conj(v)|\\ = |epsilonP 0|\n            //                  \\         |v^T|             /\n            const F tauP = RightReflector( alpha12L, a12R );\n            tP.Set(k,0,tauP);\n\n            // Temporarily set a12^T = | 1   |\n            //                         | v^T |\n            F epsilonP=0;\n            if( alpha12L.IsLocal(0,0) )\n                epsilonP = alpha12L.GetLocal(0,0);\n            alpha12L.Set(0,0,F(1));\n\n            // A22 := A22 Hous(a12^T,tauP)\n            //      = A22 (I - tauP a12^T conj(a12))\n            //      = A22 - tauP (A22 a12^T) conj(a12)\n            // -------------------------------------\n            // w21 := A22 a12^T = A22 | 1   |\n            //                        | v^T |\n            a12_STAR_MR.AlignWith( a12 );\n            a12_STAR_MR = a12;\n            w21_MC_STAR.AlignWith( A22 );\n            Zeros( w21_MC_STAR, a21.Height(), 1 );\n            LocalGemv( NORMAL, F(1), A22, a12_STAR_MR, F(0), w21_MC_STAR );\n            w21_MC_STAR.SumOver( A22.RowComm() );\n            // A22 := A22 - tauP w21 conj(a12)\n            LocalGer( -tauP, w21_MC_STAR, a12_STAR_MR, A22 );\n\n            // Put epsilonP back\n            if( alpha12L.IsLocal(0,0) )\n                alpha12L.SetLocal(0,0,epsilonP);\n        }\n    }\n}\n\n} // namespace bidiag\n} // namespace elem\n\n#endif // ifndef ELEM_BIDIAG_UUNB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Bidiag.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BIDIAG_HPP\n#define ELEM_BIDIAG_HPP\n\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_MAKETRIANGULAR_INC\n\n#include \"./Bidiag/Apply.hpp\"\n#include \"./Bidiag/L.hpp\"\n#include \"./Bidiag/U.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void Bidiag( Matrix<F>& A, Matrix<F>& tP, Matrix<F>& tQ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Bidiag\"))\n    if( A.Height() >= A.Width() )\n        bidiag::U( A, tP, tQ );\n    else\n        bidiag::L( A, tP, tQ );\n}\n\ntemplate<typename F> \ninline void Bidiag\n( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& tP, DistMatrix<F,STAR,STAR>& tQ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Bidiag\"))\n    if( A.Height() >= A.Width() )\n        bidiag::U( A, tP, tQ );\n    else\n        bidiag::L( A, tP, tQ );\n}\n\ntemplate<typename F>\ninline void Bidiag( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Bidiag\"))\n    Matrix<F> tP, tQ;\n    Bidiag( A, tP, tQ );\n    if( A.Height() >= A.Width() )\n    {\n        MakeTriangular( UPPER, A );    \n        MakeTrapezoidal( LOWER, A, 1 );\n    }\n    else\n    {\n        MakeTriangular( LOWER, A );    \n        MakeTrapezoidal( UPPER, A, -1 );\n    }\n}\n\ntemplate<typename F> \ninline void Bidiag( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Bidiag\"))\n    DistMatrix<F,STAR,STAR> tP(A.Grid()), tQ(A.Grid());\n    Bidiag( A, tP, tQ );\n    if( A.Height() >= A.Width() )\n    {\n        MakeTriangular( UPPER, A );    \n        MakeTrapezoidal( LOWER, A, 1 );\n    }\n    else\n    {\n        MakeTriangular( LOWER, A );    \n        MakeTrapezoidal( UPPER, A, -1 );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_BIDIAG_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/HermitianTridiag/ApplyQ.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANTRIDIAG_APPLYQ_HPP\n#define ELEM_HERMITIANTRIDIAG_APPLYQ_HPP\n\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n\nnamespace elem {\nnamespace herm_tridiag {\n\ntemplate<typename F>\ninline void\nApplyQ\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  const Matrix<F>& A, const Matrix<F>& t, Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_tridiag::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n    const ForwardOrBackward direction = \n        ( (normal==onLeft) ^ (uplo==UPPER) ? BACKWARD : FORWARD );\n    const Conjugation conjugation = ( normal ? CONJUGATED : UNCONJUGATED );\n    const Int offset = ( uplo==UPPER ? 1 : -1 );\n    ApplyPackedReflectors\n    ( side, uplo, VERTICAL, direction, conjugation, offset, A, t, B );\n}\n\ntemplate<typename F>\ninline void\nApplyQ\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hermi_tridiag::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n    const ForwardOrBackward direction = \n        ( (normal==onLeft) ^ (uplo==UPPER) ? BACKWARD : FORWARD );\n    const Conjugation conjugation = ( normal ? CONJUGATED : UNCONJUGATED );\n    const Int offset = ( uplo==UPPER ? 1 : -1 );\n    ApplyPackedReflectors\n    ( side, uplo, VERTICAL, direction, conjugation, offset, A, t, B );\n}\n\ntemplate<typename F>\ninline void\nApplyQ\n( LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,STAR,STAR>& t, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_tridiag::ApplyQ\"))\n    const Int offset = ( uplo==UPPER ? 1 : -1 );\n    DistMatrix<F,MD,STAR> tDiag(A.Grid());\n    tDiag.SetRoot( A.DiagonalRoot(offset) );\n    tDiag.AlignCols( A.DiagonalAlign(offset) );\n    tDiag = t;\n    ApplyQ( side, uplo, orientation, A, tDiag, B );\n}\n\n} // namespace herm_tridiag\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAG_APPLYQ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/HermitianTridiag.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANTRIDIAG_HPP\n#define ELEM_HERMITIANTRIDIAG_HPP\n\n#include \"./HermitianTridiag/ApplyQ.hpp\"\n\n#endif // ifndef ELEM_HERMITIANTRIDIAG_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Hessenberg/ApplyQ.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HESSENBERG_APPLYQ_HPP\n#define ELEM_HESSENBERG_APPLYQ_HPP\n\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n\nnamespace elem {\nnamespace hessenberg {\n\ntemplate<typename F>\ninline void\nApplyQ\n( UpperOrLower uplo, LeftOrRight side, Orientation orientation, \n  const Matrix<F>& A, const Matrix<F>& t, Matrix<F>& H )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hessenberg::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n    const ForwardOrBackward direction = ( normal==onLeft ? BACKWARD : FORWARD );\n    if( uplo == LOWER )\n    {\n        const Conjugation conjugation = ( normal ? UNCONJUGATED : CONJUGATED );\n        ApplyPackedReflectors\n        ( side, UPPER, HORIZONTAL, direction, conjugation, 1, A, t, H );\n    }\n    else\n    {\n        const Conjugation conjugation = ( normal ? CONJUGATED : UNCONJUGATED );\n        ApplyPackedReflectors\n        ( side, LOWER, VERTICAL, direction, conjugation, -1, A, t, H );\n    }\n}\n\ntemplate<typename F>\ninline void\nApplyQ\n( UpperOrLower uplo, LeftOrRight side, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& H )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hessenberg::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n    const ForwardOrBackward direction = ( normal==onLeft ? BACKWARD : FORWARD );\n    if( uplo == LOWER )\n    {\n        const Conjugation conjugation = ( normal ? UNCONJUGATED : CONJUGATED );\n        ApplyPackedReflectors\n        ( side, UPPER, HORIZONTAL, direction, conjugation, 1, A, t, H );\n    }\n    else\n    {\n        const Conjugation conjugation = ( normal ? CONJUGATED : UNCONJUGATED );\n        ApplyPackedReflectors\n        ( side, LOWER, VERTICAL, direction, conjugation, -1, A, t, H );\n    }\n}\n\ntemplate<typename F>\ninline void\nApplyQ\n( UpperOrLower uplo, LeftOrRight side, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,STAR,STAR>& t, DistMatrix<F>& H )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hessenberg::ApplyQ\"))\n    const Int offset = ( uplo==LOWER ? 1 : -1 );\n    DistMatrix<F,MD,STAR> tDiag(A.Grid());\n    tDiag.SetRoot( A.DiagonalRoot(offset) );\n    tDiag.AlignCols( A.DiagonalAlign(offset) );\n    tDiag = t;\n    ApplyQ( uplo, side, orientation, A, tDiag, H );\n}\n\n} // namespace hessenberg\n} // namespace elem\n\n#endif // ifndef ELEM_HESSENBERG_APPLYQ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Hessenberg/L.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HESSENBERG_L_HPP\n#define ELEM_HESSENBERG_L_HPP\n\n#include \"./LUnb.hpp\"\n#include \"./LPan.hpp\"\n\nnamespace elem {\nnamespace hessenberg {\n\ntemplate<typename F>\ninline void L( Matrix<F>& A, Matrix<F>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hessenberg::L\");\n        // Is this requirement necessary?!?\n        if( t.Viewing() )\n            LogicError(\"t must not be a view\");\n    )\n    const Int n = A.Height();\n    t.Resize( Max(n-1,0), 1 );\n\n    Matrix<F> UB1, V01, VB1, G11;\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n-1; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-1-k);\n        auto ABR = ViewRange( A, k,    k,    n, n );\n        auto A22 = ViewRange( A, k+nb, k+nb, n, n );\n\n        auto t1 = View( t, k, 0, nb, 1 );\n        UB1.Resize( n-k, nb );\n        VB1.Resize( n-k, nb );\n        G11.Resize( nb,  nb );\n        hessenberg::LPan( ABR, t1, UB1, VB1, G11 );\n\n        auto AB0 = ViewRange( A,   k,    0, n,   k  );\n        auto A2R = ViewRange( A,   k+nb, k, n,   n  );\n        auto U21 = ViewRange( UB1, nb,   0, n-k, nb );\n        auto V21 = ViewRange( VB1, nb,   0, n-k, nb );\n\n        // AB0 := AB0 - (UB1 inv(G11)^H UB1^H AB0)\n        //      = AB0 - (UB1 ((AB0^H UB1) inv(G11))^H)\n        // -------------------------------------------\n        Gemm( ADJOINT, NORMAL, F(1), AB0, UB1, V01 );\n        Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), G11, V01 ); \n        Gemm( NORMAL, ADJOINT, F(-1), UB1, V01, F(1), AB0 );\n\n        // A2R := (A2R - U21 inv(G11)^H VB1^H)(I - UB1 inv(G11) UB1^H)\n        // -----------------------------------------------------------\n        // A2R := A2R - U21 inv(G11)^H VB1^H\n        // (note: VB1 is overwritten)\n        Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), G11, VB1 );\n        Gemm( NORMAL, ADJOINT, F(-1), U21, VB1, F(1), A2R );\n        // A2R := A2R - ((A2R UB1) inv(G11)) UB1^H\n        Gemm( NORMAL, NORMAL, F(1), A2R, UB1, F(0), V21 );\n        Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), G11, V21 );\n        Gemm( NORMAL, ADJOINT, F(-1), V21, UB1, F(1), A2R );\n    }\n}\n\ntemplate<typename F> \ninline void L( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hessenberg::L\");\n        if( A.Grid() != t.Grid() )\n            LogicError(\"A and t must be distributed over the same grid\");\n        // Is this requirement necessary?!?\n        if( t.Viewing() )\n            LogicError(\"t must not be a view\");\n    )\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    t.Resize( Max(n-1,0), 1 );\n\n    DistMatrix<F,MC,STAR> UB1_MC_STAR(g), V21_MC_STAR(g);\n    DistMatrix<F,MR,STAR> V01_MR_STAR(g), VB1_MR_STAR(g), UB1_MR_STAR(g);\n    DistMatrix<F,STAR,STAR> G11_STAR_STAR(g);\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n-1; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-1-k);\n        auto ABR = ViewRange( A, k,    k,    n, n );\n        auto A22 = ViewRange( A, k+nb, k+nb, n, n );\n\n        auto t1 = View( t, k, 0, nb, 1 );\n        UB1_MC_STAR.AlignWith( ABR );\n        UB1_MR_STAR.AlignWith( ABR );\n        VB1_MR_STAR.AlignWith( ABR );\n        UB1_MC_STAR.Resize( n-k, nb );\n        UB1_MR_STAR.Resize( n-k, nb );\n        VB1_MR_STAR.Resize( n-k, nb );\n        G11_STAR_STAR.Resize( nb, nb );\n        hessenberg::LPan\n        ( ABR, t1, UB1_MC_STAR, UB1_MR_STAR, VB1_MR_STAR, G11_STAR_STAR );\n\n        auto AB0 = ViewRange( A,   k,    0, n,   k  );\n        auto A2R = ViewRange( A,   k+nb, k, n,   n  );\n\n        auto U21_MC_STAR = LockedViewRange( UB1_MC_STAR, nb, 0, n-k, nb );\n\n        // AB0 := AB0 - (UB1 inv(G11)^H UB1^H AB0)\n        //      = AB0 - (UB1 ((AB0^H UB1) inv(G11))^H)\n        // -------------------------------------------\n        V01_MR_STAR.AlignWith( AB0 );\n        Zeros( V01_MR_STAR, k, nb );\n        LocalGemm( ADJOINT, NORMAL, F(1), AB0, UB1_MC_STAR, F(0), V01_MR_STAR );\n        V01_MR_STAR.SumOver( AB0.ColComm() );\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), G11_STAR_STAR, V01_MR_STAR );\n        LocalGemm\n        ( NORMAL, ADJOINT, F(-1), UB1_MC_STAR, V01_MR_STAR, F(1), AB0 );\n\n        // A2R := (A2R - U21 inv(G11)^H VB1^H)(I - UB1 inv(G11) UB1^H)\n        // -----------------------------------------------------------\n        // A2R := A2R - U21 inv(G11)^H VB1^H\n        // (note: VB1 is overwritten)\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), G11_STAR_STAR, VB1_MR_STAR );\n        LocalGemm\n        ( NORMAL, ADJOINT, F(-1), U21_MC_STAR, VB1_MR_STAR, F(1), A2R );\n        // A2R := A2R - ((A2R UB1) inv(G11)) UB1^H\n        V21_MC_STAR.AlignWith( A2R );\n        Zeros( V21_MC_STAR, A2R.Height(), nb );\n        LocalGemm( NORMAL, NORMAL, F(1), A2R, UB1_MR_STAR, F(0), V21_MC_STAR );\n        V21_MC_STAR.SumOver( A2R.RowComm() );\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), G11_STAR_STAR, V21_MC_STAR );\n        LocalGemm\n        ( NORMAL, ADJOINT, F(-1), V21_MC_STAR, UB1_MR_STAR, F(1), A2R );\n    }\n}\n\n} // namespace hessenberg\n} // namespace elem\n\n#endif // ifndef ELEM_HESSENBERG_L_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Hessenberg/LPan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HESSENBERG_LPAN_HPP\n#define ELEM_HESSENBERG_LPAN_HPP\n\n#include ELEM_GEMV_INC\n#include ELEM_TRSV_INC\n\n#include ELEM_REFLECTOR_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace hessenberg {\n\n// NOTE: This is an extension into complex arithmetic \n//       (and conjugate-transposition) of the sequential algorithm proposed in:\n//       G. Quintana-Orti and R. van de Geijn,  \n//       \"Improving the performance of reduction to Hessenberg form\" \n\n// NOTE: It would be possible to avoid the space for U if we were more careful\n//       about applying the portion interleaved with the Hessenberg matrix.\ntemplate<typename F>\ninline void LPan\n( Matrix<F>& A, Matrix<F>& t, Matrix<F>& U, Matrix<F>& V, Matrix<F>& G )\n{\n    const Int nU = U.Width();\n    const Int n = A.Height();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hessenberg::LPan\");\n        if( nU >= n )            \n            LogicError(\"V is too wide for the panel factorization\");\n        if( U.Height() != A.Height() )\n            LogicError(\"U must be the same height as A\");\n        if( V.Height() != A.Height() )\n            LogicError(\"V must be the same height as A\");\n        if( V.Width() != nU )\n            LogicError(\"V must be the same width as U\");\n    )\n    const Int tHeight = Max(nU,0);\n    t.Resize( tHeight, 1 );\n\n    Zeros( U, n, nU );\n    Zeros( V, n, nU );\n    Zeros( G, nU, nU );\n\n    Matrix<F> y10;\n\n    for( Int k=0; k<nU; ++k )\n    {\n        auto a12      = ViewRange( A, k,   k+1, k+1, n   );\n        auto alpha12L = ViewRange( A, k,   k+1, k+1, k+2 );\n        auto a12R     = ViewRange( A, k,   k+2, k+1, n   );\n        auto a1       = ViewRange( A, k,   0,   k+1, n   );\n        auto A2       = ViewRange( A, k+1, 0,   n,   n   ); \n\n        // NOTE: Transposes of the horizontal Householder vectors\n        auto U0  = ViewRange( U, 0,   0, n,   k   );\n        auto u10 = ViewRange( U, k,   0, k+1, k );\n        auto u21 = ViewRange( U, k+1, k, n,   k+1 );\n        auto U20 = ViewRange( U, k+1, 0, n,   k   );\n\n        auto V0 = ViewRange( V, 0, 0, n, k   );\n        auto v1 = ViewRange( V, 0, k, n, k+1 );\n\n        auto G00     = ViewRange( G, 0, 0, k, k   );\n        auto g01     = ViewRange( G, 0, k, k, k+1 );\n        auto gamma11 = ViewRange( G, k, k, k+1, k+1 );\n\n        // a1 := (a1 - u10 inv(G00)^H V0^H) (I - U0 inv(G00) U0^H)\n        // -------------------------------------------------------\n        // a1 := conj(a1 - (u10 inv(G00)^H) V0^H)\n        //     = conj(a1 - (V0 (inv(G00) u10^H))^H)\n        //     = conj(a1) - (V0 (inv(G00) u10^H))^T\n        Conjugate( u10, y10 ); \n        Trsv( UPPER, NORMAL, NON_UNIT, G00, y10 );\n        Conjugate( a1 );\n        Gemv( NORMAL, F(-1), V0, y10, F(1), a1 );\n        // a1 := conj(a1) - conj(a1) U0 inv(G00) U0^H\n        //     = conj(a1 - (U0 (inv(G00)^H (U0^H a1^T)))^T)\n        Gemv( ADJOINT, F(1), U0, a1, F(0), y10 );\n        Trsv( UPPER, ADJOINT, NON_UNIT, G00, y10 );\n        Gemv( NORMAL, F(-1), U0, y10, F(1), a1 );\n        Conjugate( a1 );\n\n        // Find tau and v such that\n        // | alpha12L a12R | / I - tau | 1   | | 1 conj(v) | \\ = | beta 0 |\n        //                   \\         | v^T |               /\n        const F tau = RightReflector( alpha12L, a12R );\n        t.Set(k,0,tau);\n\n        // Store u21 := | 1   |\n        //              | v^T |\n        Transpose( a12, u21 );\n        u21.Set(0,0,F(1));\n\n        // v1 := A2^H u21\n        Gemv( ADJOINT, F(1), A2, u21, F(0), v1 );\n\n        // g01 := U20^H u21\n        Gemv( ADJOINT, F(1), U20, u21, F(0), g01 );\n        \n        // gamma11 := 1/tau\n        gamma11.Set(0,0,F(1)/tau);\n    }\n}\n\ntemplate<typename F>\ninline void LPan\n( DistMatrix<F>& A,\n  DistMatrix<F,STAR,STAR>& t,\n  DistMatrix<F,MC,  STAR>& U_MC_STAR,\n  DistMatrix<F,MR,  STAR>& U_MR_STAR,\n  DistMatrix<F,MR,  STAR>& V_MR_STAR,\n  DistMatrix<F,STAR,STAR>& G_STAR_STAR )\n{\n    const Int nU = U_MC_STAR.Width();\n    const Int n = A.Height();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hessenberg::UPan\");\n        if( A.Grid() != t.Grid() || t.Grid() != U_MC_STAR.Grid() ||\n            U_MC_STAR.Grid() != U_MR_STAR.Grid() ||\n            U_MR_STAR.Grid() != V_MR_STAR.Grid() ||\n            V_MR_STAR.Grid() != G_STAR_STAR.Grid() )\n            LogicError(\"Grids must match\");\n        if( A.ColAlign() != U_MC_STAR.ColAlign() )\n            LogicError(\"A and U[MC,* ] must be aligned\");\n        if( A.RowAlign() != U_MR_STAR.ColAlign() )\n            LogicError(\"A and U[MR,* ] must be aligned\");\n        if( A.RowAlign() != V_MR_STAR.ColAlign() )\n            LogicError(\"A and V[MR,* ] must be aligned\");\n        if( nU >= n )\n            LogicError(\"V is too wide for the panel factorization\");\n        if( U_MC_STAR.Height() != A.Height() )\n            LogicError(\"U[MC,* ] must be the same height as A\");\n        if( U_MR_STAR.Height() != A.Height() )\n            LogicError(\"U[MR,* ] must be the same height as A\");\n        if( U_MR_STAR.Width() != nU )\n            LogicError(\"U[MR,* ] must be the same width as U[MC,* ]\");\n        if( V_MR_STAR.Height() != A.Height() )\n            LogicError(\"V[MR,* ] must be the same height as A\");\n        if( V_MR_STAR.Width() != nU )\n            LogicError(\"V[MR,* ] must be the same width as U\");\n    )\n    const Grid& g = A.Grid();\n\n    Zeros( U_MC_STAR,   n,  nU );\n    Zeros( U_MR_STAR,   n,  nU );\n    Zeros( V_MR_STAR,   n,  nU );\n    Zeros( G_STAR_STAR, nU, nU );\n\n    DistMatrix<F,STAR,MR  > a1Conj_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> y10_STAR_STAR(g);\n\n    for( Int k=0; k<nU; ++k )\n    {\n        auto a12      = ViewRange( A, k,   k+1, k+1, n   );\n        auto alpha12L = ViewRange( A, k,   k+1, k+1, k+2 );\n        auto a12R     = ViewRange( A, k,   k+2, k+1, n   );\n        auto a1       = ViewRange( A, k,   0,   k+1, n   );\n        auto A2       = ViewRange( A, k+1, 0,   n,   n   );\n\n        // NOTE: Transposes of the horizontal Householder vectors\n        auto U0_MR_STAR  = ViewRange( U_MR_STAR, 0,   0, n,   k   );\n        auto u10_MR_STAR = ViewRange( U_MR_STAR, k,   0, k+1, k   );\n        auto u21_MC_STAR = ViewRange( U_MC_STAR, k+1, k, n,   k+1 );\n        auto u21_MR_STAR = ViewRange( U_MR_STAR, k+1, k, n,   k+1 );\n        auto U20_MC_STAR = ViewRange( U_MC_STAR, k+1, 0, n,   k   );\n\n        auto V0_MR_STAR = ViewRange( V_MR_STAR, 0, 0, n, k   );\n        auto v1_MR_STAR = ViewRange( V_MR_STAR, 0, k, n, k+1 );\n\n        auto G00_STAR_STAR     = ViewRange( G_STAR_STAR, 0, 0, k, k   );\n        auto g01_STAR_STAR     = ViewRange( G_STAR_STAR, 0, k, k, k+1 );\n        auto gamma11_STAR_STAR = ViewRange( G_STAR_STAR, k, k, k+1, k+1 );\n\n        // a1 := (a1 - u10 inv(G00)^H V0^H) (I - U0 inv(G00) U0^H)\n        // -------------------------------------------------------\n        // a1 := conj(a1 - (u10 inv(G00)^H) V0^H)\n        //     = conj(a1 - (V0 (inv(G00) u10^H))^H)\n        //     = conj(a1) - (V0 (inv(G00) u10^H))^T\n        a1Conj_STAR_MR.AlignWith( a1 );\n        Conjugate( a1, a1Conj_STAR_MR );\n        Conjugate( u10_MR_STAR, y10_STAR_STAR );\n        Trsv\n        ( UPPER, NORMAL, NON_UNIT, \n          G00_STAR_STAR.LockedMatrix(), y10_STAR_STAR.Matrix() );\n        LocalGemv\n        ( NORMAL, F(-1), V0_MR_STAR, y10_STAR_STAR, F(1), a1Conj_STAR_MR );\n        // a1 := conj(a1) - conj(a1) U0 inv(G00) U0^H\n        //     = conj(a1 - (U0 (inv(G00)^H (U0^H a1^T)))^T)\n        LocalGemv\n        ( ADJOINT, F(1), U0_MR_STAR, a1Conj_STAR_MR, F(0), y10_STAR_STAR );\n        y10_STAR_STAR.SumOver( U0_MR_STAR.ColComm() );\n        Trsv\n        ( UPPER, ADJOINT, NON_UNIT, \n          G00_STAR_STAR.LockedMatrix(), y10_STAR_STAR.Matrix() );\n        LocalGemv\n        ( NORMAL, F(-1), U0_MR_STAR, y10_STAR_STAR, F(1), a1Conj_STAR_MR );\n        Conjugate( a1Conj_STAR_MR, a1 ); \n\n        // Find tau and v such that\n        // | alpha12L a12R | / I - tau | 1   | | 1 conj(v) | \\ = | beta 0 |\n        //                   \\         | v^T |               /\n        const F tau = RightReflector( alpha12L, a12R );\n        t.Set(k,0,tau);\n\n        // Store u21 := | 1   |\n        //              | v^T |\n        Transpose( a12, u21_MC_STAR );\n        Transpose( a12, u21_MR_STAR );\n        u21_MC_STAR.Set(0,0,F(1));\n        u21_MR_STAR.Set(0,0,F(1));\n\n        // v1 := A2^H u21\n        LocalGemv( ADJOINT, F(1), A2, u21_MC_STAR, F(0), v1_MR_STAR );\n        v1_MR_STAR.SumOver( A2.ColComm() );\n\n        // g01 := U20^H u21\n        LocalGemv\n        ( ADJOINT, F(1), U20_MC_STAR, u21_MC_STAR, F(0), g01_STAR_STAR );\n        g01_STAR_STAR.SumOver( U20_MC_STAR.ColComm() );\n\n        // gamma11 := 1/tau\n        gamma11_STAR_STAR.Set(0,0,F(1)/tau);\n    }\n}\n\n} // namespace hessenberg\n} // namespace elem\n\n#endif // ifndef ELEM_HESSENBERG_LPAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Hessenberg/LUnb.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HESSENBERG_LUNB_HPP\n#define ELEM_HESSENBERG_LUNB_HPP\n\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n\n#include ELEM_REFLECTOR_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace hessenberg {\n\ntemplate<typename F>\ninline void LUnb( Matrix<F>& A, Matrix<F>& t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hessenberg::LUnb\"))\n    const Int n = A.Height();\n    const Int tHeight = Max(n-1,0);\n    t.Resize( tHeight, 1 );\n\n    Matrix<F> z1, z21;\n\n    for( Int k=0; k<n-1; ++k )\n    {\n        auto a12      = ViewRange( A, k,   k+1, k+1, n   );\n        auto alpha12L = ViewRange( A, k,   k+1, k+1, k+2 );\n        auto a12R     = ViewRange( A, k,   k+2, k+1, n   );\n        auto A22      = ViewRange( A, k+1, k+1, n,   n   );\n        auto A2       = ViewRange( A, k+1, 0,   n,   n   );\n\n        // Find tau and v such that\n        //  |alpha12L a12R| /I - tauP | 1   | | 1 conj(v) |\\ = |beta 0|\n        //                  \\         | v^T |              /\n        const F tau = RightReflector( alpha12L, a12R );\n        t.Set(k,0,tau);\n\n        // Temporarily set a12 = | 1 v |\n        const F beta = alpha12L.Get(0,0);\n        alpha12L.Set(0,0,F(1));\n\n        // A2 := Hous(a12^T,tau)^H A2\n        //     = (I - conj(tau) a12^T conj(a12)) A2\n        //     = A2 - conj(tau) a12^T (A2^H a12^T)^H\n        // -----------------------------------------\n        // z1 := A2^H a12^T\n        Zeros( z1, n, 1 ); \n        Gemv( ADJOINT, F(1), A2, a12, F(0), z1 );\n        // A2 := A2 - conj(tau) a12^T z1^H\n        Ger( -Conj(tau), a12, z1, A2 );\n\n        // A22 := A22 Hous(a12^T,tau)\n        //      = A22 (I - tau a12^T conj(a12))\n        //      = A22 - tau (A22 a12^T) conj(a12)\n        // --------------------------------------\n        // z21 := A22 a12^T\n        Zeros( z21, A22.Height(), 1 );\n        Gemv( NORMAL, F(1), A22, a12, F(0), z21 );\n        // A22 := A22 - tau z21 conj(a12)\n        Ger( -tau, z21, a12, A22 );\n\n        // Put beta back\n        alpha12L.Set(0,0,beta);\n    }\n}\n\ntemplate<typename F> \ninline void LUnb( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hessenberg::LUnb\"))\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    const Int tHeight = Max(n-1,0);\n    t.SetGrid( g );\n    t.Resize( tHeight, 1 );\n\n    DistMatrix<F,MC,  STAR> z21_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> z1_MR_STAR(g);\n    DistMatrix<F,STAR,MC  > a12_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > a12_STAR_MR(g);\n\n    for( Int k=0; k<n-1; ++k )\n    {\n        auto a12      = ViewRange( A, k,   k+1, k+1, n   );\n        auto alpha12L = ViewRange( A, k,   k+1, k+1, k+2 );\n        auto a12R     = ViewRange( A, k,   k+2, k+1, n   );\n        auto A22      = ViewRange( A, k+1, k+1, n,   n   );\n        auto A2       = ViewRange( A, k+1, 0,   n,   n   );\n\n        // Find tau and v such that\n        //  |alpha12L a12R| /I - tauP | 1   | | 1 conj(v) |\\ = |beta 0|\n        //                  \\         | v^T |              /\n        const F tau = RightReflector( alpha12L, a12R );\n        t.Set(k,0,tau);\n\n        // Temporarily set a12 = | 1 v |\n        F beta = 0;\n        if( alpha12L.IsLocal(0,0) )\n            beta = alpha12L.GetLocal(0,0);\n        alpha12L.Set(0,0,F(1));\n\n        // A2 := Hous(a12^T,tau)^H A2\n        //     = (I - conj(tau) a12^T conj(a12)) A2\n        //     = A2 - conj(tau) a12^T (A2^H a12^T)^H\n        // -----------------------------------------\n        // z1 := A2^H a12^T\n        a12_STAR_MC.AlignWith( A2 );\n        a12_STAR_MC = a12;\n        z1_MR_STAR.AlignWith( A2 );\n        Zeros( z1_MR_STAR, n, 1 ); \n        LocalGemv( ADJOINT, F(1), A2, a12_STAR_MC, F(0), z1_MR_STAR );\n        z1_MR_STAR.SumOver( A2.ColComm() );\n        // A2 := A2 - conj(tau) a12^T z1^H\n        LocalGer( -Conj(tau), a12_STAR_MC, z1_MR_STAR, A2 );\n\n        // A22 := A22 Hous(a12^T,tau)\n        //      = A22 (I - tau a12^T conj(a12))\n        //      = A22 - tau (A22 a12^T) conj(a12)\n        // --------------------------------------\n        // z21 := A22 a12^T\n        a12_STAR_MR.AlignWith( A22 );\n        a12_STAR_MR = a12;\n        z21_MC_STAR.AlignWith( A22 );\n        Zeros( z21_MC_STAR, A22.Height(), 1 );\n        LocalGemv( NORMAL, F(1), A22, a12_STAR_MR, F(0), z21_MC_STAR );\n        z21_MC_STAR.SumOver( A22.RowComm() );\n        // A22 := A22 - tau z21 conj(a12)\n        LocalGer( -tau, z21_MC_STAR, a12_STAR_MR, A22 );\n\n        // Put beta back\n        if( alpha12L.IsLocal(0,0) )\n            alpha12L.SetLocal(0,0,beta);\n    }\n}\n\n} // namespace hessenberg\n} // namespace elem\n\n#endif // ifndef ELEM_HESSENBERG_LUNB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Hessenberg/U.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HESSENBERG_U_HPP\n#define ELEM_HESSENBERG_U_HPP\n\n#include \"./UUnb.hpp\"\n#include \"./UPan.hpp\"\n\nnamespace elem {\nnamespace hessenberg {\n\ntemplate<typename F>\ninline void U( Matrix<F>& A, Matrix<F>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hessenberg::U\");\n        // Is this requirement necessary?!?\n        if( t.Viewing() )\n            LogicError(\"t must not be a view\");\n    )\n    const Int n = A.Height();\n    t.Resize( Max(n-1,0), 1 );\n\n    Matrix<F> UB1, V01, VB1, G11;\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n-1; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-1-k);\n        auto ABR = ViewRange( A, k,    k,    n, n );\n        auto A22 = ViewRange( A, k+nb, k+nb, n, n );\n\n        auto t1 = View( t, k, 0, nb, 1 );\n        UB1.Resize( n-k, nb );\n        VB1.Resize( n-k, nb );\n        G11.Resize( nb,  nb );\n        hessenberg::UPan( ABR, t1, UB1, VB1, G11 );\n\n        auto A0R = ViewRange( A,   0,  k,    k,   n  );\n        auto AB2 = ViewRange( A,   k,  k+nb, n,   n  );\n        auto U21 = ViewRange( UB1, nb, 0,    n-k, nb );\n        auto V21 = ViewRange( VB1, nb, 0,    n-k, nb );\n\n        // A0R := A0R - ((A0R UB1) inv(G11)^H) UB1^H\n        // -----------------------------------------\n        Gemm( NORMAL, NORMAL, F(1), A0R, UB1, V01 );\n        Trsm( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), G11, V01 );\n        Gemm( NORMAL, ADJOINT, F(-1), V01, UB1, F(1), A0R );\n            \n        // AB2 := (I - UB1 inv(G11) UB1^H)(AB2 - VB1 inv(G11)^H U21^H)\n        // -----------------------------------------------------------\n        // AB2 := AB2 - VB1 inv(G11)^H U21^H \n        // (note: VB1 is overwritten) \n        Trsm( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), G11, VB1 );\n        Gemm( NORMAL, ADJOINT, F(-1), VB1, U21, F(1), AB2 );\n        // AB2 := AB2 - UB1 (inv(G11) (UB1^H AB2))\n        //      = AB2 - UB1 ((AB2^H UB1) inv(G11)^H)^H\n        // (note: V21 is used as scratch space)\n        Gemm( ADJOINT, NORMAL, F(1), AB2, UB1, F(0), V21 );\n        Trsm( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), G11, V21 );\n        Gemm( NORMAL, ADJOINT, F(-1), UB1, V21, F(1), AB2 );\n    }\n}\n\ntemplate<typename F> \ninline void U( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hessenberg::U\");\n        if( A.Grid() != t.Grid() )\n            LogicError(\"A and t must be distributed over the same grid\");\n        // Is this requirement necessary?!?\n        if( t.Viewing() )\n            LogicError(\"t must not be a view\");\n    )\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    t.Resize( Max(n-1,0), 1 );\n\n    DistMatrix<F,MC,STAR> V01_MC_STAR(g), UB1_MC_STAR(g), VB1_MC_STAR(g);\n    DistMatrix<F,MR,STAR> UB1_MR_STAR(g), V21_MR_STAR(g);\n    DistMatrix<F,STAR,STAR> G11_STAR_STAR(g);\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n-1; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-1-k);\n        auto ABR = ViewRange( A, k,    k,    n, n );\n        auto A22 = ViewRange( A, k+nb, k+nb, n, n );\n\n        auto t1 = View( t, k, 0, nb, 1 );\n        UB1_MC_STAR.AlignWith( ABR );\n        UB1_MR_STAR.AlignWith( ABR );\n        VB1_MC_STAR.AlignWith( ABR );\n        UB1_MC_STAR.Resize( n-k, nb );\n        UB1_MR_STAR.Resize( n-k, nb );\n        VB1_MC_STAR.Resize( n-k, nb );\n        G11_STAR_STAR.Resize( nb, nb );\n        hessenberg::UPan\n        ( ABR, t1, UB1_MC_STAR, UB1_MR_STAR, VB1_MC_STAR, G11_STAR_STAR );\n\n        auto A0R = ViewRange( A,   0,  k,    k,   n  );\n        auto AB2 = ViewRange( A,   k,  k+nb, n,   n  );\n\n        auto U21_MR_STAR = LockedViewRange( UB1_MR_STAR, nb, 0, n-k, nb );\n\n        // A0R := A0R - ((A0R UB1) inv(G11)^H) UB1^H\n        // -----------------------------------------\n        V01_MC_STAR.AlignWith( A0R );\n        Zeros( V01_MC_STAR, k, nb );\n        LocalGemm( NORMAL, NORMAL, F(1), A0R, UB1_MR_STAR, F(0), V01_MC_STAR );\n        V01_MC_STAR.SumOver( A0R.RowComm() );\n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), G11_STAR_STAR, V01_MC_STAR );\n        LocalGemm\n        ( NORMAL, ADJOINT, F(-1), V01_MC_STAR, UB1_MR_STAR, F(1), A0R );\n            \n        // AB2 := (I - UB1 inv(G11) UB1^H)(AB2 - VB1 inv(G11)^H U21^H)\n        // -----------------------------------------------------------\n        // AB2 := AB2 - VB1 inv(G11)^H U21^H \n        // (note: VB1 is overwritten) \n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), G11_STAR_STAR, VB1_MC_STAR );\n        LocalGemm\n        ( NORMAL, ADJOINT, F(-1), VB1_MC_STAR, U21_MR_STAR, F(1), AB2 );\n        // AB2 := AB2 - UB1 (inv(G11) (UB1^H AB2))\n        //      = AB2 - UB1 ((AB2^H UB1) inv(G11)^H)^H\n        V21_MR_STAR.AlignWith( AB2 );\n        Zeros( V21_MR_STAR, AB2.Width(), nb );\n        LocalGemm( ADJOINT, NORMAL, F(1), AB2, UB1_MC_STAR, F(0), V21_MR_STAR );\n        V21_MR_STAR.SumOver( AB2.ColComm() );\n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), G11_STAR_STAR, V21_MR_STAR );\n        LocalGemm\n        ( NORMAL, ADJOINT, F(-1), UB1_MC_STAR, V21_MR_STAR, F(1), AB2 );\n    }\n}\n\n} // namespace hessenberg\n} // namespace elem\n\n#endif // ifndef ELEM_HESSENBERG_U_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Hessenberg/UPan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HESSENBERG_UPAN_HPP\n#define ELEM_HESSENBERG_UPAN_HPP\n\n#include ELEM_GEMV_INC\n#include ELEM_TRSV_INC\n\n#include ELEM_REFLECTOR_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace hessenberg {\n\n// NOTE: This is an extension into complex arithmetic of the sequential algorithm proposed in:\n//       G. Quintana-Orti and R. van de Geijn,  \n//       \"Improving the performance of reduction to Hessenberg form\" \n//       After switching to complex arithmetic, it was more natural to switch \n//       to lower-triangular matrices in the UT transform.\n\n// NOTE: It would be possible to avoid the space for U if we were more careful\n//       about applying the portion interleaved with the Hessenberg matrix.\ntemplate<typename F>\ninline void UPan\n( Matrix<F>& A, Matrix<F>& t, Matrix<F>& U, Matrix<F>& V, Matrix<F>& G )\n{\n    const Int nU = U.Width();\n    const Int n = A.Height();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hessenberg::UPan\");\n        if( nU >= n )            \n            LogicError(\"V is too wide for the panel factorization\");\n        if( U.Height() != A.Height() )\n            LogicError(\"U must be the same height as A\");\n        if( V.Height() != A.Height() )\n            LogicError(\"V must be the same height as A\");\n        if( V.Width() != nU )\n            LogicError(\"V must be the same width as U\");\n    )\n    const Int tHeight = Max(nU,0);\n    t.Resize( tHeight, 1 );\n\n    Zeros( U, n, nU );\n    Zeros( V, n, nU );\n    Zeros( G, nU, nU );\n\n    Matrix<F> y10;\n\n    for( Int k=0; k<nU; ++k )\n    {\n        auto a21      = ViewRange( A, k+1, k,   n,   k+1 );\n        auto alpha21T = ViewRange( A, k+1, k,   k+2, k+1 );\n        auto a21B     = ViewRange( A, k+2, k,   n,   k+1 );\n        auto a1       = ViewRange( A, 0,   k,   n,   k+1 );\n        auto A2       = ViewRange( A, 0,   k+1, n,   n   );\n\n        auto U0  = ViewRange( U, 0,   0, n,   k   );\n        auto u10 = ViewRange( U, k,   0, k+1, k );\n        auto u21 = ViewRange( U, k+1, k, n,   k+1 );\n        auto U20 = ViewRange( U, k+1, 0, n,   k   );\n\n        auto V0 = ViewRange( V, 0, 0, n, k   );\n        auto v1 = ViewRange( V, 0, k, n, k+1 );\n\n        auto G00     = ViewRange( G, 0, 0, k,   k   );\n        auto g10     = ViewRange( G, k, 0, k+1, k   );\n        auto gamma11 = ViewRange( G, k, k, k+1, k+1 );\n\n        // a1 := (I - U0 inv(G00) U0^H) (a1 - V0 inv(G00)^H u10^H)\n        // -------------------------------------------------------\n        // a1 := a1 - V0 inv(G00)^H u10^H\n        Conjugate( u10, y10 );\n        Trsv( LOWER, ADJOINT, NON_UNIT, G00, y10 );\n        Gemv( NORMAL, F(-1), V0, y10, F(1), a1 );\n        // a1 := a1 - U0 (inv(G00) (U0^H a1))\n        Gemv( ADJOINT, F(1), U0, a1, F(0), y10 ); \n        Trsv( LOWER, NORMAL, NON_UNIT, G00, y10 );\n        Gemv( NORMAL, F(-1), U0, y10, F(1), a1 );\n\n        // Find tau and v such that\n        //  / I - tau | 1 | | 1, v^H | \\ | alpha21T | = | beta |\n        //  \\         | v |            / |     a21B |   |    0 |\n        const F tau = LeftReflector( alpha21T, a21B );\n        t.Set(k,0,tau);\n\n        // Store u21 := | 1 |\n        //              | v |\n        u21 = a21;\n        u21.Set(0,0,F(1));\n\n        // v1 := A2 u21\n        Gemv( NORMAL, F(1), A2, u21, F(0), v1 );\n\n        // g10 := u21^H U20 = (U20^H u21)^H\n        Gemv( ADJOINT, F(1), U20, u21, F(0), g10 );\n        Conjugate( g10 );\n        \n        // gamma11 := 1/tau\n        gamma11.Set(0,0,F(1)/tau);\n    }\n}\n\ntemplate<typename F>\ninline void UPan\n( DistMatrix<F>& A, \n  DistMatrix<F,STAR,STAR>& t, \n  DistMatrix<F,MC,  STAR>& U_MC_STAR, \n  DistMatrix<F,MR,  STAR>& U_MR_STAR,\n  DistMatrix<F,MC,  STAR>& V_MC_STAR, \n  DistMatrix<F,STAR,STAR>& G_STAR_STAR )\n{\n    const Int nU = U_MC_STAR.Width();\n    const Int n = A.Height();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hessenberg::UPan\");\n        if( A.Grid() != t.Grid() || t.Grid() != U_MC_STAR.Grid() || \n            U_MC_STAR.Grid() != U_MR_STAR.Grid() || \n            U_MR_STAR.Grid() != V_MC_STAR.Grid() ||\n            V_MC_STAR.Grid() != G_STAR_STAR.Grid() )\n            LogicError(\"Grids must match\");\n        if( A.ColAlign() != U_MC_STAR.ColAlign() )\n            LogicError(\"A and U[MC,* ] must be aligned\");\n        if( A.RowAlign() != U_MR_STAR.ColAlign() )\n            LogicError(\"A and U[MR,* ] must be aligned\");\n        if( A.ColAlign() != V_MC_STAR.ColAlign() )\n            LogicError(\"A and V[MC,* ] must be aligned\");\n        if( nU >= n )            \n            LogicError(\"V is too wide for the panel factorization\");\n        if( U_MC_STAR.Height() != A.Height() )\n            LogicError(\"U[MC,* ] must be the same height as A\");\n        if( U_MR_STAR.Height() != A.Height() )\n            LogicError(\"U[MR,* ] must be the same height as A\");\n        if( U_MR_STAR.Width() != nU )\n            LogicError(\"U[MR,* ] must be the same width as U[MC,* ]\");\n        if( V_MC_STAR.Height() != A.Height() )\n            LogicError(\"V[MC,* ] must be the same height as A\");\n        if( V_MC_STAR.Width() != nU )\n            LogicError(\"V[MC,* ] must be the same width as U\");\n    )\n    const Grid& g = A.Grid();\n\n    Zeros( U_MC_STAR,   n,  nU );\n    Zeros( U_MR_STAR,   n,  nU );\n    Zeros( V_MC_STAR,   n,  nU );\n    Zeros( G_STAR_STAR, nU, nU );\n\n    DistMatrix<F,MC,  STAR> a1_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> y10_STAR_STAR(g);\n\n    for( Int k=0; k<nU; ++k )\n    {\n        auto a21      = ViewRange( A, k+1, k,   n,   k+1 );\n        auto alpha21T = ViewRange( A, k+1, k,   k+2, k+1 );\n        auto a21B     = ViewRange( A, k+2, k,   n,   k+1 );\n        auto a1       = ViewRange( A, 0,   k,   n,   k+1 );\n        auto A2       = ViewRange( A, 0,   k+1, n,   n   );\n\n        auto U0_MC_STAR  = ViewRange( U_MC_STAR, 0,   0, n,   k   );\n        auto u10_MC_STAR = ViewRange( U_MC_STAR, k,   0, k+1, k   );\n        auto u21_MC_STAR = ViewRange( U_MC_STAR, k+1, k, n,   k+1 );\n        auto u21_MR_STAR = ViewRange( U_MR_STAR, k+1, k, n,   k+1 );\n        auto U20_MR_STAR = ViewRange( U_MR_STAR, k+1, 0, n,   k   );\n\n        auto V0_MC_STAR = ViewRange( V_MC_STAR, 0, 0, n, k   );\n        auto v1_MC_STAR = ViewRange( V_MC_STAR, 0, k, n, k+1 );\n\n        auto G00_STAR_STAR     = ViewRange( G_STAR_STAR, 0, 0, k,   k   );\n        auto g10_STAR_STAR     = ViewRange( G_STAR_STAR, k, 0, k+1, k   );\n        auto gamma11_STAR_STAR = ViewRange( G_STAR_STAR, k, k, k+1, k+1 );\n\n        // a1 := (I - U0 inv(G00) U0^H) (a1 - V0 inv(G00)^H u10^H)\n        // -------------------------------------------------------\n        // a1 := a1 - V0 inv(G00)^H u10^H\n        a1_MC_STAR.AlignWith( a1 );\n        a1_MC_STAR = a1;\n        Conjugate( u10_MC_STAR, y10_STAR_STAR );\n        Trsv\n        ( LOWER, ADJOINT, NON_UNIT, \n          G00_STAR_STAR.LockedMatrix(), y10_STAR_STAR.Matrix() );\n        LocalGemv( NORMAL, F(-1), V0_MC_STAR, y10_STAR_STAR, F(1), a1_MC_STAR );\n        // a1 := a1 - U0 (inv(G00) (U0^H a1))\n        LocalGemv\n        ( ADJOINT, F(1), U0_MC_STAR, a1_MC_STAR, F(0), y10_STAR_STAR ); \n        y10_STAR_STAR.SumOver( U0_MC_STAR.ColComm() );\n        Trsv\n        ( LOWER, NORMAL, NON_UNIT, \n          G00_STAR_STAR.LockedMatrix(), y10_STAR_STAR.Matrix() );\n        LocalGemv( NORMAL, F(-1), U0_MC_STAR, y10_STAR_STAR, F(1), a1_MC_STAR );\n        a1 = a1_MC_STAR; \n\n        // Find tau and v such that\n        //  / I - tau | 1 | | 1, v^H | \\ | alpha21T | = | beta |\n        //  \\         | v |            / |     a21B |   |    0 |\n        const F tau = LeftReflector( alpha21T, a21B );\n        t.Set(k,0,tau);\n\n        // Store u21 := | 1 |\n        //              | v |\n        u21_MC_STAR = a21;\n        u21_MR_STAR = a21;\n        u21_MC_STAR.Set(0,0,F(1));\n        u21_MR_STAR.Set(0,0,F(1));\n\n        // v1 := A2 u21\n        LocalGemv( NORMAL, F(1), A2, u21_MR_STAR, F(0), v1_MC_STAR );\n        v1_MC_STAR.SumOver( A2.RowComm() );\n\n        // g10 := u21^H U20 = (U20^H u21)^H\n        LocalGemv\n        ( ADJOINT, F(1), U20_MR_STAR, u21_MR_STAR, F(0), g10_STAR_STAR );\n        g10_STAR_STAR.SumOver( U20_MR_STAR.ColComm() );\n        Conjugate( g10_STAR_STAR );\n        \n        // gamma11 := 1/tau\n        gamma11_STAR_STAR.Set(0,0,F(1)/tau);\n    }\n}\n\n} // namespace hessenberg\n} // namespace elem\n\n#endif // ifndef ELEM_HESSENBERG_UPAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Hessenberg/UUnb.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HESSENBERG_UUNB_HPP\n#define ELEM_HESSENBERG_UUNB_HPP\n\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n\n#include ELEM_REFLECTOR_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace hessenberg {\n\ntemplate<typename F>\ninline void UUnb( Matrix<F>& A, Matrix<F>& t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hessenberg::UUnb\"))\n    const Int n = A.Height();\n    const Int tHeight = Max(n-1,0);\n    t.Resize( tHeight, 1 );\n\n    // Temporary products\n    Matrix<F> x1, x12Adj;\n\n    for( Int k=0; k<n-1; ++k )\n    {\n        auto a21      = ViewRange( A, k+1, k,   n,   k+1 );\n        auto alpha21T = ViewRange( A, k+1, k,   k+2, k+1 );\n        auto a21B     = ViewRange( A, k+2, k,   n,   k+1 );\n        auto A22      = ViewRange( A, k+1, k+1, n,   n   );\n        auto A2       = ViewRange( A, 0,   k+1, n,   n   );\n\n        // Find tau and v such that\n        //  / I - tau | 1 | | 1, v^H | \\ | alpha21T | = | beta |\n        //  \\         | v |            / |     a21B |   |    0 |\n        const F tau = LeftReflector( alpha21T, a21B );\n        t.Set(k,0,tau);\n\n        // Temporarily set a21 := | 1 |\n        //                        | v |\n        const F beta = alpha21T.Get(0,0);\n        alpha21T.Set(0,0,F(1));\n\n        // A2 := A2 Hous(a21,tau)^H\n        //     = A2 (I - conj(tau) a21 a21^H)\n        //     = A2 - conj(tau) (A2 a21) a21^H\n        // -----------------------------------\n        // x1 := A2 a21\n        Zeros( x1, n, 1 );\n        Gemv( NORMAL, F(1), A2, a21, F(0), x1 );\n        // A2 := A2 - conj(tau) x1 a21^H\n        Ger( -Conj(tau), x1, a21, A2 ); \n\n        // A22 := Hous(a21,tau) A22\n        //      = (I - tau a21 a21^H) A22\n        //      = A22 - tau a21 (A22^H a21)^H\n        // ----------------------------------\n        // x12^H := (a21^H A22)^H = A22^H a21\n        Zeros( x12Adj, A22.Width(), 1 );\n        Gemv( ADJOINT, F(1), A22, a21, F(0), x12Adj );\n        // A22 := A22 - tau a21 x12\n        Ger( -tau, a21, x12Adj, A22 );\n\n        // Put beta back\n        alpha21T.Set(0,0,beta);\n    }\n}\n\ntemplate<typename F> \ninline void UUnb( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hessenberg::UUnb\"))\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    const Int tHeight = Max(n-1,0);\n    t.SetGrid( g );\n    t.Resize( tHeight, 1 );\n\n    DistMatrix<F,MC,STAR> a21_MC_STAR(g);\n    DistMatrix<F,MR,STAR> a21_MR_STAR(g);\n    DistMatrix<F,MC,STAR> x1_MC_STAR(g); \n    DistMatrix<F,MR,STAR> x12Adj_MR_STAR(g);\n\n    for( Int k=0; k<n-1; ++k )\n    {\n        auto a21      = ViewRange( A, k+1, k,   n,   k+1 );\n        auto alpha21T = ViewRange( A, k+1, k,   k+2, k+1 );\n        auto a21B     = ViewRange( A, k+2, k,   n,   k+1 );\n        auto A22      = ViewRange( A, k+1, k+1, n,   n   );\n        auto A2       = ViewRange( A, 0,   k+1, n,   n   );\n\n        // Find tau and v such that\n        //  / I - tau | 1 | | 1, v^H | \\ | alpha21T | = | beta |\n        //  \\         | v |            / |     a21B |   |    0 |\n        const F tau = LeftReflector( alpha21T, a21B );\n        t.Set(k,0,tau);\n\n        // Temporarily set a21 := | 1 |\n        //                        | v |\n        F beta=0;\n        if( alpha21T.IsLocal(0,0) )\n            beta = alpha21T.GetLocal(0,0);\n        alpha21T.Set(0,0,F(1));\n\n        // A2 := A2 Hous(a21,tau)^H\n        //     = A2 (I - conj(tau) a21 a21^H)\n        //     = A2 - conj(tau) (A2 a21) a21^H\n        // -----------------------------------\n        // x1 := A2 a21\n        a21_MR_STAR.AlignWith( A2 );\n        a21_MR_STAR = a21;\n        x1_MC_STAR.AlignWith( A2 );\n        Zeros( x1_MC_STAR, n, 1 );\n        LocalGemv( NORMAL, F(1), A2, a21_MR_STAR, F(0), x1_MC_STAR );\n        x1_MC_STAR.SumOver( A2.RowComm() );\n        // A2 := A2 - conj(tau) x1 a21^H\n        LocalGer( -Conj(tau), x1_MC_STAR, a21_MR_STAR, A2 ); \n\n        // A22 := Hous(a21,tau) A22\n        //      = (I - tau a21 a21^H) A22\n        //      = A22 - tau a21 (A22^H a21)^H\n        // ----------------------------------\n        // x12^H := (a21^H A22)^H = A22^H a21\n        a21_MC_STAR.AlignWith( A22 );\n        a21_MC_STAR = a21;\n        x12Adj_MR_STAR.AlignWith( A22 );\n        Zeros( x12Adj_MR_STAR, A22.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), A22, a21_MC_STAR, F(0), x12Adj_MR_STAR );\n        x12Adj_MR_STAR.SumOver( A22.ColComm() );\n        // A22 := A22 - tau a21 x12\n        LocalGer( -tau, a21_MC_STAR, x12Adj_MR_STAR, A22 );\n\n        // Put beta back \n        if( alpha21T.IsLocal(0,0) )\n            alpha21T.SetLocal(0,0,beta);\n    }\n}\n\n} // namespace hessenberg\n} // namespace elem\n\n#endif // ifndef ELEM_HESSENBERG_UUNB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/Hessenberg.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HESSENBERG_HPP\n#define ELEM_HESSENBERG_HPP\n\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_MAKETRIANGULAR_INC\n\n#include \"./Hessenberg/L.hpp\"\n#include \"./Hessenberg/U.hpp\"\n#include \"./Hessenberg/ApplyQ.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void Hessenberg( UpperOrLower uplo, Matrix<F>& A, Matrix<F>& t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hessenberg\"))\n    if( uplo == UPPER )\n        hessenberg::U( A, t );\n    else\n        hessenberg::L( A, t );\n}\n\ntemplate<typename F> \ninline void Hessenberg\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hessenberg\"))\n    if( uplo == UPPER )\n        hessenberg::U( A, t );\n    else\n        hessenberg::L( A, t );\n}\n\ntemplate<typename F>\ninline void Hessenberg( UpperOrLower uplo, Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hessenberg\"))\n    Matrix<F> t;\n    Hessenberg( uplo, A, t );\n    if( uplo == LOWER )\n        MakeTrapezoidal( LOWER, A, 1 );\n    else\n        MakeTrapezoidal( UPPER, A, -1 );\n}\n\ntemplate<typename F> \ninline void Hessenberg( UpperOrLower uplo, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hessenberg\"))\n    DistMatrix<F,STAR,STAR> t(A.Grid());\n    Hessenberg( uplo, A, t );\n    if( uplo == LOWER )\n        MakeTrapezoidal( LOWER, A, 1 );\n    else\n        MakeTrapezoidal( UPPER, A, -1 );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HESSENBERG_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONDENSE_DECL_HPP\n#define ELEM_CONDENSE_DECL_HPP\n\nnamespace elem {\n\nnamespace HermitianTridiagApproachNS {\nenum HermitianTridiagApproach\n{\n    HERMITIAN_TRIDIAG_NORMAL, // Keep the current grid\n    HERMITIAN_TRIDIAG_SQUARE, // Drop to a square process grid\n    HERMITIAN_TRIDIAG_DEFAULT // Square grid algorithm only if already square\n};\n}\nusing namespace HermitianTridiagApproachNS;\n\nstruct HermitianTridiagCtrl {\n    HermitianTridiagApproach approach;\n    GridOrder order;\n\n    HermitianTridiagCtrl() \n    : approach(HERMITIAN_TRIDIAG_SQUARE), order(ROW_MAJOR) \n    { }\n};\n\ntemplate<typename F>\nvoid HermitianTridiag( UpperOrLower uplo, Matrix<F>& A, Matrix<F>& t );\ntemplate<typename F>\nvoid HermitianTridiag\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t,\n  const HermitianTridiagCtrl ctrl=HermitianTridiagCtrl() );\n\ntemplate<typename F>\nvoid HermitianTridiag( UpperOrLower uplo, Matrix<F>& A );\ntemplate<typename F>\nvoid HermitianTridiag\n( UpperOrLower uplo, DistMatrix<F>& A,\n  const HermitianTridiagCtrl ctrl=HermitianTridiagCtrl() );\n\n} // namespace elem\n\n#endif // ifndef ELEM_CONDENSE_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONDENSE_IMPL_HPP\n#define ELEM_CONDENSE_IMPL_HPP\n\n#include \"./Bidiag.hpp\"\n#include \"./HermitianTridiag.hpp\"\n#include \"./Hessenberg.hpp\"\n\n#endif // ifndef ELEM_CONDENSE_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/condense.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONDENSE_HPP\n#define ELEM_CONDENSE_HPP\n\n#include \"./condense/decl.hpp\"\n#include \"./condense/impl.hpp\"\n\n#endif // ifndef ELEM_CONDENSE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_DECL_HPP\n#define ELEM_LAPACK_DECL_HPP\n\n#include \"./util/decl.hpp\"\n#include \"./factor/decl.hpp\"\n#include \"./condense/decl.hpp\"\n#include \"./decomp/decl.hpp\"\n#include \"./solve/decl.hpp\"\n#include \"./funcs/decl.hpp\"\n#include \"./perm/decl.hpp\"\n#include \"./props/decl.hpp\"\n\n#endif // ifndef ELEM_LAPACK_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/HermitianEig/SDC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANEIG_SDC_HPP\n#define ELEM_HERMITIANEIG_SDC_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n#include ELEM_UPDATEDIAGONAL_INC\n\n#include ELEM_QR_INC\n#include ELEM_POLAR_QDWH_INC\n#include ELEM_SCHUR_INC\n\n#include ELEM_MEDIAN_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n\n#include ELEM_HAAR_INC\n\n// TODO: Reference to Yuji's work\n\nnamespace elem {\n\nnamespace herm_eig {\n\nusing elem::schur::ComputePartition;\nusing elem::schur::SplitGrid;\nusing elem::schur::PushSubproblems;\nusing elem::schur::PullSubproblems;\n\n// TODO: Exploit symmetry in A := Q^H A Q. Routine for A := X^H A X?\n\n// G should be a rational function of A. If returnQ=true, G will be set to\n// the computed unitary matrix upon exit.\ntemplate<typename F>\ninline ValueInt<Base<F>>\nQDWHDivide\n( UpperOrLower uplo, Matrix<F>& A, Matrix<F>& G, bool returnQ=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::QDWHDivide\"))\n\n    // G := sgn(G)\n    // G := 1/2 ( G + I )\n    herm_polar::QDWH( uplo, G ); \n    UpdateDiagonal( G, F(1) );\n    Scale( F(1)/F(2), G );\n\n    // Compute the pivoted QR decomposition of the spectral projection \n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    Matrix<Int> p;\n    elem::QR( G, t, d, p );\n\n    // A := Q^H A Q\n    MakeHermitian( uplo, A );\n    const Base<F> oneA = OneNorm( A );\n    if( returnQ )\n    {\n        ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, G, t );\n        DiagonalScale( RIGHT, NORMAL, d, G );\n        Matrix<F> B;\n        Gemm( ADJOINT, NORMAL, F(1), G, A, B );\n        Gemm( NORMAL, NORMAL, F(1), B, G, A );\n    }\n    else\n    {\n        qr::ApplyQ( LEFT, ADJOINT, G, t, d, A );\n        qr::ApplyQ( RIGHT, NORMAL, G, t, d, A );\n    }\n\n    // Return || E21 ||1 / || A ||1 and the chosen rank\n    auto part = ComputePartition( A );\n    part.value /= oneA;\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nQDWHDivide\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<F>& G, bool returnQ=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::QDWHDivide\"))\n\n    // G := sgn(G)\n    // G := 1/2 ( G + I )\n    herm_polar::QDWH( uplo, G ); \n    UpdateDiagonal( G, F(1) );\n    Scale( F(1)/F(2), G );\n\n    // Compute the pivoted QR decomposition of the spectral projection \n    const Grid& g = A.Grid();\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    DistMatrix<Int,VR,STAR> p(g);\n    elem::QR( G, t, d, p );\n\n    // A := Q^H A Q\n    MakeHermitian( uplo, A );\n    const Base<F> oneA = OneNorm( A );\n    if( returnQ )\n    {\n        ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, G, t );\n        DiagonalScale( RIGHT, NORMAL, d, G );\n        DistMatrix<F> B(g);\n        Gemm( ADJOINT, NORMAL, F(1), G, A, B );\n        Gemm( NORMAL, NORMAL, F(1), B, G, A );\n    }\n    else\n    {\n        qr::ApplyQ( LEFT, ADJOINT, G, t, d, A );\n        qr::ApplyQ( RIGHT, NORMAL, G, t, d, A );\n    }\n\n    // Return || E21 ||1 / || A ||1 and the chosen rank\n    auto part = ComputePartition( A );\n    part.value /= oneA;\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nRandomizedSignDivide\n( UpperOrLower uplo, Matrix<F>& A, Matrix<F>& G, bool returnQ, \n  const HermitianSdcCtrl<Base<F>>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::RandomizedSignDivide\"))\n\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    MakeHermitian( uplo, A );\n    const Real oneA = OneNorm( A );\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*lapack::MachineEpsilon<Real>();\n\n    // S := sgn(G)\n    // S := 1/2 ( S + I )\n    auto S( G );\n    herm_polar::QDWH( uplo, S ); \n    UpdateDiagonal( S, F(1) );\n    Scale( F(1)/F(2), S );\n\n    ValueInt<Real> part;\n    Matrix<F> V, B, t;\n    Matrix<Base<F>> d;\n    Int it=0;\n    while( it < sdcCtrl.maxInnerIts )\n    {\n        G = S;\n\n        // Compute the RURV of the spectral projector\n        ImplicitHaar( V, t, d, n );\n        qr::ApplyQ( RIGHT, NORMAL, V, t, d, G );\n        elem::QR( G, t, d );\n\n        // A := Q^H A Q [and reuse space for V for keeping original A]\n        V = A;\n        if( returnQ )\n        {\n            ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, G, t );\n            DiagonalScale( RIGHT, NORMAL, d, G );\n            Gemm( ADJOINT, NORMAL, F(1), G, A, B );\n            Gemm( NORMAL, NORMAL, F(1), B, G, A );\n        }\n        else\n        {\n            qr::ApplyQ( LEFT, ADJOINT, G, t, d, A );\n            qr::ApplyQ( RIGHT, NORMAL, G, t, d, A );\n        }\n\n        // || E21 ||1 / || A ||1 and the chosen rank\n        part = ComputePartition( A );\n        part.value /= oneA;\n\n        ++it;\n        if( part.value <= tol || it == sdcCtrl.maxInnerIts )\n            break;\n        else\n            A = V;\n    }\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nRandomizedSignDivide\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<F>& G, bool returnQ, \n  const HermitianSdcCtrl<Base<F>>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::RandomizedSignDivide\"))\n\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    MakeHermitian( uplo, A );\n    const Real oneA = OneNorm( A );\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*lapack::MachineEpsilon<Real>();\n\n    // S := sgn(G)\n    // S := 1/2 ( S + I )\n    auto S( G );\n    herm_polar::QDWH( uplo, S ); \n    UpdateDiagonal( S, F(1) );\n    Scale( F(1)/F(2), S );\n\n    ValueInt<Real> part;\n    DistMatrix<F> V(g), B(g);\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    Int it=0;\n    while( it < sdcCtrl.maxInnerIts )\n    {\n        G = S;\n\n        // Compute the RURV of the spectral projector\n        ImplicitHaar( V, t, d, n );\n        qr::ApplyQ( RIGHT, NORMAL, V, t, d, G );\n        elem::QR( G, t, d );\n\n        // A := Q^H A Q [and reuse space for V for keeping original A]\n        V = A;\n        if( returnQ )\n        {\n            ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, G, t );\n            DiagonalScale( RIGHT, NORMAL, d, G );\n            Gemm( ADJOINT, NORMAL, F(1), G, A, B );\n            Gemm( NORMAL, NORMAL, F(1), B, G, A );\n        }\n        else\n        {\n            qr::ApplyQ( LEFT, ADJOINT, G, t, d, A );\n            qr::ApplyQ( RIGHT, NORMAL, G, t, d, A );\n        }\n\n        // || E21 ||1 / || A ||1 and the chosen rank\n        part = ComputePartition( A );\n        part.value /= oneA;\n\n        ++it;\n        if( part.value <= tol || it == sdcCtrl.maxInnerIts )\n            break;\n        else\n            A = V;\n    }\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nSpectralDivide\n( UpperOrLower uplo, Matrix<F>& A, const HermitianSdcCtrl<Base<F>>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::SpectralDivide\"))\n\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    MakeHermitian( uplo, A );\n    const auto median = Median(A.GetRealPartOfDiagonal());\n    const Real infNorm = InfinityNorm(A);\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    Matrix<F> G, ACopy;\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        const Real shift = SampleBall<Real>(-median.value,spread);\n\n        G = A;\n        UpdateDiagonal( G, F(shift) );\n\n        part = RandomizedSignDivide( uplo, A, G, false, sdcCtrl );\n\n        ++it;\n        if( part.value <= tol )\n            break;\n        else if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nSpectralDivide\n( UpperOrLower uplo, Matrix<F>& A, Matrix<F>& Q, \n  const HermitianSdcCtrl<Base<F>>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::SpectralDivide\"))\n\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    MakeHermitian( uplo, A );\n    const auto median = Median(A.GetRealPartOfDiagonal());\n    const Real infNorm = InfinityNorm(A);\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    Matrix<F> ACopy;\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        const Real shift = SampleBall<Real>(-median.value,spread);\n\n        Q = A;\n        UpdateDiagonal( Q, F(shift) );\n\n        part = RandomizedSignDivide( uplo, A, Q, true, sdcCtrl );\n\n        ++it;\n        if( part.value <= tol )\n            break;\n        else if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nSpectralDivide\n( UpperOrLower uplo, DistMatrix<F>& A, \n  const HermitianSdcCtrl<Base<F>>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::SpectralDivide\"))\n\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    MakeHermitian( uplo, A );\n    const auto median = Median(A.GetRealPartOfDiagonal());\n    const Real infNorm = InfinityNorm(A);\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    DistMatrix<F> ACopy(A.Grid()), G(A.Grid());\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        Real shift = SampleBall<Real>(-median.value,spread);\n        mpi::Broadcast( shift, 0, A.Grid().VCComm() );\n\n        G = A;\n        UpdateDiagonal( G, F(shift) );\n\n        part = RandomizedSignDivide( uplo, A, G, false, sdcCtrl );\n\n        ++it;\n        if( part.value <= tol )\n            break;\n        else if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nSpectralDivide\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<F>& Q, \n  const HermitianSdcCtrl<Base<F>>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::SpectralDivide\"))\n\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    MakeHermitian( uplo, A );\n    const Real infNorm = InfinityNorm(A);\n    const auto median = Median(A.GetRealPartOfDiagonal());\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    DistMatrix<F> ACopy(A.Grid());\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        Real shift = SampleBall<Real>(-median.value,spread);\n        mpi::Broadcast( shift, 0, A.Grid().VCComm() );\n\n        Q = A;\n        UpdateDiagonal( Q, F(shift) );\n\n        part = RandomizedSignDivide( uplo, A, Q, true, sdcCtrl );\n\n        ++it;\n        if( part.value <= tol )\n            break;\n        else if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename F>\ninline void\nSDC\n( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, \n  const HermitianSdcCtrl<Base<F>> sdcCtrl=HermitianSdcCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::SDC\"))\n\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    w.Resize( n, 1 );\n    if( n <= sdcCtrl.cutoff )\n    {\n        HermitianEig( uplo, A, w );\n        return;\n    }\n\n    // Perform this level's split\n    const auto part = SpectralDivide( uplo, A, sdcCtrl );\n    Matrix<F> ATL, ATR,\n              ABL, ABR;\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, part.index );\n    if( uplo == LOWER )\n        MakeZeros( ABL );\n    else\n        MakeZeros( ATR );\n    Matrix<Real> wT, wB;\n    PartitionDown( w, wT, wB, part.index );\n\n    // Recurse on the two subproblems\n    SDC( uplo, ATL, wT, sdcCtrl );\n    SDC( uplo, ABR, wB, sdcCtrl );\n}\n\ntemplate<typename F>\ninline void\nSDC\n( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, Matrix<F>& Q, \n  const HermitianSdcCtrl<Base<F>> sdcCtrl=HermitianSdcCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::SDC\"))\n\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    w.Resize( n, 1 );\n    Q.Resize( n, n );\n    if( n <= sdcCtrl.cutoff )\n    {\n        HermitianEig( uplo, A, w, Q );\n        return;\n    }\n\n    // Perform this level's split\n    const auto part = SpectralDivide( uplo, A, Q, sdcCtrl );\n    Matrix<F> ATL, ATR,\n              ABL, ABR;\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, part.index );\n    if( uplo == LOWER )\n        MakeZeros( ABL );\n    else\n        MakeZeros( ATR );\n    Matrix<Real> wT, wB;\n    PartitionDown( w, wT, wB, part.index );\n    Matrix<F> QL, QR;\n    PartitionRight( Q, QL, QR, part.index );\n\n    // Recurse on the top-left quadrant and update eigenvectors\n    Matrix<F> Z;\n    SDC( uplo, ATL, wT, Z, sdcCtrl );\n    auto G( QL );\n    Gemm( NORMAL, NORMAL, F(1), G, Z, QL );\n\n    // Recurse on the bottom-right quadrant and update eigenvectors\n    SDC( uplo, ABR, wB, Z, sdcCtrl );\n    G = QR;\n    Gemm( NORMAL, NORMAL, F(1), G, Z, QR );\n}\n\ntemplate<typename F>\ninline void\nSDC\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w, \n  const HermitianSdcCtrl<Base<F>> sdcCtrl=HermitianSdcCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::SDC\"))\n\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    w.Resize( n, 1 );\n    if( A.Grid().Size() == 1 )\n    {\n        HermitianEig( uplo, A.Matrix(), w.Matrix() );\n        return;\n    }\n    if( n <= sdcCtrl.cutoff )\n    {\n        HermitianEig( uplo, A, w );\n        return;\n    }\n\n    // Perform this level's split\n    const auto part = SpectralDivide( uplo, A, sdcCtrl );\n    DistMatrix<F> ATL(g), ATR(g),\n                  ABL(g), ABR(g);\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, part.index );\n    if( uplo == LOWER )\n        MakeZeros( ABL );\n    else\n        MakeZeros( ATR );\n    DistMatrix<Real,VR,STAR> wT(g), wB(g);\n    PartitionDown( w, wT, wB, part.index );\n\n    // Recurse on the two subproblems\n    DistMatrix<F> ATLSub, ABRSub;\n    DistMatrix<Real,VR,STAR> wTSub, wBSub;\n    PushSubproblems\n    ( ATL, ABR, ATLSub, ABRSub, wT, wB, wTSub, wBSub, sdcCtrl.progress );\n    if( ATL.Participating() )\n        SDC( uplo, ATLSub, wTSub, sdcCtrl );\n    if( ABR.Participating() )\n        SDC( uplo, ABRSub, wBSub, sdcCtrl );\n    PullSubproblems( ATL, ABR, ATLSub, ABRSub, wT, wB, wTSub, wBSub );\n}\n\ntemplate<typename F>\ninline void\nSDC\n( UpperOrLower uplo, \n  DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w, DistMatrix<F>& Q, \n  const HermitianSdcCtrl<Base<F>> sdcCtrl=HermitianSdcCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::SDC\"))\n\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    w.Resize( n, 1 );\n    Q.Resize( n, n );\n    if( A.Grid().Size() == 1 )\n    {\n        HermitianEig( uplo, A.Matrix(), w.Matrix(), Q.Matrix() );\n        return;\n    }\n    if( n <= sdcCtrl.cutoff )\n    {\n        HermitianEig( uplo, A, w, Q );\n        return;\n    }\n\n    // Perform this level's split\n    const auto part = SpectralDivide( uplo, A, Q, sdcCtrl );\n    DistMatrix<F> ATL(g), ATR(g),\n                  ABL(g), ABR(g);\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, part.index );\n    if( uplo == LOWER )\n        MakeZeros( ABL );\n    else\n        MakeZeros( ATR );\n    DistMatrix<Real,VR,STAR> wT(g), wB(g);\n    PartitionDown( w, wT, wB, part.index );\n    DistMatrix<F> QL(g), QR(g);\n    PartitionRight( Q, QL, QR, part.index );\n\n    // Recurse on the two subproblems\n    DistMatrix<F> ATLSub, ABRSub, ZTSub, ZBSub;\n    DistMatrix<Real,VR,STAR> wTSub, wBSub;\n    PushSubproblems\n    ( ATL, ABR, ATLSub, ABRSub, wT, wB, wTSub, wBSub, ZTSub, ZBSub, \n      sdcCtrl.progress );\n    if( ATLSub.Participating() )\n        SDC( uplo, ATLSub, wTSub, ZTSub, sdcCtrl );\n    if( ABRSub.Participating() )\n        SDC( uplo, ABRSub, wBSub, ZBSub, sdcCtrl );\n\n    // Pull the results back to this grid\n    DistMatrix<F> ZT(g), ZB(g);\n    PullSubproblems\n    ( ATL, ABR, ATLSub, ABRSub, wT, wB, wTSub, wBSub, ZT, ZB, ZTSub, ZBSub );\n\n    // Update the eigen vectors\n    auto G( QL );\n    Gemm( NORMAL, NORMAL, F(1), G, ZT, QL );\n    G = QR;\n    Gemm( NORMAL, NORMAL, F(1), G, ZB, QR );\n}\n\n} // namespace herm_eig\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANEIG_SDC_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/HermitianEig.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANEIG_HPP\n#define ELEM_HERMITIANEIG_HPP\n\n#include ELEM_HERMITIANTRIDIAG_INC\n#include ELEM_HERMITIANTRIDIAGEIG_INC\n\n// NOTE: HermitianEig declarations are in lapack-like/decomp/decl.hpp\n#include \"./HermitianEig/SDC.hpp\"\n\n#endif // ifndef ELEM_HERMITIANEIG_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/HermitianGenDefiniteEig.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANGENDEFINITEEIG_HPP\n#define ELEM_HERMITIANGENDEFINITEEIG_HPP\n\n#include ELEM_TRMM_INC\n#include ELEM_TRSM_INC\n#include ELEM_TWOSIDEDTRMM_INC\n#include ELEM_TWOSIDEDTRSM_INC\n\n#include ELEM_CHOLESKY_INC\n#include ELEM_HERMITIANEIG_INC\n\nnamespace elem {\n\n// Return the full set of eigenvalues\n// ==================================\n\ntemplate<typename F>\ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  Matrix<F>& A, Matrix<F>& B, Matrix<Base<F>>& w, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, sort, ctrl );\n}\n\ntemplate<typename F>\ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  DistMatrix<F>& A, DistMatrix<F>& B,\n  DistMatrix<Base<F>,VR,STAR>& w, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, sort, ctrl );\n}\n\n// Return the full set of eigenpairs\n// =================================\n\ntemplate<typename F> \ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  Matrix<F>& A, Matrix<F>& B, Matrix<Base<F>>& w, Matrix<F>& X,\n  SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, X, sort, ctrl );\n    if( type == AXBX || type == ABX )\n    {\n        const Orientation orientation = ( uplo==LOWER ? ADJOINT : NORMAL );\n        Trsm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n    else /* type == BAX */\n    {\n        const Orientation orientation = ( uplo==LOWER ? NORMAL : ADJOINT );\n        Trmm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n}\n\ntemplate<typename F> \ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  DistMatrix<F>& A, DistMatrix<F>& B,\n  DistMatrix<Base<F>,VR,STAR>& w, DistMatrix<F>& X,\n  SortType sort=UNSORTED, \n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, X, sort, ctrl );\n    if( type == AXBX || type == ABX )\n    {\n        const Orientation orientation = ( uplo==LOWER ? ADJOINT : NORMAL );\n        Trsm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n    else /* type == BAX */\n    {\n        const Orientation orientation = ( uplo==LOWER ? NORMAL : ADJOINT );\n        Trmm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n}\n\n// Return the eigenvalues within the specified index range\n// =======================================================\n\ntemplate<typename F>\ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  Matrix<F>& A, Matrix<F>& B, Matrix<Base<F>>& w,\n  Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, a, b, sort, ctrl );\n}\n\ntemplate<typename F>\ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  DistMatrix<F>& A, DistMatrix<F>& B,\n  DistMatrix<Base<F>,VR,STAR>& w,\n  Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, a, b, sort, ctrl );\n}\n\n// Return the eigenpairs with eigenvalues in the specified index range\n// ===================================================================\n\ntemplate<typename F>\ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  Matrix<F>& A, Matrix<F>& B, Matrix<Base<F>>& w, Matrix<F>& X,\n  Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, X, a, b, sort, ctrl );\n    if( type == AXBX || type == ABX )\n    {\n        const Orientation orientation = ( uplo==LOWER ? ADJOINT : NORMAL );\n        Trsm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n    else /* type == BAX */\n    {\n        const Orientation orientation = ( uplo==LOWER ? NORMAL : ADJOINT );\n        Trmm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n}\n\ntemplate<typename F>\ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  DistMatrix<F>& A, DistMatrix<F>& B,\n  DistMatrix<Base<F>,VR,STAR>& w, DistMatrix<F>& X,\n  Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, X, a, b, sort, ctrl );\n    if( type == AXBX || type == ABX )\n    {\n        const Orientation orientation = ( uplo==LOWER ? ADJOINT : NORMAL );\n        Trsm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n    else /* type == BAX */\n    {\n        const Orientation orientation = ( uplo==LOWER ? NORMAL : ADJOINT );\n        Trmm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n}\n\n// Return the eigenvalues in the particular interval\n// =================================================\n\ntemplate<typename F> \ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  Matrix<F>& A, Matrix<F>& B, Matrix<Base<F>>& w,\n  Base<F> a, Base<F> b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, a, b, sort, ctrl );\n}\n\ntemplate<typename F> \ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  DistMatrix<F>& A, DistMatrix<F>& B, DistMatrix<Base<F>,VR,STAR>& w,\n  Base<F> a, Base<F> b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, a, b, sort, ctrl );\n}\n\n// Return the eigenpairs with eigenvalues in the specified interval\n// ================================================================\n\ntemplate<typename F>\ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  Matrix<F>& A, Matrix<F>& B, Matrix<Base<F>>& w, Matrix<F>& X,\n  Base<F> a, Base<F> b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, X, a, b, sort, ctrl );\n    if( type == AXBX || type == ABX )\n    {\n        const Orientation orientation = ( uplo==LOWER ? ADJOINT : NORMAL );\n        Trsm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n    else /* type == BAX */\n    {\n        const Orientation orientation = ( uplo==LOWER ? NORMAL : ADJOINT );\n        Trmm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n}\n\ntemplate<typename F>\ninline void\nHermitianGenDefiniteEig\n( HermitianGenDefiniteEigType type, UpperOrLower uplo, \n  DistMatrix<F>& A, DistMatrix<F>& B,\n  DistMatrix<Base<F>,VR,STAR>& w, DistMatrix<F>& X,\n  Base<F> a, Base<F> b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianGenDefiniteEig\"))\n    if( A.Height() != A.Width() || B.Height() != B.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    Cholesky( uplo, B );\n    if( type == AXBX )\n        TwoSidedTrsm( uplo, NON_UNIT, A, B );\n    else\n        TwoSidedTrmm( uplo, NON_UNIT, A, B );\n    HermitianEig( uplo, A, w, X, a, b, sort, ctrl );\n    if( type == AXBX || type == ABX )\n    {\n        const Orientation orientation = ( uplo==LOWER ? ADJOINT : NORMAL );\n        Trsm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n    else /* type == BAX */\n    {\n        const Orientation orientation = ( uplo==LOWER ? NORMAL : ADJOINT );\n        Trmm( LEFT, uplo, orientation, NON_UNIT, F(1), B, X );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANGENDEFINITEEIG_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/HermitianTridiagEig/Sort.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANTRIDIAGEIG_SORT_HPP\n#define ELEM_HERMITIANTRIDIAGEIG_SORT_HPP\n\n#include ELEM_SORT_INC\n\nnamespace elem {\n\n// This routine is slightly more general than necessary (complex support) so\n// that it may also be used for sorting Hermitian eigenpairs\nnamespace herm_eig {\n\ntemplate<typename F>\ninline void\nSort( Matrix<Base<F>>& w, Matrix<F>& Z, SortType sort=ASCENDING )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::Sort\"))\n    if( sort == UNSORTED )\n        return;\n\n    // Initialize the pairs of indices and eigenvalues\n    typedef Base<F> Real;\n    std::vector<ValueInt<Real>> pairs = TaggedSort( w, sort );\n\n    // Reorder the eigenvectors and eigenvalues using the new ordering\n    const Int n = Z.Height();\n    const Int k = Z.Width();\n    Matrix<F> ZPerm( n, k );\n    for( Int j=0; j<k; ++j )\n    {\n        const Int source = pairs[j].index;\n        MemCopy( ZPerm.Buffer(0,j), Z.LockedBuffer(0,source), n );\n        w.Set(j,0,pairs[j].value);\n    }\n    Z = ZPerm;\n}\n\ntemplate<typename F,Dist U1,Dist V1,\n                    Dist U2,Dist V2>\ninline void\nSort\n( DistMatrix<Base<F>,U1,V1>& w, DistMatrix<F,U2,V2>& Z, \n  SortType sort=ASCENDING )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_eig::Sort\"))\n    if( sort == UNSORTED )\n        return;\n\n    // Get the sorted eigenvalue information\n    typedef Base<F> Real;\n    std::vector<ValueInt<Real>> pairs = TaggedSort( w, sort );\n\n    // Locally reorder the eigenvectors and eigenvalues using the new ordering\n    const Int n = Z.Height();\n    const Int k = Z.Width();\n    const Grid& g = Z.Grid();\n    DistMatrix<F,VC,STAR> Z_VC_STAR( Z );\n    DistMatrix<F,VC,STAR> ZPerm_VC_STAR( n, k, g );\n    const Int nLocal = Z_VC_STAR.LocalHeight();\n    for( Int j=0; j<k; ++j )\n    {\n        MemCopy\n        ( ZPerm_VC_STAR.Buffer(0,j), \n          Z_VC_STAR.LockedBuffer(0,pairs[j].index), nLocal );\n        w.Set( j, 0, pairs[j].value );\n    }\n    Z_VC_STAR.Empty();\n    Z = ZPerm_VC_STAR;\n}\n\n} // namespace herm_eig\n\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAGEIG_SORT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/HermitianTridiagEig.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANTRIDIAGEIG_HPP\n#define ELEM_HERMITIANTRIDIAGEIG_HPP\n\n#include ELEM_HERMITIANTRIDIAGEIG_SORT_INC\n\n// NOTE: eReal and ZReal could be packed into their complex counterparts\n\nnamespace elem {\n\n// Return the full set of eigenvalues\n// ==================================\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Real>& e, Matrix<Real>& w, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    w.Resize( n, 1 );\n    lapack::SymmetricTridiagEig( n, d.Buffer(), e.Buffer(), w.Buffer() );\n    Sort( w, sort );\n}\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Complex<Real>>& e, Matrix<Real>& w, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    Matrix<Real> eReal( n-1, 1 );\n    C yLast = 1;\n    for( Int j=0; j<n-1; ++j )\n    {\n        const C psi = e.Get(j,0);\n        const Real psiAbs = Abs(psi);\n        if( psiAbs == Real(0) )\n            yLast = 1;\n        else\n            yLast = Polar(Real(1),Arg(psi*yLast));\n        eReal.Set( j, 0, psiAbs );\n    }\n    HermitianTridiagEig( d, eReal, w, sort );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,U1,V1  >& d,\n  const DistMatrix<Real,U2,V2  >& e,\n        DistMatrix<Real,U3,STAR>& w, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    w.AlignCols( 0 );\n    w.Resize( n, 1 );\n\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<Real,STAR,STAR> e_STAR_STAR( d.Grid() );\n    e_STAR_STAR.Resize( n-1, 1, n );\n    e_STAR_STAR = e;\n    if( w.Participating() )\n    {\n        std::vector<Real> wVector(n);\n        herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer(), wVector.data(), \n          w.ColComm() );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n    }\n    Sort( w, sort );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,         U1,V1  >& d,\n  const DistMatrix<Complex<Real>,U2,V2  >& e,\n        DistMatrix<Real,         U3,STAR>& w, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    w.AlignCols( 0 );\n    w.Resize( n, 1 );\n\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<C,STAR,STAR> e_STAR_STAR( e );\n\n    DistMatrix<Real,STAR,STAR> eReal( n-1, 1, 0, 0, n, d.Grid() );\n    if( w.Participating() )\n    {\n        C yLast = 1;\n        for( Int j=0; j<n-1; ++j )\n        {\n            const C psi = e_STAR_STAR.GetLocal(j,0);\n            const Real psiAbs = Abs(psi);\n            if( psiAbs == Real(0) )\n                yLast = 1;\n            else\n                yLast = Polar(Real(1),Arg(psi*yLast));\n            eReal.SetLocal( j, 0, psiAbs );\n        }\n\n        std::vector<Real> wVector(n);\n        herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), eReal.Buffer(), wVector.data(), \n          w.ColComm() );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n    }\n    Sort( w, sort );\n}\n\n// Return an index range of the eigenvalues\n// ========================================\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Real>& e, Matrix<Real>& w, \n  Int il, Int iu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    const Int k = ( n==0 ? 0 : iu-il+1 );\n    w.Resize( n, 1 );\n    lapack::SymmetricTridiagEig\n    ( n, d.Buffer(), e.Buffer(), w.Buffer(), il, iu );\n    w.Resize( k, 1 );\n    Sort( w, sort );\n}\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Complex<Real>>& e, Matrix<Real>& w, \n  Int il, Int iu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    C yLast = 1;\n    Matrix<Real> eReal( n-1, 1 );\n    for( Int j=0; j<n-1; ++j )\n    {\n        const C psi = e.Get(j,0);\n        const Real psiAbs = Abs(psi);\n        if( psiAbs == Real(0) )\n            yLast = 1;\n        else\n            yLast = Polar(Real(1),Arg(psi*yLast));\n        eReal.Set( j, 0, psiAbs );\n    }\n    HermitianTridiagEig( d, eReal, w, il, iu, sort );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,U1,V1  >& d,\n  const DistMatrix<Real,U2,V2  >& e,\n        DistMatrix<Real,U3,STAR>& w, Int il, Int iu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    const Int k = ( n==0 ? 0 : iu-il+1 );\n    w.AlignCols( 0 );\n    w.Resize( k, 1 );\n\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<Real,STAR,STAR> e_STAR_STAR( d.Grid() );\n    e_STAR_STAR.Resize( n-1, 1, n );\n    e_STAR_STAR = e;\n    if( w.Participating() )\n    {\n        std::vector<Real> wVector(n);\n        herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer(), wVector.data(), \n          w.ColComm(), int(il), int(iu) );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n    }\n    Sort( w, sort );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,         U1,V1  >& d,\n  const DistMatrix<Complex<Real>,U2,V2  >& e,\n        DistMatrix<Real,         U3,STAR>& w, Int il, Int iu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    const Int k = ( n==0 ? 0 : iu-il+1 );\n    w.AlignCols( 0 );\n    w.Resize( k, 1 );\n\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<C,STAR,STAR> e_STAR_STAR( e );\n\n    DistMatrix<Real,STAR,STAR> eReal( n-1, 1, 0, 0, n, d.Grid() );\n    if( w.Participating() )\n    {\n        C yLast = 1;\n        for( Int j=0; j<n-1; ++j )\n        {\n            const C psi = e_STAR_STAR.GetLocal(j,0);\n            const Real psiAbs = Abs(psi);\n            if( psiAbs == Real(0) )\n                yLast = 1;\n            else\n                yLast = Polar(Real(1),Arg(psi*yLast));\n            eReal.SetLocal( j, 0, psiAbs );\n        }\n\n        std::vector<Real> wVector(n);\n        herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), eReal.Buffer(), wVector.data(), \n          w.ColComm(), int(il), int(iu) );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n    }\n    Sort( w, sort );\n}\n\n// Return the eigenvalues in a given interval\n// ==========================================\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Real>& e, Matrix<Real>& w, \n  Real vl, Real vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    w.Resize( n, 1 );\n    const Int k = lapack::SymmetricTridiagEig\n    ( n, d.Buffer(), e.Buffer(), w.Buffer(), vl, vu );\n    w.Resize( k, 1 );\n    Sort( w, sort );\n}\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Complex<Real>>& e, Matrix<Real>& w, \n  Real vl, Real vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    Matrix<Real> eReal( n-1, 1 );\n    C yLast = 1;\n    for( Int j=0; j<n-1; ++j )\n    {\n        const C psi = e.Get(j,0);\n        const Real psiAbs = Abs(psi);\n        if( psiAbs == Real(0) )\n            yLast = 1;\n        else\n            yLast = Polar(Real(1),Arg(psi*yLast));\n        eReal.Set( j, 0, psiAbs );\n    }\n    HermitianTridiagEig( d, eReal, w, vl, vu, sort );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,U1,V1  >& d,\n  const DistMatrix<Real,U2,V2  >& e,\n        DistMatrix<Real,U3,STAR>& w, Real vl, Real vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    w.AlignCols( 0 );\n\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<Real,STAR,STAR> e_STAR_STAR( d.Grid() );\n    e_STAR_STAR.Resize( n-1, 1, n );\n    e_STAR_STAR = e;\n    if( w.Participating() )\n    {\n        std::vector<Real> wVector(n);\n        auto info = herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer(), wVector.data(), \n          w.ColComm(), vl, vu );\n        const Int k = info.numGlobalEigenvalues;\n        w.Resize( k, 1 );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n    }\n    w.MakeConsistent( true );\n    Sort( w, sort );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,         U1,V1  >& d,\n  const DistMatrix<Complex<Real>,U2,V2  >& e,\n        DistMatrix<Real,         U3,STAR>& w, Real vl, Real vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    w.AlignCols( 0 );\n\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<C,STAR,STAR> e_STAR_STAR( e );\n\n    DistMatrix<Real,STAR,STAR> eReal( d.Grid() );\n    eReal.Resize( n-1, 1, n );\n    if( w.Participating() )\n    {\n        C yLast = 1;\n        for( Int j=0; j<n-1; ++j )\n        {\n            const C psi = e_STAR_STAR.GetLocal(j,0);\n            const Real psiAbs = Abs(psi);\n            if( psiAbs == Real(0) )\n                yLast = 1;\n            else\n                yLast = Polar(Real(1),Arg(psi*yLast));\n            eReal.SetLocal( j, 0, psiAbs );\n        }\n\n        std::vector<Real> wVector(n);\n        auto info = herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), eReal.Buffer(), wVector.data(), \n          w.ColComm(), vl, vu );\n        const Int k = info.numGlobalEigenvalues;\n        w.Resize( k, 1 );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n    }\n    w.MakeConsistent( true );\n    Sort( w, sort );\n}\n\n// Return the full set of eigenpairs\n// =================================\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Real>& e, Matrix<Real>& w, Matrix<Real>& Z, \n  SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    w.Resize( n, 1 );\n    Z.Resize( n, n );\n    lapack::SymmetricTridiagEig\n    ( n, d.Buffer(), e.Buffer(), w.Buffer(), Z.Buffer(), Z.LDim() );\n    herm_eig::Sort( w, Z, sort );\n}\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Complex<Real>>& e, Matrix<Real>& w, \n  Matrix<Complex<Real>>& Z, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    Matrix<Real> eReal( n-1, 1 );\n    Matrix<C> y( n, 1 );\n    y.Set( 0, 0, 1 );\n    for( Int j=0; j<n-1; ++j )\n    {\n        const C psi = e.Get(j,0);\n        const Real psiAbs = Abs(psi);\n        if( psiAbs == Real(0) )\n            y.Set( j+1, 0, 1 );\n        else\n            y.Set( j+1, 0, Polar(Real(1),Arg(psi*y.Get(j,0))) );\n        eReal.Set( j, 0, psiAbs );\n    }\n    Matrix<Real> ZReal;\n    HermitianTridiagEig( d, eReal, w, ZReal, sort );\n    Z.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<n; ++i )\n            Z.Set( i, j, y.Get(i,0)*ZReal.Get(i,j) );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,U1,  V1  >& d,\n  const DistMatrix<Real,U2,  V2  >& e,\n        DistMatrix<Real,U3,  STAR>& w, \n        DistMatrix<Real,STAR,U3  >& Z, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    w.AlignCols( 0 );\n    w.Resize( n, 1 );\n    Z.AlignRows( 0 );\n    Z.Resize( n, n );\n\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<Real,STAR,STAR> e_STAR_STAR( d.Grid() );\n    e_STAR_STAR.Resize( n-1, 1, n );\n    e_STAR_STAR = e;\n    if( w.Participating() )\n    {\n        std::vector<Real> wVector(n);\n        herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer(), wVector.data(), \n          Z.Buffer(), Z.LDim(), w.ColComm() );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n    }\n    herm_eig::Sort( w, Z, sort );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,         U1,  V1  >& d,\n  const DistMatrix<Complex<Real>,U2,  V2  >& e,\n        DistMatrix<Real,         U3,  STAR>& w, \n        DistMatrix<Complex<Real>,STAR,U3  >& Z, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    w.AlignCols( 0 );\n    w.Resize( n, 1 );\n    Z.AlignRows( 0 );\n    Z.Resize( n, n );\n\n    const Grid& g = d.Grid();\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<C,STAR,STAR> e_STAR_STAR( e );\n\n    DistMatrix<Real,STAR,STAR> eReal( g );\n    eReal.Resize( n-1, 1, n );\n    DistMatrix<Real,STAR,U3  > ZReal(g);\n    DistMatrix<C,   STAR,STAR> y(n,1,g);\n    if( w.Participating() )\n    {\n        y.SetLocal(0,0,1);\n        for( Int j=0; j<n-1; ++j )\n        {\n            const C psi = e_STAR_STAR.GetLocal(j,0);\n            const Real psiAbs = Abs(psi);\n            if( psiAbs == Real(0) )\n                y.SetLocal( j+1, 0, 1 );\n            else\n                y.SetLocal( j+1, 0, Polar(Real(1),Arg(psi*y.GetLocal(j,0))) );\n            eReal.SetLocal( j, 0, psiAbs );\n        }\n\n        std::vector<Real> wVector(n);\n        herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), eReal.Buffer(), wVector.data(), \n          ZReal.Buffer(), ZReal.LDim(), w.ColComm() );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n    }\n    herm_eig::Sort( w, ZReal, sort );\n    Z.Resize( n, n );\n    for( Int jLoc=0; jLoc<Z.LocalWidth(); ++jLoc )\n        for( Int i=0; i<n; ++i )\n            Z.SetLocal( i, jLoc, y.GetLocal(i,0)*ZReal.GetLocal(i,jLoc) );\n}\n\ntemplate<typename F,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3,Dist U4,Dist V4>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Base<F>,U1,V1  >& d,\n  const DistMatrix<F,      U2,V2  >& e,\n        DistMatrix<Base<F>,U3,STAR>& w, \n        DistMatrix<F,      U4,V4  >& Z, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    DistMatrix<F,STAR,U3> Z_STAR_U3( Z );\n    HermitianTridiagEig( d, e, w, Z_STAR_U3, sort );\n    Z = Z_STAR_U3;\n}\n\n// Return an index range of eigenpairs\n// ===================================\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Real>& e, Matrix<Real>& w, \n  Matrix<Real>& Z, Int il, Int iu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    const Int k = ( n==0 ? 0 : iu-il+1 );\n    w.Resize( n, 1 );\n    Z.Resize( n, n );\n    lapack::SymmetricTridiagEig\n    ( n, d.Buffer(), e.Buffer(), w.Buffer(), Z.Buffer(), Z.LDim(), il, iu );\n    w.Resize( k, 1 );\n    herm_eig::Sort( w, Z, sort );\n}\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Complex<Real>>& e, Matrix<Real>& w, \n  Matrix<Complex<Real>>& Z, Int il, Int iu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    const Int k = ( n==0 ? 0 : iu-il+1 );\n\n    Matrix<Real> eReal( n-1, 1 );\n    Matrix<C> y( n, 1 );\n    y.Set( 0, 0, 1 );\n    for( Int j=0; j<n-1; ++j )\n    {\n        const C psi = e.Get(j,0);\n        const Real psiAbs = Abs(psi);\n        if( psiAbs == Real(0) )\n            y.Set( j+1, 0, 1 );\n        else\n            y.Set( j+1, 0, Polar(Real(1),Arg(psi*y.Get(j,0))) );\n        eReal.Set( j, 0, psiAbs );\n    }\n\n    Matrix<Real> ZReal;\n    HermitianTridiagEig( d, eReal, w, ZReal, il, iu, sort );\n\n    Z.Resize( n, k );\n    for( Int j=0; j<k; ++j )\n        for( Int i=0; i<n; ++i )\n            Z.Set( i, j, y.Get(i,0)*ZReal.Get(i,j) );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,U1,  V1  >& d,\n  const DistMatrix<Real,U2,  V2  >& e,\n        DistMatrix<Real,U3,  STAR>& w, \n        DistMatrix<Real,STAR,U3  >& Z, Int il, Int iu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    const Int k = ( n==0 ? 0 : iu-il+1 );\n    w.AlignCols( 0 );\n    w.Resize( k, 1 );\n    Z.AlignRows( 0 );\n    Z.Resize( n, k );\n\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<Real,STAR,STAR> e_STAR_STAR( d.Grid() );\n    e_STAR_STAR.Resize( n-1, 1, n );\n    e_STAR_STAR = e;\n    if( w.Participating() )\n    {\n        std::vector<Real> wVector(n);\n        herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer(), wVector.data(), \n          Z.Buffer(), Z.LDim(), w.ColComm(), int(il), int(iu) );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n    }\n    herm_eig::Sort( w, Z, sort );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,         U1,  V1  >& d,\n  const DistMatrix<Complex<Real>,U2,  V2  >& e,\n        DistMatrix<Real,         U3,  STAR>& w, \n        DistMatrix<Complex<Real>,STAR,U3  >& Z, Int il, Int iu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    const Int k = ( n==0 ? 0 : iu-il+1 );\n    w.AlignCols( 0 );\n    w.Resize( k, 1 );\n    Z.AlignRows( 0 );\n    Z.Resize( n, k );\n\n    const Grid& g = d.Grid();\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<C,STAR,STAR> e_STAR_STAR( e );\n\n    DistMatrix<Real,STAR,STAR> eReal( g );\n    eReal.Resize( n-1, 1, n );\n    DistMatrix<Real,STAR,U3  > ZReal(g);\n    DistMatrix<C,   STAR,STAR> y(n,1,g);\n    if( w.Participating() )\n    {\n        y.SetLocal(0,0,1);\n        for( Int j=0; j<n-1; ++j )\n        {\n            const C psi = e_STAR_STAR.GetLocal(j,0);\n            const Real psiAbs = Abs(psi);\n            if( psiAbs == Real(0) )\n                y.SetLocal( j+1, 0, 1 );\n            else\n                y.SetLocal( j+1, 0, Polar(Real(1),Arg(psi*y.GetLocal(j,0))) );\n            eReal.SetLocal( j, 0, psiAbs );\n        }\n\n        std::vector<Real> wVector(n);\n        herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), eReal.Buffer(), wVector.data(), \n          ZReal.Buffer(), ZReal.LDim(), w.ColComm(), int(il), int(iu) );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n    }\n    herm_eig::Sort( w, ZReal, sort );\n    for( Int jLoc=0; jLoc<ZReal.Width(); ++jLoc )\n        for( Int i=0; i<n; ++i )\n            Z.SetLocal( i, jLoc, y.GetLocal(i,0)*ZReal.GetLocal(i,jLoc) );\n}\n\ntemplate<typename F,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3,Dist U4,Dist V4>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Base<F>,U1,V1  >& d,\n  const DistMatrix<F,      U2,V2  >& e,\n        DistMatrix<Base<F>,U3,STAR>& w, \n        DistMatrix<F,      U4,V4  >& Z, Int il, Int iu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    DistMatrix<F,STAR,U3> Z_STAR_U3( Z );\n    HermitianTridiagEig( d, e, w, Z_STAR_U3, il, iu, sort );\n    Z = Z_STAR_U3;\n}\n\n// Return the eigenpairs with eigenvalues in a given interval\n// ==========================================================\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Real>& e, Matrix<Real>& w, Matrix<Real>& Z,\n  Real vl, Real vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    w.Resize( n, 1 );\n    Z.Resize( n, n ); // This can be an unnecessary O(n^2) memory usage\n    const Int k = lapack::SymmetricTridiagEig\n    ( n, d.Buffer(), e.Buffer(), w.Buffer(), Z.Buffer(), Z.LDim(), vl, vu );\n    w.Resize( k, 1 );\n    Z.Resize( n, k );\n    herm_eig::Sort( w, Z, sort );\n}\n\ntemplate<typename Real>\ninline void \nHermitianTridiagEig\n( Matrix<Real>& d, Matrix<Complex<Real>>& e, Matrix<Real>& w, \n  Matrix<Complex<Real>>& Z, Real vl, Real vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    Matrix<Real> eReal( n-1, 1 );\n    Matrix<C> y( n, 1 );\n    y.Set( 0, 0, 1 );\n    for( Int j=0; j<n-1; ++j )\n    {\n        const C psi = e.Get(j,0);\n        const Real psiAbs = Abs(psi);\n        if( psiAbs == Real(0) )\n            y.Set( j+1, 0, 1 );\n        else\n            y.Set( j+1, 0, Polar(Real(1),Arg(psi*y.Get(j,0))) );\n        eReal.Set( j, 0, psiAbs );\n    }\n    Matrix<Real> ZReal;\n    HermitianTridiagEig( d, eReal, w, ZReal, vl, vu, sort );\n    const Int k = w.Height();\n    Z.Resize( n, k );\n    for( Int j=0; j<k; ++j )\n        for( Int i=0; i<n; ++i )\n            Z.Set( i, j, y.Get(i,0)*ZReal.Get(i,j) );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,U1,V1  >& d,\n  const DistMatrix<Real,U2,V2  >& e,\n        DistMatrix<Real,U3,STAR>& w, \n        DistMatrix<Real,STAR,U3>& Z, Real vl, Real vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    const Int n = d.Height();\n    w.AlignCols( 0 );\n    Z.AlignRows( 0 );\n\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<Real,STAR,STAR> e_STAR_STAR( d.Grid() );\n    e_STAR_STAR.Resize( n-1, 1, n );\n    e_STAR_STAR = e;\n    if( w.Participating() )\n    {\n        std::vector<Real> dVector(n), eVector(n), wVector(n);\n        MemCopy( dVector.data(), d_STAR_STAR.Buffer(), n );\n        MemCopy( eVector.data(), e_STAR_STAR.Buffer(), n-1 );\n        auto estimate = herm_tridiag_eig::EigEstimate\n        ( int(n), dVector.data(), eVector.data(), wVector.data(), w.ColComm(),\n          vl, vu );\n        SwapClear( dVector );\n        SwapClear( eVector );\n        const Int kEst = estimate.numGlobalEigenvalues;\n        Z.Resize( n, kEst );\n\n        auto info = herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer(), wVector.data(), \n          Z.Buffer(), Z.LDim(), w.ColComm(), vl, vu );\n        const Int k = info.numGlobalEigenvalues;\n\n        w.Resize( k, 1 );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n        Z.Resize( n, k );\n    }\n    w.MakeConsistent( true );\n    Z.MakeConsistent( true );\n    herm_eig::Sort( w, Z, sort );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,         U1,  V1  >& d,\n  const DistMatrix<Complex<Real>,U2,  V2  >& e,\n        DistMatrix<Real,         U3,  STAR>& w, \n        DistMatrix<Complex<Real>,STAR,U3  >& Z, \n  Real vl, Real vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    typedef Complex<Real> C;\n    const Int n = d.Height();\n    w.AlignCols( 0 );\n    Z.AlignRows( 0 );\n\n    const Grid& g = d.Grid();\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<C,STAR,STAR> e_STAR_STAR( e );\n\n    DistMatrix<Real,STAR,STAR> eReal( g );\n    eReal.Resize( n-1, 1, n );\n    DistMatrix<Real,STAR,U3  > ZReal(g);\n    DistMatrix<C,   STAR,STAR> y(n,1,g);\n    if( w.Participating() )\n    {\n        y.SetLocal(0,0,1);\n        for( Int j=0; j<n-1; ++j )\n        {\n            const C psi = e_STAR_STAR.GetLocal(j,0);\n            const Real psiAbs = Abs(psi);\n            if( psiAbs == Real(0) )\n                y.SetLocal( j+1, 0, 1 );\n            else\n                y.SetLocal( j+1, 0, Polar(Real(1),Arg(psi*y.GetLocal(j,0))) );\n            eReal.SetLocal( j, 0, psiAbs );\n        }\n\n        std::vector<Real> dVector(n), eVector(n), wVector(n);\n        MemCopy( dVector.data(), d_STAR_STAR.Buffer(), n );\n        MemCopy( eVector.data(), eReal.Buffer(), n-1 );\n        auto estimate = herm_tridiag_eig::EigEstimate\n        ( int(n), dVector.data(), eVector.data(), wVector.data(), w.ColComm(),\n          vl, vu );\n        SwapClear( dVector );\n        SwapClear( eVector );\n        const Int kEst = estimate.numGlobalEigenvalues;\n        ZReal.Resize( n, kEst );\n\n        auto info = herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), eReal.Buffer(), wVector.data(), \n          ZReal.Buffer(), ZReal.LDim(), w.ColComm(), vl, vu );\n        const Int k = info.numGlobalEigenvalues;\n\n        w.Resize( k, 1 );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n        ZReal.Resize( n, k );\n        Z.Resize( n, k );\n    }\n    w.MakeConsistent( true );\n    Z.MakeConsistent( true );\n    ZReal.MakeConsistent( true );\n    herm_eig::Sort( w, ZReal, sort );\n    for( Int jLoc=0; jLoc<Z.LocalWidth(); ++jLoc ) \n        for( Int i=0; i<n; ++i )\n            Z.SetLocal( i, jLoc, y.GetLocal(i,0)*ZReal.GetLocal(i,jLoc) );\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3,Dist U4,Dist V4>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Real,U1,V1  >& d,\n  const DistMatrix<Real,U2,V2  >& e,\n        DistMatrix<Real,U3,STAR>& w, \n        DistMatrix<Real,U4,V4  >& Z, Real vl, Real vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    DistMatrix<Real,STAR,U3> Z_STAR_U3( Z );\n    HermitianTridiagEig( d, e, w, Z_STAR_U3, vl, vu, sort );\n    Z = Z_STAR_U3;\n}\n\ntemplate<typename F,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3,Dist U4,Dist V4>\ninline void \nHermitianTridiagEig\n( const DistMatrix<Base<F>,U1,V1  >& d,\n  const DistMatrix<F,      U2,V2  >& e,\n        DistMatrix<Base<F>,U3,STAR>& w, \n        DistMatrix<F,      U4,V4  >& Z, Base<F> vl, Base<F> vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEig\"))\n    DistMatrix<F,STAR,U3> Z_STAR_U3( Z );\n    HermitianTridiagEig( d, e, w, Z_STAR_U3, vl, vu, sort );\n    Z = Z_STAR_U3;\n}\n\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2>\ninline Int\nHermitianTridiagEigEstimate\n( const DistMatrix<Real,U1,V1  >& d,\n  const DistMatrix<Real,U2,V2  >& e,\n        mpi::Comm wColComm, Real vl, Real vu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEigEstimate\"))\n    const Int n = d.Height();\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<Real,STAR,STAR> e_STAR_STAR( d.Grid() );\n    e_STAR_STAR.Resize( n-1, 1, n );\n    e_STAR_STAR = e;\n    std::vector<Real> dVector(n), eVector(n), wVector(n);\n    MemCopy( dVector.data(), d_STAR_STAR.Buffer(), n );\n    MemCopy( eVector.data(), e_STAR_STAR.Buffer(), n-1 );\n    auto estimate = herm_tridiag_eig::EigEstimate\n    ( int(n), dVector.data(), eVector.data(), wVector.data(), wColComm,\n      vl, vu );\n    return estimate.numGlobalEigenvalues;\n}\n\n// Z is assumed to be sufficiently large and properly aligned\ntemplate<typename Real,Dist U1,Dist V1,Dist U2,Dist V2,Dist U3>\ninline void \nHermitianTridiagEigPostEstimate\n( const DistMatrix<Real,U1,V1  >& d,\n  const DistMatrix<Real,U2,V2  >& e,\n        DistMatrix<Real,U3,STAR>& w, \n        DistMatrix<Real,STAR,U3>& Z, Real vl, Real vu, SortType sort )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiagEigPostEstimate\"))\n    const Int n = d.Height();\n    w.AlignCols( 0 );\n    if( Z.RowAlign() != 0 )\n        LogicError(\"Z was not properly aligned\");\n\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<Real,STAR,STAR> e_STAR_STAR( d.Grid() );\n    e_STAR_STAR.Resize( n-1, 1, n );\n    e_STAR_STAR = e;\n    if( w.Participating() )\n    {\n        std::vector<Real> wVector(n);\n        auto info = herm_tridiag_eig::Eig\n        ( int(n), d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer(), wVector.data(), \n          Z.Buffer(), Z.LDim(), w.ColComm(), vl, vu );\n        const Int k = info.numGlobalEigenvalues;\n\n        w.Resize( k, 1 );\n        for( Int iLoc=0; iLoc<w.LocalHeight(); ++iLoc )\n            w.SetLocal( iLoc, 0, wVector[iLoc] );\n        Z.Resize( n, k );\n    }\n    w.MakeConsistent( true );\n    Z.MakeConsistent( true );\n    herm_eig::Sort( w, Z, sort );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAGEIG_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/Polar/QDWH.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_POLAR_QDWH_HPP\n#define ELEM_POLAR_QDWH_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_SCALE_INC\n#include ELEM_GEMM_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_CHOLESKY_INC\n#include ELEM_QR_INC\n#include ELEM_TRIANGULARINVERSE_INC\n#include ELEM_GENERALINVERSE_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_TWONORMESTIMATE_INC\n\n#include ELEM_IDENTITY_INC\n\nnamespace elem {\n\n// Based on Yuji Nakatsukasa's implementation of a QR-based dynamically \n// weighted Halley iteration for the polar decomposition. In particular, this\n// implementation mirrors the routine 'qdwh', which is part of the zip-file\n// available here:\n//     http://www.mathworks.com/matlabcentral/fileexchange/36830\n//\n// No support for row-sorting yet.\n//\n// The careful calculation of the coefficients is due to a suggestion from\n// Gregorio Quintana Orti.\n\nnamespace polar {\n\ntemplate<typename F>\ninline Int \nQDWHInner( Matrix<F>& A, Base<F> sMinUpper, bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"polar::QDWHInner\"))\n    typedef Base<F> Real;\n    typedef Complex<Real> Cpx;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Real oneThird = Real(1)/Real(3);\n    if( m < n )\n        LogicError(\"Height cannot be less than width\");\n\n    const Real eps = lapack::MachineEpsilon<Real>();\n    const Real tol = 5*eps;\n    const Real cubeRootTol = Pow(tol,oneThird);\n    Real L = sMinUpper / Sqrt(Real(n));\n\n    Real frobNormADiff;\n    Matrix<F> ALast, ATemp, C;\n    Matrix<F> Q( m+n, n );\n    Matrix<F> QT, QB;\n    PartitionDown( Q, QT, QB, m );\n    Int numIts=0;\n    while( numIts < maxIts )\n    {\n        ALast = A;\n\n        Real L2;\n        Cpx dd, sqd;\n        if( Abs(1-L) < tol )\n        {\n            L2 = 1;\n            dd = 0;\n            sqd = 1;\n        }\n        else\n        {\n            L2 = L*L;\n            dd = Pow( 4*(1-L2)/(L2*L2), oneThird );\n            sqd = Sqrt( Real(1)+dd );\n        }\n        const Cpx arg = Real(8) - Real(4)*dd + Real(8)*(2-L2)/(L2*sqd);\n        const Real a = (sqd + Sqrt(arg)/Real(2)).real();\n        const Real b = (a-1)*(a-1)/4;\n        const Real c = a+b-1;\n        const Real alpha = a-b/c;\n        const Real beta = b/c;\n\n        L = L*(a+b*L2)/(1+c*L2);\n\n        if( c > 100 )\n        {\n            //\n            // The standard QR-based algorithm\n            //\n            QT = A;\n            Scale( Sqrt(c), QT );\n            MakeIdentity( QB );\n            qr::Explicit( Q, colPiv );\n            Gemm( NORMAL, ADJOINT, F(alpha/Sqrt(c)), QT, QB, F(beta), A );\n        }\n        else\n        {\n            //\n            // Use faster Cholesky-based algorithm since A is well-conditioned\n            //\n            Identity( C, n, n );\n            Herk( LOWER, ADJOINT, F(c), A, F(1), C );\n            Cholesky( LOWER, C );\n            ATemp = A;\n            Trsm( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), C, ATemp );\n            Trsm( RIGHT, LOWER, NORMAL, NON_UNIT, F(1), C, ATemp );\n            Scale( beta, A );\n            Axpy( alpha, ATemp, A );\n        }\n\n        ++numIts;\n        Axpy( F(-1), A, ALast );\n        frobNormADiff = FrobeniusNorm( ALast );\n        if( frobNormADiff <= cubeRootTol && Abs(1-L) <= tol )\n            break;\n    }\n    return numIts;\n}\n\ntemplate<typename F>\ninline Int \nQDWH( Matrix<F>& A, bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"polar::QDWH\"))\n    typedef Base<F> Real;\n    const Real twoEst = TwoNormEstimate( A );\n    Scale( F(1)/twoEst, A );\n\n    // The one-norm of the inverse can be replaced with an estimate which is\n    // a few times cheaper, e.g., via Higham and Tisseur's block algorithm\n    // from \"A Block Algorithm for Matrix 1-Norm Estimation, with an Application\n    // to 1-Norm Pseudospectra\".\n    Real sMinUpper;\n    Matrix<F> Y( A );\n    if( A.Height() > A.Width() )\n    {\n        QR( Y );\n        Y.Resize( A.Width(), A.Width() );\n        MakeTriangular( UPPER, Y );\n        try \n        {\n            TriangularInverse( UPPER, NON_UNIT, Y );\n            sMinUpper = Real(1) / OneNorm( Y );\n        } catch( SingularMatrixException& e ) { sMinUpper = 0; }\n    }\n    else\n    {\n        try \n        {\n            Inverse( Y );\n            sMinUpper = Real(1) / OneNorm( Y );\n        } catch( SingularMatrixException& e ) { sMinUpper = 0; }\n    } \n\n    return QDWHInner( A, sMinUpper, colPiv, maxIts );\n}\n\ntemplate<typename F>\ninline Int \nQDWH( Matrix<F>& A, Matrix<F>& P, bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"polar::QDWH\"))\n    Matrix<F> ACopy( A );\n    const Int numIts = QDWH( A, colPiv, maxIts );\n    Zeros( P, A.Height(), A.Height() );\n    Trrk( LOWER, NORMAL, NORMAL, F(1), A, ACopy, F(0), P );\n    MakeHermitian( LOWER, P );\n    return numIts;\n}\n\ntemplate<typename F>\ninline Int \nQDWHInner\n( DistMatrix<F>& A, Base<F> sMinUpper, bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"polar::QDWHInner\"))\n    typedef Base<F> Real;\n    typedef Complex<Real> Cpx;\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Real oneThird = Real(1)/Real(3);\n    if( m < n )\n        LogicError(\"Height cannot be less than width\");\n\n    const Real eps = lapack::MachineEpsilon<Real>();\n    const Real tol = 5*eps;\n    const Real cubeRootTol = Pow(tol,oneThird);\n    Real L = sMinUpper / Sqrt(Real(n));\n\n    Real frobNormADiff;\n    DistMatrix<F> ALast(g), ATemp(g), C(g);\n    DistMatrix<F> Q( m+n, n, g );\n    DistMatrix<F> QT(g), QB(g);\n    PartitionDown( Q, QT, QB, m );\n    Int numIts=0;\n    while( numIts < maxIts )\n    {\n        ALast = A;\n\n        Real L2;\n        Cpx dd, sqd;\n        if( Abs(1-L) < tol )\n        {\n            L2 = 1;\n            dd = 0;\n            sqd = 1;\n        }\n        else\n        {\n            L2 = L*L;\n            dd = Pow( 4*(1-L2)/(L2*L2), oneThird );\n            sqd = Sqrt( Real(1)+dd );\n        }\n        const Cpx arg = Real(8) - Real(4)*dd + Real(8)*(2-L2)/(L2*sqd);\n        const Real a = (sqd + Sqrt(arg)/Real(2)).real();\n        const Real b = (a-1)*(a-1)/4;\n        const Real c = a+b-1;\n        const Real alpha = a-b/c;\n        const Real beta = b/c;\n\n        L = L*(a+b*L2)/(1+c*L2);\n\n        if( c > 100 )\n        {\n            //\n            // The standard QR-based algorithm\n            //\n            QT = A;\n            Scale( Sqrt(c), QT );\n            MakeIdentity( QB );\n            qr::Explicit( Q, colPiv );\n            Gemm( NORMAL, ADJOINT, F(alpha/Sqrt(c)), QT, QB, F(beta), A );\n        }\n        else\n        {\n            //\n            // Use faster Cholesky-based algorithm since A is well-conditioned\n            //\n            Identity( C, n, n );\n            Herk( LOWER, ADJOINT, F(c), A, F(1), C );\n            Cholesky( LOWER, C );\n            ATemp = A;\n            Trsm( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), C, ATemp );\n            Trsm( RIGHT, LOWER, NORMAL, NON_UNIT, F(1), C, ATemp );\n            Scale( beta, A );\n            Axpy( alpha, ATemp, A );\n        }\n\n        ++numIts;\n        Axpy( F(-1), A, ALast );\n        frobNormADiff = FrobeniusNorm( ALast );\n        if( frobNormADiff <= cubeRootTol && Abs(1-L) <= tol )\n            break;\n    }\n    return numIts;\n}\n\ntemplate<typename F>\ninline Int \nQDWH( DistMatrix<F>& A, bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"polar::QDWH\"))\n    typedef Base<F> Real;\n    const Real twoEst = TwoNormEstimate( A );\n    Scale( F(1)/twoEst, A );\n\n    // The one-norm of the inverse can be replaced with an estimate which is\n    // a few times cheaper, e.g., via Higham and Tisseur's block algorithm\n    // from \"A Block Algorithm for Matrix 1-Norm Estimation, with an Application\n    // to 1-Norm Pseudospectra\".\n    Real sMinUpper;\n    DistMatrix<F> Y( A );\n    if( A.Height() > A.Width() )\n    {\n        QR( Y );\n        Y.Resize( A.Width(), A.Width() );\n        MakeTriangular( UPPER, Y );\n        try\n        {\n            TriangularInverse( UPPER, NON_UNIT, Y );\n            sMinUpper = Real(1) / OneNorm( Y );\n        } catch( SingularMatrixException& e ) { sMinUpper = 0; }\n    }\n    else\n    {\n        try\n        {\n            Inverse( Y );\n            sMinUpper = Real(1) / OneNorm( Y );\n        } catch( SingularMatrixException& e ) { sMinUpper = 0; }\n    }\n\n    return QDWHInner( A, sMinUpper, colPiv, maxIts );\n}\n\ntemplate<typename F>\ninline Int \nQDWH( DistMatrix<F>& A, DistMatrix<F>& P, bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"polar::QDWH\"))\n    DistMatrix<F> ACopy( A );\n    const Int numIts = QDWH( A, colPiv, maxIts );\n    Zeros( P, A.Height(), A.Height() );\n    Trrk( LOWER, NORMAL, NORMAL, F(1), A, ACopy, F(0), P );\n    MakeHermitian( LOWER, P );\n    return numIts;\n}\n\n} // namespace polar\n\nnamespace herm_polar {\n\ntemplate<typename F>\ninline int\nQDWHInner\n( UpperOrLower uplo, Matrix<F>& A, Base<F> sMinUpper, \n  bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_polar::QDWH\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Height must be same as width\");\n\n    typedef Base<F> Real;\n    typedef Complex<Real> Cpx;\n    const Int n = A.Height();\n    const Real oneThird = Real(1)/Real(3);\n\n    const Real eps = lapack::MachineEpsilon<Real>();\n    const Real tol = 5*eps;\n    const Real cubeRootTol = Pow(tol,oneThird);\n    Real L = sMinUpper / Sqrt(Real(n));\n\n    Real frobNormADiff;\n    Matrix<F> ALast, ATemp, C;\n    Matrix<F> Q( 2*n, n );\n    Matrix<F> QT, QB;\n    PartitionDown( Q, QT, QB, n );\n    Int numIts=0;\n    while( numIts < maxIts )\n    {\n        ALast = A;\n\n        Real L2;\n        Cpx dd, sqd;\n        if( Abs(1-L) < tol )\n        {\n            L2 = 1;\n            dd = 0;\n            sqd = 1;\n        }\n        else\n        {\n            L2 = L*L;\n            dd = Pow( 4*(1-L2)/(L2*L2), oneThird );\n            sqd = Sqrt( Real(1)+dd );\n        }\n        const Cpx arg = Real(8) - Real(4)*dd + Real(8)*(2-L2)/(L2*sqd);\n        const Real a = (sqd + Sqrt(arg)/Real(2)).real();\n        const Real b = (a-1)*(a-1)/4;\n        const Real c = a+b-1;\n        const Real alpha = a-b/c;\n        const Real beta = b/c;\n\n        L = L*(a+b*L2)/(1+c*L2);\n\n        if( c > 100 )\n        {\n            //\n            // The standard QR-based algorithm\n            //\n            MakeHermitian( uplo, A );\n            QT = A;\n            Scale( Sqrt(c), QT );\n            MakeIdentity( QB );\n            qr::Explicit( Q, colPiv );\n            Trrk( uplo, NORMAL, ADJOINT, F(alpha/Sqrt(c)), QT, QB, F(beta), A );\n        }\n        else\n        {\n            //\n            // Use faster Cholesky-based algorithm since A is well-conditioned\n            //\n            // TODO: Think of how to better exploit the symmetry of A,\n            //       e.g., by halving the work in the first Herk through \n            //       a custom routine for forming L^2, where L is strictly lower\n            MakeHermitian( uplo, A );\n            Identity( C, n, n );\n            Herk( LOWER, ADJOINT, F(c), A, F(1), C );\n            Cholesky( LOWER, C );\n            ATemp = A;\n            Trsm( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), C, ATemp );\n            Trsm( RIGHT, LOWER, NORMAL, NON_UNIT, F(1), C, ATemp );\n            Scale( beta, A );\n            Axpy( alpha, ATemp, A );\n        }\n\n        Axpy( F(-1), A, ALast );\n        frobNormADiff = HermitianFrobeniusNorm( uplo, ALast );\n\n        ++numIts;\n        if( frobNormADiff <= cubeRootTol && Abs(1-L) <= tol )\n            break;\n    }\n\n    MakeHermitian( uplo, A );\n    return numIts;\n}\n\ntemplate<typename F>\ninline Int \nQDWH( UpperOrLower uplo, Matrix<F>& A, bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_polar::QDWH\"))\n    typedef Base<F> Real;\n    MakeHermitian( uplo, A );\n    const Real twoEst = TwoNormEstimate( A );\n    Scale( F(1)/twoEst, A );\n\n    // The one-norm of the inverse can be replaced with an estimate which is\n    // a few times cheaper, e.g., via Higham and Tisseur's block algorithm\n    // from \"A Block Algorithm for Matrix 1-Norm Estimation, with an Application\n    // to 1-Norm Pseudospectra\".\n    Real sMinUpper;\n    Matrix<F> Y( A );\n    try\n    {\n        Inverse( Y );\n        sMinUpper = Real(1) / OneNorm( Y );\n    } catch( SingularMatrixException& e ) { sMinUpper = 0; }\n\n    return QDWHInner( uplo, A, sMinUpper, colPiv, maxIts );\n}\n\ntemplate<typename F>\ninline Int\nQDWH\n( UpperOrLower uplo, Matrix<F>& A, Matrix<F>& P,\n  bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_polar::QDWH\"))\n    Matrix<F> ACopy( A );\n    // NOTE: This might be avoidable\n    MakeHermitian( uplo, ACopy );\n    const Int numIts = QDWH( uplo, A, colPiv, maxIts );\n    Zeros( P, A.Height(), A.Height() );\n    Trrk( uplo, NORMAL, NORMAL, F(1), A, ACopy, F(0), P );\n    return numIts;\n}\n\ntemplate<typename F>\ninline int\nQDWHInner\n( UpperOrLower uplo, DistMatrix<F>& A, Base<F> sMinUpper, \n  bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_polar::QDWH\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Height must be same as width\");\n\n    typedef Base<F> Real;\n    typedef Complex<Real> Cpx;\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    const Real oneThird = Real(1)/Real(3);\n\n    const Real eps = lapack::MachineEpsilon<Real>();\n    const Real tol = 5*eps;\n    const Real cubeRootTol = Pow(tol,oneThird);\n    Real L = sMinUpper / Sqrt(Real(n));\n\n    Real frobNormADiff;\n    DistMatrix<F> ALast(g), ATemp(g), C(g);\n    DistMatrix<F> Q( 2*n, n, g );\n    DistMatrix<F> QT(g), QB(g);\n    PartitionDown( Q, QT, QB, n );\n    Int numIts=0;\n    while( numIts < maxIts )\n    {\n        ALast = A;\n\n        Real L2;\n        Cpx dd, sqd;\n        if( Abs(1-L) < tol )\n        {\n            L2 = 1;\n            dd = 0;\n            sqd = 1;\n        }\n        else\n        {\n            L2 = L*L;\n            dd = Pow( 4*(1-L2)/(L2*L2), oneThird );\n            sqd = Sqrt( Real(1)+dd );\n        }\n        const Cpx arg = Real(8) - Real(4)*dd + Real(8)*(2-L2)/(L2*sqd);\n        const Real a = (sqd + Sqrt(arg)/Real(2)).real();\n        const Real b = (a-1)*(a-1)/4;\n        const Real c = a+b-1;\n        const Real alpha = a-b/c;\n        const Real beta = b/c;\n\n        L = L*(a+b*L2)/(1+c*L2);\n\n        if( c > 100 )\n        {\n            //\n            // The standard QR-based algorithm\n            //\n            MakeHermitian( uplo, A );\n            QT = A;\n            Scale( Sqrt(c), QT );\n            MakeIdentity( QB );\n            qr::Explicit( Q, colPiv );\n            Trrk( uplo, NORMAL, ADJOINT, F(alpha/Sqrt(c)), QT, QB, F(beta), A );\n        }\n        else\n        {\n            //\n            // Use faster Cholesky-based algorithm since A is well-conditioned\n            //\n            // TODO: Think of how to better exploit the symmetry of A,\n            //       e.g., by halving the work in the first Herk through \n            //       a custom routine for forming L^2, where L is strictly lower\n            MakeHermitian( uplo, A );\n            Identity( C, n, n );\n            Herk( LOWER, ADJOINT, F(c), A, F(1), C );\n            Cholesky( LOWER, C );\n            ATemp = A;\n            Trsm( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), C, ATemp );\n            Trsm( RIGHT, LOWER, NORMAL, NON_UNIT, F(1), C, ATemp );\n            Scale( beta, A );\n            Axpy( alpha, ATemp, A );\n        }\n\n        ++numIts;\n        Axpy( F(-1), A, ALast );\n        frobNormADiff = HermitianFrobeniusNorm( uplo, ALast );\n        if( frobNormADiff <= cubeRootTol && Abs(1-L) <= tol )\n            break;\n    }\n    MakeHermitian( uplo, A );\n    return numIts;\n}\n\ntemplate<typename F>\ninline Int \nQDWH( UpperOrLower uplo, DistMatrix<F>& A, bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_polar::QDWH\"))\n    typedef Base<F> Real;\n    MakeHermitian( uplo, A );\n    const Real twoEst = TwoNormEstimate( A );\n    Scale( F(1)/twoEst, A );\n\n    // The one-norm of the inverse can be replaced with an estimate which is\n    // a few times cheaper, e.g., via Higham and Tisseur's block algorithm\n    // from \"A Block Algorithm for Matrix 1-Norm Estimation, with an Application\n    // to 1-Norm Pseudospectra\".\n    Real sMinUpper;\n    DistMatrix<F> Y( A );\n    try \n    {   \n        Inverse( Y );\n        sMinUpper = Real(1) / OneNorm( Y );\n    } catch( SingularMatrixException& e ) { sMinUpper = 0; }\n\n    return QDWHInner( uplo, A, sMinUpper, colPiv, maxIts );\n}\n\ntemplate<typename F>\ninline Int\nQDWH\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<F>& P, \n  bool colPiv=false, Int maxIts=20 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_polar::QDWH\"))\n    DistMatrix<F> ACopy( A );\n    // NOTE: This might be avoidable\n    MakeHermitian( uplo, ACopy );\n    const Int numIts = QDWH( uplo, A, colPiv, maxIts );\n    Zeros( P, A.Height(), A.Height() );\n    Trrk( uplo, NORMAL, NORMAL, F(1), A, ACopy, F(0), P );\n    return numIts;\n}\n\n} // namespace herm_polar\n\n} // namespace elem\n\n#endif // ifndef ELEM_POLAR_QDWH_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/Polar/SVD.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_POLAR_SVD_HPP\n#define ELEM_POLAR_SVD_HPP\n\n#include ELEM_GEMM_INC\n\n#include ELEM_SVD_INC\n\n#include ELEM_HERMITIANFROMEVD_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace polar {\n\n// Compute the polar decomposition of A, A = Q P, where Q is unitary and P is \n// Hermitian positive semi-definite. On exit, A is overwritten with Q.\n\ntemplate<typename F>\ninline void\nSVD( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"polar::SVD\"))\n    // Get the SVD of A\n    typedef Base<F> Real;\n    Matrix<Real> s;\n    Matrix<F> U, V;\n    U = A;\n    elem::SVD( U, s, V );\n\n    // Form Q := U V^H in A\n    Gemm( NORMAL, ADJOINT, F(1), U, V, A );\n}\n\ntemplate<typename F>\ninline void\nSVD( Matrix<F>& A, Matrix<F>& P )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"polar::SVD\"))\n    // Get the SVD of A\n    typedef Base<F> Real;\n    Matrix<Real> s;\n    Matrix<F> U, V;\n    U = A;\n    elem::SVD( U, s, V );\n\n    // Form Q := U V^H in A\n    Gemm( NORMAL, ADJOINT, F(1), U, V, A );\n\n    // Form P := V Sigma V^H in P\n    HermitianFromEVD( LOWER, P, s, V );\n}\n\ntemplate<typename F>\ninline void\nSVD( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"polar::SVD\"))\n    // Get the SVD of A\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    DistMatrix<Real,VR,STAR> s(g);\n    DistMatrix<F> U(g), V(g);\n    U = A;\n    elem::SVD( U, s, V );\n\n    // Form Q := U V^H in A\n    Gemm( NORMAL, ADJOINT, F(1), U, V, A );\n}\n\ntemplate<typename F>\ninline void\nSVD( DistMatrix<F>& A, DistMatrix<F>& P )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"polar::SVD\"))\n    // Get the SVD of A\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    DistMatrix<Real,VR,STAR> s(g);\n    DistMatrix<F> U(g), V(g);\n    U = A;\n    elem::SVD( U, s, V );\n\n    // Form Q := U V^H in A\n    Gemm( NORMAL, ADJOINT, F(1), U, V, A );\n\n    // Form P := V Sigma V^H in P\n    HermitianFromEVD( LOWER, P, s, V );\n}\n\n} // namespace polar\n} // namespace elem\n\n#endif // ifndef ELEM_POLAR_SVD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/Polar.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_POLAR_HPP\n#define ELEM_POLAR_HPP\n\n#include ELEM_SIGN_INC\n\n#include \"./Polar/QDWH.hpp\"\n#include \"./Polar/SVD.hpp\"\n\nnamespace elem {\n\n// Compute the polar decomposition of A, A = Q P, where Q is unitary and P is \n// Hermitian positive semi-definite. On exit, A is overwritten with Q.\n\ntemplate<typename F>\ninline void\nPolar( Matrix<F>& A, Matrix<F>& P )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Polar\"))\n    polar::SVD( A, P );\n}\n\ntemplate<typename F>\ninline void\nPolar( DistMatrix<F>& A, DistMatrix<F>& P )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Polar\"))\n    polar::SVD( A, P );\n}\n\ntemplate<typename F>\ninline void\nHermitianPolar( UpperOrLower uplo, Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianPolar\"))\n    HermitianSign( uplo, A );\n}\n\ntemplate<typename F>\ninline void\nHermitianPolar( UpperOrLower uplo, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianPolar\"))\n    HermitianSign( uplo, A );\n}\n\ntemplate<typename F>\ninline void\nHermitianPolar( UpperOrLower uplo, Matrix<F>& A, Matrix<F>& P )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianPolar\"))\n    HermitianSign( uplo, A, P );\n}\n\ntemplate<typename F>\ninline void\nHermitianPolar( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<F>& P )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianPolar\"))\n    HermitianSign( uplo, A, P );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_POLAR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/SVD/Chan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SVD_CHAN_HPP\n#define ELEM_SVD_CHAN_HPP\n\n#include ELEM_ADJOINT_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SCALE_INC\n#include ELEM_TRMM_INC\n\n#include ELEM_QR_INC\n\n#include \"./GolubReinsch.hpp\"\n\nnamespace elem {\nnamespace svd {\n\ntemplate<typename F>\ninline void\nChanUpper\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V,\n  double heightRatio=1.5 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::ChanUpper\");\n        if( A.Height() < A.Width() )\n            LogicError(\"A must be at least as tall as it is wide\");\n        if( heightRatio <= 1.0 )\n            LogicError(\"Nonsensical switchpoint for SVD\");\n    )\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m > heightRatio*n )\n    {\n        DistMatrix<F> R(g);\n        qr::Explicit( A, R );\n        svd::GolubReinsch( R, s, V );\n        // Unfortunately, extra memory is used in forming A := A R,\n        // where A has been overwritten with the Q from the QR factorization\n        // of the original state of A, and R has been overwritten with the U \n        // from the SVD of the R from the QR factorization of A\n        //\n        // Perhaps this should be broken into pieces.\n        auto ACopy( A );\n        Gemm( NORMAL, NORMAL, F(1), ACopy, R, F(0), A );\n    }\n    else\n    {\n        svd::GolubReinsch( A, s, V );\n    }\n}\n\ntemplate<typename F>\ninline void\nChanUpper\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, double heightRatio=1.2 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::ChanUpper\");    \n        if( heightRatio <= 1.0 )\n            LogicError(\"Nonsensical switchpoint\");\n    )\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m >= heightRatio*n )\n    {\n        QR( A );\n        DistMatrix<F> AT(g), AB(g);\n        PartitionDown( A, AT, AB, n );\n        MakeTriangular( UPPER, AT );\n        GolubReinsch( AT, s );\n    }\n    else\n    {\n        GolubReinsch( A, s );\n    }\n}\n\n//----------------------------------------------------------------------------//\n// Grab the full SVD of the general matrix A, A = U diag(s) V^H using Chan's  //\n// algorithm. On exit, A is overwritten with U.                               //\n//----------------------------------------------------------------------------//\n\ntemplate<typename F>\ninline void\nChan\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V,\n  double heightRatio=1.5 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::Chan\");\n        if( heightRatio <= 1.0 )\n            LogicError(\"Nonsensical switchpoint for SVD\");\n    )\n    // Check if we need to rescale the matrix, and do so if necessary\n    Base<F> scale;\n    bool needRescaling = svd::CheckScale( A, scale );\n    if( needRescaling )\n        Scale( scale, A );\n\n    // TODO: Switch between different algorithms. For instance, starting \n    //       with a QR decomposition of tall-skinny matrices.\n    if( A.Height() >= A.Width() )\n    {\n        svd::ChanUpper( A, s, V, heightRatio );\n    }\n    else\n    {\n        // Explicit formation of the Q from an LQ factorization is not yet\n        // optimized\n        Adjoint( A, V );\n        svd::ChanUpper( V, s, A, heightRatio );\n    }\n\n    // Rescale the singular values if necessary\n    if( needRescaling )\n        Scale( 1/scale, s );\n}\n\n//----------------------------------------------------------------------------//\n// Grab the singular values of the general matrix A.                          //\n//----------------------------------------------------------------------------//\n\ntemplate<typename F>\ninline void\nChan( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, double heightRatio=1.2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::Chan\"))\n    // Check if we need to rescale the matrix, and do so if necessary\n    Base<F> scale;\n    bool needRescaling = svd::CheckScale( A, scale );\n    if( needRescaling )\n        Scale( scale, A );\n\n    // TODO: Switch between different algorithms. For instance, starting \n    //       with a QR decomposition of tall-skinny matrices.\n    if( A.Height() >= A.Width() )\n    {\n        svd::ChanUpper( A, s, heightRatio );\n    }\n    else\n    {\n        // Explicit formation of the Q from an LQ factorization is not yet\n        // optimized\n        DistMatrix<F> AAdj( A.Grid() );\n        Adjoint( A, AAdj );\n        svd::ChanUpper( AAdj, s, heightRatio );\n    }\n\n    // Rescale the singular values if necessary\n    if( needRescaling )\n        Scale( 1/scale, s );\n}\n\n} // namespace svd\n} // namespace elem\n\n#endif // ifndef ELEM_SVD_CHAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/SVD/GolubReinsch.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SVD_GOLUBREINSCH_HPP\n#define ELEM_SVD_GOLUBREINSCH_HPP\n\n#include ELEM_ADJOINT_INC\n#include ELEM_TRANSPOSE_INC\n\n#include ELEM_BIDIAG_INC\n\n#include ELEM_IDENTITY_INC\n#include ELEM_ZEROS_INC\n\n#include \"./Util.hpp\"\n\nnamespace elem {\nnamespace svd {\n\ntemplate<typename F>\ninline void\nGolubReinsch\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::GolubReinsch\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int k = Min( m, n );\n    const Int offdiagonal = ( m>=n ? 1 : -1 );\n    const char uplo = ( m>=n ? 'U' : 'L' );\n    const Grid& g = A.Grid();\n\n    // Bidiagonalize A\n    DistMatrix<F,STAR,STAR> tP( g ), tQ( g );\n    Bidiag( A, tP, tQ );\n\n    // Grab copies of the diagonal and sub/super-diagonal of A\n    auto d_MD_STAR = A.GetRealPartOfDiagonal();\n    auto e_MD_STAR = A.GetRealPartOfDiagonal( offdiagonal );\n\n    // NOTE: lapack::BidiagQRAlg expects e to be of length k\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d_MD_STAR ),\n                               eHat_STAR_STAR( k, 1, g );\n    auto e_STAR_STAR = View( eHat_STAR_STAR, 0, 0, k-1, 1 );\n    e_STAR_STAR = e_MD_STAR;\n\n    // Initialize U and VAdj to the appropriate identity matrices\n    DistMatrix<F,VC,STAR> U_VC_STAR( g );\n    U_VC_STAR.AlignWith( A );\n    Identity( U_VC_STAR, m, k );\n    DistMatrix<F,STAR,VC> VAdj_STAR_VC( g );\n    VAdj_STAR_VC.AlignWith( V );\n    Identity( VAdj_STAR_VC, k, n );\n\n    // Compute the SVD of the bidiagonal matrix and accumulate the Givens\n    // rotations into our local portion of U and VAdj\n    Matrix<F>& ULoc = U_VC_STAR.Matrix();\n    Matrix<F>& VAdjLoc = VAdj_STAR_VC.Matrix();\n    lapack::BidiagQRAlg\n    ( uplo, k, VAdjLoc.Width(), ULoc.Height(),\n      d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer(), \n      VAdjLoc.Buffer(), VAdjLoc.LDim(), \n      ULoc.Buffer(), ULoc.LDim() );\n\n    // Make a copy of A (for the Householder vectors) and pull the necessary \n    // portions of U and VAdj into a standard matrix dist.\n    auto B( A );\n    if( m >= n )\n    {\n        DistMatrix<F> AT(g), AB(g);\n        DistMatrix<F,VC,STAR> UT_VC_STAR(g), UB_VC_STAR(g);\n        PartitionDown( A, AT, AB, n );\n        PartitionDown( U_VC_STAR, UT_VC_STAR, UB_VC_STAR, n );\n        AT = UT_VC_STAR;\n        MakeZeros( AB );\n        Adjoint( VAdj_STAR_VC, V );\n    }\n    else\n    {\n        auto VAdjL_STAR_VC = LockedView( VAdj_STAR_VC, 0, 0, k, m );\n        DistMatrix<F> VT(g), VB(g);\n        PartitionDown( V, VT, VB, m );\n        Adjoint( VAdjL_STAR_VC, VT );\n        MakeZeros( VB );\n    }\n\n    // Backtransform U and V\n    bidiag::ApplyQ( LEFT, NORMAL, B, tQ, A );\n    bidiag::ApplyP( LEFT, NORMAL, B, tP, V );\n\n    // Copy out the appropriate subset of the singular values\n    s = d_STAR_STAR;\n}\n\n#ifdef ELEM_HAVE_FLA_BSVD\ntemplate<typename F>\ninline void\nGolubReinschFlame\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::GolubReinschFlame\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int k = Min( m, n );\n    const Int offdiagonal = ( m>=n ? 1 : -1 );\n    const Grid& g = A.Grid();\n\n    // Bidiagonalize A\n    DistMatrix<F,STAR,STAR> tP(g), tQ(g);\n    Bidiag( A, tP, tQ );\n\n    // Grab copies of the diagonal and sub/super-diagonal of A\n    auto d_MD_STAR = A.GetRealPartOfDiagonal();\n    auto e_MD_STAR = A.GetRealPartOfDiagonal( offdiagonal );\n\n    // In order to use serial QR kernels, we need the full bidiagonal matrix\n    // on each process\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d_MD_STAR ),\n                               e_STAR_STAR( e_MD_STAR );\n\n    // Initialize U and VAdj to the appropriate identity matrices\n    DistMatrix<F,VC,STAR> U_VC_STAR(g), V_VC_STAR(g);\n    U_VC_STAR.AlignWith( A );\n    V_VC_STAR.AlignWith( V );\n    Identity( U_VC_STAR, m, k );\n    Identity( V_VC_STAR, n, k );\n\n    // Since libFLAME, to the best of my current knowledge, only supports the\n    // upper-bidiagonal case, we may instead work with the adjoint in the \n    // lower-bidiagonal case.\n    if( m >= n )\n    {\n        FlaBidiagSVD\n        ( k, U_VC_STAR.LocalHeight(), V_VC_STAR.LocalHeight(),\n          d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer(),\n          U_VC_STAR.Buffer(), U_VC_STAR.LDim(),\n          V_VC_STAR.Buffer(), V_VC_STAR.LDim() );\n    }\n    else\n    {\n        FlaBidiagSVD\n        ( k, V_VC_STAR.LocalHeight(), U_VC_STAR.LocalHeight(),\n          d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer(),\n          V_VC_STAR.Buffer(), V_VC_STAR.LDim(),\n          U_VC_STAR.Buffer(), U_VC_STAR.LDim() );\n    }\n\n    // Make a copy of A (for the Householder vectors) and pull the necessary \n    // portions of U and V into a standard matrix dist.\n    auto B( A );\n    if( m >= n )\n    {\n        auto UT_VC_STAR = LockedView( U_VC_STAR, 0, 0, n, k );\n        DistMatrix<F> AT(g), AB(g);\n        PartitionDown( A, AT, AB, n );\n        AT = UT_VC_STAR;\n        MakeZeros( AB );\n        V = V_VC_STAR;\n    }\n    else\n    {\n        auto VT_VC_STAR = LockedView( V_VC_STAR, 0, 0, m, k );\n        DistMatrix<F> VT(g), VB(g);\n        PartitionDown( V, VT, VB, m );\n        VT = VT_VC_STAR;\n        MakeZeros( VB );\n    }\n\n    // Backtransform U and V\n    bidiag::ApplyQ( LEFT, NORMAL, B, tQ, A );\n    bidiag::ApplyP( LEFT, NORMAL, B, tP, V );\n\n    // Copy out the appropriate subset of the singular values\n    s = d_STAR_STAR;\n}\n\ntemplate<>\ninline void\nGolubReinsch\n( DistMatrix<double>& A, DistMatrix<double,VR,STAR>& s, DistMatrix<double>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::GolubReinsch\"))\n    GolubReinschFlame( A, s, V );\n}\n\ntemplate<>\ninline void\nGolubReinsch\n( DistMatrix<Complex<double>>& A, \n  DistMatrix<double,VR,STAR>& s, DistMatrix<Complex<double>>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::GolubReinsch\"))\n    GolubReinschFlame( A, s, V );\n}\n#endif // HAVE_FLA_BSVD\n\ntemplate<typename F>\ninline void\nGolubReinsch( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::GolubReinsch\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int k = Min( m, n );\n    const Int offdiagonal = ( m>=n ? 1 : -1 );\n    const Grid& g = A.Grid();\n\n    // Bidiagonalize A\n    DistMatrix<F,STAR,STAR> tP(g), tQ(g);\n    Bidiag( A, tP, tQ );\n\n    // Grab copies of the diagonal and sub/super-diagonal of A\n    auto d_MD_STAR = A.GetRealPartOfDiagonal();\n    auto e_MD_STAR = A.GetRealPartOfDiagonal( offdiagonal );\n\n    // In order to use serial DQDS kernels, we need the full bidiagonal matrix\n    // on each process\n    //\n    // NOTE: lapack::BidiagDQDS expects e to be of length k\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d_MD_STAR ),\n                               eHat_STAR_STAR( k, 1, g );\n    auto e_STAR_STAR = View( eHat_STAR_STAR, 0, 0, k-1, 1 );\n    e_STAR_STAR = e_MD_STAR;\n\n    // Compute the singular values of the bidiagonal matrix via DQDS\n    lapack::BidiagDQDS( k, d_STAR_STAR.Buffer(), e_STAR_STAR.Buffer() );\n\n    // Copy out the appropriate subset of the singular values\n    s = d_STAR_STAR;\n}\n\n} // namespace svd\n} // namespace elem\n\n#endif // ifndef ELEM_SVD_GOLUBREINSCH_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/SVD/Thresholded.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SVD_THRESHOLDED_HPP\n#define ELEM_SVD_THRESHOLDED_HPP\n\n#include ELEM_GEMM_INC\n#include ELEM_HERK_INC\n\n#include ELEM_HERMITIANEIG_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_MAXNORM_INC\n\n// TODO: Use a relative-truncated HermitianEig for relative thresholding\n\nnamespace elem {\nnamespace svd {\n\ntemplate<typename F>\ninline void\nTallAbsoluteThresholded\n( Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& V, Base<F> tol=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::TallAbsoluteThresholded\");\n        if( A.Height() < A.Width() )\n            LogicError(\"A must be at least as tall as it is wide\");\n        if( tol < 0 )\n            LogicError(\"negative threshold does not make sense\");\n    )\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Real frobNorm = FrobeniusNorm( A );\n    if( tol == Real(0) )\n    {\n        const Real eps = lapack::MachineEpsilon<Real>();\n        tol = m*frobNorm*eps;\n    }\n    if( tol >= frobNorm )\n    {\n        A.Resize( m, 0 );        \n        s.Resize( 0, 1 );\n        V.Resize( n, 0 );\n        return;\n    }\n\n    // C := A^H A\n    Matrix<F> C;\n    Herk( LOWER, ADJOINT, F(1), A, C );\n\n    // [V,Sigma^2] := eig(C), where each sigma > tol\n    HermitianEig( LOWER, C, s, V, tol*tol, frobNorm*frobNorm );\n    \n    // Sigma := sqrt(Sigma^2)\n    const Int k = s.Height();\n    for( Int i=0; i<k; ++i )\n        s.Set( i, 0, Sqrt(s.Get(i,0)) );\n\n    // Y := A V\n    Matrix<F> Y;\n    Gemm( NORMAL, NORMAL, F(1), A, V, Y );\n\n    // Set each column of A to be the corresponding normalized column of Y\n    // NOTE: A (potentially better) alternative would be to compute the norm of\n    //       each column of A and normalize via it, as it might vary slightly\n    //       from the corresponding computed singular value.\n    A = Y;\n    for( Int j=0; j<k; ++j )\n    {\n        const Real sigma = s.Get( j, 0 );\n        for( Int i=0; i<m; ++i )\n            A.Set( i, j, A.Get(i,j)/sigma );\n    }\n}\n\ntemplate<typename F>\ninline void\nTallRelativeThresholded\n( Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& V, Base<F> relTol )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::TallRelativeThresholded\");\n        if( A.Height() < A.Width() )\n            LogicError(\"A must be at least as tall as it is wide\");\n        if( relTol < 0 )\n            LogicError(\"negative threshold does not make sense\");\n    )\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    // C := A^H A\n    Matrix<F> C;\n    Herk( LOWER, ADJOINT, F(1), A, C );\n\n    // [V,Sigma^2] := eig(C)\n    HermitianEig( LOWER, C, s, V, DESCENDING );\n    const Real twoNorm = Sqrt(MaxNorm(s));\n    \n    // Sigma := sqrt(Sigma^2), where all sigmas > relTol*twoNorm\n    for( Int i=0; i<n; ++i )\n    {\n        const Real sigma = Sqrt(s.Get(i,0));\n        if( sigma <= relTol*twoNorm )\n        {\n            s.Resize( i, 1 );\n            V.Resize( n, i );\n            break;\n        }\n        else\n            s.Set( i, 0, sigma );\n    }\n    const int k = s.Height();\n\n    // Y := A V\n    Matrix<F> Y;\n    Gemm( NORMAL, NORMAL, F(1), A, V, Y );\n\n    // Set each column of A to be the corresponding normalized column of Y\n    // NOTE: A (potentially better) alternative would be to compute the norm of\n    //       each column of A and normalize via it, as it might vary slightly\n    //       from the corresponding computed singular value.\n    A = Y;\n    for( Int j=0; j<k; ++j )\n    {\n        const Real sigma = s.Get( j, 0 );\n        for( Int i=0; i<m; ++i )\n            A.Set( i, j, A.Get(i,j)/sigma );\n    }\n}\n\ntemplate<typename F>\ninline void\nTallThresholded\n( Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& V, \n  Base<F> tol=0, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::TallThresholded\"))\n    if( relative )\n        TallRelativeThresholded( A, s, V, tol );\n    else\n        TallAbsoluteThresholded( A, s, V, tol );\n}\n\ntemplate<typename F>\ninline void\nTallAbsoluteThresholded\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V,\n  Base<F> tol=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::TallAbsoluteThresholded\");\n        if( A.Height() < A.Width() )\n            LogicError(\"A must be at least as tall as it is wide\");\n        if( tol < 0 )\n            LogicError(\"negative threshold does not make sense\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Real frobNorm = FrobeniusNorm( A );\n    if( tol == Real(0) )\n    {\n        const Real eps = lapack::MachineEpsilon<Real>();\n        tol = m*frobNorm*eps;\n    }\n    if( tol >= frobNorm )\n    {\n        A.Resize( m, 0 );        \n        s.Resize( 0, 1 );\n        V.Resize( n, 0 );\n        return;\n    }\n\n    // C := A^H A\n    DistMatrix<F> C(g);\n    Herk( LOWER, ADJOINT, F(1), A, C );\n\n    // [V,Sigma^2] := eig(C), where each sigma > tol\n    HermitianEig( LOWER, C, s, V, tol*tol, frobNorm*frobNorm );\n    \n    // Sigma := sqrt(Sigma^2)\n    {\n        const Int localHeight = s.LocalHeight();\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            s.SetLocal( iLoc, 0, Sqrt(s.GetLocal(iLoc,0)) );\n    }\n\n    // Y := A V\n    DistMatrix<F> Y(g);\n    Gemm( NORMAL, NORMAL, F(1), A, V, Y );\n\n    // Set each column of A to be the corresponding normalized column of Y\n    // NOTE: A (potentially better) alternative would be to compute the norm of\n    //       each column of A and normalize via it, as it might vary slightly\n    //       from the corresponding computed singular value.\n    A = Y;\n    {\n        DistMatrix<Real,MR,STAR> s_MR_STAR(g);\n        s_MR_STAR.AlignWith( A.DistData() );\n        s_MR_STAR = s;\n        const Int localWidth = A.LocalWidth();\n        const Int localHeight = A.LocalHeight();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Real sigma = s_MR_STAR.GetLocal( jLoc, 0 );\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                A.SetLocal( iLoc, jLoc, A.GetLocal(iLoc,jLoc)/sigma );\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nTallRelativeThresholded\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V,\n  Base<F> relTol )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::TallRelativeThresholded\");\n        if( A.Height() < A.Width() )\n            LogicError(\"A must be at least as tall as it is wide\");\n        if( relTol < 0 )\n            LogicError(\"negative threshold does not make sense\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Width();\n\n    // C := A^H A\n    DistMatrix<F> C(g);\n    Herk( LOWER, ADJOINT, F(1), A, C );\n\n    // [V,Sigma^2] := eig(C)\n    HermitianEig( LOWER, C, s, V, DESCENDING );\n    const Real twoNorm = Sqrt(MaxNorm(s));\n\n    // Sigma := sqrt(Sigma^2), where all sigmas > relTol*twoNorm\n    DistMatrix<Real,STAR,STAR> s_STAR_STAR( s );\n    for( Int i=0; i<n; ++i )\n    {\n        const Real sigma = Sqrt(s_STAR_STAR.GetLocal(i,0));\n        if( sigma <= relTol*twoNorm )\n        {\n            s_STAR_STAR.Resize( i, 1 );\n            V.Resize( n, i );\n            break;\n        }\n        else\n            s_STAR_STAR.SetLocal( i, 0, sigma );\n    }\n    s = s_STAR_STAR;\n\n    // Y := A V\n    DistMatrix<F> Y(g);\n    Gemm( NORMAL, NORMAL, F(1), A, V, Y );\n\n    // Set each column of A to be the corresponding normalized column of Y\n    // NOTE: A (potentially better) alternative would be to compute the norm of\n    //       each column of A and normalize via it, as it might vary slightly\n    //       from the corresponding computed singular value.\n    A = Y;\n    {\n        DistMatrix<Real,MR,STAR> s_MR_STAR(g);\n        s_MR_STAR.AlignWith( A.DistData() );\n        s_MR_STAR = s_STAR_STAR;\n        const Int localWidth = A.LocalWidth();\n        const Int localHeight = A.LocalHeight();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Real sigma = s_MR_STAR.GetLocal( jLoc, 0 );\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                A.SetLocal( iLoc, jLoc, A.GetLocal(iLoc,jLoc)/sigma );\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nTallThresholded\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V,\n  Base<F> tol=0, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::TallThresholded\"))\n    if( relative )\n        TallRelativeThresholded( A, s, V, tol );\n    else\n        TallAbsoluteThresholded( A, s, V, tol );\n}\n\ntemplate<typename F>\ninline void\nTallAbsoluteThresholded\n( DistMatrix<F,VC,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& s, \n  DistMatrix<F,STAR,STAR>& V,\n  Base<F> tol=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::TallAbsoluteThresholded\");\n        if( A.Height() < A.Width() )\n            LogicError(\"A must be at least as tall as it is wide\");\n        if( tol < 0 )\n            LogicError(\"negative threshold does not make sense\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Real frobNorm = FrobeniusNorm( A );\n    if( tol == Real(0) )\n    {\n        const Real eps = lapack::MachineEpsilon<Real>();\n        tol = m*frobNorm*eps;\n    }\n    if( tol >= frobNorm )\n    {\n        A.Resize( m, 0 );        \n        s.Resize( 0, 1 );\n        V.Resize( n, 0 );\n        return;\n    }\n\n    // C := A^H A\n    DistMatrix<F,STAR,STAR> C(g);\n    Zeros( C, n, n );\n    Herk( LOWER, ADJOINT, F(1), A.LockedMatrix(), F(0), C.Matrix() );\n    C.SumOver( A.ColComm() );\n\n    // [V,Sigma^2] := eig(C), where each sigma > tol\n    HermitianEig( LOWER, C, s, V, tol*tol, frobNorm*frobNorm );\n    const int k = s.Height();\n    \n    // Sigma := sqrt(Sigma^2)\n    for( Int i=0; i<k; ++i )\n        s.SetLocal( i, 0, Sqrt(s.GetLocal(i,0)) );\n\n    // Y := A V\n    DistMatrix<F,VC,STAR> Y(g);\n    Y.AlignWith( A );\n    Zeros( Y, m, k );\n    LocalGemm( NORMAL, NORMAL, F(1), A, V, F(0), Y );\n\n    // Set each column of A to be the corresponding normalized column of Y\n    // NOTE: A (potentially better) alternative would be to compute the norm of\n    //       each column of A and normalize via it, as it might vary slightly\n    //       from the corresponding computed singular value.\n    A = Y;\n    {\n        const Int localHeight = A.LocalHeight();\n        for( Int j=0; j<k; ++j )\n        {\n            const Real sigma = s.GetLocal( j, 0 );\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                A.SetLocal( iLoc, j, A.GetLocal(iLoc,j)/sigma );\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nTallRelativeThresholded\n( DistMatrix<F,VC,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& s, \n  DistMatrix<F,STAR,STAR>& V,\n  Base<F> relTol )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::TallRelativeThresholded\");\n        if( A.Height() < A.Width() )\n            LogicError(\"A must be at least as tall as it is wide\");\n        if( relTol < 0 )\n            LogicError(\"negative threshold does not make sense\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    // C := A^H A\n    DistMatrix<F,STAR,STAR> C(g);\n    Zeros( C, n, n );\n    Herk( LOWER, ADJOINT, F(1), A.LockedMatrix(), F(0), C.Matrix() );\n    C.SumOver( A.ColComm() );\n\n    // [V,Sigma^2] := eig(C)\n    HermitianEig( LOWER, C, s, V, DESCENDING );\n    const Real twoNorm = Sqrt(MaxNorm(s));\n    \n    // Sigma := sqrt(Sigma^2), where each sigma > twoNorm*relTol\n    for( Int i=0; i<n; ++i )\n    {\n        const Real sigma = Sqrt(s.GetLocal(i,0));\n        if( sigma < relTol*twoNorm )\n        {\n            s.Resize( i, 1 );\n            V.Resize( n, i );\n            break;\n        }\n        else\n            s.SetLocal( i, 0, sigma );\n    }\n    const int k = s.Height();\n\n    // Y := A V\n    DistMatrix<F,VC,STAR> Y(g);\n    Y.AlignWith( A );\n    Zeros( Y, m, k );\n    LocalGemm( NORMAL, NORMAL, F(1), A, V, F(0), Y );\n\n    // Set each column of A to be the corresponding normalized column of Y\n    // NOTE: A (potentially better) alternative would be to compute the norm of\n    //       each column of A and normalize via it, as it might vary slightly\n    //       from the corresponding computed singular value.\n    A = Y;\n    {\n        const Int localHeight = A.LocalHeight();\n        for( Int j=0; j<k; ++j )\n        {\n            const Real sigma = s.GetLocal( j, 0 );\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                A.SetLocal( iLoc, j, A.GetLocal(iLoc,j)/sigma );\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nTallThresholded\n( DistMatrix<F,VC,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& s, \n  DistMatrix<F,STAR,STAR>& V,\n  Base<F> tol=0, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::TallThresholded\"))\n    if( relative )\n        TallRelativeThresholded( A, s, V, tol );\n    else\n        TallAbsoluteThresholded( A, s, V, tol );\n}\n\ntemplate<typename F>\ninline void\nWideAbsoluteThresholded\n( Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& V, Base<F> tol=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::WideAbsoluteThresholded\");\n        if( A.Width() < A.Height() )\n            LogicError(\"A must be at least as wide as it is tall\");\n        if( tol < 0 )\n            LogicError(\"negative threshold does not make sense\");\n    )\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Real frobNorm = FrobeniusNorm( A );\n    if( tol == Real(0) )\n    {\n        const Real eps = lapack::MachineEpsilon<Real>();\n        tol = n*frobNorm*eps;\n    }\n    if( tol >= frobNorm )\n    {\n        A.Resize( m, 0 );        \n        s.Resize( 0, 1 );\n        V.Resize( n, 0 );\n        return;\n    }\n\n    // C := A A^H\n    Matrix<F> C;\n    Herk( LOWER, NORMAL, F(1), A, C );\n\n    // [U,Sigma^2] := eig(C), where each sigma > tol\n    Matrix<F> U;\n    HermitianEig( LOWER, C, s, U, tol*tol, frobNorm*frobNorm );\n    \n    // Sigma := sqrt(Sigma^2)\n    const Int k = s.Height();\n    for( Int i=0; i<k; ++i )\n        s.Set( i, 0, Sqrt(s.Get(i,0)) );\n\n    // (Sigma V) := A^H U\n    Gemm( ADJOINT, NORMAL, F(1), A, U, V );\n\n    // Divide each column of (Sigma V) by sigma\n    // NOTE: A (potentially better) alternative would be to compute the norm of\n    //       each column of V and normalize via it, as it might vary slightly\n    //       from the corresponding computed singular value.\n    for( Int j=0; j<k; ++j )\n    {\n        const Real sigma = s.Get( j, 0 );\n        for( Int i=0; i<n; ++i )\n            V.Set( i, j, V.Get(i,j)/sigma );\n    }\n    A = U;\n}\n\ntemplate<typename F>\ninline void\nWideRelativeThresholded\n( Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& V, Base<F> relTol )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::WideThresholded\");\n        if( A.Width() < A.Height() )\n            LogicError(\"A must be at least as wide as it is tall\");\n        if( relTol < 0 )\n            LogicError(\"negative threshold does not make sense\");\n    )\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    // C := A A^H\n    Matrix<F> C;\n    Herk( LOWER, NORMAL, F(1), A, C );\n\n    // [U,Sigma^2] := eig(C)\n    Matrix<F> U;\n    HermitianEig( LOWER, C, s, U, DESCENDING );\n    const Real twoNorm = Sqrt(MaxNorm(s));\n    \n    // Sigma := sqrt(Sigma^2), where each sigma > relTol*twoNorm\n    for( Int i=0; i<m; ++i )\n    {\n        const Real sigma = Sqrt(s.Get(i,0));\n        if( sigma <= relTol*twoNorm )\n        {\n            s.Resize( i, 1 );\n            U.Resize( m, i );\n            break;\n        }\n        else\n            s.Set( i, 0, sigma );\n    }\n    const Int k = s.Height();\n\n    // (Sigma V) := A^H U\n    Gemm( ADJOINT, NORMAL, F(1), A, U, V );\n\n    // Divide each column of (Sigma V) by sigma\n    // NOTE: A (potentially better) alternative would be to compute the norm of\n    //       each column of V and normalize via it, as it might vary slightly\n    //       from the corresponding computed singular value.\n    for( Int j=0; j<k; ++j )\n    {\n        const Real sigma = s.Get( j, 0 );\n        for( Int i=0; i<n; ++i )\n            V.Set( i, j, V.Get(i,j)/sigma );\n    }\n    A = U;\n}\n\ntemplate<typename F>\ninline void\nWideThresholded\n( Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& V, \n  Base<F> tol=0, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::WideThresholded\"))\n    if( relative )\n        WideRelativeThresholded( A, s, V, tol );\n    else\n        WideAbsoluteThresholded( A, s, V, tol );\n}\n\ntemplate<typename F>\ninline void\nWideAbsoluteThresholded\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V,\n  Base<F> tol=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::WideAbsoluteThresholded\");\n        if( A.Width() < A.Height() )\n            LogicError(\"A must be at least as wide as it is tall\");\n        if( tol < 0 )\n            LogicError(\"negative threshold does not make sense\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Real frobNorm = FrobeniusNorm( A );\n    if( tol == Real(0) )\n    {\n        const Real eps = lapack::MachineEpsilon<Real>();\n        tol = n*frobNorm*eps;\n    }\n    if( tol >= frobNorm )\n    {\n        A.Resize( m, 0 );        \n        s.Resize( 0, 1 );\n        V.Resize( n, 0 );\n        return;\n    }\n\n    // C := A A^H\n    DistMatrix<F> C( g );\n    Herk( LOWER, NORMAL, F(1), A, C );\n\n    // [U,Sigma^2] := eig(C), where each sigma > tol\n    DistMatrix<F> U(g);\n    HermitianEig( LOWER, C, s, U, tol*tol, frobNorm*frobNorm );\n    \n    // Sigma := sqrt(Sigma^2)\n    {\n        const Int localHeight = s.LocalHeight();\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            s.SetLocal( iLoc, 0, Sqrt(s.GetLocal(iLoc,0)) );\n    }\n\n    // (Sigma V) := A^H U\n    Gemm( ADJOINT, NORMAL, F(1), A, U, V );\n\n    // Divide each column of (Sigma V) by sigma\n    // NOTE: A (potentially better) alternative would be to compute the norm of\n    //       each column of V and normalize via it, as it might vary slightly\n    //       from the corresponding computed singular value.\n    {\n        DistMatrix<Real,MR,STAR> s_MR_STAR( g );\n        s_MR_STAR.AlignWith( V.DistData() );\n        s_MR_STAR = s;\n        const Int localWidth = V.LocalWidth();\n        const Int localHeight = V.LocalHeight();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Real sigma = s_MR_STAR.GetLocal( jLoc, 0 );\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                V.SetLocal( iLoc, jLoc, V.GetLocal(iLoc,jLoc)/sigma );\n        }\n    }\n    A = U;\n}\n\ntemplate<typename F>\ninline void\nWideRelativeThresholded\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V,\n  Base<F> relTol )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"svd::WideRelativeThresholded\");\n        if( A.Width() < A.Height() )\n            LogicError(\"A must be at least as wide as it is tall\");\n        if( relTol < 0 )\n            LogicError(\"negative threshold does not make sense\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n\n    // C := A A^H\n    DistMatrix<F> C( g );\n    Herk( LOWER, NORMAL, F(1), A, C );\n\n    // [U,Sigma^2] := eig(C)\n    DistMatrix<F> U(g);\n    HermitianEig( LOWER, C, s, U, DESCENDING );\n    const Real twoNorm = Sqrt(MaxNorm(s));\n    \n    // Sigma := sqrt(Sigma^2), where all sigmas > relTol*twoNorm\n    DistMatrix<Real,STAR,STAR> s_STAR_STAR( s );\n    for( Int i=0; i<m; ++i )\n    {\n        const Real sigma = Sqrt(s_STAR_STAR.GetLocal(i,0));\n        if( sigma <= relTol*twoNorm )\n        {\n            s_STAR_STAR.Resize( i, 1 );\n            U.Resize( m, i );\n            break;\n        }\n        else\n            s_STAR_STAR.SetLocal( i, 0, sigma );\n    }\n    s = s_STAR_STAR;\n\n    // (Sigma V) := A^H U\n    Gemm( ADJOINT, NORMAL, F(1), A, U, V );\n\n    // Divide each column of (Sigma V) by sigma\n    // NOTE: A (potentially better) alternative would be to compute the norm of\n    //       each column of V and normalize via it, as it might vary slightly\n    //       from the corresponding computed singular value.\n    {\n        DistMatrix<Real,MR,STAR> s_MR_STAR( g );\n        s_MR_STAR.AlignWith( V.DistData() );\n        s_MR_STAR = s_STAR_STAR;\n        const Int localWidth = V.LocalWidth();\n        const Int localHeight = V.LocalHeight();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Real sigma = s_MR_STAR.GetLocal( jLoc, 0 );\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                V.SetLocal( iLoc, jLoc, V.GetLocal(iLoc,jLoc)/sigma );\n        }\n    }\n    A = U;\n}\n\ntemplate<typename F>\ninline void\nWideThresholded\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V,\n  Base<F> tol=0, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::WideThresholded\"))\n    if( relative )\n        WideRelativeThresholded( A, s, V, tol );\n    else\n        WideAbsoluteThresholded( A, s, V, tol );\n}\n\n// NOTE: [* ,VR] WideThresholded would produce U with different distribution\n//       than A. It makes more sense to overwrite A with V'.\n\ntemplate<typename F>\ninline void\nThresholded\n( Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& V, \n  Base<F> tol=0, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::Thresholded\"))\n    if( A.Height() >= A.Width() )\n        TallThresholded( A, s, V, tol, relative );\n    else\n        WideThresholded( A, s, V, tol, relative );\n}\n\ntemplate<typename F>\ninline void\nThresholded\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V,\n  Base<F> tol=0, bool relative=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::Thresholded\"))\n    if( A.Height() >= A.Width() )\n        TallThresholded( A, s, V, tol, relative );\n    else\n        WideThresholded( A, s, V, tol, relative );\n}\n\n} // namespace svd\n} // namespace elem\n\n#endif // ifndef ELEM_SVD_THRESHOLDED_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/SVD/Util.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SVD_UTIL_HPP\n#define ELEM_SVD_UTIL_HPP\n\n#include ELEM_ADJOINT_INC\n#include ELEM_ONENORM_INC\n\nnamespace elem {\nnamespace svd {\n\ntemplate<typename F>\ninline bool\nCheckScale( DistMatrix<F>& A, Base<F>& scale )\n{\n    scale = 1;\n    typedef Base<F> Real;\n    const Real oneNormOfA = OneNorm( A );\n    const Real safeMin = lapack::MachineSafeMin<Real>();\n    const Real precision = lapack::MachinePrecision<Real>();\n    const Real smallNumber = safeMin/precision;\n    const Real bigNumber = 1/smallNumber;\n    const Real rhoMin = Sqrt(smallNumber);\n    const Real rhoMax = Min( Sqrt(bigNumber), 1/Sqrt(Sqrt(safeMin)) );\n\n    if( oneNormOfA > 0 && oneNormOfA < rhoMin )\n    {\n        scale = rhoMin/oneNormOfA;\n        return true;\n    }\n    else if( oneNormOfA > rhoMax )\n    {\n        scale = rhoMax/oneNormOfA;\n        return true;\n    }\n    else\n        return false;\n}\n\ntemplate<typename F>\ninline void\nDivideAndConquerSVD( Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::DivideAndConquerSVD\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int k = Min(m,n);\n    s.Resize( k, 1 );\n    Matrix<F> U( m, k );\n    Matrix<F> VAdj( k, n );\n    lapack::DivideAndConquerSVD\n    ( m, n, A.Buffer(), A.LDim(), s.Buffer(), U.Buffer(), U.LDim(),\n      VAdj.Buffer(), VAdj.LDim() );\n\n    A = U;\n    Adjoint( VAdj, V );\n}\n\ntemplate<typename F>\ninline void\nQRSVD( Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"svd::QRSVD\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int k = Min(m,n);\n    s.Resize( k, 1 );\n    Matrix<F> U( m, k );\n    Matrix<F> VAdj( k, n );\n    lapack::QRSVD\n    ( m, n, A.Buffer(), A.LDim(), s.Buffer(), U.Buffer(), U.LDim(),\n      VAdj.Buffer(), VAdj.LDim() );\n\n    A = U;\n    Adjoint( VAdj, V );\n}\n\n} // namespace svd\n} // namespace elem\n\n#endif // ifndef ELEM_SVD_UTIL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/SVD.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SVD_HPP\n#define ELEM_SVD_HPP\n\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_HERMITIANEIG_INC\n\n#include \"./SVD/Chan.hpp\"\n#include \"./SVD/Thresholded.hpp\"\n\nnamespace elem {\n\n// Grab the full SVD of the general matrix A, A = U diag(s) V^H\n// ============================================================\n// NOTE: On exit, A is overwritten with U\n\ntemplate<typename F>\ninline void\nSVD( Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& V, bool useQR=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SVD\"))\n    if( useQR )\n        svd::QRSVD( A, s, V );\n    else\n        svd::DivideAndConquerSVD( A, s, V );\n}\n\ntemplate<typename F>\ninline void HermitianSVD\n( UpperOrLower uplo,\n  Matrix<F>& A, Matrix<Base<F>>& s, Matrix<F>& U, Matrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSVD\"))\n#if 1\n    // Grab an eigenvalue decomposition of A\n    HermitianEig( uplo, A, s, V );\n\n    // Copy V into U (flipping the sign as necessary)\n    const Int n = A.Height();\n    U.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n    {\n        const Base<F> sigma = s.Get( j, 0 );\n        F* UCol = U.Buffer( 0, j );\n        const F* VCol = V.LockedBuffer( 0, j );\n        if( sigma >= 0 )\n        {\n            for( Int i=0; i<n; ++i )\n                UCol[i] = VCol[i];\n        }\n        else\n        {\n            for( Int i=0; i<n; ++i )\n                UCol[i] = -VCol[i];\n            s.Set( j, 0, -sigma );\n        }\n    }\n\n    // TODO: Descending sort of triplets\n#else\n    U = A;\n    MakeHermitian( uplo, U );\n    SVD( U, s, V );\n#endif \n}\n\ntemplate<typename F>\ninline void\nSVD\n( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& V,\n  double heightRatio=1.5 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SVD\"))\n    // TODO: Add more options\n    svd::Chan( A, s, V, heightRatio );\n}\n\ntemplate<typename F>\ninline void HermitianSVD\n( UpperOrLower uplo, DistMatrix<F>& A, \n  DistMatrix<Base<F>,VR,STAR>& s, DistMatrix<F>& U, DistMatrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSVD\"))\n    // Grab an eigenvalue decomposition of A\n    HermitianEig( uplo, A, s, V );\n\n    // Redistribute the singular values into an [MR,* ] distribution\n    typedef Base<F> Real;\n    const Grid& grid = A.Grid();\n    DistMatrix<Real,MR,STAR> s_MR_STAR( grid );\n    s_MR_STAR.AlignWith( V.DistData() );\n    s_MR_STAR = s;\n\n    // Copy V into U (flipping the sign as necessary)\n    U.AlignWith( V );\n    U.Resize( V.Height(), V.Width() );\n    const Int localHeight = V.LocalHeight();\n    const Int localWidth = V.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Real sigma = s_MR_STAR.GetLocal( jLoc, 0 );\n        F* UCol = U.Buffer( 0, jLoc );\n        const F* VCol = V.LockedBuffer( 0, jLoc );\n        if( sigma >= 0 )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                UCol[iLoc] = VCol[iLoc];\n        else\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                UCol[iLoc] = -VCol[iLoc];\n    }\n\n    // Set the singular values to the absolute value of the eigenvalues\n    const Int numLocalVals = s.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocalVals; ++iLoc )\n    {\n        const Real sigma = s.GetLocal(iLoc,0);\n        s.SetLocal(iLoc,0,Abs(sigma));\n    }\n\n    // TODO: Descending sort of triplets\n}\n\n// Return the singular values\n// ==========================\n\ntemplate<typename F>\ninline void\nSVD( Matrix<F>& A, Matrix<Base<F>>& s )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SVD\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    s.Resize( Min(m,n), 1 );\n    lapack::SVD( m, n, A.Buffer(), A.LDim(), s.Buffer() );\n}\n\ntemplate<typename F>\ninline void HermitianSVD\n( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& s )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSVD\"))\n#if 1\n    // Grab the eigenvalues of A\n    HermitianEig( uplo, A, s );\n\n    // Set the singular values to the absolute value of the eigenvalues\n    for( Int i=0; i<s.Height(); ++i )\n        s.Set(i,0,Abs(s.Get(i,0)));\n\n    Sort( s, DESCENDING );\n#else\n    MakeHermitian( uplo, A );\n    SVD( A, s );\n#endif \n}\n\ntemplate<typename F>\ninline void\nSVD( DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s, double heightRatio=1.2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SVD\"))\n    // TODO: Add more options\n    svd::Chan( A, s, heightRatio );\n}\n\ntemplate<typename F>\ninline void HermitianSVD\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& s )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSVD\"))\n    // Grab the eigenvalues of A\n    HermitianEig( uplo, A, s );\n\n    // Replace the eigenvalues with their absolute values\n    const Int numLocalVals = s.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocalVals; ++iLoc )\n    {\n        const Base<F> sigma = s.GetLocal(iLoc,0);\n        s.SetLocal(iLoc,0,Abs(sigma));\n    }\n\n    Sort( s, DESCENDING );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SVD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/Schur/CheckReal.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SCHUR_CHECkREAL_HPP\n#define ELEM_SCHUR_CHECkREAL_HPP\n\nnamespace elem {\nnamespace schur {\n\ntemplate<typename Real>\ninline void\nCheckRealSchur( const Matrix<Real>& U, bool standardForm=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CheckRealSchur\")) \n    const Int n = U.Height();\n\n    auto uMain = U.GetDiagonal();\n    auto uSub = U.GetDiagonal( -1 );\n    if( standardForm )\n    {\n        auto uSup = U.GetDiagonal( +1 );\n        for( Int j=0; j<n-1; ++j )\n        {\n            const Real thisDiag = uMain.Get(j,  0);\n            const Real nextDiag = uMain.Get(j+1,0);\n            const Real thisSub = uSub.Get(j,0);\n            const Real thisSup = uSup.Get(j,0);\n            if( uSub.Get(j,0) != Real(0) && thisDiag != nextDiag ) \n                LogicError\n                (\"Diagonal of 2x2 block was not constant: \",thisDiag,\" and \",\n                 nextDiag);\n            if( thisSub*thisSup >= 0 )\n                LogicError(\"b*c >= 0: b=\",thisSup,\" and c=\",thisSub);\n        }\n    }\n\n    if( n < 3 )\n        return;\n    for( Int j=0; j<n-2; ++j )\n    {\n        const Real thisSub = uSub.Get(j,  0);\n        const Real nextSub = uSub.Get(j+1,0);\n        if( thisSub != Real(0) && nextSub != Real(0) )\n            LogicError\n            (\"Quasi-triangular assumption broken at j=\",j,\n             \": subdiagonals were \",thisSub,\" and \",nextSub);\n    }\n}\n\ntemplate<typename Real>\ninline void\nCheckRealSchur( const Matrix<Complex<Real>>& U, bool standardForm=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CheckRealSchur\")) \n    LogicError(\"ChceckRealSchur called for complex matrix\");\n}\n\ntemplate<typename Real>\ninline void\nCheckRealSchur( const DistMatrix<Real>& U, bool standardForm=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CheckRealSchur\")) \n    const Int n = U.Height();\n\n    auto uMain = U.GetDiagonal();\n    auto uSub = U.GetDiagonal( -1 );\n    DistMatrix<Real,STAR,STAR> uMain_STAR_STAR( uMain ),\n                               uSub_STAR_STAR( uSub );\n    if( standardForm )\n    {\n        auto uSup = U.GetDiagonal( +1 );\n        DistMatrix<Real,STAR,STAR> uSup_STAR_STAR( uSup );\n        for( Int j=0; j<n-1; ++j )\n        {\n            const Real thisDiag = uMain_STAR_STAR.Get(j,  0);\n            const Real nextDiag = uMain_STAR_STAR.Get(j+1,0);\n            const Real thisSub = uSub_STAR_STAR.Get(j,0);\n            const Real thisSup = uSup_STAR_STAR.Get(j,0);\n            if( thisSub != Real(0) && thisDiag != nextDiag ) \n                LogicError\n                (\"Diagonal of 2x2 block was not constant: \",thisDiag,\" and \",\n                 nextDiag);\n            if( thisSub*thisSup >= 0 )\n                LogicError(\"b*c >= 0: b=\",thisSup,\" and c=\",thisSub);\n        }\n    }\n\n    if( n < 3 )\n        return;\n    for( Int j=0; j<n-2; ++j )\n    {\n        const Real thisSub = uSub_STAR_STAR.Get(j,  0);\n        const Real nextSub = uSub_STAR_STAR.Get(j+1,0);\n        if( thisSub != Real(0) && nextSub != Real(0) )\n            LogicError\n            (\"Quasi-triangular assumption broken at j=\",j,\n             \": subdiagonals were \",thisSub,\" and \",nextSub);\n    }\n}\n\ntemplate<typename Real>\ninline void\nCheckRealSchur( const DistMatrix<Complex<Real>>& U, bool standardForm=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CheckRealSchur\")) \n    LogicError(\"ChceckRealSchur called for complex matrix\");\n}\n\n} // namespace schur\n} // namespace elem\n\n#endif // ifndef ELEM_SCHUR_CHECkREAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/Schur/InverseFreeSDC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SCHUR_INVERSEFREESDC_HPP\n#define ELEM_SCHUR_INVERSEFREESDC_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_AXPYTRIANGLE_INC\n#include ELEM_SCALE_INC\n#include ELEM_TRACE_INC\n\n#include ELEM_ONENORM_INC\n#include ELEM_QR_INC\n#include ELEM_RQ_INC\n\n#include ELEM_IDENTITY_INC\n#include ELEM_ZEROS_INC\n\n// See Z. Bai, J. Demmel, J. Dongarra, A. Petitet, H. Robinson, and K. Stanley's\n// \"The spectral decomposition of nonsymmetric matrices on distributed memory\n// parallel computers\". Currently available at:\n// www.netlib.org/lapack/lawnspdf/lawn91.pdf\n\nnamespace elem {\nnamespace schur {\n\n//\n// X = [B;A]\n//\n\ntemplate<typename F>\ninline int\nInverseFreeSign( Matrix<F>& X, Int maxIts=100, Base<F> tau=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::InverseFreeSign\"))\n    typedef Base<F> Real;\n    const Int n = X.Width();\n    if( X.Height() != 2*n )\n        LogicError(\"X must be 2n x n\");\n    // Compute the tolerance if it is unset\n    if( tau == Real(0) )\n        tau = n*lapack::MachineEpsilon<Real>();\n\n    // Expose A and B in the original and temporary\n    Matrix<F> XAlt( 2*n, n );\n    Matrix<F> A, B, AAlt, BAlt;\n    PartitionDown( X, B, A, n );\n    PartitionDown( XAlt, BAlt, AAlt, n );\n\n    // Flip the sign of A\n    Scale( F(-1), A );\n\n    // Set up the space for explicitly computing the left half of Q\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    Matrix<F> Q( 2*n, n ), Q12, Q22;\n    PartitionDown( Q, Q12, Q22, n );\n\n    // Run the iterative algorithm\n    Int numIts=0;\n    Matrix<F> R, RLast;\n    while( numIts < maxIts )\n    {\n        XAlt = X;\n        QR( XAlt, t, d );\n \n        // Form the left half of Q\n        MakeZeros( Q12 );\n        MakeIdentity( Q22 );\n        qr::ApplyQ( LEFT, NORMAL, XAlt, t, d, Q );\n\n        // Save a copy of R\n        R = BAlt;\n        MakeTriangular( UPPER, R );\n        \n        // Form the new iterate\n        Gemm( ADJOINT, NORMAL, F(1), Q12, A, F(0), AAlt );\n        Gemm( ADJOINT, NORMAL, F(1), Q22, B, F(0), BAlt );\n        X = XAlt;\n\n        // Use the difference in the iterates to test for convergence\n        ++numIts;\n        if( numIts > 1 )\n        {\n            const Real oneRLast = OneNorm(RLast);     \n            AxpyTriangle( UPPER, F(-1), R, RLast );\n            const Real oneRDiff = OneNorm(RLast);\n            if( oneRDiff <= tau*oneRLast )\n                break;\n        }\n        RLast = R;\n    }\n\n    // Revert the sign of A and return\n    Scale( F(-1), A );\n    return numIts;\n}\n\ntemplate<typename F>\ninline int\nInverseFreeSign( DistMatrix<F>& X, Int maxIts=100, Base<F> tau=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::InverseFreeSign\"))\n    typedef Base<F> Real;\n    const Grid& g = X.Grid();\n    const Int n = X.Width();\n    if( X.Height() != 2*n )\n        LogicError(\"X must be 2n x n\");\n    // Compute the tolerance if it is unset\n    if( tau == Real(0) )\n        tau = n*lapack::MachineEpsilon<Real>();\n\n    // Expose A and B in the original and temporary\n    DistMatrix<F> XAlt( 2*n, n, g );\n    DistMatrix<F> A(g), B(g), AAlt(g), BAlt(g);\n    PartitionDown( X, B, A, n );\n    PartitionDown( XAlt, BAlt, AAlt, n );\n\n    // Flip the sign of A\n    Scale( F(-1), A );\n\n    // Set up the space for explicitly computing the left half of Q\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    DistMatrix<F> Q( 2*n, n, g ), Q12(g), Q22(g);\n    PartitionDown( Q, Q12, Q22, n );\n\n    // Run the iterative algorithm\n    Int numIts=0;\n    DistMatrix<F> R(g), RLast(g);\n    while( numIts < maxIts )\n    {\n        XAlt = X;\n        QR( XAlt, t, d );\n \n        // Form the left half of Q\n        MakeZeros( Q12 );\n        MakeIdentity( Q22 );\n        qr::ApplyQ( LEFT, NORMAL, XAlt, t, d, Q );\n\n        // Save a copy of R\n        R = BAlt;\n        MakeTriangular( UPPER, R );\n        \n        // Form the new iterate\n        Gemm( ADJOINT, NORMAL, F(1), Q12, A, F(0), AAlt );\n        Gemm( ADJOINT, NORMAL, F(1), Q22, B, F(0), BAlt );\n        X = XAlt;\n\n        // Use the difference in the iterates to test for convergence\n        ++numIts;\n        if( numIts > 1 )\n        {\n            const Real oneRLast = OneNorm(RLast);     \n            AxpyTriangle( UPPER, F(-1), R, RLast );\n            const Real oneRDiff = OneNorm(RLast);\n            if( oneRDiff <= tau*oneRLast )\n                break;\n        }\n        RLast = R;\n    }\n\n    // Revert the sign of A and return\n    Scale( F(-1), A );\n    return numIts;\n}\n\ntemplate<typename F>\ninline Base<F>\nInverseFreeSignDivide( Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::InverseFreeSignDivide\"))\n    typedef Base<F> Real;\n    const Int n = X.Width();\n    if( X.Height() != 2*n )\n        LogicError(\"Matrix should be 2n x n\");\n   \n    // Expose A and B, and then copy A\n    Matrix<F> A, B;\n    PartitionDown( X, B, A, n );\n    Matrix<F> ACopy( A );\n\n    // Run the inverse-free alternative to Sign\n    InverseFreeSign( X );\n\n    // Compute the pivoted QR decomp of inv(A + B) A [See LAWN91]\n    // 1) B := A + B \n    // 2) [Q,R,Pi] := QRP(A)\n    // 3) B := Q^H B\n    // 4) [R,Q] := RQ(B)\n    Axpy( F(1), A, B );\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    Matrix<Int> p;\n    QR( A, t, d, p );\n    qr::ApplyQ( LEFT, ADJOINT, A, t, d, B );\n    RQ( B, t, d );\n\n    // A := Q^H A Q\n    A = ACopy;\n    rq::ApplyQ( LEFT, ADJOINT, B, t, d, A );\n    rq::ApplyQ( RIGHT, NORMAL, B, t, d, A );\n\n    // Return || E21 ||1 / || A ||1\n    ValueInt<Real> part = ComputePartition( A );\n    part.value /= OneNorm(ACopy);\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nInverseFreeSignDivide( DistMatrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::InverseFreeSignDivide\"))\n    typedef Base<F> Real;\n    const Grid& g = X.Grid();\n    const Int n = X.Width();\n    if( X.Height() != 2*n )\n        LogicError(\"Matrix should be 2n x n\");\n   \n    // Expose A and B, and then copy A\n    DistMatrix<F> A(g), B(g);\n    PartitionDown( X, B, A, n );\n    DistMatrix<F> ACopy( A );\n\n    // Run the inverse-free alternative to Sign\n    InverseFreeSign( X );\n\n    // Compute the pivoted QR decomp of inv(A + B) A [See LAWN91]\n    // 1) B := A + B \n    // 2) [Q,R,Pi] := QRP(A)\n    // 3) B := Q^H B\n    // 4) [R,Q] := RQ(B)\n    Axpy( F(1), A, B );\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    DistMatrix<Int,VR,STAR> p(g);\n    QR( A, t, d, p );\n    qr::ApplyQ( LEFT, ADJOINT, A, t, d, B );\n    RQ( B, t, d );\n\n    // A := Q^H A Q\n    A = ACopy;\n    rq::ApplyQ( LEFT, ADJOINT, B, t, d, A );\n    rq::ApplyQ( RIGHT, NORMAL, B, t, d, A );\n\n    // Return || E21 ||1 / || A ||1\n    // Return || E21 ||1 / || A ||1\n    ValueInt<Real> part = ComputePartition( A );\n    part.value /= OneNorm(ACopy);\n    return part;\n}\n\n// TODO: RandomizedInverseFreeSignDivide which uses high-level algorithm\n//       of http://parlab.eecs.berkeley.edu/sites/all/parlab/files/Communication%20Avoiding%20Nonsymmetric.pdf\n\n} // namespace schur\n} // namespace elem\n\n#endif // ifndef ELEM_SCHUR_INVERSEFREESDC_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/Schur/QR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SCHUR_QR_HPP\n#define ELEM_SCHUR_QR_HPP\n\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_HESSENBERG_INC\n#include ELEM_IDENTITY_INC\n\nnamespace elem {\nnamespace schur {\n\ntemplate<typename F>\ninline void\nQR( Matrix<F>& A, Matrix<Complex<Base<F>>>& w, bool fullTriangle=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::qr\"))\n    const Int n = A.Height();\n    w.Resize( n, 1 );\n    lapack::Schur( n, A.Buffer(), A.LDim(), w.Buffer(), fullTriangle );\n    if( IsComplex<F>::val )\n        MakeTriangular( UPPER, A );\n    else\n    {\n        MakeTrapezoidal( UPPER, A, -1 );\n        DEBUG_ONLY(CheckRealSchur(A))\n    }\n}\n\ntemplate<typename F>\ninline void\nQR\n( Matrix<F>& A, Matrix<Complex<Base<F>>>& w, Matrix<F>& Q, \n  bool fullTriangle=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::qr\"))\n    const Int n = A.Height();\n    Q.Resize( n, n );\n    w.Resize( n, 1 );\n    lapack::Schur\n    ( n, A.Buffer(), A.LDim(), w.Buffer(), Q.Buffer(), Q.LDim(), fullTriangle );\n    if( IsComplex<F>::val )\n        MakeTriangular( UPPER, A );\n    else\n    {\n        MakeTrapezoidal( UPPER, A, -1 );\n        DEBUG_ONLY(CheckRealSchur(A))\n    }\n}\n\ntemplate<typename F>\ninline void\nQR\n( BlockDistMatrix<F>& A, DistMatrix<Complex<Base<F>>,VR,STAR>& w,\n  bool fullTriangle=false, bool aed=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::qr\"))\n#ifdef ELEM_HAVE_SCALAPACK\n    const Int n = A.Height();\n    const int bhandle = blacs::Handle( A.DistComm().comm );\n    const int context =\n        blacs::GridInit\n        ( bhandle, A.Grid().Order()==COLUMN_MAJOR, \n          A.ColStride(), A.RowStride() );\n    if( A.ColStride() != blacs::GridHeight(context) )\n        LogicError(\"Grid height did not match BLACS\");\n    if( A.RowStride() != blacs::GridWidth(context) )\n        LogicError(\"Grid width did not match BLACS\");\n    if( A.ColRank() != blacs::GridRow(context) )\n        LogicError(\"Grid row did not match BLACS\");\n    if( A.RowRank() != blacs::GridCol(context) )\n        LogicError(\"Grid col did not match BLACS\");\n    auto desca = FillDesc( A, context );\n\n    // Reduce the matrix to upper-Hessenberg form in an elemental form\n    DistMatrix<F> AElem( A );\n    DistMatrix<F,STAR,STAR> t( A.Grid() );\n    Hessenberg( UPPER, AElem, t );\n    MakeTrapezoidal( UPPER, AElem, -1 );\n    A = AElem;\n    if( A.ColStride() != blacs::GridHeight(context) )\n        LogicError(\"Grid height did not match BLACS\");\n    if( A.RowStride() != blacs::GridWidth(context) )\n        LogicError(\"Grid width did not match BLACS\");\n    if( A.ColRank() != blacs::GridRow(context) )\n        LogicError(\"Grid row did not match BLACS\");\n    if( A.RowRank() != blacs::GridCol(context) )\n        LogicError(\"Grid col did not match BLACS\");\n\n    // Run the QR algorithm in block form\n    DistMatrix<Complex<Base<F>>,STAR,STAR> w_STAR_STAR( n, 1, A.Grid() );\n    scalapack::HessenbergSchur\n    ( n, A.Buffer(), desca.data(), w_STAR_STAR.Buffer(), fullTriangle, aed );\n    w = w_STAR_STAR;\n\n    blacs::FreeGrid( context );\n    blacs::FreeHandle( bhandle );\n    blacs::Exit();\n#else\n    LogicError(\"Distributed schur::QR currently requires ScaLAPACK support\");\n#endif\n    if( IsComplex<F>::val )\n        MakeTriangular( UPPER, A );\n    else\n    {\n        MakeTrapezoidal( UPPER, A, -1 );\n        DEBUG_ONLY(CheckRealSchur(A))\n    }\n}\n\ntemplate<typename F>\ninline void\nQR\n( BlockDistMatrix<F>& A, DistMatrix<Complex<Base<F>>,VR,STAR>& w,\n  BlockDistMatrix<F>& Q, bool fullTriangle=true, bool aed=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::qr\"))\n#ifdef ELEM_HAVE_SCALAPACK\n    const Int n = A.Height();\n    const int bhandle = blacs::Handle( A.DistComm().comm );\n    const int context =\n        blacs::GridInit\n        ( bhandle, A.Grid().Order()==COLUMN_MAJOR, \n          A.ColStride(), A.RowStride() );\n    Q.AlignWith( A );\n    Q.Resize( n, n, A.LDim() );\n    if( A.ColStride() != blacs::GridHeight(context) || \n        Q.ColStride() != blacs::GridHeight(context) )\n        LogicError(\"Grid height did not match BLACS\");\n    if( A.RowStride() != blacs::GridWidth(context) || \n        Q.RowStride() != blacs::GridWidth(context) )\n        LogicError(\"Grid width did not match BLACS\");\n    if( A.ColRank() != blacs::GridRow(context) ||\n        Q.ColRank() != blacs::GridRow(context) )\n        LogicError(\"Grid row did not match BLACS\");\n    if( A.RowRank() != blacs::GridCol(context) || \n        Q.RowRank() != blacs::GridCol(context) )\n        LogicError(\"Grid col did not match BLACS\");\n    auto desca = FillDesc( A, context );\n    auto descq = FillDesc( Q, context );\n\n    // Reduce A to upper-Hessenberg form in an element-wise distribution\n    // and form the explicit reflector matrix\n    DistMatrix<F> AElem( A ), QElem( A.Grid() );\n    DistMatrix<F,STAR,STAR> t( A.Grid() );\n    Hessenberg( UPPER, AElem, t );\n    // There is not yet a 'form Q'\n    Identity( QElem, n, n ); \n    hessenberg::ApplyQ( UPPER, LEFT, NORMAL, AElem, t, QElem );\n    MakeTrapezoidal( UPPER, AElem, -1 );\n    A = AElem;\n    Q = QElem;\n    if( A.ColStride() != blacs::GridHeight(context) || \n        Q.ColStride() != blacs::GridHeight(context) )\n        LogicError(\"Grid height did not match BLACS\");\n    if( A.RowStride() != blacs::GridWidth(context) || \n        Q.RowStride() != blacs::GridWidth(context) )\n        LogicError(\"Grid width did not match BLACS\");\n    if( A.ColRank() != blacs::GridRow(context) ||\n        Q.ColRank() != blacs::GridRow(context) )\n        LogicError(\"Grid row did not match BLACS\");\n    if( A.RowRank() != blacs::GridCol(context) || \n        Q.RowRank() != blacs::GridCol(context) )\n        LogicError(\"Grid col did not match BLACS\");\n    \n    // Compute the Schur decomposition in block form, multiplying the \n    // accumulated Householder reflectors from the right\n    DistMatrix<Complex<Base<F>>,STAR,STAR> w_STAR_STAR( n, 1, A.Grid() );\n    const bool multiplyQ = true;\n    scalapack::HessenbergSchur\n    ( n, A.Buffer(), desca.data(), w_STAR_STAR.Buffer(), \n      Q.Buffer(), descq.data(), fullTriangle, multiplyQ, aed );\n    w = w_STAR_STAR;\n\n    blacs::FreeGrid( context );\n    blacs::FreeHandle( bhandle );\n    blacs::Exit();\n#else\n    LogicError(\"Distributed schur::QR currently requires ScaLAPACK support\");\n#endif\n    if( IsComplex<F>::val )\n        MakeTriangular( UPPER, A );\n    else\n    {\n        MakeTrapezoidal( UPPER, A, -1 );\n        DEBUG_ONLY(CheckRealSchur(A))\n    }\n}\n\ntemplate<typename F>\ninline void\nQR\n( DistMatrix<F>& A, DistMatrix<Complex<Base<F>>,VR,STAR>& w, \n  bool fullTriangle=false, bool aed=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::qr\"))\n#ifdef ELEM_HAVE_SCALAPACK\n    // Reduce the matrix to upper-Hessenberg form in an elemental form\n    DistMatrix<F,STAR,STAR> t( A.Grid() );\n    Hessenberg( UPPER, A, t );\n    MakeTrapezoidal( UPPER, A, -1 );\n\n    // Run the QR algorithm in block form\n    // TODO: Create schur::HessenbergQR\n    const Int n = A.Height(); \n    const Int nb = DefaultBlockHeight();\n    BlockDistMatrix<F> ABlock( n, n, A.Grid(), nb, nb );\n    ABlock = A;\n    const int bhandle = blacs::Handle( ABlock.DistComm().comm );\n    const int context =\n        blacs::GridInit\n        ( bhandle, ABlock.Grid().Order()==COLUMN_MAJOR,\n          ABlock.ColStride(), ABlock.RowStride() );\n    if( ABlock.ColStride() != blacs::GridHeight(context) )\n        LogicError(\"Grid height did not match BLACS\");\n    if( ABlock.RowStride() != blacs::GridWidth(context) )\n        LogicError(\"Grid width did not match BLACS\");\n    if( ABlock.ColRank() != blacs::GridRow(context) )\n        LogicError(\"Grid row did not match BLACS\");\n    if( ABlock.RowRank() != blacs::GridCol(context) )\n        LogicError(\"Grid col did not match BLACS\");\n    blacs::Desc desca = FillDesc( ABlock, context );\n    DistMatrix<Complex<Base<F>>,STAR,STAR> w_STAR_STAR( n, 1, A.Grid() );\n    scalapack::HessenbergSchur\n    ( n, ABlock.Buffer(), desca.data(), w_STAR_STAR.Buffer(), \n      fullTriangle, aed );\n    A = ABlock;\n    w = w_STAR_STAR;\n\n    blacs::FreeGrid( context );\n    blacs::FreeHandle( bhandle );\n    blacs::Exit();\n#else\n    LogicError(\"Distributed schur::QR currently requires ScaLAPACK support\");\n#endif\n    if( IsComplex<F>::val )\n        MakeTriangular( UPPER, A );\n    else\n    {\n        MakeTrapezoidal( UPPER, A, -1 );\n        DEBUG_ONLY(CheckRealSchur(A))\n    }\n}\n\ntemplate<typename F>\ninline void\nQR\n( DistMatrix<F>& A, DistMatrix<Complex<Base<F>>,VR,STAR>& w, DistMatrix<F>& Q,\n  bool fullTriangle=true, bool aed=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::qr\"))\n#ifdef ELEM_HAVE_SCALAPACK\n    const Int n = A.Height();\n    // Reduce A to upper-Hessenberg form in an element-wise distribution\n    // and form the explicit reflector matrix\n    DistMatrix<F,STAR,STAR> t( A.Grid() );\n    Hessenberg( UPPER, A, t );\n    // There is not yet a 'form Q'\n    Identity( Q, n, n ); \n    hessenberg::ApplyQ( UPPER, LEFT, NORMAL, A, t, Q );\n    MakeTrapezoidal( UPPER, A, -1 );\n\n    // Run the Hessenberg QR algorithm in block form\n    const Int nb = DefaultBlockHeight();\n    BlockDistMatrix<F> ABlock( n, n, A.Grid(), nb, nb ), \n                       QBlock( n, n, A.Grid(), nb, nb );\n    ABlock = A;\n    QBlock = Q;\n    const int bhandle = blacs::Handle( ABlock.DistComm().comm );\n    const int context =\n        blacs::GridInit\n        ( bhandle, ABlock.Grid().Order()==COLUMN_MAJOR, \n          ABlock.ColStride(), ABlock.RowStride() );\n    if( ABlock.ColStride() != blacs::GridHeight(context) || \n        QBlock.ColStride() != blacs::GridHeight(context) )\n        LogicError(\"Grid height did not match BLACS\");\n    if( ABlock.RowStride() != blacs::GridWidth(context) || \n        QBlock.RowStride() != blacs::GridWidth(context) )\n        LogicError(\"Grid width did not match BLACS\");\n    if( ABlock.ColRank() != blacs::GridRow(context) ||\n        QBlock.ColRank() != blacs::GridRow(context) )\n        LogicError(\"Grid row did not match BLACS\");\n    if( ABlock.RowRank() != blacs::GridCol(context) || \n        QBlock.RowRank() != blacs::GridCol(context) )\n        LogicError(\"Grid col did not match BLACS\");\n    auto desca = FillDesc( ABlock, context );\n    auto descq = FillDesc( QBlock, context );\n\n    // Compute the Schur decomposition in block form, multiplying the \n    // accumulated Householder reflectors from the right\n    DistMatrix<Complex<Base<F>>,STAR,STAR> w_STAR_STAR( n, 1, A.Grid() );\n    const bool multiplyQ = true;\n    scalapack::HessenbergSchur\n    ( n, ABlock.Buffer(), desca.data(), w_STAR_STAR.Buffer(), \n      QBlock.Buffer(), descq.data(), fullTriangle, multiplyQ, aed );\n    A = ABlock;\n    w = w_STAR_STAR;\n    Q = QBlock;\n\n    blacs::FreeGrid( context );\n    blacs::FreeHandle( bhandle );\n    blacs::Exit();\n#else\n    LogicError(\"Distributed schur::QR currently requires ScaLAPACK support\");\n#endif\n    if( IsComplex<F>::val )\n        MakeTriangular( UPPER, A );\n    else\n    {\n        MakeTrapezoidal( UPPER, A, -1 );\n        DEBUG_ONLY(CheckRealSchur(A))\n    }\n}\n\n} // namespace schur\n} // namespace elem\n\n#endif // ifndef ELEM_SCHUR_QR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/Schur/QuasiTriangEig.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SCHUR_QUASITRIANGEIG_HPP\n#define ELEM_SCHUR_QUASITRIANGEIG_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace schur {\n\ntemplate<typename F>\ninline void\nQuasiTriangEig\n( const Matrix<F>& dMain, const Matrix<F>& dSub, const Matrix<F>& dSup,\n  Matrix<Complex<Base<F>>>& w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::QuasiTriangEig\"))\n    const Int n = dMain.Height();\n    Matrix<F> H11(2,2);\n    w.Resize( n, 1 );\n\n    Int j=0;\n    while( j < n )\n    {\n        if( j == n-1 || dSub.Get(j,0) == F(0) )\n        {\n            w.Set( j, 0, dMain.Get(j,0) );\n            ++j;\n        }\n        else\n        {\n            H11.Set( 0, 0, dMain.Get(j,0) );\n            H11.Set( 1, 0, dSub.Get(j,0) );\n            H11.Set( 0, 1, dSup.Get(j,0) );\n            H11.Set( 1, 1, dMain.Get(j+1,0) );\n            lapack::HessenbergEig( 2, H11.Buffer(), H11.LDim(), w.Buffer(j,0) );\n            j += 2;\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nQuasiTriangEig( const Matrix<F>& U, Matrix<Complex<Base<F>>>& w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::QuasiTriangEig\"))\n    auto dMain = U.GetDiagonal();\n    auto dSub = U.GetDiagonal(-1);\n    auto dSup = U.GetDiagonal(+1);\n    QuasiTriangEig( dMain, dSub, dSup, w );\n}\n\ntemplate<typename F>\ninline Matrix<Complex<Base<F>>>\nQuasiTriangEig( const Matrix<F>& U )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::QuasiTriangEig\"))\n    Matrix<Complex<Base<F>>> w;\n    QuasiTriangEig( U, w );\n    return w;\n}\n\ntemplate<typename F,Dist colDist,Dist rowDist>\ninline void\nQuasiTriangEig\n( const DistMatrix<F>& U, DistMatrix<Complex<Base<F>>,colDist,rowDist>& w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::QuasiTriangEig\"))\n    const Grid& g = U.Grid();\n    DistMatrix<F,STAR,STAR> dMain(g), dSub(g), dSup(g);\n    DistMatrix<Complex<Base<F>>,STAR,STAR> w_STAR_STAR(g);\n    dMain = U.GetDiagonal();\n    dSub = U.GetDiagonal(-1);\n    dSup = U.GetDiagonal(+1);\n    w_STAR_STAR.Resize( U.Height(), 1 );\n    QuasiTriangEig\n    ( dMain.Matrix(), dSub.Matrix(), dSup.Matrix(), w_STAR_STAR.Matrix() );\n    w = w_STAR_STAR;\n}\n\ntemplate<typename F>\ninline DistMatrix<Complex<Base<F>>,VR,STAR>\nQuasiTriangEig( const DistMatrix<F>& U )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::QuasiTriangEig\"))\n    DistMatrix<Complex<Base<F>>,VR,STAR> w(U.Grid());\n    QuasiTriangEig( U, w );\n    return w;\n}\n\n} // namespace schur\n} // namespace elem\n\n#endif // ifndef ELEM_SCHUR_QUASITRIANGEIG_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/Schur/RealToComplex.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SCHUR_REALTOCOMPLEX_HPP\n#define ELEM_SCHUR_REALTOCOMPLEX_HPP\n\n#include ELEM_GEMM_INC\n\nnamespace elem {\nnamespace schur {\n\ntemplate<typename Real>\ninline void\nRealToComplex( const Matrix<Real>& UQuasi, Matrix<Complex<Real>>& U )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::RealToComplex\"))\n    DEBUG_ONLY(CheckRealSchur(UQuasi))\n    typedef Complex<Real> C;\n\n    Copy( UQuasi, U );\n    const Int n = U.Height();\n\n    Matrix<C> Q11(2,2), w1(2,1), U01Copy, U12Copy;\n    const bool fullTriangle=true, multiplyQ=false;\n\n    for( Int j=0; j<n-1; ++j )\n    {\n        if( U.Get(j+1,j) != Real(0) )\n        {\n            // Compute the Schur decomposition of the 2x2 block.\n            // TODO: Switch to an analytical formula which exploits the fact\n            //       that the block is in standard real Schur form\n            lapack::HessenbergSchur\n            ( 2, U.Buffer(j,j), U.LDim(), \n              w1.Buffer(), Q11.Buffer(), Q11.LDim(), fullTriangle, multiplyQ );\n            U.Set(j+1,j,0);\n\n            // Apply Q11 from the right\n            auto U01 = ViewRange( U, 0, j, j, j+2 );\n            U01Copy = U01;\n            Gemm( NORMAL, NORMAL, C(1), U01Copy, Q11, C(0), U01 );\n\n            // Apply Q11^H from the left\n            auto U12 = ViewRange( U, j, j+2, j+2, n );\n            U12Copy = U12;\n            Gemm( ADJOINT, NORMAL, C(1), Q11, U12Copy, C(0), U12 );\n        }\n    }\n}\n\ntemplate<typename Real>\ninline void\nRealToComplex( const DistMatrix<Real>& UQuasi, DistMatrix<Complex<Real>>& U )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::RealToComplex\"))\n    DEBUG_ONLY(CheckRealSchur(UQuasi))\n    typedef Complex<Real> C;\n\n    Copy( UQuasi, U );\n    const Int n = U.Height();\n    const Grid& g = U.Grid();\n\n    DistMatrix<C> U01(g), U12(g);\n    DistMatrix<C,STAR,STAR> U11_STAR_STAR(g), Q11(2,2,g), w1(2,1,g);\n    DistMatrix<C,VC,STAR> U01_VC_STAR(g), U01Copy_VC_STAR(g); \n    DistMatrix<C,STAR,VR> U12_STAR_VR(g), U12Copy_STAR_VR(g);\n    const bool fullTriangle=true, multiplyQ=false;\n\n    for( Int j=0; j<n-1; ++j )\n    {\n        if( U.Get(j+1,j) != Real(0) )\n        {\n            // Compute the Schur decomposition of the 2x2 block.\n            // TODO: Switch to an analytical formula. Note that ScaLAPACK\n            //       typically does not return the 2x2 blocks in standard form\n            auto U11 = ViewRange( U, j, j, j+2, j+2 );\n            U11_STAR_STAR = U11;\n            lapack::HessenbergSchur\n            ( 2, U11_STAR_STAR.Buffer(), U11_STAR_STAR.LDim(), \n              w1.Buffer(), Q11.Buffer(), Q11.LDim(), fullTriangle, multiplyQ );\n            U11 = U11_STAR_STAR;\n            U.Set(j+1,j,0);\n\n            // Apply Q11 from the right\n            auto U01 = ViewRange( U, 0, j, j, j+2 );\n            U01_VC_STAR = U01;\n            U01Copy_VC_STAR = U01_VC_STAR;\n\n            LocalGemm\n            ( NORMAL, NORMAL, C(1), U01Copy_VC_STAR, Q11, C(0), U01_VC_STAR );\n            U01 = U01_VC_STAR;\n\n            // Apply Q11^H from the left\n            auto U12 = ViewRange( U, j, j+2, j+2, n );\n            U12_STAR_VR = U12;\n            U12Copy_STAR_VR = U12_STAR_VR;\n            LocalGemm\n            ( ADJOINT, NORMAL, C(1), Q11, U12Copy_STAR_VR, C(0), U12_STAR_VR );\n            U12 = U12_STAR_VR;\n        }\n    }\n}\n\n} // namespace schur\n} // namespace elem\n\n#endif // ifndef ELEM_SCHUR_REALTOCOMPLEX_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/Schur/SDC.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SCHUR_SDC_HPP\n#define ELEM_SCHUR_SDC_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n#include ELEM_UPDATEDIAGONAL_INC\n\n#include ELEM_MEDIAN_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_QR_INC\n#include ELEM_SIGN_INC\n\n#include ELEM_HAAR_INC\n\n// See Z. Bai, J. Demmel, J. Dongarra, A. Petitet, H. Robinson, and K. Stanley's\n// \"The spectral decomposition of nonsymmetric matrices on distributed memory\n// parallel computers\". Currently available at:\n// www.netlib.org/lapack/lawnspdf/lawn91.pdf\n//\n// as well as the improved version, which avoids pivoted QR, in J. Demmel, \n// I. Dumitriu, and O. Holtz, \"Fast linear algebra is stable\", 2007.\n// www.netlib.org/lapack/lawnspdf/lawn186.pdf\n\nnamespace elem {\n\n// TODO: Create SignCtrl and use as a member\ntemplate<typename Real>\nstruct SdcCtrl {\n    Int cutoff;\n    Int maxInnerIts;\n    Int maxOuterIts;\n    Real tol;\n    Real spreadFactor;\n    bool random; \n    bool progress;\n\n    SignCtrl<Real> signCtrl;\n\n    SdcCtrl()\n    : cutoff(256), maxInnerIts(2), maxOuterIts(10),\n      tol(0), spreadFactor(1e-6),\n      random(true), progress(false), signCtrl()\n    { }\n};\n\nnamespace schur {\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nComputePartition( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::ComputePartition\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    if( n == 0 ) \n    {\n        ValueInt<Real> part;\n        part.value = -1;\n        part.index = -1;\n        return part;\n    }\n\n    // Compute the sets of row and column sums\n    std::vector<Real> colSums(n-1,0), rowSums(n-1,0);\n    for( Int j=0; j<n-1; ++j )\n        for( Int i=j+1; i<n; ++i )\n            colSums[j] += Abs( A.Get(i,j) ); \n    for( Int i=1; i<n-1; ++i )\n        for( Int j=0; j<i; ++j )\n            rowSums[i-1] += Abs( A.Get(i,j) );\n\n    // Compute the list of norms and its minimum value/index\n    ValueInt<Real> part;\n    std::vector<Real> norms(n-1);\n    norms[0] = colSums[0];\n    part.value = norms[0];\n    part.index = 1;\n    for( Int j=1; j<n-1; ++j )\n    {\n        norms[j] = norms[j-1] + colSums[j] - rowSums[j-1];\n        if( norms[j] < part.value )\n        {\n            part.value = norms[j];\n            part.index = j+1;\n        }\n    }\n\n    return part;\n}\n\n// The current implementation requires O(n^2/p + n lg p) work. Since the\n// matrix-matrix multiplication alone requires O(n^3/p) work, and n <= p for\n// most practical computations, it is at least O(n^2) work, which should dwarf\n// the O(n lg p) unparallelized component of this algorithm.\ntemplate<typename F>\ninline ValueInt<Base<F>>\nComputePartition( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::ComputePartition\"))\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    if( n == 0 ) \n    {\n        ValueInt<Real> part;\n        part.value = -1;\n        part.index = -1;\n        return part;\n    }\n\n    // Compute the sets of row and column sums\n    std::vector<Real> colSums(n-1,0), rowSums(n-1,0);\n    const Int mLocal = A.LocalHeight();\n    const Int nLocal = A.LocalWidth();\n    for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        if( j < n-1 )\n        {\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                if( i > j )\n                {\n                    colSums[j] += Abs( A.GetLocal(iLoc,jLoc) ); \n                    rowSums[i-1] += Abs( A.GetLocal(iLoc,jLoc) );\n                }\n            }\n        }\n    }\n    mpi::AllReduce( colSums.data(), n-1, g.VCComm() );\n    mpi::AllReduce( rowSums.data(), n-1, g.VCComm() );\n\n    // Compute the list of norms and its minimum value/index\n    // TODO: Think of the proper way to parallelize this if necessary\n    ValueInt<Real> part;\n    std::vector<Real> norms(n-1);\n    norms[0] = colSums[0];\n    part.value = norms[0];\n    part.index = 1;\n    for( Int j=1; j<n-1; ++j )\n    {\n        norms[j] = norms[j-1] + colSums[j] - rowSums[j-1];\n        if( norms[j] < part.value )\n        {\n            part.value = norms[j];\n            part.index = j+1;\n        }\n    }\n\n    return part;\n}\n\n// G should be a rational function of A. If returnQ=true, G will be set to\n// the computed unitary matrix upon exit.\ntemplate<typename F>\ninline ValueInt<Base<F>>\nSignDivide\n( Matrix<F>& A, Matrix<F>& G, bool returnQ, const SdcCtrl<Base<F>>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SignDivide\"))\n\n    // G := sgn(G)\n    // G := 1/2 ( G + I )\n    Sign( G, sdcCtrl.signCtrl );\n    UpdateDiagonal( G, F(1) );\n    Scale( F(1)/F(2), G );\n\n    // Compute the pivoted QR decomposition of the spectral projection \n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    Matrix<Int> p;\n    elem::QR( G, t, d, p );\n\n    // A := Q^H A Q\n    const Base<F> oneA = OneNorm( A );\n    if( returnQ )\n    {\n        ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, G, t );\n        DiagonalScale( RIGHT, NORMAL, d, G );\n        Matrix<F> B;\n        Gemm( ADJOINT, NORMAL, F(1), G, A, B );\n        Gemm( NORMAL, NORMAL, F(1), B, G, A );\n    }\n    else\n    {\n        qr::ApplyQ( LEFT, ADJOINT, G, t, d, A );\n        qr::ApplyQ( RIGHT, NORMAL, G, t, d, A );\n    }\n\n    // Return || E21 ||1 / || A ||1 and the chosen rank\n    auto part = ComputePartition( A );\n    part.value /= oneA;\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nSignDivide\n( DistMatrix<F>& A, DistMatrix<F>& G, bool returnQ, \n  const SdcCtrl<Base<F>>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SignDivide\"))\n    const Grid& g = A.Grid();\n\n    // G := sgn(G)\n    // G := 1/2 ( G + I )\n    Sign( G, sdcCtrl.signCtrl );\n    UpdateDiagonal( G, F(1) );\n    Scale( F(1)/F(2), G );\n\n    // Compute the pivoted QR decomposition of the spectral projection \n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    DistMatrix<Int,VR,STAR> p(g);\n    elem::QR( G, t, d, p );\n\n    // A := Q^H A Q\n    const Base<F> oneA = OneNorm( A );\n    if( returnQ )\n    {\n        ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, G, t );\n        DiagonalScale( RIGHT, NORMAL, d, G );\n        DistMatrix<F> B(g);\n        Gemm( ADJOINT, NORMAL, F(1), G, A, B );\n        Gemm( NORMAL, NORMAL, F(1), B, G, A );\n    }\n    else\n    {\n        qr::ApplyQ( LEFT, ADJOINT, G, t, d, A );\n        qr::ApplyQ( RIGHT, NORMAL, G, t, d, A );\n    }\n\n    // Return || E21 ||1 / || A ||1 and the chosen rank\n    auto part = ComputePartition( A );\n    part.value /= oneA;\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nRandomizedSignDivide\n( Matrix<F>& A, Matrix<F>& G, bool returnQ, const SdcCtrl<Base<F>>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::RandomizedSignDivide\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Real oneA = OneNorm( A );\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*lapack::MachineEpsilon<Real>();\n\n    // S := sgn(G)\n    // S := 1/2 ( S + I )\n    auto S( G );\n    Sign( S, sdcCtrl.signCtrl );\n    UpdateDiagonal( S, F(1) );\n    Scale( F(1)/F(2), S );\n\n    ValueInt<Real> part;\n    Matrix<F> V, B, t;\n    Matrix<Base<F>> d;\n    Int it=0;\n    while( it < sdcCtrl.maxInnerIts )\n    {\n        G = S;\n\n        // Compute the RURV of the spectral projector\n        ImplicitHaar( V, t, d, n );\n        qr::ApplyQ( RIGHT, NORMAL, V, t, d, G );\n        elem::QR( G, t, d );\n\n        // A := Q^H A Q [and reuse space for V for keeping original A]\n        V = A;\n        if( returnQ )\n        {\n            ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, G, t );\n            DiagonalScale( RIGHT, NORMAL, d, G );\n            Gemm( ADJOINT, NORMAL, F(1), G, A, B );\n            Gemm( NORMAL, NORMAL, F(1), B, G, A );\n        }\n        else\n        {\n            qr::ApplyQ( LEFT, ADJOINT, G, t, d, A );\n            qr::ApplyQ( RIGHT, NORMAL, G, t, d, A );\n        }\n\n        // || E21 ||1 / || A ||1 and the chosen rank\n        part = ComputePartition( A );\n        part.value /= oneA;\n\n        ++it;\n        if( part.value <= tol || it == sdcCtrl.maxInnerIts )\n            break;\n        else\n            A = V;\n    }\n    return part;\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nRandomizedSignDivide\n( DistMatrix<F>& A, DistMatrix<F>& G, bool returnQ,\n  const SdcCtrl<Base<F>>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::RandomizedSignDivide\"))\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    const Real oneA = OneNorm( A );\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*lapack::MachineEpsilon<Real>();\n\n    // S := sgn(G)\n    // S := 1/2 ( S + I )\n    auto S( G );\n    Sign( S, sdcCtrl.signCtrl );\n    UpdateDiagonal( S, F(1) );\n    Scale( F(1)/F(2), S );\n\n    ValueInt<Real> part;\n    DistMatrix<F> V(g), B(g);\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    Int it=0;\n    while( it < sdcCtrl.maxInnerIts )\n    {\n        G = S;\n\n        // Compute the RURV of the spectral projector\n        ImplicitHaar( V, t, d, n );\n        qr::ApplyQ( RIGHT, NORMAL, V, t, d, G );\n        elem::QR( G, t, d );\n\n        // A := Q^H A Q [and reuse space for V for keeping original A]\n        V = A;\n        if( returnQ )\n        {\n            ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, G, t );\n            DiagonalScale( RIGHT, NORMAL, d, G );\n            Gemm( ADJOINT, NORMAL, F(1), G, A, B );\n            Gemm( NORMAL, NORMAL, F(1), B, G, A );\n        }\n        else\n        {\n            qr::ApplyQ( LEFT, ADJOINT, G, t, d, A );\n            qr::ApplyQ( RIGHT, NORMAL, G, t, d, A );\n        }\n\n        // || E21 ||1 / || A ||1 and the chosen rank\n        part = ComputePartition( A );\n        part.value /= oneA;\n\n        ++it;\n        if( part.value <= tol || it == sdcCtrl.maxInnerIts )\n            break;\n        else\n            A = V;\n    }\n    return part;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nSpectralDivide( Matrix<Real>& A, const SdcCtrl<Real>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SpectralDivide\"))\n    const Int n = A.Height();\n    const ValueInt<Real> median = Median(A.GetDiagonal());\n    const Real infNorm = InfinityNorm(A);\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    part.value = 2*tol; // initialize with unacceptable value\n    Matrix<Real> G, ACopy;\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        ++it;\n        const Real shift = SampleBall<Real>(-median.value,spread);\n\n        G = A;\n        UpdateDiagonal( G, shift );\n\n        if( sdcCtrl.progress )\n            std::cout << \"chose shift=\" << shift << \" using -median.value=\"\n                      << -median.value << \" and spread=\" << spread << std::endl;\n\n        try\n        {\n            if( sdcCtrl.random )\n                part = RandomizedSignDivide( A, G, false, sdcCtrl );\n            else\n                part = SignDivide( A, G, false, sdcCtrl );\n\n            if( part.value <= tol )\n            {\n                if( sdcCtrl.progress )\n                    std::cout << \"Converged during outer iter \" << it-1\n                              << std::endl;\n                break;\n            }\n            else if( sdcCtrl.progress )\n                std::cout << \"part.value=\" << part.value << \" was greater than \"\n                          << tol << \" during outer iter \" << it-1 \n                          << std::endl;\n        } \n        catch( SingularMatrixException& e ) \n        { \n            if( sdcCtrl.progress )\n                std::cout << \"Caught singular matrix in outer iter \" << it-1 \n                          << std::endl;\n        }\n        if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError \n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nSpectralDivide\n( Matrix<Complex<Real>>& A, const SdcCtrl<Real>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SpectralDivide\"))\n    typedef Complex<Real> F;\n    const Int n = A.Height();\n    const Real infNorm = InfinityNorm(A);\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    part.value = 2*tol; // initialize with unacceptable value\n    Matrix<F> G, ACopy;\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        ++it;\n        const Real angle = SampleUniform<Real>(0,2*Pi);\n        const F gamma = F(Cos(angle),Sin(angle));\n        G = A;\n        Scale( gamma, G );\n\n        const auto median = Median(G.GetRealPartOfDiagonal());\n        const F shift = SampleBall<F>(-median.value,spread);\n        UpdateDiagonal( G, shift );\n\n        if( sdcCtrl.progress )\n            std::cout << \"chose gamma=\" << gamma << \" and shift=\" << shift \n                      << \" using -median.value=\" << -median.value \n                      << \" and spread=\" << spread << std::endl;\n\n        try\n        {\n            if( sdcCtrl.random )\n                part = RandomizedSignDivide( A, G, false, sdcCtrl );\n            else\n                part = SignDivide( A, G, false, sdcCtrl );\n\n            if( part.value <= tol )\n            {\n                if( sdcCtrl.progress )\n                    std::cout << \"Converged during outer iter \" << it-1\n                              << std::endl;\n                break;\n            }\n            else if( sdcCtrl.progress )\n                std::cout << \"part.value=\" << part.value << \" was greater than \"\n                          << tol << \" during outer iter \" << it-1 \n                          << std::endl;\n        } \n        catch( SingularMatrixException& e ) \n        {\n            if( sdcCtrl.progress )\n                std::cout << \"Caught singular matrix in outer iter \" << it-1 \n                          << std::endl;\n        }\n        if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nSpectralDivide\n( Matrix<Real>& A, Matrix<Real>& Q, const SdcCtrl<Real>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SpectralDivide\"))\n    const Int n = A.Height();\n    const auto median = Median(A.GetDiagonal());\n    const Real infNorm = InfinityNorm(A);\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    part.value = 2*tol; // initialize with unacceptable value\n    Matrix<Real> ACopy;\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        ++it;\n        const Real shift = SampleBall<Real>(-median.value,spread);\n\n        Q = A;\n        UpdateDiagonal( Q, shift );\n\n        if( sdcCtrl.progress )\n            std::cout << \"chose shift=\" << shift << \" using -median.value=\"\n                      << -median.value << \" and spread=\" << spread << std::endl;\n\n        try\n        {\n            if( sdcCtrl.random )\n                part = RandomizedSignDivide( A, Q, true, sdcCtrl );\n            else\n                part = SignDivide( A, Q, true, sdcCtrl );\n\n            if( part.value <= tol )\n            {\n                if( sdcCtrl.progress )\n                    std::cout << \"Converged during outer iter \" << it-1\n                              << std::endl;\n                break;\n            }\n            else if( sdcCtrl.progress )\n                std::cout << \"part.value=\" << part.value << \" was greater than \"\n                          << tol << \" during outer iter \" << it-1 \n                          << std::endl;\n        } \n        catch( SingularMatrixException& e ) \n        { \n            if( sdcCtrl.progress )\n                std::cout << \"Caught singular matrix in outer iter \" << it-1 \n                          << std::endl;\n        }\n        if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nSpectralDivide\n( Matrix<Complex<Real>>& A, Matrix<Complex<Real>>& Q, \n  const SdcCtrl<Real>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SpectralDivide\"))\n    typedef Complex<Real> F;\n    const Int n = A.Height();\n    const Real infNorm = InfinityNorm(A);\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    part.value = 2*tol; // initialize with unacceptable value\n    Matrix<F> ACopy;\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        ++it;\n        const Real angle = SampleUniform<Real>(0,2*Pi);\n        const F gamma = F(Cos(angle),Sin(angle));\n        Q = A;\n        Scale( gamma, Q );\n\n        const auto median = Median(Q.GetRealPartOfDiagonal());\n        const F shift = SampleBall<F>(-median.value,spread);\n        UpdateDiagonal( Q, shift );\n\n        if( sdcCtrl.progress )\n            std::cout << \"chose gamma=\" << gamma << \" and shift=\" << shift \n                      << \" using -median.value=\" << -median.value \n                      << \" and spread=\" << spread << std::endl;\n\n        try\n        {\n            if( sdcCtrl.random )\n                part = RandomizedSignDivide( A, Q, true, sdcCtrl );\n            else\n                part = SignDivide( A, Q, true, sdcCtrl );\n\n            if( part.value <= tol )\n            {\n                if( sdcCtrl.progress )\n                    std::cout << \"Converged during outer iter \" << it-1\n                              << std::endl;\n                break;\n            }\n            else if( sdcCtrl.progress )\n                std::cout << \"part.value=\" << part.value << \" was greater than \"\n                          << tol << \" during outer iter \" << it-1 \n                          << std::endl;\n        } \n        catch( SingularMatrixException& e ) \n        { \n            if( sdcCtrl.progress )\n                std::cout << \"Caught singular matrix in outer iter \" << it-1 \n                          << std::endl;\n        }\n        if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nSpectralDivide( DistMatrix<Real>& A, const SdcCtrl<Real>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SpectralDivide\"))\n    const Int n = A.Height();\n    const auto median = Median(A.GetDiagonal());\n    const Real infNorm = InfinityNorm(A);\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    part.value = 2*tol; // initialize with unacceptable value\n    const Grid& g = A.Grid();\n    DistMatrix<Real> ACopy(g), G(g);\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        ++it;\n        Real shift = SampleBall<Real>(-median.value,spread);\n        mpi::Broadcast( shift, 0, g.VCComm() );\n\n        G = A;\n        UpdateDiagonal( G, shift );\n\n        if( sdcCtrl.progress && g.Rank() == 0 )\n            std::cout << \"chose shift=\" << shift << \" using -median.value=\"\n                      << -median.value << \" and spread=\" << spread << std::endl;\n\n        try\n        {\n            if( sdcCtrl.random )\n                part = RandomizedSignDivide( A, G, false, sdcCtrl );\n            else\n                part = SignDivide( A, G, false, sdcCtrl );\n\n            if( part.value <= tol )\n            {\n                if( sdcCtrl.progress && g.Rank() == 0 )\n                    std::cout << \"Converged during outer iter \" << it-1\n                              << std::endl;\n                break;\n            }\n            else if( sdcCtrl.progress && g.Rank() == 0 )\n                std::cout << \"part.value=\" << part.value << \" was greater than \"\n                          << tol << \" during outer iter \" << it-1 \n                          << std::endl;\n        } \n        catch( SingularMatrixException& e ) \n        { \n            if( sdcCtrl.progress && g.Rank() == 0 )\n                std::cout << \"Caught singular matrix in outer iter \" << it-1 \n                          << std::endl;\n        }\n        if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nSpectralDivide\n( DistMatrix<Complex<Real>>& A, const SdcCtrl<Real>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SpectralDivide\"))\n    typedef Complex<Real> F;\n    const Int n = A.Height();\n    const Real infNorm = InfinityNorm(A);\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    part.value = 2*tol; // initialize with unacceptable value\n    const Grid& g = A.Grid();\n    DistMatrix<F> ACopy(g), G(g);\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        ++it;\n        const Real angle = SampleUniform<Real>(0,2*Pi);\n        F gamma = F(Cos(angle),Sin(angle));\n        mpi::Broadcast( gamma, 0, A.Grid().VCComm() );\n        G = A;\n        Scale( gamma, G );\n\n        const auto median = Median(G.GetRealPartOfDiagonal());\n        F shift = SampleBall<F>(-median.value,spread);\n        mpi::Broadcast( shift, 0, g.VCComm() );\n        UpdateDiagonal( G, shift );\n\n        if( sdcCtrl.progress && g.Rank() == 0 )\n            std::cout << \"chose gamma=\" << gamma << \" and shift=\" << shift \n                      << \" using -median.value=\" << -median.value \n                      << \" and spread=\" << spread << std::endl;\n\n        try\n        {\n            if( sdcCtrl.random )\n                part = RandomizedSignDivide( A, G, false, sdcCtrl );\n            else\n                part = SignDivide( A, G, false, sdcCtrl );\n\n            if( part.value <= tol )\n            {\n                if( sdcCtrl.progress && g.Rank() == 0 )\n                    std::cout << \"Converged during outer iter \" << it-1\n                              << std::endl;\n                break;\n            }\n            else if( sdcCtrl.progress && g.Rank() == 0 )\n                std::cout << \"part.value=\" << part.value << \" was greater than \"\n                          << tol << \" during outer iter \" << it-1 \n                          << std::endl;\n        } \n        catch( SingularMatrixException& e ) \n        { \n            if( sdcCtrl.progress && g.Rank() == 0 )\n                std::cout << \"Caught singular matrix in outer iter \" << it-1 \n                          << std::endl;\n        }\n        if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nSpectralDivide\n( DistMatrix<Real>& A, DistMatrix<Real>& Q, const SdcCtrl<Real>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SpectralDivide\"))\n    const Int n = A.Height();\n    const Real infNorm = InfinityNorm(A);\n    const auto median = Median(A.GetDiagonal());\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    part.value = 2*tol; // initialize with unacceptable value\n    const Grid& g = A.Grid();\n    DistMatrix<Real> ACopy(g);\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        ++it;\n        Real shift = SampleBall<Real>(-median.value,spread);\n        mpi::Broadcast( shift, 0, g.VCComm() );\n\n        Q = A;\n        UpdateDiagonal( Q, shift );\n\n        if( sdcCtrl.progress && g.Rank() == 0 )\n            std::cout << \"chose shift=\" << shift << \" using -median.value=\" \n                      << -median.value << \" and spread=\" << spread \n                      << std::endl;\n\n        try\n        {\n            if( sdcCtrl.random )\n                part = RandomizedSignDivide( A, Q, true, sdcCtrl );\n            else\n                part = SignDivide( A, Q, true, sdcCtrl );\n\n            if( part.value <= tol )\n            {\n                if( sdcCtrl.progress && g.Rank() == 0 )\n                    std::cout << \"Converged during outer iter \" << it-1\n                              << std::endl;\n                break;\n            }\n            else if( sdcCtrl.progress && g.Rank() == 0 )\n                std::cout << \"part.value=\" << part.value << \" was greater than \"\n                          << tol << \" during outer iter \" << it-1 \n                          << std::endl;\n        } \n        catch( SingularMatrixException& e ) \n        {\n            if( sdcCtrl.progress && g.Rank() == 0 )\n                std::cout << \"Caught singular matrix in outer iter \" << it-1 \n                          << std::endl;\n        }\n        if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nSpectralDivide\n( DistMatrix<Complex<Real>>& A, DistMatrix<Complex<Real>>& Q,\n  const SdcCtrl<Real>& sdcCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SpectralDivide\"))\n    typedef Complex<Real> F;\n    const Int n = A.Height();\n    const Real infNorm = InfinityNorm(A);\n    const Real eps = lapack::MachineEpsilon<Real>();\n    Real tol = sdcCtrl.tol;\n    if( tol == Real(0) )\n        tol = 500*n*eps;\n    const Real spread = sdcCtrl.spreadFactor*infNorm;\n\n    Int it=0;\n    ValueInt<Real> part;\n    part.value = 2*tol; // initialize with unacceptable value\n    const Grid& g = A.Grid();\n    DistMatrix<F> ACopy(g);\n    if( sdcCtrl.maxOuterIts > 1 )\n        ACopy = A;\n    while( it < sdcCtrl.maxOuterIts )\n    {\n        ++it;\n        const Real angle = SampleUniform<Real>(0,2*Pi);\n        F gamma = F(Cos(angle),Sin(angle));\n        mpi::Broadcast( gamma, 0, g.VCComm() );\n        Q = A;\n        Scale( gamma, Q );\n\n        const auto median = Median(Q.GetRealPartOfDiagonal());\n        F shift = SampleBall<F>(-median.value,spread);\n        mpi::Broadcast( shift, 0, g.VCComm() );\n        UpdateDiagonal( Q, shift );\n\n        if( sdcCtrl.progress && g.Rank() == 0 )\n            std::cout << \"chose gamma=\" << gamma << \" and shift=\" << shift \n                      << \" using -median.value=\" << -median.value \n                      << \" and spread=\" << spread << std::endl;\n\n        try\n        {\n            if( sdcCtrl.random )\n                part = RandomizedSignDivide( A, Q, true, sdcCtrl );\n            else\n                part = SignDivide( A, Q, true, sdcCtrl );\n\n            if( part.value <= tol )\n            {\n                if( sdcCtrl.progress && g.Rank() == 0 )\n                    std::cout << \"Converged during outer iter \" << it-1\n                              << std::endl;\n                break;\n            }\n            else if( sdcCtrl.progress && g.Rank() == 0 )\n                std::cout << \"part.value=\" << part.value << \" was greater than \"\n                          << tol << \" during outer iter \" << it-1 \n                          << std::endl;\n        } \n        catch( SingularMatrixException& e ) \n        { \n            if( sdcCtrl.progress && g.Rank() == 0 )\n                std::cout << \"Caught singular matrix in outer iter \" << it-1 \n                          << std::endl;\n        }\n        if( it != sdcCtrl.maxOuterIts )\n            A = ACopy;\n    }\n    if( part.value > tol )\n        RuntimeError\n        ( \"Unable to split spectrum to specified accuracy: part.value=\",\n          part.value, \", tol=\", tol );\n\n    return part;\n}\n\ntemplate<typename F>\ninline void\nSDC\n( Matrix<F>& A, Matrix<Complex<Base<F>>>& w, \n  const SdcCtrl<Base<F>> sdcCtrl=SdcCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SDC\"))\n    const Int n = A.Height();\n    w.Resize( n, 1 );\n    if( n <= sdcCtrl.cutoff )\n    {\n        if( sdcCtrl.progress )\n            std::cout << n << \" <= \" << sdcCtrl.cutoff \n                      << \": switching to QR algorithm\" << std::endl;\n        schur::QR( A, w );\n        return;\n    }\n\n    // Perform this level's split\n    if( sdcCtrl.progress )\n        std::cout << \"Splitting \" << n << \" x \" << n << \" matrix\" << std::endl;\n    const auto part = SpectralDivide( A, sdcCtrl );\n    Matrix<F> ATL, ATR,\n              ABL, ABR;\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, part.index );\n    MakeZeros( ABL );\n    Matrix<Complex<Base<F>>> wT, wB;\n    PartitionDown( w, wT, wB, part.index );\n\n    // Recurse on the two subproblems\n    if( sdcCtrl.progress )\n        std::cout << \"Recursing on \" << ATL.Height() << \" x \" << ATL.Width() \n                  << \" left subproblem\" << std::endl;\n    SDC( ATL, wT, sdcCtrl );\n    if( sdcCtrl.progress )\n        std::cout << \"Recursing on \" << ABR.Height() << \" x \" << ABR.Width() \n                  << \" right subproblem\" << std::endl;\n    SDC( ABR, wB, sdcCtrl );\n}\n\ntemplate<typename F>\ninline void\nSDC\n( Matrix<F>& A, Matrix<Complex<Base<F>>>& w, Matrix<F>& Q, \n  bool fullTriangle=true, const SdcCtrl<Base<F>> sdcCtrl=SdcCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SDC\"))\n    const Int n = A.Height();\n    w.Resize( n, 1 );\n    Q.Resize( n, n );\n    if( n <= sdcCtrl.cutoff )\n    {\n        if( sdcCtrl.progress )\n            std::cout << n << \" <= \" << sdcCtrl.cutoff \n                      << \": switching to QR algorithm\" << std::endl;\n        schur::QR( A, w, Q, fullTriangle );\n        return;\n    }\n\n    // Perform this level's split\n    if( sdcCtrl.progress )\n        std::cout << \"Splitting \" << n << \" x \" << n << \" matrix\" << std::endl;\n    const auto part = SpectralDivide( A, Q, sdcCtrl );\n    Matrix<F> ATL, ATR,\n              ABL, ABR;\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, part.index );\n    MakeZeros( ABL );\n    Matrix<Complex<Base<F>>> wT, wB;\n    PartitionDown( w, wT, wB, part.index );\n    Matrix<F> QL, QR;\n    PartitionRight( Q, QL, QR, part.index );\n\n    // Recurse on the top-left quadrant and update Schur vectors and ATR\n    if( sdcCtrl.progress )\n        std::cout << \"Recursing on \" << ATL.Height() << \" x \" << ATL.Width() \n                  << \" left subproblem\" << std::endl;\n    Matrix<F> Z;\n    SDC( ATL, wT, Z, fullTriangle, sdcCtrl );\n    if( sdcCtrl.progress )\n        std::cout << \"Left subproblem update\" << std::endl;\n    auto G( QL );\n    Gemm( NORMAL, NORMAL, F(1), G, Z, QL );\n    if( fullTriangle )\n        Gemm( ADJOINT, NORMAL, F(1), Z, ATR, G );\n\n    // Recurse on the bottom-right quadrant and update Schur vectors and ATR\n    if( sdcCtrl.progress )\n        std::cout << \"Recursing on \" << ABR.Height() << \" x \" << ABR.Width() \n                  << \" right subproblem\" << std::endl;\n    SDC( ABR, wB, Z, fullTriangle, sdcCtrl );\n    if( sdcCtrl.progress )\n        std::cout << \"Right subproblem update\" << std::endl;\n    if( fullTriangle )\n        Gemm( NORMAL, NORMAL, F(1), G, Z, ATR ); \n    G = QR;\n    Gemm( NORMAL, NORMAL, F(1), G, Z, QR );\n}\n\n// This routine no longer attempts to evenly assign work/process between two\n// teams since it was found to lead to horrendously non-square process grids\n// in practice, even when the original number of processes was a large power\n// of two. Instead, the grid is either split in half, or not split at all.\n// The choice is made based upon whether or not one subproblem requires twice\n// as much work as the other. There is a complicated calculus here that would\n// require a much more sophisticated (machine- and problem-specific) model to\n// make the 'best' splitting, but this approach should be a good compromise.\ninline void SplitGrid\n( int nLeft, int nRight, const Grid& grid, \n  const Grid*& leftGrid, const Grid*& rightGrid, bool progress=false )\n{\n    typedef double Real;\n    const Real leftWork = Pow(Real(nLeft),Real(3));\n    const Real rightWork = Pow(Real(nRight),Real(3));\n    if( Max(leftWork,rightWork) > 2*Min(leftWork,rightWork) )\n    {\n        // Don't split the grid\n        leftGrid = &grid;\n        rightGrid = &grid;\n        if( progress && grid.Rank() == 0 )\n            std::cout << \"leftWork/rightWork=\" << leftWork/rightWork \n                      << \", so the grid was not split\" << std::endl;\n    }\n    else\n    {\n        // Split the grid in half (powers-of-two remain so)\n        const Int p = grid.Size();\n        const Int pLeft = p/2;\n        const Int pRight = p-pLeft;\n        std::vector<int> leftRanks(pLeft), rightRanks(pRight);\n        for( int j=0; j<pLeft; ++j )\n            leftRanks[j] = j;\n        for( int j=0; j<pRight; ++j )\n            rightRanks[j] = j+pLeft;\n        mpi::Group group = grid.OwningGroup();\n        mpi::Group leftGroup, rightGroup;\n        mpi::Incl( group, pLeft, leftRanks.data(), leftGroup );\n        mpi::Incl( group, pRight, rightRanks.data(), rightGroup );\n        const Int rLeft = Grid::FindFactor(pLeft);\n        const Int rRight = Grid::FindFactor(pRight);\n        if( progress && grid.Rank() == 0 )\n            std::cout << \"leftWork/rightWork=\" << leftWork/rightWork \n                      << \", so split \" << p << \" processes into \" \n                      << rLeft << \" x \" << pLeft/rLeft << \" and \"\n                      << rRight << \" x \" << pRight/rRight << \" grids\" \n                      << std::endl;\n        leftGrid = new Grid( grid.VCComm(), leftGroup, rLeft );\n        rightGrid = new Grid( grid.VCComm(), rightGroup, rRight );\n        mpi::Free( leftGroup );\n        mpi::Free( rightGroup );\n    }\n}\n\ntemplate<typename F,typename EigType>\ninline void PushSubproblems\n( DistMatrix<F>& ATL,    DistMatrix<F>& ABR, \n  DistMatrix<F>& ATLSub, DistMatrix<F>& ABRSub,\n  DistMatrix<EigType,VR,STAR>& wT,    \n  DistMatrix<EigType,VR,STAR>& wB,\n  DistMatrix<EigType,VR,STAR>& wTSub, \n  DistMatrix<EigType,VR,STAR>& wBSub,\n  bool progress=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::PushSubproblems\"))\n    const Grid& grid = ATL.Grid();\n\n    // Split based on the work estimates\n    const Grid *leftGrid, *rightGrid;\n    SplitGrid\n    ( ATL.Height(), ABR.Height(), grid, leftGrid, rightGrid, progress );\n    ATLSub.SetGrid( *leftGrid ); \n    ABRSub.SetGrid( *rightGrid );\n    wTSub.SetGrid( *leftGrid );\n    wBSub.SetGrid( *rightGrid );\n    if( progress && grid.Rank() == 0 )\n        std::cout << \"Pushing ATL and ABR\" << std::endl;\n    ATLSub = ATL;\n    ABRSub = ABR;\n}\n\ntemplate<typename F,typename EigType>\ninline void PullSubproblems\n( DistMatrix<F>& ATL,    DistMatrix<F>& ABR,\n  DistMatrix<F>& ATLSub, DistMatrix<F>& ABRSub,\n  DistMatrix<EigType,VR,STAR>& wT,    \n  DistMatrix<EigType,VR,STAR>& wB,\n  DistMatrix<EigType,VR,STAR>& wTSub, \n  DistMatrix<EigType,VR,STAR>& wBSub,\n  bool progress=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::PullSubproblems\"))\n    const Grid& grid = ATL.Grid();\n    const bool sameGrid = ( wT.Grid() == wTSub.Grid() );\n\n    if( progress && grid.Rank() == 0 )\n        std::cout << \"Pulling ATL and ABR\" << std::endl;\n    ATL = ATLSub;\n    ABR = ABRSub;\n\n    // This section is a hack since no inter-grid redistributions exist for \n    // [VR,* ] distributions yet\n    if( progress && grid.Rank() == 0 )\n        std::cout << \"Pulling wT and wB\" << std::endl;\n    if( sameGrid )\n    {\n        wT = wTSub;\n        wB = wBSub;\n    }\n    else\n    {\n        DistMatrix<EigType> wTSub_MC_MR( wTSub.Grid() );\n        if( wTSub.Participating() )\n            wTSub_MC_MR = wTSub;\n        wTSub_MC_MR.MakeConsistent();\n        DistMatrix<EigType> wT_MC_MR(wT.Grid()); \n        wT_MC_MR = wTSub_MC_MR;\n        wT = wT_MC_MR;\n\n        DistMatrix<EigType> wBSub_MC_MR( wBSub.Grid() );\n        if( wBSub.Participating() )\n            wBSub_MC_MR = wBSub;\n        wBSub_MC_MR.MakeConsistent();\n        DistMatrix<EigType> wB_MC_MR(wB.Grid()); \n        wB_MC_MR = wBSub_MC_MR;\n        wB = wB_MC_MR;\n    }\n    \n    const Grid *leftGrid = &ATLSub.Grid();\n    const Grid *rightGrid = &ABRSub.Grid();\n    ATLSub.Empty();\n    ABRSub.Empty();\n    wTSub.Empty();\n    wBSub.Empty();\n    if( !sameGrid )\n    {\n        delete leftGrid;\n        delete rightGrid;\n    }\n}\n\ntemplate<typename F>\ninline void\nSDC\n( DistMatrix<F>& A, DistMatrix<Complex<Base<F>>>& w, \n  const SdcCtrl<Base<F>> sdcCtrl=SdcCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SDC\"))\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    w.Resize( n, 1 );\n    if( A.Grid().Size() == 1 )\n    {\n        if( sdcCtrl.progress && g.Rank() == 0 )\n            std::cout << \"One process: using QR algorithm\" << std::endl;\n        schur::QR( A.Matrix(), w.Matrix() );\n        return;\n    }\n    if( n <= sdcCtrl.cutoff )\n    {\n        if( sdcCtrl.progress && g.Rank() == 0 )\n            std::cout << n << \" <= \" << sdcCtrl.cutoff \n                      << \": using QR algorithm\" << std::endl;\n        DistMatrix<F,CIRC,CIRC> A_CIRC_CIRC( A );\n        DistMatrix<Complex<Base<F>>,CIRC,CIRC> w_CIRC_CIRC( w );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n            schur::QR( A_CIRC_CIRC.Matrix(), w_CIRC_CIRC.Matrix() );\n        A = A_CIRC_CIRC;\n        w = w_CIRC_CIRC;\n        return;\n    }\n\n    // Perform this level's split\n    if( sdcCtrl.progress && g.Rank() == 0 )\n        std::cout << \"Splitting \" << n << \" x \" << n << \" matrix\" << std::endl;\n    const auto part = SpectralDivide( A, sdcCtrl );\n    DistMatrix<F> ATL(g), ATR(g),\n                  ABL(g), ABR(g);\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, part.index );\n    MakeZeros( ABL );\n    DistMatrix<Complex<Base<F>>,VR,STAR> wT(g), wB(g);\n    PartitionDown( w, wT, wB, part.index );\n\n    if( sdcCtrl.progress && g.Rank() == 0 )\n        std::cout << \"Pushing subproblems\" << std::endl;\n    DistMatrix<F> ATLSub, ABRSub;\n    DistMatrix<Complex<Base<F>>,VR,STAR> wTSub, wBSub;\n    PushSubproblems\n    ( ATL, ABR, ATLSub, ABRSub, wT, wB, wTSub, wBSub, sdcCtrl.progress );\n    if( ATLSub.Participating() )\n        SDC( ATLSub, wTSub, sdcCtrl );\n    if( ABRSub.Participating() )\n        SDC( ABRSub, wBSub, sdcCtrl );\n    if( sdcCtrl.progress && g.Rank() == 0 )\n        std::cout << \"Pulling subproblems\" << std::endl;\n    PullSubproblems\n    ( ATL, ABR, ATLSub, ABRSub, wT, wB, wTSub, wBSub, sdcCtrl.progress );\n}\n\ntemplate<typename F,typename EigType>\ninline void PushSubproblems\n( DistMatrix<F>& ATL,    DistMatrix<F>& ABR, \n  DistMatrix<F>& ATLSub, DistMatrix<F>& ABRSub,\n  DistMatrix<EigType,VR,STAR>& wT,    \n  DistMatrix<EigType,VR,STAR>& wB,\n  DistMatrix<EigType,VR,STAR>& wTSub, \n  DistMatrix<EigType,VR,STAR>& wBSub,\n  DistMatrix<F>& ZTSub,  DistMatrix<F>& ZBSub,\n  bool progress=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::PushSubproblems\"))\n    const Grid& grid = ATL.Grid();\n\n    // Split based on the work estimates\n    const Grid *leftGrid, *rightGrid;\n    SplitGrid\n    ( ATL.Height(), ABR.Height(), grid, leftGrid, rightGrid, progress );\n    ATLSub.SetGrid( *leftGrid );\n    ABRSub.SetGrid( *rightGrid );\n    wTSub.SetGrid( *leftGrid );\n    wBSub.SetGrid( *rightGrid );\n    ZTSub.SetGrid( *leftGrid );\n    ZBSub.SetGrid( *rightGrid );\n    if( progress && grid.Rank() == 0 )\n        std::cout << \"Pushing ATLSub\" << std::endl;\n    ATLSub = ATL;\n    if( progress && grid.Rank() == 0 )\n        std::cout << \"Pushing ABRSub\" << std::endl;\n    ABRSub = ABR;\n}\n\ntemplate<typename F,typename EigType>\ninline void PullSubproblems\n( DistMatrix<F>& ATL,    DistMatrix<F>& ABR,\n  DistMatrix<F>& ATLSub, DistMatrix<F>& ABRSub,\n  DistMatrix<EigType,VR,STAR>& wT,    \n  DistMatrix<EigType,VR,STAR>& wB,\n  DistMatrix<EigType,VR,STAR>& wTSub, \n  DistMatrix<EigType,VR,STAR>& wBSub,\n  DistMatrix<F>& ZT,     DistMatrix<F>& ZB,\n  DistMatrix<F>& ZTSub,  DistMatrix<F>& ZBSub,\n  bool progress=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::PullSubproblems\"))\n    const Grid& grid = ATL.Grid();\n    const bool sameGrid = ( wT.Grid() == wTSub.Grid() );\n\n    if( progress && grid.Rank() == 0 )\n        std::cout << \"Pulling ATL and ABR\" << std::endl;\n    ATL = ATLSub;\n    ABR = ABRSub;\n\n    // This section is a hack for since no intergrid redistributions exist for \n    // [VR,* ] distributions yet\n    if( progress && grid.Rank() == 0 )\n        std::cout << \"Pulling wT and wB\" << std::endl;\n    if( sameGrid )\n    {\n        wT = wTSub;\n        wB = wBSub;\n    }\n    else\n    {\n        DistMatrix<EigType> wTSub_MC_MR( wTSub.Grid() );\n        if( wTSub.Participating() )\n            wTSub_MC_MR = wTSub;\n        wTSub_MC_MR.MakeConsistent();\n        DistMatrix<EigType> wT_MC_MR(wT.Grid()); \n        wT_MC_MR = wTSub_MC_MR;\n        wT = wT_MC_MR;\n\n        DistMatrix<EigType> wBSub_MC_MR( wBSub.Grid() );\n        if( wBSub.Participating() )\n            wBSub_MC_MR = wBSub;\n        wBSub_MC_MR.MakeConsistent();\n        DistMatrix<EigType> wB_MC_MR(wB.Grid()); \n        wB_MC_MR = wBSub_MC_MR;\n        wB = wB_MC_MR;\n    }\n\n    if( progress && grid.Rank() == 0 )\n        std::cout << \"Pulling ZT and ZB\" << std::endl;\n    if( !sameGrid )\n    {\n        ZTSub.MakeConsistent();\n        ZBSub.MakeConsistent();\n    }\n    ZT = ZTSub;\n    ZB = ZBSub;\n\n    const Grid *leftGrid = &ATLSub.Grid();\n    const Grid *rightGrid = &ABRSub.Grid();\n    ATLSub.Empty();\n    ABRSub.Empty();\n    wTSub.Empty();\n    wBSub.Empty();\n    ZTSub.Empty();\n    ZBSub.Empty();\n    if( !sameGrid )\n    {\n        delete leftGrid;\n        delete rightGrid;\n    }\n}\n\ntemplate<typename F>\ninline void\nSDC\n( DistMatrix<F>& A, DistMatrix<Complex<Base<F>>,VR,STAR>& w, DistMatrix<F>& Q, \n  bool fullTriangle=true, const SdcCtrl<Base<F>> sdcCtrl=SdcCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"schur::SDC\"))\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    w.Resize( n, 1 );\n    Q.Resize( n, n );\n    if( A.Grid().Size() == 1 )\n    {\n        if( sdcCtrl.progress && g.Rank() == 0 )\n            std::cout << \"One process: using QR algorithm\" << std::endl;\n        schur::QR( A.Matrix(), w.Matrix(), Q.Matrix(), fullTriangle );\n        return;\n    }\n    if( n <= sdcCtrl.cutoff )\n    {\n        if( sdcCtrl.progress && g.Rank() == 0 )\n            std::cout << n << \" <= \" << sdcCtrl.cutoff \n                      << \": using QR algorithm\" << std::endl;\n        DistMatrix<F,CIRC,CIRC> A_CIRC_CIRC( A ), Q_CIRC_CIRC( n, n, g );\n        DistMatrix<Complex<Base<F>>,CIRC,CIRC> w_CIRC_CIRC( n, 1, g );\n        if( A_CIRC_CIRC.CrossRank() == A_CIRC_CIRC.Root() )\n            schur::QR\n            ( A_CIRC_CIRC.Matrix(), w_CIRC_CIRC.Matrix(), Q_CIRC_CIRC.Matrix(),\n              fullTriangle );\n        A = A_CIRC_CIRC;\n        w = w_CIRC_CIRC;\n        Q = Q_CIRC_CIRC;\n        return;\n    }\n\n    // Perform this level's split\n    if( sdcCtrl.progress && g.Rank() == 0 )\n        std::cout << \"Splitting \" << n << \" x \" << n << \" matrix\" << std::endl;\n    const Real infNorm = InfinityNorm( A );\n    const auto part = SpectralDivide( A, Q, sdcCtrl );\n    DistMatrix<F> ATL(g), ATR(g),\n                  ABL(g), ABR(g);\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, part.index );\n    MakeZeros( ABL );\n    DistMatrix<Complex<Base<F>>,VR,STAR> wT(g), wB(g);\n    PartitionDown( w, wT, wB, part.index );\n    DistMatrix<F> QL(g), QR(g);\n    PartitionRight( Q, QL, QR, part.index );\n\n    // Recurse on the two subproblems\n    DistMatrix<F> ATLSub, ABRSub, ZTSub, ZBSub;\n    DistMatrix<Complex<Base<F>>,VR,STAR> wTSub, wBSub;\n    if( sdcCtrl.progress && g.Rank() == 0 )\n        std::cout << \"Pushing subproblems\" << std::endl;\n    PushSubproblems\n    ( ATL, ABR, ATLSub, ABRSub, wT, wB, wTSub, wBSub, ZTSub, ZBSub, \n      sdcCtrl.progress );\n    if( ATLSub.Participating() )\n        SDC( ATLSub, wTSub, ZTSub, fullTriangle, sdcCtrl );\n    if( ABRSub.Participating() )\n        SDC( ABRSub, wBSub, ZBSub, fullTriangle, sdcCtrl );\n    \n    // Ensure that the results are back on this level's grid\n    if( sdcCtrl.progress && g.Rank() == 0 )\n        std::cout << \"Pulling subproblems\" << std::endl;\n    DistMatrix<F> ZT(g), ZB(g);\n    PullSubproblems\n    ( ATL, ABR, ATLSub, ABRSub, wT, wB, wTSub, wBSub, ZT, ZB, ZTSub, ZBSub,\n      sdcCtrl.progress );\n\n    // Update the Schur vectors\n    if( sdcCtrl.progress && g.Rank() == 0 )\n        std::cout << \"Updating Schur vectors\" << std::endl;\n    auto G( QL );\n    Gemm( NORMAL, NORMAL, F(1), G, ZT, QL );\n    G = QR;\n    Gemm( NORMAL, NORMAL, F(1), G, ZB, QR );\n\n    if( fullTriangle )\n    {\n        if( sdcCtrl.progress && g.Rank() == 0 )\n            std::cout << \"Updating top-right quadrant\" << std::endl;\n        // Update the top-right quadrant\n        Gemm( ADJOINT, NORMAL, F(1), ZT, ATR, G );\n        Gemm( NORMAL, NORMAL, F(1), G, ZB, ATR ); \n    }\n}\n\n} // namespace schur\n} // namespace elem\n\n#endif // ifndef ELEM_SCHUR_SDC_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/Schur.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SCHUR_HPP\n#define ELEM_SCHUR_HPP\n\n#include \"./Schur/CheckReal.hpp\"\n#include \"./Schur/RealToComplex.hpp\"\n#include \"./Schur/QuasiTriangEig.hpp\"\n#include \"./Schur/QR.hpp\"\n#include \"./Schur/SDC.hpp\"\n#include \"./Schur/InverseFreeSDC.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nSchur( Matrix<F>& A, Matrix<Complex<Base<F>>>& w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Schur\"))\n    schur::QR( A, w );\n}\n\ntemplate<typename F>\ninline void\nSchur( Matrix<F>& A, Matrix<Complex<Base<F>>>& w, Matrix<F>& Q )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Schur\"))\n    schur::QR( A, w, Q );\n}\n\ntemplate<typename F>\ninline void\nSchur( DistMatrix<F>& A, DistMatrix<Complex<Base<F>>,VR,STAR>& w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Schur\"))\n#ifdef ELEM_HAVE_SCALAPACK\n    schur::QR( A, w );\n#else\n    schur::SDC( A, w );\n#endif\n}\n\ntemplate<typename F>\ninline void\nSchur\n( DistMatrix<F>& A, DistMatrix<Complex<Base<F>>,VR,STAR>& w, DistMatrix<F>& Q )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Schur\"))\n#ifdef ELEM_HAVE_SCALAPACK\n    schur::QR( A, w, Q );\n#else\n    schur::SDC( A, w, Q );\n#endif\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SCHUR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/SkewHermitianEig.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SKEWHERMITIANEIG_HPP\n#define ELEM_SKEWHERMITIANEIG_HPP\n\n#include ELEM_SCALETRAPEZOID_INC\n\nnamespace elem {\n\n// Return the full set of eigenvalues\n// ==================================\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Real>& G, Matrix<Real>& wImag, \n  SortType sort=UNSORTED, \n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    Matrix<Complex<Real>> A;\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Complex<Real>>& G, \n  Matrix<Real>& wImag, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Real>& G,\n  DistMatrix<Real,VR,STAR>& wImag, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    DistMatrix<Complex<Real>> A(G.Grid());\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Complex<Real>>& G,\n  DistMatrix<Real,VR,STAR>& wImag, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, sort, ctrl );\n}\n\n// Return the full set of eigenpairs\n// =================================\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Real>& G, \n  Matrix<Real>& wImag, Matrix<Complex<Real>>& Z,\n  SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    Matrix<Complex<Real>> A;\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, Z, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Complex<Real>>& G, \n  Matrix<Real>& wImag, Matrix<Complex<Real>>& Z,\n  SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, Z, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Real>& G,\n  DistMatrix<Real,VR,STAR>& wImag, DistMatrix<Complex<Real>>& Z,\n  SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    DistMatrix<Complex<Real>> A(G.Grid());\n    Copy( G, A ); \n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, Z, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Complex<Real>>& G,\n  DistMatrix<Real,VR,STAR>& wImag, DistMatrix<Complex<Real>>& Z,\n  SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, Z, sort, ctrl );\n}\n\n// Return the eigenvalues with indices in a specified range\n// ========================================================\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Real>& G, \n  Matrix<Real>& wImag, Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    Matrix<Complex<Real>> A;\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Complex<Real>>& G, \n  Matrix<Real>& wImag, Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Real>& G,\n  DistMatrix<Real,VR,STAR>& wImag, Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    DistMatrix<Complex<Real>> A(G.Grid());\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Complex<Real>>& G,\n  DistMatrix<Real,VR,STAR>& wImag, Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, a, b, sort, ctrl );\n}\n\n// Return the eigenpairs with indices in a specified range\n// =======================================================\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Real>& G, \n  Matrix<Real>& wImag, Matrix<Complex<Real>>& Z,\n  Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    Matrix<Complex<Real>> A;\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, Z, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Complex<Real>>& G, \n  Matrix<Real>& wImag, Matrix<Complex<Real>>& Z,\n  Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, Z, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Real>& G,\n  DistMatrix<Real,VR,STAR>& wImag, DistMatrix<Complex<Real>>& Z,\n  Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    DistMatrix<Complex<Real>> A(G.Grid());\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, Z, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Complex<Real>>& G,\n  DistMatrix<Real,VR,STAR>& wImag, DistMatrix<Complex<Real>>& Z,\n  Int a, Int b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, Z, a, b, sort, ctrl );\n}\n\n// Return the eigenvalues in the interval i(a,b]\n// =============================================\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Real>& G, \n  Matrix<Real>& wImag, Real a, Real b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    Matrix<Complex<Real>> A;\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Complex<Real>>& G, \n  Matrix<Real>& wImag, Real a, Real b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Real>& G,\n  DistMatrix<Real,VR,STAR>& wImag, Real a, Real b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    DistMatrix<Complex<Real>> A(G.Grid());\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Complex<Real>>& G,\n  DistMatrix<Real,VR,STAR>& wImag,\n  Real a, Real b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, a, b, sort, ctrl );\n}\n\n// Return the eigenpairs with eigenvalues in the interval i(a,b]\n// =============================================================\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Real>& G, \n  Matrix<Real>& wImag, Matrix<Complex<Real>>& Z,\n  Real a, Real b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    Matrix<Complex<Real>> A;\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, Z, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, Matrix<Complex<Real>>& G, \n  Matrix<Real>& wImag, Matrix<Complex<Real>>& Z,\n  Real a, Real b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, Z, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Real>& G,\n  DistMatrix<Real,VR,STAR>& wImag, DistMatrix<Complex<Real>>& Z,\n  Real a, Real b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    DistMatrix<Complex<Real>> A(G.Grid());\n    Copy( G, A );\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, A );\n    HermitianEig( uplo, A, wImag, Z, a, b, sort, ctrl );\n}\n\ntemplate<typename Real>\ninline void\nSkewHermitianEig\n( UpperOrLower uplo, DistMatrix<Complex<Real>>& G,\n  DistMatrix<Real,VR,STAR>& wImag, DistMatrix<Complex<Real>>& Z,\n  Real a, Real b, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Real>& ctrl=HermitianEigCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SkewHermitianEig\"))\n    ScaleTrapezoid( Complex<Real>(0,-1), uplo, G );\n    HermitianEig( uplo, G, wImag, Z, a, b, sort, ctrl );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SKEWHERMITIANEIG_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DECOMP_DECL_HPP\n#define ELEM_DECOMP_DECL_HPP\n\n#include ELEM_CONDENSE_DECL_INC\n\nnamespace elem {\n\nnamespace HermitianGenDefiniteEigTypeNS {\nenum HermitianGenDefiniteEigType\n{\n    AXBX=1,\n    ABX=2,\n    BAX=3\n};\n}\nusing namespace HermitianGenDefiniteEigTypeNS;\n\ntemplate<typename Real>\nstruct HermitianSdcCtrl {\n    Int cutoff;\n    Int maxInnerIts;\n    Int maxOuterIts;\n    Real tol;\n    Real spreadFactor;\n    bool progress;\n\n    HermitianSdcCtrl()\n    : cutoff(256), maxInnerIts(2), maxOuterIts(10),\n      tol(0), spreadFactor(1e-6),\n      progress(false)\n    { }\n};\n\ntemplate<typename Real>\nstruct HermitianEigCtrl\n{\n    HermitianTridiagCtrl tridiagCtrl;\n    HermitianSdcCtrl<Real> sdcCtrl;\n    bool useSdc;\n\n    HermitianEigCtrl()\n    : tridiagCtrl(), sdcCtrl(), useSdc(false)\n    { }\n};\n\n// Compute the eigenvalues of a Hermitian matrix\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w, \n  SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\n\n// Compute the full eigenvalue decomposition of a Hermitian matrix\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, Matrix<F>& Z, \n  SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w, DistMatrix<F,STAR,STAR>& Z, \n  SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, \n  DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w, DistMatrix<F>& paddedZ,\n  SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\n\n// Compute the eigenvalues of a Hermitian matrix within a selected range\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w,\n  Int lowerBound, Int upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w,\n  Base<F> lowerBound, Base<F> upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, \n  DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w,\n  Int lowerBound, Int upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, \n  DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w,\n  Base<F> lowerBound, Base<F> upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w, \n  Int lowerBound, Int upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w,\n  Base<F> lowerBound, Base<F> upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\n\n// Compute a selected set of eigenpairs of a Hermitian matrix\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, \n  Matrix<F>& A, Matrix<Base<F>>& w, Matrix<F>& Z,\n  Int lowerBound, Int upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, \n  Matrix<F>& A, Matrix<Base<F>>& w, Matrix<F>& Z,\n  Base<F> lowerBound, Base<F> upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo,\n  DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w, \n  DistMatrix<F,STAR,STAR>& Z,\n  Int lowerBound, Int upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo,\n  DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w, \n  DistMatrix<F,STAR,STAR>& Z,\n  Base<F> lowerBound, Base<F> upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, \n  DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w, DistMatrix<F>& paddedZ,\n  Int lowerBound, Int upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, \n  DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w, DistMatrix<F>& paddedZ,\n  Base<F> lowerBound, Base<F> upperBound, SortType sort=UNSORTED,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() );\n\n} // namespace elem\n\n#endif // ifndef ELEM_DECOMP_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DECOMP_IMPL_HPP\n#define ELEM_DECOMP_IMPL_HPP\n\n#include \"./HermitianTridiagEig.hpp\"\n#include \"./HermitianEig.hpp\"\n#include \"./HermitianGenDefiniteEig.hpp\"\n#include \"./SkewHermitianEig.hpp\"\n\n#include \"./Polar.hpp\"\n#include \"./SVD.hpp\"\n\n#include \"./Schur.hpp\"\n\n#endif // ifndef ELEM_DECOMP_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/decomp.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DECOMP_HPP\n#define ELEM_DECOMP_HPP\n\n#include \"./decomp/decl.hpp\"\n#include \"./decomp/impl.hpp\"\n\n#endif // ifndef ELEM_DECOMP_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/LMod.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_LMOD_HPP\n#define ELEM_CHOLESKY_LMOD_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n#include ELEM_REFLECTOR_INC\n#include ELEM_HYPERBOLICREFLECTOR_INC\n\n// TODO: Blocked algorithms\n\nnamespace elem {\nnamespace cholesky {\n\nnamespace mod {\n\ntemplate<typename F>\ninline void\nLUpdate( Matrix<F>& L, Matrix<F>& V )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::mod::LUpdate\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Cholesky factors must be square\");\n        if( V.Height() != L.Height() )\n            LogicError(\"V is the wrong height\");\n    )\n    const Int m = V.Height();\n    const Int n = V.Width();\n\n    Matrix<F> z21;\n\n    F* LBuf = L.Buffer();\n    const Int ldl = L.LDim();\n    for( Int k=0; k<m; ++k )\n    {\n        F& lambda11 = LBuf[k+k*ldl];\n        auto l21 = ViewRange( L, k+1, k, m, k+1 );\n\n        auto v1 = ViewRange( V, k,   0, k+1, n );\n        auto V2 = ViewRange( V, k+1, 0, m,   n );\n\n        // Find tau and u such that\n        //  | lambda11 u | /I - tau | 1   | | 1 conj(u) |\\ = | -beta 0 |\n        //                 \\        | u^T |              /\n        // where beta >= 0\n        const F tau = RightReflector( lambda11, v1 );\n\n        // Apply the negative Householder reflector from the right:\n        // | l21 V2 | := -| l21 V2 | + tau | l21 V2 | | 1   | | 1 conj(u) |\n        //                                           | u^T |\n        //             = -| l21 V2 | + tau (l21 + V2 u^T) | 1 conj(u) | \n        lambda11 = -lambda11;\n        z21 = l21;\n        Gemv( NORMAL, F(1), V2, v1, F(1), z21 );\n        Scale( F(-1), l21 );\n        Axpy( tau, z21, l21 );\n        Scale( F(-1), V2  );\n        Ger( tau, z21, v1, V2 );\n    }\n}\n\ntemplate<typename F>\ninline void\nLUpdate( DistMatrix<F>& L, DistMatrix<F>& V )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::mod::LUpdate\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Cholesky factors must be square\");\n        if( V.Height() != L.Height() )\n            LogicError(\"V is the wrong height\");\n        if( L.Grid() != V.Grid() )\n            LogicError(\"L and V must have the same grid\");\n    )\n    const Int m = V.Height();\n    const Int n = V.Width();\n\n    const Grid& g = L.Grid();\n    DistMatrix<F,MC,STAR> z21_MC_STAR(g), b21_MC_STAR(g);\n    DistMatrix<F,STAR,MR> v1_STAR_MR(g);\n    for( Int k=0; k<m; ++k )\n    {\n        F lambda11 = L.Get( k, k );\n        auto l21 = ViewRange( L, k+1, k, m, k+1 );\n\n        auto v1 = ViewRange( V, k,   0, k+1, n );\n        auto V2 = ViewRange( V, k+1, 0, m,   n );\n\n        // Find tau and u such that\n        //  | lambda11 u | /I - tau | 1   | | 1 conj(u) |\\ = | -beta 0 |\n        //                 \\        | u^T |              /\n        // where beta >= 0\n        const F tau = RightReflector( lambda11, v1 );\n\n        // Apply the negative Householder reflector from the right:\n        // | l21 V2 | := -| l21 V2 | + tau | l21 V2 | | 1   | | 1 conj(u) |\n        //                                            | u^T |\n        //             = -| l21 V2 | + tau (l21 + V2 u^T) | 1 conj(u) | \n        L.Set( k, k, -lambda11 );\n        z21_MC_STAR.AlignWith( V2 );\n        b21_MC_STAR.AlignWith( V2 );\n        v1_STAR_MR.AlignWith( V2 );\n        z21_MC_STAR = l21;\n        v1_STAR_MR = v1;\n        Zeros( b21_MC_STAR, V2.Height(), 1 );\n        LocalGemv( NORMAL, F(1), V2, v1_STAR_MR, F(0), b21_MC_STAR );\n        b21_MC_STAR.SumOver( V2.RowComm() );\n        Axpy( F(1), b21_MC_STAR, z21_MC_STAR );\n        Scale( F(-1), l21 );\n        Axpy( tau, z21_MC_STAR, l21 );\n        Scale( F(-1), V2 );\n        LocalGer( tau, z21_MC_STAR, v1_STAR_MR, V2 );\n    }\n}\n\ntemplate<typename F>\ninline void\nLDowndate( Matrix<F>& L, Matrix<F>& V )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::mod::LDowndate\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Cholesky factors must be square\");\n        if( V.Height() != L.Height() )\n            LogicError(\"V is the wrong height\");\n    )\n    const Int m = V.Height();\n    const Int n = V.Width();\n\n    Matrix<F> z21;\n\n    F* LBuf = L.Buffer();\n    const Int ldl = L.LDim();\n    for( Int k=0; k<m; ++k )\n    {\n        F& lambda11 = LBuf[k+k*ldl];\n        auto l21 = ViewRange( L, k+1, k, m, k+1 );\n\n        auto v1 = ViewRange( V, k,   0, k+1, n );\n        auto V2 = ViewRange( V, k+1, 0, m,   n );\n\n        // Find tau and u such that\n        //  | lambda11 u | /I - 1/tau Sigma | 1   | | 1 conj(u) |\\ = | -beta 0 |\n        //                 \\                | u^T |              /\n        // where Sigma = diag(+1,-1,...,-1) and beta >= 0\n        const F tau = RightHyperbolicReflector( lambda11, v1 );\n\n        // Apply the negative of the hyperbolic Householder reflector from the \n        // right:\n        // |l21 V2| := -|l21 V2| + 1/tau |l21 V2| Sigma |1  | |1 conj(u)|\n        //                                              |u^T|\n        //           = -|l21 V2| + 1/tau |l21 -V2| |1  | |1 conj(u)|\n        //                                         |u^T|\n        //           = -|l21 V2| + 1/tau |l21 - V2 u^T| |1 conj(u)|\n        lambda11 = -lambda11;\n        z21 = l21;\n        Gemv( NORMAL, F(-1), V2, v1, F(1), z21 );\n        Scale( F(-1), l21 );\n        Scale( F(-1), V2  );\n        Axpy( F(1)/tau, z21, l21 );\n        Ger( F(1)/tau, z21, v1, V2 );\n    }\n}\n\ntemplate<typename F>\ninline void\nLDowndate( DistMatrix<F>& L, DistMatrix<F>& V )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::mod::LDowndate\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Cholesky factors must be square\");\n        if( V.Height() != L.Height() )\n            LogicError(\"V is the wrong height\");\n        if( L.Grid() != V.Grid() )\n            LogicError(\"L and V must have the same grid\");\n    )\n    const Int m = V.Height();\n    const Int n = V.Width();\n\n    const Grid& g = L.Grid();\n    DistMatrix<F,MC,STAR> z21_MC_STAR(g), b21_MC_STAR(g);\n    DistMatrix<F,STAR,MR> v1_STAR_MR(g);\n    for( Int k=0; k<m; ++k )\n    {\n        F lambda11 = L.Get( k, k );\n        auto l21 = ViewRange( L, k+1, k, m, k+1 );\n\n        auto v1 = ViewRange( V, k,   0, k+1, n );\n        auto V2 = ViewRange( V, k+1, 0, m,   n );\n\n        // Find tau and u such that\n        //  | lambda11 u | /I - 1/tau Sigma | 1   | | 1 conj(u) |\\ = | -beta 0 |\n        //                 \\                | u^T |              /\n        // where Sigma = diag(+1,-1,...,-1) and beta >= 0\n        const F tau = RightHyperbolicReflector( lambda11, v1 );\n\n        // Apply the negative of the hyperbolic Householder reflector from the \n        // right:\n        // |l21 V2| := -|l21 V2| + 1/tau |l21 V2| Sigma |1  | |1 conj(u)|\n        //                                              |u^T|\n        //           = -|l21 V2| + 1/tau |l21 -V2| |1  | |1 conj(u)|\n        //                                         |u^T|\n        //           = -|l21 V2| + 1/tau |l21 - V2 u^T| |1 conj(u)|\n        L.Set( k, k, -lambda11 );\n        z21_MC_STAR.AlignWith( V2 );\n        b21_MC_STAR.AlignWith( V2 );\n        v1_STAR_MR.AlignWith( V2 );\n        z21_MC_STAR = l21;\n        v1_STAR_MR = v1;\n        Zeros( b21_MC_STAR, V2.Height(), 1 );\n        LocalGemv( NORMAL, F(-1), V2, v1_STAR_MR, F(0), b21_MC_STAR );\n        b21_MC_STAR.SumOver( V2.RowComm() );\n        Axpy( F(1), b21_MC_STAR, z21_MC_STAR );\n        Scale( F(-1), l21 );\n        Scale( F(-1), V2  );\n        Axpy( F(1)/tau, z21_MC_STAR, l21 );\n        LocalGer( F(1)/tau, z21_MC_STAR, v1_STAR_MR, V2 );\n    }\n}\n\n} // namespace mod\n\ntemplate<typename F>\ninline void\nLMod( Matrix<F>& L, Base<F> alpha, Matrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::LMod\"))\n    typedef Base<F> Real;\n    if( alpha == Real(0) )\n        return;\n    else if( alpha > Real(0) )\n    {\n        Scale( Sqrt(alpha), V );  \n        mod::LUpdate( L, V );\n    }\n    else\n    {\n        Scale( Sqrt(-alpha), V );\n        mod::LDowndate( L, V );\n    }\n}\n\ntemplate<typename F>\ninline void\nLMod( DistMatrix<F>& L, Base<F> alpha, DistMatrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::LMod\"))\n    typedef Base<F> Real;\n    if( alpha == Real(0) )\n        return;\n    else if( alpha > Real(0) )\n    {\n        Scale( Sqrt(alpha), V );  \n        mod::LUpdate( L, V );\n    }\n    else\n    {\n        Scale( Sqrt(-alpha), V );\n        mod::LDowndate( L, V );\n    }\n}\n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_LMOD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/LVar2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_LVAR2_HPP\n#define ELEM_CHOLESKY_LVAR2_HPP\n\n#include ELEM_GEMM_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include \"./LVar3.hpp\"\n\n// TODO: Reverse variants\n\nnamespace elem {\nnamespace cholesky {\n\ntemplate<typename F> \ninline void\nLVar2( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::LVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A10 = ViewRange( A, k,    0, k+nb, k    );\n        auto A11 = ViewRange( A, k,    k, k+nb, k+nb );\n        auto A20 = ViewRange( A, k+nb, 0, n,    k    );\n        auto A21 = ViewRange( A, k+nb, k, n,    k+nb );\n\n        Herk( LOWER, NORMAL, F(-1), A10, F(1), A11 );\n        cholesky::LVar3Unb( A11 );\n        Gemm( NORMAL, ADJOINT, F(-1), A20, A10, F(1), A21 );\n        Trsm( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), A11, A21 );\n    }\n}\n\ntemplate<typename F> \ninline void\nLVar2( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::LVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Grid& g = A.Grid();\n    DistMatrix<F,MR,  STAR> A10Adj_MR_STAR(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,MC,  STAR> X11_MC_STAR(g);\n    DistMatrix<F,MC,  STAR> X21_MC_STAR(g);\n\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A10 = ViewRange( A, k,    0, k+nb, k    );\n        auto A11 = ViewRange( A, k,    k, k+nb, k+nb );\n        auto A20 = ViewRange( A, k+nb, 0, n,    k    );\n        auto A21 = ViewRange( A, k+nb, k, n,    k+nb );\n \n        A10Adj_MR_STAR.AlignWith( A10 );\n        A10.AdjointColAllGather( A10Adj_MR_STAR );\n        X11_MC_STAR.AlignWith( A10 );\n        LocalGemm( NORMAL, NORMAL, F(1), A10, A10Adj_MR_STAR, X11_MC_STAR );\n        A11.RowSumScatterUpdate( F(-1), X11_MC_STAR );\n\n        A11_STAR_STAR = A11;\n        LocalCholesky( LOWER, A11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        X21_MC_STAR.AlignWith( A20 );\n        LocalGemm( NORMAL, NORMAL, F(1), A20, A10Adj_MR_STAR, X21_MC_STAR );\n        A21.RowSumScatterUpdate( F(-1), X21_MC_STAR );\n\n        A21_VC_STAR = A21;\n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), A11_STAR_STAR, A21_VC_STAR );\n        A21 = A21_VC_STAR;\n    }\n}\n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_LVAR2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/LVar3.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_LVAR3_HPP\n#define ELEM_CHOLESKY_LVAR3_HPP\n\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\nnamespace elem {\nnamespace cholesky {\n\ntemplate<typename F>\ninline void\nLVar3Unb( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::LVar3Unb\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Int lda = A.LDim();\n    F* ABuffer = A.Buffer();\n    for( Int j=0; j<n; ++j )\n    {\n        Real alpha = RealPart(ABuffer[j+j*lda]);\n        if( alpha <= Real(0) )\n            LogicError(\"A was not numerically HPD\");\n        alpha = Sqrt( alpha );\n        ABuffer[j+j*lda] = alpha;\n\n        for( Int k=j+1; k<n; ++k )\n            ABuffer[k+j*lda] /= alpha;\n\n        for( Int k=j+1; k<n; ++k )\n            for( Int i=k; i<n; ++i )\n                ABuffer[i+k*lda] -= ABuffer[i+j*lda]*Conj(ABuffer[k+j*lda]);\n    }\n}\n\ntemplate<typename F>\ninline void\nReverseLVar3Unb( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::ReverseLVar3Unb\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Int lda = A.LDim();\n    F* ABuffer = A.Buffer();\n    for( Int j=n-1; j>=0; --j )\n    {\n        Real alpha = RealPart(ABuffer[j+j*lda]);\n        if( alpha <= Real(0) )\n            LogicError(\"A was not numerically HPD\");\n        alpha = Sqrt( alpha );\n        ABuffer[j+j*lda] = alpha;\n\n        for( Int k=0; k<j; ++k )\n            ABuffer[j+k*lda] /= alpha;\n\n        for( Int k=0; k<j; ++k )\n            for( Int i=k; i<j; ++i )\n                ABuffer[i+k*lda] -= ABuffer[j+k*lda]*Conj(ABuffer[j+i*lda]);\n    }\n}\n\ntemplate<typename F>\ninline void\nLVar3( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::LVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A21 = ViewRange( A, k+nb, k,    n,    k+nb );\n        auto A22 = ViewRange( A, k+nb, k+nb, n,    n    );\n\n        cholesky::LVar3Unb( A11 );\n        Trsm( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), A11, A21 );\n        Herk( LOWER, NORMAL, F(-1), A21, F(1), A22 );\n    }\n}\n\ntemplate<typename F>\ninline void\nReverseLVar3( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::ReverseLVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A00 = ViewRange( A, 0, 0, k,    k    );\n        auto A10 = ViewRange( A, k, 0, k+nb, k    );\n        auto A11 = ViewRange( A, k, k, k+nb, k+nb );\n\n        cholesky::ReverseLVar3Unb( A11 );\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), A11, A10 );\n        Herk( LOWER, ADJOINT, F(-1), A10, F(1), A00 );\n    }\n} \n\ntemplate<typename F>\ninline void\nLVar3( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::LVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Grid& g = A.Grid();\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> A21_VR_STAR(g);\n    DistMatrix<F,STAR,MC  > A21Trans_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A21Adj_STAR_MR(g);\n\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A21 = ViewRange( A, k+nb, k,    n,    k+nb );\n        auto A22 = ViewRange( A, k+nb, k+nb, n,    n    );\n\n        A11_STAR_STAR = A11;\n        LocalCholesky( LOWER, A11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        A21_VC_STAR.AlignWith( A22 );\n        A21_VC_STAR = A21;\n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), A11_STAR_STAR, A21_VC_STAR );\n\n        A21_VR_STAR.AlignWith( A22 );\n        A21_VR_STAR = A21_VC_STAR;\n        A21Trans_STAR_MC.AlignWith( A22 );\n        A21Adj_STAR_MR.AlignWith( A22 );\n        A21_VC_STAR.TransposePartialColAllGather( A21Trans_STAR_MC );\n        A21_VR_STAR.AdjointPartialColAllGather( A21Adj_STAR_MR );\n\n        // (A21^T[* ,MC])^T A21^H[* ,MR] = A21[MC,* ] A21^H[* ,MR]\n        //                               = (A21 A21^H)[MC,MR]\n        LocalTrrk\n        ( LOWER, TRANSPOSE, \n          F(-1), A21Trans_STAR_MC, A21Adj_STAR_MR, F(1), A22 );\n\n        A21.TransposeRowFilterFrom( A21Trans_STAR_MC );\n    }\n} \n\ntemplate<typename F>\ninline void\nReverseLVar3( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::ReverseLVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Grid& g = A.Grid();\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A10_STAR_VR(g);\n    DistMatrix<F,STAR,MC  > A10_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A10_STAR_MR(g);\n\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A00 = ViewRange( A, 0, 0, k,    k    );\n        auto A10 = ViewRange( A, k, 0, k+nb, k    );\n        auto A11 = ViewRange( A, k, k, k+nb, k+nb );\n\n        A11_STAR_STAR = A11;\n        LocalReverseCholesky( LOWER, A11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        A10_STAR_VR.AlignWith( A00 );\n        A10_STAR_VR = A10;\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, NON_UNIT, F(1), A11_STAR_STAR, A10_STAR_VR );\n\n        A10_STAR_MC.AlignWith( A00 );\n        A10_STAR_MC = A10_STAR_VR;\n        A10_STAR_MR.AlignWith( A00 );\n        A10_STAR_MR = A10_STAR_VR;\n\n        // (A10[* ,MC])^H A10[* ,MR] = (A10^H A10)[MC,MR]\n        LocalTrrk\n        ( LOWER, ADJOINT, F(-1), A10_STAR_MC, A10_STAR_MR, F(1), A00 );\n\n        A10 = A10_STAR_MR;\n    }\n} \n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_LVAR3_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/LVar3Pivoted.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_LVAR3PIVOTED_HPP\n#define ELEM_CHOLESKY_LVAR3PIVOTED_HPP\n\n#include ELEM_MAXABS_INC\n#include ELEM_SCALE_INC\n#include ELEM_SWAP_INC\n\n#include ELEM_HER_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace cholesky {\n\nnamespace pivot {\n\ntemplate<typename F>\ninline LDLPivot\nFull( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::pivot::Full\"))\n    const auto diagMax = DiagonalMaxAbs( A );\n    LDLPivot pivot;\n    pivot.nb = 1;\n    pivot.from[0] = diagMax.index;\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nFull( const DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::pivot::Full\"))\n    const auto diagMax = DiagonalMaxAbs( A );\n    LDLPivot pivot;\n    pivot.nb = 1;\n    pivot.from[0] = diagMax.index;\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nPanelFull( const Matrix<F>& A, const Matrix<F>& X, const Matrix<F>& Y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::pivot::PanelFull\"))\n    // Form updated diagonal\n    auto d = A.GetDiagonal();\n    const Int height = d.Height();\n    const Int k = X.Width();\n    for( Int i=0; i<height; ++i )\n        for( Int j=0; j<k; ++j )\n            d.Update( i, 0, -X.Get(i,j)*Y.Get(i,j) );\n\n    // Return maximum from it\n    auto diagMax = VectorMaxAbs( d );\n    LDLPivot pivot;\n    pivot.nb = 1;\n    pivot.from[0] = diagMax.index;\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nPanelFull\n( const DistMatrix<F>& A, \n  const DistMatrix<F,MC,STAR>& X, const DistMatrix<F,MR,STAR>& Y )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::pivot::PanelFull\");\n        if( A.ColAlign() != X.ColAlign() || A.RowAlign() != Y.ColAlign() )\n            LogicError(\"A, X, and Y are not properly aligned\");\n    )\n    // Form updated diagonal\n    auto d = A.GetDiagonal();\n    if( d.Participating() )\n    {\n        const Int dLocalHeight = d.LocalHeight();\n        const Int k = X.Width();\n        for( Int iLoc=0; iLoc<dLocalHeight; ++iLoc )\n        {\n            const Int i = d.GlobalRow(iLoc);\n            const Int iLocX = X.LocalRow(i);\n            const Int iLocY = Y.LocalRow(i);\n            for( Int j=0; j<k; ++j )\n                d.UpdateLocal\n                ( iLoc, 0, -X.GetLocal(iLocX,j)*Y.GetLocal(iLocY,j) );\n            d.MakeReal( iLoc, 0 );\n        }\n    }\n\n    // Return maximum from it\n    auto diagMax = VectorMaxAbs( d );\n    LDLPivot pivot;\n    pivot.nb = 1;\n    pivot.from[0] = diagMax.index;\n    return pivot;\n}\n\n} // namespace pivot\n\ntemplate<typename F>\ninline void\nLUnblockedPivoted( Matrix<F>& A, Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::LUnblockedPivoted\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int i=0; i<n; ++i ) \n        pPerm.Set( i, 0, i );\n     \n    for( Int k=0; k<n; ++k )\n    {\n        // Determine the pivot\n        auto ABR = ViewRange( A, k, k, n, n );\n        const LDLPivot pivot = pivot::Full( ABR );\n\n        // Apply the pivot\n        const Int from = k + pivot.from[0];\n        HermitianSwap( LOWER, A, k, from );\n        RowSwap( pPerm, k, from );\n\n        // a21 := a21 / sqrt(alpha11)\n        const Base<F> delta11 = Sqrt(ABR.GetRealPart(0,0));\n        const Base<F> delta11Inv = Base<F>(1)/delta11;\n        ABR.Set(0,0,delta11);\n        auto a21 = ViewRange( ABR, 1, 0, n-k, 1 );\n        Scale( delta11Inv, a21 );\n\n        // A22 -= a21 a21'\n        auto A22 = ViewRange( ABR, 1, 1, n-k, n-k );\n        Her( LOWER, F(-1), a21, A22 );\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nLUnblockedPivoted( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::LUnblockedPivoted\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Grid() != pPerm.Grid() )\n            LogicError(\"A and pPerm must share the same grid\");\n    )\n    const Int n = A.Height();\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int iLoc=0; iLoc<pPerm.LocalHeight(); ++iLoc )\n        pPerm.SetLocal( iLoc, 0, pPerm.GlobalRow(iLoc) );\n\n    for( Int k=0; k<n; ++k )\n    {\n        // Determine the pivot\n        auto ABR = ViewRange( A, k, k, n, n );\n        const LDLPivot pivot = pivot::Full( ABR );\n\n        // Apply the pivot\n        const Int from = k + pivot.from[0];\n        HermitianSwap( LOWER, A, k, from );\n        RowSwap( pPerm, k, from );\n\n        // a21 := a21 / sqrt(alpha11)\n        const Base<F> delta11 = Sqrt(ABR.GetRealPart(0,0));\n        const Base<F> delta11Inv = Base<F>(1)/delta11;\n        ABR.Set(0,0,delta11);\n        auto a21 = ViewRange( ABR, 1, 0, n-k, 1 );\n        Scale( delta11Inv, a21 );\n\n        // A22 -= a21 a21'\n        auto A22 = ViewRange( ABR, 1, 1, n-k, n-k );\n        Her( LOWER, F(-1), a21, A22 );\n    }\n}\n\n// We must use a lazy algorithm so that the symmetric pivoting does not move\n// data from a fully-updated to partially-updated region (and vice-versa)\ntemplate<typename F>\ninline void\nLPanelPivoted\n( Matrix<F>& A, Matrix<Int>& pPerm, \n  Matrix<F>& X, Matrix<F>& Y, Int bsize, Int off=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::LPanelPivoted\"))\n    const Int n = A.Height();\n    DEBUG_ONLY(\n        if( A.Width() != n )\n            LogicError(\"A must be square\");\n        if( pPerm.Height() != n || pPerm.Width() != 1 )\n            LogicError(\"permutation vector is the wrong size\");\n    )\n    auto ABR = ViewRange( A, off, off, n, n );\n    Zeros( X, n-off, bsize );\n    Zeros( Y, n-off, bsize );\n\n    for( Int k=0; k<bsize; ++k )\n    {\n        // Determine the pivot \n        auto XTrail = ViewRange( X, k, 0, n-off, k );\n        auto YTrail = ViewRange( Y, k, 0, n-off, k );\n        auto ATrail = ViewRange( A, off+k, off+k, n, n );\n        const auto pivot = pivot::PanelFull( ATrail, XTrail, YTrail );\n        const Int from = (off+k) + pivot.from[0];\n        const Int to = off+k;\n\n        // Apply the pivot\n        HermitianSwap( LOWER, A, to, from );\n        RowSwap( XTrail, 0, pivot.from[0] );\n        RowSwap( YTrail, 0, pivot.from[0] );\n        RowSwap( pPerm, off+k, from );\n\n        // Update ABR(k:end,k) -= X(k:n-off-1,0:k-1) Y(k,0:k-1)^T\n        auto XB0 = LockedViewRange( X,   k, 0, n-off, k   );\n        auto y10 = LockedViewRange( Y,   k, 0, k+1,   k   );\n        auto aB1 =       ViewRange( ABR, k, k, n-off, k+1 );\n        Gemv( NORMAL, F(-1), XB0, y10, F(1), aB1 );\n        aB1.MakeReal(0,0);\n\n        // a21 := a21 / sqrt(alpha11)\n        const Base<F> delta11 = Sqrt(ABR.GetRealPart(k,k));\n        const Base<F> delta11Inv = Base<F>(1)/delta11;\n        ABR.SetRealPart(k,k,delta11);\n        auto a21 = ViewRange( ABR, k+1, k, n-off, k+1 );\n        Scale( delta11Inv, a21 );\n\n        // Store x21 := a21 and y21 := conj(a21)\n        auto x21 = ViewRange( X, k+1, k, n-off, k+1 );\n        auto y21 = ViewRange( Y, k+1, k, n-off, k+1 );\n        Conjugate( a21, y21 );\n        x21 = a21;\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nLPanelPivoted\n( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm, \n  DistMatrix<F,MC,STAR>& X, DistMatrix<F,MR,STAR>& Y, Int bsize, Int off=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::LPanelPivoted\"))\n    const Int n = A.Height();\n    DEBUG_ONLY(\n        if( A.Width() != n )\n            LogicError(\"A must be square\");\n        if( pPerm.Height() != n || pPerm.Width() != 1 )\n            LogicError(\"permutation vector is the wrong size\");\n    )\n    auto ABR = ViewRange( A, off, off, n, n );\n    X.AlignWith( ABR );\n    Y.AlignWith( ABR );\n    Zeros( X, n-off, bsize );\n    Zeros( Y, n-off, bsize );\n\n    for( Int k=0; k<bsize; ++k )\n    {\n        // Determine the pivot\n        auto XTrail = ViewRange( X, k, 0, n-off, k );\n        auto YTrail = ViewRange( Y, k, 0, n-off, k );\n        auto ATrail = ViewRange( A, off+k, off+k, n, n );\n        const auto pivot = pivot::PanelFull( ATrail, XTrail, YTrail );\n        const Int from = (off+k) + pivot.from[0];\n        const Int to = off+k;\n\n        // Apply the pivot\n        HermitianSwap( LOWER, A, to, from );\n        RowSwap( XTrail, 0, pivot.from[0] );\n        RowSwap( YTrail, 0, pivot.from[0] );\n        RowSwap( pPerm, off+k, from );\n\n        // ABR(k:end,k) -= X(k:n-off-1,0:k-1) Y(k,0:k-1)^T\n        auto aB1 = ViewRange( ABR, k, k, n-off, k+1 );\n        if( aB1.RowAlign() == aB1.RowRank() )\n        {\n            auto XB0 = LockedViewRange( X, k, 0, n-off, k );\n            auto y10 = LockedViewRange( Y, k, 0, k+1,   k );\n            LocalGemv( NORMAL, F(-1), XB0, y10, F(1), aB1 );\n        }\n        aB1.MakeReal(0,0);\n\n        // a21 := a21 / sqrt(alpha11)\n        const Base<F> delta11 = Sqrt(ABR.GetRealPart(k,k));\n        const Base<F> delta11Inv = Base<F>(1)/delta11;\n        ABR.SetRealPart(k,k,delta11);\n        auto a21 = ViewRange( ABR, k+1, k, n-off, k+1 );\n        Scale( delta11Inv, a21 );\n\n        // Store x21 := a21 and y21 := conj(a21)\n        auto x21 = ViewRange( X, k+1, k, n-off, k+1 );\n        auto y21 = ViewRange( Y, k+1, k, n-off, k+1 );\n        Conjugate( a21, y21 );\n        x21 = a21;\n    }\n}\n\ntemplate<typename F>\ninline void\nLVar3( Matrix<F>& A, Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::LVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int i=0; i<n; ++i )\n        pPerm.Set( i, 0, i );\n\n    Matrix<F> X, Y;\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        LPanelPivoted( A, pPerm, X, Y, nb, k );\n\n        // Update the bottom-right panel\n        auto XTrail = ViewRange( X, nb,   0,    n-k, nb );\n        auto YTrail = ViewRange( Y, nb,   0,    n-k, nb );\n        auto ATrail = ViewRange( A, k+nb, k+nb, n,   n  );\n        Trrk( LOWER, NORMAL, TRANSPOSE, F(-1), XTrail, YTrail, F(1), ATrail );\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nLVar3( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::LVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int iLoc=0; iLoc<pPerm.LocalHeight(); ++iLoc )\n        pPerm.SetLocal( iLoc, 0, pPerm.GlobalRow(iLoc) );\n\n    DistMatrix<F,MC,STAR> X( A.Grid() );\n    DistMatrix<F,MR,STAR> Y( A.Grid() );\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        LPanelPivoted( A, pPerm, X, Y, nb, k );\n\n        // Update the bottom-right panel\n        auto XTrail = ViewRange( X, nb,   0,    n-k, nb );\n        auto YTrail = ViewRange( Y, nb,   0,    n-k, nb );\n        auto ATrail = ViewRange( A, k+nb, k+nb, n,   n  );\n        LocalTrrk( LOWER, TRANSPOSE, F(-1), XTrail, YTrail, F(1), ATrail );\n    }\n}\n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_LVAR3PIVOTED_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/LVar3Square.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_LVAR3SQUARE_HPP\n#define ELEM_CHOLESKY_LVAR3SQUARE_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n// TODO: Reverse version\n\nnamespace elem {\nnamespace cholesky {\n\ntemplate<typename F>\ninline void\nLVar3Square( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::LVar3Square\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n        if( A.Grid().Height() != A.Grid().Width() )\n            LogicError(\"CholeskyLVar3Square requires a square process grid\");\n    )\n    // Find the process holding our transposed data\n    const Grid& g = A.Grid();\n    const Int transposeRank = \n        A.RowOwner(A.RowShift()) + A.ColStride()*A.ColOwner(A.ColShift());\n    const bool onDiagonal = ( transposeRank == g.VCRank() );\n\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,STAR,MC  > A21Trans_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A21Adj_STAR_MR(g);\n\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A21 = ViewRange( A, k+nb, k,    n,    k+nb );\n        auto A22 = ViewRange( A, k+nb, k+nb, n,    n    );\n\n        A11_STAR_STAR = A11;\n        LocalCholesky( LOWER, A11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        A21_VC_STAR.AlignWith( A22 );\n        A21_VC_STAR = A21;\n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), A11_STAR_STAR, A21_VC_STAR );\n\n        A21Trans_STAR_MC.AlignWith( A22 );\n        A21_VC_STAR.TransposePartialColAllGather( A21Trans_STAR_MC );\n        // SendRecv to form A21^T[* ,MR] from A21^T[* ,MC], then conjugate\n        // the buffer to form A21^H[* ,MR]\n        A21Adj_STAR_MR.AlignWith( A22 );\n        A21Adj_STAR_MR.Resize( A21.Width(), A21.Height() ); \n        {\n            if( onDiagonal )\n            { \n                const Int size = A11.Height()*A22.LocalWidth();\n                MemCopy\n                ( A21Adj_STAR_MR.Buffer(), \n                  A21Trans_STAR_MC.Buffer(), size );\n            }\n            else\n            {\n                const Int sendSize = A21.LocalHeight()*A21.Width();\n                const Int recvSize = A11.Height()*A22.LocalWidth();\n                // We know that the ldim is the height since we have manually \n                // created both temporary matrices.\n                mpi::SendRecv \n                ( A21Trans_STAR_MC.Buffer(), sendSize, transposeRank,\n                  A21Adj_STAR_MR.Buffer(),   recvSize, transposeRank,\n                  g.VCComm() );\n            }\n            Conjugate( A21Adj_STAR_MR );\n        }\n\n        // (A21^T[* ,MC])^T A21^H[* ,MR] = A21[MC,* ] A21^H[* ,MR]\n        //                               = (A21 A21^H)[MC,MR]\n        LocalTrrk\n        ( LOWER, TRANSPOSE, \n          F(-1), A21Trans_STAR_MC, A21Adj_STAR_MR, F(1), A22 );\n\n        A21.TransposeRowFilterFrom( A21Trans_STAR_MC );\n    }\n} \n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_LVAR3SQUARE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/SolveAfter.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_SOLVEAFTER_HPP\n#define ELEM_CHOLESKY_SOLVEAFTER_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_INVERTPERMUTATION_INC\n#include ELEM_PERMUTEROWS_INC\n\nnamespace elem {\nnamespace cholesky {\n\ntemplate<typename F> \ninline void\nSolveAfter\n( UpperOrLower uplo, Orientation orientation, const Matrix<F>& A, Matrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::SolveAfter\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    if( orientation == TRANSPOSE )\n        Conjugate( B );\n    if( uplo == LOWER )\n    {\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), A, B );\n    }\n    else\n    {\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n    }\n    if( orientation == TRANSPOSE )\n        Conjugate( B );\n}\n\ntemplate<typename F> \ninline void\nSolveAfter\n( UpperOrLower uplo, Orientation orientation, \n  const Matrix<F>& A, const Matrix<Int>& pPerm, Matrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::SolveAfter\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( pPerm.Height() != A.Height() )\n            LogicError(\"Permutation vector is wrong size\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    Matrix<Int> pInvPerm;\n    InvertPermutation( pPerm, pInvPerm );\n\n    PermuteRows( B, pPerm, pInvPerm );\n    if( orientation == TRANSPOSE )\n        Conjugate( B );\n    if( uplo == LOWER )\n    {\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), A, B );\n    }\n    else\n    {\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n    }\n    if( orientation == TRANSPOSE )\n        Conjugate( B );\n    PermuteRows( B, pInvPerm, pPerm );\n}\n\ntemplate<typename F> \ninline void\nSolveAfter\n( UpperOrLower uplo, Orientation orientation, \n  const DistMatrix<F>& A, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::SolveAfter\");\n        if( A.Grid() != B.Grid() )\n            LogicError(\"{A,B} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    if( orientation == TRANSPOSE )\n        Conjugate( B );\n    if( uplo == LOWER )\n    {\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), A, B );\n    }\n    else\n    {\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n    }\n    if( orientation == TRANSPOSE )\n        Conjugate( B );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nSolveAfter\n( UpperOrLower uplo, Orientation orientation, \n  const DistMatrix<F>& A, \n  const DistMatrix<Int,UPerm,STAR>& pPerm, \n        DistMatrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::SolveAfter\");\n        if( A.Grid() != B.Grid() )\n            LogicError(\"{A,B} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != pPerm.Height() )\n            LogicError(\"Permutation vector is wrong height\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    DistMatrix<Int,UPerm,STAR> pInvPerm(pPerm.Grid());\n    InvertPermutation( pPerm, pInvPerm );\n\n    PermuteRows( B, pPerm, pInvPerm );\n    if( orientation == TRANSPOSE )\n        Conjugate( B );\n    if( uplo == LOWER )\n    {\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), A, B );\n    }\n    else\n    {\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n    }\n    if( orientation == TRANSPOSE )\n        Conjugate( B );\n    PermuteRows( B, pInvPerm, pPerm );\n}\n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_SOLVEAFTER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/UMod.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_UMOD_HPP\n#define ELEM_CHOLESKY_UMOD_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n#include ELEM_REFLECTOR_INC\n#include ELEM_HYPERBOLICREFLECTOR_INC\n\n// TODO: Blocked algorithms\n\nnamespace elem {\nnamespace cholesky {\n\nnamespace mod {\n\ntemplate<typename F>\ninline void\nUUpdate( Matrix<F>& U, Matrix<F>& V )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::mod::UUpdate\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Cholesky factors must be square\");\n        if( V.Height() != U.Height() )\n            LogicError(\"V is the wrong height\");\n    )\n    const Int m = V.Height();\n    const Int n = V.Width();\n\n    Matrix<F> z12;\n\n    F* UBuf = U.Buffer();\n    const Int ldu = U.LDim();\n    for( Int k=0; k<m; ++k )\n    {\n        F& upsilon11 = UBuf[k+k*ldu];\n        auto u12 = ViewRange( U, k, k+1, k+1, m );\n\n        auto v1 = ViewRange( V, k,   0, k+1, n );\n        auto V2 = ViewRange( V, k+1, 0, m,   n );\n\n        // Find tau and w such that\n        //  /I - tau | 1 | | 1 w^H | \\ | upsilon11 | = | -beta |\n        //  \\        | w |           / | v1^H      |   | 0     |\n        // where beta >= 0\n        Conjugate( v1 );\n        const F tau = LeftReflector( upsilon11, v1 );\n\n        // Apply the negative of the Householder reflector from the left:\n        // | u12  | := -| u12  | + tau | 1 | | 1 w^H | | u12  |\n        // | V2^H |     | V2^H |       | w |           | V2^H |\n        //\n        //           = -| u12  | + tau | 1 | (u12 + w^H V2^H)\n        //              | V2^H |       | w |\n        // Thus,\n        //    u12 := -u12 + tau (u12 + w^H V2^H), and\n        //    V2^H := -V2^H + tau w (u12 + w^H V2^H),\n        //    V2   := -V2 + conj(tau) (u12^H + V2 w) w^H\n        //               \n        upsilon11 = -upsilon11;\n        Conjugate( u12, z12 );\n        Gemv( NORMAL, F(1), V2, v1, F(1), z12 );\n        Scale( F(-1), V2 );\n        Ger( Conj(tau), z12, v1, V2 );\n        Conjugate( z12 );\n        Scale( F(-1), u12 );\n        Axpy( tau, z12, u12 );\n    }\n}\n\ntemplate<typename F>\ninline void\nUUpdate( DistMatrix<F>& U, DistMatrix<F>& V )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::mod::UUpdate\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Cholesky factors must be square\");\n        if( V.Height() != U.Height() )\n            LogicError(\"V is the wrong height\");\n        if( U.Grid() != V.Grid() )\n            LogicError(\"U and V must have the same grid\");\n    )\n    const Int m = V.Height();\n    const Int n = V.Width();\n\n    const Grid& g = U.Grid();\n    DistMatrix<F,STAR,MC> z12_STAR_MC(g), b12_STAR_MC(g);\n    DistMatrix<F,STAR,MR> v1_STAR_MR(g);\n    for( Int k=0; k<m; ++k )\n    {\n        F upsilon11 = U.Get(k,k);\n        auto u12 = ViewRange( U, k, k+1, k+1, m );\n\n        auto v1 = ViewRange( V, k,   0, k+1, n );\n        auto V2 = ViewRange( V, k+1, 0, m,   n );\n\n        // Find tau and w such that\n        //  /I - tau | 1 | | 1 w^H | \\ | upsilon11 | = | -beta |\n        //  \\        | w |           / | v1^H      |   | 0     |\n        // where beta >= 0\n        Conjugate( v1 );\n        // LeftReflector assumes that v1 is a column-vector, so conjugate\n        // the RightReflector result\n        const F tau = RightReflector( upsilon11, v1 );\n        Conjugate( v1 );\n\n        // Apply the negative of the Householder reflector from the left:\n        // | u12  | := -| u12  | + tau | 1 | | 1 w^H | | u12  |\n        // | V2^H |     | V2^H |       | w |           | V2^H |\n        //\n        //           = -| u12  | + tau | 1 | (u12 + w^H V2^H)\n        //              | V2^H |       | w |\n        // Thus,\n        //    u12 := -u12 + tau (u12 + w^H V2^H), and\n        //    V2^H := -V2^H + tau w (u12 + w^H V2^H),\n        //    V2   := -V2 + conj(tau) (u12^H + V2 w) w^H\n        //               \n        U.Set( k, k, -upsilon11 );\n        z12_STAR_MC.AlignWith( V2 );\n        b12_STAR_MC.AlignWith( V2 );\n        v1_STAR_MR.AlignWith( V2 );\n        Conjugate( u12, z12_STAR_MC );\n        v1_STAR_MR = v1;\n        Zeros( b12_STAR_MC, 1, V2.Height() );\n        LocalGemv( NORMAL, F(1), V2, v1_STAR_MR, F(0), b12_STAR_MC );\n        b12_STAR_MC.SumOver( V2.RowComm() );\n        Axpy( F(1), b12_STAR_MC, z12_STAR_MC );\n        Scale( F(-1), V2 );\n        LocalGer( Conj(tau), z12_STAR_MC, v1_STAR_MR, V2 );\n        Conjugate( z12_STAR_MC );\n        Scale( F(-1), u12 );\n        Axpy( tau, z12_STAR_MC, u12 );\n    }\n}\n\ntemplate<typename F>\ninline void\nUDowndate( Matrix<F>& U, Matrix<F>& V )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::mod::UDowndate\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Cholesky factors must be square\");\n        if( V.Height() != U.Height() )\n            LogicError(\"V is the wrong height\");\n    )\n    const Int m = V.Height();\n    const Int n = V.Width();\n\n    Matrix<F> z12;\n\n    F* UBuf = U.Buffer();\n    const Int ldu = U.LDim();\n    for( Int k=0; k<m; ++k )\n    {\n        F& upsilon11 = UBuf[k+k*ldu];\n        auto u12 = ViewRange( U, k, k+1, k+1, m );\n\n        auto v1 = ViewRange( V, k,   0, k+1, n );\n        auto V2 = ViewRange( V, k+1, 0, m,   n );\n\n        // Find tau and w such that\n        //  /I - 1/tau | 1 | | 1 w^H | Sigma \\ | upsilon11 | = | -beta |\n        //  \\          | w |                 / | v1^H      |   | 0     |\n        // where Sigma = diag(+1,-1,...,-1) and beta >= 0\n        Conjugate( v1 );\n        const F tau = LeftHyperbolicReflector( upsilon11, v1 );\n\n        // Apply the negative of the Householder reflector from the left:\n        // | u12  | := -| u12  | + 1/tau | 1 | | 1 w^H | Sigma | u12  |\n        // | V2^H |     | V2^H |         | w |                 | V2^H |\n        //\n        //           = -| u12  | + 1/tau | 1 | (u12 - w^H V2^H)\n        //              | V2^H |         | w |\n        // Thus,\n        //    u12 := -u12 + 1/tau (u12 - w^H V2^H), and\n        //    V2^H := -V2^H + 1/tau w (u12 - w^H V2^H),\n        //    V2   := -V2 + 1/tau (u12^H - V2 w) w^H\n        //               \n        upsilon11 = -upsilon11;\n        Conjugate( u12, z12 );\n        Gemv( NORMAL, F(-1), V2, v1, F(1), z12 );\n        Scale( F(-1), u12 );\n        Scale( F(-1), V2 );\n        Ger( F(1)/tau, z12, v1, V2 );\n        Conjugate( z12 );\n        Axpy( F(1)/tau, z12, u12 );\n    }\n}\n\ntemplate<typename F>\ninline void\nUDowndate( DistMatrix<F>& U, DistMatrix<F>& V )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::mod::UDowndate\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Cholesky factors must be square\");\n        if( V.Height() != U.Height() )\n            LogicError(\"V is the wrong height\");\n        if( U.Grid() != V.Grid() )\n            LogicError(\"U and V must have the same grid\");\n    )\n    const Int m = V.Height();\n    const Int n = V.Width();\n\n    const Grid& g = U.Grid();\n    DistMatrix<F,STAR,MC> z12_STAR_MC(g), b12_STAR_MC(g);\n    DistMatrix<F,STAR,MR> v1_STAR_MR(g);\n    for( Int k=0; k<m; ++k )\n    {\n        F upsilon11 = U.Get(k,k);\n        auto u12 = ViewRange( U, k, k+1, k+1, m );\n\n        auto v1 = ViewRange( V, k,   0, k+1, n );\n        auto V2 = ViewRange( V, k+1, 0, m,   n );\n\n        // Find tau and w such that\n        //  /I - 1/tau | 1 | | 1 w^H | Sigma \\ | upsilon11 | = | -beta |\n        //  \\          | w |                 / | v1^H      |   | 0     |\n        // where Sigma = diag(+1,-1,...,-1) and beta >= 0\n        // Since LeftHyperbolicReflector expects v1 to be a column vector,\n        // use the Right variant and conjugate the result\n        Conjugate( v1 );\n        const F tau = RightHyperbolicReflector( upsilon11, v1 );\n        Conjugate( v1 );\n\n        // Apply the negative of the Householder reflector from the left:\n        // | u12  | := -| u12  | + 1/tau | 1 | | 1 w^H | Sigma | u12  |\n        // | V2^H |     | V2^H |         | w |                 | V2^H |\n        //\n        //           = -| u12  | + 1/tau | 1 | (u12 - w^H V2^H)\n        //              | V2^H |         | w |\n        // Thus,\n        //    u12 := -u12 + 1/tau (u12 - w^H V2^H), and\n        //    V2^H := -V2^H + 1/tau w (u12 - w^H V2^H),\n        //    V2   := -V2 + 1/tau (u12^H - V2 w) w^H\n        //               \n        U.Set( k, k, -upsilon11 );\n        z12_STAR_MC.AlignWith( V2 ); \n        b12_STAR_MC.AlignWith( V2 );\n        v1_STAR_MR.AlignWith( V2 );\n        Conjugate( u12, z12_STAR_MC );\n        v1_STAR_MR = v1;\n        Zeros( b12_STAR_MC, 1, V2.Height() );\n        LocalGemv( NORMAL, F(-1), V2, v1_STAR_MR, F(0), b12_STAR_MC );\n        b12_STAR_MC.SumOver( V2.RowComm() );\n        Axpy( F(1), b12_STAR_MC, z12_STAR_MC );\n        Scale( F(-1), u12 );\n        Scale( F(-1), V2 );\n        LocalGer( F(1)/tau, z12_STAR_MC, v1_STAR_MR, V2 );\n        Conjugate( z12_STAR_MC );\n        Axpy( F(1)/tau, z12_STAR_MC, u12 );\n    }\n}\n\n} // namespace mod\n\ntemplate<typename F>\ninline void\nUMod( Matrix<F>& U, Base<F> alpha, Matrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::UMod\"))\n    typedef Base<F> Real;\n    if( alpha == Real(0) )\n        return;\n    else if( alpha > Real(0) )\n    {\n        Scale( Sqrt(alpha), V );\n        mod::UUpdate( U, V );\n    }\n    else\n    {\n        Scale( Sqrt(-alpha), V );\n        mod::UDowndate( U, V );\n    }\n}\n\ntemplate<typename F>\ninline void\nUMod( DistMatrix<F>& U, Base<F> alpha, DistMatrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::UMod\"))\n    typedef Base<F> Real;\n    if( alpha == Real(0) )\n        return;\n    else if( alpha > Real(0) )\n    {\n        Scale( Sqrt(alpha), V );\n        mod::UUpdate( U, V );\n    }\n    else\n    {\n        Scale( Sqrt(-alpha), V );\n        mod::UDowndate( U, V );\n    }\n}\n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_UMOD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/UVar2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_UVAR2_HPP\n#define ELEM_CHOLESKY_UVAR2_HPP\n\n#include ELEM_GEMM_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include \"./UVar3.hpp\"\n\n// TODO: Reverse variants\n\nnamespace elem {\nnamespace cholesky {\n\ntemplate<typename F> \ninline void\nUVar2( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::UVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A01 = ViewRange( A, 0, k,    k,    k+nb );\n        auto A02 = ViewRange( A, 0, k+nb, k,    n    );\n        auto A11 = ViewRange( A, k, k,    k+nb, k+nb );\n        auto A12 = ViewRange( A, k, k+nb, k+nb, n    );\n\n        Herk( UPPER, ADJOINT, F(-1), A01, F(1), A11 );\n        cholesky::UVar3Unb( A11 );\n        Gemm( ADJOINT, NORMAL, F(-1), A02, A01, F(1), A12 );\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A11, A12 );\n    }\n}\n\ntemplate<typename F> \ninline void\nUVar2( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::UVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Grid& g = A.Grid();\n    DistMatrix<F,MC,  STAR> A01_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,MR,  STAR> X11Adj_MR_STAR(g);\n    DistMatrix<F,MR,  MC  > X11Adj_MR_MC(g);\n    DistMatrix<F,MR,  STAR> X12Adj_MR_STAR(g);\n    DistMatrix<F,MR,  MC  > X12Adj_MR_MC(g);\n    DistMatrix<F> X11(g), X12(g);\n\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A01 = ViewRange( A, 0, k,    k,    k+nb );\n        auto A02 = ViewRange( A, 0, k+nb, k,    n    );\n        auto A11 = ViewRange( A, k, k,    k+nb, k+nb );\n        auto A12 = ViewRange( A, k, k+nb, k+nb, n    );\n\n        A01_MC_STAR.AlignWith( A01 );\n        A01_MC_STAR = A01;\n        X11Adj_MR_STAR.AlignWith( A01 );\n        LocalGemm( ADJOINT, NORMAL, F(1), A01, A01_MC_STAR, X11Adj_MR_STAR );\n        X11Adj_MR_MC.AlignWith( A11 );\n        X11Adj_MR_MC.RowSumScatterFrom( X11Adj_MR_STAR );\n        X11.AlignWith( A11 );\n        Adjoint( X11Adj_MR_MC, X11 );\n        Axpy( F(-1), X11, A11 );\n\n        A11_STAR_STAR = A11;\n        LocalCholesky( UPPER, A11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        X12Adj_MR_STAR.AlignWith( A02 );\n        LocalGemm( ADJOINT, NORMAL, F(1), A02, A01_MC_STAR, X12Adj_MR_STAR );\n        X12Adj_MR_MC.AlignWith( A12 );\n        X12Adj_MR_MC.RowSumScatterFrom( X12Adj_MR_STAR );\n        X12.AlignWith( A12 );\n        Adjoint( X12Adj_MR_MC, X12 );\n        Axpy( F(-1), X12, A12 );\n\n        A12_STAR_VR = A12;\n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A11_STAR_STAR, A12_STAR_VR );\n        A12 = A12_STAR_VR;\n    }\n}\n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_UVAR2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/UVar3.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_UVAR3_HPP\n#define ELEM_CHOLESKY_UVAR3_HPP\n\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\nnamespace elem {\nnamespace cholesky {\n\ntemplate<typename F>\ninline void\nUVar3Unb( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::UVar3Unb\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Int lda = A.LDim();\n    F* ABuffer = A.Buffer();\n    for( Int j=0; j<n; ++j )\n    {\n        Real alpha = RealPart(ABuffer[j+j*lda]);\n        if( alpha <= Real(0) )\n            LogicError(\"A was not numerically HPD\");\n        alpha = Sqrt( alpha );\n        ABuffer[j+j*lda] = alpha;\n        \n        for( Int k=j+1; k<n; ++k )\n            ABuffer[j+k*lda] /= alpha;\n\n        for( Int k=j+1; k<n; ++k )\n            for( Int i=j+1; i<=k; ++i )\n                ABuffer[i+k*lda] -= Conj(ABuffer[j+i*lda])*ABuffer[j+k*lda];\n    }\n}\n\ntemplate<typename F>\ninline void\nReverseUVar3Unb( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::ReverseUVar3Unb\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Int lda = A.LDim();\n    F* ABuffer = A.Buffer();\n    for( Int j=n-1; j>=0; --j )\n    {\n        Real alpha = RealPart(ABuffer[j+j*lda]);\n        if( alpha <= Real(0) )\n            LogicError(\"A was not numerically HPD\");\n        alpha = Sqrt( alpha );\n        ABuffer[j+j*lda] = alpha;\n        \n        for( Int i=0; i<j; ++i )\n            ABuffer[i+j*lda] /= alpha;\n\n        for( Int i=0; i<j; ++i )\n            for( Int k=i; k<j; ++k )\n                ABuffer[i+k*lda] -= Conj(ABuffer[k+j*lda])*ABuffer[i+j*lda];\n    }\n}\n\ntemplate<typename F> \ninline void\nUVar3( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::UVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A12 = ViewRange( A, k,    k+nb, k+nb, n    );\n        auto A22 = ViewRange( A, k+nb, k+nb, n,    n    );\n\n        cholesky::UVar3Unb( A11 );\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A11, A12 );\n        Herk( UPPER, ADJOINT, F(-1), A12, F(1), A22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nReverseUVar3( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::ReverseUVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A00 = ViewRange( A, 0, 0, k,    k    );\n        auto A01 = ViewRange( A, 0, k, k,    k+nb );\n        auto A11 = ViewRange( A, k, k, k+nb, k+nb );\n\n        cholesky::ReverseUVar3Unb( A11 );\n        Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), A11, A01 );\n        Herk( UPPER, NORMAL, F(-1), A01, F(1), A00 );\n    }\n}\n\n\ntemplate<typename F> \ninline void\nUVar3( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::UVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Grid& g = A.Grid();\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,STAR,MC  > A12_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A12_STAR_MR(g);\n\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A12 = ViewRange( A, k,    k+nb, k+nb, n    );\n        auto A22 = ViewRange( A, k+nb, k+nb, n,    n    );\n\n        A11_STAR_STAR = A11;\n        LocalCholesky( UPPER, A11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        A12_STAR_VR.AlignWith( A22 );\n        A12_STAR_VR = A12;\n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A11_STAR_STAR, A12_STAR_VR );\n\n        A12_STAR_MC.AlignWith( A22 );\n        A12_STAR_MC = A12_STAR_VR;\n        A12_STAR_MR.AlignWith( A22 );\n        A12_STAR_MR = A12_STAR_VR;\n        LocalTrrk\n        ( UPPER, ADJOINT, F(-1), A12_STAR_MC, A12_STAR_MR, F(1), A22 );\n        A12 = A12_STAR_MR;\n    }\n}\n\ntemplate<typename F> \ninline void\nReverseUVar3( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::ReverseUVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices\");\n    )\n    const Grid& g = A.Grid();\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A01_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> A01_VR_STAR(g);\n    DistMatrix<F,STAR,MC  > A01Trans_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A01Adj_STAR_MR(g);\n\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A00 = ViewRange( A, 0, 0, k,    k    );\n        auto A01 = ViewRange( A, 0, k, k,    k+nb );\n        auto A11 = ViewRange( A, k, k, k+nb, k+nb );\n\n        A11_STAR_STAR = A11;\n        LocalReverseCholesky( UPPER, A11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        A01_VC_STAR.AlignWith( A00 );\n        A01_VC_STAR = A01;\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), A11_STAR_STAR, A01_VC_STAR );\n\n        A01_VR_STAR.AlignWith( A00 );\n        A01_VR_STAR = A01_VC_STAR; \n        A01Trans_STAR_MC.AlignWith( A00 );\n        A01Adj_STAR_MR.AlignWith( A00 );\n        A01_VC_STAR.TransposePartialColAllGather( A01Trans_STAR_MC );\n        A01_VR_STAR.AdjointPartialColAllGather( A01Adj_STAR_MR );\n        LocalTrrk\n        ( UPPER, TRANSPOSE, \n          F(-1), A01Trans_STAR_MC, A01Adj_STAR_MR, F(1), A00 );\n        A01.TransposeRowFilterFrom( A01Trans_STAR_MC );\n    }\n}\n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_UVAR3_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/UVar3Pivoted.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_UVAR3PIVOTED_HPP\n#define ELEM_CHOLESKY_UVAR3PIVOTED_HPP\n\n#include \"./LVar3Pivoted.hpp\"\n\nnamespace elem {\nnamespace cholesky {\n\ntemplate<typename F>\ninline void\nUUnblockedPivoted( Matrix<F>& A, Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::UUnblockedPivoted\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int i=0; i<n; ++i )\n        pPerm.Set( i, 0, i );\n     \n    for( Int k=0; k<n; ++k )\n    {\n        // Determine the pivot\n        auto ABR = ViewRange( A, k, k, n, n );\n        const LDLPivot pivot = pivot::Full( ABR );\n\n        // Apply the pivot\n        const Int from = k + pivot.from[0];\n        HermitianSwap( UPPER, A, k, from );\n        RowSwap( pPerm, k, from );\n\n        // a12 := a12 / sqrt(alpha11)\n        const Base<F> delta11 = Sqrt(ABR.GetRealPart(0,0));\n        const Base<F> delta11Inv = Base<F>(1)/delta11;\n        ABR.Set(0,0,delta11);\n        auto a12 = ViewRange( ABR, 0, 1, 1, n-k );\n        Scale( delta11Inv, a12 );\n\n        // A22 := A22 - a12' a12\n        auto A22 = ViewRange( ABR, 1, 1, n-k, n-k );\n        // NOTE: This is silly, but currently necessary\n        Conjugate( a12 );\n        Her( UPPER, -F(1), a12, A22 );\n        Conjugate( a12 );\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nUUnblockedPivoted( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::UUnblockedPivoted\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Grid() != pPerm.Grid() )\n            LogicError(\"A and pPerm must share the same grid\");\n    )\n    const Int n = A.Height();\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int iLoc=0; iLoc<pPerm.LocalHeight(); ++iLoc )\n        pPerm.SetLocal( iLoc, 0, pPerm.GlobalRow(iLoc) );\n\n    for( Int k=0; k<n; ++k )\n    {\n        // Determine the pivot \n        auto ABR = ViewRange( A, k, k, n, n );\n        const LDLPivot pivot = pivot::Full( ABR );\n\n        // Apply the pivot\n        const Int from = k + pivot.from[0];\n        HermitianSwap( UPPER, A, k, from );\n        RowSwap( pPerm, k, from );\n\n        // a12 := a12 / sqrt(alpha11)\n        const Base<F> delta11 = Sqrt(ABR.GetRealPart(0,0));\n        const Base<F> delta11Inv = Base<F>(1)/delta11;\n        ABR.Set(0,0,delta11);\n        auto a12 = ViewRange( ABR, 0, 1, 1,   n-k );\n        Scale( delta11Inv, a12 );\n\n        // A22 := A22 - a12' a12\n        auto A22 = ViewRange( ABR, 1, 1, n-k, n-k );\n        // NOTE: This is silly, but currently necessary\n        Conjugate( a12 );\n        Her( UPPER, -F(1), a12, A22 );\n        Conjugate( a12 );\n    }\n}\n\n// We must use a lazy algorithm so that the symmetric pivoting does not move\n// data from a fully-updated to partially-updated region (and vice-versa)\ntemplate<typename F>\ninline void\nUPanelPivoted\n( Matrix<F>& A, Matrix<Int>& pPerm, \n  Matrix<F>& X, Matrix<F>& Y, Int bsize, Int off=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::UPanelPivoted\"))\n    const Int n = A.Height();\n    DEBUG_ONLY(\n        if( A.Width() != n )\n            LogicError(\"A must be square\");\n        if( pPerm.Height() != n || pPerm.Width() != 1 )\n            LogicError(\"permutation vector is the wrong size\");\n    )\n    auto ABR = ViewRange( A, off, off, n, n );\n    Zeros( X, n-off, bsize );\n    Zeros( Y, n-off, bsize );\n\n    for( Int k=0; k<bsize; ++k )\n    {\n        // Determine the pivot \n        auto XTrail = ViewRange( X, k, 0, n-off, k );\n        auto YTrail = ViewRange( Y, k, 0, n-off, k );\n        auto ATrail = ViewRange( A, off+k, off+k, n, n );\n        const auto pivot = pivot::PanelFull( ATrail, XTrail, YTrail );\n        const Int from = (off+k) + pivot.from[0];\n        const Int to = off+k;\n\n        // Apply the pivot\n        HermitianSwap( UPPER, A, to, from );\n        RowSwap( XTrail, 0, pivot.from[0] );\n        RowSwap( YTrail, 0, pivot.from[0] );\n        RowSwap( pPerm, off+k, from );\n\n        // Update ABR(k,k:end) -= X(k,0:k-1) Y(k:n-off-1,0:k-1)^T\n        auto x10 = LockedViewRange( X,   k, 0, k+1,   k     );\n        auto YB0 = LockedViewRange( Y,   k, 0, n-off, k     );\n        auto a1R =       ViewRange( ABR, k, k, k+1,   n-off );\n        Gemv( NORMAL, F(-1), YB0, x10, F(1), a1R );\n        a1R.MakeReal(0,0);\n\n        // a12 := a12 / sqrt(alpha11)\n        const Base<F> delta11 = Sqrt(ABR.GetRealPart(k,k));\n        const Base<F> delta11Inv = Base<F>(1)/delta11;\n        ABR.Set(k,k,delta11);\n        auto a12 = ViewRange( ABR, k, k+1, k+1, n-off );\n        Scale( delta11Inv, a12 );\n\n        // Store x21 := a12' and y21 := a12^T\n        auto x21 = ViewRange( X, k+1, k, n-off, k+1 );\n        auto y21 = ViewRange( Y, k+1, k, n-off, k+1 );\n        Adjoint( a12, x21 );\n        Transpose( a12, y21 );\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nUPanelPivoted\n( DistMatrix<F>& A, \n  DistMatrix<Int,UPerm,STAR>& pPerm, \n  DistMatrix<F,MC,STAR>& X, \n  DistMatrix<F,MR,STAR>& Y, Int bsize, Int off=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"cholesky::UPanelPivoted\"))\n    const Int n = A.Height();\n    DEBUG_ONLY(\n        if( A.Width() != n )\n            LogicError(\"A must be square\");\n        if( pPerm.Height() != n || pPerm.Width() != 1 )\n            LogicError(\"pivot vector is the wrong size\");\n    )\n    auto ABR = ViewRange( A, off, off, n, n );\n    X.AlignWith( ABR );\n    Y.AlignWith( ABR );\n    Zeros( X, n-off, bsize );\n    Zeros( Y, n-off, bsize );\n\n    for( Int k=0; k<bsize; ++k )\n    {\n        // Determine the pivot\n        auto XTrail = ViewRange( X, k, 0, n-off, k );\n        auto YTrail = ViewRange( Y, k, 0, n-off, k );\n        auto ATrail = ViewRange( A, off+k, off+k, n, n );\n        const auto pivot = pivot::PanelFull( ATrail, XTrail, YTrail );\n        const Int from = (off+k) + pivot.from[0];\n        const Int to = off+k;\n\n        // Apply the pivot\n        HermitianSwap( UPPER, A, to, from );\n        RowSwap( XTrail, 0, pivot.from[0] );\n        RowSwap( YTrail, 0, pivot.from[0] );\n        RowSwap( pPerm, off+k, from );\n\n        // Update ABR(k,k:end) -= X(k,0:k-1) Y(k:n-off-1,0:k-1)^T\n        auto a1R = ViewRange( ABR, k, k, k+1, n-off );\n        if( a1R.ColAlign() == a1R.ColRank() )\n        {\n            auto x10 = LockedViewRange( X, k, 0, k+1,   k );\n            auto YB0 = LockedViewRange( Y, k, 0, n-off, k );\n            LocalGemv( NORMAL, F(-1), YB0, x10, F(1), a1R );\n        }\n        a1R.MakeReal(0,0);\n\n        // a12 := a12 / sqrt(alpha11)\n        const Base<F> delta11 = Sqrt(ABR.GetRealPart(k,k));\n        const Base<F> delta11Inv = Base<F>(1)/delta11;\n        ABR.Set(k,k,delta11);\n        auto a12 = ViewRange( ABR, k, k+1, k+1, n-off );\n        Scale( delta11Inv, a12 );\n\n        // Store x21 := a12' and y21 := a12^T\n        auto x21 = ViewRange( X, k+1, k, n-off, k+1 );\n        auto y21 = ViewRange( Y, k+1, k, n-off, k+1 );\n        Adjoint( a12, x21 );\n        Transpose( a12, y21 );\n    }\n}\n\ntemplate<typename F>\ninline void\nUVar3( Matrix<F>& A, Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::UVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int i=0; i<n; ++i )\n        pPerm.Set( i, 0, i );\n\n    Matrix<F> X, Y;\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        UPanelPivoted( A, pPerm, X, Y, nb, k );\n\n        // Update the bottom-right panel\n        auto XTrail = ViewRange( X, nb,   0,    n-k, nb );\n        auto YTrail = ViewRange( Y, nb,   0,    n-k, nb );\n        auto ATrail = ViewRange( A, k+nb, k+nb, n,   n  );\n        Trrk( UPPER, NORMAL, TRANSPOSE, F(-1), XTrail, YTrail, F(1), ATrail );\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nUVar3( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::UVar3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int iLoc=0; iLoc<pPerm.LocalHeight(); ++iLoc )\n        pPerm.SetLocal( iLoc, 0, pPerm.GlobalRow(iLoc) );\n\n    DistMatrix<F,MC,STAR> X( A.Grid() );\n    DistMatrix<F,MR,STAR> Y( A.Grid() );\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        UPanelPivoted( A, pPerm, X, Y, nb, k );\n\n        // Update the bottom-right panel\n        auto XTrail = ViewRange( X, nb,   0,    n-k, nb );\n        auto YTrail = ViewRange( Y, nb,   0,    n-k, nb );\n        auto ATrail = ViewRange( A, k+nb, k+nb, n,   n  );\n        LocalTrrk( UPPER, TRANSPOSE, F(-1), XTrail, YTrail, F(1), ATrail );\n    }\n}\n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_UVAR3PIVOTED_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky/UVar3Square.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_UVAR3SQUARE_HPP\n#define ELEM_CHOLESKY_UVAR3SQUARE_HPP\n\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n// TODO: Reverse version\n\nnamespace elem {\nnamespace cholesky {\n\ntemplate<typename F>\ninline void\nUVar3Square( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"cholesky::UVar3Square\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Can only compute Cholesky factor of square matrices.\");\n        if( A.Grid().Height() != A.Grid().Width() )\n            LogicError(\"CholeskyUVar3Square assumes a square process grid.\");\n    )\n    // Find the process holding our transposed data\n    const Grid& g = A.Grid();\n    const Int transposeRank =\n        A.RowOwner(A.RowShift()) + A.ColStride()*A.ColOwner(A.ColShift());\n    const bool onDiagonal = ( transposeRank == g.VCRank() );\n\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,STAR,MC  > A12_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A12_STAR_MR(g);\n\n    const Int n = A.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A12 = ViewRange( A, k,    k+nb, k+nb, n    );\n        auto A22 = ViewRange( A, k+nb, k+nb, n,    n    );\n\n        A11_STAR_STAR = A11;\n        LocalCholesky( UPPER, A11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        A12_STAR_VR.AlignWith( A22 );\n        A12_STAR_VR = A12;\n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A11_STAR_STAR, A12_STAR_VR );\n\n        A12_STAR_MR.AlignWith( A22 );\n        A12_STAR_MR = A12_STAR_VR;\n        // SendRecv to form A12[* ,MC] from A12[* ,MR]\n        A12_STAR_MC.AlignWith( A22 );\n        A12_STAR_MC.Resize( A12.Height(), A12.Width() );\n        {\n            if( onDiagonal )\n            {\n                const Int size = A12.Height()*A12.LocalWidth();\n                MemCopy\n                ( A12_STAR_MC.Buffer(), \n                  A12_STAR_MR.Buffer(), size );\n            }\n            else\n            {\n                const Int sendSize = A12.Height()*A12.LocalWidth();\n                const Int recvSize = A22.LocalHeight()*A11.Width();\n                // We know that the ldim is the height since we have manually\n                // created both temporary matrices.\n                mpi::SendRecv\n                ( A12_STAR_MR.Buffer(), sendSize, transposeRank,\n                  A12_STAR_MC.Buffer(), recvSize, transposeRank, g.VCComm() );\n            }\n        }\n        LocalTrrk\n        ( UPPER, ADJOINT, F(-1), A12_STAR_MC, A12_STAR_MR, F(1), A22 );\n        A12 = A12_STAR_MR;\n    }\n}\n\n} // namespace cholesky\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_UVAR3SQUARE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Cholesky.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_HPP\n#define ELEM_CHOLESKY_HPP\n\n// TODO: Reorganize Cholesky implementation?\nnamespace elem {\ntemplate<typename F>\nvoid LocalCholesky( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A );\ntemplate<typename F>\nvoid LocalReverseCholesky( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A );\n} // namespace elem\n\n#include \"./Cholesky/LVar3.hpp\"\n#include \"./Cholesky/LVar3Square.hpp\"\n#include \"./Cholesky/LVar3Pivoted.hpp\"\n#include \"./Cholesky/UVar3.hpp\"\n#include \"./Cholesky/UVar3Square.hpp\"\n#include \"./Cholesky/UVar3Pivoted.hpp\"\n#include \"./Cholesky/SolveAfter.hpp\"\n\n#include \"./Cholesky/LMod.hpp\"\n#include \"./Cholesky/UMod.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nLocalCholesky( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalCholesky\"))\n    Cholesky( uplo, A.Matrix() );\n}\n\ntemplate<typename F>\ninline void\nLocalReverseCholesky( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalReverseCholesky\"))\n    ReverseCholesky( uplo, A.Matrix() );\n}\n\n// TODO: Pivoted Reverse Cholesky?\n\ntemplate<typename F>\ninline void\nCholesky( UpperOrLower uplo, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Cholesky\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( uplo == LOWER )\n        cholesky::LVar3( A );\n    else\n        cholesky::UVar3( A );\n}\n\ntemplate<typename F>\ninline void\nCholesky( UpperOrLower uplo, Matrix<F>& A, Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Cholesky\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( uplo == LOWER )\n        cholesky::LVar3( A, pPerm );\n    else\n        cholesky::UVar3( A, pPerm );\n}\n\ntemplate<typename F>\ninline void\nReverseCholesky( UpperOrLower uplo, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ReverseCholesky\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    if( uplo == LOWER )\n        cholesky::ReverseLVar3( A );\n    else\n        cholesky::ReverseUVar3( A );\n}\n\ntemplate<typename F> \ninline void\nCholesky( UpperOrLower uplo, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Cholesky\"))\n    const Grid& g = A.Grid();\n    if( g.Height() == g.Width() )\n    {\n        if( uplo == LOWER )\n            cholesky::LVar3Square( A );\n        else\n            cholesky::UVar3Square( A );\n    }\n    else\n    {\n        if( uplo == LOWER )\n            cholesky::LVar3( A );\n        else\n            cholesky::UVar3( A );\n    }\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nCholesky\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Cholesky\"))\n    if( uplo == LOWER )\n        cholesky::LVar3( A, pPerm );\n    else\n        cholesky::UVar3( A, pPerm );\n}\n\ntemplate<typename F> \ninline void\nReverseCholesky( UpperOrLower uplo, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ReverseCholesky\"))\n    if( uplo == LOWER )\n        cholesky::ReverseLVar3( A );\n    else\n        cholesky::ReverseUVar3( A );\n    /*\n    const Grid& g = A.Grid();\n    if( g.Height() == g.Width() )\n    {\n        if( uplo == LOWER )\n            cholesky::ReverseLVar3Square( A );\n        else\n            cholesky::ReverseUVar3Square( A );\n    }\n    else\n    {\n        if( uplo == LOWER )\n            cholesky::ReverseLVar3( A );\n        else\n            cholesky::ReverseUVar3( A );\n    }\n    */\n}\n\n// Either \n//         L' L'^H := L L^H + alpha V V^H\n// or\n//         U'^H U' := U^H U + alpha V V^H\ntemplate<typename F>\ninline void\nCholeskyMod( UpperOrLower uplo, Matrix<F>& T, Base<F> alpha, Matrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CholeskyMod\"))\n    if( alpha == Base<F>(0) )\n        return;\n    if( uplo == LOWER )\n        cholesky::LMod( T, alpha, V );\n    else\n        cholesky::UMod( T, alpha, V );\n}\n\ntemplate<typename F>\ninline void\nCholeskyMod\n( UpperOrLower uplo, DistMatrix<F>& T, Base<F> alpha, DistMatrix<F>& V )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CholeskyMod\"))\n    if( alpha == Base<F>(0) )\n        return;\n    if( uplo == LOWER )\n        cholesky::LMod( T, alpha, V );\n    else\n        cholesky::UMod( T, alpha, V );\n}\n\n} // namespace elem\n\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_MAKETRIANGULAR_INC\n\n#include ELEM_LQ_INC\n#include ELEM_QR_INC\n\n#include ELEM_SQUAREROOT_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nHPSDCholesky( UpperOrLower uplo, Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPSDCholesky\"))\n    HPSDSquareRoot( uplo, A );\n    MakeHermitian( uplo, A );\n\n    if( uplo == LOWER )\n    {\n        LQ( A );\n        MakeTriangular( LOWER, A );\n    }\n    else\n    {\n        QR( A );\n        MakeTriangular( UPPER, A );\n    }\n}\n\ntemplate<typename F>\ninline void\nHPSDCholesky( UpperOrLower uplo, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPSDCholesky\"))\n\n    HPSDSquareRoot( uplo, A );\n    MakeHermitian( uplo, A );\n\n    if( uplo == LOWER )\n    {\n        LQ( A );\n        MakeTriangular( LOWER, A );\n    }\n    else\n    {\n        QR( A );\n        MakeTriangular( UPPER, A );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CHOLESKY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/GQR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GQR_HPP\n#define ELEM_GQR_HPP\n\n#include ELEM_QR_INC\n#include ELEM_RQ_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nGQR( Matrix<F>& A, Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GQR\"))\n    Matrix<F> tA;\n    Matrix<Base<F>> dA;\n    qr::Householder( A, tA, dA );\n    qr::ApplyQ( LEFT, ADJOINT, A, tA, dA, B );\n    MakeTriangular( UPPER, A );\n    rq::Householder( B );\n}\n\ntemplate<typename F> \ninline void\nGQR( DistMatrix<F>& A, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GQR\"))\n    const Grid& g = A.Grid();\n    DistMatrix<F> tA(g);\n    DistMatrix<Base<F>> dA(g);\n    qr::Householder( A, tA, dA );\n    qr::ApplyQ( LEFT, ADJOINT, A, tA, dA, B );\n    MakeTriangular( UPPER, A );\n    rq::Householder( B );\n}\n\ntemplate<typename F> \ninline void\nGQR\n( Matrix<F>& A, Matrix<F>& tA, Matrix<Base<F>>& dA, \n  Matrix<F>& B, Matrix<F>& tB, Matrix<Base<F>>& dB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GQR\"))\n    qr::Householder( A, tA, dA );\n    qr::ApplyQ( LEFT, ADJOINT, A, tA, dA, B );\n    rq::Householder( B, tB, dB );\n}\n\ntemplate<typename F> \ninline void\nGQR\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& tA, DistMatrix<Base<F>,MD,STAR>& dA,\n  DistMatrix<F>& B, DistMatrix<F,MD,STAR>& tB, DistMatrix<Base<F>,MD,STAR>& dB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GQR\"))\n    qr::Householder( A, tA, dA );\n    qr::ApplyQ( LEFT, ADJOINT, A, tA, dA, B );\n    rq::Householder( B, tB, dB );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GQR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/GRQ.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GRQ_HPP\n#define ELEM_GRQ_HPP\n\n#include ELEM_QR_INC\n#include ELEM_RQ_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nGRQ( Matrix<F>& A, Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GRQ\"))\n    Matrix<F> tA;\n    Matrix<Base<F>> dA;\n    rq::Householder( A, tA, dA );\n    rq::ApplyQ( RIGHT, ADJOINT, A, tA, dA, B );\n    MakeTrapezoidal( UPPER, A, Min(A.Height(),A.Width()) );\n    qr::Householder( B );\n}\n\ntemplate<typename F> \ninline void\nGRQ( DistMatrix<F>& A, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GRQ\"))\n    const Grid& g = A.Grid();\n    DistMatrix<F> tA(g);\n    DistMatrix<Base<F>> dA(g);\n    rq::Householder( A, tA, dA );\n    rq::ApplyQ( RIGHT, ADJOINT, A, tA, dA, B );\n    MakeTrapezoidal( UPPER, A, Min(A.Height(),A.Width()) );\n    qr::Householder( B );\n}\n\ntemplate<typename F> \ninline void\nGRQ\n( Matrix<F>& A, Matrix<F>& tA, Matrix<Base<F>>& dA, \n  Matrix<F>& B, Matrix<F>& tB, Matrix<Base<F>>& dB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GRQ\"))\n    rq::Householder( A, tA, dA );\n    rq::ApplyQ( RIGHT, ADJOINT, A, tA, dA, B );\n    qr::Householder( B, tB, dB );\n}\n\ntemplate<typename F> \ninline void\nGRQ\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& tA, DistMatrix<Base<F>,MD,STAR>& dA,\n  DistMatrix<F>& B, DistMatrix<F,MD,STAR>& tB, DistMatrix<Base<F>,MD,STAR>& dB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GRQ\"))\n    rq::Householder( A, tA, dA );\n    rq::ApplyQ( RIGHT, ADJOINT, A, tA, dA, B );\n    qr::Householder( B, tB, dB );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GRQ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/ID.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_ID_HPP\n#define ELEM_ID_HPP\n\n#include ELEM_QR_BUSINGERGOLUB_INC\n\n// TODO: Add detailed references to Tygert et al.'s ID package and the papers\n//       \"Randomized algorithms for the low-rank approximation of matrices\", \n//       \"A randomized algorithm for principal component analysis\", and \n//       \"On the compression of low-rank matrices\"\n\nnamespace elem {\n\nnamespace id {\n\ntemplate<typename F>\ninline void\nPseudoTrsm( const Matrix<F>& RL, Matrix<F>& RR, Base<F> tol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"id::PseudoTrsm\"))\n    typedef Base<F> Real;\n    const Int m = RR.Height();\n    const Int n = RR.Width();\n\n    // Compute the spectral radius of the triangular matrix\n    Real maxAbsEig = 0;\n    for( Int i=0; i<m; ++i )\n        maxAbsEig = std::max( maxAbsEig, Abs(RL.Get(i,i)) );\n\n    for( Int i=m-1; i>=0; --i )\n    {\n        // Apply the pseudo-inverse of the i'th diagonal value of RL \n        const F rho = RL.Get(i,i);\n        const Real rhoAbs = Abs(rho);\n        if( rhoAbs >= tol*maxAbsEig )\n        {\n            for( Int j=0; j<n; ++j ) \n            {\n                const F zeta = RR.Get(i,j);\n                RR.Set(i,j,zeta/rho);\n            }\n        }\n        else\n        {\n            for( Int j=0; j<n; ++j )\n                RR.Set(i,j,0);\n        }\n\n        // Now update RR using an outer-product of the column of RL above the \n        // i'th diagonal with the i'th row of RR\n        blas::Geru\n        ( i, n, \n          F(-1), RL.LockedBuffer(0,i), 1, RR.LockedBuffer(i,0), RR.LDim(), \n                 RR.Buffer(0,0), RR.LDim() );\n    }\n}\n\n// For now, assume that RL is sufficiently small and give each process a full\n// copy so that we may independently apply its pseudoinverse to each column of\n// RR\ntemplate<typename F>\ninline void\nPseudoTrsm( const DistMatrix<F>& RL, DistMatrix<F,STAR,VR>& RR, Base<F> tol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"id::PseudoTrsm\"))\n    DistMatrix<F,STAR,STAR> RL_STAR_STAR( RL );\n    PseudoTrsm( RL_STAR_STAR.Matrix(), RR.Matrix(), tol );\n}\n\n// On output, the matrix Z contains the non-trivial portion of the interpolation\n// matrix, and p contains the pivots used during the iterations of \n// pivoted QR. Either 'maxSteps' iterations are reached, or a pivot value less \n// than or equal to tol times the original pivot value was found. \n// The input matrix A is unchanged.\n\ntemplate<typename F> \ninline void\nBusingerGolub\n( Matrix<F>& A, Matrix<Int>& pPerm, Matrix<F>& Z, Int maxSteps, Base<F> tol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"id::BusingerGolub\"))\n    typedef Base<F> Real;\n    const Int n = A.Width();\n\n    // Perform the pivoted QR factorization\n    const Int numSteps = qr::BusingerGolub( A, pPerm, maxSteps, tol );\n\n    Real pinvTol;\n    if( tol < Real(0) )\n    {\n        const Real epsilon = lapack::MachineEpsilon<Real>();\n        pinvTol = numSteps*epsilon;\n    }\n    else\n        pinvTol = tol;\n\n    // Now form a minimizer of || RL Z - RR ||_2 via pseudo triangular solves\n    auto RL = LockedViewRange( A, 0, 0,        numSteps, numSteps );\n    auto RR = LockedViewRange( A, 0, numSteps, numSteps, n        );\n    Z = RR;\n    PseudoTrsm( RL, Z, pinvTol );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nBusingerGolub\n( DistMatrix<F>& A, \n  DistMatrix<Int,UPerm,STAR>& pPerm, \n  DistMatrix<F,STAR,VR>& Z, \n  Int maxSteps, Base<F> tol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"id::BusingerGolub\"))\n    typedef Base<F> Real;\n    const Int n = A.Width();\n\n    // Perform the pivoted QR factorization on a copy of A\n    const Int numSteps = qr::BusingerGolub( A, pPerm, maxSteps, tol );\n\n    Real pinvTol;\n    if( tol < Real(0) )\n    {\n        const Real epsilon = lapack::MachineEpsilon<Real>();\n        pinvTol = numSteps*epsilon;\n    }\n    else\n        pinvTol = tol;\n\n    // Now form a minimizer of || RL Z - RR ||_2 via pseudo triangular solves\n    auto RL = LockedViewRange( A, 0, 0,        numSteps, numSteps );\n    auto RR = LockedViewRange( A, 0, numSteps, numSteps, n        );\n    Z = RR;\n    PseudoTrsm( RL, Z, pinvTol );\n}\n\n} // namespace id\n\ntemplate<typename F> \ninline void\nID\n( const Matrix<F>& A, Matrix<Int>& pPerm, Matrix<F>& Z, \n  Int maxSteps, Base<F> tol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ID\"))\n    Matrix<F> B( A );\n    id::BusingerGolub( B, pPerm, Z, maxSteps, tol );\n}\n\ntemplate<typename F> \ninline void\nID\n( Matrix<F>& A, Matrix<Int>& pPerm, Matrix<F>& Z, \n  Int maxSteps, Base<F> tol, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ID\"))\n    Matrix<F> B;\n    if( canOverwrite )\n        View( B, A );\n    else\n        B = A;\n    id::BusingerGolub( B, pPerm, Z, maxSteps, tol );\n}\n\ntemplate<typename F> \ninline void\nID( const Matrix<F>& A, Matrix<Int>& pPerm, Matrix<F>& Z, Int numSteps )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ID\"))\n    ID( A, pPerm, Z, numSteps, Base<F>(-1) );\n}\n\ntemplate<typename F> \ninline void\nID\n( Matrix<F>& A, Matrix<Int>& pPerm, Matrix<F>& Z, Int numSteps, \n  bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ID\"))\n    ID( A, pPerm, Z, numSteps, Base<F>(-1), canOverwrite );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nID\n( const DistMatrix<F>& A, \n        DistMatrix<Int,UPerm,STAR>& pPerm, \n        DistMatrix<F,STAR,VR>& Z, \n  Int maxSteps, Base<F> tol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ID\"))\n    DistMatrix<F> B( A );\n    id::BusingerGolub( B, pPerm, Z, maxSteps, tol );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nID\n( DistMatrix<F>& A, \n  DistMatrix<Int,UPerm,STAR>& pPerm, \n  DistMatrix<F,STAR,VR>& Z, \n  Int maxSteps, Base<F> tol, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ID\"))\n    DistMatrix<F> B( A.Grid() );\n    if( canOverwrite )\n        View( B, A );\n    else\n        B = A;\n    id::BusingerGolub( B, pPerm, Z, maxSteps, tol );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nID\n( const DistMatrix<F>& A, \n        DistMatrix<Int,UPerm,STAR>& pPerm, \n        DistMatrix<F,STAR,VR>& Z, \n  Int numSteps )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ID\"))\n    ID( A, pPerm, Z, numSteps, Base<F>(-1) );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nID\n( DistMatrix<F>& A, \n  DistMatrix<Int,UPerm,STAR>& pPerm, \n  DistMatrix<F,STAR,VR>& Z, \n  Int numSteps, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ID\"))\n    ID( A, pPerm, Z, numSteps, Base<F>(-1), canOverwrite );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_ID_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LDL/Inertia.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LDL_INERTIA_HPP\n#define ELEM_LDL_INERTIA_HPP\n\n// See Bunch and Kaufman's \"Some Stable Methods for Calculating Inertia and\n// Solving Symmetric Linear Systems\", Mathematics of Computation, 1977.\n//\n// The main insight for computing the inertia is that all 2x2 pivot blocks \n// produced by Bunch-Kaufman pivoting have both a negative and positive \n// eigenvalue (since the off-diagonal value is larger in magnitude than the two\n// diagonal values), and so, if the 1x1 portion of D has a positive, b negative,\n// and c zero values, and there are q 2x2 pivots, then the inertia is \n// (a+q,b+q,c).\n\nnamespace elem {\nnamespace ldl {\n\ntemplate<typename F>\ninline InertiaType\nInertia( const Matrix<Base<F>>& d, const Matrix<F>& dSub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::Inertia\"))\n    typedef Base<F> Real;\n    const Int n = d.Height();\n    DEBUG_ONLY(\n        if( n != 0 && dSub.Height() != n-1 )\n            LogicError(\"dSub was the wrong length\");\n    )\n    InertiaType inertia;\n    inertia.numPositive = inertia.numNegative = inertia.numZero = 0;\n\n    Int k=0;\n    while( k < n )\n    {\n        const Int nb = ( k<n-1 && dSub.Get(k,0) != F(0) ? 2 : 1 );\n        if( nb == 1 )\n        {\n            const Real delta = d.Get(k,0);\n            if( delta > Real(0) )\n                ++inertia.numPositive; \n            else if( delta < Real(0) )\n                ++inertia.numNegative;\n            else\n                ++inertia.numZero;\n        } \n        else\n        {\n            ++inertia.numPositive;\n            ++inertia.numNegative;\n        }\n\n        k += nb;\n    }\n\n    return inertia;\n}\n\ntemplate<typename F>\ninline InertiaType\nInertia\n( const DistMatrix<Base<F>,MC,STAR>& d, \n  const DistMatrix<Base<F>,MC,STAR>& dPrev, \n  const DistMatrix<F,MC,STAR>& dSub, \n  const DistMatrix<F,MC,STAR>& dSubPrev )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::Inertia\"))\n    typedef Base<F> Real;\n\n    const Int n = d.Height();\n    DEBUG_ONLY(\n        if( dPrev.Height() != n )\n            LogicError(\"dPrev was the wrong length\");\n        if( n != 0 )\n        {\n            if( dSub.Height() != n-1 || dSubPrev.Height() != n-1 )\n                LogicError(\"dSub or dSubPrev was wrong length\");\n        }\n    )\n\n    const Int colStride = d.ColStride();\n    DEBUG_ONLY(\n        const Int colAlign = d.ColAlign();\n        const Int colAlignPrev = (colAlign+1) % colStride;\n        if( dSub.ColAlign() != colAlign )\n            LogicError(\"dSub was improperly aligned\");\n        if( dPrev.ColAlign() != colAlignPrev )\n            LogicError(\"dPrev was improperly aligned\");\n        if( dSubPrev.ColAlign() != colAlignPrev )\n            LogicError(\"dSubPrev was improperly aligned\");\n    )\n\n    // It is best to separate the case where colStride is 1\n    if( colStride == 1 )\n        return Inertia( d.LockedMatrix(), dSub.LockedMatrix() );\n\n    const Int mLocal = d.LocalHeight();\n    const Int prevOff = ( dPrev.ColShift()==d.ColShift()-1 ? 0 : -1 );\n    InertiaType locInert;\n    locInert.numPositive = locInert.numNegative = locInert.numZero = 0;\n    for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n    {\n        const Int i = d.GlobalRow(iLoc);\n        const Int iLocPrev = iLoc + prevOff;\n\n        if( i<n-1 && dSub.GetLocal(iLoc,0) != F(0) )\n        {\n            // Handle 2x2 starting at i\n            ++locInert.numPositive;\n            ++locInert.numNegative;\n        }\n        else if( i>0 && dSubPrev.GetLocal(iLocPrev,0) != F(0) )\n        {\n            // Handle 2x2 starting at i-1\n            // (Do nothing: 2x2 block assigned to different member of MC team)\n        }\n        else\n        {\n            // Handle 1x1\n            const Real delta = d.GetLocal(iLoc,0);\n            if( delta > 0 )\n                ++locInert.numPositive;\n            else if( delta < 0 )\n                ++locInert.numNegative;\n            else\n                ++locInert.numZero;\n        }\n    }\n\n    // TODO: Combine into single communication\n    InertiaType inertia;\n    inertia.numPositive = mpi::AllReduce( locInert.numPositive, d.ColComm() );\n    inertia.numNegative = mpi::AllReduce( locInert.numNegative, d.ColComm() );\n    inertia.numZero     = mpi::AllReduce( locInert.numZero,     d.ColComm() );\n\n    return inertia;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline InertiaType\nInertia( const DistMatrix<Base<F>,U,V>& d, const DistMatrix<F,U,V>& dSub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::Inertia\"))\n    typedef Base<F> Real;\n    const Grid& g = d.Grid();\n    const Int colStride = g.Height();\n\n    DistMatrix<Real,MC,STAR> d_MC_STAR(g);\n    DistMatrix<F,MC,STAR> dSub_MC_STAR(g);\n    d_MC_STAR.AlignCols( 0 );\n    dSub_MC_STAR.AlignCols( 0 );\n    d_MC_STAR = d;\n    dSub_MC_STAR = dSub;\n\n    // Handle the easy case\n    if( colStride == 1 )\n        return Inertia( d_MC_STAR.LockedMatrix(), dSub_MC_STAR.LockedMatrix() );\n\n    DistMatrix<Real,MC,STAR> dPrev_MC_STAR(g);\n    DistMatrix<F,MC,STAR> dSubPrev_MC_STAR(g);\n    const Int colAlignPrev = 1 % colStride;\n    dPrev_MC_STAR.AlignCols( colAlignPrev );\n    dSubPrev_MC_STAR.AlignCols( colAlignPrev );\n    dPrev_MC_STAR = d;\n    dSubPrev_MC_STAR = dSub;\n  \n    return Inertia( d_MC_STAR, dPrev_MC_STAR, dSub_MC_STAR, dSubPrev_MC_STAR );\n}\n\n} // namespace ldl\n} // namespace elem\n\n#endif // ifndef ELEM_LDL_INERTIA_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LDL/MultiplyAfter.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LDL_MULTIPLYAFTER_HPP\n#define ELEM_LDL_MULTIPLYAFTER_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_QUASIDIAGONALSCALE_INC\n#include ELEM_TRMM_INC\n\n#include ELEM_INVERTPERMUTATION_INC\n#include ELEM_PERMUTEROWS_INC\n\nnamespace elem {\nnamespace ldl {\n\ntemplate<typename F> \ninline void\nMultiplyAfter( const Matrix<F>& A, Matrix<F>& B, bool conjugated=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ldl::MultiplyAfter\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    const Orientation orientation = ( conjugated ? ADJOINT : TRANSPOSE );\n    const auto d = A.GetDiagonal();\n    Trmm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n    DiagonalScale( LEFT, NORMAL, d, B );\n    Trmm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n}\n\ntemplate<typename F> \ninline void\nMultiplyAfter( const DistMatrix<F>& A, DistMatrix<F>& B, bool conjugated=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::MultiplyAfter\");\n        if( A.Grid() != B.Grid() )\n            LogicError(\"{A,B} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    const Orientation orientation = ( conjugated ? ADJOINT : TRANSPOSE );\n    const auto d = A.GetDiagonal();\n    Trmm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n    DiagonalScale( LEFT, NORMAL, d, B );\n    Trmm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n}\n\ntemplate<typename F> \ninline void\nMultiplyAfter\n( const Matrix<F>& A, const Matrix<F>& dSub, const Matrix<Int>& pPerm, \n  Matrix<F>& B, bool conjugated=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::MultiplyAfter\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n        if( pPerm.Height() != A.Height() )\n            LogicError(\"A and pPerm must be the same height\");\n        // TODO: Check for dSub\n    )\n    const Orientation orientation = ( conjugated ? ADJOINT : TRANSPOSE );\n    const auto d = A.GetDiagonal();\n\n    Matrix<Int> pInvPerm;\n    InvertPermutation( pPerm, pInvPerm );\n    \n    PermuteRows( B, pPerm, pInvPerm );\n    Trmm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n    QuasiDiagonalScale( LEFT, LOWER, d, dSub, B, conjugated );\n    Trmm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n    PermuteRows( B, pInvPerm, pPerm );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nMultiplyAfter\n( const DistMatrix<F>& A, \n  const DistMatrix<F,MD,STAR>& dSub, \n  const DistMatrix<Int,UPerm,STAR>& pPerm, \n        DistMatrix<F>& B, \n        bool conjugated=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::MultiplyAfter\");\n        if( A.Grid() != B.Grid() || A.Grid() != pPerm.Grid() )\n            LogicError(\"{A,B,pPerm} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n        if( A.Height() != pPerm.Height() )\n            LogicError(\"A and pPerm must be the same height\");\n        // TODO: Check for dSub\n    )\n    const Orientation orientation = ( conjugated ? ADJOINT : TRANSPOSE );\n    const auto d = A.GetDiagonal();\n\n    DistMatrix<Int,UPerm,STAR> pInvPerm(pPerm.Grid());\n    InvertPermutation( pPerm, pInvPerm );\n\n    PermuteRows( B, pPerm, pInvPerm );\n    Trmm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n    QuasiDiagonalScale( LEFT, LOWER, d, dSub, B, conjugated );\n    Trmm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n    PermuteRows( B, pInvPerm, pPerm );\n}\n\n} // namespace ldl\n} // namespace elem\n\n#endif // ifndef ELEM_LDL_MULTIPLYAFTER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LDL/Pivoted.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LDL_PIVOTED_HPP\n#define ELEM_LDL_PIVOTED_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_MAXABS_INC\n#include ELEM_SCALE_INC\n#include ELEM_SWAP_INC\n#include ELEM_SYMMETRIC2X2SOLVE_INC\n#include ELEM_SYR_INC\n#include ELEM_TRR_INC\n#include ELEM_TRR2_INC\n\n#include ELEM_PERMUTEROWS_INC\n\n#include ELEM_ZEROS_INC\n\n// TODO: Reference LAPACK's dsytf2 and zhetf2\n\nnamespace elem {\nnamespace ldl {\n\nnamespace pivot {\n\n// TODO: BunchKaufmanC (pivot maximum diagonal entry, then run A)\n\ntemplate<typename F>\ninline LDLPivot\nBunchKaufmanA( const Matrix<F>& A, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::pivot::BunchKaufmanA\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    if( gamma == Real(0) )\n        gamma = (1+Sqrt(Real(17)))/8;\n\n    const Real alpha11Abs = Abs(A.Get(0,0));\n    const auto a21Max = VectorMaxAbs( LockedViewRange(A,1,0,n,1) );\n    if( a21Max.value == Real(0) && alpha11Abs == Real(0) )\n        throw SingularMatrixException();\n\n    LDLPivot pivot;\n    if( alpha11Abs >= gamma*a21Max.value )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = 0;\n        return pivot;\n    }\n\n    // Find maximum off-diag value in row r (exploit symmetry)\n    const Int r = a21Max.index + 1;\n    const auto leftMax   = VectorMaxAbs( LockedViewRange(A,r,  0,r+1,r  ) );\n    const auto bottomMax = VectorMaxAbs( LockedViewRange(A,r+1,r,n,  r+1) );\n    const Real rowMaxVal = Max(leftMax.value,bottomMax.value);\n\n    if( alpha11Abs >= gamma*a21Max.value*(a21Max.value/rowMaxVal) )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = 0;\n        return pivot;\n    }\n\n    if( Abs(A.Get(r,r)) >= gamma*rowMaxVal )\n    { \n        pivot.nb = 1;\n        pivot.from[0] = r;\n        return pivot;\n    }\n\n    // Default to a 2x2 pivot with 0 and r\n    pivot.nb = 2;\n    pivot.from[0] = 0;\n    pivot.from[1] = r;\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nBunchKaufmanA( const DistMatrix<F>& A, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::pivot::BunchKaufmanA\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    if( gamma == Real(0) )\n        gamma = (1+Sqrt(Real(17)))/8;\n\n    const Real alpha11Abs = Abs(A.Get(0,0));\n    const auto a21Max = VectorMaxAbs( LockedViewRange(A,1,0,n,1) );\n    if( a21Max.value == Real(0) && alpha11Abs == Real(0) )\n        throw SingularMatrixException();\n\n    LDLPivot pivot;\n    if( alpha11Abs >= gamma*a21Max.value )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = 0;\n        return pivot;\n    }\n\n    // Find maximum off-diag value in row r (exploit symmetry)\n    const Int r = a21Max.index + 1;\n    const auto leftMax   = VectorMaxAbs( LockedViewRange(A,r,  0,r+1,r  ) );\n    const auto bottomMax = VectorMaxAbs( LockedViewRange(A,r+1,r,n,  r+1) );\n    const Real rowMaxVal = Max(leftMax.value,bottomMax.value);\n\n    if( alpha11Abs >= gamma*a21Max.value*(a21Max.value/rowMaxVal) )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = 0;\n        return pivot;\n    }\n\n    if( Abs(A.Get(r,r)) >= gamma*rowMaxVal )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = r;\n        return pivot;\n    }\n\n    // Default to a 2x2 pivot with 0 and r\n    pivot.nb = 2;\n    pivot.from[0] = 0;\n    pivot.from[1] = r;\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nBunchKaufmanD( const Matrix<F>& A, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::pivot::BunchKaufmanD\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    if( gamma == Real(0) )\n        gamma = Real(525)/1000;\n\n    const Real alpha11Abs = Abs(A.Get(0,0));\n    const auto a21Max = VectorMaxAbs( LockedViewRange(A,1,0,n,1) );\n    if( a21Max.value == Real(0) && alpha11Abs == Real(0) )\n        throw SingularMatrixException();\n\n    LDLPivot pivot;\n    if( alpha11Abs >= gamma*a21Max.value )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = 0;\n        return pivot;\n    }\n\n    // Find maximum value in row r (exploit symmetry)\n    const Int r = a21Max.index + 1;\n    const auto leftMax   = VectorMaxAbs( LockedViewRange(A,r,0,r+1,r  ) );\n    const auto bottomMax = VectorMaxAbs( LockedViewRange(A,r,r,n,  r+1) );\n    const Real rowMaxVal = Max(leftMax.value,bottomMax.value);\n\n    if( alpha11Abs >= gamma*a21Max.value*(a21Max.value/rowMaxVal) )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = 0;\n        return pivot;\n    }\n\n    // Default to a 2x2 pivot with 0 and r\n    pivot.nb = 2;\n    pivot.from[0] = 0;\n    pivot.from[1] = r;\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nBunchKaufmanD( const DistMatrix<F>& A, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::pivot::BunchKaufmanD\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    if( gamma == Real(0) )\n        gamma = Real(525)/1000;\n\n    const Real alpha11Abs = Abs(A.Get(0,0));\n    const auto a21Max = VectorMaxAbs( LockedViewRange(A,1,0,n,1) );\n    if( a21Max.value == Real(0) && alpha11Abs == Real(0) )\n        throw SingularMatrixException();\n\n    LDLPivot pivot;\n    if( alpha11Abs >= gamma*a21Max.value )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = 0;\n        return pivot;\n    }\n\n    // Find maximum value in row r (exploit symmetry)\n    const Int r = a21Max.index + 1;\n    const auto leftMax   = VectorMaxAbs( LockedViewRange(A,r,0,r+1,r  ) );\n    const auto bottomMax = VectorMaxAbs( LockedViewRange(A,r,r,n,  r+1) );\n    const Real rowMaxVal = Max(leftMax.value,bottomMax.value);\n\n    if( alpha11Abs >= gamma*a21Max.value*(a21Max.value/rowMaxVal) )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = 0;\n        return pivot;\n    }\n\n    // Default to a 2x2 pivot with 0 and r\n    pivot.nb = 2;\n    pivot.from[0] = 0;\n    pivot.from[1] = r;\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nBunchParlett( const Matrix<F>& A, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::pivot::BunchParlett\"))\n    typedef Base<F> Real;\n    if( gamma == Real(0) )\n        gamma = (1+Sqrt(Real(17)))/8;\n\n    const ValueInt<Real> diagMax = DiagonalMaxAbs( A );\n    const ValueIntPair<Real> offDiagMax = SymmetricMaxAbs( LOWER, A );\n\n    LDLPivot pivot;\n    if( diagMax.value >= gamma*offDiagMax.value )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = diagMax.index;\n        return pivot;\n    }\n    else\n    {\n        pivot.nb = 2;\n        pivot.from[0] = offDiagMax.indices[0];\n        pivot.from[1] = offDiagMax.indices[1];\n        return pivot;\n    }\n}\n\ntemplate<typename F>\ninline LDLPivot\nBunchParlett( const DistMatrix<F>& A, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::pivot::BunchParlett\"))\n    typedef Base<F> Real;\n    if( gamma == Real(0) )\n        gamma = (1+Sqrt(Real(17)))/8;\n\n    const ValueInt<Real> diagMax = DiagonalMaxAbs( A );\n    const ValueIntPair<Real> offDiagMax = SymmetricMaxAbs( LOWER, A );\n\n    LDLPivot pivot;\n    if( diagMax.value >= gamma*offDiagMax.value )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = diagMax.index;\n        return pivot;\n    }\n    else\n    {\n        pivot.nb = 2; \n        pivot.from[0] = offDiagMax.indices[0];\n        pivot.from[1] = offDiagMax.indices[1];\n        return pivot;\n    }\n}\n\n// TODO: Switch to the simpler panel update scheme used for Cholesky\n\ntemplate<typename F>\ninline LDLPivot\nPanelBunchKaufmanA\n( const Matrix<F>& A, const Matrix<F>& X, const Matrix<F>& Y, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::pivot::PanelBunchKaufmanA\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Int k = X.Width();\n    if( gamma == Real(0) )\n        gamma = (1+Sqrt(Real(17)))/8;\n\n    auto aB1 = LockedViewRange( A, k, k, n, k+1 );\n    auto zB1( aB1 );\n    // A(k:n-1,k) -= X(k:n-1,0:k-1) Y(k,0:k-1)^T\n    {\n        auto XBL  = LockedViewRange( X, k, 0, n,   k );\n        auto yRow = LockedViewRange( Y, k, 0, k+1, k );\n        Gemv( NORMAL, F(-1), XBL, yRow, F(1), zB1 );\n    } \n\n    const Real alpha11Abs = Abs(zB1.Get(0,0));\n    const auto a21Max = VectorMaxAbs( LockedViewRange(zB1,1,0,n-k,1) );\n    if( a21Max.value == Real(0) && alpha11Abs == Real(0) )\n        throw SingularMatrixException();\n\n    LDLPivot pivot;\n    if( alpha11Abs >= gamma*a21Max.value )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = k;\n        return pivot;\n    }\n\n    // Find maximum off-diag value in row r (exploit symmetry)\n    const Int r = a21Max.index + (k+1);\n    auto aLeft   = LockedViewRange( A, r, k, r+1, r   );\n    auto aBottom = LockedViewRange( A, r, r, n,   r+1 );\n        \n    auto zLeft( aLeft );\n    auto zBottom( aBottom );\n    auto zStrictBottom = ViewRange( zBottom, 1, 0, n-r, 1 );\n\n    //\n    // Update necessary components out-of-place\n    //\n\n    // A(r,k:r-1) -= X(r,0:k-1) Y(k:r-1,0:k-1)^T\n    {\n        auto xMid = LockedViewRange( X, r, 0, r+1, k );\n        auto YBL = LockedViewRange( Y, k, 0, r, k );\n        Gemv( NORMAL, F(-1), YBL, xMid, F(1), zLeft );\n    }\n\n    // A(r:n-1,r) -= X(r:n-1,0:k-1) Y(r,0:k-1)^T\n    {\n        auto XBL = LockedViewRange( X, r, 0, n, k );\n        auto yRow = LockedViewRange( Y, r, 0, r+1, k );\n        Gemv( NORMAL, F(-1), XBL, yRow, F(1), zBottom );\n    } \n\n    const auto leftMax   = VectorMaxAbs( zLeft );\n    const auto bottomMax = VectorMaxAbs( zStrictBottom );\n    const Real rowMaxVal = Max(leftMax.value,bottomMax.value);\n\n    if( alpha11Abs >= gamma*a21Max.value*(a21Max.value/rowMaxVal) )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = k;\n        return pivot;\n    }\n\n    if( Abs(zBottom.Get(0,0)) >= gamma*rowMaxVal )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = r;\n        return pivot;\n    }\n\n    // Default to a 2x2 pivot with k and r\n    pivot.nb = 2;\n    pivot.from[0] = k;\n    pivot.from[1] = r;\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nPanelBunchKaufmanA\n( const DistMatrix<F>& A, \n  const DistMatrix<F,MC,STAR>& X, const DistMatrix<F,MR,STAR>& Y, \n  Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::pivot::PanelBunchKaufmanA\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Int k = X.Width();\n    if( A.ColAlign() != X.ColAlign() || A.RowAlign() != Y.ColAlign() )\n        LogicError(\"X and Y were not properly aligned with A\");\n    if( gamma == Real(0) )\n        gamma = (1+Sqrt(Real(17)))/8;\n\n    auto aB1 = LockedViewRange( A, k, k, n, k+1 );\n    auto zB1( aB1 );\n    // A(k:n-1,k) -= X(k:n-1,0:k-1) Y(k,0:k-1)^T\n    if( aB1.RowAlign() == aB1.RowRank() )\n    {\n        auto XBL  = LockedViewRange( X, k, 0, n,   k );\n        auto yRow = LockedViewRange( Y, k, 0, k+1, k );\n        LocalGemv( NORMAL, F(-1), XBL, yRow, F(1), zB1 );\n    } \n\n    const Real alpha11Abs = Abs(zB1.Get(0,0));\n    const auto a21Max = VectorMaxAbs( LockedViewRange(zB1,1,0,n-k,1) );\n    if( a21Max.value == Real(0) && alpha11Abs == Real(0) )\n        throw SingularMatrixException();\n\n    LDLPivot pivot;\n    if( alpha11Abs >= gamma*a21Max.value )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = k;\n        return pivot;\n    }\n\n    // Find maximum off-diag value in row r (exploit symmetry)\n    const Int r = a21Max.index + (k+1);\n    auto aLeft   = LockedViewRange( A, r, k, r+1, r   );\n    auto aBottom = LockedViewRange( A, r, r, n,   r+1 );\n        \n    auto zLeft( aLeft );\n    auto zBottom( aBottom );\n    auto zStrictBottom = ViewRange( zBottom, 1, 0, n-r, 1 );\n\n    //\n    // Update necessary components out-of-place\n    //\n\n    // A(r,k:r-1) -= X(r,0:k-1) Y(k:r-1,0:k-1)^T\n    if( aLeft.ColAlign() == aLeft.ColRank() )\n    {\n        auto xMid = LockedViewRange( X, r, 0, r+1, k );\n        auto YBL = LockedViewRange( Y, k, 0, r, k );\n        LocalGemv( NORMAL, F(-1), YBL, xMid, F(1), zLeft );\n    }\n\n    // A(r:n-1,r) -= X(r:n-1,0:k-1) Y(r,0:k-1)^T\n    if( aBottom.RowAlign() == aBottom.RowRank() )\n    {\n        auto XBL = LockedViewRange( X, r, 0, n, k );\n        auto yRow = LockedViewRange( Y, r, 0, r+1, k );\n        LocalGemv( NORMAL, F(-1), XBL, yRow, F(1), zBottom );\n    } \n\n    const auto leftMax   = VectorMaxAbs( zLeft );\n    const auto bottomMax = VectorMaxAbs( zStrictBottom );\n    const Real rowMaxVal = Max(leftMax.value,bottomMax.value);\n\n    if( alpha11Abs >= gamma*a21Max.value*(a21Max.value/rowMaxVal) )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = k;\n        return pivot;\n    }\n\n    if( Abs(zBottom.Get(0,0)) >= gamma*rowMaxVal )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = r;\n        return pivot;\n    }\n\n    // Default to a 2x2 pivot with k and r\n    pivot.nb = 2;\n    pivot.from[0] = k;\n    pivot.from[1] = r; \n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nPanelBunchKaufmanD\n( const Matrix<F>& A, const Matrix<F>& X, const Matrix<F>& Y, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::pivot::PanelBunchKaufmanD\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Int k = X.Width();\n    if( gamma == Real(0) )\n        gamma = Real(525)/1000;\n\n    auto aB1 = LockedViewRange( A, k, k, n, k+1 );\n    auto zB1( aB1 );\n    // A(k:n-1,k) -= X(k:n-1,0:k-1) Y(k,0:k-1)^T\n    {\n        auto XBL  = LockedViewRange( X, k, 0, n,   k );\n        auto yRow = LockedViewRange( Y, k, 0, k+1, k );\n        Gemv( NORMAL, F(-1), XBL, yRow, F(1), zB1 );\n    } \n\n    const Real alpha11Abs = Abs(zB1.Get(0,0));\n    const auto a21Max = VectorMaxAbs( LockedViewRange(zB1,1,0,n-k,1) );\n    if( a21Max.value == Real(0) && alpha11Abs == Real(0) )\n        throw SingularMatrixException();\n\n    LDLPivot pivot;\n    if( alpha11Abs >= gamma*a21Max.value )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = k;\n        return pivot;\n    }\n\n    // Find maximum value in row r (exploit symmetry)\n    const Int r = a21Max.index + (k+1);\n    auto aLeft   = LockedViewRange( A, r, k, r+1, r   );\n    auto aBottom = LockedViewRange( A, r, r, n,   r+1 );\n        \n    auto zLeft( aLeft );\n    auto zBottom( aBottom );\n\n    //\n    // Update necessary components out-of-place\n    //\n\n    // A(r,k:r-1) -= X(r,0:k-1) Y(k:r-1,0:k-1)^T\n    {\n        auto xMid = LockedViewRange( X, r, 0, r+1, k );\n        auto YBL = LockedViewRange( Y, k, 0, r, k );\n        Gemv( NORMAL, F(-1), YBL, xMid, F(1), zLeft );\n    }\n\n    // A(r:n-1,r) -= X(r:n-1,0:k-1) Y(r,0:k-1)^T\n    {\n        auto XBL = LockedViewRange( X, r, 0, n, k );\n        auto yRow = LockedViewRange( Y, r, 0, r+1, k );\n        Gemv( NORMAL, F(-1), XBL, yRow, F(1), zBottom );\n    } \n\n    const auto leftMax   = VectorMaxAbs( zLeft );\n    const auto bottomMax = VectorMaxAbs( zBottom );\n    const Real rowMaxVal = Max(leftMax.value,bottomMax.value);\n\n    if( alpha11Abs >= gamma*a21Max.value*(a21Max.value/rowMaxVal) )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = k;\n        return pivot;\n    }\n\n    // Default to a 2x2 pivot with k and r\n    pivot.nb = 2;\n    pivot.from[0] = k;\n    pivot.from[1] = r;\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nPanelBunchKaufmanD\n( const DistMatrix<F>& A, \n  const DistMatrix<F,MC,STAR>& X, const DistMatrix<F,MR,STAR>& Y, \n  Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::pivot::PanelBunchKaufmanD\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Int k = X.Width();\n    if( A.ColAlign() != X.ColAlign() || A.RowAlign() != Y.ColAlign() )\n        LogicError(\"X and Y were not properly aligned with A\");\n    if( gamma == Real(0) )\n        gamma = Real(525)/1000;\n\n    auto aB1 = LockedViewRange( A, k, k, n, k+1 );\n    auto zB1( aB1 );\n    // A(k:n-1,k) -= X(k:n-1,0:k-1) Y(k,0:k-1)^T\n    if( aB1.RowAlign() == aB1.RowRank() )\n    {\n        auto XBL  = LockedViewRange( X, k, 0, n,   k );\n        auto yRow = LockedViewRange( Y, k, 0, k+1, k );\n        LocalGemv( NORMAL, F(-1), XBL, yRow, F(1), zB1 );\n    } \n\n    const Real alpha11Abs = Abs(zB1.Get(0,0));\n    const auto a21Max = VectorMaxAbs( LockedViewRange(zB1,1,0,n-k,1) );\n    if( a21Max.value == Real(0) && alpha11Abs == Real(0) )\n        throw SingularMatrixException();\n\n    LDLPivot pivot;\n    if( alpha11Abs >= gamma*a21Max.value )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = k;\n        return pivot;\n    }\n\n    // Find maximum off-diag value in row r (exploit symmetry)\n    const Int r = a21Max.index + (k+1);\n    auto aLeft   = LockedViewRange( A, r, k, r+1, r   );\n    auto aBottom = LockedViewRange( A, r, r, n,   r+1 );\n        \n    auto zLeft( aLeft );\n    auto zBottom( aBottom );\n\n    //\n    // Update necessary components out-of-place\n    //\n\n    // A(r,k:r-1) -= X(r,0:k-1) Y(k:r-1,0:k-1)^T\n    if( aLeft.ColAlign() == aLeft.ColRank() )\n    {\n        auto xMid = LockedViewRange( X, r, 0, r+1, k );\n        auto YBL = LockedViewRange( Y, k, 0, r, k );\n        LocalGemv( NORMAL, F(-1), YBL, xMid, F(1), zLeft );\n    }\n\n    // A(r:n-1,r) -= X(r:n-1,0:k-1) Y(r,0:k-1)^T\n    if( aBottom.RowAlign() == aBottom.RowRank() )\n    {\n        auto XBL = LockedViewRange( X, r, 0, n, k );\n        auto yRow = LockedViewRange( Y, r, 0, r+1, k );\n        LocalGemv( NORMAL, F(-1), XBL, yRow, F(1), zBottom );\n    } \n\n    const auto leftMax   = VectorMaxAbs( zLeft );\n    const auto bottomMax = VectorMaxAbs( zBottom );\n    const Real rowMaxVal = Max(leftMax.value,bottomMax.value);\n\n    if( alpha11Abs >= gamma*a21Max.value*(a21Max.value/rowMaxVal) )\n    {\n        pivot.nb = 1;\n        pivot.from[0] = k;\n        return pivot;\n    }\n\n    // Default to a 2x2 pivot with k and r\n    pivot.nb = 2;\n    pivot.from[0] = k;\n    pivot.from[1] = r; \n    return pivot;\n}\n\n} // namespace pivot\n\ntemplate<typename F>\ninline LDLPivot\nChoosePivot( const Matrix<F>& A, LDLPivotType pivotType, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::ChoosePivot\"))\n    LDLPivot pivot;\n    switch( pivotType )\n    {\n    case BUNCH_KAUFMAN_A: \n    case BUNCH_KAUFMAN_C:\n        pivot = pivot::BunchKaufmanA( A, gamma ); break;\n    case BUNCH_KAUFMAN_D: pivot = pivot::BunchKaufmanD( A, gamma ); break;\n    case BUNCH_PARLETT:   pivot = pivot::BunchParlett( A, gamma ); break;\n    default: LogicError(\"This pivot type not yet supported\");\n    }\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nChoosePivot( const DistMatrix<F>& A, LDLPivotType pivotType, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::ChoosePivot\"))\n    LDLPivot pivot;\n    switch( pivotType )\n    {\n    case BUNCH_KAUFMAN_A: \n    case BUNCH_KAUFMAN_C:\n        pivot = pivot::BunchKaufmanA( A, gamma ); break;\n    case BUNCH_KAUFMAN_D: pivot = pivot::BunchKaufmanD( A, gamma ); break;\n    case BUNCH_PARLETT:   pivot = pivot::BunchParlett( A, gamma ); break;\n    default: LogicError(\"This pivot type not yet supported\");\n    }\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nChoosePanelPivot\n( const Matrix<F>& A, const Matrix<F>& X, const Matrix<F>& Y, \n  LDLPivotType pivotType, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::ChoosePanelPivot\"))\n    LDLPivot pivot;\n    switch( pivotType )\n    {\n    case BUNCH_KAUFMAN_A: \n    case BUNCH_KAUFMAN_C:\n        pivot = pivot::PanelBunchKaufmanA( A, X, Y, gamma ); \n        break;\n    case BUNCH_KAUFMAN_D: \n        pivot = pivot::PanelBunchKaufmanD( A, X, Y, gamma ); \n        break;\n    default: \n        LogicError(\"This pivot type not yet supported\");\n    }\n    return pivot;\n}\n\ntemplate<typename F>\ninline LDLPivot\nChoosePanelPivot\n( const DistMatrix<F>& A, \n  const DistMatrix<F,MC,STAR>& X, \n  const DistMatrix<F,MR,STAR>& Y, \n  LDLPivotType pivotType, Base<F> gamma )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::ChoosePanelPivot\"))\n    LDLPivot pivot;\n    switch( pivotType )\n    {\n    case BUNCH_KAUFMAN_A: \n    case BUNCH_KAUFMAN_C:\n        pivot = pivot::PanelBunchKaufmanA( A, X, Y, gamma ); \n        break;\n    case BUNCH_KAUFMAN_D: \n        pivot = pivot::PanelBunchKaufmanD( A, X, Y, gamma ); \n        break;\n    default: \n        LogicError(\"This pivot type not yet supported\");\n    }\n    return pivot;\n}\n\n// Unblocked sequential pivoted LDL\ntemplate<typename F>\ninline void\nUnblockedPivoted\n( Matrix<F>& A, Matrix<F>& dSub, Matrix<Int>& pPerm, bool conjugate=false,\n  LDLPivotType pivotType=BUNCH_KAUFMAN_A, Base<F> gamma=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ldl::UnblockedPivoted\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n    if( n == 0 )\n    {\n        dSub.Resize( 0, 1 );\n        pPerm.Resize( 0, 1 );\n        return;\n    }\n    Zeros( dSub, n-1, 1 );\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int j=0; j<n; ++j )\n        pPerm.Set( j, 0, j );\n     \n    Matrix<F> Y21;\n\n    Int k=0;\n    while( k < n )\n    {\n        // Determine the pivot (block)\n        auto ABR = ViewRange( A, k, k, n, n );\n        if( pivotType == BUNCH_KAUFMAN_C )\n        {\n            LogicError(\"Have not yet generalized pivot storage\");\n            const auto diagMax = DiagonalMaxAbs( ABR );\n            SymmetricSwap( LOWER, A, k, k+diagMax.index, conjugate );\n        }\n        const LDLPivot pivot = ChoosePivot( ABR, pivotType, gamma );\n\n        // Update trailing submatrix and store pivots\n        if( pivot.nb == 1 )\n        {\n            const Int from = k + pivot.from[0];\n            SymmetricSwap( LOWER, A, k, from, conjugate );\n            RowSwap( pPerm, k, from );\n\n            // Rank-one update: A22 -= a21 inv(delta11) a21'\n            const F delta11Inv = F(1)/ABR.Get(0,0);\n            auto a21 = ViewRange( ABR, 1, 0, n-k, 1   );\n            auto A22 = ViewRange( ABR, 1, 1, n-k, n-k );\n            Syr( LOWER, -delta11Inv, a21, A22, conjugate );\n            Scale( delta11Inv, a21 );\n\n            k += 1;\n        }\n        else\n        {\n            const Int from0 = k + pivot.from[0];\n            const Int from1 = k + pivot.from[1];\n            SymmetricSwap( LOWER, A, k,   from0, conjugate );\n            SymmetricSwap( LOWER, A, k+1, from1, conjugate );\n            RowSwap( pPerm, k+0, from0 );\n            RowSwap( pPerm, k+1, from1 );\n\n            // Rank-two update: A22 -= A21 inv(D11) A21'\n            auto D11 = ViewRange( ABR, 0, 0, 2,   2   );\n            auto A21 = ViewRange( ABR, 2, 0, n-k, 2   );\n            auto A22 = ViewRange( ABR, 2, 2, n-k, n-k );\n            Y21 = A21;\n            Symmetric2x2Solve( RIGHT, LOWER, D11, A21, conjugate );\n            Trr2( LOWER, F(-1), A21, Y21, A22, conjugate );\n\n            // Only leave the main diagonal of D in A, so that routines like\n            // Trsm can still be used. Thus, return the subdiagonal.\n            dSub.Set( k, 0, D11.Get(1,0) );\n            D11.Set( 1, 0, 0 );\n            k += 2;\n        }\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nUnblockedPivoted\n( DistMatrix<F>& A, \n  DistMatrix<F,MD,STAR>& dSub, \n  DistMatrix<Int,UPerm,STAR>& pPerm, \n  bool conjugate=false, LDLPivotType pivotType=BUNCH_KAUFMAN_A, \n  Base<F> gamma=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ldl::UnblockedPivoted\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Grid() != dSub.Grid() || dSub.Grid() != pPerm.Grid() )\n            LogicError(\"A, dSub, and pPerm must share the same grid\");\n    )\n    const Int n = A.Height();\n    dSub.SetRoot( A.DiagonalRoot(-1) );\n    dSub.AlignCols( A.DiagonalAlign(-1) );\n    Zeros( dSub, n-1, 1 );\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int iLoc=0; iLoc<pPerm.LocalHeight(); ++iLoc )\n        pPerm.SetLocal( iLoc, 0, pPerm.GlobalRow(iLoc) );\n\n    DistMatrix<F> Y21( A.Grid() );\n    DistMatrix<F,STAR,STAR> D11_STAR_STAR( A.Grid() );\n\n    Int k=0;\n    while( k < n )\n    {\n        // Determine the pivot (block)\n        auto ABR = ViewRange( A, k, k, n, n );\n        if( pivotType == BUNCH_KAUFMAN_C )\n        {\n            LogicError(\"Have not yet generalized pivot storage\");\n            const auto diagMax = DiagonalMaxAbs( ABR );\n            SymmetricSwap( LOWER, A, k, k+diagMax.index, conjugate );\n        }\n        const LDLPivot pivot = ChoosePivot( ABR, pivotType, gamma );\n\n        // Update trailing submatrix and store pivots\n        if( pivot.nb == 1 )\n        {\n            const Int from = k + pivot.from[0];\n            SymmetricSwap( LOWER, A, k, from, conjugate );\n            RowSwap( pPerm, k, from ); \n\n            // Rank-one update: A22 -= a21 inv(delta11) a21'\n            const F delta11Inv = F(1)/ABR.Get(0,0);\n            auto a21 = ViewRange( ABR, 1, 0, n-k, 1   );\n            auto A22 = ViewRange( ABR, 1, 1, n-k, n-k );\n            Syr( LOWER, -delta11Inv, a21, A22, conjugate );\n            Scale( delta11Inv, a21 );\n\n            k += 1;\n        }\n        else\n        {\n            const Int from0 = k + pivot.from[0];\n            const Int from1 = k + pivot.from[1];\n            SymmetricSwap( LOWER, A, k,   from0, conjugate );\n            SymmetricSwap( LOWER, A, k+1, from1, conjugate );\n            RowSwap( pPerm, k+0, from0 );\n            RowSwap( pPerm, k+1, from1 );\n\n            // Rank-two update: A22 -= A21 inv(D11) A21'\n            auto D11 = ViewRange( ABR, 0, 0, 2,   2   );\n            auto A21 = ViewRange( ABR, 2, 0, n-k, 2   );\n            auto A22 = ViewRange( ABR, 2, 2, n-k, n-k );\n            Y21 = A21;\n            D11_STAR_STAR = D11;\n            Symmetric2x2Solve( RIGHT, LOWER, D11_STAR_STAR, A21, conjugate );\n            Trr2( LOWER, F(-1), A21, Y21, A22, conjugate );\n\n            // Only leave the main diagonal of D in A, so that routines like\n            // Trsm can still be used. Thus, return the subdiagonal.\n            dSub.Set( k, 0, D11_STAR_STAR.GetLocal(1,0) );\n            D11.Set( 1, 0, 0 );\n            k += 2;\n        }\n    }\n}\n\n// We must use a lazy algorithm so that the symmetric pivoting does not move\n// data from a fully-updated to partially-updated region (and vice-versa)\ntemplate<typename F>\ninline void\nPanelPivoted\n( Matrix<F>& A, Matrix<F>& dSub, Matrix<Int>& pPerm, \n  Matrix<F>& X, Matrix<F>& Y, Int bsize, Int off=0,\n  bool conjugate=false, LDLPivotType pivotType=BUNCH_KAUFMAN_A, \n  Base<F> gamma=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::PanelPivoted\"))\n    const Int n = A.Height();\n    if( n == 0 )\n        return;\n    DEBUG_ONLY(\n        if( A.Width() != n )\n            LogicError(\"A must be square\");\n        if( dSub.Height() != n-1 || dSub.Width() != 1 )\n            LogicError(\"dSub is the wrong size\" );\n        if( pPerm.Height() != n || pPerm.Width() != 1 )\n            LogicError(\"permutation vector is the wrong size\");\n    )\n    auto ABR = ViewRange( A, off, off, n, n );\n    Zeros( X, n-off, bsize );\n    Zeros( Y, n-off, bsize );\n\n    Int k=0;\n    while( k < bsize )\n    {\n        // Determine the pivot (block)\n        auto X0 = ViewRange( X, 0, 0, n-off, k );\n        auto Y0 = ViewRange( Y, 0, 0, n-off, k );\n        if( pivotType == BUNCH_KAUFMAN_C )\n        {\n            LogicError(\"Have not yet generalized pivot storage\");\n            // TODO: Form updated diagonal and select maximum\n            auto ABRBR = ViewRange( ABR, k, k, n-off, n-off );\n            const auto diagMax = DiagonalMaxAbs( ABRBR );\n            SymmetricSwap( LOWER, A, off+k, off+k+diagMax.index, conjugate );\n            RowSwap( pPerm, k+off, k+off+diagMax.index );\n            RowSwap( X0, k, k+diagMax.index );\n            RowSwap( Y0, k, k+diagMax.index );\n        }\n        const auto pivot = ChoosePanelPivot( ABR, X0, Y0, pivotType, gamma );\n        const Int from = off + pivot.from[pivot.nb-1];\n        const Int to = (off+k) + (pivot.nb-1);\n        if( k+pivot.nb > bsize )\n        {\n            X.Resize( n-off, bsize-1 );\n            Y.Resize( n-off, bsize-1 );\n            break;\n        }\n\n        // Apply the symmetric pivot\n        SymmetricSwap( LOWER, A, to, from, conjugate );\n        RowSwap( pPerm, to, from );\n        RowSwap( X0, to-off, from-off );\n        RowSwap( Y0, to-off, from-off );\n\n        // Update the active columns and then store the new update factors\n        if( pivot.nb == 1 ) \n        {\n            // Update ABR(k:end,k) -= X(k:n-off-1,0:k-1) Y(k,0:k-1)^T\n            auto XB0 = LockedViewRange( X,   k, 0, n-off, k   );\n            auto y10 = LockedViewRange( Y,   k, 0, k+1,   k   );\n            auto aB1 =       ViewRange( ABR, k, k, n-off, k+1 );\n            Gemv( NORMAL, F(-1), XB0, y10, F(1), aB1 );\n            if( conjugate )\n                aB1.MakeReal(0,0);\n\n            // Store x21 := a21/delta11 and y21 := a21\n            const F delta11Inv = F(1)/ABR.Get(k,k);\n            auto a21 = ViewRange( ABR, k+1, k, n-off, k+1 );\n            auto x21 = ViewRange( X,   k+1, k, n-off, k+1 );\n            auto y21 = ViewRange( Y,   k+1, k, n-off, k+1 );\n            if( conjugate )\n                Conjugate( a21, y21 );\n            else\n                y21 = a21;\n            Scale( delta11Inv, a21 );\n            x21 = a21;\n\n            k += 1;\n        }\n        else\n        {\n            // Update ABR(k:end,k:k+1) -= X(k:n-off-1,0:k-1) Y(k:k+1,0:k-1)^T\n            // NOTE: top-right entry of AB1 is above-diagonal\n            auto XB0 = LockedViewRange( X,   k, 0, n-off, k   );\n            auto Y10 = LockedViewRange( Y,   k, 0, k+2,   k   );\n            auto AB1 =       ViewRange( ABR, k, k, n-off, k+2 );\n            const F psi = AB1.Get(0,1);\n            Gemm( NORMAL, TRANSPOSE, F(-1), XB0, Y10, F(1), AB1 );\n            AB1.Set(0,1,psi);\n            if( conjugate )\n            {\n                AB1.MakeReal(0,0);\n                AB1.MakeReal(1,1);\n            }\n\n            // Store X21 := A21/D11 and Y21 := A21 or Y21 := Conj(A21)\n            auto D11 = ViewRange( ABR, k,   k, k+2,   k+2 );\n            auto A21 = ViewRange( ABR, k+2, k, n-off, k+2 );\n            auto X21 = ViewRange( X,   k+2, k, n-off, k+2 );\n            auto Y21 = ViewRange( Y,   k+2, k, n-off, k+2 );\n            if( conjugate )\n                Conjugate( A21, Y21 );\n            else\n                Y21 = A21;\n            Symmetric2x2Solve( RIGHT, LOWER, D11, A21, conjugate );\n            X21 = A21;\n\n            // Only leave the main diagonal of D in A, so that routines like\n            // Trsm can still be used. Thus, return the subdiagonal.\n            dSub.Set( off+k, 0, D11.Get(1,0) );\n            D11.Set( 1, 0, 0 );\n            k += 2;\n        }\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nPanelPivoted\n( DistMatrix<F>& A, \n  DistMatrix<F,MD,STAR>& dSub, \n  DistMatrix<Int,UPerm,STAR>& pPerm, \n  DistMatrix<F,MC,STAR>& X, DistMatrix<F,MR,STAR>& Y, Int bsize, Int off=0,\n  bool conjugate=false, LDLPivotType pivotType=BUNCH_KAUFMAN_A,\n  Base<F> gamma=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::PanelPivoted\"))\n    const Int n = A.Height();\n    if( n == 0 )\n        return;\n    DEBUG_ONLY(\n        if( A.Width() != n )\n            LogicError(\"A must be square\");\n        if( dSub.Height() != n-1 || dSub.Width() != 1 )\n            LogicError(\"dSub is the wrong size\" );\n        if( pPerm.Height() != n || pPerm.Width() != 1 )\n            LogicError(\"permutation vector is the wrong size\");\n    )\n    auto ABR = ViewRange( A, off, off, n, n );\n    X.AlignWith( ABR );\n    Y.AlignWith( ABR );\n    Zeros( X, n-off, bsize );\n    Zeros( Y, n-off, bsize );\n\n    DistMatrix<F,STAR,STAR> D11_STAR_STAR( A.Grid() );\n\n    Int k=0;\n    while( k < bsize )\n    {\n        // Determine the pivot (block)\n        auto X0 = ViewRange( X, 0, 0, n-off, k );\n        auto Y0 = ViewRange( Y, 0, 0, n-off, k );\n        if( pivotType == BUNCH_KAUFMAN_C )\n        {\n            LogicError(\"Have not yet generalized pivot storage\");\n            // TODO: Form updated diagonal and select maximum\n            auto ABRBR = ViewRange( ABR, k, k, n-off, n-off );\n            const auto diagMax = DiagonalMaxAbs( ABRBR );\n            SymmetricSwap( LOWER, A, off+k, off+k+diagMax.index, conjugate );\n            RowSwap( X0, k, k+diagMax.index );\n            RowSwap( Y0, k, k+diagMax.index );\n            RowSwap( pPerm, off+k, off+k+diagMax.index );\n        }\n        const auto pivot = ChoosePanelPivot( ABR, X0, Y0, pivotType, gamma );\n        const Int from = off + pivot.from[pivot.nb-1];\n        const Int to = (off+k) + (pivot.nb-1);\n        if( k+pivot.nb > bsize )\n        {\n            X.Resize( n-off, bsize-1 );\n            Y.Resize( n-off, bsize-1 );\n            break;\n        }\n\n        // Apply the symmetric pivot\n        SymmetricSwap( LOWER, A, to, from, conjugate );\n        RowSwap( pPerm, to, from );\n        RowSwap( X0, to-off, from-off );\n        RowSwap( Y0, to-off, from-off );\n\n        // Update the active columns and then store the new update factors\n        if( pivot.nb == 1 ) \n        {\n            // Update ABR(k:end,k) -= X(k:n-off-1,0:k-1) Y(k,0:k-1)^T\n            auto aB1 = ViewRange( ABR, k, k, n-off, k+1 );\n            if( aB1.RowAlign() == aB1.RowRank() )\n            {\n                auto XB0 = LockedViewRange( X, k, 0, n-off, k );\n                auto y10 = LockedViewRange( Y, k, 0, k+1,   k );\n                LocalGemv( NORMAL, F(-1), XB0, y10, F(1), aB1 );\n            }\n            if( conjugate )\n                aB1.MakeReal(0,0);\n\n            // Store x21 := a21/delta11 and y21 := a21\n            const F delta11Inv = F(1)/ABR.Get(k,k);\n            auto a21 = ViewRange( ABR, k+1, k, n-off, k+1 );\n            auto x21 = ViewRange( X,   k+1, k, n-off, k+1 );\n            auto y21 = ViewRange( Y,   k+1, k, n-off, k+1 );\n            if( conjugate )\n                Conjugate( a21, y21 );\n            else\n                y21 = a21;\n            Scale( delta11Inv, a21 );\n            x21 = a21;\n\n            k += 1;\n        }\n        else\n        {\n            // Update ABR(k:end,k:k+1) -= X(k:n-off-1,0:k-1) Y(k:k+1,0:k-1)^T\n            // NOTE: top-right entry of AB1 is above-diagonal\n            auto XB0 = LockedViewRange( X,   k, 0, n-off, k   );\n            auto Y10 = LockedViewRange( Y,   k, 0, k+2,   k   );\n            auto AB1 =       ViewRange( ABR, k, k, n-off, k+2 );\n            // TODO: Make Get and Set local\n            const F psi = AB1.Get(0,1);\n            LocalGemm( NORMAL, TRANSPOSE, F(-1), XB0, Y10, F(1), AB1 );\n            AB1.Set(0,1,psi);\n            if( conjugate )\n            {\n                AB1.MakeReal(0,0);\n                AB1.MakeReal(1,1);\n            }\n\n            // Store X21 := A21/D11 and Y21 := A21 or Y21 := Conj(A21)\n            auto D11 = ViewRange( ABR, k,   k, k+2,   k+2 );\n            auto A21 = ViewRange( ABR, k+2, k, n-off, k+2 );\n            auto X21 = ViewRange( X,   k+2, k, n-off, k+2 );\n            auto Y21 = ViewRange( Y,   k+2, k, n-off, k+2 );\n            if( conjugate )\n                Conjugate( A21, Y21 );\n            else\n                Y21 = A21;\n            D11_STAR_STAR = D11;\n            Symmetric2x2Solve( RIGHT, LOWER, D11_STAR_STAR, A21, conjugate );\n            X21 = A21;\n\n            // Only leave the main diagonal of D in A, so that routines like\n            // Trsm can still be used. Thus, return the subdiagonal.\n            dSub.Set( off+k, 0, D11_STAR_STAR.GetLocal(1,0) );\n            D11.Set( 1, 0, 0 );\n            k += 2;\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nBlockedPivoted\n( Matrix<F>& A, Matrix<F>& dSub, Matrix<Int>& pPerm, bool conjugate=false,\n  LDLPivotType pivotType=BUNCH_KAUFMAN_A, Base<F> gamma=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ldl::BlockedPivoted\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n    if( n == 0 )\n    {\n        dSub.Resize( 0, 1 );\n        pPerm.Resize( 0, 1 );\n        return;\n    }\n    Zeros( dSub, n-1, 1 );\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int i=0; i<n; ++i )\n        pPerm.Set( i, 0, i );\n\n    Matrix<F> X, Y;\n    const Int bsize = Blocksize();\n    Int k=0;\n    while( k < n )\n    {\n        const Int nbProp = Min(bsize,n-k);\n        PanelPivoted\n        ( A, dSub, pPerm, X, Y, nbProp, k, conjugate, pivotType, gamma );\n        const Int nb = X.Width();\n\n        // Update the bottom-right panel\n        auto X21B  = ViewRange( X, nb,   0,    n-k, nb );\n        auto Y21B  = ViewRange( Y, nb,   0,    n-k, nb );\n        auto A22BR = ViewRange( A, k+nb, k+nb, n,   n  );\n        Trrk( LOWER, NORMAL, TRANSPOSE, F(-1), X21B, Y21B, F(1), A22BR );\n\n        k += nb;\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nBlockedPivoted\n( DistMatrix<F>& A, \n  DistMatrix<F,MD,STAR>& dSub, \n  DistMatrix<Int,UPerm,STAR>& pPerm, \n  bool conjugate=false, LDLPivotType pivotType=BUNCH_KAUFMAN_A, \n  Base<F> gamma=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ldl::BlockedPivoted\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    if( n == 0 )\n    {\n        dSub.Resize( 0, 1 );\n        pPerm.Resize( 0, 1 );\n        return;\n    }\n    dSub.SetRoot( A.DiagonalRoot(-1) );\n    dSub.AlignCols( A.DiagonalAlign(-1) );\n    Zeros( dSub, n-1, 1 );\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( n, 1 );\n    for( Int iLoc=0; iLoc<pPerm.LocalHeight(); ++iLoc )\n        pPerm.SetLocal( iLoc, 0, pPerm.GlobalRow(iLoc) );\n\n    DistMatrix<F,MC,STAR> X(g);\n    DistMatrix<F,MR,STAR> Y(g);\n    const Int bsize = Blocksize();\n    Int k=0;\n    while( k < n )\n    {\n        const Int nbProp = Min(bsize,n-k);\n        PanelPivoted\n        ( A, dSub, pPerm, X, Y, nbProp, k, conjugate, pivotType, gamma );\n        const Int nb = X.Width();\n\n        // Update the bottom-right panel\n        auto X21B  = ViewRange( X, nb,   0,    n-k, nb );\n        auto Y21B  = ViewRange( Y, nb,   0,    n-k, nb );\n        auto A22BR = ViewRange( A, k+nb, k+nb, n,   n  );\n        LocalTrrk( LOWER, TRANSPOSE, F(-1), X21B, Y21B, F(1), A22BR );\n\n        k += nb;\n    }\n}\n\ntemplate<typename F>\ninline void\nPivoted\n( Matrix<F>& A, Matrix<F>& dSub, Matrix<Int>& pPerm, bool conjugate=false,\n  LDLPivotType pivotType=BUNCH_KAUFMAN_A, Base<F> gamma=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::Pivoted\"))\n    switch( pivotType )\n    {\n    case BUNCH_KAUFMAN_A:\n    case BUNCH_KAUFMAN_C:\n    case BUNCH_KAUFMAN_D:\n        BlockedPivoted( A, dSub, pPerm, conjugate, pivotType, gamma );\n        break;\n    default:\n        UnblockedPivoted( A, dSub, pPerm, conjugate, pivotType, gamma );\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nPivoted\n( DistMatrix<F>& A, \n  DistMatrix<F,MD,STAR>& dSub, \n  DistMatrix<Int,UPerm,STAR>& pPerm, \n  bool conjugate=false, LDLPivotType pivotType=BUNCH_KAUFMAN_A, \n  Base<F> gamma=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ldl::Pivoted\"))\n    switch( pivotType )\n    {\n    case BUNCH_KAUFMAN_A:\n    case BUNCH_KAUFMAN_C:\n    case BUNCH_KAUFMAN_D:\n        BlockedPivoted( A, dSub, pPerm, conjugate, pivotType, gamma );\n        break;\n    default:\n        UnblockedPivoted( A, dSub, pPerm, conjugate, pivotType, gamma );\n    }\n}\n\n} // namespace ldl\n} // namespace elem\n\n#endif // ifndef ELEM_LDL_PIVOTED_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LDL/SolveAfter.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LDL_SOLVEAFTER_HPP\n#define ELEM_LDL_SOLVEAFTER_HPP\n\n#include ELEM_DIAGONALSOLVE_INC\n#include ELEM_QUASIDIAGONALSOLVE_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_INVERTPERMUTATION_INC\n#include ELEM_PERMUTEROWS_INC\n\nnamespace elem {\nnamespace ldl {\n\ntemplate<typename F> \ninline void\nSolveAfter( const Matrix<F>& A, Matrix<F>& B, bool conjugated=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ldl::SolveAfter\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    const Orientation orientation = ( conjugated ? ADJOINT : TRANSPOSE );\n    const bool checkIfSingular = false;\n    const auto d = A.GetDiagonal();\n    Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n    DiagonalSolve( LEFT, NORMAL, d, B, checkIfSingular );\n    Trsm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n}\n\ntemplate<typename F> \ninline void\nSolveAfter( const DistMatrix<F>& A, DistMatrix<F>& B, bool conjugated=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::SolveAfter\");\n        if( A.Grid() != B.Grid() )\n            LogicError(\"{A,B} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    const Orientation orientation = ( conjugated ? ADJOINT : TRANSPOSE );\n    const bool checkIfSingular = false;\n    const auto d = A.GetDiagonal();\n    Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n    DiagonalSolve( LEFT, NORMAL, d, B, checkIfSingular );\n    Trsm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n}\n\ntemplate<typename F> \ninline void\nSolveAfter\n( const Matrix<F>& A, const Matrix<F>& dSub, const Matrix<Int>& pPerm, \n  Matrix<F>& B, bool conjugated=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::SolveAfter\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n        if( pPerm.Height() != A.Height() )\n            LogicError(\"A and pPerm must be the same height\");\n        // TODO: Check for dSub\n    )\n    const Orientation orientation = ( conjugated ? ADJOINT : TRANSPOSE );\n    const auto d = A.GetDiagonal();\n\n    Matrix<Int> pInvPerm;\n    InvertPermutation( pPerm, pInvPerm );\n\n    PermuteRows( B, pPerm, pInvPerm );\n    Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n    QuasiDiagonalSolve( LEFT, LOWER, d, dSub, B, conjugated );\n    Trsm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n    PermuteRows( B, pInvPerm, pPerm );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nSolveAfter\n( const DistMatrix<F>& A, \n  const DistMatrix<F,MD,STAR>& dSub, \n  const DistMatrix<Int,UPerm,STAR>& pPerm, \n        DistMatrix<F>& B, bool conjugated=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::SolveAfter\");\n        if( A.Grid() != B.Grid() || A.Grid() != pPerm.Grid() )\n            LogicError(\"{A,B,pPerm} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n        if( A.Height() != pPerm.Height() )\n            LogicError(\"A and pPerm must be the same height\");\n        // TODO: Check for dSub\n    )\n    const Orientation orientation = ( conjugated ? ADJOINT : TRANSPOSE );\n    const auto d = A.GetDiagonal();\n\n    DistMatrix<Int,UPerm,STAR> pInvPerm(pPerm.Grid());\n    InvertPermutation( pPerm, pInvPerm );\n\n    PermuteRows( B, pPerm, pInvPerm );\n    Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n    QuasiDiagonalSolve( LEFT, LOWER, d, dSub, B, conjugated );\n    Trsm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n    PermuteRows( B, pInvPerm, pPerm );\n}\n\n} // namespace ldl\n} // namespace elem\n\n#endif // ifndef ELEM_LDL_SOLVEAFTER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LDL/Var3.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LDL_VAR3_HPP\n#define ELEM_LDL_VAR3_HPP\n\n#include ELEM_DIAGONALSOLVE_INC\n#include ELEM_TRSM_INC\n\nnamespace elem {\nnamespace ldl {\n\n// Unblocked serial LDL _without_ partial pivoting\ntemplate<typename F> \ninline void\nVar3Unb( Matrix<F>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ldl::Var3Unb\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n\n    F* ABuffer = A.Buffer();\n    const Int ldim = A.LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int a21Height = n - (j+1);\n\n        const F alpha11 = ABuffer[j+j*ldim];\n        if( alpha11 == F(0) )\n            throw ZeroPivotException();\n\n        F* ELEM_RESTRICT a21 = &ABuffer[(j+1)+j*ldim];\n        if( conjugate )\n        {\n            // A22 := A22 - a21 (a21 / alpha11)^H\n            for( Int k=0; k<a21Height; ++k )\n            {\n                const F beta = Conj(a21[k]/alpha11);\n                F* ELEM_RESTRICT A22Col = &ABuffer[(j+1)+(j+1+k)*ldim];\n                for( Int i=k; i<a21Height; ++i )\n                    A22Col[i] -= a21[i]*beta;\n            }\n        }\n        else\n        {\n            // A22 := A22 - a21 (a21 / alpha11)^T\n            for( Int k=0; k<a21Height; ++k )\n            {\n                const F beta = a21[k]/alpha11;\n                F* ELEM_RESTRICT A22Col = &ABuffer[(j+1)+(j+1+k)*ldim];\n                for( Int i=k; i<a21Height; ++i )\n                    A22Col[i] -= a21[i]*beta;\n            }\n        }\n        \n        // a21 := a21 / alpha11\n        for( Int i=0; i<a21Height; ++i )\n            a21[i] /= alpha11;\n    }\n}\n\n// Blocked serial LDL _without_ partial pivoting\ntemplate<typename F>\ninline void\nVar3( Matrix<F>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ldl::Var3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    Matrix<F> d1, S21;\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A21 = ViewRange( A, k+nb, k,    n,    k+nb );\n        auto A22 = ViewRange( A, k+nb, k+nb, n,    n    );\n\n        ldl::Var3Unb( A11, conjugate );\n        A11.GetDiagonal( d1 );\n        Trsm( RIGHT, LOWER, orientation, UNIT, F(1), A11, A21 );\n        S21 = A21;\n        DiagonalSolve( RIGHT, NORMAL, d1, A21 );\n        internal::TrrkNT( LOWER, orientation, F(-1), S21, A21, F(1), A22 );\n    }\n}\n\ntemplate<typename F>\ninline void\nVar3( DistMatrix<F>& A, bool conjugate=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ldl::Var3\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    const Orientation orientation = ( conjugate ? ADJOINT : TRANSPOSE );\n\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g), d1_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> A21_VR_STAR(g);\n    DistMatrix<F,STAR,MC  > S21Trans_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A21Trans_STAR_MR(g);\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A21 = ViewRange( A, k+nb, k,    n,    k+nb );\n        auto A22 = ViewRange( A, k+nb, k+nb, n,    n    );\n\n        A11_STAR_STAR = A11;\n        LocalLDL( A11_STAR_STAR, conjugate );\n        A11_STAR_STAR.GetDiagonal( d1_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        A21_VC_STAR.AlignWith( A22 );\n        A21_VC_STAR = A21;\n        LocalTrsm\n        ( RIGHT, LOWER, orientation, UNIT,\n          F(1), A11_STAR_STAR, A21_VC_STAR );\n\n        S21Trans_STAR_MC.AlignWith( A22 );\n        A21_VC_STAR.TransposePartialColAllGather( S21Trans_STAR_MC );\n        DiagonalSolve( RIGHT, NORMAL, d1_STAR_STAR, A21_VC_STAR );\n        A21_VR_STAR.AlignWith( A22 );\n        A21_VR_STAR = A21_VC_STAR;\n        A21Trans_STAR_MR.AlignWith( A22 );\n        A21_VR_STAR.TransposePartialColAllGather( A21Trans_STAR_MR, conjugate );\n        LocalTrrk\n        ( LOWER, TRANSPOSE,\n          F(-1), S21Trans_STAR_MC, A21Trans_STAR_MR, F(1), A22 );\n\n        A21 = A21_VC_STAR;\n    }\n}\n\n} // namespace ldl\n} // namespace elem\n\n#endif // ifndef ELEM_LDL_VAR3_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LDL.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LDL_HPP\n#define ELEM_LDL_HPP\n\nnamespace elem {\ntemplate<typename F>\nvoid LocalLDL( DistMatrix<F,STAR,STAR>& A, bool conjugate=false );\n} // namespace elem\n\n#include \"./LDL/Var3.hpp\"\n#include \"./LDL/Pivoted.hpp\"\n\n#include \"./LDL/MultiplyAfter.hpp\"\n#include \"./LDL/SolveAfter.hpp\"\n\n#include \"./LDL/Inertia.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nLocalLDL( DistMatrix<F,STAR,STAR>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalLDL\"))\n    ldl::Var3( A.Matrix(), conjugate );\n}\n\ntemplate<typename F>\ninline void\nLDLH( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LDLH\"))\n    ldl::Var3( A, true );\n}\n\ntemplate<typename F>\ninline void\nLDLH\n( Matrix<F>& A, Matrix<F>& dSub, Matrix<Int>& pPerm, \n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LDLH\"))\n    ldl::Pivoted( A, dSub, pPerm, true, pivotType );\n}\n\ntemplate<typename F>\ninline void \nLDLH( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LDLH\"))\n    ldl::Var3( A, true );\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nLDLH\n( DistMatrix<F>& A, \n  DistMatrix<F,MD,STAR>& dSub, \n  DistMatrix<Int,UPerm,STAR>& pPerm,\n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LDLH\"))\n    ldl::Pivoted( A, dSub, pPerm, true, pivotType );\n}\n\ntemplate<typename F>\ninline void\nLDLT( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LDLT\"))\n    ldl::Var3( A, false );\n}\n\ntemplate<typename F>\ninline void\nLDLT\n( Matrix<F>& A, Matrix<F>& dSub, Matrix<Int>& pPerm, \n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LDLT\"))\n    ldl::Pivoted( A, dSub, pPerm, false, pivotType );\n}\n\ntemplate<typename F>\ninline void \nLDLT( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LDLT\"))\n    ldl::Var3( A, false );\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nLDLT\n( DistMatrix<F>& A, \n  DistMatrix<F,MD,STAR>& dSub, \n  DistMatrix<Int,UPerm,STAR>& pPerm,\n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LDLT\"))\n    ldl::Pivoted( A, dSub, pPerm, false, pivotType );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LDL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LQ/ApplyQ.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LQ_APPLYQ_HPP\n#define ELEM_LQ_APPLYQ_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n\nnamespace elem {\nnamespace lq {\n\ntemplate<typename F>\ninline void\nApplyQ\n( LeftOrRight side, Orientation orientation, \n  const Matrix<F>& A, const Matrix<F>& t, const Matrix<Base<F>>& d, \n  Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n\n    const bool applyDFirst = normal!=onLeft;\n    if( applyDFirst )\n    {\n        if( onLeft )\n        {\n            auto BTop = View( B, 0, 0, d.Height(), B.Width() );\n            DiagonalScale( side, orientation, d, BTop );\n        }\n        else\n        {\n            auto BLeft = View( B, 0, 0, B.Height(), d.Height() );\n            DiagonalScale( side, orientation, d, BLeft );\n        }\n    }\n\n    const ForwardOrBackward direction = ( normal==onLeft ? FORWARD : BACKWARD );\n    const Conjugation conjugation = ( normal ? CONJUGATED : UNCONJUGATED );\n    ApplyPackedReflectors\n    ( side, UPPER, HORIZONTAL, direction, conjugation, 0, A, t, B );\n\n    if( !applyDFirst )\n    {\n        if( onLeft )\n        {\n            auto BTop = View( B, 0, 0, d.Height(), B.Width() );\n            DiagonalScale( side, orientation, d, BTop );\n        }\n        else\n        {\n            auto BLeft = View( B, 0, 0, B.Height(), d.Height() );\n            DiagonalScale( side, orientation, d, BLeft );\n        }\n    }\n}\n\ntemplate<typename F,Dist Ut,Dist Vt,Dist Ud,Dist Vd>\ninline void\nApplyQ\n( LeftOrRight side, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,Ut,Vt>& t, \n  const DistMatrix<Base<F>,Ud,Vd>& d, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n\n    const bool applyDFirst = normal!=onLeft;\n    if( applyDFirst )\n    {\n        if( onLeft )\n        {\n            auto BTop = View( B, 0, 0, d.Height(), B.Width() );\n            DiagonalScale( side, orientation, d, BTop );\n        }\n        else\n        {\n            auto BLeft = View( B, 0, 0, B.Height(), d.Height() );\n            DiagonalScale( side, orientation, d, BLeft );\n        }\n    }\n\n    const ForwardOrBackward direction = ( normal==onLeft ? FORWARD : BACKWARD );\n    const Conjugation conjugation = ( normal ? CONJUGATED : UNCONJUGATED );\n\n    DistMatrix<F,MD,STAR> tDiag(A.Grid());\n    tDiag.SetRoot( A.DiagonalRoot() );\n    tDiag.AlignCols( A.DiagonalAlign() );\n    tDiag = t;\n    ApplyPackedReflectors\n    ( side, UPPER, HORIZONTAL, direction, conjugation, 0, A, tDiag, B );\n\n    if( !applyDFirst )\n    {\n        if( onLeft )\n        {\n            auto BTop = View( B, 0, 0, d.Height(), B.Width() );\n            DiagonalScale( side, orientation, d, BTop );\n        }\n        else\n        {\n            auto BLeft = View( B, 0, 0, B.Height(), d.Height() );\n            DiagonalScale( side, orientation, d, BLeft );\n        }\n    }\n}\n\n} // namespace lq\n} // namespace elem\n\n#endif // ifndef ELEM_LQ_APPLY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LQ/Explicit.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LQ_EXPLICIT_HPP\n#define ELEM_LQ_EXPLICIT_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_LQ_INC\n#include ELEM_IDENTITY_INC\n\nnamespace elem {\nnamespace lq {\n\ntemplate<typename F>\ninline void\nExplicit( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::Explicit\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    LQ( A, t, d );\n\n    // TODO: Replace this with an in-place expansion of Q\n    Matrix<F> Q;\n    Identity( Q, A.Height(), A.Width() );\n    lq::ApplyQ( RIGHT, NORMAL, A, t, d, Q );\n    A = Q;\n}\n\ntemplate<typename F>\ninline void\nExplicit( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::Explicit\"))\n    const Grid& g = A.Grid();\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    LQ( A, t, d );\n\n    // TODO: Replace this with an in-place expansion of Q\n    DistMatrix<F> Q(g);\n    Q.AlignWith( A );\n    Identity( Q, A.Height(), A.Width() );\n    lq::ApplyQ( RIGHT, NORMAL, A, t, d, Q );\n    A = Q;\n}\n\ntemplate<typename F>\ninline void\nExplicit( Matrix<F>& L, Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::Explicit\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    LQ( A, t, d );\n    Matrix<F> AL, AR;\n    PartitionRight( A, AL, AR, Min(A.Height(),A.Width()) );\n    L = AL;\n    MakeTriangular( LOWER, L );\n\n    // TODO: Replace this with an in-place expansion of Q\n    Matrix<F> Q;\n    Identity( Q, A.Height(), A.Width() );\n    lq::ApplyQ( RIGHT, NORMAL, A, t, d, Q );\n    A = Q;\n}\n\ntemplate<typename F>\ninline void\nExplicit( DistMatrix<F>& L, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::Explicit\"))\n    const Grid& g = A.Grid();\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    LQ( A, t, d );\n    DistMatrix<F> AL(g), AR(g);\n    PartitionRight( A, AL, AR, Min(A.Height(),A.Width()) );\n    L = AL;\n    MakeTriangular( LOWER, L );\n\n    // TODO: Replace this with an in-place expansion of Q\n    DistMatrix<F> Q(g);\n    Identity( Q, A.Height(), A.Width() );\n    lq::ApplyQ( RIGHT, NORMAL, A, t, d, Q );\n    A = Q;\n}\n\n} // namespace lq\n} // namespace elem\n\n#endif // ifndef ELEM_LQ_EXPLICIT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LQ/Householder.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LQ_HOUSEHOLDER_HPP\n#define ELEM_LQ_HOUSEHOLDER_HPP\n\n#include \"./ApplyQ.hpp\"\n#include \"./PanelHouseholder.hpp\"\n\nnamespace elem {\nnamespace lq {\n\ntemplate<typename F> \ninline void\nHouseholder( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::Householder\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<minDim; k+=bsize )\n    {\n        const Int nb = Min(bsize,minDim-k);\n        auto ATopPan    = ViewRange( A, k,    k, k+nb, n );\n        auto ABottomPan = ViewRange( A, k+nb, k, m,    n );\n        auto t1 = View( t, k, 0, nb, 1 );\n        auto d1 = View( d, k, 0, nb, 1 );\n\n        PanelHouseholder( ATopPan, t1, d1 );\n        ApplyQ( RIGHT, ADJOINT, ATopPan, t1, d1, ABottomPan );\n    }\n}\n\ntemplate<typename F> \ninline void\nHouseholder( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::Householder\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    Householder( A, t, d );\n    MakeTriangular( LOWER, A );\n}\n\ntemplate<typename F> \ninline void\nHouseholder\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Householder\");\n        if( A.Grid() != t.Grid() || t.Grid() != d.Grid() )\n            LogicError(\"{A,t,d} must be distributed over the same grid\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n\n    t.SetRoot( A.DiagonalRoot() );\n    d.SetRoot( A.DiagonalRoot() );\n    t.AlignCols( A.DiagonalAlign() );\n    d.AlignCols( A.DiagonalAlign() );\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<minDim; k+=bsize )\n    {\n        const Int nb = Min(bsize,minDim-k);\n        auto ATopPan    = ViewRange( A, k,    k, k+nb, n );\n        auto ABottomPan = ViewRange( A, k+nb, k, m,    n );\n        auto t1 = View( t, k, 0, nb, 1 );\n        auto d1 = View( d, k, 0, nb, 1 );\n\n        PanelHouseholder( ATopPan, t1, d1 );\n        ApplyQ( RIGHT, ADJOINT, ATopPan, t1, d1, ABottomPan );\n    }\n}\n\ntemplate<typename F> \ninline void\nHouseholder( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Householder\"))\n    DistMatrix<F,MD,STAR> t(A.Grid());\n    DistMatrix<Base<F>,MD,STAR> d(A.Grid());\n    Householder( A, t, d );\n    MakeTriangular( LOWER, A );\n}\n\n} // namespace lq\n} // namespace elem\n\n#endif // ifndef ELEM_LQ_HOUSEHOLDER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LQ/PanelHouseholder.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LQ_PANELHOUSEHOLDER_HPP\n#define ELEM_LQ_PANELHOUSEHOLDER_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_DIAGONALSCALETRAPEZOID_INC\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n#include ELEM_REFLECTOR_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace lq {\n\ntemplate<typename F>\ninline void\nPanelHouseholder( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::PanelHouseholder\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    Matrix<F> z21;\n\n    for( Int k=0; k<minDim; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a1R     = ViewRange( A, k,   k,   k+1, n   );\n        auto A2R     = ViewRange( A, k+1, k,   m,   n   );\n\n        // Find tau and v such that\n        //  |alpha11 a12| /I - tau |1  | |1 conj(v)|\\ = |beta 0|\n        //                \\        |v^T|            /\n        const F tau = RightReflector( alpha11, a12 );\n        t.Set( k, 0, tau );\n\n        // Temporarily set a1R = | 1 v |\n        const F alpha = alpha11.Get(0,0);\n        alpha11.Set(0,0,1);\n\n        // A2R := A2R Hous(a1R^T,tau)\n        //      = A2R (I - tau a1R^T conj(a1R))\n        //      = A2R - tau (A2R a1R^T) conj(a1R)\n        Zeros( z21, A2R.Height(), 1 );\n        Gemv( NORMAL, F(1), A2R, a1R, F(0), z21 );\n        Ger( -tau, z21, a1R, A2R );\n\n        // Reset alpha11's value\n        alpha11.Set(0,0,alpha);\n    }\n    // Form d and rescale L\n    auto L = View( A, 0, 0, m, minDim );\n    d = L.GetRealPartOfDiagonal();\n    typedef Base<F> Real;\n    for( Int j=0; j<minDim; ++j )\n    {\n        const Real delta = d.Get(j,0);\n        if( delta >= Real(0) )\n            d.Set(j,0,Real(1));\n        else\n            d.Set(j,0,Real(-1));\n    }\n    DiagonalScaleTrapezoid( RIGHT, LOWER, NORMAL, d, L );\n}\n\ntemplate<typename F>\ninline void\nPanelHouseholder( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::PanelHouseholder\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    PanelHouseholder( A, t, d );\n}\n\ntemplate<typename F>\ninline void\nPanelHouseholder\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lq::PanelHouseholder\");\n        if( A.Grid() != t.Grid() || t.Grid() != d.Grid() )\n            LogicError(\"{A,t,d} must be distributed over the same grid\");\n    )\n    t.SetRoot( A.DiagonalRoot() );\n    d.SetRoot( A.DiagonalRoot() );\n    t.AlignCols( A.DiagonalAlign() );\n    d.AlignCols( A.DiagonalAlign() );\n    const Grid& g = A.Grid();\n    DistMatrix<F,STAR,MR  > a1R_STAR_MR(g);\n    DistMatrix<F,MC,  STAR> z21_MC_STAR(g);\n\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    for( Int k=0; k<minDim; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a1R     = ViewRange( A, k,   k,   k+1, n   );\n        auto A2R     = ViewRange( A, k+1, k,   m,   n   );\n\n        // Find tau and v such that\n        //  |alpha11 a12| /I - tau |1  | |1 conj(v)|\\ = |beta 0|\n        //                \\        |v^T|            /\n        const F tau = RightReflector( alpha11, a12 );\n        t.Set( k, 0, tau );\n\n        // Temporarily set a1R = | 1 v |\n        F alpha = 0;\n        if( alpha11.IsLocal(0,0) )\n        {\n            alpha = alpha11.GetLocal(0,0);\n            alpha11.SetLocal(0,0,1);\n        }\n\n        // A2R := A2R Hous(a1R^T,tau)\n        //      = A2R (I - tau a1R^T conj(a1R))\n        //      = A2R - tau (A2R a1R^T) conj(a1R)\n        a1R_STAR_MR.AlignWith( A2R );\n        a1R_STAR_MR = a1R;\n        z21_MC_STAR.AlignWith( A2R );\n        Zeros( z21_MC_STAR, A2R.Height(), 1 );\n        LocalGemv( NORMAL, F(1), A2R, a1R_STAR_MR, F(0), z21_MC_STAR );\n        z21_MC_STAR.SumOver( A2R.RowComm() );\n        Ger\n        ( -tau, z21_MC_STAR.LockedMatrix(), a1R_STAR_MR.LockedMatrix(),\n          A2R.Matrix() );\n\n        // Reset alpha11's value\n        if( alpha11.IsLocal(0,0) )\n            alpha11.SetLocal(0,0,alpha);\n    }\n    // Form d and rescale L\n    auto L = View( A, 0, 0, m, minDim );\n    d = L.GetRealPartOfDiagonal();\n    const Int diagLengthLoc = d.LocalHeight();\n    typedef Base<F> Real;\n    for( Int jLoc=0; jLoc<diagLengthLoc; ++jLoc )\n    {\n        const Real delta = d.GetLocal(jLoc,0);\n        if( delta >= Real(0) )\n            d.SetLocal(jLoc,0,Real(1));\n        else\n            d.SetLocal(jLoc,0,Real(-1));\n    }\n    DiagonalScaleTrapezoid( RIGHT, LOWER, NORMAL, d, L );\n}\n\ntemplate<typename F>\ninline void\nPanelHouseholder( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::PanelHouseholder\"))\n    DistMatrix<F,MD,STAR> t(A.Grid());\n    DistMatrix<Base<F>,MD,STAR> d(A.Grid());\n    PanelHouseholder( A, t, d );\n}\n\n} // namespace lq\n} // namespace elem\n\n#endif // ifndef ELEM_LQ_PANELHOUSEHOLDER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LQ/SolveAfter.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LQ_SOLVEAFTER_HPP\n#define ELEM_LQ_SOLVEAFTER_HPP\n\n#include ELEM_ZERO_INC\n#include ELEM_TRSM_INC\n#include ELEM_LQ_INC\n\n// TODO: Extend for BusingerGolub support\n\nnamespace elem {\nnamespace lq {\n\ntemplate<typename F> \ninline void\nSolveAfter\n( Orientation orientation, \n  const Matrix<F>& A, \n  const Matrix<F>& t, \n  const Matrix<Base<F>>& d, \n  const Matrix<F>& B,       \n        Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::SolveAfter\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m > n )\n        LogicError(\"Must have full row rank\");\n    // TODO: Add scaling\n    if( orientation == NORMAL )\n    {\n        if( m != B.Height() )\n            LogicError(\"A and B do not conform\");\n\n        // Copy B into X\n        X.Resize( n, B.Width() );\n        Matrix<F> XT, XB;\n        PartitionDown( X, XT, XB, m );\n        XT = B;\n        Zero( XB );\n\n        // Solve against L (checking for singularities)\n        auto AL = LockedView( A, 0, 0, m, m );\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), AL, XT, true );\n\n        // Apply Q' to X \n        lq::ApplyQ( LEFT, ADJOINT, A, t, d, X );\n    }\n    else // orientation in {TRANSPOSE,ADJOINT}\n    {\n        if( n != B.Height() )\n            LogicError(\"A and B do not conform\");\n\n        // Copy B into X\n        X = B;\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n\n        // Apply Q to X\n        lq::ApplyQ( LEFT, NORMAL, A, t, d, X );\n\n        // Shrink X to its new height\n        X.Resize( m, X.Width() );\n\n        // Solve against L' (check for singularities)\n        auto AL = LockedView( A, 0, 0, m, m );\n        Trsm( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), AL, X, true );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n    }\n}\n\ntemplate<typename F>\ninline void\nSolveAfter\n( Orientation orientation,\n  const DistMatrix<F>& A, \n  const DistMatrix<F,MD,STAR>& t, \n  const DistMatrix<Base<F>,MD,STAR>& d,\n  const DistMatrix<F>& B, \n        DistMatrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::SolveAfter\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Grid& g = A.Grid();\n    if( m > n )\n        LogicError(\"Must have full row rank\");\n\n    // TODO: Add scaling\n\n    if( orientation == NORMAL )\n    {\n        if( m != B.Height() )\n            LogicError(\"A and B do not conform\");\n\n        // Copy B into X\n        X.Resize( n, B.Width() );\n        DistMatrix<F> XT(g), XB(g);\n        PartitionDown( X, XT, XB, m );\n        XT = B;\n        Zero( XB );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( XT );\n\n        // Solve against L (checking for singularities)\n        auto AL = LockedView( A, 0, 0, m, m );\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), AL, XT, true );\n\n        // Apply Q' to X \n        lq::ApplyQ( LEFT, ADJOINT, A, t, d, X );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n    }\n    else\n    {\n        // Copy B into X\n        X = B;\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n\n        // Apply Q to X\n        lq::ApplyQ( LEFT, NORMAL, A, t, d, X );\n\n        // Shrink X to its new height\n        X.Resize( m, X.Width() );\n\n        // Solve against L' (check for singularities)\n        auto AL = LockedView( A, 0, 0, m, m );\n        Trsm( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), AL, X, true );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n    }\n}\n\n} // namespace lq\n} // namespace elem\n\n#endif // ifndef ELEM_LQ_SOLVEAFTER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LQ.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LQ_HPP\n#define ELEM_LQ_HPP\n\n#include \"./LQ/ApplyQ.hpp\"\n#include \"./LQ/Householder.hpp\"\n#include \"./LQ/SolveAfter.hpp\"\n#include \"./LQ/Explicit.hpp\"\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nLQ( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LQ\"))\n    lq::Householder( A );\n}\n\ntemplate<typename F> \ninline void\nLQ( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LQ\"))\n    lq::Householder( A );\n}\n\ntemplate<typename F> \ninline void\nLQ( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LQ\"))\n    lq::Householder( A, t, d );\n}\n\ntemplate<typename F> \ninline void\nLQ( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LQ\"))\n    lq::Householder( A, t, d );\n}\n\n// Variants which perform (Businger-Golub) row-pivoting\n// ====================================================\n// TODO\n\n} // namespace elem\n\n#endif // ifndef ELEM_LQ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LU/Full.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LU_FULL_HPP\n#define ELEM_LU_FULL_HPP\n\n#include ELEM_MAXABS_INC\n#include ELEM_SCALE_INC\n#include ELEM_SWAP_INC\n#include ELEM_GERU_INC\n\nnamespace elem {\nnamespace lu {\n\ntemplate<typename F>\ninline void\nFull( Matrix<F>& A, Matrix<Int>& pPerm, Matrix<Int>& qPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lu::Full\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n\n    // Initialize the permutations P and Q\n    pPerm.Resize( m, 1 );\n    for( Int i=0; i<m; ++i )\n        pPerm.Set( i, 0, i );\n    qPerm.Resize( n, 1 );\n    for( Int j=0; j<n; ++j )\n        qPerm.Set( j, 0, j );\n\n    for( Int k=0; k<minDim; ++k )\n    {\n        // Find the index and value of the pivot candidate\n        auto ABR = ViewRange( A, k, k, m, n );\n        auto pivot = MaxAbs( ABR );\n        const Int iPiv = pivot.indices[0] + k;\n        const Int jPiv = pivot.indices[1] + k;\n\n        RowSwap( A,     k, iPiv );\n        RowSwap( pPerm, k, iPiv );\n\n        ColSwap( A,     k, jPiv );\n        RowSwap( qPerm, k, jPiv );\n\n        // Now we can perform the update of the current panel\n        const F alpha11 = A.Get(k,k);\n        auto a21 = ViewRange( A, k+1, k,   m,   k+1 );\n        auto a12 = ViewRange( A, k,   k+1, k+1, n   );\n        auto A22 = ViewRange( A, k+1, k+1, m,   n   );\n        if( alpha11 == F(0) )\n            throw SingularMatrixException();\n        const F alpha11Inv = F(1) / alpha11;\n        Scale( alpha11Inv, a21 );\n        Geru( F(-1), a21, a12, A22 );\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nFull\n( DistMatrix<F>& A, \n  DistMatrix<Int,UPerm,STAR>& pPerm, \n  DistMatrix<Int,UPerm,STAR>& qPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::Full\");\n        if( A.Grid() != pPerm.Grid() || pPerm.Grid() != qPerm.Grid() )\n            LogicError(\"Matrices must be distributed over the same grid\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n\n    // Initialize the permutations P and Q\n    qPerm.AlignWith( pPerm );\n    pPerm.Resize( m, 1 );\n    qPerm.Resize( n, 1 );\n    for( Int iLoc=0; iLoc<pPerm.LocalHeight(); ++iLoc )\n        pPerm.SetLocal( iLoc, 0, pPerm.GlobalRow(iLoc) );\n    for( Int jLoc=0; jLoc<qPerm.LocalHeight(); ++jLoc )\n        qPerm.SetLocal( jLoc, 0, qPerm.GlobalRow(jLoc) );\n\n    for( Int k=0; k<minDim; ++k )\n    {\n        // Find the index and value of the pivot candidate\n        auto ABR = ViewRange( A, k, k, m, n );\n        auto pivot = MaxAbs( ABR );\n        const Int iPiv = pivot.indices[0] + k;\n        const Int jPiv = pivot.indices[1] + k;\n\n        RowSwap( A,     iPiv, k );\n        RowSwap( pPerm, iPiv, k );\n\n        ColSwap( A,     jPiv, k );\n        RowSwap( qPerm, jPiv, k );\n\n        // Now we can perform the update of the current panel\n        const F alpha11 = A.Get(k,k);\n        auto a21 = ViewRange( A, k+1, k,   m,   k+1 );\n        auto a12 = ViewRange( A, k,   k+1, k+1, n   );\n        auto A22 = ViewRange( A, k+1, k+1, m,   n   );\n        if( alpha11 == F(0) )\n            throw SingularMatrixException();\n        const F alpha11Inv = F(1) / alpha11;\n        Scale( alpha11Inv, a21 );\n        Geru( F(-1), a21, a12, A22 );\n    }\n}\n\n} // namespace lu\n} // namespace elem\n\n#endif // ifndef ELEM_LU_FULL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LU/Local.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LU_LOCAL_HPP\n#define ELEM_LU_LOCAL_HPP\n\n#include ELEM_SCALE_INC\n#include ELEM_GERU_INC\n\nnamespace elem {\nnamespace lu {\n\n// Local LU _without_ partial pivoting\n\ntemplate<typename F> \ninline void\nUnbFLAME( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lu::UnbFLAME\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    for( Int k=0; k<minDim; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a21     = ViewRange( A, k+1, k,   m,   k+1 );\n        auto A22     = ViewRange( A, k+1, k+1, m,   n   );\n\n        F alpha = alpha11.Get(0,0);\n        if( alpha == F(0) )\n            throw SingularMatrixException();\n        Scale( 1/alpha, a21 );\n        Geru( F(-1), a21, a12, A22 );\n    }\n}\n\ntemplate<typename F>\ninline void\nUnb( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lu::Unb\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    for( Int j=0; j<Min(m,n); ++j )\n    {\n        const F alpha = A.Get(j,j);\n        if( alpha == F(0) )\n            throw SingularMatrixException();\n\n        blas::Scal( m-(j+1), F(1)/alpha, A.Buffer(j+1,j), 1 );\n        blas::Geru\n        ( m-(j+1), n-(j+1),\n          F(-1), A.LockedBuffer(j+1,j), 1, A.LockedBuffer(j,j+1), A.LDim(),\n                 A.Buffer(j+1,j+1), A.LDim() );\n    }\n}\n\n} // namespace lu\n} // namespace elem\n\n#endif // ifndef ELEM_LU_LOCAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LU/Mod.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LU_MOD_HPP\n#define ELEM_LU_MOD_HPP\n\n#include ELEM_SWAP_INC\n#include ELEM_TRSV_INC\n\n#include ELEM_PERMUTEROWS_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// Begin with an LU factorization with partial pivoting, \n//     A = P^T L U,\n// and turn it into a partially-pivoted LU factorization of\n//     A + u v',\n// say\n//     (A + u v') = P^T L ( U + w v'),\n// w = inv(L) P u.\n\n// Please see subsection 2.1 from \n//     Peter Stange, Andreas Griewank, and Matthias Bollhofer,\n//     \"On the efficient update of rectangular LU factorizations subject to\n//      low rank modifications\"\n// which discusses the technique of Schwetlick and Kielbasinski described in\n// \"Numerische Lineare Algebra\".\n\ntemplate<typename F>\ninline void\nLUMod\n( Matrix<F>& A, Matrix<Int>& perm, \n  const Matrix<F>& u, const Matrix<F>& v, bool conjugate=true, \n  Base<F> tau=0.1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LUMod\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    if( minDim != m )\n        LogicError(\"It is assumed that height(A) <= width(A)\");\n    if( u.Height() != m || u.Width() != 1 )\n        LogicError(\"u is expected to be a conforming column vector\");\n    if( v.Height() != n || v.Width() != 1 )\n        LogicError(\"v is expected to be a conforming column vector\");\n\n    // w := inv(L) P u\n    auto w( u );\n    PermuteRows( w, perm );\n    Trsv( LOWER, NORMAL, UNIT, A, w );\n\n    // Maintain an external vector for the temporary subdiagonal of U\n    Matrix<F> uSub;\n    Zeros( uSub, minDim-1, 1 );\n\n    // Reduce w to a multiple of e0\n    for( Int i=minDim-2; i>=0; --i )\n    {\n        // Decide if we should pivot the i'th and i+1'th rows of w\n        const F lambdaSub = A.Get( i+1, i );\n        const F ups_ii = A.Get(i,i); \n        const F omega_i = w.Get( i, 0 );\n        const F omega_ip1 = w.Get( i+1, 0 );\n        const Real rightTerm = Abs(lambdaSub*omega_i+omega_ip1);\n        const bool pivot = ( Abs(omega_i) < tau*rightTerm );\n\n        auto lBi   = ViewRange( A, i+2, i,   m,   i+1 );\n        auto lBip1 = ViewRange( A, i+2, i+1, m,   i+2 );\n        auto uiR   = ViewRange( A, i,   i+1, i+1, n   );\n        auto uip1R = ViewRange( A, i+1, i+1, i+2, n   );\n\n        if( pivot )\n        {\n            // P := P_i P\n            RowSwap( perm, i, i+1 );\n\n            // Simultaneously perform \n            //   U := P_i U and\n            //   L := P_i L P_i^T\n            //\n            // Then update\n            //     L := L T_{i,L}^{-1},\n            //     U := T_{i,L} U, \n            //     w := T_{i,L} P_i w,\n            // where T_{i,L} is the Gauss transform which zeros (P_i w)_{i+1}.\n            // \n            // More succinctly,\n            //     gamma    := w(i) / w(i+1),\n            //     w(i)     := w(i+1), \n            //     w(i+1)   := 0,\n            //     L(:,i)   += gamma L(:,i+1),\n            //     U(i+1,:) -= gamma U(i,:).\n            const F gamma = omega_i / omega_ip1;\n            const F lambda_ii = F(1) + gamma*lambdaSub;\n            A.Set( i,   i, gamma );\n            A.Set( i+1, i, 0     );\n\n            auto lBiCopy = lBi;\n            Swap( NORMAL, lBi, lBip1 );\n            Axpy( gamma, lBiCopy, lBi );\n\n            auto uip1RCopy = uip1R;\n            RowSwap( A, i, i+1 );\n            Axpy( -gamma, uip1RCopy, uip1R );\n\n            // Force L back to *unit* lower-triangular form via the transform\n            //     L := L T_{i,U}^{-1} D^{-1}, \n            // where D is diagonal and responsible for forcing L(i,i) and \n            // L(i+1,i+1) back to 1. The effect on L is:\n            //     eta       := L(i,i+1)/L(i,i),\n            //     L(:,i+1)  -= eta L(:,i),\n            //     delta_i   := L(i,i),\n            //     delta_ip1 := L(i+1,i+1),\n            //     L(:,i)   /= delta_i,\n            //     L(:,i+1) /= delta_ip1,\n            // while the effect on U is\n            //     U(i,:)   += eta U(i+1,:)\n            //     U(i,:)   *= delta_i,\n            //     U(i+1,:) *= delta_{i+1},\n            // and the effect on w is\n            //     w(i) *= delta_i.\n            const F eta = lambdaSub/lambda_ii;\n            const F delta_i = lambda_ii;\n            const F delta_ip1 = F(1) - eta*gamma;\n\n            Axpy( -eta, lBi, lBip1 );\n            A.Set( i+1, i, gamma/delta_i );\n            Scale( F(1)/delta_i,   lBi   );\n            Scale( F(1)/delta_ip1, lBip1 );\n\n            A.Set( i, i, eta*ups_ii*delta_i );\n            Axpy( eta, uip1R, uiR );\n            Scale( delta_i,   uiR   );\n            Scale( delta_ip1, uip1R );\n            uSub.Set( i, 0, ups_ii*delta_ip1 );\n\n            // Finally set w(i)\n            w.Set( i, 0, omega_ip1*delta_i );\n        }\n        else\n        {\n            // Update\n            //     L := L T_{i,L}^{-1},\n            //     U := T_{i,L} U, \n            //     w := T_{i,L} w,\n            // where T_{i,L} is the Gauss transform which zeros w_{i+1}.\n            // \n            // More succinctly,\n            //     gamma    := w(i+1) / w(i),\n            //     L(:,i)   += gamma L(:,i+1),\n            //     U(i+1,:) -= gamma U(i,:),\n            //     w(i+1)   := 0.\n            const F gamma = omega_ip1 / omega_i;\n            A.Update( i+1, i, gamma );\n            Axpy(  gamma, lBip1, lBi );\n            Axpy( -gamma, uiR, uip1R );\n            uSub.Set( i, 0, -gamma*ups_ii );\n        }\n    }\n\n    // Add the modified w v' into U\n    {\n        auto a0 = View( A, 0, 0, 1, n );\n        const F omega_0 = w.Get( 0, 0 ); \n        Matrix<F> vTrans;\n        Transpose( v, vTrans, conjugate );\n        Axpy( omega_0, vTrans, a0 );\n    }\n\n    // Transform U from upper-Hessenberg to upper-triangular form\n    for( Int i=0; i<minDim-1; ++i ) \n    {\n        // Decide if we should pivot the i'th and i+1'th rows U\n        const F lambdaSub = A.Get(i+1,i);\n        const F ups_ii = A.Get( i, i );\n        const F ups_ip1i = uSub.Get( i, 0 );\n        const Real rightTerm = Abs(lambdaSub*ups_ii+ups_ip1i);\n        const bool pivot = ( Abs(ups_ii) < tau*rightTerm );\n\n        auto lBi   = ViewRange( A, i+2, i,   m,   i+1 );\n        auto lBip1 = ViewRange( A, i+2, i+1, m,   i+2 );\n        auto uiR   = ViewRange( A, i,   i+1, i+1, n   );\n        auto uip1R = ViewRange( A, i+1, i+1, i+2, n   );\n\n        if( pivot )\n        {\n            // P := P_i P\n            RowSwap( perm, i, i+1 );\n\n            // Simultaneously perform \n            //   U := P_i U and\n            //   L := P_i L P_i^T\n            //\n            // Then update\n            //     L := L T_{i,L}^{-1},\n            //     U := T_{i,L} U, \n            // where T_{i,L} is the Gauss transform which zeros U(i+1,i).\n            // \n            // More succinctly,\n            //     gamma    := U(i+1,i) / U(i,i),\n            //     L(:,i)   += gamma L(:,i+1),\n            //     U(i+1,:) -= gamma U(i,:).\n            const F gamma = ups_ii / ups_ip1i;\n            const F lambda_ii = F(1) + gamma*lambdaSub;\n            A.Set( i+1, i, ups_ip1i );\n            A.Set( i, i, gamma );\n\n            auto lBiCopy = lBi;\n            Swap( NORMAL, lBi, lBip1 );\n            Axpy( gamma, lBiCopy, lBi );\n\n            auto uip1RCopy = uip1R;\n            RowSwap( A, i, i+1 );\n            Axpy( -gamma, uip1RCopy, uip1R );\n\n            // Force L back to *unit* lower-triangular form via the transform\n            //     L := L T_{i,U}^{-1} D^{-1}, \n            // where D is diagonal and responsible for forcing L(i,i) and \n            // L(i+1,i+1) back to 1. The effect on L is:\n            //     eta       := L(i,i+1)/L(i,i),\n            //     L(:,i+1)  -= eta L(:,i),\n            //     delta_i   := L(i,i),\n            //     delta_ip1 := L(i+1,i+1),\n            //     L(:,i)   /= delta_i,\n            //     L(:,i+1) /= delta_ip1,\n            // while the effect on U is\n            //     U(i,:)   += eta U(i+1,:)\n            //     U(i,:)   *= delta_i,\n            //     U(i+1,:) *= delta_{i+1}.\n            const F eta = lambdaSub/lambda_ii;\n            const F delta_i = lambda_ii;\n            const F delta_ip1 = F(1) - eta*gamma;\n\n            Axpy( -eta, lBi, lBip1 );\n            A.Set( i+1, i, gamma/delta_i );\n            Scale( F(1)/delta_i,   lBi   );\n            Scale( F(1)/delta_ip1, lBip1 );\n\n            A.Set( i, i, ups_ip1i*delta_i );\n            Axpy( eta, uip1R, uiR );\n            Scale( delta_i,   uiR   );\n            Scale( delta_ip1, uip1R );\n        }\n        else\n        {\n            // Update\n            //     L := L T_{i,L}^{-1},\n            //     U := T_{i,L} U, \n            // where T_{i,L} is the Gauss transform which zeros U(i+1,i).\n            // \n            // More succinctly,\n            //     gamma    := U(i+1,i)/ U(i,i),\n            //     L(:,i)   += gamma L(:,i+1),\n            //     U(i+1,:) -= gamma U(i,:).\n            const F gamma = ups_ip1i / ups_ii;\n            A.Update( i+1, i, gamma );\n            Axpy(  gamma, lBip1, lBi );\n            Axpy( -gamma, uiR, uip1R );\n        }\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nLUMod\n( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& perm, \n  const DistMatrix<F>& u, const DistMatrix<F>& v, bool conjugate=true, \n  Base<F> tau=0.1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LUMod\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    const Grid& g = A.Grid();\n    if( minDim != m )\n        LogicError(\"It is assumed that height(A) <= width(A)\");\n    if( u.Height() != m || u.Width() != 1 )\n        LogicError(\"u is expected to be a conforming column vector\");\n    if( v.Height() != n || v.Width() != 1 )\n        LogicError(\"v is expected to be a conforming column vector\");\n    if( A.Grid() != perm.Grid() || perm.Grid() != u.Grid() ||\n        u.Grid() != v.Grid() )\n        LogicError(\"Grids must match\");\n\n    // w := inv(L) P u\n    auto w( u );\n    PermuteRows( w, perm );\n    Trsv( LOWER, NORMAL, UNIT, A, w );\n\n    // Maintain an external vector for the temporary subdiagonal of U\n    DistMatrix<F,MD,STAR> uSub(g);\n    uSub.SetRoot( A.DiagonalRoot(-1) );\n    uSub.AlignCols( A.DiagonalAlign(-1) );\n    Zeros( uSub, minDim-1, 1 );\n\n    // TODO: Consider locally maintaining all of w to avoid unnecessarily \n    //       broadcasting at every iteration.\n\n    // Reduce w to a multiple of e0\n    for( Int i=minDim-2; i>=0; --i )\n    {\n        // Decide if we should pivot the i'th and i+1'th rows of w\n        const F lambdaSub = A.Get(i+1,i);\n        const F ups_ii = A.Get(i,i); \n        const F omega_i = w.Get( i, 0 );\n        const F omega_ip1 = w.Get( i+1, 0 );\n        const Real rightTerm = Abs(lambdaSub*omega_i+omega_ip1);\n        const bool pivot = ( Abs(omega_i) < tau*rightTerm );\n\n        auto lBi   = ViewRange( A, i+2, i,   m,   i+1 );\n        auto lBip1 = ViewRange( A, i+2, i+1, m,   i+2 );\n        auto uiR   = ViewRange( A, i,   i+1, i+1, n   );\n        auto uip1R = ViewRange( A, i+1, i+1, i+2, n   );\n\n        if( pivot )\n        {\n            // P := P_i P\n            RowSwap( perm, i, i+1 );\n\n            // Simultaneously perform \n            //   U := P_i U and\n            //   L := P_i L P_i^T\n            //\n            // Then update\n            //     L := L T_{i,L}^{-1},\n            //     U := T_{i,L} U, \n            //     w := T_{i,L} P_i w,\n            // where T_{i,L} is the Gauss transform which zeros (P_i w)_{i+1}.\n            // \n            // More succinctly,\n            //     gamma    := w(i) / w(i+1),\n            //     w(i)     := w(i+1), \n            //     w(i+1)   := 0,\n            //     L(:,i)   += gamma L(:,i+1),\n            //     U(i+1,:) -= gamma U(i,:).\n            const F gamma = omega_i / omega_ip1;\n            const F lambda_ii = F(1) + gamma*lambdaSub;\n            A.Set( i,   i, gamma );\n            A.Set( i+1, i, 0     );\n\n            auto lBiCopy = lBi;\n            Swap( NORMAL, lBi, lBip1 );\n            Axpy( gamma, lBiCopy, lBi );\n\n            auto uip1RCopy = uip1R;\n            RowSwap( A, i, i+1 );\n            Axpy( -gamma, uip1RCopy, uip1R );\n\n            // Force L back to *unit* lower-triangular form via the transform\n            //     L := L T_{i,U}^{-1} D^{-1}, \n            // where D is diagonal and responsible for forcing L(i,i) and \n            // L(i+1,i+1) back to 1. The effect on L is:\n            //     eta       := L(i,i+1)/L(i,i),\n            //     L(:,i+1)  -= eta L(:,i),\n            //     delta_i   := L(i,i),\n            //     delta_ip1 := L(i+1,i+1),\n            //     L(:,i)   /= delta_i,\n            //     L(:,i+1) /= delta_ip1,\n            // while the effect on U is\n            //     U(i,:)   += eta U(i+1,:)\n            //     U(i,:)   *= delta_i,\n            //     U(i+1,:) *= delta_{i+1},\n            // and the effect on w is\n            //     w(i) *= delta_i.\n            const F eta = lambdaSub/lambda_ii;\n            const F delta_i = lambda_ii;\n            const F delta_ip1 = F(1) - eta*gamma;\n\n            Axpy( -eta, lBi, lBip1 );\n            A.Set( i+1, i, gamma/delta_i );\n            Scale( F(1)/delta_i,   lBi   );\n            Scale( F(1)/delta_ip1, lBip1 );\n\n            A.Set( i, i, eta*ups_ii*delta_i );\n            Axpy( eta, uip1R, uiR );\n            Scale( delta_i,   uiR   );\n            Scale( delta_ip1, uip1R );\n            uSub.Set( i, 0, ups_ii*delta_ip1 );\n\n            // Finally set w(i)\n            w.Set( i, 0, omega_ip1*delta_i );\n        }\n        else\n        {\n            // Update\n            //     L := L T_{i,L}^{-1},\n            //     U := T_{i,L} U, \n            //     w := T_{i,L} w,\n            // where T_{i,L} is the Gauss transform which zeros w_{i+1}.\n            // \n            // More succinctly,\n            //     gamma    := w(i+1) / w(i),\n            //     L(:,i)   += gamma L(:,i+1),\n            //     U(i+1,:) -= gamma U(i,:),\n            //     w(i+1)   := 0.\n            const F gamma = omega_ip1 / omega_i;\n            A.Update( i+1, i, gamma );\n            Axpy(  gamma, lBip1, lBi );\n            Axpy( -gamma, uiR, uip1R );\n            uSub.Set( i, 0, -gamma*ups_ii );\n        }\n    }\n\n    // Add the modified w v' into U\n    {\n        auto a0 = View( A, 0, 0, 1, n );\n        const F omega_0 = w.Get( 0, 0 ); \n        DistMatrix<F> vTrans(g);\n        vTrans.AlignWith( a0 );\n        Transpose( v, vTrans, conjugate );\n        Axpy( omega_0, vTrans, a0 );\n    }\n\n    // Transform U from upper-Hessenberg to upper-triangular form\n    for( Int i=0; i<minDim-1; ++i ) \n    {\n        // Decide if we should pivot the i'th and i+1'th rows U\n        const F lambdaSub = A.Get( i+1, i );\n        const F ups_ii = A.Get( i, i );\n        const F ups_ip1i = uSub.Get( i, 0 );\n        const Real rightTerm = Abs(lambdaSub*ups_ii+ups_ip1i);\n        const bool pivot = ( Abs(ups_ii) < tau*rightTerm );\n\n        auto lBi   = ViewRange( A, i+2, i,   m,   i+1 );\n        auto lBip1 = ViewRange( A, i+2, i+1, m,   i+2 );\n        auto uiR   = ViewRange( A, i,   i+1, i+1, n   );\n        auto uip1R = ViewRange( A, i+1, i+1, i+2, n   );\n\n        if( pivot )\n        {\n            // P := P_i P\n            RowSwap( perm, i, i+1 );\n\n            // Simultaneously perform \n            //   U := P_i U and\n            //   L := P_i L P_i^T\n            //\n            // Then update\n            //     L := L T_{i,L}^{-1},\n            //     U := T_{i,L} U, \n            // where T_{i,L} is the Gauss transform which zeros U(i+1,i).\n            // \n            // More succinctly,\n            //     gamma    := U(i+1,i) / U(i,i),\n            //     L(:,i)   += gamma L(:,i+1),\n            //     U(i+1,:) -= gamma U(i,:).\n            const F gamma = ups_ii / ups_ip1i;\n            const F lambda_ii = F(1) + gamma*lambdaSub;\n            A.Set( i+1, i, ups_ip1i );\n            A.Set( i, i, gamma );\n\n            auto lBiCopy = lBi;\n            Swap( NORMAL, lBi, lBip1 );\n            Axpy( gamma, lBiCopy, lBi );\n\n            auto uip1RCopy = uip1R;\n            RowSwap( A, i, i+1 );\n            Axpy( -gamma, uip1RCopy, uip1R );\n\n            // Force L back to *unit* lower-triangular form via the transform\n            //     L := L T_{i,U}^{-1} D^{-1}, \n            // where D is diagonal and responsible for forcing L(i,i) and \n            // L(i+1,i+1) back to 1. The effect on L is:\n            //     eta       := L(i,i+1)/L(i,i),\n            //     L(:,i+1)  -= eta L(:,i),\n            //     delta_i   := L(i,i),\n            //     delta_ip1 := L(i+1,i+1),\n            //     L(:,i)   /= delta_i,\n            //     L(:,i+1) /= delta_ip1,\n            // while the effect on U is\n            //     U(i,:)   += eta U(i+1,:)\n            //     U(i,:)   *= delta_i,\n            //     U(i+1,:) *= delta_{i+1}.\n            const F eta = lambdaSub/lambda_ii;\n            const F delta_i = lambda_ii;\n            const F delta_ip1 = F(1) - eta*gamma;\n            Axpy( -eta, lBi, lBip1 );\n            A.Set( i+1, i, gamma/delta_i );\n            Scale( F(1)/delta_i,   lBi   );\n            Scale( F(1)/delta_ip1, lBip1 );\n\n            A.Set( i, i, ups_ip1i*delta_i );\n            Axpy( eta, uip1R, uiR );\n            Scale( delta_i,   uiR   );\n            Scale( delta_ip1, uip1R );\n        }\n        else\n        {\n            // Update\n            //     L := L T_{i,L}^{-1},\n            //     U := T_{i,L} U, \n            // where T_{i,L} is the Gauss transform which zeros U(i+1,i).\n            // \n            // More succinctly,\n            //     gamma    := U(i+1,i)/ U(i,i),\n            //     L(:,i)   += gamma L(:,i+1),\n            //     U(i+1,:) -= gamma U(i,:).\n            const F gamma = ups_ip1i / ups_ii;\n            A.Update( i+1, i, gamma );\n            Axpy(  gamma, lBip1, lBi );\n            Axpy( -gamma, uiR, uip1R );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LU_MOD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LU/Panel.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LU_PANEL_HPP\n#define ELEM_LU_PANEL_HPP\n\n#include ELEM_SCALE_INC\n#include ELEM_SWAP_INC\n#include ELEM_MAXABS_INC\n#include ELEM_GERU_INC\n\nnamespace elem {\nnamespace lu {\n\ntemplate<typename F>\ninline void\nPanel( Matrix<F>& A, Matrix<Int>& pivots )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lu::Panel\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    DEBUG_ONLY(\n        if( m < n )\n            LogicError(\"Must be a column panel\");\n    )\n    pivots.Resize( n, 1 );\n\n    for( Int k=0; k<n; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a21     = ViewRange( A, k+1, k,   m,   k+1 );\n        auto A22     = ViewRange( A, k+1, k+1, m,   n   );\n\n        // Find the index and value of the pivot candidate\n        auto pivot = VectorMaxAbs( ViewRange(A,k,k,m,k+1) );\n        const Int iPiv = pivot.index + k;\n        pivots.Set( k, 0, iPiv );\n\n        // Swap the pivot row and current row\n        if( iPiv != k )\n        {\n            auto aCurRow = ViewRange( A, k,    0, k+1,    n );\n            auto aPivRow = ViewRange( A, iPiv, 0, iPiv+1, n );\n            Swap( NORMAL, aCurRow, aPivRow );\n        }\n\n        // Now we can perform the update of the current panel\n        const F alpha = alpha11.Get(0,0);\n        if( alpha == F(0) )\n            throw SingularMatrixException();\n        const F alpha11Inv = F(1) / alpha;\n        Scale( alpha11Inv, a21 );\n        Geru( F(-1), a21, a12, A22 );\n    }\n}\n\ntemplate<typename F>\ninline void\nPanel\n( DistMatrix<F,  STAR,STAR>& A, \n  DistMatrix<F,  MC,  STAR>& B, \n  DistMatrix<Int,STAR,STAR>& pivots )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::Panel\");\n        if( A.Grid() != pivots.Grid() || pivots.Grid() != B.Grid() )\n            LogicError(\"Matrices must be distributed over the same grid\");\n        if( A.Width() != B.Width() )\n            LogicError(\"A and B must be the same width\");\n    )\n    typedef Base<F> Real;\n\n    // For packing rows of data for pivoting\n    const Int n = A.Width();\n    const Int mB = B.Height();\n    const Int nB = B.Width();\n    std::vector<F> pivotBuffer( n );\n\n    pivots.Resize( n, 1 );\n\n    for( Int k=0; k<n; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a21     = ViewRange( A, k+1, k,   n,   k+1 );\n        auto A22     = ViewRange( A, k+1, k+1, n,   n   );\n        auto b1      = ViewRange( B, 0,   k,   mB,  k+1 );\n        auto B2      = ViewRange( B, 0,   k+1, mB,  nB  );\n\n        // Store the index/value of the local pivot candidate\n        ValueInt<Real> localPivot;\n        localPivot.value = FastAbs(alpha11.GetLocal(0,0));\n        localPivot.index = k;\n        for( Int i=0; i<a21.Height(); ++i )\n        {\n            const Real value = FastAbs(a21.GetLocal(i,0));\n            if( value > localPivot.value )\n            {\n                localPivot.value = value;\n                localPivot.index = k + i + 1;\n            }\n        }\n        for( Int iLoc=0; iLoc<B.LocalHeight(); ++iLoc )\n        {\n            const Real value = FastAbs(b1.GetLocal(iLoc,0));\n            if( value > localPivot.value )\n            {\n                localPivot.value = value;\n                localPivot.index = n + B.GlobalRow(iLoc);\n            }\n        }\n\n        // Compute and store the location of the new pivot\n        const ValueInt<Real> pivot = \n            mpi::AllReduce( localPivot, mpi::MaxLocOp<Real>(), B.ColComm() );\n        const Int iPiv = pivot.index;\n        pivots.SetLocal( k, 0, iPiv );\n\n        // Perform the pivot within this panel\n        if( iPiv < n )\n        {\n            // Pack pivot into temporary\n            for( Int j=0; j<n; ++j )\n                pivotBuffer[j] = A.GetLocal( iPiv, j );\n            // Replace pivot with current\n            for( Int j=0; j<n; ++j )\n                A.SetLocal( iPiv, j, A.GetLocal(k,j) );\n        }\n        else\n        {\n            // The owning row of the pivot row packs it into the row buffer\n            // and then overwrites with the current row\n            const Int relIndex = iPiv - n;\n            const Int ownerRow = B.RowOwner(relIndex);\n            if( B.IsLocalRow(relIndex) )\n            {\n                const Int iLoc = B.LocalRow(relIndex);\n                for( Int j=0; j<n; ++j )\n                    pivotBuffer[j] = B.GetLocal( iLoc, j );\n                for( Int j=0; j<n; ++j )\n                    B.SetLocal( iLoc, j, A.GetLocal(k,j) );\n            }\n            // The owning row broadcasts within process columns\n            mpi::Broadcast( pivotBuffer.data(), n, ownerRow, B.ColComm() );\n        }\n        // Overwrite the current row with the pivot row\n        for( Int j=0; j<n; ++j )\n            A.SetLocal( k, j, pivotBuffer[j] );\n\n        // Now we can perform the update of the current panel\n        const F alpha = alpha11.GetLocal(0,0);\n        if( alpha == F(0) )\n            throw SingularMatrixException();\n        const F alpha11Inv = F(1) / alpha;\n        Scale( alpha11Inv, a21 );\n        Scale( alpha11Inv, b1  );\n        Geru( F(-1), a21.Matrix(), a12.Matrix(), A22.Matrix() );\n        Geru( F(-1), b1.Matrix(), a12.Matrix(), B2.Matrix() );\n    }\n}\n\n} // namespace lu\n} // namespace elem\n\n#endif // ifndef ELEM_LU_PANEL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LU/SolveAfter.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LU_SOLVEAFTER_HPP\n#define ELEM_LU_SOLVEAFTER_HPP\n\n#include ELEM_APPLYROWPIVOTS_INC\n#include ELEM_TRSM_INC\n\nnamespace elem {\nnamespace lu {\n\ntemplate<typename F> \ninline void\nSolveAfter( Orientation orientation, const Matrix<F>& A, Matrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::SolveAfter\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    if( orientation == NORMAL )\n    {\n        Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n    }\n    else\n    {\n        Trsm( LEFT, UPPER, orientation, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n    }\n}\n\ntemplate<typename F> \ninline void\nSolveAfter\n( Orientation orientation, const DistMatrix<F>& A, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::SolveAfter\");\n        if( A.Grid() != B.Grid() )\n            LogicError(\"{A,B} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    if( orientation == NORMAL )\n    {\n        Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n    }\n    else\n    {\n        Trsm( LEFT, UPPER, orientation, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n    }\n}\n\ntemplate<typename F> \ninline void\nSolveAfter\n( Orientation orientation, \n  const Matrix<F>& A, const Matrix<Int>& pPerm, Matrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::SolveAfter\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n        if( pPerm.Height() != A.Height() )\n            LogicError(\"A and pPerm must be the same height\");\n    )\n    if( orientation == NORMAL )\n    {\n        PermuteRows( B, pPerm );\n        Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n    }\n    else\n    {\n        Trsm( LEFT, UPPER, orientation, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n        InversePermuteRows( B, pPerm );\n    }\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nSolveAfter\n( Orientation orientation, \n  const DistMatrix<F>& A, \n  const DistMatrix<Int,UPerm,STAR>& pPerm, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::SolveAfter\");\n        if( A.Grid() != B.Grid() || A.Grid() != pPerm.Grid() )\n            LogicError(\"{A,B,pPerm} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n        if( A.Height() != pPerm.Height() )\n            LogicError(\"A and pPerm must be the same height\");\n    )\n    if( orientation == NORMAL )\n    {\n        PermuteRows( B, pPerm );\n        Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n    }\n    else\n    {\n        Trsm( LEFT, UPPER, orientation, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n        InversePermuteRows( B, pPerm );\n    }\n}\n\ntemplate<typename F> \ninline void\nSolveAfter\n( Orientation orientation, \n  const Matrix<F>& A, \n  const Matrix<Int>& pPerm, \n  const Matrix<Int>& qPerm, \n        Matrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::SolveAfter\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n        if( pPerm.Height() != A.Height() )\n            LogicError(\"A and p must be the same height\");\n        if( qPerm.Height() != A.Height() )\n            LogicError(\"A and q must be the same height\");\n    )\n    if( orientation == NORMAL )\n    {\n        PermuteRows( B, pPerm );\n        Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n        InversePermuteRows( B, qPerm );\n    }\n    else\n    {\n        PermuteRows( B, qPerm );\n        Trsm( LEFT, UPPER, orientation, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n        InversePermuteRows( B, pPerm );\n    }\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nSolveAfter\n( Orientation orientation, \n  const DistMatrix<F>& A, \n  const DistMatrix<Int,UPerm,STAR>& pPerm, \n  const DistMatrix<Int,UPerm,STAR>& qPerm,\n        DistMatrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"lu::SolveAfter\");\n        if( A.Grid() != B.Grid() || \n            A.Grid() != pPerm.Grid() || \n            pPerm.Grid() != qPerm.Grid() )\n            LogicError(\"{A,B,pPerm,qPerm} must be distributed over same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n        if( A.Height() != pPerm.Height() )\n            LogicError(\"A and pPerm must be the same height\");\n        if( A.Height() != qPerm.Height() )\n            LogicError(\"A and qPerm must be the same height\");\n    )\n    if( orientation == NORMAL )\n    {\n        PermuteRows( B, pPerm );\n        Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, B );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n        InversePermuteRows( B, qPerm );\n    }\n    else\n    {\n        PermuteRows( B, qPerm );\n        Trsm( LEFT, UPPER, orientation, NON_UNIT, F(1), A, B );\n        Trsm( LEFT, LOWER, orientation, UNIT, F(1), A, B );\n        InversePermuteRows( B, pPerm );\n    }\n}\n\n} // namespace lu\n} // namespace elem\n\n#endif // ifndef ELEM_LU_SOLVEAFTER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/LU.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LU_HPP\n#define ELEM_LU_HPP\n\n#include ELEM_GEMM_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_APPLYROWPIVOTS_INC\n#include ELEM_PIVOTSTOPARTIALPERMUTATION_INC\n\n#include \"./LU/Local.hpp\"\n#include \"./LU/Panel.hpp\"\n#include \"./LU/Full.hpp\"\n#include \"./LU/Mod.hpp\"\n#include \"./LU/SolveAfter.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nLocalLU( DistMatrix<F,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalLU\"))\n    LU( A.Matrix() );\n}\n\n// Performs LU factorization without pivoting\n\ntemplate<typename F> \ninline void\nLU( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LU\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    const Int bsize = Blocksize();\n    for( Int k=0; k<minDim; k+=bsize )\n    {\n        const Int nb = Min(bsize,minDim-k);\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );   \n        auto A12 = ViewRange( A, k,    k+nb, k+nb, n    );\n        auto A21 = ViewRange( A, k+nb, k,    m,    k+nb );\n        auto A22 = ViewRange( A, k+nb, k+nb, m,    n    );\n\n        lu::Unb( A11 );\n        Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), A11, A21 );\n        Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A11, A12 );\n        Gemm( NORMAL, NORMAL, F(-1), A21, A12, F(1), A22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nLU( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LU\"))\n    const Grid& g = A.Grid();\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> A21_MC_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > A12_STAR_MR(g);\n\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    const Int bsize = Blocksize();\n    for( Int k=0; k<minDim; k+=bsize )\n    {\n        const Int nb = Min(bsize,minDim-k);\n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );          \n        auto A12 = ViewRange( A, k,    k+nb, k+nb, n    );\n        auto A21 = ViewRange( A, k+nb, k,    m,    k+nb );\n        auto A22 = ViewRange( A, k+nb, k+nb, m,    n    );\n\n        A11_STAR_STAR = A11;\n        LocalLU( A11_STAR_STAR );\n        A11 = A11_STAR_STAR;\n\n        A21_MC_STAR.AlignWith( A22 );\n        A21_MC_STAR = A21;\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), A11_STAR_STAR, A21_MC_STAR );\n        A21 = A21_MC_STAR;\n\n        // Perhaps we should give up perfectly distributing this operation since\n        // it's total contribution is only O(n^2)\n        A12_STAR_VR.AlignWith( A22 );\n        A12_STAR_VR = A12;\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, UNIT, F(1), A11_STAR_STAR, A12_STAR_VR );\n\n        A12_STAR_MR.AlignWith( A22 );\n        A12_STAR_MR = A12_STAR_VR;\n        LocalGemm( NORMAL, NORMAL, F(-1), A21_MC_STAR, A12_STAR_MR, F(1), A22 );\n        A12 = A12_STAR_MR;\n    }\n}\n\n// Performs LU factorization with partial pivoting\n\ntemplate<typename F> \ninline void\nLU( Matrix<F>& A, Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LU\"))\n\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    const Int bsize = Blocksize();\n\n    // Initialize P to the identity matrix\n    pPerm.Resize( m, 1 );\n    for( Int i=0; i<m; ++i )\n        pPerm.Set( i, 0, i );\n\n    // Temporaries for accumulating partial permutations for each block\n    Matrix<Int> p1;\n    Matrix<Int> p1Perm, p1InvPerm;\n\n    for( Int k=0; k<minDim; k+=bsize )\n    {\n        const Int nb = Min(bsize,minDim-k);\n        auto A11  = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A12  = ViewRange( A, k,    k+nb, k+nb, n    );\n        auto A21  = ViewRange( A, k+nb, k,    m,    k+nb );\n        auto A22  = ViewRange( A, k+nb, k+nb, m,    n    );\n        auto ABL  = ViewRange( A, k,    0,    m,    k    );\n        auto ABRL = ViewRange( A, k,    k,    m,    k+nb );\n        auto ABRR = ViewRange( A, k,    k+nb, m,    n    );\n\n        lu::Panel( ABRL, p1 );\n        PivotsToPartialPermutation( p1, p1Perm, p1InvPerm );\n        PermuteRows( ABL, p1Perm, p1InvPerm );\n        PermuteRows( ABRR, p1Perm, p1InvPerm );\n\n        // Update the preimage of the permutation\n        auto pPermB = ViewRange( pPerm, k, 0, m, 1 ); \n        PermuteRows( pPermB, p1Perm, p1InvPerm );\n\n        Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A11, A12 );\n        Gemm( NORMAL, NORMAL, F(-1), A21, A12, F(1), A22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nLU( Matrix<F>& A, Matrix<Int>& pPerm, Matrix<Int>& qPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LU\"))\n    lu::Full( A, pPerm, qPerm );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nLU( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LU\");\n        if( A.Grid() != pPerm.Grid() )\n            LogicError(\"{A,pPerm} must be distributed over the same grid\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    const Int bsize = Blocksize();\n    const Grid& g = A.Grid();\n\n    DistMatrix<F,  STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,  MC,  STAR> A21_MC_STAR(g);\n    DistMatrix<F,  STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,  STAR,MR  > A12_STAR_MR(g);\n    DistMatrix<Int,STAR,STAR> p1_STAR_STAR(g);\n\n    // Initialize the permutation to the identity\n    pPerm.Resize( m, 1 );\n    for( Int iLoc=0; iLoc<pPerm.LocalHeight(); ++iLoc )\n        pPerm.SetLocal( iLoc, 0, pPerm.GlobalRow(iLoc) );\n    DistMatrix<Int,UPerm,STAR> p1Perm(g), p1InvPerm(g);\n\n    for( Int k=0; k<minDim; k+=bsize )\n    {\n        const Int nb = Min(bsize,minDim-k);\n        auto A11  = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A12  = ViewRange( A, k,    k+nb, k+nb, n    );\n        auto A21  = ViewRange( A, k+nb, k,    m,    k+nb );\n        auto A22  = ViewRange( A, k+nb, k+nb, m,    n    );\n        auto AB   = ViewRange( A, k,    0,    m,    n    );\n        auto ABL  = ViewRange( A, k,    0,    m,    k    );\n        auto ABRL = ViewRange( A, k,    k,    m,    k+nb );\n        auto ABRR = ViewRange( A, k,    k+nb, m,    n    );\n\n        A21_MC_STAR.AlignWith( A22 );\n        A21_MC_STAR = A21;\n        A11_STAR_STAR = A11;\n\n        lu::Panel( A11_STAR_STAR, A21_MC_STAR, p1_STAR_STAR );\n        PivotsToPartialPermutation( p1_STAR_STAR, p1Perm, p1InvPerm );\n        PermuteRows( AB, p1Perm, p1InvPerm );\n\n        // Update the preimage of the permutation\n        auto pPermB = ViewRange( pPerm, k, 0, m, 1 ); \n        PermuteRows( pPermB, p1Perm, p1InvPerm );\n\n        // Perhaps we should give up perfectly distributing this operation since\n        // it's total contribution is only O(n^2)\n        A12_STAR_VR.AlignWith( A22 );\n        A12_STAR_VR = A12;\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, UNIT, F(1), A11_STAR_STAR, A12_STAR_VR );\n\n        A12_STAR_MR.AlignWith( A22 );\n        A12_STAR_MR = A12_STAR_VR;\n        LocalGemm( NORMAL, NORMAL, F(-1), A21_MC_STAR, A12_STAR_MR, F(1), A22 );\n\n        A11 = A11_STAR_STAR;\n        A12 = A12_STAR_MR;\n        A21 = A21_MC_STAR;\n    }\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nLU\n( DistMatrix<F>& A, \n  DistMatrix<Int,UPerm,STAR>& pPerm, \n  DistMatrix<Int,UPerm,STAR>& qPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LU\"))\n    lu::Full( A, pPerm, qPerm );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LU_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/QR/ApplyQ.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QR_APPLYQ_HPP\n#define ELEM_QR_APPLYQ_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n\nnamespace elem {\nnamespace qr {\n\ntemplate<typename F>\ninline void\nApplyQ\n( LeftOrRight side, Orientation orientation, \n  const Matrix<F>& A, const Matrix<F>& t, const Matrix<Base<F>>& d, \n  Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n\n    const bool applyDFirst = normal==onLeft;\n    if( applyDFirst )\n    {\n        if( onLeft )\n        {\n            auto BTop = View( B, 0, 0, d.Height(), B.Width() );\n            DiagonalScale( side, orientation, d, BTop );\n        }\n        else\n        {\n            auto BLeft = View( B, 0, 0, B.Height(), d.Height() );\n            DiagonalScale( side, orientation, d, BLeft );\n        }\n    }\n\n    const ForwardOrBackward direction = ( normal==onLeft ? BACKWARD : FORWARD );\n    const Conjugation conjugation =  ( normal ? CONJUGATED : UNCONJUGATED );\n    ApplyPackedReflectors\n    ( side, LOWER, VERTICAL, direction, conjugation, 0, A, t, B );\n\n    if( !applyDFirst )\n    {\n        if( onLeft )\n        {\n            auto BTop = View( B, 0, 0, d.Height(), B.Width() );\n            DiagonalScale( side, orientation, d, BTop );\n        }\n        else\n        {\n            auto BLeft = View( B, 0, 0, B.Height(), d.Height() );\n            DiagonalScale( side, orientation, d, BLeft );\n        }\n    }\n}\n\ntemplate<typename F,Dist Ut,Dist Vt,Dist Ud,Dist Vd>\ninline void\nApplyQ\n( LeftOrRight side, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,Ut,Vt>& t, \n  const DistMatrix<Base<F>,Ud,Vd>& d, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n\n    const bool applyDFirst = normal==onLeft;\n    if( applyDFirst )\n    {\n        if( onLeft )\n        {\n            auto BTop = View( B, 0, 0, d.Height(), B.Width() );\n            DiagonalScale( side, orientation, d, BTop );\n        }\n        else\n        {\n            auto BLeft = View( B, 0, 0, B.Height(), d.Height() );\n            DiagonalScale( side, orientation, d, BLeft );\n        }\n    }\n\n    const ForwardOrBackward direction = ( normal==onLeft ? BACKWARD : FORWARD );\n    const Conjugation conjugation =  ( normal ? CONJUGATED : UNCONJUGATED );\n\n    DistMatrix<F,MD,STAR> tDiag(A.Grid());\n    tDiag.SetRoot( A.DiagonalRoot() );\n    tDiag.AlignCols( A.DiagonalAlign() );\n    tDiag = t;\n    ApplyPackedReflectors\n    ( side, LOWER, VERTICAL, direction, conjugation, 0, A, tDiag, B );\n\n    if( !applyDFirst )\n    {\n        if( onLeft )\n        {\n            auto BTop = View( B, 0, 0, d.Height(), B.Width() );\n            DiagonalScale( side, orientation, d, BTop );\n        }\n        else\n        {\n            auto BLeft = View( B, 0, 0, B.Height(), d.Height() );\n            DiagonalScale( side, orientation, d, BLeft );\n        }\n    }\n}\n\n} // namespace qr\n} // namespace elem\n\n#endif // ifndef ELEM_QR_APPLYQ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/QR/BusingerGolub.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QR_BUSINGERGOLUB_HPP\n#define ELEM_QR_BUSINGERGOLUB_HPP\n\n#include ELEM_DIAGONALSCALETRAPEZOID_INC\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n#include ELEM_SWAP_INC\n\n#include ELEM_REFLECTOR_INC\n\n#include ELEM_INVERTPERMUTATION_INC\n\n#include ELEM_ZEROS_INC\n\n#include <algorithm>\n\nnamespace elem {\nnamespace qr {\n\ntemplate<typename F>\ninline Base<F>\nColNorms( const Matrix<F>& A, std::vector<Base<F>>& norms )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::ColNorms\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    Real maxNorm = 0;\n    norms.resize( n );\n    for( Int j=0; j<n; ++j )\n    {\n        norms[j] = blas::Nrm2( m, A.LockedBuffer(0,j), 1 );\n        maxNorm = std::max( maxNorm, norms[j] );\n    }\n    return maxNorm;\n}\n\ntemplate<typename Real>\ninline ValueInt<Real>\nFindPivot( const std::vector<Real>& norms, Int col )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::FindPivot\"))\n    const auto maxNorm = std::max_element( norms.begin()+col, norms.end() );\n    ValueInt<Real> pivot;\n    pivot.value = *maxNorm;\n    pivot.index = maxNorm - norms.begin();\n    return pivot;\n}\n\ntemplate<typename F> \ninline Int\nBusingerGolub\n( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d, Matrix<Int>& pPerm,\n  Int maxSteps, Base<F> tol, bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    maxSteps = Min(maxSteps,Min(m,n));\n    t.Resize( maxSteps, 1 );\n    d.Resize( maxSteps, 1 );\n\n    Matrix<F> z21;\n\n    // Initialize two copies of the column norms, one will be consistently\n    // updated, but the original copy will be kept to determine when the \n    // updated quantities are no longer accurate.\n    std::vector<Real> origNorms;\n    const Real maxOrigNorm = ColNorms( A, origNorms );\n    std::vector<Real> norms = origNorms;\n    const Real updateTol = Sqrt(lapack::MachineEpsilon<Real>());\n\n    // Initialize the inverse permutation to the identity\n    Matrix<Int> pInvPerm;\n    pInvPerm.Resize( n, 1 );\n    for( Int j=0; j<n; ++j )\n        pInvPerm.Set( j, 0, j ); \n\n    Int k=0;\n    for( ; k<maxSteps; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a21     = ViewRange( A, k+1, k,   m,   k+1 );\n        auto aB1     = ViewRange( A, k,   k,   m,   k+1 );\n        auto AB2     = ViewRange( A, k,   k+1, m,   n   );\n\n        // Find the next column pivot\n        const ValueInt<Real> pivot = FindPivot( norms, k );\n        if( pivot.value <= tol*maxOrigNorm )\n            break;\n        RowSwap( pInvPerm, k, pivot.index );\n \n        // Perform the swap\n        const Int jPiv = pivot.index;\n        if( jPiv != k )\n        {\n            blas::Swap( m, A.Buffer(0,k), 1, A.Buffer(0,jPiv), 1 );\n            norms[jPiv] = norms[k];\n            origNorms[jPiv] = origNorms[k];\n        }\n\n        // Find tau and u such that\n        //  / I - tau | 1 | | 1, u^H | \\ | alpha11 | = | beta |\n        //  \\         | u |            / |     a21 | = |    0 |\n        const F tau = LeftReflector( alpha11, a21 );\n        t.Set( k, 0, tau );\n\n        // Temporarily set aB1 = | 1 |\n        //                       | u |\n        const F alpha = alpha11.Get(0,0);\n        alpha11.Set(0,0,1);\n\n        // AB2 := Hous(aB1,tau) AB2\n        //      = (I - tau aB1 aB1^H) AB2\n        //      = AB2 - tau aB1 (AB2^H aB1)^H\n        Zeros( z21, AB2.Width(), 1 );\n        Gemv( ADJOINT, F(1), AB2, aB1, F(0), z21 );\n        Ger( -tau, aB1, z21, AB2 );\n\n        // Reset alpha11's value\n        alpha11.Set(0,0,alpha);\n\n        // Update the column norm estimates in the same manner as LAWN 176\n        for( Int j=k+1; j<n; ++j )\n        {\n            if( norms[j] != Real(0) )\n            {\n                Real gamma = Abs(A.Get(k,j)) / norms[j];\n                gamma = std::max( Real(0), (Real(1)-gamma)*(Real(1)+gamma) );\n\n                const Real ratio = norms[j] / origNorms[j];\n                const Real phi = gamma*(ratio*ratio);\n                if( phi <= updateTol || alwaysRecompute )\n                {\n                    norms[j] = blas::Nrm2( m-(k+1), A.Buffer(k+1,j), 1 );\n                    origNorms[j] = norms[j];\n                }\n                else\n                    norms[j] *= Sqrt(gamma);\n            }\n        }\n    }\n    InvertPermutation( pInvPerm, pPerm );\n\n    // Form d and rescale R\n    auto R = View( A, 0, 0, k, n );\n    d = R.GetRealPartOfDiagonal();\n    for( Int j=0; j<k; ++j )\n    {\n        const Real delta = d.Get(j,0);\n        if( delta >= Real(0) )\n            d.Set(j,0,Real(1));\n        else\n            d.Set(j,0,Real(-1));\n    }\n    DiagonalScaleTrapezoid( LEFT, UPPER, NORMAL, d, R );\n\n    return k;\n}\n\ntemplate<typename F> \ninline Int\nBusingerGolub\n( Matrix<F>& A, Matrix<Int>& pPerm,\n  Int maxSteps, Base<F> tol, bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    return BusingerGolub( A, t, d, pPerm, maxSteps, tol, alwaysRecompute );\n}\n\ntemplate<typename F> \ninline Int\nBusingerGolub\n( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d, Matrix<Int>& pPerm,\n  Int numSteps, bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    // Use a tolerance of -1 so that we do not stop early\n    return BusingerGolub\n           ( A, t, d, pPerm, numSteps, Base<F>(-1), alwaysRecompute );\n}\n\n// If we don't need 't' or 'd' from the above routine\ntemplate<typename F> \ninline Int\nBusingerGolub\n( Matrix<F>& A, Matrix<Int>& pPerm, Int numSteps, bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    return BusingerGolub( A, t, d, pPerm, numSteps, alwaysRecompute );\n}\n\ntemplate<typename F> \ninline Int\nBusingerGolub\n( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d, Matrix<Int>& pPerm, \n  bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    const Int numSteps = Min(A.Height(),A.Width());\n    return BusingerGolub( A, t, d, pPerm, numSteps, alwaysRecompute );\n}\n\n// If we don't need 't' or 'd' from the above routine\ntemplate<typename F> \ninline Int\nBusingerGolub( Matrix<F>& A, Matrix<Int>& pPerm, bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    return BusingerGolub( A, t, d, pPerm, alwaysRecompute );\n}\n\ntemplate<typename F>\ninline ValueInt<Base<F>>\nFindColPivot\n( const DistMatrix<F>& A, const std::vector<Base<F>>& norms, Int col )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::FindColPivot\"))\n    typedef Base<F> Real;\n    const Int localColsBefore = A.LocalColOffset(col);\n    const ValueInt<Real> localPivot = FindPivot( norms, localColsBefore );\n    ValueInt<Real> pivot;\n    pivot.value = localPivot.value;\n    pivot.index = A.GlobalCol(localPivot.index);\n    return mpi::AllReduce( pivot, mpi::MaxLocOp<Real>(), A.Grid().RowComm() );\n}\n\ntemplate<typename F>\ninline Base<F>\nColNorms( const DistMatrix<F>& A, std::vector<Base<F>>& norms )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::ColNorms\"))\n    typedef Base<F> Real;\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    mpi::Comm colComm = A.Grid().ColComm();\n    mpi::Comm rowComm = A.Grid().RowComm();\n\n    // Carefully perform the local portion of the computation\n    std::vector<Real> localScales(localWidth,0), \n                      localScaledSquares(localWidth,1);\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Real alphaAbs = Abs(A.GetLocal(iLoc,jLoc));    \n            if( alphaAbs != 0 )\n            {\n                if( alphaAbs <= localScales[jLoc] )\n                {\n                    const Real relScale = alphaAbs/localScales[jLoc];\n                    localScaledSquares[jLoc] += relScale*relScale;\n                }\n                else\n                {\n                    const Real relScale = localScales[jLoc]/alphaAbs;\n                    localScaledSquares[jLoc] = \n                        localScaledSquares[jLoc]*relScale*relScale + 1;\n                    localScales[jLoc] = alphaAbs;\n                }\n            }\n        }\n    }\n\n    // Find the maximum relative scales \n    std::vector<Real> scales(localWidth);\n    mpi::AllReduce\n    ( localScales.data(), scales.data(), localWidth, mpi::MAX, colComm );\n\n    // Equilibrate the local scaled sums to the maximum scale\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        if( scales[jLoc] != 0 )\n        {\n            const Real relScale = localScales[jLoc]/scales[jLoc];\n            localScaledSquares[jLoc] *= relScale*relScale;\n        }\n    }\n\n    // Now sum the local contributions (can ignore results where scale is 0)\n    std::vector<Real> scaledSquares(localWidth); \n    mpi::AllReduce\n    ( localScaledSquares.data(), scaledSquares.data(), localWidth, colComm );\n\n    // Finish the computation\n    Real maxLocalNorm = 0;\n    norms.resize( localWidth );\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        if( scales[jLoc] != 0 )\n            norms[jLoc] = scales[jLoc]*Sqrt(scaledSquares[jLoc]);\n        else\n            norms[jLoc] = 0;\n        maxLocalNorm = std::max( maxLocalNorm, norms[jLoc] );\n    }\n    return mpi::AllReduce( maxLocalNorm, mpi::MAX, rowComm );\n}\n\ntemplate<typename F>\ninline void\nReplaceColNorms\n( const DistMatrix<F>& A, std::vector<Int>& inaccurateNorms, \n  std::vector<Base<F>>& norms, std::vector<Base<F>>& origNorms )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::ReplaceColNorms\"))\n    typedef Base<F> Real;\n    const Int localHeight = A.LocalHeight();\n    const Int numInaccurate = inaccurateNorms.size();\n    mpi::Comm colComm = A.Grid().ColComm();\n\n    // Carefully perform the local portion of the computation\n    std::vector<Real> localScales(numInaccurate,0), \n                      localScaledSquares(numInaccurate,1);\n    for( Int s=0; s<numInaccurate; ++s )\n    {\n        const Int jLoc = inaccurateNorms[s];\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Real alphaAbs = Abs(A.GetLocal(iLoc,jLoc));    \n            if( alphaAbs != 0 )\n            {\n                if( alphaAbs <= localScales[s] )\n                {\n                    const Real relScale = alphaAbs/localScales[s];\n                    localScaledSquares[s] += relScale*relScale;\n                }\n                else\n                {\n                    const Real relScale = localScales[s]/alphaAbs;\n                    localScaledSquares[s] = \n                        localScaledSquares[s]*relScale*relScale + 1;\n                    localScales[s] = alphaAbs;\n                }\n            }\n        }\n    }\n\n    // Find the maximum relative scales \n    std::vector<Real> scales(numInaccurate);\n    mpi::AllReduce\n    ( localScales.data(), scales.data(), numInaccurate, mpi::MAX, colComm );\n\n    // Equilibrate the local scaled sums to the maximum scale\n    for( Int s=0; s<numInaccurate; ++s )\n    {\n        if( scales[s] != 0 )\n        {\n            const Real relScale = localScales[s]/scales[s];\n            localScaledSquares[s] *= relScale*relScale;\n        }\n    }\n\n    // Now sum the local contributions (can ignore results where scale is 0)\n    std::vector<Real> scaledSquares(numInaccurate); \n    mpi::AllReduce\n    ( localScaledSquares.data(), scaledSquares.data(), numInaccurate, colComm );\n\n    // Finish the computation\n    for( Int s=0; s<numInaccurate; ++s )\n    {\n        const Int jLoc = inaccurateNorms[s];\n        if( scales[s] != 0 )\n            norms[jLoc] = scales[s]*Sqrt(scaledSquares[s]);\n        else\n            norms[jLoc] = 0;\n        origNorms[jLoc] = norms[jLoc];\n    }\n}\n\ntemplate<typename F,Dist UPerm>\ninline Int\nBusingerGolub\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d, \n  DistMatrix<Int,UPerm,STAR>& pPerm, Int maxSteps, Base<F> tol, \n  bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"qr::BusingerGolub\");\n        if( A.Grid() != pPerm.Grid() || A.Grid() != t.Grid() || \n            t.Grid() != d.Grid() )\n            LogicError(\"A, t, d, and pPerm must have the same grid\");\n    )\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int mLocal = A.LocalHeight();\n    maxSteps = Min(maxSteps,Min(m,n));\n    t.SetRoot( A.DiagonalRoot() );\n    d.SetRoot( A.DiagonalRoot() );\n    t.AlignCols( A.DiagonalAlign() );\n    d.AlignCols( A.DiagonalAlign() );\n    t.Resize( maxSteps, 1 );\n    d.Resize( maxSteps, 1 );\n\n    // Initialize two copies of the column norms, one will be consistently\n    // updated, but the original copy will be kept to determine when the \n    // updated quantities are no longer accurate.\n    std::vector<Real> origNorms( A.LocalWidth() );\n    const Real maxOrigNorm = ColNorms( A, origNorms );\n    std::vector<Real> norms = origNorms;\n    const Real updateTol = Sqrt(lapack::MachineEpsilon<Real>());\n    std::vector<Int> inaccurateNorms;\n\n    // Initialize the inverse permutation to the identity\n    DistMatrix<Int,UPerm,STAR> pInvPerm( pPerm.Grid() );\n    pInvPerm.AlignWith( pPerm );\n    pInvPerm.Resize( n, 1 );\n    for( Int jLoc=0; jLoc<pInvPerm.LocalHeight(); ++jLoc ) \n        pInvPerm.SetLocal( jLoc, 0, pInvPerm.GlobalRow(jLoc) );\n\n    const Grid& g = A.Grid();\n    DistMatrix<F> z21(g);\n    DistMatrix<F,MC,STAR> aB1_MC_STAR(g);\n    DistMatrix<F,MR,STAR> z21_MR_STAR(g);\n    DistMatrix<F,STAR,MR> a12_STAR_MR(g);\n\n    Int k=0;\n    for( ; k<maxSteps; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a12     = ViewRange( A, k,   k+1, k+1, n   );\n        auto a21     = ViewRange( A, k+1, k,   m,   k+1 );\n        auto aB1     = ViewRange( A, k,   k,   m,   k+1 );\n        auto AB2     = ViewRange( A, k,   k+1, m,   n   );\n\n        // Find the next column pivot\n        const ValueInt<Real> pivot = FindColPivot( A, norms, k );\n        if( pivot.value <= tol*maxOrigNorm )\n            break;\n        RowSwap( pInvPerm, k, pivot.index );\n\n        // Perform the swap\n        const Int jPiv = pivot.index;\n        const Int curOwner = A.ColOwner(k);\n        const Int pivOwner = A.ColOwner(jPiv);\n        const Int myCur = A.IsLocalCol(k);\n        const Int myPiv = A.IsLocalCol(jPiv);\n        if( jPiv != k )\n        {\n            if( myCur && myPiv )\n            {\n                const Int kLoc    = A.LocalCol(k);\n                const Int jPivLoc = A.LocalCol(jPiv);\n                blas::Swap\n                ( mLocal, A.Buffer(0,kLoc), 1, A.Buffer(0,jPivLoc), 1 );\n                norms[jPivLoc] = norms[kLoc];\n                origNorms[jPivLoc] = origNorms[kLoc];\n            }\n            else if( myCur )\n            {\n                const Int kLoc = A.LocalCol(k);\n                mpi::SendRecv\n                ( A.Buffer(0,kLoc), mLocal, pivOwner, pivOwner, g.RowComm() );\n                mpi::Send( norms[kLoc], pivOwner, g.RowComm() );\n            }\n            else if( myPiv )\n            {\n                const Int jPivLoc = A.LocalCol(jPiv);\n                mpi::SendRecv\n                ( A.Buffer(0,jPivLoc), mLocal, \n                  curOwner, curOwner, g.RowComm() );\n                norms[jPivLoc] = mpi::Recv<Real>( curOwner, g.RowComm() );\n            }\n        }\n\n        // Find tau and u such that\n        //  / I - tau | 1 | | 1, u^H | \\ | alpha11 | = | beta |\n        //  \\         | u |            / |     a21 | = |    0 |\n        const F tau = LeftReflector( alpha11, a21 );\n        t.Set( k, 0, tau );\n\n        // Temporarily set aB1 = | 1 |\n        //                       | u |\n        F alpha = 0;\n        if( alpha11.IsLocal(0,0) )\n        {\n            alpha = alpha11.GetLocal(0,0);\n            alpha11.SetLocal(0,0,1);\n        }\n\n        // AB2 := Hous(aB1,tau) AB2\n        //      = (I - tau aB1 aB1^H) AB2\n        //      = AB2 - tau aB1 (AB2^H aB1)^H\n        aB1_MC_STAR.AlignWith( AB2 );\n        aB1_MC_STAR = aB1;\n        z21_MR_STAR.AlignWith( AB2 );\n        Zeros( z21_MR_STAR, AB2.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), AB2, aB1_MC_STAR, F(0), z21_MR_STAR );\n        z21_MR_STAR.SumOver( AB2.ColComm() );\n        Ger\n        ( -tau, aB1_MC_STAR.LockedMatrix(), z21_MR_STAR.LockedMatrix(),\n          AB2.Matrix() );\n\n        // Reset alpha11's value\n        if( alpha11.IsLocal(0,0) )\n            alpha11.SetLocal(0,0,alpha);\n\n        // Update the column norm estimates in the same manner as LAWN 176.\n        // However, we do so in two steps in order to lower the communication\n        // latency:\n        //   1) Each process first computes which of its column norms are\n        //      too inaccurate and need to be recomputed.\n        //   2) Each process communicates within its process column in order\n        //      to replace the inaccurate column norms.\n        // Step 1: Perform all of the easy updates and mark inaccurate norms\n        a12_STAR_MR = a12;\n        inaccurateNorms.resize(0);\n        const Int a12LocalWidth = a12_STAR_MR.LocalWidth();\n        for( Int jLoc12=0; jLoc12<a12LocalWidth; ++jLoc12 )\n        {\n            const Int j = (k+1) + a12.GlobalCol(jLoc12);\n            const Int jLoc = A.LocalCol(j);\n            if( norms[jLoc] != Real(0) )\n            {\n                const Real beta = Abs(a12_STAR_MR.GetLocal(0,jLoc12));\n                Real gamma = beta / norms[jLoc];\n                gamma = std::max( Real(0), (Real(1)-gamma)*(Real(1)+gamma) );\n\n                const Real ratio = norms[jLoc] / origNorms[jLoc];\n                const Real phi = gamma*(ratio*ratio);\n                if( phi <= updateTol || alwaysRecompute )\n                    inaccurateNorms.push_back( jLoc );\n                else\n                    norms[jLoc] *= Sqrt(gamma);\n            }\n        }\n        // Step 2: Compute the replacement norms and also reset origNorms\n        ReplaceColNorms( A, inaccurateNorms, norms, origNorms );\n    }\n    InvertPermutation( pInvPerm, pPerm );\n\n    // Form d and rescale R\n    auto R = View( A, 0, 0, k, n );\n    d = R.GetRealPartOfDiagonal();\n    const Int diagLengthLoc = d.LocalHeight();\n    for( Int jLoc=0; jLoc<diagLengthLoc; ++jLoc )\n    {\n        const Real delta = d.GetLocal(jLoc,0);\n        if( delta >= Real(0) )\n            d.SetLocal(jLoc,0,Real(1));\n        else\n            d.SetLocal(jLoc,0,Real(-1));\n    }\n    DiagonalScaleTrapezoid( LEFT, UPPER, NORMAL, d, R );\n\n    return k;\n}\n\n// If we don't need 't' or 'd' from the above routine\ntemplate<typename F,Dist UPerm>\ninline Int\nBusingerGolub\n( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm,\n  Int maxSteps, Base<F> tol, bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    DistMatrix<F,MD,STAR> t( A.Grid() );\n    DistMatrix<Base<F>,MD,STAR> d( A.Grid() );\n    return BusingerGolub( A, t, d, pPerm, maxSteps, tol, alwaysRecompute );\n}\n\ntemplate<typename F,Dist UPerm>\ninline Int\nBusingerGolub\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d, \n  DistMatrix<Int,UPerm,STAR>& pPerm, Int numSteps, bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    // Use a tolerance of -1 so that we do not stop early\n    return BusingerGolub\n           ( A, t, d, pPerm, numSteps, Base<F>(-1), alwaysRecompute );\n}\n\n// If we don't need 't' or 'd' from the above routine\ntemplate<typename F,Dist UPerm>\ninline Int\nBusingerGolub\n( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm,\n  Int numSteps, bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    DistMatrix<F,MD,STAR> t( A.Grid() );\n    DistMatrix<Base<F>,MD,STAR> d( A.Grid() );\n    return BusingerGolub( A, t, d, pPerm, numSteps, alwaysRecompute );\n}\n\ntemplate<typename F,Dist UPerm>\ninline Int\nBusingerGolub\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d,\n  DistMatrix<Int,UPerm,STAR>& pPerm, bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    const Int numSteps = Min(A.Height(),A.Width());\n    return BusingerGolub( A, t, d, pPerm, numSteps, alwaysRecompute );\n}\n\n// If we don't need 't' or 'd' from the above routine\ntemplate<typename F,Dist UPerm>\ninline Int\nBusingerGolub\n( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm, \n  bool alwaysRecompute=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::BusingerGolub\"))\n    DistMatrix<F,MD,STAR> t( A.Grid() );\n    DistMatrix<Base<F>,MD,STAR> d( A.Grid() );\n    return BusingerGolub( A, t, d, pPerm, alwaysRecompute );\n}\n\n} // namespace qr\n} // namespace elem\n\n#endif // ifndef ELEM_QR_BUSINGERGOLUB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/QR/Cholesky.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_QR_HPP\n#define ELEM_CHOLESKY_QR_HPP\n\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_CHOLESKY_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace qr {\n\n// NOTE: This version is designed for tall-skinny matrices and is much less\n//       numerically stable than Householder-based QR factorizations\n//\n// Computes the QR factorization of full-rank tall-skinny matrix A and \n// overwrites A with Q\n//\n\ntemplate<typename F> \ninline void\nCholesky( Matrix<F>& A, Matrix<F>& R )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Cholesky\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( height < width )\n        LogicError(\"A^H A will be singular\");\n    Herk( UPPER, ADJOINT, F(1), A, R );\n    elem::Cholesky( UPPER, R );\n    Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), R, A );\n}\n\ntemplate<typename F> \ninline void\nCholesky( DistMatrix<F,VC,STAR>& A, DistMatrix<F,STAR,STAR>& R )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Cholesky\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( height < width )\n        LogicError(\"A^H A will be singular\");\n    Zeros( R, width, width );\n    Herk( UPPER, ADJOINT, F(1), A.Matrix(), F(0), R.Matrix() );\n    R.SumOver( A.ColComm() );\n    elem::Cholesky( UPPER, R.Matrix() );\n    Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), R.Matrix(), A.Matrix() );\n}\n\n} // namespace qr\n} // namespace elem\n\n#endif // ifndef ELEM_QR_CHOLESKY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/QR/Explicit.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QR_EXPLICIT_HPP\n#define ELEM_QR_EXPLICIT_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_EXPANDPACKEDREFLECTORS_INC\n#include ELEM_QR_INC\n\nnamespace elem {\nnamespace qr {\n\ntemplate<typename F>\ninline void\nExplicit( Matrix<F>& A, bool colPiv=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Explicit\"))\n    Matrix<Int> pPerm;\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    if( colPiv )\n        QR( A, t, d, pPerm );\n    else\n        QR( A, t, d );\n    ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, A, t );\n    DiagonalScale( RIGHT, NORMAL, d, A );\n}\n\ntemplate<typename F>\ninline void\nExplicit( DistMatrix<F>& A, bool colPiv=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Explicit\"))\n    const Grid& g = A.Grid();\n    DistMatrix<Int,VR,STAR> pPerm(g);\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    if( colPiv )\n        QR( A, t, d, pPerm );\n    else\n        QR( A, t, d );\n    ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, A, t );\n    DiagonalScale( RIGHT, NORMAL, d, A );\n}\n\ntemplate<typename F>\ninline void\nExplicit( Matrix<F>& A, Matrix<F>& R, bool colPiv=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Explicit\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    Matrix<Int> pPerm;\n    if( colPiv )\n        QR( A, t, d, pPerm );\n    else\n        QR( A, t, d );\n    Matrix<F> AT, AB;\n    PartitionDown( A, AT, AB, Min(A.Height(),A.Width()) );\n    R = AT;\n    MakeTriangular( UPPER, R );\n    ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, A, t );\n    DiagonalScale( RIGHT, NORMAL, d, A );\n}\n\ntemplate<typename F>\ninline void\nExplicit( DistMatrix<F>& A, DistMatrix<F>& R, bool colPiv=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Explicit\"))\n    const Grid& g = A.Grid();\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    DistMatrix<Int,VR,STAR> pPerm(g);\n    if( colPiv )\n        QR( A, t, d, pPerm );\n    else\n        QR( A, t, d );\n    DistMatrix<F> AT(g), AB(g);\n    PartitionDown( A, AT, AB, Min(A.Height(),A.Width()) );\n    R = AT;\n    MakeTriangular( UPPER, R );\n    ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, A, t );\n    DiagonalScale( RIGHT, NORMAL, d, A );\n}\n\ntemplate<typename F>\ninline void\nExplicit( Matrix<F>& A, Matrix<F>& R, Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Explicit\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    QR( A, t, d, pPerm );\n    Matrix<F> AT, AB;\n    PartitionDown( A, AT, AB, Min(A.Height(),A.Width()) );\n    R = AT;\n    MakeTriangular( UPPER, R );\n    ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, A, t );\n    DiagonalScale( RIGHT, NORMAL, d, A );\n} \n\ntemplate<typename F,Dist UPerm>\ninline void\nExplicit\n( DistMatrix<F>& A, DistMatrix<F>& R, DistMatrix<Int,UPerm,STAR>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Explicit\"))\n    const Grid& g = A.Grid();\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n    QR( A, t, d, pPerm );\n    DistMatrix<F> AT(g), AB(g);\n    PartitionDown( A, AT, AB, Min(A.Height(),A.Width()) );\n    R = AT;\n    MakeTriangular( UPPER, R );\n    ExpandPackedReflectors( LOWER, VERTICAL, CONJUGATED, 0, A, t );\n    DiagonalScale( RIGHT, NORMAL, d, A );\n}\n\n} // namespace qr\n} // namespace elem\n\n#endif // ifndef ELEM_QR_EXPLICIT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/QR/Householder.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QR_HOUSEHOLDER_HPP\n#define ELEM_QR_HOUSEHOLDER_HPP\n\n#include \"./ApplyQ.hpp\"\n#include \"./PanelHouseholder.hpp\"\n\nnamespace elem {\nnamespace qr {\n\ntemplate<typename F> \ninline void\nHouseholder( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Householder\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<minDim; k+=bsize )\n    {\n        const Int nb = Min(bsize,minDim-k);\n        auto AB1 = ViewRange( A, k, k,    m, k+nb );\n        auto AB2 = ViewRange( A, k, k+nb, m, n    ); \n        auto t1 = View( t, k, 0, nb, 1 );\n        auto d1 = View( d, k, 0, nb, 1 );\n\n        PanelHouseholder( AB1, t1, d1 );\n        ApplyQ( LEFT, ADJOINT, AB1, t1, d1, AB2 );\n    }\n}\n\ntemplate<typename F> \ninline void\nHouseholder( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Householder\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    Householder( A, t, d );\n    MakeTriangular( UPPER, A );\n}\n\ntemplate<typename F> \ninline void\nHouseholder\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"qr::Householder\");\n        if( A.Grid() != t.Grid() || t.Grid() != d.Grid() )\n            LogicError(\"{A,t,d} must be distributed over the same grid\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n\n    t.SetRoot( A.DiagonalRoot() );\n    d.SetRoot( A.DiagonalRoot() );\n    t.AlignCols( A.DiagonalAlign() );\n    d.AlignCols( A.DiagonalAlign() );\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<minDim; k+=bsize )\n    {\n        const Int nb = Min(bsize,minDim-k);\n        auto AB1 = ViewRange( A, k, k,    m, k+nb );\n        auto AB2 = ViewRange( A, k, k+nb, m, n    ); \n        auto t1 = View( t, k, 0, nb, 1 );\n        auto d1 = View( d, k, 0, nb, 1 );\n\n        PanelHouseholder( AB1, t1, d1 );\n        ApplyQ( LEFT, ADJOINT, AB1, t1, d1, AB2 );\n    }\n}\n\ntemplate<typename F> \ninline void\nHouseholder( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::Householder\"))\n    DistMatrix<F,MD,STAR> t(A.Grid());\n    DistMatrix<Base<F>,MD,STAR> d(A.Grid());\n    Householder( A, t, d );\n    MakeTriangular( UPPER, A );\n}\n\n} // namespace qr\n} // namespace elem\n\n#endif // ifndef ELEM_QR_HOUSEHOLDER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/QR/PanelHouseholder.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QR_PANEL_HPP\n#define ELEM_QR_PANEL_HPP\n\n#include ELEM_DIAGONALSCALETRAPEZOID_INC\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n#include ELEM_REFLECTOR_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace qr {\n\ntemplate<typename F> \ninline void\nPanelHouseholder( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::PanelHouseholder\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    Matrix<F> z21;\n\n    for( Int k=0; k<minDim; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a21     = ViewRange( A, k+1, k,   m,   k+1 );\n        auto aB1     = ViewRange( A, k,   k,   m,   k+1 );\n        auto AB2     = ViewRange( A, k,   k+1, m,   n   );\n\n        // Find tau and u such that\n        //  / I - tau | 1 | | 1, u^H | \\ | alpha11 | = | beta |\n        //  \\         | u |            / |     a21 | = |    0 |\n        const F tau = LeftReflector( alpha11, a21 );\n        t.Set( k, 0, tau );\n\n        // Temporarily set aB1 = | 1 |\n        //                       | u |\n        const F alpha = alpha11.Get(0,0);\n        alpha11.Set(0,0,1);\n\n        // AB2 := Hous(aB1,tau) AB2\n        //      = (I - tau aB1 aB1^H) AB2\n        //      = AB2 - tau aB1 (AB2^H aB1)^H\n        Zeros( z21, AB2.Width(), 1 );\n        Gemv( ADJOINT, F(1), AB2, aB1, F(0), z21 );\n        Ger( -tau, aB1, z21, AB2 );\n\n        // Replace alpha11's value\n        alpha11.Set(0,0,alpha);\n    }\n    // Form d and rescale R\n    auto R = View( A, 0, 0, minDim, n );\n    d = R.GetRealPartOfDiagonal();\n    typedef Base<F> Real;\n    for( Int j=0; j<minDim; ++j )\n    {\n        const Real delta = d.Get(j,0);\n        if( delta >= Real(0) )\n            d.Set(j,0,Real(1));\n        else\n            d.Set(j,0,Real(-1));\n    }\n    DiagonalScaleTrapezoid( LEFT, UPPER, NORMAL, d, R );\n}\n\ntemplate<typename F> \ninline void\nPanelHouseholder( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::PanelHouseholder\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    PanelHouseholder( A, t, d );\n}\n\ntemplate<typename F> \ninline void\nPanelHouseholder\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"qr::PanelHouseholder\");\n        if( A.Grid() != t.Grid() || t.Grid() != d.Grid() )\n            LogicError(\"{A,t,d} must be distributed over the same grid\");\n    )\n    t.SetRoot( A.DiagonalRoot() );\n    d.SetRoot( A.DiagonalRoot() );\n    t.AlignCols( A.DiagonalAlign() );\n    d.AlignCols( A.DiagonalAlign() );\n    const Grid& g = A.Grid();\n    DistMatrix<F,MC,STAR> aB1_MC_STAR(g);\n    DistMatrix<F,MR,STAR> z21_MR_STAR(g);\n\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    for( Int k=0; k<minDim; ++k )\n    {\n        auto alpha11 = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a21     = ViewRange( A, k+1, k,   m,   k+1 );\n        auto aB1     = ViewRange( A, k,   k,   m,   k+1 );\n        auto AB2     = ViewRange( A, k,   k+1, m,   n   );\n\n        // Find tau and u such that\n        //  / I - tau | 1 | | 1, u^H | \\ | alpha11 | = | beta |\n        //  \\         | u |            / |     a21 | = |    0 |\n        const F tau = LeftReflector( alpha11, a21 );\n        t.Set( k, 0, tau );\n\n        // Temporarily set aB1 = | 1 |\n        //                       | u |\n        F alpha = 0;\n        if( alpha11.IsLocal(0,0) )\n        {\n            alpha = alpha11.GetLocal(0,0);\n            alpha11.SetLocal(0,0,F(1));\n        }\n\n        // AB2 := Hous(aB1,tau) AB2\n        //      = (I - tau aB1 aB1^H) AB2\n        //      = AB2 - tau aB1 (AB2^H aB1)^H\n        aB1_MC_STAR.AlignWith( AB2 );\n        aB1_MC_STAR = aB1;\n        z21_MR_STAR.AlignWith( AB2 );\n        Zeros( z21_MR_STAR, AB2.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), AB2, aB1_MC_STAR, F(0), z21_MR_STAR );\n        z21_MR_STAR.SumOver( AB2.ColComm() );\n        Ger\n        ( -tau, aB1_MC_STAR.LockedMatrix(), z21_MR_STAR.LockedMatrix(),\n          AB2.Matrix() );\n\n        // Replace alpha11's value\n        if( alpha11.IsLocal(0,0) )\n            alpha11.SetLocal(0,0,alpha);\n    }\n    // Form d and rescale R\n    auto R = View( A, 0, 0, minDim, n );\n    d = R.GetRealPartOfDiagonal();\n    const Int diagLengthLoc = d.LocalHeight();\n    typedef Base<F> Real;\n    for( Int jLoc=0; jLoc<diagLengthLoc; ++jLoc )\n    {\n        const Real delta = d.GetLocal(jLoc,0);\n        if( delta >= Real(0) )\n            d.SetLocal(jLoc,0,Real(1));\n        else\n            d.SetLocal(jLoc,0,Real(-1));\n    }\n    DiagonalScaleTrapezoid( LEFT, UPPER, NORMAL, d, R );\n}\n\ntemplate<typename F> \ninline void\nPanelHouseholder( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::PanelHouseholder\"))\n    DistMatrix<F,MD,STAR> t(A.Grid());\n    PanelHouseholder( A, t );\n}\n\n} // namespace qr\n} // namespace elem\n\n#endif // ifndef ELEM_QR_PANEL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/QR/SolveAfter.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QR_SOLVEAFTER_HPP\n#define ELEM_QR_SOLVEAFTER_HPP\n\n#include ELEM_ZERO_INC\n#include ELEM_TRSM_INC\n#include ELEM_QR_INC\n\n// TODO: Extend for BusingerGolub support\n\nnamespace elem {\nnamespace qr {\n\ntemplate<typename F> \ninline void\nSolveAfter\n( Orientation orientation, \n  const Matrix<F>& A, \n  const Matrix<F>& t, \n  const Matrix<Base<F>>& d, \n  const Matrix<F>& B,       \n        Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::SolveAfter\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m < n )\n        LogicError(\"Must have full column rank\");\n    // TODO: Add scaling\n    if( orientation == NORMAL )\n    {\n        if( m != B.Height() )\n            LogicError(\"A and B do not conform\");\n\n        // Copy B into X\n        X = B;\n\n        // Apply Q' to X\n        qr::ApplyQ( LEFT, ADJOINT, A, t, d, X );\n\n        // Shrink X to its new height\n        X.Resize( n, X.Width() );\n\n        // Solve against R (checking for singularities)\n        auto AT = LockedView( A, 0, 0, n, n );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), AT, X, true );\n    }\n    else // orientation in {TRANSPOSE,ADJOINT}\n    {\n        if( n != B.Height() )\n            LogicError(\"A and B do not conform\");\n\n        // Copy B into X\n        X.Resize( m, B.Width() );\n        Matrix<F> XT, XB;\n        PartitionDown( X, XT, XB, n );\n        XT = B;\n        Zero( XB );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( XT );\n\n        // Solve against R' (checking for singularities)\n        auto AT = LockedView( A, 0, 0, n, n );\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), AT, XT, true );\n\n        // Apply Q to X\n        qr::ApplyQ( LEFT, NORMAL, A, t, d, X );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n    }\n}\n\ntemplate<typename F>\ninline void\nSolveAfter\n( Orientation orientation,\n  const DistMatrix<F>& A, \n  const DistMatrix<F,MD,STAR>& t, \n  const DistMatrix<Base<F>,MD,STAR>& d,\n  const DistMatrix<F>& B, \n        DistMatrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::SolveAfter\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Grid& g = A.Grid();\n    if( m < n )\n        LogicError(\"Must have full column rank\");\n\n    // TODO: Add scaling\n\n    if( orientation == NORMAL )\n    {\n        if( m != B.Height() )\n            LogicError(\"A and B do not conform\");\n\n        // Copy B into X\n        X = B;\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n\n        // Apply Q' to X\n        qr::ApplyQ( LEFT, ADJOINT, A, t, d, X );\n\n        // Shrink X to its new height\n        X.Resize( n, X.Width() );\n\n        // Solve against R (checking for singularities)\n        auto AT = LockedView( A, 0, 0, n, n );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), AT, X, true );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n    }\n    else\n    {\n        // Copy B into X\n        X.Resize( m, B.Width() );\n        DistMatrix<F> XT(g), XB(g);\n        PartitionDown( X, XT, XB, n );\n        XT = B;\n        Zero( XB );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( XT );\n\n        // Solve against R' (checking for singularities)\n        auto AT = LockedView( A, 0, 0, n, n );\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), AT, XT, true );\n\n        // Apply Q to X\n        qr::ApplyQ( LEFT, NORMAL, A, t, d, X );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n    }\n}\n\n} // namespace qr\n} // namespace elem\n\n#endif // ifndef ELEM_QR_SOLVEAFTER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/QR/TS.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QR_TS_HPP\n#define ELEM_QR_TS_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_EXPANDPACKEDREFLECTORS_INC\n#include ELEM_QR_INC\n\nnamespace elem {\nnamespace qr {\n\ntemplate<typename F>\nstruct TreeData\n{\n    Matrix<F> QR0, t0;\n    Matrix<Base<F>> d0;\n    std::vector<Matrix<F>> QRList;\n    std::vector<Matrix<F>> tList;\n    std::vector<Matrix<Base<F>>> dList;\n\n    TreeData( Int numStages=0 )\n    : QRList(numStages), tList(numStages), dList(numStages)\n    { }\n\n    TreeData( TreeData<F>&& treeData )\n    : QR0(std::move(treeData.QR0)),\n      t0(std::move(treeData.t0)),\n      d0(std::move(treeData.d0)),\n      QRList(std::move(treeData.QRList)),\n      tList(std::move(treeData.tList)),\n      dList(std::move(treeData.dList))\n    { }\n\n    TreeData<F>& operator=( TreeData<F>&& treeData ) \n    {\n        QR0 = std::move(treeData.QR0);\n        t0 = std::move(treeData.t0);\n        d0 = std::move(treeData.d0);\n        QRList = std::move(treeData.QRList);\n        tList = std::move(treeData.tList);\n        dList = std::move(treeData.dList);\n        return *this;\n    }\n};\n\nnamespace ts {\n\ntemplate<typename F,Dist U>\ninline void\nReduce( const DistMatrix<F,U,STAR>& A, TreeData<F>& treeData )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::ts::Reduce\"))\n    const Int m =  A.Height();\n    const Int n = A.Width();\n    const mpi::Comm colComm = A.ColComm();\n    const Int p = mpi::Size( colComm );\n    if( p == 1 )\n        return;\n    const Int rank = mpi::Rank( colComm );\n    if( m < p*n ) \n        LogicError(\"TSQR currently assumes height >= width*numProcesses\");\n    if( !PowerOfTwo(p) )\n        LogicError(\"TSQR currently requires power-of-two number of processes\");\n    const Int logp = Log2(p);\n    auto lastZ = LockedView( treeData.QR0, 0, 0, n, n );\n    treeData.QRList.resize( logp );\n    treeData.tList.resize( logp );\n    treeData.dList.resize( logp );\n\n    // Run the binary tree reduction\n    Matrix<F> ZTop(n,n,n), ZBot(n,n,n);\n    for( Int stage=0; stage<logp; ++stage )\n    {\n        // Pack, then send and receive n x n matrices\n        const Int partner = Unsigned(rank) ^ (Unsigned(1)<<stage);\n        const bool top = rank < partner;\n        if( top )\n        {\n            ZTop = lastZ;\n            MakeTriangular( UPPER, ZTop );\n            mpi::Recv( ZBot.Buffer(), n*n, partner, colComm );\n        }\n        else\n        {\n            ZBot = lastZ;\n            MakeTriangular( UPPER, ZBot );\n            mpi::Send( ZBot.LockedBuffer(), n*n, partner, colComm );\n            break;\n        }\n\n        auto& Q = treeData.QRList[stage];\n        auto& t = treeData.tList[stage];\n        auto& d = treeData.dList[stage];\n        Q.Resize( 2*n, n, 2*n );\n        t.Resize( n, 1 );\n        d.Resize( n, 1 );\n        auto QTop = View( Q, 0, 0, n, n );\n        auto QBot = View( Q, n, 0, n, n );\n        QTop = ZTop;\n        QBot = ZBot;\n\n        // Note that the last QR is not performed by this routine, as many\n        // higher-level routines, such as TS-SVT, are simplified if the final\n        // small matrix is left alone.\n        if( stage < logp-1 )\n        {\n            // TODO: Exploit double-triangular structure\n            QR( Q, t, d );\n            lastZ = LockedView( Q, 0, 0, n, n );\n        }\n    }\n}\n\ntemplate<typename F,Dist U>\ninline Matrix<F>&\nRootQR( const DistMatrix<F,U,STAR>& A, TreeData<F>& treeData )\n{\n    const Int p = mpi::Size( A.ColComm() );\n    const Int rank = mpi::Rank( A.ColComm() );\n    if( rank != 0 )\n        LogicError(\"This process does not have access to the root QR\");\n    if( p == 1 )\n        return treeData.QR0;\n    else\n        return treeData.QRList.back();\n}\n\ntemplate<typename F,Dist U>\ninline const Matrix<F>&\nRootQR( const DistMatrix<F,U,STAR>& A, const TreeData<F>& treeData )\n{\n    const Int p = mpi::Size( A.ColComm() );\n    const Int rank = mpi::Rank( A.ColComm() );\n    if( rank != 0 )\n        LogicError(\"This process does not have access to the root QR\");\n    if( p == 1 )\n        return treeData.QR0;\n    else\n        return treeData.QRList.back();\n}\n\ntemplate<typename F,Dist U>\ninline Matrix<F>&\nRootPhases( const DistMatrix<F,U,STAR>& A, TreeData<F>& treeData )\n{\n    const Int p = mpi::Size( A.ColComm() );\n    const Int rank = mpi::Rank( A.ColComm() );\n    if( rank != 0 )\n        LogicError(\"This process does not have access to the root phases\");\n    if( p == 1 )\n        return treeData.t0;\n    else\n        return treeData.tList.back();\n}\n\ntemplate<typename F,Dist U>\ninline const Matrix<F>&\nRootPhases( const DistMatrix<F,U,STAR>& A, const TreeData<F>& treeData )\n{\n    const Int p = mpi::Size( A.ColComm() );\n    const Int rank = mpi::Rank( A.ColComm() );\n    if( rank != 0 )\n        LogicError(\"This process does not have access to the root phases\");\n    if( p == 1 )\n        return treeData.t0;\n    else\n        return treeData.tList.back();\n}\n\ntemplate<typename F,Dist U>\ninline Matrix<Base<F>>&\nRootSignature( const DistMatrix<F,U,STAR>& A, TreeData<F>& treeData )\n{\n    const Int p = mpi::Size( A.ColComm() );\n    const Int rank = mpi::Rank( A.ColComm() );\n    if( rank != 0 )\n        LogicError(\"This process does not have access to the root signature\");\n    if( p == 1 )\n        return treeData.d0;\n    else\n        return treeData.dList.back();\n}\n\ntemplate<typename F,Dist U>\ninline const Matrix<Base<F>>&\nRootSignature( const DistMatrix<F,U,STAR>& A, const TreeData<F>& treeData )\n{\n    const Int p = mpi::Size( A.ColComm() );\n    const Int rank = mpi::Rank( A.ColComm() );\n    if( rank != 0 )\n        LogicError(\"This process does not have access to the root signature\");\n    if( p == 1 )\n        return treeData.d0;\n    else\n        return treeData.dList.back();\n}\n\ntemplate<typename F,Dist U>\ninline void\nScatter( DistMatrix<F,U,STAR>& A, const TreeData<F>& treeData )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"qr::ts::Scatter\"))\n    const Int m =  A.Height();\n    const Int n = A.Width();\n    const mpi::Comm colComm = A.ColComm();\n    const Int p = mpi::Size( colComm );\n    if( p == 1 )\n        return;\n    const Int rank = mpi::Rank( colComm );\n    if( m < p*n ) \n        LogicError(\"TSQR currently assumes height >= width*numProcesses\");\n    if( !PowerOfTwo(p) )\n        LogicError(\"TSQR currently requires power-of-two number of processes\");\n    const Int logp = Log2(p);\n\n    // Run the binary tree scatter\n    Matrix<F> Z(2*n,n,2*n), ZHalf(n,n,n);\n    if( rank == 0 )\n        Z = RootQR( A, treeData );\n    auto ZTop = View( Z, 0, 0, n, n );\n    auto ZBot = View( Z, n, 0, n, n );\n    for( Int revStage=0; revStage<logp; ++revStage )\n    {\n        const Int stage = (logp-1)-revStage;\n        // Skip this stage if the first stage bits of our rank are not zero\n        if( stage>0 && (Unsigned(rank) & ((Unsigned(1)<<stage)-1)) )\n            continue;\n\n        const Int partner = rank ^ (1u<<stage);\n        const bool top = rank < partner;\n        if( top )\n        {\n            if( stage < logp-1 )\n            {\n                // Multiply by the current Q\n                ZTop = ZHalf;        \n                MakeZeros( ZBot );\n                // TODO: Exploit sparsity?\n                ApplyQ\n                ( LEFT, NORMAL, \n                  treeData.QRList[stage], treeData.tList[stage], \n                  treeData.dList[stage], Z );\n            }\n            // Send bottom-half to partner and keep top half\n            ZHalf = ZBot;\n            mpi::Send( ZHalf.LockedBuffer(), n*n, partner, colComm );\n            ZHalf = ZTop; \n        }\n        else\n        {\n            // Recv top half from partner\n            mpi::Recv( ZHalf.Buffer(), n*n, partner, colComm );\n        }\n    }\n\n    // Apply the initial Q\n    MakeZeros( A.Matrix() );\n    auto ATop = View( A.Matrix(), 0, 0, n, n );\n    ATop = ZHalf;\n    // TODO: Exploit sparsity\n    ApplyQ( LEFT, NORMAL, treeData.QR0, treeData.t0, treeData.d0, A.Matrix() );\n}\n\ntemplate<typename F,Dist U>\ninline DistMatrix<F,STAR,STAR>\nFormR( const DistMatrix<F,U,STAR>& A, const TreeData<F>& treeData )\n{\n    const Grid& g = A.Grid();\n    DistMatrix<F,CIRC,CIRC> RRoot(g);\n    if( A.ColRank() == 0 )\n    {\n        const Int n = A.Width();\n        auto RTop = LockedView( RootQR(A,treeData), 0, 0, n, n );\n        RRoot.CopyFromRoot( RTop );\n        MakeTriangular( UPPER, RRoot );\n    }\n    else\n        RRoot.CopyFromNonRoot();\n    DistMatrix<F,STAR,STAR> R(g);\n    R = RRoot;\n    return R;\n}\n\n// NOTE: This is destructive\ntemplate<typename F,Dist U>\ninline void\nFormQ( DistMatrix<F,U,STAR>& A, TreeData<F>& treeData )\n{\n    const Int p = mpi::Size( A.ColComm() );\n    if( p == 1 )\n    {\n        A.Matrix() = treeData.QR0;\n        ExpandPackedReflectors\n        ( LOWER, VERTICAL, CONJUGATED, 0,\n          A.Matrix(), RootPhases(A,treeData) );\n        DiagonalScale( RIGHT, NORMAL, RootSignature(A,treeData), A.Matrix() );\n    }\n    else\n    {\n        if( A.ColRank() == 0 )\n        {\n            ExpandPackedReflectors\n            ( LOWER, VERTICAL, CONJUGATED, 0, \n              RootQR(A,treeData), RootPhases(A,treeData) );\n            DiagonalScale\n            ( RIGHT, NORMAL, RootSignature(A,treeData), RootQR(A,treeData) );\n        }\n        Scatter( A, treeData );\n    }\n}\n\n} // namespace ts\n\ntemplate<typename F,Dist U>\ninline TreeData<F>\nTS( const DistMatrix<F,U,STAR>& A )\n{\n    TreeData<F> treeData;\n    treeData.QR0 = A.LockedMatrix();\n    QR( treeData.QR0, treeData.t0, treeData.d0 );\n\n    const Int p = mpi::Size( A.ColComm() );\n    if( p != 1 )\n    {\n        ts::Reduce( A, treeData );\n        if( A.ColRank() == 0 )\n            QR\n            ( ts::RootQR(A,treeData), ts::RootPhases(A,treeData), \n              ts::RootSignature(A,treeData) );\n    }\n    return treeData;\n}\n\ntemplate<typename F,Dist U>\ninline void\nExplicitTS( DistMatrix<F,U,STAR>& A, DistMatrix<F,STAR,STAR>& R )\n{\n    auto treeData = TS( A );\n    R = ts::FormR( A, treeData );\n    ts::FormQ( A, treeData );\n}\n\n} // namespace qr\n} // namespace elem\n\n#endif // ifndef ELEM_QR_TS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/QR.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_QR_HPP\n#define ELEM_QR_HPP\n\n#include \"./QR/ApplyQ.hpp\"\n#include \"./QR/BusingerGolub.hpp\"\n#include \"./QR/Cholesky.hpp\"\n#include \"./QR/Householder.hpp\"\n#include \"./QR/SolveAfter.hpp\"\n#include \"./QR/Explicit.hpp\"\n#include \"./QR/TS.hpp\"\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nQR( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QR\"))\n    qr::Householder( A );\n}\n\ntemplate<typename F> \ninline void\nQR( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QR\"))\n    qr::Householder( A );\n}\n\ntemplate<typename F> \ninline void\nQR( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QR\"))\n    qr::Householder( A, t, d );\n}\n\ntemplate<typename F> \ninline void\nQR( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QR\"))\n    qr::Householder( A, t, d );\n}\n\n// Variants which perform (Businger-Golub) column-pivoting\n// =======================================================\n\ntemplate<typename F> \ninline void\nQR( Matrix<F>& A, Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QR\"))\n    qr::BusingerGolub( A, pPerm );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nQR( DistMatrix<F>& A, DistMatrix<Int,UPerm,STAR>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QR\"))\n    qr::BusingerGolub( A, pPerm );\n}\n\ntemplate<typename F> \ninline void\nQR( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d, Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QR\"))\n    qr::BusingerGolub( A, t, d, pPerm );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nQR( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, \n    DistMatrix<Base<F>,MD,STAR>& d, DistMatrix<Int,UPerm,STAR>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QR\"))\n    qr::BusingerGolub( A, t, d, pPerm );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_QR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/RQ/ApplyQ.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_RQ_APPLYQ_HPP\n#define ELEM_RQ_APPLYQ_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n\nnamespace elem {\nnamespace rq {\n\ntemplate<typename F>\ninline void\nApplyQ\n( LeftOrRight side, Orientation orientation, \n  const Matrix<F>& A, const Matrix<F>& t, const Matrix<Base<F>>& d,\n  Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n\n    const bool applyDFirst = normal!=onLeft;\n    if( applyDFirst )\n    {\n        const Int minDim = d.Height();\n        if( onLeft )\n        {\n            auto BBot = View( B, B.Height()-minDim, 0, minDim, B.Width() );\n            DiagonalScale( side, orientation, d, BBot );\n        }\n        else\n        {\n            auto BRight = View( B, 0, B.Width()-minDim, B.Height(), minDim );\n            DiagonalScale( side, orientation, d, BRight );\n        }\n    }\n\n    const ForwardOrBackward direction = ( normal==onLeft ? BACKWARD : FORWARD );\n    const Conjugation conjugation = ( normal ? CONJUGATED : UNCONJUGATED );\n    const Int offset = A.Width()-A.Height();\n    ApplyPackedReflectors\n    ( side, LOWER, HORIZONTAL, direction, conjugation, offset, A, t, B );\n\n    if( !applyDFirst )\n    {\n        const Int minDim = d.Height();\n        if( onLeft )\n        {\n            auto BBot = View( B, B.Height()-minDim, 0, minDim, B.Width() );\n            DiagonalScale( side, orientation, d, BBot );\n        }\n        else\n        {\n            auto BRight = View( B, 0, B.Width()-minDim, B.Height(), minDim );\n            DiagonalScale( side, orientation, d, BRight );\n        }\n    }\n}\n\ntemplate<typename F,Dist Ut,Dist Vt,Dist Ud,Dist Vd>\ninline void\nApplyQ\n( LeftOrRight side, Orientation orientation, \n  const DistMatrix<F>& A, const DistMatrix<F,Ut,Vt>& t, \n  const DistMatrix<Base<F>,Ud,Vd>& d, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::ApplyQ\"))\n    const bool normal = (orientation==NORMAL);\n    const bool onLeft = (side==LEFT);\n\n    const bool applyDFirst = normal!=onLeft;\n    if( applyDFirst )\n    {\n        const Int minDim = d.Height();\n        if( onLeft )\n        {\n            auto BBot = View( B, B.Height()-minDim, 0, minDim, B.Width() );\n            DiagonalScale( side, orientation, d, BBot );\n        }\n        else\n        {\n            auto BRight = View( B, 0, B.Width()-minDim, B.Height(), minDim );\n            DiagonalScale( side, orientation, d, BRight );\n        }\n    }\n\n    const ForwardOrBackward direction = ( normal==onLeft ? BACKWARD : FORWARD );\n    const Conjugation conjugation = ( normal ? CONJUGATED : UNCONJUGATED );\n    const Int offset = A.Width()-A.Height();\n\n    DistMatrix<F,MD,STAR> tDiag(A.Grid());\n    tDiag.SetRoot( A.DiagonalRoot(offset) );\n    tDiag.AlignCols( A.DiagonalAlign(offset) );\n    tDiag = t;\n    ApplyPackedReflectors\n    ( side, LOWER, HORIZONTAL, direction, conjugation, offset, A, t, B );\n\n    if( !applyDFirst ) \n    {\n        const Int minDim = d.Height();\n        if( onLeft )\n        {\n            auto BBot = View( B, B.Height()-minDim, 0, minDim, B.Width() );\n            DiagonalScale( side, orientation, d, BBot );\n        }\n        else\n        {\n            auto BRight = View( B, 0, B.Width()-minDim, B.Height(), minDim );\n            DiagonalScale( side, orientation, d, BRight );\n        }\n    }\n}\n\n} // namespace rq\n} // namespace elem\n\n#endif // ifndef ELEM_RQ_APPLYQ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/RQ/Cholesky.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CHOLESKY_RQ_HPP\n#define ELEM_CHOLESKY_RQ_HPP\n\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n#include ELEM_CHOLESKY_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace rq {\n\n// NOTE: This version is designed for short-fat matrices and is much less\n//       numerically stable than Householder-based RQ factorizations\n//\n\ntemplate<typename F> \ninline void\nCholesky( Matrix<F>& A, Matrix<F>& R )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::Cholesky\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( height > width )\n        LogicError(\"A A^H will be singular\");\n    Herk( UPPER, NORMAL, F(1), A, R );\n    elem::ReverseCholesky( UPPER, R );\n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), R, A );\n}\n\ntemplate<typename F> \ninline void\nCholesky( DistMatrix<F,STAR,VR>& A, DistMatrix<F,STAR,STAR>& R )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::Cholesky\"))\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( height > width )\n        LogicError(\"A A^H will be singular\");\n    Zeros( R, height, height );\n    Herk( UPPER, NORMAL, F(1), A.Matrix(), F(0), R.Matrix() );\n    R.SumOver( A.RowComm() );\n    elem::ReverseCholesky( UPPER, R.Matrix() );\n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), R.Matrix(), A.Matrix() );\n}\n\n} // namespace rq\n} // namespace elem\n\n#endif // ifndef ELEM_RQ_CHOLESKY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/RQ/Householder.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_RQ_HOUSEHOLDER_HPP\n#define ELEM_RQ_HOUSEHOLDER_HPP\n\n#include ELEM_MAKETRAPEZOIDAL_INC\n\n#include \"./ApplyQ.hpp\"\n#include \"./PanelHouseholder.hpp\"\n\nnamespace elem {\nnamespace rq {\n\ntemplate<typename F> \ninline void\nHouseholder( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::Householder\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    const Int iOff = m-minDim;\n    const Int jOff = n-minDim;\n\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( minDim, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,minDim-k);\n        const Int ki = k + iOff;\n        const Int kj = k + jOff;\n        auto ATopPan    = View( A, 0,  0, ki, kj+nb ); \n        auto ABottomPan = View( A, ki, 0, nb, kj+nb );\n        auto t1 = View( t, k, 0, nb, 1 );\n        auto d1 = View( d, k, 0, nb, 1 );\n\n        PanelHouseholder( ABottomPan, t1, d1 );\n        ApplyQ( RIGHT, ADJOINT, ABottomPan, t1, d1, ATopPan );\n    }\n}\n\ntemplate<typename F> \ninline void\nHouseholder( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::Householder\"))\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n    Householder( A, t, d );\n    MakeTrapezoidal( UPPER, A, Min(A.Height(),A.Width()) );\n}\n\ntemplate<typename F> \ninline void\nHouseholder\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"rq::Householder\");\n        if( A.Grid() != t.Grid() || t.Grid() != d.Grid() )\n            LogicError(\"{A,t,d} must be distributed over the same grid\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    const Int offset = n-m;\n    const Int iOff = m-minDim;\n    const Int jOff = n-minDim;\n\n    t.SetRoot( A.DiagonalRoot(offset) );\n    d.SetRoot( A.DiagonalRoot(offset) );\n    t.AlignCols( A.DiagonalAlign(offset) );\n    d.AlignCols( A.DiagonalAlign(offset) );\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( minDim, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,minDim-k);\n        const Int ki = k + iOff;\n        const Int kj = k + jOff;\n        auto ATopPan    = View( A, 0,  0, ki, kj+nb ); \n        auto ABottomPan = View( A, ki, 0, nb, kj+nb );\n        auto t1 = View( t, k, 0, nb, 1 );\n        auto d1 = View( d, k, 0, nb, 1 );\n\n        PanelHouseholder( ABottomPan, t1, d1 );\n        ApplyQ( RIGHT, ADJOINT, ABottomPan, t1, d1, ATopPan );\n    }\n}\n\ntemplate<typename F> \ninline void\nHouseholder( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::Householder\"))\n    DistMatrix<F,MD,STAR> t(A.Grid());\n    DistMatrix<Base<F>,MD,STAR> d(A.Grid());\n    Householder( A, t, d );\n    MakeTrapezoidal( UPPER, A, Min(A.Height(),A.Width()) );\n}\n\n} // namespace rq\n} // namespace elem\n\n#endif // ifndef ELEM_RQ_HOUSEHOLDER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/RQ/PanelHouseholder.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_RQ_PANEL_HPP\n#define ELEM_RQ_PANEL_HPP\n\n#include ELEM_DIAGONALSCALETRAPEZOID_INC\n#include ELEM_GEMV_INC\n#include ELEM_GER_INC\n#include ELEM_REFLECTOR_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace rq {\n\ntemplate<typename F> \ninline void\nPanelHouseholder( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::PanelHouseholder\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    const Int iOff = m-minDim;\n    const Int jOff = n-minDim;\n\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    Matrix<F> z01;\n    for( Int k=minDim-1; k>=0; --k )\n    {\n        const Int ki = k + iOff;\n        const Int kj = k + jOff;\n        auto a10     = ViewRange( A, ki, 0,  ki+1, kj   );\n        auto alpha11 = ViewRange( A, ki, kj, ki+1, kj+1 );\n        auto A0L     = ViewRange( A, 0,  0,  ki,   kj+1 );\n        auto a1L     = ViewRange( A, ki, 0,  ki+1, kj+1 );\n\n        // Find tau and v such that\n        //  |a10 alpha11| /I - tau |v^T| |conj(v) 1|\\ = |0 beta|\n        //                \\        |1  |            /\n        const F tau = RightReflector( alpha11, a10 );\n        t.Set( k, 0, tau );\n\n        // Temporarily set a1L = | v 1 |\n        const F alpha = alpha11.Get(0,0);\n        alpha11.Set(0,0,1);\n\n        // A2R := A2R Hous(a1L^T,tau)\n        //      = A2R (I - tau a1L^T conj(a1L))\n        //      = A2R - tau (A2R a1L^T) conj(a1L)\n        Zeros( z01, A0L.Height(), 1 );\n        Gemv( NORMAL, F(1), A0L, a1L, F(0), z01 );\n        Ger( -tau, z01, a1L, A0L );\n\n        // Reset alpha11's value\n        alpha11.Set(0,0,alpha);\n    }\n    // Form d and rescale R\n    auto R = View( A, 0, jOff, m, minDim );\n    d = R.GetRealPartOfDiagonal();\n    typedef Base<F> Real;\n    for( Int j=0; j<minDim; ++j )\n    {\n        const Real delta = d.Get(j,0);\n        if( delta >= Real(0) )\n            d.Set(j,0,Real(1));\n        else\n            d.Set(j,0,Real(-1));\n    }\n    DiagonalScaleTrapezoid( RIGHT, UPPER, NORMAL, d, R, -iOff );\n}\n\ntemplate<typename F> \ninline void\nPanelHouseholder( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::PanelHouseholder\"))\n    Matrix<F> t;\n    PanelHouseholder( A, t );\n}\n\ntemplate<typename F> \ninline void\nPanelHouseholder\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"rq::PanelHouseholder\");\n        if( A.Grid() != t.Grid() || t.Grid() != d.Grid() )\n            LogicError(\"{A,t,d} must be distributed over the same grid\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = Min(m,n);\n    const Int iOff = m-minDim;\n    const Int jOff = n-minDim;\n\n    t.SetRoot( A.DiagonalRoot(n-m) );\n    d.SetRoot( A.DiagonalRoot(n-m) );\n    t.AlignCols( A.DiagonalAlign(n-m) );\n    d.AlignCols( A.DiagonalAlign(n-m) );\n    t.Resize( minDim, 1 );\n    d.Resize( minDim, 1 );\n\n    const Grid& g = A.Grid();\n    DistMatrix<F,STAR,MR  > a1L_STAR_MR(g);\n    DistMatrix<F,MC,  STAR> z01_MC_STAR(g);\n\n    for( Int k=minDim-1; k>=0; --k )\n    {\n        const Int ki = k + iOff;\n        const Int kj = k + jOff;\n        auto a10     = ViewRange( A, ki, 0,  ki+1, kj   );\n        auto alpha11 = ViewRange( A, ki, kj, ki+1, kj+1 );\n        auto A0L     = ViewRange( A, 0,  0,  ki,   kj+1 );\n        auto a1L     = ViewRange( A, ki, 0,  ki+1, kj+1 );\n\n        // Find tau and v such that\n        //  |a10 alpha11| /I - tau |v^T| |conj(v) 1|\\ = |0 beta|\n        //                \\        |1  |            /\n        const F tau = RightReflector( alpha11, a10 );\n        t.Set( k, 0, tau );\n\n        // Temporarily set a1L = | v 1 |\n        F alpha = 0;\n        if( alpha11.IsLocal(0,0) )\n        {\n            alpha = alpha11.GetLocal(0,0);\n            alpha11.SetLocal(0,0,1);\n        }\n\n        // A2R := A2R Hous(a1L^T,tau)\n        //      = A2R (I - tau a1L^T conj(a1L))\n        //      = A2R - tau (A2R a1L^T) conj(a1L)\n        a1L_STAR_MR.AlignWith( A0L );\n        a1L_STAR_MR = a1L;\n        z01_MC_STAR.AlignWith( A0L );\n        Zeros( z01_MC_STAR, A0L.Height(), 1 );\n        LocalGemv( NORMAL, F(1), A0L, a1L_STAR_MR, F(0), z01_MC_STAR );\n        z01_MC_STAR.SumOver( A0L.RowComm() );\n        Ger\n        ( -tau, z01_MC_STAR.LockedMatrix(), a1L_STAR_MR.LockedMatrix(),\n          A0L.Matrix() ); \n\n        // Reset alpha11's value\n        if( alpha11.IsLocal(0,0) )\n            alpha11.SetLocal(0,0,alpha);\n    }\n    // Form d and rescale R\n    auto R = View( A, 0, jOff, m, minDim );\n    d = R.GetRealPartOfDiagonal();\n    const Int diagLengthLoc = d.LocalHeight();\n    typedef Base<F> Real;\n    for( Int jLoc=0; jLoc<diagLengthLoc; ++jLoc )\n    {\n        const Real delta = d.GetLocal(jLoc,0);\n        if( delta >= Real(0) )\n            d.SetLocal(jLoc,0,Real(1));\n        else\n            d.SetLocal(jLoc,0,Real(-1));\n    }\n    DiagonalScaleTrapezoid( RIGHT, UPPER, NORMAL, d, R, -iOff );\n}\n\ntemplate<typename F> \ninline void\nPanelHouseholder( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::PanelHouseholder\"))\n    DistMatrix<F,MD,STAR> t(A.Grid());\n    DistMatrix<Base<F>,MD,STAR> d(A.Grid());\n    PanelHouseholder( A, t, d );\n}\n\n} // namespace rq\n} // namespace elem\n\n#endif // ifndef ELEM_RQ_PANEL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/RQ/SolveAfter.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_RQ_SOLVEAFTER_HPP\n#define ELEM_RQ_SOLVEAFTER_HPP\n\n#include ELEM_ZERO_INC\n#include ELEM_TRSM_INC\n#include ELEM_RQ_INC\n\n// TODO: Extend for BusingerGolub support\n\nnamespace elem {\nnamespace rq {\n\ntemplate<typename F> \ninline void\nSolveAfter\n( Orientation orientation, \n  const Matrix<F>& A, \n  const Matrix<F>& t, \n  const Matrix<Base<F>>& d, \n  const Matrix<F>& B,       \n        Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"rq::SolveAfter\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m > n )\n        LogicError(\"Must have full row rank\");\n    // TODO: Add scaling\n    if( orientation == NORMAL )\n    {\n        if( m != B.Height() )\n            LogicError(\"A and B do not conform\");\n\n        // Copy B into X\n        X.Resize( n, B.Width() );\n        Matrix<F> XT, XB;\n        PartitionDown( X, XT, XB, m );\n        XT = B;\n        Zero( XB );\n\n        // Solve against R (checking for singularities)\n        auto AR = LockedView( A, 0, n-m, m, m );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), AR, XT, true );\n\n        // Apply Q' to X \n        rq::ApplyQ( LEFT, ADJOINT, A, t, d, X );\n    }\n    else // orientation in {TRANSPOSE,ADJOINT}\n    {\n        if( n != B.Height() )\n            LogicError(\"A and B do not conform\");\n\n        // Copy B into X\n        X = B;\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n\n        // Apply Q to X\n        rq::ApplyQ( LEFT, NORMAL, A, t, d, X );\n\n        // Shrink X to its new height\n        X.Resize( m, X.Width() );\n\n        // Solve against R' (check for singularities)\n        auto AR = LockedView( A, 0, n-m, m, m );\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), AR, X, true );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n    }\n}\n\ntemplate<typename F>\ninline void\nSolveAfter\n( Orientation orientation,\n  const DistMatrix<F>& A, \n  const DistMatrix<F,MD,STAR>& t, \n  const DistMatrix<Base<F>,MD,STAR>& d,\n  const DistMatrix<F>& B, \n        DistMatrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lq::SolveAfter\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Grid& g = A.Grid();\n    if( m > n )\n        LogicError(\"Must have full row rank\");\n\n    // TODO: Add scaling\n\n    if( orientation == NORMAL )\n    {\n        if( m != B.Height() )\n            LogicError(\"A and B do not conform\");\n\n        // Copy B into X\n        X.Resize( n, B.Width() );\n        DistMatrix<F> XT(g), XB(g);\n        PartitionDown( X, XT, XB, m );\n        XT = B;\n        Zero( XB );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( XT );\n\n        // Solve against R (checking for singularities)\n        auto AR = LockedView( A, 0, n-m, m, m );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), AR, XT, true );\n\n        // Apply Q' to X \n        rq::ApplyQ( LEFT, ADJOINT, A, t, d, X );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n    }\n    else\n    {\n        // Copy B into X\n        X = B;\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n\n        // Apply Q to X\n        rq::ApplyQ( LEFT, NORMAL, A, t, d, X );\n\n        // Shrink X to its new height\n        X.Resize( m, X.Width() );\n\n        // Solve against R' (check for singularities)\n        auto AR = LockedView( A, 0, n-m, m, m );\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), AR, X, true );\n\n        if( orientation == TRANSPOSE )\n            Conjugate( X );\n    }\n}\n\n} // namespace rq\n} // namespace elem\n\n#endif // ifndef ELEM_RQ_SOLVEAFTER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/RQ.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_RQ_HPP\n#define ELEM_RQ_HPP\n\n#include \"./RQ/ApplyQ.hpp\"\n#include \"./RQ/Cholesky.hpp\"\n#include \"./RQ/Householder.hpp\"\n#include \"./RQ/SolveAfter.hpp\"\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nRQ( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RQ\"))\n    rq::Householder( A );\n}\n\ntemplate<typename F> \ninline void\nRQ( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RQ\"))\n    rq::Householder( A );\n}\n\ntemplate<typename F> \ninline void\nRQ( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RQ\"))\n    rq::Householder( A, t, d );\n}\n\ntemplate<typename F> \ninline void\nRQ( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RQ\"))\n    rq::Householder( A, t, d );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_RQ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/Skeleton.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SKELETON_HPP\n#define ELEM_SKELETON_HPP\n\n#include ELEM_ADJOINT_INC\n#include ELEM_QR_BUSINGERGOLUB_INC\n#include ELEM_PERMUTECOLS_INC\n#include ELEM_PSEUDOINVERSE_INC\n\n// NOTE: There are *many* algorithms for (pseudo-)skeleton/CUR decompositions,\n//       and, for now, we will simply implement one.\n\n// TODO: More algorithms and more options (e.g., default tolerances).\n\n// TODO: Implement randomized algorithms from Jiawei Chiu and Laurent Demanet's \n//       \"Sublinear randomized algorithms for skeleton decompositions\"?\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nSkeleton\n( const Matrix<F>& A, \n  Matrix<Int>& permR, Matrix<Int>& permC, \n  Matrix<F>& Z, Int maxSteps, Base<F> tol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Skeleton\"))\n    // Find the row permutation\n    Matrix<F> B;\n    Adjoint( A, B );\n    const Int numSteps = qr::BusingerGolub( B, permR, maxSteps, tol );\n\n    // Form pinv(AR')=pinv(AR)'\n    Adjoint( A, B );\n    InversePermuteCols( B, permR );\n    B.Resize( B.Height(), numSteps );\n    Pseudoinverse( B );\n\n    // Form K := A pinv(AR)\n    Matrix<F> K;\n    Gemm( NORMAL, ADJOINT, F(1), A, B, K );\n\n    // Find the column permutation (force the same number of steps)\n    B = A;\n    qr::BusingerGolub( B, permC, numSteps );\n\n    // Form pinv(AC)\n    B = A;\n    InversePermuteCols( B, permC );\n    B.Resize( B.Height(), numSteps );\n    Pseudoinverse( B );\n\n    // Form Z := pinv(AC) K = pinv(AC) (A pinv(AR))\n    Gemm( NORMAL, NORMAL, F(1), B, K, Z );\n}\n\ntemplate<typename F,Dist UPerm> \ninline void\nSkeleton\n( const DistMatrix<F>& A, \n  DistMatrix<Int,UPerm,STAR>& permR, DistMatrix<Int,UPerm,STAR>& permC, \n  DistMatrix<F>& Z, Int maxSteps, Base<F> tol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Skeleton\"))\n    const Grid& g = A.Grid();\n\n    // Find the row permutation\n    DistMatrix<F> B(g);\n    Adjoint( A, B );\n    const Int numSteps = qr::BusingerGolub( B, permR, maxSteps, tol );\n\n    // Form pinv(AR')=pinv(AR)'\n    Adjoint( A, B );\n    InversePermuteCols( B, permR );\n    B.Resize( B.Height(), numSteps );\n    Pseudoinverse( B );\n\n    // Form K := A pinv(AR)\n    DistMatrix<F> K(g);\n    Gemm( NORMAL, ADJOINT, F(1), A, B, K );\n\n    // Find the column permutation (force the same number of steps)\n    B = A;\n    qr::BusingerGolub( B, permC, numSteps );\n\n    // Form pinv(AC)\n    B = A;\n    InversePermuteCols( B, permC );\n    B.Resize( B.Height(), numSteps );\n    Pseudoinverse( B );\n\n    // Form Z := pinv(AC) K = pinv(AC) (A pinv(AR))\n    Gemm( NORMAL, NORMAL, F(1), B, K, Z );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SKELETON_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_FACTOR_DECL_HPP\n#define ELEM_FACTOR_DECL_HPP\n\nnamespace elem {\n\nnamespace LDLPivotTypeNS {\nenum LDLPivotType\n{\n    BUNCH_KAUFMAN_A=0,\n    BUNCH_KAUFMAN_C=1,\n    BUNCH_KAUFMAN_D=2,\n    BUNCH_KAUFMAN_BOUNDED=3,\n    BUNCH_PARLETT=4\n};\n}\nusing namespace LDLPivotTypeNS;\n\nstruct LDLPivot\n{\n    Int nb;\n    Int from[2];\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_FACTOR_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_FACTOR_IMPL_HPP\n#define ELEM_FACTOR_IMPL_HPP\n\n#include \"./Cholesky.hpp\"\n#include \"./LDL.hpp\"\n#include \"./LU.hpp\"\n\n#include \"./LQ.hpp\"\n#include \"./QR.hpp\"\n#include \"./RQ.hpp\"\n\n#include \"./GQR.hpp\"\n#include \"./GRQ.hpp\"\n\n#include \"./ID.hpp\"\n#include \"./Skeleton.hpp\"\n\n#endif // ifndef ELEM_FACTOR_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/factor.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_FACTOR_HPP\n#define ELEM_FACTOR_HPP\n\n#include \"./factor/decl.hpp\"\n#include \"./factor/impl.hpp\"\n\n#endif // ifndef ELEM_FACTOR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/HermitianFunction.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANFUNCTION_HPP\n#define ELEM_HERMITIANFUNCTION_HPP\n\n#include ELEM_HERMITIANEIG_INC\n#include ELEM_HERMITIANFROMEVD_INC\n#include ELEM_NORMALFROMEVD_INC\n\nnamespace elem {\n\n// Modify the eigenvalues of A with the real-valued function f, which will \n// therefore result in a Hermitian matrix, which we store in-place.\n\ntemplate<typename F,class RealFunction>\ninline void\nRealHermitianFunction( UpperOrLower uplo, Matrix<F>& A, RealFunction func )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RealHermitianFunction\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square\");\n    typedef Base<F> Real;\n\n    // Get the EVD of A\n    Matrix<Real> w;\n    Matrix<F> Z;\n    HermitianEig( uplo, A, w, Z );\n\n    // Replace w with f(w)\n    const Int n = w.Height();\n    for( Int i=0; i<n; ++i )\n    {\n        const Real omega = w.Get(i,0);\n        w.Set(i,0,func(omega));\n    }\n\n    // A := Z f(Omega) Z^H\n    HermitianFromEVD( uplo, A, w, Z );\n}\n\ntemplate<typename F,class RealFunction>\ninline void\nRealHermitianFunction( UpperOrLower uplo, DistMatrix<F>& A, RealFunction func )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RealHermitianFunction\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square\");\n    typedef Base<F> Real;\n\n    // Get the EVD of A\n    const Grid& g = A.Grid();\n    DistMatrix<Real,VR,STAR> w(g);\n    DistMatrix<F> Z(g);\n    HermitianEig( uplo, A, w, Z );\n\n    // Replace w with f(w)\n    const Int numLocalEigs = w.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocalEigs; ++iLoc )\n    {\n        const Real omega = w.GetLocal(iLoc,0);\n        w.SetLocal(iLoc,0,func(omega));\n    }\n\n    // A := Z f(Omega) Z^H\n    HermitianFromEVD( uplo, A, w, Z ); \n}\n\n// Modify the eigenvalues of A with the complex-valued function f, which will\n// therefore result in a normal (in general, non-Hermitian) matrix, which we \n// store in-place. At some point a version will be written which takes a real\n// symmetric matrix as input and produces a complex normal matrix.\n\ntemplate<typename Real,class Function>\ninline void\nComplexHermitianFunction\n( UpperOrLower uplo, Matrix<Complex<Real>>& A, Function func )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ComplexHermitianFunction\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square\");\n    typedef Complex<Real> C;\n\n    // Get the EVD of A\n    Matrix<Real> w;\n    Matrix<C> Z;\n    HermitianEig( uplo, A, w, Z );\n\n    // Form f(w)\n    const Int n = w.Height();\n    Matrix<C> fw( n, 1 );\n    for( Int i=0; i<n; ++i )\n    {\n        const Real omega = w.Get(i,0);\n        fw.Set(i,0,func(omega));\n    }\n\n    // A := Z f(Omega) Z^H\n    NormalFromEVD( A, fw, Z );\n}\n\ntemplate<typename Real,class Function>\ninline void\nComplexHermitianFunction\n( UpperOrLower uplo, DistMatrix<Complex<Real>>& A, Function func )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ComplexHermitianFunction\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square\");\n    typedef Complex<Real> C;\n\n    // Get the EVD of A\n    const Grid& g = A.Grid();\n    DistMatrix<Real,VR,STAR> w(g);\n    DistMatrix<C> Z(g);\n    HermitianEig( uplo, A, w, Z );\n\n    // Form f(w)\n    DistMatrix<C,VR,STAR> fw(g);\n    fw.AlignWith( w.DistData() );\n    fw.Resize( w.Height(), 1 );\n    const Int numLocalEigs = w.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocalEigs; ++iLoc )\n    {\n        const Real omega = w.GetLocal(iLoc,0);\n        fw.SetLocal(iLoc,0,func(omega));\n    }\n\n    // A := Z f(Omega) Z^H\n    NormalFromEVD( A, fw, Z );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANFUNCTION_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/General/LUPartialPiv.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_LUPARTIALPIV_HPP\n#define ELEM_INVERSE_LUPARTIALPIV_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_ZERO_INC\n#include ELEM_GEMM_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_LU_INC\n#include ELEM_PERMUTECOLS_INC\n#include ELEM_TRIANGULARINVERSE_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace inverse {\n\n// Start by forming the partially pivoted LU decomposition of A,\n//     P A = L U,\n// then inverting the system of equations,\n//     inv(A) inv(P) = inv(U) inv(L),\n// then,\n//     inv(A) = inv(U) inv(L) P.\n\ntemplate<typename F> \ninline void\nAfterLUPartialPiv( Matrix<F>& A, const Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"inverse::AfterLUPartialPiv\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot invert non-square matrices\");\n    if( A.Height() != pPerm.Height() )\n        LogicError(\"Pivot vector is incorrect length\");\n\n    TriangularInverse( UPPER, NON_UNIT, A );\n\n    // Solve inv(A) L = inv(U) for inv(A)\n    Matrix<F> ATL, ATR,\n              ABL, ABR;\n    Matrix<F> A00, A01, A02,\n              A10, A11, A12,\n              A20, A21, A22;\n    Matrix<F> A1, A2;\n    Matrix<F> L11,\n              L21;\n    PartitionUpDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    while( ABR.Height() < A.Height() )\n    {\n        RepartitionUpDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        View( A1, A, 0, A00.Width(),             A.Height(), A01.Width() );\n        View( A2, A, 0, A00.Width()+A01.Width(), A.Height(), A02.Width() );\n\n        //--------------------------------------------------------------------//\n        // Copy out L1\n        L11 = A11;\n        L21 = A21;\n\n        // Zero the strictly lower triangular portion of A1\n        MakeTriangular( UPPER, A11 );\n        Zero( A21 );\n\n        // Perform the lazy update of A1\n        Gemm( NORMAL, NORMAL, F(-1), A2, L21, F(1), A1 );\n\n        // Solve against this diagonal block of L11\n        Trsm( RIGHT, LOWER, NORMAL, UNIT, F(1), L11, A1 );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionUpDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /*******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n    }\n\n    // inv(A) := inv(A) P\n    InversePermuteCols( A, pPerm );\n}\n\ntemplate<typename F> \ninline void\nLUPartialPiv( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"inverse::LUPartialPiv\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot invert non-square matrices\");\n    Matrix<Int> pPerm;\n    elem::LU( A, pPerm );\n    inverse::AfterLUPartialPiv( A, pPerm );\n}\n\ntemplate<typename F> \ninline void\nAfterLUPartialPiv( DistMatrix<F>& A, const DistMatrix<Int,VC,STAR>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"inverse::AfterLUPartialPiv\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot invert non-square matrices\");\n    if( A.Height() != pPerm.Height() )\n        LogicError(\"Pivot vector is incorrect length\");\n    if( A.Grid() != pPerm.Grid() )\n        LogicError(\"A and pPerm must have the same grid\");\n    const Grid& g = A.Grid();\n    TriangularInverse( UPPER, NON_UNIT, A );\n\n    // Solve inv(A) L = inv(U) for inv(A)\n    DistMatrix<F> ATL(g), ATR(g), \n                  ABL(g), ABR(g);\n    DistMatrix<F> A00(g), A01(g), A02(g),\n                  A10(g), A11(g), A12(g),\n                  A20(g), A21(g), A22(g);\n    DistMatrix<F> A1(g), A2(g);\n    DistMatrix<F,VC,  STAR> A1_VC_STAR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,VR,  STAR> L21_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > L21Trans_STAR_MR(g);\n    DistMatrix<F,MC,  STAR> Z1(g);\n    PartitionUpDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    while( ABR.Height() < A.Height() )\n    {\n        RepartitionUpDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n\n        View( A1, A, 0, A00.Width(),             A.Height(), A01.Width() );\n        View( A2, A, 0, A00.Width()+A01.Width(), A.Height(), A02.Width() );\n\n        L21_VR_STAR.AlignWith( A2 );\n        L21Trans_STAR_MR.AlignWith( A2 );\n        Z1.AlignWith( A01 );\n        //--------------------------------------------------------------------//\n        // Copy out L1\n        L11_STAR_STAR = A11;\n        L21_VR_STAR = A21;\n        L21_VR_STAR.TransposePartialColAllGather( L21Trans_STAR_MR );\n\n        // Zero the strictly lower triangular portion of A1\n        MakeTriangular( UPPER, A11 );\n        Zero( A21 );\n\n        // Perform the lazy update of A1\n        Zeros( Z1, A.Height(), A01.Width() );\n        LocalGemm( NORMAL, TRANSPOSE, F(-1), A2, L21Trans_STAR_MR, F(0), Z1 );\n        A1.RowSumScatterUpdate( F(1), Z1 );\n\n        // Solve against this diagonal block of L11\n        A1_VC_STAR = A1;\n        LocalTrsm\n        ( RIGHT, LOWER, NORMAL, UNIT, F(1), L11_STAR_STAR, A1_VC_STAR );\n        A1 = A1_VC_STAR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionUpDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /*******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n    }\n\n    // inv(A) := inv(A) P\n    InversePermuteCols( A, pPerm );\n}\n\ntemplate<typename F> \ninline void\nLUPartialPiv( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"inverse::LUPartialPiv\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot invert non-square matrices\");\n    const Grid& g = A.Grid();\n    DistMatrix<Int,VC,STAR> pPerm( g );\n    elem::LU( A, pPerm );\n    inverse::AfterLUPartialPiv( A, pPerm );\n}\n\n} // namespace inverse\n} // namespace elem\n\n#endif // ifndef ELEM_INVERSE_LUPARTIALPIV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/General.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_GENERAL_HPP\n#define ELEM_INVERSE_GENERAL_HPP\n\n#include \"./General/LUPartialPiv.hpp\"\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nInverse( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Inverse\"))\n    inverse::LUPartialPiv( A );\n}\n\ntemplate<typename F> \ninline void\nInverse( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Inverse\"))\n    inverse::LUPartialPiv( A );\n}\n\ntemplate<typename F>\ninline void\nLocalInverse( DistMatrix<F,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalInverse\"))\n    Inverse( A.Matrix() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_INVERSE_GENERAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/HPD/CholeskyLVar2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_HPD_CHOLESKYLVAR2_HPP\n#define ELEM_INVERSE_HPD_CHOLESKYLVAR2_HPP\n\n#include ELEM_GEMM_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n#include ELEM_TRTRMM_INC\n\n#include ELEM_CHOLESKY_INC\n#include ELEM_TRIANGULARINVERSE_INC\n\nnamespace elem {\nnamespace hpd_inv {\n\n// This approach is based upon a (conjugate)-transposition of the reordered \n// Variant 2 algorithm from Fig. 9 in Bientinesi et al.'s \"Families of \n// Algorithms Related to the Inversion of a Symmetric Positive Definite Matrix\".\n\ntemplate<typename F> \ninline void\nCholeskyLVar2( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hpd_inv::CholeskyLVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Nonsquare matrices cannot be triangular\");\n    )\n    // Matrix views\n    Matrix<F> \n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n\n    // Start the algorithm\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        //--------------------------------------------------------------------//\n        Cholesky( LOWER, A11 );\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), A11, A10 );\n        Trsm( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), A11, A21 );\n        Herk( LOWER, ADJOINT, F(1), A10, F(1), A00 );\n        Gemm( NORMAL, NORMAL, F(-1), A21, A10, F(1), A20 );\n        Herk( LOWER, NORMAL, F(-1), A21, F(1), A22 );\n        Trsm( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), A11, A10 );\n        Trsm( RIGHT, LOWER, NORMAL, NON_UNIT, F(-1), A11, A21 );\n        TriangularInverse( LOWER, NON_UNIT, A11 );\n        Trtrmm( LOWER, A11, true );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nCholeskyLVar2( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hpd_inv::CholeskyLVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Nonsquare matrices cannot be triangular\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F> \n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A10_STAR_VR(g);\n    DistMatrix<F,VC,  STAR> A21_VC_STAR(g);\n    DistMatrix<F,STAR,MC  > A10_STAR_MC(g);\n    DistMatrix<F,STAR,MR  > A10_STAR_MR(g);\n    DistMatrix<F,STAR,MC  > A21Trans_STAR_MC(g);\n    DistMatrix<F,VR,  STAR> A21_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > A21Adj_STAR_MR(g);\n\n    // Start the algorithm\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        A10_STAR_VR.AlignWith( A00 );\n        A21_VC_STAR.AlignWith( A20 );\n        A10_STAR_MC.AlignWith( A00 );\n        A10_STAR_MR.AlignWith( A00 );\n        A21Trans_STAR_MC.AlignWith( A20 );\n        A21_VR_STAR.AlignWith( A22 );\n        A21Adj_STAR_MR.AlignWith( A22 );\n        //--------------------------------------------------------------------//\n        A11_STAR_STAR = A11;\n        LocalCholesky( LOWER, A11_STAR_STAR );\n\n        A10_STAR_VR = A10;\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, NON_UNIT, F(1), A11_STAR_STAR, A10_STAR_VR );\n\n        A21_VC_STAR = A21;\n        LocalTrsm\n        ( RIGHT, LOWER, ADJOINT, NON_UNIT, F(1), A11_STAR_STAR, A21_VC_STAR );\n\n        A10_STAR_MC = A10_STAR_VR;\n        A10_STAR_MR = A10_STAR_VR;\n        LocalTrrk\n        ( LOWER, ADJOINT,\n          F(1), A10_STAR_MC, A10_STAR_MR, F(1), A00 );\n\n        A21_VC_STAR.TransposePartialColAllGather( A21Trans_STAR_MC );\n        LocalGemm\n        ( TRANSPOSE, NORMAL, F(-1), A21Trans_STAR_MC, A10_STAR_MR, F(1), A20 );\n\n        A21_VR_STAR = A21_VC_STAR;\n        A21_VR_STAR.AdjointPartialColAllGather( A21Adj_STAR_MR );\n        LocalTrrk\n        ( LOWER, TRANSPOSE,\n          F(-1), A21Trans_STAR_MC, A21Adj_STAR_MR, F(1), A22 );\n\n        LocalTrsm\n        ( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), A11_STAR_STAR, A10_STAR_VR );\n\n        LocalTrsm\n        ( RIGHT, LOWER, NORMAL, NON_UNIT, F(-1), A11_STAR_STAR, A21_VC_STAR );\n\n        LocalTriangularInverse( LOWER, NON_UNIT, A11_STAR_STAR );\n\n        LocalTrtrmm( LOWER, A11_STAR_STAR, true );\n\n        A11 = A11_STAR_STAR;\n        A10 = A10_STAR_VR;\n        A21 = A21_VC_STAR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n    }\n}\n\n} // namespace hpd_inv\n} // namespace elem\n\n#endif // ifndef ELEM_INVERSE_HPD_CHOLESKYLVAR2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/HPD/CholeskyUVar2.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_HPD_CHOLESKYUVAR2_HPP\n#define ELEM_INVERSE_HPD_CHOLESKYUVAR2_HPP\n\n#include ELEM_GEMM_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n#include ELEM_TRTRMM_INC\n\n#include ELEM_CHOLESKY_INC\n#include ELEM_TRIANGULARINVERSE_INC\n\nnamespace elem {\nnamespace hpd_inv {\n\n// This approach is based upon the reordered Variant 2 algorithm from Fig. 9 in \n// Bientinesi et al.'s \"Families of Algorithms Related to the Inversion of \n// a Symmetric Positive Definite Matrix\".\n\ntemplate<typename F> \ninline void\nCholeskyUVar2( Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hpd_inv::CholeskyUVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Nonsquare matrices cannot be triangular\");\n    )\n    // Matrix views\n    Matrix<F> \n        ATL, ATR,  A00, A01, A02,\n        ABL, ABR,  A10, A11, A12,\n                   A20, A21, A22;\n\n    // Start the algorithm\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        //--------------------------------------------------------------------//\n        Cholesky( UPPER, A11 );\n        Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), A11, A01 );\n        Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A11, A12 );\n        Herk( UPPER, NORMAL, F(1), A01, F(1), A00 );\n        Gemm( NORMAL, NORMAL, F(-1), A01, A12, F(1), A02 );\n        Herk( UPPER, ADJOINT, F(-1), A12, F(1), A22 );\n        Trsm( RIGHT, UPPER, ADJOINT, NON_UNIT, F(1), A11, A01 );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(-1), A11, A12 );\n        TriangularInverse( UPPER, NON_UNIT, A11 );\n        Trtrmm( UPPER, A11, true );\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n    }\n}\n\ntemplate<typename F> \ninline void\nCholeskyUVar2( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hpd_inv::CholeskyUVar2\");\n        if( A.Height() != A.Width() )\n            LogicError(\"Nonsquare matrices cannot be triangular\");\n    )\n    const Grid& g = A.Grid();\n\n    // Matrix views\n    DistMatrix<F> \n        ATL(g), ATR(g),  A00(g), A01(g), A02(g),\n        ABL(g), ABR(g),  A10(g), A11(g), A12(g),\n                         A20(g), A21(g), A22(g);\n\n    // Temporary distributions\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,VC,  STAR> A01_VC_STAR(g);\n    DistMatrix<F,VR,  STAR> A01_VR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,STAR,MC  > A01Trans_STAR_MC(g);\n    DistMatrix<F,MR,  STAR> A01_MR_STAR(g);\n    DistMatrix<F,STAR,MR  > A01Adj_STAR_MR(g);\n    DistMatrix<F,STAR,MR  > A12_STAR_MR(g);\n    DistMatrix<F,STAR,MC  > A12_STAR_MC(g);\n\n    // Start the algorithm\n    PartitionDownDiagonal\n    ( A, ATL, ATR,\n         ABL, ABR, 0 );\n    while( ATL.Height() < A.Height() )\n    {\n        RepartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, /**/ A01, A02,\n         /*************/ /******************/\n               /**/       A10, /**/ A11, A12,\n          ABL, /**/ ABR,  A20, /**/ A21, A22 );\n\n        A01_VC_STAR.AlignWith( A00 );\n        A12_STAR_VR.AlignWith( A02 );\n        A01Trans_STAR_MC.AlignWith( A00 );\n        A01_VR_STAR.AlignWith( A00 );\n        A01Adj_STAR_MR.AlignWith( A00 );\n        A12_STAR_MR.AlignWith( A02 );\n        A12_STAR_MC.AlignWith( A22 );\n        //--------------------------------------------------------------------//\n        A11_STAR_STAR = A11;\n        LocalCholesky( UPPER, A11_STAR_STAR );\n\n        A01_VC_STAR = A01;\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), A11_STAR_STAR, A01_VC_STAR );\n\n        A12_STAR_VR = A12;\n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), A11_STAR_STAR, A12_STAR_VR );\n\n        A01_VC_STAR.TransposePartialColAllGather( A01Trans_STAR_MC );\n        A01_VR_STAR = A01_VC_STAR;\n        A01_VR_STAR.AdjointPartialColAllGather( A01Adj_STAR_MR );\n        LocalTrrk\n        ( UPPER, TRANSPOSE,\n          F(1), A01Trans_STAR_MC, A01Adj_STAR_MR, F(1), A00 );\n\n        A12_STAR_MR = A12_STAR_VR;\n        LocalGemm\n        ( TRANSPOSE, NORMAL, F(-1), A01Trans_STAR_MC, A12_STAR_MR, F(1), A02 );\n\n        A12_STAR_MC = A12_STAR_VR;\n        LocalTrrk\n        ( UPPER, ADJOINT,\n          F(-1), A12_STAR_MC, A12_STAR_MR, F(1), A22 );\n\n        LocalTrsm\n        ( RIGHT, UPPER, ADJOINT, NON_UNIT, F(1), A11_STAR_STAR, A01_VC_STAR );\n\n        LocalTrsm\n        ( LEFT, UPPER, NORMAL, NON_UNIT, F(-1), A11_STAR_STAR, A12_STAR_VR );\n\n        LocalTriangularInverse( UPPER, NON_UNIT, A11_STAR_STAR );\n\n        LocalTrtrmm( UPPER, A11_STAR_STAR, true );\n\n        A11 = A11_STAR_STAR;\n        A01 = A01_VC_STAR;\n        A12 = A12_STAR_VR;\n        //--------------------------------------------------------------------//\n\n        SlidePartitionDownDiagonal\n        ( ATL, /**/ ATR,  A00, A01, /**/ A02,\n               /**/       A10, A11, /**/ A12,\n         /*************/ /******************/\n          ABL, /**/ ABR,  A20, A21, /**/ A22 );\n    }\n}\n\n} // namespace hpd_inv\n} // namespace elem\n\n#endif // ifndef ELEM_INVERSE_HPD_CHOLESKYUVAR2_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/HPD.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_HPD_HPP\n#define ELEM_INVERSE_HPD_HPP\n\n#include \"./HPD/CholeskyLVar2.hpp\"\n#include \"./HPD/CholeskyUVar2.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nHPDInverse( UpperOrLower uplo, Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPDInverse\"))\n    if( uplo == LOWER )\n        hpd_inv::CholeskyLVar2( A );\n    else\n        hpd_inv::CholeskyUVar2( A );\n}\n\ntemplate<typename F>\ninline void\nHPDInverse( UpperOrLower uplo, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPDInverse\"))\n    if( uplo == LOWER )\n        hpd_inv::CholeskyLVar2( A );\n    else\n        hpd_inv::CholeskyUVar2( A );\n}\n\ntemplate<typename F>\ninline void\nLocalHPDInverse( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalHPDInverse\"))\n    HPDInverse( uplo, A.Matrix() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_INVERSE_HPD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/Hermitian.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_HERMITIAN_HPP\n#define ELEM_INVERSE_HERMITIAN_HPP\n\n#include \"./Symmetric.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nHermitianInverse\n( UpperOrLower uplo, Matrix<F>& A, LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianInverse\"))\n    SymmetricInverse( uplo, A, true, pivotType );\n}\n\ntemplate<typename F>\ninline void\nHermitianInverse\n( UpperOrLower uplo, DistMatrix<F>& A, LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianInverse\"))\n    SymmetricInverse( uplo, A, true, pivotType );\n}\n\ntemplate<typename F>\ninline void\nLocalHermitianInverse\n( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A, \n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalHermitianInverse\"))\n    SymmetricInverse( uplo, A.Matrix(), true, pivotType );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_INVERSE_HERMITIAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/Symmetric.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_SYMMETRIC_HPP\n#define ELEM_INVERSE_SYMMETRIC_HPP\n\n#include ELEM_MAKESYMMETRIC_INC\n#include ELEM_TRDTRMM_INC\n#include ELEM_LDL_INC\n\n#include ELEM_INVERTPERMUTATION_INC\n#include ELEM_PERMUTECOLS_INC\n#include ELEM_PERMUTEROWS_INC\n\n#include \"./Triangular.hpp\"\n\nnamespace elem {\n\n// NOTE: This overwrites both triangles of the inverse.\ntemplate<typename F>\ninline void\nSymmetricInverse\n( UpperOrLower uplo, Matrix<F>& A, bool conjugate=false, \n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricInverse\"))\n    if( uplo == LOWER )\n    {\n        Matrix<Int> pPerm;\n        Matrix<F> dSub;\n        ldl::Pivoted( A, dSub, pPerm, conjugate, pivotType );\n        TriangularInverse( LOWER, UNIT, A ); \n        Trdtrmm( LOWER, A, dSub, conjugate );\n\n        // NOTE: Fill in both triangles of the inverse\n        Matrix<Int> pInvPerm;\n        InvertPermutation( pPerm, pInvPerm );\n        MakeSymmetric( LOWER, A, conjugate );\n        PermuteRows( A, pInvPerm, pPerm );\n        PermuteCols( A, pInvPerm, pPerm ); \n    }\n    else\n        LogicError(\"This option is not yet supported\");\n}\n\ntemplate<typename F>\ninline void\nSymmetricInverse\n( UpperOrLower uplo, DistMatrix<F>& A, bool conjugate=false,\n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricInverse\"))\n    if( uplo == LOWER )\n    {\n        DistMatrix<Int,VC,STAR> pPerm( A.Grid() );\n        DistMatrix<F,MD,STAR> dSub( A.Grid() );\n        ldl::Pivoted( A, dSub, pPerm, conjugate, pivotType );\n        TriangularInverse( LOWER, UNIT, A ); \n        Trdtrmm( LOWER, A, dSub, conjugate );\n\n        // NOTE: Fill in both triangles of the inverse\n        DistMatrix<Int,VC,STAR> pInvPerm(pPerm.Grid());\n        InvertPermutation( pPerm, pInvPerm );\n        MakeSymmetric( LOWER, A, conjugate );\n        PermuteRows( A, pInvPerm, pPerm );\n        PermuteCols( A, pInvPerm, pPerm );\n    }\n    else\n        LogicError(\"This option is not yet supported\");\n}\n\ntemplate<typename F>\ninline void\nLocalSymmetricInverse\n( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A, bool conjugate=false, \n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalSymmetricInverse\"))\n    SymmetricInverse( uplo, A.Matrix(), conjugate, pivotType );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_INVERSE_SYMMETRIC_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/Triangular/LVar3.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_TRIANGULAR_LVAR3_HPP\n#define ELEM_INVERSE_TRIANGULAR_LVAR3_HPP\n\n#include ELEM_GEMM_INC\n#include ELEM_TRSM_INC\n\nnamespace elem {\nnamespace triang_inv {\n\ntemplate<typename F>\ninline void\nLVar3Unb( UnitOrNonUnit diag, Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"triang_inv::LVar3Unb\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Nonsquare matrices cannot be triangular\");\n    )\n    const Int n = L.Height();\n    const Int ldl = L.LDim();\n    F* LBuffer = L.Buffer();\n    for( Int j=0; j<n; ++j )\n    {\n        const F lambda = ( diag==NON_UNIT ? LBuffer[j+j*ldl] : F(1) );\n        for( Int k=0; k<j; ++k )\n            LBuffer[j+k*ldl] /= -lambda;\n        blas::Geru\n        ( n-(j+1), j, F(1),\n          &LBuffer[(j+1)+j*ldl], 1, &LBuffer[j], ldl, \n          &LBuffer[j+1], ldl );\n        if( diag == NON_UNIT )\n        {\n            for( Int k=j+1; k<n; ++k )\n                LBuffer[k+j*ldl] /= lambda;\n            LBuffer[j+j*ldl] = F(1) / LBuffer[j+j*ldl];\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nLVar3( UnitOrNonUnit diag, Matrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"triang_inv::LVar3\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Nonsquare matrices cannot be triangular\");\n    )\n    const Int n = L.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto L10 = ViewRange( L, k,    0, k+nb, k    );\n        auto L11 = ViewRange( L, k,    k, k+nb, k+nb );\n        auto L20 = ViewRange( L, k+nb, 0, n,    k    );\n        auto L21 = ViewRange( L, k+nb, k, n,    k+nb );\n\n        Trsm( LEFT, LOWER, NORMAL, diag, F(-1), L11, L10 );\n        Gemm( NORMAL, NORMAL, F(1), L21, L10, F(1), L20 );\n        Trsm( RIGHT, LOWER, NORMAL, diag, F(1), L11, L21 );\n        LVar3Unb( diag, L11 );\n    }\n}\n\ntemplate<typename F>\ninline void\nLVar3( UnitOrNonUnit diag, DistMatrix<F>& L )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"triang_inv::LVar3\");\n        if( L.Height() != L.Width() )\n            LogicError(\"Nonsquare matrices cannot be triangular\");\n    )\n    const Grid& g = L.Grid();\n    DistMatrix<F,STAR,MR  > L10_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > L10_STAR_VR(g);\n    DistMatrix<F,STAR,STAR> L11_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> L21_MC_STAR(g);\n    DistMatrix<F,VC,  STAR> L21_VC_STAR(g);\n\n    const Int n = L.Height();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto L10 = ViewRange( L, k,    0, k+nb, k    );\n        auto L11 = ViewRange( L, k,    k, k+nb, k+nb );\n        auto L20 = ViewRange( L, k+nb, 0, n,    k    );\n        auto L21 = ViewRange( L, k+nb, k, n,    k+nb );\n\n        L10_STAR_VR = L10;\n        L11_STAR_STAR = L11;\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, diag, F(-1), L11_STAR_STAR, L10_STAR_VR );\n\n        L21_MC_STAR.AlignWith( L20 );\n        L21_MC_STAR = L21;\n        L10_STAR_MR.AlignWith( L20 );\n        L10_STAR_MR = L10_STAR_VR;\n        LocalGemm\n        ( NORMAL, NORMAL, F(1), L21_MC_STAR, L10_STAR_MR, F(1), L20 );\n        L10 = L10_STAR_MR;\n\n        L21_VC_STAR = L21_MC_STAR;\n        LocalTrsm\n        ( RIGHT, LOWER, NORMAL, diag, F(1), L11_STAR_STAR, L21_VC_STAR );\n        LocalTriangularInverse( LOWER, diag, L11_STAR_STAR );\n        L11 = L11_STAR_STAR;\n        L21 = L21_VC_STAR;\n    }\n}\n\n} // namespace triang_inv\n} // namespace elem\n\n#endif // ifndef ELEM_INVERSE_TRIANGULAR_LVAR3_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/Triangular/UVar3.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_TRIANGULAR_UVAR3_HPP\n#define ELEM_INVERSE_TRIANGULAR_UVAR3_HPP\n\n#include ELEM_GEMM_INC\n#include ELEM_TRSM_INC\n\nnamespace elem {\nnamespace triang_inv {\n\ntemplate<typename F>\ninline void\nUVar3Unb( UnitOrNonUnit diag, Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"triang_inv::UVar3Unb\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Nonsquare matrices cannot be triangular\");\n    )\n    const Int n = U.Height();\n    const Int ldu = U.LDim();\n    F* UBuffer = U.Buffer();\n    for( Int j=n-1; j>=0; --j )\n    {\n        const F upsilon = ( diag==NON_UNIT ? UBuffer[j+j*ldu] : F(1) );\n        for( Int k=0; k<j; ++k )\n            UBuffer[k+j*ldu] /= -upsilon;\n        blas::Geru\n        ( j, n-(j+1), F(1),\n          &UBuffer[j*ldu], 1, &UBuffer[j+(j+1)*ldu], ldu, \n          &UBuffer[(j+1)*ldu], ldu );\n        if( diag == NON_UNIT )\n        {\n            for( Int k=j+1; k<n; ++k )\n                UBuffer[j+k*ldu] /= upsilon;\n            UBuffer[j+j*ldu] = F(1) / UBuffer[j+j*ldu];\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nUVar3( UnitOrNonUnit diag, Matrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"triang_inv::UVar3\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Nonsquare matrices cannot be triangular\");\n    )\n    const Int n = U.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto U01 = ViewRange( U, 0,    k,    k,    k+nb );\n        auto U02 = ViewRange( U, 0,    k+nb, k,    n    );\n        auto U11 = ViewRange( U, k,    k,    k+nb, k+nb );\n        auto U12 = ViewRange( U, k,    k+nb, k+nb, n    );\n        auto U22 = ViewRange( U, k+nb, k+nb, n,    n    );\n\n        Trsm( RIGHT, UPPER, NORMAL, diag, F(-1), U11, U01 );\n        Gemm( NORMAL, NORMAL, F(1), U01, U12, F(1), U02 );\n        Trsm( LEFT, UPPER, NORMAL, diag, F(1), U11, U12 );\n        UVar3Unb( diag, U11 );\n    }\n}\n\ntemplate<typename F>\ninline void\nUVar3( UnitOrNonUnit diag, DistMatrix<F>& U )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"triang_inv::UVar3\");\n        if( U.Height() != U.Width() )\n            LogicError(\"Nonsquare matrices cannot be triangular\");\n    )\n    const Grid& g = U.Grid();\n    DistMatrix<F,VC,  STAR> U01_VC_STAR(g);\n    DistMatrix<F,STAR,STAR> U11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > U12_STAR_VR(g);\n    DistMatrix<F,STAR,MC  > U01Trans_STAR_MC(g);\n    DistMatrix<F,MR,  STAR> U12Trans_MR_STAR(g);\n\n    const Int n = U.Height();\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto U01 = ViewRange( U, 0,    k,    k,    k+nb );\n        auto U02 = ViewRange( U, 0,    k+nb, k,    n    );\n        auto U11 = ViewRange( U, k,    k,    k+nb, k+nb );\n        auto U12 = ViewRange( U, k,    k+nb, k+nb, n    );\n        auto U22 = ViewRange( U, k+nb, k+nb, n,    n    );\n\n        U01_VC_STAR = U01;\n        U11_STAR_STAR = U11;\n        LocalTrsm\n        ( RIGHT, UPPER, NORMAL, diag, F(-1), U11_STAR_STAR, U01_VC_STAR );\n\n        // We transpose before the communication to avoid cache-thrashing\n        // in the unpacking stage.\n        U12Trans_MR_STAR.AlignWith( U02 );\n        U01Trans_STAR_MC.AlignWith( U02 );\n        U12.TransposeColAllGather( U12Trans_MR_STAR );\n        U01_VC_STAR.TransposePartialColAllGather( U01Trans_STAR_MC );\n\n        LocalGemm\n        ( TRANSPOSE, TRANSPOSE, \n          F(1), U01Trans_STAR_MC, U12Trans_MR_STAR, F(1), U02 );\n        U01.TransposeRowFilterFrom( U01Trans_STAR_MC );\n\n        U12_STAR_VR.TransposePartialRowFilterFrom( U12Trans_MR_STAR );\n        LocalTrsm\n        ( LEFT, UPPER, NORMAL, diag, F(1), U11_STAR_STAR, U12_STAR_VR );\n        LocalTriangularInverse( UPPER, diag, U11_STAR_STAR );\n        U11 = U11_STAR_STAR;\n        U12 = U12_STAR_VR;\n    }\n}\n\n} // namespace triang_inv\n} // namespace elem\n\n#endif // ifndef ELEM_INVERSE_TRIANGULAR_UVAR3_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/Triangular.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_TRIANGULAR_HPP\n#define ELEM_INVERSE_TRIANGULAR_HPP\n\nnamespace elem {\ntemplate<typename F>\ninline void\nLocalTriangularInverse\n( UpperOrLower uplo, UnitOrNonUnit diag, DistMatrix<F,STAR,STAR>& A );\n} // namespace elem\n\n#include \"./Triangular/LVar3.hpp\"\n#include \"./Triangular/UVar3.hpp\"\n\nnamespace elem {\nnamespace triang_inv {\n\ntemplate<typename F>\ninline void\nVar3( UpperOrLower uplo, UnitOrNonUnit diag, Matrix<F>& A  )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"triang_inv::Var3\"))\n    if( uplo == LOWER )\n        LVar3( diag, A );\n    else\n        UVar3( diag, A );\n}\n\ntemplate<typename F>\ninline void\nVar3( UpperOrLower uplo, UnitOrNonUnit diag, DistMatrix<F>& A  )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"triang_inv::Var3\"))\n    if( uplo == LOWER )\n        LVar3( diag, A );\n    else\n        UVar3( diag, A );\n}\n\n} // namespace triang_inv\n\ntemplate<typename F>\ninline void\nTriangularInverse( UpperOrLower uplo, UnitOrNonUnit diag, Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriangularInverse\"))\n    triang_inv::Var3( uplo, diag, A );\n}\n\ntemplate<typename F>\ninline void\nTriangularInverse( UpperOrLower uplo, UnitOrNonUnit diag, DistMatrix<F>& A  )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriangularInverse\"))\n    triang_inv::Var3( uplo, diag, A );\n}\n\ntemplate<typename F>\ninline void\nLocalTriangularInverse\n( UpperOrLower uplo, UnitOrNonUnit diag, DistMatrix<F,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LocalTriangularInverse\"))\n    TriangularInverse( uplo, diag, A.Matrix() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_INVERSE_TRIANGULAR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_DECL_HPP\n#define ELEM_INVERSE_DECL_HPP\n\n#include ELEM_FACTOR_DECL_INC\n\n#endif // ifndef ELEM_INVERSE_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_IMPL_HPP\n#define ELEM_INVERSE_IMPL_HPP\n\n#include \"./Triangular.hpp\"\n#include \"./General.hpp\"\n#include \"./HPD.hpp\"\n#include \"./Symmetric.hpp\"\n#include \"./Hermitian.hpp\"\n\n#endif // ifndef ELEM_INVERSE_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Inverse.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INVERSE_HPP\n#define ELEM_INVERSE_HPP\n\n#include \"./Inverse/decl.hpp\"\n#include \"./Inverse/impl.hpp\"\n\n#endif // ifndef ELEM_INVERSE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Pseudoinverse.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOINVERSE_HPP\n#define ELEM_PSEUDOINVERSE_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_GEMM_INC\n#include ELEM_SVD_INC\n#include ELEM_MAXNORM_INC\n#include ELEM_HERMITIANFROMEVD_INC\n\nnamespace elem {\n\n// Replace A with its pseudoinverse\n\ntemplate<typename F>\ninline void\nPseudoinverse( Matrix<F>& A, Base<F> tolerance=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudoinverse\"))\n    typedef Base<F> R;\n\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int k = Max( m, n );\n\n    // Get the SVD of A\n    Matrix<R> s;\n    Matrix<F> U, V;\n    U = A;\n    SVD( U, s, V );\n\n    if( tolerance == R(0) )\n    {\n        // Set the tolerance equal to k ||A||_2 eps\n        const R eps = lapack::MachineEpsilon<R>();\n        const R twoNorm = MaxNorm( s );\n        tolerance = k*twoNorm*eps;\n    }\n    // Invert above the tolerance\n    const Int numVals = s.Height();\n    for( Int i=0; i<numVals; ++i )\n    {\n        const R sigma = s.Get(i,0);\n        if( sigma < tolerance )\n            s.Set(i,0,0);\n        else\n            s.Set(i,0,1/sigma);\n    }\n\n    // Scale U with the singular values, U := U Sigma\n    DiagonalScale( RIGHT, NORMAL, s, U );\n\n    // Form pinvA = (U Sigma V^H)^H = V (U Sigma)^H\n    Gemm( NORMAL, ADJOINT, F(1), V, U, A );\n}\n\ntemplate<typename F>\ninline void\nHermitianPseudoinverse( UpperOrLower uplo, Matrix<F>& A, Base<F> tolerance=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianPseudoinverse\"))\n    typedef Base<F> R;\n    const Int n = A.Height();\n\n    // Get the EVD of A\n    Matrix<R> w;\n    Matrix<F> Z;\n    HermitianEig( uplo, A, w, Z );\n\n    if( tolerance == R(0) )\n    {\n        // Set the tolerance equal to n ||A||_2 eps\n        const R eps = lapack::MachineEpsilon<R>();\n        const R twoNorm = MaxNorm( w );\n        tolerance = n*twoNorm*eps;\n    }\n    // Invert above the tolerance\n    for( Int i=0; i<n; ++i )\n    {\n        const R omega = w.Get(i,0);\n        if( Abs(omega) < tolerance )\n            w.Set(i,0,0);\n        else\n            w.Set(i,0,1/omega);\n    }\n\n    // Form the pseudoinverse\n    HermitianFromEVD( uplo, A, w, Z );\n}\n\ntemplate<typename F>\ninline void\nPseudoinverse( DistMatrix<F>& A, Base<F> tolerance=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudoinverse\"))\n    typedef Base<F> R;\n\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int k = Max( m, n );\n\n    // Get the SVD of A\n    DistMatrix<R,VR,STAR> s(g);\n    DistMatrix<F> U(g), V(g);\n    U = A;\n    SVD( U, s, V );\n\n    if( tolerance == R(0) )\n    {\n        // Set the tolerance equal to k ||A||_2 eps\n        const R eps = lapack::MachineEpsilon<R>();\n        const R twoNorm = MaxNorm( s );\n        tolerance = k*twoNorm*eps;\n    }\n    // Invert above the tolerance\n    const Int numLocalVals = s.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocalVals; ++iLoc )\n    {\n        const R sigma = s.GetLocal(iLoc,0);\n        if( sigma < tolerance )\n            s.SetLocal(iLoc,0,0);\n        else\n            s.SetLocal(iLoc,0,1/sigma);\n    }\n\n    // Scale U with the singular values, U := U Sigma\n    DiagonalScale( RIGHT, NORMAL, s, U );\n\n    // Form pinvA = (U Sigma V^H)^H = V (U Sigma)^H\n    Gemm( NORMAL, ADJOINT, F(1), V, U, A );\n}\n\ntemplate<typename F>\ninline void\nHermitianPseudoinverse\n( UpperOrLower uplo, DistMatrix<F>& A, Base<F> tolerance=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianPseudoinverse\"))\n    typedef Base<F> R;\n    const Int n = A.Height();\n\n    // Get the EVD of A\n    const Grid& g = A.Grid();\n    DistMatrix<R,VR,STAR> w(g);\n    DistMatrix<F> Z(g);\n    HermitianEig( uplo, A, w, Z );\n\n    if( tolerance == R(0) )\n    {\n        // Set the tolerance equal to n ||A||_2 eps\n        const R eps = lapack::MachineEpsilon<R>();\n        const R twoNorm = MaxNorm( w );\n        tolerance = n*twoNorm*eps;\n    }\n    // Invert above the tolerance\n    const Int numLocalEigs = w.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocalEigs; ++iLoc )\n    {\n        const R omega = w.GetLocal(iLoc,0);\n        if( Abs(omega) < tolerance )\n            w.SetLocal(iLoc,0,0);\n        else\n            w.SetLocal(iLoc,0,1/omega);\n    }\n\n    // Form the pseudoinverse\n    HermitianFromEVD( uplo, A, w, Z );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOINVERSE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/Sign.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SIGN_HPP\n#define ELEM_SIGN_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_SCALE_INC\n#include ELEM_GEMM_INC\n\n#include ELEM_INVERSE_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_DETERMINANT_INC\n\n#include ELEM_HERMITIANFROMEVD_INC\n\n// See Chapter 5 of Nicholas J. Higham's \"Functions of Matrices: Theory and\n// Computation\", which is currently available at:\n// http://www.siam.org/books/ot104/OT104HighamChapter5.pdf\n\nnamespace elem {\n\ntemplate<typename Real>\nstruct SignCtrl {\n    Int maxIts;\n    Real tol;\n    Real power;\n    SignScaling scaling;\n    bool progress;\n\n    SignCtrl()\n    : maxIts(100), tol(0), power(1), scaling(SIGN_SCALE_FROB), progress(false)\n    { }\n};\n\nnamespace sign {\n\ntemplate<typename F>\ninline void\nNewtonStep\n( const Matrix<F>& X, Matrix<F>& XNew, SignScaling scaling=SIGN_SCALE_FROB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"sign::NewtonStep\"))\n    typedef Base<F> Real;\n\n    // Calculate mu while forming XNew := inv(X)\n    Real mu=1;\n    Matrix<Int> p;\n    XNew = X;\n    LU( XNew, p );\n    if( scaling == SIGN_SCALE_DET )\n    {\n        SafeProduct<F> det = det::AfterLUPartialPiv( XNew, p );\n        mu = Real(1)/Exp(det.kappa);\n    }\n    inverse::AfterLUPartialPiv( XNew, p );\n    if( scaling == SIGN_SCALE_FROB )\n        mu = Sqrt( FrobeniusNorm(XNew)/FrobeniusNorm(X) );\n\n    // Overwrite XNew with the new iterate\n    const Real halfMu = mu/Real(2);\n    const Real halfMuInv = Real(1)/(2*mu); \n    Scale( halfMuInv, XNew );\n    Axpy( halfMu, X, XNew );\n}\n\ntemplate<typename F>\ninline void\nNewtonStep\n( const DistMatrix<F>& X, DistMatrix<F>& XNew, \n  SignScaling scaling=SIGN_SCALE_FROB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"sign::NewtonStep\"))\n    typedef Base<F> Real;\n\n    // Calculate mu while forming B := inv(X)\n    Real mu=1;\n    DistMatrix<Int,VC,STAR> p( X.Grid() );\n    XNew = X;\n    LU( XNew, p );\n    if( scaling == SIGN_SCALE_DET )\n    {\n        SafeProduct<F> det = det::AfterLUPartialPiv( XNew, p );\n        mu = Real(1)/Exp(det.kappa);\n    }\n    inverse::AfterLUPartialPiv( XNew, p );\n    if( scaling == SIGN_SCALE_FROB )\n        mu = Sqrt( FrobeniusNorm(XNew)/FrobeniusNorm(X) );\n\n    // Overwrite XNew with the new iterate\n    const Real halfMu = mu/Real(2);\n    const Real halfMuInv = Real(1)/(2*mu); \n    Scale( halfMuInv, XNew );\n    Axpy( halfMu, X, XNew );\n}\n\ntemplate<typename F>\ninline void\nNewtonSchulzStep( const Matrix<F>& X, Matrix<F>& XTmp, Matrix<F>& XNew )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"sign::NewtonSchulzStep\"))\n    typedef Base<F> Real;\n    const Int n = X.Height();\n \n    // XTmp := 3I - X^2\n    Identity( XTmp, n, n );\n    Gemm( NORMAL, NORMAL, Real(-1), X, X, Real(3), XTmp );\n\n    // XNew := 1/2 X XTmp\n    Gemm( NORMAL, NORMAL, Real(1)/Real(2), X, XTmp, XNew );\n}\n\ntemplate<typename F>\ninline void\nNewtonSchulzStep\n( const DistMatrix<F>& X, DistMatrix<F>& XTmp, DistMatrix<F>& XNew )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"sign::NewtonSchulzStep\"))\n    typedef Base<F> Real;\n    const Int n = X.Height();\n\n    // XTmp := 3I - X^2\n    Identity( XTmp, n, n );\n    Gemm( NORMAL, NORMAL, Real(-1), X, X, Real(3), XTmp );\n\n    // XNew := 1/2 X XTmp\n    Gemm( NORMAL, NORMAL, Real(1)/Real(2), X, XTmp, XNew );\n}\n\n// Please see Chapter 5 of Higham's \n// \"Functions of Matrices: Theory and Computation\" for motivation behind\n// the different choices of p, which are usually in {0,1,2}\ntemplate<typename F>\ninline Int\nNewton( Matrix<F>& A, const SignCtrl<Base<F>>& signCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"sign::Newton\"))\n    typedef Base<F> Real;\n    Real tol = signCtrl.tol;\n    if( tol == Real(0) )\n        tol = A.Height()*lapack::MachineEpsilon<Real>();\n\n    Int numIts=0;\n    Matrix<F> B;\n    Matrix<F> *X=&A, *XNew=&B;\n    while( numIts < signCtrl.maxIts )\n    {\n        // Overwrite XNew with the new iterate\n        NewtonStep( *X, *XNew, signCtrl.scaling );\n\n        // Use the difference in the iterates to test for convergence\n        Axpy( Real(-1), *XNew, *X );\n        const Real oneDiff = OneNorm( *X );\n        const Real oneNew = OneNorm( *XNew );\n\n        // Ensure that X holds the current iterate and break if possible\n        ++numIts;\n        std::swap( X, XNew );\n        if( signCtrl.progress )\n            std::cout << \"after \" << numIts << \" Newton iter's: \" \n                      << \"oneDiff=\" << oneDiff << \", oneNew=\" << oneNew \n                      << \", oneDiff/oneNew=\" << oneDiff/oneNew << \", tol=\" \n                      << tol << std::endl;\n        if( oneDiff/oneNew <= Pow(oneNew,signCtrl.power)*tol )\n            break;\n    }\n    if( X != &A )\n        A = *X;\n    return numIts;\n}\n\ntemplate<typename F>\ninline Int\nNewton( DistMatrix<F>& A, const SignCtrl<Base<F>>& signCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"sign::Newton\"))\n    typedef Base<F> Real;\n    Real tol = signCtrl.tol;\n    if( tol == Real(0) )\n        tol = A.Height()*lapack::MachineEpsilon<Real>();\n\n    Int numIts=0;\n    DistMatrix<F> B( A.Grid() );\n    DistMatrix<F> *X=&A, *XNew=&B;\n    while( numIts < signCtrl.maxIts )\n    {\n        // Overwrite XNew with the new iterate\n        NewtonStep( *X, *XNew, signCtrl.scaling );\n\n        // Use the difference in the iterates to test for convergence\n        Axpy( Real(-1), *XNew, *X );\n        const Real oneDiff = OneNorm( *X );\n        const Real oneNew = OneNorm( *XNew );\n\n        // Ensure that X holds the current iterate and break if possible\n        ++numIts;\n        std::swap( X, XNew );\n        if( signCtrl.progress && A.Grid().Rank() == 0 )\n            std::cout << \"after \" << numIts << \" Newton iter's: \"\n                      << \"oneDiff=\" << oneDiff << \", oneNew=\" << oneNew\n                      << \", oneDiff/oneNew=\" << oneDiff/oneNew << \", tol=\" \n                      << tol << std::endl;\n        if( oneDiff/oneNew <= Pow(oneNew,signCtrl.power)*tol )\n            break;\n    }\n    if( X != &A )\n        A = *X;\n    return numIts;\n}\n\n// TODO: NewtonSchulzHybrid which estimates when || X^2 - I ||_2 < 1\n\n} // namespace sign\n\ntemplate<typename F>\ninline void\nSign( Matrix<F>& A, const SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Sign\"))\n    sign::Newton( A, signCtrl );\n}\n\ntemplate<typename F>\ninline void\nSign\n( Matrix<F>& A, Matrix<F>& N, \n  const SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Sign\"))\n    Matrix<F> ACopy( A );\n    sign::Newton( A, signCtrl );\n    Gemm( NORMAL, NORMAL, F(1), A, ACopy, N );\n}\n\ntemplate<typename F>\ninline void\nSign( DistMatrix<F>& A, const SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Sign\"))\n    sign::Newton( A, signCtrl );\n}\n\ntemplate<typename F>\ninline void\nSign\n( DistMatrix<F>& A, DistMatrix<F>& N, \n  const SignCtrl<Base<F>> signCtrl=SignCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Sign\"))\n    DistMatrix<F> ACopy( A );\n    sign::Newton( A, signCtrl );\n    Gemm( NORMAL, NORMAL, F(1), A, ACopy, N );\n}\n\n// The Hermitian sign decomposition is equivalent to the Hermitian polar\n// decomposition... A = (U sgn(Lambda) U') (U sgn(Lambda)Lambda U')\n//                    = (U sgn(Lambda) U') (U |Lambda| U')\n\n// Even though sgn(lambda) isn't well-defined when lambda=0, we will extend it\n// from the right so that the sign decomposition of a singular Hermitian matrix\n// is a polar decomposition (which always exists).\n\n// TODO: Add HermitianEigCtrl structure\ntemplate<typename F>\ninline void\nHermitianSign\n( UpperOrLower uplo, Matrix<F>& A, \n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSign\"))\n    typedef Base<F> Real;\n\n    // Get the EVD of A\n    Matrix<Real> w;\n    Matrix<F> Z;\n    HermitianEig( uplo, A, w, Z, UNSORTED, ctrl );\n\n    const Int n = A.Height();\n    for( Int i=0; i<n; ++i )\n    {\n        const Real omega = w.Get(i,0);\n        if( omega >= 0 )\n            w.Set(i,0,Real(1));\n        else\n            w.Set(i,0,Real(-1));\n    }\n\n    // Reform the Hermitian matrix with the modified eigenvalues\n    HermitianFromEVD( uplo, A, w, Z );\n}\n\ntemplate<typename F>\ninline void\nHermitianSign\n( UpperOrLower uplo, Matrix<F>& A, Matrix<F>& N,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSign\"))\n    typedef Base<F> Real;\n\n    // Get the EVD of A\n    Matrix<Real> w;\n    Matrix<F> Z;\n    HermitianEig( uplo, A, w, Z, UNSORTED, ctrl );\n\n    const Int n = A.Height();\n    Matrix<Real> wSgn( n, 1 ), wAbs( n, 1 );\n    for( Int i=0; i<n; ++i )\n    {\n        const Real omega = w.Get(i,0);\n        if( omega >= 0 )\n        {\n            wSgn.Set(i,0,Real(1));\n            wAbs.Set(i,0,omega);\n        }\n        else\n        {\n            wSgn.Set(i,0,Real(-1));\n            wAbs.Set(i,0,-omega);\n        }\n    }\n\n    // Form the Hermitian matrices with modified eigenvalues\n    HermitianFromEVD( uplo, A, wSgn, Z );\n    HermitianFromEVD( uplo, N, wAbs, Z );\n}\n\ntemplate<typename F>\ninline void\nHermitianSign\n( UpperOrLower uplo, DistMatrix<F>& A,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSign\"))\n    typedef Base<F> Real;\n\n    // Get the EVD of A\n    const Grid& g = A.Grid();\n    DistMatrix<Real,VR,STAR> w(g);\n    DistMatrix<F> Z(g);\n    HermitianEig( uplo, A, w, Z, UNSORTED, ctrl );\n\n    const Int numLocalEigs = w.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocalEigs; ++iLoc )\n    {\n        const Real omega = w.GetLocal(iLoc,0);\n        if( omega >= 0 )\n            w.SetLocal(iLoc,0,Real(1));\n        else\n            w.SetLocal(iLoc,0,Real(-1));\n    }\n\n    // Reform the Hermitian matrix with the modified eigenvalues\n    HermitianFromEVD( uplo, A, w, Z );\n}\n\ntemplate<typename F>\ninline void\nHermitianSign\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<F>& N,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSign\"))\n    typedef Base<F> Real;\n\n    // Get the EVD of A\n    const Grid& g = A.Grid();\n    DistMatrix<Real,VR,STAR> w(g);\n    DistMatrix<F> Z(g);\n    HermitianEig( uplo, A, w, Z, UNSORTED, ctrl );\n\n    const Int n = A.Height();\n    const Int numLocalEigs = w.LocalHeight();\n    DistMatrix<Real,VR,STAR> wSgn(g), wAbs(g);\n    wSgn.AlignWith( w );\n    wAbs.AlignWith( w );\n    wSgn.Resize( n, 1 );\n    wAbs.Resize( n, 1 );\n    for( Int iLoc=0; iLoc<numLocalEigs; ++iLoc )\n    {\n        const Real omega = w.GetLocal(iLoc,0);\n        if( omega >= 0 )\n        {\n            wSgn.SetLocal(iLoc,0,Real(1));\n            wAbs.SetLocal(iLoc,0,omega);\n        }\n        else\n        {\n            wSgn.SetLocal(iLoc,0,Real(-1));\n            wAbs.SetLocal(iLoc,0,-omega);\n        }\n    }\n\n    // Form the Hermitian matrix with the modified eigenvalues\n    HermitianFromEVD( uplo, A, wSgn, Z );\n    HermitianFromEVD( uplo, N, wAbs, Z );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SIGN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/SquareRoot.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SQUAREROOT_HPP\n#define ELEM_SQUAREROOT_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_LU_INC\n#include ELEM_MAXNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_HERMITIANFROMEVD_INC\n\n// See Eq. 6.3 of Nicholas J. Higham and Awad H. Al-Mohy's \"Computing Matrix\n// Functions\", which is currently available at:\n// http://eprints.ma.man.ac.uk/1451/01/covered/MIMS_ep2010_18.pdf\n//\n// TODO: Determine whether stopping criterion should be different than that of\n//       Sign\n\nnamespace elem {\n\ntemplate<typename Real>\nstruct SquareRootCtrl {\n    Int maxIts;\n    Real tol;\n    Real power;\n    bool progress;\n\n    SquareRootCtrl()\n    : maxIts(100), tol(0), power(1), progress(false)\n    { }\n};\n\nnamespace square_root {\n\ntemplate<typename F>\ninline void\nNewtonStep\n( const Matrix<F>& A, const Matrix<F>& X, Matrix<F>& XNew, Matrix<F>& XTmp )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"square_root::NewtonStep\"))\n    // XNew := inv(X) A\n    XTmp = X;\n    Matrix<Int> p;\n    LU( XTmp, p );\n    XNew = A;\n    lu::SolveAfter( NORMAL, XTmp, p, XNew );\n\n    // XNew := 1/2 ( X + XNew )\n    typedef Base<F> Real;\n    Axpy( Real(1)/Real(2), X, XNew );\n}\n\ntemplate<typename F>\ninline void\nNewtonStep\n( const DistMatrix<F>& A, const DistMatrix<F>& X, \n  DistMatrix<F>& XNew, DistMatrix<F>& XTmp )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"square_root::NewtonStep\"))\n    // XNew := inv(X) A\n    XTmp = X;\n    DistMatrix<Int,VC,STAR> p(X.Grid());\n    LU( XTmp, p );\n    XNew = A;\n    lu::SolveAfter( NORMAL, XTmp, p, XNew );\n\n    // XNew := 1/2 ( X + XNew )\n    typedef Base<F> Real;\n    Axpy( Real(1)/Real(2), X, XNew );\n}\n\ntemplate<typename F>\ninline int\nNewton( Matrix<F>& A, const SquareRootCtrl<Base<F>>& sqrtCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"square_root::Newton\"))\n    typedef Base<F> Real;\n    Matrix<F> B(A), C, XTmp;\n    Matrix<F> *X=&B, *XNew=&C;\n\n    Real tol = sqrtCtrl.tol;\n    if( tol == Real(0) )\n        tol = A.Height()*lapack::MachineEpsilon<Real>();\n\n    Int numIts=0;\n    while( numIts < sqrtCtrl.maxIts )\n    {\n        // Overwrite XNew with the new iterate\n        NewtonStep( A, *X, *XNew, XTmp );\n\n        // Use the difference in the iterates to test for convergence\n        Axpy( Real(-1), *XNew, *X );\n        const Real oneDiff = OneNorm( *X );\n        const Real oneNew = OneNorm( *XNew );\n\n        // Ensure that X holds the current iterate and break if possible\n        ++numIts;\n        std::swap( X, XNew );\n        if( sqrtCtrl.progress )\n            std::cout << \"after \" << numIts << \" Newton iter's: \"\n                      << \"oneDiff=\" << oneDiff << \", oneNew=\" << oneNew\n                      << \", oneDiff/oneNew=\" << oneDiff/oneNew << \", tol=\"\n                      << tol << std::endl;\n        if( oneDiff/oneNew <= Pow(oneNew,sqrtCtrl.power)*tol )\n            break;\n    }\n    if( X != &A )\n        A = *X;\n    return numIts;\n}\n\ntemplate<typename F>\ninline int\nNewton( DistMatrix<F>& A, const SquareRootCtrl<Base<F>>& sqrtCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"square_root::Newton\"))\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    DistMatrix<F> B(A), C(g), XTmp(g);\n    DistMatrix<F> *X=&B, *XNew=&C;\n\n    Real tol = sqrtCtrl.tol;\n    if( tol == Real(0) )\n        tol = A.Height()*lapack::MachineEpsilon<Real>();\n\n    Int numIts=0;\n    while( numIts < sqrtCtrl.maxIts )\n    {\n        // Overwrite XNew with the new iterate\n        NewtonStep( A, *X, *XNew, XTmp );\n\n        // Use the difference in the iterates to test for convergence\n        Axpy( Real(-1), *XNew, *X );\n        const Real oneDiff = OneNorm( *X );\n        const Real oneNew = OneNorm( *XNew );\n\n        // Ensure that X holds the current iterate and break if possible\n        ++numIts;\n        std::swap( X, XNew );\n        if( sqrtCtrl.progress && g.Rank() == 0 )\n            std::cout << \"after \" << numIts << \" Newton iter's: \"\n                      << \"oneDiff=\" << oneDiff << \", oneNew=\" << oneNew\n                      << \", oneDiff/oneNew=\" << oneDiff/oneNew << \", tol=\"\n                      << tol << std::endl;\n        if( oneDiff/oneNew <= Pow(oneNew,sqrtCtrl.power)*tol )\n            break;\n    }\n    if( X != &A )\n        A = *X;\n    return numIts;\n}\n\n} // namespace square_root\n\ntemplate<typename F>\ninline void\nSquareRoot\n( Matrix<F>& A, \n  const SquareRootCtrl<Base<F>> sqrtCtrl=SquareRootCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SquareRoot\"))\n    square_root::Newton( A, sqrtCtrl );\n}\n\ntemplate<typename F>\ninline void\nSquareRoot\n( DistMatrix<F>& A, \n  const SquareRootCtrl<Base<F>> sqrtCtrl=SquareRootCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SquareRoot\"))\n    square_root::Newton( A, sqrtCtrl );\n}\n\n//\n// Square-root the eigenvalues of A\n//\n\ntemplate<typename F>\ninline void\nHPSDSquareRoot\n( UpperOrLower uplo, Matrix<F>& A, \n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPSDSquareRoot\"))\n    typedef Base<F> Real;\n\n    // Get the EVD of A\n    Matrix<Real> w;\n    Matrix<F> Z;\n    HermitianEig( uplo, A, w, Z, UNSORTED, ctrl );\n\n    // Compute the two-norm of A as the maximum absolute value of the eigvals\n    const Real twoNorm = MaxNorm( w );\n\n    // Compute the smallest eigenvalue of A\n    Real minEig = twoNorm;\n    const Int n = w.Height();\n    for( Int i=0; i<n; ++i )\n    {\n        const Real omega = w.Get(i,0);\n        minEig = std::min(minEig,omega);\n    }\n\n    // Set the tolerance equal to n ||A||_2 eps\n    const Real eps = lapack::MachineEpsilon<Real>();\n    const Real tolerance = n*twoNorm*eps;\n\n    // Ensure that the minimum eigenvalue is not less than - n ||A||_2 eps\n    if( minEig < -tolerance )\n        throw NonHPSDMatrixException();\n\n    // Overwrite the eigenvalues with f(w)\n    for( Int i=0; i<n; ++i )\n    {\n        const Real omega = w.Get(i,0);\n        if( omega > Real(0) )\n            w.Set(i,0,Sqrt(omega));\n        else\n            w.Set(i,0,0);\n    }\n\n    // Form the pseudoinverse\n    HermitianFromEVD( uplo, A, w, Z );\n}\n\ntemplate<typename F>\ninline void\nHPSDSquareRoot\n( UpperOrLower uplo, DistMatrix<F>& A,\n  const HermitianEigCtrl<Base<F>> ctrl=HermitianEigCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPSDSquareRoot\"))\n    typedef Base<F> Real;\n\n    // Get the EVD of A\n    const Grid& g = A.Grid();\n    DistMatrix<Real,VR,STAR> w(g);\n    DistMatrix<F> Z(g);\n    HermitianEig( uplo, A, w, Z, UNSORTED, ctrl );\n\n    // Compute the two-norm of A as the maximum absolute value of the eigvals\n    const Real twoNorm = MaxNorm( w );\n\n    // Compute the smallest eigenvalue of A\n    Real minLocalEig = twoNorm;\n    const Int numLocalEigs = w.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocalEigs; ++iLoc )\n    {\n        const Real omega = w.GetLocal(iLoc,0);\n        minLocalEig = std::min(minLocalEig,omega);\n    }\n    const Real minEig = mpi::AllReduce( minLocalEig, mpi::MIN, g.VCComm() );\n\n    // Set the tolerance equal to n ||A||_2 eps\n    const Int n = A.Height();\n    const Real eps = lapack::MachineEpsilon<Real>();\n    const Real tolerance = n*twoNorm*eps;\n\n    // Ensure that the minimum eigenvalue is not less than - n ||A||_2 eps\n    if( minEig < -tolerance )\n        throw NonHPSDMatrixException();\n\n    // Overwrite the eigenvalues with f(w)\n    for( Int iLoc=0; iLoc<numLocalEigs; ++iLoc )\n    {\n        const Real omega = w.GetLocal(iLoc,0);\n        if( omega > Real(0) )\n            w.SetLocal(iLoc,0,Sqrt(omega));\n        else\n            w.SetLocal(iLoc,0,0);\n    }\n\n    // Form the pseudoinverse\n    HermitianFromEVD( uplo, A, w, Z );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SQUAREROOT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_FUNCS_DECL_HPP\n#define ELEM_FUNCS_DECL_HPP\n\n#include ELEM_DECOMP_DECL_INC\n\nnamespace elem {\n\nnamespace SignScalingNS {\nenum SignScaling {\n    SIGN_SCALE_NONE,\n    SIGN_SCALE_DET,\n    SIGN_SCALE_FROB\n};\n} \nusing namespace SignScalingNS;\n\n} // namespace elem\n\n#endif // ifndef ELEM_FUNCS_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_FUNCS_IMPL_HPP\n#define ELEM_FUNCS_IMPL_HPP\n\n#include \"./Inverse.hpp\"\n#include \"./Pseudoinverse.hpp\"\n\n#include \"./HermitianFunction.hpp\"\n#include \"./Sign.hpp\"\n#include \"./SquareRoot.hpp\"\n\n#endif // ifndef ELEM_FUNCS_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/funcs.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_FUNCS_HPP\n#define ELEM_FUNCS_HPP\n\n#include \"./funcs/decl.hpp\"\n#include \"./funcs/impl.hpp\"\n\n#endif // ifndef ELEM_FUNCS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_IMPL_HPP\n#define ELEM_LAPACK_IMPL_HPP\n\n#include \"./util.hpp\"\n#include \"./factor.hpp\"\n#include \"./condense.hpp\"\n#include \"./decomp.hpp\"\n#include \"./solve.hpp\"\n#include \"./funcs.hpp\"\n#include \"./perm.hpp\"\n#include \"./props.hpp\"\n\n#endif // ifndef ELEM_LAPACK_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/ApplyColPivots.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_APPLYCOLPIVOTS_HPP\n#define ELEM_LAPACK_APPLYCOLPIVOTS_HPP\n\n#include \"./InvertPermutation.hpp\"\n#include \"./PivotsToPermutation.hpp\"\n#include \"./PermuteCols.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nApplyColPivots( Matrix<T>& A, const Matrix<Int>& pivots, Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ApplyColPivots\");\n        if( pivots.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n        if( pivots.Height() > A.Width() )\n            LogicError(\"pivots cannot be longer than width of A\");\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( height == 0 || width == 0 )\n        return;\n\n    const Int numPivots = pivots.Height();\n    for( Int j=0; j<numPivots; ++j )\n    {\n        const Int k = pivots.Get(j,0)-offset;\n        T* Aj = A.Buffer(0,j);\n        T* Ak = A.Buffer(0,k);\n        for( Int i=0; i<height; ++i )\n        {\n            T temp = Aj[i];\n            Aj[i] = Ak[i];\n            Ak[i] = temp;\n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nApplyInverseColPivots( Matrix<T>& A, const Matrix<Int>& pivots, Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ApplyInverseColPivots\");\n        if( pivots.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n        if( pivots.Height() > A.Width() )\n            LogicError(\"pivots cannot be larger than width of A\");\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( height == 0 || width == 0 )\n        return;\n\n    const Int numPivots = pivots.Height();\n    for( Int j=numPivots-1; j>=0; --j )\n    {\n        const Int k = pivots.Get(j,0)-offset;\n        T* Aj = A.Buffer(0,j);\n        T* Ak = A.Buffer(0,k);\n        for( Int i=0; i<height; ++i )\n        {\n            T temp = Aj[i];\n            Aj[i] = Ak[i];\n            Ak[i] = temp;\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V,Dist UPerm>\ninline void\nApplyColPivots\n( DistMatrix<T,U,V>& A, const DistMatrix<Int,UPerm,STAR>& pivots, Int offset=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ApplyColPivots\"))\n    DistMatrix<Int,UPerm,STAR> perm(pivots.Grid()),\n                               invPerm(pivots.Grid());\n    if( pivots.Height() == A.Width() )\n    {\n        PivotsToInversePermutation( pivots, invPerm, offset );\n        InvertPermutation( invPerm, perm );\n    }\n    else\n    {\n        PivotsToPartialPermutation( pivots, perm, invPerm, offset );\n    }\n    PermuteCols( A, perm, invPerm );\n}\n\ntemplate<typename T,Dist U,Dist V,Dist UPerm>\ninline void\nApplyInverseColPivots\n( DistMatrix<T,U,V>& A, const DistMatrix<Int,UPerm,STAR>& pivots, Int offset=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ApplyInverseColPivots\"))\n    DistMatrix<Int,UPerm,STAR> perm(pivots.Grid()),\n                               invPerm(pivots.Grid());\n    if( pivots.Height() == A.Width() )\n    {\n        PivotsToInversePermutation( pivots, invPerm, offset );\n        InvertPermutation( invPerm, perm );\n    }\n    else\n    {\n        PivotsToPartialPermutation( pivots, perm, invPerm, offset );\n    }\n    PermuteCols( A, invPerm, perm );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_APPLYCOLPIVOTS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/ApplyRowPivots.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_APPLYROWPIVOTS_HPP\n#define ELEM_LAPACK_APPLYROWPIVOTS_HPP\n\n#include \"./InvertPermutation.hpp\"\n#include \"./PivotsToPermutation.hpp\"\n#include \"./PermuteRows.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nApplyRowPivots( Matrix<T>& A, const Matrix<Int>& pivots, Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ApplyRowPivots\");\n        if( pivots.Width() != 1 )\n            LogicError(\"p must be a column vector\");\n        if( pivots.Height() > A.Height() )\n            LogicError(\"p cannot be larger than height of A\");\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( height == 0 || width == 0 )\n        return;\n\n    const Int numPivots = pivots.Height();\n    const Int ldim = A.LDim();\n    for( Int i=0; i<numPivots; ++i )\n    {\n        const Int k = pivots.Get(i,0)-offset;\n        T* Ai = A.Buffer(i,0);\n        T* Ak = A.Buffer(k,0);\n        for( Int j=0; j<width; ++j )\n        {\n            T temp = Ai[j*ldim];\n            Ai[j*ldim] = Ak[j*ldim];\n            Ak[j*ldim] = temp;\n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nApplyInverseRowPivots( Matrix<T>& A, const Matrix<Int>& pivots, Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ApplyInverseRowPivots\");\n        if( pivots.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n        if( pivots.Height() > A.Height() )\n            LogicError(\"pivots cannot be larger than height of A\");\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( height == 0 || width == 0 )\n        return;\n\n    const Int numPivots = pivots.Height();\n    const Int ldim = A.LDim();\n    for( Int i=numPivots-1; i>=0; --i )\n    {\n        const Int k = pivots.Get(i,0)-offset;\n        T* Ai = A.Buffer(i,0);\n        T* Ak = A.Buffer(k,0);\n        for( Int j=0; j<width; ++j )\n        {\n            T temp = Ai[j*ldim];\n            Ai[j*ldim] = Ak[j*ldim];\n            Ak[j*ldim] = temp;\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V,Dist UPerm>\ninline void\nApplyRowPivots\n( DistMatrix<T,U,V>& A, const DistMatrix<Int,UPerm,STAR>& pivots, Int offset=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ApplyRowPivots\"))\n    DistMatrix<Int,UPerm,STAR> perm(pivots.Grid()),\n                               invPerm(pivots.Grid());\n    if( pivots.Height() == A.Width() )\n    {\n        PivotsToInversePermutation( pivots, invPerm, offset );\n        InvertPermutation( invPerm, perm );\n    }\n    else\n    {\n        PivotsToPartialPermutation( pivots, perm, invPerm, offset );\n    }\n    PermuteRows( A, perm, invPerm );\n}\n\ntemplate<typename T,Dist U,Dist V,Dist UPerm>\ninline void\nApplyInverseRowPivots\n( DistMatrix<T,U,V>& A, const DistMatrix<Int,UPerm,STAR>& pivots, Int offset=0 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ApplyInverseRowPivots\"))\n    DistMatrix<Int,UPerm,STAR> perm(pivots.Grid()),\n                               invPerm(pivots.Grid());\n    if( pivots.Height() == A.Width() )\n    {\n        PivotsToInversePermutation( pivots, invPerm, offset );\n        InvertPermutation( invPerm, perm );\n    }\n    else\n    {\n        PivotsToPartialPermutation( pivots, perm, invPerm, offset );\n    }\n    PermuteRows( A, invPerm, perm );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_APPLYROWPIVOTS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/ApplySymmetricPivots.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_APPLYSYMMETRICPIVOTS_HPP\n#define ELEM_LAPACK_APPLYSYMMETRICPIVOTS_HPP\n\n#include ELEM_SWAP_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nApplySymmetricPivots\n( UpperOrLower uplo, Matrix<F>& A, const Matrix<Int>& p, bool conjugate=false,\n  Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ApplySymmetricPivots\");\n        if( p.Width() != 1 )\n            LogicError(\"p must be a column vector\");\n        if( p.Height() > A.Width() )\n            LogicError(\"p cannot be longer than width of A\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be symmetric\");\n    )\n    // TODO: Optimize this\n    const Int n = A.Height();\n    for( Int k=0; k<n; ++k )\n        SymmetricSwap( uplo, A, k, p.Get(k,0)-offset, conjugate );\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nApplySymmetricPivots\n( UpperOrLower uplo, DistMatrix<F>& A, \n  const DistMatrix<Int,UPerm,STAR>& pivots, \n  bool conjugate=false, Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ApplySymmetricPivots\");\n        if( pivots.Width() != 1 )\n            LogicError(\"p must be a column vector\");\n        if( pivots.Height() > A.Width() )\n            LogicError(\"p cannot be longer than width of A\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be symmetric\");\n    )\n    // TODO: Optimize this\n    const Int n = A.Height();\n    for( Int k=0; k<n; ++k )\n        SymmetricSwap( uplo, A, k, pivots.Get(k,0)-offset, conjugate );\n}\n\ntemplate<typename F>\ninline void\nApplyInverseSymmetricPivots\n( UpperOrLower uplo, Matrix<F>& A, const Matrix<Int>& p, bool conjugate=false,\n  Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ApplyInverseSymmetricPivots\");\n        if( p.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n        if( p.Height() > A.Width() )\n            LogicError(\"pivots cannot be longer than width of A\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be symmetric\");\n    )\n    // TODO: Optimize this\n    const Int n = A.Height();\n    for( Int k=n-1; k>=0; --k )\n        SymmetricSwap( uplo, A, k, p.Get(k,0)-offset, conjugate );\n}\n\ntemplate<typename F,Dist UPerm>\ninline void\nApplyInverseSymmetricPivots\n( UpperOrLower uplo, DistMatrix<F>& A, \n  const DistMatrix<Int,UPerm,STAR>& pivots, \n  bool conjugate=false, Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ApplyInverseSymmetricPivots\");\n        if( pivots.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n        if( pivots.Height() > A.Width() )\n            LogicError(\"pivots cannot be longer than width of A\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be symmetric\");\n    )\n    // TODO: Optimize this\n    const Int n = A.Height();\n    for( Int k=n-1; k>=0; --k )\n        SymmetricSwap( uplo, A, k, pivots.Get(k,0)-offset, conjugate );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_APPLYSYMMETRICPIVOTS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/ExplicitPermutation.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_EXPLICITPERMUTATION_HPP\n#define ELEM_LAPACK_EXPLICITPERMUTATION_HPP\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\ninline void\nExplicitPermutation( const Matrix<Int>& perm, Matrix<Int>& P )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ExplicitPermutation\");\n        if( perm.Width() != 1 )\n            LogicError(\"perm must be a column vector\");\n    )\n    const Int n = perm.Height();\n    Zeros( P, n, n );\n    for( Int i=0; i<n; ++i )\n        P.Set( i, perm.Get(i,0), 1 );\n}\n\ntemplate<Dist UPerm,Dist U,Dist V>\ninline void\nExplicitPermutation\n( const DistMatrix<Int,UPerm,STAR>& perm, DistMatrix<Int,U,V>& P )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ExplicitPermutation\");\n        if( perm.Width() != 1 )\n            LogicError(\"perm must be a column vector\");\n    )\n    const Int n = perm.Height();\n    Zeros( P, n, n );\n    for( Int i=0; i<n; ++i )\n        P.Set( i, perm.Get(i,0), 1 );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_EXPLICITPERMUTATION_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/InvertPermutation.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_INVERTPERMUTATION_HPP\n#define ELEM_LAPACK_INVERTPERMUTATION_HPP\n\n#include ELEM_MAXNORM_INC\n\nnamespace elem {\n\ninline void\nInvertPermutation( const Matrix<Int>& perm, Matrix<Int>& invPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"InvertPermutation\");\n        if( perm.Width() != 1 )\n            LogicError(\"perm must be a column vector\");\n    )\n    const Int n = perm.Height();\n    invPerm.Resize( n, 1 );\n    if( n == 0 )\n        return;\n\n    DEBUG_ONLY(\n        // This is obviously necessary but not sufficient for 'perm' to contain\n        // a reordering of (0,1,...,n-1).\n        const Int range = MaxNorm( perm ) + 1;\n        if( range != n )\n            LogicError(\"Invalid permutation range\");\n    )\n\n    for( Int i=0; i<n; ++i )\n        invPerm.Set( perm.Get(i,0), 0, i );\n}\n\ntemplate<Dist U>\ninline void\nInvertPermutation\n( const DistMatrix<Int,U,STAR>& perm, DistMatrix<Int,U,STAR>& invPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"InvertPermutation\");\n        if( perm.Width() != 1 )\n            LogicError(\"perm must be a column vector\");\n    )\n    const Int n = perm.Height();\n    invPerm.SetGrid( perm.Grid() );\n    invPerm.AlignWith( perm );\n    invPerm.Resize( n, 1 );\n    if( n == 0 )\n        return;\n\n    DEBUG_ONLY(\n        // This is obviously necessary but not sufficient for 'perm' to contain\n        // a reordering of (0,1,...,n-1).\n        const Int range = MaxNorm( perm ) + 1;\n        if( range != n )\n            LogicError(\"Invalid permutation range\");\n    )\n\n    const mpi::Comm colComm = perm.ColComm();\n    const Int commSize = mpi::Size( colComm );\n    std::vector<int> sendCounts(commSize,0), sendDispls(commSize),\n                     recvCounts(commSize,0), recvDispls(commSize);\n\n    // Compute the send counts\n    for( Int iLoc=0; iLoc<perm.LocalHeight(); ++iLoc )\n    {\n        const Int iDest = perm.GetLocal(iLoc,0);\n        const Int owner = invPerm.RowOwner(iDest);\n        sendCounts[owner] += 2; // we'll send the global index and the value\n    }\n    // Perform a small AllToAll to get the receive counts\n    mpi::AllToAll( sendCounts.data(), 1, recvCounts.data(), 1, colComm );\n\n    // Compute the displacements\n    int sendTotal=0, recvTotal=0;\n    for( Int q=0; q<commSize; ++q )\n    {\n        sendDispls[q] = sendTotal;\n        recvDispls[q] = recvTotal;\n        sendTotal += sendCounts[q];\n        recvTotal += recvCounts[q];\n    }\n\n    // Pack the send data\n    std::vector<Int> sendBuf(sendTotal);\n    auto offsets = sendDispls;\n    for( Int iLoc=0; iLoc<perm.LocalHeight(); ++iLoc )\n    {\n        const Int i     = perm.GlobalRow(iLoc);\n        const Int iDest = perm.GetLocal(iLoc,0);\n        const Int owner = invPerm.RowOwner(iDest);\n        sendBuf[offsets[owner]++] = iDest;\n        sendBuf[offsets[owner]++] = i;\n    }\n\n    // Perform the actual exchange\n    std::vector<Int> recvBuf(recvTotal);\n    mpi::AllToAll\n    ( sendBuf.data(), sendCounts.data(), sendDispls.data(),\n      recvBuf.data(), recvCounts.data(), recvDispls.data(), colComm );\n    SwapClear( sendBuf );\n    SwapClear( sendCounts );\n    SwapClear( sendDispls );\n\n    // Unpack the received data\n    for( Int k=0; k<recvTotal/2; ++k )\n    {\n        const Int iDest = recvBuf[2*k+0];\n        const Int i     = recvBuf[2*k+1];\n\n        const Int iDestLoc = invPerm.LocalRow(iDest);\n        invPerm.SetLocal( iDestLoc, 0, i );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_INVERTPERMUTATION_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/PermutationMeta.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_PERMUTATIONMETA_HPP\n#define ELEM_LAPACK_PERMUTATIONMETA_HPP\n\nnamespace elem {\n\nstruct PermutationMeta\n{\n    Int align;\n    mpi::Comm comm;\n    \n    // Will treat vector lengths as one\n    std::vector<int> sendCounts, sendDispls,\n                     recvCounts, recvDispls;\n\n    std::vector<int> sendIdx, sendRanks,\n                     recvIdx, recvRanks;\n\n    int TotalSend() const { return sendCounts.back()+sendDispls.back(); }\n    int TotalRecv() const { return recvCounts.back()+recvDispls.back(); }\n\n    void ScaleUp( Int length )\n    {\n        const int p = sendCounts.size();\n        for( int q=0; q<p; ++q )\n        {\n            sendCounts[q] *= length;\n            sendDispls[q] *= length;\n            recvCounts[q] *= length;\n            recvDispls[q] *= length;\n        }\n    }\n    void ScaleDown( Int length )\n    {\n        const int p = sendCounts.size();\n        for( int q=0; q<p; ++q )\n        {\n            sendCounts[q] /= length;\n            sendDispls[q] /= length;\n            recvCounts[q] /= length;\n            recvDispls[q] /= length;\n        }\n    }\n\n    template<Dist U> \n    PermutationMeta\n    ( const DistMatrix<Int,U,STAR>& perm,\n      const DistMatrix<Int,U,STAR>& invPerm );\n};\n\ntemplate<Dist U>\ninline PermutationMeta::PermutationMeta\n( const DistMatrix<Int,U,STAR>& perm,\n  const DistMatrix<Int,U,STAR>& invPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PermutationMeta::PermutationMeta\");\n        if( invPerm.Grid() != perm.Grid() )\n            LogicError(\"perm and invPerm must share the same grid\");\n        if( invPerm.ColAlign() != perm.ColAlign() )\n            LogicError(\"perm and invPerm must align\");\n    )\n    comm = perm.ColComm();\n    align = perm.ColAlign();\n    const Int b = perm.Height();\n    const Int stride = perm.ColStride();\n\n    // Form the metadata\n    //\n    // Extract the send and recv counts from the image and preimage.\n    // There are three different types of exchanges:\n    //   1. [0,b) -> [0,b)\n    //   2. [0,b) -> [b,n)\n    //   3. [b,n) -> [0,b)\n    // The fourth possibility, [b,n) -> [b,n), is impossible due to the \n    // fact that indices pulled in from [b,n) are stuck in [0,b) due to the\n    // fact that the i'th pivot exchanges index i with some index k >= i.\n    // \n    sendCounts.resize( stride, 0 );\n    recvCounts.resize( stride, 0 );\n\n    for( Int i=0; i<b; ++i )\n    {\n        const Int preVal = perm.Get(i,0);\n        const Int postVal = invPerm.Get(i,0);        \n\n        // Handle sends \n        if( invPerm.IsLocalRow(i) )\n        {\n            const Int iLoc = invPerm.LocalRow( i );\n            const Int sendTo = invPerm.RowOwner( postVal );\n            sendIdx.push_back( iLoc );\n            sendRanks.push_back( sendTo );\n            ++sendCounts[sendTo];\n        }\n        if( preVal >= b && invPerm.IsLocalRow(preVal) )\n        {\n            const Int iLoc = invPerm.LocalRow( preVal );\n            const Int sendTo = invPerm.RowOwner( i) ;\n            sendIdx.push_back( iLoc );\n            sendRanks.push_back( sendTo );\n            ++sendCounts[sendTo];\n        }\n\n        // Handle recvs\n        if( invPerm.IsLocalRow(postVal) )\n        {\n            const Int iLoc = invPerm.LocalRow( postVal );\n            const Int recvFrom = invPerm.RowOwner( i );\n            recvIdx.push_back( iLoc );\n            recvRanks.push_back( recvFrom );\n            ++recvCounts[recvFrom];\n        }\n        if( preVal >= b && invPerm.IsLocalRow(i) )\n        {\n            const Int iLoc = invPerm.LocalRow( i );\n            const Int recvFrom = invPerm.RowOwner( preVal );\n            recvIdx.push_back( iLoc );\n            recvRanks.push_back( recvFrom );\n            ++recvCounts[recvFrom];\n        }\n    }\n\n    // Construct the send and recv displacements from the counts\n    sendDispls.resize( stride );\n    recvDispls.resize( stride );\n    Int totalSend=0, totalRecv=0;\n    for( Int i=0; i<stride; ++i )\n    {\n        sendDispls[i] = totalSend;\n        recvDispls[i] = totalRecv;\n        totalSend += sendCounts[i];\n        totalRecv += recvCounts[i];\n    }\n    DEBUG_ONLY(\n        if( totalSend != totalRecv )\n            LogicError\n            (\"Send and recv counts do not match: send=\",totalSend,\", recv=\",\n             totalRecv);\n    )\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_PERMUTATIONMETA_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/PermuteCols.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_PERMUTECOLS_HPP\n#define ELEM_LAPACK_PERMUTECOLS_HPP\n\n#include \"./PermutationMeta.hpp\"\n#include \"./InvertPermutation.hpp\"\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nPermuteCols( Matrix<T>& A, const Matrix<Int>& perm, const Matrix<Int>& invPerm )\n{\n    const Int b = perm.Height();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PermuteCols\");\n        if( A.Width() < b || b != invPerm.Height() )\n            LogicError\n            (\"perm and invPerm must be vectors of equal length that are not \"\n             \"wider than A.\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m == 0 || n == 0 )\n        return;\n\n    // TODO: Optimize this routine\n\n    // Make a copy of the first b columns\n    auto AColPanView = LockedView( A, 0, 0, m, b );\n    auto AColPanCopy( AColPanView );\n\n    // Make a copy of the preimage columns\n    Matrix<T> APreimageCopy( m, b );\n    for( Int j=0; j<b; ++j )\n    {\n        const Int jPre = perm.Get(j,0);\n        if( jPre >= b )\n            MemCopy( APreimageCopy.Buffer(0,j), A.LockedBuffer(0,jPre), m );\n    }\n\n    // Apply the permutations\n    for( Int j=0; j<b; ++j )\n    {\n        const Int jPre = perm.Get(j,0);\n        const Int jPost = invPerm.Get(j,0);\n        // Move row[j] into row[jPost]\n        MemCopy( A.Buffer(0,jPost), AColPanCopy.LockedBuffer(0,j), m );\n        // Move row[jPre] into row[j]\n        if( jPre >= b )\n            MemCopy( A.Buffer(0,j), APreimageCopy.LockedBuffer(0,j), m );\n    }\n}\n\ntemplate<typename T> \ninline void\nPermuteCols( Matrix<T>& A, const Matrix<Int>& perm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PermuteCols\"))\n    Matrix<Int> invPerm;\n    InvertPermutation( perm, invPerm );\n    PermuteCols( A, perm, invPerm );\n}\n\ntemplate<typename T> \ninline void\nInversePermuteCols( Matrix<T>& A, const Matrix<Int>& invPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"InversePermuteCols\"))\n    Matrix<Int> perm;\n    InvertPermutation( invPerm, perm );\n    PermuteCols( A, perm, invPerm );\n}\n\ntemplate<typename T,Dist U,Dist V> \ninline void\nPermuteCols( DistMatrix<T,U,V>& A, const PermutationMeta& oldMeta )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PermuteCols\");\n        if( A.RowComm() != oldMeta.comm )\n            LogicError(\"Invalid communicator in metadata\");\n        if( A.RowAlign() != oldMeta.align )\n            LogicError(\"Invalid alignment in metadata\");\n    )\n    if( A.Height() == 0 || A.Width() == 0 || !A.Participating() )\n        return;\n\n    const Int localHeight = A.LocalHeight();\n    PermutationMeta meta = oldMeta;\n    meta.ScaleUp( localHeight ); \n    // Fill vectors with the send data\n    auto offsets = meta.sendDispls;\n    const int totalSend = meta.TotalSend();\n    std::vector<T> sendData( mpi::Pad(totalSend) );\n    const int numSends = meta.sendIdx.size();\n    for( int send=0; send<numSends; ++send )\n    {\n        const int jLoc = meta.sendIdx[send];\n        const int rank = meta.sendRanks[send];\n        MemCopy\n        ( &sendData[offsets[rank]], A.LockedBuffer(0,jLoc), localHeight );\n        offsets[rank] += localHeight;\n    }\n\n    // Communicate all pivot rows\n    const int totalRecv = meta.TotalRecv();\n    std::vector<T> recvData( mpi::Pad(totalRecv) );\n    mpi::AllToAll\n    ( sendData.data(), meta.sendCounts.data(), meta.sendDispls.data(),\n      recvData.data(), meta.recvCounts.data(), meta.recvDispls.data(), \n      meta.comm );\n\n    // Unpack the recv data\n    offsets = meta.recvDispls;\n    const int numRecvs = meta.recvIdx.size();\n    for( int recv=0; recv<numRecvs; ++recv )\n    {\n        const int jLoc = meta.recvIdx[recv];\n        const int rank = meta.recvRanks[recv];\n        MemCopy\n        ( A.Buffer(0,jLoc), &recvData[offsets[rank]], localHeight );\n        offsets[rank] += localHeight;\n    }\n}\n\ntemplate<typename T,Dist U,Dist V,Dist UPerm>\ninline void\nPermuteCols\n( DistMatrix<T,U,V>& A, \n  const DistMatrix<Int,UPerm,STAR>& perm, \n  const DistMatrix<Int,UPerm,STAR>& invPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PermuteCols\");\n        if( perm.ColAlign() != invPerm.ColAlign() )\n            LogicError(\"misaligned perm and invPerm\");\n    )\n    const Grid& g = A.Grid();\n    DistMatrix<Int,V,STAR> perm_V_STAR(g), invPerm_V_STAR(g);\n    if( V == UPerm && A.RowAlign() == perm.ColAlign() )\n    {\n        perm_V_STAR = LockedView( perm );\n        invPerm_V_STAR = LockedView( invPerm );\n    }\n    else\n    {\n        perm_V_STAR.AlignWith( A );\n        perm_V_STAR = perm;\n        invPerm_V_STAR.AlignWith( A );\n        invPerm_V_STAR = invPerm;\n    }\n\n    if( A.Participating() )\n    {\n        PermutationMeta meta( perm_V_STAR, invPerm_V_STAR );\n        PermuteCols( A, meta );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V,Dist UPerm>\ninline void\nPermuteCols\n( DistMatrix<T,U,V>& A, \n  const DistMatrix<Int,UPerm,STAR>& perm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PermuteCols\"))\n    const Grid& g = A.Grid();\n    DistMatrix<Int,V,STAR> perm_V_STAR(g), invPerm_V_STAR(g);\n    perm_V_STAR.AlignWith( A );\n    perm_V_STAR = perm;\n    InvertPermutation( perm_V_STAR, invPerm_V_STAR );\n    PermuteCols( A, perm_V_STAR, invPerm_V_STAR );\n}\n\ntemplate<typename T,Dist U,Dist V,Dist UPerm>\ninline void\nInversePermuteCols\n( DistMatrix<T,U,V>& A, \n  const DistMatrix<Int,UPerm,STAR>& invPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"InversePermuteCols\"))\n    const Grid& g = A.Grid();\n    DistMatrix<Int,V,STAR> perm_V_STAR(g), invPerm_V_STAR(g);\n    invPerm_V_STAR.AlignWith( A );\n    invPerm_V_STAR = invPerm;\n    InvertPermutation( invPerm_V_STAR, perm_V_STAR );\n    PermuteCols( A, perm_V_STAR, invPerm_V_STAR );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_PERMUTECOLS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/PermuteRows.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_PERMUTEROWS_HPP\n#define ELEM_LAPACK_PERMUTEROWS_HPP\n\n#include \"./PermutationMeta.hpp\"\n#include \"./InvertPermutation.hpp\"\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nPermuteRows\n( Matrix<T>& A, const Matrix<Int>& perm, const Matrix<Int>& invPerm )\n{\n    const Int b = perm.Height();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PermuteRows\");\n        if( A.Height() < b || b != invPerm.Height() )\n            LogicError\n            (\"perm and invPerm must be vectors of equal length that are not \"\n             \"taller than A.\");\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m == 0 || n == 0 )\n        return;\n\n    // TODO: Optimize this routine\n\n    // Make a copy of the first b rows\n    auto ARowPanView = LockedView( A, 0, 0, b, n );\n    auto ARowPanCopy( ARowPanView );\n\n    // Make a copy of the preimage rows\n    Matrix<T> APreimageCopy( b, n );\n    for( Int i=0; i<b; ++i ) \n    {\n        const Int iPre = perm.Get(i,0);\n        if( iPre >= b )\n            for( Int j=0; j<n; ++j )\n                APreimageCopy.Set(i,j,A.Get(iPre,j));\n    }\n\n    // Apply the permutations\n    for( Int i=0; i<b; ++i )\n    {\n        const Int iPre = perm.Get(i,0);\n        const Int iPost = invPerm.Get(i,0);\n        // Move row[i] into row[image[i]]\n        for( Int j=0; j<n; ++j )\n            A.Set(iPost,j,ARowPanCopy.Get(i,j));\n        if( iPre >= b )\n        {\n            // Move row[preimage[i]] into row[i]\n            for( Int j=0; j<n; ++j )\n                A.Set(i,j,APreimageCopy.Get(i,j));\n        }\n    }\n}\n\ntemplate<typename T> \ninline void\nPermuteRows( Matrix<T>& A, const Matrix<Int>& perm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PermuteRows\"))\n    Matrix<Int> invPerm;\n    InvertPermutation( perm, invPerm );\n    PermuteRows( A, perm, invPerm );\n}\n\ntemplate<typename T> \ninline void\nInversePermuteRows( Matrix<T>& A, const Matrix<Int>& invPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"InversePermuteRows\"))\n    Matrix<Int> perm;\n    InvertPermutation( invPerm, perm );\n    PermuteRows( A, perm, invPerm );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nPermuteRows( DistMatrix<T,U,V>& A, const PermutationMeta& oldMeta )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PermuteRows\");\n        if( A.ColComm() != oldMeta.comm )\n            LogicError(\"Invalid communicator in metadata\");\n        if( A.ColAlign() != oldMeta.align )\n            LogicError(\"Invalid alignment in metadata\");\n    )\n    if( A.Height() == 0 || A.Width() == 0 || !A.Participating() )\n        return;\n\n    const Int localWidth = A.LocalWidth();\n    const Int ldim = A.LDim();\n    PermutationMeta meta = oldMeta;\n    meta.ScaleUp( localWidth );\n\n    // Fill vectors with the send data\n    auto offsets = meta.sendDispls;\n    const int totalSend = meta.TotalSend();\n    std::vector<T> sendData( mpi::Pad(totalSend) );\n    const int numSends = meta.sendIdx.size();\n    for( int send=0; send<numSends; ++send )\n    {\n        const int iLoc = meta.sendIdx[send];\n        const int rank = meta.sendRanks[send];\n        \n        StridedMemCopy\n        ( &sendData[offsets[rank]], 1,\n          A.LockedBuffer(iLoc,0),   ldim, localWidth );\n        offsets[rank] += localWidth;\n    }\n\n    // Communicate all pivot rows\n    const int totalRecv = meta.TotalRecv();\n    std::vector<T> recvData( mpi::Pad(totalRecv) );\n    mpi::AllToAll\n    ( sendData.data(), meta.sendCounts.data(), meta.sendDispls.data(),\n      recvData.data(), meta.recvCounts.data(), meta.recvDispls.data(),\n      meta.comm );\n\n    // Unpack the recv data\n    offsets = meta.recvDispls;\n    const int numRecvs = meta.recvIdx.size();\n    for( int recv=0; recv<numRecvs; ++recv )\n    {\n        const int iLoc = meta.recvIdx[recv];\n        const int rank = meta.recvRanks[recv];\n        StridedMemCopy\n        ( A.Buffer(iLoc,0),         ldim,\n          &recvData[offsets[rank]], 1,    localWidth );\n        offsets[rank] += localWidth;\n    }\n}\n\ntemplate<typename T,Dist U,Dist V,Dist UPerm>\ninline void\nPermuteRows\n( DistMatrix<T,U,V>& A,\n  const DistMatrix<Int,UPerm,STAR>& perm,\n  const DistMatrix<Int,UPerm,STAR>& invPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PermuteRows\");\n        if( perm.ColAlign() != invPerm.ColAlign() )\n            LogicError(\"misaligned perm and invPerm\");\n    )\n    const Grid& g = A.Grid();\n    DistMatrix<Int,U,STAR> perm_U_STAR(g), invPerm_U_STAR(g);\n    if( U == UPerm && A.ColAlign() == perm.ColAlign() )\n    {\n        perm_U_STAR = LockedView( perm );\n        invPerm_U_STAR = LockedView( invPerm );\n    }\n    else\n    {\n        perm_U_STAR.AlignWith( A );\n        perm_U_STAR = perm;\n        invPerm_U_STAR.AlignWith( A );\n        invPerm_U_STAR = invPerm;\n    }\n        \n    if( A.Participating() )\n    {\n        PermutationMeta meta( perm_U_STAR, invPerm_U_STAR );\n        PermuteRows( A, meta );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V,Dist UPerm>\ninline void\nPermuteRows( DistMatrix<T,U,V>& A, const DistMatrix<Int,UPerm,STAR>& perm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"PermuteRows\"))\n    const Grid& g = A.Grid();\n    DistMatrix<Int,U,STAR> perm_U_STAR(g), invPerm_U_STAR(g);\n    perm_U_STAR.AlignWith( A );\n    perm_U_STAR = perm;\n    InvertPermutation( perm_U_STAR, invPerm_U_STAR );\n    PermuteRows( A, perm_U_STAR, invPerm_U_STAR );\n}\n\ntemplate<typename T,Dist U,Dist V,Dist UPerm>\ninline void\nInversePermuteRows\n( DistMatrix<T,U,V>& A, const DistMatrix<Int,UPerm,STAR>& invPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"InversePermuteRows\"))\n    const Grid& g = A.Grid();\n    DistMatrix<Int,U,STAR> perm_U_STAR(g), invPerm_U_STAR(g);\n    invPerm_U_STAR.AlignWith( A );\n    invPerm_U_STAR = invPerm;\n    InvertPermutation( invPerm_U_STAR, perm_U_STAR );\n    PermuteRows( A, perm_U_STAR, invPerm_U_STAR );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_PERMUTEROWS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/PivotsToPartialPermutation.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_PIVOTSTOPARTIALPERMUTATION_HPP\n#define ELEM_LAPACK_PIVOTSTOPARTIALPERMUTATION_HPP\n\nnamespace elem {\n\ninline void\nPivotsToPartialPermutation\n( const Matrix<Int>& pivots, Matrix<Int>& perm, Matrix<Int>& invPerm, \n  Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PivotsToPartialPermutation\");\n        if( pivots.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n    )\n\n    const Int b = pivots.Height();\n    perm.Resize( b, 1 );\n    invPerm.Resize( b, 1 );\n \n    // Assume that an O(1) number of pivots is supplied and run an algorithm\n    // which is quadratic in the number of pivots, but with a low coefficient.\n    // A log-linear algorithm with a higher coefficient is also possible.\n\n    for( Int i=0; i<b; ++i ) \n    {\n        Int k = pivots.Get(i,0) - offset;\n        for( Int j=i-1; j>=0; --j )\n        {\n            const Int relSwap = pivots.Get(j,0)-offset;\n            if( k == relSwap )\n                k = j;\n            else if( k == j )\n                k = relSwap;\n        }\n        perm.Set( i, 0, k );\n    }\n\n    for( Int i=0; i<b; ++i )\n    {\n        Int k = i;\n        for( Int j=0; j<Min(k+1,b); ++j )\n        {\n            const Int relSwap = pivots.Get(j,0)-offset;\n            if( k == relSwap )\n                k = j; \n            else if( k == j )\n                k = relSwap;\n        }\n        invPerm.Set( i, 0, k );\n    }\n}\n\ntemplate<Dist U,Dist UPerm>\ninline void\nPivotsToPartialPermutation\n( const DistMatrix<Int,U,    STAR>& pivots, \n        DistMatrix<Int,UPerm,STAR>& perm, \n        DistMatrix<Int,UPerm,STAR>& invPerm, Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PivotsToPartialPermutation\");\n        if( pivots.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n    )\n\n    const Int b = pivots.Height();\n    perm.SetGrid( pivots.Grid() );\n    invPerm.SetGrid( pivots.Grid() );\n    invPerm.AlignWith( perm );\n    invPerm.Resize( b, 1 );\n    perm.Resize( b, 1 );\n \n    // Assume that an O(1) number of pivots is supplied and run an algorithm\n    // which is quadratic in the number of pivots, but with a low coefficient.\n    // A log-linear algorithm with a higher coefficient is also possible.\n\n    for( Int i=0; i<b; ++i ) \n    {\n        Int k = pivots.Get(i,0) - offset;\n        for( Int j=i-1; j>=0; --j )\n        {\n            const Int relSwap = pivots.Get(j,0)-offset;\n            if( k == relSwap )\n                k = j;\n            else if( k == j )\n                k = relSwap;\n        }\n        perm.Set( i, 0, k );\n    }\n\n    // Construct the image using a similar algorithm.\n    for( Int i=0; i<b; ++i )\n    {\n        Int k = i;\n        for( Int j=0; j<Min(k+1,b); ++j )\n        {\n            const Int relSwap = pivots.Get(j,0)-offset;\n            if( k == relSwap )\n                k = j; \n            else if( k == j )\n                k = relSwap;\n        }\n        invPerm.Set( i, 0, k );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_PIVOTSTOPARTIALPERMUTATION_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/PivotsToPermutation.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_PIVOTSTOPERMUTATION_HPP\n#define ELEM_LAPACK_PIVOTSTOPERMUTATION_HPP\n\n#include ELEM_SWAP_INC\n#include ELEM_MAXNORM_INC\n\nnamespace elem {\n\ninline void\nPivotsToPermutation\n( const Matrix<Int>& pivots, Matrix<Int>& perm, Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PivotsToPermutation\");\n        if( pivots.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n    )\n\n    const Int n = pivots.Height();\n    if( n == 0 )\n    {\n        perm.Resize( 0, 1 );\n        return;\n    }\n \n    // Initialize to the identity permutation\n    const Int range = MaxNorm( pivots ) + 1 - offset;\n    perm.Resize( range, 1 );\n    for( Int i=0; i<range; ++i )\n        perm.Set( i, 0, i );\n\n    // Track the location of the nonzero column in each row of the permutation\n    // NOTE: Assuming that we have enough memory, it would be faster to perform\n    //       this procedure sequentially\n    for( Int i=0; i<n; ++i )\n    {\n        const Int j = pivots.Get(i,0)-offset;\n        RowSwap( perm, i, j );\n    }\n}\n\ntemplate<Dist U,Dist UPerm>\ninline void\nPivotsToPermutation\n( const DistMatrix<Int,U,STAR>& pivots, DistMatrix<Int,UPerm,STAR>& perm, \n  Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PivotsToInversePermutation\");\n        if( pivots.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n    )\n\n    const Int n = pivots.Height();\n    if( n == 0 )\n    {\n        perm.Resize( 0, 1 );\n        return;\n    }\n\n    // Initialize to the identity permutation\n    const Int range = MaxNorm( pivots ) + 1 - offset;\n    perm.SetGrid( pivots.Grid() );\n    perm.AlignWith( pivots );\n    perm.Resize( range, 1 );\n    for( Int iLoc=0; iLoc<perm.LocalHeight(); ++iLoc )\n        perm.SetLocal( iLoc, 0, perm.GlobalRow(iLoc) );\n\n    // Track the location of the nonzero column in each row of the permutation\n    // NOTE: Assuming that we have enough memory, it would be faster to perform\n    //       this procedure sequentially\n    for( Int i=0; i<n; ++i )\n    {\n        const Int j = pivots.Get(i,0)-offset;\n        RowSwap( perm, i, j );\n    }\n}\n\ninline void\nPivotsToInversePermutation\n( const Matrix<Int>& pivots, Matrix<Int>& invPerm, Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PivotsToInversePermutation\");\n        if( pivots.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n    )\n\n    const Int n = pivots.Height();\n    if( n == 0 )\n    {\n        invPerm.Resize( 0, 1 );\n        return;\n    }\n \n    // Initialize to the identity permutation\n    const Int range = MaxNorm( pivots ) + 1 - offset;\n    invPerm.Resize( range, 1 );\n    for( Int i=0; i<range; ++i )\n        invPerm.Set( i, 0, i );\n\n    // Track the location of the nonzero in each column of the permutation\n    // NOTE: Assuming that we have enough memory, it would be faster to perform\n    //       this procedure sequentially\n    for( Int i=n-1; i>=0; --i )\n    {\n        const Int j = pivots.Get(i,0)-offset;\n        RowSwap( invPerm, i, j );\n    }\n}\n\ntemplate<Dist U,Dist UPerm>\ninline void\nPivotsToInversePermutation\n( const DistMatrix<Int,U,STAR>& pivots, DistMatrix<Int,UPerm,STAR>& invPerm, \n  Int offset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PivotsToInversePermutation\");\n        if( pivots.Width() != 1 )\n            LogicError(\"pivots must be a column vector\");\n    )\n\n    const Int n = pivots.Height();\n    if( n == 0 )\n    {\n        invPerm.Resize( 0, 1 );\n        return;\n    }\n\n    // Initialize to the identity permutation\n    const Int range = MaxNorm( pivots ) + 1 - offset;\n    invPerm.SetGrid( pivots.Grid() );\n    invPerm.AlignWith( pivots );\n    invPerm.Resize( range, 1 );\n    for( Int iLoc=0; iLoc<invPerm.LocalHeight(); ++iLoc )\n        invPerm.SetLocal( iLoc, 0, invPerm.GlobalRow(iLoc) );\n\n    // Track the location of the nonzero in each column of the permutation\n    // NOTE: Assuming that we have enough memory, it would be faster to perform\n    //       this procedure sequentially\n    for( Int i=n-1; i>=0; --i )\n    {\n        const Int j = pivots.Get(i,0)-offset;\n        RowSwap( invPerm, i, j );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPACK_PIVOTSTOPERMUTATION_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PERM_DECL_HPP\n#define ELEM_PERM_DECL_HPP\n\n// NOTE: Nothing is required as of now\n\n#endif // ifndef ELEM_PERM_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PERM_IMPL_HPP\n#define ELEM_PERM_IMPL_HPP\n\n#include \"./ApplyColPivots.hpp\"\n#include \"./ApplyRowPivots.hpp\"\n#include \"./ApplySymmetricPivots.hpp\"\n#include \"./ExplicitPermutation.hpp\"\n#include \"./InvertPermutation.hpp\"\n#include \"./PermutationMeta.hpp\"\n#include \"./PermuteCols.hpp\"\n#include \"./PermuteRows.hpp\"\n#include \"./PivotsToPartialPermutation.hpp\"\n#include \"./PivotsToPermutation.hpp\"\n\n#endif // ifndef ELEM_PERM_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/perm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PERM_HPP\n#define ELEM_PERM_HPP\n\n#include \"./perm/decl.hpp\"\n#include \"./perm/impl.hpp\"\n\n#endif // ifndef ELEM_PERM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Condition/Frobenius.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONDITION_FROBENIUS_HPP\n#define ELEM_CONDITION_FROBENIUS_HPP\n\n#include ELEM_INVERSE_INC\n#include ELEM_FROBENIUSNORM_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nFrobeniusCondition( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"FrobeniusCondition\"))\n    typedef Base<F> Real;\n    Matrix<F> B( A );\n    const Real oneNorm = FrobeniusNorm( B );\n    try { Inverse( B ); }\n    catch( SingularMatrixException& e )\n    { return std::numeric_limits<Real>::infinity(); }\n    const Real oneNormInv = FrobeniusNorm( B );\n    return oneNorm*oneNormInv;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nFrobeniusCondition( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"FrobeniusCondition\"))\n    typedef Base<F> Real;\n    DistMatrix<F> B( A );\n    const Real oneNorm = FrobeniusNorm( B );\n    try { Inverse( B ); }\n    catch( SingularMatrixException& e )\n    { return std::numeric_limits<Real>::infinity(); }\n    const Real oneNormInv = FrobeniusNorm( B );\n    return oneNorm*oneNormInv;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CONDITION_FROBENIUS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Condition/Infinity.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONDITION_INFINITY_HPP\n#define ELEM_CONDITION_INFINITY_HPP\n\n#include ELEM_INVERSE_INC\n#include ELEM_INFINITYNORM_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nInfinityCondition( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"InfinityCondition\"))\n    typedef Base<F> Real;\n    Matrix<F> B( A );\n    const Real infNorm = InfinityNorm( B );\n    try { Inverse( B ); }\n    catch( SingularMatrixException& e ) \n    { return std::numeric_limits<Real>::infinity(); }\n    const Real infNormInv = InfinityNorm( B );\n    return infNorm*infNormInv;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nInfinityCondition( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"InfinityCondition\"))\n    typedef Base<F> Real;\n    DistMatrix<F> B( A );\n    const Real infNorm = InfinityNorm( B );\n    try { Inverse( B ); }\n    catch( SingularMatrixException& e ) \n    { return std::numeric_limits<Real>::infinity(); }\n    const Real infNormInv = InfinityNorm( B );\n    return infNorm*infNormInv;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CONDITION_INFINITY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Condition/Max.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONDITION_MAX_HPP\n#define ELEM_CONDITION_MAX_HPP\n\n#include ELEM_INVERSE_INC\n#include ELEM_MAXNORM_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nMaxCondition( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxCondition\"))\n    typedef Base<F> Real;\n    Matrix<F> B( A );\n    const Real maxNorm = MaxNorm( B );\n    try { Inverse( B ); }\n    catch( SingularMatrixException& e ) \n    { return std::numeric_limits<Real>::infinity(); }\n    const Real maxNormInv = MaxNorm( B );\n    return maxNorm*maxNormInv;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nMaxCondition( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxCondition\"))\n    typedef Base<F> Real;\n    DistMatrix<F> B( A );\n    const Real maxNorm = MaxNorm( B );\n    try { Inverse( B ); }\n    catch( SingularMatrixException& e ) \n    { return std::numeric_limits<Real>::infinity(); }\n    const Real maxNormInv = MaxNorm( B );\n    return maxNorm*maxNormInv;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CONDITION_MAX_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Condition/One.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONDITION_ONE_HPP\n#define ELEM_CONDITION_ONE_HPP\n\n#include ELEM_INVERSE_INC\n#include ELEM_ONENORM_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nOneCondition( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"OneCondition\"))\n    typedef Base<F> Real;\n    Matrix<F> B( A );\n    const Real oneNorm = OneNorm( B );\n    try { Inverse( B ); }\n    catch( SingularMatrixException& e ) \n    { return std::numeric_limits<Real>::infinity(); }\n    const Real oneNormInv = OneNorm( B );\n    return oneNorm*oneNormInv;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nOneCondition( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"OneCondition\"))\n    typedef Base<F> Real;\n    DistMatrix<F> B( A );\n    const Real oneNorm = OneNorm( B );\n    try { Inverse( B ); }\n    catch( SingularMatrixException& e ) \n    { return std::numeric_limits<Real>::infinity(); }\n    const Real oneNormInv = OneNorm( B );\n    return oneNorm*oneNormInv;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CONDITION_ONE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Condition/Two.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONDITION_TWO_HPP\n#define ELEM_CONDITION_TWO_HPP\n\n#include ELEM_SVD_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nTwoCondition( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TwoCondition\"))\n    typedef Base<F> R;\n    Matrix<F> B( A );\n    Matrix<R> s;\n    SVD( B, s );\n\n    R cond = 1;\n    const Int numVals = s.Height();\n    if( numVals > 0 )\n        cond = s.Get(0,0) / s.Get(numVals-1,0);\n    return cond;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nTwoCondition( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TwoCondition\"))\n    typedef Base<F> R;\n    DistMatrix<F> B( A );\n    DistMatrix<R,VR,STAR> s( A.Grid() );\n    SVD( B, s );\n\n    R cond = 1;\n    const Int numVals = s.Height();\n    if( numVals > 0 )\n        cond = s.Get(0,0) / s.Get(numVals-1,0);\n    return cond;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CONDITION_TWO_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Condition.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CONDITION_HPP\n#define ELEM_CONDITION_HPP\n\n#include \"./Condition/Frobenius.hpp\"\n#include \"./Condition/Infinity.hpp\"\n#include \"./Condition/Max.hpp\"\n#include \"./Condition/One.hpp\"\n#include \"./Condition/Two.hpp\"\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nCondition( const Matrix<F>& A, NormType type=TWO_NORM )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Condition\"))\n    Base<F> norm = 0;\n    switch( type )\n    {\n    case FROBENIUS_NORM:\n        norm = FrobeniusCondition( A );\n        break;\n    case INFINITY_NORM:\n        norm = InfinityCondition( A );\n        break;\n    case MAX_NORM:\n        norm = MaxCondition( A );\n        break;\n    case ONE_NORM:\n        norm = OneCondition( A );\n        break;\n    case TWO_NORM:\n        norm = TwoCondition( A );\n        break;\n    default:\n        LogicError(\"Invalid norm type for condition number\");\n    }\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nCondition( const DistMatrix<F,U,V>& A, NormType type=TWO_NORM )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Condition\"))\n    Base<F> norm = 0;\n    switch( type )\n    {\n    case FROBENIUS_NORM:\n        norm = FrobeniusCondition( A );\n        break;\n    case INFINITY_NORM:\n        norm = InfinityCondition( A );\n        break;\n    case MAX_NORM:\n        norm = MaxCondition( A );\n        break;\n    case ONE_NORM:\n        norm = OneCondition( A );\n        break;\n    case TWO_NORM:\n        norm = TwoCondition( A );\n        break;\n    default:\n        LogicError(\"Invalid norm type for condition number\");\n    }\n    return norm;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CONDITION_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Determinant/Cholesky.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DETERMINANT_CHOLESKY_HPP\n#define ELEM_DETERMINANT_CHOLESKY_HPP\n\n#include ELEM_CHOLESKY_INC\n\nnamespace elem {\nnamespace hpd_det {\n\ntemplate<typename F>\ninline SafeProduct<Base<F>> \nAfterCholesky( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hpd_det::AfterCholesky\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n\n    Matrix<F> d;\n    A.GetDiagonal( d );\n    SafeProduct<Real> det( n );\n    det.rho = Real(1);\n\n    const Real scale = Real(n)/Real(2);\n    for( Int i=0; i<n; ++i )\n    {\n        const Real delta = RealPart(d.Get(i,0));\n        det.kappa += Log(delta)/scale;\n    }\n\n    return det;\n}\n\ntemplate<typename F>\ninline SafeProduct<Base<F>> \nCholesky( UpperOrLower uplo, Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hpd_det::Cholesky\"))\n    SafeProduct<Base<F>> det( A.Height() );\n    try\n    {\n        elem::Cholesky( uplo, A );\n        det = hpd_det::AfterCholesky( uplo, A );\n    }\n    catch( NonHPDMatrixException& e )\n    {\n        det.rho = 0;\n        det.kappa = 0;\n    }\n    return det;\n}\n\ntemplate<typename F> \ninline SafeProduct<Base<F>> \nAfterCholesky( UpperOrLower uplo, const DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hpd_det::AfterCholesky\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    const Grid& g = A.Grid();\n\n    DistMatrix<F,MD,STAR> d(g);\n    A.GetDiagonal( d );\n    Real localKappa = 0; \n    if( d.Participating() )\n    {\n        const Real scale = Real(n)/Real(2);\n        const Int nLocalDiag = d.LocalHeight();\n        for( Int iLoc=0; iLoc<nLocalDiag; ++iLoc )\n        {\n            const Real delta = RealPart(d.GetLocal(iLoc,0));\n            localKappa += Log(delta)/scale;\n        }\n    }\n    SafeProduct<Real> det( n );\n    det.kappa = mpi::AllReduce( localKappa, g.VCComm() );\n    det.rho = Real(1);\n\n    return det;\n}\n\ntemplate<typename F> \ninline SafeProduct<Base<F>> \nCholesky( UpperOrLower uplo, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"hpd_det::Cholesky\"))\n    SafeProduct<Base<F>> det( A.Height() );\n    try\n    {\n        elem::Cholesky( uplo, A );\n        det = hpd_det::AfterCholesky( uplo, A );\n    }\n    catch( NonHPDMatrixException& e )\n    {\n        det.rho = 0;\n        det.kappa = 0;\n    }\n    return det;\n}\n\n} // namespace hpd_det\n} // namespace elem\n\n#endif // ifndef ELEM_DETERMINANT_CHOLESKY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Determinant/LUPartialPiv.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DETERMINANT_LUPARTIALPIV_HPP\n#define ELEM_DETERMINANT_LUPARTIALPIV_HPP\n\n#include ELEM_LU_INC\n#include ELEM_PERMUTATIONPARITY_INC\n\nnamespace elem {\nnamespace det {\n\ntemplate<typename F>\ninline SafeProduct<F> \nAfterLUPartialPiv( const Matrix<F>& A, const Matrix<Int>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"det::AfterLUPartialPiv\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot compute det of nonsquare matrix\");\n    if( A.Height() != pPerm.Height() )\n        LogicError(\"Permutation vector is incorrect length\");\n\n    typedef Base<F> R;\n    const Int n = A.Height();\n\n    Matrix<F> d;\n    A.GetDiagonal( d );\n    const R scale(n);\n    SafeProduct<F> det( n );\n    for( Int i=0; i<n; ++i )\n    {\n        const F delta = d.Get(i,0);\n        R alpha = Abs(delta);\n        det.rho *= delta/alpha;\n        det.kappa += Log(alpha)/scale;\n    }\n    const bool isOdd = PermutationParity( pPerm );\n    if( isOdd )\n        det.rho = -det.rho;\n\n    return det;\n}\n\ntemplate<typename F>\ninline SafeProduct<F> \nLUPartialPiv( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"det::LUPartialPiv\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot compute det of nonsquare matrix\");\n    SafeProduct<F> det( A.Height() );\n    try \n    {\n        Matrix<Int> pPerm;\n        elem::LU( A, pPerm ); \n        det = det::AfterLUPartialPiv( A, pPerm );\n    } \n    catch( SingularMatrixException& e )\n    {\n        det.rho = 0;\n        det.kappa = 0;\n    }\n    return det;\n}\n\ntemplate<typename F,Dist UPerm> \ninline SafeProduct<F> \nAfterLUPartialPiv\n( const DistMatrix<F>& A, const DistMatrix<Int,UPerm,STAR>& pPerm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"det::AfterLUPartialPiv\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot compute det of nonsquare matrix\");\n    if( A.Grid() != pPerm.Grid() )\n        LogicError(\"A and p must have the same grid\");\n    if( A.Height() != pPerm.Height() )\n        LogicError(\"Permutation vector is incorrect length\");\n\n    typedef Base<F> R;\n    const Int n = A.Height();\n    const Grid& g = A.Grid();\n\n    DistMatrix<F,MD,STAR> d(g);\n    A.GetDiagonal( d );\n    F localRho = 1;\n    R localKappa = 0; \n    if( d.Participating() )\n    {\n        const R scale(n);\n        const Int nLocalDiag = d.LocalHeight();\n        for( Int iLoc=0; iLoc<nLocalDiag; ++iLoc )\n        {\n            const F delta = d.GetLocal(iLoc,0);\n            R alpha = Abs(delta);\n            localRho *= delta/alpha;\n            localKappa += Log(alpha)/scale;\n        }\n    }\n    SafeProduct<F> det( n );\n    det.rho = mpi::AllReduce( localRho, mpi::PROD, g.VCComm() );\n    det.kappa = mpi::AllReduce( localKappa, mpi::SUM, g.VCComm() );\n\n    const bool isOdd = PermutationParity( pPerm );\n    if( isOdd )\n        det.rho = -det.rho;\n\n    return det;\n}\n\ntemplate<typename F> \ninline SafeProduct<F> \nLUPartialPiv( DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"det::LUPartialPiv\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot compute det of nonsquare matrix\");\n    SafeProduct<F> det( A.Height() );\n    try \n    {\n        DistMatrix<Int,VC,STAR> pPerm( A.Grid() );\n        elem::LU( A, pPerm );\n        det = det::AfterLUPartialPiv( A, pPerm );\n    }\n    catch( SingularMatrixException& e ) \n    {\n        det.rho = 0;\n        det.kappa = 0;\n    }\n    return det;\n}\n\n} // namespace det\n} // namespace elem\n\n#endif // ifndef ELEM_DETERMINANT_LUPARTIALPIV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Determinant.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DETERMINANT_HPP\n#define ELEM_DETERMINANT_HPP\n\n#include \"./Determinant/Cholesky.hpp\"\n#include \"./Determinant/LUPartialPiv.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline SafeProduct<F> \nSafeDeterminant( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SafeDeterminant\"))\n    Matrix<F> B( A );\n    return det::LUPartialPiv( B ); \n}\n\ntemplate<typename F>\ninline SafeProduct<F> \nSafeDeterminant( const DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SafeDeterminant\"))\n    DistMatrix<F> B( A );\n    return det::LUPartialPiv( B ); \n}\n\ntemplate<typename F>\ninline SafeProduct<Base<F>> \nSafeHPDDeterminant( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SafeHPDDeterminant\"))\n    Matrix<F> B( A );\n    return hpd_det::Cholesky( uplo, B ); \n}\n\ntemplate<typename F>\ninline SafeProduct<Base<F>> \nSafeHPDDeterminant( UpperOrLower uplo, const DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SafeHPDDeterminant\"))\n    DistMatrix<F> B( A );\n    return hpd_det::Cholesky( uplo, B ); \n}\n\ntemplate<typename F>\ninline SafeProduct<F> \nSafeDeterminant( Matrix<F>& A, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SafeDeterminant\"))\n    Matrix<F> B;\n    if( canOverwrite )\n        View( B, A );\n    else\n        B = A;\n    return det::LUPartialPiv( B ); \n}\n\ntemplate<typename F>\ninline SafeProduct<F> \nSafeDeterminant( DistMatrix<F>& A, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SafeDeterminant\"))\n    DistMatrix<F> B( A.Grid() );\n    if( canOverwrite )\n        View( B, A );\n    else\n        B = A;\n    return det::LUPartialPiv( B ); \n}\n\ntemplate<typename F>\ninline SafeProduct<Base<F>> \nSafeHPDDeterminant( UpperOrLower uplo, Matrix<F>& A, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SafeHPDDeterminant\"))\n    Matrix<F> B;\n    if( canOverwrite )\n        View( B, A );\n    else\n        B = A;\n    return hpd_det::Cholesky( uplo, B ); \n}\n\ntemplate<typename F>\ninline SafeProduct<Base<F>> \nSafeHPDDeterminant\n( UpperOrLower uplo, DistMatrix<F>& A, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SafeHPDDeterminant\"))\n    DistMatrix<F> B( A.Grid() );\n    if( canOverwrite )\n        View( B, A );\n    else\n        B = A;\n    return hpd_det::Cholesky( uplo, B ); \n}\n\ntemplate<typename F>\ninline F Determinant( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Determinant\"))\n    SafeProduct<F> safeDet = SafeDeterminant( A );\n    return safeDet.rho * Exp(safeDet.kappa*safeDet.n);\n}\n\ntemplate<typename F>\ninline F Determinant( const DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Determinant\"))\n    SafeProduct<F> safeDet = SafeDeterminant( A );\n    return safeDet.rho * Exp(safeDet.kappa*safeDet.n);\n}\n\ntemplate<typename F>\ninline Base<F> HPDDeterminant( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPDDeterminant\"))\n    SafeProduct<Base<F>> safeDet = SafeHPDDeterminant( uplo, A );\n    return Exp(safeDet.kappa*safeDet.n);\n}\n\ntemplate<typename F>\ninline Base<F> HPDDeterminant( UpperOrLower uplo, const DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPDDeterminant\"))\n    SafeProduct<Base<F>> safeDet = SafeHPDDeterminant( uplo, A );\n    return Exp(safeDet.kappa*safeDet.n);\n}\n\ntemplate<typename F>\ninline F Determinant( Matrix<F>& A, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Determinant\"))\n    SafeProduct<F> safeDet = SafeDeterminant( A, canOverwrite );\n    return safeDet.rho * Exp(safeDet.kappa*safeDet.n);\n}\n\ntemplate<typename F>\ninline F Determinant( DistMatrix<F>& A, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Determinant\"))\n    SafeProduct<F> safeDet = SafeDeterminant( A, canOverwrite );\n    return safeDet.rho * Exp(safeDet.kappa*safeDet.n);\n}\n\ntemplate<typename F>\ninline Base<F> \nHPDDeterminant( UpperOrLower uplo, Matrix<F>& A, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPDDeterminant\"))\n    SafeProduct<Base<F>> safeDet = SafeHPDDeterminant( uplo, A, canOverwrite );\n    return Exp(safeDet.kappa*safeDet.n);\n}\n\ntemplate<typename F>\ninline Base<F> \nHPDDeterminant( UpperOrLower uplo, DistMatrix<F>& A, bool canOverwrite=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPDDeterminant\"))\n    SafeProduct<Base<F>> safeDet = SafeHPDDeterminant( uplo, A, canOverwrite );\n    return Exp(safeDet.kappa*safeDet.n);\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_DETERMINANT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Inertia.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_INERTIA_HPP\n#define ELEM_INERTIA_HPP\n\n#include ELEM_LDL_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline InertiaType\nInertia( UpperOrLower uplo, Matrix<F>& A, LDLPivotType pivotType=BUNCH_PARLETT )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Inertia\"))\n    if( uplo == UPPER )\n        LogicError(\"This option not yet supported\");\n    Matrix<Int> pPerm;\n    Matrix<F> dSub;\n    ldl::Pivoted( A, dSub, pPerm, true, pivotType );\n    return ldl::Inertia( A.GetRealPartOfDiagonal(), dSub );\n}\n\ntemplate<typename F>\ninline InertiaType\nInertia\n( UpperOrLower uplo, DistMatrix<F>& A, LDLPivotType pivotType=BUNCH_PARLETT )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Inertia\"))\n    if( uplo == UPPER )\n        LogicError(\"This option not yet supported\");\n    DistMatrix<Int,VC,STAR> pPerm( A.Grid() );\n    DistMatrix<F,MD,STAR> dSub( A.Grid() );\n    ldl::Pivoted( A, dSub, pPerm, true, pivotType );\n    return ldl::Inertia( A.GetRealPartOfDiagonal(), dSub );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_INERTIA_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/Entrywise.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_ENTRYWISE_HPP\n#define ELEM_NORM_ENTRYWISE_HPP\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nEntrywiseNorm( const Matrix<F>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"EntrywiseNorm\"))\n    // TODO: Make this more numerically stable\n    typedef Base<F> R;\n    R sum = 0;\n    const Int width = A.Width();\n    const Int height = A.Height();\n    for( Int j=0; j<width; ++j )\n        for( Int i=0; i<height; ++i )\n            sum += Pow( Abs(A.Get(i,j)), p );\n    return Pow( sum, 1/p );\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianEntrywiseNorm( UpperOrLower uplo, const Matrix<F>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEntrywiseNorm\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    // TODO: make this more numerically stable\n    typedef Base<F> R;\n    R sum = 0;\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( uplo == UPPER )\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            for( Int i=0; i<j; ++i )\n            {\n                const R term = Pow( Abs(A.Get(i,j)), p );\n                if( i ==j )\n                    sum += term;\n                else\n                    sum += 2*term;\n            }\n        }\n    }\n    else\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            for( Int i=j+1; i<height; ++i )\n            {\n                const R term = Pow( Abs(A.Get(i,j)), p );\n                if( i ==j )\n                    sum += term;\n                else\n                    sum += 2*term;\n            }\n        }\n    }\n    return Pow( sum, 1/p );\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricEntrywiseNorm\n( UpperOrLower uplo, const Matrix<F>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricEntrywiseNorm\"))\n    return HermitianEntrywiseNorm( uplo, A, p );\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nEntrywiseNorm( const DistMatrix<F,U,V>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"EntrywiseNorm\"))\n    typedef Base<F> Real;\n    Real norm;\n    if( A.Participating() )\n    {\n        Real localSum = 0;\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                localSum += Pow( Abs(A.GetLocal(iLoc,jLoc)), p ); \n        const Real sum = mpi::AllReduce( localSum, A.DistComm() );\n        norm = Pow( sum, 1/p );\n    }\n    mpi::Broadcast( norm, A.Root(), A.CrossComm() );\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianEntrywiseNorm\n( UpperOrLower uplo, const DistMatrix<F,U,V>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEntrywiseNorm\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    typedef Base<F> Real;\n    Real sum;\n    if( A.Participating() )\n    {\n        Real localSum = 0;\n        const Int localWidth = A.LocalWidth();\n        if( uplo == UPPER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int numUpperRows = A.LocalRowOffset(j+1);\n                for( Int iLoc=0; iLoc<numUpperRows; ++iLoc )\n                {\n                    const Int i = A.GlobalRow(iLoc);\n                    const Real term = Pow( Abs(A.GetLocal(iLoc,jLoc)), p );\n                    if( i ==j )\n                        localSum += term;\n                    else\n                        localSum += 2*term;\n                }\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int numStrictlyUpperRows = A.LocalRowOffset(j);\n                for( Int iLoc=numStrictlyUpperRows;\n                     iLoc<A.LocalHeight(); ++iLoc )\n                {\n                    const Int i = A.GlobalRow(iLoc);\n                    const Real term = Pow( Abs(A.GetLocal(iLoc,jLoc)), p );\n                    if( i ==j )\n                        localSum += term;\n                    else\n                        localSum += 2*term;\n                }\n            }\n        }\n        sum = mpi::AllReduce( localSum, A.DistComm() );\n    }\n    mpi::Broadcast( sum, A.Root(), A.CrossComm() );\n    return Pow( sum, 1/p );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricEntrywiseNorm\n( UpperOrLower uplo, const DistMatrix<F,U,V>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricEntrywiseNorm\"))\n    return HermitianEntrywiseNorm( uplo, A, p );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_ENTRYWISE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/EntrywiseOne.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_ENTRYWISEONE_HPP\n#define ELEM_NORM_ENTRYWISEONE_HPP\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nEntrywiseOneNorm( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"EntrywiseOneNorm\"))\n    typedef Base<F> R;\n    R norm = 0;\n    const Int width = A.Width();\n    const Int height = A.Height();\n    for( Int j=0; j<width; ++j )\n        for( Int i=0; i<height; ++i )\n            norm += Abs(A.Get(i,j));\n    return norm;\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianEntrywiseOneNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEntrywiseOneNorm\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    typedef Base<F> R;\n    R norm = 0;\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( uplo == UPPER )\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            for( Int i=0; i<j; ++i )\n            {\n                const R alpha = Abs(A.Get(i,j));\n                if( i ==j )\n                    norm += alpha;\n                else\n                    norm += 2*alpha;\n            }\n        }\n    }\n    else\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            for( Int i=j+1; i<height; ++i )\n            {\n                const R alpha = Abs(A.Get(i,j));\n                if( i ==j )\n                    norm += alpha;\n                else\n                    norm += 2*alpha;\n            }\n        }\n    }\n    return norm;\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricEntrywiseOneNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricEntrywiseOneNorm\"))\n    return HermitianEntrywiseOneNorm( uplo, A );\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nEntrywiseOneNorm( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"EntrywiseOneNorm\"))\n    typedef Base<F> Real;\n    Real norm;\n    if( A.Participating() )\n    {\n        Real localSum = 0;\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                localSum += Abs(A.GetLocal(iLoc,jLoc)); \n        norm = mpi::AllReduce( localSum, A.DistComm() );\n    }\n    mpi::Broadcast( norm, A.Root(), A.CrossComm() );\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianEntrywiseOneNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEntrywiseOneNorm\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n    typedef Base<F> Real;\n    Real localSum = 0;\n    Real norm;\n    if( A.Participating() )\n    {\n        const Int localWidth = A.LocalWidth();\n        if( uplo == UPPER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int numUpperRows = A.LocalRowOffset(j+1);\n                for( Int iLoc=0; iLoc<numUpperRows; ++iLoc )\n                {\n                    const Int i = A.GlobalRow(iLoc);\n                    const Real alpha = Abs(A.GetLocal(iLoc,jLoc));\n                    if( i ==j )\n                        localSum += alpha;\n                    else\n                        localSum += 2*alpha;\n                }\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int numStrictlyUpperRows = A.LocalRowOffset(j);\n                for( Int iLoc=numStrictlyUpperRows;\n                     iLoc<A.LocalHeight(); ++iLoc )\n                {\n                    const Int i = A.GlobalRow(iLoc);\n                    const Real alpha = Abs(A.GetLocal(iLoc,jLoc));\n                    if( i ==j )\n                        localSum += alpha;\n                    else\n                        localSum += 2*alpha;\n                }\n            }\n        }\n        norm = mpi::AllReduce( localSum, A.DistComm() );\n    }\n    mpi::Broadcast( norm, A.Root(), A.CrossComm() );\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricEntrywiseOneNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricEntrywiseOneNorm\"))\n    return HermitianEntrywiseOneNorm( uplo, A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_ENTRYWISEONE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/Frobenius.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_FROBENIUS_HPP\n#define ELEM_NORM_FROBENIUS_HPP\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nFrobeniusNorm( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"FrobeniusNorm\"))\n    typedef Base<F> R;\n    R scale = 0;\n    R scaledSquare = 1;\n    const Int width = A.Width();\n    const Int height = A.Height();\n    for( Int j=0; j<width; ++j )\n    {\n        for( Int i=0; i<height; ++i )\n        {\n            const R alphaAbs = Abs(A.Get(i,j));\n            if( alphaAbs != 0 )\n            {\n                if( alphaAbs <= scale )\n                {\n                    const R relScale = alphaAbs/scale;\n                    scaledSquare += relScale*relScale;\n                }\n                else\n                {\n                    const R relScale = scale/alphaAbs;\n                    scaledSquare = scaledSquare*relScale*relScale + 1;\n                    scale = alphaAbs;\n                }\n            }\n        }\n    }\n    return scale*Sqrt(scaledSquare);\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianFrobeniusNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianFrobeniusNorm\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    typedef Base<F> R;\n    R scale = 0;\n    R scaledSquare = 1;\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( uplo == UPPER )\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            for( Int i=0; i<j; ++i )\n            {\n                const R alphaAbs = Abs(A.Get(i,j));\n                if( alphaAbs != 0 )\n                {\n                    if( alphaAbs <= scale )\n                    {\n                        const R relScale = alphaAbs/scale;\n                        scaledSquare += 2*relScale*relScale;\n                    }\n                    else\n                    {\n                        const R relScale = scale/alphaAbs;\n                        scaledSquare = scaledSquare*relScale*relScale + 2;\n                        scale = alphaAbs;\n                    }\n                }\n            }\n            const R alphaAbs = Abs(A.Get(j,j));\n            if( alphaAbs != 0 )\n            {\n                if( alphaAbs <= scale )\n                {\n                    const R relScale = alphaAbs/scale;\n                    scaledSquare += relScale*relScale;\n                }\n                else\n                {\n                    const R relScale = scale/alphaAbs;\n                    scaledSquare = scaledSquare*relScale*relScale + 1;\n                    scale = alphaAbs;\n                }\n            }\n        }\n    }\n    else\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            for( Int i=j+1; i<height; ++i )\n            {\n                const R alphaAbs = Abs(A.Get(i,j));\n                if( alphaAbs != 0 )\n                {\n                    if( alphaAbs <= scale )\n                    {\n                        const R relScale = alphaAbs/scale;\n                        scaledSquare += 2*relScale*relScale;\n                    }\n                    else\n                    {\n                        const R relScale = scale/alphaAbs;\n                        scaledSquare = scaledSquare*relScale*relScale + 2;\n                        scale = alphaAbs;\n                    }\n                }\n            }\n            const R alphaAbs = Abs(A.Get(j,j));\n            if( alphaAbs != 0 )\n            {\n                if( alphaAbs <= scale )\n                {\n                    const R relScale = alphaAbs/scale;\n                    scaledSquare += relScale*relScale;\n                }\n                else\n                {\n                    const R relScale = scale/alphaAbs;\n                    scaledSquare = scaledSquare*relScale*relScale + 1;\n                    scale = alphaAbs;\n                }\n            }\n        }\n    }\n    return scale*Sqrt(scaledSquare);\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricFrobeniusNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricFrobeniusNorm\"))\n    return HermitianFrobeniusNorm( uplo, A );\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nFrobeniusNorm( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"FrobeniusNorm\"))\n    typedef Base<F> Real;\n    Real norm;\n    if( A.Participating() )\n    {\n        Real locScale=0, locScaledSquare=1;\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Real alphaAbs = Abs(A.GetLocal(iLoc,jLoc));\n                if( alphaAbs != 0 )\n                {\n                    if( alphaAbs <= locScale )\n                    {\n                        const Real relScale = alphaAbs/locScale;\n                        locScaledSquare += relScale*relScale;\n                    }\n                    else\n                    {\n                        const Real relScale = locScale/alphaAbs;\n                        locScaledSquare = locScaledSquare*relScale*relScale + 1;\n                        locScale = alphaAbs; \n                    }\n                }\n            }\n        }\n\n        // Find the maximum relative scale\n        mpi::Comm comm = A.DistComm();\n        const Real scale = mpi::AllReduce( locScale, mpi::MAX, comm );\n\n        norm = 0;\n        if( scale != 0 )\n        {\n            // Equilibrate our local scaled sum to the maximum scale\n            Real relScale = locScale/scale;\n            locScaledSquare *= relScale*relScale;\n\n            // The scaled square is now the sum of the local contributions\n            const Real scaledSquare = mpi::AllReduce( locScaledSquare, comm );\n            norm = scale*Sqrt(scaledSquare);\n        }\n    }\n    mpi::Broadcast( norm, A.Root(), A.CrossComm() );\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianFrobeniusNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianFrobeniusNorm\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    typedef Base<F> Real;\n    Real norm;\n    if( A.Participating() )\n    {\n        Real localScale = 0;\n        Real localScaledSquare = 1;\n        const Int localWidth = A.LocalWidth();\n        if( uplo == UPPER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int numUpperRows = A.LocalRowOffset(j+1);\n                for( Int iLoc=0; iLoc<numUpperRows; ++iLoc )\n                {\n                    const Int i = A.GlobalRow(iLoc);\n                    const Real alphaAbs = Abs(A.GetLocal(iLoc,jLoc));\n                    if( alphaAbs != 0 )\n                    {\n                        if( alphaAbs <= localScale )\n                        {\n                            const Real relScale = alphaAbs/localScale;\n                            if( i != j )\n                                localScaledSquare += 2*relScale*relScale;\n                            else\n                                localScaledSquare += relScale*relScale;\n                        }\n                        else\n                        {\n                            const Real relScale = localScale/alphaAbs;\n                            if( i != j )\n                                localScaledSquare =\n                                    localScaledSquare*relScale*relScale + 2;\n                            else\n                                localScaledSquare =\n                                    localScaledSquare*relScale*relScale + 1;\n                            localScale = alphaAbs;\n                        }\n                    }\n                }\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int numStrictlyUpperRows = A.LocalRowOffset(j);\n                for( Int iLoc=numStrictlyUpperRows;\n                     iLoc<A.LocalHeight(); ++iLoc )\n                {\n                    const Int i = A.GlobalRow(iLoc);\n                    const Real alphaAbs = Abs(A.GetLocal(iLoc,jLoc));\n                    if( alphaAbs != 0 )\n                    {\n                        if( alphaAbs <= localScale )\n                        {\n                            const Real relScale = alphaAbs/localScale;\n                            if( i != j )\n                                localScaledSquare += 2*relScale*relScale;\n                            else\n                                localScaledSquare += relScale*relScale;\n                        }\n                        else\n                        {\n                            const Real relScale = localScale/alphaAbs;\n                            if( i != j )\n                                localScaledSquare =\n                                    localScaledSquare*relScale*relScale + 2;\n                            else\n                                localScaledSquare =\n                                    localScaledSquare*relScale*relScale + 1;\n                            localScale = alphaAbs;\n                        }\n                    }\n                }\n            }\n        }\n\n        // Find the maximum relative scale\n        const Real scale = mpi::AllReduce( localScale, mpi::MAX, A.DistComm() );\n\n        norm = 0;\n        if( scale != 0 )\n        {\n            // Equilibrate our local scaled sum to the maximum scale\n            Real relScale = localScale/scale;\n            localScaledSquare *= relScale*relScale;\n\n            // The scaled square is now the sum of the local contributions\n            const Real scaledSquare = \n                mpi::AllReduce( localScaledSquare, A.Grid().VCComm() );\n            norm = scale*Sqrt(scaledSquare);\n        }\n    }\n    mpi::Broadcast( norm, A.Root(), A.CrossComm() );\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricFrobeniusNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricFrobeniusNorm\"))\n    return HermitianFrobeniusNorm( uplo, A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_FROBENIUS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/Infinity.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_INFINITY_HPP\n#define ELEM_NORM_INFINITY_HPP\n\n#include ELEM_ONENORM_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nInfinityNorm( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"InfinityNorm\"))\n    typedef Base<F> R;\n    R maxRowSum = 0;\n    const Int height = A.Height();\n    const Int width = A.Width();\n    for( Int i=0; i<height; ++i )\n    {\n        R rowSum = 0;\n        for( Int j=0; j<width; ++j )\n            rowSum += Abs(A.Get(i,j));\n        maxRowSum = std::max( maxRowSum, rowSum );\n    }\n    return maxRowSum;\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianInfinityNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianInfinityNorm\"))\n    return HermitianOneNorm( uplo, A );\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricInfinityNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricInfinityNorm\"))\n    return HermitianInfinityNorm( uplo, A );\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nInfinityNorm( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"InfinityNorm\"))\n    // Compute the partial row sums defined by our local matrix, A[U,V]\n    typedef Base<F> Real;\n    Real norm;\n    if( A.Participating() )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        std::vector<Real> myPartialRowSums( localHeight );\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            myPartialRowSums[iLoc] = 0;\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                myPartialRowSums[iLoc] += Abs(A.GetLocal(iLoc,jLoc));\n        }\n\n        // Sum our partial row sums to get the row sums over A[U,* ]\n        std::vector<Real> myRowSums( localHeight );\n        mpi::AllReduce\n        ( myPartialRowSums.data(), myRowSums.data(), localHeight, A.RowComm() );\n\n        // Find the maximum out of the row sums\n        Real myMaxRowSum = 0;\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            myMaxRowSum = std::max( myMaxRowSum, myRowSums[iLoc] );\n\n        // Find the global maximum row sum by searching over the U team\n        norm = mpi::AllReduce( myMaxRowSum, mpi::MAX, A.ColComm() );\n    }\n    mpi::Broadcast( norm, A.Root(), A.CrossComm() );\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianInfinityNorm\n( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianInfinityNorm\"))\n    return HermitianOneNorm( uplo, A );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricInfinityNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricInfinityNorm\"))\n    return HermitianInfinityNorm( uplo, A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_INFINITY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/KyFan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_KYFAN_HPP\n#define ELEM_NORM_KYFAN_HPP\n\n#include ELEM_MAKESYMMETRIC_INC\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_SVD_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nKyFanNorm( const Matrix<F>& A, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"KyFanNorm\"))\n    if( k < 1 || k > Min(A.Height(),A.Width()) )\n        LogicError(\"Invalid index of KyFan norm\");\n\n    typedef Base<F> R;\n    Matrix<F> B( A );\n    Matrix<R> s;\n    SVD( B, s );\n\n    R norm = 0;\n    for( Int j=k-1; j>=0; --j )\n        norm += s.Get(j,0);\n    return norm;\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianKyFanNorm( UpperOrLower uplo, const Matrix<F>& A, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianKyFanNorm\"))\n    if( k < 1 || k > Min(A.Height(),A.Width()) )\n        LogicError(\"Invalid index of KyFan norm\");\n\n    typedef Base<F> R;\n    Matrix<F> B( A );\n    Matrix<R> s;\n    HermitianSVD( uplo, B, s );\n\n    R norm = 0;\n    for( Int j=k-1; j>=0; --j )\n        norm += s.Get(j,0);\n    return norm;\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricKyFanNorm( UpperOrLower uplo, const Matrix<F>& A, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricKyFanNorm\"))\n    if( k < 1 || k > Min(A.Height(),A.Width()) )\n        LogicError(\"Invalid index of KyFan norm\");\n\n    typedef Base<F> R;\n    Matrix<F> B( A );\n    Matrix<R> s;\n    MakeSymmetric( uplo, B );\n    SVD( B, s );\n\n    R norm = 0;\n    for( Int j=k-1; j>=0; --j )\n        norm += s.Get(j,0);\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nKyFanNorm( const DistMatrix<F,U,V>& A, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"KyFanNorm\"))\n    if( k < 1 || k > Min(A.Height(),A.Width()) )\n        LogicError(\"Invalid index of KyFan norm\");\n\n    typedef Base<F> R;\n    DistMatrix<F> B( A );\n    DistMatrix<R,VR,STAR> s( A.Grid() );\n    SVD( B, s );\n\n    R localNorm = 0;\n    DistMatrix<R,VR,STAR> sTop( A.Grid() );\n    LockedView( sTop, s, 0, 0, k, 1 );\n    const Int localHeight = sTop.LocalHeight();\n    for( Int j=localHeight-1; j>=0; --j )\n        localNorm += sTop.GetLocal(j,0);\n    return mpi::AllReduce( localNorm, A.Grid().VRComm() );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianKyFanNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianKyFanNorm\"))\n    if( k < 1 || k > Min(A.Height(),A.Width()) )\n        LogicError(\"Invalid index of KyFan norm\");\n\n    typedef Base<F> R;\n    DistMatrix<F> B( A );\n    DistMatrix<R,VR,STAR> s( A.Grid() );\n    HermitianSVD( uplo, B, s );\n\n    R localNorm = 0;\n    DistMatrix<R,VR,STAR> sTop( A.Grid() );\n    LockedView( sTop, s, 0, 0, k, 1 );\n    const Int localHeight = sTop.LocalHeight();\n    for( Int j=localHeight-1; j>=0; --j )\n        localNorm += sTop.GetLocal(j,0);\n    return mpi::AllReduce( localNorm, A.Grid().VRComm() );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricKyFanNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricKyFanNorm\"))\n    if( k < 1 || k > Min(A.Height(),A.Width()) )\n        LogicError(\"Invalid index of KyFan norm\");\n\n    typedef Base<F> R;\n    DistMatrix<F> B( A );\n    DistMatrix<R,VR,STAR> s( A.Grid() );\n    MakeSymmetric( uplo, B );\n    SVD( B, s );\n\n    R localNorm = 0;\n    DistMatrix<R,VR,STAR> sTop( A.Grid() );\n    LockedView( sTop, s, 0, 0, k, 1 );\n    const Int localHeight = sTop.LocalHeight();\n    for( Int j=localHeight-1; j>=0; --j )\n        localNorm += sTop.GetLocal(j,0);\n    return mpi::AllReduce( localNorm, A.Grid().VRComm() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_KYFAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/Max.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_MAX_HPP\n#define ELEM_NORM_MAX_HPP\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nMaxNorm( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxNorm\"))\n    typedef Base<F> Real;\n    Real maxAbs = 0;\n    const Int height = A.Height();\n    const Int width = A.Width();\n    for( Int j=0; j<width; ++j )\n    {\n        for( Int i=0; i<height; ++i )\n        {\n            const Real thisAbs = Abs(A.Get(i,j));\n            maxAbs = std::max( maxAbs, thisAbs );\n        }\n    }\n    return maxAbs;\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianMaxNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianMaxNorm\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    typedef Base<F> Real;\n    Real maxAbs = 0;\n    const Int height = A.Height();\n    const Int width = A.Width();\n    if( uplo == UPPER )\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            for( Int i=0; i<=j; ++i )\n            {\n                const Real thisAbs = Abs(A.Get(i,j));\n                maxAbs = std::max( maxAbs, thisAbs );\n            }\n        }\n    }\n    else\n    {\n        for( Int j=0; j<width; ++j )\n        {\n            for( Int i=j; i<height; ++i )\n            {\n                const Real thisAbs = Abs(A.Get(i,j));\n                maxAbs = std::max( maxAbs, thisAbs );\n            }\n        }\n    }\n    return maxAbs;\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricMaxNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricMaxNorm\"))\n    return HermitianMaxNorm( uplo, A );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nMaxNorm( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxNorm\"))\n    typedef Base<F> Real;\n    Real norm=0;\n    if( A.Participating() )\n    {\n        Real localMaxAbs = 0;\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Real thisAbs = Abs(A.GetLocal(iLoc,jLoc));\n                localMaxAbs = std::max( localMaxAbs, thisAbs );\n            }\n        }\n        norm = mpi::AllReduce( localMaxAbs, mpi::MAX, A.DistComm() );\n    }\n    mpi::Broadcast( norm, A.Root(), A.CrossComm() );\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianMaxNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianMaxNorm\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square.\");\n\n    typedef Base<F> Real;\n    Real norm;\n    if( A.Participating() )\n    {\n        Real localMaxAbs = 0;\n        const Int localWidth = A.LocalWidth();\n        if( uplo == UPPER )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int numUpperRows = A.LocalRowOffset(j+1);\n                for( Int iLoc=0; iLoc<numUpperRows; ++iLoc )\n                {\n                    const Real thisAbs = Abs(A.GetLocal(iLoc,jLoc));\n                    localMaxAbs = std::max( localMaxAbs, thisAbs );\n                }\n            }\n        }\n        else\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int numStrictlyUpperRows = A.LocalRowOffset(j);\n                for( Int iLoc=numStrictlyUpperRows;\n                     iLoc<A.LocalHeight(); ++iLoc )\n                {\n                    const Real thisAbs = Abs(A.GetLocal(iLoc,jLoc));\n                    localMaxAbs = std::max( localMaxAbs, thisAbs );\n                }\n            }\n        }\n        norm = mpi::AllReduce( localMaxAbs, mpi::MAX, A.DistComm() );\n    }\n    mpi::Broadcast( norm, A.Root(), A.CrossComm() );\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricMaxNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricMaxNorm\"))\n    return HermitianMaxNorm( uplo, A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_MAX_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/Nuclear.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_NUCLEAR_HPP\n#define ELEM_NORM_NUCLEAR_HPP\n\n#include ELEM_SCHATTENNORM_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nNuclearNorm( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"NuclearNorm\"))\n    return SchattenNorm( A, Base<F>(1) );\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianNuclearNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianNuclearNorm\"))\n    return HermitianSchattenNorm( uplo, A, Base<F>(1) );\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricNuclearNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricNuclearNorm\"))\n    return SymmetricSchattenNorm( uplo, A, Base<F>(1) );\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nNuclearNorm( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"NuclearNorm\"))\n    return SchattenNorm( A, Base<F>(1) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianNuclearNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianNuclearNorm\"))\n    return HermitianSchattenNorm( uplo, A, Base<F>(1) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricNuclearNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricNuclearNorm\"))\n    return SymmetricSchattenNorm( uplo, A, Base<F>(1) );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_NUCLEAR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/One.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_ONE_HPP\n#define ELEM_NORM_ONE_HPP\n\nnamespace elem {\n\ntemplate<typename F>\ninline Base<F>\nOneNorm( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"OneNorm\"))\n    typedef Base<F> R;\n    R maxColSum = 0;\n    const Int height = A.Height();\n    const Int width = A.Width();\n    for( Int j=0; j<width; ++j )\n    {\n        R colSum = 0;\n        for( Int i=0; i<height; ++i )\n            colSum += Abs(A.Get(i,j));\n        maxColSum = std::max( maxColSum, colSum );\n    }\n    return maxColSum;\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianOneNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianOneNorm\"))\n    typedef Base<F> R;\n    if( A.Height() != A.Width() )\n        RuntimeError(\"Hermitian matrices must be square.\");\n    R maxColSum = 0;\n    const Int height = A.Height();\n    if( uplo == UPPER )\n    {\n        for( Int j=0; j<height; ++j )\n        {\n            R colSum = 0;\n            for( Int i=0; i<=j; ++i )\n                colSum += Abs(A.Get(i,j));\n            for( Int i=j+1; i<height; ++i )\n                colSum += Abs(A.Get(j,i));\n            maxColSum = std::max( maxColSum, colSum );\n        }\n    }\n    else\n    {\n        for( Int j=0; j<height; ++j )\n        {\n            R colSum = 0;\n            for( Int i=0; i<j; ++i )\n                colSum += Abs(A.Get(j,i));\n            for( Int i=j; i<height; ++i )\n                colSum += Abs(A.Get(i,j));\n            maxColSum = std::max( maxColSum, colSum );\n        }\n    }\n    return maxColSum;\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricOneNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricOneNorm\"))\n    return HermitianOneNorm( uplo, A );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nOneNorm( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"OneNorm\"))\n    typedef Base<F> Real;\n    Real norm;\n    if( A.Participating() )\n    {\n        // Compute the partial column sums defined by our local matrix, A[U,V]\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        std::vector<Real> myPartialColSums( localWidth );\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            myPartialColSums[jLoc] = 0;\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                myPartialColSums[jLoc] += Abs(A.GetLocal(iLoc,jLoc));\n        }\n\n        // Sum our partial column sums to get the column sums over A[* ,V]\n        std::vector<Real> myColSums( localWidth );\n        mpi::AllReduce\n        ( myPartialColSums.data(), myColSums.data(), localWidth, A.ColComm() );\n\n        // Find the maximum out of the column sums\n        Real myMaxColSum = 0;\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            myMaxColSum = std::max( myMaxColSum, myColSums[jLoc] );\n\n        // Find the global maximum column sum by searching the row team\n        norm = mpi::AllReduce( myMaxColSum, mpi::MAX, A.RowComm() );\n    }\n    mpi::Broadcast( norm, A.Root(), A.CrossComm() );\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianOneNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianOneNorm\"))\n    typedef Base<F> R;\n    if( A.Height() != A.Width() )\n        RuntimeError(\"Hermitian matrices must be square.\");\n    const Int height = A.Height();\n\n    // For now, we take the 'easy' approach to exploiting the implicit symmetry\n    // by storing all of the column sums of the triangular matrix and the \n    // row sums of the strictly triangular matrix. We can then add them.\n\n    R maxColSum = 0;\n    if( A.Participating() )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        if( uplo == UPPER )\n        {\n            std::vector<R> myPartialUpperColSums( localWidth ),\n                           myPartialStrictlyUpperRowSums( localHeight );\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int numUpperRows = A.LocalRowOffset(j+1);\n                myPartialUpperColSums[jLoc] = 0;\n                for( Int iLoc=0; iLoc<numUpperRows; ++iLoc )\n                    myPartialUpperColSums[jLoc] +=\n                        Abs(A.GetLocal(iLoc,jLoc));\n            }\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                const Int numLowerCols = A.LocalColOffset(i+1);\n                myPartialStrictlyUpperRowSums[iLoc] = 0;\n                for( Int jLoc=numLowerCols; jLoc<localWidth; ++jLoc )\n                    myPartialStrictlyUpperRowSums[iLoc] +=\n                        Abs(A.GetLocal(iLoc,jLoc));\n            }\n\n            // Just place the sums into their appropriate places in a vector an \n            // AllReduce sum to get the results. This isn't optimal, but it \n            // should be good enough.\n            std::vector<R> partialColSums( height, 0 );\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                partialColSums[j] = myPartialUpperColSums[jLoc];\n            }\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                partialColSums[i] += myPartialStrictlyUpperRowSums[iLoc];\n            }\n            std::vector<R> colSums( height );\n            mpi::AllReduce\n            ( partialColSums.data(), colSums.data(), height, A.DistComm() );\n\n            // Find the maximum sum\n            for( Int j=0; j<height; ++j )\n                maxColSum = std::max( maxColSum, colSums[j] );\n        }\n        else\n        {\n            std::vector<R> myPartialLowerColSums( localWidth ),\n                           myPartialStrictlyLowerRowSums( localHeight );\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                const Int numStrictlyUpperRows = A.LocalRowOffset(j);\n                myPartialLowerColSums[jLoc] = 0;\n                for( Int iLoc=numStrictlyUpperRows; iLoc<localHeight; ++iLoc )\n                    myPartialLowerColSums[jLoc] += Abs(A.GetLocal(iLoc,jLoc));\n            }\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                const Int numStrictlyLowerCols = A.LocalColOffset(i);\n                myPartialStrictlyLowerRowSums[iLoc] = 0;\n                for( Int jLoc=0; jLoc<numStrictlyLowerCols; ++jLoc )\n                    myPartialStrictlyLowerRowSums[iLoc] +=\n                        Abs(A.GetLocal(iLoc,jLoc));\n            }\n\n            // Just place the sums into their appropriate places in a vector an \n            // AllReduce sum to get the results. This isn't optimal, but it \n            // should be good enough.\n            std::vector<R> partialColSums( height, 0 );\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const Int j = A.GlobalCol(jLoc);\n                partialColSums[j] = myPartialLowerColSums[jLoc];\n            }\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                partialColSums[i] += myPartialStrictlyLowerRowSums[iLoc];\n            }\n            std::vector<R> colSums( height );\n            mpi::AllReduce\n            ( partialColSums.data(), colSums.data(), height, A.DistComm() );\n\n            // Find the maximum sum\n            for( Int j=0; j<height; ++j )\n                maxColSum = std::max( maxColSum, colSums[j] );\n        }\n    }\n    mpi::Broadcast( maxColSum, A.Root(), A.CrossComm() );\n    return maxColSum;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricOneNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricOneNorm\"))\n    return HermitianOneNorm( uplo, A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_ONE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/Schatten.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_SCHATTEN_HPP\n#define ELEM_NORM_SCHATTEN_HPP\n\n#include ELEM_MAKESYMMETRIC_INC\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_SVD_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nSchattenNorm( const Matrix<F>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SchattenNorm\"))\n    typedef Base<F> R;\n    Matrix<F> B( A );\n    Matrix<R> s;\n    SVD( B, s );\n\n    // TODO: Think of how to make this more stable\n    const Int k = s.Height();\n    R sum = 0;\n    for( Int j=k-1; j>=0; --j )\n        sum += Pow( s.Get(j,0), p ); \n    return Pow( sum, 1/p ); \n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianSchattenNorm\n( UpperOrLower uplo, const Matrix<F>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSchattenNorm\"))\n    typedef Base<F> R;\n    Matrix<F> B( A );\n    Matrix<R> s;\n    HermitianSVD( uplo, B, s );\n\n    // TODO: Think of how to make this more stable\n    const Int k = s.Height();\n    R sum = 0;\n    for( Int j=k-1; j>=0; --j )\n        sum += Pow( s.Get(j,0), p );\n    return Pow( sum, 1/p );\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricSchattenNorm\n( UpperOrLower uplo, const Matrix<F>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricSchattenNorm\"))\n    typedef Base<F> R;\n    Matrix<F> B( A );\n    Matrix<R> s;\n    MakeSymmetric( uplo, B );\n    SVD( B, s );\n\n    // TODO: Think of how to make this more stable\n    const Int k = s.Height();\n    R sum = 0;\n    for( Int j=0; j<k; ++j )\n        sum += Pow( s.Get(j,0), p );\n    return Pow( sum, 1/p );\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nSchattenNorm( const DistMatrix<F,U,V>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SchattenNorm\"))\n    typedef Base<F> R;\n    DistMatrix<F> B( A );\n    DistMatrix<R,VR,STAR> s( A.Grid() );\n    SVD( B, s );\n\n    // TODO: Think of how to make this more stable\n    const Int kLocal = s.LocalHeight();\n    R localSum = 0;\n    for( Int j=kLocal-1; j>=0; --j ) \n        localSum += Pow( s.GetLocal(j,0), p );\n    const R sum = mpi::AllReduce( localSum, A.Grid().VRComm() );\n    return Pow( sum, 1/p );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianSchattenNorm\n( UpperOrLower uplo, const DistMatrix<F,U,V>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSchattenNorm\"))\n    typedef Base<F> R;\n    DistMatrix<F> B( A );\n    DistMatrix<R,VR,STAR> s( A.Grid() );\n    HermitianSVD( uplo, B, s );\n\n    // TODO: Think of how to make this more stable\n    const Int kLocal = s.LocalHeight();\n    R localSum = 0;\n    for( Int j=kLocal-1; j>=0; --j )\n        localSum += Pow( s.GetLocal(j,0), p );\n    const R sum = mpi::AllReduce( localSum, A.Grid().VRComm() );\n    return Pow( sum, 1/p );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricSchattenNorm\n( UpperOrLower uplo, const DistMatrix<F,U,V>& A, Base<F> p )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricSchattenNorm\"))\n    typedef Base<F> R;\n    DistMatrix<F> B( A );\n    DistMatrix<R,VR,STAR> s( A.Grid() );\n    MakeSymmetric( uplo, B );\n    SVD( B, s );\n\n    // TODO: Think of how to make this more stable\n    const Int kLocal = s.LocalHeight();\n    R localSum = 0;\n    for( Int j=0; j<kLocal; ++j )\n        localSum += Pow( s.GetLocal(j,0), p );\n    const R sum = mpi::AllReduce( localSum, A.Grid().VRComm() );\n    return Pow( sum, 1/p );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_SCHATTEN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/Two.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_TWO_HPP\n#define ELEM_NORM_TWO_HPP\n\n#include ELEM_MAKESYMMETRIC_INC\n\n#include ELEM_INFINITYNORM_INC\n#include ELEM_MAXNORM_INC\n\n#include ELEM_SVD_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline Base<F>\nTwoNorm( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TwoNorm\"))\n    typedef Base<F> R;\n    Matrix<F> B( A );\n    Matrix<R> s;\n    SVD( B, s );\n    return InfinityNorm( s );\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianTwoNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTwoNorm\"))\n    typedef Base<F> R;\n    Matrix<F> B( A );\n    Matrix<R> s;\n    HermitianSVD( uplo, B, s );\n    return InfinityNorm( s );\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricTwoNorm( UpperOrLower uplo, const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricTwoNorm\"))\n    typedef Base<F> R;\n    Matrix<F> B( A );\n    Matrix<R> s;\n    MakeSymmetric( uplo, B );\n    SVD( B, s );\n    return MaxNorm( s );\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nTwoNorm( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TwoNorm\"))\n    typedef Base<F> R;\n    DistMatrix<F> B( A );\n    DistMatrix<R,VR,STAR> s( A.Grid() );\n    SVD( B, s );\n    return InfinityNorm( s );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianTwoNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTwoNorm\"))\n    typedef Base<F> R;\n    DistMatrix<F,U,V> B( A );\n    DistMatrix<R,VR,STAR> s( A.Grid() );\n    HermitianSVD( uplo, B, s );\n    return InfinityNorm( s );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricTwoNorm( UpperOrLower uplo, const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricTwoNorm\"))\n    typedef Base<F> R;\n    DistMatrix<F,U,V> B( A );\n    DistMatrix<R,VR,STAR> s( A.Grid() );\n    MakeSymmetric( uplo, B );\n    SVD( B, s );\n    return MaxNorm( s );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_TWO_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/TwoEstimate.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_TWOESTIMATE_HPP\n#define ELEM_NORM_TWOESTIMATE_HPP\n\n#include ELEM_GEMV_INC\n#include ELEM_SYMV_INC\n#include ELEM_HEMV_INC\n\n#include ELEM_FROBENIUSNORM_INC\n\n#include ELEM_GAUSSIAN_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline Base<F>\nTwoNormEstimate( const Matrix<F>& A, Base<F> tol=1e-6, Int maxIts=1000 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TwoNormEstimate\"))\n    typedef Base<F> Real;\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    Matrix<F> x, y;\n    Gaussian( y, n, 1 );\n    \n    Int numIts=0;\n    Real estimate=0, lastEst;\n    do\n    {\n        lastEst = estimate;\n        Gemv( NORMAL, F(1), A, y, x );\n        Real xNorm = FrobeniusNorm( x );\n        if( xNorm == Real(0) )\n        {\n            Gaussian( x, m, 1 );    \n            xNorm = FrobeniusNorm( x );\n        }\n        Scale( Real(1)/xNorm, x );\n        Gemv( ADJOINT, F(1), A, x, y );\n        estimate = FrobeniusNorm( y );\n    } while( ++numIts < maxIts && Abs(estimate-lastEst) > tol*Max(m,n) );\n\n    if( Abs(estimate-lastEst) > tol*Max(m,n) )\n        RuntimeError(\"Two-norm estimate did not converge in time\");\n\n    return estimate;\n}\n\ntemplate<typename F>\ninline Base<F>\nTwoNormEstimate( const DistMatrix<F>& A, Base<F> tol=1e-6, Int maxIts=1000 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TwoNormEstimate\"))\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n\n    DistMatrix<F> x(g), y(g);\n    Gaussian( y, n, 1 );\n    \n    Int numIts=0;\n    Real estimate=0, lastEst;\n    do\n    {\n        lastEst = estimate;\n        Gemv( NORMAL, F(1), A, y, x );\n        Real xNorm = FrobeniusNorm( x );\n        if( xNorm == Real(0) )\n        {\n            Gaussian( x, m, 1 );    \n            xNorm = FrobeniusNorm( x );\n        }\n        Scale( Real(1)/xNorm, x );\n        Gemv( ADJOINT, F(1), A, x, y );\n        estimate = FrobeniusNorm( y );\n    } while( ++numIts < maxIts && Abs(estimate-lastEst) > tol*Max(m,n) );\n\n    if( Abs(estimate-lastEst) > tol*Max(m,n) )\n        RuntimeError(\"Two-norm estimate did not converge in time\");\n\n    return estimate;\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianTwoNormEstimate\n( UpperOrLower uplo, const Matrix<F>& A, Base<F> tol=1e-6, Int maxIts=1000 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTwoNormEstimate\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n\n    Matrix<F> x, y;\n    Zeros( x, n, 1 );\n    Gaussian( y, n, 1 );\n    \n    Int numIts=0;\n    Real estimate=0, lastEst;\n    do\n    {\n        lastEst = estimate;\n        Hemv( uplo, F(1), A, y, F(0), x );\n        Real xNorm = FrobeniusNorm( x );\n        if( xNorm == Real(0) )\n        {\n            Gaussian( x, n, 1 );    \n            xNorm = FrobeniusNorm( x );\n        }\n        Scale( Real(1)/xNorm, x );\n        Hemv( uplo, F(1), A, x, F(0), y );\n        estimate = FrobeniusNorm( y );\n    } while( ++numIts < maxIts && Abs(estimate-lastEst) > tol*n );\n\n    if( Abs(estimate-lastEst) > tol*n )\n        RuntimeError(\"Two-norm estimate did not converge in time\");\n\n    return estimate;\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianTwoNormEstimate\n( UpperOrLower uplo, const DistMatrix<F>& A, Base<F> tol=1e-6, Int maxIts=1000 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTwoNormEstimate\"))\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n\n    DistMatrix<F> x(g), y(g);\n    Zeros( x, n, 1 );\n    Gaussian( y, n, 1 );\n    \n    Int numIts=0;\n    Real estimate=0, lastEst;\n    do\n    {\n        lastEst = estimate;\n        Hemv( uplo, F(1), A, y, F(0), x );\n        Real xNorm = FrobeniusNorm( x );\n        if( xNorm == Real(0) )\n        {\n            Gaussian( x, n, 1 );    \n            xNorm = FrobeniusNorm( x );\n        }\n        Scale( Real(1)/xNorm, x );\n        Hemv( uplo, F(1), A, x, F(0), y );\n        estimate = FrobeniusNorm( y );\n    } while( ++numIts < maxIts && Abs(estimate-lastEst) > tol*n );\n\n    if( Abs(estimate-lastEst) > tol*n )\n        RuntimeError(\"Two-norm estimate did not converge in time\");\n\n    return estimate;\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricTwoNormEstimate\n( UpperOrLower uplo, const Matrix<F>& A, Base<F> tol=1e-6, Int maxIts=1000 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricTwoNormEstimate\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n\n    Matrix<F> x, y;\n    Zeros( x, n, 1 );\n    Gaussian( y, n, 1 );\n    \n    Int numIts=0;\n    Real estimate=0, lastEst;\n    do\n    {\n        lastEst = estimate;\n        Symv( uplo, F(1), A, y, F(0), x );\n        Real xNorm = FrobeniusNorm( x );\n        if( xNorm == Real(0) )\n        {\n            Gaussian( x, n, 1 );    \n            xNorm = FrobeniusNorm( x );\n        }\n        Scale( Real(1)/xNorm, x );\n        Conjugate( x );\n        Symv( uplo, F(1), A, x, F(0), y );\n        Conjugate( y );\n        estimate = FrobeniusNorm( y );\n    } while( ++numIts < maxIts && Abs(estimate-lastEst) > tol*n );\n\n    if( Abs(estimate-lastEst) > tol*n )\n        RuntimeError(\"Two-norm estimate did not converge in time\");\n\n    return estimate;\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricTwoNormEstimate\n( UpperOrLower uplo, const DistMatrix<F>& A, Base<F> tol=1e-6, Int maxIts=1000 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricTwoNormEstimate\"))\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n\n    DistMatrix<F> x(g), y(g);\n    Zeros( x, n, 1 );\n    Gaussian( y, n, 1 );\n    \n    Int numIts=0;\n    Real estimate=0, lastEst;\n    do\n    {\n        lastEst = estimate;\n        Symv( uplo, F(1), A, y, F(0), x );\n        Real xNorm = FrobeniusNorm( x );\n        if( xNorm == Real(0) )\n        {\n            Gaussian( x, n, 1 );    \n            xNorm = FrobeniusNorm( x );\n        }\n        Scale( Real(1)/xNorm, x );\n        Conjugate( x );\n        Symv( uplo, F(1), A, x, F(0), y );\n        Conjugate( y );\n        estimate = FrobeniusNorm( y );\n    } while( ++numIts < maxIts && Abs(estimate-lastEst) > tol*n );\n\n    if( Abs(estimate-lastEst) > tol*n )\n        RuntimeError(\"Two-norm estimate did not converge in time\");\n\n    return estimate;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_TWOESTIMATE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm/Zero.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_ZERO_HPP\n#define ELEM_NORM_ZERO_HPP\n\n// The number of nonzeros in a matrix isn't really a norm...but it's useful\n\nnamespace elem {\n\ntemplate<typename F>\ninline Int\nZeroNorm( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ZeroNorm\"))\n    Int numNonzeros = 0;\n    const Int height = A.Height();\n    const Int width = A.Width();\n    for( Int j=0; j<width; ++j )\n        for( Int i=0; i<height; ++i )\n            if( Abs(A.Get(i,j)) > 0 )\n                ++numNonzeros;\n    return numNonzeros;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Int\nZeroNorm( const DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ZeroNorm\"))\n    Int numNonzeros;\n    if( A.Participating() )\n    {\n        const Int numLocalNonzeros = ZeroNorm( A.LockedMatrix() );\n        numNonzeros = mpi::AllReduce( numLocalNonzeros, A.DistComm() );\n    }\n    mpi::Broadcast( numNonzeros, A.Root(), A.CrossComm() );\n    return numNonzeros;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_ZERO_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Norm.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORM_HPP\n#define ELEM_NORM_HPP\n\n#include \"./Norm/Entrywise.hpp\"\n#include \"./Norm/EntrywiseOne.hpp\"\n#include \"./Norm/Frobenius.hpp\"\n#include \"./Norm/Infinity.hpp\"\n#include \"./Norm/KyFan.hpp\"\n#include \"./Norm/Max.hpp\"\n#include \"./Norm/One.hpp\"\n\n#include \"./Norm/Nuclear.hpp\"\n#include \"./Norm/Two.hpp\"\n\n#include \"./Norm/TwoEstimate.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\ninline Base<F>\nNorm( const Matrix<F>& A, NormType type=FROBENIUS_NORM )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Norm\"))\n    Base<F> norm = 0;\n    switch( type )\n    {\n    // The following norms are rather cheap to compute\n    case ENTRYWISE_ONE_NORM:\n        norm = EntrywiseOneNorm( A );\n        break;\n    case FROBENIUS_NORM: \n        norm = FrobeniusNorm( A );\n        break;\n    case INFINITY_NORM:\n        norm = InfinityNorm( A );\n        break;\n    case MAX_NORM:\n        norm = MaxNorm( A );\n        break;\n    case ONE_NORM:\n        norm = OneNorm( A );\n        break;\n    // The following two norms make use of an SVD\n    case NUCLEAR_NORM:\n        norm = NuclearNorm( A );\n        break;\n    case TWO_NORM:\n        norm = TwoNorm( A );\n        break;\n    }\n    return norm;\n}\n\ntemplate<typename F>\ninline Base<F>\nSymmetricNorm\n( UpperOrLower uplo, const Matrix<F>& A, NormType type=FROBENIUS_NORM )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricNorm\"))\n    Base<F> norm = 0;\n    switch( type )\n    {\n    // The following norms are rather cheap to compute\n    case FROBENIUS_NORM:\n        norm = SymmetricFrobeniusNorm( uplo, A );\n        break;\n    case ENTRYWISE_ONE_NORM:\n        norm = SymmetricEntrywiseOneNorm( uplo, A );\n        break;\n    case INFINITY_NORM:\n        norm = SymmetricInfinityNorm( uplo, A );\n        break;\n    case MAX_NORM:\n        norm = SymmetricMaxNorm( uplo, A );\n        break;\n    case ONE_NORM:\n        norm = SymmetricOneNorm( uplo, A );\n        break;\n    // The following norms make use of an SVD\n    case NUCLEAR_NORM:\n        norm = SymmetricNuclearNorm( uplo, A );\n        break;\n    case TWO_NORM:\n        norm = SymmetricTwoNorm( uplo, A );\n        break;\n    }\n    return norm;\n}\n\ntemplate<typename F>\ninline Base<F>\nHermitianNorm\n( UpperOrLower uplo, const Matrix<F>& A, NormType type=FROBENIUS_NORM )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianNorm\"))\n    Base<F> norm = 0;\n    switch( type )\n    {\n    // The following norms are rather cheap to compute\n    case FROBENIUS_NORM:\n        norm = HermitianFrobeniusNorm( uplo, A );\n        break;\n    case ENTRYWISE_ONE_NORM:\n        norm = HermitianEntrywiseOneNorm( uplo, A );\n        break;\n    case INFINITY_NORM:\n        norm = HermitianInfinityNorm( uplo, A );\n        break;\n    case MAX_NORM:\n        norm = HermitianMaxNorm( uplo, A );\n        break;\n    case ONE_NORM:\n        norm = HermitianOneNorm( uplo, A );\n        break;\n    // The following norms make use of an SVD\n    case NUCLEAR_NORM:\n        norm = HermitianNuclearNorm( uplo, A );\n        break;\n    case TWO_NORM:\n        norm = HermitianTwoNorm( uplo, A );\n        break;\n    }\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline Base<F>\nNorm( const DistMatrix<F,U,V>& A, NormType type=FROBENIUS_NORM )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Norm\"))\n    Base<F> norm = 0;\n    switch( type )\n    {\n    // The following norms are rather cheap to compute\n    case FROBENIUS_NORM: \n        norm = FrobeniusNorm( A );\n        break;\n    case ENTRYWISE_ONE_NORM:\n        norm = EntrywiseOneNorm( A );\n        break;\n    case INFINITY_NORM:\n        norm = InfinityNorm( A );\n        break;\n    case MAX_NORM:\n        norm = MaxNorm( A );\n        break;\n    case ONE_NORM:\n        norm = OneNorm( A );\n        break;\n    // The following norms make use of an SVD\n    case NUCLEAR_NORM:\n        norm = NuclearNorm( A );\n        break;\n    case TWO_NORM:\n        norm = TwoNorm( A );\n        break;\n    }\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nSymmetricNorm\n( UpperOrLower uplo, const DistMatrix<F,U,V>& A, NormType type=FROBENIUS_NORM )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricNorm\"))\n    Base<F> norm = 0;\n    switch( type )\n    {\n    // The following norms are rather cheap to compute\n    case FROBENIUS_NORM:\n        norm = SymmetricFrobeniusNorm( uplo, A );\n        break;\n    case ENTRYWISE_ONE_NORM:\n        norm = SymmetricEntrywiseOneNorm( uplo, A );\n        break;\n    case INFINITY_NORM:\n        norm = SymmetricInfinityNorm( uplo, A );\n        break;\n    case MAX_NORM:\n        norm = SymmetricMaxNorm( uplo, A );\n        break;\n    case ONE_NORM:\n        norm = SymmetricOneNorm( uplo, A );\n        break;\n    // The following norms make use of an SVD\n    case NUCLEAR_NORM:\n        norm = SymmetricNuclearNorm( uplo, A );\n        break;\n    case TWO_NORM:\n        norm = SymmetricTwoNorm( uplo, A );\n        break;\n    }\n    return norm;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline Base<F>\nHermitianNorm\n( UpperOrLower uplo, const DistMatrix<F,U,V>& A, NormType type=FROBENIUS_NORM )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianNorm\"))\n    Base<F> norm = 0;\n    switch( type )\n    {\n    // The following norms are rather cheap to compute\n    case FROBENIUS_NORM:\n        norm = HermitianFrobeniusNorm( uplo, A );\n        break;\n    case ENTRYWISE_ONE_NORM:\n        norm = HermitianEntrywiseOneNorm( uplo, A );\n        break;\n    case INFINITY_NORM:\n        norm = HermitianInfinityNorm( uplo, A );\n        break;\n    case MAX_NORM:\n        norm = HermitianMaxNorm( uplo, A );\n        break;\n    case ONE_NORM:\n        norm = HermitianOneNorm( uplo, A );\n        break;\n    // The following norms make use of an SVD\n    case NUCLEAR_NORM:\n        norm = HermitianNuclearNorm( uplo, A );\n        break;\n    case TWO_NORM:\n        norm = HermitianTwoNorm( uplo, A );\n        break;\n    }\n    return norm;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Pseudospectrum/Analytic.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOSPECTRUM_ANALYTIC_HPP\n#define ELEM_PSEUDOSPECTRUM_ANALYTIC_HPP\n\n#include \"./Util.hpp\"\n\nnamespace elem {\nnamespace pspec {\n\ntemplate<typename Real>\ninline void\nAnalytic\n( const Matrix<Complex<Real>>& w, \n  const Matrix<Complex<Real>>& shifts, \n        Matrix<Real         >& invNorms,\n        SnapshotCtrl& snapCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Analytic\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = w.Height();\n    const Int numShifts = shifts.Height();\n    const Real normCap = NormCap<Real>();\n\n    Zeros( invNorms, numShifts, 1 );\n    if( n == 0 )\n        return;\n\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const C shift = shifts.Get(j,0);\n        Real minDist = Abs(shift-w.Get(0,0));\n        for( Int k=1; k<n; ++k )\n        {\n            const Real dist = Abs(shift-w.Get(k,0));\n            minDist = Min(dist,minDist);\n        }\n        Real alpha = Real(1)/minDist;\n        if( std::isnan(alpha) || alpha >= normCap )\n            alpha = normCap;\n        invNorms.Set( j, 0, alpha );\n    }\n    \n    snapCtrl.itCounts = false;\n    Matrix<Int> itCounts;\n    FinalSnapshot( invNorms, itCounts, snapCtrl );\n}\n\ntemplate<typename Real,Dist colDist,Dist rowDist>\ninline void\nAnalytic\n( const DistMatrix<Complex<Real>,colDist,rowDist>& w, \n  const DistMatrix<Complex<Real>,VR,     STAR   >& shifts, \n        DistMatrix<Real,         VR,     STAR   >& invNorms,\n        SnapshotCtrl& snapCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Analytic\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = w.Height();\n    const Int numShifts = shifts.Height();\n    const Real normCap = NormCap<Real>();\n\n    Zeros( invNorms, numShifts, 1 );\n    if( n == 0 )\n        return;\n\n    DistMatrix<C,STAR,STAR> w_STAR_STAR( w );\n\n    const Int numLocShifts = shifts.LocalHeight();\n    for( Int jLoc=0; jLoc<numLocShifts; ++jLoc )\n    {\n        const C shift = shifts.GetLocal(jLoc,0);\n        Real minDist = Abs(shift-w_STAR_STAR.GetLocal(0,0));\n        for( Int k=1; k<n; ++k )\n        {\n            const Real dist = Abs(shift-w_STAR_STAR.GetLocal(k,0));\n            minDist = Min(dist,minDist);\n        }\n        Real alpha = Real(1)/minDist;\n        if( std::isnan(alpha) || alpha >= normCap )\n            alpha = normCap;\n        invNorms.SetLocal( jLoc, 0, alpha );\n    }\n\n    snapCtrl.itCounts = false;\n    DistMatrix<Int,VR,STAR> itCounts(w.Grid());\n    FinalSnapshot( invNorms, itCounts, snapCtrl );\n}\n\n} // namespace pspec\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOSPECTRUM_ANALYTIC_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Pseudospectrum/IRA.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOSPECTRUM_IRA_HPP\n#define ELEM_PSEUDOSPECTRUM_IRA_HPP\n\n#include \"./Lanczos.hpp\"\n\nnamespace elem {\nnamespace pspec {\n\ntemplate<typename Real>\ninline void\nComputeNewEstimates\n( const std::vector<Matrix<Complex<Real>>>& HList,\n  const Matrix<Int>& activeConverged,\n  Matrix<Real>& activeEsts,\n  Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ComputeNewEstimates\"))\n    const Real normCap = NormCap<Real>();\n    const Int numShifts = activeEsts.Height();\n    if( numShifts == 0 )\n        return;\n    Matrix<Complex<Real>> H, HTL;\n    Matrix<Complex<Real>> w(n,1);\n    for( Int j=0; j<numShifts; ++j )\n    {\n        H = HList[j];\n        HTL = View( H, 0, 0, n, n );\n        if( !activeConverged.Get(j,0) )\n        {\n            if( !HasNan(HTL) )\n            {\n                lapack::HessenbergEig\n                ( n, HTL.Buffer(), HTL.LDim(), w.Buffer() );\n                Real estSquared=0;\n                for( Int k=0; k<n; ++k )\n                    if( w.GetRealPart(k,0) > estSquared )\n                        estSquared = w.GetRealPart(k,0);\n                activeEsts.Set( j, 0, Min(Sqrt(estSquared),normCap) );\n            }\n            else\n               activeEsts.Set( j, 0, normCap );\n        }\n    }\n}\n\ntemplate<typename Real>\ninline void\nComputeNewEstimates\n( const std::vector<Matrix<Complex<Real>>>& HList,\n  const DistMatrix<Int,MR,STAR>& activeConverged,\n        DistMatrix<Real,MR,STAR>& activeEsts,\n        Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ComputeNewEstimates\"))\n    ComputeNewEstimates\n    ( HList, activeConverged.LockedMatrix(), activeEsts.Matrix(), n );\n}\n\ntemplate<typename Real>\ninline void\nRestart\n( const std::vector<Matrix<Complex<Real>>>& HList,\n  const Matrix<Int>& activeConverged,\n  std::vector<Matrix<Complex<Real>>>& VList )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Restart\"))\n    const Int n = VList[0].Height();\n    const Int numShifts = VList[0].Width();\n    if( numShifts == 0 )\n        return;\n    const Int basisSize = HList[0].Width();\n    Matrix<Complex<Real>> H, HTL, Q(basisSize,basisSize);\n    Matrix<Complex<Real>> w(basisSize,1), u(n,1);\n    for( Int j=0; j<numShifts; ++j )\n    {\n        H = HList[j];\n        HTL = View( H, 0, 0, basisSize, basisSize );\n\n        if( !activeConverged.Get(j,0) )\n        {\n            if( !HasNan(HTL) )\n            {\n                // TODO: Switch to lapack::HessenbergEig\n                lapack::Eig\n                ( basisSize, HTL.Buffer(), HTL.LDim(), w.Buffer(), \n                  Q.Buffer(), Q.LDim() );\n\n                Real maxReal=0;\n                Int maxIdx=0;\n                for( Int k=0; k<basisSize; ++k )\n                {\n                    if( w.GetRealPart(k,0) > maxReal )\n                    {\n                        maxReal = w.GetRealPart(k,0);\n                        maxIdx = k;\n                    }\n                }\n\n                Zeros( u, n, 1 );\n                for( Int k=0; k<basisSize; ++k )\n                {\n                    const Matrix<Complex<Real>>& V = VList[k];\n                    auto v = LockedView( V, 0, j, n, 1 ); \n                    Axpy( Q.Get(k,maxIdx), v, u );\n                }\n                Matrix<Complex<Real>>& V = VList[0];\n                auto v = View( V, 0, j, n, 1 );\n                v = u;\n            }\n        }\n    }\n}\n\ntemplate<typename Real>\ninline void\nRestart\n( const std::vector<Matrix<Complex<Real>>>& HList,\n  const Matrix<Int>& activeConverged,\n  std::vector<Matrix<Real>>& VRealList,\n  std::vector<Matrix<Real>>& VImagList )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Restart\"))\n    const Int n = VRealList[0].Height();\n    const Int numShifts = VRealList[0].Width();\n    if( numShifts == 0 )\n        return;\n    const Int basisSize = HList[0].Width();\n    Matrix<Complex<Real>> H, HTL, Q(basisSize,basisSize);\n    Matrix<Complex<Real>> w(basisSize,1), u(n,1), v(n,1);\n    for( Int j=0; j<numShifts; ++j )\n    {\n        H = HList[j];\n        HTL = View( H, 0, 0, basisSize, basisSize );\n\n        if( !activeConverged.Get(j,0) )\n        {\n            if( !HasNan(HTL) )\n            {\n                // TODO: Switch to lapack::HessenbergEig\n                lapack::Eig\n                ( basisSize, HTL.Buffer(), HTL.LDim(), w.Buffer(), \n                  Q.Buffer(), Q.LDim() );\n\n                Real maxReal=0;\n                Int maxIdx=0;\n                for( Int k=0; k<basisSize; ++k )\n                {\n                    if( w.GetRealPart(k,0) > maxReal )\n                    {\n                        maxReal = w.GetRealPart(k,0);\n                        maxIdx = k;\n                    }\n                }\n\n                Zeros( u, n, 1 );\n                for( Int k=0; k<basisSize; ++k )\n                {\n                    const Matrix<Real>& VReal = VRealList[k];\n                    const Matrix<Real>& VImag = VImagList[k];\n                    auto vReal = LockedView( VReal, 0, j, n, 1 ); \n                    auto vImag = LockedView( VImag, 0, j, n, 1 ); \n                    for( Int i=0; i<n; ++i )\n                        v.Set( i, 0, Complex<Real>(vReal.Get(i,0),\n                                                   vImag.Get(i,0)) );\n                    Axpy( Q.Get(k,maxIdx), v, u );\n                }\n                Matrix<Real>& VReal = VRealList[0];\n                Matrix<Real>& VImag = VImagList[0];\n                auto vReal = View( VReal, 0, j, n, 1 );\n                auto vImag = View( VImag, 0, j, n, 1 );\n                for( Int i=0; i<n; ++i )\n                {\n                    vReal.Set( i, 0, u.GetRealPart(i,0) );\n                    vImag.Set( i, 0, u.GetImagPart(i,0) );\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename Real>\ninline void\nRestart\n( const std::vector<Matrix<Complex<Real>>>& HList,\n  const DistMatrix<Int,MR,STAR>& activeConverged,\n  std::vector<DistMatrix<Complex<Real>>>& VList )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Restart\"))\n    const Int basisSize = HList[0].Width();\n    std::vector<Matrix<Complex<Real>>> VLocList(basisSize+1);\n    for( Int j=0; j<basisSize+1; ++j )\n        VLocList[j] = View( VList[j].Matrix() );\n    Restart( HList, activeConverged.LockedMatrix(), VLocList );\n}\n\ntemplate<typename Real>\ninline void\nRestart\n( const std::vector<Matrix<Complex<Real>>>& HList,\n  const DistMatrix<Int,MR,STAR>& activeConverged,\n  std::vector<DistMatrix<Real>>& VRealList,\n  std::vector<DistMatrix<Real>>& VImagList )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Restart\"))\n    const Int basisSize = HList[0].Width();\n    std::vector<Matrix<Real>> VRealLocList(basisSize+1),\n                              VImagLocList(basisSize+1);\n    for( Int j=0; j<basisSize+1; ++j )\n    {\n        VRealLocList[j] = View( VRealList[j].Matrix() );\n        VImagLocList[j] = View( VImagList[j].Matrix() ); \n    }\n    Restart\n    ( HList, activeConverged.LockedMatrix(), VRealLocList, VImagLocList );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nIRA\n( const Matrix<Complex<Real>>& U, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::IRA\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = U.Height();\n    const Int numShifts = shifts.Height();\n\n    const Int maxIts = psCtrl.maxIts;\n    const Int basisSize = psCtrl.basisSize;\n    const bool deflate = psCtrl.deflate;\n    const bool progress = psCtrl.progress;\n\n    // Keep track of the number of iterations per shift\n    Matrix<Int> itCounts;\n    Ones( itCounts, numShifts, 1 );\n\n    // Keep track of the pivoting history if deflation is requested\n    Matrix<Int> preimage;\n    Matrix<C> pivShifts( shifts );\n    if( deflate )\n    {\n        preimage.Resize( numShifts, 1 );\n        for( Int j=0; j<numShifts; ++j )\n            preimage.Set( j, 0, j );\n    }\n\n    // The Hessenberg variant currently requires explicit access to the adjoint\n    Matrix<C> UAdj;\n    if( !psCtrl.schur )\n        Adjoint( U, UAdj );\n    Matrix<C> activeShiftsConj;\n\n    // Simultaneously run IRA for different shifts\n    std::vector<Matrix<C>> VList(basisSize+1), activeVList(basisSize+1);\n    for( Int j=0; j<basisSize+1; ++j )\n        Zeros( VList[j], n, numShifts );\n    Gaussian( VList[0], n, numShifts );\n    std::vector<Matrix<Complex<Real>>> HList(numShifts);\n    std::vector<Real> realComponents;\n    std::vector<Complex<Real>> components;\n\n    Matrix<Int> activeConverged;\n    Zeros( activeConverged, numShifts, 1 );\n\n    psCtrl.snapCtrl.ResetCounts();\n\n    Timer timer, subtimer;\n    Int numIts=0, numDone=0;\n    Matrix<Real> estimates(numShifts,1);\n    Zeros( estimates, numShifts, 1 );\n    Matrix<Real> lastActiveEsts;\n    Matrix<Int> activePreimage;\n    while( true )\n    {\n        const Int numActive = ( deflate ? numShifts-numDone : numShifts );\n        auto activeShifts = View( pivShifts, 0, 0, numActive, 1 );\n        auto activeEsts = View( estimates, 0, 0, numActive, 1 );\n        auto activeItCounts = View( itCounts, 0, 0, numActive, 1 );\n        for( Int j=0; j<basisSize+1; ++j )\n            activeVList[j] = View( VList[j], 0, 0, n, numActive ); \n        if( deflate )\n        {\n            activePreimage = View( preimage, 0, 0, numActive, 1 );\n            Zeros( activeConverged, numActive, 1 );\n        }\n        HList.resize( numActive );\n        for( Int j=0; j<numActive; ++j )\n            Zeros( HList[j], basisSize+1, basisSize );\n\n        if( progress )\n            timer.Start();\n        ColumnNorms( activeVList[0], realComponents );\n        InvBetaScale( realComponents, activeVList[0] );\n        for( Int j=0; j<basisSize; ++j )\n        {\n            lastActiveEsts = activeEsts;\n            activeVList[j+1] = activeVList[j];\n\n            if( psCtrl.schur )\n            {\n                if( progress )\n                    subtimer.Start();\n                MultiShiftTrsm\n                ( LEFT, UPPER, NORMAL, \n                  C(1), U, activeShifts, activeVList[j+1] );\n                MultiShiftTrsm\n                ( LEFT, UPPER, ADJOINT, \n                  C(1), U, activeShifts, activeVList[j+1] );\n                if( progress )\n                {\n                    const double msTime = subtimer.Stop();\n                    const Int numActiveShifts = activeShifts.Height();\n                    const double gflops = (8.*n*n*numActiveShifts)/(msTime*1e9);\n                    std::cout << \"  MultiShiftTrsm's: \" << msTime \n                              << \" seconds, \" << gflops << \" GFlops\" \n                              << std::endl;\n                }\n            }\n            else\n            {\n                if( progress )\n                    subtimer.Start();\n                Conjugate( activeShifts, activeShiftsConj );\n                MultiShiftHessSolve\n                ( UPPER, NORMAL, \n                  C(1), U, activeShifts, activeVList[j+1] );\n                MultiShiftHessSolve\n                ( LOWER, NORMAL, \n                  C(1), UAdj, activeShiftsConj, activeVList[j+1] );\n                if( progress )\n                {\n                    const double msTime = subtimer.Stop();\n                    const Int numActiveShifts = activeShifts.Height();\n                    const double gflops = \n                        (32.*n*n*numActiveShifts)/(msTime*1.e9);\n                    std::cout << \"  MultiShiftHessSolve's: \" << msTime\n                              << \" seconds, \" << gflops << \" GFlops\" \n                              << std::endl;\n                }\n            }\n\n            // Orthogonalize with respect to the old iterate\n            if( j > 0 )\n            {\n                ExtractList( HList, components, j, j-1 );\n                // TODO: Conjugate components?\n                PlaceList( HList, components, j-1, j );\n                ColumnSubtractions\n                ( components, activeVList[j-1], activeVList[j+1] );\n            }\n\n            // Orthogonalize with respect to the last iterate\n            InnerProducts( activeVList[j], activeVList[j+1], components );\n            PlaceList( HList, components, j, j );\n            ColumnSubtractions\n            ( components, activeVList[j], activeVList[j+1] );\n\n            // Explicitly (re)orthogonalize against all previous vectors\n            for( Int i=0; i<j-1; ++i )\n            {\n                InnerProducts\n                ( activeVList[i], activeVList[j+1], components );\n                PlaceList( HList, components, i, j );\n                ColumnSubtractions\n                ( components, activeVList[i], activeVList[j+1] );\n            }\n            if( j > 0 )\n            {\n                InnerProducts\n                ( activeVList[j-1], activeVList[j+1], components );\n                UpdateList( HList, components, j-1, j );\n                ColumnSubtractions\n                ( components, activeVList[j-1], activeVList[j+1] );\n            }\n\n            // Compute the norm of what is left\n            ColumnNorms( activeVList[j+1], realComponents );\n            PlaceList( HList, realComponents, j+1, j );\n\n            // TODO: Handle lucky breakdowns\n            InvBetaScale( realComponents, activeVList[j+1] );\n\n            ComputeNewEstimates( HList, activeConverged, activeEsts, j+1 );\n            // We will have the same estimate two iterations in a row when\n            // restarting\n            if( j != 0 ) \n                activeConverged =\n                    FindConverged\n                    ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );\n\n            psCtrl.snapCtrl.Iterate();\n        }\n        if( progress )\n            subtimer.Start();\n        Restart( HList, activeVList, activeConverged, activeEsts );\n        if( progress )\n            std::cout << \"IRA restart: \" << subtimer.Stop()\n                      << \" seconds\" << std::endl;\n\n        const Int numActiveDone = ZeroNorm( activeConverged );\n        if( deflate )\n            numDone += numActiveDone;\n        else\n            numDone = numActiveDone;\n        numIts += basisSize;\n        if( progress )\n        {\n            const double iterTime = timer.Stop();\n            std::cout << \"iteration \" << numIts << \": \" << iterTime\n                      << \" seconds, \" << numDone << \" of \" << numShifts\n                      << \" converged\" << std::endl;\n        }\n        if( numIts >= maxIts )\n            break;\n\n        if( numDone == numShifts )\n            break;\n        else if( deflate && numActiveDone != 0 )\n        {\n            Deflate\n            ( activeShifts, activePreimage, activeVList[0], activeEsts, \n              activeConverged, activeItCounts, progress );\n            lastActiveEsts = activeEsts;\n        }\n\n        // Save snapshots of the estimates at the requested rate\n        Snapshot\n        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );\n    } \n\n    invNorms = estimates;\n    if( deflate )\n        RestoreOrdering( preimage, invNorms, itCounts );\n    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );\n\n    return itCounts;\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nIRA\n( const Matrix<Real>& U, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::IRA\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = U.Height();\n    const Int numShifts = shifts.Height();\n\n    const Int maxIts = psCtrl.maxIts;\n    const Int basisSize = psCtrl.basisSize;\n    const bool deflate = psCtrl.deflate;\n    const bool progress = psCtrl.progress;\n\n    // Keep track of the number of iterations per shift\n    Matrix<Int> itCounts;\n    Ones( itCounts, numShifts, 1 );\n\n    // Keep track of the pivoting history if deflation is requested\n    Matrix<Int> preimage;\n    Matrix<C> pivShifts( shifts );\n    if( deflate )\n    {\n        preimage.Resize( numShifts, 1 );\n        for( Int j=0; j<numShifts; ++j )\n            preimage.Set( j, 0, j );\n    }\n\n    // Simultaneously run IRA for different shifts\n    std::vector<Matrix<Real>> VRealList(basisSize+1), \n                              VImagList(basisSize+1),\n                              activeVRealList(basisSize+1),\n                              activeVImagList(basisSize+1);\n    for( Int j=0; j<basisSize+1; ++j )\n    {\n        Zeros( VRealList[j], n, numShifts );\n        Zeros( VImagList[j], n, numShifts );\n    }\n    // The variance will be off from that of the usual complex case\n    Gaussian( VRealList[0], n, numShifts );\n    Gaussian( VImagList[0], n, numShifts );\n    std::vector<Matrix<Complex<Real>>> HList(numShifts);\n    std::vector<Real> realComponents;\n    std::vector<Complex<Real>> components;\n\n    Matrix<Int> activeConverged;\n    Zeros( activeConverged, numShifts, 1 );\n\n    psCtrl.snapCtrl.ResetCounts();\n\n    Timer timer, subtimer;\n    Int numIts=0, numDone=0;\n    Matrix<Real> estimates(numShifts,1);\n    Zeros( estimates, numShifts, 1 );\n    Matrix<Real> lastActiveEsts;\n    Matrix<Int> activePreimage;\n    while( true )\n    {\n        const Int numActive = ( deflate ? numShifts-numDone : numShifts );\n        auto activeShifts = View( pivShifts, 0, 0, numActive, 1 );\n        auto activeEsts = View( estimates, 0, 0, numActive, 1 );\n        auto activeItCounts = View( itCounts, 0, 0, numActive, 1 );\n        for( Int j=0; j<basisSize+1; ++j )\n        {\n            activeVRealList[j] = View( VRealList[j], 0, 0, n, numActive ); \n            activeVImagList[j] = View( VImagList[j], 0, 0, n, numActive ); \n        }\n        if( deflate )\n        {\n            activePreimage = View( preimage, 0, 0, numActive, 1 );\n            Zeros( activeConverged, numActive, 1 );\n        }\n        HList.resize( numActive );\n        for( Int j=0; j<numActive; ++j )\n            Zeros( HList[j], basisSize+1, basisSize );\n\n        if( progress )\n            timer.Start();\n        ColumnNorms( activeVRealList[0], activeVImagList[0], realComponents );\n        InvBetaScale( realComponents, activeVRealList[0] );\n        InvBetaScale( realComponents, activeVImagList[0] );\n        for( Int j=0; j<basisSize; ++j )\n        {\n            lastActiveEsts = activeEsts;\n            activeVRealList[j+1] = activeVRealList[j];\n            activeVImagList[j+1] = activeVImagList[j];\n            if( progress )\n                subtimer.Start();\n            MultiShiftQuasiTrsm\n            ( LEFT, UPPER, NORMAL, C(1), U, activeShifts, \n              activeVRealList[j+1], activeVImagList[j+1] );\n            MultiShiftQuasiTrsm\n            ( LEFT, UPPER, ADJOINT, C(1), U, activeShifts, \n              activeVRealList[j+1], activeVImagList[j+1] );\n            if( progress )\n            {\n                const double msTime = subtimer.Stop();\n                const Int numActiveShifts = activeShifts.Height();\n                const double gflops = (4.*n*n*numActiveShifts)/(msTime*1.e9);\n                std::cout << \"  MultiShiftQuasiTrsm's: \" << msTime \n                          << \" seconds, \" << gflops << \" GFlops\" << std::endl;\n            }\n\n            // Orthogonalize with respect to the old iterate\n            if( j > 0 )\n            {\n                ExtractList( HList, components, j, j-1 );\n                // TODO: Conjugate components?\n                PlaceList( HList, components, j-1, j );\n                ColumnSubtractions\n                ( components, activeVRealList[j-1], activeVImagList[j-1], \n                              activeVRealList[j+1], activeVImagList[j+1] );\n            }\n\n            // Orthogonalize with respect to the last iterate\n            InnerProducts\n            ( activeVRealList[j  ], activeVImagList[j  ],\n              activeVRealList[j+1], activeVImagList[j+1], components );\n            PlaceList( HList, components, j, j );\n            ColumnSubtractions\n            ( components, activeVRealList[j  ], activeVImagList[j  ],\n                          activeVRealList[j+1], activeVImagList[j+1] );\n\n            // Explicitly (re)orthogonalize against all previous vectors\n            for( Int i=0; i<j-1; ++i )\n            {\n                InnerProducts\n                ( activeVRealList[i  ], activeVImagList[i  ],\n                  activeVRealList[j+1], activeVImagList[j+1], components );\n                PlaceList( HList, components, i, j );\n                ColumnSubtractions\n                ( components, activeVRealList[i  ], activeVImagList[i  ],\n                              activeVRealList[j+1], activeVImagList[j+1] );\n            }\n            if( j > 0 )\n            {\n                InnerProducts\n                ( activeVRealList[j-1], activeVImagList[j-1],\n                  activeVRealList[j+1], activeVImagList[j+1], components );\n                UpdateList( HList, components, j-1, j );\n                ColumnSubtractions\n                ( components, activeVRealList[j-1], activeVImagList[j-1],\n                              activeVRealList[j+1], activeVImagList[j+1] );\n            }\n\n            // Compute the norm of what is left\n            ColumnNorms\n            ( activeVRealList[j+1], activeVImagList[j+1], realComponents );\n            PlaceList( HList, realComponents, j+1, j );\n\n            // TODO: Handle lucky breakdowns\n            InvBetaScale( realComponents, activeVRealList[j+1] );\n            InvBetaScale( realComponents, activeVImagList[j+1] );\n\n            ComputeNewEstimates( HList, activeConverged, activeEsts, j+1 );\n            // We will have the same estimate two iterations in a row when\n            // restarting\n            if( j != 0 ) \n                activeConverged =\n                    FindConverged\n                    ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );\n\n            psCtrl.snapCtrl.Iterate();\n        }\n        if( progress )\n            subtimer.Start();\n        Restart\n        ( HList, \n          activeVRealList, activeVImagList, activeConverged, activeEsts );\n        if( progress )\n            std::cout << \"IRA restart: \" << subtimer.Stop()\n                      << \" seconds\" << std::endl;\n\n        const Int numActiveDone = ZeroNorm( activeConverged );\n        if( deflate )\n            numDone += numActiveDone;\n        else\n            numDone = numActiveDone;\n        numIts += basisSize;\n        if( progress )\n        {\n            const double iterTime = timer.Stop();\n            std::cout << \"iteration \" << numIts << \": \" << iterTime\n                      << \" seconds, \" << numDone << \" of \" << numShifts\n                      << \" converged\" << std::endl;\n        }\n        if( numIts >= maxIts )\n            break;\n\n        if( numDone == numShifts )\n            break;\n        else if( deflate && numActiveDone != 0 )\n        {\n            Deflate\n            ( activeShifts, activePreimage, \n              activeVRealList[0], activeVImagList[0], activeEsts, \n              activeConverged, activeItCounts, progress );\n            lastActiveEsts = activeEsts;\n        }\n\n        // Save snapshots of the estimates at the requested rate\n        Snapshot\n        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );\n    } \n\n    invNorms = estimates;\n    if( deflate )\n        RestoreOrdering( preimage, invNorms, itCounts );\n    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );\n\n    return itCounts;\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nIRA\n( const DistMatrix<Complex<Real>        >& U, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts, \n        DistMatrix<Real,         VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::IRA\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = U.Height();\n    const Int numShifts = shifts.Height();\n    const Grid& g = U.Grid();\n\n    const Int maxIts = psCtrl.maxIts;\n    const Int basisSize = psCtrl.basisSize;\n    const bool deflate = psCtrl.deflate;\n    const bool progress = psCtrl.progress;\n\n    // Keep track of the number of iterations per shift\n    DistMatrix<Int,VR,STAR> itCounts(g);\n    Ones( itCounts, numShifts, 1 );\n\n    // Keep track of the pivoting history if deflation is requested\n    DistMatrix<Int,VR,STAR> preimage(g);\n    DistMatrix<C,  VR,STAR> pivShifts( shifts );\n    if( deflate )\n    {\n        preimage.AlignWith( shifts );\n        preimage.Resize( numShifts, 1 );\n        const Int numLocShifts = preimage.LocalHeight();\n        for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )\n        {\n            const Int i = preimage.GlobalRow(iLoc);\n            preimage.SetLocal( iLoc, 0, i );\n        }\n    }\n\n    // The Hessenberg case currently requires explicit access to the adjoint\n    DistMatrix<C,VC,STAR> U_VC_STAR(g), UAdj_VC_STAR(g);\n    DistMatrix<C,VR,STAR> activeShiftsConj(g);\n    DistMatrix<C,STAR,VR> activeV_STAR_VR(g);\n    if( !psCtrl.schur )\n    {\n        U_VC_STAR = U;\n        Adjoint( U, UAdj_VC_STAR );\n    }\n\n    // Simultaneously run IRA for different shifts\n    std::vector<DistMatrix<C>> VList(basisSize+1), activeVList(basisSize+1);\n    for( Int j=0; j<basisSize+1; ++j )\n    {\n        VList[j].SetGrid( g );\n        Zeros( VList[j], n, numShifts );\n    }\n    Gaussian( VList[0], n, numShifts );\n    const Int numMRShifts = VList[0].LocalWidth();\n    std::vector<Matrix<Complex<Real>>> HList(numMRShifts);\n    std::vector<Real> realComponents;\n    std::vector<Complex<Real>> components;\n\n    DistMatrix<Int,MR,STAR> activeConverged(g);\n    Zeros( activeConverged, numShifts, 1 );\n\n    psCtrl.snapCtrl.ResetCounts();\n\n    Timer timer, subtimer;\n    Int numIts=0, numDone=0;\n    DistMatrix<Real,MR,STAR> estimates(g), lastActiveEsts(g);\n    estimates.AlignWith( shifts );\n    Zeros( estimates, numShifts, 1 );\n    DistMatrix<Int,VR,STAR> activePreimage(g);\n    while( true )\n    {\n        const Int numActive = ( deflate ? numShifts-numDone : numShifts );\n        auto activeShifts = View( pivShifts, 0, 0, numActive, 1 );\n        auto activeEsts = View( estimates, 0, 0, numActive, 1 );\n        auto activeItCounts = View( itCounts, 0, 0, numActive, 1 );\n        for( Int j=0; j<basisSize+1; ++j )\n            activeVList[j] = View( VList[j], 0, 0, n, numActive ); \n        if( deflate )\n        {\n            activePreimage = View( preimage, 0, 0, numActive, 1 );\n            Zeros( activeConverged, numActive, 1 );\n        }\n        HList.resize( activeEsts.LocalHeight() );\n        for( Int jLoc=0; jLoc<HList.size(); ++jLoc )\n            Zeros( HList[jLoc], basisSize+1, basisSize );\n\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                timer.Start();\n        }\n        ColumnNorms( activeVList[0], realComponents );\n        InvBetaScale( realComponents, activeVList[0] );\n        for( Int j=0; j<basisSize; ++j )\n        {\n            lastActiveEsts = activeEsts;\n            activeVList[j+1] = activeVList[j];\n            if( psCtrl.schur )\n            {\n                if( progress )\n                { \n                    mpi::Barrier( g.Comm() );\n                    if( g.Rank() == 0 )\n                        subtimer.Start();\n                }\n                MultiShiftTrsm\n                ( LEFT, UPPER, NORMAL, \n                  C(1), U, activeShifts, activeVList[j+1] );\n                MultiShiftTrsm\n                ( LEFT, UPPER, ADJOINT, \n                  C(1), U, activeShifts, activeVList[j+1] );\n                if( progress )\n                {\n                    mpi::Barrier( g.Comm() );\n                    if( g.Rank() == 0 )\n                    {\n                        const double msTime = subtimer.Stop();\n                        const Int numActiveShifts = activeShifts.Height();\n                        const double gflops = \n                            (8.*n*n*numActiveShifts)/(msTime*1.e9);\n                        std::cout << \"  MultiShiftTrsm's: \" << msTime \n                                  << \" seconds, \" << gflops << \" GFlops\" \n                                  << std::endl;\n                    }\n                }\n            }\n            else\n            {\n                if( progress )\n                {\n                    mpi::Barrier( g.Comm() );\n                    if( g.Rank() == 0 )\n                        subtimer.Start();\n                }\n                // NOTE: This redistribution sequence might not be necessary\n                activeV_STAR_VR = activeVList[j+1];\n                Conjugate( activeShifts, activeShiftsConj );\n                MultiShiftHessSolve\n                ( UPPER, NORMAL, C(1), U_VC_STAR, activeShifts,\n                  activeV_STAR_VR );\n                MultiShiftHessSolve\n                ( LOWER, NORMAL, C(1), UAdj_VC_STAR, activeShiftsConj,\n                  activeV_STAR_VR );\n                activeVList[j+1] = activeV_STAR_VR;\n                if( progress )\n                {\n                    mpi::Barrier( g.Comm() );\n                    if( g.Rank() == 0 )\n                    {\n                        const double msTime = subtimer.Stop();\n                        const Int numActiveShifts = activeShifts.Height();\n                        const double gflops =\n                            (32.*n*n*numActiveShifts)/(msTime*1.e9);\n                        std::cout << \"  MultiShiftHessSolve's: \" << msTime\n                                  << \" seconds, \" << gflops << \" GFlops\"\n                                  << std::endl;\n                    }\n                }\n            }\n\n            // Orthogonalize with respect to the old iterate\n            if( j > 0 )\n            {\n                ExtractList( HList, components, j, j-1 );\n                // TODO: Conjugate components?\n                PlaceList( HList, components, j-1, j );\n                ColumnSubtractions\n                ( components, activeVList[j-1], activeVList[j+1] );\n            }\n\n            // Orthogonalize with respect to the last iterate\n            InnerProducts( activeVList[j], activeVList[j+1], components );\n            PlaceList( HList, components, j, j );\n            ColumnSubtractions\n            ( components, activeVList[j], activeVList[j+1] );\n\n            // Explicitly (re)orthogonalize against all previous vectors\n            for( Int i=0; i<j-1; ++i )\n            {\n                InnerProducts\n                ( activeVList[i], activeVList[j+1], components );\n                PlaceList( HList, components, i, j );\n                ColumnSubtractions\n                ( components, activeVList[i], activeVList[j+1] );\n            }\n            if( j > 0 )\n            {\n                InnerProducts\n                ( activeVList[j-1], activeVList[j+1], components );\n                UpdateList( HList, components, j-1, j );\n                ColumnSubtractions\n                ( components, activeVList[j-1], activeVList[j+1] );\n            }\n\n            // Compute the norm of what is left\n            ColumnNorms( activeVList[j+1], realComponents );\n            PlaceList( HList, realComponents, j+1, j );\n\n            // TODO: Handle lucky breakdowns\n            InvBetaScale( realComponents, activeVList[j+1] );\n\n            ComputeNewEstimates( HList, activeConverged, activeEsts, j+1 );\n            // We will have the same estimate two iterations in a row when\n            // restarting\n            if( j != 0 ) \n                activeConverged =\n                    FindConverged\n                    ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );\n\n            psCtrl.snapCtrl.Iterate();\n        }\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                subtimer.Start();\n        }\n        Restart( HList, activeConverged, activeVList );\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                std::cout << \"IRA computations: \" << subtimer.Stop()\n                          << \" seconds\" << std::endl;\n        }\n\n        const Int numActiveDone = ZeroNorm( activeConverged );\n        if( deflate )\n            numDone += numActiveDone;\n        else\n            numDone = numActiveDone;\n        numIts += basisSize;\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n            {\n                const double iterTime = timer.Stop();\n                std::cout << \"iteration \" << numIts << \": \" << iterTime\n                          << \" seconds, \" << numDone << \" of \" << numShifts\n                          << \" converged\" << std::endl;\n            }\n        }\n        if( numIts >= maxIts )\n            break;\n\n        if( numDone == numShifts )\n            break;\n        else if( deflate && numActiveDone != 0 )\n        {\n            Deflate\n            ( activeShifts, activePreimage, activeVList[0], activeEsts, \n              activeConverged, activeItCounts, progress );\n            lastActiveEsts = activeEsts;\n        }\n\n        // Save snapshots of the estimates at the requested rate\n        Snapshot\n        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );\n    } \n\n    invNorms = estimates;\n    if( deflate )\n        RestoreOrdering( preimage, invNorms, itCounts );\n    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );\n\n    return itCounts;\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nIRA\n( const DistMatrix<Real                 >& U, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts, \n        DistMatrix<Real,         VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::IRA\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = U.Height();\n    const Int numShifts = shifts.Height();\n    const Grid& g = U.Grid();\n\n    const Int maxIts = psCtrl.maxIts;\n    const Int basisSize = psCtrl.basisSize;\n    const bool deflate = psCtrl.deflate;\n    const bool progress = psCtrl.progress;\n\n    // Keep track of the number of iterations per shift\n    DistMatrix<Int,VR,STAR> itCounts(g);\n    Ones( itCounts, numShifts, 1 );\n\n    // Keep track of the pivoting history if deflation is requested\n    DistMatrix<Int,VR,STAR> preimage(g);\n    DistMatrix<C,  VR,STAR> pivShifts( shifts );\n    if( deflate )\n    {\n        preimage.AlignWith( shifts );\n        preimage.Resize( numShifts, 1 );\n        const Int numLocShifts = preimage.LocalHeight();\n        for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )\n        {\n            const Int i = preimage.GlobalRow(iLoc);\n            preimage.SetLocal( iLoc, 0, i );\n        }\n    }\n\n    // Simultaneously run IRA for different shifts\n    std::vector<DistMatrix<Real>> VRealList(basisSize+1), \n                                  VImagList(basisSize+1),\n                                  activeVRealList(basisSize+1),\n                                  activeVImagList(basisSize+1);\n    for( Int j=0; j<basisSize+1; ++j )\n    {\n        VRealList[j].SetGrid( g );\n        VImagList[j].SetGrid( g );\n        Zeros( VRealList[j], n, numShifts );\n        Zeros( VImagList[j], n, numShifts );\n    }\n    // The variance will be off from that of the usual complex case\n    Gaussian( VRealList[0], n, numShifts );\n    Gaussian( VImagList[0], n, numShifts );\n    const Int numMRShifts = VRealList[0].LocalWidth();\n    std::vector<Matrix<Complex<Real>>> HList(numMRShifts);\n    std::vector<Real> realComponents;\n    std::vector<Complex<Real>> components;\n\n    DistMatrix<Int,MR,STAR> activeConverged(g);\n    Zeros( activeConverged, numShifts, 1 );\n\n    psCtrl.snapCtrl.ResetCounts();\n\n    Timer timer, subtimer;\n    Int numIts=0, numDone=0;\n    DistMatrix<Real,MR,STAR> estimates(g), lastActiveEsts(g);\n    estimates.AlignWith( shifts );\n    Zeros( estimates, numShifts, 1 );\n    DistMatrix<Int,VR,STAR> activePreimage(g);\n    while( true )\n    {\n        const Int numActive = ( deflate ? numShifts-numDone : numShifts );\n        auto activeShifts = View( pivShifts, 0, 0, numActive, 1 );\n        auto activeEsts = View( estimates, 0, 0, numActive, 1 );\n        auto activeItCounts = View( itCounts, 0, 0, numActive, 1 );\n        for( Int j=0; j<basisSize+1; ++j )\n        {\n            activeVRealList[j] = View( VRealList[j], 0, 0, n, numActive ); \n            activeVImagList[j] = View( VImagList[j], 0, 0, n, numActive ); \n        }\n        if( deflate )\n        {\n            activePreimage = View( preimage, 0, 0, numActive, 1 );\n            Zeros( activeConverged, numActive, 1 );\n        }\n        HList.resize( activeEsts.LocalHeight() );\n        for( Int jLoc=0; jLoc<HList.size(); ++jLoc )\n            Zeros( HList[jLoc], basisSize+1, basisSize );\n\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                timer.Start();\n        }\n        ColumnNorms( activeVRealList[0], activeVImagList[0], realComponents );\n        InvBetaScale( realComponents, activeVRealList[0] );\n        InvBetaScale( realComponents, activeVImagList[0] );\n        for( Int j=0; j<basisSize; ++j )\n        {\n            lastActiveEsts = activeEsts;\n            activeVRealList[j+1] = activeVRealList[j];\n            activeVImagList[j+1] = activeVImagList[j];\n            if( progress )\n            { \n                mpi::Barrier( g.Comm() );\n                if( g.Rank() == 0 )\n                    subtimer.Start();\n            }\n            MultiShiftQuasiTrsm\n            ( LEFT, UPPER, NORMAL, C(1), U, activeShifts, \n              activeVRealList[j+1], activeVImagList[j+1] );\n            MultiShiftQuasiTrsm\n            ( LEFT, UPPER, ADJOINT, C(1), U, activeShifts, \n              activeVRealList[j+1], activeVImagList[j+1] );\n            if( progress )\n            {\n                mpi::Barrier( g.Comm() );\n                if( g.Rank() == 0 )\n                {\n                    const double msTime = subtimer.Stop();\n                    const Int numActiveShifts = activeShifts.Height();\n                    const double gflops = \n                        (4.*n*n*numActiveShifts)/(msTime*1.e9);\n                    std::cout << \"  MultiShiftQuasiTrsm's: \" << msTime \n                              << \" seconds, \" << gflops << \" GFlops\" \n                              << std::endl;\n                }\n            }\n\n            // Orthogonalize with respect to the old iterate\n            if( j > 0 )\n            {\n                ExtractList( HList, components, j, j-1 );\n                // TODO: Conjugate components?\n                PlaceList( HList, components, j-1, j );\n                ColumnSubtractions\n                ( components, activeVRealList[j-1], activeVImagList[j-1],\n                              activeVRealList[j+1], activeVImagList[j+1] );\n            }\n\n            // Orthogonalize with respect to the last iterate\n            InnerProducts\n            ( activeVRealList[j+0], activeVImagList[j+0],\n              activeVRealList[j+1], activeVImagList[j+1], components );\n            PlaceList( HList, components, j, j );\n            ColumnSubtractions\n            ( components, activeVRealList[j+0], activeVImagList[j+0],\n                          activeVRealList[j+1], activeVImagList[j+1] );\n\n            // Explicitly (re)orthogonalize against all previous vectors\n            for( Int i=0; i<j-1; ++i )\n            {\n                InnerProducts\n                ( activeVRealList[i  ], activeVImagList[i  ],\n                  activeVRealList[j+1], activeVImagList[j+1], components );\n                PlaceList( HList, components, i, j );\n                ColumnSubtractions\n                ( components, activeVRealList[i  ], activeVImagList[i  ],\n                              activeVRealList[j+1], activeVImagList[j+1] );\n            }\n            if( j > 0 )\n            {\n                InnerProducts\n                ( activeVRealList[j-1], activeVImagList[j-1],\n                  activeVRealList[j+1], activeVImagList[j+1], components );\n                UpdateList( HList, components, j-1, j );\n                ColumnSubtractions\n                ( components, activeVRealList[j-1], activeVImagList[j-1],\n                              activeVRealList[j+1], activeVImagList[j+1] );\n            }\n\n            // Compute the norm of what is left\n            ColumnNorms\n            ( activeVRealList[j+1], activeVImagList[j+1], realComponents );\n            PlaceList( HList, realComponents, j+1, j );\n\n            // TODO: Handle lucky breakdowns\n            InvBetaScale( realComponents, activeVRealList[j+1] );\n            InvBetaScale( realComponents, activeVImagList[j+1] );\n\n            ComputeNewEstimates( HList, activeConverged, activeEsts, j+1 );\n            // We will have the same estimate two iterations in a row when\n            // restarting\n            if( j != 0 ) \n                activeConverged =\n                    FindConverged\n                    ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );\n\n            psCtrl.snapCtrl.Iterate();\n        }\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                subtimer.Start();\n        }\n        Restart( HList, activeConverged, activeVRealList, activeVImagList );\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                std::cout << \"IRA computations: \" << subtimer.Stop()\n                          << \" seconds\" << std::endl;\n        }\n\n        const Int numActiveDone = ZeroNorm( activeConverged );\n        if( deflate )\n            numDone += numActiveDone;\n        else\n            numDone = numActiveDone;\n        numIts += basisSize;\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n            {\n                const double iterTime = timer.Stop();\n                std::cout << \"iteration \" << numIts << \": \" << iterTime\n                          << \" seconds, \" << numDone << \" of \" << numShifts\n                          << \" converged\" << std::endl;\n            }\n        }\n        if( numIts >= maxIts )\n            break;\n\n        if( numDone == numShifts )\n            break;\n        else if( deflate && numActiveDone != 0 )\n        {\n            Deflate\n            ( activeShifts, activePreimage, \n              activeVRealList[0], activeVImagList[0], activeEsts, \n              activeConverged, activeItCounts, progress );\n            lastActiveEsts = activeEsts;\n        }\n\n        // Save snapshots of the estimates at the requested rate\n        Snapshot\n        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );\n    } \n\n    invNorms = estimates;\n    if( deflate )\n        RestoreOrdering( preimage, invNorms, itCounts );\n    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );\n\n    return itCounts;\n}\n\n} // namespace pspec\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOSPECTRUM_IRA_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Pseudospectrum/IRL.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOSPECTRUM_IRL_HPP\n#define ELEM_PSEUDOSPECTRUM_IRL_HPP\n\n#include \"./Lanczos.hpp\"\n\nnamespace elem {\nnamespace pspec {\n\ntemplate<typename Real>\ninline void\nComputeNewEstimates\n( const std::vector<std::vector<Real>>& HDiagList,\n  const std::vector<std::vector<Real>>& HSubdiagList,\n  const Matrix<Int>& activeConverged,\n  Matrix<Real>& activeEsts )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ComputeNewEstimates\"))\n    const Real normCap = NormCap<Real>();\n    const Int numShifts = activeEsts.Height();\n    if( numShifts == 0 )\n        return;\n    const Int basisSize = HDiagList[0].size();\n    std::vector<Real> HDiag, HSubdiag, w(basisSize);\n    for( Int j=0; j<numShifts; ++j )\n    {\n        HDiag = HDiagList[j];\n        HSubdiag = HSubdiagList[j];\n        if( !activeConverged.Get(j,0) )\n        {\n            if( !HasNan(HDiag) && !HasNan(HSubdiag) )\n            {\n                lapack::SymmetricTridiagEig\n                ( basisSize, HDiag.data(), HSubdiag.data(), w.data(),\n                  basisSize-1, basisSize-1 );\n                const Real est = Sqrt(w[0]);\n                activeEsts.Set( j, 0, Min(est,normCap) );\n            }\n            else\n               activeEsts.Set( j, 0, normCap );\n        }\n    }\n}\n\ntemplate<typename Real>\ninline void\nComputeNewEstimates\n( const std::vector<std::vector<Real>>& HDiagList,\n  const std::vector<std::vector<Real>>& HSubdiagList,\n  const DistMatrix<Int,MR,STAR>& activeConverged,\n        DistMatrix<Real,MR,STAR>& activeEsts )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ComputeNewEstimates\"))\n    ComputeNewEstimates\n    ( HDiagList, HSubdiagList, activeConverged.LockedMatrix(), \n      activeEsts.Matrix() );\n}\n\ntemplate<typename Real>\ninline void\nRestart\n( const std::vector<std::vector<Real>>& HDiagList,\n  const std::vector<std::vector<Real>>& HSubdiagList,\n  const Matrix<Int>& activeConverged,\n  std::vector<Matrix<Complex<Real>>>& VList )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Restart\"))\n    const Int n = VList[0].Height();\n    const Int numShifts = VList[0].Width();\n    if( numShifts == 0 )\n        return;\n    const Int basisSize = HDiagList[0].size();\n    std::vector<Real> HDiag, HSubdiag, w(basisSize);\n    Matrix<Real> q(basisSize,1);\n    Matrix<Complex<Real>> u(n,1);\n    for( Int j=0; j<numShifts; ++j )\n    {\n        HDiag = HDiagList[j];\n        HSubdiag = HSubdiagList[j];\n\n        if( !activeConverged.Get(j,0) )\n        {\n            if( !HasNan(HDiag) && !HasNan(HSubdiag) )\n            {\n                lapack::SymmetricTridiagEig\n                ( basisSize, HDiag.data(), HSubdiag.data(), w.data(), \n                  q.Buffer(), basisSize, basisSize-1, basisSize-1 );\n\n                Zeros( u, n, 1 );\n                for( Int k=0; k<basisSize; ++k )\n                {\n                    const Matrix<Complex<Real>>& V = VList[k];\n                    auto v = LockedView( V, 0, j, n, 1 ); \n                    Axpy( q.Get(k,0), v, u );\n                }\n                Matrix<Complex<Real>>& V = VList[0];\n                auto v = View( V, 0, j, n, 1 );\n                v = u;\n            }\n        }\n    }\n}\n\ntemplate<typename Real>\ninline void\nRestart\n( const std::vector<std::vector<Real>>& HDiagList,\n  const std::vector<std::vector<Real>>& HSubdiagList,\n  const DistMatrix<Int,MR,STAR>& activeConverged,\n  std::vector<DistMatrix<Complex<Real>>>& VList )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Restart\"))\n    const Int basisSize = HDiagList[0].size();\n    std::vector<Matrix<Complex<Real>>> VLocList(basisSize+1);\n    for( Int j=0; j<basisSize+1; ++j )\n        VLocList[j] = View( VList[j].Matrix() );\n    Restart\n    ( HDiagList, HSubdiagList, activeConverged.LockedMatrix(), VLocList );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nIRL\n( const Matrix<Complex<Real>>& U, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::IRL\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = U.Height();\n    const Int numShifts = shifts.Height();\n\n    const Int maxIts = psCtrl.maxIts;\n    const Int basisSize = psCtrl.basisSize;\n    const bool reorthog = psCtrl.reorthog;\n    const bool deflate = psCtrl.deflate;\n    const bool progress = psCtrl.progress;\n\n    // Keep track of the number of iterations per shift\n    Matrix<Int> itCounts;\n    Ones( itCounts, numShifts, 1 );\n\n    // Keep track of the pivoting history if deflation is requested\n    Matrix<Int> preimage;\n    Matrix<C> pivShifts( shifts );\n    if( deflate )\n    {\n        preimage.Resize( numShifts, 1 );\n        for( Int j=0; j<numShifts; ++j )\n            preimage.Set( j, 0, j );\n    }\n\n    // The Hessenberg algorithm currently needs explicit access to the adjoint\n    Matrix<C> UAdj, activeShiftsConj;\n    if( !psCtrl.schur )\n        Adjoint( U, UAdj );\n\n    // Simultaneously run IRL for different shifts\n    std::vector<Matrix<C>> VList(basisSize+1), activeVList(basisSize+1);\n    for( Int j=0; j<basisSize+1; ++j )\n        Zeros( VList[j], n, numShifts );\n    Gaussian( VList[0], n, numShifts );\n    std::vector<std::vector<Real>> \n        HDiagList(numShifts), HSubdiagList(numShifts);\n    std::vector<Real> realComponents;\n    std::vector<Complex<Real>> components;\n\n    Matrix<Int> activeConverged;\n    Zeros( activeConverged, numShifts, 1 );\n\n    psCtrl.snapCtrl.ResetCounts();\n\n    Timer timer, subtimer;\n    Int numIts=0, numDone=0;\n    Matrix<Real> estimates(numShifts,1);\n    Zeros( estimates, numShifts, 1 );\n    Matrix<Real> lastActiveEsts;\n    Matrix<Int> activePreimage;\n    while( true )\n    {\n        const Int numActive = ( deflate ? numShifts-numDone : numShifts );\n        auto activeShifts = View( pivShifts, 0, 0, numActive, 1 );\n        auto activeEsts = View( estimates, 0, 0, numActive, 1 );\n        auto activeItCounts = View( itCounts, 0, 0, numActive, 1 );\n        for( Int j=0; j<basisSize+1; ++j )\n            activeVList[j] = View( VList[j], 0, 0, n, numActive ); \n        if( deflate )\n        {\n            activePreimage = View( preimage, 0, 0, numActive, 1 );\n            Zeros( activeConverged, numActive, 1 );\n        }\n\n        // Reset the Rayleigh quotients\n        for( Int j=0; j<numActive; ++j )\n        {\n            HDiagList[j].resize(0);\n            HDiagList[j].reserve(basisSize);\n            HSubdiagList[j].resize(0);\n            HSubdiagList[j].reserve(basisSize);\n        }\n\n        if( progress )\n            timer.Start();\n        Matrix<Real> colNorms;\n        ColumnNorms( activeVList[0], colNorms );\n        InvBetaScale( colNorms, activeVList[0] );\n        for( Int j=0; j<basisSize; ++j )\n        {\n            lastActiveEsts = activeEsts;\n            activeVList[j+1] = activeVList[j];\n            if( psCtrl.schur )\n            {\n                if( progress )\n                    subtimer.Start();\n                MultiShiftTrsm\n                ( LEFT, UPPER, NORMAL, \n                  C(1), U, activeShifts, activeVList[j+1] );\n                MultiShiftTrsm\n                ( LEFT, UPPER, ADJOINT, \n                  C(1), U, activeShifts, activeVList[j+1] );\n                if( progress )\n                {\n                    const double msTime = subtimer.Stop();\n                    const Int numActiveShifts = activeShifts.Height();\n                    const double gflops = \n                        (8.*n*n*numActiveShifts)/(msTime*1.e9);\n                    std::cout << \"  MultiShiftTrsm's: \" << msTime \n                              << \" seconds, \" << gflops << \" GFlops\" \n                              << std::endl;\n                }\n            }\n            else\n            {\n                if( progress )\n                    subtimer.Start();\n                Conjugate( activeShifts, activeShiftsConj );\n                MultiShiftHessSolve\n                ( UPPER, NORMAL, \n                  C(1), U, activeShifts, activeVList[j+1] );\n                MultiShiftHessSolve\n                ( LOWER, NORMAL, \n                  C(1), UAdj, activeShiftsConj, activeVList[j+1] );\n                if( progress )\n                {\n                    const double msTime = subtimer.Stop();\n                    const Int numActiveShifts = activeShifts.Height();\n                    const double gflops = \n                        (32.*n*n*numActiveShifts)/(msTime*1.e9);\n                    std::cout << \"  MultiShiftHessSolve's: \" << msTime\n                              << \" seconds, \" << gflops << \" GFlops\" \n                              << std::endl;\n                }\n            }\n\n            // Orthogonalize with respect to the old iterate\n            if( j > 0 )\n            {\n                ExtractList( HSubdiagList, realComponents, j-1 );\n                ColumnSubtractions\n                ( realComponents, activeVList[j-1], activeVList[j+1] );\n            }\n\n            // Orthogonalize with respect to the last iterate\n            InnerProducts( activeVList[j], activeVList[j+1], realComponents );\n            PushBackList( HDiagList, realComponents );\n            ColumnSubtractions\n            ( realComponents, activeVList[j], activeVList[j+1] );\n\n            if( reorthog )\n            {\n                // Explicitly (re)orthogonalize against all previous vectors\n                for( Int i=0; i<j; ++i )\n                {\n                    InnerProducts\n                    ( activeVList[i], activeVList[j+1], components );\n                    ColumnSubtractions\n                    ( components, activeVList[i], activeVList[j+1] );\n                }\n            }\n\n            // Compute the norm of what is left\n            ColumnNorms( activeVList[j+1], realComponents );\n            PushBackList( HSubdiagList, realComponents );\n\n            // TODO: Handle lucky breakdowns\n            InvBetaScale( realComponents, activeVList[j+1] );\n\n            ComputeNewEstimates\n            ( HDiagList, HSubdiagList, activeConverged, activeEsts );\n            // We will have the same estimate two iterations in a row when\n            // restarting\n            if( j != 0 ) \n                activeConverged =\n                    FindConverged\n                    ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );\n\n            psCtrl.snapCtrl.Iterate();\n        }\n        if( progress )\n            subtimer.Start();\n        Restart\n        ( HDiagList, HSubdiagList, activeVList, activeConverged, activeEsts );\n        if( progress )\n            std::cout << \"IRL restart: \" << subtimer.Stop()\n                      << \" seconds\" << std::endl;\n\n        const Int numActiveDone = ZeroNorm( activeConverged );\n        if( deflate )\n            numDone += numActiveDone;\n        else\n            numDone = numActiveDone;\n        numIts += basisSize;\n        if( progress )\n        {\n            const double iterTime = timer.Stop();\n            std::cout << \"iteration \" << numIts << \": \" << iterTime\n                      << \" seconds, \" << numDone << \" of \" << numShifts\n                      << \" converged\" << std::endl;\n        }\n        if( numIts >= maxIts )\n            break;\n\n        if( numDone == numShifts )\n            break;\n        else if( deflate && numActiveDone != 0 )\n        {\n            Deflate\n            ( activeShifts, activePreimage, activeVList[0], activeEsts, \n              activeConverged, activeItCounts, progress );\n            lastActiveEsts = activeEsts;\n        }\n\n        // Save snapshots of the estimates at the requested rate\n        Snapshot\n        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );\n    } \n\n    invNorms = estimates;\n    if( deflate )\n        RestoreOrdering( preimage, invNorms, itCounts );\n    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );\n\n    return itCounts;\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nIRL\n( const DistMatrix<Complex<Real>        >& U, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts, \n        DistMatrix<Real,         VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::IRL\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = U.Height();\n    const Int numShifts = shifts.Height();\n    const Grid& g = U.Grid();\n\n    const Int maxIts = psCtrl.maxIts;\n    const Int basisSize = psCtrl.basisSize;\n    const bool reorthog = psCtrl.reorthog;\n    const bool deflate = psCtrl.deflate;\n    const bool progress = psCtrl.progress;\n\n    // Keep track of the number of iterations per shift\n    DistMatrix<Int,VR,STAR> itCounts(g);\n    Ones( itCounts, numShifts, 1 );\n\n    // Keep track of the pivoting history if deflation is requested\n    DistMatrix<Int,VR,STAR> preimage(g);\n    DistMatrix<C,  VR,STAR> pivShifts( shifts );\n    if( deflate )\n    {\n        preimage.AlignWith( shifts );\n        preimage.Resize( numShifts, 1 );\n        const Int numLocShifts = preimage.LocalHeight();\n        for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )\n        {\n            const Int i = preimage.GlobalRow(iLoc);\n            preimage.SetLocal( iLoc, 0, i );\n        }\n    }\n\n    // The Hessenberg algorithm currently requires explicit adjoint access\n    DistMatrix<C,VC,STAR> U_VC_STAR(g), UAdj_VC_STAR(g);\n    DistMatrix<C,VR,STAR> activeShiftsConj(g);\n    DistMatrix<C,STAR,VR> activeV_STAR_VR(g);\n    if( !psCtrl.schur )\n    {\n        U_VC_STAR = U;\n        Adjoint( U, UAdj_VC_STAR );\n    }\n\n    // Simultaneously run IRL for different shifts\n    std::vector<DistMatrix<C>> VList(basisSize+1), activeVList(basisSize+1);\n    for( Int j=0; j<basisSize+1; ++j )\n    {\n        VList[j].SetGrid( g );\n        Zeros( VList[j], n, numShifts );\n    }\n    Gaussian( VList[0], n, numShifts );\n    const Int numMRShifts = VList[0].LocalWidth();\n    std::vector<std::vector<Real>> HDiagList(numMRShifts), \n                                   HSubdiagList(numMRShifts);\n    std::vector<Real> realComponents;\n    std::vector<Complex<Real>> components;\n\n    DistMatrix<Int,MR,STAR> activeConverged(g);\n    Zeros( activeConverged, numShifts, 1 );\n\n    psCtrl.snapCtrl.ResetCounts();\n\n    Timer timer, subtimer;\n    Int numIts=0, numDone=0;\n    DistMatrix<Real,MR,STAR> estimates(g), lastActiveEsts(g);\n    estimates.AlignWith( shifts );\n    Zeros( estimates, numShifts, 1 );\n    DistMatrix<Int,VR,STAR> activePreimage(g);\n    while( true )\n    {\n        const Int numActive = ( deflate ? numShifts-numDone : numShifts );\n        auto activeShifts = View( pivShifts, 0, 0, numActive, 1 );\n        auto activeEsts = View( estimates, 0, 0, numActive, 1 );\n        auto activeItCounts = View( itCounts, 0, 0, numActive, 1 );\n        for( Int j=0; j<basisSize+1; ++j )\n            activeVList[j] = View( VList[j], 0, 0, n, numActive ); \n        if( deflate )\n        {\n            activePreimage = View( preimage, 0, 0, numActive, 1 );\n            Zeros( activeConverged, numActive, 1 );\n        }\n\n        // Reset the Rayleigh quotients\n        const Int numActiveMR = estimates.LocalHeight();\n        for( Int jLoc=0; jLoc<numActiveMR; ++jLoc )\n        {\n            HDiagList[jLoc].resize(0);\n            HDiagList[jLoc].reserve(basisSize);\n            HSubdiagList[jLoc].resize(0);\n            HSubdiagList[jLoc].reserve(basisSize);\n        }\n\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                timer.Start();\n        }\n        DistMatrix<Real,MR,STAR> colNorms(g);\n        ColumnNorms( activeVList[0], colNorms );\n        InvBetaScale( colNorms, activeVList[0] );\n        for( Int j=0; j<basisSize; ++j )\n        {\n            lastActiveEsts = activeEsts;\n            activeVList[j+1] = activeVList[j];\n            if( psCtrl.schur )\n            {\n                if( progress )\n                { \n                    mpi::Barrier( g.Comm() );\n                    if( g.Rank() == 0 )\n                        subtimer.Start();\n                }\n                MultiShiftTrsm\n                ( LEFT, UPPER, NORMAL, \n                  C(1), U, activeShifts, activeVList[j+1] );\n                MultiShiftTrsm\n                ( LEFT, UPPER, ADJOINT, \n                  C(1), U, activeShifts, activeVList[j+1] );\n                if( progress )\n                {\n                    mpi::Barrier( g.Comm() );\n                    if( g.Rank() == 0 )\n                    {\n                        const double msTime = subtimer.Stop();\n                        const Int numActiveShifts = activeShifts.Height();\n                        const double gflops = \n                            (8.*n*n*numActiveShifts)/(msTime*1.e9);\n                        std::cout << \"  MultiShiftTrsm's: \" << msTime \n                                  << \" seconds, \" << gflops << \" GFlops\" \n                                  << std::endl;\n                    }\n                }\n            }\n            else\n            {\n                if( progress )\n                {\n                    mpi::Barrier( g.Comm() );\n                    if( g.Rank() == 0 )\n                        subtimer.Start();\n                }\n                // NOTE: This redistribution sequence might not be necessary\n                activeV_STAR_VR = activeVList[j+1];\n                Conjugate( activeShifts, activeShiftsConj );\n                MultiShiftHessSolve\n                ( UPPER, NORMAL, C(1), U_VC_STAR, activeShifts,\n                  activeV_STAR_VR );\n                MultiShiftHessSolve\n                ( LOWER, NORMAL, C(1), UAdj_VC_STAR, activeShiftsConj,\n                  activeV_STAR_VR );\n                activeVList[j+1] = activeV_STAR_VR;\n                if( progress )\n                {\n                    mpi::Barrier( g.Comm() );\n                    if( g.Rank() == 0 )\n                    {\n                        const double msTime = subtimer.Stop();\n                        const Int numActiveShifts = activeShifts.Height();\n                        const double gflops =\n                            (32.*n*n*numActiveShifts)/(msTime*1.e9);\n                        std::cout << \"  MultiShiftHessSolve's: \" << msTime\n                                  << \" seconds, \" << gflops << \" GFlops\"\n                                  << std::endl;\n                    }\n                }\n            }\n\n            // Orthogonalize with respect to the old iterate\n            if( j > 0 )\n            {\n                ExtractList( HSubdiagList, realComponents, j-1 );\n                ColumnSubtractions\n                ( realComponents, activeVList[j-1], activeVList[j+1] );\n            }\n\n            // Orthogonalize with respect to the last iterate\n            InnerProducts( activeVList[j], activeVList[j+1], realComponents );\n            PushBackList( HDiagList, realComponents );\n            ColumnSubtractions\n            ( realComponents, activeVList[j], activeVList[j+1] );\n\n            if( reorthog )\n            {\n                // Explicitly (re)orthogonalize against all previous vectors\n                for( Int i=0; i<j; ++i )\n                {\n                    InnerProducts\n                    ( activeVList[i], activeVList[j+1], components );\n                    ColumnSubtractions\n                    ( components, activeVList[i], activeVList[j+1] );\n                }\n            }\n\n            // Compute the norm of what is left\n            ColumnNorms( activeVList[j+1], realComponents );\n            PushBackList( HSubdiagList, realComponents );\n\n            // TODO: Handle lucky breakdowns\n            InvBetaScale( realComponents, activeVList[j+1] );\n\n            ComputeNewEstimates\n            ( HDiagList, HSubdiagList, activeConverged, activeEsts );\n            // We will have the same estimate two iterations in a row when\n            // restarting\n            if( j != 0 ) \n                activeConverged =\n                    FindConverged\n                    ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );\n\n            psCtrl.snapCtrl.Iterate();\n        }\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                subtimer.Start();\n        }\n        Restart( HDiagList, HSubdiagList, activeConverged, activeVList );\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                std::cout << \"IRL computations: \" << subtimer.Stop()\n                          << \" seconds\" << std::endl;\n        }\n\n        const Int numActiveDone = ZeroNorm( activeConverged );\n        if( deflate )\n            numDone += numActiveDone;\n        else\n            numDone = numActiveDone;\n        numIts += basisSize;\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n            {\n                const double iterTime = timer.Stop();\n                std::cout << \"iteration \" << numIts << \": \" << iterTime\n                          << \" seconds, \" << numDone << \" of \" << numShifts\n                          << \" converged\" << std::endl;\n            }\n        }\n        if( numIts >= maxIts )\n            break;\n\n        if( numDone == numShifts )\n            break;\n        else if( deflate && numActiveDone != 0 )\n        {\n            Deflate\n            ( activeShifts, activePreimage, activeVList[0], activeEsts, \n              activeConverged, activeItCounts, progress );\n            lastActiveEsts = activeEsts;\n        }\n\n        // Save snapshots of the estimates at the requested rate\n        Snapshot\n        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );\n    } \n\n    invNorms = estimates;\n    if( deflate )\n        RestoreOrdering( preimage, invNorms, itCounts );\n    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );\n\n    return itCounts;\n}\n\n} // namespace pspec\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOSPECTRUM_IRL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Pseudospectrum/Lanczos.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOSPECTRUM_LANCZOS_HPP\n#define ELEM_PSEUDOSPECTRUM_LANCZOS_HPP\n\n#include \"./Power.hpp\"\n\nnamespace elem {\nnamespace pspec {\n\nconst Int HCapacityInit = 10;\n\ntemplate<typename Real>\ninline void\nComputeNewEstimates\n( const std::vector<std::vector<Real>>& HDiagList, \n  const std::vector<std::vector<Real>>& HSubdiagList,\n  Matrix<Real>& activeEsts )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ComputeNewEstimates\"))\n    const Real normCap = NormCap<Real>();\n    const Int numShifts = activeEsts.Height();\n    if( numShifts == 0 )\n        return;\n    const Int krylovSize = HDiagList[0].size();\n    std::vector<Real> HDiag, HSubdiag, w(krylovSize);\n    for( Int j=0; j<numShifts; ++j )\n    {\n        HDiag = HDiagList[j]; \n        HSubdiag = HSubdiagList[j];\n        if( !HasNan(HDiag) && !HasNan(HSubdiag) )\n        {\n            lapack::SymmetricTridiagEig     \n            ( krylovSize, HDiag.data(), HSubdiag.data(), w.data(), \n              krylovSize-1, krylovSize-1 );\n            const Real est = Sqrt(w[0]);\n            activeEsts.Set( j, 0, Min(est,normCap) );\n        }\n        else\n            activeEsts.Set( j, 0, normCap );\n    }\n}\n\ntemplate<typename Real>\ninline void\nComputeNewEstimates\n( const std::vector<std::vector<Real>>& HDiagList, \n  const std::vector<std::vector<Real>>& HSubdiagList,\n  DistMatrix<Real,MR,STAR>& activeEsts )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ComputeNewEstimates\"))\n    ComputeNewEstimates( HDiagList, HSubdiagList, activeEsts.Matrix() );\n}\n\ntemplate<typename Real>\ninline void\nDeflate\n( std::vector<std::vector<Real>>& HDiagList,\n  std::vector<std::vector<Real>>& HSubdiagList,\n  Matrix<Complex<Real>>& activeShifts, \n  Matrix<Int          >& activePreimage,\n  Matrix<Complex<Real>>& activeXOld,\n  Matrix<Complex<Real>>& activeX,\n  Matrix<Real         >& activeEsts, \n  Matrix<Int          >& activeConverged,\n  Matrix<Int          >& activeItCounts,\n  bool progress=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Deflate\"))\n    Timer timer;\n    if( progress )\n        timer.Start();\n    const Int numActive = activeX.Width(); \n    Int swapTo = numActive-1;\n    for( Int swapFrom=numActive-1; swapFrom>=0; --swapFrom )\n    {\n        if( activeConverged.Get(swapFrom,0) )\n        {\n            if( swapTo != swapFrom )\n            {\n                std::swap( HDiagList[swapFrom], HDiagList[swapTo] );\n                std::swap( HSubdiagList[swapFrom], HSubdiagList[swapTo] );\n                RowSwap( activeShifts,   swapFrom, swapTo );\n                RowSwap( activePreimage, swapFrom, swapTo );\n                RowSwap( activeEsts,     swapFrom, swapTo );\n                RowSwap( activeItCounts, swapFrom, swapTo );\n                ColSwap( activeXOld,     swapFrom, swapTo );\n                ColSwap( activeX,        swapFrom, swapTo );\n            }\n            --swapTo;\n        }\n    }\n    if( progress )\n        std::cout << \"Deflation took \" << timer.Stop() << \" seconds\"\n                  << std::endl;\n}\n\ntemplate<typename Real>\ninline void\nDeflate\n( std::vector<std::vector<Real>>& HDiagList,\n  std::vector<std::vector<Real>>& HSubdiagList,\n  DistMatrix<Complex<Real>,VR,STAR>& activeShifts,\n  DistMatrix<Int,          VR,STAR>& activePreimage,\n  DistMatrix<Complex<Real>        >& activeXOld,\n  DistMatrix<Complex<Real>        >& activeX,\n  DistMatrix<Real,         MR,STAR>& activeEsts,\n  DistMatrix<Int,          MR,STAR>& activeConverged,\n  DistMatrix<Int,          VR,STAR>& activeItCounts,\n  bool progress=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Deflate\"))\n    Timer timer;\n    if( progress && activeShifts.Grid().Rank() == 0 )\n        timer.Start();\n    const Int numActive = activeX.Width(); \n    Int swapTo = numActive-1;\n\n    DistMatrix<Complex<Real>,STAR,STAR> shiftsCopy( activeShifts );\n    DistMatrix<Int,STAR,STAR> preimageCopy( activePreimage );\n    DistMatrix<Real,STAR,STAR> estimatesCopy( activeEsts );\n    DistMatrix<Int, STAR,STAR> itCountsCopy( activeItCounts );\n    DistMatrix<Int, STAR,STAR> convergedCopy( activeConverged );\n    DistMatrix<Complex<Real>,VC,STAR> XOldCopy( activeXOld ), XCopy( activeX );\n\n    const Int n = ( activeX.LocalWidth()>0 ? HDiagList[0].size() : 0 );\n    for( Int swapFrom=numActive-1; swapFrom>=0; --swapFrom )\n    {\n        if( convergedCopy.Get(swapFrom,0) )\n        {\n            if( swapTo != swapFrom )\n            {\n                // TODO: Avoid this large latency penalty\n                if( activeX.IsLocalCol(swapFrom) && \n                    activeX.IsLocalCol(swapTo) )\n                {\n                    const Int localFrom = activeX.LocalCol(swapFrom);\n                    const Int localTo = activeX.LocalCol(swapTo);\n                    DEBUG_ONLY(\n                        if( HDiagList[localFrom].size() != n )\n                            LogicError(\"Invalid HDiagList size\");\n                        if( HDiagList[localTo].size() != n )\n                            LogicError(\"Invalid HDiagList size\");\n                        if( HSubdiagList[localFrom].size() != n )\n                            LogicError(\"Invalid HSubdiagList size\");\n                        if( HSubdiagList[localTo].size() != n )\n                            LogicError(\"Invalid HSubdiagList size\");\n                    )\n                    std::swap( HDiagList[localFrom], HDiagList[localTo] );\n                    std::swap( HSubdiagList[localFrom], HSubdiagList[localTo] );\n                }\n                else if( activeX.IsLocalCol(swapFrom) )\n                {\n                    const Int localFrom = activeX.LocalCol(swapFrom);\n                    DEBUG_ONLY(\n                        if( HDiagList[localFrom].size() != n )\n                            LogicError(\"Invalid HDiagList size\");\n                        if( HSubdiagList[localFrom].size() != n )\n                            LogicError(\"Invalid HSubdiagList size\");\n                    )\n                    const Int partner = activeX.ColOwner(swapTo);\n                    mpi::TaggedSendRecv\n                    ( HDiagList[localFrom].data(), n,\n                      partner, swapFrom, partner, swapFrom, activeX.RowComm() );\n                    mpi::TaggedSendRecv\n                    ( HSubdiagList[localFrom].data(), n, \n                      partner, swapFrom, partner, swapFrom, activeX.RowComm() );\n                }\n                else if( activeX.IsLocalCol(swapTo) )\n                {\n                    const Int localTo = activeX.LocalCol(swapTo);\n                    DEBUG_ONLY(\n                        if( HDiagList[localTo].size() != n )\n                            LogicError(\"Invalid HDiagList size\");\n                        if( HSubdiagList[localTo].size() != n )\n                            LogicError(\"Invalid HSubdiagList size\");\n                    )\n                    const Int partner = activeX.ColOwner(swapFrom);\n                    mpi::TaggedSendRecv\n                    ( HDiagList[localTo].data(), n,\n                      partner, swapFrom, partner, swapFrom, activeX.RowComm() );\n                    mpi::TaggedSendRecv\n                    ( HSubdiagList[localTo].data(), n, \n                      partner, swapFrom, partner, swapFrom, activeX.RowComm() );\n                }\n\n                RowSwap( shiftsCopy,    swapFrom, swapTo );\n                RowSwap( preimageCopy,  swapFrom, swapTo );\n                RowSwap( estimatesCopy, swapFrom, swapTo );\n                RowSwap( itCountsCopy,  swapFrom, swapTo );\n                ColSwap( XOldCopy,      swapFrom, swapTo );\n                ColSwap( XCopy,         swapFrom, swapTo );\n            }\n            --swapTo;\n        }\n    }\n\n    activeShifts   = shiftsCopy;\n    activePreimage = preimageCopy;\n    activeEsts     = estimatesCopy;\n    activeItCounts = itCountsCopy;\n    activeXOld     = XOldCopy;\n    activeX        = XCopy;\n\n    if( progress ) \n    {\n        mpi::Barrier( activeShifts.Grid().Comm() );\n        if( activeShifts.Grid().Rank() == 0 ) \n            std::cout << \"Deflation took \" << timer.Stop() << \" seconds\"\n                      << std::endl;\n    }\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nLanczos\n( const Matrix<Complex<Real>>& U, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Lanczos\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = U.Height();\n    const Int numShifts = shifts.Height();\n\n    const Int maxIts = psCtrl.maxIts;\n    const bool deflate = psCtrl.deflate;\n    const bool progress = psCtrl.progress;\n\n    // Keep track of the number of iterations per shift\n    Matrix<Int> itCounts;\n    Ones( itCounts, numShifts, 1 );\n\n    // Keep track of the pivoting history if deflation is requested\n    Matrix<Int> preimage;\n    Matrix<C> pivShifts( shifts );\n    if( deflate )\n    {\n        preimage.Resize( numShifts, 1 );\n        for( Int j=0; j<numShifts; ++j )\n            preimage.Set( j, 0, j );\n    }\n\n    // The Hessenberg case currently requires explicit access to the adjoint\n    Matrix<C> UAdj, activeShiftsConj;\n    if( !psCtrl.schur )\n        Adjoint( U, UAdj );\n\n    // Simultaneously run Lanczos for various shifts\n    Matrix<C> XOld, X, XNew;\n    Zeros( XOld, n, numShifts );\n    Gaussian( X, n, numShifts );\n    FixColumns( X );\n    Zeros( XNew, n, numShifts );\n    std::vector<std::vector<Real>> HDiagList( numShifts ),\n                                   HSubdiagList( numShifts );\n    for( Int j=0; j<numShifts; ++j )\n    {\n        HDiagList[j].reserve( HCapacityInit );\n        HSubdiagList[j].reserve( HCapacityInit-1 );\n    }\n\n    psCtrl.snapCtrl.ResetCounts();\n\n    Timer timer, subtimer;\n    Int numIts=0, numDone=0;\n    Matrix<Real> estimates(numShifts,1);\n    Zeros( estimates, numShifts, 1 );\n    auto lastActiveEsts = estimates;\n    Matrix<Int> activePreimage;\n    std::vector<Real> realComponents;\n    while( true )\n    {\n        const Int numActive = ( deflate ? numShifts-numDone : numShifts );\n        auto activeShifts = View( pivShifts, 0, 0, numActive, 1 );\n        auto activeEsts = View( estimates, 0, 0, numActive, 1 );\n        auto activeItCounts = View( itCounts, 0, 0, numActive, 1 );\n        auto activeXOld = View( XOld, 0, 0, n, numActive );\n        auto activeX    = View( X,    0, 0, n, numActive );\n        auto activeXNew = View( XNew, 0, 0, n, numActive );\n        if( deflate )\n            activePreimage = View( preimage, 0, 0, numActive, 1 );\n        HDiagList.resize( numActive );\n        HSubdiagList.resize( numActive );\n\n        if( progress )\n            timer.Start();\n        activeXNew = activeX;\n        if( psCtrl.schur )\n        {\n            if( progress )\n                subtimer.Start();\n            MultiShiftTrsm\n            ( LEFT, UPPER, NORMAL, C(1), U, activeShifts, activeXNew );\n            MultiShiftTrsm\n            ( LEFT, UPPER, ADJOINT, C(1), U, activeShifts, activeXNew );\n            if( progress )\n            {\n                const double msTime = subtimer.Stop();\n                const Int numActiveShifts = activeShifts.Height();\n                const double gflops = (8.*n*n*numActiveShifts)/(msTime*1.e9);\n                std::cout << \"  MultiShiftTrsm's: \" << msTime << \" seconds, \"\n                          << gflops << \" GFlops\" << std::endl;\n            }\n        }\n        else\n        {\n            if( progress )\n                subtimer.Start();\n            Conjugate( activeShifts, activeShiftsConj );\n            MultiShiftHessSolve\n            ( UPPER, NORMAL, C(1), U, activeShifts, activeXNew );\n            MultiShiftHessSolve\n            ( LOWER, NORMAL, C(1), UAdj, activeShiftsConj, activeXNew );\n            if( progress )\n            {\n                const double msTime = subtimer.Stop();\n                const Int numActiveShifts = activeShifts.Height();\n                const double gflops = (32.*n*n*numActiveShifts)/(msTime*1.e9);\n                std::cout << \"  MultiShiftHessSolve's: \" << msTime \n                          << \" seconds, \" << gflops << \" GFlops\" << std::endl;\n            }\n        }\n\n        // Orthogonalize with respect to the old iterate\n        if( numIts > 0 )\n        {\n            ExtractList( HSubdiagList, realComponents, numIts-1 );\n            ColumnSubtractions( realComponents, activeXOld, activeXNew );\n        }\n\n        // Orthogonalize with respect to the last iterate\n        InnerProducts( activeX, activeXNew, realComponents );\n        PushBackList( HDiagList, realComponents );\n        ColumnSubtractions( realComponents, activeX, activeXNew );\n\n        // Compute the norm of what is left\n        ColumnNorms( activeXNew, realComponents );\n        PushBackList( HSubdiagList, realComponents );\n\n        activeXOld = activeX;\n        activeX    = activeXNew; \n        InvBetaScale( realComponents, activeX );\n        if( progress )\n            subtimer.Start();\n        ComputeNewEstimates( HDiagList, HSubdiagList, activeEsts );\n        if( progress )\n            std::cout << \"  Ritz computations: \" << subtimer.Stop() \n                      << \" seconds\" << std::endl;\n\n        auto activeConverged = \n            FindConverged\n            ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );\n        const Int numActiveDone = ZeroNorm( activeConverged );\n        if( deflate )\n            numDone += numActiveDone;\n        else\n            numDone = numActiveDone;\n        if( progress )\n        {\n            const double iterTime = timer.Stop();\n            std::cout << \"iteration \" << numIts << \": \" << iterTime\n                      << \" seconds, \" << numDone << \" of \" << numShifts\n                      << \" converged\" << std::endl;\n        }\n\n        ++numIts;\n        if( numIts >= maxIts )\n            break;\n\n        if( numDone == numShifts )\n            break;\n        else if( deflate && numActiveDone != 0 )\n            Deflate\n            ( HDiagList, HSubdiagList, activeShifts, activePreimage, activeXOld,\n              activeX, activeEsts, activeConverged, activeItCounts, progress );\n\n        lastActiveEsts = activeEsts;\n\n        // Save snapshots of the estimates at the requested rate\n        psCtrl.snapCtrl.Iterate();\n        Snapshot\n        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );\n    } \n\n    invNorms = estimates;\n    if( deflate )\n        RestoreOrdering( preimage, invNorms, itCounts );\n    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );\n\n    return itCounts;\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nLanczos\n( const DistMatrix<Complex<Real>        >& U, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts, \n        DistMatrix<Real,         VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Lanczos\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = U.Height();\n    const Int numShifts = shifts.Height();\n    const Grid& g = U.Grid();\n\n    const Int maxIts = psCtrl.maxIts;\n    const bool deflate = psCtrl.deflate;\n    const bool progress = psCtrl.progress;\n\n    if( deflate && g.Rank() == 0 ) \n        std::cerr << \"NOTE: Deflation swaps not yet optimized!\" << std::endl;\n\n    // Keep track of the number of iterations per shift\n    DistMatrix<Int,VR,STAR> itCounts(g);\n    Ones( itCounts, numShifts, 1 );\n\n    // Keep track of the pivoting history if deflation is requested\n    DistMatrix<Int,VR,STAR> preimage(g);\n    DistMatrix<C,  VR,STAR> pivShifts( shifts );\n    if( deflate )\n    {\n        preimage.AlignWith( shifts );\n        preimage.Resize( numShifts, 1 );\n        const Int numLocShifts = preimage.LocalHeight();\n        for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )\n        {\n            const Int i = preimage.GlobalRow(iLoc);\n            preimage.SetLocal( iLoc, 0, i );\n        }\n    }\n\n    // The Hessenberg case currently requires explicit access to the adjoint\n    DistMatrix<C,VC,STAR> U_VC_STAR(g), UAdj_VC_STAR(g);\n    DistMatrix<C,VR,STAR> activeShiftsConj(g);\n    DistMatrix<C,STAR,VR> activeXNew_STAR_VR(g);\n    if( !psCtrl.schur )\n    {\n        U_VC_STAR = U;\n        Adjoint( U, UAdj_VC_STAR );\n    }\n\n    // Simultaneously run Lanczos for various shifts\n    DistMatrix<C> XOld(g), X(g), XNew(g);\n    Zeros( XOld, n, numShifts );\n    Gaussian( X, n, numShifts );\n    FixColumns( X );\n    Zeros( XNew, n, numShifts );\n    std::vector<std::vector<Real>> HDiagList( X.LocalWidth() ),\n                                   HSubdiagList( X.LocalWidth() );\n    for( Int j=0; j<X.LocalWidth(); ++j )\n    {\n        HDiagList[j].reserve( HCapacityInit );\n        HSubdiagList[j].reserve( HCapacityInit-1 );\n    }\n\n    psCtrl.snapCtrl.ResetCounts();\n\n    Timer timer, subtimer;\n    Int numIts=0, numDone=0;\n    DistMatrix<Real,MR,STAR> estimates(g);\n    estimates.AlignWith( shifts );\n    Zeros( estimates, numShifts, 1 );\n    auto lastActiveEsts = estimates;\n    DistMatrix<Int,VR,STAR> activePreimage(g);\n    std::vector<Real> realComponents;\n    while( true )\n    {\n        const Int numActive = ( deflate ? numShifts-numDone : numShifts );\n        auto activeShifts = View( pivShifts, 0, 0, numActive, 1 );\n        auto activeEsts = View( estimates, 0, 0, numActive, 1 );\n        auto activeItCounts = View( itCounts, 0, 0, numActive, 1 );\n        auto activeXOld = View( XOld, 0, 0, n, numActive );\n        auto activeX    = View( X,    0, 0, n, numActive );\n        auto activeXNew = View( XNew, 0, 0, n, numActive );\n        if( deflate )\n            activePreimage = View( preimage, 0, 0, numActive, 1 );\n        HDiagList.resize( activeX.LocalWidth() );\n        HSubdiagList.resize( activeX.LocalWidth() );\n\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                timer.Start();\n        }\n        activeXNew = activeX;\n        if( psCtrl.schur )\n        {\n            if( progress )\n            { \n                mpi::Barrier( g.Comm() );\n                if( g.Rank() == 0 )\n                    subtimer.Start();\n            }\n            MultiShiftTrsm\n            ( LEFT, UPPER, NORMAL, C(1), U, activeShifts, activeXNew );\n            MultiShiftTrsm\n            ( LEFT, UPPER, ADJOINT, C(1), U, activeShifts, activeXNew );\n            if( progress )\n            {\n                mpi::Barrier( g.Comm() );\n                if( g.Rank() == 0 )\n                {\n                    const double msTime = subtimer.Stop();\n                    const Int numActiveShifts = activeShifts.Height();\n                    const double gflops = (8.*n*n*numActiveShifts)/(msTime*1e9);\n                    std::cout << \"  MultiShiftTrsm's: \" << msTime \n                              << \" seconds, \" << gflops << \" GFlops\" \n                              << std::endl;\n                }\n            }\n        }\n        else\n        {\n            if( progress )\n            {\n                mpi::Barrier( g.Comm() );\n                if( g.Rank() == 0 )\n                    subtimer.Start();\n            }\n            // NOTE: This redistribution sequence might not be necessary\n            activeXNew_STAR_VR = activeXNew;\n            Conjugate( activeShifts, activeShiftsConj );\n            MultiShiftHessSolve\n            ( UPPER, NORMAL, C(1), U_VC_STAR, activeShifts,\n              activeXNew_STAR_VR );\n            MultiShiftHessSolve\n            ( LOWER, NORMAL, C(1), UAdj_VC_STAR, activeShiftsConj,\n              activeXNew_STAR_VR );\n            activeXNew = activeXNew_STAR_VR;\n            if( progress )\n            {\n                mpi::Barrier( g.Comm() );\n                if( g.Rank() == 0 )\n                {\n                    const double msTime = subtimer.Stop();\n                    const Int numActiveShifts = activeShifts.Height();\n                    const double gflops = \n                        (32.*n*n*numActiveShifts)/(msTime*1.e9);\n                    std::cout << \"  MultiShiftHessSolve's: \" << msTime\n                              << \" seconds, \" << gflops << \" GFlops\" \n                              << std::endl;\n                }\n            }\n        }\n\n        // Orthogonalize with respect to the old iterate\n        if( numIts > 0 )\n        {\n            ExtractList( HSubdiagList, realComponents, numIts-1 );\n            ColumnSubtractions( realComponents, activeXOld, activeXNew );\n        }\n\n        // Orthogonalize with respect to the last iterate\n        InnerProducts( activeX, activeXNew, realComponents );\n        PushBackList( HDiagList, realComponents );\n        ColumnSubtractions( realComponents, activeX, activeXNew );\n\n        // Compute the norm of what is left\n        ColumnNorms( activeXNew, realComponents );\n        PushBackList( HSubdiagList, realComponents );\n\n        activeXOld = activeX;\n        activeX    = activeXNew;\n        InvBetaScale( realComponents, activeX );\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                subtimer.Start();\n        }\n        ComputeNewEstimates( HDiagList, HSubdiagList, activeEsts );\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n                std::cout << \"  Ritz computations: \" << subtimer.Stop() \n                          << \" seconds\" << std::endl;\n        }\n\n        auto activeConverged =\n            FindConverged\n            ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );\n        const Int numActiveDone = ZeroNorm( activeConverged );\n        if( deflate )\n            numDone += numActiveDone;\n        else\n            numDone = numActiveDone;\n        if( progress )\n        {\n            mpi::Barrier( g.Comm() );\n            if( g.Rank() == 0 )\n            {\n                const double iterTime = timer.Stop();\n                std::cout << \"iteration \" << numIts << \": \" << iterTime\n                          << \" seconds, \" << numDone << \" of \" << numShifts\n                          << \" converged\" << std::endl;\n            }\n        }\n\n        ++numIts;\n        if( numIts >= maxIts )\n            break;\n\n        if( numDone == numShifts )\n            break;\n        else if( deflate && numActiveDone != 0 )\n            Deflate\n            ( HDiagList, HSubdiagList, activeShifts, activePreimage, activeXOld,\n              activeX, activeEsts, activeConverged, activeItCounts, progress );\n\n        lastActiveEsts = activeEsts;\n\n        // Save snapshots of the estimates at the requested rate\n        psCtrl.snapCtrl.Iterate();\n        Snapshot\n        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );\n    } \n\n    invNorms = estimates;\n    if( deflate )\n        RestoreOrdering( preimage, invNorms, itCounts );\n    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );\n\n    return itCounts;\n}\n\n} // namespace pspec\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOSPECTRUM_LANCZOS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Pseudospectrum/Power.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOSPECTRUM_POWER_HPP\n#define ELEM_PSEUDOSPECTRUM_POWER_HPP\n\n#include \"./Util.hpp\"\n\nnamespace elem {\nnamespace pspec {\n\ntemplate<typename Real>\ninline void\nDeflate\n( Matrix<Complex<Real>>& activeShifts, \n  Matrix<Int          >& activePreimage,\n  Matrix<Complex<Real>>& activeX,\n  Matrix<Real         >& activeEsts, \n  Matrix<Int          >& activeConverged,\n  Matrix<Int          >& activeItCounts,\n  bool progress=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Deflate\"))\n    Timer timer;\n    if( progress )\n        timer.Start();\n    const Int numActive = activeX.Width(); \n    Int swapTo = numActive-1;\n    for( Int swapFrom=numActive-1; swapFrom>=0; --swapFrom )\n    {\n        if( activeConverged.Get(swapFrom,0) )\n        {\n            if( swapTo != swapFrom )\n            {\n                RowSwap( activeShifts,   swapFrom, swapTo );\n                RowSwap( activePreimage, swapFrom, swapTo );\n                RowSwap( activeEsts,     swapFrom, swapTo );\n                RowSwap( activeItCounts, swapFrom, swapTo );\n                ColSwap( activeX,        swapFrom, swapTo );\n            }\n            --swapTo;\n        }\n    }\n    if( progress )\n        std::cout << \"Deflation took \" << timer.Stop() << \" seconds\" \n                  << std::endl;\n}\n\ntemplate<typename Real>\ninline void\nDeflate\n( Matrix<Complex<Real>>& activeShifts,\n  Matrix<Int          >& activePreimage,\n  Matrix<Real         >& activeXReal,\n  Matrix<Real         >& activeXImag,\n  Matrix<Real         >& activeEsts,\n  Matrix<Int          >& activeConverged,\n  Matrix<Int          >& activeItCounts,\n  bool progress=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Deflate\"))\n    Timer timer;\n    if( progress )\n        timer.Start();\n    const Int numActive = activeXReal.Width();\n    Int swapTo = numActive-1;\n    for( Int swapFrom=numActive-1; swapFrom>=0; --swapFrom )\n    {\n        if( activeConverged.Get(swapFrom,0) )\n        {\n            if( swapTo != swapFrom )\n            {\n                RowSwap( activeShifts,   swapFrom, swapTo );\n                RowSwap( activePreimage, swapFrom, swapTo );\n                RowSwap( activeEsts,     swapFrom, swapTo );\n                RowSwap( activeItCounts, swapFrom, swapTo );\n                ColSwap( activeXReal,    swapFrom, swapTo );\n                ColSwap( activeXImag,    swapFrom, swapTo );\n            }\n            --swapTo;\n        }\n    }\n    if( progress )\n        std::cout << \"Deflation took \" << timer.Stop() << \" seconds\"\n                  << std::endl;\n}\n\ntemplate<typename Real>\ninline void\nDeflate\n( DistMatrix<Complex<Real>,VR,STAR>& activeShifts,\n  DistMatrix<Int,          VR,STAR>& activePreimage,\n  DistMatrix<Complex<Real>        >& activeX,\n  DistMatrix<Real,         MR,STAR>& activeEsts,\n  DistMatrix<Int,          MR,STAR>& activeConverged,\n  DistMatrix<Int,          VR,STAR>& activeItCounts,\n  bool progress=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Deflate\"))\n    Timer timer;\n    if( progress && activeShifts.Grid().Rank() == 0 )\n        timer.Start();\n    const Int numActive = activeX.Width(); \n    Int swapTo = numActive-1;\n\n    DistMatrix<Complex<Real>,STAR,STAR> shiftsCopy( activeShifts );\n    DistMatrix<Int,STAR,STAR> preimageCopy( activePreimage );\n    DistMatrix<Real,STAR,STAR> estimatesCopy( activeEsts );\n    DistMatrix<Int, STAR,STAR> itCountsCopy( activeItCounts );\n    DistMatrix<Int, STAR,STAR> convergedCopy( activeConverged );\n    DistMatrix<Complex<Real>,VC,STAR> XCopy( activeX );\n\n    for( Int swapFrom=numActive-1; swapFrom>=0; --swapFrom )\n    {\n        if( convergedCopy.Get(swapFrom,0) )\n        {\n            if( swapTo != swapFrom )\n            {\n                RowSwap( shiftsCopy,    swapFrom, swapTo );\n                RowSwap( preimageCopy,  swapFrom, swapTo );\n                RowSwap( estimatesCopy, swapFrom, swapTo );\n                RowSwap( itCountsCopy,  swapFrom, swapTo );\n                ColSwap( XCopy,         swapFrom, swapTo );\n            }\n            --swapTo;\n        }\n    }\n\n    activeShifts   = shiftsCopy;\n    activePreimage = preimageCopy;\n    activeEsts     = estimatesCopy;\n    activeItCounts = itCountsCopy;\n    activeX        = XCopy;\n\n    if( progress && activeShifts.Grid().Rank() == 0 )\n        std::cout << \"Deflation took \" << timer.Stop() << \" seconds\"\n                  << std::endl;\n}\n\ntemplate<typename Real>\ninline void\nDeflate\n( DistMatrix<Complex<Real>,VR,STAR>& activeShifts,\n  DistMatrix<Int,          VR,STAR>& activePreimage,\n  DistMatrix<Real                 >& activeXReal,\n  DistMatrix<Real                 >& activeXImag,\n  DistMatrix<Real,         MR,STAR>& activeEsts,\n  DistMatrix<Int,          MR,STAR>& activeConverged,\n  DistMatrix<Int,          VR,STAR>& activeItCounts,\n  bool progress=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Deflate\"))\n    Timer timer;\n    if( progress && activeShifts.Grid().Rank() == 0 )\n        timer.Start();\n    const Int numActive = activeXReal.Width();\n    Int swapTo = numActive-1;\n\n    DistMatrix<Complex<Real>,STAR,STAR> shiftsCopy( activeShifts );\n    DistMatrix<Int,STAR,STAR> preimageCopy( activePreimage );\n    DistMatrix<Real,STAR,STAR> estimatesCopy( activeEsts );\n    DistMatrix<Int, STAR,STAR> itCountsCopy( activeItCounts );\n    DistMatrix<Int, STAR,STAR> convergedCopy( activeConverged );\n    DistMatrix<Real,VC,STAR> XRealCopy( activeXReal ),\n                             XImagCopy( activeXImag );\n\n    for( Int swapFrom=numActive-1; swapFrom>=0; --swapFrom )\n    {\n        if( convergedCopy.Get(swapFrom,0) )\n        {\n            if( swapTo != swapFrom )\n            {\n                RowSwap( shiftsCopy,    swapFrom, swapTo );\n                RowSwap( preimageCopy,  swapFrom, swapTo );\n                RowSwap( estimatesCopy, swapFrom, swapTo );\n                RowSwap( itCountsCopy,  swapFrom, swapTo );\n                ColSwap( XRealCopy,     swapFrom, swapTo );\n                ColSwap( XImagCopy,     swapFrom, swapTo );\n            }\n            --swapTo;\n        }\n    }\n\n    activeShifts   = shiftsCopy;\n    activePreimage = preimageCopy;\n    activeEsts     = estimatesCopy;\n    activeItCounts = itCountsCopy;\n    activeXReal    = XRealCopy;\n    activeXImag    = XImagCopy;\n\n    if( progress )\n    {\n        mpi::Barrier( activeShifts.Grid().Comm() );\n        if( activeShifts.Grid().Rank() == 0 )\n            std::cout << \"Deflation took \" << timer.Stop() << \" seconds\"\n                      << std::endl;\n    }\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nPower\n( const Matrix<Complex<Real>>& U, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Power\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = U.Height();\n    const Int numShifts = shifts.Height();\n\n    const Int maxIts = psCtrl.maxIts;\n    const bool deflate = psCtrl.deflate;\n    const bool progress = psCtrl.progress;\n\n    // Keep track of the number of iterations per shift\n    Matrix<Int> itCounts;\n    Ones( itCounts, numShifts, 1 );\n\n    // Keep track of the pivoting history if deflation is requested\n    Matrix<Int> preimage;\n    Matrix<C> pivShifts( shifts );\n    if( deflate )\n    {\n        preimage.Resize( numShifts, 1 );\n        for( Int j=0; j<numShifts; ++j )\n            preimage.Set( j, 0, j );\n    }\n\n    psCtrl.snapCtrl.ResetCounts();\n\n    // The Hessenberg case currently requires explicit access to the adjoint\n    Matrix<C> UAdj, activeShiftsConj;\n    if( !psCtrl.schur )\n        Adjoint( U, UAdj );\n\n    // Simultaneously run inverse iteration for various shifts\n    Timer timer;\n    Matrix<C> X;\n    Gaussian( X, n, numShifts );\n    FixColumns( X );\n    Int numIts=0, numDone=0;\n    Matrix<Real> estimates(numShifts,1);\n    Zeros( estimates, numShifts, 1 );\n    auto lastActiveEsts = estimates;\n    Matrix<Int> activePreimage;\n    while( true )\n    {\n        const Int numActive = ( deflate ? numShifts-numDone : numShifts );\n        auto activeShifts = View( pivShifts, 0, 0, numActive, 1 );\n        auto activeEsts = View( estimates, 0, 0, numActive, 1 );\n        auto activeItCounts = View( itCounts, 0, 0, numActive, 1 );\n        auto activeX = View( X, 0, 0, n, numActive );\n        if( deflate )\n            activePreimage = View( preimage, 0, 0, numActive, 1 );\n\n        if( progress )\n            timer.Start(); \n\n        if( psCtrl.schur )\n        {\n            MultiShiftTrsm\n            ( LEFT, UPPER, NORMAL, C(1), U, activeShifts, activeX );\n            FixColumns( activeX );\n            MultiShiftTrsm\n            ( LEFT, UPPER, ADJOINT, C(1), U, activeShifts, activeX );\n        }\n        else\n        {\n            Conjugate( activeShifts, activeShiftsConj );\n            MultiShiftHessSolve\n            ( UPPER, NORMAL, C(1), U, activeShifts, activeX );\n            FixColumns( activeX );\n            MultiShiftHessSolve\n            ( LOWER, NORMAL, C(1), UAdj, activeShiftsConj, activeX );\n        }\n\n        ColumnNorms( activeX, activeEsts );\n        CapEstimates( activeEsts );\n\n        auto activeConverged = \n            FindConverged\n            ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );\n        const Int numActiveDone = ZeroNorm( activeConverged );\n        if( deflate )\n            numDone += numActiveDone;\n        else\n            numDone = numActiveDone;\n        if( progress )\n        {\n            const double iterTime = timer.Stop();\n            std::cout << \"iteration \" << numIts << \": \" << iterTime \n                      << \" seconds, \" << numDone << \" of \" << numShifts \n                      << \" converged\" << std::endl;\n        }\n\n        ++numIts;\n        if( numIts >= maxIts )\n            break;\n\n        if( numDone == numShifts )\n            break;\n        else if( deflate && numActiveDone != 0 )\n            Deflate\n            ( activeShifts, activePreimage, activeX, activeEsts,\n              activeConverged, activeItCounts, progress );\n\n        lastActiveEsts = activeEsts;\n\n        // Save snapshots of the estimates at the requested rate\n        psCtrl.snapCtrl.Iterate();\n        Snapshot\n        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );\n    } \n\n    invNorms = estimates;\n    if( deflate )\n        RestoreOrdering( preimage, invNorms, itCounts );\n    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );\n\n    return itCounts;\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nPower\n( const DistMatrix<Complex<Real>        >& U, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts, \n        DistMatrix<Real,         VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Power\"))\n    using namespace pspec;\n    typedef Complex<Real> C;\n    const Int n = U.Height();\n    const Int numShifts = shifts.Height();\n    const Grid& g = U.Grid();\n\n    const Int maxIts = psCtrl.maxIts;\n    const bool deflate = psCtrl.deflate;\n    const bool progress = psCtrl.progress;\n\n    // Keep track of the number of iterations per shift\n    DistMatrix<Int,VR,STAR> itCounts(g);\n    Ones( itCounts, numShifts, 1 );\n\n    // Keep track of the pivoting history if deflation is requested\n    DistMatrix<Int,VR,STAR> preimage(g);\n    DistMatrix<C,  VR,STAR> pivShifts( shifts );\n    if( deflate )\n    {\n        preimage.AlignWith( shifts );\n        preimage.Resize( numShifts, 1 );\n        const Int numLocShifts = preimage.LocalHeight();\n        for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )\n        {\n            const Int i = preimage.GlobalRow(iLoc);\n            preimage.SetLocal( iLoc, 0, i );\n        }\n    }\n\n    psCtrl.snapCtrl.ResetCounts();\n\n    // The Hessenberg case currently requires explicit access to the adjoint\n    DistMatrix<C,VC,STAR> U_VC_STAR(g), UAdj_VC_STAR(g);\n    DistMatrix<C,VR,STAR> activeShiftsConj(g);\n    DistMatrix<C,STAR,VR> activeX_STAR_VR(g);\n    if( !psCtrl.schur )\n    {\n        U_VC_STAR = U;\n        Adjoint( U, UAdj_VC_STAR );\n    }\n\n    // Simultaneously run inverse iteration for various shifts\n    Timer timer;\n    DistMatrix<C> X(g);\n    Gaussian( X, n, numShifts );\n    FixColumns( X );\n    Int numIts=0, numDone=0;\n    DistMatrix<Real,MR,STAR> estimates(g);\n    estimates.AlignWith( shifts );\n    Zeros( estimates, numShifts, 1 );\n    auto lastActiveEsts = estimates;\n    DistMatrix<Int,VR,STAR> activePreimage(g);\n    while( true )\n    {\n        const Int numActive = ( deflate ? numShifts-numDone : numShifts );\n        auto activeShifts = View( pivShifts, 0, 0, numActive, 1 );\n        auto activeEsts = View( estimates, 0, 0, numActive, 1 );\n        auto activeItCounts = View( itCounts, 0, 0, numActive, 1 );\n        auto activeX = View( X, 0, 0, n, numActive );\n        if( deflate )\n            activePreimage = View( preimage, 0, 0, numActive, 1 );\n\n        if( progress && g.Rank() == 0 )\n            timer.Start();\n        if( psCtrl.schur )\n        {\n            MultiShiftTrsm\n            ( LEFT, UPPER, NORMAL, C(1), U, activeShifts, activeX );\n            FixColumns( activeX );\n            MultiShiftTrsm\n            ( LEFT, UPPER, ADJOINT, C(1), U, activeShifts, activeX );\n        }\n        else\n        {\n            Conjugate( activeShifts, activeShiftsConj );\n            activeX_STAR_VR = activeX;\n            MultiShiftHessSolve\n            ( UPPER, NORMAL, C(1), U_VC_STAR, activeShifts,\n              activeX_STAR_VR );\n            FixColumns( activeX_STAR_VR );\n            MultiShiftHessSolve\n            ( LOWER, NORMAL, C(1), UAdj_VC_STAR, activeShiftsConj,\n              activeX_STAR_VR );\n            activeX = activeX_STAR_VR;\n        }\n        ColumnNorms( activeX, activeEsts );\n        CapEstimates( activeEsts );\n\n        auto activeConverged =\n            FindConverged\n            ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );\n        const Int numActiveDone = ZeroNorm( activeConverged );\n        if( deflate )\n            numDone += numActiveDone;\n        else\n            numDone = numActiveDone;\n        if( progress && g.Rank() == 0 )\n        {\n            const double iterTime = timer.Stop();\n            std::cout << \"iteration \" << numIts << \": \" << iterTime \n                      << \" seconds, \" << numDone << \" of \" << numShifts \n                      << \" converged\" << std::endl;\n        }\n\n        ++numIts;\n        if( numIts >= maxIts )\n            break;\n\n        if( numDone == numShifts )\n            break;\n        else if( deflate && numActiveDone != 0 )\n            Deflate\n            ( activeShifts, activePreimage, activeX, activeEsts,\n              activeConverged, activeItCounts, progress );\n\n        lastActiveEsts = activeEsts;\n\n        // Save snapshots of the estimates at the requested rate\n        psCtrl.snapCtrl.Iterate();\n        Snapshot\n        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );\n    } \n\n    invNorms = estimates;\n    if( deflate )\n        RestoreOrdering( preimage, invNorms, itCounts );\n    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );\n\n    return itCounts;\n}\n\n} // namespace pspec\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOSPECTRUM_POWER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Pseudospectrum/Util/BasicMath.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOSPECTRUM_UTIL_BASICMATH_HPP\n#define ELEM_PSEUDOSPECTRUM_UTIL_BASICMATH_HPP\n\n#include ELEM_FROBENIUSNORM_INC\n\nnamespace elem {\nnamespace pspec {\n\ntemplate<typename F>\ninline bool\nTriangIsNormal( const Matrix<F>& U, Base<F> tol )\n{\n    auto w = U.GetDiagonal();\n    const Base<F> diagFrob = FrobeniusNorm( w );\n    const Base<F> upperFrob = FrobeniusNorm( U );\n    const Base<F> offDiagFrob = Sqrt(upperFrob*upperFrob-diagFrob*diagFrob);\n    return offDiagFrob <= tol*diagFrob;\n}\n\ntemplate<typename F>\ninline bool\nTriangIsNormal( const DistMatrix<F>& U, Base<F> tol )\n{\n    auto w = U.GetDiagonal();\n    const Base<F> diagFrob = FrobeniusNorm( w );\n    const Base<F> upperFrob = FrobeniusNorm( U );\n    const Base<F> offDiagFrob = Sqrt(upperFrob*upperFrob-diagFrob*diagFrob);\n    return offDiagFrob <= tol*diagFrob;\n}\n\ntemplate<typename F>\ninline bool\nQuasiTriangIsNormal( const Matrix<F>& U, Base<F> tol )\n{\n    const auto w = schur::QuasiTriangEig( U );\n    const Base<F> eigFrob = FrobeniusNorm( w );\n    const Base<F> upperFrob = FrobeniusNorm( U );\n    const Base<F> strictlyUpperFrob = Sqrt(upperFrob*upperFrob-eigFrob*eigFrob);\n    return strictlyUpperFrob <= tol*eigFrob;\n}\n\ntemplate<typename F>\ninline bool\nQuasiTriangIsNormal( const DistMatrix<F>& U, Base<F> tol )\n{\n    const auto w = schur::QuasiTriangEig( U );\n    const Base<F> eigFrob = FrobeniusNorm( w );\n    const Base<F> upperFrob = FrobeniusNorm( U );\n    const Base<F> strictlyUpperFrob = Sqrt(upperFrob*upperFrob-eigFrob*eigFrob);\n    return strictlyUpperFrob <= tol*eigFrob;\n}\n\ntemplate<typename F>\ninline Base<F> NormCap()\n{ return Base<F>(1)/lapack::MachineEpsilon<Base<F>>(); }\n\ntemplate<typename Real>\ninline bool HasNan( const std::vector<Real>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::HasNan\"))\n    bool hasNan = false;\n    const Int n = x.size();\n    for( Int j=0; j<n; ++j )\n        if( std::isnan( x[j] ) )\n            hasNan = true;\n    return hasNan;\n}\n\ntemplate<typename F>\ninline bool HasNan( const Matrix<F>& H )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::HasNan\"))\n    bool hasNan = false;\n    const Int m = H.Height();\n    const Int n = H.Width();\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            if( std::isnan(H.GetRealPart(i,j)) ||\n                std::isnan(H.GetImagPart(i,j)) )\n                hasNan = true;\n    return hasNan;\n}\n\ntemplate<typename F,typename FComp>\ninline void\nColumnSubtractions\n( const std::vector<FComp>& components,\n  const Matrix<F>& X, Matrix<F>& Y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ColumnSubtractions\"))\n    const Int numShifts = Y.Width();\n    if( numShifts == 0 )\n        return;\n    const Int m = Y.Height();\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const F gamma = components[j];\n        blas::Axpy( m, -gamma, X.LockedBuffer(0,j), 1, Y.Buffer(0,j), 1 );\n    }\n}\n\ntemplate<typename Real>\ninline void\nColumnSubtractions\n( const std::vector<Complex<Real>>& components,\n  const Matrix<Real>& XReal, const Matrix<Real>& XImag,\n        Matrix<Real>& YReal,       Matrix<Real>& YImag )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ColumnSubtractions\"))\n    const Int numShifts = YReal.Width();\n    if( numShifts == 0 )\n        return;\n    const Int m = YReal.Height();\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const Complex<Real> gamma = components[j];\n        blas::Axpy\n        ( m, -gamma.real(), XReal.LockedBuffer(0,j), 1, YReal.Buffer(0,j), 1 );\n        blas::Axpy\n        ( m,  gamma.imag(), XImag.LockedBuffer(0,j), 1, YReal.Buffer(0,j), 1 );\n        blas::Axpy\n        ( m, -gamma.real(), XImag.LockedBuffer(0,j), 1, YImag.Buffer(0,j), 1 );\n        blas::Axpy\n        ( m, -gamma.imag(), XReal.LockedBuffer(0,j), 1, YImag.Buffer(0,j), 1 );\n    }\n}\n\ntemplate<typename F,typename FComp>\ninline void\nColumnSubtractions\n( const std::vector<FComp>& components,\n  const DistMatrix<F>& X, DistMatrix<F>& Y )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::ColumnSubtractions\");\n        if( X.ColAlign() != Y.ColAlign() || X.RowAlign() != Y.RowAlign() )\n            LogicError(\"X and Y should have been aligned\");\n    )\n    ColumnSubtractions( components, X.LockedMatrix(), Y.Matrix() );\n}\n\ntemplate<typename Real>\ninline void\nColumnSubtractions\n( const std::vector<Complex<Real>>& components,\n  const DistMatrix<Real>& XReal, const DistMatrix<Real>& XImag,\n        DistMatrix<Real>& YReal,       DistMatrix<Real>& YImag )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::ColumnSubtractions\");\n        if( XReal.ColAlign() != YReal.ColAlign() || \n            XReal.RowAlign() != YReal.RowAlign() )\n            LogicError(\"X and Y should have been aligned\");\n    )\n    ColumnSubtractions\n    ( components, XReal.LockedMatrix(), XImag.LockedMatrix(), \n                  YReal.Matrix(),       YImag.Matrix() );\n}\n\ntemplate<typename F>\ninline void\nColumnNorms( const Matrix<F>& X, Matrix<Base<F>>& norms )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ColumnNorms\"))\n    typedef Base<F> Real;\n    const Int m = X.Height();\n    const Int n = X.Width();\n    norms.Resize( n, 1 );\n    for( Int j=0; j<n; ++j )\n    {\n        const Real alpha = blas::Nrm2( m, X.LockedBuffer(0,j), 1 );\n        norms.Set( j, 0, alpha );\n    }\n}\n\ntemplate<typename Real>\ninline void\nColumnNorms\n( const Matrix<Real>& XReal, const Matrix<Real>& XImag, Matrix<Real>& norms )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ColumnNorms\"))\n    const Int m = XReal.Height();\n    const Int n = XReal.Width();\n    norms.Resize( n, 1 );\n    for( Int j=0; j<n; ++j )\n    {\n        const Real alpha = blas::Nrm2( m, XReal.LockedBuffer(0,j), 1 );\n        const Real beta  = blas::Nrm2( m, XImag.LockedBuffer(0,j), 1 );\n        norms.Set( j, 0, lapack::SafeNorm(alpha,beta) );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nColumnNorms( const DistMatrix<F,U,V>& X, DistMatrix<Base<F>,V,STAR>& norms )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::ColumnNorms\");\n        if( X.RowAlign() != norms.ColAlign() )\n            LogicError(\"Invalid norms alignment\");\n    )\n    typedef Base<F> Real;\n    const Int n = X.Width();\n    const Int mLocal = X.LocalHeight();\n    const Int nLocal = X.LocalWidth();\n\n    // TODO: Switch to more stable parallel norm computation using scaling\n    norms.Resize( n, 1 );\n    for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n    {\n        const Base<F> localNorm = blas::Nrm2(mLocal,X.LockedBuffer(0,jLoc),1);\n        norms.SetLocal( jLoc, 0, localNorm*localNorm );\n    }\n\n    mpi::AllReduce( norms.Buffer(), nLocal, mpi::SUM, X.ColComm() );\n    for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n    {\n        const Real alpha = norms.GetLocal(jLoc,0);\n        norms.SetLocal( jLoc, 0, Sqrt(alpha) );\n    }\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nColumnNorms\n( const DistMatrix<Real,U,V>& XReal, \n  const DistMatrix<Real,U,V>& XImag, DistMatrix<Real,V,STAR>& norms )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::ColumnNorms\");\n        if( XReal.RowAlign() != norms.ColAlign() )\n            LogicError(\"Invalid norms alignment\");\n    )\n    const Int n = XReal.Width();\n    const Int mLocal = XReal.LocalHeight();\n    const Int nLocal = XReal.LocalWidth();\n\n    // TODO: Switch to more stable parallel norm computation using scaling\n    norms.Resize( n, 1 );\n    for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n    {\n        const Real alpha = blas::Nrm2(mLocal,XReal.LockedBuffer(0,jLoc),1);\n        const Real beta = blas::Nrm2(mLocal,XImag.LockedBuffer(0,jLoc),1);\n        const Real gamma = lapack::SafeNorm(alpha,beta);\n        norms.SetLocal( jLoc, 0, gamma*gamma );\n    }\n\n    mpi::AllReduce( norms.Buffer(), nLocal, mpi::SUM, XReal.ColComm() );\n    for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n    {\n        const Real alpha = norms.GetLocal(jLoc,0);\n        norms.SetLocal( jLoc, 0, Sqrt(alpha) );\n    }\n}\n\ntemplate<typename F>\ninline void\nColumnNorms( const Matrix<F>& X, std::vector<Base<F>>& norms )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ColumnNorms\"))\n    typedef Base<F> Real;\n    Matrix<Real> normCol;\n    ColumnNorms( X, normCol );\n\n    const Int numShifts = X.Width();\n    norms.resize( numShifts );\n    for( Int j=0; j<numShifts; ++j )\n        norms[j] = normCol.Get(j,0);\n}\n\ntemplate<typename Real>\ninline void\nColumnNorms\n( const Matrix<Real>& XReal, \n  const Matrix<Real>& XImag, std::vector<Real>& norms )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ColumnNorms\"))\n    Matrix<Real> normCol;\n    ColumnNorms( XReal, XImag, normCol );\n\n    const Int numShifts = XReal.Width();\n    norms.resize( numShifts );\n    for( Int j=0; j<numShifts; ++j )\n        norms[j] = normCol.Get(j,0);\n}\n\ntemplate<typename F>\ninline void\nColumnNorms( const DistMatrix<F>& X, std::vector<Base<F>>& norms )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ColumnNorms\"))\n    typedef Base<F> Real;\n    DistMatrix<Real,MR,STAR> normCol( X.Grid() );\n    ColumnNorms( X, normCol );\n\n    const Int numLocShifts = X.LocalWidth();\n    norms.resize( numLocShifts );\n    for( Int jLoc=0; jLoc<numLocShifts; ++jLoc )\n        norms[jLoc] = normCol.GetLocal(jLoc,0);\n}\n\ntemplate<typename Real>\ninline void\nColumnNorms\n( const DistMatrix<Real>& XReal, \n  const DistMatrix<Real>& XImag, std::vector<Real>& norms )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ColumnNorms\"))\n    DistMatrix<Real,MR,STAR> normCol( XReal.Grid() );\n    ColumnNorms( XReal, XImag, normCol );\n\n    const Int numLocShifts = XReal.LocalWidth();\n    norms.resize( numLocShifts );\n    for( Int jLoc=0; jLoc<numLocShifts; ++jLoc )\n        norms[jLoc] = normCol.GetLocal(jLoc,0);\n}\n\ntemplate<typename F>\ninline void\nInnerProducts\n( const Matrix<F>& X, const Matrix<F>& Y, std::vector<Base<F>>& innerProds )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::InnerProducts\"))\n    typedef Base<F> Real;\n    const Int numShifts = X.Width();\n    const Int m = X.Height();\n    innerProds.resize( numShifts );\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const Real alpha =\n            RealPart(blas::Dot( m, X.LockedBuffer(0,j), 1,\n                                   Y.LockedBuffer(0,j), 1 ));\n        innerProds[j] = alpha;\n    }\n}\n\ntemplate<typename Real>\ninline void\nInnerProducts\n( const Matrix<Real>& XReal, const Matrix<Real>& XImag,\n  const Matrix<Real>& YReal, const Matrix<Real>& YImag, \n        std::vector<Real>& innerProds )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::InnerProducts\"))\n    const Int numShifts = XReal.Width();\n    const Int m = XReal.Height();\n    innerProds.resize( numShifts );\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const Real alpha =\n            blas::Dot( m, XReal.LockedBuffer(0,j), 1,\n                          YReal.LockedBuffer(0,j), 1 );\n        const Real beta = \n            blas::Dot( m, XImag.LockedBuffer(0,j), 1,\n                          YImag.LockedBuffer(0,j), 1 );\n        innerProds[j] = alpha + beta;\n    }\n}\n\ntemplate<typename F>\ninline void\nInnerProducts\n( const Matrix<F>& X, const Matrix<F>& Y, std::vector<F>& innerProds )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::InnerProducts\"))\n    const Int numShifts = X.Width();\n    const Int m = X.Height();\n    innerProds.resize( numShifts );\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const F alpha =\n            blas::Dot( m, X.LockedBuffer(0,j), 1,\n                          Y.LockedBuffer(0,j), 1 );\n        innerProds[j] = alpha;\n    }\n}\n\ntemplate<typename Real>\ninline void\nInnerProducts\n( const Matrix<Real>& XReal, const Matrix<Real>& XImag,\n  const Matrix<Real>& YReal, const Matrix<Real>& YImag, \n        std::vector<Complex<Real>>& innerProds )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::InnerProducts\"))\n    const Int numShifts = XReal.Width();\n    const Int m = XReal.Height();\n    innerProds.resize( numShifts );\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const Real alpha =\n            blas::Dot( m, XReal.LockedBuffer(0,j), 1,\n                          YReal.LockedBuffer(0,j), 1 );\n        const Real beta = \n            blas::Dot( m, XImag.LockedBuffer(0,j), 1,\n                          YImag.LockedBuffer(0,j), 1 );\n        const Real delta = \n            blas::Dot( m, XReal.LockedBuffer(0,j), 1,\n                          YImag.LockedBuffer(0,j), 1 );\n        const Real gamma =\n            blas::Dot( m, XImag.LockedBuffer(0,j), 1,\n                          YReal.LockedBuffer(0,j), 1 );\n        // Keep in mind that XImag should be conjugated\n        innerProds[j] = Complex<Real>(alpha+beta,delta-gamma);\n    }\n}\n\ntemplate<typename F>\ninline void\nInnerProducts\n( const DistMatrix<F>& X, const DistMatrix<F>& Y, \n  std::vector<Base<F>>& innerProds )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::InnerProducts\");\n        if( X.ColAlign() != Y.ColAlign() || X.RowAlign() != Y.RowAlign() )\n            LogicError(\"X and Y should have been aligned\");\n    )\n    InnerProducts( X.LockedMatrix(), Y.LockedMatrix(), innerProds );\n    const Int numLocShifts = X.LocalWidth();\n    mpi::AllReduce( innerProds.data(), numLocShifts, mpi::SUM, X.ColComm() );\n}\n\ntemplate<typename Real>\ninline void\nInnerProducts\n( const DistMatrix<Real>& XReal, const DistMatrix<Real>& XImag,\n  const DistMatrix<Real>& YReal, const DistMatrix<Real>& YImag,\n  std::vector<Real>& innerProds )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::InnerProducts\");\n        if( XReal.ColAlign() != YReal.ColAlign() || \n            XReal.RowAlign() != YReal.RowAlign() )\n            LogicError(\"X and Y should have been aligned\");\n    )\n    InnerProducts\n    ( XReal.LockedMatrix(), XImag.LockedMatrix(), \n      YReal.LockedMatrix(), YImag.LockedMatrix(), innerProds );\n    const Int numLocShifts = XReal.LocalWidth();\n    mpi::AllReduce\n    ( innerProds.data(), numLocShifts, mpi::SUM, XReal.ColComm() );\n}\n\ntemplate<typename F>\ninline void\nInnerProducts\n( const DistMatrix<F>& X, const DistMatrix<F>& Y, std::vector<F>& innerProds )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::InnerProducts\");\n        if( X.ColAlign() != Y.ColAlign() || X.RowAlign() != Y.RowAlign() )\n            LogicError(\"X and Y should have been aligned\");\n    )\n    InnerProducts( X.LockedMatrix(), Y.LockedMatrix(), innerProds );\n    const Int numLocShifts = X.LocalWidth();\n    mpi::AllReduce( innerProds.data(), numLocShifts, mpi::SUM, X.ColComm() );\n}\n\ntemplate<typename Real>\ninline void\nInnerProducts\n( const DistMatrix<Real>& XReal, const DistMatrix<Real>& XImag,\n  const DistMatrix<Real>& YReal, const DistMatrix<Real>& YImag,\n        std::vector<Complex<Real>>& innerProds )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::InnerProducts\");\n        if( XReal.ColAlign() != YReal.ColAlign() || \n            XReal.RowAlign() != YReal.RowAlign() )\n            LogicError(\"X and Y should have been aligned\");\n    )\n    InnerProducts\n    ( XReal.LockedMatrix(), XImag.LockedMatrix(), \n      YReal.LockedMatrix(), YImag.LockedMatrix(), innerProds );\n    const Int numLocShifts = XReal.LocalWidth();\n    mpi::AllReduce\n    ( innerProds.data(), numLocShifts, mpi::SUM, XReal.ColComm() );\n}\n\ntemplate<typename F>\ninline void\nInvBetaScale( const std::vector<Base<F>>& scales, Matrix<F>& Y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::InvBetaScale\"))\n    const Int numShifts = Y.Width();\n    if( numShifts == 0 )\n        return;\n    const Int m = Y.Height();\n    for( Int j=0; j<numShifts; ++j )\n        blas::Scal( m, F(1)/scales[j], Y.Buffer(0,j), 1 );\n}\n\ntemplate<typename F>\ninline void\nInvBetaScale( const std::vector<Base<F>>& scales, DistMatrix<F>& Y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::InvBetaScale\"))\n    InvBetaScale( scales, Y.Matrix() );\n}\n\ntemplate<typename F>\ninline void\nFixColumns( Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::FixColumns\"))\n    typedef Base<F> Real;\n    Matrix<Real> norms;\n    ColumnNorms( X, norms );\n    const Int m = X.Height();\n    const Int n = X.Width();\n    for( Int j=0; j<n; ++j )\n    {\n        auto x = View( X, 0, j, m, 1 );\n        Real norm = norms.Get(j,0);\n        if( norm == Real(0) )\n        {\n            MakeGaussian( x );\n            norm = FrobeniusNorm( x );\n        }\n        Scale( Real(1)/norm, x );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nFixColumns( DistMatrix<F,U,V>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::FixColumns\"))\n    typedef Base<F> Real;\n    DistMatrix<Real,V,STAR> norms( X.Grid() );\n    ColumnNorms( X, norms );\n    const Int m = X.Height();\n    const Int nLocal = X.LocalWidth();\n    for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n    {\n        const Int j = X.GlobalCol(jLoc);\n        auto x = View( X, 0, j, m, 1 );\n        Real norm = norms.GetLocal(jLoc,0);\n        if( norm == Real(0) )\n        {\n            MakeGaussian( x );\n            norm = FrobeniusNorm( x );\n        }\n        Scale( Real(1)/norm, x );\n    }\n}\n\ntemplate<typename Real>\ninline void CapEstimates( Matrix<Real>& activeEsts )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::CapEstimates\"))\n    const Real normCap = NormCap<Real>();\n    const Int n = activeEsts.Height();\n    for( Int j=0; j<n; ++j )\n    {\n        Real alpha = activeEsts.Get(j,0);\n        if( std::isnan(alpha) || alpha >= normCap )\n            alpha = normCap;\n        activeEsts.Set( j, 0, alpha );\n    }\n}\n\ntemplate<typename Real>\ninline void CapEstimates( DistMatrix<Real,MR,STAR>& activeEsts )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::CapEstimates\"))\n    CapEstimates( activeEsts.Matrix() );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nFindConverged\n( const Matrix<Real>& lastActiveEsts,\n  const Matrix<Real>& activeEsts,\n        Matrix<Int >& activeItCounts,\n        Real maxDiff )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::FindConverged\"))\n    const Real normCap = NormCap<Real>();\n\n    const Int numActiveShifts=activeEsts.Height();\n    Matrix<Int> activeConverged;\n    Zeros( activeConverged, numActiveShifts, 1 );\n\n    for( Int j=0; j<numActiveShifts; ++j )\n    {\n        const Real lastEst = lastActiveEsts.Get(j,0);\n        const Real currEst = activeEsts.Get(j,0);\n        bool converged = false;\n        if( currEst >= normCap )\n            converged = true;\n        else if( Abs(currEst) > 0 )\n            converged = (Abs(lastEst-currEst)/Abs(currEst) <= maxDiff);\n\n        if( converged )\n            activeConverged.Set( j, 0, 1 );\n        else\n            activeItCounts.Update( j, 0, 1 );\n    }\n    return activeConverged;\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,MR,STAR>\nFindConverged\n( const DistMatrix<Real,MR,STAR>& lastActiveEsts,\n  const DistMatrix<Real,MR,STAR>& activeEsts,\n        DistMatrix<Int, VR,STAR>& activeItCounts,\n        Real maxDiff )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::FindConverged\");\n        if( activeItCounts.ColAlign()%activeEsts.ColStride() !=\n            activeEsts.ColAlign() )\n            LogicError(\"Invalid column alignment\");\n    )\n    const Real normCap = NormCap<Real>();\n\n    DistMatrix<Int,MR,STAR> activeConverged( activeEsts.Grid() );\n    activeConverged.AlignWith( activeEsts );\n    Zeros( activeConverged, activeEsts.Height(), 1 );\n\n    const Int numLocShifts=activeEsts.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )\n    {\n        const Real lastEst = lastActiveEsts.GetLocal(iLoc,0);\n        const Real currEst = activeEsts.GetLocal(iLoc,0);\n        bool converged = false;\n        if( currEst >= normCap )\n            converged = true;\n        else if( Abs(currEst) > 0 )\n            converged = (Abs(lastEst-currEst)/Abs(currEst) <= maxDiff);\n\n        if( converged )\n            activeConverged.SetLocal( iLoc, 0, 1 );\n        else\n        {\n            const Int i = activeEsts.GlobalRow(iLoc);\n            activeItCounts.Update( i, 0, 1 );\n        }\n    }\n\n    return activeConverged;\n}\n\n} // namespace pspec\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOSPECTRUM_UTIL_BASICMATH_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Pseudospectrum/Util/Rearrange.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOSPECTRUM_UTIL_REARRANGE_HPP\n#define ELEM_PSEUDOSPECTRUM_UTIL_REARRANGE_HPP\n\nnamespace elem {\nnamespace pspec {\n\ntemplate<typename T>\ninline void\nReshapeIntoGrid( Int realSize, Int imagSize, const Matrix<T>& x, Matrix<T>& X )\n{\n#if 0    \n    X.Resize( imagSize, realSize );\n    for( Int j=0; j<realSize; ++j )\n    {\n        auto XSub = View( X, 0, j, imagSize, 1 );\n        auto xSub = LockedView( x, j*imagSize, 0, imagSize, 1 );\n        XSub = xSub;\n    }\n#else\n    // The sequential case can be optimized much more heavily than in parallel\n    X.Resize( imagSize, realSize, imagSize );\n    MemCopy( X.Buffer(), x.LockedBuffer(), realSize*imagSize );\n#endif\n}\n\ntemplate<typename T>\ninline void\nReshapeIntoGrid\n( Int realSize, Int imagSize, const DistMatrix<T,VR,STAR>& x, DistMatrix<T>& X )\n{\n    X.SetGrid( x.Grid() );\n    X.Resize( imagSize, realSize );\n    for( Int j=0; j<realSize; ++j )\n    {\n        auto XSub = View( X, 0, j, imagSize, 1 );\n        auto xSub = LockedView( x, j*imagSize, 0, imagSize, 1 );\n        XSub = xSub;\n    }\n}\n\ntemplate<typename T>\ninline void\nRestoreOrdering\n( const Matrix<Int>& preimage, Matrix<T>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::RestoreOrdering\"))\n    auto xCopy = x;\n    const Int numShifts = preimage.Height();\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const Int dest = preimage.Get(j,0);\n        x.Set( dest, 0, xCopy.Get(j,0) );\n    }\n}\n\ntemplate<typename T1,typename T2>\ninline void\nRestoreOrdering\n( const Matrix<Int>& preimage, Matrix<T1>& x, Matrix<T2>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::RestoreOrdering\"))\n    auto xCopy = x;\n    auto yCopy = y;\n    const Int numShifts = preimage.Height();\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const Int dest = preimage.Get(j,0);\n        x.Set( dest, 0, xCopy.Get(j,0) );\n        y.Set( dest, 0, yCopy.Get(j,0) );\n    }\n}\n\ntemplate<typename T>\ninline void\nRestoreOrdering\n( const DistMatrix<Int,VR,STAR>& preimage,\n        DistMatrix<T,  VR,STAR>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::RestoreOrdering\"))\n    DistMatrix<Int,STAR,STAR> preimageCopy( preimage );\n    DistMatrix<T,STAR,STAR> xCopy( x );\n    const Int numShifts = preimage.Height();\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const Int dest = preimageCopy.Get(j,0);\n        x.Set( dest, 0, xCopy.Get(j,0) );\n    }\n}\n\ntemplate<typename T1,typename T2>\ninline void\nRestoreOrdering\n( const DistMatrix<Int,VR,STAR>& preimage,\n        DistMatrix<T1, VR,STAR>& x,\n        DistMatrix<T2, VR,STAR>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::RestoreOrdering\"))\n    DistMatrix<Int,STAR,STAR> preimageCopy( preimage );\n    DistMatrix<T1, STAR,STAR> xCopy( x );\n    DistMatrix<T2, STAR,STAR> yCopy( y );\n    const Int numShifts = preimage.Height();\n    for( Int j=0; j<numShifts; ++j )\n    {\n        const Int dest = preimageCopy.Get(j,0);\n        x.Set( dest, 0, xCopy.Get(j,0) );\n        y.Set( dest, 0, yCopy.Get(j,0) );\n    }\n}\n\ntemplate<typename T1,typename T2>\ninline void\nExtractList\n( const std::vector<std::vector<T1>>& vecList, std::vector<T2>& list, Int i )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::ExtractList\");\n        if( vecList.size() != 0 && vecList[0].size() <= i )\n            LogicError(\"Invalid index\");\n    )\n    const Int numVecs = vecList.size();\n    list.resize( numVecs );\n    for( Int k=0; k<numVecs; ++k )\n        list[k] = vecList[k][i];\n}\n\ntemplate<typename T1,typename T2>\ninline void\nExtractList\n( const std::vector<Matrix<T1>>& matList, std::vector<T2>& list, Int i, Int j )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::ExtractList\"))\n    const Int numMats = matList.size();\n    list.resize( numMats );\n    for( Int k=0; k<numMats; ++k )\n        list[k] = matList[k].Get( i, j );\n}\n\ntemplate<typename T1,typename T2>\ninline void\nPlaceList\n( std::vector<std::vector<T1>>& vecList, const std::vector<T2>& list, Int i )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::PlaceList\");\n        if( vecList.size() != 0 && vecList[0].size() <= i )\n            LogicError(\"Invalid index\");\n        if( vecList.size() != list.size() )\n            LogicError(\"List sizes do not match\");\n    )\n    const Int numVecs = vecList.size();\n    for( Int k=0; k<numVecs; ++k )\n        vecList[k][i] = list[k];\n}\n\ntemplate<typename T1,typename T2>\ninline void\nPlaceList\n( std::vector<Matrix<T1>>& matList, const std::vector<T2>& list, Int i, Int j )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::PlaceList\");\n        if( matList.size() != list.size() )\n            LogicError(\"List sizes do not match\");\n    )\n    const Int numMats = matList.size();\n    for( Int k=0; k<numMats; ++k )\n        matList[k].Set( i, j, list[k] );\n}\n\ntemplate<typename T1,typename T2>\ninline void\nUpdateList\n( std::vector<Matrix<T1>>& matList, const std::vector<T2>& list, Int i, Int j )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::UpdateList\");\n        if( matList.size() != list.size() )\n            LogicError(\"List sizes do not match\");\n    )\n    const Int numMats = matList.size();\n    for( Int k=0; k<numMats; ++k )\n        matList[k].Update( i, j, list[k] );\n}\n\ntemplate<typename T1,typename T2>\ninline void\nPushBackList\n( std::vector<std::vector<T1>>& vecList, const std::vector<T2>& list )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pspec::PushBackList\"); \n        if( vecList.size() != list.size() )\n            LogicError(\"List sizes do not match\");\n    )\n    const Int numVecs = vecList.size();\n    for( Int k=0; k<numVecs; ++k )\n        vecList[k].push_back( list[k] );\n}\n\n} // namespace pspec\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOSPECTRUM_UTIL_REARRANGE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Pseudospectrum/Util/Snapshot.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOSPECTRUM_UTIL_SNAPSHOT_HPP\n#define ELEM_PSEUDOSPECTRUM_UTIL_SNAPSHOT_HPP\n\n#include ELEM_ENTRYWISEMAP_INC\n\nnamespace elem {\n\n// Configurations for how often and what format numerical (num) and image (img)\n// snapshots of the pseudospectral estimates should be saved\nstruct SnapshotCtrl\n{\n    Int realSize, imagSize;\n\n    Int imgSaveFreq, numSaveFreq, imgDispFreq;\n    Int imgSaveCount, numSaveCount, imgDispCount;\n    std::string imgBase, numBase;\n    FileFormat imgFormat, numFormat;\n    bool itCounts;\n\n    SnapshotCtrl()\n    : realSize(0), imagSize(0),\n      imgSaveFreq(-1), numSaveFreq(-1), imgDispFreq(-1), \n      imgSaveCount(0), numSaveCount(0), imgDispCount(0),\n      imgBase(\"ps\"), numBase(\"ps\"), imgFormat(PNG), numFormat(ASCII_MATLAB),\n      itCounts(true)\n    { }\n\n    void ResetCounts()\n    {\n        imgSaveCount = 0;\n        numSaveCount = 0;\n        imgDispCount = 0;\n    }\n    void Iterate()\n    {\n        ++imgSaveCount;\n        ++numSaveCount;\n        ++imgDispCount;\n    }\n};\n\nnamespace pspec {\n\ntemplate<typename Real>\ninline void\nSnapshot\n( const Matrix<Int>& preimage, const Matrix<Real>& estimates, \n  const Matrix<Int>& itCounts,\n  Int numIts, bool deflate, SnapshotCtrl& snapCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Snapshot\"));\n    if( snapCtrl.realSize != 0 && snapCtrl.imagSize != 0 )\n    {\n        const bool numSave = \n            ( snapCtrl.numSaveFreq > 0 && \n              snapCtrl.numSaveCount >= snapCtrl.numSaveFreq );\n        const bool imgSave = \n            ( snapCtrl.imgSaveFreq > 0 && \n              snapCtrl.imgSaveCount >= snapCtrl.imgSaveFreq );\n        const bool imgDisp = \n            ( snapCtrl.imgDispFreq > 0 &&\n              snapCtrl.imgDispCount >= snapCtrl.imgDispFreq );\n        Matrix<Real> invNorms, estMap;\n        Matrix<Int> itCountsReord, itCountMap;\n        if( numSave || imgSave || imgDisp )\n        {\n            invNorms = estimates;\n            if( deflate )\n                RestoreOrdering( preimage, invNorms );\n            ReshapeIntoGrid\n            ( snapCtrl.realSize, snapCtrl.imagSize, invNorms, estMap );\n            if( snapCtrl.itCounts )\n            {\n                itCountsReord = itCounts;\n                if( deflate )\n                    RestoreOrdering( preimage, itCountsReord );\n                ReshapeIntoGrid\n                ( snapCtrl.realSize, snapCtrl.imagSize, itCountsReord, \n                  itCountMap );\n            }\n        }\n        if( numSave )\n        {\n            std::ostringstream os;\n            os << snapCtrl.numBase << \"-\" << numIts;\n            Write( estMap, os.str(), snapCtrl.numFormat );\n            if( snapCtrl.itCounts )\n                Write( itCountMap, os.str()+\"-counts\", snapCtrl.numFormat );\n            snapCtrl.numSaveCount = 0;\n        }\n        if( imgSave || imgDisp )\n            EntrywiseMap( estMap, []( Real alpha ) { return Log(alpha); } );\n        if( imgSave )\n        {\n            std::ostringstream os;\n            os << snapCtrl.imgBase << \"-\" << numIts;\n            Write( estMap, os.str(), snapCtrl.imgFormat );\n            if( snapCtrl.itCounts )\n                Write( itCountMap, os.str()+\"-counts\", snapCtrl.imgFormat );\n            auto colorMap = GetColorMap();\n            SetColorMap( GRAYSCALE_DISCRETE );\n            Write( estMap, os.str()+\"-discrete\", snapCtrl.imgFormat );\n            SetColorMap( colorMap );\n            snapCtrl.imgSaveCount = 0;\n        }\n        if( imgDisp )\n        {\n            std::ostringstream os;\n            os << snapCtrl.imgBase << \"-\" << numIts;\n            Display( estMap, os.str() );       \n            if( snapCtrl.itCounts )\n                Display( itCountMap, os.str()+\"-counts\" );\n            auto colorMap = GetColorMap();\n            SetColorMap( GRAYSCALE_DISCRETE );\n            Display( estMap, os.str()+\"-discrete\" );\n            SetColorMap( colorMap );\n            snapCtrl.imgDispCount = 0;\n        }\n    }\n}\n\ntemplate<typename Real>\ninline void\nFinalSnapshot\n( const Matrix<Real>& estimates, const Matrix<Int>& itCounts, \n  SnapshotCtrl& snapCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::FinalSnapshot\"));\n    if( snapCtrl.realSize != 0 && snapCtrl.imagSize != 0 )\n    {\n        const bool numSave = ( snapCtrl.numSaveFreq >= 0 );\n        const bool imgSave = ( snapCtrl.imgSaveFreq >= 0 );\n        const bool imgDisp = ( snapCtrl.imgDispFreq >= 0 );\n        Matrix<Real> estMap;\n        Matrix<Int> itCountMap;\n        if( numSave || imgSave || imgDisp )\n        {\n            ReshapeIntoGrid\n            ( snapCtrl.realSize, snapCtrl.imagSize, estimates, estMap );\n            if( snapCtrl.itCounts )\n                ReshapeIntoGrid\n                ( snapCtrl.realSize, snapCtrl.imagSize, itCounts, itCountMap );\n        }\n        if( numSave )\n        {\n            std::string base = snapCtrl.numBase;\n            Write( estMap, base, snapCtrl.numFormat );\n            if( snapCtrl.itCounts )\n                Write( itCountMap, base+\"-counts\", snapCtrl.numFormat );\n        }\n        if( imgSave || imgDisp )\n            EntrywiseMap( estMap, []( Real alpha ) { return Log(alpha); } );\n        if( imgSave )\n        {\n            std::string base = snapCtrl.imgBase;\n            Write( estMap, base, snapCtrl.imgFormat );\n            if( snapCtrl.itCounts )\n                Write( itCountMap, base+\"-counts\", snapCtrl.imgFormat );\n            auto colorMap = GetColorMap();\n            SetColorMap( GRAYSCALE_DISCRETE );\n            Write( estMap, base+\"-discrete\", snapCtrl.imgFormat );\n            SetColorMap( colorMap );\n        }\n        if( imgDisp )\n        {\n            std::string base = snapCtrl.imgBase;\n            Display( estMap, base );       \n            if( snapCtrl.itCounts )\n                Display( itCountMap, base+\"-counts\" );\n            auto colorMap = GetColorMap();\n            SetColorMap( GRAYSCALE_DISCRETE );\n            Display( estMap, base+\"-discrete\" );\n            SetColorMap( colorMap );\n        }\n    }\n}\n\ntemplate<typename Real>\ninline void\nSnapshot\n( const DistMatrix<Int,    VR,STAR>& preimage, \n  const DistMatrix<Real,MR,STAR>& estimates, \n  const DistMatrix<Int, VR,STAR>& itCounts,\n  Int numIts, bool deflate, SnapshotCtrl& snapCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::Snapshot\"));\n    if( snapCtrl.realSize != 0 && snapCtrl.imagSize != 0 )\n    {\n        const bool numSave = \n            ( snapCtrl.numSaveFreq > 0 && \n              snapCtrl.numSaveCount >= snapCtrl.numSaveFreq );\n        const bool imgSave = \n            ( snapCtrl.imgSaveFreq > 0 && \n              snapCtrl.imgSaveCount >= snapCtrl.imgSaveFreq );\n        const bool imgDisp =\n            ( snapCtrl.imgDispFreq > 0 &&\n              snapCtrl.imgDispCount >= snapCtrl.imgDispFreq );\n        DistMatrix<Real,VR,STAR> invNorms(estimates.Grid());\n        DistMatrix<Real> estMap(estimates.Grid()); \n        DistMatrix<Int, VR,STAR> itCountsReord(itCounts.Grid());\n        DistMatrix<Int> itCountMap(itCounts.Grid());\n        if( numSave || imgSave || imgDisp )\n        {\n            invNorms = estimates;\n            if( deflate )\n                RestoreOrdering( preimage, invNorms );\n            ReshapeIntoGrid\n            ( snapCtrl.realSize, snapCtrl.imagSize, invNorms, estMap );\n            if( snapCtrl.itCounts )\n            {\n                itCountsReord = itCounts;\n                if( deflate )\n                    RestoreOrdering( preimage, itCountsReord );\n                ReshapeIntoGrid\n                ( snapCtrl.realSize, snapCtrl.imagSize, itCountsReord, \n                  itCountMap );\n            }\n        }\n        if( numSave )\n        {\n            std::ostringstream os;\n            os << snapCtrl.numBase << \"-\" << numIts;\n            Write( estMap, os.str(), snapCtrl.numFormat );\n            if( snapCtrl.itCounts )\n                Write( itCountMap, os.str()+\"-counts\", snapCtrl.numFormat );\n            snapCtrl.numSaveCount = 0;\n        }\n        if( imgSave || imgDisp )\n            EntrywiseMap( estMap, []( Real alpha ) { return Log(alpha); } );\n        if( imgSave )\n        {\n            std::ostringstream os;\n            os << snapCtrl.imgBase << \"-\" << numIts;\n            Write( estMap, os.str(), snapCtrl.imgFormat );\n            if( snapCtrl.itCounts )\n                Write( itCountMap, os.str()+\"-counts\", snapCtrl.imgFormat );\n            auto colorMap = GetColorMap();\n            SetColorMap( GRAYSCALE_DISCRETE );\n            Write( estMap, os.str()+\"-discrete\", snapCtrl.imgFormat );\n            SetColorMap( colorMap );\n            snapCtrl.imgSaveCount = 0;\n        }\n        if( imgDisp )\n        {\n            std::ostringstream os;\n            os << snapCtrl.imgBase << \"-\" << numIts;\n            Display( estMap, os.str() );\n            if( snapCtrl.itCounts )\n                Display( itCountMap, os.str()+\"-counts\" );\n            auto colorMap = GetColorMap();\n            SetColorMap( GRAYSCALE_DISCRETE );\n            Display( estMap, os.str()+\"-discrete\" );\n            SetColorMap( colorMap );\n            snapCtrl.imgDispCount = 0;\n        }\n    }\n}\n\ntemplate<typename Real>\ninline void\nFinalSnapshot\n( const DistMatrix<Real,VR,STAR>& estimates, \n  const DistMatrix<Int, VR,STAR>& itCounts,\n  SnapshotCtrl& snapCtrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"pspec::FinalSnapshot\"));\n    if( snapCtrl.realSize != 0 && snapCtrl.imagSize != 0 )\n    {\n        const bool numSave = ( snapCtrl.numSaveFreq >= 0 );\n        const bool imgSave = ( snapCtrl.imgSaveFreq >= 0 );\n        const bool imgDisp = ( snapCtrl.imgDispFreq >= 0 );\n        DistMatrix<Real> estMap(estimates.Grid()); \n        DistMatrix<Int> itCountMap(itCounts.Grid());\n        if( numSave || imgSave || imgDisp )\n        {\n            ReshapeIntoGrid\n            ( snapCtrl.realSize, snapCtrl.imagSize, estimates, estMap );\n            if( snapCtrl.itCounts )\n                ReshapeIntoGrid\n                ( snapCtrl.realSize, snapCtrl.imagSize, itCounts, itCountMap );\n        }\n        if( numSave )\n        {\n            std::string base = snapCtrl.numBase;\n            Write( estMap, base, snapCtrl.numFormat );\n            if( snapCtrl.itCounts )\n                Write( itCountMap, base+\"-counts\", snapCtrl.numFormat );\n        }\n        if( imgSave || imgDisp )\n            EntrywiseMap( estMap, []( Real alpha ) { return Log(alpha); } );\n        if( imgSave )\n        {\n            std::string base = snapCtrl.imgBase;\n            Write( estMap, base, snapCtrl.imgFormat );\n            if( snapCtrl.itCounts )\n                Write( itCountMap, base+\"-counts\", snapCtrl.imgFormat );\n            auto colorMap = GetColorMap();\n            SetColorMap( GRAYSCALE_DISCRETE );\n            Write( estMap, base+\"-discrete\", snapCtrl.imgFormat );\n            SetColorMap( colorMap );\n        }\n        if( imgDisp )\n        {\n            std::string base = snapCtrl.imgBase;\n            Display( estMap, base );           \n            if( snapCtrl.itCounts )\n                Display( itCountMap, base+\"-counts\" );\n            auto colorMap = GetColorMap();\n            SetColorMap( GRAYSCALE_DISCRETE );\n            Display( estMap, base+\"-discrete\" );\n            SetColorMap( colorMap );\n        }\n    }\n}\n\n} // namespace pspec\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOSPECTRUM_UTIL_SNAPSHOT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Pseudospectrum/Util.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOSPECTRUM_UTIL_HPP\n#define ELEM_PSEUDOSPECTRUM_UTIL_HPP\n\n#include ELEM_MULTISHIFTQUASITRSM_INC\n#include ELEM_MULTISHIFTTRSM_INC\n#include ELEM_MULTISHIFTHESSSOLVE_INC\n#include ELEM_ZERONORM_INC\n#include ELEM_ONES_INC\n\n#include \"./Util/Rearrange.hpp\"\n#include \"./Util/BasicMath.hpp\"\n#include \"./Util/Snapshot.hpp\"\n\nnamespace elem {\n\ntemplate<typename Real>\nstruct PseudospecCtrl\n{\n    // Preprocessing configuration\n    bool schur; // begin with reduction to Schur form?\n    bool forceComplexSchur;\n    bool forceComplexPs;\n    SdcCtrl<Real> sdcCtrl;\n\n    // Convergence and deflation criteria\n    Int maxIts;\n    Real tol;\n    bool deflate; \n\n    // (Implicitly Restarted) Arnoldi/Lanczos. If basisSize > 1, then\n    // there is implicit restarting\n    bool arnoldi;\n    Int basisSize;\n    bool reorthog; // only matters for IRL, which isn't currently used\n\n    // Whether or not to print progress information at each iteration\n    bool progress;\n\n    SnapshotCtrl snapCtrl;\n\n    PseudospecCtrl()\n    : schur(true), forceComplexSchur(false), forceComplexPs(false), sdcCtrl(),\n      maxIts(200), tol(1e-6), deflate(true),\n      arnoldi(true), basisSize(10), reorthog(true),\n      progress(false), snapCtrl()\n    { }\n};\n\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOSPECTRUM_UTIL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Pseudospectrum.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PSEUDOSPECTRUM_HPP\n#define ELEM_PSEUDOSPECTRUM_HPP\n\n#include ELEM_COPY_INC\n#include ELEM_MAXNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_TWONORMESTIMATE_INC\n#include ELEM_HESSENBERG_INC\n#include ELEM_SCHUR_INC\n\n#include \"./Pseudospectrum/Util.hpp\"\n#include \"./Pseudospectrum/Power.hpp\"\n#include \"./Pseudospectrum/Lanczos.hpp\"\n#include \"./Pseudospectrum/IRA.hpp\"\n#include \"./Pseudospectrum/IRL.hpp\"\n#include \"./Pseudospectrum/Analytic.hpp\"\n\nnamespace elem {\n\ntemplate<typename Real>\ninline Matrix<Int>\nTriangularPseudospectrum\n( const Matrix<Complex<Real>>& U, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriangularPseudospectrum\"))\n\n    // Check if the off-diagonal is sufficiently small; if so, compute the \n    // pseudospectrum analytically from the eigenvalues. This also takes care\n    // of the case where the matrix is a constant multiple of the identity \n    // matrix, which, after shifting, can lead to the zero matrix, which would \n    // cause problems for the Lanczos convergence criteria.\n    if( pspec::TriangIsNormal( U, psCtrl.tol ) )\n    {\n        Matrix<Int> itCounts;\n        if( psCtrl.progress )\n            std::cout << \"Matrix was numerically normal\" << std::endl;\n        auto w = U.GetDiagonal();\n        pspec::Analytic( w, shifts, invNorms, psCtrl.snapCtrl );\n        Zeros( itCounts, shifts.Height(), 1 );        \n        return itCounts;\n    }\n\n    psCtrl.schur = true;\n    if( psCtrl.arnoldi )\n    {\n        if( psCtrl.basisSize > 1 )\n            return pspec::IRA( U, shifts, invNorms, psCtrl );\n        else\n            return pspec::Lanczos( U, shifts, invNorms, psCtrl );\n    }\n    else\n        return pspec::Power( U, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nTriangularPseudospectrum\n( const Matrix<Real>& U, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriangularPseudospectrum\"))\n    Matrix<Complex<Real>> UCpx;\n    Copy( U, UCpx );\n\n    // TODO: Use a real multi-shift TRSM instead\n    return TriangularPseudospectrum( UCpx, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nQuasiTriangularPseudospectrum\n( const Matrix<Real>& U, \n  const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiTriangularPseudospectrum\"))\n\n    // Check if the off-diagonal is sufficiently small; if so, compute the \n    // pseudospectrum analytically from the eigenvalues. This also takes care\n    // of the case where the matrix is a constant multiple of the identity \n    // matrix, which, after shifting, can lead to the zero matrix, which would \n    // cause problems for the Lanczos convergence criteria.\n    if( pspec::QuasiTriangIsNormal( U, psCtrl.tol ) )\n    {\n        Matrix<Int> itCounts;\n        if( psCtrl.progress )\n            std::cout << \"Matrix was numerically normal\" << std::endl;\n        const auto w = schur::QuasiTriangEig( U );\n        pspec::Analytic( w, shifts, invNorms, psCtrl.snapCtrl );\n        Zeros( itCounts, shifts.Height(), 1 );        \n        return itCounts;\n    }\n\n    psCtrl.schur = true;\n    return pspec::IRA( U, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nHessenbergPseudospectrum\n( const Matrix<Complex<Real>>& H, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HessenbergPseudospectrum\"))\n\n    // TODO: Check if the subdiagonal is numerically zero, and, if so, revert to\n    //       triangular version of Pseudospectrum?\n    psCtrl.schur = false;\n    if( psCtrl.arnoldi )\n    {\n        if( psCtrl.basisSize > 1 )\n            return pspec::IRA( H, shifts, invNorms, psCtrl );\n        else\n            return pspec::Lanczos( H, shifts, invNorms, psCtrl );\n    }\n    else\n        return pspec::Power( H, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nHessenbergPseudospectrum\n( const Matrix<Real>& H, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HessenbergPseudospectrum\"))\n    Matrix<Complex<Real>> HCpx;\n    Copy( H, HCpx );\n\n    // TODO: Use a real multi-shift Hess. solve instead\n    return HessenbergPseudospectrum( HCpx, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nTriangularPseudospectrum\n( const DistMatrix<Complex<Real>>& U, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts,\n  DistMatrix<Real,VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriangularPseudospectrum\"))\n    const Grid& g = U.Grid();\n\n    // Check if the off-diagonal is sufficiently small; if so, compute the \n    // pseudospectrum analytically from the eigenvalues. This also takes care\n    // of the case where the matrix is a constant multiple of the identity \n    // matrix, which, after shifting, can lead to the zero matrix, which would \n    // cause problems for the Lanczos convergence criteria.\n    if( pspec::TriangIsNormal( U, psCtrl.tol ) )\n    {\n        DistMatrix<Int,VR,STAR> itCounts(g);\n        if( psCtrl.progress && g.Rank() == 0 )\n            std::cout << \"Matrix was numerically normal\" << std::endl;\n        auto w = U.GetDiagonal();\n        pspec::Analytic( w, shifts, invNorms, psCtrl.snapCtrl );\n        itCounts.AlignWith( shifts );\n        Zeros( itCounts, shifts.Height(), 1 );\n        return itCounts;\n    }\n\n    psCtrl.schur = true;\n    if( psCtrl.arnoldi )\n    {\n        if( psCtrl.basisSize > 1 )\n            return pspec::IRA( U, shifts, invNorms, psCtrl );\n        else\n            return pspec::Lanczos( U, shifts, invNorms, psCtrl );\n    }\n    else\n        return pspec::Power( U, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nTriangularPseudospectrum\n( const DistMatrix<Real>& U, const DistMatrix<Complex<Real>,VR,STAR>& shifts,\n  DistMatrix<Real,VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriangularPseudospectrum\"))\n    DistMatrix<Complex<Real>> UCpx(U.Grid());\n    Copy( U, UCpx );\n\n    // TODO: Use a real multi-shift TRSM instead\n    return TriangularPseudospectrum( UCpx, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nQuasiTriangularPseudospectrum\n( const DistMatrix<Real>& U, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts,\n  DistMatrix<Real,VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiTriangularPseudospectrum\"))\n    const Grid& g = U.Grid();\n\n    // Check if the off-diagonal is sufficiently small; if so, compute the \n    // pseudospectrum analytically from the eigenvalues. This also takes care\n    // of the case where the matrix is a constant multiple of the identity \n    // matrix, which, after shifting, can lead to the zero matrix, which would \n    // cause problems for the Lanczos convergence criteria.\n    if( pspec::QuasiTriangIsNormal( U, psCtrl.tol ) )\n    {\n        DistMatrix<Int,VR,STAR> itCounts(g);\n        if( psCtrl.progress && g.Rank() == 0 )\n            std::cout << \"Matrix was numerically normal\" << std::endl;\n        auto w = schur::QuasiTriangEig( U );\n        pspec::Analytic( w, shifts, invNorms, psCtrl.snapCtrl );\n        itCounts.AlignWith( shifts );\n        Zeros( itCounts, shifts.Height(), 1 );\n        return itCounts;\n    }\n\n    psCtrl.schur = true;\n    return pspec::IRA( U, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nHessenbergPseudospectrum\n( const DistMatrix<Complex<Real>>& H, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts,\n  DistMatrix<Real,VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HessenbergPseudospectrum\"))\n\n    // TODO: Check if the subdiagonal is sufficiently small, and, if so, revert\n    //       to TriangularPseudospectrum\n    psCtrl.schur = false;\n    if( psCtrl.arnoldi )\n    {\n        if( psCtrl.basisSize > 1 )\n            return pspec::IRA( H, shifts, invNorms, psCtrl );\n        else\n            return pspec::Lanczos( H, shifts, invNorms, psCtrl );\n    }\n    else\n        return pspec::Power( H, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nHessenbergPseudospectrum\n( const DistMatrix<Real>& H, const DistMatrix<Complex<Real>,VR,STAR>& shifts,\n  DistMatrix<Real,VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HessenbergPseudospectrum\"))\n    DistMatrix<Complex<Real>> HCpx(H.Grid());\n    Copy( H, HCpx );\n\n    return HessenbergPseudospectrum( HCpx, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nPseudospectrum\n( const Matrix<Real>& A, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudospectrum\"))\n    typedef Complex<Real> C;\n\n    if( psCtrl.forceComplexSchur )\n    {\n        Matrix<C> ACpx;\n        Copy( A, ACpx );\n        return Pseudospectrum( ACpx, shifts, invNorms, psCtrl );\n    }\n\n    if( !psCtrl.schur )\n        LogicError(\"Real Hessenberg algorithm not yet supported\");\n    Matrix<Real> U( A );\n    Matrix<C> w;\n    const bool fullTriangle = true;\n    schur::QR( U, w, fullTriangle );\n    if( psCtrl.forceComplexPs )\n    {\n        Matrix<C> UCpx;\n        schur::RealToComplex( U, UCpx );\n        return TriangularPseudospectrum( UCpx, shifts, invNorms, psCtrl );\n    }\n    return QuasiTriangularPseudospectrum( U, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nPseudospectrum\n( const Matrix<Complex<Real>>& A, const Matrix<Complex<Real>>& shifts, \n  Matrix<Real>& invNorms, PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudospectrum\"))\n    typedef Complex<Real> C;\n\n    Matrix<C> U( A );\n    if( psCtrl.schur )\n    {\n        Matrix<C> w;\n        const bool fullTriangle = true;\n        schur::QR( U, w, fullTriangle );\n        return TriangularPseudospectrum( U, shifts, invNorms, psCtrl );\n    }\n    else\n    {\n        Hessenberg( UPPER, U );\n        return HessenbergPseudospectrum( U, shifts, invNorms, psCtrl );\n    }\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nPseudospectrum\n( const DistMatrix<Real>& A, const DistMatrix<Complex<Real>,VR,STAR>& shifts,\n  DistMatrix<Real,VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudospectrum\"))\n    typedef Complex<Real> C;\n    const Grid& g = A.Grid();\n\n    if( psCtrl.forceComplexSchur )\n    {\n        DistMatrix<C> ACpx(g);\n        Copy( A, ACpx );\n        return Pseudospectrum( ACpx, shifts, invNorms, psCtrl );\n    }\n\n    if( !psCtrl.schur )\n        LogicError(\"Real Hessenberg algorithm not yet supported\");\n    DistMatrix<Real> U( A );\n    DistMatrix<C,VR,STAR> w(g);\n    const bool fullTriangle = true;\n#ifdef ELEM_HAVE_SCALAPACK\n    schur::QR( U, w, fullTriangle );\n#else\n    // We don't actually need the Schur vectors, but SDC requires their \n    // computation in order to form the full triangular factor\n    DistMatrix<Real> X(g);\n    schur::SDC( U, w, X, fullTriangle, psCtrl.sdcCtrl );\n    X.Empty();\n#endif\n    if( psCtrl.forceComplexPs )\n    {\n        DistMatrix<C> UCpx(g);\n        schur::RealToComplex( U, UCpx );\n        return TriangularPseudospectrum( UCpx, shifts, invNorms, psCtrl );\n    }\n    return QuasiTriangularPseudospectrum( U, shifts, invNorms, psCtrl );\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int,VR,STAR>\nPseudospectrum\n( const DistMatrix<Complex<Real>>& A, \n  const DistMatrix<Complex<Real>,VR,STAR>& shifts,\n  DistMatrix<Real,VR,STAR>& invNorms, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudospectrum\"))\n    typedef Complex<Real> C;\n\n    const Grid& g = A.Grid();\n    DistMatrix<C> U( A );\n\n    if( psCtrl.schur )\n    {\n        DistMatrix<C,VR,STAR> w(g);\n        const bool fullTriangle = true;\n#ifdef ELEM_HAVE_SCALAPACK\n        schur::QR( U, w, fullTriangle );\n#else\n        // We don't actually need the Schur vectors, but SDC requires their \n        // computation in order to form the full triangular factor\n        DistMatrix<C> X(g);\n        schur::SDC( U, w, X, fullTriangle, psCtrl.sdcCtrl );\n        X.Empty();\n#endif\n        return TriangularPseudospectrum( U, shifts, invNorms, psCtrl );\n    }\n    else\n    {\n        Hessenberg( UPPER, U );\n        return HessenbergPseudospectrum( U, shifts, invNorms, psCtrl );\n    }\n}\n\n// Treat each pixel as being located a cell center and tesselate a box with\n// said square cells\ntemplate<typename F>\ninline Matrix<Int>\nTriangularPseudospectrum\n( const Matrix<F>& U, Matrix<Base<F>>& invNormMap, \n  Complex<Base<F>> center, Base<F> realWidth, Base<F> imagWidth,\n  Int realSize, Int imagSize, \n  PseudospecCtrl<Base<F>> psCtrl=PseudospecCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriangularPseudospectrum\"))\n    typedef Base<F> Real;\n    typedef Complex<Real> C;\n\n    psCtrl.snapCtrl.realSize = realSize;\n    psCtrl.snapCtrl.imagSize = imagSize;\n\n    const Real realStep = realWidth/realSize;\n    const Real imagStep = imagWidth/imagSize;\n    const C corner = center + C(-realWidth/2,imagWidth/2);\n    Matrix<C> shifts( realSize*imagSize, 1, U.Grid() );\n    for( Int j=0; j<realSize*imagSize; ++j )\n    {\n        const Int x = j / imagSize;\n        const Int y = j % imagSize;\n        shifts.Set( j, 0, corner+C((x+0.5)*realStep,-(y+0.5)*imagStep) );\n    }\n\n    // Form the vector of invNorms\n    Matrix<Real> invNorms;\n    auto itCounts = \n        TriangularPseudospectrum( U, shifts, invNorms, psCtrl );\n\n    // Rearrange the vectors into grids\n    Matrix<Int> itCountMap; \n    pspec::ReshapeIntoGrid( realSize, imagSize, invNorms, invNormMap );\n    pspec::ReshapeIntoGrid( realSize, imagSize, itCounts, itCountMap );\n    return itCountMap;\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nQuasiTriangularPseudospectrum\n( const Matrix<Real>& U, \n  Matrix<Real>& invNormMap, \n  Complex<Real> center, Real realWidth, Real imagWidth,\n  Int realSize, Int imagSize, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiTriangularPseudospectrum\"))\n    typedef Complex<Real> C;\n\n    psCtrl.snapCtrl.realSize = realSize;\n    psCtrl.snapCtrl.imagSize = imagSize;\n\n    const Real realStep = realWidth/realSize;\n    const Real imagStep = imagWidth/imagSize;\n    const C corner = center + C(-realWidth/2,imagWidth/2);\n    Matrix<C> shifts( realSize*imagSize, 1, U.Grid() );\n    for( Int j=0; j<realSize*imagSize; ++j )\n    {\n        const Int x = j / imagSize;\n        const Int y = j % imagSize;\n        shifts.Set( j, 0, corner+C((x+0.5)*realStep,-(y+0.5)*imagStep) );\n    }\n\n    // Form the vector of invNorms\n    Matrix<Real> invNorms;\n    auto itCounts = \n        QuasiTriangularPseudospectrum( U, shifts, invNorms, psCtrl );\n\n    // Rearrange the vectors into grids\n    Matrix<Int> itCountMap; \n    pspec::ReshapeIntoGrid( realSize, imagSize, invNorms, invNormMap );\n    pspec::ReshapeIntoGrid( realSize, imagSize, itCounts, itCountMap );\n    return itCountMap;\n}\n\ntemplate<typename F>\ninline Matrix<Int>\nHessenbergPseudospectrum\n( const Matrix<F>& H, Matrix<Base<F>>& invNormMap, \n  Complex<Base<F>> center, Base<F> realWidth, Base<F> imagWidth,\n  Int realSize, Int imagSize, \n  PseudospecCtrl<Base<F>> psCtrl=PseudospecCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HessenbergPseudospectrum\"))\n    typedef Base<F> Real;\n    typedef Complex<Real> C;\n\n    psCtrl.snapCtrl.realSize = realSize;\n    psCtrl.snapCtrl.imagSize = imagSize;\n\n    const Real realStep = realWidth/realSize;\n    const Real imagStep = imagWidth/imagSize;\n    const C corner = center + C(-realWidth/2,imagWidth/2);\n    Matrix<C> shifts( realSize*imagSize, 1, H.Grid() );\n    for( Int j=0; j<realSize*imagSize; ++j )\n    {\n        const Int x = j / imagSize;\n        const Int y = j % imagSize;\n        shifts.Set( j, 0, corner+C((x+0.5)*realStep,-(y+0.5)*imagStep) );\n    }\n\n    // Form the vector of invNorms\n    Matrix<Real> invNorms;\n    auto itCounts = HessenbergPseudospectrum( H, shifts, invNorms, psCtrl );\n\n    // Rearrange the vectors into grids\n    Matrix<Int> itCountMap; \n    pspec::ReshapeIntoGrid( realSize, imagSize, invNorms, invNormMap );\n    pspec::ReshapeIntoGrid( realSize, imagSize, itCounts, itCountMap );\n    return itCountMap;\n}\n\ntemplate<typename F>\ninline DistMatrix<Int>\nTriangularPseudospectrum\n( const DistMatrix<F>& U, DistMatrix<Base<F>>& invNormMap, \n  Complex<Base<F>> center, Base<F> realWidth, Base<F> imagWidth, \n  Int realSize, Int imagSize, \n  PseudospecCtrl<Base<F>> psCtrl=PseudospecCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriangularPseudospectrum\"))\n    typedef Base<F> Real;\n    typedef Complex<Real> C;\n    const Grid& g = U.Grid();\n\n    psCtrl.snapCtrl.realSize = realSize;\n    psCtrl.snapCtrl.imagSize = imagSize;\n\n    const Real realStep = realWidth/realSize;\n    const Real imagStep = imagWidth/imagSize;\n    const C corner = center + C(-realWidth/2,imagWidth/2);\n    DistMatrix<C,VR,STAR> shifts( realSize*imagSize, 1, g );\n    const Int numLocShifts = shifts.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )\n    {\n        const Int i = shifts.GlobalRow(iLoc);\n        const Int x = i / imagSize;\n        const Int y = i % imagSize;\n        shifts.SetLocal\n        ( iLoc, 0, corner+C((x+0.5)*realStep,-(y+0.5)*imagStep) );\n    }\n\n    // Form the vector of invNorms\n    DistMatrix<Real,VR,STAR> invNorms(g);\n    auto itCounts = TriangularPseudospectrum( U, shifts, invNorms, psCtrl );\n\n    // Rearrange the vectors into grids\n    DistMatrix<Int> itCountMap(g); \n    pspec::ReshapeIntoGrid( realSize, imagSize, invNorms, invNormMap );\n    pspec::ReshapeIntoGrid( realSize, imagSize, itCounts, itCountMap );\n    return itCountMap;\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int>\nQuasiTriangularPseudospectrum\n( const DistMatrix<Real>& U, \n  DistMatrix<Real>& invNormMap, \n  Complex<Real> center, Real realWidth, Real imagWidth, \n  Int realSize, Int imagSize, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiTriangularPseudospectrum\"))\n    typedef Complex<Real> C;\n    const Grid& g = U.Grid();\n\n    psCtrl.snapCtrl.realSize = realSize;\n    psCtrl.snapCtrl.imagSize = imagSize;\n\n    const Real realStep = realWidth/realSize;\n    const Real imagStep = imagWidth/imagSize;\n    const C corner = center + C(-realWidth/2,imagWidth/2);\n    DistMatrix<C,VR,STAR> shifts( realSize*imagSize, 1, g );\n    const Int numLocShifts = shifts.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )\n    {\n        const Int i = shifts.GlobalRow(iLoc);\n        const Int x = i / imagSize;\n        const Int y = i % imagSize;\n        shifts.SetLocal\n        ( iLoc, 0, corner+C((x+0.5)*realStep,-(y+0.5)*imagStep) );\n    }\n\n    // Form the vector of invNorms\n    DistMatrix<Real,VR,STAR> invNorms(g);\n    auto itCounts = \n        QuasiTriangularPseudospectrum( U, shifts, invNorms, psCtrl );\n\n    // Rearrange the vectors into grids\n    DistMatrix<Int> itCountMap(g); \n    pspec::ReshapeIntoGrid( realSize, imagSize, invNorms, invNormMap );\n    pspec::ReshapeIntoGrid( realSize, imagSize, itCounts, itCountMap );\n    return itCountMap;\n}\n\ntemplate<typename F>\ninline DistMatrix<Int>\nHessenbergPseudospectrum\n( const DistMatrix<F>& H, DistMatrix<Base<F>>& invNormMap, \n  Complex<Base<F>> center, Base<F> realWidth, Base<F> imagWidth, \n  Int realSize, Int imagSize, \n  PseudospecCtrl<Base<F>> psCtrl=PseudospecCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HessenbergPseudospectrum\"))\n    typedef Base<F> Real;\n    typedef Complex<Real> C;\n    const Grid& g = H.Grid();\n\n    psCtrl.snapCtrl.realSize = realSize;\n    psCtrl.snapCtrl.imagSize = imagSize;\n\n    const Real realStep = realWidth/realSize;\n    const Real imagStep = imagWidth/imagSize;\n    const C corner = center + C(-realWidth/2,imagWidth/2);\n    DistMatrix<C,VR,STAR> shifts( realSize*imagSize, 1, g );\n    const Int numLocShifts = shifts.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )\n    {\n        const Int i = shifts.GlobalRow(iLoc);\n        const Int x = i / imagSize;\n        const Int y = i % imagSize;\n        shifts.SetLocal\n        ( iLoc, 0, corner+C((x+0.5)*realStep,-(y+0.5)*imagStep) );\n    }\n\n    // Form the vector of invNorms\n    DistMatrix<Real,VR,STAR> invNorms(g);\n    auto itCounts = HessenbergPseudospectrum( H, shifts, invNorms, psCtrl );\n\n    // Rearrange the vectors into grids\n    DistMatrix<Int> itCountMap(g); \n    pspec::ReshapeIntoGrid( realSize, imagSize, invNorms, invNormMap );\n    pspec::ReshapeIntoGrid( realSize, imagSize, itCounts, itCountMap );\n    return itCountMap;\n}\n\ntemplate<typename F>\ninline Matrix<Int>\nPseudospectrum\n( const Matrix<F>& A, Matrix<Base<F>>& invNormMap, \n  Complex<Base<F>> center, Base<F> realWidth, Base<F> imagWidth,\n  Int realSize, Int imagSize, \n  PseudospecCtrl<Base<F>> psCtrl=PseudospecCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudospectrum\"))\n    typedef Base<F> Real;\n    typedef Complex<Real> C;\n\n    psCtrl.snapCtrl.realSize = realSize;\n    psCtrl.snapCtrl.imagSize = imagSize;\n\n    const Real realStep = realWidth/realSize;\n    const Real imagStep = imagWidth/imagSize;\n    const C corner = center + C(-realWidth/2,imagWidth/2);\n    Matrix<C> shifts( realSize*imagSize, 1, A.Grid() );\n    for( Int j=0; j<realSize*imagSize; ++j )\n    {\n        const Int x = j / imagSize;\n        const Int y = j % imagSize;\n        shifts.Set( j, 0, corner+C((x+0.5)*realStep,-(y+0.5)*imagStep) );\n    }\n\n    // Form the vector of invNorms\n    Matrix<Real> invNorms;\n    auto itCounts = Pseudospectrum( A, shifts, invNorms, psCtrl );\n\n    // Rearrange the vectors into grids\n    Matrix<Int> itCountMap; \n    pspec::ReshapeIntoGrid( realSize, imagSize, invNorms, invNormMap );\n    pspec::ReshapeIntoGrid( realSize, imagSize, itCounts, itCountMap );\n    return itCountMap;\n}\n\ntemplate<typename F>\ninline DistMatrix<Int>\nPseudospectrum\n( const DistMatrix<F>& A, DistMatrix<Base<F>>& invNormMap, \n  Complex<Base<F>> center, Base<F> realWidth, Base<F> imagWidth, \n  Int realSize, Int imagSize, \n  PseudospecCtrl<Base<F>> psCtrl=PseudospecCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudospectrum\"))\n    typedef Base<F> Real;\n    typedef Complex<Real> C;\n    const Grid& g = A.Grid();\n\n    psCtrl.snapCtrl.realSize = realSize;\n    psCtrl.snapCtrl.imagSize = imagSize;\n\n    const Real realStep = realWidth/realSize;\n    const Real imagStep = imagWidth/imagSize;\n    const C corner = center + C(-realWidth/2,imagWidth/2);\n    DistMatrix<C,VR,STAR> shifts( realSize*imagSize, 1, g );\n    const Int numLocShifts = shifts.LocalHeight();\n    for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )\n    {\n        const Int i = shifts.GlobalRow(iLoc);\n        const Int x = i / imagSize;\n        const Int y = i % imagSize;\n        shifts.SetLocal\n        ( iLoc, 0, corner+C((x+0.5)*realStep,-(y+0.5)*imagStep) );\n    }\n\n    // Form the vector of invNorms\n    DistMatrix<Real,VR,STAR> invNorms(g);\n    auto itCounts = Pseudospectrum( A, shifts, invNorms, psCtrl );\n\n    // Rearrange the vectors into grids\n    DistMatrix<Int> itCountMap(g); \n    pspec::ReshapeIntoGrid( realSize, imagSize, invNorms, invNormMap );\n    pspec::ReshapeIntoGrid( realSize, imagSize, itCounts, itCountMap );\n    return itCountMap;\n}\n\ntemplate<typename F>\ninline Matrix<Int>\nTriangularPseudospectrum\n( const Matrix<F>& U, Matrix<Base<F>>& invNormMap, \n  Complex<Base<F>> center, Int realSize, Int imagSize, \n  PseudospecCtrl<Base<F>> psCtrl=PseudospecCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriangularPseudospectrum\"))\n\n    auto diag = U.GetDiagonal();\n    const Base<F> radius = MaxNorm( diag );\n    const Base<F> oneNorm = OneNorm( U );\n\n    // Essentially three cases are handled here:\n    // 1) The zero matrix (force the pseudospectrum width to 1)\n    // 2) Typical matrices (use a small multiple of the spectral radius)\n    // 3) Highly non-normal matrices (e.g., triangular with zero main diagonal)\n    Base<F> width;\n    if( oneNorm == Base<F>(0) )\n    {\n        width = 1;\n        if( psCtrl.progress )\n            std::cout << \"Setting width to 1 to handle zero matrix\" \n                      << std::endl;\n    }\n    else if( radius >= 0.2*oneNorm )\n    {\n        width = 2.5*radius;\n        if( psCtrl.progress )\n            std::cout << \"Setting width to \" << width \n                      << \" based on the spectral radius, \" << radius \n                      << std::endl;\n    }\n    else\n    {\n        width = 0.8*oneNorm;\n        if( psCtrl.progress )\n            std::cout << \"Setting width to \" << width \n                      << \" based on the one norm, \" << oneNorm << std::endl;\n    }\n\n    return TriangularPseudospectrum\n           ( U, invNormMap, center, width, width, realSize, imagSize, psCtrl );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nQuasiTriangularPseudospectrum\n( const Matrix<Real>& U, \n  Matrix<Real>& invNormMap, \n  Complex<Real> center,\n  Int realSize, Int imagSize, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiTriangularPseudospectrum\"))\n\n    const auto w = schur::QuasiTriangEig( U );\n    const Real radius = MaxNorm( w );\n    const Real oneNorm = OneNorm( U );\n\n    // Essentially three cases are handled here:\n    // 1) The zero matrix (force the pseudospectrum width to 1)\n    // 2) Typical matrices (use a small multiple of the spectral radius)\n    // 3) Highly non-normal matrices (e.g., triangular with zero main diagonal)\n    Real width;\n    if( oneNorm == Real(0) )\n    {\n        width = 1;\n        if( psCtrl.progress )\n            std::cout << \"Setting width to 1 to handle zero matrix\" \n                      << std::endl;\n    }\n    else if( radius >= 0.2*oneNorm )\n    {\n        width = 2.5*radius;\n        if( psCtrl.progress )\n            std::cout << \"Setting width to \" << width \n                      << \" based on the spectral radius, \" << radius \n                      << std::endl;\n    }\n    else\n    {\n        width = 0.8*oneNorm;\n        if( psCtrl.progress )\n            std::cout << \"Setting width to \" << width \n                      << \" based on the one norm, \" << oneNorm << std::endl;\n    }\n\n    return QuasiTriangularPseudospectrum\n           ( U, invNormMap, center, width, width, realSize, imagSize, psCtrl );\n}\n\ntemplate<typename F>\ninline Matrix<Int>\nHessenbergPseudospectrum\n( const Matrix<F>& H, Matrix<Base<F>>& invNormMap, \n  Complex<Base<F>> center, Int realSize, Int imagSize, \n  PseudospecCtrl<Base<F>> psCtrl=PseudospecCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HessenbergPseudospectrum\"))\n\n    const Base<F> infNorm = InfinityNorm( H );\n    const Base<F> oneNorm = OneNorm( H );\n    Base<F> width;\n    if( oneNorm == Base<F>(0) )\n    {\n        width = 1;\n        if( psCtrl.progress )\n            std::cout << \"Setting width to 1 to handle zero matrix\" \n                      << std::endl;\n    }\n    else\n    {\n        width = 0.8*Max(oneNorm,infNorm);\n        if( psCtrl.progress )\n            std::cout << \"Setting width to \" << width \n                      << \" based on the one norm, \" << oneNorm \n                      << \", and infinity norm, \" << infNorm << std::endl;\n    }\n\n    return HessenbergPseudospectrum\n           ( H, invNormMap, center, width, width, realSize, imagSize, psCtrl );\n}\n\ntemplate<typename F>\ninline DistMatrix<Int>\nTriangularPseudospectrum\n( const DistMatrix<F>& U, DistMatrix<Base<F>>& invNormMap, \n  Complex<Base<F>> center, Int realSize, Int imagSize,\n  PseudospecCtrl<Base<F>> psCtrl=PseudospecCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriangularPseudospectrum\"))\n\n    auto diag = U.GetDiagonal();\n    const Base<F> radius = MaxNorm( diag );\n    const Base<F> oneNorm = OneNorm( U );\n\n    // Essentially three cases are handled here:\n    // 1) The zero matrix (force the pseudospectrum width to 1)\n    // 2) Typical matrices (use a small multiple of the spectral radius)\n    // 3) Highly non-normal matrices (e.g., triangular with zero main diagonal)\n    Base<F> width;\n    if( oneNorm == Base<F>(0) )\n    {\n        width = 1;\n        if( psCtrl.progress && U.Grid().Rank() == 0 )\n            std::cout << \"Setting width to 1 to handle zero matrix\"\n                      << std::endl;\n    }\n    else if( radius >= 0.2*oneNorm )\n    {\n        width = 2.5*radius;\n        if( psCtrl.progress && U.Grid().Rank() == 0 )\n            std::cout << \"Setting width to \" << width \n                      << \" based on the spectral radius, \" << radius \n                      << std::endl;\n    }\n    else\n    {\n        width = 0.8*oneNorm;\n        if( psCtrl.progress && U.Grid().Rank() == 0 )\n            std::cout << \"Setting width to \" << width\n                      << \" based on the one norm, \" << oneNorm << std::endl;\n    }\n\n    return TriangularPseudospectrum\n           ( U, invNormMap, center, width, width, realSize, imagSize, psCtrl );\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int>\nQuasiTriangularPseudospectrum\n( const DistMatrix<Real>& U, \n  DistMatrix<Real>& invNormMap, \n  Complex<Real> center, Int realSize, Int imagSize,\n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"QuasiTriangularPseudospectrum\"))\n\n    const auto w = schur::QuasiTriangEig( U );\n    const Real radius = MaxNorm( w );\n    const Real oneNorm = OneNorm( U );\n\n    // Essentially three cases are handled here:\n    // 1) The zero matrix (force the pseudospectrum width to 1)\n    // 2) Typical matrices (use a small multiple of the spectral radius)\n    // 3) Highly non-normal matrices (e.g., triangular with zero main diagonal)\n    Real width;\n    if( oneNorm == Real(0) )\n    {\n        width = 1;\n        if( psCtrl.progress && U.Grid().Rank() == 0 )\n            std::cout << \"Setting width to 1 to handle zero matrix\"\n                      << std::endl;\n    }\n    else if( radius >= 0.2*oneNorm )\n    {\n        width = 2.5*radius;\n        if( psCtrl.progress && U.Grid().Rank() == 0 )\n            std::cout << \"Setting width to \" << width \n                      << \" based on the spectral radius, \" << radius \n                      << std::endl;\n    }\n    else\n    {\n        width = 0.8*oneNorm;\n        if( psCtrl.progress && U.Grid().Rank() == 0 )\n            std::cout << \"Setting width to \" << width\n                      << \" based on the one norm, \" << oneNorm << std::endl;\n    }\n\n    return QuasiTriangularPseudospectrum\n           ( U, invNormMap, center, width, width, realSize, imagSize, psCtrl );\n}\n\ntemplate<typename F>\ninline DistMatrix<Int>\nHessenbergPseudospectrum\n( const DistMatrix<F>& H, DistMatrix<Base<F>>& invNormMap, \n  Complex<Base<F>> center, Int realSize, Int imagSize,\n  PseudospecCtrl<Base<F>> psCtrl=PseudospecCtrl<Base<F>>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HessenbergPseudospectrum\"))\n\n    const Base<F> oneNorm = OneNorm( H );\n    const Base<F> infNorm = InfinityNorm( H );\n    Base<F> width;\n    if( oneNorm == Base<F>(0) )\n    {\n        width = 1;\n        if( psCtrl.progress && H.Grid().Rank() == 0 )\n            std::cout << \"Setting width to 1 to handle zero matrix\"\n                      << std::endl;\n    }\n    else\n    {\n        width = 0.8*Max(oneNorm,infNorm);\n        if( psCtrl.progress && H.Grid().Rank() == 0 )\n            std::cout << \"Setting width to \" << width \n                      << \" based on the one norm, \" << oneNorm \n                      << \", and infinity norm, \" << infNorm << std::endl;\n    }\n\n    return HessenbergPseudospectrum\n           ( H, invNormMap, center, width, width, realSize, imagSize, psCtrl );\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nPseudospectrum\n( const Matrix<Complex<Real>>& A, Matrix<Real>& invNormMap, \n  Complex<Real> center, Int realSize, Int imagSize, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudospectrum\"))\n    typedef Complex<Real> C;\n\n    Matrix<C> B( A );\n    if( psCtrl.schur )\n    {\n        Matrix<C> w;\n        const bool fullTriangle = true;\n        schur::QR( B, w, fullTriangle );\n        return TriangularPseudospectrum\n               ( B, invNormMap, center, realSize, imagSize, psCtrl );\n    }\n    else\n    {\n        Hessenberg( UPPER, B );\n        return HessenbergPseudospectrum\n               ( B, invNormMap, center, realSize, imagSize, psCtrl );\n    }\n}\n\ntemplate<typename Real>\ninline Matrix<Int>\nPseudospectrum\n( const Matrix<Real>& A, Matrix<Real>& invNormMap, \n  Complex<Real> center, Int realSize, Int imagSize, \n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudospectrum\"))\n    typedef Complex<Real> C;\n\n    if( psCtrl.forceComplexSchur )\n    {\n        Matrix<C> ACpx;\n        Copy( A, ACpx );\n        return Pseudospectrum\n               ( ACpx, invNormMap, center, realSize, imagSize, psCtrl );\n    }\n\n    if( !psCtrl.schur )\n        LogicError(\"Real Hessenberg algorithm not yet supported\");\n    Matrix<Real> B( A );\n    Matrix<C> w;\n    const bool fullTriangle = true;\n    schur::QR( B, w, fullTriangle );\n    if( psCtrl.forceComplexPs )\n    {\n        Matrix<C> BCpx;\n        schur::RealToComplex( B, BCpx );\n        return TriangularPseudospectrum\n               ( BCpx, invNormMap, center, realSize, imagSize, psCtrl );\n    }\n    return QuasiTriangularPseudospectrum\n           ( B, invNormMap, center, realSize, imagSize, psCtrl );\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int>\nPseudospectrum\n( const DistMatrix<Complex<Real>>& A, DistMatrix<Real>& invNormMap, \n  Complex<Real> center, Int realSize, Int imagSize,\n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudospectrum\"))\n    typedef Complex<Real> C;\n\n    const Grid& g = A.Grid();\n    DistMatrix<C> B( A );\n\n    if( psCtrl.schur )\n    {\n        DistMatrix<C,VR,STAR> w(g);\n        const bool fullTriangle = true;\n#ifdef ELEM_HAVE_SCALAPACK\n        schur::QR( B, w, fullTriangle );\n#else\n        // We don't actually need the Schur vectors, but SDC requires their\n        // computation in order to form the full triangular factor\n        DistMatrix<C> X(g);\n        schur::SDC( B, w, X, fullTriangle, psCtrl.sdcCtrl );\n        X.Empty();\n#endif\n        return TriangularPseudospectrum\n               ( B, invNormMap, center, realSize, imagSize, psCtrl );\n    }\n    else\n    {\n        Hessenberg( UPPER, B );\n        return HessenbergPseudospectrum\n               ( B, invNormMap, center, realSize, imagSize, psCtrl );\n    }\n}\n\ntemplate<typename Real>\ninline DistMatrix<Int>\nPseudospectrum\n( const DistMatrix<Real>& A, DistMatrix<Real>& invNormMap, \n  Complex<Real> center, Int realSize, Int imagSize,\n  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pseudospectrum\"))\n    typedef Complex<Real> C;\n    const Grid& g = A.Grid();\n\n    if( psCtrl.forceComplexSchur )\n    {\n        DistMatrix<C> ACpx(g);\n        Copy( A, ACpx );\n        return Pseudospectrum\n               ( ACpx, invNormMap, center, realSize, imagSize, psCtrl );\n    }\n\n    if( !psCtrl.schur )\n        LogicError(\"Real Hessenberg algorithm not yet supported\");\n    DistMatrix<Real> B( A );\n    DistMatrix<C,VR,STAR> w(g);\n    const bool fullTriangle = true;\n#ifdef ELEM_HAVE_SCALAPACK\n    schur::QR( B, w, fullTriangle );\n#else\n    // We don't actually need the Schur vectors, but SDC requires their\n    // computation in order to form the full triangular factor\n    DistMatrix<Real> X(g);\n    schur::SDC( B, w, X, fullTriangle, psCtrl.sdcCtrl );\n    X.Empty();\n#endif\n    if( psCtrl.forceComplexPs ) \n    {\n        DistMatrix<C> BCpx(g);\n        schur::RealToComplex( B, BCpx );\n        return TriangularPseudospectrum\n               ( BCpx, invNormMap, center, realSize, imagSize, psCtrl );\n    }\n    return QuasiTriangularPseudospectrum\n           ( B, invNormMap, center, realSize, imagSize, psCtrl );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_PSEUDOSPECTRUM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/Trace.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRACE_HPP\n#define ELEM_TRACE_HPP\n\nnamespace elem {\n\ntemplate<typename F>\ninline F Trace( const Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trace\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot compute trace of nonsquare matrix\");\n\n    Matrix<F> d;\n    A.GetDiagonal( d );\n    F trace = 0;\n    const Int n = A.Height();\n    for( Int i=0; i<n; ++i )\n        trace += d.Get(i,0);\n    return trace;\n}\n\ntemplate<typename F> \ninline F Trace( const DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trace\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot compute trace of nonsquare matrix\");\n    const Grid& g = A.Grid();\n\n    DistMatrix<F,MD,STAR> d(g);\n    A.GetDiagonal( d );\n    F localTrace = 0;\n    if( d.Participating() )\n    {\n        const Int nLocalDiag = d.LocalHeight();\n        for( Int iLoc=0; iLoc<nLocalDiag; ++iLoc )\n            localTrace += d.GetLocal(iLoc,0);\n    }\n    return mpi::AllReduce( localTrace, g.VCComm() );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRACE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PROPS_DECL_HPP\n#define ELEM_PROPS_DECL_HPP\n\n#include ELEM_FACTOR_DECL_INC\n#include ELEM_CONDENSE_DECL_INC\n#include ELEM_DECOMP_DECL_INC\n\n#endif // ifndef ELEM_PROPS_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PROPS_IMPL_HPP\n#define ELEM_PROPS_IMPL_HPP\n\n#include \"./Condition.hpp\"\n#include \"./Determinant.hpp\"\n#include \"./Inertia.hpp\"\n#include \"./Norm.hpp\"\n#include \"./Pseudospectrum.hpp\"\n#include \"./Trace.hpp\"\n\n#endif // ifndef ELEM_PROPS_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/props.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PROPS_HPP\n#define ELEM_PROPS_HPP\n\n#include \"./props/decl.hpp\"\n#include \"./props/impl.hpp\"\n\n#endif // ifndef ELEM_PROPS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve/GLM.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GLM_HPP\n#define ELEM_GLM_HPP\n\n#include ELEM_GQR_INC\n\n// This driver solves a sequence of General (Gauss-Markov) Linear Model (GLM)\n// problems using a Generalized QR factorization. \n//\n// The problem formulation is \n//     min || y ||_2 subject to d = A x + B y,\n//     x,y\n// where A is m x n, B is m x p, and n <= m <= n+p. It is assumed that \n// A has full column rank, n, and [A B] has full row rank, m.\n//\n// A Generalized QR factorization of (A,B),\n//     A = Q R = Q | R11 |, B = Q T Z = Q | T11 T12 | Z,\n//                 | 0   |                |   0 T22 |\n// where Q and Z are unitary and R and T are upper-trapezoidal, allows us to\n// re-express the constraint as \n//     (Q^H d) = | R11 | x + | T11 T12 | (Z y).\n//               |   0 |     |   0 T22 |\n// which is re-written as\n//      | g1 | = | R11 x + T11 c1 + T12 c2 |\n//      | g2 |   |                  T22 c2 |.\n// Since || c ||_2 == || Z y ||_2 = || y ||_2 is to be minimized, and c2 is \n// fixed, our only freedom is in the choice of c1, which we set to zero.\n// Then all that is left is to solve\n//      R11 x = g1 - T12 c2\n// for x.\n//\n// On exit, A and B are overwritten with their implicit Generalized QR \n// factorization, D is overwritten with X, and Y is set to the solution Y.\n//\n// Note that essentially the same scheme is used in LAPACK's {S,D,C,Z}GGGLM.\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nGLM( Matrix<F>& A, Matrix<F>& B, Matrix<F>& D, Matrix<F>& Y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GLM\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int p = B.Width();\n    const Int numRhs = D.Width();\n    if( m != B.Height() || m != D.Height() )\n        LogicError(\"A, B, and D must be the same height\");\n    if( m < n )\n        LogicError(\"GLM requires height(A) >= width(A)\");\n    if( n+p < m )\n        LogicError(\"GLM requires width(A)+width(B) >= height(A)\");\n    const bool checkIfSingular = true;\n\n    // Compute the implicit Generalized QR decomposition of (A,B)\n    Matrix<F> tA, tB;\n    Matrix<Base<F>> dA, dB;\n    GQR( A, tA, dA, B, tB, dB );\n\n    // G := Q^H D\n    qr::ApplyQ( LEFT, ADJOINT, A, tA, dA, D );\n\n    // Partition the relevant matrices\n    Matrix<F> G1, G2;\n    PartitionDown( D, G1, G2, n );\n    Matrix<F> R11, R21;\n    PartitionDown( A, R11, R21, n );\n    Matrix<F> T11, T12, T21, T22;\n    PartitionUpOffsetDiagonal\n    ( p-m,\n      B, T11, T12,\n         T21, T22, m-n );\n    Zeros( Y, p, numRhs );\n    Matrix<F> C1, C2;\n    PartitionDown( Y, C1, C2, n+p-m );\n\n    // Solve T22 C2 = G2\n    C2 = G2;\n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), T22, C2, checkIfSingular );\n\n    // G1 := G1 - T12 C2\n    Gemm( NORMAL, NORMAL, F(-1), T12, C2, F(1), G1 );\n    \n    // Solve R11 X = G1 \n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), R11, G1, checkIfSingular );\n    D.Resize( n, numRhs );\n\n    // Y := Z^H C\n    rq::ApplyQ( LEFT, ADJOINT, B, tB, dB, Y );\n}\n\ntemplate<typename F> \ninline void\nGLM( DistMatrix<F>& A, DistMatrix<F>& B, DistMatrix<F>& D, DistMatrix<F>& Y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GLM\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int p = B.Width();\n    const Int numRhs = D.Width();\n    if( m != B.Height() || m != D.Height() )\n        LogicError(\"A, B, and D must be the same height\");\n    if( m < n )\n        LogicError(\"GLM requires height(A) >= width(A)\");\n    if( n+p < m )\n        LogicError(\"GLM requires width(A)+width(B) >= height(A)\");\n    const Grid& g = A.Grid();\n    if( g != B.Grid() || g != D.Grid() )\n        LogicError(\"All matrices must have the same grid\");\n    Y.SetGrid( g );\n    const bool checkIfSingular = true;\n\n    // Compute the implicit Generalized QR decomposition of (A,B)\n    DistMatrix<F,MD,STAR> tA(g), tB(g);\n    DistMatrix<Base<F>,MD,STAR> dA(g), dB(g);\n    GQR( A, tA, dA, B, tB, dB );\n\n    // G := Q^H D\n    qr::ApplyQ( LEFT, ADJOINT, A, tA, dA, D );\n\n    // Partition the relevant matrices\n    DistMatrix<F> G1(g), G2(g);\n    PartitionDown( D, G1, G2, n );\n    DistMatrix<F> R11(g), R21(g);\n    PartitionDown( A, R11, R21, n );\n    DistMatrix<F> T11(g), T12(g), T21(g), T22(g);\n    PartitionUpOffsetDiagonal\n    ( p-m,\n      B, T11, T12,\n         T21, T22, m-n );\n    Zeros( Y, p, numRhs );\n    DistMatrix<F> C1(g), C2(g);\n    PartitionDown( Y, C1, C2, n+p-m );\n\n    // Solve T22 C2 = G2\n    C2 = G2;\n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), T22, C2, checkIfSingular );\n\n    // G1 := G1 - T12 C2\n    Gemm( NORMAL, NORMAL, F(-1), T12, C2, F(1), G1 );\n    \n    // Solve R11 X = G1\n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), R11, G1, checkIfSingular );\n    D.Resize( n, numRhs );\n\n    // Y := Z^H C\n    rq::ApplyQ( LEFT, ADJOINT, B, tB, dB, Y );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GLM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve/GaussianElimination.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GAUSSIANELIMINATION_HPP\n#define ELEM_GAUSSIANELIMINATION_HPP\n\n#include ELEM_LU_INC\n\nnamespace elem {\n\n// Short-circuited form of LU factorization with partial pivoting\ntemplate<typename F> \ninline void\nRowEchelon( Matrix<F>& A, Matrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"RowEchelon\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n\n    Matrix<Int> p1;\n    Matrix<Int> p1Perm, p1InvPerm;\n\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int minDimA = Min(mA,nA);\n    const Int nB = B.Width();\n    const Int bsize = Blocksize();\n    for( Int k=0; k<minDimA; k+=bsize )\n    {\n        const Int nb = Min(bsize,minDimA-k);\n        auto A11  = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A12  = ViewRange( A, k,    k+nb, k+nb, nA   );\n        auto A21  = ViewRange( A, k+nb, k,    mA,   k+nb );\n        auto A22  = ViewRange( A, k+nb, k+nb, mA,   nA   ); \n        auto APan = ViewRange( A, k,    k+nb, mA,   nA   );\n        auto B1   = ViewRange( B, k,    0,    k+nb, nB   );\n        auto B2   = ViewRange( B, k+nb, 0,    mA,   nB   );\n        auto BB   = ViewRange( B, k,    0,    mA,   nB   );\n\n        lu::Panel( APan, p1 );\n        PivotsToPartialPermutation( p1, p1Perm, p1InvPerm ); \n        PermuteRows( BB, p1Perm, p1InvPerm );\n\n        Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A11, A12 );\n        Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A11, B1 );\n\n        Gemm( NORMAL, NORMAL, F(-1), A21, A12, F(1), A22 );\n        Gemm( NORMAL, NORMAL, F(-1), A21, B1,  F(1), B2 );\n    }\n}\n\n// Short-circuited form of LU factorization with partial pivoting\ntemplate<typename F> \ninline void\nRowEchelon( DistMatrix<F>& A, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"RowEchelon\");\n        if( A.Grid() != B.Grid() )\n            LogicError(\"{A,B} must be distributed over the same grid\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int minDimA = Min(mA,nA);\n    const Int nB = B.Width();\n    const Int bsize = Blocksize();\n    const Grid& g = A.Grid();\n\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g);\n    DistMatrix<F,STAR,VR  > A12_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > A12_STAR_MR(g);\n    DistMatrix<F,MC,  STAR> A21_MC_STAR(g);\n    DistMatrix<F,STAR,VR  > B1_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > B1_STAR_MR(g);\n    DistMatrix<Int,STAR,STAR> p1_STAR_STAR(g);\n\n    DistMatrix<Int,VC,STAR> p1Perm(g), p1InvPerm(g);\n\n    // In case B's columns are not aligned with A's\n    const bool BAligned = ( B.ColShift() == A.ColShift() );\n    DistMatrix<F,MC,STAR> A21_MC_STAR_B(g);\n\n    for( Int k=0; k<minDimA; k+=bsize )\n    {\n        const Int nb = Min(bsize,minDimA-k);\n        auto A11  = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A12  = ViewRange( A, k,    k+nb, k+nb, nA   );\n        auto A21  = ViewRange( A, k+nb, k,    mA,   k+nb );\n        auto A22  = ViewRange( A, k+nb, k+nb, mA,   nA   );          \n        auto APan = ViewRange( A, k,    k+nb, mA,   nA   );\n        auto B1   = ViewRange( B, k,    0,    k+nb, nB   );\n        auto B2   = ViewRange( B, k+nb, 0,    mA,   nB   );\n        auto BB   = ViewRange( B, k,    0,    mA,   nB   );\n\n        A11_STAR_STAR = A11;\n        A21_MC_STAR.AlignWith( A22 );\n        A21_MC_STAR = A21;\n\n        lu::Panel( A11_STAR_STAR, A21_MC_STAR, p1_STAR_STAR );\n        PivotsToPartialPermutation( p1_STAR_STAR, p1Perm, p1InvPerm );\n        PermuteRows( APan, p1Perm, p1InvPerm );\n        PermuteRows( BB,   p1Perm, p1InvPerm );\n\n        A12_STAR_VR.AlignWith( A22 );\n        A12_STAR_VR = A12;\n        B1_STAR_VR.AlignWith( B1 );\n        B1_STAR_VR = B1;\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, UNIT, F(1), A11_STAR_STAR, A12_STAR_VR );\n        LocalTrsm( LEFT, LOWER, NORMAL, UNIT, F(1), A11_STAR_STAR, B1_STAR_VR );\n\n        A12_STAR_MR.AlignWith( A22 );\n        A12_STAR_MR = A12_STAR_VR;\n        B1_STAR_MR.AlignWith( B1 );\n        B1_STAR_MR = B1_STAR_VR;\n        LocalGemm( NORMAL, NORMAL, F(-1), A21_MC_STAR, A12_STAR_MR, F(1), A22 );\n        if( BAligned )\n        {\n            LocalGemm\n            ( NORMAL, NORMAL, F(-1), A21_MC_STAR, B1_STAR_MR, F(1), B2 );\n        }\n        else\n        {\n            A21_MC_STAR_B.AlignWith( B2 );\n            A21_MC_STAR_B = A21_MC_STAR;\n            LocalGemm\n            ( NORMAL, NORMAL, F(-1), A21_MC_STAR_B, B1_STAR_MR, F(1), B2 );\n        }\n\n        A11 = A11_STAR_STAR;\n        A12 = A12_STAR_MR;\n        B1 = B1_STAR_MR;\n    }\n}\n\ntemplate<typename F> \ninline void\nGaussianElimination( Matrix<F>& A, Matrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GaussianElimination\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    RowEchelon( A, B );\n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n}\n\ntemplate<typename F> \ninline void\nGaussianElimination( DistMatrix<F>& A, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GaussianElimination\");\n        if( A.Grid() != B.Grid() )\n            LogicError(\"{A,B} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n        if( A.Height() != B.Height() )\n            LogicError(\"A and B must be the same height\");\n    )\n    RowEchelon( A, B );\n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, B );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GAUSSIANELIMINATION_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve/HPDSolve.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HPDSOLVE_HPP\n#define ELEM_HPDSOLVE_HPP\n\n#include ELEM_TRSM_INC\n#include ELEM_CHOLESKY_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nHPDSolve\n( UpperOrLower uplo, Orientation orientation, Matrix<F>& A, Matrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPDSolve\"))\n    Cholesky( uplo, A );\n    cholesky::SolveAfter( uplo, orientation, A, B );\n}\n\ntemplate<typename F>\ninline void\nHPDSolve\n( UpperOrLower uplo, Orientation orientation, \n  DistMatrix<F>& A, DistMatrix<F>& B )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HPDSolve\"))\n    Cholesky( uplo, A );\n    cholesky::SolveAfter( uplo, orientation, A, B );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HPDSOLVE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve/HermitianSolve.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANSOLVE_HPP\n#define ELEM_HERMITIANSOLVE_HPP\n\n#include ELEM_SYMMETRICSOLVE_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nHermitianSolve\n( UpperOrLower uplo, Orientation orientation, Matrix<F>& A, Matrix<F>& B, \n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSolve\"))\n    SymmetricSolve( uplo, orientation, A, B, true, pivotType );\n}\n\ntemplate<typename F>\ninline void\nHermitianSolve\n( UpperOrLower uplo, Orientation orientation, \n  DistMatrix<F>& A, DistMatrix<F>& B, bool conjugate=false, \n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianSolve\"))\n    SymmetricSolve( uplo, orientation, A, B, true, pivotType );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANSOLVE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve/LSE.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LSE_HPP\n#define ELEM_LSE_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_GEMM_INC\n#include ELEM_TRMM_INC\n#include ELEM_GRQ_INC\n\n// This driver solves a sequence of Equality-constrained Least Squares (LSE)\n// problems using a Generalized RQ factorization. \n//\n// The problem formulation is \n//     min || A x - c ||_2 subject to B x = d,\n//      x\n// where A is m x n, B is p x n, and p <= n <= m+p. It is assumed that \n// B has full row rank, p, and [A;B] has full column rank, n.\n//\n// A Generalized RQ factorization of (B,A),\n//    B = T Q = | 0 T12 | Q,  A = Z | R11 R12 | Q,\n//                                  |   0 R22 |\n// where Q and Z are unitary and R and T are upper-trapezoidal, allows us to\n// re-express the constraint\n//     T Q x = d,\n// as\n//     | 0 T12 | | y1 | = d,\n//               | y2 |   \n// where y = Q x, which only requires the solution of the upper-triangular \n// system\n//     T12 y2 = d.\n//\n// The objective can be rewritten as\n//     || A x - c ||_2 = || Z^H A x - Z^H c ||_2\n//                     = ||   R Q x - Z^H c ||_2\n// which, defining g = Z^H c, can be partitioned as\n//     | R11 R12 | | y1 | - | g1 | = | R11 y1 + R12 y2 - g1 |.\n//     |   0 R22 | | y2 |   | g2 |   |          R22 y2 - g2 |\n// Since y2 is fixed by the constraint, the norm is minimized by setting the\n// top term to zero, which involves solving the upper-triangular system\n//     R11 y1 = g1 - R12 y2.\n//       \n// On exit, A and B are overwritten with their implicit Generalized RQ \n// factorization of (B,A), and, optionally, C is overwritten with the rotated\n// residual matrix\n//     Z^H (A X - C) = (R Q X - Z^H C) = |           0 |,\n//                                       | R22 Y2 - G1 |\n// where R22 is an upper-trapezoidal (not necessarily triangular) matrix.\n// D is overwritten with arbitrary values.\n//\n// Note that essentially the same scheme is used in LAPACK's {S,D,C,Z}GGLSE.\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nLSE\n( Matrix<F>& A, Matrix<F>& B, Matrix<F>& C, Matrix<F>& D, Matrix<F>& X, \n  bool computeResidual=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LSE\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int p = B.Height();\n    const Int numRhs = D.Width();\n    if( m != C.Height() )\n        LogicError(\"A and C must be the same height\");\n    if( p != D.Height() )\n        LogicError(\"B and D must be the same height\");\n    if( numRhs != C.Width() )\n        LogicError(\"C and D must be the same width\");\n    if( n < p )\n        LogicError(\"LSE requires width(A) >= height(B)\");\n    if( m+p < n )\n        LogicError(\"LSE requires height(A)+height(B) >= width(A)\");\n    const bool checkIfSingular = true;\n\n    // Compute the implicit Generalized RQ decomposition of (B,A)\n    Matrix<F> tA, tB;\n    Matrix<Base<F>> dA, dB;\n    GRQ( B, tB, dB, A, tA, dA );\n\n    // G := Z^H C\n    qr::ApplyQ( LEFT, ADJOINT, A, tA, dA, C );\n\n    // Partition the relevant matrices\n    Zeros( X, n, numRhs );\n    Matrix<F> Y1, Y2;\n    PartitionUp( X, Y1, Y2, p );\n    Matrix<F> T11, T12;\n    PartitionLeft( B, T11, T12, p );\n    Matrix<F> R11, R12, R21, R22;\n    PartitionDownDiagonal( A, R11, R12, R21, R22, n-p );\n    Matrix<F> G1, G2;\n    PartitionDown( C, G1, G2, n-p );\n\n    // Solve T12 Y2 = D\n    Y2 = D; \n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), T12, Y2, checkIfSingular );\n\n    // G1 := G1 - R12 Y2\n    Gemm( NORMAL, NORMAL, F(-1), R12, Y2, F(1), G1 );\n\n    // Solve R11 Y1 = G1\n    Y1 = G1;\n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), R11, Y1, checkIfSingular );\n\n    if( computeResidual )\n    {\n        // R22 is upper-trapezoidal, and so it is best to decompose it in terms\n        // of its upper-left triangular block and either its bottom zero \n        // block or right non-zero block. Putting k=Min(p,m-(n-p)), then\n        // the k x k upper-left block is upper-triangular. If m >= n, the\n        // bottom m-(n-p) - k = m-n rows are zero, otherwise the right \n        // p - k = n-m.columns are nonzero.\n        if( m < n )\n        {\n            Matrix<F> R22L, R22R;\n            PartitionLeft( R22, R22L, R22R, n-m );\n            Matrix<F> DT, DB;\n            PartitionUp( D, DT, DB, n-m );\n            Gemm( NORMAL, NORMAL, F(-1), R22R, DB, F(1), G2 );\n            Trmm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), R22L, DT );\n            Axpy( F(-1), DT, G2 );\n        }\n        else\n        {\n            Matrix<F> R22T, R22B;\n            PartitionUp( R22, R22T, R22B, m-n );\n            Trmm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), R22T, D );\n            Matrix<F> G2T, G2B;\n            PartitionUp( G2, G2T, G2B, m-n );\n            Axpy( F(-1), D, G2T );\n        }\n        MakeZeros( G1 );\n    }\n\n    // X := Q^H Y\n    rq::ApplyQ( LEFT, ADJOINT, B, tB, dB, X );\n}\n\ntemplate<typename F> \ninline void\nLSE\n( DistMatrix<F>& A, DistMatrix<F>& B, DistMatrix<F>& C, DistMatrix<F>& D, \n  DistMatrix<F>& X, bool computeResidual=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LSE\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int p = B.Height();\n    const Int numRhs = D.Width();\n    if( m != C.Height() )\n        LogicError(\"A and C must be the same height\");\n    if( p != D.Height() )\n        LogicError(\"B and D must be the same height\");\n    if( numRhs != C.Width() )\n        LogicError(\"C and D must be the same width\");\n    if( n < p )\n        LogicError(\"LSE requires width(A) >= height(B)\");\n    if( m+p < n )\n        LogicError(\"LSE requires height(A)+height(B) >= width(A)\");\n    const Grid& g = A.Grid();\n    if( g != B.Grid() || g != C.Grid() || g != D.Grid() )\n        LogicError(\"All matrices must be distributed over the same grid\");\n    X.SetGrid( g );\n    const bool checkIfSingular = true;\n\n    // Compute the implicit Generalized RQ decomposition of (B,A)\n    DistMatrix<F,MD,STAR> tA(g), tB(g);\n    DistMatrix<Base<F>,MD,STAR> dA(g), dB(g);\n    GRQ( B, tB, dB, A, tA, dA );\n\n    // G := Z^H C\n    qr::ApplyQ( LEFT, ADJOINT, A, tA, dA, C );\n\n    // Partition the relevant matrices\n    Zeros( X, n, numRhs );\n    DistMatrix<F> Y1(g), Y2(g);\n    PartitionUp( X, Y1, Y2, p );\n    DistMatrix<F> T11(g), T12(g);\n    PartitionLeft( B, T11, T12, p );\n    DistMatrix<F> R11(g), R12(g), R21(g), R22(g);\n    PartitionDownDiagonal( A, R11, R12, R21, R22, n-p );\n    DistMatrix<F> G1(g), G2(g);\n    PartitionDown( C, G1, G2, n-p );\n\n    // Solve T12 Y2 = D\n    Y2 = D; \n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), T12, Y2, checkIfSingular );\n\n    // G1 := G1 - R12 Y2\n    Gemm( NORMAL, NORMAL, F(-1), R12, Y2, F(1), G1 );\n\n    // Solve R11 Y1 = G1\n    Y1 = G1;\n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), R11, Y1, checkIfSingular );\n\n    if( computeResidual )\n    {\n        // R22 is upper-trapezoidal, and so it is best to decompose it in terms\n        // of its upper-left triangular block and either its bottom zero \n        // block or right non-zero block. Putting k=Min(p,m-(n-p)), then\n        // the k x k upper-left block is upper-triangular. If m >= n, the\n        // bottom m-(n-p) - k = m-n rows are zero, otherwise the right \n        // p - k = n-m.columns are nonzero.\n        if( m < n )\n        {\n            DistMatrix<F> R22L(g), R22R(g);\n            PartitionLeft( R22, R22L, R22R, n-m );\n            DistMatrix<F> DT(g), DB(g);\n            PartitionUp( D, DT, DB, n-m );\n            Gemm( NORMAL, NORMAL, F(-1), R22R, DB, F(1), G2 );\n            Trmm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), R22L, DT );\n            Axpy( F(-1), DT, G2 );\n        }\n        else\n        {\n            DistMatrix<F> R22T(g), R22B(g);\n            PartitionUp( R22, R22T, R22B, m-n );\n            Trmm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), R22T, D );\n            DistMatrix<F> G2T(g), G2B(g);\n            PartitionUp( G2, G2T, G2B, m-n );\n            Axpy( F(-1), D, G2T );\n        }\n        MakeZeros( G1 );\n    }\n\n    // X := Q^H Y\n    rq::ApplyQ( LEFT, ADJOINT, B, tB, dB, X );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LSE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve/LeastSquares.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LEASTSQUARES_HPP\n#define ELEM_LEASTSQUARES_HPP\n\n#include ELEM_LQ_INC\n#include ELEM_QR_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nLeastSquares\n( Orientation orientation, Matrix<F>& A, const Matrix<F>& B, Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LeastSquares\"))\n\n    Matrix<F> t;\n    Matrix<Base<F>> d;\n\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m >= n )\n    {\n        QR( A, t, d );\n        qr::SolveAfter( orientation, A, t, d, B, X );\n    }\n    else\n    {\n        LQ( A, t, d );\n        lq::SolveAfter( orientation, A, t, d, B, X );\n    }\n}\n\ntemplate<typename F> \ninline void\nLeastSquares\n( Orientation orientation, \n  DistMatrix<F>& A, const DistMatrix<F>& B, DistMatrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"LeastSquares\"))\n\n    DistMatrix<F,MD,STAR> t(A.Grid());\n    DistMatrix<Base<F>,MD,STAR> d(A.Grid());\n\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m >= n )\n    {\n        QR( A, t, d );\n        qr::SolveAfter( orientation, A, t, d, B, X );\n    }\n    else\n    {\n        LQ( A, t, d );\n        lq::SolveAfter( orientation, A, t, d, B, X );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LEASTSQUARES_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve/MultiShiftHessSolve.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MULTISHIFTHESSSOLVE_HPP\n#define ELEM_MULTISHIFTHESSSOLVE_HPP\n\n// NOTE: These algorithms are adaptations and/or extensions of Alg. 2 from\n//       Greg Henry's \"The shifted Hessenberg system solve computation\".\n//       It is important to note that the Givens rotation definition in\n//       said paper is the adjoint of the LAPACK definition (as well as \n//       leaving out a conjugation necessary for the complex case).\n\nnamespace elem {\nnamespace mshs {\n\ntemplate<typename F>\ninline void\nLN( F alpha, const Matrix<F>& H, const Matrix<F>& shifts, Matrix<F>& X ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"mshs::LN\"))\n    Scale( alpha, X );\n\n    const Int m = X.Height();\n    const Int n = X.Width();\n    if( m == 0 )\n        return;\n\n    // Initialize storage for Givens rotations\n    typedef Base<F> Real;\n    Matrix<Real> C(m,n);\n    Matrix<F> S(m,n);\n\n    // Initialize the workspace for shifted columns of H\n    Matrix<F> W(m,n);\n    for( Int j=0; j<n; ++j )\n    {\n        MemCopy( W.Buffer(0,j), H.LockedBuffer(), m );\n        W.Update( 0, j, -shifts.Get(j,0) );\n    }\n     \n    // Simultaneously find the LQ factorization and solve against L\n    for( Int k=0; k<m-1; ++k )\n    {\n        auto hB = LockedViewRange( H, k+2, k+1, m, k+2 );\n        const F etakkp1 = H.Get(k,k+1);\n        const F etakp1kp1 = H.Get(k+1,k+1);\n        for( Int j=0; j<n; ++j )\n        {\n            // Find the Givens rotation needed to zero H(k,k+1),\n            //   | c        s | | H(k,k)   | = | gamma |\n            //   | -conj(s) c | | H(k,k+1) |   | 0     |\n            Real c; F s;\n            lapack::Givens( W.Get(k,j), etakkp1, &c, &s );\n            C.Set( k, j, c );\n            S.Set( k, j, s );\n\n            // The new diagonal value of L\n            const F lambdakk = c*W.Get(k,j) + s*etakkp1;\n\n            // Divide our current entry of x by the diagonal value of L\n            X.Set( k, j, X.Get(k,j)/lambdakk );\n\n            // x(k+1:end) -= x(k) * L(k+1:end,k), where\n            // L(k+1:end,k) = c H(k+1:end,k) + s H(k+1:end,k+1). We express this\n            // more concisely as xB -= x(k) * ( c wB + s hB ).\n            // Note that we carefully handle updating the k+1'th entry since\n            // it is shift-dependent.\n            const F mu = shifts.Get( j, 0 );\n            const F xc = X.Get(k,j)*c;\n            const F xs  = X.Get(k,j)*s;\n            X.Update( k+1, j, -xc*W.Get(k+1,j)-xs*(etakp1kp1-mu) );\n            blas::Axpy\n            ( m-(k+2), -xc, W.LockedBuffer(k+2,j), 1, X.Buffer(k+2,j), 1 );\n            blas::Axpy\n            ( m-(k+2), -xs, hB.LockedBuffer(),     1, X.Buffer(k+2,j), 1 );\n\n            // Change the working vector, wB, from representing a fully-updated\n            // portion of the k'th column of H from the end of the last \n            // to a fully-updated portion of the k+1'th column of this iteration\n            //\n            // w(k+1:end) := -conj(s) H(k+1:end,k) + c H(k+1:end,k+1)\n            W.Set( k+1, j, -Conj(s)*W.Get(k+1,j)+c*(etakp1kp1-mu) );\n            blas::Scal( m-(k+2), -Conj(s), W.Buffer(k+2,j), 1 );\n            blas::Axpy( m-(k+2), c, hB.LockedBuffer(), 1, W.Buffer(k+2,j), 1 );\n        }\n    }\n    // Divide x(end) by L(end,end)\n    for( Int j=0; j<n; ++j )\n        X.Set( m-1, j, X.Get(m-1,j)/W.Get(m-1,j) );\n\n    // Solve against Q\n    for( Int j=0; j<n; ++j )        \n    {\n        F* x = X.Buffer(0,j);\n        const Real* c = C.LockedBuffer(0,j);\n        const F*    s = S.LockedBuffer(0,j);\n        F tau0 = x[m-1];\n        for( Int k=m-2; k>=0; --k )\n        {\n            F tau1 = x[k];\n            x[k+1] =       c[k] *tau0 + s[k]*tau1;\n            tau0   = -Conj(s[k])*tau0 + c[k]*tau1;\n        }\n        x[0] = tau0;\n    }\n}\n\ntemplate<typename F>\ninline void\nUN( F alpha, const Matrix<F>& H, const Matrix<F>& shifts, Matrix<F>& X ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"mshs::UN\"))\n    Scale( alpha, X );\n\n    const Int m = X.Height();\n    const Int n = X.Width();\n    if( m == 0 )\n        return;\n\n    // Initialize storage for Givens rotations\n    typedef Base<F> Real;\n    Matrix<Real> C(m,n);\n    Matrix<F> S(m,n);\n\n    // Initialize the workspace for shifted columns of H\n    Matrix<F> W(m,n);\n    for( Int j=0; j<n; ++j )\n    {\n        MemCopy( W.Buffer(0,j), H.LockedBuffer(0,m-1), m );\n        W.Update( m-1, j, -shifts.Get(j,0) );\n    }\n     \n    // Simultaneously form the RQ factorization and solve against R\n    for( Int k=m-1; k>0; --k )\n    {\n        auto hT = LockedView( H, 0, k-1, k-1, 1 );\n        const F etakkm1 = H.Get(k,k-1);\n        const F etakm1km1 = H.Get(k-1,k-1);\n        for( Int j=0; j<n; ++j )\n        {\n            // Find the Givens rotation needed to zero H(k,k-1),\n            //   | c        s | | H(k,k)   | = | gamma |\n            //   | -conj(s) c | | H(k,k-1) |   | 0     |\n            Real c; F s;\n            lapack::Givens( W.Get(k,j), etakkm1, &c, &s );\n            C.Set( k, j, c );\n            S.Set( k, j, s );\n\n            // The new diagonal value of R\n            const F rhokk = c*W.Get(k,j) + s*etakkm1;\n\n            // Divide our current entry of x by the diagonal value of R\n            X.Set( k, j, X.Get(k,j)/rhokk );\n\n            // x(0:k-1) -= x(k) * R(0:k-1,k), where\n            // R(0:k-1,k) = c H(0:k-1,k) + s H(0:k-1,k-1). We express this\n            // more concisely as xT -= x(k) * ( c wT + s hT ).\n            // Note that we carefully handle updating the k-1'th entry since\n            // it is shift-dependent.\n            const F mu = shifts.Get( j, 0 );\n            const F xc = X.Get(k,j)*c;\n            const F xs  = X.Get(k,j)*s;\n            blas::Axpy( k-1, -xc, W.LockedBuffer(0,j), 1, X.Buffer(0,j), 1 );\n            blas::Axpy( k-1, -xs, hT.LockedBuffer(),   1, X.Buffer(0,j), 1 );\n            X.Update( k-1, j, -xc*W.Get(k-1,j)-xs*(etakm1km1-mu) );\n\n            // Change the working vector, wT, from representing a fully-updated\n            // portion of the k'th column of H from the end of the last \n            // to a fully-updated portion of the k-1'th column of this iteration\n            //\n            // w(0:k-1) := -conj(s) H(0:k-1,k) + c H(0:k-1,k-1)\n            blas::Scal( k-1, -Conj(s), W.Buffer(0,j), 1 );\n            blas::Axpy( k-1, c, hT.LockedBuffer(), 1, W.Buffer(0,j), 1 );\n            W.Set( k-1, j, -Conj(s)*W.Get(k-1,j)+c*(etakm1km1-mu) );\n        }\n    }\n    // Divide x(0) by R(0,0)\n    for( Int j=0; j<n; ++j )\n        X.Set( 0, j, X.Get(0,j)/W.Get(0,j) );\n\n    // Solve against Q\n    for( Int j=0; j<n; ++j )        \n    {\n        F* x = X.Buffer(0,j);\n        const Real* c = C.LockedBuffer(0,j);\n        const F*    s = S.LockedBuffer(0,j);\n        F tau0 = x[0];\n        for( Int k=1; k<m; ++k )\n        {\n            F tau1 = x[k];\n            x[k-1] =       c[k] *tau0 + s[k]*tau1;\n            tau0   = -Conj(s[k])*tau0 + c[k]*tau1;\n        }\n        x[m-1] = tau0;\n    }\n}\n\n// NOTE: A [VC,* ] distribution might be most appropriate for the \n//       Hessenberg matrices since whole columns will need to be formed \n//       on every process and this distribution will keep the communication \n//       balanced.\n\ntemplate<typename F,Dist UH,Dist VH,Dist VX>\ninline void\nLN\n( F alpha, const DistMatrix<F,UH,VH>& H, const DistMatrix<F,VX,STAR>& shifts,\n  DistMatrix<F,STAR,VX>& X ) \n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"mshs::LN\");\n        if( shifts.ColAlign() != X.RowAlign() )\n            LogicError(\"shifts and X are not aligned\");\n    )\n    Scale( alpha, X );\n\n    const Int m = X.Height();\n    const Int nLoc = X.LocalWidth();\n    if( m == 0 )\n        return;\n\n    // Initialize storage for Givens rotations\n    typedef Base<F> Real;\n    Matrix<Real> C(m,nLoc);\n    Matrix<F> S(m,nLoc);\n\n    // Initialize the workspace for shifted columns of H\n    Matrix<F> W(m,nLoc);\n    {\n        auto h0 = LockedView( H, 0, 0, m, 1 );\n        DistMatrix<F,STAR,STAR> h0_STAR_STAR( h0 );\n        for( Int jLoc=0; jLoc<nLoc; ++jLoc )\n        {\n            MemCopy( W.Buffer(0,jLoc), h0_STAR_STAR.LockedBuffer(), m );\n            W.Update( 0, jLoc, -shifts.GetLocal(jLoc,0) );\n        }\n    }\n     \n    // Simultaneously find the LQ factorization and solve against L\n    DistMatrix<F,STAR,STAR> hB_STAR_STAR( H.Grid() );\n    for( Int k=0; k<m-1; ++k )\n    {\n        auto hB = LockedViewRange( H, k+2, k+1, m, k+2 );\n        hB_STAR_STAR = hB;\n        const F etakkp1 = H.Get(k,k+1);\n        const F etakp1kp1 = H.Get(k+1,k+1);\n        for( Int jLoc=0; jLoc<nLoc; ++jLoc )\n        {\n            // Find the Givens rotation needed to zero H(k,k+1),\n            //   | c        s | | H(k,k)   | = | gamma |\n            //   | -conj(s) c | | H(k,k+1) |   | 0     |\n            Real c; F s;\n            lapack::Givens( W.Get(k,jLoc), etakkp1, &c, &s );\n            C.Set( k, jLoc, c );\n            S.Set( k, jLoc, s );\n\n            // The new diagonal value of L\n            const F lambdakk = c*W.Get(k,jLoc) + s*etakkp1;\n\n            // Divide our current entry of x by the diagonal value of L\n            X.SetLocal( k, jLoc, X.GetLocal(k,jLoc)/lambdakk );\n\n            // x(k+1:end) -= x(k) * L(k+1:end,k), where\n            // L(k+1:end,k) = c H(k+1:end,k) + s H(k+1:end,k+1). We express this\n            // more concisely as xB -= x(k) * ( c wB + s hB ).\n            // Note that we carefully handle updating the k+1'th entry since\n            // it is shift-dependent.\n            const F mu = shifts.GetLocal( jLoc, 0 );\n            const F xc = X.GetLocal(k,jLoc)*c;\n            const F xs  = X.GetLocal(k,jLoc)*s;\n            X.UpdateLocal( k+1, jLoc, -xc*W.Get(k+1,jLoc)-xs*(etakp1kp1-mu) );\n            blas::Axpy\n            ( m-(k+2), -xc, W.LockedBuffer(k+2,jLoc), 1, \n                            X.Buffer(k+2,jLoc),       1 );\n            blas::Axpy\n            ( m-(k+2), -xs, hB_STAR_STAR.LockedBuffer(), 1, \n                            X.Buffer(k+2,jLoc),          1 );\n\n            // Change the working vector, wB, from representing a fully-updated\n            // portion of the k'th column of H from the end of the last \n            // to a fully-updated portion of the k+1'th column of this iteration\n            //\n            // w(k+1:end) := -conj(s) H(k+1:end,k) + c H(k+1:end,k+1)\n            W.Set( k+1, jLoc, -Conj(s)*W.Get(k+1,jLoc)+c*(etakp1kp1-mu) );\n            blas::Scal( m-(k+2), -Conj(s), W.Buffer(k+2,jLoc), 1 );\n            blas::Axpy\n            ( m-(k+2), c, hB_STAR_STAR.LockedBuffer(), 1, \n                          W.Buffer(k+2,jLoc),          1 );\n        }\n    }\n    // Divide x(end) by L(end,end)\n    for( Int jLoc=0; jLoc<nLoc; ++jLoc )\n        X.SetLocal( m-1, jLoc, X.GetLocal(m-1,jLoc)/W.Get(m-1,jLoc) );\n\n    // Solve against Q\n    for( Int jLoc=0; jLoc<nLoc; ++jLoc ) \n    {\n        F* x = X.Buffer(0,jLoc);\n        const Real* c = C.LockedBuffer(0,jLoc);\n        const F*    s = S.LockedBuffer(0,jLoc);\n        F tau0 = x[m-1];\n        for( Int k=m-2; k>=0; --k )\n        {\n            F tau1 = x[k];\n            x[k+1] =       c[k] *tau0 + s[k]*tau1;\n            tau0   = -Conj(s[k])*tau0 + c[k]*tau1;\n        }\n        x[0] = tau0;\n    }\n}\n\ntemplate<typename F,Dist UH,Dist VH,Dist VX>\ninline void\nUN\n( F alpha, const DistMatrix<F,UH,VH>& H, const DistMatrix<F,VX,STAR>& shifts,\n  DistMatrix<F,STAR,VX>& X ) \n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"mshs::UN\");\n        if( shifts.ColAlign() != X.RowAlign() )\n            LogicError(\"shifts and X are not aligned\");\n    )\n    Scale( alpha, X );\n\n    const Int m = X.Height();\n    const Int nLoc = X.LocalWidth();\n    if( m == 0 )\n        return;\n\n    // Initialize storage for Givens rotations\n    typedef Base<F> Real;\n    Matrix<Real> C(m,nLoc);\n    Matrix<F> S(m,nLoc);\n\n    // Initialize the workspace for shifted columns of H\n    Matrix<F> W(m,nLoc);\n    {\n        auto hLast = LockedView( H, 0, m-1, m, 1 );\n        DistMatrix<F,STAR,STAR> hLast_STAR_STAR( hLast );\n        for( Int jLoc=0; jLoc<nLoc; ++jLoc )\n        {\n            MemCopy( W.Buffer(0,jLoc), hLast_STAR_STAR.LockedBuffer(), m );\n            W.Update( m-1, jLoc, -shifts.GetLocal(jLoc,0) );\n        }\n    }\n     \n    // Simultaneously form the RQ factorization and solve against R\n    DistMatrix<F,STAR,STAR> hT_STAR_STAR( H.Grid() );\n    for( Int k=m-1; k>0; --k )\n    {\n        auto hT = LockedView( H, 0, k-1, k-1, 1 );\n        hT_STAR_STAR = hT;\n        const F etakkm1 = H.Get(k,k-1);\n        const F etakm1km1 = H.Get(k-1,k-1);\n        for( Int jLoc=0; jLoc<nLoc; ++jLoc )\n        {\n            // Find the Givens rotation needed to zero H(k,k-1),\n            //   | c        s | | H(k,k)   | = | gamma |\n            //   | -conj(s) c | | H(k,k-1) |   | 0     |\n            Real c; F s;\n            lapack::Givens( W.Get(k,jLoc), etakkm1, &c, &s );\n            C.Set( k, jLoc, c );\n            S.Set( k, jLoc, s );\n\n            // The new diagonal value of R\n            const F rhokk = c*W.Get(k,jLoc) + s*etakkm1;\n\n            // Divide our current entry of x by the diagonal value of R\n            X.SetLocal( k, jLoc, X.GetLocal(k,jLoc)/rhokk );\n\n            // x(0:k-1) -= x(k) * R(0:k-1,k), where\n            // R(0:k-1,k) = c H(0:k-1,k) + s H(0:k-1,k-1). We express this\n            // more concisely as xT -= x(k) * ( c wT + s hT ).\n            // Note that we carefully handle updating the k-1'th entry since\n            // it is shift-dependent.\n            const F mu = shifts.GetLocal( jLoc, 0 );\n            const F xc = X.GetLocal(k,jLoc)*c;\n            const F xs  = X.GetLocal(k,jLoc)*s;\n            blas::Axpy\n            ( k-1, -xc, W.LockedBuffer(0,jLoc),      1, X.Buffer(0,jLoc), 1 );\n            blas::Axpy\n            ( k-1, -xs, hT_STAR_STAR.LockedBuffer(), 1, X.Buffer(0,jLoc), 1 );\n            X.UpdateLocal( k-1, jLoc, -xc*W.Get(k-1,jLoc)-xs*(etakm1km1-mu) );\n\n            // Change the working vector, wT, from representing a fully-updated\n            // portion of the k'th column of H from the end of the last \n            // to a fully-updated portion of the k-1'th column of this iteration\n            //\n            // w(0:k-1) := -conj(s) H(0:k-1,k) + c H(0:k-1,k-1)\n            blas::Scal( k-1, -Conj(s), W.Buffer(0,jLoc), 1 );\n            blas::Axpy( k-1, c, hT_STAR_STAR.LockedBuffer(), 1, \n                                W.Buffer(0,jLoc),            1 );\n            W.Set( k-1, jLoc, -Conj(s)*W.Get(k-1,jLoc)+c*(etakm1km1-mu) );\n        }\n    }\n    for( Int jLoc=0; jLoc<nLoc; ++jLoc )\n        X.SetLocal( 0, jLoc, X.GetLocal(0,jLoc)/W.Get(0,jLoc) );\n\n    // Solve against Q\n    for( Int jLoc=0; jLoc<nLoc; ++jLoc )\n    {\n        F* x = X.Buffer(0,jLoc);\n        const Real* c = C.LockedBuffer(0,jLoc);\n        const F*    s = S.LockedBuffer(0,jLoc);\n        F tau0 = x[0];\n        for( Int k=1; k<m; ++k )\n        {\n            F tau1 = x[k];\n            x[k-1] =       c[k] *tau0 + s[k]*tau1;\n            tau0   = -Conj(s[k])*tau0 + c[k]*tau1;\n        }\n        x[m-1] = tau0;\n    }\n}\n\n// TODO: UT and LT\n\n} // namespace mshs\n\ntemplate<typename F>\ninline void\nMultiShiftHessSolve\n( UpperOrLower uplo, Orientation orientation,\n  F alpha, const Matrix<F>& H, const Matrix<F>& shifts, Matrix<F>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MultiShiftHessSolve\"))\n    if( uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            mshs::LN( alpha, H, shifts, X );\n        else\n            LogicError(\"This option is not yet supported\");\n    }\n    else\n    {\n        if( orientation == NORMAL )\n            mshs::UN( alpha, H, shifts, X );\n        else\n            LogicError(\"This option is not yet supported\");\n    }\n}\n\ntemplate<typename F,Dist UH,Dist VH,Dist VX>\ninline void\nMultiShiftHessSolve\n( UpperOrLower uplo, Orientation orientation,\n  F alpha, const DistMatrix<F,UH,VH>& H, const DistMatrix<F,VX,STAR>& shifts, \n  DistMatrix<F,STAR,VX>& X )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MultiShiftHessSolve\"))\n    if( uplo == LOWER )\n    {\n        if( orientation == NORMAL )\n            mshs::LN( alpha, H, shifts, X );\n        else\n            LogicError(\"This option is not yet supported\");\n    }\n    else\n    {\n        if( orientation == NORMAL )\n            mshs::UN( alpha, H, shifts, X );\n        else\n            LogicError(\"This option is not yet supported\");\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MULTISHIFTHESSSOLVE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve/SymmetricSolve.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SYMMETRICSOLVE_HPP\n#define ELEM_SYMMETRICSOLVE_HPP\n\n#include ELEM_LDL_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nSymmetricSolve\n( UpperOrLower uplo, Orientation orientation, Matrix<F>& A, Matrix<F>& B, \n  bool conjugate=false, LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricSolve\"))\n    if( uplo == UPPER )\n        LogicError(\"Upper Bunch-Kaufman is not yet supported\");\n    Matrix<Int> pPerm; \n    Matrix<F> dSub;\n    ldl::Pivoted( A, dSub, pPerm, conjugate, pivotType );\n    const bool conjFlip = ( (orientation == ADJOINT && conjugate == false) ||\n                            (orientation == TRANSPOSE && conjugate == true) );\n    if( conjFlip )\n        Conjugate( B );\n    ldl::SolveAfter( A, dSub, pPerm, B, conjugate );\n    if( conjFlip )\n        Conjugate( B );\n}\n\ntemplate<typename F>\ninline void\nSymmetricSolve\n( UpperOrLower uplo, Orientation orientation, \n  DistMatrix<F>& A, DistMatrix<F>& B, bool conjugate=false, \n  LDLPivotType pivotType=BUNCH_KAUFMAN_A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SymmetricSolve\"))\n    if( uplo == UPPER )\n        LogicError(\"Upper Bunch-Kaufman is not yet supported\");\n    DistMatrix<Int,VC,STAR> pPerm(A.Grid()); \n    DistMatrix<F,MD,STAR> dSub(A.Grid());\n    ldl::Pivoted( A, dSub, pPerm, conjugate, pivotType );\n    const bool conjFlip = ( (orientation == ADJOINT && conjugate == false) ||\n                            (orientation == TRANSPOSE && conjugate == true) );\n    if( conjFlip )\n        Conjugate( B );\n    ldl::SolveAfter( A, dSub, pPerm, B, conjugate );\n    if( conjFlip )\n        Conjugate( B );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SYMMETRICSOLVE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SOLVE_DECL_HPP\n#define ELEM_SOLVE_DECL_HPP\n\n#include ELEM_FACTOR_DECL_INC\n\n#endif // ifndef ELEM_SOLVE_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SOLVE_IMPL_HPP\n#define ELEM_SOLVE_IMPL_HPP\n\n// LU with partial pivoting\n#include \"./GaussianElimination.hpp\"\n\n// Cholesky factorization\n#include \"./HPDSolve.hpp\"\n\n// Bunch-Kaufman\n#include \"./SymmetricSolve.hpp\"\n#include \"./HermitianSolve.hpp\"\n\n// QR/LQ factorization\n#include \"./LeastSquares.hpp\"\n\n// Generalized QR/RQ factorization\n#include \"./GLM.hpp\"\n#include \"./LSE.hpp\"\n\n// Simultaneous upper-Hessenberg QR factorizations\n#include \"./MultiShiftHessSolve.hpp\"\n\n#endif // ifndef ELEM_SOLVE_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/solve.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SOLVE_HPP\n#define ELEM_SOLVE_HPP\n\n#include \"./solve/decl.hpp\"\n#include \"./solve/impl.hpp\"\n\n#endif // ifndef ELEM_SOLVE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/LLHB.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_LLHB_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_LLHB_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored bottom-to-top\n// implies that we will be forming a generalization of \n//\n//  (I - tau_0 v_0^T conj(v_0)) (I - tau_1 v_1^T conj(v_1)) = \n//  I - [ v_0^T, v_1^T ] [  tau_0, -tau_0 tau_1 conj(v_0) v_1^T ] [ conj(v_0) ]\n//                       [  0,      tau_1                       ] [ conj(v_1) ],\n//\n// which has a upper-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   triu(T) = triu( conj(V V^H) ),  diag(T) = 1/t or 1/conj(t),\n//\n// where V is the matrix of Householder vectors and t is the vector of scalars.\n// V is stored row-wise in the matrix.\n//\n\ntemplate<typename F> \ninline void\nLLHB\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LLHB\");\n        if( H.Width() != A.Height() )\n            LogicError(\"H's width must match A's height\");\n    )\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanConj, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, 0, ki+nb, kj+nb );\n        auto ATop = ViewRange( A, 0,  0, kj+nb, nA    );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTrapezoidal( LOWER, HPanConj, HPanConj.Width()-HPanConj.Height() );\n        SetDiagonal( HPanConj, F(1), 0, RIGHT );\n\n        Herk( UPPER, NORMAL, F(1), HPanConj, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, NORMAL, F(1), HPanConj, ATop, Z );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( ADJOINT, NORMAL, F(-1), HPanConj, Z, F(1), ATop );\n    }\n}\n\ntemplate<typename F> \ninline void\nLLHB\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LLHB\");\n        if( H.Width() != A.Height() )\n            LogicError(\"H's width must match A's height\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError\n            (\"H, t, and A must be distributed over the same grid\");\n    )\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's offset diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanConj(g);\n    DistMatrix<F,STAR,VR  > HPan_STAR_VR(g);\n    DistMatrix<F,STAR,MC  > HPan_STAR_MC(g); \n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > Z_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > Z_STAR_VR(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, 0, ki+nb, kj+nb );\n        auto ATop = ViewRange( A, 0,  0, kj+nb, nA    );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTrapezoidal( LOWER, HPanConj, HPanConj.Width()-HPanConj.Height() );\n        SetDiagonal( HPanConj, F(1), 0, RIGHT );\n\n        HPan_STAR_VR = HPanConj;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( UPPER, NORMAL,\n          F(1), HPan_STAR_VR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );\n        SInv_STAR_STAR.SumOver( HPan_STAR_VR.RowComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_STAR_MC.AlignWith( ATop );\n        HPan_STAR_MC = HPan_STAR_VR;\n        Z_STAR_MR.AlignWith( ATop );\n        LocalGemm( NORMAL, NORMAL, F(1), HPan_STAR_MC, ATop, Z_STAR_MR );\n        Z_STAR_VR.AlignWith( ATop );\n        Z_STAR_VR.PartialRowSumScatterFrom( Z_STAR_MR );\n\n        LocalTrsm\n        ( LEFT, UPPER, NORMAL, NON_UNIT, F(1), SInv_STAR_STAR, Z_STAR_VR );\n\n        Z_STAR_MR = Z_STAR_VR;\n        LocalGemm\n        ( ADJOINT, NORMAL, F(-1), HPan_STAR_MC, Z_STAR_MR, F(1), ATop );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_LLHB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/LLHF.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_LLHF_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_LLHF_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored top-to-bottom\n// implies that we will be forming a generalization of\n//\n//  (I - tau_1 v_1^T conj(v_1)) (I - tau_0 v_0^T conj(v_0)) = \n//  I - [ v_0^T, v_1^T ] [  tau_0,                       0     ] [ conj(v_0) ]\n//                       [ -tau_0 tau_1 conj(v_1) v_0^T, tau_1 ] [ conj(v_1) ],\n//\n// which has a lower-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   tril(T) = tril( conj(V V^H) ),  diag(T) = 1/t or 1/conj(t),\n//\n// where V is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F> \ninline void\nLLHF\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LLHF\");\n        if( H.Width() != A.Height() )\n            LogicError(\"H's width must match A's height\");\n    )\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanConj, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, 0, ki+nb, kj+nb );\n        auto ATop = ViewRange( A, 0, 0, kj+nb, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTrapezoidal( LOWER, HPanConj, HPanConj.Width()-HPanConj.Height() );\n        SetDiagonal( HPanConj, F(1), 0, RIGHT );\n        Herk( LOWER, NORMAL, F(1), HPanConj, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, NORMAL, F(1), HPanConj, ATop, Z );\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( ADJOINT, NORMAL, F(-1), HPanConj, Z, F(1), ATop );\n    }\n}\n\ntemplate<typename F> \ninline void\nLLHF\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LLHF\");\n        if( H.Width() != A.Height() )\n            LogicError(\"H's width must match A's height\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over same grid\");\n    )\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanConj(g);\n    DistMatrix<F,STAR,VR  > HPan_STAR_VR(g); \n    DistMatrix<F,STAR,MC  > HPan_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > Z_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > Z_STAR_VR(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, 0, ki+nb, kj+nb );\n        auto ATop = ViewRange( A, 0, 0, kj+nb, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTrapezoidal( LOWER, HPanConj, HPanConj.Width()-HPanConj.Height() );\n        SetDiagonal( HPanConj, F(1), 0, RIGHT );\n        HPan_STAR_VR = HPanConj;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( LOWER, NORMAL,\n          F(1), HPan_STAR_VR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );\n        SInv_STAR_STAR.SumOver( HPan_STAR_VR.RowComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_STAR_MC.AlignWith( ATop );\n        HPan_STAR_MC = HPan_STAR_VR;\n        Z_STAR_MR.AlignWith( ATop );\n        LocalGemm( NORMAL, NORMAL, F(1), HPan_STAR_MC, ATop, Z_STAR_MR );\n        Z_STAR_VR.AlignWith( ATop );\n        Z_STAR_VR.PartialRowSumScatterFrom( Z_STAR_MR );\n\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, NON_UNIT, F(1), SInv_STAR_STAR, Z_STAR_VR );\n\n        Z_STAR_MR = Z_STAR_VR;\n        LocalGemm\n        ( ADJOINT, NORMAL, F(-1), HPan_STAR_MC, Z_STAR_MR, F(1), ATop );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_LLHF_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/LLVB.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_LLVB_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_LLVB_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored right-to-left\n// implies that we will be forming a generalization of\n//\n//   (I - tau_0 u_0 u_0^H) (I - tau_1 u_1 u_1^H) = \n//   I - tau_0 u_0 u_0^H - tau_1 u_1 u_1^H + (tau_0 tau_1 u_0^H u_1) u_0 u_1^H =\n//   I - [ u_0, u_1 ] [ tau_0, -tau_0 tau_1 u_0^H u_1 ] [ u_0^H ]\n//                    [ 0,      tau_1                 ] [ u_1^H ],\n//\n// which has an upper-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   triu(T) = triu( U^H U ),  diag(T) = 1/t or 1/conj(t),\n//\n// where U is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F>\ninline void\nLLVB\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LLVB\");\n        if( H.Height() != A.Height() )\n            LogicError(\"H and A must have the same height\");\n    )\n    const Int m = H.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanCopy, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, m, kj+nb );\n        auto ABot = ViewRange( A, ki, 0, m, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTriangular( LOWER, HPanCopy );\n        SetDiagonal( HPanCopy, F(1) );\n\n        Herk( UPPER, ADJOINT, F(1), HPanCopy, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( ADJOINT, NORMAL, F(1), HPanCopy, ABot, Z );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, NORMAL, F(-1), HPanCopy, Z, F(1), ABot );\n    }\n}\n\ntemplate<typename F> \ninline void\nLLVB\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LLVB\");\n        if( H.Height() != A.Height() )\n            LogicError(\"H and A must have the same height\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over same grid\");\n    )\n    const Int m = H.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != H.DiagonalLength(offset) )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanCopy(g);\n    DistMatrix<F,VC,  STAR> HPan_VC_STAR(g);\n    DistMatrix<F,MC,  STAR> HPan_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > Z_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > Z_STAR_VR(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, m, kj+nb );\n        auto ABot = ViewRange( A, ki, 0, m, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTriangular( LOWER, HPanCopy );\n        SetDiagonal( HPanCopy, F(1) );\n\n        HPan_VC_STAR = HPanCopy;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( UPPER, ADJOINT, \n          F(1), HPan_VC_STAR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );     \n        SInv_STAR_STAR.SumOver( HPan_VC_STAR.ColComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_MC_STAR.AlignWith( ABot );\n        HPan_MC_STAR = HPanCopy;\n        Z_STAR_MR.AlignWith( ABot );\n        LocalGemm( ADJOINT, NORMAL, F(1), HPan_MC_STAR, ABot, Z_STAR_MR );\n        Z_STAR_VR.AlignWith( ABot );\n        Z_STAR_VR.PartialRowSumScatterFrom( Z_STAR_MR );\n \n        LocalTrsm\n        ( LEFT, UPPER, NORMAL, NON_UNIT, F(1), SInv_STAR_STAR, Z_STAR_VR );\n\n        Z_STAR_MR = Z_STAR_VR;\n        LocalGemm( NORMAL, NORMAL, F(-1), HPan_MC_STAR, Z_STAR_MR, F(1), ABot );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_LLVB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/LLVF.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_LLVF_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_LLVF_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored left-to-right\n// implies that we will be forming a generalization of\n//\n//   (I - tau_1 u_1 u_1^H) (I - tau_0 u_0 u_0^H) = \n//   I - tau_0 u_0 u_0^H - tau_1 u_1 u_1^H + (tau_0 tau_1 u_1^H u_0) u_1 u_0^H =\n//   I - [ u_0, u_1 ] [  tau_0,                 0     ] [ u_0^H ]\n//                    [ -tau_0 tau_1 u_1^H u_0, tau_1 ] [ u_1^H ],\n//\n// which has a lower-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   tril(T) = tril( U^H U ),  diag(T) = 1/t or 1/conj(t),\n//\n// where U is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F> \ninline void\nLLVF\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LLVF\");\n        if( H.Height() != A.Height() )\n            LogicError(\"A and H must be the same height\");\n    )\n    const Int m = H.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag.\");\n    )\n    Matrix<F> HPanCopy, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, m, kj+nb );\n        auto ABot = ViewRange( A, ki, 0, m, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTriangular( LOWER, HPanCopy );\n        SetDiagonal( HPanCopy, F(1) );\n\n        Herk( LOWER, ADJOINT, F(1), HPanCopy, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( ADJOINT, NORMAL, F(1), HPanCopy, ABot, Z );\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, NORMAL, F(-1), HPanCopy, Z, F(1), ABot );\n    }\n}\n\ntemplate<typename F> \ninline void\nLLVF\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LLVF\");\n        if( H.Height() != A.Height() )\n            LogicError(\"A and H must be the same height\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int m = H.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag.\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanCopy(g);\n    DistMatrix<F,VC,  STAR> HPan_VC_STAR(g);\n    DistMatrix<F,MC,  STAR> HPan_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > Z_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > Z_STAR_VR(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, m, kj+nb );\n        auto ABot = ViewRange( A, ki, 0, m, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTriangular( LOWER, HPanCopy );\n        SetDiagonal( HPanCopy, F(1) );\n\n        HPan_VC_STAR = HPanCopy;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( LOWER, ADJOINT, \n          F(1), HPan_VC_STAR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );     \n        SInv_STAR_STAR.SumOver( HPan_VC_STAR.ColComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_MC_STAR.AlignWith( ABot );\n        HPan_MC_STAR = HPanCopy;\n        Z_STAR_MR.AlignWith( ABot );\n        LocalGemm( ADJOINT, NORMAL, F(1), HPan_MC_STAR, ABot, Z_STAR_MR );\n        Z_STAR_VR.AlignWith( ABot );\n        Z_STAR_VR.PartialRowSumScatterFrom( Z_STAR_MR );\n        \n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, NON_UNIT, F(1), SInv_STAR_STAR, Z_STAR_VR );\n\n        Z_STAR_MR = Z_STAR_VR;\n        LocalGemm( NORMAL, NORMAL, F(-1), HPan_MC_STAR, Z_STAR_MR, F(1), ABot );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_LLVF_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/LUHB.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_LUHB_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_LUHB_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored bottom-to-top\n// implies that we will be forming a generalization of \n//\n//  (I - tau_0 v_0^T conj(v_0)) (I - tau_1 v_1^T conj(v_1)) = \n//  I - [ v_0^T, v_1^T ] [  tau_0, -tau_0 tau_1 conj(v_0) v_1^T ] [ conj(v_0) ]\n//                       [  0,      tau_1                       ] [ conj(v_1) ],\n//\n// which has a upper-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   triu(T) = triu( conj(V V^H) ),  diag(T) = 1/t or 1/conj(t),\n//\n// where V is the matrix of Householder vectors and t is the vector of scalars.\n// V is stored row-wise in the matrix.\n//\n\ntemplate<typename F> \ninline void\nLUHB\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LUHB\");\n        if( H.Width() != A.Height() )\n            LogicError(\"H's width and A's height must match\");\n    )\n    const Int nA = A.Width();\n    const Int nH = H.Width(); \n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanConj, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, ki+nb, nH );\n        auto ABot = ViewRange( A, kj, 0, nH, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTriangular( UPPER, HPanConj );\n        SetDiagonal( HPanConj, F(1) );\n\n        Herk( UPPER, NORMAL, F(1), HPanConj, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, NORMAL, F(1), HPanConj, ABot, Z );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( ADJOINT, NORMAL, F(-1), HPanConj, Z, F(1), ABot );\n    }\n}\n\ntemplate<typename F> \ninline void\nLUHB\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LUHB\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int nA = A.Width();\n    const Int nH = H.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's offset diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanConj(g);\n    DistMatrix<F,STAR,VR  > HPan_STAR_VR(g);\n    DistMatrix<F,STAR,MC  > HPan_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > Z_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > Z_STAR_VR(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, ki+nb, nH );\n        auto ABot = ViewRange( A, kj, 0, nH, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTriangular( UPPER, HPanConj );\n        SetDiagonal( HPanConj, F(1) );\n\n        HPan_STAR_VR = HPanConj;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( UPPER, NORMAL,\n          F(1), HPan_STAR_VR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );\n        SInv_STAR_STAR.SumOver( HPan_STAR_VR.RowComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_STAR_MC.AlignWith( ABot );\n        HPan_STAR_MC = HPan_STAR_VR;\n        Z_STAR_MR.AlignWith( ABot );\n        LocalGemm( NORMAL, NORMAL, F(1), HPan_STAR_MC, ABot, Z_STAR_MR );\n        Z_STAR_VR.AlignWith( ABot );\n        Z_STAR_VR.PartialRowSumScatterFrom( Z_STAR_MR );\n\n        LocalTrsm\n        ( LEFT, UPPER, NORMAL, NON_UNIT, F(1), SInv_STAR_STAR, Z_STAR_VR );\n\n        Z_STAR_MR = Z_STAR_VR;\n        LocalGemm\n        ( ADJOINT, NORMAL, F(-1), HPan_STAR_MC, Z_STAR_MR, F(1), ABot );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_LUHB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/LUHF.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_LUHF_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_LUHF_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored top-to-bottom\n// implies that we will be forming a generalization of \n//\n//  (I - tau_1 v_1^T conj(v_1)) (I - tau_0 v_0^T conj(v_0)) = \n//  I - [ v_0^T, v_1^T ] [  tau_0,                       0     ] [ conj(v_0) ]\n//                       [ -tau_0 tau_1 conj(v_0) v_1^T, tau_1 ] [ conj(v_1) ],\n//\n// which has a lower-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   tril(T) = tril( conj(V V^H) ),  diag(T) = 1/t or 1/conj(t),\n//\n// where V is the matrix of Householder vectors and t is the vector of scalars.\n// V is stored row-wise in the matrix.\n//\n\ntemplate<typename F>\ninline void\nLUHF\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LUHF\");\n        if( H.Width() != A.Height() )\n            LogicError(\"H's width must match A's height\");\n    )\n    const Int nA = A.Width();\n    const Int nH = H.Width();\n    const Int diagLength = H.DiagonalLength(offset); \n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanConj, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, ki+nb, nH );\n        auto ABot = ViewRange( A, kj, 0, nH, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTriangular( UPPER, HPanConj );\n        SetDiagonal( HPanConj, F(1) );\n\n        Herk( LOWER, NORMAL, F(1), HPanConj, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, NORMAL, F(1), HPanConj, ABot, Z );\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( ADJOINT, NORMAL, F(-1), HPanConj, Z, F(1), ABot );\n    }\n}\n\ntemplate<typename F>\ninline void\nLUHF\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LUHF\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int nA = A.Width();\n    const Int nH = H.Width();\n    const Int diagLength = H.DiagonalLength(offset); \n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's offset diagonal\");\n    )\n    const Grid& g = H.Grid(); \n    DistMatrix<F> HPanConj(g);\n    DistMatrix<F,STAR,VR  > HPan_STAR_VR(g);\n    DistMatrix<F,STAR,MC  > HPan_STAR_MC(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > Z_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > Z_STAR_VR(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, ki+nb, nH );\n        auto ABot = ViewRange( A, kj, 0, nH, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTriangular( UPPER, HPanConj );\n        SetDiagonal( HPanConj, F(1) );\n\n        HPan_STAR_VR = HPanConj;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( LOWER, NORMAL,\n          F(1), HPan_STAR_VR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );\n        SInv_STAR_STAR.SumOver( HPan_STAR_VR.RowComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_STAR_MC.AlignWith( ABot );\n        HPan_STAR_MC = HPan_STAR_VR;\n        Z_STAR_MR.AlignWith( ABot );\n        LocalGemm( NORMAL, NORMAL, F(1), HPan_STAR_MC, ABot, Z_STAR_MR );\n        Z_STAR_VR.AlignWith( ABot );\n        Z_STAR_VR.PartialRowSumScatterFrom( Z_STAR_MR );\n\n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, NON_UNIT, F(1), SInv_STAR_STAR, Z_STAR_VR );\n\n        Z_STAR_MR = Z_STAR_VR;\n        LocalGemm\n        ( ADJOINT, NORMAL, F(-1), HPan_STAR_MC, Z_STAR_MR, F(1), ABot );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_LUHF_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/LUVB.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_LUVB_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_LUVB_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored right-to-left\n// implies that we will be forming a generalization of\n//\n//   (I - tau_0 u_0 u_0^H) (I - tau_1 u_1 u_1^H) = \n//   I - tau_0 u_0 u_0^H - tau_1 u_1 u_1^H + (tau_0 tau_1 u_0^H u_1) u_0 u_1^H =\n//   I - [ u_0, u_1 ] [ tau_0, -tau_0 tau_1 u_0^H u_1 ] [ u_0^H ]\n//                    [ 0,      tau_1                 ] [ u_1^H ],\n//\n// which has an upper-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   triu(T) = triu( U^H U ),  diag(T) = 1/t or 1/conj(t),\n//\n// where U is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F>\nvoid\nLUVB\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"apply_packed_reflectors::LUVB\"))\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag.\");\n    )\n    Matrix<F> HPanCopy, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, 0, kj, ki+nb, kj+nb );\n        auto ATop = ViewRange( A, 0, 0, ki+nb, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTrapezoidal( UPPER, HPanCopy, HPanCopy.Width()-HPanCopy.Height() );\n        SetDiagonal( HPanCopy, F(1), 0, RIGHT );\n\n        Herk( UPPER, ADJOINT, F(1), HPanCopy, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( ADJOINT, NORMAL, F(1), HPanCopy, ATop, Z );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, NORMAL, F(-1), HPanCopy, Z, F(1), ATop );\n    }\n}\n\ntemplate<typename F> \nvoid\nLUVB\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LUVB\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag.\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanCopy(g);\n    DistMatrix<F,VC,  STAR> HPan_VC_STAR(g);\n    DistMatrix<F,MC,  STAR> HPan_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > Z_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > Z_STAR_VR(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, 0, kj, ki+nb, kj+nb );\n        auto ATop = ViewRange( A, 0, 0, ki+nb, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTrapezoidal( UPPER, HPanCopy, HPanCopy.Width()-HPanCopy.Height() );\n        SetDiagonal( HPanCopy, F(1), 0, RIGHT );\n\n        HPan_VC_STAR = HPanCopy;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( UPPER, ADJOINT, \n          F(1), HPan_VC_STAR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );\n        SInv_STAR_STAR.SumOver( HPan_VC_STAR.ColComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_MC_STAR.AlignWith( ATop );\n        HPan_MC_STAR = HPanCopy;\n        Z_STAR_MR.AlignWith( ATop );\n        LocalGemm( ADJOINT, NORMAL, F(1), HPan_MC_STAR, ATop, Z_STAR_MR );\n        Z_STAR_VR.AlignWith( ATop );\n        Z_STAR_VR.PartialRowSumScatterFrom( Z_STAR_MR );\n        \n        LocalTrsm\n        ( LEFT, UPPER, NORMAL, NON_UNIT, F(1), SInv_STAR_STAR, Z_STAR_VR );\n\n        Z_STAR_MR = Z_STAR_VR;\n        LocalGemm( NORMAL, NORMAL, F(-1), HPan_MC_STAR, Z_STAR_MR, F(1), ATop );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_LUVB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/LUVF.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_LUVF_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_LUVF_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored left-to-right\n// implies that we will be forming a generalization of\n//\n//   (I - tau_1 u_1 u_1^H) (I - tau_0 u_0 u_0^H) = \n//   I - tau_0 u_0 u_0^H - tau_1 u_1 u_1^H + (tau_0 tau_1 u_1^H u_0) u_1 u_0^H =\n//   I - [ u_0, u_1 ] [  tau_0,                 0     ] [ u_0^H ]\n//                    [ -tau_0 tau_1 u_1^H u_0, tau_1 ] [ u_1^H ],\n//\n// which has a lower-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   tril(T) = tril( U^H U ),  diag(T) = 1/t or 1/conj(t),\n//\n// where U is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F>\ninline void\nLUVF\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LUVF\");\n        if( H.Height() != A.Height() )\n            LogicError(\"H and A must be the same height\");\n    )\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanCopy, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, 0, kj, ki+nb, kj+nb );\n        auto ATop = ViewRange( A, 0, 0, ki+nb, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTrapezoidal( UPPER, HPanCopy, HPanCopy.Width()-HPanCopy.Height() );\n        SetDiagonal( HPanCopy, F(1), 0, RIGHT );\n        Herk( LOWER, ADJOINT, F(1), HPanCopy, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( ADJOINT, NORMAL, F(1), HPanCopy, ATop, Z );\n        Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, NORMAL, F(-1), HPanCopy, Z, F(1), ATop );\n    }\n}\n\ntemplate<typename F> \ninline void\nLUVF\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::LUVF\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n        if( H.Height() != A.Height() )\n            LogicError(\"H and A must be the same height\");\n    )\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanCopy(g);\n    DistMatrix<F,VC,  STAR> HPan_VC_STAR(g);\n    DistMatrix<F,MC,  STAR> HPan_MC_STAR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MR  > Z_STAR_MR(g);\n    DistMatrix<F,STAR,VR  > Z_STAR_VR(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, 0, kj, ki+nb, kj+nb );\n        auto ATop = ViewRange( A, 0, 0, ki+nb, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTrapezoidal( UPPER, HPanCopy, HPanCopy.Width()-HPanCopy.Height() );\n        SetDiagonal( HPanCopy, F(1), 0, RIGHT );\n        HPan_VC_STAR = HPanCopy;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( LOWER, ADJOINT, \n          F(1), HPan_VC_STAR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() ); \n        SInv_STAR_STAR.SumOver( HPan_VC_STAR.ColComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_MC_STAR.AlignWith( ATop );\n        HPan_MC_STAR = HPanCopy;\n        Z_STAR_MR.AlignWith( ATop );\n        LocalGemm( ADJOINT, NORMAL, F(1), HPan_MC_STAR, ATop, Z_STAR_MR );\n        Z_STAR_VR.AlignWith( ATop );\n        Z_STAR_VR.PartialRowSumScatterFrom( Z_STAR_MR );\n        \n        LocalTrsm\n        ( LEFT, LOWER, NORMAL, NON_UNIT, F(1), SInv_STAR_STAR, Z_STAR_VR );\n\n        Z_STAR_MR = Z_STAR_VR;\n        LocalGemm( NORMAL, NORMAL, F(-1), HPan_MC_STAR, Z_STAR_MR, F(1), ATop );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_LUVF_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/RLHB.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_RLHB_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_RLHB_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored bottom-to-top\n// implies that we will be forming a generalization of\n//\n//  (I - tau_1 v_1^T conj(v_1)) (I - tau_0 v_0^T conj(v_0)) = \n//  I - [ v_0^T, v_1^T ] [  tau_0,                       0     ] [ conj(v_0) ]\n//                       [ -tau_0 tau_1 conj(v_1) v_0^T, tau_1 ] [ conj(v_1) ],\n//\n// which has a lower-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   tril(T) = tril( conj(V V^H) ),  diag(T) = 1/t or 1/conj(t),\n//\n// where V is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F> \ninline void\nRLHB\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RLHB\");\n        if( A.Width() != H.Width() )\n            LogicError(\"H and A must have the same width\");\n    )\n    const Int m = A.Height();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanConj, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    \n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, 0, ki+nb, kj+nb );\n        auto ALeft = ViewRange( A, 0, 0, m, kj+nb );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTrapezoidal( LOWER, HPanConj, HPanConj.Width()-HPanConj.Height() );\n        SetDiagonal( HPanConj, F(1), 0, RIGHT );\n\n        Herk( LOWER, NORMAL, F(1), HPanConj, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, ADJOINT, F(1), ALeft, HPanConj, Z );\n        Trsm( RIGHT, LOWER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, NORMAL, F(-1), Z, HPanConj, F(1), ALeft );\n    }\n}\n\ntemplate<typename F> \ninline void\nRLHB\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RLHB\");\n        if( H.Grid() != A.Grid() || A.Grid() != t.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int m = A.Height();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanConj(g);\n    DistMatrix<F,STAR,VR  > HPan_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > HPan_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > ZAdj_STAR_MC(g);\n    DistMatrix<F,STAR,VC  > ZAdj_STAR_VC(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    \n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, 0, ki+nb, kj+nb );\n        auto ALeft = ViewRange( A, 0, 0, m, kj+nb );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTrapezoidal( LOWER, HPanConj, HPanConj.Width()-HPanConj.Height() );\n        SetDiagonal( HPanConj, F(1), 0, RIGHT );\n\n        HPan_STAR_VR = HPanConj;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( LOWER, NORMAL,\n          F(1), HPan_STAR_VR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );\n        SInv_STAR_STAR.SumOver( HPan_STAR_VR.RowComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_STAR_MR.AlignWith( ALeft );\n        HPan_STAR_MR = HPan_STAR_VR;\n        ZAdj_STAR_MC.AlignWith( ALeft );\n        LocalGemm( NORMAL, ADJOINT, F(1), HPan_STAR_MR, ALeft, ZAdj_STAR_MC );\n        ZAdj_STAR_VC.AlignWith( ALeft );\n        ZAdj_STAR_VC.PartialRowSumScatterFrom( ZAdj_STAR_MC );\n\n        LocalTrsm\n        ( LEFT, LOWER, ADJOINT, NON_UNIT,\n          F(1), SInv_STAR_STAR, ZAdj_STAR_VC );\n\n        ZAdj_STAR_MC = ZAdj_STAR_VC;\n        LocalGemm\n        ( ADJOINT, NORMAL,\n          F(-1), ZAdj_STAR_MC, HPan_STAR_MR, F(1), ALeft );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_RLHB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/RLHF.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_RLHF_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_RLHF_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored top-to-bottom\n// implies that we will be forming a generalization of\n//\n//  (I - tau_0 v_0^T conj(v_0)) (I - tau_1 v_1^T conj(v_1)) = \n//  I - [ v_0^T, v_1^T ] [ tau_0, -tau_0 tau_1 conj(v_0) v_1^T ] [ conj(v_0) ]\n//                       [ 0,      tau_1                       ] [ conj(v_1) ],\n//\n// which has an upper-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   triu(T) = triu( conj(V V^H) ),  diag(T) = 1/t or 1/conj(t),\n//\n// where V is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F> \ninline void\nRLHF\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RLHF\");\n        if( A.Width() != H.Width() )\n            LogicError(\"A and H must have the same width\");\n    )\n    const Int mA = A.Height();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanConj, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, 0, ki+nb, kj+nb );\n        auto ALeft = ViewRange( A, 0, 0, mA, kj+nb );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTrapezoidal( LOWER, HPanConj, HPanConj.Width()-HPanConj.Height() );\n        SetDiagonal( HPanConj, F(1), 0, RIGHT );\n\n        Herk( UPPER, NORMAL, F(1), HPanConj, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, ADJOINT, F(1), ALeft, HPanConj, Z );\n        Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, NORMAL, F(-1), Z, HPanConj, F(1), ALeft );\n    }\n}\n\ntemplate<typename F> \ninline void\nRLHF\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RLHF\");\n        if( A.Width() != H.Width() )\n            LogicError(\"A and H must have the same width\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int mA = A.Height();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanConj(g);\n    DistMatrix<F,STAR,VR  > HPan_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > HPan_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > ZAdj_STAR_MC(g);\n    DistMatrix<F,STAR,VC  > ZAdj_STAR_VC(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, 0, ki+nb, kj+nb );\n        auto ALeft = ViewRange( A, 0, 0, mA, kj+nb );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTrapezoidal( LOWER, HPanConj, HPanConj.Width()-HPanConj.Height() );\n        SetDiagonal( HPanConj, F(1), 0, RIGHT );\n\n        HPan_STAR_VR = HPanConj;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( UPPER, NORMAL,\n          F(1), HPan_STAR_VR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );\n        SInv_STAR_STAR.SumOver( HPan_STAR_VR.RowComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_STAR_MR.AlignWith( ALeft );\n        HPan_STAR_MR = HPan_STAR_VR;\n        ZAdj_STAR_MC.AlignWith( ALeft );\n        LocalGemm( NORMAL, ADJOINT, F(1), HPan_STAR_MR, ALeft, ZAdj_STAR_MC );\n        ZAdj_STAR_VC.AlignWith( ALeft );\n        ZAdj_STAR_VC.PartialRowSumScatterFrom( ZAdj_STAR_MC );\n\n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, NON_UNIT,\n          F(1), SInv_STAR_STAR, ZAdj_STAR_VC );\n\n        ZAdj_STAR_MC = ZAdj_STAR_VC;\n        LocalGemm\n        ( ADJOINT, NORMAL, F(-1), ZAdj_STAR_MC, HPan_STAR_MR, F(1), ALeft );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_RLHF_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/RLVB.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_RLVB_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_RLVB_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored right-to-left\n// implies that we will be forming a generalization of\n//\n//   (I - tau_1 u_1 u_1^H) (I - tau_0 u_0 u_0^H) = \n//   I - tau_0 u_0 u_0^H - tau_1 u_1 u_1^H + (tau_0 tau_1 u_1^H u_0) u_1 u_0^H =\n//   I - [ u_0, u_1 ] [  tau_0,                 0     ] [ u_0^H ]\n//                    [ -tau_0 tau_1 u_1^H u_0, tau_1 ] [ u_1^H ],\n//\n// which has a lower-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   tril(T) = tril( U^H U ),  diag(T) = 1/t or 1/conj(t),\n//\n// where U is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F> \ninline void\nRLVB\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RLVB\");\n        if( H.Height() != A.Width() )\n            LogicError(\"H's height must match A's width\");\n    )\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanCopy, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, nA, kj+nb );\n        auto ARight = ViewRange( A, 0, ki, mA, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTriangular( LOWER, HPanCopy );\n        SetDiagonal( HPanCopy, F(1) );\n\n        Herk( LOWER, ADJOINT, F(1), HPanCopy, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, NORMAL, F(1), ARight, HPanCopy, Z );\n        Trsm( RIGHT, LOWER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, ADJOINT, F(-1), Z, HPanCopy, F(1), ARight );\n    }\n}\n\ntemplate<typename F> \ninline void\nRLVB\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RLVB\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanCopy(g);\n    DistMatrix<F,VC,  STAR> HPan_VC_STAR(g);\n    DistMatrix<F,MR,  STAR> HPan_MR_STAR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > ZAdj_STAR_MC(g);\n    DistMatrix<F,STAR,VC  > ZAdj_STAR_VC(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, nA, kj+nb );\n        auto ARight = ViewRange( A, 0, ki, mA, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTriangular( LOWER, HPanCopy );\n        SetDiagonal( HPanCopy, F(1) );\n\n        HPan_VC_STAR = HPanCopy;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( LOWER, ADJOINT, \n          F(1), HPan_VC_STAR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );     \n        SInv_STAR_STAR.SumOver( HPan_VC_STAR.ColComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_MR_STAR.AlignWith( ARight );\n        HPan_MR_STAR = HPan_VC_STAR;\n        ZAdj_STAR_MC.AlignWith( ARight );\n        LocalGemm( ADJOINT, ADJOINT, F(1), HPan_MR_STAR, ARight, ZAdj_STAR_MC );\n        ZAdj_STAR_VC.AlignWith( ARight );\n        ZAdj_STAR_VC.PartialRowSumScatterFrom( ZAdj_STAR_MC );\n \n        LocalTrsm\n        ( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), SInv_STAR_STAR, ZAdj_STAR_VC );\n\n        ZAdj_STAR_MC = ZAdj_STAR_VC;\n        LocalGemm\n        ( ADJOINT, ADJOINT, F(-1), ZAdj_STAR_MC, HPan_MR_STAR, F(1), ARight );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_RLVB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/RLVF.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_RLVF_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_RLVF_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored left-to-right\n// implies that we will be forming a generalization of\n//\n//   (I - tau_0 u_0 u_0^H) (I - tau_1 u_1 u_1^H) = \n//   I - tau_0 u_0 u_0^H - tau_1 u_1 u_1^H + (tau_0 tau_1 u_0^H u_1) u_0 u_1^H =\n//   I - [ u_0, u_1 ] [ tau_0, -tau_0 tau_1 u_0^H u_1 ] [ u_0^H ]\n//                    [ 0,      tau_1                 ] [ u_1^H ],\n//\n// which has an upper-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   triu(T) = triu( U^H U ),  diag(T) = 1/t or 1/conj(t),\n//\n// where U is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F> \nvoid\nRLVF\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RLVF\");\n        if( A.Width() != H.Height() )\n            LogicError(\"A's width must match H's height\");\n    )\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanCopy, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, nA, kj+nb );\n        auto ARight = ViewRange( A, 0, ki, mA, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTriangular( LOWER, HPanCopy );\n        SetDiagonal( HPanCopy, F(1) );\n\n        Herk( UPPER, ADJOINT, F(1), HPanCopy, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, NORMAL, F(1), ARight, HPanCopy, Z );\n        Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, ADJOINT, F(-1), Z, HPanCopy, F(1), ARight );\n    }\n}\n\ntemplate<typename F> \nvoid\nRLVF\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RLVF\");\n        if( A.Width() != H.Height() )\n            LogicError(\"A's width must match H's height\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's offset diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanCopy(g);\n    DistMatrix<F,VC,  STAR> HPan_VC_STAR(g);\n    DistMatrix<F,MR,  STAR> HPan_MR_STAR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > ZAdj_STAR_MC(g);\n    DistMatrix<F,STAR,VC  > ZAdj_STAR_VC(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, nA, kj+nb );\n        auto ARight = ViewRange( A, 0, ki, mA, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTriangular( LOWER, HPanCopy );\n        SetDiagonal( HPanCopy, F(1) );\n\n        HPan_VC_STAR = HPanCopy;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( UPPER, ADJOINT, \n          F(1), HPan_VC_STAR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );     \n        SInv_STAR_STAR.SumOver( HPan_VC_STAR.ColComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_MR_STAR.AlignWith( ARight );\n        HPan_MR_STAR = HPan_VC_STAR;\n        ZAdj_STAR_MC.AlignWith( ARight );\n        LocalGemm( ADJOINT, ADJOINT, F(1), HPan_MR_STAR, ARight, ZAdj_STAR_MC );\n        ZAdj_STAR_VC.AlignWith( ARight );\n        ZAdj_STAR_VC.PartialRowSumScatterFrom( ZAdj_STAR_MC );\n        \n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), SInv_STAR_STAR, ZAdj_STAR_VC );\n\n        ZAdj_STAR_MC = ZAdj_STAR_VC;\n        LocalGemm\n        ( ADJOINT, ADJOINT, F(-1), ZAdj_STAR_MC, HPan_MR_STAR, F(1), ARight );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_RLVF_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/RUHB.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_RUHB_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_RUHB_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored bottom-to-top\n// implies that we will be forming a generalization of \n//\n//  (I - tau_1 v_1^T v_1) (I - tau_0 v_0^T v_0) = \n//  I - [ v_0^T, v_1^T ] [  tau_0,                       0     ] [ conj(v_0) ]\n//                       [ -tau_0 tau_1 conj(v_1) v_0^T, tau_1 ] [ conj(v_1) ],\n//\n// which has a lower-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   tril(T) = triu( conj(V V^H) ),  diag(T) = 1/t or 1/conj(t),\n//\n// where V is the matrix of Householder vectors and t is the vector of scalars.\n// V is stored row-wise in the matrix.\n//\n\ntemplate<typename F>\ninline void\nRUHB\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RUHB\");\n        if( A.Width() != H.Width() )\n            LogicError(\"H and A must have the same width\");\n    )\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanConj, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, ki+nb, nA );\n        auto ARight = ViewRange( A, 0, kj, mA, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTriangular( UPPER, HPanConj );\n        SetDiagonal( HPanConj, F(1) );\n\n        Herk( LOWER, NORMAL, F(1), HPanConj, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, ADJOINT, F(1), ARight, HPanConj, Z );\n        Trsm( RIGHT, LOWER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, NORMAL, F(-1), Z, HPanConj, F(1), ARight );\n    }\n}\n\ntemplate<typename F>\ninline void\nRUHB\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RUHB\");\n        if( A.Width() != H.Width() )\n            LogicError(\"H and A must have the same width\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's offset diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanConj(g);\n    DistMatrix<F,STAR,VR  > HPan_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > HPan_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > ZAdj_STAR_MC(g);\n    DistMatrix<F,STAR,VC  > ZAdj_STAR_VC(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, ki+nb, nA );\n        auto ARight = ViewRange( A, 0, kj, mA, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTriangular( UPPER, HPanConj );\n        SetDiagonal( HPanConj, F(1) );\n\n        HPan_STAR_VR = HPanConj;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( LOWER, NORMAL,\n          F(1), HPan_STAR_VR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );\n        SInv_STAR_STAR.SumOver( HPan_STAR_VR.RowComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_STAR_MR.AlignWith( ARight );\n        HPan_STAR_MR = HPan_STAR_VR;\n        ZAdj_STAR_MC.AlignWith( ARight );\n        LocalGemm( NORMAL, ADJOINT, F(1), HPan_STAR_MR, ARight, ZAdj_STAR_MC );\n        ZAdj_STAR_VC.AlignWith( ARight );\n        ZAdj_STAR_VC.PartialRowSumScatterFrom( ZAdj_STAR_MC );\n\n        LocalTrsm\n        ( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), SInv_STAR_STAR, ZAdj_STAR_VC );\n\n        ZAdj_STAR_MC = ZAdj_STAR_VC;\n        LocalGemm\n        ( ADJOINT, NORMAL, F(-1), ZAdj_STAR_MC, HPan_STAR_MR, F(1), ARight );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_RUHB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/RUHF.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_RUHF_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_RUHF_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored top-to-bottom\n// implies that we will be forming a generalization of \n//\n//  (I - tau_0 v_0^T conj(v_0)) (I - tau_1 v_1^T conj(v_1)) = \n//  I - [ v_0^T, v_1^T ] [ tau_0, -tau_0 tau_1 conj(v_0) v_1^T ] [ conj(v_0) ]\n//                       [ 0,      tau_1                       ] [ conj(v_1) ],\n//\n// which has an upper-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   triu(T) = triu( conj(V V^H) ),  diag(T) = 1/t or 1/conj(t),\n//\n// where V is the matrix of Householder vectors and t is the vector of scalars.\n// V is stored row-wise in the matrix.\n//\n\ntemplate<typename F>\nvoid\nRUHF\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RUHF\");\n        if( A.Width() != H.Width() )\n            LogicError(\"H and A must have the same width\");\n    )\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanConj, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, ki+nb, nA );\n        auto ARight = ViewRange( A, 0, kj, mA, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTriangular( UPPER, HPanConj );\n        SetDiagonal( HPanConj, F(1) );\n\n        Herk( UPPER, NORMAL, F(1), HPanConj, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, ADJOINT, F(1), ARight, HPanConj, Z );\n        Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, NORMAL, F(-1), Z, HPanConj, F(1), ARight );\n    }\n}\n\ntemplate<typename F>\nvoid\nRUHF\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RUHF\");\n        if( A.Width() != H.Width() )\n            LogicError(\"A and H must have the same width\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int mA = A.Height();\n    const Int nA = A.Width();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanConj(g);\n    DistMatrix<F,STAR,VR  > HPan_STAR_VR(g);\n    DistMatrix<F,STAR,MR  > HPan_STAR_MR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > ZAdj_STAR_MC(g);\n    DistMatrix<F,STAR,VC  > ZAdj_STAR_VC(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, ki, kj, ki+nb, nA );\n        auto ARight = ViewRange( A, 0, kj, mA, nA );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        Conjugate( HPan, HPanConj );\n        MakeTriangular( UPPER, HPanConj );\n        SetDiagonal( HPanConj, F(1) );\n\n        HPan_STAR_VR = HPanConj;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( UPPER, NORMAL,\n          F(1), HPan_STAR_VR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );\n        SInv_STAR_STAR.SumOver( HPan_STAR_VR.RowComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_STAR_MR.AlignWith( ARight );\n        HPan_STAR_MR = HPan_STAR_VR;\n        ZAdj_STAR_MC.AlignWith( ARight );\n        LocalGemm( NORMAL, ADJOINT, F(1), HPan_STAR_MR, ARight, ZAdj_STAR_MC );\n        ZAdj_STAR_VC.AlignWith( ARight );\n        ZAdj_STAR_VC.PartialRowSumScatterFrom( ZAdj_STAR_MC );\n\n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), SInv_STAR_STAR, ZAdj_STAR_VC );\n\n        ZAdj_STAR_MC = ZAdj_STAR_VC;\n        LocalGemm\n        ( ADJOINT, NORMAL, F(-1), ZAdj_STAR_MC, HPan_STAR_MR, F(1), ARight );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_RUHF_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/RUVB.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_RUVB_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_RUVB_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored right-to-left\n// implies that we will be forming a generalization of\n//\n//   (I - tau_1 u_1 u_1^H) (I - tau_0 u_0 u_0^H) = \n//   I - tau_0 u_0 u_0^H - tau_1 u_1 u_1^H + (tau_0 tau_1 u_1^H u_0) u_1 u_0^H =\n//   I - [ u_0, u_1 ] [  tau_0,                 0     ] [ u_0^H ]\n//                    [ -tau_0 tau_1 u_1^H u_0, tau_1 ] [ u_1^H ],\n//\n// which has a lower-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   tril(T) = tril( U^H U ),  diag(T) = 1/t or 1/conj(t),\n//\n// where U is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F> \ninline void\nRUVB\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RUVB\");\n        if( A.Width() != H.Height() )\n            LogicError(\"A's width must match H's height\");\n    )\n    const Int mA = A.Height();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanCopy, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, 0, kj, ki+nb, kj+nb );\n        auto ALeft = ViewRange( A, 0, 0, mA, ki+nb );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTrapezoidal( UPPER, HPanCopy, HPanCopy.Width()-HPanCopy.Height() );\n        SetDiagonal( HPanCopy, F(1), 0, RIGHT );\n\n        Herk( LOWER, ADJOINT, F(1), HPanCopy, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, NORMAL, F(1), ALeft, HPanCopy, Z );\n        Trsm( RIGHT, LOWER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, ADJOINT, F(-1), Z, HPanCopy, F(1), ALeft );\n    }\n}\n\ntemplate<typename F> \ninline void\nRUVB\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RUVB\");\n        if( A.Width() != H.Height() )\n            LogicError(\"A's width must match H's height\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int mA = A.Height();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanCopy(g);\n    DistMatrix<F,VC,  STAR> HPan_VC_STAR(g);\n    DistMatrix<F,MR,  STAR> HPan_MR_STAR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > ZAdj_STAR_MC(g);\n    DistMatrix<F,STAR,VC  > ZAdj_STAR_VC(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( diagLength, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, 0, kj, ki+nb, kj+nb );\n        auto ALeft = ViewRange( A, 0, 0, mA, ki+nb );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTrapezoidal( UPPER, HPanCopy, HPanCopy.Width()-HPanCopy.Height() );\n        SetDiagonal( HPanCopy, F(1), 0, RIGHT );\n\n        HPan_VC_STAR = HPanCopy;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( LOWER, ADJOINT, \n          F(1), HPan_VC_STAR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() );     \n        SInv_STAR_STAR.SumOver( HPan_VC_STAR.ColComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_MR_STAR.AlignWith( ALeft );\n        HPan_MR_STAR = HPan_VC_STAR;\n        ZAdj_STAR_MC.AlignWith( ALeft );\n        LocalGemm( ADJOINT, ADJOINT, F(1), HPan_MR_STAR, ALeft, ZAdj_STAR_MC );\n        ZAdj_STAR_VC.AlignWith( ALeft );\n        ZAdj_STAR_VC.PartialRowSumScatterFrom( ZAdj_STAR_MC );\n        \n        LocalTrsm\n        ( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), SInv_STAR_STAR, ZAdj_STAR_VC );\n\n        ZAdj_STAR_MC = ZAdj_STAR_VC;\n        LocalGemm\n        ( ADJOINT, ADJOINT, F(-1), ZAdj_STAR_MC, HPan_MR_STAR, F(1), ALeft );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_RUVB_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/RUVF.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_RUVF_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_RUVF_HPP\n\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace apply_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored left-to-right\n// implies that we will be forming a generalization of\n//\n//   (I - tau_0 u_0 u_0^H) (I - tau_1 u_1 u_1^H) = \n//   I - tau_0 u_0 u_0^H - tau_1 u_1 u_1^H + (tau_0 tau_1 u_0^H u_1) u_0 u_1^H =\n//   I - [ u_0, u_1 ] [ tau_0, -tau_0 tau_1 u_0^H u_1 ] [ u_0^H ]\n//                    [ 0,      tau_1                 ] [ u_1^H ],\n//\n// which has an upper-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   triu(T) = triu( U^H U ),  diag(T) = 1/t or 1/conj(t),\n//\n// where U is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F>\ninline void\nRUVF\n( Conjugation conjugation, Int offset, \n  const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RUVF\");\n        if( A.Width() != H.Height() )\n            LogicError(\"A's width must match H's height\");\n    )\n    const Int mA = A.Height();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    Matrix<F> HPanCopy, SInv, Z;\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, 0, kj, ki+nb, kj+nb );\n        auto ALeft = ViewRange( A, 0, 0, mA, ki+nb );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTrapezoidal( UPPER, HPanCopy, HPanCopy.Width()-HPanCopy.Height() );\n        SetDiagonal( HPanCopy, F(1), 0, RIGHT );\n \n        Herk( UPPER, ADJOINT, F(1), HPanCopy, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        Gemm( NORMAL, NORMAL, F(1), ALeft, HPanCopy, Z );\n        Trsm( RIGHT, UPPER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        Gemm( NORMAL, ADJOINT, F(-1), Z, HPanCopy, F(1), ALeft );\n    }\n}\n\ntemplate<typename F>\ninline void\nRUVF\n( Conjugation conjugation, Int offset, \n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"apply_packed_reflectors::RUVF\");\n        if( A.Width() != H.Height() )\n            LogicError(\"A's width must match H's height\");\n        if( H.Grid() != t.Grid() || t.Grid() != A.Grid() )\n            LogicError(\"{H,t,A} must be distributed over the same grid\");\n    )\n    const Int mA = A.Height();\n    const Int diagLength = H.DiagonalLength(offset);\n    DEBUG_ONLY(\n        if( t.Height() != diagLength )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    const Grid& g = H.Grid();\n    DistMatrix<F> HPanCopy(g);\n    DistMatrix<F,VC,  STAR> HPan_VC_STAR(g);\n    DistMatrix<F,MR,  STAR> HPan_MR_STAR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n    DistMatrix<F,STAR,MC  > ZAdj_STAR_MC(g);\n    DistMatrix<F,STAR,VC  > ZAdj_STAR_VC(g);\n\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<diagLength; k+=bsize )\n    {\n        const Int nb = Min(bsize,diagLength-k);\n        const Int ki = k+iOff;\n        const Int kj = k+jOff;\n\n        auto HPan = LockedViewRange( H, 0, kj, ki+nb, kj+nb );\n        auto ALeft = ViewRange( A, 0, 0, mA, ki+nb );\n        auto t1 = LockedView( t, k, 0, nb, 1 );\n\n        HPanCopy = HPan;\n        MakeTrapezoidal( UPPER, HPanCopy, HPanCopy.Width()-HPanCopy.Height() );\n        SetDiagonal( HPanCopy, F(1), 0, RIGHT );\n \n        HPan_VC_STAR = HPanCopy;\n        Zeros( SInv_STAR_STAR, nb, nb );\n        Herk\n        ( UPPER, ADJOINT, \n          F(1), HPan_VC_STAR.LockedMatrix(),\n          F(0), SInv_STAR_STAR.Matrix() ); \n        SInv_STAR_STAR.SumOver( HPan_VC_STAR.ColComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_MR_STAR.AlignWith( ALeft );\n        HPan_MR_STAR = HPan_VC_STAR;\n        ZAdj_STAR_MC.AlignWith( ALeft );\n        LocalGemm( ADJOINT, ADJOINT, F(1), HPan_MR_STAR, ALeft, ZAdj_STAR_MC );\n        ZAdj_STAR_VC.AlignWith( ALeft );\n        ZAdj_STAR_VC.PartialRowSumScatterFrom( ZAdj_STAR_MC );\n        \n        LocalTrsm\n        ( LEFT, UPPER, ADJOINT, NON_UNIT, \n          F(1), SInv_STAR_STAR, ZAdj_STAR_VC );\n\n        ZAdj_STAR_MC = ZAdj_STAR_VC;\n        LocalGemm\n        ( ADJOINT, ADJOINT, F(-1), ZAdj_STAR_MC, HPan_MR_STAR, F(1), ALeft );\n    }\n}\n\n} // namespace apply_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_RUVF_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors/Util.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_UTIL_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_UTIL_HPP\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nFixDiagonal\n( Conjugation conjugation, const Matrix<F>& t, Matrix<F>& SInv )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"FixDiagonal\"))\n    for( Int j=0; j<SInv.Height(); ++j )\n    {\n        const F value = t.Get(j,0);\n        if( conjugation == CONJUGATED )\n            SInv.Set(j,j,F(1)/Conj(value));\n        else\n            SInv.Set(j,j,F(1)/value);\n    }\n}\n\ntemplate<typename F> \ninline void\nFixDiagonal\n( Conjugation conjugation,\n  const DistMatrix<F,STAR,STAR>& t,\n        DistMatrix<F,STAR,STAR>& SInv )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"FixDiagonal\"))\n    for( Int j=0; j<SInv.Height(); ++j )\n    {\n        const F value = t.GetLocal(j,0);\n        if( conjugation == CONJUGATED )\n            SInv.SetLocal( j, j, F(1)/Conj(value) );\n        else\n            SInv.SetLocal( j, j, F(1)/value );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_UTIL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ApplyPackedReflectors.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_APPLYPACKEDREFLECTORS_HPP\n#define ELEM_APPLYPACKEDREFLECTORS_HPP\n\n#include \"./ApplyPackedReflectors/Util.hpp\"\n#include \"./ApplyPackedReflectors/LLHB.hpp\"\n#include \"./ApplyPackedReflectors/LLHF.hpp\"\n#include \"./ApplyPackedReflectors/LLVB.hpp\"\n#include \"./ApplyPackedReflectors/LLVF.hpp\"\n#include \"./ApplyPackedReflectors/LUHB.hpp\"\n#include \"./ApplyPackedReflectors/LUHF.hpp\"\n#include \"./ApplyPackedReflectors/LUVB.hpp\"\n#include \"./ApplyPackedReflectors/LUVF.hpp\"\n#include \"./ApplyPackedReflectors/RLHB.hpp\"\n#include \"./ApplyPackedReflectors/RLHF.hpp\"\n#include \"./ApplyPackedReflectors/RLVB.hpp\"\n#include \"./ApplyPackedReflectors/RLVF.hpp\"\n#include \"./ApplyPackedReflectors/RUHB.hpp\"\n#include \"./ApplyPackedReflectors/RUHF.hpp\"\n#include \"./ApplyPackedReflectors/RUVB.hpp\"\n#include \"./ApplyPackedReflectors/RUVF.hpp\"\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nApplyPackedReflectors\n( LeftOrRight side, UpperOrLower uplo, \n  VerticalOrHorizontal dir, ForwardOrBackward order, \n  Conjugation conjugation,\n  Int offset, const Matrix<F>& H, const Matrix<F>& t, Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ApplyPackedReflectors\"))\n    if( side == LEFT )\n    {\n        if( uplo == LOWER )\n        {\n            if( dir == VERTICAL && order == FORWARD )\n                apply_packed_reflectors::LLVF( conjugation, offset, H, t, A );\n            else if( dir == VERTICAL )\n                apply_packed_reflectors::LLVB( conjugation, offset, H, t, A );\n            else if( order == FORWARD )\n                apply_packed_reflectors::LLHF( conjugation, offset, H, t, A );\n            else\n                apply_packed_reflectors::LLHB( conjugation, offset, H, t, A );\n        }\n        else\n        {\n            if( dir == VERTICAL && order == FORWARD )\n                apply_packed_reflectors::LUVF( conjugation, offset, H, t, A );\n            else if( dir == VERTICAL )\n                apply_packed_reflectors::LUVB( conjugation, offset, H, t, A );\n            else if( order == FORWARD )\n                apply_packed_reflectors::LUHF( conjugation, offset, H, t, A );\n            else\n                apply_packed_reflectors::LUHB( conjugation, offset, H, t, A );\n        }\n    }\n    else\n    {\n        if( uplo == LOWER )\n        {\n            if( dir == VERTICAL && order == FORWARD )\n                apply_packed_reflectors::RLVF( conjugation, offset, H, t, A );\n            else if( dir == VERTICAL )\n                apply_packed_reflectors::RLVB( conjugation, offset, H, t, A );\n            else if( order == FORWARD )\n                apply_packed_reflectors::RLHF( conjugation, offset, H, t, A );\n            else\n                apply_packed_reflectors::RLHB( conjugation, offset, H, t, A );\n        }\n        else\n        {\n            if( dir == VERTICAL && order == FORWARD )\n                apply_packed_reflectors::RUVF( conjugation, offset, H, t, A );\n            else if( dir == VERTICAL )\n                apply_packed_reflectors::RUVB( conjugation, offset, H, t, A );\n            else if( order == FORWARD )\n                apply_packed_reflectors::RUHF( conjugation, offset, H, t, A );\n            else\n                apply_packed_reflectors::RUHB( conjugation, offset, H, t, A );\n        }\n    }\n}\n\ntemplate<typename F> \ninline void\nApplyPackedReflectors\n( LeftOrRight side, UpperOrLower uplo, \n  VerticalOrHorizontal dir, ForwardOrBackward order, \n  Conjugation conjugation,\n  Int offset,\n  const DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ApplyPackedReflectors\"))\n    if( side == LEFT )\n    {\n        if( uplo == LOWER )\n        {\n            if( dir == VERTICAL && order == FORWARD )\n                apply_packed_reflectors::LLVF( conjugation, offset, H, t, A );\n            else if( dir == VERTICAL )\n                apply_packed_reflectors::LLVB( conjugation, offset, H, t, A );\n            else if( order == FORWARD )\n                apply_packed_reflectors::LLHF( conjugation, offset, H, t, A );\n            else\n                apply_packed_reflectors::LLHB( conjugation, offset, H, t, A );\n        }\n        else\n        {\n            if( dir == VERTICAL && order == FORWARD )\n                apply_packed_reflectors::LUVF( conjugation, offset, H, t, A );\n            else if( dir == VERTICAL )\n                apply_packed_reflectors::LUVB( conjugation, offset, H, t, A );\n            else if( order == FORWARD )\n                apply_packed_reflectors::LUHF( conjugation, offset, H, t, A );\n            else\n                apply_packed_reflectors::LUHB( conjugation, offset, H, t, A );\n        }\n    }\n    else\n    {\n        if( uplo == LOWER )\n        {\n            if( dir == VERTICAL && order == FORWARD )\n                apply_packed_reflectors::RLVF( conjugation, offset, H, t, A );\n            else if( dir == VERTICAL )\n                apply_packed_reflectors::RLVB( conjugation, offset, H, t, A );\n            else if( order == FORWARD )\n                apply_packed_reflectors::RLHF( conjugation, offset, H, t, A );\n            else\n                apply_packed_reflectors::RLHB( conjugation, offset, H, t, A );\n        }\n        else\n        {\n            if( dir == VERTICAL && order == FORWARD )\n                apply_packed_reflectors::RUVF( conjugation, offset, H, t, A );\n            else if( dir == VERTICAL )\n                apply_packed_reflectors::RUVB( conjugation, offset, H, t, A );\n            else if( order == FORWARD )\n                apply_packed_reflectors::RUHF( conjugation, offset, H, t, A );\n            else\n                apply_packed_reflectors::RUHB( conjugation, offset, H, t, A );\n        }\n    }\n}\n\ntemplate<typename F> \ninline void\nApplyPackedReflectors\n( LeftOrRight side, UpperOrLower uplo, \n  VerticalOrHorizontal dir, ForwardOrBackward order,\n  Conjugation conjugation,\n  Int offset,\n  const DistMatrix<F>& H, const DistMatrix<F,STAR,STAR>& t, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ApplyPackedReflectors\"))\n    DistMatrix<F,MD,STAR> tDiag(A.Grid());\n    tDiag.SetRoot( A.DiagonalRoot(offset) );\n    tDiag.AlignCols( A.DiagonalAlign(offset) );\n    tDiag = t;\n    ApplyPackedReflectors\n    ( side, uplo, dir, order, conjugation, offset, H, tDiag, A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_APPLYPACKEDREFLECTORS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ExpandPackedReflectors/LV.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_EXPANDPACKEDREFLECTORS_LV_HPP\n#define ELEM_EXPANDPACKEDREFLECTORS_LV_HPP\n\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_TRANSPOSE_INC\n#include ELEM_ADJOINT_INC\n\n#include ELEM_GEMM_INC\n#include ELEM_SYRK_INC\n#include ELEM_HERK_INC\n#include ELEM_TRSM_INC\n\n#include ELEM_IDENTITY_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\nnamespace expand_packed_reflectors {\n\n//\n// Since applying Householder transforms from vectors stored right-to-left\n// implies that we will be forming a generalization of\n//\n//   (I - tau_0 u_0 u_0^H) (I - tau_1 u_1 u_1^H) = \n//   I - tau_0 u_0 u_0^H - tau_1 u_1 u_1^H + (tau_0 tau_1 u_0^H u_1) u_0 u_1^H =\n//   I - [ u_0, u_1 ] [ tau_0, -tau_0 tau_1 u_0^H u_1 ] [ u_0^H ]\n//                    [ 0,      tau_1                 ] [ u_1^H ],\n//\n// which has an upper-triangular center matrix, say S, we will form S as \n// the inverse of a matrix T, which can easily be formed as\n// \n//   triu(T) = triu( U^H U ),  diag(T) = 1/t or 1/conj(t),\n//\n// where U is the matrix of Householder vectors and t is the vector of scalars.\n//\n\ntemplate<typename F>\ninline void\nLV( Conjugation conjugation, Int offset, Matrix<F>& H, const Matrix<F>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"expand_packed_reflectors::LV\");\n        if( offset > 0 || offset < -H.Height() )\n            LogicError(\"Transforms out of bounds\");\n        if( t.Height() != H.DiagonalLength( offset ) )\n            LogicError(\"t must be the same length as H's offset diag\");\n    )\n    // Start by zeroing everything above the offset and setting that diagonal\n    // to all ones. We can also ensure that H is not wider than it is tall.\n    const Int m = H.Height();\n    const Int n = Min(m,H.Width());\n    const Int diff = m-n;\n    H.Resize( m, n );\n    MakeTrapezoidal( LOWER, H, offset );\n    SetDiagonal( H, F(1), offset );\n\n    Matrix<F>\n        HTL, HTR,  H00, H01, H02,  HPan, HPanCopy, HPanT,\n        HBL, HBR,  H10, H11, H12,                  HPanB,\n                   H20, H21, H22;\n    Matrix<F> HEffected, \n              HEffectedNew, HEffectedOld, \n              HEffectedOldT,\n              HEffectedOldB;\n    Matrix<F>\n        tT,  t0,\n        tB,  t1,\n             t2;\n\n    Matrix<F> SInv, Z, ZNew, ZOld;\n\n    LockedPartitionUpDiagonal\n    ( H, HTL, HTR,\n         HBL, HBR, 0 );\n    LockedPartitionUp\n    ( t, tT,\n         tB, 0 );\n    Int oldEffectedHeight=diff;\n\n    while( HBR.Height() < m && HBR.Width() < n )\n    {\n        LockedRepartitionUpDiagonal\n        ( HTL, /**/ HTR,  H00, H01, /**/ H02,\n               /**/       H10, H11, /**/ H12,\n         /*************/ /******************/\n          HBL, /**/ HBR,  H20, H21, /**/ H22 );\n\n        const Int HPanHeight = H11.Height() + H21.Height();\n        const Int effectedHeight = Max( HPanHeight+offset, 0 );\n        const Int HPanWidth = Min( H11.Width(), effectedHeight );\n\n        const Int effectedWidth = effectedHeight - diff;\n        const Int oldEffectedWidth = oldEffectedHeight - diff;\n        const Int newEffectedWidth = effectedWidth - oldEffectedWidth;\n\n        LockedView( HPan, H, H00.Height(), H00.Width(), HPanHeight, HPanWidth );\n        LockedPartitionDown\n        ( HPan, HPanT,\n                HPanB, newEffectedWidth /* to match ZNew */ );\n\n        View\n        ( HEffected, H, m-effectedHeight, n-effectedWidth, \n          effectedHeight, effectedWidth ); \n        PartitionLeft\n        ( HEffected, HEffectedNew, HEffectedOld, oldEffectedWidth );\n        PartitionUp\n        ( HEffectedOld, HEffectedOldT,\n                        HEffectedOldB, oldEffectedHeight );\n\n        LockedRepartitionUp\n        ( tT,  t0,\n               t1,\n         /**/ /**/\n          tB,  t2, HPanWidth );\n\n        Z.Resize( HPanWidth, effectedWidth );\n        PartitionLeft( Z, ZNew, ZOld, oldEffectedWidth );\n        //--------------------------------------------------------------------//\n        Herk( UPPER, ADJOINT, F(1), HPan, SInv );\n        FixDiagonal( conjugation, t1, SInv );\n\n        // Interleave the updates of the already effected portion of the matrix\n        // with the newly effected portion to increase performance\n        Adjoint( HPanT, ZNew );\n        MakeZeros( ZOld );\n        Gemm( ADJOINT, NORMAL, F(1), HPanB, HEffectedOldB, F(0), ZOld );\n        Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), SInv, Z );\n        HPanCopy = HPan;\n        MakeIdentity( HEffectedNew );\n        Gemm( NORMAL, NORMAL, F(-1), HPanCopy, Z, F(1), HEffected );\n        //--------------------------------------------------------------------//\n\n        oldEffectedHeight = effectedHeight;\n\n        SlideLockedPartitionUpDiagonal\n        ( HTL, /**/ HTR,  H00, /**/ H01, H02,\n         /*************/ /******************/\n               /**/       H10, /**/ H11, H12,\n          HBL, /**/ HBR,  H20, /**/ H21, H22 );\n\n        SlideLockedPartitionUp\n        ( tT,  t0,\n         /**/ /**/\n               t1,\n          tB,  t2 );\n    }\n\n    // Take care of any untouched columns on the left side of H\n    const Int oldEffectedWidth = oldEffectedHeight - diff;\n    if( oldEffectedWidth < n )\n    {\n        View( HEffectedNew, H, 0, 0, m, n-oldEffectedWidth );\n        MakeZeros( HEffectedNew );\n        SetDiagonal( HEffectedNew, F(1) );\n    }\n}\n\ntemplate<typename F>\ninline void\nLV\n( Conjugation conjugation, Int offset, \n  DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"expand_packed_reflectors::LV\");\n        if( H.Grid() != t.Grid() )\n            LogicError(\"H and t must be distributed over same grid\");\n        if( offset > 0 || offset < -H.Height() )\n            LogicError(\"Transforms out of bounds\");\n        if( t.Height() != H.DiagonalLength( offset ) )\n            LogicError(\"t must be the same length as H's offset diag\");\n        if( !H.DiagonalAlignedWith( t, offset ) )\n            LogicError(\"t must be aligned with H's 'offset' diagonal\");\n    )\n    // Start by zeroing everything above the offset and setting that diagonal\n    // to all ones. We can also ensure that H is not wider than it is tall.\n    const Int m = H.Height();\n    const Int n = Min(m,H.Width());\n    const Int diff = m-n;\n    H.Resize( m, n );\n    MakeTrapezoidal( LOWER, H, offset );\n    SetDiagonal( H, F(1), offset );\n\n    const Grid& g = H.Grid();\n    DistMatrix<F>\n        HTL(g), HTR(g),  H00(g), H01(g), H02(g),  HPan(g),\n        HBL(g), HBR(g),  H10(g), H11(g), H12(g),  \n                         H20(g), H21(g), H22(g);\n    DistMatrix<F> HEffected(g),\n                  HEffectedNew(g), HEffectedOld(g),\n                  HEffectedOldT(g),\n                  HEffectedOldB(g);\n    DistMatrix<F,MD,STAR>\n        tT(g),  t0(g),\n        tB(g),  t1(g),\n                t2(g);\n\n    DistMatrix<F,VC,STAR> HPan_VC_STAR(g);\n    DistMatrix<F,MC,STAR> HPan_MC_STAR(g), HPanT_MC_STAR(g),\n                                           HPanB_MC_STAR(g);\n\n    DistMatrix<F,STAR,MR> Z_STAR_MR(g),\n                          ZNew_STAR_MR(g), ZOld_STAR_MR(g);\n    DistMatrix<F,STAR,VR> Z_STAR_VR(g),\n                          ZNew_STAR_VR(g), ZOld_STAR_VR(g);\n    DistMatrix<F,STAR,STAR> t1_STAR_STAR(g);\n    DistMatrix<F,STAR,STAR> SInv_STAR_STAR(g);\n\n    LockedPartitionUpDiagonal\n    ( H, HTL, HTR,\n         HBL, HBR, 0 );\n    LockedPartitionUp\n    ( t, tT,\n         tB, 0 );\n    Int oldEffectedHeight=diff;\n    while( HBR.Height() < m && HBR.Width() < n )\n    {\n        LockedRepartitionUpDiagonal\n        ( HTL, /**/ HTR,  H00, H01, /**/ H02,\n               /**/       H10, H11, /**/ H12,\n         /*************/ /******************/\n          HBL, /**/ HBR,  H20, H21, /**/ H22 );\n\n        const Int HPanHeight = H11.Height() + H21.Height();\n        const Int effectedHeight = Max( HPanHeight+offset, 0 );\n        const Int HPanWidth = Min( H11.Width(), effectedHeight );\n\n        const Int effectedWidth = effectedHeight - diff;\n        const Int oldEffectedWidth = oldEffectedHeight - diff;\n        const Int newEffectedWidth = effectedWidth - oldEffectedWidth;\n\n        LockedView( HPan, H, H00.Height(), H00.Width(), HPanHeight, HPanWidth );\n\n        View\n        ( HEffected, H, m-effectedHeight, n-effectedWidth, \n          effectedHeight, effectedWidth ); \n        PartitionLeft\n        ( HEffected, HEffectedNew, HEffectedOld, oldEffectedWidth );\n        PartitionUp\n        ( HEffectedOld, HEffectedOldT,\n                        HEffectedOldB, oldEffectedHeight );\n\n        LockedRepartitionUp\n        ( tT,  t0,\n               t1,\n         /**/ /**/\n          tB,  t2, HPanWidth );\n\n        HPan_MC_STAR.AlignWith( HEffected );\n        Z_STAR_VR.AlignWith( HEffected );\n        Z_STAR_MR.AlignWith( HEffected );\n        Z_STAR_MR.Resize( HPanWidth, effectedWidth );\n        Z_STAR_VR.Resize( HPanWidth, effectedWidth );\n        PartitionLeft\n        ( Z_STAR_MR, ZNew_STAR_MR, ZOld_STAR_MR, oldEffectedWidth );\n        PartitionLeft\n        ( Z_STAR_VR, ZNew_STAR_VR, ZOld_STAR_VR, oldEffectedWidth );\n        //--------------------------------------------------------------------//\n        HPan_VC_STAR = HPan;\n        Zeros( SInv_STAR_STAR, HPanWidth, HPanWidth );\n        Herk\n        ( UPPER, ADJOINT, \n          F(1), HPan_VC_STAR.LockedMatrix(), \n          F(0), SInv_STAR_STAR.Matrix() );\n        SInv_STAR_STAR.SumOver( HPan_VC_STAR.ColComm() );\n        t1_STAR_STAR = t1;\n        FixDiagonal( conjugation, t1_STAR_STAR, SInv_STAR_STAR );\n\n        HPan_MC_STAR = HPan;\n        LockedPartitionDown\n        ( HPan_MC_STAR, HPanT_MC_STAR,\n                        HPanB_MC_STAR, newEffectedWidth /* to match ZNew */ );\n\n        // Interleave the updates of the already effected portion of the matrix\n        // with the newly effected portion to lower latency and increase \n        // performance\n        Adjoint( HPanT_MC_STAR, ZNew_STAR_VR );\n        MakeZeros( ZOld_STAR_MR );\n        LocalGemm\n        ( ADJOINT, NORMAL, \n          F(1), HPanB_MC_STAR, HEffectedOldB, F(0), ZOld_STAR_MR );\n        ZOld_STAR_VR.PartialRowSumScatterFrom( ZOld_STAR_MR );\n        LocalTrsm\n        ( LEFT, UPPER, NORMAL, NON_UNIT, F(1), SInv_STAR_STAR, Z_STAR_VR );\n        Z_STAR_MR = Z_STAR_VR;\n        MakeIdentity( HEffectedNew );\n        LocalGemm\n        ( NORMAL, NORMAL, F(-1), HPan_MC_STAR, Z_STAR_MR, F(1), HEffected );\n        //--------------------------------------------------------------------//\n\n        oldEffectedHeight = effectedHeight;\n\n        SlideLockedPartitionUp\n        ( tT,  t0,\n         /**/ /**/\n               t1,\n          tB,  t2 );\n\n        SlideLockedPartitionUpDiagonal\n        ( HTL, /**/ HTR,  H00, /**/ H01, H02,\n         /*************/ /******************/\n               /**/       H10, /**/ H11, H12,\n          HBL, /**/ HBR,  H20, /**/ H21, H22 );\n    }\n\n    // Take care of any untouched columns on the left side of H\n    const Int oldEffectedWidth = oldEffectedHeight - diff;\n    if( oldEffectedWidth < n )\n    {\n        View( HEffectedNew, H, 0, 0, m, n-oldEffectedWidth );\n        MakeZeros( HEffectedNew );\n        SetDiagonal( HEffectedNew, F(1) );\n    }\n}\n\n} // namespace expand_packed_reflectors\n} // namespace elem\n\n#endif // ifndef ELEM_EXPANDPACKEDREFLECTORS_LV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/ExpandPackedReflectors.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_EXPANDPACKEDREFLECTORS_HPP\n#define ELEM_EXPANDPACKEDREFLECTORS_HPP\n\n#include \"./ApplyPackedReflectors/Util.hpp\"\n#include \"./ExpandPackedReflectors/LV.hpp\"\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nExpandPackedReflectors\n( UpperOrLower uplo, VerticalOrHorizontal dir, Conjugation conjugation,\n  Int offset, Matrix<F>& H, const Matrix<F>& t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ExpandPackedReflectors\"))\n    if( uplo == LOWER && dir == VERTICAL )\n        expand_packed_reflectors::LV( conjugation, offset, H, t );\n    else\n        LogicError(\"This option is not yet supported\");\n}\n\ntemplate<typename F> \ninline void\nExpandPackedReflectors\n( UpperOrLower uplo, VerticalOrHorizontal dir, Conjugation conjugation,\n  Int offset, DistMatrix<F>& H, const DistMatrix<F,MD,STAR>& t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ExpandPackedReflectors\"))\n    if( uplo == LOWER && dir == VERTICAL )\n        expand_packed_reflectors::LV( conjugation, offset, H, t );\n    else\n        LogicError(\"This option is not yet supported\");\n}\n\ntemplate<typename F> \ninline void\nExpandPackedReflectors\n( UpperOrLower uplo, VerticalOrHorizontal dir, Conjugation conjugation,\n  Int offset, DistMatrix<F>& H, const DistMatrix<F,STAR,STAR>& t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ExpandPackedReflectors\"))\n    DistMatrix<F,MD,STAR> tDiag(H.Grid());\n    tDiag.SetRoot( H.DiagonalRoot(offset) );\n    tDiag.AlignCols( H.DiagonalAlign(offset) );\n    tDiag = t;\n    ExpandPackedReflectors( uplo, dir, conjugation, offset, H, tDiag );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_EXPANDPACKEDREFLECTORS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/HyperbolicReflector/Col.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HYPERBOLICREFLECTOR_COL_HPP\n#define ELEM_HYPERBOLICREFLECTOR_COL_HPP\n\n#include ELEM_NRM2_INC\n#include ELEM_SCALE_INC\n#include ELEM_ZERO_INC\n\nnamespace elem {\nnamespace hyp_reflector {\n\n// Please see the comments in the sequential implementation for details.\n\ntemplate<typename F,Dist U,Dist V> \ninline F\nCol( DistMatrix<F,U,V>& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hyp_reflector::Col\");\n        if( chi.Grid() != x.Grid() )\n            LogicError(\"chi and x must be distributed over the same grid\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Width() != 1 )\n            LogicError(\"x must be a column vector\");\n        if( chi.RowRank() != chi.RowAlign() || x.RowRank() != x.RowAlign() )\n            LogicError(\"Reflecting from incorrect process\");\n    )\n    typedef Base<F> Real;\n    mpi::Comm colComm = x.ColComm();\n    const Int colRank = x.ColRank();\n    const Int colStride = x.ColStride();\n    const Int colAlign = chi.ColAlign();\n\n    std::vector<Real> localNorms(colStride);\n    Real localNorm = Nrm2( x.LockedMatrix() ); \n    mpi::AllGather( &localNorm, 1, localNorms.data(), 1, colComm );\n    Real norm = blas::Nrm2( colStride, localNorms.data(), 1 );\n\n    Real alpha;\n    if( colRank == colAlign )\n    {\n        if( ImagPart(chi.GetLocal(0,0)) != Real(0) )\n            LogicError(\"chi is assumed to be real\");\n        alpha = chi.GetLocalRealPart(0,0);\n    }\n    mpi::Broadcast( alpha, colAlign, colComm );\n    const Real delta = alpha*alpha - norm*norm;\n    if( delta < Real(0) )\n        LogicError(\"Attempted to square-root a negative number\");\n    const Real lambda = ( alpha>=0 ? Sqrt(delta) : -Sqrt(delta) );\n    if( colRank == colAlign ) \n        chi.SetLocal(0,0,-lambda);\n\n    const Real kappa = alpha + lambda;\n    if( kappa == Real(0) ) \n    {\n        Zero( x );\n        return Real(1);\n    }\n    else\n    {\n        Scale( Real(1)/kappa, x );\n        return (delta+alpha*lambda)/(kappa*kappa);\n    }\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline F\nCol( F& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hyp_reflector::Col\");\n        if( x.Width() != 1 )\n            LogicError(\"x must be a column vector\");\n        if( x.RowRank() != x.RowAlign() )\n            LogicError(\"Reflecting from incorrect process\");\n        if( ImagPart(chi) !=Base<F>(0) )\n            LogicError(\"chi is assumed to be real\");\n    )\n    typedef Base<F> Real;\n    mpi::Comm colComm = x.ColComm();\n    const Int colStride = x.ColStride();\n\n    std::vector<Real> localNorms(colStride);\n    Real localNorm = Nrm2( x.LockedMatrix() ); \n    mpi::AllGather( &localNorm, 1, localNorms.data(), 1, colComm );\n    Real norm = blas::Nrm2( colStride, localNorms.data(), 1 );\n\n    const Real alpha = RealPart(chi);\n    const Real delta = alpha*alpha - norm*norm;\n    if( delta < Real(0) )\n        LogicError(\"Attempted to square-root a negative number\");\n    const Real lambda = ( alpha>=0 ? Sqrt(delta) : -Sqrt(delta) );\n    chi = -lambda;\n\n    const Real kappa = alpha + lambda;\n    if( kappa == Real(0) ) \n    {\n        Zero( x );\n        return Real(1);\n    }\n    else\n    {\n        Scale( Real(1)/kappa, x );\n        return (delta+alpha*lambda)/(kappa*kappa);\n    }\n}\n\n} // namespace hyp_reflector\n} // namespace elem\n\n#endif // ifndef ELEM_HYPERBOLICREFLECTOR_COL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/HyperbolicReflector/Row.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HYPERBOLICREFLECTOR_ROW_HPP\n#define ELEM_HYPERBOLICREFLECTOR_ROW_HPP\n\n#include ELEM_NRM2_INC\n#include ELEM_SCALE_INC\n#include ELEM_ZERO_INC\n\nnamespace elem {\nnamespace hyp_reflector {\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nRow( DistMatrix<F,U,V>& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hyp_reflector::Row\");\n        if( chi.Grid() != x.Grid() )\n            LogicError(\"chi and x must be distributed over the same grid\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Height() != 1 )\n            LogicError(\"x must be a row vector\");\n        if( chi.ColRank() != chi.ColAlign() || x.ColRank() != x.ColAlign() )\n            LogicError(\"Reflecting from incorrect process\");\n    )\n    typedef Base<F> Real;\n    mpi::Comm rowComm = x.RowComm();\n    const Int rowRank = x.RowRank();\n    const Int rowStride = x.RowStride();\n    const Int rowAlign = chi.RowAlign();\n\n    std::vector<Real> localNorms(rowStride);\n    Real localNorm = Nrm2( x.LockedMatrix() );\n    mpi::AllGather( &localNorm, 1, localNorms.data(), 1, rowComm );\n    Real norm = blas::Nrm2( rowStride, localNorms.data(), 1 );\n\n    Real alpha;\n    if( rowRank == rowAlign )\n    {\n        if( ImagPart(chi.GetLocal(0,0)) != Real(0) )\n            LogicError(\"chi is assumed to be real\");\n        alpha = chi.GetLocalRealPart(0,0);\n    }\n    mpi::Broadcast( alpha, rowAlign, rowComm );\n    const Real delta = alpha*alpha - norm*norm;\n    if( delta < Real(0) )\n        LogicError(\"Attempted to square-root a negative number\");\n    const Real lambda = ( alpha>=0 ? Sqrt(delta) : -Sqrt(delta) );\n    if( rowRank == rowAlign )\n        chi.SetLocal(0,0,-lambda);\n\n    const Real kappa = alpha + lambda;\n    if( kappa == Real(0) )\n    {\n        Zero( x );\n        return Real(1);\n    }\n    else\n    {\n        Scale( Real(1)/kappa, x );\n        Conjugate( x );\n        return (delta+alpha*lambda)/(kappa*kappa);\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nRow( F& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"hyp_reflector::Row\");\n        if( x.Height() != 1 )\n            LogicError(\"x must be a row vector\");\n        if( x.ColRank() != x.ColAlign() )\n            LogicError(\"Reflecting from incorrect process\");\n        if( ImagPart(chi) != Base<F>(0) )\n            LogicError(\"chi is assumed to be real\");\n    )\n    typedef Base<F> Real;\n    mpi::Comm rowComm = x.RowComm();\n    const Int rowStride = x.RowStride();\n\n    std::vector<Real> localNorms(rowStride);\n    Real localNorm = Nrm2( x.LockedMatrix() );\n    mpi::AllGather( &localNorm, 1, localNorms.data(), 1, rowComm );\n    Real norm = blas::Nrm2( rowStride, localNorms.data(), 1 );\n\n    const Real alpha = RealPart(chi);\n    const Real delta = alpha*alpha - norm*norm;\n    if( delta < Real(0) )\n        LogicError(\"Attempted to square-root a negative number\");\n    const Real lambda = ( alpha>=0 ? Sqrt(delta) : -Sqrt(delta) );\n    chi = -lambda;\n\n    const Real kappa = alpha + lambda;\n    if( kappa == Real(0) )\n    {\n        Zero( x );\n        return Real(1);\n    }\n    else\n    {\n        Scale( Real(1)/kappa, x );\n        Conjugate( x );\n        return (delta+alpha*lambda)/(kappa*kappa);\n    }\n}\n\n} // namespace hyp_reflector\n} // namespace elem\n\n#endif // ifndef ELEM_HYPERBOLICREFLECTOR_ROW_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/HyperbolicReflector.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HYPERBOLICREFLECTOR_HPP\n#define ELEM_HYPERBOLICREFLECTOR_HPP\n\n#include ELEM_CONJUGATE_INC\n#include ELEM_NRM2_INC\n#include ELEM_SCALE_INC\n#include ELEM_ZERO_INC\n\n#include \"./HyperbolicReflector/Col.hpp\"\n#include \"./HyperbolicReflector/Row.hpp\"\n\nnamespace elem {\n\n//\n// (I - 1/tau w w^H Sigma) x = -lambda e_0\n// \n// where Sigma is diag(+1,-1,...,-1)\n\ntemplate<typename F>\ninline F\nLeftHyperbolicReflector( Matrix<F>& chi, Matrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LeftHyperbolicReflector\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Height() != 1 && x.Width() != 1 )\n            LogicError(\"x must be a vector\");\n        if( ImagPart(chi.Get(0,0)) != Base<F>(0) )\n            LogicError(\"chi is assumed to be real\");\n    )\n\n    // Compute lambda = sgn(chi) sqrt([chi;x]^H Sigma [chi;x])\n    //                = sgn(chi) sqrt(chi^2 - x^H x)    \n    typedef Base<F> Real;\n    const Real alpha = chi.GetRealPart(0,0);\n    const Real xNrm = Nrm2( x ); \n    const Real delta = alpha*alpha - xNrm*xNrm;\n    if( delta < Real(0) )\n        LogicError(\"Attempted to square-root a negative number\");\n    const Real lambda = ( alpha>=0 ? Sqrt(delta) : -Sqrt(delta) );\n    chi.Set(0,0,-lambda);\n\n    // Implicitly define \n    //     w := [chi;x] + lambda e_0, and \n    //     kappa = chi + lambda,\n    // so that\n    //     tau := (w^H Sigma w) / 2 = (delta + lambda^2 + 2 chi lambda) / 2\n    //          = delta + chi lambda\n    // then normalize w so that its first entry is one\n    // TODO: Introduce a threshold instead of the approach from \n    //       van de Geijn and van Zee's \"High-performance up-and-downdating\n    //       via Householder-like transformations\"\n    const Real kappa = alpha + lambda;\n    if( kappa == Real(0) )\n    {\n        Zero( x );        \n        return Real(1);\n    }\n    else\n    {\n        Scale( Real(1)/kappa, x );\n        return (delta+alpha*lambda)/(kappa*kappa);\n    }\n}\n\ntemplate<typename F>\ninline F\nLeftHyperbolicReflector( F& chi, Matrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LeftHyperbolicReflector\");\n        if( x.Height() != 1 && x.Width() != 1 )\n            LogicError(\"x must be a vector\");\n        if( ImagPart(chi) != Base<F>(0) )\n            LogicError(\"chi is assumed to be real\");\n    )\n\n    // Compute lambda = sgn(chi) sqrt([chi;x]^H Sigma [chi;x])\n    //                = sgn(chi) sqrt(chi^2 - x^H x)    \n    typedef Base<F> Real;\n    const Real alpha = RealPart(chi);\n    const Real xNrm = Nrm2( x ); \n    const Real delta = alpha*alpha - xNrm*xNrm;\n    if( delta < Real(0) )\n        LogicError(\"Attempted to square-root a negative number\");\n    const Real lambda = ( alpha>=0 ? Sqrt(delta) : -Sqrt(delta) );\n    chi = -lambda;\n\n    // Implicitly define \n    //     w := [chi;x] + lambda e_0, and \n    //     kappa = chi + lambda,\n    // so that\n    //     tau := (w^H Sigma w) / 2 = (delta + lambda^2 + 2 chi lambda) / 2\n    //          = delta + chi lambda\n    // then normalize w so that its first entry is one\n    // TODO: Introduce a threshold instead of the approach from \n    //       van de Geijn and van Zee's \"High-performance up-and-downdating\n    //       via Householder-like transformations\"\n    const Real kappa = alpha + lambda;\n    if( kappa == Real(0) )\n    {\n        Zero( x );        \n        return Real(1);\n    }\n    else\n    {\n        Scale( Real(1)/kappa, x );\n        return (delta+alpha*lambda)/(kappa*kappa);\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nLeftHyperbolicReflector( DistMatrix<F,U,V>& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LeftHyperbolicReflector\");\n        if( chi.Grid() != x.Grid() )\n            LogicError(\"chi and x must be distributed over the same grid\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Width() != 1 )\n            LogicError(\"x must be a column vector\");\n    )\n    F tau;\n    if( x.RowRank() == x.RowAlign() )\n        tau = hyp_reflector::Col( chi, x );\n    mpi::Broadcast( tau, x.RowAlign(), x.RowComm() );\n    return tau;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nLeftHyperbolicReflector( F& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LeftHyperbolicReflector\");\n        if( x.Width() != 1 )\n            LogicError(\"x must be a column vector\");\n    )\n    F tau;\n    if( x.RowRank() == x.RowAlign() )\n        tau = hyp_reflector::Col( chi, x );\n    mpi::Broadcast( tau, x.RowAlign(), x.RowComm() );\n    return tau;\n}\n\n//\n// x (I - 1/tau Sigma w^H w) = -lambda e_0^T\n// \n// where Sigma is diag(+1,-1,...,-1)\n\ntemplate<typename F>\ninline F\nRightHyperbolicReflector( Matrix<F>& chi, Matrix<F>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RightHyperbolicReflector\"))\n    const F tau = LeftHyperbolicReflector( chi, x );\n    Conjugate( x );\n    return tau;\n}\n\ntemplate<typename F>\ninline F\nRightHyperbolicReflector( F& chi, Matrix<F>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"RightHyperbolicReflector\"))\n    const F tau = LeftHyperbolicReflector( chi, x );\n    Conjugate( x );\n    return tau;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nRightHyperbolicReflector( DistMatrix<F,U,V>& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"RightHyperbolicReflector\");\n        if( chi.Grid() != x.Grid() )\n            LogicError(\"chi and x must be distributed over the same grid\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Height() != 1 )\n            LogicError(\"x must be a row vector\");\n    )\n    F tau;\n    if( x.ColRank() == x.ColAlign() )\n        tau = hyp_reflector::Row( chi, x );\n    mpi::Broadcast( tau, x.ColAlign(), x.ColComm() );\n    return tau;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nRightHyperbolicReflector( F& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"RightHyperbolicReflector\");\n        if( x.Height() != 1 )\n            LogicError(\"x must be a row vector\");\n    )\n    F tau;\n    if( x.ColRank() == x.ColAlign() )\n        tau = hyp_reflector::Row( chi, x );\n    mpi::Broadcast( tau, x.ColAlign(), x.ColComm() );\n    return tau;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HYPERBOLICREFLECTOR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/Median.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MEDIAN_HPP\n#define ELEM_MEDIAN_HPP\n\nnamespace elem {\n\ntemplate<typename Real>\ninline ValueInt<Real>\nMedian( const Matrix<Real>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Median\"))\n    if( IsComplex<Real>::val )\n        LogicError(\"Complex numbers do not have a natural ordering\");\n    const Int m = x.Height();\n    const Int n = x.Width();\n    if( m != 1 && n != 1 )\n        LogicError(\"Median is meant for a single vector\");\n\n    const Int k = ( n==1 ? m : n );\n    const Int stride = ( n==1 ? 1 : x.LDim() );\n    const Real* xBuffer = x.LockedBuffer();\n\n    std::vector<ValueInt<Real>> pairs( k );\n    for( Int i=0; i<k; ++i )\n    {\n        pairs[i].value = xBuffer[i*stride];\n        pairs[i].index = i;\n    }\n    std::sort( pairs.begin(), pairs.end(), ValueInt<Real>::Lesser );\n\n    return pairs[k/2];\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline ValueInt<Real>\nMedian( const DistMatrix<Real,U,V>& x )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Median\"))\n    if( U==STAR && V==STAR )\n    {\n        return Median( x.LockedMatrix() );\n    }\n    else\n    {\n        DistMatrix<Real,STAR,STAR> x_STAR_STAR( x );\n        return Median( x_STAR_STAR.LockedMatrix() );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MEDIAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/PermutationParity.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PERMUTATIONPARITY_HPP\n#define ELEM_PERMUTATIONPARITY_HPP\n\n#include ELEM_INVERTPERMUTATION_INC\n\nnamespace elem {\n\n// Walking through the process of LU factorization with partial pivoting\n// for a permutation matrix, which never requires a Schur-complement update,\n// yields an algorithm for expressing the inverse of a permutation in terms of \n// a sequence of transpositions in linear time. Note that performing the swaps \n// requires access to the inverse permutation, which can be formed in linear \n// time.\n\ninline bool\nPermutationParity( const Matrix<Int>& origPerm )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PermutationParity\");\n        if( origPerm.Width() != 1 )\n            LogicError(\"permutation must be a column vector\");\n    )\n\n    Matrix<Int> perm( origPerm );\n\n    Matrix<Int> invPerm;\n    InvertPermutation( perm, invPerm );\n\n    bool isOdd = false;\n    const Int n = perm.Height();\n    for( Int k=0; k<n; ++k )\n    {\n        const Int permVal = perm.Get(k,0);\n        if( permVal != k )\n        {\n            isOdd = !isOdd;\n            const Int invPermVal = invPerm.Get(k,0);\n            // We only need to perform half of the swaps\n            //      perm[k] <-> perm[invPerm[k]]\n            //   invPerm[k] <-> invPerm[perk[k]] \n            // since we will not need to access perm[k] and invPerm[k] again.\n            perm.Set( invPermVal, 0, permVal );\n            invPerm.Set( permVal, 0, invPermVal );\n        }\n    }\n    return isOdd;\n}\n\ntemplate<Dist UPerm>\ninline bool\nPermutationParity( const DistMatrix<Int,UPerm,STAR>& origPerm ) \n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PermutationParity\");\n        if( origPerm.Width() != 1 )\n            LogicError(\"permutation must be a column vector\");\n    )\n\n    DistMatrix<Int,UPerm,STAR> perm( origPerm );\n\n    DistMatrix<Int,UPerm,STAR> invPerm( origPerm.Grid() );\n    InvertPermutation( perm, invPerm );\n\n    bool isOdd = false;\n    const Int n = perm.Height();\n    for( Int k=0; k<n; ++k )\n    {\n        const Int permVal = perm.Get(k,0);\n        if( permVal != k )\n        {\n            isOdd = !isOdd;\n            const Int invPermVal = invPerm.Get(k,0);\n            // We only need to perform half of the swaps\n            //      perm[k] <-> perm[invPerm[k]]\n            //   invPerm[k] <-> invPerm[perk[k]] \n            // since we will not need to access perm[k] and invPerm[k] again.\n            perm.Set( invPermVal, 0, permVal );\n            invPerm.Set( permVal, 0, invPermVal );\n        }\n    }\n    return isOdd;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_PERMUTATIONPARITY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/PivotParity.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PIVOTPARITY_HPP\n#define ELEM_PIVOTPARITY_HPP\n\nnamespace elem {\n\n// A permutation is even if and only if it is the product of an even number \n// of transpositions, so we can decide this by simply checking how many \n// nontrivial pivots were performed.\n\ninline bool\nPivotParity( const Matrix<Int>& p, Int pivotOffset=0 )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PivotParity\");\n        if( p.Width() != 1 )\n            LogicError(\"p must be a column vector\");\n        if( pivotOffset < 0 )\n            LogicError(\"pivot offset cannot be negative\");\n    )\n    const Int n = p.Height();\n    bool isOdd = false;\n    for( Int i=0; i<n; ++i )\n        if( p.Get(i,0) != i+pivotOffset )\n            isOdd = !isOdd;\n    return isOdd;\n}\n\ninline bool\nPivotParity( const DistMatrix<Int,VC,STAR>& p, Int pivotOffset=0 ) \n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"PivotParity\");\n        if( p.Width() != 1 )\n            LogicError(\"p must be a column vector\");\n        if( pivotOffset < 0 )\n            LogicError(\"pivot offset cannot be negative\");\n    )\n    bool isLocallyOdd = false;\n    const Int mLocal = p.LocalHeight();\n    for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n    {\n        const Int i = p.GlobalRow(iLoc);\n        if( p.GetLocal(iLoc,0) != i+pivotOffset )\n            isLocallyOdd = !isLocallyOdd;\n    }\n\n    Int localContribution = isLocallyOdd;\n    Int globalContribution;\n    mpi::AllReduce\n    ( &localContribution, &globalContribution, 1, MPI_SUM, p.ColComm() );\n    return globalContribution % 2;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_PIVOTPARITY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/Reflector/Col.hpp",
    "content": "/*\n   Copyright (c) 1992-2008 The University of Tennessee.\n   All rights reserved.\n\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is loosely based upon the LAPACK routines dlarfg.f and zlarfg.f.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_REFLECTOR_COL_HPP\n#define ELEM_REFLECTOR_COL_HPP\n\n#include ELEM_NRM2_INC\n#include ELEM_SCALE_INC\n\nnamespace elem {\nnamespace reflector {\n\ntemplate<typename F,Dist U,Dist V> \ninline F\nCol( DistMatrix<F,U,V>& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"reflector::Col\");\n        if( chi.Grid() != x.Grid() )\n            LogicError(\"chi and x must be distributed over the same grid\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Width() != 1 )\n            LogicError(\"x must be a column vector\");\n        if( chi.RowRank() != chi.RowAlign() || x.RowRank() != x.RowAlign() )\n            LogicError(\"Reflecting from incorrect process\");\n    )\n    typedef Base<F> Real;\n    mpi::Comm colComm = x.ColComm();\n    const Int colRank = x.ColRank();\n    const Int colStride = x.ColStride();\n    const Int colAlign = chi.ColAlign();\n\n    std::vector<Real> localNorms(colStride);\n    Real localNorm = Nrm2( x.LockedMatrix() ); \n    mpi::AllGather( &localNorm, 1, localNorms.data(), 1, colComm );\n    Real norm = blas::Nrm2( colStride, localNorms.data(), 1 );\n\n    F alpha;\n    if( colRank == colAlign )\n        alpha = chi.GetLocal(0,0);\n    mpi::Broadcast( alpha, colAlign, colComm );\n\n    if( norm == Real(0) && ImagPart(alpha) == Real(0) )\n    {\n        if( colRank == colAlign )\n            chi.SetLocal(0,0,-chi.GetLocal(0,0));\n        return F(2);\n    }\n\n    Real beta;\n    if( RealPart(alpha) <= 0 )\n        beta = lapack::SafeNorm( alpha, norm );\n    else\n        beta = -lapack::SafeNorm( alpha, norm );\n\n    // Rescale if the vector is too small\n    const Real safeMin = lapack::MachineSafeMin<Real>();\n    const Real epsilon = lapack::MachineEpsilon<Real>();\n    const Real safeInv = safeMin/epsilon;\n    Int count = 0;\n    if( Abs(beta) < safeInv )\n    {\n        Real invOfSafeInv = Real(1)/safeInv;\n        do\n        {\n            ++count;\n            Scale( invOfSafeInv, x );\n            alpha *= invOfSafeInv;\n            beta *= invOfSafeInv;\n        } while( Abs(beta) < safeInv );\n\n        localNorm = Nrm2( x.LockedMatrix() );\n        mpi::AllGather( &localNorm, 1, localNorms.data(), 1, colComm );\n        norm = blas::Nrm2( colStride, localNorms.data(), 1 );\n        if( RealPart(alpha) <= 0 )\n            beta = lapack::SafeNorm( alpha, norm );\n        else\n            beta = -lapack::SafeNorm( alpha, norm );\n    }\n\n    F tau = (beta-Conj(alpha)) / beta;\n    Scale( Real(1)/(alpha-beta), x );\n\n    // Undo the scaling\n    for( Int j=0; j<count; ++j )\n        beta *= safeInv;\n\n    if( colRank == colAlign )\n        chi.SetLocal(0,0,beta);\n        \n    return tau;\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline F\nCol( F& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"reflector::Col\");\n        if( x.Width() != 1 )\n            LogicError(\"x must be a column vector\");\n        if( x.RowRank() != x.RowAlign() )\n            LogicError(\"Reflecting from incorrect process\");\n    )\n    typedef Base<F> Real;\n    mpi::Comm colComm = x.ColComm();\n    const Int colStride = x.ColStride();\n\n    std::vector<Real> localNorms(colStride);\n    Real localNorm = Nrm2( x.LockedMatrix() ); \n    mpi::AllGather( &localNorm, 1, localNorms.data(), 1, colComm );\n    Real norm = blas::Nrm2( colStride, localNorms.data(), 1 );\n\n    F alpha = chi;\n    if( norm == Real(0) && ImagPart(alpha) == Real(0) )\n    {\n        chi = -chi;\n        return F(2);\n    }\n\n    Real beta;\n    if( RealPart(alpha) <= 0 )\n        beta = lapack::SafeNorm( alpha, norm );\n    else\n        beta = -lapack::SafeNorm( alpha, norm );\n\n    // Rescale if the vector is too small\n    const Real safeMin = lapack::MachineSafeMin<Real>();\n    const Real epsilon = lapack::MachineEpsilon<Real>();\n    const Real safeInv = safeMin/epsilon;\n    Int count = 0;\n    if( Abs(beta) < safeInv )\n    {\n        Real invOfSafeInv = Real(1)/safeInv;\n        do\n        {\n            ++count;\n            Scale( invOfSafeInv, x );\n            alpha *= invOfSafeInv;\n            beta *= invOfSafeInv;\n        } while( Abs(beta) < safeInv );\n\n        localNorm = Nrm2( x.LockedMatrix() );\n        mpi::AllGather( &localNorm, 1, localNorms.data(), 1, colComm );\n        norm = blas::Nrm2( colStride, localNorms.data(), 1 );\n        if( RealPart(alpha) <= 0 )\n            beta = lapack::SafeNorm( alpha, norm );\n        else\n            beta = -lapack::SafeNorm( alpha, norm );\n    }\n\n    F tau = (beta-Conj(alpha)) / beta;\n    Scale( Real(1)/(alpha-beta), x );\n\n    // Undo the scaling\n    for( Int j=0; j<count; ++j )\n        beta *= safeInv;\n\n    chi = beta;\n    return tau;\n}\n\n} // namespace reflector\n} // namespace elem\n\n#endif // ifndef ELEM_REFLECTOR_COL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/Reflector/Row.hpp",
    "content": "/*\n   Copyright (c) 1992-2008 The University of Tennessee. \n   All rights reserved.\n\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is loosely based upon the LAPACK routines dlarfg.f and zlarfg.f.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_REFLECTOR_ROW_HPP\n#define ELEM_REFLECTOR_ROW_HPP\n\n#include ELEM_NRM2_INC\n#include ELEM_SCALE_INC\n\nnamespace elem {\nnamespace reflector {\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nRow( DistMatrix<F,U,V>& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"reflector::Row\");    \n        if( chi.Grid() != x.Grid() )\n            LogicError(\"chi and x must be distributed over the same grid\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Height() != 1 )\n            LogicError(\"x must be a row vector\");\n        if( chi.ColRank() != chi.ColAlign() || x.ColRank() != x.ColAlign() )\n            LogicError(\"Reflecting from incorrect process\");\n    )\n    typedef Base<F> Real;\n    mpi::Comm rowComm = x.RowComm();\n    const Int rowRank = x.RowRank();\n    const Int rowStride = x.RowStride();\n    const Int rowAlign = chi.RowAlign();\n\n    std::vector<Real> localNorms(rowStride);\n    Real localNorm = Nrm2( x.LockedMatrix() ); \n    mpi::AllGather( &localNorm, 1, localNorms.data(), 1, rowComm );\n    Real norm = blas::Nrm2( rowStride, localNorms.data(), 1 );\n\n    F alpha;\n    if( rowRank == rowAlign )\n        alpha = chi.GetLocal(0,0);\n    mpi::Broadcast( alpha, rowAlign, rowComm );\n\n    if( norm == Real(0) && ImagPart(alpha) == Real(0) )\n    {\n        if( rowRank == rowAlign )\n            chi.SetLocal(0,0,-chi.GetLocal(0,0));\n        return F(2);\n    }\n\n    Real beta;\n    if( RealPart(alpha) <= 0 )\n        beta = lapack::SafeNorm( alpha, norm );\n    else\n        beta = -lapack::SafeNorm( alpha, norm );\n\n    // Rescale if the vector is too small\n    const Real safeMin = lapack::MachineSafeMin<Real>();\n    const Real epsilon = lapack::MachineEpsilon<Real>();\n    const Real safeInv = safeMin/epsilon;\n    Int count = 0;\n    if( Abs(beta) < safeInv )\n    {\n        Real invOfSafeInv = Real(1)/safeInv;\n        do\n        {\n            ++count;\n            Scale( invOfSafeInv, x );\n            alpha *= invOfSafeInv;\n            beta *= invOfSafeInv;\n        } while( Abs(beta) < safeInv );\n\n        localNorm = Nrm2( x.LockedMatrix() );\n        mpi::AllGather( &localNorm, 1, localNorms.data(), 1, rowComm );\n        norm = blas::Nrm2( rowStride, localNorms.data(), 1 );\n        if( RealPart(alpha) <= 0 )\n            beta = lapack::SafeNorm( alpha, norm );\n        else\n            beta = -lapack::SafeNorm( alpha, norm );\n    }\n\n    F tau = (beta-Conj(alpha)) / beta;\n    Scale( Real(1)/(alpha-beta), x );\n\n    // Undo the scaling\n    for( Int j=0; j<count; ++j )\n        beta *= safeInv;\n\n    if( rowRank == rowAlign )\n        chi.SetLocal(0,0,beta);\n\n    // This is to make this a reflector meant to be applied from the right;\n    // there is no need to conjugate chi, as it is real\n    Conjugate( x );\n        \n    return tau;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nRow( F& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"reflector::Row\");    \n        if( x.Height() != 1 )\n            LogicError(\"x must be a row vector\");\n        if( x.ColRank() != x.ColAlign() )\n            LogicError(\"Reflecting from incorrect process\");\n    )\n    typedef Base<F> Real;\n    mpi::Comm rowComm = x.RowComm();\n    const Int rowStride = x.RowStride();\n\n    std::vector<Real> localNorms(rowStride);\n    Real localNorm = Nrm2( x.LockedMatrix() ); \n    mpi::AllGather( &localNorm, 1, localNorms.data(), 1, rowComm );\n    Real norm = blas::Nrm2( rowStride, localNorms.data(), 1 );\n\n    F alpha = chi;\n    if( norm == Real(0) && ImagPart(alpha) == Real(0) )\n    {\n        chi = -chi;\n        return F(2);\n    }\n\n    Real beta;\n    if( RealPart(alpha) <= 0 )\n        beta = lapack::SafeNorm( alpha, norm );\n    else\n        beta = -lapack::SafeNorm( alpha, norm );\n\n    // Rescale if the vector is too small\n    const Real safeMin = lapack::MachineSafeMin<Real>();\n    const Real epsilon = lapack::MachineEpsilon<Real>();\n    const Real safeInv = safeMin/epsilon;\n    Int count = 0;\n    if( Abs(beta) < safeInv )\n    {\n        Real invOfSafeInv = Real(1)/safeInv;\n        do\n        {\n            ++count;\n            Scale( invOfSafeInv, x );\n            alpha *= invOfSafeInv;\n            beta *= invOfSafeInv;\n        } while( Abs(beta) < safeInv );\n\n        localNorm = Nrm2( x.LockedMatrix() );\n        mpi::AllGather( &localNorm, 1, localNorms.data(), 1, rowComm );\n        norm = blas::Nrm2( rowStride, localNorms.data(), 1 );\n        if( RealPart(alpha) <= 0 )\n            beta = lapack::SafeNorm( alpha, norm );\n        else\n            beta = -lapack::SafeNorm( alpha, norm );\n    }\n\n    F tau = (beta-Conj(alpha)) / beta;\n    Scale( Real(1)/(alpha-beta), x );\n\n    // Undo the scaling\n    for( Int j=0; j<count; ++j )\n        beta *= safeInv;\n\n    chi = beta;\n\n    // This is to make this a reflector meant to be applied from the right;\n    // there is no need to conjugate chi, as it is real\n    Conjugate( x );\n        \n    return tau;\n}\n\n} // namespace reflector\n} // namespace elem\n\n#endif // ifndef ELEM_REFLECTOR_ROW_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/Reflector.hpp",
    "content": "/*\n   Copyright (C) 1992-2008 The University of Tennessee\n   All rights reserved.\n\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is loosely based upon the LAPACK routines dlarfg.f and zlarfg.f.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_REFLECTOR_HPP\n#define ELEM_REFLECTOR_HPP\n\n#include ELEM_NRM2_INC\n#include ELEM_SCALE_INC\n\n#include \"./Reflector/Col.hpp\"\n#include \"./Reflector/Row.hpp\"\n\nnamespace elem {\n\n//\n// The LAPACK convention defines tau such that\n//\n//   H = I - tau [1; v] [1, v'],\n//\n// but adjoint(H) [chi; x] = [beta; 0]. \n//\n// Elemental simply uses H [chi; x] = [beta; 0].\n//\n// On exit, chi is overwritten with beta, and x is overwritten with v.\n//\n// Another major difference from LAPACK is in the treatment of the special case \n// of x=0, where LAPACK would put H := I, which is not a valid Householder \n// reflector. We instead use the valid Householder reflector:\n//    H [chi; 0] = [-chi; 0],\n// which is accomplished by setting tau=2, and v=0.\n//\n\n// TODO: Switch to 1/tau to be simplify discussions of UT transforms\n\ntemplate<typename F>\ninline F\nLeftReflector( Matrix<F>& chi, Matrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LeftReflector\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Height() != 1 && x.Width() != 1 )\n            LogicError(\"x must be a vector\");\n    )\n    typedef Base<F> Real;\n\n    Real norm = Nrm2( x );\n    F alpha = chi.Get(0,0);\n\n    if( norm == Real(0) && ImagPart(alpha) == Real(0) )\n    {\n        chi.Set(0,0,-chi.Get(0,0));\n        return F(2);\n    }\n\n    Real beta;\n    if( RealPart(alpha) <= 0 )\n        beta = lapack::SafeNorm( alpha, norm );\n    else\n        beta = -lapack::SafeNorm( alpha, norm );\n\n    // Rescale if the vector is too small\n    const Real safeMin = lapack::MachineSafeMin<Real>();\n    const Real epsilon = lapack::MachineEpsilon<Real>();\n    const Real safeInv = safeMin/epsilon;\n    Int count = 0;\n    if( Abs(beta) < safeInv )\n    {\n        Real invOfSafeInv = Real(1)/safeInv;\n        do\n        {\n            ++count;\n            Scale( invOfSafeInv, x );\n            alpha *= invOfSafeInv;\n            beta *= invOfSafeInv;\n        } while( Abs(beta) < safeInv );\n\n        norm = Nrm2( x );\n        if( RealPart(alpha) <= 0 )\n            beta = lapack::SafeNorm( alpha, norm );\n        else\n            beta = -lapack::SafeNorm( alpha, norm );\n    }\n\n    F tau = (beta-Conj(alpha)) / beta;\n    Scale( Real(1)/(alpha-beta), x );\n\n    // Undo the scaling\n    for( Int j=0; j<count; ++j )\n        beta *= safeInv;\n\n    chi.Set(0,0,beta);\n    return tau;\n}\n\ntemplate<typename F>\ninline F\nLeftReflector( F& chi, Matrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LeftReflector\");\n        if( x.Height() != 1 && x.Width() != 1 )\n            LogicError(\"x must be a vector\");\n    )\n    typedef Base<F> Real;\n\n    Real norm = Nrm2( x );\n    F alpha = chi;\n\n    if( norm == Real(0) && ImagPart(alpha) == Real(0) )\n    {\n        chi = -chi;\n        return F(2);\n    }\n\n    Real beta;\n    if( RealPart(alpha) <= 0 )\n        beta = lapack::SafeNorm( alpha, norm );\n    else\n        beta = -lapack::SafeNorm( alpha, norm );\n\n    // Rescale if the vector is too small\n    const Real safeMin = lapack::MachineSafeMin<Real>();\n    const Real epsilon = lapack::MachineEpsilon<Real>();\n    const Real safeInv = safeMin/epsilon;\n    Int count = 0;\n    if( Abs(beta) < safeInv )\n    {\n        Real invOfSafeInv = Real(1)/safeInv;\n        do\n        {\n            ++count;\n            Scale( invOfSafeInv, x );\n            alpha *= invOfSafeInv;\n            beta *= invOfSafeInv;\n        } while( Abs(beta) < safeInv );\n\n        norm = Nrm2( x );\n        if( RealPart(alpha) <= 0 )\n            beta = lapack::SafeNorm( alpha, norm );\n        else\n            beta = -lapack::SafeNorm( alpha, norm );\n    }\n\n    F tau = (beta-Conj(alpha)) / beta;\n    Scale( Real(1)/(alpha-beta), x );\n\n    // Undo the scaling\n    for( Int j=0; j<count; ++j )\n        beta *= safeInv;\n\n    chi = beta;\n    return tau;\n}\n\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nLeftReflector( DistMatrix<F,U,V>& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LeftReflector\");\n        if( chi.Grid() != x.Grid() )\n            LogicError(\"chi and x must be distributed over the same grid\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Width() != 1 )\n            LogicError(\"x must be a column vector\");\n    )\n    F tau;\n    if( x.RowRank() == x.RowAlign() )\n        tau = reflector::Col( chi, x );\n    mpi::Broadcast( tau, x.RowAlign(), x.RowComm() );\n    return tau;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nLeftReflector( F& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LeftReflector\");\n        if( x.Width() != 1 )\n            LogicError(\"x must be a column vector\");\n    )\n    F tau;\n    if( x.RowRank() == x.RowAlign() )\n        tau = reflector::Col( chi, x );\n    mpi::Broadcast( tau, x.RowAlign(), x.RowComm() );\n    return tau;\n}\n\n//\n// Defines tau and v such that\n//\n//   H = I - tau [1; v] [1, v'],\n//\n// and [chi x] H = [beta 0]\n//\n\ntemplate<typename F>\ninline F\nRightReflector( Matrix<F>& chi, Matrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"RightReflector\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Height() != 1 && x.Width() != 1 )\n            LogicError(\"x must be a vector\");\n    )\n    const F tau = LeftReflector( chi, x );\n    // There is no need to conjugate chi, it should be real now\n    Conjugate( x );\n    return tau;\n}\n\ntemplate<typename F>\ninline F\nRightReflector( F& chi, Matrix<F>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"RightReflector\");\n        if( x.Height() != 1 && x.Width() != 1 )\n            LogicError(\"x must be a vector\");\n    )\n    const F tau = LeftReflector( chi, x );\n    // There is no need to conjugate chi, it should be real now\n    Conjugate( x );\n    return tau;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nRightReflector( DistMatrix<F,U,V>& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"RightReflector\");\n        if( chi.Grid() != x.Grid() )\n            LogicError(\"chi and x must be distributed over the same grid\");\n        if( chi.Height() != 1 || chi.Width() != 1 )\n            LogicError(\"chi must be a scalar\");\n        if( x.Height() != 1 )\n            LogicError(\"x must be a row vector\");\n    )\n    F tau;\n    if( x.ColRank() == x.ColAlign() )\n        tau = reflector::Row( chi, x );\n    mpi::Broadcast( tau, x.ColAlign(), x.ColComm() );\n    return tau;\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline F\nRightReflector( F& chi, DistMatrix<F,U,V>& x )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"RightReflector\");\n        if( x.Height() != 1 )\n            LogicError(\"x must be a row vector\");\n    )\n    F tau;\n    if( x.ColRank() == x.ColAlign() )\n        tau = reflector::Row( chi, x );\n    mpi::Broadcast( tau, x.ColAlign(), x.ColComm() );\n    return tau;\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_REFLECTOR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/Sort.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_SORT_HPP\n#define ELEM_SORT_HPP\n\nnamespace elem {\n\n// Sort each column of the real matrix X\n\ntemplate<typename Real>\ninline void\nSort( Matrix<Real>& X, SortType sort=ASCENDING )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Sort\"))\n    if( IsComplex<Real>::val )\n        LogicError(\"Complex numbers do not have a natural ordering\");\n    if( sort == UNSORTED )\n        return;\n    const Int m = X.Height();\n    const Int n = X.Width();\n    for( Int j=0; j<n; ++j )\n    {\n        Real* XCol = X.Buffer(0,j);\n        if( sort == ASCENDING )\n            std::sort( XCol, XCol+m );\n        else\n            std::sort( XCol, XCol+m, std::greater<Real>() );\n    }\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nSort( DistMatrix<Real,U,V>& X, SortType sort=ASCENDING )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Sort\"))\n    if( sort == UNSORTED )\n        return;\n\n    if( (U==STAR && V==STAR) || (U==CIRC && V==CIRC) )\n    {\n        if( X.Participating() )\n            Sort( X.Matrix(), sort );\n    }\n    else\n    {\n        // Get a copy on a single process, sort, and then redistribute\n        DistMatrix<Real,CIRC,CIRC> X_CIRC_CIRC( X );\n        if( X_CIRC_CIRC.Participating() )\n            Sort( X_CIRC_CIRC.Matrix(), sort );\n\n        // Refill the distributed X with the sorted values\n        X = X_CIRC_CIRC;\n    }\n}\n\n// Tagged sort\n\ntemplate<typename Real>\ninline std::vector<ValueInt<Real>>\nTaggedSort( const Matrix<Real>& x, SortType sort=ASCENDING )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TaggedSort\"))\n    if( IsComplex<Real>::val )\n        LogicError(\"Complex numbers do not have a natural ordering\");\n    const Int m = x.Height();\n    const Int n = x.Width();\n    if( m != 1 && n != 1 )\n        LogicError(\"TaggedSort is meant for a single vector\");\n\n    const Int k = ( n==1 ? m : n );\n    const Int stride = ( n==1 ? 1 : x.LDim() );\n    const Real* xBuffer = x.LockedBuffer();\n\n    std::vector<ValueInt<Real>> pairs( k );\n    for( Int i=0; i<k; ++i )\n    {\n        pairs[i].value = xBuffer[i*stride];\n        pairs[i].index = i;\n    }\n\n    if( sort == ASCENDING )\n        std::sort( pairs.begin(), pairs.end(), ValueInt<Real>::Lesser );\n    else if( sort == DESCENDING )\n        std::sort( pairs.begin(), pairs.end(), ValueInt<Real>::Greater );\n\n    return pairs;\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline std::vector<ValueInt<Real>>\nTaggedSort( const DistMatrix<Real,U,V>& x, SortType sort=ASCENDING )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TaggedSort\"))\n    if( U==STAR && V==STAR )\n    {\n        return TaggedSort( x.LockedMatrix(), sort );\n    }\n    else\n    {\n        DistMatrix<Real,STAR,STAR> x_STAR_STAR( x );\n        return TaggedSort( x_STAR_STAR.LockedMatrix(), sort );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_SORT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACKUTIL_DECL_HPP\n#define ELEM_LAPACKUTIL_DECL_HPP\n\n// Nothing needed yet\n\n#endif // ifndef ELEM_LAPACKUTIL_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACKUTIL_IMPL_HPP\n#define ELEM_LAPACKUTIL_IMPL_HPP\n\n#include \"./ApplyPackedReflectors.hpp\"\n#include \"./ExpandPackedReflectors.hpp\"\n#include \"./HyperbolicReflector.hpp\"\n#include \"./Reflector.hpp\"\n\n#include \"./Median.hpp\"\n#include \"./PivotParity.hpp\"\n#include \"./Sort.hpp\"\n\n#endif // ifndef ELEM_LAPACKUTIL_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like/util.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_UTIL_HPP\n#define ELEM_UTIL_HPP\n\n#include \"./util/decl.hpp\"\n#include \"./util/impl.hpp\"\n\n#endif // ifndef ELEM_UTIL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/lapack-like.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPACK_HPP\n#define ELEM_LAPACK_HPP\n\n#include \"./lapack-like/decl.hpp\"\n#include \"./lapack-like/impl.hpp\"\n\n#endif // ifndef ELEM_LAPACK_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/BullsHead.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_BULLSHEAD_HPP\n#define ELEM_BULLSHEAD_HPP\n\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// The \"bull's head matrix\" is defined to have the symbol:\n//   f(z) = 2i z^{-1} + z^2 + 7/10 z^3.\n// Please see \n//   L. Reichel and L. N. Trefethen, \"Eigenvalues and pseudo-eigenvalues of \n//   \"Toeplitz matrices\", Linear Algebra Appl., 1992.\n\ntemplate<typename Real> \ninline void\nBullsHead( Matrix<Complex<Real>>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BullsHead\"))\n    if( n < 4 )\n        LogicError(\"Must be at least 4x4 to have a third-order symbol\");\n    typedef Complex<Real> C;\n    Zeros( A, n, n );\n    SetDiagonal( A, C(0,2),            1 );\n    SetDiagonal( A, 1,                -2 );\n    SetDiagonal( A, Real(7)/Real(10), -3 );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nBullsHead( DistMatrix<Complex<Real>,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BullsHead\"))\n    if( n < 4 )\n        LogicError(\"Must be at least 4x4 to have a third-order symbol\");\n    typedef Complex<Real> C;\n    Zeros( A, n, n );\n    SetDiagonal( A, C(0,2),            1 );\n    SetDiagonal( A, 1,                -2 );\n    SetDiagonal( A, Real(7)/Real(10), -3 );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nBullsHead( BlockDistMatrix<Complex<Real>,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BullsHead\"))\n    if( n < 4 )\n        LogicError(\"Must be at least 4x4 to have a third-order symbol\");\n    typedef Complex<Real> C;\n    Zeros( A, n, n );\n    SetDiagonal( A, C(0,2),            1 );\n    SetDiagonal( A, 1,                -2 );\n    SetDiagonal( A, Real(7)/Real(10), -3 );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_BULLSHEAD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Cauchy.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CAUCHY_HPP\n#define ELEM_CAUCHY_HPP\n\nnamespace elem {\n\ntemplate<typename F1,typename F2> \ninline void\nCauchy( Matrix<F1>& A, const std::vector<F2>& x, const std::vector<F2>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Cauchy\"))\n    const Int m = x.size();\n    const Int n = y.size();\n    A.Resize( m, n );\n\n    const F1 one = F1(1);\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(\n                // TODO: Use tolerance instead?\n                if( x[i] == y[j] )\n                    LogicError\n                    ( \"x[\", i, \"] = y[\", j, \"] (\", x[i], \n                      \") is not allowed for Cauchy matrices\" );\n            ) \n            A.Set( i, j, one/(x[i]-y[j]) );\n        }\n    }\n}\n\ntemplate<typename F1,typename F2,Dist U,Dist V>\ninline void\nCauchy\n( DistMatrix<F1,U,V>& A, const std::vector<F2>& x, const std::vector<F2>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Cauchy\"))\n    const Int m = x.size();\n    const Int n = y.size();\n    A.Resize( m, n );\n\n    const F1 one = F1(1);\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            DEBUG_ONLY(\n                // TODO: Use tolerance instead?\n                if( x[i] == y[j] )\n                    LogicError\n                    ( \"x[\", i, \"] = y[\", j, \"] (\", x[i], \n                      \") is not allowed for Cauchy matrices\" );\n            )\n            A.SetLocal( iLoc, jLoc, one/(x[i]-y[j]) );\n        }\n    }\n}\n\ntemplate<typename F1,typename F2,Dist U,Dist V>\ninline void\nCauchy\n( BlockDistMatrix<F1,U,V>& A, const std::vector<F2>& x, const std::vector<F2>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Cauchy\"))\n    const Int m = x.size();\n    const Int n = y.size();\n    A.Resize( m, n );\n\n    const F1 one = F1(1);\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            DEBUG_ONLY(\n                // TODO: Use tolerance instead?\n                if( x[i] == y[j] )\n                    LogicError\n                    ( \"x[\", i, \"] = y[\", j, \"] (\", x[i], \n                      \") is not allowed for Cauchy matrices\" );\n            )\n            A.SetLocal( iLoc, jLoc, one/(x[i]-y[j]) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CAUCHY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/CauchyLike.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CAUCHYLIKE_HPP\n#define ELEM_CAUCHYLIKE_HPP\n\nnamespace elem {\n\ntemplate<typename F1,typename F2> \ninline void\nCauchyLike\n( Matrix<F1>& A,\n  const std::vector<F2>& r, const std::vector<F2>& s,\n  const std::vector<F2>& x, const std::vector<F2>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CauchyLike\"))\n    const Int m = r.size();\n    const Int n = s.size();\n    if( x.size() != (Unsigned)m )\n        LogicError(\"x vector was the wrong length\");\n    if( y.size() != (Unsigned)n )\n        LogicError(\"y vector was the wrong length\");\n    A.Resize( m, n );\n\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(\n                // TODO: Use tolerance instead?\n                if( x[i] == y[j] )\n                    LogicError\n                    ( \"x[\", i, \"] = y[\", j, \"] (\", x[i],\n                      \") is not allowed for Cauchy-like matrices\" );\n            )\n            A.Set( i, j, r[i]*s[j]/(x[i]-y[j]) );\n        }\n    }\n}\n\ntemplate<typename F1,typename F2,Dist U,Dist V>\ninline void\nCauchyLike\n( DistMatrix<F1,U,V>& A,\n  const std::vector<F2>& r, const std::vector<F2>& s, \n  const std::vector<F2>& x, const std::vector<F2>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CauchyLike\"))\n    const Int m = r.size();\n    const Int n = s.size();\n    if( x.size() != (Unsigned)m )\n        LogicError(\"x vector was the wrong length\");\n    if( y.size() != (Unsigned)n )\n        LogicError(\"y vector was the wrong length\");\n    A.Resize( m, n );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            DEBUG_ONLY(\n                // TODO: Use tolerance instead?\n                if( x[i] == y[j] )\n                    LogicError\n                    ( \"x[\", i, \"] = y[\", j, \"] (\", x[i],\n                      \") is not allowed for Cauchy-like matrices\" );\n            )\n            A.SetLocal( iLoc, jLoc, r[i]*s[j]/(x[i]-y[j]) );\n        }\n    }\n}\n\ntemplate<typename F1,typename F2,Dist U,Dist V>\ninline void\nCauchyLike\n( BlockDistMatrix<F1,U,V>& A,\n  const std::vector<F2>& r, const std::vector<F2>& s, \n  const std::vector<F2>& x, const std::vector<F2>& y )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CauchyLike\"))\n    const Int m = r.size();\n    const Int n = s.size();\n    if( x.size() != (Unsigned)m )\n        LogicError(\"x vector was the wrong length\");\n    if( y.size() != (Unsigned)n )\n        LogicError(\"y vector was the wrong length\");\n    A.Resize( m, n );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            DEBUG_ONLY(\n                // TODO: Use tolerance instead?\n                if( x[i] == y[j] )\n                    LogicError\n                    ( \"x[\", i, \"] = y[\", j, \"] (\", x[i],\n                      \") is not allowed for Cauchy-like matrices\" );\n            )\n            A.SetLocal( iLoc, jLoc, r[i]*s[j]/(x[i]-y[j]) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CAUCHYLIKE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Circulant.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_CIRCULANT_HPP\n#define ELEM_CIRCULANT_HPP\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nCirculant( Matrix<T>& A, const std::vector<T>& a )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Circulant\"))\n    const Int n = a.size();\n    A.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<n; ++i )\n            A.Set( i, j, a[Mod(i-j,n)] );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nCirculant( DistMatrix<T,U,V>& A, const std::vector<T>& a )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Circulant\"))\n    const Int n = a.size();\n    A.Resize( n, n );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            A.SetLocal( iLoc, jLoc, a[Mod(i-j,n)] );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nCirculant( BlockDistMatrix<T,U,V>& A, const std::vector<T>& a )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Circulant\"))\n    const Int n = a.size();\n    A.Resize( n, n );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            A.SetLocal( iLoc, jLoc, a[Mod(i-j,n)] );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_CIRCULANT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Demmel.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DEMMEL_HPP\n#define ELEM_DEMMEL_HPP\n\n#include \"./Toeplitz.hpp\"\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nDemmel( Matrix<F>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Demmel\"))\n    typedef Base<F> Real;\n    if( n == 0 )\n    {\n        A.Resize( 0, 0 );\n        return;\n    }\n    else if( n == 1 )\n    {\n        A.Resize( 1, 1 );\n        A.Set( 0, 0, -Real(1) );\n        return;\n    }\n\n    const Real B = Pow(10.,4./(n-1));\n\n    const Int numDiags = 2*n-1;\n    std::vector<F> a( numDiags, 0 );\n    for( Int j=0; j<n-1; ++j )\n        a[j] = -Pow(B,Real(n-1-j));\n    a[n-1] = -1;\n    for( Int j=n; j<numDiags; ++j )\n        a[j] = 0;\n    Toeplitz( A, n, n, a );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nDemmel( DistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Demmel\"))\n    typedef Base<F> Real;\n    if( n == 0 )\n    {\n        A.Resize( 0, 0 );\n        return;\n    }\n    else if( n == 1 )\n    {\n        A.Resize( 1, 1 );\n        A.Set( 0, 0, -Real(1) );\n        return;\n    }\n    \n    const Real B = Pow(10.,4./(n-1));\n\n    const Int numDiags = 2*n-1;\n    std::vector<F> a( numDiags, 0 );\n    for( Int j=0; j<n-1; ++j )\n        a[j] = -Pow(B,Real(n-1-j));\n    a[n-1] = -1;\n    for( Int j=n; j<numDiags; ++j )\n        a[j] = 0;\n    Toeplitz( A, n, n, a );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nDemmel( BlockDistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Demmel\"))\n    typedef Base<F> Real;\n    if( n == 0 )\n    {\n        A.Resize( 0, 0 );\n        return;\n    }\n    else if( n == 1 )\n    {\n        A.Resize( 1, 1 );\n        A.Set( 0, 0, -Real(1) );\n        return;\n    }\n    \n    const Real B = Pow(10.,4./(n-1));\n\n    const Int numDiags = 2*n-1;\n    std::vector<F> a( numDiags, 0 );\n    for( Int j=0; j<n-1; ++j )\n        a[j] = -Pow(B,Real(n-1-j));\n    a[n-1] = -1;\n    for( Int j=n; j<numDiags; ++j )\n        a[j] = 0;\n    Toeplitz( A, n, n, a );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_DEMMEL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Diagonal.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_DIAGONAL_HPP\n#define ELEM_DIAGONAL_HPP\n\n#include \"./Zeros.hpp\"\n\nnamespace elem {\n\ntemplate<typename S,typename T> \ninline void\nDiagonal( Matrix<S>& D, const std::vector<T>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Diagonal\"))\n    const Int n = d.size();\n    Zeros( D, n, n );\n\n    for( Int j=0; j<n; ++j )\n        D.Set( j, j, d[j] );\n}\n\ntemplate<typename S,typename T,Dist U,Dist V>\ninline void\nDiagonal( DistMatrix<S,U,V>& D, const std::vector<T>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Diagonal\"))\n    const Int n = d.size();\n    Zeros( D, n, n );\n\n    const Int localWidth = D.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = D.GlobalCol(jLoc);\n        D.Set( j, j, d[j] );\n    }\n}\n\ntemplate<typename S,typename T,Dist U,Dist V>\ninline void\nDiagonal( BlockDistMatrix<S,U,V>& D, const std::vector<T>& d )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Diagonal\"))\n    const Int n = d.size();\n    Zeros( D, n, n );\n\n    const Int localWidth = D.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = D.GlobalCol(jLoc);\n        D.Set( j, j, d[j] );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_DIAGONAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Egorov.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_EGOROV_HPP\n#define ELEM_EGOROV_HPP\n\nnamespace elem {\n\ntemplate<typename Real,class RealFunctor> \ninline void\nMakeEgorov( Matrix<Complex<Real>>& A, const RealFunctor& phase )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeEgorov\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            const Real theta = phase(i,j);\n            const Real realPart = Cos(theta);\n            const Real imagPart = Sin(theta);\n            A.Set( i, j, Complex<Real>(realPart,imagPart) );\n        }\n    }\n}\n\ntemplate<typename Real,Dist U,Dist V,class RealFunctor>\ninline void\nMakeEgorov( DistMatrix<Complex<Real>,U,V>& A, const RealFunctor& phase )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeEgorov\"))\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            const Real theta = phase(i,j);\n            const Real realPart = Cos(theta);\n            const Real imagPart = Sin(theta);\n            A.SetLocal( iLoc, jLoc, Complex<Real>(realPart,imagPart) );\n        }\n    }\n}\n\ntemplate<typename Real,Dist U,Dist V,class RealFunctor>\ninline void\nMakeEgorov( BlockDistMatrix<Complex<Real>,U,V>& A, const RealFunctor& phase )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeEgorov\"))\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            const Real theta = phase(i,j);\n            const Real realPart = Cos(theta);\n            const Real imagPart = Sin(theta);\n            A.SetLocal( iLoc, jLoc, Complex<Real>(realPart,imagPart) );\n        }\n    }\n}\n\ntemplate<typename Real,class RealFunctor>\ninline void\nEgorov( Matrix<Complex<Real>>& A, const RealFunctor& phase, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Egorov\"))\n    A.Resize( n, n );\n    MakeEgorov( A, phase );\n}\n\ntemplate<typename Real,Dist U,Dist V,class RealFunctor>\ninline void\nEgorov( DistMatrix<Complex<Real>,U,V>& A, const RealFunctor& phase, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Egorov\"))\n    A.Resize( n, n );\n    MakeEgorov( A, phase );\n}\n\ntemplate<typename Real,Dist U,Dist V,class RealFunctor>\ninline void\nEgorov( BlockDistMatrix<Complex<Real>,U,V>& A, const RealFunctor& phase, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Egorov\"))\n    A.Resize( n, n );\n    MakeEgorov( A, phase );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_EGOROV_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/ExtendedKahan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_EXTENDEDKAHAN_HPP\n#define ELEM_EXTENDEDKAHAN_HPP\n\n#include \"./Walsh.hpp\"\n\n// Generate a 3(2^k) x 3(2^k) Extended Kahan matrix, which has the form\n// A = S R, where S = diag(1,zeta,...,zeta^(3 2^k - 1)), \n// \n//         | I -phi H_k    0     |\n//     R = | 0    I      phi H_k |,\n//         | 0    0        I     |\n//\n// 0 < mu << 1, and phi^2 + zeta^2 = 1.\n//\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nMakeExtendedKahan( Matrix<F>& A, Base<F> phi, Base<F> mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeExtendedKahan\"))\n    typedef Base<F> R;\n\n    if( A.Height() != A.Width() )\n        LogicError(\"Extended Kahan matrices must be square\");\n    const Int n = A.Height();\n    if( n % 3 != 0 )\n        LogicError(\"Dimension must be an integer multiple of 3\");\n    const Int l = n / 3;\n    if( !l || (l & (l-1)) )\n        LogicError(\"n/3 is not a power of two\");\n    Int k=0;\n    while( Int(1u<<k) < l )\n        ++k;\n\n    if( phi <= R(0) || phi >= R(1) )\n        LogicError(\"phi must be in (0,1)\");\n    if( mu <= R(0) || mu >= R(1) )\n        LogicError(\"mu must be in (0,1)\");\n\n    // Start by setting A to the identity, and then modify the necessary \n    // l x l blocks of its 3 x 3 partitioning.\n    MakeIdentity( A );\n    auto ABlock = View( A, 2*l, 2*l, l, l );\n    Scale( mu, ABlock );\n    ABlock = View( A, 0, l, l, l );\n    MakeWalsh( ABlock, k );\n    Scale( -phi, ABlock );\n    ABlock = View( A, l, 2*l, l, l );\n    MakeWalsh( ABlock, k );\n    Scale( phi, ABlock );\n\n    // Now scale R by S\n    const R zeta = Sqrt(R(1)-phi*phi);\n    Matrix<R> d( n, 1 );\n    for( Int i=0; i<n; ++i )\n        d.Set( i, 0, Pow(zeta,R(i)) );\n    DiagonalScale( LEFT, NORMAL, d, A );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeExtendedKahan( DistMatrix<F,U,V>& A, Base<F> phi, Base<F> mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeExtendedKahan\"))\n    typedef Base<F> R;\n\n    if( A.Height() != A.Width() )\n        LogicError(\"Extended Kahan matrices must be square\");\n    const Int n = A.Height();\n    if( n % 3 != 0 )\n        LogicError(\"Dimension must be an integer multiple of 3\");\n    const Int l = n / 3;\n    if( !l || (l & (l-1)) )\n        LogicError(\"n/3 is not a power of two\");\n    Int k=0;\n    while( Int(1u<<k) < l )\n        ++k;\n\n    if( phi <= R(0) || phi >= R(1) )\n        LogicError(\"phi must be in (0,1)\");\n    if( mu <= R(0) || mu >= R(1) )\n        LogicError(\"mu must be in (0,1)\");\n\n    // Start by setting A to the identity, and then modify the necessary \n    // l x l blocks of its 3 x 3 partitioning.\n    MakeIdentity( A );\n    auto ABlock = View( A, 2*l, 2*l, l, l );\n    Scale( mu, ABlock );\n    ABlock = View( A, 0, l, l, l );\n    MakeWalsh( ABlock, k );\n    Scale( -phi, ABlock );\n    ABlock = View( A, l, 2*l, l, l );\n    MakeWalsh( ABlock, k );\n    Scale( phi, ABlock );\n\n    // Now scale R by S\n    const R zeta = Sqrt(R(1)-phi*phi);\n    DistMatrix<R,U,STAR> d( n, 1, A.Grid() );\n    for( Int iLoc=0; iLoc<d.LocalHeight(); ++iLoc )\n    {\n        const Int i = d.GlobalRow(iLoc);\n        d.SetLocal( iLoc, 0, Pow(zeta,R(i)) );\n    }\n    DiagonalScale( LEFT, NORMAL, d, A );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeExtendedKahan( BlockDistMatrix<F,U,V>& A, Base<F> phi, Base<F> mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeExtendedKahan\"))\n    typedef Base<F> R;\n\n    if( A.Height() != A.Width() )\n        LogicError(\"Extended Kahan matrices must be square\");\n    const Int n = A.Height();\n    if( n % 3 != 0 )\n        LogicError(\"Dimension must be an integer multiple of 3\");\n    const Int l = n / 3;\n    if( !l || (l & (l-1)) )\n        LogicError(\"n/3 is not a power of two\");\n    Int k=0;\n    while( Int(1u<<k) < l )\n        ++k;\n\n    if( phi <= R(0) || phi >= R(1) )\n        LogicError(\"phi must be in (0,1)\");\n    if( mu <= R(0) || mu >= R(1) )\n        LogicError(\"mu must be in (0,1)\");\n\n    // Start by setting A to the identity, and then modify the necessary \n    // l x l blocks of its 3 x 3 partitioning.\n    MakeIdentity( A );\n    auto ABlock = View( A, 2*l, 2*l, l, l );\n    Scale( mu, ABlock );\n    ABlock = View( A, 0, l, l, l );\n    MakeWalsh( ABlock, k );\n    Scale( -phi, ABlock );\n    ABlock = View( A, l, 2*l, l, l );\n    MakeWalsh( ABlock, k );\n    Scale( phi, ABlock );\n\n    // Now scale R by S\n    const R zeta = Sqrt(R(1)-phi*phi);\n    BlockDistMatrix<R,U,STAR> d( n, 1, A.Grid() );\n    for( Int iLoc=0; iLoc<d.LocalHeight(); ++iLoc )\n    {\n        const Int i = d.GlobalRow(iLoc);\n        d.SetLocal( iLoc, 0, Pow(zeta,R(i)) );\n    }\n    DiagonalScale( LEFT, NORMAL, d, A );\n}\n\ntemplate<typename F>\ninline void\nExtendedKahan( Matrix<F>& A, Int k, Base<F> phi, Base<F> mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ExtendedKahan\"))\n    const Int n = 3*(1u<<k);\n    A.Resize( n, n );\n    MakeExtendedKahan( A, phi, mu );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nExtendedKahan( DistMatrix<F,U,V>& A, Int k, Base<F> phi, Base<F> mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ExtendedKahan\"))\n    const Int n = 3*(1u<<k);\n    A.Resize( n, n );\n    MakeExtendedKahan( A, phi, mu );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nExtendedKahan( BlockDistMatrix<F,U,V>& A, Int k, Base<F> phi, Base<F> mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ExtendedKahan\"))\n    const Int n = 3*(1u<<k);\n    A.Resize( n, n );\n    MakeExtendedKahan( A, phi, mu );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_EXTENDEDKAHAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Fiedler.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_FIEDLER_HPP\n#define ELEM_FIEDLER_HPP\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nFiedler( Matrix<F>& A, const std::vector<F>& c )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Fiedler\"))\n    const Int n = c.size();\n    A.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<n; ++i )\n            A.Set( i, j, Abs(c[i]-c[j]) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nFiedler( DistMatrix<F,U,V>& A, const std::vector<F>& c )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Fiedler\"))\n    const Int n = c.size();\n    A.Resize( n, n );\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            A.SetLocal( iLoc, jLoc, Abs(c[i]-c[j]) );\n        }\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nFiedler( BlockDistMatrix<F,U,V>& A, const std::vector<F>& c )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Fiedler\"))\n    const Int n = c.size();\n    A.Resize( n, n );\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            A.SetLocal( iLoc, jLoc, Abs(c[i]-c[j]) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_FIEDLER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Forsythe.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_FORSYTHE_HPP\n#define ELEM_FORSYTHE_HPP\n\n#include \"./Jordan.hpp\"\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nMakeForsythe( Matrix<T>& J, T alpha, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeForsythe\"))\n    MakeJordan( J, lambda );\n    const Int m = J.Height();\n    const Int n = J.Width();\n    if( m > 0 && n > 0 )\n        J.Set( m-1, 0, alpha );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeForsythe( DistMatrix<T,U,V>& J, T alpha, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeForsythe\"))\n    MakeJordan( J, lambda );\n    const Int m = J.Height();\n    const Int n = J.Width();\n    if( m > 0 && n > 0 )\n        J.Set( m-1, 0, alpha );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeForsythe( BlockDistMatrix<T,U,V>& J, T alpha, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeForsythe\"))\n    MakeJordan( J, lambda );\n    const Int m = J.Height();\n    const Int n = J.Width();\n    if( m > 0 && n > 0 )\n        J.Set( m-1, 0, alpha );\n}\n\ntemplate<typename T>\ninline void\nForsythe( Matrix<T>& J, Int n, T alpha, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Forsythe\"))\n    J.Resize( n, n );\n    MakeForsythe( J, alpha, lambda );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nForsythe( DistMatrix<T,U,V>& J, Int n, T alpha, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Forsythe\"))\n    J.Resize( n, n );\n    MakeForsythe( J, alpha, lambda );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nForsythe( BlockDistMatrix<T,U,V>& J, Int n, T alpha, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Forsythe\"))\n    J.Resize( n, n );\n    MakeForsythe( J, alpha, lambda );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_FORSYTHE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Fourier.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_FOURIER_HPP\n#define ELEM_FOURIER_HPP\n\nnamespace elem {\n\ntemplate<typename Real> \ninline void\nMakeFourier( Matrix<Complex<Real>>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeFourier\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square DFT matrix\");\n\n    const Real pi = 4*Atan( Real(1) );\n    const Real nSqrt = Sqrt( Real(n) );\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<m; ++i )\n        {\n            const Real theta = -2*pi*i*j/n;\n            const Real realPart = Cos(theta)/nSqrt;\n            const Real imagPart = Sin(theta)/nSqrt;\n            A.Set( i, j, Complex<Real>(realPart,imagPart) );\n        }\n    }\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nMakeFourier( DistMatrix<Complex<Real>,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeFourier\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square DFT matrix\");\n\n    const Real pi = 4*Atan( Real(1) );\n    const Real nSqrt = Sqrt( Real(n) );\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            const Real theta = -2*pi*i*j/n;\n            const Real realPart = Cos(theta)/nSqrt;\n            const Real imagPart = Sin(theta)/nSqrt;\n            A.SetLocal( iLoc, jLoc, Complex<Real>(realPart,imagPart) );\n        }\n    }\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nMakeFourier( BlockDistMatrix<Complex<Real>,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeFourier\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square DFT matrix\");\n\n    const Real pi = 4*Atan( Real(1) );\n    const Real nSqrt = Sqrt( Real(n) );\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            const Real theta = -2*pi*i*j/n;\n            const Real realPart = Cos(theta)/nSqrt;\n            const Real imagPart = Sin(theta)/nSqrt;\n            A.SetLocal( iLoc, jLoc, Complex<Real>(realPart,imagPart) );\n        }\n    }\n}\n\ntemplate<typename Real>\ninline void\nFourier( Matrix<Complex<Real>>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Fourier\"))\n    A.Resize( n, n );\n    MakeFourier( A );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nFourier( DistMatrix<Complex<Real>,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Fourier\"))\n    A.Resize( n, n );\n    MakeFourier( A );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nFourier( BlockDistMatrix<Complex<Real>,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Fourier\"))\n    A.Resize( n, n );\n    MakeFourier( A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_FOURIER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/FoxLi.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_FOXLI_HPP\n#define ELEM_FOXLI_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_HERMITIANTRIDIAGEIG_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\ntemplate<typename Real>\ninline void\nFoxLi( Matrix<Complex<Real>>& A, Int n, Real omega )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"FoxLi\"))\n    typedef Complex<Real> C;\n    const Real pi = 4*Atan( Real(1) );\n    const C phi = Sqrt( C(0,omega/pi) ); \n    \n    // Compute Gauss quadrature points and weights\n    Matrix<Real> d, e; \n    Zeros( d, n, 1 );\n    e.Resize( n-1, 1 );\n    for( Int j=0; j<n-1; ++j )\n    {\n        const Real betaInv = 2*Sqrt(1-Pow(j+Real(1),-2)/4);\n        e.Set( j, 0, 1/betaInv );\n    }\n    Matrix<Real> x, Z;\n    HermitianTridiagEig( d, e, x, Z, UNSORTED );\n    auto z = LockedView( Z, 0, 0, 1, n );\n    Matrix<Real> sqrtWeights( z );\n    for( Int j=0; j<n; ++j )\n        sqrtWeights.Set( 0, j, Sqrt(2)*Abs(sqrtWeights.Get(0,j)) );\n    herm_eig::Sort( x, sqrtWeights, ASCENDING );\n    Transpose( sqrtWeights );\n\n    // Form the integral operator\n    A.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<n; ++i )\n        {\n            const Real theta = -omega*Pow(x.Get(i,0)-x.Get(j,0),2);\n            const Real realPart = Cos(theta);\n            const Real imagPart = Sin(theta);\n            A.Set( i, j, phi*C(realPart,imagPart) );\n        }\n    }\n\n    // Apply the weighting\n    DiagonalScale( LEFT, NORMAL, sqrtWeights, A );\n    DiagonalScale( RIGHT, NORMAL, sqrtWeights, A );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nFoxLi( DistMatrix<Complex<Real>,U,V>& A, Int n, Real omega )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"FoxLi\"))\n    typedef Complex<Real> C;\n    const Real pi = 4*Atan( Real(1) );\n    const C phi = Sqrt( C(0,omega/pi) ); \n    \n    // Compute Gauss quadrature points and weights\n    const Grid& g = A.Grid();\n    DistMatrix<Real,VR,STAR> d(g), e(g); \n    Zeros( d, n, 1 );\n    e.Resize( n-1, 1 );\n    for( Int iLoc=0; iLoc<e.LocalHeight(); ++iLoc )\n    {\n        const Int i = e.GlobalRow(iLoc);\n        const Real betaInv = 2*Sqrt(1-Pow(i+Real(1),-2)/4);\n        e.SetLocal( iLoc, 0, 1/betaInv );\n    }\n    DistMatrix<Real,VR,STAR> x(g);\n    DistMatrix<Real,STAR,VR> Z(g);\n    HermitianTridiagEig( d, e, x, Z, UNSORTED );\n    auto z = LockedView( Z, 0, 0, 1, n );\n    DistMatrix<Real,STAR,VR> sqrtWeights( z );\n    for( Int jLoc=0; jLoc<sqrtWeights.LocalWidth(); ++jLoc )\n        sqrtWeights.SetLocal\n        ( 0, jLoc, Sqrt(2)*Abs(sqrtWeights.GetLocal(0,jLoc)) );\n    herm_eig::Sort( x, sqrtWeights, ASCENDING );\n\n    // Form the integral operator\n    A.Resize( n, n );\n    DistMatrix<Real,U,STAR> x_U_STAR( x );\n    DistMatrix<Real,V,STAR> x_V_STAR( x );\n    for( Int jLoc=0; jLoc<A.LocalWidth(); ++jLoc )\n    {\n        for( Int iLoc=0; iLoc<A.LocalHeight(); ++iLoc )\n        {\n            const Real diff = x_U_STAR.GetLocal(iLoc,0)-\n                              x_V_STAR.GetLocal(jLoc,0);\n            const Real theta = -omega*Pow(diff,2);\n            const Real realPart = Cos(theta);\n            const Real imagPart = Sin(theta);\n            A.SetLocal( iLoc, jLoc, phi*C(realPart,imagPart) );\n        }\n    }\n\n    // Apply the weighting\n    DistMatrix<Real,VR,STAR> sqrtWeightsTrans(g);\n    Transpose( sqrtWeights, sqrtWeightsTrans );\n    DiagonalScale( LEFT, NORMAL, sqrtWeightsTrans, A );\n    DiagonalScale( RIGHT, NORMAL, sqrtWeightsTrans, A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_FOXLI_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/GCDMatrix.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GCDMATRIX_HPP\n#define ELEM_GCDMATRIX_HPP\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nMakeGCDMatrix( Matrix<T>& G )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeGCDMatrix\"))\n    const Int m = G.Height();\n    const Int n = G.Width();\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            G.Set( i, j, T(GCD(i+1,j+1)) );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeGCDMatrix( DistMatrix<T,U,V>& G )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeGCDMatrix\"))\n    const Int localHeight = G.LocalHeight();\n    const Int localWidth = G.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = G.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = G.GlobalRow(iLoc);\n            G.SetLocal( iLoc, jLoc, T(GCD(i+1,j+1)) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeGCDMatrix( BlockDistMatrix<T,U,V>& G )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeGCDMatrix\"))\n    const Int localHeight = G.LocalHeight();\n    const Int localWidth = G.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = G.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = G.GlobalRow(iLoc);\n            G.SetLocal( iLoc, jLoc, T(GCD(i+1,j+1)) );\n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nGCDMatrix( Matrix<T>& G, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GCDMatrix\"))\n    G.Resize( m, n );\n    MakeGCDMatrix( G );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nGCDMatrix( DistMatrix<T,U,V>& G, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GCDMatrix\"))\n    G.Resize( m, n );\n    MakeGCDMatrix( G );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nGCDMatrix( BlockDistMatrix<T,U,V>& G, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GCDMatrix\"))\n    G.Resize( m, n );\n    MakeGCDMatrix( G );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GCDMATRIX_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/GKS.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GKS_HPP\n#define ELEM_GKS_HPP\n\n// The Golub Klema Stewart matrix is upper-triangular with 1/sqrt(j) on its \n// j'th diagonal entry and -1/sqrt(j) elsewhere in the upper triangle.\n// \n// It was originally introduced as an example of where greedy RRQR fails.\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nMakeGKS( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeGKS\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square matrix GKS\");\n\n    MakeZeros( A );\n    for( Int j=0; j<n; ++j )\n    {\n        const F jDiag = F(1)/Sqrt(F(j+1));\n        for( Int i=0; i<j; ++i )\n            A.Set( i, j, -jDiag );\n        A.Set( j, j, jDiag );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeGKS( DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeGKS\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square matrix GKS\");\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        const F jDiag = F(1)/Sqrt(F(j+1));\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            if( i < j )\n                A.SetLocal( iLoc, jLoc, -jDiag );\n            else if( i == j )\n                A.SetLocal( iLoc, jLoc, jDiag );\n            else\n                A.SetLocal( iLoc, jLoc, 0 );\n        }\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeGKS( BlockDistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeGKS\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square matrix GKS\");\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        const F jDiag = F(1)/Sqrt(F(j+1));\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            if( i < j )\n                A.SetLocal( iLoc, jLoc, -jDiag );\n            else if( i == j )\n                A.SetLocal( iLoc, jLoc, jDiag );\n            else\n                A.SetLocal( iLoc, jLoc, 0 );\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nGKS( Matrix<F>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GKS\"))\n    A.Resize( n, n );\n    MakeGKS( A );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nGKS( DistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GKS\"))\n    A.Resize( n, n );\n    MakeGKS( A );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nGKS( BlockDistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GKS\"))\n    A.Resize( n, n );\n    MakeGKS( A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GKS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Gaussian.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GAUSSIAN_HPP\n#define ELEM_GAUSSIAN_HPP\n\nnamespace elem {\n\n// Draw each entry from a normal PDF\ntemplate<typename T>\ninline void\nMakeGaussian( Matrix<T>& A, T mean=0, Base<T> stddev=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeGaussian\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            A.Set( i, j, SampleNormal( mean, stddev ) );\n}\n\ntemplate<typename T>\ninline void\nGaussian( Matrix<T>& A, Int m, Int n, T mean=0, Base<T> stddev=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gaussian\"))\n    A.Resize( m, n );\n    MakeGaussian( A, mean, stddev );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeGaussian( DistMatrix<T,U,V>& A, T mean=0, Base<T> stddev=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeGaussian\"))\n    if( A.RedundantSize() == 1 )\n    {\n        MakeGaussian( A.Matrix(), mean, stddev );\n    }\n    else if( A.Participating() && A.LocalHeight() == A.LDim() )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        if( A.RedundantRank() == 0 )\n            MakeGaussian( A.Matrix(), mean, stddev );\n        mpi::Broadcast\n        ( A.Buffer(), localHeight*localWidth, 0, A.RedundantComm() );\n    }\n    else if( A.Participating() )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        const Int bufSize = localHeight*localWidth;\n        std::vector<T> buffer( bufSize );\n        if( A.RedundantRank() == 0 )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    buffer[iLoc+jLoc*localHeight] =\n                        SampleNormal( mean, stddev );\n        }\n        mpi::Broadcast( buffer.data(), bufSize, 0, A.RedundantComm() );\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            MemCopy\n            ( A.Buffer(0,jLoc), &buffer[jLoc*localHeight], localHeight );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeGaussian( BlockDistMatrix<T,U,V>& A, T mean=0, Base<T> stddev=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeGaussian\"))\n    if( A.RedundantSize() == 1 )\n    {\n        MakeGaussian( A.Matrix(), mean, stddev );\n    }\n    else if( A.Participating() && A.LocalHeight() == A.LDim() )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        if( A.RedundantRank() == 0 )\n            MakeGaussian( A.Matrix(), mean, stddev );\n        mpi::Broadcast\n        ( A.Buffer(), localHeight*localWidth, 0, A.RedundantComm() );\n    }\n    else if( A.Participating() )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        const Int bufSize = localHeight*localWidth;\n        std::vector<T> buffer( bufSize );\n        if( A.RedundantRank() == 0 )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    buffer[iLoc+jLoc*localHeight] =\n                        SampleNormal( mean, stddev );\n        }\n        mpi::Broadcast( buffer.data(), bufSize, 0, A.RedundantComm() );\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            MemCopy\n            ( A.Buffer(0,jLoc), &buffer[jLoc*localHeight], localHeight );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nGaussian( DistMatrix<T,U,V>& A, Int m, Int n, T mean=0, Base<T> stddev=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gaussian\"))\n    A.Resize( m, n );\n    MakeGaussian( A, mean, stddev );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nGaussian( BlockDistMatrix<T,U,V>& A, Int m, Int n, T mean=0, Base<T> stddev=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gaussian\"))\n    A.Resize( m, n );\n    MakeGaussian( A, mean, stddev );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GAUSSIAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Gear.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GEAR_HPP\n#define ELEM_GEAR_HPP\n\n#include \"./Zeros.hpp\"\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nGear( Matrix<T>& G, Int n, Int s, Int t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gear\"))\n    if( s == 0 || s > n || s < -n )\n        LogicError(\"Invalid s value\");\n    if( t == 0 || t > n || t < -n )\n        LogicError(\"Invalid t value\");\n    \n    Zeros( G, n, n );\n    for( Int j=0; j<n-1; ++j ) \n    {\n        G.Set( j, j+1, T(1) );\n        G.Set( j+1, j, T(1) );\n    } \n\n    if( s > 0 )\n        G.Set( 0, s-1, T(1) );\n    else\n        G.Set( 0, (-s)-1, T(-1) );\n\n    if( t > 0 )\n        G.Set( n-1, n-t, T(1) );\n    else\n        G.Set( n-1, n+t, T(-1) );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nGear( DistMatrix<T,U,V>& G, Int n, Int s, Int t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gear\"))\n    if( s == 0 || s > n || s < -n )\n        LogicError(\"Invalid s value\");\n    if( t == 0 || t > n || t < -n )\n        LogicError(\"Invalid t value\");\n    \n    Zeros( G, n, n );\n    for( Int j=0; j<n-1; ++j ) \n    {\n        G.Set( j, j+1, T(1) );\n        G.Set( j+1, j, T(1) );\n    } \n\n    if( s > 0 )\n        G.Set( 0, s-1, T(1) );\n    else\n        G.Set( 0, (-s)-1, T(-1) );\n\n    if( t > 0 )\n        G.Set( n-1, n-t, T(1) );\n    else\n        G.Set( n-1, n+t, T(-1) );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nGear( BlockDistMatrix<T,U,V>& G, Int n, Int s, Int t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Gear\"))\n    if( s == 0 || s > n || s < -n )\n        LogicError(\"Invalid s value\");\n    if( t == 0 || t > n || t < -n )\n        LogicError(\"Invalid t value\");\n    \n    Zeros( G, n, n );\n    for( Int j=0; j<n-1; ++j ) \n    {\n        G.Set( j, j+1, T(1) );\n        G.Set( j+1, j, T(1) );\n    } \n\n    if( s > 0 )\n        G.Set( 0, s-1, T(1) );\n    else\n        G.Set( 0, (-s)-1, T(-1) );\n\n    if( t > 0 )\n        G.Set( n-1, n-t, T(1) );\n    else\n        G.Set( n-1, n+t, T(-1) );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GEAR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Grcar.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_GRCAR_HPP\n#define ELEM_GRCAR_HPP\n\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nGrcar( Matrix<T>& A, Int n, Int k=3 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Grcar\"))\n    if( k < 0 )\n        LogicError(\"Number of superdiagonals of ones must be non-negative\");\n    Zeros( A, n, n );\n    if( n > 1 )\n        SetDiagonal( A, -1, -1 );\n    for( Int j=0; j<Min(n,k+1); ++j )\n        SetDiagonal( A, 1, j );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nGrcar( DistMatrix<T,U,V>& A, Int n, Int k=3 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Grcar\"))\n    if( k < 0 )\n        LogicError(\"Number of superdiagonals of ones must be non-negative\");\n    Zeros( A, n, n );\n    if( n > 1 )\n        SetDiagonal( A, -1, -1 );\n    for( Int j=0; j<Min(n,k+1); ++j )\n        SetDiagonal( A, 1, j );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nGrcar( BlockDistMatrix<T,U,V>& A, Int n, Int k=3 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Grcar\"))\n    if( k < 0 )\n        LogicError(\"Number of superdiagonals of ones must be non-negative\");\n    Zeros( A, n, n );\n    if( n > 1 )\n        SetDiagonal( A, -1, -1 );\n    for( Int j=0; j<Min(n,k+1); ++j )\n        SetDiagonal( A, 1, j );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_GRCAR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Haar.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HAAR_HPP\n#define ELEM_HAAR_HPP\n\n#include ELEM_QR_INC\n#include ELEM_GAUSSIAN_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nHaar( Matrix<F>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Haar\"))\n    // TODO: Replace this with a quadratic scheme similar to Stewart's, which\n    //       essentially generates random Householder reflectors\n    Gaussian( A, n, n );\n    qr::Explicit( A );\n}\n\ntemplate<typename F>\ninline void\nImplicitHaar( Matrix<F>& A, Matrix<F>& t, Matrix<Base<F>>& d, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ImplicitHaar\"))\n    // TODO: Replace this with a quadratic scheme similar to Stewart's, which\n    //       essentially generates random Householder reflectors\n    Gaussian( A, n, n );\n    QR( A, t, d );\n}\n\ntemplate<typename F>\ninline void\nHaar( DistMatrix<F>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Haar\"))\n    // TODO: Replace this with a quadratic scheme similar to Stewart's, which\n    //       essentially generates random Householder reflectors\n    Gaussian( A, n, n );\n    qr::Explicit( A );\n}\n\ntemplate<typename F>\ninline void\nImplicitHaar\n( DistMatrix<F>& A, DistMatrix<F,MD,STAR>& t, DistMatrix<Base<F>,MD,STAR>& d, \n  Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Haar\"))\n    // TODO: Replace this with a quadratic scheme similar to Stewart's, which\n    //       essentially generates random Householder reflectors\n    Gaussian( A, n, n );\n    QR( A, t, d );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HAAR_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Hankel.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HANKEL_HPP\n#define ELEM_HANKEL_HPP\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nHankel( Matrix<T>& A, Int m, Int n, const std::vector<T>& a )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hankel\"))\n    const Int length = m+n-1;\n    if( a.size() != (Unsigned)length )\n        LogicError(\"a was the wrong size\");\n    A.Resize( m, n );\n\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            A.Set( i, j, a[i+j] );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nHankel( DistMatrix<T,U,V>& A, Int m, Int n, const std::vector<T>& a )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hankel\"))\n    const Int length = m+n-1;\n    if( a.size() != (Unsigned)length )\n        LogicError(\"a was the wrong size\");\n    A.Resize( m, n );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            A.SetLocal( iLoc, jLoc, a[i+j] );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nHankel( BlockDistMatrix<T,U,V>& A, Int m, Int n, const std::vector<T>& a )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hankel\"))\n    const Int length = m+n-1;\n    if( a.size() != (Unsigned)length )\n        LogicError(\"a was the wrong size\");\n    A.Resize( m, n );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            A.SetLocal( iLoc, jLoc, a[i+j] );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HANKEL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Hanowa.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HANOWA_HPP\n#define ELEM_HANOWA_HPP\n\n#include \"./Diagonal.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nHanowa( Matrix<T>& A, Int n, T mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hanowa\"))\n    if( n % 2 != 0 )\n        LogicError(\"n must be an even integer\");\n    A.Resize( n, n );\n    const Int m = n/2;\n    std::vector<T> d(m);\n\n    for( Int j=0; j<m; ++j )\n        d[j] = mu;\n    auto ABlock = View( A, 0, 0, m, m );\n    Diagonal( ABlock, d );\n    ABlock = View( A, m, m, m, m );\n    Diagonal( ABlock, d );\n\n    for( Int j=0; j<m; ++j )\n        d[j] = -(j+1);\n    ABlock = View( A, 0, m, m, m );\n    Diagonal( ABlock, d );\n\n    for( Int j=0; j<m; ++j )\n        d[j] = j+1;\n    ABlock = View( A, m, 0, m, m );\n    Diagonal( ABlock, d );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nHanowa( DistMatrix<T,U,V>& A, Int n, T mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hanowa\"))\n    if( n % 2 != 0 )\n        LogicError(\"n must be an even integer\");\n    A.Resize( n, n );\n    const Int m = n/2;\n    std::vector<T> d(m);\n\n    for( Int j=0; j<m; ++j )\n        d[j] = mu;\n    auto ABlock = View( A, 0, 0, m, m );\n    Diagonal( ABlock, d );\n    ABlock = View( A, m, m, m, m );\n    Diagonal( ABlock, d );\n\n    for( Int j=0; j<m; ++j )\n        d[j] = -(j+1);\n    ABlock = View( A, 0, m, m, m );\n    Diagonal( ABlock, d );\n\n    for( Int j=0; j<m; ++j )\n        d[j] = j+1;\n    ABlock = View( A, m, 0, m, m );\n    Diagonal( ABlock, d );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nHanowa( BlockDistMatrix<T,U,V>& A, Int n, T mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hanowa\"))\n    if( n % 2 != 0 )\n        LogicError(\"n must be an even integer\");\n    A.Resize( n, n );\n    const Int m = n/2;\n    std::vector<T> d(m);\n\n    for( Int j=0; j<m; ++j )\n        d[j] = mu;\n    auto ABlock = View( A, 0, 0, m, m );\n    Diagonal( ABlock, d );\n    ABlock = View( A, m, m, m, m );\n    Diagonal( ABlock, d );\n\n    for( Int j=0; j<m; ++j )\n        d[j] = -(j+1);\n    ABlock = View( A, 0, m, m, m );\n    Diagonal( ABlock, d );\n\n    for( Int j=0; j<m; ++j )\n        d[j] = j+1;\n    ABlock = View( A, m, 0, m, m );\n    Diagonal( ABlock, d );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HANOWA_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/HatanoNelson.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HATANONELSON_HPP\n#define ELEM_HATANONELSON_HPP\n\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_UNIFORM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// Please see Section 36 of Trefethen and Embree's \"Spectra and Pseudospectra\"\n\ntemplate<typename F> \ninline void\nHatanoNelson\n( Matrix<F>& A, Int n, F center, Base<F> radius, F g, bool periodic=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HatanoNelson\"))\n    if( n < 3 )\n        LogicError(\"Hatano Nelson requires at least a 3x3 matrix\");\n    Zeros( A, n, n );\n    auto d = A.GetDiagonal();\n    MakeUniform( d, center, radius );\n    A.SetDiagonal( d );\n    SetDiagonal( A, Exp(g),   1 );\n    SetDiagonal( A, Exp(-g), -1 );\n    if( periodic )\n    {\n        A.Set( 0,   n-1, Exp(-g) );\n        A.Set( n-1, 0,   Exp( g) );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nHatanoNelson\n( DistMatrix<F,U,V>& A, Int n, F center, Base<F> radius, F g, \n  bool periodic=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HatanoNelson\"))\n    if( n < 3 )\n        LogicError(\"Hatano Nelson requires at least a 3x3 matrix\");\n    Zeros( A, n, n );\n    auto d = A.GetDiagonal();\n    MakeUniform( d, center, radius );\n    A.SetDiagonal( d );\n    SetDiagonal( A, Exp(g),   1 );\n    SetDiagonal( A, Exp(-g), -1 );\n    if( periodic )\n    {\n        A.Set( 0,   n-1, Exp(-g) );\n        A.Set( n-1, 0,   Exp( g) );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nHatanoNelson\n( BlockDistMatrix<F,U,V>& A, Int n, F center, Base<F> radius, F g, \n  bool periodic=true )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HatanoNelson\"))\n    if( n < 3 )\n        LogicError(\"Hatano Nelson requires at least a 3x3 matrix\");\n    Zeros( A, n, n );\n    auto d = A.GetDiagonal();\n    MakeUniform( d, center, radius );\n    A.SetDiagonal( d );\n    SetDiagonal( A, Exp(g),   1 );\n    SetDiagonal( A, Exp(-g), -1 );\n    if( periodic )\n    {\n        A.Set( 0,   n-1, Exp(-g) );\n        A.Set( n-1, 0,   Exp( g) );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HATANONELSON_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Helmholtz.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HELMHOLTZ_HPP\n#define ELEM_HELMHOLTZ_HPP\n\n#include \"./Zeros.hpp\"\n\nnamespace elem {\n\n// 1D Helmholtz\n// ============\n\ntemplate<typename F> \ninline void\nHelmholtz( Matrix<F>& H, Int n, F shift )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    typedef Base<F> R;\n    Zeros( H, n, n );\n\n    const R hInv = n+1; \n    const R hInvSquared = hInv*hInv;\n    const F mainTerm = 2*hInvSquared - shift;\n    for( Int i=0; i<n; ++i )\n    {\n        H.Set( i, i, mainTerm );\n        if( i != 0 )\n            H.Set( i, i-1, -hInvSquared );\n        if( i != n-1 )\n            H.Set( i, i+1, -hInvSquared );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nHelmholtz( DistMatrix<F,U,V>& H, Int n, F shift )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    typedef Base<F> R;\n    Zeros( H, n, n );\n\n    const R hInv = n+1; \n    const R hInvSquared = hInv*hInv;\n    const F mainTerm = 2*hInvSquared - shift;\n\n    const Int localHeight = H.LocalHeight();\n    for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n    {\n        const Int i = H.GlobalRow(iLoc);\n\n        H.Set( i, i, mainTerm );\n        if( i != 0 )\n            H.Set( i, i-1, -hInvSquared );\n        if( i != n-1 )\n            H.Set( i, i+1, -hInvSquared );\n    }\n}\n\n// 2D Helmholtz\n// ============\n\ntemplate<typename F> \ninline void\nHelmholtz( Matrix<F>& H, Int nx, Int ny, F shift )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    typedef Base<F> R;\n    const Int n = nx*ny;\n    Zeros( H, n, n );\n\n    const R hxInv = nx+1; \n    const R hyInv = ny+1;\n    const R hxInvSquared = hxInv*hxInv;\n    const R hyInvSquared = hyInv*hyInv;\n    const F mainTerm = 2*(hxInvSquared+hyInvSquared) - shift;\n    for( Int i=0; i<n; ++i )\n    {\n        const Int x = i % nx;\n        const Int y = i/nx;\n\n        H.Set( i, i, mainTerm );\n        if( x != 0 )\n            H.Set( i, i-1, -hxInvSquared );\n        if( x != nx-1 )\n            H.Set( i, i+1, -hxInvSquared );\n        if( y != 0 )\n            H.Set( i, i-nx, -hyInvSquared );\n        if( y != ny-1 )\n            H.Set( i, i+nx, -hyInvSquared );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nHelmholtz( DistMatrix<F,U,V>& H, Int nx, Int ny, F shift )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    typedef Base<F> R;\n    const Int n = nx*ny;\n    Zeros( H, n, n );\n\n    const R hxInv = nx+1; \n    const R hyInv = ny+1;\n    const R hxInvSquared = hxInv*hxInv;\n    const R hyInvSquared = hyInv*hyInv;\n    const F mainTerm = 2*(hxInvSquared+hyInvSquared) - shift;\n\n    const Int localHeight = H.LocalHeight();\n    for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n    {\n        const Int i = H.GlobalRow(iLoc);\n        const Int x = i % nx;\n        const Int y = i/nx;\n\n        H.Set( i, i, mainTerm );\n        if( x != 0 )\n            H.Set( i, i-1, -hxInvSquared );\n        if( x != nx-1 )\n            H.Set( i, i+1, -hxInvSquared );\n        if( y != 0 )\n            H.Set( i, i-nx, -hyInvSquared );\n        if( y != ny-1 )\n            H.Set( i, i+nx, -hyInvSquared );\n    }\n}\n\n// 3D Helmholtz\n// ============\n\ntemplate<typename F> \ninline void\nHelmholtz( Matrix<F>& H, Int nx, Int ny, Int nz, F shift )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    typedef Base<F> R;\n    const Int n = nx*ny*nz;\n    Zeros( H, n, n );\n\n    const R hxInv = nx+1; \n    const R hyInv = ny+1;\n    const R hzInv = nz+1;\n    const R hxInvSquared = hxInv*hxInv;\n    const R hyInvSquared = hyInv*hyInv;\n    const R hzInvSquared = hzInv*hzInv;\n    const F mainTerm = 2*(hxInvSquared+hyInvSquared+hzInvSquared) - shift;\n    for( Int i=0; i<n; ++i )\n    {\n        const Int x = i % nx;\n        const Int y = (i/nx) % ny;\n        const Int z = i/(nx*ny);\n\n        H.Set( i, i, mainTerm );\n        if( x != 0 )\n            H.Set( i, i-1, -hxInvSquared );\n        if( x != nx-1 )\n            H.Set( i, i+1, -hxInvSquared );\n        if( y != 0 )\n            H.Set( i, i-nx, -hyInvSquared );\n        if( y != ny-1 )\n            H.Set( i, i+nx, -hyInvSquared );\n        if( z != 0 )\n            H.Set( i, i-nx*ny, -hzInvSquared );\n        if( z != nz-1 )\n            H.Set( i, i+nx*ny, -hzInvSquared );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nHelmholtz( DistMatrix<F,U,V>& H, Int nx, Int ny, Int nz, F shift )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    typedef Base<F> R;\n    const Int n = nx*ny*nz;\n    Zeros( H, n, n );\n\n    const R hxInv = nx+1; \n    const R hyInv = ny+1;\n    const R hzInv = nz+1;\n    const R hxInvSquared = hxInv*hxInv;\n    const R hyInvSquared = hyInv*hyInv;\n    const R hzInvSquared = hzInv*hzInv;\n    const F mainTerm = 2*(hxInvSquared+hyInvSquared+hzInvSquared) - shift;\n\n    const Int localHeight = H.LocalHeight();\n    for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n    {\n        const Int i = H.GlobalRow(iLoc);\n        const Int x = i % nx;\n        const Int y = (i/nx) % ny;\n        const Int z = i/(nx*ny);\n\n        H.Set( i, i, mainTerm );\n        if( x != 0 )\n            H.Set( i, i-1, -hxInvSquared );\n        if( x != nx-1 )\n            H.Set( i, i+1, -hxInvSquared );\n        if( y != 0 )\n            H.Set( i, i-nx, -hyInvSquared );\n        if( y != ny-1 )\n            H.Set( i, i+nx, -hyInvSquared );\n        if( z != 0 )\n            H.Set( i, i-nx*ny, -hzInvSquared );\n        if( z != nz-1 )\n            H.Set( i, i+nx*ny, -hzInvSquared );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HELMHOLTZ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/HelmholtzPML.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HELMHOLTZPML_HPP\n#define ELEM_HELMHOLTZPML_HPP\n\n#include \"./Zeros.hpp\"\n\nnamespace elem {\n\nnamespace pml {\n\ntemplate<typename Real>\nComplex<Real> \nProfile( Real x, Real w, Real pmlExp, Real sigma, Real k )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"pml::Profile\");\n        if( x < 0 || x > w )\n            LogicError(\"Evaluation point not in PML interval\");\n    )\n    const Real realPart(1);\n    const Real arg = x/w;\n    const Real imagPart = (sigma/w)*Pow(arg,pmlExp)/k;\n    return Complex<Real>(realPart,imagPart);\n}\n\ntemplate<typename Real>\nComplex<Real>\nsInv( Int j, Int n, Int numPmlPoints, Real h, Real pmlExp, Real sigma, Real k )\n{\n    if( j < numPmlPoints-1 )\n        return Profile\n               ( (numPmlPoints-1-j)*h, numPmlPoints*h, pmlExp, sigma, k );\n    else if( j > n-numPmlPoints )\n        return Profile\n               ( (j-(n-numPmlPoints))*h, numPmlPoints*h, pmlExp, sigma, k );\n    else\n        return Complex<Real>(1,0);\n}\n\n} // namespace pml\n\n// 1D Helmholtz with PML\ntemplate<typename Real> \ninline void\nHelmholtzPML\n( Matrix<Complex<Real>>& H, Int n, Complex<Real> omega, \n  Int numPmlPoints=5, Real sigma=1.5, Real pmlExp=3 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    using namespace pml;\n    typedef Complex<Real> C;\n    Zeros( H, n, n );\n\n    const Real k = RealPart(omega) / (2*M_PI);\n    const Real h = Real(1)/(n+1);\n    const Real hSquared = h*h;\n    for( Int i=0; i<n; ++i )\n    {\n        const Int x = i;\n\n        const C sInvL = sInv( x-1, n, numPmlPoints, h, pmlExp, sigma, k );\n        const C sInvM = sInv( x,   n, numPmlPoints, h, pmlExp, sigma, k );\n        const C sInvR = sInv( x+1, n, numPmlPoints, h, pmlExp, sigma, k );\n\n        // This is a bit silly in 1D, but it keeps the structure from 2D/3D\n        const C xTop = Real(1);\n        const C xTempL = xTop/sInvL;\n        const C xTempM = xTop/sInvM;\n        const C xTempR = xTop/sInvR;\n        const C xTermL = (xTempL+xTempM) / (2*hSquared);\n        const C xTermR = (xTempM+xTempR) / (2*hSquared);\n\n        const C mainTerm = (xTermL+xTermR) - omega*omega*sInvM;\n\n        H.Set( i, i, mainTerm );\n        if( x != 0 )\n            H.Set( i, i-1, -xTermL );\n        if( x != n-1 )\n            H.Set( i, i+1, -xTermR );\n    }\n}\n\n// 1D Helmholtz with PML\ntemplate<typename Real> \ninline void\nHelmholtzPML\n( DistMatrix<Complex<Real>>& H, Int n, Complex<Real> omega, \n  Int numPmlPoints=5, Real sigma=1.5, Real pmlExp=3 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    using namespace pml;\n    typedef Complex<Real> C;\n    Zeros( H, n, n );\n\n    const Real k = RealPart(omega) / (2*M_PI);\n    const Real h = Real(1)/(n+1);\n    const Real hSquared = h*h;\n\n    const Int localHeight = H.LocalHeight();\n    for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n    {\n        const Int i = H.GlobalRow(iLoc);\n        const Int x = i;\n\n        const C sInvL = sInv( x-1, n, numPmlPoints, h, pmlExp, sigma, k );\n        const C sInvM = sInv( x,   n, numPmlPoints, h, pmlExp, sigma, k );\n        const C sInvR = sInv( x+1, n, numPmlPoints, h, pmlExp, sigma, k );\n\n        // This is a bit silly in 1D, but it keeps the structure from 2D/3D\n        const C xTop = Real(1);\n        const C xTempL = xTop/sInvL;\n        const C xTempM = xTop/sInvM;\n        const C xTempR = xTop/sInvR;\n        const C xTermL = (xTempL+xTempM) / (2*hSquared);\n        const C xTermR = (xTempM+xTempR) / (2*hSquared);\n\n        const C mainTerm = (xTermL+xTermR) - omega*omega*sInvM;\n\n        H.Set( i, i, mainTerm );\n        if( x != 0 )\n            H.Set( i, i-1, -xTermL );\n        if( x != n-1 )\n            H.Set( i, i+1, -xTermR );\n    }\n}\n\n// 2D Helmholtz with PML\ntemplate<typename Real> \ninline void\nHelmholtzPML\n( Matrix<Complex<Real>>& H, Int nx, Int ny, Complex<Real> omega, \n  Int numPmlPoints=5, Real sigma=1.5, Real pmlExp=3 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    using namespace pml;\n    typedef Complex<Real> C;\n    const Int n = nx*ny;\n    Zeros( H, n, n );\n\n    const Real k = RealPart(omega) / (2*M_PI);\n    const Real hx = Real(1)/(nx+1);\n    const Real hy = Real(1)/(ny+1);\n    const Real hxSquared = hx*hx;\n    const Real hySquared = hy*hy;\n    for( Int i=0; i<n; ++i )\n    {\n        const Int x = i % nx;\n        const Int y = i / nx; \n\n        const C sxInvL = sInv( x-1, nx, numPmlPoints, hx, pmlExp, sigma, k );\n        const C sxInvM = sInv( x,   nx, numPmlPoints, hx, pmlExp, sigma, k );\n        const C sxInvR = sInv( x+1, nx, numPmlPoints, hx, pmlExp, sigma, k );\n\n        const C syInvL = sInv( y-1, ny, numPmlPoints, hy, pmlExp, sigma, k );\n        const C syInvM = sInv( y,   ny, numPmlPoints, hy, pmlExp, sigma, k );\n        const C syInvR = sInv( y+1, ny, numPmlPoints, hy, pmlExp, sigma, k );\n\n        const C xTop = syInvM;\n        const C xTempL = xTop/sxInvL;\n        const C xTempM = xTop/sxInvM;\n        const C xTempR = xTop/sxInvR;\n        const C xTermL = (xTempL+xTempM) / (2*hxSquared);\n        const C xTermR = (xTempM+xTempR) / (2*hxSquared);\n\n        const C yTop = sxInvM;\n        const C yTempL = yTop/syInvL;\n        const C yTempM = yTop/syInvM;\n        const C yTempR = yTop/syInvR;\n        const C yTermL = (yTempL+yTempM) / (2*hySquared);\n        const C yTermR = (yTempM+yTempR) / (2*hySquared);\n\n        const C mainTerm = (xTermL+xTermR+yTermL+yTermR) - \n                           omega*omega*sxInvM*syInvM;\n\n        H.Set( i, i, mainTerm );\n        if( x != 0 )\n            H.Set( i, i-1, -xTermL );\n        if( x != nx-1 )\n            H.Set( i, i+1, -xTermR );\n        if( y != 0 )\n            H.Set( i, i-nx, -yTermL );\n        if( y != ny-1 )\n            H.Set( i, i+nx, -yTermR );\n    }\n}\n\n// 2D Helmholtz with PML\ntemplate<typename Real> \ninline void\nHelmholtzPML\n( DistMatrix<Complex<Real>>& H, Int nx, Int ny, Complex<Real> omega, \n  Int numPmlPoints=5, Real sigma=1.5, Real pmlExp=3 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    using namespace pml;\n    typedef Complex<Real> C;\n    const Int n = nx*ny;\n    Zeros( H, n, n );\n\n    const Real k = RealPart(omega) / (2*M_PI);\n    const Real hx = Real(1)/(nx+1);\n    const Real hy = Real(1)/(ny+1);\n    const Real hxSquared = hx*hx;\n    const Real hySquared = hy*hy;\n\n    const Int localHeight = H.LocalHeight();\n    for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n    {\n        const Int i = H.GlobalRow(iLoc);\n        const Int x = i % nx;\n        const Int y = i / nx; \n\n        const C sxInvL = sInv( x-1, nx, numPmlPoints, hx, pmlExp, sigma, k );\n        const C sxInvM = sInv( x,   nx, numPmlPoints, hx, pmlExp, sigma, k );\n        const C sxInvR = sInv( x+1, nx, numPmlPoints, hx, pmlExp, sigma, k );\n\n        const C syInvL = sInv( y-1, ny, numPmlPoints, hy, pmlExp, sigma, k );\n        const C syInvM = sInv( y,   ny, numPmlPoints, hy, pmlExp, sigma, k );\n        const C syInvR = sInv( y+1, ny, numPmlPoints, hy, pmlExp, sigma, k );\n\n        const C xTop = syInvM;\n        const C xTempL = xTop/sxInvL;\n        const C xTempM = xTop/sxInvM;\n        const C xTempR = xTop/sxInvR;\n        const C xTermL = (xTempL+xTempM) / (2*hxSquared);\n        const C xTermR = (xTempM+xTempR) / (2*hxSquared);\n\n        const C yTop = sxInvM;\n        const C yTempL = yTop/syInvL;\n        const C yTempM = yTop/syInvM;\n        const C yTempR = yTop/syInvR;\n        const C yTermL = (yTempL+yTempM) / (2*hySquared);\n        const C yTermR = (yTempM+yTempR) / (2*hySquared);\n\n        const C mainTerm = (xTermL+xTermR+yTermL+yTermR) - \n                           omega*omega*sxInvM*syInvM;\n\n        H.Set( i, i, mainTerm );\n        if( x != 0 )\n            H.Set( i, i-1, -xTermL );\n        if( x != nx-1 )\n            H.Set( i, i+1, -xTermR );\n        if( y != 0 )\n            H.Set( i, i-nx, -yTermL );\n        if( y != ny-1 )\n            H.Set( i, i+nx, -yTermR );\n    }\n}\n\n// 3D Helmholtz with PML\ntemplate<typename Real> \ninline void\nHelmholtzPML\n( Matrix<Complex<Real>>& H, Int nx, Int ny, Int nz, Complex<Real> omega, \n  Int numPmlPoints=5, Real sigma=1.5, Real pmlExp=3 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    using namespace pml;\n    typedef Complex<Real> C;\n    const Int n = nx*ny*nz;\n    Zeros( H, n, n );\n\n    const Real k = RealPart(omega) / (2*M_PI);\n    const Real hx = Real(1)/(nx+1);\n    const Real hy = Real(1)/(ny+1);\n    const Real hz = Real(1)/(nz+1);\n    const Real hxSquared = hx*hx;\n    const Real hySquared = hy*hy;\n    const Real hzSquared = hz*hz;\n    for( Int i=0; i<n; ++i )\n    {\n        const Int x = i % nx;\n        const Int y = (i/nx) % ny; \n        const Int z = i/(nx*ny);\n\n        const C sxInvL = sInv( x-1, nx, numPmlPoints, hx, pmlExp, sigma, k );\n        const C sxInvM = sInv( x,   nx, numPmlPoints, hx, pmlExp, sigma, k );\n        const C sxInvR = sInv( x+1, nx, numPmlPoints, hx, pmlExp, sigma, k );\n\n        const C syInvL = sInv( y-1, ny, numPmlPoints, hy, pmlExp, sigma, k );\n        const C syInvM = sInv( y,   ny, numPmlPoints, hy, pmlExp, sigma, k );\n        const C syInvR = sInv( y+1, ny, numPmlPoints, hy, pmlExp, sigma, k );\n\n        const C szInvL = sInv( z-1, nz, numPmlPoints, hz, pmlExp, sigma, k );\n        const C szInvM = sInv( z,   nz, numPmlPoints, hz, pmlExp, sigma, k );\n        const C szInvR = sInv( z+1, nz, numPmlPoints, hz, pmlExp, sigma, k );\n\n        const C xTop = syInvM*szInvM;\n        const C xTempL = xTop/sxInvL;\n        const C xTempM = xTop/sxInvM;\n        const C xTempR = xTop/sxInvR;\n        const C xTermL = (xTempL+xTempM) / (2*hxSquared);\n        const C xTermR = (xTempM+xTempR) / (2*hxSquared);\n\n        const C yTop = sxInvM*szInvM;\n        const C yTempL = yTop/syInvL;\n        const C yTempM = yTop/syInvM;\n        const C yTempR = yTop/syInvR;\n        const C yTermL = (yTempL+yTempM) / (2*hySquared);\n        const C yTermR = (yTempM+yTempR) / (2*hySquared);\n\n        const C zTop = sxInvM*syInvM;\n        const C zTempL = zTop/szInvL;\n        const C zTempM = zTop/szInvM;\n        const C zTempR = zTop/szInvR;\n        const C zTermL = (zTempL+zTempM) / (2*hzSquared);\n        const C zTermR = (zTempM+zTempR) / (2*hzSquared);\n\n        const C mainTerm = (xTermL+xTermR+yTermL+yTermR+zTermL+zTermR) - \n                           omega*omega*sxInvM*syInvM*szInvM;\n\n        H.Set( i, i, mainTerm );\n        if( x != 0 )\n            H.Set( i, i-1, -xTermL );\n        if( x != nx-1 )\n            H.Set( i, i+1, -xTermR );\n        if( y != 0 )\n            H.Set( i, i-nx, -yTermL );\n        if( y != ny-1 )\n            H.Set( i, i+nx, -yTermR );\n        if( z != 0 )\n            H.Set( i, i-nx*ny, -zTermL );\n        if( z != nz-1 )\n            H.Set( i, i+nx*ny, -zTermR );\n    }\n}\n\n// 3D Helmholtz with PML\ntemplate<typename Real> \ninline void\nHelmholtzPML\n( DistMatrix<Complex<Real>>& H, Int nx, Int ny, Int nz, Complex<Real> omega, \n  Int numPmlPoints=5, Real sigma=1.5, Real pmlExp=3 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Helmholtz\"))\n    using namespace pml;\n    typedef Complex<Real> C;\n    const Int n = nx*ny*nz;\n    Zeros( H, n, n );\n\n    const Real k = RealPart(omega) / (2*M_PI);\n    const Real hx = Real(1)/(nx+1);\n    const Real hy = Real(1)/(ny+1);\n    const Real hz = Real(1)/(nz+1);\n    const Real hxSquared = hx*hx;\n    const Real hySquared = hy*hy;\n    const Real hzSquared = hz*hz;\n\n    const Int localHeight = H.LocalHeight();\n    for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n    {\n        const Int i = H.GlobalRow(iLoc);\n        const Int x = i % nx;\n        const Int y = (i/nx) % ny; \n        const Int z = i/(nx*ny);\n\n        const C sxInvL = sInv( x-1, nx, numPmlPoints, hx, pmlExp, sigma, k );\n        const C sxInvM = sInv( x,   nx, numPmlPoints, hx, pmlExp, sigma, k );\n        const C sxInvR = sInv( x+1, nx, numPmlPoints, hx, pmlExp, sigma, k );\n\n        const C syInvL = sInv( y-1, ny, numPmlPoints, hy, pmlExp, sigma, k );\n        const C syInvM = sInv( y,   ny, numPmlPoints, hy, pmlExp, sigma, k );\n        const C syInvR = sInv( y+1, ny, numPmlPoints, hy, pmlExp, sigma, k );\n\n        const C szInvL = sInv( z-1, nz, numPmlPoints, hz, pmlExp, sigma, k );\n        const C szInvM = sInv( z,   nz, numPmlPoints, hz, pmlExp, sigma, k );\n        const C szInvR = sInv( z+1, nz, numPmlPoints, hz, pmlExp, sigma, k );\n\n        const C xTop = syInvM*szInvM;\n        const C xTempL = xTop/sxInvL;\n        const C xTempM = xTop/sxInvM;\n        const C xTempR = xTop/sxInvR;\n        const C xTermL = (xTempL+xTempM) / (2*hxSquared);\n        const C xTermR = (xTempM+xTempR) / (2*hxSquared);\n\n        const C yTop = sxInvM*szInvM;\n        const C yTempL = yTop/syInvL;\n        const C yTempM = yTop/syInvM;\n        const C yTempR = yTop/syInvR;\n        const C yTermL = (yTempL+yTempM) / (2*hySquared);\n        const C yTermR = (yTempM+yTempR) / (2*hySquared);\n\n        const C zTop = sxInvM*syInvM;\n        const C zTempL = zTop/szInvL;\n        const C zTempM = zTop/szInvM;\n        const C zTempR = zTop/szInvR;\n        const C zTermL = (zTempL+zTempM) / (2*hzSquared);\n        const C zTermR = (zTempM+zTempR) / (2*hzSquared);\n\n        const C mainTerm = (xTermL+xTermR+yTermL+yTermR+zTermL+zTermR) - \n                           omega*omega*sxInvM*syInvM*szInvM;\n\n        H.Set( i, i, mainTerm );\n        if( x != 0 )\n            H.Set( i, i-1, -xTermL );\n        if( x != nx-1 )\n            H.Set( i, i+1, -xTermR );\n        if( y != 0 )\n            H.Set( i, i-nx, -yTermL );\n        if( y != ny-1 )\n            H.Set( i, i+nx, -yTermR );\n        if( z != 0 )\n            H.Set( i, i-nx*ny, -zTermL );\n        if( z != nz-1 )\n            H.Set( i, i+nx*ny, -zTermR );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HELMHOLTZPML_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/HermitianFromEVD.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANFROMEVD_HPP\n#define ELEM_HERMITIANFROMEVD_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_MAKETRAPEZOIDAL_INC\n\nnamespace elem {\n\n// A :=  Z Omega Z^T, where Omega is diagonal and real-valued\n\ntemplate<typename F>\ninline void\nHermitianFromEVD\n( UpperOrLower uplo,\n        Matrix<F>& A,\n  const Matrix<Base<F>>& w,\n  const Matrix<F>& Z )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianFromEVD\"))\n    Matrix<F> Z1Copy, Y1;\n\n    const Int m = Z.Height();\n    const Int n = Z.Width();\n    A.Resize( m, m );\n    if( uplo == LOWER )\n        MakeTrapezoidal( UPPER, A, 1 );\n    else\n        MakeTrapezoidal( LOWER, A, -1 );\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto Z1 = LockedView( Z, 0, k, m,  nb );\n        auto w1 = LockedView( w, k, 0, nb, 1  );\n\n        Y1 = Z1Copy = Z1;\n        DiagonalScale( RIGHT, NORMAL, w1, Y1 );\n        Trrk( uplo, NORMAL, ADJOINT, F(1), Z1Copy, Y1, F(1), A );\n    }\n}\n\ntemplate<typename F>\ninline void\nHermitianFromEVD\n( UpperOrLower uplo,\n        DistMatrix<F>& A,\n  const DistMatrix<Base<F>,VR,STAR>& w,\n  const DistMatrix<F>& Z )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianFromEVD\"))\n    const Grid& g = A.Grid();\n    typedef Base<F> Real;\n\n    DistMatrix<F,MC,  STAR> Z1_MC_STAR(g);\n    DistMatrix<F,VR,  STAR> Z1_VR_STAR(g);\n    DistMatrix<F,STAR,MR  > Z1Adj_STAR_MR(g);\n    DistMatrix<Real,STAR,STAR> w1_STAR_STAR(g);\n\n    const Int m = Z.Height();\n    const Int n = Z.Width();\n    A.Resize( m, m );\n    if( uplo == LOWER )\n        MakeTrapezoidal( UPPER, A, 1 );\n    else\n        MakeTrapezoidal( LOWER, A, -1 );\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto Z1 = LockedView( Z, 0, k, m,  nb );\n        auto w1 = LockedView( w, k, 0, nb, 1  );\n\n        Z1_MC_STAR.AlignWith( A );\n        Z1_MC_STAR = Z1;\n        Z1_VR_STAR.AlignWith( A );\n        Z1_VR_STAR = Z1_MC_STAR;\n        w1_STAR_STAR = w1;\n\n        DiagonalScale( RIGHT, NORMAL, w1_STAR_STAR, Z1_VR_STAR );\n\n        Z1Adj_STAR_MR.AlignWith( A );\n        Z1_VR_STAR.AdjointPartialColAllGather( Z1Adj_STAR_MR );\n        LocalTrrk( uplo, F(1), Z1_MC_STAR, Z1Adj_STAR_MR, F(1), A );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANFROMEVD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/HermitianUniformSpectrum.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HERMITIANUNIFORMSPECTRUM_HPP\n#define ELEM_HERMITIANUNIFORMSPECTRUM_HPP\n\n#include \"./Diagonal.hpp\"\n#include \"./Haar.hpp\"\n#include \"./Uniform.hpp\"\n\nnamespace elem {\n\n// Draw the spectrum from the specified half-open interval on the real line,\n// then rotate with a Haar matrix\n\ntemplate<typename F>\ninline void\nMakeHermitianUniformSpectrum( Matrix<F>& A, Base<F> lower=0, Base<F> upper=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeHermitianUniformSpectrum\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make a non-square matrix Hermitian\");\n    typedef Base<F> Real;\n    const bool isComplex = IsComplex<F>::val;\n\n    // Form d and D\n    const Int n = A.Height();\n    std::vector<F> d( n );\n    for( Int j=0; j<n; ++j )\n        d[j] = SampleUniform<Real>( lower, upper );\n    Diagonal( A, d );\n\n    // Apply a Haar matrix from both sides\n    Matrix<F> Q, t;\n    Matrix<Real> s;\n    ImplicitHaar( Q, t, s, n );\n    qr::ApplyQ( LEFT, NORMAL, Q, t, s, A );\n    qr::ApplyQ( RIGHT, ADJOINT, Q, t, s, A );\n\n    if( isComplex )\n    {\n        const Int height = A.Height();\n        for( Int j=0; j<height; ++j )\n            A.SetImagPart( j, j, Real(0) );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeHermitianUniformSpectrum\n( DistMatrix<F,U,V>& A, Base<F> lower=0, Base<F> upper=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeHermitianUniformSpectrum\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make a non-square matrix Hermitian\");\n    const Grid& grid = A.Grid();\n    typedef Base<F> Real;\n    const bool isComplex = IsComplex<F>::val;\n    const bool standardDist = ( U == MC && V == MR );\n\n    // Form d and D\n    const Int n = A.Height();\n    std::vector<F> d( n );\n    if( grid.Rank() == 0 )\n        for( Int j=0; j<n; ++j )\n            d[j] = SampleUniform<Real>( lower, upper );\n    mpi::Broadcast( d.data(), n, 0, grid.Comm() );\n    DistMatrix<F> ABackup( grid );\n    if( standardDist )\n        Diagonal( A, d );\n    else\n    {\n        ABackup.AlignWith( A );\n        Diagonal( ABackup, d );\n    }\n\n    // Apply a Haar matrix from both sides\n    DistMatrix<F> Q(grid);\n    DistMatrix<F,MD,STAR> t(grid);\n    DistMatrix<Real,MD,STAR> s(grid);\n    ImplicitHaar( Q, t, s, n );\n\n    // Copy the result into the correct distribution\n    if( standardDist )\n    {\n        qr::ApplyQ( LEFT, NORMAL, Q, t, s, A );\n        qr::ApplyQ( RIGHT, ADJOINT, Q, t, s, A );\n    }\n    else\n    {\n        qr::ApplyQ( LEFT, NORMAL, Q, t, s, ABackup );\n        qr::ApplyQ( RIGHT, ADJOINT, Q, t, s, ABackup );\n        A = ABackup;\n    }\n\n    // Force the diagonal to be real-valued\n    if( isComplex )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                if( i == j )\n                    A.SetLocalImagPart( iLoc, jLoc, Real(0) );\n            }\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nHermitianUniformSpectrum\n( Matrix<F>& A, Int n, Base<F> lower=0, Base<F> upper=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianUniformSpectrum\"))\n    A.Resize( n, n );\n    MakeHermitianUniformSpectrum( A, lower, upper );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nHermitianUniformSpectrum\n( DistMatrix<F,U,V>& A, Int n, Base<F> lower=0, Base<F> upper=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianUniformSpectrum\"))\n    A.Resize( n, n );\n    MakeHermitianUniformSpectrum( A, lower, upper );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANUNIFORMSPECTRUM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Hilbert.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_HILBERT_HPP\n#define ELEM_HILBERT_HPP\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nMakeHilbert( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeHilbert\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square matrix Hilbert\");\n\n    const F one = F(1);\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            A.Set( i, j, one/F(i+j+1) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeHilbert( DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeHilbert\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square matrix Hilbert\");\n\n    const F one = F(1);\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            A.SetLocal( iLoc, jLoc, one/F(i+j+1) );\n        }\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeHilbert( BlockDistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeHilbert\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square matrix Hilbert\");\n\n    const F one = F(1);\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            A.SetLocal( iLoc, jLoc, one/F(i+j+1) );\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nHilbert( Matrix<F>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hilbert\"))\n    A.Resize( n, n );\n    MakeHilbert( A );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nHilbert( DistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hilbert\"))\n    A.Resize( n, n );\n    MakeHilbert( A );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nHilbert( BlockDistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Hilbert\"))\n    A.Resize( n, n );\n    MakeHilbert( A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_HILBERT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Identity.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_IDENTITY_HPP\n#define ELEM_IDENTITY_HPP\n\n#include ELEM_ZERO_INC\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nMakeIdentity( Matrix<T>& I )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeIdentity\"))\n    Zero( I );\n    const Int m = I.Height();\n    const Int n = I.Width();\n    for( Int j=0; j<std::min(m,n); ++j )\n        I.Set( j, j, T(1) );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeIdentity( DistMatrix<T,U,V>& I )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeIdentity\"))\n    Zero( I.Matrix() );\n\n    const Int localHeight = I.LocalHeight();\n    const Int localWidth = I.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = I.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = I.GlobalRow(iLoc);\n            if( i == j )\n                I.SetLocal( iLoc, jLoc, T(1) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeIdentity( BlockDistMatrix<T,U,V>& I )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeIdentity\"))\n    Zero( I.Matrix() );\n\n    const Int localHeight = I.LocalHeight();\n    const Int localWidth = I.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = I.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = I.GlobalRow(iLoc);\n            if( i == j )\n                I.SetLocal( iLoc, jLoc, T(1) );\n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nIdentity( Matrix<T>& I, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Identity\"))\n    I.Resize( m, n );\n    MakeIdentity( I );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nIdentity( DistMatrix<T,U,V>& I, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Identity\"))\n    I.Resize( m, n );\n    MakeIdentity( I );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nIdentity( BlockDistMatrix<T,U,V>& I, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Identity\"))\n    I.Resize( m, n );\n    MakeIdentity( I );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_IDENTITY_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Jordan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_JORDAN_HPP\n#define ELEM_JORDAN_HPP\n\n#include ELEM_ZERO_INC\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nMakeJordan( Matrix<T>& J, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeJordan\"))\n    Zero( J );\n    const Int m = J.Height();\n    const Int n = J.Width();\n    for( Int j=0; j<std::min(m,n); ++j )\n    {\n        J.Set( j, j, lambda );\n        if( j != 0 )\n            J.Set( j-1, j, T(1) );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeJordan( DistMatrix<T,U,V>& J, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeJordan\"))\n    Zero( J.Matrix() );\n\n    const Int localHeight = J.LocalHeight();\n    const Int localWidth = J.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = J.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = J.GlobalRow(iLoc);\n            if( i == j )\n                J.SetLocal( iLoc, jLoc, lambda );\n            else if( i == j-1 )\n                J.SetLocal( iLoc, jLoc, T(1) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeJordan( BlockDistMatrix<T,U,V>& J, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeJordan\"))\n    Zero( J.Matrix() );\n\n    const Int localHeight = J.LocalHeight();\n    const Int localWidth = J.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = J.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = J.GlobalRow(iLoc);\n            if( i == j )\n                J.SetLocal( iLoc, jLoc, lambda );\n            else if( i == j-1 )\n                J.SetLocal( iLoc, jLoc, T(1) );\n        }\n    }\n}\n\ntemplate<typename T>\ninline void\nJordan( Matrix<T>& J, Int n, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Jordan\"))\n    J.Resize( n, n );\n    MakeJordan( J, lambda );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nJordan( DistMatrix<T,U,V>& J, Int n, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Jordan\"))\n    J.Resize( n, n );\n    MakeJordan( J, lambda );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nJordan( BlockDistMatrix<T,U,V>& J, Int n, T lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Jordan\"))\n    J.Resize( n, n );\n    MakeJordan( J, lambda );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_JORDAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/KMS.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_KMS_HPP\n#define ELEM_KMS_HPP\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nKMS( Matrix<T>& K, Int n, T rho )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"KMS\"))\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<j; ++i )\n            K.Set( i, j, Pow(rho,T(j-i)) );\n        for( Int i=j; i<n; ++i )\n            K.Set( i, j, Conj(Pow(rho,T(i-j))) );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nKMS( DistMatrix<T,U,V>& K, Int n, T rho )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"KMS\"))\n    const Int localHeight = K.LocalHeight();\n    const Int localWidth = K.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = K.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = K.GlobalRow(iLoc);\n            if( i < j )\n                K.SetLocal( iLoc, jLoc, Pow(rho,T(j-i)) );\n            else\n                K.SetLocal( iLoc, jLoc, Conj(Pow(rho,T(i-j))) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nKMS( BlockDistMatrix<T,U,V>& K, Int n, T rho )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"KMS\"))\n    const Int localHeight = K.LocalHeight();\n    const Int localWidth = K.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = K.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = K.GlobalRow(iLoc);\n            if( i < j )\n                K.SetLocal( iLoc, jLoc, Pow(rho,T(j-i)) );\n            else\n                K.SetLocal( iLoc, jLoc, Conj(Pow(rho,T(i-j))) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_KMS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Kahan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_KAHAN_HPP\n#define ELEM_KAHAN_HPP\n\n// I haven't decided on the appropriate generalization to complex cosine/sine\n// pairs. For now, given phi, we will compute the corresponding partner as the\n// real value sqrt(1-|phi|^2)\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nMakeKahan( Matrix<F>& A, F phi )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeKahan\"))\n    typedef Base<F> Real;\n\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square matrix Kahan\");\n    if( Abs(phi) >= Real(1) || Abs(phi) == Real(0) )\n        LogicError(\"|phi| must be in (0,1)\");\n\n    const F zeta = Sqrt(F(1)-phi*Conj(phi));\n\n    MakeZeros( A );\n    for( Int i=0; i<n; ++i )\n    {\n        const F zetaPow = Pow( zeta, Real(i) );\n        A.Set( i, i, zetaPow );\n        for( Int j=1; j<n; ++j )\n            A.Set( i, j, -phi*zetaPow );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeKahan( DistMatrix<F,U,V>& A, F phi )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeKahan\"))\n    typedef Base<F> Real;\n\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square matrix Kahan\");\n    if( Abs(phi) >= Real(1) || Abs(phi) == Real(0) )\n        LogicError(\"|phi| must be in (0,1)\");\n\n    const F zeta = Sqrt(F(1)-phi*Conj(phi));\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n    {\n        const Int i = A.GlobalRow(iLoc);\n        const F zetaPow = Pow( zeta, Real(i) );\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            if( i > j )       \n                A.SetLocal( iLoc, jLoc, F(0) ); \n            else if( i == j )\n                A.SetLocal( iLoc, jLoc, zetaPow );\n            else\n                A.SetLocal( iLoc, jLoc, -phi*zetaPow );\n        }\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeKahan( BlockDistMatrix<F,U,V>& A, F phi )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeKahan\"))\n    typedef Base<F> Real;\n\n    const Int m = A.Height();\n    const Int n = A.Width();\n    if( m != n )\n        LogicError(\"Cannot make a non-square matrix Kahan\");\n    if( Abs(phi) >= Real(1) || Abs(phi) == Real(0) )\n        LogicError(\"|phi| must be in (0,1)\");\n\n    const F zeta = Sqrt(F(1)-phi*Conj(phi));\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n    {\n        const Int i = A.GlobalRow(iLoc);\n        const F zetaPow = Pow( zeta, Real(i) );\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            if( i > j )       \n                A.SetLocal( iLoc, jLoc, F(0) ); \n            else if( i == j )\n                A.SetLocal( iLoc, jLoc, zetaPow );\n            else\n                A.SetLocal( iLoc, jLoc, -phi*zetaPow );\n        }\n    }\n}\n\ntemplate<typename F>\ninline void\nKahan( Matrix<F>& A, Int n, F phi )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Kahan\"))\n    A.Resize( n, n );\n    MakeKahan( A, phi );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nKahan( DistMatrix<F,U,V>& A, Int n, F phi )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Kahan\"))\n    A.Resize( n, n );\n    MakeKahan( A, phi );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nKahan( BlockDistMatrix<F,U,V>& A, Int n, F phi )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Kahan\"))\n    A.Resize( n, n );\n    MakeKahan( A, phi );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_KAHAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Laplacian.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAPLACIAN_HPP\n#define ELEM_LAPLACIAN_HPP\n\n#include ELEM_HELMHOLTZ_INC\n\nnamespace elem {\n\n// 1D Laplacian\n// ============\n\ntemplate<typename F> \ninline void\nLaplacian( Matrix<F>& L, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Laplacian\"))\n    Helmholtz( L, n, F(0) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nLaplacian( DistMatrix<F,U,V>& L, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Laplacian\"))\n    Helmholtz( L, n, F(0) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nLaplacian( BlockDistMatrix<F,U,V>& L, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Laplacian\"))\n    Helmholtz( L, n, F(0) );\n}\n\n// 2D Laplacian\n// ============\n\ntemplate<typename F> \ninline void\nLaplacian( Matrix<F>& L, Int nx, Int ny )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Laplacian\"))\n    Helmholtz( L, nx, ny, F(0) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nLaplacian( DistMatrix<F,U,V>& L, Int nx, Int ny )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Laplacian\"))\n    Helmholtz( L, nx, ny, F(0) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nLaplacian( BlockDistMatrix<F,U,V>& L, Int nx, Int ny )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Laplacian\"))\n    Helmholtz( L, nx, ny, F(0) );\n}\n\n// 3D Laplacian\n// ============\n\ntemplate<typename F> \ninline void\nLaplacian( Matrix<F>& L, Int nx, Int ny, Int nz )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Laplacian\"))\n    Helmholtz( L, nx, ny, nz, F(0) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nLaplacian( DistMatrix<F,U,V>& L, Int nx, Int ny, Int nz )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Laplacian\"))\n    Helmholtz( L, nx, ny, nz, F(0) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nLaplacian( BlockDistMatrix<F,U,V>& L, Int nx, Int ny, Int nz )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Laplacian\"))\n    Helmholtz( L, nx, ny, nz, F(0) );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAPLACIAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Lauchli.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LAUCHLI_HPP\n#define ELEM_LAUCHLI_HPP\n\n#include ELEM_DIAGONAL_INC\n#include ELEM_ONES_INC\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nLauchli( Matrix<T>& A, Int n, T mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Lauchli\"))\n    A.Resize( n+1, n );\n\n    auto ABlock = View( A, 0, 0, 1, n );\n    MakeOnes( ABlock );\n\n    std::vector<T> d(n,mu);\n    ABlock = View( A, 1, 0, n, n );\n    Diagonal( ABlock, d );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nLauchli( DistMatrix<T,U,V>& A, Int n, T mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Lauchli\"))\n    A.Resize( n+1, n );\n\n    auto ABlock = View( A, 0, 0, 1, n );\n    MakeOnes( ABlock );\n\n    std::vector<T> d(n,mu);\n    ABlock = View( A, 1, 0, n, n );\n    Diagonal( ABlock, d );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nLauchli( BlockDistMatrix<T,U,V>& A, Int n, T mu )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Lauchli\"))\n    A.Resize( n+1, n );\n\n    auto ABlock = View( A, 0, 0, 1, n );\n    MakeOnes( ABlock );\n\n    std::vector<T> d(n,mu);\n    ABlock = View( A, 1, 0, n, n );\n    Diagonal( ABlock, d );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LAUCHLI_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Legendre.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LEGENDRE_HPP\n#define ELEM_LEGENDRE_HPP\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nMakeLegendre( Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeLegendre\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make a non-square matrix Legendre\");\n    MakeZeros( A );\n\n    const Int n = A.Width();\n    for( Int j=0; j<n-1; ++j )\n    {\n        const F gamma = F(1) / Pow( F(2)*F(j+1), F(2) );\n        const F beta = F(1) / (F(2)*Sqrt(F(1)-gamma));\n        A.Set( j+1, j, beta );\n        A.Set( j, j+1, beta );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeLegendre( DistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeLegendre\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make a non-square matrix Legendre\");\n    MakeZeros( A );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            if( j == i+1 || j == i-1 )\n            {\n                const Int k = Max( i, j );\n                const F gamma = F(1) / Pow( F(2)*F(k), F(2) );\n                const F beta = F(1) / (F(2)*Sqrt(F(1)-gamma));\n                A.SetLocal( iLoc, jLoc, beta );\n            }\n        }\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nMakeLegendre( BlockDistMatrix<F,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeLegendre\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make a non-square matrix Legendre\");\n    MakeZeros( A );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            if( j == i+1 || j == i-1 )\n            {\n                const Int k = Max( i, j );\n                const F gamma = F(1) / Pow( F(2)*F(k), F(2) );\n                const F beta = F(1) / (F(2)*Sqrt(F(1)-gamma));\n                A.SetLocal( iLoc, jLoc, beta );\n            }\n        }\n    }\n}\n\ntemplate<typename F> \ninline void\nLegendre( Matrix<F>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Legendre\"))\n    A.Resize( n, n );\n    MakeLegendre( A );\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline void\nLegendre( DistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Legendre\"))\n    A.Resize( n, n );\n    MakeLegendre( A );\n}\n\ntemplate<typename F,Dist U,Dist V> \ninline void\nLegendre( BlockDistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Legendre\"))\n    A.Resize( n, n );\n    MakeLegendre( A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LEGENDRE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Lehmer.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LEHMER_HPP\n#define ELEM_LEHMER_HPP\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nLehmer( Matrix<F>& L, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Lehmer\"))\n    L.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<j; ++i )\n            L.Set( i, j, F(i+1)/F(j+1) );\n        for( Int i=j; i<n; ++i )\n            L.Set( i, j, F(j+1)/F(i+1) );\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nLehmer( DistMatrix<F,U,V>& L, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Lehmer\"))\n    L.Resize( n, n );\n    const Int localHeight = L.LocalHeight();\n    const Int localWidth = L.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = L.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = L.GlobalRow(iLoc);\n            if( i < j )\n                L.SetLocal( iLoc, jLoc, F(i+1)/F(j+1) );\n            else\n                L.SetLocal( iLoc, jLoc, F(j+1)/F(i+1) );\n        }\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nLehmer( BlockDistMatrix<F,U,V>& L, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Lehmer\"))\n    L.Resize( n, n );\n    const Int localHeight = L.LocalHeight();\n    const Int localWidth = L.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = L.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = L.GlobalRow(iLoc);\n            if( i < j )\n                L.SetLocal( iLoc, jLoc, F(i+1)/F(j+1) );\n            else\n                L.SetLocal( iLoc, jLoc, F(j+1)/F(i+1) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LEHMER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Lotkin.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_LOTKIN_HPP\n#define ELEM_LOTKIN_HPP\n\n#include ELEM_HILBERT_INC\n\nnamespace elem {\n\ntemplate<typename F>\ninline void\nLotkin( Matrix<F>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Lotkin\"))\n    Hilbert( A, n );\n    // Set first row to all ones\n    for( Int j=0; j<n; ++j )\n        A.Set( 0, j, F(1) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nLotkin( DistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Lotkin\"))\n    Hilbert( A, n );\n    // Set first row to all ones\n    if( A.ColShift() == 0 )\n    {\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            A.SetLocal( 0, jLoc, F(1) );\n    } \n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nLotkin( BlockDistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Lotkin\"))\n    Hilbert( A, n );\n    // Set first row to all ones\n    if( A.ColShift() == 0 )\n    {\n        const Int localWidth = A.LocalWidth();\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            A.SetLocal( 0, jLoc, F(1) );\n    } \n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_LOTKIN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/MinIJ.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MINIJ_HPP\n#define ELEM_MINIJ_HPP\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nMinIJ( Matrix<T>& M, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MinIJ\"))\n    M.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<n; ++i )\n            M.Set( i, j, std::min(i+1,j+1) );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMinIJ( DistMatrix<T,U,V>& M, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MinIJ\"))\n    M.Resize( n, n );\n    const Int localHeight = M.LocalHeight();\n    const Int localWidth = M.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = M.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = M.GlobalRow(iLoc);\n            M.SetLocal( iLoc, jLoc, std::min(i+1,j+1) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMinIJ( BlockDistMatrix<T,U,V>& M, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MinIJ\"))\n    M.Resize( n, n );\n    const Int localHeight = M.LocalHeight();\n    const Int localWidth = M.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = M.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = M.GlobalRow(iLoc);\n            M.SetLocal( iLoc, jLoc, std::min(i+1,j+1) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_MINIJ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/NormalFromEVD.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORMALFROMEVD_HPP\n#define ELEM_NORMALFROMEVD_HPP\n\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_GEMM_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// A :=  Z Omega Z^T, where Omega is complex-valued and diagonal\n\ntemplate<typename Real>\ninline void\nNormalFromEVD\n(       Matrix<Complex<Real>>& A,\n  const Matrix<Complex<Real>>& w,\n  const Matrix<Complex<Real>>& Z )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"NormalFromEVD\"))\n    typedef Complex<Real> C;\n\n    Matrix<C> Y1, Z1Copy;\n\n    const Int m = Z.Height();\n    const Int n = Z.Width();\n    Zeros( A, m, m );\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto Z1 = LockedView( Z, 0, k, m,  nb );\n        auto w1 = LockedView( w, k, 0, nb, 1  );\n\n        Y1 = Z1Copy = Z1;\n        DiagonalScale( RIGHT, ADJOINT, w1, Y1 );\n        Gemm( NORMAL, NORMAL, C(1), Z1Copy, Y1, C(1), A );\n    }\n}\n\ntemplate<typename Real>\ninline void\nNormalFromEVD\n(       DistMatrix<Complex<Real>>& A,\n  const DistMatrix<Complex<Real>,VR,STAR>& w,\n  const DistMatrix<Complex<Real>>& Z )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"NormalFromEVD\"))\n    typedef Complex<Real> C;\n    const Grid& g = A.Grid();\n    DistMatrix<C,MC,  STAR> Z1_MC_STAR(g);\n    DistMatrix<C,VR,  STAR> Z1_VR_STAR(g);\n    DistMatrix<C,STAR,MR  > Z1Adj_STAR_MR(g);\n    DistMatrix<C,STAR,STAR> w1_STAR_STAR(g);\n\n    const Int m = Z.Height();\n    const Int n = Z.Width();\n    Zeros( A, m, m );\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto Z1 = LockedView( Z, 0, k, m,  nb );\n        auto w1 = LockedView( w, k, 0, nb, 1  );\n\n        Z1_MC_STAR.AlignWith( A );\n        Z1_MC_STAR = Z1;\n        Z1_VR_STAR.AlignWith( A );\n        Z1_VR_STAR = Z1_MC_STAR;\n        w1_STAR_STAR = w1;\n\n        DiagonalScale( RIGHT, ADJOINT, w1_STAR_STAR, Z1_VR_STAR );\n\n        Z1Adj_STAR_MR.AlignWith( A );\n        Z1_VR_STAR.AdjointPartialColAllGather( Z1Adj_STAR_MR );\n        LocalGemm( NORMAL, NORMAL, C(1), Z1_MC_STAR, Z1Adj_STAR_MR, C(1), A );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORMALFROMEVD_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/NormalUniformSpectrum.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_NORMALUNIFORMSPECTRUM_HPP\n#define ELEM_NORMALUNIFORMSPECTRUM_HPP\n\n#include ELEM_DIAGONAL_INC\n#include ELEM_HAAR_INC\n#include ELEM_UNIFORM_INC\n\nnamespace elem {\n\n// Draw the spectrum from the specified half-open interval on the real line,\n// then rotate with a Haar matrix\n\ntemplate<typename Real>\ninline void\nMakeNormalUniformSpectrum\n( Matrix<Complex<Real>>& A, Complex<Real> center=0, Real radius=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeNormalUniformSpectrum\"))\n    typedef Complex<Real> C;\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make a non-square matrix normal\");\n\n    // Form d and D\n    const Int n = A.Height();\n    std::vector<C> d( n );\n    for( Int j=0; j<n; ++j )\n        d[j] = SampleBall<C>( center, radius );\n    Diagonal( A, d );\n\n    // Apply a Haar matrix from both sides\n    Matrix<C> Q, t;\n    Matrix<Real> s;\n    ImplicitHaar( Q, t, s, n );\n    qr::ApplyQ( LEFT, NORMAL, Q, t, s, A );\n    qr::ApplyQ( RIGHT, ADJOINT, Q, t, s, A );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nMakeNormalUniformSpectrum\n( DistMatrix<Complex<Real>,U,V>& A, Complex<Real> center=0, Real radius=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeNormalUniformSpectrum\"))\n    typedef Complex<Real> C;\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make a non-square matrix normal\");\n    const Grid& grid = A.Grid();\n    const bool standardDist = ( U == MC && V == MR );\n\n    // Form d and D\n    const Int n = A.Height();\n    std::vector<C> d( n );\n    if( grid.Rank() == 0 )\n        for( Int j=0; j<n; ++j )\n            d[j] = SampleBall<C>( center, radius );\n    mpi::Broadcast( d.data(), n, 0, grid.Comm() );\n    DistMatrix<C> ABackup( grid );\n    if( standardDist )\n        Diagonal( A, d );\n    else\n    {\n        ABackup.AlignWith( A );\n        Diagonal( ABackup, d );\n    }\n\n    // Apply a Haar matrix from both sides\n    DistMatrix<C> Q(grid);\n    DistMatrix<C,MD,STAR> t(grid);\n    DistMatrix<Real,MD,STAR> s(grid);\n    ImplicitHaar( Q, t, s, n );\n\n    // Copy the result into the correct distribution\n    if( standardDist )\n    {\n        qr::ApplyQ( LEFT, NORMAL, Q, t, s, A );\n        qr::ApplyQ( RIGHT, ADJOINT, Q, t, s, A );\n    }\n    else\n    {\n        qr::ApplyQ( LEFT, NORMAL, Q, t, s, ABackup );\n        qr::ApplyQ( RIGHT, ADJOINT, Q, t, s, ABackup );\n        A = ABackup;\n    }\n}\n\ntemplate<typename Real>\ninline void\nNormalUniformSpectrum\n( Matrix<Complex<Real>>& A, Int n, Complex<Real> center=0, Real radius=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"NormalUniformSpectrum\"))\n    A.Resize( n, n );\n    MakeNormalUniformSpectrum( A, center, radius );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nNormalUniformSpectrum\n( DistMatrix<Complex<Real>,U,V>& A, Int n, \n  Complex<Real> center=0, Real radius=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"NormalUniformSpectrum\"))\n    A.Resize( n, n );\n    MakeNormalUniformSpectrum( A, center, radius );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_NORMALUNIFORMSPECTRUM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/OneTwoOne.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_ONETWOONE_HPP\n#define ELEM_ONETWOONE_HPP\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nMakeOneTwoOne( Matrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeOneTwoOne\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make a non-square matrix 1-2-1\");\n    MakeZeros( A );\n\n    const Int n = A.Width();\n    for( Int j=0; j<n; ++j )\n    {\n        A.Set( j, j, T(2) );\n        if( j < n-1 )\n        {\n            A.Set( j+1, j, T(1) );\n            A.Set( j, j+1, T(1) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeOneTwoOne( DistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeOneTwoOne\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make a non-square matrix 1-2-1\");\n    MakeZeros( A );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            if( i == j )\n                A.SetLocal( iLoc, jLoc, T(2) );\n            else if( i == j-1 || i == j+1 )\n                A.SetLocal( iLoc, jLoc, T(1) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeOneTwoOne( BlockDistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeOneTwoOne\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Cannot make a non-square matrix 1-2-1\");\n    MakeZeros( A );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            if( i == j )\n                A.SetLocal( iLoc, jLoc, T(2) );\n            else if( i == j-1 || i == j+1 )\n                A.SetLocal( iLoc, jLoc, T(1) );\n        }\n    }\n}\n\ntemplate<typename T> \ninline void\nOneTwoOne( Matrix<T>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"OneTwoOne\"))\n    A.Resize( n, n );\n    MakeOneTwoOne( A );\n}\n\ntemplate<typename T,Dist U,Dist V> \ninline void\nOneTwoOne( DistMatrix<T,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"OneTwoOne\"))\n    A.Resize( n, n );\n    MakeOneTwoOne( A );\n}\n\ntemplate<typename T,Dist U,Dist V> \ninline void\nOneTwoOne( BlockDistMatrix<T,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"OneTwoOne\"))\n    A.Resize( n, n );\n    MakeOneTwoOne( A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_ONETWOONE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Ones.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_ONES_HPP\n#define ELEM_ONES_HPP\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nMakeOnes( Matrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeOnes\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            A.Set( i, j, T(1) );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeOnes( DistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeOnes\"))\n    MakeOnes( A.Matrix() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeOnes( BlockDistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeOnes\"))\n    MakeOnes( A.Matrix() );\n}\n\ntemplate<typename T>\ninline void\nOnes( Matrix<T>& A, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Ones\"))\n    A.Resize( m, n );\n    MakeOnes( A );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nOnes( DistMatrix<T,U,V>& A, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Ones\"))\n    A.Resize( m, n );\n    MakeOnes( A );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nOnes( BlockDistMatrix<T,U,V>& A, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Ones\"))\n    A.Resize( m, n );\n    MakeOnes( A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_ONES_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Parter.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PARTER_HPP\n#define ELEM_PARTER_HPP\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nParter( Matrix<F>& P, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Parter\"))\n    const F oneHalf = F(1)/F(2);\n    P.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<n; ++i )\n            P.Set( i, j, F(1)/(F(i)-F(j)+oneHalf) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nParter( DistMatrix<F,U,V>& P, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Parter\"))\n    const F oneHalf = F(1)/F(2);\n    P.Resize( n, n );\n    const Int localHeight = P.LocalHeight();\n    const Int localWidth = P.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = P.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = P.GlobalRow(iLoc);\n            P.SetLocal( iLoc, jLoc, F(1)/(F(i)-F(j)+oneHalf) );\n        }\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nParter( BlockDistMatrix<F,U,V>& P, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Parter\"))\n    const F oneHalf = F(1)/F(2);\n    P.Resize( n, n );\n    const Int localHeight = P.LocalHeight();\n    const Int localWidth = P.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = P.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = P.GlobalRow(iLoc);\n            P.SetLocal( iLoc, jLoc, F(1)/(F(i)-F(j)+oneHalf) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_PARTER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Pei.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_PEI_HPP\n#define ELEM_PEI_HPP\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nPei( Matrix<T>& P, Int n, T alpha )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pei\"))\n    P.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<n; ++i )\n            P.Set( i, j, T(1) );\n    for( Int j=0; j<n; ++j )\n        P.Update( j, j, alpha );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nPei( DistMatrix<T,U,V>& P, Int n, T alpha )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pei\"))\n    P.Resize( n, n );\n    const Int localHeight = P.LocalHeight();\n    const Int localWidth = P.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = P.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = P.GlobalRow(iLoc);\n            P.SetLocal( iLoc, jLoc, T(1) );\n            if( i == j )\n                P.UpdateLocal( iLoc, jLoc, alpha );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nPei( BlockDistMatrix<T,U,V>& P, Int n, T alpha )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Pei\"))\n    P.Resize( n, n );\n    const Int localHeight = P.LocalHeight();\n    const Int localWidth = P.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = P.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = P.GlobalRow(iLoc);\n            P.SetLocal( iLoc, jLoc, T(1) );\n            if( i == j )\n                P.UpdateLocal( iLoc, jLoc, alpha );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_PEI_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Redheffer.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_REDHEFFER_HPP\n#define ELEM_REDHEFFER_HPP\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nRedheffer( Matrix<T>& R, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Redheffer\"))\n    R.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<n; ++i )\n        {\n            if( j==0 || ((j+1)%(i+1))==0 )\n                R.Set( i, j, T(1) );\n            else\n                R.Set( i, j, T(0) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRedheffer( DistMatrix<T,U,V>& R, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Redheffer\"))\n    R.Resize( n, n );\n    const Int localHeight = R.LocalHeight();\n    const Int localWidth = R.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = R.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = R.GlobalRow(iLoc);\n            if( j==0 || ((j+1)%(i+1))==0 )\n                R.SetLocal( iLoc, jLoc, T(1) );\n            else\n                R.SetLocal( iLoc, jLoc, T(0) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRedheffer( BlockDistMatrix<T,U,V>& R, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Redheffer\"))\n    R.Resize( n, n );\n    const Int localHeight = R.LocalHeight();\n    const Int localWidth = R.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = R.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = R.GlobalRow(iLoc);\n            if( j==0 || ((j+1)%(i+1))==0 )\n                R.SetLocal( iLoc, jLoc, T(1) );\n            else\n                R.SetLocal( iLoc, jLoc, T(0) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_REDHEFFER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Riemann.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_RIEMANN_HPP\n#define ELEM_RIEMANN_HPP\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nRiemann( Matrix<T>& R, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Riemann\"))\n    R.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n    {\n        for( Int i=0; i<n; ++i )\n        {\n            if( ((j+2)%(i+2))==0 )\n                R.Set( i, j, T(i+1) );\n            else\n                R.Set( i, j, T(-1) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRiemann( DistMatrix<T,U,V>& R, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Riemann\"))\n    R.Resize( n, n );\n    const Int localHeight = R.LocalHeight();\n    const Int localWidth = R.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = R.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = R.GlobalRow(iLoc);\n            if( ((j+2)%(i+2))==0 )\n                R.SetLocal( iLoc, jLoc, T(i+1) );\n            else\n                R.SetLocal( iLoc, jLoc, T(-1) );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nRiemann( BlockDistMatrix<T,U,V>& R, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Riemann\"))\n    R.Resize( n, n );\n    const Int localHeight = R.LocalHeight();\n    const Int localWidth = R.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = R.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = R.GlobalRow(iLoc);\n            if( ((j+2)%(i+2))==0 )\n                R.SetLocal( iLoc, jLoc, T(i+1) );\n            else\n                R.SetLocal( iLoc, jLoc, T(-1) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_RIEMANN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Ris.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_RIS_HPP\n#define ELEM_RIS_HPP\n\nnamespace elem {\n\ntemplate<typename F> \ninline void\nRis( Matrix<F>& R, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Ris\"))\n    const F oneHalf = F(1)/F(2);\n    R.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<n; ++i )\n            R.Set( i, j, oneHalf/(F(n-i-j)-oneHalf) );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nRis( DistMatrix<F,U,V>& R, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Ris\"))\n    const F oneHalf = F(1)/F(2);\n    R.Resize( n, n );\n    const Int localHeight = R.LocalHeight();\n    const Int localWidth = R.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = R.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = R.GlobalRow(iLoc);\n            R.SetLocal( iLoc, jLoc, oneHalf/(F(n-i-j)-oneHalf) );\n        }\n    }\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nRis( BlockDistMatrix<F,U,V>& R, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Ris\"))\n    const F oneHalf = F(1)/F(2);\n    R.Resize( n, n );\n    const Int localHeight = R.LocalHeight();\n    const Int localWidth = R.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = R.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = R.GlobalRow(iLoc);\n            R.SetLocal( iLoc, jLoc, oneHalf/(F(n-i-j)-oneHalf) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_RIS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Toeplitz.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TOEPLITZ_HPP\n#define ELEM_TOEPLITZ_HPP\n\nnamespace elem {\n\ntemplate<typename S,typename T> \ninline void\nToeplitz( Matrix<S>& A, Int m, Int n, const std::vector<T>& a )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Toeplitz\"))\n    const Int length = m+n-1;\n    if( a.size() != Unsigned(length) )\n        LogicError(\"a was the wrong size\");\n    A.Resize( m, n );\n\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            A.Set( i, j, a[i-j+(n-1)] );\n}\n\ntemplate<typename S,typename T,Dist U,Dist V>\ninline void\nToeplitz( DistMatrix<S,U,V>& A, Int m, Int n, const std::vector<T>& a )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Toeplitz\"))\n    const Int length = m+n-1;\n    if( a.size() != Unsigned(length) )\n        LogicError(\"a was the wrong size\");\n    A.Resize( m, n );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            A.SetLocal( iLoc, jLoc, a[i-j+(n-1)] );\n        }\n    }\n}\n\ntemplate<typename S,typename T,Dist U,Dist V>\ninline void\nToeplitz( BlockDistMatrix<S,U,V>& A, Int m, Int n, const std::vector<T>& a )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Toeplitz\"))\n    const Int length = m+n-1;\n    if( a.size() != Unsigned(length) )\n        LogicError(\"a was the wrong size\");\n    A.Resize( m, n );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            A.SetLocal( iLoc, jLoc, a[i-j+(n-1)] );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TOEPLITZ_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Trefethen.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TREFETHEN_HPP\n#define ELEM_TREFETHEN_HPP\n\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// The symbol of the matrix described at the beginning of Chapter II of \n// Lloyd N. Trefethen and Mark Embree's \"Spectra and Pseudospectra\" is\n//     f(z) = 2 z^{-3} - z^{-2} + 2i z^{-1} - 4 z^2 - 2i z^3.\n// For lack of a better name, we will refer to such a Toeplitz matrix as a \n// Trefethen matrix.\n\ntemplate<typename Real> \ninline void\nTrefethen( Matrix<Complex<Real>>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trefethen\"))\n    if( n < 4 )\n        LogicError(\"Must be at least 4x4 to have a third-order symbol\");\n    typedef Complex<Real> C;\n    Zeros( A, n, n );\n    SetDiagonal( A,  2,       3 );\n    SetDiagonal( A, -1,       2 );\n    SetDiagonal( A, C(0,2),   1 );\n    SetDiagonal( A, -4,      -2 );\n    SetDiagonal( A, C(0,-2), -3 );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nTrefethen( DistMatrix<Complex<Real>,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trefethen\"))\n    if( n < 4 )\n        LogicError(\"Must be at least 4x4 to have a third-order symbol\");\n    typedef Complex<Real> C;\n    Zeros( A, n, n );\n    SetDiagonal( A,  2,       3 );\n    SetDiagonal( A, -1,       2 );\n    SetDiagonal( A, C(0,2),   1 );\n    SetDiagonal( A, -4,      -2 );\n    SetDiagonal( A, C(0,-2), -3 );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nTrefethen( BlockDistMatrix<Complex<Real>,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trefethen\"))\n    if( n < 4 )\n        LogicError(\"Must be at least 4x4 to have a third-order symbol\");\n    typedef Complex<Real> C;\n    Zeros( A, n, n );\n    SetDiagonal( A,  2,       3 );\n    SetDiagonal( A, -1,       2 );\n    SetDiagonal( A, C(0,2),   1 );\n    SetDiagonal( A, -4,      -2 );\n    SetDiagonal( A, C(0,-2), -3 );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TREFETHEN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/TriW.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRIW_HPP\n#define ELEM_TRIW_HPP\n\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nTriW( Matrix<T>& A, Int m, Int n, T alpha, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriW\"))\n    if( k < 0 )\n        LogicError(\"Number of superdiagonals must be non-negative\");\n    Zeros( A, n, n );\n    SetDiagonal( A, 1 );\n    for( Int j=0; j<Min(n-1,k); ++j ) \n        SetDiagonal( A, alpha, j+1 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nTriW( DistMatrix<T,U,V>& A, Int m, Int n, T alpha, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriW\"))\n    if( k < 0 )\n        LogicError(\"Number of superdiagonals must be non-negative\");\n    Zeros( A, n, n );\n    SetDiagonal( A, 1 );\n    for( Int j=0; j<Min(n-1,k); ++j )\n        SetDiagonal( A, alpha, j+1 );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nTriW( BlockDistMatrix<T,U,V>& A, Int m, Int n, T alpha, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"TriW\"))\n    if( k < 0 )\n        LogicError(\"Number of superdiagonals must be non-negative\");\n    Zeros( A, n, n );\n    SetDiagonal( A, 1 );\n    for( Int j=0; j<Min(n-1,k); ++j )\n        SetDiagonal( A, alpha, j+1 );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRIW_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Triangle.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_TRIANGLE_HPP\n#define ELEM_TRIANGLE_HPP\n\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// The \"triangle matrix\" is defined to have the symbol:\n//   f(z) = z^{-1} + 1/4 z^2.\n// Please see \n//   L. Reichel and L. N. Trefethen, \"Eigenvalues and pseudo-eigenvalues of \n//   \"Toeplitz matrices\", Linear Algebra Appl., 1992.\n\ntemplate<typename F> \ninline void\nTriangle( Matrix<F>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Triangle\"))\n    if( n < 3 )\n        LogicError(\"Must be at least 3x3 to have a second-order symbol\");\n    Zeros( A, n, n );\n    SetDiagonal( A, 1,          1 );\n    SetDiagonal( A, F(1)/F(4), -2 );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nTriangle( DistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Triangle\"))\n    if( n < 3 )\n        LogicError(\"Must be at least 3x3 to have a second-order symbol\");\n    Zeros( A, n, n );\n    SetDiagonal( A, 1,          1 );\n    SetDiagonal( A, F(1)/F(4), -2 );\n}\n\ntemplate<typename F,Dist U,Dist V>\ninline void\nTriangle( BlockDistMatrix<F,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Triangle\"))\n    if( n < 3 )\n        LogicError(\"Must be at least 3x3 to have a second-order symbol\");\n    Zeros( A, n, n );\n    SetDiagonal( A, 1,          1 );\n    SetDiagonal( A, F(1)/F(4), -2 );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRIANGLE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Uniform.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_UNIFORM_HPP\n#define ELEM_UNIFORM_HPP\n\nnamespace elem {\n\n// Draw each entry from a uniform PDF over a closed ball.\ntemplate<typename T>\ninline void\nMakeUniform( Matrix<T>& A, T center=0, Base<T> radius=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeUniform\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            A.Set( i, j, SampleBall( center, radius ) );\n}\n\ntemplate<typename T>\ninline void\nUniform( Matrix<T>& A, Int m, Int n, T center=0, Base<T> radius=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Uniform\"))\n    A.Resize( m, n );\n    MakeUniform( A, center, radius );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeUniform( DistMatrix<T,U,V>& A, T center=0, Base<T> radius=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeUniform\"))\n    if( A.RedundantSize() == 1 )\n    {\n        MakeUniform( A.Matrix(), center, radius );\n    }\n    else if( A.Participating() && A.LocalHeight() == A.LDim() )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        if( A.RedundantRank() == 0 )\n            MakeUniform( A.Matrix(), center, radius );\n        mpi::Broadcast\n        ( A.Buffer(), localHeight*localWidth, 0, A.RedundantComm() );\n    }\n    else if( A.Participating() )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        const Int bufSize = localHeight*localWidth;   \n        std::vector<T> buffer( bufSize );\n        if( A.RedundantRank() == 0 )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    buffer[iLoc+jLoc*localHeight] = \n                        SampleBall( center, radius );\n        }\n        mpi::Broadcast( buffer.data(), bufSize, 0, A.RedundantComm() );\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            MemCopy\n            ( A.Buffer(0,jLoc), &buffer[jLoc*localHeight], localHeight );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeUniform( BlockDistMatrix<T,U,V>& A, T center=0, Base<T> radius=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeUniform\"))\n    if( A.RedundantSize() == 1 )\n    {\n        MakeUniform( A.Matrix(), center, radius );\n    }\n    else if( A.Participating() && A.LocalHeight() == A.LDim() )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        if( A.RedundantRank() == 0 )\n            MakeUniform( A.Matrix(), center, radius );\n        mpi::Broadcast\n        ( A.Buffer(), localHeight*localWidth, 0, A.RedundantComm() );\n    }\n    else if( A.Participating() )\n    {\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        const Int bufSize = localHeight*localWidth;   \n        std::vector<T> buffer( bufSize );\n        if( A.RedundantRank() == 0 )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    buffer[iLoc+jLoc*localHeight] = \n                        SampleBall( center, radius );\n        }\n        mpi::Broadcast( buffer.data(), bufSize, 0, A.RedundantComm() );\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            MemCopy\n            ( A.Buffer(0,jLoc), &buffer[jLoc*localHeight], localHeight );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nUniform( DistMatrix<T,U,V>& A, Int m, Int n, T center=0, Base<T> radius=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Uniform\"))\n    A.Resize( m, n );\n    MakeUniform( A, center, radius );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nUniform( BlockDistMatrix<T,U,V>& A, Int m, Int n, T center=0, Base<T> radius=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Uniform\"))\n    A.Resize( m, n );\n    MakeUniform( A, center, radius );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_UNIFORM_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/UniformHelmholtzGreens.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_UNIFORMHELMHOLTZGREENS_HPP\n#define ELEM_UNIFORMHELMHOLTZGREENS_HPP\n\nnamespace elem {\n\n// Generate the \"random Green's matrix\" from \n//   A. Goetschy and S. E. Skipetrov's \"Non-Hermitian Euclidean random matrix\n//   theory\".\n// It is essentially the 3D Helmholtz Green's function with source and target\n// points chosen uniformly from the unit ball. The behaviour of the spectrum\n// should change dramatically dependinging upon the number of points per \n// wavelength-cubed.\n\ntemplate<typename Real>\ninline void\nUniformHelmholtzGreens( Matrix<Complex<Real>>& A, Int n, Real lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"UniformHelmholtzGreens\"))\n    typedef Complex<Real> C;\n    const Real pi = 4*Atan( Real(1) );\n    const Real k0 = 2*pi/lambda;\n\n    // Generate a list of n uniform samples from the 3D unit ball\n    Matrix<Real> X(3,n);\n    for( Int j=0; j<n; ++j )\n    {\n        Real x0, x1, x2;\n        // Sample uniformly from [-1,+1]^3 until a point is drawn from the ball\n        while( true )\n        {\n            x0 = SampleUniform( Real(-1), Real(1) ); \n            x1 = SampleUniform( Real(-1), Real(1) );\n            x2 = SampleUniform( Real(-1), Real(1) );\n            const Real radiusSq = x0*x0 + x1*x1 + x2*x2;\n            if( radiusSq > 0 && radiusSq <= 1 )\n                break;\n        }\n        X.Set( 0, j, x0 );\n        X.Set( 1, j, x1 );\n        X.Set( 2, j, x2 );\n    }\n    \n    A.Resize( n, n );\n    for( Int j=0; j<n; ++j )\n    {\n        const Real xj0 = X.Get(0,j);\n        const Real xj1 = X.Get(1,j);\n        const Real xj2 = X.Get(2,j);\n        for( Int i=0; i<n; ++i )\n        {\n            if( i == j ) \n            {\n                A.Set( i, j, 0 );\n            }\n            else\n            {\n                const Real d0 = X.Get(0,i)-xj0;\n                const Real d1 = X.Get(1,i)-xj1;\n                const Real d2 = X.Get(2,i)-xj2;\n                const Real gamma = k0*Sqrt(d0*d0+d1*d1+d2*d2);\n                const Real realPart = Cos(gamma)/gamma;\n                const Real imagPart = Sin(gamma)/gamma;\n                A.Set( i, j, C(realPart,imagPart) );\n            }\n        }\n    }\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nUniformHelmholtzGreens( DistMatrix<Complex<Real>,U,V>& A, Int n, Real lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"UniformHelmholtzGreens\"))\n    typedef Complex<Real> C;\n    const Real pi = 4*Atan( Real(1) );\n    const Real k0 = 2*pi/lambda;\n    const Grid& g = A.Grid();\n\n    // Generate a list of n uniform samples from the 3D unit ball\n    DistMatrix<Real,STAR,VR> X_STAR_VR(3,n,g);\n    for( Int jLoc=0; jLoc<X_STAR_VR.LocalWidth(); ++jLoc )\n    {\n        Real x0, x1, x2;\n        // Sample uniformly from [-1,+1]^3 until a point is drawn from the ball\n        while( true )\n        {\n            x0 = SampleUniform( Real(-1), Real(1) );\n            x1 = SampleUniform( Real(-1), Real(1) );\n            x2 = SampleUniform( Real(-1), Real(1) );\n            const Real radiusSq = x0*x0 + x1*x1 + x2*x2;\n            if( radiusSq > 0 && radiusSq <= 1 )\n                break;\n        }\n        X_STAR_VR.SetLocal( 0, jLoc, x0 );\n        X_STAR_VR.SetLocal( 1, jLoc, x1 );\n        X_STAR_VR.SetLocal( 2, jLoc, x2 );\n    }\n    DistMatrix<Real,STAR,STAR> X_STAR_STAR( X_STAR_VR );\n\n    A.Resize( n, n );\n    for( Int jLoc=0; jLoc<A.LocalWidth(); ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        const Real xj0 = X_STAR_STAR.GetLocal(0,j);\n        const Real xj1 = X_STAR_STAR.GetLocal(1,j);\n        const Real xj2 = X_STAR_STAR.GetLocal(2,j);\n        for( Int iLoc=0; iLoc<A.LocalHeight(); ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            if( i == j )\n            {\n                A.SetLocal( iLoc, jLoc, 0 );\n            }\n            else\n            {\n                const Real d0 = X_STAR_STAR.GetLocal(0,i)-xj0;\n                const Real d1 = X_STAR_STAR.GetLocal(1,i)-xj1;\n                const Real d2 = X_STAR_STAR.GetLocal(2,i)-xj2;\n                const Real gamma = k0*Sqrt(d0*d0+d1*d1+d2*d2);\n                const Real realPart = Cos(gamma)/gamma;\n                const Real imagPart = Sin(gamma)/gamma;\n                A.SetLocal( iLoc, jLoc, C(realPart,imagPart) );\n            }\n        }\n    }\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nUniformHelmholtzGreens\n( BlockDistMatrix<Complex<Real>,U,V>& A, Int n, Real lambda )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"UniformHelmholtzGreens\"))\n    typedef Complex<Real> C;\n    const Real pi = 4*Atan( Real(1) );\n    const Real k0 = 2*pi/lambda;\n    const Grid& g = A.Grid();\n\n    // Generate a list of n uniform samples from the 3D unit ball\n    DistMatrix<Real,STAR,VR> X_STAR_VR(3,n,g);\n    for( Int jLoc=0; jLoc<X_STAR_VR.LocalWidth(); ++jLoc )\n    {\n        Real x0, x1, x2;\n        // Sample uniformly from [-1,+1]^3 until a point is drawn from the ball\n        while( true )\n        {\n            x0 = SampleUniform( Real(-1), Real(1) );\n            x1 = SampleUniform( Real(-1), Real(1) );\n            x2 = SampleUniform( Real(-1), Real(1) );\n            const Real radiusSq = x0*x0 + x1*x1 + x2*x2;\n            if( radiusSq > 0 && radiusSq <= 1 )\n                break;\n        }\n        X_STAR_VR.SetLocal( 0, jLoc, x0 );\n        X_STAR_VR.SetLocal( 1, jLoc, x1 );\n        X_STAR_VR.SetLocal( 2, jLoc, x2 );\n    }\n    DistMatrix<Real,STAR,STAR> X_STAR_STAR( X_STAR_VR );\n\n    A.Resize( n, n );\n    for( Int jLoc=0; jLoc<A.LocalWidth(); ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        const Real xj0 = X_STAR_STAR.GetLocal(0,j);\n        const Real xj1 = X_STAR_STAR.GetLocal(1,j);\n        const Real xj2 = X_STAR_STAR.GetLocal(2,j);\n        for( Int iLoc=0; iLoc<A.LocalHeight(); ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            if( i == j )\n            {\n                A.SetLocal( iLoc, jLoc, 0 );\n            }\n            else\n            {\n                const Real d0 = X_STAR_STAR.GetLocal(0,i)-xj0;\n                const Real d1 = X_STAR_STAR.GetLocal(1,i)-xj1;\n                const Real d2 = X_STAR_STAR.GetLocal(2,i)-xj2;\n                const Real gamma = k0*Sqrt(d0*d0+d1*d1+d2*d2);\n                const Real realPart = Cos(gamma)/gamma;\n                const Real imagPart = Sin(gamma)/gamma;\n                A.SetLocal( iLoc, jLoc, C(realPart,imagPart) );\n            }\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_UNIFORMHELMHOLTZGREENS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Walsh.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WALSH_HPP\n#define ELEM_WALSH_HPP\n\nnamespace elem {\n\n// TODO: Get rid of MakeWalsh routine? It doesn't seem useful.\n\ntemplate<typename T> \ninline void\nMakeWalsh( Matrix<T>& A, Int k, bool binary=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeWalsh\"))\n    if( k < 1 )\n        LogicError(\"Walsh matrices are only defined for k>=1\");\n\n    const Unsigned n = 1u<<k;\n    if( A.Height() != Int(n) || A.Width() != Int(n) )\n        LogicError(\"Invalid input matrix size\");\n\n    // Run a simple O(n^2 log n) algorithm for computing the entries\n    // based upon successive sign flips\n    const T onValue = 1;\n    const T offValue = ( binary ? 0 : -1 );\n    for( Unsigned j=0; j<n; ++j )\n    {\n        for( Unsigned i=0; i<n; ++i )\n        {\n            // Recurse on the quadtree, flipping the sign of the entry each\n            // time we are in the bottom-right quadrant\n            Unsigned r = i;     \n            Unsigned s = j;\n            Unsigned t = n;\n            bool on = true;\n            while( t != 1u )\n            {\n                t >>= 1;\n                if( r >= t && s >= t )\n                    on = !on;\n                r %= t;\n                s %= t;\n            }\n\n            if( on )\n                A.Set( i, j, onValue );\n            else\n                A.Set( i, j, offValue );\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeWalsh( DistMatrix<T,U,V>& A, Int k, bool binary=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeWalsh\"))\n    if( k < 1 )\n        LogicError(\"Walsh matrices are only defined for k>=1\");\n\n    const Unsigned n = 1u<<k;\n    if( A.Height() != Int(n) || A.Width() != Int(n) )\n        LogicError(\"Invalid input matrix size\");\n\n    // Run an O(n^2 log n / p) algorithm based upon successive sign flips\n    const T onValue = 1;\n    const T offValue = ( binary ? 0 : -1 );\n    const Unsigned localHeight = A.LocalHeight();\n    const Unsigned localWidth = A.LocalWidth();\n    for( Unsigned jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Unsigned j = A.GlobalCol(jLoc);\n        for( Unsigned iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Unsigned i = A.GlobalRow(iLoc);\n\n            // Recurse on the quadtree, flipping the sign of the entry each\n            // time we are in the bottom-right quadrant\n            Unsigned r = i;     \n            Unsigned s = j;\n            Unsigned t = n;\n            bool on = true;\n            while( t != 1u )\n            {\n                t >>= 1;\n                if( r >= t && s >= t )\n                    on = !on;\n                r %= t;\n                s %= t;\n            }\n            if( on )\n                A.SetLocal( iLoc, jLoc, onValue );\n            else\n                A.SetLocal( iLoc, jLoc, offValue );\n        }\n    }\n}\n\ntemplate<typename T> \ninline void\nWalsh( Matrix<T>& A, Int k, bool binary=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Walsh\"))\n    if( k < 1 )\n        LogicError(\"Walsh matrices are only defined for k>=1\");\n    const Unsigned n = 1u<<k;\n    A.Resize( n, n );\n    MakeWalsh( A, k, binary );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nWalsh( DistMatrix<T,U,V>& A, Int k, bool binary=false )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Walsh\"))\n    if( k < 1 )\n        LogicError(\"Walsh matrices are only defined for k>=1\");\n    const Unsigned n = 1u<<k;\n    A.Resize( n, n );\n    MakeWalsh( A, k, binary );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_WALSH_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Whale.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WHALE_HPP\n#define ELEM_WHALE_HPP\n\n#include ELEM_SETDIAGONAL_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// The \"whale matrix\" is defined to have the symbol:\n//   f(z) = -z^{-4} - (3+2i) z^{-3} + i z^{-2} + z^{-1} + 10 z + (3+i) z^2 +\n//           4 z^3 + i z^4\n// Please see \n//   A. Bottcher, \"Infinite matrices and projection methods\", 1996.\n\ntemplate<typename Real> \ninline void\nWhale( Matrix<Complex<Real>>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Whale\"))\n    if( n < 5 )\n        LogicError(\"Must be at least 5x5 to have a fourth-order symbol\");\n    typedef Complex<Real> C;\n    Zeros( A, n, n );\n    SetDiagonal( A, -1,        4 );\n    SetDiagonal( A, C(-3,-2),  3 );\n    SetDiagonal( A, C( 0, 1),  2 );\n    SetDiagonal( A,  1,        1 );\n    SetDiagonal( A, 10,       -1 );\n    SetDiagonal( A, C( 3, 1), -2 );\n    SetDiagonal( A,  4,       -3 );\n    SetDiagonal( A, C( 0, 1), -4 );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nWhale( DistMatrix<Complex<Real>,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Whale\"))\n    if( n < 5 )\n        LogicError(\"Must be at least 5x5 to have a fourth-order symbol\");\n    typedef Complex<Real> C;\n    Zeros( A, n, n );\n    SetDiagonal( A, -1,        4 );\n    SetDiagonal( A, C(-3,-2),  3 );\n    SetDiagonal( A, C( 0, 1),  2 );\n    SetDiagonal( A,  1,        1 );\n    SetDiagonal( A, 10,       -1 );\n    SetDiagonal( A, C( 3, 1), -2 );\n    SetDiagonal( A,  4,       -3 );\n    SetDiagonal( A, C( 0, 1), -4 );\n}\n\ntemplate<typename Real,Dist U,Dist V>\ninline void\nWhale( BlockDistMatrix<Complex<Real>,U,V>& A, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Whale\"))\n    if( n < 5 )\n        LogicError(\"Must be at least 5x5 to have a fourth-order symbol\");\n    typedef Complex<Real> C;\n    Zeros( A, n, n );\n    SetDiagonal( A, -1,        4 );\n    SetDiagonal( A, C(-3,-2),  3 );\n    SetDiagonal( A, C( 0, 1),  2 );\n    SetDiagonal( A,  1,        1 );\n    SetDiagonal( A, 10,       -1 );\n    SetDiagonal( A, C( 3, 1), -2 );\n    SetDiagonal( A,  4,       -3 );\n    SetDiagonal( A, C( 0, 1), -4 );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_WHALE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Wigner.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WIGNER_HPP\n#define ELEM_WIGNER_HPP\n\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_GAUSSIAN_INC\n\nnamespace elem {\n\ntemplate<typename T>\ninline void\nWigner( Matrix<T>& A, Int n, T mean=0, Base<T> stddev=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Wigner\"))\n    Gaussian( A, n, n, mean, stddev );\n    MakeHermitian( LOWER, A );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nWigner( DistMatrix<T,U,V>& A, Int n, T mean=0, Base<T> stddev=1 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Wigner\"))\n    Gaussian( A, n, n, mean, stddev );\n    MakeHermitian( LOWER, A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_WIGNER_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Wilkinson.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_WILKINSON_HPP\n#define ELEM_WILKINSON_HPP\n\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nWilkinson( Matrix<T>& A, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Wilkinson\"))\n    const Int n = 2*k+1;\n    A.Resize( n, n );\n    MakeZeros( A );\n\n    for( Int j=0; j<n; ++j )\n    {\n        if( j <= k )\n            A.Set( j, j, T(k-j) );\n        else\n            A.Set( j, j, T(j-k) );\n\n        if( j > 0 )\n            A.Set( j-1, j, T(1) );\n        if( j < n-1 )\n            A.Set( j+1, j, T(1) );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nWilkinson( DistMatrix<T,U,V>& A, Int k )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Wilkinson\"))\n    const Int n = 2*k+1;\n    A.Resize( n, n );\n    MakeZeros( A );\n\n    const Int localHeight = A.LocalHeight();\n    const Int localWidth = A.LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = A.GlobalCol(jLoc);\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n        {\n            const Int i = A.GlobalRow(iLoc);\n            if( i == j )\n            {\n                if( j <= k )\n                    A.SetLocal( iLoc, jLoc, T(k-j) );\n                else\n                    A.SetLocal( iLoc, jLoc, T(j-k) );\n            }\n            else if( i == j-1 || i == j+1 )\n                A.SetLocal( iLoc, jLoc, T(1) );\n        }\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_WILKINSON_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/Zeros.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_ZEROS_HPP\n#define ELEM_ZEROS_HPP\n\n#include ELEM_ZERO_INC\n\nnamespace elem {\n\ntemplate<typename T> \ninline void\nMakeZeros( Matrix<T>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeZeros\"))\n    Zero( A );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeZeros( DistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeZeros\"))\n    Zero( A.Matrix() );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nMakeZeros( BlockDistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeZeros\"))\n    Zero( A.Matrix() );\n}\n\ntemplate<typename T>\ninline void\nZeros( Matrix<T>& A, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Zeros\"))\n    A.Resize( m, n );\n    MakeZeros( A );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nZeros( DistMatrix<T,U,V>& A, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Zeros\"))\n    A.Resize( m, n );\n    MakeZeros( A );\n}\n\ntemplate<typename T,Dist U,Dist V>\ninline void\nZeros( BlockDistMatrix<T,U,V>& A, Int m, Int n )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Zeros\"))\n    A.Resize( m, n );\n    MakeZeros( A );\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_ZEROS_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/decl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MATRICES_DECL_HPP\n#define ELEM_MATRICES_DECL_HPP\n\n// Nothing for now\n\n#endif // ifndef ELEM_MATRICES_DECL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices/impl.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MATRICES_IMPL_HPP\n#define ELEM_MATRICES_IMPL_HPP\n\n// Deterministic matrices\n// ======================\n\n#include \"./BullsHead.hpp\"\n#include \"./Cauchy.hpp\"\n#include \"./CauchyLike.hpp\"\n#include \"./Circulant.hpp\"\n#include \"./Demmel.hpp\"\n#include \"./Diagonal.hpp\"\n#include \"./Egorov.hpp\"\n#include \"./ExtendedKahan.hpp\"\n#include \"./Fiedler.hpp\"\n#include \"./Forsythe.hpp\"\n#include \"./FoxLi.hpp\"\n#include \"./Fourier.hpp\"\n#include \"./GCDMatrix.hpp\"\n#include \"./Gear.hpp\"\n#include \"./GKS.hpp\"\n#include \"./Grcar.hpp\"\n#include \"./Hankel.hpp\"\n#include \"./Hanowa.hpp\"\n#include \"./HatanoNelson.hpp\"\n#include \"./Helmholtz.hpp\"\n#include \"./HelmholtzPML.hpp\"\n#include \"./HermitianFromEVD.hpp\"\n#include \"./Hilbert.hpp\"\n#include \"./Identity.hpp\"\n#include \"./Jordan.hpp\"\n#include \"./Kahan.hpp\"\n#include \"./KMS.hpp\"\n#include \"./Laplacian.hpp\"\n#include \"./Lauchli.hpp\"\n#include \"./Legendre.hpp\"\n#include \"./Lehmer.hpp\"\n#include \"./Lotkin.hpp\"\n#include \"./MinIJ.hpp\"\n#include \"./NormalFromEVD.hpp\"\n#include \"./Ones.hpp\"\n#include \"./OneTwoOne.hpp\"\n#include \"./Parter.hpp\"\n#include \"./Pei.hpp\"\n#include \"./Redheffer.hpp\"\n#include \"./Riemann.hpp\"\n#include \"./Ris.hpp\"\n#include \"./Toeplitz.hpp\"\n#include \"./Trefethen.hpp\"\n#include \"./Triangle.hpp\"\n#include \"./TriW.hpp\"\n#include \"./Walsh.hpp\"\n#include \"./Whale.hpp\"\n#include \"./Wilkinson.hpp\"\n#include \"./Zeros.hpp\"\n\n// Random matrices\n// ===============\n\n// Uniform\n#include \"./HermitianUniformSpectrum.hpp\"\n#include \"./NormalUniformSpectrum.hpp\"\n#include \"./Uniform.hpp\"\n#include \"./UniformHelmholtzGreens.hpp\"\n\n// Gaussian\n#include \"./Gaussian.hpp\"\n#include \"./Wigner.hpp\"\n#include \"./Haar.hpp\"\n\n#endif // ifndef ELEM_MATRICES_IMPL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental/matrices.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEM_MATRICES_HPP\n#define ELEM_MATRICES_HPP\n\n#include \"./matrices/decl.hpp\"\n#include \"./matrices/impl.hpp\"\n\n#endif // ifndef ELEM_MATRICES_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental-lite.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEMENTAL_LITE_HPP\n#define ELEMENTAL_LITE_HPP\n\n#include \"elemental/include-paths.hpp\"\n\n#include \"elemental/config.h\"\n#ifdef ELEM_HAVE_F90_INTERFACE\n# include \"elemental/FCMangle.h\"\n#endif\n\n#include \"elemental/core.hpp\"\n\n#include \"elemental/blas-like/decl.hpp\"\n#include \"elemental/lapack-like/decl.hpp\"\n#include \"elemental/convex/decl.hpp\"\n\n#include \"elemental/io.hpp\"\n\n#endif // ifndef ELEMENTAL_LITE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/include/elemental.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#pragma once\n#ifndef ELEMENTAL_HPP\n#define ELEMENTAL_HPP\n\n#include \"elemental-lite.hpp\"\n\n#include \"elemental/core.hpp\"\n#include \"elemental/blas-like.hpp\"\n#include \"elemental/lapack-like.hpp\"\n#include \"elemental/convex.hpp\"\n#include \"elemental/control.hpp\"\n#include \"elemental/matrices.hpp\"\n\n#endif // ifndef ELEMENTAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/octave/LUMod.m",
    "content": "function [A,p] = LUMod( A, p, u, v, tau )\n%\n% Copyright (c) 2009-2014, Jack Poulson\n% All rights reserved.\n%\n% This file is part of Elemental and is under the BSD 2-Clause License, \n% which can be found in the LICENSE file in the root directory, or at \n% http://opensource.org/licenses/BSD-2-Clause\n% \n% Begin with an LU factorization with partial pivoting, \n%     A = P^T L U,\n% and turn it into a partially-pivoted LU factorization of\n%     A + u v',\n% say\n%     (A + u v') = P^T L ( U + w v'),\n% w = inv(L) P u.\n%\n% Please see subsection 2.1 from \n%     Peter Stange, Andreas Griewank, and Matthias Bollhofer,\n%     \"On the efficient update of rectangular LU factorizations subject to\n%      low rank modifications\"\n% which discusses the technique of Schwetlick and Kielbasinski described in\n% \"Numerische Lineare Algebra\".\n%\n[m,n] = size(A);\nminDim = min(m,n);\nif minDim ~= m,\n  error('It is assumed that height(A) <= width(A)');\nend\n\n% w := inv(L) P u\nw=u(p);\nL=tril(A,-1)+diag(ones(minDim,1));\nw=L\\w;\n\n% Maintain an external vector for the temporary subdiagonal of U\nuSub=zeros(minDim-1,1);\n\n% Reduce w to a multiple of e0\nfor i=minDim-1:-1:1,\n  % Decide if we should pivot the i'th and i+1'th rows of w\n  rightTerm = abs(A(i+1,i)*w(i)+w(i+1));\n  if abs(w(i)) < tau*rightTerm,\n    % P := P_i P\n    p([i,i+1])=p([i+1,i]);\n\n    % Simultaneously perform \n    %   U := P_i U and\n    %   L := P_i L P_i^T\n    %\n    % Then update\n    %     L := L T_{i,L}^{-1},\n    %     U := T_{i,L} U, \n    %     w := T_{i,L} P_i w,\n    % where T_{i,L} is the Gauss transform which zeros (P_i w)_{i+1}.\n    % \n    % More succinctly,\n    %     gamma    := w(i) / w(i+1),\n    %     w(i)     := w(i+1), \n    %     w(i+1)   := 0,\n    %     L(:,i)   += gamma L(:,i+1),\n    %     U(i+1,:) -= gamma U(i,:).\n    gamma = w(i) / w(i+1);\n    uSub(i) = A(i,i);\n    lambdaSub = A(i+1,i);\n    lambda_ii = 1 + gamma*lambdaSub;\n    w(i) = w(i+1);\n    A(i,  i) = gamma;\n    A(i+1,i) = 0;\n\n    lBiCopy = A(i+2:end,i);\n    A(i+2:end,[i,i+1]) = A(i+2:end,[i+1,i]);\n    A(i+2:end,i) = A(i+2:end,i) + gamma*lBiCopy;\n\n    uip1RCopy = A(i+1,i+1:end);\n    A([i,i+1],:)=A([i+1,i],:);\n    A(i+1,i+1:end) = A(i+1,i+1:end) - gamma*uip1RCopy;\n\n    % Force L back to *unit* lower-triangular form via the transform\n    %     L := L T_{i,U}^{-1} D^{-1}, \n    % where D is diagonal and responsible for forcing L(i,i) and \n    % L(i+1,i+1) back to 1. The effect on L is:\n    %     eta       := L(i,i+1)/L(i,i),\n    %     L(:,i+1)  -= eta L(:,i),\n    %     delta_i   := L(i,i),\n    %     delta_ip1 := L(i+1,i+1),\n    %     L(:,i)   /= delta_i,\n    %     L(:,i+1) /= delta_ip1,\n    % while the effect on U is\n    %     U(i,:)   += eta U(i+1,:)\n    %     U(i,:)   *= delta_i,\n    %     U(i+1,:) *= delta_{i+1},\n    % and the effect on w is\n    %     w(i) *= delta_i.\n    eta = lambdaSub/lambda_ii;\n    delta_i = lambda_ii;\n    delta_ip1 = 1 - eta*gamma;\n    A(i+2:end,i+1) = (A(i+2:end,i+1) - eta*A(i+2:end,i)) / delta_ip1;\n    A(i+1:end,i  ) = A(i+1:end,i  ) / delta_i;\n\n    A(i,i      ) = (               eta*uSub(i)       ) * delta_i;\n    A(i,i+1:end) = (A(i,i+1:end) + eta*A(i+1,i+1:end)) * delta_i;\n    uSub(i)        = uSub(i)       *delta_ip1;\n    A(i+1,i+1:end) = A(i+1,i+1:end)*delta_ip1;\n\n    w(i) = w(i)*delta_i;\n  else\n    % Update\n    %     L := L T_{i,L}^{-1},\n    %     U := T_{i,L} U, \n    %     w := T_{i,L} w,\n    % where T_{i,L} is the Gauss transform which zeros w_{i+1}.\n    %\n    % More succinctly,\n    %     gamma    := w(i+1) / w(i),\n    %     L(:,i)   += gamma L(:,i+1),\n    %     U(i+1,:) -= gamma U(i,:),\n    %     w(i+1)   := 0.\n    gamma = w(i+1) / w(i);\n    A(i+1,    i) = A(i+1,    i) + gamma;\n    A(i+2:end,i) = A(i+2:end,i) + gamma*A(i+2:end,i+1);\n    uSub(i) = -gamma*A(i,i);\n    A(i+1,i+1:end) = A(i+1,i+1:end) - gamma*A(i,i+1:end);\n  end\nend\n\n% Add the modified w v' into U\nA(1,:) = A(1,:) + w(1)*v';\n\n% Transform U from upper-Hessenberg to upper-triangular form\nfor i=1:minDim-1,\n  % Decide if we should pivot the i'th and i+1'th rows U\n  rightTerm = abs(A(i+1,i)*A(i,i)+uSub(i));\n  if abs(A(i,i)) < tau*rightTerm,\n    % P := P_i P\n    p([i,i+1])=p([i+1,i]);\n\n    % Simultaneously perform \n    %   U := P_i U and\n    %   L := P_i L P_i^T.\n    %\n    % Then update\n    %     L := L T_{i,L}^{-1},\n    %     U := T_{i,L} U, \n    % where T_{i,L} is the Gauss transform which zeros U(i+1,i).\n    % \n    % More succinctly,\n    %     gamma    := U(i+1,i) / U(i,i),\n    %     L(:,i)   += gamma L(:,i+1),\n    %     U(i+1,:) -= gamma U(i,:),\n    gamma = A(i,i) / uSub(i);\n    lambdaSub = A(i+1,i);\n    lambda_ii = 1 + gamma*lambdaSub;\n    A(i+1,i) = uSub(i);\n    A(i,i) = gamma;\n\n    lBiCopy = A(i+2:end,i);\n    A(i+2:end,[i,i+1]) = A(i+2:end,[i+1,i]);\n    A(i+2:end,i) = A(i+2:end,i) + gamma*lBiCopy;\n\n    uip1RCopy = A(i+1,i+1:end);\n    A([i,i+1],:)=A([i+1,i],:);\n    A(i+1,i+1:end) = A(i+1,i+1:end) - gamma*uip1RCopy;\n\n    % Force L back to *unit* lower-triangular form via the transform\n    %     L := L T_{i,U}^{-1} D^{-1}, \n    % where D is diagonal and responsible for forcing L(i,i) and \n    % L(i+1,i+1) back to 1. The effect on L is:\n    %     eta       := L(i,i+1)/L(i,i),\n    %     L(:,i+1)  -= eta L(:,i),\n    %     delta_i   := L(i,i),\n    %     delta_ip1 := L(i+1,i+1),\n    %     L(:,i)   /= delta_i,\n    %     L(:,i+1) /= delta_ip1,\n    % while the effect on U is\n    %     U(i,:)   += eta U(i+1,:)\n    %     U(i,:)   *= delta(i),\n    %     U(i+1,:) *= delta(i+1).\n    eta = lambdaSub/lambda_ii;\n    delta_i = lambda_ii;\n    delta_ip1 = 1 - eta*gamma;\n    A(i+2:end,i+1) = (A(i+2:end,i+1) - eta*A(i+2:end,i)) / delta_ip1;\n    A(i+1:end,i  ) =  A(i+1:end,i  )                     / delta_i;\n\n    A(i,i) = A(i,i)*delta_i;\n    A(i,  i+1:end) = (A(i,  i+1:end) + eta*A(i+1,i+1:end))*delta_i;\n    A(i+1,i+1:end) =  A(i+1,i+1:end)                      *delta_ip1;\n  else\n    % Update\n    %     L := L T_{i,L}^{-1},\n    %     U := T_{i,L} U, \n    % where T_{i,L} is the Gauss transform which zeros U(i+1,i).\n    %\n    % More succinctly,\n    %     gamma    := U(i+1,i) / U(i,i),\n    %     L(:,i)   += gamma L(:,i+1),\n    %     U(i+1,:) -= gamma U(i,:).\n    gamma = uSub(i) / A(i,i);\n    A(i+1,    i      ) = A(i+1,    i      ) + gamma;\n    A(i+2:end,i      ) = A(i+2:end,i      ) + gamma*A(i+2:end,i+1    );\n    A(i+1,    i+1:end) = A(i+1,    i+1:end) - gamma*A(i,      i+1:end);\n  end\nend\n"
  },
  {
    "path": "src/madness/external/elemental/octave/LUModDriver.m",
    "content": "%\n% Copyright (c) 2009-2014, Jack Poulson\n% All rights reserved.\n%\n% This file is part of Elemental and is under the BSD 2-Clause License, \n% which can be found in the LICENSE file in the root directory, or at \n% http://opensource.org/licenses/BSD-2-Clause\n% \nn=3000;\n\nA=randn(n,n);\ntic;\n[L,U,P]=lu(A);\ntoc;\nAPack=tril(L,-1)+U;\np=P*(1:n)';\n\nx=randn(n,1);\ny=A*x;\nxMan=U\\(L\\y(p));\norigRelResid=norm(x-xMan)/norm(x);\nfprintf('||eOrig||_2 / ||xOrig||_2 = %e\\n',origRelResid);\n\nu=randn(n,1);\nv=randn(n,1);\ntau=0.1;\ntic;\n[APackNew,pNew]=LUMod(APack,p,u,v,tau);\ntoc;\nLNew=tril(APackNew,-1)+eye(n,n);\nUNew=triu(APackNew);\n\nx=randn(n,1);\ny=(A+u*v')*x;\nxMan=UNew\\(LNew\\y(pNew));\nrelResid=norm(x-xMan)/norm(x);\nfprintf('||e||_2 / ||x||_2 = %e\\n',relResid);\n"
  },
  {
    "path": "src/madness/external/elemental/octave/LUModSimple.m",
    "content": "function [L,U,p] = LUModSimple( L, U, p, u, v, tau )\n%\n% Copyright (c) 2009-2014, Jack Poulson\n% All rights reserved.\n%\n% This file is part of Elemental and is under the BSD 2-Clause License, \n% which can be found in the LICENSE file in the root directory, or at \n% http://opensource.org/licenses/BSD-2-Clause\n% \n% Begin with an LU factorization with partial pivoting, \n%     A = P^T L U,\n% and turn it into a partially-pivoted LU factorization of\n%     A + u v',\n% say\n%     (A + u v') = P^T L ( U + w v'),\n% w = inv(L) P u.\n%\n% Please see subsection 2.1 from \n%     Peter Stange, Andreas Griewank, and Matthias Bollhofer,\n%     \"On the efficient update of rectangular LU factorizations subject to\n%      low rank modifications\"\n% which discusses the technique of Schwetlick and Kielbasinski described in\n% \"Numerische Lineare Algebra\".\n%\n[m,n] = size(L);\nminDim = min(m,n);\nif minDim ~= m,\n  error('It is assumed that height(L) <= width(L)');\nend\n\n% w := inv(L) P u\nw=u(p);\nw=L\\w;\n\n% Maintain an external vector for the temporary subdiagonal of U\nuSub=zeros(minDim-1,1);\n\n% Reduce w to a multiple of e0\nfor i=minDim-1:-1:1,\n  % Decide if we should pivot the i'th and i+1'th rows of w\n  rightTerm = abs(L(i+1,i)*w(i)+w(i+1));\n  if abs(w(i)) < tau*rightTerm,\n    % P := P_i P\n    p([i,i+1])=p([i+1,i]);\n\n    % Simultaneously perform \n    %   U := P_i U and\n    %   L := P_i L P_i^T\n    U([i,i+1],:) = U([i+1,i],:);\n    L([i,i+1],:) = L([i+1,i],:);\n    L(:,[i,i+1]) = L(:,[i+1,i]);\n\n    % Update\n    %     L := L T_{i,L}^{-1},\n    %     U := T_{i,L} U, \n    %     w := T_{i,L} P_i w,\n    % where T_{i,L} is the Gauss transform which zeros (P_i w)_{i+1}.\n    % \n    % More succinctly,\n    %     gamma    := w(i) / w(i+1),\n    %     L(:,i)   += gamma L(:,i+1),\n    %     U(i+1,:) -= gamma U(i,:),\n    %     w(i)     := w(i+1), \n    %     w(i+1)   := 0.\n    gamma = w(i) / w(i+1);\n    L(:,i) = L(:,i) + gamma*L(:,i+1);\n    U(i+1,:) = U(i+1,:) - gamma*U(i,:);\n    w(i) = w(i+1);\n    w(i+1) = 0;\n\n    % Force L back to *unit* lower-triangular form via the transform\n    %     L := L T_{i,U}^{-1} D^{-1}, \n    % where D is diagonal and responsible for forcing L(i,i) and \n    % L(i+1,i+1) back to 1. The effect on L is:\n    %     eta       := L(i,i+1)/L(i,i),\n    %     L(:,i+1)  -= eta L(:,i),\n    %     delta_i   := L(i,i),\n    %     delta_ip1 := L(i+1,i+1),\n    %     L(:,i)   /= delta_i,\n    %     L(:,i+1) /= delta_ip1,\n    % while the effect on U is\n    %     U(i,:)   += eta U(i+1,:)\n    %     U(i,:)   *= delta_i,\n    %     U(i+1,:) *= delta_{i+1},\n    % while the effect on w is\n    %     w(i) *= delta_i w(i).\n    eta = L(i,i+1)/L(i,i);\n    L(:,i+1) = L(:,i+1) - eta*L(:,i);\n    delta_i   = L(i,i);\n    delta_ip1 = L(i+1,i+1);\n\n    L(:,i  ) = L(:,i  ) / delta_i;\n    L(:,i+1) = L(:,i+1) / delta_ip1;\n\n    U(i,:) = U(i,:) + eta*U(i+1,:);\n    U(i,:) = delta_i*U(i,:);\n    U(i+1,:) = delta_ip1*U(i+1,:);\n    w(i) = delta_i*w(i);\n  else\n    % Update\n    %     L := L T_{i,L}^{-1},\n    %     U := T_{i,L} U, \n    %     w := T_{i,L} w,\n    % where T_{i,L} is the Gauss transform which zeros w_{i+1}.\n    %\n    % More succinctly,\n    %     gamma    := w(i+1) / w(i),\n    %     L(:,i)   += gamma L(:,i+1),\n    %     U(i+1,:) -= gamma U(i,:),\n    %     w(i+1)   := 0.\n    gamma = w(i+1) / w(i);\n    L(:,i) = L(:,i) + gamma*L(:,i+1);\n    U(i+1,:) = U(i+1,:) - gamma*U(i,:);\n    w(i+1) = 0;\n  end\nend\n\n% Add the modified w v' into U\nU(1,:) = U(1,:) + w(1)*v';\n\n% Transform U from upper-Hessenberg to upper-triangular form\nfor i=1:minDim-1,\n  % Decide if we should pivot the i'th and i+1'th rows U\n  rightTerm = abs(L(i+1,i)*U(i,i)+U(i+1,i));\n  if abs(U(i,i)) < tau*rightTerm,\n    % P := P_i P\n    p([i,i+1])=p([i+1,i]);\n\n    % Simultaneously perform \n    %   U := P_i U and\n    %   L := P_i L P_i^T\n    U([i,i+1],:) = U([i+1,i],:);\n    L([i,i+1],:) = L([i+1,i],:);\n    L(:,[i,i+1]) = L(:,[i+1,i]);\n\n    % Update\n    %     L := L T_{i,L}^{-1},\n    %     U := T_{i,L} U, \n    % where T_{i,L} is the Gauss transform which zeros U(i+1,i).\n    % \n    % More succinctly,\n    %     gamma    := U(i+1,i) / U(i,i),\n    %     L(:,i)   += gamma L(:,i+1),\n    %     U(i+1,:) -= gamma U(i,:),\n    gamma = U(i+1,i) / U(i,i);\n    L(:,i) = L(:,i) + gamma*L(:,i+1); \n    U(i+1,:) = U(i+1,:) - gamma*U(i,:);\n\n    % Force L back to *unit* lower-triangular form via the transform\n    %     L := L T_{i,U}^{-1} D^{-1}, \n    % where D is diagonal and responsible for forcing L(i,i) and \n    % L(i+1,i+1) back to 1. The effect on L is:\n    %     eta       := L(i,i+1)/L(i,i),\n    %     L(:,i+1)  -= eta L(:,i),\n    %     delta_i   := L(i,i),\n    %     delta_ip1 := L(i+1,i+1),\n    %     L(:,i)   /= delta_i,\n    %     L(:,i+1) /= delta_ip1,\n    % while the effect on U is\n    %     U(i,:)   += eta U(i+1,:)\n    %     U(i,:)   *= delta(i),\n    %     U(i+1,:) *= delta(i+1).\n    eta = L(i,i+1)/L(i,i);\n    L(:,i+1) = L(:,i+1) - eta*L(:,i);\n    delta_i = L(i,i);\n    delta_ip1 = L(i+1,i+1);\n    L(:,i) = L(:,i) / delta_i;\n    L(:,i+1) = L(:,i+1) / delta_ip1;\n    U(i,:) = delta_i*(U(i,:) + eta*U(i+1,:));\n    U(i+1,:) = delta_ip1*U(i+1,:);\n  else\n    % Update\n    %     L := L T_{i,L}^{-1},\n    %     U := T_{i,L} U, \n    % where T_{i,L} is the Gauss transform which zeros U(i+1,i).\n    %\n    % More succinctly,\n    %     gamma    := U(i+1,i) / U(i,i),\n    %     L(:,i)   += gamma L(:,i+1),\n    %     U(i+1,:) -= gamma U(i,:).\n    gamma = U(i+1,i) / U(i,i);\n    L(:,i) = L(:,i) + gamma*L(:,i+1);\n    U(i+1,:) = U(i+1,:) - gamma*U(i,:);\n  end\nend\n"
  },
  {
    "path": "src/madness/external/elemental/octave/LUModSimpleDriver.m",
    "content": "%\n% Copyright (c) 2009-2014, Jack Poulson\n% All rights reserved.\n%\n% This file is part of Elemental and is under the BSD 2-Clause License, \n% which can be found in the LICENSE file in the root directory, or at \n% http://opensource.org/licenses/BSD-2-Clause\n% \nn=3000;\n\nA=randn(n,n);\ntic;\n[L,U,P]=lu(A);\ntoc;\np=P*(1:n)';\n\nx=randn(n,1);\ny=A*x;\nxMan=U\\(L\\y(p));\norigRelResid=norm(x-xMan)/norm(x);\nfprintf('||eOrig||_2 / ||xOrig||_2 = %e\\n',origRelResid);\n\nu=randn(n,1);\nv=randn(n,1);\ntau=0.1;\ntic;\n[LNew,UNew,pNew]=LUModSimple(L,U,p,u,v,tau);\ntoc;\n\nx=randn(n,1);\ny=(A+u*v')*x;\nxMan=UNew\\(LNew\\y(pNew));\nrelResid=norm(x-xMan)/norm(x);\nfprintf('||e||_2 / ||x||_2 = %e\\n',relResid);\n"
  },
  {
    "path": "src/madness/external/elemental/src/README.md",
    "content": "### `src/`\n\nThis folder contains Elemental's routines which are to be directly instantiated \nrather than keeping them datatype-agnostic. Several commonly-used large routines\nare kept here in order to keep the build times reasonable. This folder contains \nthe following subfolders:\n\n-  `blas-like/`: BLAS-like routines\n-  `core/`: Elemental's core data structures and environment\n-  `io/`: input/output, such as Qt5 graphics\n-  `lapack-like/`: LAPACK-like routines\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/README.md",
    "content": "### `src/blas-like/`\n\nThis folder contains Elemental's source files for BLAS-like routines. \nThe vast majority are in the `include/elemental/blas-like` folder, but \nthe following are directly instantiated:\n\n-  `Trr2k/`: underlying implementations of rank-2k triangular updates\n-  `Trr2k.cpp`: the high-level interface to rank-2k triangular updates\n-  `Trrk/`: underlying implementations of rank-k triangular updates\n-  `Trrk.cpp`: the high-level interface to rank-k triangular updates\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/Local.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_LOCAL_HPP\n#define ELEM_TRR2K_LOCAL_HPP\n\n#include ELEM_AXPYTRIANGLE_INC\n#include ELEM_SCALETRAPEZOID_INC\n#include ELEM_GEMM_INC\n\nnamespace elem {\n\nnamespace trr2k {\n\n#ifndef ELEM_RELEASE\n\nvoid EnsureSame\n( const Grid& gA, const Grid& gB, const Grid& gC, \n  const Grid& gD, const Grid& gE )\n{\n    if( gA != gB || gB != gC || gC != gD || gD != gE )\n        LogicError(\"Grids must be the same\");\n}\n\ntemplate<typename T>\nvoid EnsureConformal\n( const DistMatrix<T,MC,STAR>& A, const DistMatrix<T>& E, std::string name )\n{\n    if( A.Height() != E.Height() || A.ColAlign() != E.ColAlign() )\n        LogicError(name,\" not conformal with E\");\n}\n\ntemplate<typename T>\nvoid EnsureConformal\n( const DistMatrix<T,STAR,MC>& A, const DistMatrix<T>& E, std::string name )\n{\n    if( A.Width() != E.Height() || A.RowAlign() != E.ColAlign() )\n        LogicError(name,\" not conformal with E\");\n}\n\ntemplate<typename T>\nvoid EnsureConformal\n( const DistMatrix<T,MR,STAR>& A, const DistMatrix<T>& E, std::string name )\n{\n    if( A.Height() != E.Width() || A.ColAlign() != E.RowAlign() )\n        LogicError(name,\" not conformal with E\");\n}\n\ntemplate<typename T>\nvoid EnsureConformal\n( const DistMatrix<T,STAR,MR>& A, const DistMatrix<T>& E, std::string name )\n{\n    if( A.Width() != E.Width() || A.RowAlign() != E.RowAlign() )\n        LogicError(name,\" not conformal with E\");\n}\n\ntemplate<typename T,Distribution UA,Distribution VA,\n                    Distribution UB,Distribution VB,\n                    Distribution UC,Distribution VC,\n                    Distribution UD,Distribution VD>\nvoid CheckInput\n( const DistMatrix<T,UA,VA>& A, const DistMatrix<T,UB,VB>& B, \n  const DistMatrix<T,UC,VC>& C, const DistMatrix<T,UD,VD>& D,\n  const DistMatrix<T>& E )\n{\n    EnsureSame( A.Grid(), B.Grid(), C.Grid(), D.Grid(), E.Grid() );\n    EnsureConformal( A, E, \"A\" );\n    EnsureConformal( B, E, \"B\" );\n    EnsureConformal( C, E, \"C\" );\n    EnsureConformal( D, E, \"D\" );\n}\n\n#endif // ifndef ELEM_RELEASE\n\n// E := alpha (A B + C D) + beta E\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,MC,STAR> AT(g),  CT(g),\n                          AB(g),  CB(g);\n    DistMatrix<T,STAR,MR> BL(g), BR(g),\n                          DL(g), DR(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionRight( B, BL, BR, half );\n    LockedPartitionDown( C, CT, CB, half );\n    LockedPartitionRight( D, DL, DR, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( NORMAL, NORMAL, alpha, AB, BL, T(1), EBL );\n        LocalGemm( NORMAL, NORMAL, alpha, CB, DL, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( NORMAL, NORMAL, alpha, AT, BR, T(1), ETR );\n        LocalGemm( NORMAL, NORMAL, alpha, CT, DR, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( NORMAL, NORMAL, alpha, AT, BL, FTL );\n    LocalGemm( NORMAL, NORMAL, alpha, CT, DL, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( NORMAL, NORMAL, alpha, AB, BR, FBR );\n    LocalGemm( NORMAL, NORMAL, alpha, CB, DR, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A B + C D^{T/H}) + beta C\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo, Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,MC,STAR> AT(g),  CT(g),\n                          AB(g),  CB(g);\n    DistMatrix<T,MR,STAR> DT(g), \n                          DB(g);\n    DistMatrix<T,STAR,MR> BL(g), BR(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionRight( B, BL, BR, half );\n    LockedPartitionDown( C, CT, CB, half );\n    LockedPartitionDown( D, DT, DB, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( NORMAL, NORMAL, alpha, AB, BL, T(1), EBL );\n        LocalGemm( NORMAL, orientationOfD, alpha, CB, DT, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( NORMAL, NORMAL, alpha, AT, BR, T(1), ETR );\n        LocalGemm( NORMAL, orientationOfD, alpha, CT, DB, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( NORMAL, NORMAL, alpha, AT, BL, FTL );\n    LocalGemm( NORMAL, orientationOfD, alpha, CT, DT, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( NORMAL, NORMAL, alpha, AB, BR, FBR );\n    LocalGemm( NORMAL, orientationOfD, alpha, CB, DB, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A B + C^{T/H} D) + beta E\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo, Orientation orientationOfC,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,MC,STAR> AT(g), AB(g);\n    DistMatrix<T,STAR,MC> CL(g), CR(g);\n    DistMatrix<T,STAR,MR> BL(g), BR(g),\n                          DL(g), DR(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionRight( B, BL, BR, half );\n    LockedPartitionRight( C, CL, CR, half );\n    LockedPartitionRight( D, DL, DR, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( NORMAL, NORMAL, alpha, AB, BL, T(1), EBL );\n        LocalGemm( orientationOfC, NORMAL, alpha, CR, DL, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( NORMAL, NORMAL, alpha, AT, BR, T(1), ETR );\n        LocalGemm( orientationOfC, NORMAL, alpha, CL, DR, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( NORMAL, NORMAL, alpha, AT, BL, FTL );\n    LocalGemm( orientationOfC, NORMAL, alpha, CL, DL, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( NORMAL, NORMAL, alpha, AB, BR, FBR );\n    LocalGemm( orientationOfC, NORMAL, alpha, CR, DR, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A B + C^{T/H} D^{T/H}) + beta E\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo, Orientation orientationOfC, Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,MC,STAR> AT(g), AB(g);\n    DistMatrix<T,STAR,MR> BL(g), BR(g);\n    DistMatrix<T,STAR,MC> CL(g), CR(g);\n    DistMatrix<T,MR,STAR> DT(g), DB(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionRight( B, BL, BR, half );\n    LockedPartitionRight( C, CL, CR, half );\n    LockedPartitionDown( D, DT, DB, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( NORMAL, NORMAL, alpha, AB, BL, T(1), EBL );\n        LocalGemm( orientationOfC, orientationOfD, alpha, CR, DT, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( NORMAL, NORMAL, alpha, AT, BR, T(1), ETR );\n        LocalGemm( orientationOfC, orientationOfD, alpha, CL, DB, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( NORMAL, NORMAL, alpha, AT, BL, FTL );\n    LocalGemm( orientationOfC, orientationOfD, alpha, CL, DT, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( NORMAL, NORMAL, alpha, AB, BR, FBR );\n    LocalGemm( orientationOfC, orientationOfD, alpha, CR, DB, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A B^{T/H} + C D) + beta C\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo, Orientation orientationOfB,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,MC,STAR> AT(g),  CT(g),\n                          AB(g),  CB(g);\n    DistMatrix<T,MR,STAR> BT(g), BB(g);\n    DistMatrix<T,STAR,MR> DL(g), DR(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionDown( B, BT, BB, half );\n    LockedPartitionDown( C, CT, CB, half );\n    LockedPartitionRight( D, DL, DR, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( NORMAL, orientationOfB, alpha, AB, BT, T(1), EBL );\n        LocalGemm( NORMAL, NORMAL, alpha, CB, DL, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( NORMAL, orientationOfB, alpha, AT, BB, T(1), ETR );\n        LocalGemm( NORMAL, NORMAL, alpha, CT, DR, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( NORMAL, orientationOfB, alpha, AT, BT, FTL );\n    LocalGemm( NORMAL, NORMAL, alpha, CT, DL, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( NORMAL, orientationOfB, alpha, AB, BB, FBR );\n    LocalGemm( NORMAL, NORMAL, alpha, CB, DR, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A B^{T/H} + C D^{T/H}) + beta C\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo, Orientation orientationOfB, Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,MC,STAR> AT(g),  CT(g),\n                          AB(g),  CB(g);\n    DistMatrix<T,MR,STAR> BT(g),  DT(g),\n                          BB(g),  DB(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionDown( B, BT, BB, half );\n    LockedPartitionDown( C, CT, CB, half );\n    LockedPartitionDown( D, DT, DB, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( NORMAL, orientationOfB, alpha, AB, BT, T(1), EBL );\n        LocalGemm( NORMAL, orientationOfD, alpha, CB, DT, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( NORMAL, orientationOfB, alpha, AT, BB, T(1), ETR );\n        LocalGemm( NORMAL, orientationOfD, alpha, CT, DB, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( NORMAL, orientationOfB, alpha, AT, BT, FTL );\n    LocalGemm( NORMAL, orientationOfD, alpha, CT, DT, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( NORMAL, orientationOfB, alpha, AB, BB, FBR );\n    LocalGemm( NORMAL, orientationOfD, alpha, CB, DB, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A B^{T/H} + C^{T/H} D) + beta E\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo, Orientation orientationOfB, Orientation orientationOfC,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,MC,STAR> AT(g), AB(g);\n    DistMatrix<T,MR,STAR> BT(g), BB(g);\n    DistMatrix<T,STAR,MC> CL(g), CR(g);\n    DistMatrix<T,STAR,MR> DL(g), DR(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionDown( B, BT, BB, half );\n    LockedPartitionRight( C, CL, CR, half );\n    LockedPartitionRight( D, DL, DR, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( NORMAL, orientationOfB, alpha, AB, BT, T(1), EBL );\n        LocalGemm( orientationOfC, NORMAL, alpha, CR, DL, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( NORMAL, orientationOfB, alpha, AT, BB, T(1), ETR );\n        LocalGemm( orientationOfC, NORMAL, alpha, CL, DR, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( NORMAL, orientationOfB, alpha, AT, BT, FTL );\n    LocalGemm( orientationOfC, NORMAL, alpha, CL, DL, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( NORMAL, orientationOfB, alpha, AB, BB, FBR );\n    LocalGemm( orientationOfC, NORMAL, alpha, CR, DR, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A B^{T/H} + C^{T/H} D^{T/H}) + beta C\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,MC,STAR> AT(g), AB(g);\n    DistMatrix<T,MR,STAR> BT(g), BB(g);\n    DistMatrix<T,STAR,MC> CL(g), CR(g);\n    DistMatrix<T,MR,STAR> DT(g), DB(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionDown( B, BT, BB, half );\n    LockedPartitionRight( C, CL, CR, half );\n    LockedPartitionDown( D, DT, DB, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( NORMAL, orientationOfB, alpha, AB, BT, T(1), EBL );\n        LocalGemm( orientationOfC, orientationOfD, alpha, CR, DT, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( NORMAL, orientationOfB, alpha, AT, BB, T(1), ETR );\n        LocalGemm( orientationOfC, orientationOfD, alpha, CL, DB, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( NORMAL, orientationOfB, alpha, AT, BT, FTL );\n    LocalGemm( orientationOfC, orientationOfD, alpha, CL, DT, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( NORMAL, orientationOfB, alpha, AB, BB, FBR );\n    LocalGemm( orientationOfC, orientationOfD, alpha, CR, DB, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A^{T/H} B + C D) + beta E\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo, Orientation orientationOfA,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,STAR,MC> AL(g), AR(g);\n    DistMatrix<T,MC,STAR> CT(g), CB(g);\n    DistMatrix<T,STAR,MR> BL(g), BR(g),\n                          DL(g), DR(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionRight( B, BL, BR, half );\n    LockedPartitionDown( C, CT, CB, half );\n    LockedPartitionRight( D, DL, DR, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( orientationOfA, NORMAL, alpha, AR, BL, T(1), EBL );\n        LocalGemm( NORMAL, NORMAL, alpha, CB, DL, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( orientationOfA, NORMAL, alpha, AL, BR, T(1), ETR );\n        LocalGemm( NORMAL, NORMAL, alpha, CT, DR, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( orientationOfA, NORMAL, alpha, AL, BL, FTL );\n    LocalGemm( NORMAL, NORMAL, alpha, CT, DL, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( orientationOfA, NORMAL, alpha, AR, BR, FBR );\n    LocalGemm( NORMAL, NORMAL, alpha, CB, DR, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A^{T/H} B + C D^{T/H}) + beta E\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo, Orientation orientationOfA, Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,STAR,MC> AL(g), AR(g);\n    DistMatrix<T,STAR,MR> BL(g), BR(g);\n    DistMatrix<T,MC,STAR> CT(g), CB(g);\n    DistMatrix<T,MR,STAR> DT(g), DB(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionRight( B, BL, BR, half );\n    LockedPartitionDown( C, CT, CB, half );\n    LockedPartitionDown( D, DT, DB, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( orientationOfA, NORMAL, alpha, AR, BL, T(1), EBL );\n        LocalGemm( NORMAL, orientationOfD, alpha, CB, DT, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( orientationOfA, NORMAL, alpha, AL, BR, T(1), ETR );\n        LocalGemm( NORMAL, orientationOfD, alpha, CT, DB, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( orientationOfA, NORMAL, alpha, AL, BL, FTL );\n    LocalGemm( NORMAL, orientationOfD, alpha, CT, DT, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( orientationOfA, NORMAL, alpha, AR, BR, FBR );\n    LocalGemm( NORMAL, orientationOfD, alpha, CB, DB, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A^{T/H} B + C^{T/H} D) + beta E\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo, Orientation orientationOfA, Orientation orientationOfC,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,STAR,MC> AL(g), AR(g),\n                          CL(g), CR(g);\n    DistMatrix<T,STAR,MR> BL(g), BR(g),\n                          DL(g), DR(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionRight( B, BL, BR, half );\n    LockedPartitionRight( C, CL, CR, half );\n    LockedPartitionRight( D, DL, DR, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( orientationOfA, NORMAL, alpha, AR, BL, T(1), EBL );\n        LocalGemm( orientationOfC, NORMAL, alpha, CR, DL, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( orientationOfA, NORMAL, alpha, AL, BR, T(1), ETR );\n        LocalGemm( orientationOfC, NORMAL, alpha, CL, DR, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( orientationOfA, NORMAL, alpha, AL, BL, FTL );\n    LocalGemm( orientationOfC, NORMAL, alpha, CL, DL, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( orientationOfA, NORMAL, alpha, AR, BR, FBR );\n    LocalGemm( orientationOfC, NORMAL, alpha, CR, DR, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A^{T/H} B + C^{T/H} D^{T/H}) + beta E\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,STAR,MC> AL(g), AR(g),\n                          CL(g), CR(g);\n    DistMatrix<T,STAR,MR> BL(g), BR(g);\n    DistMatrix<T,MR,STAR> DT(g), DB(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionRight( B, BL, BR, half );\n    LockedPartitionRight( C, CL, CR, half );\n    LockedPartitionDown( D, DT, DB, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( orientationOfA, NORMAL, alpha, AR, BL, T(1), EBL );\n        LocalGemm( orientationOfC, orientationOfD, alpha, CR, DT, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( orientationOfA, NORMAL, alpha, AL, BR, T(1), ETR );\n        LocalGemm( orientationOfC, orientationOfD, alpha, CL, DB, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( orientationOfA, NORMAL, alpha, AL, BL, FTL );\n    LocalGemm( orientationOfC, orientationOfD, alpha, CL, DT, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( orientationOfA, NORMAL, alpha, AR, BR, FBR );\n    LocalGemm( orientationOfC, orientationOfD, alpha, CR, DB, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A^{T/H} B^{T/H} + C D) + beta E\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo, Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,STAR,MC> AL(g), AR(g);\n    DistMatrix<T,MR,STAR> BT(g), BB(g);\n    DistMatrix<T,MC,STAR> CT(g), CB(g);\n    DistMatrix<T,STAR,MR> DL(g), DR(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionDown( B, BT, BB, half );\n    LockedPartitionDown( C, CT, CB, half );\n    LockedPartitionRight( D, DL, DR, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( orientationOfA, orientationOfB, alpha, AR, BT, T(1), EBL );\n        LocalGemm( NORMAL, NORMAL, alpha, CB, DL, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( orientationOfA, orientationOfB, alpha, AL, BB, T(1), ETR );\n        LocalGemm( NORMAL, NORMAL, alpha, CT, DR, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( orientationOfA, orientationOfB, alpha, AL, BT, FTL );\n    LocalGemm( NORMAL, NORMAL, alpha, CT, DL, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( orientationOfA, orientationOfB, alpha, AR, BB, FBR );\n    LocalGemm( NORMAL, NORMAL, alpha, CB, DR, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A^{T/H} B^{T/H} + C D^{T/H}) + beta C\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,STAR,MC> AL(g), AR(g);\n    DistMatrix<T,MR,STAR> BT(g), BB(g);\n    DistMatrix<T,MC,STAR> CT(g), CB(g);\n    DistMatrix<T,MR,STAR> DT(g), DB(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionDown( B, BT, BB, half );\n    LockedPartitionDown( C, CT, CB, half );\n    LockedPartitionDown( D, DT, DB, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( orientationOfA, orientationOfB, alpha, AR, BT, T(1), EBL );\n        LocalGemm( NORMAL, orientationOfD, alpha, CB, DT, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( orientationOfA, orientationOfB, alpha, AL, BB, T(1), ETR );\n        LocalGemm( NORMAL, orientationOfD, alpha, CT, DB, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( orientationOfA, orientationOfB, alpha, AL, BT, FTL );\n    LocalGemm( NORMAL, orientationOfD, alpha, CT, DT, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( orientationOfA, orientationOfB, alpha, AR, BB, FBR );\n    LocalGemm( NORMAL, orientationOfD, alpha, CB, DB, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A^{T/H} B^{T/H} + C^{T/H} D) + beta E\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,STAR,MC> AL(g), AR(g),\n                          CL(g), CR(g);\n    DistMatrix<T,MR,STAR> BT(g), BB(g);\n    DistMatrix<T,STAR,MR> DL(g), DR(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionDown( B, BT, BB, half );\n    LockedPartitionRight( C, CL, CR, half );\n    LockedPartitionRight( D, DL, DR, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( orientationOfA, orientationOfB, alpha, AR, BT, T(1), EBL );\n        LocalGemm( orientationOfC, NORMAL, alpha, CR, DL, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( orientationOfA, orientationOfB, alpha, AL, BB, T(1), ETR );\n        LocalGemm( orientationOfC, NORMAL, alpha, CL, DR, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( orientationOfA, orientationOfB, alpha, AL, BT, FTL );\n    LocalGemm( orientationOfC, NORMAL, alpha, CL, DL, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( orientationOfA, orientationOfB, alpha, AR, BB, FBR );\n    LocalGemm( orientationOfC, NORMAL, alpha, CR, DR, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n// E := alpha (A^{T/H} B^{T/H} + C^{T/H} D^{T/H}) + beta C\ntemplate<typename T>\ninline void\nLocalTrr2kKernel\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC, Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2kKernel\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T,STAR,MC> AL(g), AR(g),\n                          CL(g), CR(g);\n    DistMatrix<T,MR,STAR> BT(g),  DT(g),\n                          BB(g),  DB(g);\n    DistMatrix<T> ETL(g), ETR(g),\n                  EBL(g), EBR(g);\n    DistMatrix<T> FTL(g), FBR(g);\n\n    const Int half = E.Height()/2;\n    ScaleTrapezoid( beta, uplo, E );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionDown( B, BT, BB, half );\n    LockedPartitionRight( C, CL, CR, half );\n    LockedPartitionDown( D, DT, DB, half );\n    PartitionDownDiagonal\n    ( E, ETL, ETR,\n         EBL, EBR, half );\n\n    if( uplo == LOWER )\n    {\n        LocalGemm( orientationOfA, orientationOfB, alpha, AR, BT, T(1), EBL );\n        LocalGemm( orientationOfC, orientationOfD, alpha, CR, DT, T(1), EBL );\n    }\n    else\n    {\n        LocalGemm( orientationOfA, orientationOfB, alpha, AL, BB, T(1), ETR );\n        LocalGemm( orientationOfC, orientationOfD, alpha, CL, DB, T(1), ETR );\n    }\n\n    FTL.AlignWith( ETL );\n    LocalGemm( orientationOfA, orientationOfB, alpha, AL, BT, FTL );\n    LocalGemm( orientationOfC, orientationOfD, alpha, CL, DT, T(1), FTL );\n    AxpyTriangle( uplo, T(1), FTL, ETL );\n\n    FBR.AlignWith( EBR );\n    LocalGemm( orientationOfA, orientationOfB, alpha, AR, BB, FBR );\n    LocalGemm( orientationOfC, orientationOfD, alpha, CR, DB, T(1), FBR );\n    AxpyTriangle( uplo, T(1), FBR, EBR );\n}\n\n} // namespace trr2k\n\n// E := alpha (A B + C D) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel( uplo, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,MC,STAR> AT(g),  CT(g),\n                              AB(g),  CB(g);\n        DistMatrix<T,STAR,MR> BL(g), BR(g),\n                              DL(g), DR(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionRight( B, BL, BR, half );\n        LockedPartitionDown( C, CT, CB, half );\n        LockedPartitionRight( D, DL, DR, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( NORMAL, NORMAL, alpha, AB, BL, beta, EBL );\n            LocalGemm( NORMAL, NORMAL, alpha, CB, DL, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm( NORMAL, NORMAL, alpha, AT, BR, beta, ETR );\n            LocalGemm( NORMAL, NORMAL, alpha, CT, DR, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k( uplo, alpha, AT, BL, CT, DL, beta, ETL );\n        LocalTrr2k( uplo, alpha, AB, BR, CB, DR, beta, EBR );\n    }\n}\n\n// E := alpha (A B + C D^{T/H}) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo, Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel( uplo, orientationOfD, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,MC,STAR> AT(g),  CT(g),\n                              AB(g),  CB(g);\n        DistMatrix<T,STAR,MR> BL(g), BR(g);\n        DistMatrix<T,MR,STAR> DT(g), DB(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionRight( B, BL, BR, half );\n        LockedPartitionDown( C, CT, CB, half );\n        LockedPartitionDown( D, DT, DB, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( NORMAL, NORMAL, alpha, AB, BL, T(1), EBL );\n            LocalGemm( NORMAL, orientationOfD, alpha, CB, DT, beta, EBL );\n        }\n        else\n        {\n            LocalGemm( NORMAL, NORMAL, alpha, AT, BR, T(1), ETR );\n            LocalGemm( NORMAL, orientationOfD, alpha, CT, DB, beta, ETR );\n        }\n\n        // Recurse\n        LocalTrr2k( uplo, orientationOfD, alpha, AT, BL, CT, DT, beta, ETL );\n        LocalTrr2k( uplo, orientationOfD, alpha, AB, BR, CB, DB, beta, EBR );\n    }\n}\n\n// E := alpha (A B + C^{T/H} D) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo, Orientation orientationOfC,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel( uplo, orientationOfC, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,MC,STAR> AT(g), AB(g);\n        DistMatrix<T,STAR,MR> BL(g), BR(g),\n                              DL(g), DR(g);\n        DistMatrix<T,STAR,MC> CL(g), CR(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionRight( B, BL, BR, half );\n        LockedPartitionRight( C, CL, CR, half );\n        LockedPartitionRight( D, DL, DR, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( NORMAL, NORMAL, alpha, AB, BL, beta, EBL );\n            LocalGemm( orientationOfC, NORMAL, alpha, CR, DL, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm( NORMAL, NORMAL, alpha, AT, BR, beta, ETR );\n            LocalGemm( orientationOfC, NORMAL, alpha, CL, DR, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k( uplo, orientationOfC, alpha, AT, BL, CL, DL, beta, ETL );\n        LocalTrr2k( uplo, orientationOfC, alpha, AB, BR, CR, DR, beta, EBR );\n    }\n}\n\n// E := alpha (A B + C^{T/H} D^{T/H}) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo, Orientation orientationOfC, Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfC, orientationOfD, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,MC,STAR> AT(g), AB(g); \n        DistMatrix<T,STAR,MR> BL(g), BR(g);\n        DistMatrix<T,STAR,MC> CL(g), CR(g);\n        DistMatrix<T,MR,STAR> DT(g), DB(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionRight( B, BL, BR, half );\n        LockedPartitionRight( C, CL, CR, half );\n        LockedPartitionDown( D, DT, DB, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( NORMAL, NORMAL, alpha, AB, BL, beta, EBL );\n            LocalGemm\n            ( orientationOfC, orientationOfD, alpha, CR, DT, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm( NORMAL, NORMAL, alpha, AT, BR, beta, ETR );\n            LocalGemm\n            ( orientationOfC, orientationOfD, alpha, CL, DB, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, orientationOfC, orientationOfD, \n          alpha, AT, BL, CL, DT, beta, ETL );\n        LocalTrr2k\n        ( uplo, orientationOfC, orientationOfD,\n          alpha, AB, BR, CR, DB, beta, EBR );\n    }\n}\n\n// E := alpha (A B^{T/H} + C D) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo, Orientation orientationOfB,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel( uplo, orientationOfB, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,MC,STAR> AT(g),  CT(g),\n                              AB(g),  CB(g);\n        DistMatrix<T,MR,STAR> BT(g), BB(g);\n        DistMatrix<T,STAR,MR> DL(g), DR(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionDown( B, BT, BB, half );\n        LockedPartitionDown( C, CT, CB, half );\n        LockedPartitionRight( D, DL, DR, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( NORMAL, orientationOfB, alpha, AB, BT, T(1), EBL );\n            LocalGemm( NORMAL, NORMAL, alpha, CB, DL, beta, EBL );\n        }\n        else\n        {\n            LocalGemm( NORMAL, orientationOfB, alpha, AT, BB, T(1), ETR );\n            LocalGemm( NORMAL, NORMAL, alpha, CT, DR, beta, ETR );\n        }\n\n        // Recurse\n        LocalTrr2k( uplo, orientationOfB, alpha, AT, BT, CT, DL, beta, ETL );\n        LocalTrr2k( uplo, orientationOfB, alpha, AB, BB, CB, DR, beta, EBR );\n    }\n}\n\n// E := alpha (A B^{T/H} + C D^{T/H}) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo, Orientation orientationOfB, Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfB, orientationOfD, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,MC,STAR> AT(g),  CT(g),\n                              AB(g),  CB(g);\n        DistMatrix<T,MR,STAR> BT(g),  DT(g),\n                              BB(g),  DB(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionDown( B, BT, BB, half );\n        LockedPartitionDown( C, CT, CB, half );\n        LockedPartitionDown( D, DT, DB, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( NORMAL, orientationOfB, alpha, AB, BT, beta, EBL );\n            LocalGemm( NORMAL, orientationOfD, alpha, CB, DT, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm( NORMAL, orientationOfB, alpha, AT, BB, beta, ETR );\n            LocalGemm( NORMAL, orientationOfD, alpha, CT, DB, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, orientationOfB, orientationOfD,\n          alpha, AT, BT, CT, DT, beta, ETL );\n        LocalTrr2k\n        ( uplo, orientationOfB, orientationOfD,\n          alpha, AB, BB, CB, DB, beta, EBR );\n    }\n}\n\n// E := alpha (A B^{T/H} + C^{T/H} D) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo, Orientation orientationOfB, Orientation orientationOfC,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfB, orientationOfC, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,MC,STAR> AT(g), AB(g); \n        DistMatrix<T,MR,STAR> BT(g), BB(g);\n        DistMatrix<T,STAR,MC> CL(g), CR(g);\n        DistMatrix<T,STAR,MR> DL(g), DR(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionDown( B, BT, BB, half );\n        LockedPartitionRight( C, CL, CR, half );\n        LockedPartitionRight( D, DL, DR, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( NORMAL, orientationOfB, alpha, AB, BT, beta, EBL );\n            LocalGemm( orientationOfC, NORMAL, alpha, CR, DL, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm( NORMAL, orientationOfB, alpha, AT, BB, beta, ETR );\n            LocalGemm( orientationOfC, NORMAL, alpha, CL, DR, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, orientationOfB, orientationOfC,\n          alpha, AT, BT, CL, DL, beta, ETL );\n        LocalTrr2k\n        ( uplo, orientationOfB, orientationOfC,\n          alpha, AB, BB, CR, DR, beta, EBR );\n    }\n}\n\n// E := alpha (A B^{T/H} + C^{T/H} D^{T/H}) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,MC,STAR>& A, const DistMatrix<T,MR,STAR>& B, \n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfB, orientationOfC, orientationOfD, \n          alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,MC,STAR> AT(g), AB(g); \n        DistMatrix<T,MR,STAR> BT(g),  DT(g),\n                              BB(g),  DB(g);\n        DistMatrix<T,STAR,MC> CL(g), CR(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionDown( B, BT, BB, half );\n        LockedPartitionRight( C, CL, CR, half );\n        LockedPartitionDown( D, DT, DB, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( NORMAL, orientationOfB, alpha, AB, BT, beta, EBL );\n            LocalGemm\n            ( orientationOfC, orientationOfD, alpha, CR, DT, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm( NORMAL, orientationOfB, alpha, AT, BB, beta, ETR );\n            LocalGemm\n            ( orientationOfC, orientationOfD, alpha, CL, DB, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, orientationOfB, orientationOfC, orientationOfD,\n          alpha, AT, BT, CL, DT, beta, ETL );\n        LocalTrr2k\n        ( uplo, orientationOfB, orientationOfC, orientationOfD,\n          alpha, AB, BB, CR, DB, beta, EBR );\n    }\n}\n\n// E := alpha (A^{T/H} B + C D) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo, Orientation orientationOfA,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel( uplo, orientationOfA, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,STAR,MC> AL(g), AR(g);\n        DistMatrix<T,STAR,MR> BL(g), BR(g),\n                              DL(g), DR(g);\n        DistMatrix<T,MC,STAR> CT(g), CB(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionRight( B, BL, BR, half );\n        LockedPartitionDown( C, CT, CB, half );\n        LockedPartitionRight( D, DL, DR, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( orientationOfA, NORMAL, alpha, AR, BL, beta, EBL );\n            LocalGemm( NORMAL, NORMAL, alpha, CB, DL, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm( orientationOfA, NORMAL, alpha, AL, BR, beta, ETR );\n            LocalGemm( NORMAL, NORMAL, alpha, CT, DR, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k( uplo, orientationOfA, alpha, AL, BL, CT, DL, beta, ETL );\n        LocalTrr2k( uplo, orientationOfA, alpha, AR, BR, CB, DR, beta, EBR );\n    }\n}\n\n// E := alpha (A^{T/H} B + C D^{T/H}) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo, Orientation orientationOfA, Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfA, orientationOfD, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,STAR,MC> AL(g), AR(g);\n        DistMatrix<T,STAR,MR> BL(g), BR(g);\n        DistMatrix<T,MC,STAR> CT(g), CB(g); \n        DistMatrix<T,MR,STAR> DT(g), DB(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionRight( B, BL, BR, half );\n        LockedPartitionDown( C, CT, CB, half );\n        LockedPartitionDown( D, DT, DB, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( orientationOfA, NORMAL, alpha, AR, BL, beta, EBL );\n            LocalGemm( NORMAL, orientationOfD, alpha, CB, DT, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm( orientationOfA, NORMAL, alpha, AL, BR, beta, ETR );\n            LocalGemm( NORMAL, orientationOfD, alpha, CT, DB, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfD,\n          alpha, AL, BL, CT, DT, beta, ETL );\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfD,\n          alpha, AR, BR, CB, DB, beta, EBR );\n    }\n}\n\n// E := alpha (A^{T/H} B + C^{T/H} D) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo, Orientation orientationOfA, Orientation orientationOfC,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfA, orientationOfC, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,STAR,MC> AL(g), AR(g),\n                              CL(g), CR(g);\n        DistMatrix<T,STAR,MR> BL(g), BR(g),\n                              DL(g), DR(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionRight( B, BL, BR, half );\n        LockedPartitionRight( C, CL, CR, half );\n        LockedPartitionRight( D, DL, DR, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( orientationOfA, NORMAL, alpha, AR, BL, beta, EBL );\n            LocalGemm( orientationOfC, NORMAL, alpha, CR, DL, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm( orientationOfA, NORMAL, alpha, AL, BR, beta, ETR );\n            LocalGemm( orientationOfC, NORMAL, alpha, CL, DR, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfC,\n          alpha, AL, BL, CL, DL, beta, ETL );\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfC, \n          alpha, AR, BR, CR, DR, beta, EBR );\n    }\n}\n\n// E := alpha (A^{T/H} B + C^{T/H} D^{T/H}) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,STAR,MR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfA, orientationOfC, orientationOfD,\n          alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,STAR,MC> AL(g), AR(g),\n                              CL(g), CR(g);\n        DistMatrix<T,STAR,MR> BL(g), BR(g);\n        DistMatrix<T,MR,STAR> DT(g), DB(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionRight( B, BL, BR, half );\n        LockedPartitionRight( C, CL, CR, half );\n        LockedPartitionDown( D, DT, DB, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm( orientationOfA, NORMAL, alpha, AR, BL, beta, EBL );\n            LocalGemm\n            ( orientationOfC, orientationOfD, alpha, CR, DT, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm( orientationOfA, NORMAL, alpha, AL, BR, beta, ETR );\n            LocalGemm\n            ( orientationOfC, orientationOfD, alpha, CL, DB, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfC, orientationOfD,\n          alpha, AL, BL, CL, DT, beta, ETL );\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfC, orientationOfD,\n          alpha, AR, BR, CR, DB, beta, EBR );\n    }\n}\n\n// E := alpha (A^{T/H} B^{T/H} + C D) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo, Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfA, orientationOfB, alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,STAR,MC> AL(g), AR(g);\n        DistMatrix<T,MR,STAR> BT(g), BB(g);\n        DistMatrix<T,MC,STAR> CT(g), CB(g); \n        DistMatrix<T,STAR,MR> DL(g), DR(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionDown( B, BT, BB, half );\n        LockedPartitionDown( C, CT, CB, half );\n        LockedPartitionRight( D, DL, DR, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm\n            ( orientationOfA, orientationOfB, alpha, AR, BT, beta, EBL );\n            LocalGemm( NORMAL, NORMAL, alpha, CB, DL, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm\n            ( orientationOfA, orientationOfB, alpha, AL, BB, beta, ETR );\n            LocalGemm( NORMAL, NORMAL, alpha, CT, DR, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfB,\n          alpha, AL, BT, CT, DL, beta, ETL );\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfB,\n          alpha, AR, BB, CB, DR, beta, EBR );\n    }\n}\n\n// E := alpha (A^{T/H} B^{T/H} + C D^{T/H}) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,MC,STAR>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfA, orientationOfB, orientationOfD, \n          alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,STAR,MC> AL(g), AR(g);\n        DistMatrix<T,MR,STAR> BT(g),  DT(g),\n                              BB(g),  DB(g);\n        DistMatrix<T,MC,STAR> CT(g), CB(g); \n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionDown( B, BT, BB, half );\n        LockedPartitionDown( C, CT, CB, half );\n        LockedPartitionDown( D, DT, DB, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm\n            ( orientationOfA, orientationOfB, alpha, AR, BT, beta, EBL );\n            LocalGemm( NORMAL, orientationOfD, alpha, CB, DT, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm\n            ( orientationOfA, orientationOfB, alpha, AL, BB, beta, ETR );\n            LocalGemm( NORMAL, orientationOfD, alpha, CT, DB, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfB, orientationOfD,\n          alpha, AL, BT, CT, DT, beta, ETL );\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfB, orientationOfD,\n          alpha, AR, BB, CB, DB, beta, EBR );\n    }\n}\n\n// E := alpha (A^{T/H} B^{T/H} + C^{T/H} D) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,STAR,MR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfA, orientationOfB, orientationOfC,\n          alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,STAR,MC> AL(g), AR(g),\n                              CL(g), CR(g);\n        DistMatrix<T,MR,STAR> BT(g), BB(g);\n        DistMatrix<T,STAR,MR> DL(g), DR(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionDown( B, BT, BB, half );\n        LockedPartitionRight( C, CL, CR, half );\n        LockedPartitionRight( D, DL, DR, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm\n            ( orientationOfA, orientationOfB, alpha, AR, BT, beta, EBL );\n            LocalGemm( orientationOfC, NORMAL, alpha, CR, DL, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm\n            ( orientationOfA, orientationOfB, alpha, AL, BB, beta, ETR );\n            LocalGemm( orientationOfC, NORMAL, alpha, CL, DR, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfB, orientationOfC,\n          alpha, AL, BT, CL, DL, beta, ETL );\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfB, orientationOfC,\n          alpha, AR, BB, CR, DR, beta, EBR );\n    }\n}\n\n// E := alpha (A^{T/H} B^{T/H} + C^{T/H} D^{T/H}) + beta E\ntemplate<typename T>\nvoid LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T,STAR,MC>& A, const DistMatrix<T,MR,STAR>& B,\n           const DistMatrix<T,STAR,MC>& C, const DistMatrix<T,MR,STAR>& D,\n  T beta,        DistMatrix<T>& E  )\n{\n    using namespace trr2k;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrr2k\");\n        CheckInput( A, B, C, D, E );\n    )\n    const Grid& g = E.Grid();\n\n    if( E.Height() < g.Width()*LocalTrr2kBlocksize<T>() )\n    {\n        LocalTrr2kKernel\n        ( uplo, orientationOfA, orientationOfB, orientationOfC, orientationOfD,\n          alpha, A, B, C, D, beta, E );\n    }\n    else\n    {\n        // Split E in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on ETL and EBR.\n        DistMatrix<T,STAR,MC> AL(g), AR(g),\n                              CL(g), CR(g);\n        DistMatrix<T,MR,STAR> BT(g),  DT(g),\n                              BB(g),  DB(g);\n        DistMatrix<T> ETL(g), ETR(g),\n                      EBL(g), EBR(g);\n\n        const Int half = E.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionDown( B, BT, BB, half );\n        LockedPartitionRight( C, CL, CR, half );\n        LockedPartitionDown( D, DT, DB, half );\n        PartitionDownDiagonal\n        ( E, ETL, ETR,\n             EBL, EBR, half );\n\n        if( uplo == LOWER )\n        { \n            LocalGemm\n            ( orientationOfA, orientationOfB, alpha, AR, BT, beta, EBL );\n            LocalGemm\n            ( orientationOfC, orientationOfD, alpha, CR, DT, T(1), EBL );\n        }\n        else\n        {\n            LocalGemm\n            ( orientationOfA, orientationOfB, alpha, AL, BB, beta, ETR );\n            LocalGemm\n            ( orientationOfC, orientationOfD, alpha, CL, DB, T(1), ETR );\n        }\n\n        // Recurse\n        LocalTrr2k\n        ( uplo, \n          orientationOfA, orientationOfB, orientationOfC, orientationOfD, \n          alpha, AL, BT, CL, DT, beta, ETL );\n\n        LocalTrr2k\n        ( uplo, \n          orientationOfA, orientationOfB, orientationOfC, orientationOfD,\n          alpha, AR, BB, CR, DB, beta, EBR );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_LOCAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/NNNN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_NNNN_HPP\n#define ELEM_TRR2K_NNNN_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A B + C D) + beta E\ntemplate<typename T>\nvoid Trr2kNNNN\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Trr2kNNNN\");\n        if( E.Height() != E.Width()  || A.Width()  != C.Width()  ||\n            A.Height() != E.Height() || C.Height() != E.Height() ||\n            B.Width()  != E.Width()  || D.Width()  != E.Width()  ||\n            A.Width()  != B.Height() || C.Width()  != D.Height() )\n            LogicError(\"Nonconformal Trr2kNNNN\");\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    DistMatrix<T> CL(g), CR(g),\n                  C0(g), C1(g), C2(g);\n    DistMatrix<T> DT(g),  D0(g),\n                  DB(g),  D1(g),\n                          D2(g);\n\n    DistMatrix<T,MC,STAR> A1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,MC,STAR> C1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> D1Trans_MR_STAR(g);\n\n    A1_MC_STAR.AlignWith( E );\n    B1Trans_MR_STAR.AlignWith( E );\n    C1_MC_STAR.AlignWith( E );\n    D1Trans_MR_STAR.AlignWith( E );\n\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    LockedPartitionRight( C, CL, CR, 0 );\n    LockedPartitionDown\n    ( D, DT,\n         DB, 0 );\n    while( AL.Width() < A.Width() )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n        LockedRepartitionRight\n        ( CL, /**/ CR,\n          C0, /**/ C1, C2 );\n        LockedRepartitionDown\n        ( DT,  D0,\n         /**/ /**/\n               D1,\n          DB,  D2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1;\n        C1_MC_STAR = C1;\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        D1.TransposeColAllGather( D1Trans_MR_STAR );\n        LocalTrr2k\n        ( uplo, TRANSPOSE, TRANSPOSE, \n          alpha, A1_MC_STAR, B1Trans_MR_STAR, \n                 C1_MC_STAR, D1Trans_MR_STAR, beta, E );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( DT,  D0,\n               D1,\n         /**/ /**/\n          DB,  D2 );\n        SlideLockedPartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 );\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_NNNN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/NNNT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_NNNT_HPP\n#define ELEM_TRR2K_NNNT_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A B + C D^{T/H}) + beta E\ntemplate<typename T>\nvoid Trr2kNNNT\n( UpperOrLower uplo,\n  Orientation orientationOfD,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Trr2kNNNT\");\n        if( E.Height() != E.Width()  || A.Width()  != C.Width()  ||\n            A.Height() != E.Height() || C.Height() != E.Height() ||\n            B.Width()  != E.Width()  || D.Height() != E.Width()  ||\n            A.Width()  != B.Height() || C.Width()  != D.Width() )\n            LogicError(\"Nonconformal Trr2kNNNT\");\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    DistMatrix<T> CL(g), CR(g),\n                  C0(g), C1(g), C2(g);\n    DistMatrix<T> DL(g), DR(g),\n                  D0(g), D1(g), D2(g);\n\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,MC,  STAR> C1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> D1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > D1Trans_STAR_MR(g);\n\n    A1_MC_STAR.AlignWith( E );\n    B1Trans_MR_STAR.AlignWith( E );\n    C1_MC_STAR.AlignWith( E );\n    D1_VR_STAR.AlignWith( E );\n    D1Trans_STAR_MR.AlignWith( E );\n\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    LockedPartitionRight( C, CL, CR, 0 );\n    LockedPartitionRight( D, DL, DR, 0 );\n    while( AL.Width() < A.Width() )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n        LockedRepartitionRight\n        ( CL, /**/ CR,\n          C0, /**/ C1, C2 );\n        LockedRepartitionRight\n        ( CL, /**/ CR,\n          C0, /**/ C1, C2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1;\n        C1_MC_STAR = C1;\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        D1_VR_STAR = D1;\n        D1_VR_STAR.TransposePartialColAllGather\n        ( D1Trans_STAR_MR, (orientationOfD==ADJOINT) );\n        LocalTrr2k\n        ( uplo, TRANSPOSE, \n          alpha, A1_MC_STAR, B1Trans_MR_STAR, \n                 C1_MC_STAR, D1Trans_STAR_MR, beta, E );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( DL,     /**/ DR,\n          D0, D1, /**/ D2 );\n        SlideLockedPartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 );\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_NNNT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/NNTN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_NNTN_HPP\n#define ELEM_TRR2K_NNTN_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A B + C^{T/H} D) + beta E\ntemplate<typename T>\nvoid Trr2kNNTN\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Trr2kNNTN\");\n        if( E.Height() != E.Width()  || A.Width()  != C.Height() ||\n            A.Height() != E.Height() || C.Width()  != E.Height() ||\n            B.Width()  != E.Width()  || D.Width()  != E.Width()  ||\n            A.Width()  != B.Height() || C.Height() != D.Height() )\n            LogicError(\"Nonconformal Trr2kNNTN\");\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n    DistMatrix<T> DT(g),  D0(g),\n                  DB(g),  D1(g),\n                          D2(g);\n\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,STAR,MC  > C1_STAR_MC(g);\n    DistMatrix<T,MR,  STAR> D1Trans_MR_STAR(g);\n\n    A1_MC_STAR.AlignWith( E );\n    B1Trans_MR_STAR.AlignWith( E );\n    C1_STAR_MC.AlignWith( E );\n    D1Trans_MR_STAR.AlignWith( E );\n\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    LockedPartitionDown\n    ( C, CT,\n         CB, 0 );\n    LockedPartitionDown\n    ( D, DT,\n         DB, 0 );\n    while( AL.Width() < A.Width() )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n        LockedRepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n        LockedRepartitionDown\n        ( DT,  D0,\n         /**/ /**/\n               D1,\n          DB,  D2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1;\n        C1_STAR_MC = C1;\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        D1.TransposeColAllGather( D1Trans_MR_STAR );\n        LocalTrr2k\n        ( uplo, TRANSPOSE, orientationOfC, TRANSPOSE,\n          alpha, A1_MC_STAR, B1Trans_MR_STAR, \n                 C1_STAR_MC, D1Trans_MR_STAR,\n          beta,  E );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( DT,  D0,\n               D1,\n         /**/ /**/\n          DB,  D2 );\n        SlideLockedPartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_NNTN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/NNTT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_NNTT_HPP\n#define ELEM_TRR2K_NNTT_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A B + C^{T/H} D^{T/H}) + beta E\ntemplate<typename T>\nvoid Trr2kNNTT\n( UpperOrLower uplo,\n  Orientation orientationOfC, Orientation orientationOfD,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Trr2kNNTT\");\n        if( E.Height() != E.Width()  || A.Width()  != C.Height() ||\n            A.Height() != E.Height() || C.Width()  != E.Height() ||\n            B.Width()  != E.Width()  || D.Height() != E.Width()  ||\n            A.Width()  != B.Height() || C.Height() != D.Width() )\n            LogicError(\"Nonconformal Trr2kNNTT\");\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n    DistMatrix<T> DL(g), DR(g),\n                  D0(g), D1(g), D2(g);\n\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,STAR,MC  > C1_STAR_MC(g);\n    DistMatrix<T,VR,  STAR> D1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > D1Trans_STAR_MR(g);\n\n    A1_MC_STAR.AlignWith( E );\n    B1Trans_MR_STAR.AlignWith( E );\n    C1_STAR_MC.AlignWith( E );\n    D1_VR_STAR.AlignWith( E );\n    D1Trans_STAR_MR.AlignWith( E );\n\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    LockedPartitionDown\n    ( C, CT,\n         CB, 0 );\n    LockedPartitionRight( D, DL, DR, 0 );\n    while( AL.Width() < A.Width() )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n        LockedRepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n        LockedRepartitionRight\n        ( DL, /**/ DR,\n          D0, /**/ D1, D2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1;\n        C1_STAR_MC = C1;\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        D1_VR_STAR = D1;\n        D1_VR_STAR.TransposePartialColAllGather\n        ( D1Trans_STAR_MR, (orientationOfD==ADJOINT) );\n        LocalTrr2k\n        ( uplo, TRANSPOSE, orientationOfC,\n          alpha, A1_MC_STAR, B1Trans_MR_STAR, \n                 C1_STAR_MC, D1Trans_STAR_MR, beta, E );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( DL,     /**/ DR,\n          D0, D1, /**/ D2 );\n        SlideLockedPartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_NNTT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/NTNN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_NTNN_HPP\n#define ELEM_TRR2K_NTNN_HPP\n\n#include \"./NNNT.hpp\"\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A B^{T/H} + C D) + beta E\ntemplate<typename T>\nvoid Trr2kNTNN\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::Trr2kNTNN\"))\n    Trr2kNNNT( uplo, orientationOfB, alpha, C, D, A, B, beta, E );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_NTNN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/NTNT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_NTNT_HPP\n#define ELEM_TRR2K_NTNT_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A B^{T/H} + C D^{T/H}) + beta E\ntemplate<typename T>\nvoid Trr2kNTNT\n( UpperOrLower uplo,\n  Orientation orientationOfB, Orientation orientationOfD,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Trr2kNTNT\");\n        if( E.Height() != E.Width()  || A.Width()  != C.Width()  ||\n            A.Height() != E.Height() || C.Height() != E.Height() ||\n            B.Height() != E.Width()  || D.Height() != E.Width()  ||\n            A.Width()  != B.Width()  || C.Width()  != D.Width() )\n            LogicError(\"Nonconformal Trr2kNTNT\");\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n\n    DistMatrix<T> CL(g), CR(g),\n                  C0(g), C1(g), C2(g);\n    DistMatrix<T> DL(g), DR(g),\n                  D0(g), D1(g), D2(g);\n\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > B1Trans_STAR_MR(g);\n    DistMatrix<T,MC,  STAR> C1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> D1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > D1Trans_STAR_MR(g);\n\n    A1_MC_STAR.AlignWith( E );\n    B1_VR_STAR.AlignWith( E );\n    B1Trans_STAR_MR.AlignWith( E );\n    C1_MC_STAR.AlignWith( E );\n    D1_VR_STAR.AlignWith( E );\n    D1Trans_STAR_MR.AlignWith( E );\n\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    LockedPartitionRight( C, CL, CR, 0 );\n    LockedPartitionRight( D, DL, DR, 0 );\n    while( AL.Width() < A.Width() )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n        LockedRepartitionRight\n        ( CL, /**/ CR,\n          C0, /**/ C1, C2 );\n        LockedRepartitionRight\n        ( CL, /**/ CR,\n          C0, /**/ C1, C2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1;\n        C1_MC_STAR = C1;\n        B1_VR_STAR = B1;\n        D1_VR_STAR = D1;\n        B1_VR_STAR.TransposePartialColAllGather\n        ( B1Trans_STAR_MR, (orientationOfB==ADJOINT) );\n        D1_VR_STAR.TransposePartialColAllGather\n        ( D1Trans_STAR_MR, (orientationOfD==ADJOINT) );\n        LocalTrr2k\n        ( uplo, \n          alpha, A1_MC_STAR, B1Trans_STAR_MR, \n                 C1_MC_STAR, D1Trans_STAR_MR, beta, E );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( DL,     /**/ DR,\n          D0, D1, /**/ D2 );\n        SlideLockedPartitionRight\n        ( CL,     /**/ CR,\n          C0, C1, /**/ C2 );\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_NTNT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/NTTN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_NTTN_HPP\n#define ELEM_TRR2K_NTTN_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A B^{T/H} + C^{T/H} D) + beta E\ntemplate<typename T>\nvoid Trr2kNTTN\n( UpperOrLower uplo,\n  Orientation orientationOfB, Orientation orientationOfC,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Trr2kNTTN\");\n        if( E.Height() != E.Width()  || A.Width()  != C.Height() ||\n            A.Height() != E.Height() || C.Width()  != E.Height() ||\n            B.Height() != E.Width()  || D.Width()  != E.Width()  ||\n            A.Width()  != B.Width()  || C.Height() != D.Height() )\n            LogicError(\"Nonconformal Trr2kNTTN\");\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n    DistMatrix<T> DT(g),  D0(g),\n                  DB(g),  D1(g),\n                          D2(g);\n\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > B1Trans_STAR_MR(g);\n    DistMatrix<T,STAR,MC  > C1_STAR_MC(g);\n    DistMatrix<T,MR,  STAR> D1Trans_MR_STAR(g);\n\n    A1_MC_STAR.AlignWith( E );\n    B1_VR_STAR.AlignWith( E );\n    B1Trans_STAR_MR.AlignWith( E );\n    C1_STAR_MC.AlignWith( E );\n    D1Trans_MR_STAR.AlignWith( E );\n\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    LockedPartitionDown\n    ( C, CT,\n         CB, 0 );\n    LockedPartitionDown\n    ( D, DT,\n         DB, 0 );\n    while( AL.Width() < A.Width() )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n        LockedRepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n        LockedRepartitionDown\n        ( DT,  D0,\n         /**/ /**/\n               D1,\n          DB,  D2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1;\n        C1_STAR_MC = C1;\n        B1_VR_STAR = B1;\n        B1_VR_STAR.TransposePartialColAllGather\n        ( B1Trans_STAR_MR, (orientationOfB==ADJOINT) );\n        D1.TransposeColAllGather( D1Trans_MR_STAR );\n        LocalTrr2k \n        ( uplo, orientationOfC, TRANSPOSE,\n          alpha, A1_MC_STAR, B1Trans_STAR_MR,\n                 C1_STAR_MC, D1Trans_MR_STAR, beta, E );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n        SlideLockedPartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n        SlideLockedPartitionDown\n        ( DT,  D0,\n               D1,\n         /**/ /**/\n          DB,  D2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_NTTN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/NTTT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_NTTT_HPP\n#define ELEM_TRR2K_NTTT_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A B^{T/H} + C^{T/H} D^{T/H}) + beta E\ntemplate<typename T>\nvoid Trr2kNTTT\n( UpperOrLower uplo,\n  Orientation orientationOfB, \n  Orientation orientationOfC, Orientation orientationOfD,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Trr2kNTTT\");\n        if( E.Height() != E.Width()  || A.Width()  != C.Height() ||\n            A.Height() != E.Height() || C.Width()  != E.Height() ||\n            B.Height() != E.Width()  || D.Height() != E.Width()  ||\n            A.Width()  != B.Width()  || C.Height() != D.Width() )\n            LogicError(\"Nonconformal Trr2kNTTT\");\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n    DistMatrix<T> DL(g), DR(g),\n                  D0(g), D1(g), D2(g);\n\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > B1Trans_STAR_MR(g);\n    DistMatrix<T,STAR,MC  > C1_STAR_MC(g);\n    DistMatrix<T,VR,  STAR> D1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > D1Trans_STAR_MR(g);\n\n    A1_MC_STAR.AlignWith( E );\n    B1_VR_STAR.AlignWith( E );\n    B1Trans_STAR_MR.AlignWith( E );\n    C1_STAR_MC.AlignWith( E );\n    D1_VR_STAR.AlignWith( E );\n    D1Trans_STAR_MR.AlignWith( E );\n\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    LockedPartitionDown\n    ( C, CT,\n         CB, 0 );\n    LockedPartitionRight( D, DL, DR, 0 );\n    while( AL.Width() < A.Width() )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n        LockedRepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n        LockedRepartitionRight\n        ( DL, /**/ DR,\n          D0, /**/ D1, D2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1;\n        C1_STAR_MC = C1;\n        B1_VR_STAR = B1;\n        D1_VR_STAR = D1;\n        B1_VR_STAR.TransposePartialColAllGather\n        ( B1Trans_STAR_MR, (orientationOfB==ADJOINT) );\n        D1_VR_STAR.TransposePartialColAllGather\n        ( D1Trans_STAR_MR, (orientationOfD==ADJOINT) );\n        LocalTrr2k\n        ( uplo, orientationOfC,\n          alpha, A1_MC_STAR, B1Trans_STAR_MR, \n                 C1_STAR_MC, D1Trans_STAR_MR, beta, E );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( DL,     /**/ DR,\n          D0, D1, /**/ D2 );\n        SlideLockedPartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_NTTT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/README.md",
    "content": "### `src/blas-like/Trr2k/`\n\nThis folder contains the underlying implementations of rank-2k triangular \nupdates. In particular, in addition to this file, it holds:\n\n-  `Local.hpp`: all sequential implementations\n-  `NNNN.hpp`: parallel normal/normal/normal/normal implementations\n-  `NNNT.hpp`: parallel normal/normal/normal/transpose implementations\n-  `NNTN.hpp`: parallel normal/normal/transpose/normal implementations\n-  `NNTT.hpp`: etc.\n-  `NTNN.hpp`\n-  `NTNT.hpp`\n-  `NTTN.hpp`\n-  `NTTT.hpp`\n-  `TNNN.hpp`\n-  `TNNT.hpp`\n-  `TNTN.hpp`\n-  `TNTT.hpp`\n-  `TTNN.hpp`\n-  `TTNT.hpp`\n-  `TTTN.hpp`\n-  `TTTT.hpp`\n\n#### Notes\n\nThere are currently two TODO items related to this folder:\n\n1. Making the orientation options of LocalTrr2k more consistent with Trr2k\n2. Implementing sequential versions of Trr2k\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/TNNN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_TNNN_HPP\n#define ELEM_TRR2K_TNNN_HPP\n\n#include \"./NNTN.hpp\"\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A^{T/H} B + C D) + beta E\ntemplate<typename T>\nvoid Trr2kTNNN\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::Trr2kTNNN\"))\n    Trr2kNNTN( uplo, orientationOfA, alpha, C, D, A, B, beta, E );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_TNNN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/TNNT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_TNNT_HPP\n#define ELEM_TRR2K_TNNT_HPP\n\n#include \"./NTTN.hpp\"\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A^{T/H} B + C D^{T/H}) + beta E\ntemplate<typename T>\nvoid Trr2kTNNT\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfD,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::Trr2kTNNT\"))\n    Trr2kNTTN\n    ( uplo, orientationOfD, orientationOfA, alpha, C, D, A, B, beta, E );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_TNNT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/TNTN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_TNTN_HPP\n#define ELEM_TRR2K_TNTN_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A^{T/H} B + C^{T/H} D) + beta E\ntemplate<typename T>\nvoid Trr2kTNTN\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfC,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Trr2kTNTN\");\n        if( E.Height() != E.Width()  || A.Height() != C.Height() ||\n            A.Width()  != E.Height() || C.Width()  != E.Height() ||\n            B.Width()  != E.Width()  || D.Width()  != E.Width()  ||\n            A.Height() != B.Height() || C.Height() != D.Height() )\n            LogicError(\"Nonconformal Trr2kTNTN\");\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n    DistMatrix<T> DT(g),  D0(g),\n                  DB(g),  D1(g),\n                          D2(g);\n\n    DistMatrix<T,STAR,MC  > A1_STAR_MC(g);\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,STAR,MC  > C1_STAR_MC(g);\n    DistMatrix<T,MR,  STAR> D1Trans_MR_STAR(g);\n\n    A1_STAR_MC.AlignWith( E );\n    B1Trans_MR_STAR.AlignWith( E );\n    C1_STAR_MC.AlignWith( E );\n    D1Trans_MR_STAR.AlignWith( E );\n\n    LockedPartitionDown\n    ( A, AT,\n         AB, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    LockedPartitionDown\n    ( C, CT,\n         CB, 0 );\n    LockedPartitionDown\n    ( D, DT,\n         DB, 0 );\n    while( AT.Height() < A.Height() )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n        LockedRepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n        LockedRepartitionDown\n        ( DT,  D0,\n         /**/ /**/\n               D1,\n          DB,  D2 );\n\n        //--------------------------------------------------------------------//\n        A1_STAR_MC = A1;\n        C1_STAR_MC = C1;\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        D1.TransposeColAllGather( D1Trans_MR_STAR );\n        LocalTrr2k\n        ( uplo, orientationOfA, TRANSPOSE, orientationOfC, TRANSPOSE,\n          alpha, A1_STAR_MC, B1Trans_MR_STAR, \n                 C1_STAR_MC, D1Trans_MR_STAR, beta, E );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( DT,  D0,\n               D1,\n         /**/ /**/\n          DB,  D2 );\n        SlideLockedPartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_TNTN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/TNTT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_TNTT_HPP\n#define ELEM_TRR2K_TNTT_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A^{T/H} B + C^{T/H} D^{T/H}) + beta E\ntemplate<typename T>\nvoid Trr2kTNTT\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC, Orientation orientationOfD,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Trr2kTNTT\");\n        if( E.Height() != E.Width()  || A.Height() != C.Height() ||\n            A.Width()  != E.Height() || C.Width()  != E.Height() ||\n            B.Width()  != E.Width()  || D.Height() != E.Width()  ||\n            A.Height() != B.Height() || C.Height() != D.Width() )\n            LogicError(\"Nonconformal Trr2kNNTT\");\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n    DistMatrix<T> DL(g), DR(g),\n                  D0(g), D1(g), D2(g);\n\n    DistMatrix<T,STAR,MC  > A1_STAR_MC(g);\n    DistMatrix<T,MR,  STAR> B1Trans_MR_STAR(g);\n    DistMatrix<T,STAR,MC  > C1_STAR_MC(g);\n    DistMatrix<T,VR,  STAR> D1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > D1Trans_STAR_MR(g);\n\n    A1_STAR_MC.AlignWith( E );\n    B1Trans_MR_STAR.AlignWith( E );\n    C1_STAR_MC.AlignWith( E );\n    D1_VR_STAR.AlignWith( E );\n    D1Trans_STAR_MR.AlignWith( E );\n\n    LockedPartitionDown\n    ( A, AT,\n         AB, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    LockedPartitionDown\n    ( C, CT,\n         CB, 0 );\n    LockedPartitionRight( D, DL, DR, 0 );\n    while( AT.Height() < A.Height() )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n        LockedRepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n        LockedRepartitionRight\n        ( DL, /**/ DR,\n          D0, /**/ D1, D2 );\n\n        //--------------------------------------------------------------------//\n        A1_STAR_MC = A1;\n        C1_STAR_MC = C1;\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        D1_VR_STAR = D1;\n        D1_VR_STAR.TransposePartialColAllGather\n        ( D1Trans_STAR_MR, (orientationOfD==ADJOINT) );\n        LocalTrr2k\n        ( uplo, orientationOfA, TRANSPOSE, orientationOfC,\n          alpha, A1_STAR_MC, B1Trans_MR_STAR, \n                 C1_STAR_MC, D1Trans_STAR_MR, beta, E );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( DL,     /**/ DR,\n          D0, D1, /**/ D2 );\n        SlideLockedPartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_TNTT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/TTNN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_TTNN_HPP\n#define ELEM_TRR2K_TTNN_HPP\n\n#include \"./NNTT.hpp\"\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A^{T/H} B^{T/H} + C D) + beta E\ntemplate<typename T>\nvoid Trr2kTTNN\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::Trr2kTTNN\"))\n    Trr2kNNTT\n    ( uplo, orientationOfA, orientationOfB, alpha, C, D, A, B, beta, E );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_TTNN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/TTNT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_TTNT_HPP\n#define ELEM_TRR2K_TTNT_HPP\n\n#include \"./NTTT.hpp\"\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A^{T/H} B^{T/H} + C D^{T/H}) + beta E\ntemplate<typename T>\nvoid Trr2kTTNT\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfD, \n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::Trr2kTTNT\"))\n    Trr2kNTTT\n    ( uplo, orientationOfD, orientationOfA, orientationOfB,\n      alpha, C, D, A, B, beta, E );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_TTNT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/TTTN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_TTTN_HPP\n#define ELEM_TRR2K_TTTN_HPP\n\n#include \"./TNTT.hpp\"\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A^{T/H} B^{T/H} + C^{T/H} D) + beta E\ntemplate<typename T>\nvoid Trr2kTTTN\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"internal::Trr2kTTTN\"))\n    Trr2kTNTT\n    ( uplo, orientationOfC, orientationOfA, orientationOfB,\n      alpha, C, D, A, B, beta, E );\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_TTTN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k/TTTT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRR2K_TTTT_HPP\n#define ELEM_TRR2K_TTTT_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed E := alpha (A^{T/H} B^{T/H} + C^{T/H} D^{T/H}) + beta E\ntemplate<typename T>\nvoid Trr2kTTTT\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC, Orientation orientationOfD, \n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::Trr2kTTTT\");\n        if( E.Height() != E.Width()  || A.Height() != C.Height() ||\n            A.Width()  != E.Height() || C.Width()  != E.Height() ||\n            B.Height() != E.Width()  || D.Height() != E.Width()  ||\n            A.Height() != B.Width()  || C.Height() != D.Width() )\n            LogicError(\"Nonconformal Trr2kTTTT\");\n    )\n    const Grid& g = E.Grid();\n\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n\n    DistMatrix<T> CT(g),  C0(g),\n                  CB(g),  C1(g),\n                          C2(g);\n    DistMatrix<T> DL(g), DR(g),\n                  D0(g), D1(g), D2(g);\n\n    DistMatrix<T,STAR,MC  > A1_STAR_MC(g);\n    DistMatrix<T,VR,  STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > B1Trans_STAR_MR(g);\n    DistMatrix<T,STAR,MC  > C1_STAR_MC(g);\n    DistMatrix<T,VR,  STAR> D1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > D1Trans_STAR_MR(g);\n\n    A1_STAR_MC.AlignWith( E );\n    B1_VR_STAR.AlignWith( E );\n    B1Trans_STAR_MR.AlignWith( E );\n    C1_STAR_MC.AlignWith( E );\n    D1_VR_STAR.AlignWith( E );\n    D1Trans_STAR_MR.AlignWith( E );\n\n    LockedPartitionDown\n    ( A, AT,\n         AB, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    LockedPartitionDown\n    ( C, CT,\n         CB, 0 );\n    LockedPartitionRight( D, DL, DR, 0 );\n    while( AT.Height() < A.Height() )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n        LockedRepartitionDown\n        ( CT,  C0,\n         /**/ /**/\n               C1,\n          CB,  C2 );\n        LockedRepartitionRight\n        ( DL, /**/ DR,\n          D0, /**/ D1, D2 );\n\n        //--------------------------------------------------------------------//\n        A1_STAR_MC = A1;\n        C1_STAR_MC = C1;\n        B1_VR_STAR = B1;\n        D1_VR_STAR = D1;\n        B1_VR_STAR.TransposePartialColAllGather\n        ( B1Trans_STAR_MR, (orientationOfB==ADJOINT) );\n        D1_VR_STAR.TransposePartialColAllGather\n        ( D1Trans_STAR_MR, (orientationOfD==ADJOINT) );\n        LocalTrr2k\n        ( uplo, orientationOfA, orientationOfC,\n          alpha, A1_STAR_MC, B1Trans_STAR_MR,\n                 C1_STAR_MC, D1Trans_STAR_MR, beta, E );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( DL,     /**/ DR,\n          D0, D1, /**/ D2 );\n        SlideLockedPartitionDown\n        ( CT,  C0,\n               C1,\n         /**/ /**/\n          CB,  C2 );\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRR2K_TTTT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trr2k.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#include \"./Trr2k/Local.hpp\"\n#include \"./Trr2k/NNNN.hpp\"\n#include \"./Trr2k/NNNT.hpp\"\n#include \"./Trr2k/NNTN.hpp\"\n#include \"./Trr2k/NNTT.hpp\"\n#include \"./Trr2k/NTNN.hpp\"\n#include \"./Trr2k/NTNT.hpp\"\n#include \"./Trr2k/NTTN.hpp\"\n#include \"./Trr2k/NTTT.hpp\"\n#include \"./Trr2k/TNNN.hpp\"\n#include \"./Trr2k/TNNT.hpp\"\n#include \"./Trr2k/TNTN.hpp\"\n#include \"./Trr2k/TNTT.hpp\"\n#include \"./Trr2k/TTNN.hpp\"\n#include \"./Trr2k/TTNT.hpp\"\n#include \"./Trr2k/TTTN.hpp\"\n#include \"./Trr2k/TTTT.hpp\"\n\nnamespace elem {\n\n// This will be enabled as soon as the underlying routines are written\n/*\ntemplate<typename T>\nvoid Trr2k\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC, Orientation orientationOfD,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n           const Matrix<T>& C, const Matrix<T>& D,\n  T beta,        Matrix<T>& E )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trr2k\"))\n    const bool normalA = orientationOfA == NORMAL;\n    const bool normalB = orientationOfB == NORMAL;\n    const bool normalC = orientationOfC == NORMAL;\n    const bool normalD = orientationOfD == NORMAL;\n    Int subcase = 8*normalA + 4*normalB + 2*normalC + normalD;\n    switch( subcase )\n    {\n    case 0: \n        internal::Trr2kNNNN( uplo, alpha, A, B, C, D, beta, E );\n        break;\n    case 1:\n        internal::Trr2kNNNT\n        ( uplo, orientationOfD, alpha, A, B, C, D, beta, E );\n        break;\n    case 2:\n        internal::Trr2kNNTN\n        ( uplo, orientationOfC, alpha, A, B, C, D, beta, E );\n        break;\n    case 3:\n        internal::Trr2kNNTT\n        ( uplo, orientationOfC, orientationOfD, alpha, A, B, C, D, beta, E );\n        break;\n    case 4:\n        internal::Trr2kNTNN\n        ( uplo, orientationOfB, alpha, A, B, C, D, beta, E );\n        break;\n    case 5:\n        internal::Trr2kNTNT\n        ( uplo, orientationOfB, orientationOfD, alpha, A, B, C, D, beta, E );\n        break;\n    case 6:\n        internal::Trr2kNTTN\n        ( uplo, orientationOfB, orientationOfC, alpha, A, B, C, D, beta, E );\n        break;\n    case 7:\n        internal::Trr2kNTTT\n        ( uplo, orientationOfB, orientationOfC, orientationOfD, \n          alpha, A, B, C, D, beta, E );\n        break;\n    case 8:\n        internal::Trr2kTNNN\n        ( uplo, orientationOfA, alpha, A, B, C, D, beta, E );\n        break;\n    case 9:\n        internal::Trr2kTNNT\n        ( uplo, orientationOfA, orientationOfD, alpha, A, B, C, D, beta, E );\n        break;\n    case 10:\n        internal::Trr2kTNTN\n        ( uplo, orientationOfA, orientationOfC, alpha, A, B, C, D, beta, E );\n        break;\n    case 11:\n        internal::Trr2kTNTT\n        ( uplo, orientationOfA, orientationOfC, orientationOfD,\n          alpha, A, B, C, D, beta, E );\n        break;\n    case 12:\n        internal::Trr2kTTNN\n        ( uplo, orientationOfA, orientationOfB, alpha, A, B, C, D, beta, E );\n        break;\n    case 13:\n        internal::Trr2kTTNT\n        ( uplo, orientationOfA, orientationOfB, orientationOfD,\n          alpha, A, B, C, D, beta, E );\n        break;\n    case 14:\n        internal::Trr2kTTTN\n        ( uplo, orientationOfA, orientationOfB, orientationOfC,\n          alpha, A, B, C, D, beta, E );\n        break;\n    case 15:\n        internal::Trr2kTTTN\n        ( uplo, orientationOfA, orientationOfB, orientationOfC, orientationOfD,\n          alpha, A, B, C, D, beta, E );\n        break;\n    default:\n        LogicError(\"Impossible subcase\");\n    }\n}\n*/\n\ntemplate<typename T>\nvoid Trr2k\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC, Orientation orientationOfD,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n           const DistMatrix<T>& C, const DistMatrix<T>& D,\n  T beta,        DistMatrix<T>& E )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trr2k\"))\n    const bool normalA = orientationOfA == NORMAL;\n    const bool normalB = orientationOfB == NORMAL;\n    const bool normalC = orientationOfC == NORMAL;\n    const bool normalD = orientationOfD == NORMAL;\n    Int subcase = 8*normalA + 4*normalB + 2*normalC + normalD;\n    switch( subcase )\n    {\n    case 0: \n        internal::Trr2kNNNN( uplo, alpha, A, B, C, D, beta, E );\n        break;\n    case 1:\n        internal::Trr2kNNNT\n        ( uplo, orientationOfD, alpha, A, B, C, D, beta, E );\n        break;\n    case 2:\n        internal::Trr2kNNTN\n        ( uplo, orientationOfC, alpha, A, B, C, D, beta, E );\n        break;\n    case 3:\n        internal::Trr2kNNTT\n        ( uplo, orientationOfC, orientationOfD, alpha, A, B, C, D, beta, E );\n        break;\n    case 4:\n        internal::Trr2kNTNN\n        ( uplo, orientationOfB, alpha, A, B, C, D, beta, E );\n        break;\n    case 5:\n        internal::Trr2kNTNT\n        ( uplo, orientationOfB, orientationOfD, alpha, A, B, C, D, beta, E );\n        break;\n    case 6:\n        internal::Trr2kNTTN\n        ( uplo, orientationOfB, orientationOfC, alpha, A, B, C, D, beta, E );\n        break;\n    case 7:\n        internal::Trr2kNTTT\n        ( uplo, orientationOfB, orientationOfC, orientationOfD, \n          alpha, A, B, C, D, beta, E );\n        break;\n    case 8:\n        internal::Trr2kTNNN\n        ( uplo, orientationOfA, alpha, A, B, C, D, beta, E );\n        break;\n    case 9:\n        internal::Trr2kTNNT\n        ( uplo, orientationOfA, orientationOfD, alpha, A, B, C, D, beta, E );\n        break;\n    case 10:\n        internal::Trr2kTNTN\n        ( uplo, orientationOfA, orientationOfC, alpha, A, B, C, D, beta, E );\n        break;\n    case 11:\n        internal::Trr2kTNTT\n        ( uplo, orientationOfA, orientationOfC, orientationOfD,\n          alpha, A, B, C, D, beta, E );\n        break;\n    case 12:\n        internal::Trr2kTTNN\n        ( uplo, orientationOfA, orientationOfB, alpha, A, B, C, D, beta, E );\n        break;\n    case 13:\n        internal::Trr2kTTNT\n        ( uplo, orientationOfA, orientationOfB, orientationOfD,\n          alpha, A, B, C, D, beta, E );\n        break;\n    case 14:\n        internal::Trr2kTTTN\n        ( uplo, orientationOfA, orientationOfB, orientationOfC,\n          alpha, A, B, C, D, beta, E );\n        break;\n    case 15:\n        internal::Trr2kTTTT\n        ( uplo, orientationOfA, orientationOfB, orientationOfC, orientationOfD,\n          alpha, A, B, C, D, beta, E );\n        break;\n    default:\n        LogicError(\"Impossible subcase\");\n    }\n}\n\n#ifndef ELEM_DISABLE_FLOAT\ntemplate void Trr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC, Orientation orientationOfD,\n  float alpha, const DistMatrix<float>& A, const DistMatrix<float>& B,\n               const DistMatrix<float>& C, const DistMatrix<float>& D,\n  float beta,        DistMatrix<float>& E );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  float alpha, const DistMatrix<float,MC,  STAR>& A, \n               const DistMatrix<float,STAR,MR>& B,\n               const DistMatrix<float,MC,  STAR>& C, \n               const DistMatrix<float,STAR,MR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfD,\n  float alpha, const DistMatrix<float,MC,  STAR>& A, \n               const DistMatrix<float,STAR,MR>& B,\n               const DistMatrix<float,MC,  STAR>& C, \n               const DistMatrix<float,MR,STAR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  float alpha, const DistMatrix<float,MC,  STAR>& A, \n               const DistMatrix<float,STAR,MR>& B,\n               const DistMatrix<float,STAR,MC  >& C, \n               const DistMatrix<float,STAR,MR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  float alpha, const DistMatrix<float,MC,  STAR>& A, \n               const DistMatrix<float,STAR,MR>& B,\n               const DistMatrix<float,STAR,MC  >& C, \n               const DistMatrix<float,MR,STAR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  float alpha, const DistMatrix<float,MC,  STAR>& A, \n               const DistMatrix<float,MR,STAR>& B,\n               const DistMatrix<float,MC,  STAR>& C, \n               const DistMatrix<float,STAR,MR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  float alpha, const DistMatrix<float,MC,STAR>& A, \n               const DistMatrix<float,MR,STAR>& B,\n               const DistMatrix<float,MC,STAR>& C, \n               const DistMatrix<float,MR,STAR>& D,\n  float beta,        DistMatrix<float,MC,MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  float alpha, const DistMatrix<float,MC,  STAR>& A, \n               const DistMatrix<float,MR,STAR>& B,\n               const DistMatrix<float,STAR,MC  >& C, \n               const DistMatrix<float,STAR,MR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  float alpha, const DistMatrix<float,MC,  STAR>& A, \n               const DistMatrix<float,MR,STAR>& B,\n               const DistMatrix<float,STAR,MC  >& C, \n               const DistMatrix<float,MR,STAR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  float alpha, const DistMatrix<float,STAR,MC  >& A, \n               const DistMatrix<float,STAR,MR>& B,\n               const DistMatrix<float,MC,  STAR>& C, \n               const DistMatrix<float,STAR,MR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfD,\n  float alpha, const DistMatrix<float,STAR,MC  >& A, \n               const DistMatrix<float,STAR,MR>& B,\n               const DistMatrix<float,MC,  STAR>& C, \n               const DistMatrix<float,MR,STAR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  float alpha, const DistMatrix<float,STAR,MC>& A, \n               const DistMatrix<float,STAR,MR>& B,\n               const DistMatrix<float,STAR,MC>& C, \n               const DistMatrix<float,STAR,MR>& D,\n  float beta,        DistMatrix<float,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  float alpha, const DistMatrix<float,STAR,MC>& A, \n               const DistMatrix<float,STAR,MR>& B,\n               const DistMatrix<float,STAR,MC>& C, \n               const DistMatrix<float,MR,STAR>& D,\n  float beta,        DistMatrix<float,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  float alpha, const DistMatrix<float,STAR,MC  >& A, \n               const DistMatrix<float,MR,STAR>& B,\n               const DistMatrix<float,MC,  STAR>& C, \n               const DistMatrix<float,STAR,MR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  float alpha, const DistMatrix<float,STAR,MC  >& A, \n               const DistMatrix<float,MR,STAR>& B,\n               const DistMatrix<float,MC,  STAR>& C, \n               const DistMatrix<float,MR,STAR>& D,\n  float beta,        DistMatrix<float,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  float alpha, const DistMatrix<float,STAR,MC>& A, \n               const DistMatrix<float,MR,STAR>& B,\n               const DistMatrix<float,STAR,MC>& C, \n               const DistMatrix<float,STAR,MR>& D,\n  float beta,        DistMatrix<float,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  float alpha, const DistMatrix<float,STAR,MC>& A, \n               const DistMatrix<float,MR,STAR>& B,\n               const DistMatrix<float,STAR,MC>& C, \n               const DistMatrix<float,MR,STAR>& D,\n  float beta,        DistMatrix<float,MC,  MR>& E  );\n#ifndef ELEM_DISABLE_COMPLEX\ntemplate void Trr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC, Orientation orientationOfD,\n  Complex<float> alpha, const DistMatrix<Complex<float>>& A, \n                        const DistMatrix<Complex<float>>& B,\n                        const DistMatrix<Complex<float>>& C, \n                        const DistMatrix<Complex<float>>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>>& E );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Complex<float> alpha, const DistMatrix<Complex<float>,MC,  STAR>& A, \n                        const DistMatrix<Complex<float>,STAR,MR>& B,\n                        const DistMatrix<Complex<float>,MC,  STAR>& C, \n                        const DistMatrix<Complex<float>,STAR,MR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfD,\n  Complex<float> alpha, const DistMatrix<Complex<float>,MC,  STAR>& A, \n                        const DistMatrix<Complex<float>,STAR,MR>& B,\n                        const DistMatrix<Complex<float>,MC,  STAR>& C, \n                        const DistMatrix<Complex<float>,MR,STAR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  Complex<float> alpha, const DistMatrix<Complex<float>,MC,  STAR>& A, \n                        const DistMatrix<Complex<float>,STAR,MR>& B,\n                        const DistMatrix<Complex<float>,STAR,MC  >& C, \n                        const DistMatrix<Complex<float>,STAR,MR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  Complex<float> alpha, const DistMatrix<Complex<float>,MC,  STAR>& A, \n                        const DistMatrix<Complex<float>,STAR,MR>& B,\n                        const DistMatrix<Complex<float>,STAR,MC  >& C, \n                        const DistMatrix<Complex<float>,MR,STAR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Complex<float> alpha, const DistMatrix<Complex<float>,MC,  STAR>& A, \n                        const DistMatrix<Complex<float>,MR,STAR>& B,\n                        const DistMatrix<Complex<float>,MC,  STAR>& C, \n                        const DistMatrix<Complex<float>,STAR,MR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  Complex<float> alpha, const DistMatrix<Complex<float>,MC,STAR>& A, \n                        const DistMatrix<Complex<float>,MR,STAR>& B,\n                        const DistMatrix<Complex<float>,MC,STAR>& C, \n                        const DistMatrix<Complex<float>,MR,STAR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Complex<float> alpha, const DistMatrix<Complex<float>,MC,  STAR>& A, \n                        const DistMatrix<Complex<float>,MR,STAR>& B,\n                        const DistMatrix<Complex<float>,STAR,MC  >& C, \n                        const DistMatrix<Complex<float>,STAR,MR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  Complex<float> alpha, const DistMatrix<Complex<float>,MC,  STAR>& A, \n                        const DistMatrix<Complex<float>,MR,STAR>& B,\n                        const DistMatrix<Complex<float>,STAR,MC  >& C, \n                        const DistMatrix<Complex<float>,MR,STAR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Complex<float> alpha, const DistMatrix<Complex<float>,STAR,MC  >& A, \n                        const DistMatrix<Complex<float>,STAR,MR>& B,\n                        const DistMatrix<Complex<float>,MC,  STAR>& C, \n                        const DistMatrix<Complex<float>,STAR,MR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfD,\n  Complex<float> alpha, const DistMatrix<Complex<float>,STAR,MC  >& A, \n                        const DistMatrix<Complex<float>,STAR,MR>& B,\n                        const DistMatrix<Complex<float>,MC,  STAR>& C, \n                        const DistMatrix<Complex<float>,MR,STAR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  Complex<float> alpha, const DistMatrix<Complex<float>,STAR,MC>& A, \n                        const DistMatrix<Complex<float>,STAR,MR>& B,\n                        const DistMatrix<Complex<float>,STAR,MC>& C, \n                        const DistMatrix<Complex<float>,STAR,MR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  Complex<float> alpha, const DistMatrix<Complex<float>,STAR,MC>& A, \n                        const DistMatrix<Complex<float>,STAR,MR>& B,\n                        const DistMatrix<Complex<float>,STAR,MC>& C, \n                        const DistMatrix<Complex<float>,MR,STAR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Complex<float> alpha, const DistMatrix<Complex<float>,STAR,MC  >& A, \n                        const DistMatrix<Complex<float>,MR,STAR>& B,\n                        const DistMatrix<Complex<float>,MC,  STAR>& C, \n                        const DistMatrix<Complex<float>,STAR,MR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  Complex<float> alpha, const DistMatrix<Complex<float>,STAR,MC  >& A, \n                        const DistMatrix<Complex<float>,MR,STAR>& B,\n                        const DistMatrix<Complex<float>,MC,  STAR>& C, \n                        const DistMatrix<Complex<float>,MR,STAR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Complex<float> alpha, const DistMatrix<Complex<float>,STAR,MC>& A, \n                        const DistMatrix<Complex<float>,MR,STAR>& B,\n                        const DistMatrix<Complex<float>,STAR,MC>& C, \n                        const DistMatrix<Complex<float>,STAR,MR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  Complex<float> alpha, const DistMatrix<Complex<float>,STAR,MC>& A, \n                        const DistMatrix<Complex<float>,MR,STAR>& B,\n                        const DistMatrix<Complex<float>,STAR,MC>& C, \n                        const DistMatrix<Complex<float>,MR,STAR>& D,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR>& E  );\n#endif // ifndef ELEM_DISABLE_COMPLEX\n#endif // ifndef ELEM_DISABLE_FLOAT\n\ntemplate void Trr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC, Orientation orientationOfD,\n  double alpha, const DistMatrix<double>& A, const DistMatrix<double>& B,\n               const DistMatrix<double>& C, const DistMatrix<double>& D,\n  double beta,        DistMatrix<double>& E );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  double alpha, const DistMatrix<double,MC,  STAR>& A, \n                const DistMatrix<double,STAR,MR>& B,\n                const DistMatrix<double,MC,  STAR>& C, \n                const DistMatrix<double,STAR,MR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfD,\n  double alpha, const DistMatrix<double,MC,  STAR>& A, \n                const DistMatrix<double,STAR,MR>& B,\n                const DistMatrix<double,MC,  STAR>& C, \n                const DistMatrix<double,MR,STAR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  double alpha, const DistMatrix<double,MC,  STAR>& A, \n                const DistMatrix<double,STAR,MR>& B,\n                const DistMatrix<double,STAR,MC  >& C, \n                const DistMatrix<double,STAR,MR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  double alpha, const DistMatrix<double,MC,  STAR>& A, \n                const DistMatrix<double,STAR,MR>& B,\n                const DistMatrix<double,STAR,MC  >& C, \n                const DistMatrix<double,MR,STAR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  double alpha, const DistMatrix<double,MC,  STAR>& A, \n               const DistMatrix<double,MR,STAR>& B,\n               const DistMatrix<double,MC,  STAR>& C, \n               const DistMatrix<double,STAR,MR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  double alpha, const DistMatrix<double,MC,STAR>& A, \n                const DistMatrix<double,MR,STAR>& B,\n                const DistMatrix<double,MC,STAR>& C, \n                const DistMatrix<double,MR,STAR>& D,\n  double beta,        DistMatrix<double,MC,MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  double alpha, const DistMatrix<double,MC,  STAR>& A, \n                const DistMatrix<double,MR,STAR>& B,\n                const DistMatrix<double,STAR,MC  >& C, \n                const DistMatrix<double,STAR,MR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  double alpha, const DistMatrix<double,MC,  STAR>& A, \n                const DistMatrix<double,MR,STAR>& B,\n                const DistMatrix<double,STAR,MC  >& C, \n                const DistMatrix<double,MR,STAR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  double alpha, const DistMatrix<double,STAR,MC  >& A, \n                const DistMatrix<double,STAR,MR>& B,\n                const DistMatrix<double,MC,  STAR>& C, \n                const DistMatrix<double,STAR,MR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfD,\n  double alpha, const DistMatrix<double,STAR,MC  >& A, \n                const DistMatrix<double,STAR,MR>& B,\n                const DistMatrix<double,MC,  STAR>& C, \n                const DistMatrix<double,MR,STAR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  double alpha, const DistMatrix<double,STAR,MC>& A, \n                const DistMatrix<double,STAR,MR>& B,\n                const DistMatrix<double,STAR,MC>& C, \n                const DistMatrix<double,STAR,MR>& D,\n  double beta,        DistMatrix<double,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  double alpha, const DistMatrix<double,STAR,MC>& A, \n                const DistMatrix<double,STAR,MR>& B,\n                const DistMatrix<double,STAR,MC>& C, \n                const DistMatrix<double,MR,STAR>& D,\n  double beta,        DistMatrix<double,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  double alpha, const DistMatrix<double,STAR,MC  >& A, \n                const DistMatrix<double,MR,STAR>& B,\n                const DistMatrix<double,MC,  STAR>& C, \n                const DistMatrix<double,STAR,MR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  double alpha, const DistMatrix<double,STAR,MC  >& A, \n                const DistMatrix<double,MR,STAR>& B,\n                const DistMatrix<double,MC,  STAR>& C, \n                const DistMatrix<double,MR,STAR>& D,\n  double beta,        DistMatrix<double,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  double alpha, const DistMatrix<double,STAR,MC>& A, \n                const DistMatrix<double,MR,STAR>& B,\n                const DistMatrix<double,STAR,MC>& C, \n                const DistMatrix<double,STAR,MR>& D,\n  double beta,        DistMatrix<double,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  double alpha, const DistMatrix<double,STAR,MC>& A, \n                const DistMatrix<double,MR,STAR>& B,\n                const DistMatrix<double,STAR,MC>& C, \n                const DistMatrix<double,MR,STAR>& D,\n  double beta,        DistMatrix<double,MC,  MR>& E  );\n#ifndef ELEM_DISABLE_COMPLEX\ntemplate void Trr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Orientation orientationOfC, Orientation orientationOfD,\n  Complex<double> alpha, const DistMatrix<Complex<double>>& A, \n                         const DistMatrix<Complex<double>>& B,\n                         const DistMatrix<Complex<double>>& C, \n                         const DistMatrix<Complex<double>>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>>& E );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Complex<double> alpha, const DistMatrix<Complex<double>,MC,  STAR>& A, \n                         const DistMatrix<Complex<double>,STAR,MR>& B,\n                         const DistMatrix<Complex<double>,MC,  STAR>& C, \n                         const DistMatrix<Complex<double>,STAR,MR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfD,\n  Complex<double> alpha, const DistMatrix<Complex<double>,MC,  STAR>& A, \n                         const DistMatrix<Complex<double>,STAR,MR>& B,\n                         const DistMatrix<Complex<double>,MC,  STAR>& C, \n                         const DistMatrix<Complex<double>,MR,STAR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  Complex<double> alpha, const DistMatrix<Complex<double>,MC,  STAR>& A, \n                         const DistMatrix<Complex<double>,STAR,MR>& B,\n                         const DistMatrix<Complex<double>,STAR,MC  >& C, \n                         const DistMatrix<Complex<double>,STAR,MR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  Complex<double> alpha, const DistMatrix<Complex<double>,MC,  STAR>& A, \n                         const DistMatrix<Complex<double>,STAR,MR>& B,\n                         const DistMatrix<Complex<double>,STAR,MC  >& C, \n                         const DistMatrix<Complex<double>,MR,STAR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Complex<double> alpha, const DistMatrix<Complex<double>,MC,  STAR>& A, \n                         const DistMatrix<Complex<double>,MR,STAR>& B,\n                         const DistMatrix<Complex<double>,MC,  STAR>& C, \n                         const DistMatrix<Complex<double>,STAR,MR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  Complex<double> alpha, const DistMatrix<Complex<double>,MC,STAR>& A, \n                         const DistMatrix<Complex<double>,MR,STAR>& B,\n                         const DistMatrix<Complex<double>,MC,STAR>& C, \n                         const DistMatrix<Complex<double>,MR,STAR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Complex<double> alpha, const DistMatrix<Complex<double>,MC,  STAR>& A, \n                         const DistMatrix<Complex<double>,MR,STAR>& B,\n                         const DistMatrix<Complex<double>,STAR,MC  >& C, \n                         const DistMatrix<Complex<double>,STAR,MR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  Complex<double> alpha, const DistMatrix<Complex<double>,MC,  STAR>& A, \n                         const DistMatrix<Complex<double>,MR,STAR>& B,\n                         const DistMatrix<Complex<double>,STAR,MC  >& C, \n                         const DistMatrix<Complex<double>,MR,STAR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Complex<double> alpha, const DistMatrix<Complex<double>,STAR,MC  >& A, \n                         const DistMatrix<Complex<double>,STAR,MR>& B,\n                         const DistMatrix<Complex<double>,MC,  STAR>& C, \n                         const DistMatrix<Complex<double>,STAR,MR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfD,\n  Complex<double> alpha, const DistMatrix<Complex<double>,STAR,MC  >& A, \n                         const DistMatrix<Complex<double>,STAR,MR>& B,\n                         const DistMatrix<Complex<double>,MC,  STAR>& C, \n                         const DistMatrix<Complex<double>,MR,STAR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  Complex<double> alpha, const DistMatrix<Complex<double>,STAR,MC>& A, \n                         const DistMatrix<Complex<double>,STAR,MR>& B,\n                         const DistMatrix<Complex<double>,STAR,MC>& C, \n                         const DistMatrix<Complex<double>,STAR,MR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  Complex<double> alpha, const DistMatrix<Complex<double>,STAR,MC>& A, \n                         const DistMatrix<Complex<double>,STAR,MR>& B,\n                         const DistMatrix<Complex<double>,STAR,MC>& C, \n                         const DistMatrix<Complex<double>,MR,STAR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Complex<double> alpha, const DistMatrix<Complex<double>,STAR,MC  >& A, \n                         const DistMatrix<Complex<double>,MR,STAR>& B,\n                         const DistMatrix<Complex<double>,MC,  STAR>& C, \n                         const DistMatrix<Complex<double>,STAR,MR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfD,\n  Complex<double> alpha, const DistMatrix<Complex<double>,STAR,MC  >& A, \n                         const DistMatrix<Complex<double>,MR,STAR>& B,\n                         const DistMatrix<Complex<double>,MC,  STAR>& C, \n                         const DistMatrix<Complex<double>,MR,STAR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Complex<double> alpha, const DistMatrix<Complex<double>,STAR,MC>& A, \n                         const DistMatrix<Complex<double>,MR,STAR>& B,\n                         const DistMatrix<Complex<double>,STAR,MC>& C, \n                         const DistMatrix<Complex<double>,STAR,MR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR>& E  );\ntemplate void LocalTrr2k\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  Orientation orientationOfC,\n  Orientation orientationOfD,\n  Complex<double> alpha, const DistMatrix<Complex<double>,STAR,MC>& A, \n                         const DistMatrix<Complex<double>,MR,STAR>& B,\n                         const DistMatrix<Complex<double>,STAR,MC>& C, \n                         const DistMatrix<Complex<double>,MR,STAR>& D,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR>& E  );\n#endif // ifndef ELEM_DISABLE_COMPLEX\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trrk/Local.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRRK_LOCAL_HPP\n#define ELEM_TRRK_LOCAL_HPP\n\n#include ELEM_AXPYTRIANGLE_INC\n#include ELEM_SCALETRAPEZOID_INC\n#include ELEM_GEMM_INC\n\nnamespace elem {\n\nnamespace trrk {\n\n#ifndef ELEM_RELEASE\n\nvoid EnsureSame( const Grid& gA, const Grid& gB, const Grid& gC )\n{\n    if( gA != gB || gB != gC )\n        LogicError(\"Grids must be the same\");\n}\n\ntemplate<typename T>\nvoid EnsureConformal\n( const DistMatrix<T,MC,STAR>& A, const DistMatrix<T>& C, std::string name )\n{\n    if( A.Height() != C.Height() || A.ColAlign() != C.ColAlign() )\n        LogicError(name,\" not conformal with C\");\n}\n\ntemplate<typename T>\nvoid EnsureConformal\n( const DistMatrix<T,STAR,MC>& A, const DistMatrix<T>& C, std::string name )\n{\n    if( A.Width() != C.Height() || A.RowAlign() != C.ColAlign() )\n        LogicError(name,\" not conformal with C\");\n}\n\ntemplate<typename T>\nvoid EnsureConformal\n( const DistMatrix<T,MR,STAR>& A, const DistMatrix<T>& C, std::string name )\n{\n    if( A.Height() != C.Width() || A.ColAlign() != C.RowAlign() )\n        LogicError(name,\" not conformal with C\");\n}\n\ntemplate<typename T>\nvoid EnsureConformal\n( const DistMatrix<T,STAR,MR>& A, const DistMatrix<T>& C, std::string name )\n{\n    if( A.Width() != C.Width() || A.RowAlign() != C.RowAlign() )\n        LogicError(name,\" not conformal with C\");\n}\n\ntemplate<typename T,Distribution UA,Distribution VA,\n                    Distribution UB,Distribution VB>\nvoid CheckInput\n( const DistMatrix<T,UA,VA>& A, const DistMatrix<T,UB,VB>& B,\n  const DistMatrix<T>& C )\n{\n    EnsureSame( A.Grid(), B.Grid(), C.Grid() );\n    EnsureConformal( A, C, \"A\" );\n    EnsureConformal( B, C, \"B\" );\n}\n\n// Local C := alpha A B + beta C\ntemplate<typename T>\nvoid CheckInputNN( const Matrix<T>& A, const Matrix<T>& B, const Matrix<T>& C )\n{\n    if( A.Height() != C.Height() || B.Width()  != C.Width() ||\n        A.Width()  != B.Height() || A.Height() != B.Width() )\n        LogicError\n        (\"Nonconformal LocalTrrk:\\n\",\n         DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n}\n\n// Local C := alpha A B^{T/H} + beta C\ntemplate<typename T>\nvoid CheckInputNT\n( Orientation orientationOfB,\n  const Matrix<T>& A, const Matrix<T>& B, const Matrix<T>& C )\n{\n    if( orientationOfB == NORMAL )\n        LogicError(\"B must be (Conjugate)Transpose'd\");\n    if( A.Height() != C.Height() || B.Height() != C.Width() ||\n        A.Width()  != B.Width()  || A.Height() != B.Height() )\n        LogicError\n        (\"Nonconformal LocalTrrk:\\n\",\n         DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n}\n\n// Local C := alpha A^{T/H} B + beta C\ntemplate<typename T>\nvoid CheckInputTN\n( Orientation orientationOfA,\n  const Matrix<T>& A, const Matrix<T>& B, const Matrix<T>& C )\n{\n    if( orientationOfA == NORMAL )\n        LogicError(\"A must be (Conjugate)Transpose'd\");\n    if( A.Width() != C.Height() || B.Width() != C.Width() ||\n        A.Height() != B.Height() || A.Width() != B.Width() )\n        LogicError\n        (\"Nonconformal LocalTrrk:\\n\",\n         DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n}\n\n// Local C := alpha A^{T/H} B^{T/H} + beta C\ntemplate<typename T>\nvoid CheckInputTT\n( Orientation orientationOfA,\n  Orientation orientationOfB,\n  const Matrix<T>& A, const Matrix<T>& B, const Matrix<T>& C )\n{\n    if( orientationOfA == NORMAL )\n        LogicError(\"A must be (Conjugate)Transpose'd\");\n    if( orientationOfB == NORMAL )\n        LogicError(\"B must be (Conjugate)Transpose'd\");\n    if( A.Width() != C.Height() || B.Height() != C.Width() ||\n        A.Height() != B.Width() || A.Width() != B.Height() )\n        LogicError\n        (\"Nonconformal LocalTrrk:\\n\",\n         DimsString(A,\"A\"),\"\\n\",DimsString(B,\"B\"),\"\\n\",DimsString(C,\"C\"));\n}\n\n#endif // ifndef ELEM_RELEASE\n\n// Local C := alpha A B + beta C\ntemplate<typename T>\ninline void\nTrrkNNKernel\n( UpperOrLower uplo, \n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"TrrkNNKernel\");\n        CheckInputNN( A, B, C );\n    )\n    Matrix<T> AT, AB;\n    Matrix<T> BL, BR;\n    Matrix<T> CTL, CTR,\n              CBL, CBR;\n    Matrix<T> DTL, DBR;\n\n    const Int half = C.Height()/2;\n    ScaleTrapezoid( beta, uplo, C );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionRight( B, BL, BR, half );\n    PartitionDownDiagonal\n    ( C, CTL, CTR,\n         CBL, CBR, half );\n\n    if( uplo == LOWER )\n        Gemm( NORMAL, NORMAL, alpha, AB, BL, T(1), CBL );\n    else\n        Gemm( NORMAL, NORMAL, alpha, AT, BR, T(1), CTR );\n\n    Gemm( NORMAL, NORMAL, alpha, AT, BL, DTL );\n    AxpyTriangle( uplo, T(1), DTL, CTL );\n\n    Gemm( NORMAL, NORMAL, alpha, AB, BR, DBR );\n    AxpyTriangle( uplo, T(1), DBR, CBR );\n}\n\n// Distributed C := alpha A B + beta C\ntemplate<typename T>\ninline void\nLocalTrrkKernel\n( UpperOrLower uplo, \n  T alpha, const DistMatrix<T,MC,  STAR>& A,\n           const DistMatrix<T,STAR,MR  >& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrrkKernel\");\n        CheckInput( A, B, C );\n    )\n    const Grid& g = C.Grid();\n\n    DistMatrix<T,MC,STAR> AT(g), AB(g);\n    DistMatrix<T,STAR,MR> BL(g), BR(g);\n    DistMatrix<T> CTL(g), CTR(g),\n                  CBL(g), CBR(g);\n    DistMatrix<T> DTL(g), DBR(g);\n\n    const Int half = C.Height()/2;\n    ScaleTrapezoid( beta, uplo, C );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionRight( B, BL, BR, half );\n    PartitionDownDiagonal\n    ( C, CTL, CTR,\n         CBL, CBR, half );\n\n    if( uplo == LOWER )\n        LocalGemm( NORMAL, NORMAL, alpha, AB, BL, T(1), CBL );\n    else\n        LocalGemm( NORMAL, NORMAL, alpha, AT, BR, T(1), CTR );\n\n    DTL.AlignWith( CTL );\n    LocalGemm( NORMAL, NORMAL, alpha, AT, BL, DTL );\n    AxpyTriangle( uplo, T(1), DTL, CTL );\n\n    DBR.AlignWith( CBR );\n    LocalGemm( NORMAL, NORMAL, alpha, AB, BR, DBR );\n    AxpyTriangle( uplo, T(1), DBR, CBR );\n}\n\n// Local C := alpha A B^{T/H} + beta C\ntemplate<typename T>\ninline void\nTrrkNTKernel\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"TrrkNTKernel\");\n        CheckInputNT( orientationOfB, A, B, C );\n    )\n    Matrix<T> AT, AB;\n    Matrix<T> BT, BB;\n    Matrix<T> CTL, CTR,\n              CBL, CBR;\n    Matrix<T> DTL, DBR;\n\n    const Int half = C.Height()/2;\n    ScaleTrapezoid( beta, uplo, C );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionDown( B, BT, BB, half );\n    PartitionDownDiagonal\n    ( C, CTL, CTR,\n         CBL, CBR, half );\n\n    if( uplo == LOWER )\n        Gemm( NORMAL, orientationOfB, alpha, AB, BT, T(1), CBL );\n    else\n        Gemm( NORMAL, orientationOfB, alpha, AT, BB, T(1), CTR );\n\n    Gemm( NORMAL, orientationOfB, alpha, AT, BT, DTL );\n    AxpyTriangle( uplo, T(1), DTL, CTL );\n\n    Gemm( NORMAL, orientationOfB, alpha, AB, BB, DBR );\n    AxpyTriangle( uplo, T(1), DBR, CBR );\n}\n\n// Distributed C := alpha A B^{T/H} + beta C\ntemplate<typename T>\ninline void\nLocalTrrkKernel\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T,MC,STAR>& A,\n           const DistMatrix<T,MR,STAR>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrrkKernel\");\n        CheckInput( A, B, C );\n    )\n    const Grid& g = C.Grid();\n\n    DistMatrix<T,MC,STAR> AT(g), AB(g);\n    DistMatrix<T,MR,STAR> BT(g), BB(g);\n    DistMatrix<T> CTL(g), CTR(g),\n                  CBL(g), CBR(g);\n    DistMatrix<T> DTL(g), DBR(g);\n\n    const Int half = C.Height()/2;\n    ScaleTrapezoid( beta, uplo, C );\n    LockedPartitionDown( A, AT, AB, half );\n    LockedPartitionDown( B, BT, BB, half );\n    PartitionDownDiagonal\n    ( C, CTL, CTR,\n         CBL, CBR, half );\n\n    if( uplo == LOWER )\n        LocalGemm( NORMAL, orientationOfB, alpha, AB, BT, T(1), CBL );\n    else\n        LocalGemm( NORMAL, orientationOfB, alpha, AT, BB, T(1), CTR );\n\n    DTL.AlignWith( CTL );\n    LocalGemm( NORMAL, orientationOfB, alpha, AT, BT, DTL );\n    AxpyTriangle( uplo, T(1), DTL, CTL );\n\n    DBR.AlignWith( CBR );\n    LocalGemm( NORMAL, orientationOfB, alpha, AB, BB, DBR );\n    AxpyTriangle( uplo, T(1), DBR, CBR );\n}\n\n// Local C := alpha A^{T/H} B + beta C\ntemplate<typename T>\ninline void\nTrrkTNKernel\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"TrrkTNKernel\");\n        CheckInputTN( orientationOfA, A, B, C );\n    )\n    Matrix<T> AL, AR;\n    Matrix<T> BL, BR;\n    Matrix<T> CTL, CTR,\n              CBL, CBR;\n    Matrix<T> DTL, DBR;\n\n    const Int half = C.Height()/2;\n    ScaleTrapezoid( beta, uplo, C );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionRight( B, BL, BR, half );\n    PartitionDownDiagonal\n    ( C, CTL, CTR,\n         CBL, CBR, half );\n\n    if( uplo == LOWER )\n        Gemm( orientationOfA, NORMAL, alpha, AR, BL, T(1), CBL );\n    else\n        Gemm( orientationOfA, NORMAL, alpha, AL, BR, T(1), CTR );\n\n    Gemm( orientationOfA, NORMAL, alpha, AL, BL, DTL );\n    AxpyTriangle( uplo, T(1), DTL, CTL );\n\n    Gemm( orientationOfA, NORMAL, alpha, AR, BR, DBR );\n    AxpyTriangle( uplo, T(1), DBR, CBR );\n}\n\n// Distributed C := alpha A^{T/H} B + beta C\ntemplate<typename T>\ninline void\nLocalTrrkKernel\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  T alpha, const DistMatrix<T,STAR,MC>& A,\n           const DistMatrix<T,STAR,MR>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrrkKernel\");\n        CheckInput( A, B, C );\n    )\n    const Grid& g = C.Grid();\n\n    DistMatrix<T,STAR,MC> AL(g), AR(g);\n    DistMatrix<T,STAR,MR> BL(g), BR(g);\n    DistMatrix<T> CTL(g), CTR(g),\n                  CBL(g), CBR(g);\n    DistMatrix<T> DTL(g), DBR(g);\n\n    const Int half = C.Height()/2;\n    ScaleTrapezoid( beta, uplo, C );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionRight( B, BL, BR, half );\n    PartitionDownDiagonal\n    ( C, CTL, CTR,\n         CBL, CBR, half );\n\n    if( uplo == LOWER )\n        LocalGemm( orientationOfA, NORMAL, alpha, AR, BL, T(1), CBL );\n    else\n        LocalGemm( orientationOfA, NORMAL, alpha, AL, BR, T(1), CTR );\n\n    DTL.AlignWith( CTL );\n    LocalGemm( orientationOfA, NORMAL, alpha, AL, BL, DTL );\n    AxpyTriangle( uplo, T(1), DTL, CTL );\n\n    DBR.AlignWith( CBR );\n    LocalGemm( orientationOfA, NORMAL, alpha, AR, BR, DBR );\n    AxpyTriangle( uplo, T(1), DBR, CBR );\n}\n\n// Local C := alpha A^{T/H} B^{T/H} + beta C\ntemplate<typename T>\ninline void\nTrrkTTKernel\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"TrrkTTKernel\");\n        CheckInputTT( orientationOfA, orientationOfB, A, B, C );\n    )\n    Matrix<T> AL, AR;\n    Matrix<T> BT, BB;\n    Matrix<T> CTL, CTR,\n              CBL, CBR;\n    Matrix<T> DTL, DBR;\n\n    const Int half = C.Height()/2;\n    ScaleTrapezoid( beta, uplo, C );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionDown( B, BT, BB, half );\n    PartitionDownDiagonal\n    ( C, CTL, CTR,\n         CBL, CBR, half );\n\n    if( uplo == LOWER )\n        Gemm( orientationOfA, orientationOfB, alpha, AR, BT, T(1), CBL );\n    else\n        Gemm( orientationOfA, orientationOfB, alpha, AL, BB, T(1), CTR );\n\n    Gemm( orientationOfA, orientationOfB, alpha, AL, BT, DTL );\n    AxpyTriangle( uplo, T(1), DTL, CTL );\n\n    Gemm( orientationOfA, orientationOfB, alpha, AR, BB, DBR );\n    AxpyTriangle( uplo, T(1), DBR, CBR );\n}\n\n// Distributed C := alpha A^{T/H} B^{T/H} + beta C\ntemplate<typename T>\ninline void\nLocalTrrkKernel\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T,STAR,MC  >& A,\n           const DistMatrix<T,MR,  STAR>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrrkKernel\");\n        CheckInput( A, B, C );\n    )\n    const Grid& g = C.Grid();\n\n    DistMatrix<T,STAR,MC> AL(g), AR(g);\n    DistMatrix<T,MR,STAR> BT(g), BB(g);\n    DistMatrix<T> CTL(g), CTR(g),\n                  CBL(g), CBR(g);\n    DistMatrix<T> DTL(g), DBR(g);\n\n    const Int half = C.Height()/2;\n    ScaleTrapezoid( beta, uplo, C );\n    LockedPartitionRight( A, AL, AR, half );\n    LockedPartitionDown( B, BT, BB, half );\n    PartitionDownDiagonal\n    ( C, CTL, CTR,\n         CBL, CBR, half );\n\n    if( uplo == LOWER )\n        LocalGemm( orientationOfA, orientationOfB, alpha, AR, BT, T(1), CBL );\n    else\n        LocalGemm( orientationOfA, orientationOfB, alpha, AL, BB, T(1), CTR );\n\n    DTL.AlignWith( CTL );\n    LocalGemm( orientationOfA, orientationOfB, alpha, AL, BT, DTL );\n    AxpyTriangle( uplo, T(1), DTL, CTL );\n\n    DBR.AlignWith( CBR );\n    LocalGemm( orientationOfA, orientationOfB, alpha, AR, BB, DBR );\n    AxpyTriangle( uplo, T(1), DBR, CBR );\n}\n\n} // namespace trrk\n\nnamespace internal {\n\n// Local C := alpha A B + beta C\ntemplate<typename T>\nvoid TrrkNN\n( UpperOrLower uplo,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C )\n{\n    using namespace trrk;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrrkNN\");\n        CheckInputNN( A, B, C );\n    )\n    if( C.Height() < LocalTrrkBlocksize<T>() )\n    {\n        TrrkNNKernel( uplo, alpha, A, B, beta, C );\n    }\n    else\n    {\n        // Split C in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on CTL and CBR.\n        Matrix<T> AT, AB;\n        Matrix<T> BL, BR;\n        Matrix<T> CTL, CTR,\n                  CBL, CBR;\n\n        const Int half = C.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionRight( B, BL, BR, half );\n        PartitionDownDiagonal\n        ( C, CTL, CTR,\n             CBL, CBR, half );\n\n        if( uplo == LOWER )\n            Gemm( NORMAL, NORMAL, alpha, AB, BL, beta, CBL );\n        else\n            Gemm( NORMAL, NORMAL, alpha, AT, BR, beta, CTR );\n\n        // Recurse\n        TrrkNN( uplo, alpha, AT, BL, beta, CTL );\n        TrrkNN( uplo, alpha, AB, BR, beta, CBR );\n    }\n}\n\n// Local C := alpha A B^{T/H} + beta C\ntemplate<typename T>\nvoid TrrkNT\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C )\n{\n    using namespace trrk;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrrkNT\");\n        CheckInputNT( orientationOfB, A, B, C );\n    )\n    if( C.Height() < LocalTrrkBlocksize<T>() )\n    {\n        TrrkNTKernel( uplo, orientationOfB, alpha, A, B, beta, C );\n    }\n    else\n    {\n        // Split C in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on CTL and CBR.\n        Matrix<T> AT, AB;\n        Matrix<T> BT, BB;\n        Matrix<T> CTL, CTR,\n                  CBL, CBR;\n\n        const Int half = C.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionDown( B, BT, BB, half );\n        PartitionDownDiagonal\n        ( C, CTL, CTR,\n             CBL, CBR, half );\n\n        if( uplo == LOWER )\n            Gemm( NORMAL, orientationOfB, alpha, AB, BT, beta, CBL );\n        else\n            Gemm( NORMAL, orientationOfB, alpha, AT, BB, beta, CTR );\n\n        // Recurse\n        TrrkNT( uplo, orientationOfB, alpha, AT, BT, beta, CTL );\n        TrrkNT( uplo, orientationOfB, alpha, AB, BB, beta, CBR );\n    }\n}\n\n// Local C := alpha A^{T/H} B + beta C\ntemplate<typename T>\nvoid TrrkTN\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C )\n{\n    using namespace trrk;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrrkTN\");\n        CheckInputTN( orientationOfA, A, B, C );\n    )\n    if( C.Height() < LocalTrrkBlocksize<T>() )\n    {\n        TrrkTNKernel( uplo, orientationOfA, alpha, A, B, beta, C );\n    }\n    else\n    {\n        // Split C in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on CTL and CBR.\n        Matrix<T> AL, AR;\n        Matrix<T> BL, BR;\n        Matrix<T> CTL, CTR,\n                  CBL, CBR;\n\n        const Int half = C.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionRight( B, BL, BR, half );\n        PartitionDownDiagonal\n        ( C, CTL, CTR,\n             CBL, CBR, half );\n\n        if( uplo == LOWER )\n            Gemm( orientationOfA, NORMAL, alpha, AR, BL, beta, CBL );\n        else\n            Gemm( orientationOfA, NORMAL, alpha, AL, BR, beta, CTR );\n\n        // Recurse\n        TrrkTN( uplo, orientationOfA, alpha, AL, BL, beta, CTL );\n        TrrkTN( uplo, orientationOfA, alpha, AR, BR, beta, CBR );\n    }\n}\n\n// Local C := alpha A^{T/H} B^{T/H} + beta C\ntemplate<typename T>\nvoid TrrkTT\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C )\n{\n    using namespace trrk;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrrkTT\");\n        CheckInputTT( orientationOfA, orientationOfB, A, B, C );\n    )\n    if( C.Height() < LocalTrrkBlocksize<T>() )\n    {\n        TrrkTTKernel\n        ( uplo, orientationOfA, orientationOfB, alpha, A, B, beta, C );\n    }\n    else\n    {\n        // Split C in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on CTL and CBR.\n        Matrix<T> AL, AR;\n        Matrix<T> BT, BB;\n        Matrix<T> CTL, CTR,\n                  CBL, CBR;\n\n        const Int half = C.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionDown( B, BT, BB, half );\n        PartitionDownDiagonal\n        ( C, CTL, CTR,\n             CBL, CBR, half );\n\n        if( uplo == LOWER )\n            Gemm( orientationOfA, orientationOfB, alpha, AR, BT, beta, CBL );\n        else\n            Gemm( orientationOfA, orientationOfB, alpha, AL, BB, beta, CTR );\n\n        // Recurse\n        TrrkTT\n        ( uplo, orientationOfA, orientationOfB, alpha, AL, BT, beta, CTL );\n        TrrkTT\n        ( uplo, orientationOfA, orientationOfB, alpha, AR, BB, beta, CBR );\n    }\n}\n\n} // namespace internal\n\n// Distributed C := alpha A B + beta C\ntemplate<typename T>\nvoid LocalTrrk\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T,MC,  STAR>& A,\n           const DistMatrix<T,STAR,MR  >& B,\n  T beta,        DistMatrix<T>& C )\n{\n    using namespace trrk;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrrk\");\n        CheckInput( A, B, C );\n    )\n    const Grid& g = C.Grid();\n\n    if( C.Height() < g.Width()*LocalTrrkBlocksize<T>() )\n    {\n        LocalTrrkKernel( uplo, alpha, A, B, beta, C );\n    }\n    else\n    {\n        // Split C in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on CTL and CBR.\n        DistMatrix<T,MC,STAR> AT(g), AB(g);\n        DistMatrix<T,STAR,MR> BL(g), BR(g);\n        DistMatrix<T> CTL(g), CTR(g),\n                      CBL(g), CBR(g);\n\n        const Int half = C.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionRight( B, BL, BR, half );\n        PartitionDownDiagonal\n        ( C, CTL, CTR,\n             CBL, CBR, half );\n\n        if( uplo == LOWER )\n            LocalGemm( NORMAL, NORMAL, alpha, AB, BL, beta, CBL );\n        else\n            LocalGemm( NORMAL, NORMAL, alpha, AT, BR, beta, CTR );\n\n        // Recurse\n        LocalTrrk( uplo, alpha, AT, BL, beta, CTL );\n        LocalTrrk( uplo, alpha, AB, BR, beta, CBR );\n    }\n}\n\n// Distributed C := alpha A B^{T/H} + beta C\ntemplate<typename T>\nvoid LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T,MC,STAR>& A,\n           const DistMatrix<T,MR,STAR>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    using namespace trrk;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrrk\");\n        CheckInput( A, B, C );\n    )\n    const Grid& g = C.Grid();\n\n    if( C.Height() < g.Width()*LocalTrrkBlocksize<T>() )\n    {\n        LocalTrrkKernel( uplo, orientationOfB, alpha, A, B, beta, C );\n    }\n    else\n    {\n        // Split C in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on CTL and CBR.\n        DistMatrix<T,MC,STAR> AT(g), AB(g);\n        DistMatrix<T,MR,STAR> BT(g), BB(g);\n        DistMatrix<T> CTL(g), CTR(g),\n                      CBL(g), CBR(g);\n\n        const Int half = C.Height() / 2;\n        LockedPartitionDown( A, AT, AB, half );\n        LockedPartitionDown( B, BT, BB, half );\n        PartitionDownDiagonal\n        ( C, CTL, CTR,\n             CBL, CBR, half );\n\n        if( uplo == LOWER )\n            LocalGemm( NORMAL, orientationOfB, alpha, AB, BT, beta, CBL );\n        else\n            LocalGemm( NORMAL, orientationOfB, alpha, AT, BB, beta, CTR );\n\n        // Recurse\n        LocalTrrk( uplo, orientationOfB, alpha, AT, BT, beta, CTL );\n        LocalTrrk( uplo, orientationOfB, alpha, AB, BB, beta, CBR );\n    }\n}\n\n// Distributed C := alpha A^{T/H} B + beta C\ntemplate<typename T>\nvoid LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  T alpha, const DistMatrix<T,STAR,MC>& A,\n           const DistMatrix<T,STAR,MR>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    using namespace trrk;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrrk\");\n        CheckInput( A, B, C );\n    )\n    const Grid& g = C.Grid();\n\n    if( C.Height() < g.Width()*LocalTrrkBlocksize<T>() )\n    {\n        LocalTrrkKernel( uplo, orientationOfA, alpha, A, B, beta, C );\n    }\n    else\n    {\n        // Split C in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on CTL and CBR.\n        DistMatrix<T,STAR,MC> AL(g), AR(g);\n        DistMatrix<T,STAR,MR> BL(g), BR(g);\n        DistMatrix<T> CTL(g), CTR(g),\n                      CBL(g), CBR(g);\n\n        const Int half = C.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionRight( B, BL, BR, half );\n        PartitionDownDiagonal\n        ( C, CTL, CTR,\n             CBL, CBR, half );\n\n        if( uplo == LOWER )\n            LocalGemm( orientationOfA, NORMAL, alpha, AR, BL, beta, CBL );\n        else\n            LocalGemm( orientationOfA, NORMAL, alpha, AL, BR, beta, CTR );\n\n        // Recurse\n        LocalTrrk( uplo, orientationOfA, alpha, AL, BL, beta, CTL );\n        LocalTrrk( uplo, orientationOfA, alpha, AR, BR, beta, CBR );\n    }\n}\n\n// Distributed C := alpha A^{T/H} B^{T/H} + beta C\ntemplate<typename T>\nvoid LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T,STAR,MC  >& A,\n           const DistMatrix<T,MR,  STAR>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    using namespace trrk;\n    DEBUG_ONLY(\n        CallStackEntry cse(\"LocalTrrk\");\n        CheckInput( A, B, C );\n    )\n    const Grid& g = C.Grid();\n\n    if( C.Height() < g.Width()*LocalTrrkBlocksize<T>() )\n    {\n        LocalTrrkKernel\n        ( uplo, orientationOfA, orientationOfB, alpha, A, B, beta, C );\n    }\n    else\n    {\n        // Split C in four roughly equal pieces, perform a large gemm on corner\n        // and recurse on CTL and CBR.\n        DistMatrix<T,STAR,MC> AL(g), AR(g);\n        DistMatrix<T,MR,STAR> BT(g), BB(g);\n        DistMatrix<T> CTL(g), CTR(g),\n                      CBL(g), CBR(g);\n\n        const Int half = C.Height() / 2;\n        LockedPartitionRight( A, AL, AR, half );\n        LockedPartitionDown( B, BT, BB, half );\n        PartitionDownDiagonal\n        ( C, CTL, CTR,\n             CBL, CBR, half );\n\n        if( uplo == LOWER )\n            LocalGemm\n            ( orientationOfA, orientationOfB, alpha, AR, BT, beta, CBL );\n        else\n            LocalGemm\n            ( orientationOfA, orientationOfB, alpha, AL, BB, beta, CTR );\n\n        // Recurse\n        LocalTrrk\n        ( uplo, orientationOfA, orientationOfB, alpha, AL, BT, beta, CTL );\n        LocalTrrk\n        ( uplo, orientationOfA, orientationOfB, alpha, AR, BB, beta, CBR );\n    }\n}\n\n} // namespace elem\n\n#endif // ifndef ELEM_TRRK_LOCAL_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trrk/NN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRRK_NN_HPP\n#define ELEM_TRRK_NN_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed C := alpha A B + beta C\ntemplate<typename T>\nvoid TrrkNN\n( UpperOrLower uplo,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrrkNN\");\n        if( C.Height() != C.Width() || A.Height() != C.Height() || \n            B.Width() != C.Width() || A.Width() != B.Height() )\n            LogicError(\"Nonconformal TrrkNN\");\n    )\n    const Grid& g = C.Grid();\n\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    DistMatrix<T,MC,STAR> A1_MC_STAR(g);\n    DistMatrix<T,MR,STAR> B1Trans_MR_STAR(g);\n\n    A1_MC_STAR.AlignWith( C );\n    B1Trans_MR_STAR.AlignWith( C );\n\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    while( AL.Width() < A.Width() )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1;\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        LocalTrrk\n        ( uplo, TRANSPOSE, alpha, A1_MC_STAR, B1Trans_MR_STAR, beta, C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRRK_NN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trrk/NT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRRK_NT_HPP\n#define ELEM_TRRK_NT_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed C := alpha A B^{T/H} + beta C\ntemplate<typename T>\nvoid TrrkNT\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrrkNT\");\n        if( C.Height() != C.Width() || A.Height() != C.Height() || \n            B.Height() != C.Width() || A.Width() != B.Width() )\n            LogicError(\"Nonconformal TrrkNT\");\n        if( orientationOfB == NORMAL )\n            LogicError(\"Orientation must be ADJOINT or TRANSPOSE\");\n    )\n    const Grid& g = C.Grid();\n\n    DistMatrix<T> AL(g), AR(g),\n                  A0(g), A1(g), A2(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n\n    DistMatrix<T,MC,  STAR> A1_MC_STAR(g);\n    DistMatrix<T,VR,  STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR  > B1Trans_STAR_MR(g);\n\n    A1_MC_STAR.AlignWith( C );\n    B1_VR_STAR.AlignWith( C );\n    B1Trans_STAR_MR.AlignWith( C );\n\n    LockedPartitionRight( A, AL, AR, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    while( AL.Width() < A.Width() )\n    {\n        LockedRepartitionRight\n        ( AL, /**/ AR,\n          A0, /**/ A1, A2 );\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n\n        //--------------------------------------------------------------------//\n        A1_MC_STAR = A1;\n        B1_VR_STAR = B1;\n        B1_VR_STAR.TransposePartialColAllGather\n        ( B1Trans_STAR_MR, (orientationOfB==ADJOINT) );\n        LocalTrrk( uplo, alpha, A1_MC_STAR, B1Trans_STAR_MR, beta, C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n        SlideLockedPartitionRight\n        ( AL,     /**/ AR,\n          A0, A1, /**/ A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRRK_NT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trrk/README.md",
    "content": "### `src/blas-like/Trrk/`\n\nThis folder contains the underlying implementations of rank-k triangular \nupdates. In particular, in addition to this file, it holds:\n\n-  `Local.hpp`: all sequential implementations\n-  `NN.hpp`: parallel normal/normal implementations\n-  `NT.hpp`: parallel normal/transposed implementations\n-  `TN.hpp`: parallel transposed/normal implementations\n-  `TT.hpp`: parallel transposed/transposed implementations\n\n#### Notes\n\nThere is currently one TODO item related to this folder:\n\n1. Making the orientation options of LocalTrrk more consistent with Trrk\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trrk/TN.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRRK_TN_HPP\n#define ELEM_TRRK_TN_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed C := alpha A^{T/H} B + beta C\ntemplate<typename T>\nvoid TrrkTN\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrrkTN\");\n        if( C.Height() != C.Width() || A.Width() != C.Height() || \n            B.Width() != C.Width() || A.Height() != B.Height() )\n            LogicError(\"Nonconformal TrrkTN\");\n        if( orientationOfA == NORMAL )\n            LogicError(\"Orientation must be ADJOINT or NORMAL\");\n    )\n    const Grid& g = C.Grid();\n\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> BT(g),  B0(g),\n                  BB(g),  B1(g),\n                          B2(g);\n\n    DistMatrix<T,STAR,MC> A1_STAR_MC(g);\n    DistMatrix<T,MR,STAR> B1Trans_MR_STAR(g);\n\n    A1_STAR_MC.AlignWith( C );\n    B1Trans_MR_STAR.AlignWith( C );\n\n    LockedPartitionDown\n    ( A, AT,\n         AB, 0 );\n    LockedPartitionDown\n    ( B, BT,\n         BB, 0 );\n    while( AT.Height() < A.Height() )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n        LockedRepartitionDown\n        ( BT,  B0,\n         /**/ /**/\n               B1,\n          BB,  B2 );\n\n        //--------------------------------------------------------------------//\n        A1_STAR_MC = A1;\n        B1.TransposeColAllGather( B1Trans_MR_STAR );\n        LocalTrrk\n        ( uplo, orientationOfA, TRANSPOSE, \n          alpha, A1_STAR_MC, B1Trans_MR_STAR, beta, C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionDown\n        ( BT,  B0,\n               B1,\n         /**/ /**/\n          BB,  B2 );\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRRK_TN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trrk/TT.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_TRRK_TT_HPP\n#define ELEM_TRRK_TT_HPP\n\nnamespace elem {\nnamespace internal {\n\n// Distributed C := alpha A^{T/H} B^{T/H} + beta C\ntemplate<typename T>\nvoid TrrkTT\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A,\n           const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"internal::TrrkTN\");\n        if( C.Height() != C.Width() || A.Width() != C.Height() || \n            B.Height() != C.Width() || A.Height() != B.Width() )\n            LogicError(\"Nonconformal TrrkTN\");\n        if( orientationOfA == NORMAL || orientationOfB == NORMAL )\n            LogicError(\"Orientations must be TRANSPOSE or ADJOINT\");\n    )\n    const Grid& g = C.Grid();\n\n    DistMatrix<T> AT(g),  A0(g),\n                  AB(g),  A1(g),\n                          A2(g);\n    DistMatrix<T> BL(g), BR(g),\n                  B0(g), B1(g), B2(g);\n\n    DistMatrix<T,STAR,MC> A1_STAR_MC(g);\n    DistMatrix<T,VR,STAR> B1_VR_STAR(g);\n    DistMatrix<T,STAR,MR> B1Trans_STAR_MR(g);\n\n    A1_STAR_MC.AlignWith( C );\n    B1_VR_STAR.AlignWith( C );\n    B1Trans_STAR_MR.AlignWith( C );\n\n    LockedPartitionDown\n    ( A, AT,\n         AB, 0 );\n    LockedPartitionRight( B, BL, BR, 0 );\n    while( AT.Width() < A.Height() )\n    {\n        LockedRepartitionDown\n        ( AT,  A0,\n         /**/ /**/\n               A1,\n          AB,  A2 );\n        LockedRepartitionRight\n        ( BL, /**/ BR,\n          B0, /**/ B1, B2 );\n\n        //--------------------------------------------------------------------//\n        A1_STAR_MC = A1;\n        B1_VR_STAR = B1;\n        B1_VR_STAR.TransposePartialColAllGather\n        ( B1Trans_STAR_MR, (orientationOfB==ADJOINT) );\n        LocalTrrk\n        ( uplo, orientationOfA,\n          alpha, A1_STAR_MC, B1Trans_STAR_MR, beta, C );\n        //--------------------------------------------------------------------//\n\n        SlideLockedPartitionRight\n        ( BL,     /**/ BR,\n          B0, B1, /**/ B2 );\n        SlideLockedPartitionDown\n        ( AT,  A0,\n               A1,\n         /**/ /**/\n          AB,  A2 );\n    }\n}\n\n} // namespace internal\n} // namespace elem\n\n#endif // ifndef ELEM_TRRK_TT_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/blas-like/Trrk.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#include \"./Trrk/Local.hpp\"\n#include \"./Trrk/NN.hpp\"\n#include \"./Trrk/NT.hpp\"\n#include \"./Trrk/TN.hpp\"\n#include \"./Trrk/TT.hpp\"\n\nnamespace elem {\n\ntemplate<typename T>\nvoid Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const Matrix<T>& A, const Matrix<T>& B,\n  T beta,        Matrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trrk\"))\n    if( orientationOfA==NORMAL && orientationOfB==NORMAL )\n        internal::TrrkNN( uplo, alpha, A, B, beta, C );\n    else if( orientationOfA==NORMAL )\n        internal::TrrkNT( uplo, orientationOfB, alpha, A, B, beta, C );\n    else if( orientationOfB==NORMAL )\n        internal::TrrkTN( uplo, orientationOfA, alpha, A, B, beta, C );\n    else\n        internal::TrrkTT\n        ( uplo, orientationOfA, orientationOfB, alpha, A, B, beta, C );\n}\n\ntemplate<typename T>\nvoid Trrk\n( UpperOrLower uplo, Orientation orientationOfA, Orientation orientationOfB,\n  T alpha, const DistMatrix<T>& A, const DistMatrix<T>& B,\n  T beta,        DistMatrix<T>& C )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Trrk\"))\n    if( orientationOfA==NORMAL && orientationOfB==NORMAL )\n        internal::TrrkNN( uplo, alpha, A, B, beta, C );\n    else if( orientationOfA==NORMAL )\n        internal::TrrkNT( uplo, orientationOfB, alpha, A, B, beta, C );\n    else if( orientationOfB==NORMAL )\n        internal::TrrkTN( uplo, orientationOfA, alpha, A, B, beta, C );\n    else\n        internal::TrrkTT\n        ( uplo, orientationOfA, orientationOfB, alpha, A, B, beta, C );\n}\n\n#ifndef ELEM_DISABLE_FLOAT\ntemplate void Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  float alpha, const Matrix<float>& A, const Matrix<float>& B,\n  float beta,        Matrix<float>& C );\ntemplate void Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  float alpha, const DistMatrix<float>& A, const DistMatrix<float>& B,\n  float beta,        DistMatrix<float>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  float alpha, const DistMatrix<float,MC,  STAR>& A,\n               const DistMatrix<float,STAR,MR  >& B,\n  float beta,        DistMatrix<float,MC,  MR  >& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  float alpha, const DistMatrix<float,MC,STAR>& A,\n               const DistMatrix<float,MR,STAR>& B,\n  float beta,        DistMatrix<float>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  float alpha, const DistMatrix<float,STAR,MC>& A,\n               const DistMatrix<float,STAR,MR>& B,\n  float beta,        DistMatrix<float,MC,  MR>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  float alpha, const DistMatrix<float,STAR,MC  >& A,\n               const DistMatrix<float,MR,  STAR>& B,\n  float beta,        DistMatrix<float,MC,  MR  >& E );\nnamespace internal {\ntemplate void TrrkNN\n( UpperOrLower uplo,\n  float alpha, const Matrix<float>& A, const Matrix<float>& B,\n  float beta,        Matrix<float>& C );\ntemplate void TrrkNT\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  float alpha, const Matrix<float>& A, const Matrix<float>& B,\n  float beta,        Matrix<float>& C );\ntemplate void TrrkTN\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  float alpha, const Matrix<float>& A, const Matrix<float>& B,\n  float beta,        Matrix<float>& C );\ntemplate void TrrkTT\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  float alpha, const Matrix<float>& A, const Matrix<float>& B,\n  float beta,        Matrix<float>& C );\n} // namespace internal\n#ifndef ELEM_DISABLE_COMPLEX\ntemplate void Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  Complex<float> alpha, const Matrix<Complex<float>>& A, \n                        const Matrix<Complex<float>>& B,\n  Complex<float> beta,        Matrix<Complex<float>>& C );\ntemplate void Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  Complex<float> alpha, const DistMatrix<Complex<float>>& A, \n                        const DistMatrix<Complex<float>>& B,\n  Complex<float> beta,        DistMatrix<Complex<float>>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Complex<float> alpha, const DistMatrix<Complex<float>,MC,  STAR>& A,\n                        const DistMatrix<Complex<float>,STAR,MR  >& B,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Complex<float> alpha, const DistMatrix<Complex<float>,MC,STAR>& A,\n                        const DistMatrix<Complex<float>,MR,STAR>& B,\n  Complex<float> beta,        DistMatrix<Complex<float>>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Complex<float> alpha, const DistMatrix<Complex<float>,STAR,MC>& A,\n                        const DistMatrix<Complex<float>,STAR,MR>& B,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Complex<float> alpha, const DistMatrix<Complex<float>,STAR,MC  >& A,\n                        const DistMatrix<Complex<float>,MR,  STAR>& B,\n  Complex<float> beta,        DistMatrix<Complex<float>,MC,  MR  >& E );\nnamespace internal {\ntemplate void TrrkNN\n( UpperOrLower uplo,\n  Complex<float> alpha, const Matrix<Complex<float>>& A, \n                        const Matrix<Complex<float>>& B,\n  Complex<float> beta,        Matrix<Complex<float>>& C );\ntemplate void TrrkNT\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Complex<float> alpha, const Matrix<Complex<float>>& A, \n                        const Matrix<Complex<float>>& B,\n  Complex<float> beta,        Matrix<Complex<float>>& C );\ntemplate void TrrkTN\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Complex<float> alpha, const Matrix<Complex<float>>& A, \n                        const Matrix<Complex<float>>& B,\n  Complex<float> beta,        Matrix<Complex<float>>& C );\ntemplate void TrrkTT\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Complex<float> alpha, const Matrix<Complex<float>>& A, \n                        const Matrix<Complex<float>>& B,\n  Complex<float> beta,        Matrix<Complex<float>>& C );\n} // namespace internal\n#endif // ifndef ELEM_DISABLE_COMPLEX\n#endif // ifndef ELEM_DISABLE_FLOAT\n\ntemplate void Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  double alpha, const Matrix<double>& A, const Matrix<double>& B,\n  double beta,        Matrix<double>& C );\ntemplate void Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  double alpha, const DistMatrix<double>& A, const DistMatrix<double>& B,\n  double beta,        DistMatrix<double>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  double alpha, const DistMatrix<double,MC,  STAR>& A,\n                const DistMatrix<double,STAR,MR  >& B,\n  double beta,        DistMatrix<double,MC,  MR  >& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  double alpha, const DistMatrix<double,MC,STAR>& A,\n                const DistMatrix<double,MR,STAR>& B,\n  double beta,        DistMatrix<double>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  double alpha, const DistMatrix<double,STAR,MC>& A,\n                const DistMatrix<double,STAR,MR>& B,\n  double beta,        DistMatrix<double,MC,  MR>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  double alpha, const DistMatrix<double,STAR,MC  >& A,\n                const DistMatrix<double,MR,  STAR>& B,\n  double beta,        DistMatrix<double,MC,  MR  >& E );\nnamespace internal {\ntemplate void TrrkNN\n( UpperOrLower uplo,\n  double alpha, const Matrix<double>& A, const Matrix<double>& B,\n  double beta,        Matrix<double>& C );\ntemplate void TrrkNT\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  double alpha, const Matrix<double>& A, const Matrix<double>& B,\n  double beta,        Matrix<double>& C );\ntemplate void TrrkTN\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  double alpha, const Matrix<double>& A, const Matrix<double>& B,\n  double beta,        Matrix<double>& C );\ntemplate void TrrkTT\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  double alpha, const Matrix<double>& A, const Matrix<double>& B,\n  double beta,        Matrix<double>& C );\n} // namespace internal\n#ifndef ELEM_DISABLE_COMPLEX\ntemplate void Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  Complex<double> alpha, const Matrix<Complex<double>>& A, \n                         const Matrix<Complex<double>>& B,\n  Complex<double> beta,        Matrix<Complex<double>>& C );\ntemplate void Trrk\n( UpperOrLower uplo, \n  Orientation orientationOfA, Orientation orientationOfB,\n  Complex<double> alpha, const DistMatrix<Complex<double>>& A, \n                         const DistMatrix<Complex<double>>& B,\n  Complex<double> beta,        DistMatrix<Complex<double>>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Complex<double> alpha, const DistMatrix<Complex<double>,MC,  STAR>& A,\n                         const DistMatrix<Complex<double>,STAR,MR  >& B,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Complex<double> alpha, const DistMatrix<Complex<double>,MC,STAR>& A,\n                         const DistMatrix<Complex<double>,MR,STAR>& B,\n  Complex<double> beta,        DistMatrix<Complex<double>>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Complex<double> alpha, const DistMatrix<Complex<double>,STAR,MC>& A,\n                         const DistMatrix<Complex<double>,STAR,MR>& B,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR>& C );\ntemplate void LocalTrrk\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Complex<double> alpha, const DistMatrix<Complex<double>,STAR,MC  >& A,\n                         const DistMatrix<Complex<double>,MR,  STAR>& B,\n  Complex<double> beta,        DistMatrix<Complex<double>,MC,  MR  >& E );\nnamespace internal {\ntemplate void TrrkNN\n( UpperOrLower uplo,\n  Complex<double> alpha, const Matrix<Complex<double>>& A, \n                         const Matrix<Complex<double>>& B,\n  Complex<double> beta,        Matrix<Complex<double>>& C );\ntemplate void TrrkNT\n( UpperOrLower uplo,\n  Orientation orientationOfB,\n  Complex<double> alpha, const Matrix<Complex<double>>& A, \n                         const Matrix<Complex<double>>& B,\n  Complex<double> beta,        Matrix<Complex<double>>& C );\ntemplate void TrrkTN\n( UpperOrLower uplo,\n  Orientation orientationOfA,\n  Complex<double> alpha, const Matrix<Complex<double>>& A, \n                         const Matrix<Complex<double>>& B,\n  Complex<double> beta,        Matrix<Complex<double>>& C );\ntemplate void TrrkTT\n( UpperOrLower uplo,\n  Orientation orientationOfA, Orientation orientationOfB,\n  Complex<double> alpha, const Matrix<Complex<double>>& A, \n                         const Matrix<Complex<double>>& B,\n  Complex<double> beta,        Matrix<Complex<double>>& C );\n} // namespace internal\n#endif // ifndef ELEM_DISABLE_COMPLEX\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/Abstract.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Constructors and destructors\n// ============================\n\ntemplate<typename T>\nAbstractBlockDistMatrix<T>::AbstractBlockDistMatrix\n( const elem::Grid& g, Int root )\n: viewType_(OWNER),\n  height_(0), width_(0),\n  auxMemory_(),\n  matrix_(0,0,true),\n  colConstrained_(false), rowConstrained_(false), rootConstrained_(false),\n  blockHeight_(DefaultBlockHeight()), blockWidth_(DefaultBlockWidth()),\n  colAlign_(0), rowAlign_(0),\n  colCut_(0), rowCut_(0),\n  root_(root), grid_(&g)\n{ }\n\ntemplate<typename T>\nAbstractBlockDistMatrix<T>::AbstractBlockDistMatrix\n( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root )\n: viewType_(OWNER),\n  height_(0), width_(0),\n  auxMemory_(),\n  matrix_(0,0,true),\n  colConstrained_(true), rowConstrained_(true), rootConstrained_(false),\n  blockHeight_(blockHeight), blockWidth_(blockWidth),\n  colAlign_(0), rowAlign_(0),\n  colCut_(0), rowCut_(0),\n  root_(root), grid_(&g)\n{ }\n\ntemplate<typename T>\nAbstractBlockDistMatrix<T>::AbstractBlockDistMatrix\n( AbstractBlockDistMatrix<T>&& A ) ELEM_NOEXCEPT\n: viewType_(A.viewType_),\n  height_(A.height_), width_(A.width_), \n  colConstrained_(A.colConstrained_), rowConstrained_(A.rowConstrained_),\n  rootConstrained_(A.rootConstrained_),\n  blockHeight_(A.blockHeight_), blockWidth_(A.blockWidth_),\n  colAlign_(A.colAlign_), rowAlign_(A.rowAlign_),\n  colCut_(A.colCut_), rowCut_(A.rowCut_),\n  colShift_(A.colShift_), rowShift_(A.rowShift_), \n  root_(A.root_),\n  grid_(A.grid_)\n{ \n    matrix_.ShallowSwap( A.matrix_ );\n    auxMemory_.ShallowSwap( A.auxMemory_ );\n}\n\n// Optional to override\n// --------------------\n\ntemplate<typename T>\nAbstractBlockDistMatrix<T>::~AbstractBlockDistMatrix() { }\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nAbstractBlockDistMatrix<T>& \nAbstractBlockDistMatrix<T>::operator=( AbstractBlockDistMatrix<T>&& A )\n{\n    if( Viewing() && !A.Viewing() )\n    {\n        LogicError\n        (\"Cannot move a non-view into a viewing AbstractBlockDistMatrix\");\n    }\n    else\n    {\n        auxMemory_.ShallowSwap( A.auxMemory_ );\n        matrix_.ShallowSwap( A.matrix_ );\n        viewType_ = A.viewType_;\n        height_ = A.height_;\n        width_ = A.width_;\n        colConstrained_ = A.colConstrained_;\n        rowConstrained_ = A.rowConstrained_;\n        rootConstrained_ = A.rootConstrained_;\n        blockHeight_ = A.blockHeight_;\n        blockWidth_ = A.blockWidth_;\n        colAlign_ = A.colAlign_;\n        rowAlign_ = A.rowAlign_;\n        colCut_ = A.colCut_;\n        rowCut_ = A.rowCut_;\n        colShift_ = A.colShift_;\n        rowShift_ = A.rowShift_;\n        root_ = A.root_;\n        grid_ = A.grid_;\n    }\n    return *this;\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::Empty()\n{\n    matrix_.Empty_();\n    viewType_ = OWNER;\n    height_ = 0;\n    width_ = 0;\n    blockHeight_ = 0;\n    blockWidth_ = 0;\n    colAlign_ = 0;\n    rowAlign_ = 0;\n    colCut_ = 0;\n    rowCut_ = 0;\n    colConstrained_ = false;\n    rowConstrained_ = false;\n    rootConstrained_ = false;\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::EmptyData()\n{\n    matrix_.Empty_();\n    viewType_ = OWNER;\n    height_ = 0;\n    width_ = 0;\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SetGrid( const elem::Grid& grid )\n{\n    if( grid_ != &grid )\n    {\n        Empty();\n        grid_ = &grid; \n        SetShifts();\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::Resize( Int height, Int width )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ABDM::Resize\");\n        AssertNotLocked();\n    )\n    height_ = height; \n    width_ = width;\n    if( Participating() )\n        matrix_.Resize_\n        ( BlockedLength(height,ColShift(),BlockHeight(),ColCut(),ColStride()),\n          BlockedLength(width,RowShift(),BlockWidth(),RowCut(),RowStride()) );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::Resize( Int height, Int width, Int ldim )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ABDM::Resize\");\n        AssertNotLocked();\n    )\n    height_ = height; \n    width_ = width;\n    if( Participating() )\n        matrix_.Resize_\n        ( BlockedLength(height,ColShift(),BlockHeight(),ColCut(),ColStride()),\n          BlockedLength(width,RowShift(),BlockWidth(),RowCut(),RowStride()), \n          ldim );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::MakeConsistent( bool includingViewers )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::MakeConsistent\"))\n\n    const Int msgLength = 13;\n    Int message[msgLength];\n    if( CrossRank() == Root() )\n    {\n        message[ 0] = viewType_;\n        message[ 1] = height_;\n        message[ 2] = width_;\n        message[ 3] = colConstrained_;\n        message[ 4] = rowConstrained_;\n        message[ 5] = rootConstrained_;\n        message[ 6] = blockHeight_;\n        message[ 7] = blockWidth_;\n        message[ 8] = colAlign_;\n        message[ 9] = rowAlign_;\n        message[10] = colCut_;\n        message[11] = rowCut_;\n        message[12] = root_;\n    }\n\n    const elem::Grid& g = *grid_;\n    if( !g.InGrid() && !includingViewers )\n        LogicError(\"Non-participating process called MakeConsistent\");\n    if( g.InGrid() )\n    {\n        // TODO: Ensure roots are consistent within each cross communicator\n        mpi::Broadcast( message, msgLength, Root(), CrossComm() );\n    }\n    if( includingViewers )\n    {\n        const Int vcRoot = g.VCToViewingMap(0);\n        mpi::Broadcast( message, msgLength, vcRoot, g.ViewingComm() );\n    }\n    const ViewType newViewType    = static_cast<ViewType>(message[0]);\n    const Int newHeight           = message[ 1]; \n    const Int newWidth            = message[ 2];\n    const bool newConstrainedCol  = message[ 3];\n    const bool newConstrainedRow  = message[ 4];\n    const bool newConstrainedRoot = message[ 5];\n    const Int newBlockHeight      = message[ 6];\n    const Int newBlockWidth       = message[ 7];\n    const Int newColAlign         = message[ 8];\n    const Int newRowAlign         = message[ 9];\n    const Int newColCut           = message[10];\n    const Int newRowCut           = message[11];\n    const Int root                = message[12];\n\n    root_            = root;\n    viewType_        = newViewType;\n    colConstrained_  = newConstrainedCol;\n    rowConstrained_  = newConstrainedRow;\n    rootConstrained_ = newConstrainedRoot;\n    blockHeight_     = newBlockHeight;\n    blockWidth_      = newBlockWidth;\n    colAlign_        = newColAlign;\n    rowAlign_        = newRowAlign;\n    colCut_          = newColCut;\n    rowCut_          = newRowCut;\n\n    SetShifts();\n    Resize( newHeight, newWidth );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::MakeSizeConsistent( bool includingViewers )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::MakeSizeConsistent\"))\n\n    const Int msgLength = 2;\n    Int message[msgLength];\n    if( CrossRank() == Root() )\n    {\n        message[0] = height_;\n        message[1] = width_;\n    }\n\n    const elem::Grid& g = *grid_;\n    if( !g.InGrid() && !includingViewers )\n        LogicError(\"Non-participating process called MakeSizeConsistent\");\n    if( g.InGrid() )\n    {\n        // TODO: Ensure roots are consistent within each cross communicator\n        mpi::Broadcast( message, msgLength, Root(), CrossComm() );\n    }\n    if( includingViewers )\n    {\n        const Int vcRoot = g.VCToViewingMap(0);\n        mpi::Broadcast( message, msgLength, vcRoot, g.ViewingComm() );\n    }\n    const Int newHeight = message[0]; \n    const Int newWidth  = message[1];\n    Resize( newHeight, newWidth );\n}\n\n// Realignment\n// -----------\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::Align\n( Int blockHeight, Int blockWidth, \n  Int colAlign, Int rowAlign, Int colCut, Int rowCut, bool constrain )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::Align\"))\n    const bool requireChange = \n        blockHeight_ != blockHeight || blockWidth_ != blockWidth ||\n        colAlign_    != colAlign    || rowAlign_   != rowAlign   ||\n        colCut_      != colCut      || rowCut_     != rowCut;\n    DEBUG_ONLY(\n        if( Viewing() && requireChange )\n            LogicError(\"Tried to realign a view\");\n    )\n    if( requireChange )\n        Empty();\n    if( constrain )\n    {\n        colConstrained_ = true;\n        rowConstrained_ = true;\n    }\n    blockHeight_ = blockHeight;\n    blockWidth_ = blockWidth;\n    colAlign_ = colAlign;\n    rowAlign_ = rowAlign;\n    colCut_ = colCut;\n    rowCut_ = rowCut;\n    SetShifts();\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AlignCols\n( Int blockHeight, Int colAlign, Int colCut, bool constrain )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::AlignCols\"))\n    const bool requireChange = \n        blockHeight_ != blockHeight || \n        colAlign_    != colAlign    || \n        colCut_      != colCut;\n    DEBUG_ONLY(\n        if( Viewing() && requireChange )\n            LogicError(\"Tried to realign a view\");\n    )\n    if( requireChange )\n        EmptyData();\n    if( constrain )\n        colConstrained_ = true;\n    blockHeight_ = blockHeight;\n    colAlign_ = colAlign;\n    colCut_ = colCut;\n    SetShifts();\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AlignRows\n( Int blockWidth, Int rowAlign, Int rowCut, bool constrain )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::AlignRows\"))\n    const bool requireChange = \n        blockWidth_ != blockWidth || \n        rowAlign_   != rowAlign   || \n        rowCut_     != rowCut;\n    DEBUG_ONLY(\n        if( Viewing() && requireChange )\n            LogicError(\"Tried to realign a view\");\n    )\n    if( requireChange )\n        EmptyData();\n    if( constrain )\n        rowConstrained_ = true;\n    blockWidth_ = blockWidth;\n    rowAlign_ = rowAlign;\n    rowCut_ = rowCut;\n    SetShifts();\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::FreeAlignments() \n{ \n    if( !Viewing() )\n    {\n        colConstrained_ = false;\n        rowConstrained_ = false;\n        rootConstrained_ = false;\n    }\n    else\n        LogicError(\"Cannot free alignments of views\");\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SetRoot( Int root, bool constrain )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ABDM::SetRoot\");\n        if( root < 0 || root >= mpi::Size(CrossComm()) )\n            LogicError(\"Invalid root\");\n    )\n    if( root != root_ )\n        Empty();\n    root_ = root;\n    if( constrain )\n        rootConstrained_ = true;\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AlignWith\n( const elem::BlockDistData& data, bool constrain )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::AlignWith\"))\n    AlignColsWith( data, constrain );\n    AlignRowsWith( data, constrain );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AlignColsWith\n( const elem::BlockDistData& data, bool constrain )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"ABDM::AlignColsWith\");\n        if( colAlign_ != 0 )\n            LogicError(\"Alignment should have been zero\");\n    )\n    SetGrid( *data.grid );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AlignRowsWith\n( const elem::BlockDistData& data, bool constrain )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"ABDM::AlignRowsWith\");\n        if( rowAlign_ != 0 )\n            LogicError(\"Alignment should have been zero\");\n    )\n    SetGrid( *data.grid );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AlignAndResize\n( Int blockHeight, Int blockWidth, \n  Int colAlign, Int rowAlign, Int colCut, Int rowCut,\n  Int height, Int width, bool force, bool constrain )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::AlignAndResize\"))\n    if( !Viewing() )\n    {\n        if( force || !ColConstrained() )\n        {\n            blockHeight_ = blockHeight;\n            colAlign_ = colAlign;\n            colCut_ = colCut;\n            SetColShift(); \n        }\n        if( force || !RowConstrained() )\n        {\n            blockWidth_ = blockWidth;\n            rowAlign_ = rowAlign;\n            rowCut_ = rowCut;\n            SetRowShift();\n        }\n    }\n    if( constrain )\n    {\n        colConstrained_ = true;\n        rowConstrained_ = true;\n    }\n    if( force && \n        (blockHeight_ != blockHeight || blockWidth_ != blockWidth || \n         colAlign_    != colAlign    || rowAlign_   != rowAlign   ||\n         colCut_      != colCut      || rowCut_     != rowCut) )\n        LogicError(\"Could not set alignments and cuts\"); \n    Resize( height, width );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AlignColsAndResize\n( Int blockHeight, Int colAlign, Int colCut, Int height, Int width, \n  bool force, bool constrain )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::AlignColsAndResize\"))\n    if( !Viewing() && (force || !ColConstrained()) )\n    {\n        blockHeight_ = blockHeight;\n        colAlign_ = colAlign;\n        colCut_ = colCut;\n        SetColShift(); \n    }\n    if( constrain )\n        colConstrained_ = true;\n    if( force && \n        (colAlign_ != colAlign || colCut_ != colCut || \n         blockHeight_ != blockHeight) )\n        LogicError(\"Could not set col alignment and cut\");\n    Resize( height, width );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AlignRowsAndResize\n( Int blockWidth, Int rowAlign, Int rowCut, Int height, Int width, \n  bool force, bool constrain )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::AlignRowsAndResize\"))\n    if( !Viewing() && (force || !RowConstrained()) )\n    {\n        blockWidth_ = blockWidth;\n        rowAlign_ = rowAlign;\n        rowCut_ = rowCut;\n        SetRowShift(); \n    }\n    if( constrain )\n        rowConstrained_ = true;\n    if( force && \n        (rowAlign_ != rowAlign || rowCut_ != rowCut ||\n         blockWidth_ != blockWidth) )\n        LogicError(\"Could not set row alignment and cut\");\n    Resize( height, width );\n}\n\n// Buffer attachment\n// -----------------\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::Attach\n( Int height, Int width, const elem::Grid& g, \n  Int blockHeight, Int blockWidth, \n  Int colAlign, Int rowAlign, Int colCut, Int rowCut,\n  T* buffer, Int ldim, Int root )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::Attach\"))\n    Empty();\n\n    grid_ = &g;\n    root_ = root;\n    height_ = height;\n    width_ = width;\n    blockHeight_ = blockHeight;\n    blockWidth_ = blockWidth;\n    colAlign_ = colAlign;\n    rowAlign_ = rowAlign;\n    colCut_ = colCut;\n    rowCut_ = rowCut;\n    colConstrained_ = true;\n    rowConstrained_ = true;\n    viewType_ = VIEW;\n    SetShifts();\n    if( Participating() )\n    {\n        Int localHeight = \n            BlockedLength(height,colShift_,blockHeight,colCut,ColStride());\n        Int localWidth = \n            BlockedLength(width,rowShift_,blockWidth,rowCut,RowStride());\n        matrix_.Attach_( localHeight, localWidth, buffer, ldim );\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::Attach\n( Int height, Int width, const elem::Grid& g,\n  Int blockHeight, Int blockWidth, \n  Int colAlign, Int rowAlign, Int colCut, Int rowCut, elem::Matrix<T>& A, \n  Int root )\n{\n    // TODO: Assert that the local dimensions are correct\n    Attach\n    ( height, width, g, blockHeight, blockWidth, \n      colAlign, rowAlign, colCut, rowCut, A.Buffer(), A.LDim(), root );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::LockedAttach\n( Int height, Int width, const elem::Grid& g, \n  Int blockHeight, Int blockWidth, \n  Int colAlign, Int rowAlign, Int colCut, Int rowCut,\n  const T* buffer, Int ldim, Int root )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::LockedAttach\"))\n    Empty();\n\n    grid_ = &g;\n    root_ = root;\n    height_ = height;\n    width_ = width;\n    blockHeight_ = blockHeight;\n    blockWidth_ = blockWidth;\n    colAlign_ = colAlign;\n    rowAlign_ = rowAlign;\n    colCut_ = colCut;\n    rowCut_ = rowCut;\n    colConstrained_ = true;\n    rowConstrained_ = true;\n    viewType_ = LOCKED_VIEW;\n    SetShifts();\n    if( Participating() )\n    {\n        Int localHeight = \n            BlockedLength(height,colShift_,blockHeight,colCut,ColStride());\n        Int localWidth = \n            BlockedLength(width,rowShift_,blockWidth,rowCut,RowStride());\n        matrix_.LockedAttach_( localHeight, localWidth, buffer, ldim );\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::LockedAttach\n( Int height, Int width, const elem::Grid& g,\n  Int blockHeight, Int blockWidth, \n  Int colAlign, Int rowAlign, Int colCut, Int rowCut, const elem::Matrix<T>& A,\n  Int root )\n{\n    // TODO: Assert that the local dimensions are correct\n    LockedAttach\n    ( height, width, g, blockHeight, blockWidth, \n      colAlign, rowAlign, colCut, rowCut, A.LockedBuffer(), A.LDim(), root );\n}\n\n// Basic queries\n// =============\n\n// Global matrix information\n// -------------------------\n\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::Height() const { return height_; }\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::Width() const { return width_; }\n\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::DiagonalLength( Int offset ) const\n{ return elem::DiagonalLength(height_,width_,offset); }\n\ntemplate<typename T>\nbool AbstractBlockDistMatrix<T>::Viewing() const \n{ return IsViewing( viewType_ ); }\ntemplate<typename T>\nbool AbstractBlockDistMatrix<T>::Locked() const \n{ return IsLocked( viewType_ ); }\n\n// Local matrix information\n// ------------------------\n\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::LocalHeight() const { return matrix_.Height(); }\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::LocalWidth() const { return matrix_.Width(); }\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::LDim() const { return matrix_.LDim(); }\n\ntemplate<typename T>\nelem::Matrix<T>& \nAbstractBlockDistMatrix<T>::Matrix() { return matrix_; }\ntemplate<typename T>\nconst elem::Matrix<T>& \nAbstractBlockDistMatrix<T>::LockedMatrix() const { return matrix_; }\n\ntemplate<typename T>\nsize_t\nAbstractBlockDistMatrix<T>::AllocatedMemory() const \n{ return matrix_.MemorySize(); }\n\ntemplate<typename T>\nT*\nAbstractBlockDistMatrix<T>::Buffer() { return matrix_.Buffer(); }\n\ntemplate<typename T>\nT*\nAbstractBlockDistMatrix<T>::Buffer( Int iLoc, Int jLoc )\n{ return matrix_.Buffer(iLoc,jLoc); }\n\ntemplate<typename T>\nconst T*\nAbstractBlockDistMatrix<T>::LockedBuffer() const\n{ return matrix_.LockedBuffer(); }\n\ntemplate<typename T>\nconst T*\nAbstractBlockDistMatrix<T>::LockedBuffer( Int iLoc, Int jLoc ) const\n{ return matrix_.LockedBuffer(iLoc,jLoc); }\n\n// Distribution information\n// ------------------------\n\ntemplate<typename T>\nconst elem::Grid& AbstractBlockDistMatrix<T>::Grid() const { return *grid_; }\n\ntemplate<typename T>\nbool AbstractBlockDistMatrix<T>::ColConstrained() const \n{ return colConstrained_; }\ntemplate<typename T>\nbool AbstractBlockDistMatrix<T>::RowConstrained() const \n{ return rowConstrained_; }\ntemplate<typename T>\nbool AbstractBlockDistMatrix<T>::RootConstrained() const\n{ return rootConstrained_; }\n\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::BlockHeight() const { return blockHeight_; }\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::BlockWidth() const { return blockWidth_; }\n\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::ColAlign() const { return colAlign_; }\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::RowAlign() const { return rowAlign_; }\n\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::ColCut() const { return colCut_; }\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::RowCut() const { return rowCut_; }\n\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::ColShift() const { return colShift_; }\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::RowShift() const { return rowShift_; }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::ColRank() const \n{ return mpi::Rank(ColComm()); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::RowRank() const \n{ return mpi::Rank(RowComm()); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::PartialColRank() const\n{ return mpi::Rank(PartialColComm()); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::PartialUnionColRank() const\n{ return mpi::Rank(PartialUnionColComm()); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::PartialRowRank() const\n{ return mpi::Rank(PartialRowComm()); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::PartialUnionRowRank() const\n{ return mpi::Rank(PartialUnionRowComm()); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::DistRank() const\n{ return mpi::Rank(DistComm()); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::CrossRank() const\n{ return mpi::Rank(CrossComm()); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::RedundantRank() const\n{ return mpi::Rank(RedundantComm()); }\n\ntemplate<typename T>\nInt AbstractBlockDistMatrix<T>::Root() const { return root_; }\n\ntemplate<typename T>\nbool\nAbstractBlockDistMatrix<T>::Participating() const\n{ return grid_->InGrid() && (CrossRank()==root_); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::RowOwner( Int i ) const\n{ return (((i+ColCut())/BlockHeight())+ColAlign()) % ColStride(); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::ColOwner( Int j ) const\n{ return (((j+RowCut())/BlockWidth())+RowAlign()) % RowStride(); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::Owner( Int i, Int j ) const\n{ return RowOwner(i)+ColOwner(j)*ColStride(); }\n\ntemplate<typename T>\nInt \nAbstractBlockDistMatrix<T>::LocalRow( Int i ) const\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"ABDM::LocalRow\");\n        if( !IsLocalRow(i) )\n            LogicError(\"Requested local index of non-local row\");\n    )\n    return LocalRowOffset(i);\n}\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::LocalCol( Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ABDM::LocalCol\");\n        if( !IsLocalCol(j) )\n            LogicError(\"Requested local index of non-local column\");\n    )\n    return LocalColOffset(j);\n}\n\ntemplate<typename T>\nInt \nAbstractBlockDistMatrix<T>::LocalRowOffset( Int i ) const\n{ return BlockedLength_\n         ( i, ColShift(), BlockHeight(), ColCut(), ColStride() ); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::LocalColOffset( Int j ) const\n{ return BlockedLength_( j, RowShift(), BlockWidth(), RowCut(), RowStride() ); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::GlobalRow( Int iLoc ) const\n{ \n    return GlobalBlockedIndex\n           (iLoc,ColShift(),BlockHeight(),ColCut(),ColStride()); \n}\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::GlobalCol( Int jLoc ) const\n{ \n    return GlobalBlockedIndex\n           (jLoc,RowShift(),BlockWidth(),RowCut(),RowStride()); \n}\n\ntemplate<typename T>\nbool\nAbstractBlockDistMatrix<T>::IsLocalRow( Int i ) const\n{ return Participating() && RowOwner(i) == ColRank(); }\n\ntemplate<typename T>\nbool\nAbstractBlockDistMatrix<T>::IsLocalCol( Int j ) const\n{ return Participating() && ColOwner(j) == RowRank(); }\n\ntemplate<typename T>\nbool\nAbstractBlockDistMatrix<T>::IsLocal( Int i, Int j ) const\n{ return IsLocalRow(i) && IsLocalCol(j); }\n\ntemplate<typename T>\nmpi::Comm\nAbstractBlockDistMatrix<T>::PartialColComm() const\n{ return ColComm(); }\n\ntemplate<typename T>\nmpi::Comm\nAbstractBlockDistMatrix<T>::PartialRowComm() const\n{ return RowComm(); }\n\ntemplate<typename T>\nmpi::Comm\nAbstractBlockDistMatrix<T>::PartialUnionColComm() const\n{ return mpi::COMM_SELF; }\n\ntemplate<typename T>\nmpi::Comm\nAbstractBlockDistMatrix<T>::PartialUnionRowComm() const\n{ return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::PartialColStride() const\n{ return ColStride(); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::PartialRowStride() const\n{ return RowStride(); }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::PartialUnionColStride() const\n{ return 1; }\n\ntemplate<typename T>\nInt\nAbstractBlockDistMatrix<T>::PartialUnionRowStride() const\n{ return 1; }\n\n// Single-entry manipulation\n// =========================\n\n// Global entry manipulation\n// -------------------------\n\ntemplate<typename T>\nT\nAbstractBlockDistMatrix<T>::Get( Int i, Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ABDM::Get\");\n        if( !grid_->InGrid() )\n            LogicError(\"Get should only be called in-grid\");\n    )\n    T value;\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            value = GetLocal( iLoc, jLoc );\n        }\n        mpi::Broadcast( value, owner, DistComm() );\n    }\n    mpi::Broadcast( value, Root(), CrossComm() ); \n    return value;\n}\n\ntemplate<typename T>\nBase<T>\nAbstractBlockDistMatrix<T>::GetRealPart( Int i, Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ABDM::GetRealPart\");\n        if( !grid_->InGrid() )\n            LogicError(\"Get should only be called in-grid\");\n    )\n    Base<T> value;\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            value = GetLocalRealPart( iLoc, jLoc );\n        }\n        mpi::Broadcast( value, owner, DistComm() );\n    }\n    mpi::Broadcast( value, Root(), CrossComm() );\n    return value;\n}\n\ntemplate<typename T>\nBase<T>\nAbstractBlockDistMatrix<T>::GetImagPart( Int i, Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ABDM::GetImagPart\");\n        if( !grid_->InGrid() )\n            LogicError(\"Get should only be called in-grid\");\n    )\n    Base<T> value;\n    if( IsComplex<T>::val )\n    {\n        if( CrossRank() == Root() )\n        {\n            const Int owner = Owner( i, j );\n            if( owner == DistRank() )\n            {\n                const Int iLoc = LocalRow(i);\n                const Int jLoc = LocalCol(j);\n                value = GetLocalRealPart( iLoc, jLoc );\n            }\n            mpi::Broadcast( value, owner, DistComm() );\n        }\n        mpi::Broadcast( value, Root(), CrossComm() );\n    }\n    else\n        value = 0;\n    return value;\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::Set( Int i, Int j, T value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::Set\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            SetLocal( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SetRealPart( Int i, Int j, Base<T> value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::SetRealPart\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            SetLocalRealPart( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SetImagPart( Int i, Int j, Base<T> value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::SetImagPart\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            SetLocalImagPart( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::Update( Int i, Int j, T value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::Update\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            UpdateLocal( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::UpdateRealPart( Int i, Int j, Base<T> value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::UpdateRealPart\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            UpdateLocalRealPart( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::UpdateImagPart( Int i, Int j, Base<T> value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::UpdateImagPart\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            UpdateLocalImagPart( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::MakeReal( Int i, Int j )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::MakeReal\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            MakeLocalReal( iLoc, jLoc );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::Conjugate( Int i, Int j )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::Conjugate\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            ConjugateLocal( iLoc, jLoc );\n        }\n    }\n}\n\n// Local entry manipulation\n// ------------------------\n\ntemplate<typename T>\nT\nAbstractBlockDistMatrix<T>::GetLocal( Int i, Int j ) const\n{ return matrix_.Get(i,j); }\n\ntemplate<typename T>\nBase<T>\nAbstractBlockDistMatrix<T>::GetLocalRealPart( Int iLoc, Int jLoc ) const\n{ return matrix_.GetRealPart(iLoc,jLoc); }\n\ntemplate<typename T>\nBase<T>\nAbstractBlockDistMatrix<T>::GetLocalImagPart( Int iLoc, Int jLoc ) const\n{ return matrix_.GetImagPart(iLoc,jLoc); }\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SetLocal( Int iLoc, Int jLoc, T alpha )\n{ matrix_.Set(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SetLocalRealPart\n( Int iLoc, Int jLoc, Base<T> alpha )\n{ matrix_.SetRealPart(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SetLocalImagPart\n( Int iLoc, Int jLoc, Base<T> alpha )\n{ matrix_.SetImagPart(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::UpdateLocal( Int iLoc, Int jLoc, T alpha )\n{ matrix_.Update(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::UpdateLocalRealPart\n( Int iLoc, Int jLoc, Base<T> alpha )\n{ matrix_.UpdateRealPart(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::UpdateLocalImagPart\n( Int iLoc, Int jLoc, Base<T> alpha )\n{ matrix_.UpdateImagPart(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::MakeLocalReal( Int iLoc, Int jLoc )\n{ matrix_.MakeReal( iLoc, jLoc ); }\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::ConjugateLocal( Int iLoc, Int jLoc )\n{ matrix_.Conjugate( iLoc, jLoc ); }\n\n// Diagonal manipulation\n// =====================\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::MakeDiagonalReal( Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::MakeDiagonalReal\"))\n    const Int height = Height();\n    const Int localWidth = LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = GlobalCol(jLoc);\n        if( j < height && IsLocal(j,j) )\n        {\n            const Int iLoc = LocalRow(j);\n            MakeLocalReal( iLoc, jLoc );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::ConjugateDiagonal( Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::ConjugateDiagonal\"))\n    const Int height = Height();\n    const Int localWidth = LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = GlobalCol(jLoc);\n        if( j < height && IsLocal(j,j) )\n        {\n            const Int iLoc = LocalRow(j);\n            ConjugateLocal( iLoc, jLoc );\n        }\n    }\n}\n\n// Arbitrary submatrix manipulation\n// ================================\n\n// Global submatrix manipulation\n// -----------------------------\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::GetSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd, \n  DistMatrix<T,STAR,STAR>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::GetSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    ASub.SetGrid( Grid() );\n    ASub.Resize( m, n, m );\n    Zeros( ASub, m, n );\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        ASub.SetLocal( iSub, jSub, GetLocal(iLoc,jLoc) );\n                    }\n                }\n            }\n        }\n        // Sum over the distribution communicator\n        mpi::AllReduce( ASub.Buffer(), m*n, DistComm() ); \n    }\n    // Broadcast over the cross communicator\n    mpi::Broadcast( ASub.Buffer(), m*n, Root(), CrossComm() );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::GetRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd, \n  DistMatrix<Base<T>,STAR,STAR>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::GetRealPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    ASub.SetGrid( Grid() );\n    ASub.Resize( m, n, m );\n    Zeros( ASub, m, n );\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        ASub.SetLocal\n                        ( iSub, jSub, GetLocalRealPart(iLoc,jLoc) );\n                    }\n                }\n            }\n        }\n        // Sum over the distribution communicator\n        mpi::AllReduce( ASub.Buffer(), m*n, DistComm() ); \n    }\n    // Broadcast over the cross communicator\n    mpi::Broadcast( ASub.Buffer(), m*n, Root(), CrossComm() );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::GetImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd, \n  DistMatrix<Base<T>,STAR,STAR>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::GetImagPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    ASub.SetGrid( Grid() );\n    ASub.Resize( m, n, m );\n    Zeros( ASub, m, n );\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        ASub.SetLocal\n                        ( iSub, jSub, GetLocalImagPart(iLoc,jLoc) );\n                    }\n                }\n            }\n        }\n        // Sum over the distribution communicator\n        mpi::AllReduce( ASub.Buffer(), m*n, DistComm() ); \n    }\n    // Broadcast over the cross communicator\n    mpi::Broadcast( ASub.Buffer(), m*n, Root(), CrossComm() );\n}\n\ntemplate<typename T>\nDistMatrix<T,STAR,STAR>\nAbstractBlockDistMatrix<T>::GetSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::GetSubmatrix\"))\n    DistMatrix<T,STAR,STAR> ASub( Grid() );\n    GetSubmatrix( rowInd, colInd, ASub );\n    return ASub;\n}\n\ntemplate<typename T>\nDistMatrix<Base<T>,STAR,STAR>\nAbstractBlockDistMatrix<T>::GetRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::GetRealPartOfSubmatrix\"))\n    DistMatrix<Base<T>,STAR,STAR> ASub( Grid() );\n    GetRealPartOfSubmatrix( rowInd, colInd, ASub );\n    return ASub;\n}\n\ntemplate<typename T>\nDistMatrix<Base<T>,STAR,STAR>\nAbstractBlockDistMatrix<T>::GetImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::GetImagPartOfSubmatrix\"))\n    DistMatrix<Base<T>,STAR,STAR> ASub( Grid() );\n    GetImagPartOfSubmatrix( rowInd, colInd, ASub );\n    return ASub;\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::SetSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  const DistMatrix<T,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::SetSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        SetLocal( iLoc, jLoc, ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::SetRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  const DistMatrix<Base<T>,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::SetRealPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        SetLocalRealPart\n                        ( iLoc, jLoc, ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::SetImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  const DistMatrix<Base<T>,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::SetImagPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        SetLocalImagPart\n                        ( iLoc, jLoc, ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::UpdateSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  T alpha, const DistMatrix<T,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::UpdateSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Modify our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        UpdateLocal\n                        ( iLoc, jLoc, alpha*ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::UpdateRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  Base<T> alpha, const DistMatrix<Base<T>,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::UpdateRealPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Modify our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        UpdateLocalRealPart\n                        ( iLoc, jLoc, alpha*ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::UpdateImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  Base<T> alpha, const DistMatrix<Base<T>,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::UpdateImagPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Modify our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        UpdateLocalImagPart\n                        ( iLoc, jLoc, alpha*ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::MakeSubmatrixReal\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::MakeSubmatrixReal\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Modify the locally-owned entries \n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        MakeLocalReal( iLoc, jLoc );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::ConjugateSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::ConjugateSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Modify the locally-owned entries \n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        ConjugateLocal( iLoc, jLoc );\n                    }\n                }\n            }\n        }\n    }\n}\n\n// Local submatrix manipulation\n// ----------------------------\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::GetLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc, \n  elem::Matrix<T>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::GetLocalSubmatrix\"))\n    LockedMatrix().GetSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::GetRealPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc, \n  elem::Matrix<Base<T>>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::GetRealPartOfLocalSubmatrix\"))\n    LockedMatrix().GetRealPartOfSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::GetImagPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc, \n  elem::Matrix<Base<T>>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::GetImagPartOfLocalSubmatrix\"))\n    LockedMatrix().GetImagPartOfSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::SetLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  const elem::Matrix<T>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::SetLocalSubmatrix\"))\n    Matrix().SetSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::SetRealPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  const elem::Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::SetRealPartOfLocalSubmatrix\"))\n    Matrix().SetRealPartOfSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::SetImagPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  const elem::Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::SetImagPartOfLocalSubmatrix\"))\n    Matrix().SetImagPartOfSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::UpdateLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  T alpha, const elem::Matrix<T>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::UpdateLocalSubmatrix\"))\n    Matrix().UpdateSubmatrix( rowIndLoc, colIndLoc, alpha, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::UpdateRealPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  Base<T> alpha, const elem::Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::UpdateRealPartOfLocalSubmatrix\"))\n    Matrix().UpdateRealPartOfSubmatrix( rowIndLoc, colIndLoc, alpha, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::UpdateImagPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  Base<T> alpha, const elem::Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::UpdateImagPartOfLocalSubmatrix\"))\n    Matrix().UpdateImagPartOfSubmatrix( rowIndLoc, colIndLoc, alpha, ASub );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::MakeLocalSubmatrixReal\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::MakeLocalSubmatrixReal\"))\n    Matrix().MakeSubmatrixReal( rowIndLoc, colIndLoc );\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::ConjugateLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::ConjugateLocalSubmatrix\"))\n    Matrix().ConjugateSubmatrix( rowIndLoc, colIndLoc );\n}\n\n// Sum the local matrix over a particular communicator\n// ===================================================\n// NOTE: The matrix dimensions *must* be uniform over the communicator.\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SumOver( mpi::Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ABDM::SumOver\"))\n    if( !Participating() )\n        return;\n\n    const Int localHeight = LocalHeight();\n    const Int localWidth = LocalWidth();\n    const Int localSize = mpi::Pad( localHeight*localWidth );\n    T* sumBuf = auxMemory_.Require( localSize );   \n\n    // Pack\n    T* buf = Buffer();\n    const Int ldim = LDim(); \n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const T* thisCol = &buf[jLoc*ldim];\n        T* sumCol = &sumBuf[jLoc*localHeight];\n        MemCopy( sumCol, thisCol, localHeight );\n    }\n\n    // AllReduce sum\n    mpi::AllReduce( sumBuf, localSize, comm );\n\n    // Unpack\n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const T* sumCol = &sumBuf[jLoc*localHeight];\n        T* thisCol = &buf[jLoc*ldim];\n        MemCopy( thisCol, sumCol, localHeight );\n    } \n    auxMemory_.Release();\n}\n\n// Assertions\n// ==========\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::ComplainIfReal() const\n{ \n    if( !IsComplex<T>::val )\n        LogicError(\"Called complex-only routine with real data\");\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AssertNotLocked() const\n{\n    if( Locked() )\n        LogicError(\"Assertion that matrix not be a locked view failed\");\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AssertNotStoringData() const\n{\n    if( matrix_.MemorySize() > 0 )\n        LogicError(\"Assertion that matrix not be storing data failed\");\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AssertValidEntry( Int i, Int j ) const\n{\n    if( i < 0 || i >= Height() || j < 0 || j >= Width() )\n        LogicError\n        (\"Entry (\",i,\",\",j,\") is out of bounds of \",Height(),\n         \" x \",Width(),\" matrix\");\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::AssertValidSubmatrix\n( Int i, Int j, Int height, Int width ) const\n{\n    if( i < 0 || j < 0 )\n        LogicError(\"Indices of submatrix were negative\");\n    if( height < 0 || width < 0 )\n        LogicError(\"Dimensions of submatrix were negative\");\n    if( (i+height) > Height() || (j+width) > Width() )\n        LogicError\n        (\"Submatrix is out of bounds: accessing up to (\",i+height-1,\n         \",\",j+width-1,\") of \",Height(),\" x \",Width(),\" matrix\");\n}\n\ntemplate<typename T> \nvoid\nAbstractBlockDistMatrix<T>::AssertSameGrid( const elem::Grid& grid ) const\n{\n    if( Grid() != grid )\n        LogicError(\"Assertion that grids match failed\");\n}\n\ntemplate<typename T> \nvoid\nAbstractBlockDistMatrix<T>::AssertSameSize( Int height, Int width ) const\n{\n    if( Height() != height || Width() != width )\n        LogicError(\"Assertion that matrices be the same size failed\");\n}\n\n// Private section\n// ###############\n\n// Exchange metadata with another matrix\n// =====================================\n\ntemplate<typename T>\nvoid \nAbstractBlockDistMatrix<T>::ShallowSwap( AbstractBlockDistMatrix<T>& A )\n{\n    matrix_.ShallowSwap( A.matrix_ );\n    auxMemory_.ShallowSwap( A.auxMemory_ );\n    std::swap( viewType_, A.viewType_ );\n    std::swap( height_ , A.height_ );\n    std::swap( width_, A.width_ );\n    std::swap( colConstrained_, A.colConstrained_ );\n    std::swap( rowConstrained_, A.rowConstrained_ );\n    std::swap( rootConstrained_, A.rootConstrained_ );\n    std::swap( blockHeight_, A.blockHeight_ );\n    std::swap( blockWidth_, A.blockWidth_ );\n    std::swap( colAlign_, A.colAlign_ );\n    std::swap( rowAlign_, A.rowAlign_ );\n    std::swap( colCut_, A.colCut_ );\n    std::swap( rowCut_, A.rowCut_ );\n    std::swap( colShift_, A.colShift_ );\n    std::swap( rowShift_, A.rowShift_ );\n    std::swap( root_, A.root_ );\n    std::swap( grid_, A.grid_ );\n}\n\n// Modify the distribution metadata\n// ================================\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SetShifts()\n{\n    if( Participating() )\n    {\n        colShift_ = Shift(ColRank(),colAlign_,ColStride());\n        rowShift_ = Shift(RowRank(),rowAlign_,RowStride());\n    }\n    else\n    {\n        colShift_ = 0;\n        rowShift_ = 0;\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SetColShift()\n{\n    if( Participating() )\n        colShift_ = Shift(ColRank(),colAlign_,ColStride());\n    else\n        colShift_ = 0;\n}\n\ntemplate<typename T>\nvoid\nAbstractBlockDistMatrix<T>::SetRowShift()\n{\n    if( Participating() )\n        rowShift_ = Shift(RowRank(),rowAlign_,RowStride());\n    else\n        rowShift_ = 0;\n}\n\n// Outside of class\n// ----------------\n\ntemplate<typename T> \nvoid\nAssertConforming1x2\n( const AbstractBlockDistMatrix<T>& AL, const AbstractBlockDistMatrix<T>& AR )\n{\n    if( AL.Height() != AR.Height() )    \n        LogicError\n        (\"1x2 not conformant:\\n\",\n         DimsString(AL,\"Left\"),\"\\n\",DimsString(AR,\"Right\"));\n    if( AL.ColAlign() != AR.ColAlign() || AL.ColCut() != AR.ColCut() )\n        LogicError(\"1x2 is misaligned\");\n}\n\ntemplate<typename T> \nvoid\nAssertConforming2x1\n( const AbstractBlockDistMatrix<T>& AT, const AbstractBlockDistMatrix<T>& AB )\n{\n    if( AT.Width() != AB.Width() )\n        LogicError\n        (\"2x1 is not conformant:\\n\",\n         DimsString(AT,\"Top\"),\"\\n\",DimsString(AB,\"Bottom\"));\n    if( AT.RowAlign() != AB.RowAlign() || AT.RowCut() != AB.RowCut() )\n        LogicError(\"2x1 is not aligned\");\n}\n\ntemplate<typename T> \nvoid\nAssertConforming2x2\n( const AbstractBlockDistMatrix<T>& ATL, const AbstractBlockDistMatrix<T>& ATR, \n  const AbstractBlockDistMatrix<T>& ABL, const AbstractBlockDistMatrix<T>& ABR )\n{\n    if( ATL.Width() != ABL.Width() || ATR.Width() != ABR.Width() ||\n        ATL.Height() != ATR.Height() || ABL.Height() != ABR.Height() )\n        LogicError\n        (\"2x2 is not conformant:\\n\",\n         DimsString(ATL,\"TL\"),\"\\n\",DimsString(ATR,\"TR\"),\"\\n\",\n         DimsString(ABL,\"BL\"),\"\\n\",DimsString(ABR,\"BR\"));\n    if( ATL.ColAlign() != ATR.ColAlign() || ATL.ColCut() != ATR.ColCut() ||\n        ABL.ColAlign() != ABR.ColAlign() || ABL.ColCut() != ABR.ColCut() ||\n        ATL.RowAlign() != ABL.RowAlign() || ATL.RowCut() != ABL.RowCut() ||\n        ATR.RowAlign() != ABR.RowAlign() || ATR.RowCut() != ABR.RowCut() )\n        LogicError(\"2x2 set of matrices must aligned to combine\");\n}\n\n// Instantiations for {Int,Real,Complex<Real>} for each Real in {float,double}\n// ###########################################################################\n\n#ifndef ELEM_RELEASE\n #define PROTO(T) \\\n  template class AbstractBlockDistMatrix<T>;\\\n  template void AssertConforming1x2\\\n  ( const AbstractBlockDistMatrix<T>& AL,  \\\n    const AbstractBlockDistMatrix<T>& AR );\\\n  template void AssertConforming2x1\\\n  ( const AbstractBlockDistMatrix<T>& AT,  \\\n    const AbstractBlockDistMatrix<T>& AB );\\\n  template void AssertConforming2x2\\\n  ( const AbstractBlockDistMatrix<T>& ATL, \\\n    const AbstractBlockDistMatrix<T>& ATR, \\\n    const AbstractBlockDistMatrix<T>& ABL, \\\n    const AbstractBlockDistMatrix<T>& ABR )\n#else\n #define PROTO(T) template class AbstractBlockDistMatrix<T>\n#endif\n \n#ifndef ELEM_DISABLE_COMPLEX\n #ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(float);\n  PROTO(double);\n  PROTO(Complex<float>);\n  PROTO(Complex<double>);\n #else // ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(double);\n  PROTO(Complex<double>);\n #endif // ifndef ELEM_DISABLE_FLOAT\n#else // ifndef ELEM_DISABLE_COMPLEX\n #ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(float);\n  PROTO(double);\n #else // ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(double);\n #endif // ifndef ELEM_DISABLE_FLOAT\n#endif // ifndef ELEM_DISABLE_COMPLEX\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/CIRC_CIRC.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist CIRC\n#define RowDist CIRC\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [MC,MR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [MC,STAR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,MR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [MD,STAR]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,MD]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [MR,MC]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [MR,STAR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,MC]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [VC,STAR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,VC]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [VR,STAR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,VR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,STAR]\"))\n    this->Resize( A.Height(), A.Width() );\n    if( A.Grid().VCRank() == this->Root() )\n        this->matrix_ = A.LockedMatrix();\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [CIRC,CIRC]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nvoid\nBDM::CopyFromRoot( const Matrix<T>& A, bool includingViewers )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC]::CopyFromRoot\"))\n    if( this->CrossRank() != this->Root() )\n        LogicError(\"Called CopyFromRoot from non-root\");\n\n    this->Resize( A.Height(), A.Width() );\n    this->MakeSizeConsistent( includingViewers );\n\n    this->matrix_ = A;\n}\n\ntemplate<typename T>\nvoid\nBDM::CopyFromNonRoot( bool includingViewers )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC]::CopyFromNonRoot\"))\n    if( this->CrossRank() == this->Root() )\n        LogicError(\"Called CopyFromNonRoot from root\");\n\n    this->MakeSizeConsistent( includingViewers );\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return 1; }\ntemplate<typename T>\nInt BDM::RowStride() const { return 1; }\ntemplate<typename T>\nInt BDM::DistSize() const { return 1; }\ntemplate<typename T>\nInt BDM::CrossSize() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return 1; }\n\n// Private section\n// ###############\n\ntemplate<typename T>\ntemplate<Dist U,Dist V>\nvoid\nBDM::CollectFrom( const BlockDistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC]::CollectFrom\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int mb = A.BlockHeight();\n    const Int nb = A.BlockWidth();\n    const Int colCut = A.ColCut();\n    const Int rowCut = A.RowCut();\n    this->Align( mb, nb, 0, 0, false );\n    this->Resize( m, n );\n    if( A.RedundantSize() != 1 )\n        LogicError(\"This routine does not yet support non-trivial redundancy\");\n    if( !A.Grid().InGrid() )\n        return;\n\n    const Int root = this->Root();\n    // Translate the root into our DistComm (if possible)\n    const Int target = mpi::Translate( this->CrossComm(), root, A.DistComm() );\n    if( target == mpi::UNDEFINED )\n        return;\n\n    const Int colStride = A.ColStride();\n    const Int rowStride = A.RowStride();\n    const Int mLocalA = A.LocalHeight();\n    const Int nLocalA = A.LocalWidth();\n    const Int mLocalMax = MaxBlockedLength(m,mb,colCut,colStride);\n    const Int nLocalMax = MaxBlockedLength(n,nb,rowCut,rowStride);\n    const Int pkgSize = mpi::Pad( mLocalMax*nLocalMax );\n    const Int numDist = A.DistSize();\n\n    T *sendBuf, *recvBuf;\n    if( this->CrossRank() == root )\n    {\n        T* buffer = this->auxMemory_.Require( (numDist+1)*pkgSize );\n        sendBuf = &buffer[0];\n        recvBuf = &buffer[pkgSize];\n    }\n    else\n    {\n        sendBuf = this->auxMemory_.Require( pkgSize );\n        recvBuf = 0;\n    }\n\n    // Pack\n    const Int ALDim = A.LDim();\n    const T* ABuf = A.LockedBuffer();\n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<nLocalA; ++jLoc )\n        MemCopy( &sendBuf[jLoc*mLocalA], &ABuf[jLoc*ALDim], mLocalA );\n\n    // Communicate\n    mpi::Gather( sendBuf, pkgSize, recvBuf, pkgSize, target, A.DistComm() );\n\n    if( this->CrossRank() == root )\n    {\n        // Unpack\n        const Int colAlignA = A.ColAlign();\n        const Int rowAlignA = A.RowAlign();\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int l=0; l<rowStride; ++l )\n        {\n            const Int rowShift = Shift_( l, rowAlignA, rowStride );\n            const Int nLocal = \n                BlockedLength_( n, rowShift, nb, rowCut, rowStride );\n            for( Int k=0; k<colStride; ++k )\n            {\n                const T* data = &recvBuf[(k+l*colStride)*pkgSize];\n                const Int colShift = Shift_( k, colAlignA, colStride );\n                const Int mLocal = \n                    BlockedLength_( m, colShift, mb, colCut, colStride );\n                ELEM_INNER_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n                {\n                    const Int jBefore = rowShift*nb - rowCut;\n                    const Int jLocAdj = ( rowShift==0 ? jLoc+rowCut : jLoc );\n                    const Int numFilledLocalBlocks = jLocAdj / nb;\n                    const Int jMid = numFilledLocalBlocks*nb*rowStride;\n                    const Int jPost = jLocAdj-numFilledLocalBlocks*nb;\n                    const Int j = jBefore + jMid + jPost;\n                    const T* sourceCol = &data[jLoc*mLocal];\n                    for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                    {\n                        const Int iBefore = colShift*mb - colCut;\n                        const Int iLocAdj = (colShift==0 ? iLoc+colCut : iLoc);\n                        const Int numFilledLocalBlocks = iLocAdj / mb;\n                        const Int iMid = numFilledLocalBlocks*mb*colStride;\n                        const Int iPost = iLocAdj-numFilledLocalBlocks*mb;\n                        const Int i = iBefore + iMid + iPost;\n                        this->SetLocal(i,j,sourceCol[iLoc]);\n                    }\n                }\n            }\n        }\n    }\n    this->auxMemory_.Release();\n}\n\ntemplate<typename T>\ntemplate<Dist U,Dist V>\nvoid\nBDM::Scatter( BlockDistMatrix<T,U,V>& A ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC]::Scatter\"))\n    if( A.CrossSize() != 1 )\n        LogicError(\"This routine does not yet support non-trivial cross-teams\");\n    LogicError(\"This routine is not yet written\");\n}\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  OTHER(T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/General.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#include ELEM_TRANSPOSE_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Constructors and destructors\n// ============================\n\ntemplate<typename T,Dist U,Dist V>\nGeneralBlockDistMatrix<T,U,V>::GeneralBlockDistMatrix\n( const elem::Grid& g, Int root )\n: AbstractBlockDistMatrix<T>(g,root)\n{ }\n\ntemplate<typename T,Dist U,Dist V>\nGeneralBlockDistMatrix<T,U,V>::GeneralBlockDistMatrix\n( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root )\n: AbstractBlockDistMatrix<T>(g,blockHeight,blockWidth,root)\n{ }\n\ntemplate<typename T,Dist U,Dist V>\nGeneralBlockDistMatrix<T,U,V>::GeneralBlockDistMatrix\n( GeneralBlockDistMatrix<T,U,V>&& A ) ELEM_NOEXCEPT\n: AbstractBlockDistMatrix<T>(std::move(A))\n{ }\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T,Dist U,Dist V>\nGeneralBlockDistMatrix<T,U,V>& \nGeneralBlockDistMatrix<T,U,V>::operator=( GeneralBlockDistMatrix<T,U,V>&& A )\n{\n    AbstractBlockDistMatrix<T>::operator=( std::move(A) );\n    return *this;\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AlignColsWith\n( const elem::BlockDistData& data, bool constrain )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AlignColsWith\")) \n    this->SetGrid( *data.grid );\n    this->SetRoot( data.root );\n    if( data.colDist == U || data.colDist == UPart )\n        this->AlignCols\n        ( data.blockHeight, data.colAlign, data.colCut, constrain );\n    else if( data.rowDist == U || data.rowDist == UPart )\n        this->AlignCols\n        ( data.blockWidth, data.rowAlign, data.rowCut, constrain );\n    else if( data.colDist == UScat )\n        this->AlignCols\n        ( data.blockHeight, data.colAlign % this->ColStride(), data.colCut, \n          constrain );\n    else if( data.rowDist == UScat )\n        this->AlignCols\n        ( data.blockWidth, data.rowAlign % this->ColStride(), data.rowCut,\n          constrain );\n    DEBUG_ONLY(\n        else if( U != UGath && data.colDist != UGath && data.rowDist != UGath ) \n            LogicError(\"Nonsensical alignment\");\n    )\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AlignRowsWith\n( const elem::BlockDistData& data, bool constrain )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AlignRowsWith\")) \n    this->SetGrid( *data.grid );\n    this->SetRoot( data.root );\n    if( data.colDist == V || data.colDist == VPart )\n        this->AlignRows\n        ( data.blockHeight, data.colAlign, data.colCut, constrain );\n    else if( data.rowDist == V || data.rowDist == VPart )\n        this->AlignRows\n        ( data.blockWidth, data.rowAlign, data.rowCut, constrain );\n    else if( data.colDist == VScat )\n        this->AlignRows\n        ( data.blockHeight, data.colAlign % this->RowStride(), data.colCut,\n          constrain );\n    else if( data.rowDist == VScat )\n        this->AlignRows\n        ( data.blockWidth, data.rowAlign % this->RowStride(), data.rowCut,\n          constrain );\n    DEBUG_ONLY(\n        else if( V != VGath && data.colDist != VGath && data.rowDist != VGath )\n            LogicError(\"Nonsensical alignment\");\n    )\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::Translate( BlockDistMatrix<T,U,V>& A ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::Translate\"))\n    const Int height = this->Height();\n    const Int width = this->Width();\n    const Int blockHeight = this->BlockHeight();\n    const Int blockWidth = this->BlockWidth();\n    const Int colAlign = this->ColAlign();\n    const Int rowAlign = this->RowAlign();\n    const Int colCut = this->ColCut();\n    const Int rowCut = this->RowCut();\n    const Int root = this->Root();\n    A.SetGrid( this->Grid() );\n    if( !A.RootConstrained() )\n        A.SetRoot( root, false );\n    if( !A.ColConstrained() )\n        A.AlignCols( blockHeight, colAlign, colCut, false );\n    if( !A.RowConstrained() )\n        A.AlignRows( blockWidth, rowAlign, rowCut, false );\n    A.Resize( height, width );\n    const bool aligned = \n        blockHeight == A.BlockHeight() && blockWidth == A.BlockWidth() &&\n        colAlign    == A.ColAlign()    && rowAlign   == A.RowAlign() &&\n        colCut      == A.ColCut()      && rowCut     == A.RowCut();\n    if( aligned && root == A.Root() )\n    {\n        A.matrix_ = this->matrix_;\n    }\n    else\n    {\n        // TODO: Implement this in a more efficient manner, perhaps through\n        //       many rounds of point-to-point communication\n        // TODO: Turn this into a general routine for redistributing\n        //       between any matrix distributions supported by Elemental.\n        //       The key addition is mpi::Translate.\n        const Int distSize = A.DistSize();\n        const Int mLocal = this->LocalHeight();\n        const Int nLocal = this->LocalWidth();\n        const Int mLocalA = A.LocalHeight();\n        const Int nLocalA = A.LocalWidth();\n\n        // Determine how much data our process sends and recvs from every \n        // other process\n        std::vector<int> sendCounts(distSize,0),\n                         recvCounts(distSize,0);\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n        {\n            const Int j = this->GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n            {\n                const Int i = this->GlobalRow(iLoc);\n                const Int owner = A.Owner(i,j);\n                ++sendCounts[owner];\n            }\n        }\n        for( Int jLoc=0; jLoc<nLocalA; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<mLocalA; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                const Int owner = this->Owner(i,j);\n                ++recvCounts[owner];\n            }\n        }\n\n        // Translate the send/recv counts into displacements and allocate\n        // the send and recv buffers\n        std::vector<int> sendDispls(distSize), recvDispls(distSize);\n        int totalSend=0, totalRecv=0; \n        for( int q=0; q<distSize; ++q )\n        {\n            sendDispls[q] = totalSend;\n            recvDispls[q] = totalRecv;\n            totalSend += sendCounts[q];\n            totalRecv += recvCounts[q];\n        }\n        std::vector<T> sendBuf(totalSend), recvBuf(totalRecv);\n\n        // Pack the send data\n        std::vector<int> offsets = sendDispls;\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n        {\n            const Int j = this->GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n            {\n                const Int i = this->GlobalRow(iLoc);\n                const Int owner = A.Owner(i,j);\n                sendBuf[offsets[owner]++] = this->GetLocal(iLoc,jLoc);\n            }\n        }\n\n        // Perform the all-to-all communication\n        mpi::AllToAll\n        ( sendBuf.data(), sendCounts.data(), sendDispls.data(),\n          recvBuf.data(), recvCounts.data(), recvDispls.data(), \n          this->DistComm() );\n        SwapClear( sendBuf );\n\n        // Unpack the received data\n        offsets = recvDispls;\n        for( Int jLoc=0; jLoc<nLocalA; ++jLoc )\n        {\n            const Int j = A.GlobalCol(jLoc);\n            for( Int iLoc=0; iLoc<mLocalA; ++iLoc )\n            {\n                const Int i = A.GlobalRow(iLoc);\n                const Int owner = this->Owner(i,j);\n                A.SetLocal( iLoc, jLoc, recvBuf[offsets[owner]++] );\n            }\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AllGather\n( BlockDistMatrix<T,UGath,VGath>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::AllGather\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::ColAllGather\n( BlockDistMatrix<T,UGath,V>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::ColAllGather\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::RowAllGather\n( BlockDistMatrix<T,U,VGath>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::RowAllGather\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialColAllGather\n( BlockDistMatrix<T,UPart,V>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialColAllGather\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialRowAllGather\n( BlockDistMatrix<T,U,VPart>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialRowAllGather\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::FilterFrom\n( const BlockDistMatrix<T,UGath,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::FilterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::ColFilterFrom\n( const BlockDistMatrix<T,UGath,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::ColFilterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::RowFilterFrom\n( const BlockDistMatrix<T,U,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::RowFilterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialColFilterFrom\n( const BlockDistMatrix<T,UPart,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialColFilterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialRowFilterFrom\n( const BlockDistMatrix<T,U,VPart>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialRowFilterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialColAllToAllFrom\n( const BlockDistMatrix<T,UPart,VScat>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialColAllToAllFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialRowAllToAllFrom\n( const BlockDistMatrix<T,UScat,VPart>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialRowAllToAllFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialColAllToAll\n( BlockDistMatrix<T,UPart,VScat>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialColAllToAll\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialRowAllToAll\n( BlockDistMatrix<T,UScat,VPart>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialRowAllToAll\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::RowSumScatterFrom\n( const BlockDistMatrix<T,U,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::RowSumScatterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    this->AlignColsAndResize\n    ( A.BlockHeight(), A.ColAlign(), A.ColCut(), A.Height(), A.Width(), \n      false, false );\n    // NOTE: This will be *slightly* slower than necessary due to the result\n    //       of the MPI operations being added rather than just copied\n    Zeros( this->Matrix(), this->LocalHeight(), this->LocalWidth() );\n    this->RowSumScatterUpdate( T(1), A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::ColSumScatterFrom\n( const BlockDistMatrix<T,UGath,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::ColSumScatterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    this->AlignRowsAndResize\n    ( A.BlockWidth(), A.RowAlign(), A.RowCut(), A.Height(), A.Width(),\n      false, false );\n    // NOTE: This will be *slightly* slower than necessary due to the result\n    //       of the MPI operations being added rather than just copied\n    Zeros( this->Matrix(), this->LocalHeight(), this->LocalWidth() );\n    this->ColSumScatterUpdate( T(1), A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::SumScatterFrom\n( const BlockDistMatrix<T,UGath,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::SumScatterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    this->Resize( A.Height(), A.Width() );\n    // NOTE: This will be *slightly* slower than necessary due to the result\n    //       of the MPI operations being added rather than just copied\n    Zeros( this->Matrix(), this->LocalHeight(), this->LocalWidth() );\n    this->SumScatterUpdate( T(1), A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialRowSumScatterFrom\n( const BlockDistMatrix<T,U,VPart>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialRowSumScatterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    this->AlignAndResize\n    ( A.BlockHeight(), A.BlockWidth(), \n      A.ColAlign(), A.RowAlign(), A.ColCut(), A.RowCut(), \n      A.Height(), A.Width(), false, false );\n    // NOTE: This will be *slightly* slower than necessary due to the result\n    //       of the MPI operations being added rather than just copied\n    Zeros( this->Matrix(), this->LocalHeight(), this->LocalWidth() );\n    this->PartialRowSumScatterUpdate( T(1), A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialColSumScatterFrom\n( const BlockDistMatrix<T,UPart,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialColSumScatterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    this->AlignAndResize\n    ( A.BlockHeight(), A.BlockWidth(), \n      A.ColAlign(), A.RowAlign(), A.ColCut(), A.RowCut(), \n      A.Height(), A.Width(), false, false );\n    // NOTE: This will be *slightly* slower than necessary due to the result\n    //       of the MPI operations being added rather than just copied\n    Zeros( this->Matrix(), this->LocalHeight(), this->LocalWidth() );\n    this->PartialColSumScatterUpdate( T(1), A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::RowSumScatterUpdate\n( T alpha, const BlockDistMatrix<T,U,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::RowSumScatterUpdate\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n        this->AssertSameSize( A.Height(), A.Width() );\n    )\n    if( !this->Participating() )\n        return;\n\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::ColSumScatterUpdate\n( T alpha, const BlockDistMatrix<T,UGath,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::ColSumScatterUpdate\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n        this->AssertSameSize( A.Height(), A.Width() );\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::SumScatterUpdate\n( T alpha, const BlockDistMatrix<T,UGath,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::SumScatterUpdate\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n        this->AssertSameSize( A.Height(), A.Width() );\n    )\n    if( !this->Participating() )\n        return;\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialRowSumScatterUpdate\n( T alpha, const BlockDistMatrix<T,U,VPart>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialRowSumScatterUpdate\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n        this->AssertSameSize( A.Height(), A.Width() );\n    )\n    if( !this->Participating() )\n        return;\n\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::PartialColSumScatterUpdate\n( T alpha, const BlockDistMatrix<T,UPart,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::PartialColSumScatterUpdate\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n        this->AssertSameSize( A.Height(), A.Width() );\n    )\n    if( !this->Participating() )\n        return;\n\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::TransposeColAllGather\n( BlockDistMatrix<T,V,UGath>& A, bool conjugate ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::TransposeColAllGather\"))\n    BlockDistMatrix<T,V,U> ATrans( this->Grid() );\n    ATrans.AlignWith( *this );\n    ATrans.Resize( this->Width(), this->Height() );\n    Transpose( this->LockedMatrix(), ATrans.Matrix(), conjugate );\n    ATrans.RowAllGather( A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::TransposePartialColAllGather\n( BlockDistMatrix<T,V,UPart>& A, bool conjugate ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::TransposePartialColAllGather\"))\n    BlockDistMatrix<T,V,U> ATrans( this->Grid() );\n    ATrans.AlignWith( *this );\n    ATrans.Resize( this->Width(), this->Height() );\n    Transpose( this->LockedMatrix(), ATrans.Matrix(), conjugate );\n    ATrans.PartialRowAllGather( A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AdjointColAllGather\n( BlockDistMatrix<T,V,UGath>& A ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AdjointRowAllGather\"))\n    this->TransposeColAllGather( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AdjointPartialColAllGather\n( BlockDistMatrix<T,V,UPart>& A ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AdjointPartialColAllGather\"))\n    this->TransposePartialColAllGather( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::TransposeColFilterFrom\n( const BlockDistMatrix<T,V,UGath>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::TransposeColFilterFrom\"))\n    BlockDistMatrix<T,V,U> AFilt( A.Grid() );\n    if( this->ColConstrained() )\n        AFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        AFilt.AlignColsWith( *this, false );\n    AFilt.RowFilterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( AFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( AFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( AFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::TransposeRowFilterFrom\n( const BlockDistMatrix<T,VGath,U>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::TransposeRowFilterFrom\"))\n    BlockDistMatrix<T,V,U> AFilt( A.Grid() );\n    if( this->ColConstrained() )\n        AFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        AFilt.AlignColsWith( *this, false );\n    AFilt.ColFilterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( AFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( AFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( AFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::TransposePartialColFilterFrom\n( const BlockDistMatrix<T,V,UPart>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::TransposePartialColFilterFrom\"))\n    BlockDistMatrix<T,V,U> AFilt( A.Grid() );\n    if( this->ColConstrained() )\n        AFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        AFilt.AlignColsWith( *this, false );\n    AFilt.PartialRowFilterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( AFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( AFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( AFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::TransposePartialRowFilterFrom\n( const BlockDistMatrix<T,VPart,U>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::TransposePartialRowFilterFrom\"))\n    BlockDistMatrix<T,V,U> AFilt( A.Grid() );\n    if( this->ColConstrained() )\n        AFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        AFilt.AlignColsWith( *this, false );\n    AFilt.PartialColFilterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( AFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( AFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( AFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AdjointColFilterFrom\n( const BlockDistMatrix<T,V,UGath>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AdjointColFilterFrom\"))\n    this->TransposeColFilterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AdjointRowFilterFrom\n( const BlockDistMatrix<T,VGath,U>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AdjointRowFilterFrom\"))\n    this->TransposeRowFilterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AdjointPartialColFilterFrom\n( const BlockDistMatrix<T,V,UPart>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AdjointPartialColFilterFrom\"))\n    this->TransposePartialColFilterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AdjointPartialRowFilterFrom\n( const BlockDistMatrix<T,VPart,U>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AdjointPartialRowFilterFrom\"))\n    this->TransposePartialRowFilterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::TransposeColSumScatterFrom\n( const BlockDistMatrix<T,V,UGath>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::TransposeColSumScatterFrom\"))\n    BlockDistMatrix<T,V,U> ASumFilt( A.Grid() );\n    if( this->ColConstrained() )\n        ASumFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        ASumFilt.AlignColsWith( *this, false );\n    ASumFilt.RowSumScatterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( ASumFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( ASumFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( ASumFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::TransposePartialColSumScatterFrom\n( const BlockDistMatrix<T,V,UPart>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::TransposePartialColSumScatterFrom\"))\n    BlockDistMatrix<T,V,U> ASumFilt( A.Grid() );\n    if( this->ColConstrained() )\n        ASumFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        ASumFilt.AlignColsWith( *this, false );\n    ASumFilt.PartialRowSumScatterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( ASumFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( ASumFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( ASumFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AdjointColSumScatterFrom\n( const BlockDistMatrix<T,V,UGath>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AdjointColSumScatterFrom\"))\n    this->TransposeColSumScatterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AdjointPartialColSumScatterFrom\n( const BlockDistMatrix<T,V,UPart>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AdjointPartialColSumScatterFrom\"))\n    this->TransposePartialColSumScatterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::TransposeColSumScatterUpdate\n( T alpha, const BlockDistMatrix<T,V,UGath>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::TransposeColSumScatterUpdate\"))\n    BlockDistMatrix<T,V,U> ASumFilt( A.Grid() );\n    if( this->ColConstrained() )\n        ASumFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        ASumFilt.AlignColsWith( *this, false );\n    ASumFilt.RowSumScatterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( ASumFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( ASumFilt, false );\n    // ALoc += alpha ASumFiltLoc'\n    elem::Matrix<T>& ALoc = this->Matrix();\n    const elem::Matrix<T>& BLoc = ASumFilt.LockedMatrix();\n    const Int localHeight = ALoc.Height();\n    const Int localWidth = ALoc.Width();\n    if( conjugate )\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                ALoc.Update( iLoc, jLoc, alpha*Conj(BLoc.Get(jLoc,iLoc)) );\n    }\n    else\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                ALoc.Update( iLoc, jLoc, alpha*BLoc.Get(jLoc,iLoc) );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::TransposePartialColSumScatterUpdate\n( T alpha, const BlockDistMatrix<T,V,UPart>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::TransposePartialColSumScatterUpdate\"))\n    BlockDistMatrix<T,V,U> ASumFilt( A.Grid() );\n    if( this->ColConstrained() )\n        ASumFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        ASumFilt.AlignColsWith( *this, false );\n    ASumFilt.PartialRowSumScatterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( ASumFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( ASumFilt, false );\n    // ALoc += alpha ASumFiltLoc'\n    elem::Matrix<T>& ALoc = this->Matrix();\n    const elem::Matrix<T>& BLoc = ASumFilt.LockedMatrix();\n    const Int localHeight = ALoc.Height();\n    const Int localWidth = ALoc.Width();\n    if( conjugate )\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                ALoc.Update( iLoc, jLoc, alpha*Conj(BLoc.Get(jLoc,iLoc)) );\n    }\n    else\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                ALoc.Update( iLoc, jLoc, alpha*BLoc.Get(jLoc,iLoc) );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AdjointColSumScatterUpdate\n( T alpha, const BlockDistMatrix<T,V,UGath>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AdjointColSumScatterUpdate\"))\n    this->TransposeColSumScatterUpdate( alpha, A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::AdjointPartialColSumScatterUpdate\n( T alpha, const BlockDistMatrix<T,V,UPart>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::AdjointPartialColSumScatterUpdate\"))\n    this->TransposePartialColSumScatterUpdate( alpha, A, true );\n}\n\n// Diagonal manipulation\n// =====================\ntemplate<typename T,Dist U,Dist V>\nbool\nGeneralBlockDistMatrix<T,U,V>::DiagonalAlignedWith\n( const elem::BlockDistData& d, Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::DiagonalAlignedWith\"))\n    // TODO: Ensure blocksize is compatible...the blocksizes needed for a \n    //       diagonal distribution are variable except for special cases.\n    LogicError(\"This routine is not yet written\");\n    return false;\n}\n\ntemplate<typename T,Dist U,Dist V>\nInt \nGeneralBlockDistMatrix<T,U,V>::DiagonalRoot( Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::DiagonalRoot\"))\n    LogicError(\"This routine is not yet written\");\n    return 0;\n}\n\ntemplate<typename T,Dist U,Dist V>\nInt\nGeneralBlockDistMatrix<T,U,V>::DiagonalAlign( Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::DiagonalAlign\"))\n    LogicError(\"This routine is not yet written\");\n    return 0;\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::GetDiagonal\n( BlockDistMatrix<T,UDiag,VDiag>& d, Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::GetDiagonal\"))\n    this->GetDiagonalHelper\n    ( d, offset, []( T& alpha, T beta ) { alpha = beta; } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::GetRealPartOfDiagonal\n( BlockDistMatrix<Base<T>,UDiag,VDiag>& d, Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::GetRealPartOfDiagonal\"))\n    this->GetDiagonalHelper\n    ( d, offset, []( Base<T>& alpha, T beta ) { alpha = RealPart(beta); } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::GetImagPartOfDiagonal\n( BlockDistMatrix<Base<T>,UDiag,VDiag>& d, Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::GetImagPartOfDiagonal\"))\n    this->GetDiagonalHelper\n    ( d, offset, []( Base<T>& alpha, T beta ) { alpha = ImagPart(beta); } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nauto\nGeneralBlockDistMatrix<T,U,V>::GetDiagonal( Int offset ) const\n-> BlockDistMatrix<T,UDiag,VDiag>\n{\n    BlockDistMatrix<T,UDiag,VDiag> d( this->Grid() );\n    GetDiagonal( d, offset );\n    return d;\n}\n\ntemplate<typename T,Dist U,Dist V>\nauto\nGeneralBlockDistMatrix<T,U,V>::GetRealPartOfDiagonal( Int offset ) const\n-> BlockDistMatrix<Base<T>,UDiag,VDiag>\n{\n    BlockDistMatrix<Base<T>,UDiag,VDiag> d( this->Grid() );\n    GetRealPartOfDiagonal( d, offset );\n    return d;\n}\n\ntemplate<typename T,Dist U,Dist V>\nauto\nGeneralBlockDistMatrix<T,U,V>::GetImagPartOfDiagonal( Int offset ) const\n-> BlockDistMatrix<Base<T>,UDiag,VDiag>\n{\n    BlockDistMatrix<Base<T>,UDiag,VDiag> d( this->Grid() );\n    GetImagPartOfDiagonal( d, offset );\n    return d;\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::SetDiagonal\n( const BlockDistMatrix<T,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::SetDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, []( T& alpha, T beta ) { alpha = beta; } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::SetRealPartOfDiagonal\n( const BlockDistMatrix<Base<T>,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::SetRealPartOfDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, \n      []( T& alpha, Base<T> beta ) { elem::SetRealPart(alpha,beta); } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::SetImagPartOfDiagonal\n( const BlockDistMatrix<Base<T>,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::SetImagPartOfDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, \n      []( T& alpha, Base<T> beta ) { elem::SetImagPart(alpha,beta); } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::UpdateDiagonal\n( T gamma, const BlockDistMatrix<T,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::UpdateDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, [gamma]( T& alpha, T beta ) { alpha += gamma*beta; } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::UpdateRealPartOfDiagonal\n( Base<T> gamma, const BlockDistMatrix<Base<T>,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::UpdateRealPartOfDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, \n      [gamma]( T& alpha, Base<T> beta ) \n      { elem::UpdateRealPart(alpha,gamma*beta); } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralBlockDistMatrix<T,U,V>::UpdateImagPartOfDiagonal\n( Base<T> gamma, const BlockDistMatrix<Base<T>,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::UpdateImagPartOfDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, \n      [gamma]( T& alpha, Base<T> beta ) \n      { elem::UpdateImagPart(alpha,gamma*beta); } );\n}\n\n// Private section\n// ###############\n\n// Diagonal helper functions\n// =========================\ntemplate<typename T,Dist U,Dist V>\ntemplate<typename S,class Function>\nvoid\nGeneralBlockDistMatrix<T,U,V>::GetDiagonalHelper\n( BlockDistMatrix<S,UDiag,VDiag>& d, Int offset, Function func ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GBDM::GetDiagonalHelper\"))\n    LogicError(\"This routine is not yet written\");\n}\n\ntemplate<typename T,Dist U,Dist V>\ntemplate<typename S,class Function>\nvoid\nGeneralBlockDistMatrix<T,U,V>::SetDiagonalHelper\n( const BlockDistMatrix<S,UDiag,VDiag>& d, Int offset, Function func ) \n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GBDM::SetDiagonalHelper\");\n        if( !this->DiagonalAlignedWith( d, offset ) )\n            LogicError(\"Invalid diagonal alignment\");\n    )\n    LogicError(\"This routine is not yet written\");\n}\n\n// Instantiations for {Int,Real,Complex<Real>} for each Real in {float,double}\n// ###########################################################################\n\n#define DISTPROTO(T,U,V) template class GeneralBlockDistMatrix<T,U,V>\n  \n#define PROTO(T)\\\n  DISTPROTO(T,CIRC,CIRC);\\\n  DISTPROTO(T,MC,  MR  );\\\n  DISTPROTO(T,MC,  STAR);\\\n  DISTPROTO(T,MD,  STAR);\\\n  DISTPROTO(T,MR,  MC  );\\\n  DISTPROTO(T,MR,  STAR);\\\n  DISTPROTO(T,STAR,MC  );\\\n  DISTPROTO(T,STAR,MD  );\\\n  DISTPROTO(T,STAR,MR  );\\\n  DISTPROTO(T,STAR,STAR);\\\n  DISTPROTO(T,STAR,VC  );\\\n  DISTPROTO(T,STAR,VR  );\\\n  DISTPROTO(T,VC,  STAR);\\\n  DISTPROTO(T,VR,  STAR);\n\n#ifndef ELEM_DISABLE_COMPLEX\n #ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(float);\n  PROTO(double);\n  PROTO(Complex<float>);\n  PROTO(Complex<double>);\n #else // ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(double);\n  PROTO(Complex<double>);\n #endif // ifndef ELEM_DISABLE_FLOAT\n#else // ifndef ELEM_DISABLE_COMPLEX\n #ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(float);\n  PROTO(double);\n #else // ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(double);\n #endif // ifndef ELEM_DISABLE_FLOAT\n#endif // ifndef ELEM_DISABLE_COMPLEX\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/MC_MR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist MC\n#define RowDist MR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [MC,MR]\"))\n    if( this->Grid() == A.Grid() )\n        A.Translate( *this );\n    else\n        this->CopyFromDifferentGrid( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [MC,STAR]\"))\n    this->RowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,MR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [MR,MC]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [MR,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new BlockDistMatrix<T,VR,STAR>(A) );\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new BlockDistMatrix<T,VC,STAR>(this->Grid()) );\n    A_VC_STAR->AlignWith( *this );\n    *A_VC_STAR = *A_VR_STAR;\n    delete A_VR_STAR.release(); // lowers memory highwater\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,MC]\"))\n    std::unique_ptr<BlockDistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new BlockDistMatrix<T,STAR,VC>(A) );\n    std::unique_ptr<BlockDistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new BlockDistMatrix<T,STAR,VR>(this->Grid()) );\n    A_STAR_VR->AlignWith( *this );\n    *A_STAR_VR = *A_STAR_VC;\n    delete A_STAR_VC.release(); // lowers memory highwater\n    *this = *A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [VC,STAR]\"))\n    A.PartialColAllToAll( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,VC]\"))\n    BlockDistMatrix<T,STAR,VR> A_STAR_VR(this->Grid());\n    A_STAR_VR.AlignWith( *this );\n    A_STAR_VR = A;\n    *this = A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [VR,STAR]\"))\n    BlockDistMatrix<T,VC,STAR> A_VC_STAR(this->Grid());\n    A_VC_STAR.AlignWith( *this );\n    A_VC_STAR = A;\n    *this = A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,VR]\"))\n    A.PartialRowAllToAll( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,STAR]\"))\n    this->FilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [CIRC,CIRC]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return this->grid_->MRComm(); }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt BDM::RowStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return 1; }\n\n// Private section\n// ###############\n\n// Redistribute from a different process grid\n// ==========================================\n\ntemplate<typename T>\nvoid BDM::CopyFromDifferentGrid( const BDM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR]::CopyFromDifferentGrid\"))\n    LogicError(\"This routine is not yet written\");\n}\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  OTHER(T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/MC_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist MC\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [MC,MR]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [MC,STAR]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,MR]\"))\n    BlockDistMatrix<T,MC,MR> A_MC_MR(this->Grid());\n    A_MC_MR.AlignColsWith(*this);\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [MR,MC]\"))\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new BlockDistMatrix<T,VR,STAR>(A) );\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new BlockDistMatrix<T,VC,STAR>(this->Grid()) );\n    A_VC_STAR->AlignColsWith(*this);\n    *A_VC_STAR = *A_VR_STAR;\n    delete A_VR_STAR.release(); // lowers memory highwater\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [MR,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new BlockDistMatrix<T,VR,STAR>(A) );\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new BlockDistMatrix<T,VC,STAR>(this->Grid()) );\n    A_VC_STAR->AlignColsWith(*this);\n    *A_VC_STAR = *A_VR_STAR;\n    delete A_VR_STAR.release(); // lowers memory highwater\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,MC]\"))\n    std::unique_ptr<BlockDistMatrix<T,MR,MC>>\n        A_MR_MC( new BlockDistMatrix<T,MR,MC>(A) );\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>>\n        A_VR_STAR( new BlockDistMatrix<T,VR,STAR>(*A_MR_MC) );\n    delete A_MR_MC.release(); // lowers memory highwater\n\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>>\n        A_VC_STAR( new BlockDistMatrix<T,VC,STAR>(this->Grid()) );\n    A_VC_STAR->AlignColsWith(*this);\n    *A_VC_STAR = *A_VR_STAR;\n    delete A_VR_STAR.release(); // lowers memory highwater\n\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [VC,STAR]\"))\n    A.PartialColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,VC]\"))\n    std::unique_ptr<BlockDistMatrix<T,STAR,VR>>\n        A_STAR_VR( new BlockDistMatrix<T,STAR,VR>(A) );\n    std::unique_ptr<BlockDistMatrix<T,MC,MR>>\n        A_MC_MR\n        ( new BlockDistMatrix<T,MC,MR>(this->Grid()) );\n    A_MC_MR->AlignColsWith(*this);\n    *A_MC_MR = *A_STAR_VR;\n    delete A_STAR_VR.release(); // lowers memory highwater\n    *this = *A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [VR,STAR]\"))\n    BlockDistMatrix<T,VC,STAR> A_VC_STAR(this->Grid());\n    A_VC_STAR.AlignColsWith(*this);\n    A_VC_STAR = A;\n    *this = A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,VR]\"))\n    BlockDistMatrix<T,MC,MR> A_MC_MR(this->Grid());\n    A_MC_MR.AlignColsWith( *this );\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [CIRC,CIRC]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt BDM::RowStride() const { return 1; }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return this->grid_->MRSize(); }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  OTHER(T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/MD_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist MD\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [MC,MR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [MC,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,MR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [MD,STAR]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [MR,MC]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [MR,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,MC]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [VC,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,VC]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [VR,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,VR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [CIRC,CIRC]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->MDComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return this->grid_->MDPerpComm(); }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return this->grid_->MDComm(); }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return this->grid_->LCM(); }\ntemplate<typename T>\nInt BDM::RowStride() const { return 1; }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->LCM(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return this->grid_->GCD(); }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  OTHER(T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/MR_MC.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist MR\n#define RowDist MC\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [MC,MR]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [MC,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new BlockDistMatrix<T,VC,STAR>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new BlockDistMatrix<T,VR,STAR>(this->Grid()) );\n    A_VR_STAR->AlignColsWith(*this);\n    *A_VR_STAR = *A_VC_STAR;\n    delete A_VC_STAR.release(); // lowers memory highwater\n\n    *this = *A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,MR]\"))\n    std::unique_ptr<BlockDistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new BlockDistMatrix<T,STAR,VR>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new BlockDistMatrix<T,STAR,VC>(this->Grid()) );\n    A_STAR_VR->AlignRowsWith(*this);\n    *A_STAR_VC = *A_STAR_VR;\n    delete A_STAR_VR.release(); // lowers memory highwater\n\n    *this = *A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [MR,MC]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [MR,STAR]\"))\n    this->RowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,MC]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [VC,STAR]\"))\n    BlockDistMatrix<T,VR,STAR> A_VR_STAR( A );\n    *this = A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,VC]\"))\n    A.PartialRowAllToAll( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [VR,STAR]\"))\n    A.PartialColAllToAll( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,VR]\"))\n    BlockDistMatrix<T,STAR,VC> A_STAR_VC( A );\n    *this = A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,STAR]\"))\n    this->FilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [CIRC,CIRC]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->VRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return this->grid_->MCComm(); }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt BDM::RowStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->VRSize(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return 1; }\n\n// Private section\n// ###############\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  OTHER(T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/MR_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist MR\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [MC,MR]\"))\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new BlockDistMatrix<T,VC,STAR>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new BlockDistMatrix<T,VR,STAR>(this->Grid()) );\n    A_VR_STAR->AlignColsWith(*this);\n    *A_VR_STAR = *A_VC_STAR;\n    delete A_VC_STAR.release(); // lowers memory highwater\n\n    *this = *A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [MC,STAR]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,MR]\"))\n    std::unique_ptr<BlockDistMatrix<T,MC,MR>> \n        A_MC_MR( new BlockDistMatrix<T,MC,MR>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new BlockDistMatrix<T,VC,STAR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new BlockDistMatrix<T,VR,STAR>(this->Grid()) );\n    A_VR_STAR->AlignColsWith(*this);\n    *A_VR_STAR = *A_VC_STAR;\n    delete A_VC_STAR.release(); // lowers memory highwater\n\n    *this = *A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [MR,MC]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [MR,STAR]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,MC]\"))\n    BlockDistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [VC,STAR]\"))\n    BlockDistMatrix<T,VR,STAR> A_VR_STAR(this->Grid());\n    A_VR_STAR.AlignColsWith(*this);\n    A_VR_STAR = A;\n    *this = A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,VC]\"))\n    BlockDistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [VR,STAR]\"))\n    A.PartialColAllGather(*this);\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,VR]\"))\n    std::unique_ptr<BlockDistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new BlockDistMatrix<T,STAR,VC>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,MR,MC>> A_MR_MC\n    ( new BlockDistMatrix<T,MR,MC>(this->Grid()) );\n    A_MR_MC->AlignColsWith(*this);\n    *A_MR_MC = *A_STAR_VC;\n    delete A_STAR_VC.release(); // lowers memory highwater\n\n    *this = *A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [CIRC,CIRC]\"))\n    BlockDistMatrix<T,MR,MC> A_MR_MC( this->Grid() );\n    A_MR_MC.AlignWith( *this );\n    A_MR_MC = A;\n    *this = A_MR_MC;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt BDM::RowStride() const { return 1; }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return this->grid_->MCSize(); }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  OTHER(T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/README.md",
    "content": "### `src/core/dist_matrix/`\n\nThis folder contains the source code for the various partial specializations of\nthe `DistMatrix` class; please see `include/elemental/core/dist_matrix/` for the\ncorresponding header-level prototypes and a detailed README explaining the \nvarious data distributions.\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/STAR_MC.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist MC\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [MC,MR]\"))\n    std::unique_ptr<BlockDistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new BlockDistMatrix<T,STAR,VR>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new BlockDistMatrix<T,STAR,VC>(this->Grid()) );\n    A_STAR_VC->AlignRowsWith(*this);\n    *A_STAR_VC = *A_STAR_VR;\n    delete A_STAR_VR.release(); // lowers memory highwater\n\n    *this = *A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [MC,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,MC,MR>> \n        A_MC_MR( new BlockDistMatrix<T,MC,MR>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new BlockDistMatrix<T,STAR,VR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n\n    std::unique_ptr<BlockDistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new BlockDistMatrix<T,STAR,VC>(this->Grid()) );\n    A_STAR_VC->AlignRowsWith(*this);\n    *A_STAR_VC = *A_STAR_VR;\n    delete A_STAR_VR.release(); // lowers memory highwater\n\n    *this = *A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [STAR,MR]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [MR,MC]\"))\n    A.ColAllGather(*this);\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [MR,STAR]\"))\n    BlockDistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [STAR,MC]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [VC,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new BlockDistMatrix<T,VR,STAR>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,MR,MC>> A_MR_MC\n    ( new BlockDistMatrix<T,MR,MC>(this->Grid()) );\n    A_MR_MC->AlignRowsWith(*this);\n    *A_MR_MC = *A_VR_STAR;\n    delete A_VR_STAR.release();\n\n    *this = *A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [STAR,VC]\"))\n    A.PartialRowAllGather(*this);\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [VR,STAR]\"))\n    BlockDistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [STAR,VR]\"))\n    BlockDistMatrix<T,STAR,VC> A_STAR_VC(this->Grid());\n    A_STAR_VC.AlignRowsWith(*this);\n    *this = A_STAR_VC = A;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [STAR,STAR]\"))\n    this->RowFilterFrom(A);\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [CIRC,CIRC]\"))\n    BlockDistMatrix<T,MR,MC> A_MR_MC( A.Grid() );\n    A_MR_MC.AlignWith( *this );\n    A_MR_MC = A;\n    *this = A_MR_MC;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return this->grid_->MCComm(); }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return 1; }\ntemplate<typename T>\nInt BDM::RowStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return this->grid_->MRSize(); }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  OTHER(T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/STAR_MD.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist MD\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [MC,MR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [MC,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,MR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [MD,STAR]\"))\n    LogicError(\"This routine is not yet implemented\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,MD]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [MR,MC]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [MR,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,MC]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [VC,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,VC]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [VR,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,VR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [CIRC,CIRC]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->MDComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return this->grid_->MDPerpComm(); }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return this->grid_->MDComm(); }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return 1; }\ntemplate<typename T>\nInt BDM::RowStride() const { return this->grid_->LCM(); }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->LCM(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return this->grid_->GCD(); }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  OTHER(T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/STAR_MR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist MR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [MC,MR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [MC,STAR]\"))\n    BlockDistMatrix<T,MC,MR> A_MC_MR(this->Grid());\n    A_MC_MR.AlignRowsWith(*this);\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,MR]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [MR,MC]\"))\n    std::unique_ptr<BlockDistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new BlockDistMatrix<T,STAR,VC>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new BlockDistMatrix<T,STAR,VR>(this->Grid()) );\n    A_STAR_VR->AlignRowsWith(*this);\n    *A_STAR_VR = *A_STAR_VC;\n    delete A_STAR_VC.release(); // lowers memory highwater\n\n    *this = *A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [MR,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new BlockDistMatrix<T,VR,STAR>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new BlockDistMatrix<T,VC,STAR>(*A_VR_STAR) );\n    delete A_VR_STAR.release(); // lowers memory highwater\n\n    std::unique_ptr<BlockDistMatrix<T,MC,MR>> A_MC_MR\n    ( new BlockDistMatrix<T,MC,MR>(this->Grid()) );\n    A_MC_MR->AlignRowsWith(*this);\n    *A_MC_MR = *A_VC_STAR;\n    delete A_VC_STAR.release(); // lowers memory highwater\n\n    *this = *A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,MC]\"))\n    std::unique_ptr<BlockDistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new BlockDistMatrix<T,STAR,VC>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new BlockDistMatrix<T,STAR,VR>(this->Grid()) );\n    A_STAR_VR->AlignRowsWith(*this);\n    *A_STAR_VR = *A_STAR_VC;\n    delete A_STAR_VC.release(); // lowers memory highwater\n\n    std::unique_ptr<BlockDistMatrix<T,MC,MR>> A_MC_MR\n    ( new BlockDistMatrix<T,MC,MR>(*A_STAR_VR) );\n    delete A_STAR_VR.release(); // lowers memory highwater\n\n    *this = *A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [VC,STAR]\"))\n    BlockDistMatrix<T,MC,MR> A_MC_MR(this->Grid());\n    A_MC_MR.AlignRowsWith(*this);\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,VC]\"))\n    BlockDistMatrix<T,STAR,VR> A_STAR_VR(this->Grid());\n    A_STAR_VR.AlignRowsWith(*this);\n    A_STAR_VR = A;\n    *this = A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [VR,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new BlockDistMatrix<T,VC,STAR>(A) );\n\n    std::unique_ptr<BlockDistMatrix<T,MC,MR>> A_MC_MR\n    ( new BlockDistMatrix<T,MC,MR>(this->Grid()) );\n    A_MC_MR->AlignRowsWith(*this);\n    *A_MC_MR = *A_VC_STAR;\n    delete A_VC_STAR.release(); // lowers memory highwater\n\n    *this = *A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,VR]\"))\n    A.PartialRowAllGather(*this);\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,STAR]\"))\n    this->RowFilterFrom(A);\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [CIRC,CIRC]\"))\n    BlockDistMatrix<T,MC,MR> A_MC_MR( A );\n    A_MC_MR.AlignWith( *this );\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return this->grid_->MRComm(); }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return 1; }\ntemplate<typename T>\nInt BDM::RowStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return this->grid_->MCSize(); }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  OTHER(T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/STAR_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [MC,MR]\"))\n    A.AllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [MC,STAR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,MR]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [MD,STAR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,MD]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [MR,MC]\"))\n    A.AllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [MR,STAR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,MC]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [VC,STAR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,VC]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [VR,STAR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,VR]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,STAR]\"))\n    this->Resize( A.Height(), A.Width() ); \n    if( this->Grid() == A.Grid() )\n    {\n        this->matrix_ = A.LockedMatrix();\n    }\n    else\n    {\n        LogicError(\"This option is not yet written\");\n    }\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [CIRC,CIRC]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return 1; }\ntemplate<typename T>\nInt BDM::RowStride() const { return 1; }\ntemplate<typename T>\nInt BDM::DistSize() const { return 1; }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return this->grid_->VCSize(); }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  OTHER(T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/STAR_VC.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist VC\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [MC,MR]\"))\n    BlockDistMatrix<T,STAR,VR> A_STAR_VR( A );\n    *this = A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [MC,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,MC,MR>> \n        A_MC_MR( new BlockDistMatrix<T,MC,MR>(A) );\n    std::unique_ptr<BlockDistMatrix<T,STAR,VR>> \n        A_STAR_VR( new BlockDistMatrix<T,STAR,VR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n    *this = *A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [STAR,MR]\"))\n    BlockDistMatrix<T,STAR,VR> A_STAR_VR( A );\n    *this = A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [MR,MC]\"))\n    this->PartialRowAllToAllFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [MR,STAR]\"))\n    BlockDistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [STAR,MC]\"))\n    this->PartialRowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [VC,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,MC,MR>> \n        A_MC_MR( new BlockDistMatrix<T,MC,MR>(A) );\n    std::unique_ptr<BlockDistMatrix<T,STAR,VR>> \n        A_STAR_VR( new BlockDistMatrix<T,STAR,VR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n    *this = *A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [STAR,VC]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [VR,STAR]\"))\n    BlockDistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [STAR,VR]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [STAR,STAR]\"))\n    this->RowFilterFrom(A);\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [CIRC,CIRC]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::PartialRowComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::PartialUnionRowComm() const { return this->grid_->MRComm(); }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return 1; }\ntemplate<typename T>\nInt BDM::RowStride() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt BDM::PartialRowStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt BDM::PartialUnionRowStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  OTHER(T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/STAR_VR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist VR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [MC,MR]\"))\n    this->PartialRowAllToAllFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [MC,STAR]\"))\n    BlockDistMatrix<T,MC,MR> A_MC_MR( A );\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [STAR,MR]\"))\n    this->PartialRowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [MR,MC]\"))\n    BlockDistMatrix<T,STAR,VC> A_STAR_VC( A );\n    *this = A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [MR,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,MR,MC>> \n        A_MR_MC( new BlockDistMatrix<T,MR,MC>(A) );\n    std::unique_ptr<BlockDistMatrix<T,STAR,VC>> \n        A_STAR_VC( new BlockDistMatrix<T,STAR,VC>(*A_MR_MC) );\n    delete A_MR_MC.release(); // lowers memory highwater\n    *this = *A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [STAR,MC]\"))\n    BlockDistMatrix<T,STAR,VC> A_STAR_VC( A );\n    *this = A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [VC,STAR]\"))\n    BlockDistMatrix<T,MC,MR> A_MC_MR( A );\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [STAR,VC]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [VR,STAR]\"))\n    std::unique_ptr<BlockDistMatrix<T,MR,MC>> \n        A_MR_MC( new BlockDistMatrix<T,MR,MC>(A) );\n    std::unique_ptr<BlockDistMatrix<T,STAR,VC>> \n        A_STAR_VC( new BlockDistMatrix<T,STAR,VC>(*A_MR_MC) );\n    delete A_MR_MC.release(); // lowers memory highwater\n    *this = *A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [STAR,VR]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [STAR,STAR]\"))\n    this->RowFilterFrom(A);\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [CIRC,CIRC]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->VRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return this->grid_->VRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::PartialRowComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::PartialUnionRowComm() const { return this->grid_->MCComm(); }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return 1; }\ntemplate<typename T>\nInt BDM::RowStride() const { return this->grid_->VRSize(); }\ntemplate<typename T>\nInt BDM::PartialRowStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt BDM::PartialUnionRowStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->VRSize(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  OTHER(T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/VC_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist VC\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [MC,MR]\"))\n    this->PartialColAllToAllFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [MC,STAR]\"))\n    this->PartialColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,MR]\"))\n    BlockDistMatrix<T,MC,MR> A_MC_MR( A );\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [MR,MC]\"))\n    BlockDistMatrix<T,VR,STAR> A_VR_STAR( A );\n    *this = A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [MR,STAR]\"))\n    BlockDistMatrix<T,VR,STAR> A_VR_STAR( A );\n    *this = A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,MC]\"))\n    std::unique_ptr<BlockDistMatrix<T,MR,MC>> \n        A_MR_MC( new BlockDistMatrix<T,MR,MC>(A) );\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> \n        A_VR_STAR( new BlockDistMatrix<T,VR,STAR>(*A_MR_MC) );\n    delete A_MR_MC.release(); // lowers memory highwater\n    *this = *A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [VC,STAR]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,VC]\"))\n    std::unique_ptr<BlockDistMatrix<T,MR,MC>> \n        A_MR_MC( new BlockDistMatrix<T,MR,MC>(A) );\n    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> \n        A_VR_STAR( new BlockDistMatrix<T,VR,STAR>(*A_MR_MC) );\n    delete A_MR_MC.release(); // lowers memory highwater\n    *this = *A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [VR,STAR]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,VR]\"))\n    BlockDistMatrix<T,MC,MR> A_MC_MR( A );\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [CIRC,CIRC]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::PartialColComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm BDM::PartialUnionColComm() const { return this->grid_->MRComm(); }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt BDM::RowStride() const { return 1; }\ntemplate<typename T>\nInt BDM::PartialColStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt BDM::PartialUnionColStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  OTHER(T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/VR_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist VR\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [MC,MR]\"))\n    BlockDistMatrix<T,VC,STAR> A_VC_STAR( A );\n    *this = A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [MC,STAR]\"))\n    BlockDistMatrix<T,VC,STAR> A_VC_STAR( A );\n    *this = A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,MR]\"))\n    std::unique_ptr<BlockDistMatrix<T,MC,MR>> \n        A_MC_MR( new BlockDistMatrix<T,MC,MR>(A) );\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> \n        A_VC_STAR( new BlockDistMatrix<T,VC,STAR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [MR,MC]\"))\n    this->PartialColAllToAllFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [MR,STAR]\"))\n    this->PartialColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,MC]\"))\n    BlockDistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [VC,STAR]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,VC]\"))\n    BlockDistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BDM& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [VR,STAR]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,VR]\"))\n    std::unique_ptr<BlockDistMatrix<T,MC,MR>> \n        A_MC_MR( new BlockDistMatrix<T,MC,MR>(A) );\n    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> \n        A_VC_STAR( new BlockDistMatrix<T,VC,STAR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( const BlockDistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [CIRC,CIRC]\"))\n    LogicError(\"This routine is not yet written\");\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm BDM::DistComm() const { return this->grid_->VRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::ColComm() const { return this->grid_->VRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::RowComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm BDM::PartialColComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm BDM::PartialUnionColComm() const { return this->grid_->MCComm(); }\n\ntemplate<typename T>\nInt BDM::ColStride() const { return this->grid_->VRSize(); }\ntemplate<typename T>\nInt BDM::RowStride() const { return 1; }\ntemplate<typename T>\nInt BDM::PartialColStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt BDM::PartialUnionColStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt BDM::DistSize() const { return this->grid_->VRSize(); }\ntemplate<typename T>\nInt BDM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt BDM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class BlockDistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template BlockDistMatrix<T,ColDist,RowDist>::BlockDistMatrix \\\n  ( const DistMatrix<T,U,V>& A ); \\\n  template BlockDistMatrix<T,ColDist,RowDist>& \\\n           BlockDistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const DistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  OTHER(T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/BlockDistMatrix/setup.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n\n// This file should be included into each of the BlockDistMatrix specializations\n// as a workaround for the fact that C++11 constructor inheritance is not \n// yet widely supported.\n\nnamespace elem {\n\n#define DM DistMatrix<T,ColDist,RowDist>\n#define BDM BlockDistMatrix<T,ColDist,RowDist>\n#define GBDM GeneralBlockDistMatrix<T,ColDist,RowDist>\n\n// Public section\n// ##############\n\n// Constructors and destructors\n// ============================\n\ntemplate<typename T>\nBDM::BlockDistMatrix( const elem::Grid& g, Int root )\n: GBDM(g,root)\n{ \n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts(); \n}\n\ntemplate<typename T>\nBDM::BlockDistMatrix\n( const elem::Grid& g, Int blockHeight, Int blockWidth, Int root )\n: GBDM(g,blockHeight,blockWidth,root)\n{ \n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts(); \n}\n\ntemplate<typename T>\nBDM::BlockDistMatrix\n( Int height, Int width, const elem::Grid& g, Int root )\n: GBDM(g,root)\n{ \n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts(); this->Resize(height,width); \n}\n\ntemplate<typename T>\nBDM::BlockDistMatrix\n( Int height, Int width, const elem::Grid& g,\n  Int blockHeight, Int blockWidth, Int root )\n: GBDM(g,blockHeight,blockWidth,root)\n{ \n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts(); \n    this->Resize(height,width); \n}\n\ntemplate<typename T>\nBDM::BlockDistMatrix( const BDM& A )\n: GBDM(A.Grid())\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BlockDistMatrix::BlockDistMatrix\"))\n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts();\n    if( &A != this )\n        *this = A;\n    else\n        LogicError(\"Tried to construct BlockDistMatrix with itself\");\n}\n\ntemplate<typename T>\ntemplate<Dist U,Dist V>\nBDM::BlockDistMatrix( const BlockDistMatrix<T,U,V>& A )\n: GBDM(A.Grid())\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BlockDistMatrix::BlockDistMatrix\"))\n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts();\n    if( ColDist != U || RowDist != V ||\n        reinterpret_cast<const BDM*>(&A) != this )\n        *this = A;\n    else\n        LogicError(\"Tried to construct BlockDistMatrix with itself\");\n}\n\ntemplate<typename T>\ntemplate<Dist U,Dist V>\nBDM::BlockDistMatrix( const DistMatrix<T,U,V>& A )\n: GBDM(A.Grid())\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BlockDistMatrix::BlockDistMatrix\"))\n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts();\n    *this = A;\n}\n\ntemplate<typename T>\nBDM::BlockDistMatrix( BDM&& A ) ELEM_NOEXCEPT : GBDM(std::move(A)) { } \n\ntemplate<typename T> BDM::~BlockDistMatrix() { }\n\ntemplate<typename T>\ntemplate<Dist U,Dist V>\nBDM&\nBDM::operator=( const DistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BDM = DM[U,V]\"))\n    BlockDistMatrix<T,U,V> ABlock(A.Grid());\n    LockedView( ABlock, A );\n    *this = ABlock;\n    return *this;\n}\n\ntemplate<typename T>\nBDM&\nBDM::operator=( BDM&& A )\n{\n    if( this->Viewing() && !A.Viewing() )\n        this->operator=( (const BDM&)A );\n    else\n        GBDM::operator=( std::move(A) );\n    return *this;\n}\n\ntemplate<typename T>\nelem::BlockDistData BDM::DistData() const { return elem::BlockDistData(*this); }\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/Abstract.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Constructors and destructors\n// ============================\n\ntemplate<typename T>\nAbstractDistMatrix<T>::AbstractDistMatrix( const elem::Grid& grid, Int root )\n: viewType_(OWNER),\n  height_(0), width_(0),\n  auxMemory_(),\n  matrix_(0,0,true),\n  colConstrained_(false), rowConstrained_(false), rootConstrained_(false),\n  colAlign_(0), rowAlign_(0),\n  root_(root), grid_(&grid)\n{ }\n\ntemplate<typename T>\nAbstractDistMatrix<T>::AbstractDistMatrix( AbstractDistMatrix<T>&& A ) \nELEM_NOEXCEPT\n: viewType_(A.viewType_),\n  height_(A.height_), width_(A.width_), \n  colConstrained_(A.colConstrained_), rowConstrained_(A.rowConstrained_),\n  rootConstrained_(A.rootConstrained_),\n  colAlign_(A.colAlign_), rowAlign_(A.rowAlign_),\n  colShift_(A.colShift_), rowShift_(A.rowShift_), \n  root_(A.root_),\n  grid_(A.grid_)\n{ \n    matrix_.ShallowSwap( A.matrix_ );\n    auxMemory_.ShallowSwap( A.auxMemory_ );\n}\n\n// Optional to override\n// --------------------\n\ntemplate<typename T>\nAbstractDistMatrix<T>::~AbstractDistMatrix() { }\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nAbstractDistMatrix<T>& \nAbstractDistMatrix<T>::operator=( AbstractDistMatrix<T>&& A )\n{\n    if( Viewing() && !A.Viewing() )\n    {\n        LogicError(\"Cannot move a non-view into a viewing AbstractDistMatrix\");\n    }\n    else\n    {\n        auxMemory_.ShallowSwap( A.auxMemory_ );\n        matrix_.ShallowSwap( A.matrix_ );\n        viewType_ = A.viewType_;\n        height_ = A.height_;\n        width_ = A.width_;\n        colConstrained_ = A.colConstrained_;\n        rowConstrained_ = A.rowConstrained_;\n        rootConstrained_ = A.rootConstrained_;\n        colAlign_ = A.colAlign_;\n        rowAlign_ = A.rowAlign_;\n        colShift_ = A.colShift_;\n        rowShift_ = A.rowShift_;\n        root_ = A.root_;\n        grid_ = A.grid_;\n    }\n    return *this;\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::Empty()\n{\n    matrix_.Empty_();\n    viewType_ = OWNER;\n    height_ = 0;\n    width_ = 0;\n    colAlign_ = 0;\n    rowAlign_ = 0;\n    colConstrained_ = false;\n    rowConstrained_ = false;\n    rootConstrained_ = false;\n    SetShifts();\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::EmptyData()\n{\n    matrix_.Empty_();\n    viewType_ = OWNER;\n    height_ = 0;\n    width_ = 0;\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SetGrid( const elem::Grid& grid )\n{\n    if( grid_ != &grid )\n    {\n        grid_ = &grid; \n        Empty();\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::Resize( Int height, Int width )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::Resize\");\n        AssertNotLocked();\n        if( Viewing() && (height > height_ || width > width_) )\n            LogicError(\"Tried to increase the size of a view\");\n    )\n    height_ = height; \n    width_ = width;\n    if( Participating() )\n        matrix_.Resize_\n        ( Length(height,ColShift(),ColStride()),\n          Length(width,RowShift(),RowStride()) );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::Resize( Int height, Int width, Int ldim )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::Resize\");\n        AssertNotLocked();\n        if( Viewing() && \n            (height > height_ || width > width_ || ldim > matrix_.LDim()) )\n            LogicError(\"Tried to increase the size of a view\");\n    )\n    height_ = height; \n    width_ = width;\n    if( Participating() )\n        matrix_.Resize_\n        ( Length(height,ColShift(),ColStride()),\n          Length(width,RowShift(),RowStride()), ldim );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::MakeConsistent( bool includingViewers )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::MakeConsistent\"))\n\n    const Int msgLength = 9;\n    Int message[msgLength];\n    if( CrossRank() == Root() )\n    {\n        message[0] = viewType_;\n        message[1] = height_;\n        message[2] = width_;\n        message[3] = colConstrained_;\n        message[4] = rowConstrained_;\n        message[5] = rootConstrained_;\n        message[6] = colAlign_;\n        message[7] = rowAlign_;\n        message[8] = root_;\n    }\n\n    const elem::Grid& g = *grid_;\n    if( !g.InGrid() && !includingViewers )\n        LogicError(\"Non-participating process called MakeConsistent\");\n    if( g.InGrid() )\n    {\n        // TODO: Ensure roots are consistent within each cross communicator\n        mpi::Broadcast( message, msgLength, Root(), CrossComm() );\n    }\n    if( includingViewers )\n    {\n        const Int vcRoot = g.VCToViewingMap(0);\n        mpi::Broadcast( message, msgLength, vcRoot, g.ViewingComm() );\n    }\n    const ViewType newViewType    = static_cast<ViewType>(message[0]);\n    const Int newHeight           = message[1]; \n    const Int newWidth            = message[2];\n    const bool newConstrainedCol  = message[3];\n    const bool newConstrainedRow  = message[4];\n    const bool newConstrainedRoot = message[5];\n    const Int newColAlign         = message[6];\n    const Int newRowAlign         = message[7];\n    const Int root                = message[8];\n\n    root_            = root;\n    viewType_        = newViewType;\n    colConstrained_  = newConstrainedCol;\n    rowConstrained_  = newConstrainedRow;\n    rootConstrained_ = newConstrainedRoot;\n    colAlign_        = newColAlign;\n    rowAlign_        = newRowAlign;\n\n    SetShifts();\n    Resize( newHeight, newWidth );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::MakeSizeConsistent( bool includingViewers )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::MakeSizeConsistent\"))\n\n    const Int msgSize = 2;\n    Int message[msgSize];\n    if( CrossRank() == Root() )\n    {\n        message[0] = height_;\n        message[1] = width_;\n    }\n\n    const elem::Grid& g = *grid_;\n    if( !g.InGrid() && !includingViewers )\n        LogicError(\"Non-participating process called MakeSizeConsistent\");\n    if( g.InGrid() )\n        mpi::Broadcast( message, msgSize, Root(), CrossComm() );\n    if( includingViewers )\n    {\n        const Int vcRoot = g.VCToViewingMap(0);\n        mpi::Broadcast( message, msgSize, vcRoot, g.ViewingComm() );\n    }\n    const Int newHeight = message[0]; \n    const Int newWidth  = message[1];\n    Resize( newHeight, newWidth );\n}\n\n// Realignment\n// -----------\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::Align( Int colAlign, Int rowAlign, bool constrain )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"ADM::Align\"))\n    const bool requireChange = colAlign_ != colAlign || rowAlign_ != rowAlign;\n    DEBUG_ONLY(\n        if( Viewing() && requireChange )\n            LogicError(\"Tried to realign a view\");\n    )\n    if( requireChange )\n        Empty();\n    if( constrain )\n    {\n        colConstrained_ = true;\n        rowConstrained_ = true;\n    }\n    colAlign_ = colAlign;\n    rowAlign_ = rowAlign;\n    SetShifts();\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AlignCols( Int colAlign, bool constrain )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::AlignCols\");\n        if( Viewing() && colAlign_ != colAlign )\n            LogicError(\"Tried to realign a view\");\n    )\n    if( colAlign_ != colAlign )\n        EmptyData();\n    if( constrain )\n        colConstrained_ = true;\n    colAlign_ = colAlign;\n    SetShifts();\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AlignRows( Int rowAlign, bool constrain )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::AlignRows\");\n        if( Viewing() && rowAlign_ != rowAlign )\n            LogicError(\"Tried to realign a view\");\n    )\n    if( rowAlign_ != rowAlign )\n        EmptyData();\n    if( constrain )\n        rowConstrained_ = true;\n    rowAlign_ = rowAlign;\n    SetShifts();\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::FreeAlignments() \n{ \n    if( !Viewing() )\n    {\n        colConstrained_ = false;\n        rowConstrained_ = false;\n        rootConstrained_ = false;\n    }\n    else\n        LogicError(\"Cannot free alignments of views\");\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SetRoot( Int root, bool constrain )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::SetRoot\");\n        if( root < 0 || root >= mpi::Size(CrossComm()) )\n            LogicError(\"Invalid root\");\n    )\n    if( root != root_ )\n        Empty();\n    root_ = root;\n    if( constrain )\n        rootConstrained_ = true;\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AlignWith\n( const elem::DistData& data, bool constrain )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"ADM::AlignWith\"))\n    AlignColsWith( data, constrain );\n    AlignRowsWith( data, constrain );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AlignColsWith\n( const elem::DistData& data, bool constrain )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::AlignColsWith\");\n        if( colAlign_ != 0 )\n            LogicError(\"Alignment should have been zero\");\n    )\n    SetGrid( *data.grid );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AlignRowsWith\n( const elem::DistData& data, bool constrain )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::AlignRowsWith\");\n        if( rowAlign_ != 0 )\n            LogicError(\"Alignment should have been zero\");\n    )\n    SetGrid( *data.grid );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AlignAndResize\n( Int colAlign, Int rowAlign, Int height, Int width, \n  bool force, bool constrain )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::AlignAndResize\"))\n    if( !Viewing() )\n    {\n        if( force || !ColConstrained() )\n        {\n            colAlign_ = colAlign;\n            SetColShift(); \n        }\n        if( force || !RowConstrained() )\n        {\n            rowAlign_ = rowAlign;\n            SetRowShift();\n        }\n    }\n    if( constrain )\n    {\n        colConstrained_ = true;\n        rowConstrained_ = true;\n    }\n    if( force && (colAlign_ != colAlign || rowAlign_ != rowAlign) )\n        LogicError(\"Could not set alignments\"); \n    Resize( height, width );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AlignColsAndResize\n( Int colAlign, Int height, Int width, bool force, bool constrain )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::AlignColsAndResize\"))\n    if( !Viewing() && (force || !ColConstrained()) )\n    {\n        colAlign_ = colAlign;\n        SetColShift(); \n    }\n    if( constrain )\n        colConstrained_ = true;\n    if( force && colAlign_ != colAlign )\n        LogicError(\"Could not set col alignment\");\n    Resize( height, width );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AlignRowsAndResize\n( Int rowAlign, Int height, Int width, bool force, bool constrain )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::AlignRowsAndResize\"))\n    if( !Viewing() && (force || !RowConstrained()) )\n    {\n        rowAlign_ = rowAlign;\n        SetRowShift(); \n    }\n    if( constrain )\n        rowConstrained_ = true;\n    if( force && rowAlign_ != rowAlign )\n        LogicError(\"Could not set row alignment\");\n    Resize( height, width );\n}\n\n// Buffer attachment\n// -----------------\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::Attach\n( Int height, Int width, const elem::Grid& g, \n  Int colAlign, Int rowAlign, T* buffer, Int ldim, Int root )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::Attach\"))\n    Empty();\n\n    grid_ = &g;\n    root_ = root;\n    height_ = height;\n    width_ = width;\n    colAlign_ = colAlign;\n    rowAlign_ = rowAlign;\n    colConstrained_ = true;\n    rowConstrained_ = true;\n    rootConstrained_ = true;\n    viewType_ = VIEW;\n    SetShifts();\n    if( Participating() )\n    {\n        Int localHeight = Length(height,colShift_,ColStride());\n        Int localWidth = Length(width,rowShift_,RowStride());\n        matrix_.Attach_( localHeight, localWidth, buffer, ldim );\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::Attach\n( Int height, Int width, const elem::Grid& g,\n  Int colAlign, Int rowAlign, elem::Matrix<T>& A, Int root )\n{\n    // TODO: Assert that the local dimensions are correct\n    Attach( height, width, g, colAlign, rowAlign, A.Buffer(), A.LDim(), root );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::LockedAttach\n( Int height, Int width, const elem::Grid& g, \n  Int colAlign, Int rowAlign, const T* buffer, Int ldim, Int root )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::LockedAttach\"))\n    Empty();\n\n    grid_ = &g;\n    root_ = root;\n    height_ = height;\n    width_ = width;\n    colAlign_ = colAlign;\n    rowAlign_ = rowAlign;\n    colConstrained_ = true;\n    rowConstrained_ = true;\n    rootConstrained_ = true;\n    viewType_ = LOCKED_VIEW;\n    SetShifts();\n    if( Participating() )\n    {\n        Int localHeight = Length(height,colShift_,ColStride());\n        Int localWidth = Length(width,rowShift_,RowStride());\n        matrix_.LockedAttach_( localHeight, localWidth, buffer, ldim );\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::LockedAttach\n( Int height, Int width, const elem::Grid& g, \n  Int colAlign, Int rowAlign, const elem::Matrix<T>& A, Int root )\n{\n    // TODO: Assert that the local dimensions are correct\n    LockedAttach\n    ( height, width, g, colAlign, rowAlign, A.LockedBuffer(), A.LDim(), root );\n}\n\n// Basic queries\n// =============\n\n// Global matrix information\n// -------------------------\n\ntemplate<typename T>\nInt AbstractDistMatrix<T>::Height() const { return height_; }\ntemplate<typename T>\nInt AbstractDistMatrix<T>::Width() const { return width_; }\n\ntemplate<typename T>\nInt AbstractDistMatrix<T>::DiagonalLength( Int offset ) const\n{ return elem::DiagonalLength(height_,width_,offset); }\n\ntemplate<typename T>\nbool AbstractDistMatrix<T>::Viewing() const { return IsViewing( viewType_ ); }\ntemplate<typename T>\nbool AbstractDistMatrix<T>::Locked() const { return IsLocked( viewType_ ); }\n\n// Local matrix information\n// ------------------------\n\ntemplate<typename T>\nInt AbstractDistMatrix<T>::LocalHeight() const { return matrix_.Height(); }\ntemplate<typename T>\nInt AbstractDistMatrix<T>::LocalWidth() const { return matrix_.Width(); }\ntemplate<typename T>\nInt AbstractDistMatrix<T>::LDim() const { return matrix_.LDim(); }\n\ntemplate<typename T>\nelem::Matrix<T>& \nAbstractDistMatrix<T>::Matrix() { return matrix_; }\ntemplate<typename T>\nconst elem::Matrix<T>& \nAbstractDistMatrix<T>::LockedMatrix() const { return matrix_; }\n\ntemplate<typename T>\nsize_t\nAbstractDistMatrix<T>::AllocatedMemory() const { return matrix_.MemorySize(); }\n\ntemplate<typename T>\nT*\nAbstractDistMatrix<T>::Buffer() { return matrix_.Buffer(); }\n\ntemplate<typename T>\nT*\nAbstractDistMatrix<T>::Buffer( Int iLoc, Int jLoc )\n{ return matrix_.Buffer(iLoc,jLoc); }\n\ntemplate<typename T>\nconst T*\nAbstractDistMatrix<T>::LockedBuffer() const\n{ return matrix_.LockedBuffer(); }\n\ntemplate<typename T>\nconst T*\nAbstractDistMatrix<T>::LockedBuffer( Int iLoc, Int jLoc ) const\n{ return matrix_.LockedBuffer(iLoc,jLoc); }\n\n// Distribution information\n// ------------------------\n\ntemplate<typename T>\nconst elem::Grid& AbstractDistMatrix<T>::Grid() const { return *grid_; }\n\ntemplate<typename T>\nbool AbstractDistMatrix<T>::ColConstrained() const { return colConstrained_; }\ntemplate<typename T>\nbool AbstractDistMatrix<T>::RowConstrained() const { return rowConstrained_; }\ntemplate<typename T>\nbool AbstractDistMatrix<T>::RootConstrained() const { return rootConstrained_; }\n\ntemplate<typename T>\nInt AbstractDistMatrix<T>::ColAlign() const { return colAlign_; }\ntemplate<typename T>\nInt AbstractDistMatrix<T>::RowAlign() const { return rowAlign_; }\n\ntemplate<typename T>\nInt AbstractDistMatrix<T>::ColShift() const { return colShift_; }\ntemplate<typename T>\nInt AbstractDistMatrix<T>::RowShift() const { return rowShift_; }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::ColRank() const\n{ return mpi::Rank(ColComm()); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::RowRank() const\n{ return mpi::Rank(RowComm()); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::PartialColRank() const\n{ return mpi::Rank(PartialColComm()); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::PartialUnionColRank() const\n{ return mpi::Rank(PartialUnionColComm()); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::PartialRowRank() const\n{ return mpi::Rank(PartialRowComm()); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::PartialUnionRowRank() const\n{ return mpi::Rank(PartialUnionRowComm()); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::DistRank() const\n{ return mpi::Rank(DistComm()); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::CrossRank() const\n{ return mpi::Rank(CrossComm()); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::RedundantRank() const\n{ return mpi::Rank(RedundantComm()); }\n\ntemplate<typename T>\nInt AbstractDistMatrix<T>::Root() const { return root_; }\n\ntemplate<typename T>\nbool\nAbstractDistMatrix<T>::Participating() const\n{ return grid_->InGrid() && (CrossRank()==root_); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::RowOwner( Int i ) const\n{ return (i+ColAlign()) % ColStride(); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::ColOwner( Int j ) const\n{ return (j+RowAlign()) % RowStride(); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::Owner( Int i, Int j ) const\n{ return RowOwner(i)+ColOwner(j)*ColStride(); }\n\ntemplate<typename T>\nInt \nAbstractDistMatrix<T>::LocalRow( Int i ) const\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::LocalRow\");\n        if( !IsLocalRow(i) )\n            LogicError(\"Requested local index of non-local row\");\n    )\n    return LocalRowOffset(i);\n}\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::LocalCol( Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::LocalCol\");\n        if( !IsLocalCol(j) )\n            LogicError(\"Requested local index of non-local column\");\n    )\n    return LocalColOffset(j);\n}\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::LocalRowOffset( Int i ) const\n{ return Length_(i,ColShift(),ColStride()); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::LocalColOffset( Int j ) const\n{ return Length_(j,RowShift(),RowStride()); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::GlobalRow( Int iLoc ) const\n{ return ColShift() + iLoc*ColStride(); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::GlobalCol( Int jLoc ) const\n{ return RowShift() + jLoc*RowStride(); }\n\ntemplate<typename T>\nbool\nAbstractDistMatrix<T>::IsLocalRow( Int i ) const\n{ return Participating() && RowOwner(i) == ColRank(); }\n\ntemplate<typename T>\nbool\nAbstractDistMatrix<T>::IsLocalCol( Int j ) const\n{ return Participating() && ColOwner(j) == RowRank(); }\n\ntemplate<typename T>\nbool\nAbstractDistMatrix<T>::IsLocal( Int i, Int j ) const\n{ return IsLocalRow(i) && IsLocalCol(j); }\n\ntemplate<typename T>\nmpi::Comm\nAbstractDistMatrix<T>::PartialColComm() const\n{ return ColComm(); }\n\ntemplate<typename T>\nmpi::Comm\nAbstractDistMatrix<T>::PartialRowComm() const\n{ return RowComm(); }\n\ntemplate<typename T>\nmpi::Comm\nAbstractDistMatrix<T>::PartialUnionColComm() const\n{ return mpi::COMM_SELF; }\n\ntemplate<typename T>\nmpi::Comm\nAbstractDistMatrix<T>::PartialUnionRowComm() const\n{ return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::PartialColStride() const\n{ return ColStride(); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::PartialRowStride() const\n{ return RowStride(); }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::PartialUnionColStride() const\n{ return 1; }\n\ntemplate<typename T>\nInt\nAbstractDistMatrix<T>::PartialUnionRowStride() const\n{ return 1; }\n\n// Single-entry manipulation\n// =========================\n\n// Global entry manipulation\n// -------------------------\n\ntemplate<typename T>\nT\nAbstractDistMatrix<T>::Get( Int i, Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::Get\");\n        if( !grid_->InGrid() )\n            LogicError(\"Get should only be called in-grid\");\n    )\n    T value;\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            value = GetLocal( iLoc, jLoc );\n        }\n        mpi::Broadcast( value, owner, DistComm() );\n    }\n    mpi::Broadcast( value, Root(), CrossComm() ); \n    return value;\n}\n\ntemplate<typename T>\nBase<T>\nAbstractDistMatrix<T>::GetRealPart( Int i, Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::GetRealPart\");\n        if( !grid_->InGrid() )\n            LogicError(\"Get should only be called in-grid\");\n    )\n    Base<T> value;\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            value = GetLocalRealPart( iLoc, jLoc );\n        }\n        mpi::Broadcast( value, owner, DistComm() );\n    }\n    mpi::Broadcast( value, Root(), CrossComm() );\n    return value;\n}\n\ntemplate<typename T>\nBase<T>\nAbstractDistMatrix<T>::GetImagPart( Int i, Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"ADM::GetImagPart\");\n        if( !grid_->InGrid() )\n            LogicError(\"Get should only be called in-grid\");\n    )\n    Base<T> value;\n    if( IsComplex<T>::val )\n    {\n        if( CrossRank() == Root() )\n        {\n            const Int owner = Owner( i, j );\n            if( owner == DistRank() )\n            {\n                const Int iLoc = LocalRow(i);\n                const Int jLoc = LocalCol(j);\n                value = GetLocalRealPart( iLoc, jLoc );\n            }\n            mpi::Broadcast( value, owner, DistComm() );\n        }\n        mpi::Broadcast( value, Root(), CrossComm() );\n    }\n    else\n        value = 0;\n    return value;\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::Set( Int i, Int j, T value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::Set\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            SetLocal( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SetRealPart( Int i, Int j, Base<T> value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::SetRealPart\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            SetLocalRealPart( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SetImagPart( Int i, Int j, Base<T> value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::SetImagPart\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            SetLocalImagPart( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::Update( Int i, Int j, T value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::Update\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            UpdateLocal( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::UpdateRealPart( Int i, Int j, Base<T> value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::UpdateRealPart\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            UpdateLocalRealPart( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::UpdateImagPart( Int i, Int j, Base<T> value )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::UpdateImagPart\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            UpdateLocalImagPart( iLoc, jLoc, value );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::MakeReal( Int i, Int j )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::MakeReal\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            MakeLocalReal( iLoc, jLoc );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::Conjugate( Int i, Int j )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::Conjugate\"))\n    if( CrossRank() == Root() )\n    {\n        const Int owner = Owner( i, j );\n        if( owner == DistRank() )\n        {\n            const Int iLoc = LocalRow(i);\n            const Int jLoc = LocalCol(j);\n            ConjugateLocal( iLoc, jLoc );\n        }\n    }\n}\n\n// Local entry manipulation\n// ------------------------\n\ntemplate<typename T>\nT\nAbstractDistMatrix<T>::GetLocal( Int i, Int j ) const\n{ return matrix_.Get(i,j); }\n\ntemplate<typename T>\nBase<T>\nAbstractDistMatrix<T>::GetLocalRealPart( Int iLoc, Int jLoc ) const\n{ return matrix_.GetRealPart(iLoc,jLoc); }\n\ntemplate<typename T>\nBase<T>\nAbstractDistMatrix<T>::GetLocalImagPart( Int iLoc, Int jLoc ) const\n{ return matrix_.GetImagPart(iLoc,jLoc); }\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SetLocal( Int iLoc, Int jLoc, T alpha )\n{ matrix_.Set(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SetLocalRealPart( Int iLoc, Int jLoc, Base<T> alpha )\n{ matrix_.SetRealPart(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SetLocalImagPart( Int iLoc, Int jLoc, Base<T> alpha )\n{ matrix_.SetImagPart(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::UpdateLocal( Int iLoc, Int jLoc, T alpha )\n{ matrix_.Update(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::UpdateLocalRealPart\n( Int iLoc, Int jLoc, Base<T> alpha )\n{ matrix_.UpdateRealPart(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::UpdateLocalImagPart\n( Int iLoc, Int jLoc, Base<T> alpha )\n{ matrix_.UpdateImagPart(iLoc,jLoc,alpha); }\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::MakeLocalReal( Int iLoc, Int jLoc )\n{ matrix_.MakeReal( iLoc, jLoc ); }\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::ConjugateLocal( Int iLoc, Int jLoc )\n{ matrix_.Conjugate( iLoc, jLoc ); }\n\n// Diagonal manipulation\n// =====================\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::MakeDiagonalReal( Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::MakeDiagonalReal\"))\n    const Int height = Height();\n    const Int localWidth = LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = GlobalCol(jLoc);\n        if( j < height && IsLocal(j,j) )\n        {\n            const Int iLoc = LocalRow(j);\n            MakeLocalReal( iLoc, jLoc );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::ConjugateDiagonal( Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::ConjugateDiagonal\"))\n    const Int height = Height();\n    const Int localWidth = LocalWidth();\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const Int j = GlobalCol(jLoc);\n        if( j < height && IsLocal(j,j) )\n        {\n            const Int iLoc = LocalRow(j);\n            ConjugateLocal( iLoc, jLoc );\n        }\n    }\n}\n\n// Arbitrary submatrix manipulation\n// ================================\n\n// Global submatrix manipulation\n// -----------------------------\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::GetSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd, \n  DistMatrix<T,STAR,STAR>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::GetSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    ASub.SetGrid( Grid() );\n    ASub.Resize( m, n, m );\n    Zeros( ASub, m, n );\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        ASub.SetLocal( iSub, jSub, GetLocal(iLoc,jLoc) );\n                    }\n                }\n            }\n        }\n        // Sum over the distribution communicator\n        mpi::AllReduce( ASub.Buffer(), m*n, DistComm() ); \n    }\n    // Broadcast over the cross communicator\n    mpi::Broadcast( ASub.Buffer(), m*n, Root(), CrossComm() );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::GetRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd, \n  DistMatrix<Base<T>,STAR,STAR>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::GetRealPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    ASub.SetGrid( Grid() );\n    ASub.Resize( m, n, m );\n    Zeros( ASub, m, n );\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        ASub.SetLocal\n                        ( iSub, jSub, GetLocalRealPart(iLoc,jLoc) );\n                    }\n                }\n            }\n        }\n        // Sum over the distribution communicator\n        mpi::AllReduce( ASub.Buffer(), m*n, DistComm() ); \n    }\n    // Broadcast over the cross communicator\n    mpi::Broadcast( ASub.Buffer(), m*n, Root(), CrossComm() );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::GetImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd, \n  DistMatrix<Base<T>,STAR,STAR>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::GetImagPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    ASub.SetGrid( Grid() );\n    ASub.Resize( m, n, m );\n    Zeros( ASub, m, n );\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        ASub.SetLocal\n                        ( iSub, jSub, GetLocalImagPart(iLoc,jLoc) );\n                    }\n                }\n            }\n        }\n        // Sum over the distribution communicator\n        mpi::AllReduce( ASub.Buffer(), m*n, DistComm() ); \n    }\n    // Broadcast over the cross communicator\n    mpi::Broadcast( ASub.Buffer(), m*n, Root(), CrossComm() );\n}\n\ntemplate<typename T>\nDistMatrix<T,STAR,STAR>\nAbstractDistMatrix<T>::GetSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::GetSubmatrix\"))\n    DistMatrix<T,STAR,STAR> ASub( Grid() );\n    GetSubmatrix( rowInd, colInd, ASub );\n    return ASub;\n}\n\ntemplate<typename T>\nDistMatrix<Base<T>,STAR,STAR>\nAbstractDistMatrix<T>::GetRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::GetRealPartOfSubmatrix\"))\n    DistMatrix<Base<T>,STAR,STAR> ASub( Grid() );\n    GetRealPartOfSubmatrix( rowInd, colInd, ASub );\n    return ASub;\n}\n\ntemplate<typename T>\nDistMatrix<Base<T>,STAR,STAR>\nAbstractDistMatrix<T>::GetImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::GetImagPartOfSubmatrix\"))\n    DistMatrix<Base<T>,STAR,STAR> ASub( Grid() );\n    GetImagPartOfSubmatrix( rowInd, colInd, ASub );\n    return ASub;\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::SetSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  const DistMatrix<T,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::SetSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        SetLocal( iLoc, jLoc, ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::SetRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  const DistMatrix<Base<T>,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::SetRealPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        SetLocalRealPart\n                        ( iLoc, jLoc, ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::SetImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  const DistMatrix<Base<T>,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::SetImagPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Fill in our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        SetLocalImagPart\n                        ( iLoc, jLoc, ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::UpdateSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  T alpha, const DistMatrix<T,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::UpdateSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Modify our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        UpdateLocal\n                        ( iLoc, jLoc, alpha*ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::UpdateRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  Base<T> alpha, const DistMatrix<Base<T>,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::UpdateRealPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Modify our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        UpdateLocalRealPart\n                        ( iLoc, jLoc, alpha*ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::UpdateImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  Base<T> alpha, const DistMatrix<Base<T>,STAR,STAR>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::UpdateImagPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Modify our locally-owned entries\n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        UpdateLocalImagPart\n                        ( iLoc, jLoc, alpha*ASub.GetLocal(iSub,jSub) );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::MakeSubmatrixReal\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::MakeSubmatrixReal\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Modify the locally-owned entries \n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        MakeLocalReal( iLoc, jLoc );\n                    }\n                }\n            }\n        }\n    }\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::ConjugateSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::ConjugateSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    if( Participating() )\n    {\n        // Modify the locally-owned entries \n        for( Int jSub=0; jSub<n; ++jSub )\n        {\n            const Int j = colInd[jSub];\n            if( IsLocalCol(j) )\n            {\n                const Int jLoc = LocalCol(j);\n                for( Int iSub=0; iSub<m; ++iSub )\n                {\n                    const Int i = rowInd[iSub];\n                    if( IsLocalRow(i) )\n                    {\n                        const Int iLoc = LocalRow(i);\n                        ConjugateLocal( iLoc, jLoc );\n                    }\n                }\n            }\n        }\n    }\n}\n\n// Local submatrix manipulation\n// ----------------------------\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::GetLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc, \n  elem::Matrix<T>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::GetLocalSubmatrix\"))\n    LockedMatrix().GetSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::GetRealPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc, \n  elem::Matrix<Base<T>>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::GetRealPartOfLocalSubmatrix\"))\n    LockedMatrix().GetRealPartOfSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::GetImagPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc, \n  elem::Matrix<Base<T>>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::GetImagPartOfLocalSubmatrix\"))\n    LockedMatrix().GetImagPartOfSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::SetLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  const elem::Matrix<T>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::SetLocalSubmatrix\"))\n    Matrix().SetSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::SetRealPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  const elem::Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::SetRealPartOfLocalSubmatrix\"))\n    Matrix().SetRealPartOfSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::SetImagPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  const elem::Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::SetImagPartOfLocalSubmatrix\"))\n    Matrix().SetImagPartOfSubmatrix( rowIndLoc, colIndLoc, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::UpdateLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  T alpha, const elem::Matrix<T>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::UpdateLocalSubmatrix\"))\n    Matrix().UpdateSubmatrix( rowIndLoc, colIndLoc, alpha, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::UpdateRealPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  Base<T> alpha, const elem::Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::UpdateRealPartOfLocalSubmatrix\"))\n    Matrix().UpdateRealPartOfSubmatrix( rowIndLoc, colIndLoc, alpha, ASub );\n}\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::UpdateImagPartOfLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc,\n  Base<T> alpha, const elem::Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::UpdateImagPartOfLocalSubmatrix\"))\n    Matrix().UpdateImagPartOfSubmatrix( rowIndLoc, colIndLoc, alpha, ASub );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::MakeLocalSubmatrixReal\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::MakeLocalSubmatrixReal\"))\n    Matrix().MakeSubmatrixReal( rowIndLoc, colIndLoc );\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::ConjugateLocalSubmatrix\n( const std::vector<Int>& rowIndLoc, const std::vector<Int>& colIndLoc )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::ConjugateLocalSubmatrix\"))\n    Matrix().ConjugateSubmatrix( rowIndLoc, colIndLoc );\n}\n\n// Sum the local matrix over a particular communicator\n// ===================================================\n// NOTE: The matrix dimensions *must* be uniform over the communicator.\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SumOver( mpi::Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ADM::SumOver\"))\n    if( !Participating() )\n        return;\n\n    const Int localHeight = LocalHeight();\n    const Int localWidth = LocalWidth();\n    const Int localSize = mpi::Pad( localHeight*localWidth );\n    T* sumBuf = auxMemory_.Require( localSize );   \n\n    // Pack\n    T* buf = Buffer();\n    const Int ldim = LDim(); \n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const T* thisCol = &buf[jLoc*ldim];\n        T* sumCol = &sumBuf[jLoc*localHeight];\n        MemCopy( sumCol, thisCol, localHeight );\n    }\n\n    // AllReduce sum\n    mpi::AllReduce( sumBuf, localSize, comm );\n\n    // Unpack\n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const T* sumCol = &sumBuf[jLoc*localHeight];\n        T* thisCol = &buf[jLoc*ldim];\n        MemCopy( thisCol, sumCol, localHeight );\n    } \n    auxMemory_.Release();\n}\n\n// Assertions\n// ==========\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::ComplainIfReal() const\n{ \n    if( !IsComplex<T>::val )\n        LogicError(\"Called complex-only routine with real data\");\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AssertNotLocked() const\n{\n    if( Locked() )\n        LogicError(\"Assertion that matrix not be a locked view failed\");\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AssertNotStoringData() const\n{\n    if( matrix_.MemorySize() > 0 )\n        LogicError(\"Assertion that matrix not be storing data failed\");\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AssertValidEntry( Int i, Int j ) const\n{\n    if( i < 0 || i >= Height() || j < 0 || j >= Width() )\n        LogicError\n        (\"Entry (\",i,\",\",j,\") is out of bounds of \",Height(),\n         \" x \",Width(),\" matrix\");\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::AssertValidSubmatrix\n( Int i, Int j, Int height, Int width ) const\n{\n    if( i < 0 || j < 0 )\n        LogicError(\"Indices of submatrix were negative\");\n    if( height < 0 || width < 0 )\n        LogicError(\"Dimensions of submatrix were negative\");\n    if( (i+height) > Height() || (j+width) > Width() )\n        LogicError\n        (\"Submatrix is out of bounds: accessing up to (\",i+height-1,\n         \",\",j+width-1,\") of \",Height(),\" x \",Width(),\" matrix\");\n}\n\ntemplate<typename T> \nvoid\nAbstractDistMatrix<T>::AssertSameGrid( const elem::Grid& grid ) const\n{\n    if( Grid() != grid )\n        LogicError(\"Assertion that grids match failed\");\n}\n\ntemplate<typename T> \nvoid\nAbstractDistMatrix<T>::AssertSameSize( Int height, Int width ) const\n{\n    if( Height() != height || Width() != width )\n        LogicError(\"Assertion that matrices be the same size failed\");\n}\n\n// Private section\n// ###############\n\n// Exchange metadata with another matrix\n// =====================================\n\ntemplate<typename T>\nvoid \nAbstractDistMatrix<T>::ShallowSwap( AbstractDistMatrix<T>& A )\n{\n    matrix_.ShallowSwap( A.matrix_ );\n    auxMemory_.ShallowSwap( A.auxMemory_ );\n    std::swap( viewType_, A.viewType_ );\n    std::swap( height_ , A.height_ );\n    std::swap( width_, A.width_ );\n    std::swap( colConstrained_, A.colConstrained_ );\n    std::swap( rowConstrained_, A.rowConstrained_ );\n    std::swap( rootConstrained_, A.rootConstrained_ );\n    std::swap( colAlign_, A.colAlign_ );\n    std::swap( rowAlign_, A.rowAlign_ );\n    std::swap( colShift_, A.colShift_ );\n    std::swap( rowShift_, A.rowShift_ );\n    std::swap( root_, A.root_ );\n    std::swap( grid_, A.grid_ );\n}\n\n// Modify the distribution metadata\n// ================================\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SetShifts()\n{\n    if( Participating() )\n    {\n        colShift_ = Shift(ColRank(),colAlign_,ColStride());\n        rowShift_ = Shift(RowRank(),rowAlign_,RowStride());\n    }\n    else\n    {\n        colShift_ = 0;\n        rowShift_ = 0;\n    }\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SetColShift()\n{\n    if( Participating() )\n        colShift_ = Shift(ColRank(),colAlign_,ColStride());\n    else\n        colShift_ = 0;\n}\n\ntemplate<typename T>\nvoid\nAbstractDistMatrix<T>::SetRowShift()\n{\n    if( Participating() )\n        rowShift_ = Shift(RowRank(),rowAlign_,RowStride());\n    else\n        rowShift_ = 0;\n}\n\n// Outside of class\n// ----------------\n\ntemplate<typename T> \nvoid\nAssertConforming1x2\n( const AbstractDistMatrix<T>& AL, const AbstractDistMatrix<T>& AR )\n{\n    if( AL.Height() != AR.Height() )    \n        LogicError\n        (\"1x2 not conformant:\\n\",\n         DimsString(AL,\"Left\"),\"\\n\",DimsString(AR,\"Right\"));\n    if( AL.ColAlign() != AR.ColAlign() )\n        LogicError(\"1x2 is misaligned\");\n}\n\ntemplate<typename T> \nvoid\nAssertConforming2x1\n( const AbstractDistMatrix<T>& AT, const AbstractDistMatrix<T>& AB )\n{\n    if( AT.Width() != AB.Width() )\n        LogicError\n        (\"2x1 is not conformant:\\n\",\n         DimsString(AT,\"Top\"),\"\\n\",DimsString(AB,\"Bottom\"));\n    if( AT.RowAlign() != AB.RowAlign() )\n        LogicError(\"2x1 is not aligned\");\n}\n\ntemplate<typename T> \nvoid\nAssertConforming2x2\n( const AbstractDistMatrix<T>& ATL, const AbstractDistMatrix<T>& ATR, \n  const AbstractDistMatrix<T>& ABL, const AbstractDistMatrix<T>& ABR ) \n{\n    if( ATL.Width() != ABL.Width() || ATR.Width() != ABR.Width() ||\n        ATL.Height() != ATR.Height() || ABL.Height() != ABR.Height() )\n        LogicError\n        (\"2x2 is not conformant:\\n\",\n         DimsString(ATL,\"TL\"),\"\\n\",DimsString(ATR,\"TR\"),\"\\n\",\n         DimsString(ABL,\"BL\"),\"\\n\",DimsString(ABR,\"BR\"));\n    if( ATL.ColAlign() != ATR.ColAlign() ||\n        ABL.ColAlign() != ABR.ColAlign() ||\n        ATL.RowAlign() != ABL.RowAlign() ||\n        ATR.RowAlign() != ABR.RowAlign() )\n        LogicError(\"2x2 set of matrices must aligned to combine\");\n}\n\n// Instantiations for {Int,Real,Complex<Real>} for each Real in {float,double}\n// ###########################################################################\n\n#ifndef ELEM_RELEASE\n #define PROTO(T) \\\n  template class AbstractDistMatrix<T>;\\\n  template void AssertConforming1x2\\\n  ( const AbstractDistMatrix<T>& AL, const AbstractDistMatrix<T>& AR );\\\n  template void AssertConforming2x1\\\n  ( const AbstractDistMatrix<T>& AT, const AbstractDistMatrix<T>& AB );\\\n  template void AssertConforming2x2\\\n  ( const AbstractDistMatrix<T>& ATL, const AbstractDistMatrix<T>& ATR,\\\n    const AbstractDistMatrix<T>& ABL, const AbstractDistMatrix<T>& ABR )\n#else\n #define PROTO(T) template class AbstractDistMatrix<T>\n#endif\n \n#ifndef ELEM_DISABLE_COMPLEX\n #ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(float);\n  PROTO(double);\n  PROTO(Complex<float>);\n  PROTO(Complex<double>);\n #else // ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(double);\n  PROTO(Complex<double>);\n #endif // ifndef ELEM_DISABLE_FLOAT\n#else // ifndef ELEM_DISABLE_COMPLEX\n #ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(float);\n  PROTO(double);\n #else // ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(double);\n #endif // ifndef ELEM_DISABLE_FLOAT\n#endif // ifndef ELEM_DISABLE_COMPLEX\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/CIRC_CIRC.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist CIRC\n#define RowDist CIRC\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [MC,MR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [MC,STAR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,MR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"[CIRC,CIRC] = [MD,STAR]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    this->Resize( m, n );\n    const elem::Grid& g = this->Grid();\n    if( !g.InGrid() )\n        return *this;\n\n    const Int p = g.Size();\n    const Int lcm = g.LCM();\n    const Int ownerPath = A.root_;\n    const Int ownerPathRank = A.colAlign_;\n\n    const Int mLocalA = A.LocalHeight();\n    const Int mLocalMax = MaxLength( m, lcm );\n    const Int pkgSize = mpi::Pad( mLocalMax*n );\n\n    // Since a MD communicator has not been implemented, we will take\n    // the suboptimal route of 'rounding up' everyone's contribution over \n    // the VC communicator.\n    const Int root = this->Root();\n    T *sendBuf, *recvBuf;\n    if( g.VCRank() == root )\n    {\n        T* buffer = this->auxMemory_.Require( (p+1)*pkgSize );\n        sendBuf = &buffer[0];\n        recvBuf = &buffer[pkgSize];\n    }\n    else\n    {\n        sendBuf = this->auxMemory_.Require( pkgSize );\n        recvBuf = 0;\n    }\n\n    if( A.Participating() )\n    {\n        // Pack\n        const Int ALDim = A.LDim();\n        const T* ABuf = A.LockedBuffer();\n        ELEM_PARALLEL_FOR\n        for( Int j=0; j<n; ++j )\n            MemCopy( &sendBuf[j*mLocalA], &ABuf[j*ALDim], mLocalA );\n    }\n\n    // Communicate\n    mpi::Gather( sendBuf, pkgSize, recvBuf, pkgSize, root, g.VCComm() );\n\n    if( g.VCRank() == root )\n    {\n        // Unpack\n        T* buffer = this->Buffer();\n        const Int ldim = this->LDim();\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<p; ++k )\n        {\n            if( g.DiagPath( k ) == ownerPath )\n            {\n                const T* data = &recvBuf[k*pkgSize];\n                const Int pathRank = g.DiagPathRank( k );\n                const Int colShift = Shift_( pathRank, ownerPathRank, lcm );\n                const Int mLocal = Length_( m, colShift, lcm );\n                ELEM_INNER_PARALLEL_FOR\n                for( Int j=0; j<n; ++j )\n                {\n                    T* destCol = &buffer[colShift+j*ldim];\n                    const T* sourceCol = &data[j*mLocal];\n                    for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                        destCol[iLoc*lcm] = sourceCol[iLoc];\n                }\n            }\n        }\n    }\n\n    this->auxMemory_.Release();\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"[CIRC,CIRC] = [STAR,MD]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int m = A.Height();\n    const Int n = A.Width();\n    this->Resize( m, n );\n    const elem::Grid& g = this->Grid();\n    if( !g.InGrid() )\n        return *this;\n\n    const Int p = g.Size();\n    const Int lcm = g.LCM();\n    const Int ownerPath = A.root_;\n    const Int ownerPathRank = A.rowAlign_;\n\n    const Int nLocalA = A.LocalWidth();\n    const Int nLocalMax = MaxLength( n, lcm );\n    const Int pkgSize = mpi::Pad( m*nLocalMax );\n\n    // Since a MD communicator has not been implemented, we will take\n    // the suboptimal route of 'rounding up' everyone's contribution over \n    // the VC communicator.\n    const Int root = this->Root();\n    T *sendBuf, *recvBuf;\n    if( g.VCRank() == root )\n    {\n        T* buffer = this->auxMemory_.Require( (p+1)*pkgSize );\n        sendBuf = &buffer[0];\n        recvBuf = &buffer[pkgSize];\n    }\n    else\n    {\n        sendBuf = this->auxMemory_.Require( pkgSize );\n        recvBuf = 0;\n    }\n\n    if( A.Participating() )\n    {\n        // Pack\n        const Int ALDim = A.LDim();\n        const T* ABuf = A.LockedBuffer();\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<nLocalA; ++jLoc )\n            MemCopy( &sendBuf[jLoc*m], &ABuf[jLoc*ALDim], m );\n    }\n\n    // Communicate\n    mpi::Gather( sendBuf, pkgSize, recvBuf, pkgSize, root, g.VCComm() );\n\n    if( g.VCRank() == root )\n    {\n        // Unpack\n        T* buffer = this->Buffer();\n        const Int ldim = this->LDim();\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<p; ++k )\n        {\n            if( g.DiagPath( k ) == ownerPath )\n            {\n                const T* data = &recvBuf[k*pkgSize];\n                const Int pathRank = g.DiagPathRank( k );\n                const Int rowShift = Shift_( pathRank, ownerPathRank, lcm );\n                const Int nLocal = Length_( n, rowShift, lcm );\n                ELEM_INNER_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n                    MemCopy\n                    ( &buffer[(rowShift+jLoc*lcm)*ldim], &data[jLoc*m], m );\n            }\n        }\n    }\n\n    this->auxMemory_.Release();\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [MR,MC]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [MR,STAR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,MC]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [VC,STAR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,VC]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [VR,STAR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,VR]\"))\n    this->CollectFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC] = [STAR,STAR]\"))\n    this->Resize( A.Height(), A.Width() );\n    if( A.Grid().VCRank() == this->Root() )\n        this->matrix_ = A.LockedMatrix();\n    return *this;\n}\n\ntemplate<typename T>\nvoid\nDM::CopyFromRoot( const Matrix<T>& A, bool includingViewers )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC]::CopyFromRoot\"))\n    if( this->CrossRank() != this->Root() )\n        LogicError(\"Called CopyFromRoot from non-root\");\n\n    this->Resize( A.Height(), A.Width() );\n    this->MakeSizeConsistent( includingViewers );\n\n    this->matrix_ = A;\n}\n\ntemplate<typename T>\nvoid\nDM::CopyFromNonRoot( bool includingViewers )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC]::CopyFromNonRoot\"))\n    if( this->CrossRank() == this->Root() )\n        LogicError(\"Called CopyFromNonRoot from root\");\n\n    this->MakeSizeConsistent( includingViewers );\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt DM::ColStride() const { return 1; }\ntemplate<typename T>\nInt DM::RowStride() const { return 1; }\ntemplate<typename T>\nInt DM::DistSize() const { return 1; }\ntemplate<typename T>\nInt DM::CrossSize() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt DM::RedundantSize() const { return 1; }\n\n// Private section\n// ###############\n\ntemplate<typename T>\ntemplate<Dist U,Dist V>\nvoid\nDM::CollectFrom( const DistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC]::CollectFrom\"))\n    const Int m = A.Height();\n    const Int n = A.Width();\n    this->Resize( m, n ); \n    if( A.CrossSize() != 1 )\n        LogicError(\"This routine does not yet support non-trivial cross-teams\");\n    if( !A.Grid().InGrid() )\n        return;\n\n    const Int root = this->Root();\n    // Translate the root into our DistComm (if possible)\n    const Int target = mpi::Translate( this->CrossComm(), root, A.DistComm() );\n    if( target == mpi::UNDEFINED )\n        return;\n\n    const Int colStride = A.ColStride();\n    const Int rowStride = A.RowStride();\n    const Int mLocalA = A.LocalHeight();\n    const Int nLocalA = A.LocalWidth();\n    const Int mLocalMax = MaxLength(m,colStride);\n    const Int nLocalMax = MaxLength(n,rowStride);\n    const Int pkgSize = mpi::Pad( mLocalMax*nLocalMax );\n    const Int numDist = A.DistSize();\n\n    T *sendBuf, *recvBuf;\n    if( this->CrossRank() == root )\n    {\n        T* buffer = this->auxMemory_.Require( (numDist+1)*pkgSize );\n        sendBuf = &buffer[0];\n        recvBuf = &buffer[pkgSize];\n    }\n    else\n    {\n        sendBuf = this->auxMemory_.Require( pkgSize );\n        recvBuf = 0;\n    }\n\n    // Pack\n    const Int ALDim = A.LDim();\n    const T* ABuf = A.LockedBuffer();\n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<nLocalA; ++jLoc )\n        MemCopy( &sendBuf[jLoc*mLocalA], &ABuf[jLoc*ALDim], mLocalA );\n\n    // Communicate\n    mpi::Gather( sendBuf, pkgSize, recvBuf, pkgSize, target, A.DistComm() );\n\n    if( this->CrossRank() == root )\n    {\n        // Unpack\n        T* buffer = this->Buffer();\n        const Int ldim = this->LDim();\n        const Int colAlignA = A.ColAlign();\n        const Int rowAlignA = A.RowAlign();\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int l=0; l<rowStride; ++l )\n        {\n            const Int rowShift = Shift_( l, rowAlignA, rowStride );\n            const Int nLocal = Length_( n, rowShift, rowStride );\n            for( Int k=0; k<colStride; ++k )\n            {\n                const T* data = &recvBuf[(k+l*colStride)*pkgSize];\n                const Int colShift = Shift_( k, colAlignA, colStride );\n                const Int mLocal = Length_( m, colShift, colStride );\n                ELEM_INNER_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n                {\n                    T* destCol =\n                      &buffer[colShift+(rowShift+jLoc*rowStride)*ldim];\n                    const T* sourceCol = &data[jLoc*mLocal];\n                    for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                        destCol[iLoc*colStride] = sourceCol[iLoc];\n                }\n            }\n        }\n    }\n    this->auxMemory_.Release();\n}\n\ntemplate<typename T>\ntemplate<Dist U,Dist V>\nvoid\nDM::Scatter( DistMatrix<T,U,V>& A ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[CIRC,CIRC]::Scatter\"))\n    if( A.CrossSize() != 1 )\n        LogicError(\"This routine does not yet support non-trivial cross-teams\");\n    LogicError(\"This routine is not yet written\");\n}\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  OTHER(T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/General.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#include ELEM_TRANSPOSE_INC\n#include ELEM_ZEROS_INC\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Constructors and destructors\n// ============================\n\ntemplate<typename T,Dist U,Dist V>\nGeneralDistMatrix<T,U,V>::GeneralDistMatrix( const elem::Grid& grid, Int root )\n: AbstractDistMatrix<T>(grid,root)\n{ }\n\ntemplate<typename T,Dist U,Dist V>\nGeneralDistMatrix<T,U,V>::GeneralDistMatrix( GeneralDistMatrix<T,U,V>&& A ) \nELEM_NOEXCEPT\n: AbstractDistMatrix<T>(std::move(A))\n{ }\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T,Dist U,Dist V>\nGeneralDistMatrix<T,U,V>& \nGeneralDistMatrix<T,U,V>::operator=( GeneralDistMatrix<T,U,V>&& A )\n{\n    AbstractDistMatrix<T>::operator=( std::move(A) );\n    return *this;\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AlignColsWith\n( const elem::DistData& data, bool constrain )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AlignColsWith\")) \n    this->SetGrid( *data.grid );\n    this->SetRoot( data.root );\n    if( data.colDist == U || data.colDist == UPart )\n        this->AlignCols( data.colAlign, constrain );\n    else if( data.rowDist == U || data.rowDist == UPart )\n        this->AlignCols( data.rowAlign, constrain );\n    else if( data.colDist == UScat )\n        this->AlignCols( data.colAlign % this->ColStride(), constrain );\n    else if( data.rowDist == UScat )\n        this->AlignCols( data.rowAlign % this->ColStride(), constrain );\n    DEBUG_ONLY(\n        else if( U != UGath && data.colDist != UGath && data.rowDist != UGath ) \n            LogicError(\"Nonsensical alignment\");\n    )\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AlignRowsWith\n( const elem::DistData& data, bool constrain )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AlignRowsWith\")) \n    this->SetGrid( *data.grid );\n    this->SetRoot( data.root );\n    if( data.colDist == V || data.colDist == VPart )\n        this->AlignRows( data.colAlign, constrain );\n    else if( data.rowDist == V || data.rowDist == VPart )\n        this->AlignRows( data.rowAlign, constrain );\n    else if( data.colDist == VScat )\n        this->AlignRows( data.colAlign % this->RowStride(), constrain );\n    else if( data.rowDist == VScat )\n        this->AlignRows( data.rowAlign % this->RowStride(), constrain );\n    DEBUG_ONLY(\n        else if( V != VGath && data.colDist != VGath && data.rowDist != VGath ) \n            LogicError(\"Nonsensical alignment\");\n    )\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::Translate( DistMatrix<T,U,V>& A ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::Translate\"))\n    const Grid& g = this->Grid();\n    const Int height = this->Height();\n    const Int width = this->Width();\n    const Int colAlign = this->ColAlign();\n    const Int rowAlign = this->RowAlign();\n    const Int root = this->Root();\n    A.SetGrid( g );\n    if( !A.RootConstrained() )\n        A.SetRoot( root );\n    if( !A.ColConstrained() )\n        A.AlignCols( colAlign, false );\n    if( !A.RowConstrained() )\n        A.AlignRows( rowAlign, false );\n    A.Resize( height, width );\n    if( !g.InGrid() )\n        return;\n\n    const bool aligned = colAlign == A.ColAlign() && rowAlign == A.RowAlign();\n    if( aligned && root == A.Root() )\n    {\n        A.matrix_ = this->matrix_;\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( g.Rank() == 0 )\n            std::cerr << \"Unaligned [U,V] <- [U,V]\" << std::endl;\n#endif\n        const Int colRank = this->ColRank();\n        const Int rowRank = this->RowRank();\n        const Int crossRank = this->CrossRank();\n        const Int colStride = this->ColStride();\n        const Int rowStride = this->RowStride();\n        const Int maxHeight = MaxLength( height, colStride );\n        const Int maxWidth  = MaxLength( width,  rowStride );\n        const Int pkgSize = mpi::Pad( maxHeight*maxWidth );\n        T* buffer=0;\n        if( crossRank == root || crossRank == A.Root() )\n            buffer = A.auxMemory_.Require( pkgSize );\n\n        const Int colAlignA = A.ColAlign();\n        const Int rowAlignA = A.RowAlign();\n        const Int localHeightA = \n            Length( height, colRank, colAlignA, colStride );\n        const Int localWidthA = Length( width, rowRank, rowAlignA, rowStride );\n        const Int recvSize = mpi::Pad( localHeightA*localWidthA );\n\n        if( crossRank == root )\n        {\n            // Pack the local data\n            const Int localHeight = this->LocalHeight();\n            const Int localWidth = this->LocalWidth();\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( &buffer[jLoc*localHeight], this->LockedBuffer(0,jLoc), \n                  localHeight );\n\n            if( !aligned )\n            {\n                // If we were not aligned, then SendRecv over the DistComm\n                const Int toRow = Mod(colRank+colAlignA-colAlign,colStride);\n                const Int toCol = Mod(rowRank+rowAlignA-rowAlign,rowStride);\n                const Int fromRow = Mod(colRank+colAlign-colAlignA,colStride);\n                const Int fromCol = Mod(rowRank+rowAlign-rowAlignA,rowStride);\n                const Int toRank = toRow + toCol*colStride;\n                const Int fromRank = fromRow + fromCol*colStride;\n                mpi::SendRecv\n                ( buffer, pkgSize, toRank, fromRank, this->DistComm() );\n            }\n        }\n        if( root != A.Root() )\n        {\n            // Send to the correct new root over the cross communicator\n            if( crossRank == root )\n                mpi::Send( buffer, recvSize, A.Root(), A.CrossComm() );\n            else if( crossRank == A.Root() )\n                mpi::Recv( buffer, recvSize, root, A.CrossComm() );\n        }\n        // Unpack\n        if( crossRank == A.Root() )\n            for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n                MemCopy\n                ( A.Buffer(0,jLoc), &buffer[jLoc*localHeightA], localHeightA );\n        if( crossRank == root || crossRank == A.Root() )\n            A.auxMemory_.Release();\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AllGather( DistMatrix<T,UGath,VGath>& A ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AllGather\"))\n    const Int height = this->Height();\n    const Int width = this->Width();\n    A.SetGrid( this->Grid() );\n    A.Resize( height, width );\n\n    if( this->Participating() )\n    {\n        const Int colStride = this->ColStride(); \n        const Int rowStride = this->RowStride();\n        const Int distStride = colStride*rowStride;\n\n        const Int thisLocalHeight = this->LocalHeight();\n        const Int thisLocalWidth = this->LocalWidth();\n        const Int maxLocalHeight = MaxLength(height,colStride);\n        const Int maxLocalWidth = MaxLength(width,rowStride);\n\n        const Int portionSize = mpi::Pad( maxLocalHeight*maxLocalWidth );\n        T* buffer = A.auxMemory_.Require( (distStride+1)*portionSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[portionSize];\n\n        // Pack\n        const Int ldim = this->LDim();\n        const T* thisBuf = this->LockedBuffer();\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n            MemCopy\n            ( &sendBuf[jLoc*thisLocalHeight], &thisBuf[jLoc*ldim], \n              thisLocalHeight );\n\n        // Communicate\n        mpi::AllGather\n        ( sendBuf, portionSize, recvBuf, portionSize, this->DistComm() );\n\n        // Unpack\n        T* ABuf = A.Buffer();\n        const Int ALDim = A.LDim();\n        const Int colAlign = this->ColAlign();\n        const Int rowAlign = this->RowAlign();\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int l=0; l<rowStride; ++l )\n        {\n            const Int rowShift = Shift_( l, rowAlign, rowStride );\n            const Int localWidth = Length_( width, rowShift, rowStride );\n            for( Int k=0; k<colStride; ++k )\n            {\n                const T* data = &recvBuf[(k+l*colStride)*portionSize];\n                const Int colShift = Shift_( k, colAlign, colStride );\n                const Int localHeight = Length_( height, colShift, colStride );\n                ELEM_INNER_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                {\n                    T* destCol = \n                        &ABuf[colShift+(rowShift+jLoc*rowStride)*ALDim];\n                    const T* sourceCol = &data[jLoc*localHeight];\n                    for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                        destCol[iLoc*colStride] = sourceCol[iLoc];\n                }\n            }\n        }\n        A.auxMemory_.Release();\n    }\n    if( this->Grid().InGrid() && this->CrossComm() != mpi::COMM_SELF )\n    {\n        // Pack from the root\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        T* buf = A.auxMemory_.Require( localHeight*localWidth );\n        if( this->CrossRank() == this->Root() )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( &buf[jLoc*localHeight], A.LockedBuffer(0,jLoc), localHeight );\n        }\n\n        // Broadcast from the root\n        mpi::Broadcast\n        ( buf, localHeight*localWidth, this->Root(), this->CrossComm() );\n\n        // Unpack if not the root\n        if( this->CrossRank() != this->Root() )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( A.Buffer(0,jLoc), &buf[jLoc*localHeight], localHeight );\n        }\n        A.auxMemory_.Release();\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::ColAllGather( DistMatrix<T,UGath,V>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::ColAllGather\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = this->Height();\n    const Int width = this->Width();\n#ifdef ELEM_CACHE_WARNINGS\n    if( height != 1 && this->Grid().Rank() == 0 )\n    {\n        std::cerr <<\n          \"The matrix redistribution [* ,V] <- [U,V] potentially causes a \"\n          \"large amount of cache-thrashing. If possible, avoid it by \"\n          \"performing the redistribution with a (conjugate)-transpose\"\n          << std::endl;\n    }\n#endif\n    A.AlignRowsAndResize( this->RowAlign(), height, width, false, false );\n\n    if( this->Participating() )\n    {\n        if( this->RowAlign() == A.RowAlign() )\n        {\n            if( height == 1 )\n            {\n                const Int localWidthA = A.LocalWidth();\n                T* bcastBuf = A.auxMemory_.Require( localWidthA );\n            \n                if( this->ColRank() == this->ColAlign() )\n                {\n                    A.matrix_ = this->LockedMatrix();\n                    // Pack\n                    const T* ABuf = A.LockedBuffer(); \n                    const Int ALDim = A.LDim();\n                    ELEM_PARALLEL_FOR\n                    for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n                        bcastBuf[jLoc] = ABuf[jLoc*ALDim];\n                }\n\n                // Broadcast within the column comm\n                mpi::Broadcast\n                ( bcastBuf, localWidthA, this->ColAlign(), this->ColComm() );\n\n                // Unpack\n                T* ABuf = A.Buffer();\n                const Int ALDim = A.LDim(); \n                ELEM_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n                    ABuf[jLoc*ALDim] = bcastBuf[jLoc];\n                A.auxMemory_.Release();\n            }\n            else\n            {\n                const Int colStride = this->ColStride();\n                const Int localWidth = this->LocalWidth();\n                const Int thisLocalHeight = this->LocalHeight();\n                const Int maxLocalHeight = MaxLength(height,colStride);\n                const Int portionSize = mpi::Pad( maxLocalHeight*localWidth );\n\n                T* buffer = A.auxMemory_.Require( (colStride+1)*portionSize );\n                T* sendBuf = &buffer[0];\n                T* recvBuf = &buffer[portionSize];\n\n                // Pack\n                const Int ldim = this->LDim();\n                const T* thisBuf = this->LockedBuffer();\n                ELEM_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                {\n                    const T* thisCol = &thisBuf[jLoc*ldim];\n                    T* sendBufCol = &sendBuf[jLoc*thisLocalHeight];\n                    MemCopy( sendBufCol, thisCol, thisLocalHeight );\n                }\n\n                // Communicate\n                mpi::AllGather\n                ( sendBuf, portionSize, recvBuf, portionSize, this->ColComm() );\n\n                // Unpack\n                T* ABuf = A.Buffer();\n                const Int ALDim = A.LDim();\n                const Int colAlign = this->ColAlign();\n                ELEM_OUTER_PARALLEL_FOR\n                for( Int k=0; k<colStride; ++k )\n                {\n                    const T* data = &recvBuf[k*portionSize];\n                    const Int colShift = Shift_( k, colAlign, colStride );\n                    const Int localHeight = \n                        Length_( height, colShift, colStride );\n                    ELEM_INNER_PARALLEL_FOR\n                    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                    {\n                        T* destCol = &ABuf[colShift+jLoc*ALDim];\n                        const T* sourceCol = &data[jLoc*localHeight];\n                        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                            destCol[iLoc*colStride] = sourceCol[iLoc];\n                    }\n                }\n                A.auxMemory_.Release();\n            }\n        }\n        else\n        {\n#ifdef ELEM_UNALIGNED_WARNINGS\n            if( this->Grid().Rank() == 0 )\n                std::cerr << \"Unaligned [U,V] -> [* ,V].\" << std::endl;\n#endif\n            const Int colStride = this->ColStride();\n            const Int rowStride = this->RowStride();\n            const Int rowRank = this->RowRank();\n\n            const Int rowAlign = this->RowAlign();\n            const Int rowAlignA = A.RowAlign();\n            const Int sendRowRank = \n                (rowRank+rowStride+rowAlignA-rowAlign) % rowStride;\n            const Int recvRowRank = \n                (rowRank+rowStride+rowAlign-rowAlignA) % rowStride;\n\n            if( height == 1 )\n            {\n                const Int localWidthA = A.LocalWidth();\n                T* bcastBuf;\n\n                if( this->ColRank() == this->ColAlign() )\n                {\n                    const Int localWidth = this->LocalWidth(); \n                \n                    T* buffer = A.auxMemory_.Require( localWidth+localWidthA );\n                    T* sendBuf = &buffer[0];\n                    bcastBuf   = &buffer[localWidth];\n\n                    // Pack\n                    const T* thisBuf = this->LockedBuffer();\n                    const Int ldim = this->LDim();\n                    ELEM_PARALLEL_FOR\n                    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                        sendBuf[jLoc] = thisBuf[jLoc*ldim]; \n\n                    // Communicate\n                    mpi::SendRecv\n                    ( sendBuf,  localWidth,  sendRowRank,\n                      bcastBuf, localWidthA, recvRowRank, this->RowComm() ); \n                }\n                else\n                {\n                    bcastBuf = A.auxMemory_.Require( localWidthA );\n                }\n\n                // Communicate\n                mpi::Broadcast\n                ( bcastBuf, localWidthA, this->ColAlign(), this->ColComm() );\n\n                // Unpack\n                T* ABuf = A.Buffer();\n                const Int ALDim = A.LDim();\n                ELEM_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n                    ABuf[jLoc*ALDim] = bcastBuf[jLoc];\n                A.auxMemory_.Release();\n            }\n            else\n            {\n                const Int thisLocalWidth = this->LocalWidth();\n                const Int localWidthA = A.LocalWidth();\n                const Int thisLocalHeight = this->LocalHeight();\n                const Int maxLocalHeight = MaxLength(height,colStride);\n                const Int maxLocalWidth = MaxLength(width,rowStride);\n                const Int portionSize = \n                    mpi::Pad( maxLocalHeight*maxLocalWidth );\n\n                T* buffer = A.auxMemory_.Require( (colStride+1)*portionSize );\n                T* firstBuf  = &buffer[0];\n                T* secondBuf = &buffer[portionSize];\n\n                // Pack\n                const Int ldim = this->LDim();\n                const T* thisBuf = this->LockedBuffer();\n                ELEM_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                {\n                    const T* thisCol = &thisBuf[jLoc*ldim];\n                    T* secondBufCol = &secondBuf[jLoc*thisLocalHeight];\n                    MemCopy( secondBufCol, thisCol, thisLocalHeight ); \n                }\n \n                // Realign\n                mpi::SendRecv\n                ( secondBuf, portionSize, sendRowRank,\n                  firstBuf,  portionSize, recvRowRank, this->RowComm() );\n\n                // AllGather the aligned data\n                mpi::AllGather\n                ( firstBuf, portionSize, \n                  secondBuf, portionSize, this->ColComm() ); \n\n                // Unpack the contents of each member of the column team\n                T* ABuf = A.Buffer();\n                const Int ALDim = A.LDim();\n                const Int colAlign = this->ColAlign();\n                ELEM_OUTER_PARALLEL_FOR\n                for( Int k=0; k<colStride; ++k )\n                {\n                    const T* data = &secondBuf[k*portionSize];\n                    const Int colShift = Shift_( k, colAlign, colStride );\n                    const Int localHeight = \n                        Length_( height, colShift, colStride );\n                    ELEM_INNER_PARALLEL_FOR\n                    for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n                    {\n                        T* destCol = &ABuf[colShift+jLoc*ALDim];\n                        const T* sourceCol = &data[jLoc*localHeight];\n                        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                            destCol[iLoc*colStride] = sourceCol[iLoc]; \n                    }\n                }\n                A.auxMemory_.Release();\n            }\n        }\n    }\n    if( this->Grid().InGrid() && this->CrossComm() != mpi::COMM_SELF )\n    {\n        // Pack from the root\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        T* buf = A.auxMemory_.Require( localHeight*localWidth );\n        if( this->CrossRank() == this->Root() )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( &buf[jLoc*localHeight], A.LockedBuffer(0,jLoc), localHeight );\n        }\n\n        // Broadcast from the root\n        mpi::Broadcast\n        ( buf, localHeight*localWidth, this->Root(), this->CrossComm() );\n\n        // Unpack if not the root\n        if( this->CrossRank() != this->Root() )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( A.Buffer(0,jLoc), &buf[jLoc*localHeight], localHeight );\n        }\n        A.auxMemory_.Release();\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::RowAllGather( DistMatrix<T,U,VGath>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::RowAllGather\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = this->Height();\n    const Int width = this->Width();\n    A.AlignColsAndResize( this->ColAlign(), height, width, false, false );\n\n    if( this->Participating() )\n    {\n        if( this->ColAlign() == A.ColAlign() )\n        {\n            if( width == 1 )\n            {\n                if( this->RowRank() == this->RowAlign() )\n                    A.matrix_ = this->LockedMatrix();\n                mpi::Broadcast\n                ( A.matrix_.Buffer(), A.LocalHeight(), this->RowAlign(), \n                  this->RowComm() );\n            }\n            else\n            {\n                const Int rowStride = this->RowStride();\n                const Int thisLocalWidth = this->LocalWidth();\n                const Int localHeight = this->LocalHeight();\n                const Int maxLocalWidth = MaxLength(width,rowStride);\n\n                const Int portionSize = mpi::Pad( localHeight*maxLocalWidth );\n                T* buffer = A.auxMemory_.Require( (rowStride+1)*portionSize );\n                T* sendBuf = &buffer[0];\n                T* recvBuf = &buffer[portionSize];\n\n                // Pack\n                const Int ldim = this->LDim();\n                const T* thisBuf = this->LockedBuffer();\n                ELEM_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                {\n                    const T* thisCol = &thisBuf[jLoc*ldim];\n                    T* sendBufCol = &sendBuf[jLoc*localHeight];\n                    MemCopy( sendBufCol, thisCol, localHeight );\n                }\n\n                // Communicate\n                mpi::AllGather\n                ( sendBuf, portionSize, recvBuf, portionSize, this->RowComm() );\n\n                // Unpack\n                T* ABuf = A.Buffer();\n                const Int ALDim = A.LDim();\n                const Int rowAlign = this->RowAlign();\n                ELEM_OUTER_PARALLEL_FOR \n                for( Int k=0; k<rowStride; ++k )\n                {\n                    const T* data = &recvBuf[k*portionSize];\n                    const Int rowShift = Shift_( k, rowAlign, rowStride );\n                    const Int localWidth = \n                        Length_( width, rowShift, rowStride );\n                    ELEM_INNER_PARALLEL_FOR\n                    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                    {\n                        const T* dataCol = &data[jLoc*localHeight];\n                        T* ACol = &ABuf[(rowShift+jLoc*rowStride)*ALDim];\n                        MemCopy( ACol, dataCol, localHeight );\n                    }\n                }\n                A.auxMemory_.Release();\n            }\n        }\n        else\n        {\n#ifdef ELEM_UNALIGNED_WARNINGS\n            if( this->Grid().Rank() == 0 )\n                std::cerr << \"Unaligned RowAllGather.\" << std::endl;\n#endif\n            const Int colStride = this->ColStride();\n            const Int rowStride = this->RowStride(); \n            const Int colRank = this->ColRank();\n\n            const Int colAlign = this->ColAlign();\n            const Int colAlignA = A.ColAlign();\n            const Int sendColRank = \n                (colRank+colStride+colAlignA-colAlign) % colStride;\n            const Int recvColRank = \n                (colRank+colStride+colAlign-colAlignA) % colStride;\n\n            if( width == 1 )\n            {\n                const Int localHeightA = A.LocalHeight();\n                if( this->RowRank() == this->RowAlign() )\n                {\n                    const Int localHeight = this->LocalHeight();    \n                    T* buffer = A.auxMemory_.Require( localHeight );\n\n                    // Pack\n                    const T* thisCol = this->LockedBuffer();\n                    MemCopy( buffer, thisCol, localHeight );\n\n                    // Realign\n                    mpi::SendRecv\n                    ( buffer, localHeight, sendColRank,\n                      A.matrix_.Buffer(), localHeightA, recvColRank, \n                      this->ColComm() );\n                    A.auxMemory_.Release();\n                }\n\n                // Perform the row broadcast\n                mpi::Broadcast\n                ( A.matrix_.Buffer(), localHeightA, this->RowAlign(), \n                  this->RowComm() );\n            }\n            else\n            {\n                const Int localHeight = this->LocalHeight();\n                const Int thisLocalWidth = this->LocalWidth();\n                const Int localHeightA = A.LocalHeight();\n                const Int maxLocalHeight = MaxLength(height,colStride);\n                const Int maxLocalWidth = MaxLength(width,rowStride);\n\n                const Int portionSize = \n                    mpi::Pad( maxLocalHeight*maxLocalWidth );\n                T* buffer = A.auxMemory_.Require( (rowStride+1)*portionSize );\n                T* firstBuf = &buffer[0];\n                T* secondBuf = &buffer[portionSize];\n\n                // Pack\n                const Int ldim = this->LDim();\n                const T* thisBuf = this->LockedBuffer();\n                ELEM_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                {\n                    const T* thisCol = &thisBuf[jLoc*ldim];\n                    T* secondBufCol = &secondBuf[jLoc*localHeight];\n                    MemCopy( secondBufCol, thisCol, localHeight );\n                }\n\n                // Realign\n                mpi::SendRecv\n                ( secondBuf, portionSize, sendColRank,\n                  firstBuf,  portionSize, recvColRank, this->ColComm() );\n            \n                // Perform the row AllGather\n                mpi::AllGather\n                ( firstBuf,  portionSize, \n                  secondBuf, portionSize, this->RowComm() );\n\n                // Unpack\n                T* ABuf = A.Buffer();\n                const Int ALDim = A.LDim();\n                const Int rowAlign = this->RowAlign();\n                ELEM_OUTER_PARALLEL_FOR\n                for( Int k=0; k<rowStride; ++k )\n                {\n                    const T* data = &secondBuf[k*portionSize];\n                    const Int rowShift = Shift_( k, rowAlign, rowStride );\n                    const Int localWidth = \n                        Length_( width, rowShift, rowStride );\n                    ELEM_INNER_PARALLEL_FOR\n                    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                    {\n                        const T* dataCol = &data[jLoc*localHeightA];\n                        T* ACol = &ABuf[(rowShift+jLoc*rowStride)*ALDim]; \n                        MemCopy( ACol, dataCol, localHeightA );\n                    }\n                }\n                A.auxMemory_.Release();\n            }\n        }\n    }\n    if( this->Grid().InGrid() && this->CrossComm() != mpi::COMM_SELF )\n    {\n        // Pack from the root\n        const Int localHeight = A.LocalHeight();\n        const Int localWidth = A.LocalWidth();\n        T* buf = A.auxMemory_.Require( localHeight*localWidth );\n        if( this->CrossRank() == this->Root() )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( &buf[jLoc*localHeight], A.LockedBuffer(0,jLoc), localHeight );\n        }\n\n        // Broadcast from the root\n        mpi::Broadcast\n        ( buf, localHeight*localWidth, this->Root(), this->CrossComm() );\n\n        // Unpack if not the root\n        if( this->CrossRank() != this->Root() )\n        {\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( A.Buffer(0,jLoc), &buf[jLoc*localHeight], localHeight );\n        }\n        A.auxMemory_.Release();\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialColAllGather( DistMatrix<T,UPart,V>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialColAllGather\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = this->Height();\n    const Int width = this->Width();\n#ifdef ELEM_VECTOR_WARNINGS\n    if( width == 1 && this->Grid().Rank() == 0 )\n    {\n        std::cerr <<\n          \"The vector version of PartialColAllGather is not yet written but \"\n          \"would only require modifying the vector version of \"\n          \"PartialRowAllGather\" << std::endl;\n    }\n#endif\n#ifdef ELEM_CACHE_WARNINGS\n    if( width && this->Grid().Rank() == 0 )\n    {\n        std::cerr <<\n          \"PartialColAllGather potentially causes a large amount of cache-\"\n          \"thrashing. If possible, avoid it by performing the redistribution\"\n          \"on the (conjugate-)transpose\" << std::endl;\n    }\n#endif\n    A.AlignColsAndResize\n    ( this->ColAlign()%A.ColStride(), height, width, false, false );\n    if( !this->Participating() )\n        return;\n\n    DEBUG_ONLY(\n        if( this->LocalWidth() != this->Width() )\n            LogicError(\"This routine assumes rows are not distributed\");\n    )\n    const T* thisBuf = this->LockedBuffer();\n    const Int ldim = this->LDim();\n    T* ABuf = A.Buffer();\n    const Int ALDim = A.LDim();\n\n    const Int colAlign = this->ColAlign();\n    const Int colAlignA = A.ColAlign();\n    const Int colStride = this->ColStride();\n    const Int colStrideUnion = this->PartialUnionColStride();\n    const Int colStridePart = this->PartialColStride();\n    const Int colRankPart = this->PartialColRank();\n    const Int colShiftA = A.ColShift();\n\n    const Int thisLocalHeight = this->LocalHeight();\n    const Int maxLocalHeight = MaxLength(height,colStride);\n    const Int portionSize = mpi::Pad( maxLocalHeight*width );\n    T* buffer = A.auxMemory_.Require( (colStrideUnion+1)*portionSize );\n    T* firstBuf = &buffer[0];\n    T* secondBuf = &buffer[portionSize];\n\n    if( colAlignA == colAlign % colStridePart ) \n    {\n        // Pack\n        ELEM_PARALLEL_FOR\n        for( Int j=0; j<width; ++j )\n        {\n            const T* thisCol = &thisBuf[j*ldim];\n            T* firstBufCol = &firstBuf[j*thisLocalHeight];\n            MemCopy( firstBufCol, thisCol, thisLocalHeight );\n        }\n\n        // Communicate\n        mpi::AllGather\n        ( firstBuf, portionSize, secondBuf, portionSize, \n          this->PartialUnionColComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int colShift = \n                Shift_( colRankPart+k*colStridePart, colAlign, colStride );\n            const Int colOffset = (colShift-colShiftA) / colStridePart;\n            const Int localHeight = Length_( height, colShift, colStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int j=0; j<width; ++j )\n            {\n                const T* dataCol = &data[j*localHeight];\n                T* ACol = &ABuf[colOffset+j*ALDim];\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    ACol[iLoc*colStrideUnion] = dataCol[iLoc];\n            }\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned PartialColAllGather\" << std::endl;\n#endif\n        // Perform a SendRecv to match the row alignments\n        const Int colRank = this->ColRank();\n        const Int sendColRank = \n            (colRank+colStride+colAlignA-colAlign) % colStride;\n        const Int recvColRank = \n            (colRank+colStride+colAlign-colAlignA) % colStride;\n        ELEM_PARALLEL_FOR\n        for( Int j=0; j<width; ++j ) \n        {\n            const T* thisCol = &thisBuf[j*ldim];\n            T* secondBufCol = &secondBuf[j*thisLocalHeight];\n            MemCopy( secondBufCol, thisCol, thisLocalHeight );\n        }\n        mpi::SendRecv\n        ( secondBuf, portionSize, sendColRank,\n          firstBuf,  portionSize, recvColRank, this->ColComm() );\n\n        // Use the SendRecv as an input to the partial union AllGather\n        mpi::AllGather\n        ( firstBuf,  portionSize, \n          secondBuf, portionSize, this->PartialUnionColComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int colShift = \n                Shift_( colRankPart+colStridePart*k, colAlignA, colStride );\n            const Int colOffset = (colShift-colShiftA) / colStridePart;\n            const Int localHeight = Length_( height, colShift, colStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int j=0; j<width; ++j )\n            {\n                const T* dataCol = &data[j*localHeight];\n                T* ACol = &ABuf[colOffset+j*ALDim];\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    ACol[iLoc*colStrideUnion] = dataCol[iLoc];\n            }\n        }\n    }\n    A.auxMemory_.Release();\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialRowAllGather( DistMatrix<T,U,VPart>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialRowAllGather\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = this->Height();\n    const Int width = this->Width();\n    A.AlignRowsAndResize\n    ( this->RowAlign()%A.RowStride(), height, width, false, false );\n    if( !this->Participating() )\n        return;\n\n    DEBUG_ONLY(\n        if( this->LocalHeight() != this->Height() )\n            LogicError(\"This routine assumes columns are not distributed\");\n    )\n    const T* thisBuf = this->LockedBuffer();\n    const Int ldim = this->LDim();\n    T* ABuf = A.Buffer();\n    const Int ALDim = A.LDim();\n\n    const Int rowAlign = this->RowAlign();\n    const Int rowAlignA = A.RowAlign();\n    const Int rowStride = this->RowStride();\n    const Int rowStrideUnion = this->PartialUnionRowStride();\n    const Int rowStridePart = this->PartialRowStride();\n    const Int rowRankPart = this->PartialRowRank();\n    const Int rowShiftA = A.RowShift();\n\n    const Int thisLocalWidth = this->LocalWidth();\n    const Int maxLocalWidth = MaxLength(width,rowStride);\n    const Int portionSize = mpi::Pad( height*maxLocalWidth );\n    T* buffer = A.auxMemory_.Require( (rowStrideUnion+1)*portionSize );\n    T* firstBuf = &buffer[0];\n    T* secondBuf = &buffer[portionSize];\n\n    if( rowAlignA == rowAlign % rowStridePart ) \n    {\n        // Pack\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n        {\n            const T* thisCol = &thisBuf[jLoc*ldim];\n            T* firstBufCol = &firstBuf[jLoc*height];\n            MemCopy( firstBufCol, thisCol, height );\n        }\n\n        // Communicate\n        mpi::AllGather\n        ( firstBuf, portionSize, secondBuf, portionSize, \n          this->PartialUnionRowComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int rowShift = \n                Shift_( rowRankPart+k*rowStridePart, rowAlign, rowStride );\n            const Int rowOffset = (rowShift-rowShiftA) / rowStridePart;\n            const Int localWidth = Length_( width, rowShift, rowStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const T* dataCol = &data[jLoc*height];\n                T* ACol = &ABuf[(rowOffset+jLoc*rowStrideUnion)*ALDim];\n                MemCopy( ACol, dataCol, height );\n            }\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned PartialRowAllGather\" << std::endl;\n#endif\n        // Perform a SendRecv to match the row alignments\n        const Int rowRank = this->RowRank();\n        const Int sendRowRank = \n            (rowRank+rowStride+rowAlignA-rowAlign) % rowStride;\n        const Int recvRowRank = \n            (rowRank+rowStride+rowAlign-rowAlignA) % rowStride;\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc ) \n        {\n            const T* thisCol = &thisBuf[jLoc*ldim];\n            T* secondBufCol = &secondBuf[jLoc*height];\n            MemCopy( secondBufCol, thisCol, height );\n        }\n        mpi::SendRecv\n        ( secondBuf, portionSize, sendRowRank,\n          firstBuf,  portionSize, recvRowRank, this->RowComm() );\n\n        // Use the SendRecv as an input to the partial union AllGather\n        mpi::AllGather\n        ( firstBuf,  portionSize, \n          secondBuf, portionSize, this->PartialUnionRowComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int rowShift = \n                Shift_( rowRankPart+rowStridePart*k, rowAlignA, rowStride );\n            const Int rowOffset = (rowShift-rowShiftA) / rowStridePart;\n            const Int localWidth = Length_( width, rowShift, rowStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const T* dataCol = &data[jLoc*height];\n                T* ACol = &ABuf[(rowOffset+jLoc*rowStrideUnion)*ALDim];\n                MemCopy( ACol, dataCol, height );\n            }\n        }\n    }\n    A.auxMemory_.Release();\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::FilterFrom( const DistMatrix<T,UGath,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::FilterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    this->Resize( height, width );\n    if( !this->Participating() )\n        return;\n\n    const Int colStride = this->ColStride();\n    const Int rowStride = this->RowStride();\n    const Int colShift = this->ColShift();\n    const Int rowShift = this->RowShift();\n\n    const Int localHeight = this->LocalHeight();\n    const Int localWidth = this->LocalWidth();\n    \n    T* thisBuf = this->Buffer();\n    const Int ldim = this->LDim();\n    const T* ABuf = A.LockedBuffer();\n    const Int ALDim = A.LDim();\n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        T* thisCol = &thisBuf[jLoc*ldim];\n        const T* ACol = &ABuf[colShift+(rowShift+jLoc*rowStride)*ALDim];\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            thisCol[iLoc] = ACol[iLoc*colStride];\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::ColFilterFrom( const DistMatrix<T,UGath,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::ColFilterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    this->AlignRowsAndResize( A.RowAlign(), height, width, false, false );\n    if( !this->Participating() )\n        return;\n\n    const Int colStride = this->ColStride();\n    const Int colShift = this->ColShift();\n    const Int rowAlign = this->RowAlign();\n    const Int rowAlignA = A.RowAlign();\n\n    const Int localHeight = this->LocalHeight();\n    const Int localWidth = this->LocalWidth();\n    \n    T* thisBuf = this->Buffer();\n    const Int ldim = this->LDim();\n    const T* ABuf = A.LockedBuffer();\n    const Int ALDim = A.LDim();\n\n    if( rowAlign == rowAlignA )\n    {\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            T* thisCol = &thisBuf[jLoc*ldim];\n            const T* ACol = &ABuf[colShift+jLoc*ALDim];\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                thisCol[iLoc] = ACol[iLoc*colStride];\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned ColFilterFrom\" << std::endl;\n#endif\n        const Int rowStride = this->RowStride();\n        const Int rowRank = this->RowRank();\n        const Int sendRowRank = \n            (rowRank+rowStride+rowAlign-rowAlignA) % rowStride;\n        const Int recvRowRank = \n            (rowRank+rowStride+rowAlignA-rowAlign) % rowStride;\n        const Int localWidthA = A.LocalWidth();\n        const Int sendSize = localHeight*localWidthA;\n        const Int recvSize = localHeight*localWidth;\n        T* buffer = this->auxMemory_.Require( sendSize+recvSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[sendSize];\n        \n        // Pack\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n        {\n            T* sendCol = &sendBuf[jLoc*localHeight];\n            const T* ACol = &ABuf[colShift+jLoc*ALDim];\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                sendCol[iLoc] = ACol[iLoc*colStride];\n        }\n\n        // Realign\n        mpi::SendRecv\n        ( sendBuf, sendSize, sendRowRank,\n          recvBuf, recvSize, recvRowRank, this->RowComm() );\n\n        // Unpack\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            MemCopy\n            ( &thisBuf[jLoc*ldim], &recvBuf[jLoc*localHeight], localHeight );\n        this->auxMemory_.Release();\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::RowFilterFrom( const DistMatrix<T,U,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::RowFilterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    this->AlignColsAndResize( A.ColAlign(), height, width, false, false );\n    if( !this->Participating() )\n        return;\n\n    const Int colAlign = this->ColAlign();\n    const Int colAlignA = A.ColAlign();\n    const Int rowStride = this->RowStride();\n    const Int rowShift = this->RowShift();\n\n    const Int localHeight = this->LocalHeight();\n    const Int localWidth = this->LocalWidth();\n    \n    T* thisBuf = this->Buffer();\n    const Int ldim = this->LDim();\n    const T* ABuf = A.LockedBuffer();\n    const Int ALDim = A.LDim();\n    \n    if( colAlign == colAlignA )\n    {\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            T* thisCol = &thisBuf[jLoc*ldim];\n            const T* ACol = &ABuf[(rowShift+jLoc*rowStride)*ALDim];\n            MemCopy( thisCol, ACol, localHeight );\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned RowFilterFrom\" << std::endl;\n#endif\n        const Int colRank = this->ColRank();\n        const Int colStride = this->ColStride();\n        const Int sendColRank = \n            (colRank+colStride+colAlign-colAlignA) % colStride;\n        const Int recvColRank = \n            (colRank+colStride+colAlignA-colAlign) % colStride;\n        const Int localHeightA = A.LocalHeight();\n        const Int sendSize = localHeightA*localWidth;\n        const Int recvSize = localHeight *localWidth;\n\n        T* buffer = this->auxMemory_.Require( sendSize+recvSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[sendSize];\n\n        // Pack\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            MemCopy\n            ( &sendBuf[jLoc*localHeightA],\n              &ABuf[(rowShift+jLoc*rowStride)*ALDim], localHeightA );\n\n        // Realign\n        mpi::SendRecv\n        ( sendBuf, sendSize, sendColRank, \n          recvBuf, recvSize, recvColRank, this->ColComm() );\n\n        // Unpack\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            MemCopy\n            ( &thisBuf[jLoc*ldim], &recvBuf[jLoc*localHeight], localHeight );\n        this->auxMemory_.Release();\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialColFilterFrom( const DistMatrix<T,UPart,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialColFilterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    this->AlignColsAndResize( A.ColAlign(), height, width, false, false );\n    if( !this->Participating() )\n        return;\n\n    const Int colAlign = this->ColAlign();\n    const Int colAlignA = A.ColAlign();\n    const Int colStride = this->ColStride();\n    const Int colStridePart = this->PartialColStride();\n    const Int colStrideUnion = this->PartialUnionColStride();\n    const Int colShiftA = A.ColShift();\n\n    const Int localHeight = this->LocalHeight();\n\n    T* thisBuf = this->Buffer();\n    const Int ldim = this->LDim();\n    const T* ABuf = A.LockedBuffer();\n    const Int ALDim = A.LDim();\n    if( colAlign % colStridePart == colAlignA )\n    {\n        const Int colShift = this->ColShift();\n        const Int colOffset = (colShift-colShiftA) / colStridePart;\n        ELEM_PARALLEL_FOR\n        for( Int j=0; j<width; ++j )\n        {\n            T* thisCol = &thisBuf[j*ldim];\n            const T* ACol = &ABuf[colOffset+j*ALDim];\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                thisCol[iLoc] = ACol[iLoc*colStrideUnion];\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned PartialColFilterFrom\" << std::endl;\n#endif\n        const Int colRankPart = this->PartialColRank();\n        const Int colRankUnion = this->PartialUnionColRank();\n        const Int colShiftA = A.ColShift();\n\n        // Realign\n        // -------\n        const Int sendColRankPart = \n            (colRankPart+colStridePart+(colAlign%colStridePart)-colAlignA) % \n            colStridePart;\n        const Int recvColRankPart =\n            (colRankPart+colStridePart+colAlignA-(colAlign%colStridePart)) %\n            colStridePart;\n        const Int sendColRank = sendColRankPart + colStridePart*colRankUnion;\n        const Int sendColShift = Shift( sendColRank, colAlign, colStride );\n        const Int sendColOffset = (sendColShift-colShiftA) / colStridePart;\n        const Int localHeightSend = Length( height, sendColShift, colStride );\n        const Int sendSize = localHeightSend*width;\n        const Int recvSize = localHeight    *width;\n        T* buffer = this->auxMemory_.Require( sendSize+recvSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[sendSize];\n        // Pack\n        ELEM_PARALLEL_FOR\n        for( Int j=0; j<width; ++j )\n        {\n            T* sendCol = &sendBuf[j*localHeightSend];\n            const T* ACol = &ABuf[sendColOffset+j*ALDim];\n            for( Int iLoc=0; iLoc<localHeightSend; ++iLoc )\n                sendCol[iLoc] = ACol[iLoc*colStrideUnion];\n        }\n        // Change the column alignment\n        mpi::SendRecv\n        ( sendBuf, sendSize, sendColRankPart,\n          recvBuf, recvSize, recvColRankPart, this->PartialColComm() );\n\n        // Unpack\n        // ------\n        ELEM_PARALLEL_FOR\n        for( Int j=0; j<width; ++j )\n        {\n            const T* recvCol = &recvBuf[j*localHeight];\n            T* thisCol = &thisBuf[j*ldim];\n            MemCopy( thisCol, recvCol, localHeight );\n        }\n        this->auxMemory_.Release();\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialRowFilterFrom( const DistMatrix<T,U,VPart>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialRowFilterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    this->AlignRowsAndResize( A.RowAlign(), height, width, false, false );\n    if( !this->Participating() )\n        return;\n\n    const Int rowAlign = this->RowAlign();\n    const Int rowAlignA = A.RowAlign();\n    const Int rowStride = this->RowStride();\n    const Int rowStridePart = this->PartialRowStride();\n    const Int rowStrideUnion = this->PartialUnionRowStride();\n    const Int rowShiftA = A.RowShift();\n\n    const Int localWidth = this->LocalWidth();\n\n    T* thisBuf = this->Buffer();\n    const Int ldim = this->LDim();\n    const T* ABuf = A.LockedBuffer();\n    const Int ALDim = A.LDim();\n    if( rowAlign % rowStridePart == rowAlignA )\n    {\n        const Int rowShift = this->RowShift();\n        const Int rowOffset = (rowShift-rowShiftA) / rowStridePart;\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            T* thisCol = &thisBuf[jLoc*ldim];\n            const T* ACol = &ABuf[(rowOffset+jLoc*rowStrideUnion)*ALDim];\n            MemCopy( thisCol, ACol, height );\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned PartialRowFilterFrom\" << std::endl;\n#endif\n        const Int rowRankPart = this->PartialRowRank();\n        const Int rowRankUnion = this->PartialUnionRowRank();\n        const Int rowShiftA = A.RowShift();\n\n        // Realign\n        // -------\n        const Int sendRowRankPart = \n            (rowRankPart+rowStridePart+(rowAlign%rowStridePart)-rowAlignA) % \n            rowStridePart;\n        const Int recvRowRankPart =\n            (rowRankPart+rowStridePart+rowAlignA-(rowAlign%rowStridePart)) %\n            rowStridePart;\n        const Int sendRowRank = sendRowRankPart + rowStridePart*rowRankUnion;\n        const Int sendRowShift = Shift( sendRowRank, rowAlign, rowStride );\n        const Int sendRowOffset = (sendRowShift-rowShiftA) / rowStridePart;\n        const Int localWidthSend = Length( width, sendRowShift, rowStride );\n        const Int sendSize = height*localWidthSend;\n        const Int recvSize = height*localWidth;\n        T* buffer = this->auxMemory_.Require( sendSize+recvSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[sendSize];\n        // Pack\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidthSend; ++jLoc )\n        {\n            T* sendCol = &sendBuf[jLoc*height];\n            const T* ACol = &ABuf[(sendRowOffset+jLoc*rowStrideUnion)*ALDim];\n            MemCopy( sendCol, ACol, height );\n        }\n        // Change the column alignment\n        mpi::SendRecv\n        ( sendBuf, sendSize, sendRowRankPart,\n          recvBuf, recvSize, recvRowRankPart, this->PartialRowComm() );\n\n        // Unpack\n        // ------\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const T* recvCol = &recvBuf[jLoc*height];\n            T* thisCol = &thisBuf[jLoc*ldim];\n            MemCopy( thisCol, recvCol, height );\n        }\n        this->auxMemory_.Release();\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialColAllToAllFrom\n( const DistMatrix<T,UPart,VScat>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialColAllToAllFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    this->AlignColsAndResize( A.ColAlign(), height, width, false, false );\n    if( !this->Participating() )\n        return;\n\n    const Int colAlign = this->ColAlign();\n    const Int colAlignA = A.ColAlign();\n    const Int rowAlignA = A.RowAlign();\n\n    const Int colStride = this->ColStride();\n    const Int colStridePart = this->PartialColStride();\n    const Int colStrideUnion = this->PartialUnionColStride();\n    const Int colRankPart = this->PartialColRank();\n\n    const Int colShiftA = A.ColShift();\n\n    const Int thisLocalHeight = this->LocalHeight();\n    const Int localWidthA = A.LocalWidth();\n    const Int maxLocalHeight = MaxLength(height,colStride);\n    const Int maxLocalWidth = MaxLength(width,colStrideUnion);\n    const Int portionSize = mpi::Pad( maxLocalHeight*maxLocalWidth );\n\n    T* thisBuf = this->Buffer();\n    const Int ldim = this->LDim();\n    const T* ABuf = A.LockedBuffer();\n    const Int ALDim = A.LDim();\n\n    T* buffer = this->auxMemory_.Require( 2*colStrideUnion*portionSize );\n    T* firstBuf  = &buffer[0];\n    T* secondBuf = &buffer[colStrideUnion*portionSize];\n\n    if( colAlign % colStridePart == colAlignA )\n    {\n        // Pack            \n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            T* data = &firstBuf[k*portionSize];\n            const Int colRank = colRankPart + k*colStridePart;\n            const Int colShift = Shift_( colRank, colAlign, colStride );\n            const Int colOffset = (colShift-colShiftA) / colStridePart;\n            const Int localHeight = Length_( height, colShift, colStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n            {\n                T* dataCol = &data[jLoc*localHeight];\n                const T* ACol = &ABuf[colOffset+jLoc*ALDim];\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    dataCol[iLoc] = ACol[iLoc*colStrideUnion];\n            }\n        }\n\n        // Simultaneously Scatter in columns and Gather in rows\n        mpi::AllToAll\n        ( firstBuf,  portionSize, \n          secondBuf, portionSize, this->PartialUnionColComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int rowShift = Shift_( k, rowAlignA, colStrideUnion );\n            const Int localWidth = Length_( width, rowShift, colStrideUnion );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const T* dataCol = &data[jLoc*thisLocalHeight];\n                T* thisCol = &thisBuf[(rowShift+jLoc*colStrideUnion)*ldim]; \n                MemCopy( thisCol, dataCol, thisLocalHeight );\n            }\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned PartialColAllToAllFrom\" << std::endl;\n#endif\n        const Int sendColRankPart = \n            (colRankPart+colStridePart+(colAlign%colStridePart)-colAlignA) % \n            colStridePart;\n        const Int recvColRankPart =\n            (colRankPart+colStridePart+colAlignA-(colAlign%colStridePart)) %\n            colStridePart; \n\n        // Pack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            T* data = &secondBuf[k*portionSize];\n            const Int colRank = sendColRankPart + k*colStridePart;\n            const Int colShift = Shift_( colRank, colAlign, colStride );\n            const Int colOffset = (colShift-colShiftA) / colStridePart;\n            const Int localHeight = Length_( height, colShift, colStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n            {\n                T* dataCol = &data[jLoc*localHeight];\n                const T* ACol = &ABuf[colOffset+jLoc*ALDim];\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    dataCol[iLoc] = ACol[iLoc*colStrideUnion];\n            }\n        }\n\n        // Simultaneously Scatter in columns and Gather in rows\n        mpi::AllToAll\n        ( secondBuf, portionSize, \n          firstBuf,  portionSize, this->PartialUnionColComm() );\n\n        // Realign the result\n        mpi::SendRecv \n        ( firstBuf,  colStrideUnion*portionSize, sendColRankPart,\n          secondBuf, colStrideUnion*portionSize, recvColRankPart, \n          this->PartialColComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int rowShift = Shift_( k, rowAlignA, colStrideUnion );\n            const Int localWidth = Length_( width, rowShift, colStrideUnion );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const T* dataCol = &data[jLoc*thisLocalHeight];\n                T* thisCol = &thisBuf[(rowShift+jLoc*colStrideUnion)*ldim]; \n                MemCopy( thisCol, dataCol, thisLocalHeight );\n            }\n        }\n    }\n    this->auxMemory_.Release();\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialRowAllToAllFrom\n( const DistMatrix<T,UScat,VPart>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialRowAllToAllFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = A.Height();\n    const Int width = A.Width();\n    this->AlignRowsAndResize( A.RowAlign(), height, width, false, false );\n    if( !this->Participating() )\n        return;\n\n    const Int rowAlign = this->RowAlign();\n    const Int rowAlignA = A.RowAlign();\n    const Int colAlignA = A.ColAlign();\n\n    const Int rowStride = this->RowStride();\n    const Int rowStridePart = this->PartialRowStride();\n    const Int rowStrideUnion = this->PartialUnionRowStride();\n    const Int rowRankPart = this->PartialRowRank();\n\n    const Int rowShiftA = A.RowShift();\n\n    const Int thisLocalWidth = this->LocalWidth();\n    const Int localHeightA = A.LocalHeight();\n    const Int maxLocalHeight = MaxLength(height,rowStrideUnion);\n    const Int maxLocalWidth = MaxLength(width,rowStride);\n    const Int portionSize = mpi::Pad( maxLocalHeight*maxLocalWidth );\n\n    T* thisBuf = this->Buffer();\n    const Int ldim = this->LDim();\n    const T* ABuf = A.LockedBuffer();\n    const Int ALDim = A.LDim();\n\n    T* buffer = this->auxMemory_.Require( 2*rowStrideUnion*portionSize );\n    T* firstBuf  = &buffer[0];\n    T* secondBuf = &buffer[rowStrideUnion*portionSize];\n\n    if( rowAlign % rowStridePart == rowAlignA )\n    {\n        // Pack            \n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            T* data = &firstBuf[k*portionSize];\n            const Int rowRank = rowRankPart + k*rowStridePart;\n            const Int rowShift = Shift_( rowRank, rowAlign, rowStride );\n            const Int rowOffset = (rowShift-rowShiftA) / rowStridePart;\n            const Int localWidth = Length_( width, rowShift, rowStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                T* dataCol = &data[jLoc*localHeightA];\n                const T* ACol = &ABuf[(rowOffset+jLoc*rowStrideUnion)*ALDim];\n                MemCopy( dataCol, ACol, localHeightA );\n            }\n        }\n\n        // Simultaneously Scatter in rows and Gather in columns\n        mpi::AllToAll\n        ( firstBuf,  portionSize, \n          secondBuf, portionSize, this->PartialUnionRowComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int colShift = Shift_( k, colAlignA, rowStrideUnion );\n            const Int localHeight = Length_( height, colShift, rowStrideUnion );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n            {\n                const T* dataCol = &data[jLoc*localHeight];\n                T* thisCol = &thisBuf[colShift+jLoc*ldim]; \n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    thisCol[iLoc*rowStrideUnion] = dataCol[iLoc];\n            }\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned PartialRowAllToAllFrom\" << std::endl;\n#endif\n        const Int sendRowRankPart = \n            (rowRankPart+rowStridePart+(rowAlign%rowStridePart)-rowAlignA) % \n            rowStridePart;\n        const Int recvRowRankPart =\n            (rowRankPart+rowStridePart+rowAlignA-(rowAlign%rowStridePart)) %\n            rowStridePart; \n\n        // Pack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            T* data = &secondBuf[k*portionSize];\n            const Int rowRank = sendRowRankPart + k*rowStridePart;\n            const Int rowShift = Shift_( rowRank, rowAlign, rowStride );\n            const Int rowOffset = (rowShift-rowShiftA) / rowStridePart;\n            const Int localWidth = Length_( width, rowShift, rowStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                T* dataCol = &data[jLoc*localHeightA];\n                const T* ACol = &ABuf[(rowOffset+jLoc*rowStrideUnion)*ALDim];\n                MemCopy( dataCol, ACol, localHeightA );\n            }\n        }\n\n        // Simultaneously Scatter in rows and Gather in columns\n        mpi::AllToAll\n        ( secondBuf, portionSize, \n          firstBuf,  portionSize, this->PartialUnionRowComm() );\n\n        // Realign the result\n        mpi::SendRecv \n        ( firstBuf,  rowStrideUnion*portionSize, sendRowRankPart,\n          secondBuf, rowStrideUnion*portionSize, recvRowRankPart, \n          this->PartialRowComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int colShift = Shift_( k, colAlignA, rowStrideUnion );\n            const Int localHeight = Length_( height, colShift, rowStrideUnion );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n            {\n                const T* dataCol = &data[jLoc*localHeight];\n                T* thisCol = &thisBuf[colShift+jLoc*ldim]; \n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    thisCol[iLoc*rowStrideUnion] = dataCol[iLoc];\n            }\n        }\n    }\n    this->auxMemory_.Release();\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialColAllToAll\n( DistMatrix<T,UPart,VScat>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialColAllToAll\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = this->Height();\n    const Int width = this->Width();\n    A.AlignColsAndResize\n    ( this->ColAlign()%A.ColStride(), height, width, false, false );\n    if( !A.Participating() )\n        return;\n\n    const Int colAlign = this->ColAlign();\n    const Int colAlignA = A.ColAlign();\n    const Int rowAlignA = A.RowAlign();\n\n    const Int colStride = this->ColStride();\n    const Int colStridePart = this->PartialColStride();\n    const Int colStrideUnion = this->PartialUnionColStride();\n    const Int colRankPart = this->PartialColRank();\n\n    const Int colShiftA = A.ColShift();\n\n    const Int thisLocalHeight = this->LocalHeight();\n    const Int localWidthA = A.LocalWidth();\n    const Int maxLocalHeight = MaxLength(height,colStride);\n    const Int maxLocalWidth = MaxLength(width,colStrideUnion);\n    const Int portionSize = mpi::Pad( maxLocalHeight*maxLocalWidth );\n\n    const T* thisBuf = this->LockedBuffer();\n    const Int ldim = this->LDim();\n    T* ABuf = A.Buffer();\n    const Int ALDim = A.LDim();\n\n    T* buffer = A.auxMemory_.Require( 2*colStrideUnion*portionSize );\n    T* firstBuf  = &buffer[0];\n    T* secondBuf = &buffer[colStrideUnion*portionSize];\n\n    if( colAlignA == colAlign % colStridePart )\n    {\n        // Pack            \n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            T* data = &firstBuf[k*portionSize];\n            const Int rowShift = Shift_( k, rowAlignA, colStrideUnion );\n            const Int localWidth = Length_( width, rowShift, colStrideUnion );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( &data[jLoc*thisLocalHeight],\n                  &thisBuf[(rowShift+jLoc*colStrideUnion)*ldim], \n                  thisLocalHeight );\n        }\n\n        // Simultaneously Gather in columns and Scatter in rows\n        mpi::AllToAll\n        ( firstBuf,  portionSize, \n          secondBuf, portionSize, this->PartialUnionColComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int colRank = colRankPart + k*colStridePart;\n            const Int colShift = Shift_( colRank, colAlign, colStride );\n            const Int colOffset = (colShift-colShiftA) / colStridePart;\n            const Int localHeight = Length_( height, colShift, colStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n            {\n                T* ACol = &ABuf[colOffset+jLoc*ALDim];\n                const T* dataCol = &data[jLoc*localHeight];\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    ACol[iLoc*colStrideUnion] = dataCol[iLoc];\n            }\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned PartialColAllToAll\" << std::endl;\n#endif\n        const Int colAlignDiff = colAlignA - (colAlign%colStridePart);\n        const Int sendColRankPart = \n            (colRankPart+colStridePart+colAlignDiff) % colStridePart;\n        const Int recvColRankPart =\n            (colRankPart+colStridePart-colAlignDiff) % colStridePart;\n\n        // Pack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            T* data = &secondBuf[k*portionSize];    \n            const Int rowShift = Shift_( k, rowAlignA, colStrideUnion );\n            const Int localWidth = Length_( width, rowShift, colStrideUnion );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( &data[jLoc*thisLocalHeight],\n                  &thisBuf[(rowShift+jLoc*colStrideUnion)*ldim], \n                  thisLocalHeight );\n        }\n\n        // Realign the input\n        mpi::SendRecv \n        ( secondBuf, colStrideUnion*portionSize, sendColRankPart,\n          firstBuf,  colStrideUnion*portionSize, recvColRankPart, \n          this->PartialColComm() );\n\n        // Simultaneously Scatter in columns and Gather in rows\n        mpi::AllToAll\n        ( firstBuf,  portionSize, \n          secondBuf, portionSize, this->PartialUnionColComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int colRank = recvColRankPart + k*colStridePart;\n            const Int colShift = Shift_( colRank, colAlign, colStride );\n            const Int colOffset = (colShift-colShiftA) / colStridePart;\n            const Int localHeight = Length_( height, colShift, colStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n            {\n                T* ACol = &ABuf[colOffset+jLoc*ALDim];\n                const T* dataCol = &data[jLoc*localHeight];\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    ACol[iLoc*colStrideUnion] = dataCol[iLoc];\n            }\n        }\n    }\n    A.auxMemory_.Release();\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialRowAllToAll\n( DistMatrix<T,UScat,VPart>& A ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialRowAllToAll\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Int height = this->Height();\n    const Int width = this->Width();\n    A.AlignRowsAndResize\n    ( this->RowAlign()%A.RowStride(), height, width, false, false );\n    if( !A.Participating() )\n        return;\n\n    const Int colAlignA = A.ColAlign();\n    const Int rowAlign = this->RowAlign();\n    const Int rowAlignA = A.RowAlign();\n\n    const Int rowStride = this->RowStride();\n    const Int rowStridePart = this->PartialRowStride();\n    const Int rowStrideUnion = this->PartialUnionRowStride();\n    const Int rowRankPart = this->PartialRowRank();\n\n    const Int rowShiftA = A.RowShift();\n\n    const Int thisLocalWidth = this->LocalWidth();\n    const Int localHeightA = A.LocalHeight();\n    const Int maxLocalWidth = MaxLength(width,rowStride);\n    const Int maxLocalHeight = MaxLength(height,rowStrideUnion);\n    const Int portionSize = mpi::Pad( maxLocalHeight*maxLocalWidth );\n\n    const T* thisBuf = this->LockedBuffer();\n    const Int ldim = this->LDim();\n    T* ABuf = A.Buffer();\n    const Int ALDim = A.LDim();\n\n    T* buffer = A.auxMemory_.Require( 2*rowStrideUnion*portionSize );\n    T* firstBuf  = &buffer[0];\n    T* secondBuf = &buffer[rowStrideUnion*portionSize];\n\n    if( rowAlignA == rowAlign % rowStridePart )\n    {\n        // Pack            \n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            T* data = &firstBuf[k*portionSize];\n            const Int colShift = Shift_( k, colAlignA, rowStrideUnion );\n            const Int localHeight = Length_( height, colShift, rowStrideUnion );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n            {\n                T* dataCol = &data[jLoc*localHeight];\n                const T* thisCol = &thisBuf[colShift+jLoc*ldim];\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    dataCol[iLoc] = thisCol[iLoc*rowStrideUnion];\n            }\n        }\n\n        // Simultaneously Gather in rows and Scatter in columns\n        mpi::AllToAll\n        ( firstBuf,  portionSize, \n          secondBuf, portionSize, this->PartialUnionRowComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int rowRank = rowRankPart + k*rowStridePart;\n            const Int rowShift = Shift_( rowRank, rowAlign, rowStride );\n            const Int rowOffset = (rowShift-rowShiftA) / rowStridePart;\n            const Int localWidth = Length_( width, rowShift, rowStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( &ABuf[(rowOffset+jLoc*rowStrideUnion)*ALDim],\n                  &data[jLoc*localHeightA], localHeightA );\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned PartialRowAllToAll\" << std::endl;\n#endif\n        const Int rowAlignDiff = rowAlignA - (rowAlign%rowStridePart);\n        const Int sendRowRankPart = \n            (rowRankPart+rowStridePart+rowAlignDiff) % rowStridePart;\n        const Int recvRowRankPart =\n            (rowRankPart+rowStridePart-rowAlignDiff) % rowStridePart;\n\n        // Pack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            T* data = &secondBuf[k*portionSize];    \n            const Int colShift = Shift_( k, colAlignA, rowStrideUnion );\n            const Int localHeight = Length_( height, colShift, rowStrideUnion );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n            {\n                T* dataCol = &data[jLoc*localHeight];\n                const T* sourceCol = &thisBuf[colShift+jLoc*ldim];\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    dataCol[iLoc] = sourceCol[iLoc*rowStrideUnion]; \n            }\n        }\n\n        // Realign the input\n        mpi::SendRecv \n        ( secondBuf, rowStrideUnion*portionSize, sendRowRankPart,\n          firstBuf,  rowStrideUnion*portionSize, recvRowRankPart, \n          this->PartialRowComm() );\n\n        // Simultaneously Scatter in rows and Gather in columns\n        mpi::AllToAll\n        ( firstBuf,  portionSize, \n          secondBuf, portionSize, this->PartialUnionRowComm() );\n\n        // Unpack\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            const T* data = &secondBuf[k*portionSize];\n            const Int rowRank = recvRowRankPart + k*rowStridePart;\n            const Int rowShift = Shift_( rowRank, rowAlign, rowStride );\n            const Int rowOffset = (rowShift-rowShiftA) / rowStridePart;\n            const Int localWidth = Length_( width, rowShift, rowStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n                MemCopy\n                ( &ABuf[(rowOffset+jLoc*rowStrideUnion)*ALDim],\n                  &data[jLoc*localHeightA], localHeightA );\n        }\n    }\n    A.auxMemory_.Release();\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::RowSumScatterFrom( const DistMatrix<T,U,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::RowSumScatterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    this->AlignColsAndResize\n    ( A.ColAlign(), A.Height(), A.Width(), false, false );\n    // NOTE: This will be *slightly* slower than necessary due to the result\n    //       of the MPI operations being added rather than just copied\n    Zeros( this->Matrix(), this->LocalHeight(), this->LocalWidth() );\n    this->RowSumScatterUpdate( T(1), A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::ColSumScatterFrom( const DistMatrix<T,UGath,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::ColSumScatterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    this->AlignRowsAndResize\n    ( A.RowAlign(), A.Height(), A.Width(), false, false );\n    // NOTE: This will be *slightly* slower than necessary due to the result\n    //       of the MPI operations being added rather than just copied\n    Zeros( this->Matrix(), this->LocalHeight(), this->LocalWidth() );\n    this->ColSumScatterUpdate( T(1), A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::SumScatterFrom( const DistMatrix<T,UGath,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::SumScatterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    this->Resize( A.Height(), A.Width() );\n    // NOTE: This will be *slightly* slower than necessary due to the result\n    //       of the MPI operations being added rather than just copied\n    Zeros( this->Matrix(), this->LocalHeight(), this->LocalWidth() );\n    this->SumScatterUpdate( T(1), A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialRowSumScatterFrom\n( const DistMatrix<T,U,VPart>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialRowSumScatterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    this->AlignAndResize\n    ( A.ColAlign(), A.RowAlign(), A.Height(), A.Width(), false, false );\n    // NOTE: This will be *slightly* slower than necessary due to the result\n    //       of the MPI operations being added rather than just copied\n    Zeros( this->Matrix(), this->LocalHeight(), this->LocalWidth() );\n    this->PartialRowSumScatterUpdate( T(1), A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialColSumScatterFrom\n( const DistMatrix<T,UPart,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialColSumScatterFrom\");\n        this->AssertSameGrid( A.Grid() );\n    )\n    this->AlignAndResize\n    ( A.ColAlign(), A.RowAlign(), A.Height(), A.Width(), false, false );\n    // NOTE: This will be *slightly* slower than necessary due to the result\n    //       of the MPI operations being added rather than just copied\n    Zeros( this->Matrix(), this->LocalHeight(), this->LocalWidth() );\n    this->PartialColSumScatterUpdate( T(1), A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::RowSumScatterUpdate\n( T alpha, const DistMatrix<T,U,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::RowSumScatterUpdate\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n        this->AssertSameSize( A.Height(), A.Width() );\n    )\n    if( !this->Participating() )\n        return;\n\n    if( this->ColAlign() == A.ColAlign() )\n    {\n        if( this->Width() == 1 )\n        {\n            const Int rowAlign = this->RowAlign();\n            const Int rowRank = this->RowRank();\n\n            const Int localHeight = this->LocalHeight();\n            const Int portionSize = mpi::Pad( localHeight );\n            T* buffer = this->auxMemory_.Require( 2*portionSize );\n            T* sendBuf = &buffer[0];\n            T* recvBuf = &buffer[portionSize];\n\n            // Pack \n            const T* ACol = A.LockedBuffer();\n            MemCopy( sendBuf, ACol, localHeight );\n\n            // Reduce to rowAlign\n            mpi::Reduce\n            ( sendBuf, recvBuf, portionSize, rowAlign, this->RowComm() );\n\n            if( rowRank == rowAlign )\n            {\n                T* thisCol = this->Buffer();\n                ELEM_FMA_PARALLEL_FOR\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    thisCol[iLoc] += alpha*recvBuf[iLoc];\n            }\n\n            this->auxMemory_.Release();\n        }\n        else\n        {\n            const Int rowStride = this->RowStride();\n            const Int rowAlign = this->RowAlign();\n\n            const Int width = this->Width();\n            const Int localHeight = this->LocalHeight();\n            const Int localWidth = this->LocalWidth();\n            const Int maxLocalWidth = MaxLength(width,rowStride);\n\n            const Int portionSize = mpi::Pad( localHeight*maxLocalWidth );\n            const Int sendSize = rowStride*portionSize;\n\n            // Pack \n            const Int ALDim = A.LDim();\n            const T* ABuffer = A.LockedBuffer();\n            T* buffer = this->auxMemory_.Require( sendSize );\n            ELEM_OUTER_PARALLEL_FOR\n            for( Int k=0; k<rowStride; ++k )\n            {\n                T* data = &buffer[k*portionSize];\n                const Int thisRowShift = Shift_( k, rowAlign, rowStride );\n                const Int thisLocalWidth = \n                    Length_(width,thisRowShift,rowStride);\n                ELEM_INNER_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                {\n                    const T* ACol = \n                        &ABuffer[(thisRowShift+jLoc*rowStride)*ALDim];\n                    T* dataCol = &data[jLoc*localHeight];\n                    MemCopy( dataCol, ACol, localHeight );\n                }\n            }\n            // Communicate\n            mpi::ReduceScatter( buffer, portionSize, this->RowComm() );\n\n            // Update with our received data\n            T* thisBuffer = this->Buffer();\n            const Int thisLDim = this->LDim();\n            ELEM_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const T* bufferCol = &buffer[jLoc*localHeight];\n                T* thisCol = &thisBuffer[jLoc*thisLDim];\n                blas::Axpy( localHeight, alpha, bufferCol, 1, thisCol, 1 );\n            }\n            this->auxMemory_.Release();\n        }\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned RowSumScatterUpdate\" << std::endl;\n#endif\n        if( this->Width() == 1 )\n        {\n            const Int colStride = this->ColStride();\n            const Int rowAlign = this->RowAlign();\n            const Int colRank = this->ColRank();\n            const Int rowRank = this->RowRank();\n\n            const Int height = this->Height();\n            const Int localHeight = this->LocalHeight();\n            const Int localHeightA = A.LocalHeight();\n            const Int maxLocalHeight = MaxLength(height,colStride);\n            const Int portionSize = mpi::Pad( maxLocalHeight );\n\n            const Int colAlign = this->ColAlign();\n            const Int colAlignA = A.ColAlign();\n            const Int sendRow = \n                (colRank+colStride+colAlign-colAlignA) % colStride;\n            const Int recvRow = \n                (colRank+colStride+colAlignA-colAlign) % colStride;\n\n            T* buffer = this->auxMemory_.Require( 2*portionSize );\n            T* sendBuf = &buffer[0];\n            T* recvBuf = &buffer[portionSize];\n\n            // Pack \n            const T* ACol = A.LockedBuffer();\n            MemCopy( sendBuf, ACol, localHeightA );\n\n            // Reduce to rowAlign\n            mpi::Reduce\n            ( sendBuf, recvBuf, portionSize, rowAlign, this->RowComm() );\n\n            if( rowRank == rowAlign )\n            {\n                // Perform the realignment\n                mpi::SendRecv\n                ( recvBuf, portionSize, sendRow,\n                  sendBuf, portionSize, recvRow, this->ColComm() );\n\n                T* thisCol = this->Buffer();\n                ELEM_FMA_PARALLEL_FOR\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    thisCol[iLoc] += alpha*sendBuf[iLoc];\n            }\n            this->auxMemory_.Release();\n        }\n        else\n        {\n            const Int colStride = this->ColStride();\n            const Int rowStride = this->RowStride();\n            const Int colRank = this->ColRank();\n\n            const Int colAlign = this->ColAlign();\n            const Int rowAlign = this->RowAlign();\n            const Int colAlignA = A.ColAlign();\n            const Int sendRow = \n                (colRank+colStride+colAlign-colAlignA) % colStride;\n            const Int recvRow = \n                (colRank+colStride+colAlignA-colAlign) % colStride;\n\n            const Int width = this->Width();\n            const Int localHeight = this->LocalHeight();\n            const Int localWidth = this->LocalWidth();\n            const Int localHeightA = A.LocalHeight();\n            const Int maxLocalWidth = MaxLength(width,rowStride);\n\n            const Int recvSize_RS = mpi::Pad( localHeightA*maxLocalWidth );\n            const Int sendSize_RS = rowStride * recvSize_RS;\n            const Int recvSize_SR = localHeight * localWidth;\n\n            T* buffer = this->auxMemory_.Require\n                ( recvSize_RS + std::max(sendSize_RS,recvSize_SR) );\n            T* firstBuf = &buffer[0];\n            T* secondBuf = &buffer[recvSize_RS];\n\n            // Pack \n            const T* ABuffer = A.LockedBuffer();\n            const Int ALDim = A.LDim();\n            ELEM_OUTER_PARALLEL_FOR\n            for( Int k=0; k<rowStride; ++k )\n            {\n                T* data = &secondBuf[k*recvSize_RS];\n                const Int thisRowShift = Shift_( k, rowAlign, rowStride );\n                const Int thisLocalWidth = \n                    Length_(width,thisRowShift,rowStride);\n                ELEM_INNER_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                {\n                    const T* ACol = \n                        &ABuffer[(thisRowShift+jLoc*rowStride)*ALDim];\n                    T* dataCol = &data[jLoc*localHeightA];\n                    MemCopy( dataCol, ACol, localHeightA );\n                }\n            }\n\n            // Reduce-scatter over each process row\n            mpi::ReduceScatter\n            ( secondBuf, firstBuf, recvSize_RS, this->RowComm() );\n\n            // Trade reduced data with the appropriate process row\n            mpi::SendRecv\n            ( firstBuf,  localHeightA*localWidth, sendRow,\n              secondBuf, localHeight*localWidth,  recvRow, this->ColComm() );\n\n            // Update with our received data\n            T* thisBuffer = this->Buffer();\n            const Int thisLDim = this->LDim();\n            ELEM_FMA_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                const T* secondBufCol = &secondBuf[jLoc*localHeight];\n                T* thisCol = &thisBuffer[jLoc*thisLDim];\n                for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                    thisCol[iLoc] += alpha*secondBufCol[iLoc];\n            }\n            this->auxMemory_.Release();\n        }\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::ColSumScatterUpdate\n( T alpha, const DistMatrix<T,UGath,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::ColSumScatterUpdate\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n        this->AssertSameSize( A.Height(), A.Width() );\n    )\n#ifdef ELEM_VECTOR_WARNINGS\n    if( A.Width() == 1 && this->Grid().Rank() == 0 )\n    {\n        std::cerr <<\n          \"The vector version of ColSumScatterUpdate does not\"\n          \" yet have a vector version implemented, but it would only \"\n          \"require a modification of the vector version of RowSumScatterUpdate\"\n          << std::endl;\n    }\n#endif\n#ifdef ELEM_CACHE_WARNINGS\n    if( A.Width() != 1 && this->Grid().Rank() == 0 )\n    {\n        std::cerr <<\n          \"ColSumScatterUpdate potentially causes a large \"\n          \"amount of cache-thrashing. If possible, avoid it by forming the \"\n          \"(conjugate-)transpose of the [* ,V] matrix instead.\" << std::endl;\n    }\n#endif\n    if( !this->Participating() )\n        return;\n\n    if( this->RowAlign() == A.RowAlign() )\n    {\n        const Int colStride = this->ColStride();\n        const Int colAlign = this->ColAlign();\n        const Int height = this->Height();\n        const Int localHeight = this->LocalHeight();\n        const Int localWidth = this->LocalWidth();\n        const Int maxLocalHeight = MaxLength(height,colStride);\n\n        const Int recvSize = mpi::Pad( maxLocalHeight*localWidth );\n        const Int sendSize = colStride*recvSize;\n\n        // Pack \n        const T* ABuffer = A.LockedBuffer();\n        const Int ALDim = A.LDim();\n        T* buffer = this->auxMemory_.Require( sendSize );\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStride; ++k )\n        {\n            T* data = &buffer[k*recvSize];\n            const Int thisColShift = Shift_( k, colAlign, colStride );\n            const Int thisLocalHeight = Length_(height,thisColShift,colStride);\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            {\n                T* destCol = &data[jLoc*thisLocalHeight];\n                const T* sourceCol = &ABuffer[thisColShift+jLoc*ALDim];\n                for( Int iLoc=0; iLoc<thisLocalHeight; ++iLoc )\n                    destCol[iLoc] = sourceCol[iLoc*colStride];\n            }\n        }\n\n        // Communicate\n        mpi::ReduceScatter( buffer, recvSize, this->ColComm() );\n\n        // Update with our received data\n        T* thisBuffer = this->Buffer();\n        const Int thisLDim = this->LDim();\n        ELEM_FMA_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const T* bufferCol = &buffer[jLoc*localHeight];\n            T* thisCol = &thisBuffer[jLoc*thisLDim];\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                thisCol[iLoc] += alpha*bufferCol[iLoc];\n        }\n        this->auxMemory_.Release();\n    }\n    else\n    {\n#ifdef ELEM_UNALIGNED_WARNINGS\n        if( this->Grid().Rank() == 0 )\n            std::cerr << \"Unaligned ColSumScatterUpdate\" << std::endl;\n#endif\n        const Int colStride = this->ColStride();\n        const Int rowStride = this->RowStride();\n        const Int rowRank = this->RowRank();\n\n        const Int colAlign = this->ColAlign();\n        const Int rowAlign = this->RowAlign();\n        const Int rowAlignA = A.RowAlign();\n        const Int sendCol = (rowRank+rowStride+rowAlign-rowAlignA) % rowStride;\n        const Int recvCol = (rowRank+rowStride+rowAlignA-rowAlign) % rowStride;\n\n        const Int height = this->Height();\n        const Int localHeight = this->LocalHeight();\n        const Int localWidth = this->LocalWidth();\n        const Int localWidthA = A.LocalWidth();\n        const Int maxLocalHeight = MaxLength(height,colStride);\n\n        const Int recvSize_RS = mpi::Pad( maxLocalHeight*localWidthA );\n        const Int sendSize_RS = colStride * recvSize_RS;\n        const Int recvSize_SR = localHeight * localWidth;\n\n        T* buffer = this->auxMemory_.Require\n            ( recvSize_RS + std::max(sendSize_RS,recvSize_SR) );\n        T* firstBuf = &buffer[0];\n        T* secondBuf = &buffer[recvSize_RS];\n\n        // Pack\n        const T* ABuffer = A.LockedBuffer();\n        const Int ALDim = A.LDim();\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStride; ++k )\n        {\n            T* data = &secondBuf[k*recvSize_RS];\n            const Int thisColShift = Shift_( k, colAlign, colStride );\n            const Int thisLocalHeight = Length_(height,thisColShift,colStride);\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<localWidthA; ++jLoc )\n            {\n                T* destCol = &data[jLoc*thisLocalHeight];\n                const T* sourceCol = &ABuffer[thisColShift+jLoc*ALDim];\n                for( Int iLoc=0; iLoc<thisLocalHeight; ++iLoc )\n                    destCol[iLoc] = sourceCol[iLoc*colStride];\n            }\n        }\n\n        // Reduce-scatter over each col\n        mpi::ReduceScatter( secondBuf, firstBuf, recvSize_RS, this->ColComm() );\n\n        // Trade reduced data with the appropriate col\n        mpi::SendRecv\n        ( firstBuf,  localHeight*localWidthA, sendCol,\n          secondBuf, localHeight*localWidth,  recvCol, this->RowComm() );\n\n        // Update with our received data\n        T* thisBuffer = this->Buffer();\n        const Int thisLDim = this->LDim();\n        ELEM_FMA_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const T* secondBufCol = &secondBuf[jLoc*localHeight];\n            T* thisCol = &thisBuffer[jLoc*thisLDim];\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                thisCol[iLoc] += alpha*secondBufCol[iLoc];\n        }\n        this->auxMemory_.Release();\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::SumScatterUpdate\n( T alpha, const DistMatrix<T,UGath,VGath>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::SumScatterUpdate\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n        this->AssertSameSize( A.Height(), A.Width() );\n    )\n    if( !this->Participating() )\n        return;\n\n    const Int colStride = this->ColStride();\n    const Int rowStride = this->RowStride();\n    const Int colAlign = this->ColAlign();\n    const Int rowAlign = this->RowAlign();\n\n    const Int height = this->Height();\n    const Int width = this->Width();\n    const Int localHeight = this->LocalHeight();\n    const Int localWidth = this->LocalWidth();\n    const Int maxLocalHeight = MaxLength(height,colStride);\n    const Int maxLocalWidth = MaxLength(width,rowStride);\n\n    const Int recvSize = mpi::Pad( maxLocalHeight*maxLocalWidth );\n    const Int sendSize = colStride*rowStride*recvSize;\n\n    // Pack \n    const T* ABuffer = A.LockedBuffer();\n    const Int ALDim = A.LDim();\n    T* buffer = this->auxMemory_.Require( sendSize );\n    ELEM_OUTER_PARALLEL_FOR\n    for( Int l=0; l<rowStride; ++l )\n    {\n        const Int thisRowShift = Shift_( l, rowAlign, rowStride );\n        const Int thisLocalWidth = Length_( width, thisRowShift, rowStride );\n        for( Int k=0; k<colStride; ++k )\n        {\n            T* data = &buffer[(k+l*colStride)*recvSize];\n            const Int thisColShift = Shift_( k, colAlign, colStride );\n            const Int thisLocalHeight = Length_(height,thisColShift,colStride);\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n            {\n                T* destCol = &data[jLoc*thisLocalHeight];\n                const T* sourceCol =\n                    &ABuffer[thisColShift+(thisRowShift+jLoc*rowStride)*ALDim];\n                for( Int iLoc=0; iLoc<thisLocalHeight; ++iLoc )\n                    destCol[iLoc] = sourceCol[iLoc*colStride];\n            }\n        }\n    }\n\n    // Communicate\n    mpi::ReduceScatter( buffer, recvSize, this->DistComm() );\n\n    // Unpack our received data\n    T* thisBuffer = this->Buffer();\n    const Int thisLDim = this->LDim();\n    ELEM_FMA_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const T* bufferCol = &buffer[jLoc*localHeight];\n        T* thisCol = &thisBuffer[jLoc*thisLDim];\n        for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n            thisCol[iLoc] += alpha*bufferCol[iLoc];\n    }\n    this->auxMemory_.Release();\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialRowSumScatterUpdate\n( T alpha, const DistMatrix<T,U,VPart>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialRowSumScatterUpdate\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n        this->AssertSameSize( A.Height(), A.Width() );\n    )\n    if( !this->Participating() )\n        return;\n\n    if( this->RowAlign() % A.RowStride() == A.RowAlign() )\n    {\n        const Int rowStride = this->RowStride();\n        const Int rowStridePart = this->PartialRowStride();\n        const Int rowStrideUnion = this->PartialUnionRowStride();\n        const Int rowRankPart = this->PartialRowRank();\n        const Int rowAlign = this->RowAlign();\n        const Int rowShiftOfA = A.RowShift();\n\n        const Int height = this->Height();\n        const Int width = this->Width();\n        const Int localWidth = this->LocalWidth();\n        const Int maxLocalWidth = MaxLength( width, rowStride );\n        const Int recvSize = mpi::Pad( height*maxLocalWidth );\n        const Int sendSize = rowStrideUnion*recvSize;\n\n        // Pack\n        const T* ABuf = A.LockedBuffer();\n        const Int ALDim = A.LDim();\n        T* buffer = this->auxMemory_.Require( sendSize );\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<rowStrideUnion; ++k )\n        {\n            T* data = &buffer[k*recvSize];\n            const Int thisRank = rowRankPart+k*rowStridePart;\n            const Int thisRowShift = Shift_( thisRank, rowAlign, rowStride );\n            const Int thisRowOffset = \n                (thisRowShift-rowShiftOfA) / rowStridePart;\n            const Int thisLocalWidth = \n                Length_( width, thisRowShift, rowStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n            {\n                const T* ACol = \n                    &ABuf[(thisRowOffset+jLoc*rowStrideUnion)*ALDim];\n                T* dataCol = &data[jLoc*height];\n                MemCopy( dataCol, ACol, height );\n            }\n        }\n    \n        // Communicate\n        mpi::ReduceScatter( buffer, recvSize, this->PartialUnionRowComm() );\n\n        // Unpack our received data\n        T* thisBuf = this->Buffer();\n        const Int thisLDim = this->LDim();\n        ELEM_PARALLEL_FOR\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n        {\n            const T* bufferCol = &buffer[jLoc*height];\n            T* thisCol = &thisBuf[jLoc*thisLDim];\n            for( Int i=0; i<height; ++i )\n                thisCol[i] += alpha*bufferCol[i];\n        }\n        this->auxMemory_.Release();\n    }\n    else\n    {\n        LogicError(\"Unaligned PartialRowSumScatterUpdate not implemented\");\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::PartialColSumScatterUpdate\n( T alpha, const DistMatrix<T,UPart,V>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::PartialColSumScatterUpdate\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n        this->AssertSameSize( A.Height(), A.Width() );\n    )\n    if( !this->Participating() )\n        return;\n\n#ifdef ELEM_CACHE_WARNINGS\n    if( A.Width() != 1 && A.Grid().Rank() == 0 )\n    {\n        std::cerr <<\n          \"PartialColSumScatterUpdate potentially causes a large amount\"\n          \" of cache-thrashing. If possible, avoid it by forming the \"\n          \"(conjugate-)transpose of the [UGath,* ] matrix instead.\" \n          << std::endl;\n    }\n#endif\n    if( this->ColAlign() % A.ColStride() == A.ColAlign() )\n    {\n        const Int colStride = this->ColStride();\n        const Int colStridePart = this->PartialColStride();\n        const Int colStrideUnion = this->PartialUnionColStride();\n        const Int colRankPart = this->PartialColRank();\n        const Int colAlign = this->ColAlign();\n        const Int colShiftOfA = A.ColShift();\n\n        const Int height = this->Height();\n        const Int width = this->Width();\n        const Int localHeight = this->LocalHeight();\n        const Int maxLocalHeight = MaxLength( height, colStride );\n        const Int recvSize = mpi::Pad( maxLocalHeight*width );\n        const Int sendSize = colStrideUnion*recvSize;\n\n        T* buffer = this->auxMemory_.Require( sendSize );\n\n        // Pack\n        const Int ALDim = A.LDim();\n        const T* ABuf = A.LockedBuffer();\n        ELEM_OUTER_PARALLEL_FOR\n        for( Int k=0; k<colStrideUnion; ++k )\n        {\n            T* data = &buffer[k*recvSize];\n            const Int thisRank = colRankPart+k*colStridePart;\n            const Int thisColShift = Shift_( thisRank, colAlign, colStride );\n            const Int thisColOffset = \n                (thisColShift-colShiftOfA) / colStridePart;\n            const Int thisLocalHeight = \n                Length_( height, thisColShift, colStride );\n            ELEM_INNER_PARALLEL_FOR\n            for( Int j=0; j<width; ++j )\n            {\n                T* destCol = &data[j*thisLocalHeight];\n                const T* sourceCol = &ABuf[thisColOffset+j*ALDim];\n                for( Int iLoc=0; iLoc<thisLocalHeight; ++iLoc )\n                    destCol[iLoc] = sourceCol[iLoc*colStrideUnion];\n            }\n        }\n\n        // Communicate\n        mpi::ReduceScatter( buffer, recvSize, this->PartialUnionColComm() );\n\n        // Unpack our received data\n        T* thisBuf = this->Buffer();\n        const Int thisLDim = this->LDim();\n        ELEM_PARALLEL_FOR\n        for( Int j=0; j<width; ++j )\n        {\n            const T* bufferCol = &buffer[j*localHeight];\n            T* thisCol = &thisBuf[j*thisLDim];\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                thisCol[iLoc] += alpha*bufferCol[iLoc];\n        }\n        this->auxMemory_.Release();\n    }\n    else\n    {\n        LogicError(\"Unaligned PartialColSumScatterUpdate not implemented\");\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::TransposeColAllGather\n( DistMatrix<T,V,UGath>& A, bool conjugate ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::TransposeColAllGather\"))\n    DistMatrix<T,V,U> ATrans( this->Grid() );\n    ATrans.AlignWith( *this );\n    ATrans.Resize( this->Width(), this->Height() );\n    Transpose( this->LockedMatrix(), ATrans.Matrix(), conjugate );\n    ATrans.RowAllGather( A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::TransposePartialColAllGather\n( DistMatrix<T,V,UPart>& A, bool conjugate ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::TransposePartialColAllGather\"))\n    DistMatrix<T,V,U> ATrans( this->Grid() );\n    ATrans.AlignWith( *this );\n    ATrans.Resize( this->Width(), this->Height() );\n    Transpose( this->LockedMatrix(), ATrans.Matrix(), conjugate );\n    ATrans.PartialRowAllGather( A );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AdjointColAllGather( DistMatrix<T,V,UGath>& A ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AdjointRowAllGather\"))\n    this->TransposeColAllGather( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AdjointPartialColAllGather\n( DistMatrix<T,V,UPart>& A ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AdjointPartialColAllGather\"))\n    this->TransposePartialColAllGather( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::TransposeColFilterFrom\n( const DistMatrix<T,V,UGath>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::TransposeColFilterFrom\"))\n    DistMatrix<T,V,U> AFilt( A.Grid() );\n    if( this->ColConstrained() )\n        AFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        AFilt.AlignColsWith( *this, false );\n    AFilt.RowFilterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( AFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( AFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( AFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::TransposeRowFilterFrom\n( const DistMatrix<T,VGath,U>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::TransposeRowFilterFrom\"))\n    DistMatrix<T,V,U> AFilt( A.Grid() );\n    if( this->ColConstrained() )\n        AFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        AFilt.AlignColsWith( *this, false );\n    AFilt.ColFilterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( AFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( AFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( AFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::TransposePartialColFilterFrom\n( const DistMatrix<T,V,UPart>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::TransposePartialColFilterFrom\"))\n    DistMatrix<T,V,U> AFilt( A.Grid() );\n    if( this->ColConstrained() )\n        AFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        AFilt.AlignColsWith( *this, false );\n    AFilt.PartialRowFilterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( AFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( AFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( AFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::TransposePartialRowFilterFrom\n( const DistMatrix<T,VPart,U>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::TransposePartialRowFilterFrom\"))\n    DistMatrix<T,V,U> AFilt( A.Grid() );\n    if( this->ColConstrained() )\n        AFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        AFilt.AlignColsWith( *this, false );\n    AFilt.PartialColFilterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( AFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( AFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( AFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AdjointColFilterFrom( const DistMatrix<T,V,UGath>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AdjointColFilterFrom\"))\n    this->TransposeColFilterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AdjointRowFilterFrom( const DistMatrix<T,VGath,U>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AdjointRowFilterFrom\"))\n    this->TransposeRowFilterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AdjointPartialColFilterFrom\n( const DistMatrix<T,V,UPart>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AdjointPartialColFilterFrom\"))\n    this->TransposePartialColFilterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AdjointPartialRowFilterFrom\n( const DistMatrix<T,VPart,U>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AdjointPartialRowFilterFrom\"))\n    this->TransposePartialRowFilterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::TransposeColSumScatterFrom\n( const DistMatrix<T,V,UGath>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::TransposeColSumScatterFrom\"))\n    DistMatrix<T,V,U> ASumFilt( A.Grid() );\n    if( this->ColConstrained() )\n        ASumFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        ASumFilt.AlignColsWith( *this, false );\n    ASumFilt.RowSumScatterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( ASumFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( ASumFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( ASumFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::TransposePartialColSumScatterFrom\n( const DistMatrix<T,V,UPart>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::TransposePartialColSumScatterFrom\"))\n    DistMatrix<T,V,U> ASumFilt( A.Grid() );\n    if( this->ColConstrained() )\n        ASumFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        ASumFilt.AlignColsWith( *this, false );\n    ASumFilt.PartialRowSumScatterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( ASumFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( ASumFilt, false );\n    this->Resize( A.Width(), A.Height() );\n    Transpose( ASumFilt.LockedMatrix(), this->Matrix(), conjugate );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AdjointColSumScatterFrom\n( const DistMatrix<T,V,UGath>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AdjointColSumScatterFrom\"))\n    this->TransposeColSumScatterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AdjointPartialColSumScatterFrom\n( const DistMatrix<T,V,UPart>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AdjointPartialColSumScatterFrom\"))\n    this->TransposePartialColSumScatterFrom( A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::TransposeColSumScatterUpdate\n( T alpha, const DistMatrix<T,V,UGath>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::TransposeColSumScatterUpdate\"))\n    DistMatrix<T,V,U> ASumFilt( A.Grid() );\n    if( this->ColConstrained() )\n        ASumFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        ASumFilt.AlignColsWith( *this, false );\n    ASumFilt.RowSumScatterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( ASumFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( ASumFilt, false );\n    // ALoc += alpha ASumFiltLoc'\n    elem::Matrix<T>& ALoc = this->Matrix();\n    const elem::Matrix<T>& BLoc = ASumFilt.LockedMatrix();\n    const Int localHeight = ALoc.Height();\n    const Int localWidth = ALoc.Width();\n    if( conjugate )\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                ALoc.Update( iLoc, jLoc, alpha*Conj(BLoc.Get(jLoc,iLoc)) );\n    }\n    else\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                ALoc.Update( iLoc, jLoc, alpha*BLoc.Get(jLoc,iLoc) );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::TransposePartialColSumScatterUpdate\n( T alpha, const DistMatrix<T,V,UPart>& A, bool conjugate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::TransposePartialColSumScatterUpdate\"))\n    DistMatrix<T,V,U> ASumFilt( A.Grid() );\n    if( this->ColConstrained() )\n        ASumFilt.AlignRowsWith( *this, false );\n    if( this->RowConstrained() )\n        ASumFilt.AlignColsWith( *this, false );\n    ASumFilt.PartialRowSumScatterFrom( A );\n    if( !this->ColConstrained() )\n        this->AlignColsWith( ASumFilt, false );\n    if( !this->RowConstrained() )\n        this->AlignRowsWith( ASumFilt, false );\n    // ALoc += alpha ASumFiltLoc'\n    elem::Matrix<T>& ALoc = this->Matrix();\n    const elem::Matrix<T>& BLoc = ASumFilt.LockedMatrix();\n    const Int localHeight = ALoc.Height();\n    const Int localWidth = ALoc.Width();\n    if( conjugate )\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                ALoc.Update( iLoc, jLoc, alpha*Conj(BLoc.Get(jLoc,iLoc)) );\n    }\n    else\n    {\n        for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n            for( Int iLoc=0; iLoc<localHeight; ++iLoc )\n                ALoc.Update( iLoc, jLoc, alpha*BLoc.Get(jLoc,iLoc) );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AdjointColSumScatterUpdate\n( T alpha, const DistMatrix<T,V,UGath>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AdjointColSumScatterUpdate\"))\n    this->TransposeColSumScatterUpdate( alpha, A, true );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::AdjointPartialColSumScatterUpdate\n( T alpha, const DistMatrix<T,V,UPart>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::AdjointPartialColSumScatterUpdate\"))\n    this->TransposePartialColSumScatterUpdate( alpha, A, true );\n}\n\n// Diagonal manipulation\n// =====================\ntemplate<typename T,Dist U,Dist V>\nbool\nGeneralDistMatrix<T,U,V>::DiagonalAlignedWith\n( const elem::DistData& d, Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::DiagonalAlignedWith\"))\n    if( this->Grid() != *d.grid )\n        return false;\n\n    const Int diagRoot = this->DiagonalRoot(offset);\n    if( diagRoot != d.root )\n        return false;\n\n    const Int diagAlign = this->DiagonalAlign(offset);\n    if( d.colDist == UDiag && d.rowDist == VDiag )\n        return d.colAlign == diagAlign;\n    else if( d.colDist == VDiag && d.rowDist == UDiag )\n        return d.rowAlign == diagAlign;\n    else\n        return false;\n}\n\ntemplate<typename T,Dist U,Dist V>\nInt \nGeneralDistMatrix<T,U,V>::DiagonalRoot( Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::DiagonalRoot\"))\n    const elem::Grid& grid = this->Grid();\n\n    if( U == MC && V == MR )\n    {\n        // Result is an [MD,* ] or [* ,MD]\n        Int owner;\n        if( offset >= 0 )\n        {\n            const Int procRow = this->ColAlign();\n            const Int procCol = (this->RowAlign()+offset) % this->RowStride();\n            owner = procRow + this->ColStride()*procCol;\n        }\n        else\n        {\n            const Int procRow = (this->ColAlign()-offset) % this->ColStride();\n            const Int procCol = this->RowAlign();\n            owner = procRow + this->ColStride()*procCol;\n        }\n        return grid.DiagPath(owner);\n    }\n    else if( U == MR && V == MC )\n    {\n        // Result is an [MD,* ] or [* ,MD]\n        Int owner;\n        if( offset >= 0 )\n        {\n            const Int procCol = this->ColAlign();\n            const Int procRow = (this->RowAlign()+offset) % this->RowStride();\n            owner = procRow + this->ColStride()*procCol;\n        }\n        else\n        {\n            const Int procCol = (this->ColAlign()-offset) % this->ColStride();\n            const Int procRow = this->RowAlign();\n            owner = procRow + this->ColStride()*procCol;\n        }\n        return grid.DiagPath(owner);\n    }\n    else\n        return this->Root();\n}\n\ntemplate<typename T,Dist U,Dist V>\nInt\nGeneralDistMatrix<T,U,V>::DiagonalAlign( Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::DiagonalAlign\"))\n    const elem::Grid& grid = this->Grid();\n\n    if( U == MC && V == MR )\n    {\n        // Result is an [MD,* ] or [* ,MD]\n        Int owner;\n        if( offset >= 0 )\n        {\n            const Int procRow = this->ColAlign();\n            const Int procCol = (this->RowAlign()+offset) % this->RowStride();\n            owner = procRow + this->ColStride()*procCol;\n        }\n        else\n        {\n            const Int procRow = (this->ColAlign()-offset) % this->ColStride();\n            const Int procCol = this->RowAlign();\n            owner = procRow + this->ColStride()*procCol;\n        }\n        return grid.DiagPathRank(owner);\n    }\n    else if( U == MR && V == MC )\n    {\n        // Result is an [MD,* ] or [* ,MD]\n        Int owner;\n        if( offset >= 0 )\n        {\n            const Int procCol = this->ColAlign();\n            const Int procRow = (this->RowAlign()+offset) % this->RowStride();\n            owner = procRow + this->ColStride()*procCol;\n        }\n        else\n        {\n            const Int procCol = (this->ColAlign()-offset) % this->ColStride();\n            const Int procRow = this->RowAlign();\n            owner = procRow + this->ColStride()*procCol;\n        }\n        return grid.DiagPathRank(owner);\n    }\n    else if( U == STAR )\n    {\n        // Result is a [V,* ] or [* ,V]\n        if( offset >= 0 )\n            return (this->RowAlign()+offset) % this->RowStride();\n        else\n            return this->RowAlign();\n    }\n    else\n    {\n        // Result is [U,V] or [V,U], where V is either STAR or CIRC\n        if( offset >= 0 )\n            return this->ColAlign();\n        else\n            return (this->ColAlign()-offset) % this->ColStride();\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::GetDiagonal\n( DistMatrix<T,UDiag,VDiag>& d, Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::GetDiagonal\"))\n    this->GetDiagonalHelper\n    ( d, offset, []( T& alpha, T beta ) { alpha = beta; } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::GetRealPartOfDiagonal\n( DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::GetRealPartOfDiagonal\"))\n    this->GetDiagonalHelper\n    ( d, offset, []( Base<T>& alpha, T beta ) { alpha = RealPart(beta); } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::GetImagPartOfDiagonal\n( DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::GetImagPartOfDiagonal\"))\n    this->GetDiagonalHelper\n    ( d, offset, []( Base<T>& alpha, T beta ) { alpha = ImagPart(beta); } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nauto\nGeneralDistMatrix<T,U,V>::GetDiagonal( Int offset ) const\n-> DistMatrix<T,UDiag,VDiag>\n{\n    DistMatrix<T,UDiag,VDiag> d( this->Grid() );\n    GetDiagonal( d, offset );\n    return d;\n}\n\ntemplate<typename T,Dist U,Dist V>\nauto\nGeneralDistMatrix<T,U,V>::GetRealPartOfDiagonal( Int offset ) const\n-> DistMatrix<Base<T>,UDiag,VDiag>\n{\n    DistMatrix<Base<T>,UDiag,VDiag> d( this->Grid() );\n    GetRealPartOfDiagonal( d, offset );\n    return d;\n}\n\ntemplate<typename T,Dist U,Dist V>\nauto\nGeneralDistMatrix<T,U,V>::GetImagPartOfDiagonal( Int offset ) const\n-> DistMatrix<Base<T>,UDiag,VDiag>\n{\n    DistMatrix<Base<T>,UDiag,VDiag> d( this->Grid() );\n    GetImagPartOfDiagonal( d, offset );\n    return d;\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::SetDiagonal\n( const DistMatrix<T,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::SetDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, []( T& alpha, T beta ) { alpha = beta; } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::SetRealPartOfDiagonal\n( const DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::SetRealPartOfDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, \n      []( T& alpha, Base<T> beta ) { elem::SetRealPart(alpha,beta); } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::SetImagPartOfDiagonal\n( const DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::SetImagPartOfDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, \n      []( T& alpha, Base<T> beta ) { elem::SetImagPart(alpha,beta); } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::UpdateDiagonal\n( T gamma, const DistMatrix<T,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::UpdateDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, [gamma]( T& alpha, T beta ) { alpha += gamma*beta; } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::UpdateRealPartOfDiagonal\n( Base<T> gamma, const DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::UpdateRealPartOfDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, \n      [gamma]( T& alpha, Base<T> beta ) \n      { elem::UpdateRealPart(alpha,gamma*beta); } );\n}\n\ntemplate<typename T,Dist U,Dist V>\nvoid\nGeneralDistMatrix<T,U,V>::UpdateImagPartOfDiagonal\n( Base<T> gamma, const DistMatrix<Base<T>,UDiag,VDiag>& d, Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::UpdateImagPartOfDiagonal\"))\n    this->SetDiagonalHelper\n    ( d, offset, \n      [gamma]( T& alpha, Base<T> beta ) \n      { elem::UpdateImagPart(alpha,gamma*beta); } );\n}\n\n// Private section\n// ###############\n\n// Diagonal helper functions\n// =========================\ntemplate<typename T,Dist U,Dist V>\ntemplate<typename S,class Function>\nvoid\nGeneralDistMatrix<T,U,V>::GetDiagonalHelper\n( DistMatrix<S,UDiag,VDiag>& d, Int offset, Function func ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"GDM::GetDiagonalHelper\"))\n    d.SetGrid( this->Grid() );\n    d.SetRoot( this->DiagonalRoot(offset) );\n    d.AlignCols( this->DiagonalAlign(offset), false );\n    d.Resize( this->DiagonalLength(offset), 1 );\n    if( !d.Participating() )\n        return;\n\n    const Int diagShift = d.ColShift();\n    const Int diagStride = d.ColStride();\n    const Int iStart = ( offset>=0 ? diagShift        : diagShift-offset );\n    const Int jStart = ( offset>=0 ? diagShift+offset : diagShift        );\n\n    const Int colStride = this->ColStride();\n    const Int rowStride = this->RowStride();\n    const Int iLocStart = (iStart-this->ColShift()) / colStride;\n    const Int jLocStart = (jStart-this->RowShift()) / rowStride;\n\n    const Int localDiagLength = d.LocalHeight();\n    S* dBuf = d.Buffer();\n    const T* buffer = this->LockedBuffer();\n    const Int ldim = this->LDim();\n\n    ELEM_PARALLEL_FOR\n    for( Int k=0; k<localDiagLength; ++k )\n    {\n        const Int iLoc = iLocStart + k*(diagStride/colStride);\n        const Int jLoc = jLocStart + k*(diagStride/rowStride);\n        func( dBuf[k], buffer[iLoc+jLoc*ldim] );\n    }\n}\n\ntemplate<typename T,Dist U,Dist V>\ntemplate<typename S,class Function>\nvoid\nGeneralDistMatrix<T,U,V>::SetDiagonalHelper\n( const DistMatrix<S,UDiag,VDiag>& d, Int offset, Function func ) \n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"GDM::SetDiagonalHelper\");\n        if( !this->DiagonalAlignedWith( d, offset ) )\n            LogicError(\"Invalid diagonal alignment\");\n    )\n    if( !d.Participating() )\n        return;\n\n    const Int diagShift = d.ColShift();\n    const Int diagStride = d.ColStride();\n    const Int iStart = ( offset>=0 ? diagShift        : diagShift-offset );\n    const Int jStart = ( offset>=0 ? diagShift+offset : diagShift        );\n\n    const Int colStride = this->ColStride();\n    const Int rowStride = this->RowStride();\n    const Int iLocStart = (iStart-this->ColShift()) / colStride;\n    const Int jLocStart = (jStart-this->RowShift()) / rowStride;\n\n    const Int localDiagLength = d.LocalHeight();\n    const S* dBuf = d.LockedBuffer();\n    T* buffer = this->Buffer();\n    const Int ldim = this->LDim();\n\n    ELEM_PARALLEL_FOR\n    for( Int k=0; k<localDiagLength; ++k )\n    {\n        const Int iLoc = iLocStart + k*(diagStride/colStride);\n        const Int jLoc = jLocStart + k*(diagStride/rowStride);\n        func( buffer[iLoc+jLoc*ldim], dBuf[k] );\n    }\n}\n\n// Instantiations for {Int,Real,Complex<Real>} for each Real in {float,double}\n// ###########################################################################\n\n#define DISTPROTO(T,U,V) template class GeneralDistMatrix<T,U,V>\n  \n#define PROTO(T)\\\n  DISTPROTO(T,CIRC,CIRC);\\\n  DISTPROTO(T,MC,  MR  );\\\n  DISTPROTO(T,MC,  STAR);\\\n  DISTPROTO(T,MD,  STAR);\\\n  DISTPROTO(T,MR,  MC  );\\\n  DISTPROTO(T,MR,  STAR);\\\n  DISTPROTO(T,STAR,MC  );\\\n  DISTPROTO(T,STAR,MD  );\\\n  DISTPROTO(T,STAR,MR  );\\\n  DISTPROTO(T,STAR,STAR);\\\n  DISTPROTO(T,STAR,VC  );\\\n  DISTPROTO(T,STAR,VR  );\\\n  DISTPROTO(T,VC,  STAR);\\\n  DISTPROTO(T,VR,  STAR);\n\n#ifndef ELEM_DISABLE_COMPLEX\n #ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(float);\n  PROTO(double);\n  PROTO(Complex<float>);\n  PROTO(Complex<double>);\n #else // ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(double);\n  PROTO(Complex<double>);\n #endif // ifndef ELEM_DISABLE_FLOAT\n#else // ifndef ELEM_DISABLE_COMPLEX\n #ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(float);\n  PROTO(double);\n #else // ifndef ELEM_DISABLE_FLOAT\n  PROTO(Int);\n  PROTO(double);\n #endif // ifndef ELEM_DISABLE_FLOAT\n#endif // ifndef ELEM_DISABLE_COMPLEX\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/MC_MR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist MC\n#define RowDist MR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    if( this->Grid() == A.Grid() )\n        A.Translate( *this );\n    else\n        this->CopyFromDifferentGrid( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [MC,STAR]\"))\n    this->RowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,MR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"[MC,MR] = [MR,MC]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const elem::Grid& g = A.Grid();\n    this->Resize( A.Height(), A.Width() );\n    if( !this->Participating() )\n        return *this;\n\n    if( A.Width() == 1 )\n    {\n        const Int r = g.Height();\n        const Int c = g.Width();\n        const Int p = g.Size();\n        const Int myRow = g.Row();\n        const Int myCol = g.Col();\n        const Int rankCM = g.VCRank();\n        const Int rankRM = g.VRRank();\n        const Int ownerCol = this->RowAlign();\n        const Int ownerRow = A.RowAlign();\n        const Int colAlign = this->ColAlign();\n        const Int colAlignA = A.ColAlign();\n        const Int colShift = this->ColShift();\n        const Int colShiftA = A.ColShift();\n\n        const Int height = A.Height();\n        const Int maxLocalHeight = MaxLength(height,p);\n        const Int portionSize = mpi::Pad( maxLocalHeight );\n\n        const Int colShiftVC = Shift(rankCM,colAlign,p);\n        const Int colShiftVRA = Shift(rankRM,colAlignA,p);\n        const Int sendRankCM = (rankCM+(p+colShiftVRA-colShiftVC)) % p;\n        const Int recvRankRM = (rankRM+(p+colShiftVC-colShiftVRA)) % p;\n        const Int recvRankCM = (recvRankRM/c)+r*(recvRankRM%c);\n\n        T* buffer = this->auxMemory_.Require( (r+c)*portionSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[c*portionSize];\n\n        if( myRow == ownerRow )\n        {\n            // Pack\n            const T* ABuffer = A.LockedBuffer();\n            ELEM_PARALLEL_FOR\n            for( Int k=0; k<r; ++k )\n            {\n                T* data = &recvBuf[k*portionSize];\n\n                const Int shift = Shift_(myCol+c*k,colAlignA,p);\n                const Int offset = (shift-colShiftA) / c;\n                const Int thisLocalHeight = Length_(height,shift,p);\n\n                for( Int iLoc=0; iLoc<thisLocalHeight; ++iLoc )\n                    data[iLoc] = ABuffer[offset+iLoc*r];\n            }\n        }\n\n        // A[VR,STAR] <- A[MR,MC]\n        mpi::Scatter\n        ( recvBuf, portionSize, sendBuf, portionSize, ownerRow, g.ColComm() );\n\n        // A[VC,STAR] <- A[VR,STAR]\n        mpi::SendRecv\n        ( sendBuf, portionSize, sendRankCM,\n          recvBuf, portionSize, recvRankCM, g.VCComm() );\n\n        // A[MC,MR] <- A[VC,STAR]\n        mpi::Gather\n        ( recvBuf, portionSize, sendBuf, portionSize, ownerCol, g.RowComm() );\n\n        if( myCol == ownerCol )\n        {\n            // Unpack\n            T* thisBuffer = this->Buffer();\n            ELEM_PARALLEL_FOR\n            for( Int k=0; k<c; ++k )\n            {\n                const T* data = &sendBuf[k*portionSize];\n\n                const Int shift = Shift_(myRow+r*k,colAlign,p);\n                const Int offset = (shift-colShift) / r;\n                const Int thisLocalHeight = Length_(height,shift,p);\n\n                for( Int iLoc=0; iLoc<thisLocalHeight; ++iLoc )\n                    thisBuffer[offset+iLoc*c] = data[iLoc];\n            }\n        }\n        this->auxMemory_.Release();\n    }\n    else if( A.Height() == 1 )\n    {\n        const Int r = g.Height();\n        const Int c = g.Width();\n        const Int p = g.Size();\n        const Int myRow = g.Row();\n        const Int myCol = g.Col();\n        const Int rankCM = g.VCRank();\n        const Int rankRM = g.VRRank();\n        const Int ownerRow = this->ColAlign();\n        const Int ownerCol = A.ColAlign();\n        const Int rowAlign = this->RowAlign();\n        const Int rowAlignA = A.RowAlign();\n        const Int rowShift = this->RowShift();\n        const Int rowShiftA = A.RowShift();\n\n        const Int width = A.Width();\n        const Int maxLocalWidth = MaxLength(width,p);\n        const Int portionSize = mpi::Pad( maxLocalWidth );\n\n        const Int rowShiftVR = Shift(rankRM,rowAlign,p);\n        const Int rowShiftVCA = Shift(rankCM,rowAlignA,p);\n        const Int sendRankRM = (rankRM+(p+rowShiftVCA-rowShiftVR)) % p;\n        const Int recvRankCM = (rankCM+(p+rowShiftVR-rowShiftVCA)) % p;\n        const Int recvRankRM = (recvRankCM/r)+c*(recvRankCM%r);\n\n        T* buffer = this->auxMemory_.Require( (r+c)*portionSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[r*portionSize];\n\n        if( myCol == ownerCol )\n        {\n            // Pack\n            const T* ABuffer = A.LockedBuffer();\n            const Int ALDim = A.LDim();\n            ELEM_PARALLEL_FOR\n            for( Int k=0; k<c; ++k )\n            {\n                T* data = &recvBuf[k*portionSize];\n\n                const Int shift = Shift_(myRow+r*k,rowAlignA,p);\n                const Int offset = (shift-rowShiftA) / r;\n                const Int thisLocalWidth = Length_(width,shift,p);\n\n                for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                    data[jLoc] = ABuffer[(offset+jLoc*c)*ALDim];\n            }\n        }\n\n        // A[STAR,VC] <- A[MR,MC]\n        mpi::Scatter\n        ( recvBuf, portionSize, sendBuf, portionSize, ownerCol, g.RowComm() );\n\n        // A[STAR,VR] <- A[STAR,VC]\n        mpi::SendRecv\n        ( sendBuf, portionSize, sendRankRM,\n          recvBuf, portionSize, recvRankRM, g.VRComm() );\n\n        // A[MC,MR] <- A[STAR,VR]\n        mpi::Gather\n        ( recvBuf, portionSize, sendBuf, portionSize, ownerRow, g.ColComm() );\n    \n        if( myRow == ownerRow )\n        {\n            // Unpack\n            T* thisBuffer = this->Buffer();\n            const Int thisLDim = this->LDim();\n            ELEM_PARALLEL_FOR\n            for( Int k=0; k<r; ++k )\n            {\n                const T* data = &sendBuf[k*portionSize];\n\n                const Int shift = Shift_(myCol+c*k,rowAlign,p);\n                const Int offset = (shift-rowShift) / c;\n                const Int thisLocalWidth = Length_(width,shift,p);\n\n                for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                    thisBuffer[(offset+jLoc*r)*thisLDim] = data[jLoc];\n            }\n        }\n\n        this->auxMemory_.Release();\n    }\n    else\n    {\n        if( A.Height() >= A.Width() )\n        {\n            std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n            ( new DistMatrix<T,VR,STAR>(A) );\n\n            std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n            ( new DistMatrix<T,VC,STAR>(g) );\n            A_VC_STAR->AlignColsWith(*this);\n            *A_VC_STAR = *A_VR_STAR;\n            delete A_VR_STAR.release(); // lowers memory highwater\n\n            *this = *A_VC_STAR;\n        }\n        else\n        {\n            std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n            ( new DistMatrix<T,STAR,VC>(A) );\n\n            std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n            ( new DistMatrix<T,STAR,VR>(g) );\n            A_STAR_VR->AlignRowsWith(*this);\n            *A_STAR_VR = *A_STAR_VC;\n            delete A_STAR_VC.release(); // lowers memory highwater\n\n            *this = *A_STAR_VR;\n            this->Resize( A_STAR_VR->Height(), A_STAR_VR->Width() );\n        }\n    }\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [MR,STAR]\"))\n    std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new DistMatrix<T,VR,STAR>(A) );\n    std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new DistMatrix<T,VC,STAR>(this->Grid()) );\n    A_VC_STAR->AlignColsWith(*this);\n    *A_VC_STAR = *A_VR_STAR;\n    delete A_VR_STAR.release(); // lowers memory highwater\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,MC]\"))\n    std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new DistMatrix<T,STAR,VC>(A) );\n    std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new DistMatrix<T,STAR,VR>(this->Grid()) );\n    A_STAR_VR->AlignRowsWith(*this);\n    *A_STAR_VR = *A_STAR_VC;\n    delete A_STAR_VC.release(); // lowers memory highwater\n    *this = *A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [VC,STAR]\"))\n    A.PartialColAllToAll( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,VC]\"))\n    DistMatrix<T,STAR,VR> A_STAR_VR(this->Grid());\n    A_STAR_VR.AlignRowsWith(*this);\n    A_STAR_VR = A;\n    *this = A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [VR,STAR]\"))\n    DistMatrix<T,VC,STAR> A_VC_STAR(this->Grid());\n    A_VC_STAR.AlignColsWith(*this);\n    A_VC_STAR = A;\n    *this = A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,VR]\"))\n    A.PartialRowAllToAll( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR] = [STAR,STAR]\"))\n    this->FilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"[MC,MR] = [CIRC,CIRC]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int colStride = this->ColStride();\n    const Int rowStride = this->RowStride();\n    const Int p = g.Size();\n    this->Resize( m, n );\n\n    const Int colAlign = this->ColAlign();\n    const Int rowAlign = this->RowAlign();\n    const Int mLocal = this->LocalHeight();\n    const Int nLocal = this->LocalWidth();\n    const Int pkgSize = mpi::Pad(MaxLength(m,colStride)*MaxLength(n,rowStride));\n    const Int recvSize = pkgSize;\n    const Int sendSize = p*pkgSize;\n    T* recvBuf=0; // some compilers (falsely) warn otherwise\n    if( A.Participating() )\n    {\n        T* buffer = this->auxMemory_.Require( sendSize + recvSize );\n        T* sendBuf = &buffer[0];\n        recvBuf = &buffer[sendSize];\n\n        // Pack the send buffer\n        const Int ALDim = A.LDim();\n        const T* ABuffer = A.LockedBuffer();\n        for( Int t=0; t<rowStride; ++t )\n        {\n            const Int tLocalWidth = Length( n, t, rowStride );\n            const Int col = (rowAlign+t) % rowStride;\n            for( Int s=0; s<colStride; ++s )\n            {\n                const Int sLocalHeight = Length( m, s, colStride );\n                const Int row = (colAlign+s) % colStride;\n                const Int q = row + col*colStride;\n                for( Int jLoc=0; jLoc<tLocalWidth; ++jLoc ) \n                {\n                    const Int j = t + jLoc*rowStride;\n                    for( Int iLoc=0; iLoc<sLocalHeight; ++iLoc )\n                    {\n                        const Int i = s + iLoc*colStride;\n                        sendBuf[q*pkgSize+iLoc+jLoc*sLocalHeight] = \n                            ABuffer[i+j*ALDim];\n                    }\n                }\n            }\n        }\n\n        // Scatter from the root\n        mpi::Scatter\n        ( sendBuf, pkgSize, recvBuf, pkgSize, A.Root(), g.VCComm() );\n    }\n    else if( this->Participating() )\n    {\n        recvBuf = this->auxMemory_.Require( recvSize );\n\n        // Perform the receiving portion of the scatter from the non-root\n        mpi::Scatter\n        ( static_cast<T*>(0), pkgSize, \n          recvBuf,            pkgSize, A.Root(), g.VCComm() );\n    }\n\n    if( this->Participating() )\n    {\n        // Unpack\n        const Int ldim = this->LDim();\n        T* buffer = this->Buffer();\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                buffer[iLoc+jLoc*ldim] = recvBuf[iLoc+jLoc*mLocal];     \n        this->auxMemory_.Release();\n    }\n\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return this->grid_->MRComm(); }\n\ntemplate<typename T>\nInt DM::ColStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt DM::RowStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return 1; }\n\n// Private section\n// ###############\n\ntemplate<typename T>\nvoid DM::CopyFromDifferentGrid( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,MR]::CopyFromDifferentGrid\"))\n    this->Resize( A.Height(), A.Width() );\n    // Just need to ensure that each viewing comm contains the other team's\n    // owning comm. Congruence is too strong.\n\n    // Compute the number of process rows and columns that each process\n    // needs to send to.\n    const Int colStride = this->ColStride();\n    const Int rowStride = this->RowStride();\n    const Int colRank = this->ColRank();\n    const Int rowRank = this->RowRank();\n    const Int colStrideA = A.ColStride();\n    const Int rowStrideA = A.RowStride();\n    const Int colRankA = A.ColRank();\n    const Int rowRankA = A.RowRank();\n    const Int colGCD = GCD( colStride, colStrideA );\n    const Int rowGCD = GCD( rowStride, rowStrideA );\n    const Int colLCM = colStride*colStrideA / colGCD;\n    const Int rowLCM = rowStride*rowStrideA / rowGCD;\n    const Int numColSends = colStride / colGCD;\n    const Int numRowSends = rowStride / rowGCD;\n    const Int localColStride = colLCM / colStride;\n    const Int localRowStride = rowLCM / rowStride;\n    const Int localColStrideA = numColSends;\n    const Int localRowStrideA = numRowSends;\n\n    const Int colAlign = this->ColAlign();\n    const Int rowAlign = this->RowAlign();\n    const Int colAlignA = A.ColAlign();\n    const Int rowAlignA = A.RowAlign();\n\n    const bool inThisGrid = this->Participating();\n    const bool inAGrid = A.Participating();\n    if( !inThisGrid && !inAGrid )\n        return;\n\n    const Int maxSendSize =\n        (A.Height()/(colStrideA*localColStrideA)+1) *\n        (A.Width()/(rowStrideA*localRowStrideA)+1);\n\n    // Translate the ranks from A's VC communicator to this's viewing so that\n    // we can match send/recv communicators. Since A's VC communicator is not\n    // necessarily defined on every process, we instead work with A's owning\n    // group and account for row-major ordering if necessary.\n    const int sizeA = A.Grid().Size();\n    std::vector<int> rankMap(sizeA), ranks(sizeA);\n    if( A.Grid().Order() == COLUMN_MAJOR )\n    {\n        for( int j=0; j<sizeA; ++j )\n            ranks[j] = j;\n    }\n    else\n    {\n        // The (i,j) = i + j*colStrideA rank in the column-major ordering is\n        // equal to the j + i*rowStrideA rank in a row-major ordering.\n        // Since we desire rankMap[i+j*colStrideA] to correspond to process\n        // (i,j) in A's grid's rank in this viewing group, ranks[i+j*colStrideA]\n        // should correspond to process (i,j) in A's owning group. Since the\n        // owning group is ordered row-major in this case, its rank is\n        // j+i*rowStrideA. Note that setting\n        // ranks[j+i*rowStrideA] = i+j*colStrideA is *NOT* valid.\n        for( int i=0; i<colStrideA; ++i )\n            for( int j=0; j<rowStrideA; ++j )\n                ranks[i+j*colStrideA] = j+i*rowStrideA;\n    }\n    mpi::Translate\n    ( A.Grid().OwningGroup(), sizeA, &ranks[0],\n      this->Grid().ViewingComm(), &rankMap[0] );\n\n    // Have each member of A's grid individually send to all numRow x numCol\n    // processes in order, while the members of this grid receive from all\n    // necessary processes at each step.\n    Int requiredMemory = 0;\n    if( inAGrid )\n        requiredMemory += maxSendSize;\n    if( inThisGrid )\n        requiredMemory += maxSendSize;\n    T* auxBuf = this->auxMemory_.Require( requiredMemory );\n    Int offset = 0;\n    T* sendBuf = &auxBuf[offset];\n    if( inAGrid )\n        offset += maxSendSize;\n    T* recvBuf = &auxBuf[offset];\n\n    Int recvRow = 0; // avoid compiler warnings...\n    if( inAGrid )\n        recvRow = (((colRankA+colStrideA-colAlignA)%colStrideA)+colAlign) %\n                  colStride;\n    for( Int colSend=0; colSend<numColSends; ++colSend )\n    {\n        Int recvCol = 0; // avoid compiler warnings...\n        if( inAGrid )\n            recvCol = (((rowRankA+rowStrideA-rowAlignA)%rowStrideA)+rowAlign) %\n                      rowStride;\n        for( Int rowSend=0; rowSend<numRowSends; ++rowSend )\n        {\n            mpi::Request sendRequest;\n            // Fire off this round of non-blocking sends\n            if( inAGrid )\n            {\n                // Pack the data\n                Int sendHeight = Length(A.LocalHeight(),colSend,numColSends);\n                Int sendWidth = Length(A.LocalWidth(),rowSend,numRowSends);\n                const T* ABuffer = A.LockedBuffer();\n                const Int ALDim = A.LDim();\n                ELEM_PARALLEL_FOR\n                for( Int jLoc=0; jLoc<sendWidth; ++jLoc )\n                {\n                    const Int j = rowSend+jLoc*localRowStrideA;\n                    for( Int iLoc=0; iLoc<sendHeight; ++iLoc )\n                    {\n                        const Int i = colSend+iLoc*localColStrideA;\n                        sendBuf[iLoc+jLoc*sendHeight] = ABuffer[i+j*ALDim];\n                    }\n                }\n                // Send data\n                const Int recvVCRank = recvRow + recvCol*colStride;\n                const Int recvViewingRank =\n                    this->Grid().VCToViewingMap( recvVCRank );\n                mpi::ISend\n                ( sendBuf, sendHeight*sendWidth, recvViewingRank,\n                  this->Grid().ViewingComm(), sendRequest );\n            }\n            // Perform this round of recv's\n            if( inThisGrid )\n            {\n                const Int sendColOffset = (colSend*colStrideA+colAlignA) % colStrideA;\n                const Int recvColOffset = (colSend*colStrideA+colAlign) % colStride;\n                const Int sendRowOffset = (rowSend*rowStrideA+rowAlignA) % rowStrideA;\n                const Int recvRowOffset = (rowSend*rowStrideA+rowAlign) % rowStride;\n\n                const Int firstSendRow = (((colRank+colStride-recvColOffset)%colStride)+sendColOffset)%colStrideA;\n                const Int firstSendCol = (((rowRank+rowStride-recvRowOffset)%rowStride)+sendRowOffset)%rowStrideA;\n\n                const Int colShift = (colRank+colStride-recvColOffset)%colStride;\n                const Int rowShift = (rowRank+rowStride-recvRowOffset)%rowStride;\n                const Int numColRecvs = Length( colStrideA, colShift, colStride );\n                const Int numRowRecvs = Length( rowStrideA, rowShift, rowStride );\n\n                // Recv data\n                // For now, simply receive sequentially. Until we switch to\n                // nonblocking recv's, we won't be using much of the\n                // recvBuf\n                Int sendRow = firstSendRow;\n                for( Int colRecv=0; colRecv<numColRecvs; ++colRecv )\n                {\n                    const Int sendColShift = Shift( sendRow, colAlignA, colStrideA ) + colSend*colStrideA;\n                    const Int sendHeight = Length( A.Height(), sendColShift, colLCM );\n                    const Int localColOffset = (sendColShift-this->ColShift()) / colStride;\n\n                    Int sendCol = firstSendCol;\n                    for( Int rowRecv=0; rowRecv<numRowRecvs; ++rowRecv )\n                    {\n                        const Int sendRowShift = Shift( sendCol, rowAlignA, rowStrideA ) + rowSend*rowStrideA;\n                        const Int sendWidth = Length( A.Width(), sendRowShift, rowLCM );\n                        const Int localRowOffset = (sendRowShift-this->RowShift()) / rowStride;\n\n                        const Int sendVCRank = sendRow+sendCol*colStrideA;\n                        mpi::Recv\n                        ( recvBuf, sendHeight*sendWidth, rankMap[sendVCRank],\n                          this->Grid().ViewingComm() );\n                        \n                        // Unpack the data\n                        T* buffer = this->Buffer();\n                        const Int ldim = this->LDim();\n                        ELEM_PARALLEL_FOR\n                        for( Int jLoc=0; jLoc<sendWidth; ++jLoc )\n                        {\n                            const Int j = localRowOffset+jLoc*localRowStride;\n                            for( Int iLoc=0; iLoc<sendHeight; ++iLoc )\n                            {\n                                const Int i = localColOffset+iLoc*localColStride;\n                                buffer[i+j*ldim] = recvBuf[iLoc+jLoc*sendHeight];\n                            }\n                        }\n                        // Set up the next send col\n                        sendCol = (sendCol + rowStride) % rowStrideA;\n                    }\n                    // Set up the next send row\n                    sendRow = (sendRow + colStride) % colStrideA;\n                }\n            }\n            // Ensure that this round of non-blocking sends completes\n            if( inAGrid )\n            {\n                mpi::Wait( sendRequest );\n                recvCol = (recvCol + rowStrideA) % rowStride;\n            }\n        }\n        if( inAGrid )\n            recvRow = (recvRow + colStrideA) % colStride;\n    }\n    this->auxMemory_.Release();\n}\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  OTHER(T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif \n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/MC_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist MC\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [MC,MR]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,MR]\"))\n    DistMatrix<T,MC,MR> A_MC_MR(this->Grid());\n    A_MC_MR.AlignColsWith(*this);\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [MR,MC]\"))\n    std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new DistMatrix<T,VR,STAR>(A) );\n    std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new DistMatrix<T,VC,STAR>(this->Grid()) );\n    A_VC_STAR->AlignColsWith(*this);\n    *A_VC_STAR = *A_VR_STAR;\n    delete A_VR_STAR.release(); // lowers memory highwater\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [MR,STAR]\"))\n    std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new DistMatrix<T,VR,STAR>(A) );\n    std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new DistMatrix<T,VC,STAR>(this->Grid()) );\n    A_VC_STAR->AlignColsWith(*this);\n    *A_VC_STAR = *A_VR_STAR;\n    delete A_VR_STAR.release(); // lowers memory highwater\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,MC]\"))\n    std::unique_ptr<DistMatrix<T,MR,MC>> \n        A_MR_MC( new DistMatrix<T,MR,MC>(A) );\n    std::unique_ptr<DistMatrix<T,VR,STAR>> \n        A_VR_STAR( new DistMatrix<T,VR,STAR>(*A_MR_MC) );\n    delete A_MR_MC.release(); // lowers memory highwater\n\n    std::unique_ptr<DistMatrix<T,VC,STAR>> \n        A_VC_STAR( new DistMatrix<T,VC,STAR>(this->Grid()) );\n    A_VC_STAR->AlignColsWith(*this);\n    *A_VC_STAR = *A_VR_STAR;\n    delete A_VR_STAR.release(); // lowers memory highwater\n\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [VC,STAR]\"))\n    A.PartialColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,VC]\"))\n    std::unique_ptr<DistMatrix<T,STAR,VR>> \n        A_STAR_VR( new DistMatrix<T,STAR,VR>(A) );\n    std::unique_ptr<DistMatrix<T,MC,MR>> \n        A_MC_MR( new DistMatrix<T,MC,MR>(this->Grid()) );\n    A_MC_MR->AlignColsWith(*this);\n    *A_MC_MR = *A_STAR_VR;\n    delete A_STAR_VR.release(); // lowers memory highwater\n    *this = *A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [VR,STAR]\"))\n    DistMatrix<T,VC,STAR> A_VC_STAR(this->Grid());\n    A_VC_STAR.AlignColsWith(*this);\n    A_VC_STAR = A;\n    *this = A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,VR]\"))\n    DistMatrix<T,MC,MR> A_MC_MR(this->Grid());\n    A_MC_MR.AlignColsWith(*this);\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MC,STAR] = [CIRC,CIRC]\"))\n    DistMatrix<T,MC,MR> A_MC_MR( this->Grid() );\n    A_MC_MR.AlignWith( *this );\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt DM::ColStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt DM::RowStride() const { return 1; }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return this->grid_->MRSize(); }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  OTHER(T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/MD_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist MD\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [MC,MR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [MC,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,MR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [MR,MC]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [MR,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,MC]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [VC,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,VC]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [VR,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR(A);\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,VR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MD,STAR] = [CIRC,CIRC]\"))\n    DistMatrix<T,MC,MR> A_MC_MR( this->Grid() );\n    A_MC_MR.AlignWith( *this );\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->MDComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return this->grid_->MDPerpComm(); }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return this->grid_->MDComm(); }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt DM::ColStride() const { return this->grid_->LCM(); }\ntemplate<typename T>\nInt DM::RowStride() const { return 1; }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->LCM(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return this->grid_->GCD(); }\ntemplate<typename T>\nInt DM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  OTHER(T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/MR_MC.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist MR\n#define RowDist MC\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"[MR,MC] = [MC,MR]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const elem::Grid& g = this->Grid();\n    this->Resize( A.Height(), A.Width() );\n    if( !this->Participating() )\n        return *this;\n\n    if( A.Width() == 1 )\n    {\n        const Int r = g.Height();\n        const Int c = g.Width();\n        const Int p = g.Size();\n        const Int myRow = g.Row();\n        const Int myCol = g.Col();\n        const Int rankCM = g.VCRank();\n        const Int rankRM = g.VRRank();\n        const Int ownerRow = this->RowAlign();\n        const Int ownerCol = A.RowAlign();\n        const Int colAlign = this->ColAlign();\n        const Int colAlignOfA = A.ColAlign();\n\n        const Int height = A.Height();\n        const Int maxLocalHeight = MaxLength(height,p);\n        const Int portionSize = mpi::Pad( maxLocalHeight );\n\n        const Int colShiftVR = Shift(rankRM,colAlign,p);\n        const Int colShiftVCOfA = Shift(rankCM,colAlignOfA,p);\n        const Int sendRankRM = (rankRM+(p+colShiftVCOfA-colShiftVR)) % p;\n        const Int recvRankCM = (rankCM+(p+colShiftVR-colShiftVCOfA)) % p;\n        const Int recvRankRM = (recvRankCM/r)+c*(recvRankCM%r);\n\n        T* buffer = this->auxMemory_.Require( (r+c)*portionSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[r*portionSize];\n\n        if( myCol == ownerCol )\n        {\n            // Pack\n            const Int AColShift = A.ColShift();\n            const T* ABuf = A.LockedBuffer();\n            ELEM_PARALLEL_FOR\n            for( Int k=0; k<c; ++k )\n            {\n                T* data = &recvBuf[k*portionSize];\n\n                const Int shift = Shift_(myRow+r*k,colAlignOfA,p);\n                const Int offset = (shift-AColShift) / r;\n                const Int thisLocalHeight = Length_(height,shift,p);\n\n                for( Int iLoc=0; iLoc<thisLocalHeight; ++iLoc )\n                    data[iLoc] = ABuf[offset+iLoc*c];\n            }\n        }\n\n        // A[VC,STAR] <- A[MC,MR]\n        mpi::Scatter\n        ( recvBuf, portionSize,\n          sendBuf, portionSize, ownerCol, g.RowComm() );\n\n        // A[VR,STAR] <- A[VC,STAR]\n        mpi::SendRecv\n        ( sendBuf, portionSize, sendRankRM, \n          recvBuf, portionSize, recvRankRM, g.VRComm() );\n\n        // A[MR,MC] <- A[VR,STAR]\n        mpi::Gather\n        ( recvBuf, portionSize,\n          sendBuf, portionSize, ownerRow, g.ColComm() );\n\n        if( myRow == ownerRow )\n        {\n            // Unpack\n            const Int thisColShift = this->ColShift();\n            T* thisBuf = this->Buffer();\n            ELEM_PARALLEL_FOR\n            for( Int k=0; k<r; ++k )\n            {\n                const T* data = &sendBuf[k*portionSize];\n\n                const Int shift = Shift_(myCol+c*k,colAlign,p);\n                const Int offset = (shift-thisColShift) / c;\n                const Int thisLocalHeight = Length_(height,shift,p);\n\n                for( Int iLoc=0; iLoc<thisLocalHeight; ++iLoc )\n                    thisBuf[offset+iLoc*r] = data[iLoc];\n            }\n        }\n\n        this->auxMemory_.Release();\n    }\n    else if( A.Height() == 1 )\n    {\n        const Int r = g.Height();\n        const Int c = g.Width();\n        const Int p = g.Size();\n        const Int myRow = g.Row();\n        const Int myCol = g.Col();\n        const Int rankCM = g.VCRank();\n        const Int rankRM = g.VRRank();\n        const Int ownerCol = this->ColAlign();\n        const Int ownerRow = A.ColAlign();\n        const Int rowAlign = this->RowAlign();\n        const Int rowAlignOfA = A.RowAlign();\n\n        const Int width = A.Width();\n        const Int maxLocalWidth = MaxLength(width,p);\n        const Int portionSize = mpi::Pad( maxLocalWidth );\n\n        const Int rowShiftVC = Shift(rankCM,rowAlign,p);\n        const Int rowShiftVROfA = Shift(rankRM,rowAlignOfA,p);\n        const Int sendRankCM = (rankCM+(p+rowShiftVROfA-rowShiftVC)) % p;\n        const Int recvRankRM = (rankRM+(p+rowShiftVC-rowShiftVROfA)) % p;\n        const Int recvRankCM = (recvRankRM/c)+r*(recvRankRM%c);\n\n        T* buffer = this->auxMemory_.Require( (r+c)*portionSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[c*portionSize];\n\n        if( myRow == ownerRow )\n        {\n            // Pack\n            const Int ARowShift = A.RowShift();\n            const T* ABuf = A.LockedBuffer();\n            const Int ALDim = A.LDim();\n            ELEM_PARALLEL_FOR\n            for( Int k=0; k<r; ++k )\n            {\n                T* data = &recvBuf[k*portionSize];\n\n                const Int shift = Shift_(myCol+c*k,rowAlignOfA,p);\n                const Int offset = (shift-ARowShift) / c;\n                const Int thisLocalWidth = Length_(width,shift,p);\n\n                for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                    data[jLoc] = ABuf[(offset+jLoc*r)*ALDim];\n            }\n        }\n\n        // A[STAR,VR] <- A[MC,MR]\n        mpi::Scatter\n        ( recvBuf, portionSize,\n          sendBuf, portionSize, ownerRow, g.ColComm() );\n\n        // A[STAR,VC] <- A[STAR,VR]\n        mpi::SendRecv\n        ( sendBuf, portionSize, sendRankCM,\n          recvBuf, portionSize, recvRankCM, g.VCComm() );\n\n        // A[MR,MC] <- A[STAR,VC]\n        mpi::Gather\n        ( recvBuf, portionSize,\n          sendBuf, portionSize, ownerCol, g.RowComm() );\n\n        if( myCol == ownerCol )\n        {\n            // Unpack\n            const Int thisRowShift = this->RowShift();\n            T* thisBuf = this->Buffer();\n            const Int thisLDim = this->LDim();\n            ELEM_PARALLEL_FOR\n            for( Int k=0; k<c; ++k )\n            {\n                const T* data = &sendBuf[k*portionSize];\n\n                const Int shift = Shift_(myRow+r*k,rowAlign,p);\n                const Int offset = (shift-thisRowShift) / r;\n                const Int thisLocalWidth = Length_(width,shift,p);\n\n                for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                    thisBuf[(offset+jLoc*c)*thisLDim] = data[jLoc];\n            }\n        }\n        this->auxMemory_.Release();\n    }\n    else\n    {\n        if( A.Height() >= A.Width() )\n        {\n            std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n            ( new DistMatrix<T,VC,STAR>(A) );\n\n            std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n            ( new DistMatrix<T,VR,STAR>(g) );\n            A_VR_STAR->AlignColsWith(*this);\n            *A_VR_STAR = *A_VC_STAR;\n            delete A_VC_STAR.release(); // lowers memory highwater\n\n            *this = *A_VR_STAR;\n        }\n        else\n        {\n            std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n            ( new DistMatrix<T,STAR,VR>(A) );\n\n            std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n            ( new DistMatrix<T,STAR,VC>(g) );\n            A_STAR_VC->AlignRowsWith(*this);\n            *A_STAR_VC = *A_STAR_VR;\n            delete A_STAR_VR.release(); // lowers memory highwater\n\n            *this = *A_STAR_VC;\n        }\n    }\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [MC,STAR]\"))\n    std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new DistMatrix<T,VC,STAR>(A) );\n\n    std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new DistMatrix<T,VR,STAR>(this->Grid()) );\n    A_VR_STAR->AlignColsWith(*this);\n    *A_VR_STAR = *A_VC_STAR;\n    delete A_VC_STAR.release(); // lowers memory highwater\n\n    *this = *A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,MR]\"))\n    std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new DistMatrix<T,STAR,VR>(A) );\n\n    std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new DistMatrix<T,STAR,VC>(this->Grid()) );\n    A_STAR_VC->AlignRowsWith(*this);\n    *A_STAR_VC = *A_STAR_VR;\n    delete A_STAR_VR.release(); // lowers memory highwater\n\n    *this = *A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [MR,STAR]\"))\n    this->RowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,MC]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [VC,STAR]\"))\n    DistMatrix<T,VR,STAR> A_VR_STAR( A );\n    *this = A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,VC]\"))\n    A.PartialRowAllToAll( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [VR,STAR]\"))\n    A.PartialColAllToAll( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,VR]\"))\n    DistMatrix<T,STAR,VC> A_STAR_VC( A );\n    *this = A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,MC] = [STAR,STAR]\"))\n    this->FilterFrom( A );\n    return *this;\n}\n\n// NOTE: This is almost an exact duplicate of [MC,MR] <- [o, o ]\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"[MR,MC] = [CIRC,CIRC]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int colStride = this->ColStride();\n    const Int rowStride = this->RowStride();\n    const Int p = g.Size();\n    this->Resize( m, n );\n\n    const Int colAlign = this->ColAlign();\n    const Int rowAlign = this->RowAlign();\n    const Int mLocal = this->LocalHeight();\n    const Int nLocal = this->LocalWidth();\n    const Int pkgSize = mpi::Pad(MaxLength(m,colStride)*MaxLength(n,rowStride));\n    const Int recvSize = pkgSize;\n    const Int sendSize = p*pkgSize;\n    T* recvBuf=0; // some compilers (falsely) warn otherwise\n    if( A.Participating() )\n    {\n        T* buffer = this->auxMemory_.Require( sendSize + recvSize );\n        T* sendBuf = &buffer[0];\n        recvBuf = &buffer[sendSize];\n\n        // Pack the send buffer\n        const Int ALDim = A.LDim();\n        const T* ABuf = A.LockedBuffer();\n        for( Int t=0; t<rowStride; ++t )\n        {\n            const Int tLocalWidth = Length( n, t, rowStride );\n            // NOTE: switched vs. [MC,MR] variant of [o, o] redist\n            const Int row = (rowAlign+t) % rowStride;\n            for( Int s=0; s<colStride; ++s )\n            {\n                const Int sLocalHeight = Length( m, s, colStride );\n                // NOTE: switched vs. [MC,MR] variant of [o, o] redist\n                const Int col = (colAlign+s) % colStride;\n                const Int q = row + col*colStride;\n                for( Int jLoc=0; jLoc<tLocalWidth; ++jLoc )\n                {\n                    const Int j = t + jLoc*rowStride;\n                    for( Int iLoc=0; iLoc<sLocalHeight; ++iLoc )\n                    {\n                        const Int i = s + iLoc*colStride;\n                        sendBuf[q*pkgSize+iLoc+jLoc*sLocalHeight] =\n                            ABuf[i+j*ALDim];\n                    }\n                }\n            }\n        }\n\n        // Scatter from the root\n        mpi::Scatter\n        ( sendBuf, pkgSize, recvBuf, pkgSize, A.Root(), g.VCComm() );\n    }\n    else if( this->Participating() )\n    {\n        recvBuf = this->auxMemory_.Require( recvSize );\n\n        // Perform the receiving portion of the scatter from the non-root\n        mpi::Scatter\n        ( static_cast<T*>(0), pkgSize, \n          recvBuf,            pkgSize, A.Root(), g.VCComm() );\n    }\n\n    if( this->Participating() )\n    {\n        // Unpack\n        const Int ldim = this->LDim();\n        T* buffer = this->Buffer();\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                buffer[iLoc+jLoc*ldim] = recvBuf[iLoc+jLoc*mLocal];\n        this->auxMemory_.Release();\n    }\n\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->VRComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return this->grid_->MCComm(); }\n\ntemplate<typename T>\nInt DM::ColStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt DM::RowStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->VRSize(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  OTHER(T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/MR_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist MR\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [MC,MR]\"))\n    std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new DistMatrix<T,VC,STAR>(A) );\n\n    std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new DistMatrix<T,VR,STAR>(this->Grid()) );\n    A_VR_STAR->AlignColsWith(*this);\n    *A_VR_STAR = *A_VC_STAR;\n    delete A_VC_STAR.release(); // lowers memory highwater\n\n    *this = *A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"[MR,STAR] = [MC,STAR]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const elem::Grid& g = this->Grid();\n    if( !this->Participating() )\n    {\n        this->Resize( A.Height(), A.Width() );\n        return *this;\n    }\n\n    if( A.Width() == 1 )\n    {\n        this->Resize( A.Height(), 1 );\n        const Int r = g.Height();\n        const Int c = g.Width();\n        const Int p = g.Size();\n        const Int myCol = g.Col();\n        const Int rankCM = g.VCRank();\n        const Int rankRM = g.VRRank();\n        const Int colAlign = this->ColAlign();\n        const Int colShift = this->ColShift();\n        const Int colAlignOfA = A.ColAlign();\n        const Int colShiftOfA = A.ColShift();\n\n        const Int height = this->Height();\n        const Int maxLocalVectorHeight = MaxLength(height,p);\n        const Int portionSize = mpi::Pad( maxLocalVectorHeight );\n\n        const Int colShiftVR = Shift(rankRM,colAlign,p);\n        const Int colShiftVCOfA = Shift(rankCM,colAlignOfA,p);\n        const Int sendRankRM = (rankRM+(p+colShiftVCOfA-colShiftVR)) % p;\n        const Int recvRankCM = (rankCM+(p+colShiftVR-colShiftVCOfA)) % p;\n        const Int recvRankRM = (recvRankCM/r)+c*(recvRankCM%r);\n\n        T* buffer = this->auxMemory_.Require( (r+1)*portionSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[r*portionSize];\n\n        // A[VC,STAR] <- A[MC,STAR]\n        {\n            const Int shift = Shift(rankCM,colAlignOfA,p);\n            const Int offset = (shift-colShiftOfA) / r;\n            const Int thisLocalHeight = Length(height,shift,p);\n\n            const T* ABuffer = A.LockedBuffer();\n            ELEM_PARALLEL_FOR\n            for( Int iLoc=0; iLoc<thisLocalHeight; ++iLoc )\n                sendBuf[iLoc] = ABuffer[offset+iLoc*c];\n        }\n\n        // A[VR,STAR] <- A[VC,STAR]\n        mpi::SendRecv\n        ( sendBuf, portionSize, sendRankRM,\n          recvBuf, portionSize, recvRankRM, g.VRComm() );\n\n        // A[MR,STAR] <- A[VR,STAR]\n        mpi::AllGather\n        ( recvBuf, portionSize,\n          sendBuf, portionSize, g.ColComm() );\n\n        // Unpack\n        T* thisBuffer = this->Buffer();\n        ELEM_PARALLEL_FOR\n        for( Int k=0; k<r; ++k )\n        {\n            const T* data = &sendBuf[k*portionSize];\n            const Int shift = Shift_(myCol+c*k,colAlign,p);\n            const Int offset = (shift-colShift) / c;\n            const Int thisLocalHeight = Length_(height,shift,p);\n            for( Int iLoc=0; iLoc<thisLocalHeight; ++iLoc )\n                thisBuffer[offset+iLoc*r] = data[iLoc];\n        }\n        this->auxMemory_.Release();\n    }\n    else\n    {\n        std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n        ( new DistMatrix<T,VC,STAR>(A) );\n\n        std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n        ( new DistMatrix<T,VR,STAR>(g) );\n        A_VR_STAR->AlignColsWith(*this);\n        *A_VR_STAR = *A_VC_STAR;\n        delete A_VC_STAR.release(); // lowers memory highwater\n\n        *this = *A_VR_STAR;\n    }\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,MR]\"))\n    std::unique_ptr<DistMatrix<T,MC,MR>> A_MC_MR( new DistMatrix<T,MC,MR>(A) );\n\n    std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new DistMatrix<T,VC,STAR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n\n    std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new DistMatrix<T,VR,STAR>(this->Grid()) );\n    A_VR_STAR->AlignColsWith(*this);\n    *A_VR_STAR = *A_VC_STAR;\n    delete A_VC_STAR.release(); // lowers memory highwater\n\n    *this = *A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [MR,MC]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,MC]\"))\n    DistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [VC,STAR]\"))\n    DistMatrix<T,VR,STAR> A_VR_STAR(this->Grid());\n    A_VR_STAR.AlignColsWith(*this);\n    A_VR_STAR = A;\n    *this = A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,VC]\"))\n    DistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [VR,STAR]\"))\n    A.PartialColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,VR]\"))\n    std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new DistMatrix<T,STAR,VC>(A) );\n\n    std::unique_ptr<DistMatrix<T,MR,MC>> A_MR_MC\n    ( new DistMatrix<T,MR,MC>(this->Grid()) );\n    A_MR_MC->AlignColsWith(*this);\n    *A_MR_MC = *A_STAR_VC;\n    delete A_STAR_VC.release(); // lowers memory highwater\n\n    *this = *A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[MR,STAR] = [CIRC,CIRC]\"))\n    DistMatrix<T,MR,MC> A_MR_MC( this->Grid() );\n    A_MR_MC.AlignWith( *this );\n    A_MR_MC = A;\n    *this = A_MR_MC;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt DM::ColStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt DM::RowStride() const { return 1; }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return this->grid_->MCSize(); }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  OTHER(T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/README.md",
    "content": "### `src/core/dist_matrix/`\n\nThis folder contains the source code for the various partial specializations of\nthe `DistMatrix` class; please see `include/elemental/core/dist_matrix/` for the\ncorresponding header-level prototypes and a detailed README explaining the \nvarious data distributions.\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/STAR_MC.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist MC\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [MC,MR]\"))\n    std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new DistMatrix<T,STAR,VR>(A) );\n\n    std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new DistMatrix<T,STAR,VC>(this->Grid()) );\n    A_STAR_VC->AlignRowsWith(*this);\n    *A_STAR_VC = *A_STAR_VR;\n    delete A_STAR_VR.release(); // lowers memory highwater\n\n    *this = *A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [MC,STAR]\"))\n    std::unique_ptr<DistMatrix<T,MC,MR>> A_MC_MR( new DistMatrix<T,MC,MR>(A) );\n\n    std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new DistMatrix<T,STAR,VR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n\n    std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new DistMatrix<T,STAR,VC>(this->Grid()) );\n    A_STAR_VC->AlignRowsWith(*this);\n    *A_STAR_VC = *A_STAR_VR;\n    delete A_STAR_VR.release(); // lowers memory highwater\n\n    *this = *A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"[STAR,MC] = [STAR,MR]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const elem::Grid& g = this->Grid();\n    if( A.Height() == 1 )\n    {\n        this->Resize( 1, A.Width() );\n        if( !this->Participating() )\n            return *this;\n\n        const Int r = g.Height();\n        const Int c = g.Width();\n        const Int p = g.Size();\n        const Int myRow = g.Row();\n        const Int rankCM = g.VCRank();\n        const Int rankRM = g.VRRank();\n        const Int rowAlign = this->RowAlign();\n        const Int rowShift = this->RowShift();\n        const Int rowAlignOfA = A.RowAlign();\n        const Int rowShiftOfA = A.RowShift();\n\n        const Int width = this->Width();\n        const Int maxLocalVectorWidth = MaxLength(width,p);\n        const Int portionSize = mpi::Pad( maxLocalVectorWidth );\n\n        const Int rowShiftVC = Shift(rankCM,rowAlign,p);\n        const Int rowShiftVROfA = Shift(rankRM,rowAlignOfA,p);\n        const Int sendRankCM = (rankCM+(p+rowShiftVROfA-rowShiftVC)) % p;\n        const Int recvRankRM = (rankRM+(p+rowShiftVC-rowShiftVROfA)) % p;\n        const Int recvRankCM = (recvRankRM/c)+r*(recvRankRM%c);\n\n        T* buffer = this->auxMemory_.Require( (c+1)*portionSize );\n        T* sendBuf = &buffer[0];\n        T* recvBuf = &buffer[c*portionSize];\n\n        // A[STAR,VR] <- A[STAR,MR]\n        {\n            const Int shift = Shift(rankRM,rowAlignOfA,p);\n            const Int offset = (shift-rowShiftOfA) / c;\n            const Int thisLocalWidth = Length(width,shift,p);\n\n            const T* ABuf = A.LockedBuffer();\n            const Int ALDim = A.LDim();\n            ELEM_PARALLEL_FOR\n            for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                sendBuf[jLoc] = ABuf[(offset+jLoc*r)*ALDim];\n        }\n\n        // A[STAR,VC] <- A[STAR,VR]\n        mpi::SendRecv\n        ( sendBuf, portionSize, sendRankCM,\n          recvBuf, portionSize, recvRankCM, g.VCComm() );\n\n        // A[STAR,MC] <- A[STAR,VC]\n        mpi::AllGather\n        ( recvBuf, portionSize,\n          sendBuf, portionSize, g.RowComm() );\n\n        // Unpack\n        T* thisBuf = this->Buffer();\n        const Int thisLDim = this->LDim();\n        ELEM_PARALLEL_FOR\n        for( Int k=0; k<c; ++k )\n        {\n            const T* data = &sendBuf[k*portionSize];\n            const Int shift = Shift_(myRow+r*k,rowAlign,p);\n            const Int offset = (shift-rowShift) / r;\n            const Int thisLocalWidth = Length_(width,shift,p);\n            for( Int jLoc=0; jLoc<thisLocalWidth; ++jLoc )\n                thisBuf[(offset+jLoc*c)*thisLDim] = data[jLoc];\n        }\n        this->auxMemory_.Release();\n    }\n    else\n    {\n        std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n        ( new DistMatrix<T,STAR,VR>(A) );\n\n        std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n        ( new DistMatrix<T,STAR,VC>(g) );\n        A_STAR_VC->AlignRowsWith(*this);\n        *A_STAR_VC = *A_STAR_VR;\n        delete A_STAR_VR.release(); // lowers memory highwater\n\n        *this = *A_STAR_VC;\n    }\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [MR,MC]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [MR,STAR]\"))\n    DistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [VC,STAR]\"))\n    std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new DistMatrix<T,VR,STAR>(A) );\n\n    std::unique_ptr<DistMatrix<T,MR,MC>> A_MR_MC\n    ( new DistMatrix<T,MR,MC>(this->Grid()) );\n    A_MR_MC->AlignRowsWith(*this);\n    *A_MR_MC = *A_VR_STAR;\n    delete A_VR_STAR.release();\n\n    *this = *A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [STAR,VC]\"))\n    A.PartialRowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [VR,STAR]\"))\n    DistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [STAR,VR]\"))\n    DistMatrix<T,STAR,VC> A_STAR_VC(this->Grid());\n    A_STAR_VC.AlignRowsWith(*this);\n    *this = A_STAR_VC = A;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [STAR,STAR]\"))\n    this->RowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MC] = [CIRC,CIRC]\"))\n    DistMatrix<T,MR,MC> A_MR_MC( A.Grid() );\n    A_MR_MC.AlignWith( *this );\n    A_MR_MC = A;\n    *this = A_MR_MC;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return this->grid_->MCComm(); }\n\ntemplate<typename T>\nInt DM::ColStride() const { return 1; }\ntemplate<typename T>\nInt DM::RowStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return this->grid_->MRSize(); }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  OTHER(T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/STAR_MD.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist MD\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [MC,MR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [MC,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,MR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [MR,MC]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [MR,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,MC]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [VC,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,VC]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [VR,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,VR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [STAR,STAR]\"))\n    this->RowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MD] = [CIRC,CIRC]\"))\n    DistMatrix<T,MC,MR> A_MC_MR( A.Grid() );\n    A_MC_MR.AlignWith( *this );\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->MDComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return this->grid_->MDPerpComm(); }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return this->grid_->MDComm(); }\n\ntemplate<typename T>\nInt DM::ColStride() const { return 1; }\ntemplate<typename T>\nInt DM::RowStride() const { return this->grid_->LCM(); }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->LCM(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return this->grid_->GCD(); }\ntemplate<typename T>\nInt DM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  OTHER(T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/STAR_MR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist MR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [MC,MR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [MC,STAR]\"))\n    DistMatrix<T,MC,MR> A_MC_MR(this->Grid());\n    A_MC_MR.AlignRowsWith(*this);\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [MD,STAR]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,MD]\"))\n    // TODO: More efficient implementation?\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [MR,MC]\"))\n    std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new DistMatrix<T,STAR,VC>(A) );\n\n    std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new DistMatrix<T,STAR,VR>(this->Grid()) );\n    A_STAR_VR->AlignRowsWith(*this);\n    *A_STAR_VR = *A_STAR_VC;\n    delete A_STAR_VC.release(); // lowers memory highwater\n\n    *this = *A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [MR,STAR]\"))\n    std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new DistMatrix<T,VR,STAR>(A) );\n\n    std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new DistMatrix<T,VC,STAR>(*A_VR_STAR) );\n    delete A_VR_STAR.release(); // lowers memory highwater\n\n    std::unique_ptr<DistMatrix<T,MC,MR>> A_MC_MR\n    ( new DistMatrix<T,MC,MR>(this->Grid()) );\n    A_MC_MR->AlignRowsWith(*this);\n    *A_MC_MR = *A_VC_STAR;\n    delete A_VC_STAR.release(); // lowers memory highwater\n\n    *this = *A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,MC]\"))\n    std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new DistMatrix<T,STAR,VC>(A) );\n\n    std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new DistMatrix<T,STAR,VR>(this->Grid()) );\n    A_STAR_VR->AlignRowsWith(*this);\n    *A_STAR_VR = *A_STAR_VC;\n    delete A_STAR_VC.release(); // lowers memory highwater\n\n    std::unique_ptr<DistMatrix<T,MC,MR>> A_MC_MR\n    ( new DistMatrix<T,MC,MR>(*A_STAR_VR) );\n    delete A_STAR_VR.release(); // lowers memory highwater\n\n    *this = *A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [VC,STAR]\"))\n    DistMatrix<T,MC,MR> A_MC_MR(this->Grid());\n    A_MC_MR.AlignRowsWith(*this);\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,VC]\"))\n    DistMatrix<T,STAR,VR> A_STAR_VR(this->Grid());\n    A_STAR_VR.AlignRowsWith(*this);\n    A_STAR_VR = A;\n    *this = A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [VR,STAR]\"))\n    std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR\n    ( new DistMatrix<T,VC,STAR>(A) );\n\n    std::unique_ptr<DistMatrix<T,MC,MR>> A_MC_MR\n    ( new DistMatrix<T,MC,MR>(this->Grid()) );\n    A_MC_MR->AlignRowsWith(*this);\n    *A_MC_MR = *A_VC_STAR;\n    delete A_VC_STAR.release(); // lowers memory highwater\n\n    *this = *A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,VR]\"))\n    A.PartialRowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [STAR,STAR]\"))\n    this->RowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,MR] = [CIRC,CIRC]\"))\n    DistMatrix<T,MC,MR> A_MC_MR( A );\n    A_MC_MR.AlignWith( *this );\n    A_MC_MR = A;\n    *this = A_MC_MR;\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return this->grid_->MRComm(); }\n\ntemplate<typename T>\nInt DM::ColStride() const { return 1; }\ntemplate<typename T>\nInt DM::RowStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return this->grid_->MCSize(); }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  OTHER(T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/STAR_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,STAR]\"))\n    this->Resize( A.Height(), A.Width() );\n    if( this->Grid() == A.Grid() )\n    {\n        this->matrix_ = A.LockedMatrix();\n    }\n    else\n    {\n        // TODO: Remember why I wrote this...\n        if( !mpi::Congruent\n             ( A.Grid().ViewingComm(), this->Grid().ViewingComm() ) )\n            LogicError\n            (\"Redistributing between nonmatching grids currently requires\"\n             \" the viewing communicators to match.\");\n\n        // Compute and allocate the amount of required memory\n        Int requiredMemory = 0;\n        if( A.Grid().VCRank() == 0 )\n            requiredMemory += A.Height()*A.Width();\n        if( this->Participating() )\n            requiredMemory += A.Height()*A.Width();\n        T* buffer = this->auxMemory_.Require( requiredMemory );\n        Int offset = 0;\n        T* sendBuf = &buffer[offset];\n        if( A.Grid().VCRank() == 0 )\n            offset += A.Height()*A.Width();\n        T* bcastBuffer = &buffer[offset];\n\n        // Send from the root of A to the root of this matrix's grid\n        mpi::Request sendRequest;\n        if( A.Grid().VCRank() == 0 )\n        {\n            for( Int j=0; j<A.Width(); ++j )\n                for( Int i=0; i<A.Height(); ++i )\n                    sendBuf[i+j*A.Height()] = A.GetLocal(i,j);\n            const Int recvViewingRank = this->Grid().VCToViewingMap(0);\n            mpi::ISend\n            ( sendBuf, A.Height()*A.Width(), recvViewingRank,\n              this->Grid().ViewingComm(), sendRequest );\n        }\n\n        // Receive on the root of this matrix's grid and then broadcast\n        // over this matrix's owning communicator\n        if( this->Participating() )\n        {\n            if( this->Grid().VCRank() == 0 )\n            {\n                const Int sendViewingRank = A.Grid().VCToViewingMap(0);\n                mpi::Recv\n                ( bcastBuffer, A.Height()*A.Width(), sendViewingRank,\n                  this->Grid().ViewingComm() );\n            }\n\n            mpi::Broadcast\n            ( bcastBuffer, A.Height()*A.Width(), 0, this->Grid().VCComm() );\n\n            for( Int j=0; j<A.Width(); ++j )\n                for( Int i=0; i<A.Height(); ++i )\n                    this->SetLocal(i,j,bcastBuffer[i+j*A.Height()]);\n        }\n\n        if( A.Grid().VCRank() == 0 )\n            mpi::Wait( sendRequest );\n        this->auxMemory_.Release();\n    }\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [MC,MR]\"))\n    A.AllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [MC,STAR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,MR]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [MD,STAR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,MD]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [MR,MC]\"))\n    A.AllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [MR,STAR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,MC]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [VC,STAR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,VC]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [VR,STAR]\"))\n    A.ColAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [STAR,VR]\"))\n    A.RowAllGather( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,STAR] = [CIRC,CIRC]\"))\n    const Grid& g = A.Grid();\n    const Int m = A.Height(); \n    const Int n = A.Width();\n    this->Resize( A.Height(), A.Width() );\n\n    if( this->Participating() )\n    {\n        const Int pkgSize = mpi::Pad( m*n );\n        T* commBuffer = this->auxMemory_.Require( pkgSize );\n\n        if( A.Participating() )\n        {\n            // Pack            \n            const Int ALDim = A.LDim();\n            const T* ABuf = A.LockedBuffer();\n            for( Int j=0; j<n; ++j )\n                for( Int i=0; i<m; ++i )\n                    commBuffer[i+j*m] = ABuf[i+j*ALDim];\n        }\n\n        // Broadcast from the process that packed\n        mpi::Broadcast( commBuffer, pkgSize, A.Root(), g.VCComm() );\n\n        // Unpack\n        T* buffer = this->Buffer();\n        const Int ldim = this->LDim();\n        for( Int j=0; j<n; ++j )\n            for( Int i=0; i<m; ++i )\n                buffer[i+j*ldim] = commBuffer[i+j*m];        \n    }\n\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return mpi::COMM_SELF; }\n\ntemplate<typename T>\nInt DM::ColStride() const { return 1; }\ntemplate<typename T>\nInt DM::RowStride() const { return 1; }\ntemplate<typename T>\nInt DM::DistSize() const { return 1; }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return this->grid_->VCSize(); }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  OTHER(T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/STAR_VC.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist VC\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [MC,MR]\"))\n    DistMatrix<T,STAR,VR> A_STAR_VR( A );\n    *this = A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [MC,STAR]\"))\n    std::unique_ptr<DistMatrix<T,MC,MR>> A_MC_MR( new DistMatrix<T,MC,MR>(A) );\n    std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new DistMatrix<T,STAR,VR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n    *this = *A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [STAR,MR]\"))\n    DistMatrix<T,STAR,VR> A_STAR_VR( A );\n    *this = A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [MD,STAR]\"))\n    // TODO: Optimize this later if important\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [STAR,MD]\"))\n    // TODO: Optimize this later if important\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [MR,MC]\"))\n    this->PartialRowAllToAllFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [MR,STAR]\"))\n    DistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [STAR,MC]\"))\n    this->PartialRowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [VC,STAR]\"))\n    std::unique_ptr<DistMatrix<T,MC,MR>> A_MC_MR( new DistMatrix<T,MC,MR>(A) );\n    std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR\n    ( new DistMatrix<T,STAR,VR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n    *this = *A_STAR_VR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [VR,STAR]\"))\n    DistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"[STAR,VC] = [STAR,VR]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Grid& g = this->Grid();\n    this->Resize( A.Height(), A.Width() );\n    if( !this->Participating() )\n        return *this;\n    \n    const Int height = this->Height();\n    const Int localWidth = this->LocalWidth();\n    const Int localWidthOfA = A.LocalWidth();\n    \n    const Int sendSize = height * localWidthOfA;\n    const Int recvSize = height * localWidth;\n\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int p = g.Size();\n    const Int rankCM = g.VCRank();\n    const Int rankRM = g.VRRank(); \n\n    const Int rowShift = this->RowShift();\n    const Int rowShiftOfA = A.RowShift();\n\n    // Compute which colmajor rank has the rowShift equal to our rowShiftOfA\n    const Int sendRankCM = (rankCM+(p+rowShiftOfA-rowShift)) % p;\n\n    // Compute which colmajor rank has the A rowShift that we need\n    const Int recvRankRM = (rankRM+(p+rowShift-rowShiftOfA)) % p;\n    const Int recvRankCM = (recvRankRM/c)+r*(recvRankRM%c);\n\n    T* buffer = this->auxMemory_.Require( sendSize + recvSize );\n    T* sendBuf = &buffer[0];\n    T* recvBuf = &buffer[sendSize];\n\n    // Pack\n    const T* ABuf = A.LockedBuffer();\n    const Int ALDim = A.LDim();\n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<localWidthOfA; ++jLoc )\n    {\n        const T* ACol = &ABuf[jLoc*ALDim];\n        T* sendBufCol = &sendBuf[jLoc*height];\n        MemCopy( sendBufCol, ACol, height );\n    }\n\n    // Communicate\n    mpi::SendRecv\n    ( sendBuf, sendSize, sendRankCM, \n      recvBuf, recvSize, recvRankCM, g.VCComm() );\n\n    // Unpack\n    T* thisBuf = this->Buffer();\n    const Int thisLDim = this->LDim();\n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const T* recvBufCol = &recvBuf[jLoc*height];\n        T* thisCol = &thisBuf[jLoc*thisLDim];\n        MemCopy( thisCol, recvBufCol, height );\n    }\n    this->auxMemory_.Release();\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VC] = [STAR,STAR]\"))\n    this->RowFilterFrom( A );\n    return *this;\n}\n\n// NOTE: This is a small modification of [MC,MR] <- [CIRC,CIRC]\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"[VC,STAR] = [CIRC,CIRC]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int p = g.Size();\n    this->Resize( m, n );\n\n    const Int rowAlign = this->RowAlign();\n    const Int nLocal = this->LocalWidth();\n    const Int pkgSize = mpi::Pad(m*MaxLength(n,p));\n    const Int recvSize = pkgSize;\n    const Int sendSize = p*pkgSize;\n    T* recvBuf=0; // some compilers (falsely) warn otherwise\n    if( A.Participating() )\n    {\n        T* buffer = this->auxMemory_.Require( sendSize + recvSize );\n        T* sendBuf = &buffer[0];\n        recvBuf = &buffer[sendSize];\n\n        // Pack the send buffer\n        const Int ALDim = A.LDim();\n        const T* ABuf = A.LockedBuffer();\n        for( Int t=0; t<p; ++t )\n        {\n            const Int tLocalWidth = Length( n, t, p );\n            const Int q = (rowAlign+t) % p;\n            for( Int jLoc=0; jLoc<tLocalWidth; ++jLoc )\n            {\n                const Int j = t + jLoc*p;\n                for( Int i=0; i<m; ++i )\n                    sendBuf[q*pkgSize+i+jLoc*m] = ABuf[i+j*ALDim];\n            }\n        }\n\n        // Scatter from the root\n        mpi::Scatter\n        ( sendBuf, pkgSize, recvBuf, pkgSize, A.Root(), g.VCComm() );\n    }\n    else if( this->Participating() )\n    {\n        recvBuf = this->auxMemory_.Require( recvSize );\n\n        // Perform the receiving portion of the scatter from the non-root\n        mpi::Scatter\n        ( static_cast<T*>(0), pkgSize, \n          recvBuf,            pkgSize, A.Root(), g.VCComm() );\n    }\n\n    if( this->Participating() )\n    {\n        // Unpack\n        const Int ldim = this->LDim();\n        T* buffer = this->Buffer();\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            for( Int i=0; i<m; ++i )\n                buffer[i+jLoc*ldim] = recvBuf[i+jLoc*m];\n        this->auxMemory_.Release();\n    }\n\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm DM::PartialRowComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm DM::PartialUnionRowComm() const { return this->grid_->MRComm(); }\n\ntemplate<typename T>\nInt DM::ColStride() const { return 1; }\ntemplate<typename T>\nInt DM::RowStride() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt DM::PartialRowStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt DM::PartialUnionRowStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  OTHER(T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/STAR_VR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist STAR\n#define RowDist VR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [MC,MR]\"))\n    this->PartialRowAllToAllFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [MC,STAR]\"))\n    DistMatrix<T,MC,MR> A_MC_MR( A );\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [STAR,MR]\"))\n    this->PartialRowFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [MD,STAR]\"))\n    // TODO: Optimize this later if important\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [STAR,MD]\"))\n    // TODO: Optimize this later if important\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [MR,MC]\"))\n    DistMatrix<T,STAR,VC> A_STAR_VC( A );\n    *this = A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [MR,STAR]\"))\n    std::unique_ptr<DistMatrix<T,MR,MC>> A_MR_MC( new DistMatrix<T,MR,MC>(A) );\n    std::unique_ptr<DistMatrix<T,STAR,VC>> \n        A_STAR_VC( new DistMatrix<T,STAR,VC>(*A_MR_MC) );\n    delete A_MR_MC.release(); // lowers memory highwater\n    *this = *A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [STAR,MC]\"))\n    DistMatrix<T,STAR,VC> A_STAR_VC( A );\n    *this = A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [VC,STAR]\"))\n    DistMatrix<T,MC,MR> A_MC_MR( A );\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"[STAR,VR] = [STAR,VC]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const elem::Grid& g = this->Grid();\n    this->Resize( A.Height(), A.Width() );\n    if( !this->Participating() )\n        return *this;\n    \n    const Int height = this->Height();\n    const Int localWidth = this->LocalWidth();\n    const Int localWidthOfA = A.LocalWidth();\n\n    const Int sendSize = height * localWidthOfA;\n    const Int recvSize = height * localWidth;\n\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int p = g.Size();\n    const Int rankCM = g.VCRank();\n    const Int rankRM = g.VRRank();\n\n    const Int rowShift = this->RowShift();\n    const Int rowShiftOfA = A.RowShift();\n\n    // Compute which rowmajor rank has the rowShift equal to our rowShiftOfA\n    const Int sendRankRM = (rankRM+(p+rowShiftOfA-rowShift)) % p;\n\n    // Compute which rowmajor rank has the A rowShift that we need\n    const Int recvRankCM = (rankCM+(p+rowShift-rowShiftOfA)) % p;\n    const Int recvRankRM = (recvRankCM/r)+c*(recvRankCM%r);\n\n    T* buffer = this->auxMemory_.Require( sendSize + recvSize );\n    T* sendBuf = &buffer[0];\n    T* recvBuf = &buffer[sendSize];\n\n    // Pack\n    const T* ABuf = A.LockedBuffer();\n    const Int ALDim = A.LDim();\n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<localWidthOfA; ++jLoc )\n    {\n        const T* ACol = &ABuf[jLoc*ALDim];\n        T* sendBufCol = &sendBuf[jLoc*height];\n        MemCopy( sendBufCol, ACol, height );\n    }\n\n    // Communicate\n    mpi::SendRecv\n    ( sendBuf, sendSize, sendRankRM, \n      recvBuf, recvSize, recvRankRM, g.VRComm() );\n\n    // Unpack\n    T* thisBuf = this->Buffer();\n    const Int thisLDim = this->LDim();\n    ELEM_PARALLEL_FOR\n    for( Int jLoc=0; jLoc<localWidth; ++jLoc )\n    {\n        const T* recvBufCol = &recvBuf[jLoc*height];\n        T* thisCol = &thisBuf[jLoc*thisLDim];\n        MemCopy( thisCol, recvBufCol, height );\n    }\n    this->auxMemory_.Release();\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [VR,STAR]\"))\n    std::unique_ptr<DistMatrix<T,MR,MC>> A_MR_MC( new DistMatrix<T,MR,MC>(A) );\n    std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC\n    ( new DistMatrix<T,STAR,VC>(*A_MR_MC) );\n    delete A_MR_MC.release(); // lowers memory highwater\n    *this = *A_STAR_VC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[STAR,VR] = [STAR,STAR]\"))\n    this->RowFilterFrom( A );\n    return *this;\n}\n\n// NOTE: This is a small modification of [MC,MR] <- [CIRC,CIRC]\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"[VR,STAR] = [CIRC,CIRC]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int p = g.Size();\n    this->Resize( m, n );\n\n    // Convert A's root from its VC communicator to VR\n    const Int rootRow = A.Root() % g.Height();\n    const Int rootCol = A.Root() / g.Height();\n    const Int rootVR = rootCol + rootRow*g.Width();\n\n    const Int rowAlign = this->RowAlign();\n    const Int nLocal = this->LocalWidth();\n    const Int pkgSize = mpi::Pad(m*MaxLength(n,p));\n    const Int recvSize = pkgSize;\n    const Int sendSize = p*pkgSize;\n    T* recvBuf=0; // some compilers (falsely) warn otherwise\n    if( A.Participating() )\n    {\n        T* buffer = this->auxMemory_.Require( sendSize + recvSize );\n        T* sendBuf = &buffer[0];\n        recvBuf = &buffer[sendSize];\n\n        // Pack the send buffer\n        const Int ALDim = A.LDim();\n        const T* ABuf = A.LockedBuffer();\n        for( Int t=0; t<p; ++t )\n        {\n            const Int tLocalWidth = Length( n, t, p );\n            const Int q = (rowAlign+t) % p;\n            for( Int jLoc=0; jLoc<tLocalWidth; ++jLoc )\n            {\n                const Int j = t + jLoc*p;\n                for( Int i=0; i<m; ++i )\n                    sendBuf[q*pkgSize+i+jLoc*m] = ABuf[i+j*ALDim];\n            }\n        }\n\n        // Scatter from the root\n        mpi::Scatter\n        ( sendBuf, pkgSize, recvBuf, pkgSize, rootVR, g.VRComm() );\n    }\n    else if( this->Participating() )\n    {\n        recvBuf = this->auxMemory_.Require( recvSize );\n\n        // Perform the receiving portion of the scatter from the non-root\n        mpi::Scatter\n        ( static_cast<T*>(0), pkgSize, \n          recvBuf,            pkgSize, rootVR, g.VRComm() );\n    }\n\n    if( this->Participating() )\n    {\n        // Unpack\n        const Int ldim = this->LDim();\n        T* buffer = this->Buffer();\n        for( Int jLoc=0; jLoc<nLocal; ++jLoc )\n            for( Int i=0; i<m; ++i )\n                buffer[i+jLoc*ldim] = recvBuf[i+jLoc*m];\n        this->auxMemory_.Release();\n    }\n\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->VRComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return this->grid_->VRComm(); }\ntemplate<typename T>\nmpi::Comm DM::PartialRowComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm DM::PartialUnionRowComm() const { return this->grid_->MCComm(); }\n\ntemplate<typename T>\nInt DM::ColStride() const { return 1; }\ntemplate<typename T>\nInt DM::RowStride() const { return this->grid_->VRSize(); }\ntemplate<typename T>\nInt DM::PartialRowStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt DM::PartialUnionRowStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->VRSize(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  OTHER(T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/VC_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist VC\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [MC,MR]\"))\n    this->PartialColAllToAllFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [MC,STAR]\"))\n    this->PartialColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,MR]\"))\n    DistMatrix<T,MC,MR> A_MC_MR( A );\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [MD,STAR]\"))\n    // TODO: Optimize this later if important\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,MD]\"))\n    // TODO: Optimize this later if important\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [MR,MC]\"))\n    DistMatrix<T,VR,STAR> A_VR_STAR( A );\n    *this = A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [MR,STAR]\"))\n    DistMatrix<T,VR,STAR> A_VR_STAR( A );\n    *this = A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,MC]\"))\n    std::unique_ptr<DistMatrix<T,MR,MC>> A_MR_MC( new DistMatrix<T,MR,MC>(A) );\n    std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR\n    ( new DistMatrix<T,VR,STAR>(*A_MR_MC) );\n    delete A_MR_MC.release(); // lowers memory highwater\n    *this = *A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,VC]\"))\n    std::unique_ptr<DistMatrix<T,MR,MC>> A_MR_MC( new DistMatrix<T,MR,MC>(A) );\n    std::unique_ptr<DistMatrix<T,VR,STAR>> \n        A_VR_STAR( new DistMatrix<T,VR,STAR>(*A_MR_MC) );\n    delete A_MR_MC.release(); // lowers memory highwater\n    *this = *A_VR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VR,STAR>& A )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"[VC,STAR] = [VR,STAR]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Grid& g = this->Grid();\n    this->Resize( A.Height(), A.Width() );\n    if( !this->Participating() )\n        return *this;\n    \n    const Int width = this->Width();\n    const Int localHeight = this->LocalHeight();\n    const Int localHeightOfA = A.LocalHeight();\n\n    const Int sendSize = localHeightOfA * width;\n    const Int recvSize = localHeight * width;\n\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int p = g.Size();\n    const Int rankCM = g.VCRank();\n    const Int rankRM = g.VRRank();\n\n    const Int colShift = this->ColShift();\n    const Int colShiftOfA = A.ColShift();\n\n    // Compute which colmajor rank has the colShift equal to our colShiftOfA\n    const Int sendRankCM = (rankCM+(p+colShiftOfA-colShift)) % p;\n\n    // Compute which colmajor rank has the A colShift that we need\n    const Int recvRankRM = (rankRM+(p+colShift-colShiftOfA)) % p;\n    const Int recvRankCM = (recvRankRM/c)+r*(recvRankRM%c);\n\n    T* buffer = this->auxMemory_.Require( sendSize + recvSize );\n    T* sendBuf = &buffer[0];\n    T* recvBuf = &buffer[sendSize];\n\n    // Pack\n    const Int ALDim = A.LDim();\n    const T* ABuf = A.LockedBuffer();\n    ELEM_PARALLEL_FOR\n    for( Int j=0; j<width; ++j )\n    {\n        const T* ACol = &ABuf[j*ALDim];\n        T* sendBufCol = &sendBuf[j*localHeightOfA];\n        MemCopy( sendBufCol, ACol, localHeightOfA );\n    }\n\n    // Communicate\n    mpi::SendRecv\n    ( sendBuf, sendSize, sendRankCM,\n      recvBuf, recvSize, recvRankCM, g.VCComm() );\n\n    // Unpack\n    T* thisBuf = this->Buffer();\n    const Int thisLDim = this->LDim();\n    ELEM_PARALLEL_FOR\n    for( Int j=0; j<width; ++j )\n    {\n        const T* recvBufCol = &recvBuf[j*localHeight];\n        T* thisCol = &thisBuf[j*thisLDim];\n        MemCopy( thisCol, recvBufCol, localHeight );\n    }\n\n    this->auxMemory_.Release();\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,VR]\"))\n    DistMatrix<T,MC,MR> A_MC_MR( A );\n    *this = A_MC_MR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VC,STAR] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\n// NOTE: This is a small modification of [MC,MR] <- [CIRC,CIRC]\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"[VC,STAR] = [CIRC,CIRC]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int p = g.Size();\n    this->Resize( m, n );\n\n    const Int colAlign = this->ColAlign();\n    const Int mLocal = this->LocalHeight();\n    const Int pkgSize = mpi::Pad(MaxLength(m,p)*n);\n    const Int recvSize = pkgSize;\n    const Int sendSize = p*pkgSize;\n    T* recvBuf=0; // some compilers (falsely) warn otherwise\n    if( A.Participating() )\n    {\n        T* buffer = this->auxMemory_.Require( sendSize + recvSize );\n        T* sendBuf = &buffer[0];\n        recvBuf = &buffer[sendSize];\n\n        // Pack the send buffer\n        const Int ALDim = A.LDim();\n        const T* ABuf = A.LockedBuffer();\n        for( Int s=0; s<p; ++s )\n        {\n            const Int sLocalHeight = Length( m, s, p );\n            const Int q = (colAlign+s) % p;\n            for( Int j=0; j<n; ++j )\n            {\n                for( Int iLoc=0; iLoc<sLocalHeight; ++iLoc )\n                {\n                    const Int i = s + iLoc*p;\n                    sendBuf[q*pkgSize+iLoc+j*sLocalHeight] =\n                        ABuf[i+j*ALDim];\n                }\n            }\n        }\n\n        // Scatter from the root\n        mpi::Scatter\n        ( sendBuf, pkgSize, recvBuf, pkgSize, A.Root(), g.VCComm() );\n    }\n    else if( this->Participating() )\n    {\n        recvBuf = this->auxMemory_.Require( recvSize );\n\n        // Perform the receiving portion of the scatter from the non-root\n        mpi::Scatter\n        ( static_cast<T*>(0), pkgSize, \n          recvBuf,            pkgSize, A.Root(), g.VCComm() );\n    }\n\n    if( this->Participating() )\n    {\n        // Unpack\n        const Int ldim = this->LDim();\n        T* buffer = this->Buffer();\n        for( Int j=0; j<n; ++j )\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                buffer[iLoc+j*ldim] = recvBuf[iLoc+j*mLocal];\n        this->auxMemory_.Release();\n    }\n\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return this->grid_->VCComm(); }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::PartialColComm() const { return this->grid_->MCComm(); }\ntemplate<typename T>\nmpi::Comm DM::PartialUnionColComm() const { return this->grid_->MRComm(); }\n\ntemplate<typename T>\nInt DM::ColStride() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt DM::RowStride() const { return 1; }\ntemplate<typename T>\nInt DM::PartialColStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt DM::PartialUnionColStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->VCSize(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  OTHER(T,VC,  STAR); \\\n  BOTH( T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/VR_STAR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#define ColDist VR\n#define RowDist STAR\n\n#include \"./setup.hpp\"\n\nnamespace elem {\n\n// Public section\n// ##############\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nDM&\nDM::operator=( const DM& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM[U,V] = DM[U,V]\"))\n    A.Translate( *this );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [MC,MR]\"))\n    DistMatrix<T,VC,STAR> A_VC_STAR( A );\n    *this = A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MC,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [MC,STAR]\"))\n    DistMatrix<T,VC,STAR> A_VC_STAR( A );\n    *this = A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,MR]\"))\n    std::unique_ptr<DistMatrix<T,MC,MR>> A_MC_MR( new DistMatrix<T,MC,MR>(A) );\n    std::unique_ptr<DistMatrix<T,VC,STAR>> \n        A_VC_STAR( new DistMatrix<T,VC,STAR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MD,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [MD,STAR]\"))\n    // TODO: Optimize this later if important\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MD>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,MD]\"))\n    // TODO: Optimize this later if important\n    DistMatrix<T,STAR,STAR> A_STAR_STAR( A );\n    *this = A_STAR_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [MR,MC]\"))\n    this->PartialColAllToAllFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,MR,STAR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [MR,STAR]\"))\n    this->PartialColFilterFrom( A );\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,MC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,MC]\"))\n    DistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,VC,STAR>& A )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"[VR,STAR] = [VC,STAR]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const elem::Grid& g = this->Grid();\n    this->Resize( A.Height(), A.Width() );\n    if( !this->Participating() )\n        return *this;\n\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int p = g.Size();\n    const Int rankCM = g.VCRank();\n    const Int rankRM = g.VRRank();\n\n    const Int height = this->Height();\n    const Int width = this->Width();\n    const Int localHeight = this->LocalHeight();\n    const Int localHeightOfA = A.LocalHeight();\n    const Int maxLocalHeight = MaxLength(height,p);\n\n    const Int portionSize = maxLocalHeight * width;\n\n    const Int colShift = this->ColShift();\n    const Int colShiftOfA = A.ColShift();\n\n    // Compute which rowmajor rank has the colShift equal to our colShiftOfA\n    const Int sendRankRM = (rankRM+(p+colShiftOfA-colShift)) % p;\n\n    // Compute which rowmajor rank has the A colShift that we need\n    const Int recvRankCM = (rankCM+(p+colShift-colShiftOfA)) % p;\n    const Int recvRankRM = (recvRankCM/r)+c*(recvRankCM%r);\n\n    T* buffer = this->auxMemory_.Require( 2*portionSize );\n    T* sendBuf = &buffer[0];\n    T* recvBuf = &buffer[portionSize];\n\n    // Pack\n    const Int ALDim = A.LDim();\n    const T* ABuf = A.LockedBuffer();\n    ELEM_PARALLEL_FOR\n    for( Int j=0; j<width; ++j )\n    {\n        const T* ACol = &ABuf[j*ALDim];\n        T* sendBufCol = &sendBuf[j*localHeightOfA];\n        MemCopy( sendBufCol, ACol, localHeightOfA );\n    }\n\n    // Communicate\n    mpi::SendRecv\n    ( sendBuf, portionSize, sendRankRM, \n      recvBuf, portionSize, recvRankRM, g.VRComm() );\n\n    // Unpack\n    T* thisBuf = this->Buffer();\n    const Int thisLDim = this->LDim();\n    ELEM_PARALLEL_FOR\n    for( Int j=0; j<width; ++j )\n    {\n        const T* recvBufCol = &recvBuf[j*localHeight];\n        T* thisCol = &thisBuf[j*thisLDim];\n        MemCopy( thisCol, recvBufCol, localHeight );\n    }\n    this->auxMemory_.Release();\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VC>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,VC]\"))\n    DistMatrix<T,MR,MC> A_MR_MC( A );\n    *this = A_MR_MC;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,VR>& A )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,VR]\"))\n    std::unique_ptr<DistMatrix<T,MC,MR>> \n        A_MC_MR( new DistMatrix<T,MC,MR>(A) );\n    std::unique_ptr<DistMatrix<T,VC,STAR>> \n        A_VC_STAR( new DistMatrix<T,VC,STAR>(*A_MC_MR) );\n    delete A_MC_MR.release(); // lowers memory highwater\n    *this = *A_VC_STAR;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,STAR,STAR>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"[VR,STAR] = [STAR,STAR]\"))\n    this->ColFilterFrom( A );\n    return *this;\n}\n\n// NOTE: This is a small modification of [MC,MR] <- [CIRC,CIRC]\ntemplate<typename T>\nDM&\nDM::operator=( const DistMatrix<T,CIRC,CIRC>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"[VR,STAR] = [CIRC,CIRC]\");\n        this->AssertNotLocked();\n        this->AssertSameGrid( A.Grid() );\n    )\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int p = g.Size();\n    this->Resize( m, n );\n\n    // Convert A's root from its VC communicator to VR\n    const Int rootRow = A.Root() % g.Height();\n    const Int rootCol = A.Root() / g.Height();\n    const Int rootVR = rootCol + rootRow*g.Width();\n\n    const Int colAlign = this->ColAlign();\n    const Int mLocal = this->LocalHeight();\n    const Int pkgSize = mpi::Pad(MaxLength(m,p)*n);\n    const Int recvSize = pkgSize;\n    const Int sendSize = p*pkgSize;\n    T* recvBuf=0; // some compilers (falsely) warn otherwise\n    if( A.Participating() )\n    {\n        T* buffer = this->auxMemory_.Require( sendSize + recvSize );\n        T* sendBuf = &buffer[0];\n        recvBuf = &buffer[sendSize];\n\n        // Pack the send buffer\n        const Int ALDim = A.LDim();\n        const T* ABuf = A.LockedBuffer();\n        for( Int s=0; s<p; ++s )\n        {\n            const Int sLocalHeight = Length( m, s, p );\n            const Int q = (colAlign+s) % p;\n            for( Int j=0; j<n; ++j )\n            {\n                for( Int iLoc=0; iLoc<sLocalHeight; ++iLoc )\n                {\n                    const Int i = s + iLoc*p;\n                    sendBuf[q*pkgSize+iLoc+j*sLocalHeight] =\n                        ABuf[i+j*ALDim];\n                }\n            }\n        }\n\n        // Scatter from the root\n        mpi::Scatter\n        ( sendBuf, pkgSize, recvBuf, pkgSize, rootVR, g.VRComm() );\n    }\n    else if( this->Participating() )\n    {\n        recvBuf = this->auxMemory_.Require( recvSize );\n\n        // Perform the receiving portion of the scatter from the non-root\n        mpi::Scatter\n        ( static_cast<T*>(0), pkgSize, \n          recvBuf,            pkgSize, rootVR, g.VRComm() );\n    }\n\n    if( this->Participating() )\n    {\n        // Unpack\n        const Int ldim = this->LDim();\n        T* buffer = this->Buffer();\n        for( Int j=0; j<n; ++j )\n            for( Int iLoc=0; iLoc<mLocal; ++iLoc )\n                buffer[iLoc+j*ldim] = recvBuf[iLoc+j*mLocal];\n        this->auxMemory_.Release();\n    }\n\n    return *this;\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nmpi::Comm DM::DistComm() const { return this->grid_->VRComm(); }\ntemplate<typename T>\nmpi::Comm DM::CrossComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::RedundantComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::ColComm() const { return this->grid_->VRComm(); }\ntemplate<typename T>\nmpi::Comm DM::RowComm() const { return mpi::COMM_SELF; }\ntemplate<typename T>\nmpi::Comm DM::PartialColComm() const { return this->grid_->MRComm(); }\ntemplate<typename T>\nmpi::Comm DM::PartialUnionColComm() const { return this->grid_->MCComm(); }\n\ntemplate<typename T>\nInt DM::ColStride() const { return this->grid_->VRSize(); }\ntemplate<typename T>\nInt DM::RowStride() const { return 1; }\ntemplate<typename T>\nInt DM::PartialColStride() const { return this->grid_->MRSize(); }\ntemplate<typename T>\nInt DM::PartialUnionColStride() const { return this->grid_->MCSize(); }\ntemplate<typename T>\nInt DM::DistSize() const { return this->grid_->VRSize(); }\ntemplate<typename T>\nInt DM::CrossSize() const { return 1; }\ntemplate<typename T>\nInt DM::RedundantSize() const { return 1; }\n\n// Instantiate {Int,Real,Complex<Real>} for each Real in {float,double}\n// ####################################################################\n\n#define PROTO(T) template class DistMatrix<T,ColDist,RowDist>\n#define SELF(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const DistMatrix<T,U,V>& A );\n#define OTHER(T,U,V) \\\n  template DistMatrix<T,ColDist,RowDist>::DistMatrix \\\n  ( const BlockDistMatrix<T,U,V>& A ); \\\n  template DistMatrix<T,ColDist,RowDist>& \\\n           DistMatrix<T,ColDist,RowDist>::operator= \\\n           ( const BlockDistMatrix<T,U,V>& A )\n#define BOTH(T,U,V) \\\n  SELF(T,U,V); \\\n  OTHER(T,U,V)\n#define FULL(T) \\\n  PROTO(T); \\\n  BOTH( T,CIRC,CIRC); \\\n  BOTH( T,MC,  MR  ); \\\n  BOTH( T,MC,  STAR); \\\n  BOTH( T,MD,  STAR); \\\n  BOTH( T,MR,  MC  ); \\\n  BOTH( T,MR,  STAR); \\\n  BOTH( T,STAR,MC  ); \\\n  BOTH( T,STAR,MD  ); \\\n  BOTH( T,STAR,MR  ); \\\n  BOTH( T,STAR,STAR); \\\n  BOTH( T,STAR,VC  ); \\\n  BOTH( T,STAR,VR  ); \\\n  BOTH( T,VC,  STAR); \\\n  OTHER(T,VR,  STAR);\n\nFULL(Int);\n#ifndef ELEM_DISABLE_FLOAT\nFULL(float);\n#endif\nFULL(double);\n\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\nFULL(Complex<float>);\n#endif\nFULL(Complex<double>);\n#endif\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/DistMatrix/setup.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n\n// This file should be included into each of the DistMatrix specializations\n// as a workaround for the fact that C++11 constructor inheritance is not \n// yet widely supported.\n\nnamespace elem {\n\n#define DM DistMatrix<T,ColDist,RowDist>\n#define GDM GeneralDistMatrix<T,ColDist,RowDist>\n\n// Public section\n// ##############\n\n// Constructors and destructors\n// ============================\n\ntemplate<typename T>\nDM::DistMatrix( const elem::Grid& grid, Int root )\n: GDM(grid,root)\n{ \n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts(); \n}\n\ntemplate<typename T>\nDM::DistMatrix( Int height, Int width, const elem::Grid& grid, Int root )\n: GDM(grid,root)\n{ \n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts(); \n    this->Resize(height,width); \n}\n\ntemplate<typename T>\nDM::DistMatrix( const DM& A )\n: GDM(A.Grid())\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DistMatrix::DistMatrix\"))\n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts();\n    if( &A != this )\n        *this = A;\n    else\n        LogicError(\"Tried to construct DistMatrix with itself\");\n}\n\ntemplate<typename T>\ntemplate<Dist U,Dist V>\nDM::DistMatrix( const DistMatrix<T,U,V>& A )\n: GDM(A.Grid())\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DistMatrix::DistMatrix\"))\n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts();\n    if( ColDist != U || RowDist != V ||\n        reinterpret_cast<const DM*>(&A) != this )\n        *this = A;\n    else\n        LogicError(\"Tried to construct DistMatrix with itself\");\n}\n\ntemplate<typename T>\ntemplate<Dist U,Dist V>\nDM::DistMatrix( const BlockDistMatrix<T,U,V>& A )\n: GDM(A.Grid())\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DistMatrix::DistMatrix\"))\n    if( ColDist == CIRC && RowDist == CIRC )\n        this->matrix_.viewType_ = OWNER;\n    this->SetShifts();\n    *this = A;\n}\n\ntemplate<typename T>\nDM::DistMatrix( DM&& A ) ELEM_NOEXCEPT : GDM(std::move(A)) { }\n\ntemplate<typename T> DM::~DistMatrix() { }\n\ntemplate<typename T>\ntemplate<Dist U,Dist V>\nDM&\nDM::operator=( const BlockDistMatrix<T,U,V>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DM = BDM[U,V]\"))\n    BlockDistMatrix<T,ColDist,RowDist> AElem(A.Grid(),1,1);\n    AElem = A;\n    DistMatrix<T,ColDist,RowDist> AElemView(A.Grid());\n    LockedView( AElemView, AElem ); \n    *this = AElemView;\n    return *this;\n}\n\ntemplate<typename T>\nDM&\nDM::operator=( DM&& A )\n{\n    if( this->Viewing() && !A.Viewing() )\n        this->operator=( (const DM&)A );\n    else\n        GDM::operator=( std::move(A) );\n    return *this;\n}\n\ntemplate<typename T>\nelem::DistData DM::DistData() const { return elem::DistData(*this); }\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/Matrix.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\nnamespace elem {\n\n// Public routines\n// ###############\n\n// Constructors and destructors\n// ============================\n\ntemplate<typename T>\nMatrix<T>::Matrix( bool fixed )\n: viewType_( fixed ? OWNER_FIXED : OWNER ),\n  height_(0), width_(0), ldim_(1), \n  data_(nullptr)\n{ }\n\ntemplate<typename T>\nMatrix<T>::Matrix( Int height, Int width, bool fixed )\n: viewType_( fixed ? OWNER_FIXED : OWNER ),\n  height_(height), width_(width), ldim_(Max(height,1))\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Matrix\");\n        AssertValidDimensions( height, width );\n    )\n    memory_.Require( ldim_ * width );\n    data_ = memory_.Buffer();\n    // TODO: Consider explicitly zeroing\n}\n\ntemplate<typename T>\nMatrix<T>::Matrix\n( Int height, Int width, Int ldim, bool fixed )\n: viewType_( fixed ? OWNER_FIXED : OWNER ),\n  height_(height), width_(width), ldim_(ldim)\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Matrix\");\n        AssertValidDimensions( height, width, ldim );\n    )\n    memory_.Require( ldim*width );\n    data_ = memory_.Buffer();\n}\n\ntemplate<typename T>\nMatrix<T>::Matrix\n( Int height, Int width, const T* buffer, Int ldim, bool fixed )\n: viewType_( fixed ? LOCKED_VIEW_FIXED: LOCKED_VIEW ),\n  height_(height), width_(width), ldim_(ldim), \n  data_(buffer)\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Matrix\");\n        AssertValidDimensions( height, width, ldim );\n    )\n}\n\ntemplate<typename T>\nMatrix<T>::Matrix\n( Int height, Int width, T* buffer, Int ldim, bool fixed )\n: viewType_( fixed ? VIEW_FIXED: VIEW ),\n  height_(height), width_(width), ldim_(ldim), \n  data_(buffer)\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Matrix\");\n        AssertValidDimensions( height, width, ldim );\n    )\n}\n\ntemplate<typename T>\nMatrix<T>::Matrix( const Matrix<T>& A )\n: viewType_( OWNER ),\n  height_(0), width_(0), ldim_(1), \n  data_(nullptr)\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::Matrix( const Matrix& )\"))\n    if( &A != this )\n        *this = A;\n    else\n        LogicError(\"You just tried to construct a Matrix with itself!\");\n}\n\ntemplate<typename T>\nMatrix<T>::Matrix( Matrix<T>&& A ) ELEM_NOEXCEPT\n: viewType_(A.viewType_),\n  height_(A.height_), width_(A.width_), ldim_(A.ldim_),\n  data_(nullptr), memory_(std::move(A.memory_))\n{ std::swap( data_, A.data_ ); }\n\ntemplate<typename T>\nMatrix<T>::~Matrix() { }\n\n// Assignment and reconfiguration\n// ==============================\n\ntemplate<typename T>\nMatrix<T>&\nMatrix<T>::operator=( const Matrix<T>& A )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::operator=\");\n        if( Locked() )\n            LogicError(\"Cannot assign to a locked view\");\n        if( viewType_ != OWNER && \n            (A.Height() != Height() || A.Width() != Width()) )\n            LogicError(\"Cannot assign to a view of different dimensions\");\n    )\n    if( viewType_ == OWNER )\n        Resize( A.Height(), A.Width() );\n    const Int height = Height();\n    const Int width = Width();\n    const Int ldim = LDim();\n    const Int ldimOfA = A.LDim();\n    const T* src = A.LockedBuffer();\n    T* dst = Buffer();\n    ELEM_PARALLEL_FOR\n    for( Int j=0; j<width; ++j )\n        MemCopy( &dst[j*ldim], &src[j*ldimOfA], height );\n    return *this;\n}\n\ntemplate<typename T>\nMatrix<T>&\nMatrix<T>::operator=( Matrix<T>&& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::operator=( Matrix&& )\"))\n    if( Viewing() && !A.Viewing() )\n    {\n        operator=( (const Matrix<T>&)A );\n    }\n    else\n    {\n        memory_.ShallowSwap( A.memory_ );\n        std::swap( data_, A.data_ );\n        viewType_ = A.viewType_;\n        height_ = A.height_;\n        width_ = A.width_;\n        ldim_ = A.ldim_;\n    }\n    return *this;\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Empty()\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Empty()\");\n        if( FixedSize() )\n            LogicError(\"Cannot empty a fixed-size matrix\" );\n    )\n    Empty_();\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Resize( Int height, Int width )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Resize(height,width)\");\n        AssertValidDimensions( height, width );\n        if( FixedSize() && ( height != height_ || width != width_ ) )\n            LogicError(\"Cannot change the size of this matrix\");\n        if( Viewing() && ( height > height_ || width > width_ ) )\n            LogicError(\"Cannot increase the size of this matrix\");\n    )\n    Resize_( height, width );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Resize( Int height, Int width, Int ldim )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Resize(height,width,ldim)\");\n        AssertValidDimensions( height, width, ldim );\n        if( FixedSize() && \n            ( height != height_ || width != width_ || ldim != ldim_ ) )\n            LogicError(\"Cannot change the size of this matrix\");\n        if( Viewing() && (height > height_ || width > width_ || ldim != ldim_) )\n            LogicError(\"Cannot increase the size of this matrix\");\n    )\n    Resize_( height, width, ldim );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Attach( Int height, Int width, T* buffer, Int ldim )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Attach\");\n        if( FixedSize() )\n            LogicError(\"Cannot attach a new buffer to a view with fixed size\");\n    )\n    Attach_( height, width, buffer, ldim );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::LockedAttach\n( Int height, Int width, const T* buffer, Int ldim )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::LockedAttach\");\n        if( FixedSize() )\n            LogicError(\"Cannot attach a new buffer to a view with fixed size\");\n    )\n    LockedAttach_( height, width, buffer, ldim );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Control( Int height, Int width, T* buffer, Int ldim )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Control\");\n        if( FixedSize() )\n            LogicError(\"Cannot attach a new buffer to a view with fixed size\");\n    )\n    Control_( height, width, buffer, ldim );\n}\n\n// Basic queries\n// =============\n\ntemplate<typename T>\nInt Matrix<T>::Height() const { return height_; }\n\ntemplate<typename T>\nInt Matrix<T>::Width() const { return width_; }\n\ntemplate<typename T>\nInt Matrix<T>::LDim() const { return ldim_; }\n\ntemplate<typename T>\nInt Matrix<T>::MemorySize() const { return memory_.Size(); }\n\ntemplate<typename T>\nInt Matrix<T>::DiagonalLength( Int offset ) const\n{ return elem::DiagonalLength(height_,width_,offset); }\n\ntemplate<typename T>\nT*\nMatrix<T>::Buffer()\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Buffer\");\n        if( Locked() )\n            LogicError(\"Cannot return non-const buffer of locked Matrix\");\n    )\n    // NOTE: This const_cast has been carefully considered and should be safe\n    //       since the underlying data should be non-const if this is called.\n    return const_cast<T*>(data_);\n}\n\ntemplate<typename T>\nT*\nMatrix<T>::Buffer( Int i, Int j )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Buffer\");\n        if( Locked() )\n            LogicError(\"Cannot return non-const buffer of locked Matrix\");\n    )\n    // NOTE: This const_cast has been carefully considered and should be safe\n    //       since the underlying data should be non-const if this is called.\n    return &const_cast<T*>(data_)[i+j*ldim_];\n}\n\ntemplate<typename T>\nconst T* Matrix<T>::LockedBuffer() const { return data_; }\n\ntemplate<typename T>\nconst T*\nMatrix<T>::LockedBuffer( Int i, Int j ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::LockedBuffer\"))\n    return &data_[i+j*ldim_];\n}\n\ntemplate<typename T>\nbool Matrix<T>::Viewing() const { return IsViewing( viewType_ ); }\n\ntemplate<typename T>\nbool Matrix<T>::FixedSize() const { return IsFixedSize( viewType_ ); }\n\ntemplate<typename T>\nbool Matrix<T>::Locked() const { return IsLocked( viewType_ ); }\n\n// Single-entry manipulation\n// =========================\n\ntemplate<typename T>\nT\nMatrix<T>::Get( Int i, Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Get\");\n        AssertValidEntry( i, j );\n    )\n    return Get_( i, j );\n}\n\ntemplate<typename T>\nBase<T>\nMatrix<T>::GetRealPart( Int i, Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::GetRealPart\");\n        AssertValidEntry( i, j );\n    )\n    return elem::RealPart( Get_( i, j ) );\n}\n\ntemplate<typename T>\nBase<T>\nMatrix<T>::GetImagPart( Int i, Int j ) const\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::GetImagPart\");\n        AssertValidEntry( i, j );\n    )\n    return elem::ImagPart( Get_( i, j ) );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Set( Int i, Int j, T alpha ) \n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Set\");\n        AssertValidEntry( i, j );\n        if( Locked() )\n            LogicError(\"Cannot modify data of locked matrices\");\n    )\n    Set_( i, j ) = alpha;\n}\n\ntemplate<typename T>\nvoid \nMatrix<T>::SetRealPart( Int i, Int j, Base<T> alpha )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::SetRealPart\");\n        AssertValidEntry( i, j );\n        if( Locked() )\n            LogicError(\"Cannot modify data of locked matrices\");\n    )\n    elem::SetRealPart( Set_( i, j ), alpha );\n}\n\ntemplate<typename T>\nvoid \nMatrix<T>::SetImagPart( Int i, Int j, Base<T> alpha )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::SetImagPart\");\n        AssertValidEntry( i, j );\n        if( Locked() )\n            LogicError(\"Cannot modify data of locked matrices\");\n    )\n    ComplainIfReal();\n    elem::SetImagPart( Set_( i, j ), alpha );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Update( Int i, Int j, T alpha ) \n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Update\");\n        AssertValidEntry( i, j );\n        if( Locked() )\n            LogicError(\"Cannot modify data of locked matrices\");\n    )\n    Set_( i, j ) += alpha;\n}\n\ntemplate<typename T>\nvoid \nMatrix<T>::UpdateRealPart( Int i, Int j, Base<T> alpha )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::UpdateRealPart\");\n        AssertValidEntry( i, j );\n        if( Locked() )\n            LogicError(\"Cannot modify data of locked matrices\");\n    )\n    elem::UpdateRealPart( Set_( i, j ), alpha );\n}\n\ntemplate<typename T>\nvoid \nMatrix<T>::UpdateImagPart( Int i, Int j, Base<T> alpha )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::UpdateImagPart\");\n        AssertValidEntry( i, j );\n        if( Locked() )\n            LogicError(\"Cannot modify data of locked matrices\");\n    )\n    ComplainIfReal();\n    elem::UpdateImagPart( Set_( i, j ), alpha );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::MakeReal( Int i, Int j )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::MakeReal\");\n        AssertValidEntry( i, j );\n        if( Locked() )\n            LogicError(\"Cannot modify data of locked matrices\");\n    )\n    Set( i, j, GetRealPart(i,j) );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Conjugate( Int i, Int j )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::Conjugate\");\n        AssertValidEntry( i, j );\n        if( Locked() )\n            LogicError(\"Cannot modify data of locked matrices\");\n    )\n    Set( i, j, elem::Conj(Get(i,j)) );\n}\n\n// Diagonal manipulation\n// =====================\n\ntemplate<typename T>\nvoid\nMatrix<T>::GetDiagonal( Matrix<T>& d, Int offset ) const\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::GetDiagonal\");\n        if( d.Locked() )\n            LogicError(\"d must not be a locked view\");\n    )\n    const Int diagLength = DiagonalLength(offset);\n    d.Resize( diagLength, 1 );\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        d.Set_( k, 0 ) = Get_(k+iOff,k+jOff);\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::GetRealPartOfDiagonal( Matrix<Base<T>>& d, Int offset ) const\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::GetRealPartOfDiagonal\");\n        if( d.Locked() )\n            LogicError(\"d must not be a locked view\");\n    )\n    const Int diagLength = DiagonalLength(offset);\n    d.Resize( diagLength, 1 );\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        d.Set_( k, 0 ) = elem::RealPart( Get_(k+iOff,k+jOff) );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::GetImagPartOfDiagonal( Matrix<Base<T>>& d, Int offset ) const\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::GetImagPartOfDiagonal\");\n        if( d.Locked() )\n            LogicError(\"d must not be a locked view\");\n    )\n    const Int diagLength = DiagonalLength(offset);\n    d.Resize( diagLength, 1 );\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        d.Set_( k, 0 ) = elem::ImagPart( Get_(k+iOff,k+jOff) );\n}\n\ntemplate<typename T>\nMatrix<T>\nMatrix<T>::GetDiagonal( Int offset ) const\n{ \n    Matrix<T> d;\n    GetDiagonal( d, offset );\n    return d;\n}\n\ntemplate<typename T>\nMatrix<Base<T>>\nMatrix<T>::GetRealPartOfDiagonal( Int offset ) const\n{ \n    Matrix<Base<T>> d;\n    GetRealPartOfDiagonal( d, offset );\n    return d;\n}\n\ntemplate<typename T>\nMatrix<Base<T>>\nMatrix<T>::GetImagPartOfDiagonal( Int offset ) const\n{ \n    Matrix<Base<T>> d;\n    GetImagPartOfDiagonal( d, offset );\n    return d;\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::SetDiagonal( const Matrix<T>& d, Int offset )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::SetDiagonal\");\n        if( d.Height() != DiagonalLength(offset) || d.Width() != 1 )\n            LogicError(\"d is not a column-vector of the right length\");\n    )\n    const Int diagLength = DiagonalLength(offset);\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        Set_( k+iOff, k+jOff ) = d.Get_(k,0);\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::SetRealPartOfDiagonal( const Matrix<Base<T>>& d, Int offset )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::SetRealPartOfDiagonal\");\n        if( d.Height() != DiagonalLength(offset) || d.Width() != 1 )\n            LogicError(\"d is not a column-vector of the right length\");\n    )\n    const Int diagLength = DiagonalLength(offset);\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        elem::SetRealPart( Set_(k+iOff,k+jOff), d.Get_(k,0) );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::SetImagPartOfDiagonal( const Matrix<Base<T>>& d, Int offset )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::SetImagPartOfDiagonal\");\n        if( d.Height() != DiagonalLength(offset) || d.Width() != 1 )\n            LogicError(\"d is not a column-vector of the right length\");\n    )\n    ComplainIfReal();\n    const Int diagLength = DiagonalLength(offset);\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        elem::SetImagPart( Set_(k+iOff,k+jOff), d.Get_(k,0) );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::UpdateDiagonal( const Matrix<T>& d, Int offset )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::UpdateDiagonal\");\n        if( d.Height() != DiagonalLength(offset) || d.Width() != 1 )\n            LogicError(\"d is not a column-vector of the right length\");\n    )\n    const Int diagLength = DiagonalLength(offset);\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        Set_( k+iOff, k+jOff ) += d.Get(k,0);\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::UpdateRealPartOfDiagonal( const Matrix<Base<T>>& d, Int offset )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::UpdateRealPartOfDiagonal\");\n        if( d.Height() != DiagonalLength(offset) || d.Width() != 1 )\n            LogicError(\"d is not a column-vector of the right length\");\n    )\n    const Int diagLength = DiagonalLength(offset);\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        elem::UpdateRealPart( Set_(k+iOff,k+jOff), d.Get_(k,0) );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::UpdateImagPartOfDiagonal( const Matrix<Base<T>>& d, Int offset )\n{ \n    DEBUG_ONLY(\n        CallStackEntry cse(\"Matrix::UpdateImagPartOfDiagonal\");\n        if( d.Height() != DiagonalLength(offset) || d.Width() != 1 )\n            LogicError(\"d is not a column-vector of the right length\");\n    )\n    ComplainIfReal();\n    const Int diagLength = DiagonalLength(offset);\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        elem::UpdateImagPart( Set_(k+iOff,k+jOff), d.Get_(k,0) );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::MakeDiagonalReal( Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::MakeDiagonalReal\"))\n    const Int diagLength = DiagonalLength(offset);\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        Set( k+iOff, k+jOff, RealPart(Get(k+iOff,k+jOff)) );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::ConjugateDiagonal( Int offset )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::ConjugateDiagonal\"))\n    const Int diagLength = DiagonalLength(offset);\n    const Int iOff = ( offset>=0 ? 0      : -offset );\n    const Int jOff = ( offset>=0 ? offset : 0       );\n    for( Int k=0; k<diagLength; ++k )\n        Set( k+iOff, k+jOff, Conj(Get(k+iOff,k+jOff)) );\n}\n\n// Arbitrary submatrix manipulation\n// ================================\n\ntemplate<typename T>\nvoid\nMatrix<T>::GetSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  Matrix<T>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::GetSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    ASub.Resize( m, n );\n    T* bufSub = ASub.Buffer();\n    const Int ldSub = ASub.LDim();\n    const T* buf = LockedBuffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            bufSub[i+j*ldSub] = buf[rowInd[i]+jSub*ld];\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::GetRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  Matrix<Base<T>>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::GetRealPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    ASub.Resize( m, n );\n    Base<T>* bufSub = ASub.Buffer();\n    const Int ldSub = ASub.LDim();\n    const T* buf = LockedBuffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            bufSub[i+j*ldSub] = RealPart(buf[rowInd[i]+jSub*ld]);\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::GetImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  Matrix<Base<T>>& ASub ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::GetImagPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    ASub.Resize( m, n );\n    Base<T>* bufSub = ASub.Buffer();\n    const Int ldSub = ASub.LDim();\n    const T* buf = LockedBuffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            bufSub[i+j*ldSub] = ImagPart(buf[rowInd[i]+jSub*ld]);\n        }\n    }\n}\n\ntemplate<typename T>\nMatrix<T>\nMatrix<T>::GetSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const\n{\n    Matrix<T> ASub;\n    GetSubmatrix( rowInd, colInd, ASub );\n    return ASub;\n}\n\ntemplate<typename T>\nMatrix<Base<T>>\nMatrix<T>::GetRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const\n{\n    Matrix<Base<T>> ASub;\n    GetRealPartOfSubmatrix( rowInd, colInd, ASub );\n    return ASub;\n}\n\ntemplate<typename T>\nMatrix<Base<T>>\nMatrix<T>::GetImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd ) const\n{\n    Matrix<Base<T>> ASub;\n    GetImagPartOfSubmatrix( rowInd, colInd, ASub );\n    return ASub;\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::SetSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  const Matrix<T>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::SetSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    const T* bufSub = ASub.LockedBuffer();\n    const Int ldSub = ASub.LDim();\n    T* buf = Buffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            buf[rowInd[i]+jSub*ld] = bufSub[i+j*ldSub];\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::SetRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  const Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::SetRealPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    const Base<T>* bufSub = ASub.LockedBuffer();\n    const Int ldSub = ASub.LDim();\n    T* buf = Buffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            elem::SetRealPart( buf[rowInd[i]+jSub*ld], bufSub[i+j*ldSub] );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::SetImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  const Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::SetImagPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    const Base<T>* bufSub = ASub.LockedBuffer();\n    const Int ldSub = ASub.LDim();\n    T* buf = Buffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            elem::SetImagPart( buf[rowInd[i]+jSub*ld], bufSub[i+j*ldSub] );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::UpdateSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  T alpha, const Matrix<T>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::UpdateSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    const T* bufSub = ASub.LockedBuffer();\n    const Int ldSub = ASub.LDim();\n    T* buf = Buffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            buf[rowInd[i]+jSub*ld] += alpha*bufSub[i+j*ldSub];\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::UpdateRealPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  Base<T> alpha, const Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::UpdateRealPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    const Base<T>* bufSub = ASub.LockedBuffer();\n    const Int ldSub = ASub.LDim();\n    T* buf = Buffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            elem::UpdateRealPart\n            ( buf[rowInd[i]+jSub*ld], alpha*bufSub[i+j*ldSub] );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::UpdateImagPartOfSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd,\n  Base<T> alpha, const Matrix<Base<T>>& ASub )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::UpdateImagPartOfSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    const Base<T>* bufSub = ASub.LockedBuffer();\n    const Int ldSub = ASub.LDim();\n    T* buf = Buffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            elem:: UpdateImagPart\n            ( buf[rowInd[i]+jSub*ld], alpha*bufSub[i+j*ldSub] );\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::MakeSubmatrixReal\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::MakeSubmatrixReal\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    T* buf = Buffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            buf[rowInd[i]+jSub*ld] = RealPart(buf[rowInd[i]+jSub*ld]);\n        }\n    }\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::ConjugateSubmatrix\n( const std::vector<Int>& rowInd, const std::vector<Int>& colInd )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::ConjugateSubmatrix\"))\n    const Int m = rowInd.size();\n    const Int n = colInd.size();\n    T* buf = Buffer();\n    const Int ld = LDim();\n    for( Int j=0; j<n; ++j )\n    {\n        const Int jSub = colInd[j];\n        for( Int i=0; i<m; ++i )\n        {\n            DEBUG_ONLY(AssertValidEntry(rowInd[i],colInd[j]))\n            buf[rowInd[i]+jSub*ld] = Conj( buf[rowInd[i]+jSub*ld] );\n        }\n    }\n}\n\n// Private routines\n// ################\n\n// Exchange metadata with another matrix\n// =====================================\ntemplate<typename T>\nvoid\nMatrix<T>::ShallowSwap( Matrix<T>& A )\n{\n    memory_.ShallowSwap( A.memory_ );\n    std::swap( data_, A.data_ );\n    std::swap( viewType_, A.viewType_ );\n    std::swap( height_, A.height_ );\n    std::swap( width_, A.width_ );\n    std::swap( ldim_, A.ldim_ );\n}\n\n// Reconfigure without error-checking\n// ==================================\n\ntemplate<typename T>\nvoid\nMatrix<T>::Empty_()\n{\n    memory_.Empty();\n    height_ = 0;\n    width_ = 0;\n    ldim_ = 1;\n    data_ = nullptr;\n    viewType_ = (ViewType)( viewType_ & ~LOCKED_VIEW );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Attach_( Int height, Int width, T* buffer, Int ldim )\n{\n    memory_.Empty();\n    height_ = height;\n    width_ = width;\n    ldim_ = ldim;\n    data_ = buffer;\n    viewType_ = (ViewType)( ( viewType_ & ~LOCKED_OWNER ) | VIEW );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::LockedAttach_( Int height, Int width, const T* buffer, Int ldim )\n{\n    memory_.Empty();\n    height_ = height;\n    width_ = width;\n    ldim_ = ldim;\n    data_ = buffer;\n    viewType_ = (ViewType)( viewType_ | VIEW );\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Control_( Int height, Int width, T* buffer, Int ldim )\n{\n    memory_.Empty();\n    height_ = height;\n    width_ = width;\n    ldim_ = ldim;\n    data_ = buffer;\n    viewType_ = (ViewType)( viewType_ & ~LOCKED_VIEW );\n}\n\n// Return a reference to a single entry without error-checking\n// ===========================================================\ntemplate<typename T>\nconst T&\nMatrix<T>::Get_( Int i, Int j ) const\n{ return data_[i+j*ldim_]; }\n\ntemplate<typename T>\nT&\nMatrix<T>::Set_( Int i, Int j ) \n{\n    // NOTE: This const_cast has been carefully considered and should be safe\n    //       since the underlying data should be non-const if this is called.\n    return (const_cast<T*>(data_))[i+j*ldim_];\n}\n\n// Assertions\n// ==========\n\ntemplate<typename T>\nvoid\nMatrix<T>::ComplainIfReal() const\n{ \n    if( !IsComplex<T>::val )\n        LogicError(\"Called complex-only routine with real data\");\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::AssertValidDimensions( Int height, Int width ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::AssertValidDimensions\"))\n    if( height < 0 || width < 0 )\n        LogicError(\"Height and width must be non-negative\");\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::AssertValidDimensions( Int height, Int width, Int ldim ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::AssertValidDimensions\"))\n    AssertValidDimensions( height, width );\n    if( ldim < height )\n        LogicError(\"Leading dimension must be no less than height\");\n    if( ldim == 0 )\n        LogicError(\"Leading dimension cannot be zero (for BLAS compatibility)\");\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::AssertValidEntry( Int i, Int j ) const\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Matrix::AssertValidEntry\"))\n    if( i < 0 || j < 0 )\n        LogicError(\"Indices must be non-negative\");\n    if( i >= Height() || j >= Width() )\n        LogicError\n        (\"Out of bounds: (\",i,\",\",j,\") of \",Height(),\" x \",Width(),\" Matrix\");\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Resize_( Int height, Int width )\n{\n    bool reallocate = height > ldim_ || width > width_;\n    height_ = height;\n    width_ = width;\n    // Only change the ldim when necessary. Simply 'shrink' our view if \n    // possible.\n    if( reallocate )\n    {\n        ldim_ = Max( height, 1 );\n        memory_.Require( ldim_ * width );\n        data_ = memory_.Buffer();\n    }\n}\n\ntemplate<typename T>\nvoid\nMatrix<T>::Resize_( Int height, Int width, Int ldim )\n{\n    bool reallocate = height > ldim_ || width > width_ || ldim != ldim_;\n    height_ = height;\n    width_ = width;\n    if( reallocate )\n    {\n        ldim_ = ldim;\n        memory_.Require(ldim*width);\n        data_ = memory_.Buffer();\n    }\n}\n\n// Instantiate for {Int,Real,Complex<Real>} for each Real in {float,double}\n// ########################################################################\ntemplate class Matrix<Int>;\n#ifndef ELEM_DISABLE_FLOAT\ntemplate class Matrix<float>;\n#endif // ifndef ELEM_DISABLE_FLOAT\ntemplate class Matrix<double>;\n#ifndef ELEM_DISABLE_COMPLEX\n#ifndef ELEM_DISABLE_FLOAT\ntemplate class Matrix<Complex<float>>;\n#endif // ifndef ELEM_DISABLE_FLOAT\ntemplate class Matrix<Complex<double>>;\n#endif // ifndef ELEM_DISABLE_COMPLEX\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/Memory.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#include \"elemental/config-internal.h\"\n\nnamespace elem {\n\ntemplate<typename G>\nMemory<G>::Memory()\n: size_(0), buffer_(nullptr)\n{ }\n\ntemplate<typename G>\nMemory<G>::Memory( std::size_t size )\n: size_(0), buffer_(nullptr)\n{ Require( size ); }\n\ntemplate<typename G>\nMemory<G>::Memory( Memory<G>&& mem )\n: size_(mem.size_), buffer_(nullptr)\n{ ShallowSwap(mem); }\n\ntemplate<typename G>\nMemory<G>& Memory<G>::operator=( Memory<G>&& mem )\n{ ShallowSwap( mem ); return *this; }\n\ntemplate<typename G>\nvoid Memory<G>::ShallowSwap( Memory<G>& mem )\n{\n    std::swap(size_,mem.size_);\n    std::swap(buffer_,mem.buffer_);\n}\n\ntemplate<typename G>\nMemory<G>::~Memory() { delete[] buffer_; }\n\ntemplate<typename G>\nG* Memory<G>::Buffer() const { return buffer_; }\n\ntemplate<typename G>\nstd::size_t Memory<G>::Size() const { return size_; }\n\ntemplate<typename G>\nG* Memory<G>::Require( std::size_t size )\n{\n    if( size > size_ )\n    {\n        delete[] buffer_;\n#ifndef ELEM_RELEASE\n        try {\n#endif\n            buffer_ = new G[size];\n#ifndef ELEM_RELEASE\n        } \n        catch( std::bad_alloc& e )\n        {\n            std::ostringstream os;\n            os << \"Failed to allocate \" << size*sizeof(G) \n               << \" bytes on process \" << mpi::WorldRank() << std::endl;\n            std::cerr << os.str();\n            throw e;\n        }\n#endif\n        size_ = size;\n#ifdef ELEM_ZERO_INIT\n        MemZero( buffer_, size_ );\n#elif defined(ELEM_HAVE_VALGRIND)\n        if( ELEM_RUNNING_ON_VALGRIND )    \n            MemZero( buffer_, size_ );\n#endif\n    }\n    return buffer_;\n}\n\ntemplate<typename G>\nvoid Memory<G>::Release()\n{\n#ifndef ELEM_POOL_MEMORY\n    this->Empty();\n#endif\n}\n\ntemplate<typename G>\nvoid Memory<G>::Empty()\n{\n    delete[] buffer_;\n    size_ = 0;\n    buffer_ = nullptr;\n}\n\ntemplate class Memory<Int>;\ntemplate class Memory<float>;\ntemplate class Memory<double>;\ntemplate class Memory<Complex<float>>;\ntemplate class Memory<Complex<double>>;\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/README.md",
    "content": "### `src/core/`\n\nThis folder contains the directly-instantiated portions of Elemental's core\nfunctionality, such as the `Matrix` and `DistMatrix` classes, and wrappers of\nexternal libraries, such as BLAS and LAPACK. Please see \n`include/elemental/core` for the corresponding header-level implementations and\nprototypes.\n\nIn addition to this file, the folder currently contains:\n\n-  `dist_matrix/`: distributed matrix class (`DistMatrix`)\n-  `global.cpp`: initialization/finalization, call-stack manipulation, etc.\n-  `imports/`: wrappers for external software\n-  `matrix.cpp`: sequential matrix class (`Matrix`)\n-  `mpi_register.cpp`: custom MPI datatypes and reduction operations\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/global.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n                      2013, Jeff Hammond\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#ifdef ELEM_HAVE_QT5\n #include <QApplication>\n#endif\n\nnamespace {\nusing namespace elem;\n\nInt numElemInits = 0;\nbool elemInitializedMpi = false;\n\nstd::stack<Int> blocksizeStack;\nGrid* defaultGrid = 0;\nArgs* args = 0;\n\n// Default blocksizes for BlockDistMatrix\nInt blockHeight=32, blockWidth=32;\n\n// A common Mersenne twister configuration\nstd::mt19937 generator;\n\n// Debugging\nDEBUG_ONLY(std::stack<std::string> callStack)\n\n// Tuning parameters for basic routines\nInt localSymvFloatBlocksize = 64;\nInt localSymvDoubleBlocksize = 64;\nInt localSymvComplexFloatBlocksize = 64;\nInt localSymvComplexDoubleBlocksize = 64;\n\nInt localTrr2kFloatBlocksize = 64;\nInt localTrr2kDoubleBlocksize = 64;\nInt localTrr2kComplexFloatBlocksize = 64;\nInt localTrr2kComplexDoubleBlocksize = 64;\n\nInt localTrrkFloatBlocksize = 64;\nInt localTrrkDoubleBlocksize = 64;\nInt localTrrkComplexFloatBlocksize = 64;\nInt localTrrkComplexDoubleBlocksize = 64;\n\n// Qt5\nColorMap colorMap=RED_BLACK_GREEN;\nInt numDiscreteColors = 15;\n#ifdef ELEM_HAVE_QT5\nbool guiDisabled;\nbool elemInitializedQt = false;\nbool elemOpenedWindow = false;\nQCoreApplication* coreApp;\nbool haveMinRealWindowVal=false, haveMaxRealWindowVal=false,\n     haveMinImagWindowVal=false, haveMaxImagWindowVal=false;\ndouble minRealWindowVal, maxRealWindowVal,\n       minImagWindowVal, maxImagWindowVal;\n#endif\n}\n\nnamespace elem {\n\nvoid PrintVersion( std::ostream& os )\n{\n    os << \"Elemental version information:\\n\"\n       << \"  Git revision: \" << ELEM_GIT_SHA1 << \"\\n\"\n       << \"  Version:      \" << Elemental_VERSION_MAJOR << \".\"\n                             << Elemental_VERSION_MINOR << \"\\n\"\n       << \"  Build type:   \" << ELEM_CMAKE_BUILD_TYPE << \"\\n\"\n       << std::endl;\n}\n\nvoid PrintConfig( std::ostream& os )\n{\n    os << \"Elemental configuration:\\n\"\n       << \"  Math libraries:               \" << ELEM_MATH_LIBS << \"\\n\"\n       << \"  Have FLAME bidiagonal SVD:    \" \n#ifdef ELEM_HAVE_FLA_BSVD\n       << \"YES\\n\"\n#else\n       << \"NO\\n\"\n#endif\n       << \"  Have OpenMP:                  \"\n#ifdef ELEM_HAVE_OPENMP\n       << \"YES\\n\"\n#else\n       << \"NO\\n\"\n#endif\n       << \"  Have Qt5:                     \"\n#ifdef ELEM_HAVE_QT5\n       << \"YES\\n\"\n#else\n       << \"NO\\n\"\n#endif\n       << \"  Have F90 interface:           \"\n#ifdef ELEM_HAVE_F90_INTERFACE\n       << \"YES\\n\"\n#else\n       << \"NO\\n\"\n#endif\n       << \"  Avoiding complex MPI:         \"\n#ifdef ELEM_AVOID_COMPLEX_MPI\n       << \"YES\\n\"\n#else\n       << \"NO\\n\"\n#endif\n       << \"  Have MPI_Reducescatter_block: \"\n#ifdef ELEM_HAVE_MPI_REDUCE_SCATTER_BLOCK\n       << \"YES\\n\"\n#else\n       << \"NO\\n\"\n#endif\n       << \"  Have MPI_IN_PLACE:            \"\n#ifdef ELEM_HAVE_MPI_IN_PLACE\n       << \"YES\\n\"\n#else\n       << \"NO\\n\"\n#endif\n       << \"  AllReduce ReduceScatterBlock: \"\n#ifdef ELEM_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE\n       << \"YES\\n\"\n#else\n       << \"NO\\n\"\n#endif\n       << \"  Use byte Allgathers:          \"\n#ifdef ELEM_USE_BYTE_ALLGATHERS\n       << \"YES\\n\"\n#else\n       << \"NO\\n\"\n#endif\n       << std::endl;\n}\n\nvoid PrintCCompilerInfo( std::ostream& os )\n{\n    os << \"Elemental's C compiler info:\\n\"\n       << \"  ELEM_CMAKE_C_COMPILER:    \" << ELEM_CMAKE_C_COMPILER << \"\\n\"\n       << \"  ELEM_MPI_C_COMPILER:      \" << ELEM_MPI_C_COMPILER << \"\\n\"\n       << \"  ELEM_MPI_C_INCLUDE_PATH:  \" << ELEM_MPI_C_INCLUDE_PATH << \"\\n\"\n       << \"  ELEM_MPI_C_COMPILE_FLAGS: \" << ELEM_MPI_C_COMPILE_FLAGS << \"\\n\"\n       << \"  ELEM_MPI_C_LINK_FLAGS:    \" << ELEM_MPI_C_LINK_FLAGS << \"\\n\"\n       << \"  ELEM_MPI_C_LIBRARIES:     \" << ELEM_MPI_C_LIBRARIES << \"\\n\"\n       << std::endl;\n}\n\nvoid PrintCxxCompilerInfo( std::ostream& os )\n{\n    os << \"Elemental's C++ compiler info:\\n\"\n       << \"  ELEM_CMAKE_CXX_COMPILER:    \" << ELEM_CMAKE_CXX_COMPILER << \"\\n\"\n       << \"  ELEM_CXX_FLAGS:             \" << ELEM_CXX_FLAGS << \"\\n\"\n       << \"  ELEM_MPI_CXX_COMPILER:      \" << ELEM_MPI_CXX_COMPILER << \"\\n\"\n       << \"  ELEM_MPI_CXX_INCLUDE_PATH:  \" << ELEM_MPI_CXX_INCLUDE_PATH << \"\\n\"\n       << \"  ELEM_MPI_CXX_COMPILE_FLAGS: \" << ELEM_MPI_CXX_COMPILE_FLAGS << \"\\n\"\n       << \"  ELEM_MPI_CXX_LINK_FLAGS:    \" << ELEM_MPI_CXX_LINK_FLAGS << \"\\n\"\n       << \"  ELEM_MPI_CXX_LIBRARIES:     \" << ELEM_MPI_CXX_LIBRARIES << \"\\n\"\n       << std::endl;\n}\n\nvoid SetColorMap( ColorMap map )\n{ ::colorMap = map; }\n\nColorMap GetColorMap()\n{ return ::colorMap; }\n\nvoid SetNumDiscreteColors( Int numChunks )\n{ ::numDiscreteColors = numChunks; }\n\nInt NumDiscreteColors()\n{ return ::numDiscreteColors; }\n\n#ifdef ELEM_HAVE_QT5\nbool GuiDisabled()\n{ return ::guiDisabled; }\n\nvoid OpenedWindow()\n{ ::elemOpenedWindow = true; }\n\ndouble MinRealWindowVal()\n{\n    if( ::haveMinRealWindowVal )\n        return ::minRealWindowVal;\n    else\n        return 0;\n}\n\ndouble MaxRealWindowVal()\n{\n    if( ::haveMaxRealWindowVal )\n        return ::maxRealWindowVal;\n    else\n        return 0;\n}\n\ndouble MinImagWindowVal()\n{\n    if( ::haveMinImagWindowVal )\n        return ::minImagWindowVal;\n    else\n        return 0;\n}\n\ndouble MaxImagWindowVal()\n{\n    if( ::haveMaxImagWindowVal )\n        return ::maxImagWindowVal;\n    else\n        return 0;\n}\n\nvoid UpdateMinRealWindowVal( double minVal )\n{\n    if( ::haveMinRealWindowVal )\n        ::minRealWindowVal = std::min( ::minRealWindowVal, minVal );\n    else\n        ::minRealWindowVal = minVal;\n    ::haveMinRealWindowVal = true;\n}\n\nvoid UpdateMaxRealWindowVal( double maxVal )\n{\n    if( ::haveMaxRealWindowVal )\n        ::maxRealWindowVal = std::max( ::maxRealWindowVal, maxVal );\n    else\n        ::maxRealWindowVal = maxVal;\n    ::haveMaxRealWindowVal = true;\n}\n\nvoid UpdateMinImagWindowVal( double minVal )\n{\n    if( ::haveMinImagWindowVal )\n        ::minImagWindowVal = std::min( ::minImagWindowVal, minVal );\n    else\n        ::minImagWindowVal = minVal;\n    ::haveMinImagWindowVal = true;\n}\n\nvoid UpdateMaxImagWindowVal( double maxVal )\n{\n    if( ::haveMaxImagWindowVal )\n        ::maxImagWindowVal = std::max( ::maxImagWindowVal, maxVal );\n    else\n        ::maxImagWindowVal = maxVal;\n    ::haveMaxImagWindowVal = true;\n}\n#endif // ifdef ELEM_HAVE_QT5\n\nbool Initialized()\n{ return ::numElemInits > 0; }\n\nvoid Initialize( int& argc, char**& argv )\n{\n    if( ::numElemInits > 0 )\n    {\n        ++::numElemInits;\n        return;\n    }\n\n    ::args = new Args( argc, argv );\n\n    ::numElemInits = 1;\n    if( !mpi::Initialized() )\n    {\n        if( mpi::Finalized() )\n        {\n            LogicError\n            (\"Cannot initialize elemental after finalizing MPI\");\n        }\n#ifdef ELEM_HAVE_OPENMP\n        const Int provided = \n            mpi::InitializeThread\n            ( argc, argv, mpi::THREAD_MULTIPLE );\n        const Int commRank = mpi::Rank( mpi::COMM_WORLD );\n        if( provided != mpi::THREAD_MULTIPLE && commRank == 0 )\n        {\n            std::cerr << \"WARNING: Could not achieve THREAD_MULTIPLE support.\"\n                      << std::endl;\n        }\n#else\n        mpi::Initialize( argc, argv );\n#endif\n        ::elemInitializedMpi = true;\n    }\n    else\n    {\n#ifdef ELEM_HAVE_OPENMP\n        const Int provided = mpi::QueryThread();\n        if( provided != mpi::THREAD_MULTIPLE )\n        {\n            throw std::runtime_error\n            (\"MPI initialized with inadequate thread support for Elemental\");\n        }\n#endif\n    }\n\n#ifdef ELEM_HAVE_QT5\n    ::coreApp = QCoreApplication::instance();\n    if( ::coreApp == 0 )\n    {\n        // Test for whether the GUI should be disabled\n        ::guiDisabled = false;\n        for( int i=1; i<argc; ++i )\n            if( !qstrcmp(argv[i],\"-no-gui\") )\n                ::guiDisabled = true;\n        if( ::guiDisabled )\n            ::coreApp = new QCoreApplication( argc, argv );\n        else\n            ::coreApp = new QApplication( argc, argv );        \n        ::elemInitializedQt = true;\n    }\n#endif\n\n    // Queue a default algorithmic blocksize\n    while( ! ::blocksizeStack.empty() )\n        ::blocksizeStack.pop();\n    ::blocksizeStack.push( 128 );\n\n    // Build the default grid\n    defaultGrid = new Grid( mpi::COMM_WORLD );\n\n    // Create the types and ops needed for ValueInt\n    mpi::CreateValueIntType<Int>();\n    mpi::CreateValueIntType<float>();\n    mpi::CreateValueIntType<double>();\n    mpi::CreateMaxLocOp<Int>();\n    mpi::CreateMaxLocOp<float>();\n    mpi::CreateMaxLocOp<double>();\n    mpi::CreateMinLocOp<Int>();\n    mpi::CreateMinLocOp<float>();\n    mpi::CreateMinLocOp<double>();\n\n    // Do the same for ValueIntPair\n    mpi::CreateValueIntPairType<Int>();\n    mpi::CreateValueIntPairType<float>();\n    mpi::CreateValueIntPairType<double>();\n    mpi::CreateMaxLocPairOp<Int>();\n    mpi::CreateMaxLocPairOp<float>();\n    mpi::CreateMaxLocPairOp<double>();\n    mpi::CreateMinLocPairOp<Int>();\n    mpi::CreateMinLocPairOp<float>();\n    mpi::CreateMinLocPairOp<double>();\n\n    const unsigned rank = mpi::Rank( mpi::COMM_WORLD );\n    // TODO: Allow for switching on/off reproducibility?\n    //const long secs = time(NULL);\n    const long secs = 21;\n    const long seed = (secs<<16) | (rank & 0xFFFF);\n    ::generator.seed( seed );\n    srand( seed );\n}\n\nvoid Finalize()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Finalize\"))\n    if( ::numElemInits <= 0 )\n        LogicError(\"Finalized Elemental more than initialized\");\n    --::numElemInits;\n\n    if( mpi::Finalized() )\n    {\n        std::cerr << \"Warning: MPI was finalized before Elemental.\" \n                  << std::endl;\n    }\n    if( ::numElemInits == 0 )\n    {\n        delete ::args;\n        ::args = 0;\n\n        if( ::elemInitializedMpi )\n        {\n            // Destroy the types and ops needed for ValueInt\n            mpi::DestroyValueIntType<Int>();\n            mpi::DestroyValueIntType<float>();\n            mpi::DestroyValueIntType<double>();\n            mpi::DestroyMaxLocOp<Int>();\n            mpi::DestroyMaxLocOp<float>();\n            mpi::DestroyMaxLocOp<double>();\n            mpi::DestroyMinLocOp<Int>();\n            mpi::DestroyMinLocOp<float>();\n            mpi::DestroyMinLocOp<double>();\n\n            // Do the same for ValueIntPair\n            mpi::DestroyValueIntPairType<Int>();\n            mpi::DestroyValueIntPairType<float>();\n            mpi::DestroyValueIntPairType<double>();\n            mpi::DestroyMaxLocPairOp<Int>();\n            mpi::DestroyMaxLocPairOp<float>();\n            mpi::DestroyMaxLocPairOp<double>();\n            mpi::DestroyMinLocPairOp<Int>();\n            mpi::DestroyMinLocPairOp<float>();\n            mpi::DestroyMinLocPairOp<double>();\n\n            // Delete the default grid\n            delete ::defaultGrid;\n            ::defaultGrid = 0;\n\n            mpi::Finalize();\n        }\n\n#ifdef ELEM_HAVE_QT5\n        if( ::elemInitializedQt )\n        {\n            if( ::elemOpenedWindow )\n                ::coreApp->exec();\n            else\n                ::coreApp->exit();\n            delete ::coreApp;\n        }\n#endif\n\n        delete ::defaultGrid;\n        ::defaultGrid = 0;\n        while( ! ::blocksizeStack.empty() )\n            ::blocksizeStack.pop();\n    }\n}\n\nArgs& GetArgs()\n{ \n    if( args == 0 )\n        throw std::runtime_error(\"No available instance of Args\");\n    return *::args; \n}\n\nInt Blocksize()\n{ return ::blocksizeStack.top(); }\n\nvoid SetBlocksize( Int blocksize )\n{ ::blocksizeStack.top() = blocksize; }\n\nvoid PushBlocksizeStack( Int blocksize )\n{ ::blocksizeStack.push( blocksize ); }\n\nvoid PopBlocksizeStack()\n{ ::blocksizeStack.pop(); }\n\nconst Grid& DefaultGrid()\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"DefaultGrid\");\n        if( ::defaultGrid == 0 )\n            LogicError\n            (\"Attempted to return a non-existant default grid. Please ensure \"\n             \"that Elemental is initialized before creating a DistMatrix.\");\n    )\n    return *::defaultGrid;\n}\n\nInt DefaultBlockHeight()\n{ return ::blockHeight; }\n\nInt DefaultBlockWidth()\n{ return ::blockWidth; }\n\nvoid SetDefaultBlockHeight( Int mb )\n{ ::blockHeight = mb; }\n\nvoid SetDefaultBlockWidth( Int nb )\n{ ::blockWidth = nb; }\n\nstd::mt19937& Generator()\n{ return ::generator; }\n\n// If we are not in RELEASE mode, then implement wrappers for a CallStack\nDEBUG_ONLY(\n\n    void PushCallStack( std::string s )\n    { \n#ifdef ELEM_HAVE_OPENMP\n        if( omp_get_thread_num() != 0 )\n            return;\n#endif // ELEM_HAVE_OPENMP\n        ::callStack.push(s); \n    }\n\n    void PopCallStack()\n    { \n#ifdef ELEM_HAVE_OPENMP\n        if( omp_get_thread_num() != 0 )\n            return;\n#endif // ELEM_HAVE_OPENMP\n        ::callStack.pop(); \n    }\n\n    void DumpCallStack( std::ostream& os )\n    {\n        std::ostringstream msg;\n        while( ! ::callStack.empty() )\n        {\n            msg << \"[\" << ::callStack.size() << \"]: \" << ::callStack.top() \n                << \"\\n\";\n            ::callStack.pop();\n        }\n        os << msg.str();\n        os.flush();\n    }\n\n) // DEBUG_ONLY\n\ntemplate<>\nvoid SetLocalSymvBlocksize<float>( Int blocksize )\n{ ::localSymvFloatBlocksize = blocksize; }\n\ntemplate<>\nvoid SetLocalSymvBlocksize<double>( Int blocksize )\n{ ::localSymvDoubleBlocksize = blocksize; }\n\ntemplate<>\nvoid SetLocalSymvBlocksize<Complex<float>>( Int blocksize )\n{ ::localSymvComplexFloatBlocksize = blocksize; }\n\ntemplate<>\nvoid SetLocalSymvBlocksize<Complex<double>>( Int blocksize )\n{ ::localSymvComplexDoubleBlocksize = blocksize; }\n\ntemplate<>\nInt LocalSymvBlocksize<float>()\n{ return ::localSymvFloatBlocksize; }\n\ntemplate<>\nInt LocalSymvBlocksize<double>()\n{ return ::localSymvDoubleBlocksize; }\n\ntemplate<>\nInt LocalSymvBlocksize<Complex<float>>()\n{ return ::localSymvComplexFloatBlocksize; }\n\ntemplate<>\nInt LocalSymvBlocksize<Complex<double>>()\n{ return ::localSymvComplexDoubleBlocksize; }\n\ntemplate<>\nvoid SetLocalTrr2kBlocksize<float>( Int blocksize )\n{ ::localTrr2kFloatBlocksize = blocksize; }\n\ntemplate<>\nvoid SetLocalTrr2kBlocksize<double>( Int blocksize )\n{ ::localTrr2kDoubleBlocksize = blocksize; }\n\ntemplate<>\nvoid SetLocalTrr2kBlocksize<Complex<float>>( Int blocksize )\n{ ::localTrr2kComplexFloatBlocksize = blocksize; }\n\ntemplate<>\nvoid SetLocalTrr2kBlocksize<Complex<double>>( Int blocksize )\n{ ::localTrr2kComplexDoubleBlocksize = blocksize; }\n\ntemplate<>\nInt LocalTrr2kBlocksize<float>()\n{ return ::localTrr2kFloatBlocksize; }\n\ntemplate<>\nInt LocalTrr2kBlocksize<double>()\n{ return ::localTrr2kDoubleBlocksize; }\n\ntemplate<>\nInt LocalTrr2kBlocksize<Complex<float>>()\n{ return ::localTrr2kComplexFloatBlocksize; }\n\ntemplate<>\nInt LocalTrr2kBlocksize<Complex<double>>()\n{ return ::localTrr2kComplexDoubleBlocksize; }\n\ntemplate<>\nvoid SetLocalTrrkBlocksize<float>( Int blocksize )\n{ ::localTrrkFloatBlocksize = blocksize; }\n\ntemplate<>\nvoid SetLocalTrrkBlocksize<double>( Int blocksize )\n{ ::localTrrkDoubleBlocksize = blocksize; }\n\ntemplate<>\nvoid SetLocalTrrkBlocksize<Complex<float>>( Int blocksize )\n{ ::localTrrkComplexFloatBlocksize = blocksize; }\n\ntemplate<>\nvoid SetLocalTrrkBlocksize<Complex<double>>( Int blocksize )\n{ ::localTrrkComplexDoubleBlocksize = blocksize; }\n\ntemplate<>\nInt LocalTrrkBlocksize<float>()\n{ return ::localTrrkFloatBlocksize; }\n\ntemplate<>\nInt LocalTrrkBlocksize<double>()\n{ return ::localTrrkDoubleBlocksize; }\n\ntemplate<>\nInt LocalTrrkBlocksize<Complex<float>>()\n{ return ::localTrrkComplexFloatBlocksize; }\n\ntemplate<>\nInt LocalTrrkBlocksize<Complex<double>>()\n{ return ::localTrrkComplexDoubleBlocksize; }\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/imports/README.md",
    "content": "### `src/core/imports/`\n\nThis folder contains the directly-instantiated portions of Elemental's wrappers\nfor external libraries, such as BLAS, LAPACK, and PMRRR. Please see \n`include/elemental/core/imports` for the corresponding header-level prototypes\nand implementations.\n\nIn addition to this file, the folder contains:\n\n-  `blas.cpp`: wrappers for Basic Linear Algebra Subprograms (BLAS)\n-  `flame.cpp`: wrappers for FLAME's QR-based bidiagonal SVD\n-  `lapack.cpp`: wrappers for Linear Algebra PACKage (LAPACK)\n-  `mpi.cpp`: wrappers for the Message Passing Interface (MPI)\n-  `pmrrr.cpp`: wrappers for Parallel Multiple Relatively Robust Representations\n   (PMRRR)\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/imports/blas.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\nusing elem::scomplex;\nusing elem::dcomplex;\n\nextern \"C\" {\n\n// Level 1 BLAS\n// ============\nvoid ELEM_BLAS(saxpy)\n( const int* n, const float* alpha, const float* x, const int* incx,\n                                          float* y, const int* incy );\nvoid ELEM_BLAS(daxpy)\n( const int* n, const double* alpha, const double* x, const int* incx,\n                                           double* y, const int* incy );\nvoid ELEM_BLAS(caxpy)\n( const int* n, const scomplex* alpha,\n  const scomplex* x, const int* incx,\n        scomplex* y, const int* incy );\nvoid ELEM_BLAS(zaxpy)\n( const int* n, const dcomplex* alpha,\n  const dcomplex* x, const int* incx,\n        dcomplex* y, const int* incy );\n\nvoid ELEM_BLAS(scopy)\n( const int* n, const float* x, const int* incx,\n                      float* y, const int* incy );\nvoid ELEM_BLAS(dcopy)\n( const int* n, const double* x, const int* incx,\n                      double* y, const int* incy );\nvoid ELEM_BLAS(ccopy)\n( const int* n, const scomplex* x, const int* incx,\n                      scomplex* y, const int* incy );\nvoid ELEM_BLAS(zcopy)\n( const int* n, const dcomplex* x, const int* incx,\n                      dcomplex* y, const int* incy );\n\nfloat ELEM_BLAS(sdot)\n( const int* n, const float* x, const int* incx,\n                const float* y, const int* incy );\ndouble ELEM_BLAS(ddot)\n( const int* n, const double* x, const int* incx,\n                const double* y, const int* incy );\n// To avoid the compatibility issue, we simply handroll our own complex dots\nfloat  ELEM_BLAS(snrm2) ( const int* n, const float   * x, const int* incx );\ndouble ELEM_BLAS(dnrm2) ( const int* n, const double  * x, const int* incx );\nfloat  ELEM_BLAS(scnrm2)( const int* n, const scomplex* x, const int* incx );\ndouble ELEM_BLAS(dznrm2)( const int* n, const dcomplex* x, const int* incx );\n\n// Apply a Givens rotation to a pair of vectors\nvoid ELEM_BLAS(srot)\n( const int* n, float* x, const int* incx, float* y, const int* incy,\n  const float* c, const float* s );\nvoid ELEM_BLAS(drot)\n( const int* n, double* x, const int* incx, double* y, const int* incy,\n  const double* c, const double* s );\nvoid ELEM_BLAS(crot)\n( const int* n, scomplex* x, const int* incx, scomplex* y, const int* incy,\n  const float* c, const scomplex* s );\nvoid ELEM_BLAS(zrot)\n( const int* n, dcomplex* x, const int* incx, dcomplex* y, const int* incy,\n  const double* c, const dcomplex* s );\n\n// Quickly compute a Givens rotation\nvoid ELEM_BLAS(srotg)\n( float* alpha, float* beta, float* c, float* s );\nvoid ELEM_BLAS(drotg)\n( double* alpha, double* beta, double* c, double* s );\nvoid ELEM_BLAS(crotg)\n( scomplex* alpha, scomplex* beta, float* c, scomplex* s );\nvoid ELEM_BLAS(zrotg)\n( dcomplex* alpha, dcomplex* beta, double* c, dcomplex* s );\n\n// Scale a vector\nvoid ELEM_BLAS(sscal)\n( const int* n, const float   * alpha, float   * x, const int* incx );\nvoid ELEM_BLAS(dscal)\n( const int* n, const double  * alpha, double  * x, const int* incx );\nvoid ELEM_BLAS(cscal)\n( const int* n, const scomplex* alpha, scomplex* x, const int* incx );\nvoid ELEM_BLAS(zscal)\n( const int* n, const dcomplex* alpha, dcomplex* x, const int* incx );\n\nvoid ELEM_BLAS(sswap)\n( const int* n, float   * x, const int* incx, float   * y, const int* incy );\nvoid ELEM_BLAS(dswap)\n( const int* n, double  * x, const int* incx, double  * y, const int* incy );\nvoid ELEM_BLAS(cswap)\n( const int* n, scomplex* x, const int* incx, scomplex* y, const int* incy );\nvoid ELEM_BLAS(zswap)\n( const int* n, dcomplex* x, const int* incx, dcomplex* y, const int* incy );\n\n// Level 2 BLAS\n// ============\nvoid ELEM_BLAS(sgemv)\n( const char* trans, const int* m, const int* n,\n  const float* alpha, const float* A, const int* lda,\n                      const float* x, const int* incx,\n  const float* beta,        float* y, const int* incy );\nvoid ELEM_BLAS(dgemv)\n( const char* trans, const int* m, const int* n,\n  const double* alpha, const double* A, const int* lda,\n                       const double* x, const int* incx,\n  const double* beta,        double* y, const int* incy );\nvoid ELEM_BLAS(cgemv)\n( const char* trans, const int* m, const int* n,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n  const scomplex* x, const int* incx,\n  const scomplex* beta,\n        scomplex* y, const int* incy );\nvoid ELEM_BLAS(zgemv)\n( const char* trans, const int* m, const int* n,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n  const dcomplex* x, const int* incx,\n  const dcomplex* beta,\n        dcomplex* y, const int* incy );\n\nvoid ELEM_BLAS(sger)\n( const int* m, const int* n,\n  const float* alpha, const float* x, const int* incx,\n                      const float* y, const int* incy,\n                            float* A, const int* lda  );\nvoid ELEM_BLAS(dger)\n( const int* m, const int* n,\n  const double* alpha, const double* x, const int* incx,\n                       const double* y, const int* incy,\n                             double* A, const int* lda  );\nvoid ELEM_BLAS(cgerc)\n( const int* m, const int* n,\n  const scomplex* alpha,\n  const scomplex* x, const int* incx,\n  const scomplex* y, const int* incy,\n        scomplex* A, const int* lda  );\nvoid ELEM_BLAS(zgerc)\n( const int* m, const int* n,\n  const dcomplex* alpha,\n  const dcomplex* x, const int* incx,\n  const dcomplex* y, const int* incy,\n        dcomplex* A, const int* lda  );\n\nvoid ELEM_BLAS(cgeru)\n( const int* m, const int* n,\n  const scomplex* alpha,\n  const scomplex* x, const int* incx,\n  const scomplex* y, const int* incy,\n        scomplex* A, const int* lda  );\nvoid ELEM_BLAS(zgeru)\n( const int* m, const int* n,\n  const dcomplex* alpha,\n  const dcomplex* x, const int* incx,\n  const dcomplex* y, const int* incy,\n        dcomplex* A, const int* lda  );\n\nvoid ELEM_BLAS(chemv)\n( const char* uplo, const int* m,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n  const scomplex* x, const int* incx,\n  const scomplex* beta,\n        scomplex* y, const int* incy );\nvoid ELEM_BLAS(zhemv)\n( const char* uplo, const int* m,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n  const dcomplex* x, const int* incx,\n  const dcomplex* beta,\n        dcomplex* y, const int* incy );\n\nvoid ELEM_BLAS(cher)\n( const char* uplo, const int* m,\n  const scomplex* alpha,\n  const scomplex* x, const int* incx,\n        scomplex* A, const int* lda  );\nvoid ELEM_BLAS(zher)\n( const char* uplo, const int* m,\n  const dcomplex* alpha,\n  const dcomplex* x, const int* incx,\n        dcomplex* A, const int* lda  );\n\nvoid ELEM_BLAS(cher2)\n( const char* uplo, const int* m,\n  const scomplex* alpha,\n  const scomplex* x, const int* incx,\n  const scomplex* y, const int* incy,\n        scomplex* A, const int* lda  );\nvoid ELEM_BLAS(zher2)\n( const char* uplo, const int* m,\n  const dcomplex* alpha,\n  const dcomplex* x, const int* incx,\n  const dcomplex* y, const int* incy,\n        dcomplex* A, const int* lda  );\n\nvoid ELEM_BLAS(ssymv)\n( const char* uplo, const int* m,\n  const float* alpha, const float* A, const int* lda,\n                      const float* x, const int* incx,\n  const float* beta,        float* y, const int* incy );\nvoid ELEM_BLAS(dsymv)\n( const char* uplo, const int* m,\n  const double* alpha, const double* A, const int* lda,\n                       const double* x, const int* incx,\n  const double* beta,        double* y, const int* incy );\n// 'csymv' is an auxiliary LAPACK routine, but we will treat it as BLAS\nvoid ELEM_LAPACK(csymv)\n( const char* uplo, const int* m,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n  const scomplex* x, const int* incx,\n  const scomplex* beta,\n        scomplex* y, const int* incy );\n// 'zsymv' is an auxiliary LAPACK routine, but we will treat it as BLAS\nvoid ELEM_LAPACK(zsymv)\n( const char* uplo, const int* m,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n  const dcomplex* x, const int* incx,\n  const dcomplex* beta,\n        dcomplex* y, const int* incy );\n\nvoid ELEM_BLAS(ssyr)\n( const char* uplo, const int* m,\n  const float* alpha, const float* x, const int* incx,\n                            float* A, const int* lda  );\nvoid ELEM_BLAS(dsyr)\n( const char* uplo, const int* m,\n  const double* alpha, const double* x, const int* incx,\n                             double* A, const int* lda  );\n// 'csyr' is an auxilliary LAPACK routine, but we will treat it as BLAS\nvoid ELEM_LAPACK(csyr)\n( const char* uplo, const int* m,\n  const scomplex* alpha,\n  const scomplex* x, const int* incx,\n        scomplex* A, const int* lda  );\n// 'zsyr' is an auxilliary LAPACK routine, but we will treat it as BLAS\nvoid ELEM_LAPACK(zsyr)\n( const char* uplo, const int* m,\n  const dcomplex* alpha,\n  const dcomplex* x, const int* incx,\n        dcomplex* A, const int* lda  );\n\nvoid ELEM_BLAS(ssyr2)\n( const char* uplo, const int* m,\n  const float* alpha, const float* x, const int* incx,\n                      const float* y, const int* incy,\n                            float* A, const int* lda  );\nvoid ELEM_BLAS(dsyr2)\n( const char* uplo, const int* m,\n  const double* alpha, const double* x, const int* incx,\n                       const double* y, const int* incy,\n                             double* A, const int* lda  );\n\nvoid ELEM_BLAS(strmv)\n( const char* uplo, const char* trans, const char* diag, const int* m,\n  const float* A, const int* lda, float* x, const int* incx );\nvoid ELEM_BLAS(dtrmv)\n( const char* uplo, const char* trans, const char* diag, const int* m,\n  const double* A, const int* lda, double* x, const int* incx );\nvoid ELEM_BLAS(ctrmv)\n( const char* uplo, const char* trans, const char* diag, const int* m,\n  const scomplex* A, const int* lda,\n        scomplex* x, const int* incx );\nvoid ELEM_BLAS(ztrmv)\n( const char* uplo, const char* trans, const char* diag, const int* m,\n  const dcomplex* A, const int* lda,\n        dcomplex* x, const int* incx );\n\nvoid ELEM_BLAS(strsv)\n( const char* uplo, const char* trans, const char* diag, const int* m,\n  const float* A, const int* lda, float* x, const int* incx );\nvoid ELEM_BLAS(dtrsv)\n( const char* uplo, const char* trans, const char* diag, const int* m,\n  const double* A, const int* lda, double* x, const int* incx );\nvoid ELEM_BLAS(ctrsv)\n( const char* uplo, const char* trans, const char* diag, const int* m,\n  const scomplex* A, const int* lda,\n        scomplex* x, const int* incx );\nvoid ELEM_BLAS(ztrsv)\n( const char* uplo, const char* trans, const char* diag, const int* m,\n  const dcomplex* A, const int* lda,\n        dcomplex* x, const int* incx );\n\n// Level 3 BLAS \n// ============\nvoid ELEM_BLAS(sgemm)\n( const char* transA, const char* transB,\n  const int* m, const int* n, const int* k,\n  const float* alpha, const float* A, const int* lda,\n                      const float* B, const int* ldb,\n  const float* beta,        float* C, const int* ldc );\nvoid ELEM_BLAS(dgemm)\n( const char* transA, const char* transB,\n  const int* m, const int* n, const int* k,\n  const double* alpha, const double* A, const int* lda,\n                       const double* B, const int* ldb,\n  const double* beta,        double* C, const int* ldc );\nvoid ELEM_BLAS(cgemm)\n( const char* transA, const char* transB,\n  const int* m, const int* n, const int* k,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n  const scomplex* B, const int* ldb,\n  const scomplex* beta,\n        scomplex* C, const int* ldc );\nvoid ELEM_BLAS(zgemm)\n( const char* transA, const char* transB,\n  const int* m, const int* n, const int* k,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n  const dcomplex* B, const int* ldb,\n  const dcomplex* beta,\n        dcomplex* C, const int* ldc );\n\nvoid ELEM_BLAS(chemm)\n( const char* side, const char* uplo,\n  const int* m, const int* n,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n  const scomplex* B, const int* ldb,\n  const scomplex* beta,\n        scomplex* C, const int* ldc );\nvoid ELEM_BLAS(zhemm)\n( const char* side, const char* uplo,\n  const int* m, const int* n,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n  const dcomplex* B, const int* ldb,\n  const dcomplex* beta,\n        dcomplex* C, const int* ldc );\n\nvoid ELEM_BLAS(cher2k)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n  const scomplex* B, const int* ldb,\n  const scomplex* beta,\n        scomplex* C, const int* ldc );\nvoid ELEM_BLAS(zher2k)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n  const dcomplex* B, const int* ldb,\n  const dcomplex* beta,\n        dcomplex* C, const int* ldc );\n\nvoid ELEM_BLAS(cherk)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n  const scomplex* beta,\n        scomplex* C, const int* ldc );\nvoid ELEM_BLAS(zherk)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n  const dcomplex* beta,\n        dcomplex* C, const int* ldc );\n\nvoid ELEM_BLAS(ssymm)\n( const char* side, const char* uplo,\n  const int* m, const int* n,\n  const float* alpha, const float* A, const int* lda,\n                      const float* B, const int* ldb,\n  const float* beta,        float* C, const int* ldc );\nvoid ELEM_BLAS(dsymm)\n( const char* side, const char* uplo,\n  const int* m, const int* n,\n  const double* alpha, const double* A, const int* lda,\n                       const double* B, const int* ldb,\n  const double* beta,        double* C, const int* ldc );\nvoid ELEM_BLAS(csymm)\n( const char* side, const char* uplo,\n  const int* m, const int* n,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n  const scomplex* B, const int* ldb,\n  const scomplex* beta,\n        scomplex* C, const int* ldc );\nvoid ELEM_BLAS(zsymm)\n( const char* side, const char* uplo,\n  const int* m, const int* n,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n  const dcomplex* B, const int* ldb,\n  const dcomplex* beta,\n        dcomplex* C, const int* ldc );\n\nvoid ELEM_BLAS(ssyr2k)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const float* alpha, const float* A, const int* lda,\n                      const float* B, const int* ldb,\n  const float* beta,        float* C, const int* ldc );\nvoid ELEM_BLAS(dsyr2k)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const double* alpha, const double* A, const int* lda,\n                       const double* B, const int* ldb,\n  const double* beta,        double* C, const int* ldc );\nvoid ELEM_BLAS(csyr2k)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n  const scomplex* B, const int* ldb,\n  const scomplex* beta,\n        scomplex* C, const int* ldc );\nvoid ELEM_BLAS(zsyr2k)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n  const dcomplex* B, const int* ldb,\n  const dcomplex* beta,\n        dcomplex* C, const int* ldc );\n\nvoid ELEM_BLAS(ssyrk)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const float* alpha, const float* A, const int* lda,\n  const float* beta,        float* C, const int* ldc );\nvoid ELEM_BLAS(dsyrk)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const double* alpha, const double* A, const int* lda,\n  const double* beta,        double* C, const int* ldc );\nvoid ELEM_BLAS(csyrk)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n  const scomplex* beta,\n        scomplex* C, const int* ldc );\nvoid ELEM_BLAS(zsyrk)\n( const char* uplo, const char* trans,\n  const int* n, const int* k,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n  const dcomplex* beta,\n        dcomplex* C, const int* ldc );\n\nvoid ELEM_BLAS(strmm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n,\n  const float* alpha, const float* A, const int* lda,\n                            float* B, const int* ldb );\nvoid ELEM_BLAS(dtrmm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n,\n  const double* alpha, const double* A, const int* lda,\n                             double* B, const int* ldb );\nvoid ELEM_BLAS(ctrmm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n        scomplex* B, const int* ldb );\nvoid ELEM_BLAS(ztrmm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n        dcomplex* B, const int* ldb );\n\nvoid ELEM_BLAS(strsm)\n( const char* side, const char* uplo, const char* transA, const char* diag,\n  const int* m, const int* n,\n  const float* alpha, const float* A, const int* lda,\n                            float* B, const int* ldb );\nvoid ELEM_BLAS(dtrsm)\n( const char* side, const char* uplo, const char* transA, const char* diag,\n  const int* m, const int* n,\n  const double* alpha, const double* A, const int* lda,\n                             double* B, const int* ldb );\nvoid ELEM_BLAS(ctrsm)\n( const char* side, const char* uplo, const char* transA, const char* diag,\n  const int* m, const int* n,\n  const scomplex* alpha,\n  const scomplex* A, const int* lda,\n        scomplex* B, const int* ldb );\nvoid ELEM_BLAS(ztrsm)\n( const char* side, const char* uplo, const char* transA, const char* diag,\n  const int* m, const int* n,\n  const dcomplex* alpha,\n  const dcomplex* A, const int* lda,\n        dcomplex* B, const int* ldb );\n\n} // extern \"C\"\n\nnamespace elem {\nnamespace blas {\n\n// Level 1 BLAS\n// ============\nvoid Axpy\n( int n, float alpha, const float* x, int incx, float* y, int incy )\n{ ELEM_BLAS(saxpy)( &n, &alpha, x, &incx, y, &incy ); }\nvoid Axpy\n( int n, double alpha, const double* x, int incx, double* y, int incy )\n{ ELEM_BLAS(daxpy)( &n, &alpha, x, &incx, y, &incy ); }\nvoid Axpy\n( int n, scomplex alpha, const scomplex* x, int incx, scomplex* y, int incy )\n{ ELEM_BLAS(caxpy)( &n, &alpha, x, &incx, y, &incy ); }\nvoid Axpy\n( int n, dcomplex alpha, const dcomplex* x, int incx, dcomplex* y, int incy )\n{ ELEM_BLAS(zaxpy)( &n, &alpha, x, &incx, y, &incy ); }\n\nvoid Copy( int n, const float* x, int incx, float* y, int incy )\n{ ELEM_BLAS(scopy)( &n, x, &incx, y, &incy ); }\nvoid Copy( int n, const double* x, int incx, double* y, int incy )\n{ ELEM_BLAS(dcopy)( &n, x, &incx, y, &incy ); }\nvoid Copy( int n, const scomplex* x, int incx, scomplex* y, int incy )\n{ ELEM_BLAS(ccopy)( &n, x, &incx, y, &incy ); }\nvoid Copy( int n, const dcomplex* x, int incx, dcomplex* y, int incy )\n{ ELEM_BLAS(zcopy)( &n, x, &incx, y, &incy ); }\n\nfloat Dot( int n, const float* x, int incx, const float* y, int incy )\n{ return ELEM_BLAS(sdot)( &n, x, &incx, y, &incy ); }\ndouble Dot( int n, const double* x, int incx, const double* y, int incy )\n{ return ELEM_BLAS(ddot)( &n, x, &incx, y, &incy ); }\nscomplex Dot( int n, const scomplex* x, int incx, const scomplex* y, int incy )\n{ \n    scomplex alpha = 0;\n    for( int i=0; i<n; ++i ) \n        alpha += Conj(x[i*incx])*y[i*incy];\n    return alpha;\n}\ndcomplex Dot( int n, const dcomplex* x, int incx, const dcomplex* y, int incy )\n{\n    dcomplex alpha = 0;\n    for( int i=0; i<n; ++i ) \n        alpha += Conj(x[i*incx])*y[i*incy];\n    return alpha;\n}\n\nfloat Dotc( int n, const float* x, int incx, const float* y, int incy )\n{ return ELEM_BLAS(sdot)( &n, x, &incx, y, &incy ); }\ndouble Dotc( int n, const double* x, int incx, const double* y, int incy )\n{ return ELEM_BLAS(ddot)( &n, x, &incx, y, &incy ); }\nscomplex Dotc( int n, const scomplex* x, int incx, const scomplex* y, int incy )\n{ \n    scomplex alpha = 0;\n    for( int i=0; i<n; ++i ) \n        alpha += Conj(x[i*incx])*y[i*incy];\n    return alpha;\n}\ndcomplex Dotc( int n, const dcomplex* x, int incx, const dcomplex* y, int incy )\n{ \n    dcomplex alpha = 0;\n    for( int i=0; i<n; ++i ) \n        alpha += Conj(x[i*incx])*y[i*incy];\n    return alpha;\n}\n\nfloat Dotu( int n, const float* x, int incx, const float* y, int incy )\n{ return ELEM_BLAS(sdot)( &n, x, &incx, y, &incy ); }\ndouble Dotu( int n, const double* x, int incx, const double* y, int incy )\n{ return ELEM_BLAS(ddot)( &n, x, &incx, y, &incy ); }\nscomplex Dotu( int n, const scomplex* x, int incx, const scomplex* y, int incy )\n{\n    scomplex alpha = 0;\n    for( int i=0; i<n; ++i ) \n        alpha += x[i*incx]*y[i*incy];\n    return alpha;\n}\ndcomplex Dotu( int n, const dcomplex* x, int incx, const dcomplex* y, int incy )\n{\n    dcomplex alpha = 0;\n    for( int i=0; i<n; ++i ) \n        alpha += x[i*incx]*y[i*incy];\n    return alpha;\n}\n\nfloat Nrm2( int n, const float* x, int incx )\n{ return ELEM_BLAS(snrm2)( &n, x, &incx ); }\ndouble Nrm2( int n, const double* x, int incx )\n{ return ELEM_BLAS(dnrm2)( &n, x, &incx ); }\nfloat Nrm2( int n, const scomplex* x, int incx )\n{ return ELEM_BLAS(scnrm2)( &n, x, &incx ); }\ndouble Nrm2( int n, const dcomplex* x, int incx )\n{ return ELEM_BLAS(dznrm2)( &n, x, &incx ); }\n\nfloat Givens\n( float alpha, float beta, float* c, float* s )\n{ ELEM_BLAS(srotg)( &alpha, &beta, c, s ); return alpha; }\ndouble Givens\n( double alpha, double beta, double* c, double* s )\n{ ELEM_BLAS(drotg)( &alpha, &beta, c, s ); return alpha; }\nscomplex Givens\n( scomplex alpha, scomplex beta, float* c, scomplex* s )\n{ ELEM_BLAS(crotg)( &alpha, &beta, c, s ); return alpha; }\ndcomplex Givens\n( dcomplex alpha, dcomplex beta, double* c, dcomplex* s )\n{ ELEM_BLAS(zrotg)( &alpha, &beta, c, s ); return alpha; }\n\nvoid Rot\n( int n, float* x, int incx, float* y, int incy, float c, float s )\n{ ELEM_BLAS(srot)( &n, x, &incx, y, &incy, &c, &s ); }\nvoid Rot\n( int n, double* x, int incx, double* y, int incy, double c, double s )\n{ ELEM_BLAS(drot)( &n, x, &incx, y, &incy, &c, &s ); }\nvoid Rot\n( int n, scomplex* x, int incx, scomplex* y, int incy, float c, scomplex s )\n{ ELEM_BLAS(crot)( &n, x, &incx, y, &incy, &c, &s ); }\nvoid Rot\n( int n, dcomplex* x, int incx, dcomplex* y, int incy, double c, dcomplex s )\n{ ELEM_BLAS(zrot)( &n, x, &incx, y, &incy, &c, &s ); }\n\nvoid Scal( int n, float alpha, float* x, int incx )\n{ ELEM_BLAS(sscal)( &n, &alpha, x, &incx ); }\nvoid Scal( int n, double alpha, double* x, int incx )\n{ ELEM_BLAS(dscal)( &n, &alpha, x, &incx ); }\nvoid Scal( int n, scomplex alpha, scomplex* x, int incx )\n{ ELEM_BLAS(cscal)( &n, &alpha, x, &incx ); }\nvoid Scal( int n, dcomplex alpha, dcomplex* x, int incx )\n{ ELEM_BLAS(zscal)( &n, &alpha, x, &incx ); }\n\nvoid Swap( int n, float* x, int incx, float* y, int incy )\n{ ELEM_BLAS(sswap)( &n, x, &incx, y, &incy ); }\nvoid Swap( int n, double* x, int incx, double* y, int incy )\n{ ELEM_BLAS(dswap)( &n, x, &incx, y, &incy ); }\nvoid Swap( int n, scomplex* x, int incx, scomplex* y, int incy )\n{ ELEM_BLAS(cswap)( &n, x, &incx, y, &incy ); }\nvoid Swap( int n, dcomplex* x, int incx, dcomplex* y, int incy )\n{ ELEM_BLAS(zswap)( &n, x, &incx, y, &incy ); }\n\n// Level 2 BLAS\n// ============\nvoid Gemv\n( char trans, int m, int n,\n  float alpha, const float* A, int lda, const float* x, int incx,\n  float beta,        float* y, int incy )\n{\n    const char fixedTrans = ( trans == 'C' ? 'T' : trans );\n    ELEM_BLAS(sgemv)\n    ( &fixedTrans, &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy );\n}\n\nvoid Gemv\n( char trans, int m, int n,\n  double alpha, const double* A, int lda, const double* x, int incx,\n  double beta,        double* y, int incy )\n{\n    const char fixedTrans = ( trans == 'C' ? 'T' : trans );\n    ELEM_BLAS(dgemv)\n    ( &fixedTrans, &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy );\n}\n\nvoid Gemv\n( char trans, int m, int n,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* x, int incx,\n  scomplex beta,        scomplex* y, int incy )\n{ ELEM_BLAS(cgemv)\n  ( &trans, &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy ); }\n\nvoid Gemv\n( char trans, int m, int n,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* x, int incx,\n  dcomplex beta,        dcomplex* y, int incy )\n{ ELEM_BLAS(zgemv)\n  ( &trans, &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy ); }\n\nvoid Ger\n( int m, int n,\n  float alpha, const float* x, int incx, const float* y, int incy,\n                     float* A, int lda )\n{ ELEM_BLAS(sger)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Ger\n( int m, int n,\n  double alpha, const double* x, int incx, const double* y, int incy,\n                      double* A, int lda  )\n{ ELEM_BLAS(dger)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Ger\n( int m, int n,\n  scomplex alpha, const scomplex* x, int incx, const scomplex* y, int incy,\n                        scomplex* A, int lda )\n{ ELEM_BLAS(cgerc)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Ger\n( int m, int n,\n  dcomplex alpha, const dcomplex* x, int incx, const dcomplex* y, int incy,\n                        dcomplex* A, int lda )\n{ ELEM_BLAS(zgerc)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Gerc\n( int m, int n,\n  float alpha, const float* x, int incx, const float* y, int incy,\n                     float* A, int lda )\n{ ELEM_BLAS(sger)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Gerc\n( int m, int n,\n  double alpha, const double* x, int incx, const double* y, int incy,\n                      double* A, int lda )\n{ ELEM_BLAS(dger)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Gerc\n( int m, int n,\n  scomplex alpha, const scomplex* x, int incx, const scomplex* y, int incy,\n                        scomplex* A, int lda )\n{ ELEM_BLAS(cgerc)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Gerc\n( int m, int n,\n  dcomplex alpha, const dcomplex* x, int incx, const dcomplex* y, int incy,\n                        dcomplex* A, int lda )\n{ ELEM_BLAS(zgerc)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Geru\n( int m, int n,\n  float alpha, const float* x, int incx, const float* y, int incy,\n                     float* A, int lda )\n{ ELEM_BLAS(sger)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Geru\n( int m, int n,\n  double alpha, const double* x, int incx, const double* y, int incy,\n                      double* A, int lda )\n{ ELEM_BLAS(dger)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Geru\n( int m, int n,\n  scomplex alpha, const scomplex* x, int incx, const scomplex* y, int incy,\n                        scomplex* A, int lda )\n{ ELEM_BLAS(cgeru)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Geru\n( int m, int n,\n  dcomplex alpha, const dcomplex* x, int incx, const dcomplex* y, int incy,\n                        dcomplex* A, int lda )\n{ ELEM_BLAS(zgeru)( &m, &n, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Hemv\n( char uplo, int m,\n  float alpha, const float* A, int lda, const float* x, int incx,\n  float beta,        float* y, int incy )\n{ ELEM_BLAS(ssymv)( &uplo, &m, &alpha, A, &lda, x, &incx, &beta, y, &incy ); }\n\nvoid Hemv\n( char uplo, int m,\n  double alpha, const double* A, int lda, const double* x, int incx,\n  double beta,        double* y, int incy )\n{ ELEM_BLAS(dsymv)( &uplo, &m, &alpha, A, &lda, x, &incx, &beta, y, &incy ); }\n\nvoid Hemv\n( char uplo, int m,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* x, int incx,\n  scomplex beta,        scomplex* y, int incy )\n{ ELEM_BLAS(chemv)( &uplo, &m, &alpha, A, &lda, x, &incx, &beta, y, &incy ); }\n\nvoid Hemv\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* x, int incx,\n  dcomplex beta,        dcomplex* y, int incy )\n{ ELEM_BLAS(zhemv)( &uplo, &m, &alpha, A, &lda, x, &incx, &beta, y, &incy ); }\n\nvoid Her\n( char uplo, int m,\n  float alpha, const float* x, int incx, float* A, int lda )\n{ ELEM_BLAS(ssyr)( &uplo, &m, &alpha, x, &incx, A, &lda ); }\n\nvoid Her\n( char uplo, int m,\n  double alpha, const double* x, int incx, double* A, int lda )\n{ ELEM_BLAS(dsyr)( &uplo, &m, &alpha, x, &incx, A, &lda ); }\n\nvoid Her\n( char uplo, int m,\n  scomplex alpha, const scomplex* x, int incx, scomplex* A, int lda )\n{ ELEM_BLAS(cher)( &uplo, &m, &alpha, x, &incx, A, &lda ); }\n\nvoid Her\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* x, int incx, dcomplex* A, int lda )\n{ ELEM_BLAS(zher)( &uplo, &m, &alpha, x, &incx, A, &lda ); }\n\nvoid Her2\n( char uplo, int m,\n  float alpha, const float* x, int incx, const float* y, int incy,\n                     float* A, int lda )\n{ ELEM_BLAS(ssyr2)( &uplo, &m, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Her2\n( char uplo, int m,\n  double alpha, const double* x, int incx, const double* y, int incy,\n                      double* A, int lda )\n{ ELEM_BLAS(dsyr2)( &uplo, &m, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Her2\n( char uplo, int m,\n  scomplex alpha, const scomplex* x, int incx, const scomplex* y, int incy,\n                        scomplex* A, int lda )\n{ ELEM_BLAS(cher2)( &uplo, &m, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Her2\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* x, int incx, const dcomplex* y, int incy,\n                        dcomplex* A, int lda )\n{ ELEM_BLAS(zher2)( &uplo, &m, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Symv\n( char uplo, int m,\n  float alpha, const float* A, int lda, const float* x, int incx,\n  float beta,        float* y, int incy )\n{ ELEM_BLAS(ssymv)( &uplo, &m, &alpha, A, &lda, x, &incx, &beta, y, &incy ); }\n\nvoid Symv\n( char uplo, int m,\n  double alpha, const double* A, int lda, const double* x, int incx,\n  double beta,        double* y, int incy )\n{ ELEM_BLAS(dsymv)( &uplo, &m, &alpha, A, &lda, x, &incx, &beta, y, &incy ); }\n\nvoid Symv\n( char uplo, int m,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* x, int incx,\n  scomplex beta,        scomplex* y, int incy )\n{\n    // Recall that 'csymv' is an LAPACK auxiliary routine\n    ELEM_LAPACK(csymv)( &uplo, &m, &alpha, A, &lda, x, &incx, &beta, y, &incy );\n}\n\nvoid Symv\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* x, int incx,\n  dcomplex beta,        dcomplex* y, int incy )\n{\n    // Recall that 'zsymv' is an LAPACK auxiliary routine\n    ELEM_LAPACK(zsymv)( &uplo, &m, &alpha, A, &lda, x, &incx, &beta, y, &incy );\n}\n\nvoid Syr\n( char uplo, int m,\n  float alpha, const float* x, int incx, float* A, int lda  )\n{ ELEM_BLAS(ssyr)( &uplo, &m, &alpha, x, &incx, A, &lda ); }\n\nvoid Syr\n( char uplo, int m,\n  double alpha, const double* x, int incx, double* A, int lda )\n{ ELEM_BLAS(dsyr)( &uplo, &m, &alpha, x, &incx, A, &lda ); }\n\nvoid Syr\n( char uplo, int m,\n  scomplex alpha, const scomplex* x, int incx, scomplex* A, int lda )\n{\n    // Recall that 'csyr' is an LAPACK auxiliary routine\n    ELEM_LAPACK(csyr)( &uplo, &m, &alpha, x, &incx, A, &lda ); \n}\n\nvoid Syr\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* x, int incx, dcomplex* A, int lda )\n{\n    // Recall that 'zsyr' is an LAPACK auxiliary routine\n    ELEM_LAPACK(zsyr)( &uplo, &m, &alpha, x, &incx, A, &lda ); \n}\n\nvoid Syr2\n( char uplo, int m,\n  float alpha, const float* x, int incx, const float* y, int incy,\n                     float* A, int lda )\n{ ELEM_BLAS(ssyr2)( &uplo, &m, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Syr2\n( char uplo, int m,\n  double alpha, const double* x, int incx, const double* y, int incy,\n                      double* A, int lda )\n{ ELEM_BLAS(dsyr2)( &uplo, &m, &alpha, x, &incx, y, &incy, A, &lda ); }\n\nvoid Syr2\n( char uplo, int m,\n  scomplex alpha, const scomplex* x, int incx, const scomplex* y, int incy,\n                        scomplex* A, int lda )\n{\n    // csyr2 doesn't exist, so we route through csyr2k. However, csyr2k expects \n    // contiguous access of 'x', so we treat x and y as a row vectors where \n    // their leading dimensions are 'incx' and 'incy'. Thus we must perform \n    // A += x' y + y' x\n    const char trans = 'T';\n    const int k = 1;\n    const scomplex beta = 1.;\n    ELEM_BLAS(csyr2k)\n    ( &uplo, &trans, &m, &k, &alpha, x, &incx, y, &incy, &beta, A, &lda );\n}\n\nvoid Syr2\n( char uplo, int m,\n  dcomplex alpha, const dcomplex* x, int incx, const dcomplex* y, int incy,\n                        dcomplex* A, int lda )\n{\n    // zsyr2 doesn't exist, so we route through zsyr2k. However, zsyr2k expects \n    // contiguous access of 'x', so we treat x and y as a row vectors where \n    // their leading dimensions are 'incx' and 'incy'. Thus we must perform \n    // A += x' y + y' x\n    const char trans = 'T';\n    const int k = 1;\n    const dcomplex beta = 1.;\n    ELEM_BLAS(zsyr2k)\n    ( &uplo, &trans, &m, &k, &alpha, x, &incx, y, &incy, &beta, A, &lda );\n}\n\nvoid Trmv\n( char uplo, char trans, char diag, int m,\n  const float* A, int lda, float* x, int incx )\n{ ELEM_BLAS(strmv)( &uplo, &trans, &diag, &m, A, &lda, x, &incx ); }\n\nvoid Trmv\n( char uplo, char trans, char diag, int m,\n  const double* A, int lda, double* x, int incx )\n{ ELEM_BLAS(dtrmv)( &uplo, &trans, &diag, &m, A, &lda, x, &incx ); }\n\nvoid Trmv\n( char uplo, char trans, char diag, int m,\n  const scomplex* A, int lda, scomplex* x, int incx )\n{ ELEM_BLAS(ctrmv)( &uplo, &trans, &diag, &m, A, &lda, x, &incx ); }\n\nvoid Trmv\n( char uplo, char trans, char diag, int m,\n  const dcomplex* A, int lda, dcomplex* x, int incx )\n{ ELEM_BLAS(ztrmv)( &uplo, &trans, &diag, &m, A, &lda, x, &incx ); }\n\nvoid Trsv\n( char uplo, char trans, char diag, int m,\n  const float* A, int lda, float* x, int incx )\n{ ELEM_BLAS(strsv)( &uplo, &trans, &diag, &m, A, &lda, x, &incx ); }\n\nvoid Trsv\n( char uplo, char trans, char diag, int m,\n  const double* A, int lda, double* x, int incx )\n{ ELEM_BLAS(dtrsv)( &uplo, &trans, &diag, &m, A, &lda, x, &incx ); }\n\nvoid Trsv\n( char uplo, char trans, char diag, int m,\n  const scomplex* A, int lda, scomplex* x, int incx )\n{ ELEM_BLAS(ctrsv)( &uplo, &trans, &diag, &m, A, &lda, x, &incx ); }\n\nvoid Trsv\n( char uplo, char trans, char diag, int m,\n  const dcomplex* A, int lda, dcomplex* x, int incx )\n{ ELEM_BLAS(ztrsv)( &uplo, &trans, &diag, &m, A, &lda, x, &incx ); }\n\n// Level 3 BLAS\n// ============\nvoid Gemm\n( char transA, char transB, int m, int n, int k, \n  float alpha, const float* A, int lda, const float* B, int ldb,\n  float beta,        float* C, int ldc )\n{\n    const char fixedTransA = ( transA == 'C' ? 'T' : transA );\n    const char fixedTransB = ( transB == 'C' ? 'T' : transB );\n    ELEM_BLAS(sgemm)\n    ( &fixedTransA, &fixedTransB, &m, &n, &k,\n      &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Gemm\n( char transA, char transB,\n  int m, int n, int k, \n  double alpha, const double* A, int lda, const double* B, int ldb,\n  double beta,        double* C, int ldc )\n{\n    const char fixedTransA = ( transA == 'C' ? 'T' : transA );\n    const char fixedTransB = ( transB == 'C' ? 'T' : transB );\n    ELEM_BLAS(dgemm)\n    ( &fixedTransA, &fixedTransB, &m, &n, &k,\n      &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Gemm\n( char transA, char transB, int m, int n, int k, \n  scomplex alpha, const scomplex* A, int lda, const scomplex* B, int ldb,\n  scomplex beta,        scomplex* C, int ldc )\n{\n    ELEM_BLAS(cgemm)\n    ( &transA, &transB, &m, &n, &k,\n      &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Gemm\n( char transA, char transB, int m, int n, int k, \n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* B, int ldb,\n  dcomplex beta,        dcomplex* C, int ldc )\n{\n    ELEM_BLAS(zgemm)\n    ( &transA, &transB, &m, &n, &k,\n      &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Hemm\n( char side, char uplo, int m, int n,\n  float alpha, const float* A, int lda, const float* B, int ldb,\n  float beta,        float* C, int ldc )\n{\n    ELEM_BLAS(ssymm)\n    ( &side, &uplo, &m, &n,\n      &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Hemm\n( char side, char uplo, int m, int n,\n  double alpha, const double* A, int lda, const double* B, int ldb,\n  double beta,        double* C, int ldc )\n{\n    ELEM_BLAS(dsymm)\n    ( &side, &uplo, &m, &n,\n      &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Hemm\n( char side, char uplo, int m, int n,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* B, int ldb,\n  scomplex beta,        scomplex* C, int ldc )\n{\n    ELEM_BLAS(chemm)\n    ( &side, &uplo, &m, &n,\n      &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Hemm\n( char side, char uplo, int m, int n,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* B, int ldb,\n  dcomplex beta,        dcomplex* C, int ldc )\n{\n    ELEM_BLAS(zhemm)\n    ( &side, &uplo, &m, &n,\n      &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Her2k\n( char uplo, char trans, int n, int k,\n  float alpha, const float* A, int lda, const float* B, int ldb,\n  float beta,        float* C, int ldc )\n{\n    const char transFixed = ( trans == 'C' ? 'T' : trans );\n    ELEM_BLAS(ssyr2k)\n    ( &uplo, &transFixed, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Her2k\n( char uplo, char trans, int n, int k,\n  double alpha, const double* A, int lda, const double* B, int ldb,\n  double beta,        double* C, int ldc )\n{\n    const char transFixed = ( trans == 'C' ? 'T' : trans );\n    ELEM_BLAS(dsyr2k)\n    ( &uplo, &transFixed, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Her2k\n( char uplo, char trans, int n, int k,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* B, int ldb,\n  scomplex beta,        scomplex* C, int ldc )\n{\n    ELEM_BLAS(cher2k)\n    ( &uplo, &trans, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Her2k\n( char uplo, char trans, int n, int k,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* B, int ldb,\n  dcomplex beta,        dcomplex* C, int ldc )\n{\n    ELEM_BLAS(zher2k)\n    ( &uplo, &trans, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Herk\n( char uplo, char trans, int n, int k,\n  float alpha, const float* A, int lda,\n  float beta,        float* C, int ldc )\n{\n    const char transFixed = ( trans == 'C' ? 'T' : trans );\n    ELEM_BLAS(ssyrk)\n    ( &uplo, &transFixed, &n, &k, &alpha, A, &lda, &beta, C, &ldc );\n}\n\nvoid Herk\n( char uplo, char trans, int n, int k,\n  double alpha, const double* A, int lda,\n  double beta,        double* C, int ldc )\n{\n    const char transFixed = ( trans == 'C' ? 'T' : trans );\n    ELEM_BLAS(dsyrk)\n    ( &uplo, &transFixed, &n, &k, &alpha, A, &lda, &beta, C, &ldc );\n}\n\nvoid Herk\n( char uplo, char trans, int n, int k,\n  scomplex alpha, const scomplex* A, int lda,\n  scomplex beta,        scomplex* C, int ldc )\n{ ELEM_BLAS(cherk)( &uplo, &trans, &n, &k, &alpha, A, &lda, &beta, C, &ldc ); }\n\nvoid Herk\n( char uplo, char trans, int n, int k,\n  dcomplex alpha, const dcomplex* A, int lda,\n  dcomplex beta,        dcomplex* C, int ldc )\n{ ELEM_BLAS(zherk)( &uplo, &trans, &n, &k, &alpha, A, &lda, &beta, C, &ldc ); }\n\nvoid Symm\n( char side, char uplo, int m, int n,\n  float alpha, const float* A, int lda, const float* B, int ldb,\n  float beta,        float* C, int ldc )\n{\n    ELEM_BLAS(ssymm)\n    ( &side, &uplo, &m, &n, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Symm\n( char side, char uplo, int m, int n,\n  double alpha, const double* A, int lda, const double* B, int ldb,\n  double beta,        double* C, int ldc )\n{\n    ELEM_BLAS(dsymm)\n    ( &side, &uplo, &m, &n, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Symm\n( char side, char uplo, int m, int n,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* B, int ldb,\n  scomplex beta,        scomplex* C, int ldc )\n{\n    ELEM_BLAS(csymm)\n    ( &side, &uplo, &m, &n, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Symm\n( char side, char uplo, int m, int n,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* B, int ldb,\n  dcomplex beta,        dcomplex* C, int ldc )\n{\n    ELEM_BLAS(zsymm)\n    ( &side, &uplo, &m, &n, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Syr2k\n( char uplo, char trans, int n, int k,\n  float alpha, const float* A, int lda, const float* B, int ldb,\n  float beta,        float* C, int ldc )\n{\n    ELEM_BLAS(ssyr2k)\n    ( &uplo, &trans, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Syr2k\n( char uplo, char trans, int n, int k,\n  double alpha, const double* A, int lda, const double* B, int ldb,\n  double beta,        double* C, int ldc )\n{\n    ELEM_BLAS(dsyr2k)\n    ( &uplo, &trans, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Syr2k\n( char uplo, char trans, int n, int k,\n  scomplex alpha, const scomplex* A, int lda, const scomplex* B, int ldb,\n  scomplex beta,        scomplex* C, int ldc )\n{\n    ELEM_BLAS(csyr2k)\n    ( &uplo, &trans, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Syr2k\n( char uplo, char trans, int n, int k,\n  dcomplex alpha, const dcomplex* A, int lda, const dcomplex* B, int ldb,\n  dcomplex beta,        dcomplex* C, int ldc )\n{\n    ELEM_BLAS(zsyr2k)\n    ( &uplo, &trans, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc );\n}\n\nvoid Syrk\n( char uplo, char trans, int n, int k,\n  float alpha, const float* A, int lda,\n  float beta,        float* C, int ldc )\n{ ELEM_BLAS(ssyrk)( &uplo, &trans, &n, &k, &alpha, A, &lda, &beta, C, &ldc ); }\n\nvoid Syrk\n( char uplo, char trans, int n, int k,\n  double alpha, const double* A, int lda,\n  double beta,        double* C, int ldc )\n{ ELEM_BLAS(dsyrk)( &uplo, &trans, &n, &k, &alpha, A, &lda, &beta, C, &ldc ); }\n\nvoid Syrk\n( char uplo, char trans, int n, int k,\n  scomplex alpha, const scomplex* A, int lda,\n  scomplex beta,        scomplex* C, int ldc )\n{ ELEM_BLAS(csyrk)( &uplo, &trans, &n, &k, &alpha, A, &lda, &beta, C, &ldc ); }\n\nvoid Syrk\n( char uplo, char trans, int n, int k,\n  dcomplex alpha, const dcomplex* A, int lda,\n  dcomplex beta,        dcomplex* C, int ldc )\n{ ELEM_BLAS(zsyrk)( &uplo, &trans, &n, &k, &alpha, A, &lda, &beta, C, &ldc ); }\n\nvoid Trmm\n( char side, char uplo, char trans, char unit, int m, int n,\n  float alpha, const float* A, int lda, float* B, int ldb )\n{\n    const char fixedTrans = ( trans == 'C' ? 'T' : trans );    \n    ELEM_BLAS(strmm)\n    ( &side, &uplo, &fixedTrans, &unit, &m, &n, &alpha, A, &lda, B, &ldb );\n}\n\nvoid Trmm\n( char side, char uplo, char trans, char unit, int m, int n,\n  double alpha, const double* A, int lda, double* B, int ldb )\n{\n    const char fixedTrans = ( trans == 'C' ? 'T' : trans );    \n    ELEM_BLAS(dtrmm)\n    ( &side, &uplo, &fixedTrans, &unit, &m, &n, &alpha, A, &lda, B, &ldb );\n}\n\nvoid Trmm\n( char side, char uplo, char trans, char unit, int m, int n,\n  scomplex alpha, const scomplex* A, int lda, scomplex* B, int ldb )\n{\n    ELEM_BLAS(ctrmm)\n    ( &side, &uplo, &trans, &unit, &m, &n, &alpha, A, &lda, B, &ldb );\n}\n\nvoid Trmm\n( char side, char uplo, char trans, char unit, int m, int n,\n  dcomplex alpha, const dcomplex* A, int lda, dcomplex* B, int ldb )\n{\n    ELEM_BLAS(ztrmm)\n    ( &side, &uplo, &trans, &unit, &m, &n, &alpha, A, &lda, B, &ldb );\n}\n\nvoid Trsm\n( char side, char uplo, char trans, char unit, int m, int n,\n  float alpha, const float* A, int lda, float* B, int ldb )\n{\n    const char fixedTrans = ( trans == 'C' ? 'T' : trans );\n    ELEM_BLAS(strsm)\n    ( &side, &uplo, &fixedTrans, &unit, &m, &n, &alpha, A, &lda, B, &ldb );\n} \n\nvoid Trsm\n( char side, char uplo, char trans, char unit, int m, int n,\n  double alpha, const double* A, int lda, double* B, int ldb )\n{\n    const char fixedTrans = ( trans == 'C' ? 'T' : trans );\n    ELEM_BLAS(dtrsm)\n    ( &side, &uplo, &fixedTrans, &unit, &m, &n, &alpha, A, &lda, B, &ldb );\n} \n\nvoid Trsm\n( char side, char uplo, char trans, char unit, int m, int n,\n  scomplex alpha, const scomplex* A, int lda, scomplex* B, int ldb )\n{\n    ELEM_BLAS(ctrsm)\n    ( &side, &uplo, &trans, &unit, &m, &n, &alpha, A, &lda, B, &ldb );\n} \n\nvoid Trsm\n( char side, char uplo, char trans, char unit, int m, int n,\n  dcomplex alpha, const dcomplex* A, int lda, dcomplex* B, int ldb )\n{\n    ELEM_BLAS(ztrsm)\n    ( &side, &uplo, &trans, &unit, &m, &n, &alpha, A, &lda, B, &ldb );\n} \n\n} // namespace blas\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/imports/flame.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#ifdef ELEM_HAVE_FLA_BSVD\n\nextern \"C\" {\n\ntypedef int FLA_Error;\nFLA_Error FLA_Bsvd_v_opd_var1\n( int       k,\n  int       mU,\n  int       mV,\n  int       nGH,\n  int       nIterMax,\n  double*   d, int dInc,\n  double*   e, int eInc,\n  elem::dcomplex* G, int rsG, int csG,\n  elem::dcomplex* H, int rsH, int csH,\n  double*   U, int rsU, int csU,\n  double*   V, int rsV, int csV,\n  int       nb );\n\nFLA_Error FLA_Bsvd_v_opz_var1\n( int       k,\n  int       mU,\n  int       mV,\n  int       nGH,\n  int       nIterMax,\n  double*   d, int dInc,\n  double*   e, int eInc,\n  elem::dcomplex* G, int rsG, int csG,\n  elem::dcomplex* H, int rsH, int csH,\n  elem::dcomplex* U, int rsU, int csU,\n  elem::dcomplex* V, int rsV, int csV,\n  int       nb );\n\n} // extern \"C\"\n\nnamespace elem {\n\nvoid FlaBidiagSVD\n( int k, int mU, int mV, double* d, double* e, \n  double* U, int ldu, double* V, int ldv, \n  int numAccum, int maxNumIts, int bAlg )\n{\n    std::vector<Complex<double>> G( (k-1)*numAccum ), H( (k-1)*numAccum ); \n    FLA_Bsvd_v_opd_var1\n    ( k, mU, mV, numAccum, maxNumIts, d, 1, e, 1, \n      G.data(), 1, k-1, H.data(), 1, k-1, U, 1, ldu, V, 1, ldv, bAlg );\n}\n\nvoid FlaBidiagSVD\n( int k, int mU, int mV, double* d, double* e, \n  Complex<double>* U, int ldu, Complex<double>* V, int ldv, \n  int numAccum, int maxNumIts, int bAlg )\n{\n    std::vector<Complex<double>> G( (k-1)*numAccum ), H( (k-1)*numAccum ); \n    FLA_Bsvd_v_opz_var1\n    ( k, mU, mV, numAccum, maxNumIts, d, 1, e, 1, \n      G.data(), 1, k-1, H.data(), 1, k-1, U, 1, ldu, V, 1, ldv, bAlg );\n}\n\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_FLA_BSVD\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/imports/lapack.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\nusing elem::scomplex;\nusing elem::dcomplex;\n\nextern \"C\" {\n\n// Machine constants\nfloat ELEM_LAPACK(slamch)( const char* cmach );\ndouble ELEM_LAPACK(dlamch)( const char* cmach );\n\n// Safe norms\nfloat  ELEM_LAPACK(slapy2)( const float * alpha, const float * beta );\ndouble ELEM_LAPACK(dlapy2)( const double* alpha, const double* beta );\nfloat ELEM_LAPACK(slapy3)\n( const float * alpha, const float * beta, const float * gamma );\ndouble ELEM_LAPACK(dlapy3)\n( const double* alpha, const double* beta, const double* gamma );\n\n// Safely compute a Givens rotation\nvoid ELEM_LAPACK(slartg)\n( const float* phi, const float* gamma,\n  float* c, float* s, float* rho );\nvoid ELEM_LAPACK(dlartg)\n( const double* phi, const double* gamma,\n  double* c, double* s, double* rho );\nvoid ELEM_LAPACK(clartg)\n( const scomplex* phi, const scomplex* gamma,\n  float* c, scomplex* s, scomplex* rho );\nvoid ELEM_LAPACK(zlartg)\n( const dcomplex* phi, const dcomplex* gamma,\n  double* c, dcomplex* s, dcomplex* rho );\n\n// Symmetric tridiagonal eigensolvers (via MRRR)\nvoid ELEM_LAPACK(sstevr)\n( const char* job, const char* range, const int* n,\n  float* d, float* e, const float* vl, const float* vu, \n  const int* il, const int* iu, const float* absTol, int * m, \n  float* w, float* Z, const int* ldZ, int* isuppZ, \n  float* work, const int* workSize, int* iWork, const int* iWorkSize, \n  int* info );\nvoid ELEM_LAPACK(dstevr)\n( const char* job, const char* range, const int* n,\n  double* d, double* e, const double* vl, const double* vu, \n  const int* il, const int* iu, const double* absTol, int * m, \n  double* w, double* Z, const int* ldZ, int* isuppZ, \n  double* work, const int* workSize, int* iWork, const int* iWorkSize, \n  int* info );\n\n// Hermitian eigensolvers (via MRRR)\nvoid ELEM_LAPACK(ssyevr)\n( const char* job, const char* range, const char* uplo, const int* n,\n  float* A, const int* ldA, const float* vl, const float* vu, \n  const int* il, const int* iu, const float* absTol, int * m, \n  float* w, float* Z, const int* ldZ, int* isuppZ, \n  float* work, const int* workSize, int* iWork, const int* iWorkSize, \n  int* info );\nvoid ELEM_LAPACK(dsyevr)\n( const char* job, const char* range, const char* uplo, const int* n,\n  double* A, const int* ldA, const double* vl, const double* vu, \n  const int* il, const int* iu, const double* absTol, int * m, \n  double* w, double* Z, const int* ldZ, int* isuppZ, \n  double* work, const int* workSize, int* iWork, const int* iWorkSize, \n  int* info );\nvoid ELEM_LAPACK(cheevr)\n( const char* job, const char* range, const char* uplo, const int* n,\n  scomplex* A, const int* ldA, const float* vl, const float* vu, \n  const int* il, const int* iu, const float* absTol, int* m,\n  float* w, scomplex* Z, const int* ldZ, int* isuppZ, \n  scomplex* work, const int* workSize, float* rWork, const int* rWorkSize, \n  int* iWork, const int* iWorkSize, int* info );\nvoid ELEM_LAPACK(zheevr)\n( const char* job, const char* range, const char* uplo, const int* n,\n  dcomplex* A, const int* ldA, const double* vl, const double* vu, \n  const int* il, const int* iu, const double* absTol, int* m,\n  double* w, dcomplex* Z, const int* ldZ, int* isuppZ, \n  dcomplex* work, const int* workSize, double* rWork, const int* rWorkSize, \n  int* iWork, const int* iWorkSize, int* info );\n\n// Bidiagonal DQDS\nvoid ELEM_LAPACK(slasq1)\n( const int* n, float* d, float* e, float* work, int* info );\nvoid ELEM_LAPACK(dlasq1)\n( const int* n, double* d, double* e, double* work, int* info );\n\n// Bidiagonal QR\nvoid ELEM_LAPACK(sbdsqr)\n( const char* uplo, const int* n, const int* numColsVT, const int* numRowsU,\n  const int* numColsC, float* d, float* e, float* VTrans, const int* ldVT,\n  float* U, const int* ldU, float* C, const int* ldC, float* work, int* info );\nvoid ELEM_LAPACK(dbdsqr)\n( const char* uplo, const int* n, const int* numColsVT, const int* numRowsU,\n  const int* numColsC, double* d, double* e,\n  double* VTrans, const int* ldVT, double* U, const int* ldU,\n  double* C, const int* ldC, double* work, int* info );\nvoid ELEM_LAPACK(cbdsqr)\n( const char* uplo, const int* n, const int* numColsVH, const int* numRowsU,\n  const int* numColsC, float* d, float* e,\n  scomplex* VH, const int* ldVH, scomplex* U, const int* ldU,\n  scomplex* C, const int* ldC, float* work, int* info );\nvoid ELEM_LAPACK(zbdsqr)\n( const char* uplo, const int* n, const int* numColsVH, const int* numRowsU,\n  const int* numColsC, double* d, double* e,\n  dcomplex* VH, const int* ldVH, dcomplex* U, const int* ldU,\n  dcomplex* C, const int* ldC, double* work, int* info );\n\n// Divide and Conquer SVD\nvoid ELEM_LAPACK(sgesdd)\n( const char* jobz, const int* m, const int* n, float* A, const int* ldA,\n  float* s, float* U, const int* ldu, float* VTrans, const int* ldvt,\n  float* work, const int* workSize, int* iWork, int* info );\nvoid ELEM_LAPACK(dgesdd)\n( const char* jobz, const int* m, const int* n, double* A, const int* ldA,\n  double* s, double* U, const int* ldu, double* VTrans, const int* ldvt,\n  double* work, const int* workSize, int* iWork, int* info );\nvoid ELEM_LAPACK(cgesdd)\n( const char* jobz, const int* m, const int* n,\n  scomplex* A, const int* ldA, float* s,\n  scomplex* U, const int* ldu, scomplex* VTrans, const int* ldvt,\n  scomplex* work, const int* workSize, float* rWork,\n  int* iWork, int* info );\nvoid ELEM_LAPACK(zgesdd)\n( const char* jobz, const int* m, const int* n,\n  dcomplex* A, const int* ldA, double* s,\n  dcomplex* U, const int* ldu, dcomplex* VH, const int* ldva,\n  dcomplex* work, const int* workSize, double* rWork,\n  int* iWork, int* info );\n\n// QR-algorithm SVD [DQDS when no singular vectors desired]\nvoid ELEM_LAPACK(sgesvd)\n( const char* jobU, const char* jobVT, const int* m, const int* n,\n  float* A, const int* ldA,\n  float* s, float* U, const int* ldu, float* VTrans, const int* ldvt,\n  float* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(dgesvd)\n( const char* jobU, const char* jobVT, const int* m, const int* n,\n  double* A, const int* ldA,\n  double* s, double* U, const int* ldu, double* VTrans, const int* ldvt,\n  double* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(cgesvd)\n( const char* jobU, const char* jobVH, const int* m, const int* n,\n  scomplex* A, const int* ldA, float* s,\n  scomplex* U, const int* ldu, scomplex* VTrans, const int* ldvt,\n  scomplex* work, const int* workSize, float* rWork, int* info );\nvoid ELEM_LAPACK(zgesvd)\n( const char* jobU, const char* jobVH, const int* m, const int* n,\n  dcomplex* A, const int* ldA, double* s,\n  dcomplex* U, const int* ldu, dcomplex* VH, const int* ldva,\n  dcomplex* work, const int* workSize, double* rWork, int* info );\n\n// Reduction to Hessenberg form\nvoid ELEM_LAPACK(sgehrd)\n( const int* n, const int* ilo, const int* ihi, float* A, const int* ldA,\n  float* tau, float* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(dgehrd)\n( const int* n, const int* ilo, const int* ihi, double* A, const int* ldA,\n  double* tau, double* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(cgehrd)\n( const int* n, const int* ilo, const int* ihi, scomplex* A, const int* ldA,\n  scomplex* tau, scomplex* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(zgehrd)\n( const int* n, const int* ilo, const int* ihi, dcomplex* A, const int* ldA,\n  dcomplex* tau, dcomplex* work, const int* workSize, int* info );\n\n// Generates a unitary matrix defined as the product of Householder reflectors\nvoid ELEM_LAPACK(sorghr)\n( const int* n, const int* ilo, const int* ihi, float* A, const int* ldA,\n  const float* tau, float* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(dorghr)\n( const int* n, const int* ilo, const int* ihi, double* A, const int* ldA,\n  const double* tau, double* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(cunghr)\n( const int* n, const int* ilo, const int* ihi, scomplex* A, const int* ldA,\n  const scomplex* tau, scomplex* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(zunghr)\n( const int* n, const int* ilo, const int* ihi, dcomplex* A, const int* ldA,\n  const dcomplex* tau, dcomplex* work, const int* workSize, int* info );\n\n// Hessenberg QR algorithm\nvoid ELEM_LAPACK(shseqr)\n( const char* job, const char* compZ, const int* n, \n  const int* ilo, const int* ihi, float* H, const int* ldH, \n  float* wr, float* wi, float* Z, const int* ldZ, \n  float* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(dhseqr)\n( const char* job, const char* compZ, const int* n, \n  const int* ilo, const int* ihi, double* H, const int* ldH, \n  double* wr, double* wi, double* Z, const int* ldZ, \n  double* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(chseqr)\n( const char* job, const char* compZ, const int* n,\n  const int* ilo, const int* ihi, scomplex* H, const int* ldH,\n  scomplex* w, scomplex* Z, const int* ldZ,\n  scomplex* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(zhseqr)\n( const char* job, const char* compZ, const int* n,\n  const int* ilo, const int* ihi, dcomplex* H, const int* ldH,\n  dcomplex* w, dcomplex* Z, const int* ldZ,\n  dcomplex* work, const int* workSize, int* info );\n\n// Compute eigenpairs of a general matrix using the QR algorithm followed\n// by a sequence of careful triangular solves\nvoid ELEM_LAPACK(sgeev)\n( const char* jobVL, const char* jobVR, const int* n, \n  float* A, const int* ldA, float* wr, float* wi, \n  float* VLPacked, const int* ldVL, float* VRPacked, const int* ldVR,\n  float* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(dgeev)\n( const char* jobVL, const char* jobVR, const int* n, \n  double* A, const int* ldA, double* wr, double* wi, \n  double* VLPacked, const int* ldVL, double* VRPacked, const int* ldVR,\n  double* work, const int* workSize, int* info );\nvoid ELEM_LAPACK(cgeev)\n( const char* jobVL, const char* jobVR, const int* n,\n  scomplex* A, const int* ldA, scomplex* w,\n  scomplex* VL, const int* ldVL, scomplex* VR, const int* ldVR,\n  scomplex* work, const int* workSize, float* rWork, int* info );\nvoid ELEM_LAPACK(zgeev)\n( const char* jobVL, const char* jobVR, const int* n,\n  dcomplex* A, const int* ldA, dcomplex* w,\n  dcomplex* VL, const int* ldVL, dcomplex* VR, const int* ldVR,\n  dcomplex* work, const int* workSize, double* rWork, int* info );\n\n} // extern \"C\"\n\nnamespace elem {\nnamespace lapack {\n\n// Machine constants\n// =================\n\ntemplate<>\nfloat MachineEpsilon<float>()\n{\n    const char cmach = 'E';\n    return ELEM_LAPACK(slamch)( &cmach );\n}\n\ntemplate<> \ndouble MachineEpsilon<double>()\n{\n    const char cmach = 'E';\n    return ELEM_LAPACK(dlamch)( &cmach );\n}\n\ntemplate<> \nfloat MachineSafeMin<float>()\n{\n    const char cmach = 'S';\n    return ELEM_LAPACK(slamch)( &cmach );\n}\n\ntemplate<> \ndouble MachineSafeMin<double>()\n{\n    const char cmach = 'S';\n    return ELEM_LAPACK(dlamch)( &cmach );\n}\n\ntemplate<> \nfloat MachineBase<float>()\n{\n    const char cmach = 'B';\n    return ELEM_LAPACK(slamch)( &cmach );\n}\n\ntemplate<> \ndouble MachineBase<double>()\n{\n    const char cmach = 'B';\n    return ELEM_LAPACK(dlamch)( &cmach );\n}\n\ntemplate<>\nfloat MachinePrecision<float>()\n{\n    const char cmach = 'P';\n    return ELEM_LAPACK(slamch)( &cmach );\n}\n\ntemplate<> \ndouble MachinePrecision<double>()\n{\n    const char cmach = 'P';\n    return ELEM_LAPACK(dlamch)( &cmach );\n}\n\ntemplate<> \nfloat MachineUnderflowExponent<float>()\n{\n    const char cmach = 'M';\n    return ELEM_LAPACK(slamch)( &cmach );\n}\n\ntemplate<> \ndouble MachineUnderflowExponent<double>()\n{\n    const char cmach = 'M';\n    return ELEM_LAPACK(dlamch)( &cmach );\n}\n\ntemplate<>\nfloat MachineUnderflowThreshold<float>()\n{\n    const char cmach = 'U';\n    return ELEM_LAPACK(slamch)( &cmach );\n}\n\ntemplate<> \ndouble MachineUnderflowThreshold<double>()\n{\n    const char cmach = 'U';\n    return ELEM_LAPACK(dlamch)( &cmach );\n}\n\ntemplate<> \nfloat MachineOverflowExponent<float>()\n{\n    const char cmach = 'L';\n    return ELEM_LAPACK(slamch)( &cmach );\n}\n\ntemplate<> \ndouble MachineOverflowExponent<double>()\n{\n    const char cmach = 'L';\n    return ELEM_LAPACK(dlamch)( &cmach );\n}\n\ntemplate<> \nfloat MachineOverflowThreshold<float>()\n{\n    const char cmach = 'O';\n    return ELEM_LAPACK(slamch)( &cmach );\n}\n\ntemplate<> \ndouble MachineOverflowThreshold<double>()\n{\n    const char cmach = 'O';\n    return ELEM_LAPACK(dlamch)( &cmach );\n}\n\n// Safely compute norms\n// ====================\n\nfloat SafeNorm( float alpha, float beta )\n{ return ELEM_LAPACK(slapy2)( &alpha, &beta ); }\n\ndouble SafeNorm( double alpha, double beta )\n{ return ELEM_LAPACK(dlapy2)( &alpha, &beta ); }\n\nfloat SafeNorm( float alpha, float beta, float gamma )\n{ return ELEM_LAPACK(slapy3)( &alpha, &beta, &gamma ); }\n\ndouble SafeNorm( double alpha, double beta, double gamma )\n{ return ELEM_LAPACK(dlapy3)( &alpha, &beta, &gamma ); }\n\nfloat SafeNorm( Complex<float> alpha, float beta )\n{ return SafeNorm( alpha.real(), alpha.imag(), beta ); }\n\ndouble SafeNorm( Complex<double> alpha, double beta )\n{ return SafeNorm( alpha.real(), alpha.imag(), beta ); }\n\nfloat SafeNorm( float alpha, Complex<float> beta )\n{ return SafeNorm( beta, alpha ); }\n\ndouble SafeNorm( double alpha, Complex<double> beta )\n{ return SafeNorm( beta, alpha ); }\n\n// Safely compute Givens rotations (using Demmel and Kahan's algorithm)\n// ====================================================================\n\nfloat Givens( float phi, float gamma, float* c, float* s )\n{ float rho; ELEM_LAPACK(slartg)( &phi, &gamma, c, s, &rho ); return rho; }\n\ndouble Givens( double phi, double gamma, double* c, double* s )\n{ double rho; ELEM_LAPACK(dlartg)( &phi, &gamma, c, s, &rho ); return rho; }\n\nscomplex Givens( scomplex phi, scomplex gamma, float* c, scomplex* s )\n{ scomplex rho; ELEM_LAPACK(clartg)( &phi, &gamma, c, s, &rho ); return rho; }\n\ndcomplex Givens( dcomplex phi, dcomplex gamma, double* c, dcomplex* s )\n{ dcomplex rho; ELEM_LAPACK(zlartg)( &phi, &gamma, c, s, &rho ); return rho; }\n\n// Compute the EVD of a symmetric tridiagonal matrix\n// =================================================\n\nint SymmetricTridiagEigWrapper\n( char job, char range, int n, float* d, float* e, float vl, float vu,\n  int il, int iu, float absTol, float* w, float* Z, int ldZ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEigWrapper\"));\n    if( n == 0 )\n        return 0;\n\n    std::vector<int> isuppZ( 2*n );\n\n    int workSize=-1, iWorkSize=-1, m, info;\n    int iWorkDummy;\n    float workDummy;\n    ELEM_LAPACK(sstevr)\n    ( &job, &range, &n, d, e, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), &workDummy, &workSize, &iWorkDummy, &iWorkSize,\n      &info );\n\n    workSize = workDummy;\n    iWorkSize = iWorkDummy;\n    std::vector<float> work(workSize);\n    std::vector<int> iWork(iWorkSize);\n    ELEM_LAPACK(sstevr)\n    ( &job, &range, &n, d, e, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), work.data(), &workSize, \n      iWork.data(), &iWorkSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"sstevr's failed\");\n    return m;\n}\n\nint SymmetricTridiagEigWrapper\n( char job, char range, int n, double* d, double* e, double vl, double vu,\n  int il, int iu, double absTol, double* w, double* Z, int ldZ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEigWrapper\"));\n    if( n == 0 )\n        return 0;\n\n    std::vector<int> isuppZ( 2*n );\n\n    int workSize=-1, iWorkSize=-1, m, info;\n    int iWorkDummy;\n    double workDummy;\n    ELEM_LAPACK(dstevr)\n    ( &job, &range, &n, d, e, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), &workDummy, &workSize, &iWorkDummy, &iWorkSize,\n      &info );\n\n    workSize = workDummy;\n    iWorkSize = iWorkDummy;\n    std::vector<double> work(workSize);\n    std::vector<int> iWork(iWorkSize);\n    ELEM_LAPACK(dstevr)\n    ( &job, &range, &n, d, e, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), work.data(), &workSize, \n      iWork.data(), &iWorkSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"dstevr's failed\");\n    return m;\n}\n\n// Compute eigenvalues\n// -------------------\n\n// All eigenvalues\n// ^^^^^^^^^^^^^^^\nvoid SymmetricTridiagEig\n( int n, float* d, float* e, float* w, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    SymmetricTridiagEigWrapper\n    ( 'N', 'A', n, d, e, 0, 0, 0, 0, absTol, w, 0, 1 );\n}\nvoid SymmetricTridiagEig\n( int n, double* d, double* e, double* w, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    SymmetricTridiagEigWrapper\n    ( 'N', 'A', n, d, e, 0, 0, 0, 0, absTol, w, 0, 1 );\n}\n\n// Floating-point range\n// ^^^^^^^^^^^^^^^^^^^^\nint SymmetricTridiagEig\n( int n, float* d, float* e, float* w, float vl, float vu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    return SymmetricTridiagEigWrapper\n    ( 'N', 'V', n, d, e, vl, vu, 0, 0, absTol, w, 0, 1 );\n}\nint SymmetricTridiagEig\n( int n, double* d, double* e, double* w, double vl, double vu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    return SymmetricTridiagEigWrapper\n    ( 'N', 'V', n, d, e, vl, vu, 0, 0, absTol, w, 0, 1 );\n}\n\n// Index range\n// ^^^^^^^^^^^^^\nvoid SymmetricTridiagEig\n( int n, float* d, float* e, float* w, int il, int iu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    SymmetricTridiagEigWrapper\n    ( 'N', 'I', n, d, e, 0, 0, il+1, iu+1, absTol, w, 0, 1 );\n}\nvoid SymmetricTridiagEig\n( int n, double* d, double* e, double* w, int il, int iu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    SymmetricTridiagEigWrapper\n    ( 'N', 'I', n, d, e, 0, 0, il+1, iu+1, absTol, w, 0, 1 );\n}\n\n// Compute eigenpairs\n// ------------------\n\n// All eigenpairs\n// ^^^^^^^^^^^^^^\nvoid SymmetricTridiagEig\n( int n, float* d, float* e, float* w, float* Z, int ldZ, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    SymmetricTridiagEigWrapper\n    ( 'V', 'A', n, d, e, 0, 0, 0, 0, absTol, w, Z, ldZ );\n}\nvoid SymmetricTridiagEig\n( int n, double* d, double* e, double* w, double* Z, int ldZ, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    SymmetricTridiagEigWrapper\n    ( 'V', 'A', n, d, e, 0, 0, 0, 0, absTol, w, Z, ldZ );\n}\n\n// Floating-point range\n// ^^^^^^^^^^^^^^^^^^^^\nint SymmetricTridiagEig\n( int n, float* d, float* e, float* w, float* Z, int ldZ,\n  float vl, float vu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    return SymmetricTridiagEigWrapper\n    ( 'V', 'V', n, d, e, vl, vu, 0, 0, absTol, w, Z, ldZ );\n}\nint SymmetricTridiagEig\n( int n, double* d, double* e, double* w, double* Z, int ldZ,\n  double vl, double vu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    return SymmetricTridiagEigWrapper\n    ( 'V', 'V', n, d, e, vl, vu, 0, 0, absTol, w, Z, ldZ );\n}\n\n// Index range\n// ^^^^^^^^^^^^^\nvoid SymmetricTridiagEig\n( int n, float* d, float* e, float* w, float* Z, int ldZ, \n  int il, int iu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    SymmetricTridiagEigWrapper\n    ( 'V', 'I', n, d, e, 0, 0, il+1, iu+1, absTol, w, Z, ldZ );\n}\nvoid SymmetricTridiagEig\n( int n, double* d, double* e, double* w, double* Z, int ldZ,\n  int il, int iu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SymmetricTridiagEig\"));\n    SymmetricTridiagEigWrapper\n    ( 'V', 'I', n, d, e, 0, 0, il+1, iu+1, absTol, w, Z, ldZ );\n}\n\n// Compute the EVD of a Hermitian matrix\n// =====================================\n\nint HermitianEigWrapper\n( char job, char range, char uplo, int n, float* A, int ldA, \n  float vl, float vu, int il, int iu, float absTol, \n  float* w, float* Z, int ldZ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEigWrapper\"))\n    if( n == 0 )\n        return 0;\n\n    std::vector<int> isuppZ( 2*n );\n\n    int workSize=-1, iWorkSize=-1, m, info;\n    int iWorkDummy;\n    float workDummy;\n    ELEM_LAPACK(ssyevr)\n    ( &job, &range, &uplo, &n, A, &ldA, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), &workDummy, &workSize, &iWorkDummy, &iWorkSize,\n      &info );\n\n    workSize = workDummy;\n    iWorkSize = iWorkDummy;\n    std::vector<float> work(workSize);\n    std::vector<int> iWork(iWorkSize);\n    ELEM_LAPACK(ssyevr)\n    ( &job, &range, &uplo, &n, A, &ldA, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), work.data(), &workSize, \n      iWork.data(), &iWorkSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"ssyevr's failed\");\n    return m;\n}\n\nint HermitianEigWrapper\n( char job, char range, char uplo, int n, double* A, int ldA, \n  double vl, double vu, int il, int iu, double absTol, \n  double* w, double* Z, int ldZ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEigWrapper\"))\n    if( n == 0 )\n        return 0;\n\n    std::vector<int> isuppZ( 2*n );\n\n    int workSize=-1, iWorkSize=-1, m, info;\n    int iWorkDummy;\n    double workDummy;\n    ELEM_LAPACK(dsyevr)\n    ( &job, &range, &uplo, &n, A, &ldA, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), &workDummy, &workSize, \n      &iWorkDummy, &iWorkSize, &info );\n\n    workSize = workDummy;\n    iWorkSize = iWorkDummy;\n    std::vector<double> work(workSize);\n    std::vector<int> iWork(iWorkSize);\n    ELEM_LAPACK(dsyevr)\n    ( &job, &range, &uplo, &n, A, &ldA, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), work.data(), &workSize, \n      iWork.data(), &iWorkSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"dsyevr's failed\");\n    return m;\n}\n\nint HermitianEigWrapper\n( char job, char range, char uplo, int n, scomplex* A, int ldA, \n  float vl, float vu, int il, int iu, float absTol, \n  float* w, scomplex* Z, int ldZ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEigWrapper\"))\n    if( n == 0 )\n        return 0;\n\n    std::vector<int> isuppZ( 2*n );\n\n    int workSize=-1, rWorkSize=-1, iWorkSize=-1, m, info;\n    int iWorkDummy;\n    float rWorkDummy;\n    scomplex workDummy;\n    ELEM_LAPACK(cheevr)\n    ( &job, &range, &uplo, &n, A, &ldA, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), &workDummy, &workSize, &rWorkDummy, &rWorkSize,\n      &iWorkDummy, &iWorkSize, &info );\n\n    workSize = workDummy.real();\n    rWorkSize = rWorkDummy;\n    iWorkSize = iWorkDummy;\n    std::vector<scomplex> work(workSize);\n    std::vector<float> rWork(rWorkSize);\n    std::vector<int> iWork(iWorkSize);\n    ELEM_LAPACK(cheevr)\n    ( &job, &range, &uplo, &n, A, &ldA, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), work.data(), &workSize, \n      rWork.data(), &rWorkSize, iWork.data(), &iWorkSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"cheevr's failed\");\n    return m;\n}\n\nint HermitianEigWrapper\n( char job, char range, char uplo, int n, dcomplex* A, int ldA, \n  double vl, double vu, int il, int iu, double absTol, \n  double* w, dcomplex* Z, int ldZ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEigWrapper\"))\n    if( n == 0 )\n        return 0;\n\n    std::vector<int> isuppZ( 2*n );\n\n    int workSize=-1, rWorkSize=-1, iWorkSize=-1, m, info;\n    int iWorkDummy;\n    double rWorkDummy;\n    dcomplex workDummy;\n    ELEM_LAPACK(zheevr)\n    ( &job, &range, &uplo, &n, A, &ldA, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), &workDummy, &workSize, &rWorkDummy, &rWorkSize,\n      &iWorkDummy, &iWorkSize, &info );\n\n    workSize = workDummy.real();\n    rWorkSize = rWorkDummy;\n    iWorkSize = iWorkDummy;\n    std::vector<dcomplex> work(workSize);\n    std::vector<double> rWork(rWorkSize);\n    std::vector<int> iWork(iWorkSize);\n    ELEM_LAPACK(zheevr)\n    ( &job, &range, &uplo, &n, A, &ldA, &vl, &vu, &il, &iu, &absTol, &m,\n      w, Z, &ldZ, isuppZ.data(), work.data(), &workSize, \n      rWork.data(), &rWorkSize, iWork.data(), &iWorkSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"zheevr's failed\");\n    return m;\n}\n\n// Compute the eigenvalues\n// -----------------------\n\n// All eigenvalues\n// ^^^^^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, int ldA, float* w, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'N', 'A', uplo, n, A, ldA, 0, 0, 0, 0, absTol, w, 0, 1 );\n}\nvoid HermitianEig\n( char uplo, int n, double* A, int ldA, double* w, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'N', 'A', uplo, n, A, ldA, 0, 0, 0, 0, absTol, w, 0, 1 );\n}\nvoid HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'N', 'A', uplo, n, A, ldA, 0, 0, 0, 0, absTol, w, 0, 1 );\n}\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'N', 'A', uplo, n, A, ldA, 0, 0, 0, 0, absTol, w, 0, 1 );\n}\n\n// Floating-point range\n// ^^^^^^^^^^^^^^^^^^^^\nint HermitianEig\n( char uplo, int n, float* A, int ldA, float* w, \n  float vl, float vu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    return HermitianEigWrapper\n    ( 'N', 'V', uplo, n, A, ldA, vl, vu, 0, 0, absTol, w, 0, 1 );\n}\nint HermitianEig\n( char uplo, int n, double* A, int ldA, double* w, \n  double vl, double vu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    return HermitianEigWrapper\n    ( 'N', 'V', uplo, n, A, ldA, vl, vu, 0, 0, absTol, w, 0, 1 );\n}\nint HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w, \n  float vl, float vu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    return HermitianEigWrapper\n    ( 'N', 'V', uplo, n, A, ldA, vl, vu, 0, 0, absTol, w, 0, 1 );\n}\nint HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w, \n  double vl, double vu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    return HermitianEigWrapper\n    ( 'N', 'V', uplo, n, A, ldA, vl, vu, 0, 0, absTol, w, 0, 1 );\n}\n\n// Index range\n// ^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, int ldA, float* w, \n  int il, int iu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'N', 'I', uplo, n, A, ldA, 0, 0, il+1, iu+1, absTol, w, 0, 1 );\n}\nvoid HermitianEig\n( char uplo, int n, double* A, int ldA, double* w, \n  int il, int iu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'N', 'I', uplo, n, A, ldA, 0, 0, il+1, iu+1, absTol, w, 0, 1 );\n}\nvoid HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w, \n  int il, int iu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'N', 'I', uplo, n, A, ldA, 0, 0, il+1, iu+1, absTol, w, 0, 1 );\n}\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w, \n  int il, int iu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'N', 'I', uplo, n, A, ldA, 0, 0, il+1, iu+1, absTol, w, 0, 1 );\n}\n\n// Compute the eigenpairs\n// ----------------------\n\n// All eigenpairs\n// ^^^^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, int ldA, float* w, float* Z, int ldZ, \n  float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'V', 'A', uplo, n, A, ldA, 0, 0, 0, 0, absTol, w, Z, ldZ );\n}\nvoid HermitianEig\n( char uplo, int n, double* A, int ldA, double* w, double* Z, int ldZ,\n  double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'V', 'A', uplo, n, A, ldA, 0, 0, 0, 0, absTol, w, Z, ldZ );\n}\nvoid HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w, scomplex* Z, int ldZ,\n  float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'V', 'A', uplo, n, A, ldA, 0, 0, 0, 0, absTol, w, Z, ldZ );\n}\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w, dcomplex* Z, int ldZ,\n  double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'V', 'A', uplo, n, A, ldA, 0, 0, 0, 0, absTol, w, Z, ldZ );\n}\n\n// Floating-point range\n// ^^^^^^^^^^^^^^^^^^^^\nint HermitianEig\n( char uplo, int n, float* A, int ldA, float* w, float* Z, int ldZ,\n  float vl, float vu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    return HermitianEigWrapper\n    ( 'V', 'V', uplo, n, A, ldA, vl, vu, 0, 0, absTol, w, Z, ldZ );\n}\nint HermitianEig\n( char uplo, int n, double* A, int ldA, double* w, double* Z, int ldZ,\n  double vl, double vu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    return HermitianEigWrapper\n    ( 'V', 'V', uplo, n, A, ldA, vl, vu, 0, 0, absTol, w, Z, ldZ );\n}\nint HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w, scomplex* Z, int ldZ,\n  float vl, float vu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    return HermitianEigWrapper\n    ( 'V', 'V', uplo, n, A, ldA, vl, vu, 0, 0, absTol, w, Z, ldZ );\n}\nint HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w, dcomplex* Z, int ldZ,\n  double vl, double vu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    return HermitianEigWrapper\n    ( 'V', 'V', uplo, n, A, ldA, vl, vu, 0, 0, absTol, w, Z, ldZ );\n}\n\n// Index range\n// ^^^^^^^^^^^\nvoid HermitianEig\n( char uplo, int n, float* A, int ldA, float* w, float* Z, int ldZ,\n  int il, int iu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'V', 'I', uplo, n, A, ldA, 0, 0, il+1, iu+1, absTol, w, Z, ldZ );\n}\nvoid HermitianEig\n( char uplo, int n, double* A, int ldA, double* w, double* Z, int ldZ, \n  int il, int iu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'V', 'I', uplo, n, A, ldA, 0, 0, il+1, iu+1, absTol, w, Z, ldZ );\n}\nvoid HermitianEig\n( char uplo, int n, scomplex* A, int ldA, float* w, scomplex* Z, int ldZ,\n  int il, int iu, float absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'V', 'I', uplo, n, A, ldA, 0, 0, il+1, iu+1, absTol, w, Z, ldZ );\n}\nvoid HermitianEig\n( char uplo, int n, dcomplex* A, int ldA, double* w, dcomplex* Z, int ldZ,\n  int il, int iu, double absTol )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HermitianEig\"))\n    HermitianEigWrapper\n    ( 'V', 'I', uplo, n, A, ldA, 0, 0, il+1, iu+1, absTol, w, Z, ldZ );\n}\n\n// Bidiagonal DQDS for singular values\n// ===================================\n\nvoid BidiagDQDS( int n, float* d, float* e )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::BidiagDQDS\"))\n    int info;\n    std::vector<float> work( 4*n );\n    ELEM_LAPACK(slasq1)( &n, d, e, work.data(), &info );\n    if( info != 0 )\n    {\n        std::ostringstream msg;\n        if( info < 0 )\n            msg << \"Argument \" << -info << \" had an illegal value\";\n        else if( info == 1 )\n            msg << \"A split was marked in a positive value in E\";\n        else if( info == 2 )\n            msg << \"Current block of Z not bidiagonalized after 30*k its\";\n        else if( info == 3 )\n            msg << \"Termination criterion of outer while loop not met\";\n        RuntimeError( msg.str() );\n    } \n}\n\nvoid BidiagDQDS( int n, double* d, double* e )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::BidiagDQDS\"))\n    int info;\n    std::vector<double> work( 4*n );\n    ELEM_LAPACK(dlasq1)( &n, d, e, work.data(), &info );\n    if( info != 0 )\n    {\n        std::ostringstream msg;\n        if( info < 0 )\n            msg << \"Argument \" << -info << \" had an illegal value\";\n        else if( info == 1 )\n            msg << \"A split was marked in a positive value in E\";\n        else if( info == 2 )\n            msg << \"Current block of Z not bidiagonalized after 30*k its\";\n        else if( info == 3 )\n            msg << \"Termination criterion of outer while loop not met\";\n        RuntimeError( msg.str() );\n    } \n}\n\n// Bidiagonal QR algorithm for SVD\n// ===============================\n\nvoid BidiagQRAlg\n( char uplo, int n, int numColsVT, int numRowsU,\n  float* d, float* e, float* VTrans, int ldVT, float* U, int ldU )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::BidiagQRAlg\"))\n    if( n==0 )\n        return;\n\n    int info;\n    float* C=0;\n    const int numColsC=0, ldC=1;\n    std::vector<float> work( 4*n );\n    ELEM_LAPACK(sbdsqr)\n    ( &uplo, &n, &numColsVT, &numRowsU, &numColsC, d, e, VTrans, &ldVT,\n      U, &ldU, C, &ldC, work.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"sbdsqr had \",info,\" elements of e not converge\");\n}\n\nvoid BidiagQRAlg\n( char uplo, int n, int numColsVT, int numRowsU, \n  double* d, double* e, double* VTrans, int ldVT, double* U, int ldU )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::BidiagQRAlg\"))\n    if( n==0 )\n        return;\n\n    int info;\n    double* C=0;\n    const int numColsC=0, ldC=1;\n    std::vector<double> work( 4*n );\n    ELEM_LAPACK(dbdsqr)\n    ( &uplo, &n, &numColsVT, &numRowsU, &numColsC, d, e, VTrans, &ldVT,\n      U, &ldU, C, &ldC, work.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"dbdsqr had \",info,\" elements of e not converge\");\n}\n\nvoid BidiagQRAlg\n( char uplo, int n, int numColsVH, int numRowsU, \n  float* d, float* e, scomplex* VH, int ldVH, scomplex* U, int ldU )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::BidiagQRAlg\"))\n    if( n==0 )\n        return;\n\n    int info;\n    scomplex* C=0;\n    const int numColsC=0, ldC=1;\n    std::vector<float> work( 4*n );\n    ELEM_LAPACK(cbdsqr)\n    ( &uplo, &n, &numColsVH, &numRowsU, &numColsC, d, e, VH, &ldVH,\n      U, &ldU, C, &ldC, work.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"cbdsqr had \",info,\" elements of e not converge\");\n}\n\nvoid BidiagQRAlg\n( char uplo, int n, int numColsVH, int numRowsU, \n  double* d, double* e, dcomplex* VH, int ldVH, dcomplex* U, int ldU )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::BidiagQRAlg\"))\n    if( n==0 )\n        return;\n\n    int info;\n    dcomplex* C=0;\n    const int numColsC=0, ldC=1;\n    std::vector<double> work( 4*n );\n    ELEM_LAPACK(zbdsqr)\n    ( &uplo, &n, &numColsVH, &numRowsU, &numColsC, d, e, VH, &ldVH,\n      U, &ldU, C, &ldC, work.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"zbdsqr had \",info,\" elements of e not converge\");\n}\n\n// Divide and Conquer SVD\n// ======================\n\nvoid DivideAndConquerSVD\n( int m, int n, float* A, int ldA, \n  float* s, float* U, int ldu, float* VTrans, int ldvt )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::DivideAndConquerSVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobz='S';\n    int workSize=-1, info;\n    float workDummy;\n    const int k = std::min(m,n);\n    std::vector<int> iWork(8*k);\n\n    ELEM_LAPACK(sgesdd)\n    ( &jobz, &m, &n, A, &ldA, s, U, &ldu, VTrans, &ldvt, &workDummy, &workSize,\n      iWork.data(), &info );\n\n    workSize = workDummy;\n    std::vector<float> work(workSize);\n    ELEM_LAPACK(sgesdd)\n    ( &jobz, &m, &n, A, &ldA, s, U, &ldu, VTrans, &ldvt, work.data(), &workSize,\n      iWork.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"sgesdd's updating process failed\");\n}\n\nvoid DivideAndConquerSVD\n( int m, int n, double* A, int ldA, \n  double* s, double* U, int ldu, double* VTrans, int ldvt )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::DivideAndConquerSVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobz='S';\n    int workSize=-1, info;\n    double workDummy;\n    const int k = std::min(m,n);\n    std::vector<int> iWork(8*k);\n\n    ELEM_LAPACK(dgesdd)\n    ( &jobz, &m, &n, A, &ldA, s, U, &ldu, VTrans, &ldvt, &workDummy, &workSize,\n      iWork.data(), &info );\n\n    workSize = workDummy;\n    std::vector<double> work(workSize);\n    ELEM_LAPACK(dgesdd)\n    ( &jobz, &m, &n, A, &ldA, s, U, &ldu, VTrans, &ldvt, work.data(), &workSize,\n      iWork.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"dgesdd's updating process failed\");\n}\n\nvoid DivideAndConquerSVD\n( int m, int n, scomplex* A, int ldA, \n  float* s, scomplex* U, int ldu, scomplex* VH, int ldva )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::DivideAndConquerSVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobz='S';\n    int workSize=-1, info;\n    const int k = std::min(m,n);\n    const int K = std::max(m,n);\n    const int rWorkSize = k*std::max(5*k+7,2*K+2*k+1);\n    std::vector<float> rWork(rWorkSize);\n    std::vector<int> iWork(8*k);\n\n    scomplex workDummy;\n    ELEM_LAPACK(cgesdd)\n    ( &jobz, &m, &n, A, &ldA, s, U, &ldu, VH, &ldva, &workDummy, &workSize,\n      rWork.data(), iWork.data(), &info );\n\n    workSize = workDummy.real();\n    std::vector<scomplex> work(workSize);\n    ELEM_LAPACK(cgesdd)\n    ( &jobz, &m, &n, A, &ldA, s, U, &ldu, VH, &ldva, work.data(), &workSize,\n      rWork.data(), iWork.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"cgesdd's updating process failed\");\n}\n\nvoid DivideAndConquerSVD\n( int m, int n, dcomplex* A, int ldA, \n  double* s, dcomplex* U, int ldu, dcomplex* VH, int ldva )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::DivideAndConquerSVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobz='S';\n    int workSize=-1, info;\n    dcomplex workDummy;\n    const int k = std::min(m,n);\n    const int K = std::max(m,n);\n    const int rWorkSize = k*std::max(5*k+7,2*K+2*k+1);\n    std::vector<double> rWork(rWorkSize);\n    std::vector<int> iWork(8*k);\n\n    ELEM_LAPACK(zgesdd)\n    ( &jobz, &m, &n, A, &ldA, s, U, &ldu, VH, &ldva, &workDummy, &workSize,\n      rWork.data(), iWork.data(), &info );\n\n    workSize = workDummy.real();\n    std::vector<dcomplex> work(workSize);\n    ELEM_LAPACK(zgesdd)\n    ( &jobz, &m, &n, A, &ldA, s, U, &ldu, VH, &ldva, work.data(), &workSize,\n      rWork.data(), iWork.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"zgesdd's updating process failed\");\n}\n\n// QR-algorithm SVD\n// ================\n\nvoid QRSVD\n( int m, int n, float* A, int ldA, \n  float* s, float* U, int ldu, float* VTrans, int ldvt )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::QRSVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobU='S', jobVT='S';\n    int workSize=-1, info;\n    float workDummy;\n\n    ELEM_LAPACK(sgesvd)\n    ( &jobU, &jobVT, &m, &n, A, &ldA, s, U, &ldu, VTrans, &ldvt, \n      &workDummy, &workSize, &info );\n\n    workSize = workDummy;\n    std::vector<float> work(workSize);\n    ELEM_LAPACK(sgesvd)\n    ( &jobU, &jobVT, &m, &n, A, &ldA, s, U, &ldu, VTrans, &ldvt, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"sgesvd's updating process failed\");\n}\n\nvoid QRSVD\n( int m, int n, double* A, int ldA, \n  double* s, double* U, int ldu, double* VTrans, int ldvt )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::QRSVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobU='S', jobVT='S';\n    int workSize=-1, info;\n    double workDummy;\n\n    ELEM_LAPACK(dgesvd)\n    ( &jobU, &jobVT, &m, &n, A, &ldA, s, U, &ldu, VTrans, &ldvt, \n      &workDummy, &workSize, &info );\n\n    workSize = workDummy;\n    std::vector<double> work(workSize);\n    ELEM_LAPACK(dgesvd)\n    ( &jobU, &jobVT, &m, &n, A, &ldA, s, U, &ldu, VTrans, &ldvt, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"dgesvd's updating process failed\");\n}\n\nvoid QRSVD\n( int m, int n, scomplex* A, int ldA, \n  float* s, scomplex* U, int ldu, scomplex* VH, int ldva )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::QRSVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobU='S', jobVH='S';\n    int workSize=-1, info;\n    const int k = std::min(m,n);\n    std::vector<float> rWork(5*k);\n\n    scomplex workDummy;\n    ELEM_LAPACK(cgesvd)\n    ( &jobU, &jobVH, &m, &n, A, &ldA, s, U, &ldu, VH, &ldva, \n      &workDummy, &workSize, rWork.data(), &info );\n\n    workSize = workDummy.real();\n    std::vector<scomplex> work(workSize);\n    ELEM_LAPACK(cgesvd)\n    ( &jobU, &jobVH, &m, &n, A, &ldA, s, U, &ldu, VH, &ldva, \n      work.data(), &workSize, rWork.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"cgesvd's updating process failed\");\n}\n\nvoid QRSVD\n( int m, int n, dcomplex* A, int ldA, \n  double* s, dcomplex* U, int ldu, dcomplex* VH, int ldva )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::QRSVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobU='S', jobVH='S';\n    int workSize=-1, info;\n    dcomplex workDummy;\n    const int k = std::min(m,n);\n    std::vector<double> rWork(5*k);\n\n    ELEM_LAPACK(zgesvd)\n    ( &jobU, &jobVH, &m, &n, A, &ldA, s, U, &ldu, VH, &ldva, \n      &workDummy, &workSize, rWork.data(), &info );\n\n    workSize = workDummy.real();\n    std::vector<dcomplex> work(workSize);\n    ELEM_LAPACK(zgesvd)\n    ( &jobU, &jobVH, &m, &n, A, &ldA, s, U, &ldu, VH, &ldva, \n      work.data(), &workSize, rWork.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"zgesvd's updating process failed\");\n}\n\n// Compute singular values (with DQDS)\n// ===================================\n\nvoid SVD( int m, int n, float* A, int ldA, float* s )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobU='N', jobVT='N';\n    int fakeLDim=1, workSize=-1, info;\n    float workDummy;\n\n    ELEM_LAPACK(sgesvd)\n    ( &jobU, &jobVT, &m, &n, A, &ldA, s, 0, &fakeLDim, 0, &fakeLDim, \n      &workDummy, &workSize, &info );\n\n    workSize = workDummy;\n    std::vector<float> work(workSize);\n    ELEM_LAPACK(sgesvd)\n    ( &jobU, &jobVT, &m, &n, A, &ldA, s, 0, &fakeLDim, 0, &fakeLDim, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"sgesvd's updating process failed\");\n}\n\nvoid SVD( int m, int n, double* A, int ldA, double* s )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobU='N', jobVT='N';\n    int fakeLDim=1, workSize=-1, info;\n    double workDummy;\n\n    ELEM_LAPACK(dgesvd)\n    ( &jobU, &jobVT, &m, &n, A, &ldA, s, 0, &fakeLDim, 0, &fakeLDim, \n      &workDummy, &workSize, &info );\n\n    workSize = workDummy;\n    std::vector<double> work(workSize);\n    ELEM_LAPACK(dgesvd)\n    ( &jobU, &jobVT, &m, &n, A, &ldA, s, 0, &fakeLDim, 0, &fakeLDim, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"dgesvd's updating process failed\");\n}\n\nvoid SVD( int m, int n, scomplex* A, int ldA, float* s )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobU='N', jobVH='N';\n    int fakeLDim=1, workSize=-1, info;\n    scomplex workDummy;\n    const int k = std::min(m,n);\n    std::vector<float> rWork(5*k);\n\n    ELEM_LAPACK(cgesvd)\n    ( &jobU, &jobVH, &m, &n, A, &ldA, s, 0, &fakeLDim, 0, &fakeLDim, \n      &workDummy, &workSize, rWork.data(), &info );\n\n    workSize = workDummy.real();\n    std::vector<scomplex> work(workSize);\n    ELEM_LAPACK(cgesvd)\n    ( &jobU, &jobVH, &m, &n, A, &ldA, s, 0, &fakeLDim, 0, &fakeLDim, \n      work.data(), &workSize, rWork.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"cgesvd's updating process failed\");\n}\n\nvoid SVD( int m, int n, dcomplex* A, int ldA, double* s )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::SVD\"))\n    if( m==0 || n==0 )\n        return;\n\n    const char jobU='N', jobVH='N';\n    int fakeLDim=1, workSize=-1, info;\n    dcomplex workDummy;\n    const int k = std::min(m,n);\n    std::vector<double> rWork(5*k);\n\n    ELEM_LAPACK(zgesvd)\n    ( &jobU, &jobVH, &m, &n, A, &ldA, s, 0, &fakeLDim, 0, &fakeLDim, \n      &workDummy, &workSize, rWork.data(), &info );\n\n    workSize = workDummy.real();\n    std::vector<dcomplex> work(workSize);\n    ELEM_LAPACK(zgesvd)\n    ( &jobU, &jobVH, &m, &n, A, &ldA, s, 0, &fakeLDim, 0, &fakeLDim, \n      work.data(), &workSize, rWork.data(), &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"zgesvd's updating process failed\");\n}\n\n// Compute the Schur decomposition of an upper Hessenberg matrix\n// =============================================================\n\nvoid HessenbergSchur( int n, float* H, int ldH, scomplex* w, bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergSchur\"))\n    if( n == 0 )\n        return;\n\n    const char job=(fullTriangle?'S':'E'), compZ='N';\n    int ilo=1, ihi=n;\n    int fakeLDim=1, workSize=-1, info;\n    float workDummy;\n    std::vector<float> wr( n ), wi( n );\n    ELEM_LAPACK(shseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, wr.data(), wi.data(), 0, &fakeLDim,\n      &workDummy, &workSize, &info );\n\n    workSize = workDummy;\n    std::vector<float> work(workSize);\n    ELEM_LAPACK(shseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, wr.data(), wi.data(), 0, &fakeLDim,\n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"shseqr's failed to compute all eigenvalues\");\n\n    for( int i=0; i<n; ++i )\n        w[i] = elem::Complex<float>(wr[i],wi[i]);\n}\n\nvoid HessenbergSchur\n( int n, double* H, int ldH, dcomplex* w, bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergSchur\"))\n    if( n == 0 )\n        return;\n\n    const char job=(fullTriangle?'S':'E'), compZ='N';\n    int ilo=1, ihi=n;\n    int fakeLDim=1, workSize=-1, info;\n    double workDummy;\n    std::vector<double> wr( n ), wi( n );\n    ELEM_LAPACK(dhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, wr.data(), wi.data(), 0, &fakeLDim,\n      &workDummy, &workSize, &info );\n\n    workSize = workDummy;\n    std::vector<double> work(workSize);\n    ELEM_LAPACK(dhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, wr.data(), wi.data(), 0, &fakeLDim,\n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"dhseqr's failed to compute all eigenvalues\");\n    \n    for( int i=0; i<n; ++i )\n        w[i] = elem::Complex<double>(wr[i],wi[i]);\n}\n\nvoid HessenbergSchur\n( int n, scomplex* H, int ldH, scomplex* w, bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergSchur\"))\n    if( n == 0 )\n        return;\n\n    const char job=(fullTriangle?'S':'E'), compZ='N';\n    int ilo=1, ihi=n;\n    int fakeLDim=1, workSize=-1, info;\n    scomplex workDummy;\n    ELEM_LAPACK(chseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, w, 0, &fakeLDim, \n      &workDummy, &workSize, &info );\n\n    workSize = workDummy.real();\n    std::vector<scomplex> work(workSize);\n    ELEM_LAPACK(chseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, w, 0, &fakeLDim, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"chseqr's failed to compute all eigenvalues\");\n}\n\nvoid HessenbergSchur\n( int n, dcomplex* H, int ldH, dcomplex* w, bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergSchur\"))\n    if( n == 0 )\n        return;\n\n    const char job=(fullTriangle?'S':'E'), compZ='N';\n    int ilo=1, ihi=n;\n    int fakeLDim=1, workSize=-1, info;\n    dcomplex workDummy;\n    ELEM_LAPACK(zhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, w, 0, &fakeLDim, \n      &workDummy, &workSize, &info );\n\n    workSize = workDummy.real();\n    std::vector<dcomplex> work(workSize);\n    ELEM_LAPACK(zhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, w, 0, &fakeLDim, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"zhseqr's failed to compute all eigenvalues\");\n}\n\nvoid HessenbergSchur\n( int n, float* H, int ldH, scomplex* w, float* Q, int ldQ, \n  bool fullTriangle, bool multiplyQ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergSchur\"))\n    if( n == 0 )\n        return;\n\n    const char job=(fullTriangle?'S':'E'), compZ=(multiplyQ?'V':'I');\n    int ilo=1, ihi=n;\n    int workSize=-1, info;\n    float workDummy;\n    std::vector<float> wr( n ), wi( n );\n    ELEM_LAPACK(shseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, wr.data(), wi.data(), Q, &ldQ,\n      &workDummy, &workSize, &info );\n\n    workSize = workDummy;\n    std::vector<float> work(workSize);\n    ELEM_LAPACK(shseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, wr.data(), wi.data(), Q, &ldQ,\n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"shseqr's failed to compute all eigenvalues\");\n\n    for( int i=0; i<n; ++i )\n        w[i] = elem::Complex<float>(wr[i],wi[i]);\n}\n\nvoid HessenbergSchur\n( int n, double* H, int ldH, dcomplex* w, double* Q, int ldQ, \n  bool fullTriangle, bool multiplyQ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergSchur\"))\n    if( n == 0 )\n        return;\n\n    const char job=(fullTriangle?'S':'E'), compZ=(multiplyQ?'V':'I');\n    int ilo=1, ihi=n;\n    int workSize=-1, info;\n    double workDummy;\n    std::vector<double> wr( n ), wi( n );\n    ELEM_LAPACK(dhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, wr.data(), wi.data(), Q, &ldQ,\n      &workDummy, &workSize, &info );\n\n    workSize = workDummy;\n    std::vector<double> work(workSize);\n    ELEM_LAPACK(dhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, wr.data(), wi.data(), Q, &ldQ,\n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"dhseqr's failed to compute all eigenvalues\");\n    \n    for( int i=0; i<n; ++i )\n        w[i] = elem::Complex<double>(wr[i],wi[i]);\n}\n\nvoid HessenbergSchur\n( int n, scomplex* H, int ldH, scomplex* w, scomplex* Q, int ldQ,\n  bool fullTriangle, bool multiplyQ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergSchur\"))\n    if( n == 0 )\n        return;\n\n    const char job=(fullTriangle?'S':'E'), compZ=(multiplyQ?'V':'I');\n    int ilo=1, ihi=n;\n    int workSize=-1, info;\n    scomplex workDummy;\n    ELEM_LAPACK(chseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, w, Q, &ldQ, \n      &workDummy, &workSize, &info );\n\n    workSize = workDummy.real();\n    std::vector<scomplex> work(workSize);\n    ELEM_LAPACK(chseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, w, Q, &ldQ, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"chseqr's failed to compute all eigenvalues\");\n}\n\nvoid HessenbergSchur\n( int n, dcomplex* H, int ldH, dcomplex* w, dcomplex* Q, int ldQ,\n  bool fullTriangle, bool multiplyQ )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergSchur\"))\n    if( n == 0 )\n        return;\n\n    const char job=(fullTriangle?'S':'E'), compZ=(multiplyQ?'V':'I');\n    int ilo=1, ihi=n;\n    int workSize=-1, info;\n    dcomplex workDummy;\n    ELEM_LAPACK(zhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, w, Q, &ldQ, \n      &workDummy, &workSize, &info );\n\n    workSize = workDummy.real();\n    std::vector<dcomplex> work(workSize);\n    ELEM_LAPACK(zhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, H, &ldH, w, Q, &ldQ, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"zhseqr's failed to compute all eigenvalues\");\n}\n\n// Compute eigenvalues/pairs of an upper Hessenberg matrix\n// =======================================================\n\nvoid HessenbergEig( int n, float* H, int ldH, scomplex* w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergEig\"))\n    HessenbergSchur( n, H, ldH, w, false );\n}\n\nvoid HessenbergEig( int n, double* H, int ldH, dcomplex* w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergEig\"))\n    HessenbergSchur( n, H, ldH, w, false );\n}\n\nvoid HessenbergEig( int n, scomplex* H, int ldH, scomplex* w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergEig\"))\n    HessenbergSchur( n, H, ldH, w, false );\n}\n\nvoid HessenbergEig( int n, dcomplex* H, int ldH, dcomplex* w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::HessenbergEig\"))\n    HessenbergSchur( n, H, ldH, w, false );\n}\n\n// TODO: Compute eigenpairs\n\n// Compute the Schur decomposition of a square matrix\n// ==================================================\n\nvoid Schur( int n, float* A, int ldA, scomplex* w, bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Schur\"))\n    if( n == 0 )\n        return;\n\n    // Query the reduction to Hessenberg form workspace size\n    int ilo=1, ihi=n, workSize=-1, info;\n    float workDummy;\n    std::vector<float> tau( n );\n    ELEM_LAPACK(sgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), &workDummy, &workSize, &info );\n    workSize = workDummy;\n\n    // Query the QR algorithm workspace size\n    const char job = ( fullTriangle ? 'S' : 'E' ), compZ='N';\n    int fakeLDim=1, negOne=-1;\n    std::vector<float> wr( n ), wi( n );\n    ELEM_LAPACK(shseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, wr.data(), wi.data(), 0, &fakeLDim,\n      &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy), workSize );\n\n    // Reduce to Hessenberg form\n    std::vector<float> work( workSize );\n    ELEM_LAPACK(sgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of reduction had an illegal value\");\n\n    // Compute the eigenvalues\n    ELEM_LAPACK(shseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, wr.data(), wi.data(), 0, &fakeLDim,\n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of QR alg had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"shseqr's failed to compute all eigenvalues\");\n\n    // Return the complex eigenvalues\n    for( int i=0; i<n; ++i )\n        w[i] = elem::Complex<float>(wr[i],wi[i]);\n}\n\nvoid Schur( int n, double* A, int ldA, dcomplex* w, bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Schur\"))\n    if( n == 0 )\n        return;\n\n    // Query the reduction to Hessenberg form workspace size\n    int ilo=1, ihi=n, workSize=-1, info;\n    double workDummy;\n    std::vector<double> tau( n );\n    ELEM_LAPACK(dgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), &workDummy, &workSize, &info );\n    workSize = workDummy;\n\n    // Query the QR algorithm workspace size\n    const char job = ( fullTriangle ? 'S' : 'E' ), compZ='N';\n    int fakeLDim=1, negOne=-1;\n    std::vector<double> wr( n ), wi( n );\n    ELEM_LAPACK(dhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, wr.data(), wi.data(), 0, &fakeLDim,\n      &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy), workSize );\n\n    // Reduce to Hessenberg form\n    std::vector<double> work( workSize );\n    ELEM_LAPACK(dgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of reduction had an illegal value\");\n\n    // Compute the eigenvalues\n    ELEM_LAPACK(dhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, wr.data(), wi.data(), 0, &fakeLDim,\n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of QR alg had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"dhseqr's failed to compute all eigenvalues\");\n\n    // Return the complex eigenvalues\n    for( int i=0; i<n; ++i )\n        w[i] = elem::Complex<double>(wr[i],wi[i]);\n}\n\nvoid Schur( int n, scomplex* A, int ldA, scomplex* w, bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Schur\"))\n    if( n == 0 )\n        return;\n\n    // Query the reduction to Hessenberg form workspace size\n    int ilo=1, ihi=n, workSize=-1, info;\n    scomplex workDummy;\n    std::vector<scomplex> tau( n );\n    ELEM_LAPACK(cgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), &workDummy, &workSize, &info );\n    workSize = workDummy.real();\n\n    // Query the QR algorithm workspace size\n    const char job = ( fullTriangle ? 'S' : 'E' ), compZ='N';\n    int fakeLDim=1, negOne=-1;\n    ELEM_LAPACK(chseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, w, 0, &fakeLDim, \n      &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy.real()), workSize );\n\n    // Reduce to Hessenberg form\n    std::vector<scomplex> work( workSize );\n    ELEM_LAPACK(cgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of reduction had an illegal value\");\n\n    // Compute the eigenvalues\n    ELEM_LAPACK(chseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, w, 0, &fakeLDim, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of QR alg had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"chseqr's failed to compute all eigenvalues\");\n}\n\nvoid Schur( int n, dcomplex* A, int ldA, dcomplex* w, bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Schur\"))\n    if( n == 0 )\n        return;\n\n    // Query the reduction to Hessenberg form workspace size\n    int ilo=1, ihi=n, workSize=-1, info;\n    dcomplex workDummy;\n    std::vector<dcomplex> tau( n );\n    ELEM_LAPACK(zgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), &workDummy, &workSize, &info );\n    workSize = workDummy.real();\n\n    // Query the QR algorithm workspace size\n    const char job = ( fullTriangle ? 'S' : 'E' ), compZ='N';\n    int fakeLDim=1, negOne=-1;\n    ELEM_LAPACK(zhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, w, 0, &fakeLDim, \n      &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy.real()), workSize );\n\n    // Reduce to Hessenberg form\n    std::vector<dcomplex> work( workSize );\n    ELEM_LAPACK(zgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of reduction had an illegal value\");\n\n    // Compute the eigenvalues\n    ELEM_LAPACK(zhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, w, 0, &fakeLDim, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of QR alg had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"zhseqr's failed to compute all eigenvalues\");\n}\n\nvoid Schur\n( int n, float* A, int ldA, scomplex* w, float* Q, int ldQ, bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Schur\"))\n    if( n == 0 )\n        return;\n\n    // Query the reduction to Hessenberg form workspace size\n    int ilo=1, ihi=n, workSize=-1, info;\n    float workDummy;\n    std::vector<float> tau( n );\n    ELEM_LAPACK(sgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), &workDummy, &workSize, &info );\n    workSize = workDummy;\n\n    // Query the explicit Q formation workspace\n    int negOne=-1; \n    ELEM_LAPACK(sorghr)\n    ( &n, &ilo, &ihi, Q, &ldQ, tau.data(), &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy), workSize );\n\n    // Query the QR algorithm workspace size\n    const char job = ( fullTriangle ? 'S' : 'E' ), compZ='V';\n    std::vector<float> wr( n ), wi( n );\n    ELEM_LAPACK(shseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, wr.data(), wi.data(), Q, &ldQ, \n      &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy), workSize );\n\n    // Reduce to Hessenberg form\n    std::vector<float> work( workSize );\n    ELEM_LAPACK(sgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of reduction had an illegal value\");\n\n    // Copy the Householder vectors over\n    for( int j=0; j<n; ++j )\n        MemCopy( &Q[j*ldQ], &A[j*ldA], n );\n\n    // Form the orthogonal matrix in place\n    ELEM_LAPACK(sorghr)\n    ( &n, &ilo, &ihi, Q, &ldQ, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of formation had an illegal value\");\n\n    // Compute the Schur decomposition\n    ELEM_LAPACK(shseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, wr.data(), wi.data(), Q, &ldQ, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of QR alg had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"shseqr's failed to compute all eigenvalues\");\n\n    // Return the complex eigenvalues\n    for( int i=0; i<n; ++i )\n        w[i] = elem::Complex<float>(wr[i],wi[i]);\n}\n\nvoid Schur\n( int n, double* A, int ldA, dcomplex* w, double* Q, int ldQ, \n  bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Schur\"))\n    if( n == 0 )\n        return;\n\n    // Query the reduction to Hessenberg form workspace size\n    int ilo=1, ihi=n, workSize=-1, info;\n    double workDummy;\n    std::vector<double> tau( n );\n    ELEM_LAPACK(dgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), &workDummy, &workSize, &info );\n    workSize = workDummy;\n\n    // Query the explicit Q formation workspace\n    int negOne=-1; \n    ELEM_LAPACK(dorghr)\n    ( &n, &ilo, &ihi, Q, &ldQ, tau.data(), &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy), workSize );\n\n    // Query the QR algorithm workspace size\n    const char job = ( fullTriangle ? 'S' : 'E' ), compZ='V';\n    std::vector<double> wr( n ), wi( n );\n    ELEM_LAPACK(dhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, wr.data(), wi.data(), Q, &ldQ, \n      &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy), workSize );\n\n    // Reduce to Hessenberg form\n    std::vector<double> work( workSize );\n    ELEM_LAPACK(dgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of reduction had an illegal value\");\n\n    // Copy the Householder vectors over\n    for( int j=0; j<n; ++j )\n        MemCopy( &Q[j*ldQ], &A[j*ldA], n );\n\n    // Form the orthogonal matrix in place\n    ELEM_LAPACK(dorghr)\n    ( &n, &ilo, &ihi, Q, &ldQ, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of formation had an illegal value\");\n\n    // Compute the Schur decomposition\n    ELEM_LAPACK(dhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, wr.data(), wi.data(), Q, &ldQ, \n      work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of QR alg had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"dhseqr's failed to compute all eigenvalues\");\n\n    // Return the complex eigenvalues\n    for( int i=0; i<n; ++i )\n        w[i] = elem::Complex<double>(wr[i],wi[i]);\n}\n\nvoid Schur\n( int n, scomplex* A, int ldA, scomplex* w, scomplex* Q, int ldQ, \n  bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Schur\"))\n    if( n == 0 )\n        return;\n\n    // Query the reduction to Hessenberg form workspace size\n    int ilo=1, ihi=n, workSize=-1, info;\n    scomplex workDummy;\n    std::vector<scomplex> tau( n );\n    ELEM_LAPACK(cgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), &workDummy, &workSize, &info );\n    workSize = workDummy.real();\n\n    // Query the explicit Q formation workspace\n    int negOne=-1; \n    ELEM_LAPACK(cunghr)\n    ( &n, &ilo, &ihi, Q, &ldQ, tau.data(), &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy.real()), workSize );\n\n    // Query the QR algorithm workspace size\n    const char job = ( fullTriangle ? 'S' : 'E' ), compZ='V';\n    ELEM_LAPACK(chseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, w, Q, &ldQ, \n      &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy.real()), workSize );\n\n    // Reduce to Hessenberg form\n    std::vector<scomplex> work( workSize );\n    ELEM_LAPACK(cgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of reduction had an illegal value\");\n\n    // Copy the Householder vectors over\n    for( int j=0; j<n; ++j )\n        MemCopy( &Q[j*ldQ], &A[j*ldA], n );\n\n    // Form the orthogonal matrix in place\n    ELEM_LAPACK(cunghr)\n    ( &n, &ilo, &ihi, Q, &ldQ, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of formation had an illegal value\");\n\n    // Compute the Schur decomposition\n    ELEM_LAPACK(chseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, w, Q, &ldQ, work.data(), &workSize, \n      &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of QR alg had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"chseqr's failed to compute all eigenvalues\");\n}\n\nvoid Schur\n( int n, dcomplex* A, int ldA, dcomplex* w, dcomplex* Q, int ldQ, \n  bool fullTriangle )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Schur\"))\n    if( n == 0 )\n        return;\n\n    // Query the reduction to Hessenberg form workspace size\n    int ilo=1, ihi=n, workSize=-1, info;\n    dcomplex workDummy;\n    std::vector<dcomplex> tau( n );\n    ELEM_LAPACK(zgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), &workDummy, &workSize, &info );\n    workSize = workDummy.real();\n\n    // Query the explicit Q formation workspace\n    int negOne=-1; \n    ELEM_LAPACK(zunghr)\n    ( &n, &ilo, &ihi, Q, &ldQ, tau.data(), &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy.real()), workSize );\n\n    // Query the QR algorithm workspace size\n    const char job = ( fullTriangle ? 'S' : 'E' ), compZ='V';\n    ELEM_LAPACK(zhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, w, Q, &ldQ, \n      &workDummy, &negOne, &info );\n    workSize = std::max( int(workDummy.real()), workSize );\n\n    // Reduce to Hessenberg form\n    std::vector<dcomplex> work( workSize );\n    ELEM_LAPACK(zgehrd)\n    ( &n, &ilo, &ihi, A, &ldA, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of reduction had an illegal value\");\n\n    // Copy the Householder vectors over\n    for( int j=0; j<n; ++j )\n        MemCopy( &Q[j*ldQ], &A[j*ldA], n );\n\n    // Form the orthogonal matrix in place\n    ELEM_LAPACK(zunghr)\n    ( &n, &ilo, &ihi, Q, &ldQ, tau.data(), work.data(), &workSize, &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of formation had an illegal value\");\n\n    // Compute the Schur decomposition\n    ELEM_LAPACK(zhseqr)\n    ( &job, &compZ, &n, &ilo, &ihi, A, &ldA, w, Q, &ldQ, work.data(), &workSize, \n      &info );\n    if( info < 0 )\n        RuntimeError(\"Argument \",-info,\" of QR alg had an illegal value\");\n    else if( info > 0 )\n        RuntimeError(\"chseqr's failed to compute all eigenvalues\");\n}\n\n// Compute the eigenvalues/pairs of a square matrix\n// ================================================\n\n// Eigenvalues only\n// ----------------\n\nvoid Eig( int n, float* A, int ldA, scomplex* w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Eig\"))\n    Schur( n, A, ldA, w, false );\n}\n\nvoid Eig( int n, double* A, int ldA, dcomplex* w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Eig\"))\n    Schur( n, A, ldA, w, false );\n}\n\nvoid Eig( int n, scomplex* A, int ldA, scomplex* w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Eig\"))\n    Schur( n, A, ldA, w, false );\n}\n\nvoid Eig( int n, dcomplex* A, int ldA, dcomplex* w )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Eig\"))\n    Schur( n, A, ldA, w, false );\n}\n\n// Eigenpairs\n// ----------\n// NOTE: When the matrices are real, an interface is also provided which returns\n//       a packing of the eigenvectors which exploits the fact that, if the\n//       eigenvalue is real, so is the corresponding eigenvector, otherwise\n//       the eigenvalue's complex conjugate is also an eigenvalue, and the \n//       corresponding eigenvector is also the conjugate. Thus, an n x n\n//       real matrix can be used to represent the eigenvectors if\n//           x(j  ) = X(:,j) + X(:,j+1)*1i,\n//           x(j+1) = X(:,j) - X(:,j+1)*1i\n//       when the j'th and j+1'th eigenvalues are complex conjugates.\n\nvoid Eig( int n, float* A, int ldA, scomplex* w, float* XPacked, int ldX )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Eig\"))\n    const char jobVL='N', jobVR='V';\n    const int fakeLDim = 1;\n\n    std::vector<float> wReal(n), wImag(n);\n    int workSize=-1, info;\n    float workDummy;\n    ELEM_LAPACK(sgeev)\n    ( &jobVL, &jobVR, &n, A, &ldA, wReal.data(), wImag.data(), 0, &fakeLDim, \n      XPacked, &ldX, &workDummy, &workSize, &info );\n\n    workSize = workDummy;\n    std::vector<float> work( workSize );\n    ELEM_LAPACK(sgeev)\n    ( &jobVL, &jobVR, &n, A, &ldA, wReal.data(), wImag.data(), 0, &fakeLDim, \n      XPacked, &ldX, work.data(), &workSize, &info );\n\n    // Post-process the eigenvalues\n    for( Int j=0; j<n; ++j )\n        w[j] = Complex<float>(wReal[j],wImag[j]);\n}\n\nvoid Eig( int n, double* A, int ldA, dcomplex* w, double* XPacked, int ldX )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Eig\"))\n    const char jobVL='N', jobVR='V';\n    const int fakeLDim = 1;\n\n    std::vector<double> wReal(n), wImag(n);\n    int workSize=-1, info;\n    double workDummy;\n    ELEM_LAPACK(dgeev)\n    ( &jobVL, &jobVR, &n, A, &ldA, wReal.data(), wImag.data(), 0, &fakeLDim,\n      XPacked, &ldX, &workDummy, &workSize, &info );\n\n    workSize = workDummy;\n    std::vector<double> work( workSize );\n    ELEM_LAPACK(dgeev)\n    ( &jobVL, &jobVR, &n, A, &ldA, wReal.data(), wImag.data(), 0, &fakeLDim,\n      XPacked, &ldX, work.data(), &workSize, &info );\n\n    // Post-process the eigenvalues\n    for( Int j=0; j<n; ++j )\n        w[j] = Complex<double>(wReal[j],wImag[j]);\n}\n\nvoid Eig( int n, float* A, int ldA, scomplex* w, scomplex* X, int ldX )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Eig\"))\n    float* XPacked = (float*)X;    \n    Eig( n, A, ldA, w, XPacked, ldX );\n    // Unpack the eigenvectors\n    std::vector<scomplex> z(n);\n    Int j=n-1;\n    while( j >= 0 )\n    {\n        const bool inPair = ( w[j].imag() != float(0) );\n        if( inPair )\n        {\n            for( Int i=0; i<n; ++i )\n                z[i] = XPacked[i+(j-1)*ldX] + XPacked[i+j*ldX];\n            for( Int i=0; i<n; ++i ) \n            {\n                X[i+(j-1)*ldX] =      z[i];\n                X[i+ j   *ldX] = Conj(z[i]);\n            }\n            j -= 2;\n        }\n        else\n        {\n            for( Int i=0; i<n; ++i ) \n                z[i] = XPacked[i+j*ldX];\n            for( Int i=0; i<n; ++i )\n                X[i+j*ldX] = z[i];\n            j -= 1; \n        }\n    }\n}\n\nvoid Eig( int n, double* A, int ldA, dcomplex* w, dcomplex* X, int ldX )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Eig\"))\n    double* XPacked = (double*)X;    \n    Eig( n, A, ldA, w, XPacked, ldX );\n    // Unpack the eigenvectors\n    std::vector<scomplex> z(n);\n    Int j=n-1;\n    while( j >= 0 )\n    {\n        const bool inPair = ( w[j].imag() != double(0) );\n        if( inPair )\n        {\n            for( Int i=0; i<n; ++i )\n                z[i] = XPacked[i+(j-1)*ldX] + XPacked[i+j*ldX];\n            for( Int i=0; i<n; ++i ) \n            {\n                X[i+(j-1)*ldX] =      z[i];\n                X[i+ j   *ldX] = Conj(z[i]);\n            }\n            j -= 2;\n        }\n        else\n        {\n            for( Int i=0; i<n; ++i ) \n                z[i] = XPacked[i+j*ldX];\n            for( Int i=0; i<n; ++i )\n                X[i+j*ldX] = z[i];\n            j -= 1; \n        }\n    }\n}\n\nvoid Eig( int n, scomplex* A, int ldA, scomplex* w, scomplex* X, int ldX )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Eig\"))\n    std::vector<float> rWork( 2*n );\n    const char jobVL='N', jobVR='V';\n    const int fakeLDim = 1;\n\n    int workSize=-1, info;\n    scomplex workDummy;\n    ELEM_LAPACK(cgeev)\n    ( &jobVL, &jobVR, &n, A, &ldA, w, 0, &fakeLDim, X, &ldX, \n      &workDummy, &workSize, rWork.data(), &info );\n\n    workSize = workDummy.real();\n    std::vector<scomplex> work( workSize );\n    ELEM_LAPACK(cgeev)\n    ( &jobVL, &jobVR, &n, A, &ldA, w, 0, &fakeLDim, X, &ldX, \n      work.data(), &workSize, rWork.data(), &info );\n}\n\nvoid Eig( int n, dcomplex* A, int ldA, dcomplex* w, dcomplex* X, int ldX )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"lapack::Eig\"))\n    std::vector<double> rWork( 2*n );\n    const char jobVL='N', jobVR='V';\n    const int fakeLDim = 1;\n\n    int workSize=-1, info;\n    dcomplex workDummy;\n    ELEM_LAPACK(zgeev)\n    ( &jobVL, &jobVR, &n, A, &ldA, w, 0, &fakeLDim, X, &ldX,\n      &workDummy, &workSize, rWork.data(), &info );\n\n    workSize = workDummy.real();\n    std::vector<dcomplex> work( workSize );\n    ELEM_LAPACK(zgeev)\n    ( &jobVL, &jobVR, &n, A, &ldA, w, 0, &fakeLDim, X, &ldX,\n      work.data(), &workSize, rWork.data(), &info );\n}\n\n// TODO: Return the left eigenvectors?\n\n} // namespace lapack\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/imports/mpi.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n                      2013, Jeff Hammond\n                      2013, Jed Brown\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\ntypedef unsigned char* UCP;\n\nnamespace {\n\ninline void \nSafeMpi( int mpiError )\n{\n    DEBUG_ONLY(\n        if( mpiError != MPI_SUCCESS )    \n        {\n            char errorString[200];\n            int lengthOfErrorString;\n            MPI_Error_string( mpiError, errorString, &lengthOfErrorString );\n            elem::RuntimeError( std::string(errorString) );\n        }\n    )\n}\n\n} // anonymous namespace\n\nnamespace elem {\nnamespace mpi {\n\n// MPI environmental routines\n// ==========================\n\nvoid Initialize( int& argc, char**& argv )\n{ MPI_Init( &argc, &argv ); }\n\nint InitializeThread( int& argc, char**& argv, int required )\n{ \n    int provided; \n#ifdef ELEM_HAVE_MPI_INIT_THREAD\n    MPI_Init_thread( &argc, &argv, required, &provided ); \n#else\n    MPI_Init( &argc, &argv );\n    provided = 0; // equivalent to MPI_THREAD_SINGLE\n#endif\n    return provided;\n}\n\nvoid Finalize()\n{ MPI_Finalize(); }\n\nbool Initialized()\n{ \n    int initialized;\n    MPI_Initialized( &initialized );\n    return initialized;\n}\n\nbool Finalized()\n{\n    int finalized;\n    MPI_Finalized( &finalized );\n    return finalized;\n}\n\nint QueryThread()\n{\n    int provided;\n#ifdef ELEM_HAVE_MPI_QUERY_THREAD\n    MPI_Query_thread( &provided );\n#else\n    provided = 0; // equivalent to MPI_THREAD_SINGLE\n#endif\n    return provided;\n}\n\ndouble Time()\n{ return MPI_Wtime(); }\n\nvoid Create( UserFunction* func, bool commutes, Op& op )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Create\"))\n    SafeMpi( MPI_Op_create( func, commutes, &op.op ) );\n}\n\nvoid Free( Op& op )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Free\"))\n    SafeMpi( MPI_Op_free( &op.op ) );\n}\n\n// Communicator manipulation \n// =========================\n\nint WorldRank()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::WorldRank\"))\n    return Rank( mpi::COMM_WORLD ); \n}\n\nint Rank( Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Rank\"))\n    if( comm != COMM_NULL )\n    {\n        int rank;\n        SafeMpi( MPI_Comm_rank( comm.comm, &rank ) );\n        return rank;\n    }\n    else return mpi::UNDEFINED;\n}\n\nint Size( Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Size\"))\n    if( comm != COMM_NULL )\n    {\n        int size;\n        SafeMpi( MPI_Comm_size( comm.comm, &size ) );\n        return size;\n    } \n    else return mpi::UNDEFINED;\n}\n\nvoid Create( Comm parentComm, Group subsetGroup, Comm& subsetComm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Create\"))\n    SafeMpi( \n        MPI_Comm_create( parentComm.comm, subsetGroup.group, &subsetComm.comm ) \n    );\n}\n\nvoid Dup( Comm original, Comm& duplicate )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Dup\"))\n    SafeMpi( MPI_Comm_dup( original.comm, &duplicate.comm ) );\n}\n\nvoid Split( Comm comm, int color, int key, Comm& newComm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Split\"))\n    SafeMpi( MPI_Comm_split( comm.comm, color, key, &newComm.comm ) );\n}\n\nvoid Free( Comm& comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Free\"))\n    SafeMpi( MPI_Comm_free( &comm.comm ) );\n}\n\nbool Congruent( Comm comm1, Comm comm2 )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Congruent\"))\n    int result;\n    SafeMpi( MPI_Comm_compare( comm1.comm, comm2.comm, &result ) );\n    return ( result == MPI_IDENT || result == MPI_CONGRUENT );\n}\n\nvoid ErrorHandlerSet( Comm comm, ErrorHandler errorHandler )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ErrorHandlerSet\"))\n#ifdef ELEM_HAVE_MPI_COMM_SET_ERRHANDLER\n    SafeMpi( MPI_Comm_set_errhandler( comm.comm, errorHandler ) );\n#else\n    SafeMpi( MPI_Errhandler_set( comm.comm, errorHandler ) );\n#endif\n}\n\n// Cartesian communicator routines \n// ===============================\n\nvoid CartCreate\n( Comm comm, int numDims, const int* dimensions, const int* periods, \n  bool reorder, Comm& cartComm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::CartCreate\"))\n    SafeMpi\n    ( MPI_Cart_create\n      ( comm.comm, numDims, const_cast<int*>(dimensions), \n        const_cast<int*>(periods), reorder, &cartComm.comm ) );\n}\n\nvoid CartSub( Comm comm, const int* remainingDims, Comm& subComm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::CartSub\"))\n    SafeMpi( \n        MPI_Cart_sub\n        ( comm.comm, const_cast<int*>(remainingDims), &subComm.comm ) \n    );\n}\n\n// Group manipulation \n// ==================\n\nint Rank( Group group )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Rank\"))\n    int rank;\n    SafeMpi( MPI_Group_rank( group.group, &rank ) );\n    return rank;\n}\n\nint Size( Group group )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Size\"))\n    int size;\n    SafeMpi( MPI_Group_size( group.group, &size ) );\n    return size;\n}\n\nvoid CommGroup( Comm comm, Group& group )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::CommGroup\"))\n    SafeMpi( MPI_Comm_group( comm.comm, &group.group ) );\n}\n\nvoid Dup( Group group, Group& newGroup )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Dup\"))\n    // For some reason, MPI_Group_dup does not exist\n    Excl( group, 0, 0, newGroup ); \n}\n\nvoid Union( Group groupA, Group groupB, Group& newGroup )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Union\"))\n    SafeMpi( MPI_Group_union( groupA.group, groupB.group, &newGroup.group ) );\n}\n\nvoid Incl( Group group, int n, const int* ranks, Group& subGroup )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Incl\"))\n    SafeMpi( \n        MPI_Group_incl\n        ( group.group, n, const_cast<int*>(ranks), &subGroup.group ) \n    );\n}\n\nvoid Excl( Group group, int n, const int* ranks, Group& subGroup )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Excl\"))\n    SafeMpi(\n        MPI_Group_excl\n        ( group.group, n, const_cast<int*>(ranks), &subGroup.group )\n    );\n}\n\nvoid Difference( Group parent, Group subset, Group& complement )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Difference\"))\n    SafeMpi( \n        MPI_Group_difference( parent.group, subset.group, &complement.group ) \n    );\n}\n\nvoid Free( Group& group )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Free\"))\n    SafeMpi( MPI_Group_free( &group.group ) );\n}\n\n// Rank translations\n// =================\n\nint Translate( Group origGroup, int origRank, Group newGroup )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Translate\"))\n    int newRank;\n    Translate( origGroup, 1, &origRank, newGroup, &newRank );\n    return newRank;\n}\n\nint Translate( Comm origComm, int origRank, Group newGroup )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Translate\"))\n    int newRank;\n    Translate( origComm, 1, &origRank, newGroup, &newRank );\n    return newRank;\n}\n\nint Translate( Group origGroup, int origRank, Comm newComm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Translate\"))\n    int newRank;\n    Translate( origGroup, 1, &origRank, newComm, &newRank );\n    return newRank;\n}\n\nint Translate( Comm origComm, int origRank, Comm newComm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Translate\"))\n    int newRank;\n    Translate( origComm, 1, &origRank, newComm, &newRank );\n    return newRank;\n}\n\nvoid Translate\n( Group origGroup, int size, const int* origRanks, \n  Group newGroup,                  int* newRanks )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Translate\"))\n    SafeMpi\n    ( MPI_Group_translate_ranks\n      ( origGroup.group, size, const_cast<int*>(origRanks), \n        newGroup.group, newRanks ) );\n}\n\nvoid Translate\n( Comm origComm,  int size, const int* origRanks, \n  Group newGroup,                 int* newRanks )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Translate\"))\n    Group origGroup;\n    CommGroup( origComm, origGroup );\n    Translate( origGroup, size, origRanks, newGroup, newRanks );\n    Free( origGroup );\n}\n\nvoid Translate\n( Group origGroup,  int size, const int* origRanks, \n  Comm newComm,                     int* newRanks )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Translate\"))\n    Group newGroup;\n    CommGroup( newComm,  newGroup  );\n    Translate( origGroup, size, origRanks, newGroup, newRanks );\n    Free( newGroup  );\n}\n\nvoid Translate\n( Comm origComm,  int size, const int* origRanks, \n  Comm newComm,                   int* newRanks )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Translate\"))\n    Group origGroup, newGroup;\n    CommGroup( origComm, origGroup );\n    CommGroup( newComm,  newGroup  );\n    Translate( origGroup, size, origRanks, newGroup, newRanks );\n    Free( origGroup );\n    Free( newGroup  );\n}\n\n// Various utilities\n// =================\n\n// Wait until every process in comm reaches this statement\nvoid Barrier( Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Barrier\"))\n    SafeMpi( MPI_Barrier( comm.comm ) );\n}\n\n// Test for completion\nbool Test( Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Test\"))\n    Status status;\n    int flag;\n    SafeMpi( MPI_Test( &request, &flag, &status ) );\n    return flag;\n}\n\n// Ensure that the request finishes before continuing\nvoid Wait( Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Wait\"))\n    Status status;\n    SafeMpi( MPI_Wait( &request, &status ) );\n}\n\n// Ensure that the request finishes before continuing\nvoid Wait( Request& request, Status& status )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Wait\"))\n    SafeMpi( MPI_Wait( &request, &status ) );\n}\n\n// Ensure that several requests finish before continuing\nvoid WaitAll( int numRequests, Request* requests )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::WaitAll\"))\n    std::vector<Status> statuses( numRequests );\n    SafeMpi( MPI_Waitall( numRequests, requests, statuses.data() ) );\n}\n\n// Ensure that several requests finish before continuing\nvoid WaitAll( int numRequests, Request* requests, Status* statuses )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::WaitAll\"))\n    SafeMpi( MPI_Waitall( numRequests, requests, statuses ) );\n}\n\n// Nonblocking test for message completion\nbool IProbe( int source, int tag, Comm comm, Status& status )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::IProbe\"))\n    int flag;\n    SafeMpi( MPI_Iprobe( source, tag, comm.comm, &flag, &status ) );\n    return flag;\n}\nbool IProbe( int source, Comm comm, Status& status )\n{ return IProbe( source, 0, comm, status ); }\n\ntemplate<typename T>\nint GetCount( Status& status )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::GetCount\"))\n    int count;\n    SafeMpi( MPI_Get_count( &status, TypeMap<T>(), &count ) );\n    return count;\n}\ntemplate int GetCount<byte>( Status& status );\ntemplate int GetCount<int>( Status& status );\ntemplate int GetCount<unsigned>( Status& status );\ntemplate int GetCount<long int>( Status& status );\ntemplate int GetCount<unsigned long>( Status& status );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate int GetCount<long long int>( Status& status );\ntemplate int GetCount<unsigned long long>( Status& status );\n#endif\ntemplate int GetCount<float>( Status& status );\ntemplate int GetCount<double>( Status& status );\ntemplate int GetCount<Complex<float>>( Status& status );\ntemplate int GetCount<Complex<double>>( Status& status );\n\ntemplate<typename R>\nvoid TaggedSend( const R* buf, int count, int to, int tag, Comm comm )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Send\"))\n    SafeMpi( \n        MPI_Send( const_cast<R*>(buf), count, TypeMap<R>(), to, tag, comm.comm )\n    );\n}\n\ntemplate<typename R>\nvoid TaggedSend( const Complex<R>* buf, int count, int to, int tag, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Send\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Send\n      ( const_cast<Complex<R>*>(buf), 2*count, TypeMap<R>(), to, \n        tag, comm.comm ) );\n#else\n    SafeMpi\n    ( MPI_Send\n      ( const_cast<Complex<R>*>(buf), count, \n        TypeMap<Complex<R>>(), to, tag, comm.comm ) );\n#endif\n}\n\ntemplate void TaggedSend( const byte* buf, int count, int to, int tag, Comm comm );\ntemplate void TaggedSend( const int* buf, int count, int to, int tag, Comm comm );\ntemplate void TaggedSend( const unsigned* buf, int count, int to, int tag, Comm comm  );\ntemplate void TaggedSend( const long int* buf, int count, int to, int tag, Comm comm );\ntemplate void TaggedSend( const unsigned long* buf, int count, int to, int tag, Comm comm  );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void TaggedSend( const long long int* buf, int count, int to, int tag, Comm comm );\ntemplate void TaggedSend( const unsigned long long* buf, int count, int to, int tag, Comm comm  );\n#endif\ntemplate void TaggedSend( const float* buf, int count, int to, int tag, Comm comm );\ntemplate void TaggedSend( const double* buf, int count, int to, int tag, Comm comm );\ntemplate void TaggedSend( const Complex<float>* buf, int count, int to, int tag, Comm comm );\ntemplate void TaggedSend( const Complex<double>* buf, int count, int to, int tag, Comm comm );\n\ntemplate<typename T>\nvoid Send( const T* buf, int count, int to, Comm comm )\n{ TaggedSend( buf, count, to, 0, comm ); }\n\ntemplate void Send( const byte* buf, int count, int to, Comm comm );\ntemplate void Send( const int* buf, int count, int to, Comm comm );\ntemplate void Send( const unsigned* buf, int count, int to, Comm comm );\ntemplate void Send( const long int* buf, int count, int to, Comm comm );\ntemplate void Send( const unsigned long* buf, int count, int to, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Send( const long long int* buf, int count, int to, Comm comm );\ntemplate void Send( const unsigned long long* buf, int count, int to, Comm comm );\n#endif\ntemplate void Send( const float* buf, int count, int to, Comm comm );\ntemplate void Send( const double* buf, int count, int to, Comm comm );\ntemplate void Send( const Complex<float>* buf, int count, int to, Comm comm );\ntemplate void Send( const Complex<double>* buf, int count, int to, Comm comm );\n\ntemplate<typename T>\nvoid TaggedSend( T b, int to, int tag, Comm comm )\n{ TaggedSend( &b, 1, to, tag, comm ); }\n\ntemplate void TaggedSend( byte b, int to, int tag, Comm comm );\ntemplate void TaggedSend( int b, int to, int tag, Comm comm );\ntemplate void TaggedSend( unsigned b, int to, int tag, Comm comm );\ntemplate void TaggedSend( long int b, int to, int tag, Comm comm );\ntemplate void TaggedSend( unsigned long b, int to, int tag, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void TaggedSend( long long int b, int to, int tag, Comm comm );\ntemplate void TaggedSend( unsigned long long b, int to, int tag, Comm comm );\n#endif\ntemplate void TaggedSend( float b, int to, int tag, Comm comm );\ntemplate void TaggedSend( double b, int to, int tag, Comm comm );\ntemplate void TaggedSend( Complex<float> b, int to, int tag, Comm comm );\ntemplate void TaggedSend( Complex<double> b, int to, int tag, Comm comm );\n\ntemplate<typename T>\nvoid Send( T b, int to, Comm comm )\n{ TaggedSend( b, to, 0, comm ); }\n\ntemplate void Send( byte b, int to, Comm comm );\ntemplate void Send( int b, int to, Comm comm );\ntemplate void Send( unsigned b, int to, Comm comm );\ntemplate void Send( long int b, int to, Comm comm );\ntemplate void Send( unsigned long b, int to, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Send( long long int b, int to, Comm comm );\ntemplate void Send( unsigned long long b, int to, Comm comm );\n#endif\ntemplate void Send( float b, int to, Comm comm );\ntemplate void Send( double b, int to, Comm comm );\ntemplate void Send( Complex<float> b, int to, Comm comm );\ntemplate void Send( Complex<double> b, int to, Comm comm );\n\ntemplate<typename R>\nvoid TaggedISend\n( const R* buf, int count, int to, int tag, Comm comm, Request& request )\n{ \n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ISend\"))\n    SafeMpi\n    ( MPI_Isend\n      ( const_cast<R*>(buf), count, TypeMap<R>(), to, \n        tag, comm.comm, &request ) );\n}\n\ntemplate<typename R>\nvoid TaggedISend\n( const Complex<R>* buf, int count, int to, int tag, Comm comm, \n  Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ISend\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Isend\n      ( const_cast<Complex<R>*>(buf), 2*count, TypeMap<R>(), to, tag, comm.comm,\n        &request ) );\n#else\n    SafeMpi\n    ( MPI_Isend\n      ( const_cast<Complex<R>*>(buf), count, \n        TypeMap<Complex<R>>(), to, tag, comm.comm, &request ) );\n#endif\n}\n\ntemplate void TaggedISend( const byte* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( const int* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( const unsigned* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( const long int* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( const unsigned long* buf, int count, int to, int tag, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void TaggedISend( const long long int* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( const unsigned long long* buf, int count, int to, int tag, Comm comm, Request& request );\n#endif\ntemplate void TaggedISend( const float* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( const double* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( const Complex<float>* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( const Complex<double>* buf, int count, int to, int tag, Comm comm, Request& request );\n\ntemplate<typename T>\nvoid ISend\n( const T* buf, int count, int to, Comm comm, Request& request )\n{ TaggedISend( buf, count, to, 0, comm, request ); } \n\ntemplate void ISend( const byte* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISend( const int* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISend( const unsigned* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISend( const long int* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISend( const unsigned long* buf, int count, int to, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void ISend( const long long int* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISend( const unsigned long long* buf, int count, int to, Comm comm, Request& request );\n#endif\ntemplate void ISend( const float* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISend( const double* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISend( const Complex<float>* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISend( const Complex<double>* buf, int count, int to, Comm comm, Request& request );\n\ntemplate<typename T>\nvoid TaggedISend( T b, int to, int tag, Comm comm, Request& request )\n{ TaggedISend( &b, 1, to, tag, comm, request ); }\n\ntemplate void TaggedISend( byte buf, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( int buf, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( unsigned buf, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( long int buf, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( unsigned long buf, int to, int tag, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void TaggedISend( long long int buf, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( unsigned long long buf, int to, int tag, Comm comm, Request& request );\n#endif\ntemplate void TaggedISend( float buf, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( double buf, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( Complex<float> buf, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISend( Complex<double> buf, int to, int tag, Comm comm, Request& request );\n\ntemplate<typename T>\nvoid ISend( T b, int to, Comm comm, Request& request )\n{ TaggedISend( b, to, 0, comm, request ); }\n\ntemplate void ISend( byte buf, int to, Comm comm, Request& request );\ntemplate void ISend( int buf, int to, Comm comm, Request& request );\ntemplate void ISend( unsigned buf, int to, Comm comm, Request& request );\ntemplate void ISend( long int buf, int to, Comm comm, Request& request );\ntemplate void ISend( unsigned long buf, int to, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void ISend( long long int buf, int to, Comm comm, Request& request );\ntemplate void ISend( unsigned long long buf, int to, Comm comm, Request& request );\n#endif\ntemplate void ISend( float buf, int to, Comm comm, Request& request );\ntemplate void ISend( double buf, int to, Comm comm, Request& request );\ntemplate void ISend( Complex<float> buf, int to, Comm comm, Request& request );\ntemplate void ISend( Complex<double> buf, int to, Comm comm, Request& request );\n\ntemplate<typename R>\nvoid TaggedISSend\n( const R* buf, int count, int to, int tag, Comm comm, Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ISSend\"))\n    SafeMpi\n    ( MPI_Issend\n      ( const_cast<R*>(buf), count, TypeMap<R>(), to, \n        tag, comm.comm, &request ) );\n}\n\ntemplate<typename R>\nvoid TaggedISSend\n( const Complex<R>* buf, int count, int to, int tag, Comm comm, \n  Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ISSend\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Issend\n      ( const_cast<Complex<R>*>(buf), 2*count, TypeMap<R>(), to, tag, comm.comm,\n        &request ) );\n#else\n    SafeMpi\n    ( MPI_Issend\n      ( const_cast<Complex<R>*>(buf), count, \n        TypeMap<Complex<R>>(), to, tag, comm.comm, &request ) );\n#endif\n}\n\ntemplate void TaggedISSend( const byte* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( const int* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( const unsigned* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( const long int* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( const unsigned long* buf, int count, int to, int tag, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void TaggedISSend( const long long int* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( const unsigned long long* buf, int count, int to, int tag, Comm comm, Request& request );\n#endif\ntemplate void TaggedISSend( const float* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( const double* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( const Complex<float>* buf, int count, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( const Complex<double>* buf, int count, int to, int tag, Comm comm, Request& request );\n\ntemplate<typename T>\nvoid ISSend( const T* buf, int count, int to, Comm comm, Request& request )\n{ TaggedISSend( buf, count, to, 0, comm, request ); }\n\ntemplate void ISSend( const byte* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISSend( const int* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISSend( const unsigned* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISSend( const long int* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISSend( const unsigned long* buf, int count, int to, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void ISSend( const long long int* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISSend( const unsigned long long* buf, int count, int to, Comm comm, Request& request );\n#endif\ntemplate void ISSend( const float* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISSend( const double* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISSend( const Complex<float>* buf, int count, int to, Comm comm, Request& request );\ntemplate void ISSend( const Complex<double>* buf, int count, int to, Comm comm, Request& request );\n\ntemplate<typename T>\nvoid TaggedISSend( T b, int to, int tag, Comm comm, Request& request )\n{ TaggedISSend( &b, 1, to, tag, comm, request ); }\n\ntemplate void TaggedISSend( byte b, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( int b, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( unsigned b, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( long int b, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( unsigned long b, int to, int tag, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void TaggedISSend( long long int b, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( unsigned long long b, int to, int tag, Comm comm, Request& request );\n#endif\ntemplate void TaggedISSend( float b, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( double b, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( Complex<float> b, int to, int tag, Comm comm, Request& request );\ntemplate void TaggedISSend( Complex<double> b, int to, int tag, Comm comm, Request& request );\n\ntemplate<typename R>\nvoid TaggedRecv( R* buf, int count, int from, int tag, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Recv\"))\n    Status status;\n    SafeMpi\n    ( MPI_Recv( buf, count, TypeMap<R>(), from, tag, comm.comm, &status ) );\n}\n\ntemplate<typename R>\nvoid TaggedRecv( Complex<R>* buf, int count, int from, int tag, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Recv\"))\n    Status status;\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Recv( buf, 2*count, TypeMap<R>(), from, tag, comm.comm, &status ) );\n#else\n    SafeMpi\n    ( MPI_Recv\n      ( buf, count, TypeMap<Complex<R>>(), from, tag, comm.comm, &status ) );\n#endif\n}\n\ntemplate void TaggedRecv( byte* buf, int count, int from, int tag, Comm comm );\ntemplate void TaggedRecv( int* buf, int count, int from, int tag, Comm comm );\ntemplate void TaggedRecv( unsigned* buf, int count, int from, int tag, Comm comm );\ntemplate void TaggedRecv( long int* buf, int count, int from, int tag, Comm comm );\ntemplate void TaggedRecv( unsigned long* buf, int count, int from, int tag, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void TaggedRecv( long long int* buf, int count, int from, int tag, Comm comm );\ntemplate void TaggedRecv( unsigned long long* buf, int count, int from, int tag, Comm comm );\n#endif\ntemplate void TaggedRecv( float* buf, int count, int from, int tag, Comm comm );\ntemplate void TaggedRecv( double* buf, int count, int from, int tag, Comm comm );\ntemplate void TaggedRecv( Complex<float>* buf, int count, int from, int tag, Comm comm );\ntemplate void TaggedRecv( Complex<double>* buf, int count, int from, int tag, Comm comm );\n\ntemplate<typename T>\nvoid Recv( T* buf, int count, int from, Comm comm )\n{ TaggedRecv( buf, count, from, mpi::ANY_TAG, comm ); }\n\ntemplate void Recv( byte* buf, int count, int from, Comm comm );\ntemplate void Recv( int* buf, int count, int from, Comm comm );\ntemplate void Recv( unsigned* buf, int count, int from, Comm comm );\ntemplate void Recv( long int* buf, int count, int from, Comm comm );\ntemplate void Recv( unsigned long* buf, int count, int from, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Recv( long long int* buf, int count, int from, Comm comm );\ntemplate void Recv( unsigned long long* buf, int count, int from, Comm comm );\n#endif\ntemplate void Recv( float* buf, int count, int from, Comm comm );\ntemplate void Recv( double* buf, int count, int from, Comm comm );\ntemplate void Recv( Complex<float>* buf, int count, int from, Comm comm );\ntemplate void Recv( Complex<double>* buf, int count, int from, Comm comm );\n\ntemplate<typename T>\nT TaggedRecv( int from, int tag, Comm comm )\n{ T b; TaggedRecv( &b, 1, from, tag, comm ); return b; }\n\ntemplate byte TaggedRecv( int from, int tag, Comm comm );\ntemplate int TaggedRecv( int from, int tag, Comm comm );\ntemplate unsigned TaggedRecv( int from, int tag, Comm comm );\ntemplate long int TaggedRecv( int from, int tag, Comm comm );\ntemplate unsigned long TaggedRecv( int from, int tag, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int TaggedRecv( int from, int tag, Comm comm );\ntemplate unsigned long long TaggedRecv( int from, int tag, Comm comm );\n#endif\ntemplate float TaggedRecv( int from, int tag, Comm comm );\ntemplate double TaggedRecv( int from, int tag, Comm comm );\ntemplate Complex<float> TaggedRecv( int from, int tag, Comm comm );\ntemplate Complex<double> TaggedRecv( int from, int tag, Comm comm );\n\ntemplate<typename T>\nT Recv( int from, Comm comm )\n{ return TaggedRecv<T>( from, mpi::ANY_TAG, comm ); }\n\ntemplate byte Recv( int from, Comm comm );\ntemplate int Recv( int from, Comm comm );\ntemplate unsigned Recv( int from, Comm comm );\ntemplate long int Recv( int from, Comm comm );\ntemplate unsigned long Recv( int from, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int Recv( int from, Comm comm );\ntemplate unsigned long long Recv( int from, Comm comm );\n#endif\ntemplate float Recv( int from, Comm comm );\ntemplate double Recv( int from, Comm comm );\ntemplate Complex<float> Recv( int from, Comm comm );\ntemplate Complex<double> Recv( int from, Comm comm );\n\ntemplate<typename R>\nvoid TaggedIRecv\n( R* buf, int count, int from, int tag, Comm comm, Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::IRecv\"))\n    SafeMpi\n    ( MPI_Irecv( buf, count, TypeMap<R>(), from, tag, comm.comm, &request ) );\n}\n\ntemplate<typename R>\nvoid TaggedIRecv\n( Complex<R>* buf, int count, int from, int tag, Comm comm, Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::IRecv\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Irecv( buf, 2*count, TypeMap<R>(), from, tag, comm.comm, &request ) );\n#else\n    SafeMpi\n    ( MPI_Irecv\n      ( buf, count, TypeMap<Complex<R>>(), from, tag, comm.comm, &request ) );\n#endif\n}\n\ntemplate void TaggedIRecv( byte* buf, int count, int from, int tag, Comm comm, Request& request );\ntemplate void TaggedIRecv( int* buf, int count, int from, int tag, Comm comm, Request& request );\ntemplate void TaggedIRecv( unsigned* buf, int count, int from, int tag, Comm comm, Request& request );\ntemplate void TaggedIRecv( long int* buf, int count, int from, int tag, Comm comm, Request& request );\ntemplate void TaggedIRecv( unsigned long* buf, int count, int from, int tag, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void TaggedIRecv( long long int* buf, int count, int from, int tag, Comm comm, Request& request );\ntemplate void TaggedIRecv( unsigned long long* buf, int count, int from, int tag, Comm comm, Request& request );\n#endif\ntemplate void TaggedIRecv( float* buf, int count, int from, int tag, Comm comm, Request& request );\ntemplate void TaggedIRecv( double* buf, int count, int from, int tag, Comm comm, Request& request );\ntemplate void TaggedIRecv( Complex<float>* buf, int count, int from, int tag, Comm comm, Request& request );\ntemplate void TaggedIRecv( Complex<double>* buf, int count, int from, int tag, Comm comm, Request& request );\n\ntemplate<typename T>\nvoid IRecv( T* buf, int count, int from, Comm comm, Request& request )\n{ TaggedIRecv( buf, count, from, mpi::ANY_TAG, comm, request ); }\n\ntemplate void IRecv( byte* buf, int count, int from, Comm comm, Request& request );\ntemplate void IRecv( int* buf, int count, int from, Comm comm, Request& request );\ntemplate void IRecv( unsigned* buf, int count, int from, Comm comm, Request& request );\ntemplate void IRecv( long int* buf, int count, int from, Comm comm, Request& request );\ntemplate void IRecv( unsigned long* buf, int count, int from, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void IRecv( long long int* buf, int count, int from, Comm comm, Request& request );\ntemplate void IRecv( unsigned long long* buf, int count, int from, Comm comm, Request& request );\n#endif\ntemplate void IRecv( float* buf, int count, int from, Comm comm, Request& request );\ntemplate void IRecv( double* buf, int count, int from, Comm comm, Request& request );\ntemplate void IRecv( Complex<float>* buf, int count, int from, Comm comm, Request& request );\ntemplate void IRecv( Complex<double>* buf, int count, int from, Comm comm, Request& request );\n\ntemplate<typename T>\nT TaggedIRecv( int from, int tag, Comm comm, Request& request )\n{ T b; TaggedIRecv( &b, 1, from, tag, comm, request ); return b; }\n\ntemplate byte TaggedIRecv( int from, int tag, Comm comm, Request& request );\ntemplate int TaggedIRecv( int from, int tag, Comm comm, Request& request );\ntemplate unsigned TaggedIRecv( int from, int tag, Comm comm, Request& request );\ntemplate long int TaggedIRecv( int from, int tag, Comm comm, Request& request );\ntemplate unsigned long TaggedIRecv( int from, int tag, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int TaggedIRecv( int from, int tag, Comm comm, Request& request );\ntemplate unsigned long long TaggedIRecv( int from, int tag, Comm comm, Request& request );\n#endif\ntemplate float TaggedIRecv( int from, int tag, Comm comm, Request& request );\ntemplate double TaggedIRecv( int from, int tag, Comm comm, Request& request );\ntemplate Complex<float> TaggedIRecv( int from, int tag, Comm comm, Request& request );\ntemplate Complex<double> TaggedIRecv( int from, int tag, Comm comm, Request& request );\n\ntemplate<typename T>\nT IRecv( int from, Comm comm, Request& request )\n{ return TaggedIRecv<T>( from, mpi::ANY_TAG, comm, request ); }\n\ntemplate byte IRecv( int from, Comm comm, Request& request );\ntemplate int IRecv( int from, Comm comm, Request& request );\ntemplate unsigned IRecv( int from, Comm comm, Request& request );\ntemplate long int IRecv( int from, Comm comm, Request& request );\ntemplate unsigned long IRecv( int from, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int IRecv( int from, Comm comm, Request& request );\ntemplate unsigned long long IRecv( int from, Comm comm, Request& request );\n#endif\ntemplate float IRecv( int from, Comm comm, Request& request );\ntemplate double IRecv( int from, Comm comm, Request& request );\ntemplate Complex<float> IRecv( int from, Comm comm, Request& request );\ntemplate Complex<double> IRecv( int from, Comm comm, Request& request );\n\ntemplate<typename R>\nvoid TaggedSendRecv\n( const R* sbuf, int sc, int to,   int stag,\n        R* rbuf, int rc, int from, int rtag, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::SendRecv\"))\n    Status status;\n    SafeMpi\n    ( MPI_Sendrecv\n      ( const_cast<R*>(sbuf), sc, TypeMap<R>(), to,   stag,\n        rbuf,                 rc, TypeMap<R>(), from, rtag, \n        comm.comm, &status ) );\n}\n\ntemplate<typename R>\nvoid TaggedSendRecv\n( const Complex<R>* sbuf, int sc, int to,   int stag,\n        Complex<R>* rbuf, int rc, int from, int rtag, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::SendRecv\"))\n    Status status;\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Sendrecv\n      ( const_cast<Complex<R>*>(sbuf), 2*sc, TypeMap<R>(), to,   stag,\n        rbuf,                          2*rc, TypeMap<R>(), from, rtag, \n        comm.comm, &status ) );\n#else\n    SafeMpi\n    ( MPI_Sendrecv\n      ( const_cast<Complex<R>*>(sbuf), \n        sc, TypeMap<Complex<R>>(), to,   stag,\n        rbuf,                          \n        rc, TypeMap<Complex<R>>(), from, rtag, comm.comm, &status ) );\n#endif\n}\n\ntemplate void TaggedSendRecv\n( const byte* sbuf, int sc, int to, int stag, \n        byte* rbuf, int rc, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( const int* sbuf, int sc, int to, int stag, \n        int* rbuf, int rc, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( const unsigned* sbuf, int sc, int to, int stag, \n        unsigned* rbuf, int rc, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( const long int* sbuf, int sc, int to, int stag, \n        long int* rbuf, int rc, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( const unsigned long* sbuf, int sc, int to, int stag, \n        unsigned long* rbuf, int rc, int from, int rtag, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void TaggedSendRecv\n( const long long int* sbuf, int sc, int to, int stag, \n        long long int* rbuf, int rc, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( const unsigned long long* sbuf, int sc, int to, int stag, \n        unsigned long long* rbuf, int rc, int from, int rtag, Comm comm );\n#endif\ntemplate void TaggedSendRecv\n( const float* sbuf, int sc, int to, int stag, \n        float* rbuf, int rc, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( const double* sbuf, int sc, int to, int stag, \n        double* rbuf, int rc, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( const Complex<float>* sbuf, int sc, int to, int stag, \n        Complex<float>* rbuf, int rc, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( const Complex<double>* sbuf, int sc, int to, int stag, \n        Complex<double>* rbuf, int rc, int from, int rtag, Comm comm );\n\ntemplate<typename T>\nvoid SendRecv\n( const T* sbuf, int sc, int to, \n        T* rbuf, int rc, int from, Comm comm )\n{ TaggedSendRecv( sbuf, sc, to, 0, rbuf, rc, from, mpi::ANY_TAG, comm ); }\n\ntemplate void SendRecv\n( const byte* sbuf, int sc, int to, \n        byte* rbuf, int rc, int from, Comm comm );\ntemplate void SendRecv\n( const int* sbuf, int sc, int to, \n        int* rbuf, int rc, int from, Comm comm );\ntemplate void SendRecv\n( const unsigned* sbuf, int sc, int to, \n        unsigned* rbuf, int rc, int from, Comm comm );\ntemplate void SendRecv\n( const long int* sbuf, int sc, int to, \n        long int* rbuf, int rc, int from, Comm comm );\ntemplate void SendRecv\n( const unsigned long* sbuf, int sc, int to, \n        unsigned long* rbuf, int rc, int from, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void SendRecv\n( const long long int* sbuf, int sc, int to, \n        long long int* rbuf, int rc, int from, Comm comm );\ntemplate void SendRecv\n( const unsigned long long* sbuf, int sc, int to, \n        unsigned long long* rbuf, int rc, int from, Comm comm );\n#endif\ntemplate void SendRecv\n( const float* sbuf, int sc, int to,\n        float* rbuf, int rc, int from, Comm comm );\ntemplate void SendRecv\n( const double* sbuf, int sc, int to,\n        double* rbuf, int rc, int from, Comm comm );\ntemplate void SendRecv\n( const Complex<float>* sbuf, int sc, int to, \n        Complex<float>* rbuf, int rc, int from, Comm comm );\ntemplate void SendRecv\n( const Complex<double>* sbuf, int sc, int to, \n        Complex<double>* rbuf, int rc, int from, Comm comm );\n\ntemplate<typename T>\nT TaggedSendRecv( T sb, int to, int stag, int from, int rtag, Comm comm )\n{ \n    T rb; \n    TaggedSendRecv( &sb, 1, to, stag, &rb, 1, from, rtag, comm ); \n    return rb; \n}\n\ntemplate byte TaggedSendRecv\n( byte sb, int to, int stag, int from, int rtag, Comm comm );\ntemplate int TaggedSendRecv\n( int sb, int to, int stag, int from, int rtag, Comm comm );\ntemplate unsigned TaggedSendRecv\n( unsigned sb, int to, int stag, int from, int rtag, Comm comm );\ntemplate long int TaggedSendRecv\n( long int sb, int to, int stag, int from, int rtag, Comm comm );\ntemplate unsigned long TaggedSendRecv\n( unsigned long sb, int to, int stag, int from, int rtag, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int TaggedSendRecv\n( long long int sb, int to, int stag, int from, int rtag, Comm comm );\ntemplate unsigned long long TaggedSendRecv\n( unsigned long long sb, int to, int stag, int from, int rtag, Comm comm );\n#endif\ntemplate float TaggedSendRecv\n( float sb, int to, int stag, int from, int rtag, Comm comm );\ntemplate double TaggedSendRecv\n( double sb, int to, int stag, int from, int rtag, Comm comm );\ntemplate Complex<float> TaggedSendRecv\n( Complex<float> sb, int to, int stag, int from, int rtag, Comm comm );\ntemplate Complex<double> TaggedSendRecv\n( Complex<double> sb, int to, int stag, int from, int rtag, Comm comm );\n\ntemplate<typename T>\nT SendRecv( T sb, int to, int from, Comm comm )\n{ return TaggedSendRecv( sb, to, 0, from, mpi::ANY_TAG, comm ); }\n\ntemplate byte SendRecv( byte sb, int to, int from, Comm comm );\ntemplate int SendRecv( int sb, int to, int from, Comm comm );\ntemplate unsigned SendRecv( unsigned sb, int to, int from, Comm comm );\ntemplate long int SendRecv( long int sb, int to, int from, Comm comm );\ntemplate unsigned long SendRecv( unsigned long sb, int to, int from, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int SendRecv( long long int sb, int to, int from, Comm comm );\ntemplate unsigned long long SendRecv( unsigned long long sb, int to, int from, Comm comm );\n#endif\ntemplate float SendRecv( float sb, int to, int from, Comm comm );\ntemplate double SendRecv( double sb, int to, int from, Comm comm );\ntemplate Complex<float> SendRecv\n( Complex<float> sb, int to, int from, Comm comm );\ntemplate Complex<double> SendRecv\n( Complex<double> sb, int to, int from, Comm comm );\n\ntemplate<typename R>\nvoid TaggedSendRecv\n( R* buf, int count, int to, int stag, int from, int rtag, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::SendRecv\"))\n    Status status;\n    SafeMpi\n    ( MPI_Sendrecv_replace\n      ( buf, count, TypeMap<R>(), to, stag, from, rtag, comm.comm, &status ) );\n}\n\ntemplate<typename R>\nvoid TaggedSendRecv\n( Complex<R>* buf, int count, int to, int stag, int from, int rtag, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::SendRecv\"))\n    Status status;\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Sendrecv_replace\n      ( buf, 2*count, TypeMap<R>(), to, stag, from, rtag, comm.comm, \n        &status ) );\n#else\n    SafeMpi\n    ( MPI_Sendrecv_replace\n      ( buf, count, TypeMap<Complex<R>>(), \n        to, stag, from, rtag, comm.comm, &status ) );\n#endif\n}\n\ntemplate void TaggedSendRecv\n( byte* buf, int count, int to, int stag, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( int* buf, int count, int to, int stag, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( unsigned* buf, int count, int to, int stag, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( long int* buf, int count, int to, int stag, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( unsigned long* buf, int count, int to, int stag, int from, int rtag, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void TaggedSendRecv\n( long long int* buf, int count, int to, int stag, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( unsigned long long* buf, int count, int to, int stag, int from, int rtag, Comm comm );\n#endif\ntemplate void TaggedSendRecv\n( float* buf, int count, int to, int stag, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( double* buf, int count, int to, int stag, int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( Complex<float>* buf, int count, int to, int stag, \n  int from, int rtag, Comm comm );\ntemplate void TaggedSendRecv\n( Complex<double>* buf, int count, int to, int stag, \n  int from, int rtag, Comm comm );\n\ntemplate<typename T>\nvoid SendRecv( T* buf, int count, int to, int from, Comm comm )\n{ TaggedSendRecv( buf, count, to, 0, from, mpi::ANY_TAG, comm ); }\n\ntemplate void SendRecv\n( byte* buf, int count, int to, int from, Comm comm );\ntemplate void SendRecv\n( int* buf, int count, int to, int from, Comm comm );\ntemplate void SendRecv\n( unsigned* buf, int count, int to, int from, Comm comm );\ntemplate void SendRecv\n( long int* buf, int count, int to, int from, Comm comm );\ntemplate void SendRecv\n( unsigned long* buf, int count, int to, int from, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void SendRecv\n( long long int* buf, int count, int to, int from, Comm comm );\ntemplate void SendRecv\n( unsigned long long* buf, int count, int to, int from, Comm comm );\n#endif\ntemplate void SendRecv\n( float* buf, int count, int to, int from, Comm comm );\ntemplate void SendRecv\n( double* buf, int count, int to, int from, Comm comm );\ntemplate void SendRecv\n( Complex<float>* buf, int count, int to, int from, Comm comm );\ntemplate void SendRecv\n( Complex<double>* buf, int count, int to, int from, Comm comm );\n\ntemplate<typename R>\nvoid Broadcast( R* buf, int count, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Broadcast\"))\n    SafeMpi( MPI_Bcast( buf, count, TypeMap<R>(), root, comm.comm ) );\n}\n\ntemplate<typename R>\nvoid Broadcast( Complex<R>* buf, int count, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Broadcast\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi( MPI_Bcast( buf, 2*count, TypeMap<R>(), root, comm.comm ) );\n#else\n    SafeMpi( MPI_Bcast( buf, count, TypeMap<Complex<R>>(), root, comm.comm ) );\n#endif\n}\n\ntemplate void Broadcast( byte* buf, int count, int root, Comm comm );\ntemplate void Broadcast( int* buf, int count, int root, Comm comm );\ntemplate void Broadcast( unsigned* buf, int count, int root, Comm comm );\ntemplate void Broadcast( long int* buf, int count, int root, Comm comm );\ntemplate void Broadcast( unsigned long* buf, int count, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Broadcast( long long int* buf, int count, int root, Comm comm );\ntemplate void Broadcast( unsigned long long* buf, int count, int root, Comm comm );\n#endif\ntemplate void Broadcast( float* buf, int count, int root, Comm comm );\ntemplate void Broadcast( double* buf, int count, int root, Comm comm );\ntemplate void Broadcast( Complex<float>* buf, int count, int root, Comm comm );\ntemplate void Broadcast( Complex<double>* buf, int count, int root, Comm comm );\n\ntemplate<typename T>\nvoid Broadcast( T& b, int root, Comm comm )\n{ Broadcast( &b, 1, root, comm ); }\n\ntemplate void Broadcast( byte& b, int root, Comm comm );\ntemplate void Broadcast( int& b, int root, Comm comm );\ntemplate void Broadcast( unsigned& b, int root, Comm comm );\ntemplate void Broadcast( long int& b, int root, Comm comm );\ntemplate void Broadcast( unsigned long& b, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Broadcast( long long int& b, int root, Comm comm );\ntemplate void Broadcast( unsigned long long& b, int root, Comm comm );\n#endif\ntemplate void Broadcast( float& b, int root, Comm comm );\ntemplate void Broadcast( double& b, int root, Comm comm );\ntemplate void Broadcast( Complex<float>& b, int root, Comm comm );\ntemplate void Broadcast( Complex<double>& b, int root, Comm comm );\n\n#ifdef ELEM_HAVE_NONBLOCKING_COLLECTIVES\ntemplate<typename R>\nvoid IBroadcast( R* buf, int count, int root, Comm comm, Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::IBroadcast\"))\n    SafeMpi\n    ( MPI_Ibcast( buf, count, TypeMap<R>(), root, comm.comm, &request ) );\n}\n\ntemplate<typename R>\nvoid IBroadcast\n( Complex<R>* buf, int count, int root, Comm comm, Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::IBroadcast\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Ibcast( buf, 2*count, TypeMap<R>(), root, comm.comm, &request ) );\n#else\n    SafeMpi\n    ( MPI_Ibcast\n      ( buf, count, TypeMap<Complex<R>>(), root, comm.comm, &request ) );\n#endif\n}\n\ntemplate void IBroadcast( byte* buf, int count, int root, Comm comm, Request& request );\ntemplate void IBroadcast( int* buf, int count, int root, Comm comm, Request& request );\ntemplate void IBroadcast( unsigned* buf, int count, int root, Comm comm, Request& request );\ntemplate void IBroadcast( long int* buf, int count, int root, Comm comm, Request& request );\ntemplate void IBroadcast( unsigned long* buf, int count, int root, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void IBroadcast( long long int* buf, int count, int root, Comm comm, Request& request );\ntemplate void IBroadcast( unsigned long long* buf, int count, int root, Comm comm, Request& request );\n#endif\ntemplate void IBroadcast( float* buf, int count, int root, Comm comm, Request& request );\ntemplate void IBroadcast( double* buf, int count, int root, Comm comm, Request& request );\ntemplate void IBroadcast( Complex<float>* buf, int count, int root, Comm comm, Request& request );\ntemplate void IBroadcast( Complex<double>* buf, int count, int root, Comm comm, Request& request );\n\ntemplate<typename T>\nvoid IBroadcast( T& b, int root, Comm comm, Request& request )\n{ IBroadcast( &b, 1, root, comm, request ); }\n\ntemplate void IBroadcast( byte& b, int root, Comm comm, Request& request );\ntemplate void IBroadcast( int& b, int root, Comm comm, Request& request );\ntemplate void IBroadcast( unsigned& b, int root, Comm comm, Request& request );\ntemplate void IBroadcast( long int& b, int root, Comm comm, Request& request );\ntemplate void IBroadcast( unsigned long& b, int root, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void IBroadcast( long long int& b, int root, Comm comm, Request& request );\ntemplate void IBroadcast( unsigned long long& b, int root, Comm comm, Request& request );\n#endif\ntemplate void IBroadcast( float& b, int root, Comm comm, Request& request );\ntemplate void IBroadcast( double& b, int root, Comm comm, Request& request );\ntemplate void IBroadcast( Complex<float>& b, int root, Comm comm, Request& request );\ntemplate void IBroadcast( Complex<double>& b, int root, Comm comm, Request& request );\n#endif // ifdef ELEM_HAVE_NONBLOCKING_COLLECTIVES\n\ntemplate<typename R>\nvoid Gather\n( const R* sbuf, int sc,\n        R* rbuf, int rc, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Gather\"))\n    SafeMpi\n    ( MPI_Gather\n      ( const_cast<R*>(sbuf), sc, TypeMap<R>(),\n        rbuf,                 rc, TypeMap<R>(), root, comm.comm ) );\n}\n\ntemplate<typename R>\nvoid Gather\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, int rc, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Gather\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Gather\n      ( const_cast<Complex<R>*>(sbuf), 2*sc, TypeMap<R>(),\n        rbuf,                          2*rc, TypeMap<R>(), root, comm.comm ) );\n#else\n    SafeMpi\n    ( MPI_Gather\n      ( const_cast<Complex<R>*>(sbuf), sc, TypeMap<Complex<R>>(),\n        rbuf,                          rc, TypeMap<Complex<R>>(), \n        root, comm.comm ) );\n#endif\n}\n\ntemplate void Gather( const byte* sbuf, int sc, byte* rbuf, int rc, int root, Comm comm );\ntemplate void Gather( const int* sbuf, int sc, int* rbuf, int rc, int root, Comm comm );\ntemplate void Gather( const unsigned* sbuf, int sc, unsigned* rbuf, int rc, int root, Comm comm );\ntemplate void Gather( const long int* sbuf, int sc, long int* rbuf, int rc, int root, Comm comm );\ntemplate void Gather( const unsigned long* sbuf, int sc, unsigned long* rbuf, int rc, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Gather( const long long int* sbuf, int sc, long long int* rbuf, int rc, int root, Comm comm );\ntemplate void Gather( const unsigned long long* sbuf, int sc, unsigned long long* rbuf, int rc, int root, Comm comm );\n#endif\ntemplate void Gather( const float* sbuf, int sc, float* rbuf, int rc, int root, Comm comm );\ntemplate void Gather( const double* sbuf, int sc, double* rbuf, int rc, int root, Comm comm );\ntemplate void Gather( const Complex<float>* sbuf, int sc, Complex<float>* rbuf, int rc, int root, Comm comm );\ntemplate void Gather( const Complex<double>* sbuf, int sc, Complex<double>* rbuf, int rc, int root, Comm comm );\n\n#ifdef ELEM_HAVE_NONBLOCKING_COLLECTIVES\ntemplate<typename R>\nvoid IGather\n( const R* sbuf, int sc,\n        R* rbuf, int rc, int root, Comm comm, Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::IGather\"))\n    SafeMpi\n    ( MPI_Igather\n      ( const_cast<R*>(sbuf), sc, TypeMap<R>(),\n        rbuf,                 rc, TypeMap<R>(), root, comm.comm, &request ) );\n}\n\ntemplate<typename R>\nvoid IGather\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, int rc, int root, Comm comm, Request& request )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::IGather\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Igather\n      ( const_cast<Complex<R>*>(sbuf), 2*sc, TypeMap<R>(),\n        rbuf,                          2*rc, TypeMap<R>(), \n        root, comm.comm, &request ) );\n#else\n    SafeMpi\n    ( MPI_Igather\n      ( const_cast<Complex<R>*>(sbuf), sc, TypeMap<Complex<R>>(),\n        rbuf,                          rc, TypeMap<Complex<R>>(), \n        root, comm.comm, &request ) );\n#endif\n}\n\ntemplate void IGather\n( const byte* sbuf, int sc, \n        byte* rbuf, int rc, int root, Comm comm, Request& request );\ntemplate void IGather\n( const int* sbuf, int sc, \n        int* rbuf, int rc, int root, Comm comm, Request& request );\ntemplate void IGather\n( const unsigned* sbuf, int sc, \n        unsigned* rbuf, int rc, int root, Comm comm, Request& request );\ntemplate void IGather\n( const long int* sbuf, int sc, \n        long int* rbuf, int rc, int root, Comm comm, Request& request );\ntemplate void IGather\n( const unsigned long* sbuf, int sc, \n        unsigned long* rbuf, int rc, int root, Comm comm, Request& request );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void IGather\n( const long long int* sbuf, int sc,\n        long long int* rbuf, int rc, int root, Comm comm, Request& request );\ntemplate void IGather\n( const unsigned long long* sbuf, int sc,\n        unsigned long long* rbuf, int rc, int root, Comm comm, Request& request );\n#endif\ntemplate void IGather\n( const float* sbuf, int sc, \n        float* rbuf, int rc, int root, Comm comm, Request& request );\ntemplate void IGather\n( const double* sbuf, int sc, \n        double* rbuf, int rc, int root, Comm comm, Request& request );\ntemplate void IGather\n( const Complex<float>* sbuf, int sc, \n        Complex<float>* rbuf, int rc, int root, Comm comm, Request& request );\ntemplate void IGather\n( const Complex<double>* sbuf, int sc, \n        Complex<double>* rbuf, int rc, int root, Comm comm, Request& request );\n#endif // ifdef ELEM_HAVE_NONBLOCKING_COLLECTIVES\n\ntemplate<typename R>\nvoid Gather\n( const R* sbuf, int sc,\n        R* rbuf, const int* rcs, const int* rds, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Gather\"))\n    SafeMpi\n    ( MPI_Gatherv\n      ( const_cast<R*>(sbuf), \n        sc,       \n        TypeMap<R>(),\n        rbuf,                    \n        const_cast<int*>(rcs), \n        const_cast<int*>(rds), \n        TypeMap<R>(),\n        root, \n        comm.comm ) );\n}\n\ntemplate<typename R>\nvoid Gather\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, const int* rcs, const int* rds, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Gather\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    const int commRank = Rank( comm );\n    const int commSize = Size( comm );\n    std::vector<int> rcsDouble, rdsDouble;\n    if( commRank == root )\n    {\n        rcsDouble.resize( commSize );\n        rdsDouble.resize( commSize );\n        for( int i=0; i<commSize; ++i )\n        {\n            rcsDouble[i] = 2*rcs[i];\n            rdsDouble[i] = 2*rds[i];\n        }\n    }\n    SafeMpi\n    ( MPI_Gatherv\n      ( const_cast<Complex<R>*>(sbuf), 2*sc, TypeMap<R>(),\n        rbuf, rcsDouble.data(), rdsDouble.data(), TypeMap<R>(),\n        root, comm.comm ) );\n#else\n    SafeMpi\n    ( MPI_Gatherv\n      ( const_cast<Complex<R>*>(sbuf), \n        sc,       \n        TypeMap<Complex<R>>(),\n        rbuf,  \n        const_cast<int*>(rcs), \n        const_cast<int*>(rds), \n        TypeMap<Complex<R>>(),\n        root, \n        comm.comm ) );\n#endif\n}\n\ntemplate void Gather\n( const byte* sbuf, int sc, \n        byte* rbuf, const int* rcs, const int* rds, int root, Comm comm );\ntemplate void Gather\n( const int* sbuf, int sc, \n        int* rbuf, const int* rcs, const int* rds, int root, Comm comm );\ntemplate void Gather\n( const unsigned* sbuf, int sc, \n        unsigned* rbuf, const int* rcs, const int* rds, int root, Comm comm );\ntemplate void Gather\n( const long int* sbuf, int sc, \n        long int* rbuf, const int* rcs, const int* rds, int root, Comm comm );\ntemplate void Gather\n( const unsigned long* sbuf, int sc, \n        unsigned long* rbuf, const int* rcs, const int* rds, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Gather\n( const long long int* sbuf, int sc, \n        long long int* rbuf, const int* rcs, const int* rds, int root, Comm comm );\ntemplate void Gather\n( const unsigned long long* sbuf, int sc, \n        unsigned long long* rbuf, const int* rcs, const int* rds, int root, Comm comm );\n#endif\ntemplate void Gather\n( const float* sbuf, int sc, \n        float* rbuf, const int* rcs, const int* rds, int root, Comm comm );\ntemplate void Gather\n( const double* sbuf, int sc, \n        double* rbuf, const int* rcs, const int* rds, int root, Comm comm );\ntemplate void Gather\n( const Complex<float>* sbuf, int sc, \n        Complex<float>* rbuf, const int* rcs, const int* rds, \n  int root, Comm comm );\ntemplate void Gather\n( const Complex<double>* sbuf, int sc, \n        Complex<double>* rbuf, const int* rcs, const int* rds, \n  int root, Comm comm );\n\ntemplate<typename R>\nvoid AllGather\n( const R* sbuf, int sc,\n        R* rbuf, int rc, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllGather\"))\n#ifdef ELEM_USE_BYTE_ALLGATHERS\n    SafeMpi\n    ( MPI_Allgather\n      ( (UCP)const_cast<R*>(sbuf), sizeof(R)*sc, MPI_UNSIGNED_CHAR, \n        (UCP)rbuf,                 sizeof(R)*rc, MPI_UNSIGNED_CHAR, \n        comm.comm ) );\n#else\n    SafeMpi\n    ( MPI_Allgather\n      ( const_cast<R*>(sbuf), sc, TypeMap<R>(), \n        rbuf,                 rc, TypeMap<R>(), comm.comm ) );\n#endif\n}\n\ntemplate<typename R>\nvoid AllGather\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, int rc, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllGather\"))\n#ifdef ELEM_USE_BYTE_ALLGATHERS\n    SafeMpi\n    ( MPI_Allgather\n      ( (UCP)const_cast<Complex<R>*>(sbuf), 2*sizeof(R)*sc, MPI_UNSIGNED_CHAR, \n        (UCP)rbuf,                          2*sizeof(R)*rc, MPI_UNSIGNED_CHAR, \n        comm.comm ) );\n#else\n #ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Allgather\n      ( const_cast<Complex<R>*>(sbuf), 2*sc, TypeMap<R>(),\n        rbuf,                          2*rc, TypeMap<R>(), comm.comm ) );\n #else\n    SafeMpi\n    ( MPI_Allgather\n      ( const_cast<Complex<R>*>(sbuf), sc, TypeMap<Complex<R>>(),\n        rbuf,                          rc, TypeMap<Complex<R>>(), comm.comm ) );\n #endif\n#endif\n}\n\ntemplate void AllGather( const byte* sbuf, int sc, byte* rbuf, int rc, Comm comm );\ntemplate void AllGather( const int* sbuf, int sc, int* rbuf, int rc, Comm comm );\ntemplate void AllGather( const unsigned* sbuf, int sc, unsigned* rbuf, int rc, Comm comm );\ntemplate void AllGather( const long int* sbuf, int sc, long int* rbuf, int rc, Comm comm );\ntemplate void AllGather( const unsigned long* sbuf, int sc, unsigned long* rbuf, int rc, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void AllGather( const long long int* sbuf, int sc, long long int* rbuf, int rc, Comm comm );\ntemplate void AllGather( const unsigned long long* sbuf, int sc, unsigned long long* rbuf, int rc, Comm comm );\n#endif\ntemplate void AllGather( const float* sbuf, int sc, float* rbuf, int rc, Comm comm );\ntemplate void AllGather( const double* sbuf, int sc, double* rbuf, int rc, Comm comm );\ntemplate void AllGather( const Complex<float>* sbuf, int sc, Complex<float>* rbuf, int rc, Comm comm );\ntemplate void AllGather( const Complex<double>* sbuf, int sc, Complex<double>* rbuf, int rc, Comm comm );\n\ntemplate<typename R>\nvoid AllGather\n( const R* sbuf, int sc,\n        R* rbuf, const int* rcs, const int* rds, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllGather\"))\n#ifdef ELEM_USE_BYTE_ALLGATHERS\n    const int commSize = Size( comm );\n    std::vector<int> byteRcs( commSize ), byteRds( commSize );\n    for( int i=0; i<commSize; ++i )\n    {\n        byteRcs[i] = sizeof(R)*rcs[i];\n        byteRds[i] = sizeof(R)*rds[i];\n    }\n    SafeMpi\n    ( MPI_Allgatherv\n      ( (UCP)const_cast<R*>(sbuf), sizeof(R)*sc,   MPI_UNSIGNED_CHAR, \n        (UCP)rbuf, byteRcs.data(), byteRds.data(), MPI_UNSIGNED_CHAR, \n        comm.comm ) );\n#else\n    SafeMpi\n    ( MPI_Allgatherv\n      ( const_cast<R*>(sbuf), \n        sc, \n        TypeMap<R>(), \n        rbuf,   \n        const_cast<int*>(rcs), \n        const_cast<int*>(rds), \n        TypeMap<R>(), \n        comm.comm ) );\n#endif\n}\n\ntemplate<typename R>\nvoid AllGather\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, const int* rcs, const int* rds, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllGather\"))\n#ifdef ELEM_USE_BYTE_ALLGATHERS\n    const int commSize = Size( comm );\n    std::vector<int> byteRcs( commSize ), byteRds( commSize );\n    for( int i=0; i<commSize; ++i )\n    {\n        byteRcs[i] = 2*sizeof(R)*rcs[i];\n        byteRds[i] = 2*sizeof(R)*rds[i];\n    }\n    SafeMpi\n    ( MPI_Allgatherv\n      ( (UCP)const_cast<Complex<R>*>(sbuf), 2*sizeof(R)*sc, MPI_UNSIGNED_CHAR, \n        (UCP)rbuf, byteRcs.data(), byteRds.data(),          MPI_UNSIGNED_CHAR, \n        comm.comm ) );\n#else\n #ifdef ELEM_AVOID_COMPLEX_MPI\n    const int commSize = Size( comm );\n    std::vector<int> realRcs( commSize ), realRds( commSize );\n    for( int i=0; i<commSize; ++i )\n    {\n        realRcs[i] = 2*rcs[i];\n        realRds[i] = 2*rds[i];\n    }\n    SafeMpi\n    ( MPI_Allgatherv\n      ( const_cast<Complex<R>*>(sbuf), 2*sc, TypeMap<R>(),\n        rbuf, realRcs.data(), realRds.data(), TypeMap<R>(), comm.comm ) );\n #else\n    SafeMpi\n    ( MPI_Allgatherv\n      ( const_cast<Complex<R>*>(sbuf), \n        sc, \n        TypeMap<Complex<R>>(),\n        rbuf, \n        const_cast<int*>(rcs), \n        const_cast<int*>(rds), \n        TypeMap<Complex<R>>(),\n        comm.comm ) );\n #endif\n#endif\n}\n\ntemplate void AllGather\n( const byte* sbuf, int sc, \n        byte* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllGather\n( const int* sbuf, int sc, \n        int* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllGather\n( const unsigned* sbuf, int sc, \n        unsigned* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllGather\n( const long int* sbuf, int sc, \n        long int* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllGather\n( const unsigned long* sbuf, int sc, \n        unsigned long* rbuf, const int* rcs, const int* rds, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void AllGather\n( const long long int* sbuf, int sc, \n        long long int* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllGather\n( const unsigned long long* sbuf, int sc, \n        unsigned long long* rbuf, const int* rcs, const int* rds, Comm comm );\n#endif\ntemplate void AllGather\n( const float* sbuf, int sc, \n        float* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllGather\n( const double* sbuf, int sc, \n        double* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllGather\n( const Complex<float>* sbuf, int sc, \n        Complex<float>* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllGather\n( const Complex<double>* sbuf, int sc, \n        Complex<double>* rbuf, const int* rcs, const int* rds, Comm comm );\n\ntemplate<typename R>\nvoid Scatter\n( const R* sbuf, int sc,\n        R* rbuf, int rc, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Scatter\"))\n    SafeMpi\n    ( MPI_Scatter\n      ( const_cast<R*>(sbuf), sc, TypeMap<R>(),\n        rbuf,                 rc, TypeMap<R>(), root, comm.comm ) );\n}\n\ntemplate<typename R>\nvoid Scatter\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, int rc, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Scatter\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Scatter\n      ( const_cast<Complex<R>*>(sbuf), 2*sc, TypeMap<R>(),\n        rbuf,                          2*rc, TypeMap<R>(), root, comm.comm ) );\n#else\n    SafeMpi\n    ( MPI_Scatter\n      ( const_cast<Complex<R>*>(sbuf), sc, TypeMap<Complex<R>>(),\n        rbuf,                          rc, TypeMap<Complex<R>>(), \n        root, comm.comm ) );\n#endif\n}\n\ntemplate void Scatter\n( const byte* sbuf, int sc, \n        byte* rbuf, int rc, int root, Comm comm );\ntemplate void Scatter\n( const int* sbuf, int sc, \n        int* rbuf, int rc, int root, Comm comm );\ntemplate void Scatter\n( const unsigned* sbuf, int sc, \n        unsigned* rbuf, int rc, int root, Comm comm );\ntemplate void Scatter\n( const long int* sbuf, int sc, \n        long int* rbuf, int rc, int root, Comm comm );\ntemplate void Scatter\n( const unsigned long* sbuf, int sc, \n        unsigned long* rbuf, int rc, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Scatter\n( const long long int* sbuf, int sc, \n        long long int* rbuf, int rc, int root, Comm comm );\ntemplate void Scatter\n( const unsigned long long* sbuf, int sc, \n        unsigned long long* rbuf, int rc, int root, Comm comm );\n#endif\ntemplate void Scatter\n( const float* sbuf, int sc, \n        float* rbuf, int rc, int root, Comm comm );\ntemplate void Scatter\n( const double* sbuf, int sc, \n        double* rbuf, int rc, int root, Comm comm );\ntemplate void Scatter\n( const Complex<float>* sbuf, int sc, \n        Complex<float>* rbuf, int rc, int root, Comm comm );\ntemplate void Scatter\n( const Complex<double>* sbuf, int sc, \n        Complex<double>* rbuf, int rc, int root, Comm comm );\n\ntemplate<typename R>\nvoid Scatter( R* buf, int sc, int rc, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Scatter\"))\n    const int commRank = Rank( comm );\n    if( commRank == root )\n    {\n#ifdef ELEM_HAVE_MPI_IN_PLACE\n        SafeMpi\n        ( MPI_Scatter\n          ( buf,          sc, TypeMap<R>(), \n            MPI_IN_PLACE, rc, TypeMap<R>(), root, comm.comm ) );\n#else\n        const int commSize = Size( comm );\n        std::vector<R> sendBuf( sc*commSize );\n        MemCopy( sendBuf.data(), buf, sc*commSize );\n        SafeMpi\n        ( MPI_Scatter\n          ( sendBuf.data(), sc, TypeMap<R>(), \n            buf,            rc, TypeMap<R>(), root, comm.comm ) );\n#endif\n    }\n    else\n    {\n        SafeMpi\n        ( MPI_Scatter\n          ( 0,   sc, TypeMap<R>(), \n            buf, rc, TypeMap<R>(), root, comm.comm ) );\n    }\n}\n\ntemplate<typename R>\nvoid Scatter( Complex<R>* buf, int sc, int rc, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Scatter\"))\n    const int commRank = Rank( comm );\n    if( commRank == root )\n    {\n#ifdef ELEM_AVOID_COMPLEX_MPI\n# ifdef ELEM_HAVE_MPI_IN_PLACE\n        SafeMpi\n        ( MPI_Scatter\n          ( buf,          2*sc, TypeMap<R>(), \n            MPI_IN_PLACE, 2*rc, TypeMap<R>(), root, comm.comm ) );\n# else\n        const int commSize = Size( comm );\n        std::vector<Complex<R>> sendBuf( sc*commSize );\n        MemCopy( sendBuf.data(), buf, sc*commSize );\n        SafeMpi\n        ( MPI_Scatter\n          ( sendBuf.data(), 2*sc, TypeMap<R>(),          \n            buf,            2*rc, TypeMap<R>(), root, comm.comm ) );\n# endif\n#else\n# ifdef ELEM_HAVE_MPI_IN_PLACE\n        SafeMpi\n        ( MPI_Scatter\n          ( buf,          sc, TypeMap<Complex<R>>(), \n            MPI_IN_PLACE, rc, TypeMap<Complex<R>>(), root, comm.comm ) );\n# else\n        const int commSize = Size( comm );\n        std::vector<Complex<R>> sendBuf( sc*commSize );\n        MemCopy( sendBuf.data(), buf, sc*commSize );\n        SafeMpi\n        ( MPI_Scatter\n          ( sendBuf.data(), sc, TypeMap<Complex<R>>(),\n            buf,            rc, TypeMap<Complex<R>>(), root, comm.comm ) );\n# endif\n#endif\n    }\n    else\n    {\n#ifdef ELEM_AVOID_COMPLEX_MPI\n        SafeMpi\n        ( MPI_Scatter\n          ( 0,   2*sc, TypeMap<R>(), \n            buf, 2*rc, TypeMap<R>(), root, comm.comm ) );\n#else\n        SafeMpi\n        ( MPI_Scatter\n          ( 0,   sc, TypeMap<Complex<R>>(), \n            buf, rc, TypeMap<Complex<R>>(), root, comm.comm ) );\n#endif\n    }\n}\n\ntemplate void Scatter( byte* buf, int sc, int rc, int root, Comm comm );\ntemplate void Scatter( int* buf, int sc, int rc, int root, Comm comm );\ntemplate void Scatter( unsigned* buf, int sc, int rc, int root, Comm comm );\ntemplate void Scatter( long int* buf, int sc, int rc, int root, Comm comm );\ntemplate void Scatter( unsigned long* buf, int sc, int rc, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Scatter( long long int* buf, int sc, int rc, int root, Comm comm );\ntemplate void Scatter( unsigned long long* buf, int sc, int rc, int root, Comm comm );\n#endif\ntemplate void Scatter( float* buf, int sc, int rc, int root, Comm comm );\ntemplate void Scatter( double* buf, int sc, int rc, int root, Comm comm );\ntemplate void Scatter( Complex<float>* buf, int sc, int rc, int root, Comm comm );\ntemplate void Scatter( Complex<double>* buf, int sc, int rc, int root, Comm comm );\n\ntemplate<typename R>\nvoid AllToAll\n( const R* sbuf, int sc,\n        R* rbuf, int rc, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllToAll\"))\n    SafeMpi\n    ( MPI_Alltoall\n      ( const_cast<R*>(sbuf), sc, TypeMap<R>(),\n        rbuf,                 rc, TypeMap<R>(), comm.comm ) );\n}\n\ntemplate<typename R>\nvoid AllToAll\n( const Complex<R>* sbuf, int sc,\n        Complex<R>* rbuf, int rc, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllToAll\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Alltoall\n      ( const_cast<Complex<R>*>(sbuf), 2*sc, TypeMap<R>(),\n        rbuf,                          2*rc, TypeMap<R>(), comm.comm ) );\n#else\n    SafeMpi\n    ( MPI_Alltoall\n      ( const_cast<Complex<R>*>(sbuf), sc, TypeMap<Complex<R>>(),\n        rbuf,                          rc, TypeMap<Complex<R>>(), comm.comm ) );\n#endif\n}\n\ntemplate void AllToAll\n( const byte* sbuf, int sc, \n        byte* rbuf, int rc, Comm comm );\ntemplate void AllToAll\n( const int* sbuf, int sc, \n        int* rbuf, int rc, Comm comm );\ntemplate void AllToAll\n( const unsigned* sbuf, int sc, \n        unsigned* rbuf, int rc, Comm comm );\ntemplate void AllToAll\n( const long int* sbuf, int sc, \n        long int* rbuf, int rc, Comm comm );\ntemplate void AllToAll\n( const unsigned long* sbuf, int sc, \n        unsigned long* rbuf, int rc, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void AllToAll\n( const long long int* sbuf, int sc, \n        long long int* rbuf, int rc, Comm comm );\ntemplate void AllToAll\n( const unsigned long long* sbuf, int sc, \n        unsigned long long* rbuf, int rc, Comm comm );\n#endif\ntemplate void AllToAll\n( const float* sbuf, int sc, \n        float* rbuf, int rc, Comm comm );\ntemplate void AllToAll\n( const double* sbuf, int sc, \n        double* rbuf, int rc, Comm comm );\ntemplate void AllToAll\n( const Complex<float>* sbuf, int sc, \n        Complex<float>* rbuf, int rc, Comm comm );\ntemplate void AllToAll\n( const Complex<double>* sbuf, int sc, \n        Complex<double>* rbuf, int rc, Comm comm );\n\ntemplate<typename R>\nvoid AllToAll\n( const R* sbuf, const int* scs, const int* sds, \n        R* rbuf, const int* rcs, const int* rds, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllToAll\"))\n    SafeMpi\n    ( MPI_Alltoallv\n      ( const_cast<R*>(sbuf), \n        const_cast<int*>(scs), \n        const_cast<int*>(sds), \n        TypeMap<R>(),\n        rbuf, \n        const_cast<int*>(rcs), \n        const_cast<int*>(rds), \n        TypeMap<R>(),\n        comm.comm ) );\n}\n\ntemplate<typename R>\nvoid AllToAll\n( const Complex<R>* sbuf, const int* scs, const int* sds,\n        Complex<R>* rbuf, const int* rcs, const int* rds, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllToAll\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    int p;\n    MPI_Comm_size( comm.comm, &p );\n    std::vector<int> scsDoubled(p);\n    std::vector<int> sdsDoubled(p);\n    std::vector<int> rcsDoubled(p);\n    std::vector<int> rdsDoubled(p);\n    for( int i=0; i<p; ++i )\n        scsDoubled[i] = 2*scs[i];\n    for( int i=0; i<p; ++i )\n        sdsDoubled[i] = 2*sds[i];\n    for( int i=0; i<p; ++i )\n        rcsDoubled[i] = 2*rcs[i];\n    for( int i=0; i<p; ++i )\n        rdsDoubled[i] = 2*rds[i];\n    SafeMpi\n    ( MPI_Alltoallv\n      ( const_cast<Complex<R>*>(sbuf),\n              scsDoubled.data(), sdsDoubled.data(), TypeMap<R>(),\n        rbuf, rcsDoubled.data(), rdsDoubled.data(), TypeMap<R>(), comm.comm ) );\n#else\n    SafeMpi\n    ( MPI_Alltoallv\n      ( const_cast<Complex<R>*>(sbuf), \n        const_cast<int*>(scs), \n        const_cast<int*>(sds), \n        TypeMap<Complex<R>>(),\n        rbuf, \n        const_cast<int*>(rcs), \n        const_cast<int*>(rds), \n        TypeMap<Complex<R>>(),\n        comm.comm ) );\n#endif\n}\n\ntemplate void AllToAll\n( const byte* sbuf, const int* scs, const int* sds,\n        byte* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllToAll\n( const int* sbuf, const int* scs, const int* sds,\n        int* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllToAll\n( const unsigned* sbuf, const int* scs, const int* sds,\n        unsigned* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllToAll\n( const long int* sbuf, const int* scs, const int* sds,\n        long int* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllToAll\n( const unsigned long* sbuf, const int* scs, const int* sds,\n        unsigned long* rbuf, const int* rcs, const int* rds, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void AllToAll\n( const long long int* sbuf, const int* scs, const int* sds,\n        long long int* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllToAll\n( const unsigned long long* sbuf, const int* scs, const int* sds,\n        unsigned long long* rbuf, const int* rcs, const int* rds, Comm comm );\n#endif\ntemplate void AllToAll\n( const float* sbuf, const int* scs, const int* sds,\n        float* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllToAll\n( const double* sbuf, const int* scs, const int* sds,\n        double* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllToAll\n( const Complex<float>* sbuf, const int* scs, const int* sds,\n        Complex<float>* rbuf, const int* rcs, const int* rds, Comm comm );\ntemplate void AllToAll\n( const Complex<double>* sbuf, const int* scs, const int* sds,\n        Complex<double>* rbuf, const int* rcs, const int* rds, Comm comm );\n\ntemplate<typename T>\nvoid Reduce\n( const T* sbuf, T* rbuf, int count, Op op, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Reduce\"))\n    if( count != 0 )\n    {\n        SafeMpi\n        ( MPI_Reduce\n          ( const_cast<T*>(sbuf), rbuf, count, TypeMap<T>(),\n            op.op, root, comm.comm ) );\n    }\n}\n\ntemplate<typename R>\nvoid Reduce\n( const Complex<R>* sbuf, \n        Complex<R>* rbuf, int count, Op op, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Reduce\"))\n    if( count != 0 )\n    {\n#ifdef ELEM_AVOID_COMPLEX_MPI\n        if( op == SUM )\n        {\n            SafeMpi\n            ( MPI_Reduce\n              ( const_cast<Complex<R>*>(sbuf),\n                rbuf, 2*count, TypeMap<R>(), op.op, root, comm.comm ) );\n        }\n        else\n        {\n            SafeMpi\n            ( MPI_Reduce\n              ( const_cast<Complex<R>*>(sbuf),\n                rbuf, count, TypeMap<Complex<R>>(), op.op, root, comm.comm ) );\n        }\n#else\n        SafeMpi\n        ( MPI_Reduce\n          ( const_cast<Complex<R>*>(sbuf), \n            rbuf, count, TypeMap<Complex<R>>(), op.op, root, comm.comm ) );\n#endif\n    }\n}\n\ntemplate void Reduce( const byte* sbuf, byte* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const int* sbuf, int* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const unsigned* sbuf, unsigned* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const long int* sbuf, long int* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const unsigned long* sbuf, unsigned long* rbuf, int count, Op op, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Reduce( const long long int* sbuf, long long int* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const unsigned long long* sbuf, unsigned long long* rbuf, int count, Op op, int root, Comm comm );\n#endif\ntemplate void Reduce( const float* sbuf, float* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const double* sbuf, double* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const Complex<float>* sbuf, Complex<float>* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const Complex<double>* sbuf, Complex<double>* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const ValueInt<Int>* sbuf, ValueInt<Int>* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const ValueInt<float>* sbuf, ValueInt<float>* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const ValueInt<double>* sbuf, ValueInt<double>* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const ValueIntPair<Int>* sbuf, ValueIntPair<Int>* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const ValueIntPair<float>* sbuf, ValueIntPair<float>* rbuf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( const ValueIntPair<double>* sbuf, ValueIntPair<double>* rbuf, int count, Op op, int root, Comm comm );\n\ntemplate<typename T>\nvoid Reduce( const T* sbuf, T* rbuf, int count, int root, Comm comm )\n{ Reduce( sbuf, rbuf, count, mpi::SUM, root, comm ); }\n\ntemplate void Reduce( const byte* sbuf, byte* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const int* sbuf, int* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const unsigned* sbuf, unsigned* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const long int* sbuf, long int* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const unsigned long* sbuf, unsigned long* rbuf, int count, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Reduce( const long long int* sbuf, long long int* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const unsigned long long* sbuf, unsigned long long* rbuf, int count, int root, Comm comm );\n#endif\ntemplate void Reduce( const float* sbuf, float* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const double* sbuf, double* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const Complex<float>* sbuf, Complex<float>* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const Complex<double>* sbuf, Complex<double>* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const ValueInt<Int>* sbuf, ValueInt<Int>* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const ValueInt<float>* sbuf, ValueInt<float>* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const ValueInt<double>* sbuf, ValueInt<double>* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const ValueIntPair<Int>* sbuf, ValueIntPair<Int>* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const ValueIntPair<float>* sbuf, ValueIntPair<float>* rbuf, int count, int root, Comm comm );\ntemplate void Reduce( const ValueIntPair<double>* sbuf, ValueIntPair<double>* rbuf, int count, int root, Comm comm );\n\ntemplate<typename T>\nT Reduce( T sb, Op op, int root, Comm comm )\n{ \n    T rb;\n    Reduce( &sb, &rb, 1, op, root, comm );\n    return rb;\n}\n\ntemplate byte Reduce( byte sb, Op op, int root, Comm comm );\ntemplate int Reduce( int sb, Op op, int root, Comm comm );\ntemplate unsigned Reduce( unsigned sb, Op op, int root, Comm comm );\ntemplate long int Reduce( long int sb, Op op, int root, Comm comm );\ntemplate unsigned long Reduce( unsigned long sb, Op op, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int Reduce( long long int sb, Op op, int root, Comm comm );\ntemplate unsigned long long Reduce( unsigned long long sb, Op op, int root, Comm comm );\n#endif\ntemplate float Reduce( float sb, Op op, int root, Comm comm );\ntemplate double Reduce( double sb, Op op, int root, Comm comm );\ntemplate Complex<float> Reduce( Complex<float> sb, Op op, int root, Comm comm );\ntemplate Complex<double> Reduce( Complex<double> sb, Op op, int root, Comm comm );\ntemplate ValueInt<Int> Reduce( ValueInt<Int> sb, Op op, int root, Comm comm );\ntemplate ValueInt<float> Reduce( ValueInt<float> sb, Op op, int root, Comm comm );\ntemplate ValueInt<double> Reduce( ValueInt<double> sb, Op op, int root, Comm comm );\ntemplate ValueIntPair<Int> Reduce( ValueIntPair<Int> sb, Op op, int root, Comm comm );\ntemplate ValueIntPair<float> Reduce( ValueIntPair<float> sb, Op op, int root, Comm comm );\ntemplate ValueIntPair<double> Reduce( ValueIntPair<double> sb, Op op, int root, Comm comm );\n\ntemplate<typename T>\nT Reduce( T sb, int root, Comm comm )\n{ \n    T rb;\n    Reduce( &sb, &rb, 1, mpi::SUM, root, comm );\n    return rb;\n}\n\ntemplate byte Reduce( byte sb, int root, Comm comm );\ntemplate int Reduce( int sb, int root, Comm comm );\ntemplate unsigned Reduce( unsigned sb, int root, Comm comm );\ntemplate long int Reduce( long int sb, int root, Comm comm );\ntemplate unsigned long Reduce( unsigned long sb, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int Reduce( long long int sb, int root, Comm comm );\ntemplate unsigned long long Reduce( unsigned long long sb, int root, Comm comm );\n#endif\ntemplate float Reduce( float sb, int root, Comm comm );\ntemplate double Reduce( double sb, int root, Comm comm );\ntemplate Complex<float> Reduce( Complex<float> sb, int root, Comm comm );\ntemplate Complex<double> Reduce( Complex<double> sb, int root, Comm comm );\ntemplate ValueInt<Int> Reduce( ValueInt<Int> sb, int root, Comm comm );\ntemplate ValueInt<float> Reduce( ValueInt<float> sb, int root, Comm comm );\ntemplate ValueInt<double> Reduce( ValueInt<double> sb, int root, Comm comm );\ntemplate ValueIntPair<Int> Reduce( ValueIntPair<Int> sb, int root, Comm comm );\ntemplate ValueIntPair<float> Reduce( ValueIntPair<float> sb, int root, Comm comm );\ntemplate ValueIntPair<double> Reduce( ValueIntPair<double> sb, int root, Comm comm );\n\ntemplate<typename T>\nvoid Reduce( T* buf, int count, Op op, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Reduce\"))\n    if( count != 0 )\n    {\n        const int commRank = Rank( comm );\n        if( commRank == root )\n        {\n#ifdef ELEM_HAVE_MPI_IN_PLACE\n            SafeMpi\n            ( MPI_Reduce\n              ( MPI_IN_PLACE, buf, count, TypeMap<T>(), op.op, root, \n                comm.comm ) );\n#else\n            std::vector<T> sendBuf( count );\n            MemCopy( sendBuf.data(), buf, count );\n            SafeMpi\n            ( MPI_Reduce\n              ( sendBuf.data(), buf, count, TypeMap<T>(), op.op, root, \n                comm.comm ) );\n#endif\n        }\n        else\n            SafeMpi\n            ( MPI_Reduce\n              ( buf, 0, count, TypeMap<T>(), op.op, root, comm.comm ) );\n    }\n}\n\ntemplate<typename R>\nvoid Reduce( Complex<R>* buf, int count, Op op, int root, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::Reduce\"))\n    if( count != 0 )\n    {\n        const int commRank = Rank( comm );\n#ifdef ELEM_AVOID_COMPLEX_MPI\n        if( op == SUM )\n        {\n            if( commRank == root )\n            {\n# ifdef ELEM_HAVE_MPI_IN_PLACE\n                SafeMpi\n                ( MPI_Reduce\n                  ( MPI_IN_PLACE, buf, 2*count, TypeMap<R>(), op.op, \n                    root, comm.comm ) );\n# else\n                std::vector<Complex<R>> sendBuf( count );\n                MemCopy( sendBuf.data(), buf, count );\n                SafeMpi\n                ( MPI_Reduce\n                  ( sendBuf.data(), buf, 2*count, TypeMap<R>(), op.op, \n                    root, comm.comm ) );\n# endif\n            }\n            else\n                SafeMpi\n                ( MPI_Reduce\n                  ( buf, 0, 2*count, TypeMap<R>(), op.op, root, comm.comm ) );\n        }\n        else\n        {\n            if( commRank == root )\n            {\n# ifdef ELEM_HAVE_MPI_IN_PLACE\n                SafeMpi\n                ( MPI_Reduce\n                  ( MPI_IN_PLACE, buf, count, TypeMap<Complex<R>>(), op.op, \n                    root, comm.comm ) );\n# else\n                std::vector<Complex<R>> sendBuf( count );\n                MemCopy( sendBuf.data(), buf, count );\n                SafeMpi\n                ( MPI_Reduce\n                  ( sendBuf.data(), buf, count, TypeMap<Complex<R>>(), op.op, \n                    root, comm.comm ) );\n# endif\n            }\n            else\n                SafeMpi\n                ( MPI_Reduce\n                  ( buf, 0, count, TypeMap<Complex<R>>(), op.op, \n                    root, comm.comm ) );\n        }\n#else\n        if( commRank == root )\n        {\n# ifdef ELEM_HAVE_MPI_IN_PLACE\n            SafeMpi\n            ( MPI_Reduce\n              ( MPI_IN_PLACE, buf, count, TypeMap<Complex<R>>(), op.op, \n                root, comm.comm ) );\n# else\n            std::vector<Complex<R>> sendBuf( count );\n            MemCopy( sendBuf.data(), buf, count );\n            SafeMpi\n            ( MPI_Reduce\n              ( sendBuf.data(), buf, count, TypeMap<Complex<R>>(), op.op, \n                root, comm.comm ) );\n# endif\n        }\n        else\n            SafeMpi\n            ( MPI_Reduce\n              ( buf, 0, count, TypeMap<Complex<R>>(), op.op, root, \n                comm.comm ) );\n#endif\n    }\n}\n\ntemplate void Reduce( byte* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( int* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( unsigned* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( long int* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( unsigned long* buf, int count, Op op, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Reduce( long long int* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( unsigned long long* buf, int count, Op op, int root, Comm comm );\n#endif\ntemplate void Reduce( float* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( double* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( Complex<float>* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( Complex<double>* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( ValueInt<Int>* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( ValueInt<float>* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( ValueInt<double>* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( ValueIntPair<Int>* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( ValueIntPair<float>* buf, int count, Op op, int root, Comm comm );\ntemplate void Reduce( ValueIntPair<double>* buf, int count, Op op, int root, Comm comm );\n\ntemplate<typename T>\nvoid Reduce( T* buf, int count, int root, Comm comm )\n{ Reduce( buf, count, mpi::SUM, root, comm ); }\n\ntemplate void Reduce( byte* buf, int count, int root, Comm comm );\ntemplate void Reduce( int* buf, int count, int root, Comm comm );\ntemplate void Reduce( unsigned* buf, int count, int root, Comm comm );\ntemplate void Reduce( long int* buf, int count, int root, Comm comm );\ntemplate void Reduce( unsigned long* buf, int count, int root, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void Reduce( long long int* buf, int count, int root, Comm comm );\ntemplate void Reduce( unsigned long long* buf, int count, int root, Comm comm );\n#endif\ntemplate void Reduce( float* buf, int count, int root, Comm comm );\ntemplate void Reduce( double* buf, int count, int root, Comm comm );\ntemplate void Reduce( Complex<float>* buf, int count, int root, Comm comm );\ntemplate void Reduce( Complex<double>* buf, int count, int root, Comm comm );\ntemplate void Reduce( ValueInt<Int>* buf, int count, int root, Comm comm );\ntemplate void Reduce( ValueInt<float>* buf, int count, int root, Comm comm );\ntemplate void Reduce( ValueInt<double>* buf, int count, int root, Comm comm );\ntemplate void Reduce( ValueIntPair<Int>* buf, int count, int root, Comm comm );\ntemplate void Reduce( ValueIntPair<float>* buf, int count, int root, Comm comm );\ntemplate void Reduce( ValueIntPair<double>* buf, int count, int root, Comm comm );\n\ntemplate<typename T>\nvoid AllReduce( const T* sbuf, T* rbuf, int count, Op op, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllReduce\"))\n    if( count != 0 )\n    {\n        SafeMpi\n        ( MPI_Allreduce\n          ( const_cast<T*>(sbuf), rbuf, count, TypeMap<T>(), op.op, \n            comm.comm ) );\n    }\n}\n\ntemplate<typename R>\nvoid AllReduce\n( const Complex<R>* sbuf, Complex<R>* rbuf, int count, Op op, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllReduce\"))\n    if( count != 0 )\n    {\n#ifdef ELEM_AVOID_COMPLEX_MPI\n        if( op == SUM )\n        {\n            SafeMpi\n            ( MPI_Allreduce\n                ( const_cast<Complex<R>*>(sbuf),\n                  rbuf, 2*count, TypeMap<R>(), op.op, comm.comm ) );\n        }\n        else\n        {\n            SafeMpi\n            ( MPI_Allreduce\n              ( const_cast<Complex<R>*>(sbuf),\n                rbuf, count, TypeMap<Complex<R>>(), op.op, comm.comm ) );\n        }\n#else\n        SafeMpi\n        ( MPI_Allreduce\n          ( const_cast<Complex<R>*>(sbuf), \n            rbuf, count, TypeMap<Complex<R>>(), op.op, comm.comm ) );\n#endif\n    }\n}\n\ntemplate void AllReduce( const byte* sbuf, byte* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const int* sbuf, int* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const unsigned* sbuf, unsigned* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const long int* sbuf, long int* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const unsigned long* sbuf, unsigned long* rbuf, int count, Op op, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void AllReduce( const long long int* sbuf, long long int* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const unsigned long long* sbuf, unsigned long long* rbuf, int count, Op op, Comm comm );\n#endif\ntemplate void AllReduce( const float* sbuf, float* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const double* sbuf, double* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const Complex<float>* sbuf, Complex<float>* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const Complex<double>* sbuf, Complex<double>* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const ValueInt<Int>* sbuf, ValueInt<Int>* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const ValueInt<float>* sbuf, ValueInt<float>* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const ValueInt<double>* sbuf, ValueInt<double>* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const ValueIntPair<Int>* sbuf, ValueIntPair<Int>* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const ValueIntPair<float>* sbuf, ValueIntPair<float>* rbuf, int count, Op op, Comm comm );\ntemplate void AllReduce( const ValueIntPair<double>* sbuf, ValueIntPair<double>* rbuf, int count, Op op, Comm comm );\n\ntemplate<typename T>\nvoid AllReduce( const T* sbuf, T* rbuf, int count, Comm comm )\n{ AllReduce( sbuf, rbuf, count, mpi::SUM, comm ); }\n\ntemplate void AllReduce( const byte* sbuf, byte* rbuf, int count, Comm comm );\ntemplate void AllReduce( const int* sbuf, int* rbuf, int count, Comm comm );\ntemplate void AllReduce( const unsigned* sbuf, unsigned* rbuf, int count, Comm comm );\ntemplate void AllReduce( const long int* sbuf, long int* rbuf, int count, Comm comm );\ntemplate void AllReduce( const unsigned long* sbuf, unsigned long* rbuf, int count, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void AllReduce( const long long int* sbuf, long long int* rbuf, int count, Comm comm );\ntemplate void AllReduce( const unsigned long long* sbuf, unsigned long long* rbuf, int count, Comm comm );\n#endif\ntemplate void AllReduce( const float* sbuf, float* rbuf, int count, Comm comm );\ntemplate void AllReduce( const double* sbuf, double* rbuf, int count, Comm comm );\ntemplate void AllReduce( const Complex<float>* sbuf, Complex<float>* rbuf, int count, Comm comm );\ntemplate void AllReduce( const Complex<double>* sbuf, Complex<double>* rbuf, int count, Comm comm );\ntemplate void AllReduce( const ValueInt<Int>* sbuf, ValueInt<Int>* rbuf, int count, Comm comm );\ntemplate void AllReduce( const ValueInt<float>* sbuf, ValueInt<float>* rbuf, int count, Comm comm );\ntemplate void AllReduce( const ValueInt<double>* sbuf, ValueInt<double>* rbuf, int count, Comm comm );\ntemplate void AllReduce( const ValueIntPair<Int>* sbuf, ValueIntPair<Int>* rbuf, int count, Comm comm );\ntemplate void AllReduce( const ValueIntPair<float>* sbuf, ValueIntPair<float>* rbuf, int count, Comm comm );\ntemplate void AllReduce( const ValueIntPair<double>* sbuf, ValueIntPair<double>* rbuf, int count, Comm comm );\n\ntemplate<typename T>\nT AllReduce( T sb, Op op, Comm comm )\n{ T rb; AllReduce( &sb, &rb, 1, op, comm ); return rb; }\n\ntemplate byte AllReduce( byte sb, Op op, Comm comm );\ntemplate int AllReduce( int sb, Op op, Comm comm );\ntemplate unsigned AllReduce( unsigned sb, Op op, Comm comm );\ntemplate long int AllReduce( long int sb, Op op, Comm comm );\ntemplate unsigned long AllReduce( unsigned long sb, Op op, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int AllReduce( long long int sb, Op op, Comm comm );\ntemplate unsigned long long AllReduce( unsigned long long sb, Op op, Comm comm );\n#endif\ntemplate float AllReduce( float sb, Op op, Comm comm );\ntemplate double AllReduce( double sb, Op op, Comm comm );\ntemplate Complex<float> AllReduce( Complex<float> sb, Op op, Comm comm );\ntemplate Complex<double> AllReduce( Complex<double> sb, Op op, Comm comm );\ntemplate ValueInt<Int> AllReduce( ValueInt<Int> sb, Op op, Comm comm );\ntemplate ValueInt<float> AllReduce( ValueInt<float> sb, Op op, Comm comm );\ntemplate ValueInt<double> AllReduce( ValueInt<double> sb, Op op, Comm comm );\ntemplate ValueIntPair<Int> AllReduce( ValueIntPair<Int> sb, Op op, Comm comm );\ntemplate ValueIntPair<float> AllReduce( ValueIntPair<float> sb, Op op, Comm comm );\ntemplate ValueIntPair<double> AllReduce( ValueIntPair<double> sb, Op op, Comm comm );\n\ntemplate<typename T>\nT AllReduce( T sb, Comm comm )\n{ return AllReduce( sb, mpi::SUM, comm ); }\n\ntemplate byte AllReduce( byte sb, Comm comm );\ntemplate int AllReduce( int sb, Comm comm );\ntemplate unsigned AllReduce( unsigned sb, Comm comm );\ntemplate long int AllReduce( long int sb, Comm comm );\ntemplate unsigned long AllReduce( unsigned long sb, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int AllReduce( long long int sb, Comm comm );\ntemplate unsigned long long AllReduce( unsigned long long sb, Comm comm );\n#endif\ntemplate float AllReduce( float sb, Comm comm );\ntemplate double AllReduce( double sb, Comm comm );\ntemplate Complex<float> AllReduce( Complex<float> sb, Comm comm );\ntemplate Complex<double> AllReduce( Complex<double> sb, Comm comm );\ntemplate ValueInt<Int> AllReduce( ValueInt<Int> sb, Comm comm );\ntemplate ValueInt<float> AllReduce( ValueInt<float> sb, Comm comm );\ntemplate ValueInt<double> AllReduce( ValueInt<double> sb, Comm comm );\ntemplate ValueIntPair<Int> AllReduce( ValueIntPair<Int> sb, Comm comm );\ntemplate ValueIntPair<float> AllReduce( ValueIntPair<float> sb, Comm comm );\ntemplate ValueIntPair<double> AllReduce( ValueIntPair<double> sb, Comm comm );\n\ntemplate<typename T>\nvoid AllReduce( T* buf, int count, Op op, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllReduce\"))\n    if( count != 0 )\n    {\n#ifdef ELEM_HAVE_MPI_IN_PLACE\n        SafeMpi\n        ( MPI_Allreduce\n          ( MPI_IN_PLACE, buf, count, TypeMap<T>(), op.op, comm.comm ) );\n#else\n        std::vector<T> sendBuf( count );\n        MemCopy( sendBuf.data(), buf, count );\n        SafeMpi\n        ( MPI_Allreduce\n          ( sendBuf.data(), buf, count, TypeMap<T>(), op.op, comm.comm ) );\n#endif\n    }\n}\n\ntemplate<typename R>\nvoid AllReduce( Complex<R>* buf, int count, Op op, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::AllReduce\"))\n    if( count != 0 )\n    {\n#ifdef ELEM_AVOID_COMPLEX_MPI\n        if( op == SUM )\n        {\n# ifdef ELEM_HAVE_MPI_IN_PLACE\n            SafeMpi\n            ( MPI_Allreduce\n              ( MPI_IN_PLACE, buf, 2*count, TypeMap<R>(), op.op, comm.comm ) );\n# else\n            std::vector<Complex<R>> sendBuf( count );\n            MemCopy( sendBuf.data(), buf, count );\n            SafeMpi\n            ( MPI_Allreduce\n              ( sendBuf.data(), buf, 2*count, TypeMap<R>(), op.op, \n                comm.comm ) );\n# endif\n        }\n        else\n        {\n# ifdef ELEM_HAVE_MPI_IN_PLACE\n            SafeMpi\n            ( MPI_Allreduce\n              ( MPI_IN_PLACE, buf, count, TypeMap<Complex<R>>(), \n                op.op, comm.comm ) );\n# else\n            std::vector<Complex<R>> sendBuf( count );\n            MemCopy( sendBuf.data(), buf, count );\n            SafeMpi\n            ( MPI_Allreduce\n              ( sendBuf.data(), buf, count, TypeMap<Complex<R>>(), \n                op.op, comm.comm ) );\n# endif\n        }\n#else\n# ifdef ELEM_HAVE_MPI_IN_PLACE\n        SafeMpi\n        ( MPI_Allreduce\n          ( MPI_IN_PLACE, buf, count, TypeMap<Complex<R>>(), op.op, \n            comm.comm ) );\n# else\n        std::vector<Complex<R>> sendBuf( count );\n        MemCopy( sendBuf.data(), buf, count );\n        SafeMpi\n        ( MPI_Allreduce\n          ( sendBuf.data(), buf, count, TypeMap<Complex<R>>(), op.op, \n            comm.comm ) );\n# endif\n#endif\n    }\n}\n\ntemplate void AllReduce( byte* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( int* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( unsigned* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( long int* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( unsigned long* buf, int count, Op op, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void AllReduce( long long int* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( unsigned long long* buf, int count, Op op, Comm comm );\n#endif\ntemplate void AllReduce( float* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( double* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( Complex<float>* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( Complex<double>* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( ValueInt<Int>* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( ValueInt<float>* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( ValueInt<double>* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( ValueIntPair<Int>* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( ValueIntPair<float>* buf, int count, Op op, Comm comm );\ntemplate void AllReduce( ValueIntPair<double>* buf, int count, Op op, Comm comm );\n\ntemplate<typename T>\nvoid AllReduce( T* buf, int count, Comm comm )\n{ AllReduce( buf, count, mpi::SUM, comm ); }\n\ntemplate void AllReduce( byte* buf, int count, Comm comm );\ntemplate void AllReduce( int* buf, int count, Comm comm );\ntemplate void AllReduce( unsigned* buf, int count, Comm comm );\ntemplate void AllReduce( long int* buf, int count, Comm comm );\ntemplate void AllReduce( unsigned long* buf, int count, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void AllReduce( long long int* buf, int count, Comm comm );\ntemplate void AllReduce( unsigned long long* buf, int count, Comm comm );\n#endif\ntemplate void AllReduce( float* buf, int count, Comm comm );\ntemplate void AllReduce( double* buf, int count, Comm comm );\ntemplate void AllReduce( Complex<float>* buf, int count, Comm comm );\ntemplate void AllReduce( Complex<double>* buf, int count, Comm comm );\ntemplate void AllReduce( ValueInt<Int>* buf, int count, Comm comm );\ntemplate void AllReduce( ValueInt<float>* buf, int count, Comm comm );\ntemplate void AllReduce( ValueInt<double>* buf, int count, Comm comm );\ntemplate void AllReduce( ValueIntPair<Int>* buf, int count, Comm comm );\ntemplate void AllReduce( ValueIntPair<float>* buf, int count, Comm comm );\ntemplate void AllReduce( ValueIntPair<double>* buf, int count, Comm comm );\n\ntemplate<typename R>\nvoid ReduceScatter( R* sbuf, R* rbuf, int rc, Op op, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ReduceScatter\"))\n#ifdef ELEM_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE\n    const int commSize = Size( comm );\n    const int commRank = Rank( comm );\n    AllReduce( sbuf, rc*commSize, op, comm );\n    MemCopy( rbuf, &sbuf[commRank*rc], rc );\n#elif defined(ELEM_HAVE_MPI_REDUCE_SCATTER_BLOCK)\n    SafeMpi\n    ( MPI_Reduce_scatter_block\n      ( sbuf, rbuf, rc, TypeMap<R>(), op.op, comm.comm ) );\n#else\n    const int commSize = Size( comm );\n    Reduce( sbuf, rc*commSize, op, 0, comm );\n    Scatter( sbuf, rc, rbuf, rc, 0, comm );\n#endif\n}\n\ntemplate<typename R>\nvoid ReduceScatter\n( Complex<R>* sbuf, Complex<R>* rbuf, int rc, Op op, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ReduceScatter\"))\n#ifdef ELEM_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE\n    const int commSize = Size( comm );\n    const int commRank = Rank( comm );\n    AllReduce( sbuf, rc*commSize, op, comm );\n    MemCopy( rbuf, &sbuf[commRank*rc], rc );\n#elif defined(ELEM_HAVE_MPI_REDUCE_SCATTER_BLOCK)\n# ifdef ELEM_AVOID_COMPLEX_MPI\n    SafeMpi\n    ( MPI_Reduce_scatter_block\n      ( sbuf, rbuf, 2*rc, TypeMap<R>(), op.op, comm.comm ) );\n# else\n    SafeMpi\n    ( MPI_Reduce_scatter_block\n      ( sbuf, rbuf, rc, TypeMap<Complex<R>>(), op.op, comm.comm ) );\n# endif\n#else\n    const int commSize = Size( comm );\n    Reduce( sbuf, rc*commSize, op, 0, comm );\n    Scatter( sbuf, rc, rbuf, rc, 0, comm );\n#endif\n}\n\ntemplate void ReduceScatter( byte* sbuf, byte* rbuf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( int* sbuf, int* rbuf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( unsigned* sbuf, unsigned* rbuf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( long int* sbuf, long int* rbuf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( unsigned long* sbuf, unsigned long* rbuf, int rc, Op op, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void ReduceScatter( long long int* sbuf, long long int* rbuf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( unsigned long long* sbuf, unsigned long long* rbuf, int rc, Op op, Comm comm );\n#endif\ntemplate void ReduceScatter( float* sbuf, float* rbuf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( double* sbuf, double* rbuf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( Complex<float>* sbuf, Complex<float>* rbuf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( Complex<double>* sbuf, Complex<double>* rbuf, int rc, Op op, Comm comm );\n\ntemplate<typename T>\nvoid ReduceScatter( T* sbuf, T* rbuf, int rc, Comm comm )\n{ ReduceScatter( sbuf, rbuf, rc, mpi::SUM, comm ); }\n\ntemplate void ReduceScatter( byte* sbuf, byte* rbuf, int rc, Comm comm );\ntemplate void ReduceScatter( int* sbuf, int* rbuf, int rc, Comm comm );\ntemplate void ReduceScatter( unsigned* sbuf, unsigned* rbuf, int rc, Comm comm );\ntemplate void ReduceScatter( long int* sbuf, long int* rbuf, int rc, Comm comm );\ntemplate void ReduceScatter( unsigned long* sbuf, unsigned long* rbuf, int rc, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void ReduceScatter( long long int* sbuf, long long int* rbuf, int rc, Comm comm );\ntemplate void ReduceScatter( unsigned long long* sbuf, unsigned long long* rbuf, int rc, Comm comm );\n#endif\ntemplate void ReduceScatter( float* sbuf, float* rbuf, int rc, Comm comm );\ntemplate void ReduceScatter( double* sbuf, double* rbuf, int rc, Comm comm );\ntemplate void ReduceScatter( Complex<float>* sbuf, Complex<float>* rbuf, int rc, Comm comm );\ntemplate void ReduceScatter( Complex<double>* sbuf, Complex<double>* rbuf, int rc, Comm comm );\n\ntemplate<typename T>\nT ReduceScatter( T sb, Op op, Comm comm )\n{ T rb; ReduceScatter( &sb, &rb, 1, op, comm ); return rb; }\n\ntemplate byte ReduceScatter( byte sb, Op op, Comm comm );\ntemplate int ReduceScatter( int sb, Op op, Comm comm );\ntemplate unsigned ReduceScatter( unsigned sb, Op op, Comm comm );\ntemplate long int ReduceScatter( long int sb, Op op, Comm comm );\ntemplate unsigned long ReduceScatter( unsigned long sb, Op op, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int ReduceScatter( long long int sb, Op op, Comm comm );\ntemplate unsigned long long ReduceScatter( unsigned long long sb, Op op, Comm comm );\n#endif\ntemplate float ReduceScatter( float sb, Op op, Comm comm );\ntemplate double ReduceScatter( double sb, Op op, Comm comm );\ntemplate Complex<float> ReduceScatter( Complex<float> sb, Op op, Comm comm );\ntemplate Complex<double> ReduceScatter( Complex<double> sb, Op op, Comm comm );\n\ntemplate<typename T>\nT ReduceScatter( T sb, Comm comm )\n{ return ReduceScatter( sb, mpi::SUM, comm ); }\n\ntemplate byte ReduceScatter( byte sb, Comm comm );\ntemplate int ReduceScatter( int sb, Comm comm );\ntemplate unsigned ReduceScatter( unsigned sb, Comm comm );\ntemplate long int ReduceScatter( long int sb, Comm comm );\ntemplate unsigned long ReduceScatter( unsigned long sb, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate long long int ReduceScatter( long long int sb, Comm comm );\ntemplate unsigned long long ReduceScatter( unsigned long long sb, Comm comm );\n#endif\ntemplate float ReduceScatter( float sb, Comm comm );\ntemplate double ReduceScatter( double sb, Comm comm );\ntemplate Complex<float> ReduceScatter( Complex<float> sb, Comm comm );\ntemplate Complex<double> ReduceScatter( Complex<double> sb, Comm comm );\n\ntemplate<typename R>\nvoid ReduceScatter( R* buf, int rc, Op op, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ReduceScatter\"))\n#ifdef ELEM_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE\n    const int commSize = Size( comm );\n    const int commRank = Rank( comm );\n    AllReduce( buf, rc*commSize, op, comm );\n    if( commRank != 0 )\n        MemCopy( buf, &buf[commRank*rc], rc );\n#elif defined(ELEM_HAVE_MPI_REDUCE_SCATTER_BLOCK)\n# ifdef ELEM_HAVE_MPI_IN_PLACE\n    SafeMpi\n    ( MPI_Reduce_scatter_block\n      ( MPI_IN_PLACE, buf, rc, TypeMap<R>(), op.op, comm.comm ) );\n# else\n    const int commSize = Size( comm );\n    std::vector<R> sendBuf( rc*commSize );\n    MemCopy( sendBuf.data(), buf, rc*commSize );\n    SafeMpi\n    ( MPI_Reduce_scatter_block\n      ( sendBuf.data(), buf, rc, TypeMap<R>(), op.op, comm.comm ) );\n# endif\n#else\n    const int commSize = Size( comm );\n    Reduce( buf, rc*commSize, op, 0, comm );\n    Scatter( buf, rc, rc, 0, comm );\n#endif\n}\n\n// TODO: Handle case where op is not summation\ntemplate<typename R>\nvoid ReduceScatter( Complex<R>* buf, int rc, Op op, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ReduceScatter\"))\n#ifdef ELEM_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE\n    const int commSize = Size( comm );\n    const int commRank = Rank( comm );\n    AllReduce( buf, rc*commSize, op, comm );\n    if( commRank != 0 )\n        MemCopy( buf, &buf[commRank*rc], rc );\n#elif defined(ELEM_HAVE_MPI_REDUCE_SCATTER_BLOCK)\n# ifdef ELEM_AVOID_COMPLEX_MPI\n#  ifdef ELEM_HAVE_MPI_IN_PLACE\n    SafeMpi\n    ( MPI_Reduce_scatter_block\n      ( MPI_IN_PLACE, buf, 2*rc, TypeMap<R>(), op.op, comm.comm ) );\n#  else \n    const int commSize = Size( comm );\n    std::vector<Complex<R>> sendBuf( rc*commSize );\n    MemCopy( sendBuf.data(), buf, rc*commSize );\n    SafeMpi\n    ( MPI_Reduce_scatter_block\n      ( sendBuf.data(), buf, 2*rc, TypeMap<R>(), op.op, comm.comm ) );\n#  endif\n# else\n#  ifdef ELEM_HAVE_MPI_IN_PLACE\n    SafeMpi\n    ( MPI_Reduce_scatter_block\n      ( MPI_IN_PLACE, buf, rc, TypeMap<Complex<R>>(), op.op, comm.comm ) );\n#  else\n    const int commSize = Size( comm );\n    std::vector<Complex<R>> sendBuf( rc*commSize );\n    MemCopy( sendBuf.data(), buf, rc*commSize );\n    SafeMpi\n    ( MPI_Reduce_scatter_block\n      ( sendBuf.data(), buf, rc, TypeMap<Complex<R>>(), op.op, comm.comm ) );\n#  endif\n# endif\n#else\n    const int commSize = Size( comm );\n    Reduce( buf, rc*commSize, op, 0, comm );\n    Scatter( buf, rc, rc, 0, comm );\n#endif\n}\n\ntemplate void ReduceScatter( byte* buf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( int* buf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( unsigned* buf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( long int* buf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( unsigned long* buf, int rc, Op op, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void ReduceScatter( long long int* buf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( unsigned long long* buf, int rc, Op op, Comm comm );\n#endif\ntemplate void ReduceScatter( float* buf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( double* buf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( Complex<float>* buf, int rc, Op op, Comm comm );\ntemplate void ReduceScatter( Complex<double>* buf, int rc, Op op, Comm comm );\n\ntemplate<typename T>\nvoid ReduceScatter( T* buf, int rc, Comm comm )\n{ ReduceScatter( buf, rc, mpi::SUM, comm ); }\n\ntemplate void ReduceScatter( byte* buf, int rc, Comm comm );\ntemplate void ReduceScatter( int* buf, int rc, Comm comm );\ntemplate void ReduceScatter( unsigned* buf, int rc, Comm comm );\ntemplate void ReduceScatter( long int* buf, int rc, Comm comm );\ntemplate void ReduceScatter( unsigned long* buf, int rc, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void ReduceScatter( long long int* buf, int rc, Comm comm );\ntemplate void ReduceScatter( unsigned long long* buf, int rc, Comm comm );\n#endif\ntemplate void ReduceScatter( float* buf, int rc, Comm comm );\ntemplate void ReduceScatter( double* buf, int rc, Comm comm );\ntemplate void ReduceScatter( Complex<float>* buf, int rc, Comm comm );\ntemplate void ReduceScatter( Complex<double>* buf, int rc, Comm comm );\n\ntemplate<typename R>\nvoid ReduceScatter\n( const R* sbuf, R* rbuf, const int* rcs, Op op, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ReduceScatter\"))\n    SafeMpi\n    ( MPI_Reduce_scatter\n      ( const_cast<R*>(sbuf), \n        rbuf, const_cast<int*>(rcs), TypeMap<R>(), op.op, comm.comm ) );\n}\n\ntemplate<typename R>\nvoid ReduceScatter\n( const Complex<R>* sbuf, Complex<R>* rbuf, const int* rcs, Op op, Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"mpi::ReduceScatter\"))\n#ifdef ELEM_AVOID_COMPLEX_MPI\n    if( op == SUM )\n    {\n        int p;\n        MPI_Comm_size( comm.comm, &p );\n        std::vector<int> rcsDoubled(p);\n        for( int i=0; i<p; ++i )\n            rcsDoubled[i] = 2*rcs[i];\n        SafeMpi\n        ( MPI_Reduce_scatter\n          ( const_cast<Complex<R>*>(sbuf),\n            rbuf, rcsDoubled.data(), TypeMap<R>(), op.op, comm.comm ) );\n    }\n    else\n    {\n        SafeMpi\n        ( MPI_Reduce_scatter\n          ( const_cast<Complex<R>*>(sbuf),\n            rbuf, const_cast<int*>(rcs), TypeMap<Complex<R>>(), \n            op.op, comm.comm ) );\n    }\n#else\n    SafeMpi\n    ( MPI_Reduce_scatter\n      ( const_cast<Complex<R>*>(sbuf), \n        rbuf, const_cast<int*>(rcs), TypeMap<Complex<R>>(), op.op, \n        comm.comm ) );\n#endif\n}\n\ntemplate void ReduceScatter( const byte* sbuf, byte* rbuf, const int* rcs, Op op, Comm comm );\ntemplate void ReduceScatter( const int* sbuf, int* rbuf, const int* rcs, Op op, Comm comm );\ntemplate void ReduceScatter( const unsigned* sbuf, unsigned* rbuf, const int* rcs, Op op, Comm comm );\ntemplate void ReduceScatter( const long int* sbuf, long int* rbuf, const int* rcs, Op op, Comm comm );\ntemplate void ReduceScatter( const unsigned long* sbuf, unsigned long* rbuf, const int* rcs, Op op, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void ReduceScatter( const long long int* sbuf, long long int* rbuf, const int* rcs, Op op, Comm comm );\ntemplate void ReduceScatter( const unsigned long long* sbuf, unsigned long long* rbuf, const int* rcs, Op op, Comm comm );\n#endif\ntemplate void ReduceScatter( const float* sbuf, float* rbuf, const int* rcs, Op op, Comm comm );\ntemplate void ReduceScatter( const double* sbuf, double* rbuf, const int* rcs, Op op, Comm comm );\ntemplate void ReduceScatter( const Complex<float>* sbuf, Complex<float>* rbuf, const int* rcs, Op op, Comm comm );\ntemplate void ReduceScatter( const Complex<double>* sbuf, Complex<double>* rbuf, const int* rcs, Op op, Comm comm );\n\ntemplate<typename T>\nvoid ReduceScatter( const T* sbuf, T* rbuf, const int* rcs, Comm comm )\n{ ReduceScatter( sbuf, rbuf, rcs, mpi::SUM, comm ); }\n\ntemplate void ReduceScatter( const byte* sbuf, byte* rbuf, const int* rcs, Comm comm );\ntemplate void ReduceScatter( const int* sbuf, int* rbuf, const int* rcs, Comm comm );\ntemplate void ReduceScatter( const unsigned* sbuf, unsigned* rbuf, const int* rcs, Comm comm );\ntemplate void ReduceScatter( const long int* sbuf, long int* rbuf, const int* rcs, Comm comm );\ntemplate void ReduceScatter( const unsigned long* sbuf, unsigned long* rbuf, const int* rcs, Comm comm );\n#ifdef ELEM_HAVE_MPI_LONG_LONG\ntemplate void ReduceScatter( const long long int* sbuf, long long int* rbuf, const int* rcs, Comm comm );\ntemplate void ReduceScatter( const unsigned long long* sbuf, unsigned long long* rbuf, const int* rcs, Comm comm );\n#endif\ntemplate void ReduceScatter( const float* sbuf, float* rbuf, const int* rcs, Comm comm );\ntemplate void ReduceScatter( const double* sbuf, double* rbuf, const int* rcs, Comm comm );\ntemplate void ReduceScatter( const Complex<float>* sbuf, Complex<float>* rbuf, const int* rcs, Comm comm );\ntemplate void ReduceScatter( const Complex<double>* sbuf, Complex<double>* rbuf, const int* rcs, Comm comm );\n\n} // namespace mpi\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/imports/pmrrr.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\nextern \"C\" {\n\nint pmrrr\n( const char* jobz,  // 'N' ~ only eigenvalues, 'V' ~ also eigenvectors\n  const char* range, // 'A'~all eigenpairs, 'V'~interval (vl,vu], 'I'~il-iu\n  const int* n,      // size of matrix\n        double* d,   // full diagonal of tridiagonal matrix [length n]\n        double* e,   // full subdiagonal in first n-1 entries [length n]\n  const double* vl,  // if range=='V', compute eigenpairs in (vl,vu]\n  const double* vu,\n  const int* il, // if range=='I', compute il-iu eigenpairs\n  const int* iu,\n  int* tryrac, // if nonzero, try for high relative accuracy\n  MPI_Comm comm,\n  int* nz,        // number of locally computed eigenvectors\n  int* offset,    // the first eigenpair computed by our process\n  double* w,      // eigenvalues corresponding to local eigenvectors [length nz]\n  double* Z,      // local eigenvectors [size ldz x nz]\n  const int* ldz, // leading dimension of Z\n  int* ZSupp      // support of eigenvectors [length 2n]\n);\n\n} // extern \"C\"\n\nnamespace elem {\nnamespace herm_tridiag_eig {\n\n// Return upper bounds on the number of (local) eigenvalues in the given range,\n// (lowerBound,upperBound]\nEstimate EigEstimate\n( int n, double* d, double* e, double* w, mpi::Comm comm, \n  double lowerBound, double upperBound )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_tridiag_eig::EigEstimate\"))\n    Estimate estimate;\n    char jobz='C';\n    char range='V';\n    int il, iu;\n    int highAccuracy=0;\n    int nz, offset;\n    int ldz=1;\n    std::vector<int> ZSupport(2*n);\n    int retval = pmrrr\n    ( &jobz, &range, &n, d, e, &lowerBound, &upperBound, &il, &iu, \n      &highAccuracy, comm.comm, &nz, &offset, w, 0, &ldz, ZSupport.data() );\n    if( retval != 0 )\n        RuntimeError(\"pmrrr returned \",retval);\n\n    estimate.numLocalEigenvalues = nz;\n    estimate.numGlobalEigenvalues = mpi::AllReduce( nz, comm );\n    return estimate;\n}\n\n// Compute all of the eigenvalues\nInfo Eig( int n, double* d, double* e, double* w, mpi::Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_tridiag_eig::Eig\"))\n    Info info;\n    char jobz='N';\n    char range='A';\n    double vl, vu;\n    int il, iu;\n    int highAccuracy=0; \n    int nz, offset;\n    int ldz=1;\n    std::vector<int> ZSupport(2*n);\n    int retval = pmrrr\n    ( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &highAccuracy, comm.comm,\n      &nz, &offset, w, 0, &ldz, ZSupport.data() );\n    if( retval != 0 )\n        RuntimeError(\"pmrrr returned \",retval);\n\n    info.numLocalEigenvalues=nz;\n    info.firstLocalEigenvalue=offset;\n    info.numGlobalEigenvalues=n;\n    return info;\n}\n\n// Compute all of the eigenpairs\nInfo Eig\n( int n, double* d, double* e, double* w, double* Z, int ldz, mpi::Comm comm )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_tridiag_eig::Eig\"))\n    Info info;\n    char jobz='V';\n    char range='A';\n    double vl, vu;\n    int il, iu;\n    int highAccuracy=0; \n    int nz, offset;\n    std::vector<int> ZSupport(2*n);\n    int retval = pmrrr\n    ( &jobz, &range, &n, d, e, &vl, &vu, &il, &iu, &highAccuracy, comm.comm,\n      &nz, &offset, w, Z, &ldz, ZSupport.data() );\n    if( retval != 0 )\n        RuntimeError(\"pmrrr returned \",retval);\n\n    info.numLocalEigenvalues=nz;\n    info.firstLocalEigenvalue=offset;\n    info.numGlobalEigenvalues=n;\n    return info;\n}\n\n// Compute all of the eigenvalues in (lowerBound,upperBound]\nInfo Eig\n( int n, double* d, double* e, double* w, mpi::Comm comm, \n  double lowerBound, double upperBound )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_tridiag_eig::Eig\"))\n    Info info;\n    char jobz='N';\n    char range='V';\n    int il, iu;\n    int highAccuracy=0; \n    int nz, offset;\n    int ldz=1;\n    std::vector<int> ZSupport(2*n);\n    int retval = pmrrr\n    ( &jobz, &range, &n, d, e, &lowerBound, &upperBound, &il, &iu, \n      &highAccuracy, comm.comm, &nz, &offset, w, 0, &ldz, ZSupport.data() );\n    if( retval != 0 )\n        RuntimeError(\"pmrrr returned \",retval);\n\n    info.numLocalEigenvalues=nz;\n    info.firstLocalEigenvalue=offset;\n    mpi::AllReduce( &nz, &info.numGlobalEigenvalues, 1, mpi::SUM, comm );\n    return info;\n}\n\n// Compute all of the eigenpairs with eigenvalues in (lowerBound,upperBound]\nInfo Eig\n( int n, double* d, double* e, double* w, double* Z, int ldz, mpi::Comm comm, \n  double lowerBound, double upperBound )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_tridiag_eig::Eig\"))\n    Info info;\n    char jobz='V';\n    char range='V';\n    int il, iu;\n    int highAccuracy=0; \n    int nz, offset;\n    std::vector<int> ZSupport(2*n);\n    int retval = pmrrr\n    ( &jobz, &range, &n, d, e, &lowerBound, &upperBound, &il, &iu, \n      &highAccuracy, comm.comm, &nz, &offset, w, Z, &ldz, ZSupport.data() );\n    if( retval != 0 )\n        RuntimeError(\"pmrrr returned \",retval);\n\n    info.numLocalEigenvalues=nz;\n    info.firstLocalEigenvalue=offset;\n    mpi::AllReduce( &nz, &info.numGlobalEigenvalues, 1, mpi::SUM, comm );\n    return info;\n}\n\n// Compute all of the eigenvalues with indices in [lowerBound,upperBound]\nInfo Eig\n( int n, double* d, double* e, double* w, mpi::Comm comm, \n  int lowerBound, int upperBound )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_tridiag_eig::Eig\"))\n    Info info;\n    ++lowerBound;\n    ++upperBound;\n    char jobz='N';\n    char range='I';\n    double vl, vu;\n    int highAccuracy=0; \n    int nz, offset;\n    int ldz=1;\n    std::vector<int> ZSupport(2*n);\n    int retval = pmrrr\n    ( &jobz, &range, &n, d, e, &vl, &vu, &lowerBound, &upperBound, \n      &highAccuracy, comm.comm, &nz, &offset, w, 0, &ldz, ZSupport.data() );\n    if( retval != 0 )\n        RuntimeError(\"pmrrr returned \",retval);\n\n    info.numLocalEigenvalues=nz;\n    info.firstLocalEigenvalue=offset;\n    info.numGlobalEigenvalues=(upperBound-lowerBound)+1;\n    return info;\n}\n\n// Compute all of the eigenpairs with eigenvalues indices in \n// [lowerBound,upperBound]\nInfo Eig\n( int n, double* d, double* e, double* w, double* Z, int ldz, mpi::Comm comm, \n  int lowerBound, int upperBound )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"herm_tridiag_eig::Eig\"))\n    Info info;\n    ++lowerBound;\n    ++upperBound;\n    char jobz='V';\n    char range='I';\n    double vl, vu;\n    int highAccuracy=0; \n    int nz, offset;\n    std::vector<int> ZSupport(2*n);\n    int retval = pmrrr\n    ( &jobz, &range, &n, d, e, &vl, &vu, &lowerBound, &upperBound, \n      &highAccuracy, comm.comm, &nz, &offset, w, Z, &ldz, ZSupport.data() );\n    if( retval != 0 )\n        RuntimeError(\"pmrrr returned \",retval);\n\n    info.numLocalEigenvalues=nz;\n    info.firstLocalEigenvalue=offset;\n    info.numGlobalEigenvalues=(upperBound-lowerBound)+1;\n    return info;\n}\n\n} // namespace herm_tridiag_eig\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/imports/scalapack.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#ifdef ELEM_HAVE_SCALAPACK\n\nusing elem::scomplex;\nusing elem::dcomplex;\n\nextern \"C\" {\n\n// Basic Linear Algebra Communication Subprograms\n// ==============================================\nint Csys2blacs_handle( MPI_Comm comm );\nvoid Cblacs_gridinit\n( int* context, const char* order, int gridHeight, int gridWidth );\nvoid Cblacs_gridinfo\n( int  context, int* gridHeight, int* gridWidth, int* gridRow, int* gridCol );\nvoid Cfree_blacs_system_handle( int bhandle );\nvoid Cblacs_gridexit( int context );\nvoid Cblacs_exit( int notDone );\n\n// TRMM\n// ====\nvoid ELEM_SCALAPACK(pstrmm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n, const float* alpha, \n  const float* A, const int* iA, const int* jA, const int* descA,\n        float* B, const int* iB, const int* jB, const int* descB );\nvoid ELEM_SCALAPACK(pdtrmm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n, const double* alpha, \n  const double* A, const int* iA, const int* jA, const int* descA,\n        double* B, const int* iB, const int* jB, const int* descB );\nvoid ELEM_SCALAPACK(pctrmm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n, const scomplex* alpha, \n  const scomplex* A, const int* iA, const int* jA, const int* descA,\n        scomplex* B, const int* iB, const int* jB, const int* descB );\nvoid ELEM_SCALAPACK(pztrmm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n, const dcomplex* alpha, \n  const dcomplex* A, const int* iA, const int* jA, const int* descA,\n        dcomplex* B, const int* iB, const int* jB, const int* descB );\n\n// TRSM\n// ====\nvoid ELEM_SCALAPACK(pstrsm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n, const float* alpha, \n  const float* A, const int* iA, const int* jA, const int* descA,\n        float* B, const int* iB, const int* jB, const int* descB );\nvoid ELEM_SCALAPACK(pdtrsm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n, const double* alpha, \n  const double* A, const int* iA, const int* jA, const int* descA,\n        double* B, const int* iB, const int* jB, const int* descB );\nvoid ELEM_SCALAPACK(pctrsm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n, const scomplex* alpha, \n  const scomplex* A, const int* iA, const int* jA, const int* descA,\n        scomplex* B, const int* iB, const int* jB, const int* descB );\nvoid ELEM_SCALAPACK(pztrsm)\n( const char* side, const char* uplo, const char* trans, const char* diag,\n  const int* m, const int* n, const dcomplex* alpha, \n  const dcomplex* A, const int* iA, const int* jA, const int* descA,\n        dcomplex* B, const int* iB, const int* jB, const int* descB );\n\n// Cholesky factorization\n// ======================\nvoid ELEM_SCALAPACK(pspotrf)\n( const char* uplo, const int* n, float* A, const int* iA, const int* jA,\n  const int* descA, int* info );\nvoid ELEM_SCALAPACK(pdpotrf)\n( const char* uplo, const int* n, double* A, const int* iA, const int* jA,\n  const int* descA, int* info );\nvoid ELEM_SCALAPACK(pcpotrf)\n( const char* uplo, const int* n, scomplex* A, const int* iA, const int* jA,\n  const int* descA, int* info );\nvoid ELEM_SCALAPACK(pzpotrf)\n( const char* uplo, const int* n, dcomplex* A, const int* iA, const int* jA,\n  const int* descA, int* info );\n\n// Two-sided TRSM/TRMM\n// ===================\nvoid ELEM_SCALAPACK(pssyngst)\n( const int* typeB, const char* uplo, const int* n, \n        float* A, const int* iA, const int* jA, const int* descA,\n  const float* B, const int* iB, const int* jB, const int* descB,\n        float* scale, float* work, const int* workSize, int* info );\nvoid ELEM_SCALAPACK(pdsyngst)\n( const int* typeB, const char* uplo, const int* n, \n        double* A, const int* iA, const int* jA, const int* descA,\n  const double* B, const int* iB, const int* jB, const int* descB,\n        double* scale, double* work, const int* workSize, int* info );\nvoid ELEM_SCALAPACK(pchengst)\n( const int* typeB, const char* uplo, const int* n, \n        scomplex* A, const int* iA, const int* jA, const int* descA,\n  const scomplex* B, const int* iB, const int* jB, const int* descB,\n        float* scale, scomplex* work, const int* workSize, int* info );\nvoid ELEM_SCALAPACK(pzhengst)\n( const int* typeB, const char* uplo, const int* n, \n        dcomplex* A, const int* iA, const int* jA, const int* descA,\n  const dcomplex* B, const int* iB, const int* jB, const int* descB,\n        double* scale, dcomplex* work, const int* workSize, int* info );\n\n// Hessenberg QR algorithm\n// =======================\n\n// Aggressive Early Deflation\n// --------------------------\n// NOTE: ScaLAPACK currently only supports AED for real matrices\nvoid ELEM_SCALAPACK(pshseqr)\n( const char* job, const char* compz, \n  const int* n, const int* ilo, const int* ihi, \n  float* H, const int* descH, float* wr, float* wi, \n  float* Q, const int* descQ, float* work, const int* workSize, \n  int* iWork, const int* iWorkSize, int* info );\nvoid ELEM_SCALAPACK(pdhseqr)\n( const char* job, const char* compz, \n  const int* n, const int* ilo, const int* ihi, \n  double* H, const int* descH, double* wr, double* wi, \n  double* Q, const int* descQ, double* work, const int* workSize, \n  int* iWork, const int* iWorkSize, int* info );\n\n// Pipelined QR algorithm without AED\n// ----------------------------------\nvoid ELEM_SCALAPACK(pslahqr)\n( const ELEM_FORT_LOGICAL* wantt, const ELEM_FORT_LOGICAL* wantz, const int* n,\n  const int* ilo, const int* ihi, float* H, const int* descH,\n  float* wr, float* wi, const int* iloQ, const int* ihiQ, \n  float* Q, const int* descQ,\n  float* work, const int* workSize, int* iWork, const int* iWorkSize, \n  int* info );\nvoid ELEM_SCALAPACK(pdlahqr)\n( const ELEM_FORT_LOGICAL* wantt, const ELEM_FORT_LOGICAL* wantz, const int* n,\n  const int* ilo, const int* ihi, double* H, const int* descH,\n  double* wr, double* wi, const int* iloQ, const int* ihiQ, \n  double* Q, const int* descQ,\n  double* work, const int* workSize, int* iWork, const int* iWorkSize, \n  int* info );\nvoid ELEM_SCALAPACK(pclahqr)\n( const ELEM_FORT_LOGICAL* wantt, const ELEM_FORT_LOGICAL* wantz, const int* n,\n  const int* ilo, const int* ihi, scomplex* H, const int* descH,\n  scomplex* w, const int* iloQ, const int* ihiQ, scomplex* Q, const int* descQ,\n  scomplex* work, const int* workSize, int* iWork, const int* iWorkSize, \n  int* info );\nvoid ELEM_SCALAPACK(pzlahqr)\n( const ELEM_FORT_LOGICAL* wantt, const ELEM_FORT_LOGICAL* wantz, const int* n,\n  const int* ilo, const int* ihi, dcomplex* H, const int* descH,\n  dcomplex* w, const int* iloQ, const int* ihiQ, dcomplex* Q, const int* descQ,\n  dcomplex* work, const int* workSize, int* iWork, const int* iWorkSize, \n  int* info );\n\n// Pipelined QR algorithm with AED for big matrices\n// ------------------------------------------------\nvoid ELEM_SCALAPACK(pslaqr0)\n( const ELEM_FORT_LOGICAL* wantt, const ELEM_FORT_LOGICAL* wantz, const int* n,\n  const int* ilo, const int* ihi, float* H, const int* descH, \n  float* wr, float* wi, const int* iloQ, const int* ihiQ, \n  float* Q, const int* descQ, float* work, const int* workSize, \n  int* iWork, const int* iWorkSize, int* info, const int* reclevel );\nvoid ELEM_SCALAPACK(pdlaqr0)\n( const ELEM_FORT_LOGICAL* wantt, const ELEM_FORT_LOGICAL* wantz, const int* n,\n  const int* ilo, const int* ihi, double* H, const int* descH, \n  double* wr, double* wi, const int* iloQ, const int* ihiQ,\n  double* Q, const int* descQ, double* work, const int* workSize, \n  int* iWork, const int* iWorkSize, int* info, const int* reclevel );\n\n// Pipelined QR algorithm with AED for small matrices\n// --------------------------------------------------\nvoid ELEM_SCALAPACK(pslaqr1)\n( const ELEM_FORT_LOGICAL* wantt, const ELEM_FORT_LOGICAL* wantz, const int* n,\n  const int* ilo, const int* ihi, float* H, const int* descH, \n  float* wr, float* wi, const int* iloQ, const int* ihiQ, \n  float* Q, const int* descQ, float* work, const int* workSize, \n  int* iWork, const int* iWorkSize, int* info );\nvoid ELEM_SCALAPACK(pdlaqr1)\n( const ELEM_FORT_LOGICAL* wantt, const ELEM_FORT_LOGICAL* wantz, const int* n,\n  const int* ilo, const int* ihi, double* H, const int* descH, \n  double* wr, double* wi, const int* iloQ, const int* ihiQ, \n  double* Q, const int* descQ, double* work, const int* workSize, \n  int* iWork, const int* iWorkSize, int* info );\n\n} // extern \"C\"\n\nnamespace elem {\n\nnamespace blacs {\n\nint Handle( MPI_Comm comm )\n{ return Csys2blacs_handle( comm ); }\n\nint GridInit( int bhandle, bool colMajor, int gridHeight, int gridWidth )\n{ \n    int context = bhandle;\n    const char* order = ( colMajor ? \"Col\" : \"Row\" );\n    Cblacs_gridinit( &context, order, gridHeight, gridWidth ); \n    return context;\n}\n\nint GridHeight( int context )\n{\n    int gridHeight, gridWidth, gridRow, gridCol;\n    Cblacs_gridinfo( context, &gridHeight, &gridWidth, &gridRow, &gridCol );\n    return gridHeight;\n}\n\nint GridWidth( int context )\n{\n    int gridHeight, gridWidth, gridRow, gridCol;\n    Cblacs_gridinfo( context, &gridHeight, &gridWidth, &gridRow, &gridCol );\n    return gridWidth;\n}\n\nint GridRow( int context )\n{\n    int gridHeight, gridWidth, gridRow, gridCol;\n    Cblacs_gridinfo( context, &gridHeight, &gridWidth, &gridRow, &gridCol );\n    return gridRow;\n}\n\nint GridCol( int context )\n{\n    int gridHeight, gridWidth, gridRow, gridCol;\n    Cblacs_gridinfo( context, &gridHeight, &gridWidth, &gridRow, &gridCol );\n    return gridCol;\n}\n\nvoid FreeHandle( int bhandle )\n{ Cfree_blacs_system_handle( bhandle ); }\n\nvoid FreeGrid( int context )\n{ Cblacs_gridexit( context ); }\n\nvoid Exit( bool finished )\n{ \n    int notDone = ( finished ? 0 : 1 );\n    Cblacs_exit( notDone ); \n}\n\n} // namespace blacs\n\nnamespace scalapack {\n\n// TRMM\n// ====\n\nvoid Trmm\n( char side, char uplo, char trans, char diag, int m, int n, \n  float alpha, const float* A, const int* descA, \n                     float* B, const int* descB )\n{ \n    int iA=1, jA=1, iB=1, jB=1;\n    ELEM_SCALAPACK(pstrmm)\n    ( &side, &uplo, &trans, &diag, &m, &n, \n      &alpha, A, &iA, &jA, descA, B, &iB, &jB, descB );\n}\n\nvoid Trmm\n( char side, char uplo, char trans, char diag, int m, int n, \n  double alpha, const double* A, const int* descA, \n                      double* B, const int* descB )\n{ \n    int iA=1, jA=1, iB=1, jB=1;\n    ELEM_SCALAPACK(pdtrmm)\n    ( &side, &uplo, &trans, &diag, &m, &n, \n      &alpha, A, &iA, &jA, descA, B, &iB, &jB, descB );\n}\n\nvoid Trmm\n( char side, char uplo, char trans, char diag, int m, int n, \n  scomplex alpha, const scomplex* A, const int* descA, \n                        scomplex* B, const int* descB )\n{ \n    int iA=1, jA=1, iB=1, jB=1;\n    ELEM_SCALAPACK(pctrmm)\n    ( &side, &uplo, &trans, &diag, &m, &n, \n      &alpha, A, &iA, &jA, descA, B, &iB, &jB, descB );\n}\n\nvoid Trmm\n( char side, char uplo, char trans, char diag, int m, int n, \n  dcomplex alpha, const dcomplex* A, const int* descA, \n                        dcomplex* B, const int* descB )\n{ \n    int iA=1, jA=1, iB=1, jB=1;\n    ELEM_SCALAPACK(pztrmm)\n    ( &side, &uplo, &trans, &diag, &m, &n, \n      &alpha, A, &iA, &jA, descA, B, &iB, &jB, descB );\n}\n\n// TRSM\n// ====\n\nvoid Trsm\n( char side, char uplo, char trans, char diag, int m, int n, \n  float alpha, const float* A, const int* descA, \n                     float* B, const int* descB )\n{ \n    int iA=1, jA=1, iB=1, jB=1;\n    ELEM_SCALAPACK(pstrsm)\n    ( &side, &uplo, &trans, &diag, &m, &n, \n      &alpha, A, &iA, &jA, descA, B, &iB, &jB, descB );\n}\n\nvoid Trsm\n( char side, char uplo, char trans, char diag, int m, int n, \n  double alpha, const double* A, const int* descA, \n                      double* B, const int* descB )\n{ \n    int iA=1, jA=1, iB=1, jB=1;\n    ELEM_SCALAPACK(pdtrsm)\n    ( &side, &uplo, &trans, &diag, &m, &n, \n      &alpha, A, &iA, &jA, descA, B, &iB, &jB, descB );\n}\n\nvoid Trsm\n( char side, char uplo, char trans, char diag, int m, int n, \n  scomplex alpha, const scomplex* A, const int* descA, \n                        scomplex* B, const int* descB )\n{ \n    int iA=1, jA=1, iB=1, jB=1;\n    ELEM_SCALAPACK(pctrsm)\n    ( &side, &uplo, &trans, &diag, &m, &n, \n      &alpha, A, &iA, &jA, descA, B, &iB, &jB, descB );\n}\n\nvoid Trsm\n( char side, char uplo, char trans, char diag, int m, int n, \n  dcomplex alpha, const dcomplex* A, const int* descA, \n                        dcomplex* B, const int* descB )\n{ \n    int iA=1, jA=1, iB=1, jB=1;\n    ELEM_SCALAPACK(pztrsm)\n    ( &side, &uplo, &trans, &diag, &m, &n, \n      &alpha, A, &iA, &jA, descA, B, &iB, &jB, descB );\n}\n\n// Cholesky factorization\n// ======================\n\nvoid Cholesky( char uplo, int n, float* A, const int* descA )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::Cholesky\"))\n    int iA=1,jA=1,info;\n    ELEM_SCALAPACK(pspotrf)( &uplo, &n, A, &iA, &jA, descA, &info );\n    if( info != 0 )\n        RuntimeError(\"pspotrf returned with info=\",info);\n}\n\nvoid Cholesky( char uplo, int n, double* A, const int* descA )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::Cholesky\"))\n    int iA=1,jA=1,info;\n    ELEM_SCALAPACK(pdpotrf)( &uplo, &n, A, &iA, &jA, descA, &info );\n    if( info != 0 )\n        RuntimeError(\"pdpotrf returned with info=\",info);\n}\n\nvoid Cholesky( char uplo, int n, scomplex* A, const int* descA )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::Cholesky\"))\n    int iA=1,jA=1,info;\n    ELEM_SCALAPACK(pcpotrf)( &uplo, &n, A, &iA, &jA, descA, &info );\n    if( info != 0 )\n        RuntimeError(\"pcpotrf returned with info=\",info);\n}\n\nvoid Cholesky( char uplo, int n, dcomplex* A, const int* descA )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::Cholesky\"))\n    int iA=1,jA=1,info;\n    ELEM_SCALAPACK(pzpotrf)( &uplo, &n, A, &iA, &jA, descA, &info );\n    if( info != 0 )\n        RuntimeError(\"pzpotrf returned with info=\",info);\n}\n\n// Two-sided TRSM\n// ==============\n// NOTE: It is required that B have a positive diagonal\n\nvoid TwoSidedTrsm\n( char uplo, int n, float* A, const int* descA, \n  const float* B, const int* descB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::TwoSidedTrsm\"))\n    int typeB=1,iA=1,jA=1,iB=1,jB=1,workSize=-1,info;\n    float scale, dummyWork;\n    ELEM_SCALAPACK(pssyngst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      &dummyWork, &workSize, &info );\n\n    workSize = dummyWork;\n    std::vector<float> work( workSize );\n    ELEM_SCALAPACK(pssyngst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      work.data(), &workSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pssyngst exited with info=\",info);\n}\n\nvoid TwoSidedTrsm\n( char uplo, int n, double* A, const int* descA, \n  const double* B, const int* descB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::TwoSidedTrsm\"))\n    int typeB=1,iA=1,jA=1,iB=1,jB=1,workSize=-1,info;\n    double scale, dummyWork;\n    ELEM_SCALAPACK(pdsyngst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      &dummyWork, &workSize, &info );\n\n    workSize = dummyWork;\n    std::vector<double> work( workSize );\n    ELEM_SCALAPACK(pdsyngst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      work.data(), &workSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pdsyngst exited with info=\",info);\n}\n\nvoid TwoSidedTrsm\n( char uplo, int n, scomplex* A, const int* descA, \n  const scomplex* B, const int* descB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::TwoSidedTrsm\"))\n    int typeB=1,iA=1,jA=1,iB=1,jB=1,workSize=-1,info;\n    float scale;\n    scomplex dummyWork;\n    ELEM_SCALAPACK(pchengst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      &dummyWork, &workSize, &info );\n\n    workSize = dummyWork.real();\n    std::vector<scomplex> work( workSize );\n    ELEM_SCALAPACK(pchengst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      work.data(), &workSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pchengst exited with info=\",info);\n}\n\nvoid TwoSidedTrsm\n( char uplo, int n, dcomplex* A, const int* descA, \n  const dcomplex* B, const int* descB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::TwoSidedTrsm\"))\n    int typeB=1,iA=1,jA=1,iB=1,jB=1,workSize=-1,info;\n    double scale;\n    dcomplex dummyWork;\n    ELEM_SCALAPACK(pzhengst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      &dummyWork, &workSize, &info );\n\n    workSize = dummyWork.real();\n    std::vector<dcomplex> work( workSize );\n    ELEM_SCALAPACK(pzhengst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      work.data(), &workSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pzhengst exited with info=\",info);\n}\n\n// Two-sided TRMM\n// ==============\n// NOTE: It is required that B have a positive diagonal\n\nvoid TwoSidedTrmm\n( char uplo, int n, float* A, const int* descA, \n  const float* B, const int* descB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::TwoSidedTrmm\"))\n    int typeB=2,iA=1,jA=1,iB=1,jB=1,workSize=-1,info;\n    float scale, dummyWork;\n    ELEM_SCALAPACK(pssyngst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      &dummyWork, &workSize, &info );\n\n    workSize = dummyWork;\n    std::vector<float> work( workSize );\n    ELEM_SCALAPACK(pssyngst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      work.data(), &workSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pssyngst exited with info=\",info);\n}\n\nvoid TwoSidedTrmm\n( char uplo, int n, double* A, const int* descA, \n  const double* B, const int* descB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::TwoSidedTrmm\"))\n    int typeB=2,iA=1,jA=1,iB=1,jB=1,workSize=-1,info;\n    double scale, dummyWork;\n    ELEM_SCALAPACK(pdsyngst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      &dummyWork, &workSize, &info );\n\n    workSize = dummyWork;\n    std::vector<double> work( workSize );\n    ELEM_SCALAPACK(pdsyngst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      work.data(), &workSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pdsyngst exited with info=\",info);\n}\n\nvoid TwoSidedTrmm\n( char uplo, int n, scomplex* A, const int* descA, \n  const scomplex* B, const int* descB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::TwoSidedTrmm\"))\n    int typeB=2,iA=1,jA=1,iB=1,jB=1,workSize=-1,info;\n    float scale;\n    scomplex dummyWork;\n    ELEM_SCALAPACK(pchengst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      &dummyWork, &workSize, &info );\n\n    workSize = dummyWork.real();\n    std::vector<scomplex> work( workSize );\n    ELEM_SCALAPACK(pchengst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      work.data(), &workSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pchengst exited with info=\",info);\n}\n\nvoid TwoSidedTrmm\n( char uplo, int n, dcomplex* A, const int* descA, \n  const dcomplex* B, const int* descB )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::TwoSidedTrmm\"))\n    int typeB=2,iA=1,jA=1,iB=1,jB=1,workSize=-1,info;\n    double scale;\n    dcomplex dummyWork;\n    ELEM_SCALAPACK(pzhengst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      &dummyWork, &workSize, &info );\n\n    workSize = dummyWork.real();\n    std::vector<dcomplex> work( workSize );\n    ELEM_SCALAPACK(pzhengst)\n    ( &typeB, &uplo, &n, A, &iA, &jA, descA, B, &iB, &jB, descB, &scale, \n      work.data(), &workSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pzhengst exited with info=\",info);\n}\n\n// Hessenberg Schur decomposition via the QR algorithm\n// ===================================================\n\nvoid HessenbergSchur\n( int n, float* H, const int* descH, scomplex* w, bool fullTriangle, bool aed ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergSchur\"))\n    const int ilo=1, ihi=n;\n    std::vector<float> wr(n), wi(n);\n    int descQ[9] = \n        { 1, descH[1], 0, 0, descH[4], descH[5], descH[6], descH[7], 1 };\n    int info;\n    if( aed )\n    {\n        std::cerr << \n          \"WARNING: PSHSEQR seems to have a bug in its eigenvalue reordering\" \n          << std::endl;\n        const char job=(fullTriangle?'S':'E'), compz='N';\n\n        // Query the workspace sizes\n        int workSize=-1, dummyIWork, iWorkSize=-1;\n        float dummyWork;\n\n        ELEM_SCALAPACK(pshseqr)\n        ( &job, &compz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          0, descQ, &dummyWork, &workSize, &dummyIWork, &iWorkSize, &info );\n\n        // Compute the eigenvalues in parallel\n        workSize = dummyWork;\n        iWorkSize = dummyIWork;\n        std::vector<float> work(workSize);\n        std::vector<int> iWork(iWorkSize);\n        ELEM_SCALAPACK(pshseqr)\n        ( &job, &compz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          0, descQ, work.data(), &workSize, iWork.data(), &iWorkSize, &info );\n        if( info != 0 )\n            RuntimeError(\"pshseqr exited with info=\",info);\n    }\n    else\n    {\n        ELEM_FORT_LOGICAL wantt=(fullTriangle?ELEM_FORT_TRUE:ELEM_FORT_FALSE), \n                          wantz=ELEM_FORT_FALSE;\n\n        // PSLAHQR does not support a workspace query and instead assumes\n        // that the workspace is at least \n        //     3*N + max(2*max(ldH,ldQ)+2*localWidth,numRowBlocks)\n\n        const Int context  = descH[1];\n        const Int mb       = descH[4];\n        const Int nb       = descH[5];\n        const Int rowAlign = descH[7];\n        const Int ldH      = descH[8];\n        const Int ldQ      = descQ[8];\n\n        const Int rowCut = 0;\n        const Int rowRank = blacs::GridCol( context );\n        const Int rowStride = blacs::GridWidth( context );\n\n        const Int localWidth =\n            BlockedLength(n,rowRank,rowAlign,nb,rowCut,rowStride);\n        const Int numRowBlocks = n/mb + 1;\n        int workSize= 3*n + Max(2*Max(ldH,ldQ)+2*localWidth,numRowBlocks),\n            iWorkSize=0;\n        std::vector<float> work(workSize);\n        std::vector<int> iWork(iWorkSize);\n\n        // Compute the eigenvalues in parallel\n        ELEM_SCALAPACK(pslahqr)\n        ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          &ilo, &ihi, 0, descQ, work.data(), &workSize, \n          iWork.data(), &iWorkSize, &info );\n        if( info != 0 )\n            RuntimeError(\"pslahqr exited with info=\",info);\n    }\n    // Combine the real and imaginary components of the eigenvalues\n    for( int j=0; j<n; ++j )\n        w[j] = std::complex<float>(wr[j],wi[j]);\n}\n\nvoid HessenbergSchur\n( int n, double* H, const int* descH, dcomplex* w, bool fullTriangle, bool aed )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergSchur\"))\n    const int ilo=1, ihi=n;\n    std::vector<double> wr(n), wi(n);\n    int descQ[9] = \n        { 1, descH[1], 0, 0, descH[4], descH[5], descH[6], descH[7], 1 };\n    int info;\n    if( aed )\n    {\n        std::cerr << \n          \"WARNING: PDHSEQR seems to have a bug in its eigenvalue reordering\" \n          << std::endl;\n        const char job=(fullTriangle?'S':'E'), compz='N';\n\n        // Query the workspace sizes\n        int workSize=-1, dummyIWork, iWorkSize=-1;\n        double dummyWork;\n        ELEM_SCALAPACK(pdhseqr)\n        ( &job, &compz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          0, descQ, &dummyWork, &workSize, &dummyIWork, &iWorkSize, &info );\n\n        // Compute the eigenvalues in parallel\n        workSize = dummyWork;\n        iWorkSize = dummyIWork;\n        std::vector<double> work(workSize);\n        std::vector<int> iWork(iWorkSize);\n        ELEM_SCALAPACK(pdhseqr)\n        ( &job, &compz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          0, descQ, work.data(), &workSize, iWork.data(), &iWorkSize, &info );\n        if( info != 0 )\n            RuntimeError(\"pdhseqr exited with info=\",info);\n    }\n    else\n    {\n        ELEM_FORT_LOGICAL wantt=(fullTriangle?ELEM_FORT_TRUE:ELEM_FORT_FALSE), \n                          wantz=ELEM_FORT_FALSE;\n\n        // PDLAHQR does not support a workspace query and instead assumes\n        // that the workspace is at least \n        //     3*N + max(2*max(ldH,ldQ)+2*localWidth,numRowBlocks)\n\n        const Int context  = descH[1];\n        const Int mb       = descH[4];\n        const Int nb       = descH[5];\n        const Int rowAlign = descH[7];\n        const Int ldH      = descH[8];\n        const Int ldQ      = descQ[8];\n\n        const Int rowCut = 0;\n        const Int rowRank = blacs::GridCol( context );\n        const Int rowStride = blacs::GridWidth( context );\n\n        const Int localWidth = \n            BlockedLength(n,rowRank,rowAlign,nb,rowCut,rowStride);\n        const Int numRowBlocks = n/mb + 1;\n        int workSize= 3*n + Max(2*Max(ldH,ldQ)+2*localWidth,numRowBlocks),\n            iWorkSize=0;\n        std::vector<double> work(workSize);\n        std::vector<int> iWork(iWorkSize);\n\n        // Compute the eigenvalues in parallel\n        ELEM_SCALAPACK(pdlahqr)\n        ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          &ilo, &ihi, 0, descQ, work.data(), &workSize, \n          iWork.data(), &iWorkSize, &info );\n        if( info != 0 )\n            RuntimeError(\"pdlahqr exited with info=\",info);\n    }\n    // Combine the real and imaginary components of the eigenvalues\n    for( int j=0; j<n; ++j )\n        w[j] = std::complex<double>(wr[j],wi[j]);\n}\n\nvoid HessenbergSchur\n( int n, scomplex* H, const int* descH, scomplex* w, bool fullTriangle, \n  bool aed ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergSchur\"))\n    ELEM_FORT_LOGICAL wantt=(fullTriangle?ELEM_FORT_TRUE:ELEM_FORT_FALSE), \n                      wantz=ELEM_FORT_FALSE;\n    if( aed )\n        LogicError(\"AED is not supported for complex matrices\");\n    const int ilo=1, ihi=n;\n\n    // Query the workspace sizes\n    // NOTE: dummyIWork will currently be left unmodified (hence the\n    //       zero initialization)!\n    int workSize=-1, dummyIWork=0, iWorkSize=-1, info;\n    int descQ[9] = \n        { 1, descH[1], 0, 0, descH[4], descH[5], descH[6], descH[7], 1 };\n    scomplex dummyWork;\n    ELEM_SCALAPACK(pclahqr)\n    ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, w, &ilo, &ihi, 0, descQ,\n      &dummyWork, &workSize, &dummyIWork, &iWorkSize, &info );\n\n    // Compute the eigenvalues in parallel\n    workSize = dummyWork.real();\n    iWorkSize = dummyIWork;\n    std::vector<scomplex> work(workSize);\n    std::vector<int> iWork(iWorkSize);\n    ELEM_SCALAPACK(pclahqr)\n    ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, w, &ilo, &ihi, 0, descQ,\n      work.data(), &workSize, iWork.data(), &iWorkSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pclahqr exited with info=\",info);\n}\n\nvoid HessenbergSchur\n( int n, dcomplex* H, const int* descH, dcomplex* w, bool fullTriangle,\n  bool aed ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergSchur\"))\n    ELEM_FORT_LOGICAL wantt=(fullTriangle?ELEM_FORT_TRUE:ELEM_FORT_FALSE), \n                      wantz=ELEM_FORT_FALSE;\n    if( aed )\n        LogicError(\"AED is not supported for complex matrices\");\n    const int ilo=1, ihi=n;\n\n    // Query the workspace sizes\n    // NOTE: dummyIWork will currently be left unmodified (hence the\n    //       zero initialization)!\n    int workSize=-1, dummyIWork=0, iWorkSize=-1, info;\n    int descQ[9] = \n        { 1, descH[1], 0, 0, descH[4], descH[5], descH[6], descH[7], 1 };\n    dcomplex dummyWork;\n    ELEM_SCALAPACK(pzlahqr)\n    ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, w, &ilo, &ihi, 0, descQ,\n      &dummyWork, &workSize, &dummyIWork, &iWorkSize, &info );\n\n    // Compute the eigenvalues in parallel\n    workSize = dummyWork.real();\n    iWorkSize = dummyIWork;\n    std::vector<dcomplex> work(workSize);\n    std::vector<int> iWork(iWorkSize);\n    ELEM_SCALAPACK(pzlahqr)\n    ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, w, &ilo, &ihi, 0, descQ,\n      work.data(), &workSize, iWork.data(), &iWorkSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pzlahqr exited with info=\",info);\n}\n\nvoid HessenbergSchur\n( int n, float* H, const int* descH, scomplex* w, float* Q, const int* descQ, \n  bool fullTriangle, bool multiplyQ, bool aed ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergSchur\"))\n    const int ilo=1, ihi=n;\n    std::vector<float> wr(n), wi(n);\n    int info;\n    if( aed )\n    {\n        std::cerr << \n          \"WARNING: PSHSEQR seems to have a bug in its eigenvalue reordering\" \n          << std::endl;\n        const char job=(fullTriangle?'S':'E'), compz=(multiplyQ?'V':'I');\n\n        // Query the workspace sizes. Due to a bug in p{s,d}hseqr's workspace\n        // querying, which is located in p{s,d}laqr1, \n        //    https://github.com/poulson/scalapack/commits/master \n        // we must be a bit more careful.\n        int workSize=-1, dummyIWork=3, iWorkSize=-1;\n        float dummyWork;\n        ELEM_SCALAPACK(pshseqr)\n        ( &job, &compz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          Q, descQ, &dummyWork, &workSize, &dummyIWork, &iWorkSize, &info );\n\n        // Compute the eigenvalues in parallel\n        workSize = dummyWork;\n        iWorkSize = dummyIWork;\n        std::vector<float> work(workSize);\n        std::vector<int> iWork(iWorkSize);\n        ELEM_SCALAPACK(pshseqr)\n        ( &job, &compz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          Q, descQ, work.data(), &workSize, iWork.data(), &iWorkSize, &info );\n        if( info != 0 )\n            RuntimeError(\"pshseqr exited with info=\",info);\n    }\n    else\n    {\n        if( multiplyQ == false )\n            LogicError(\"Forcing the matrix to identity is not yet supported\");\n        ELEM_FORT_LOGICAL wantt=(fullTriangle?ELEM_FORT_TRUE:ELEM_FORT_FALSE), \n                          wantz=ELEM_FORT_TRUE;\n\n        // PSLAHQR does not support a workspace query and instead assumes\n        // that the workspace is at least \n        //     3*N + max(2*max(ldH,ldQ)+2*localWidth,numRowBlocks)\n\n        const Int context  = descH[1];\n        const Int mb       = descH[4];\n        const Int nb       = descH[5];\n        const Int rowAlign = descH[7];\n        const Int ldH      = descH[8];\n        const Int ldQ      = descQ[8];\n\n        const Int rowCut = 0;\n        const Int rowRank = blacs::GridCol( context );\n        const Int rowStride = blacs::GridWidth( context );\n\n        const Int localWidth =\n            BlockedLength(n,rowRank,rowAlign,nb,rowCut,rowStride);\n        const Int numRowBlocks = n/mb + 1;\n        int workSize= 3*n + Max(2*Max(ldH,ldQ)+2*localWidth,numRowBlocks),\n            iWorkSize=0;\n        std::vector<float> work(workSize);\n        std::vector<int> iWork(iWorkSize);\n\n        // Compute the eigenvalues in parallel\n        ELEM_SCALAPACK(pslahqr)\n        ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          &ilo, &ihi, Q, descQ, work.data(), &workSize, \n          iWork.data(), &iWorkSize, &info );\n        if( info != 0 )\n            RuntimeError(\"pslahqr exited with info=\",info);\n    }\n    // Combine the real and imaginary components of the eigenvalues\n    for( int j=0; j<n; ++j )\n        w[j] = std::complex<float>(wr[j],wi[j]);\n}\n\nvoid HessenbergSchur\n( int n, double* H, const int* descH, dcomplex* w, \n  double* Q, const int* descQ, bool fullTriangle, bool multiplyQ, bool aed ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergSchur\"))\n    const int ilo=1, ihi=n;\n    std::vector<double> wr(n), wi(n);\n    int info;\n    if( aed )\n    {\n        std::cerr << \n          \"WARNING: PDHSEQR seems to have a bug in its eigenvalue reordering\" \n          << std::endl;\n        const char job=(fullTriangle?'S':'E'), compz=(multiplyQ?'V':'I');\n\n        // Query the workspace sizes. Due to a bug in p{s,d}hseqr's workspace\n        // querying, which is located in p{s,d}laqr1, \n        //    https://github.com/poulson/scalapack/commits/master \n        // we must be a bit more careful.\n        int workSize=-1, dummyIWork=3, iWorkSize=-1;\n        double dummyWork;\n        ELEM_SCALAPACK(pdhseqr)\n        ( &job, &compz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          Q, descQ, &dummyWork, &workSize, &dummyIWork, &iWorkSize, &info );\n\n        // Compute the eigenvalues in parallel\n        workSize = dummyWork;\n        iWorkSize = dummyIWork;\n        std::vector<double> work(workSize);\n        std::vector<int> iWork(iWorkSize);\n        ELEM_SCALAPACK(pdhseqr)\n        ( &job, &compz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          Q, descQ, work.data(), &workSize, iWork.data(), &iWorkSize, &info );\n        if( info != 0 )\n            RuntimeError(\"pdhseqr exited with info=\",info);\n    }\n    else\n    {\n        if( multiplyQ == false )\n            LogicError(\"Forcing the matrix to identity is not yet supported\");\n        ELEM_FORT_LOGICAL wantt=(fullTriangle?ELEM_FORT_TRUE:ELEM_FORT_FALSE), \n                          wantz=ELEM_FORT_TRUE;\n\n        // PDLAHQR does not support a workspace query and instead assumes\n        // that the workspace is at least \n        //     3*N + max(2*max(ldH,ldQ)+2*localWidth,numRowBlocks)\n\n        const Int context  = descH[1];\n        const Int mb       = descH[4];\n        const Int nb       = descH[5];\n        const Int rowAlign = descH[7];\n        const Int ldH      = descH[8];\n        const Int ldQ      = descQ[8];\n\n        const Int rowCut = 0;\n        const Int rowRank = blacs::GridCol( context );\n        const Int rowStride = blacs::GridWidth( context );\n\n        const Int localWidth =\n            BlockedLength(n,rowRank,rowAlign,nb,rowCut,rowStride);\n        const Int numRowBlocks = n/mb + 1;\n        int workSize= 3*n + Max(2*Max(ldH,ldQ)+2*localWidth,numRowBlocks),\n            iWorkSize=0;\n        std::vector<double> work(workSize);\n        std::vector<int> iWork(iWorkSize);\n\n        // Compute the eigenvalues in parallel\n        ELEM_SCALAPACK(pdlahqr)\n        ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, wr.data(), wi.data(), \n          &ilo, &ihi, Q, descQ, work.data(), &workSize, \n          iWork.data(), &iWorkSize, &info );\n        if( info != 0 )\n            RuntimeError(\"pdlahqr exited with info=\",info);\n    }\n    // Combine the real and imaginary components of the eigenvalues\n    for( int j=0; j<n; ++j )\n        w[j] = std::complex<double>(wr[j],wi[j]);\n}\n\nvoid HessenbergSchur\n( int n, scomplex* H, const int* descH, scomplex* w, \n  scomplex* Q, const int* descQ, bool fullTriangle, bool multiplyQ, bool aed ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergSchur\"))\n    if( !multiplyQ )\n        LogicError(\"Forcing the matrix to identity is not yet supported\");\n    if( aed )\n        LogicError(\"AED is not supported for complex matrices\");\n    ELEM_FORT_LOGICAL wantt=(fullTriangle?ELEM_FORT_TRUE:ELEM_FORT_FALSE), \n                      wantz=ELEM_FORT_TRUE;\n    const int ilo=1, ihi=n;\n\n    // Query the workspace sizes\n    // NOTE: dummyIWork will currently be left unmodified (hence the\n    //       zero initialization)!\n    int workSize=-1, dummyIWork=0, iWorkSize=-1, info;\n    scomplex dummyWork;\n    ELEM_SCALAPACK(pclahqr)\n    ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, w, &ilo, &ihi, Q, descQ,\n      &dummyWork, &workSize, &dummyIWork, &iWorkSize, &info );\n\n    // Compute the eigenvalues in parallel\n    workSize = dummyWork.real();\n    iWorkSize = dummyIWork;\n    std::vector<scomplex> work(workSize);\n    std::vector<int> iWork(iWorkSize);\n    ELEM_SCALAPACK(pclahqr)\n    ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, w, &ilo, &ihi, Q, descQ,\n      work.data(), &workSize, iWork.data(), &iWorkSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pclahqr exited with info=\",info);\n}\n\nvoid HessenbergSchur\n( int n, dcomplex* H, const int* descH, dcomplex* w, \n  dcomplex* Q, const int* descQ, bool fullTriangle, bool multiplyQ, bool aed ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergSchur\"))\n    if( !multiplyQ )\n        LogicError(\"Forcing the matrix to identity is not yet supported\");\n    if( aed )\n        LogicError(\"AED is not supported for complex matrices\");\n    ELEM_FORT_LOGICAL wantt=(fullTriangle?ELEM_FORT_TRUE:ELEM_FORT_FALSE), \n                      wantz=ELEM_FORT_TRUE;\n    const int ilo=1, ihi=n;\n\n    // Query the workspace sizes\n    // NOTE: dummyIWork will currently be left unmodified (hence the\n    //       zero initialization)!\n    int workSize=-1, dummyIWork=0, iWorkSize=-1, info;\n    dcomplex dummyWork;\n    ELEM_SCALAPACK(pzlahqr)\n    ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, w, &ilo, &ihi, Q, descQ,\n      &dummyWork, &workSize, &dummyIWork, &iWorkSize, &info );\n\n    // Compute the eigenvalues in parallel\n    workSize = dummyWork.real();\n    iWorkSize = dummyIWork;\n    std::vector<dcomplex> work(workSize);\n    std::vector<int> iWork(iWorkSize);\n    ELEM_SCALAPACK(pzlahqr)\n    ( &wantt, &wantz, &n, &ilo, &ihi, H, descH, w, &ilo, &ihi, Q, descQ,\n      work.data(), &workSize, iWork.data(), &iWorkSize, &info );\n    if( info != 0 )\n        RuntimeError(\"pzlahqr exited with info=\",info);\n}\n\n// Hessenberg eigenvalues/pairs via the QR algorithm\n// =================================================\n\nvoid HessenbergEig( int n, float* H, const int* descH, scomplex* w ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergEig\"))\n    HessenbergSchur( n, H, descH, w, false );\n}\n\nvoid HessenbergEig( int n, double* H, const int* descH, dcomplex* w ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergEig\"))\n    HessenbergSchur( n, H, descH, w, false );\n}\n\nvoid HessenbergEig( int n, scomplex* H, const int* descH, scomplex* w ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergEig\"))\n    HessenbergSchur( n, H, descH, w, false );\n}\n\nvoid HessenbergEig( int n, dcomplex* H, const int* descH, dcomplex* w ) \n{\n    DEBUG_ONLY(CallStackEntry cse(\"scalapack::HessenbergEig\"))\n    HessenbergSchur( n, H, descH, w, false );\n}\n\n} // namespace scalapack\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_SCALAPACK\n"
  },
  {
    "path": "src/madness/external/elemental/src/core/mpi_register.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\nnamespace {\nelem::mpi::Datatype typeIntInt;\nelem::mpi::Datatype typeFloatInt;\nelem::mpi::Datatype typeDoubleInt;\n\nelem::mpi::Op maxLocIntOp;\nelem::mpi::Op maxLocFloatOp;\nelem::mpi::Op maxLocDoubleOp;\n\nelem::mpi::Op minLocIntOp;\nelem::mpi::Op minLocFloatOp;\nelem::mpi::Op minLocDoubleOp;\n\nelem::mpi::Datatype typeIntIntPair;\nelem::mpi::Datatype typeFloatIntPair;\nelem::mpi::Datatype typeDoubleIntPair;\n\nelem::mpi::Op maxLocPairIntOp;\nelem::mpi::Op maxLocPairFloatOp;\nelem::mpi::Op maxLocPairDoubleOp;\n\nelem::mpi::Op minLocPairIntOp;\nelem::mpi::Op minLocPairFloatOp;\nelem::mpi::Op minLocPairDoubleOp;\n} // anonymouse namespace   \n\nnamespace elem {\nnamespace mpi {\n\ntemplate<typename T>\nvoid\nMaxLocFunc( void* inVoid, void* outVoid, int* length, Datatype* datatype )\n{           \n    const ValueInt<T>* inData = static_cast<ValueInt<T>*>(inVoid);\n    ValueInt<T>* outData = static_cast<ValueInt<T>*>(outVoid);\n    for( int j=0; j<*length; ++j )\n    {\n        const T inVal = inData[j].value;\n        const T outVal = outData[j].value;\n        const Int inInd = inData[j].index;\n        const Int outInd = outData[j].index; \n        if( inVal > outVal || (inVal == outVal && inInd < outInd) )\n            outData[j] = inData[j];\n    }\n}\n\ntemplate<typename T>\nvoid\nMinLocFunc( void* inVoid, void* outVoid, int* length, Datatype* datatype )\n{           \n    const ValueInt<T>* inData = static_cast<ValueInt<T>*>(inVoid);\n    ValueInt<T>* outData = static_cast<ValueInt<T>*>(outVoid);\n    for( int j=0; j<*length; ++j )\n    {\n        const T inVal = inData[j].value;\n        const T outVal = outData[j].value;\n        const Int inInd = inData[j].index;\n        const Int outInd = outData[j].index; \n        if( inVal < outVal || (inVal == outVal && inInd < outInd) )\n            outData[j] = inData[j];\n    }\n}\n\ntemplate<typename T>\nvoid\nMaxLocPairFunc( void* inVoid, void* outVoid, int* length, Datatype* datatype )\n{           \n    const ValueIntPair<T>* inData = static_cast<ValueIntPair<T>*>(inVoid);\n    ValueIntPair<T>* outData = static_cast<ValueIntPair<T>*>(outVoid);\n    for( int j=0; j<*length; ++j )\n    {\n        const T inVal = inData[j].value;\n        const T outVal = outData[j].value;\n        const Int inInd0 = inData[j].indices[0];\n        const Int inInd1 = inData[j].indices[1];\n        const Int outInd0 = outData[j].indices[0];\n        const Int outInd1 = outData[j].indices[1];\n        const bool inIndLess = \n            ( inInd0 < outInd0 || (inInd0 == outInd0 && inInd1 < outInd1) );\n        if( inVal > outVal || (inVal == outVal && inIndLess) )\n            outData[j] = inData[j];\n    }\n}\n\ntemplate<typename T>\nvoid\nMinLocPairFunc( void* inVoid, void* outVoid, int* length, Datatype* datatype )\n{           \n    const ValueIntPair<T>* inData = static_cast<ValueIntPair<T>*>(inVoid);\n    ValueIntPair<T>* outData = static_cast<ValueIntPair<T>*>(outVoid);\n    for( int j=0; j<*length; ++j )\n    {\n        const T inVal = inData[j].value;\n        const T outVal = outData[j].value;\n        const Int inInd0 = inData[j].indices[0];\n        const Int inInd1 = inData[j].indices[1];\n        const Int outInd0 = outData[j].indices[0];\n        const Int outInd1 = outData[j].indices[1];\n        const bool inIndLess = \n            ( inInd0 < outInd0 || (inInd0 == outInd0 && inInd1 < outInd1) );\n        if( inVal < outVal || (inVal == outVal && inIndLess) )\n            outData[j] = inData[j];\n    }\n}\n\ntemplate<>\nDatatype& ValueIntType<Int>()        { return ::typeIntInt; }\ntemplate<>\nDatatype& ValueIntType<float>()      { return ::typeFloatInt; }\ntemplate<>\nDatatype& ValueIntType<double>()     { return ::typeDoubleInt; }\ntemplate<>\nDatatype& ValueIntPairType<Int>()    { return ::typeIntIntPair; }\ntemplate<>\nDatatype& ValueIntPairType<float>()  { return ::typeFloatIntPair; }\ntemplate<>\nDatatype& ValueIntPairType<double>() { return ::typeDoubleIntPair; }\n\ntemplate<typename T>\nvoid CreateValueIntType()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateValueIntType\"))\n    Datatype typeList[2];\n    typeList[0] = TypeMap<T>();\n    typeList[1] = TypeMap<Int>();\n    \n    int blockLengths[2];\n    blockLengths[0] = 1;\n    blockLengths[1] = 1; \n\n    ValueInt<T> v;\n    MPI_Aint startAddr, valueAddr, indexAddr;\n    MPI_Address( &v,       &startAddr );\n    MPI_Address( &v.value, &valueAddr );\n    MPI_Address( &v.index, &indexAddr );\n\n    MPI_Aint displs[2];\n    displs[0] = valueAddr - startAddr;\n    displs[1] = indexAddr - startAddr;\n\n    Datatype& type = ValueIntType<T>();\n    MPI_Type_create_struct( 2, blockLengths, displs, typeList, &type );\n    MPI_Type_commit( &type );\n}\ntemplate void CreateValueIntType<Int>();\ntemplate void CreateValueIntType<float>();\ntemplate void CreateValueIntType<double>();\n\ntemplate<typename T>\nvoid DestroyValueIntType()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyValueIntType\"))\n    Datatype& type = ValueIntType<T>();\n    MPI_Type_free( &type );\n}\ntemplate void DestroyValueIntType<Int>();\ntemplate void DestroyValueIntType<float>();\ntemplate void DestroyValueIntType<double>();\n\ntemplate<typename T>\nvoid CreateValueIntPairType()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateValueIntPairType\"))\n    Datatype typeList[2];\n    typeList[0] = TypeMap<T>();\n    typeList[1] = TypeMap<Int>();\n    \n    int blockLengths[2];\n    blockLengths[0] = 1;\n    blockLengths[1] = 2; \n\n    ValueIntPair<T> v;\n    MPI_Aint startAddr, valueAddr, indexAddr;\n    MPI_Address( &v,        &startAddr );\n    MPI_Address( &v.value,  &valueAddr );\n    MPI_Address( v.indices, &indexAddr );\n\n    MPI_Aint displs[2];\n    displs[0] = valueAddr - startAddr;\n    displs[1] = indexAddr - startAddr;\n\n    Datatype& type = ValueIntPairType<T>();\n    MPI_Type_create_struct( 2, blockLengths, displs, typeList, &type );\n    MPI_Type_commit( &type );\n}\ntemplate void CreateValueIntPairType<Int>();\ntemplate void CreateValueIntPairType<float>();\ntemplate void CreateValueIntPairType<double>();\n\ntemplate<typename T>\nvoid DestroyValueIntPairType()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyValueIntPairType\"))\n    Datatype& type = ValueIntPairType<T>();\n    MPI_Type_free( &type );\n}\ntemplate void DestroyValueIntPairType<Int>();\ntemplate void DestroyValueIntPairType<float>();\ntemplate void DestroyValueIntPairType<double>();\n\ntemplate<>\nvoid CreateMaxLocOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMaxLocOp<Int>\"))\n    Create( (UserFunction*)MaxLocFunc<Int>, true, ::maxLocIntOp );\n}\n\ntemplate<>\nvoid CreateMaxLocOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMaxLocOp<float>\"))\n    Create( (UserFunction*)MaxLocFunc<float>, true, ::maxLocFloatOp );\n}\n\ntemplate<>\nvoid CreateMaxLocOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMaxLocOp<double>\"))\n    Create( (UserFunction*)MaxLocFunc<double>, true, ::maxLocDoubleOp );\n}\n\ntemplate<>\nvoid CreateMinLocOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMinLocOp<Int>\"))\n    Create( (UserFunction*)MinLocFunc<Int>, true, ::minLocIntOp );\n}\n\ntemplate<>\nvoid CreateMinLocOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMinLocOp<float>\"))\n    Create( (UserFunction*)MinLocFunc<float>, true, ::minLocFloatOp );\n}\n\ntemplate<>\nvoid CreateMinLocOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMinLocOp<double>\"))\n    Create( (UserFunction*)MinLocFunc<double>, true, ::minLocDoubleOp );\n}\n\ntemplate<>\nvoid CreateMaxLocPairOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMaxLocPairOp<Int>\"))\n    Create( (UserFunction*)MaxLocPairFunc<Int>, true, ::maxLocPairIntOp );\n}\n\ntemplate<>\nvoid CreateMaxLocPairOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMaxLocPairOp<float>\"))\n    Create( (UserFunction*)MaxLocPairFunc<float>, true, ::maxLocPairFloatOp );\n}\n\ntemplate<>\nvoid CreateMaxLocPairOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMaxLocPairOp<double>\"))\n    Create( (UserFunction*)MaxLocPairFunc<double>, true, ::maxLocPairDoubleOp );\n}\n\ntemplate<>\nvoid CreateMinLocPairOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMinLocPairOp<Int>\"))\n    Create( (UserFunction*)MinLocPairFunc<Int>, true, ::minLocPairIntOp );\n}\n\ntemplate<>\nvoid CreateMinLocPairOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMinLocPairOp<float>\"))\n    Create( (UserFunction*)MinLocPairFunc<float>, true, ::minLocPairFloatOp );\n}\n\ntemplate<>\nvoid CreateMinLocPairOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"CreateMinLocPairOp<double>\"))\n    Create( (UserFunction*)MinLocPairFunc<double>, true, ::minLocPairDoubleOp );\n}\n\ntemplate<>\nvoid DestroyMaxLocOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMaxLocOp<Int>\"))\n    Free( ::maxLocIntOp );\n}\n\ntemplate<>\nvoid DestroyMaxLocOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMaxLocOp<float>\"))\n    Free( ::maxLocFloatOp );\n}\n\ntemplate<>\nvoid DestroyMaxLocOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMaxLocOp<double>\"))\n    Free( ::maxLocDoubleOp );\n}\n\ntemplate<>\nvoid DestroyMinLocOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMinLocOp<Int>\"))\n    Free( ::minLocIntOp );\n}\n\ntemplate<>\nvoid DestroyMinLocOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMinLocOp<float>\"))\n    Free( ::minLocFloatOp );\n}\n\ntemplate<>\nvoid DestroyMinLocOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMinLocOp<double>\"))\n    Free( ::minLocDoubleOp );\n}\n\ntemplate<>\nvoid DestroyMaxLocPairOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMaxLocPairOp<Int>\"))\n    Free( ::maxLocPairIntOp );\n}\n\ntemplate<>\nvoid DestroyMaxLocPairOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMaxLocPairOp<float>\"))\n    Free( ::maxLocPairFloatOp );\n}\n\ntemplate<>\nvoid DestroyMaxLocPairOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMaxLocPairOp<double>\"))\n    Free( ::maxLocPairDoubleOp );\n}\n\ntemplate<>\nvoid DestroyMinLocPairOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMinLocPairOp<Int>\"))\n    Free( ::minLocPairIntOp );\n}\n\ntemplate<>\nvoid DestroyMinLocPairOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMinLocPairOp<float>\"))\n    Free( ::minLocPairFloatOp );\n}\n\ntemplate<>\nvoid DestroyMinLocPairOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DestroyMinLocPairOp<double>\"))\n    Free( ::minLocPairDoubleOp );\n}\n\ntemplate<>\nOp MaxLocOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxLocOp<Int>\"))\n    return ::maxLocIntOp;\n}\n\ntemplate<>\nOp MaxLocOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxLocOp<float>\"))\n    return ::maxLocFloatOp;\n}\n\ntemplate<>\nOp MaxLocOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxLocOp<double>\"))\n    return ::maxLocDoubleOp;\n}\n\ntemplate<>\nOp MinLocOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MinLocOp<Int>\"))\n    return ::minLocIntOp;\n}\n\ntemplate<>\nOp MinLocOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MinLocOp<float>\"))\n    return ::minLocFloatOp;\n}\n\ntemplate<>\nOp MinLocOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MinLocOp<double>\"))\n    return ::minLocDoubleOp;\n}\n\ntemplate<>\nOp MaxLocPairOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxLocPairOp<Int>\"))\n    return ::maxLocPairIntOp;\n}\n\ntemplate<>\nOp MaxLocPairOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxLocPairOp<float>\"))\n    return ::maxLocPairFloatOp;\n}\n\ntemplate<>\nOp MaxLocPairOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MaxLocPairOp<double>\"))\n    return ::maxLocPairDoubleOp;\n}\n\ntemplate<>\nOp MinLocPairOp<Int>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MinLocPairOp<Int>\"))\n    return ::minLocPairIntOp;\n}\n\ntemplate<>\nOp MinLocPairOp<float>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MinLocPairOp<float>\"))\n    return ::minLocPairFloatOp;\n}\n\ntemplate<>\nOp MinLocPairOp<double>()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MinLocPairOp<double>\"))\n    return ::minLocPairDoubleOp;\n}\n\ntemplate void\nMaxLocFunc<Int>( void* in, void* out, int* length, Datatype* datatype );\ntemplate void\nMaxLocFunc<float>( void* in, void* out, int* length, Datatype* datatype );\ntemplate void\nMaxLocFunc<double>( void* in, void* out, int* length, Datatype* datatype );\n\ntemplate void\nMinLocFunc<Int>( void* in, void* out, int* length, Datatype* datatype );\ntemplate void\nMinLocFunc<float>( void* in, void* out, int* length, Datatype* datatype );\ntemplate void\nMinLocFunc<double>( void* in, void* out, int* length, Datatype* datatype );\n\ntemplate void\nMaxLocPairFunc<Int>( void* in, void* out, int* length, Datatype* datatype );\ntemplate void\nMaxLocPairFunc<float>( void* in, void* out, int* length, Datatype* datatype );\ntemplate void\nMaxLocPairFunc<double>( void* in, void* out, int* length, Datatype* datatype );\n\ntemplate void\nMinLocPairFunc<Int>( void* in, void* out, int* length, Datatype* datatype );\ntemplate void\nMinLocPairFunc<float>( void* in, void* out, int* length, Datatype* datatype );\ntemplate void\nMinLocPairFunc<double>( void* in, void* out, int* length, Datatype* datatype );\n\n} // namespace mpi\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/io/ColorMap.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#include \"elemental/io.hpp\"\n\nnamespace elem {\n\n#ifdef ELEM_HAVE_QT5\nQRgb SampleColorMap( double value, double minVal, double maxVal )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SampleColorMap\"))\n    const ColorMap colorMap = GetColorMap();\n    const int numChunks = NumDiscreteColors();\n\n    const double portion = (value-minVal) / (maxVal-minVal);\n    const double discretePortion = int(portion*numChunks)/(1.*numChunks);\n\n    int red, green, blue, alpha;\n    switch( colorMap )\n    {\n    case RED_BLACK_GREEN:\n        red = ( portion<=0.5 ? 255*(1.-2*portion) : 0 );\n        green = ( portion>=0.5 ? 255*(2*(portion-0.5)) : 0 );\n        blue = 0;\n        alpha = 255;\n        break;\n    case BLUE_RED:\n        red = 255*portion;\n        green = 0;\n        blue = 255*(1.-portion/2);\n        alpha = 255;\n        break;\n    case GRAYSCALE_DISCRETE:\n        red = 255*discretePortion;\n        green = 255*discretePortion;\n        blue = 255*discretePortion;\n        alpha = 255;\n        break;\n    case GRAYSCALE:\n    default:\n        red = 255*portion;\n        green = 255*portion;\n        blue = 255*portion;\n        alpha = 255;\n        break;\n    }\n\n    return qRgba( red, green, blue, alpha );\n}\n#endif // ifdef ELEM_HAVE_QT5\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/io/ComplexDisplayWindow.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#include \"elemental/io.hpp\"\n\n#ifdef ELEM_HAVE_QT5\n\n#include <QBoxLayout>\n#include <QCheckBox>\n\nnamespace elem {\n\nComplexDisplayWindow::ComplexDisplayWindow( QWidget* parent )\n: QWidget(parent)\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ComplexDisplayWindow::ComplexDisplayWindow\"))\n    matrix_ = 0;\n    QVBoxLayout* mainLayout = new QVBoxLayout();\n\n    QHBoxLayout* matrixLayout = new QHBoxLayout();\n    // Real data\n    realDisplay_ = new DisplayWidget<Complex<double>>();\n    realScroll_ = new QScrollArea();\n    realScroll_->setWidget( realDisplay_ );\n    matrixLayout->addWidget( realScroll_ );\n    // Imaginary data\n    imagDisplay_ = new DisplayWidget<Complex<double>>();\n    imagScroll_ = new QScrollArea();\n    imagScroll_->setWidget( imagDisplay_ );\n    matrixLayout->addWidget( imagScroll_ );\n    // Push both\n    mainLayout->addLayout( matrixLayout );\n\n    // Two buttons for saving real and imaginary images\n    QHBoxLayout* saveLayout = new QHBoxLayout();\n    QPushButton* realSaveButton = new QPushButton(\"Save real\");\n    QPushButton* imagSaveButton = new QPushButton(\"Save imag\");\n    saveLayout->addWidget( realSaveButton );\n    saveLayout->addWidget( imagSaveButton );\n    mainLayout->addLayout( saveLayout );\n\n    // Checkbox for switching to the global scale\n    QCheckBox* scaleBox = new QCheckBox(\"Global scale\");\n    mainLayout->addWidget( scaleBox );\n\n    setLayout( mainLayout );\n    connect( realSaveButton, SIGNAL(clicked()), this, SLOT(SaveReal()) );\n    connect( imagSaveButton, SIGNAL(clicked()), this, SLOT(SaveImag()) );\n    connect( scaleBox, SIGNAL(clicked(bool)), this, SLOT(SetScale(bool)) );\n    setAttribute( Qt::WA_DeleteOnClose );\n\n    // Elemental needs to know if a window was opened for cleanup purposes\n    OpenedWindow();\n}\n\nComplexDisplayWindow::~ComplexDisplayWindow()\n{ delete matrix_; } \n\nvoid \nComplexDisplayWindow::Display\n( const Matrix<Complex<double>>* matrix, QString title )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ComplexDisplayWindow::Display\"))\n    if( matrix_ != 0 )\n        delete matrix_; \n    matrix_ = matrix;\n\n    setWindowTitle( title );\n    realDisplay_->DisplayReal( matrix );\n    imagDisplay_->DisplayImag( matrix );\n}\n\nvoid \nComplexDisplayWindow::Display\n( const Matrix<Complex<double>>* matrix, \n  double minRealVal, double maxRealVal, \n  double minImagVal, double maxImagVal,\n  QString title )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ComplexDisplayWindow::Display\"))\n    if( matrix_ != 0 )\n        delete matrix_;\n    matrix_ = matrix;\n\n    setWindowTitle( title );\n    realDisplay_->DisplayReal( matrix, minRealVal, maxRealVal );\n    imagDisplay_->DisplayImag( matrix, minImagVal, maxImagVal );\n}\n\nvoid\nComplexDisplayWindow::SaveReal()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ComplexDisplayWindow::SaveReal\"))\n    realDisplay_->SavePng( windowTitle().toStdString()+\" (real)\" );\n}\n\nvoid\nComplexDisplayWindow::SaveImag()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ComplexDisplayWindow::SaveImag\"))\n    imagDisplay_->SavePng( windowTitle().toStdString()+\" (imag)\" );\n}\n\nvoid \nComplexDisplayWindow::SetScale( bool global )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"ComplexDisplayWindow::SetScale\"))\n    if( global )\n    {\n        const double minRealVal = MinRealWindowVal();\n        const double maxRealVal = MaxRealWindowVal();\n        const double minImagVal = MinImagWindowVal();\n        const double maxImagVal = MaxImagWindowVal();\n        realDisplay_->DisplayReal( matrix_, minRealVal, maxRealVal );\n        imagDisplay_->DisplayImag( matrix_, minImagVal, maxImagVal );\n    }\n    else\n    {\n        realDisplay_->DisplayReal( matrix_ );\n        imagDisplay_->DisplayImag( matrix_ );\n    }\n}\n\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_QT5\n"
  },
  {
    "path": "src/madness/external/elemental/src/io/DisplayWindow.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#include \"elemental/io.hpp\"\n\n#ifdef ELEM_HAVE_QT5\n\n#include <QBoxLayout>\n#include <QCheckBox>\n\nnamespace elem {\n\nDisplayWindow::DisplayWindow( QWidget* parent )\n: QWidget(parent)\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWindow::DisplayWindow\"))\n    matrix_ = 0;\n    QVBoxLayout* mainLayout = new QVBoxLayout();\n\n    QHBoxLayout* matrixLayout = new QHBoxLayout();\n    // Real data\n    display_ = new DisplayWidget<double>();\n    scroll_ = new QScrollArea();\n    scroll_->setWidget( display_ );\n    matrixLayout->addWidget( scroll_ );\n    // Push\n    mainLayout->addLayout( matrixLayout );\n\n    // Add a save button and a check box for the scale\n    QHBoxLayout* optionsLayout = new QHBoxLayout();\n    QPushButton* saveButton = new QPushButton(\"Save\");\n    QCheckBox* scaleBox = new QCheckBox(\"Global scale\");\n    optionsLayout->addWidget( saveButton );\n    optionsLayout->addWidget( scaleBox );\n    // Push\n    mainLayout->addLayout( optionsLayout ); \n\n    setLayout( mainLayout );\n    connect( saveButton, SIGNAL(clicked()), this, SLOT(Save()) );\n    connect( scaleBox, SIGNAL(clicked(bool)), this, SLOT(SetScale(bool)) );\n    setAttribute( Qt::WA_DeleteOnClose );\n\n    // Elemental needs to know if a window was opened for cleanup purposes\n    OpenedWindow();\n}\n\nDisplayWindow::~DisplayWindow()\n{ delete matrix_; }\n\nvoid\nDisplayWindow::Display( const Matrix<double>* matrix, QString title )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWindow::Display\"))\n    if( matrix_ != 0 )\n        delete matrix_;\n    matrix_ = matrix;\n\n    setWindowTitle( title );\n    display_->DisplayReal( matrix );\n}\n\nvoid\nDisplayWindow::Display\n( const Matrix<double>* matrix, double minVal, double maxVal, QString title )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWindow::Display\"))\n    if( matrix_ != 0 )\n        delete matrix_;\n    matrix_ = matrix;\n\n    setWindowTitle( title );\n    display_->DisplayReal( matrix, minVal, maxVal );\n}\n\nvoid\nDisplayWindow::Save()\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWindow::Save\"))\n    display_->SavePng( windowTitle().toStdString() );\n}\n\nvoid\nDisplayWindow::SetScale( bool global )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DisplayWindow::SetScale\"))\n    if( global )\n    {\n        const double minVal = MinRealWindowVal();\n        const double maxVal = MaxRealWindowVal();\n        display_->DisplayReal( matrix_, minVal, maxVal );\n    }\n    else\n    {\n        display_->DisplayReal( matrix_ );\n    }\n}\n\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_QT5\n"
  },
  {
    "path": "src/madness/external/elemental/src/io/README.md",
    "content": "### `src/io/`\n\nThis folder contains the source-level implementations of Elemental's \ninput/output functionality. Please see `include/elemental/io` for the \nheader-level implementations. In addition to this file, this folder contains:\n\n-  `ComplexDisplayWindow.cpp`: a Qt5-based graphical display of a complex matrix\n-  `DisplayWindow.cpp`: a Qt5-based graphical display of a real matrix\n-  `SpyWindow.cpp`: a Qt5-based graphical display of the nonzeros of a matrix\n"
  },
  {
    "path": "src/madness/external/elemental/src/io/SpyWindow.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n#include \"elemental/io.hpp\"\n\n#ifdef ELEM_HAVE_QT5\n\n#include <QBoxLayout>\n\nnamespace elem {\n\nSpyWindow::SpyWindow( QWidget* parent )\n: QWidget(parent)\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SpyWindow::SpyWindow\"))\n    matrix_ = 0;\n\n    // For the real matrix\n    QHBoxLayout* matrixLayout = new QHBoxLayout();\n    spy_ = new SpyWidget();\n    scroll_ = new QScrollArea();\n    scroll_->setWidget( spy_ );\n    matrixLayout->addWidget( scroll_ );\n    setLayout( matrixLayout );\n\n    setAttribute( Qt::WA_DeleteOnClose );\n\n    // Elemental needs to know if a window was opened for cleanup purposes\n    OpenedWindow();\n}\n\nSpyWindow::~SpyWindow()\n{ delete matrix_; }\n\nvoid\nSpyWindow::Spy( const Matrix<Int>* matrix, QString title )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"SpyWindow::Spy\"))\n    if( matrix_ != 0 )\n        delete matrix_;\n    matrix_ = matrix;\n\n    setWindowTitle( title );\n    spy_->Spy( matrix );\n}\n\n} // namespace elem\n\n#endif // ifdef ELEM_HAVE_QT5\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianEig.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#include ELEM_SCALE_INC\n#include ELEM_SCALETRAPEZOID_INC\n\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n#include ELEM_HERMITIANTRIDIAG_INC\n#include ELEM_HERMITIANTRIDIAGEIG_INC\n#include ELEM_HERMITIANEIG_INC\n#include ELEM_MAXNORM_INC\n\n// The targeted number of pieces to break the eigenvectors into during the\n// redistribution from the [* ,VR] distribution after PMRRR to the [MC,MR]\n// distribution needed for backtransformation.\n#define TARGET_CHUNKS 20\n\nnamespace elem {\nnamespace herm_eig {\n\n// We create specialized redistribution routines for redistributing the \n// real eigenvectors of the symmetric tridiagonal matrix at the core of our \n// eigensolver in order to minimize the temporary memory usage.\ntemplate<typename F>\nvoid InPlaceRedist\n( DistMatrix<F>& paddedZ, Int rowAlign, const Base<F>* readBuffer )\n{\n    typedef Base<F> Real;\n    const Grid& g = paddedZ.Grid();\n    const Int height = paddedZ.Height();\n    const Int width = paddedZ.Width();\n\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int p = r * c;\n    const Int row = g.Row();\n    const Int col = g.Col();\n    const Int rowShift = paddedZ.RowShift();\n    const Int colAlign = paddedZ.ColAlign();\n    const Int localWidth = Length(width,g.VRRank(),rowAlign,p);\n\n    const Int maxHeight = MaxLength(height,r);\n    const Int maxWidth = MaxLength(width,p);\n    const Int portionSize = mpi::Pad( maxHeight*maxWidth );\n    \n    // Allocate our send/recv buffers\n    std::vector<Real> buffer(2*r*portionSize);\n    Real* sendBuffer = &buffer[0];\n    Real* recvBuffer = &buffer[r*portionSize];\n\n    // Pack\n    ELEM_OUTER_PARALLEL_FOR\n    for( Int k=0; k<r; ++k )\n    {\n        Real* data = &sendBuffer[k*portionSize];\n\n        const Int thisColShift = Shift(k,colAlign,r);\n        const Int thisLocalHeight = Length(height,thisColShift,r);\n\n        ELEM_INNER_PARALLEL_FOR_COLLAPSE2\n        for( Int j=0; j<localWidth; ++j )\n            for( Int i=0; i<thisLocalHeight; ++i )\n                data[i+j*thisLocalHeight] = \n                    readBuffer[thisColShift+i*r+j*height];\n    }\n\n    // Communicate\n    mpi::AllToAll\n    ( sendBuffer, portionSize,\n      recvBuffer, portionSize, g.ColComm() );\n\n    // Unpack\n    const Int localHeight = Length(height,row,colAlign,r);\n    ELEM_OUTER_PARALLEL_FOR\n    for( Int k=0; k<r; ++k )\n    {\n        const Real* data = &recvBuffer[k*portionSize];\n\n        const Int thisRank = col+k*c;\n        const Int thisRowShift = Shift(thisRank,rowAlign,p);\n        const Int thisRowOffset = (thisRowShift-rowShift) / c;\n        const Int thisLocalWidth = Length(width,thisRowShift,p);\n\n        ELEM_INNER_PARALLEL_FOR\n        for( Int j=0; j<thisLocalWidth; ++j )\n        {\n            const Real* dataCol = &(data[j*localHeight]);\n            Real* thisCol = (Real*)paddedZ.Buffer(0,thisRowOffset+j*r);\n            if( IsComplex<F>::val )\n            {\n                for( Int i=0; i<localHeight; ++i )\n                {\n                    thisCol[2*i] = dataCol[i];\n                    thisCol[2*i+1] = 0;\n                }\n            }\n            else\n            {\n                MemCopy( thisCol, dataCol, localHeight );\n            }\n        }\n    }\n}\n\ntemplate<typename F>\nbool CheckScale( UpperOrLower uplo, DistMatrix<F>& A, Base<F>& scale )\n{\n    typedef Base<F> Real;\n\n    scale = 1;\n    const Real maxNormOfA = HermitianMaxNorm( uplo, A );\n    const Real underflowThreshold = lapack::MachineUnderflowThreshold<Real>();\n    const Real overflowThreshold = lapack::MachineOverflowThreshold<Real>();\n    if( maxNormOfA > 0 && maxNormOfA < underflowThreshold )\n    {\n        scale = underflowThreshold / maxNormOfA;\n        return true;\n    }\n    else if( maxNormOfA > overflowThreshold )\n    {\n        scale = overflowThreshold / maxNormOfA;\n        return true;\n    }\n    else\n        return false;\n}\n\n} // namespace herm_eig\n\n// Compute the full set of eigenvalues\n// ===================================\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    if( ctrl.useSdc )\n    {\n        herm_eig::SDC( uplo, A, w, ctrl.sdcCtrl );\n    } \n    else\n    {\n        const Int n = A.Height();\n        const char uploChar = UpperOrLowerToChar( uplo );\n        w.Resize( n, 1 );\n        lapack::HermitianEig( uploChar, n, A.Buffer(), A.LDim(), w.Buffer() );\n    }\n    Sort( w, sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, \n  DistMatrix<F,STAR,STAR>& A, DistMatrix<Base<F>,STAR,STAR>& w, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    if( ctrl.useSdc )\n    {\n        herm_eig::SDC( uplo, A.Matrix(), w.Matrix(), ctrl.sdcCtrl );\n    }\n    else\n    {\n        const Int n = A.Height();\n        const char uploChar = UpperOrLowerToChar( uplo );\n        w.Resize( n, 1 );\n        lapack::HermitianEig( uploChar, n, A.Buffer(), A.LDim(), w.Buffer() );\n    }\n    Sort( w, sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F>& A,\n  DistMatrix<Base<F>,VR,STAR>& w, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square\");\n\n    // Check if we need to rescale the matrix, and do so if necessary\n    Base<F> scale;\n    const bool needRescaling = herm_eig::CheckScale( uplo, A, scale );\n    if( needRescaling )\n        ScaleTrapezoid( F(scale), uplo, A );\n\n    if( ctrl.useSdc )\n    {\n        herm_eig::SDC( uplo, A, w, ctrl.sdcCtrl );\n    }\n    else\n    {\n        // Tridiagonalize A\n        HermitianTridiag( uplo, A, ctrl.tridiagCtrl );\n\n        // Solve the symmetric tridiagonal EVP\n        const Int subdiagonal = ( uplo==LOWER ? -1 : +1 );\n        auto d = A.GetRealPartOfDiagonal();\n        auto e = A.GetRealPartOfDiagonal( subdiagonal );\n        HermitianTridiagEig( d, e, w, UNSORTED );\n    }\n    Sort( w, sort );\n\n    // Rescale the eigenvalues if necessary\n    if( needRescaling )\n        Scale( 1/scale, w );\n}\n\ntemplate<>\nvoid HermitianEig<float>\n( UpperOrLower uplo, DistMatrix<float>& A,\n  DistMatrix<float,VR,STAR>& w, SortType sort,\n  const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\ntemplate<>\nvoid HermitianEig<Complex<float>>\n( UpperOrLower uplo, DistMatrix<Complex<float>>& A,\n  DistMatrix<float,VR,STAR>& w, SortType sort,\n  const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\n// Compute the full set of eigenpairs\n// ==================================\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, Matrix<F>& A, \n  Matrix<Base<F>>& w, Matrix<F>& Z, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    if( ctrl.useSdc )\n    {\n        herm_eig::SDC( uplo, A, w, Z, ctrl.sdcCtrl );\n    }\n    else\n    {\n        const Int n = A.Height();\n        const char uploChar = UpperOrLowerToChar( uplo );\n        w.Resize( n, 1 );\n        Z.Resize( n, n );\n        lapack::HermitianEig\n        ( uploChar, n, A.Buffer(), A.LDim(), w.Buffer(), Z.Buffer(), Z.LDim() );\n    }\n    herm_eig::Sort( w, Z, sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w, DistMatrix<F,STAR,STAR>& Z, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    if( ctrl.useSdc )\n    {\n        herm_eig::SDC( uplo, A.Matrix(), w.Matrix(), Z.Matrix(), ctrl.sdcCtrl );\n    }\n    else\n    {\n        const Int n = A.Height();\n        const char uploChar = UpperOrLowerToChar( uplo );\n        w.Resize( n, 1 );\n        Z.Resize( n, n );\n        lapack::HermitianEig\n        ( uploChar, n, A.Buffer(), A.LDim(), w.Buffer(), Z.Buffer(), Z.LDim() );\n    }\n    herm_eig::Sort( w.Matrix(), Z.Matrix(), sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F>& A,\n  DistMatrix<Base<F>,VR,STAR>& w, DistMatrix<F>& paddedZ, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    typedef Base<F> Real;\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square\");\n\n    // Check if we need to rescale the matrix, and do so if necessary\n    Real scale;\n    const bool needRescaling = herm_eig::CheckScale( uplo, A, scale );\n    if( needRescaling )\n        ScaleTrapezoid( F(scale), uplo, A );\n\n    if( ctrl.useSdc )\n    {\n        herm_eig::SDC( uplo, A, w, paddedZ, ctrl.sdcCtrl );\n    }\n    else\n    {\n        // Tridiagonalize A\n        const Grid& g = A.Grid();\n        DistMatrix<F,STAR,STAR> t(g);\n        HermitianTridiag( uplo, A, t, ctrl.tridiagCtrl );\n\n        // Solve the symmetric tridiagonal EVP. The main subtlety is that we are\n        // using a padded [MC,MR] distributed matrix's local buffer to hold the\n        // local buffer for a [* ,VR].\n        const Int n = A.Height();\n        const Int k = n; // full set of eigenpairs\n        const Int N = MaxLength(n,g.Height())*g.Height();\n        const Int K = MaxLength(k,g.Size())*g.Size(); \n        paddedZ.Align( 0, 0 );\n        paddedZ.Resize( N, K );\n        DistMatrix<Real,STAR,VR> Z_STAR_VR(g);\n        {\n            // Grab a slice of size Z_STAR_VR_BufferSize from the very end\n            // of paddedZBuffer so that we can later redistribute in place\n            Real* paddedZBuf = (Real*)paddedZ.Buffer();\n            const Int paddedZBufSize =\n                ( IsComplex<F>::val ? 2*paddedZ.LDim()*paddedZ.LocalWidth()\n                                    :   paddedZ.LDim()*paddedZ.LocalWidth() );\n            const Int Z_STAR_VR_LocalWidth = Length(k,g.VRRank(),g.Size());\n            const Int Z_STAR_VR_BufSize = n*Z_STAR_VR_LocalWidth;\n            Real* Z_STAR_VR_Buf = &paddedZBuf[paddedZBufSize-Z_STAR_VR_BufSize];\n            Z_STAR_VR.Attach( n, k, g, 0, 0, Z_STAR_VR_Buf, n );\n        }\n        const Int subdiagonal = ( uplo==LOWER ? -1 : +1 );\n        auto d = A.GetRealPartOfDiagonal();\n        auto e = A.GetRealPartOfDiagonal( subdiagonal );\n        HermitianTridiagEig( d, e, w, Z_STAR_VR, UNSORTED );\n        {\n            // Redistribute Z piece-by-piece in place. This is to keep the \n            // send/recv buffer memory usage low.\n            const Int p = g.Size();\n            const Int numEqualPanels = K/p;\n            const Int numPanelsPerComm = (numEqualPanels / TARGET_CHUNKS) + 1;\n            const Int nbProp = numPanelsPerComm*p;\n\n            // Manually maintain information about the implicit Z[* ,VR] stored \n            // at the end of the paddedZ[MC,MR] buffers.\n            Int alignment = 0;\n            const Real* readBuffer = Z_STAR_VR.LockedBuffer();\n            for( Int j=0; j<k; j+=nbProp )\n            {\n                const Int nb = Min(nbProp,k-j);\n                auto paddedZ1 = View( paddedZ, 0, j, n, nb );\n\n                // Redistribute Z1[MC,MR] <- Z1[* ,VR] in place.\n                herm_eig::InPlaceRedist( paddedZ1, alignment, readBuffer );\n            \n                // Update the Z1[* ,VR] information\n                const Int localWidth = nb/p;\n                readBuffer = &readBuffer[localWidth*n];\n                alignment = (alignment+nb) % p;\n            }\n        }\n        paddedZ.Resize( n, k ); // We can simply shrink matrices\n\n        // Backtransform the tridiagonal eigenvectors, Z\n        herm_tridiag::ApplyQ( LEFT, uplo, NORMAL, A, t, paddedZ );\n    }\n\n    // Rescale the eigenvalues if necessary\n    if( needRescaling )\n        Scale( 1/scale, w );\n\n    herm_eig::Sort( w, paddedZ, sort );\n}\n\ntemplate<>\nvoid HermitianEig<float>\n( UpperOrLower uplo, DistMatrix<float>& A,\n  DistMatrix<float,VR,STAR>& w, DistMatrix<float>& paddedZ, SortType sort,\n  const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\ntemplate<>\nvoid HermitianEig<Complex<float>>\n( UpperOrLower uplo, DistMatrix<Complex<float>>& A,\n  DistMatrix<float,VR,STAR>& w, DistMatrix<Complex<float>>& paddedZ,\n  SortType sort, const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\n// Compute the eigenvalues within an inclusive index range\n// =======================================================\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, Matrix<F>& A, \n  Matrix<Base<F>>& w, Int il, Int iu, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    const Int n = A.Height();\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const Int numEigs = ( n==0 ? 0 : iu-il+1 );\n    w.Resize( numEigs, 1 );\n    lapack::HermitianEig\n    ( uploChar, n, A.Buffer(), A.LDim(), w.Buffer(), il, iu );\n    Sort( w, sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w, Int il, Int iu, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    const Int n = A.Height();\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const Int numEigs = ( n==0 ? 0 : iu-il+1 );\n    w.Resize( numEigs, 1 );\n    lapack::HermitianEig\n    ( uploChar, n, A.Buffer(), A.LDim(), w.Buffer(), il, iu );\n    Sort( w, sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F>& A,\n  DistMatrix<Base<F>,VR,STAR>& w, Int il, Int iu, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square\");\n\n    // Check if we need to rescale the matrix, and do so if necessary\n    Base<F> scale;\n    const bool needRescaling = herm_eig::CheckScale( uplo, A, scale );\n    if( needRescaling )\n        ScaleTrapezoid( F(scale), uplo, A );\n\n    // Tridiagonalize A\n    HermitianTridiag( uplo, A, ctrl.tridiagCtrl );\n\n    // Solve the symmetric tridiagonal EVP\n    const Int subdiagonal = ( uplo==LOWER ? -1 : +1 );\n    auto d = A.GetRealPartOfDiagonal();\n    auto e = A.GetRealPartOfDiagonal( subdiagonal );\n    HermitianTridiagEig( d, e, w, il, iu, sort );\n\n    // Rescale the eigenvalues if necessary\n    if( needRescaling )\n        Scale( 1/scale, w );\n}\n\ntemplate<>\nvoid HermitianEig<float>\n( UpperOrLower uplo, DistMatrix<float >& A,\n  DistMatrix<float,VR,STAR>& w, Int il, Int iu, SortType sort,\n  const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\ntemplate<>\nvoid HermitianEig<Complex<float>>\n( UpperOrLower uplo, DistMatrix<Complex<float>>& A,\n  DistMatrix<float,VR,STAR>& w, Int il, Int iu, SortType sort,\n  const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\n// Compute the eigenpairs within an inclusive index range\n// ======================================================\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, Matrix<F>& A, \n  Matrix<Base<F>>& w, Matrix<F>& Z, Int il, Int iu, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    const Int n = A.Height();\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const Int numEigs = ( n==0 ? 0 : iu-il+1 );\n    w.Resize( numEigs, 1 );\n    Z.Resize( n, numEigs );\n    lapack::HermitianEig\n    ( uploChar, n, A.Buffer(), A.LDim(), w.Buffer(), Z.Buffer(), Z.LDim(),\n      il, iu );\n    herm_eig::Sort( w, Z, sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w, DistMatrix<F,STAR,STAR>& Z, \n  Int il, Int iu, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    const Int n = A.Height();\n    const char uploChar = UpperOrLowerToChar( uplo );\n    const Int numEigs = ( n==0 ? 0 : iu-il+1 );\n    w.Resize( numEigs, 1 );\n    Z.Resize( n, numEigs );\n    lapack::HermitianEig\n    ( uploChar, n, A.Buffer(), A.LDim(), w.Buffer(), Z.Buffer(), Z.LDim(),\n      il, iu ); \n    herm_eig::Sort( w.Matrix(), Z.Matrix(), sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F>& A,\n  DistMatrix<Base<F>,VR,STAR>& w, DistMatrix<F>& paddedZ, \n  Int il, Int iu, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    typedef Base<F> Real;\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square\");\n\n    // Check if we need to rescale the matrix, and do so if necessary\n    Real scale;\n    const bool needRescaling = herm_eig::CheckScale( uplo, A, scale );\n    if( needRescaling )\n        ScaleTrapezoid( F(scale), uplo, A );\n\n    // Tridiagonalize A\n    const Grid& g = A.Grid();\n    DistMatrix<F,STAR,STAR> t(g);\n    HermitianTridiag( uplo, A, t, ctrl.tridiagCtrl );\n  \n    // Solve the tridiagonal eigenvalue problem with PMRRR into Z[* ,VR]\n    // then redistribute into Z[MC,MR] in place, panel by panel.\n    // We will use the same buffer for Z in the vector distribution used by \n    // PMRRR as for the matrix distribution used by Elemental. In order to \n    // do so, we must pad Z's dimensions slightly.\n    const Int n = A.Height();\n    const Int k = (iu-il) + 1;\n    const Int N = MaxLength(n,g.Height())*g.Height();\n    const Int K = MaxLength(k,g.Size())*g.Size(); \n    paddedZ.Align( 0, 0 );\n    paddedZ.Resize( N, K );\n    DistMatrix<Real,STAR,VR> Z_STAR_VR(g);\n    {\n        // Grab a slice of size Z_STAR_VR_BufferSize from the very end\n        // of paddedZBuffer so that we can later redistribute in place\n        Real* paddedZBuf = (Real*)paddedZ.Buffer();\n        const Int paddedZBufSize =\n            ( IsComplex<F>::val ? 2*paddedZ.LDim()*paddedZ.LocalWidth()\n                                :   paddedZ.LDim()*paddedZ.LocalWidth() );\n        const Int Z_STAR_VR_LocalWidth = Length(k,g.VRRank(),g.Size());\n        const Int Z_STAR_VR_BufSize = n*Z_STAR_VR_LocalWidth;\n        Real* Z_STAR_VR_Buf = &paddedZBuf[paddedZBufSize-Z_STAR_VR_BufSize];\n        Z_STAR_VR.Attach( n, k, g, 0, 0, Z_STAR_VR_Buf, n );\n    }\n    const Int subdiagonal = ( uplo==LOWER ? -1 : +1 );\n    auto d = A.GetRealPartOfDiagonal();\n    auto e = A.GetRealPartOfDiagonal( subdiagonal );\n    HermitianTridiagEig( d, e, w, Z_STAR_VR, il, iu, UNSORTED );\n    {\n        // Redistribute Z piece-by-piece in place. This is to keep the \n        // send/recv buffer memory usage low.\n        const Int p = g.Size();\n        const Int numEqualPanels = K/p;\n        const Int numPanelsPerComm = (numEqualPanels / TARGET_CHUNKS) + 1;\n        const Int nbProp = numPanelsPerComm*p;\n\n        // Manually maintain information about the implicit Z[* ,VR] stored \n        // at the end of the paddedZ[MC,MR] buffers.\n        Int alignment = 0;\n        const Real* readBuffer = Z_STAR_VR.LockedBuffer();\n        for( Int j=0; j<k; j+=nbProp )\n        {\n            const Int nb = Min(nbProp,k-j);\n            auto paddedZ1 = View( paddedZ, 0, j, n, nb );\n\n            // Redistribute Z1[MC,MR] <- Z1[* ,VR] in place.\n            herm_eig::InPlaceRedist( paddedZ1, alignment, readBuffer );\n\n            // Update the Z1[* ,VR] information\n            const Int localWidth = nb/p;\n            readBuffer = &readBuffer[localWidth*n];\n            alignment = (alignment+nb) % p;\n        }\n    }\n    paddedZ.Resize( n, k ); // We can simply shrink matrices\n\n    // Backtransform the tridiagonal eigenvectors, Z\n    herm_tridiag::ApplyQ( LEFT, uplo, NORMAL, A, t, paddedZ );\n\n    // Rescale the eigenvalues if necessary\n    if( needRescaling )\n        Scale( 1/scale, w );\n\n    herm_eig::Sort( w, paddedZ, sort );\n}\n\ntemplate<>\nvoid HermitianEig<float>\n( UpperOrLower uplo, DistMatrix<float>& A,\n  DistMatrix<float,VR,STAR>& w, DistMatrix<float>& paddedZ,\n  Int il, Int iu, SortType sort,\n  const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\ntemplate<>\nvoid HermitianEig<Complex<float>>\n( UpperOrLower uplo, DistMatrix<Complex<float>>& A,\n  DistMatrix<float,VR,STAR>& w, DistMatrix<Complex<float>>& paddedZ,\n  Int il, Int iu, SortType sort,\n  const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\n// Compute the eigenvalues within a half-open, (a,b], interval\n// ===========================================================\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, Matrix<F>& A, \n  Matrix<Base<F>>& w, Base<F> vl, Base<F> vu, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    if( vl >= vu )\n    {\n        w.Resize(0,1);\n        return; \n    }\n\n    const Int n = A.Height();\n    const char uploChar = UpperOrLowerToChar( uplo );\n    w.Resize( n, 1 );\n    const Int numEigs = lapack::HermitianEig\n    ( uploChar, n, A.Buffer(), A.LDim(), w.Buffer(), vl, vu );\n    w.Resize( numEigs, 1 );\n    Sort( w, sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w, Base<F> vl, Base<F> vu, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    if( vl >= vu )\n    {\n        w.Resize(0,1);\n        return; \n    }\n\n    const Int n = A.Height();\n    const char uploChar = UpperOrLowerToChar( uplo );\n    w.Resize( n, 1 );\n    const Int numEigs = lapack::HermitianEig\n    ( uploChar, n, A.Buffer(), A.LDim(), w.Buffer(), vl, vu );\n    w.Resize( numEigs, 1 );\n    Sort( w, sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F>& A,\n  DistMatrix<Base<F>,VR,STAR>& w, Base<F> vl, Base<F> vu,\n  SortType sort, const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    if( vl >= vu )\n    {\n        w.Resize(0,1);\n        return; \n    }\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square\");\n\n    // Check if we need to rescale the matrix, and do so if necessary\n    Base<F> scale;\n    const bool needRescaling = herm_eig::CheckScale( uplo, A, scale );\n    if( needRescaling )\n        ScaleTrapezoid( F(scale), uplo, A );\n\n    // Tridiagonalize A\n    HermitianTridiag( uplo, A, ctrl.tridiagCtrl );\n\n    // Solve the symmetric tridiagonal EVP\n    const Int subdiagonal = ( uplo==LOWER ? -1 : +1 );\n    auto d = A.GetRealPartOfDiagonal();\n    auto e = A.GetRealPartOfDiagonal( subdiagonal );\n    HermitianTridiagEig( d, e, w, vl, vu, sort );\n\n    // Rescale the eigenvalues if necessary\n    if( needRescaling ) \n        Scale( 1/scale, w );\n}\n\ntemplate<>\nvoid HermitianEig<float>\n( UpperOrLower uplo, DistMatrix<float>& A,\n  DistMatrix<float,VR,STAR>& w, float vl, float vu,\n  SortType sort, const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\ntemplate<>\nvoid HermitianEig<Complex<float>>\n( UpperOrLower uplo, DistMatrix<Complex<float>>& A,\n  DistMatrix<float,VR,STAR>& w, float vl, float vu,\n  SortType sort, const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\n// Compute the eigenpairs with eigenvalues in a half-open, (a,b], interval\n// =======================================================================\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, Matrix<F>& Z, \n  Base<F> vl, Base<F> vu, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    const Int n = A.Height();\n    if( vl >= vu )\n    {\n        w.Resize(0,1);\n        Z.Resize(n,0);\n        return; \n    }\n\n    const char uploChar = UpperOrLowerToChar( uplo );\n    w.Resize( n, 1 );\n    Z.Resize( n, n );\n    const Int numEigs = lapack::HermitianEig\n    ( uploChar, n, A.Buffer(), A.LDim(), w.Buffer(), Z.Buffer(), Z.LDim(),\n      vl, vu );\n    w.Resize( numEigs, 1 );\n    Z.Resize( n, numEigs );\n    herm_eig::Sort( w, Z, sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, \n  DistMatrix<F,STAR,STAR>& A, \n  DistMatrix<Base<F>,STAR,STAR>& w, \n  DistMatrix<F,STAR,STAR>& Z, \n  Base<F> vl, Base<F> vu, SortType sort,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    const Int n = A.Height();\n    if( vl >= vu )\n    {\n        w.Resize(0,1);\n        Z.Resize(n,0);\n        return; \n    }\n\n    const char uploChar = UpperOrLowerToChar( uplo );\n    w.Resize( n, 1 );\n    Z.Resize( n, n );\n    const Int numEigs = lapack::HermitianEig\n    ( uploChar, n, A.Buffer(), A.LDim(), w.Buffer(), Z.Buffer(), Z.LDim(),\n      vl, vu );\n    w.Resize( numEigs, 1 );\n    Z.Resize( n, numEigs );\n    herm_eig::Sort( w.Matrix(), Z.Matrix(), sort );\n}\n\ntemplate<typename F>\nvoid HermitianEig\n( UpperOrLower uplo, DistMatrix<F>& A,\n  DistMatrix<Base<F>,VR,STAR>& w, DistMatrix<F>& paddedZ,\n  Base<F> vl, Base<F> vu, SortType sort, const HermitianEigCtrl<Base<F>> ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianEig\"))\n    typedef Base<F> Real;\n    const Int n = A.Height();\n    if( vl >= vu )\n    {\n        w.Resize(0,1);\n        paddedZ.Resize(n,0);\n        return; \n    }\n    if( A.Height() != A.Width() )\n        LogicError(\"Hermitian matrices must be square\");\n\n    // Check if we need to rescale the matrix, and do so if necessary\n    Real scale;\n    const bool needRescaling = herm_eig::CheckScale( uplo, A, scale );\n    if( needRescaling )\n        ScaleTrapezoid( F(scale), uplo, A );\n\n    // Tridiagonalize A\n    const Grid& g = A.Grid();\n    DistMatrix<F,STAR,STAR> t(g);\n    HermitianTridiag( uplo, A, t, ctrl.tridiagCtrl );\n\n    // Get an upper-bound on the number of local eigenvalues in the range\n    const Int subdiagonal = ( uplo==LOWER ? -1 : +1 );\n    auto d = A.GetRealPartOfDiagonal();\n    auto e = A.GetRealPartOfDiagonal( subdiagonal );\n    DistMatrix<Real,STAR,STAR> d_STAR_STAR( d );\n    DistMatrix<Real,STAR,STAR> e_STAR_STAR( g );\n    e_STAR_STAR.Resize( n-1, 1, n );\n    e_STAR_STAR = e;\n    const Int kEst = HermitianTridiagEigEstimate( d, e, g.VRComm(), vl, vu );\n\n    // We will use the same buffer for Z in the vector distribution used by \n    // PMRRR as for the matrix distribution used by Elemental. In order to \n    // do so, we must pad Z's dimensions slightly.\n    const Int N = MaxLength(n,g.Height())*g.Height();\n    const Int K = MaxLength(kEst,g.Size())*g.Size(); \n    paddedZ.Align( 0, 0 );\n    paddedZ.Resize( N, K );\n    DistMatrix<Real,STAR,VR> Z_STAR_VR(g);\n    {\n        // Grab a slice of size Z_STAR_VR_BufferSize from the very end\n        // of paddedZBuffer so that we can later redistribute in place\n        Real* paddedZBuf = (Real*)paddedZ.Buffer();\n        const Int paddedZBufSize =\n            ( IsComplex<F>::val ? 2*paddedZ.LDim()*paddedZ.LocalWidth()\n                                :   paddedZ.LDim()*paddedZ.LocalWidth() );\n        const Int Z_STAR_VR_LocalWidth = Length(kEst,g.VRRank(),g.Size());\n        const Int Z_STAR_VR_BufSize = n*Z_STAR_VR_LocalWidth;\n        Real* Z_STAR_VR_Buf = &paddedZBuf[paddedZBufSize-Z_STAR_VR_BufSize];\n        Z_STAR_VR.Attach( n, kEst, g, 0, 0, Z_STAR_VR_Buf, n );\n    }\n    HermitianTridiagEigPostEstimate\n    ( d_STAR_STAR, e_STAR_STAR, w, Z_STAR_VR, vl, vu, UNSORTED );\n    const Int k = w.Height();\n    {\n        // Redistribute Z piece-by-piece in place. This is to keep the \n        // send/recv buffer memory usage low.\n        const Int p = g.Size();\n        const Int numEqualPanels = K/p;\n        const Int numPanelsPerComm = (numEqualPanels / TARGET_CHUNKS) + 1;\n        const Int nbProp = numPanelsPerComm*p;\n\n        // Manually maintain information about the implicit Z[* ,VR] stored \n        // at the end of the paddedZ[MC,MR] buffers.\n        Int alignment = 0;\n        const Real* readBuffer = Z_STAR_VR.LockedBuffer();\n        for( Int j=0; j<k; j+=nbProp )\n        {\n            const Int nb = Min(nbProp,k-j);\n            auto paddedZ1 = View( paddedZ, 0, j, n, nb );\n\n            // Redistribute Z1[MC,MR] <- Z1[* ,VR] in place.\n            herm_eig::InPlaceRedist( paddedZ1, alignment, readBuffer );\n\n            // Update the Z1[* ,VR] information\n            const Int localWidth = nb/p;\n            readBuffer = &readBuffer[localWidth*n];\n            alignment = (alignment+nb) % p;\n        }\n    }\n    paddedZ.Resize( n, k ); // We can simply shrink matrices\n\n    // Backtransform the tridiagonal eigenvectors, Z\n    herm_tridiag::ApplyQ( LEFT, uplo, NORMAL, A, t, paddedZ );\n\n    // Rescale the eigenvalues if necessary\n    if( needRescaling )\n        Scale( 1/scale, w );\n\n    herm_eig::Sort( w, paddedZ, sort );\n}\n\ntemplate<>\nvoid HermitianEig<float>\n( UpperOrLower uplo, DistMatrix<float>& A,\n  DistMatrix<float,VR,STAR>& w, DistMatrix<float>& paddedZ,\n  float vl, float vu, SortType sort,\n  const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\ntemplate<>\nvoid HermitianEig<Complex<float>>\n( UpperOrLower uplo, DistMatrix<Complex<float>>& A,\n  DistMatrix<float,VR,STAR>& w, DistMatrix<Complex<float>>& paddedZ,\n  float vl, float vu, SortType sort,\n  const HermitianEigCtrl<float> ctrl )\n{ LogicError(\"HermitianEig not yet implemented for float\"); }\n\n// Full set of eigenvalues\n#define FULL_EIGVAL(F) \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A,\\\n    DistMatrix<Base<F>,STAR,STAR>& w, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w,\\\n    SortType sort, const HermitianEigCtrl<Base<F>> sdcCtrl );\n// Full set of eigenpairs\n#define FULL_EIGPAIR(F) \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, Matrix<F>& Z,\\\n    SortType sort, const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A,\\\n    DistMatrix<Base<F>,STAR,STAR>& w, DistMatrix<F,STAR,STAR>& Z,\\\n    SortType sort, const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w,\\\n    DistMatrix<F>& Z, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl );\n// Integer range of eigenvalues\n#define INT_EIGVAL(F) \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, Int il, Int iu,\\\n    SortType sort, const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A,\\\n    DistMatrix<Base<F>,STAR,STAR>& w, Int il, Int iu, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w,\\\n    Int il, Int iu, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl );\n// Integer range of eigenpairs\n#define INT_EIGPAIR(F) \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, Matrix<F>& Z,\\\n    Int il, Int iu, SortType sort, const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A,\\\n    DistMatrix<Base<F>,STAR,STAR>& w, DistMatrix<F,STAR,STAR>& Z,\\\n    Int il, Int iu, SortType sort, const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w,\\\n    DistMatrix<F>& Z, Int il, Int iu, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl );\n// Floating-point range of eigenvalues\n#define FLOAT_EIGVAL(F) \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w,\\\n    Base<F> vl, Base<F> vu, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A,\\\n    DistMatrix<Base<F>,STAR,STAR>& w,\\\n    Base<F> vl, Base<F> vu, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w,\\\n    Base<F> vl, Base<F> vu, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl );\n// Floating-point range of eigenpairs\n#define FLOAT_EIGPAIR(F) \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, Matrix<F>& A, Matrix<Base<F>>& w, Matrix<F>& Z,\\\n    Base<F> vl, Base<F> vu, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F,STAR,STAR>& A,\\\n    DistMatrix<Base<F>,STAR,STAR>& w, DistMatrix<F,STAR,STAR>& Z,\\\n    Base<F> vl, Base<F> vu, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n  template void HermitianEig\\\n  ( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<Base<F>,VR,STAR>& w,\\\n    DistMatrix<F>& Z, Base<F> vl, Base<F> vu, SortType sort, \\\n    const HermitianEigCtrl<Base<F>> sdcCtrl ); \\\n// All options\n#define ALL_OPTS(F) \\\n  FULL_EIGVAL(F);\\\n  FULL_EIGPAIR(F);\\\n  INT_EIGVAL(F);\\\n  INT_EIGPAIR(F);\\\n  FLOAT_EIGVAL(F);\\\n  FLOAT_EIGPAIR(F);\n\n#ifndef ELEM_DISABLE_FLOAT\nALL_OPTS(float);\n#ifndef ELEM_DISABLE_COMPLEX\nALL_OPTS(Complex<float>);\n#endif // ifndef ELEM_DISABLE_COMPLEX\n#endif // ifndef ELEM_DISABLE_FLOAT\nALL_OPTS(double);\n#ifndef ELEM_DISABLE_COMPLEX\nALL_OPTS(Complex<double>);\n#endif // ifndef ELEM_DISABLE_COMPLEX\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianTridiag/L.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_HERMITIANTRIDIAG_L_HPP\n#define ELEM_HERMITIANTRIDIAG_L_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_DOT_INC\n#include ELEM_HEMV_INC\n#include ELEM_HER2_INC\n#include ELEM_SYMV_INC\n#include ELEM_SYR2_INC\n#include ELEM_REFLECTOR_INC\n\n#include \"./LPan.hpp\"\n\nnamespace elem {\nnamespace herm_tridiag {\n\n// TODO: Sequential blocked implementation\ntemplate<typename F>\nvoid L( Matrix<F>& A, Matrix<F>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"herm_tridiag::L\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n    if( n == 0 )\n    {\n        t.Resize( 0, 1 );\n        return;\n    }\n    t.Resize( n-1, 1 );\n\n    Matrix<F> w21;\n    for( Int k=0; k<n-1; ++k )\n    {\n        auto a21      = ViewRange( A, k+1, k,   n,   k+1 );\n        auto alpha21T = ViewRange( A, k+1, k,   k+2, k+1 );\n        auto a21B     = ViewRange( A, k+2, k,   n,   k+1 );\n        auto A22      = ViewRange( A, k+1, k+1, n,   n   );\n\n        const F tau = LeftReflector( alpha21T, a21B );\n        const Base<F> epsilon1 = alpha21T.GetRealPart(0,0);\n        t.Set(k,0,tau);\n        alpha21T.Set(0,0,F(1));\n\n        Zeros( w21, a21.Height(), 1 );\n        Hemv( LOWER, Conj(tau), A22, a21, F(0), w21 );\n        const F alpha = -Conj(tau)*Dot( w21, a21 )/F(2);\n        Axpy( alpha, a21, w21 );\n        Her2( LOWER, F(-1), a21, w21, A22 );\n        alpha21T.Set(0,0,epsilon1);\n    }\n}\n\ntemplate<typename F> \nvoid L( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"herm_tridiag::L\");\n        if( A.Grid() != t.Grid() )\n            LogicError(\"{A,t} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n    if( n == 0 )\n    {\n        t.Resize( 0, 1 );\n        return;\n    }\n    const Grid& g = A.Grid();\n    DistMatrix<F,MD,STAR> tDiag(g);\n    tDiag.SetRoot( A.DiagonalRoot(-1) );\n    tDiag.AlignCols( A.DiagonalAlign(-1) );\n    tDiag.Resize( n-1, 1 );\n\n    DistMatrix<F> WPan(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g), t1_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> APan_MC_STAR(g), WPan_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> APan_MR_STAR(g), WPan_MR_STAR(g);\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k); \n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A21 = ViewRange( A, k+nb, k,    n,    k+nb );\n        auto A22 = ViewRange( A, k+nb, k+nb, n,    n    );\n        auto ABR = ViewRange( A, k,    k,    n,    n    );\n        const Int nbt = Min(bsize,(n-1)-k);\n        auto t1 = View( tDiag, k, 0, nbt, 1 );\n\n        if( A22.Height() > 0 )\n        {\n            WPan.AlignWith( A11 );\n            WPan.Resize( n-k, nb );\n            APan_MC_STAR.AlignWith( A11 );\n            APan_MC_STAR.Resize( n-k, nb );\n            WPan_MC_STAR.AlignWith( A11 );\n            WPan_MC_STAR.Resize( n-k, nb );\n            APan_MR_STAR.AlignWith( A11 );\n            APan_MR_STAR.Resize( n-k, nb );\n            WPan_MR_STAR.AlignWith( A11 );\n            WPan_MR_STAR.Resize( n-k, nb );\n\n            LPan\n            ( ABR, WPan, t1,\n              APan_MC_STAR, APan_MR_STAR, \n              WPan_MC_STAR, WPan_MR_STAR );\n\n            auto A21_MC_STAR = LockedViewRange( APan_MC_STAR, nb, 0, n-k, nb );\n            auto A21_MR_STAR = LockedViewRange( APan_MR_STAR, nb, 0, n-k, nb );\n            auto W21_MC_STAR = LockedViewRange( WPan_MC_STAR, nb, 0, n-k, nb );\n            auto W21_MR_STAR = LockedViewRange( WPan_MR_STAR, nb, 0, n-k, nb );\n\n            LocalTrr2k\n            ( LOWER, ADJOINT, ADJOINT,\n              F(-1), A21_MC_STAR, W21_MR_STAR,\n                     W21_MC_STAR, A21_MR_STAR,\n              F(1),  A22 );\n        }\n        else\n        {\n            A11_STAR_STAR = A11;\n            t1_STAR_STAR.Resize( nbt, 1 );\n            HermitianTridiag\n            ( LOWER, A11_STAR_STAR.Matrix(), t1_STAR_STAR.Matrix() );\n            A11 = A11_STAR_STAR;\n            t1 = t1_STAR_STAR;\n        }\n    }\n    // Redistribute from matrix-diagonal form to fully replicated\n    t = tDiag;\n}\n\n} // namespace herm_tridiag\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAG_L_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianTridiag/LPan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_HERMITIANTRIDIAG_LPAN_HPP\n#define ELEM_HERMITIANTRIDIAG_LPAN_HPP\n\n#include ELEM_ZERO_INC\n#include ELEM_GEMV_INC\n#include ELEM_SYMV_INC\n#include ELEM_REFLECTOR_INC\n\nnamespace elem {\nnamespace herm_tridiag {\n\ntemplate<typename F>\nvoid LPan\n( DistMatrix<F>& A,\n  DistMatrix<F>& W,\n  DistMatrix<F,MD,STAR>& t,\n  DistMatrix<F,MC,STAR>& APan_MC_STAR, \n  DistMatrix<F,MR,STAR>& APan_MR_STAR,\n  DistMatrix<F,MC,STAR>& W_MC_STAR,\n  DistMatrix<F,MR,STAR>& W_MR_STAR )\n{\n    const Int n = A.Height();\n    const Int nW = W.Width();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"herm_tridiag::LPan\");\n        if( A.Grid() != W.Grid() || W.Grid() != t.Grid() )\n            LogicError(\"A, W, and t must be distributed over the same grid.\");\n        if( n != A.Width() )\n            LogicError(\"A must be square\");\n        if( n != W.Height() )\n            LogicError(\"A and W must be the same height\");\n        if( n <= nW )\n            LogicError(\"W must be a column panel\");\n        if( W.ColAlign() != A.ColAlign() || \n            W.RowAlign() != A.RowAlign() )\n            LogicError(\"W and A must be aligned\");\n        if( t.Height() != nW || t.Width() != 1 )\n            LogicError\n            (\"t must be a column vector of the same length as W's width\");\n        if( !A.DiagonalAlignedWith(t,-1) )\n            LogicError(\"t is not aligned with A's subdiagonal.\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int p = g.Size();\n\n    // Create a distributed matrix for storing the subdiagonal\n    DistMatrix<Real,MD,STAR> e(g);\n    e.SetRoot( A.DiagonalRoot(-1) );\n    e.AlignCols( A.DiagonalAlign(-1) );\n    e.Resize( nW, 1 );\n\n    std::vector<F> w21LastBuffer(n/r+1);\n    DistMatrix<F> w21Last(g);\n    DistMatrix<F,MC,STAR> a21_MC_STAR(g), a21B_MC_STAR(g),\n                          p21_MC_STAR(g), p21B_MC_STAR(g),\n                          a21Last_MC_STAR(g), w21Last_MC_STAR(g);\n    DistMatrix<F,MR,STAR> a21_MR_STAR(g), q21_MR_STAR(g),\n                          x01_MR_STAR(g), y01_MR_STAR(g),\n                          a21Last_MR_STAR(g), w21Last_MR_STAR(g);\n\n    F tau = 0;\n    F w21LastFirstEntry = 0;\n    for( Int k=0; k<nW; ++k )\n    {\n        if( k > 0 )\n        {\n            a21Last_MC_STAR = ViewRange( APan_MC_STAR, k, k-1, n, k );\n            a21Last_MR_STAR = ViewRange( APan_MR_STAR, k, k-1, n, k );\n            w21Last         = ViewRange( W,            k, k-1, n, k );\n        }\n\n        auto A00      = ViewRange( A, 0,   0,   k,   k   );\n        auto W00      = ViewRange( W, 0,   0,   k,   k   );\n        auto alpha11  = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a21      = ViewRange( A, k+1, k,   n,   k+1 );\n        auto alpha21T = ViewRange( A, k+1, k,   k+2, k+1 );\n        auto a21B     = ViewRange( A, k+2, k,   n,   k+1 );\n        auto A22      = ViewRange( A, k+1, k+1, n,   n   );\n        auto W22      = ViewRange( W, k+1, k+1, n,   nW  );\n        auto ACol     = ViewRange( A, k,   k,   n,   k+1 );\n        auto WCol     = ViewRange( W, k,   k,   n,   k+1 );\n        auto A20B     = ViewRange( A, nW,  0,   n,   k   );\n        auto W20B     = ViewRange( W, nW,  0,   n,   k   );\n        auto tau1     = View( t, k, 0, 1, 1 );\n        auto epsilon1 = View( e, k, 0, 1, 1 );\n           \n        a21_MC_STAR.AlignWith( A22 );\n        a21_MR_STAR.AlignWith( A22 );\n        p21_MC_STAR.AlignWith( A22 );\n        a21_MC_STAR.Resize( n-(k+1), 1 );\n        a21_MR_STAR.Resize( n-(k+1), 1 );\n        p21_MC_STAR.Resize( n-(k+1), 1 );\n\n        // View the portions of a21[MC,* ] and p21[MC,* ] below the current\n        // panel's square\n        auto a21B_MC_STAR = View( a21_MC_STAR, nW-(k+1), 0, n-nW, 1 );\n        auto p21B_MC_STAR = View( p21_MC_STAR, nW-(k+1), 0, n-nW, 1 );\n\n        const bool thisIsMyCol = ( g.Col() == alpha11.RowAlign() );\n        if( thisIsMyCol )\n        {\n            if( k > 0 )\n            {\n                // Finish updating the current column with two axpy's\n                const Int AColLocalHeight = ACol.LocalHeight();\n                F* AColBuffer = ACol.Buffer();\n                const F* a21Last_MC_STAR_Buffer = a21Last_MC_STAR.Buffer();\n                for( Int i=0; i<AColLocalHeight; ++i )\n                    AColBuffer[i] -=\n                        w21LastBuffer[i] + \n                        a21Last_MC_STAR_Buffer[i]*Conj(w21LastFirstEntry);\n            }\n            // Compute the Householder reflector\n            tau = reflector::Col( alpha21T, a21B );\n            if( g.Row() == alpha21T.ColAlign() )\n                tau1.SetLocal(0,0,tau);\n        }\n\n        // Store the subdiagonal value and turn a21 into a proper scaled \n        // reflector by explicitly placing the implicit one in its first entry.\n        alpha21T.GetRealPartOfDiagonal( epsilon1 );\n        alpha21T.Set( 0, 0, F(1) );\n\n        // If this is the first iteration, have each member of the owning \n        // process column broadcast tau and a21 within its process row. \n        // Otherwise, also add w21 into the broadcast.\n        if( k == 0 )\n        {\n            const Int a21LocalHeight = a21.LocalHeight();\n            std::vector<F> rowBroadcastBuffer(a21LocalHeight+1);\n            if( thisIsMyCol )\n            {\n                // Pack the broadcast buffer with a21 and tau\n                MemCopy\n                ( rowBroadcastBuffer.data(), a21.Buffer(), a21LocalHeight );\n                rowBroadcastBuffer[a21LocalHeight] = tau;\n            }\n            // Broadcast a21 and tau across the process row\n            mpi::Broadcast\n            ( rowBroadcastBuffer.data(), \n              a21LocalHeight+1, a21.RowAlign(), g.RowComm() );\n            // Store a21[MC,* ] into its DistMatrix class and also store a copy\n            // for the next iteration\n            MemCopy\n            ( a21_MC_STAR.Buffer(), rowBroadcastBuffer.data(), a21LocalHeight );\n            // Store a21[MC,* ] into APan[MC,* ]\n            const Int APan_MC_STAR_Offset = \n                APan_MC_STAR.LocalHeight()-a21LocalHeight;\n            MemCopy\n            ( APan_MC_STAR.Buffer(APan_MC_STAR_Offset,0), \n              rowBroadcastBuffer.data(),\n              APan_MC_STAR.LocalHeight()-APan_MC_STAR_Offset );\n            // Store tau\n            tau = rowBroadcastBuffer[a21LocalHeight];\n            \n            a21_MR_STAR = a21_MC_STAR;\n            // Store a21[MR,* ]\n            const Int APan_MR_STAR_Offset = \n                APan_MR_STAR.LocalHeight()-a21_MR_STAR.LocalHeight();\n            MemCopy\n            ( APan_MR_STAR.Buffer(APan_MR_STAR_Offset,A00.Width()),\n              a21_MR_STAR.Buffer(),\n              APan_MR_STAR.LocalHeight()-APan_MR_STAR_Offset );\n        }\n        else\n        {\n            const Int a21LocalHeight = a21.LocalHeight();\n            const Int w21LastLocalHeight = ACol.LocalHeight();\n            std::vector<F> \n                rowBroadcastBuffer(a21LocalHeight+w21LastLocalHeight+1);\n            if( thisIsMyCol ) \n            {\n                // Pack the broadcast buffer with a21, w21Last, and tau\n                MemCopy\n                ( rowBroadcastBuffer.data(), a21.Buffer(), a21LocalHeight );\n                MemCopy\n                ( &rowBroadcastBuffer[a21LocalHeight], \n                  w21LastBuffer.data(), w21LastLocalHeight );\n                rowBroadcastBuffer[a21LocalHeight+w21LastLocalHeight] = tau;\n            }\n            // Broadcast a21, w21Last, and tau across the process row\n            mpi::Broadcast\n            ( rowBroadcastBuffer.data(), \n              a21LocalHeight+w21LastLocalHeight+1, \n              a21.RowAlign(), g.RowComm() );\n            // Store a21[MC,* ] into its DistMatrix class \n            MemCopy\n            ( a21_MC_STAR.Buffer(), \n              rowBroadcastBuffer.data(), a21LocalHeight );\n            // Store a21[MC,* ] into APan[MC,* ]\n            const Int APan_MC_STAR_Offset = \n                APan_MC_STAR.LocalHeight()-a21LocalHeight;\n            MemCopy\n            ( APan_MC_STAR.Buffer(APan_MC_STAR_Offset,A00.Width()), \n              rowBroadcastBuffer.data(),\n              APan_MC_STAR.LocalHeight()-APan_MC_STAR_Offset );\n            // Store w21Last[MC,* ] into its DistMatrix class\n            w21Last_MC_STAR.AlignWith( alpha11 );\n            w21Last_MC_STAR.Resize( n-k, 1 );\n            MemCopy\n            ( w21Last_MC_STAR.Buffer(), \n              &rowBroadcastBuffer[a21LocalHeight], w21LastLocalHeight );\n            // Store the bottom part of w21Last[MC,* ] into WB[MC,* ] and, \n            // if necessary, w21.\n            const Int W_MC_STAR_Offset = \n                W_MC_STAR.LocalHeight()-w21LastLocalHeight;\n            MemCopy\n            ( W_MC_STAR.Buffer(W_MC_STAR_Offset,A00.Width()-1),\n              &rowBroadcastBuffer[a21LocalHeight],\n              W_MC_STAR.LocalHeight()-W_MC_STAR_Offset );\n            if( g.Col() == w21Last.RowAlign() )\n            {\n                MemCopy\n                ( w21Last.Buffer(),\n                  &rowBroadcastBuffer[a21LocalHeight], w21LastLocalHeight );\n            }\n            // Store tau\n            tau = rowBroadcastBuffer[a21LocalHeight+w21LastLocalHeight];\n\n            // Form a21[MR,* ] and w21Last[MR,* ] by combining the \n            // communications needed for taking a vector from \n            // [MC,* ] -> [MR,* ]: \n            //   local copy to [VC,* ], \n            //   Send/Recv to [VR,* ], \n            //   AllGather to [MR,* ]\n            // We can combine the two by treating a21 as [0; a21] so that its \n            // alignments are equivalent to w21Last.\n\n            // alpha11 is the top-left entry of the A22 from the last iteration,\n            // so its alignments are identical\n            const Int colAlignSource = alpha11.ColAlign();\n            const Int colAlignDest = alpha11.RowAlign();\n            const Int colShiftSource = alpha11.ColShift();\n            const Int colShiftDest = alpha11.RowShift();\n\n            const Int height = n-k;\n            const Int portionSize = mpi::Pad( 2*MaxLength(height,p) );\n\n            const Int colShiftVRDest = Shift(g.VRRank(),colAlignDest,p);\n            const Int colShiftVCSource = Shift(g.VCRank(),colAlignSource,p);\n            const Int sendRankRM = \n                (g.VRRank()+(p+colShiftVCSource-colShiftVRDest))%p;\n            const Int recvRankCM = \n                (g.VCRank()+(p+colShiftVRDest-colShiftVCSource))%p;\n            const Int recvRankRM = \n                (recvRankCM/r)+c*(recvRankCM%r);\n\n            std::vector<F> transposeBuffer( (r+1)*portionSize );\n            F* sendBuf = &transposeBuffer[0];\n            F* recvBuf = &transposeBuffer[r*portionSize];\n\n            // (w21Last[VC,* ] <- w21Last[MC,* ]) and\n            // ([0; a21][VC,* ] <- [0; a21][MC,* ])\n            {\n                // Pack the necessary portion of w21Last[MC,* ]\n                const Int w21Shift = Shift(g.VCRank(),colAlignSource,p);\n                const Int w21Offset = (w21Shift-colShiftSource)/r;\n                const Int w21VCLocalHeight = Length(height,w21Shift,p);\n                const F* w21Buffer = w21Last_MC_STAR.Buffer(w21Offset,0);\n                for( Int i=0; i<w21VCLocalHeight; ++i )\n                    sendBuf[i] = w21Buffer[i*c];\n                \n                // Pack the necessary portion of a21[MC,* ]\n                const Int a21Shift = (w21Shift+p-1) % p;\n                const Int a21Offset = (a21Shift-((colShiftSource+r-1)%r))/r;\n                const Int a21VCLocalHeight = Length(height-1,a21Shift,p);\n                const F* a21Buffer = a21_MC_STAR.Buffer(a21Offset,0);\n                for( Int i=0; i<a21VCLocalHeight; ++i )\n                    sendBuf[w21VCLocalHeight+i] = a21Buffer[i*c];\n            }\n\n            // [VR,* ] <- [VC,* ]\n            mpi::SendRecv\n            ( sendBuf, portionSize, sendRankRM, \n              recvBuf, portionSize, recvRankRM, g.VRComm() );\n\n            // [MR,* ] <- [VR,* ]\n            mpi::AllGather\n            ( recvBuf, portionSize,\n              sendBuf, portionSize, g.ColComm() );\n\n            // Unpack\n            w21Last_MR_STAR.AlignWith( alpha11 );\n            w21Last_MR_STAR.Resize( n-k, 1 );\n            for( Int row=0; row<r; ++row )\n            {\n                // Unpack into w21Last[MR,* ]\n                const F* w21Data = &sendBuf[row*portionSize];\n                const Int w21Shift = Shift(g.Col()+c*row,colAlignDest,p);\n                const Int w21Offset = (w21Shift-colShiftDest) / c;\n                const Int w21VCLocalHeight = Length(height,w21Shift,p);\n                F* w21Buffer = w21Last_MR_STAR.Buffer(w21Offset,0);\n                for( Int i=0; i<w21VCLocalHeight; ++i )\n                    w21Buffer[i*r] = w21Data[i];\n\n                // Unpack into a21[MR,* ]\n                const F* a21Data = &sendBuf[row*portionSize+w21VCLocalHeight];\n                const Int a21Shift = (w21Shift+p-1) % p;\n                const Int a21Offset = (a21Shift-((colShiftDest+c-1)%c))/c;\n                const Int a21VCLocalHeight = Length(height-1,a21Shift,p);\n                F* a21Buffer = a21_MR_STAR.Buffer(a21Offset,0);\n                for( Int i=0; i<a21VCLocalHeight; ++i )\n                    a21Buffer[i*r] = a21Data[i];\n            }\n            // Store w21Last[MR,* ]\n            const Int W_MR_STAR_Offset = \n                W_MR_STAR.LocalHeight()-w21Last_MR_STAR.LocalHeight();\n            MemCopy\n            ( W_MR_STAR.Buffer(W_MR_STAR_Offset,A00.Width()-1),\n              w21Last_MR_STAR.Buffer(),\n              W_MR_STAR.LocalHeight()-W_MR_STAR_Offset );\n            // Store a21[MR,* ]\n            const Int APan_MR_STAR_Offset = \n                APan_MR_STAR.LocalHeight()-a21_MR_STAR.LocalHeight();\n            MemCopy\n            ( APan_MR_STAR.Buffer(APan_MR_STAR_Offset,A00.Width()),\n              a21_MR_STAR.Buffer(),\n              APan_MR_STAR.LocalHeight()-APan_MR_STAR_Offset );\n\n            // Update the portion of A22 that is in our current panel with \n            // w21Last and a21Last using two gers. We do not need their top \n            // entries. We trash the upper triangle of our panel of A since we \n            // are only doing slightly more work and we can replace it\n            // afterwards.\n            auto a21Last_MC_STAR_Bottom = \n                ViewRange( a21Last_MC_STAR, 1, 0, n-k, 1 );\n            auto w21Last_MC_STAR_Bottom =  \n                ViewRange( w21Last_MC_STAR, 1, 0, n-k, 1 );\n            auto a21Last_MR_STAR_Bottom = \n                ViewRange( a21Last_MR_STAR, 1, 0, n-k, 1 );\n            auto w21Last_MR_STAR_Bottom =\n                ViewRange( w21Last_MR_STAR, 1, 0, n-k, 1 );\n            const F* a21_MC_STAR_Buffer = a21Last_MC_STAR_Bottom.Buffer();\n            const F* w21_MC_STAR_Buffer = w21Last_MC_STAR_Bottom.Buffer();\n            const F* a21_MR_STAR_Buffer = a21Last_MR_STAR_Bottom.Buffer();\n            const F* w21_MR_STAR_Buffer = w21Last_MR_STAR_Bottom.Buffer();\n            F* A22Buffer = A22.Buffer();\n            const Int localHeight = W22.LocalHeight();\n            const Int localWidth = W22.LocalWidth();\n            const Int lDim = A22.LDim();\n            for( Int jLocal=0; jLocal<localWidth; ++jLocal )\n                for( Int iLocal=0; iLocal<localHeight; ++iLocal )\n                    A22Buffer[iLocal+jLocal*lDim] -=\n                        w21_MC_STAR_Buffer[iLocal]*\n                        Conj(a21_MR_STAR_Buffer[jLocal]) +\n                        a21_MC_STAR_Buffer[iLocal]*\n                        Conj(w21_MR_STAR_Buffer[jLocal]);\n        }\n\n        // Form the local portions of (A22 a21) into p21[MC,* ] and q21[MR,* ]:\n        //   p21[MC,* ] := tril(A22)[MC,MR] a21[MR,* ]\n        //   q21[MR,* ] := tril(A22,-1)'[MR,MC] a21[MC,* ]\n        Zero( p21_MC_STAR );\n        q21_MR_STAR.AlignWith( A22 );\n        Zeros( q21_MR_STAR, a21.Height(), 1 );\n        internal::LocalSymvColAccumulateL\n        ( F(1), A22, a21_MC_STAR, a21_MR_STAR, p21_MC_STAR, q21_MR_STAR, true );\n\n        x01_MR_STAR.AlignWith( W20B );\n        y01_MR_STAR.AlignWith( W20B );\n        Zeros( x01_MR_STAR, W20B.Width(), 1 );\n        Zeros( y01_MR_STAR, W20B.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), W20B, a21B_MC_STAR, F(0), x01_MR_STAR );\n        LocalGemv( ADJOINT, F(1), A20B, a21B_MC_STAR, F(0), y01_MR_STAR );\n\n        // Combine the AllReduce column summations of x01[MR,* ], y01[MR,* ],\n        // and q21[MR,* ]\n        {\n            const Int x01LocalHeight = x01_MR_STAR.LocalHeight();\n            const Int q21LocalHeight = q21_MR_STAR.LocalHeight();\n            std::vector<F> colSumSendBuffer(2*x01LocalHeight+q21LocalHeight),\n                           colSumRecvBuffer(2*x01LocalHeight+q21LocalHeight);\n            MemCopy\n            ( colSumSendBuffer.data(), x01_MR_STAR.Buffer(), x01LocalHeight );\n            MemCopy\n            ( &colSumSendBuffer[x01LocalHeight],\n              y01_MR_STAR.Buffer(), x01LocalHeight );\n            MemCopy\n            ( &colSumSendBuffer[2*x01LocalHeight],\n              q21_MR_STAR.Buffer(), q21LocalHeight );\n            mpi::AllReduce\n            ( colSumSendBuffer.data(), colSumRecvBuffer.data(),\n              2*x01LocalHeight+q21LocalHeight, g.ColComm() );\n            MemCopy\n            ( x01_MR_STAR.Buffer(), \n              colSumRecvBuffer.data(), x01LocalHeight );\n            MemCopy\n            ( y01_MR_STAR.Buffer(), \n              &colSumRecvBuffer[x01LocalHeight], x01LocalHeight );\n            MemCopy\n            ( q21_MR_STAR.Buffer(), \n              &colSumRecvBuffer[2*x01LocalHeight], q21LocalHeight );\n        }\n\n        LocalGemv( NORMAL, F(-1), A20B, x01_MR_STAR, F(1), p21B_MC_STAR );\n        LocalGemv( NORMAL, F(-1), W20B, y01_MR_STAR, F(1), p21B_MC_STAR );\n\n        if( W22.Width() > 0 )\n        {\n            // This is not the last iteration of the panel factorization, \n            // combine the Reduce to one of p21[MC,* ] with the redistribution \n            // of q21[MR,* ] -> q21[MC,MR] to the next process column.\n            const Int localHeight = p21_MC_STAR.LocalHeight();\n            std::vector<F> reduceToOneSendBuffer(2*localHeight),\n                           reduceToOneRecvBuffer(2*localHeight);\n\n            // Pack p21[MC,* ]\n            MemCopy\n            ( reduceToOneSendBuffer.data(), p21_MC_STAR.Buffer(), localHeight );\n\n            // Fill in contributions to q21[MC,MR] from q21[MR,* ]\n            const bool contributing = \n                ( q21_MR_STAR.ColShift() % g.GCD() ==\n                  p21_MC_STAR.ColShift() % g.GCD() );\n            if( contributing )\n            {\n                if( r == c )\n                {\n                    MemCopy\n                    ( &reduceToOneSendBuffer[localHeight],\n                      q21_MR_STAR.Buffer(), localHeight );\n                }\n                else\n                {\n                    // Zero the entire buffer first\n                    MemZero( &reduceToOneSendBuffer[localHeight], localHeight );\n                    // Fill in the entries that we contribute to.\n                    // We seek to find the minimum s in N such that\n                    //   s*c = a0-b0 (mod r)\n                    // where a0 is the column shift of MC, b0 is the row shift\n                    // of MR, and s is our first local entry of MR that will \n                    // contribute to MC. I cannot think of an O(1) method, so\n                    // I will instead use the worst-case O(lcm(c,r)/c) method.\n                    const Int sourcePeriod = g.LCM() / c;\n                    const Int targetPeriod = g.LCM() / r;\n                    const Int a0 = p21_MC_STAR.ColShift();\n                    const Int b0 = q21_MR_STAR.ColShift();\n\n                    Int sourceStart = 0;\n                    const Int f = (r+a0-b0) % r;\n                    for( Int s=0; s<sourcePeriod; ++s )\n                    {\n                        if( (s*c) % r == f )\n                        {\n                            sourceStart = s;\n                            break;\n                        }\n                    }\n\n                    const Int globalShift = b0+sourceStart*c;\n                    const Int targetStart = (globalShift-a0)/r;\n                    const Int localLength =\n                        Length(localHeight,targetStart,targetPeriod);\n                    const F* q21_MR_STAR_Buffer = q21_MR_STAR.Buffer();\n                    const Int offset = localHeight + targetStart;\n                    for( Int i=0; i<localLength; ++i )                        \n                        reduceToOneSendBuffer[offset+i*targetPeriod] = \n                            q21_MR_STAR_Buffer[sourceStart+i*sourcePeriod];\n                }\n            }\n            else\n                MemZero( &reduceToOneSendBuffer[localHeight], localHeight );\n\n            const Int nextProcessRow = (alpha11.ColAlign()+1) % r;\n            const Int nextProcessCol = (alpha11.RowAlign()+1) % c;\n            mpi::Reduce\n            ( reduceToOneSendBuffer.data(), reduceToOneRecvBuffer.data(),\n              2*localHeight, nextProcessCol, g.RowComm() );\n            if( g.Col() == nextProcessCol )\n            {\n                // Combine the second half into the first half        \n                for( Int i=0; i<localHeight; ++i )\n                    reduceToOneRecvBuffer[i] +=\n                        reduceToOneRecvBuffer[i+localHeight];\n\n                // Finish computing w21. During its computation, ensure that \n                // every process has a copy of the first element of the w21.\n                // We know a priori that the first element of a21 is one.\n                const F* a21_MC_STAR_Buffer = a21_MC_STAR.Buffer();\n                F myDotProduct = blas::Dot\n                    ( localHeight, reduceToOneRecvBuffer.data(), 1, \n                                   a21_MC_STAR_Buffer,           1 );\n                F sendBuffer[2], recvBuffer[2];\n                sendBuffer[0] = myDotProduct;\n                sendBuffer[1] = ( g.Row()==nextProcessRow ? \n                                  reduceToOneRecvBuffer[0] : 0 );\n                mpi::AllReduce( sendBuffer, recvBuffer, 2, g.ColComm() );\n                F dotProduct = recvBuffer[0];\n\n                // Set up for the next iteration by filling in the values for:\n                // - w21LastBuffer\n                // - w21LastFirstEntry\n                F scale = dotProduct*tau / F(2);\n                for( Int i=0; i<localHeight; ++i )\n                    w21LastBuffer[i] = Conj(tau)*\n                        ( reduceToOneRecvBuffer[i]-\n                          scale*a21_MC_STAR_Buffer[i] );\n                w21LastFirstEntry = Conj(tau)*( recvBuffer[1]-scale );\n            }\n        }\n        else\n        {\n            // This is the last iteration, our last task is to finish forming\n            // w21[MC,* ] and w21[MR,* ] so that we may place them into W[MC,* ]\n            // and W[MR,* ]\n            const Int localHeight = p21_MC_STAR.LocalHeight();\n            std::vector<F> allReduceSendBuffer(2*localHeight),\n                           allReduceRecvBuffer(2*localHeight);\n\n            // Pack p21[MC,* ]\n            MemCopy\n            ( allReduceSendBuffer.data(), p21_MC_STAR.Buffer(), localHeight );\n\n            // Fill in contributions to q21[MC,* ] from q21[MR,* ]\n            const bool contributing = \n                ( q21_MR_STAR.ColShift() % g.GCD() ==\n                  p21_MC_STAR.ColShift() % g.GCD() );\n            if( contributing )\n            {\n                if( r == c )\n                {\n                    MemCopy\n                    ( &allReduceSendBuffer[localHeight],\n                      q21_MR_STAR.Buffer(), localHeight );\n                }\n                else\n                {\n                    // Zero the entire buffer first\n                    MemZero( &allReduceSendBuffer[localHeight], localHeight );\n                    // Fill in the entries that we contribute to.\n                    // We seek to find the minimum s in N such that\n                    //   s*c = a0-b0 (mod r)\n                    // where a0 is the column shift of MC, b0 is the row shift\n                    // of MR, and s is our first local entry of MR that will \n                    // contribute to MC. I cannot think of an O(1) method, so\n                    // I will instead use the worst-case O(lcm(c,r)/c) method.\n                    const Int sourcePeriod = g.LCM() / c;\n                    const Int targetPeriod = g.LCM() / r;\n                    const Int a0 = p21_MC_STAR.ColShift();\n                    const Int b0 = q21_MR_STAR.ColShift();\n\n                    Int sourceStart = 0;\n                    const Int f = (r+a0-b0) % r;\n                    for( Int s=0; s<sourcePeriod; ++s )\n                    {\n                        if( (s*c) % r == f )\n                        {\n                            sourceStart = s;\n                            break;\n                        }\n                    }\n\n                    const Int globalShift = b0+sourceStart*c;\n                    const Int targetStart = (globalShift-a0)/r;\n                    const Int localLength = \n                        Length(localHeight,targetStart,targetPeriod);\n                    const F* q21_MR_STAR_Buffer = q21_MR_STAR.Buffer();\n                    const Int offset = localHeight + targetStart;\n                    for( Int i=0; i<localLength; ++i )\n                        allReduceSendBuffer[offset+i*targetPeriod] = \n                            q21_MR_STAR_Buffer[sourceStart+i*sourcePeriod];\n                }\n            }\n            else\n                MemZero( &allReduceSendBuffer[localHeight], localHeight );\n\n            mpi::AllReduce\n            ( allReduceSendBuffer.data(), allReduceRecvBuffer.data(),\n              2*localHeight, g.RowComm() );\n\n            // Combine the second half into the first half        \n            for( Int i=0; i<localHeight; ++i )\n                allReduceRecvBuffer[i] += allReduceRecvBuffer[i+localHeight];\n \n            // Finish computing w21.\n            const F* a21_MC_STAR_Buffer = a21_MC_STAR.Buffer();\n            F myDotProduct = blas::Dot\n                ( localHeight, allReduceRecvBuffer.data(), 1, \n                               a21_MC_STAR_Buffer,         1 );\n            const F dotProduct = mpi::AllReduce( myDotProduct, g.ColComm() );\n\n            // Grab views into W[MC,* ] and W[MR,* ]\n            auto w21_MC_STAR = ViewRange( W_MC_STAR, k+1, k, n, k+1 );\n            auto w21_MR_STAR = ViewRange( W_MR_STAR, k+1, k, n, k+1 );\n\n            // Store w21[MC,* ]\n            F scale = dotProduct*tau / F(2);\n            F* w21_MC_STAR_Buffer = w21_MC_STAR.Buffer();\n            for( Int i=0; i<localHeight; ++i )\n                w21_MC_STAR_Buffer[i] = Conj(tau)*\n                    ( allReduceRecvBuffer[i]-scale*a21_MC_STAR_Buffer[i] );\n\n            // Form w21[MR,* ]\n            w21_MR_STAR = w21_MC_STAR;\n        }\n    }\n\n    // View the portion of A that e is the subdiagonal of, then place e into it\n    auto expandedATL = View( A, 0, 0, nW+1, nW+1 );\n    expandedATL.SetRealPartOfDiagonal( e, -1 );\n}\n\n} // namespace herm_tridiag\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAG_LPAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianTridiag/LPanSquare.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_HERMITIANTRIDIAG_LPANSQUARE_HPP\n#define ELEM_HERMITIANTRIDIAG_LPANSQUARE_HPP\n\n#include ELEM_ZERO_INC\n#include ELEM_GEMV_INC\n#include ELEM_REFLECTOR_INC\n\nnamespace elem {\nnamespace herm_tridiag {\n\ntemplate<typename F>\nvoid LPanSquare\n( DistMatrix<F>& A,\n  DistMatrix<F>& W,\n  DistMatrix<F,MD,STAR>& t,\n  DistMatrix<F,MC,STAR>& APan_MC_STAR, \n  DistMatrix<F,MR,STAR>& APan_MR_STAR,\n  DistMatrix<F,MC,STAR>& W_MC_STAR,\n  DistMatrix<F,MR,STAR>& W_MR_STAR )\n{\n    const Int n = A.Height();\n    const Int nW = W.Width();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"herm_tridiag::LPanSquare\");\n        if( A.Grid() != W.Grid() || W.Grid() != t.Grid() )\n            LogicError(\"A, W, and t must be distributed over the same grid\");\n        if( n != A.Width() )\n            LogicError(\"A must be square\");\n        if( n != W.Height() )\n            LogicError(\"A and W must be the same height\");\n        if( n <= nW )\n            LogicError(\"W must be a column panel\");\n        if( W.ColAlign() != A.ColAlign() || \n            W.RowAlign() != A.RowAlign() )\n            LogicError(\"W and A must be aligned\");\n        if( t.Height() != nW || t.Width() != 1 )\n            LogicError\n            (\"t must be a column vector of the same length as W's width\");\n        if( !A.DiagonalAlignedWith(t,-1) )\n            LogicError(\"t is not aligned with A's subdiagonal\");\n    )\n    typedef Base<F> Real;\n    // Find the process holding our transposed data\n    const Grid& g = A.Grid();\n    const Int r = g.Height();\n    Int transposeRank;\n    {\n        const Int colAlign = A.ColAlign();\n        const Int rowAlign = A.RowAlign();\n        const Int colShift = A.ColShift();\n        const Int rowShift = A.RowShift();\n\n        const Int transposeRow = (colAlign+rowShift) % r;\n        const Int transposeCol = (rowAlign+colShift) % r;\n        transposeRank = transposeRow + r*transposeCol;\n    }\n    const bool onDiagonal = ( transposeRank == g.VCRank() );\n\n    // Create a distributed matrix for storing the subdiagonal\n    DistMatrix<Real,MD,STAR> e(g);\n    e.SetRoot( A.DiagonalRoot(-1) );\n    e.AlignCols( A.DiagonalAlign(-1) );\n    e.Resize( nW, 1 );\n\n    std::vector<F> w21LastBuffer(A.Height()/r+1);\n    DistMatrix<F> w21Last(g);\n    DistMatrix<F,MC,STAR> a21_MC_STAR(g), a21B_MC_STAR(g),\n                          p21_MC_STAR(g), p21B_MC_STAR(g),\n                          a21Last_MC_STAR(g), w21Last_MC_STAR(g);\n    DistMatrix<F,MR,STAR> q21_MR_STAR(g), a21_MR_STAR(g),\n                          x01_MR_STAR(g), y01_MR_STAR(g),\n                          a21Last_MR_STAR(g), w21Last_MR_STAR(g);\n\n    F tau = 0;\n    F w21LastFirstEntry = 0;\n    for( Int k=0; k<nW; ++k )\n    {\n        if( k > 0 )\n        {\n            a21Last_MC_STAR = ViewRange( APan_MC_STAR, k, k-1, n, k );\n            a21Last_MR_STAR = ViewRange( APan_MR_STAR, k, k-1, n, k );\n            w21Last         = ViewRange( W,            k, k-1, n, k );\n        }\n            \n        auto A00      = ViewRange( A, 0,   0,   k,   k   );\n        auto W00      = ViewRange( W, 0,   0,   k,   k   );\n        auto alpha11  = ViewRange( A, k,   k,   k+1, k+1 );\n        auto a21      = ViewRange( A, k+1, k,   n,   k+1 );\n        auto alpha21T = ViewRange( A, k+1, k,   k+2, k+1 );\n        auto a21B     = ViewRange( A, k+2, k,   n,   k+1 );\n        auto A22      = ViewRange( A, k+1, k+1, n,   n   );\n        auto W22      = ViewRange( W, k+1, k+1, n,   nW  );\n        auto ACol     = ViewRange( A, k,   k,   n,   k+1 );\n        auto WCol     = ViewRange( W, k,   k,   n,   k+1 );\n        auto A20B     = ViewRange( A, nW,  0,   n,   k   );\n        auto W20B     = ViewRange( W, nW,  0,   n,   k   );\n        auto ABR      = ViewRange( A, k,   k,   n,   n   );\n        auto tau1     = View( t, k, 0, 1, 1 );\n        auto epsilon1 = View( e, k, 0, 1, 1 );\n\n        a21_MC_STAR.AlignWith( A22 );\n        a21_MR_STAR.AlignWith( A22 );\n        p21_MC_STAR.AlignWith( A22 );\n        q21_MR_STAR.AlignWith( A22 );\n        a21_MC_STAR.Resize( n-(k+1), 1 );\n        a21_MR_STAR.Resize( n-(k+1), 1 );\n        p21_MC_STAR.Resize( n-(k+1), 1 );\n        q21_MR_STAR.Resize( n-(k+1), 1 );\n\n        // View the portions of a21[MC,* ] and p21[MC,* ] below the current\n        // panel's square\n        auto a21B_MC_STAR = View( a21_MC_STAR, nW-(k+1), 0, n-nW, 1 );\n        auto p21B_MC_STAR = View( p21_MC_STAR, nW-(k+1), 0, n-nW, 1 );\n\n        const bool thisIsMyCol = ( g.Col() == alpha11.RowAlign() );\n        if( thisIsMyCol )\n        {\n            if( k > 0 )\n            {\n                // Finish updating the current column with two axpy's\n                const Int AColLocalHeight = ACol.LocalHeight();\n                F* AColBuffer = ACol.Buffer();\n                const F* a21Last_MC_STAR_Buffer = a21Last_MC_STAR.Buffer();\n                for( Int i=0; i<AColLocalHeight; ++i )\n                    AColBuffer[i] -=\n                        w21LastBuffer[i] + \n                        a21Last_MC_STAR_Buffer[i]*Conj(w21LastFirstEntry);\n            }\n            // Compute the Householder reflector\n            tau = reflector::Col( alpha21T, a21B );\n            if( g.Row() == alpha21T.ColAlign() )\n                tau1.SetLocal(0,0,tau);\n        }\n\n        // Store the subdiagonal value and turn a21 into a proper scaled \n        // reflector by explicitly placing the implicit one in its first entry.\n        alpha21T.GetRealPartOfDiagonal( epsilon1 );\n        alpha21T.Set( 0, 0, F(1) );\n\n        // If this is the first iteration, have each member of the owning \n        // process column broadcast tau and a21 within its process row. \n        // Otherwise, also add w21 into the broadcast.\n        if( k == 0 )\n        {\n            const Int a21LocalHeight = a21.LocalHeight();\n            std::vector<F> rowBroadcastBuffer(a21LocalHeight+1);\n            if( thisIsMyCol )\n            {\n                // Pack the broadcast buffer with a21 and tau\n                MemCopy\n                ( rowBroadcastBuffer.data(), a21.Buffer(), a21LocalHeight );\n                rowBroadcastBuffer[a21LocalHeight] = tau;\n            }\n            // Broadcast a21 and tau across the process row\n            mpi::Broadcast\n            ( rowBroadcastBuffer.data(), \n              a21LocalHeight+1, a21.RowAlign(), g.RowComm() );\n            // Store a21[MC,* ] into its DistMatrix class and also store a copy\n            // for the next iteration\n            MemCopy\n            ( a21_MC_STAR.Buffer(), rowBroadcastBuffer.data(), a21LocalHeight );\n            // Store a21[MC,* ] into APan[MC,* ]\n            const Int APan_MC_STAR_Offset = \n                APan_MC_STAR.LocalHeight()-a21LocalHeight;\n            MemCopy\n            ( APan_MC_STAR.Buffer(APan_MC_STAR_Offset,0), \n              rowBroadcastBuffer.data(),\n              APan_MC_STAR.LocalHeight()-APan_MC_STAR_Offset );\n            // Store tau\n            tau = rowBroadcastBuffer[a21LocalHeight];\n            \n            // Take advantage of the square process grid in order to form \n            // a21[MR,* ] from a21[MC,* ]\n            if( onDiagonal )\n            {\n                MemCopy\n                ( a21_MR_STAR.Buffer(), a21_MC_STAR.Buffer(), a21LocalHeight );\n            }\n            else\n            {\n                // Pairwise exchange\n                const Int sendSize = A22.LocalHeight();\n                const Int recvSize = A22.LocalWidth();\n                mpi::SendRecv\n                ( a21_MC_STAR.Buffer(), sendSize, transposeRank,\n                  a21_MR_STAR.Buffer(), recvSize, transposeRank, g.VCComm() );\n            }\n            // Store a21[MR,* ]\n            const Int APan_MR_STAR_Offset = \n                APan_MR_STAR.LocalHeight()-a21_MR_STAR.LocalHeight();\n            MemCopy\n            ( APan_MR_STAR.Buffer(APan_MR_STAR_Offset,A00.Width()),\n              a21_MR_STAR.Buffer(),\n              APan_MR_STAR.LocalHeight()-APan_MR_STAR_Offset );\n        }\n        else\n        {\n            const Int a21LocalHeight = a21.LocalHeight();\n            const Int w21LastLocalHeight = ACol.LocalHeight();\n            std::vector<F> \n                rowBroadcastBuffer(a21LocalHeight+w21LastLocalHeight+1);\n            if( thisIsMyCol ) \n            {\n                // Pack the broadcast buffer with a21, w21Last, and tau\n                MemCopy\n                ( rowBroadcastBuffer.data(), a21.Buffer(), a21LocalHeight );\n                MemCopy\n                ( &rowBroadcastBuffer[a21LocalHeight], \n                  w21LastBuffer.data(), w21LastLocalHeight );\n                rowBroadcastBuffer[a21LocalHeight+w21LastLocalHeight] = tau;\n            }\n            // Broadcast a21, w21Last, and tau across the process row\n            mpi::Broadcast\n            ( rowBroadcastBuffer.data(), \n              a21LocalHeight+w21LastLocalHeight+1, \n              a21.RowAlign(), g.RowComm() );\n            // Store a21[MC,* ] into its DistMatrix class \n            MemCopy\n            ( a21_MC_STAR.Buffer(), rowBroadcastBuffer.data(), a21LocalHeight );\n            // Store a21[MC,* ] into APan[MC,* ]\n            const Int APan_MC_STAR_Offset = \n                APan_MC_STAR.LocalHeight()-a21LocalHeight;\n            MemCopy\n            ( APan_MC_STAR.Buffer(APan_MC_STAR_Offset,A00.Width()), \n              rowBroadcastBuffer.data(),\n              APan_MC_STAR.LocalHeight()-APan_MC_STAR_Offset );\n            // Store w21Last[MC,* ] into its DistMatrix class\n            w21Last_MC_STAR.AlignWith( alpha11 );\n            w21Last_MC_STAR.Resize( a21.Height()+1, 1 );\n            MemCopy\n            ( w21Last_MC_STAR.Buffer(), \n              &rowBroadcastBuffer[a21LocalHeight], w21LastLocalHeight );\n            // Store the bottom part of w21Last[MC,* ] into WB[MC,* ] and, \n            // if necessary, w21.\n            const Int W_MC_STAR_Offset = \n                W_MC_STAR.LocalHeight()-w21LastLocalHeight;\n            MemCopy\n            ( W_MC_STAR.Buffer(W_MC_STAR_Offset,A00.Width()-1),\n              &rowBroadcastBuffer[a21LocalHeight],\n              W_MC_STAR.LocalHeight()-W_MC_STAR_Offset );\n            if( g.Col() == w21Last.RowAlign() )\n            {\n                MemCopy\n                ( w21Last.Buffer(),\n                  &rowBroadcastBuffer[a21LocalHeight], w21LastLocalHeight );\n            }\n            // Store tau\n            tau = rowBroadcastBuffer[a21LocalHeight+w21LastLocalHeight];\n\n            // Take advantage of the square process grid in order to quickly\n            // form a21[MR,* ] and w21Last[MR,* ] from their [MC,* ] \n            // counterparts\n            w21Last_MR_STAR.AlignWith( ABR );\n            w21Last_MR_STAR.Resize( w21Last.Height(), 1 );\n            if( onDiagonal )\n            {\n                MemCopy\n                ( a21_MR_STAR.Buffer(), a21_MC_STAR.Buffer(), a21LocalHeight );\n                MemCopy\n                ( w21Last_MR_STAR.Buffer(),\n                  w21Last_MC_STAR.Buffer(), w21LastLocalHeight );\n            }\n            else\n            {\n                const Int sendSize = A22.LocalHeight()+ABR.LocalHeight();\n                const Int recvSize = A22.LocalWidth()+ABR.LocalWidth();\n                std::vector<F> sendBuffer(sendSize), recvBuffer(recvSize);\n\n                // Pack the send buffer\n                MemCopy\n                ( sendBuffer.data(), a21_MC_STAR.Buffer(), A22.LocalHeight() );\n                MemCopy\n                ( &sendBuffer[A22.LocalHeight()],\n                  w21Last_MC_STAR.Buffer(), ABR.LocalHeight() );\n\n                // Pairwise exchange\n                mpi::SendRecv\n                ( sendBuffer.data(), sendSize, transposeRank,\n                  recvBuffer.data(), recvSize, transposeRank, g.VCComm() );\n\n                // Unpack the recv buffer\n                MemCopy\n                ( a21_MR_STAR.Buffer(), recvBuffer.data(), A22.LocalWidth() );\n                MemCopy\n                ( w21Last_MR_STAR.Buffer(),\n                  &recvBuffer[A22.LocalWidth()], ABR.LocalWidth() );\n            }\n\n            // Store w21Last[MR,* ]\n            const Int W_MR_STAR_Offset = \n                W_MR_STAR.LocalHeight()-w21Last_MR_STAR.LocalHeight();\n            MemCopy\n            ( W_MR_STAR.Buffer(W_MR_STAR_Offset,A00.Width()-1),\n              w21Last_MR_STAR.Buffer(),\n              W_MR_STAR.LocalHeight()-W_MR_STAR_Offset );\n            // Store a21[MR,* ]\n            const Int APan_MR_STAR_Offset = \n                APan_MR_STAR.LocalHeight()-a21_MR_STAR.LocalHeight();\n            MemCopy\n            ( APan_MR_STAR.Buffer(APan_MR_STAR_Offset,A00.Width()),\n              a21_MR_STAR.Buffer(),\n              APan_MR_STAR.LocalHeight()-APan_MR_STAR_Offset );\n\n            // Update the portion of A22 that is in our current panel with \n            // w21Last and a21Last using two gers. We do not need their top \n            // entries. We trash the upper triangle of our panel of A since we \n            // are only doing slightly more work and we can replace it\n            // afterwards.\n            auto a21Last_MC_STAR_Bottom =\n                ViewRange( a21Last_MC_STAR, 1, 0, n-k, 1 );\n            auto w21Last_MC_STAR_Bottom =\n                ViewRange( w21Last_MC_STAR, 1, 0, n-k, 1 );\n            auto a21Last_MR_STAR_Bottom =\n                ViewRange( a21Last_MR_STAR, 1, 0, n-k, 1 );\n            auto w21Last_MR_STAR_Bottom =\n                ViewRange( w21Last_MR_STAR, 1, 0, n-k, 1 );\n            const F* a21_MC_STAR_Buffer = a21Last_MC_STAR_Bottom.Buffer();\n            const F* w21_MC_STAR_Buffer = w21Last_MC_STAR_Bottom.Buffer();\n            const F* a21_MR_STAR_Buffer = a21Last_MR_STAR_Bottom.Buffer();\n            const F* w21_MR_STAR_Buffer = w21Last_MR_STAR_Bottom.Buffer();\n            F* A22Buffer = A22.Buffer();\n            const Int localHeight = W22.LocalHeight();\n            const Int localWidth = W22.LocalWidth();\n            const Int lDim = A22.LDim();\n            for( Int jLocal=0; jLocal<localWidth; ++jLocal )\n                for( Int iLocal=0; iLocal<localHeight; ++iLocal )\n                    A22Buffer[iLocal+jLocal*lDim] -=\n                        w21_MC_STAR_Buffer[iLocal]*\n                        Conj(a21_MR_STAR_Buffer[jLocal]) +\n                        a21_MC_STAR_Buffer[iLocal]*\n                        Conj(w21_MR_STAR_Buffer[jLocal]);\n        }\n\n        // Form the local portions of (A22 a21) into p21[MC,* ] and q21[MR,* ]:\n        //   p21[MC,* ] := tril(A22)[MC,MR] a21[MR,* ]\n        //   q21[MR,* ] := tril(A22,-1)'[MR,MC] a21[MC,* ]\n        if( A22.ColShift() > A22.RowShift() )\n        {\n            // We are below the diagonal, so we can multiply without an \n            // offset for tril(A22)[MC,MR] and tril(A22,-1)'[MR,MC]\n            if( A22.LocalHeight() != 0 )\n            {\n                MemCopy\n                ( p21_MC_STAR.Buffer(),\n                  a21_MR_STAR.Buffer(), A22.LocalHeight() );\n                blas::Trmv\n                ( 'L', 'N', 'N', A22.LocalHeight(), A22.Buffer(), A22.LDim(), \n                  p21_MC_STAR.Buffer(), 1 );\n            }\n            if( A22.LocalWidth() != 0 )\n            {\n                // Our local portion of q21[MR,* ] might be one entry longer \n                // than A22.LocalHeight(), so go ahead and set the last entry \n                // to 0.\n                F* q21_MR_STAR_Buffer = q21_MR_STAR.Buffer();\n                q21_MR_STAR_Buffer[A22.LocalWidth()-1] = 0;\n                MemCopy\n                ( q21_MR_STAR_Buffer, a21_MC_STAR.Buffer(), A22.LocalHeight() );\n                blas::Trmv\n                ( 'L', 'C', 'N', A22.LocalHeight(), A22.Buffer(), A22.LDim(),\n                  q21_MR_STAR_Buffer, 1 );\n            }\n        }\n        else if( A22.ColShift() < A22.RowShift() )\n        {\n            // We are above the diagonal, so we need to use an offset of +1\n            // for both tril(A22)[MC,MR] and tril(A22,-1)'[MR,MC]\n            const F* a21_MC_STAR_Buffer = a21_MC_STAR.Buffer();\n            const F* a21_MR_STAR_Buffer = a21_MR_STAR.Buffer();\n            const F* A22Buffer = A22.Buffer();\n            if( A22.LocalHeight() != 0 )\n            {\n                // The first entry of p21[MC,* ] will always be zero due to \n                // the forced offset.\n                F* p21_MC_STAR_Buffer = p21_MC_STAR.Buffer();\n                p21_MC_STAR_Buffer[0] = 0;\n                MemCopy\n                ( &p21_MC_STAR_Buffer[1],\n                  a21_MR_STAR_Buffer, A22.LocalHeight()-1 );\n                blas::Trmv\n                ( 'L', 'N', 'N', A22.LocalHeight()-1, &A22Buffer[1], A22.LDim(),\n                  &p21_MC_STAR_Buffer[1], 1 );\n            }\n            if( A22.LocalWidth() != 0 )\n            {\n                // The last entry of q21[MR,* ] will be zero if the local\n                // height and width are equal.\n                F* q21_MR_STAR_Buffer = q21_MR_STAR.Buffer();\n                q21_MR_STAR_Buffer[A22.LocalWidth()-1] = 0;\n                MemCopy\n                ( q21_MR_STAR_Buffer,\n                  &a21_MC_STAR_Buffer[1], A22.LocalHeight()-1 );\n                blas::Trmv\n                ( 'L', 'C', 'N', A22.LocalHeight()-1, &A22Buffer[1], A22.LDim(),\n                  q21_MR_STAR_Buffer, 1 );\n            }\n        }\n        else\n        {\n            // We are on the diagonal, so we only need an offset of +1 for\n            // tril(A22,-1)'[MR,MC]\n            if( A22.LocalHeight() != 0 )\n            {\n                MemCopy\n                ( p21_MC_STAR.Buffer(),\n                  a21_MR_STAR.Buffer(), A22.LocalHeight() );\n                blas::Trmv\n                ( 'L', 'N', 'N', A22.LocalHeight(), A22.Buffer(), A22.LDim(), \n                  p21_MC_STAR.Buffer(), 1 );\n\n                // The last entry of q21[MR,* ] will be zero if the local \n                // height and width are equal.\n                const F* a21_MC_STAR_Buffer = a21_MC_STAR.Buffer();\n                const F* A22Buffer = A22.Buffer();\n                F* q21_MR_STAR_Buffer = q21_MR_STAR.Buffer();\n                q21_MR_STAR_Buffer[A22.LocalWidth()-1] = 0;\n                MemCopy\n                ( q21_MR_STAR_Buffer,\n                  &a21_MC_STAR_Buffer[1], A22.LocalHeight()-1 );\n                blas::Trmv\n                ( 'L', 'C', 'N', A22.LocalHeight()-1, &A22Buffer[1], A22.LDim(),\n                  q21_MR_STAR_Buffer, 1 );\n            }\n        }\n\n        x01_MR_STAR.AlignWith( W20B );\n        y01_MR_STAR.AlignWith( W20B );\n        Zeros( x01_MR_STAR, W20B.Width(), 1 );\n        Zeros( y01_MR_STAR, W20B.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), W20B, a21B_MC_STAR, F(0), x01_MR_STAR );\n        LocalGemv( ADJOINT, F(1), A20B, a21B_MC_STAR, F(0), y01_MR_STAR );\n\n        // Combine the AllReduce column summations of x01[MR,* ] and \n        // y01[MR,* ]\n        {\n            const Int x01LocalHeight = x01_MR_STAR.LocalHeight();\n            std::vector<F> colSumSendBuffer(2*x01LocalHeight),\n                           colSumRecvBuffer(2*x01LocalHeight);\n            MemCopy\n            ( colSumSendBuffer.data(), \n              x01_MR_STAR.Buffer(), x01LocalHeight );\n            MemCopy\n            ( &colSumSendBuffer[x01LocalHeight],\n              y01_MR_STAR.Buffer(), x01LocalHeight );\n            mpi::AllReduce\n            ( colSumSendBuffer.data(), colSumRecvBuffer.data(), \n              2*x01LocalHeight, g.ColComm() );\n            MemCopy\n            ( x01_MR_STAR.Buffer(), \n              colSumRecvBuffer.data(), x01LocalHeight );\n            MemCopy\n            ( y01_MR_STAR.Buffer(), \n              &colSumRecvBuffer[x01LocalHeight], x01LocalHeight );\n        }\n\n        LocalGemv( NORMAL, F(-1), A20B, x01_MR_STAR, F(1), p21B_MC_STAR );\n        LocalGemv( NORMAL, F(-1), W20B, y01_MR_STAR, F(1), p21B_MC_STAR );\n\n        // Fast transpose the unsummed q21[MR,* ] -> q21[MC,* ], so that\n        // it needs to be summed over process rows instead of process \n        // columns. We immediately add it onto p21[MC,* ], which also needs\n        // to be summed within process rows.\n        if( onDiagonal )\n        {\n            const Int a21LocalHeight = a21.LocalHeight();\n            F* p21_MC_STAR_Buffer = p21_MC_STAR.Buffer();\n            const F* q21_MR_STAR_Buffer = q21_MR_STAR.Buffer();\n            for( Int i=0; i<a21LocalHeight; ++i )\n                p21_MC_STAR_Buffer[i] += q21_MR_STAR_Buffer[i];\n        }\n        else\n        {\n            // Pairwise exchange with the transpose process\n            const Int sendSize = A22.LocalWidth();\n            const Int recvSize = A22.LocalHeight();\n            std::vector<F> recvBuffer(recvSize);\n            mpi::SendRecv\n            ( q21_MR_STAR.Buffer(), sendSize, transposeRank, \n              recvBuffer.data(),    recvSize, transposeRank, g.VCComm() );\n\n            // Unpack the recv buffer directly onto p21[MC,* ]\n            F* p21_MC_STAR_Buffer = p21_MC_STAR.Buffer();\n            for( Int i=0; i<recvSize; ++i )\n                p21_MC_STAR_Buffer[i] += recvBuffer[i];\n        }\n\n        if( W22.Width() > 0 )\n        {\n            // This is not the last iteration of the panel factorization, \n            // Reduce to one p21[MC,* ] to the next process column.\n            const Int a21LocalHeight = a21.LocalHeight();\n\n            const Int nextProcessRow = (alpha11.ColAlign()+1) % r;\n            const Int nextProcessCol = (alpha11.RowAlign()+1) % r;\n\n            std::vector<F> reduceToOneRecvBuffer(a21LocalHeight);\n            mpi::Reduce\n            ( p21_MC_STAR.Buffer(), reduceToOneRecvBuffer.data(),\n              a21LocalHeight, nextProcessCol, g.RowComm() );\n            if( g.Col() == nextProcessCol )\n            {\n                // Finish computing w21. During its computation, ensure that \n                // every process has a copy of the first element of the w21.\n                // We know a priori that the first element of a21 is one.\n                const F* a21_MC_STAR_Buffer = a21_MC_STAR.Buffer();\n                F myDotProduct = blas::Dot\n                    ( a21LocalHeight, reduceToOneRecvBuffer.data(), 1,\n                                      a21_MC_STAR_Buffer,           1 );\n                F sendBuffer[2], recvBuffer[2];\n                sendBuffer[0] = myDotProduct;\n                sendBuffer[1] = ( g.Row()==nextProcessRow ?\n                                  reduceToOneRecvBuffer[0] : 0 );\n                mpi::AllReduce( sendBuffer, recvBuffer, 2, g.ColComm() );\n                F dotProduct = recvBuffer[0];\n\n                // Set up for the next iteration by filling in the values for:\n                // - w21LastBuffer\n                // - w21LastFirstEntry\n                F scale = dotProduct*tau / F(2);\n                for( Int i=0; i<a21LocalHeight; ++i )\n                    w21LastBuffer[i] = Conj(tau)*\n                        ( reduceToOneRecvBuffer[i]-\n                          scale*a21_MC_STAR_Buffer[i] );\n                w21LastFirstEntry = Conj(tau)*( recvBuffer[1]-scale );\n            }\n        }\n        else\n        {\n            // This is the last iteration, so we just need to form w21[MC,* ]\n            // and w21[MR,* ]. \n            const Int a21LocalHeight = a21.LocalHeight();\n\n            // AllReduce sum p21[MC,* ] over process rows\n            std::vector<F> allReduceRecvBuffer(a21LocalHeight);\n            mpi::AllReduce\n            ( p21_MC_STAR.Buffer(), allReduceRecvBuffer.data(),\n              a21LocalHeight, g.RowComm() );\n\n            // Finish computing w21.\n            const F* a21_MC_STAR_Buffer = a21_MC_STAR.Buffer();\n            F myDotProduct = blas::Dot\n                ( a21LocalHeight, allReduceRecvBuffer.data(), 1,\n                                  a21_MC_STAR_Buffer,         1 );\n            const F dotProduct = mpi::AllReduce( myDotProduct, g.ColComm() );\n\n            // Grab views into W[MC,* ] and W[MR,* ]\n            auto w21_MC_STAR = ViewRange( W_MC_STAR, k+1, k, n, k+1 );\n            auto w21_MR_STAR = ViewRange( W_MR_STAR, k+1, k, n, k+1 );\n\n            // Store w21[MC,* ]\n            F scale = dotProduct*tau / F(2);\n            F* w21_MC_STAR_Buffer = w21_MC_STAR.Buffer();\n            for( Int i=0; i<a21LocalHeight; ++i )\n                w21_MC_STAR_Buffer[i] = Conj(tau)*\n                    ( allReduceRecvBuffer[i]-scale*a21_MC_STAR_Buffer[i] );\n\n            // Fast transpose w21[MC,* ] -> w21[MR,* ]\n            if( onDiagonal )\n            {\n                MemCopy\n                ( w21_MR_STAR.Buffer(),\n                  w21_MC_STAR.Buffer(), a21LocalHeight );\n            }\n            else\n            {\n                // Pairwise exchange with the transpose process\n                const Int sendSize = A22.LocalHeight();\n                const Int recvSize = A22.LocalWidth();\n                mpi::SendRecv\n                ( w21_MC_STAR.Buffer(), sendSize, transposeRank, \n                  w21_MR_STAR.Buffer(), recvSize, transposeRank, g.VCComm() );\n            }\n        }\n    }\n\n    // View the portion of A that e is the subdiagonal of, then place e into it\n    auto expandedATL = View( A, 0, 0, nW+1, nW+1 );\n    expandedATL.SetRealPartOfDiagonal( e, -1 );\n}\n\n} // namespace herm_tridiag\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAG_LPANSQUARE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianTridiag/LSquare.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_HERMITIANTRIDIAG_LSQUARE_HPP\n#define ELEM_HERMITIANTRIDIAG_LSQUARE_HPP\n\n#include \"./LPanSquare.hpp\"\n\nnamespace elem {\nnamespace herm_tridiag {\n\ntemplate<typename F> \nvoid LSquare( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"herm_tridiag::LSquare\");\n        if( A.Grid() != t.Grid() )\n            LogicError(\"{A,t} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Grid& g = A.Grid();\n    DEBUG_ONLY(\n        if( g.Height() != g.Width() )\n            LogicError(\"The process grid must be square\");\n    )\n    const Int n = A.Height();\n    if( n == 0 )\n    {\n        t.Resize( 0, 1 );\n        return;\n    }\n    DistMatrix<F,MD,STAR> tDiag(g);\n    tDiag.SetRoot( A.DiagonalRoot(-1) );\n    tDiag.AlignCols( A.DiagonalAlign(-1) );\n    tDiag.Resize( A.Height()-1, 1 );\n\n    DistMatrix<F> WPan(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g), t1_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> APan_MC_STAR(g), WPan_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> APan_MR_STAR(g), WPan_MR_STAR(g);\n\n    const Int bsize = Blocksize();\n    for( Int k=0; k<n; k+=bsize )\n    {\n        const Int nb = Min(bsize,n-k);     \n        auto A11 = ViewRange( A, k,    k,    k+nb, k+nb );\n        auto A21 = ViewRange( A, k+nb, k,    n,    k+nb );\n        auto A22 = ViewRange( A, k+nb, k+nb, n,    n    );\n        auto ABR = ViewRange( A, k,    k,    n,    n    );\n        const Int nbt = Min(bsize,(n-1)-k);\n        auto t1 = View( tDiag, k, 0, nbt, 1 );\n            \n        if( A22.Height() > 0 )\n        {\n            WPan.AlignWith( A11 );\n            WPan.Resize( n-k, nb );\n            APan_MC_STAR.AlignWith( A11 );\n            APan_MC_STAR.Resize( n-k, nb );\n            WPan_MC_STAR.AlignWith( A11 );\n            WPan_MC_STAR.Resize( n-k, nb );\n            APan_MR_STAR.AlignWith( A11 );\n            APan_MR_STAR.Resize( n-k, nb );\n            WPan_MR_STAR.AlignWith( A11 );\n            WPan_MR_STAR.Resize( n-k, nb );\n\n            herm_tridiag::LPanSquare\n            ( ABR, WPan, t1,\n              APan_MC_STAR, APan_MR_STAR, \n              WPan_MC_STAR, WPan_MR_STAR );\n\n            auto A21_MC_STAR = LockedViewRange( APan_MC_STAR, nb, 0, n-k, nb );\n            auto A21_MR_STAR = LockedViewRange( APan_MR_STAR, nb, 0, n-k, nb );\n            auto W21_MC_STAR = LockedViewRange( WPan_MC_STAR, nb, 0, n-k, nb );\n            auto W21_MR_STAR = LockedViewRange( WPan_MR_STAR, nb, 0, n-k, nb );\n\n            LocalTrr2k\n            ( LOWER, ADJOINT, ADJOINT,\n              F(-1), A21_MC_STAR, W21_MR_STAR,\n                     W21_MC_STAR, A21_MR_STAR,\n              F(1), A22 );\n        }\n        else\n        {\n            A11_STAR_STAR = A11;\n            t1_STAR_STAR.Resize( nbt, 1 );\n            HermitianTridiag\n            ( LOWER, A11_STAR_STAR.Matrix(), t1_STAR_STAR.Matrix() );\n            A11 = A11_STAR_STAR;\n            t1 = t1_STAR_STAR;\n        }\n    }\n    // Redistribute from matrix-diagonal form to fully replicated\n    t = tDiag;\n}\n\n} // namespace herm_tridiag\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAG_LSQUARE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianTridiag/README.md",
    "content": "### `src/lapack-like/HermitianTridiag/`\n\nThis folder contains Elemental's code for reducing a Hermitian matrix to \nreal symmetric tridiagonal form. The various pieces are organized as follows:\n\n-  `L.hpp`: Lower-triangular storage\n-  `LSquare.hpp`: Lower-triangular storage specialized to\n   square process grids\n-  `LPan.hpp`: Panel portion of a blocked algorithm for lower-triangular \n   storage\n-  `LPanSquare.hpp`: Panel portion of a blocked algorithm for lower-triangular\n   storage specialized to square process grids\n-  `U.hpp`: Upper-triangular storage\n-  `USquare.hpp`: Upper-triangular storage specialized to square process grids\n-  `UPan.hpp`: Panel portion of a blocked algorithm for upper-triangular \n   storage\n-  `UPanSquare.hpp`: Panel portion of a blocked algorithm for upper-triangular\n   storage specialized to square process grids\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianTridiag/U.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_HERMITIANTRIDIAG_U_HPP\n#define ELEM_HERMITIANTRIDIAG_U_HPP\n\n#include ELEM_AXPY_INC\n#include ELEM_DOT_INC\n#include ELEM_HEMV_INC\n#include ELEM_HER2_INC\n#include ELEM_SYMV_INC\n#include ELEM_SYR2_INC\n#include ELEM_REFLECTOR_INC\n\n#include \"./UPan.hpp\"\n\nnamespace elem {\nnamespace herm_tridiag {\n\ntemplate<typename F>\nvoid U( Matrix<F>& A, Matrix<F>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"herm_tridiag::U\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Int n = A.Height();\n    if( n == 0 )\n    {\n        t.Resize( 0, 1 );\n        return;\n    }\n    t.Resize( n-1, 1 );\n\n    Matrix<F> w01;\n    for( Int k=n-1; k>0; --k )\n    {\n        auto A00      = ViewRange( A, 0,   0, k,   k   );\n        auto a01      = ViewRange( A, 0,   k, k,   k+1 );\n        auto a01T     = ViewRange( A, 0,   k, k-1, k+1 );\n        auto alpha01B = ViewRange( A, k-1, k, k,   k+1 );\n\n        const F tau = LeftReflector( alpha01B, a01T );\n        const Base<F> epsilon1 = alpha01B.GetRealPart(0,0);\n        t.Set( k-1, 0, tau );\n        alpha01B.Set(0,0,F(1));\n\n        Zeros( w01, k, 1 );\n        Hemv( UPPER, Conj(tau), A00, a01, F(0), w01 );\n        const F alpha = -Conj(tau)*Dot( w01, a01 )/F(2);\n        Axpy( alpha, a01, w01 );\n        Her2( UPPER, F(-1), a01, w01, A00 );\n        alpha01B.Set(0,0,epsilon1);\n    }\n}\n\ntemplate<typename F>\nvoid U( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"herm_tridiag::U\");\n        if( A.Grid() != t.Grid() )\n            LogicError(\"{A,t} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Grid& g = A.Grid();\n    const Int n = A.Height();\n    if( n == 0 )\n    {\n        t.Resize( 0, 1 );\n        return;\n    }\n    DistMatrix<F,MD,STAR> tDiag(g);\n    tDiag.SetRoot( A.DiagonalRoot(1) );\n    tDiag.AlignCols( A.DiagonalAlign(1) );\n    tDiag.Resize( n-1, 1 );\n\n    DistMatrix<F> WPan(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g), t1_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> APan_MC_STAR(g), WPan_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> APan_MR_STAR(g), WPan_MR_STAR(g);\n    \n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A00 = ViewRange( A, 0, 0, k,    k    );\n        auto A01 = ViewRange( A, 0, k, k,    k+nb );\n        auto A11 = ViewRange( A, k, k, k+nb, k+nb );\n        auto ATL = ViewRange( A, 0, 0, k+nb, k+nb );\n        \n        if( k > 0 )\n        {\n            auto t1 = View( tDiag, k-1, 0, nb, 1 );\n            WPan.AlignWith( A01 );\n            WPan.Resize( k+nb, nb );\n            APan_MC_STAR.AlignWith( A00 );\n            APan_MC_STAR.Resize( k+nb, nb );\n            WPan_MC_STAR.AlignWith( A00 );\n            WPan_MC_STAR.Resize( k+nb, nb );\n            APan_MR_STAR.AlignWith( A00 );\n            APan_MR_STAR.Resize( k+nb, nb );\n            WPan_MR_STAR.AlignWith( A00 );\n            WPan_MR_STAR.Resize( k+nb, nb );\n\n            UPan\n            ( ATL, WPan, t1,\n              APan_MC_STAR, APan_MR_STAR, \n              WPan_MC_STAR, WPan_MR_STAR );\n\n            auto A01_MC_STAR = LockedViewRange( APan_MC_STAR, 0, 0, k, nb );\n            auto A01_MR_STAR = LockedViewRange( APan_MR_STAR, 0, 0, k, nb );\n            auto W01_MC_STAR = LockedViewRange( WPan_MC_STAR, 0, 0, k, nb );\n            auto W01_MR_STAR = LockedViewRange( WPan_MR_STAR, 0, 0, k, nb );\n\n            LocalTrr2k\n            ( UPPER, ADJOINT, ADJOINT,\n              F(-1), A01_MC_STAR, W01_MR_STAR,\n                     W01_MC_STAR, A01_MR_STAR,\n              F(1),  A00 );\n        }\n        else\n        {\n            auto t1 = View( tDiag, 0, 0, nb-1, 1 );\n            A11_STAR_STAR = A11;\n            t1_STAR_STAR.Resize( nb-1, 1 );\n            HermitianTridiag\n            ( UPPER, A11_STAR_STAR.Matrix(), t1_STAR_STAR.Matrix() );\n            A11 = A11_STAR_STAR;\n            t1 = t1_STAR_STAR;\n        }\n    }\n    // Redistribute from matrix-diagonal form to fully replicated\n    t = tDiag;\n}\n\n} // namespace herm_tridiag\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAG_U_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianTridiag/UPan.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_HERMITIANTRIDIAG_UPAN_HPP\n#define ELEM_HERMITIANTRIDIAG_UPAN_HPP\n\n#include ELEM_ZERO_INC\n#include ELEM_GEMV_INC\n#include ELEM_SYMV_INC\n#include ELEM_REFLECTOR_INC\n\nnamespace elem {\nnamespace herm_tridiag {\n\ntemplate<typename F>\nvoid UPan\n( DistMatrix<F>& A,\n  DistMatrix<F>& W,\n  DistMatrix<F,MD,STAR>& t,\n  DistMatrix<F,MC,STAR>& APan_MC_STAR, \n  DistMatrix<F,MR,STAR>& APan_MR_STAR,\n  DistMatrix<F,MC,STAR>& W_MC_STAR,\n  DistMatrix<F,MR,STAR>& W_MR_STAR )\n{\n    const Int n = A.Height();\n    const Int nW = W.Width();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"herm_tridiag::UPan\");\n        if( A.Grid() != W.Grid() || W.Grid() != t.Grid() )\n            LogicError(\"A, W, and t must be distributed over the same grid.\");\n        if( n != A.Width() )\n            LogicError(\"A must be square.\");\n        if( n != W.Height() )\n            LogicError( \"A and W must be the same height.\");\n        if( n <= nW )\n            LogicError(\"W must be a column panel.\");\n        if( t.Height() != nW || t.Width() != 1 )\n            LogicError\n            (\"t must be a column vector of the same length as W's width.\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int r = g.Height();\n    const Int c = g.Width();\n    const Int p = g.Size();\n    const Int off = n-nW;\n\n    // Create a distributed matrix for storing the superdiagonal\n    auto expandedABR = ViewRange( A, off-1, off-1, n, n );\n    DistMatrix<Real,MD,STAR> e(g);\n    e.SetRoot( expandedABR.DiagonalRoot(1) );\n    e.AlignCols( expandedABR.DiagonalAlign(1) );\n    e.Resize( nW, 1 );\n\n    std::vector<F> w01LastBuffer(n/r+1);\n    DistMatrix<F> w01Last(g);\n    DistMatrix<F,MC,STAR> a01_MC_STAR(g), p01_MC_STAR(g),\n                          a01Last_MC_STAR(g), w01Last_MC_STAR(g);\n    DistMatrix<F,MR,STAR> a01_MR_STAR(g), q01_MR_STAR(g),\n                          x21_MR_STAR(g), y21_MR_STAR(g),\n                          a01Last_MR_STAR(g), w01Last_MR_STAR(g);\n\n    F tau = 0;\n    F w01LastBottomEntry = 0;\n    for( Int k=nW-1; k>=0; --k )\n    {\n        const Int kA = k+off;\n        const bool firstIteration = ( k == nW-1 );\n        if( !firstIteration ) \n        {\n            a01Last_MC_STAR = View( APan_MC_STAR, 0, k+1, kA+1, 1 );\n            a01Last_MR_STAR = View( APan_MR_STAR, 0, k+1, kA+1, 1 );\n            w01Last         = View( W,            0, k+1, kA+1, 1 );\n        }\n\n        auto A00      = ViewRange( A, 0,    0,    kA,   kA   );\n        auto W00      = ViewRange( W, 0,    0,    kA,   k    );\n        auto A00Pan   = ViewRange( A, 0,    off,  kA,   kA   );\n        auto a01      = ViewRange( A, 0,    kA,   kA,   kA+1 );\n        auto a01T     = ViewRange( A, 0,    kA,   kA-1, kA+1 );\n        auto alpha01B = ViewRange( A, kA-1, kA,   kA,   kA+1 );\n        auto alpha11  = ViewRange( A, kA,   kA,   kA+1, kA+1 );\n        auto ACol     = ViewRange( A, 0,    kA,   kA+1, kA+1 );\n        auto WCol     = ViewRange( W, 0,    k,    kA+1, k+1  );\n        auto A02      = ViewRange( A, 0,    kA+1, kA,   n    );\n        auto A02T     = ViewRange( A, 0,    kA+1, off,  n    );\n        auto W02T     = ViewRange( W, 0,    k+1,  off,  nW   );\n        auto tau1     = View( t, k, 0, 1, 1 );\n        auto epsilon1 = View( e, k, 0, 1, 1 );\n\n        a01_MC_STAR.AlignWith( A00 );\n        a01_MR_STAR.AlignWith( A00 );\n        p01_MC_STAR.AlignWith( A00 );\n        a01_MC_STAR.Resize( kA, 1 );\n        a01_MR_STAR.Resize( kA, 1 );\n        p01_MC_STAR.Resize( kA, 1 );\n\n        // View the portions of a01[MC,* ] and p01[MC,* ] above the current\n        // panel's square\n        auto a01T_MC_STAR = View( a01_MC_STAR, 0, 0, off, 1 );\n        auto p01T_MC_STAR = View( p01_MC_STAR, 0, 0, off, 1 );\n\n        const bool thisIsMyCol = ( g.Col() == alpha11.RowAlign() );\n        if( thisIsMyCol )\n        {\n            if( !firstIteration )\n            {\n                // Finish updating the current column with two axpy's\n                const Int AColLocalHeight = ACol.LocalHeight();\n                F* AColBuffer = ACol.Buffer();\n                const F* a01Last_MC_STAR_Buffer = a01Last_MC_STAR.Buffer();\n                for( Int i=0; i<AColLocalHeight; ++i )\n                    AColBuffer[i] -=\n                        w01LastBuffer[i] + \n                        a01Last_MC_STAR_Buffer[i]*Conj(w01LastBottomEntry);\n            }\n            // Compute the Householder reflector\n            tau = reflector::Col( alpha01B, a01T );\n            if( g.Row() == alpha01B.ColAlign() )\n                tau1.SetLocal(0,0,tau);\n        }\n\n        // Store the subdiagonal value and turn a01 into a proper scaled \n        // reflector by explicitly placing the implicit one in its first entry.\n        alpha01B.GetRealPartOfDiagonal( epsilon1 );\n        alpha01B.Set( 0, 0, F(1) );\n\n        // If this is the first iteration, have each member of the owning \n        // process column broadcast tau and a01 within its process row. \n        // Otherwise, also add w01 into the broadcast.\n        if( firstIteration )\n        {\n            const Int a01LocalHeight = a01.LocalHeight();\n            std::vector<F> rowBroadcastBuffer(a01LocalHeight+1);\n            if( thisIsMyCol )\n            {\n                // Pack the broadcast buffer with a01 and tau\n                MemCopy\n                ( rowBroadcastBuffer.data(), a01.Buffer(), a01LocalHeight );\n                rowBroadcastBuffer[a01LocalHeight] = tau;\n            }\n            // Broadcast a01 and tau across the process row\n            mpi::Broadcast\n            ( rowBroadcastBuffer.data(), \n              a01LocalHeight+1, a01.RowAlign(), g.RowComm() );\n            // Store a01[MC,* ] into its DistMatrix class and also store a copy\n            // for the next iteration\n            MemCopy\n            ( a01_MC_STAR.Buffer(), rowBroadcastBuffer.data(), a01LocalHeight );\n            // Store a01[MC,* ] into APan[MC,* ]\n            MemCopy\n            ( APan_MC_STAR.Buffer(0,W00.Width()), \n              rowBroadcastBuffer.data(), a01LocalHeight );\n            // Store tau\n            tau = rowBroadcastBuffer[a01LocalHeight];\n            \n            a01_MR_STAR = a01_MC_STAR;\n            // Store a01[MR,* ]\n            MemCopy\n            ( APan_MR_STAR.Buffer(0,W00.Width()),\n              a01_MR_STAR.Buffer(),\n              a01_MR_STAR.LocalHeight() );\n        }\n        else\n        {\n            const Int a01LocalHeight = a01.LocalHeight();\n            const Int w01LastLocalHeight = ACol.LocalHeight();\n            std::vector<F> \n                rowBroadcastBuffer(a01LocalHeight+w01LastLocalHeight+1);\n            if( thisIsMyCol ) \n            {\n                // Pack the broadcast buffer with a01, w01Last, and tau\n                MemCopy\n                ( rowBroadcastBuffer.data(), a01.Buffer(), a01LocalHeight );\n                MemCopy\n                ( &rowBroadcastBuffer[a01LocalHeight], \n                  w01LastBuffer.data(), w01LastLocalHeight );\n                rowBroadcastBuffer[a01LocalHeight+w01LastLocalHeight] = tau;\n            }\n            // Broadcast a01, w01Last, and tau across the process row\n            mpi::Broadcast\n            ( rowBroadcastBuffer.data(), \n              a01LocalHeight+w01LastLocalHeight+1, \n              a01.RowAlign(), g.RowComm() );\n            // Store a01[MC,* ] into its DistMatrix class \n            MemCopy\n            ( a01_MC_STAR.Buffer(), rowBroadcastBuffer.data(), a01LocalHeight );\n            // Store a01[MC,* ] into APan[MC,* ]\n            MemCopy\n            ( APan_MC_STAR.Buffer(0,W00.Width()), \n              rowBroadcastBuffer.data(), a01LocalHeight );\n            // Store w01Last[MC,* ] into its DistMatrix class\n            w01Last_MC_STAR.AlignWith( A00 );\n            w01Last_MC_STAR.Resize( a01.Height()+1, 1 );\n            MemCopy\n            ( w01Last_MC_STAR.Buffer(), \n              &rowBroadcastBuffer[a01LocalHeight], w01LastLocalHeight );\n            // Store the bottom part of w01Last[MC,* ] into WB[MC,* ] and, \n            // if necessary, w01.\n            MemCopy\n            ( W_MC_STAR.Buffer(0,W00.Width()+1),\n              &rowBroadcastBuffer[a01LocalHeight], w01LastLocalHeight );\n            if( g.Col() == w01Last.RowAlign() )\n            {\n                MemCopy\n                ( w01Last.Buffer(),\n                  &rowBroadcastBuffer[a01LocalHeight], w01LastLocalHeight );\n            }\n            // Store tau\n            tau = rowBroadcastBuffer[a01LocalHeight+w01LastLocalHeight];\n\n            // Form a01[MR,* ] and w01Last[MR,* ] by combining the \n            // communications needed for taking a vector from \n            // [MC,* ] -> [MR,* ]: \n            //   local copy to [VC,* ], \n            //   Send/Recv to [VR,* ], \n            //   AllGather to [MR,* ]\n            // We can combine the two by treating a01 as [a01; 0] \n\n            const Int colAlignSource = A00.ColAlign();\n            const Int colAlignDest = A00.RowAlign();\n            const Int colShiftSource = A00.ColShift();\n            const Int colShiftDest = A00.RowShift();\n\n            const Int height = a01.Height()+1;\n            const Int portionSize = mpi::Pad( 2*MaxLength(height,p) );\n\n            const Int colShiftVRDest = Shift(g.VRRank(),colAlignDest,p);\n            const Int colShiftVCSource = Shift(g.VCRank(),colAlignSource,p);\n            const Int sendRankRM = \n                (g.VRRank()+(p+colShiftVCSource-colShiftVRDest))%p;\n            const Int recvRankCM = \n                (g.VCRank()+(p+colShiftVRDest-colShiftVCSource))%p;\n            const Int recvRankRM = \n                (recvRankCM/r)+c*(recvRankCM%r);\n\n            std::vector<F> transposeBuffer( (r+1)*portionSize );\n            F* sendBuf = &transposeBuffer[0];\n            F* recvBuf = &transposeBuffer[r*portionSize];\n\n            // (w01Last[VC,* ] <- w01Last[MC,* ]) and\n            // ([a01; 0][VC,* ] <- [a01; 0][MC,* ])\n            {\n                // Pack the necessary portion of w01Last[MC,* ]\n                const Int shift = Shift(g.VCRank(),colAlignSource,p);\n                const Int offset = (shift-colShiftSource)/r;\n                const Int w01VCLocalHeight = Length(height,shift,p);\n                const F* w01Buffer = w01Last_MC_STAR.Buffer(offset,0);\n                for( Int i=0; i<w01VCLocalHeight; ++i )\n                    sendBuf[i] = w01Buffer[i*c];\n                \n                // Pack the necessary portion of a01[MC,* ]\n                const Int a01VCLocalHeight = Length(height-1,shift,p);\n                const F* a01Buffer = a01_MC_STAR.Buffer(offset,0);\n                for( Int i=0; i<a01VCLocalHeight; ++i )\n                    sendBuf[w01VCLocalHeight+i] = a01Buffer[i*c];\n            }\n\n            // [VR,* ] <- [VC,* ]\n            mpi::SendRecv\n            ( sendBuf, portionSize, sendRankRM, \n              recvBuf, portionSize, recvRankRM, g.VRComm() );\n\n            // [MR,* ] <- [VR,* ]\n            mpi::AllGather\n            ( recvBuf, portionSize,\n              sendBuf, portionSize, g.ColComm() );\n\n            // Unpack\n            w01Last_MR_STAR.AlignWith( A00 );\n            w01Last_MR_STAR.Resize( a01.Height()+1, 1 );\n            for( Int row=0; row<r; ++row )\n            {\n                // Unpack into w01Last[MR,* ]\n                const F* w01Data = &sendBuf[row*portionSize];\n                const Int shift = Shift(g.Col()+c*row,colAlignDest,p);\n                const Int offset = (shift-colShiftDest) / c;\n                const Int w01VCLocalHeight = Length(height,shift,p);\n                F* w01Buffer = w01Last_MR_STAR.Buffer(offset,0);\n                for( Int i=0; i<w01VCLocalHeight; ++i )\n                    w01Buffer[i*r] = w01Data[i];\n\n                // Unpack into a01[MR,* ]\n                const F* a01Data = &sendBuf[row*portionSize+w01VCLocalHeight];\n                const Int a01VCLocalHeight = Length(height-1,shift,p);\n                F* a01Buffer = a01_MR_STAR.Buffer(offset,0);\n                for( Int i=0; i<a01VCLocalHeight; ++i )\n                    a01Buffer[i*r] = a01Data[i];\n            }\n            // Store w01Last[MR,* ]\n            MemCopy\n            ( W_MR_STAR.Buffer(0,W00.Width()+1),\n              w01Last_MR_STAR.Buffer(),\n              w01Last_MR_STAR.LocalHeight() );\n            // Store a01[MR,* ]\n            MemCopy\n            ( APan_MR_STAR.Buffer(0,W00.Width()),\n              a01_MR_STAR.Buffer(),\n              a01_MR_STAR.LocalHeight() );\n\n            // Update the portion of A00 that is in our current panel with \n            // w01Last and a01Last using two gers. We do not need their bottom\n            // entries. We trash the lower triangle of our panel of A since we \n            // are only doing slightly more work and we can replace it\n            // afterwards.\n            auto a01Last_MC_STAR_Top = View( a01Last_MC_STAR, 0, 0, kA, 1 );\n            auto w01Last_MC_STAR_Top = View( w01Last_MC_STAR, 0, 0, kA, 1 );\n            auto a01Last_MR_STAR_TopPan = View( a01Last_MR_STAR, off, 0, k, 1 );\n            auto w01Last_MR_STAR_TopPan = View( w01Last_MR_STAR, off, 0, k, 1 );\n            const F* a01_MC_STAR_Buffer = a01Last_MC_STAR_Top.Buffer();\n            const F* w01_MC_STAR_Buffer = w01Last_MC_STAR_Top.Buffer();\n            const F* a01_MR_STAR_Buffer = a01Last_MR_STAR_TopPan.Buffer();\n            const F* w01_MR_STAR_Buffer = w01Last_MR_STAR_TopPan.Buffer();\n            F* A00PanBuffer = A00Pan.Buffer();\n            const Int localHeight = A00Pan.LocalHeight();\n            const Int localWidth = A00Pan.LocalWidth();\n            const Int lDim = A00Pan.LDim();\n            for( Int jLocal=0; jLocal<localWidth; ++jLocal )\n                for( Int iLocal=0; iLocal<localHeight; ++iLocal )\n                    A00PanBuffer[iLocal+jLocal*lDim] -=\n                        w01_MC_STAR_Buffer[iLocal]*\n                        Conj(a01_MR_STAR_Buffer[jLocal]) +\n                        a01_MC_STAR_Buffer[iLocal]*\n                        Conj(w01_MR_STAR_Buffer[jLocal]);\n        }\n\n        // Form the local portions of (A00 a01) into p01[MC,* ] and q01[MR,* ]:\n        //   p01[MC,* ] := triu(A00)[MC,MR] a01[MR,* ]\n        //   q01[MR,* ] := triu(A00,+1)'[MR,MC] a01[MC,* ]\n        Zero( p01_MC_STAR );\n        q01_MR_STAR.AlignWith( A00 );\n        Zeros( q01_MR_STAR, a01.Height(), 1 );\n        internal::LocalSymvColAccumulateU\n        ( F(1), A00, a01_MC_STAR, a01_MR_STAR, p01_MC_STAR, q01_MR_STAR, true );\n\n        x21_MR_STAR.AlignWith( A02T );\n        y21_MR_STAR.AlignWith( A02T );\n        Zeros( x21_MR_STAR, A02.Width(), 1 );\n        Zeros( y21_MR_STAR, A02.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), W02T, a01T_MC_STAR, F(0), x21_MR_STAR );\n        LocalGemv( ADJOINT, F(1), A02T, a01T_MC_STAR, F(0), y21_MR_STAR );\n\n        // Combine the AllReduce column summations of x21[MR,* ], y21[MR,* ],\n        // and q01[MR,* ]\n        {\n            const Int x21LocalHeight = x21_MR_STAR.LocalHeight();\n            const Int y21LocalHeight = y21_MR_STAR.LocalHeight();\n            const Int q01LocalHeight = q01_MR_STAR.LocalHeight();\n            const Int reduceSize = x21LocalHeight+y21LocalHeight+q01LocalHeight;\n            std::vector<F> colSumSendBuffer(reduceSize),\n                           colSumRecvBuffer(reduceSize);\n            MemCopy\n            ( colSumSendBuffer.data(), x21_MR_STAR.Buffer(), x21LocalHeight );\n            MemCopy\n            ( &colSumSendBuffer[x21LocalHeight],\n              y21_MR_STAR.Buffer(), y21LocalHeight );\n            MemCopy\n            ( &colSumSendBuffer[x21LocalHeight+y21LocalHeight],\n              q01_MR_STAR.Buffer(), q01LocalHeight );\n            mpi::AllReduce\n            ( colSumSendBuffer.data(), colSumRecvBuffer.data(),\n              reduceSize, g.ColComm() );\n            MemCopy\n            ( x21_MR_STAR.Buffer(), colSumRecvBuffer.data(), x21LocalHeight );\n            MemCopy\n            ( y21_MR_STAR.Buffer(), \n              &colSumRecvBuffer[x21LocalHeight], y21LocalHeight );\n            MemCopy\n            ( q01_MR_STAR.Buffer(), \n              &colSumRecvBuffer[x21LocalHeight+y21LocalHeight], \n              q01LocalHeight );\n        }\n\n        LocalGemv( NORMAL, F(-1), A02T, x21_MR_STAR, F(1), p01T_MC_STAR );\n        LocalGemv( NORMAL, F(-1), W02T, y21_MR_STAR, F(1), p01T_MC_STAR );\n\n        if( W00.Width() > 0 )\n        {\n            // This is not the last iteration of the panel factorization, \n            // combine the Reduce to one of p01[MC,* ] with the redistribution \n            // of q01[MR,* ] -> q01[MC,MR] to the next process column.\n            const Int localHeight = p01_MC_STAR.LocalHeight();\n            std::vector<F> reduceToOneSendBuffer(2*localHeight),\n                           reduceToOneRecvBuffer(2*localHeight);\n\n            // Pack p01[MC,* ]\n            MemCopy\n            ( reduceToOneSendBuffer.data(), p01_MC_STAR.Buffer(), localHeight );\n\n            // Fill in contributions to q01[MC,MR] from q01[MR,* ]\n            const bool contributing = \n                ( q01_MR_STAR.ColShift() % g.GCD() ==\n                  p01_MC_STAR.ColShift() % g.GCD() );\n            if( contributing )\n            {\n                if( r == c )\n                {\n                    MemCopy\n                    ( &reduceToOneSendBuffer[localHeight],\n                      q01_MR_STAR.Buffer(), localHeight );\n                }\n                else\n                {\n                    // Zero the entire buffer first\n                    MemZero( &reduceToOneSendBuffer[localHeight], localHeight );\n                    // Fill in the entries that we contribute to.\n                    // We seek to find the minimum s in N such that\n                    //   s*c = a0-b0 (mod r)\n                    // where a0 is the column shift of MC, b0 is the row shift\n                    // of MR, and s is our first local entry of MR that will \n                    // contribute to MC. I cannot think of an O(1) method, so\n                    // I will instead use the worst-case O(lcm(c,r)/c) method.\n                    const Int sourcePeriod = g.LCM() / c;\n                    const Int targetPeriod = g.LCM() / r;\n                    const Int a0 = p01_MC_STAR.ColShift();\n                    const Int b0 = q01_MR_STAR.ColShift();\n\n                    Int sourceStart = 0;\n                    const Int f = (r+a0-b0) % r;\n                    for( Int s=0; s<sourcePeriod; ++s )\n                    {\n                        if( (s*c) % r == f )\n                        {\n                            sourceStart = s;\n                            break;\n                        }\n                    }\n\n                    const Int globalShift = b0+sourceStart*c;\n                    const Int targetStart = (globalShift-a0)/r;\n                    const Int localLength =\n                        Length(localHeight,targetStart,targetPeriod);\n                    const F* q01_MR_STAR_Buffer = q01_MR_STAR.Buffer();\n                    const Int offset = localHeight + targetStart;\n                    for( Int i=0; i<localLength; ++i )                        \n                        reduceToOneSendBuffer[offset+i*targetPeriod] = \n                            q01_MR_STAR_Buffer[sourceStart+i*sourcePeriod];\n                }\n            }\n            else\n                MemZero( &reduceToOneSendBuffer[localHeight], localHeight );\n\n            const Int nextProcessRow = (alpha11.ColAlign()+r-1) % r;\n            const Int nextProcessCol = (alpha11.RowAlign()+c-1) % c;\n            mpi::Reduce\n            ( reduceToOneSendBuffer.data(), reduceToOneRecvBuffer.data(),\n              2*localHeight, nextProcessCol, g.RowComm() );\n            if( g.Col() == nextProcessCol )\n            {\n                // Combine the second half into the first half        \n                for( Int i=0; i<localHeight; ++i )\n                    reduceToOneRecvBuffer[i] +=\n                        reduceToOneRecvBuffer[i+localHeight];\n\n                // Finish computing w01. During its computation, ensure that \n                // every process has a copy of the last element of the w01.\n                // We know a priori that the last element of a01 is one.\n                const F* a01_MC_STAR_Buffer = a01_MC_STAR.Buffer();\n                F myDotProduct = blas::Dot\n                    ( localHeight, reduceToOneRecvBuffer.data(), 1, \n                                   a01_MC_STAR_Buffer,           1 );\n                F sendBuffer[2], recvBuffer[2];\n                sendBuffer[0] = myDotProduct;\n                sendBuffer[1] = ( g.Row()==nextProcessRow ? \n                                  reduceToOneRecvBuffer[localHeight-1] : 0 );\n                mpi::AllReduce( sendBuffer, recvBuffer, 2, g.ColComm() );\n                F dotProduct = recvBuffer[0];\n\n                // Set up for the next iteration by filling in the values for:\n                // - w01LastBuffer\n                // - w01LastBottomEntry\n                F scale = dotProduct*tau / F(2);\n                for( Int i=0; i<localHeight; ++i )\n                    w01LastBuffer[i] = Conj(tau)*\n                        ( reduceToOneRecvBuffer[i]-\n                          scale*a01_MC_STAR_Buffer[i] );\n                w01LastBottomEntry = Conj(tau)*( recvBuffer[1]-scale );\n            }\n        }\n        else\n        {\n            // This is the last iteration, our last task is to finish forming\n            // w01[MC,* ] and w01[MR,* ] so that we may place them into W[MC,* ]\n            // and W[MR,* ]\n            const Int localHeight = p01_MC_STAR.LocalHeight();\n            std::vector<F> allReduceSendBuffer(2*localHeight),\n                           allReduceRecvBuffer(2*localHeight);\n\n            // Pack p01[MC,* ]\n            MemCopy\n            ( allReduceSendBuffer.data(), p01_MC_STAR.Buffer(), localHeight );\n\n            // Fill in contributions to q01[MC,* ] from q01[MR,* ]\n            const bool contributing = \n                ( q01_MR_STAR.ColShift() % g.GCD() ==\n                  p01_MC_STAR.ColShift() % g.GCD() );\n            if( contributing )\n            {\n                if( r == c )\n                {\n                    MemCopy\n                    ( &allReduceSendBuffer[localHeight],\n                      q01_MR_STAR.Buffer(), localHeight );\n                }\n                else\n                {\n                    // Zero the entire buffer first\n                    MemZero( &allReduceSendBuffer[localHeight], localHeight );\n                    // Fill in the entries that we contribute to.\n                    // We seek to find the minimum s in N such that\n                    //   s*c = a0-b0 (mod r)\n                    // where a0 is the column shift of MC, b0 is the row shift\n                    // of MR, and s is our first local entry of MR that will \n                    // contribute to MC. I cannot think of an O(1) method, so\n                    // I will instead use the worst-case O(lcm(c,r)/c) method.\n                    const Int sourcePeriod = g.LCM() / c;\n                    const Int targetPeriod = g.LCM() / r;\n                    const Int a0 = p01_MC_STAR.ColShift();\n                    const Int b0 = q01_MR_STAR.ColShift();\n\n                    Int sourceStart = 0;\n                    const Int f = (r+a0-b0) % r;\n                    for( Int s=0; s<sourcePeriod; ++s )\n                    {\n                        if( (s*c) % r == f )\n                        {\n                            sourceStart = s;\n                            break;\n                        }\n                    }\n\n                    const Int globalShift = b0+sourceStart*c;\n                    const Int targetStart = (globalShift-a0)/r;\n                    const Int localLength = \n                        Length(localHeight,targetStart,targetPeriod);\n                    const F* q01_MR_STAR_Buffer = q01_MR_STAR.Buffer();\n                    const Int offset = localHeight + targetStart;\n                    for( Int i=0; i<localLength; ++i )\n                        allReduceSendBuffer[offset+i*targetPeriod] = \n                            q01_MR_STAR_Buffer[sourceStart+i*sourcePeriod];\n                }\n            }\n            else\n                MemZero( &allReduceSendBuffer[localHeight], localHeight );\n\n            mpi::AllReduce\n            ( allReduceSendBuffer.data(), allReduceRecvBuffer.data(),\n              2*localHeight, g.RowComm() );\n\n            // Combine the second half into the first half        \n            for( Int i=0; i<localHeight; ++i )\n                allReduceRecvBuffer[i] += allReduceRecvBuffer[i+localHeight];\n \n            // Finish computing w01. During its computation, ensure that \n            // every process has a copy of the last element of the w01.\n            // We know a priori that the last element of a01 is one.\n            const F* a01_MC_STAR_Buffer = a01_MC_STAR.Buffer();\n            F myDotProduct = blas::Dot\n                ( localHeight, allReduceRecvBuffer.data(), 1, \n                               a01_MC_STAR_Buffer,         1 );\n            const F dotProduct = mpi::AllReduce( myDotProduct, g.ColComm() );\n\n            // Grab views into W[MC,* ] and W[MR,* ]\n            auto w01_MC_STAR = View( W_MC_STAR, 0, k, kA, 1 );\n            auto w01_MR_STAR = View( W_MR_STAR, 0, k, kA, 1 );\n\n            // Store w01[MC,* ]\n            F scale = dotProduct*tau / F(2);\n            F* w01_MC_STAR_Buffer = w01_MC_STAR.Buffer();\n            for( Int i=0; i<localHeight; ++i )\n                w01_MC_STAR_Buffer[i] = Conj(tau)*\n                    ( allReduceRecvBuffer[i]-scale*a01_MC_STAR_Buffer[i] );\n\n            // Form w01[MR,* ]\n            w01_MR_STAR = w01_MC_STAR;\n        }\n    }\n\n    expandedABR.SetRealPartOfDiagonal( e, 1 );\n}\n\n} // namespace herm_tridiag\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAG_UPAN_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianTridiag/UPanSquare.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_HERMITIANTRIDIAG_UPANSQUARE_HPP\n#define ELEM_HERMITIANTRIDIAG_UPANSQUARE_HPP\n\n#include ELEM_ZERO_INC\n#include ELEM_GEMV_INC\n#include ELEM_REFLECTOR_INC\n\nnamespace elem {\nnamespace herm_tridiag {\n\ntemplate<typename F>\nvoid UPanSquare\n( DistMatrix<F>& A,\n  DistMatrix<F>& W,\n  DistMatrix<F,MD,STAR>& t,\n  DistMatrix<F,MC,STAR>& APan_MC_STAR, \n  DistMatrix<F,MR,STAR>& APan_MR_STAR,\n  DistMatrix<F,MC,STAR>& W_MC_STAR,\n  DistMatrix<F,MR,STAR>& W_MR_STAR )\n{\n    const Int n = A.Height();\n    const Int nW = W.Width();\n    DEBUG_ONLY(\n        CallStackEntry cse(\"herm_tridiag::UPanSquare\");\n        if( A.Grid() != W.Grid() || W.Grid() != t.Grid() )\n            LogicError(\"A, W, and t must be distributed over the same grid.\");\n        if( n != A.Width() )\n            LogicError(\"A must be square.\");\n        if( n != W.Height() )\n            LogicError( \"A and W must be the same height.\");\n        if( n <= nW )\n            LogicError(\"W must be a column panel.\");\n        if( t.Height() != nW || t.Width() != 1 )\n            LogicError\n            (\"t must be a column vector of the same length as W's width.\");\n    )\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int r = g.Height();\n    const Int off = n-nW;\n\n    // Find the process holding our transposed data\n    Int transposeRank;\n    {\n        const Int colAlign = A.ColAlign();\n        const Int rowAlign = A.RowAlign();\n        const Int colShift = A.ColShift();\n        const Int rowShift = A.RowShift();\n\n        const Int transposeRow = (colAlign+rowShift) % r;\n        const Int transposeCol = (rowAlign+colShift) % r;\n        transposeRank = transposeRow + r*transposeCol;\n    }\n    const bool onDiagonal = ( transposeRank == g.VCRank() );\n\n    // Create a distributed matrix for storing the superdiagonal\n    auto expandedABR = ViewRange( A, off-1, off-1, n, n );\n    DistMatrix<Real,MD,STAR> e(g);\n    e.SetRoot( expandedABR.DiagonalRoot(1) );\n    e.AlignCols( expandedABR.DiagonalAlign(1) );\n    e.Resize( nW, 1 );\n\n    std::vector<F> w01LastBuffer(n/r+1);\n    DistMatrix<F> w01Last(g);\n    DistMatrix<F,MC,STAR> a01_MC_STAR(g), p01_MC_STAR(g),\n                          a01Last_MC_STAR(g), w01Last_MC_STAR(g);\n    DistMatrix<F,MR,STAR> a01_MR_STAR(g), q01_MR_STAR(g),\n                          a01Last_MR_STAR(g), w01Last_MR_STAR(g),\n                          x21_MR_STAR(g), y21_MR_STAR(g);\n\n    F tau = 0;\n    F w01LastBottomEntry = 0;\n    for( Int k=nW-1; k>=0; --k )\n    {\n        const Int kA = k+off;\n        const bool firstIteration = ( k == nW-1 );\n        if( !firstIteration )\n        {\n            a01Last_MC_STAR = View( APan_MC_STAR, 0, k+1, kA+1, 1 );\n            a01Last_MR_STAR = View( APan_MR_STAR, 0, k+1, kA+1, 1 );\n            w01Last         = View( W,            0, k+1, kA+1, 1 );\n        }\n\n        auto A00      = ViewRange( A, 0,    0,    kA,   kA   );\n        auto W00      = ViewRange( W, 0,    0,    kA,   k    );\n        auto A00Pan   = ViewRange( A, 0,    off,  kA,   kA   );\n        auto a01      = ViewRange( A, 0,    kA,   kA,   kA+1 );\n        auto a01T     = ViewRange( A, 0,    kA,   kA-1, kA+1 );\n        auto alpha01B = ViewRange( A, kA-1, kA,   kA,   kA+1 );\n        auto alpha11  = ViewRange( A, kA,   kA,   kA+1, kA+1 );\n        auto ACol     = ViewRange( A, 0,    kA,   kA+1, kA+1 );\n        auto WCol     = ViewRange( W, 0,    k,    kA+1, k+1  );\n        auto ATL      = ViewRange( A, 0,    0,    kA+1, kA+1 );\n        auto A02      = ViewRange( A, 0,    kA+1, kA,   n    );\n        auto A02T     = ViewRange( A, 0,    kA+1, off,  n    );\n        auto W02T     = ViewRange( W, 0,    k+1,  off,  nW   );\n        auto tau1     = View( t, k, 0, 1, 1 );\n        auto epsilon1 = View( e, k, 0, 1, 1 );\n\n        a01_MC_STAR.AlignWith( A00 );\n        a01_MR_STAR.AlignWith( A00 );\n        p01_MC_STAR.AlignWith( A00 );\n        q01_MR_STAR.AlignWith( A00 );\n        a01_MC_STAR.Resize( kA, 1 );\n        a01_MR_STAR.Resize( kA, 1 );\n        p01_MC_STAR.Resize( kA, 1 );\n        q01_MR_STAR.Resize( kA, 1 );\n\n        // View the portions of A02 and W0T outside of this panel's square\n        auto a01T_MC_STAR = View( a01_MC_STAR, 0, 0, off, 1 );\n        auto p01T_MC_STAR = View( p01_MC_STAR, 0, 0, off, 1 );\n\n        const bool thisIsMyCol = ( g.Col() == alpha11.RowAlign() );\n        if( thisIsMyCol )\n        {\n            if( !firstIteration )\n            {\n                // Finish updating the current column with two axpy's\n                const Int AColLocalHeight = ACol.LocalHeight();\n                F* AColBuffer = ACol.Buffer();\n                const F* a01Last_MC_STAR_Buffer = a01Last_MC_STAR.Buffer();\n                for( Int i=0; i<AColLocalHeight; ++i )\n                    AColBuffer[i] -=\n                        w01LastBuffer[i] + \n                        a01Last_MC_STAR_Buffer[i]*Conj(w01LastBottomEntry);\n            }\n            // Compute the Householder reflector\n            tau = reflector::Col( alpha01B, a01T );\n            if( g.Row() == alpha01B.ColAlign() )\n                tau1.SetLocal(0,0,tau);\n        }\n\n        // Store the subdiagonal value and turn a01 into a proper scaled \n        // reflector by explicitly placing the implicit one in its first entry.\n        alpha01B.GetRealPartOfDiagonal( epsilon1 );\n        alpha01B.Set( 0, 0, F(1) );\n\n        // If this is the first iteration, have each member of the owning \n        // process column broadcast tau and a01 within its process row. \n        // Otherwise, also add w01 into the broadcast.\n        if( firstIteration )\n        {\n            const Int a01LocalHeight = a01.LocalHeight();\n            std::vector<F> rowBroadcastBuffer(a01LocalHeight+1);\n            if( thisIsMyCol )\n            {\n                // Pack the broadcast buffer with a01 and tau\n                MemCopy\n                ( rowBroadcastBuffer.data(), a01.Buffer(), a01LocalHeight );\n                rowBroadcastBuffer[a01LocalHeight] = tau;\n            }\n            // Broadcast a01 and tau across the process row\n            mpi::Broadcast\n            ( rowBroadcastBuffer.data(), \n              a01LocalHeight+1, a01.RowAlign(), g.RowComm() );\n            // Store a01[MC,* ] into its DistMatrix class and also store a copy\n            // for the next iteration\n            MemCopy\n            ( a01_MC_STAR.Buffer(), rowBroadcastBuffer.data(), a01LocalHeight );\n            // Store a01[MC,* ] into APan[MC,* ]\n            MemCopy\n            ( APan_MC_STAR.Buffer(0,W00.Width()), \n              rowBroadcastBuffer.data(), a01LocalHeight );\n            // Store tau\n            tau = rowBroadcastBuffer[a01LocalHeight];\n            \n            // Take advantage of the square process grid in order to form\n            // a01[MR,* ] from a01[MC,* ]\n            if( onDiagonal )\n            {\n                MemCopy\n                ( a01_MR_STAR.Buffer(),\n                  a01_MC_STAR.Buffer(), a01LocalHeight );\n            }\n            else\n            {\n                // Pairwise exchange\n                const Int sendSize = A00.LocalHeight();\n                const Int recvSize = A00.LocalWidth();\n                mpi::SendRecv\n                ( a01_MC_STAR.Buffer(), sendSize, transposeRank,\n                  a01_MR_STAR.Buffer(), recvSize, transposeRank, g.VCComm() );\n            }\n            // Store a01[MR,* ]\n            MemCopy\n            ( APan_MR_STAR.Buffer(0,W00.Width()),\n              a01_MR_STAR.Buffer(), a01_MR_STAR.LocalHeight() );\n        }\n        else\n        {\n            const Int a01LocalHeight = a01.LocalHeight();\n            const Int w01LastLocalHeight = ACol.LocalHeight();\n            std::vector<F> \n                rowBroadcastBuffer(a01LocalHeight+w01LastLocalHeight+1);\n            if( thisIsMyCol ) \n            {\n                // Pack the broadcast buffer with a01, w01Last, and tau\n                MemCopy\n                ( rowBroadcastBuffer.data(), a01.Buffer(), a01LocalHeight );\n                MemCopy\n                ( &rowBroadcastBuffer[a01LocalHeight], \n                  w01LastBuffer.data(), w01LastLocalHeight );\n                rowBroadcastBuffer[a01LocalHeight+w01LastLocalHeight] = tau;\n            }\n            // Broadcast a01, w01Last, and tau across the process row\n            mpi::Broadcast\n            ( rowBroadcastBuffer.data(), \n              a01LocalHeight+w01LastLocalHeight+1, \n              a01.RowAlign(), g.RowComm() );\n            // Store a01[MC,* ] into its DistMatrix class \n            MemCopy\n            ( a01_MC_STAR.Buffer(), rowBroadcastBuffer.data(), a01LocalHeight );\n            // Store a01[MC,* ] into APan[MC,* ]\n            MemCopy\n            ( APan_MC_STAR.Buffer(0,W00.Width()), \n              rowBroadcastBuffer.data(), a01LocalHeight );\n            // Store w01Last[MC,* ] into its DistMatrix class\n            w01Last_MC_STAR.AlignWith( A00 );\n            w01Last_MC_STAR.Resize( a01.Height()+1, 1 );\n            MemCopy\n            ( w01Last_MC_STAR.Buffer(), \n              &rowBroadcastBuffer[a01LocalHeight], w01LastLocalHeight );\n            // Store the bottom part of w01Last[MC,* ] into WB[MC,* ] and, \n            // if necessary, w01.\n            MemCopy\n            ( W_MC_STAR.Buffer(0,W00.Width()+1),\n              &rowBroadcastBuffer[a01LocalHeight], w01LastLocalHeight );\n            if( g.Col() == w01Last.RowAlign() )\n            {\n                MemCopy\n                ( w01Last.Buffer(),\n                  &rowBroadcastBuffer[a01LocalHeight], w01LastLocalHeight );\n            }\n            // Store tau\n            tau = rowBroadcastBuffer[a01LocalHeight+w01LastLocalHeight];\n\n            // Take advantage of the square process grid in order to quickly\n            // form a01[MR,* ] and w01Last[MR,* ] from their [MC,* ]\n            // counterparts\n            w01Last_MR_STAR.AlignWith( A00 );\n            w01Last_MR_STAR.Resize( w01Last.Height(), 1 );\n            if( onDiagonal )\n            {\n                MemCopy\n                ( a01_MR_STAR.Buffer(),\n                  a01_MC_STAR.Buffer(), a01LocalHeight );\n                MemCopy\n                ( w01Last_MR_STAR.Buffer(),\n                  w01Last_MC_STAR.Buffer(), w01LastLocalHeight );\n            }\n            else\n            {\n                const Int sendSize = A00.LocalHeight()+ATL.LocalHeight();\n                const Int recvSize = A00.LocalWidth()+ATL.LocalWidth();\n                std::vector<F> sendBuffer(sendSize), recvBuffer(recvSize);\n\n                // Pack the send buffer\n                MemCopy\n                ( sendBuffer.data(), a01_MC_STAR.Buffer(), A00.LocalHeight() );\n                MemCopy\n                ( &sendBuffer[A00.LocalHeight()],\n                  w01Last_MC_STAR.Buffer(), ATL.LocalHeight() );\n\n                // Pairwise exchange\n                mpi::SendRecv\n                ( sendBuffer.data(), sendSize, transposeRank,\n                  recvBuffer.data(), recvSize, transposeRank, g.VCComm() );\n\n                // Unpack the recv buffer\n                MemCopy\n                ( a01_MR_STAR.Buffer(), recvBuffer.data(), A00.LocalWidth() );\n                MemCopy\n                ( w01Last_MR_STAR.Buffer(),\n                  &recvBuffer[A00.LocalWidth()], ATL.LocalWidth() );\n            }\n\n            // Store w01Last[MR,* ]\n            MemCopy\n            ( W_MR_STAR.Buffer(0,W00.Width()+1),\n              w01Last_MR_STAR.Buffer(),\n              w01Last_MR_STAR.LocalHeight() );\n            // Store a01[MR,* ]\n            MemCopy\n            ( APan_MR_STAR.Buffer(0,W00.Width()),\n              a01_MR_STAR.Buffer(), a01_MR_STAR.LocalHeight() );\n\n            // Update the portion of A00 that is in our current panel with \n            // w01Last and a01Last using two gers. We do not need their bottom\n            // entries. We trash the lower triangle of our panel of A since we \n            // are only doing slightly more work and we can replace it\n            // afterwards.\n            auto a01Last_MC_STAR_Top = View( a01Last_MC_STAR, 0, 0, kA, 1 );\n            auto w01Last_MC_STAR_Top = View( w01Last_MC_STAR, 0, 0, kA, 1 );\n            auto a01Last_MR_STAR_TopPan = View( a01Last_MR_STAR, off, 0, k, 1 );\n            auto w01Last_MR_STAR_TopPan = View( w01Last_MR_STAR, off, 0, k, 1 );\n            const F* a01_MC_STAR_Buffer = a01Last_MC_STAR_Top.Buffer();\n            const F* w01_MC_STAR_Buffer = w01Last_MC_STAR_Top.Buffer();\n            const F* a01_MR_STAR_Buffer = a01Last_MR_STAR_TopPan.Buffer();\n            const F* w01_MR_STAR_Buffer = w01Last_MR_STAR_TopPan.Buffer();\n            F* A00PanBuffer = A00Pan.Buffer();\n            const Int localHeight = A00Pan.LocalHeight();\n            const Int localWidth = A00Pan.LocalWidth();\n            const Int lDim = A00Pan.LDim();\n            for( Int jLocal=0; jLocal<localWidth; ++jLocal )\n                for( Int iLocal=0; iLocal<localHeight; ++iLocal )\n                    A00PanBuffer[iLocal+jLocal*lDim] -=\n                        w01_MC_STAR_Buffer[iLocal]*\n                        Conj(a01_MR_STAR_Buffer[jLocal]) +\n                        a01_MC_STAR_Buffer[iLocal]*\n                        Conj(w01_MR_STAR_Buffer[jLocal]);\n        }\n\n        // Form the local portions of (A00 a01) into p01[MC,* ] and q01[MR,* ]:\n        //   p01[MC,* ] := triu(A00)[MC,MR] a01[MR,* ]\n        //   q01[MR,* ] := triu(A00,+1)'[MR,MC] a01[MC,* ]\n        if( A00.ColShift() < A00.RowShift() )\n        {\n            // We are above the diagonal, so we can multiply without an \n            // offset for triu(A00)[MC,MR] and triu(A00,1)'[MR,MC]\n            if( A00.LocalHeight() != 0 )\n            {\n                // Our local portion of p01[MC,* ] might be one entry longer\n                // than A00.LocalWidth(), so go ahead and set the last entry\n                // to 0.\n                F* p01_MC_STAR_Buffer = p01_MC_STAR.Buffer();\n                p01_MC_STAR_Buffer[A00.LocalHeight()-1] = 0;\n                MemCopy\n                ( p01_MC_STAR.Buffer(), \n                  a01_MR_STAR.Buffer(), A00.LocalWidth() );\n                blas::Trmv\n                ( 'U', 'N', 'N', A00.LocalWidth(), A00.Buffer(), A00.LDim(),\n                  p01_MC_STAR.Buffer(), 1 );\n            }\n            if( A00.LocalWidth() != 0 )\n            {\n                MemCopy\n                ( q01_MR_STAR.Buffer(),\n                  a01_MC_STAR.Buffer(), A00.LocalWidth() );\n                blas::Trmv\n                ( 'U', 'C', 'N', A00.LocalWidth(), A00.Buffer(), A00.LDim(),\n                  q01_MR_STAR.Buffer(), 1 );\n            }\n        }\n        else if( A00.ColShift() > A00.RowShift() )\n        {\n            // We are below the diagonal, so we need to use an offset \n            // for both triu(A00)[MC,MR] and triu(A00,+1)'[MR,MC]\n            const F* a01_MC_STAR_Buffer = a01_MC_STAR.Buffer();\n            const F* a01_MR_STAR_Buffer = a01_MR_STAR.Buffer();\n            const F* A00Buffer = A00.Buffer();\n            if( A00.LocalHeight() != 0 )\n            {\n                // The last entry of p01[MC,* ] will be zero due to the forced\n                // offset\n                F* p01_MC_STAR_Buffer = p01_MC_STAR.Buffer();\n                p01_MC_STAR_Buffer[A00.LocalHeight()-1] = 0;\n                MemCopy\n                ( p01_MC_STAR_Buffer,\n                  &a01_MR_STAR_Buffer[1], A00.LocalWidth()-1 );\n                blas::Trmv\n                ( 'U', 'N', 'N', A00.LocalWidth()-1,\n                  &A00Buffer[A00.LDim()], A00.LDim(),\n                  p01_MC_STAR_Buffer, 1 );\n            }\n            if( A00.LocalWidth() != 0 )\n            {\n                // The first entry of q01[MR,* ] will be zero due to the forced\n                // offset\n                F* q01_MR_STAR_Buffer = q01_MR_STAR.Buffer();\n                q01_MR_STAR_Buffer[0] = 0;\n                MemCopy\n                ( &q01_MR_STAR_Buffer[1],\n                  a01_MC_STAR_Buffer, A00.LocalWidth()-1 );\n                blas::Trmv\n                ( 'U', 'C', 'N', A00.LocalWidth()-1,\n                  &A00Buffer[A00.LDim()], A00.LDim(),\n                  &q01_MR_STAR_Buffer[1], 1 );\n            }\n        }\n        else\n        {\n            // We are on the diagonal, so we only need an offset for\n            // triu(A00,+1)'[MR,MC]\n            if( A00.LocalWidth() != 0 )\n            {\n                MemCopy\n                ( p01_MC_STAR.Buffer(),\n                  a01_MR_STAR.Buffer(), A00.LocalHeight() );\n                blas::Trmv\n                ( 'U', 'N', 'N', A00.LocalHeight(), A00.Buffer(), A00.LDim(),\n                  p01_MC_STAR.Buffer(), 1 );\n\n                // The first entry of q01[MR,* ] must be zero due to the forced\n                // offset\n                const F* a01_MC_STAR_Buffer = a01_MC_STAR.Buffer();\n                const F* A00Buffer = A00.Buffer();\n                F* q01_MR_STAR_Buffer = q01_MR_STAR.Buffer();\n                q01_MR_STAR_Buffer[0] = 0;\n                MemCopy\n                ( &q01_MR_STAR_Buffer[1],\n                  a01_MC_STAR_Buffer, A00.LocalWidth()-1 );\n                blas::Trmv\n                ( 'U', 'C', 'N', A00.LocalWidth()-1,\n                  &A00Buffer[A00.LDim()], A00.LDim(),\n                  &q01_MR_STAR_Buffer[1], 1 );\n            }\n        }\n\n        x21_MR_STAR.AlignWith( A02T );\n        y21_MR_STAR.AlignWith( A02T );\n        Zeros( x21_MR_STAR, A02.Width(), 1 );\n        Zeros( y21_MR_STAR, A02.Width(), 1 );\n        LocalGemv( ADJOINT, F(1), W02T, a01T_MC_STAR, F(0), x21_MR_STAR );\n        LocalGemv( ADJOINT, F(1), A02T, a01T_MC_STAR, F(0), y21_MR_STAR );\n\n        // Combine the AllReduce column summations of x21[MR,* ] and y21[MR,* ]\n        {\n            const Int x21LocalHeight = x21_MR_STAR.LocalHeight();\n            const Int y21LocalHeight = y21_MR_STAR.LocalHeight();\n            const Int reduceSize = x21LocalHeight+y21LocalHeight;\n            std::vector<F> colSumSendBuffer(reduceSize),\n                           colSumRecvBuffer(reduceSize);\n            MemCopy\n            ( colSumSendBuffer.data(), x21_MR_STAR.Buffer(), x21LocalHeight );\n            MemCopy\n            ( &colSumSendBuffer[x21LocalHeight],\n              y21_MR_STAR.Buffer(), y21LocalHeight );\n            mpi::AllReduce\n            ( colSumSendBuffer.data(), colSumRecvBuffer.data(),\n              reduceSize, g.ColComm() );\n            MemCopy\n            ( x21_MR_STAR.Buffer(), colSumRecvBuffer.data(), x21LocalHeight );\n            MemCopy\n            ( y21_MR_STAR.Buffer(), \n              &colSumRecvBuffer[x21LocalHeight], y21LocalHeight );\n        }\n\n        LocalGemv( NORMAL, F(-1), A02T, x21_MR_STAR, F(1), p01T_MC_STAR );\n        LocalGemv( NORMAL, F(-1), W02T, y21_MR_STAR, F(1), p01T_MC_STAR );\n\n        // Fast transpose the unsummed q01[MR,* ] -> q01[MC,* ], so that\n        // it needs to be summed over process rows instead of process \n        // columns. We immediately add it onto p01[MC,* ], which also needs\n        // to be summed within process rows.\n        if( onDiagonal )\n        {\n            const Int a01LocalHeight = a01.LocalHeight();\n            F* p01_MC_STAR_Buffer = p01_MC_STAR.Buffer();\n            const F* q01_MR_STAR_Buffer = q01_MR_STAR.Buffer();\n            for( Int i=0; i<a01LocalHeight; ++i )\n                p01_MC_STAR_Buffer[i] += q01_MR_STAR_Buffer[i];\n        }\n        else\n        {\n            // Pairwise exchange with the transpose process\n            const Int sendSize = A00.LocalWidth();\n            const Int recvSize = A00.LocalHeight();\n            std::vector<F> recvBuffer(recvSize);\n            mpi::SendRecv\n            ( q01_MR_STAR.Buffer(), sendSize, transposeRank,\n              recvBuffer.data(),    recvSize, transposeRank, g.VCComm() );\n\n            // Unpack the recv buffer directly onto p01[MC,* ]\n            F* p01_MC_STAR_Buffer = p01_MC_STAR.Buffer();\n            for( Int i=0; i<recvSize; ++i )\n                p01_MC_STAR_Buffer[i] += recvBuffer[i];\n        }\n\n        if( W00.Width() > 0 )\n        {\n            // This is not the last iteration of the panel factorization, \n            // Reduce to one p01[MC,* ] to the next process column.\n            const Int a01LocalHeight = a01.LocalHeight();\n\n            const Int nextProcessRow = (alpha11.ColAlign()+r-1) % r;\n            const Int nextProcessCol = (alpha11.RowAlign()+r-1) % r;\n\n            std::vector<F> reduceToOneRecvBuffer(a01LocalHeight);\n            mpi::Reduce\n            ( p01_MC_STAR.Buffer(), reduceToOneRecvBuffer.data(),\n              a01LocalHeight, nextProcessCol, g.RowComm() );\n            if( g.Col() == nextProcessCol )\n            {\n                // Finish computing w01. During its computation, ensure that \n                // every process has a copy of the last element of the w01.\n                // We know a priori that the last element of a01 is one.\n                const F* a01_MC_STAR_Buffer = a01_MC_STAR.Buffer();\n                F myDotProduct = blas::Dot\n                    ( a01LocalHeight, reduceToOneRecvBuffer.data(), 1, \n                                      a01_MC_STAR_Buffer,           1 );\n                F sendBuffer[2], recvBuffer[2];\n                sendBuffer[0] = myDotProduct;\n                sendBuffer[1] = ( g.Row()==nextProcessRow ? \n                                  reduceToOneRecvBuffer[a01LocalHeight-1] : 0 );\n                mpi::AllReduce( sendBuffer, recvBuffer, 2, g.ColComm() );\n                F dotProduct = recvBuffer[0];\n\n                // Set up for the next iteration by filling in the values for:\n                // - w01LastBuffer\n                // - w01LastBottomEntry\n                F scale = dotProduct*tau / F(2);\n                for( Int i=0; i<a01LocalHeight; ++i )\n                    w01LastBuffer[i] = Conj(tau)*\n                        ( reduceToOneRecvBuffer[i]-\n                          scale*a01_MC_STAR_Buffer[i] );\n                w01LastBottomEntry = Conj(tau)*( recvBuffer[1]-scale );\n            }\n        }\n        else\n        {\n            // This is the last iteration, our last task is to finish forming\n            // w01[MC,* ] and w01[MR,* ]\n            const Int a01LocalHeight = a01.LocalHeight();\n\n            // AllReduce sum p01[MC,* ] over process rows\n            std::vector<F> allReduceRecvBuffer(a01LocalHeight);\n            mpi::AllReduce\n            ( p01_MC_STAR.Buffer(), allReduceRecvBuffer.data(), \n              a01LocalHeight, g.RowComm() );\n\n            // Finish computing w01. During its computation, ensure that \n            // every process has a copy of the last element of the w01.\n            // We know a priori that the last element of a01 is one.\n            const F* a01_MC_STAR_Buffer = a01_MC_STAR.Buffer();\n            F myDotProduct = blas::Dot\n                ( a01LocalHeight, allReduceRecvBuffer.data(), 1, \n                                  a01_MC_STAR_Buffer,         1 );\n            const F dotProduct = mpi::AllReduce( myDotProduct, g.ColComm() );\n\n            // Grab views into W[MC,* ] and W[MR,* ]\n            auto w01_MC_STAR = View( W_MC_STAR, 0, k, kA, 1 );\n            auto w01_MR_STAR = View( W_MR_STAR, 0, k, kA, 1 );\n\n            // Store w01[MC,* ]\n            F scale = dotProduct*tau / F(2);\n            F* w01_MC_STAR_Buffer = w01_MC_STAR.Buffer();\n            for( Int i=0; i<a01LocalHeight; ++i )\n                w01_MC_STAR_Buffer[i] = Conj(tau)*\n                    ( allReduceRecvBuffer[i]-scale*a01_MC_STAR_Buffer[i] );\n\n            // Fast transpose w01[MC,* ] -> w01[MR,* ]\n            if( onDiagonal )\n            {\n                MemCopy\n                ( w01_MR_STAR.Buffer(),\n                  w01_MC_STAR.Buffer(), a01LocalHeight );\n            }\n            else\n            {\n                // Pairwise exchange with the transpose process\n                const Int sendSize = A00.LocalHeight();\n                const Int recvSize = A00.LocalWidth();\n                mpi::SendRecv\n                ( w01_MC_STAR.Buffer(), sendSize, transposeRank,\n                  w01_MR_STAR.Buffer(), recvSize, transposeRank, g.VCComm() );\n            }\n        }\n    }\n\n    expandedABR.SetRealPartOfDiagonal( e, 1 );\n}\n\n} // namespace herm_tridiag\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAG_UPANSQUARE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianTridiag/USquare.hpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#ifndef ELEM_HERMITIANTRIDIAG_USQUARE_HPP\n#define ELEM_HERMITIANTRIDIAG_USQUARE_HPP\n\n#include \"./UPanSquare.hpp\"\n\nnamespace elem {\nnamespace herm_tridiag {\n\ntemplate<typename F> \nvoid USquare( DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t )\n{\n    DEBUG_ONLY(\n        CallStackEntry cse(\"herm_tridiag::USquare\");\n        if( A.Grid() != t.Grid() )\n            LogicError(\"{A,t} must be distributed over the same grid\");\n        if( A.Height() != A.Width() )\n            LogicError(\"A must be square\");\n    )\n    const Grid& g = A.Grid();\n    DEBUG_ONLY(\n        if( g.Height() != g.Width() )\n            LogicError(\"g must be square\");\n    )\n    const Int n = A.Height();\n    if( n == 0 )\n    {\n        t.Resize( 0, 1 );\n        return;\n    }\n    DistMatrix<F,MD,STAR> tDiag(g);\n    tDiag.SetRoot( A.DiagonalRoot(1) );\n    tDiag.AlignCols( A.DiagonalAlign(1) );\n    tDiag.Resize( A.Height()-1, 1 );\n\n    DistMatrix<F> WPan(g);\n    DistMatrix<F,STAR,STAR> A11_STAR_STAR(g), t1_STAR_STAR(g);\n    DistMatrix<F,MC,  STAR> APan_MC_STAR(g), WPan_MC_STAR(g);\n    DistMatrix<F,MR,  STAR> APan_MR_STAR(g), WPan_MR_STAR(g);\n\n    const Int bsize = Blocksize();\n    const Int kLast = LastOffset( n, bsize );\n    for( Int k=kLast; k>=0; k-=bsize )\n    {\n        const Int nb = Min(bsize,n-k);\n        auto A00 = ViewRange( A, 0, 0, k,    k    );\n        auto A01 = ViewRange( A, 0, k, k,    k+nb );\n        auto A11 = ViewRange( A, k, k, k+nb, k+nb );\n        auto ATL = ViewRange( A, 0, 0, k+nb, k+nb );\n\n        if( k > 0 )\n        {\n            auto t1 = View( tDiag, k-1, 0, nb, 1 );\n            WPan.AlignWith( A01 );\n            WPan.Resize( k+nb, nb );\n            APan_MC_STAR.AlignWith( A00 );\n            APan_MC_STAR.Resize( k+nb, nb );\n            WPan_MC_STAR.AlignWith( A00 );\n            WPan_MC_STAR.Resize( k+nb, nb );\n            APan_MR_STAR.AlignWith( A00 );\n            APan_MR_STAR.Resize( k+nb, nb );\n            WPan_MR_STAR.AlignWith( A00 );\n            WPan_MR_STAR.Resize( k+nb, nb );\n\n            UPanSquare\n            ( ATL, WPan, t1,\n              APan_MC_STAR, APan_MR_STAR, \n              WPan_MC_STAR, WPan_MR_STAR );\n\n            auto A01_MC_STAR = LockedViewRange( APan_MC_STAR, 0, 0, k, nb );\n            auto A01_MR_STAR = LockedViewRange( APan_MR_STAR, 0, 0, k, nb );\n            auto W01_MC_STAR = LockedViewRange( WPan_MC_STAR, 0, 0, k, nb );\n            auto W01_MR_STAR = LockedViewRange( WPan_MR_STAR, 0, 0, k, nb );\n\n            LocalTrr2k\n            ( UPPER, ADJOINT, ADJOINT,\n              F(-1), A01_MC_STAR, W01_MR_STAR,\n                     W01_MC_STAR, A01_MR_STAR,\n              F(1),  A00 );\n        }\n        else\n        {\n            auto t1 = View( tDiag, 0, 0, nb-1, 1 );\n            A11_STAR_STAR = A11;\n            t1_STAR_STAR.Resize( nb-1, 1 );\n            HermitianTridiag\n            ( UPPER, A11_STAR_STAR.Matrix(), t1_STAR_STAR.Matrix() );\n            A11 = A11_STAR_STAR;\n            t1 = t1_STAR_STAR;\n        }\n    }\n    // Redistribute from matrix-diagonal form to fully replicated\n    t = tDiag;\n}\n\n} // namespace herm_tridiag\n} // namespace elem\n\n#endif // ifndef ELEM_HERMITIANTRIDIAG_USQUARE_HPP\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/HermitianTridiag.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n#include \"elemental-lite.hpp\"\n\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_HERMITIANTRIDIAG_INC\n\n#include \"./HermitianTridiag/L.hpp\"\n#include \"./HermitianTridiag/LSquare.hpp\"\n#include \"./HermitianTridiag/U.hpp\"\n#include \"./HermitianTridiag/USquare.hpp\"\n\nnamespace elem {\n\ntemplate<typename F>\nvoid HermitianTridiag( UpperOrLower uplo, Matrix<F>& A, Matrix<F>& t )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiag\"))\n    if( uplo == LOWER )\n        herm_tridiag::L( A, t );\n    else\n        herm_tridiag::U( A, t );\n}\n\ntemplate<typename F>\nvoid HermitianTridiag( UpperOrLower uplo, Matrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiag\"))\n    Matrix<F> t;\n    HermitianTridiag( uplo, A, t );\n    if( uplo == UPPER )\n        MakeTrapezoidal( LOWER, A, 1 );\n    else\n        MakeTrapezoidal( UPPER, A, -1 );\n}\n\ntemplate<typename F> \nvoid\nHermitianTridiag\n( UpperOrLower uplo, DistMatrix<F>& A, DistMatrix<F,STAR,STAR>& t,\n  const HermitianTridiagCtrl ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiag\"))\n    const Grid& g = A.Grid();\n    if( ctrl.approach == HERMITIAN_TRIDIAG_NORMAL )\n    {\n        // Use the pipelined algorithm for nonsquare meshes\n        if( uplo == LOWER )\n            herm_tridiag::L( A, t );\n        else\n            herm_tridiag::U( A, t );\n    }\n    else if( ctrl.approach == HERMITIAN_TRIDIAG_SQUARE )\n    {\n        // Drop down to a square mesh \n        const Int p = g.Size();\n        const Int pSqrt = Int(sqrt(double(p)));\n\n        std::vector<int> squareRanks(pSqrt*pSqrt);\n        if( ctrl.order == g.Order() )\n        {\n            for( Int j=0; j<pSqrt; ++j )\n                for( Int i=0; i<pSqrt; ++i )\n                    squareRanks[i+j*pSqrt] = i+j*pSqrt;\n        }\n        else\n        {\n            for( Int j=0; j<pSqrt; ++j )\n                for( Int i=0; i<pSqrt; ++i )\n                    squareRanks[i+j*pSqrt] = j+i*pSqrt;\n        }\n\n        mpi::Group owningGroup = g.OwningGroup();\n        mpi::Group squareGroup;\n        mpi::Incl\n        ( owningGroup, squareRanks.size(), squareRanks.data(), squareGroup );\n\n        mpi::Comm viewingComm = g.ViewingComm();\n        const Grid squareGrid( viewingComm, squareGroup, pSqrt );\n        DistMatrix<F> ASquare(squareGrid);\n        DistMatrix<F,STAR,STAR> tSquare(squareGrid);\n\n        // Perform the fast tridiagonalization on the square grid\n        ASquare = A;\n        if( ASquare.Participating() )\n        {\n            if( uplo == LOWER )\n                herm_tridiag::LSquare( ASquare, tSquare );\n            else\n                herm_tridiag::USquare( ASquare, tSquare ); \n        }\n        tSquare.MakeConsistent( true );\n        A = ASquare;\n        t = tSquare;\n\n        mpi::Free( squareGroup );\n    }\n    else\n    {\n        // Use the normal approach unless we're already on a square \n        // grid, in which case we use the fast square method.\n        if( g.Height() == g.Width() )\n        {\n            if( uplo == LOWER )\n                herm_tridiag::LSquare( A, t );\n            else\n                herm_tridiag::USquare( A, t ); \n        }\n        else\n        {\n            if( uplo == LOWER )\n                herm_tridiag::L( A, t );\n            else\n                herm_tridiag::U( A, t );\n        }\n    }\n}\n\ntemplate<typename F>\nvoid\nHermitianTridiag\n( UpperOrLower uplo, DistMatrix<F>& A, const HermitianTridiagCtrl ctrl )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"HermitianTridiag\"))\n    DistMatrix<F,STAR,STAR> t(A.Grid());\n    HermitianTridiag( uplo, A, t, ctrl );\n    if( uplo == UPPER )\n        MakeTrapezoidal( LOWER, A, 1 );\n    else\n        MakeTrapezoidal( UPPER, A, -1 );\n}\n\n#define PROTO(T) \\\n  template void HermitianTridiag<T>\\\n  ( UpperOrLower uplo, Matrix<T>& A ); \\\n  template void HermitianTridiag<T>\\\n  ( UpperOrLower uplo, Matrix<T>& A, Matrix<T>& t ); \\\n  template void HermitianTridiag<T>\\\n  ( UpperOrLower uplo, DistMatrix<T>& A, const HermitianTridiagCtrl ctrl ); \\\n  template void HermitianTridiag<T>\\\n  ( UpperOrLower uplo, DistMatrix<T>& A, DistMatrix<T,STAR,STAR>& t, \\\n    const HermitianTridiagCtrl ctrl );\n\n#ifndef ELEM_DISABLE_FLOAT\nPROTO(float);\n#ifndef ELEM_DISABLE_COMPLEX\nPROTO(Complex<float>);\n#endif // ifndef ELEM_DISABLE_COMPLEX\n#endif // ifndef ELEM_DISABLE_FLOAT\n\nPROTO(double);\n#ifndef ELEM_DISABLE_COMPLEX\nPROTO(Complex<double>);\n#endif // ifndef ELEM_DISABLE_COMPLEX\n\n} // namespace elem\n"
  },
  {
    "path": "src/madness/external/elemental/src/lapack-like/README.md",
    "content": "### `src/lapack-like/`\n\nThis folder contains Elemental's source-level implementations of LAPACK-like\nroutines. Most such routines are implemented in `include/elemental/lapack-like`,\nbut the exceptions are `HermitianEig` and `HermitianTridiag`, which both involve\na substantial amount of code.\n\nIn addition to this file, this folder contains:\n\n-  `HermitianEig.cpp`: Implementation of Hermitian eigensolvers\n-  `HermitianTridiag/`: Underlying implementations of the reduction of a \n   Hermitian matrix to real symmetric tridiagonal form\n-  `HermitianTridiag.cpp`: High-level interface for the reduction of a Hermitian\n   matrix to real symmetric tridiagonal form\n"
  },
  {
    "path": "src/madness/external/elemental/tests/README.md",
    "content": "### `tests/`\n\nThis folder contains accuracy tests for some of Elemental's routines.\nIt is divided into the following subfolders:\n\n-  `blas-like/`: BLAS-like functionality\n-  `core/`: core data structures\n-  `lapack-like/`: LAPACK-like functionality\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Gemm.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMM_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename T> \nvoid TestGemm\n( bool print, Orientation orientA, Orientation orientB,\n  Int m, Int n, Int k, T alpha, T beta, const Grid& g )\n{\n    double startTime, runTime, realGFlops, gFlops;\n    DistMatrix<T> A(g), B(g), C(g);\n\n    if( orientA == NORMAL )\n        A.Resize( m, k );\n    else\n        A.Resize( k, m );\n    if( orientB == NORMAL )\n        B.Resize( k, n );\n    else\n        B.Resize( n, k );\n    C.Resize( m, n );\n\n    // Test the variant of Gemm that keeps A stationary\n    if( g.Rank() == 0 )\n        cout << \"Stationary A Algorithm:\" << endl;\n    MakeUniform( A );\n    MakeUniform( B );\n    MakeUniform( C );\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( B, \"B\" );\n        Print( C, \"C\" );\n    }\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Gemm...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    startTime = mpi::Time();\n    if( orientA == NORMAL && orientB == NORMAL )\n        gemm::SUMMA_NNA( alpha, A, B, beta, C );\n    else if( orientA == NORMAL )\n        gemm::SUMMA_NTA( orientB, alpha, A, B, beta, C );\n    else if( orientB == NORMAL )\n        gemm::SUMMA_TNA( orientA, alpha, A, B, beta, C );\n    else\n        gemm::SUMMA_TTA( orientA, orientB, alpha, A, B, beta, C );\n    mpi::Barrier( g.Comm() );\n    runTime = mpi::Time() - startTime;\n    realGFlops = 2.*double(m)*double(n)*double(k)/(1.e9*runTime);\n    gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        ostringstream msg;\n        msg << \"C := \" << alpha << \" A B + \" << beta << \" C\";\n        Print( C, msg.str() );\n    }\n\n    // Test the variant of Gemm that keeps B stationary\n    if( g.Rank() == 0 )\n        cout << endl << \"Stationary B Algorithm:\" << endl;\n    MakeUniform( A );\n    MakeUniform( B );\n    MakeUniform( C );\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( B, \"B\" );\n        Print( C, \"C\" );\n    }\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Gemm...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    startTime = mpi::Time();\n    if( orientA == NORMAL && orientB == NORMAL )\n        gemm::SUMMA_NNB( alpha, A, B, beta, C );\n    else if( orientA == NORMAL )\n        gemm::SUMMA_NTB( orientB, alpha, A, B, beta, C );\n    else if( orientB == NORMAL )\n        gemm::SUMMA_TNB( orientA, alpha, A, B, beta, C );\n    else\n        gemm::SUMMA_TTB( orientA, orientB, alpha, A, B, beta, C );\n    mpi::Barrier( g.Comm() );\n    runTime = mpi::Time() - startTime;\n    realGFlops = 2.*double(m)*double(n)*double(k)/(1.e9*runTime);\n    gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl \n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        ostringstream msg;\n        msg << \"C := \" << alpha << \" A B + \" << beta << \" C\";\n        Print( C, msg.str() );\n    }\n\n    // Test the variant of Gemm that keeps C stationary\n    if( g.Rank() == 0 )\n        cout << endl << \"Stationary C Algorithm:\" << endl;\n    MakeUniform( A );\n    MakeUniform( B );\n    MakeUniform( C );\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( B, \"B\" );\n        Print( C, \"C\" );\n    }\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Gemm...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    startTime = mpi::Time();\n    if( orientA == NORMAL && orientB == NORMAL )\n        gemm::SUMMA_NNC( alpha, A, B, beta, C );\n    else if( orientA == NORMAL )\n        gemm::SUMMA_NTC( orientB, alpha, A, B, beta, C );\n    else if( orientB == NORMAL )\n        gemm::SUMMA_TNC( orientA, alpha, A, B, beta, C );\n    else\n        gemm::SUMMA_TTC( orientA, orientB, alpha, A, B, beta, C );\n    mpi::Barrier( g.Comm() );\n    runTime = mpi::Time() - startTime;\n    realGFlops = 2.*double(m)*double(n)*double(k)/(1.e9*runTime);\n    gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        ostringstream msg;\n        msg << \"C := \" << alpha << \" A B + \" << beta << \" C\";\n        Print( C, msg.str() );\n    }\n    \n    if( orientA == NORMAL && orientB == NORMAL )\n    {\n        // Test the variant of Gemm for panel-panel dot products\n        if( g.Rank() == 0 )\n            cout << endl << \"Dot Product Algorithm:\" << endl;\n        MakeUniform( A );\n        MakeUniform( B );\n        MakeUniform( C );\n        if( print )\n        {\n            Print( A, \"A\" );\n            Print( B, \"B\" );\n            Print( C, \"C\" );\n        }\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Starting Gemm...\";\n            cout.flush();\n        }\n        mpi::Barrier( g.Comm() );\n        startTime = mpi::Time();\n        gemm::SUMMA_NNDot( alpha, A, B, beta, C );\n        mpi::Barrier( g.Comm() );\n        runTime = mpi::Time() - startTime;\n        realGFlops = 2.*double(m)*double(n)*double(k)/(1.e9*runTime);\n        gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n        if( g.Rank() == 0 )\n        {\n            cout << \"DONE. \" << endl\n                 << \"  Time = \" << runTime << \" seconds. GFlops = \" \n                 << gFlops << endl;\n        }\n        if( print )\n        {\n            ostringstream msg;\n            msg << \"C := \" << alpha << \" A B + \" << beta << \" C\";\n            Print( C, msg.str() );\n        }\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const char transA = Input(\"--transA\",\"orientation of A: N/T/C\",'N');\n        const char transB = Input(\"--transB\",\"orientation of B: N/T/C\",'N');\n        const Int m = Input(\"--m\",\"height of result\",100);\n        const Int n = Input(\"--n\",\"width of result\",100);\n        const Int k = Input(\"--k\",\"inner dimension\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const Orientation orientA = CharToOrientation( transA );\n        const Orientation orientB = CharToOrientation( transB );\n        SetBlocksize( nb );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Gemm\" << transA << transB << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestGemm<double>( print, orientA, orientB, m, n, k, 3., 4., g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestGemm<Complex<double>>\n        ( print, orientA, orientB, m, n, k, \n          Complex<double>(3), Complex<double>(4), g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Hemm.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HEMM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename T> \nvoid TestHemm\n( bool print, LeftOrRight side, UpperOrLower uplo,\n  Int m, Int n, T alpha, T beta, const Grid& g )\n{\n    DistMatrix<T> A(g), B(g), C(g);\n\n    if( side == LEFT )\n        HermitianUniformSpectrum( A, m, -10, 10 );\n    else\n        HermitianUniformSpectrum( A, n, -10, 10 );\n    Uniform( B, m, n );\n    Uniform( C, m, n );\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( B, \"B\" );\n        Print( C, \"C\" );\n    }\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Parallel Hemm...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Hemm( side, uplo, alpha, A, B, beta, C );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double mD = double(m);\n    const double nD = double(n);\n    const double realGFlops = \n        ( side==LEFT ? 2.*mD*mD*nD : 2.*mD*nD*nD ) / (1.e9*runTime);\n    const double gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        ostringstream msg;\n        if( side == LEFT )\n            msg << \"C := \" << alpha << \" Herm(A) B + \" << beta << \" C\";\n        else\n            msg << \"C := \" << alpha << \" B Herm(A) + \" << beta << \" C\";\n        Print( C, msg.str() );\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char sideChar = Input(\"--side\",\"side to apply from: L/R\",'L');\n        const char uploChar = Input(\"--uplo\",\"lower/upper storage: L/U\",'L');\n        const Int m = Input(\"--m\",\"height of result\",100);\n        const Int n = Input(\"--n\",\"width of result\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const LeftOrRight side = CharToLeftOrRight( sideChar );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Hemm\" << sideChar << uploChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestHemm<double>( print, side, uplo, m, n, 3., 4., g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestHemm<Complex<double>>\n        ( print, side, uplo, m, n, Complex<double>(3), Complex<double>(4), g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Her2k.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HER2K_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename T> \nvoid TestHer2k\n( bool print, UpperOrLower uplo, Orientation orientation,\n  Int m, Int k, T alpha, T beta, const Grid& g )\n{\n    DistMatrix<T> A(g), B(g), C(g);\n\n    if( orientation == NORMAL )\n    {\n        Uniform( A, m, k );\n        Uniform( B, m, k );\n    }\n    else\n    {\n        Uniform( A, k, m );\n        Uniform( B, k, m );\n    }\n    HermitianUniformSpectrum( C, m, 1, 10 );\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( B, \"B\" );\n        Print( C, \"C\" );\n    }\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Her2k...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Her2k( uplo, orientation, alpha, A, B, beta, C );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = 2.*double(m)*double(m)*double(k)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        ostringstream msg;\n        if( orientation == NORMAL )\n            msg << \"C := \" << alpha << \" A B' + B A'\" << beta << \" C\";\n        else\n            msg << \"C := \" << alpha << \" A' B + B' A\" << beta << \" C\";\n        Print( C, msg.str() );\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n    \n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper/lower storage: L/U\",'L');\n        const char transChar = Input(\"--trans\",\"orientation: N/C\",'N');\n        const Int m = Input(\"--m\",\"height of result\",100);\n        const Int k = Input(\"--k\",\"inner dimension\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int nbLocal = Input(\"--nbLocal\",\"local blocksize\",32);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orientation = CharToOrientation( transChar );\n        SetBlocksize( nb );\n        SetLocalTrr2kBlocksize<double>( nbLocal );\n        SetLocalTrr2kBlocksize<Complex<double>>( nbLocal );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Her2k\" << uploChar << transChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestHer2k<double>( print, uplo, orientation, m, k, 3., 4., g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestHer2k<Complex<double>>\n        ( print, uplo, orientation, m, k, \n          Complex<double>(3), Complex<double>(4), g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Herk.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HERK_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename T> \nvoid TestHerk\n( bool print, UpperOrLower uplo, Orientation orientation,\n  Int m, Int k, T alpha, T beta, const Grid& g )\n{\n    DistMatrix<T> A(g), C(g);\n\n    if( orientation == NORMAL )\n        Uniform( A, m, k );\n    else\n        Uniform( A, k, m );\n    HermitianUniformSpectrum( C, m, 1, 10 );\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( C, \"C\" );\n    }\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Herk...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Herk( uplo, orientation, alpha, A, beta, C );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = double(m)*double(m)*double(k)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        ostringstream msg;\n        if( orientation == NORMAL )\n            msg << \"C := \" << alpha << \" A A' + \" << beta << \" C\";\n        else\n            msg << \"C := \" << alpha << \" A' A + \" << beta << \" C\";\n        Print( C, msg.str() );\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper/lower storage: L/U\",'L');\n        const char transChar = Input(\"--trans\",\"orientation: N/C\",'N');\n        const Int m = Input(\"--m\",\"height of result\",100);\n        const Int k = Input(\"--k\",\"inner dimension\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int nbLocal = Input(\"--nbLocal\",\"local blocksize\",32);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orientation = CharToOrientation( transChar );\n        SetBlocksize( nb );\n        SetLocalTrrkBlocksize<double>( nbLocal );\n        SetLocalTrrkBlocksize<Complex<double>>( nbLocal );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Herk\" << uploChar << transChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestHerk<double>( print, uplo, orientation, m, k, 3., 4., g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestHerk<Complex<double>>\n        ( print, uplo, orientation, m, k, \n          Complex<double>(3), Complex<double>(4), g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/MultiShiftQuasiTrsm.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_MULTISHIFTQUASITRSM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F>\nvoid MakeQuasiTriangular( UpperOrLower uplo, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeQuasiTriangular\"))\n    const Int n = A.Height();\n    if( n < 3 )\n        return;\n    if( uplo == LOWER )\n    {\n        MakeTrapezoidal( LOWER, A, 1 );\n        auto dSup = A.GetDiagonal(+1);\n        DistMatrix<F,STAR,STAR> dSup_STAR_STAR( dSup );\n        for( Int j=0; j<n-2; ++j )\n        {\n            const F thisSup = dSup_STAR_STAR.Get(j,  0);\n            const F nextSup = dSup_STAR_STAR.Get(j+1,0);\n            if( thisSup != F(0) && nextSup != F(0) )\n            {\n                A.Set(j+1,j+2,0);\n                dSup_STAR_STAR.Set(j+1,0,0);\n            }\n        }\n    }\n    else\n    {\n        MakeTrapezoidal( UPPER, A, -1 );\n        auto dSub = A.GetDiagonal(-1);\n        DistMatrix<F,STAR,STAR> dSub_STAR_STAR( dSub );\n        for( Int j=0; j<n-2; ++j )\n        {\n            const F thisSub = dSub_STAR_STAR.Get(j,  0);\n            const F nextSub = dSub_STAR_STAR.Get(j+1,0);\n            if( thisSub != F(0) && nextSub != F(0) )\n            {\n                A.Set(j+2,j+1,0);\n                dSub_STAR_STAR.Set(j+1,0,0);\n            }\n        }\n    }\n}\n\ntemplate<typename F> \nvoid TestMultiShiftQuasiTrsm\n( bool print,\n  LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  Int m, Int n, F alpha, const Grid& g )\n{\n    typedef Base<F> Real;\n    DistMatrix<F> H(g), X(g);\n    DistMatrix<F,VR,STAR> shifts(g);\n\n    if( side == LEFT )\n    {\n        HermitianUniformSpectrum( H, m, 1, 10 );\n        Uniform( shifts, m, 1, F(0), Real(0.5) );\n    }\n    else\n    {\n        HermitianUniformSpectrum( H, n, 1, 10 );\n        Uniform( shifts, n, 1, F(0), Real(0.5) );\n    }\n    MakeQuasiTriangular( uplo, H );\n\n    auto modShifts(shifts);\n    if( orientation == ADJOINT )\n        Conjugate( modShifts );\n\n    Uniform( X, m, n );\n    DistMatrix<F> Y(g);\n    Zeros( Y, m, n );\n    if( side == LEFT )\n    {\n        Gemm( orientation, NORMAL, F(1)/alpha, H, X, F(1), Y );\n        for( Int j=0; j<n; ++j )\n        {\n            auto x = LockedView( X, 0, j, m, 1 );\n            auto y =       View( Y, 0, j, m, 1 );\n            Axpy( -modShifts.Get(j,0)/alpha, x, y );\n        }\n    }\n    else\n    {\n        Gemm( NORMAL, orientation, F(1)/alpha, X, H, F(1), Y );\n        for( Int i=0; i<m; ++i )\n        {\n            auto x = LockedView( X, i, 0, 1, n );\n            auto y =       View( Y, i, 0, 1, n );\n            Axpy( -modShifts.Get(i,0)/alpha, x, y );\n        }\n    }\n\n    if( print )\n    {\n        Print( H, \"H\" );\n        Print( shifts, \"shifts\" );\n        Print( X, \"X\" );\n        Print( Y, \"Y\" );\n    }\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting MultiShiftQuasiTrsm...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    MultiShiftQuasiTrsm( side, uplo, orientation, alpha, H, shifts, Y );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = \n        ( side==LEFT ? double(m)*double(m)*double(n)\n                     : double(m)*double(n)*double(n) ) /(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \\n\"\n             << \"  Time = \" << runTime << \" seconds. GFlops ~= \" << gFlops \n             << endl;\n    }\n    if( print )\n        Print( Y, \"Y after solve\" );\n    Axpy( F(-1), X, Y );\n    const auto HFrob = FrobeniusNorm( H );\n    const auto XFrob = FrobeniusNorm( X );\n    const auto EFrob = FrobeniusNorm( Y );\n    if( g.Rank() == 0 )\n    {\n        cout << \"|| H ||_F = \" << HFrob << \"\\n\"\n             << \"|| X ||_F = \" << XFrob << \"\\n\"\n             << \"|| E ||_F = \" << EFrob << \"\\n\" << std::endl;\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char sideChar = Input(\"--side\",\"side to solve from: L/R\",'L');\n        const char uploChar = Input\n            (\"--uplo\",\"lower or upper quasi-triangular: L/U\",'L');\n        const char transChar = Input\n            (\"--trans\",\"orientation of quasi-triangular matrix: N/T/C\",'N');\n        const Int m = Input(\"--m\",\"height of result\",100);\n        const Int n = Input(\"--n\",\"width of result\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const LeftOrRight side = CharToLeftOrRight( sideChar );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orientation = CharToOrientation( transChar );\n        SetBlocksize( nb );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test MultiShiftQuasiTrsm\" \n                 << sideChar << uploChar << transChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestMultiShiftQuasiTrsm<double>\n        ( print, side, uplo, orientation, m, n, 3., g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestMultiShiftQuasiTrsm<Complex<double>>\n        ( print, side, uplo, orientation, m, n, Complex<double>(3), g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/QuasiTrsm.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_GEMM_INC\n#include ELEM_QUASITRSM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F>\nvoid MakeQuasiTriangular( UpperOrLower uplo, DistMatrix<F>& A )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"MakeQuasiTriangular\"))\n    const Int n = A.Height();\n    if( uplo == LOWER )\n    {\n        MakeTrapezoidal( LOWER, A, 1 );\n        auto dSup = A.GetDiagonal(+1);\n        DistMatrix<F,STAR,STAR> dSup_STAR_STAR( dSup );\n        for( Int j=0; j<n-2; ++j )\n        {\n            const F thisSup = dSup_STAR_STAR.Get(j,  0);\n            const F nextSup = dSup_STAR_STAR.Get(j+1,0);\n            if( thisSup != F(0) && nextSup != F(0) )\n            {\n                A.Set(j+1,j+2,0);\n                dSup_STAR_STAR.Set(j+1,0,0);\n            }\n        }\n    }\n    else\n    {\n        MakeTrapezoidal( UPPER, A, -1 );\n        auto dSub = A.GetDiagonal(-1);\n        DistMatrix<F,STAR,STAR> dSub_STAR_STAR( dSub );\n        for( Int j=0; j<n-2; ++j )\n        {\n            const F thisSub = dSub_STAR_STAR.Get(j,  0);\n            const F nextSub = dSub_STAR_STAR.Get(j+1,0);\n            if( thisSub != F(0) && nextSub != F(0) )\n            {\n                A.Set(j+2,j+1,0);\n                dSub_STAR_STAR.Set(j+1,0,0);\n            }\n        }\n    }\n}\n\ntemplate<typename F> \nvoid TestQuasiTrsm\n( bool print,\n  LeftOrRight side, UpperOrLower uplo, Orientation orientation, \n  Int m, Int n, F alpha, const Grid& g )\n{\n    DistMatrix<F> H(g), X(g);\n\n    if( side == LEFT )\n        HermitianUniformSpectrum( H, m, 1, 10 );\n    else\n        HermitianUniformSpectrum( H, n, 1, 10 );\n    MakeQuasiTriangular( uplo, H );\n\n    Uniform( X, m, n );\n    DistMatrix<F> Y(g);\n    if( side == LEFT )\n        Gemm( orientation, NORMAL, F(1)/alpha, H, X, Y );\n    else\n        Gemm( NORMAL, orientation, F(1)/alpha, X, H, Y );\n\n    if( print )\n    {\n        Print( H, \"H\" );\n        Print( X, \"X\" );\n        Print( Y, \"Y\" );\n    }\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting QuasiTrsm...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    QuasiTrsm( side, uplo, orientation, alpha, H, Y );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = \n        ( side==LEFT ? double(m)*double(m)*double(n)\n                     : double(m)*double(n)*double(n) ) /(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \\n\"\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" << gFlops \n             << endl;\n    }\n    if( print )\n        Print( Y, \"Y after solve\" );\n    Axpy( F(-1), X, Y );\n    const auto HFrob = FrobeniusNorm( H );\n    const auto XFrob = FrobeniusNorm( X );\n    const auto EFrob = FrobeniusNorm( Y );\n    if( g.Rank() == 0 )\n    {\n        cout << \"|| H ||_F = \" << HFrob << \"\\n\"\n             << \"|| X ||_F = \" << XFrob << \"\\n\"\n             << \"|| E ||_F = \" << EFrob << \"\\n\" << std::endl;\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char sideChar = Input(\"--side\",\"side to solve from: L/R\",'L');\n        const char uploChar = Input\n            (\"--uplo\",\"lower or upper quasi-triangular: L/U\",'L');\n        const char transChar = Input\n            (\"--trans\",\"orientation of quasi-triangular matrix: N/T/C\",'N');\n        const Int m = Input(\"--m\",\"height of result\",100);\n        const Int n = Input(\"--n\",\"width of result\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const LeftOrRight side = CharToLeftOrRight( sideChar );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orientation = CharToOrientation( transChar );\n        SetBlocksize( nb );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test QuasiTrsm\" \n                 << sideChar << uploChar << transChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestQuasiTrsm<double>( print, side, uplo, orientation, m, n, 3., g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestQuasiTrsm<Complex<double>>\n        ( print, side, uplo, orientation, m, n, Complex<double>(3), g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/README.md",
    "content": "### `tests/blas-like`\n\nThis folder contains correctness tests of a few of Elemental's BLAS-like \nroutines. More details will hopefully follow soon.\n\n-  `Gemm.cpp`\n-  `Hemm.cpp`\n-  `Her2k.cpp`\n-  `Herk.cpp`\n-  `Symm.cpp`\n-  `Symv.cpp`\n-  `Syr2k.cpp`\n-  `Syrk.cpp`\n-  `Trmm.cpp`\n-  `Trsm.cpp`\n-  `Trsv.cpp`\n-  `TwoSidedTrmm.cpp`\n-  `TwoSidedTrsm.cpp`\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Symm.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_SYMM_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename T>\nvoid TestSymm\n( const LeftOrRight side, const UpperOrLower uplo,\n  const Int m, const Int n, const T alpha, const T beta,\n  const bool print, const Grid& g )\n{\n    DistMatrix<T> A(g), B(g), C(g);\n\n    if( side == LEFT )\n        Uniform( A, m, m );\n    else\n        Uniform( A, n, n );\n    Uniform( B, m, n );\n    Uniform( C, m, n );\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( B, \"B\" );\n        Print( C, \"C\" );\n    }\n\n    // Test Symm\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Parallel Symm...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Symm( side, uplo, alpha, A, B, beta, C );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double mD = double(m);\n    const double nD = double(n);\n    const double realGFlops = \n        ( side==LEFT ? 2.*mD*mD*nD : 2.*mD*nD*nD ) / (1.e9*runTime);\n    const double gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        ostringstream msg;\n        if( side == LEFT )\n            msg << \"C := \" << alpha << \" Symm(A) B + \" << beta << \" C\";\n        else\n            msg << \"C := \" << alpha << \" B Symm(A) + \" << beta << \" C\";\n        Print( C, msg.str() );\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char sideChar = Input(\"--side\",\"side to apply from: L/R\",'L');\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const Int m = Input(\"--m\",\"height of result\",100);\n        const Int n = Input(\"--n\",\"width of result\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const LeftOrRight side = CharToLeftOrRight( sideChar );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Symm\" << sideChar << uploChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestSymm<double>( side, uplo, m, n, 3., 4., print, g ); \n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestSymm<Complex<double>>\n        ( side, uplo, m, n, Complex<double>(3), Complex<double>(4), print, g ); \n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Symv.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_SYMV_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename T> \nvoid TestSymv\n( const UpperOrLower uplo, const Int m, const T alpha, const T beta, \n  const bool print, const Grid& g )\n{\n    DistMatrix<T> A(g), x(g), y(g);\n\n    Uniform( A, m, m );\n    Uniform( x, m, 1 );\n    Uniform( y, m, 1 ); \n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( x, \"x\" );\n        Print( y, \"y\" );\n    }\n\n    // Test Symm\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Parallel Symv...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Symv( uplo, alpha, A, x, beta, y );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = 2.*double(m)*double(m)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        ostringstream msg;\n        msg << \"y := \" << alpha << \" Symm(A) x + \" << beta << \" y\";\n        Print( y, msg.str() );\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const Int m = Input(\"--m\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int nbLocalDouble = Input\n            (\"--nbLocalDouble\",\"local blocksize for real doubles\",32);\n        const Int nbLocalComplexDouble = Input\n            (\"--nbLocalComplexDouble\",\"local blocksize for complex doubles\",32);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n        SetLocalSymvBlocksize<double>( nbLocalDouble );\n        SetLocalSymvBlocksize<Complex<double>>( nbLocalComplexDouble );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Symv\" << uploChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestSymv<double>( uplo, m, 3., 4., print, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestSymv<Complex<double>>\n        ( uplo, m, Complex<double>(3), Complex<double>(4), print, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Syr2k.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SYR2K_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename T>\nvoid TestSyr2k\n( bool print, UpperOrLower uplo, Orientation orientation,\n  Int m, Int k, T alpha, T beta, const Grid& g )\n{\n    DistMatrix<T> A(g), B(g), C(g);\n\n    if( orientation == NORMAL )\n    {\n        Uniform( A, m, k );\n        Uniform( B, m, k );\n    }\n    else\n    {\n        Uniform( A, k, m );\n        Uniform( B, k, m );\n    }\n    Uniform( C, m, m );\n    MakeTriangular( uplo, C );\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( B, \"B\" );\n        Print( C, \"C\" );\n    }\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Syr2k...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Syr2k( uplo, orientation, alpha, A, B, beta, C );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = 2.*double(m)*double(m)*double(k)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        ostringstream msg;\n        if( orientation == NORMAL )\n            msg << \"C := \" << alpha << \" A B' + B A'\" << beta << \" C\";\n        else\n            msg << \"C := \" << alpha << \" A' B + B' A\" << beta << \" C\";\n        Print( C, msg.str() );\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const char transChar = Input\n            (\"--trans\",\"orientation of update: N/T\",'N');\n        const Int m = Input(\"--m\",\"height of result\",100);\n        const Int k = Input(\"--k\",\"inner dimension\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int nbLocal = Input(\"--nbLocal\",\"local blocksize\",32);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orientation = CharToOrientation( transChar );\n        SetBlocksize( nb );\n        SetLocalTrr2kBlocksize<double>( nbLocal );\n        SetLocalTrr2kBlocksize<Complex<double>>( nbLocal );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Syr2k\" << uploChar << transChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestSyr2k<double>( print, uplo, orientation, m, k, 3., 4., g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestSyr2k<Complex<double>>\n        ( print, uplo, orientation, m, k, \n          Complex<double>(3), Complex<double>(4), g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Syrk.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_SYRK_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename T> \nvoid TestSyrk\n( bool print, UpperOrLower uplo, Orientation orientation,\n  Int m, Int k, T alpha, T beta, const Grid& g )\n{\n    DistMatrix<T> A(g), C(g);\n\n    if( orientation == NORMAL )\n        Uniform( A, m, k );\n    else\n        Uniform( A, k, m );\n    Uniform( C, m, m );\n    MakeTriangular( uplo, C );\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( C, \"C\" );\n    }\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Syrk...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Syrk( uplo, orientation, alpha, A, beta, C );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = double(m)*double(m)*double(k)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        ostringstream msg;\n        if( orientation == NORMAL )\n            msg << \"C := \" << alpha << \" A A' + \" << beta << \" C\";\n        else\n            msg << \"C := \" << alpha << \" A' A + \" << beta << \" C\";\n        Print( C, msg.str() );\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const char transChar = Input\n            (\"--trans\",\"orientation of update: N/T\",'N');\n        const Int m = Input(\"--m\",\"size of result\",100);\n        const Int k = Input(\"--k\",\"inner dimension\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int nbLocal = Input(\"--nbLocal\",\"local blocksize\",32);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orientation = CharToOrientation( transChar );\n        SetBlocksize( nb );\n        SetLocalTrrkBlocksize<double>( nbLocal );\n        SetLocalTrrkBlocksize<Complex<double>>( nbLocal );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Syrk\" << uploChar << transChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestSyrk<double>( print, uplo, orientation, m, k, 3., 4., g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestSyrk<Complex<double>>\n        ( print, uplo, orientation, m, k,\n          Complex<double>(3), Complex<double>(4), g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Trmm.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMM_INC\n#include ELEM_TRMM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename T>\nvoid TestTrmm\n( bool print, LeftOrRight side, UpperOrLower uplo, \n  Orientation orientation, UnitOrNonUnit diag,\n  Int m, Int n, T alpha, const Grid& g )\n{\n    DistMatrix<T> A(g), X(g);\n\n    if( side == LEFT )\n        Uniform( A, m, m );\n    else\n        Uniform( A, n, n );\n    Uniform( X, m, n );\n    auto XCopy( X );\n    \n    // Form an explicit triangular copy to apply with Gemm\n    auto S( A );\n    MakeTriangular( uplo, S );\n\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( S, \"S\" );\n        Print( X, \"X\" );\n    }\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Trmm...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Trmm( side, uplo, orientation, diag, alpha, A, X );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = \n        ( side==LEFT ? double(m)*double(m)*double(n)\n                     : double(m)*double(n)*double(n) ) /(1.e9*runTime);\n    const double gFlops = ( IsComplex<T>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE.\\n\"\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n        Print( X, \"X after multiply\" );\n    if( side == LEFT )\n        Gemm( orientation, NORMAL, -alpha, S, XCopy, T(1), X );\n    else\n        Gemm( NORMAL, orientation, -alpha, XCopy, S, T(1), X );\n    const auto XFrob = FrobeniusNorm( XCopy );\n    const auto SFrob = FrobeniusNorm( S );\n    const auto EFrob = FrobeniusNorm( X );\n    if( print )\n        Print( X, \"error relative to Gemm\" );\n    if( g.Rank() == 0 )\n    {\n        cout << \"|| X ||_F = \" << XFrob << \"\\n\"\n             << \"|| S ||_F = \" << SFrob << \"\\n\"\n             << \"|| E ||_F = \" << EFrob << \"\\n\" << std::endl;\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char sideChar = Input(\"--side\",\"side to apply from: L/R\",'L');\n        const char uploChar = Input(\"--uplo\",\"lower or upper storage: L/U\",'L');\n        const char transChar = Input\n            (\"--trans\",\"orientation of matrix: N/T/C\",'N');\n        const char diagChar = Input(\"--diag\",\"(non-)unit diagonal: N/U\",'N');\n        const Int m = Input(\"--m\",\"height of result\",100);\n        const Int n = Input(\"--n\",\"width of result\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const LeftOrRight side = CharToLeftOrRight( sideChar );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orientation = CharToOrientation( transChar );\n        const UnitOrNonUnit diag = CharToUnitOrNonUnit( diagChar );\n        SetBlocksize( nb );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Trmm\" \n                << sideChar << uploChar << transChar << diagChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestTrmm<double>( print, side, uplo, orientation, diag, m, n, 3., g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestTrmm<Complex<double>>\n        ( print, side, uplo, orientation, diag, m, n, Complex<double>(3), g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Trsm.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMM_INC\n#include ELEM_TRSM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestTrsm\n( bool print,\n  LeftOrRight side, UpperOrLower uplo, \n  Orientation orientation, UnitOrNonUnit diag,\n  Int m, Int n, F alpha, const Grid& g )\n{\n    DistMatrix<F> A(g), X(g);\n\n    if( side == LEFT )\n        HermitianUniformSpectrum( A, m, 1, 10 );\n    else\n        HermitianUniformSpectrum( A, n, 1, 10 );\n    auto S( A );\n    MakeTriangular( uplo, S );\n\n    Uniform( X, m, n );\n    DistMatrix<F> Y(g);\n    Gemm( NORMAL, NORMAL, F(1)/alpha, S, X, Y );\n\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( S, \"S\" );\n        Print( X, \"X\" );\n        Print( Y, \"Y\" );\n    }\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Trsm...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Trsm( side, uplo, orientation, diag, alpha, A, Y );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = \n        ( side==LEFT ? double(m)*double(m)*double(n)\n                     : double(m)*double(n)*double(n) ) /(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \\n\"\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" << gFlops \n             << endl;\n    }\n    if( print )\n        Print( Y, \"Y after solve\" );\n    Axpy( F(-1), X, Y );\n    const auto SFrob = FrobeniusNorm( S );\n    const auto XFrob = FrobeniusNorm( X );\n    const auto EFrob = FrobeniusNorm( Y );\n    if( g.Rank() == 0 )\n    {\n        cout << \"|| S ||_F = \" << SFrob << \"\\n\"\n             << \"|| X ||_F = \" << XFrob << \"\\n\"\n             << \"|| E ||_F = \" << EFrob << \"\\n\" << std::endl;\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char sideChar = Input(\"--side\",\"side to solve from: L/R\",'L');\n        const char uploChar = Input\n            (\"--uplo\",\"lower or upper triangular: L/U\",'L');\n        const char transChar = Input\n            (\"--trans\",\"orientation of triangular matrix: N/T/C\",'N');\n        const char diagChar = Input(\"--diag\",\"(non-)unit diagonal: N/U\",'N');\n        const Int m = Input(\"--m\",\"height of result\",100);\n        const Int n = Input(\"--n\",\"width of result\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const LeftOrRight side = CharToLeftOrRight( sideChar );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orientation = CharToOrientation( transChar );\n        const UnitOrNonUnit diag = CharToUnitOrNonUnit( diagChar );\n        SetBlocksize( nb );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Trsm\" \n                 << sideChar << uploChar << transChar << diagChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestTrsm<double>( print, side, uplo, orientation, diag, m, n, 3., g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestTrsm<Complex<double>>\n        ( print, side, uplo, orientation, diag, m, n, Complex<double>(3), g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/Trsv.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_TRSV_INC\n#include ELEM_TRMM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestTrsv\n( bool print, UpperOrLower uplo, Orientation orientation, UnitOrNonUnit diag,\n  Int n, const Grid& g )\n{\n    typedef Base<F> Real;\n    DistMatrix<F> A(g), x(g), y(g);\n\n    // Generate random A and x\n    HermitianUniformSpectrum( A, n, 1, 10 );\n    Uniform( x, n, 1 );\n    // Either y := op(L) x or y := op(U) x\n    y = x;\n    Trmm( LEFT, uplo, orientation, diag, F(1), A, y );\n\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( x, \"x\" );\n        Print( y, \"y\" );\n    }\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Trsv...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Trsv( uplo, orientation, diag, A, y );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = Pow(double(n),2.)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n        Print( y, \"y after solve\" );\n\n    Axpy( F(-1), x, y );\n    const Real xNorm = FrobeniusNorm( x );\n    const Real yNorm = FrobeniusNorm( y );\n    if( g.Rank() == 0 )\n    {\n        std::cout << \"|| x - y ||_2 = \" << yNorm << \"\\n\"\n                  << \"|| x ||_2     = \" << xNorm << \"\\n\"\n                  << \"|| x - y ||_2 / || x ||_2 = \" << yNorm/xNorm << \"\\n\"\n                  << std::endl;\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input\n            (\"--uplo\",\"upper or lower triangular: L/U\",'L');\n        const char transChar = Input\n            (\"--trans\",\"orientation of triangular matrix: N/T/C\",'N');\n        const char diagChar = Input(\"--diag\",\"(non-)unit diagonal: N/U\",'N');\n        const Int n = Input(\"--n\",\"size of triangular matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orientation = CharToOrientation( transChar );\n        const UnitOrNonUnit diag = CharToUnitOrNonUnit( diagChar );\n        SetBlocksize( nb );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Trsv\" << uploChar << transChar << diagChar \n                 << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestTrsv<double>( print, uplo, orientation, diag, n, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestTrsv<Complex<double>>( print, uplo, orientation, diag, n, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/TwoSidedTrmm.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HEMM_INC\n#include ELEM_TRMM_INC\n#include ELEM_TWOSIDEDTRMM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( bool print, UpperOrLower uplo, UnitOrNonUnit diag,\n  const DistMatrix<F>& A, const DistMatrix<F>& B, const DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = AOrig.Height();\n\n    const Int k=100;\n    DistMatrix<F> X(g), Y(g), Z(g);\n    Uniform( X, m, k );\n    Y = X;\n    Zeros( Z, m, k );\n\n    if( uplo == LOWER )\n    {\n        // Test correctness by comparing the application of A against a \n        // random set of k vectors to the application of \n        // tril(B)^H AOrig tril(B)\n        Trmm( LEFT, LOWER, NORMAL, diag, F(1), B, Y );\n        Hemm( LEFT, LOWER, F(1), AOrig, Y, F(0), Z );\n        Trmm( LEFT, LOWER, ADJOINT, diag, F(1), B, Z );\n        Hemm( LEFT, LOWER, F(-1), A, X, F(1), Z );\n        Real infNormOfAOrig = HermitianInfinityNorm( uplo, AOrig );\n        Real frobNormOfAOrig = HermitianFrobeniusNorm( uplo, AOrig );\n        Real infNormOfA = HermitianInfinityNorm( uplo, A );\n        Real frobNormOfA = HermitianFrobeniusNorm( uplo, A );\n        Real oneNormOfError = OneNorm( Z );\n        Real infNormOfError = InfinityNorm( Z );\n        Real frobNormOfError = FrobeniusNorm( Z );\n        if( g.Rank() == 0 )\n        {\n            cout << \"||AOrig||_1 = ||AOrig||_oo     = \"\n                 << infNormOfAOrig << \"\\n\"\n                 << \"||AOrig||_F                    = \"\n                 << frobNormOfAOrig << \"\\n\"\n                 << \"||A||_1 = ||A||_oo             = \"\n                 << infNormOfA << \"\\n\"\n                 << \"||A||_F                        = \"\n                 << frobNormOfA << \"\\n\"\n                 << \"||A X - L^H AOrig L X||_1  = \"\n                 << oneNormOfError << \"\\n\"\n                 << \"||A X - L^H AOrig L X||_oo = \" \n                 << infNormOfError << \"\\n\"\n                 << \"||A X - L^H AOrig L X||_F  = \"\n                 << frobNormOfError << endl;\n        }\n    }\n    else\n    {\n        // Test correctness by comparing the application of A against a \n        // random set of k vectors to the application of \n        // triu(B) AOrig triu(B)^H\n        Trmm( LEFT, UPPER, ADJOINT, diag, F(1), B, Y );\n        Hemm( LEFT, UPPER, F(1), AOrig, Y, F(0), Z );\n        Trmm( LEFT, UPPER, NORMAL, diag, F(1), B, Z );\n        Hemm( LEFT, UPPER, F(-1), A, X, F(1), Z );\n        Real infNormOfAOrig = HermitianInfinityNorm( uplo, AOrig );\n        Real frobNormOfAOrig = HermitianFrobeniusNorm( uplo, AOrig );\n        Real infNormOfA = HermitianInfinityNorm( uplo, A );\n        Real frobNormOfA = HermitianFrobeniusNorm( uplo, A );\n        Real oneNormOfError = OneNorm( Z );\n        Real infNormOfError = InfinityNorm( Z );\n        Real frobNormOfError = FrobeniusNorm( Z );\n        if( g.Rank() == 0 )\n        {\n            cout << \"||AOrig||_1 = ||AOrig||_oo     = \"\n                 << infNormOfAOrig << \"\\n\"\n                 << \"||AOrig||_F                    = \"\n                 << frobNormOfAOrig << \"\\n\"\n                 << \"||A||_1 = ||A||_oo             = \"\n                 << infNormOfA << \"\\n\"\n                 << \"||A||_F                        = \"\n                 << frobNormOfA << \"\\n\"\n                 << \"||A X - U AOrig U^H X||_1  = \"\n                 << oneNormOfError << \"\\n\"\n                 << \"||A X - U AOrig U^H X||_oo = \" \n                 << infNormOfError << \"\\n\"\n                 << \"||A X - U AOrig U^H X||_F  = \"\n                 << frobNormOfError << endl;\n        }\n    }\n}\n\ntemplate<typename F> \nvoid TestTwoSidedTrmm\n( bool testCorrectness, bool print, UpperOrLower uplo, UnitOrNonUnit diag, \n  Int m, const Grid& g )\n{\n    DistMatrix<F> A(g), B(g), AOrig(g);\n\n    Zeros( A, m, m );\n    Zeros( B, m, m );\n    MakeHermitianUniformSpectrum( A, 1, 10 );\n    MakeHermitianUniformSpectrum( B, 1, 10 );\n    MakeTriangular( uplo, B );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( B, \"B\" );\n    }\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting reduction to Hermitian standard EVP...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    TwoSidedTrmm( uplo, diag, A, B );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    double gFlops = Pow(double(m),3.)/(runTime*1.e9);\n    if( IsComplex<F>::val )\n        gFlops *= 4.;\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \"\n             << gFlops << endl;\n    }\n    if( print )\n        Print( A, \"A after reduction\" );\n    if( testCorrectness )\n        TestCorrectness( print, uplo, diag, A, B, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input\n            (\"--uplo\",\"lower or upper triangular storage: L/U\",'L');\n        const char diagChar = Input(\"--unit\",\"(non-)unit diagonal: N/U\",'N');\n        const Int m = Input(\"--m\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const UnitOrNonUnit diag = CharToUnitOrNonUnit( diagChar );\n        SetBlocksize( nb );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test TwoSidedTrmm\" << uploChar << diagChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestTwoSidedTrmm<double>( testCorrectness, print, uplo, diag, m, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestTwoSidedTrmm<Complex<double>>\n        ( testCorrectness, print, uplo, diag, m, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/blas-like/TwoSidedTrsm.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HEMM_INC\n#include ELEM_TRSM_INC\n#include ELEM_TWOSIDEDTRSM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( bool print, UpperOrLower uplo, UnitOrNonUnit diag,\n  const DistMatrix<F>& A, const DistMatrix<F>& B, const DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = AOrig.Height();\n\n    const Int k=100;\n    DistMatrix<F> X(g), Y(g), Z(g);\n    Uniform( X, m, k );\n    Y = X;\n    Zeros( Z, m, k );\n\n    if( uplo == LOWER )\n    {\n        // Test correctness by comparing the application of A against a \n        // random set of k vectors to the application of \n        // tril(B)^-1 AOrig tril(B)^-H\n        Trsm( LEFT, LOWER, ADJOINT, diag, F(1), B, Y );\n        Hemm( LEFT, LOWER, F(1), AOrig, Y, F(0), Z );\n        Trsm( LEFT, LOWER, NORMAL, diag, F(1), B, Z );\n        Hemm( LEFT, LOWER, F(-1), A, X, F(1), Z );\n        Real infNormOfAOrig = HermitianInfinityNorm( uplo, AOrig );\n        Real frobNormOfAOrig = HermitianFrobeniusNorm( uplo, AOrig );\n        Real infNormOfA = HermitianInfinityNorm( uplo, A );\n        Real frobNormOfA = HermitianFrobeniusNorm( uplo, A );\n        Real oneNormOfError = OneNorm( Z );\n        Real infNormOfError = InfinityNorm( Z );\n        Real frobNormOfError = FrobeniusNorm( Z );\n        if( g.Rank() == 0 )\n        {\n            cout << \"||AOrig||_1 = ||AOrig||_oo     = \"\n                 << infNormOfAOrig << \"\\n\"\n                 << \"||AOrig||_F                    = \"\n                 << frobNormOfAOrig << \"\\n\"\n                 << \"||A||_1 = ||A||_oo             = \"\n                 << infNormOfA << \"\\n\"\n                 << \"||A||_F                        = \"\n                 << frobNormOfA << \"\\n\"\n                 << \"||A X - L^-1 AOrig L^-H X||_1  = \"\n                 << oneNormOfError << \"\\n\"\n                 << \"||A X - L^-1 AOrig L^-H X||_oo = \" \n                 << infNormOfError << \"\\n\"\n                 << \"||A X - L^-1 AOrig L^-H X||_F  = \"\n                 << frobNormOfError << endl;\n        }\n    }\n    else\n    {\n        // Test correctness by comparing the application of A against a \n        // random set of k vectors to the application of \n        // triu(B)^-H AOrig triu(B)^-1\n        Trsm( LEFT, UPPER, NORMAL, diag, F(1), B, Y );\n        Hemm( LEFT, UPPER, F(1), AOrig, Y, F(0), Z );\n        Trsm( LEFT, UPPER, ADJOINT, diag, F(1), B, Z );\n        Hemm( LEFT, UPPER, F(-1), A, X, F(1), Z );\n        Real infNormOfAOrig = HermitianInfinityNorm( uplo, AOrig );\n        Real frobNormOfAOrig = HermitianFrobeniusNorm( uplo, AOrig );\n        Real infNormOfA = HermitianInfinityNorm( uplo, A );\n        Real frobNormOfA = HermitianFrobeniusNorm( uplo, A );\n        Real oneNormOfError = OneNorm( Z );\n        Real infNormOfError = InfinityNorm( Z );\n        Real frobNormOfError = FrobeniusNorm( Z );\n        if( g.Rank() == 0 )\n        {\n            cout << \"||AOrig||_1 = ||AOrig||_oo     = \"\n                 << infNormOfAOrig << \"\\n\"\n                 << \"||AOrig||_F                    = \"\n                 << frobNormOfAOrig << \"\\n\"\n                 << \"||A||_1 = ||A||_oo             = \"\n                 << infNormOfA << \"\\n\"\n                 << \"||A||_F                        = \"\n                 << frobNormOfA << \"\\n\"\n                 << \"||A X - U^-H AOrig U^-1 X||_1  = \"\n                 << oneNormOfError << \"\\n\"\n                 << \"||A X - U^-H AOrig U^-1 X||_oo = \" \n                 << infNormOfError << \"\\n\"\n                 << \"||A X - U^-H AOrig U^-1 X||_F  = \"\n                 << frobNormOfError << endl;\n        }\n    }\n}\n\ntemplate<typename F> \nvoid TestTwoSidedTrsm\n( bool testCorrectness, bool print, UpperOrLower uplo, UnitOrNonUnit diag,\n  Int m, const Grid& g )\n{\n    DistMatrix<F> A(g), B(g), AOrig(g);\n\n    Zeros( A, m, m );\n    Zeros( B, m, m );\n    MakeHermitianUniformSpectrum( A, 1, 10 );\n    MakeHermitianUniformSpectrum( B, 1, 10 );\n    MakeTriangular( uplo, B );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( B, \"B\" );\n    }\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting reduction to Hermitian standard EVP...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    TwoSidedTrsm( uplo, diag, A, B );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    double gFlops = Pow(double(m),3.)/(runTime*1.e9);\n    if( IsComplex<F>::val )\n        gFlops *= 4.;\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \"\n             << gFlops << endl;\n    }\n    if( print )\n        Print( A, \"A after reduction\" );\n    if( testCorrectness )\n        TestCorrectness( print, uplo, diag, A, B, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--r\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input\n            (\"--uplo\",\"lower or upper triangular storage: L/U\",'L');\n        const char diagChar = Input(\"--unit\",\"(non-)unit diagonal: N/U\",'N');\n        const Int m = Input(\"--m\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const UnitOrNonUnit diag = CharToUnitOrNonUnit( diagChar );\n        SetBlocksize( nb );\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test TwoSidedTrsm\" << uploChar << diagChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestTwoSidedTrsm<double>( testCorrectness, print, uplo, diag, m, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestTwoSidedTrsm<Complex<double>>\n        ( testCorrectness, print, uplo, diag, m, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/convex/README.md",
    "content": "### `tests/convex`\n\nThis folder stores the correctness tests for Elemental's functionality meant\nto support convex optimization. It currently only contains the following test:\n\n-  `TSSVT.cpp`: A test for Tall-Skinny Singular Value soft-Thresholding\n"
  },
  {
    "path": "src/madness/external/elemental/tests/convex/TSSVT.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_SVT_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( const DistMatrix<F,VC,  STAR>& A,\n        DistMatrix<F,VC,  STAR>& B, Base<F> tau )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n\n    DistMatrix<F> BNormal( A );\n    SVT( BNormal, tau );\n    Axpy( F(-1), B, BNormal );\n    const Real AFrob = FrobeniusNorm( A );\n    const Real BFrob = FrobeniusNorm( B );\n    const Real errorFrob = FrobeniusNorm( BNormal );\n    if( g.Rank() == 0 )\n        cout << \"  || A ||_F = \" << AFrob << \"\\n\"\n             << \"  || B ||_F = \" << BFrob << \"\\n\"\n             << \"  || E ||_F = \" << errorFrob << \"\\n\"\n             << endl;\n}\n\ntemplate<typename F>\nvoid TestSVT\n( bool testCorrectness, bool print,\n  Int m, Int n, const Grid& g, Base<F> tau )\n{\n    DistMatrix<F,VC,STAR> A(g), B(g);\n    Uniform( A, m, n );\n    if( print )\n        Print( A, \"A\" );\n    B = A;\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting TS-SVT factorization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    SVT( B, tau );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. Time = \" << runTime << \" seconds.\" << endl;\n    }\n    if( print )\n        Print( B, \"B\" );\n    if( testCorrectness )\n        TestCorrectness( A, B, tau );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    try\n    {\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const double tau = Input(\"--tau\",\"soft-threshold parameter\",0.5);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, order );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test TSQR\" << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestSVT<double>( testCorrectness, print, m, n, g, tau );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestSVT<double>( testCorrectness, print, m, n, g, tau );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/core/AxpyInterface.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   Copyright (c) 2011, The University of Texas at Austin\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_ZEROS_INC\nusing namespace elem;\n\nint\nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try \n    {\n        const Int m = 3*commSize;\n        const Int n = 2*commSize;\n\n        Grid g( comm );\n\n        for( Int k=0; k<50; ++k )\n        {\n            if( commRank == 0 )\n                std::cout << \"Iteration \" << k << std::endl;\n\n            DistMatrix<double> A(g);\n            Zeros( A, m, n );\n\n            AxpyInterface<double> interface;\n            interface.Attach( LOCAL_TO_GLOBAL, A );\n            Matrix<double> X( commSize, 1 );\n            for( Int j=0; j<X.Width(); ++j )\n                for( Int i=0; i<commSize; ++i )\n                    X.Set(i,j,commRank+1);\n            for( Int i=0; i<5; ++i )\n            {\n                interface.Axpy( 2, X, 2*commRank, commRank );\n                interface.Axpy( 2, X, 2*commRank, commRank+1 );\n            }\n            interface.Detach();\n\n            Print( A, \"A\" );\n\n            interface.Attach( GLOBAL_TO_LOCAL, A );\n            Matrix<double> Y;\n            if( commRank == 0 )\n            {\n                Zeros( Y, m, n );\n                interface.Axpy( 1.0, Y, 0, 0 );\n            }\n            interface.Detach();\n\n            if( commRank == 0 )\n                Print( Y, \"Copy of global matrix on root process:\" );\n\n            // TODO: Check to ensure that the result is correct\n        }\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/core/BasicBlockDistMatrix.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_SCALE_INC\n#include ELEM_SCHUR_INC\n#include ELEM_IO_INC\n#include ELEM_ONES_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commSize = mpi::Size( comm );\n    const Int commRank = mpi::Rank( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int mb = Input(\"--blockHeight\",\"height of dist block\",32);\n        const Int nb = Input(\"--blockWidth\",\"width of dist block\",32);\n        const bool print = Input(\"--print\",\"print wrong matrices?\",false);\n#ifdef ELEM_HAVE_SCALAPACK\n        const bool fullTriangle = Input(\"--fullTriangle\",\"full Schur?\",true);\n#endif\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n\n        BlockDistMatrix<Complex<double>> A(m,n,g,mb,nb);\n        MakeOnes( A );\n        Scale( double(commRank), A.Matrix() );\n        if( print )\n            Print( A, \"A\" );\n        DistMatrix<Complex<double>> AElem( A );\n        Scale( 2., AElem );\n        if( print )\n            Print( AElem, \"A := 2 A\" );\n        A = AElem;\n        if( print )\n            Print( A, \"A\" );\n#ifdef ELEM_HAVE_SCALAPACK        \n        if( m == n )\n        {\n            // NOTE: There appears to be a bug in the parallel eigenvalue\n            //       reordering in P{S,D}HSEQR (within P{S,D}TRORD).\n            //       This driver was therefore switched to complex arithmetic.\n            DistMatrix<Complex<double>,VR,STAR> w( m, 1, g );\n            BlockDistMatrix<Complex<double>> Q(m,m,g,mb,nb);\n            schur::QR( A, w, Q, fullTriangle );\n            if( print )\n            {\n                Print( A, \"Schur(A)\" );\n                Print( w, \"w(A)\" );\n                Print( Q, \"Q\" );\n            }\n        }\n#endif\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/core/BlockDistMatrix.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_IO_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\ntemplate<typename T,Dist AColDist,Dist ARowDist,Dist BColDist,Dist BRowDist>\nvoid\nCheck( BlockDistMatrix<T,AColDist,ARowDist>& A, \n       BlockDistMatrix<T,BColDist,BRowDist>& B, bool print )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Check\"))\n    const Grid& g = A.Grid();\n\n    const Int commRank = g.Rank();\n    const Int height = B.Height();\n    const Int width = B.Width();\n    const Int mb = B.BlockHeight();\n    const Int nb = B.BlockWidth();\n    const Int colCut = B.ColCut();\n    const Int rowCut = B.RowCut();\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(g,mb,nb);\n    BlockDistMatrix<T,STAR,STAR> B_STAR_STAR(g,mb,nb);\n\n    if( commRank == 0 )\n    {\n        std::cout << \"Testing [\" << DistToString(AColDist) << \",\"\n                                 << DistToString(ARowDist) << \"]\"\n                  << \" <- [\"     << DistToString(BColDist) << \",\"\n                                 << DistToString(BRowDist) << \"]...\";\n        std::cout.flush();\n    }\n    Int colAlign = SampleUniform<Int>(0,A.ColStride());\n    Int rowAlign = SampleUniform<Int>(0,A.RowStride());\n    mpi::Broadcast( colAlign, 0, mpi::COMM_WORLD );\n    mpi::Broadcast( rowAlign, 0, mpi::COMM_WORLD );\n    A.Align( mb, nb, colAlign, rowAlign, colCut, rowCut );\n    A = B;\n\n    A_STAR_STAR = A;\n    B_STAR_STAR = B;\n\n    Int myErrorFlag = 0;\n    for( Int j=0; j<width; ++j )\n    {\n        for( Int i=0; i<height; ++i )\n        {\n            if( A_STAR_STAR.GetLocal(i,j) != B_STAR_STAR.GetLocal(i,j) )\n            {\n                myErrorFlag = 1;\n                break;\n            }\n        }\n        if( myErrorFlag != 0 )\n            break;\n    }\n\n    Int summedErrorFlag;\n    mpi::AllReduce( &myErrorFlag, &summedErrorFlag, 1, mpi::SUM, g.Comm() );\n\n    if( summedErrorFlag == 0 )\n    {\n        if( commRank == 0 )\n            std::cout << \"PASSED\" << std::endl;\n    }\n    else\n    {\n        if( commRank == 0 )\n            std::cout << \"FAILED\" << std::endl;\n        if( print )\n            Print( A, \"A\" );\n        if( print ) \n            Print( B, \"B\" );\n    }\n}\n\ntemplate<typename T>\nvoid\nBlockDistMatrixTest( Int m, Int n, const Grid& g, Int mb, Int nb, bool print )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"BlockDistMatrixTest\"))\n    BlockDistMatrix<T,MC,  MR  > A_MC_MR(g,mb,nb);\n    BlockDistMatrix<T,MC,  STAR> A_MC_STAR(g,mb,nb);\n    BlockDistMatrix<T,STAR,MR  > A_STAR_MR(g,mb,nb);\n    BlockDistMatrix<T,MR,  MC  > A_MR_MC(g,mb,nb);\n    BlockDistMatrix<T,MR,  STAR> A_MR_STAR(g,mb,nb);\n    BlockDistMatrix<T,STAR,MC  > A_STAR_MC(g,mb,nb);\n    BlockDistMatrix<T,VC,  STAR> A_VC_STAR(g,mb,nb);\n    BlockDistMatrix<T,STAR,VC  > A_STAR_VC(g,mb,nb);\n    BlockDistMatrix<T,VR,  STAR> A_VR_STAR(g,mb,nb);\n    BlockDistMatrix<T,STAR,VR  > A_STAR_VR(g,mb,nb);\n    BlockDistMatrix<T,STAR,STAR> A_STAR_STAR(g,mb,nb);\n\n    // Communicate from A[MC,MR] \n    Uniform( A_MC_MR, m, n );\n    Check( A_MC_STAR,   A_MC_MR, print );\n    Check( A_STAR_MR,   A_MC_MR, print );\n    Check( A_MR_MC,     A_MC_MR, print );\n    Check( A_MR_STAR,   A_MC_MR, print );\n    Check( A_STAR_MC,   A_MC_MR, print );\n    Check( A_VC_STAR,   A_MC_MR, print );\n    Check( A_STAR_VC,   A_MC_MR, print );\n    Check( A_VR_STAR,   A_MC_MR, print );\n    Check( A_STAR_VR,   A_MC_MR, print );\n    Check( A_STAR_STAR, A_MC_MR, print );\n\n    // Communicate from A[MC,*]\n    Uniform( A_MC_STAR, m, n );\n    Check( A_MC_MR,     A_MC_STAR, print );\n    Check( A_STAR_MR,   A_MC_STAR, print );\n    Check( A_MR_MC,     A_MC_STAR, print );\n    Check( A_MR_STAR,   A_MC_STAR, print );\n    Check( A_STAR_MC,   A_MC_STAR, print );\n    Check( A_VC_STAR,   A_MC_STAR, print );\n    Check( A_STAR_VC,   A_MC_STAR, print );\n    Check( A_VR_STAR,   A_MC_STAR, print );\n    Check( A_STAR_VR,   A_MC_STAR, print );\n    Check( A_STAR_STAR, A_MC_STAR, print );\n\n    // Communicate from A[*,MR]\n    Uniform( A_STAR_MR, m, n );\n    Check( A_MC_MR,     A_STAR_MR, print );\n    Check( A_MC_STAR,   A_STAR_MR, print );\n    Check( A_MR_MC,     A_STAR_MR, print );\n    Check( A_MR_STAR,   A_STAR_MR, print );\n    Check( A_STAR_MC,   A_STAR_MR, print );\n    Check( A_VC_STAR,   A_STAR_MR, print );\n    Check( A_STAR_VC,   A_STAR_MR, print );\n    Check( A_VR_STAR,   A_STAR_MR, print );\n    Check( A_STAR_VR,   A_STAR_MR, print );\n    Check( A_STAR_STAR, A_STAR_MR, print );\n    \n    // Communicate from A[MR,MC]\n    Uniform( A_MR_MC, m, n );\n    Check( A_MC_MR,     A_MR_MC, print );\n    Check( A_MC_STAR,   A_MR_MC, print );\n    Check( A_STAR_MR,   A_MR_MC, print );\n    Check( A_MR_STAR,   A_MR_MC, print );\n    Check( A_STAR_MC,   A_MR_MC, print );\n    Check( A_VC_STAR,   A_MR_MC, print );\n    Check( A_STAR_VC,   A_MR_MC, print );\n    Check( A_VR_STAR,   A_MR_MC, print );\n    Check( A_STAR_VR,   A_MR_MC, print );\n    Check( A_STAR_STAR, A_MR_MC, print );\n\n    // Communicate from A[MR,*]\n    Uniform( A_MR_STAR, m, n );\n    Check( A_MC_MR,     A_MR_STAR, print );\n    Check( A_MC_STAR,   A_MR_STAR, print );\n    Check( A_STAR_MR,   A_MR_STAR, print );\n    Check( A_MR_MC,     A_MR_STAR, print );\n    Check( A_STAR_MC,   A_MR_STAR, print );\n    Check( A_VC_STAR,   A_MR_STAR, print );\n    Check( A_STAR_VC,   A_MR_STAR, print );\n    Check( A_VR_STAR,   A_MR_STAR, print );\n    Check( A_STAR_VR,   A_MR_STAR, print );\n    Check( A_STAR_STAR, A_MR_STAR, print );\n\n    // Communicate from A[*,MC]\n    Uniform( A_STAR_MC, m, n );\n    Check( A_MC_MR,     A_STAR_MC, print );\n    Check( A_MC_STAR,   A_STAR_MC, print );\n    Check( A_STAR_MR,   A_STAR_MC, print );\n    Check( A_MR_MC,     A_STAR_MC, print );\n    Check( A_MR_STAR,   A_STAR_MC, print );\n    Check( A_VC_STAR,   A_STAR_MC, print );\n    Check( A_STAR_VC,   A_STAR_MC, print );\n    Check( A_VR_STAR,   A_STAR_MC, print );\n    Check( A_STAR_VR,   A_STAR_MC, print );\n    Check( A_STAR_STAR, A_STAR_MC, print );\n \n    // Communicate from A[VC,*]\n    Uniform( A_VC_STAR, m, n );\n    Check( A_MC_MR,     A_VC_STAR, print );\n    Check( A_MC_STAR,   A_VC_STAR, print );\n    Check( A_STAR_MR,   A_VC_STAR, print );\n    Check( A_MR_MC,     A_VC_STAR, print );\n    Check( A_MR_STAR,   A_VC_STAR, print );\n    Check( A_STAR_MC,   A_VC_STAR, print );\n    Check( A_STAR_VC,   A_VC_STAR, print );\n    Check( A_VR_STAR,   A_VC_STAR, print );\n    Check( A_STAR_VR,   A_VC_STAR, print );\n    Check( A_STAR_STAR, A_VC_STAR, print );\n\n    // Communicate from A[*,VC]\n    Uniform( A_STAR_VC, m, n );\n    Check( A_MC_MR,     A_STAR_VC, print );\n    Check( A_MC_STAR,   A_STAR_VC, print );\n    Check( A_STAR_MR,   A_STAR_VC, print );\n    Check( A_MR_MC,     A_STAR_VC, print );\n    Check( A_MR_STAR,   A_STAR_VC, print );\n    Check( A_STAR_MC,   A_STAR_VC, print );\n    Check( A_VC_STAR,   A_STAR_VC, print );\n    Check( A_VR_STAR,   A_STAR_VC, print );\n    Check( A_STAR_VR,   A_STAR_VC, print );\n    Check( A_STAR_STAR, A_STAR_VC, print );\n\n    // Communicate from A[VR,*]\n    Uniform( A_VR_STAR, m, n );\n    Check( A_MC_MR,     A_VR_STAR, print );\n    Check( A_MC_STAR,   A_VR_STAR, print );\n    Check( A_STAR_MR,   A_VR_STAR, print );\n    Check( A_MR_MC,     A_VR_STAR, print );\n    Check( A_MR_STAR,   A_VR_STAR, print );\n    Check( A_STAR_MC,   A_VR_STAR, print );\n    Check( A_VC_STAR,   A_VR_STAR, print );\n    Check( A_STAR_VC,   A_VR_STAR, print );\n    Check( A_STAR_VR,   A_VR_STAR, print );\n    Check( A_STAR_STAR, A_VR_STAR, print );\n\n    // Communicate from A[*,VR]\n    Uniform( A_STAR_VR, m, n );\n    Check( A_MC_MR,     A_STAR_VR, print );\n    Check( A_MC_STAR,   A_STAR_VR, print );\n    Check( A_STAR_MR,   A_STAR_VR, print );\n    Check( A_MR_MC,     A_STAR_VR, print );\n    Check( A_MR_STAR,   A_STAR_VR, print );\n    Check( A_STAR_MC,   A_STAR_VR, print );\n    Check( A_VC_STAR,   A_STAR_VR, print );\n    Check( A_STAR_VC,   A_STAR_VR, print );\n    Check( A_VR_STAR,   A_STAR_VR, print );\n    Check( A_STAR_STAR, A_STAR_VR, print );\n\n    // Communicate from A[*,*]\n    Uniform( A_STAR_STAR, m, n );\n    Check( A_MC_MR,   A_STAR_STAR, print );\n    Check( A_MC_STAR, A_STAR_STAR, print );\n    Check( A_STAR_MR, A_STAR_STAR, print );\n    Check( A_MR_MC,   A_STAR_STAR, print );\n    Check( A_MR_STAR, A_STAR_STAR, print );\n    Check( A_STAR_MC, A_STAR_STAR, print );\n    Check( A_VC_STAR, A_STAR_STAR, print );\n    Check( A_STAR_VC, A_STAR_STAR, print );\n    Check( A_VR_STAR, A_STAR_STAR, print );\n    Check( A_STAR_VR, A_STAR_STAR, print );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int mb = Input(\"--blockHeight\",\"height of dist block\",32);\n        const Int nb = Input(\"--blockWidth\",\"width of dist block\",32);\n        const bool print = Input(\"--print\",\"print wrong matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n\n        if( commRank == 0 )\n            std::cout << \"Testing with floats:\" << std::endl;\n        BlockDistMatrixTest<float>( m, n, g, mb, nb, print );\n\n        if( commRank == 0 )\n            std::cout << \"Testing with doubles:\" << std::endl;\n        BlockDistMatrixTest<double>( m, n, g, mb, nb, print );\n\n        if( commRank == 0 )\n            std::cout << \"Testing with single-precision complex:\" << std::endl;\n        BlockDistMatrixTest<Complex<float>>( m, n, g, mb, nb, print );\n        \n        if( commRank == 0 )\n            std::cout << \"Testing with double-precision complex:\" << std::endl;\n        BlockDistMatrixTest<Complex<double>>( m, n, g, mb, nb, print );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/core/Constants.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include <float.h>\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    if( commRank == 0 )\n    {\n        const float safeMinFloat = lapack::MachineSafeMin<float>();\n        const float epsilonFloat = lapack::MachineEpsilon<float>();\n        const float safeInvFloat = safeMinFloat/epsilonFloat;\n        const double safeMinDouble = lapack::MachineSafeMin<double>();\n        const double epsilonDouble = lapack::MachineEpsilon<double>();\n        const double safeInvDouble = safeMinDouble/epsilonDouble;\n        std::cout << \"Single precision:\\n\"\n                  << \"  safeMin: \" << safeMinFloat << \"\\n\"\n                  << \"  epsilon: \" << epsilonFloat << \"\\n\"\n                  << \"  safeInv: \" << safeInvFloat << \"\\n\"\n                  << \"  FLT_MIN: \" << FLT_MIN << \"\\n\"\n                  << \"  FLT_MAX: \" << FLT_MAX << \"\\n\"\n                  << \"\\n\"\n                  << \"Double precision:\\n\"\n                  << \"  safeMin: \" << safeMinDouble << \"\\n\"\n                  << \"  epsilon: \" << epsilonDouble << \"\\n\"\n                  << \"  safeInv: \" << safeInvDouble << \"\\n\"\n                  << \"  DBL_MIN: \" << DBL_MIN << \"\\n\"\n                  << \"  DBL_MAX: \" << DBL_MAX << \"\\n\"\n                  << std::endl;\n    }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/core/DifferentGrids.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_SCALE_INC\n#include ELEM_IDENTITY_INC\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commSize = mpi::Size( comm );\n    \n    try\n    {\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const bool colMajorSqrt = Input(\"--colMajorSqrt\",\"colMajor sqrt?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const GridOrder orderSqrt = ( colMajorSqrt ? COLUMN_MAJOR : ROW_MAJOR );\n\n        // Drop down to a square grid, change the matrix, and redistribute back\n        const Int commSqrt = Int(sqrt(double(commSize)));\n\n        std::vector<int> sqrtRanks(commSqrt*commSqrt);\n        for( Int i=0; i<commSqrt*commSqrt; ++i )\n            sqrtRanks[i] = i;\n\n        mpi::Group group, sqrtGroup;\n        \n        mpi::CommGroup( comm, group );\n        mpi::Incl( group, sqrtRanks.size(), sqrtRanks.data(), sqrtGroup );\n\n        const Grid grid( comm, order );\n        const Grid sqrtGrid( comm, sqrtGroup, commSqrt, orderSqrt );\n\n        DistMatrix<double> A(grid), ASqrt(sqrtGrid);\n\n        Identity( A, m, n );\n        if( print )\n            Print( A, \"A\" );\n\n        ASqrt = A;\n        if( ASqrt.Participating() )\n        {\n            if( print )\n                Print( ASqrt, \"ASqrt := A\" );\n            Scale( 2., ASqrt );\n            if( print )\n                Print( ASqrt, \"ASqrt := 2 ASqrt\" );\n        }\n        A = ASqrt;\n        if( print )\n            Print( A, \"A := ASqrt\" );\n\n        const Grid newGrid( comm, order );\n        A.SetGrid( newGrid );\n        if( print )\n            Print( A, \"A after changing grid\" );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/core/DistMatrix.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_IO_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\ntemplate<typename T,Dist AColDist,Dist ARowDist,Dist BColDist,Dist BRowDist>\nvoid\nCheck( DistMatrix<T,AColDist,ARowDist>& A, \n       DistMatrix<T,BColDist,BRowDist>& B, bool print )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"Check\"))\n    const Grid& g = A.Grid();\n\n    const Int commRank = g.Rank();\n    const Int height = B.Height();\n    const Int width = B.Width();\n    DistMatrix<T,STAR,STAR> A_STAR_STAR(g);\n    DistMatrix<T,STAR,STAR> B_STAR_STAR(g);\n\n    if( commRank == 0 )\n    {\n        std::cout << \"Testing [\" << DistToString(AColDist) << \",\"\n                                 << DistToString(ARowDist) << \"]\"\n                  << \" <- [\"     << DistToString(BColDist) << \",\"\n                                 << DistToString(BRowDist) << \"]...\";\n        std::cout.flush();\n    }\n    Int colAlign = SampleUniform<Int>(0,A.ColStride());\n    Int rowAlign = SampleUniform<Int>(0,A.RowStride());\n    mpi::Broadcast( colAlign, 0, mpi::COMM_WORLD );\n    mpi::Broadcast( rowAlign, 0, mpi::COMM_WORLD );\n    A.Align( colAlign, rowAlign );\n    A = B;\n\n    A_STAR_STAR = A;\n    B_STAR_STAR = B;\n\n    Int myErrorFlag = 0;\n    for( Int j=0; j<width; ++j )\n    {\n        for( Int i=0; i<height; ++i )\n        {\n            if( A_STAR_STAR.GetLocal(i,j) != B_STAR_STAR.GetLocal(i,j) )\n            {\n                myErrorFlag = 1;\n                break;\n            }\n        }\n        if( myErrorFlag != 0 )\n            break;\n    }\n\n    Int summedErrorFlag;\n    mpi::AllReduce( &myErrorFlag, &summedErrorFlag, 1, mpi::SUM, g.Comm() );\n\n    if( summedErrorFlag == 0 )\n    {\n        if( commRank == 0 )\n            std::cout << \"PASSED\" << std::endl;\n    }\n    else\n    {\n        if( commRank == 0 )\n            std::cout << \"FAILED\" << std::endl;\n        if( print )\n            Print( A, \"A\" );\n        if( print ) \n            Print( B, \"B\" );\n    }\n}\n\ntemplate<typename T>\nvoid\nDistMatrixTest( Int m, Int n, const Grid& g, bool print )\n{\n    DEBUG_ONLY(CallStackEntry cse(\"DistMatrixTest\"))\n    DistMatrix<T,MC,  MR  > A_MC_MR(g);\n    DistMatrix<T,MC,  STAR> A_MC_STAR(g);\n    DistMatrix<T,STAR,MR  > A_STAR_MR(g);\n    DistMatrix<T,MR,  MC  > A_MR_MC(g);\n    DistMatrix<T,MR,  STAR> A_MR_STAR(g);\n    DistMatrix<T,STAR,MC  > A_STAR_MC(g);\n    DistMatrix<T,VC,  STAR> A_VC_STAR(g);\n    DistMatrix<T,STAR,VC  > A_STAR_VC(g);\n    DistMatrix<T,VR,  STAR> A_VR_STAR(g);\n    DistMatrix<T,STAR,VR  > A_STAR_VR(g);\n    DistMatrix<T,STAR,STAR> A_STAR_STAR(g);\n\n    // Communicate from A[MC,MR] \n    Uniform( A_MC_MR, m, n );\n    Check( A_MC_STAR,   A_MC_MR, print );\n    Check( A_STAR_MR,   A_MC_MR, print );\n    Check( A_MR_MC,     A_MC_MR, print );\n    Check( A_MR_STAR,   A_MC_MR, print );\n    Check( A_STAR_MC,   A_MC_MR, print );\n    Check( A_VC_STAR,   A_MC_MR, print );\n    Check( A_STAR_VC,   A_MC_MR, print );\n    Check( A_VR_STAR,   A_MC_MR, print );\n    Check( A_STAR_VR,   A_MC_MR, print );\n    Check( A_STAR_STAR, A_MC_MR, print );\n\n    // Communicate from A[MC,*]\n    Uniform( A_MC_STAR, m, n );\n    Check( A_MC_MR,     A_MC_STAR, print );\n    Check( A_STAR_MR,   A_MC_STAR, print );\n    Check( A_MR_MC,     A_MC_STAR, print );\n    Check( A_MR_STAR,   A_MC_STAR, print );\n    Check( A_STAR_MC,   A_MC_STAR, print );\n    Check( A_VC_STAR,   A_MC_STAR, print );\n    Check( A_STAR_VC,   A_MC_STAR, print );\n    Check( A_VR_STAR,   A_MC_STAR, print );\n    Check( A_STAR_VR,   A_MC_STAR, print );\n    Check( A_STAR_STAR, A_MC_STAR, print );\n\n    // Communicate from A[*,MR]\n    Uniform( A_STAR_MR, m, n );\n    Check( A_MC_MR,     A_STAR_MR, print );\n    Check( A_MC_STAR,   A_STAR_MR, print );\n    Check( A_MR_MC,     A_STAR_MR, print );\n    Check( A_MR_STAR,   A_STAR_MR, print );\n    Check( A_STAR_MC,   A_STAR_MR, print );\n    Check( A_VC_STAR,   A_STAR_MR, print );\n    Check( A_STAR_VC,   A_STAR_MR, print );\n    Check( A_VR_STAR,   A_STAR_MR, print );\n    Check( A_STAR_VR,   A_STAR_MR, print );\n    Check( A_STAR_STAR, A_STAR_MR, print );\n    \n    // Communicate from A[MR,MC]\n    Uniform( A_MR_MC, m, n );\n    Check( A_MC_MR,     A_MR_MC, print );\n    Check( A_MC_STAR,   A_MR_MC, print );\n    Check( A_STAR_MR,   A_MR_MC, print );\n    Check( A_MR_STAR,   A_MR_MC, print );\n    Check( A_STAR_MC,   A_MR_MC, print );\n    Check( A_VC_STAR,   A_MR_MC, print );\n    Check( A_STAR_VC,   A_MR_MC, print );\n    Check( A_VR_STAR,   A_MR_MC, print );\n    Check( A_STAR_VR,   A_MR_MC, print );\n    Check( A_STAR_STAR, A_MR_MC, print );\n\n    // Communicate from A[MR,*]\n    Uniform( A_MR_STAR, m, n );\n    Check( A_MC_MR,     A_MR_STAR, print );\n    Check( A_MC_STAR,   A_MR_STAR, print );\n    Check( A_STAR_MR,   A_MR_STAR, print );\n    Check( A_MR_MC,     A_MR_STAR, print );\n    Check( A_STAR_MC,   A_MR_STAR, print );\n    Check( A_VC_STAR,   A_MR_STAR, print );\n    Check( A_STAR_VC,   A_MR_STAR, print );\n    Check( A_VR_STAR,   A_MR_STAR, print );\n    Check( A_STAR_VR,   A_MR_STAR, print );\n    Check( A_STAR_STAR, A_MR_STAR, print );\n\n    // Communicate from A[*,MC]\n    Uniform( A_STAR_MC, m, n );\n    Check( A_MC_MR,     A_STAR_MC, print );\n    Check( A_MC_STAR,   A_STAR_MC, print );\n    Check( A_STAR_MR,   A_STAR_MC, print );\n    Check( A_MR_MC,     A_STAR_MC, print );\n    Check( A_MR_STAR,   A_STAR_MC, print );\n    Check( A_VC_STAR,   A_STAR_MC, print );\n    Check( A_STAR_VC,   A_STAR_MC, print );\n    Check( A_VR_STAR,   A_STAR_MC, print );\n    Check( A_STAR_VR,   A_STAR_MC, print );\n    Check( A_STAR_STAR, A_STAR_MC, print );\n \n    // Communicate from A[VC,*]\n    Uniform( A_VC_STAR, m, n );\n    Check( A_MC_MR,     A_VC_STAR, print );\n    Check( A_MC_STAR,   A_VC_STAR, print );\n    Check( A_STAR_MR,   A_VC_STAR, print );\n    Check( A_MR_MC,     A_VC_STAR, print );\n    Check( A_MR_STAR,   A_VC_STAR, print );\n    Check( A_STAR_MC,   A_VC_STAR, print );\n    Check( A_STAR_VC,   A_VC_STAR, print );\n    Check( A_VR_STAR,   A_VC_STAR, print );\n    Check( A_STAR_VR,   A_VC_STAR, print );\n    Check( A_STAR_STAR, A_VC_STAR, print );\n\n    // Communicate from A[*,VC]\n    Uniform( A_STAR_VC, m, n );\n    Check( A_MC_MR,     A_STAR_VC, print );\n    Check( A_MC_STAR,   A_STAR_VC, print );\n    Check( A_STAR_MR,   A_STAR_VC, print );\n    Check( A_MR_MC,     A_STAR_VC, print );\n    Check( A_MR_STAR,   A_STAR_VC, print );\n    Check( A_STAR_MC,   A_STAR_VC, print );\n    Check( A_VC_STAR,   A_STAR_VC, print );\n    Check( A_VR_STAR,   A_STAR_VC, print );\n    Check( A_STAR_VR,   A_STAR_VC, print );\n    Check( A_STAR_STAR, A_STAR_VC, print );\n\n    // Communicate from A[VR,*]\n    Uniform( A_VR_STAR, m, n );\n    Check( A_MC_MR,     A_VR_STAR, print );\n    Check( A_MC_STAR,   A_VR_STAR, print );\n    Check( A_STAR_MR,   A_VR_STAR, print );\n    Check( A_MR_MC,     A_VR_STAR, print );\n    Check( A_MR_STAR,   A_VR_STAR, print );\n    Check( A_STAR_MC,   A_VR_STAR, print );\n    Check( A_VC_STAR,   A_VR_STAR, print );\n    Check( A_STAR_VC,   A_VR_STAR, print );\n    Check( A_STAR_VR,   A_VR_STAR, print );\n    Check( A_STAR_STAR, A_VR_STAR, print );\n\n    // Communicate from A[*,VR]\n    Uniform( A_STAR_VR, m, n );\n    Check( A_MC_MR,     A_STAR_VR, print );\n    Check( A_MC_STAR,   A_STAR_VR, print );\n    Check( A_STAR_MR,   A_STAR_VR, print );\n    Check( A_MR_MC,     A_STAR_VR, print );\n    Check( A_MR_STAR,   A_STAR_VR, print );\n    Check( A_STAR_MC,   A_STAR_VR, print );\n    Check( A_VC_STAR,   A_STAR_VR, print );\n    Check( A_STAR_VC,   A_STAR_VR, print );\n    Check( A_VR_STAR,   A_STAR_VR, print );\n    Check( A_STAR_STAR, A_STAR_VR, print );\n\n    // Communicate from A[*,*]\n    Uniform( A_STAR_STAR, m, n );\n    Check( A_MC_MR,   A_STAR_STAR, print );\n    Check( A_MC_STAR, A_STAR_STAR, print );\n    Check( A_STAR_MR, A_STAR_STAR, print );\n    Check( A_MR_MC,   A_STAR_STAR, print );\n    Check( A_MR_STAR, A_STAR_STAR, print );\n    Check( A_STAR_MC, A_STAR_STAR, print );\n    Check( A_VC_STAR, A_STAR_STAR, print );\n    Check( A_STAR_VC, A_STAR_STAR, print );\n    Check( A_VR_STAR, A_STAR_STAR, print );\n    Check( A_STAR_VR, A_STAR_STAR, print );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const bool print = Input(\"--print\",\"print wrong matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n\n        if( commRank == 0 )\n            std::cout << \"Testing with floats:\" << std::endl;\n        DistMatrixTest<float>( m, n, g, print );\n\n        if( commRank == 0 )\n            std::cout << \"Testing with doubles:\" << std::endl;\n        DistMatrixTest<double>( m, n, g, print );\n\n        if( commRank == 0 )\n            std::cout << \"Testing with single-precision complex:\" << std::endl;\n        DistMatrixTest<Complex<float>>( m, n, g, print );\n        \n        if( commRank == 0 )\n            std::cout << \"Testing with double-precision complex:\" << std::endl;\n        DistMatrixTest<Complex<double>>( m, n, g, print );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/core/Matrix.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\nusing namespace elem;\n\ntemplate<typename T> \nvoid TestMatrix( Int m, Int n, Int ldim )\n{\n    if( m > ldim || ldim == 0 )\n        LogicError(\"Leading dimension must be >= m and nonzero\");\n    std::vector<T> buffer(ldim*n);\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            buffer[i+j*ldim] = i+j*m;\n\n    Matrix<T> A( m, n, buffer.data(), ldim );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            if( A.Get(i,j) != buffer[i+j*ldim] )\n                LogicError\n                (\"Matrix class was not properly filled with buffer\");\n\n    const Matrix<T> B( m, n, (const T*)buffer.data(), ldim );\n    for( Int j=0; j<n; ++j )\n        for( Int i=0; i<m; ++i )\n            if( B.Get(i,j) != buffer[i+j*ldim] )\n                LogicError\n                (\"Matrix class was not properly filled with const buffer\");\n\n    const Int commRank = mpi::Rank( mpi::COMM_WORLD );\n    if( commRank == 0 )\n        std::cout << \"passed\" << std::endl;\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    try \n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int ldim = Input(\"--ldim\",\"leading dimension\",100);\n        ProcessInput();\n        PrintInputReport();\n\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"Testing with doubles...\";\n            std::cout.flush();\n        }\n        TestMatrix<double>( m, n, ldim );\n\n        if( mpi::WorldRank() == 0 )\n        {\n            std::cout << \"Testing with double-precision complex...\";\n            std::cout.flush();\n        }\n        TestMatrix<Complex<double>>( m, n, ldim );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/core/README.md",
    "content": "### `tests/core`\n\nThis folder stores the correctness tests for Elemental's core functionality:\n\n-  `AxpyInterface.cpp`: Tests the local-to-global and global-to-local Axpy \n   (y := alpha x plus y)  interface\n-  `DifferentGrids.cpp`: Tests a redistribution between different process grids\n-  `DistMatrix.cpp`: Tests various redistributions for the DistMatrix class\n-  `Matrix.cpp`: Tests buffer attachment for the Matrix class\n-  `Version.cpp`: Prints the version information of this Elemental build\n"
  },
  {
    "path": "src/madness/external/elemental/tests/core/Version.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\nusing namespace elem;\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    if( commRank == 0 )\n    {\n        PrintVersion();\n        PrintCCompilerInfo();\n        PrintCxxCompilerInfo();\n    }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/ApplyPackedReflectors.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKEHERMITIAN_INC\n#include ELEM_NRM2_INC\n#include ELEM_UPDATEDIAGONAL_INC\n#include ELEM_APPLYPACKEDREFLECTORS_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( LeftOrRight side, UpperOrLower uplo, ForwardOrBackward order,\n  Conjugation conjugation, Int offset, bool printMatrices,\n  const DistMatrix<F>& H,\n  const DistMatrix<F,MD,STAR>& t )\n{\n    typedef Base<F> Real;\n    const Grid& g = H.Grid();\n    const Int m = H.Height();\n\n    if( g.Rank() == 0 )\n        cout << \"  Testing orthogonality of transform...\" << endl;\n\n    // Form Z := Q^H Q or Q Q^H as an approximation to identity\n    DistMatrix<F> Y(g);\n    Identity( Y, m, m );\n    ApplyPackedReflectors\n    ( side, uplo, VERTICAL, order, conjugation, offset, H, t, Y );\n    if( printMatrices )\n    {\n        DistMatrix<F> W(g);\n        Identity( W, m, m );\n        if( order == FORWARD )\n        {\n            ApplyPackedReflectors\n            ( side, uplo, VERTICAL, BACKWARD, conjugation, offset, H, t, W );\n            Print( Y, \"Q\" );\n            Print( W, \"Q^H\" );\n        }\n        else\n        {\n            ApplyPackedReflectors\n            ( side, uplo, VERTICAL, FORWARD, conjugation, offset, H, t, W );\n            Print( Y, \"Q^H\" );\n            Print( W, \"Q\" );\n        }\n    }\n    DistMatrix<F> Z(g);\n    Zeros( Z, m, m );\n    Herk( uplo, NORMAL, F(1), Y, F(0), Z );\n    MakeHermitian( uplo, Z );\n    \n    // Form X := -I + Q^H Q or Q Q^H\n    UpdateDiagonal( Z, F(-1) );\n    if( printMatrices )\n    {\n        if( order == FORWARD )\n            Print( Z, \"Q Q^H - I\" );\n        else\n            Print( Z, \"Q^H Q - I\" );\n    }\n\n    // Compute the maximum deviance\n    const Real oneNormOfError = OneNorm( Z );\n    const Real infNormOfError = InfinityNorm( Z );\n    const Real frobNormOfError = FrobeniusNorm( Z );\n    if( g.Rank() == 0 )\n    {\n        if( order == FORWARD )\n        {\n            cout << \"    ||Q Q^H - I||_1  = \" << oneNormOfError << \"\\n\"\n                 << \"    ||Q Q^H - I||_oo = \" << infNormOfError << \"\\n\"\n                 << \"    ||Q Q^H - I||_F  = \" << frobNormOfError << endl;\n        }\n        else\n        {\n            cout << \"    ||Q^H Q - I||_1  = \" << oneNormOfError << \"\\n\"\n                 << \"    ||Q^H Q - I||_oo = \" << infNormOfError << \"\\n\"\n                 << \"    ||Q^H Q - I||_F  = \" << frobNormOfError << endl;\n        }\n    }\n}\n\ntemplate<typename F>\nvoid TestUT\n( LeftOrRight side, UpperOrLower uplo, \n  ForwardOrBackward order, Conjugation conjugation,\n  Int m, Int offset, bool testCorrectness, bool printMatrices,\n  const Grid& g )\n{\n    DistMatrix<F> H(g), A(g);\n    Uniform( H, m, m );\n    Uniform( A, m, m );\n\n    const Int diagLength = DiagonalLength(H.Height(),H.Width(),offset);\n    DistMatrix<F,MD,STAR> t(g);\n    t.SetRoot( H.DiagonalRoot(offset) );\n    t.AlignCols( H.DiagonalAlign(offset) );\n    t.Resize( diagLength, 1 );\n\n    DistMatrix<F> HCol(g);\n    if( uplo == LOWER )\n    {\n        for( Int i=0; i<t.Height(); ++i )\n        {\n            // View below the diagonal containing the implicit 1\n            HCol = View( H, i-offset+1, i, m-(i-offset+1), 1 );\n            F norm = Nrm2( HCol );\n            F alpha = 2./(norm*norm+1.);\n            t.Set( i, 0, alpha );\n        }\n    }\n    else\n    {\n        for( Int i=0; i<t.Height(); ++i ) \n        {\n            // View above the diagonal containing the implicit 1\n            HCol = View( H, 0, i+offset, i, 1 );\n            F norm = Nrm2( HCol );\n            F alpha = 2./(norm*norm+1.);\n            t.Set( i, 0, alpha );\n        }\n    }\n\n    if( printMatrices )\n    {\n        Print( H, \"H\" );\n        Print( A, \"A\" );\n        Print( t, \"t\" );\n    }\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting UT transform...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    ApplyPackedReflectors\n    ( side, uplo, VERTICAL, order, conjugation, offset, H, t, A );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = 8.*Pow(double(m),3.)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( printMatrices )\n        Print( A, \"A after factorization\" );\n    if( testCorrectness )\n    {\n        TestCorrectness\n        ( side, uplo, order, conjugation, offset, printMatrices, H, t );\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char sideChar = Input(\"--side\",\"side to apply from: L/R\",'L');\n        const char uploChar = Input(\"--uplo\",\"store in triangle: L/U\",'L');\n        const bool forward = Input(\"--forward\",\"forward application?\",true);\n        const bool conjugate = Input(\"--conjugate\",\"conjugate?\",false);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int offset = Input(\"--offset\",\"diagonal offset for storage\",0);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness  = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool printMatrices = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const LeftOrRight side = CharToLeftOrRight( sideChar );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const ForwardOrBackward dir = ( forward ? FORWARD : BACKWARD );\n        const Conjugation conjugation = \n            ( conjugate ? CONJUGATED : UNCONJUGATED );\n        SetBlocksize( nb );\n        if( uplo == LOWER && offset > 0 )\n            LogicError\n            (\"Offset cannot be positive if transforms are in lower triangle\");\n        else if( uplo == UPPER && offset < 0 )\n            LogicError\n            (\"Offset cannot be negative if transforms are in upper triangle\");\n\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test UT transform\" << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestUT<double>\n        ( side, uplo, dir, conjugation, m, offset, \n          testCorrectness, printMatrices, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestUT<Complex<double>>\n        ( side, uplo, dir, conjugation, m, offset, \n          testCorrectness, printMatrices, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/Bidiag.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_BIDIAG_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( const DistMatrix<F>& A, \n  const DistMatrix<F,STAR,STAR>& tP,\n  const DistMatrix<F,STAR,STAR>& tQ,\n        DistMatrix<F>& AOrig,\n  bool print, bool display )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = AOrig.Height();\n    const Int n = AOrig.Width();\n    const Real infNormAOrig = InfinityNorm( AOrig );\n    const Real frobNormAOrig = FrobeniusNorm( AOrig );\n    if( g.Rank() == 0 )\n        cout << \"Testing error...\" << endl;\n\n    // Grab the diagonal and superdiagonal of the bidiagonal matrix\n    auto d = A.GetDiagonal( 0 );\n    auto e = A.GetDiagonal( (m>=n ? 1 : -1) );\n\n    // Zero B and then fill its bidiagonal\n    DistMatrix<F> B(g);\n    B.AlignWith( A );\n    Zeros( B, m, n );\n    B.SetDiagonal( d, 0  );\n    B.SetDiagonal( e, (m>=n ? 1 : -1) );\n    if( print )\n        Print( B, \"Bidiagonal\" );\n    if( display )\n        Display( B, \"Bidiagonal\" );\n\n    if( print || display )\n    {\n        DistMatrix<F> Q(g), P(g);\n        Identity( Q, m, m );\n        Identity( P, n, n );\n        bidiag::ApplyQ( LEFT,  NORMAL, A, tQ, Q );\n        bidiag::ApplyP( RIGHT, NORMAL, A, tP, P );\n        if( print )\n        {\n            Print( Q, \"Q\" );\n            Print( P, \"P\" );\n        }\n        if( display )\n        {\n            Display( Q, \"Q\" );\n            Display( P, \"P\" );\n        }\n    }\n\n    // Reverse the accumulated Householder transforms\n    bidiag::ApplyQ( LEFT,  ADJOINT, A, tQ, AOrig );\n    bidiag::ApplyP( RIGHT, NORMAL,  A, tP, AOrig );\n    if( print )\n        Print( AOrig, \"Manual bidiagonal\" );\n    if( display )\n        Display( AOrig, \"Manual bidiagonal\" );\n\n    // Compare the appropriate portion of AOrig and B\n    if( m >= n )\n    {\n        MakeTriangular( UPPER, AOrig );\n        MakeTrapezoidal( LOWER, AOrig, 1 );\n    }\n    else\n    {\n        MakeTriangular( LOWER, AOrig ); \n        MakeTrapezoidal( UPPER, AOrig, -1 );\n    }\n    Axpy( F(-1), AOrig, B );\n    if( print )\n        Print( B, \"Error in rotated bidiagonal\" );\n    if( display )\n        Display( B, \"Error in rotated bidiagonal\" );\n    const Real infNormError = InfinityNorm( B );\n    const Real frobNormError = FrobeniusNorm( B );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||A||_oo = \" << infNormAOrig << \"\\n\"\n             << \"    ||A||_F  = \" << frobNormAOrig << \"\\n\"\n             << \"    ||B - Q^H A P||_oo = \" << infNormError << \"\\n\"\n             << \"    ||B - Q^H A P||_F  = \" << frobNormError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestBidiag\n( Int m, Int n, const Grid& g, bool testCorrectness, bool print, bool display )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    DistMatrix<F,STAR,STAR> tP(g), tQ(g);\n\n    Uniform( A, m, n );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n    if( display )\n        Display( A, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting bidiagonalization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Bidiag( A, tP, tQ );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    // TODO: Flop calculation\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds.\" << std::endl;\n    }\n    if( print )\n    {\n        Print( A, \"A after Bidiag\" );\n        Print( tP, \"tP after Bidiag\" );\n        Print( tQ, \"tQ after Bidiag\" );\n    }\n    if( display )\n    {\n        Display( A, \"A after Bidiag\" );\n        Display( tP, \"tP after Bidiag\" );\n        Display( tQ, \"tQ after Bidiag\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( A, tP, tQ, AOrig, print, display );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n\n        if( commRank == 0 )\n            cout << \"Double-precision:\" << endl;\n        TestBidiag<double>( m, n, g, testCorrectness, print, display );\n\n        if( commRank == 0 )\n            cout << \"Double-precision complex:\" << endl;\n        TestBidiag<Complex<double>>( m, n, g, testCorrectness, print, display );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/Cholesky.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HEMM_INC\n#include ELEM_TRMM_INC\n#include ELEM_CHOLESKY_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F,Dist UPerm>\nvoid TestCorrectness\n( bool pivot, UpperOrLower uplo,\n  const DistMatrix<F>& A,\n  const DistMatrix<Int,UPerm,STAR>& pPerm,\n  const DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = AOrig.Height();\n\n    // Test correctness by multiplying a random set of vectors by A, then\n    // using the Cholesky factorization to solve.\n    DistMatrix<F> X(g), Y(g);\n    Uniform( X, m, 100 );\n    Zeros( Y, m, 100 );\n    Hemm( LEFT, uplo, F(1), AOrig, X, F(0), Y );\n    const Real maxNormL = HermitianMaxNorm( uplo, A );\n    const Real maxNormA = HermitianMaxNorm( uplo, AOrig );\n    const Real infNormA = HermitianInfinityNorm( uplo, AOrig );\n    const Real frobNormA = HermitianFrobeniusNorm( uplo, AOrig );\n    const Real oneNormY = OneNorm( Y );\n    const Real infNormY = InfinityNorm( Y );\n    const Real frobNormY = FrobeniusNorm( Y );\n\n    if( pivot )\n        cholesky::SolveAfter( uplo, NORMAL, A, pPerm, Y );\n    else\n        cholesky::SolveAfter( uplo, NORMAL, A, Y );\n    Axpy( F(-1), Y, X );\n    const Real oneNormE = OneNorm( X );\n    const Real infNormE = InfinityNorm( X );\n    const Real frobNormE = FrobeniusNorm( X );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"||L||_max            = \" << maxNormL << \"\\n\"\n             << \"||A||_max            = \" << maxNormA << \"\\n\"\n             << \"||A||_1 = ||A||_oo   = \" << infNormA << \"\\n\"\n             << \"||A||_F              = \" << frobNormA << \"\\n\"\n             << \"||Y||_1              = \" << oneNormY << \"\\n\"\n             << \"||Y||_oo             = \" << infNormY << \"\\n\"\n             << \"||Y||_F              = \" << frobNormY << \"\\n\"\n             << \"||X - inv(A) X||_1  = \" << oneNormE << \"\\n\"\n             << \"||X - inv(A) X||_oo = \" << infNormE << \"\\n\"\n             << \"||X - inv(A) X||_F  = \" << frobNormE << endl;\n    }\n}\n\ntemplate<typename F,Dist UPerm> \nvoid TestCholesky\n( bool testCorrectness, bool pivot, bool unblocked, bool print, bool printDiag,\n  UpperOrLower uplo, Int m, const Grid& g )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    DistMatrix<Int,UPerm,STAR> pPerm(g);\n\n    HermitianUniformSpectrum( A, m, 1e-9, 10 );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Cholesky factorization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    if( pivot )\n    {\n        if( unblocked )\n        {\n            if( uplo == LOWER )\n                cholesky::LUnblockedPivoted( A, pPerm );\n            else\n                cholesky::UUnblockedPivoted( A, pPerm );\n        }\n        else\n            Cholesky( uplo, A, pPerm );\n    }\n    else\n        Cholesky( uplo, A );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = 1./3.*Pow(double(m),3.)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE.\\n\"\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    { \n        Print( A, \"A after factorization\" );\n        if( pivot )\n            Print( pPerm, \"pPerm\" );\n    }\n    if( printDiag )\n        Print( A.GetRealPartOfDiagonal(), \"diag(A)\" );\n    if( testCorrectness )\n        TestCorrectness( pivot, uplo, A, pPerm, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"process grid height\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const Int m = Input(\"--m\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int nbLocal = Input(\"--nbLocal\",\"local blocksize\",32);\n        const bool pivot = Input(\"--pivot\",\"use pivoting?\",false);\n        const bool unblocked = Input(\"--unblocked\",\"unblocked pivoting?\",false);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        const bool printDiag = Input(\"--printDiag\",\"print diag of fact?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n        SetLocalTrrkBlocksize<double>( nbLocal );\n        SetLocalTrrkBlocksize<Complex<double>>( nbLocal );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test Cholesky\" << uploChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestCholesky<double,VC>\n        ( testCorrectness, pivot, unblocked, print, printDiag, uplo, m, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestCholesky<Complex<double>,VC>\n        ( testCorrectness, pivot, unblocked, print, printDiag, uplo, m, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/CholeskyMod.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HEMM_INC\n#include ELEM_TRMM_INC\n#include ELEM_CHOLESKY_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F>\nvoid TestCorrectness\n( UpperOrLower uplo, const DistMatrix<F>& T, Base<F> alpha, const DistMatrix<F>& V,\n  const DistMatrix<F>& A )\n{\n    typedef Base<F> Real;\n    const Int m = V.Height();\n    const Grid& g = T.Grid();\n\n    DistMatrix<F> B( A );\n    Herk( uplo, NORMAL, F(alpha), V, F(1), B );\n\n    // Test correctness by multiplying a random set of vectors by \n    // A + alpha V V^H, then using the Cholesky factorization to solve.\n    DistMatrix<F> X(g), Y(g);\n    Uniform( X, m, 100 );\n    Zeros( Y, m, 100 );\n    Hemm( LEFT, uplo, F(1), B, X, F(0), Y );\n    const Real maxNormT = MaxNorm( T );\n    const Real maxNormB = HermitianMaxNorm( uplo, B );\n    const Real infNormB = HermitianInfinityNorm( uplo, B );\n    const Real frobNormB = HermitianFrobeniusNorm( uplo, B );\n    const Real oneNormY = OneNorm( Y );\n    const Real infNormY = InfinityNorm( Y );\n    const Real frobNormY = FrobeniusNorm( Y );\n\n    cholesky::SolveAfter( uplo, NORMAL, T, Y );\n    Axpy( F(-1), Y, X );\n    const Real oneNormE = OneNorm( X );\n    const Real infNormE = InfinityNorm( X );\n    const Real frobNormE = FrobeniusNorm( X );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"||T||_max = \" << maxNormT << \"\\n\"\n             << \"||B||_max = \" << maxNormB << \"\\n\"\n             << \"||B||_1   = \" << infNormB << \"\\n\"\n             << \"||B||_F   = \" << frobNormB << \"\\n\"\n             << \"||Y||_1   = \" << oneNormY << \"\\n\"\n             << \"||Y||_oo  = \" << infNormY << \"\\n\"\n             << \"||Y||_F   = \" << frobNormY << \"\\n\"\n             << \"||X - inv(B) X||_1  = \" << oneNormE << \"\\n\"\n             << \"||X - inv(B) X||_oo = \" << infNormE << \"\\n\"\n             << \"||X - inv(B) X||_F  = \" << frobNormE << endl;\n    }\n}\n\ntemplate<typename F> \nvoid TestCholeskyMod\n( bool testCorrectness, bool print, UpperOrLower uplo, Int m, Int n, \n  Base<F> alpha, const Grid& g )\n{\n    DistMatrix<F> T(g), A(g);\n    HermitianUniformSpectrum( T, m, 1e-9, 10 );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        A = T;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( T, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Cholesky factorization...\";\n        cout.flush();\n    }\n    double startTime = mpi::Time();\n    Cholesky( uplo, T );\n    double runTime = mpi::Time() - startTime;\n    double realGFlops = 1./3.*Pow(double(m),3.)/(1.e9*runTime);\n    double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE\\n\"\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    MakeTriangular( uplo, T );\n    if( print )\n        Print( T, \"Cholesky factor\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Generating random update vectors...\";\n        cout.flush();\n    }\n    DistMatrix<F> V(g), VMod(g);\n    Uniform( V, m, n );\n    Scale( F(1)/Sqrt(F(m)*F(n)), V );\n    VMod = V;\n    if( g.Rank() == 0 )\n        cout << \"DONE\" << endl;\n    if( print )\n        Print( V, \"V\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Cholesky modification...\";\n        cout.flush();\n    }\n    startTime = mpi::Time();\n    CholeskyMod( uplo, T, alpha, VMod );\n    runTime = mpi::Time() - startTime;\n    if( g.Rank() == 0 )\n        cout << \"DONE\\n\"\n             << \"  Time = \" << runTime << \" seconds.\" << endl;\n    if( print )\n        Print( T, \"Modified Cholesky factor\" );\n\n    if( testCorrectness )\n        TestCorrectness( uplo, T, alpha, V, A );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"process grid height\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const Int m = Input(\"--m\",\"height of matrix\",100);\n        const Int n = Input(\"--n\",\"rank of update\",5);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const double alpha = Input(\"--alpha\",\"update scaling\",3.);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test CholeskyMod\" << uploChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestCholeskyMod<double>\n        ( testCorrectness, print, uplo, m, n, alpha, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestCholeskyMod<Complex<double>>\n        ( testCorrectness, print, uplo, m, n, alpha, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/CholeskyQR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_QR_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( const DistMatrix<F,VC,  STAR>& Q,\n  const DistMatrix<F,STAR,STAR>& R,\n        DistMatrix<F,VC,  STAR>& A )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Width();\n\n    // Form I - Q^H Q\n    if( g.Rank() == 0 )\n        cout << \"  Testing orthogonality of Q...\" << endl;\n    DistMatrix<F> Z(g);\n    Identity( Z, n, n );\n    DistMatrix<F> Q_MC_MR( Q );\n    Herk( UPPER, ADJOINT, F(-1), Q_MC_MR, F(1), Z );\n    Real oneNormOfError = HermitianOneNorm( UPPER, Z );\n    Real infNormOfError = HermitianInfinityNorm( UPPER, Z );\n    Real frobNormOfError = HermitianFrobeniusNorm( UPPER, Z );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||Q^H Q - I||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||Q^H Q - I||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||Q^H Q - I||_F  = \" << frobNormOfError << endl;\n    }\n\n    // Form A - Q R\n    if( g.Rank() == 0 )\n        cout << \"  Testing if A = QR...\" << endl;\n    const Real oneNormOfA = OneNorm( A );\n    const Real infNormOfA = InfinityNorm( A );\n    const Real frobNormOfA = FrobeniusNorm( A );\n    LocalGemm( NORMAL, NORMAL, F(-1), Q, R, F(1), A );\n    oneNormOfError = OneNorm( A );\n    infNormOfError = InfinityNorm( A );\n    frobNormOfError = FrobeniusNorm( A );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||A||_1       = \" << oneNormOfA << \"\\n\"\n             << \"    ||A||_oo      = \" << infNormOfA << \"\\n\"\n             << \"    ||A||_F       = \" << frobNormOfA << \"\\n\"\n             << \"    ||A - QR||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||A - QR||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||A - QR||_F  = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestQR\n( bool testCorrectness, bool print,\n  Int m, Int n, const Grid& g )\n{\n    DistMatrix<F,VC,STAR> A(g), Q(g);\n    DistMatrix<F,STAR,STAR> R(g);\n\n    Uniform( A, m, n );\n    if( print )\n        Print( A, \"A\" );\n    Q = A;\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Cholesky QR factorization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    qr::Cholesky( Q, R );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double mD = double(m);\n    const double nD = double(n);\n    const double gFlops = (2.*mD*nD*nD + 1./3.*nD*nD*nD)/(1.e9*runTime);\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        Print( Q, \"Q\" );\n        Print( R, \"R\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( Q, R, A );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    try\n    {\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, order );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test CholeskyQR\" << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestQR<double>( testCorrectness, print, m, n, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestQR<double>( testCorrectness, print, m, n, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/HermitianEig.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HEMM_INC\n#include ELEM_HERK_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_HERMITIANEIG_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_WILKINSON_INC\n#include ELEM_ZEROS_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F>\nvoid TestCorrectness\n( bool print,\n  UpperOrLower uplo,\n  const DistMatrix<F>& A,\n  const DistMatrix<Base<F>,VR,STAR>& w,\n  const DistMatrix<F>& Z,\n  const DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = Z.Height();\n    const Int k = Z.Width();\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Gathering computed eigenvalues...\";\n        cout.flush();\n    }\n    DistMatrix<Real,MR,STAR> w_MR_STAR(true,Z.RowAlign(),g); \n    w_MR_STAR = w;\n    if( g.Rank() == 0 )\n        cout << \"DONE\" << endl;\n\n    if( g.Rank() == 0 )\n        cout << \"  Testing orthogonality of eigenvectors...\" << endl;\n    DistMatrix<F> X(g);\n    Identity( X, k, k );\n    Herk( uplo, ADJOINT, F(-1), Z, F(1), X );\n    Real oneNormOfError = OneNorm( X );\n    Real infNormOfError = InfinityNorm( X );\n    Real frobNormOfError = FrobeniusNorm( X );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||Z^H Z - I||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||Z^H Z - I||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||Z^H Z - I||_F  = \" << frobNormOfError << \"\\n\\n\"\n             << \"  Testing for deviation of AZ from ZW...\" << endl;\n    }\n    // X := AZ\n    X.AlignWith( Z );\n    Zeros( X, n, k );\n    Hemm( LEFT, uplo, F(1), AOrig, Z, F(0), X );\n    // Find the residual ||X-ZW||_oo = ||AZ-ZW||_oo\n    for( Int jLoc=0; jLoc<X.LocalWidth(); ++jLoc )\n    {\n        const Real omega = w_MR_STAR.GetLocal(jLoc,0);\n        for( Int iLoc=0; iLoc<X.LocalHeight(); ++iLoc )\n        {\n            const F chi = X.GetLocal(iLoc,jLoc);\n            const F zeta = Z.GetLocal(iLoc,jLoc);\n            X.SetLocal(iLoc,jLoc,chi-omega*zeta);\n        }\n    }\n    // Find the infinity norms of A, Z, and AZ-ZW\n    Real infNormOfA = HermitianInfinityNorm( uplo, AOrig );\n    Real frobNormOfA = HermitianFrobeniusNorm( uplo, AOrig );\n    Real oneNormOfZ = OneNorm( Z );\n    Real infNormOfZ = InfinityNorm( Z );\n    Real frobNormOfZ = FrobeniusNorm( Z );\n    oneNormOfError = OneNorm( X );\n    infNormOfError = InfinityNorm( X );\n    frobNormOfError = FrobeniusNorm( X );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||A||_1 = ||A||_oo = \" << infNormOfA << \"\\n\"\n             << \"    ||A||_F            = \" << frobNormOfA << \"\\n\"\n             << \"    ||Z||_1            = \" << oneNormOfZ << \"\\n\"\n             << \"    ||Z||_oo           = \" << infNormOfZ << \"\\n\"\n             << \"    ||Z||_F            = \" << frobNormOfZ << \"\\n\"\n             << \"    ||A Z - Z W||_1    = \" << oneNormOfError << \"\\n\"\n             << \"    ||A Z - Z W||_oo   = \" << infNormOfError << \"\\n\"\n             << \"    ||A Z - Z W||_F    = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestHermitianEig\n( bool testCorrectness, bool print,\n  bool onlyEigvals, char range, bool clustered, UpperOrLower uplo, Int m, \n  Base<F> vl, Base<F> vu, Int il, Int iu, SortType sort, const Grid& g,\n  const HermitianEigCtrl<Base<F>> ctrl )\n{\n    typedef Base<F> Real;\n    DistMatrix<F> A(g), AOrig(g), Z(g);\n    DistMatrix<Real,VR,STAR> w(g);\n\n    if( clustered )\n        Wilkinson( A, m/2 );\n    else\n        HermitianUniformSpectrum( A, m, -10, 10 );\n    if( testCorrectness && !onlyEigvals )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Hermitian eigensolver...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    if( onlyEigvals )\n    {\n        if( range == 'A' )\n            HermitianEig( uplo, A, w, sort, ctrl );\n        else if( range == 'I' )\n            HermitianEig( uplo, A, w, il, iu, sort, ctrl );\n        else\n            HermitianEig( uplo, A, w, vl, vu, sort, ctrl );\n    }\n    else\n    {\n        if( range == 'A' )\n            HermitianEig( uplo, A, w, Z, sort, ctrl );\n        else if( range == 'I' )\n            HermitianEig( uplo, A, w, Z, il, iu, sort, ctrl );\n        else\n            HermitianEig( uplo, A, w, Z, vl, vu, sort, ctrl );\n    }\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds.\" << endl;\n    }\n    if( print )\n    {\n        Print( w, \"eigenvalues:\" );\n        if( !onlyEigvals )\n            Print( Z, \"eigenvectors:\" );\n    }\n    if( testCorrectness && !onlyEigvals )\n        TestCorrectness( print, uplo, A, w, Z, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const bool onlyEigvals = Input\n            (\"--onlyEigvals\",\"only compute eigenvalues?\",false);\n        const char range = Input\n            (\"--range\",\n             \"range of eigenpairs: 'A' for all, 'I' for index range, \"\n             \"'V' for value range\",'A');\n        const Int il = Input(\"--il\",\"lower bound of index range\",0);\n        const Int iu = Input(\"--iu\",\"upper bound of index range\",100);\n        const double vl = Input(\"--vl\",\"lower bound of value range\",0.);\n        const double vu = Input(\"--vu\",\"upper bound of value range\",100.);\n        const Int sortInt = Input(\"--sort\",\"sort type\",0);\n        const bool clustered = Input\n            (\"--cluster\",\"force clustered eigenvalues?\",false);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int nbLocal = Input(\"--nbLocal\",\"local blocksize\",32);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        const bool testReal = Input(\"--testReal\",\"test real matrices?\",true);\n        const bool testCpx = Input(\"--testCpx\",\"test complex matrices?\",true);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n        SetLocalSymvBlocksize<double>( nbLocal );\n        SetLocalSymvBlocksize<Complex<double>>( nbLocal );\n        if( range != 'A' && range != 'I' && range != 'V' )\n            LogicError(\"'range' must be 'A', 'I', or 'V'\");\n        const SortType sort = static_cast<SortType>(sortInt);\n        if( onlyEigvals && testCorrectness && commRank==0 )\n            cout << \"Cannot test correctness with only eigenvalues.\" << endl;\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test HermitianEig \" << uploChar << endl;\n\n        HermitianEigCtrl<double> ctrl;\n\n        if( commRank == 0 )\n            cout << \"Normal tridiag algorithms:\" << endl;\n        ctrl.tridiagCtrl.approach = HERMITIAN_TRIDIAG_NORMAL;\n        if( testReal )\n            TestHermitianEig<double>\n            ( testCorrectness, print, \n              onlyEigvals, range, clustered, uplo, m, vl, vu, il, iu, sort, g,\n              ctrl );\n        if( testCpx )\n            TestHermitianEig<Complex<double>>\n            ( testCorrectness, print, \n              onlyEigvals, range, clustered, uplo, m, vl, vu, il, iu, sort, g,\n              ctrl );\n\n        if( commRank == 0 )\n            cout << \"Square row-major tridiag algorithms:\" << endl;\n        ctrl.tridiagCtrl.approach = HERMITIAN_TRIDIAG_SQUARE;\n        ctrl.tridiagCtrl.order = ROW_MAJOR;\n        if( testReal )\n            TestHermitianEig<double>\n            ( testCorrectness, print, \n              onlyEigvals, range, clustered, uplo, m, vl, vu, il, iu, sort, g,\n              ctrl );\n        if( testCpx )\n            TestHermitianEig<Complex<double>>\n            ( testCorrectness, print, \n              onlyEigvals, range, clustered, uplo, m, vl, vu, il, iu, sort, g,\n              ctrl );\n\n        if( commRank == 0 )\n            cout << \"Square column-major tridiag algorithms:\" << endl;\n        ctrl.tridiagCtrl.approach = HERMITIAN_TRIDIAG_SQUARE;\n        ctrl.tridiagCtrl.order = COLUMN_MAJOR;\n        if( testReal )\n            TestHermitianEig<double>\n            ( testCorrectness, print, \n              onlyEigvals, range, clustered, uplo, m, vl, vu, il, iu, sort, g,\n              ctrl );\n        if( testCpx )\n            TestHermitianEig<Complex<double>>\n            ( testCorrectness, print, \n              onlyEigvals, range, clustered, uplo, m, vl, vu, il, iu, sort, g,\n              ctrl );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/HermitianGenDefiniteEig.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HEMM_INC\n#include ELEM_TRMM_INC\n#include ELEM_TRSM_INC\n#include ELEM_TWOSIDEDTRMM_INC\n#include ELEM_TWOSIDEDTRSM_INC\n#include ELEM_HERMITIANGENDEFINITEEIG_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\n#include ELEM_IDENTITY_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F>\nvoid TestCorrectness\n( bool print,\n  HermitianGenDefiniteEigType eigType,\n  UpperOrLower uplo,\n  const DistMatrix<F>& A,\n  const DistMatrix<F>& B,\n  const DistMatrix<Base<F>,VR,STAR>& w,\n  const DistMatrix<F>& X,\n  const DistMatrix<F>& AOrig,\n  const DistMatrix<F>& BOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = X.Height();\n    const Int k = X.Width();\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Gathering computed eigenvalues...\";\n        cout.flush();\n    }\n    DistMatrix<Real,MR,STAR> w_MR_STAR(true,X.RowAlign(),g); \n    w_MR_STAR = w;\n    if( g.Rank() == 0 )\n        cout << \"DONE\" << endl;\n\n    if( eigType == AXBX )\n    {\n        if( g.Rank() == 0 )\n            cout << \"  Testing for deviation of AX from BXW...\" << endl;\n        // Set Y := BXW, where W is the diagonal eigenvalue matrix\n        DistMatrix<F> Y( g );\n        Y.AlignWith( X );\n        Zeros( Y, n, k );\n        Hemm( LEFT, uplo, F(1), BOrig, X, F(0), Y );\n        DiagonalScale( RIGHT, NORMAL, w_MR_STAR, Y );\n        // Y := Y - AX = BXW - AX\n        Hemm( LEFT, uplo, F(-1), AOrig, X, F(1), Y );\n        // Find the infinity norms of A, B, X, and AX-BXW\n        Real infNormOfA = HermitianInfinityNorm( uplo, AOrig );\n        Real frobNormOfA = HermitianFrobeniusNorm( uplo, AOrig );\n        Real infNormOfB = HermitianInfinityNorm( uplo, BOrig );\n        Real frobNormOfB = HermitianFrobeniusNorm( uplo, BOrig );\n        Real oneNormOfX = OneNorm( X );\n        Real infNormOfX = InfinityNorm( X );\n        Real frobNormOfX = FrobeniusNorm( X );\n        Real oneNormOfError = OneNorm( Y );\n        Real infNormOfError = InfinityNorm( Y );\n        Real frobNormOfError = FrobeniusNorm( Y );\n        if( g.Rank() == 0 )\n        {\n            cout << \"    ||A||_1 = ||A||_oo = \" << infNormOfA << \"\\n\"\n                 << \"    ||A||_F            = \" << frobNormOfA << \"\\n\"\n                 << \"    ||B||_1 = ||B||_oo = \" << infNormOfB << \"\\n\"\n                 << \"    ||B||_F            = \" << frobNormOfB << \"\\n\"\n                 << \"    ||X||_1            = \" << oneNormOfX << \"\\n\"\n                 << \"    ||X||_oo           = \" << infNormOfX << \"\\n\"\n                 << \"    ||X||_F            = \" << frobNormOfX << \"\\n\"\n                 << \"    ||A X - B X W||_1  = \" << oneNormOfError << \"\\n\"\n                 << \"    ||A X - B X W||_oo = \" << infNormOfError << \"\\n\"\n                 << \"    ||A X - B X W||_F  = \" << frobNormOfError << \"\\n\\n\"\n                 << \"  Testing orthonormality of eigenvectors w.r.t. B...\"\n                 << endl;\n        }\n        DistMatrix<F> Z(g);\n        Z = X;\n        if( uplo == LOWER )\n            Trmm( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), B, Z );\n        else\n            Trmm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), B, Z );\n        Identity( Y, k, k );\n        Herk( uplo, ADJOINT, F(-1), Z, F(1), Y );\n        oneNormOfError = OneNorm( Y );\n        infNormOfError = InfinityNorm( Y );\n        frobNormOfError = FrobeniusNorm( Y );\n        if( g.Rank() == 0 )\n            cout << \"    ||X^H B X - I||_1  = \" << oneNormOfError << \"\\n\"\n                 << \"    ||X^H B X - I||_oo = \" << infNormOfError << \"\\n\"\n                 << \"    ||X^H B X - I||_F  = \" << frobNormOfError << endl;\n    }\n    else if( eigType == ABX )\n    {\n        if( g.Rank() == 0 )\n            cout << \"  Testing for deviation of ABX from XW...\" << endl;\n        // Set Y := BX\n        DistMatrix<F> Y( g );\n        Y.AlignWith( X );\n        Zeros( Y, n, k );\n        Hemm( LEFT, uplo, F(1), BOrig, X, F(0), Y );\n        // Set Z := AY = ABX\n        DistMatrix<F> Z( n, k, g );\n        Hemm( LEFT, uplo, F(1), AOrig, Y, F(0), Z );\n        // Set Z := Z - XW = ABX - XW\n        for( Int jLoc=0; jLoc<Z.LocalWidth(); ++jLoc )\n        {\n            const Real omega = w_MR_STAR.GetLocal(jLoc,0); \n            for( Int iLoc=0; iLoc<Z.LocalHeight(); ++iLoc )\n            {\n                const F chi = X.GetLocal(iLoc,jLoc);\n                const F zeta = Z.GetLocal(iLoc,jLoc);\n                Z.SetLocal(iLoc,jLoc,zeta-omega*chi);\n            }\n        }\n        // Find the infinity norms of A, B, X, and ABX-XW\n        Real infNormOfA = HermitianInfinityNorm( uplo, AOrig );\n        Real frobNormOfA = HermitianFrobeniusNorm( uplo, AOrig );\n        Real infNormOfB = HermitianInfinityNorm( uplo, BOrig );\n        Real frobNormOfB = HermitianFrobeniusNorm( uplo, BOrig );\n        Real oneNormOfX = OneNorm( X );\n        Real infNormOfX = InfinityNorm( X );\n        Real frobNormOfX = FrobeniusNorm( X );\n        Real oneNormOfError = OneNorm( Z );\n        Real infNormOfError = InfinityNorm( Z );\n        Real frobNormOfError = FrobeniusNorm( Z );\n        if( g.Rank() == 0 )\n        {\n            cout << \"    ||A||_1 = ||A||_oo = \" << infNormOfA << \"\\n\"\n                 << \"    ||A||_F            = \" << frobNormOfA << \"\\n\"\n                 << \"    ||B||_1 = ||B||_oo = \" << infNormOfB << \"\\n\"\n                 << \"    ||B||_F            = \" << frobNormOfB << \"\\n\"\n                 << \"    ||X||_1            = \" << oneNormOfX << \"\\n\"\n                 << \"    ||X||_oo           = \" << infNormOfX << \"\\n\"\n                 << \"    ||X||_F            = \" << frobNormOfX << \"\\n\"\n                 << \"    ||A B X - X W||_1  = \" << oneNormOfError << \"\\n\"\n                 << \"    ||A B X - X W||_oo = \" << infNormOfError << \"\\n\"\n                 << \"    ||A B X - X W||_F  = \" << frobNormOfError << \"\\n\\n\"\n                 << \"  Testing orthonormality of eigenvectors w.r.t. B...\"\n                 << endl;\n        }\n        Z = X;\n        if( uplo == LOWER )\n            Trmm( LEFT, LOWER, ADJOINT, NON_UNIT, F(1), B, Z );\n        else\n            Trmm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), B, Z );\n        Identity( Y, k, k );\n        Herk( uplo, ADJOINT, F(-1), Z, F(1), Y );\n        oneNormOfError = OneNorm( Y );\n        infNormOfError = InfinityNorm( Y );\n        frobNormOfError = FrobeniusNorm( Y );\n        if( g.Rank() == 0 )\n            cout << \"    ||X^H B X - I||_1  = \" << oneNormOfError << \"\\n\"\n                 << \"    ||X^H B X - I||_oo = \" << infNormOfError << \"\\n\"\n                 << \"    ||X^H B X - I||_F  = \" << frobNormOfError << endl;\n    }\n    else /* eigType == BAX */\n    {\n        if( g.Rank() == 0 )\n            cout << \"  Testing for deviation of BAX from XW...\" << endl;\n        // Set Y := AX\n        DistMatrix<F> Y( g );\n        Y.AlignWith( X );\n        Zeros( Y, n, k );\n        Hemm( LEFT, uplo, F(1), AOrig, X, F(0), Y );\n        // Set Z := BY = BAX\n        DistMatrix<F> Z( n, k, g );\n        Hemm( LEFT, uplo, F(1), BOrig, Y, F(0), Z );\n        // Set Z := Z - XW = BAX-XW\n        for( Int jLoc=0; jLoc<Z.LocalWidth(); ++jLoc )\n        {\n            const Real omega = w_MR_STAR.GetLocal(jLoc,0); \n            for( Int iLoc=0; iLoc<Z.LocalHeight(); ++iLoc )\n            {\n                const F chi = X.GetLocal(iLoc,jLoc);\n                const F zeta = Z.GetLocal(iLoc,jLoc);\n                Z.SetLocal(iLoc,jLoc,zeta-omega*chi);\n            }\n        }\n        // Find the infinity norms of A, B, X, and BAX-XW\n        Real infNormOfA = HermitianInfinityNorm( uplo, AOrig );\n        Real frobNormOfA = HermitianFrobeniusNorm( uplo, AOrig );\n        Real infNormOfB = HermitianInfinityNorm( uplo, BOrig );\n        Real frobNormOfB = HermitianFrobeniusNorm( uplo, BOrig );\n        Real oneNormOfX = OneNorm( X );\n        Real infNormOfX = InfinityNorm( X );\n        Real frobNormOfX = FrobeniusNorm( X );\n        Real oneNormOfError = OneNorm( Z );\n        Real infNormOfError = InfinityNorm( Z );\n        Real frobNormOfError = FrobeniusNorm( Z );\n        if( g.Rank() == 0 )\n        {\n            cout << \"    ||A||_1 = ||A||_oo = \" << infNormOfA << \"\\n\"\n                 << \"    ||A||_F            = \" << frobNormOfA << \"\\n\"\n                 << \"    ||B||_1 = ||B||_oo = \" << infNormOfB << \"\\n\"\n                 << \"    ||B||_F            = \" << frobNormOfB << \"\\n\"\n                 << \"    ||X||_1            = \" << oneNormOfX << \"\\n\"\n                 << \"    ||X||_oo           = \" << infNormOfX << \"\\n\"\n                 << \"    ||X||_F            = \" << frobNormOfX << \"\\n\"\n                 << \"    ||B A X - X W||_1  = \" << oneNormOfError << \"\\n\"\n                 << \"    ||B A X - X W||_oo = \" << infNormOfError << \"\\n\"\n                 << \"    ||B A X - X W||_F  = \" << frobNormOfError << \"\\n\\n\"\n                 << \"  Testing orthonormality of eigenvectors w.r.t. B^-1...\"\n                 << endl;\n        }\n        Z = X;\n        if( uplo == LOWER )\n            Trsm( LEFT, LOWER, NORMAL, NON_UNIT, F(1), B, Z );\n        else\n            Trsm( LEFT, UPPER, ADJOINT, NON_UNIT, F(1), B, Z );\n        Identity( Y, k, k );\n        Herk( uplo, ADJOINT, F(-1), Z, F(1), Y );\n        oneNormOfError = OneNorm( Y );\n        infNormOfError = InfinityNorm( Y );\n        frobNormOfError = FrobeniusNorm( Y );\n        if( g.Rank() == 0 )\n            cout << \"    ||X^H B^-1 X - I||_1  = \" << oneNormOfError << \"\\n\"\n                 << \"    ||X^H B^-1 X - I||_oo = \" << infNormOfError << \"\\n\"\n                 << \"    ||X^H B^-1 X - I||_F  = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestHermitianGenDefiniteEig\n( bool testCorrectness, bool print,\n  HermitianGenDefiniteEigType eigType, \n  bool onlyEigvals, UpperOrLower uplo, \n  Int m, char range, Base<F> vl, Base<F> vu, Int il, Int iu, SortType sort,\n  const Grid& g, const HermitianEigCtrl<Base<F>> ctrl )\n{\n    typedef Base<F> Real;\n    DistMatrix<F> A(g), AOrig(g);\n    DistMatrix<F> B(g), BOrig(g);\n    DistMatrix<Real,VR,STAR> w(g);\n    DistMatrix<F> X(g);\n\n    HermitianUniformSpectrum( A, m, 1, 10 );\n    if( eigType == BAX )\n    {\n        // Because we will multiply by L three times, generate HPD B more \n        // carefully than just adding m to its diagonal entries.\n        Zeros( B, m, m );\n        DistMatrix<F> C(g);\n        Uniform( C, m, m );\n        Herk( uplo, ADJOINT, F(1), C, F(0), B );\n    }\n    else\n        HermitianUniformSpectrum( B, m, 1, 10 );\n\n    if( testCorrectness && !onlyEigvals )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copies of original matrices...\";\n            cout.flush();\n        }\n        AOrig = A;\n        BOrig = B;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n    {\n        Print( A, \"A\" );\n        Print( B, \"B\" );\n    }\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting Hermitian Generalized-Definite Eigensolver...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    if( onlyEigvals )\n    {\n        if( range == 'A' )\n            HermitianGenDefiniteEig\n            ( eigType, uplo, A, B, w, sort, ctrl );\n        else if( range == 'I' )\n            HermitianGenDefiniteEig\n            ( eigType, uplo, A, B, w, il, iu, sort, ctrl );\n        else\n            HermitianGenDefiniteEig\n            ( eigType, uplo, A, B, w, vl, vu, sort, ctrl );\n    }\n    else\n    {\n        if( range == 'A' )\n            HermitianGenDefiniteEig\n            ( eigType, uplo, A, B, w, X, sort, ctrl );\n        else if( range == 'I' )\n            HermitianGenDefiniteEig\n            ( eigType, uplo, A, B, w, X, il, iu, sort, ctrl );\n        else\n            HermitianGenDefiniteEig\n            ( eigType, uplo, A, B, w, X, vl, vu, sort, ctrl );\n    }\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds.\" << endl;\n    }\n    if( print )\n    {\n        Print( w, \"eigenvalues:\" );\n        if( !onlyEigvals )\n            Print( X, \"eigenvectors:\" );\n    }\n    if( testCorrectness && !onlyEigvals )\n    {\n        TestCorrectness\n        ( print, eigType, uplo, A, B, w, X, AOrig, BOrig );\n    }\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int eigInt = Input(\"--eigType\",\n             \"1 is A x = lambda B x, \"\n             \"2 is A B x = lambda x, \"\n             \"3 is B A x = lambda x\",1);\n        const bool onlyEigvals = Input \n            (\"--onlyEigvals\",\"only compute eigenvalues?\",false);\n        const char range = Input\n            (\"--range\",\n             \"range of eigenpairs: 'A' for all, 'I' for index range, \"\n             \"'V' for value range\",'A');\n        const Int il = Input(\"--il\",\"lower bound of index range\",0);\n        const Int iu = Input(\"--iu\",\"upper bound of index range\",100);\n        const double vl = Input(\"--vl\",\"lower bound of value range\",0.);\n        const double vu = Input(\"--vu\",\"upper bound of value range\",100.);\n        const Int sortInt = Input(\"--sort\",\"sort type\",0);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int nbLocal = Input(\"--nbLocal\",\"local blocksize\",32);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        const bool testReal = Input(\"--testReal\",\"test real matrices?\",true);\n        const bool testCpx = Input(\"--testCpx\",\"test complex matrices?\",true);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n        SetLocalSymvBlocksize<double>( nbLocal );\n        SetLocalSymvBlocksize<Complex<double>>( nbLocal );\n        if( range != 'A' && range != 'I' && range != 'V' )\n            throw runtime_error(\"'range' must be 'A', 'I', or 'V'\");\n        const SortType sort = static_cast<SortType>(sortInt);\n        if( testCorrectness && onlyEigvals && commRank==0 )\n            cout << \"Cannot test correctness with only eigenvalues.\" << endl;\n        HermitianGenDefiniteEigType eigType;\n        string eigTypeString;\n        if( eigInt == 1 )\n        {\n            eigType = AXBX;\n            eigTypeString = \"AXBX\";\n        }\n        else if( eigInt == 2 )\n        {\n            eigType = ABX;\n            eigTypeString = \"ABX\";\n        }\n        else if( eigInt == 3 )\n        {\n            eigType = BAX;\n            eigTypeString = \"BAX\";\n        }\n        else\n            LogicError(\"Invalid eigenvalue problem integer\");\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test \" \n                 << ( uplo==LOWER ? \"lower\" : \"upper\" )\n                 << \" \" << eigTypeString << \" HermitianGenDefiniteEig.\" << endl;\n\n        HermitianEigCtrl<double> ctrl;\n\n        if( commRank == 0 )\n            cout << \"Normal tridiag algorithms:\" << endl;\n        ctrl.tridiagCtrl.approach = HERMITIAN_TRIDIAG_NORMAL;\n        if( testReal )\n            TestHermitianGenDefiniteEig<double>\n            ( testCorrectness, print, \n              eigType, onlyEigvals, uplo, m, range, vl, vu, il, iu, sort, g,\n              ctrl );\n        if( testCpx )\n            TestHermitianGenDefiniteEig<Complex<double>>\n            ( testCorrectness, print, \n              eigType, onlyEigvals, uplo, m, range, vl, vu, il, iu, sort, g,\n              ctrl );\n\n        if( commRank == 0 )\n            cout << \"Square row-major algorithms:\" << endl;\n        ctrl.tridiagCtrl.approach = HERMITIAN_TRIDIAG_SQUARE;\n        ctrl.tridiagCtrl.order = ROW_MAJOR;\n        if( testReal )\n            TestHermitianGenDefiniteEig<double>\n            ( testCorrectness, print, \n              eigType, onlyEigvals, uplo, m, range, vl, vu, il, iu, sort, g,\n              ctrl );\n        if( testCpx )\n            TestHermitianGenDefiniteEig<Complex<double>>\n            ( testCorrectness, print, \n              eigType, onlyEigvals, uplo, m, range, vl, vu, il, iu, sort, g,\n              ctrl );\n\n        if( commRank == 0 )\n            cout << \"Square column-major algorithms:\" << endl;\n        ctrl.tridiagCtrl.approach = HERMITIAN_TRIDIAG_SQUARE;\n        ctrl.tridiagCtrl.order = COLUMN_MAJOR;\n        if( testReal )\n            TestHermitianGenDefiniteEig<double>\n            ( testCorrectness, print, \n              eigType, onlyEigvals, uplo, m, range, vl, vu, il, iu, sort, g,\n              ctrl );\n        if( testCpx )\n            TestHermitianGenDefiniteEig<Complex<double>>\n            ( testCorrectness, print, \n              eigType, onlyEigvals, uplo, m, range, vl, vu, il, iu, sort, g,\n              ctrl );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/HermitianTridiag.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_UPDATEDIAGONAL_INC\n#include ELEM_HERMITIANTRIDIAG_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\n#include ELEM_WIGNER_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( UpperOrLower uplo, \n  const DistMatrix<F>& A, \n  const DistMatrix<F,STAR,STAR>& t,\n        DistMatrix<F>& AOrig,\n  bool print, bool display )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = AOrig.Height();\n    const Real infNormAOrig = HermitianInfinityNorm( uplo, AOrig );\n    const Real frobNormAOrig = HermitianFrobeniusNorm( uplo, AOrig );\n    if( g.Rank() == 0 )\n        cout << \"Testing error...\" << endl;\n\n    // Grab the diagonal and subdiagonal of the symmetric tridiagonal matrix\n    Int subdiagonal = ( uplo==LOWER ? -1 : +1 );\n    auto d = A.GetRealPartOfDiagonal();\n    auto e = A.GetRealPartOfDiagonal( subdiagonal );\n     \n    // Grab a full copy of e so that we may fill the opposite subdiagonal \n    DistMatrix<Real,STAR,STAR> e_STAR_STAR( e );\n    DistMatrix<Real,MD,STAR> eOpposite(g);\n    eOpposite.SetRoot( A.DiagonalRoot(-subdiagonal) );\n    eOpposite.AlignCols( A.DiagonalAlign(-subdiagonal) );\n    eOpposite = e_STAR_STAR;\n    \n    // Zero B and then fill its tridiagonal\n    DistMatrix<F> B(g);\n    B.AlignWith( A );\n    Zeros( B, m, m );\n    B.SetRealPartOfDiagonal( d );\n    B.SetRealPartOfDiagonal( e, subdiagonal );\n    B.SetRealPartOfDiagonal( eOpposite, -subdiagonal );\n    if( print )\n        Print( B, \"Tridiagonal\" );\n    if( display )\n        Display( B, \"Tridiagonal\" );\n\n    // Reverse the accumulated Householder transforms, ignoring symmetry\n    herm_tridiag::ApplyQ( LEFT, uplo, NORMAL, A, t, B );\n    herm_tridiag::ApplyQ( RIGHT, uplo, ADJOINT, A, t, B );\n    if( print )\n        Print( B, \"Rotated tridiagonal\" );\n    if( display )\n        Display( B, \"Rotated tridiagonal\" );\n\n    // Compare the appropriate triangle of AOrig and B\n    MakeTriangular( uplo, AOrig );\n    MakeTriangular( uplo, B );\n    Axpy( F(-1), AOrig, B );\n    if( print )\n        Print( B, \"Error in rotated tridiagonal\" );\n    if( display )\n        Display( B, \"Error in rotated tridiagonal\" );\n    const Real infNormError = HermitianInfinityNorm( uplo, B );\n    const Real frobNormError = HermitianFrobeniusNorm( uplo, B );\n\n    // Compute || I - Q Q^H ||\n    MakeIdentity( B );\n    herm_tridiag::ApplyQ( RIGHT, uplo, ADJOINT, A, t, B );\n    DistMatrix<F> QHAdj( g );\n    Adjoint( B, QHAdj );\n    MakeIdentity( B );\n    herm_tridiag::ApplyQ( LEFT, uplo, NORMAL, A, t, B );\n    Axpy( F(-1), B, QHAdj );\n    herm_tridiag::ApplyQ( RIGHT, uplo, ADJOINT, A, t, B );\n    UpdateDiagonal( B, F(-1) );\n    const Real infNormQError = InfinityNorm( B );\n    const Real frobNormQError = FrobeniusNorm( B ); \n\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||A||_oo = \" << infNormAOrig << \"\\n\"\n             << \"    ||A||_F  = \" << frobNormAOrig << \"\\n\"\n             << \"    || I - Q^H Q ||_oo = \" << infNormQError << \"\\n\"\n             << \"    || I - Q^H Q ||_F  = \" << frobNormQError << \"\\n\"\n             << \"    ||A - Q T Q^H||_oo = \" << infNormError << \"\\n\"\n             << \"    ||A - Q T Q^H||_F  = \" << frobNormError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestHermitianTridiag\n( UpperOrLower uplo, Int m, const Grid& g, \n  bool testCorrectness, bool print, bool display, \n  const HermitianTridiagCtrl& ctrl )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    DistMatrix<F,STAR,STAR> t(g);\n\n    //HermitianUniformSpectrum( A, m, -10, 10 );\n    Wigner( A, m );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n    if( display )\n        Display( A, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting tridiagonalization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    HermitianTridiag( uplo, A, t, ctrl );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = 16./3.*Pow(double(m),3.)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        Print( A, \"A after HermitianTridiag\" );\n        Print( t, \"t after HermitianTridiag\" );\n    }\n    if( display )\n    {\n        Display( A, \"A after HermitianTridiag\" );\n        Display( t, \"t after HermitianTridiag\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( uplo, A, t, AOrig, print, display );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int nbLocal = Input(\"--nbLocal\",\"local blocksize\",32);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        const bool testReal = Input(\"--testReal\",\"test real matrices?\",true);\n        const bool testCpx = Input(\"--testCpx\",\"test complex matrices?\",true);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n        SetLocalSymvBlocksize<double>( nbLocal );\n        SetLocalSymvBlocksize<Complex<double>>( nbLocal );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test HermitianTridiag\" << uploChar << endl;\n\n        HermitianTridiagCtrl ctrl;\n\n        if( commRank == 0 )\n            cout << \"Normal algorithms:\" << endl;\n        ctrl.approach = HERMITIAN_TRIDIAG_NORMAL;\n        if( testReal )\n            TestHermitianTridiag<double>\n            ( uplo, m, g, testCorrectness, print, display, ctrl );\n        if( testCpx )\n            TestHermitianTridiag<Complex<double>>\n            ( uplo, m, g, testCorrectness, print, display, ctrl );\n\n        if( commRank == 0 )\n            cout << \"Square row-major algorithm:\" << endl;\n        ctrl.approach = HERMITIAN_TRIDIAG_SQUARE;\n        ctrl.order = ROW_MAJOR;\n        if( testReal )\n            TestHermitianTridiag<double>\n            ( uplo, m, g, testCorrectness, print, display, ctrl );\n        if( testCpx )\n            TestHermitianTridiag<Complex<double>>\n            ( uplo, m, g, testCorrectness, print, display, ctrl );\n\n        if( commRank == 0 )\n            cout << \"Square column-major algorithm:\" << endl;\n        ctrl.approach = HERMITIAN_TRIDIAG_SQUARE;\n        ctrl.order = COLUMN_MAJOR;\n        if( testReal )\n            TestHermitianTridiag<double>\n            ( uplo, m, g, testCorrectness, print, display, ctrl );\n        if( testCpx )\n            TestHermitianTridiag<Complex<double>>\n            ( uplo, m, g, testCorrectness, print, display, ctrl );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/Hessenberg.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_HESSENBERG_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( UpperOrLower uplo, \n  const DistMatrix<F>& A, \n  const DistMatrix<F,STAR,STAR>& t,\n        DistMatrix<F>& AOrig,\n  bool print, bool display )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = AOrig.Height();\n    const Real infNormAOrig = InfinityNorm( AOrig );\n    const Real frobNormAOrig = FrobeniusNorm( AOrig );\n    if( g.Rank() == 0 )\n        cout << \"Testing error...\" << endl;\n\n    // Set H to the appropriate Hessenberg portion of A\n    DistMatrix<F> H( A );\n    if( uplo == LOWER )\n        MakeTrapezoidal( LOWER, H, 1 );\n    else\n        MakeTrapezoidal( UPPER, H, -1 );\n    if( print )\n        Print( H, \"Hessenberg\" );\n    if( display )\n        Display( H, \"Bidiagonal\" );\n\n    if( print || display )\n    {\n        DistMatrix<F> Q(g);\n        Identity( Q, n, n );\n        hessenberg::ApplyQ( uplo, LEFT, NORMAL, A, t, Q );\n        if( print )\n            Print( Q, \"Q\" );\n        if( display )\n            Display( Q, \"Q\" );\n    }\n\n    // Reverse the accumulated Householder transforms\n    hessenberg::ApplyQ( uplo, LEFT, ADJOINT, A, t, AOrig );\n    hessenberg::ApplyQ( uplo, RIGHT, NORMAL, A, t, AOrig );\n    if( print )\n        Print( AOrig, \"Manual Hessenberg\" );\n    if( display )\n        Display( AOrig, \"Manual Hessenberg\" );\n\n    // Compare the appropriate portion of AOrig and B\n    if( uplo == LOWER )\n        MakeTrapezoidal( LOWER, AOrig, 1 );\n    else\n        MakeTrapezoidal( UPPER, AOrig, -1 );\n    Axpy( F(-1), AOrig, H );\n    if( print )\n        Print( H, \"Error in rotated Hessenberg\" );\n    if( display )\n        Display( H, \"Error in rotated Hessenberg\" );\n    const Real infNormError = InfinityNorm( H );\n    const Real frobNormError = FrobeniusNorm( H );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||A||_oo = \" << infNormAOrig << \"\\n\"\n             << \"    ||A||_F  = \" << frobNormAOrig << \"\\n\"\n             << \"    ||H - Q^H A Q||_oo = \" << infNormError << \"\\n\"\n             << \"    ||H - Q^H A Q||_F  = \" << frobNormError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestHessenberg\n( UpperOrLower uplo, Int n, const Grid& g, bool testCorrectness, \n  bool print, bool display )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    DistMatrix<F,STAR,STAR> t(g);\n\n    Uniform( A, n, n );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n    if( display )\n        Display( A, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting reduction to Hessenberg form...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    Hessenberg( uplo, A, t );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    // TODO: Flop calculation\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds.\" << std::endl;\n    }\n    if( print )\n    {\n        Print( A, \"A after Hessenberg\" );\n        Print( t, \"t after Hessenberg\" );\n    }\n    if( display )\n    {\n        Display( A, \"A after Hessenberg\" );\n        Display( t, \"t after Hessenberg\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( uplo, A, t, AOrig, print, display );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const Int n = Input(\"--height\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n\n        if( commRank == 0 )\n            cout << \"Double-precision:\" << endl;\n        TestHessenberg<double>( uplo, n, g, testCorrectness, print, display );\n\n        if( commRank == 0 )\n            cout << \"Double-precision complex:\" << endl;\n        TestHessenberg<Complex<double>>\n        ( uplo, n, g, testCorrectness, print, display );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/LDL.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_DIAGONALSCALE_INC\n#include ELEM_HEMM_INC\n#include ELEM_SYMM_INC\n#include ELEM_TRMM_INC\n#include ELEM_LDL_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F,Dist UPerm> \nvoid TestCorrectness\n( bool conjugated, bool print, \n  const DistMatrix<F>& A,\n  const DistMatrix<F,MD,STAR>& dSub,\n  const DistMatrix<Int,UPerm,STAR>& pPerm,\n  const DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = AOrig.Height();\n\n    DistMatrix<F> X(g), Y(g);\n    Uniform( X, m, 100 );\n    Y = X;\n\n    // Test correctness by comparing the application of AOrig against a \n    // random set of 100 vectors to the application of tril(A) tril(A)^H\n    if( print )\n        Print( X, \"X\" );\n    ldl::MultiplyAfter( A, dSub, pPerm, Y, conjugated );\n    if( print )\n        Print( Y, \"P' L B L' P X\" );\n    Symm( LEFT, LOWER, F(-1), AOrig, X, F(1), Y, conjugated );\n    if( print )\n        Print( Y, \"P' L B L' P X - A X\" );\n    const Real oneNormOfError = OneNorm( Y );\n    const Real infNormOfError = InfinityNorm( Y );\n    const Real frobNormOfError = FrobeniusNorm( Y );\n    const Real infNormOfA = HermitianInfinityNorm( LOWER, AOrig );\n    const Real frobNormOfA = HermitianFrobeniusNorm( LOWER, AOrig );\n    const Real oneNormOfX = OneNorm( X );\n    const Real infNormOfX = InfinityNorm( X );\n    const Real frobNormOfX = FrobeniusNorm( X );\n    if( g.Rank() == 0 )\n    {\n        cout << \"||A||_1 = ||A||_oo   = \" << infNormOfA << \"\\n\"\n             << \"||A||_F              = \" << frobNormOfA << \"\\n\"\n             << \"||X||_1              = \" << oneNormOfX << \"\\n\"\n             << \"||X||_oo             = \" << infNormOfX << \"\\n\"\n             << \"||X||_F              = \" << frobNormOfX << \"\\n\"\n             << \"||A X - L D L^[T/H] X||_1  = \" << oneNormOfError << \"\\n\"\n             << \"||A X - L D L^[T/H] X||_oo = \" << infNormOfError << \"\\n\"\n             << \"||A X - L D L^[T/H] X||_F  = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F,Dist UPerm> \nvoid TestLDL\n( bool conjugated, bool testCorrectness, bool print, \n  Int m, const Grid& g )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    if( conjugated )\n        HermitianUniformSpectrum( A, m, -100, 100 );\n    else\n        Uniform( A, m, m );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting LDL^[T/H] factorization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    DistMatrix<F,MD,STAR> dSub(g);\n    DistMatrix<Int,UPerm,STAR> pPerm(g);\n    if( conjugated )\n        LDLH( A, dSub, pPerm );\n    else\n        LDLT( A, dSub, pPerm );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = 1./3.*Pow(double(m),3.)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE.\\n\"\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        Print( A, \"A after factorization\" );\n        Print( pPerm, \"pPerm\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( conjugated, print, A, dSub, pPerm, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"process grid height\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int nbLocal = Input(\"--nbLocal\",\"local blocksize\",32);\n        const bool conjugated = Input(\"--conjugate\",\"conjugate LDL?\",false);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        SetBlocksize( nb );\n        SetLocalTrrkBlocksize<double>( nbLocal );\n        SetLocalTrrkBlocksize<Complex<double>>( nbLocal );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test LDL\" << (conjugated?\"^H\":\"^T\") << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestLDL<double,VC>( conjugated, testCorrectness, print, m, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestLDL<Complex<double>,VC>( conjugated, testCorrectness, print, m, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/LQ.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_LQ_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( bool print,\n  const DistMatrix<F>& A,\n  const DistMatrix<F,MD,STAR>& t,\n  const DistMatrix<Base<F>,MD,STAR>& d,\n        DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = std::min(m,n);\n\n    if( g.Rank() == 0 )\n        cout << \"  Testing orthogonality of Q...\" << endl;\n\n    // Form Z := Q Q^H as an approximation to identity\n    DistMatrix<F> Z(g);\n    Identity( Z, m, n );\n    lq::ApplyQ( RIGHT, NORMAL, A, t, d, Z );\n    lq::ApplyQ( RIGHT, ADJOINT, A, t, d, Z );\n    auto ZUpper = View( Z, 0, 0, minDim, minDim );\n\n    // Form X := I - Q Q^H\n    DistMatrix<F> X(g);\n    Identity( X, minDim, minDim );\n    Axpy( F(-1), ZUpper, X );\n\n    Real oneNormOfError = OneNorm( X );\n    Real infNormOfError = InfinityNorm( X );\n    Real frobNormOfError = FrobeniusNorm( X );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||Q Q^H - I||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||Q Q^H - I||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||Q Q^H - I||_F  = \" << frobNormOfError << endl;\n    }\n\n    if( g.Rank() == 0 )\n        cout << \"  Testing if A = LQ...\" << endl;\n\n    // Form L Q\n    auto L( A );\n    MakeTriangular( LOWER, L );\n    lq::ApplyQ( RIGHT, NORMAL, A, t, d, L );\n\n    // Form L Q - A\n    Axpy( F(-1), AOrig, L );\n    \n    const Real oneNormOfA = OneNorm( AOrig );\n    const Real infNormOfA = InfinityNorm( AOrig );\n    const Real frobNormOfA = FrobeniusNorm( AOrig );\n    oneNormOfError = OneNorm( L );\n    infNormOfError = InfinityNorm( L );\n    frobNormOfError = FrobeniusNorm( L );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||A||_1       = \" << oneNormOfA << \"\\n\"\n             << \"    ||A||_oo      = \" << infNormOfA << \"\\n\"\n             << \"    ||A||_F       = \" << frobNormOfA << \"\\n\"\n             << \"    ||A - LQ||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||A - LQ||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||A - LQ||_F  = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestLQ( bool testCorrectness, bool print, Int m, Int n, const Grid& g )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    Uniform( A, m, n );\n\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting LQ factorization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    LQ( A, t, d );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double mD = double(m);\n    const double nD = double(n);\n    const double realGFlops = (8.*mD*mD*nD - 8./3.*mD*mD*mD)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        Print( A, \"A after factorization\" );\n        Print( t, \"phases\" );\n        Print( d, \"diagonal\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( print, A, t, d, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test LQ\" << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestLQ<double>( testCorrectness, print, m, n, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestLQ<Complex<double>>( testCorrectness, print, m, n, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/LU.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMM_INC\n#include ELEM_LU_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_UNIFORM_INC\n#include ELEM_EXPLICITPERMUTATION_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F,Dist UPerm> \nvoid TestCorrectness\n( Int pivoting, bool print, \n  const DistMatrix<F>& A,\n  const DistMatrix<Int,UPerm,STAR>& pPerm,\n  const DistMatrix<Int,UPerm,STAR>& qPerm,\n  const DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = AOrig.Height();\n\n    if( g.Rank() == 0 )\n        cout << \"Testing error...\" << endl;\n\n    // Generate random right-hand sides\n    DistMatrix<F> X(g);\n    Uniform( X, m, 100 );\n    auto Y( X );\n    if( pivoting == 0 )\n        lu::SolveAfter( NORMAL, A, Y );\n    else if( pivoting == 1 )\n        lu::SolveAfter( NORMAL, A, pPerm, Y );\n    else\n        lu::SolveAfter( NORMAL, A, pPerm, qPerm, Y );\n\n    // Now investigate the residual, ||AOrig Y - X||_oo\n    const Real oneNormOfX = OneNorm( X );\n    const Real infNormOfX = InfinityNorm( X );\n    const Real frobNormOfX = FrobeniusNorm( X );\n    Gemm( NORMAL, NORMAL, F(-1), AOrig, Y, F(1), X );\n    const Real oneNormOfError = OneNorm( X );\n    const Real infNormOfError = InfinityNorm( X );\n    const Real frobNormOfError = FrobeniusNorm( X );\n    const Real oneNormOfA = OneNorm( AOrig );\n    const Real infNormOfA = InfinityNorm( AOrig );\n    const Real frobNormOfA = FrobeniusNorm( AOrig );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"||A||_1             = \" << oneNormOfA << \"\\n\"\n             << \"||A||_oo            = \" << infNormOfA << \"\\n\"\n             << \"||A||_F             = \" << frobNormOfA << \"\\n\"\n             << \"||X||_1             = \" << oneNormOfX << \"\\n\"\n             << \"||X||_oo            = \" << infNormOfX << \"\\n\"\n             << \"||X||_F             = \" << frobNormOfX << \"\\n\"\n             << \"||A A^-1 X - X||_1  = \" << oneNormOfError << \"\\n\"\n             << \"||A A^-1 X - X||_oo = \" << infNormOfError << \"\\n\"\n             << \"||A A^-1 X - X||_F  = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F,Dist UPerm> \nvoid TestLU\n( Int pivoting, bool testCorrectness, bool print, \n  Int m, const Grid& g )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    DistMatrix<Int,UPerm,STAR> pPerm(g), qPerm(g);\n\n    Uniform( A, m, m );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting LU factorization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    if( pivoting == 0 )\n        LU( A );\n    else if( pivoting == 1 )\n        LU( A, pPerm );\n    else if( pivoting == 2 )\n        LU( A, pPerm, qPerm );\n\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = 2./3.*Pow(double(m),3.)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        Print( A, \"A after factorization\" );\n        if( pivoting >= 1 )\n        {\n            Print( pPerm, \"pPerm after factorization\");\n            DistMatrix<Int> P(g);\n            ExplicitPermutation( pPerm, P );\n            Print( P, \"P\" );\n        }\n        if( pivoting == 2 )\n        {\n            Print( qPerm, \"qPerm after factorization\");\n            DistMatrix<Int> Q(g);\n            ExplicitPermutation( qPerm, Q );\n            Print( Q, \"Q\" );\n        }\n    }\n    if( testCorrectness )\n        TestCorrectness( pivoting, print, A, pPerm, qPerm, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const Int pivot = Input(\"--pivot\",\"0: none, 1: partial, 2: full\",1);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n        if( pivot < 0 || pivot > 2 )\n            LogicError(\"Invalid pivot value\");\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n        {\n            cout << \"Will test LU with \";\n            if( pivot == 0 )\n                cout << \"no pivoting\" << std::endl;\n            else if( pivot == 1 )\n                cout << \"partial pivoting\" << std::endl;\n            else if( pivot == 2 )\n                cout << \"full pivoting\" << std::endl;\n        }\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestLU<double,MC>( pivot, testCorrectness, print, m, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestLU<Complex<double>,MC>( pivot, testCorrectness, print, m, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/LUMod.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMM_INC\n#include ELEM_GER_INC\n#include ELEM_GERU_INC\n#include ELEM_LU_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_UNIFORM_INC\n#include ELEM_EXPLICITPERMUTATION_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F,Dist UPerm> \nvoid TestCorrectness\n( bool print, \n  const DistMatrix<F>& A,\n  const DistMatrix<Int,UPerm,STAR>& perm,\n  const DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = AOrig.Width();\n\n    if( g.Rank() == 0 )\n        cout << \"Testing error...\" << endl;\n\n    // Generate random right-hand sides\n    DistMatrix<F> X(g);\n    Uniform( X, n, 100 );\n    auto Y( X );\n    lu::SolveAfter( NORMAL, A, perm, Y );\n\n    // Now investigate the residual, ||AOrig Y - X||_oo\n    const Real oneNormOfX = OneNorm( X );\n    const Real infNormOfX = InfinityNorm( X );\n    const Real frobNormOfX = FrobeniusNorm( X );\n    Gemm( NORMAL, NORMAL, F(-1), AOrig, Y, F(1), X );\n    const Real oneNormOfError = OneNorm( X );\n    const Real infNormOfError = InfinityNorm( X );\n    const Real frobNormOfError = FrobeniusNorm( X );\n    const Real oneNormOfA = OneNorm( AOrig );\n    const Real infNormOfA = InfinityNorm( AOrig );\n    const Real frobNormOfA = FrobeniusNorm( AOrig );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"||A||_1             = \" << oneNormOfA << \"\\n\"\n             << \"||A||_oo            = \" << infNormOfA << \"\\n\"\n             << \"||A||_F             = \" << frobNormOfA << \"\\n\"\n             << \"||X||_1             = \" << oneNormOfX << \"\\n\"\n             << \"||X||_oo            = \" << infNormOfX << \"\\n\"\n             << \"||X||_F             = \" << frobNormOfX << \"\\n\"\n             << \"||A A^-1 X - X||_1  = \" << oneNormOfError << \"\\n\"\n             << \"||A A^-1 X - X||_oo = \" << infNormOfError << \"\\n\"\n             << \"||A A^-1 X - X||_F  = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F,Dist UPerm> \nvoid TestLUMod\n( bool conjugate, Base<F> tau,\n  bool testCorrectness, bool print, Int m, const Grid& g )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    DistMatrix<Int,UPerm,STAR> perm(g);\n\n    Uniform( A, m, m );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Starting full LU factorization...\";\n            cout.flush();\n        }\n        mpi::Barrier( g.Comm() );\n        const double startTime = mpi::Time();\n        LU( A, perm );\n        mpi::Barrier( g.Comm() );\n        const double runTime = mpi::Time() - startTime;\n        const double realGFlops = 2./3.*Pow(double(m),3.)/(1.e9*runTime);\n        const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n        if( g.Rank() == 0 )\n            cout << \"DONE.\\n\" << \"  Time = \" << runTime << \" seconds. GFlops = \"\n                 << gFlops << endl;\n    }\n\n    if( print )\n    {\n        Print( A, \"A after original factorization\" );\n        Print( perm, \"perm after original factorization\");\n        DistMatrix<Int> P(g);\n        ExplicitPermutation( perm, P );\n        Print( P, \"P\" );\n    }\n\n    // Generate random vectors u and v\n    DistMatrix<F> u(g), v(g);\n    Uniform( u, m, 1 );\n    Uniform( v, m, 1 );\n    if( testCorrectness )\n    {\n        if( conjugate )\n            Ger( F(1), u, v, AOrig );\n        else\n            Geru( F(1), u, v, AOrig );\n    }\n\n    { \n        if( g.Rank() == 0 )\n        {\n            cout << \"  Starting rank-one LU modification...\";\n            cout.flush();\n        }\n        mpi::Barrier( g.Comm() );\n        const double startTime = mpi::Time();\n        LUMod( A, perm, u, v, conjugate, tau );\n        mpi::Barrier( g.Comm() );\n        const double runTime = mpi::Time() - startTime;\n        if( g.Rank() == 0 )\n            cout << \"DONE.\\n\" << \"  Time = \" << runTime << \" seconds.\" << endl;\n    }\n\n    if( print )\n    {\n        Print( A, \"A after modification\" );\n        Print( perm, \"perm after modification\");\n        DistMatrix<Int> P(g);\n        ExplicitPermutation( perm, P );\n        Print( P, \"P\" );\n    }\n\n    if( testCorrectness )\n        TestCorrectness( print, A, perm, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const double tau = Input(\"--tau\",\"pivot threshold\",0.1);\n        const bool conjugate = Input(\"--conjugate\",\"conjugate v?\",true);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestLUMod<double,MC>( conjugate, tau, testCorrectness, print, m, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestLUMod<Complex<double>,MC>\n        ( conjugate, tau, testCorrectness, print, m, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/MultiShiftHessSolve.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_CONJUGATE_INC\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_UPDATEDIAGONAL_INC\n#include ELEM_AXPY_INC\n#include ELEM_GEMM_INC\n#include ELEM_MULTISHIFTHESSSOLVE_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\n// Test if (op(H) - mu_j I) x_j = y_j for each j.\n// This is checked by testing the norm of  op(H) X - X Mu - Y.\ntemplate<typename F> \nvoid TestCorrectness\n( UpperOrLower uplo, Orientation orientation, const DistMatrix<F,VC,STAR>& H, \n  const DistMatrix<F,VR,STAR>& shifts, \n  const DistMatrix<F,STAR,VR>& X, \n  const DistMatrix<F,STAR,VR>& Y, bool print, bool display )\n{\n    typedef Base<F> Real;\n    const Int m = X.Height();\n    const Int n = X.Width();\n\n    auto modShifts( shifts );\n    if( orientation == ADJOINT )\n        Conjugate( modShifts );\n    \n    DistMatrix<F> Z( Y );\n    for( Int j=0; j<n; ++j )\n    {\n        auto x = LockedView( X, 0, j, m, 1 );\n        auto z =       View( Z, 0, j, m, 1 );\n        Axpy( modShifts.Get(j,0), x, z );\n    }\n    {\n        DistMatrix<F> H_MC_MR( H ), X_MC_MR(X);\n        Gemm( orientation, NORMAL, F(-1), H_MC_MR, X_MC_MR, F(1), Z );\n    }\n\n    if( print )\n    {\n        Print( H, \"H\" );\n        Print( X, \"X\" );\n        Print( Y, \"Y\" );\n        Print( shifts, \"shifts\" );\n        Print( Z, \"-H X + X Mu + Y\" );\n    }\n    if( display )\n    {\n        Display( H, \"H\" );\n        Display( X, \"X\" );\n        Display( Y, \"Y\" );\n        Display( shifts, \"shifts\" );\n        Display( Z, \"-H X + X Mu + Y\" );\n    }\n\n    const Real YFrob = FrobeniusNorm( Y );\n    const Real YInf = InfinityNorm( Y );\n    const Real HFrob = FrobeniusNorm( H );\n    const Real HInf = InfinityNorm( H );\n    const Real ZFrob = FrobeniusNorm( Z );\n    const Real ZInf = InfinityNorm( Z );\n    if( mpi::WorldRank() == 0 )\n    {\n        std::cout << \"    || H ||_F  = \" << HFrob << \"\\n\"\n                  << \"    || H ||_oo = \" << HInf << \"\\n\"\n                  << \"    || Y ||_F  = \" << YFrob << \"\\n\"\n                  << \"    || Y ||_oo = \" << YInf << \"\\n\"\n                  << \"    || H X - X Mu - Y ||_F  = \" << ZFrob << \"\\n\"\n                  << \"    || H X - X Mu - Y ||_oo = \" << ZInf << \"\\n\"\n                  << std::endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestHessenberg\n( UpperOrLower uplo, Orientation orientation, Int m, Int n, \n  bool testCorrectness, bool print, bool display, const Grid& g )\n{\n    DistMatrix<F,VC,STAR> H(g);\n    DistMatrix<F,STAR,VR> X(g), Y(g);\n    DistMatrix<F,VR,STAR> shifts(g);\n\n    Uniform( H, m, m );\n    UpdateDiagonal( H, F(5) ); // ensure that H-mu is far from zero\n    if( uplo == LOWER )\n        MakeTrapezoidal( LOWER, H, 1 );\n    else\n        MakeTrapezoidal( UPPER, H, -1 );\n\n    Uniform( X, m, n );\n    Uniform( Y, m, n );\n    Uniform( shifts, n, 1 );\n\n    X = Y;\n    if( mpi::WorldRank() == 0 )\n    {\n        std::cout << \"  Starting Hessenberg solve...\";\n        std::cout.flush();\n    }\n    mpi::Barrier( mpi::COMM_WORLD );\n    const double startTime = mpi::Time();\n    MultiShiftHessSolve( uplo, orientation, F(1), H, shifts, X );\n    mpi::Barrier( mpi::COMM_WORLD );\n    const double runTime = mpi::Time() - startTime;\n    // TODO: Flop calculation\n    if( mpi::WorldRank() == 0 )\n    {\n        std::cout << \"DONE. \" << std::endl\n                  << \"  Time = \" << runTime << \" seconds.\" << std::endl;\n    }\n    if( testCorrectness )\n        TestCorrectness( uplo, orientation, H, shifts, X, Y, print, display );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    try\n    {\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const char orientChar = Input(\"--orient\",\"orientation: N/T/C\",'N');\n        const Int m = Input(\"--m\",\"height of Hessenberg matrix\",100);\n        const Int n = Input(\"--n\",\"number of right-hand sides\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid grid( comm, order );\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orient = CharToOrientation( orientChar );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n\n        if( commRank == 0 )\n            std::cout << \"Double-precision:\" << std::endl;\n        TestHessenberg<double>\n        ( uplo, orient, m, n, testCorrectness, print, display, grid );\n\n        if( commRank == 0 )\n            std::cout << \"Double-precision complex:\" << std::endl;\n        TestHessenberg<Complex<double>>\n        ( uplo, orient, m, n, testCorrectness, print, display, grid );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/QR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_QR_INC\n#include ELEM_ONENORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F>\nvoid TestCorrectness\n( const DistMatrix<F>& A,\n  const DistMatrix<F,MD,STAR>& t,\n  const DistMatrix<Base<F>,MD,STAR>& d,\n        DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = std::min(m,n);\n\n    if( g.Rank() == 0 )\n        cout << \"  Testing orthogonality of Q...\" << endl;\n\n    // Form Z := Q^H Q as an approximation to identity\n    DistMatrix<F> Z(g);\n    Identity( Z, m, n );\n    qr::ApplyQ( LEFT, NORMAL, A, t, d, Z );\n    qr::ApplyQ( LEFT, ADJOINT, A, t, d, Z );\n    auto ZUpper = View( Z, 0, 0, minDim, minDim );\n\n    // Form X := I - Q^H Q\n    DistMatrix<F> X(g);\n    Identity( X, minDim, minDim );\n    Axpy( F(-1), ZUpper, X );\n\n    Real oneNormOfError = OneNorm( X );\n    Real infNormOfError = InfinityNorm( X );\n    Real frobNormOfError = FrobeniusNorm( X );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||Q^H Q - I||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||Q^H Q - I||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||Q^H Q - I||_F  = \" << frobNormOfError << endl;\n    }\n\n    if( g.Rank() == 0 )\n        cout << \"  Testing if A = QR...\" << endl;\n\n    // Form Q R\n    auto U( A );\n    MakeTriangular( UPPER, U );\n    qr::ApplyQ( LEFT, NORMAL, A, t, d, U );\n\n    // Form Q R - A\n    Axpy( F(-1), AOrig, U );\n    \n    const Real oneNormOfA = OneNorm( AOrig );\n    const Real infNormOfA = InfinityNorm( AOrig );\n    const Real frobNormOfA = FrobeniusNorm( AOrig );\n    oneNormOfError = OneNorm( U );\n    infNormOfError = InfinityNorm( U );\n    frobNormOfError = FrobeniusNorm( U );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||A||_1       = \" << oneNormOfA << \"\\n\"\n             << \"    ||A||_oo      = \" << infNormOfA << \"\\n\"\n             << \"    ||A||_F       = \" << frobNormOfA << \"\\n\"\n             << \"    ||A - QR||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||A - QR||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||A - QR||_F  = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestQR( bool testCorrectness, bool print, Int m, Int n, const Grid& g )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n\n    Uniform( A, m, n );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting QR factorization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    QR( A, t, d );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double mD = double(m);\n    const double nD = double(n);\n    const double realGFlops = (8.*mD*nD*nD - 8./3.*nD*nD*nD)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        Print( A, \"A after factorization\" );\n        Print( t, \"phases\" );\n        Print( d, \"diagonal\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( A, t, d, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test QR\" << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestQR<double>( testCorrectness, print, m, n, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestQR<Complex<double>>( testCorrectness, print, m, n, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/README.md",
    "content": "### `tests/lapack-like`\n\nThis folder contains correctness tests of a few of Elemental's LAPACK-like \nroutines. More details will hopefully follow soon.\n\n-  `ApplyPackedReflectors.cpp`\n-  `Cholesky.cpp`\n-  `CholeskyQR.cpp`\n-  `HermitianEig.cpp`\n-  `HermitianGenDefiniteEig.cpp`\n-  `HermitianTridiag.cpp`\n-  `LDL.cpp`\n-  `LQ.cpp`\n-  `LU.cpp`\n-  `QR.cpp`\n-  `RQ.cpp`\n-  `SequentialLU.cpp`\n-  `TriangularInverse.cpp`\n-  `TSQR.cpp`\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/RQ.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_RQ_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F>\nvoid TestCorrectness\n( const DistMatrix<F>& A,\n  const DistMatrix<F,MD,STAR>& t,\n  const DistMatrix<Base<F>,MD,STAR>& d,\n        DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = A.Height();\n    const Int n = A.Width();\n    const Int minDim = std::min(m,n);\n\n    if( g.Rank() == 0 )\n        cout << \"  Testing orthogonality of Q...\" << endl;\n\n    // Form Z := Q Q^H as an approximation to identity\n    DistMatrix<F> Z(g);\n    Identity( Z, m, n );\n    rq::ApplyQ( RIGHT, NORMAL, A, t, d, Z );\n    rq::ApplyQ( RIGHT, ADJOINT, A, t, d, Z );\n    auto ZUpper = View( Z, 0, 0, minDim, minDim );\n\n    // Form X := I - Q Q^H\n    DistMatrix<F> X(g);\n    Identity( X, minDim, minDim );\n    Axpy( F(-1), ZUpper, X );\n\n    Real oneNormOfError = OneNorm( X );\n    Real infNormOfError = InfinityNorm( X );\n    Real frobNormOfError = FrobeniusNorm( X );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||Q^H Q - I||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||Q^H Q - I||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||Q^H Q - I||_F  = \" << frobNormOfError << endl;\n    }\n\n    if( g.Rank() == 0 )\n        cout << \"  Testing if A = RQ...\" << endl;\n\n    // Form RQ\n    auto U( A );\n    MakeTrapezoidal( UPPER, U, U.Width()-U.Height() );\n    rq::ApplyQ( RIGHT, NORMAL, A, t, d, U );\n\n    // Form R Q - A\n    Axpy( F(-1), AOrig, U );\n    \n    const Real oneNormOfA = OneNorm( AOrig );\n    const Real infNormOfA = InfinityNorm( AOrig );\n    const Real frobNormOfA = FrobeniusNorm( AOrig );\n    oneNormOfError = OneNorm( U );\n    infNormOfError = InfinityNorm( U );\n    frobNormOfError = FrobeniusNorm( U );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||A||_1       = \" << oneNormOfA << \"\\n\"\n             << \"    ||A||_oo      = \" << infNormOfA << \"\\n\"\n             << \"    ||A||_F       = \" << frobNormOfA << \"\\n\"\n             << \"    ||A - RQ||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||A - RQ||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||A - RQ||_F  = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestRQ( bool testCorrectness, bool print, Int m, Int n, const Grid& g )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    DistMatrix<F,MD,STAR> t(g);\n    DistMatrix<Base<F>,MD,STAR> d(g);\n\n    Uniform( A, m, n );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting RQ factorization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    RQ( A, t, d );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double mD = double(m);\n    const double nD = double(n);\n    const double realGFlops = (8.*mD*nD*nD - 8./3.*nD*nD*nD)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        Print( A, \"A after factorization\" );\n        Print( t, \"phases\" );\n        Print( d, \"diagonal\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( A, t, d, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test RQ\" << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestRQ<double>( testCorrectness, print, m, n, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestRQ<Complex<double>>( testCorrectness, print, m, n, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/SequentialBidiag.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_BIDIAG_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( const Matrix<F>& A, const Matrix<F>& tP, const Matrix<F>& tQ,\n        Matrix<F>& AOrig,\n  bool print, bool display )\n{\n    typedef Base<F> Real;\n    const Int m = AOrig.Height();\n    const Int n = AOrig.Width();\n    const Real infNormAOrig = InfinityNorm( AOrig );\n    const Real frobNormAOrig = FrobeniusNorm( AOrig );\n    if( mpi::WorldRank() == 0 )\n        cout << \"Testing error...\" << endl;\n\n    // Grab the diagonal and superdiagonal of the bidiagonal matrix\n    auto d = A.GetDiagonal( 0 );\n    auto e = A.GetDiagonal( (m>=n ? 1 : -1) );\n\n    // Zero B and then fill its bidiagonal\n    Matrix<F> B;\n    Zeros( B, m, n );\n    B.SetDiagonal( d, 0  );\n    B.SetDiagonal( e, (m>=n ? 1 : -1) );\n    if( print && mpi::WorldRank() == 0 )\n        Print( B, \"Bidiagonal\" );\n    if( display && mpi::WorldRank() == 0 )\n        Display( B, \"Bidiagonal\" );\n\n    if( print || display )\n    {\n        Matrix<F> Q, P;\n        Identity( Q, m, m );\n        Identity( P, n, n );\n        bidiag::ApplyQ( LEFT,  NORMAL, A, tQ, Q );\n        bidiag::ApplyP( RIGHT, NORMAL, A, tP, P );\n        if( print && mpi::WorldRank() == 0 )\n        {\n            Print( Q, \"Q\" );\n            Print( P, \"P\" );\n        }\n        if( display && mpi::WorldRank() == 0 )\n        {\n            Display( Q, \"Q\" );\n            Display( P, \"P\" );\n        }\n    }\n\n    // Reverse the accumulated Householder transforms\n    bidiag::ApplyQ( LEFT,  ADJOINT, A, tQ, AOrig );\n    bidiag::ApplyP( RIGHT, NORMAL,  A, tP, AOrig );\n    if( print && mpi::WorldRank() == 0 )\n        Print( AOrig, \"Manual bidiagonal\" );\n    if( display && mpi::WorldRank() == 0 )\n        Display( AOrig, \"Manual bidiagonal\" );\n\n    // Compare the appropriate portion of AOrig and B\n    if( m >= n )\n    {\n        MakeTriangular( UPPER, AOrig );\n        MakeTrapezoidal( LOWER, AOrig, 1 );\n    }\n    else\n    {\n        MakeTriangular( LOWER, AOrig );\n        MakeTrapezoidal( UPPER, AOrig, -1 );\n    }\n    Axpy( F(-1), AOrig, B );\n    if( print && mpi::WorldRank() == 0 )\n        Print( B, \"Error in rotated bidiagonal\" );\n    if( display && mpi::WorldRank() == 0 )\n        Display( B, \"Error in rotated bidiagonal\" );\n    const Real infNormError = InfinityNorm( B );\n    const Real frobNormError = FrobeniusNorm( B );\n\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"    ||A||_oo = \" << infNormAOrig << \"\\n\"\n             << \"    ||A||_F  = \" << frobNormAOrig << \"\\n\"\n             << \"    ||B - Q^H A P||_oo = \" << infNormError << \"\\n\"\n             << \"    ||B - Q^H A P||_F  = \" << frobNormError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestBidiag( Int m, Int n, bool testCorrectness, bool print, bool display )\n{\n    Matrix<F> A, AOrig;\n    Matrix<F> tP, tQ;\n\n    Uniform( A, m, n );\n    if( testCorrectness )\n    {\n        if( mpi::WorldRank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( mpi::WorldRank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print && mpi::WorldRank() == 0 )\n        Print( A, \"A\" );\n    if( display && mpi::WorldRank() == 0 )\n        Display( A, \"A\" );\n\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"  Starting bidiagonalization...\";\n        cout.flush();\n    }\n    mpi::Barrier( mpi::COMM_WORLD );\n    const double startTime = mpi::Time();\n    Bidiag( A, tP, tQ );\n    mpi::Barrier( mpi::COMM_WORLD );\n    const double runTime = mpi::Time() - startTime;\n    // TODO: Flop calculation\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds.\" << std::endl;\n    }\n    if( print && mpi::WorldRank() == 0 )\n    {\n        Print( A, \"A after Bidiag\" );\n        Print( tP, \"tP after Bidiag\" );\n        Print( tQ, \"tQ after Bidiag\" );\n    }\n    if( display && mpi::WorldRank() == 0 )\n    {\n        Display( A, \"A after Bidiag\" );\n        Display( tP, \"tP after Bidiag\" );\n        Display( tQ, \"tQ after Bidiag\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( A, tP, tQ, AOrig, print, display );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        SetBlocksize( nb );\n        ComplainIfDebug();\n\n        if( commRank == 0 )\n            cout << \"Double-precision:\" << endl;\n        TestBidiag<double>( m, n, testCorrectness, print, display );\n\n        if( commRank == 0 )\n            cout << \"Double-precision complex:\" << endl;\n        TestBidiag<Complex<double>>( m, n, testCorrectness, print, display );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/SequentialCholeskyMod.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_HEMM_INC\n#include ELEM_TRMM_INC\n#include ELEM_CHOLESKY_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F>\nvoid TestCorrectness\n( UpperOrLower uplo, const Matrix<F>& T, Base<F> alpha, const Matrix<F>& V,\n  const Matrix<F>& A )\n{\n    typedef Base<F> Real;\n    const Int m = V.Height();\n\n    Matrix<F> B( A );\n    Herk( uplo, NORMAL, F(alpha), V, F(1), B );\n\n    // Test correctness by multiplying a random set of vectors by \n    // A + alpha V V^H, then using the Cholesky factorization to solve.\n    Matrix<F> X, Y;\n    Uniform( X, m, 100 );\n    Zeros( Y, m, 100 );\n    Hemm( LEFT, uplo, F(1), B, X, F(0), Y );\n    const Real maxNormT = MaxNorm( T );\n    const Real maxNormB = HermitianMaxNorm( uplo, B );\n    const Real infNormB = HermitianInfinityNorm( uplo, B );\n    const Real frobNormB = HermitianFrobeniusNorm( uplo, B );\n    const Real oneNormY = OneNorm( Y );\n    const Real infNormY = InfinityNorm( Y );\n    const Real frobNormY = FrobeniusNorm( Y );\n\n    cholesky::SolveAfter( uplo, NORMAL, T, Y );\n    Axpy( F(-1), Y, X );\n    const Real oneNormE = OneNorm( X );\n    const Real infNormE = InfinityNorm( X );\n    const Real frobNormE = FrobeniusNorm( X );\n\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"||T||_max = \" << maxNormT << \"\\n\"\n             << \"||B||_max = \" << maxNormB << \"\\n\"\n             << \"||B||_1   = \" << infNormB << \"\\n\"\n             << \"||B||_F   = \" << frobNormB << \"\\n\"\n             << \"||Y||_1   = \" << oneNormY << \"\\n\"\n             << \"||Y||_oo  = \" << infNormY << \"\\n\"\n             << \"||Y||_F   = \" << frobNormY << \"\\n\"\n             << \"||X - inv(B) X||_1  = \" << oneNormE << \"\\n\"\n             << \"||X - inv(B) X||_oo = \" << infNormE << \"\\n\"\n             << \"||X - inv(B) X||_F  = \" << frobNormE << endl;\n    }\n}\n\ntemplate<typename F> \nvoid TestCholeskyMod\n( bool testCorrectness, bool print, UpperOrLower uplo, Int m, Int n, \n  Base<F> alpha )\n{\n    Matrix<F> T, A;\n    HermitianUniformSpectrum( T, m, 1e-9, 10 );\n    if( testCorrectness )\n    {\n        if( mpi::WorldRank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        A = T;\n        if( mpi::WorldRank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print && mpi::WorldRank() == 0 )\n        Print( T, \"A\" );\n\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"  Starting Cholesky factorization...\";\n        cout.flush();\n    }\n    double startTime = mpi::Time();\n    Cholesky( uplo, T );\n    double runTime = mpi::Time() - startTime;\n    double realGFlops = 1./3.*Pow(double(m),3.)/(1.e9*runTime);\n    double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"DONE\\n\"\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    MakeTriangular( uplo, T );\n    if( print && mpi::WorldRank() == 0 )\n        Print( T, \"Cholesky factor\" );\n\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"  Generating random update vectors...\";\n        cout.flush();\n    }\n    Matrix<F> V, VMod;\n    Uniform( V, m, n );\n    Scale( F(1)/Sqrt(F(m)*F(n)), V );\n    VMod = V;\n    if( mpi::WorldRank() == 0 )\n        cout << \"DONE\" << endl;\n    if( print && mpi::WorldRank() == 0 )\n        Print( V, \"V\" );\n\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"  Starting Cholesky modification...\";\n        cout.flush();\n    }\n    startTime = mpi::Time();\n    CholeskyMod( uplo, T, alpha, VMod );\n    runTime = mpi::Time() - startTime;\n    if( mpi::WorldRank() == 0 )\n        cout << \"DONE\\n\"\n             << \"  Time = \" << runTime << \" seconds.\" << endl;\n    if( print && mpi::WorldRank() == 0 )\n        Print( T, \"Modified Cholesky factor\" );\n\n    if( testCorrectness )\n        TestCorrectness( uplo, T, alpha, V, A );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    try\n    {\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const Int m = Input(\"--m\",\"height of matrix\",100);\n        const Int n = Input(\"--n\",\"rank of update\",5);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const double alpha = Input(\"--alpha\",\"update scaling\",3.);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test CholeskyMod\" << uploChar << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestCholeskyMod<double>\n        ( testCorrectness, print, uplo, m, n, alpha );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestCholeskyMod<Complex<double>>\n        ( testCorrectness, print, uplo, m, n, alpha );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/SequentialHessenberg.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_HESSENBERG_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( UpperOrLower uplo, const Matrix<F>& A, const Matrix<F>& t, Matrix<F>& AOrig,\n  bool print, bool display )\n{\n    typedef Base<F> Real;\n    const Int n = AOrig.Height();\n    const Real infNormAOrig = InfinityNorm( AOrig );\n    const Real frobNormAOrig = FrobeniusNorm( AOrig );\n    if( mpi::WorldRank() == 0 )\n        cout << \"Testing error...\" << endl;\n\n    // Set H to the appropriate Hessenberg portion of A\n    Matrix<F> H( A );\n    if( uplo == LOWER )\n        MakeTrapezoidal( LOWER, H, 1 );\n    else\n        MakeTrapezoidal( UPPER, H, -1 );\n    if( print && mpi::WorldRank() == 0 )\n        Print( H, \"Hessenberg\" );\n    if( display && mpi::WorldRank() == 0 )\n        Display( H, \"Bidiagonal\" );\n\n    if( (print || display) && mpi::WorldRank() == 0 )\n    {\n        Matrix<F> Q;\n        Identity( Q, n, n );\n        hessenberg::ApplyQ( uplo, LEFT, NORMAL, A, t, Q );\n        if( print )\n            Print( Q, \"Q\" );\n        if( display )\n            Display( Q, \"Q\" );\n    }\n\n    // Reverse the accumulated Householder transforms\n    hessenberg::ApplyQ( uplo, LEFT, ADJOINT, A, t, AOrig );\n    hessenberg::ApplyQ( uplo, RIGHT, NORMAL, A, t, AOrig );\n    if( print && mpi::WorldRank() == 0 )\n        Print( AOrig, \"Manual Hessenberg\" );\n    if( display && mpi::WorldRank() == 0 )\n        Display( AOrig, \"Manual Hessenberg\" );\n\n    // Compare the appropriate portion of AOrig and B\n    if( uplo == LOWER )\n        MakeTrapezoidal( LOWER, AOrig, 1 );\n    else\n        MakeTrapezoidal( UPPER, AOrig, -1 );\n    Axpy( F(-1), AOrig, H );\n    if( print && mpi::WorldRank() == 0 )\n        Print( H, \"Error in rotated Hessenberg\" );\n    if( display && mpi::WorldRank() == 0 )\n        Display( H, \"Error in rotated Hessenberg\" );\n    const Real infNormError = InfinityNorm( H );\n    const Real frobNormError = FrobeniusNorm( H );\n\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"    ||A||_oo = \" << infNormAOrig << \"\\n\"\n             << \"    ||A||_F  = \" << frobNormAOrig << \"\\n\"\n             << \"    ||H - Q^H A Q||_oo = \" << infNormError << \"\\n\"\n             << \"    ||H - Q^H A Q||_F  = \" << frobNormError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestHessenberg\n( UpperOrLower uplo, Int n, bool testCorrectness, bool print, bool display )\n{\n    Matrix<F> A, AOrig;\n    Matrix<F> t;\n\n    Uniform( A, n, n );\n    if( testCorrectness )\n    {\n        if( mpi::WorldRank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( mpi::WorldRank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print && mpi::WorldRank() == 0 )\n        Print( A, \"A\" );\n    if( display && mpi::WorldRank() == 0 )\n        Display( A, \"A\" );\n\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"  Starting reduction to Hessenberg form...\";\n        cout.flush();\n    }\n    mpi::Barrier( mpi::COMM_WORLD );\n    const double startTime = mpi::Time();\n    Hessenberg( uplo, A, t );\n    mpi::Barrier( mpi::COMM_WORLD );\n    const double runTime = mpi::Time() - startTime;\n    // TODO: Flop calculation\n    if( mpi::WorldRank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds.\" << std::endl;\n    }\n    if( print && mpi::WorldRank() == 0 )\n    {\n        Print( A, \"A after Hessenberg\" );\n        Print( t, \"t after Hessenberg\" );\n    }\n    if( display && mpi::WorldRank() == 0 )\n    {\n        Display( A, \"A after Hessenberg\" );\n        Display( t, \"t after Hessenberg\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( uplo, A, t, AOrig, print, display );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    try\n    {\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const Int n = Input(\"--height\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n\n        if( commRank == 0 )\n            cout << \"Double-precision:\" << endl;\n        TestHessenberg<double>( uplo, n, testCorrectness, print, display );\n\n        if( commRank == 0 )\n            cout << \"Double-precision complex:\" << endl;\n        TestHessenberg<Complex<double>>\n        ( uplo, n, testCorrectness, print, display );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/SequentialLU.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_GEMM_INC\n#include ELEM_TRSM_INC\n#include ELEM_LU_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( bool pivoted, bool print, \n  const Matrix<F>& A,\n  const Matrix<Int>& pPerm,\n  const Matrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Int m = AOrig.Height();\n\n    cout << \"Testing error...\" << endl;\n\n    // Generate random right-hand sides\n    Matrix<F> X, Y;\n    Uniform( X, m, 100 );\n    Y = X;\n    if( pivoted )\n        PermuteRows( Y, pPerm );\n\n    // Solve against the (pivoted) right-hand sides\n    Trsm( LEFT, LOWER, NORMAL, UNIT, F(1), A, Y );\n    Trsm( LEFT, UPPER, NORMAL, NON_UNIT, F(1), A, Y );\n\n    // Now investigate the residual, ||AOrig Y - X||_oo\n    const Real oneNormOfX = OneNorm( X );\n    const Real infNormOfX = InfinityNorm( X );\n    const Real frobNormOfX = FrobeniusNorm( X );\n    Gemm( NORMAL, NORMAL, F(-1), AOrig, Y, F(1), X );\n    const Real oneNormOfError = OneNorm( X );\n    const Real infNormOfError = InfinityNorm( X );\n    const Real frobNormOfError = FrobeniusNorm( X );\n    const Real oneNormOfA = OneNorm( AOrig );\n    const Real infNormOfA = InfinityNorm( AOrig );\n    const Real frobNormOfA = FrobeniusNorm( AOrig );\n\n    cout << \"||A||_1                  = \" << oneNormOfA << \"\\n\"\n         << \"||A||_oo                 = \" << infNormOfA << \"\\n\"\n         << \"||A||_F                  = \" << frobNormOfA << \"\\n\"\n         << \"||X||_1                  = \" << oneNormOfX << \"\\n\"\n         << \"||X||_oo                 = \" << infNormOfX << \"\\n\"\n         << \"||X||_F                  = \" << frobNormOfX << \"\\n\"\n         << \"||A U^-1 L^-1 X - X||_1  = \" << oneNormOfError << \"\\n\"\n         << \"||A U^-1 L^-1 X - X||_oo = \" << infNormOfError << \"\\n\"\n         << \"||A U^-1 L^-1 X - X||_F  = \" << frobNormOfError << endl;\n}\n\ntemplate<typename F> \nvoid TestLU( bool pivot, bool testCorrectness, bool print, Int m )\n{\n    Matrix<F> A, ARef;\n    Matrix<Int> pPerm;\n\n    Uniform( A, m, m );\n    if( testCorrectness )\n    {\n        cout << \"  Making copy of original matrix...\";\n        cout.flush();\n        ARef = A;\n        cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n\n    cout << \"  Starting LU factorization...\";\n    cout.flush();\n    const double startTime = mpi::Time();\n    if( pivot )\n        LU( A, pPerm );\n    else\n        LU( A );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = 2./3.*Pow(double(m),3.)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    cout << \"DONE. \" << endl\n         << \"  Time = \" << runTime << \" seconds. GFlops = \" \n         << gFlops << endl;\n    if( print )\n    {\n        Print( A, \"A after factorization\" );\n        if( pivot )\n            Print( pPerm, \"pPerm after factorization\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( pivot, print, A, pPerm, ARef );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    try\n    {\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool pivot = Input(\"--pivot\",\"pivoted LU?\",true);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test LU\" \n                 << ( pivot ? \" with partial pivoting\" : \" \" ) << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestLU<double>( pivot, testCorrectness, print, m );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestLU<Complex<double>>( pivot, testCorrectness, print, m );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/SequentialMultiShiftHessSolve.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRAPEZOIDAL_INC\n#include ELEM_UPDATEDIAGONAL_INC\n#include ELEM_AXPY_INC\n#include ELEM_GEMM_INC\n#include ELEM_MULTISHIFTHESSSOLVE_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace elem;\n\n// Test if (op(H) - mu_j I) x_j = y_j for each j.\n// This is checked by testing the norm of  op(H) X - X Mu - Y.\ntemplate<typename F> \nvoid TestCorrectness\n( UpperOrLower uplo, Orientation orientation, const Matrix<F>& H, \n  const Matrix<F>& shifts, const Matrix<F>& X, const Matrix<F>& Y,\n  bool print, bool display )\n{\n    typedef Base<F> Real;\n    const Int m = X.Height();\n    const Int n = X.Width();\n    \n    Matrix<F> Z( Y );\n    for( Int j=0; j<n; ++j )\n    {\n        auto x = LockedView( X, 0, j, m, 1 );\n        auto z =       View( Z, 0, j, m, 1 );\n        Axpy( shifts.Get(j,0), x, z );\n    }\n\n    Gemm( orientation, NORMAL, F(-1), H, X, F(1), Z );\n\n    if( print && mpi::WorldRank() == 0 )\n    {\n        Print( H, \"H\" );\n        Print( X, \"X\" );\n        Print( Y, \"Y\" );\n        Print( shifts, \"shifts\" );\n        Print( Z, \"-H X + X Mu + Y\" );\n    }\n    if( display && mpi::WorldRank() == 0 )\n    {\n        Display( H, \"H\" );\n        Display( X, \"X\" );\n        Display( Y, \"Y\" );\n        Display( shifts, \"shifts\" );\n        Display( Z, \"-H X + X Mu + Y\" );\n    }\n\n    const Real YFrob = FrobeniusNorm( Y );\n    const Real YInf = InfinityNorm( Y );\n    const Real HFrob = FrobeniusNorm( H );\n    const Real HInf = InfinityNorm( H );\n    const Real ZFrob = FrobeniusNorm( Z );\n    const Real ZInf = InfinityNorm( Z );\n    if( mpi::WorldRank() == 0 )\n    {\n        std::cout << \"    || H ||_F  = \" << HFrob << \"\\n\"\n                  << \"    || H ||_oo = \" << HInf << \"\\n\"\n                  << \"    || Y ||_F  = \" << YFrob << \"\\n\"\n                  << \"    || Y ||_oo = \" << YInf << \"\\n\"\n                  << \"    || H X - X Mu - Y ||_F  = \" << ZFrob << \"\\n\"\n                  << \"    || H X - X Mu - Y ||_oo = \" << ZInf << \"\\n\"\n                  << std::endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestHessenberg\n( UpperOrLower uplo, Orientation orientation, Int m, Int n, \n  bool testCorrectness, bool print, bool display )\n{\n    Matrix<F> H, X, Y, shifts;\n\n    Uniform( H, m, m );\n    UpdateDiagonal( H, F(5) ); // ensure that H-mu is far from zero\n    if( uplo == LOWER )\n        MakeTrapezoidal( LOWER, H, 1 );\n    else\n        MakeTrapezoidal( UPPER, H, -1 );\n\n    Uniform( X, m, n );\n    Uniform( Y, m, n );\n    Uniform( shifts, n, 1 );\n\n    X = Y;\n    if( mpi::WorldRank() == 0 )\n    {\n        std::cout << \"  Starting Hessenberg solve...\";\n        std::cout.flush();\n    }\n    mpi::Barrier( mpi::COMM_WORLD );\n    const double startTime = mpi::Time();\n    MultiShiftHessSolve( uplo, orientation, F(1), H, shifts, X );\n    mpi::Barrier( mpi::COMM_WORLD );\n    const double runTime = mpi::Time() - startTime;\n    // TODO: Flop calculation\n    if( mpi::WorldRank() == 0 )\n    {\n        std::cout << \"DONE. \" << std::endl\n                  << \"  Time = \" << runTime << \" seconds.\" << std::endl;\n    }\n    if( testCorrectness )\n        TestCorrectness( uplo, orientation, H, shifts, X, Y, print, display );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    try\n    {\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const char orientChar = Input(\"--orient\",\"orientation: N/T/C\",'N');\n        const Int m = Input(\"--m\",\"height of Hessenberg matrix\",100);\n        const Int n = Input(\"--n\",\"number of right-hand sides\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        const bool display = Input(\"--display\",\"display matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const Orientation orient = CharToOrientation( orientChar );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n\n        if( commRank == 0 )\n            std::cout << \"Double-precision:\" << std::endl;\n        TestHessenberg<double>\n        ( uplo, orient, m, n, testCorrectness, print, display );\n\n        if( commRank == 0 )\n            std::cout << \"Double-precision complex:\" << std::endl;\n        TestHessenberg<Complex<double>>\n        ( uplo, orient, m, n, testCorrectness, print, display );\n    }\n    catch( std::exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/TSQR.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_QR_INC\n#include ELEM_IDENTITY_INC\n#include ELEM_UNIFORM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( const DistMatrix<F,VC,  STAR>& Q,\n  const DistMatrix<F,STAR,STAR>& R,\n        DistMatrix<F,VC,  STAR>& A )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int n = A.Width();\n\n    // Form I - Q^H Q\n    if( g.Rank() == 0 )\n        cout << \"  Testing orthogonality of Q...\" << endl;\n    DistMatrix<F> Z(g);\n    Identity( Z, n, n );\n    DistMatrix<F> Q_MC_MR( Q );\n    Herk( UPPER, ADJOINT, F(-1), Q_MC_MR, F(1), Z );\n    Real oneNormOfError = HermitianOneNorm( UPPER, Z );\n    Real infNormOfError = HermitianInfinityNorm( UPPER, Z );\n    Real frobNormOfError = HermitianFrobeniusNorm( UPPER, Z );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||Q^H Q - I||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||Q^H Q - I||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||Q^H Q - I||_F  = \" << frobNormOfError << endl;\n    }\n\n    // Form A - Q R\n    if( g.Rank() == 0 )\n        cout << \"  Testing if A = QR...\" << endl;\n    const Real oneNormOfA = OneNorm( A );\n    const Real infNormOfA = InfinityNorm( A );\n    const Real frobNormOfA = FrobeniusNorm( A );\n    LocalGemm( NORMAL, NORMAL, F(-1), Q, R, F(1), A );\n    oneNormOfError = OneNorm( A );\n    infNormOfError = InfinityNorm( A );\n    frobNormOfError = FrobeniusNorm( A );\n    if( g.Rank() == 0 )\n    {\n        cout << \"    ||A||_1       = \" << oneNormOfA << \"\\n\"\n             << \"    ||A||_oo      = \" << infNormOfA << \"\\n\"\n             << \"    ||A||_F       = \" << frobNormOfA << \"\\n\"\n             << \"    ||A - QR||_1  = \" << oneNormOfError << \"\\n\"\n             << \"    ||A - QR||_oo = \" << infNormOfError << \"\\n\"\n             << \"    ||A - QR||_F  = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F>\nvoid TestQR\n( bool testCorrectness, bool print,\n  Int m, Int n, const Grid& g )\n{\n    DistMatrix<F,VC,STAR> A(g), AFact(g);\n    DistMatrix<F,STAR,STAR> R(g);\n\n    Uniform( A, m, n );\n    if( print )\n        Print( A, \"A\" );\n    AFact = A;\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting TSQR factorization...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    qr::ExplicitTS( AFact, R );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double mD = double(m);\n    const double nD = double(n);\n    const double gFlops = (2.*mD*nD*nD + 1./3.*nD*nD*nD)/(1.e9*runTime);\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n    {\n        Print( AFact, \"Q\" );\n        Print( R, \"R\" );\n    }\n    if( testCorrectness )\n        TestCorrectness( AFact, R, A );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n\n    try\n    {\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int n = Input(\"--width\",\"width of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, order );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test TSQR\" << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestQR<double>( testCorrectness, print, m, n, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestQR<double>( testCorrectness, print, m, n, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/tests/lapack-like/TriangularInverse.cpp",
    "content": "/*\n   Copyright (c) 2009-2014, Jack Poulson\n   All rights reserved.\n\n   This file is part of Elemental and is under the BSD 2-Clause License, \n   which can be found in the LICENSE file in the root directory, or at \n   http://opensource.org/licenses/BSD-2-Clause\n*/\n// NOTE: It is possible to simply include \"elemental.hpp\" instead\n#include \"elemental-lite.hpp\"\n#include ELEM_MAKETRIANGULAR_INC\n#include ELEM_TRMM_INC\n#include ELEM_FROBENIUSNORM_INC\n#include ELEM_INFINITYNORM_INC\n#include ELEM_ONENORM_INC\n#include ELEM_TRIANGULARINVERSE_INC\n#include ELEM_HERMITIANUNIFORMSPECTRUM_INC\nusing namespace std;\nusing namespace elem;\n\ntemplate<typename F> \nvoid TestCorrectness\n( bool print,\n  UpperOrLower uplo, UnitOrNonUnit diag,\n  const DistMatrix<F>& A,\n  const DistMatrix<F>& AOrig )\n{\n    typedef Base<F> Real;\n    const Grid& g = A.Grid();\n    const Int m = AOrig.Height();\n\n    DistMatrix<F> X(g), Y(g);\n    Uniform( X, m, 100 );\n    Y = X;\n\n    // Since A o A^-1 = I, test the change introduced by the approximate comp.\n    Trmm( LEFT, uplo, NORMAL, diag, F(1), A,     Y );\n    Trmm( LEFT, uplo, NORMAL, diag, F(1), AOrig, Y );\n    Axpy( F(-1), X, Y );\n\n    const Real oneNormOrig = OneNorm( AOrig );\n    const Real infNormOrig = InfinityNorm( AOrig );\n    const Real frobNormOrig = FrobeniusNorm( AOrig );\n    const Real oneNormFinal = OneNorm( A );\n    const Real infNormFinal = InfinityNorm( A );\n    const Real frobNormFinal = FrobeniusNorm( A );\n    const Real oneNormOfError = OneNorm( Y );\n    const Real infNormOfError = InfinityNorm( Y );\n    const Real frobNormOfError = FrobeniusNorm( Y );\n    if( g.Rank() == 0 )\n    {\n        cout << \"||A||_1           = \" << oneNormOrig << \"\\n\"\n             << \"||A||_oo          = \" << infNormOrig << \"\\n\"\n             << \"||A||_F           = \" << frobNormOrig << \"\\n\"\n             << \"||A^-1||_1        = \" << oneNormFinal << \"\\n\"\n             << \"||A^-1||_oo       = \" << infNormFinal << \"\\n\"\n             << \"||A^-1||_F        = \" << frobNormFinal << \"\\n\"\n             << \"||A A^-1 - I||_1  = \" << oneNormOfError << \"\\n\"\n             << \"||A A^-1 - I||_oo = \" << infNormOfError << \"\\n\"\n             << \"||A A^-1 - I||_F  = \" << frobNormOfError << endl;\n    }\n}\n\ntemplate<typename F> \nvoid TestTriangularInverse\n( bool testCorrectness, bool print,\n  UpperOrLower uplo, UnitOrNonUnit diag, Int m, const Grid& g )\n{\n    DistMatrix<F> A(g), AOrig(g);\n    HermitianUniformSpectrum( A, m, 1, 10 );\n    MakeTriangular( uplo, A );\n    if( testCorrectness )\n    {\n        if( g.Rank() == 0 )\n        {\n            cout << \"  Making copy of original matrix...\";\n            cout.flush();\n        }\n        AOrig = A;\n        if( g.Rank() == 0 )\n            cout << \"DONE\" << endl;\n    }\n    if( print )\n        Print( A, \"A\" );\n\n    if( g.Rank() == 0 )\n    {\n        cout << \"  Starting triangular inversion...\";\n        cout.flush();\n    }\n    mpi::Barrier( g.Comm() );\n    const double startTime = mpi::Time();\n    TriangularInverse( uplo, diag, A );\n    mpi::Barrier( g.Comm() );\n    const double runTime = mpi::Time() - startTime;\n    const double realGFlops = 1./3.*Pow(double(m),3.)/(1.e9*runTime);\n    const double gFlops = ( IsComplex<F>::val ? 4*realGFlops : realGFlops );\n    if( g.Rank() == 0 )\n    {\n        cout << \"DONE. \" << endl\n             << \"  Time = \" << runTime << \" seconds. GFlops = \" \n             << gFlops << endl;\n    }\n    if( print )\n        Print( A, \"A after inversion\" );\n    if( testCorrectness )\n        TestCorrectness( print, uplo, diag, A, AOrig );\n}\n\nint \nmain( int argc, char* argv[] )\n{\n    Initialize( argc, argv );\n    mpi::Comm comm = mpi::COMM_WORLD;\n    const Int commRank = mpi::Rank( comm );\n    const Int commSize = mpi::Size( comm );\n\n    try\n    {\n        Int r = Input(\"--gridHeight\",\"height of process grid\",0);\n        const bool colMajor = Input(\"--colMajor\",\"column-major ordering?\",true);\n        const char uploChar = Input(\"--uplo\",\"upper or lower storage: L/U\",'L');\n        const char diagChar = Input(\"--diag\",\"(non-)unit diagonal: N/U\",'N');\n        const Int m = Input(\"--height\",\"height of matrix\",100);\n        const Int nb = Input(\"--nb\",\"algorithmic blocksize\",96);\n        const bool testCorrectness = Input\n            (\"--correctness\",\"test correctness?\",true);\n        const bool print = Input(\"--print\",\"print matrices?\",false);\n        ProcessInput();\n        PrintInputReport();\n\n        const UpperOrLower uplo = CharToUpperOrLower( uploChar );\n        const UnitOrNonUnit diag = CharToUnitOrNonUnit( diagChar );\n\n        if( r == 0 )\n            r = Grid::FindFactor( commSize );\n        const GridOrder order = ( colMajor ? COLUMN_MAJOR : ROW_MAJOR );\n        const Grid g( comm, r, order );\n        SetBlocksize( nb );\n        ComplainIfDebug();\n        if( commRank == 0 )\n            cout << \"Will test TriangularInverse\" << uploChar << diagChar \n                 << endl;\n\n        if( commRank == 0 )\n            cout << \"Testing with doubles:\" << endl;\n        TestTriangularInverse<double>\n        ( testCorrectness, print, uplo, diag, m, g );\n\n        if( commRank == 0 )\n            cout << \"Testing with double-precision complex:\" << endl;\n        TestTriangularInverse<Complex<double>>\n        ( testCorrectness, print, uplo, diag, m, g );\n    }\n    catch( exception& e ) { ReportException(e); }\n\n    Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/external/elemental/vagrant/README.md",
    "content": "This folder will slowly accumulate various [Vagrantfiles](http://vagrantup.com) \nfor developing Elemental. For instance, to load a 32-bit development environment\nfor Elemental within Ubuntu 13.10 (Saucy), simply run: \n``cd saucy32; vagrant up``.\n"
  },
  {
    "path": "src/madness/external/elemental/vagrant/saucy32/Vagrantfile",
    "content": "# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\n# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!\nVAGRANTFILE_API_VERSION = \"2\"\n\nVagrant.configure(VAGRANTFILE_API_VERSION) do |config|\n  # Every Vagrant virtual environment requires a box to build off of.\n  config.vm.box = \"saucy32\"\n  # The url from where the 'config.vm.box' box will be fetched if it\n  config.vm.box_url = \"http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-i386-vagrant-disk1.box\"\n  # The list of software to install\n  config.vm.provision :shell, :path => \"bootstrap.sh\"\nend\n"
  },
  {
    "path": "src/madness/external/elemental/vagrant/saucy32/bootstrap.sh",
    "content": "#!/usr/bin/env bash\n\n# Make sure the package information is up-to-date\napt-get update\n\n## Qt5 visualization\n#apt-get install -y qt5-default\n#apt-get install -y imagemagick\n\n# Compilers\napt-get install -y g++-4.7\napt-get install -y gfortran-4.7\napt-get install -y clang-3.4\n\n# Message Passing Interface\napt-get install -y libmpich2-dev\n\n# BLAS and LAPACK\napt-get install -y libopenblas-dev\napt-get install -y liblapack-dev\n\n# Configuration\napt-get install -y cmake\n\n# Source control\napt-get install -y git\n\n# Check out Elemental\ngit clone http://github.com/elemental/Elemental.git\nchown -R vagrant Elemental\n"
  },
  {
    "path": "src/madness/external/elemental/vagrant/saucy64/Vagrantfile",
    "content": "# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\n# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!\nVAGRANTFILE_API_VERSION = \"2\"\n\nVagrant.configure(VAGRANTFILE_API_VERSION) do |config|\n  # Every Vagrant virtual environment requires a box to build off of.\n  config.vm.box = \"saucy64\"\n  # The url from where the 'config.vm.box' box will be fetched if it\n  config.vm.box_url = \"http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-vagrant-disk1.box\"\n  # The list of software to install\n  config.vm.provision :shell, :path => \"bootstrap.sh\"\nend\n"
  },
  {
    "path": "src/madness/external/elemental/vagrant/saucy64/bootstrap.sh",
    "content": "#!/usr/bin/env bash\n\n# Make sure the package information is up-to-date\napt-get update\n\n## Qt5 visualization\n#apt-get install -y qt5-default\n#apt-get install -y imagemagick\n\n# Compilers\napt-get install -y g++-4.7\napt-get install -y gfortran-4.7\napt-get install -y clang-3.4\n\n# Message Passing Interface\napt-get install -y libmpich2-dev\n\n# BLAS and LAPACK\napt-get install -y libopenblas-dev\napt-get install -y liblapack-dev\n\n# Configuration\napt-get install -y cmake\n\n# Source control\napt-get install -y git\n\n# Check out Elemental\ngit clone http://github.com/elemental/Elemental.git\nchown -R vagrant Elemental\n"
  },
  {
    "path": "src/madness/external/gtest/CMakeLists.txt",
    "content": "# src/madness/external/gtest\n\nif(BUILD_TESTING)\n  add_library(MADgtest gtest-all.cc)\n  target_include_directories(MADgtest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)\n  target_link_libraries(MADgtest Threads::Threads)\nendif()\n"
  },
  {
    "path": "src/madness/external/gtest/README",
    "content": "The original source of gtest 1.7.0 including its LICENSE file is\nprovided in the zip file.\n\nThis file was unzipped and the src and include directory trees copied\ninto this directory.  Also src/gtest-all.cc was copied into this\ndirectory.  This same recipe should hopefully work for future\nversions.\n"
  },
  {
    "path": "src/madness/external/gtest/gtest-all.cc",
    "content": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mheule@google.com (Markus Heule)\n//\n// Google C++ Testing Framework (Google Test)\n//\n// Sometimes it's desirable to build Google Test by compiling a single file.\n// This file serves this purpose.\n\n// This line ensures that gtest.h can be compiled on its own, even\n// when it's fused.\n#include \"gtest/gtest.h\"\n\n// The following lines pull in the real gtest *.cc files.\n#include \"src/gtest.cc\"\n#include \"src/gtest-death-test.cc\"\n#include \"src/gtest-filepath.cc\"\n#include \"src/gtest-port.cc\"\n#include \"src/gtest-printers.cc\"\n#include \"src/gtest-test-part.cc\"\n#include \"src/gtest-typed-test.cc\"\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest-death-test.h",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n//\n// The Google C++ Testing Framework (Google Test)\n//\n// This header file defines the public API for death tests.  It is\n// #included by gtest.h so a user doesn't need to include this\n// directly.\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_\n#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_\n\n#include \"gtest/internal/gtest-death-test-internal.h\"\n\nnamespace testing {\n\n// This flag controls the style of death tests.  Valid values are \"threadsafe\",\n// meaning that the death test child process will re-execute the test binary\n// from the start, running only a single death test, or \"fast\",\n// meaning that the child process will execute the test logic immediately\n// after forking.\nGTEST_DECLARE_string_(death_test_style);\n\n#if GTEST_HAS_DEATH_TEST\n\nnamespace internal {\n\n// Returns a Boolean value indicating whether the caller is currently\n// executing in the context of the death test child process.  Tools such as\n// Valgrind heap checkers may need this to modify their behavior in death\n// tests.  IMPORTANT: This is an internal utility.  Using it may break the\n// implementation of death tests.  User code MUST NOT use it.\nGTEST_API_ bool InDeathTestChild();\n\n}  // namespace internal\n\n// The following macros are useful for writing death tests.\n\n// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is\n// executed:\n//\n//   1. It generates a warning if there is more than one active\n//   thread.  This is because it's safe to fork() or clone() only\n//   when there is a single thread.\n//\n//   2. The parent process clone()s a sub-process and runs the death\n//   test in it; the sub-process exits with code 0 at the end of the\n//   death test, if it hasn't exited already.\n//\n//   3. The parent process waits for the sub-process to terminate.\n//\n//   4. The parent process checks the exit code and error message of\n//   the sub-process.\n//\n// Examples:\n//\n//   ASSERT_DEATH(server.SendMessage(56, \"Hello\"), \"Invalid port number\");\n//   for (int i = 0; i < 5; i++) {\n//     EXPECT_DEATH(server.ProcessRequest(i),\n//                  \"Invalid request .* in ProcessRequest()\")\n//                  << \"Failed to die on request \" << i;\n//   }\n//\n//   ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), \"Exiting\");\n//\n//   bool KilledBySIGHUP(int exit_code) {\n//     return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;\n//   }\n//\n//   ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, \"Hanging up!\");\n//\n// On the regular expressions used in death tests:\n//\n//   On POSIX-compliant systems (*nix), we use the <regex.h> library,\n//   which uses the POSIX extended regex syntax.\n//\n//   On other platforms (e.g. Windows), we only support a simple regex\n//   syntax implemented as part of Google Test.  This limited\n//   implementation should be enough most of the time when writing\n//   death tests; though it lacks many features you can find in PCRE\n//   or POSIX extended regex syntax.  For example, we don't support\n//   union (\"x|y\"), grouping (\"(xy)\"), brackets (\"[xy]\"), and\n//   repetition count (\"x{5,7}\"), among others.\n//\n//   Below is the syntax that we do support.  We chose it to be a\n//   subset of both PCRE and POSIX extended regex, so it's easy to\n//   learn wherever you come from.  In the following: 'A' denotes a\n//   literal character, period (.), or a single \\\\ escape sequence;\n//   'x' and 'y' denote regular expressions; 'm' and 'n' are for\n//   natural numbers.\n//\n//     c     matches any literal character c\n//     \\\\d   matches any decimal digit\n//     \\\\D   matches any character that's not a decimal digit\n//     \\\\f   matches \\f\n//     \\\\n   matches \\n\n//     \\\\r   matches \\r\n//     \\\\s   matches any ASCII whitespace, including \\n\n//     \\\\S   matches any character that's not a whitespace\n//     \\\\t   matches \\t\n//     \\\\v   matches \\v\n//     \\\\w   matches any letter, _, or decimal digit\n//     \\\\W   matches any character that \\\\w doesn't match\n//     \\\\c   matches any literal character c, which must be a punctuation\n//     .     matches any single character except \\n\n//     A?    matches 0 or 1 occurrences of A\n//     A*    matches 0 or many occurrences of A\n//     A+    matches 1 or many occurrences of A\n//     ^     matches the beginning of a string (not that of each line)\n//     $     matches the end of a string (not that of each line)\n//     xy    matches x followed by y\n//\n//   If you accidentally use PCRE or POSIX extended regex features\n//   not implemented by us, you will get a run-time failure.  In that\n//   case, please try to rewrite your regular expression within the\n//   above syntax.\n//\n//   This implementation is *not* meant to be as highly tuned or robust\n//   as a compiled regex library, but should perform well enough for a\n//   death test, which already incurs significant overhead by launching\n//   a child process.\n//\n// Known caveats:\n//\n//   A \"threadsafe\" style death test obtains the path to the test\n//   program from argv[0] and re-executes it in the sub-process.  For\n//   simplicity, the current implementation doesn't search the PATH\n//   when launching the sub-process.  This means that the user must\n//   invoke the test program via a path that contains at least one\n//   path separator (e.g. path/to/foo_test and\n//   /absolute/path/to/bar_test are fine, but foo_test is not).  This\n//   is rarely a problem as people usually don't put the test binary\n//   directory in PATH.\n//\n// TODO(wan@google.com): make thread-safe death tests search the PATH.\n\n// Asserts that a given statement causes the program to exit, with an\n// integer exit status that satisfies predicate, and emitting error output\n// that matches regex.\n# define ASSERT_EXIT(statement, predicate, regex) \\\n    GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_)\n\n// Like ASSERT_EXIT, but continues on to successive tests in the\n// test case, if any:\n# define EXPECT_EXIT(statement, predicate, regex) \\\n    GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_)\n\n// Asserts that a given statement causes the program to exit, either by\n// explicitly exiting with a nonzero exit code or being killed by a\n// signal, and emitting error output that matches regex.\n# define ASSERT_DEATH(statement, regex) \\\n    ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)\n\n// Like ASSERT_DEATH, but continues on to successive tests in the\n// test case, if any:\n# define EXPECT_DEATH(statement, regex) \\\n    EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)\n\n// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:\n\n// Tests that an exit code describes a normal exit with a given exit code.\nclass GTEST_API_ ExitedWithCode {\n public:\n  explicit ExitedWithCode(int exit_code);\n  bool operator()(int exit_status) const;\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ExitedWithCode& other);\n\n  const int exit_code_;\n};\n\n# if !GTEST_OS_WINDOWS\n// Tests that an exit code describes an exit due to termination by a\n// given signal.\nclass GTEST_API_ KilledBySignal {\n public:\n  explicit KilledBySignal(int signum);\n  bool operator()(int exit_status) const;\n private:\n  const int signum_;\n};\n# endif  // !GTEST_OS_WINDOWS\n\n// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.\n// The death testing framework causes this to have interesting semantics,\n// since the sideeffects of the call are only visible in opt mode, and not\n// in debug mode.\n//\n// In practice, this can be used to test functions that utilize the\n// LOG(DFATAL) macro using the following style:\n//\n// int DieInDebugOr12(int* sideeffect) {\n//   if (sideeffect) {\n//     *sideeffect = 12;\n//   }\n//   LOG(DFATAL) << \"death\";\n//   return 12;\n// }\n//\n// TEST(TestCase, TestDieOr12WorksInDgbAndOpt) {\n//   int sideeffect = 0;\n//   // Only asserts in dbg.\n//   EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), \"death\");\n//\n// #ifdef NDEBUG\n//   // opt-mode has sideeffect visible.\n//   EXPECT_EQ(12, sideeffect);\n// #else\n//   // dbg-mode no visible sideeffect.\n//   EXPECT_EQ(0, sideeffect);\n// #endif\n// }\n//\n// This will assert that DieInDebugReturn12InOpt() crashes in debug\n// mode, usually due to a DCHECK or LOG(DFATAL), but returns the\n// appropriate fallback value (12 in this case) in opt mode. If you\n// need to test that a function has appropriate side-effects in opt\n// mode, include assertions against the side-effects.  A general\n// pattern for this is:\n//\n// EXPECT_DEBUG_DEATH({\n//   // Side-effects here will have an effect after this statement in\n//   // opt mode, but none in debug mode.\n//   EXPECT_EQ(12, DieInDebugOr12(&sideeffect));\n// }, \"death\");\n//\n# ifdef NDEBUG\n\n#  define EXPECT_DEBUG_DEATH(statement, regex) \\\n  GTEST_EXECUTE_STATEMENT_(statement, regex)\n\n#  define ASSERT_DEBUG_DEATH(statement, regex) \\\n  GTEST_EXECUTE_STATEMENT_(statement, regex)\n\n# else\n\n#  define EXPECT_DEBUG_DEATH(statement, regex) \\\n  EXPECT_DEATH(statement, regex)\n\n#  define ASSERT_DEBUG_DEATH(statement, regex) \\\n  ASSERT_DEATH(statement, regex)\n\n# endif  // NDEBUG for EXPECT_DEBUG_DEATH\n#endif  // GTEST_HAS_DEATH_TEST\n\n// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and\n// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if\n// death tests are supported; otherwise they just issue a warning.  This is\n// useful when you are combining death test assertions with normal test\n// assertions in one test.\n#if GTEST_HAS_DEATH_TEST\n# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \\\n    EXPECT_DEATH(statement, regex)\n# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \\\n    ASSERT_DEATH(statement, regex)\n#else\n# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \\\n    GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )\n# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \\\n    GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)\n#endif\n\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest-message.h",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n//\n// The Google C++ Testing Framework (Google Test)\n//\n// This header file defines the Message class.\n//\n// IMPORTANT NOTE: Due to limitation of the C++ language, we have to\n// leave some internal implementation details in this header file.\n// They are clearly marked by comments like this:\n//\n//   // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n//\n// Such code is NOT meant to be used by a user directly, and is subject\n// to CHANGE WITHOUT NOTICE.  Therefore DO NOT DEPEND ON IT in a user\n// program!\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_\n#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_\n\n#include <limits>\n\n#include \"gtest/internal/gtest-port.h\"\n\n// Ensures that there is at least one operator<< in the global namespace.\n// See Message& operator<<(...) below for why.\nvoid operator<<(const testing::internal::Secret&, int);\n\nnamespace testing {\n\n// The Message class works like an ostream repeater.\n//\n// Typical usage:\n//\n//   1. You stream a bunch of values to a Message object.\n//      It will remember the text in a stringstream.\n//   2. Then you stream the Message object to an ostream.\n//      This causes the text in the Message to be streamed\n//      to the ostream.\n//\n// For example;\n//\n//   testing::Message foo;\n//   foo << 1 << \" != \" << 2;\n//   std::cout << foo;\n//\n// will print \"1 != 2\".\n//\n// Message is not intended to be inherited from.  In particular, its\n// destructor is not virtual.\n//\n// Note that stringstream behaves differently in gcc and in MSVC.  You\n// can stream a NULL char pointer to it in the former, but not in the\n// latter (it causes an access violation if you do).  The Message\n// class hides this difference by treating a NULL char pointer as\n// \"(null)\".\nclass GTEST_API_ Message {\n private:\n  // The type of basic IO manipulators (endl, ends, and flush) for\n  // narrow streams.\n  typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);\n\n public:\n  // Constructs an empty Message.\n  Message();\n\n  // Copy constructor.\n  Message(const Message& msg) : ss_(new ::std::stringstream) {  // NOLINT\n    *ss_ << msg.GetString();\n  }\n\n  // Constructs a Message from a C-string.\n  explicit Message(const char* str) : ss_(new ::std::stringstream) {\n    *ss_ << str;\n  }\n\n#if GTEST_OS_SYMBIAN\n  // Streams a value (either a pointer or not) to this object.\n  template <typename T>\n  inline Message& operator <<(const T& value) {\n    StreamHelper(typename internal::is_pointer<T>::type(), value);\n    return *this;\n  }\n#else\n  // Streams a non-pointer value to this object.\n  template <typename T>\n  inline Message& operator <<(const T& val) {\n    // Some libraries overload << for STL containers.  These\n    // overloads are defined in the global namespace instead of ::std.\n    //\n    // C++'s symbol lookup rule (i.e. Koenig lookup) says that these\n    // overloads are visible in either the std namespace or the global\n    // namespace, but not other namespaces, including the testing\n    // namespace which Google Test's Message class is in.\n    //\n    // To allow STL containers (and other types that has a << operator\n    // defined in the global namespace) to be used in Google Test\n    // assertions, testing::Message must access the custom << operator\n    // from the global namespace.  With this using declaration,\n    // overloads of << defined in the global namespace and those\n    // visible via Koenig lookup are both exposed in this function.\n    using ::operator <<;\n    *ss_ << val;\n    return *this;\n  }\n\n  // Streams a pointer value to this object.\n  //\n  // This function is an overload of the previous one.  When you\n  // stream a pointer to a Message, this definition will be used as it\n  // is more specialized.  (The C++ Standard, section\n  // [temp.func.order].)  If you stream a non-pointer, then the\n  // previous definition will be used.\n  //\n  // The reason for this overload is that streaming a NULL pointer to\n  // ostream is undefined behavior.  Depending on the compiler, you\n  // may get \"0\", \"(nil)\", \"(null)\", or an access violation.  To\n  // ensure consistent result across compilers, we always treat NULL\n  // as \"(null)\".\n  template <typename T>\n  inline Message& operator <<(T* const& pointer) {  // NOLINT\n    if (pointer == NULL) {\n      *ss_ << \"(null)\";\n    } else {\n      *ss_ << pointer;\n    }\n    return *this;\n  }\n#endif  // GTEST_OS_SYMBIAN\n\n  // Since the basic IO manipulators are overloaded for both narrow\n  // and wide streams, we have to provide this specialized definition\n  // of operator <<, even though its body is the same as the\n  // templatized version above.  Without this definition, streaming\n  // endl or other basic IO manipulators to Message will confuse the\n  // compiler.\n  Message& operator <<(BasicNarrowIoManip val) {\n    *ss_ << val;\n    return *this;\n  }\n\n  // Instead of 1/0, we want to see true/false for bool values.\n  Message& operator <<(bool b) {\n    return *this << (b ? \"true\" : \"false\");\n  }\n\n  // These two overloads allow streaming a wide C string to a Message\n  // using the UTF-8 encoding.\n  Message& operator <<(const wchar_t* wide_c_str);\n  Message& operator <<(wchar_t* wide_c_str);\n\n#if GTEST_HAS_STD_WSTRING\n  // Converts the given wide string to a narrow string using the UTF-8\n  // encoding, and streams the result to this Message object.\n  Message& operator <<(const ::std::wstring& wstr);\n#endif  // GTEST_HAS_STD_WSTRING\n\n#if GTEST_HAS_GLOBAL_WSTRING\n  // Converts the given wide string to a narrow string using the UTF-8\n  // encoding, and streams the result to this Message object.\n  Message& operator <<(const ::wstring& wstr);\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n  // Gets the text streamed to this object so far as an std::string.\n  // Each '\\0' character in the buffer is replaced with \"\\\\0\".\n  //\n  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n  std::string GetString() const;\n\n private:\n\n#if GTEST_OS_SYMBIAN\n  // These are needed as the Nokia Symbian Compiler cannot decide between\n  // const T& and const T* in a function template. The Nokia compiler _can_\n  // decide between class template specializations for T and T*, so a\n  // tr1::type_traits-like is_pointer works, and we can overload on that.\n  template <typename T>\n  inline void StreamHelper(internal::true_type /*is_pointer*/, T* pointer) {\n    if (pointer == NULL) {\n      *ss_ << \"(null)\";\n    } else {\n      *ss_ << pointer;\n    }\n  }\n  template <typename T>\n  inline void StreamHelper(internal::false_type /*is_pointer*/,\n                           const T& value) {\n    // See the comments in Message& operator <<(const T&) above for why\n    // we need this using statement.\n    using ::operator <<;\n    *ss_ << value;\n  }\n#endif  // GTEST_OS_SYMBIAN\n\n  // We'll hold the text streamed to this object here.\n  const internal::scoped_ptr< ::std::stringstream> ss_;\n\n  // We declare (but don't implement) this to prevent the compiler\n  // from implementing the assignment operator.\n  void operator=(const Message&);\n};\n\n// Streams a Message to an ostream.\ninline std::ostream& operator <<(std::ostream& os, const Message& sb) {\n  return os << sb.GetString();\n}\n\nnamespace internal {\n\n// Converts a streamable value to an std::string.  A NULL pointer is\n// converted to \"(null)\".  When the input value is a ::string,\n// ::std::string, ::wstring, or ::std::wstring object, each NUL\n// character in it is replaced with \"\\\\0\".\ntemplate <typename T>\nstd::string StreamableToString(const T& streamable) {\n  return (Message() << streamable).GetString();\n}\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest-param-test.h",
    "content": "// This file was GENERATED by command:\n//     pump.py gtest-param-test.h.pump\n// DO NOT EDIT BY HAND!!!\n\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: vladl@google.com (Vlad Losev)\n//\n// Macros and functions for implementing parameterized tests\n// in Google C++ Testing Framework (Google Test)\n//\n// This file is generated by a SCRIPT.  DO NOT EDIT BY HAND!\n//\n#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_\n#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_\n\n\n// Value-parameterized tests allow you to test your code with different\n// parameters without writing multiple copies of the same test.\n//\n// Here is how you use value-parameterized tests:\n\n#if 0\n\n// To write value-parameterized tests, first you should define a fixture\n// class. It is usually derived from testing::TestWithParam<T> (see below for\n// another inheritance scheme that's sometimes useful in more complicated\n// class hierarchies), where the type of your parameter values.\n// TestWithParam<T> is itself derived from testing::Test. T can be any\n// copyable type. If it's a raw pointer, you are responsible for managing the\n// lifespan of the pointed values.\n\nclass FooTest : public ::testing::TestWithParam<const char*> {\n  // You can implement all the usual class fixture members here.\n};\n\n// Then, use the TEST_P macro to define as many parameterized tests\n// for this fixture as you want. The _P suffix is for \"parameterized\"\n// or \"pattern\", whichever you prefer to think.\n\nTEST_P(FooTest, DoesBlah) {\n  // Inside a test, access the test parameter with the GetParam() method\n  // of the TestWithParam<T> class:\n  EXPECT_TRUE(foo.Blah(GetParam()));\n  ...\n}\n\nTEST_P(FooTest, HasBlahBlah) {\n  ...\n}\n\n// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test\n// case with any set of parameters you want. Google Test defines a number\n// of functions for generating test parameters. They return what we call\n// (surprise!) parameter generators. Here is a  summary of them, which\n// are all in the testing namespace:\n//\n//\n//  Range(begin, end [, step]) - Yields values {begin, begin+step,\n//                               begin+step+step, ...}. The values do not\n//                               include end. step defaults to 1.\n//  Values(v1, v2, ..., vN)    - Yields values {v1, v2, ..., vN}.\n//  ValuesIn(container)        - Yields values from a C-style array, an STL\n//  ValuesIn(begin,end)          container, or an iterator range [begin, end).\n//  Bool()                     - Yields sequence {false, true}.\n//  Combine(g1, g2, ..., gN)   - Yields all combinations (the Cartesian product\n//                               for the math savvy) of the values generated\n//                               by the N generators.\n//\n// For more details, see comments at the definitions of these functions below\n// in this file.\n//\n// The following statement will instantiate tests from the FooTest test case\n// each with parameter values \"meeny\", \"miny\", and \"moe\".\n\nINSTANTIATE_TEST_CASE_P(InstantiationName,\n                        FooTest,\n                        Values(\"meeny\", \"miny\", \"moe\"));\n\n// To distinguish different instances of the pattern, (yes, you\n// can instantiate it more then once) the first argument to the\n// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the\n// actual test case name. Remember to pick unique prefixes for different\n// instantiations. The tests from the instantiation above will have\n// these names:\n//\n//    * InstantiationName/FooTest.DoesBlah/0 for \"meeny\"\n//    * InstantiationName/FooTest.DoesBlah/1 for \"miny\"\n//    * InstantiationName/FooTest.DoesBlah/2 for \"moe\"\n//    * InstantiationName/FooTest.HasBlahBlah/0 for \"meeny\"\n//    * InstantiationName/FooTest.HasBlahBlah/1 for \"miny\"\n//    * InstantiationName/FooTest.HasBlahBlah/2 for \"moe\"\n//\n// You can use these names in --gtest_filter.\n//\n// This statement will instantiate all tests from FooTest again, each\n// with parameter values \"cat\" and \"dog\":\n\nconst char* pets[] = {\"cat\", \"dog\"};\nINSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));\n\n// The tests from the instantiation above will have these names:\n//\n//    * AnotherInstantiationName/FooTest.DoesBlah/0 for \"cat\"\n//    * AnotherInstantiationName/FooTest.DoesBlah/1 for \"dog\"\n//    * AnotherInstantiationName/FooTest.HasBlahBlah/0 for \"cat\"\n//    * AnotherInstantiationName/FooTest.HasBlahBlah/1 for \"dog\"\n//\n// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests\n// in the given test case, whether their definitions come before or\n// AFTER the INSTANTIATE_TEST_CASE_P statement.\n//\n// Please also note that generator expressions (including parameters to the\n// generators) are evaluated in InitGoogleTest(), after main() has started.\n// This allows the user on one hand, to adjust generator parameters in order\n// to dynamically determine a set of tests to run and on the other hand,\n// give the user a chance to inspect the generated tests with Google Test\n// reflection API before RUN_ALL_TESTS() is executed.\n//\n// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc\n// for more examples.\n//\n// In the future, we plan to publish the API for defining new parameter\n// generators. But for now this interface remains part of the internal\n// implementation and is subject to change.\n//\n//\n// A parameterized test fixture must be derived from testing::Test and from\n// testing::WithParamInterface<T>, where T is the type of the parameter\n// values. Inheriting from TestWithParam<T> satisfies that requirement because\n// TestWithParam<T> inherits from both Test and WithParamInterface. In more\n// complicated hierarchies, however, it is occasionally useful to inherit\n// separately from Test and WithParamInterface. For example:\n\nclass BaseTest : public ::testing::Test {\n  // You can inherit all the usual members for a non-parameterized test\n  // fixture here.\n};\n\nclass DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {\n  // The usual test fixture members go here too.\n};\n\nTEST_F(BaseTest, HasFoo) {\n  // This is an ordinary non-parameterized test.\n}\n\nTEST_P(DerivedTest, DoesBlah) {\n  // GetParam works just the same here as if you inherit from TestWithParam.\n  EXPECT_TRUE(foo.Blah(GetParam()));\n}\n\n#endif  // 0\n\n#include \"gtest/internal/gtest-port.h\"\n\n#if !GTEST_OS_SYMBIAN\n# include <utility>\n#endif\n\n// scripts/fuse_gtest.py depends on gtest's own header being #included\n// *unconditionally*.  Therefore these #includes cannot be moved\n// inside #if GTEST_HAS_PARAM_TEST.\n#include \"gtest/internal/gtest-internal.h\"\n#include \"gtest/internal/gtest-param-util.h\"\n#include \"gtest/internal/gtest-param-util-generated.h\"\n\n#if GTEST_HAS_PARAM_TEST\n\nnamespace testing {\n\n// Functions producing parameter generators.\n//\n// Google Test uses these generators to produce parameters for value-\n// parameterized tests. When a parameterized test case is instantiated\n// with a particular generator, Google Test creates and runs tests\n// for each element in the sequence produced by the generator.\n//\n// In the following sample, tests from test case FooTest are instantiated\n// each three times with parameter values 3, 5, and 8:\n//\n// class FooTest : public TestWithParam<int> { ... };\n//\n// TEST_P(FooTest, TestThis) {\n// }\n// TEST_P(FooTest, TestThat) {\n// }\n// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));\n//\n\n// Range() returns generators providing sequences of values in a range.\n//\n// Synopsis:\n// Range(start, end)\n//   - returns a generator producing a sequence of values {start, start+1,\n//     start+2, ..., }.\n// Range(start, end, step)\n//   - returns a generator producing a sequence of values {start, start+step,\n//     start+step+step, ..., }.\n// Notes:\n//   * The generated sequences never include end. For example, Range(1, 5)\n//     returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)\n//     returns a generator producing {1, 3, 5, 7}.\n//   * start and end must have the same type. That type may be any integral or\n//     floating-point type or a user defined type satisfying these conditions:\n//     * It must be assignable (have operator=() defined).\n//     * It must have operator+() (operator+(int-compatible type) for\n//       two-operand version).\n//     * It must have operator<() defined.\n//     Elements in the resulting sequences will also have that type.\n//   * Condition start < end must be satisfied in order for resulting sequences\n//     to contain any elements.\n//\ntemplate <typename T, typename IncrementT>\ninternal::ParamGenerator<T> Range(T start, T end, IncrementT step) {\n  return internal::ParamGenerator<T>(\n      new internal::RangeGenerator<T, IncrementT>(start, end, step));\n}\n\ntemplate <typename T>\ninternal::ParamGenerator<T> Range(T start, T end) {\n  return Range(start, end, 1);\n}\n\n// ValuesIn() function allows generation of tests with parameters coming from\n// a container.\n//\n// Synopsis:\n// ValuesIn(const T (&array)[N])\n//   - returns a generator producing sequences with elements from\n//     a C-style array.\n// ValuesIn(const Container& container)\n//   - returns a generator producing sequences with elements from\n//     an STL-style container.\n// ValuesIn(Iterator begin, Iterator end)\n//   - returns a generator producing sequences with elements from\n//     a range [begin, end) defined by a pair of STL-style iterators. These\n//     iterators can also be plain C pointers.\n//\n// Please note that ValuesIn copies the values from the containers\n// passed in and keeps them to generate tests in RUN_ALL_TESTS().\n//\n// Examples:\n//\n// This instantiates tests from test case StringTest\n// each with C-string values of \"foo\", \"bar\", and \"baz\":\n//\n// const char* strings[] = {\"foo\", \"bar\", \"baz\"};\n// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));\n//\n// This instantiates tests from test case StlStringTest\n// each with STL strings with values \"a\" and \"b\":\n//\n// ::std::vector< ::std::string> GetParameterStrings() {\n//   ::std::vector< ::std::string> v;\n//   v.push_back(\"a\");\n//   v.push_back(\"b\");\n//   return v;\n// }\n//\n// INSTANTIATE_TEST_CASE_P(CharSequence,\n//                         StlStringTest,\n//                         ValuesIn(GetParameterStrings()));\n//\n//\n// This will also instantiate tests from CharTest\n// each with parameter values 'a' and 'b':\n//\n// ::std::list<char> GetParameterChars() {\n//   ::std::list<char> list;\n//   list.push_back('a');\n//   list.push_back('b');\n//   return list;\n// }\n// ::std::list<char> l = GetParameterChars();\n// INSTANTIATE_TEST_CASE_P(CharSequence2,\n//                         CharTest,\n//                         ValuesIn(l.begin(), l.end()));\n//\ntemplate <typename ForwardIterator>\ninternal::ParamGenerator<\n  typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>\nValuesIn(ForwardIterator begin, ForwardIterator end) {\n  typedef typename ::testing::internal::IteratorTraits<ForwardIterator>\n      ::value_type ParamType;\n  return internal::ParamGenerator<ParamType>(\n      new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));\n}\n\ntemplate <typename T, size_t N>\ninternal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {\n  return ValuesIn(array, array + N);\n}\n\ntemplate <class Container>\ninternal::ParamGenerator<typename Container::value_type> ValuesIn(\n    const Container& container) {\n  return ValuesIn(container.begin(), container.end());\n}\n\n// Values() allows generating tests from explicitly specified list of\n// parameters.\n//\n// Synopsis:\n// Values(T v1, T v2, ..., T vN)\n//   - returns a generator producing sequences with elements v1, v2, ..., vN.\n//\n// For example, this instantiates tests from test case BarTest each\n// with values \"one\", \"two\", and \"three\":\n//\n// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values(\"one\", \"two\", \"three\"));\n//\n// This instantiates tests from test case BazTest each with values 1, 2, 3.5.\n// The exact type of values will depend on the type of parameter in BazTest.\n//\n// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));\n//\n// Currently, Values() supports from 1 to 50 parameters.\n//\ntemplate <typename T1>\ninternal::ValueArray1<T1> Values(T1 v1) {\n  return internal::ValueArray1<T1>(v1);\n}\n\ntemplate <typename T1, typename T2>\ninternal::ValueArray2<T1, T2> Values(T1 v1, T2 v2) {\n  return internal::ValueArray2<T1, T2>(v1, v2);\n}\n\ntemplate <typename T1, typename T2, typename T3>\ninternal::ValueArray3<T1, T2, T3> Values(T1 v1, T2 v2, T3 v3) {\n  return internal::ValueArray3<T1, T2, T3>(v1, v2, v3);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4>\ninternal::ValueArray4<T1, T2, T3, T4> Values(T1 v1, T2 v2, T3 v3, T4 v4) {\n  return internal::ValueArray4<T1, T2, T3, T4>(v1, v2, v3, v4);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5>\ninternal::ValueArray5<T1, T2, T3, T4, T5> Values(T1 v1, T2 v2, T3 v3, T4 v4,\n    T5 v5) {\n  return internal::ValueArray5<T1, T2, T3, T4, T5>(v1, v2, v3, v4, v5);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6>\ninternal::ValueArray6<T1, T2, T3, T4, T5, T6> Values(T1 v1, T2 v2, T3 v3,\n    T4 v4, T5 v5, T6 v6) {\n  return internal::ValueArray6<T1, T2, T3, T4, T5, T6>(v1, v2, v3, v4, v5, v6);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7>\ninternal::ValueArray7<T1, T2, T3, T4, T5, T6, T7> Values(T1 v1, T2 v2, T3 v3,\n    T4 v4, T5 v5, T6 v6, T7 v7) {\n  return internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7>(v1, v2, v3, v4, v5,\n      v6, v7);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8>\ninternal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8> Values(T1 v1, T2 v2,\n    T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {\n  return internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8>(v1, v2, v3, v4,\n      v5, v6, v7, v8);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9>\ninternal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9> Values(T1 v1, T2 v2,\n    T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {\n  return internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(v1, v2, v3,\n      v4, v5, v6, v7, v8, v9);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10>\ninternal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Values(T1 v1,\n    T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {\n  return internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(v1,\n      v2, v3, v4, v5, v6, v7, v8, v9, v10);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11>\ninternal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,\n    T11> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11) {\n  return internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,\n      T11>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12>\ninternal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n    T12> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12) {\n  return internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13>\ninternal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n    T13> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12, T13 v13) {\n  return internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14>\ninternal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {\n  return internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,\n      v14);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15>\ninternal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,\n    T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {\n  return internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,\n      v13, v14, v15);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16>\ninternal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,\n    T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,\n    T16 v16) {\n  return internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,\n      v12, v13, v14, v15, v16);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17>\ninternal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,\n    T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,\n    T16 v16, T17 v17) {\n  return internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,\n      v11, v12, v13, v14, v15, v16, v17);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18>\ninternal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,\n    T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,\n    T16 v16, T17 v17, T18 v18) {\n  return internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18>(v1, v2, v3, v4, v5, v6, v7, v8, v9,\n      v10, v11, v12, v13, v14, v15, v16, v17, v18);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19>\ninternal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,\n    T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,\n    T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) {\n  return internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19>(v1, v2, v3, v4, v5, v6, v7, v8,\n      v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20>\ninternal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20> Values(T1 v1, T2 v2, T3 v3, T4 v4,\n    T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,\n    T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) {\n  return internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20>(v1, v2, v3, v4, v5, v6, v7,\n      v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21>\ninternal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21> Values(T1 v1, T2 v2, T3 v3, T4 v4,\n    T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,\n    T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) {\n  return internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(v1, v2, v3, v4, v5, v6,\n      v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22>\ninternal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22> Values(T1 v1, T2 v2, T3 v3,\n    T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,\n    T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,\n    T21 v21, T22 v22) {\n  return internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22>(v1, v2, v3, v4,\n      v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,\n      v20, v21, v22);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23>\ninternal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> Values(T1 v1, T2 v2,\n    T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,\n    T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,\n    T21 v21, T22 v22, T23 v23) {\n  return internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23>(v1, v2, v3,\n      v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,\n      v20, v21, v22, v23);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24>\ninternal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Values(T1 v1, T2 v2,\n    T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,\n    T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,\n    T21 v21, T22 v22, T23 v23, T24 v24) {\n  return internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24>(v1, v2,\n      v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,\n      v19, v20, v21, v22, v23, v24);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25>\ninternal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Values(T1 v1,\n    T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,\n    T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,\n    T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) {\n  return internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25>(v1,\n      v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,\n      v18, v19, v20, v21, v22, v23, v24, v25);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26>\ninternal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n    T26> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n    T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n    T26 v26) {\n  return internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,\n      v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27>\ninternal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n    T27> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n    T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n    T26 v26, T27 v27) {\n  return internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,\n      v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28>\ninternal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n    T28> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n    T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n    T26 v26, T27 v27, T28 v28) {\n  return internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,\n      v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,\n      v28);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29>\ninternal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n    T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n    T26 v26, T27 v27, T28 v28, T29 v29) {\n  return internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,\n      v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,\n      v27, v28, v29);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30>\ninternal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,\n    T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,\n    T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,\n    T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) {\n  return internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,\n      v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,\n      v26, v27, v28, v29, v30);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31>\ninternal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,\n    T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,\n    T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,\n    T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) {\n  return internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,\n      v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,\n      v25, v26, v27, v28, v29, v30, v31);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32>\ninternal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,\n    T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,\n    T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,\n    T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,\n    T32 v32) {\n  return internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32>(v1, v2, v3, v4, v5, v6, v7, v8, v9,\n      v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,\n      v24, v25, v26, v27, v28, v29, v30, v31, v32);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33>\ninternal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,\n    T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,\n    T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,\n    T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,\n    T32 v32, T33 v33) {\n  return internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33>(v1, v2, v3, v4, v5, v6, v7, v8,\n      v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,\n      v24, v25, v26, v27, v28, v29, v30, v31, v32, v33);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34>\ninternal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,\n    T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,\n    T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,\n    T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,\n    T31 v31, T32 v32, T33 v33, T34 v34) {\n  return internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34>(v1, v2, v3, v4, v5, v6, v7,\n      v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,\n      v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35>\ninternal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35> Values(T1 v1, T2 v2, T3 v3, T4 v4,\n    T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,\n    T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,\n    T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,\n    T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) {\n  return internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35>(v1, v2, v3, v4, v5, v6,\n      v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,\n      v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36>\ninternal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36> Values(T1 v1, T2 v2, T3 v3, T4 v4,\n    T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,\n    T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,\n    T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,\n    T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) {\n  return internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36>(v1, v2, v3, v4,\n      v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,\n      v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,\n      v34, v35, v36);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37>\ninternal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37> Values(T1 v1, T2 v2, T3 v3,\n    T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,\n    T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,\n    T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,\n    T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,\n    T37 v37) {\n  return internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37>(v1, v2, v3,\n      v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,\n      v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,\n      v34, v35, v36, v37);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38>\ninternal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Values(T1 v1, T2 v2,\n    T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,\n    T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,\n    T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,\n    T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,\n    T37 v37, T38 v38) {\n  return internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38>(v1, v2,\n      v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,\n      v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32,\n      v33, v34, v35, v36, v37, v38);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39>\ninternal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Values(T1 v1, T2 v2,\n    T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,\n    T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,\n    T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,\n    T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,\n    T37 v37, T38 v38, T39 v39) {\n  return internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39>(v1,\n      v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,\n      v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31,\n      v32, v33, v34, v35, v36, v37, v38, v39);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40>\ninternal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Values(T1 v1,\n    T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,\n    T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,\n    T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27,\n    T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35,\n    T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) {\n  return internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,\n      v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29,\n      v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41>\ninternal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n    T41> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n    T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n    T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n    T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) {\n  return internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40, T41>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,\n      v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28,\n      v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42>\ninternal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n    T42> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n    T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n    T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n    T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n    T42 v42) {\n  return internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40, T41, T42>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,\n      v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,\n      v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41,\n      v42);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43>\ninternal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n    T43> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n    T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n    T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n    T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n    T42 v42, T43 v43) {\n  return internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40, T41, T42, T43>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,\n      v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,\n      v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40,\n      v41, v42, v43);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44>\ninternal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    T44> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n    T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n    T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n    T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n    T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n    T42 v42, T43 v43, T44 v44) {\n  return internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40, T41, T42, T43, T44>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,\n      v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,\n      v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39,\n      v40, v41, v42, v43, v44);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45>\ninternal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    T44, T45> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,\n    T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,\n    T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,\n    T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,\n    T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,\n    T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) {\n  return internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40, T41, T42, T43, T44, T45>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,\n      v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,\n      v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38,\n      v39, v40, v41, v42, v43, v44, v45);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46>\ninternal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    T44, T45, T46> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,\n    T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,\n    T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,\n    T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,\n    T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,\n    T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) {\n  return internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40, T41, T42, T43, T44, T45, T46>(v1, v2, v3, v4, v5, v6, v7, v8, v9,\n      v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,\n      v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,\n      v38, v39, v40, v41, v42, v43, v44, v45, v46);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47>\ninternal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    T44, T45, T46, T47> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,\n    T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,\n    T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,\n    T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,\n    T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,\n    T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) {\n  return internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40, T41, T42, T43, T44, T45, T46, T47>(v1, v2, v3, v4, v5, v6, v7, v8,\n      v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,\n      v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,\n      v38, v39, v40, v41, v42, v43, v44, v45, v46, v47);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48>\ninternal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    T44, T45, T46, T47, T48> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,\n    T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,\n    T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,\n    T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,\n    T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,\n    T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47,\n    T48 v48) {\n  return internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40, T41, T42, T43, T44, T45, T46, T47, T48>(v1, v2, v3, v4, v5, v6, v7,\n      v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,\n      v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36,\n      v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49>\ninternal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    T44, T45, T46, T47, T48, T49> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,\n    T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,\n    T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,\n    T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,\n    T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38,\n    T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46,\n    T47 v47, T48 v48, T49 v49) {\n  return internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40, T41, T42, T43, T44, T45, T46, T47, T48, T49>(v1, v2, v3, v4, v5, v6,\n      v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,\n      v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35,\n      v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49, typename T50>\ninternal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    T44, T45, T46, T47, T48, T49, T50> Values(T1 v1, T2 v2, T3 v3, T4 v4,\n    T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,\n    T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,\n    T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,\n    T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37,\n    T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45,\n    T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) {\n  return internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40, T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>(v1, v2, v3, v4,\n      v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,\n      v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,\n      v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47,\n      v48, v49, v50);\n}\n\n// Bool() allows generating tests with parameters in a set of (false, true).\n//\n// Synopsis:\n// Bool()\n//   - returns a generator producing sequences with elements {false, true}.\n//\n// It is useful when testing code that depends on Boolean flags. Combinations\n// of multiple flags can be tested when several Bool()'s are combined using\n// Combine() function.\n//\n// In the following example all tests in the test case FlagDependentTest\n// will be instantiated twice with parameters false and true.\n//\n// class FlagDependentTest : public testing::TestWithParam<bool> {\n//   virtual void SetUp() {\n//     external_flag = GetParam();\n//   }\n// }\n// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());\n//\ninline internal::ParamGenerator<bool> Bool() {\n  return Values(false, true);\n}\n\n# if GTEST_HAS_COMBINE\n// Combine() allows the user to combine two or more sequences to produce\n// values of a Cartesian product of those sequences' elements.\n//\n// Synopsis:\n// Combine(gen1, gen2, ..., genN)\n//   - returns a generator producing sequences with elements coming from\n//     the Cartesian product of elements from the sequences generated by\n//     gen1, gen2, ..., genN. The sequence elements will have a type of\n//     tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types\n//     of elements from sequences produces by gen1, gen2, ..., genN.\n//\n// Combine can have up to 10 arguments. This number is currently limited\n// by the maximum number of elements in the tuple implementation used by Google\n// Test.\n//\n// Example:\n//\n// This will instantiate tests in test case AnimalTest each one with\n// the parameter values tuple(\"cat\", BLACK), tuple(\"cat\", WHITE),\n// tuple(\"dog\", BLACK), and tuple(\"dog\", WHITE):\n//\n// enum Color { BLACK, GRAY, WHITE };\n// class AnimalTest\n//     : public testing::TestWithParam<tuple<const char*, Color> > {...};\n//\n// TEST_P(AnimalTest, AnimalLooksNice) {...}\n//\n// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,\n//                         Combine(Values(\"cat\", \"dog\"),\n//                                 Values(BLACK, WHITE)));\n//\n// This will instantiate tests in FlagDependentTest with all variations of two\n// Boolean flags:\n//\n// class FlagDependentTest\n//     : public testing::TestWithParam<tuple<bool, bool> > {\n//   virtual void SetUp() {\n//     // Assigns external_flag_1 and external_flag_2 values from the tuple.\n//     tie(external_flag_1, external_flag_2) = GetParam();\n//   }\n// };\n//\n// TEST_P(FlagDependentTest, TestFeature1) {\n//   // Test your code using external_flag_1 and external_flag_2 here.\n// }\n// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,\n//                         Combine(Bool(), Bool()));\n//\ntemplate <typename Generator1, typename Generator2>\ninternal::CartesianProductHolder2<Generator1, Generator2> Combine(\n    const Generator1& g1, const Generator2& g2) {\n  return internal::CartesianProductHolder2<Generator1, Generator2>(\n      g1, g2);\n}\n\ntemplate <typename Generator1, typename Generator2, typename Generator3>\ninternal::CartesianProductHolder3<Generator1, Generator2, Generator3> Combine(\n    const Generator1& g1, const Generator2& g2, const Generator3& g3) {\n  return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(\n      g1, g2, g3);\n}\n\ntemplate <typename Generator1, typename Generator2, typename Generator3,\n    typename Generator4>\ninternal::CartesianProductHolder4<Generator1, Generator2, Generator3,\n    Generator4> Combine(\n    const Generator1& g1, const Generator2& g2, const Generator3& g3,\n        const Generator4& g4) {\n  return internal::CartesianProductHolder4<Generator1, Generator2, Generator3,\n      Generator4>(\n      g1, g2, g3, g4);\n}\n\ntemplate <typename Generator1, typename Generator2, typename Generator3,\n    typename Generator4, typename Generator5>\ninternal::CartesianProductHolder5<Generator1, Generator2, Generator3,\n    Generator4, Generator5> Combine(\n    const Generator1& g1, const Generator2& g2, const Generator3& g3,\n        const Generator4& g4, const Generator5& g5) {\n  return internal::CartesianProductHolder5<Generator1, Generator2, Generator3,\n      Generator4, Generator5>(\n      g1, g2, g3, g4, g5);\n}\n\ntemplate <typename Generator1, typename Generator2, typename Generator3,\n    typename Generator4, typename Generator5, typename Generator6>\ninternal::CartesianProductHolder6<Generator1, Generator2, Generator3,\n    Generator4, Generator5, Generator6> Combine(\n    const Generator1& g1, const Generator2& g2, const Generator3& g3,\n        const Generator4& g4, const Generator5& g5, const Generator6& g6) {\n  return internal::CartesianProductHolder6<Generator1, Generator2, Generator3,\n      Generator4, Generator5, Generator6>(\n      g1, g2, g3, g4, g5, g6);\n}\n\ntemplate <typename Generator1, typename Generator2, typename Generator3,\n    typename Generator4, typename Generator5, typename Generator6,\n    typename Generator7>\ninternal::CartesianProductHolder7<Generator1, Generator2, Generator3,\n    Generator4, Generator5, Generator6, Generator7> Combine(\n    const Generator1& g1, const Generator2& g2, const Generator3& g3,\n        const Generator4& g4, const Generator5& g5, const Generator6& g6,\n        const Generator7& g7) {\n  return internal::CartesianProductHolder7<Generator1, Generator2, Generator3,\n      Generator4, Generator5, Generator6, Generator7>(\n      g1, g2, g3, g4, g5, g6, g7);\n}\n\ntemplate <typename Generator1, typename Generator2, typename Generator3,\n    typename Generator4, typename Generator5, typename Generator6,\n    typename Generator7, typename Generator8>\ninternal::CartesianProductHolder8<Generator1, Generator2, Generator3,\n    Generator4, Generator5, Generator6, Generator7, Generator8> Combine(\n    const Generator1& g1, const Generator2& g2, const Generator3& g3,\n        const Generator4& g4, const Generator5& g5, const Generator6& g6,\n        const Generator7& g7, const Generator8& g8) {\n  return internal::CartesianProductHolder8<Generator1, Generator2, Generator3,\n      Generator4, Generator5, Generator6, Generator7, Generator8>(\n      g1, g2, g3, g4, g5, g6, g7, g8);\n}\n\ntemplate <typename Generator1, typename Generator2, typename Generator3,\n    typename Generator4, typename Generator5, typename Generator6,\n    typename Generator7, typename Generator8, typename Generator9>\ninternal::CartesianProductHolder9<Generator1, Generator2, Generator3,\n    Generator4, Generator5, Generator6, Generator7, Generator8,\n    Generator9> Combine(\n    const Generator1& g1, const Generator2& g2, const Generator3& g3,\n        const Generator4& g4, const Generator5& g5, const Generator6& g6,\n        const Generator7& g7, const Generator8& g8, const Generator9& g9) {\n  return internal::CartesianProductHolder9<Generator1, Generator2, Generator3,\n      Generator4, Generator5, Generator6, Generator7, Generator8, Generator9>(\n      g1, g2, g3, g4, g5, g6, g7, g8, g9);\n}\n\ntemplate <typename Generator1, typename Generator2, typename Generator3,\n    typename Generator4, typename Generator5, typename Generator6,\n    typename Generator7, typename Generator8, typename Generator9,\n    typename Generator10>\ninternal::CartesianProductHolder10<Generator1, Generator2, Generator3,\n    Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,\n    Generator10> Combine(\n    const Generator1& g1, const Generator2& g2, const Generator3& g3,\n        const Generator4& g4, const Generator5& g5, const Generator6& g6,\n        const Generator7& g7, const Generator8& g8, const Generator9& g9,\n        const Generator10& g10) {\n  return internal::CartesianProductHolder10<Generator1, Generator2, Generator3,\n      Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,\n      Generator10>(\n      g1, g2, g3, g4, g5, g6, g7, g8, g9, g10);\n}\n# endif  // GTEST_HAS_COMBINE\n\n\n\n# define TEST_P(test_case_name, test_name) \\\n  class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \\\n      : public test_case_name { \\\n   public: \\\n    GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \\\n    virtual void TestBody(); \\\n   private: \\\n    static int AddToRegistry() { \\\n      ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \\\n          GetTestCasePatternHolder<test_case_name>(\\\n              #test_case_name, __FILE__, __LINE__)->AddTestPattern(\\\n                  #test_case_name, \\\n                  #test_name, \\\n                  new ::testing::internal::TestMetaFactory< \\\n                      GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \\\n      return 0; \\\n    } \\\n    static int gtest_registering_dummy_; \\\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(\\\n        GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \\\n  }; \\\n  int GTEST_TEST_CLASS_NAME_(test_case_name, \\\n                             test_name)::gtest_registering_dummy_ = \\\n      GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \\\n  void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()\n\n# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \\\n  ::testing::internal::ParamGenerator<test_case_name::ParamType> \\\n      gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \\\n  int gtest_##prefix##test_case_name##_dummy_ = \\\n      ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \\\n          GetTestCasePatternHolder<test_case_name>(\\\n              #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\\\n                  #prefix, \\\n                  &gtest_##prefix##test_case_name##_EvalGenerator_, \\\n                  __FILE__, __LINE__)\n\n}  // namespace testing\n\n#endif  // GTEST_HAS_PARAM_TEST\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest-param-test.h.pump",
    "content": "$$ -*- mode: c++; -*-\n$var n = 50  $$ Maximum length of Values arguments we want to support.\n$var maxtuple = 10  $$ Maximum number of Combine arguments we want to support.\n// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: vladl@google.com (Vlad Losev)\n//\n// Macros and functions for implementing parameterized tests\n// in Google C++ Testing Framework (Google Test)\n//\n// This file is generated by a SCRIPT.  DO NOT EDIT BY HAND!\n//\n#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_\n#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_\n\n\n// Value-parameterized tests allow you to test your code with different\n// parameters without writing multiple copies of the same test.\n//\n// Here is how you use value-parameterized tests:\n\n#if 0\n\n// To write value-parameterized tests, first you should define a fixture\n// class. It is usually derived from testing::TestWithParam<T> (see below for\n// another inheritance scheme that's sometimes useful in more complicated\n// class hierarchies), where the type of your parameter values.\n// TestWithParam<T> is itself derived from testing::Test. T can be any\n// copyable type. If it's a raw pointer, you are responsible for managing the\n// lifespan of the pointed values.\n\nclass FooTest : public ::testing::TestWithParam<const char*> {\n  // You can implement all the usual class fixture members here.\n};\n\n// Then, use the TEST_P macro to define as many parameterized tests\n// for this fixture as you want. The _P suffix is for \"parameterized\"\n// or \"pattern\", whichever you prefer to think.\n\nTEST_P(FooTest, DoesBlah) {\n  // Inside a test, access the test parameter with the GetParam() method\n  // of the TestWithParam<T> class:\n  EXPECT_TRUE(foo.Blah(GetParam()));\n  ...\n}\n\nTEST_P(FooTest, HasBlahBlah) {\n  ...\n}\n\n// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test\n// case with any set of parameters you want. Google Test defines a number\n// of functions for generating test parameters. They return what we call\n// (surprise!) parameter generators. Here is a  summary of them, which\n// are all in the testing namespace:\n//\n//\n//  Range(begin, end [, step]) - Yields values {begin, begin+step,\n//                               begin+step+step, ...}. The values do not\n//                               include end. step defaults to 1.\n//  Values(v1, v2, ..., vN)    - Yields values {v1, v2, ..., vN}.\n//  ValuesIn(container)        - Yields values from a C-style array, an STL\n//  ValuesIn(begin,end)          container, or an iterator range [begin, end).\n//  Bool()                     - Yields sequence {false, true}.\n//  Combine(g1, g2, ..., gN)   - Yields all combinations (the Cartesian product\n//                               for the math savvy) of the values generated\n//                               by the N generators.\n//\n// For more details, see comments at the definitions of these functions below\n// in this file.\n//\n// The following statement will instantiate tests from the FooTest test case\n// each with parameter values \"meeny\", \"miny\", and \"moe\".\n\nINSTANTIATE_TEST_CASE_P(InstantiationName,\n                        FooTest,\n                        Values(\"meeny\", \"miny\", \"moe\"));\n\n// To distinguish different instances of the pattern, (yes, you\n// can instantiate it more then once) the first argument to the\n// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the\n// actual test case name. Remember to pick unique prefixes for different\n// instantiations. The tests from the instantiation above will have\n// these names:\n//\n//    * InstantiationName/FooTest.DoesBlah/0 for \"meeny\"\n//    * InstantiationName/FooTest.DoesBlah/1 for \"miny\"\n//    * InstantiationName/FooTest.DoesBlah/2 for \"moe\"\n//    * InstantiationName/FooTest.HasBlahBlah/0 for \"meeny\"\n//    * InstantiationName/FooTest.HasBlahBlah/1 for \"miny\"\n//    * InstantiationName/FooTest.HasBlahBlah/2 for \"moe\"\n//\n// You can use these names in --gtest_filter.\n//\n// This statement will instantiate all tests from FooTest again, each\n// with parameter values \"cat\" and \"dog\":\n\nconst char* pets[] = {\"cat\", \"dog\"};\nINSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));\n\n// The tests from the instantiation above will have these names:\n//\n//    * AnotherInstantiationName/FooTest.DoesBlah/0 for \"cat\"\n//    * AnotherInstantiationName/FooTest.DoesBlah/1 for \"dog\"\n//    * AnotherInstantiationName/FooTest.HasBlahBlah/0 for \"cat\"\n//    * AnotherInstantiationName/FooTest.HasBlahBlah/1 for \"dog\"\n//\n// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests\n// in the given test case, whether their definitions come before or\n// AFTER the INSTANTIATE_TEST_CASE_P statement.\n//\n// Please also note that generator expressions (including parameters to the\n// generators) are evaluated in InitGoogleTest(), after main() has started.\n// This allows the user on one hand, to adjust generator parameters in order\n// to dynamically determine a set of tests to run and on the other hand,\n// give the user a chance to inspect the generated tests with Google Test\n// reflection API before RUN_ALL_TESTS() is executed.\n//\n// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc\n// for more examples.\n//\n// In the future, we plan to publish the API for defining new parameter\n// generators. But for now this interface remains part of the internal\n// implementation and is subject to change.\n//\n//\n// A parameterized test fixture must be derived from testing::Test and from\n// testing::WithParamInterface<T>, where T is the type of the parameter\n// values. Inheriting from TestWithParam<T> satisfies that requirement because\n// TestWithParam<T> inherits from both Test and WithParamInterface. In more\n// complicated hierarchies, however, it is occasionally useful to inherit\n// separately from Test and WithParamInterface. For example:\n\nclass BaseTest : public ::testing::Test {\n  // You can inherit all the usual members for a non-parameterized test\n  // fixture here.\n};\n\nclass DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {\n  // The usual test fixture members go here too.\n};\n\nTEST_F(BaseTest, HasFoo) {\n  // This is an ordinary non-parameterized test.\n}\n\nTEST_P(DerivedTest, DoesBlah) {\n  // GetParam works just the same here as if you inherit from TestWithParam.\n  EXPECT_TRUE(foo.Blah(GetParam()));\n}\n\n#endif  // 0\n\n#include \"gtest/internal/gtest-port.h\"\n\n#if !GTEST_OS_SYMBIAN\n# include <utility>\n#endif\n\n// scripts/fuse_gtest.py depends on gtest's own header being #included\n// *unconditionally*.  Therefore these #includes cannot be moved\n// inside #if GTEST_HAS_PARAM_TEST.\n#include \"gtest/internal/gtest-internal.h\"\n#include \"gtest/internal/gtest-param-util.h\"\n#include \"gtest/internal/gtest-param-util-generated.h\"\n\n#if GTEST_HAS_PARAM_TEST\n\nnamespace testing {\n\n// Functions producing parameter generators.\n//\n// Google Test uses these generators to produce parameters for value-\n// parameterized tests. When a parameterized test case is instantiated\n// with a particular generator, Google Test creates and runs tests\n// for each element in the sequence produced by the generator.\n//\n// In the following sample, tests from test case FooTest are instantiated\n// each three times with parameter values 3, 5, and 8:\n//\n// class FooTest : public TestWithParam<int> { ... };\n//\n// TEST_P(FooTest, TestThis) {\n// }\n// TEST_P(FooTest, TestThat) {\n// }\n// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));\n//\n\n// Range() returns generators providing sequences of values in a range.\n//\n// Synopsis:\n// Range(start, end)\n//   - returns a generator producing a sequence of values {start, start+1,\n//     start+2, ..., }.\n// Range(start, end, step)\n//   - returns a generator producing a sequence of values {start, start+step,\n//     start+step+step, ..., }.\n// Notes:\n//   * The generated sequences never include end. For example, Range(1, 5)\n//     returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)\n//     returns a generator producing {1, 3, 5, 7}.\n//   * start and end must have the same type. That type may be any integral or\n//     floating-point type or a user defined type satisfying these conditions:\n//     * It must be assignable (have operator=() defined).\n//     * It must have operator+() (operator+(int-compatible type) for\n//       two-operand version).\n//     * It must have operator<() defined.\n//     Elements in the resulting sequences will also have that type.\n//   * Condition start < end must be satisfied in order for resulting sequences\n//     to contain any elements.\n//\ntemplate <typename T, typename IncrementT>\ninternal::ParamGenerator<T> Range(T start, T end, IncrementT step) {\n  return internal::ParamGenerator<T>(\n      new internal::RangeGenerator<T, IncrementT>(start, end, step));\n}\n\ntemplate <typename T>\ninternal::ParamGenerator<T> Range(T start, T end) {\n  return Range(start, end, 1);\n}\n\n// ValuesIn() function allows generation of tests with parameters coming from\n// a container.\n//\n// Synopsis:\n// ValuesIn(const T (&array)[N])\n//   - returns a generator producing sequences with elements from\n//     a C-style array.\n// ValuesIn(const Container& container)\n//   - returns a generator producing sequences with elements from\n//     an STL-style container.\n// ValuesIn(Iterator begin, Iterator end)\n//   - returns a generator producing sequences with elements from\n//     a range [begin, end) defined by a pair of STL-style iterators. These\n//     iterators can also be plain C pointers.\n//\n// Please note that ValuesIn copies the values from the containers\n// passed in and keeps them to generate tests in RUN_ALL_TESTS().\n//\n// Examples:\n//\n// This instantiates tests from test case StringTest\n// each with C-string values of \"foo\", \"bar\", and \"baz\":\n//\n// const char* strings[] = {\"foo\", \"bar\", \"baz\"};\n// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));\n//\n// This instantiates tests from test case StlStringTest\n// each with STL strings with values \"a\" and \"b\":\n//\n// ::std::vector< ::std::string> GetParameterStrings() {\n//   ::std::vector< ::std::string> v;\n//   v.push_back(\"a\");\n//   v.push_back(\"b\");\n//   return v;\n// }\n//\n// INSTANTIATE_TEST_CASE_P(CharSequence,\n//                         StlStringTest,\n//                         ValuesIn(GetParameterStrings()));\n//\n//\n// This will also instantiate tests from CharTest\n// each with parameter values 'a' and 'b':\n//\n// ::std::list<char> GetParameterChars() {\n//   ::std::list<char> list;\n//   list.push_back('a');\n//   list.push_back('b');\n//   return list;\n// }\n// ::std::list<char> l = GetParameterChars();\n// INSTANTIATE_TEST_CASE_P(CharSequence2,\n//                         CharTest,\n//                         ValuesIn(l.begin(), l.end()));\n//\ntemplate <typename ForwardIterator>\ninternal::ParamGenerator<\n  typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>\nValuesIn(ForwardIterator begin, ForwardIterator end) {\n  typedef typename ::testing::internal::IteratorTraits<ForwardIterator>\n      ::value_type ParamType;\n  return internal::ParamGenerator<ParamType>(\n      new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));\n}\n\ntemplate <typename T, size_t N>\ninternal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {\n  return ValuesIn(array, array + N);\n}\n\ntemplate <class Container>\ninternal::ParamGenerator<typename Container::value_type> ValuesIn(\n    const Container& container) {\n  return ValuesIn(container.begin(), container.end());\n}\n\n// Values() allows generating tests from explicitly specified list of\n// parameters.\n//\n// Synopsis:\n// Values(T v1, T v2, ..., T vN)\n//   - returns a generator producing sequences with elements v1, v2, ..., vN.\n//\n// For example, this instantiates tests from test case BarTest each\n// with values \"one\", \"two\", and \"three\":\n//\n// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values(\"one\", \"two\", \"three\"));\n//\n// This instantiates tests from test case BazTest each with values 1, 2, 3.5.\n// The exact type of values will depend on the type of parameter in BazTest.\n//\n// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));\n//\n// Currently, Values() supports from 1 to $n parameters.\n//\n$range i 1..n\n$for i [[\n$range j 1..i\n\ntemplate <$for j, [[typename T$j]]>\ninternal::ValueArray$i<$for j, [[T$j]]> Values($for j, [[T$j v$j]]) {\n  return internal::ValueArray$i<$for j, [[T$j]]>($for j, [[v$j]]);\n}\n\n]]\n\n// Bool() allows generating tests with parameters in a set of (false, true).\n//\n// Synopsis:\n// Bool()\n//   - returns a generator producing sequences with elements {false, true}.\n//\n// It is useful when testing code that depends on Boolean flags. Combinations\n// of multiple flags can be tested when several Bool()'s are combined using\n// Combine() function.\n//\n// In the following example all tests in the test case FlagDependentTest\n// will be instantiated twice with parameters false and true.\n//\n// class FlagDependentTest : public testing::TestWithParam<bool> {\n//   virtual void SetUp() {\n//     external_flag = GetParam();\n//   }\n// }\n// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());\n//\ninline internal::ParamGenerator<bool> Bool() {\n  return Values(false, true);\n}\n\n# if GTEST_HAS_COMBINE\n// Combine() allows the user to combine two or more sequences to produce\n// values of a Cartesian product of those sequences' elements.\n//\n// Synopsis:\n// Combine(gen1, gen2, ..., genN)\n//   - returns a generator producing sequences with elements coming from\n//     the Cartesian product of elements from the sequences generated by\n//     gen1, gen2, ..., genN. The sequence elements will have a type of\n//     tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types\n//     of elements from sequences produces by gen1, gen2, ..., genN.\n//\n// Combine can have up to $maxtuple arguments. This number is currently limited\n// by the maximum number of elements in the tuple implementation used by Google\n// Test.\n//\n// Example:\n//\n// This will instantiate tests in test case AnimalTest each one with\n// the parameter values tuple(\"cat\", BLACK), tuple(\"cat\", WHITE),\n// tuple(\"dog\", BLACK), and tuple(\"dog\", WHITE):\n//\n// enum Color { BLACK, GRAY, WHITE };\n// class AnimalTest\n//     : public testing::TestWithParam<tuple<const char*, Color> > {...};\n//\n// TEST_P(AnimalTest, AnimalLooksNice) {...}\n//\n// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,\n//                         Combine(Values(\"cat\", \"dog\"),\n//                                 Values(BLACK, WHITE)));\n//\n// This will instantiate tests in FlagDependentTest with all variations of two\n// Boolean flags:\n//\n// class FlagDependentTest\n//     : public testing::TestWithParam<tuple<bool, bool> > {\n//   virtual void SetUp() {\n//     // Assigns external_flag_1 and external_flag_2 values from the tuple.\n//     tie(external_flag_1, external_flag_2) = GetParam();\n//   }\n// };\n//\n// TEST_P(FlagDependentTest, TestFeature1) {\n//   // Test your code using external_flag_1 and external_flag_2 here.\n// }\n// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,\n//                         Combine(Bool(), Bool()));\n//\n$range i 2..maxtuple\n$for i [[\n$range j 1..i\n\ntemplate <$for j, [[typename Generator$j]]>\ninternal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine(\n    $for j, [[const Generator$j& g$j]]) {\n  return internal::CartesianProductHolder$i<$for j, [[Generator$j]]>(\n      $for j, [[g$j]]);\n}\n\n]]\n# endif  // GTEST_HAS_COMBINE\n\n\n\n# define TEST_P(test_case_name, test_name) \\\n  class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \\\n      : public test_case_name { \\\n   public: \\\n    GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \\\n    virtual void TestBody(); \\\n   private: \\\n    static int AddToRegistry() { \\\n      ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \\\n          GetTestCasePatternHolder<test_case_name>(\\\n              #test_case_name, __FILE__, __LINE__)->AddTestPattern(\\\n                  #test_case_name, \\\n                  #test_name, \\\n                  new ::testing::internal::TestMetaFactory< \\\n                      GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \\\n      return 0; \\\n    } \\\n    static int gtest_registering_dummy_; \\\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(\\\n        GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \\\n  }; \\\n  int GTEST_TEST_CLASS_NAME_(test_case_name, \\\n                             test_name)::gtest_registering_dummy_ = \\\n      GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \\\n  void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()\n\n# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \\\n  ::testing::internal::ParamGenerator<test_case_name::ParamType> \\\n      gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \\\n  int gtest_##prefix##test_case_name##_dummy_ = \\\n      ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \\\n          GetTestCasePatternHolder<test_case_name>(\\\n              #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\\\n                  #prefix, \\\n                  &gtest_##prefix##test_case_name##_EvalGenerator_, \\\n                  __FILE__, __LINE__)\n\n}  // namespace testing\n\n#endif  // GTEST_HAS_PARAM_TEST\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest-printers.h",
    "content": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n\n// Google Test - The Google C++ Testing Framework\n//\n// This file implements a universal value printer that can print a\n// value of any type T:\n//\n//   void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);\n//\n// A user can teach this function how to print a class type T by\n// defining either operator<<() or PrintTo() in the namespace that\n// defines T.  More specifically, the FIRST defined function in the\n// following list will be used (assuming T is defined in namespace\n// foo):\n//\n//   1. foo::PrintTo(const T&, ostream*)\n//   2. operator<<(ostream&, const T&) defined in either foo or the\n//      global namespace.\n//\n// If none of the above is defined, it will print the debug string of\n// the value if it is a protocol buffer, or print the raw bytes in the\n// value otherwise.\n//\n// To aid debugging: when T is a reference type, the address of the\n// value is also printed; when T is a (const) char pointer, both the\n// pointer value and the NUL-terminated string it points to are\n// printed.\n//\n// We also provide some convenient wrappers:\n//\n//   // Prints a value to a string.  For a (const or not) char\n//   // pointer, the NUL-terminated string (but not the pointer) is\n//   // printed.\n//   std::string ::testing::PrintToString(const T& value);\n//\n//   // Prints a value tersely: for a reference type, the referenced\n//   // value (but not the address) is printed; for a (const or not) char\n//   // pointer, the NUL-terminated string (but not the pointer) is\n//   // printed.\n//   void ::testing::internal::UniversalTersePrint(const T& value, ostream*);\n//\n//   // Prints value using the type inferred by the compiler.  The difference\n//   // from UniversalTersePrint() is that this function prints both the\n//   // pointer and the NUL-terminated string for a (const or not) char pointer.\n//   void ::testing::internal::UniversalPrint(const T& value, ostream*);\n//\n//   // Prints the fields of a tuple tersely to a string vector, one\n//   // element for each field. Tuple support must be enabled in\n//   // gtest-port.h.\n//   std::vector<string> UniversalTersePrintTupleFieldsToStrings(\n//       const Tuple& value);\n//\n// Known limitation:\n//\n// The print primitives print the elements of an STL-style container\n// using the compiler-inferred type of *iter where iter is a\n// const_iterator of the container.  When const_iterator is an input\n// iterator but not a forward iterator, this inferred type may not\n// match value_type, and the print output may be incorrect.  In\n// practice, this is rarely a problem as for most containers\n// const_iterator is a forward iterator.  We'll fix this if there's an\n// actual need for it.  Note that this fix cannot rely on value_type\n// being defined as many user-defined container types don't have\n// value_type.\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_\n#define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_\n\n#include <ostream>  // NOLINT\n#include <sstream>\n#include <string>\n#include <utility>\n#include <vector>\n#include \"gtest/internal/gtest-port.h\"\n#include \"gtest/internal/gtest-internal.h\"\n\nnamespace testing {\n\n// Definitions in the 'internal' and 'internal2' name spaces are\n// subject to change without notice.  DO NOT USE THEM IN USER CODE!\nnamespace internal2 {\n\n// Prints the given number of bytes in the given object to the given\n// ostream.\nGTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,\n                                     size_t count,\n                                     ::std::ostream* os);\n\n// For selecting which printer to use when a given type has neither <<\n// nor PrintTo().\nenum TypeKind {\n  kProtobuf,              // a protobuf type\n  kConvertibleToInteger,  // a type implicitly convertible to BiggestInt\n                          // (e.g. a named or unnamed enum type)\n  kOtherType              // anything else\n};\n\n// TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called\n// by the universal printer to print a value of type T when neither\n// operator<< nor PrintTo() is defined for T, where kTypeKind is the\n// \"kind\" of T as defined by enum TypeKind.\ntemplate <typename T, TypeKind kTypeKind>\nclass TypeWithoutFormatter {\n public:\n  // This default version is called when kTypeKind is kOtherType.\n  static void PrintValue(const T& value, ::std::ostream* os) {\n    PrintBytesInObjectTo(reinterpret_cast<const unsigned char*>(&value),\n                         sizeof(value), os);\n  }\n};\n\n// We print a protobuf using its ShortDebugString() when the string\n// doesn't exceed this many characters; otherwise we print it using\n// DebugString() for better readability.\nconst size_t kProtobufOneLinerMaxLength = 50;\n\ntemplate <typename T>\nclass TypeWithoutFormatter<T, kProtobuf> {\n public:\n  static void PrintValue(const T& value, ::std::ostream* os) {\n    const ::testing::internal::string short_str = value.ShortDebugString();\n    const ::testing::internal::string pretty_str =\n        short_str.length() <= kProtobufOneLinerMaxLength ?\n        short_str : (\"\\n\" + value.DebugString());\n    *os << (\"<\" + pretty_str + \">\");\n  }\n};\n\ntemplate <typename T>\nclass TypeWithoutFormatter<T, kConvertibleToInteger> {\n public:\n  // Since T has no << operator or PrintTo() but can be implicitly\n  // converted to BiggestInt, we print it as a BiggestInt.\n  //\n  // Most likely T is an enum type (either named or unnamed), in which\n  // case printing it as an integer is the desired behavior.  In case\n  // T is not an enum, printing it as an integer is the best we can do\n  // given that it has no user-defined printer.\n  static void PrintValue(const T& value, ::std::ostream* os) {\n    const internal::BiggestInt kBigInt = value;\n    *os << kBigInt;\n  }\n};\n\n// Prints the given value to the given ostream.  If the value is a\n// protocol message, its debug string is printed; if it's an enum or\n// of a type implicitly convertible to BiggestInt, it's printed as an\n// integer; otherwise the bytes in the value are printed.  This is\n// what UniversalPrinter<T>::Print() does when it knows nothing about\n// type T and T has neither << operator nor PrintTo().\n//\n// A user can override this behavior for a class type Foo by defining\n// a << operator in the namespace where Foo is defined.\n//\n// We put this operator in namespace 'internal2' instead of 'internal'\n// to simplify the implementation, as much code in 'internal' needs to\n// use << in STL, which would conflict with our own << were it defined\n// in 'internal'.\n//\n// Note that this operator<< takes a generic std::basic_ostream<Char,\n// CharTraits> type instead of the more restricted std::ostream.  If\n// we define it to take an std::ostream instead, we'll get an\n// \"ambiguous overloads\" compiler error when trying to print a type\n// Foo that supports streaming to std::basic_ostream<Char,\n// CharTraits>, as the compiler cannot tell whether\n// operator<<(std::ostream&, const T&) or\n// operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more\n// specific.\ntemplate <typename Char, typename CharTraits, typename T>\n::std::basic_ostream<Char, CharTraits>& operator<<(\n    ::std::basic_ostream<Char, CharTraits>& os, const T& x) {\n  TypeWithoutFormatter<T,\n      (internal::IsAProtocolMessage<T>::value ? kProtobuf :\n       internal::ImplicitlyConvertible<const T&, internal::BiggestInt>::value ?\n       kConvertibleToInteger : kOtherType)>::PrintValue(x, &os);\n  return os;\n}\n\n}  // namespace internal2\n}  // namespace testing\n\n// This namespace MUST NOT BE NESTED IN ::testing, or the name look-up\n// magic needed for implementing UniversalPrinter won't work.\nnamespace testing_internal {\n\n// Used to print a value that is not an STL-style container when the\n// user doesn't define PrintTo() for it.\ntemplate <typename T>\nvoid DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) {\n  // With the following statement, during unqualified name lookup,\n  // testing::internal2::operator<< appears as if it was declared in\n  // the nearest enclosing namespace that contains both\n  // ::testing_internal and ::testing::internal2, i.e. the global\n  // namespace.  For more details, refer to the C++ Standard section\n  // 7.3.4-1 [namespace.udir].  This allows us to fall back onto\n  // testing::internal2::operator<< in case T doesn't come with a <<\n  // operator.\n  //\n  // We cannot write 'using ::testing::internal2::operator<<;', which\n  // gcc 3.3 fails to compile due to a compiler bug.\n  using namespace ::testing::internal2;  // NOLINT\n\n  // Assuming T is defined in namespace foo, in the next statement,\n  // the compiler will consider all of:\n  //\n  //   1. foo::operator<< (thanks to Koenig look-up),\n  //   2. ::operator<< (as the current namespace is enclosed in ::),\n  //   3. testing::internal2::operator<< (thanks to the using statement above).\n  //\n  // The operator<< whose type matches T best will be picked.\n  //\n  // We deliberately allow #2 to be a candidate, as sometimes it's\n  // impossible to define #1 (e.g. when foo is ::std, defining\n  // anything in it is undefined behavior unless you are a compiler\n  // vendor.).\n  *os << value;\n}\n\n}  // namespace testing_internal\n\nnamespace testing {\nnamespace internal {\n\n// UniversalPrinter<T>::Print(value, ostream_ptr) prints the given\n// value to the given ostream.  The caller must ensure that\n// 'ostream_ptr' is not NULL, or the behavior is undefined.\n//\n// We define UniversalPrinter as a class template (as opposed to a\n// function template), as we need to partially specialize it for\n// reference types, which cannot be done with function templates.\ntemplate <typename T>\nclass UniversalPrinter;\n\ntemplate <typename T>\nvoid UniversalPrint(const T& value, ::std::ostream* os);\n\n// Used to print an STL-style container when the user doesn't define\n// a PrintTo() for it.\ntemplate <typename C>\nvoid DefaultPrintTo(IsContainer /* dummy */,\n                    false_type /* is not a pointer */,\n                    const C& container, ::std::ostream* os) {\n  const size_t kMaxCount = 32;  // The maximum number of elements to print.\n  *os << '{';\n  size_t count = 0;\n  for (typename C::const_iterator it = container.begin();\n       it != container.end(); ++it, ++count) {\n    if (count > 0) {\n      *os << ',';\n      if (count == kMaxCount) {  // Enough has been printed.\n        *os << \" ...\";\n        break;\n      }\n    }\n    *os << ' ';\n    // We cannot call PrintTo(*it, os) here as PrintTo() doesn't\n    // handle *it being a native array.\n    internal::UniversalPrint(*it, os);\n  }\n\n  if (count > 0) {\n    *os << ' ';\n  }\n  *os << '}';\n}\n\n// Used to print a pointer that is neither a char pointer nor a member\n// pointer, when the user doesn't define PrintTo() for it.  (A member\n// variable pointer or member function pointer doesn't really point to\n// a location in the address space.  Their representation is\n// implementation-defined.  Therefore they will be printed as raw\n// bytes.)\ntemplate <typename T>\nvoid DefaultPrintTo(IsNotContainer /* dummy */,\n                    true_type /* is a pointer */,\n                    T* p, ::std::ostream* os) {\n  if (p == NULL) {\n    *os << \"NULL\";\n  } else {\n    // C++ doesn't allow casting from a function pointer to any object\n    // pointer.\n    //\n    // IsTrue() silences warnings: \"Condition is always true\",\n    // \"unreachable code\".\n    if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {\n      // T is not a function type.  We just call << to print p,\n      // relying on ADL to pick up user-defined << for their pointer\n      // types, if any.\n      *os << p;\n    } else {\n      // T is a function type, so '*os << p' doesn't do what we want\n      // (it just prints p as bool).  We want to print p as a const\n      // void*.  However, we cannot cast it to const void* directly,\n      // even using reinterpret_cast, as earlier versions of gcc\n      // (e.g. 3.4.5) cannot compile the cast when p is a function\n      // pointer.  Casting to UInt64 first solves the problem.\n      *os << reinterpret_cast<const void*>(\n          reinterpret_cast<internal::UInt64>(p));\n    }\n  }\n}\n\n// Used to print a non-container, non-pointer value when the user\n// doesn't define PrintTo() for it.\ntemplate <typename T>\nvoid DefaultPrintTo(IsNotContainer /* dummy */,\n                    false_type /* is not a pointer */,\n                    const T& value, ::std::ostream* os) {\n  ::testing_internal::DefaultPrintNonContainerTo(value, os);\n}\n\n// Prints the given value using the << operator if it has one;\n// otherwise prints the bytes in it.  This is what\n// UniversalPrinter<T>::Print() does when PrintTo() is not specialized\n// or overloaded for type T.\n//\n// A user can override this behavior for a class type Foo by defining\n// an overload of PrintTo() in the namespace where Foo is defined.  We\n// give the user this option as sometimes defining a << operator for\n// Foo is not desirable (e.g. the coding style may prevent doing it,\n// or there is already a << operator but it doesn't do what the user\n// wants).\ntemplate <typename T>\nvoid PrintTo(const T& value, ::std::ostream* os) {\n  // DefaultPrintTo() is overloaded.  The type of its first two\n  // arguments determine which version will be picked.  If T is an\n  // STL-style container, the version for container will be called; if\n  // T is a pointer, the pointer version will be called; otherwise the\n  // generic version will be called.\n  //\n  // Note that we check for container types here, prior to we check\n  // for protocol message types in our operator<<.  The rationale is:\n  //\n  // For protocol messages, we want to give people a chance to\n  // override Google Mock's format by defining a PrintTo() or\n  // operator<<.  For STL containers, other formats can be\n  // incompatible with Google Mock's format for the container\n  // elements; therefore we check for container types here to ensure\n  // that our format is used.\n  //\n  // The second argument of DefaultPrintTo() is needed to bypass a bug\n  // in Symbian's C++ compiler that prevents it from picking the right\n  // overload between:\n  //\n  //   PrintTo(const T& x, ...);\n  //   PrintTo(T* x, ...);\n  DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);\n}\n\n// The following list of PrintTo() overloads tells\n// UniversalPrinter<T>::Print() how to print standard types (built-in\n// types, strings, plain arrays, and pointers).\n\n// Overloads for various char types.\nGTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);\nGTEST_API_ void PrintTo(signed char c, ::std::ostream* os);\ninline void PrintTo(char c, ::std::ostream* os) {\n  // When printing a plain char, we always treat it as unsigned.  This\n  // way, the output won't be affected by whether the compiler thinks\n  // char is signed or not.\n  PrintTo(static_cast<unsigned char>(c), os);\n}\n\n// Overloads for other simple built-in types.\ninline void PrintTo(bool x, ::std::ostream* os) {\n  *os << (x ? \"true\" : \"false\");\n}\n\n// Overload for wchar_t type.\n// Prints a wchar_t as a symbol if it is printable or as its internal\n// code otherwise and also as its decimal code (except for L'\\0').\n// The L'\\0' char is printed as \"L'\\\\0'\". The decimal code is printed\n// as signed integer when wchar_t is implemented by the compiler\n// as a signed type and is printed as an unsigned integer when wchar_t\n// is implemented as an unsigned type.\nGTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);\n\n// Overloads for C strings.\nGTEST_API_ void PrintTo(const char* s, ::std::ostream* os);\ninline void PrintTo(char* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const char*>(s), os);\n}\n\n// signed/unsigned char is often used for representing binary data, so\n// we print pointers to it as void* to be safe.\ninline void PrintTo(const signed char* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const void*>(s), os);\n}\ninline void PrintTo(signed char* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const void*>(s), os);\n}\ninline void PrintTo(const unsigned char* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const void*>(s), os);\n}\ninline void PrintTo(unsigned char* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const void*>(s), os);\n}\n\n// MSVC can be configured to define wchar_t as a typedef of unsigned\n// short.  It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native\n// type.  When wchar_t is a typedef, defining an overload for const\n// wchar_t* would cause unsigned short* be printed as a wide string,\n// possibly causing invalid memory accesses.\n#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)\n// Overloads for wide C strings\nGTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);\ninline void PrintTo(wchar_t* s, ::std::ostream* os) {\n  PrintTo(ImplicitCast_<const wchar_t*>(s), os);\n}\n#endif\n\n// Overload for C arrays.  Multi-dimensional arrays are printed\n// properly.\n\n// Prints the given number of elements in an array, without printing\n// the curly braces.\ntemplate <typename T>\nvoid PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {\n  UniversalPrint(a[0], os);\n  for (size_t i = 1; i != count; i++) {\n    *os << \", \";\n    UniversalPrint(a[i], os);\n  }\n}\n\n// Overloads for ::string and ::std::string.\n#if GTEST_HAS_GLOBAL_STRING\nGTEST_API_ void PrintStringTo(const ::string&s, ::std::ostream* os);\ninline void PrintTo(const ::string& s, ::std::ostream* os) {\n  PrintStringTo(s, os);\n}\n#endif  // GTEST_HAS_GLOBAL_STRING\n\nGTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os);\ninline void PrintTo(const ::std::string& s, ::std::ostream* os) {\n  PrintStringTo(s, os);\n}\n\n// Overloads for ::wstring and ::std::wstring.\n#if GTEST_HAS_GLOBAL_WSTRING\nGTEST_API_ void PrintWideStringTo(const ::wstring&s, ::std::ostream* os);\ninline void PrintTo(const ::wstring& s, ::std::ostream* os) {\n  PrintWideStringTo(s, os);\n}\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n#if GTEST_HAS_STD_WSTRING\nGTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os);\ninline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {\n  PrintWideStringTo(s, os);\n}\n#endif  // GTEST_HAS_STD_WSTRING\n\n#if GTEST_HAS_TR1_TUPLE\n// Overload for ::std::tr1::tuple.  Needed for printing function arguments,\n// which are packed as tuples.\n\n// Helper function for printing a tuple.  T must be instantiated with\n// a tuple type.\ntemplate <typename T>\nvoid PrintTupleTo(const T& t, ::std::ostream* os);\n\n// Overloaded PrintTo() for tuples of various arities.  We support\n// tuples of up-to 10 fields.  The following implementation works\n// regardless of whether tr1::tuple is implemented using the\n// non-standard variadic template feature or not.\n\ninline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n\ntemplate <typename T1>\nvoid PrintTo(const ::std::tr1::tuple<T1>& t, ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n\ntemplate <typename T1, typename T2>\nvoid PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n\ntemplate <typename T1, typename T2, typename T3>\nvoid PrintTo(const ::std::tr1::tuple<T1, T2, T3>& t, ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4>\nvoid PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5>\nvoid PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5>& t,\n             ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n          typename T6>\nvoid PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6>& t,\n             ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n          typename T6, typename T7>\nvoid PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7>& t,\n             ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n          typename T6, typename T7, typename T8>\nvoid PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t,\n             ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n          typename T6, typename T7, typename T8, typename T9>\nvoid PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t,\n             ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n          typename T6, typename T7, typename T8, typename T9, typename T10>\nvoid PrintTo(\n    const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t,\n    ::std::ostream* os) {\n  PrintTupleTo(t, os);\n}\n#endif  // GTEST_HAS_TR1_TUPLE\n\n// Overload for std::pair.\ntemplate <typename T1, typename T2>\nvoid PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {\n  *os << '(';\n  // We cannot use UniversalPrint(value.first, os) here, as T1 may be\n  // a reference type.  The same for printing value.second.\n  UniversalPrinter<T1>::Print(value.first, os);\n  *os << \", \";\n  UniversalPrinter<T2>::Print(value.second, os);\n  *os << ')';\n}\n\n// Implements printing a non-reference type T by letting the compiler\n// pick the right overload of PrintTo() for T.\ntemplate <typename T>\nclass UniversalPrinter {\n public:\n  // MSVC warns about adding const to a function type, so we want to\n  // disable the warning.\n#ifdef _MSC_VER\n# pragma warning(push)          // Saves the current warning state.\n# pragma warning(disable:4180)  // Temporarily disables warning 4180.\n#endif  // _MSC_VER\n\n  // Note: we deliberately don't call this PrintTo(), as that name\n  // conflicts with ::testing::internal::PrintTo in the body of the\n  // function.\n  static void Print(const T& value, ::std::ostream* os) {\n    // By default, ::testing::internal::PrintTo() is used for printing\n    // the value.\n    //\n    // Thanks to Koenig look-up, if T is a class and has its own\n    // PrintTo() function defined in its namespace, that function will\n    // be visible here.  Since it is more specific than the generic ones\n    // in ::testing::internal, it will be picked by the compiler in the\n    // following statement - exactly what we want.\n    PrintTo(value, os);\n  }\n\n#ifdef _MSC_VER\n# pragma warning(pop)           // Restores the warning state.\n#endif  // _MSC_VER\n};\n\n// UniversalPrintArray(begin, len, os) prints an array of 'len'\n// elements, starting at address 'begin'.\ntemplate <typename T>\nvoid UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {\n  if (len == 0) {\n    *os << \"{}\";\n  } else {\n    *os << \"{ \";\n    const size_t kThreshold = 18;\n    const size_t kChunkSize = 8;\n    // If the array has more than kThreshold elements, we'll have to\n    // omit some details by printing only the first and the last\n    // kChunkSize elements.\n    // TODO(wan@google.com): let the user control the threshold using a flag.\n    if (len <= kThreshold) {\n      PrintRawArrayTo(begin, len, os);\n    } else {\n      PrintRawArrayTo(begin, kChunkSize, os);\n      *os << \", ..., \";\n      PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);\n    }\n    *os << \" }\";\n  }\n}\n// This overload prints a (const) char array compactly.\nGTEST_API_ void UniversalPrintArray(\n    const char* begin, size_t len, ::std::ostream* os);\n\n// This overload prints a (const) wchar_t array compactly.\nGTEST_API_ void UniversalPrintArray(\n    const wchar_t* begin, size_t len, ::std::ostream* os);\n\n// Implements printing an array type T[N].\ntemplate <typename T, size_t N>\nclass UniversalPrinter<T[N]> {\n public:\n  // Prints the given array, omitting some elements when there are too\n  // many.\n  static void Print(const T (&a)[N], ::std::ostream* os) {\n    UniversalPrintArray(a, N, os);\n  }\n};\n\n// Implements printing a reference type T&.\ntemplate <typename T>\nclass UniversalPrinter<T&> {\n public:\n  // MSVC warns about adding const to a function type, so we want to\n  // disable the warning.\n#ifdef _MSC_VER\n# pragma warning(push)          // Saves the current warning state.\n# pragma warning(disable:4180)  // Temporarily disables warning 4180.\n#endif  // _MSC_VER\n\n  static void Print(const T& value, ::std::ostream* os) {\n    // Prints the address of the value.  We use reinterpret_cast here\n    // as static_cast doesn't compile when T is a function type.\n    *os << \"@\" << reinterpret_cast<const void*>(&value) << \" \";\n\n    // Then prints the value itself.\n    UniversalPrint(value, os);\n  }\n\n#ifdef _MSC_VER\n# pragma warning(pop)           // Restores the warning state.\n#endif  // _MSC_VER\n};\n\n// Prints a value tersely: for a reference type, the referenced value\n// (but not the address) is printed; for a (const) char pointer, the\n// NUL-terminated string (but not the pointer) is printed.\n\ntemplate <typename T>\nclass UniversalTersePrinter {\n public:\n  static void Print(const T& value, ::std::ostream* os) {\n    UniversalPrint(value, os);\n  }\n};\ntemplate <typename T>\nclass UniversalTersePrinter<T&> {\n public:\n  static void Print(const T& value, ::std::ostream* os) {\n    UniversalPrint(value, os);\n  }\n};\ntemplate <typename T, size_t N>\nclass UniversalTersePrinter<T[N]> {\n public:\n  static void Print(const T (&value)[N], ::std::ostream* os) {\n    UniversalPrinter<T[N]>::Print(value, os);\n  }\n};\ntemplate <>\nclass UniversalTersePrinter<const char*> {\n public:\n  static void Print(const char* str, ::std::ostream* os) {\n    if (str == NULL) {\n      *os << \"NULL\";\n    } else {\n      UniversalPrint(string(str), os);\n    }\n  }\n};\ntemplate <>\nclass UniversalTersePrinter<char*> {\n public:\n  static void Print(char* str, ::std::ostream* os) {\n    UniversalTersePrinter<const char*>::Print(str, os);\n  }\n};\n\n#if GTEST_HAS_STD_WSTRING\ntemplate <>\nclass UniversalTersePrinter<const wchar_t*> {\n public:\n  static void Print(const wchar_t* str, ::std::ostream* os) {\n    if (str == NULL) {\n      *os << \"NULL\";\n    } else {\n      UniversalPrint(::std::wstring(str), os);\n    }\n  }\n};\n#endif\n\ntemplate <>\nclass UniversalTersePrinter<wchar_t*> {\n public:\n  static void Print(wchar_t* str, ::std::ostream* os) {\n    UniversalTersePrinter<const wchar_t*>::Print(str, os);\n  }\n};\n\ntemplate <typename T>\nvoid UniversalTersePrint(const T& value, ::std::ostream* os) {\n  UniversalTersePrinter<T>::Print(value, os);\n}\n\n// Prints a value using the type inferred by the compiler.  The\n// difference between this and UniversalTersePrint() is that for a\n// (const) char pointer, this prints both the pointer and the\n// NUL-terminated string.\ntemplate <typename T>\nvoid UniversalPrint(const T& value, ::std::ostream* os) {\n  // A workarond for the bug in VC++ 7.1 that prevents us from instantiating\n  // UniversalPrinter with T directly.\n  typedef T T1;\n  UniversalPrinter<T1>::Print(value, os);\n}\n\n#if GTEST_HAS_TR1_TUPLE\ntypedef ::std::vector<string> Strings;\n\n// This helper template allows PrintTo() for tuples and\n// UniversalTersePrintTupleFieldsToStrings() to be defined by\n// induction on the number of tuple fields.  The idea is that\n// TuplePrefixPrinter<N>::PrintPrefixTo(t, os) prints the first N\n// fields in tuple t, and can be defined in terms of\n// TuplePrefixPrinter<N - 1>.\n\n// The inductive case.\ntemplate <size_t N>\nstruct TuplePrefixPrinter {\n  // Prints the first N fields of a tuple.\n  template <typename Tuple>\n  static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {\n    TuplePrefixPrinter<N - 1>::PrintPrefixTo(t, os);\n    *os << \", \";\n    UniversalPrinter<typename ::std::tr1::tuple_element<N - 1, Tuple>::type>\n        ::Print(::std::tr1::get<N - 1>(t), os);\n  }\n\n  // Tersely prints the first N fields of a tuple to a string vector,\n  // one element for each field.\n  template <typename Tuple>\n  static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {\n    TuplePrefixPrinter<N - 1>::TersePrintPrefixToStrings(t, strings);\n    ::std::stringstream ss;\n    UniversalTersePrint(::std::tr1::get<N - 1>(t), &ss);\n    strings->push_back(ss.str());\n  }\n};\n\n// Base cases.\ntemplate <>\nstruct TuplePrefixPrinter<0> {\n  template <typename Tuple>\n  static void PrintPrefixTo(const Tuple&, ::std::ostream*) {}\n\n  template <typename Tuple>\n  static void TersePrintPrefixToStrings(const Tuple&, Strings*) {}\n};\n// We have to specialize the entire TuplePrefixPrinter<> class\n// template here, even though the definition of\n// TersePrintPrefixToStrings() is the same as the generic version, as\n// Embarcadero (formerly CodeGear, formerly Borland) C++ doesn't\n// support specializing a method template of a class template.\ntemplate <>\nstruct TuplePrefixPrinter<1> {\n  template <typename Tuple>\n  static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {\n    UniversalPrinter<typename ::std::tr1::tuple_element<0, Tuple>::type>::\n        Print(::std::tr1::get<0>(t), os);\n  }\n\n  template <typename Tuple>\n  static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {\n    ::std::stringstream ss;\n    UniversalTersePrint(::std::tr1::get<0>(t), &ss);\n    strings->push_back(ss.str());\n  }\n};\n\n// Helper function for printing a tuple.  T must be instantiated with\n// a tuple type.\ntemplate <typename T>\nvoid PrintTupleTo(const T& t, ::std::ostream* os) {\n  *os << \"(\";\n  TuplePrefixPrinter< ::std::tr1::tuple_size<T>::value>::\n      PrintPrefixTo(t, os);\n  *os << \")\";\n}\n\n// Prints the fields of a tuple tersely to a string vector, one\n// element for each field.  See the comment before\n// UniversalTersePrint() for how we define \"tersely\".\ntemplate <typename Tuple>\nStrings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {\n  Strings result;\n  TuplePrefixPrinter< ::std::tr1::tuple_size<Tuple>::value>::\n      TersePrintPrefixToStrings(value, &result);\n  return result;\n}\n#endif  // GTEST_HAS_TR1_TUPLE\n\n}  // namespace internal\n\ntemplate <typename T>\n::std::string PrintToString(const T& value) {\n  ::std::stringstream ss;\n  internal::UniversalTersePrinter<T>::Print(value, &ss);\n  return ss.str();\n}\n\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest-spi.h",
    "content": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n//\n// Utilities for testing Google Test itself and code that uses Google Test\n// (e.g. frameworks built on top of Google Test).\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_\n#define GTEST_INCLUDE_GTEST_GTEST_SPI_H_\n\n#include \"gtest/gtest.h\"\n\nnamespace testing {\n\n// This helper class can be used to mock out Google Test failure reporting\n// so that we can test Google Test or code that builds on Google Test.\n//\n// An object of this class appends a TestPartResult object to the\n// TestPartResultArray object given in the constructor whenever a Google Test\n// failure is reported. It can either intercept only failures that are\n// generated in the same thread that created this object or it can intercept\n// all generated failures. The scope of this mock object can be controlled with\n// the second argument to the two arguments constructor.\nclass GTEST_API_ ScopedFakeTestPartResultReporter\n    : public TestPartResultReporterInterface {\n public:\n  // The two possible mocking modes of this object.\n  enum InterceptMode {\n    INTERCEPT_ONLY_CURRENT_THREAD,  // Intercepts only thread local failures.\n    INTERCEPT_ALL_THREADS           // Intercepts all failures.\n  };\n\n  // The c'tor sets this object as the test part result reporter used\n  // by Google Test.  The 'result' parameter specifies where to report the\n  // results. This reporter will only catch failures generated in the current\n  // thread. DEPRECATED\n  explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result);\n\n  // Same as above, but you can choose the interception scope of this object.\n  ScopedFakeTestPartResultReporter(InterceptMode intercept_mode,\n                                   TestPartResultArray* result);\n\n  // The d'tor restores the previous test part result reporter.\n  virtual ~ScopedFakeTestPartResultReporter();\n\n  // Appends the TestPartResult object to the TestPartResultArray\n  // received in the constructor.\n  //\n  // This method is from the TestPartResultReporterInterface\n  // interface.\n  virtual void ReportTestPartResult(const TestPartResult& result);\n private:\n  void Init();\n\n  const InterceptMode intercept_mode_;\n  TestPartResultReporterInterface* old_reporter_;\n  TestPartResultArray* const result_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedFakeTestPartResultReporter);\n};\n\nnamespace internal {\n\n// A helper class for implementing EXPECT_FATAL_FAILURE() and\n// EXPECT_NONFATAL_FAILURE().  Its destructor verifies that the given\n// TestPartResultArray contains exactly one failure that has the given\n// type and contains the given substring.  If that's not the case, a\n// non-fatal failure will be generated.\nclass GTEST_API_ SingleFailureChecker {\n public:\n  // The constructor remembers the arguments.\n  SingleFailureChecker(const TestPartResultArray* results,\n                       TestPartResult::Type type,\n                       const string& substr);\n  ~SingleFailureChecker();\n private:\n  const TestPartResultArray* const results_;\n  const TestPartResult::Type type_;\n  const string substr_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(SingleFailureChecker);\n};\n\n}  // namespace internal\n\n}  // namespace testing\n\n// A set of macros for testing Google Test assertions or code that's expected\n// to generate Google Test fatal failures.  It verifies that the given\n// statement will cause exactly one fatal Google Test failure with 'substr'\n// being part of the failure message.\n//\n// There are two different versions of this macro. EXPECT_FATAL_FAILURE only\n// affects and considers failures generated in the current thread and\n// EXPECT_FATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.\n//\n// The verification of the assertion is done correctly even when the statement\n// throws an exception or aborts the current function.\n//\n// Known restrictions:\n//   - 'statement' cannot reference local non-static variables or\n//     non-static members of the current object.\n//   - 'statement' cannot return a value.\n//   - You cannot stream a failure message to this macro.\n//\n// Note that even though the implementations of the following two\n// macros are much alike, we cannot refactor them to use a common\n// helper macro, due to some peculiarity in how the preprocessor\n// works.  The AcceptsMacroThatExpandsToUnprotectedComma test in\n// gtest_unittest.cc will fail to compile if we do that.\n#define EXPECT_FATAL_FAILURE(statement, substr) \\\n  do { \\\n    class GTestExpectFatalFailureHelper {\\\n     public:\\\n      static void Execute() { statement; }\\\n    };\\\n    ::testing::TestPartResultArray gtest_failures;\\\n    ::testing::internal::SingleFailureChecker gtest_checker(\\\n        &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\\\n    {\\\n      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\\\n          ::testing::ScopedFakeTestPartResultReporter:: \\\n          INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\\\n      GTestExpectFatalFailureHelper::Execute();\\\n    }\\\n  } while (::testing::internal::AlwaysFalse())\n\n#define EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr) \\\n  do { \\\n    class GTestExpectFatalFailureHelper {\\\n     public:\\\n      static void Execute() { statement; }\\\n    };\\\n    ::testing::TestPartResultArray gtest_failures;\\\n    ::testing::internal::SingleFailureChecker gtest_checker(\\\n        &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\\\n    {\\\n      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\\\n          ::testing::ScopedFakeTestPartResultReporter:: \\\n          INTERCEPT_ALL_THREADS, &gtest_failures);\\\n      GTestExpectFatalFailureHelper::Execute();\\\n    }\\\n  } while (::testing::internal::AlwaysFalse())\n\n// A macro for testing Google Test assertions or code that's expected to\n// generate Google Test non-fatal failures.  It asserts that the given\n// statement will cause exactly one non-fatal Google Test failure with 'substr'\n// being part of the failure message.\n//\n// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only\n// affects and considers failures generated in the current thread and\n// EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.\n//\n// 'statement' is allowed to reference local variables and members of\n// the current object.\n//\n// The verification of the assertion is done correctly even when the statement\n// throws an exception or aborts the current function.\n//\n// Known restrictions:\n//   - You cannot stream a failure message to this macro.\n//\n// Note that even though the implementations of the following two\n// macros are much alike, we cannot refactor them to use a common\n// helper macro, due to some peculiarity in how the preprocessor\n// works.  If we do that, the code won't compile when the user gives\n// EXPECT_NONFATAL_FAILURE() a statement that contains a macro that\n// expands to code containing an unprotected comma.  The\n// AcceptsMacroThatExpandsToUnprotectedComma test in gtest_unittest.cc\n// catches that.\n//\n// For the same reason, we have to write\n//   if (::testing::internal::AlwaysTrue()) { statement; }\n// instead of\n//   GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)\n// to avoid an MSVC warning on unreachable code.\n#define EXPECT_NONFATAL_FAILURE(statement, substr) \\\n  do {\\\n    ::testing::TestPartResultArray gtest_failures;\\\n    ::testing::internal::SingleFailureChecker gtest_checker(\\\n        &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \\\n        (substr));\\\n    {\\\n      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\\\n          ::testing::ScopedFakeTestPartResultReporter:: \\\n          INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\\\n      if (::testing::internal::AlwaysTrue()) { statement; }\\\n    }\\\n  } while (::testing::internal::AlwaysFalse())\n\n#define EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr) \\\n  do {\\\n    ::testing::TestPartResultArray gtest_failures;\\\n    ::testing::internal::SingleFailureChecker gtest_checker(\\\n        &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \\\n        (substr));\\\n    {\\\n      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\\\n          ::testing::ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS, \\\n          &gtest_failures);\\\n      if (::testing::internal::AlwaysTrue()) { statement; }\\\n    }\\\n  } while (::testing::internal::AlwaysFalse())\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_SPI_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest-test-part.h",
    "content": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mheule@google.com (Markus Heule)\n//\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_\n#define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_\n\n#include <iosfwd>\n#include <vector>\n#include \"gtest/internal/gtest-internal.h\"\n#include \"gtest/internal/gtest-string.h\"\n\nnamespace testing {\n\n// A copyable object representing the result of a test part (i.e. an\n// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()).\n//\n// Don't inherit from TestPartResult as its destructor is not virtual.\nclass GTEST_API_ TestPartResult {\n public:\n  // The possible outcomes of a test part (i.e. an assertion or an\n  // explicit SUCCEED(), FAIL(), or ADD_FAILURE()).\n  enum Type {\n    kSuccess,          // Succeeded.\n    kNonFatalFailure,  // Failed but the test can continue.\n    kFatalFailure      // Failed and the test should be terminated.\n  };\n\n  // C'tor.  TestPartResult does NOT have a default constructor.\n  // Always use this constructor (with parameters) to create a\n  // TestPartResult object.\n  TestPartResult(Type a_type,\n                 const char* a_file_name,\n                 int a_line_number,\n                 const char* a_message)\n      : type_(a_type),\n        file_name_(a_file_name == NULL ? \"\" : a_file_name),\n        line_number_(a_line_number),\n        summary_(ExtractSummary(a_message)),\n        message_(a_message) {\n  }\n\n  // Gets the outcome of the test part.\n  Type type() const { return type_; }\n\n  // Gets the name of the source file where the test part took place, or\n  // NULL if it's unknown.\n  const char* file_name() const {\n    return file_name_.empty() ? NULL : file_name_.c_str();\n  }\n\n  // Gets the line in the source file where the test part took place,\n  // or -1 if it's unknown.\n  int line_number() const { return line_number_; }\n\n  // Gets the summary of the failure message.\n  const char* summary() const { return summary_.c_str(); }\n\n  // Gets the message associated with the test part.\n  const char* message() const { return message_.c_str(); }\n\n  // Returns true iff the test part passed.\n  bool passed() const { return type_ == kSuccess; }\n\n  // Returns true iff the test part failed.\n  bool failed() const { return type_ != kSuccess; }\n\n  // Returns true iff the test part non-fatally failed.\n  bool nonfatally_failed() const { return type_ == kNonFatalFailure; }\n\n  // Returns true iff the test part fatally failed.\n  bool fatally_failed() const { return type_ == kFatalFailure; }\n\n private:\n  Type type_;\n\n  // Gets the summary of the failure message by omitting the stack\n  // trace in it.\n  static std::string ExtractSummary(const char* message);\n\n  // The name of the source file where the test part took place, or\n  // \"\" if the source file is unknown.\n  std::string file_name_;\n  // The line in the source file where the test part took place, or -1\n  // if the line number is unknown.\n  int line_number_;\n  std::string summary_;  // The test failure summary.\n  std::string message_;  // The test failure message.\n};\n\n// Prints a TestPartResult object.\nstd::ostream& operator<<(std::ostream& os, const TestPartResult& result);\n\n// An array of TestPartResult objects.\n//\n// Don't inherit from TestPartResultArray as its destructor is not\n// virtual.\nclass GTEST_API_ TestPartResultArray {\n public:\n  TestPartResultArray() {}\n\n  // Appends the given TestPartResult to the array.\n  void Append(const TestPartResult& result);\n\n  // Returns the TestPartResult at the given index (0-based).\n  const TestPartResult& GetTestPartResult(int index) const;\n\n  // Returns the number of TestPartResult objects in the array.\n  int size() const;\n\n private:\n  std::vector<TestPartResult> array_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray);\n};\n\n// This interface knows how to report a test part result.\nclass TestPartResultReporterInterface {\n public:\n  virtual ~TestPartResultReporterInterface() {}\n\n  virtual void ReportTestPartResult(const TestPartResult& result) = 0;\n};\n\nnamespace internal {\n\n// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a\n// statement generates new fatal failures. To do so it registers itself as the\n// current test part result reporter. Besides checking if fatal failures were\n// reported, it only delegates the reporting to the former result reporter.\n// The original result reporter is restored in the destructor.\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nclass GTEST_API_ HasNewFatalFailureHelper\n    : public TestPartResultReporterInterface {\n public:\n  HasNewFatalFailureHelper();\n  virtual ~HasNewFatalFailureHelper();\n  virtual void ReportTestPartResult(const TestPartResult& result);\n  bool has_new_fatal_failure() const { return has_new_fatal_failure_; }\n private:\n  bool has_new_fatal_failure_;\n  TestPartResultReporterInterface* original_reporter_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper);\n};\n\n}  // namespace internal\n\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest-typed-test.h",
    "content": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_\n#define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_\n\n// This header implements typed tests and type-parameterized tests.\n\n// Typed (aka type-driven) tests repeat the same test for types in a\n// list.  You must know which types you want to test with when writing\n// typed tests. Here's how you do it:\n\n#if 0\n\n// First, define a fixture class template.  It should be parameterized\n// by a type.  Remember to derive it from testing::Test.\ntemplate <typename T>\nclass FooTest : public testing::Test {\n public:\n  ...\n  typedef std::list<T> List;\n  static T shared_;\n  T value_;\n};\n\n// Next, associate a list of types with the test case, which will be\n// repeated for each type in the list.  The typedef is necessary for\n// the macro to parse correctly.\ntypedef testing::Types<char, int, unsigned int> MyTypes;\nTYPED_TEST_CASE(FooTest, MyTypes);\n\n// If the type list contains only one type, you can write that type\n// directly without Types<...>:\n//   TYPED_TEST_CASE(FooTest, int);\n\n// Then, use TYPED_TEST() instead of TEST_F() to define as many typed\n// tests for this test case as you want.\nTYPED_TEST(FooTest, DoesBlah) {\n  // Inside a test, refer to TypeParam to get the type parameter.\n  // Since we are inside a derived class template, C++ requires use to\n  // visit the members of FooTest via 'this'.\n  TypeParam n = this->value_;\n\n  // To visit static members of the fixture, add the TestFixture::\n  // prefix.\n  n += TestFixture::shared_;\n\n  // To refer to typedefs in the fixture, add the \"typename\n  // TestFixture::\" prefix.\n  typename TestFixture::List values;\n  values.push_back(n);\n  ...\n}\n\nTYPED_TEST(FooTest, HasPropertyA) { ... }\n\n#endif  // 0\n\n// Type-parameterized tests are abstract test patterns parameterized\n// by a type.  Compared with typed tests, type-parameterized tests\n// allow you to define the test pattern without knowing what the type\n// parameters are.  The defined pattern can be instantiated with\n// different types any number of times, in any number of translation\n// units.\n//\n// If you are designing an interface or concept, you can define a\n// suite of type-parameterized tests to verify properties that any\n// valid implementation of the interface/concept should have.  Then,\n// each implementation can easily instantiate the test suite to verify\n// that it conforms to the requirements, without having to write\n// similar tests repeatedly.  Here's an example:\n\n#if 0\n\n// First, define a fixture class template.  It should be parameterized\n// by a type.  Remember to derive it from testing::Test.\ntemplate <typename T>\nclass FooTest : public testing::Test {\n  ...\n};\n\n// Next, declare that you will define a type-parameterized test case\n// (the _P suffix is for \"parameterized\" or \"pattern\", whichever you\n// prefer):\nTYPED_TEST_CASE_P(FooTest);\n\n// Then, use TYPED_TEST_P() to define as many type-parameterized tests\n// for this type-parameterized test case as you want.\nTYPED_TEST_P(FooTest, DoesBlah) {\n  // Inside a test, refer to TypeParam to get the type parameter.\n  TypeParam n = 0;\n  ...\n}\n\nTYPED_TEST_P(FooTest, HasPropertyA) { ... }\n\n// Now the tricky part: you need to register all test patterns before\n// you can instantiate them.  The first argument of the macro is the\n// test case name; the rest are the names of the tests in this test\n// case.\nREGISTER_TYPED_TEST_CASE_P(FooTest,\n                           DoesBlah, HasPropertyA);\n\n// Finally, you are free to instantiate the pattern with the types you\n// want.  If you put the above code in a header file, you can #include\n// it in multiple C++ source files and instantiate it multiple times.\n//\n// To distinguish different instances of the pattern, the first\n// argument to the INSTANTIATE_* macro is a prefix that will be added\n// to the actual test case name.  Remember to pick unique prefixes for\n// different instances.\ntypedef testing::Types<char, int, unsigned int> MyTypes;\nINSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);\n\n// If the type list contains only one type, you can write that type\n// directly without Types<...>:\n//   INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, int);\n\n#endif  // 0\n\n#include \"gtest/internal/gtest-port.h\"\n#include \"gtest/internal/gtest-type-util.h\"\n\n// Implements typed tests.\n\n#if GTEST_HAS_TYPED_TEST\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Expands to the name of the typedef for the type parameters of the\n// given test case.\n# define GTEST_TYPE_PARAMS_(TestCaseName) gtest_type_params_##TestCaseName##_\n\n// The 'Types' template argument below must have spaces around it\n// since some compilers may choke on '>>' when passing a template\n// instance (e.g. Types<int>)\n# define TYPED_TEST_CASE(CaseName, Types) \\\n  typedef ::testing::internal::TypeList< Types >::type \\\n      GTEST_TYPE_PARAMS_(CaseName)\n\n# define TYPED_TEST(CaseName, TestName) \\\n  template <typename gtest_TypeParam_> \\\n  class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \\\n      : public CaseName<gtest_TypeParam_> { \\\n   private: \\\n    typedef CaseName<gtest_TypeParam_> TestFixture; \\\n    typedef gtest_TypeParam_ TypeParam; \\\n    virtual void TestBody(); \\\n  }; \\\n  bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \\\n      ::testing::internal::TypeParameterizedTest< \\\n          CaseName, \\\n          ::testing::internal::TemplateSel< \\\n              GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \\\n          GTEST_TYPE_PARAMS_(CaseName)>::Register(\\\n              \"\", #CaseName, #TestName, 0); \\\n  template <typename gtest_TypeParam_> \\\n  void GTEST_TEST_CLASS_NAME_(CaseName, TestName)<gtest_TypeParam_>::TestBody()\n\n#endif  // GTEST_HAS_TYPED_TEST\n\n// Implements type-parameterized tests.\n\n#if GTEST_HAS_TYPED_TEST_P\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Expands to the namespace name that the type-parameterized tests for\n// the given type-parameterized test case are defined in.  The exact\n// name of the namespace is subject to change without notice.\n# define GTEST_CASE_NAMESPACE_(TestCaseName) \\\n  gtest_case_##TestCaseName##_\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Expands to the name of the variable used to remember the names of\n// the defined tests in the given test case.\n# define GTEST_TYPED_TEST_CASE_P_STATE_(TestCaseName) \\\n  gtest_typed_test_case_p_state_##TestCaseName##_\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY.\n//\n// Expands to the name of the variable used to remember the names of\n// the registered tests in the given test case.\n# define GTEST_REGISTERED_TEST_NAMES_(TestCaseName) \\\n  gtest_registered_test_names_##TestCaseName##_\n\n// The variables defined in the type-parameterized test macros are\n// static as typically these macros are used in a .h file that can be\n// #included in multiple translation units linked together.\n# define TYPED_TEST_CASE_P(CaseName) \\\n  static ::testing::internal::TypedTestCasePState \\\n      GTEST_TYPED_TEST_CASE_P_STATE_(CaseName)\n\n# define TYPED_TEST_P(CaseName, TestName) \\\n  namespace GTEST_CASE_NAMESPACE_(CaseName) { \\\n  template <typename gtest_TypeParam_> \\\n  class TestName : public CaseName<gtest_TypeParam_> { \\\n   private: \\\n    typedef CaseName<gtest_TypeParam_> TestFixture; \\\n    typedef gtest_TypeParam_ TypeParam; \\\n    virtual void TestBody(); \\\n  }; \\\n  static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \\\n      GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).AddTestName(\\\n          __FILE__, __LINE__, #CaseName, #TestName); \\\n  } \\\n  template <typename gtest_TypeParam_> \\\n  void GTEST_CASE_NAMESPACE_(CaseName)::TestName<gtest_TypeParam_>::TestBody()\n\n# define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \\\n  namespace GTEST_CASE_NAMESPACE_(CaseName) { \\\n  typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \\\n  } \\\n  static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \\\n      GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\\\n          __FILE__, __LINE__, #__VA_ARGS__)\n\n// The 'Types' template argument below must have spaces around it\n// since some compilers may choke on '>>' when passing a template\n// instance (e.g. Types<int>)\n# define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types) \\\n  bool gtest_##Prefix##_##CaseName GTEST_ATTRIBUTE_UNUSED_ = \\\n      ::testing::internal::TypeParameterizedTestCase<CaseName, \\\n          GTEST_CASE_NAMESPACE_(CaseName)::gtest_AllTests_, \\\n          ::testing::internal::TypeList< Types >::type>::Register(\\\n              #Prefix, #CaseName, GTEST_REGISTERED_TEST_NAMES_(CaseName))\n\n#endif  // GTEST_HAS_TYPED_TEST_P\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest.h",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n//\n// The Google C++ Testing Framework (Google Test)\n//\n// This header file defines the public API for Google Test.  It should be\n// included by any test program that uses Google Test.\n//\n// IMPORTANT NOTE: Due to limitation of the C++ language, we have to\n// leave some internal implementation details in this header file.\n// They are clearly marked by comments like this:\n//\n//   // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n//\n// Such code is NOT meant to be used by a user directly, and is subject\n// to CHANGE WITHOUT NOTICE.  Therefore DO NOT DEPEND ON IT in a user\n// program!\n//\n// Acknowledgment: Google Test borrowed the idea of automatic test\n// registration from Barthelemy Dagenais' (barthelemy@prologique.com)\n// easyUnit framework.\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_H_\n#define GTEST_INCLUDE_GTEST_GTEST_H_\n\n#include <limits>\n#include <ostream>\n#include <vector>\n\n#include \"gtest/internal/gtest-internal.h\"\n#include \"gtest/internal/gtest-string.h\"\n#include \"gtest/gtest-death-test.h\"\n#include \"gtest/gtest-message.h\"\n#include \"gtest/gtest-param-test.h\"\n#include \"gtest/gtest-printers.h\"\n#include \"gtest/gtest_prod.h\"\n#include \"gtest/gtest-test-part.h\"\n#include \"gtest/gtest-typed-test.h\"\n\n// Depending on the platform, different string classes are available.\n// On Linux, in addition to ::std::string, Google also makes use of\n// class ::string, which has the same interface as ::std::string, but\n// has a different implementation.\n//\n// The user can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that\n// ::string is available AND is a distinct type to ::std::string, or\n// define it to 0 to indicate otherwise.\n//\n// If the user's ::std::string and ::string are the same class due to\n// aliasing, he should define GTEST_HAS_GLOBAL_STRING to 0.\n//\n// If the user doesn't define GTEST_HAS_GLOBAL_STRING, it is defined\n// heuristically.\n\nnamespace testing {\n\n// Declares the flags.\n\n// This flag temporary enables the disabled tests.\nGTEST_DECLARE_bool_(also_run_disabled_tests);\n\n// This flag brings the debugger on an assertion failure.\nGTEST_DECLARE_bool_(break_on_failure);\n\n// This flag controls whether Google Test catches all test-thrown exceptions\n// and logs them as failures.\nGTEST_DECLARE_bool_(catch_exceptions);\n\n// This flag enables using colors in terminal output. Available values are\n// \"yes\" to enable colors, \"no\" (disable colors), or \"auto\" (the default)\n// to let Google Test decide.\nGTEST_DECLARE_string_(color);\n\n// This flag sets up the filter to select by name using a glob pattern\n// the tests to run. If the filter is not given all tests are executed.\nGTEST_DECLARE_string_(filter);\n\n// This flag causes the Google Test to list tests. None of the tests listed\n// are actually run if the flag is provided.\nGTEST_DECLARE_bool_(list_tests);\n\n// This flag controls whether Google Test emits a detailed XML report to a file\n// in addition to its normal textual output.\nGTEST_DECLARE_string_(output);\n\n// This flags control whether Google Test prints the elapsed time for each\n// test.\nGTEST_DECLARE_bool_(print_time);\n\n// This flag specifies the random number seed.\nGTEST_DECLARE_int32_(random_seed);\n\n// This flag sets how many times the tests are repeated. The default value\n// is 1. If the value is -1 the tests are repeating forever.\nGTEST_DECLARE_int32_(repeat);\n\n// This flag controls whether Google Test includes Google Test internal\n// stack frames in failure stack traces.\nGTEST_DECLARE_bool_(show_internal_stack_frames);\n\n// When this flag is specified, tests' order is randomized on every iteration.\nGTEST_DECLARE_bool_(shuffle);\n\n// This flag specifies the maximum number of stack frames to be\n// printed in a failure message.\nGTEST_DECLARE_int32_(stack_trace_depth);\n\n// When this flag is specified, a failed assertion will throw an\n// exception if exceptions are enabled, or exit the program with a\n// non-zero code otherwise.\nGTEST_DECLARE_bool_(throw_on_failure);\n\n// When this flag is set with a \"host:port\" string, on supported\n// platforms test results are streamed to the specified port on\n// the specified host machine.\nGTEST_DECLARE_string_(stream_result_to);\n\n// The upper limit for valid stack trace depths.\nconst int kMaxStackTraceDepth = 100;\n\nnamespace internal {\n\nclass AssertHelper;\nclass DefaultGlobalTestPartResultReporter;\nclass ExecDeathTest;\nclass NoExecDeathTest;\nclass FinalSuccessChecker;\nclass GTestFlagSaver;\nclass StreamingListenerTest;\nclass TestResultAccessor;\nclass TestEventListenersAccessor;\nclass TestEventRepeater;\nclass UnitTestRecordPropertyTestHelper;\nclass WindowsDeathTest;\nclass UnitTestImpl* GetUnitTestImpl();\nvoid ReportFailureInUnknownLocation(TestPartResult::Type result_type,\n                                    const std::string& message);\n\n}  // namespace internal\n\n// The friend relationship of some of these classes is cyclic.\n// If we don't forward declare them the compiler might confuse the classes\n// in friendship clauses with same named classes on the scope.\nclass Test;\nclass TestCase;\nclass TestInfo;\nclass UnitTest;\n\n// A class for indicating whether an assertion was successful.  When\n// the assertion wasn't successful, the AssertionResult object\n// remembers a non-empty message that describes how it failed.\n//\n// To create an instance of this class, use one of the factory functions\n// (AssertionSuccess() and AssertionFailure()).\n//\n// This class is useful for two purposes:\n//   1. Defining predicate functions to be used with Boolean test assertions\n//      EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts\n//   2. Defining predicate-format functions to be\n//      used with predicate assertions (ASSERT_PRED_FORMAT*, etc).\n//\n// For example, if you define IsEven predicate:\n//\n//   testing::AssertionResult IsEven(int n) {\n//     if ((n % 2) == 0)\n//       return testing::AssertionSuccess();\n//     else\n//       return testing::AssertionFailure() << n << \" is odd\";\n//   }\n//\n// Then the failed expectation EXPECT_TRUE(IsEven(Fib(5)))\n// will print the message\n//\n//   Value of: IsEven(Fib(5))\n//     Actual: false (5 is odd)\n//   Expected: true\n//\n// instead of a more opaque\n//\n//   Value of: IsEven(Fib(5))\n//     Actual: false\n//   Expected: true\n//\n// in case IsEven is a simple Boolean predicate.\n//\n// If you expect your predicate to be reused and want to support informative\n// messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up\n// about half as often as positive ones in our tests), supply messages for\n// both success and failure cases:\n//\n//   testing::AssertionResult IsEven(int n) {\n//     if ((n % 2) == 0)\n//       return testing::AssertionSuccess() << n << \" is even\";\n//     else\n//       return testing::AssertionFailure() << n << \" is odd\";\n//   }\n//\n// Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print\n//\n//   Value of: IsEven(Fib(6))\n//     Actual: true (8 is even)\n//   Expected: false\n//\n// NB: Predicates that support negative Boolean assertions have reduced\n// performance in positive ones so be careful not to use them in tests\n// that have lots (tens of thousands) of positive Boolean assertions.\n//\n// To use this class with EXPECT_PRED_FORMAT assertions such as:\n//\n//   // Verifies that Foo() returns an even number.\n//   EXPECT_PRED_FORMAT1(IsEven, Foo());\n//\n// you need to define:\n//\n//   testing::AssertionResult IsEven(const char* expr, int n) {\n//     if ((n % 2) == 0)\n//       return testing::AssertionSuccess();\n//     else\n//       return testing::AssertionFailure()\n//         << \"Expected: \" << expr << \" is even\\n  Actual: it's \" << n;\n//   }\n//\n// If Foo() returns 5, you will see the following message:\n//\n//   Expected: Foo() is even\n//     Actual: it's 5\n//\nclass GTEST_API_ AssertionResult {\n public:\n  // Copy constructor.\n  // Used in EXPECT_TRUE/FALSE(assertion_result).\n  AssertionResult(const AssertionResult& other);\n  // Used in the EXPECT_TRUE/FALSE(bool_expression).\n  explicit AssertionResult(bool success) : success_(success) {}\n\n  // Returns true iff the assertion succeeded.\n  operator bool() const { return success_; }  // NOLINT\n\n  // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.\n  AssertionResult operator!() const;\n\n  // Returns the text streamed into this AssertionResult. Test assertions\n  // use it when they fail (i.e., the predicate's outcome doesn't match the\n  // assertion's expectation). When nothing has been streamed into the\n  // object, returns an empty string.\n  const char* message() const {\n    return message_.get() != NULL ?  message_->c_str() : \"\";\n  }\n  // TODO(vladl@google.com): Remove this after making sure no clients use it.\n  // Deprecated; please use message() instead.\n  const char* failure_message() const { return message(); }\n\n  // Streams a custom failure message into this object.\n  template <typename T> AssertionResult& operator<<(const T& value) {\n    AppendMessage(Message() << value);\n    return *this;\n  }\n\n  // Allows streaming basic output manipulators such as endl or flush into\n  // this object.\n  AssertionResult& operator<<(\n      ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) {\n    AppendMessage(Message() << basic_manipulator);\n    return *this;\n  }\n\n private:\n  // Appends the contents of message to message_.\n  void AppendMessage(const Message& a_message) {\n    if (message_.get() == NULL)\n      message_.reset(new ::std::string);\n    message_->append(a_message.GetString().c_str());\n  }\n\n  // Stores result of the assertion predicate.\n  bool success_;\n  // Stores the message describing the condition in case the expectation\n  // construct is not satisfied with the predicate's outcome.\n  // Referenced via a pointer to avoid taking too much stack frame space\n  // with test assertions.\n  internal::scoped_ptr< ::std::string> message_;\n\n  GTEST_DISALLOW_ASSIGN_(AssertionResult);\n};\n\n// Makes a successful assertion result.\nGTEST_API_ AssertionResult AssertionSuccess();\n\n// Makes a failed assertion result.\nGTEST_API_ AssertionResult AssertionFailure();\n\n// Makes a failed assertion result with the given failure message.\n// Deprecated; use AssertionFailure() << msg.\nGTEST_API_ AssertionResult AssertionFailure(const Message& msg);\n\n// The abstract class that all tests inherit from.\n//\n// In Google Test, a unit test program contains one or many TestCases, and\n// each TestCase contains one or many Tests.\n//\n// When you define a test using the TEST macro, you don't need to\n// explicitly derive from Test - the TEST macro automatically does\n// this for you.\n//\n// The only time you derive from Test is when defining a test fixture\n// to be used a TEST_F.  For example:\n//\n//   class FooTest : public testing::Test {\n//    protected:\n//     virtual void SetUp() { ... }\n//     virtual void TearDown() { ... }\n//     ...\n//   };\n//\n//   TEST_F(FooTest, Bar) { ... }\n//   TEST_F(FooTest, Baz) { ... }\n//\n// Test is not copyable.\nclass GTEST_API_ Test {\n public:\n  friend class TestInfo;\n\n  // Defines types for pointers to functions that set up and tear down\n  // a test case.\n  typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc;\n  typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc;\n\n  // The d'tor is virtual as we intend to inherit from Test.\n  virtual ~Test();\n\n  // Sets up the stuff shared by all tests in this test case.\n  //\n  // Google Test will call Foo::SetUpTestCase() before running the first\n  // test in test case Foo.  Hence a sub-class can define its own\n  // SetUpTestCase() method to shadow the one defined in the super\n  // class.\n  static void SetUpTestCase() {}\n\n  // Tears down the stuff shared by all tests in this test case.\n  //\n  // Google Test will call Foo::TearDownTestCase() after running the last\n  // test in test case Foo.  Hence a sub-class can define its own\n  // TearDownTestCase() method to shadow the one defined in the super\n  // class.\n  static void TearDownTestCase() {}\n\n  // Returns true iff the current test has a fatal failure.\n  static bool HasFatalFailure();\n\n  // Returns true iff the current test has a non-fatal failure.\n  static bool HasNonfatalFailure();\n\n  // Returns true iff the current test has a (either fatal or\n  // non-fatal) failure.\n  static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); }\n\n  // Logs a property for the current test, test case, or for the entire\n  // invocation of the test program when used outside of the context of a\n  // test case.  Only the last value for a given key is remembered.  These\n  // are public static so they can be called from utility functions that are\n  // not members of the test fixture.  Calls to RecordProperty made during\n  // lifespan of the test (from the moment its constructor starts to the\n  // moment its destructor finishes) will be output in XML as attributes of\n  // the <testcase> element.  Properties recorded from fixture's\n  // SetUpTestCase or TearDownTestCase are logged as attributes of the\n  // corresponding <testsuite> element.  Calls to RecordProperty made in the\n  // global context (before or after invocation of RUN_ALL_TESTS and from\n  // SetUp/TearDown method of Environment objects registered with Google\n  // Test) will be output as attributes of the <testsuites> element.\n  static void RecordProperty(const std::string& key, const std::string& value);\n  static void RecordProperty(const std::string& key, int value);\n\n protected:\n  // Creates a Test object.\n  Test();\n\n  // Sets up the test fixture.\n  virtual void SetUp();\n\n  // Tears down the test fixture.\n  virtual void TearDown();\n\n private:\n  // Returns true iff the current test has the same fixture class as\n  // the first test in the current test case.\n  static bool HasSameFixtureClass();\n\n  // Runs the test after the test fixture has been set up.\n  //\n  // A sub-class must implement this to define the test logic.\n  //\n  // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM.\n  // Instead, use the TEST or TEST_F macro.\n  virtual void TestBody() = 0;\n\n  // Sets up, executes, and tears down the test.\n  void Run();\n\n  // Deletes self.  We deliberately pick an unusual name for this\n  // internal method to avoid clashing with names used in user TESTs.\n  void DeleteSelf_() { delete this; }\n\n  // Uses a GTestFlagSaver to save and restore all Google Test flags.\n  const internal::GTestFlagSaver* const gtest_flag_saver_;\n\n  // Often a user mis-spells SetUp() as Setup() and spends a long time\n  // wondering why it is never called by Google Test.  The declaration of\n  // the following method is solely for catching such an error at\n  // compile time:\n  //\n  //   - The return type is deliberately chosen to be not void, so it\n  //   will be a conflict if a user declares void Setup() in his test\n  //   fixture.\n  //\n  //   - This method is private, so it will be another compiler error\n  //   if a user calls it from his test fixture.\n  //\n  // DO NOT OVERRIDE THIS FUNCTION.\n  //\n  // If you see an error about overriding the following function or\n  // about it being private, you have mis-spelled SetUp() as Setup().\n  struct Setup_should_be_spelled_SetUp {};\n  virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }\n\n  // We disallow copying Tests.\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(Test);\n};\n\ntypedef internal::TimeInMillis TimeInMillis;\n\n// A copyable object representing a user specified test property which can be\n// output as a key/value string pair.\n//\n// Don't inherit from TestProperty as its destructor is not virtual.\nclass TestProperty {\n public:\n  // C'tor.  TestProperty does NOT have a default constructor.\n  // Always use this constructor (with parameters) to create a\n  // TestProperty object.\n  TestProperty(const std::string& a_key, const std::string& a_value) :\n    key_(a_key), value_(a_value) {\n  }\n\n  // Gets the user supplied key.\n  const char* key() const {\n    return key_.c_str();\n  }\n\n  // Gets the user supplied value.\n  const char* value() const {\n    return value_.c_str();\n  }\n\n  // Sets a new value, overriding the one supplied in the constructor.\n  void SetValue(const std::string& new_value) {\n    value_ = new_value;\n  }\n\n private:\n  // The key supplied by the user.\n  std::string key_;\n  // The value supplied by the user.\n  std::string value_;\n};\n\n// The result of a single Test.  This includes a list of\n// TestPartResults, a list of TestProperties, a count of how many\n// death tests there are in the Test, and how much time it took to run\n// the Test.\n//\n// TestResult is not copyable.\nclass GTEST_API_ TestResult {\n public:\n  // Creates an empty TestResult.\n  TestResult();\n\n  // D'tor.  Do not inherit from TestResult.\n  ~TestResult();\n\n  // Gets the number of all test parts.  This is the sum of the number\n  // of successful test parts and the number of failed test parts.\n  int total_part_count() const;\n\n  // Returns the number of the test properties.\n  int test_property_count() const;\n\n  // Returns true iff the test passed (i.e. no test part failed).\n  bool Passed() const { return !Failed(); }\n\n  // Returns true iff the test failed.\n  bool Failed() const;\n\n  // Returns true iff the test fatally failed.\n  bool HasFatalFailure() const;\n\n  // Returns true iff the test has a non-fatal failure.\n  bool HasNonfatalFailure() const;\n\n  // Returns the elapsed time, in milliseconds.\n  TimeInMillis elapsed_time() const { return elapsed_time_; }\n\n  // Returns the i-th test part result among all the results. i can range\n  // from 0 to test_property_count() - 1. If i is not in that range, aborts\n  // the program.\n  const TestPartResult& GetTestPartResult(int i) const;\n\n  // Returns the i-th test property. i can range from 0 to\n  // test_property_count() - 1. If i is not in that range, aborts the\n  // program.\n  const TestProperty& GetTestProperty(int i) const;\n\n private:\n  friend class TestInfo;\n  friend class TestCase;\n  friend class UnitTest;\n  friend class internal::DefaultGlobalTestPartResultReporter;\n  friend class internal::ExecDeathTest;\n  friend class internal::TestResultAccessor;\n  friend class internal::UnitTestImpl;\n  friend class internal::WindowsDeathTest;\n\n  // Gets the vector of TestPartResults.\n  const std::vector<TestPartResult>& test_part_results() const {\n    return test_part_results_;\n  }\n\n  // Gets the vector of TestProperties.\n  const std::vector<TestProperty>& test_properties() const {\n    return test_properties_;\n  }\n\n  // Sets the elapsed time.\n  void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; }\n\n  // Adds a test property to the list. The property is validated and may add\n  // a non-fatal failure if invalid (e.g., if it conflicts with reserved\n  // key names). If a property is already recorded for the same key, the\n  // value will be updated, rather than storing multiple values for the same\n  // key.  xml_element specifies the element for which the property is being\n  // recorded and is used for validation.\n  void RecordProperty(const std::string& xml_element,\n                      const TestProperty& test_property);\n\n  // Adds a failure if the key is a reserved attribute of Google Test\n  // testcase tags.  Returns true if the property is valid.\n  // TODO(russr): Validate attribute names are legal and human readable.\n  static bool ValidateTestProperty(const std::string& xml_element,\n                                   const TestProperty& test_property);\n\n  // Adds a test part result to the list.\n  void AddTestPartResult(const TestPartResult& test_part_result);\n\n  // Returns the death test count.\n  int death_test_count() const { return death_test_count_; }\n\n  // Increments the death test count, returning the new count.\n  int increment_death_test_count() { return ++death_test_count_; }\n\n  // Clears the test part results.\n  void ClearTestPartResults();\n\n  // Clears the object.\n  void Clear();\n\n  // Protects mutable state of the property vector and of owned\n  // properties, whose values may be updated.\n  internal::Mutex test_properites_mutex_;\n\n  // The vector of TestPartResults\n  std::vector<TestPartResult> test_part_results_;\n  // The vector of TestProperties\n  std::vector<TestProperty> test_properties_;\n  // Running count of death tests.\n  int death_test_count_;\n  // The elapsed time, in milliseconds.\n  TimeInMillis elapsed_time_;\n\n  // We disallow copying TestResult.\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult);\n};  // class TestResult\n\n// A TestInfo object stores the following information about a test:\n//\n//   Test case name\n//   Test name\n//   Whether the test should be run\n//   A function pointer that creates the test object when invoked\n//   Test result\n//\n// The constructor of TestInfo registers itself with the UnitTest\n// singleton such that the RUN_ALL_TESTS() macro knows which tests to\n// run.\nclass GTEST_API_ TestInfo {\n public:\n  // Destructs a TestInfo object.  This function is not virtual, so\n  // don't inherit from TestInfo.\n  ~TestInfo();\n\n  // Returns the test case name.\n  const char* test_case_name() const { return test_case_name_.c_str(); }\n\n  // Returns the test name.\n  const char* name() const { return name_.c_str(); }\n\n  // Returns the name of the parameter type, or NULL if this is not a typed\n  // or a type-parameterized test.\n  const char* type_param() const {\n    if (type_param_.get() != NULL)\n      return type_param_->c_str();\n    return NULL;\n  }\n\n  // Returns the text representation of the value parameter, or NULL if this\n  // is not a value-parameterized test.\n  const char* value_param() const {\n    if (value_param_.get() != NULL)\n      return value_param_->c_str();\n    return NULL;\n  }\n\n  // Returns true if this test should run, that is if the test is not\n  // disabled (or it is disabled but the also_run_disabled_tests flag has\n  // been specified) and its full name matches the user-specified filter.\n  //\n  // Google Test allows the user to filter the tests by their full names.\n  // The full name of a test Bar in test case Foo is defined as\n  // \"Foo.Bar\".  Only the tests that match the filter will run.\n  //\n  // A filter is a colon-separated list of glob (not regex) patterns,\n  // optionally followed by a '-' and a colon-separated list of\n  // negative patterns (tests to exclude).  A test is run if it\n  // matches one of the positive patterns and does not match any of\n  // the negative patterns.\n  //\n  // For example, *A*:Foo.* is a filter that matches any string that\n  // contains the character 'A' or starts with \"Foo.\".\n  bool should_run() const { return should_run_; }\n\n  // Returns true iff this test will appear in the XML report.\n  bool is_reportable() const {\n    // For now, the XML report includes all tests matching the filter.\n    // In the future, we may trim tests that are excluded because of\n    // sharding.\n    return matches_filter_;\n  }\n\n  // Returns the result of the test.\n  const TestResult* result() const { return &result_; }\n\n private:\n#if GTEST_HAS_DEATH_TEST\n  friend class internal::DefaultDeathTestFactory;\n#endif  // GTEST_HAS_DEATH_TEST\n  friend class Test;\n  friend class TestCase;\n  friend class internal::UnitTestImpl;\n  friend class internal::StreamingListenerTest;\n  friend TestInfo* internal::MakeAndRegisterTestInfo(\n      const char* test_case_name,\n      const char* name,\n      const char* type_param,\n      const char* value_param,\n      internal::TypeId fixture_class_id,\n      Test::SetUpTestCaseFunc set_up_tc,\n      Test::TearDownTestCaseFunc tear_down_tc,\n      internal::TestFactoryBase* factory);\n\n  // Constructs a TestInfo object. The newly constructed instance assumes\n  // ownership of the factory object.\n  TestInfo(const std::string& test_case_name,\n           const std::string& name,\n           const char* a_type_param,   // NULL if not a type-parameterized test\n           const char* a_value_param,  // NULL if not a value-parameterized test\n           internal::TypeId fixture_class_id,\n           internal::TestFactoryBase* factory);\n\n  // Increments the number of death tests encountered in this test so\n  // far.\n  int increment_death_test_count() {\n    return result_.increment_death_test_count();\n  }\n\n  // Creates the test object, runs it, records its result, and then\n  // deletes it.\n  void Run();\n\n  static void ClearTestResult(TestInfo* test_info) {\n    test_info->result_.Clear();\n  }\n\n  // These fields are immutable properties of the test.\n  const std::string test_case_name_;     // Test case name\n  const std::string name_;               // Test name\n  // Name of the parameter type, or NULL if this is not a typed or a\n  // type-parameterized test.\n  const internal::scoped_ptr<const ::std::string> type_param_;\n  // Text representation of the value parameter, or NULL if this is not a\n  // value-parameterized test.\n  const internal::scoped_ptr<const ::std::string> value_param_;\n  const internal::TypeId fixture_class_id_;   // ID of the test fixture class\n  bool should_run_;                 // True iff this test should run\n  bool is_disabled_;                // True iff this test is disabled\n  bool matches_filter_;             // True if this test matches the\n                                    // user-specified filter.\n  internal::TestFactoryBase* const factory_;  // The factory that creates\n                                              // the test object\n\n  // This field is mutable and needs to be reset before running the\n  // test for the second time.\n  TestResult result_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo);\n};\n\n// A test case, which consists of a vector of TestInfos.\n//\n// TestCase is not copyable.\nclass GTEST_API_ TestCase {\n public:\n  // Creates a TestCase with the given name.\n  //\n  // TestCase does NOT have a default constructor.  Always use this\n  // constructor to create a TestCase object.\n  //\n  // Arguments:\n  //\n  //   name:         name of the test case\n  //   a_type_param: the name of the test's type parameter, or NULL if\n  //                 this is not a type-parameterized test.\n  //   set_up_tc:    pointer to the function that sets up the test case\n  //   tear_down_tc: pointer to the function that tears down the test case\n  TestCase(const char* name, const char* a_type_param,\n           Test::SetUpTestCaseFunc set_up_tc,\n           Test::TearDownTestCaseFunc tear_down_tc);\n\n  // Destructor of TestCase.\n  virtual ~TestCase();\n\n  // Gets the name of the TestCase.\n  const char* name() const { return name_.c_str(); }\n\n  // Returns the name of the parameter type, or NULL if this is not a\n  // type-parameterized test case.\n  const char* type_param() const {\n    if (type_param_.get() != NULL)\n      return type_param_->c_str();\n    return NULL;\n  }\n\n  // Returns true if any test in this test case should run.\n  bool should_run() const { return should_run_; }\n\n  // Gets the number of successful tests in this test case.\n  int successful_test_count() const;\n\n  // Gets the number of failed tests in this test case.\n  int failed_test_count() const;\n\n  // Gets the number of disabled tests that will be reported in the XML report.\n  int reportable_disabled_test_count() const;\n\n  // Gets the number of disabled tests in this test case.\n  int disabled_test_count() const;\n\n  // Gets the number of tests to be printed in the XML report.\n  int reportable_test_count() const;\n\n  // Get the number of tests in this test case that should run.\n  int test_to_run_count() const;\n\n  // Gets the number of all tests in this test case.\n  int total_test_count() const;\n\n  // Returns true iff the test case passed.\n  bool Passed() const { return !Failed(); }\n\n  // Returns true iff the test case failed.\n  bool Failed() const { return failed_test_count() > 0; }\n\n  // Returns the elapsed time, in milliseconds.\n  TimeInMillis elapsed_time() const { return elapsed_time_; }\n\n  // Returns the i-th test among all the tests. i can range from 0 to\n  // total_test_count() - 1. If i is not in that range, returns NULL.\n  const TestInfo* GetTestInfo(int i) const;\n\n  // Returns the TestResult that holds test properties recorded during\n  // execution of SetUpTestCase and TearDownTestCase.\n  const TestResult& ad_hoc_test_result() const { return ad_hoc_test_result_; }\n\n private:\n  friend class Test;\n  friend class internal::UnitTestImpl;\n\n  // Gets the (mutable) vector of TestInfos in this TestCase.\n  std::vector<TestInfo*>& test_info_list() { return test_info_list_; }\n\n  // Gets the (immutable) vector of TestInfos in this TestCase.\n  const std::vector<TestInfo*>& test_info_list() const {\n    return test_info_list_;\n  }\n\n  // Returns the i-th test among all the tests. i can range from 0 to\n  // total_test_count() - 1. If i is not in that range, returns NULL.\n  TestInfo* GetMutableTestInfo(int i);\n\n  // Sets the should_run member.\n  void set_should_run(bool should) { should_run_ = should; }\n\n  // Adds a TestInfo to this test case.  Will delete the TestInfo upon\n  // destruction of the TestCase object.\n  void AddTestInfo(TestInfo * test_info);\n\n  // Clears the results of all tests in this test case.\n  void ClearResult();\n\n  // Clears the results of all tests in the given test case.\n  static void ClearTestCaseResult(TestCase* test_case) {\n    test_case->ClearResult();\n  }\n\n  // Runs every test in this TestCase.\n  void Run();\n\n  // Runs SetUpTestCase() for this TestCase.  This wrapper is needed\n  // for catching exceptions thrown from SetUpTestCase().\n  void RunSetUpTestCase() { (*set_up_tc_)(); }\n\n  // Runs TearDownTestCase() for this TestCase.  This wrapper is\n  // needed for catching exceptions thrown from TearDownTestCase().\n  void RunTearDownTestCase() { (*tear_down_tc_)(); }\n\n  // Returns true iff test passed.\n  static bool TestPassed(const TestInfo* test_info) {\n    return test_info->should_run() && test_info->result()->Passed();\n  }\n\n  // Returns true iff test failed.\n  static bool TestFailed(const TestInfo* test_info) {\n    return test_info->should_run() && test_info->result()->Failed();\n  }\n\n  // Returns true iff the test is disabled and will be reported in the XML\n  // report.\n  static bool TestReportableDisabled(const TestInfo* test_info) {\n    return test_info->is_reportable() && test_info->is_disabled_;\n  }\n\n  // Returns true iff test is disabled.\n  static bool TestDisabled(const TestInfo* test_info) {\n    return test_info->is_disabled_;\n  }\n\n  // Returns true iff this test will appear in the XML report.\n  static bool TestReportable(const TestInfo* test_info) {\n    return test_info->is_reportable();\n  }\n\n  // Returns true if the given test should run.\n  static bool ShouldRunTest(const TestInfo* test_info) {\n    return test_info->should_run();\n  }\n\n  // Shuffles the tests in this test case.\n  void ShuffleTests(internal::Random* random);\n\n  // Restores the test order to before the first shuffle.\n  void UnshuffleTests();\n\n  // Name of the test case.\n  std::string name_;\n  // Name of the parameter type, or NULL if this is not a typed or a\n  // type-parameterized test.\n  const internal::scoped_ptr<const ::std::string> type_param_;\n  // The vector of TestInfos in their original order.  It owns the\n  // elements in the vector.\n  std::vector<TestInfo*> test_info_list_;\n  // Provides a level of indirection for the test list to allow easy\n  // shuffling and restoring the test order.  The i-th element in this\n  // vector is the index of the i-th test in the shuffled test list.\n  std::vector<int> test_indices_;\n  // Pointer to the function that sets up the test case.\n  Test::SetUpTestCaseFunc set_up_tc_;\n  // Pointer to the function that tears down the test case.\n  Test::TearDownTestCaseFunc tear_down_tc_;\n  // True iff any test in this test case should run.\n  bool should_run_;\n  // Elapsed time, in milliseconds.\n  TimeInMillis elapsed_time_;\n  // Holds test properties recorded during execution of SetUpTestCase and\n  // TearDownTestCase.\n  TestResult ad_hoc_test_result_;\n\n  // We disallow copying TestCases.\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestCase);\n};\n\n// An Environment object is capable of setting up and tearing down an\n// environment.  The user should subclass this to define his own\n// environment(s).\n//\n// An Environment object does the set-up and tear-down in virtual\n// methods SetUp() and TearDown() instead of the constructor and the\n// destructor, as:\n//\n//   1. You cannot safely throw from a destructor.  This is a problem\n//      as in some cases Google Test is used where exceptions are enabled, and\n//      we may want to implement ASSERT_* using exceptions where they are\n//      available.\n//   2. You cannot use ASSERT_* directly in a constructor or\n//      destructor.\nclass Environment {\n public:\n  // The d'tor is virtual as we need to subclass Environment.\n  virtual ~Environment() {}\n\n  // Override this to define how to set up the environment.\n  virtual void SetUp() {}\n\n  // Override this to define how to tear down the environment.\n  virtual void TearDown() {}\n private:\n  // If you see an error about overriding the following function or\n  // about it being private, you have mis-spelled SetUp() as Setup().\n  struct Setup_should_be_spelled_SetUp {};\n  virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }\n};\n\n// The interface for tracing execution of tests. The methods are organized in\n// the order the corresponding events are fired.\nclass TestEventListener {\n public:\n  virtual ~TestEventListener() {}\n\n  // Fired before any test activity starts.\n  virtual void OnTestProgramStart(const UnitTest& unit_test) = 0;\n\n  // Fired before each iteration of tests starts.  There may be more than\n  // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration\n  // index, starting from 0.\n  virtual void OnTestIterationStart(const UnitTest& unit_test,\n                                    int iteration) = 0;\n\n  // Fired before environment set-up for each iteration of tests starts.\n  virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0;\n\n  // Fired after environment set-up for each iteration of tests ends.\n  virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0;\n\n  // Fired before the test case starts.\n  virtual void OnTestCaseStart(const TestCase& test_case) = 0;\n\n  // Fired before the test starts.\n  virtual void OnTestStart(const TestInfo& test_info) = 0;\n\n  // Fired after a failed assertion or a SUCCEED() invocation.\n  virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0;\n\n  // Fired after the test ends.\n  virtual void OnTestEnd(const TestInfo& test_info) = 0;\n\n  // Fired after the test case ends.\n  virtual void OnTestCaseEnd(const TestCase& test_case) = 0;\n\n  // Fired before environment tear-down for each iteration of tests starts.\n  virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0;\n\n  // Fired after environment tear-down for each iteration of tests ends.\n  virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0;\n\n  // Fired after each iteration of tests finishes.\n  virtual void OnTestIterationEnd(const UnitTest& unit_test,\n                                  int iteration) = 0;\n\n  // Fired after all test activities have ended.\n  virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0;\n};\n\n// The convenience class for users who need to override just one or two\n// methods and are not concerned that a possible change to a signature of\n// the methods they override will not be caught during the build.  For\n// comments about each method please see the definition of TestEventListener\n// above.\nclass EmptyTestEventListener : public TestEventListener {\n public:\n  virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}\n  virtual void OnTestIterationStart(const UnitTest& /*unit_test*/,\n                                    int /*iteration*/) {}\n  virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {}\n  virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}\n  virtual void OnTestCaseStart(const TestCase& /*test_case*/) {}\n  virtual void OnTestStart(const TestInfo& /*test_info*/) {}\n  virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {}\n  virtual void OnTestEnd(const TestInfo& /*test_info*/) {}\n  virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {}\n  virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {}\n  virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {}\n  virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/,\n                                  int /*iteration*/) {}\n  virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}\n};\n\n// TestEventListeners lets users add listeners to track events in Google Test.\nclass GTEST_API_ TestEventListeners {\n public:\n  TestEventListeners();\n  ~TestEventListeners();\n\n  // Appends an event listener to the end of the list. Google Test assumes\n  // the ownership of the listener (i.e. it will delete the listener when\n  // the test program finishes).\n  void Append(TestEventListener* listener);\n\n  // Removes the given event listener from the list and returns it.  It then\n  // becomes the caller's responsibility to delete the listener. Returns\n  // NULL if the listener is not found in the list.\n  TestEventListener* Release(TestEventListener* listener);\n\n  // Returns the standard listener responsible for the default console\n  // output.  Can be removed from the listeners list to shut down default\n  // console output.  Note that removing this object from the listener list\n  // with Release transfers its ownership to the caller and makes this\n  // function return NULL the next time.\n  TestEventListener* default_result_printer() const {\n    return default_result_printer_;\n  }\n\n  // Returns the standard listener responsible for the default XML output\n  // controlled by the --gtest_output=xml flag.  Can be removed from the\n  // listeners list by users who want to shut down the default XML output\n  // controlled by this flag and substitute it with custom one.  Note that\n  // removing this object from the listener list with Release transfers its\n  // ownership to the caller and makes this function return NULL the next\n  // time.\n  TestEventListener* default_xml_generator() const {\n    return default_xml_generator_;\n  }\n\n private:\n  friend class TestCase;\n  friend class TestInfo;\n  friend class internal::DefaultGlobalTestPartResultReporter;\n  friend class internal::NoExecDeathTest;\n  friend class internal::TestEventListenersAccessor;\n  friend class internal::UnitTestImpl;\n\n  // Returns repeater that broadcasts the TestEventListener events to all\n  // subscribers.\n  TestEventListener* repeater();\n\n  // Sets the default_result_printer attribute to the provided listener.\n  // The listener is also added to the listener list and previous\n  // default_result_printer is removed from it and deleted. The listener can\n  // also be NULL in which case it will not be added to the list. Does\n  // nothing if the previous and the current listener objects are the same.\n  void SetDefaultResultPrinter(TestEventListener* listener);\n\n  // Sets the default_xml_generator attribute to the provided listener.  The\n  // listener is also added to the listener list and previous\n  // default_xml_generator is removed from it and deleted. The listener can\n  // also be NULL in which case it will not be added to the list. Does\n  // nothing if the previous and the current listener objects are the same.\n  void SetDefaultXmlGenerator(TestEventListener* listener);\n\n  // Controls whether events will be forwarded by the repeater to the\n  // listeners in the list.\n  bool EventForwardingEnabled() const;\n  void SuppressEventForwarding();\n\n  // The actual list of listeners.\n  internal::TestEventRepeater* repeater_;\n  // Listener responsible for the standard result output.\n  TestEventListener* default_result_printer_;\n  // Listener responsible for the creation of the XML output file.\n  TestEventListener* default_xml_generator_;\n\n  // We disallow copying TestEventListeners.\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners);\n};\n\n// A UnitTest consists of a vector of TestCases.\n//\n// This is a singleton class.  The only instance of UnitTest is\n// created when UnitTest::GetInstance() is first called.  This\n// instance is never deleted.\n//\n// UnitTest is not copyable.\n//\n// This class is thread-safe as long as the methods are called\n// according to their specification.\nclass GTEST_API_ UnitTest {\n public:\n  // Gets the singleton UnitTest object.  The first time this method\n  // is called, a UnitTest object is constructed and returned.\n  // Consecutive calls will return the same object.\n  static UnitTest* GetInstance();\n\n  // Runs all tests in this UnitTest object and prints the result.\n  // Returns 0 if successful, or 1 otherwise.\n  //\n  // This method can only be called from the main thread.\n  //\n  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n  int Run() GTEST_MUST_USE_RESULT_;\n\n  // Returns the working directory when the first TEST() or TEST_F()\n  // was executed.  The UnitTest object owns the string.\n  const char* original_working_dir() const;\n\n  // Returns the TestCase object for the test that's currently running,\n  // or NULL if no test is running.\n  const TestCase* current_test_case() const\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // Returns the TestInfo object for the test that's currently running,\n  // or NULL if no test is running.\n  const TestInfo* current_test_info() const\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // Returns the random seed used at the start of the current test run.\n  int random_seed() const;\n\n#if GTEST_HAS_PARAM_TEST\n  // Returns the ParameterizedTestCaseRegistry object used to keep track of\n  // value-parameterized tests and instantiate and register them.\n  //\n  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n  internal::ParameterizedTestCaseRegistry& parameterized_test_registry()\n      GTEST_LOCK_EXCLUDED_(mutex_);\n#endif  // GTEST_HAS_PARAM_TEST\n\n  // Gets the number of successful test cases.\n  int successful_test_case_count() const;\n\n  // Gets the number of failed test cases.\n  int failed_test_case_count() const;\n\n  // Gets the number of all test cases.\n  int total_test_case_count() const;\n\n  // Gets the number of all test cases that contain at least one test\n  // that should run.\n  int test_case_to_run_count() const;\n\n  // Gets the number of successful tests.\n  int successful_test_count() const;\n\n  // Gets the number of failed tests.\n  int failed_test_count() const;\n\n  // Gets the number of disabled tests that will be reported in the XML report.\n  int reportable_disabled_test_count() const;\n\n  // Gets the number of disabled tests.\n  int disabled_test_count() const;\n\n  // Gets the number of tests to be printed in the XML report.\n  int reportable_test_count() const;\n\n  // Gets the number of all tests.\n  int total_test_count() const;\n\n  // Gets the number of tests that should run.\n  int test_to_run_count() const;\n\n  // Gets the time of the test program start, in ms from the start of the\n  // UNIX epoch.\n  TimeInMillis start_timestamp() const;\n\n  // Gets the elapsed time, in milliseconds.\n  TimeInMillis elapsed_time() const;\n\n  // Returns true iff the unit test passed (i.e. all test cases passed).\n  bool Passed() const;\n\n  // Returns true iff the unit test failed (i.e. some test case failed\n  // or something outside of all tests failed).\n  bool Failed() const;\n\n  // Gets the i-th test case among all the test cases. i can range from 0 to\n  // total_test_case_count() - 1. If i is not in that range, returns NULL.\n  const TestCase* GetTestCase(int i) const;\n\n  // Returns the TestResult containing information on test failures and\n  // properties logged outside of individual test cases.\n  const TestResult& ad_hoc_test_result() const;\n\n  // Returns the list of event listeners that can be used to track events\n  // inside Google Test.\n  TestEventListeners& listeners();\n\n private:\n  // Registers and returns a global test environment.  When a test\n  // program is run, all global test environments will be set-up in\n  // the order they were registered.  After all tests in the program\n  // have finished, all global test environments will be torn-down in\n  // the *reverse* order they were registered.\n  //\n  // The UnitTest object takes ownership of the given environment.\n  //\n  // This method can only be called from the main thread.\n  Environment* AddEnvironment(Environment* env);\n\n  // Adds a TestPartResult to the current TestResult object.  All\n  // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc)\n  // eventually call this to report their results.  The user code\n  // should use the assertion macros instead of calling this directly.\n  void AddTestPartResult(TestPartResult::Type result_type,\n                         const char* file_name,\n                         int line_number,\n                         const std::string& message,\n                         const std::string& os_stack_trace)\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // Adds a TestProperty to the current TestResult object when invoked from\n  // inside a test, to current TestCase's ad_hoc_test_result_ when invoked\n  // from SetUpTestCase or TearDownTestCase, or to the global property set\n  // when invoked elsewhere.  If the result already contains a property with\n  // the same key, the value will be updated.\n  void RecordProperty(const std::string& key, const std::string& value);\n\n  // Gets the i-th test case among all the test cases. i can range from 0 to\n  // total_test_case_count() - 1. If i is not in that range, returns NULL.\n  TestCase* GetMutableTestCase(int i);\n\n  // Accessors for the implementation object.\n  internal::UnitTestImpl* impl() { return impl_; }\n  const internal::UnitTestImpl* impl() const { return impl_; }\n\n  // These classes and funcions are friends as they need to access private\n  // members of UnitTest.\n  friend class Test;\n  friend class internal::AssertHelper;\n  friend class internal::ScopedTrace;\n  friend class internal::StreamingListenerTest;\n  friend class internal::UnitTestRecordPropertyTestHelper;\n  friend Environment* AddGlobalTestEnvironment(Environment* env);\n  friend internal::UnitTestImpl* internal::GetUnitTestImpl();\n  friend void internal::ReportFailureInUnknownLocation(\n      TestPartResult::Type result_type,\n      const std::string& message);\n\n  // Creates an empty UnitTest.\n  UnitTest();\n\n  // D'tor\n  virtual ~UnitTest();\n\n  // Pushes a trace defined by SCOPED_TRACE() on to the per-thread\n  // Google Test trace stack.\n  void PushGTestTrace(const internal::TraceInfo& trace)\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // Pops a trace from the per-thread Google Test trace stack.\n  void PopGTestTrace()\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // Protects mutable state in *impl_.  This is mutable as some const\n  // methods need to lock it too.\n  mutable internal::Mutex mutex_;\n\n  // Opaque implementation object.  This field is never changed once\n  // the object is constructed.  We don't mark it as const here, as\n  // doing so will cause a warning in the constructor of UnitTest.\n  // Mutable state in *impl_ is protected by mutex_.\n  internal::UnitTestImpl* impl_;\n\n  // We disallow copying UnitTest.\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest);\n};\n\n// A convenient wrapper for adding an environment for the test\n// program.\n//\n// You should call this before RUN_ALL_TESTS() is called, probably in\n// main().  If you use gtest_main, you need to call this before main()\n// starts for it to take effect.  For example, you can define a global\n// variable like this:\n//\n//   testing::Environment* const foo_env =\n//       testing::AddGlobalTestEnvironment(new FooEnvironment);\n//\n// However, we strongly recommend you to write your own main() and\n// call AddGlobalTestEnvironment() there, as relying on initialization\n// of global variables makes the code harder to read and may cause\n// problems when you register multiple environments from different\n// translation units and the environments have dependencies among them\n// (remember that the compiler doesn't guarantee the order in which\n// global variables from different translation units are initialized).\ninline Environment* AddGlobalTestEnvironment(Environment* env) {\n  return UnitTest::GetInstance()->AddEnvironment(env);\n}\n\n// Initializes Google Test.  This must be called before calling\n// RUN_ALL_TESTS().  In particular, it parses a command line for the\n// flags that Google Test recognizes.  Whenever a Google Test flag is\n// seen, it is removed from argv, and *argc is decremented.\n//\n// No value is returned.  Instead, the Google Test flag variables are\n// updated.\n//\n// Calling the function for the second time has no user-visible effect.\nGTEST_API_ void InitGoogleTest(int* argc, char** argv);\n\n// This overloaded version can be used in Windows programs compiled in\n// UNICODE mode.\nGTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv);\n\nnamespace internal {\n\n// FormatForComparison<ToPrint, OtherOperand>::Format(value) formats a\n// value of type ToPrint that is an operand of a comparison assertion\n// (e.g. ASSERT_EQ).  OtherOperand is the type of the other operand in\n// the comparison, and is used to help determine the best way to\n// format the value.  In particular, when the value is a C string\n// (char pointer) and the other operand is an STL string object, we\n// want to format the C string as a string, since we know it is\n// compared by value with the string object.  If the value is a char\n// pointer but the other operand is not an STL string object, we don't\n// know whether the pointer is supposed to point to a NUL-terminated\n// string, and thus want to print it as a pointer to be safe.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n\n// The default case.\ntemplate <typename ToPrint, typename OtherOperand>\nclass FormatForComparison {\n public:\n  static ::std::string Format(const ToPrint& value) {\n    return ::testing::PrintToString(value);\n  }\n};\n\n// Array.\ntemplate <typename ToPrint, size_t N, typename OtherOperand>\nclass FormatForComparison<ToPrint[N], OtherOperand> {\n public:\n  static ::std::string Format(const ToPrint* value) {\n    return FormatForComparison<const ToPrint*, OtherOperand>::Format(value);\n  }\n};\n\n// By default, print C string as pointers to be safe, as we don't know\n// whether they actually point to a NUL-terminated string.\n\n#define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType)                \\\n  template <typename OtherOperand>                                      \\\n  class FormatForComparison<CharType*, OtherOperand> {                  \\\n   public:                                                              \\\n    static ::std::string Format(CharType* value) {                      \\\n      return ::testing::PrintToString(static_cast<const void*>(value)); \\\n    }                                                                   \\\n  }\n\nGTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char);\nGTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char);\nGTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(wchar_t);\nGTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const wchar_t);\n\n#undef GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_\n\n// If a C string is compared with an STL string object, we know it's meant\n// to point to a NUL-terminated string, and thus can print it as a string.\n\n#define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType) \\\n  template <>                                                           \\\n  class FormatForComparison<CharType*, OtherStringType> {               \\\n   public:                                                              \\\n    static ::std::string Format(CharType* value) {                      \\\n      return ::testing::PrintToString(value);                           \\\n    }                                                                   \\\n  }\n\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string);\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::std::string);\n\n#if GTEST_HAS_GLOBAL_STRING\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::string);\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::string);\n#endif\n\n#if GTEST_HAS_GLOBAL_WSTRING\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::wstring);\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::wstring);\n#endif\n\n#if GTEST_HAS_STD_WSTRING\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::std::wstring);\nGTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::std::wstring);\n#endif\n\n#undef GTEST_IMPL_FORMAT_C_STRING_AS_STRING_\n\n// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)\n// operand to be used in a failure message.  The type (but not value)\n// of the other operand may affect the format.  This allows us to\n// print a char* as a raw pointer when it is compared against another\n// char* or void*, and print it as a C string when it is compared\n// against an std::string object, for example.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\ntemplate <typename T1, typename T2>\nstd::string FormatForComparisonFailureMessage(\n    const T1& value, const T2& /* other_operand */) {\n  return FormatForComparison<T1, T2>::Format(value);\n}\n\n// The helper function for {ASSERT|EXPECT}_EQ.\ntemplate <typename T1, typename T2>\nAssertionResult CmpHelperEQ(const char* expected_expression,\n                            const char* actual_expression,\n                            const T1& expected,\n                            const T2& actual) {\n#ifdef _MSC_VER\n# pragma warning(push)          // Saves the current warning state.\n# pragma warning(disable:4389)  // Temporarily disables warning on\n                                // signed/unsigned mismatch.\n#endif\n\n  if (expected == actual) {\n    return AssertionSuccess();\n  }\n\n#ifdef _MSC_VER\n# pragma warning(pop)          // Restores the warning state.\n#endif\n\n  return EqFailure(expected_expression,\n                   actual_expression,\n                   FormatForComparisonFailureMessage(expected, actual),\n                   FormatForComparisonFailureMessage(actual, expected),\n                   false);\n}\n\n// With this overloaded version, we allow anonymous enums to be used\n// in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums\n// can be implicitly cast to BiggestInt.\nGTEST_API_ AssertionResult CmpHelperEQ(const char* expected_expression,\n                                       const char* actual_expression,\n                                       BiggestInt expected,\n                                       BiggestInt actual);\n\n// The helper class for {ASSERT|EXPECT}_EQ.  The template argument\n// lhs_is_null_literal is true iff the first argument to ASSERT_EQ()\n// is a null pointer literal.  The following default implementation is\n// for lhs_is_null_literal being false.\ntemplate <bool lhs_is_null_literal>\nclass EqHelper {\n public:\n  // This templatized version is for the general case.\n  template <typename T1, typename T2>\n  static AssertionResult Compare(const char* expected_expression,\n                                 const char* actual_expression,\n                                 const T1& expected,\n                                 const T2& actual) {\n    return CmpHelperEQ(expected_expression, actual_expression, expected,\n                       actual);\n  }\n\n  // With this overloaded version, we allow anonymous enums to be used\n  // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous\n  // enums can be implicitly cast to BiggestInt.\n  //\n  // Even though its body looks the same as the above version, we\n  // cannot merge the two, as it will make anonymous enums unhappy.\n  static AssertionResult Compare(const char* expected_expression,\n                                 const char* actual_expression,\n                                 BiggestInt expected,\n                                 BiggestInt actual) {\n    return CmpHelperEQ(expected_expression, actual_expression, expected,\n                       actual);\n  }\n};\n\n// This specialization is used when the first argument to ASSERT_EQ()\n// is a null pointer literal, like NULL, false, or 0.\ntemplate <>\nclass EqHelper<true> {\n public:\n  // We define two overloaded versions of Compare().  The first\n  // version will be picked when the second argument to ASSERT_EQ() is\n  // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or\n  // EXPECT_EQ(false, a_bool).\n  template <typename T1, typename T2>\n  static AssertionResult Compare(\n      const char* expected_expression,\n      const char* actual_expression,\n      const T1& expected,\n      const T2& actual,\n      // The following line prevents this overload from being considered if T2\n      // is not a pointer type.  We need this because ASSERT_EQ(NULL, my_ptr)\n      // expands to Compare(\"\", \"\", NULL, my_ptr), which requires a conversion\n      // to match the Secret* in the other overload, which would otherwise make\n      // this template match better.\n      typename EnableIf<!is_pointer<T2>::value>::type* = 0) {\n    return CmpHelperEQ(expected_expression, actual_expression, expected,\n                       actual);\n  }\n\n  // This version will be picked when the second argument to ASSERT_EQ() is a\n  // pointer, e.g. ASSERT_EQ(NULL, a_pointer).\n  template <typename T>\n  static AssertionResult Compare(\n      const char* expected_expression,\n      const char* actual_expression,\n      // We used to have a second template parameter instead of Secret*.  That\n      // template parameter would deduce to 'long', making this a better match\n      // than the first overload even without the first overload's EnableIf.\n      // Unfortunately, gcc with -Wconversion-null warns when \"passing NULL to\n      // non-pointer argument\" (even a deduced integral argument), so the old\n      // implementation caused warnings in user code.\n      Secret* /* expected (NULL) */,\n      T* actual) {\n    // We already know that 'expected' is a null pointer.\n    return CmpHelperEQ(expected_expression, actual_expression,\n                       static_cast<T*>(NULL), actual);\n  }\n};\n\n// A macro for implementing the helper functions needed to implement\n// ASSERT_?? and EXPECT_??.  It is here just to avoid copy-and-paste\n// of similar code.\n//\n// For each templatized helper function, we also define an overloaded\n// version for BiggestInt in order to reduce code bloat and allow\n// anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled\n// with gcc 4.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n#define GTEST_IMPL_CMP_HELPER_(op_name, op)\\\ntemplate <typename T1, typename T2>\\\nAssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \\\n                                   const T1& val1, const T2& val2) {\\\n  if (val1 op val2) {\\\n    return AssertionSuccess();\\\n  } else {\\\n    return AssertionFailure() \\\n        << \"Expected: (\" << expr1 << \") \" #op \" (\" << expr2\\\n        << \"), actual: \" << FormatForComparisonFailureMessage(val1, val2)\\\n        << \" vs \" << FormatForComparisonFailureMessage(val2, val1);\\\n  }\\\n}\\\nGTEST_API_ AssertionResult CmpHelper##op_name(\\\n    const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2)\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\n\n// Implements the helper function for {ASSERT|EXPECT}_NE\nGTEST_IMPL_CMP_HELPER_(NE, !=);\n// Implements the helper function for {ASSERT|EXPECT}_LE\nGTEST_IMPL_CMP_HELPER_(LE, <=);\n// Implements the helper function for {ASSERT|EXPECT}_LT\nGTEST_IMPL_CMP_HELPER_(LT, <);\n// Implements the helper function for {ASSERT|EXPECT}_GE\nGTEST_IMPL_CMP_HELPER_(GE, >=);\n// Implements the helper function for {ASSERT|EXPECT}_GT\nGTEST_IMPL_CMP_HELPER_(GT, >);\n\n#undef GTEST_IMPL_CMP_HELPER_\n\n// The helper function for {ASSERT|EXPECT}_STREQ.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression,\n                                          const char* actual_expression,\n                                          const char* expected,\n                                          const char* actual);\n\n// The helper function for {ASSERT|EXPECT}_STRCASEEQ.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression,\n                                              const char* actual_expression,\n                                              const char* expected,\n                                              const char* actual);\n\n// The helper function for {ASSERT|EXPECT}_STRNE.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,\n                                          const char* s2_expression,\n                                          const char* s1,\n                                          const char* s2);\n\n// The helper function for {ASSERT|EXPECT}_STRCASENE.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression,\n                                              const char* s2_expression,\n                                              const char* s1,\n                                              const char* s2);\n\n\n// Helper function for *_STREQ on wide strings.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression,\n                                          const char* actual_expression,\n                                          const wchar_t* expected,\n                                          const wchar_t* actual);\n\n// Helper function for *_STRNE on wide strings.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,\n                                          const char* s2_expression,\n                                          const wchar_t* s1,\n                                          const wchar_t* s2);\n\n}  // namespace internal\n\n// IsSubstring() and IsNotSubstring() are intended to be used as the\n// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by\n// themselves.  They check whether needle is a substring of haystack\n// (NULL is considered a substring of itself only), and return an\n// appropriate error message when they fail.\n//\n// The {needle,haystack}_expr arguments are the stringified\n// expressions that generated the two real arguments.\nGTEST_API_ AssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const char* needle, const char* haystack);\nGTEST_API_ AssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const wchar_t* needle, const wchar_t* haystack);\nGTEST_API_ AssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const char* needle, const char* haystack);\nGTEST_API_ AssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const wchar_t* needle, const wchar_t* haystack);\nGTEST_API_ AssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::string& needle, const ::std::string& haystack);\nGTEST_API_ AssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::string& needle, const ::std::string& haystack);\n\n#if GTEST_HAS_STD_WSTRING\nGTEST_API_ AssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::wstring& needle, const ::std::wstring& haystack);\nGTEST_API_ AssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::wstring& needle, const ::std::wstring& haystack);\n#endif  // GTEST_HAS_STD_WSTRING\n\nnamespace internal {\n\n// Helper template function for comparing floating-points.\n//\n// Template parameter:\n//\n//   RawType: the raw floating-point type (either float or double)\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\ntemplate <typename RawType>\nAssertionResult CmpHelperFloatingPointEQ(const char* expected_expression,\n                                         const char* actual_expression,\n                                         RawType expected,\n                                         RawType actual) {\n  const FloatingPoint<RawType> lhs(expected), rhs(actual);\n\n  if (lhs.AlmostEquals(rhs)) {\n    return AssertionSuccess();\n  }\n\n  ::std::stringstream expected_ss;\n  expected_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)\n              << expected;\n\n  ::std::stringstream actual_ss;\n  actual_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)\n            << actual;\n\n  return EqFailure(expected_expression,\n                   actual_expression,\n                   StringStreamToString(&expected_ss),\n                   StringStreamToString(&actual_ss),\n                   false);\n}\n\n// Helper function for implementing ASSERT_NEAR.\n//\n// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.\nGTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1,\n                                                const char* expr2,\n                                                const char* abs_error_expr,\n                                                double val1,\n                                                double val2,\n                                                double abs_error);\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n// A class that enables one to stream messages to assertion macros\nclass GTEST_API_ AssertHelper {\n public:\n  // Constructor.\n  AssertHelper(TestPartResult::Type type,\n               const char* file,\n               int line,\n               const char* message);\n  ~AssertHelper();\n\n  // Message assignment is a semantic trick to enable assertion\n  // streaming; see the GTEST_MESSAGE_ macro below.\n  void operator=(const Message& message) const;\n\n private:\n  // We put our data in a struct so that the size of the AssertHelper class can\n  // be as small as possible.  This is important because gcc is incapable of\n  // re-using stack space even for temporary variables, so every EXPECT_EQ\n  // reserves stack space for another AssertHelper.\n  struct AssertHelperData {\n    AssertHelperData(TestPartResult::Type t,\n                     const char* srcfile,\n                     int line_num,\n                     const char* msg)\n        : type(t), file(srcfile), line(line_num), message(msg) { }\n\n    TestPartResult::Type const type;\n    const char* const file;\n    int const line;\n    std::string const message;\n\n   private:\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData);\n  };\n\n  AssertHelperData* const data_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper);\n};\n\n}  // namespace internal\n\n#if GTEST_HAS_PARAM_TEST\n// The pure interface class that all value-parameterized tests inherit from.\n// A value-parameterized class must inherit from both ::testing::Test and\n// ::testing::WithParamInterface. In most cases that just means inheriting\n// from ::testing::TestWithParam, but more complicated test hierarchies\n// may need to inherit from Test and WithParamInterface at different levels.\n//\n// This interface has support for accessing the test parameter value via\n// the GetParam() method.\n//\n// Use it with one of the parameter generator defining functions, like Range(),\n// Values(), ValuesIn(), Bool(), and Combine().\n//\n// class FooTest : public ::testing::TestWithParam<int> {\n//  protected:\n//   FooTest() {\n//     // Can use GetParam() here.\n//   }\n//   virtual ~FooTest() {\n//     // Can use GetParam() here.\n//   }\n//   virtual void SetUp() {\n//     // Can use GetParam() here.\n//   }\n//   virtual void TearDown {\n//     // Can use GetParam() here.\n//   }\n// };\n// TEST_P(FooTest, DoesBar) {\n//   // Can use GetParam() method here.\n//   Foo foo;\n//   ASSERT_TRUE(foo.DoesBar(GetParam()));\n// }\n// INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10));\n\ntemplate <typename T>\nclass WithParamInterface {\n public:\n  typedef T ParamType;\n  virtual ~WithParamInterface() {}\n\n  // The current parameter value. Is also available in the test fixture's\n  // constructor. This member function is non-static, even though it only\n  // references static data, to reduce the opportunity for incorrect uses\n  // like writing 'WithParamInterface<bool>::GetParam()' for a test that\n  // uses a fixture whose parameter type is int.\n  const ParamType& GetParam() const {\n    GTEST_CHECK_(parameter_ != NULL)\n        << \"GetParam() can only be called inside a value-parameterized test \"\n        << \"-- did you intend to write TEST_P instead of TEST_F?\";\n    return *parameter_;\n  }\n\n private:\n  // Sets parameter value. The caller is responsible for making sure the value\n  // remains alive and unchanged throughout the current test.\n  static void SetParam(const ParamType* parameter) {\n    parameter_ = parameter;\n  }\n\n  // Static value used for accessing parameter during a test lifetime.\n  static const ParamType* parameter_;\n\n  // TestClass must be a subclass of WithParamInterface<T> and Test.\n  template <class TestClass> friend class internal::ParameterizedTestFactory;\n};\n\ntemplate <typename T>\nconst T* WithParamInterface<T>::parameter_ = NULL;\n\n// Most value-parameterized classes can ignore the existence of\n// WithParamInterface, and can just inherit from ::testing::TestWithParam.\n\ntemplate <typename T>\nclass TestWithParam : public Test, public WithParamInterface<T> {\n};\n\n#endif  // GTEST_HAS_PARAM_TEST\n\n// Macros for indicating success/failure in test code.\n\n// ADD_FAILURE unconditionally adds a failure to the current test.\n// SUCCEED generates a success - it doesn't automatically make the\n// current test successful, as a test is only successful when it has\n// no failure.\n//\n// EXPECT_* verifies that a certain condition is satisfied.  If not,\n// it behaves like ADD_FAILURE.  In particular:\n//\n//   EXPECT_TRUE  verifies that a Boolean condition is true.\n//   EXPECT_FALSE verifies that a Boolean condition is false.\n//\n// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except\n// that they will also abort the current function on failure.  People\n// usually want the fail-fast behavior of FAIL and ASSERT_*, but those\n// writing data-driven tests often find themselves using ADD_FAILURE\n// and EXPECT_* more.\n\n// Generates a nonfatal failure with a generic message.\n#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_(\"Failed\")\n\n// Generates a nonfatal failure at the given source file location with\n// a generic message.\n#define ADD_FAILURE_AT(file, line) \\\n  GTEST_MESSAGE_AT_(file, line, \"Failed\", \\\n                    ::testing::TestPartResult::kNonFatalFailure)\n\n// Generates a fatal failure with a generic message.\n#define GTEST_FAIL() GTEST_FATAL_FAILURE_(\"Failed\")\n\n// Define this macro to 1 to omit the definition of FAIL(), which is a\n// generic name and clashes with some other libraries.\n#if !GTEST_DONT_DEFINE_FAIL\n# define FAIL() GTEST_FAIL()\n#endif\n\n// Generates a success with a generic message.\n#define GTEST_SUCCEED() GTEST_SUCCESS_(\"Succeeded\")\n\n// Define this macro to 1 to omit the definition of SUCCEED(), which\n// is a generic name and clashes with some other libraries.\n#if !GTEST_DONT_DEFINE_SUCCEED\n# define SUCCEED() GTEST_SUCCEED()\n#endif\n\n// Macros for testing exceptions.\n//\n//    * {ASSERT|EXPECT}_THROW(statement, expected_exception):\n//         Tests that the statement throws the expected exception.\n//    * {ASSERT|EXPECT}_NO_THROW(statement):\n//         Tests that the statement doesn't throw any exception.\n//    * {ASSERT|EXPECT}_ANY_THROW(statement):\n//         Tests that the statement throws an exception.\n\n#define EXPECT_THROW(statement, expected_exception) \\\n  GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_NO_THROW(statement) \\\n  GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_ANY_THROW(statement) \\\n  GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_THROW(statement, expected_exception) \\\n  GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_)\n#define ASSERT_NO_THROW(statement) \\\n  GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_)\n#define ASSERT_ANY_THROW(statement) \\\n  GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_)\n\n// Boolean assertions. Condition can be either a Boolean expression or an\n// AssertionResult. For more information on how to use AssertionResult with\n// these macros see comments on that class.\n#define EXPECT_TRUE(condition) \\\n  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \\\n                      GTEST_NONFATAL_FAILURE_)\n#define EXPECT_FALSE(condition) \\\n  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \\\n                      GTEST_NONFATAL_FAILURE_)\n#define ASSERT_TRUE(condition) \\\n  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \\\n                      GTEST_FATAL_FAILURE_)\n#define ASSERT_FALSE(condition) \\\n  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \\\n                      GTEST_FATAL_FAILURE_)\n\n// Includes the auto-generated header that implements a family of\n// generic predicate assertion macros.\n#include \"gtest/gtest_pred_impl.h\"\n\n// Macros for testing equalities and inequalities.\n//\n//    * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual\n//    * {ASSERT|EXPECT}_NE(v1, v2):           Tests that v1 != v2\n//    * {ASSERT|EXPECT}_LT(v1, v2):           Tests that v1 < v2\n//    * {ASSERT|EXPECT}_LE(v1, v2):           Tests that v1 <= v2\n//    * {ASSERT|EXPECT}_GT(v1, v2):           Tests that v1 > v2\n//    * {ASSERT|EXPECT}_GE(v1, v2):           Tests that v1 >= v2\n//\n// When they are not, Google Test prints both the tested expressions and\n// their actual values.  The values must be compatible built-in types,\n// or you will get a compiler error.  By \"compatible\" we mean that the\n// values can be compared by the respective operator.\n//\n// Note:\n//\n//   1. It is possible to make a user-defined type work with\n//   {ASSERT|EXPECT}_??(), but that requires overloading the\n//   comparison operators and is thus discouraged by the Google C++\n//   Usage Guide.  Therefore, you are advised to use the\n//   {ASSERT|EXPECT}_TRUE() macro to assert that two objects are\n//   equal.\n//\n//   2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on\n//   pointers (in particular, C strings).  Therefore, if you use it\n//   with two C strings, you are testing how their locations in memory\n//   are related, not how their content is related.  To compare two C\n//   strings by content, use {ASSERT|EXPECT}_STR*().\n//\n//   3. {ASSERT|EXPECT}_EQ(expected, actual) is preferred to\n//   {ASSERT|EXPECT}_TRUE(expected == actual), as the former tells you\n//   what the actual value is when it fails, and similarly for the\n//   other comparisons.\n//\n//   4. Do not depend on the order in which {ASSERT|EXPECT}_??()\n//   evaluate their arguments, which is undefined.\n//\n//   5. These macros evaluate their arguments exactly once.\n//\n// Examples:\n//\n//   EXPECT_NE(5, Foo());\n//   EXPECT_EQ(NULL, a_pointer);\n//   ASSERT_LT(i, array_size);\n//   ASSERT_GT(records.size(), 0) << \"There is no record left.\";\n\n#define EXPECT_EQ(expected, actual) \\\n  EXPECT_PRED_FORMAT2(::testing::internal:: \\\n                      EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \\\n                      expected, actual)\n#define EXPECT_NE(expected, actual) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual)\n#define EXPECT_LE(val1, val2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)\n#define EXPECT_LT(val1, val2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)\n#define EXPECT_GE(val1, val2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)\n#define EXPECT_GT(val1, val2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)\n\n#define GTEST_ASSERT_EQ(expected, actual) \\\n  ASSERT_PRED_FORMAT2(::testing::internal:: \\\n                      EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \\\n                      expected, actual)\n#define GTEST_ASSERT_NE(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)\n#define GTEST_ASSERT_LE(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)\n#define GTEST_ASSERT_LT(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)\n#define GTEST_ASSERT_GE(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)\n#define GTEST_ASSERT_GT(val1, val2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)\n\n// Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of\n// ASSERT_XY(), which clashes with some users' own code.\n\n#if !GTEST_DONT_DEFINE_ASSERT_EQ\n# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)\n#endif\n\n#if !GTEST_DONT_DEFINE_ASSERT_NE\n# define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2)\n#endif\n\n#if !GTEST_DONT_DEFINE_ASSERT_LE\n# define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2)\n#endif\n\n#if !GTEST_DONT_DEFINE_ASSERT_LT\n# define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2)\n#endif\n\n#if !GTEST_DONT_DEFINE_ASSERT_GE\n# define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)\n#endif\n\n#if !GTEST_DONT_DEFINE_ASSERT_GT\n# define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2)\n#endif\n\n// C-string Comparisons.  All tests treat NULL and any non-NULL string\n// as different.  Two NULLs are equal.\n//\n//    * {ASSERT|EXPECT}_STREQ(s1, s2):     Tests that s1 == s2\n//    * {ASSERT|EXPECT}_STRNE(s1, s2):     Tests that s1 != s2\n//    * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case\n//    * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case\n//\n// For wide or narrow string objects, you can use the\n// {ASSERT|EXPECT}_??() macros.\n//\n// Don't depend on the order in which the arguments are evaluated,\n// which is undefined.\n//\n// These macros evaluate their arguments exactly once.\n\n#define EXPECT_STREQ(expected, actual) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)\n#define EXPECT_STRNE(s1, s2) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)\n#define EXPECT_STRCASEEQ(expected, actual) \\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)\n#define EXPECT_STRCASENE(s1, s2)\\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)\n\n#define ASSERT_STREQ(expected, actual) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)\n#define ASSERT_STRNE(s1, s2) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)\n#define ASSERT_STRCASEEQ(expected, actual) \\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)\n#define ASSERT_STRCASENE(s1, s2)\\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)\n\n// Macros for comparing floating-point numbers.\n//\n//    * {ASSERT|EXPECT}_FLOAT_EQ(expected, actual):\n//         Tests that two float values are almost equal.\n//    * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual):\n//         Tests that two double values are almost equal.\n//    * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error):\n//         Tests that v1 and v2 are within the given distance to each other.\n//\n// Google Test uses ULP-based comparison to automatically pick a default\n// error bound that is appropriate for the operands.  See the\n// FloatingPoint template class in gtest-internal.h if you are\n// interested in the implementation details.\n\n#define EXPECT_FLOAT_EQ(expected, actual)\\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \\\n                      expected, actual)\n\n#define EXPECT_DOUBLE_EQ(expected, actual)\\\n  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \\\n                      expected, actual)\n\n#define ASSERT_FLOAT_EQ(expected, actual)\\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \\\n                      expected, actual)\n\n#define ASSERT_DOUBLE_EQ(expected, actual)\\\n  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \\\n                      expected, actual)\n\n#define EXPECT_NEAR(val1, val2, abs_error)\\\n  EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \\\n                      val1, val2, abs_error)\n\n#define ASSERT_NEAR(val1, val2, abs_error)\\\n  ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \\\n                      val1, val2, abs_error)\n\n// These predicate format functions work on floating-point values, and\n// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g.\n//\n//   EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);\n\n// Asserts that val1 is less than, or almost equal to, val2.  Fails\n// otherwise.  In particular, it fails if either val1 or val2 is NaN.\nGTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2,\n                                   float val1, float val2);\nGTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,\n                                    double val1, double val2);\n\n\n#if GTEST_OS_WINDOWS\n\n// Macros that test for HRESULT failure and success, these are only useful\n// on Windows, and rely on Windows SDK macros and APIs to compile.\n//\n//    * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr)\n//\n// When expr unexpectedly fails or succeeds, Google Test prints the\n// expected result and the actual result with both a human-readable\n// string representation of the error, if available, as well as the\n// hex result code.\n# define EXPECT_HRESULT_SUCCEEDED(expr) \\\n    EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))\n\n# define ASSERT_HRESULT_SUCCEEDED(expr) \\\n    ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))\n\n# define EXPECT_HRESULT_FAILED(expr) \\\n    EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))\n\n# define ASSERT_HRESULT_FAILED(expr) \\\n    ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))\n\n#endif  // GTEST_OS_WINDOWS\n\n// Macros that execute statement and check that it doesn't generate new fatal\n// failures in the current thread.\n//\n//   * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement);\n//\n// Examples:\n//\n//   EXPECT_NO_FATAL_FAILURE(Process());\n//   ASSERT_NO_FATAL_FAILURE(Process()) << \"Process() failed\";\n//\n#define ASSERT_NO_FATAL_FAILURE(statement) \\\n    GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_)\n#define EXPECT_NO_FATAL_FAILURE(statement) \\\n    GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_)\n\n// Causes a trace (including the source file path, the current line\n// number, and the given message) to be included in every test failure\n// message generated by code in the current scope.  The effect is\n// undone when the control leaves the current scope.\n//\n// The message argument can be anything streamable to std::ostream.\n//\n// In the implementation, we include the current line number as part\n// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s\n// to appear in the same block - as long as they are on different\n// lines.\n#define SCOPED_TRACE(message) \\\n  ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\\\n    __FILE__, __LINE__, ::testing::Message() << (message))\n\n// Compile-time assertion for type equality.\n// StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are\n// the same type.  The value it returns is not interesting.\n//\n// Instead of making StaticAssertTypeEq a class template, we make it a\n// function template that invokes a helper class template.  This\n// prevents a user from misusing StaticAssertTypeEq<T1, T2> by\n// defining objects of that type.\n//\n// CAVEAT:\n//\n// When used inside a method of a class template,\n// StaticAssertTypeEq<T1, T2>() is effective ONLY IF the method is\n// instantiated.  For example, given:\n//\n//   template <typename T> class Foo {\n//    public:\n//     void Bar() { testing::StaticAssertTypeEq<int, T>(); }\n//   };\n//\n// the code:\n//\n//   void Test1() { Foo<bool> foo; }\n//\n// will NOT generate a compiler error, as Foo<bool>::Bar() is never\n// actually instantiated.  Instead, you need:\n//\n//   void Test2() { Foo<bool> foo; foo.Bar(); }\n//\n// to cause a compiler error.\ntemplate <typename T1, typename T2>\nbool StaticAssertTypeEq() {\n  (void)internal::StaticAssertTypeEqHelper<T1, T2>();\n  return true;\n}\n\n// Defines a test.\n//\n// The first parameter is the name of the test case, and the second\n// parameter is the name of the test within the test case.\n//\n// The convention is to end the test case name with \"Test\".  For\n// example, a test case for the Foo class can be named FooTest.\n//\n// The user should put his test code between braces after using this\n// macro.  Example:\n//\n//   TEST(FooTest, InitializesCorrectly) {\n//     Foo foo;\n//     EXPECT_TRUE(foo.StatusIsOK());\n//   }\n\n// Note that we call GetTestTypeId() instead of GetTypeId<\n// ::testing::Test>() here to get the type ID of testing::Test.  This\n// is to work around a suspected linker bug when using Google Test as\n// a framework on Mac OS X.  The bug causes GetTypeId<\n// ::testing::Test>() to return different values depending on whether\n// the call is from the Google Test framework itself or from user test\n// code.  GetTestTypeId() is guaranteed to always return the same\n// value, as it always calls GetTypeId<>() from the Google Test\n// framework.\n#define GTEST_TEST(test_case_name, test_name)\\\n  GTEST_TEST_(test_case_name, test_name, \\\n              ::testing::Test, ::testing::internal::GetTestTypeId())\n\n// Define this macro to 1 to omit the definition of TEST(), which\n// is a generic name and clashes with some other libraries.\n#if !GTEST_DONT_DEFINE_TEST\n# define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name)\n#endif\n\n// Defines a test that uses a test fixture.\n//\n// The first parameter is the name of the test fixture class, which\n// also doubles as the test case name.  The second parameter is the\n// name of the test within the test case.\n//\n// A test fixture class must be declared earlier.  The user should put\n// his test code between braces after using this macro.  Example:\n//\n//   class FooTest : public testing::Test {\n//    protected:\n//     virtual void SetUp() { b_.AddElement(3); }\n//\n//     Foo a_;\n//     Foo b_;\n//   };\n//\n//   TEST_F(FooTest, InitializesCorrectly) {\n//     EXPECT_TRUE(a_.StatusIsOK());\n//   }\n//\n//   TEST_F(FooTest, ReturnsElementCountCorrectly) {\n//     EXPECT_EQ(0, a_.size());\n//     EXPECT_EQ(1, b_.size());\n//   }\n\n#define TEST_F(test_fixture, test_name)\\\n  GTEST_TEST_(test_fixture, test_name, test_fixture, \\\n              ::testing::internal::GetTypeId<test_fixture>())\n\n}  // namespace testing\n\n// Use this function in main() to run all tests.  It returns 0 if all\n// tests are successful, or 1 otherwise.\n//\n// RUN_ALL_TESTS() should be invoked after the command line has been\n// parsed by InitGoogleTest().\n//\n// This function was formerly a macro; thus, it is in the global\n// namespace and has an all-caps name.\nint RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_;\n\ninline int RUN_ALL_TESTS() {\n  return ::testing::UnitTest::GetInstance()->Run();\n}\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest_pred_impl.h",
    "content": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// This file is AUTOMATICALLY GENERATED on 10/31/2011 by command\n// 'gen_gtest_pred_impl.py 5'.  DO NOT EDIT BY HAND!\n//\n// Implements a family of generic predicate assertion macros.\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_\n#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_\n\n// Makes sure this header is not included before gtest.h.\n#ifndef GTEST_INCLUDE_GTEST_GTEST_H_\n# error Do not include gtest_pred_impl.h directly.  Include gtest.h instead.\n#endif  // GTEST_INCLUDE_GTEST_GTEST_H_\n\n// This header implements a family of generic predicate assertion\n// macros:\n//\n//   ASSERT_PRED_FORMAT1(pred_format, v1)\n//   ASSERT_PRED_FORMAT2(pred_format, v1, v2)\n//   ...\n//\n// where pred_format is a function or functor that takes n (in the\n// case of ASSERT_PRED_FORMATn) values and their source expression\n// text, and returns a testing::AssertionResult.  See the definition\n// of ASSERT_EQ in gtest.h for an example.\n//\n// If you don't care about formatting, you can use the more\n// restrictive version:\n//\n//   ASSERT_PRED1(pred, v1)\n//   ASSERT_PRED2(pred, v1, v2)\n//   ...\n//\n// where pred is an n-ary function or functor that returns bool,\n// and the values v1, v2, ..., must support the << operator for\n// streaming to std::ostream.\n//\n// We also define the EXPECT_* variations.\n//\n// For now we only support predicates whose arity is at most 5.\n// Please email googletestframework@googlegroups.com if you need\n// support for higher arities.\n\n// GTEST_ASSERT_ is the basic statement to which all of the assertions\n// in this file reduce.  Don't use this in your code.\n\n#define GTEST_ASSERT_(expression, on_failure) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (const ::testing::AssertionResult gtest_ar = (expression)) \\\n    ; \\\n  else \\\n    on_failure(gtest_ar.failure_message())\n\n\n// Helper function for implementing {EXPECT|ASSERT}_PRED1.  Don't use\n// this in your code.\ntemplate <typename Pred,\n          typename T1>\nAssertionResult AssertPred1Helper(const char* pred_text,\n                                  const char* e1,\n                                  Pred pred,\n                                  const T1& v1) {\n  if (pred(v1)) return AssertionSuccess();\n\n  return AssertionFailure() << pred_text << \"(\"\n                            << e1 << \") evaluates to false, where\"\n                            << \"\\n\" << e1 << \" evaluates to \" << v1;\n}\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1.\n// Don't use this in your code.\n#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\\\n  GTEST_ASSERT_(pred_format(#v1, v1), \\\n                on_failure)\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED1.  Don't use\n// this in your code.\n#define GTEST_PRED1_(pred, v1, on_failure)\\\n  GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \\\n                                             #v1, \\\n                                             pred, \\\n                                             v1), on_failure)\n\n// Unary predicate assertion macros.\n#define EXPECT_PRED_FORMAT1(pred_format, v1) \\\n  GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_PRED1(pred, v1) \\\n  GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_PRED_FORMAT1(pred_format, v1) \\\n  GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)\n#define ASSERT_PRED1(pred, v1) \\\n  GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_)\n\n\n\n// Helper function for implementing {EXPECT|ASSERT}_PRED2.  Don't use\n// this in your code.\ntemplate <typename Pred,\n          typename T1,\n          typename T2>\nAssertionResult AssertPred2Helper(const char* pred_text,\n                                  const char* e1,\n                                  const char* e2,\n                                  Pred pred,\n                                  const T1& v1,\n                                  const T2& v2) {\n  if (pred(v1, v2)) return AssertionSuccess();\n\n  return AssertionFailure() << pred_text << \"(\"\n                            << e1 << \", \"\n                            << e2 << \") evaluates to false, where\"\n                            << \"\\n\" << e1 << \" evaluates to \" << v1\n                            << \"\\n\" << e2 << \" evaluates to \" << v2;\n}\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2.\n// Don't use this in your code.\n#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\\\n  GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \\\n                on_failure)\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED2.  Don't use\n// this in your code.\n#define GTEST_PRED2_(pred, v1, v2, on_failure)\\\n  GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \\\n                                             #v1, \\\n                                             #v2, \\\n                                             pred, \\\n                                             v1, \\\n                                             v2), on_failure)\n\n// Binary predicate assertion macros.\n#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \\\n  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_PRED2(pred, v1, v2) \\\n  GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \\\n  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)\n#define ASSERT_PRED2(pred, v1, v2) \\\n  GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_)\n\n\n\n// Helper function for implementing {EXPECT|ASSERT}_PRED3.  Don't use\n// this in your code.\ntemplate <typename Pred,\n          typename T1,\n          typename T2,\n          typename T3>\nAssertionResult AssertPred3Helper(const char* pred_text,\n                                  const char* e1,\n                                  const char* e2,\n                                  const char* e3,\n                                  Pred pred,\n                                  const T1& v1,\n                                  const T2& v2,\n                                  const T3& v3) {\n  if (pred(v1, v2, v3)) return AssertionSuccess();\n\n  return AssertionFailure() << pred_text << \"(\"\n                            << e1 << \", \"\n                            << e2 << \", \"\n                            << e3 << \") evaluates to false, where\"\n                            << \"\\n\" << e1 << \" evaluates to \" << v1\n                            << \"\\n\" << e2 << \" evaluates to \" << v2\n                            << \"\\n\" << e3 << \" evaluates to \" << v3;\n}\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3.\n// Don't use this in your code.\n#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\\\n  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), \\\n                on_failure)\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED3.  Don't use\n// this in your code.\n#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\\\n  GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \\\n                                             #v1, \\\n                                             #v2, \\\n                                             #v3, \\\n                                             pred, \\\n                                             v1, \\\n                                             v2, \\\n                                             v3), on_failure)\n\n// Ternary predicate assertion macros.\n#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \\\n  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_PRED3(pred, v1, v2, v3) \\\n  GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \\\n  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_)\n#define ASSERT_PRED3(pred, v1, v2, v3) \\\n  GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_)\n\n\n\n// Helper function for implementing {EXPECT|ASSERT}_PRED4.  Don't use\n// this in your code.\ntemplate <typename Pred,\n          typename T1,\n          typename T2,\n          typename T3,\n          typename T4>\nAssertionResult AssertPred4Helper(const char* pred_text,\n                                  const char* e1,\n                                  const char* e2,\n                                  const char* e3,\n                                  const char* e4,\n                                  Pred pred,\n                                  const T1& v1,\n                                  const T2& v2,\n                                  const T3& v3,\n                                  const T4& v4) {\n  if (pred(v1, v2, v3, v4)) return AssertionSuccess();\n\n  return AssertionFailure() << pred_text << \"(\"\n                            << e1 << \", \"\n                            << e2 << \", \"\n                            << e3 << \", \"\n                            << e4 << \") evaluates to false, where\"\n                            << \"\\n\" << e1 << \" evaluates to \" << v1\n                            << \"\\n\" << e2 << \" evaluates to \" << v2\n                            << \"\\n\" << e3 << \" evaluates to \" << v3\n                            << \"\\n\" << e4 << \" evaluates to \" << v4;\n}\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4.\n// Don't use this in your code.\n#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\\\n  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4), \\\n                on_failure)\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED4.  Don't use\n// this in your code.\n#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\\\n  GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \\\n                                             #v1, \\\n                                             #v2, \\\n                                             #v3, \\\n                                             #v4, \\\n                                             pred, \\\n                                             v1, \\\n                                             v2, \\\n                                             v3, \\\n                                             v4), on_failure)\n\n// 4-ary predicate assertion macros.\n#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \\\n  GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_PRED4(pred, v1, v2, v3, v4) \\\n  GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \\\n  GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)\n#define ASSERT_PRED4(pred, v1, v2, v3, v4) \\\n  GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)\n\n\n\n// Helper function for implementing {EXPECT|ASSERT}_PRED5.  Don't use\n// this in your code.\ntemplate <typename Pred,\n          typename T1,\n          typename T2,\n          typename T3,\n          typename T4,\n          typename T5>\nAssertionResult AssertPred5Helper(const char* pred_text,\n                                  const char* e1,\n                                  const char* e2,\n                                  const char* e3,\n                                  const char* e4,\n                                  const char* e5,\n                                  Pred pred,\n                                  const T1& v1,\n                                  const T2& v2,\n                                  const T3& v3,\n                                  const T4& v4,\n                                  const T5& v5) {\n  if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess();\n\n  return AssertionFailure() << pred_text << \"(\"\n                            << e1 << \", \"\n                            << e2 << \", \"\n                            << e3 << \", \"\n                            << e4 << \", \"\n                            << e5 << \") evaluates to false, where\"\n                            << \"\\n\" << e1 << \" evaluates to \" << v1\n                            << \"\\n\" << e2 << \" evaluates to \" << v2\n                            << \"\\n\" << e3 << \" evaluates to \" << v3\n                            << \"\\n\" << e4 << \" evaluates to \" << v4\n                            << \"\\n\" << e5 << \" evaluates to \" << v5;\n}\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5.\n// Don't use this in your code.\n#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\\\n  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5), \\\n                on_failure)\n\n// Internal macro for implementing {EXPECT|ASSERT}_PRED5.  Don't use\n// this in your code.\n#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\\\n  GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \\\n                                             #v1, \\\n                                             #v2, \\\n                                             #v3, \\\n                                             #v4, \\\n                                             #v5, \\\n                                             pred, \\\n                                             v1, \\\n                                             v2, \\\n                                             v3, \\\n                                             v4, \\\n                                             v5), on_failure)\n\n// 5-ary predicate assertion macros.\n#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \\\n  GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)\n#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \\\n  GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)\n#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \\\n  GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)\n#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \\\n  GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)\n\n\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/gtest_prod.h",
    "content": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n//\n// Google C++ Testing Framework definitions useful in production code.\n\n#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_\n#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_\n\n// When you need to test the private or protected members of a class,\n// use the FRIEND_TEST macro to declare your tests as friends of the\n// class.  For example:\n//\n// class MyClass {\n//  private:\n//   void MyMethod();\n//   FRIEND_TEST(MyClassTest, MyMethod);\n// };\n//\n// class MyClassTest : public testing::Test {\n//   // ...\n// };\n//\n// TEST_F(MyClassTest, MyMethod) {\n//   // Can call MyClass::MyMethod() here.\n// }\n\n#define FRIEND_TEST(test_case_name, test_name)\\\nfriend class test_case_name##_##test_name##_Test\n\n#endif  // GTEST_INCLUDE_GTEST_GTEST_PROD_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-death-test-internal.h",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)\n//\n// The Google C++ Testing Framework (Google Test)\n//\n// This header file defines internal utilities needed for implementing\n// death tests.  They are subject to change without notice.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_\n\n#include \"gtest/internal/gtest-internal.h\"\n\n#include <stdio.h>\n\nnamespace testing {\nnamespace internal {\n\nGTEST_DECLARE_string_(internal_run_death_test);\n\n// Names of the flags (needed for parsing Google Test flags).\nconst char kDeathTestStyleFlag[] = \"death_test_style\";\nconst char kDeathTestUseFork[] = \"death_test_use_fork\";\nconst char kInternalRunDeathTestFlag[] = \"internal_run_death_test\";\n\n#if GTEST_HAS_DEATH_TEST\n\n// DeathTest is a class that hides much of the complexity of the\n// GTEST_DEATH_TEST_ macro.  It is abstract; its static Create method\n// returns a concrete class that depends on the prevailing death test\n// style, as defined by the --gtest_death_test_style and/or\n// --gtest_internal_run_death_test flags.\n\n// In describing the results of death tests, these terms are used with\n// the corresponding definitions:\n//\n// exit status:  The integer exit information in the format specified\n//               by wait(2)\n// exit code:    The integer code passed to exit(3), _exit(2), or\n//               returned from main()\nclass GTEST_API_ DeathTest {\n public:\n  // Create returns false if there was an error determining the\n  // appropriate action to take for the current death test; for example,\n  // if the gtest_death_test_style flag is set to an invalid value.\n  // The LastMessage method will return a more detailed message in that\n  // case.  Otherwise, the DeathTest pointer pointed to by the \"test\"\n  // argument is set.  If the death test should be skipped, the pointer\n  // is set to NULL; otherwise, it is set to the address of a new concrete\n  // DeathTest object that controls the execution of the current test.\n  static bool Create(const char* statement, const RE* regex,\n                     const char* file, int line, DeathTest** test);\n  DeathTest();\n  virtual ~DeathTest() { }\n\n  // A helper class that aborts a death test when it's deleted.\n  class ReturnSentinel {\n   public:\n    explicit ReturnSentinel(DeathTest* test) : test_(test) { }\n    ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); }\n   private:\n    DeathTest* const test_;\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel);\n  } GTEST_ATTRIBUTE_UNUSED_;\n\n  // An enumeration of possible roles that may be taken when a death\n  // test is encountered.  EXECUTE means that the death test logic should\n  // be executed immediately.  OVERSEE means that the program should prepare\n  // the appropriate environment for a child process to execute the death\n  // test, then wait for it to complete.\n  enum TestRole { OVERSEE_TEST, EXECUTE_TEST };\n\n  // An enumeration of the three reasons that a test might be aborted.\n  enum AbortReason {\n    TEST_ENCOUNTERED_RETURN_STATEMENT,\n    TEST_THREW_EXCEPTION,\n    TEST_DID_NOT_DIE\n  };\n\n  // Assumes one of the above roles.\n  virtual TestRole AssumeRole() = 0;\n\n  // Waits for the death test to finish and returns its status.\n  virtual int Wait() = 0;\n\n  // Returns true if the death test passed; that is, the test process\n  // exited during the test, its exit status matches a user-supplied\n  // predicate, and its stderr output matches a user-supplied regular\n  // expression.\n  // The user-supplied predicate may be a macro expression rather\n  // than a function pointer or functor, or else Wait and Passed could\n  // be combined.\n  virtual bool Passed(bool exit_status_ok) = 0;\n\n  // Signals that the death test did not die as expected.\n  virtual void Abort(AbortReason reason) = 0;\n\n  // Returns a human-readable outcome message regarding the outcome of\n  // the last death test.\n  static const char* LastMessage();\n\n  static void set_last_death_test_message(const std::string& message);\n\n private:\n  // A string containing a description of the outcome of the last death test.\n  static std::string last_death_test_message_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest);\n};\n\n// Factory interface for death tests.  May be mocked out for testing.\nclass DeathTestFactory {\n public:\n  virtual ~DeathTestFactory() { }\n  virtual bool Create(const char* statement, const RE* regex,\n                      const char* file, int line, DeathTest** test) = 0;\n};\n\n// A concrete DeathTestFactory implementation for normal use.\nclass DefaultDeathTestFactory : public DeathTestFactory {\n public:\n  virtual bool Create(const char* statement, const RE* regex,\n                      const char* file, int line, DeathTest** test);\n};\n\n// Returns true if exit_status describes a process that was terminated\n// by a signal, or exited normally with a nonzero exit code.\nGTEST_API_ bool ExitedUnsuccessfully(int exit_status);\n\n// Traps C++ exceptions escaping statement and reports them as test\n// failures. Note that trapping SEH exceptions is not implemented here.\n# if GTEST_HAS_EXCEPTIONS\n#  define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \\\n  try { \\\n    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n  } catch (const ::std::exception& gtest_exception) { \\\n    fprintf(\\\n        stderr, \\\n        \"\\n%s: Caught std::exception-derived exception escaping the \" \\\n        \"death test statement. Exception message: %s\\n\", \\\n        ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \\\n        gtest_exception.what()); \\\n    fflush(stderr); \\\n    death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \\\n  } catch (...) { \\\n    death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \\\n  }\n\n# else\n#  define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \\\n  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)\n\n# endif\n\n// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*,\n// ASSERT_EXIT*, and EXPECT_EXIT*.\n# define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (::testing::internal::AlwaysTrue()) { \\\n    const ::testing::internal::RE& gtest_regex = (regex); \\\n    ::testing::internal::DeathTest* gtest_dt; \\\n    if (!::testing::internal::DeathTest::Create(#statement, &gtest_regex, \\\n        __FILE__, __LINE__, &gtest_dt)) { \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \\\n    } \\\n    if (gtest_dt != NULL) { \\\n      ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \\\n          gtest_dt_ptr(gtest_dt); \\\n      switch (gtest_dt->AssumeRole()) { \\\n        case ::testing::internal::DeathTest::OVERSEE_TEST: \\\n          if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \\\n            goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \\\n          } \\\n          break; \\\n        case ::testing::internal::DeathTest::EXECUTE_TEST: { \\\n          ::testing::internal::DeathTest::ReturnSentinel \\\n              gtest_sentinel(gtest_dt); \\\n          GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt); \\\n          gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \\\n          break; \\\n        } \\\n        default: \\\n          break; \\\n      } \\\n    } \\\n  } else \\\n    GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__): \\\n      fail(::testing::internal::DeathTest::LastMessage())\n// The symbol \"fail\" here expands to something into which a message\n// can be streamed.\n\n// This macro is for implementing ASSERT/EXPECT_DEBUG_DEATH when compiled in\n// NDEBUG mode. In this case we need the statements to be executed, the regex is\n// ignored, and the macro must accept a streamed message even though the message\n// is never printed.\n# define GTEST_EXECUTE_STATEMENT_(statement, regex) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (::testing::internal::AlwaysTrue()) { \\\n     GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n  } else \\\n    ::testing::Message()\n\n// A class representing the parsed contents of the\n// --gtest_internal_run_death_test flag, as it existed when\n// RUN_ALL_TESTS was called.\nclass InternalRunDeathTestFlag {\n public:\n  InternalRunDeathTestFlag(const std::string& a_file,\n                           int a_line,\n                           int an_index,\n                           int a_write_fd)\n      : file_(a_file), line_(a_line), index_(an_index),\n        write_fd_(a_write_fd) {}\n\n  ~InternalRunDeathTestFlag() {\n    if (write_fd_ >= 0)\n      posix::Close(write_fd_);\n  }\n\n  const std::string& file() const { return file_; }\n  int line() const { return line_; }\n  int index() const { return index_; }\n  int write_fd() const { return write_fd_; }\n\n private:\n  std::string file_;\n  int line_;\n  int index_;\n  int write_fd_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag);\n};\n\n// Returns a newly created InternalRunDeathTestFlag object with fields\n// initialized from the GTEST_FLAG(internal_run_death_test) flag if\n// the flag is specified; otherwise returns NULL.\nInternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();\n\n#else  // GTEST_HAS_DEATH_TEST\n\n// This macro is used for implementing macros such as\n// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where\n// death tests are not supported. Those macros must compile on such systems\n// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on\n// systems that support death tests. This allows one to write such a macro\n// on a system that does not support death tests and be sure that it will\n// compile on a death-test supporting system.\n//\n// Parameters:\n//   statement -  A statement that a macro such as EXPECT_DEATH would test\n//                for program termination. This macro has to make sure this\n//                statement is compiled but not executed, to ensure that\n//                EXPECT_DEATH_IF_SUPPORTED compiles with a certain\n//                parameter iff EXPECT_DEATH compiles with it.\n//   regex     -  A regex that a macro such as EXPECT_DEATH would use to test\n//                the output of statement.  This parameter has to be\n//                compiled but not evaluated by this macro, to ensure that\n//                this macro only accepts expressions that a macro such as\n//                EXPECT_DEATH would accept.\n//   terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED\n//                and a return statement for ASSERT_DEATH_IF_SUPPORTED.\n//                This ensures that ASSERT_DEATH_IF_SUPPORTED will not\n//                compile inside functions where ASSERT_DEATH doesn't\n//                compile.\n//\n//  The branch that has an always false condition is used to ensure that\n//  statement and regex are compiled (and thus syntactically correct) but\n//  never executed. The unreachable code macro protects the terminator\n//  statement from generating an 'unreachable code' warning in case\n//  statement unconditionally returns or throws. The Message constructor at\n//  the end allows the syntax of streaming additional messages into the\n//  macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.\n# define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \\\n    GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n    if (::testing::internal::AlwaysTrue()) { \\\n      GTEST_LOG_(WARNING) \\\n          << \"Death tests are not supported on this platform.\\n\" \\\n          << \"Statement '\" #statement \"' cannot be verified.\"; \\\n    } else if (::testing::internal::AlwaysFalse()) { \\\n      ::testing::internal::RE::PartialMatch(\".*\", (regex)); \\\n      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n      terminator; \\\n    } else \\\n      ::testing::Message()\n\n#endif  // GTEST_HAS_DEATH_TEST\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-filepath.h",
    "content": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: keith.ray@gmail.com (Keith Ray)\n//\n// Google Test filepath utilities\n//\n// This header file declares classes and functions used internally by\n// Google Test.  They are subject to change without notice.\n//\n// This file is #included in <gtest/internal/gtest-internal.h>.\n// Do not include this header file separately!\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_\n\n#include \"gtest/internal/gtest-string.h\"\n\nnamespace testing {\nnamespace internal {\n\n// FilePath - a class for file and directory pathname manipulation which\n// handles platform-specific conventions (like the pathname separator).\n// Used for helper functions for naming files in a directory for xml output.\n// Except for Set methods, all methods are const or static, which provides an\n// \"immutable value object\" -- useful for peace of mind.\n// A FilePath with a value ending in a path separator (\"like/this/\") represents\n// a directory, otherwise it is assumed to represent a file. In either case,\n// it may or may not represent an actual file or directory in the file system.\n// Names are NOT checked for syntax correctness -- no checking for illegal\n// characters, malformed paths, etc.\n\nclass GTEST_API_ FilePath {\n public:\n  FilePath() : pathname_(\"\") { }\n  FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { }\n\n  explicit FilePath(const std::string& pathname) : pathname_(pathname) {\n    Normalize();\n  }\n\n  FilePath& operator=(const FilePath& rhs) {\n    Set(rhs);\n    return *this;\n  }\n\n  void Set(const FilePath& rhs) {\n    pathname_ = rhs.pathname_;\n  }\n\n  const std::string& string() const { return pathname_; }\n  const char* c_str() const { return pathname_.c_str(); }\n\n  // Returns the current working directory, or \"\" if unsuccessful.\n  static FilePath GetCurrentDir();\n\n  // Given directory = \"dir\", base_name = \"test\", number = 0,\n  // extension = \"xml\", returns \"dir/test.xml\". If number is greater\n  // than zero (e.g., 12), returns \"dir/test_12.xml\".\n  // On Windows platform, uses \\ as the separator rather than /.\n  static FilePath MakeFileName(const FilePath& directory,\n                               const FilePath& base_name,\n                               int number,\n                               const char* extension);\n\n  // Given directory = \"dir\", relative_path = \"test.xml\",\n  // returns \"dir/test.xml\".\n  // On Windows, uses \\ as the separator rather than /.\n  static FilePath ConcatPaths(const FilePath& directory,\n                              const FilePath& relative_path);\n\n  // Returns a pathname for a file that does not currently exist. The pathname\n  // will be directory/base_name.extension or\n  // directory/base_name_<number>.extension if directory/base_name.extension\n  // already exists. The number will be incremented until a pathname is found\n  // that does not already exist.\n  // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.\n  // There could be a race condition if two or more processes are calling this\n  // function at the same time -- they could both pick the same filename.\n  static FilePath GenerateUniqueFileName(const FilePath& directory,\n                                         const FilePath& base_name,\n                                         const char* extension);\n\n  // Returns true iff the path is \"\".\n  bool IsEmpty() const { return pathname_.empty(); }\n\n  // If input name has a trailing separator character, removes it and returns\n  // the name, otherwise return the name string unmodified.\n  // On Windows platform, uses \\ as the separator, other platforms use /.\n  FilePath RemoveTrailingPathSeparator() const;\n\n  // Returns a copy of the FilePath with the directory part removed.\n  // Example: FilePath(\"path/to/file\").RemoveDirectoryName() returns\n  // FilePath(\"file\"). If there is no directory part (\"just_a_file\"), it returns\n  // the FilePath unmodified. If there is no file part (\"just_a_dir/\") it\n  // returns an empty FilePath (\"\").\n  // On Windows platform, '\\' is the path separator, otherwise it is '/'.\n  FilePath RemoveDirectoryName() const;\n\n  // RemoveFileName returns the directory path with the filename removed.\n  // Example: FilePath(\"path/to/file\").RemoveFileName() returns \"path/to/\".\n  // If the FilePath is \"a_file\" or \"/a_file\", RemoveFileName returns\n  // FilePath(\"./\") or, on Windows, FilePath(\".\\\\\"). If the filepath does\n  // not have a file, like \"just/a/dir/\", it returns the FilePath unmodified.\n  // On Windows platform, '\\' is the path separator, otherwise it is '/'.\n  FilePath RemoveFileName() const;\n\n  // Returns a copy of the FilePath with the case-insensitive extension removed.\n  // Example: FilePath(\"dir/file.exe\").RemoveExtension(\"EXE\") returns\n  // FilePath(\"dir/file\"). If a case-insensitive extension is not\n  // found, returns a copy of the original FilePath.\n  FilePath RemoveExtension(const char* extension) const;\n\n  // Creates directories so that path exists. Returns true if successful or if\n  // the directories already exist; returns false if unable to create\n  // directories for any reason. Will also return false if the FilePath does\n  // not represent a directory (that is, it doesn't end with a path separator).\n  bool CreateDirectoriesRecursively() const;\n\n  // Create the directory so that path exists. Returns true if successful or\n  // if the directory already exists; returns false if unable to create the\n  // directory for any reason, including if the parent directory does not\n  // exist. Not named \"CreateDirectory\" because that's a macro on Windows.\n  bool CreateFolder() const;\n\n  // Returns true if FilePath describes something in the file-system,\n  // either a file, directory, or whatever, and that something exists.\n  bool FileOrDirectoryExists() const;\n\n  // Returns true if pathname describes a directory in the file-system\n  // that exists.\n  bool DirectoryExists() const;\n\n  // Returns true if FilePath ends with a path separator, which indicates that\n  // it is intended to represent a directory. Returns false otherwise.\n  // This does NOT check that a directory (or file) actually exists.\n  bool IsDirectory() const;\n\n  // Returns true if pathname describes a root directory. (Windows has one\n  // root directory per disk drive.)\n  bool IsRootDirectory() const;\n\n  // Returns true if pathname describes an absolute path.\n  bool IsAbsolutePath() const;\n\n private:\n  // Replaces multiple consecutive separators with a single separator.\n  // For example, \"bar///foo\" becomes \"bar/foo\". Does not eliminate other\n  // redundancies that might be in a pathname involving \".\" or \"..\".\n  //\n  // A pathname with multiple consecutive separators may occur either through\n  // user error or as a result of some scripts or APIs that generate a pathname\n  // with a trailing separator. On other platforms the same API or script\n  // may NOT generate a pathname with a trailing \"/\". Then elsewhere that\n  // pathname may have another \"/\" and pathname components added to it,\n  // without checking for the separator already being there.\n  // The script language and operating system may allow paths like \"foo//bar\"\n  // but some of the functions in FilePath will not handle that correctly. In\n  // particular, RemoveTrailingPathSeparator() only removes one separator, and\n  // it is called in CreateDirectoriesRecursively() assuming that it will change\n  // a pathname from directory syntax (trailing separator) to filename syntax.\n  //\n  // On Windows this method also replaces the alternate path separator '/' with\n  // the primary path separator '\\\\', so that for example \"bar\\\\/\\\\foo\" becomes\n  // \"bar\\\\foo\".\n\n  void Normalize();\n\n  // Returns a pointer to the last occurence of a valid path separator in\n  // the FilePath. On Windows, for example, both '/' and '\\' are valid path\n  // separators. Returns NULL if no path separator was found.\n  const char* FindLastPathSeparator() const;\n\n  std::string pathname_;\n};  // class FilePath\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-internal.h",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)\n//\n// The Google C++ Testing Framework (Google Test)\n//\n// This header file declares functions and macros used internally by\n// Google Test.  They are subject to change without notice.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_\n\n#include \"gtest/internal/gtest-port.h\"\n\n#if GTEST_OS_LINUX\n# include <stdlib.h>\n# include <sys/types.h>\n# include <sys/wait.h>\n# include <unistd.h>\n#endif  // GTEST_OS_LINUX\n\n#if GTEST_HAS_EXCEPTIONS\n# include <stdexcept>\n#endif\n\n#include <ctype.h>\n#include <float.h>\n#include <string.h>\n#include <iomanip>\n#include <limits>\n#include <set>\n\n#include \"gtest/gtest-message.h\"\n#include \"gtest/internal/gtest-string.h\"\n#include \"gtest/internal/gtest-filepath.h\"\n#include \"gtest/internal/gtest-type-util.h\"\n\n// Due to C++ preprocessor weirdness, we need double indirection to\n// concatenate two tokens when one of them is __LINE__.  Writing\n//\n//   foo ## __LINE__\n//\n// will result in the token foo__LINE__, instead of foo followed by\n// the current line number.  For more details, see\n// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6\n#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)\n#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar\n\nclass ProtocolMessage;\nnamespace proto2 { class Message; }\n\nnamespace testing {\n\n// Forward declarations.\n\nclass AssertionResult;                 // Result of an assertion.\nclass Message;                         // Represents a failure message.\nclass Test;                            // Represents a test.\nclass TestInfo;                        // Information about a test.\nclass TestPartResult;                  // Result of a test part.\nclass UnitTest;                        // A collection of test cases.\n\ntemplate <typename T>\n::std::string PrintToString(const T& value);\n\nnamespace internal {\n\nstruct TraceInfo;                      // Information about a trace point.\nclass ScopedTrace;                     // Implements scoped trace.\nclass TestInfoImpl;                    // Opaque implementation of TestInfo\nclass UnitTestImpl;                    // Opaque implementation of UnitTest\n\n// How many times InitGoogleTest() has been called.\nGTEST_API_ extern int g_init_gtest_count;\n\n// The text used in failure messages to indicate the start of the\n// stack trace.\nGTEST_API_ extern const char kStackTraceMarker[];\n\n// Two overloaded helpers for checking at compile time whether an\n// expression is a null pointer literal (i.e. NULL or any 0-valued\n// compile-time integral constant).  Their return values have\n// different sizes, so we can use sizeof() to test which version is\n// picked by the compiler.  These helpers have no implementations, as\n// we only need their signatures.\n//\n// Given IsNullLiteralHelper(x), the compiler will pick the first\n// version if x can be implicitly converted to Secret*, and pick the\n// second version otherwise.  Since Secret is a secret and incomplete\n// type, the only expression a user can write that has type Secret* is\n// a null pointer literal.  Therefore, we know that x is a null\n// pointer literal if and only if the first version is picked by the\n// compiler.\nchar IsNullLiteralHelper(Secret* p);\nchar (&IsNullLiteralHelper(...))[2];  // NOLINT\n\n// A compile-time bool constant that is true if and only if x is a\n// null pointer literal (i.e. NULL or any 0-valued compile-time\n// integral constant).\n#ifdef GTEST_ELLIPSIS_NEEDS_POD_\n// We lose support for NULL detection where the compiler doesn't like\n// passing non-POD classes through ellipsis (...).\n# define GTEST_IS_NULL_LITERAL_(x) false\n#else\n# define GTEST_IS_NULL_LITERAL_(x) \\\n    (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)\n#endif  // GTEST_ELLIPSIS_NEEDS_POD_\n\n// Appends the user-supplied message to the Google-Test-generated message.\nGTEST_API_ std::string AppendUserMessage(\n    const std::string& gtest_msg, const Message& user_msg);\n\n#if GTEST_HAS_EXCEPTIONS\n\n// This exception is thrown by (and only by) a failed Google Test\n// assertion when GTEST_FLAG(throw_on_failure) is true (if exceptions\n// are enabled).  We derive it from std::runtime_error, which is for\n// errors presumably detectable only at run time.  Since\n// std::runtime_error inherits from std::exception, many testing\n// frameworks know how to extract and print the message inside it.\nclass GTEST_API_ GoogleTestFailureException : public ::std::runtime_error {\n public:\n  explicit GoogleTestFailureException(const TestPartResult& failure);\n};\n\n#endif  // GTEST_HAS_EXCEPTIONS\n\n// A helper class for creating scoped traces in user programs.\nclass GTEST_API_ ScopedTrace {\n public:\n  // The c'tor pushes the given source file location and message onto\n  // a trace stack maintained by Google Test.\n  ScopedTrace(const char* file, int line, const Message& message);\n\n  // The d'tor pops the info pushed by the c'tor.\n  //\n  // Note that the d'tor is not virtual in order to be efficient.\n  // Don't inherit from ScopedTrace!\n  ~ScopedTrace();\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace);\n} GTEST_ATTRIBUTE_UNUSED_;  // A ScopedTrace object does its job in its\n                            // c'tor and d'tor.  Therefore it doesn't\n                            // need to be used otherwise.\n\n// Constructs and returns the message for an equality assertion\n// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.\n//\n// The first four parameters are the expressions used in the assertion\n// and their values, as strings.  For example, for ASSERT_EQ(foo, bar)\n// where foo is 5 and bar is 6, we have:\n//\n//   expected_expression: \"foo\"\n//   actual_expression:   \"bar\"\n//   expected_value:      \"5\"\n//   actual_value:        \"6\"\n//\n// The ignoring_case parameter is true iff the assertion is a\n// *_STRCASEEQ*.  When it's true, the string \" (ignoring case)\" will\n// be inserted into the message.\nGTEST_API_ AssertionResult EqFailure(const char* expected_expression,\n                                     const char* actual_expression,\n                                     const std::string& expected_value,\n                                     const std::string& actual_value,\n                                     bool ignoring_case);\n\n// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.\nGTEST_API_ std::string GetBoolAssertionFailureMessage(\n    const AssertionResult& assertion_result,\n    const char* expression_text,\n    const char* actual_predicate_value,\n    const char* expected_predicate_value);\n\n// This template class represents an IEEE floating-point number\n// (either single-precision or double-precision, depending on the\n// template parameters).\n//\n// The purpose of this class is to do more sophisticated number\n// comparison.  (Due to round-off error, etc, it's very unlikely that\n// two floating-points will be equal exactly.  Hence a naive\n// comparison by the == operation often doesn't work.)\n//\n// Format of IEEE floating-point:\n//\n//   The most-significant bit being the leftmost, an IEEE\n//   floating-point looks like\n//\n//     sign_bit exponent_bits fraction_bits\n//\n//   Here, sign_bit is a single bit that designates the sign of the\n//   number.\n//\n//   For float, there are 8 exponent bits and 23 fraction bits.\n//\n//   For double, there are 11 exponent bits and 52 fraction bits.\n//\n//   More details can be found at\n//   http://en.wikipedia.org/wiki/IEEE_floating-point_standard.\n//\n// Template parameter:\n//\n//   RawType: the raw floating-point type (either float or double)\ntemplate <typename RawType>\nclass FloatingPoint {\n public:\n  // Defines the unsigned integer type that has the same size as the\n  // floating point number.\n  typedef typename TypeWithSize<sizeof(RawType)>::UInt Bits;\n\n  // Constants.\n\n  // # of bits in a number.\n  static const size_t kBitCount = 8*sizeof(RawType);\n\n  // # of fraction bits in a number.\n  static const size_t kFractionBitCount =\n    std::numeric_limits<RawType>::digits - 1;\n\n  // # of exponent bits in a number.\n  static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount;\n\n  // The mask for the sign bit.\n  static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1);\n\n  // The mask for the fraction bits.\n  static const Bits kFractionBitMask =\n    ~static_cast<Bits>(0) >> (kExponentBitCount + 1);\n\n  // The mask for the exponent bits.\n  static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask);\n\n  // How many ULP's (Units in the Last Place) we want to tolerate when\n  // comparing two numbers.  The larger the value, the more error we\n  // allow.  A 0 value means that two numbers must be exactly the same\n  // to be considered equal.\n  //\n  // The maximum error of a single floating-point operation is 0.5\n  // units in the last place.  On Intel CPU's, all floating-point\n  // calculations are done with 80-bit precision, while double has 64\n  // bits.  Therefore, 4 should be enough for ordinary use.\n  //\n  // See the following article for more details on ULP:\n  // http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/\n  static const size_t kMaxUlps = 4;\n\n  // Constructs a FloatingPoint from a raw floating-point number.\n  //\n  // On an Intel CPU, passing a non-normalized NAN (Not a Number)\n  // around may change its bits, although the new value is guaranteed\n  // to be also a NAN.  Therefore, don't expect this constructor to\n  // preserve the bits in x when x is a NAN.\n  explicit FloatingPoint(const RawType& x) { u_.value_ = x; }\n\n  // Static methods\n\n  // Reinterprets a bit pattern as a floating-point number.\n  //\n  // This function is needed to test the AlmostEquals() method.\n  static RawType ReinterpretBits(const Bits bits) {\n    FloatingPoint fp(0);\n    fp.u_.bits_ = bits;\n    return fp.u_.value_;\n  }\n\n  // Returns the floating-point number that represent positive infinity.\n  static RawType Infinity() {\n    return ReinterpretBits(kExponentBitMask);\n  }\n\n  // Returns the maximum representable finite floating-point number.\n  static RawType Max();\n\n  // Non-static methods\n\n  // Returns the bits that represents this number.\n  const Bits &bits() const { return u_.bits_; }\n\n  // Returns the exponent bits of this number.\n  Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }\n\n  // Returns the fraction bits of this number.\n  Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }\n\n  // Returns the sign bit of this number.\n  Bits sign_bit() const { return kSignBitMask & u_.bits_; }\n\n  // Returns true iff this is NAN (not a number).\n  bool is_nan() const {\n    // It's a NAN if the exponent bits are all ones and the fraction\n    // bits are not entirely zeros.\n    return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);\n  }\n\n  // Returns true iff this number is at most kMaxUlps ULP's away from\n  // rhs.  In particular, this function:\n  //\n  //   - returns false if either number is (or both are) NAN.\n  //   - treats really large numbers as almost equal to infinity.\n  //   - thinks +0.0 and -0.0 are 0 DLP's apart.\n  bool AlmostEquals(const FloatingPoint& rhs) const {\n    // The IEEE standard says that any comparison operation involving\n    // a NAN must return false.\n    if (is_nan() || rhs.is_nan()) return false;\n\n    return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_)\n        <= kMaxUlps;\n  }\n\n private:\n  // The data type used to store the actual floating-point number.\n  union FloatingPointUnion {\n    RawType value_;  // The raw floating-point number.\n    Bits bits_;      // The bits that represent the number.\n  };\n\n  // Converts an integer from the sign-and-magnitude representation to\n  // the biased representation.  More precisely, let N be 2 to the\n  // power of (kBitCount - 1), an integer x is represented by the\n  // unsigned number x + N.\n  //\n  // For instance,\n  //\n  //   -N + 1 (the most negative number representable using\n  //          sign-and-magnitude) is represented by 1;\n  //   0      is represented by N; and\n  //   N - 1  (the biggest number representable using\n  //          sign-and-magnitude) is represented by 2N - 1.\n  //\n  // Read http://en.wikipedia.org/wiki/Signed_number_representations\n  // for more details on signed number representations.\n  static Bits SignAndMagnitudeToBiased(const Bits &sam) {\n    if (kSignBitMask & sam) {\n      // sam represents a negative number.\n      return ~sam + 1;\n    } else {\n      // sam represents a positive number.\n      return kSignBitMask | sam;\n    }\n  }\n\n  // Given two numbers in the sign-and-magnitude representation,\n  // returns the distance between them as an unsigned number.\n  static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1,\n                                                     const Bits &sam2) {\n    const Bits biased1 = SignAndMagnitudeToBiased(sam1);\n    const Bits biased2 = SignAndMagnitudeToBiased(sam2);\n    return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);\n  }\n\n  FloatingPointUnion u_;\n};\n\n// We cannot use std::numeric_limits<T>::max() as it clashes with the max()\n// macro defined by <windows.h>.\ntemplate <>\ninline float FloatingPoint<float>::Max() { return FLT_MAX; }\ntemplate <>\ninline double FloatingPoint<double>::Max() { return DBL_MAX; }\n\n// Typedefs the instances of the FloatingPoint template class that we\n// care to use.\ntypedef FloatingPoint<float> Float;\ntypedef FloatingPoint<double> Double;\n\n// In order to catch the mistake of putting tests that use different\n// test fixture classes in the same test case, we need to assign\n// unique IDs to fixture classes and compare them.  The TypeId type is\n// used to hold such IDs.  The user should treat TypeId as an opaque\n// type: the only operation allowed on TypeId values is to compare\n// them for equality using the == operator.\ntypedef const void* TypeId;\n\ntemplate <typename T>\nclass TypeIdHelper {\n public:\n  // dummy_ must not have a const type.  Otherwise an overly eager\n  // compiler (e.g. MSVC 7.1 & 8.0) may try to merge\n  // TypeIdHelper<T>::dummy_ for different Ts as an \"optimization\".\n  static bool dummy_;\n};\n\ntemplate <typename T>\nbool TypeIdHelper<T>::dummy_ = false;\n\n// GetTypeId<T>() returns the ID of type T.  Different values will be\n// returned for different types.  Calling the function twice with the\n// same type argument is guaranteed to return the same ID.\ntemplate <typename T>\nTypeId GetTypeId() {\n  // The compiler is required to allocate a different\n  // TypeIdHelper<T>::dummy_ variable for each T used to instantiate\n  // the template.  Therefore, the address of dummy_ is guaranteed to\n  // be unique.\n  return &(TypeIdHelper<T>::dummy_);\n}\n\n// Returns the type ID of ::testing::Test.  Always call this instead\n// of GetTypeId< ::testing::Test>() to get the type ID of\n// ::testing::Test, as the latter may give the wrong result due to a\n// suspected linker bug when compiling Google Test as a Mac OS X\n// framework.\nGTEST_API_ TypeId GetTestTypeId();\n\n// Defines the abstract factory interface that creates instances\n// of a Test object.\nclass TestFactoryBase {\n public:\n  virtual ~TestFactoryBase() {}\n\n  // Creates a test instance to run. The instance is both created and destroyed\n  // within TestInfoImpl::Run()\n  virtual Test* CreateTest() = 0;\n\n protected:\n  TestFactoryBase() {}\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase);\n};\n\n// This class provides implementation of TeastFactoryBase interface.\n// It is used in TEST and TEST_F macros.\ntemplate <class TestClass>\nclass TestFactoryImpl : public TestFactoryBase {\n public:\n  virtual Test* CreateTest() { return new TestClass; }\n};\n\n#if GTEST_OS_WINDOWS\n\n// Predicate-formatters for implementing the HRESULT checking macros\n// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}\n// We pass a long instead of HRESULT to avoid causing an\n// include dependency for the HRESULT type.\nGTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr,\n                                            long hr);  // NOLINT\nGTEST_API_ AssertionResult IsHRESULTFailure(const char* expr,\n                                            long hr);  // NOLINT\n\n#endif  // GTEST_OS_WINDOWS\n\n// Types of SetUpTestCase() and TearDownTestCase() functions.\ntypedef void (*SetUpTestCaseFunc)();\ntypedef void (*TearDownTestCaseFunc)();\n\n// Creates a new TestInfo object and registers it with Google Test;\n// returns the created object.\n//\n// Arguments:\n//\n//   test_case_name:   name of the test case\n//   name:             name of the test\n//   type_param        the name of the test's type parameter, or NULL if\n//                     this is not a typed or a type-parameterized test.\n//   value_param       text representation of the test's value parameter,\n//                     or NULL if this is not a type-parameterized test.\n//   fixture_class_id: ID of the test fixture class\n//   set_up_tc:        pointer to the function that sets up the test case\n//   tear_down_tc:     pointer to the function that tears down the test case\n//   factory:          pointer to the factory that creates a test object.\n//                     The newly created TestInfo instance will assume\n//                     ownership of the factory object.\nGTEST_API_ TestInfo* MakeAndRegisterTestInfo(\n    const char* test_case_name,\n    const char* name,\n    const char* type_param,\n    const char* value_param,\n    TypeId fixture_class_id,\n    SetUpTestCaseFunc set_up_tc,\n    TearDownTestCaseFunc tear_down_tc,\n    TestFactoryBase* factory);\n\n// If *pstr starts with the given prefix, modifies *pstr to be right\n// past the prefix and returns true; otherwise leaves *pstr unchanged\n// and returns false.  None of pstr, *pstr, and prefix can be NULL.\nGTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr);\n\n#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P\n\n// State of the definition of a type-parameterized test case.\nclass GTEST_API_ TypedTestCasePState {\n public:\n  TypedTestCasePState() : registered_(false) {}\n\n  // Adds the given test name to defined_test_names_ and return true\n  // if the test case hasn't been registered; otherwise aborts the\n  // program.\n  bool AddTestName(const char* file, int line, const char* case_name,\n                   const char* test_name) {\n    if (registered_) {\n      fprintf(stderr, \"%s Test %s must be defined before \"\n              \"REGISTER_TYPED_TEST_CASE_P(%s, ...).\\n\",\n              FormatFileLocation(file, line).c_str(), test_name, case_name);\n      fflush(stderr);\n      posix::Abort();\n    }\n    defined_test_names_.insert(test_name);\n    return true;\n  }\n\n  // Verifies that registered_tests match the test names in\n  // defined_test_names_; returns registered_tests if successful, or\n  // aborts the program otherwise.\n  const char* VerifyRegisteredTestNames(\n      const char* file, int line, const char* registered_tests);\n\n private:\n  bool registered_;\n  ::std::set<const char*> defined_test_names_;\n};\n\n// Skips to the first non-space char after the first comma in 'str';\n// returns NULL if no comma is found in 'str'.\ninline const char* SkipComma(const char* str) {\n  const char* comma = strchr(str, ',');\n  if (comma == NULL) {\n    return NULL;\n  }\n  while (IsSpace(*(++comma))) {}\n  return comma;\n}\n\n// Returns the prefix of 'str' before the first comma in it; returns\n// the entire string if it contains no comma.\ninline std::string GetPrefixUntilComma(const char* str) {\n  const char* comma = strchr(str, ',');\n  return comma == NULL ? str : std::string(str, comma);\n}\n\n// TypeParameterizedTest<Fixture, TestSel, Types>::Register()\n// registers a list of type-parameterized tests with Google Test.  The\n// return value is insignificant - we just need to return something\n// such that we can call this function in a namespace scope.\n//\n// Implementation note: The GTEST_TEMPLATE_ macro declares a template\n// template parameter.  It's defined in gtest-type-util.h.\ntemplate <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types>\nclass TypeParameterizedTest {\n public:\n  // 'index' is the index of the test in the type list 'Types'\n  // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase,\n  // Types).  Valid values for 'index' are [0, N - 1] where N is the\n  // length of Types.\n  static bool Register(const char* prefix, const char* case_name,\n                       const char* test_names, int index) {\n    typedef typename Types::Head Type;\n    typedef Fixture<Type> FixtureClass;\n    typedef typename GTEST_BIND_(TestSel, Type) TestClass;\n\n    // First, registers the first type-parameterized test in the type\n    // list.\n    MakeAndRegisterTestInfo(\n        (std::string(prefix) + (prefix[0] == '\\0' ? \"\" : \"/\") + case_name + \"/\"\n         + StreamableToString(index)).c_str(),\n        GetPrefixUntilComma(test_names).c_str(),\n        GetTypeName<Type>().c_str(),\n        NULL,  // No value parameter.\n        GetTypeId<FixtureClass>(),\n        TestClass::SetUpTestCase,\n        TestClass::TearDownTestCase,\n        new TestFactoryImpl<TestClass>);\n\n    // Next, recurses (at compile time) with the tail of the type list.\n    return TypeParameterizedTest<Fixture, TestSel, typename Types::Tail>\n        ::Register(prefix, case_name, test_names, index + 1);\n  }\n};\n\n// The base case for the compile time recursion.\ntemplate <GTEST_TEMPLATE_ Fixture, class TestSel>\nclass TypeParameterizedTest<Fixture, TestSel, Types0> {\n public:\n  static bool Register(const char* /*prefix*/, const char* /*case_name*/,\n                       const char* /*test_names*/, int /*index*/) {\n    return true;\n  }\n};\n\n// TypeParameterizedTestCase<Fixture, Tests, Types>::Register()\n// registers *all combinations* of 'Tests' and 'Types' with Google\n// Test.  The return value is insignificant - we just need to return\n// something such that we can call this function in a namespace scope.\ntemplate <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>\nclass TypeParameterizedTestCase {\n public:\n  static bool Register(const char* prefix, const char* case_name,\n                       const char* test_names) {\n    typedef typename Tests::Head Head;\n\n    // First, register the first test in 'Test' for each type in 'Types'.\n    TypeParameterizedTest<Fixture, Head, Types>::Register(\n        prefix, case_name, test_names, 0);\n\n    // Next, recurses (at compile time) with the tail of the test list.\n    return TypeParameterizedTestCase<Fixture, typename Tests::Tail, Types>\n        ::Register(prefix, case_name, SkipComma(test_names));\n  }\n};\n\n// The base case for the compile time recursion.\ntemplate <GTEST_TEMPLATE_ Fixture, typename Types>\nclass TypeParameterizedTestCase<Fixture, Templates0, Types> {\n public:\n  static bool Register(const char* /*prefix*/, const char* /*case_name*/,\n                       const char* /*test_names*/) {\n    return true;\n  }\n};\n\n#endif  // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P\n\n// Returns the current OS stack trace as an std::string.\n//\n// The maximum number of stack frames to be included is specified by\n// the gtest_stack_trace_depth flag.  The skip_count parameter\n// specifies the number of top frames to be skipped, which doesn't\n// count against the number of frames to be included.\n//\n// For example, if Foo() calls Bar(), which in turn calls\n// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in\n// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.\nGTEST_API_ std::string GetCurrentOsStackTraceExceptTop(\n    UnitTest* unit_test, int skip_count);\n\n// Helpers for suppressing warnings on unreachable code or constant\n// condition.\n\n// Always returns true.\nGTEST_API_ bool AlwaysTrue();\n\n// Always returns false.\ninline bool AlwaysFalse() { return !AlwaysTrue(); }\n\n// Helper for suppressing false warning from Clang on a const char*\n// variable declared in a conditional expression always being NULL in\n// the else branch.\nstruct GTEST_API_ ConstCharPtr {\n  ConstCharPtr(const char* str) : value(str) {}\n  operator bool() const { return true; }\n  const char* value;\n};\n\n// A simple Linear Congruential Generator for generating random\n// numbers with a uniform distribution.  Unlike rand() and srand(), it\n// doesn't use global state (and therefore can't interfere with user\n// code).  Unlike rand_r(), it's portable.  An LCG isn't very random,\n// but it's good enough for our purposes.\nclass GTEST_API_ Random {\n public:\n  static const UInt32 kMaxRange = 1u << 31;\n\n  explicit Random(UInt32 seed) : state_(seed) {}\n\n  void Reseed(UInt32 seed) { state_ = seed; }\n\n  // Generates a random number from [0, range).  Crashes if 'range' is\n  // 0 or greater than kMaxRange.\n  UInt32 Generate(UInt32 range);\n\n private:\n  UInt32 state_;\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(Random);\n};\n\n// Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a\n// compiler error iff T1 and T2 are different types.\ntemplate <typename T1, typename T2>\nstruct CompileAssertTypesEqual;\n\ntemplate <typename T>\nstruct CompileAssertTypesEqual<T, T> {\n};\n\n// Removes the reference from a type if it is a reference type,\n// otherwise leaves it unchanged.  This is the same as\n// tr1::remove_reference, which is not widely available yet.\ntemplate <typename T>\nstruct RemoveReference { typedef T type; };  // NOLINT\ntemplate <typename T>\nstruct RemoveReference<T&> { typedef T type; };  // NOLINT\n\n// A handy wrapper around RemoveReference that works when the argument\n// T depends on template parameters.\n#define GTEST_REMOVE_REFERENCE_(T) \\\n    typename ::testing::internal::RemoveReference<T>::type\n\n// Removes const from a type if it is a const type, otherwise leaves\n// it unchanged.  This is the same as tr1::remove_const, which is not\n// widely available yet.\ntemplate <typename T>\nstruct RemoveConst { typedef T type; };  // NOLINT\ntemplate <typename T>\nstruct RemoveConst<const T> { typedef T type; };  // NOLINT\n\n// MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above\n// definition to fail to remove the const in 'const int[3]' and 'const\n// char[3][4]'.  The following specialization works around the bug.\ntemplate <typename T, size_t N>\nstruct RemoveConst<const T[N]> {\n  typedef typename RemoveConst<T>::type type[N];\n};\n\n#if defined(_MSC_VER) && _MSC_VER < 1400\n// This is the only specialization that allows VC++ 7.1 to remove const in\n// 'const int[3] and 'const int[3][4]'.  However, it causes trouble with GCC\n// and thus needs to be conditionally compiled.\ntemplate <typename T, size_t N>\nstruct RemoveConst<T[N]> {\n  typedef typename RemoveConst<T>::type type[N];\n};\n#endif\n\n// A handy wrapper around RemoveConst that works when the argument\n// T depends on template parameters.\n#define GTEST_REMOVE_CONST_(T) \\\n    typename ::testing::internal::RemoveConst<T>::type\n\n// Turns const U&, U&, const U, and U all into U.\n#define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \\\n    GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))\n\n// Adds reference to a type if it is not a reference type,\n// otherwise leaves it unchanged.  This is the same as\n// tr1::add_reference, which is not widely available yet.\ntemplate <typename T>\nstruct AddReference { typedef T& type; };  // NOLINT\ntemplate <typename T>\nstruct AddReference<T&> { typedef T& type; };  // NOLINT\n\n// A handy wrapper around AddReference that works when the argument T\n// depends on template parameters.\n#define GTEST_ADD_REFERENCE_(T) \\\n    typename ::testing::internal::AddReference<T>::type\n\n// Adds a reference to const on top of T as necessary.  For example,\n// it transforms\n//\n//   char         ==> const char&\n//   const char   ==> const char&\n//   char&        ==> const char&\n//   const char&  ==> const char&\n//\n// The argument T must depend on some template parameters.\n#define GTEST_REFERENCE_TO_CONST_(T) \\\n    GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T))\n\n// ImplicitlyConvertible<From, To>::value is a compile-time bool\n// constant that's true iff type From can be implicitly converted to\n// type To.\ntemplate <typename From, typename To>\nclass ImplicitlyConvertible {\n private:\n  // We need the following helper functions only for their types.\n  // They have no implementations.\n\n  // MakeFrom() is an expression whose type is From.  We cannot simply\n  // use From(), as the type From may not have a public default\n  // constructor.\n  static From MakeFrom();\n\n  // These two functions are overloaded.  Given an expression\n  // Helper(x), the compiler will pick the first version if x can be\n  // implicitly converted to type To; otherwise it will pick the\n  // second version.\n  //\n  // The first version returns a value of size 1, and the second\n  // version returns a value of size 2.  Therefore, by checking the\n  // size of Helper(x), which can be done at compile time, we can tell\n  // which version of Helper() is used, and hence whether x can be\n  // implicitly converted to type To.\n  static char Helper(To);\n  static char (&Helper(...))[2];  // NOLINT\n\n  // We have to put the 'public' section after the 'private' section,\n  // or MSVC refuses to compile the code.\n public:\n  // MSVC warns about implicitly converting from double to int for\n  // possible loss of data, so we need to temporarily disable the\n  // warning.\n#ifdef _MSC_VER\n# pragma warning(push)          // Saves the current warning state.\n# pragma warning(disable:4244)  // Temporarily disables warning 4244.\n\n  static const bool value =\n      sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;\n# pragma warning(pop)           // Restores the warning state.\n#elif defined(__BORLANDC__)\n  // C++Builder cannot use member overload resolution during template\n  // instantiation.  The simplest workaround is to use its C++0x type traits\n  // functions (C++Builder 2009 and above only).\n  static const bool value = __is_convertible(From, To);\n#else\n  static const bool value =\n      sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;\n#endif  // _MSV_VER\n};\ntemplate <typename From, typename To>\nconst bool ImplicitlyConvertible<From, To>::value;\n\n// IsAProtocolMessage<T>::value is a compile-time bool constant that's\n// true iff T is type ProtocolMessage, proto2::Message, or a subclass\n// of those.\ntemplate <typename T>\nstruct IsAProtocolMessage\n    : public bool_constant<\n  ImplicitlyConvertible<const T*, const ::ProtocolMessage*>::value ||\n  ImplicitlyConvertible<const T*, const ::proto2::Message*>::value> {\n};\n\n// When the compiler sees expression IsContainerTest<C>(0), if C is an\n// STL-style container class, the first overload of IsContainerTest\n// will be viable (since both C::iterator* and C::const_iterator* are\n// valid types and NULL can be implicitly converted to them).  It will\n// be picked over the second overload as 'int' is a perfect match for\n// the type of argument 0.  If C::iterator or C::const_iterator is not\n// a valid type, the first overload is not viable, and the second\n// overload will be picked.  Therefore, we can determine whether C is\n// a container class by checking the type of IsContainerTest<C>(0).\n// The value of the expression is insignificant.\n//\n// Note that we look for both C::iterator and C::const_iterator.  The\n// reason is that C++ injects the name of a class as a member of the\n// class itself (e.g. you can refer to class iterator as either\n// 'iterator' or 'iterator::iterator').  If we look for C::iterator\n// only, for example, we would mistakenly think that a class named\n// iterator is an STL container.\n//\n// Also note that the simpler approach of overloading\n// IsContainerTest(typename C::const_iterator*) and\n// IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++.\ntypedef int IsContainer;\ntemplate <class C>\nIsContainer IsContainerTest(int /* dummy */,\n                            typename C::iterator* /* it */ = NULL,\n                            typename C::const_iterator* /* const_it */ = NULL) {\n  return 0;\n}\n\ntypedef char IsNotContainer;\ntemplate <class C>\nIsNotContainer IsContainerTest(long /* dummy */) { return '\\0'; }\n\n// EnableIf<condition>::type is void when 'Cond' is true, and\n// undefined when 'Cond' is false.  To use SFINAE to make a function\n// overload only apply when a particular expression is true, add\n// \"typename EnableIf<expression>::type* = 0\" as the last parameter.\ntemplate<bool> struct EnableIf;\ntemplate<> struct EnableIf<true> { typedef void type; };  // NOLINT\n\n// Utilities for native arrays.\n\n// ArrayEq() compares two k-dimensional native arrays using the\n// elements' operator==, where k can be any integer >= 0.  When k is\n// 0, ArrayEq() degenerates into comparing a single pair of values.\n\ntemplate <typename T, typename U>\nbool ArrayEq(const T* lhs, size_t size, const U* rhs);\n\n// This generic version is used when k is 0.\ntemplate <typename T, typename U>\ninline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; }\n\n// This overload is used when k >= 1.\ntemplate <typename T, typename U, size_t N>\ninline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) {\n  return internal::ArrayEq(lhs, N, rhs);\n}\n\n// This helper reduces code bloat.  If we instead put its logic inside\n// the previous ArrayEq() function, arrays with different sizes would\n// lead to different copies of the template code.\ntemplate <typename T, typename U>\nbool ArrayEq(const T* lhs, size_t size, const U* rhs) {\n  for (size_t i = 0; i != size; i++) {\n    if (!internal::ArrayEq(lhs[i], rhs[i]))\n      return false;\n  }\n  return true;\n}\n\n// Finds the first element in the iterator range [begin, end) that\n// equals elem.  Element may be a native array type itself.\ntemplate <typename Iter, typename Element>\nIter ArrayAwareFind(Iter begin, Iter end, const Element& elem) {\n  for (Iter it = begin; it != end; ++it) {\n    if (internal::ArrayEq(*it, elem))\n      return it;\n  }\n  return end;\n}\n\n// CopyArray() copies a k-dimensional native array using the elements'\n// operator=, where k can be any integer >= 0.  When k is 0,\n// CopyArray() degenerates into copying a single value.\n\ntemplate <typename T, typename U>\nvoid CopyArray(const T* from, size_t size, U* to);\n\n// This generic version is used when k is 0.\ntemplate <typename T, typename U>\ninline void CopyArray(const T& from, U* to) { *to = from; }\n\n// This overload is used when k >= 1.\ntemplate <typename T, typename U, size_t N>\ninline void CopyArray(const T(&from)[N], U(*to)[N]) {\n  internal::CopyArray(from, N, *to);\n}\n\n// This helper reduces code bloat.  If we instead put its logic inside\n// the previous CopyArray() function, arrays with different sizes\n// would lead to different copies of the template code.\ntemplate <typename T, typename U>\nvoid CopyArray(const T* from, size_t size, U* to) {\n  for (size_t i = 0; i != size; i++) {\n    internal::CopyArray(from[i], to + i);\n  }\n}\n\n// The relation between an NativeArray object (see below) and the\n// native array it represents.\nenum RelationToSource {\n  kReference,  // The NativeArray references the native array.\n  kCopy        // The NativeArray makes a copy of the native array and\n               // owns the copy.\n};\n\n// Adapts a native array to a read-only STL-style container.  Instead\n// of the complete STL container concept, this adaptor only implements\n// members useful for Google Mock's container matchers.  New members\n// should be added as needed.  To simplify the implementation, we only\n// support Element being a raw type (i.e. having no top-level const or\n// reference modifier).  It's the client's responsibility to satisfy\n// this requirement.  Element can be an array type itself (hence\n// multi-dimensional arrays are supported).\ntemplate <typename Element>\nclass NativeArray {\n public:\n  // STL-style container typedefs.\n  typedef Element value_type;\n  typedef Element* iterator;\n  typedef const Element* const_iterator;\n\n  // Constructs from a native array.\n  NativeArray(const Element* array, size_t count, RelationToSource relation) {\n    Init(array, count, relation);\n  }\n\n  // Copy constructor.\n  NativeArray(const NativeArray& rhs) {\n    Init(rhs.array_, rhs.size_, rhs.relation_to_source_);\n  }\n\n  ~NativeArray() {\n    // Ensures that the user doesn't instantiate NativeArray with a\n    // const or reference type.\n    static_cast<void>(StaticAssertTypeEqHelper<Element,\n        GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>());\n    if (relation_to_source_ == kCopy)\n      delete[] array_;\n  }\n\n  // STL-style container methods.\n  size_t size() const { return size_; }\n  const_iterator begin() const { return array_; }\n  const_iterator end() const { return array_ + size_; }\n  bool operator==(const NativeArray& rhs) const {\n    return size() == rhs.size() &&\n        ArrayEq(begin(), size(), rhs.begin());\n  }\n\n private:\n  // Initializes this object; makes a copy of the input array if\n  // 'relation' is kCopy.\n  void Init(const Element* array, size_t a_size, RelationToSource relation) {\n    if (relation == kReference) {\n      array_ = array;\n    } else {\n      Element* const copy = new Element[a_size];\n      CopyArray(array, a_size, copy);\n      array_ = copy;\n    }\n    size_ = a_size;\n    relation_to_source_ = relation;\n  }\n\n  const Element* array_;\n  size_t size_;\n  RelationToSource relation_to_source_;\n\n  GTEST_DISALLOW_ASSIGN_(NativeArray);\n};\n\n}  // namespace internal\n}  // namespace testing\n\n#define GTEST_MESSAGE_AT_(file, line, message, result_type) \\\n  ::testing::internal::AssertHelper(result_type, file, line, message) \\\n    = ::testing::Message()\n\n#define GTEST_MESSAGE_(message, result_type) \\\n  GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)\n\n#define GTEST_FATAL_FAILURE_(message) \\\n  return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)\n\n#define GTEST_NONFATAL_FAILURE_(message) \\\n  GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)\n\n#define GTEST_SUCCESS_(message) \\\n  GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)\n\n// Suppresses MSVC warnings 4072 (unreachable code) for the code following\n// statement if it returns or throws (or doesn't return or throw in some\n// situations).\n#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \\\n  if (::testing::internal::AlwaysTrue()) { statement; }\n\n#define GTEST_TEST_THROW_(statement, expected_exception, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (::testing::internal::ConstCharPtr gtest_msg = \"\") { \\\n    bool gtest_caught_expected = false; \\\n    try { \\\n      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n    } \\\n    catch (expected_exception const&) { \\\n      gtest_caught_expected = true; \\\n    } \\\n    catch (...) { \\\n      gtest_msg.value = \\\n          \"Expected: \" #statement \" throws an exception of type \" \\\n          #expected_exception \".\\n  Actual: it throws a different type.\"; \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \\\n    } \\\n    if (!gtest_caught_expected) { \\\n      gtest_msg.value = \\\n          \"Expected: \" #statement \" throws an exception of type \" \\\n          #expected_exception \".\\n  Actual: it throws nothing.\"; \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \\\n    } \\\n  } else \\\n    GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \\\n      fail(gtest_msg.value)\n\n#define GTEST_TEST_NO_THROW_(statement, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (::testing::internal::AlwaysTrue()) { \\\n    try { \\\n      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n    } \\\n    catch (...) { \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \\\n    } \\\n  } else \\\n    GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \\\n      fail(\"Expected: \" #statement \" doesn't throw an exception.\\n\" \\\n           \"  Actual: it throws.\")\n\n#define GTEST_TEST_ANY_THROW_(statement, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (::testing::internal::AlwaysTrue()) { \\\n    bool gtest_caught_any = false; \\\n    try { \\\n      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n    } \\\n    catch (...) { \\\n      gtest_caught_any = true; \\\n    } \\\n    if (!gtest_caught_any) { \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \\\n    } \\\n  } else \\\n    GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \\\n      fail(\"Expected: \" #statement \" throws an exception.\\n\" \\\n           \"  Actual: it doesn't.\")\n\n\n// Implements Boolean test assertions such as EXPECT_TRUE. expression can be\n// either a boolean expression or an AssertionResult. text is a textual\n// represenation of expression as it was passed into the EXPECT_TRUE.\n#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (const ::testing::AssertionResult gtest_ar_ = \\\n      ::testing::AssertionResult(expression)) \\\n    ; \\\n  else \\\n    fail(::testing::internal::GetBoolAssertionFailureMessage(\\\n        gtest_ar_, text, #actual, #expected).c_str())\n\n#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \\\n  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n  if (::testing::internal::AlwaysTrue()) { \\\n    ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \\\n    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \\\n    if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \\\n      goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \\\n    } \\\n  } else \\\n    GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \\\n      fail(\"Expected: \" #statement \" doesn't generate new fatal \" \\\n           \"failures in the current thread.\\n\" \\\n           \"  Actual: it does.\")\n\n// Expands to the name of the class that implements the given test.\n#define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \\\n  test_case_name##_##test_name##_Test\n\n// Helper macro for defining tests.\n#define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\\\nclass GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\\\n public:\\\n  GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\\\n private:\\\n  virtual void TestBody();\\\n  static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\\\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(\\\n      GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\\\n};\\\n\\\n::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\\\n  ::test_info_ =\\\n    ::testing::internal::MakeAndRegisterTestInfo(\\\n        #test_case_name, #test_name, NULL, NULL, \\\n        (parent_id), \\\n        parent_class::SetUpTestCase, \\\n        parent_class::TearDownTestCase, \\\n        new ::testing::internal::TestFactoryImpl<\\\n            GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\\\nvoid GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-linked_ptr.h",
    "content": "// Copyright 2003 Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: Dan Egnor (egnor@google.com)\n//\n// A \"smart\" pointer type with reference tracking.  Every pointer to a\n// particular object is kept on a circular linked list.  When the last pointer\n// to an object is destroyed or reassigned, the object is deleted.\n//\n// Used properly, this deletes the object when the last reference goes away.\n// There are several caveats:\n// - Like all reference counting schemes, cycles lead to leaks.\n// - Each smart pointer is actually two pointers (8 bytes instead of 4).\n// - Every time a pointer is assigned, the entire list of pointers to that\n//   object is traversed.  This class is therefore NOT SUITABLE when there\n//   will often be more than two or three pointers to a particular object.\n// - References are only tracked as long as linked_ptr<> objects are copied.\n//   If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS\n//   will happen (double deletion).\n//\n// A good use of this class is storing object references in STL containers.\n// You can safely put linked_ptr<> in a vector<>.\n// Other uses may not be as good.\n//\n// Note: If you use an incomplete type with linked_ptr<>, the class\n// *containing* linked_ptr<> must have a constructor and destructor (even\n// if they do nothing!).\n//\n// Bill Gibbons suggested we use something like this.\n//\n// Thread Safety:\n//   Unlike other linked_ptr implementations, in this implementation\n//   a linked_ptr object is thread-safe in the sense that:\n//     - it's safe to copy linked_ptr objects concurrently,\n//     - it's safe to copy *from* a linked_ptr and read its underlying\n//       raw pointer (e.g. via get()) concurrently, and\n//     - it's safe to write to two linked_ptrs that point to the same\n//       shared object concurrently.\n// TODO(wan@google.com): rename this to safe_linked_ptr to avoid\n// confusion with normal linked_ptr.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_\n\n#include <stdlib.h>\n#include <assert.h>\n\n#include \"gtest/internal/gtest-port.h\"\n\nnamespace testing {\nnamespace internal {\n\n// Protects copying of all linked_ptr objects.\nGTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_linked_ptr_mutex);\n\n// This is used internally by all instances of linked_ptr<>.  It needs to be\n// a non-template class because different types of linked_ptr<> can refer to\n// the same object (linked_ptr<Superclass>(obj) vs linked_ptr<Subclass>(obj)).\n// So, it needs to be possible for different types of linked_ptr to participate\n// in the same circular linked list, so we need a single class type here.\n//\n// DO NOT USE THIS CLASS DIRECTLY YOURSELF.  Use linked_ptr<T>.\nclass linked_ptr_internal {\n public:\n  // Create a new circle that includes only this instance.\n  void join_new() {\n    next_ = this;\n  }\n\n  // Many linked_ptr operations may change p.link_ for some linked_ptr\n  // variable p in the same circle as this object.  Therefore we need\n  // to prevent two such operations from occurring concurrently.\n  //\n  // Note that different types of linked_ptr objects can coexist in a\n  // circle (e.g. linked_ptr<Base>, linked_ptr<Derived1>, and\n  // linked_ptr<Derived2>).  Therefore we must use a single mutex to\n  // protect all linked_ptr objects.  This can create serious\n  // contention in production code, but is acceptable in a testing\n  // framework.\n\n  // Join an existing circle.\n  void join(linked_ptr_internal const* ptr)\n      GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex) {\n    MutexLock lock(&g_linked_ptr_mutex);\n\n    linked_ptr_internal const* p = ptr;\n    while (p->next_ != ptr) p = p->next_;\n    p->next_ = this;\n    next_ = ptr;\n  }\n\n  // Leave whatever circle we're part of.  Returns true if we were the\n  // last member of the circle.  Once this is done, you can join() another.\n  bool depart()\n      GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex) {\n    MutexLock lock(&g_linked_ptr_mutex);\n\n    if (next_ == this) return true;\n    linked_ptr_internal const* p = next_;\n    while (p->next_ != this) p = p->next_;\n    p->next_ = next_;\n    return false;\n  }\n\n private:\n  mutable linked_ptr_internal const* next_;\n};\n\ntemplate <typename T>\nclass linked_ptr {\n public:\n  typedef T element_type;\n\n  // Take over ownership of a raw pointer.  This should happen as soon as\n  // possible after the object is created.\n  explicit linked_ptr(T* ptr = NULL) { capture(ptr); }\n  ~linked_ptr() { depart(); }\n\n  // Copy an existing linked_ptr<>, adding ourselves to the list of references.\n  template <typename U> linked_ptr(linked_ptr<U> const& ptr) { copy(&ptr); }\n  linked_ptr(linked_ptr const& ptr) {  // NOLINT\n    assert(&ptr != this);\n    copy(&ptr);\n  }\n\n  // Assignment releases the old value and acquires the new.\n  template <typename U> linked_ptr& operator=(linked_ptr<U> const& ptr) {\n    depart();\n    copy(&ptr);\n    return *this;\n  }\n\n  linked_ptr& operator=(linked_ptr const& ptr) {\n    if (&ptr != this) {\n      depart();\n      copy(&ptr);\n    }\n    return *this;\n  }\n\n  // Smart pointer members.\n  void reset(T* ptr = NULL) {\n    depart();\n    capture(ptr);\n  }\n  T* get() const { return value_; }\n  T* operator->() const { return value_; }\n  T& operator*() const { return *value_; }\n\n  bool operator==(T* p) const { return value_ == p; }\n  bool operator!=(T* p) const { return value_ != p; }\n  template <typename U>\n  bool operator==(linked_ptr<U> const& ptr) const {\n    return value_ == ptr.get();\n  }\n  template <typename U>\n  bool operator!=(linked_ptr<U> const& ptr) const {\n    return value_ != ptr.get();\n  }\n\n private:\n  template <typename U>\n  friend class linked_ptr;\n\n  T* value_;\n  linked_ptr_internal link_;\n\n  void depart() {\n    if (link_.depart()) delete value_;\n  }\n\n  void capture(T* ptr) {\n    value_ = ptr;\n    link_.join_new();\n  }\n\n  template <typename U> void copy(linked_ptr<U> const* ptr) {\n    value_ = ptr->get();\n    if (value_)\n      link_.join(&ptr->link_);\n    else\n      link_.join_new();\n  }\n};\n\ntemplate<typename T> inline\nbool operator==(T* ptr, const linked_ptr<T>& x) {\n  return ptr == x.get();\n}\n\ntemplate<typename T> inline\nbool operator!=(T* ptr, const linked_ptr<T>& x) {\n  return ptr != x.get();\n}\n\n// A function to convert T* into linked_ptr<T>\n// Doing e.g. make_linked_ptr(new FooBarBaz<type>(arg)) is a shorter notation\n// for linked_ptr<FooBarBaz<type> >(new FooBarBaz<type>(arg))\ntemplate <typename T>\nlinked_ptr<T> make_linked_ptr(T* ptr) {\n  return linked_ptr<T>(ptr);\n}\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-param-util-generated.h",
    "content": "// This file was GENERATED by command:\n//     pump.py gtest-param-util-generated.h.pump\n// DO NOT EDIT BY HAND!!!\n\n// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vladl@google.com (Vlad Losev)\n\n// Type and function utilities for implementing parameterized tests.\n// This file is generated by a SCRIPT.  DO NOT EDIT BY HAND!\n//\n// Currently Google Test supports at most 50 arguments in Values,\n// and at most 10 arguments in Combine. Please contact\n// googletestframework@googlegroups.com if you need more.\n// Please note that the number of arguments to Combine is limited\n// by the maximum arity of the implementation of tr1::tuple which is\n// currently set at 10.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_\n\n// scripts/fuse_gtest.py depends on gtest's own header being #included\n// *unconditionally*.  Therefore these #includes cannot be moved\n// inside #if GTEST_HAS_PARAM_TEST.\n#include \"gtest/internal/gtest-param-util.h\"\n#include \"gtest/internal/gtest-port.h\"\n\n#if GTEST_HAS_PARAM_TEST\n\nnamespace testing {\n\n// Forward declarations of ValuesIn(), which is implemented in\n// include/gtest/gtest-param-test.h.\ntemplate <typename ForwardIterator>\ninternal::ParamGenerator<\n  typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>\nValuesIn(ForwardIterator begin, ForwardIterator end);\n\ntemplate <typename T, size_t N>\ninternal::ParamGenerator<T> ValuesIn(const T (&array)[N]);\n\ntemplate <class Container>\ninternal::ParamGenerator<typename Container::value_type> ValuesIn(\n    const Container& container);\n\nnamespace internal {\n\n// Used in the Values() function to provide polymorphic capabilities.\ntemplate <typename T1>\nclass ValueArray1 {\n public:\n  explicit ValueArray1(T1 v1) : v1_(v1) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray1& other);\n\n  const T1 v1_;\n};\n\ntemplate <typename T1, typename T2>\nclass ValueArray2 {\n public:\n  ValueArray2(T1 v1, T2 v2) : v1_(v1), v2_(v2) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray2& other);\n\n  const T1 v1_;\n  const T2 v2_;\n};\n\ntemplate <typename T1, typename T2, typename T3>\nclass ValueArray3 {\n public:\n  ValueArray3(T1 v1, T2 v2, T3 v3) : v1_(v1), v2_(v2), v3_(v3) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray3& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4>\nclass ValueArray4 {\n public:\n  ValueArray4(T1 v1, T2 v2, T3 v3, T4 v4) : v1_(v1), v2_(v2), v3_(v3),\n      v4_(v4) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray4& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5>\nclass ValueArray5 {\n public:\n  ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) : v1_(v1), v2_(v2), v3_(v3),\n      v4_(v4), v5_(v5) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray5& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6>\nclass ValueArray6 {\n public:\n  ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) : v1_(v1), v2_(v2),\n      v3_(v3), v4_(v4), v5_(v5), v6_(v6) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray6& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7>\nclass ValueArray7 {\n public:\n  ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) : v1_(v1),\n      v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray7& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8>\nclass ValueArray8 {\n public:\n  ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,\n      T8 v8) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray8& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9>\nclass ValueArray9 {\n public:\n  ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,\n      T9 v9) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray9& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10>\nclass ValueArray10 {\n public:\n  ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray10& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11>\nclass ValueArray11 {\n public:\n  ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),\n      v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray11& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12>\nclass ValueArray12 {\n public:\n  ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),\n      v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray12& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13>\nclass ValueArray13 {\n public:\n  ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),\n      v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),\n      v12_(v12), v13_(v13) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray13& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14>\nclass ValueArray14 {\n public:\n  ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) : v1_(v1), v2_(v2), v3_(v3),\n      v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),\n      v11_(v11), v12_(v12), v13_(v13), v14_(v14) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray14& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15>\nclass ValueArray15 {\n public:\n  ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) : v1_(v1), v2_(v2),\n      v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),\n      v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray15& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16>\nclass ValueArray16 {\n public:\n  ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) : v1_(v1),\n      v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),\n      v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),\n      v16_(v16) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray16& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17>\nclass ValueArray17 {\n public:\n  ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,\n      T17 v17) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),\n      v15_(v15), v16_(v16), v17_(v17) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray17& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18>\nclass ValueArray18 {\n public:\n  ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),\n      v15_(v15), v16_(v16), v17_(v17), v18_(v18) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray18& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19>\nclass ValueArray19 {\n public:\n  ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),\n      v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),\n      v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray19& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20>\nclass ValueArray20 {\n public:\n  ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),\n      v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),\n      v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),\n      v19_(v19), v20_(v20) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray20& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21>\nclass ValueArray21 {\n public:\n  ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),\n      v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),\n      v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),\n      v18_(v18), v19_(v19), v20_(v20), v21_(v21) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray21& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22>\nclass ValueArray22 {\n public:\n  ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22) : v1_(v1), v2_(v2), v3_(v3),\n      v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),\n      v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),\n      v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray22& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23>\nclass ValueArray23 {\n public:\n  ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23) : v1_(v1), v2_(v2),\n      v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),\n      v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),\n      v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),\n      v23_(v23) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray23& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24>\nclass ValueArray24 {\n public:\n  ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24) : v1_(v1),\n      v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),\n      v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),\n      v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),\n      v22_(v22), v23_(v23), v24_(v24) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray24& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25>\nclass ValueArray25 {\n public:\n  ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,\n      T25 v25) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),\n      v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),\n      v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray25& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26>\nclass ValueArray26 {\n public:\n  ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),\n      v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),\n      v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray26& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27>\nclass ValueArray27 {\n public:\n  ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),\n      v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),\n      v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),\n      v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),\n      v26_(v26), v27_(v27) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray27& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28>\nclass ValueArray28 {\n public:\n  ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),\n      v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),\n      v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),\n      v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),\n      v25_(v25), v26_(v26), v27_(v27), v28_(v28) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray28& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29>\nclass ValueArray29 {\n public:\n  ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),\n      v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),\n      v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),\n      v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),\n      v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray29& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30>\nclass ValueArray30 {\n public:\n  ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) : v1_(v1), v2_(v2), v3_(v3),\n      v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),\n      v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),\n      v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),\n      v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),\n      v29_(v29), v30_(v30) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray30& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31>\nclass ValueArray31 {\n public:\n  ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) : v1_(v1), v2_(v2),\n      v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),\n      v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),\n      v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),\n      v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),\n      v29_(v29), v30_(v30), v31_(v31) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray31& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32>\nclass ValueArray32 {\n public:\n  ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32) : v1_(v1),\n      v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),\n      v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),\n      v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),\n      v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),\n      v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray32& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33>\nclass ValueArray33 {\n public:\n  ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,\n      T33 v33) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),\n      v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),\n      v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),\n      v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),\n      v33_(v33) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray33& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34>\nclass ValueArray34 {\n public:\n  ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),\n      v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),\n      v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),\n      v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),\n      v33_(v33), v34_(v34) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray34& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35>\nclass ValueArray35 {\n public:\n  ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),\n      v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),\n      v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),\n      v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),\n      v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),\n      v32_(v32), v33_(v33), v34_(v34), v35_(v35) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray35& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36>\nclass ValueArray36 {\n public:\n  ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),\n      v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),\n      v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),\n      v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),\n      v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),\n      v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray36& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37>\nclass ValueArray37 {\n public:\n  ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),\n      v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),\n      v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),\n      v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),\n      v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),\n      v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),\n      v36_(v36), v37_(v37) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray37& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38>\nclass ValueArray38 {\n public:\n  ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38) : v1_(v1), v2_(v2), v3_(v3),\n      v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),\n      v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),\n      v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),\n      v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),\n      v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),\n      v35_(v35), v36_(v36), v37_(v37), v38_(v38) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray38& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39>\nclass ValueArray39 {\n public:\n  ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39) : v1_(v1), v2_(v2),\n      v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),\n      v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),\n      v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),\n      v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),\n      v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),\n      v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray39& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40>\nclass ValueArray40 {\n public:\n  ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) : v1_(v1),\n      v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),\n      v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),\n      v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),\n      v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),\n      v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),\n      v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),\n      v40_(v40) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray40& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41>\nclass ValueArray41 {\n public:\n  ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,\n      T41 v41) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),\n      v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),\n      v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),\n      v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),\n      v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),\n      v39_(v39), v40_(v40), v41_(v41) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray41& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n  const T41 v41_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42>\nclass ValueArray42 {\n public:\n  ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n      T42 v42) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),\n      v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),\n      v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),\n      v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),\n      v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),\n      v39_(v39), v40_(v40), v41_(v41), v42_(v42) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),\n        static_cast<T>(v42_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray42& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n  const T41 v41_;\n  const T42 v42_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43>\nclass ValueArray43 {\n public:\n  ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n      T42 v42, T43 v43) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),\n      v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),\n      v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),\n      v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),\n      v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),\n      v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37),\n      v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),\n        static_cast<T>(v42_), static_cast<T>(v43_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray43& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n  const T41 v41_;\n  const T42 v42_;\n  const T43 v43_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44>\nclass ValueArray44 {\n public:\n  ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n      T42 v42, T43 v43, T44 v44) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),\n      v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),\n      v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),\n      v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),\n      v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),\n      v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36),\n      v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42),\n      v43_(v43), v44_(v44) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),\n        static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray44& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n  const T41 v41_;\n  const T42 v42_;\n  const T43 v43_;\n  const T44 v44_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45>\nclass ValueArray45 {\n public:\n  ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n      T42 v42, T43 v43, T44 v44, T45 v45) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),\n      v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),\n      v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),\n      v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),\n      v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),\n      v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),\n      v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41),\n      v42_(v42), v43_(v43), v44_(v44), v45_(v45) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),\n        static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),\n        static_cast<T>(v45_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray45& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n  const T41 v41_;\n  const T42 v42_;\n  const T43 v43_;\n  const T44 v44_;\n  const T45 v45_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46>\nclass ValueArray46 {\n public:\n  ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n      T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) : v1_(v1), v2_(v2), v3_(v3),\n      v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),\n      v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),\n      v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),\n      v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),\n      v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),\n      v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),\n      v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),\n        static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),\n        static_cast<T>(v45_), static_cast<T>(v46_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray46& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n  const T41 v41_;\n  const T42 v42_;\n  const T43 v43_;\n  const T44 v44_;\n  const T45 v45_;\n  const T46 v46_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47>\nclass ValueArray47 {\n public:\n  ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n      T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) : v1_(v1), v2_(v2),\n      v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),\n      v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),\n      v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),\n      v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),\n      v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),\n      v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),\n      v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46),\n      v47_(v47) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),\n        static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),\n        static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray47& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n  const T41 v41_;\n  const T42 v42_;\n  const T43 v43_;\n  const T44 v44_;\n  const T45 v45_;\n  const T46 v46_;\n  const T47 v47_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48>\nclass ValueArray48 {\n public:\n  ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n      T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48) : v1_(v1),\n      v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),\n      v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),\n      v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),\n      v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),\n      v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),\n      v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),\n      v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45),\n      v46_(v46), v47_(v47), v48_(v48) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),\n        static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),\n        static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_),\n        static_cast<T>(v48_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray48& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n  const T41 v41_;\n  const T42 v42_;\n  const T43 v43_;\n  const T44 v44_;\n  const T45 v45_;\n  const T46 v46_;\n  const T47 v47_;\n  const T48 v48_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49>\nclass ValueArray49 {\n public:\n  ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n      T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48,\n      T49 v49) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),\n      v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),\n      v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),\n      v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),\n      v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),\n      v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),\n      v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),\n        static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),\n        static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_),\n        static_cast<T>(v48_), static_cast<T>(v49_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray49& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n  const T41 v41_;\n  const T42 v42_;\n  const T43 v43_;\n  const T44 v44_;\n  const T45 v45_;\n  const T46 v46_;\n  const T47 v47_;\n  const T48 v48_;\n  const T49 v49_;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49, typename T50>\nclass ValueArray50 {\n public:\n  ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,\n      T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,\n      T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,\n      T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,\n      T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,\n      T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49,\n      T50 v50) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),\n      v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),\n      v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),\n      v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),\n      v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),\n      v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),\n      v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),\n      v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49), v50_(v50) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),\n        static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),\n        static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),\n        static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),\n        static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),\n        static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),\n        static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),\n        static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),\n        static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),\n        static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),\n        static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),\n        static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),\n        static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),\n        static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),\n        static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),\n        static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_),\n        static_cast<T>(v48_), static_cast<T>(v49_), static_cast<T>(v50_)};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray50& other);\n\n  const T1 v1_;\n  const T2 v2_;\n  const T3 v3_;\n  const T4 v4_;\n  const T5 v5_;\n  const T6 v6_;\n  const T7 v7_;\n  const T8 v8_;\n  const T9 v9_;\n  const T10 v10_;\n  const T11 v11_;\n  const T12 v12_;\n  const T13 v13_;\n  const T14 v14_;\n  const T15 v15_;\n  const T16 v16_;\n  const T17 v17_;\n  const T18 v18_;\n  const T19 v19_;\n  const T20 v20_;\n  const T21 v21_;\n  const T22 v22_;\n  const T23 v23_;\n  const T24 v24_;\n  const T25 v25_;\n  const T26 v26_;\n  const T27 v27_;\n  const T28 v28_;\n  const T29 v29_;\n  const T30 v30_;\n  const T31 v31_;\n  const T32 v32_;\n  const T33 v33_;\n  const T34 v34_;\n  const T35 v35_;\n  const T36 v36_;\n  const T37 v37_;\n  const T38 v38_;\n  const T39 v39_;\n  const T40 v40_;\n  const T41 v41_;\n  const T42 v42_;\n  const T43 v43_;\n  const T44 v44_;\n  const T45 v45_;\n  const T46 v46_;\n  const T47 v47_;\n  const T48 v48_;\n  const T49 v49_;\n  const T50 v50_;\n};\n\n# if GTEST_HAS_COMBINE\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Generates values from the Cartesian product of values produced\n// by the argument generators.\n//\ntemplate <typename T1, typename T2>\nclass CartesianProductGenerator2\n    : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2> > {\n public:\n  typedef ::std::tr1::tuple<T1, T2> ParamType;\n\n  CartesianProductGenerator2(const ParamGenerator<T1>& g1,\n      const ParamGenerator<T2>& g2)\n      : g1_(g1), g2_(g2) {}\n  virtual ~CartesianProductGenerator2() {}\n\n  virtual ParamIteratorInterface<ParamType>* Begin() const {\n    return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin());\n  }\n  virtual ParamIteratorInterface<ParamType>* End() const {\n    return new Iterator(this, g1_, g1_.end(), g2_, g2_.end());\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<ParamType> {\n   public:\n    Iterator(const ParamGeneratorInterface<ParamType>* base,\n      const ParamGenerator<T1>& g1,\n      const typename ParamGenerator<T1>::iterator& current1,\n      const ParamGenerator<T2>& g2,\n      const typename ParamGenerator<T2>::iterator& current2)\n        : base_(base),\n          begin1_(g1.begin()), end1_(g1.end()), current1_(current1),\n          begin2_(g2.begin()), end2_(g2.end()), current2_(current2)    {\n      ComputeCurrentValue();\n    }\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    virtual void Advance() {\n      assert(!AtEnd());\n      ++current2_;\n      if (current2_ == end2_) {\n        current2_ = begin2_;\n        ++current1_;\n      }\n      ComputeCurrentValue();\n    }\n    virtual ParamIteratorInterface<ParamType>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const ParamType* Current() const { return &current_value_; }\n    virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const Iterator* typed_other =\n          CheckedDowncastToActualType<const Iterator>(&other);\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      return (AtEnd() && typed_other->AtEnd()) ||\n         (\n          current1_ == typed_other->current1_ &&\n          current2_ == typed_other->current2_);\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : base_(other.base_),\n        begin1_(other.begin1_),\n        end1_(other.end1_),\n        current1_(other.current1_),\n        begin2_(other.begin2_),\n        end2_(other.end2_),\n        current2_(other.current2_) {\n      ComputeCurrentValue();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = ParamType(*current1_, *current2_);\n    }\n    bool AtEnd() const {\n      // We must report iterator past the end of the range when either of the\n      // component iterators has reached the end of its range.\n      return\n          current1_ == end1_ ||\n          current2_ == end2_;\n    }\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.\n    // current[i]_ is the actual traversing iterator.\n    const typename ParamGenerator<T1>::iterator begin1_;\n    const typename ParamGenerator<T1>::iterator end1_;\n    typename ParamGenerator<T1>::iterator current1_;\n    const typename ParamGenerator<T2>::iterator begin2_;\n    const typename ParamGenerator<T2>::iterator end2_;\n    typename ParamGenerator<T2>::iterator current2_;\n    ParamType current_value_;\n  };  // class CartesianProductGenerator2::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductGenerator2& other);\n\n  const ParamGenerator<T1> g1_;\n  const ParamGenerator<T2> g2_;\n};  // class CartesianProductGenerator2\n\n\ntemplate <typename T1, typename T2, typename T3>\nclass CartesianProductGenerator3\n    : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3> > {\n public:\n  typedef ::std::tr1::tuple<T1, T2, T3> ParamType;\n\n  CartesianProductGenerator3(const ParamGenerator<T1>& g1,\n      const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3)\n      : g1_(g1), g2_(g2), g3_(g3) {}\n  virtual ~CartesianProductGenerator3() {}\n\n  virtual ParamIteratorInterface<ParamType>* Begin() const {\n    return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,\n        g3_.begin());\n  }\n  virtual ParamIteratorInterface<ParamType>* End() const {\n    return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end());\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<ParamType> {\n   public:\n    Iterator(const ParamGeneratorInterface<ParamType>* base,\n      const ParamGenerator<T1>& g1,\n      const typename ParamGenerator<T1>::iterator& current1,\n      const ParamGenerator<T2>& g2,\n      const typename ParamGenerator<T2>::iterator& current2,\n      const ParamGenerator<T3>& g3,\n      const typename ParamGenerator<T3>::iterator& current3)\n        : base_(base),\n          begin1_(g1.begin()), end1_(g1.end()), current1_(current1),\n          begin2_(g2.begin()), end2_(g2.end()), current2_(current2),\n          begin3_(g3.begin()), end3_(g3.end()), current3_(current3)    {\n      ComputeCurrentValue();\n    }\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    virtual void Advance() {\n      assert(!AtEnd());\n      ++current3_;\n      if (current3_ == end3_) {\n        current3_ = begin3_;\n        ++current2_;\n      }\n      if (current2_ == end2_) {\n        current2_ = begin2_;\n        ++current1_;\n      }\n      ComputeCurrentValue();\n    }\n    virtual ParamIteratorInterface<ParamType>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const ParamType* Current() const { return &current_value_; }\n    virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const Iterator* typed_other =\n          CheckedDowncastToActualType<const Iterator>(&other);\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      return (AtEnd() && typed_other->AtEnd()) ||\n         (\n          current1_ == typed_other->current1_ &&\n          current2_ == typed_other->current2_ &&\n          current3_ == typed_other->current3_);\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : base_(other.base_),\n        begin1_(other.begin1_),\n        end1_(other.end1_),\n        current1_(other.current1_),\n        begin2_(other.begin2_),\n        end2_(other.end2_),\n        current2_(other.current2_),\n        begin3_(other.begin3_),\n        end3_(other.end3_),\n        current3_(other.current3_) {\n      ComputeCurrentValue();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = ParamType(*current1_, *current2_, *current3_);\n    }\n    bool AtEnd() const {\n      // We must report iterator past the end of the range when either of the\n      // component iterators has reached the end of its range.\n      return\n          current1_ == end1_ ||\n          current2_ == end2_ ||\n          current3_ == end3_;\n    }\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.\n    // current[i]_ is the actual traversing iterator.\n    const typename ParamGenerator<T1>::iterator begin1_;\n    const typename ParamGenerator<T1>::iterator end1_;\n    typename ParamGenerator<T1>::iterator current1_;\n    const typename ParamGenerator<T2>::iterator begin2_;\n    const typename ParamGenerator<T2>::iterator end2_;\n    typename ParamGenerator<T2>::iterator current2_;\n    const typename ParamGenerator<T3>::iterator begin3_;\n    const typename ParamGenerator<T3>::iterator end3_;\n    typename ParamGenerator<T3>::iterator current3_;\n    ParamType current_value_;\n  };  // class CartesianProductGenerator3::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductGenerator3& other);\n\n  const ParamGenerator<T1> g1_;\n  const ParamGenerator<T2> g2_;\n  const ParamGenerator<T3> g3_;\n};  // class CartesianProductGenerator3\n\n\ntemplate <typename T1, typename T2, typename T3, typename T4>\nclass CartesianProductGenerator4\n    : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4> > {\n public:\n  typedef ::std::tr1::tuple<T1, T2, T3, T4> ParamType;\n\n  CartesianProductGenerator4(const ParamGenerator<T1>& g1,\n      const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,\n      const ParamGenerator<T4>& g4)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}\n  virtual ~CartesianProductGenerator4() {}\n\n  virtual ParamIteratorInterface<ParamType>* Begin() const {\n    return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,\n        g3_.begin(), g4_, g4_.begin());\n  }\n  virtual ParamIteratorInterface<ParamType>* End() const {\n    return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),\n        g4_, g4_.end());\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<ParamType> {\n   public:\n    Iterator(const ParamGeneratorInterface<ParamType>* base,\n      const ParamGenerator<T1>& g1,\n      const typename ParamGenerator<T1>::iterator& current1,\n      const ParamGenerator<T2>& g2,\n      const typename ParamGenerator<T2>::iterator& current2,\n      const ParamGenerator<T3>& g3,\n      const typename ParamGenerator<T3>::iterator& current3,\n      const ParamGenerator<T4>& g4,\n      const typename ParamGenerator<T4>::iterator& current4)\n        : base_(base),\n          begin1_(g1.begin()), end1_(g1.end()), current1_(current1),\n          begin2_(g2.begin()), end2_(g2.end()), current2_(current2),\n          begin3_(g3.begin()), end3_(g3.end()), current3_(current3),\n          begin4_(g4.begin()), end4_(g4.end()), current4_(current4)    {\n      ComputeCurrentValue();\n    }\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    virtual void Advance() {\n      assert(!AtEnd());\n      ++current4_;\n      if (current4_ == end4_) {\n        current4_ = begin4_;\n        ++current3_;\n      }\n      if (current3_ == end3_) {\n        current3_ = begin3_;\n        ++current2_;\n      }\n      if (current2_ == end2_) {\n        current2_ = begin2_;\n        ++current1_;\n      }\n      ComputeCurrentValue();\n    }\n    virtual ParamIteratorInterface<ParamType>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const ParamType* Current() const { return &current_value_; }\n    virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const Iterator* typed_other =\n          CheckedDowncastToActualType<const Iterator>(&other);\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      return (AtEnd() && typed_other->AtEnd()) ||\n         (\n          current1_ == typed_other->current1_ &&\n          current2_ == typed_other->current2_ &&\n          current3_ == typed_other->current3_ &&\n          current4_ == typed_other->current4_);\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : base_(other.base_),\n        begin1_(other.begin1_),\n        end1_(other.end1_),\n        current1_(other.current1_),\n        begin2_(other.begin2_),\n        end2_(other.end2_),\n        current2_(other.current2_),\n        begin3_(other.begin3_),\n        end3_(other.end3_),\n        current3_(other.current3_),\n        begin4_(other.begin4_),\n        end4_(other.end4_),\n        current4_(other.current4_) {\n      ComputeCurrentValue();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = ParamType(*current1_, *current2_, *current3_,\n            *current4_);\n    }\n    bool AtEnd() const {\n      // We must report iterator past the end of the range when either of the\n      // component iterators has reached the end of its range.\n      return\n          current1_ == end1_ ||\n          current2_ == end2_ ||\n          current3_ == end3_ ||\n          current4_ == end4_;\n    }\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.\n    // current[i]_ is the actual traversing iterator.\n    const typename ParamGenerator<T1>::iterator begin1_;\n    const typename ParamGenerator<T1>::iterator end1_;\n    typename ParamGenerator<T1>::iterator current1_;\n    const typename ParamGenerator<T2>::iterator begin2_;\n    const typename ParamGenerator<T2>::iterator end2_;\n    typename ParamGenerator<T2>::iterator current2_;\n    const typename ParamGenerator<T3>::iterator begin3_;\n    const typename ParamGenerator<T3>::iterator end3_;\n    typename ParamGenerator<T3>::iterator current3_;\n    const typename ParamGenerator<T4>::iterator begin4_;\n    const typename ParamGenerator<T4>::iterator end4_;\n    typename ParamGenerator<T4>::iterator current4_;\n    ParamType current_value_;\n  };  // class CartesianProductGenerator4::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductGenerator4& other);\n\n  const ParamGenerator<T1> g1_;\n  const ParamGenerator<T2> g2_;\n  const ParamGenerator<T3> g3_;\n  const ParamGenerator<T4> g4_;\n};  // class CartesianProductGenerator4\n\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5>\nclass CartesianProductGenerator5\n    : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5> > {\n public:\n  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5> ParamType;\n\n  CartesianProductGenerator5(const ParamGenerator<T1>& g1,\n      const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,\n      const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}\n  virtual ~CartesianProductGenerator5() {}\n\n  virtual ParamIteratorInterface<ParamType>* Begin() const {\n    return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,\n        g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin());\n  }\n  virtual ParamIteratorInterface<ParamType>* End() const {\n    return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),\n        g4_, g4_.end(), g5_, g5_.end());\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<ParamType> {\n   public:\n    Iterator(const ParamGeneratorInterface<ParamType>* base,\n      const ParamGenerator<T1>& g1,\n      const typename ParamGenerator<T1>::iterator& current1,\n      const ParamGenerator<T2>& g2,\n      const typename ParamGenerator<T2>::iterator& current2,\n      const ParamGenerator<T3>& g3,\n      const typename ParamGenerator<T3>::iterator& current3,\n      const ParamGenerator<T4>& g4,\n      const typename ParamGenerator<T4>::iterator& current4,\n      const ParamGenerator<T5>& g5,\n      const typename ParamGenerator<T5>::iterator& current5)\n        : base_(base),\n          begin1_(g1.begin()), end1_(g1.end()), current1_(current1),\n          begin2_(g2.begin()), end2_(g2.end()), current2_(current2),\n          begin3_(g3.begin()), end3_(g3.end()), current3_(current3),\n          begin4_(g4.begin()), end4_(g4.end()), current4_(current4),\n          begin5_(g5.begin()), end5_(g5.end()), current5_(current5)    {\n      ComputeCurrentValue();\n    }\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    virtual void Advance() {\n      assert(!AtEnd());\n      ++current5_;\n      if (current5_ == end5_) {\n        current5_ = begin5_;\n        ++current4_;\n      }\n      if (current4_ == end4_) {\n        current4_ = begin4_;\n        ++current3_;\n      }\n      if (current3_ == end3_) {\n        current3_ = begin3_;\n        ++current2_;\n      }\n      if (current2_ == end2_) {\n        current2_ = begin2_;\n        ++current1_;\n      }\n      ComputeCurrentValue();\n    }\n    virtual ParamIteratorInterface<ParamType>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const ParamType* Current() const { return &current_value_; }\n    virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const Iterator* typed_other =\n          CheckedDowncastToActualType<const Iterator>(&other);\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      return (AtEnd() && typed_other->AtEnd()) ||\n         (\n          current1_ == typed_other->current1_ &&\n          current2_ == typed_other->current2_ &&\n          current3_ == typed_other->current3_ &&\n          current4_ == typed_other->current4_ &&\n          current5_ == typed_other->current5_);\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : base_(other.base_),\n        begin1_(other.begin1_),\n        end1_(other.end1_),\n        current1_(other.current1_),\n        begin2_(other.begin2_),\n        end2_(other.end2_),\n        current2_(other.current2_),\n        begin3_(other.begin3_),\n        end3_(other.end3_),\n        current3_(other.current3_),\n        begin4_(other.begin4_),\n        end4_(other.end4_),\n        current4_(other.current4_),\n        begin5_(other.begin5_),\n        end5_(other.end5_),\n        current5_(other.current5_) {\n      ComputeCurrentValue();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = ParamType(*current1_, *current2_, *current3_,\n            *current4_, *current5_);\n    }\n    bool AtEnd() const {\n      // We must report iterator past the end of the range when either of the\n      // component iterators has reached the end of its range.\n      return\n          current1_ == end1_ ||\n          current2_ == end2_ ||\n          current3_ == end3_ ||\n          current4_ == end4_ ||\n          current5_ == end5_;\n    }\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.\n    // current[i]_ is the actual traversing iterator.\n    const typename ParamGenerator<T1>::iterator begin1_;\n    const typename ParamGenerator<T1>::iterator end1_;\n    typename ParamGenerator<T1>::iterator current1_;\n    const typename ParamGenerator<T2>::iterator begin2_;\n    const typename ParamGenerator<T2>::iterator end2_;\n    typename ParamGenerator<T2>::iterator current2_;\n    const typename ParamGenerator<T3>::iterator begin3_;\n    const typename ParamGenerator<T3>::iterator end3_;\n    typename ParamGenerator<T3>::iterator current3_;\n    const typename ParamGenerator<T4>::iterator begin4_;\n    const typename ParamGenerator<T4>::iterator end4_;\n    typename ParamGenerator<T4>::iterator current4_;\n    const typename ParamGenerator<T5>::iterator begin5_;\n    const typename ParamGenerator<T5>::iterator end5_;\n    typename ParamGenerator<T5>::iterator current5_;\n    ParamType current_value_;\n  };  // class CartesianProductGenerator5::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductGenerator5& other);\n\n  const ParamGenerator<T1> g1_;\n  const ParamGenerator<T2> g2_;\n  const ParamGenerator<T3> g3_;\n  const ParamGenerator<T4> g4_;\n  const ParamGenerator<T5> g5_;\n};  // class CartesianProductGenerator5\n\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6>\nclass CartesianProductGenerator6\n    : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5,\n        T6> > {\n public:\n  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> ParamType;\n\n  CartesianProductGenerator6(const ParamGenerator<T1>& g1,\n      const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,\n      const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,\n      const ParamGenerator<T6>& g6)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}\n  virtual ~CartesianProductGenerator6() {}\n\n  virtual ParamIteratorInterface<ParamType>* Begin() const {\n    return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,\n        g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin());\n  }\n  virtual ParamIteratorInterface<ParamType>* End() const {\n    return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),\n        g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end());\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<ParamType> {\n   public:\n    Iterator(const ParamGeneratorInterface<ParamType>* base,\n      const ParamGenerator<T1>& g1,\n      const typename ParamGenerator<T1>::iterator& current1,\n      const ParamGenerator<T2>& g2,\n      const typename ParamGenerator<T2>::iterator& current2,\n      const ParamGenerator<T3>& g3,\n      const typename ParamGenerator<T3>::iterator& current3,\n      const ParamGenerator<T4>& g4,\n      const typename ParamGenerator<T4>::iterator& current4,\n      const ParamGenerator<T5>& g5,\n      const typename ParamGenerator<T5>::iterator& current5,\n      const ParamGenerator<T6>& g6,\n      const typename ParamGenerator<T6>::iterator& current6)\n        : base_(base),\n          begin1_(g1.begin()), end1_(g1.end()), current1_(current1),\n          begin2_(g2.begin()), end2_(g2.end()), current2_(current2),\n          begin3_(g3.begin()), end3_(g3.end()), current3_(current3),\n          begin4_(g4.begin()), end4_(g4.end()), current4_(current4),\n          begin5_(g5.begin()), end5_(g5.end()), current5_(current5),\n          begin6_(g6.begin()), end6_(g6.end()), current6_(current6)    {\n      ComputeCurrentValue();\n    }\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    virtual void Advance() {\n      assert(!AtEnd());\n      ++current6_;\n      if (current6_ == end6_) {\n        current6_ = begin6_;\n        ++current5_;\n      }\n      if (current5_ == end5_) {\n        current5_ = begin5_;\n        ++current4_;\n      }\n      if (current4_ == end4_) {\n        current4_ = begin4_;\n        ++current3_;\n      }\n      if (current3_ == end3_) {\n        current3_ = begin3_;\n        ++current2_;\n      }\n      if (current2_ == end2_) {\n        current2_ = begin2_;\n        ++current1_;\n      }\n      ComputeCurrentValue();\n    }\n    virtual ParamIteratorInterface<ParamType>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const ParamType* Current() const { return &current_value_; }\n    virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const Iterator* typed_other =\n          CheckedDowncastToActualType<const Iterator>(&other);\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      return (AtEnd() && typed_other->AtEnd()) ||\n         (\n          current1_ == typed_other->current1_ &&\n          current2_ == typed_other->current2_ &&\n          current3_ == typed_other->current3_ &&\n          current4_ == typed_other->current4_ &&\n          current5_ == typed_other->current5_ &&\n          current6_ == typed_other->current6_);\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : base_(other.base_),\n        begin1_(other.begin1_),\n        end1_(other.end1_),\n        current1_(other.current1_),\n        begin2_(other.begin2_),\n        end2_(other.end2_),\n        current2_(other.current2_),\n        begin3_(other.begin3_),\n        end3_(other.end3_),\n        current3_(other.current3_),\n        begin4_(other.begin4_),\n        end4_(other.end4_),\n        current4_(other.current4_),\n        begin5_(other.begin5_),\n        end5_(other.end5_),\n        current5_(other.current5_),\n        begin6_(other.begin6_),\n        end6_(other.end6_),\n        current6_(other.current6_) {\n      ComputeCurrentValue();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = ParamType(*current1_, *current2_, *current3_,\n            *current4_, *current5_, *current6_);\n    }\n    bool AtEnd() const {\n      // We must report iterator past the end of the range when either of the\n      // component iterators has reached the end of its range.\n      return\n          current1_ == end1_ ||\n          current2_ == end2_ ||\n          current3_ == end3_ ||\n          current4_ == end4_ ||\n          current5_ == end5_ ||\n          current6_ == end6_;\n    }\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.\n    // current[i]_ is the actual traversing iterator.\n    const typename ParamGenerator<T1>::iterator begin1_;\n    const typename ParamGenerator<T1>::iterator end1_;\n    typename ParamGenerator<T1>::iterator current1_;\n    const typename ParamGenerator<T2>::iterator begin2_;\n    const typename ParamGenerator<T2>::iterator end2_;\n    typename ParamGenerator<T2>::iterator current2_;\n    const typename ParamGenerator<T3>::iterator begin3_;\n    const typename ParamGenerator<T3>::iterator end3_;\n    typename ParamGenerator<T3>::iterator current3_;\n    const typename ParamGenerator<T4>::iterator begin4_;\n    const typename ParamGenerator<T4>::iterator end4_;\n    typename ParamGenerator<T4>::iterator current4_;\n    const typename ParamGenerator<T5>::iterator begin5_;\n    const typename ParamGenerator<T5>::iterator end5_;\n    typename ParamGenerator<T5>::iterator current5_;\n    const typename ParamGenerator<T6>::iterator begin6_;\n    const typename ParamGenerator<T6>::iterator end6_;\n    typename ParamGenerator<T6>::iterator current6_;\n    ParamType current_value_;\n  };  // class CartesianProductGenerator6::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductGenerator6& other);\n\n  const ParamGenerator<T1> g1_;\n  const ParamGenerator<T2> g2_;\n  const ParamGenerator<T3> g3_;\n  const ParamGenerator<T4> g4_;\n  const ParamGenerator<T5> g5_;\n  const ParamGenerator<T6> g6_;\n};  // class CartesianProductGenerator6\n\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7>\nclass CartesianProductGenerator7\n    : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,\n        T7> > {\n public:\n  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType;\n\n  CartesianProductGenerator7(const ParamGenerator<T1>& g1,\n      const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,\n      const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,\n      const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}\n  virtual ~CartesianProductGenerator7() {}\n\n  virtual ParamIteratorInterface<ParamType>* Begin() const {\n    return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,\n        g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,\n        g7_.begin());\n  }\n  virtual ParamIteratorInterface<ParamType>* End() const {\n    return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),\n        g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end());\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<ParamType> {\n   public:\n    Iterator(const ParamGeneratorInterface<ParamType>* base,\n      const ParamGenerator<T1>& g1,\n      const typename ParamGenerator<T1>::iterator& current1,\n      const ParamGenerator<T2>& g2,\n      const typename ParamGenerator<T2>::iterator& current2,\n      const ParamGenerator<T3>& g3,\n      const typename ParamGenerator<T3>::iterator& current3,\n      const ParamGenerator<T4>& g4,\n      const typename ParamGenerator<T4>::iterator& current4,\n      const ParamGenerator<T5>& g5,\n      const typename ParamGenerator<T5>::iterator& current5,\n      const ParamGenerator<T6>& g6,\n      const typename ParamGenerator<T6>::iterator& current6,\n      const ParamGenerator<T7>& g7,\n      const typename ParamGenerator<T7>::iterator& current7)\n        : base_(base),\n          begin1_(g1.begin()), end1_(g1.end()), current1_(current1),\n          begin2_(g2.begin()), end2_(g2.end()), current2_(current2),\n          begin3_(g3.begin()), end3_(g3.end()), current3_(current3),\n          begin4_(g4.begin()), end4_(g4.end()), current4_(current4),\n          begin5_(g5.begin()), end5_(g5.end()), current5_(current5),\n          begin6_(g6.begin()), end6_(g6.end()), current6_(current6),\n          begin7_(g7.begin()), end7_(g7.end()), current7_(current7)    {\n      ComputeCurrentValue();\n    }\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    virtual void Advance() {\n      assert(!AtEnd());\n      ++current7_;\n      if (current7_ == end7_) {\n        current7_ = begin7_;\n        ++current6_;\n      }\n      if (current6_ == end6_) {\n        current6_ = begin6_;\n        ++current5_;\n      }\n      if (current5_ == end5_) {\n        current5_ = begin5_;\n        ++current4_;\n      }\n      if (current4_ == end4_) {\n        current4_ = begin4_;\n        ++current3_;\n      }\n      if (current3_ == end3_) {\n        current3_ = begin3_;\n        ++current2_;\n      }\n      if (current2_ == end2_) {\n        current2_ = begin2_;\n        ++current1_;\n      }\n      ComputeCurrentValue();\n    }\n    virtual ParamIteratorInterface<ParamType>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const ParamType* Current() const { return &current_value_; }\n    virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const Iterator* typed_other =\n          CheckedDowncastToActualType<const Iterator>(&other);\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      return (AtEnd() && typed_other->AtEnd()) ||\n         (\n          current1_ == typed_other->current1_ &&\n          current2_ == typed_other->current2_ &&\n          current3_ == typed_other->current3_ &&\n          current4_ == typed_other->current4_ &&\n          current5_ == typed_other->current5_ &&\n          current6_ == typed_other->current6_ &&\n          current7_ == typed_other->current7_);\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : base_(other.base_),\n        begin1_(other.begin1_),\n        end1_(other.end1_),\n        current1_(other.current1_),\n        begin2_(other.begin2_),\n        end2_(other.end2_),\n        current2_(other.current2_),\n        begin3_(other.begin3_),\n        end3_(other.end3_),\n        current3_(other.current3_),\n        begin4_(other.begin4_),\n        end4_(other.end4_),\n        current4_(other.current4_),\n        begin5_(other.begin5_),\n        end5_(other.end5_),\n        current5_(other.current5_),\n        begin6_(other.begin6_),\n        end6_(other.end6_),\n        current6_(other.current6_),\n        begin7_(other.begin7_),\n        end7_(other.end7_),\n        current7_(other.current7_) {\n      ComputeCurrentValue();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = ParamType(*current1_, *current2_, *current3_,\n            *current4_, *current5_, *current6_, *current7_);\n    }\n    bool AtEnd() const {\n      // We must report iterator past the end of the range when either of the\n      // component iterators has reached the end of its range.\n      return\n          current1_ == end1_ ||\n          current2_ == end2_ ||\n          current3_ == end3_ ||\n          current4_ == end4_ ||\n          current5_ == end5_ ||\n          current6_ == end6_ ||\n          current7_ == end7_;\n    }\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.\n    // current[i]_ is the actual traversing iterator.\n    const typename ParamGenerator<T1>::iterator begin1_;\n    const typename ParamGenerator<T1>::iterator end1_;\n    typename ParamGenerator<T1>::iterator current1_;\n    const typename ParamGenerator<T2>::iterator begin2_;\n    const typename ParamGenerator<T2>::iterator end2_;\n    typename ParamGenerator<T2>::iterator current2_;\n    const typename ParamGenerator<T3>::iterator begin3_;\n    const typename ParamGenerator<T3>::iterator end3_;\n    typename ParamGenerator<T3>::iterator current3_;\n    const typename ParamGenerator<T4>::iterator begin4_;\n    const typename ParamGenerator<T4>::iterator end4_;\n    typename ParamGenerator<T4>::iterator current4_;\n    const typename ParamGenerator<T5>::iterator begin5_;\n    const typename ParamGenerator<T5>::iterator end5_;\n    typename ParamGenerator<T5>::iterator current5_;\n    const typename ParamGenerator<T6>::iterator begin6_;\n    const typename ParamGenerator<T6>::iterator end6_;\n    typename ParamGenerator<T6>::iterator current6_;\n    const typename ParamGenerator<T7>::iterator begin7_;\n    const typename ParamGenerator<T7>::iterator end7_;\n    typename ParamGenerator<T7>::iterator current7_;\n    ParamType current_value_;\n  };  // class CartesianProductGenerator7::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductGenerator7& other);\n\n  const ParamGenerator<T1> g1_;\n  const ParamGenerator<T2> g2_;\n  const ParamGenerator<T3> g3_;\n  const ParamGenerator<T4> g4_;\n  const ParamGenerator<T5> g5_;\n  const ParamGenerator<T6> g6_;\n  const ParamGenerator<T7> g7_;\n};  // class CartesianProductGenerator7\n\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8>\nclass CartesianProductGenerator8\n    : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,\n        T7, T8> > {\n public:\n  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType;\n\n  CartesianProductGenerator8(const ParamGenerator<T1>& g1,\n      const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,\n      const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,\n      const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,\n      const ParamGenerator<T8>& g8)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),\n          g8_(g8) {}\n  virtual ~CartesianProductGenerator8() {}\n\n  virtual ParamIteratorInterface<ParamType>* Begin() const {\n    return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,\n        g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,\n        g7_.begin(), g8_, g8_.begin());\n  }\n  virtual ParamIteratorInterface<ParamType>* End() const {\n    return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),\n        g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,\n        g8_.end());\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<ParamType> {\n   public:\n    Iterator(const ParamGeneratorInterface<ParamType>* base,\n      const ParamGenerator<T1>& g1,\n      const typename ParamGenerator<T1>::iterator& current1,\n      const ParamGenerator<T2>& g2,\n      const typename ParamGenerator<T2>::iterator& current2,\n      const ParamGenerator<T3>& g3,\n      const typename ParamGenerator<T3>::iterator& current3,\n      const ParamGenerator<T4>& g4,\n      const typename ParamGenerator<T4>::iterator& current4,\n      const ParamGenerator<T5>& g5,\n      const typename ParamGenerator<T5>::iterator& current5,\n      const ParamGenerator<T6>& g6,\n      const typename ParamGenerator<T6>::iterator& current6,\n      const ParamGenerator<T7>& g7,\n      const typename ParamGenerator<T7>::iterator& current7,\n      const ParamGenerator<T8>& g8,\n      const typename ParamGenerator<T8>::iterator& current8)\n        : base_(base),\n          begin1_(g1.begin()), end1_(g1.end()), current1_(current1),\n          begin2_(g2.begin()), end2_(g2.end()), current2_(current2),\n          begin3_(g3.begin()), end3_(g3.end()), current3_(current3),\n          begin4_(g4.begin()), end4_(g4.end()), current4_(current4),\n          begin5_(g5.begin()), end5_(g5.end()), current5_(current5),\n          begin6_(g6.begin()), end6_(g6.end()), current6_(current6),\n          begin7_(g7.begin()), end7_(g7.end()), current7_(current7),\n          begin8_(g8.begin()), end8_(g8.end()), current8_(current8)    {\n      ComputeCurrentValue();\n    }\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    virtual void Advance() {\n      assert(!AtEnd());\n      ++current8_;\n      if (current8_ == end8_) {\n        current8_ = begin8_;\n        ++current7_;\n      }\n      if (current7_ == end7_) {\n        current7_ = begin7_;\n        ++current6_;\n      }\n      if (current6_ == end6_) {\n        current6_ = begin6_;\n        ++current5_;\n      }\n      if (current5_ == end5_) {\n        current5_ = begin5_;\n        ++current4_;\n      }\n      if (current4_ == end4_) {\n        current4_ = begin4_;\n        ++current3_;\n      }\n      if (current3_ == end3_) {\n        current3_ = begin3_;\n        ++current2_;\n      }\n      if (current2_ == end2_) {\n        current2_ = begin2_;\n        ++current1_;\n      }\n      ComputeCurrentValue();\n    }\n    virtual ParamIteratorInterface<ParamType>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const ParamType* Current() const { return &current_value_; }\n    virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const Iterator* typed_other =\n          CheckedDowncastToActualType<const Iterator>(&other);\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      return (AtEnd() && typed_other->AtEnd()) ||\n         (\n          current1_ == typed_other->current1_ &&\n          current2_ == typed_other->current2_ &&\n          current3_ == typed_other->current3_ &&\n          current4_ == typed_other->current4_ &&\n          current5_ == typed_other->current5_ &&\n          current6_ == typed_other->current6_ &&\n          current7_ == typed_other->current7_ &&\n          current8_ == typed_other->current8_);\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : base_(other.base_),\n        begin1_(other.begin1_),\n        end1_(other.end1_),\n        current1_(other.current1_),\n        begin2_(other.begin2_),\n        end2_(other.end2_),\n        current2_(other.current2_),\n        begin3_(other.begin3_),\n        end3_(other.end3_),\n        current3_(other.current3_),\n        begin4_(other.begin4_),\n        end4_(other.end4_),\n        current4_(other.current4_),\n        begin5_(other.begin5_),\n        end5_(other.end5_),\n        current5_(other.current5_),\n        begin6_(other.begin6_),\n        end6_(other.end6_),\n        current6_(other.current6_),\n        begin7_(other.begin7_),\n        end7_(other.end7_),\n        current7_(other.current7_),\n        begin8_(other.begin8_),\n        end8_(other.end8_),\n        current8_(other.current8_) {\n      ComputeCurrentValue();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = ParamType(*current1_, *current2_, *current3_,\n            *current4_, *current5_, *current6_, *current7_, *current8_);\n    }\n    bool AtEnd() const {\n      // We must report iterator past the end of the range when either of the\n      // component iterators has reached the end of its range.\n      return\n          current1_ == end1_ ||\n          current2_ == end2_ ||\n          current3_ == end3_ ||\n          current4_ == end4_ ||\n          current5_ == end5_ ||\n          current6_ == end6_ ||\n          current7_ == end7_ ||\n          current8_ == end8_;\n    }\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.\n    // current[i]_ is the actual traversing iterator.\n    const typename ParamGenerator<T1>::iterator begin1_;\n    const typename ParamGenerator<T1>::iterator end1_;\n    typename ParamGenerator<T1>::iterator current1_;\n    const typename ParamGenerator<T2>::iterator begin2_;\n    const typename ParamGenerator<T2>::iterator end2_;\n    typename ParamGenerator<T2>::iterator current2_;\n    const typename ParamGenerator<T3>::iterator begin3_;\n    const typename ParamGenerator<T3>::iterator end3_;\n    typename ParamGenerator<T3>::iterator current3_;\n    const typename ParamGenerator<T4>::iterator begin4_;\n    const typename ParamGenerator<T4>::iterator end4_;\n    typename ParamGenerator<T4>::iterator current4_;\n    const typename ParamGenerator<T5>::iterator begin5_;\n    const typename ParamGenerator<T5>::iterator end5_;\n    typename ParamGenerator<T5>::iterator current5_;\n    const typename ParamGenerator<T6>::iterator begin6_;\n    const typename ParamGenerator<T6>::iterator end6_;\n    typename ParamGenerator<T6>::iterator current6_;\n    const typename ParamGenerator<T7>::iterator begin7_;\n    const typename ParamGenerator<T7>::iterator end7_;\n    typename ParamGenerator<T7>::iterator current7_;\n    const typename ParamGenerator<T8>::iterator begin8_;\n    const typename ParamGenerator<T8>::iterator end8_;\n    typename ParamGenerator<T8>::iterator current8_;\n    ParamType current_value_;\n  };  // class CartesianProductGenerator8::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductGenerator8& other);\n\n  const ParamGenerator<T1> g1_;\n  const ParamGenerator<T2> g2_;\n  const ParamGenerator<T3> g3_;\n  const ParamGenerator<T4> g4_;\n  const ParamGenerator<T5> g5_;\n  const ParamGenerator<T6> g6_;\n  const ParamGenerator<T7> g7_;\n  const ParamGenerator<T8> g8_;\n};  // class CartesianProductGenerator8\n\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9>\nclass CartesianProductGenerator9\n    : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,\n        T7, T8, T9> > {\n public:\n  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType;\n\n  CartesianProductGenerator9(const ParamGenerator<T1>& g1,\n      const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,\n      const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,\n      const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,\n      const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),\n          g9_(g9) {}\n  virtual ~CartesianProductGenerator9() {}\n\n  virtual ParamIteratorInterface<ParamType>* Begin() const {\n    return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,\n        g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,\n        g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin());\n  }\n  virtual ParamIteratorInterface<ParamType>* End() const {\n    return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),\n        g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,\n        g8_.end(), g9_, g9_.end());\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<ParamType> {\n   public:\n    Iterator(const ParamGeneratorInterface<ParamType>* base,\n      const ParamGenerator<T1>& g1,\n      const typename ParamGenerator<T1>::iterator& current1,\n      const ParamGenerator<T2>& g2,\n      const typename ParamGenerator<T2>::iterator& current2,\n      const ParamGenerator<T3>& g3,\n      const typename ParamGenerator<T3>::iterator& current3,\n      const ParamGenerator<T4>& g4,\n      const typename ParamGenerator<T4>::iterator& current4,\n      const ParamGenerator<T5>& g5,\n      const typename ParamGenerator<T5>::iterator& current5,\n      const ParamGenerator<T6>& g6,\n      const typename ParamGenerator<T6>::iterator& current6,\n      const ParamGenerator<T7>& g7,\n      const typename ParamGenerator<T7>::iterator& current7,\n      const ParamGenerator<T8>& g8,\n      const typename ParamGenerator<T8>::iterator& current8,\n      const ParamGenerator<T9>& g9,\n      const typename ParamGenerator<T9>::iterator& current9)\n        : base_(base),\n          begin1_(g1.begin()), end1_(g1.end()), current1_(current1),\n          begin2_(g2.begin()), end2_(g2.end()), current2_(current2),\n          begin3_(g3.begin()), end3_(g3.end()), current3_(current3),\n          begin4_(g4.begin()), end4_(g4.end()), current4_(current4),\n          begin5_(g5.begin()), end5_(g5.end()), current5_(current5),\n          begin6_(g6.begin()), end6_(g6.end()), current6_(current6),\n          begin7_(g7.begin()), end7_(g7.end()), current7_(current7),\n          begin8_(g8.begin()), end8_(g8.end()), current8_(current8),\n          begin9_(g9.begin()), end9_(g9.end()), current9_(current9)    {\n      ComputeCurrentValue();\n    }\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    virtual void Advance() {\n      assert(!AtEnd());\n      ++current9_;\n      if (current9_ == end9_) {\n        current9_ = begin9_;\n        ++current8_;\n      }\n      if (current8_ == end8_) {\n        current8_ = begin8_;\n        ++current7_;\n      }\n      if (current7_ == end7_) {\n        current7_ = begin7_;\n        ++current6_;\n      }\n      if (current6_ == end6_) {\n        current6_ = begin6_;\n        ++current5_;\n      }\n      if (current5_ == end5_) {\n        current5_ = begin5_;\n        ++current4_;\n      }\n      if (current4_ == end4_) {\n        current4_ = begin4_;\n        ++current3_;\n      }\n      if (current3_ == end3_) {\n        current3_ = begin3_;\n        ++current2_;\n      }\n      if (current2_ == end2_) {\n        current2_ = begin2_;\n        ++current1_;\n      }\n      ComputeCurrentValue();\n    }\n    virtual ParamIteratorInterface<ParamType>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const ParamType* Current() const { return &current_value_; }\n    virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const Iterator* typed_other =\n          CheckedDowncastToActualType<const Iterator>(&other);\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      return (AtEnd() && typed_other->AtEnd()) ||\n         (\n          current1_ == typed_other->current1_ &&\n          current2_ == typed_other->current2_ &&\n          current3_ == typed_other->current3_ &&\n          current4_ == typed_other->current4_ &&\n          current5_ == typed_other->current5_ &&\n          current6_ == typed_other->current6_ &&\n          current7_ == typed_other->current7_ &&\n          current8_ == typed_other->current8_ &&\n          current9_ == typed_other->current9_);\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : base_(other.base_),\n        begin1_(other.begin1_),\n        end1_(other.end1_),\n        current1_(other.current1_),\n        begin2_(other.begin2_),\n        end2_(other.end2_),\n        current2_(other.current2_),\n        begin3_(other.begin3_),\n        end3_(other.end3_),\n        current3_(other.current3_),\n        begin4_(other.begin4_),\n        end4_(other.end4_),\n        current4_(other.current4_),\n        begin5_(other.begin5_),\n        end5_(other.end5_),\n        current5_(other.current5_),\n        begin6_(other.begin6_),\n        end6_(other.end6_),\n        current6_(other.current6_),\n        begin7_(other.begin7_),\n        end7_(other.end7_),\n        current7_(other.current7_),\n        begin8_(other.begin8_),\n        end8_(other.end8_),\n        current8_(other.current8_),\n        begin9_(other.begin9_),\n        end9_(other.end9_),\n        current9_(other.current9_) {\n      ComputeCurrentValue();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = ParamType(*current1_, *current2_, *current3_,\n            *current4_, *current5_, *current6_, *current7_, *current8_,\n            *current9_);\n    }\n    bool AtEnd() const {\n      // We must report iterator past the end of the range when either of the\n      // component iterators has reached the end of its range.\n      return\n          current1_ == end1_ ||\n          current2_ == end2_ ||\n          current3_ == end3_ ||\n          current4_ == end4_ ||\n          current5_ == end5_ ||\n          current6_ == end6_ ||\n          current7_ == end7_ ||\n          current8_ == end8_ ||\n          current9_ == end9_;\n    }\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.\n    // current[i]_ is the actual traversing iterator.\n    const typename ParamGenerator<T1>::iterator begin1_;\n    const typename ParamGenerator<T1>::iterator end1_;\n    typename ParamGenerator<T1>::iterator current1_;\n    const typename ParamGenerator<T2>::iterator begin2_;\n    const typename ParamGenerator<T2>::iterator end2_;\n    typename ParamGenerator<T2>::iterator current2_;\n    const typename ParamGenerator<T3>::iterator begin3_;\n    const typename ParamGenerator<T3>::iterator end3_;\n    typename ParamGenerator<T3>::iterator current3_;\n    const typename ParamGenerator<T4>::iterator begin4_;\n    const typename ParamGenerator<T4>::iterator end4_;\n    typename ParamGenerator<T4>::iterator current4_;\n    const typename ParamGenerator<T5>::iterator begin5_;\n    const typename ParamGenerator<T5>::iterator end5_;\n    typename ParamGenerator<T5>::iterator current5_;\n    const typename ParamGenerator<T6>::iterator begin6_;\n    const typename ParamGenerator<T6>::iterator end6_;\n    typename ParamGenerator<T6>::iterator current6_;\n    const typename ParamGenerator<T7>::iterator begin7_;\n    const typename ParamGenerator<T7>::iterator end7_;\n    typename ParamGenerator<T7>::iterator current7_;\n    const typename ParamGenerator<T8>::iterator begin8_;\n    const typename ParamGenerator<T8>::iterator end8_;\n    typename ParamGenerator<T8>::iterator current8_;\n    const typename ParamGenerator<T9>::iterator begin9_;\n    const typename ParamGenerator<T9>::iterator end9_;\n    typename ParamGenerator<T9>::iterator current9_;\n    ParamType current_value_;\n  };  // class CartesianProductGenerator9::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductGenerator9& other);\n\n  const ParamGenerator<T1> g1_;\n  const ParamGenerator<T2> g2_;\n  const ParamGenerator<T3> g3_;\n  const ParamGenerator<T4> g4_;\n  const ParamGenerator<T5> g5_;\n  const ParamGenerator<T6> g6_;\n  const ParamGenerator<T7> g7_;\n  const ParamGenerator<T8> g8_;\n  const ParamGenerator<T9> g9_;\n};  // class CartesianProductGenerator9\n\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10>\nclass CartesianProductGenerator10\n    : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,\n        T7, T8, T9, T10> > {\n public:\n  typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType;\n\n  CartesianProductGenerator10(const ParamGenerator<T1>& g1,\n      const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,\n      const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,\n      const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,\n      const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9,\n      const ParamGenerator<T10>& g10)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),\n          g9_(g9), g10_(g10) {}\n  virtual ~CartesianProductGenerator10() {}\n\n  virtual ParamIteratorInterface<ParamType>* Begin() const {\n    return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,\n        g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,\n        g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin(), g10_, g10_.begin());\n  }\n  virtual ParamIteratorInterface<ParamType>* End() const {\n    return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),\n        g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,\n        g8_.end(), g9_, g9_.end(), g10_, g10_.end());\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<ParamType> {\n   public:\n    Iterator(const ParamGeneratorInterface<ParamType>* base,\n      const ParamGenerator<T1>& g1,\n      const typename ParamGenerator<T1>::iterator& current1,\n      const ParamGenerator<T2>& g2,\n      const typename ParamGenerator<T2>::iterator& current2,\n      const ParamGenerator<T3>& g3,\n      const typename ParamGenerator<T3>::iterator& current3,\n      const ParamGenerator<T4>& g4,\n      const typename ParamGenerator<T4>::iterator& current4,\n      const ParamGenerator<T5>& g5,\n      const typename ParamGenerator<T5>::iterator& current5,\n      const ParamGenerator<T6>& g6,\n      const typename ParamGenerator<T6>::iterator& current6,\n      const ParamGenerator<T7>& g7,\n      const typename ParamGenerator<T7>::iterator& current7,\n      const ParamGenerator<T8>& g8,\n      const typename ParamGenerator<T8>::iterator& current8,\n      const ParamGenerator<T9>& g9,\n      const typename ParamGenerator<T9>::iterator& current9,\n      const ParamGenerator<T10>& g10,\n      const typename ParamGenerator<T10>::iterator& current10)\n        : base_(base),\n          begin1_(g1.begin()), end1_(g1.end()), current1_(current1),\n          begin2_(g2.begin()), end2_(g2.end()), current2_(current2),\n          begin3_(g3.begin()), end3_(g3.end()), current3_(current3),\n          begin4_(g4.begin()), end4_(g4.end()), current4_(current4),\n          begin5_(g5.begin()), end5_(g5.end()), current5_(current5),\n          begin6_(g6.begin()), end6_(g6.end()), current6_(current6),\n          begin7_(g7.begin()), end7_(g7.end()), current7_(current7),\n          begin8_(g8.begin()), end8_(g8.end()), current8_(current8),\n          begin9_(g9.begin()), end9_(g9.end()), current9_(current9),\n          begin10_(g10.begin()), end10_(g10.end()), current10_(current10)    {\n      ComputeCurrentValue();\n    }\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    virtual void Advance() {\n      assert(!AtEnd());\n      ++current10_;\n      if (current10_ == end10_) {\n        current10_ = begin10_;\n        ++current9_;\n      }\n      if (current9_ == end9_) {\n        current9_ = begin9_;\n        ++current8_;\n      }\n      if (current8_ == end8_) {\n        current8_ = begin8_;\n        ++current7_;\n      }\n      if (current7_ == end7_) {\n        current7_ = begin7_;\n        ++current6_;\n      }\n      if (current6_ == end6_) {\n        current6_ = begin6_;\n        ++current5_;\n      }\n      if (current5_ == end5_) {\n        current5_ = begin5_;\n        ++current4_;\n      }\n      if (current4_ == end4_) {\n        current4_ = begin4_;\n        ++current3_;\n      }\n      if (current3_ == end3_) {\n        current3_ = begin3_;\n        ++current2_;\n      }\n      if (current2_ == end2_) {\n        current2_ = begin2_;\n        ++current1_;\n      }\n      ComputeCurrentValue();\n    }\n    virtual ParamIteratorInterface<ParamType>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const ParamType* Current() const { return &current_value_; }\n    virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const Iterator* typed_other =\n          CheckedDowncastToActualType<const Iterator>(&other);\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      return (AtEnd() && typed_other->AtEnd()) ||\n         (\n          current1_ == typed_other->current1_ &&\n          current2_ == typed_other->current2_ &&\n          current3_ == typed_other->current3_ &&\n          current4_ == typed_other->current4_ &&\n          current5_ == typed_other->current5_ &&\n          current6_ == typed_other->current6_ &&\n          current7_ == typed_other->current7_ &&\n          current8_ == typed_other->current8_ &&\n          current9_ == typed_other->current9_ &&\n          current10_ == typed_other->current10_);\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : base_(other.base_),\n        begin1_(other.begin1_),\n        end1_(other.end1_),\n        current1_(other.current1_),\n        begin2_(other.begin2_),\n        end2_(other.end2_),\n        current2_(other.current2_),\n        begin3_(other.begin3_),\n        end3_(other.end3_),\n        current3_(other.current3_),\n        begin4_(other.begin4_),\n        end4_(other.end4_),\n        current4_(other.current4_),\n        begin5_(other.begin5_),\n        end5_(other.end5_),\n        current5_(other.current5_),\n        begin6_(other.begin6_),\n        end6_(other.end6_),\n        current6_(other.current6_),\n        begin7_(other.begin7_),\n        end7_(other.end7_),\n        current7_(other.current7_),\n        begin8_(other.begin8_),\n        end8_(other.end8_),\n        current8_(other.current8_),\n        begin9_(other.begin9_),\n        end9_(other.end9_),\n        current9_(other.current9_),\n        begin10_(other.begin10_),\n        end10_(other.end10_),\n        current10_(other.current10_) {\n      ComputeCurrentValue();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = ParamType(*current1_, *current2_, *current3_,\n            *current4_, *current5_, *current6_, *current7_, *current8_,\n            *current9_, *current10_);\n    }\n    bool AtEnd() const {\n      // We must report iterator past the end of the range when either of the\n      // component iterators has reached the end of its range.\n      return\n          current1_ == end1_ ||\n          current2_ == end2_ ||\n          current3_ == end3_ ||\n          current4_ == end4_ ||\n          current5_ == end5_ ||\n          current6_ == end6_ ||\n          current7_ == end7_ ||\n          current8_ == end8_ ||\n          current9_ == end9_ ||\n          current10_ == end10_;\n    }\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.\n    // current[i]_ is the actual traversing iterator.\n    const typename ParamGenerator<T1>::iterator begin1_;\n    const typename ParamGenerator<T1>::iterator end1_;\n    typename ParamGenerator<T1>::iterator current1_;\n    const typename ParamGenerator<T2>::iterator begin2_;\n    const typename ParamGenerator<T2>::iterator end2_;\n    typename ParamGenerator<T2>::iterator current2_;\n    const typename ParamGenerator<T3>::iterator begin3_;\n    const typename ParamGenerator<T3>::iterator end3_;\n    typename ParamGenerator<T3>::iterator current3_;\n    const typename ParamGenerator<T4>::iterator begin4_;\n    const typename ParamGenerator<T4>::iterator end4_;\n    typename ParamGenerator<T4>::iterator current4_;\n    const typename ParamGenerator<T5>::iterator begin5_;\n    const typename ParamGenerator<T5>::iterator end5_;\n    typename ParamGenerator<T5>::iterator current5_;\n    const typename ParamGenerator<T6>::iterator begin6_;\n    const typename ParamGenerator<T6>::iterator end6_;\n    typename ParamGenerator<T6>::iterator current6_;\n    const typename ParamGenerator<T7>::iterator begin7_;\n    const typename ParamGenerator<T7>::iterator end7_;\n    typename ParamGenerator<T7>::iterator current7_;\n    const typename ParamGenerator<T8>::iterator begin8_;\n    const typename ParamGenerator<T8>::iterator end8_;\n    typename ParamGenerator<T8>::iterator current8_;\n    const typename ParamGenerator<T9>::iterator begin9_;\n    const typename ParamGenerator<T9>::iterator end9_;\n    typename ParamGenerator<T9>::iterator current9_;\n    const typename ParamGenerator<T10>::iterator begin10_;\n    const typename ParamGenerator<T10>::iterator end10_;\n    typename ParamGenerator<T10>::iterator current10_;\n    ParamType current_value_;\n  };  // class CartesianProductGenerator10::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductGenerator10& other);\n\n  const ParamGenerator<T1> g1_;\n  const ParamGenerator<T2> g2_;\n  const ParamGenerator<T3> g3_;\n  const ParamGenerator<T4> g4_;\n  const ParamGenerator<T5> g5_;\n  const ParamGenerator<T6> g6_;\n  const ParamGenerator<T7> g7_;\n  const ParamGenerator<T8> g8_;\n  const ParamGenerator<T9> g9_;\n  const ParamGenerator<T10> g10_;\n};  // class CartesianProductGenerator10\n\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Helper classes providing Combine() with polymorphic features. They allow\n// casting CartesianProductGeneratorN<T> to ParamGenerator<U> if T is\n// convertible to U.\n//\ntemplate <class Generator1, class Generator2>\nclass CartesianProductHolder2 {\n public:\nCartesianProductHolder2(const Generator1& g1, const Generator2& g2)\n      : g1_(g1), g2_(g2) {}\n  template <typename T1, typename T2>\n  operator ParamGenerator< ::std::tr1::tuple<T1, T2> >() const {\n    return ParamGenerator< ::std::tr1::tuple<T1, T2> >(\n        new CartesianProductGenerator2<T1, T2>(\n        static_cast<ParamGenerator<T1> >(g1_),\n        static_cast<ParamGenerator<T2> >(g2_)));\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductHolder2& other);\n\n  const Generator1 g1_;\n  const Generator2 g2_;\n};  // class CartesianProductHolder2\n\ntemplate <class Generator1, class Generator2, class Generator3>\nclass CartesianProductHolder3 {\n public:\nCartesianProductHolder3(const Generator1& g1, const Generator2& g2,\n    const Generator3& g3)\n      : g1_(g1), g2_(g2), g3_(g3) {}\n  template <typename T1, typename T2, typename T3>\n  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >() const {\n    return ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >(\n        new CartesianProductGenerator3<T1, T2, T3>(\n        static_cast<ParamGenerator<T1> >(g1_),\n        static_cast<ParamGenerator<T2> >(g2_),\n        static_cast<ParamGenerator<T3> >(g3_)));\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductHolder3& other);\n\n  const Generator1 g1_;\n  const Generator2 g2_;\n  const Generator3 g3_;\n};  // class CartesianProductHolder3\n\ntemplate <class Generator1, class Generator2, class Generator3,\n    class Generator4>\nclass CartesianProductHolder4 {\n public:\nCartesianProductHolder4(const Generator1& g1, const Generator2& g2,\n    const Generator3& g3, const Generator4& g4)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}\n  template <typename T1, typename T2, typename T3, typename T4>\n  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >() const {\n    return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >(\n        new CartesianProductGenerator4<T1, T2, T3, T4>(\n        static_cast<ParamGenerator<T1> >(g1_),\n        static_cast<ParamGenerator<T2> >(g2_),\n        static_cast<ParamGenerator<T3> >(g3_),\n        static_cast<ParamGenerator<T4> >(g4_)));\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductHolder4& other);\n\n  const Generator1 g1_;\n  const Generator2 g2_;\n  const Generator3 g3_;\n  const Generator4 g4_;\n};  // class CartesianProductHolder4\n\ntemplate <class Generator1, class Generator2, class Generator3,\n    class Generator4, class Generator5>\nclass CartesianProductHolder5 {\n public:\nCartesianProductHolder5(const Generator1& g1, const Generator2& g2,\n    const Generator3& g3, const Generator4& g4, const Generator5& g5)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}\n  template <typename T1, typename T2, typename T3, typename T4, typename T5>\n  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >() const {\n    return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >(\n        new CartesianProductGenerator5<T1, T2, T3, T4, T5>(\n        static_cast<ParamGenerator<T1> >(g1_),\n        static_cast<ParamGenerator<T2> >(g2_),\n        static_cast<ParamGenerator<T3> >(g3_),\n        static_cast<ParamGenerator<T4> >(g4_),\n        static_cast<ParamGenerator<T5> >(g5_)));\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductHolder5& other);\n\n  const Generator1 g1_;\n  const Generator2 g2_;\n  const Generator3 g3_;\n  const Generator4 g4_;\n  const Generator5 g5_;\n};  // class CartesianProductHolder5\n\ntemplate <class Generator1, class Generator2, class Generator3,\n    class Generator4, class Generator5, class Generator6>\nclass CartesianProductHolder6 {\n public:\nCartesianProductHolder6(const Generator1& g1, const Generator2& g2,\n    const Generator3& g3, const Generator4& g4, const Generator5& g5,\n    const Generator6& g6)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}\n  template <typename T1, typename T2, typename T3, typename T4, typename T5,\n      typename T6>\n  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >() const {\n    return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >(\n        new CartesianProductGenerator6<T1, T2, T3, T4, T5, T6>(\n        static_cast<ParamGenerator<T1> >(g1_),\n        static_cast<ParamGenerator<T2> >(g2_),\n        static_cast<ParamGenerator<T3> >(g3_),\n        static_cast<ParamGenerator<T4> >(g4_),\n        static_cast<ParamGenerator<T5> >(g5_),\n        static_cast<ParamGenerator<T6> >(g6_)));\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductHolder6& other);\n\n  const Generator1 g1_;\n  const Generator2 g2_;\n  const Generator3 g3_;\n  const Generator4 g4_;\n  const Generator5 g5_;\n  const Generator6 g6_;\n};  // class CartesianProductHolder6\n\ntemplate <class Generator1, class Generator2, class Generator3,\n    class Generator4, class Generator5, class Generator6, class Generator7>\nclass CartesianProductHolder7 {\n public:\nCartesianProductHolder7(const Generator1& g1, const Generator2& g2,\n    const Generator3& g3, const Generator4& g4, const Generator5& g5,\n    const Generator6& g6, const Generator7& g7)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}\n  template <typename T1, typename T2, typename T3, typename T4, typename T5,\n      typename T6, typename T7>\n  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,\n      T7> >() const {\n    return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> >(\n        new CartesianProductGenerator7<T1, T2, T3, T4, T5, T6, T7>(\n        static_cast<ParamGenerator<T1> >(g1_),\n        static_cast<ParamGenerator<T2> >(g2_),\n        static_cast<ParamGenerator<T3> >(g3_),\n        static_cast<ParamGenerator<T4> >(g4_),\n        static_cast<ParamGenerator<T5> >(g5_),\n        static_cast<ParamGenerator<T6> >(g6_),\n        static_cast<ParamGenerator<T7> >(g7_)));\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductHolder7& other);\n\n  const Generator1 g1_;\n  const Generator2 g2_;\n  const Generator3 g3_;\n  const Generator4 g4_;\n  const Generator5 g5_;\n  const Generator6 g6_;\n  const Generator7 g7_;\n};  // class CartesianProductHolder7\n\ntemplate <class Generator1, class Generator2, class Generator3,\n    class Generator4, class Generator5, class Generator6, class Generator7,\n    class Generator8>\nclass CartesianProductHolder8 {\n public:\nCartesianProductHolder8(const Generator1& g1, const Generator2& g2,\n    const Generator3& g3, const Generator4& g4, const Generator5& g5,\n    const Generator6& g6, const Generator7& g7, const Generator8& g8)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),\n          g8_(g8) {}\n  template <typename T1, typename T2, typename T3, typename T4, typename T5,\n      typename T6, typename T7, typename T8>\n  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7,\n      T8> >() const {\n    return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >(\n        new CartesianProductGenerator8<T1, T2, T3, T4, T5, T6, T7, T8>(\n        static_cast<ParamGenerator<T1> >(g1_),\n        static_cast<ParamGenerator<T2> >(g2_),\n        static_cast<ParamGenerator<T3> >(g3_),\n        static_cast<ParamGenerator<T4> >(g4_),\n        static_cast<ParamGenerator<T5> >(g5_),\n        static_cast<ParamGenerator<T6> >(g6_),\n        static_cast<ParamGenerator<T7> >(g7_),\n        static_cast<ParamGenerator<T8> >(g8_)));\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductHolder8& other);\n\n  const Generator1 g1_;\n  const Generator2 g2_;\n  const Generator3 g3_;\n  const Generator4 g4_;\n  const Generator5 g5_;\n  const Generator6 g6_;\n  const Generator7 g7_;\n  const Generator8 g8_;\n};  // class CartesianProductHolder8\n\ntemplate <class Generator1, class Generator2, class Generator3,\n    class Generator4, class Generator5, class Generator6, class Generator7,\n    class Generator8, class Generator9>\nclass CartesianProductHolder9 {\n public:\nCartesianProductHolder9(const Generator1& g1, const Generator2& g2,\n    const Generator3& g3, const Generator4& g4, const Generator5& g5,\n    const Generator6& g6, const Generator7& g7, const Generator8& g8,\n    const Generator9& g9)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),\n          g9_(g9) {}\n  template <typename T1, typename T2, typename T3, typename T4, typename T5,\n      typename T6, typename T7, typename T8, typename T9>\n  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,\n      T9> >() const {\n    return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,\n        T9> >(\n        new CartesianProductGenerator9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(\n        static_cast<ParamGenerator<T1> >(g1_),\n        static_cast<ParamGenerator<T2> >(g2_),\n        static_cast<ParamGenerator<T3> >(g3_),\n        static_cast<ParamGenerator<T4> >(g4_),\n        static_cast<ParamGenerator<T5> >(g5_),\n        static_cast<ParamGenerator<T6> >(g6_),\n        static_cast<ParamGenerator<T7> >(g7_),\n        static_cast<ParamGenerator<T8> >(g8_),\n        static_cast<ParamGenerator<T9> >(g9_)));\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductHolder9& other);\n\n  const Generator1 g1_;\n  const Generator2 g2_;\n  const Generator3 g3_;\n  const Generator4 g4_;\n  const Generator5 g5_;\n  const Generator6 g6_;\n  const Generator7 g7_;\n  const Generator8 g8_;\n  const Generator9 g9_;\n};  // class CartesianProductHolder9\n\ntemplate <class Generator1, class Generator2, class Generator3,\n    class Generator4, class Generator5, class Generator6, class Generator7,\n    class Generator8, class Generator9, class Generator10>\nclass CartesianProductHolder10 {\n public:\nCartesianProductHolder10(const Generator1& g1, const Generator2& g2,\n    const Generator3& g3, const Generator4& g4, const Generator5& g5,\n    const Generator6& g6, const Generator7& g7, const Generator8& g8,\n    const Generator9& g9, const Generator10& g10)\n      : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),\n          g9_(g9), g10_(g10) {}\n  template <typename T1, typename T2, typename T3, typename T4, typename T5,\n      typename T6, typename T7, typename T8, typename T9, typename T10>\n  operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,\n      T9, T10> >() const {\n    return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,\n        T9, T10> >(\n        new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9,\n            T10>(\n        static_cast<ParamGenerator<T1> >(g1_),\n        static_cast<ParamGenerator<T2> >(g2_),\n        static_cast<ParamGenerator<T3> >(g3_),\n        static_cast<ParamGenerator<T4> >(g4_),\n        static_cast<ParamGenerator<T5> >(g5_),\n        static_cast<ParamGenerator<T6> >(g6_),\n        static_cast<ParamGenerator<T7> >(g7_),\n        static_cast<ParamGenerator<T8> >(g8_),\n        static_cast<ParamGenerator<T9> >(g9_),\n        static_cast<ParamGenerator<T10> >(g10_)));\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductHolder10& other);\n\n  const Generator1 g1_;\n  const Generator2 g2_;\n  const Generator3 g3_;\n  const Generator4 g4_;\n  const Generator5 g5_;\n  const Generator6 g6_;\n  const Generator7 g7_;\n  const Generator8 g8_;\n  const Generator9 g9_;\n  const Generator10 g10_;\n};  // class CartesianProductHolder10\n\n# endif  // GTEST_HAS_COMBINE\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  //  GTEST_HAS_PARAM_TEST\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-param-util-generated.h.pump",
    "content": "$$ -*- mode: c++; -*-\n$var n = 50  $$ Maximum length of Values arguments we want to support.\n$var maxtuple = 10  $$ Maximum number of Combine arguments we want to support.\n// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vladl@google.com (Vlad Losev)\n\n// Type and function utilities for implementing parameterized tests.\n// This file is generated by a SCRIPT.  DO NOT EDIT BY HAND!\n//\n// Currently Google Test supports at most $n arguments in Values,\n// and at most $maxtuple arguments in Combine. Please contact\n// googletestframework@googlegroups.com if you need more.\n// Please note that the number of arguments to Combine is limited\n// by the maximum arity of the implementation of tr1::tuple which is\n// currently set at $maxtuple.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_\n\n// scripts/fuse_gtest.py depends on gtest's own header being #included\n// *unconditionally*.  Therefore these #includes cannot be moved\n// inside #if GTEST_HAS_PARAM_TEST.\n#include \"gtest/internal/gtest-param-util.h\"\n#include \"gtest/internal/gtest-port.h\"\n\n#if GTEST_HAS_PARAM_TEST\n\nnamespace testing {\n\n// Forward declarations of ValuesIn(), which is implemented in\n// include/gtest/gtest-param-test.h.\ntemplate <typename ForwardIterator>\ninternal::ParamGenerator<\n  typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>\nValuesIn(ForwardIterator begin, ForwardIterator end);\n\ntemplate <typename T, size_t N>\ninternal::ParamGenerator<T> ValuesIn(const T (&array)[N]);\n\ntemplate <class Container>\ninternal::ParamGenerator<typename Container::value_type> ValuesIn(\n    const Container& container);\n\nnamespace internal {\n\n// Used in the Values() function to provide polymorphic capabilities.\ntemplate <typename T1>\nclass ValueArray1 {\n public:\n  explicit ValueArray1(T1 v1) : v1_(v1) {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray1& other);\n\n  const T1 v1_;\n};\n\n$range i 2..n\n$for i [[\n$range j 1..i\n\ntemplate <$for j, [[typename T$j]]>\nclass ValueArray$i {\n public:\n  ValueArray$i($for j, [[T$j v$j]]) : $for j, [[v$(j)_(v$j)]] {}\n\n  template <typename T>\n  operator ParamGenerator<T>() const {\n    const T array[] = {$for j, [[static_cast<T>(v$(j)_)]]};\n    return ValuesIn(array);\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const ValueArray$i& other);\n\n$for j [[\n\n  const T$j v$(j)_;\n]]\n\n};\n\n]]\n\n# if GTEST_HAS_COMBINE\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Generates values from the Cartesian product of values produced\n// by the argument generators.\n//\n$range i 2..maxtuple\n$for i [[\n$range j 1..i\n$range k 2..i\n\ntemplate <$for j, [[typename T$j]]>\nclass CartesianProductGenerator$i\n    : public ParamGeneratorInterface< ::std::tr1::tuple<$for j, [[T$j]]> > {\n public:\n  typedef ::std::tr1::tuple<$for j, [[T$j]]> ParamType;\n\n  CartesianProductGenerator$i($for j, [[const ParamGenerator<T$j>& g$j]])\n      : $for j, [[g$(j)_(g$j)]] {}\n  virtual ~CartesianProductGenerator$i() {}\n\n  virtual ParamIteratorInterface<ParamType>* Begin() const {\n    return new Iterator(this, $for j, [[g$(j)_, g$(j)_.begin()]]);\n  }\n  virtual ParamIteratorInterface<ParamType>* End() const {\n    return new Iterator(this, $for j, [[g$(j)_, g$(j)_.end()]]);\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<ParamType> {\n   public:\n    Iterator(const ParamGeneratorInterface<ParamType>* base, $for j, [[\n\n      const ParamGenerator<T$j>& g$j,\n      const typename ParamGenerator<T$j>::iterator& current$(j)]])\n        : base_(base),\n$for j, [[\n\n          begin$(j)_(g$j.begin()), end$(j)_(g$j.end()), current$(j)_(current$j)\n]]    {\n      ComputeCurrentValue();\n    }\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {\n      return base_;\n    }\n    // Advance should not be called on beyond-of-range iterators\n    // so no component iterators must be beyond end of range, either.\n    virtual void Advance() {\n      assert(!AtEnd());\n      ++current$(i)_;\n\n$for k [[\n      if (current$(i+2-k)_ == end$(i+2-k)_) {\n        current$(i+2-k)_ = begin$(i+2-k)_;\n        ++current$(i+2-k-1)_;\n      }\n\n]]\n      ComputeCurrentValue();\n    }\n    virtual ParamIteratorInterface<ParamType>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const ParamType* Current() const { return &current_value_; }\n    virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const Iterator* typed_other =\n          CheckedDowncastToActualType<const Iterator>(&other);\n      // We must report iterators equal if they both point beyond their\n      // respective ranges. That can happen in a variety of fashions,\n      // so we have to consult AtEnd().\n      return (AtEnd() && typed_other->AtEnd()) ||\n         ($for j  && [[\n\n          current$(j)_ == typed_other->current$(j)_\n]]);\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : base_(other.base_), $for j, [[\n\n        begin$(j)_(other.begin$(j)_),\n        end$(j)_(other.end$(j)_),\n        current$(j)_(other.current$(j)_)\n]] {\n      ComputeCurrentValue();\n    }\n\n    void ComputeCurrentValue() {\n      if (!AtEnd())\n        current_value_ = ParamType($for j, [[*current$(j)_]]);\n    }\n    bool AtEnd() const {\n      // We must report iterator past the end of the range when either of the\n      // component iterators has reached the end of its range.\n      return\n$for j  || [[\n\n          current$(j)_ == end$(j)_\n]];\n    }\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<ParamType>* const base_;\n    // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.\n    // current[i]_ is the actual traversing iterator.\n$for j [[\n\n    const typename ParamGenerator<T$j>::iterator begin$(j)_;\n    const typename ParamGenerator<T$j>::iterator end$(j)_;\n    typename ParamGenerator<T$j>::iterator current$(j)_;\n]]\n\n    ParamType current_value_;\n  };  // class CartesianProductGenerator$i::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductGenerator$i& other);\n\n\n$for j [[\n  const ParamGenerator<T$j> g$(j)_;\n\n]]\n};  // class CartesianProductGenerator$i\n\n\n]]\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Helper classes providing Combine() with polymorphic features. They allow\n// casting CartesianProductGeneratorN<T> to ParamGenerator<U> if T is\n// convertible to U.\n//\n$range i 2..maxtuple\n$for i [[\n$range j 1..i\n\ntemplate <$for j, [[class Generator$j]]>\nclass CartesianProductHolder$i {\n public:\nCartesianProductHolder$i($for j, [[const Generator$j& g$j]])\n      : $for j, [[g$(j)_(g$j)]] {}\n  template <$for j, [[typename T$j]]>\n  operator ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >() const {\n    return ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >(\n        new CartesianProductGenerator$i<$for j, [[T$j]]>(\n$for j,[[\n\n        static_cast<ParamGenerator<T$j> >(g$(j)_)\n]]));\n  }\n\n private:\n  // No implementation - assignment is unsupported.\n  void operator=(const CartesianProductHolder$i& other);\n\n\n$for j [[\n  const Generator$j g$(j)_;\n\n]]\n};  // class CartesianProductHolder$i\n\n]]\n\n# endif  // GTEST_HAS_COMBINE\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  //  GTEST_HAS_PARAM_TEST\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-param-util.h",
    "content": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: vladl@google.com (Vlad Losev)\n\n// Type and function utilities for implementing parameterized tests.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_\n\n#include <iterator>\n#include <utility>\n#include <vector>\n\n// scripts/fuse_gtest.py depends on gtest's own header being #included\n// *unconditionally*.  Therefore these #includes cannot be moved\n// inside #if GTEST_HAS_PARAM_TEST.\n#include \"gtest/internal/gtest-internal.h\"\n#include \"gtest/internal/gtest-linked_ptr.h\"\n#include \"gtest/internal/gtest-port.h\"\n#include \"gtest/gtest-printers.h\"\n\n#if GTEST_HAS_PARAM_TEST\n\nnamespace testing {\nnamespace internal {\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Outputs a message explaining invalid registration of different\n// fixture class for the same test case. This may happen when\n// TEST_P macro is used to define two tests with the same name\n// but in different namespaces.\nGTEST_API_ void ReportInvalidTestCaseType(const char* test_case_name,\n                                          const char* file, int line);\n\ntemplate <typename> class ParamGeneratorInterface;\ntemplate <typename> class ParamGenerator;\n\n// Interface for iterating over elements provided by an implementation\n// of ParamGeneratorInterface<T>.\ntemplate <typename T>\nclass ParamIteratorInterface {\n public:\n  virtual ~ParamIteratorInterface() {}\n  // A pointer to the base generator instance.\n  // Used only for the purposes of iterator comparison\n  // to make sure that two iterators belong to the same generator.\n  virtual const ParamGeneratorInterface<T>* BaseGenerator() const = 0;\n  // Advances iterator to point to the next element\n  // provided by the generator. The caller is responsible\n  // for not calling Advance() on an iterator equal to\n  // BaseGenerator()->End().\n  virtual void Advance() = 0;\n  // Clones the iterator object. Used for implementing copy semantics\n  // of ParamIterator<T>.\n  virtual ParamIteratorInterface* Clone() const = 0;\n  // Dereferences the current iterator and provides (read-only) access\n  // to the pointed value. It is the caller's responsibility not to call\n  // Current() on an iterator equal to BaseGenerator()->End().\n  // Used for implementing ParamGenerator<T>::operator*().\n  virtual const T* Current() const = 0;\n  // Determines whether the given iterator and other point to the same\n  // element in the sequence generated by the generator.\n  // Used for implementing ParamGenerator<T>::operator==().\n  virtual bool Equals(const ParamIteratorInterface& other) const = 0;\n};\n\n// Class iterating over elements provided by an implementation of\n// ParamGeneratorInterface<T>. It wraps ParamIteratorInterface<T>\n// and implements the const forward iterator concept.\ntemplate <typename T>\nclass ParamIterator {\n public:\n  typedef T value_type;\n  typedef const T& reference;\n  typedef ptrdiff_t difference_type;\n\n  // ParamIterator assumes ownership of the impl_ pointer.\n  ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {}\n  ParamIterator& operator=(const ParamIterator& other) {\n    if (this != &other)\n      impl_.reset(other.impl_->Clone());\n    return *this;\n  }\n\n  const T& operator*() const { return *impl_->Current(); }\n  const T* operator->() const { return impl_->Current(); }\n  // Prefix version of operator++.\n  ParamIterator& operator++() {\n    impl_->Advance();\n    return *this;\n  }\n  // Postfix version of operator++.\n  ParamIterator operator++(int /*unused*/) {\n    ParamIteratorInterface<T>* clone = impl_->Clone();\n    impl_->Advance();\n    return ParamIterator(clone);\n  }\n  bool operator==(const ParamIterator& other) const {\n    return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_);\n  }\n  bool operator!=(const ParamIterator& other) const {\n    return !(*this == other);\n  }\n\n private:\n  friend class ParamGenerator<T>;\n  explicit ParamIterator(ParamIteratorInterface<T>* impl) : impl_(impl) {}\n  scoped_ptr<ParamIteratorInterface<T> > impl_;\n};\n\n// ParamGeneratorInterface<T> is the binary interface to access generators\n// defined in other translation units.\ntemplate <typename T>\nclass ParamGeneratorInterface {\n public:\n  typedef T ParamType;\n\n  virtual ~ParamGeneratorInterface() {}\n\n  // Generator interface definition\n  virtual ParamIteratorInterface<T>* Begin() const = 0;\n  virtual ParamIteratorInterface<T>* End() const = 0;\n};\n\n// Wraps ParamGeneratorInterface<T> and provides general generator syntax\n// compatible with the STL Container concept.\n// This class implements copy initialization semantics and the contained\n// ParamGeneratorInterface<T> instance is shared among all copies\n// of the original object. This is possible because that instance is immutable.\ntemplate<typename T>\nclass ParamGenerator {\n public:\n  typedef ParamIterator<T> iterator;\n\n  explicit ParamGenerator(ParamGeneratorInterface<T>* impl) : impl_(impl) {}\n  ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {}\n\n  ParamGenerator& operator=(const ParamGenerator& other) {\n    impl_ = other.impl_;\n    return *this;\n  }\n\n  iterator begin() const { return iterator(impl_->Begin()); }\n  iterator end() const { return iterator(impl_->End()); }\n\n private:\n  linked_ptr<const ParamGeneratorInterface<T> > impl_;\n};\n\n// Generates values from a range of two comparable values. Can be used to\n// generate sequences of user-defined types that implement operator+() and\n// operator<().\n// This class is used in the Range() function.\ntemplate <typename T, typename IncrementT>\nclass RangeGenerator : public ParamGeneratorInterface<T> {\n public:\n  RangeGenerator(T begin, T end, IncrementT step)\n      : begin_(begin), end_(end),\n        step_(step), end_index_(CalculateEndIndex(begin, end, step)) {}\n  virtual ~RangeGenerator() {}\n\n  virtual ParamIteratorInterface<T>* Begin() const {\n    return new Iterator(this, begin_, 0, step_);\n  }\n  virtual ParamIteratorInterface<T>* End() const {\n    return new Iterator(this, end_, end_index_, step_);\n  }\n\n private:\n  class Iterator : public ParamIteratorInterface<T> {\n   public:\n    Iterator(const ParamGeneratorInterface<T>* base, T value, int index,\n             IncrementT step)\n        : base_(base), value_(value), index_(index), step_(step) {}\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<T>* BaseGenerator() const {\n      return base_;\n    }\n    virtual void Advance() {\n      value_ = value_ + step_;\n      index_++;\n    }\n    virtual ParamIteratorInterface<T>* Clone() const {\n      return new Iterator(*this);\n    }\n    virtual const T* Current() const { return &value_; }\n    virtual bool Equals(const ParamIteratorInterface<T>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      const int other_index =\n          CheckedDowncastToActualType<const Iterator>(&other)->index_;\n      return index_ == other_index;\n    }\n\n   private:\n    Iterator(const Iterator& other)\n        : ParamIteratorInterface<T>(),\n          base_(other.base_), value_(other.value_), index_(other.index_),\n          step_(other.step_) {}\n\n    // No implementation - assignment is unsupported.\n    void operator=(const Iterator& other);\n\n    const ParamGeneratorInterface<T>* const base_;\n    T value_;\n    int index_;\n    const IncrementT step_;\n  };  // class RangeGenerator::Iterator\n\n  static int CalculateEndIndex(const T& begin,\n                               const T& end,\n                               const IncrementT& step) {\n    int end_index = 0;\n    for (T i = begin; i < end; i = i + step)\n      end_index++;\n    return end_index;\n  }\n\n  // No implementation - assignment is unsupported.\n  void operator=(const RangeGenerator& other);\n\n  const T begin_;\n  const T end_;\n  const IncrementT step_;\n  // The index for the end() iterator. All the elements in the generated\n  // sequence are indexed (0-based) to aid iterator comparison.\n  const int end_index_;\n};  // class RangeGenerator\n\n\n// Generates values from a pair of STL-style iterators. Used in the\n// ValuesIn() function. The elements are copied from the source range\n// since the source can be located on the stack, and the generator\n// is likely to persist beyond that stack frame.\ntemplate <typename T>\nclass ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {\n public:\n  template <typename ForwardIterator>\n  ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)\n      : container_(begin, end) {}\n  virtual ~ValuesInIteratorRangeGenerator() {}\n\n  virtual ParamIteratorInterface<T>* Begin() const {\n    return new Iterator(this, container_.begin());\n  }\n  virtual ParamIteratorInterface<T>* End() const {\n    return new Iterator(this, container_.end());\n  }\n\n private:\n  typedef typename ::std::vector<T> ContainerType;\n\n  class Iterator : public ParamIteratorInterface<T> {\n   public:\n    Iterator(const ParamGeneratorInterface<T>* base,\n             typename ContainerType::const_iterator iterator)\n        : base_(base), iterator_(iterator) {}\n    virtual ~Iterator() {}\n\n    virtual const ParamGeneratorInterface<T>* BaseGenerator() const {\n      return base_;\n    }\n    virtual void Advance() {\n      ++iterator_;\n      value_.reset();\n    }\n    virtual ParamIteratorInterface<T>* Clone() const {\n      return new Iterator(*this);\n    }\n    // We need to use cached value referenced by iterator_ because *iterator_\n    // can return a temporary object (and of type other then T), so just\n    // having \"return &*iterator_;\" doesn't work.\n    // value_ is updated here and not in Advance() because Advance()\n    // can advance iterator_ beyond the end of the range, and we cannot\n    // detect that fact. The client code, on the other hand, is\n    // responsible for not calling Current() on an out-of-range iterator.\n    virtual const T* Current() const {\n      if (value_.get() == NULL)\n        value_.reset(new T(*iterator_));\n      return value_.get();\n    }\n    virtual bool Equals(const ParamIteratorInterface<T>& other) const {\n      // Having the same base generator guarantees that the other\n      // iterator is of the same type and we can downcast.\n      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())\n          << \"The program attempted to compare iterators \"\n          << \"from different generators.\" << std::endl;\n      return iterator_ ==\n          CheckedDowncastToActualType<const Iterator>(&other)->iterator_;\n    }\n\n   private:\n    Iterator(const Iterator& other)\n          // The explicit constructor call suppresses a false warning\n          // emitted by gcc when supplied with the -Wextra option.\n        : ParamIteratorInterface<T>(),\n          base_(other.base_),\n          iterator_(other.iterator_) {}\n\n    const ParamGeneratorInterface<T>* const base_;\n    typename ContainerType::const_iterator iterator_;\n    // A cached value of *iterator_. We keep it here to allow access by\n    // pointer in the wrapping iterator's operator->().\n    // value_ needs to be mutable to be accessed in Current().\n    // Use of scoped_ptr helps manage cached value's lifetime,\n    // which is bound by the lifespan of the iterator itself.\n    mutable scoped_ptr<const T> value_;\n  };  // class ValuesInIteratorRangeGenerator::Iterator\n\n  // No implementation - assignment is unsupported.\n  void operator=(const ValuesInIteratorRangeGenerator& other);\n\n  const ContainerType container_;\n};  // class ValuesInIteratorRangeGenerator\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Stores a parameter value and later creates tests parameterized with that\n// value.\ntemplate <class TestClass>\nclass ParameterizedTestFactory : public TestFactoryBase {\n public:\n  typedef typename TestClass::ParamType ParamType;\n  explicit ParameterizedTestFactory(ParamType parameter) :\n      parameter_(parameter) {}\n  virtual Test* CreateTest() {\n    TestClass::SetParam(&parameter_);\n    return new TestClass();\n  }\n\n private:\n  const ParamType parameter_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory);\n};\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// TestMetaFactoryBase is a base class for meta-factories that create\n// test factories for passing into MakeAndRegisterTestInfo function.\ntemplate <class ParamType>\nclass TestMetaFactoryBase {\n public:\n  virtual ~TestMetaFactoryBase() {}\n\n  virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0;\n};\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// TestMetaFactory creates test factories for passing into\n// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives\n// ownership of test factory pointer, same factory object cannot be passed\n// into that method twice. But ParameterizedTestCaseInfo is going to call\n// it for each Test/Parameter value combination. Thus it needs meta factory\n// creator class.\ntemplate <class TestCase>\nclass TestMetaFactory\n    : public TestMetaFactoryBase<typename TestCase::ParamType> {\n public:\n  typedef typename TestCase::ParamType ParamType;\n\n  TestMetaFactory() {}\n\n  virtual TestFactoryBase* CreateTestFactory(ParamType parameter) {\n    return new ParameterizedTestFactory<TestCase>(parameter);\n  }\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory);\n};\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// ParameterizedTestCaseInfoBase is a generic interface\n// to ParameterizedTestCaseInfo classes. ParameterizedTestCaseInfoBase\n// accumulates test information provided by TEST_P macro invocations\n// and generators provided by INSTANTIATE_TEST_CASE_P macro invocations\n// and uses that information to register all resulting test instances\n// in RegisterTests method. The ParameterizeTestCaseRegistry class holds\n// a collection of pointers to the ParameterizedTestCaseInfo objects\n// and calls RegisterTests() on each of them when asked.\nclass ParameterizedTestCaseInfoBase {\n public:\n  virtual ~ParameterizedTestCaseInfoBase() {}\n\n  // Base part of test case name for display purposes.\n  virtual const string& GetTestCaseName() const = 0;\n  // Test case id to verify identity.\n  virtual TypeId GetTestCaseTypeId() const = 0;\n  // UnitTest class invokes this method to register tests in this\n  // test case right before running them in RUN_ALL_TESTS macro.\n  // This method should not be called more then once on any single\n  // instance of a ParameterizedTestCaseInfoBase derived class.\n  virtual void RegisterTests() = 0;\n\n protected:\n  ParameterizedTestCaseInfoBase() {}\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfoBase);\n};\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// ParameterizedTestCaseInfo accumulates tests obtained from TEST_P\n// macro invocations for a particular test case and generators\n// obtained from INSTANTIATE_TEST_CASE_P macro invocations for that\n// test case. It registers tests with all values generated by all\n// generators when asked.\ntemplate <class TestCase>\nclass ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {\n public:\n  // ParamType and GeneratorCreationFunc are private types but are required\n  // for declarations of public methods AddTestPattern() and\n  // AddTestCaseInstantiation().\n  typedef typename TestCase::ParamType ParamType;\n  // A function that returns an instance of appropriate generator type.\n  typedef ParamGenerator<ParamType>(GeneratorCreationFunc)();\n\n  explicit ParameterizedTestCaseInfo(const char* name)\n      : test_case_name_(name) {}\n\n  // Test case base name for display purposes.\n  virtual const string& GetTestCaseName() const { return test_case_name_; }\n  // Test case id to verify identity.\n  virtual TypeId GetTestCaseTypeId() const { return GetTypeId<TestCase>(); }\n  // TEST_P macro uses AddTestPattern() to record information\n  // about a single test in a LocalTestInfo structure.\n  // test_case_name is the base name of the test case (without invocation\n  // prefix). test_base_name is the name of an individual test without\n  // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is\n  // test case base name and DoBar is test base name.\n  void AddTestPattern(const char* test_case_name,\n                      const char* test_base_name,\n                      TestMetaFactoryBase<ParamType>* meta_factory) {\n    tests_.push_back(linked_ptr<TestInfo>(new TestInfo(test_case_name,\n                                                       test_base_name,\n                                                       meta_factory)));\n  }\n  // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information\n  // about a generator.\n  int AddTestCaseInstantiation(const string& instantiation_name,\n                               GeneratorCreationFunc* func,\n                               const char* /* file */,\n                               int /* line */) {\n    instantiations_.push_back(::std::make_pair(instantiation_name, func));\n    return 0;  // Return value used only to run this method in namespace scope.\n  }\n  // UnitTest class invokes this method to register tests in this test case\n  // test cases right before running tests in RUN_ALL_TESTS macro.\n  // This method should not be called more then once on any single\n  // instance of a ParameterizedTestCaseInfoBase derived class.\n  // UnitTest has a guard to prevent from calling this method more then once.\n  virtual void RegisterTests() {\n    for (typename TestInfoContainer::iterator test_it = tests_.begin();\n         test_it != tests_.end(); ++test_it) {\n      linked_ptr<TestInfo> test_info = *test_it;\n      for (typename InstantiationContainer::iterator gen_it =\n               instantiations_.begin(); gen_it != instantiations_.end();\n               ++gen_it) {\n        const string& instantiation_name = gen_it->first;\n        ParamGenerator<ParamType> generator((*gen_it->second)());\n\n        string test_case_name;\n        if ( !instantiation_name.empty() )\n          test_case_name = instantiation_name + \"/\";\n        test_case_name += test_info->test_case_base_name;\n\n        int i = 0;\n        for (typename ParamGenerator<ParamType>::iterator param_it =\n                 generator.begin();\n             param_it != generator.end(); ++param_it, ++i) {\n          Message test_name_stream;\n          test_name_stream << test_info->test_base_name << \"/\" << i;\n          MakeAndRegisterTestInfo(\n              test_case_name.c_str(),\n              test_name_stream.GetString().c_str(),\n              NULL,  // No type parameter.\n              PrintToString(*param_it).c_str(),\n              GetTestCaseTypeId(),\n              TestCase::SetUpTestCase,\n              TestCase::TearDownTestCase,\n              test_info->test_meta_factory->CreateTestFactory(*param_it));\n        }  // for param_it\n      }  // for gen_it\n    }  // for test_it\n  }  // RegisterTests\n\n private:\n  // LocalTestInfo structure keeps information about a single test registered\n  // with TEST_P macro.\n  struct TestInfo {\n    TestInfo(const char* a_test_case_base_name,\n             const char* a_test_base_name,\n             TestMetaFactoryBase<ParamType>* a_test_meta_factory) :\n        test_case_base_name(a_test_case_base_name),\n        test_base_name(a_test_base_name),\n        test_meta_factory(a_test_meta_factory) {}\n\n    const string test_case_base_name;\n    const string test_base_name;\n    const scoped_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;\n  };\n  typedef ::std::vector<linked_ptr<TestInfo> > TestInfoContainer;\n  // Keeps pairs of <Instantiation name, Sequence generator creation function>\n  // received from INSTANTIATE_TEST_CASE_P macros.\n  typedef ::std::vector<std::pair<string, GeneratorCreationFunc*> >\n      InstantiationContainer;\n\n  const string test_case_name_;\n  TestInfoContainer tests_;\n  InstantiationContainer instantiations_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfo);\n};  // class ParameterizedTestCaseInfo\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// ParameterizedTestCaseRegistry contains a map of ParameterizedTestCaseInfoBase\n// classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P\n// macros use it to locate their corresponding ParameterizedTestCaseInfo\n// descriptors.\nclass ParameterizedTestCaseRegistry {\n public:\n  ParameterizedTestCaseRegistry() {}\n  ~ParameterizedTestCaseRegistry() {\n    for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();\n         it != test_case_infos_.end(); ++it) {\n      delete *it;\n    }\n  }\n\n  // Looks up or creates and returns a structure containing information about\n  // tests and instantiations of a particular test case.\n  template <class TestCase>\n  ParameterizedTestCaseInfo<TestCase>* GetTestCasePatternHolder(\n      const char* test_case_name,\n      const char* file,\n      int line) {\n    ParameterizedTestCaseInfo<TestCase>* typed_test_info = NULL;\n    for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();\n         it != test_case_infos_.end(); ++it) {\n      if ((*it)->GetTestCaseName() == test_case_name) {\n        if ((*it)->GetTestCaseTypeId() != GetTypeId<TestCase>()) {\n          // Complain about incorrect usage of Google Test facilities\n          // and terminate the program since we cannot guaranty correct\n          // test case setup and tear-down in this case.\n          ReportInvalidTestCaseType(test_case_name,  file, line);\n          posix::Abort();\n        } else {\n          // At this point we are sure that the object we found is of the same\n          // type we are looking for, so we downcast it to that type\n          // without further checks.\n          typed_test_info = CheckedDowncastToActualType<\n              ParameterizedTestCaseInfo<TestCase> >(*it);\n        }\n        break;\n      }\n    }\n    if (typed_test_info == NULL) {\n      typed_test_info = new ParameterizedTestCaseInfo<TestCase>(test_case_name);\n      test_case_infos_.push_back(typed_test_info);\n    }\n    return typed_test_info;\n  }\n  void RegisterTests() {\n    for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();\n         it != test_case_infos_.end(); ++it) {\n      (*it)->RegisterTests();\n    }\n  }\n\n private:\n  typedef ::std::vector<ParameterizedTestCaseInfoBase*> TestCaseInfoContainer;\n\n  TestCaseInfoContainer test_case_infos_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseRegistry);\n};\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  //  GTEST_HAS_PARAM_TEST\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-port.h",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: wan@google.com (Zhanyong Wan)\n//\n// Low-level types and utilities for porting Google Test to various\n// platforms.  They are subject to change without notice.  DO NOT USE\n// THEM IN USER CODE.\n//\n// This file is fundamental to Google Test.  All other Google Test source\n// files are expected to #include this.  Therefore, it cannot #include\n// any other Google Test header.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_\n\n// The user can define the following macros in the build script to\n// control Google Test's behavior.  If the user doesn't define a macro\n// in this list, Google Test will define it.\n//\n//   GTEST_HAS_CLONE          - Define it to 1/0 to indicate that clone(2)\n//                              is/isn't available.\n//   GTEST_HAS_EXCEPTIONS     - Define it to 1/0 to indicate that exceptions\n//                              are enabled.\n//   GTEST_HAS_GLOBAL_STRING  - Define it to 1/0 to indicate that ::string\n//                              is/isn't available (some systems define\n//                              ::string, which is different to std::string).\n//   GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string\n//                              is/isn't available (some systems define\n//                              ::wstring, which is different to std::wstring).\n//   GTEST_HAS_POSIX_RE       - Define it to 1/0 to indicate that POSIX regular\n//                              expressions are/aren't available.\n//   GTEST_HAS_PTHREAD        - Define it to 1/0 to indicate that <pthread.h>\n//                              is/isn't available.\n//   GTEST_HAS_RTTI           - Define it to 1/0 to indicate that RTTI is/isn't\n//                              enabled.\n//   GTEST_HAS_STD_WSTRING    - Define it to 1/0 to indicate that\n//                              std::wstring does/doesn't work (Google Test can\n//                              be used where std::wstring is unavailable).\n//   GTEST_HAS_TR1_TUPLE      - Define it to 1/0 to indicate tr1::tuple\n//                              is/isn't available.\n//   GTEST_HAS_SEH            - Define it to 1/0 to indicate whether the\n//                              compiler supports Microsoft's \"Structured\n//                              Exception Handling\".\n//   GTEST_HAS_STREAM_REDIRECTION\n//                            - Define it to 1/0 to indicate whether the\n//                              platform supports I/O stream redirection using\n//                              dup() and dup2().\n//   GTEST_USE_OWN_TR1_TUPLE  - Define it to 1/0 to indicate whether Google\n//                              Test's own tr1 tuple implementation should be\n//                              used.  Unused when the user sets\n//                              GTEST_HAS_TR1_TUPLE to 0.\n//   GTEST_LANG_CXX11         - Define it to 1/0 to indicate that Google Test\n//                              is building in C++11/C++98 mode.\n//   GTEST_LINKED_AS_SHARED_LIBRARY\n//                            - Define to 1 when compiling tests that use\n//                              Google Test as a shared library (known as\n//                              DLL on Windows).\n//   GTEST_CREATE_SHARED_LIBRARY\n//                            - Define to 1 when compiling Google Test itself\n//                              as a shared library.\n\n// This header defines the following utilities:\n//\n// Macros indicating the current platform (defined to 1 if compiled on\n// the given platform; otherwise undefined):\n//   GTEST_OS_AIX      - IBM AIX\n//   GTEST_OS_CYGWIN   - Cygwin\n//   GTEST_OS_HPUX     - HP-UX\n//   GTEST_OS_LINUX    - Linux\n//     GTEST_OS_LINUX_ANDROID - Google Android\n//   GTEST_OS_MAC      - Mac OS X\n//     GTEST_OS_IOS    - iOS\n//       GTEST_OS_IOS_SIMULATOR - iOS simulator\n//   GTEST_OS_NACL     - Google Native Client (NaCl)\n//   GTEST_OS_OPENBSD  - OpenBSD\n//   GTEST_OS_QNX      - QNX\n//   GTEST_OS_SOLARIS  - Sun Solaris\n//   GTEST_OS_SYMBIAN  - Symbian\n//   GTEST_OS_WINDOWS  - Windows (Desktop, MinGW, or Mobile)\n//     GTEST_OS_WINDOWS_DESKTOP  - Windows Desktop\n//     GTEST_OS_WINDOWS_MINGW    - MinGW\n//     GTEST_OS_WINDOWS_MOBILE   - Windows Mobile\n//   GTEST_OS_ZOS      - z/OS\n//\n// Among the platforms, Cygwin, Linux, Max OS X, and Windows have the\n// most stable support.  Since core members of the Google Test project\n// don't have access to other platforms, support for them may be less\n// stable.  If you notice any problems on your platform, please notify\n// googletestframework@googlegroups.com (patches for fixing them are\n// even more welcome!).\n//\n// Note that it is possible that none of the GTEST_OS_* macros are defined.\n//\n// Macros indicating available Google Test features (defined to 1 if\n// the corresponding feature is supported; otherwise undefined):\n//   GTEST_HAS_COMBINE      - the Combine() function (for value-parameterized\n//                            tests)\n//   GTEST_HAS_DEATH_TEST   - death tests\n//   GTEST_HAS_PARAM_TEST   - value-parameterized tests\n//   GTEST_HAS_TYPED_TEST   - typed tests\n//   GTEST_HAS_TYPED_TEST_P - type-parameterized tests\n//   GTEST_USES_POSIX_RE    - enhanced POSIX regex is used. Do not confuse with\n//                            GTEST_HAS_POSIX_RE (see above) which users can\n//                            define themselves.\n//   GTEST_USES_SIMPLE_RE   - our own simple regex is used;\n//                            the above two are mutually exclusive.\n//   GTEST_CAN_COMPARE_NULL - accepts untyped NULL in EXPECT_EQ().\n//\n// Macros for basic C++ coding:\n//   GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.\n//   GTEST_ATTRIBUTE_UNUSED_  - declares that a class' instances or a\n//                              variable don't have to be used.\n//   GTEST_DISALLOW_ASSIGN_   - disables operator=.\n//   GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.\n//   GTEST_MUST_USE_RESULT_   - declares that a function's result must be used.\n//\n// Synchronization:\n//   Mutex, MutexLock, ThreadLocal, GetThreadCount()\n//                  - synchronization primitives.\n//   GTEST_IS_THREADSAFE - defined to 1 to indicate that the above\n//                         synchronization primitives have real implementations\n//                         and Google Test is thread-safe; or 0 otherwise.\n//\n// Template meta programming:\n//   is_pointer     - as in TR1; needed on Symbian and IBM XL C/C++ only.\n//   IteratorTraits - partial implementation of std::iterator_traits, which\n//                    is not available in libCstd when compiled with Sun C++.\n//\n// Smart pointers:\n//   scoped_ptr     - as in TR2.\n//\n// Regular expressions:\n//   RE             - a simple regular expression class using the POSIX\n//                    Extended Regular Expression syntax on UNIX-like\n//                    platforms, or a reduced regular exception syntax on\n//                    other platforms, including Windows.\n//\n// Logging:\n//   GTEST_LOG_()   - logs messages at the specified severity level.\n//   LogToStderr()  - directs all log messages to stderr.\n//   FlushInfoLog() - flushes informational log messages.\n//\n// Stdout and stderr capturing:\n//   CaptureStdout()     - starts capturing stdout.\n//   GetCapturedStdout() - stops capturing stdout and returns the captured\n//                         string.\n//   CaptureStderr()     - starts capturing stderr.\n//   GetCapturedStderr() - stops capturing stderr and returns the captured\n//                         string.\n//\n// Integer types:\n//   TypeWithSize   - maps an integer to a int type.\n//   Int32, UInt32, Int64, UInt64, TimeInMillis\n//                  - integers of known sizes.\n//   BiggestInt     - the biggest signed integer type.\n//\n// Command-line utilities:\n//   GTEST_FLAG()       - references a flag.\n//   GTEST_DECLARE_*()  - declares a flag.\n//   GTEST_DEFINE_*()   - defines a flag.\n//   GetInjectableArgvs() - returns the command line as a vector of strings.\n//\n// Environment variable utilities:\n//   GetEnv()             - gets the value of an environment variable.\n//   BoolFromGTestEnv()   - parses a bool environment variable.\n//   Int32FromGTestEnv()  - parses an Int32 environment variable.\n//   StringFromGTestEnv() - parses a string environment variable.\n\n#include <ctype.h>   // for isspace, etc\n#include <stddef.h>  // for ptrdiff_t\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#ifndef _WIN32_WCE\n# include <sys/types.h>\n# include <sys/stat.h>\n#endif  // !_WIN32_WCE\n\n#if defined __APPLE__\n# include <AvailabilityMacros.h>\n# include <TargetConditionals.h>\n#endif\n\n#include <iostream>  // NOLINT\n#include <sstream>  // NOLINT\n#include <string>  // NOLINT\n\n#define GTEST_DEV_EMAIL_ \"googletestframework@@googlegroups.com\"\n#define GTEST_FLAG_PREFIX_ \"gtest_\"\n#define GTEST_FLAG_PREFIX_DASH_ \"gtest-\"\n#define GTEST_FLAG_PREFIX_UPPER_ \"GTEST_\"\n#define GTEST_NAME_ \"Google Test\"\n#define GTEST_PROJECT_URL_ \"http://code.google.com/p/googletest/\"\n\n// Determines the version of gcc that is used to compile this.\n#ifdef __GNUC__\n// 40302 means version 4.3.2.\n# define GTEST_GCC_VER_ \\\n    (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)\n#endif  // __GNUC__\n\n// Determines the platform on which Google Test is compiled.\n#ifdef __CYGWIN__\n# define GTEST_OS_CYGWIN 1\n#elif defined __SYMBIAN32__\n# define GTEST_OS_SYMBIAN 1\n#elif defined _WIN32\n# define GTEST_OS_WINDOWS 1\n# ifdef _WIN32_WCE\n#  define GTEST_OS_WINDOWS_MOBILE 1\n# elif defined(__MINGW__) || defined(__MINGW32__)\n#  define GTEST_OS_WINDOWS_MINGW 1\n# else\n#  define GTEST_OS_WINDOWS_DESKTOP 1\n# endif  // _WIN32_WCE\n#elif defined __APPLE__\n# define GTEST_OS_MAC 1\n# if TARGET_OS_IPHONE\n#  define GTEST_OS_IOS 1\n#  if TARGET_IPHONE_SIMULATOR\n#   define GTEST_OS_IOS_SIMULATOR 1\n#  endif\n# endif\n#elif defined __linux__\n# define GTEST_OS_LINUX 1\n# if defined __ANDROID__\n#  define GTEST_OS_LINUX_ANDROID 1\n# endif\n#elif defined __MVS__\n# define GTEST_OS_ZOS 1\n#elif defined(__sun) && defined(__SVR4)\n# define GTEST_OS_SOLARIS 1\n#elif defined(_AIX)\n# define GTEST_OS_AIX 1\n#elif defined(__hpux)\n# define GTEST_OS_HPUX 1\n#elif defined __native_client__\n# define GTEST_OS_NACL 1\n#elif defined __OpenBSD__\n# define GTEST_OS_OPENBSD 1\n#elif defined __QNX__\n# define GTEST_OS_QNX 1\n#endif  // __CYGWIN__\n\n#ifndef GTEST_LANG_CXX11\n// gcc and clang define __GXX_EXPERIMENTAL_CXX0X__ when\n// -std={c,gnu}++{0x,11} is passed.  The C++11 standard specifies a\n// value for __cplusplus, and recent versions of clang, gcc, and\n// probably other compilers set that too in C++11 mode.\n# if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L\n// Compiling in at least C++11 mode.\n#  define GTEST_LANG_CXX11 1\n# else\n#  define GTEST_LANG_CXX11 0\n# endif\n#endif\n\n// Brings in definitions for functions used in the testing::internal::posix\n// namespace (read, write, close, chdir, isatty, stat). We do not currently\n// use them on Windows Mobile.\n#if !GTEST_OS_WINDOWS\n// This assumes that non-Windows OSes provide unistd.h. For OSes where this\n// is not the case, we need to include headers that provide the functions\n// mentioned above.\n# include <unistd.h>\n# include <strings.h>\n#elif !GTEST_OS_WINDOWS_MOBILE\n# include <direct.h>\n# include <io.h>\n#endif\n\n#if GTEST_OS_LINUX_ANDROID\n// Used to define __ANDROID_API__ matching the target NDK API level.\n#  include <android/api-level.h>  // NOLINT\n#endif\n\n// Defines this to true iff Google Test can use POSIX regular expressions.\n#ifndef GTEST_HAS_POSIX_RE\n# if GTEST_OS_LINUX_ANDROID\n// On Android, <regex.h> is only available starting with Gingerbread.\n#  define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9)\n# else\n#  define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS)\n# endif\n#endif\n\n#if GTEST_HAS_POSIX_RE\n\n// On some platforms, <regex.h> needs someone to define size_t, and\n// won't compile otherwise.  We can #include it here as we already\n// included <stdlib.h>, which is guaranteed to define size_t through\n// <stddef.h>.\n# include <regex.h>  // NOLINT\n\n# define GTEST_USES_POSIX_RE 1\n\n#elif GTEST_OS_WINDOWS\n\n// <regex.h> is not available on Windows.  Use our own simple regex\n// implementation instead.\n# define GTEST_USES_SIMPLE_RE 1\n\n#else\n\n// <regex.h> may not be available on this platform.  Use our own\n// simple regex implementation instead.\n# define GTEST_USES_SIMPLE_RE 1\n\n#endif  // GTEST_HAS_POSIX_RE\n\n#ifndef GTEST_HAS_EXCEPTIONS\n// The user didn't tell us whether exceptions are enabled, so we need\n// to figure it out.\n# if defined(_MSC_VER) || defined(__BORLANDC__)\n// MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS\n// macro to enable exceptions, so we'll do the same.\n// Assumes that exceptions are enabled by default.\n#  ifndef _HAS_EXCEPTIONS\n#   define _HAS_EXCEPTIONS 1\n#  endif  // _HAS_EXCEPTIONS\n#  define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS\n# elif defined(__GNUC__) && __EXCEPTIONS\n// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled.\n#  define GTEST_HAS_EXCEPTIONS 1\n# elif defined(__SUNPRO_CC)\n// Sun Pro CC supports exceptions.  However, there is no compile-time way of\n// detecting whether they are enabled or not.  Therefore, we assume that\n// they are enabled unless the user tells us otherwise.\n#  define GTEST_HAS_EXCEPTIONS 1\n# elif defined(__IBMCPP__) && __EXCEPTIONS\n// xlC defines __EXCEPTIONS to 1 iff exceptions are enabled.\n#  define GTEST_HAS_EXCEPTIONS 1\n# elif defined(__HP_aCC)\n// Exception handling is in effect by default in HP aCC compiler. It has to\n// be turned of by +noeh compiler option if desired.\n#  define GTEST_HAS_EXCEPTIONS 1\n# else\n// For other compilers, we assume exceptions are disabled to be\n// conservative.\n#  define GTEST_HAS_EXCEPTIONS 0\n# endif  // defined(_MSC_VER) || defined(__BORLANDC__)\n#endif  // GTEST_HAS_EXCEPTIONS\n\n#if !defined(GTEST_HAS_STD_STRING)\n// Even though we don't use this macro any longer, we keep it in case\n// some clients still depend on it.\n# define GTEST_HAS_STD_STRING 1\n#elif !GTEST_HAS_STD_STRING\n// The user told us that ::std::string isn't available.\n# error \"Google Test cannot be used where ::std::string isn't available.\"\n#endif  // !defined(GTEST_HAS_STD_STRING)\n\n#ifndef GTEST_HAS_GLOBAL_STRING\n// The user didn't tell us whether ::string is available, so we need\n// to figure it out.\n\n# define GTEST_HAS_GLOBAL_STRING 0\n\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n#ifndef GTEST_HAS_STD_WSTRING\n// The user didn't tell us whether ::std::wstring is available, so we need\n// to figure it out.\n// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring\n//   is available.\n\n// Cygwin 1.7 and below doesn't support ::std::wstring.\n// Solaris' libc++ doesn't support it either.  Android has\n// no support for it at least as recent as Froyo (2.2).\n# define GTEST_HAS_STD_WSTRING \\\n    (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS))\n\n#endif  // GTEST_HAS_STD_WSTRING\n\n#ifndef GTEST_HAS_GLOBAL_WSTRING\n// The user didn't tell us whether ::wstring is available, so we need\n// to figure it out.\n# define GTEST_HAS_GLOBAL_WSTRING \\\n    (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING)\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n// Determines whether RTTI is available.\n#ifndef GTEST_HAS_RTTI\n// The user didn't tell us whether RTTI is enabled, so we need to\n// figure it out.\n\n# ifdef _MSC_VER\n\n#  ifdef _CPPRTTI  // MSVC defines this macro iff RTTI is enabled.\n#   define GTEST_HAS_RTTI 1\n#  else\n#   define GTEST_HAS_RTTI 0\n#  endif\n\n// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled.\n# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302)\n\n#  ifdef __GXX_RTTI\n// When building against STLport with the Android NDK and with\n// -frtti -fno-exceptions, the build fails at link time with undefined\n// references to __cxa_bad_typeid. Note sure if STL or toolchain bug,\n// so disable RTTI when detected.\n#   if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \\\n       !defined(__EXCEPTIONS)\n#    define GTEST_HAS_RTTI 0\n#   else\n#    define GTEST_HAS_RTTI 1\n#   endif  // GTEST_OS_LINUX_ANDROID && __STLPORT_MAJOR && !__EXCEPTIONS\n#  else\n#   define GTEST_HAS_RTTI 0\n#  endif  // __GXX_RTTI\n\n// Clang defines __GXX_RTTI starting with version 3.0, but its manual recommends\n// using has_feature instead. has_feature(cxx_rtti) is supported since 2.7, the\n// first version with C++ support.\n# elif defined(__clang__)\n\n#  define GTEST_HAS_RTTI __has_feature(cxx_rtti)\n\n// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if\n// both the typeid and dynamic_cast features are present.\n# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)\n\n#  ifdef __RTTI_ALL__\n#   define GTEST_HAS_RTTI 1\n#  else\n#   define GTEST_HAS_RTTI 0\n#  endif\n\n# else\n\n// For all other compilers, we assume RTTI is enabled.\n#  define GTEST_HAS_RTTI 1\n\n# endif  // _MSC_VER\n\n#endif  // GTEST_HAS_RTTI\n\n// It's this header's responsibility to #include <typeinfo> when RTTI\n// is enabled.\n#if GTEST_HAS_RTTI\n# include <typeinfo>\n#endif\n\n// Determines whether Google Test can use the pthreads library.\n#ifndef GTEST_HAS_PTHREAD\n// The user didn't tell us explicitly, so we assume pthreads support is\n// available on Linux and Mac.\n//\n// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0\n// to your compiler flags.\n# define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \\\n    || GTEST_OS_QNX)\n#endif  // GTEST_HAS_PTHREAD\n\n#if GTEST_HAS_PTHREAD\n// gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is\n// true.\n# include <pthread.h>  // NOLINT\n\n// For timespec and nanosleep, used below.\n# include <time.h>  // NOLINT\n#endif\n\n// Determines whether Google Test can use tr1/tuple.  You can define\n// this macro to 0 to prevent Google Test from using tuple (any\n// feature depending on tuple with be disabled in this mode).\n#ifndef GTEST_HAS_TR1_TUPLE\n# if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR)\n// STLport, provided with the Android NDK, has neither <tr1/tuple> or <tuple>.\n#  define GTEST_HAS_TR1_TUPLE 0\n# else\n// The user didn't tell us not to do it, so we assume it's OK.\n#  define GTEST_HAS_TR1_TUPLE 1\n# endif\n#endif  // GTEST_HAS_TR1_TUPLE\n\n// Determines whether Google Test's own tr1 tuple implementation\n// should be used.\n#ifndef GTEST_USE_OWN_TR1_TUPLE\n// The user didn't tell us, so we need to figure it out.\n\n// We use our own TR1 tuple if we aren't sure the user has an\n// implementation of it already.  At this time, libstdc++ 4.0.0+ and\n// MSVC 2010 are the only mainstream standard libraries that come\n// with a TR1 tuple implementation.  NVIDIA's CUDA NVCC compiler\n// pretends to be GCC by defining __GNUC__ and friends, but cannot\n// compile GCC's tuple implementation.  MSVC 2008 (9.0) provides TR1\n// tuple in a 323 MB Feature Pack download, which we cannot assume the\n// user has.  QNX's QCC compiler is a modified GCC but it doesn't\n// support TR1 tuple.  libc++ only provides std::tuple, in C++11 mode,\n// and it can be used with some compilers that define __GNUC__.\n# if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \\\n      && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) || _MSC_VER >= 1600\n#  define GTEST_ENV_HAS_TR1_TUPLE_ 1\n# endif\n\n// C++11 specifies that <tuple> provides std::tuple. Use that if gtest is used\n// in C++11 mode and libstdc++ isn't very old (binaries targeting OS X 10.6\n// can build with clang but need to use gcc4.2's libstdc++).\n# if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325)\n#  define GTEST_ENV_HAS_STD_TUPLE_ 1\n# endif\n\n# if GTEST_ENV_HAS_TR1_TUPLE_ || GTEST_ENV_HAS_STD_TUPLE_\n#  define GTEST_USE_OWN_TR1_TUPLE 0\n# else\n#  define GTEST_USE_OWN_TR1_TUPLE 1\n# endif\n\n#endif  // GTEST_USE_OWN_TR1_TUPLE\n\n// To avoid conditional compilation everywhere, we make it\n// gtest-port.h's responsibility to #include the header implementing\n// tr1/tuple.\n#if GTEST_HAS_TR1_TUPLE\n\n# if GTEST_USE_OWN_TR1_TUPLE\n#  include \"gtest/internal/gtest-tuple.h\"\n# elif GTEST_ENV_HAS_STD_TUPLE_\n#  include <tuple>\n// C++11 puts its tuple into the ::std namespace rather than\n// ::std::tr1.  gtest expects tuple to live in ::std::tr1, so put it there.\n// This causes undefined behavior, but supported compilers react in\n// the way we intend.\nnamespace std {\nnamespace tr1 {\nusing ::std::get;\nusing ::std::make_tuple;\nusing ::std::tuple;\nusing ::std::tuple_element;\nusing ::std::tuple_size;\n}\n}\n\n# elif GTEST_OS_SYMBIAN\n\n// On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to\n// use STLport's tuple implementation, which unfortunately doesn't\n// work as the copy of STLport distributed with Symbian is incomplete.\n// By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to\n// use its own tuple implementation.\n#  ifdef BOOST_HAS_TR1_TUPLE\n#   undef BOOST_HAS_TR1_TUPLE\n#  endif  // BOOST_HAS_TR1_TUPLE\n\n// This prevents <boost/tr1/detail/config.hpp>, which defines\n// BOOST_HAS_TR1_TUPLE, from being #included by Boost's <tuple>.\n#  define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED\n#  include <tuple>\n\n# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000)\n// GCC 4.0+ implements tr1/tuple in the <tr1/tuple> header.  This does\n// not conform to the TR1 spec, which requires the header to be <tuple>.\n\n#  if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302\n// Until version 4.3.2, gcc has a bug that causes <tr1/functional>,\n// which is #included by <tr1/tuple>, to not compile when RTTI is\n// disabled.  _TR1_FUNCTIONAL is the header guard for\n// <tr1/functional>.  Hence the following #define is a hack to prevent\n// <tr1/functional> from being included.\n#   define _TR1_FUNCTIONAL 1\n#   include <tr1/tuple>\n#   undef _TR1_FUNCTIONAL  // Allows the user to #include\n                        // <tr1/functional> if he chooses to.\n#  else\n#   include <tr1/tuple>  // NOLINT\n#  endif  // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302\n\n# else\n// If the compiler is not GCC 4.0+, we assume the user is using a\n// spec-conforming TR1 implementation.\n#  include <tuple>  // NOLINT\n# endif  // GTEST_USE_OWN_TR1_TUPLE\n\n#endif  // GTEST_HAS_TR1_TUPLE\n\n// Determines whether clone(2) is supported.\n// Usually it will only be available on Linux, excluding\n// Linux on the Itanium architecture.\n// Also see http://linux.die.net/man/2/clone.\n#ifndef GTEST_HAS_CLONE\n// The user didn't tell us, so we need to figure it out.\n\n# if GTEST_OS_LINUX && !defined(__ia64__)\n#  if GTEST_OS_LINUX_ANDROID\n// On Android, clone() is only available on ARM starting with Gingerbread.\n#    if defined(__arm__) && __ANDROID_API__ >= 9\n#     define GTEST_HAS_CLONE 1\n#    else\n#     define GTEST_HAS_CLONE 0\n#    endif\n#  else\n#   define GTEST_HAS_CLONE 1\n#  endif\n# else\n#  define GTEST_HAS_CLONE 0\n# endif  // GTEST_OS_LINUX && !defined(__ia64__)\n\n#endif  // GTEST_HAS_CLONE\n\n// Determines whether to support stream redirection. This is used to test\n// output correctness and to implement death tests.\n#ifndef GTEST_HAS_STREAM_REDIRECTION\n// By default, we assume that stream redirection is supported on all\n// platforms except known mobile ones.\n# if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN\n#  define GTEST_HAS_STREAM_REDIRECTION 0\n# else\n#  define GTEST_HAS_STREAM_REDIRECTION 1\n# endif  // !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN\n#endif  // GTEST_HAS_STREAM_REDIRECTION\n\n// Determines whether to support death tests.\n// Google Test does not support death tests for VC 7.1 and earlier as\n// abort() in a VC 7.1 application compiled as GUI in debug config\n// pops up a dialog window that cannot be suppressed programmatically.\n#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \\\n     (GTEST_OS_MAC && !GTEST_OS_IOS) || GTEST_OS_IOS_SIMULATOR || \\\n     (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \\\n     GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \\\n     GTEST_OS_OPENBSD || GTEST_OS_QNX)\n# define GTEST_HAS_DEATH_TEST 1\n# include <vector>  // NOLINT\n#endif\n\n// We don't support MSVC 7.1 with exceptions disabled now.  Therefore\n// all the compilers we care about are adequate for supporting\n// value-parameterized tests.\n#define GTEST_HAS_PARAM_TEST 1\n\n// Determines whether to support type-driven tests.\n\n// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,\n// Sun Pro CC, IBM Visual Age, and HP aCC support.\n#if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \\\n    defined(__IBMCPP__) || defined(__HP_aCC)\n# define GTEST_HAS_TYPED_TEST 1\n# define GTEST_HAS_TYPED_TEST_P 1\n#endif\n\n// Determines whether to support Combine(). This only makes sense when\n// value-parameterized tests are enabled.  The implementation doesn't\n// work on Sun Studio since it doesn't understand templated conversion\n// operators.\n#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC)\n# define GTEST_HAS_COMBINE 1\n#endif\n\n// Determines whether the system compiler uses UTF-16 for encoding wide strings.\n#define GTEST_WIDE_STRING_USES_UTF16_ \\\n    (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)\n\n// Determines whether test results can be streamed to a socket.\n#if GTEST_OS_LINUX\n# define GTEST_CAN_STREAM_RESULTS_ 1\n#endif\n\n// Defines some utility macros.\n\n// The GNU compiler emits a warning if nested \"if\" statements are followed by\n// an \"else\" statement and braces are not used to explicitly disambiguate the\n// \"else\" binding.  This leads to problems with code like:\n//\n//   if (gate)\n//     ASSERT_*(condition) << \"Some message\";\n//\n// The \"switch (0) case 0:\" idiom is used to suppress this.\n#ifdef __INTEL_COMPILER\n# define GTEST_AMBIGUOUS_ELSE_BLOCKER_\n#else\n# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default:  // NOLINT\n#endif\n\n// Use this annotation at the end of a struct/class definition to\n// prevent the compiler from optimizing away instances that are never\n// used.  This is useful when all interesting logic happens inside the\n// c'tor and / or d'tor.  Example:\n//\n//   struct Foo {\n//     Foo() { ... }\n//   } GTEST_ATTRIBUTE_UNUSED_;\n//\n// Also use it after a variable or parameter declaration to tell the\n// compiler the variable/parameter does not have to be used.\n#if defined(__GNUC__) && !defined(COMPILER_ICC)\n# define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))\n#else\n# define GTEST_ATTRIBUTE_UNUSED_\n#endif\n\n// A macro to disallow operator=\n// This should be used in the private: declarations for a class.\n#define GTEST_DISALLOW_ASSIGN_(type)\\\n  void operator=(type const &)\n\n// A macro to disallow copy constructor and operator=\n// This should be used in the private: declarations for a class.\n#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\\\n  type(type const &);\\\n  GTEST_DISALLOW_ASSIGN_(type)\n\n// Tell the compiler to warn about unused return values for functions declared\n// with this macro.  The macro should be used on function declarations\n// following the argument list:\n//\n//   Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_;\n#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC)\n# define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result))\n#else\n# define GTEST_MUST_USE_RESULT_\n#endif  // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC\n\n// Determine whether the compiler supports Microsoft's Structured Exception\n// Handling.  This is supported by several Windows compilers but generally\n// does not exist on any other system.\n#ifndef GTEST_HAS_SEH\n// The user didn't tell us, so we need to figure it out.\n\n# if defined(_MSC_VER) || defined(__BORLANDC__)\n// These two compilers are known to support SEH.\n#  define GTEST_HAS_SEH 1\n# else\n// Assume no SEH.\n#  define GTEST_HAS_SEH 0\n# endif\n\n#endif  // GTEST_HAS_SEH\n\n#ifdef _MSC_VER\n\n# if GTEST_LINKED_AS_SHARED_LIBRARY\n#  define GTEST_API_ __declspec(dllimport)\n# elif GTEST_CREATE_SHARED_LIBRARY\n#  define GTEST_API_ __declspec(dllexport)\n# endif\n\n#endif  // _MSC_VER\n\n#ifndef GTEST_API_\n# define GTEST_API_\n#endif\n\n#ifdef __GNUC__\n// Ask the compiler to never inline a given function.\n# define GTEST_NO_INLINE_ __attribute__((noinline))\n#else\n# define GTEST_NO_INLINE_\n#endif\n\n// _LIBCPP_VERSION is defined by the libc++ library from the LLVM project.\n#if defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)\n# define GTEST_HAS_CXXABI_H_ 1\n#else\n# define GTEST_HAS_CXXABI_H_ 0\n#endif\n\nnamespace testing {\n\nclass Message;\n\nnamespace internal {\n\n// A secret type that Google Test users don't know about.  It has no\n// definition on purpose.  Therefore it's impossible to create a\n// Secret object, which is what we want.\nclass Secret;\n\n// The GTEST_COMPILE_ASSERT_ macro can be used to verify that a compile time\n// expression is true. For example, you could use it to verify the\n// size of a static array:\n//\n//   GTEST_COMPILE_ASSERT_(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,\n//                         content_type_names_incorrect_size);\n//\n// or to make sure a struct is smaller than a certain size:\n//\n//   GTEST_COMPILE_ASSERT_(sizeof(foo) < 128, foo_too_large);\n//\n// The second argument to the macro is the name of the variable. If\n// the expression is false, most compilers will issue a warning/error\n// containing the name of the variable.\n\ntemplate <bool>\nstruct CompileAssert {\n};\n\n#define GTEST_COMPILE_ASSERT_(expr, msg) \\\n  typedef ::testing::internal::CompileAssert<(static_cast<bool>(expr))> \\\n      msg[static_cast<bool>(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_\n\n// Implementation details of GTEST_COMPILE_ASSERT_:\n//\n// - GTEST_COMPILE_ASSERT_ works by defining an array type that has -1\n//   elements (and thus is invalid) when the expression is false.\n//\n// - The simpler definition\n//\n//    #define GTEST_COMPILE_ASSERT_(expr, msg) typedef char msg[(expr) ? 1 : -1]\n//\n//   does not work, as gcc supports variable-length arrays whose sizes\n//   are determined at run-time (this is gcc's extension and not part\n//   of the C++ standard).  As a result, gcc fails to reject the\n//   following code with the simple definition:\n//\n//     int foo;\n//     GTEST_COMPILE_ASSERT_(foo, msg); // not supposed to compile as foo is\n//                                      // not a compile-time constant.\n//\n// - By using the type CompileAssert<(bool(expr))>, we ensures that\n//   expr is a compile-time constant.  (Template arguments must be\n//   determined at compile-time.)\n//\n// - The outter parentheses in CompileAssert<(bool(expr))> are necessary\n//   to work around a bug in gcc 3.4.4 and 4.0.1.  If we had written\n//\n//     CompileAssert<bool(expr)>\n//\n//   instead, these compilers will refuse to compile\n//\n//     GTEST_COMPILE_ASSERT_(5 > 0, some_message);\n//\n//   (They seem to think the \">\" in \"5 > 0\" marks the end of the\n//   template argument list.)\n//\n// - The array size is (bool(expr) ? 1 : -1), instead of simply\n//\n//     ((expr) ? 1 : -1).\n//\n//   This is to avoid running into a bug in MS VC 7.1, which\n//   causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.\n\n// StaticAssertTypeEqHelper is used by StaticAssertTypeEq defined in gtest.h.\n//\n// This template is declared, but intentionally undefined.\ntemplate <typename T1, typename T2>\nstruct StaticAssertTypeEqHelper;\n\ntemplate <typename T>\nstruct StaticAssertTypeEqHelper<T, T> {};\n\n#if GTEST_HAS_GLOBAL_STRING\ntypedef ::string string;\n#else\ntypedef ::std::string string;\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n#if GTEST_HAS_GLOBAL_WSTRING\ntypedef ::wstring wstring;\n#elif GTEST_HAS_STD_WSTRING\ntypedef ::std::wstring wstring;\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n// A helper for suppressing warnings on constant condition.  It just\n// returns 'condition'.\nGTEST_API_ bool IsTrue(bool condition);\n\n// Defines scoped_ptr.\n\n// This implementation of scoped_ptr is PARTIAL - it only contains\n// enough stuff to satisfy Google Test's need.\ntemplate <typename T>\nclass scoped_ptr {\n public:\n  typedef T element_type;\n\n  explicit scoped_ptr(T* p = NULL) : ptr_(p) {}\n  ~scoped_ptr() { reset(); }\n\n  T& operator*() const { return *ptr_; }\n  T* operator->() const { return ptr_; }\n  T* get() const { return ptr_; }\n\n  T* release() {\n    T* const ptr = ptr_;\n    ptr_ = NULL;\n    return ptr;\n  }\n\n  void reset(T* p = NULL) {\n    if (p != ptr_) {\n      if (IsTrue(sizeof(T) > 0)) {  // Makes sure T is a complete type.\n        delete ptr_;\n      }\n      ptr_ = p;\n    }\n  }\n\n private:\n  T* ptr_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(scoped_ptr);\n};\n\n// Defines RE.\n\n// A simple C++ wrapper for <regex.h>.  It uses the POSIX Extended\n// Regular Expression syntax.\nclass GTEST_API_ RE {\n public:\n  // A copy constructor is required by the Standard to initialize object\n  // references from r-values.\n  RE(const RE& other) { Init(other.pattern()); }\n\n  // Constructs an RE from a string.\n  RE(const ::std::string& regex) { Init(regex.c_str()); }  // NOLINT\n\n#if GTEST_HAS_GLOBAL_STRING\n\n  RE(const ::string& regex) { Init(regex.c_str()); }  // NOLINT\n\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n  RE(const char* regex) { Init(regex); }  // NOLINT\n  ~RE();\n\n  // Returns the string representation of the regex.\n  const char* pattern() const { return pattern_; }\n\n  // FullMatch(str, re) returns true iff regular expression re matches\n  // the entire str.\n  // PartialMatch(str, re) returns true iff regular expression re\n  // matches a substring of str (including str itself).\n  //\n  // TODO(wan@google.com): make FullMatch() and PartialMatch() work\n  // when str contains NUL characters.\n  static bool FullMatch(const ::std::string& str, const RE& re) {\n    return FullMatch(str.c_str(), re);\n  }\n  static bool PartialMatch(const ::std::string& str, const RE& re) {\n    return PartialMatch(str.c_str(), re);\n  }\n\n#if GTEST_HAS_GLOBAL_STRING\n\n  static bool FullMatch(const ::string& str, const RE& re) {\n    return FullMatch(str.c_str(), re);\n  }\n  static bool PartialMatch(const ::string& str, const RE& re) {\n    return PartialMatch(str.c_str(), re);\n  }\n\n#endif  // GTEST_HAS_GLOBAL_STRING\n\n  static bool FullMatch(const char* str, const RE& re);\n  static bool PartialMatch(const char* str, const RE& re);\n\n private:\n  void Init(const char* regex);\n\n  // We use a const char* instead of an std::string, as Google Test used to be\n  // used where std::string is not available.  TODO(wan@google.com): change to\n  // std::string.\n  const char* pattern_;\n  bool is_valid_;\n\n#if GTEST_USES_POSIX_RE\n\n  regex_t full_regex_;     // For FullMatch().\n  regex_t partial_regex_;  // For PartialMatch().\n\n#else  // GTEST_USES_SIMPLE_RE\n\n  const char* full_pattern_;  // For FullMatch();\n\n#endif\n\n  GTEST_DISALLOW_ASSIGN_(RE);\n};\n\n// Formats a source file path and a line number as they would appear\n// in an error message from the compiler used to compile this code.\nGTEST_API_ ::std::string FormatFileLocation(const char* file, int line);\n\n// Formats a file location for compiler-independent XML output.\n// Although this function is not platform dependent, we put it next to\n// FormatFileLocation in order to contrast the two functions.\nGTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file,\n                                                               int line);\n\n// Defines logging utilities:\n//   GTEST_LOG_(severity) - logs messages at the specified severity level. The\n//                          message itself is streamed into the macro.\n//   LogToStderr()  - directs all log messages to stderr.\n//   FlushInfoLog() - flushes informational log messages.\n\nenum GTestLogSeverity {\n  GTEST_INFO,\n  GTEST_WARNING,\n  GTEST_ERROR,\n  GTEST_FATAL\n};\n\n// Formats log entry severity, provides a stream object for streaming the\n// log message, and terminates the message with a newline when going out of\n// scope.\nclass GTEST_API_ GTestLog {\n public:\n  GTestLog(GTestLogSeverity severity, const char* file, int line);\n\n  // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.\n  ~GTestLog();\n\n  ::std::ostream& GetStream() { return ::std::cerr; }\n\n private:\n  const GTestLogSeverity severity_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog);\n};\n\n#define GTEST_LOG_(severity) \\\n    ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \\\n                                  __FILE__, __LINE__).GetStream()\n\ninline void LogToStderr() {}\ninline void FlushInfoLog() { fflush(NULL); }\n\n// INTERNAL IMPLEMENTATION - DO NOT USE.\n//\n// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition\n// is not satisfied.\n//  Synopsys:\n//    GTEST_CHECK_(boolean_condition);\n//     or\n//    GTEST_CHECK_(boolean_condition) << \"Additional message\";\n//\n//    This checks the condition and if the condition is not satisfied\n//    it prints message about the condition violation, including the\n//    condition itself, plus additional message streamed into it, if any,\n//    and then it aborts the program. It aborts the program irrespective of\n//    whether it is built in the debug mode or not.\n#define GTEST_CHECK_(condition) \\\n    GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\\n    if (::testing::internal::IsTrue(condition)) \\\n      ; \\\n    else \\\n      GTEST_LOG_(FATAL) << \"Condition \" #condition \" failed. \"\n\n// An all-mode assert to verify that the given POSIX-style function\n// call returns 0 (indicating success).  Known limitation: this\n// doesn't expand to a balanced 'if' statement, so enclose the macro\n// in {} if you need to use it as the only statement in an 'if'\n// branch.\n#define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \\\n  if (const int gtest_error = (posix_call)) \\\n    GTEST_LOG_(FATAL) << #posix_call << \"failed with error \" \\\n                      << gtest_error\n\n// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.\n//\n// Use ImplicitCast_ as a safe version of static_cast for upcasting in\n// the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a\n// const Foo*).  When you use ImplicitCast_, the compiler checks that\n// the cast is safe.  Such explicit ImplicitCast_s are necessary in\n// surprisingly many situations where C++ demands an exact type match\n// instead of an argument type convertable to a target type.\n//\n// The syntax for using ImplicitCast_ is the same as for static_cast:\n//\n//   ImplicitCast_<ToType>(expr)\n//\n// ImplicitCast_ would have been part of the C++ standard library,\n// but the proposal was submitted too late.  It will probably make\n// its way into the language in the future.\n//\n// This relatively ugly name is intentional. It prevents clashes with\n// similar functions users may have (e.g., implicit_cast). The internal\n// namespace alone is not enough because the function can be found by ADL.\ntemplate<typename To>\ninline To ImplicitCast_(To x) { return x; }\n\n// When you upcast (that is, cast a pointer from type Foo to type\n// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts\n// always succeed.  When you downcast (that is, cast a pointer from\n// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because\n// how do you know the pointer is really of type SubclassOfFoo?  It\n// could be a bare Foo, or of type DifferentSubclassOfFoo.  Thus,\n// when you downcast, you should use this macro.  In debug mode, we\n// use dynamic_cast<> to double-check the downcast is legal (we die\n// if it's not).  In normal mode, we do the efficient static_cast<>\n// instead.  Thus, it's important to test in debug mode to make sure\n// the cast is legal!\n//    This is the only place in the code we should use dynamic_cast<>.\n// In particular, you SHOULDN'T be using dynamic_cast<> in order to\n// do RTTI (eg code like this:\n//    if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);\n//    if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);\n// You should design the code some other way not to need this.\n//\n// This relatively ugly name is intentional. It prevents clashes with\n// similar functions users may have (e.g., down_cast). The internal\n// namespace alone is not enough because the function can be found by ADL.\ntemplate<typename To, typename From>  // use like this: DownCast_<T*>(foo);\ninline To DownCast_(From* f) {  // so we only accept pointers\n  // Ensures that To is a sub-type of From *.  This test is here only\n  // for compile-time type checking, and has no overhead in an\n  // optimized build at run-time, as it will be optimized away\n  // completely.\n  if (false) {\n    const To to = NULL;\n    ::testing::internal::ImplicitCast_<From*>(to);\n  }\n\n#if GTEST_HAS_RTTI\n  // RTTI: debug mode only!\n  GTEST_CHECK_(f == NULL || dynamic_cast<To>(f) != NULL);\n#endif\n  return static_cast<To>(f);\n}\n\n// Downcasts the pointer of type Base to Derived.\n// Derived must be a subclass of Base. The parameter MUST\n// point to a class of type Derived, not any subclass of it.\n// When RTTI is available, the function performs a runtime\n// check to enforce this.\ntemplate <class Derived, class Base>\nDerived* CheckedDowncastToActualType(Base* base) {\n#if GTEST_HAS_RTTI\n  GTEST_CHECK_(typeid(*base) == typeid(Derived));\n  return dynamic_cast<Derived*>(base);  // NOLINT\n#else\n  return static_cast<Derived*>(base);  // Poor man's downcast.\n#endif\n}\n\n#if GTEST_HAS_STREAM_REDIRECTION\n\n// Defines the stderr capturer:\n//   CaptureStdout     - starts capturing stdout.\n//   GetCapturedStdout - stops capturing stdout and returns the captured string.\n//   CaptureStderr     - starts capturing stderr.\n//   GetCapturedStderr - stops capturing stderr and returns the captured string.\n//\nGTEST_API_ void CaptureStdout();\nGTEST_API_ std::string GetCapturedStdout();\nGTEST_API_ void CaptureStderr();\nGTEST_API_ std::string GetCapturedStderr();\n\n#endif  // GTEST_HAS_STREAM_REDIRECTION\n\n\n#if GTEST_HAS_DEATH_TEST\n\nconst ::std::vector<testing::internal::string>& GetInjectableArgvs();\nvoid SetInjectableArgvs(const ::std::vector<testing::internal::string>*\n                             new_argvs);\n\n// A copy of all command line arguments.  Set by InitGoogleTest().\nextern ::std::vector<testing::internal::string> g_argvs;\n\n#endif  // GTEST_HAS_DEATH_TEST\n\n// Defines synchronization primitives.\n\n#if GTEST_HAS_PTHREAD\n\n// Sleeps for (roughly) n milli-seconds.  This function is only for\n// testing Google Test's own constructs.  Don't use it in user tests,\n// either directly or indirectly.\ninline void SleepMilliseconds(int n) {\n  const timespec time = {\n    0,                  // 0 seconds.\n    n * 1000L * 1000L,  // And n ms.\n  };\n  nanosleep(&time, NULL);\n}\n\n// Allows a controller thread to pause execution of newly created\n// threads until notified.  Instances of this class must be created\n// and destroyed in the controller thread.\n//\n// This class is only for testing Google Test's own constructs. Do not\n// use it in user tests, either directly or indirectly.\nclass Notification {\n public:\n  Notification() : notified_(false) {\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));\n  }\n  ~Notification() {\n    pthread_mutex_destroy(&mutex_);\n  }\n\n  // Notifies all threads created with this notification to start. Must\n  // be called from the controller thread.\n  void Notify() {\n    pthread_mutex_lock(&mutex_);\n    notified_ = true;\n    pthread_mutex_unlock(&mutex_);\n  }\n\n  // Blocks until the controller thread notifies. Must be called from a test\n  // thread.\n  void WaitForNotification() {\n    for (;;) {\n      pthread_mutex_lock(&mutex_);\n      const bool notified = notified_;\n      pthread_mutex_unlock(&mutex_);\n      if (notified)\n        break;\n      SleepMilliseconds(10);\n    }\n  }\n\n private:\n  pthread_mutex_t mutex_;\n  bool notified_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification);\n};\n\n// As a C-function, ThreadFuncWithCLinkage cannot be templated itself.\n// Consequently, it cannot select a correct instantiation of ThreadWithParam\n// in order to call its Run(). Introducing ThreadWithParamBase as a\n// non-templated base class for ThreadWithParam allows us to bypass this\n// problem.\nclass ThreadWithParamBase {\n public:\n  virtual ~ThreadWithParamBase() {}\n  virtual void Run() = 0;\n};\n\n// pthread_create() accepts a pointer to a function type with the C linkage.\n// According to the Standard (7.5/1), function types with different linkages\n// are different even if they are otherwise identical.  Some compilers (for\n// example, SunStudio) treat them as different types.  Since class methods\n// cannot be defined with C-linkage we need to define a free C-function to\n// pass into pthread_create().\nextern \"C\" inline void* ThreadFuncWithCLinkage(void* thread) {\n  static_cast<ThreadWithParamBase*>(thread)->Run();\n  return NULL;\n}\n\n// Helper class for testing Google Test's multi-threading constructs.\n// To use it, write:\n//\n//   void ThreadFunc(int param) { /* Do things with param */ }\n//   Notification thread_can_start;\n//   ...\n//   // The thread_can_start parameter is optional; you can supply NULL.\n//   ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);\n//   thread_can_start.Notify();\n//\n// These classes are only for testing Google Test's own constructs. Do\n// not use them in user tests, either directly or indirectly.\ntemplate <typename T>\nclass ThreadWithParam : public ThreadWithParamBase {\n public:\n  typedef void (*UserThreadFunc)(T);\n\n  ThreadWithParam(\n      UserThreadFunc func, T param, Notification* thread_can_start)\n      : func_(func),\n        param_(param),\n        thread_can_start_(thread_can_start),\n        finished_(false) {\n    ThreadWithParamBase* const base = this;\n    // The thread can be created only after all fields except thread_\n    // have been initialized.\n    GTEST_CHECK_POSIX_SUCCESS_(\n        pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base));\n  }\n  ~ThreadWithParam() { Join(); }\n\n  void Join() {\n    if (!finished_) {\n      GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, 0));\n      finished_ = true;\n    }\n  }\n\n  virtual void Run() {\n    if (thread_can_start_ != NULL)\n      thread_can_start_->WaitForNotification();\n    func_(param_);\n  }\n\n private:\n  const UserThreadFunc func_;  // User-supplied thread function.\n  const T param_;  // User-supplied parameter to the thread function.\n  // When non-NULL, used to block execution until the controller thread\n  // notifies.\n  Notification* const thread_can_start_;\n  bool finished_;  // true iff we know that the thread function has finished.\n  pthread_t thread_;  // The native thread object.\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);\n};\n\n// MutexBase and Mutex implement mutex on pthreads-based platforms. They\n// are used in conjunction with class MutexLock:\n//\n//   Mutex mutex;\n//   ...\n//   MutexLock lock(&mutex);  // Acquires the mutex and releases it at the end\n//                            // of the current scope.\n//\n// MutexBase implements behavior for both statically and dynamically\n// allocated mutexes.  Do not use MutexBase directly.  Instead, write\n// the following to define a static mutex:\n//\n//   GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex);\n//\n// You can forward declare a static mutex like this:\n//\n//   GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex);\n//\n// To create a dynamic mutex, just define an object of type Mutex.\nclass MutexBase {\n public:\n  // Acquires this mutex.\n  void Lock() {\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));\n    owner_ = pthread_self();\n    has_owner_ = true;\n  }\n\n  // Releases this mutex.\n  void Unlock() {\n    // Since the lock is being released the owner_ field should no longer be\n    // considered valid. We don't protect writing to has_owner_ here, as it's\n    // the caller's responsibility to ensure that the current thread holds the\n    // mutex when this is called.\n    has_owner_ = false;\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));\n  }\n\n  // Does nothing if the current thread holds the mutex. Otherwise, crashes\n  // with high probability.\n  void AssertHeld() const {\n    GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self()))\n        << \"The current thread is not holding the mutex @\" << this;\n  }\n\n  // A static mutex may be used before main() is entered.  It may even\n  // be used before the dynamic initialization stage.  Therefore we\n  // must be able to initialize a static mutex object at link time.\n  // This means MutexBase has to be a POD and its member variables\n  // have to be public.\n public:\n  pthread_mutex_t mutex_;  // The underlying pthread mutex.\n  // has_owner_ indicates whether the owner_ field below contains a valid thread\n  // ID and is therefore safe to inspect (e.g., to use in pthread_equal()). All\n  // accesses to the owner_ field should be protected by a check of this field.\n  // An alternative might be to memset() owner_ to all zeros, but there's no\n  // guarantee that a zero'd pthread_t is necessarily invalid or even different\n  // from pthread_self().\n  bool has_owner_;\n  pthread_t owner_;  // The thread holding the mutex.\n};\n\n// Forward-declares a static mutex.\n# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \\\n    extern ::testing::internal::MutexBase mutex\n\n// Defines and statically (i.e. at link time) initializes a static mutex.\n// The initialization list here does not explicitly initialize each field,\n// instead relying on default initialization for the unspecified fields. In\n// particular, the owner_ field (a pthread_t) is not explicitly initialized.\n// This allows initialization to work whether pthread_t is a scalar or struct.\n// The flag -Wmissing-field-initializers must not be specified for this to work.\n# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \\\n    ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false }\n\n// The Mutex class can only be used for mutexes created at runtime. It\n// shares its API with MutexBase otherwise.\nclass Mutex : public MutexBase {\n public:\n  Mutex() {\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));\n    has_owner_ = false;\n  }\n  ~Mutex() {\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_));\n  }\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);\n};\n\n// We cannot name this class MutexLock as the ctor declaration would\n// conflict with a macro named MutexLock, which is defined on some\n// platforms.  Hence the typedef trick below.\nclass GTestMutexLock {\n public:\n  explicit GTestMutexLock(MutexBase* mutex)\n      : mutex_(mutex) { mutex_->Lock(); }\n\n  ~GTestMutexLock() { mutex_->Unlock(); }\n\n private:\n  MutexBase* const mutex_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock);\n};\n\ntypedef GTestMutexLock MutexLock;\n\n// Helpers for ThreadLocal.\n\n// pthread_key_create() requires DeleteThreadLocalValue() to have\n// C-linkage.  Therefore it cannot be templatized to access\n// ThreadLocal<T>.  Hence the need for class\n// ThreadLocalValueHolderBase.\nclass ThreadLocalValueHolderBase {\n public:\n  virtual ~ThreadLocalValueHolderBase() {}\n};\n\n// Called by pthread to delete thread-local data stored by\n// pthread_setspecific().\nextern \"C\" inline void DeleteThreadLocalValue(void* value_holder) {\n  delete static_cast<ThreadLocalValueHolderBase*>(value_holder);\n}\n\n// Implements thread-local storage on pthreads-based systems.\n//\n//   // Thread 1\n//   ThreadLocal<int> tl(100);  // 100 is the default value for each thread.\n//\n//   // Thread 2\n//   tl.set(150);  // Changes the value for thread 2 only.\n//   EXPECT_EQ(150, tl.get());\n//\n//   // Thread 1\n//   EXPECT_EQ(100, tl.get());  // In thread 1, tl has the original value.\n//   tl.set(200);\n//   EXPECT_EQ(200, tl.get());\n//\n// The template type argument T must have a public copy constructor.\n// In addition, the default ThreadLocal constructor requires T to have\n// a public default constructor.\n//\n// An object managed for a thread by a ThreadLocal instance is deleted\n// when the thread exits.  Or, if the ThreadLocal instance dies in\n// that thread, when the ThreadLocal dies.  It's the user's\n// responsibility to ensure that all other threads using a ThreadLocal\n// have exited when it dies, or the per-thread objects for those\n// threads will not be deleted.\n//\n// Google Test only uses global ThreadLocal objects.  That means they\n// will die after main() has returned.  Therefore, no per-thread\n// object managed by Google Test will be leaked as long as all threads\n// using Google Test have exited when main() returns.\ntemplate <typename T>\nclass ThreadLocal {\n public:\n  ThreadLocal() : key_(CreateKey()),\n                  default_() {}\n  explicit ThreadLocal(const T& value) : key_(CreateKey()),\n                                         default_(value) {}\n\n  ~ThreadLocal() {\n    // Destroys the managed object for the current thread, if any.\n    DeleteThreadLocalValue(pthread_getspecific(key_));\n\n    // Releases resources associated with the key.  This will *not*\n    // delete managed objects for other threads.\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_));\n  }\n\n  T* pointer() { return GetOrCreateValue(); }\n  const T* pointer() const { return GetOrCreateValue(); }\n  const T& get() const { return *pointer(); }\n  void set(const T& value) { *pointer() = value; }\n\n private:\n  // Holds a value of type T.\n  class ValueHolder : public ThreadLocalValueHolderBase {\n   public:\n    explicit ValueHolder(const T& value) : value_(value) {}\n\n    T* pointer() { return &value_; }\n\n   private:\n    T value_;\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder);\n  };\n\n  static pthread_key_t CreateKey() {\n    pthread_key_t key;\n    // When a thread exits, DeleteThreadLocalValue() will be called on\n    // the object managed for that thread.\n    GTEST_CHECK_POSIX_SUCCESS_(\n        pthread_key_create(&key, &DeleteThreadLocalValue));\n    return key;\n  }\n\n  T* GetOrCreateValue() const {\n    ThreadLocalValueHolderBase* const holder =\n        static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_));\n    if (holder != NULL) {\n      return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();\n    }\n\n    ValueHolder* const new_holder = new ValueHolder(default_);\n    ThreadLocalValueHolderBase* const holder_base = new_holder;\n    GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base));\n    return new_holder->pointer();\n  }\n\n  // A key pthreads uses for looking up per-thread values.\n  const pthread_key_t key_;\n  const T default_;  // The default value for each thread.\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);\n};\n\n# define GTEST_IS_THREADSAFE 1\n\n#else  // GTEST_HAS_PTHREAD\n\n// A dummy implementation of synchronization primitives (mutex, lock,\n// and thread-local variable).  Necessary for compiling Google Test where\n// mutex is not supported - using Google Test in multiple threads is not\n// supported on such platforms.\n\nclass Mutex {\n public:\n  Mutex() {}\n  void Lock() {}\n  void Unlock() {}\n  void AssertHeld() const {}\n};\n\n# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \\\n  extern ::testing::internal::Mutex mutex\n\n# define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex\n\nclass GTestMutexLock {\n public:\n  explicit GTestMutexLock(Mutex*) {}  // NOLINT\n};\n\ntypedef GTestMutexLock MutexLock;\n\ntemplate <typename T>\nclass ThreadLocal {\n public:\n  ThreadLocal() : value_() {}\n  explicit ThreadLocal(const T& value) : value_(value) {}\n  T* pointer() { return &value_; }\n  const T* pointer() const { return &value_; }\n  const T& get() const { return value_; }\n  void set(const T& value) { value_ = value; }\n private:\n  T value_;\n};\n\n// The above synchronization primitives have dummy implementations.\n// Therefore Google Test is not thread-safe.\n# define GTEST_IS_THREADSAFE 0\n\n#endif  // GTEST_HAS_PTHREAD\n\n// Returns the number of threads running in the process, or 0 to indicate that\n// we cannot detect it.\nGTEST_API_ size_t GetThreadCount();\n\n// Passing non-POD classes through ellipsis (...) crashes the ARM\n// compiler and generates a warning in Sun Studio.  The Nokia Symbian\n// and the IBM XL C/C++ compiler try to instantiate a copy constructor\n// for objects passed through ellipsis (...), failing for uncopyable\n// objects.  We define this to ensure that only POD is passed through\n// ellipsis on these systems.\n#if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)\n// We lose support for NULL detection where the compiler doesn't like\n// passing non-POD classes through ellipsis (...).\n# define GTEST_ELLIPSIS_NEEDS_POD_ 1\n#else\n# define GTEST_CAN_COMPARE_NULL 1\n#endif\n\n// The Nokia Symbian and IBM XL C/C++ compilers cannot decide between\n// const T& and const T* in a function template.  These compilers\n// _can_ decide between class template specializations for T and T*,\n// so a tr1::type_traits-like is_pointer works.\n#if defined(__SYMBIAN32__) || defined(__IBMCPP__)\n# define GTEST_NEEDS_IS_POINTER_ 1\n#endif\n\ntemplate <bool bool_value>\nstruct bool_constant {\n  typedef bool_constant<bool_value> type;\n  static const bool value = bool_value;\n};\ntemplate <bool bool_value> const bool bool_constant<bool_value>::value;\n\ntypedef bool_constant<false> false_type;\ntypedef bool_constant<true> true_type;\n\ntemplate <typename T>\nstruct is_pointer : public false_type {};\n\ntemplate <typename T>\nstruct is_pointer<T*> : public true_type {};\n\ntemplate <typename Iterator>\nstruct IteratorTraits {\n  typedef typename Iterator::value_type value_type;\n};\n\ntemplate <typename T>\nstruct IteratorTraits<T*> {\n  typedef T value_type;\n};\n\ntemplate <typename T>\nstruct IteratorTraits<const T*> {\n  typedef T value_type;\n};\n\n#if GTEST_OS_WINDOWS\n# define GTEST_PATH_SEP_ \"\\\\\"\n# define GTEST_HAS_ALT_PATH_SEP_ 1\n// The biggest signed integer type the compiler supports.\ntypedef __int64 BiggestInt;\n#else\n# define GTEST_PATH_SEP_ \"/\"\n# define GTEST_HAS_ALT_PATH_SEP_ 0\ntypedef long long BiggestInt;  // NOLINT\n#endif  // GTEST_OS_WINDOWS\n\n// Utilities for char.\n\n// isspace(int ch) and friends accept an unsigned char or EOF.  char\n// may be signed, depending on the compiler (or compiler flags).\n// Therefore we need to cast a char to unsigned char before calling\n// isspace(), etc.\n\ninline bool IsAlpha(char ch) {\n  return isalpha(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsAlNum(char ch) {\n  return isalnum(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsDigit(char ch) {\n  return isdigit(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsLower(char ch) {\n  return islower(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsSpace(char ch) {\n  return isspace(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsUpper(char ch) {\n  return isupper(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsXDigit(char ch) {\n  return isxdigit(static_cast<unsigned char>(ch)) != 0;\n}\ninline bool IsXDigit(wchar_t ch) {\n  const unsigned char low_byte = static_cast<unsigned char>(ch);\n  return ch == low_byte && isxdigit(low_byte) != 0;\n}\n\ninline char ToLower(char ch) {\n  return static_cast<char>(tolower(static_cast<unsigned char>(ch)));\n}\ninline char ToUpper(char ch) {\n  return static_cast<char>(toupper(static_cast<unsigned char>(ch)));\n}\n\n// The testing::internal::posix namespace holds wrappers for common\n// POSIX functions.  These wrappers hide the differences between\n// Windows/MSVC and POSIX systems.  Since some compilers define these\n// standard functions as macros, the wrapper cannot have the same name\n// as the wrapped function.\n\nnamespace posix {\n\n// Functions with a different name on Windows.\n\n#if GTEST_OS_WINDOWS\n\ntypedef struct _stat StatStruct;\n\n# ifdef __BORLANDC__\ninline int IsATTY(int fd) { return isatty(fd); }\ninline int StrCaseCmp(const char* s1, const char* s2) {\n  return stricmp(s1, s2);\n}\ninline char* StrDup(const char* src) { return strdup(src); }\n# else  // !__BORLANDC__\n#  if GTEST_OS_WINDOWS_MOBILE\ninline int IsATTY(int /* fd */) { return 0; }\n#  else\ninline int IsATTY(int fd) { return _isatty(fd); }\n#  endif  // GTEST_OS_WINDOWS_MOBILE\ninline int StrCaseCmp(const char* s1, const char* s2) {\n  return _stricmp(s1, s2);\n}\ninline char* StrDup(const char* src) { return _strdup(src); }\n# endif  // __BORLANDC__\n\n# if GTEST_OS_WINDOWS_MOBILE\ninline int FileNo(FILE* file) { return reinterpret_cast<int>(_fileno(file)); }\n// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this\n// time and thus not defined there.\n# else\ninline int FileNo(FILE* file) { return _fileno(file); }\ninline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); }\ninline int RmDir(const char* dir) { return _rmdir(dir); }\ninline bool IsDir(const StatStruct& st) {\n  return (_S_IFDIR & st.st_mode) != 0;\n}\n# endif  // GTEST_OS_WINDOWS_MOBILE\n\n#else\n\ntypedef struct stat StatStruct;\n\ninline int FileNo(FILE* file) { return fileno(file); }\ninline int IsATTY(int fd) { return isatty(fd); }\ninline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); }\ninline int StrCaseCmp(const char* s1, const char* s2) {\n  return strcasecmp(s1, s2);\n}\ninline char* StrDup(const char* src) { return strdup(src); }\ninline int RmDir(const char* dir) { return rmdir(dir); }\ninline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }\n\n#endif  // GTEST_OS_WINDOWS\n\n// Functions deprecated by MSVC 8.0.\n\n#ifdef _MSC_VER\n// Temporarily disable warning 4996 (deprecated function).\n# pragma warning(push)\n# pragma warning(disable:4996)\n#endif\n\ninline const char* StrNCpy(char* dest, const char* src, size_t n) {\n  return strncpy(dest, src, n);\n}\n\n// ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and\n// StrError() aren't needed on Windows CE at this time and thus not\n// defined there.\n\n#if !GTEST_OS_WINDOWS_MOBILE\ninline int ChDir(const char* dir) { return chdir(dir); }\n#endif\ninline FILE* FOpen(const char* path, const char* mode) {\n  return fopen(path, mode);\n}\n#if !GTEST_OS_WINDOWS_MOBILE\ninline FILE *FReopen(const char* path, const char* mode, FILE* stream) {\n  return freopen(path, mode, stream);\n}\ninline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); }\n#endif\ninline int FClose(FILE* fp) { return fclose(fp); }\n#if !GTEST_OS_WINDOWS_MOBILE\ninline int Read(int fd, void* buf, unsigned int count) {\n  return static_cast<int>(read(fd, buf, count));\n}\ninline int Write(int fd, const void* buf, unsigned int count) {\n  return static_cast<int>(write(fd, buf, count));\n}\ninline int Close(int fd) { return close(fd); }\ninline const char* StrError(int errnum) { return strerror(errnum); }\n#endif\ninline const char* GetEnv(const char* name) {\n#if GTEST_OS_WINDOWS_MOBILE\n  // We are on Windows CE, which has no environment variables.\n  return NULL;\n#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)\n  // Environment variables which we programmatically clear will be set to the\n  // empty string rather than unset (NULL).  Handle that case.\n  const char* const env = getenv(name);\n  return (env != NULL && env[0] != '\\0') ? env : NULL;\n#else\n  return getenv(name);\n#endif\n}\n\n#ifdef _MSC_VER\n# pragma warning(pop)  // Restores the warning state.\n#endif\n\n#if GTEST_OS_WINDOWS_MOBILE\n// Windows CE has no C library. The abort() function is used in\n// several places in Google Test. This implementation provides a reasonable\n// imitation of standard behaviour.\nvoid Abort();\n#else\ninline void Abort() { abort(); }\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n}  // namespace posix\n\n// MSVC \"deprecates\" snprintf and issues warnings wherever it is used.  In\n// order to avoid these warnings, we need to use _snprintf or _snprintf_s on\n// MSVC-based platforms.  We map the GTEST_SNPRINTF_ macro to the appropriate\n// function in order to achieve that.  We use macro definition here because\n// snprintf is a variadic function.\n#if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE\n// MSVC 2005 and above support variadic macros.\n# define GTEST_SNPRINTF_(buffer, size, format, ...) \\\n     _snprintf_s(buffer, size, size, format, __VA_ARGS__)\n#elif defined(_MSC_VER)\n// Windows CE does not define _snprintf_s and MSVC prior to 2005 doesn't\n// complain about _snprintf.\n# define GTEST_SNPRINTF_ _snprintf\n#else\n# define GTEST_SNPRINTF_ snprintf\n#endif\n\n// The maximum number a BiggestInt can represent.  This definition\n// works no matter BiggestInt is represented in one's complement or\n// two's complement.\n//\n// We cannot rely on numeric_limits in STL, as __int64 and long long\n// are not part of standard C++ and numeric_limits doesn't need to be\n// defined for them.\nconst BiggestInt kMaxBiggestInt =\n    ~(static_cast<BiggestInt>(1) << (8*sizeof(BiggestInt) - 1));\n\n// This template class serves as a compile-time function from size to\n// type.  It maps a size in bytes to a primitive type with that\n// size. e.g.\n//\n//   TypeWithSize<4>::UInt\n//\n// is typedef-ed to be unsigned int (unsigned integer made up of 4\n// bytes).\n//\n// Such functionality should belong to STL, but I cannot find it\n// there.\n//\n// Google Test uses this class in the implementation of floating-point\n// comparison.\n//\n// For now it only handles UInt (unsigned int) as that's all Google Test\n// needs.  Other types can be easily added in the future if need\n// arises.\ntemplate <size_t size>\nclass TypeWithSize {\n public:\n  // This prevents the user from using TypeWithSize<N> with incorrect\n  // values of N.\n  typedef void UInt;\n};\n\n// The specialization for size 4.\ntemplate <>\nclass TypeWithSize<4> {\n public:\n  // unsigned int has size 4 in both gcc and MSVC.\n  //\n  // As base/basictypes.h doesn't compile on Windows, we cannot use\n  // uint32, uint64, and etc here.\n  typedef int Int;\n  typedef unsigned int UInt;\n};\n\n// The specialization for size 8.\ntemplate <>\nclass TypeWithSize<8> {\n public:\n#if GTEST_OS_WINDOWS\n  typedef __int64 Int;\n  typedef unsigned __int64 UInt;\n#else\n  typedef long long Int;  // NOLINT\n  typedef unsigned long long UInt;  // NOLINT\n#endif  // GTEST_OS_WINDOWS\n};\n\n// Integer types of known sizes.\ntypedef TypeWithSize<4>::Int Int32;\ntypedef TypeWithSize<4>::UInt UInt32;\ntypedef TypeWithSize<8>::Int Int64;\ntypedef TypeWithSize<8>::UInt UInt64;\ntypedef TypeWithSize<8>::Int TimeInMillis;  // Represents time in milliseconds.\n\n// Utilities for command line flags and environment variables.\n\n// Macro for referencing flags.\n#define GTEST_FLAG(name) FLAGS_gtest_##name\n\n// Macros for declaring flags.\n#define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name)\n#define GTEST_DECLARE_int32_(name) \\\n    GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)\n#define GTEST_DECLARE_string_(name) \\\n    GTEST_API_ extern ::std::string GTEST_FLAG(name)\n\n// Macros for defining flags.\n#define GTEST_DEFINE_bool_(name, default_val, doc) \\\n    GTEST_API_ bool GTEST_FLAG(name) = (default_val)\n#define GTEST_DEFINE_int32_(name, default_val, doc) \\\n    GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)\n#define GTEST_DEFINE_string_(name, default_val, doc) \\\n    GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val)\n\n// Thread annotations\n#define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)\n#define GTEST_LOCK_EXCLUDED_(locks)\n\n// Parses 'str' for a 32-bit signed integer.  If successful, writes the result\n// to *value and returns true; otherwise leaves *value unchanged and returns\n// false.\n// TODO(chandlerc): Find a better way to refactor flag and environment parsing\n// out of both gtest-port.cc and gtest.cc to avoid exporting this utility\n// function.\nbool ParseInt32(const Message& src_text, const char* str, Int32* value);\n\n// Parses a bool/Int32/string from the environment variable\n// corresponding to the given Google Test flag.\nbool BoolFromGTestEnv(const char* flag, bool default_val);\nGTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val);\nconst char* StringFromGTestEnv(const char* flag, const char* default_val);\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-string.h",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)\n//\n// The Google C++ Testing Framework (Google Test)\n//\n// This header file declares the String class and functions used internally by\n// Google Test.  They are subject to change without notice. They should not used\n// by code external to Google Test.\n//\n// This header file is #included by <gtest/internal/gtest-internal.h>.\n// It should not be #included by other files.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_\n\n#ifdef __BORLANDC__\n// string.h is not guaranteed to provide strcpy on C++ Builder.\n# include <mem.h>\n#endif\n\n#include <string.h>\n#include <string>\n\n#include \"gtest/internal/gtest-port.h\"\n\nnamespace testing {\nnamespace internal {\n\n// String - an abstract class holding static string utilities.\nclass GTEST_API_ String {\n public:\n  // Static utility methods\n\n  // Clones a 0-terminated C string, allocating memory using new.  The\n  // caller is responsible for deleting the return value using\n  // delete[].  Returns the cloned string, or NULL if the input is\n  // NULL.\n  //\n  // This is different from strdup() in string.h, which allocates\n  // memory using malloc().\n  static const char* CloneCString(const char* c_str);\n\n#if GTEST_OS_WINDOWS_MOBILE\n  // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be\n  // able to pass strings to Win32 APIs on CE we need to convert them\n  // to 'Unicode', UTF-16.\n\n  // Creates a UTF-16 wide string from the given ANSI string, allocating\n  // memory using new. The caller is responsible for deleting the return\n  // value using delete[]. Returns the wide string, or NULL if the\n  // input is NULL.\n  //\n  // The wide string is created using the ANSI codepage (CP_ACP) to\n  // match the behaviour of the ANSI versions of Win32 calls and the\n  // C runtime.\n  static LPCWSTR AnsiToUtf16(const char* c_str);\n\n  // Creates an ANSI string from the given wide string, allocating\n  // memory using new. The caller is responsible for deleting the return\n  // value using delete[]. Returns the ANSI string, or NULL if the\n  // input is NULL.\n  //\n  // The returned string is created using the ANSI codepage (CP_ACP) to\n  // match the behaviour of the ANSI versions of Win32 calls and the\n  // C runtime.\n  static const char* Utf16ToAnsi(LPCWSTR utf16_str);\n#endif\n\n  // Compares two C strings.  Returns true iff they have the same content.\n  //\n  // Unlike strcmp(), this function can handle NULL argument(s).  A\n  // NULL C string is considered different to any non-NULL C string,\n  // including the empty string.\n  static bool CStringEquals(const char* lhs, const char* rhs);\n\n  // Converts a wide C string to a String using the UTF-8 encoding.\n  // NULL will be converted to \"(null)\".  If an error occurred during\n  // the conversion, \"(failed to convert from wide string)\" is\n  // returned.\n  static std::string ShowWideCString(const wchar_t* wide_c_str);\n\n  // Compares two wide C strings.  Returns true iff they have the same\n  // content.\n  //\n  // Unlike wcscmp(), this function can handle NULL argument(s).  A\n  // NULL C string is considered different to any non-NULL C string,\n  // including the empty string.\n  static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);\n\n  // Compares two C strings, ignoring case.  Returns true iff they\n  // have the same content.\n  //\n  // Unlike strcasecmp(), this function can handle NULL argument(s).\n  // A NULL C string is considered different to any non-NULL C string,\n  // including the empty string.\n  static bool CaseInsensitiveCStringEquals(const char* lhs,\n                                           const char* rhs);\n\n  // Compares two wide C strings, ignoring case.  Returns true iff they\n  // have the same content.\n  //\n  // Unlike wcscasecmp(), this function can handle NULL argument(s).\n  // A NULL C string is considered different to any non-NULL wide C string,\n  // including the empty string.\n  // NB: The implementations on different platforms slightly differ.\n  // On windows, this method uses _wcsicmp which compares according to LC_CTYPE\n  // environment variable. On GNU platform this method uses wcscasecmp\n  // which compares according to LC_CTYPE category of the current locale.\n  // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the\n  // current locale.\n  static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs,\n                                               const wchar_t* rhs);\n\n  // Returns true iff the given string ends with the given suffix, ignoring\n  // case. Any string is considered to end with an empty suffix.\n  static bool EndsWithCaseInsensitive(\n      const std::string& str, const std::string& suffix);\n\n  // Formats an int value as \"%02d\".\n  static std::string FormatIntWidth2(int value);  // \"%02d\" for width == 2\n\n  // Formats an int value as \"%X\".\n  static std::string FormatHexInt(int value);\n\n  // Formats a byte as \"%02X\".\n  static std::string FormatByte(unsigned char value);\n\n private:\n  String();  // Not meant to be instantiated.\n};  // class String\n\n// Gets the content of the stringstream's buffer as an std::string.  Each '\\0'\n// character in the buffer is replaced with \"\\\\0\".\nGTEST_API_ std::string StringStreamToString(::std::stringstream* stream);\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-tuple.h",
    "content": "// This file was GENERATED by command:\n//     pump.py gtest-tuple.h.pump\n// DO NOT EDIT BY HAND!!!\n\n// Copyright 2009 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n\n// Implements a subset of TR1 tuple needed by Google Test and Google Mock.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_\n\n#include <utility>  // For ::std::pair.\n\n// The compiler used in Symbian has a bug that prevents us from declaring the\n// tuple template as a friend (it complains that tuple is redefined).  This\n// hack bypasses the bug by declaring the members that should otherwise be\n// private as public.\n// Sun Studio versions < 12 also have the above bug.\n#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)\n# define GTEST_DECLARE_TUPLE_AS_FRIEND_ public:\n#else\n# define GTEST_DECLARE_TUPLE_AS_FRIEND_ \\\n    template <GTEST_10_TYPENAMES_(U)> friend class tuple; \\\n   private:\n#endif\n\n// GTEST_n_TUPLE_(T) is the type of an n-tuple.\n#define GTEST_0_TUPLE_(T) tuple<>\n#define GTEST_1_TUPLE_(T) tuple<T##0, void, void, void, void, void, void, \\\n    void, void, void>\n#define GTEST_2_TUPLE_(T) tuple<T##0, T##1, void, void, void, void, void, \\\n    void, void, void>\n#define GTEST_3_TUPLE_(T) tuple<T##0, T##1, T##2, void, void, void, void, \\\n    void, void, void>\n#define GTEST_4_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, void, void, void, \\\n    void, void, void>\n#define GTEST_5_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, void, void, \\\n    void, void, void>\n#define GTEST_6_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, void, \\\n    void, void, void>\n#define GTEST_7_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \\\n    void, void, void>\n#define GTEST_8_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \\\n    T##7, void, void>\n#define GTEST_9_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \\\n    T##7, T##8, void>\n#define GTEST_10_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \\\n    T##7, T##8, T##9>\n\n// GTEST_n_TYPENAMES_(T) declares a list of n typenames.\n#define GTEST_0_TYPENAMES_(T)\n#define GTEST_1_TYPENAMES_(T) typename T##0\n#define GTEST_2_TYPENAMES_(T) typename T##0, typename T##1\n#define GTEST_3_TYPENAMES_(T) typename T##0, typename T##1, typename T##2\n#define GTEST_4_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \\\n    typename T##3\n#define GTEST_5_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \\\n    typename T##3, typename T##4\n#define GTEST_6_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \\\n    typename T##3, typename T##4, typename T##5\n#define GTEST_7_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \\\n    typename T##3, typename T##4, typename T##5, typename T##6\n#define GTEST_8_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \\\n    typename T##3, typename T##4, typename T##5, typename T##6, typename T##7\n#define GTEST_9_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \\\n    typename T##3, typename T##4, typename T##5, typename T##6, \\\n    typename T##7, typename T##8\n#define GTEST_10_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \\\n    typename T##3, typename T##4, typename T##5, typename T##6, \\\n    typename T##7, typename T##8, typename T##9\n\n// In theory, defining stuff in the ::std namespace is undefined\n// behavior.  We can do this as we are playing the role of a standard\n// library vendor.\nnamespace std {\nnamespace tr1 {\n\ntemplate <typename T0 = void, typename T1 = void, typename T2 = void,\n    typename T3 = void, typename T4 = void, typename T5 = void,\n    typename T6 = void, typename T7 = void, typename T8 = void,\n    typename T9 = void>\nclass tuple;\n\n// Anything in namespace gtest_internal is Google Test's INTERNAL\n// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code.\nnamespace gtest_internal {\n\n// ByRef<T>::type is T if T is a reference; otherwise it's const T&.\ntemplate <typename T>\nstruct ByRef { typedef const T& type; };  // NOLINT\ntemplate <typename T>\nstruct ByRef<T&> { typedef T& type; };  // NOLINT\n\n// A handy wrapper for ByRef.\n#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef<T>::type\n\n// AddRef<T>::type is T if T is a reference; otherwise it's T&.  This\n// is the same as tr1::add_reference<T>::type.\ntemplate <typename T>\nstruct AddRef { typedef T& type; };  // NOLINT\ntemplate <typename T>\nstruct AddRef<T&> { typedef T& type; };  // NOLINT\n\n// A handy wrapper for AddRef.\n#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef<T>::type\n\n// A helper for implementing get<k>().\ntemplate <int k> class Get;\n\n// A helper for implementing tuple_element<k, T>.  kIndexValid is true\n// iff k < the number of fields in tuple type T.\ntemplate <bool kIndexValid, int kIndex, class Tuple>\nstruct TupleElement;\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct TupleElement<true, 0, GTEST_10_TUPLE_(T) > {\n  typedef T0 type;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct TupleElement<true, 1, GTEST_10_TUPLE_(T) > {\n  typedef T1 type;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct TupleElement<true, 2, GTEST_10_TUPLE_(T) > {\n  typedef T2 type;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct TupleElement<true, 3, GTEST_10_TUPLE_(T) > {\n  typedef T3 type;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct TupleElement<true, 4, GTEST_10_TUPLE_(T) > {\n  typedef T4 type;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct TupleElement<true, 5, GTEST_10_TUPLE_(T) > {\n  typedef T5 type;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct TupleElement<true, 6, GTEST_10_TUPLE_(T) > {\n  typedef T6 type;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct TupleElement<true, 7, GTEST_10_TUPLE_(T) > {\n  typedef T7 type;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct TupleElement<true, 8, GTEST_10_TUPLE_(T) > {\n  typedef T8 type;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct TupleElement<true, 9, GTEST_10_TUPLE_(T) > {\n  typedef T9 type;\n};\n\n}  // namespace gtest_internal\n\ntemplate <>\nclass tuple<> {\n public:\n  tuple() {}\n  tuple(const tuple& /* t */)  {}\n  tuple& operator=(const tuple& /* t */) { return *this; }\n};\n\ntemplate <GTEST_1_TYPENAMES_(T)>\nclass GTEST_1_TUPLE_(T) {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : f0_() {}\n\n  explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {}\n\n  tuple(const tuple& t) : f0_(t.f0_) {}\n\n  template <GTEST_1_TYPENAMES_(U)>\n  tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {}\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_1_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_1_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_1_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) {\n    f0_ = t.f0_;\n    return *this;\n  }\n\n  T0 f0_;\n};\n\ntemplate <GTEST_2_TYPENAMES_(T)>\nclass GTEST_2_TUPLE_(T) {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : f0_(), f1_() {}\n\n  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0),\n      f1_(f1) {}\n\n  tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {}\n\n  template <GTEST_2_TYPENAMES_(U)>\n  tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {}\n  template <typename U0, typename U1>\n  tuple(const ::std::pair<U0, U1>& p) : f0_(p.first), f1_(p.second) {}\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_2_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_2_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n  template <typename U0, typename U1>\n  tuple& operator=(const ::std::pair<U0, U1>& p) {\n    f0_ = p.first;\n    f1_ = p.second;\n    return *this;\n  }\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_2_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) {\n    f0_ = t.f0_;\n    f1_ = t.f1_;\n    return *this;\n  }\n\n  T0 f0_;\n  T1 f1_;\n};\n\ntemplate <GTEST_3_TYPENAMES_(T)>\nclass GTEST_3_TUPLE_(T) {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : f0_(), f1_(), f2_() {}\n\n  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,\n      GTEST_BY_REF_(T2) f2) : f0_(f0), f1_(f1), f2_(f2) {}\n\n  tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}\n\n  template <GTEST_3_TYPENAMES_(U)>\n  tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_3_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_3_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_3_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) {\n    f0_ = t.f0_;\n    f1_ = t.f1_;\n    f2_ = t.f2_;\n    return *this;\n  }\n\n  T0 f0_;\n  T1 f1_;\n  T2 f2_;\n};\n\ntemplate <GTEST_4_TYPENAMES_(T)>\nclass GTEST_4_TUPLE_(T) {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : f0_(), f1_(), f2_(), f3_() {}\n\n  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,\n      GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3) : f0_(f0), f1_(f1), f2_(f2),\n      f3_(f3) {}\n\n  tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {}\n\n  template <GTEST_4_TYPENAMES_(U)>\n  tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),\n      f3_(t.f3_) {}\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_4_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_4_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_4_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) {\n    f0_ = t.f0_;\n    f1_ = t.f1_;\n    f2_ = t.f2_;\n    f3_ = t.f3_;\n    return *this;\n  }\n\n  T0 f0_;\n  T1 f1_;\n  T2 f2_;\n  T3 f3_;\n};\n\ntemplate <GTEST_5_TYPENAMES_(T)>\nclass GTEST_5_TUPLE_(T) {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : f0_(), f1_(), f2_(), f3_(), f4_() {}\n\n  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,\n      GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3,\n      GTEST_BY_REF_(T4) f4) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4) {}\n\n  tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),\n      f4_(t.f4_) {}\n\n  template <GTEST_5_TYPENAMES_(U)>\n  tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),\n      f3_(t.f3_), f4_(t.f4_) {}\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_5_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_5_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_5_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) {\n    f0_ = t.f0_;\n    f1_ = t.f1_;\n    f2_ = t.f2_;\n    f3_ = t.f3_;\n    f4_ = t.f4_;\n    return *this;\n  }\n\n  T0 f0_;\n  T1 f1_;\n  T2 f2_;\n  T3 f3_;\n  T4 f4_;\n};\n\ntemplate <GTEST_6_TYPENAMES_(T)>\nclass GTEST_6_TUPLE_(T) {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_() {}\n\n  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,\n      GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,\n      GTEST_BY_REF_(T5) f5) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),\n      f5_(f5) {}\n\n  tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),\n      f4_(t.f4_), f5_(t.f5_) {}\n\n  template <GTEST_6_TYPENAMES_(U)>\n  tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),\n      f3_(t.f3_), f4_(t.f4_), f5_(t.f5_) {}\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_6_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_6_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_6_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) {\n    f0_ = t.f0_;\n    f1_ = t.f1_;\n    f2_ = t.f2_;\n    f3_ = t.f3_;\n    f4_ = t.f4_;\n    f5_ = t.f5_;\n    return *this;\n  }\n\n  T0 f0_;\n  T1 f1_;\n  T2 f2_;\n  T3 f3_;\n  T4 f4_;\n  T5 f5_;\n};\n\ntemplate <GTEST_7_TYPENAMES_(T)>\nclass GTEST_7_TUPLE_(T) {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_() {}\n\n  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,\n      GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,\n      GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6) : f0_(f0), f1_(f1), f2_(f2),\n      f3_(f3), f4_(f4), f5_(f5), f6_(f6) {}\n\n  tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),\n      f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}\n\n  template <GTEST_7_TYPENAMES_(U)>\n  tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),\n      f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_7_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_7_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_7_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) {\n    f0_ = t.f0_;\n    f1_ = t.f1_;\n    f2_ = t.f2_;\n    f3_ = t.f3_;\n    f4_ = t.f4_;\n    f5_ = t.f5_;\n    f6_ = t.f6_;\n    return *this;\n  }\n\n  T0 f0_;\n  T1 f1_;\n  T2 f2_;\n  T3 f3_;\n  T4 f4_;\n  T5 f5_;\n  T6 f6_;\n};\n\ntemplate <GTEST_8_TYPENAMES_(T)>\nclass GTEST_8_TUPLE_(T) {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_() {}\n\n  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,\n      GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,\n      GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6,\n      GTEST_BY_REF_(T7) f7) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),\n      f5_(f5), f6_(f6), f7_(f7) {}\n\n  tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),\n      f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}\n\n  template <GTEST_8_TYPENAMES_(U)>\n  tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),\n      f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_8_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_8_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_8_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) {\n    f0_ = t.f0_;\n    f1_ = t.f1_;\n    f2_ = t.f2_;\n    f3_ = t.f3_;\n    f4_ = t.f4_;\n    f5_ = t.f5_;\n    f6_ = t.f6_;\n    f7_ = t.f7_;\n    return *this;\n  }\n\n  T0 f0_;\n  T1 f1_;\n  T2 f2_;\n  T3 f3_;\n  T4 f4_;\n  T5 f5_;\n  T6 f6_;\n  T7 f7_;\n};\n\ntemplate <GTEST_9_TYPENAMES_(T)>\nclass GTEST_9_TUPLE_(T) {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_() {}\n\n  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,\n      GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,\n      GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7,\n      GTEST_BY_REF_(T8) f8) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),\n      f5_(f5), f6_(f6), f7_(f7), f8_(f8) {}\n\n  tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),\n      f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}\n\n  template <GTEST_9_TYPENAMES_(U)>\n  tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),\n      f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_9_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_9_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_9_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) {\n    f0_ = t.f0_;\n    f1_ = t.f1_;\n    f2_ = t.f2_;\n    f3_ = t.f3_;\n    f4_ = t.f4_;\n    f5_ = t.f5_;\n    f6_ = t.f6_;\n    f7_ = t.f7_;\n    f8_ = t.f8_;\n    return *this;\n  }\n\n  T0 f0_;\n  T1 f1_;\n  T2 f2_;\n  T3 f3_;\n  T4 f4_;\n  T5 f5_;\n  T6 f6_;\n  T7 f7_;\n  T8 f8_;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nclass tuple {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_(),\n      f9_() {}\n\n  explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,\n      GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,\n      GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7,\n      GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9) : f0_(f0), f1_(f1), f2_(f2),\n      f3_(f3), f4_(f4), f5_(f5), f6_(f6), f7_(f7), f8_(f8), f9_(f9) {}\n\n  tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),\n      f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), f9_(t.f9_) {}\n\n  template <GTEST_10_TYPENAMES_(U)>\n  tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),\n      f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_),\n      f9_(t.f9_) {}\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_10_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_10_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_10_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) {\n    f0_ = t.f0_;\n    f1_ = t.f1_;\n    f2_ = t.f2_;\n    f3_ = t.f3_;\n    f4_ = t.f4_;\n    f5_ = t.f5_;\n    f6_ = t.f6_;\n    f7_ = t.f7_;\n    f8_ = t.f8_;\n    f9_ = t.f9_;\n    return *this;\n  }\n\n  T0 f0_;\n  T1 f1_;\n  T2 f2_;\n  T3 f3_;\n  T4 f4_;\n  T5 f5_;\n  T6 f6_;\n  T7 f7_;\n  T8 f8_;\n  T9 f9_;\n};\n\n// 6.1.3.2 Tuple creation functions.\n\n// Known limitations: we don't support passing an\n// std::tr1::reference_wrapper<T> to make_tuple().  And we don't\n// implement tie().\n\ninline tuple<> make_tuple() { return tuple<>(); }\n\ntemplate <GTEST_1_TYPENAMES_(T)>\ninline GTEST_1_TUPLE_(T) make_tuple(const T0& f0) {\n  return GTEST_1_TUPLE_(T)(f0);\n}\n\ntemplate <GTEST_2_TYPENAMES_(T)>\ninline GTEST_2_TUPLE_(T) make_tuple(const T0& f0, const T1& f1) {\n  return GTEST_2_TUPLE_(T)(f0, f1);\n}\n\ntemplate <GTEST_3_TYPENAMES_(T)>\ninline GTEST_3_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2) {\n  return GTEST_3_TUPLE_(T)(f0, f1, f2);\n}\n\ntemplate <GTEST_4_TYPENAMES_(T)>\ninline GTEST_4_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,\n    const T3& f3) {\n  return GTEST_4_TUPLE_(T)(f0, f1, f2, f3);\n}\n\ntemplate <GTEST_5_TYPENAMES_(T)>\ninline GTEST_5_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,\n    const T3& f3, const T4& f4) {\n  return GTEST_5_TUPLE_(T)(f0, f1, f2, f3, f4);\n}\n\ntemplate <GTEST_6_TYPENAMES_(T)>\ninline GTEST_6_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,\n    const T3& f3, const T4& f4, const T5& f5) {\n  return GTEST_6_TUPLE_(T)(f0, f1, f2, f3, f4, f5);\n}\n\ntemplate <GTEST_7_TYPENAMES_(T)>\ninline GTEST_7_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,\n    const T3& f3, const T4& f4, const T5& f5, const T6& f6) {\n  return GTEST_7_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6);\n}\n\ntemplate <GTEST_8_TYPENAMES_(T)>\ninline GTEST_8_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,\n    const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7) {\n  return GTEST_8_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7);\n}\n\ntemplate <GTEST_9_TYPENAMES_(T)>\ninline GTEST_9_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,\n    const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7,\n    const T8& f8) {\n  return GTEST_9_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8);\n}\n\ntemplate <GTEST_10_TYPENAMES_(T)>\ninline GTEST_10_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,\n    const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7,\n    const T8& f8, const T9& f9) {\n  return GTEST_10_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9);\n}\n\n// 6.1.3.3 Tuple helper classes.\n\ntemplate <typename Tuple> struct tuple_size;\n\ntemplate <GTEST_0_TYPENAMES_(T)>\nstruct tuple_size<GTEST_0_TUPLE_(T) > {\n  static const int value = 0;\n};\n\ntemplate <GTEST_1_TYPENAMES_(T)>\nstruct tuple_size<GTEST_1_TUPLE_(T) > {\n  static const int value = 1;\n};\n\ntemplate <GTEST_2_TYPENAMES_(T)>\nstruct tuple_size<GTEST_2_TUPLE_(T) > {\n  static const int value = 2;\n};\n\ntemplate <GTEST_3_TYPENAMES_(T)>\nstruct tuple_size<GTEST_3_TUPLE_(T) > {\n  static const int value = 3;\n};\n\ntemplate <GTEST_4_TYPENAMES_(T)>\nstruct tuple_size<GTEST_4_TUPLE_(T) > {\n  static const int value = 4;\n};\n\ntemplate <GTEST_5_TYPENAMES_(T)>\nstruct tuple_size<GTEST_5_TUPLE_(T) > {\n  static const int value = 5;\n};\n\ntemplate <GTEST_6_TYPENAMES_(T)>\nstruct tuple_size<GTEST_6_TUPLE_(T) > {\n  static const int value = 6;\n};\n\ntemplate <GTEST_7_TYPENAMES_(T)>\nstruct tuple_size<GTEST_7_TUPLE_(T) > {\n  static const int value = 7;\n};\n\ntemplate <GTEST_8_TYPENAMES_(T)>\nstruct tuple_size<GTEST_8_TUPLE_(T) > {\n  static const int value = 8;\n};\n\ntemplate <GTEST_9_TYPENAMES_(T)>\nstruct tuple_size<GTEST_9_TUPLE_(T) > {\n  static const int value = 9;\n};\n\ntemplate <GTEST_10_TYPENAMES_(T)>\nstruct tuple_size<GTEST_10_TUPLE_(T) > {\n  static const int value = 10;\n};\n\ntemplate <int k, class Tuple>\nstruct tuple_element {\n  typedef typename gtest_internal::TupleElement<\n      k < (tuple_size<Tuple>::value), k, Tuple>::type type;\n};\n\n#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type\n\n// 6.1.3.4 Element access.\n\nnamespace gtest_internal {\n\ntemplate <>\nclass Get<0> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))\n  Field(Tuple& t) { return t.f0_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))\n  ConstField(const Tuple& t) { return t.f0_; }\n};\n\ntemplate <>\nclass Get<1> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))\n  Field(Tuple& t) { return t.f1_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))\n  ConstField(const Tuple& t) { return t.f1_; }\n};\n\ntemplate <>\nclass Get<2> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))\n  Field(Tuple& t) { return t.f2_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))\n  ConstField(const Tuple& t) { return t.f2_; }\n};\n\ntemplate <>\nclass Get<3> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))\n  Field(Tuple& t) { return t.f3_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))\n  ConstField(const Tuple& t) { return t.f3_; }\n};\n\ntemplate <>\nclass Get<4> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))\n  Field(Tuple& t) { return t.f4_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))\n  ConstField(const Tuple& t) { return t.f4_; }\n};\n\ntemplate <>\nclass Get<5> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))\n  Field(Tuple& t) { return t.f5_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))\n  ConstField(const Tuple& t) { return t.f5_; }\n};\n\ntemplate <>\nclass Get<6> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))\n  Field(Tuple& t) { return t.f6_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))\n  ConstField(const Tuple& t) { return t.f6_; }\n};\n\ntemplate <>\nclass Get<7> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))\n  Field(Tuple& t) { return t.f7_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))\n  ConstField(const Tuple& t) { return t.f7_; }\n};\n\ntemplate <>\nclass Get<8> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))\n  Field(Tuple& t) { return t.f8_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))\n  ConstField(const Tuple& t) { return t.f8_; }\n};\n\ntemplate <>\nclass Get<9> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))\n  Field(Tuple& t) { return t.f9_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))\n  ConstField(const Tuple& t) { return t.f9_; }\n};\n\n}  // namespace gtest_internal\n\ntemplate <int k, GTEST_10_TYPENAMES_(T)>\nGTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T)))\nget(GTEST_10_TUPLE_(T)& t) {\n  return gtest_internal::Get<k>::Field(t);\n}\n\ntemplate <int k, GTEST_10_TYPENAMES_(T)>\nGTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k,  GTEST_10_TUPLE_(T)))\nget(const GTEST_10_TUPLE_(T)& t) {\n  return gtest_internal::Get<k>::ConstField(t);\n}\n\n// 6.1.3.5 Relational operators\n\n// We only implement == and !=, as we don't have a need for the rest yet.\n\nnamespace gtest_internal {\n\n// SameSizeTuplePrefixComparator<k, k>::Eq(t1, t2) returns true if the\n// first k fields of t1 equals the first k fields of t2.\n// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if\n// k1 != k2.\ntemplate <int kSize1, int kSize2>\nstruct SameSizeTuplePrefixComparator;\n\ntemplate <>\nstruct SameSizeTuplePrefixComparator<0, 0> {\n  template <class Tuple1, class Tuple2>\n  static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) {\n    return true;\n  }\n};\n\ntemplate <int k>\nstruct SameSizeTuplePrefixComparator<k, k> {\n  template <class Tuple1, class Tuple2>\n  static bool Eq(const Tuple1& t1, const Tuple2& t2) {\n    return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) &&\n        ::std::tr1::get<k - 1>(t1) == ::std::tr1::get<k - 1>(t2);\n  }\n};\n\n}  // namespace gtest_internal\n\ntemplate <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>\ninline bool operator==(const GTEST_10_TUPLE_(T)& t,\n                       const GTEST_10_TUPLE_(U)& u) {\n  return gtest_internal::SameSizeTuplePrefixComparator<\n      tuple_size<GTEST_10_TUPLE_(T) >::value,\n      tuple_size<GTEST_10_TUPLE_(U) >::value>::Eq(t, u);\n}\n\ntemplate <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>\ninline bool operator!=(const GTEST_10_TUPLE_(T)& t,\n                       const GTEST_10_TUPLE_(U)& u) { return !(t == u); }\n\n// 6.1.4 Pairs.\n// Unimplemented.\n\n}  // namespace tr1\n}  // namespace std\n\n#undef GTEST_0_TUPLE_\n#undef GTEST_1_TUPLE_\n#undef GTEST_2_TUPLE_\n#undef GTEST_3_TUPLE_\n#undef GTEST_4_TUPLE_\n#undef GTEST_5_TUPLE_\n#undef GTEST_6_TUPLE_\n#undef GTEST_7_TUPLE_\n#undef GTEST_8_TUPLE_\n#undef GTEST_9_TUPLE_\n#undef GTEST_10_TUPLE_\n\n#undef GTEST_0_TYPENAMES_\n#undef GTEST_1_TYPENAMES_\n#undef GTEST_2_TYPENAMES_\n#undef GTEST_3_TYPENAMES_\n#undef GTEST_4_TYPENAMES_\n#undef GTEST_5_TYPENAMES_\n#undef GTEST_6_TYPENAMES_\n#undef GTEST_7_TYPENAMES_\n#undef GTEST_8_TYPENAMES_\n#undef GTEST_9_TYPENAMES_\n#undef GTEST_10_TYPENAMES_\n\n#undef GTEST_DECLARE_TUPLE_AS_FRIEND_\n#undef GTEST_BY_REF_\n#undef GTEST_ADD_REF_\n#undef GTEST_TUPLE_ELEMENT_\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-tuple.h.pump",
    "content": "$$ -*- mode: c++; -*-\n$var n = 10  $$ Maximum number of tuple fields we want to support.\n$$ This meta comment fixes auto-indentation in Emacs. }}\n// Copyright 2009 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n\n// Implements a subset of TR1 tuple needed by Google Test and Google Mock.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_\n\n#include <utility>  // For ::std::pair.\n\n// The compiler used in Symbian has a bug that prevents us from declaring the\n// tuple template as a friend (it complains that tuple is redefined).  This\n// hack bypasses the bug by declaring the members that should otherwise be\n// private as public.\n// Sun Studio versions < 12 also have the above bug.\n#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)\n# define GTEST_DECLARE_TUPLE_AS_FRIEND_ public:\n#else\n# define GTEST_DECLARE_TUPLE_AS_FRIEND_ \\\n    template <GTEST_$(n)_TYPENAMES_(U)> friend class tuple; \\\n   private:\n#endif\n\n\n$range i 0..n-1\n$range j 0..n\n$range k 1..n\n// GTEST_n_TUPLE_(T) is the type of an n-tuple.\n#define GTEST_0_TUPLE_(T) tuple<>\n\n$for k [[\n$range m 0..k-1\n$range m2 k..n-1\n#define GTEST_$(k)_TUPLE_(T) tuple<$for m, [[T##$m]]$for m2 [[, void]]>\n\n]]\n\n// GTEST_n_TYPENAMES_(T) declares a list of n typenames.\n\n$for j [[\n$range m 0..j-1\n#define GTEST_$(j)_TYPENAMES_(T) $for m, [[typename T##$m]]\n\n\n]]\n\n// In theory, defining stuff in the ::std namespace is undefined\n// behavior.  We can do this as we are playing the role of a standard\n// library vendor.\nnamespace std {\nnamespace tr1 {\n\ntemplate <$for i, [[typename T$i = void]]>\nclass tuple;\n\n// Anything in namespace gtest_internal is Google Test's INTERNAL\n// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code.\nnamespace gtest_internal {\n\n// ByRef<T>::type is T if T is a reference; otherwise it's const T&.\ntemplate <typename T>\nstruct ByRef { typedef const T& type; };  // NOLINT\ntemplate <typename T>\nstruct ByRef<T&> { typedef T& type; };  // NOLINT\n\n// A handy wrapper for ByRef.\n#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef<T>::type\n\n// AddRef<T>::type is T if T is a reference; otherwise it's T&.  This\n// is the same as tr1::add_reference<T>::type.\ntemplate <typename T>\nstruct AddRef { typedef T& type; };  // NOLINT\ntemplate <typename T>\nstruct AddRef<T&> { typedef T& type; };  // NOLINT\n\n// A handy wrapper for AddRef.\n#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef<T>::type\n\n// A helper for implementing get<k>().\ntemplate <int k> class Get;\n\n// A helper for implementing tuple_element<k, T>.  kIndexValid is true\n// iff k < the number of fields in tuple type T.\ntemplate <bool kIndexValid, int kIndex, class Tuple>\nstruct TupleElement;\n\n\n$for i [[\ntemplate <GTEST_$(n)_TYPENAMES_(T)>\nstruct TupleElement<true, $i, GTEST_$(n)_TUPLE_(T) > {\n  typedef T$i type;\n};\n\n\n]]\n}  // namespace gtest_internal\n\ntemplate <>\nclass tuple<> {\n public:\n  tuple() {}\n  tuple(const tuple& /* t */)  {}\n  tuple& operator=(const tuple& /* t */) { return *this; }\n};\n\n\n$for k [[\n$range m 0..k-1\ntemplate <GTEST_$(k)_TYPENAMES_(T)>\nclass $if k < n [[GTEST_$(k)_TUPLE_(T)]] $else [[tuple]] {\n public:\n  template <int k> friend class gtest_internal::Get;\n\n  tuple() : $for m, [[f$(m)_()]] {}\n\n  explicit tuple($for m, [[GTEST_BY_REF_(T$m) f$m]]) : [[]]\n$for m, [[f$(m)_(f$m)]] {}\n\n  tuple(const tuple& t) : $for m, [[f$(m)_(t.f$(m)_)]] {}\n\n  template <GTEST_$(k)_TYPENAMES_(U)>\n  tuple(const GTEST_$(k)_TUPLE_(U)& t) : $for m, [[f$(m)_(t.f$(m)_)]] {}\n\n$if k == 2 [[\n  template <typename U0, typename U1>\n  tuple(const ::std::pair<U0, U1>& p) : f0_(p.first), f1_(p.second) {}\n\n]]\n\n  tuple& operator=(const tuple& t) { return CopyFrom(t); }\n\n  template <GTEST_$(k)_TYPENAMES_(U)>\n  tuple& operator=(const GTEST_$(k)_TUPLE_(U)& t) {\n    return CopyFrom(t);\n  }\n\n$if k == 2 [[\n  template <typename U0, typename U1>\n  tuple& operator=(const ::std::pair<U0, U1>& p) {\n    f0_ = p.first;\n    f1_ = p.second;\n    return *this;\n  }\n\n]]\n\n  GTEST_DECLARE_TUPLE_AS_FRIEND_\n\n  template <GTEST_$(k)_TYPENAMES_(U)>\n  tuple& CopyFrom(const GTEST_$(k)_TUPLE_(U)& t) {\n\n$for m [[\n    f$(m)_ = t.f$(m)_;\n\n]]\n    return *this;\n  }\n\n\n$for m [[\n  T$m f$(m)_;\n\n]]\n};\n\n\n]]\n// 6.1.3.2 Tuple creation functions.\n\n// Known limitations: we don't support passing an\n// std::tr1::reference_wrapper<T> to make_tuple().  And we don't\n// implement tie().\n\ninline tuple<> make_tuple() { return tuple<>(); }\n\n$for k [[\n$range m 0..k-1\n\ntemplate <GTEST_$(k)_TYPENAMES_(T)>\ninline GTEST_$(k)_TUPLE_(T) make_tuple($for m, [[const T$m& f$m]]) {\n  return GTEST_$(k)_TUPLE_(T)($for m, [[f$m]]);\n}\n\n]]\n\n// 6.1.3.3 Tuple helper classes.\n\ntemplate <typename Tuple> struct tuple_size;\n\n\n$for j [[\ntemplate <GTEST_$(j)_TYPENAMES_(T)>\nstruct tuple_size<GTEST_$(j)_TUPLE_(T) > {\n  static const int value = $j;\n};\n\n\n]]\ntemplate <int k, class Tuple>\nstruct tuple_element {\n  typedef typename gtest_internal::TupleElement<\n      k < (tuple_size<Tuple>::value), k, Tuple>::type type;\n};\n\n#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type\n\n// 6.1.3.4 Element access.\n\nnamespace gtest_internal {\n\n\n$for i [[\ntemplate <>\nclass Get<$i> {\n public:\n  template <class Tuple>\n  static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_($i, Tuple))\n  Field(Tuple& t) { return t.f$(i)_; }  // NOLINT\n\n  template <class Tuple>\n  static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_($i, Tuple))\n  ConstField(const Tuple& t) { return t.f$(i)_; }\n};\n\n\n]]\n}  // namespace gtest_internal\n\ntemplate <int k, GTEST_$(n)_TYPENAMES_(T)>\nGTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_$(n)_TUPLE_(T)))\nget(GTEST_$(n)_TUPLE_(T)& t) {\n  return gtest_internal::Get<k>::Field(t);\n}\n\ntemplate <int k, GTEST_$(n)_TYPENAMES_(T)>\nGTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k,  GTEST_$(n)_TUPLE_(T)))\nget(const GTEST_$(n)_TUPLE_(T)& t) {\n  return gtest_internal::Get<k>::ConstField(t);\n}\n\n// 6.1.3.5 Relational operators\n\n// We only implement == and !=, as we don't have a need for the rest yet.\n\nnamespace gtest_internal {\n\n// SameSizeTuplePrefixComparator<k, k>::Eq(t1, t2) returns true if the\n// first k fields of t1 equals the first k fields of t2.\n// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if\n// k1 != k2.\ntemplate <int kSize1, int kSize2>\nstruct SameSizeTuplePrefixComparator;\n\ntemplate <>\nstruct SameSizeTuplePrefixComparator<0, 0> {\n  template <class Tuple1, class Tuple2>\n  static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) {\n    return true;\n  }\n};\n\ntemplate <int k>\nstruct SameSizeTuplePrefixComparator<k, k> {\n  template <class Tuple1, class Tuple2>\n  static bool Eq(const Tuple1& t1, const Tuple2& t2) {\n    return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) &&\n        ::std::tr1::get<k - 1>(t1) == ::std::tr1::get<k - 1>(t2);\n  }\n};\n\n}  // namespace gtest_internal\n\ntemplate <GTEST_$(n)_TYPENAMES_(T), GTEST_$(n)_TYPENAMES_(U)>\ninline bool operator==(const GTEST_$(n)_TUPLE_(T)& t,\n                       const GTEST_$(n)_TUPLE_(U)& u) {\n  return gtest_internal::SameSizeTuplePrefixComparator<\n      tuple_size<GTEST_$(n)_TUPLE_(T) >::value,\n      tuple_size<GTEST_$(n)_TUPLE_(U) >::value>::Eq(t, u);\n}\n\ntemplate <GTEST_$(n)_TYPENAMES_(T), GTEST_$(n)_TYPENAMES_(U)>\ninline bool operator!=(const GTEST_$(n)_TUPLE_(T)& t,\n                       const GTEST_$(n)_TUPLE_(U)& u) { return !(t == u); }\n\n// 6.1.4 Pairs.\n// Unimplemented.\n\n}  // namespace tr1\n}  // namespace std\n\n\n$for j [[\n#undef GTEST_$(j)_TUPLE_\n\n]]\n\n\n$for j [[\n#undef GTEST_$(j)_TYPENAMES_\n\n]]\n\n#undef GTEST_DECLARE_TUPLE_AS_FRIEND_\n#undef GTEST_BY_REF_\n#undef GTEST_ADD_REF_\n#undef GTEST_TUPLE_ELEMENT_\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-type-util.h",
    "content": "// This file was GENERATED by command:\n//     pump.py gtest-type-util.h.pump\n// DO NOT EDIT BY HAND!!!\n\n// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n\n// Type utilities needed for implementing typed and type-parameterized\n// tests.  This file is generated by a SCRIPT.  DO NOT EDIT BY HAND!\n//\n// Currently we support at most 50 types in a list, and at most 50\n// type-parameterized tests in one type-parameterized test case.\n// Please contact googletestframework@googlegroups.com if you need\n// more.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_\n\n#include \"gtest/internal/gtest-port.h\"\n\n// #ifdef __GNUC__ is too general here.  It is possible to use gcc without using\n// libstdc++ (which is where cxxabi.h comes from).\n# if GTEST_HAS_CXXABI_H_\n#  include <cxxabi.h>\n# elif defined(__HP_aCC)\n#  include <acxx_demangle.h>\n# endif  // GTEST_HASH_CXXABI_H_\n\nnamespace testing {\nnamespace internal {\n\n// GetTypeName<T>() returns a human-readable name of type T.\n// NB: This function is also used in Google Mock, so don't move it inside of\n// the typed-test-only section below.\ntemplate <typename T>\nstd::string GetTypeName() {\n# if GTEST_HAS_RTTI\n\n  const char* const name = typeid(T).name();\n#  if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)\n  int status = 0;\n  // gcc's implementation of typeid(T).name() mangles the type name,\n  // so we have to demangle it.\n#   if GTEST_HAS_CXXABI_H_\n  using abi::__cxa_demangle;\n#   endif  // GTEST_HAS_CXXABI_H_\n  char* const readable_name = __cxa_demangle(name, 0, 0, &status);\n  const std::string name_str(status == 0 ? readable_name : name);\n  free(readable_name);\n  return name_str;\n#  else\n  return name;\n#  endif  // GTEST_HAS_CXXABI_H_ || __HP_aCC\n\n# else\n\n  return \"<type>\";\n\n# endif  // GTEST_HAS_RTTI\n}\n\n#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P\n\n// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same\n// type.  This can be used as a compile-time assertion to ensure that\n// two types are equal.\n\ntemplate <typename T1, typename T2>\nstruct AssertTypeEq;\n\ntemplate <typename T>\nstruct AssertTypeEq<T, T> {\n  typedef bool type;\n};\n\n// A unique type used as the default value for the arguments of class\n// template Types.  This allows us to simulate variadic templates\n// (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't\n// support directly.\nstruct None {};\n\n// The following family of struct and struct templates are used to\n// represent type lists.  In particular, TypesN<T1, T2, ..., TN>\n// represents a type list with N types (T1, T2, ..., and TN) in it.\n// Except for Types0, every struct in the family has two member types:\n// Head for the first type in the list, and Tail for the rest of the\n// list.\n\n// The empty type list.\nstruct Types0 {};\n\n// Type lists of length 1, 2, 3, and so on.\n\ntemplate <typename T1>\nstruct Types1 {\n  typedef T1 Head;\n  typedef Types0 Tail;\n};\ntemplate <typename T1, typename T2>\nstruct Types2 {\n  typedef T1 Head;\n  typedef Types1<T2> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3>\nstruct Types3 {\n  typedef T1 Head;\n  typedef Types2<T2, T3> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4>\nstruct Types4 {\n  typedef T1 Head;\n  typedef Types3<T2, T3, T4> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5>\nstruct Types5 {\n  typedef T1 Head;\n  typedef Types4<T2, T3, T4, T5> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6>\nstruct Types6 {\n  typedef T1 Head;\n  typedef Types5<T2, T3, T4, T5, T6> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7>\nstruct Types7 {\n  typedef T1 Head;\n  typedef Types6<T2, T3, T4, T5, T6, T7> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8>\nstruct Types8 {\n  typedef T1 Head;\n  typedef Types7<T2, T3, T4, T5, T6, T7, T8> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9>\nstruct Types9 {\n  typedef T1 Head;\n  typedef Types8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10>\nstruct Types10 {\n  typedef T1 Head;\n  typedef Types9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11>\nstruct Types11 {\n  typedef T1 Head;\n  typedef Types10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12>\nstruct Types12 {\n  typedef T1 Head;\n  typedef Types11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13>\nstruct Types13 {\n  typedef T1 Head;\n  typedef Types12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14>\nstruct Types14 {\n  typedef T1 Head;\n  typedef Types13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15>\nstruct Types15 {\n  typedef T1 Head;\n  typedef Types14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16>\nstruct Types16 {\n  typedef T1 Head;\n  typedef Types15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17>\nstruct Types17 {\n  typedef T1 Head;\n  typedef Types16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18>\nstruct Types18 {\n  typedef T1 Head;\n  typedef Types17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19>\nstruct Types19 {\n  typedef T1 Head;\n  typedef Types18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20>\nstruct Types20 {\n  typedef T1 Head;\n  typedef Types19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21>\nstruct Types21 {\n  typedef T1 Head;\n  typedef Types20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22>\nstruct Types22 {\n  typedef T1 Head;\n  typedef Types21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23>\nstruct Types23 {\n  typedef T1 Head;\n  typedef Types22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24>\nstruct Types24 {\n  typedef T1 Head;\n  typedef Types23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25>\nstruct Types25 {\n  typedef T1 Head;\n  typedef Types24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26>\nstruct Types26 {\n  typedef T1 Head;\n  typedef Types25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27>\nstruct Types27 {\n  typedef T1 Head;\n  typedef Types26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28>\nstruct Types28 {\n  typedef T1 Head;\n  typedef Types27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29>\nstruct Types29 {\n  typedef T1 Head;\n  typedef Types28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30>\nstruct Types30 {\n  typedef T1 Head;\n  typedef Types29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31>\nstruct Types31 {\n  typedef T1 Head;\n  typedef Types30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32>\nstruct Types32 {\n  typedef T1 Head;\n  typedef Types31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33>\nstruct Types33 {\n  typedef T1 Head;\n  typedef Types32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34>\nstruct Types34 {\n  typedef T1 Head;\n  typedef Types33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35>\nstruct Types35 {\n  typedef T1 Head;\n  typedef Types34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36>\nstruct Types36 {\n  typedef T1 Head;\n  typedef Types35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37>\nstruct Types37 {\n  typedef T1 Head;\n  typedef Types36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38>\nstruct Types38 {\n  typedef T1 Head;\n  typedef Types37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39>\nstruct Types39 {\n  typedef T1 Head;\n  typedef Types38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40>\nstruct Types40 {\n  typedef T1 Head;\n  typedef Types39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41>\nstruct Types41 {\n  typedef T1 Head;\n  typedef Types40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42>\nstruct Types42 {\n  typedef T1 Head;\n  typedef Types41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43>\nstruct Types43 {\n  typedef T1 Head;\n  typedef Types42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44>\nstruct Types44 {\n  typedef T1 Head;\n  typedef Types43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45>\nstruct Types45 {\n  typedef T1 Head;\n  typedef Types44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46>\nstruct Types46 {\n  typedef T1 Head;\n  typedef Types45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45, T46> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47>\nstruct Types47 {\n  typedef T1 Head;\n  typedef Types46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45, T46, T47> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48>\nstruct Types48 {\n  typedef T1 Head;\n  typedef Types47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45, T46, T47, T48> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49>\nstruct Types49 {\n  typedef T1 Head;\n  typedef Types48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45, T46, T47, T48, T49> Tail;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49, typename T50>\nstruct Types50 {\n  typedef T1 Head;\n  typedef Types49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n      T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n      T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n      T44, T45, T46, T47, T48, T49, T50> Tail;\n};\n\n\n}  // namespace internal\n\n// We don't want to require the users to write TypesN<...> directly,\n// as that would require them to count the length.  Types<...> is much\n// easier to write, but generates horrible messages when there is a\n// compiler error, as gcc insists on printing out each template\n// argument, even if it has the default value (this means Types<int>\n// will appear as Types<int, None, None, ..., None> in the compiler\n// errors).\n//\n// Our solution is to combine the best part of the two approaches: a\n// user would write Types<T1, ..., TN>, and Google Test will translate\n// that to TypesN<T1, ..., TN> internally to make error messages\n// readable.  The translation is done by the 'type' member of the\n// Types template.\ntemplate <typename T1 = internal::None, typename T2 = internal::None,\n    typename T3 = internal::None, typename T4 = internal::None,\n    typename T5 = internal::None, typename T6 = internal::None,\n    typename T7 = internal::None, typename T8 = internal::None,\n    typename T9 = internal::None, typename T10 = internal::None,\n    typename T11 = internal::None, typename T12 = internal::None,\n    typename T13 = internal::None, typename T14 = internal::None,\n    typename T15 = internal::None, typename T16 = internal::None,\n    typename T17 = internal::None, typename T18 = internal::None,\n    typename T19 = internal::None, typename T20 = internal::None,\n    typename T21 = internal::None, typename T22 = internal::None,\n    typename T23 = internal::None, typename T24 = internal::None,\n    typename T25 = internal::None, typename T26 = internal::None,\n    typename T27 = internal::None, typename T28 = internal::None,\n    typename T29 = internal::None, typename T30 = internal::None,\n    typename T31 = internal::None, typename T32 = internal::None,\n    typename T33 = internal::None, typename T34 = internal::None,\n    typename T35 = internal::None, typename T36 = internal::None,\n    typename T37 = internal::None, typename T38 = internal::None,\n    typename T39 = internal::None, typename T40 = internal::None,\n    typename T41 = internal::None, typename T42 = internal::None,\n    typename T43 = internal::None, typename T44 = internal::None,\n    typename T45 = internal::None, typename T46 = internal::None,\n    typename T47 = internal::None, typename T48 = internal::None,\n    typename T49 = internal::None, typename T50 = internal::None>\nstruct Types {\n  typedef internal::Types50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46, T47, T48, T49, T50> type;\n};\n\ntemplate <>\nstruct Types<internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types0 type;\n};\ntemplate <typename T1>\nstruct Types<T1, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types1<T1> type;\n};\ntemplate <typename T1, typename T2>\nstruct Types<T1, T2, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types2<T1, T2> type;\n};\ntemplate <typename T1, typename T2, typename T3>\nstruct Types<T1, T2, T3, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types3<T1, T2, T3> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4>\nstruct Types<T1, T2, T3, T4, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types4<T1, T2, T3, T4> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5>\nstruct Types<T1, T2, T3, T4, T5, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types5<T1, T2, T3, T4, T5> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6>\nstruct Types<T1, T2, T3, T4, T5, T6, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types6<T1, T2, T3, T4, T5, T6> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types7<T1, T2, T3, T4, T5, T6, T7> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types8<T1, T2, T3, T4, T5, T6, T7, T8> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,\n      T12> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,\n      T26> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,\n      T40> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, internal::None,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None, internal::None> {\n  typedef internal::Types43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None, internal::None> {\n  typedef internal::Types44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,\n    internal::None, internal::None, internal::None, internal::None,\n    internal::None> {\n  typedef internal::Types45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,\n    T46, internal::None, internal::None, internal::None, internal::None> {\n  typedef internal::Types46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,\n    T46, T47, internal::None, internal::None, internal::None> {\n  typedef internal::Types47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46, T47> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,\n    T46, T47, T48, internal::None, internal::None> {\n  typedef internal::Types48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46, T47, T48> type;\n};\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49>\nstruct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,\n    T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,\n    T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,\n    T46, T47, T48, T49, internal::None> {\n  typedef internal::Types49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46, T47, T48, T49> type;\n};\n\nnamespace internal {\n\n# define GTEST_TEMPLATE_ template <typename T> class\n\n// The template \"selector\" struct TemplateSel<Tmpl> is used to\n// represent Tmpl, which must be a class template with one type\n// parameter, as a type.  TemplateSel<Tmpl>::Bind<T>::type is defined\n// as the type Tmpl<T>.  This allows us to actually instantiate the\n// template \"selected\" by TemplateSel<Tmpl>.\n//\n// This trick is necessary for simulating typedef for class templates,\n// which C++ doesn't support directly.\ntemplate <GTEST_TEMPLATE_ Tmpl>\nstruct TemplateSel {\n  template <typename T>\n  struct Bind {\n    typedef Tmpl<T> type;\n  };\n};\n\n# define GTEST_BIND_(TmplSel, T) \\\n  TmplSel::template Bind<T>::type\n\n// A unique struct template used as the default value for the\n// arguments of class template Templates.  This allows us to simulate\n// variadic templates (e.g. Templates<int>, Templates<int, double>,\n// and etc), which C++ doesn't support directly.\ntemplate <typename T>\nstruct NoneT {};\n\n// The following family of struct and struct templates are used to\n// represent template lists.  In particular, TemplatesN<T1, T2, ...,\n// TN> represents a list of N templates (T1, T2, ..., and TN).  Except\n// for Templates0, every struct in the family has two member types:\n// Head for the selector of the first template in the list, and Tail\n// for the rest of the list.\n\n// The empty template list.\nstruct Templates0 {};\n\n// Template lists of length 1, 2, 3, and so on.\n\ntemplate <GTEST_TEMPLATE_ T1>\nstruct Templates1 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates0 Tail;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>\nstruct Templates2 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates1<T2> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>\nstruct Templates3 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates2<T2, T3> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4>\nstruct Templates4 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates3<T2, T3, T4> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>\nstruct Templates5 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates4<T2, T3, T4, T5> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>\nstruct Templates6 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates5<T2, T3, T4, T5, T6> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7>\nstruct Templates7 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates6<T2, T3, T4, T5, T6, T7> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>\nstruct Templates8 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates7<T2, T3, T4, T5, T6, T7, T8> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>\nstruct Templates9 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10>\nstruct Templates10 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>\nstruct Templates11 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>\nstruct Templates12 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13>\nstruct Templates13 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>\nstruct Templates14 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>\nstruct Templates15 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16>\nstruct Templates16 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>\nstruct Templates17 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>\nstruct Templates18 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19>\nstruct Templates19 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>\nstruct Templates20 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>\nstruct Templates21 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22>\nstruct Templates22 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>\nstruct Templates23 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>\nstruct Templates24 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25>\nstruct Templates25 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>\nstruct Templates26 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>\nstruct Templates27 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28>\nstruct Templates28 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>\nstruct Templates29 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>\nstruct Templates30 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31>\nstruct Templates31 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>\nstruct Templates32 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>\nstruct Templates33 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34>\nstruct Templates34 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>\nstruct Templates35 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>\nstruct Templates36 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37>\nstruct Templates37 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>\nstruct Templates38 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>\nstruct Templates39 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40>\nstruct Templates40 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>\nstruct Templates41 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>\nstruct Templates42 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43>\nstruct Templates43 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>\nstruct Templates44 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>\nstruct Templates45 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46>\nstruct Templates46 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45, T46> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>\nstruct Templates47 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45, T46, T47> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>\nstruct Templates48 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45, T46, T47, T48> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,\n    GTEST_TEMPLATE_ T49>\nstruct Templates49 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45, T46, T47, T48, T49> Tail;\n};\n\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,\n    GTEST_TEMPLATE_ T49, GTEST_TEMPLATE_ T50>\nstruct Templates50 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n      T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n      T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,\n      T43, T44, T45, T46, T47, T48, T49, T50> Tail;\n};\n\n\n// We don't want to require the users to write TemplatesN<...> directly,\n// as that would require them to count the length.  Templates<...> is much\n// easier to write, but generates horrible messages when there is a\n// compiler error, as gcc insists on printing out each template\n// argument, even if it has the default value (this means Templates<list>\n// will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler\n// errors).\n//\n// Our solution is to combine the best part of the two approaches: a\n// user would write Templates<T1, ..., TN>, and Google Test will translate\n// that to TemplatesN<T1, ..., TN> internally to make error messages\n// readable.  The translation is done by the 'type' member of the\n// Templates template.\ntemplate <GTEST_TEMPLATE_ T1 = NoneT, GTEST_TEMPLATE_ T2 = NoneT,\n    GTEST_TEMPLATE_ T3 = NoneT, GTEST_TEMPLATE_ T4 = NoneT,\n    GTEST_TEMPLATE_ T5 = NoneT, GTEST_TEMPLATE_ T6 = NoneT,\n    GTEST_TEMPLATE_ T7 = NoneT, GTEST_TEMPLATE_ T8 = NoneT,\n    GTEST_TEMPLATE_ T9 = NoneT, GTEST_TEMPLATE_ T10 = NoneT,\n    GTEST_TEMPLATE_ T11 = NoneT, GTEST_TEMPLATE_ T12 = NoneT,\n    GTEST_TEMPLATE_ T13 = NoneT, GTEST_TEMPLATE_ T14 = NoneT,\n    GTEST_TEMPLATE_ T15 = NoneT, GTEST_TEMPLATE_ T16 = NoneT,\n    GTEST_TEMPLATE_ T17 = NoneT, GTEST_TEMPLATE_ T18 = NoneT,\n    GTEST_TEMPLATE_ T19 = NoneT, GTEST_TEMPLATE_ T20 = NoneT,\n    GTEST_TEMPLATE_ T21 = NoneT, GTEST_TEMPLATE_ T22 = NoneT,\n    GTEST_TEMPLATE_ T23 = NoneT, GTEST_TEMPLATE_ T24 = NoneT,\n    GTEST_TEMPLATE_ T25 = NoneT, GTEST_TEMPLATE_ T26 = NoneT,\n    GTEST_TEMPLATE_ T27 = NoneT, GTEST_TEMPLATE_ T28 = NoneT,\n    GTEST_TEMPLATE_ T29 = NoneT, GTEST_TEMPLATE_ T30 = NoneT,\n    GTEST_TEMPLATE_ T31 = NoneT, GTEST_TEMPLATE_ T32 = NoneT,\n    GTEST_TEMPLATE_ T33 = NoneT, GTEST_TEMPLATE_ T34 = NoneT,\n    GTEST_TEMPLATE_ T35 = NoneT, GTEST_TEMPLATE_ T36 = NoneT,\n    GTEST_TEMPLATE_ T37 = NoneT, GTEST_TEMPLATE_ T38 = NoneT,\n    GTEST_TEMPLATE_ T39 = NoneT, GTEST_TEMPLATE_ T40 = NoneT,\n    GTEST_TEMPLATE_ T41 = NoneT, GTEST_TEMPLATE_ T42 = NoneT,\n    GTEST_TEMPLATE_ T43 = NoneT, GTEST_TEMPLATE_ T44 = NoneT,\n    GTEST_TEMPLATE_ T45 = NoneT, GTEST_TEMPLATE_ T46 = NoneT,\n    GTEST_TEMPLATE_ T47 = NoneT, GTEST_TEMPLATE_ T48 = NoneT,\n    GTEST_TEMPLATE_ T49 = NoneT, GTEST_TEMPLATE_ T50 = NoneT>\nstruct Templates {\n  typedef Templates50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45, T46, T47, T48, T49, T50> type;\n};\n\ntemplate <>\nstruct Templates<NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT> {\n  typedef Templates0 type;\n};\ntemplate <GTEST_TEMPLATE_ T1>\nstruct Templates<T1, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT> {\n  typedef Templates1<T1> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>\nstruct Templates<T1, T2, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT> {\n  typedef Templates2<T1, T2> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>\nstruct Templates<T1, T2, T3, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates3<T1, T2, T3> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4>\nstruct Templates<T1, T2, T3, T4, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates4<T1, T2, T3, T4> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>\nstruct Templates<T1, T2, T3, T4, T5, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates5<T1, T2, T3, T4, T5> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>\nstruct Templates<T1, T2, T3, T4, T5, T6, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates6<T1, T2, T3, T4, T5, T6> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates7<T1, T2, T3, T4, T5, T6, T7> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates8<T1, T2, T3, T4, T5, T6, T7, T8> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT> {\n  typedef Templates22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT> {\n  typedef Templates23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT> {\n  typedef Templates24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT> {\n  typedef Templates25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT> {\n  typedef Templates26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT> {\n  typedef Templates27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT> {\n  typedef Templates28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT> {\n  typedef Templates29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, NoneT, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, NoneT, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, NoneT, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, NoneT, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, NoneT,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    T45, NoneT, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    T45, T46, NoneT, NoneT, NoneT, NoneT> {\n  typedef Templates46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45, T46> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    T45, T46, T47, NoneT, NoneT, NoneT> {\n  typedef Templates47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45, T46, T47> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    T45, T46, T47, T48, NoneT, NoneT> {\n  typedef Templates48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45, T46, T47, T48> type;\n};\ntemplate <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,\n    GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,\n    GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,\n    GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,\n    GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,\n    GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,\n    GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,\n    GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,\n    GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,\n    GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,\n    GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,\n    GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,\n    GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,\n    GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,\n    GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,\n    GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,\n    GTEST_TEMPLATE_ T49>\nstruct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,\n    T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,\n    T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,\n    T45, T46, T47, T48, T49, NoneT> {\n  typedef Templates49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n      T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,\n      T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,\n      T42, T43, T44, T45, T46, T47, T48, T49> type;\n};\n\n// The TypeList template makes it possible to use either a single type\n// or a Types<...> list in TYPED_TEST_CASE() and\n// INSTANTIATE_TYPED_TEST_CASE_P().\n\ntemplate <typename T>\nstruct TypeList {\n  typedef Types1<T> type;\n};\n\ntemplate <typename T1, typename T2, typename T3, typename T4, typename T5,\n    typename T6, typename T7, typename T8, typename T9, typename T10,\n    typename T11, typename T12, typename T13, typename T14, typename T15,\n    typename T16, typename T17, typename T18, typename T19, typename T20,\n    typename T21, typename T22, typename T23, typename T24, typename T25,\n    typename T26, typename T27, typename T28, typename T29, typename T30,\n    typename T31, typename T32, typename T33, typename T34, typename T35,\n    typename T36, typename T37, typename T38, typename T39, typename T40,\n    typename T41, typename T42, typename T43, typename T44, typename T45,\n    typename T46, typename T47, typename T48, typename T49, typename T50>\nstruct TypeList<Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,\n    T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,\n    T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,\n    T44, T45, T46, T47, T48, T49, T50> > {\n  typedef typename Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,\n      T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,\n      T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,\n      T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>::type type;\n};\n\n#endif  // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_\n"
  },
  {
    "path": "src/madness/external/gtest/include/gtest/internal/gtest-type-util.h.pump",
    "content": "$$ -*- mode: c++; -*-\n$var n = 50  $$ Maximum length of type lists we want to support.\n// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n\n// Type utilities needed for implementing typed and type-parameterized\n// tests.  This file is generated by a SCRIPT.  DO NOT EDIT BY HAND!\n//\n// Currently we support at most $n types in a list, and at most $n\n// type-parameterized tests in one type-parameterized test case.\n// Please contact googletestframework@googlegroups.com if you need\n// more.\n\n#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_\n#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_\n\n#include \"gtest/internal/gtest-port.h\"\n\n// #ifdef __GNUC__ is too general here.  It is possible to use gcc without using\n// libstdc++ (which is where cxxabi.h comes from).\n# if GTEST_HAS_CXXABI_H_\n#  include <cxxabi.h>\n# elif defined(__HP_aCC)\n#  include <acxx_demangle.h>\n# endif  // GTEST_HASH_CXXABI_H_\n\nnamespace testing {\nnamespace internal {\n\n// GetTypeName<T>() returns a human-readable name of type T.\n// NB: This function is also used in Google Mock, so don't move it inside of\n// the typed-test-only section below.\ntemplate <typename T>\nstd::string GetTypeName() {\n# if GTEST_HAS_RTTI\n\n  const char* const name = typeid(T).name();\n#  if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)\n  int status = 0;\n  // gcc's implementation of typeid(T).name() mangles the type name,\n  // so we have to demangle it.\n#   if GTEST_HAS_CXXABI_H_\n  using abi::__cxa_demangle;\n#   endif  // GTEST_HAS_CXXABI_H_\n  char* const readable_name = __cxa_demangle(name, 0, 0, &status);\n  const std::string name_str(status == 0 ? readable_name : name);\n  free(readable_name);\n  return name_str;\n#  else\n  return name;\n#  endif  // GTEST_HAS_CXXABI_H_ || __HP_aCC\n\n# else\n\n  return \"<type>\";\n\n# endif  // GTEST_HAS_RTTI\n}\n\n#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P\n\n// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same\n// type.  This can be used as a compile-time assertion to ensure that\n// two types are equal.\n\ntemplate <typename T1, typename T2>\nstruct AssertTypeEq;\n\ntemplate <typename T>\nstruct AssertTypeEq<T, T> {\n  typedef bool type;\n};\n\n// A unique type used as the default value for the arguments of class\n// template Types.  This allows us to simulate variadic templates\n// (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't\n// support directly.\nstruct None {};\n\n// The following family of struct and struct templates are used to\n// represent type lists.  In particular, TypesN<T1, T2, ..., TN>\n// represents a type list with N types (T1, T2, ..., and TN) in it.\n// Except for Types0, every struct in the family has two member types:\n// Head for the first type in the list, and Tail for the rest of the\n// list.\n\n// The empty type list.\nstruct Types0 {};\n\n// Type lists of length 1, 2, 3, and so on.\n\ntemplate <typename T1>\nstruct Types1 {\n  typedef T1 Head;\n  typedef Types0 Tail;\n};\n\n$range i 2..n\n\n$for i [[\n$range j 1..i\n$range k 2..i\ntemplate <$for j, [[typename T$j]]>\nstruct Types$i {\n  typedef T1 Head;\n  typedef Types$(i-1)<$for k, [[T$k]]> Tail;\n};\n\n\n]]\n\n}  // namespace internal\n\n// We don't want to require the users to write TypesN<...> directly,\n// as that would require them to count the length.  Types<...> is much\n// easier to write, but generates horrible messages when there is a\n// compiler error, as gcc insists on printing out each template\n// argument, even if it has the default value (this means Types<int>\n// will appear as Types<int, None, None, ..., None> in the compiler\n// errors).\n//\n// Our solution is to combine the best part of the two approaches: a\n// user would write Types<T1, ..., TN>, and Google Test will translate\n// that to TypesN<T1, ..., TN> internally to make error messages\n// readable.  The translation is done by the 'type' member of the\n// Types template.\n\n$range i 1..n\ntemplate <$for i, [[typename T$i = internal::None]]>\nstruct Types {\n  typedef internal::Types$n<$for i, [[T$i]]> type;\n};\n\ntemplate <>\nstruct Types<$for i, [[internal::None]]> {\n  typedef internal::Types0 type;\n};\n\n$range i 1..n-1\n$for i [[\n$range j 1..i\n$range k i+1..n\ntemplate <$for j, [[typename T$j]]>\nstruct Types<$for j, [[T$j]]$for k[[, internal::None]]> {\n  typedef internal::Types$i<$for j, [[T$j]]> type;\n};\n\n]]\n\nnamespace internal {\n\n# define GTEST_TEMPLATE_ template <typename T> class\n\n// The template \"selector\" struct TemplateSel<Tmpl> is used to\n// represent Tmpl, which must be a class template with one type\n// parameter, as a type.  TemplateSel<Tmpl>::Bind<T>::type is defined\n// as the type Tmpl<T>.  This allows us to actually instantiate the\n// template \"selected\" by TemplateSel<Tmpl>.\n//\n// This trick is necessary for simulating typedef for class templates,\n// which C++ doesn't support directly.\ntemplate <GTEST_TEMPLATE_ Tmpl>\nstruct TemplateSel {\n  template <typename T>\n  struct Bind {\n    typedef Tmpl<T> type;\n  };\n};\n\n# define GTEST_BIND_(TmplSel, T) \\\n  TmplSel::template Bind<T>::type\n\n// A unique struct template used as the default value for the\n// arguments of class template Templates.  This allows us to simulate\n// variadic templates (e.g. Templates<int>, Templates<int, double>,\n// and etc), which C++ doesn't support directly.\ntemplate <typename T>\nstruct NoneT {};\n\n// The following family of struct and struct templates are used to\n// represent template lists.  In particular, TemplatesN<T1, T2, ...,\n// TN> represents a list of N templates (T1, T2, ..., and TN).  Except\n// for Templates0, every struct in the family has two member types:\n// Head for the selector of the first template in the list, and Tail\n// for the rest of the list.\n\n// The empty template list.\nstruct Templates0 {};\n\n// Template lists of length 1, 2, 3, and so on.\n\ntemplate <GTEST_TEMPLATE_ T1>\nstruct Templates1 {\n  typedef TemplateSel<T1> Head;\n  typedef Templates0 Tail;\n};\n\n$range i 2..n\n\n$for i [[\n$range j 1..i\n$range k 2..i\ntemplate <$for j, [[GTEST_TEMPLATE_ T$j]]>\nstruct Templates$i {\n  typedef TemplateSel<T1> Head;\n  typedef Templates$(i-1)<$for k, [[T$k]]> Tail;\n};\n\n\n]]\n\n// We don't want to require the users to write TemplatesN<...> directly,\n// as that would require them to count the length.  Templates<...> is much\n// easier to write, but generates horrible messages when there is a\n// compiler error, as gcc insists on printing out each template\n// argument, even if it has the default value (this means Templates<list>\n// will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler\n// errors).\n//\n// Our solution is to combine the best part of the two approaches: a\n// user would write Templates<T1, ..., TN>, and Google Test will translate\n// that to TemplatesN<T1, ..., TN> internally to make error messages\n// readable.  The translation is done by the 'type' member of the\n// Templates template.\n\n$range i 1..n\ntemplate <$for i, [[GTEST_TEMPLATE_ T$i = NoneT]]>\nstruct Templates {\n  typedef Templates$n<$for i, [[T$i]]> type;\n};\n\ntemplate <>\nstruct Templates<$for i, [[NoneT]]> {\n  typedef Templates0 type;\n};\n\n$range i 1..n-1\n$for i [[\n$range j 1..i\n$range k i+1..n\ntemplate <$for j, [[GTEST_TEMPLATE_ T$j]]>\nstruct Templates<$for j, [[T$j]]$for k[[, NoneT]]> {\n  typedef Templates$i<$for j, [[T$j]]> type;\n};\n\n]]\n\n// The TypeList template makes it possible to use either a single type\n// or a Types<...> list in TYPED_TEST_CASE() and\n// INSTANTIATE_TYPED_TEST_CASE_P().\n\ntemplate <typename T>\nstruct TypeList {\n  typedef Types1<T> type;\n};\n\n\n$range i 1..n\ntemplate <$for i, [[typename T$i]]>\nstruct TypeList<Types<$for i, [[T$i]]> > {\n  typedef typename Types<$for i, [[T$i]]>::type type;\n};\n\n#endif  // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_\n"
  },
  {
    "path": "src/madness/external/gtest/src/gtest-all.cc",
    "content": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mheule@google.com (Markus Heule)\n//\n// Google C++ Testing Framework (Google Test)\n//\n// Sometimes it's desirable to build Google Test by compiling a single file.\n// This file serves this purpose.\n\n// This line ensures that gtest.h can be compiled on its own, even\n// when it's fused.\n#include \"gtest/gtest.h\"\n\n// The following lines pull in the real gtest *.cc files.\n#include \"src/gtest.cc\"\n#include \"src/gtest-death-test.cc\"\n#include \"src/gtest-filepath.cc\"\n#include \"src/gtest-port.cc\"\n#include \"src/gtest-printers.cc\"\n#include \"src/gtest-test-part.cc\"\n#include \"src/gtest-typed-test.cc\"\n"
  },
  {
    "path": "src/madness/external/gtest/src/gtest-death-test.cc",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev)\n//\n// This file implements death tests.\n\n#include \"gtest/gtest-death-test.h\"\n#include \"gtest/internal/gtest-port.h\"\n\n#if GTEST_HAS_DEATH_TEST\n\n# if GTEST_OS_MAC\n#  include <crt_externs.h>\n# endif  // GTEST_OS_MAC\n\n# include <errno.h>\n# include <fcntl.h>\n# include <limits.h>\n\n# if GTEST_OS_LINUX\n#  include <signal.h>\n# endif  // GTEST_OS_LINUX\n\n# include <stdarg.h>\n\n# if GTEST_OS_WINDOWS\n#  include <windows.h>\n# else\n#  include <sys/mman.h>\n#  include <sys/wait.h>\n# endif  // GTEST_OS_WINDOWS\n\n# if GTEST_OS_QNX\n#  include <spawn.h>\n# endif  // GTEST_OS_QNX\n\n#endif  // GTEST_HAS_DEATH_TEST\n\n#include \"gtest/gtest-message.h\"\n#include \"gtest/internal/gtest-string.h\"\n\n// Indicates that this translation unit is part of Google Test's\n// implementation.  It must come before gtest-internal-inl.h is\n// included, or there will be a compiler error.  This trick is to\n// prevent a user from accidentally including gtest-internal-inl.h in\n// his code.\n#define GTEST_IMPLEMENTATION_ 1\n#include \"src/gtest-internal-inl.h\"\n#undef GTEST_IMPLEMENTATION_\n\nnamespace testing {\n\n// Constants.\n\n// The default death test style.\nstatic const char kDefaultDeathTestStyle[] = \"fast\";\n\nGTEST_DEFINE_string_(\n    death_test_style,\n    internal::StringFromGTestEnv(\"death_test_style\", kDefaultDeathTestStyle),\n    \"Indicates how to run a death test in a forked child process: \"\n    \"\\\"threadsafe\\\" (child process re-executes the test binary \"\n    \"from the beginning, running only the specific death test) or \"\n    \"\\\"fast\\\" (child process runs the death test immediately \"\n    \"after forking).\");\n\nGTEST_DEFINE_bool_(\n    death_test_use_fork,\n    internal::BoolFromGTestEnv(\"death_test_use_fork\", false),\n    \"Instructs to use fork()/_exit() instead of clone() in death tests. \"\n    \"Ignored and always uses fork() on POSIX systems where clone() is not \"\n    \"implemented. Useful when running under valgrind or similar tools if \"\n    \"those do not support clone(). Valgrind 3.3.1 will just fail if \"\n    \"it sees an unsupported combination of clone() flags. \"\n    \"It is not recommended to use this flag w/o valgrind though it will \"\n    \"work in 99% of the cases. Once valgrind is fixed, this flag will \"\n    \"most likely be removed.\");\n\nnamespace internal {\nGTEST_DEFINE_string_(\n    internal_run_death_test, \"\",\n    \"Indicates the file, line number, temporal index of \"\n    \"the single death test to run, and a file descriptor to \"\n    \"which a success code may be sent, all separated by \"\n    \"the '|' characters.  This flag is specified if and only if the current \"\n    \"process is a sub-process launched for running a thread-safe \"\n    \"death test.  FOR INTERNAL USE ONLY.\");\n}  // namespace internal\n\n#if GTEST_HAS_DEATH_TEST\n\nnamespace internal {\n\n// Valid only for fast death tests. Indicates the code is running in the\n// child process of a fast style death test.\nstatic bool g_in_fast_death_test_child = false;\n\n// Returns a Boolean value indicating whether the caller is currently\n// executing in the context of the death test child process.  Tools such as\n// Valgrind heap checkers may need this to modify their behavior in death\n// tests.  IMPORTANT: This is an internal utility.  Using it may break the\n// implementation of death tests.  User code MUST NOT use it.\nbool InDeathTestChild() {\n# if GTEST_OS_WINDOWS\n\n  // On Windows, death tests are thread-safe regardless of the value of the\n  // death_test_style flag.\n  return !GTEST_FLAG(internal_run_death_test).empty();\n\n# else\n\n  if (GTEST_FLAG(death_test_style) == \"threadsafe\")\n    return !GTEST_FLAG(internal_run_death_test).empty();\n  else\n    return g_in_fast_death_test_child;\n#endif\n}\n\n}  // namespace internal\n\n// ExitedWithCode constructor.\nExitedWithCode::ExitedWithCode(int exit_code) : exit_code_(exit_code) {\n}\n\n// ExitedWithCode function-call operator.\nbool ExitedWithCode::operator()(int exit_status) const {\n# if GTEST_OS_WINDOWS\n\n  return exit_status == exit_code_;\n\n# else\n\n  return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_;\n\n# endif  // GTEST_OS_WINDOWS\n}\n\n# if !GTEST_OS_WINDOWS\n// KilledBySignal constructor.\nKilledBySignal::KilledBySignal(int signum) : signum_(signum) {\n}\n\n// KilledBySignal function-call operator.\nbool KilledBySignal::operator()(int exit_status) const {\n  return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_;\n}\n# endif  // !GTEST_OS_WINDOWS\n\nnamespace internal {\n\n// Utilities needed for death tests.\n\n// Generates a textual description of a given exit code, in the format\n// specified by wait(2).\nstatic std::string ExitSummary(int exit_code) {\n  Message m;\n\n# if GTEST_OS_WINDOWS\n\n  m << \"Exited with exit status \" << exit_code;\n\n# else\n\n  if (WIFEXITED(exit_code)) {\n    m << \"Exited with exit status \" << WEXITSTATUS(exit_code);\n  } else if (WIFSIGNALED(exit_code)) {\n    m << \"Terminated by signal \" << WTERMSIG(exit_code);\n  }\n#  ifdef WCOREDUMP\n  if (WCOREDUMP(exit_code)) {\n    m << \" (core dumped)\";\n  }\n#  endif\n# endif  // GTEST_OS_WINDOWS\n\n  return m.GetString();\n}\n\n// Returns true if exit_status describes a process that was terminated\n// by a signal, or exited normally with a nonzero exit code.\nbool ExitedUnsuccessfully(int exit_status) {\n  return !ExitedWithCode(0)(exit_status);\n}\n\n# if !GTEST_OS_WINDOWS\n// Generates a textual failure message when a death test finds more than\n// one thread running, or cannot determine the number of threads, prior\n// to executing the given statement.  It is the responsibility of the\n// caller not to pass a thread_count of 1.\nstatic std::string DeathTestThreadWarning(size_t thread_count) {\n  Message msg;\n  msg << \"Death tests use fork(), which is unsafe particularly\"\n      << \" in a threaded context. For this test, \" << GTEST_NAME_ << \" \";\n  if (thread_count == 0)\n    msg << \"couldn't detect the number of threads.\";\n  else\n    msg << \"detected \" << thread_count << \" threads.\";\n  return msg.GetString();\n}\n# endif  // !GTEST_OS_WINDOWS\n\n// Flag characters for reporting a death test that did not die.\nstatic const char kDeathTestLived = 'L';\nstatic const char kDeathTestReturned = 'R';\nstatic const char kDeathTestThrew = 'T';\nstatic const char kDeathTestInternalError = 'I';\n\n// An enumeration describing all of the possible ways that a death test can\n// conclude.  DIED means that the process died while executing the test\n// code; LIVED means that process lived beyond the end of the test code;\n// RETURNED means that the test statement attempted to execute a return\n// statement, which is not allowed; THREW means that the test statement\n// returned control by throwing an exception.  IN_PROGRESS means the test\n// has not yet concluded.\n// TODO(vladl@google.com): Unify names and possibly values for\n// AbortReason, DeathTestOutcome, and flag characters above.\nenum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW };\n\n// Routine for aborting the program which is safe to call from an\n// exec-style death test child process, in which case the error\n// message is propagated back to the parent process.  Otherwise, the\n// message is simply printed to stderr.  In either case, the program\n// then exits with status 1.\nvoid DeathTestAbort(const std::string& message) {\n  // On a POSIX system, this function may be called from a threadsafe-style\n  // death test child process, which operates on a very small stack.  Use\n  // the heap for any additional non-minuscule memory requirements.\n  const InternalRunDeathTestFlag* const flag =\n      GetUnitTestImpl()->internal_run_death_test_flag();\n  if (flag != NULL) {\n    FILE* parent = posix::FDOpen(flag->write_fd(), \"w\");\n    fputc(kDeathTestInternalError, parent);\n    fprintf(parent, \"%s\", message.c_str());\n    fflush(parent);\n    _exit(1);\n  } else {\n    fprintf(stderr, \"%s\", message.c_str());\n    fflush(stderr);\n    posix::Abort();\n  }\n}\n\n// A replacement for CHECK that calls DeathTestAbort if the assertion\n// fails.\n# define GTEST_DEATH_TEST_CHECK_(expression) \\\n  do { \\\n    if (!::testing::internal::IsTrue(expression)) { \\\n      DeathTestAbort( \\\n          ::std::string(\"CHECK failed: File \") + __FILE__ +  \", line \" \\\n          + ::testing::internal::StreamableToString(__LINE__) + \": \" \\\n          + #expression); \\\n    } \\\n  } while (::testing::internal::AlwaysFalse())\n\n// This macro is similar to GTEST_DEATH_TEST_CHECK_, but it is meant for\n// evaluating any system call that fulfills two conditions: it must return\n// -1 on failure, and set errno to EINTR when it is interrupted and\n// should be tried again.  The macro expands to a loop that repeatedly\n// evaluates the expression as long as it evaluates to -1 and sets\n// errno to EINTR.  If the expression evaluates to -1 but errno is\n// something other than EINTR, DeathTestAbort is called.\n# define GTEST_DEATH_TEST_CHECK_SYSCALL_(expression) \\\n  do { \\\n    int gtest_retval; \\\n    do { \\\n      gtest_retval = (expression); \\\n    } while (gtest_retval == -1 && errno == EINTR); \\\n    if (gtest_retval == -1) { \\\n      DeathTestAbort( \\\n          ::std::string(\"CHECK failed: File \") + __FILE__ + \", line \" \\\n          + ::testing::internal::StreamableToString(__LINE__) + \": \" \\\n          + #expression + \" != -1\"); \\\n    } \\\n  } while (::testing::internal::AlwaysFalse())\n\n// Returns the message describing the last system error in errno.\nstd::string GetLastErrnoDescription() {\n    return errno == 0 ? \"\" : posix::StrError(errno);\n}\n\n// This is called from a death test parent process to read a failure\n// message from the death test child process and log it with the FATAL\n// severity. On Windows, the message is read from a pipe handle. On other\n// platforms, it is read from a file descriptor.\nstatic void FailFromInternalError(int fd) {\n  Message error;\n  char buffer[256];\n  int num_read;\n\n  do {\n    while ((num_read = posix::Read(fd, buffer, 255)) > 0) {\n      buffer[num_read] = '\\0';\n      error << buffer;\n    }\n  } while (num_read == -1 && errno == EINTR);\n\n  if (num_read == 0) {\n    GTEST_LOG_(FATAL) << error.GetString();\n  } else {\n    const int last_error = errno;\n    GTEST_LOG_(FATAL) << \"Error while reading death test internal: \"\n                      << GetLastErrnoDescription() << \" [\" << last_error << \"]\";\n  }\n}\n\n// Death test constructor.  Increments the running death test count\n// for the current test.\nDeathTest::DeathTest() {\n  TestInfo* const info = GetUnitTestImpl()->current_test_info();\n  if (info == NULL) {\n    DeathTestAbort(\"Cannot run a death test outside of a TEST or \"\n                   \"TEST_F construct\");\n  }\n}\n\n// Creates and returns a death test by dispatching to the current\n// death test factory.\nbool DeathTest::Create(const char* statement, const RE* regex,\n                       const char* file, int line, DeathTest** test) {\n  return GetUnitTestImpl()->death_test_factory()->Create(\n      statement, regex, file, line, test);\n}\n\nconst char* DeathTest::LastMessage() {\n  return last_death_test_message_.c_str();\n}\n\nvoid DeathTest::set_last_death_test_message(const std::string& message) {\n  last_death_test_message_ = message;\n}\n\nstd::string DeathTest::last_death_test_message_;\n\n// Provides cross platform implementation for some death functionality.\nclass DeathTestImpl : public DeathTest {\n protected:\n  DeathTestImpl(const char* a_statement, const RE* a_regex)\n      : statement_(a_statement),\n        regex_(a_regex),\n        spawned_(false),\n        status_(-1),\n        outcome_(IN_PROGRESS),\n        read_fd_(-1),\n        write_fd_(-1) {}\n\n  // read_fd_ is expected to be closed and cleared by a derived class.\n  ~DeathTestImpl() { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); }\n\n  void Abort(AbortReason reason);\n  virtual bool Passed(bool status_ok);\n\n  const char* statement() const { return statement_; }\n  const RE* regex() const { return regex_; }\n  bool spawned() const { return spawned_; }\n  void set_spawned(bool is_spawned) { spawned_ = is_spawned; }\n  int status() const { return status_; }\n  void set_status(int a_status) { status_ = a_status; }\n  DeathTestOutcome outcome() const { return outcome_; }\n  void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outcome; }\n  int read_fd() const { return read_fd_; }\n  void set_read_fd(int fd) { read_fd_ = fd; }\n  int write_fd() const { return write_fd_; }\n  void set_write_fd(int fd) { write_fd_ = fd; }\n\n  // Called in the parent process only. Reads the result code of the death\n  // test child process via a pipe, interprets it to set the outcome_\n  // member, and closes read_fd_.  Outputs diagnostics and terminates in\n  // case of unexpected codes.\n  void ReadAndInterpretStatusByte();\n\n private:\n  // The textual content of the code this object is testing.  This class\n  // doesn't own this string and should not attempt to delete it.\n  const char* const statement_;\n  // The regular expression which test output must match.  DeathTestImpl\n  // doesn't own this object and should not attempt to delete it.\n  const RE* const regex_;\n  // True if the death test child process has been successfully spawned.\n  bool spawned_;\n  // The exit status of the child process.\n  int status_;\n  // How the death test concluded.\n  DeathTestOutcome outcome_;\n  // Descriptor to the read end of the pipe to the child process.  It is\n  // always -1 in the child process.  The child keeps its write end of the\n  // pipe in write_fd_.\n  int read_fd_;\n  // Descriptor to the child's write end of the pipe to the parent process.\n  // It is always -1 in the parent process.  The parent keeps its end of the\n  // pipe in read_fd_.\n  int write_fd_;\n};\n\n// Called in the parent process only. Reads the result code of the death\n// test child process via a pipe, interprets it to set the outcome_\n// member, and closes read_fd_.  Outputs diagnostics and terminates in\n// case of unexpected codes.\nvoid DeathTestImpl::ReadAndInterpretStatusByte() {\n  char flag;\n  int bytes_read;\n\n  // The read() here blocks until data is available (signifying the\n  // failure of the death test) or until the pipe is closed (signifying\n  // its success), so it's okay to call this in the parent before\n  // the child process has exited.\n  do {\n    bytes_read = posix::Read(read_fd(), &flag, 1);\n  } while (bytes_read == -1 && errno == EINTR);\n\n  if (bytes_read == 0) {\n    set_outcome(DIED);\n  } else if (bytes_read == 1) {\n    switch (flag) {\n      case kDeathTestReturned:\n        set_outcome(RETURNED);\n        break;\n      case kDeathTestThrew:\n        set_outcome(THREW);\n        break;\n      case kDeathTestLived:\n        set_outcome(LIVED);\n        break;\n      case kDeathTestInternalError:\n        FailFromInternalError(read_fd());  // Does not return.\n        break;\n      default:\n        GTEST_LOG_(FATAL) << \"Death test child process reported \"\n                          << \"unexpected status byte (\"\n                          << static_cast<unsigned int>(flag) << \")\";\n    }\n  } else {\n    GTEST_LOG_(FATAL) << \"Read from death test child process failed: \"\n                      << GetLastErrnoDescription();\n  }\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd()));\n  set_read_fd(-1);\n}\n\n// Signals that the death test code which should have exited, didn't.\n// Should be called only in a death test child process.\n// Writes a status byte to the child's status file descriptor, then\n// calls _exit(1).\nvoid DeathTestImpl::Abort(AbortReason reason) {\n  // The parent process considers the death test to be a failure if\n  // it finds any data in our pipe.  So, here we write a single flag byte\n  // to the pipe, then exit.\n  const char status_ch =\n      reason == TEST_DID_NOT_DIE ? kDeathTestLived :\n      reason == TEST_THREW_EXCEPTION ? kDeathTestThrew : kDeathTestReturned;\n\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Write(write_fd(), &status_ch, 1));\n  // We are leaking the descriptor here because on some platforms (i.e.,\n  // when built as Windows DLL), destructors of global objects will still\n  // run after calling _exit(). On such systems, write_fd_ will be\n  // indirectly closed from the destructor of UnitTestImpl, causing double\n  // close if it is also closed here. On debug configurations, double close\n  // may assert. As there are no in-process buffers to flush here, we are\n  // relying on the OS to close the descriptor after the process terminates\n  // when the destructors are not run.\n  _exit(1);  // Exits w/o any normal exit hooks (we were supposed to crash)\n}\n\n// Returns an indented copy of stderr output for a death test.\n// This makes distinguishing death test output lines from regular log lines\n// much easier.\nstatic ::std::string FormatDeathTestOutput(const ::std::string& output) {\n  ::std::string ret;\n  for (size_t at = 0; ; ) {\n    const size_t line_end = output.find('\\n', at);\n    ret += \"[  DEATH   ] \";\n    if (line_end == ::std::string::npos) {\n      ret += output.substr(at);\n      break;\n    }\n    ret += output.substr(at, line_end + 1 - at);\n    at = line_end + 1;\n  }\n  return ret;\n}\n\n// Assesses the success or failure of a death test, using both private\n// members which have previously been set, and one argument:\n//\n// Private data members:\n//   outcome:  An enumeration describing how the death test\n//             concluded: DIED, LIVED, THREW, or RETURNED.  The death test\n//             fails in the latter three cases.\n//   status:   The exit status of the child process. On *nix, it is in the\n//             in the format specified by wait(2). On Windows, this is the\n//             value supplied to the ExitProcess() API or a numeric code\n//             of the exception that terminated the program.\n//   regex:    A regular expression object to be applied to\n//             the test's captured standard error output; the death test\n//             fails if it does not match.\n//\n// Argument:\n//   status_ok: true if exit_status is acceptable in the context of\n//              this particular death test, which fails if it is false\n//\n// Returns true iff all of the above conditions are met.  Otherwise, the\n// first failing condition, in the order given above, is the one that is\n// reported. Also sets the last death test message string.\nbool DeathTestImpl::Passed(bool status_ok) {\n  if (!spawned())\n    return false;\n\n  const std::string error_message = GetCapturedStderr();\n\n  bool success = false;\n  Message buffer;\n\n  buffer << \"Death test: \" << statement() << \"\\n\";\n  switch (outcome()) {\n    case LIVED:\n      buffer << \"    Result: failed to die.\\n\"\n             << \" Error msg:\\n\" << FormatDeathTestOutput(error_message);\n      break;\n    case THREW:\n      buffer << \"    Result: threw an exception.\\n\"\n             << \" Error msg:\\n\" << FormatDeathTestOutput(error_message);\n      break;\n    case RETURNED:\n      buffer << \"    Result: illegal return in test statement.\\n\"\n             << \" Error msg:\\n\" << FormatDeathTestOutput(error_message);\n      break;\n    case DIED:\n      if (status_ok) {\n        const bool matched = RE::PartialMatch(error_message.c_str(), *regex());\n        if (matched) {\n          success = true;\n        } else {\n          buffer << \"    Result: died but not with expected error.\\n\"\n                 << \"  Expected: \" << regex()->pattern() << \"\\n\"\n                 << \"Actual msg:\\n\" << FormatDeathTestOutput(error_message);\n        }\n      } else {\n        buffer << \"    Result: died but not with expected exit code:\\n\"\n               << \"            \" << ExitSummary(status()) << \"\\n\"\n               << \"Actual msg:\\n\" << FormatDeathTestOutput(error_message);\n      }\n      break;\n    case IN_PROGRESS:\n    default:\n      GTEST_LOG_(FATAL)\n          << \"DeathTest::Passed somehow called before conclusion of test\";\n  }\n\n  DeathTest::set_last_death_test_message(buffer.GetString());\n  return success;\n}\n\n# if GTEST_OS_WINDOWS\n// WindowsDeathTest implements death tests on Windows. Due to the\n// specifics of starting new processes on Windows, death tests there are\n// always threadsafe, and Google Test considers the\n// --gtest_death_test_style=fast setting to be equivalent to\n// --gtest_death_test_style=threadsafe there.\n//\n// A few implementation notes:  Like the Linux version, the Windows\n// implementation uses pipes for child-to-parent communication. But due to\n// the specifics of pipes on Windows, some extra steps are required:\n//\n// 1. The parent creates a communication pipe and stores handles to both\n//    ends of it.\n// 2. The parent starts the child and provides it with the information\n//    necessary to acquire the handle to the write end of the pipe.\n// 3. The child acquires the write end of the pipe and signals the parent\n//    using a Windows event.\n// 4. Now the parent can release the write end of the pipe on its side. If\n//    this is done before step 3, the object's reference count goes down to\n//    0 and it is destroyed, preventing the child from acquiring it. The\n//    parent now has to release it, or read operations on the read end of\n//    the pipe will not return when the child terminates.\n// 5. The parent reads child's output through the pipe (outcome code and\n//    any possible error messages) from the pipe, and its stderr and then\n//    determines whether to fail the test.\n//\n// Note: to distinguish Win32 API calls from the local method and function\n// calls, the former are explicitly resolved in the global namespace.\n//\nclass WindowsDeathTest : public DeathTestImpl {\n public:\n  WindowsDeathTest(const char* a_statement,\n                   const RE* a_regex,\n                   const char* file,\n                   int line)\n      : DeathTestImpl(a_statement, a_regex), file_(file), line_(line) {}\n\n  // All of these virtual functions are inherited from DeathTest.\n  virtual int Wait();\n  virtual TestRole AssumeRole();\n\n private:\n  // The name of the file in which the death test is located.\n  const char* const file_;\n  // The line number on which the death test is located.\n  const int line_;\n  // Handle to the write end of the pipe to the child process.\n  AutoHandle write_handle_;\n  // Child process handle.\n  AutoHandle child_handle_;\n  // Event the child process uses to signal the parent that it has\n  // acquired the handle to the write end of the pipe. After seeing this\n  // event the parent can release its own handles to make sure its\n  // ReadFile() calls return when the child terminates.\n  AutoHandle event_handle_;\n};\n\n// Waits for the child in a death test to exit, returning its exit\n// status, or 0 if no child process exists.  As a side effect, sets the\n// outcome data member.\nint WindowsDeathTest::Wait() {\n  if (!spawned())\n    return 0;\n\n  // Wait until the child either signals that it has acquired the write end\n  // of the pipe or it dies.\n  const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() };\n  switch (::WaitForMultipleObjects(2,\n                                   wait_handles,\n                                   FALSE,  // Waits for any of the handles.\n                                   INFINITE)) {\n    case WAIT_OBJECT_0:\n    case WAIT_OBJECT_0 + 1:\n      break;\n    default:\n      GTEST_DEATH_TEST_CHECK_(false);  // Should not get here.\n  }\n\n  // The child has acquired the write end of the pipe or exited.\n  // We release the handle on our side and continue.\n  write_handle_.Reset();\n  event_handle_.Reset();\n\n  ReadAndInterpretStatusByte();\n\n  // Waits for the child process to exit if it haven't already. This\n  // returns immediately if the child has already exited, regardless of\n  // whether previous calls to WaitForMultipleObjects synchronized on this\n  // handle or not.\n  GTEST_DEATH_TEST_CHECK_(\n      WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(),\n                                             INFINITE));\n  DWORD status_code;\n  GTEST_DEATH_TEST_CHECK_(\n      ::GetExitCodeProcess(child_handle_.Get(), &status_code) != FALSE);\n  child_handle_.Reset();\n  set_status(static_cast<int>(status_code));\n  return status();\n}\n\n// The AssumeRole process for a Windows death test.  It creates a child\n// process with the same executable as the current process to run the\n// death test.  The child process is given the --gtest_filter and\n// --gtest_internal_run_death_test flags such that it knows to run the\n// current death test only.\nDeathTest::TestRole WindowsDeathTest::AssumeRole() {\n  const UnitTestImpl* const impl = GetUnitTestImpl();\n  const InternalRunDeathTestFlag* const flag =\n      impl->internal_run_death_test_flag();\n  const TestInfo* const info = impl->current_test_info();\n  const int death_test_index = info->result()->death_test_count();\n\n  if (flag != NULL) {\n    // ParseInternalRunDeathTestFlag() has performed all the necessary\n    // processing.\n    set_write_fd(flag->write_fd());\n    return EXECUTE_TEST;\n  }\n\n  // WindowsDeathTest uses an anonymous pipe to communicate results of\n  // a death test.\n  SECURITY_ATTRIBUTES handles_are_inheritable = {\n    sizeof(SECURITY_ATTRIBUTES), NULL, TRUE };\n  HANDLE read_handle, write_handle;\n  GTEST_DEATH_TEST_CHECK_(\n      ::CreatePipe(&read_handle, &write_handle, &handles_are_inheritable,\n                   0)  // Default buffer size.\n      != FALSE);\n  set_read_fd(::_open_osfhandle(reinterpret_cast<intptr_t>(read_handle),\n                                O_RDONLY));\n  write_handle_.Reset(write_handle);\n  event_handle_.Reset(::CreateEvent(\n      &handles_are_inheritable,\n      TRUE,    // The event will automatically reset to non-signaled state.\n      FALSE,   // The initial state is non-signalled.\n      NULL));  // The even is unnamed.\n  GTEST_DEATH_TEST_CHECK_(event_handle_.Get() != NULL);\n  const std::string filter_flag =\n      std::string(\"--\") + GTEST_FLAG_PREFIX_ + kFilterFlag + \"=\" +\n      info->test_case_name() + \".\" + info->name();\n  const std::string internal_flag =\n      std::string(\"--\") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag +\n      \"=\" + file_ + \"|\" + StreamableToString(line_) + \"|\" +\n      StreamableToString(death_test_index) + \"|\" +\n      StreamableToString(static_cast<unsigned int>(::GetCurrentProcessId())) +\n      // size_t has the same width as pointers on both 32-bit and 64-bit\n      // Windows platforms.\n      // See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx.\n      \"|\" + StreamableToString(reinterpret_cast<size_t>(write_handle)) +\n      \"|\" + StreamableToString(reinterpret_cast<size_t>(event_handle_.Get()));\n\n  char executable_path[_MAX_PATH + 1];  // NOLINT\n  GTEST_DEATH_TEST_CHECK_(\n      _MAX_PATH + 1 != ::GetModuleFileNameA(NULL,\n                                            executable_path,\n                                            _MAX_PATH));\n\n  std::string command_line =\n      std::string(::GetCommandLineA()) + \" \" + filter_flag + \" \\\"\" +\n      internal_flag + \"\\\"\";\n\n  DeathTest::set_last_death_test_message(\"\");\n\n  CaptureStderr();\n  // Flush the log buffers since the log streams are shared with the child.\n  FlushInfoLog();\n\n  // The child process will share the standard handles with the parent.\n  STARTUPINFOA startup_info;\n  memset(&startup_info, 0, sizeof(STARTUPINFO));\n  startup_info.dwFlags = STARTF_USESTDHANDLES;\n  startup_info.hStdInput = ::GetStdHandle(STD_INPUT_HANDLE);\n  startup_info.hStdOutput = ::GetStdHandle(STD_OUTPUT_HANDLE);\n  startup_info.hStdError = ::GetStdHandle(STD_ERROR_HANDLE);\n\n  PROCESS_INFORMATION process_info;\n  GTEST_DEATH_TEST_CHECK_(::CreateProcessA(\n      executable_path,\n      const_cast<char*>(command_line.c_str()),\n      NULL,   // Retuned process handle is not inheritable.\n      NULL,   // Retuned thread handle is not inheritable.\n      TRUE,   // Child inherits all inheritable handles (for write_handle_).\n      0x0,    // Default creation flags.\n      NULL,   // Inherit the parent's environment.\n      UnitTest::GetInstance()->original_working_dir(),\n      &startup_info,\n      &process_info) != FALSE);\n  child_handle_.Reset(process_info.hProcess);\n  ::CloseHandle(process_info.hThread);\n  set_spawned(true);\n  return OVERSEE_TEST;\n}\n# else  // We are not on Windows.\n\n// ForkingDeathTest provides implementations for most of the abstract\n// methods of the DeathTest interface.  Only the AssumeRole method is\n// left undefined.\nclass ForkingDeathTest : public DeathTestImpl {\n public:\n  ForkingDeathTest(const char* statement, const RE* regex);\n\n  // All of these virtual functions are inherited from DeathTest.\n  virtual int Wait();\n\n protected:\n  void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }\n\n private:\n  // PID of child process during death test; 0 in the child process itself.\n  pid_t child_pid_;\n};\n\n// Constructs a ForkingDeathTest.\nForkingDeathTest::ForkingDeathTest(const char* a_statement, const RE* a_regex)\n    : DeathTestImpl(a_statement, a_regex),\n      child_pid_(-1) {}\n\n// Waits for the child in a death test to exit, returning its exit\n// status, or 0 if no child process exists.  As a side effect, sets the\n// outcome data member.\nint ForkingDeathTest::Wait() {\n  if (!spawned())\n    return 0;\n\n  ReadAndInterpretStatusByte();\n\n  int status_value;\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status_value, 0));\n  set_status(status_value);\n  return status_value;\n}\n\n// A concrete death test class that forks, then immediately runs the test\n// in the child process.\nclass NoExecDeathTest : public ForkingDeathTest {\n public:\n  NoExecDeathTest(const char* a_statement, const RE* a_regex) :\n      ForkingDeathTest(a_statement, a_regex) { }\n  virtual TestRole AssumeRole();\n};\n\n// The AssumeRole process for a fork-and-run death test.  It implements a\n// straightforward fork, with a simple pipe to transmit the status byte.\nDeathTest::TestRole NoExecDeathTest::AssumeRole() {\n  const size_t thread_count = GetThreadCount();\n  if (thread_count != 1) {\n    GTEST_LOG_(WARNING) << DeathTestThreadWarning(thread_count);\n  }\n\n  int pipe_fd[2];\n  GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);\n\n  DeathTest::set_last_death_test_message(\"\");\n  CaptureStderr();\n  // When we fork the process below, the log file buffers are copied, but the\n  // file descriptors are shared.  We flush all log files here so that closing\n  // the file descriptors in the child process doesn't throw off the\n  // synchronization between descriptors and buffers in the parent process.\n  // This is as close to the fork as possible to avoid a race condition in case\n  // there are multiple threads running before the death test, and another\n  // thread writes to the log file.\n  FlushInfoLog();\n\n  const pid_t child_pid = fork();\n  GTEST_DEATH_TEST_CHECK_(child_pid != -1);\n  set_child_pid(child_pid);\n  if (child_pid == 0) {\n    GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0]));\n    set_write_fd(pipe_fd[1]);\n    // Redirects all logging to stderr in the child process to prevent\n    // concurrent writes to the log files.  We capture stderr in the parent\n    // process and append the child process' output to a log.\n    LogToStderr();\n    // Event forwarding to the listeners of event listener API mush be shut\n    // down in death test subprocesses.\n    GetUnitTestImpl()->listeners()->SuppressEventForwarding();\n    g_in_fast_death_test_child = true;\n    return EXECUTE_TEST;\n  } else {\n    GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));\n    set_read_fd(pipe_fd[0]);\n    set_spawned(true);\n    return OVERSEE_TEST;\n  }\n}\n\n// A concrete death test class that forks and re-executes the main\n// program from the beginning, with command-line flags set that cause\n// only this specific death test to be run.\nclass ExecDeathTest : public ForkingDeathTest {\n public:\n  ExecDeathTest(const char* a_statement, const RE* a_regex,\n                const char* file, int line) :\n      ForkingDeathTest(a_statement, a_regex), file_(file), line_(line) { }\n  virtual TestRole AssumeRole();\n private:\n  static ::std::vector<testing::internal::string>\n  GetArgvsForDeathTestChildProcess() {\n    ::std::vector<testing::internal::string> args = GetInjectableArgvs();\n    return args;\n  }\n  // The name of the file in which the death test is located.\n  const char* const file_;\n  // The line number on which the death test is located.\n  const int line_;\n};\n\n// Utility class for accumulating command-line arguments.\nclass Arguments {\n public:\n  Arguments() {\n    args_.push_back(NULL);\n  }\n\n  ~Arguments() {\n    for (std::vector<char*>::iterator i = args_.begin(); i != args_.end();\n         ++i) {\n      free(*i);\n    }\n  }\n  void AddArgument(const char* argument) {\n    args_.insert(args_.end() - 1, posix::StrDup(argument));\n  }\n\n  template <typename Str>\n  void AddArguments(const ::std::vector<Str>& arguments) {\n    for (typename ::std::vector<Str>::const_iterator i = arguments.begin();\n         i != arguments.end();\n         ++i) {\n      args_.insert(args_.end() - 1, posix::StrDup(i->c_str()));\n    }\n  }\n  char* const* Argv() {\n    return &args_[0];\n  }\n\n private:\n  std::vector<char*> args_;\n};\n\n// A struct that encompasses the arguments to the child process of a\n// threadsafe-style death test process.\nstruct ExecDeathTestArgs {\n  char* const* argv;  // Command-line arguments for the child's call to exec\n  int close_fd;       // File descriptor to close; the read end of a pipe\n};\n\n#  if GTEST_OS_MAC\ninline char** GetEnviron() {\n  // When Google Test is built as a framework on MacOS X, the environ variable\n  // is unavailable. Apple's documentation (man environ) recommends using\n  // _NSGetEnviron() instead.\n  return *_NSGetEnviron();\n}\n#  else\n// Some POSIX platforms expect you to declare environ. extern \"C\" makes\n// it reside in the global namespace.\nextern \"C\" char** environ;\ninline char** GetEnviron() { return environ; }\n#  endif  // GTEST_OS_MAC\n\n#  if !GTEST_OS_QNX\n// The main function for a threadsafe-style death test child process.\n// This function is called in a clone()-ed process and thus must avoid\n// any potentially unsafe operations like malloc or libc functions.\nstatic int ExecDeathTestChildMain(void* child_arg) {\n  ExecDeathTestArgs* const args = static_cast<ExecDeathTestArgs*>(child_arg);\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd));\n\n  // We need to execute the test program in the same environment where\n  // it was originally invoked.  Therefore we change to the original\n  // working directory first.\n  const char* const original_dir =\n      UnitTest::GetInstance()->original_working_dir();\n  // We can safely call chdir() as it's a direct system call.\n  if (chdir(original_dir) != 0) {\n    DeathTestAbort(std::string(\"chdir(\\\"\") + original_dir + \"\\\") failed: \" +\n                   GetLastErrnoDescription());\n    return EXIT_FAILURE;\n  }\n\n  // We can safely call execve() as it's a direct system call.  We\n  // cannot use execvp() as it's a libc function and thus potentially\n  // unsafe.  Since execve() doesn't search the PATH, the user must\n  // invoke the test program via a valid path that contains at least\n  // one path separator.\n  execve(args->argv[0], args->argv, GetEnviron());\n  DeathTestAbort(std::string(\"execve(\") + args->argv[0] + \", ...) in \" +\n                 original_dir + \" failed: \" +\n                 GetLastErrnoDescription());\n  return EXIT_FAILURE;\n}\n#  endif  // !GTEST_OS_QNX\n\n// Two utility routines that together determine the direction the stack\n// grows.\n// This could be accomplished more elegantly by a single recursive\n// function, but we want to guard against the unlikely possibility of\n// a smart compiler optimizing the recursion away.\n//\n// GTEST_NO_INLINE_ is required to prevent GCC 4.6 from inlining\n// StackLowerThanAddress into StackGrowsDown, which then doesn't give\n// correct answer.\nvoid StackLowerThanAddress(const void* ptr, bool* result) GTEST_NO_INLINE_;\nvoid StackLowerThanAddress(const void* ptr, bool* result) {\n  int dummy;\n  *result = (&dummy < ptr);\n}\n\nbool StackGrowsDown() {\n  int dummy = 0;\n  bool result;\n  StackLowerThanAddress(&dummy, &result);\n  return result;\n}\n\n// Spawns a child process with the same executable as the current process in\n// a thread-safe manner and instructs it to run the death test.  The\n// implementation uses fork(2) + exec.  On systems where clone(2) is\n// available, it is used instead, being slightly more thread-safe.  On QNX,\n// fork supports only single-threaded environments, so this function uses\n// spawn(2) there instead.  The function dies with an error message if\n// anything goes wrong.\nstatic pid_t ExecDeathTestSpawnChild(char* const* argv, int close_fd) {\n  ExecDeathTestArgs args = { argv, close_fd };\n  pid_t child_pid = -1;\n\n#  if GTEST_OS_QNX\n  // Obtains the current directory and sets it to be closed in the child\n  // process.\n  const int cwd_fd = open(\".\", O_RDONLY);\n  GTEST_DEATH_TEST_CHECK_(cwd_fd != -1);\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(fcntl(cwd_fd, F_SETFD, FD_CLOEXEC));\n  // We need to execute the test program in the same environment where\n  // it was originally invoked.  Therefore we change to the original\n  // working directory first.\n  const char* const original_dir =\n      UnitTest::GetInstance()->original_working_dir();\n  // We can safely call chdir() as it's a direct system call.\n  if (chdir(original_dir) != 0) {\n    DeathTestAbort(std::string(\"chdir(\\\"\") + original_dir + \"\\\") failed: \" +\n                   GetLastErrnoDescription());\n    return EXIT_FAILURE;\n  }\n\n  int fd_flags;\n  // Set close_fd to be closed after spawn.\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(fd_flags = fcntl(close_fd, F_GETFD));\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(fcntl(close_fd, F_SETFD,\n                                        fd_flags | FD_CLOEXEC));\n  struct inheritance inherit = {0};\n  // spawn is a system call.\n  child_pid = spawn(args.argv[0], 0, NULL, &inherit, args.argv, GetEnviron());\n  // Restores the current working directory.\n  GTEST_DEATH_TEST_CHECK_(fchdir(cwd_fd) != -1);\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(close(cwd_fd));\n\n#  else   // GTEST_OS_QNX\n#   if GTEST_OS_LINUX\n  // When a SIGPROF signal is received while fork() or clone() are executing,\n  // the process may hang. To avoid this, we ignore SIGPROF here and re-enable\n  // it after the call to fork()/clone() is complete.\n  struct sigaction saved_sigprof_action;\n  struct sigaction ignore_sigprof_action;\n  memset(&ignore_sigprof_action, 0, sizeof(ignore_sigprof_action));\n  sigemptyset(&ignore_sigprof_action.sa_mask);\n  ignore_sigprof_action.sa_handler = SIG_IGN;\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(sigaction(\n      SIGPROF, &ignore_sigprof_action, &saved_sigprof_action));\n#   endif  // GTEST_OS_LINUX\n\n#   if GTEST_HAS_CLONE\n  const bool use_fork = GTEST_FLAG(death_test_use_fork);\n\n  if (!use_fork) {\n    static const bool stack_grows_down = StackGrowsDown();\n    const size_t stack_size = getpagesize();\n    // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead.\n    void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE,\n                             MAP_ANON | MAP_PRIVATE, -1, 0);\n    GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED);\n\n    // Maximum stack alignment in bytes:  For a downward-growing stack, this\n    // amount is subtracted from size of the stack space to get an address\n    // that is within the stack space and is aligned on all systems we care\n    // about.  As far as I know there is no ABI with stack alignment greater\n    // than 64.  We assume stack and stack_size already have alignment of\n    // kMaxStackAlignment.\n    const size_t kMaxStackAlignment = 64;\n    void* const stack_top =\n        static_cast<char*>(stack) +\n            (stack_grows_down ? stack_size - kMaxStackAlignment : 0);\n    GTEST_DEATH_TEST_CHECK_(stack_size > kMaxStackAlignment &&\n        reinterpret_cast<intptr_t>(stack_top) % kMaxStackAlignment == 0);\n\n    child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args);\n\n    GTEST_DEATH_TEST_CHECK_(munmap(stack, stack_size) != -1);\n  }\n#   else\n  const bool use_fork = true;\n#   endif  // GTEST_HAS_CLONE\n\n  if (use_fork && (child_pid = fork()) == 0) {\n      ExecDeathTestChildMain(&args);\n      _exit(0);\n  }\n#  endif  // GTEST_OS_QNX\n#  if GTEST_OS_LINUX\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(\n      sigaction(SIGPROF, &saved_sigprof_action, NULL));\n#  endif  // GTEST_OS_LINUX\n\n  GTEST_DEATH_TEST_CHECK_(child_pid != -1);\n  return child_pid;\n}\n\n// The AssumeRole process for a fork-and-exec death test.  It re-executes the\n// main program from the beginning, setting the --gtest_filter\n// and --gtest_internal_run_death_test flags to cause only the current\n// death test to be re-run.\nDeathTest::TestRole ExecDeathTest::AssumeRole() {\n  const UnitTestImpl* const impl = GetUnitTestImpl();\n  const InternalRunDeathTestFlag* const flag =\n      impl->internal_run_death_test_flag();\n  const TestInfo* const info = impl->current_test_info();\n  const int death_test_index = info->result()->death_test_count();\n\n  if (flag != NULL) {\n    set_write_fd(flag->write_fd());\n    return EXECUTE_TEST;\n  }\n\n  int pipe_fd[2];\n  GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1);\n  // Clear the close-on-exec flag on the write end of the pipe, lest\n  // it be closed when the child process does an exec:\n  GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1);\n\n  const std::string filter_flag =\n      std::string(\"--\") + GTEST_FLAG_PREFIX_ + kFilterFlag + \"=\"\n      + info->test_case_name() + \".\" + info->name();\n  const std::string internal_flag =\n      std::string(\"--\") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag + \"=\"\n      + file_ + \"|\" + StreamableToString(line_) + \"|\"\n      + StreamableToString(death_test_index) + \"|\"\n      + StreamableToString(pipe_fd[1]);\n  Arguments args;\n  args.AddArguments(GetArgvsForDeathTestChildProcess());\n  args.AddArgument(filter_flag.c_str());\n  args.AddArgument(internal_flag.c_str());\n\n  DeathTest::set_last_death_test_message(\"\");\n\n  CaptureStderr();\n  // See the comment in NoExecDeathTest::AssumeRole for why the next line\n  // is necessary.\n  FlushInfoLog();\n\n  const pid_t child_pid = ExecDeathTestSpawnChild(args.Argv(), pipe_fd[0]);\n  GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1]));\n  set_child_pid(child_pid);\n  set_read_fd(pipe_fd[0]);\n  set_spawned(true);\n  return OVERSEE_TEST;\n}\n\n# endif  // !GTEST_OS_WINDOWS\n\n// Creates a concrete DeathTest-derived class that depends on the\n// --gtest_death_test_style flag, and sets the pointer pointed to\n// by the \"test\" argument to its address.  If the test should be\n// skipped, sets that pointer to NULL.  Returns true, unless the\n// flag is set to an invalid value.\nbool DefaultDeathTestFactory::Create(const char* statement, const RE* regex,\n                                     const char* file, int line,\n                                     DeathTest** test) {\n  UnitTestImpl* const impl = GetUnitTestImpl();\n  const InternalRunDeathTestFlag* const flag =\n      impl->internal_run_death_test_flag();\n  const int death_test_index = impl->current_test_info()\n      ->increment_death_test_count();\n\n  if (flag != NULL) {\n    if (death_test_index > flag->index()) {\n      DeathTest::set_last_death_test_message(\n          \"Death test count (\" + StreamableToString(death_test_index)\n          + \") somehow exceeded expected maximum (\"\n          + StreamableToString(flag->index()) + \")\");\n      return false;\n    }\n\n    if (!(flag->file() == file && flag->line() == line &&\n          flag->index() == death_test_index)) {\n      *test = NULL;\n      return true;\n    }\n  }\n\n# if GTEST_OS_WINDOWS\n\n  if (GTEST_FLAG(death_test_style) == \"threadsafe\" ||\n      GTEST_FLAG(death_test_style) == \"fast\") {\n    *test = new WindowsDeathTest(statement, regex, file, line);\n  }\n\n# else\n\n  if (GTEST_FLAG(death_test_style) == \"threadsafe\") {\n    *test = new ExecDeathTest(statement, regex, file, line);\n  } else if (GTEST_FLAG(death_test_style) == \"fast\") {\n    *test = new NoExecDeathTest(statement, regex);\n  }\n\n# endif  // GTEST_OS_WINDOWS\n\n  else {  // NOLINT - this is more readable than unbalanced brackets inside #if.\n    DeathTest::set_last_death_test_message(\n        \"Unknown death test style \\\"\" + GTEST_FLAG(death_test_style)\n        + \"\\\" encountered\");\n    return false;\n  }\n\n  return true;\n}\n\n// Splits a given string on a given delimiter, populating a given\n// vector with the fields.  GTEST_HAS_DEATH_TEST implies that we have\n// ::std::string, so we can use it here.\nstatic void SplitString(const ::std::string& str, char delimiter,\n                        ::std::vector< ::std::string>* dest) {\n  ::std::vector< ::std::string> parsed;\n  ::std::string::size_type pos = 0;\n  while (::testing::internal::AlwaysTrue()) {\n    const ::std::string::size_type colon = str.find(delimiter, pos);\n    if (colon == ::std::string::npos) {\n      parsed.push_back(str.substr(pos));\n      break;\n    } else {\n      parsed.push_back(str.substr(pos, colon - pos));\n      pos = colon + 1;\n    }\n  }\n  dest->swap(parsed);\n}\n\n# if GTEST_OS_WINDOWS\n// Recreates the pipe and event handles from the provided parameters,\n// signals the event, and returns a file descriptor wrapped around the pipe\n// handle. This function is called in the child process only.\nint GetStatusFileDescriptor(unsigned int parent_process_id,\n                            size_t write_handle_as_size_t,\n                            size_t event_handle_as_size_t) {\n  AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE,\n                                                   FALSE,  // Non-inheritable.\n                                                   parent_process_id));\n  if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) {\n    DeathTestAbort(\"Unable to open parent process \" +\n                   StreamableToString(parent_process_id));\n  }\n\n  // TODO(vladl@google.com): Replace the following check with a\n  // compile-time assertion when available.\n  GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t));\n\n  const HANDLE write_handle =\n      reinterpret_cast<HANDLE>(write_handle_as_size_t);\n  HANDLE dup_write_handle;\n\n  // The newly initialized handle is accessible only in in the parent\n  // process. To obtain one accessible within the child, we need to use\n  // DuplicateHandle.\n  if (!::DuplicateHandle(parent_process_handle.Get(), write_handle,\n                         ::GetCurrentProcess(), &dup_write_handle,\n                         0x0,    // Requested privileges ignored since\n                                 // DUPLICATE_SAME_ACCESS is used.\n                         FALSE,  // Request non-inheritable handler.\n                         DUPLICATE_SAME_ACCESS)) {\n    DeathTestAbort(\"Unable to duplicate the pipe handle \" +\n                   StreamableToString(write_handle_as_size_t) +\n                   \" from the parent process \" +\n                   StreamableToString(parent_process_id));\n  }\n\n  const HANDLE event_handle = reinterpret_cast<HANDLE>(event_handle_as_size_t);\n  HANDLE dup_event_handle;\n\n  if (!::DuplicateHandle(parent_process_handle.Get(), event_handle,\n                         ::GetCurrentProcess(), &dup_event_handle,\n                         0x0,\n                         FALSE,\n                         DUPLICATE_SAME_ACCESS)) {\n    DeathTestAbort(\"Unable to duplicate the event handle \" +\n                   StreamableToString(event_handle_as_size_t) +\n                   \" from the parent process \" +\n                   StreamableToString(parent_process_id));\n  }\n\n  const int write_fd =\n      ::_open_osfhandle(reinterpret_cast<intptr_t>(dup_write_handle), O_APPEND);\n  if (write_fd == -1) {\n    DeathTestAbort(\"Unable to convert pipe handle \" +\n                   StreamableToString(write_handle_as_size_t) +\n                   \" to a file descriptor\");\n  }\n\n  // Signals the parent that the write end of the pipe has been acquired\n  // so the parent can release its own write end.\n  ::SetEvent(dup_event_handle);\n\n  return write_fd;\n}\n# endif  // GTEST_OS_WINDOWS\n\n// Returns a newly created InternalRunDeathTestFlag object with fields\n// initialized from the GTEST_FLAG(internal_run_death_test) flag if\n// the flag is specified; otherwise returns NULL.\nInternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {\n  if (GTEST_FLAG(internal_run_death_test) == \"\") return NULL;\n\n  // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we\n  // can use it here.\n  int line = -1;\n  int index = -1;\n  ::std::vector< ::std::string> fields;\n  SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields);\n  int write_fd = -1;\n\n# if GTEST_OS_WINDOWS\n\n  unsigned int parent_process_id = 0;\n  size_t write_handle_as_size_t = 0;\n  size_t event_handle_as_size_t = 0;\n\n  if (fields.size() != 6\n      || !ParseNaturalNumber(fields[1], &line)\n      || !ParseNaturalNumber(fields[2], &index)\n      || !ParseNaturalNumber(fields[3], &parent_process_id)\n      || !ParseNaturalNumber(fields[4], &write_handle_as_size_t)\n      || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) {\n    DeathTestAbort(\"Bad --gtest_internal_run_death_test flag: \" +\n                   GTEST_FLAG(internal_run_death_test));\n  }\n  write_fd = GetStatusFileDescriptor(parent_process_id,\n                                     write_handle_as_size_t,\n                                     event_handle_as_size_t);\n# else\n\n  if (fields.size() != 4\n      || !ParseNaturalNumber(fields[1], &line)\n      || !ParseNaturalNumber(fields[2], &index)\n      || !ParseNaturalNumber(fields[3], &write_fd)) {\n    DeathTestAbort(\"Bad --gtest_internal_run_death_test flag: \"\n        + GTEST_FLAG(internal_run_death_test));\n  }\n\n# endif  // GTEST_OS_WINDOWS\n\n  return new InternalRunDeathTestFlag(fields[0], line, index, write_fd);\n}\n\n}  // namespace internal\n\n#endif  // GTEST_HAS_DEATH_TEST\n\n}  // namespace testing\n"
  },
  {
    "path": "src/madness/external/gtest/src/gtest-filepath.cc",
    "content": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Authors: keith.ray@gmail.com (Keith Ray)\n\n#include \"gtest/gtest-message.h\"\n#include \"gtest/internal/gtest-filepath.h\"\n#include \"gtest/internal/gtest-port.h\"\n\n#include <stdlib.h>\n\n#if GTEST_OS_WINDOWS_MOBILE\n# include <windows.h>\n#elif GTEST_OS_WINDOWS\n# include <direct.h>\n# include <io.h>\n#elif GTEST_OS_SYMBIAN\n// Symbian OpenC has PATH_MAX in sys/syslimits.h\n# include <sys/syslimits.h>\n#else\n# include <limits.h>\n# include <climits>  // Some Linux distributions define PATH_MAX here.\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n#if GTEST_OS_WINDOWS\n# define GTEST_PATH_MAX_ _MAX_PATH\n#elif defined(PATH_MAX)\n# define GTEST_PATH_MAX_ PATH_MAX\n#elif defined(_XOPEN_PATH_MAX)\n# define GTEST_PATH_MAX_ _XOPEN_PATH_MAX\n#else\n# define GTEST_PATH_MAX_ _POSIX_PATH_MAX\n#endif  // GTEST_OS_WINDOWS\n\n#include \"gtest/internal/gtest-string.h\"\n\nnamespace testing {\nnamespace internal {\n\n#if GTEST_OS_WINDOWS\n// On Windows, '\\\\' is the standard path separator, but many tools and the\n// Windows API also accept '/' as an alternate path separator. Unless otherwise\n// noted, a file path can contain either kind of path separators, or a mixture\n// of them.\nconst char kPathSeparator = '\\\\';\nconst char kAlternatePathSeparator = '/';\nconst char kPathSeparatorString[] = \"\\\\\";\nconst char kAlternatePathSeparatorString[] = \"/\";\n# if GTEST_OS_WINDOWS_MOBILE\n// Windows CE doesn't have a current directory. You should not use\n// the current directory in tests on Windows CE, but this at least\n// provides a reasonable fallback.\nconst char kCurrentDirectoryString[] = \"\\\\\";\n// Windows CE doesn't define INVALID_FILE_ATTRIBUTES\nconst DWORD kInvalidFileAttributes = 0xffffffff;\n# else\nconst char kCurrentDirectoryString[] = \".\\\\\";\n# endif  // GTEST_OS_WINDOWS_MOBILE\n#else\nconst char kPathSeparator = '/';\nconst char kPathSeparatorString[] = \"/\";\nconst char kCurrentDirectoryString[] = \"./\";\n#endif  // GTEST_OS_WINDOWS\n\n// Returns whether the given character is a valid path separator.\nstatic bool IsPathSeparator(char c) {\n#if GTEST_HAS_ALT_PATH_SEP_\n  return (c == kPathSeparator) || (c == kAlternatePathSeparator);\n#else\n  return c == kPathSeparator;\n#endif\n}\n\n// Returns the current working directory, or \"\" if unsuccessful.\nFilePath FilePath::GetCurrentDir() {\n#if GTEST_OS_WINDOWS_MOBILE\n  // Windows CE doesn't have a current directory, so we just return\n  // something reasonable.\n  return FilePath(kCurrentDirectoryString);\n#elif GTEST_OS_WINDOWS\n  char cwd[GTEST_PATH_MAX_ + 1] = { '\\0' };\n  return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? \"\" : cwd);\n#else\n  char cwd[GTEST_PATH_MAX_ + 1] = { '\\0' };\n  return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? \"\" : cwd);\n#endif  // GTEST_OS_WINDOWS_MOBILE\n}\n\n// Returns a copy of the FilePath with the case-insensitive extension removed.\n// Example: FilePath(\"dir/file.exe\").RemoveExtension(\"EXE\") returns\n// FilePath(\"dir/file\"). If a case-insensitive extension is not\n// found, returns a copy of the original FilePath.\nFilePath FilePath::RemoveExtension(const char* extension) const {\n  const std::string dot_extension = std::string(\".\") + extension;\n  if (String::EndsWithCaseInsensitive(pathname_, dot_extension)) {\n    return FilePath(pathname_.substr(\n        0, pathname_.length() - dot_extension.length()));\n  }\n  return *this;\n}\n\n// Returns a pointer to the last occurence of a valid path separator in\n// the FilePath. On Windows, for example, both '/' and '\\' are valid path\n// separators. Returns NULL if no path separator was found.\nconst char* FilePath::FindLastPathSeparator() const {\n  const char* const last_sep = strrchr(c_str(), kPathSeparator);\n#if GTEST_HAS_ALT_PATH_SEP_\n  const char* const last_alt_sep = strrchr(c_str(), kAlternatePathSeparator);\n  // Comparing two pointers of which only one is NULL is undefined.\n  if (last_alt_sep != NULL &&\n      (last_sep == NULL || last_alt_sep > last_sep)) {\n    return last_alt_sep;\n  }\n#endif\n  return last_sep;\n}\n\n// Returns a copy of the FilePath with the directory part removed.\n// Example: FilePath(\"path/to/file\").RemoveDirectoryName() returns\n// FilePath(\"file\"). If there is no directory part (\"just_a_file\"), it returns\n// the FilePath unmodified. If there is no file part (\"just_a_dir/\") it\n// returns an empty FilePath (\"\").\n// On Windows platform, '\\' is the path separator, otherwise it is '/'.\nFilePath FilePath::RemoveDirectoryName() const {\n  const char* const last_sep = FindLastPathSeparator();\n  return last_sep ? FilePath(last_sep + 1) : *this;\n}\n\n// RemoveFileName returns the directory path with the filename removed.\n// Example: FilePath(\"path/to/file\").RemoveFileName() returns \"path/to/\".\n// If the FilePath is \"a_file\" or \"/a_file\", RemoveFileName returns\n// FilePath(\"./\") or, on Windows, FilePath(\".\\\\\"). If the filepath does\n// not have a file, like \"just/a/dir/\", it returns the FilePath unmodified.\n// On Windows platform, '\\' is the path separator, otherwise it is '/'.\nFilePath FilePath::RemoveFileName() const {\n  const char* const last_sep = FindLastPathSeparator();\n  std::string dir;\n  if (last_sep) {\n    dir = std::string(c_str(), last_sep + 1 - c_str());\n  } else {\n    dir = kCurrentDirectoryString;\n  }\n  return FilePath(dir);\n}\n\n// Helper functions for naming files in a directory for xml output.\n\n// Given directory = \"dir\", base_name = \"test\", number = 0,\n// extension = \"xml\", returns \"dir/test.xml\". If number is greater\n// than zero (e.g., 12), returns \"dir/test_12.xml\".\n// On Windows platform, uses \\ as the separator rather than /.\nFilePath FilePath::MakeFileName(const FilePath& directory,\n                                const FilePath& base_name,\n                                int number,\n                                const char* extension) {\n  std::string file;\n  if (number == 0) {\n    file = base_name.string() + \".\" + extension;\n  } else {\n    file = base_name.string() + \"_\" + StreamableToString(number)\n        + \".\" + extension;\n  }\n  return ConcatPaths(directory, FilePath(file));\n}\n\n// Given directory = \"dir\", relative_path = \"test.xml\", returns \"dir/test.xml\".\n// On Windows, uses \\ as the separator rather than /.\nFilePath FilePath::ConcatPaths(const FilePath& directory,\n                               const FilePath& relative_path) {\n  if (directory.IsEmpty())\n    return relative_path;\n  const FilePath dir(directory.RemoveTrailingPathSeparator());\n  return FilePath(dir.string() + kPathSeparator + relative_path.string());\n}\n\n// Returns true if pathname describes something findable in the file-system,\n// either a file, directory, or whatever.\nbool FilePath::FileOrDirectoryExists() const {\n#if GTEST_OS_WINDOWS_MOBILE\n  LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str());\n  const DWORD attributes = GetFileAttributes(unicode);\n  delete [] unicode;\n  return attributes != kInvalidFileAttributes;\n#else\n  posix::StatStruct file_stat;\n  return posix::Stat(pathname_.c_str(), &file_stat) == 0;\n#endif  // GTEST_OS_WINDOWS_MOBILE\n}\n\n// Returns true if pathname describes a directory in the file-system\n// that exists.\nbool FilePath::DirectoryExists() const {\n  bool result = false;\n#if GTEST_OS_WINDOWS\n  // Don't strip off trailing separator if path is a root directory on\n  // Windows (like \"C:\\\\\").\n  const FilePath& path(IsRootDirectory() ? *this :\n                                           RemoveTrailingPathSeparator());\n#else\n  const FilePath& path(*this);\n#endif\n\n#if GTEST_OS_WINDOWS_MOBILE\n  LPCWSTR unicode = String::AnsiToUtf16(path.c_str());\n  const DWORD attributes = GetFileAttributes(unicode);\n  delete [] unicode;\n  if ((attributes != kInvalidFileAttributes) &&\n      (attributes & FILE_ATTRIBUTE_DIRECTORY)) {\n    result = true;\n  }\n#else\n  posix::StatStruct file_stat;\n  result = posix::Stat(path.c_str(), &file_stat) == 0 &&\n      posix::IsDir(file_stat);\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n  return result;\n}\n\n// Returns true if pathname describes a root directory. (Windows has one\n// root directory per disk drive.)\nbool FilePath::IsRootDirectory() const {\n#if GTEST_OS_WINDOWS\n  // TODO(wan@google.com): on Windows a network share like\n  // \\\\server\\share can be a root directory, although it cannot be the\n  // current directory.  Handle this properly.\n  return pathname_.length() == 3 && IsAbsolutePath();\n#else\n  return pathname_.length() == 1 && IsPathSeparator(pathname_.c_str()[0]);\n#endif\n}\n\n// Returns true if pathname describes an absolute path.\nbool FilePath::IsAbsolutePath() const {\n  const char* const name = pathname_.c_str();\n#if GTEST_OS_WINDOWS\n  return pathname_.length() >= 3 &&\n     ((name[0] >= 'a' && name[0] <= 'z') ||\n      (name[0] >= 'A' && name[0] <= 'Z')) &&\n     name[1] == ':' &&\n     IsPathSeparator(name[2]);\n#else\n  return IsPathSeparator(name[0]);\n#endif\n}\n\n// Returns a pathname for a file that does not currently exist. The pathname\n// will be directory/base_name.extension or\n// directory/base_name_<number>.extension if directory/base_name.extension\n// already exists. The number will be incremented until a pathname is found\n// that does not already exist.\n// Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.\n// There could be a race condition if two or more processes are calling this\n// function at the same time -- they could both pick the same filename.\nFilePath FilePath::GenerateUniqueFileName(const FilePath& directory,\n                                          const FilePath& base_name,\n                                          const char* extension) {\n  FilePath full_pathname;\n  int number = 0;\n  do {\n    full_pathname.Set(MakeFileName(directory, base_name, number++, extension));\n  } while (full_pathname.FileOrDirectoryExists());\n  return full_pathname;\n}\n\n// Returns true if FilePath ends with a path separator, which indicates that\n// it is intended to represent a directory. Returns false otherwise.\n// This does NOT check that a directory (or file) actually exists.\nbool FilePath::IsDirectory() const {\n  return !pathname_.empty() &&\n         IsPathSeparator(pathname_.c_str()[pathname_.length() - 1]);\n}\n\n// Create directories so that path exists. Returns true if successful or if\n// the directories already exist; returns false if unable to create directories\n// for any reason.\nbool FilePath::CreateDirectoriesRecursively() const {\n  if (!this->IsDirectory()) {\n    return false;\n  }\n\n  if (pathname_.length() == 0 || this->DirectoryExists()) {\n    return true;\n  }\n\n  const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName());\n  return parent.CreateDirectoriesRecursively() && this->CreateFolder();\n}\n\n// Create the directory so that path exists. Returns true if successful or\n// if the directory already exists; returns false if unable to create the\n// directory for any reason, including if the parent directory does not\n// exist. Not named \"CreateDirectory\" because that's a macro on Windows.\nbool FilePath::CreateFolder() const {\n#if GTEST_OS_WINDOWS_MOBILE\n  FilePath removed_sep(this->RemoveTrailingPathSeparator());\n  LPCWSTR unicode = String::AnsiToUtf16(removed_sep.c_str());\n  int result = CreateDirectory(unicode, NULL) ? 0 : -1;\n  delete [] unicode;\n#elif GTEST_OS_WINDOWS\n  int result = _mkdir(pathname_.c_str());\n#else\n  int result = mkdir(pathname_.c_str(), 0777);\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n  if (result == -1) {\n    return this->DirectoryExists();  // An error is OK if the directory exists.\n  }\n  return true;  // No error.\n}\n\n// If input name has a trailing separator character, remove it and return the\n// name, otherwise return the name string unmodified.\n// On Windows platform, uses \\ as the separator, other platforms use /.\nFilePath FilePath::RemoveTrailingPathSeparator() const {\n  return IsDirectory()\n      ? FilePath(pathname_.substr(0, pathname_.length() - 1))\n      : *this;\n}\n\n// Removes any redundant separators that might be in the pathname.\n// For example, \"bar///foo\" becomes \"bar/foo\". Does not eliminate other\n// redundancies that might be in a pathname involving \".\" or \"..\".\n// TODO(wan@google.com): handle Windows network shares (e.g. \\\\server\\share).\nvoid FilePath::Normalize() {\n  if (pathname_.c_str() == NULL) {\n    pathname_ = \"\";\n    return;\n  }\n  const char* src = pathname_.c_str();\n  char* const dest = new char[pathname_.length() + 1];\n  char* dest_ptr = dest;\n  memset(dest_ptr, 0, pathname_.length() + 1);\n\n  while (*src != '\\0') {\n    *dest_ptr = *src;\n    if (!IsPathSeparator(*src)) {\n      src++;\n    } else {\n#if GTEST_HAS_ALT_PATH_SEP_\n      if (*dest_ptr == kAlternatePathSeparator) {\n        *dest_ptr = kPathSeparator;\n      }\n#endif\n      while (IsPathSeparator(*src))\n        src++;\n    }\n    dest_ptr++;\n  }\n  *dest_ptr = '\\0';\n  pathname_ = dest;\n  delete[] dest;\n}\n\n}  // namespace internal\n}  // namespace testing\n"
  },
  {
    "path": "src/madness/external/gtest/src/gtest-internal-inl.h",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n// Utility functions and classes used by the Google C++ testing framework.\n//\n// Author: wan@google.com (Zhanyong Wan)\n//\n// This file contains purely Google Test's internal implementation.  Please\n// DO NOT #INCLUDE IT IN A USER PROGRAM.\n\n#ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_\n#define GTEST_SRC_GTEST_INTERNAL_INL_H_\n\n// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is\n// part of Google Test's implementation; otherwise it's undefined.\n#if !GTEST_IMPLEMENTATION_\n// A user is trying to include this from his code - just say no.\n# error \"gtest-internal-inl.h is part of Google Test's internal implementation.\"\n# error \"It must not be included except by Google Test itself.\"\n#endif  // GTEST_IMPLEMENTATION_\n\n#ifndef _WIN32_WCE\n# include <errno.h>\n#endif  // !_WIN32_WCE\n#include <stddef.h>\n#include <stdlib.h>  // For strtoll/_strtoul64/malloc/free.\n#include <string.h>  // For memmove.\n\n#include <algorithm>\n#include <string>\n#include <vector>\n\n#include \"gtest/internal/gtest-port.h\"\n\n#if GTEST_CAN_STREAM_RESULTS_\n# include <arpa/inet.h>  // NOLINT\n# include <netdb.h>  // NOLINT\n#endif\n\n#if GTEST_OS_WINDOWS\n# include <windows.h>  // NOLINT\n#endif  // GTEST_OS_WINDOWS\n\n#include \"gtest/gtest.h\"  // NOLINT\n#include \"gtest/gtest-spi.h\"\n\nnamespace testing {\n\n// Declares the flags.\n//\n// We don't want the users to modify this flag in the code, but want\n// Google Test's own unit tests to be able to access it. Therefore we\n// declare it here as opposed to in gtest.h.\nGTEST_DECLARE_bool_(death_test_use_fork);\n\nnamespace internal {\n\n// The value of GetTestTypeId() as seen from within the Google Test\n// library.  This is solely for testing GetTestTypeId().\nGTEST_API_ extern const TypeId kTestTypeIdInGoogleTest;\n\n// Names of the flags (needed for parsing Google Test flags).\nconst char kAlsoRunDisabledTestsFlag[] = \"also_run_disabled_tests\";\nconst char kBreakOnFailureFlag[] = \"break_on_failure\";\nconst char kCatchExceptionsFlag[] = \"catch_exceptions\";\nconst char kColorFlag[] = \"color\";\nconst char kFilterFlag[] = \"filter\";\nconst char kListTestsFlag[] = \"list_tests\";\nconst char kOutputFlag[] = \"output\";\nconst char kPrintTimeFlag[] = \"print_time\";\nconst char kRandomSeedFlag[] = \"random_seed\";\nconst char kRepeatFlag[] = \"repeat\";\nconst char kShuffleFlag[] = \"shuffle\";\nconst char kStackTraceDepthFlag[] = \"stack_trace_depth\";\nconst char kStreamResultToFlag[] = \"stream_result_to\";\nconst char kThrowOnFailureFlag[] = \"throw_on_failure\";\n\n// A valid random seed must be in [1, kMaxRandomSeed].\nconst int kMaxRandomSeed = 99999;\n\n// g_help_flag is true iff the --help flag or an equivalent form is\n// specified on the command line.\nGTEST_API_ extern bool g_help_flag;\n\n// Returns the current time in milliseconds.\nGTEST_API_ TimeInMillis GetTimeInMillis();\n\n// Returns true iff Google Test should use colors in the output.\nGTEST_API_ bool ShouldUseColor(bool stdout_is_tty);\n\n// Formats the given time in milliseconds as seconds.\nGTEST_API_ std::string FormatTimeInMillisAsSeconds(TimeInMillis ms);\n\n// Converts the given time in milliseconds to a date string in the ISO 8601\n// format, without the timezone information.  N.B.: due to the use the\n// non-reentrant localtime() function, this function is not thread safe.  Do\n// not use it in any code that can be called from multiple threads.\nGTEST_API_ std::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms);\n\n// Parses a string for an Int32 flag, in the form of \"--flag=value\".\n//\n// On success, stores the value of the flag in *value, and returns\n// true.  On failure, returns false without changing *value.\nGTEST_API_ bool ParseInt32Flag(\n    const char* str, const char* flag, Int32* value);\n\n// Returns a random seed in range [1, kMaxRandomSeed] based on the\n// given --gtest_random_seed flag value.\ninline int GetRandomSeedFromFlag(Int32 random_seed_flag) {\n  const unsigned int raw_seed = (random_seed_flag == 0) ?\n      static_cast<unsigned int>(GetTimeInMillis()) :\n      static_cast<unsigned int>(random_seed_flag);\n\n  // Normalizes the actual seed to range [1, kMaxRandomSeed] such that\n  // it's easy to type.\n  const int normalized_seed =\n      static_cast<int>((raw_seed - 1U) %\n                       static_cast<unsigned int>(kMaxRandomSeed)) + 1;\n  return normalized_seed;\n}\n\n// Returns the first valid random seed after 'seed'.  The behavior is\n// undefined if 'seed' is invalid.  The seed after kMaxRandomSeed is\n// considered to be 1.\ninline int GetNextRandomSeed(int seed) {\n  GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed)\n      << \"Invalid random seed \" << seed << \" - must be in [1, \"\n      << kMaxRandomSeed << \"].\";\n  const int next_seed = seed + 1;\n  return (next_seed > kMaxRandomSeed) ? 1 : next_seed;\n}\n\n// This class saves the values of all Google Test flags in its c'tor, and\n// restores them in its d'tor.\nclass GTestFlagSaver {\n public:\n  // The c'tor.\n  GTestFlagSaver() {\n    also_run_disabled_tests_ = GTEST_FLAG(also_run_disabled_tests);\n    break_on_failure_ = GTEST_FLAG(break_on_failure);\n    catch_exceptions_ = GTEST_FLAG(catch_exceptions);\n    color_ = GTEST_FLAG(color);\n    death_test_style_ = GTEST_FLAG(death_test_style);\n    death_test_use_fork_ = GTEST_FLAG(death_test_use_fork);\n    filter_ = GTEST_FLAG(filter);\n    internal_run_death_test_ = GTEST_FLAG(internal_run_death_test);\n    list_tests_ = GTEST_FLAG(list_tests);\n    output_ = GTEST_FLAG(output);\n    print_time_ = GTEST_FLAG(print_time);\n    random_seed_ = GTEST_FLAG(random_seed);\n    repeat_ = GTEST_FLAG(repeat);\n    shuffle_ = GTEST_FLAG(shuffle);\n    stack_trace_depth_ = GTEST_FLAG(stack_trace_depth);\n    stream_result_to_ = GTEST_FLAG(stream_result_to);\n    throw_on_failure_ = GTEST_FLAG(throw_on_failure);\n  }\n\n  // The d'tor is not virtual.  DO NOT INHERIT FROM THIS CLASS.\n  ~GTestFlagSaver() {\n    GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_;\n    GTEST_FLAG(break_on_failure) = break_on_failure_;\n    GTEST_FLAG(catch_exceptions) = catch_exceptions_;\n    GTEST_FLAG(color) = color_;\n    GTEST_FLAG(death_test_style) = death_test_style_;\n    GTEST_FLAG(death_test_use_fork) = death_test_use_fork_;\n    GTEST_FLAG(filter) = filter_;\n    GTEST_FLAG(internal_run_death_test) = internal_run_death_test_;\n    GTEST_FLAG(list_tests) = list_tests_;\n    GTEST_FLAG(output) = output_;\n    GTEST_FLAG(print_time) = print_time_;\n    GTEST_FLAG(random_seed) = random_seed_;\n    GTEST_FLAG(repeat) = repeat_;\n    GTEST_FLAG(shuffle) = shuffle_;\n    GTEST_FLAG(stack_trace_depth) = stack_trace_depth_;\n    GTEST_FLAG(stream_result_to) = stream_result_to_;\n    GTEST_FLAG(throw_on_failure) = throw_on_failure_;\n  }\n\n private:\n  // Fields for saving the original values of flags.\n  bool also_run_disabled_tests_;\n  bool break_on_failure_;\n  bool catch_exceptions_;\n  std::string color_;\n  std::string death_test_style_;\n  bool death_test_use_fork_;\n  std::string filter_;\n  std::string internal_run_death_test_;\n  bool list_tests_;\n  std::string output_;\n  bool print_time_;\n  internal::Int32 random_seed_;\n  internal::Int32 repeat_;\n  bool shuffle_;\n  internal::Int32 stack_trace_depth_;\n  std::string stream_result_to_;\n  bool throw_on_failure_;\n} GTEST_ATTRIBUTE_UNUSED_;\n\n// Converts a Unicode code point to a narrow string in UTF-8 encoding.\n// code_point parameter is of type UInt32 because wchar_t may not be\n// wide enough to contain a code point.\n// If the code_point is not a valid Unicode code point\n// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be converted\n// to \"(Invalid Unicode 0xXXXXXXXX)\".\nGTEST_API_ std::string CodePointToUtf8(UInt32 code_point);\n\n// Converts a wide string to a narrow string in UTF-8 encoding.\n// The wide string is assumed to have the following encoding:\n//   UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS)\n//   UTF-32 if sizeof(wchar_t) == 4 (on Linux)\n// Parameter str points to a null-terminated wide string.\n// Parameter num_chars may additionally limit the number\n// of wchar_t characters processed. -1 is used when the entire string\n// should be processed.\n// If the string contains code points that are not valid Unicode code points\n// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output\n// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding\n// and contains invalid UTF-16 surrogate pairs, values in those pairs\n// will be encoded as individual Unicode characters from Basic Normal Plane.\nGTEST_API_ std::string WideStringToUtf8(const wchar_t* str, int num_chars);\n\n// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file\n// if the variable is present. If a file already exists at this location, this\n// function will write over it. If the variable is present, but the file cannot\n// be created, prints an error and exits.\nvoid WriteToShardStatusFileIfNeeded();\n\n// Checks whether sharding is enabled by examining the relevant\n// environment variable values. If the variables are present,\n// but inconsistent (e.g., shard_index >= total_shards), prints\n// an error and exits. If in_subprocess_for_death_test, sharding is\n// disabled because it must only be applied to the original test\n// process. Otherwise, we could filter out death tests we intended to execute.\nGTEST_API_ bool ShouldShard(const char* total_shards_str,\n                            const char* shard_index_str,\n                            bool in_subprocess_for_death_test);\n\n// Parses the environment variable var as an Int32. If it is unset,\n// returns default_val. If it is not an Int32, prints an error and\n// and aborts.\nGTEST_API_ Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val);\n\n// Given the total number of shards, the shard index, and the test id,\n// returns true iff the test should be run on this shard. The test id is\n// some arbitrary but unique non-negative integer assigned to each test\n// method. Assumes that 0 <= shard_index < total_shards.\nGTEST_API_ bool ShouldRunTestOnShard(\n    int total_shards, int shard_index, int test_id);\n\n// STL container utilities.\n\n// Returns the number of elements in the given container that satisfy\n// the given predicate.\ntemplate <class Container, typename Predicate>\ninline int CountIf(const Container& c, Predicate predicate) {\n  // Implemented as an explicit loop since std::count_if() in libCstd on\n  // Solaris has a non-standard signature.\n  int count = 0;\n  for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {\n    if (predicate(*it))\n      ++count;\n  }\n  return count;\n}\n\n// Applies a function/functor to each element in the container.\ntemplate <class Container, typename Functor>\nvoid ForEach(const Container& c, Functor functor) {\n  std::for_each(c.begin(), c.end(), functor);\n}\n\n// Returns the i-th element of the vector, or default_value if i is not\n// in range [0, v.size()).\ntemplate <typename E>\ninline E GetElementOr(const std::vector<E>& v, int i, E default_value) {\n  return (i < 0 || i >= static_cast<int>(v.size())) ? default_value : v[i];\n}\n\n// Performs an in-place shuffle of a range of the vector's elements.\n// 'begin' and 'end' are element indices as an STL-style range;\n// i.e. [begin, end) are shuffled, where 'end' == size() means to\n// shuffle to the end of the vector.\ntemplate <typename E>\nvoid ShuffleRange(internal::Random* random, int begin, int end,\n                  std::vector<E>* v) {\n  const int size = static_cast<int>(v->size());\n  GTEST_CHECK_(0 <= begin && begin <= size)\n      << \"Invalid shuffle range start \" << begin << \": must be in range [0, \"\n      << size << \"].\";\n  GTEST_CHECK_(begin <= end && end <= size)\n      << \"Invalid shuffle range finish \" << end << \": must be in range [\"\n      << begin << \", \" << size << \"].\";\n\n  // Fisher-Yates shuffle, from\n  // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle\n  for (int range_width = end - begin; range_width >= 2; range_width--) {\n    const int last_in_range = begin + range_width - 1;\n    const int selected = begin + random->Generate(range_width);\n    std::swap((*v)[selected], (*v)[last_in_range]);\n  }\n}\n\n// Performs an in-place shuffle of the vector's elements.\ntemplate <typename E>\ninline void Shuffle(internal::Random* random, std::vector<E>* v) {\n  ShuffleRange(random, 0, static_cast<int>(v->size()), v);\n}\n\n// A function for deleting an object.  Handy for being used as a\n// functor.\ntemplate <typename T>\nstatic void Delete(T* x) {\n  delete x;\n}\n\n// A predicate that checks the key of a TestProperty against a known key.\n//\n// TestPropertyKeyIs is copyable.\nclass TestPropertyKeyIs {\n public:\n  // Constructor.\n  //\n  // TestPropertyKeyIs has NO default constructor.\n  explicit TestPropertyKeyIs(const std::string& key) : key_(key) {}\n\n  // Returns true iff the test name of test property matches on key_.\n  bool operator()(const TestProperty& test_property) const {\n    return test_property.key() == key_;\n  }\n\n private:\n  std::string key_;\n};\n\n// Class UnitTestOptions.\n//\n// This class contains functions for processing options the user\n// specifies when running the tests.  It has only static members.\n//\n// In most cases, the user can specify an option using either an\n// environment variable or a command line flag.  E.g. you can set the\n// test filter using either GTEST_FILTER or --gtest_filter.  If both\n// the variable and the flag are present, the latter overrides the\n// former.\nclass GTEST_API_ UnitTestOptions {\n public:\n  // Functions for processing the gtest_output flag.\n\n  // Returns the output format, or \"\" for normal printed output.\n  static std::string GetOutputFormat();\n\n  // Returns the absolute path of the requested output file, or the\n  // default (test_detail.xml in the original working directory) if\n  // none was explicitly specified.\n  static std::string GetAbsolutePathToOutputFile();\n\n  // Functions for processing the gtest_filter flag.\n\n  // Returns true iff the wildcard pattern matches the string.  The\n  // first ':' or '\\0' character in pattern marks the end of it.\n  //\n  // This recursive algorithm isn't very efficient, but is clear and\n  // works well enough for matching test names, which are short.\n  static bool PatternMatchesString(const char *pattern, const char *str);\n\n  // Returns true iff the user-specified filter matches the test case\n  // name and the test name.\n  static bool FilterMatchesTest(const std::string &test_case_name,\n                                const std::string &test_name);\n\n#if GTEST_OS_WINDOWS\n  // Function for supporting the gtest_catch_exception flag.\n\n  // Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the\n  // given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.\n  // This function is useful as an __except condition.\n  static int GTestShouldProcessSEH(DWORD exception_code);\n#endif  // GTEST_OS_WINDOWS\n\n  // Returns true if \"name\" matches the ':' separated list of glob-style\n  // filters in \"filter\".\n  static bool MatchesFilter(const std::string& name, const char* filter);\n};\n\n// Returns the current application's name, removing directory path if that\n// is present.  Used by UnitTestOptions::GetOutputFile.\nGTEST_API_ FilePath GetCurrentExecutableName();\n\n// The role interface for getting the OS stack trace as a string.\nclass OsStackTraceGetterInterface {\n public:\n  OsStackTraceGetterInterface() {}\n  virtual ~OsStackTraceGetterInterface() {}\n\n  // Returns the current OS stack trace as an std::string.  Parameters:\n  //\n  //   max_depth  - the maximum number of stack frames to be included\n  //                in the trace.\n  //   skip_count - the number of top frames to be skipped; doesn't count\n  //                against max_depth.\n  virtual string CurrentStackTrace(int max_depth, int skip_count) = 0;\n\n  // UponLeavingGTest() should be called immediately before Google Test calls\n  // user code. It saves some information about the current stack that\n  // CurrentStackTrace() will use to find and hide Google Test stack frames.\n  virtual void UponLeavingGTest() = 0;\n\n private:\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetterInterface);\n};\n\n// A working implementation of the OsStackTraceGetterInterface interface.\nclass OsStackTraceGetter : public OsStackTraceGetterInterface {\n public:\n  OsStackTraceGetter() : caller_frame_(NULL) {}\n\n  virtual string CurrentStackTrace(int max_depth, int skip_count)\n      GTEST_LOCK_EXCLUDED_(mutex_);\n\n  virtual void UponLeavingGTest() GTEST_LOCK_EXCLUDED_(mutex_);\n\n  // This string is inserted in place of stack frames that are part of\n  // Google Test's implementation.\n  static const char* const kElidedFramesMarker;\n\n private:\n  Mutex mutex_;  // protects all internal state\n\n  // We save the stack frame below the frame that calls user code.\n  // We do this because the address of the frame immediately below\n  // the user code changes between the call to UponLeavingGTest()\n  // and any calls to CurrentStackTrace() from within the user code.\n  void* caller_frame_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter);\n};\n\n// Information about a Google Test trace point.\nstruct TraceInfo {\n  const char* file;\n  int line;\n  std::string message;\n};\n\n// This is the default global test part result reporter used in UnitTestImpl.\n// This class should only be used by UnitTestImpl.\nclass DefaultGlobalTestPartResultReporter\n  : public TestPartResultReporterInterface {\n public:\n  explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test);\n  // Implements the TestPartResultReporterInterface. Reports the test part\n  // result in the current test.\n  virtual void ReportTestPartResult(const TestPartResult& result);\n\n private:\n  UnitTestImpl* const unit_test_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultGlobalTestPartResultReporter);\n};\n\n// This is the default per thread test part result reporter used in\n// UnitTestImpl. This class should only be used by UnitTestImpl.\nclass DefaultPerThreadTestPartResultReporter\n    : public TestPartResultReporterInterface {\n public:\n  explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test);\n  // Implements the TestPartResultReporterInterface. The implementation just\n  // delegates to the current global test part result reporter of *unit_test_.\n  virtual void ReportTestPartResult(const TestPartResult& result);\n\n private:\n  UnitTestImpl* const unit_test_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultPerThreadTestPartResultReporter);\n};\n\n// The private implementation of the UnitTest class.  We don't protect\n// the methods under a mutex, as this class is not accessible by a\n// user and the UnitTest class that delegates work to this class does\n// proper locking.\nclass GTEST_API_ UnitTestImpl {\n public:\n  explicit UnitTestImpl(UnitTest* parent);\n  virtual ~UnitTestImpl();\n\n  // There are two different ways to register your own TestPartResultReporter.\n  // You can register your own repoter to listen either only for test results\n  // from the current thread or for results from all threads.\n  // By default, each per-thread test result repoter just passes a new\n  // TestPartResult to the global test result reporter, which registers the\n  // test part result for the currently running test.\n\n  // Returns the global test part result reporter.\n  TestPartResultReporterInterface* GetGlobalTestPartResultReporter();\n\n  // Sets the global test part result reporter.\n  void SetGlobalTestPartResultReporter(\n      TestPartResultReporterInterface* reporter);\n\n  // Returns the test part result reporter for the current thread.\n  TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread();\n\n  // Sets the test part result reporter for the current thread.\n  void SetTestPartResultReporterForCurrentThread(\n      TestPartResultReporterInterface* reporter);\n\n  // Gets the number of successful test cases.\n  int successful_test_case_count() const;\n\n  // Gets the number of failed test cases.\n  int failed_test_case_count() const;\n\n  // Gets the number of all test cases.\n  int total_test_case_count() const;\n\n  // Gets the number of all test cases that contain at least one test\n  // that should run.\n  int test_case_to_run_count() const;\n\n  // Gets the number of successful tests.\n  int successful_test_count() const;\n\n  // Gets the number of failed tests.\n  int failed_test_count() const;\n\n  // Gets the number of disabled tests that will be reported in the XML report.\n  int reportable_disabled_test_count() const;\n\n  // Gets the number of disabled tests.\n  int disabled_test_count() const;\n\n  // Gets the number of tests to be printed in the XML report.\n  int reportable_test_count() const;\n\n  // Gets the number of all tests.\n  int total_test_count() const;\n\n  // Gets the number of tests that should run.\n  int test_to_run_count() const;\n\n  // Gets the time of the test program start, in ms from the start of the\n  // UNIX epoch.\n  TimeInMillis start_timestamp() const { return start_timestamp_; }\n\n  // Gets the elapsed time, in milliseconds.\n  TimeInMillis elapsed_time() const { return elapsed_time_; }\n\n  // Returns true iff the unit test passed (i.e. all test cases passed).\n  bool Passed() const { return !Failed(); }\n\n  // Returns true iff the unit test failed (i.e. some test case failed\n  // or something outside of all tests failed).\n  bool Failed() const {\n    return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed();\n  }\n\n  // Gets the i-th test case among all the test cases. i can range from 0 to\n  // total_test_case_count() - 1. If i is not in that range, returns NULL.\n  const TestCase* GetTestCase(int i) const {\n    const int index = GetElementOr(test_case_indices_, i, -1);\n    return index < 0 ? NULL : test_cases_[i];\n  }\n\n  // Gets the i-th test case among all the test cases. i can range from 0 to\n  // total_test_case_count() - 1. If i is not in that range, returns NULL.\n  TestCase* GetMutableTestCase(int i) {\n    const int index = GetElementOr(test_case_indices_, i, -1);\n    return index < 0 ? NULL : test_cases_[index];\n  }\n\n  // Provides access to the event listener list.\n  TestEventListeners* listeners() { return &listeners_; }\n\n  // Returns the TestResult for the test that's currently running, or\n  // the TestResult for the ad hoc test if no test is running.\n  TestResult* current_test_result();\n\n  // Returns the TestResult for the ad hoc test.\n  const TestResult* ad_hoc_test_result() const { return &ad_hoc_test_result_; }\n\n  // Sets the OS stack trace getter.\n  //\n  // Does nothing if the input and the current OS stack trace getter\n  // are the same; otherwise, deletes the old getter and makes the\n  // input the current getter.\n  void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter);\n\n  // Returns the current OS stack trace getter if it is not NULL;\n  // otherwise, creates an OsStackTraceGetter, makes it the current\n  // getter, and returns it.\n  OsStackTraceGetterInterface* os_stack_trace_getter();\n\n  // Returns the current OS stack trace as an std::string.\n  //\n  // The maximum number of stack frames to be included is specified by\n  // the gtest_stack_trace_depth flag.  The skip_count parameter\n  // specifies the number of top frames to be skipped, which doesn't\n  // count against the number of frames to be included.\n  //\n  // For example, if Foo() calls Bar(), which in turn calls\n  // CurrentOsStackTraceExceptTop(1), Foo() will be included in the\n  // trace but Bar() and CurrentOsStackTraceExceptTop() won't.\n  std::string CurrentOsStackTraceExceptTop(int skip_count) GTEST_NO_INLINE_;\n\n  // Finds and returns a TestCase with the given name.  If one doesn't\n  // exist, creates one and returns it.\n  //\n  // Arguments:\n  //\n  //   test_case_name: name of the test case\n  //   type_param:     the name of the test's type parameter, or NULL if\n  //                   this is not a typed or a type-parameterized test.\n  //   set_up_tc:      pointer to the function that sets up the test case\n  //   tear_down_tc:   pointer to the function that tears down the test case\n  TestCase* GetTestCase(const char* test_case_name,\n                        const char* type_param,\n                        Test::SetUpTestCaseFunc set_up_tc,\n                        Test::TearDownTestCaseFunc tear_down_tc);\n\n  // Adds a TestInfo to the unit test.\n  //\n  // Arguments:\n  //\n  //   set_up_tc:    pointer to the function that sets up the test case\n  //   tear_down_tc: pointer to the function that tears down the test case\n  //   test_info:    the TestInfo object\n  void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc,\n                   Test::TearDownTestCaseFunc tear_down_tc,\n                   TestInfo* test_info) {\n    // In order to support thread-safe death tests, we need to\n    // remember the original working directory when the test program\n    // was first invoked.  We cannot do this in RUN_ALL_TESTS(), as\n    // the user may have changed the current directory before calling\n    // RUN_ALL_TESTS().  Therefore we capture the current directory in\n    // AddTestInfo(), which is called to register a TEST or TEST_F\n    // before main() is reached.\n    if (original_working_dir_.IsEmpty()) {\n      original_working_dir_.Set(FilePath::GetCurrentDir());\n      GTEST_CHECK_(!original_working_dir_.IsEmpty())\n          << \"Failed to get the current working directory.\";\n    }\n\n    GetTestCase(test_info->test_case_name(),\n                test_info->type_param(),\n                set_up_tc,\n                tear_down_tc)->AddTestInfo(test_info);\n  }\n\n#if GTEST_HAS_PARAM_TEST\n  // Returns ParameterizedTestCaseRegistry object used to keep track of\n  // value-parameterized tests and instantiate and register them.\n  internal::ParameterizedTestCaseRegistry& parameterized_test_registry() {\n    return parameterized_test_registry_;\n  }\n#endif  // GTEST_HAS_PARAM_TEST\n\n  // Sets the TestCase object for the test that's currently running.\n  void set_current_test_case(TestCase* a_current_test_case) {\n    current_test_case_ = a_current_test_case;\n  }\n\n  // Sets the TestInfo object for the test that's currently running.  If\n  // current_test_info is NULL, the assertion results will be stored in\n  // ad_hoc_test_result_.\n  void set_current_test_info(TestInfo* a_current_test_info) {\n    current_test_info_ = a_current_test_info;\n  }\n\n  // Registers all parameterized tests defined using TEST_P and\n  // INSTANTIATE_TEST_CASE_P, creating regular tests for each test/parameter\n  // combination. This method can be called more then once; it has guards\n  // protecting from registering the tests more then once.  If\n  // value-parameterized tests are disabled, RegisterParameterizedTests is\n  // present but does nothing.\n  void RegisterParameterizedTests();\n\n  // Runs all tests in this UnitTest object, prints the result, and\n  // returns true if all tests are successful.  If any exception is\n  // thrown during a test, this test is considered to be failed, but\n  // the rest of the tests will still be run.\n  bool RunAllTests();\n\n  // Clears the results of all tests, except the ad hoc tests.\n  void ClearNonAdHocTestResult() {\n    ForEach(test_cases_, TestCase::ClearTestCaseResult);\n  }\n\n  // Clears the results of ad-hoc test assertions.\n  void ClearAdHocTestResult() {\n    ad_hoc_test_result_.Clear();\n  }\n\n  // Adds a TestProperty to the current TestResult object when invoked in a\n  // context of a test or a test case, or to the global property set. If the\n  // result already contains a property with the same key, the value will be\n  // updated.\n  void RecordProperty(const TestProperty& test_property);\n\n  enum ReactionToSharding {\n    HONOR_SHARDING_PROTOCOL,\n    IGNORE_SHARDING_PROTOCOL\n  };\n\n  // Matches the full name of each test against the user-specified\n  // filter to decide whether the test should run, then records the\n  // result in each TestCase and TestInfo object.\n  // If shard_tests == HONOR_SHARDING_PROTOCOL, further filters tests\n  // based on sharding variables in the environment.\n  // Returns the number of tests that should run.\n  int FilterTests(ReactionToSharding shard_tests);\n\n  // Prints the names of the tests matching the user-specified filter flag.\n  void ListTestsMatchingFilter();\n\n  const TestCase* current_test_case() const { return current_test_case_; }\n  TestInfo* current_test_info() { return current_test_info_; }\n  const TestInfo* current_test_info() const { return current_test_info_; }\n\n  // Returns the vector of environments that need to be set-up/torn-down\n  // before/after the tests are run.\n  std::vector<Environment*>& environments() { return environments_; }\n\n  // Getters for the per-thread Google Test trace stack.\n  std::vector<TraceInfo>& gtest_trace_stack() {\n    return *(gtest_trace_stack_.pointer());\n  }\n  const std::vector<TraceInfo>& gtest_trace_stack() const {\n    return gtest_trace_stack_.get();\n  }\n\n#if GTEST_HAS_DEATH_TEST\n  void InitDeathTestSubprocessControlInfo() {\n    internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());\n  }\n  // Returns a pointer to the parsed --gtest_internal_run_death_test\n  // flag, or NULL if that flag was not specified.\n  // This information is useful only in a death test child process.\n  // Must not be called before a call to InitGoogleTest.\n  const InternalRunDeathTestFlag* internal_run_death_test_flag() const {\n    return internal_run_death_test_flag_.get();\n  }\n\n  // Returns a pointer to the current death test factory.\n  internal::DeathTestFactory* death_test_factory() {\n    return death_test_factory_.get();\n  }\n\n  void SuppressTestEventsIfInSubprocess();\n\n  friend class ReplaceDeathTestFactory;\n#endif  // GTEST_HAS_DEATH_TEST\n\n  // Initializes the event listener performing XML output as specified by\n  // UnitTestOptions. Must not be called before InitGoogleTest.\n  void ConfigureXmlOutput();\n\n#if GTEST_CAN_STREAM_RESULTS_\n  // Initializes the event listener for streaming test results to a socket.\n  // Must not be called before InitGoogleTest.\n  void ConfigureStreamingOutput();\n#endif\n\n  // Performs initialization dependent upon flag values obtained in\n  // ParseGoogleTestFlagsOnly.  Is called from InitGoogleTest after the call to\n  // ParseGoogleTestFlagsOnly.  In case a user neglects to call InitGoogleTest\n  // this function is also called from RunAllTests.  Since this function can be\n  // called more than once, it has to be idempotent.\n  void PostFlagParsingInit();\n\n  // Gets the random seed used at the start of the current test iteration.\n  int random_seed() const { return random_seed_; }\n\n  // Gets the random number generator.\n  internal::Random* random() { return &random_; }\n\n  // Shuffles all test cases, and the tests within each test case,\n  // making sure that death tests are still run first.\n  void ShuffleTests();\n\n  // Restores the test cases and tests to their order before the first shuffle.\n  void UnshuffleTests();\n\n  // Returns the value of GTEST_FLAG(catch_exceptions) at the moment\n  // UnitTest::Run() starts.\n  bool catch_exceptions() const { return catch_exceptions_; }\n\n private:\n  friend class ::testing::UnitTest;\n\n  // Used by UnitTest::Run() to capture the state of\n  // GTEST_FLAG(catch_exceptions) at the moment it starts.\n  void set_catch_exceptions(bool value) { catch_exceptions_ = value; }\n\n  // The UnitTest object that owns this implementation object.\n  UnitTest* const parent_;\n\n  // The working directory when the first TEST() or TEST_F() was\n  // executed.\n  internal::FilePath original_working_dir_;\n\n  // The default test part result reporters.\n  DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_;\n  DefaultPerThreadTestPartResultReporter\n      default_per_thread_test_part_result_reporter_;\n\n  // Points to (but doesn't own) the global test part result reporter.\n  TestPartResultReporterInterface* global_test_part_result_repoter_;\n\n  // Protects read and write access to global_test_part_result_reporter_.\n  internal::Mutex global_test_part_result_reporter_mutex_;\n\n  // Points to (but doesn't own) the per-thread test part result reporter.\n  internal::ThreadLocal<TestPartResultReporterInterface*>\n      per_thread_test_part_result_reporter_;\n\n  // The vector of environments that need to be set-up/torn-down\n  // before/after the tests are run.\n  std::vector<Environment*> environments_;\n\n  // The vector of TestCases in their original order.  It owns the\n  // elements in the vector.\n  std::vector<TestCase*> test_cases_;\n\n  // Provides a level of indirection for the test case list to allow\n  // easy shuffling and restoring the test case order.  The i-th\n  // element of this vector is the index of the i-th test case in the\n  // shuffled order.\n  std::vector<int> test_case_indices_;\n\n#if GTEST_HAS_PARAM_TEST\n  // ParameterizedTestRegistry object used to register value-parameterized\n  // tests.\n  internal::ParameterizedTestCaseRegistry parameterized_test_registry_;\n\n  // Indicates whether RegisterParameterizedTests() has been called already.\n  bool parameterized_tests_registered_;\n#endif  // GTEST_HAS_PARAM_TEST\n\n  // Index of the last death test case registered.  Initially -1.\n  int last_death_test_case_;\n\n  // This points to the TestCase for the currently running test.  It\n  // changes as Google Test goes through one test case after another.\n  // When no test is running, this is set to NULL and Google Test\n  // stores assertion results in ad_hoc_test_result_.  Initially NULL.\n  TestCase* current_test_case_;\n\n  // This points to the TestInfo for the currently running test.  It\n  // changes as Google Test goes through one test after another.  When\n  // no test is running, this is set to NULL and Google Test stores\n  // assertion results in ad_hoc_test_result_.  Initially NULL.\n  TestInfo* current_test_info_;\n\n  // Normally, a user only writes assertions inside a TEST or TEST_F,\n  // or inside a function called by a TEST or TEST_F.  Since Google\n  // Test keeps track of which test is current running, it can\n  // associate such an assertion with the test it belongs to.\n  //\n  // If an assertion is encountered when no TEST or TEST_F is running,\n  // Google Test attributes the assertion result to an imaginary \"ad hoc\"\n  // test, and records the result in ad_hoc_test_result_.\n  TestResult ad_hoc_test_result_;\n\n  // The list of event listeners that can be used to track events inside\n  // Google Test.\n  TestEventListeners listeners_;\n\n  // The OS stack trace getter.  Will be deleted when the UnitTest\n  // object is destructed.  By default, an OsStackTraceGetter is used,\n  // but the user can set this field to use a custom getter if that is\n  // desired.\n  OsStackTraceGetterInterface* os_stack_trace_getter_;\n\n  // True iff PostFlagParsingInit() has been called.\n  bool post_flag_parse_init_performed_;\n\n  // The random number seed used at the beginning of the test run.\n  int random_seed_;\n\n  // Our random number generator.\n  internal::Random random_;\n\n  // The time of the test program start, in ms from the start of the\n  // UNIX epoch.\n  TimeInMillis start_timestamp_;\n\n  // How long the test took to run, in milliseconds.\n  TimeInMillis elapsed_time_;\n\n#if GTEST_HAS_DEATH_TEST\n  // The decomposed components of the gtest_internal_run_death_test flag,\n  // parsed when RUN_ALL_TESTS is called.\n  internal::scoped_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_;\n  internal::scoped_ptr<internal::DeathTestFactory> death_test_factory_;\n#endif  // GTEST_HAS_DEATH_TEST\n\n  // A per-thread stack of traces created by the SCOPED_TRACE() macro.\n  internal::ThreadLocal<std::vector<TraceInfo> > gtest_trace_stack_;\n\n  // The value of GTEST_FLAG(catch_exceptions) at the moment RunAllTests()\n  // starts.\n  bool catch_exceptions_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestImpl);\n};  // class UnitTestImpl\n\n// Convenience function for accessing the global UnitTest\n// implementation object.\ninline UnitTestImpl* GetUnitTestImpl() {\n  return UnitTest::GetInstance()->impl();\n}\n\n#if GTEST_USES_SIMPLE_RE\n\n// Internal helper functions for implementing the simple regular\n// expression matcher.\nGTEST_API_ bool IsInSet(char ch, const char* str);\nGTEST_API_ bool IsAsciiDigit(char ch);\nGTEST_API_ bool IsAsciiPunct(char ch);\nGTEST_API_ bool IsRepeat(char ch);\nGTEST_API_ bool IsAsciiWhiteSpace(char ch);\nGTEST_API_ bool IsAsciiWordChar(char ch);\nGTEST_API_ bool IsValidEscape(char ch);\nGTEST_API_ bool AtomMatchesChar(bool escaped, char pattern, char ch);\nGTEST_API_ bool ValidateRegex(const char* regex);\nGTEST_API_ bool MatchRegexAtHead(const char* regex, const char* str);\nGTEST_API_ bool MatchRepetitionAndRegexAtHead(\n    bool escaped, char ch, char repeat, const char* regex, const char* str);\nGTEST_API_ bool MatchRegexAnywhere(const char* regex, const char* str);\n\n#endif  // GTEST_USES_SIMPLE_RE\n\n// Parses the command line for Google Test flags, without initializing\n// other parts of Google Test.\nGTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, char** argv);\nGTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv);\n\n#if GTEST_HAS_DEATH_TEST\n\n// Returns the message describing the last system error, regardless of the\n// platform.\nGTEST_API_ std::string GetLastErrnoDescription();\n\n# if GTEST_OS_WINDOWS\n// Provides leak-safe Windows kernel handle ownership.\nclass AutoHandle {\n public:\n  AutoHandle() : handle_(INVALID_HANDLE_VALUE) {}\n  explicit AutoHandle(HANDLE handle) : handle_(handle) {}\n\n  ~AutoHandle() { Reset(); }\n\n  HANDLE Get() const { return handle_; }\n  void Reset() { Reset(INVALID_HANDLE_VALUE); }\n  void Reset(HANDLE handle) {\n    if (handle != handle_) {\n      if (handle_ != INVALID_HANDLE_VALUE)\n        ::CloseHandle(handle_);\n      handle_ = handle;\n    }\n  }\n\n private:\n  HANDLE handle_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle);\n};\n# endif  // GTEST_OS_WINDOWS\n\n// Attempts to parse a string into a positive integer pointed to by the\n// number parameter.  Returns true if that is possible.\n// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can use\n// it here.\ntemplate <typename Integer>\nbool ParseNaturalNumber(const ::std::string& str, Integer* number) {\n  // Fail fast if the given string does not begin with a digit;\n  // this bypasses strtoXXX's \"optional leading whitespace and plus\n  // or minus sign\" semantics, which are undesirable here.\n  if (str.empty() || !IsDigit(str[0])) {\n    return false;\n  }\n  errno = 0;\n\n  char* end;\n  // BiggestConvertible is the largest integer type that system-provided\n  // string-to-number conversion routines can return.\n\n# if GTEST_OS_WINDOWS && !defined(__GNUC__)\n\n  // MSVC and C++ Builder define __int64 instead of the standard long long.\n  typedef unsigned __int64 BiggestConvertible;\n  const BiggestConvertible parsed = _strtoui64(str.c_str(), &end, 10);\n\n# else\n\n  typedef unsigned long long BiggestConvertible;  // NOLINT\n  const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10);\n\n# endif  // GTEST_OS_WINDOWS && !defined(__GNUC__)\n\n  const bool parse_success = *end == '\\0' && errno == 0;\n\n  // TODO(vladl@google.com): Convert this to compile time assertion when it is\n  // available.\n  GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed));\n\n  const Integer result = static_cast<Integer>(parsed);\n  if (parse_success && static_cast<BiggestConvertible>(result) == parsed) {\n    *number = result;\n    return true;\n  }\n  return false;\n}\n#endif  // GTEST_HAS_DEATH_TEST\n\n// TestResult contains some private methods that should be hidden from\n// Google Test user but are required for testing. This class allow our tests\n// to access them.\n//\n// This class is supplied only for the purpose of testing Google Test's own\n// constructs. Do not use it in user tests, either directly or indirectly.\nclass TestResultAccessor {\n public:\n  static void RecordProperty(TestResult* test_result,\n                             const std::string& xml_element,\n                             const TestProperty& property) {\n    test_result->RecordProperty(xml_element, property);\n  }\n\n  static void ClearTestPartResults(TestResult* test_result) {\n    test_result->ClearTestPartResults();\n  }\n\n  static const std::vector<testing::TestPartResult>& test_part_results(\n      const TestResult& test_result) {\n    return test_result.test_part_results();\n  }\n};\n\n#if GTEST_CAN_STREAM_RESULTS_\n\n// Streams test results to the given port on the given host machine.\nclass StreamingListener : public EmptyTestEventListener {\n public:\n  // Abstract base class for writing strings to a socket.\n  class AbstractSocketWriter {\n   public:\n    virtual ~AbstractSocketWriter() {}\n\n    // Sends a string to the socket.\n    virtual void Send(const string& message) = 0;\n\n    // Closes the socket.\n    virtual void CloseConnection() {}\n\n    // Sends a string and a newline to the socket.\n    void SendLn(const string& message) {\n      Send(message + \"\\n\");\n    }\n  };\n\n  // Concrete class for actually writing strings to a socket.\n  class SocketWriter : public AbstractSocketWriter {\n   public:\n    SocketWriter(const string& host, const string& port)\n        : sockfd_(-1), host_name_(host), port_num_(port) {\n      MakeConnection();\n    }\n\n    virtual ~SocketWriter() {\n      if (sockfd_ != -1)\n        CloseConnection();\n    }\n\n    // Sends a string to the socket.\n    virtual void Send(const string& message) {\n      GTEST_CHECK_(sockfd_ != -1)\n          << \"Send() can be called only when there is a connection.\";\n\n      const int len = static_cast<int>(message.length());\n      if (write(sockfd_, message.c_str(), len) != len) {\n        GTEST_LOG_(WARNING)\n            << \"stream_result_to: failed to stream to \"\n            << host_name_ << \":\" << port_num_;\n      }\n    }\n\n   private:\n    // Creates a client socket and connects to the server.\n    void MakeConnection();\n\n    // Closes the socket.\n    void CloseConnection() {\n      GTEST_CHECK_(sockfd_ != -1)\n          << \"CloseConnection() can be called only when there is a connection.\";\n\n      close(sockfd_);\n      sockfd_ = -1;\n    }\n\n    int sockfd_;  // socket file descriptor\n    const string host_name_;\n    const string port_num_;\n\n    GTEST_DISALLOW_COPY_AND_ASSIGN_(SocketWriter);\n  };  // class SocketWriter\n\n  // Escapes '=', '&', '%', and '\\n' characters in str as \"%xx\".\n  static string UrlEncode(const char* str);\n\n  StreamingListener(const string& host, const string& port)\n      : socket_writer_(new SocketWriter(host, port)) { Start(); }\n\n  explicit StreamingListener(AbstractSocketWriter* socket_writer)\n      : socket_writer_(socket_writer) { Start(); }\n\n  void OnTestProgramStart(const UnitTest& /* unit_test */) {\n    SendLn(\"event=TestProgramStart\");\n  }\n\n  void OnTestProgramEnd(const UnitTest& unit_test) {\n    // Note that Google Test current only report elapsed time for each\n    // test iteration, not for the entire test program.\n    SendLn(\"event=TestProgramEnd&passed=\" + FormatBool(unit_test.Passed()));\n\n    // Notify the streaming server to stop.\n    socket_writer_->CloseConnection();\n  }\n\n  void OnTestIterationStart(const UnitTest& /* unit_test */, int iteration) {\n    SendLn(\"event=TestIterationStart&iteration=\" +\n           StreamableToString(iteration));\n  }\n\n  void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration */) {\n    SendLn(\"event=TestIterationEnd&passed=\" +\n           FormatBool(unit_test.Passed()) + \"&elapsed_time=\" +\n           StreamableToString(unit_test.elapsed_time()) + \"ms\");\n  }\n\n  void OnTestCaseStart(const TestCase& test_case) {\n    SendLn(std::string(\"event=TestCaseStart&name=\") + test_case.name());\n  }\n\n  void OnTestCaseEnd(const TestCase& test_case) {\n    SendLn(\"event=TestCaseEnd&passed=\" + FormatBool(test_case.Passed())\n           + \"&elapsed_time=\" + StreamableToString(test_case.elapsed_time())\n           + \"ms\");\n  }\n\n  void OnTestStart(const TestInfo& test_info) {\n    SendLn(std::string(\"event=TestStart&name=\") + test_info.name());\n  }\n\n  void OnTestEnd(const TestInfo& test_info) {\n    SendLn(\"event=TestEnd&passed=\" +\n           FormatBool((test_info.result())->Passed()) +\n           \"&elapsed_time=\" +\n           StreamableToString((test_info.result())->elapsed_time()) + \"ms\");\n  }\n\n  void OnTestPartResult(const TestPartResult& test_part_result) {\n    const char* file_name = test_part_result.file_name();\n    if (file_name == NULL)\n      file_name = \"\";\n    SendLn(\"event=TestPartResult&file=\" + UrlEncode(file_name) +\n           \"&line=\" + StreamableToString(test_part_result.line_number()) +\n           \"&message=\" + UrlEncode(test_part_result.message()));\n  }\n\n private:\n  // Sends the given message and a newline to the socket.\n  void SendLn(const string& message) { socket_writer_->SendLn(message); }\n\n  // Called at the start of streaming to notify the receiver what\n  // protocol we are using.\n  void Start() { SendLn(\"gtest_streaming_protocol_version=1.0\"); }\n\n  string FormatBool(bool value) { return value ? \"1\" : \"0\"; }\n\n  const scoped_ptr<AbstractSocketWriter> socket_writer_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamingListener);\n};  // class StreamingListener\n\n#endif  // GTEST_CAN_STREAM_RESULTS_\n\n}  // namespace internal\n}  // namespace testing\n\n#endif  // GTEST_SRC_GTEST_INTERNAL_INL_H_\n"
  },
  {
    "path": "src/madness/external/gtest/src/gtest-port.cc",
    "content": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n\n#include \"gtest/internal/gtest-port.h\"\n\n#include <limits.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n\n#if GTEST_OS_WINDOWS_MOBILE\n# include <windows.h>  // For TerminateProcess()\n#elif GTEST_OS_WINDOWS\n# include <io.h>\n# include <sys/stat.h>\n#else\n# include <unistd.h>\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n#if GTEST_OS_MAC\n# include <mach/mach_init.h>\n# include <mach/task.h>\n# include <mach/vm_map.h>\n#endif  // GTEST_OS_MAC\n\n#if GTEST_OS_QNX\n# include <devctl.h>\n# include <sys/procfs.h>\n#endif  // GTEST_OS_QNX\n\n#include \"gtest/gtest-spi.h\"\n#include \"gtest/gtest-message.h\"\n#include \"gtest/internal/gtest-internal.h\"\n#include \"gtest/internal/gtest-string.h\"\n\n// Indicates that this translation unit is part of Google Test's\n// implementation.  It must come before gtest-internal-inl.h is\n// included, or there will be a compiler error.  This trick is to\n// prevent a user from accidentally including gtest-internal-inl.h in\n// his code.\n#define GTEST_IMPLEMENTATION_ 1\n#include \"src/gtest-internal-inl.h\"\n#undef GTEST_IMPLEMENTATION_\n\nnamespace testing {\nnamespace internal {\n\n#if defined(_MSC_VER) || defined(__BORLANDC__)\n// MSVC and C++Builder do not provide a definition of STDERR_FILENO.\nconst int kStdOutFileno = 1;\nconst int kStdErrFileno = 2;\n#else\nconst int kStdOutFileno = STDOUT_FILENO;\nconst int kStdErrFileno = STDERR_FILENO;\n#endif  // _MSC_VER\n\n#if GTEST_OS_MAC\n\n// Returns the number of threads running in the process, or 0 to indicate that\n// we cannot detect it.\nsize_t GetThreadCount() {\n  const task_t task = mach_task_self();\n  mach_msg_type_number_t thread_count;\n  thread_act_array_t thread_list;\n  const kern_return_t status = task_threads(task, &thread_list, &thread_count);\n  if (status == KERN_SUCCESS) {\n    // task_threads allocates resources in thread_list and we need to free them\n    // to avoid leaks.\n    vm_deallocate(task,\n                  reinterpret_cast<vm_address_t>(thread_list),\n                  sizeof(thread_t) * thread_count);\n    return static_cast<size_t>(thread_count);\n  } else {\n    return 0;\n  }\n}\n\n#elif GTEST_OS_QNX\n\n// Returns the number of threads running in the process, or 0 to indicate that\n// we cannot detect it.\nsize_t GetThreadCount() {\n  const int fd = open(\"/proc/self/as\", O_RDONLY);\n  if (fd < 0) {\n    return 0;\n  }\n  procfs_info process_info;\n  const int status =\n      devctl(fd, DCMD_PROC_INFO, &process_info, sizeof(process_info), NULL);\n  close(fd);\n  if (status == EOK) {\n    return static_cast<size_t>(process_info.num_threads);\n  } else {\n    return 0;\n  }\n}\n\n#else\n\nsize_t GetThreadCount() {\n  // There's no portable way to detect the number of threads, so we just\n  // return 0 to indicate that we cannot detect it.\n  return 0;\n}\n\n#endif  // GTEST_OS_MAC\n\n#if GTEST_USES_POSIX_RE\n\n// Implements RE.  Currently only needed for death tests.\n\nRE::~RE() {\n  if (is_valid_) {\n    // regfree'ing an invalid regex might crash because the content\n    // of the regex is undefined. Since the regex's are essentially\n    // the same, one cannot be valid (or invalid) without the other\n    // being so too.\n    regfree(&partial_regex_);\n    regfree(&full_regex_);\n  }\n  free(const_cast<char*>(pattern_));\n}\n\n// Returns true iff regular expression re matches the entire str.\nbool RE::FullMatch(const char* str, const RE& re) {\n  if (!re.is_valid_) return false;\n\n  regmatch_t match;\n  return regexec(&re.full_regex_, str, 1, &match, 0) == 0;\n}\n\n// Returns true iff regular expression re matches a substring of str\n// (including str itself).\nbool RE::PartialMatch(const char* str, const RE& re) {\n  if (!re.is_valid_) return false;\n\n  regmatch_t match;\n  return regexec(&re.partial_regex_, str, 1, &match, 0) == 0;\n}\n\n// Initializes an RE from its string representation.\nvoid RE::Init(const char* regex) {\n  pattern_ = posix::StrDup(regex);\n\n  // Reserves enough bytes to hold the regular expression used for a\n  // full match.\n  const size_t full_regex_len = strlen(regex) + 10;\n  char* const full_pattern = new char[full_regex_len];\n\n  snprintf(full_pattern, full_regex_len, \"^(%s)$\", regex);\n  is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0;\n  // We want to call regcomp(&partial_regex_, ...) even if the\n  // previous expression returns false.  Otherwise partial_regex_ may\n  // not be properly initialized can may cause trouble when it's\n  // freed.\n  //\n  // Some implementation of POSIX regex (e.g. on at least some\n  // versions of Cygwin) doesn't accept the empty string as a valid\n  // regex.  We change it to an equivalent form \"()\" to be safe.\n  if (is_valid_) {\n    const char* const partial_regex = (*regex == '\\0') ? \"()\" : regex;\n    is_valid_ = regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0;\n  }\n  EXPECT_TRUE(is_valid_)\n      << \"Regular expression \\\"\" << regex\n      << \"\\\" is not a valid POSIX Extended regular expression.\";\n\n  delete[] full_pattern;\n}\n\n#elif GTEST_USES_SIMPLE_RE\n\n// Returns true iff ch appears anywhere in str (excluding the\n// terminating '\\0' character).\nbool IsInSet(char ch, const char* str) {\n  return ch != '\\0' && strchr(str, ch) != NULL;\n}\n\n// Returns true iff ch belongs to the given classification.  Unlike\n// similar functions in <ctype.h>, these aren't affected by the\n// current locale.\nbool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }\nbool IsAsciiPunct(char ch) {\n  return IsInSet(ch, \"^-!\\\"#$%&'()*+,./:;<=>?@[\\\\]_`{|}~\");\n}\nbool IsRepeat(char ch) { return IsInSet(ch, \"?*+\"); }\nbool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, \" \\f\\n\\r\\t\\v\"); }\nbool IsAsciiWordChar(char ch) {\n  return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') ||\n      ('0' <= ch && ch <= '9') || ch == '_';\n}\n\n// Returns true iff \"\\\\c\" is a supported escape sequence.\nbool IsValidEscape(char c) {\n  return (IsAsciiPunct(c) || IsInSet(c, \"dDfnrsStvwW\"));\n}\n\n// Returns true iff the given atom (specified by escaped and pattern)\n// matches ch.  The result is undefined if the atom is invalid.\nbool AtomMatchesChar(bool escaped, char pattern_char, char ch) {\n  if (escaped) {  // \"\\\\p\" where p is pattern_char.\n    switch (pattern_char) {\n      case 'd': return IsAsciiDigit(ch);\n      case 'D': return !IsAsciiDigit(ch);\n      case 'f': return ch == '\\f';\n      case 'n': return ch == '\\n';\n      case 'r': return ch == '\\r';\n      case 's': return IsAsciiWhiteSpace(ch);\n      case 'S': return !IsAsciiWhiteSpace(ch);\n      case 't': return ch == '\\t';\n      case 'v': return ch == '\\v';\n      case 'w': return IsAsciiWordChar(ch);\n      case 'W': return !IsAsciiWordChar(ch);\n    }\n    return IsAsciiPunct(pattern_char) && pattern_char == ch;\n  }\n\n  return (pattern_char == '.' && ch != '\\n') || pattern_char == ch;\n}\n\n// Helper function used by ValidateRegex() to format error messages.\nstd::string FormatRegexSyntaxError(const char* regex, int index) {\n  return (Message() << \"Syntax error at index \" << index\n          << \" in simple regular expression \\\"\" << regex << \"\\\": \").GetString();\n}\n\n// Generates non-fatal failures and returns false if regex is invalid;\n// otherwise returns true.\nbool ValidateRegex(const char* regex) {\n  if (regex == NULL) {\n    // TODO(wan@google.com): fix the source file location in the\n    // assertion failures to match where the regex is used in user\n    // code.\n    ADD_FAILURE() << \"NULL is not a valid simple regular expression.\";\n    return false;\n  }\n\n  bool is_valid = true;\n\n  // True iff ?, *, or + can follow the previous atom.\n  bool prev_repeatable = false;\n  for (int i = 0; regex[i]; i++) {\n    if (regex[i] == '\\\\') {  // An escape sequence\n      i++;\n      if (regex[i] == '\\0') {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)\n                      << \"'\\\\' cannot appear at the end.\";\n        return false;\n      }\n\n      if (!IsValidEscape(regex[i])) {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1)\n                      << \"invalid escape sequence \\\"\\\\\" << regex[i] << \"\\\".\";\n        is_valid = false;\n      }\n      prev_repeatable = true;\n    } else {  // Not an escape sequence.\n      const char ch = regex[i];\n\n      if (ch == '^' && i > 0) {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i)\n                      << \"'^' can only appear at the beginning.\";\n        is_valid = false;\n      } else if (ch == '$' && regex[i + 1] != '\\0') {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i)\n                      << \"'$' can only appear at the end.\";\n        is_valid = false;\n      } else if (IsInSet(ch, \"()[]{}|\")) {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i)\n                      << \"'\" << ch << \"' is unsupported.\";\n        is_valid = false;\n      } else if (IsRepeat(ch) && !prev_repeatable) {\n        ADD_FAILURE() << FormatRegexSyntaxError(regex, i)\n                      << \"'\" << ch << \"' can only follow a repeatable token.\";\n        is_valid = false;\n      }\n\n      prev_repeatable = !IsInSet(ch, \"^$?*+\");\n    }\n  }\n\n  return is_valid;\n}\n\n// Matches a repeated regex atom followed by a valid simple regular\n// expression.  The regex atom is defined as c if escaped is false,\n// or \\c otherwise.  repeat is the repetition meta character (?, *,\n// or +).  The behavior is undefined if str contains too many\n// characters to be indexable by size_t, in which case the test will\n// probably time out anyway.  We are fine with this limitation as\n// std::string has it too.\nbool MatchRepetitionAndRegexAtHead(\n    bool escaped, char c, char repeat, const char* regex,\n    const char* str) {\n  const size_t min_count = (repeat == '+') ? 1 : 0;\n  const size_t max_count = (repeat == '?') ? 1 :\n      static_cast<size_t>(-1) - 1;\n  // We cannot call numeric_limits::max() as it conflicts with the\n  // max() macro on Windows.\n\n  for (size_t i = 0; i <= max_count; ++i) {\n    // We know that the atom matches each of the first i characters in str.\n    if (i >= min_count && MatchRegexAtHead(regex, str + i)) {\n      // We have enough matches at the head, and the tail matches too.\n      // Since we only care about *whether* the pattern matches str\n      // (as opposed to *how* it matches), there is no need to find a\n      // greedy match.\n      return true;\n    }\n    if (str[i] == '\\0' || !AtomMatchesChar(escaped, c, str[i]))\n      return false;\n  }\n  return false;\n}\n\n// Returns true iff regex matches a prefix of str.  regex must be a\n// valid simple regular expression and not start with \"^\", or the\n// result is undefined.\nbool MatchRegexAtHead(const char* regex, const char* str) {\n  if (*regex == '\\0')  // An empty regex matches a prefix of anything.\n    return true;\n\n  // \"$\" only matches the end of a string.  Note that regex being\n  // valid guarantees that there's nothing after \"$\" in it.\n  if (*regex == '$')\n    return *str == '\\0';\n\n  // Is the first thing in regex an escape sequence?\n  const bool escaped = *regex == '\\\\';\n  if (escaped)\n    ++regex;\n  if (IsRepeat(regex[1])) {\n    // MatchRepetitionAndRegexAtHead() calls MatchRegexAtHead(), so\n    // here's an indirect recursion.  It terminates as the regex gets\n    // shorter in each recursion.\n    return MatchRepetitionAndRegexAtHead(\n        escaped, regex[0], regex[1], regex + 2, str);\n  } else {\n    // regex isn't empty, isn't \"$\", and doesn't start with a\n    // repetition.  We match the first atom of regex with the first\n    // character of str and recurse.\n    return (*str != '\\0') && AtomMatchesChar(escaped, *regex, *str) &&\n        MatchRegexAtHead(regex + 1, str + 1);\n  }\n}\n\n// Returns true iff regex matches any substring of str.  regex must be\n// a valid simple regular expression, or the result is undefined.\n//\n// The algorithm is recursive, but the recursion depth doesn't exceed\n// the regex length, so we won't need to worry about running out of\n// stack space normally.  In rare cases the time complexity can be\n// exponential with respect to the regex length + the string length,\n// but usually it's must faster (often close to linear).\nbool MatchRegexAnywhere(const char* regex, const char* str) {\n  if (regex == NULL || str == NULL)\n    return false;\n\n  if (*regex == '^')\n    return MatchRegexAtHead(regex + 1, str);\n\n  // A successful match can be anywhere in str.\n  do {\n    if (MatchRegexAtHead(regex, str))\n      return true;\n  } while (*str++ != '\\0');\n  return false;\n}\n\n// Implements the RE class.\n\nRE::~RE() {\n  free(const_cast<char*>(pattern_));\n  free(const_cast<char*>(full_pattern_));\n}\n\n// Returns true iff regular expression re matches the entire str.\nbool RE::FullMatch(const char* str, const RE& re) {\n  return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str);\n}\n\n// Returns true iff regular expression re matches a substring of str\n// (including str itself).\nbool RE::PartialMatch(const char* str, const RE& re) {\n  return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str);\n}\n\n// Initializes an RE from its string representation.\nvoid RE::Init(const char* regex) {\n  pattern_ = full_pattern_ = NULL;\n  if (regex != NULL) {\n    pattern_ = posix::StrDup(regex);\n  }\n\n  is_valid_ = ValidateRegex(regex);\n  if (!is_valid_) {\n    // No need to calculate the full pattern when the regex is invalid.\n    return;\n  }\n\n  const size_t len = strlen(regex);\n  // Reserves enough bytes to hold the regular expression used for a\n  // full match: we need space to prepend a '^', append a '$', and\n  // terminate the string with '\\0'.\n  char* buffer = static_cast<char*>(malloc(len + 3));\n  full_pattern_ = buffer;\n\n  if (*regex != '^')\n    *buffer++ = '^';  // Makes sure full_pattern_ starts with '^'.\n\n  // We don't use snprintf or strncpy, as they trigger a warning when\n  // compiled with VC++ 8.0.\n  memcpy(buffer, regex, len);\n  buffer += len;\n\n  if (len == 0 || regex[len - 1] != '$')\n    *buffer++ = '$';  // Makes sure full_pattern_ ends with '$'.\n\n  *buffer = '\\0';\n}\n\n#endif  // GTEST_USES_POSIX_RE\n\nconst char kUnknownFile[] = \"unknown file\";\n\n// Formats a source file path and a line number as they would appear\n// in an error message from the compiler used to compile this code.\nGTEST_API_ ::std::string FormatFileLocation(const char* file, int line) {\n  const std::string file_name(file == NULL ? kUnknownFile : file);\n\n  if (line < 0) {\n    return file_name + \":\";\n  }\n#ifdef _MSC_VER\n  return file_name + \"(\" + StreamableToString(line) + \"):\";\n#else\n  return file_name + \":\" + StreamableToString(line) + \":\";\n#endif  // _MSC_VER\n}\n\n// Formats a file location for compiler-independent XML output.\n// Although this function is not platform dependent, we put it next to\n// FormatFileLocation in order to contrast the two functions.\n// Note that FormatCompilerIndependentFileLocation() does NOT append colon\n// to the file location it produces, unlike FormatFileLocation().\nGTEST_API_ ::std::string FormatCompilerIndependentFileLocation(\n    const char* file, int line) {\n  const std::string file_name(file == NULL ? kUnknownFile : file);\n\n  if (line < 0)\n    return file_name;\n  else\n    return file_name + \":\" + StreamableToString(line);\n}\n\n\nGTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)\n    : severity_(severity) {\n  const char* const marker =\n      severity == GTEST_INFO ?    \"[  INFO ]\" :\n      severity == GTEST_WARNING ? \"[WARNING]\" :\n      severity == GTEST_ERROR ?   \"[ ERROR ]\" : \"[ FATAL ]\";\n  GetStream() << ::std::endl << marker << \" \"\n              << FormatFileLocation(file, line).c_str() << \": \";\n}\n\n// Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.\nGTestLog::~GTestLog() {\n  GetStream() << ::std::endl;\n  if (severity_ == GTEST_FATAL) {\n    fflush(stderr);\n    posix::Abort();\n  }\n}\n// Disable Microsoft deprecation warnings for POSIX functions called from\n// this class (creat, dup, dup2, and close)\n#ifdef _MSC_VER\n# pragma warning(push)\n# pragma warning(disable: 4996)\n#endif  // _MSC_VER\n\n#if GTEST_HAS_STREAM_REDIRECTION\n\n// Object that captures an output stream (stdout/stderr).\nclass CapturedStream {\n public:\n  // The ctor redirects the stream to a temporary file.\n  explicit CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {\n# if GTEST_OS_WINDOWS\n    char temp_dir_path[MAX_PATH + 1] = { '\\0' };  // NOLINT\n    char temp_file_path[MAX_PATH + 1] = { '\\0' };  // NOLINT\n\n    ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path);\n    const UINT success = ::GetTempFileNameA(temp_dir_path,\n                                            \"gtest_redir\",\n                                            0,  // Generate unique file name.\n                                            temp_file_path);\n    GTEST_CHECK_(success != 0)\n        << \"Unable to create a temporary file in \" << temp_dir_path;\n    const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE);\n    GTEST_CHECK_(captured_fd != -1) << \"Unable to open temporary file \"\n                                    << temp_file_path;\n    filename_ = temp_file_path;\n# else\n    // There's no guarantee that a test has write access to the current\n    // directory, so we create the temporary file in the /tmp directory\n    // instead. We use /tmp on most systems, and /sdcard on Android.\n    // That's because Android doesn't have /tmp.\n#  if GTEST_OS_LINUX_ANDROID\n    // Note: Android applications are expected to call the framework's\n    // Context.getExternalStorageDirectory() method through JNI to get\n    // the location of the world-writable SD Card directory. However,\n    // this requires a Context handle, which cannot be retrieved\n    // globally from native code. Doing so also precludes running the\n    // code as part of a regular standalone executable, which doesn't\n    // run in a Dalvik process (e.g. when running it through 'adb shell').\n    //\n    // The location /sdcard is directly accessible from native code\n    // and is the only location (unofficially) supported by the Android\n    // team. It's generally a symlink to the real SD Card mount point\n    // which can be /mnt/sdcard, /mnt/sdcard0, /system/media/sdcard, or\n    // other OEM-customized locations. Never rely on these, and always\n    // use /sdcard.\n    char name_template[] = \"/sdcard/gtest_captured_stream.XXXXXX\";\n#  else\n    char name_template[] = \"/tmp/captured_stream.XXXXXX\";\n#  endif  // GTEST_OS_LINUX_ANDROID\n    const int captured_fd = mkstemp(name_template);\n    filename_ = name_template;\n# endif  // GTEST_OS_WINDOWS\n    fflush(NULL);\n    dup2(captured_fd, fd_);\n    close(captured_fd);\n  }\n\n  ~CapturedStream() {\n    remove(filename_.c_str());\n  }\n\n  std::string GetCapturedString() {\n    if (uncaptured_fd_ != -1) {\n      // Restores the original stream.\n      fflush(NULL);\n      dup2(uncaptured_fd_, fd_);\n      close(uncaptured_fd_);\n      uncaptured_fd_ = -1;\n    }\n\n    FILE* const file = posix::FOpen(filename_.c_str(), \"r\");\n    const std::string content = ReadEntireFile(file);\n    posix::FClose(file);\n    return content;\n  }\n\n private:\n  // Reads the entire content of a file as an std::string.\n  static std::string ReadEntireFile(FILE* file);\n\n  // Returns the size (in bytes) of a file.\n  static size_t GetFileSize(FILE* file);\n\n  const int fd_;  // A stream to capture.\n  int uncaptured_fd_;\n  // Name of the temporary file holding the stderr output.\n  ::std::string filename_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(CapturedStream);\n};\n\n// Returns the size (in bytes) of a file.\nsize_t CapturedStream::GetFileSize(FILE* file) {\n  fseek(file, 0, SEEK_END);\n  return static_cast<size_t>(ftell(file));\n}\n\n// Reads the entire content of a file as a string.\nstd::string CapturedStream::ReadEntireFile(FILE* file) {\n  const size_t file_size = GetFileSize(file);\n  char* const buffer = new char[file_size];\n\n  size_t bytes_last_read = 0;  // # of bytes read in the last fread()\n  size_t bytes_read = 0;       // # of bytes read so far\n\n  fseek(file, 0, SEEK_SET);\n\n  // Keeps reading the file until we cannot read further or the\n  // pre-determined file size is reached.\n  do {\n    bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file);\n    bytes_read += bytes_last_read;\n  } while (bytes_last_read > 0 && bytes_read < file_size);\n\n  const std::string content(buffer, bytes_read);\n  delete[] buffer;\n\n  return content;\n}\n\n# ifdef _MSC_VER\n#  pragma warning(pop)\n# endif  // _MSC_VER\n\nstatic CapturedStream* g_captured_stderr = NULL;\nstatic CapturedStream* g_captured_stdout = NULL;\n\n// Starts capturing an output stream (stdout/stderr).\nvoid CaptureStream(int fd, const char* stream_name, CapturedStream** stream) {\n  if (*stream != NULL) {\n    GTEST_LOG_(FATAL) << \"Only one \" << stream_name\n                      << \" capturer can exist at a time.\";\n  }\n  *stream = new CapturedStream(fd);\n}\n\n// Stops capturing the output stream and returns the captured string.\nstd::string GetCapturedStream(CapturedStream** captured_stream) {\n  const std::string content = (*captured_stream)->GetCapturedString();\n\n  delete *captured_stream;\n  *captured_stream = NULL;\n\n  return content;\n}\n\n// Starts capturing stdout.\nvoid CaptureStdout() {\n  CaptureStream(kStdOutFileno, \"stdout\", &g_captured_stdout);\n}\n\n// Starts capturing stderr.\nvoid CaptureStderr() {\n  CaptureStream(kStdErrFileno, \"stderr\", &g_captured_stderr);\n}\n\n// Stops capturing stdout and returns the captured string.\nstd::string GetCapturedStdout() {\n  return GetCapturedStream(&g_captured_stdout);\n}\n\n// Stops capturing stderr and returns the captured string.\nstd::string GetCapturedStderr() {\n  return GetCapturedStream(&g_captured_stderr);\n}\n\n#endif  // GTEST_HAS_STREAM_REDIRECTION\n\n#if GTEST_HAS_DEATH_TEST\n\n// A copy of all command line arguments.  Set by InitGoogleTest().\n::std::vector<testing::internal::string> g_argvs;\n\nstatic const ::std::vector<testing::internal::string>* g_injected_test_argvs =\n                                        NULL;  // Owned.\n\nvoid SetInjectableArgvs(const ::std::vector<testing::internal::string>* argvs) {\n  if (g_injected_test_argvs != argvs)\n    delete g_injected_test_argvs;\n  g_injected_test_argvs = argvs;\n}\n\nconst ::std::vector<testing::internal::string>& GetInjectableArgvs() {\n  if (g_injected_test_argvs != NULL) {\n    return *g_injected_test_argvs;\n  }\n  return g_argvs;\n}\n#endif  // GTEST_HAS_DEATH_TEST\n\n#if GTEST_OS_WINDOWS_MOBILE\nnamespace posix {\nvoid Abort() {\n  DebugBreak();\n  TerminateProcess(GetCurrentProcess(), 1);\n}\n}  // namespace posix\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n// Returns the name of the environment variable corresponding to the\n// given flag.  For example, FlagToEnvVar(\"foo\") will return\n// \"GTEST_FOO\" in the open-source version.\nstatic std::string FlagToEnvVar(const char* flag) {\n  const std::string full_flag =\n      (Message() << GTEST_FLAG_PREFIX_ << flag).GetString();\n\n  Message env_var;\n  for (size_t i = 0; i != full_flag.length(); i++) {\n    env_var << ToUpper(full_flag.c_str()[i]);\n  }\n\n  return env_var.GetString();\n}\n\n// Parses 'str' for a 32-bit signed integer.  If successful, writes\n// the result to *value and returns true; otherwise leaves *value\n// unchanged and returns false.\nbool ParseInt32(const Message& src_text, const char* str, Int32* value) {\n  // Parses the environment variable as a decimal integer.\n  char* end = NULL;\n  const long long_value = strtol(str, &end, 10);  // NOLINT\n\n  // Has strtol() consumed all characters in the string?\n  if (*end != '\\0') {\n    // No - an invalid character was encountered.\n    Message msg;\n    msg << \"WARNING: \" << src_text\n        << \" is expected to be a 32-bit integer, but actually\"\n        << \" has value \\\"\" << str << \"\\\".\\n\";\n    printf(\"%s\", msg.GetString().c_str());\n    fflush(stdout);\n    return false;\n  }\n\n  // Is the parsed value in the range of an Int32?\n  const Int32 result = static_cast<Int32>(long_value);\n  if (long_value == LONG_MAX || long_value == LONG_MIN ||\n      // The parsed value overflows as a long.  (strtol() returns\n      // LONG_MAX or LONG_MIN when the input overflows.)\n      result != long_value\n      // The parsed value overflows as an Int32.\n      ) {\n    Message msg;\n    msg << \"WARNING: \" << src_text\n        << \" is expected to be a 32-bit integer, but actually\"\n        << \" has value \" << str << \", which overflows.\\n\";\n    printf(\"%s\", msg.GetString().c_str());\n    fflush(stdout);\n    return false;\n  }\n\n  *value = result;\n  return true;\n}\n\n// Reads and returns the Boolean environment variable corresponding to\n// the given flag; if it's not set, returns default_value.\n//\n// The value is considered true iff it's not \"0\".\nbool BoolFromGTestEnv(const char* flag, bool default_value) {\n  const std::string env_var = FlagToEnvVar(flag);\n  const char* const string_value = posix::GetEnv(env_var.c_str());\n  return string_value == NULL ?\n      default_value : strcmp(string_value, \"0\") != 0;\n}\n\n// Reads and returns a 32-bit integer stored in the environment\n// variable corresponding to the given flag; if it isn't set or\n// doesn't represent a valid 32-bit integer, returns default_value.\nInt32 Int32FromGTestEnv(const char* flag, Int32 default_value) {\n  const std::string env_var = FlagToEnvVar(flag);\n  const char* const string_value = posix::GetEnv(env_var.c_str());\n  if (string_value == NULL) {\n    // The environment variable is not set.\n    return default_value;\n  }\n\n  Int32 result = default_value;\n  if (!ParseInt32(Message() << \"Environment variable \" << env_var,\n                  string_value, &result)) {\n    printf(\"The default value %s is used.\\n\",\n           (Message() << default_value).GetString().c_str());\n    fflush(stdout);\n    return default_value;\n  }\n\n  return result;\n}\n\n// Reads and returns the string environment variable corresponding to\n// the given flag; if it's not set, returns default_value.\nconst char* StringFromGTestEnv(const char* flag, const char* default_value) {\n  const std::string env_var = FlagToEnvVar(flag);\n  const char* const value = posix::GetEnv(env_var.c_str());\n  return value == NULL ? default_value : value;\n}\n\n}  // namespace internal\n}  // namespace testing\n"
  },
  {
    "path": "src/madness/external/gtest/src/gtest-printers.cc",
    "content": "// Copyright 2007, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n\n// Google Test - The Google C++ Testing Framework\n//\n// This file implements a universal value printer that can print a\n// value of any type T:\n//\n//   void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);\n//\n// It uses the << operator when possible, and prints the bytes in the\n// object otherwise.  A user can override its behavior for a class\n// type Foo by defining either operator<<(::std::ostream&, const Foo&)\n// or void PrintTo(const Foo&, ::std::ostream*) in the namespace that\n// defines Foo.\n\n#include \"gtest/gtest-printers.h\"\n#include <ctype.h>\n#include <stdio.h>\n#include <ostream>  // NOLINT\n#include <string>\n#include \"gtest/internal/gtest-port.h\"\n\nnamespace testing {\n\nnamespace {\n\nusing ::std::ostream;\n\n// Prints a segment of bytes in the given object.\nvoid PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start,\n                                size_t count, ostream* os) {\n  char text[5] = \"\";\n  for (size_t i = 0; i != count; i++) {\n    const size_t j = start + i;\n    if (i != 0) {\n      // Organizes the bytes into groups of 2 for easy parsing by\n      // human.\n      if ((j % 2) == 0)\n        *os << ' ';\n      else\n        *os << '-';\n    }\n    GTEST_SNPRINTF_(text, sizeof(text), \"%02X\", obj_bytes[j]);\n    *os << text;\n  }\n}\n\n// Prints the bytes in the given value to the given ostream.\nvoid PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,\n                              ostream* os) {\n  // Tells the user how big the object is.\n  *os << count << \"-byte object <\";\n\n  const size_t kThreshold = 132;\n  const size_t kChunkSize = 64;\n  // If the object size is bigger than kThreshold, we'll have to omit\n  // some details by printing only the first and the last kChunkSize\n  // bytes.\n  // TODO(wan): let the user control the threshold using a flag.\n  if (count < kThreshold) {\n    PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);\n  } else {\n    PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os);\n    *os << \" ... \";\n    // Rounds up to 2-byte boundary.\n    const size_t resume_pos = (count - kChunkSize + 1)/2*2;\n    PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os);\n  }\n  *os << \">\";\n}\n\n}  // namespace\n\nnamespace internal2 {\n\n// Delegates to PrintBytesInObjectToImpl() to print the bytes in the\n// given object.  The delegation simplifies the implementation, which\n// uses the << operator and thus is easier done outside of the\n// ::testing::internal namespace, which contains a << operator that\n// sometimes conflicts with the one in STL.\nvoid PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count,\n                          ostream* os) {\n  PrintBytesInObjectToImpl(obj_bytes, count, os);\n}\n\n}  // namespace internal2\n\nnamespace internal {\n\n// Depending on the value of a char (or wchar_t), we print it in one\n// of three formats:\n//   - as is if it's a printable ASCII (e.g. 'a', '2', ' '),\n//   - as a hexidecimal escape sequence (e.g. '\\x7F'), or\n//   - as a special escape sequence (e.g. '\\r', '\\n').\nenum CharFormat {\n  kAsIs,\n  kHexEscape,\n  kSpecialEscape\n};\n\n// Returns true if c is a printable ASCII character.  We test the\n// value of c directly instead of calling isprint(), which is buggy on\n// Windows Mobile.\ninline bool IsPrintableAscii(wchar_t c) {\n  return 0x20 <= c && c <= 0x7E;\n}\n\n// Prints a wide or narrow char c as a character literal without the\n// quotes, escaping it when necessary; returns how c was formatted.\n// The template argument UnsignedChar is the unsigned version of Char,\n// which is the type of c.\ntemplate <typename UnsignedChar, typename Char>\nstatic CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {\n  switch (static_cast<wchar_t>(c)) {\n    case L'\\0':\n      *os << \"\\\\0\";\n      break;\n    case L'\\'':\n      *os << \"\\\\'\";\n      break;\n    case L'\\\\':\n      *os << \"\\\\\\\\\";\n      break;\n    case L'\\a':\n      *os << \"\\\\a\";\n      break;\n    case L'\\b':\n      *os << \"\\\\b\";\n      break;\n    case L'\\f':\n      *os << \"\\\\f\";\n      break;\n    case L'\\n':\n      *os << \"\\\\n\";\n      break;\n    case L'\\r':\n      *os << \"\\\\r\";\n      break;\n    case L'\\t':\n      *os << \"\\\\t\";\n      break;\n    case L'\\v':\n      *os << \"\\\\v\";\n      break;\n    default:\n      if (IsPrintableAscii(c)) {\n        *os << static_cast<char>(c);\n        return kAsIs;\n      } else {\n        *os << \"\\\\x\" + String::FormatHexInt(static_cast<UnsignedChar>(c));\n        return kHexEscape;\n      }\n  }\n  return kSpecialEscape;\n}\n\n// Prints a wchar_t c as if it's part of a string literal, escaping it when\n// necessary; returns how c was formatted.\nstatic CharFormat PrintAsStringLiteralTo(wchar_t c, ostream* os) {\n  switch (c) {\n    case L'\\'':\n      *os << \"'\";\n      return kAsIs;\n    case L'\"':\n      *os << \"\\\\\\\"\";\n      return kSpecialEscape;\n    default:\n      return PrintAsCharLiteralTo<wchar_t>(c, os);\n  }\n}\n\n// Prints a char c as if it's part of a string literal, escaping it when\n// necessary; returns how c was formatted.\nstatic CharFormat PrintAsStringLiteralTo(char c, ostream* os) {\n  return PrintAsStringLiteralTo(\n      static_cast<wchar_t>(static_cast<unsigned char>(c)), os);\n}\n\n// Prints a wide or narrow character c and its code.  '\\0' is printed\n// as \"'\\\\0'\", other unprintable characters are also properly escaped\n// using the standard C++ escape sequence.  The template argument\n// UnsignedChar is the unsigned version of Char, which is the type of c.\ntemplate <typename UnsignedChar, typename Char>\nvoid PrintCharAndCodeTo(Char c, ostream* os) {\n  // First, print c as a literal in the most readable form we can find.\n  *os << ((sizeof(c) > 1) ? \"L'\" : \"'\");\n  const CharFormat format = PrintAsCharLiteralTo<UnsignedChar>(c, os);\n  *os << \"'\";\n\n  // To aid user debugging, we also print c's code in decimal, unless\n  // it's 0 (in which case c was printed as '\\\\0', making the code\n  // obvious).\n  if (c == 0)\n    return;\n  *os << \" (\" << static_cast<int>(c);\n\n  // For more convenience, we print c's code again in hexidecimal,\n  // unless c was already printed in the form '\\x##' or the code is in\n  // [1, 9].\n  if (format == kHexEscape || (1 <= c && c <= 9)) {\n    // Do nothing.\n  } else {\n    *os << \", 0x\" << String::FormatHexInt(static_cast<UnsignedChar>(c));\n  }\n  *os << \")\";\n}\n\nvoid PrintTo(unsigned char c, ::std::ostream* os) {\n  PrintCharAndCodeTo<unsigned char>(c, os);\n}\nvoid PrintTo(signed char c, ::std::ostream* os) {\n  PrintCharAndCodeTo<unsigned char>(c, os);\n}\n\n// Prints a wchar_t as a symbol if it is printable or as its internal\n// code otherwise and also as its code.  L'\\0' is printed as \"L'\\\\0'\".\nvoid PrintTo(wchar_t wc, ostream* os) {\n  PrintCharAndCodeTo<wchar_t>(wc, os);\n}\n\n// Prints the given array of characters to the ostream.  CharType must be either\n// char or wchar_t.\n// The array starts at begin, the length is len, it may include '\\0' characters\n// and may not be NUL-terminated.\ntemplate <typename CharType>\nstatic void PrintCharsAsStringTo(\n    const CharType* begin, size_t len, ostream* os) {\n  const char* const kQuoteBegin = sizeof(CharType) == 1 ? \"\\\"\" : \"L\\\"\";\n  *os << kQuoteBegin;\n  bool is_previous_hex = false;\n  for (size_t index = 0; index < len; ++index) {\n    const CharType cur = begin[index];\n    if (is_previous_hex && IsXDigit(cur)) {\n      // Previous character is of '\\x..' form and this character can be\n      // interpreted as another hexadecimal digit in its number. Break string to\n      // disambiguate.\n      *os << \"\\\" \" << kQuoteBegin;\n    }\n    is_previous_hex = PrintAsStringLiteralTo(cur, os) == kHexEscape;\n  }\n  *os << \"\\\"\";\n}\n\n// Prints a (const) char/wchar_t array of 'len' elements, starting at address\n// 'begin'.  CharType must be either char or wchar_t.\ntemplate <typename CharType>\nstatic void UniversalPrintCharArray(\n    const CharType* begin, size_t len, ostream* os) {\n  // The code\n  //   const char kFoo[] = \"foo\";\n  // generates an array of 4, not 3, elements, with the last one being '\\0'.\n  //\n  // Therefore when printing a char array, we don't print the last element if\n  // it's '\\0', such that the output matches the string literal as it's\n  // written in the source code.\n  if (len > 0 && begin[len - 1] == '\\0') {\n    PrintCharsAsStringTo(begin, len - 1, os);\n    return;\n  }\n\n  // If, however, the last element in the array is not '\\0', e.g.\n  //    const char kFoo[] = { 'f', 'o', 'o' };\n  // we must print the entire array.  We also print a message to indicate\n  // that the array is not NUL-terminated.\n  PrintCharsAsStringTo(begin, len, os);\n  *os << \" (no terminating NUL)\";\n}\n\n// Prints a (const) char array of 'len' elements, starting at address 'begin'.\nvoid UniversalPrintArray(const char* begin, size_t len, ostream* os) {\n  UniversalPrintCharArray(begin, len, os);\n}\n\n// Prints a (const) wchar_t array of 'len' elements, starting at address\n// 'begin'.\nvoid UniversalPrintArray(const wchar_t* begin, size_t len, ostream* os) {\n  UniversalPrintCharArray(begin, len, os);\n}\n\n// Prints the given C string to the ostream.\nvoid PrintTo(const char* s, ostream* os) {\n  if (s == NULL) {\n    *os << \"NULL\";\n  } else {\n    *os << ImplicitCast_<const void*>(s) << \" pointing to \";\n    PrintCharsAsStringTo(s, strlen(s), os);\n  }\n}\n\n// MSVC compiler can be configured to define whar_t as a typedef\n// of unsigned short. Defining an overload for const wchar_t* in that case\n// would cause pointers to unsigned shorts be printed as wide strings,\n// possibly accessing more memory than intended and causing invalid\n// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when\n// wchar_t is implemented as a native type.\n#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)\n// Prints the given wide C string to the ostream.\nvoid PrintTo(const wchar_t* s, ostream* os) {\n  if (s == NULL) {\n    *os << \"NULL\";\n  } else {\n    *os << ImplicitCast_<const void*>(s) << \" pointing to \";\n    PrintCharsAsStringTo(s, wcslen(s), os);\n  }\n}\n#endif  // wchar_t is native\n\n// Prints a ::string object.\n#if GTEST_HAS_GLOBAL_STRING\nvoid PrintStringTo(const ::string& s, ostream* os) {\n  PrintCharsAsStringTo(s.data(), s.size(), os);\n}\n#endif  // GTEST_HAS_GLOBAL_STRING\n\nvoid PrintStringTo(const ::std::string& s, ostream* os) {\n  PrintCharsAsStringTo(s.data(), s.size(), os);\n}\n\n// Prints a ::wstring object.\n#if GTEST_HAS_GLOBAL_WSTRING\nvoid PrintWideStringTo(const ::wstring& s, ostream* os) {\n  PrintCharsAsStringTo(s.data(), s.size(), os);\n}\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n#if GTEST_HAS_STD_WSTRING\nvoid PrintWideStringTo(const ::std::wstring& s, ostream* os) {\n  PrintCharsAsStringTo(s.data(), s.size(), os);\n}\n#endif  // GTEST_HAS_STD_WSTRING\n\n}  // namespace internal\n\n}  // namespace testing\n"
  },
  {
    "path": "src/madness/external/gtest/src/gtest-test-part.cc",
    "content": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: mheule@google.com (Markus Heule)\n//\n// The Google C++ Testing Framework (Google Test)\n\n#include \"gtest/gtest-test-part.h\"\n\n// Indicates that this translation unit is part of Google Test's\n// implementation.  It must come before gtest-internal-inl.h is\n// included, or there will be a compiler error.  This trick is to\n// prevent a user from accidentally including gtest-internal-inl.h in\n// his code.\n#define GTEST_IMPLEMENTATION_ 1\n#include \"src/gtest-internal-inl.h\"\n#undef GTEST_IMPLEMENTATION_\n\nnamespace testing {\n\nusing internal::GetUnitTestImpl;\n\n// Gets the summary of the failure message by omitting the stack trace\n// in it.\nstd::string TestPartResult::ExtractSummary(const char* message) {\n  const char* const stack_trace = strstr(message, internal::kStackTraceMarker);\n  return stack_trace == NULL ? message :\n      std::string(message, stack_trace);\n}\n\n// Prints a TestPartResult object.\nstd::ostream& operator<<(std::ostream& os, const TestPartResult& result) {\n  return os\n      << result.file_name() << \":\" << result.line_number() << \": \"\n      << (result.type() == TestPartResult::kSuccess ? \"Success\" :\n          result.type() == TestPartResult::kFatalFailure ? \"Fatal failure\" :\n          \"Non-fatal failure\") << \":\\n\"\n      << result.message() << std::endl;\n}\n\n// Appends a TestPartResult to the array.\nvoid TestPartResultArray::Append(const TestPartResult& result) {\n  array_.push_back(result);\n}\n\n// Returns the TestPartResult at the given index (0-based).\nconst TestPartResult& TestPartResultArray::GetTestPartResult(int index) const {\n  if (index < 0 || index >= size()) {\n    printf(\"\\nInvalid index (%d) into TestPartResultArray.\\n\", index);\n    internal::posix::Abort();\n  }\n\n  return array_[index];\n}\n\n// Returns the number of TestPartResult objects in the array.\nint TestPartResultArray::size() const {\n  return static_cast<int>(array_.size());\n}\n\nnamespace internal {\n\nHasNewFatalFailureHelper::HasNewFatalFailureHelper()\n    : has_new_fatal_failure_(false),\n      original_reporter_(GetUnitTestImpl()->\n                         GetTestPartResultReporterForCurrentThread()) {\n  GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this);\n}\n\nHasNewFatalFailureHelper::~HasNewFatalFailureHelper() {\n  GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(\n      original_reporter_);\n}\n\nvoid HasNewFatalFailureHelper::ReportTestPartResult(\n    const TestPartResult& result) {\n  if (result.fatally_failed())\n    has_new_fatal_failure_ = true;\n  original_reporter_->ReportTestPartResult(result);\n}\n\n}  // namespace internal\n\n}  // namespace testing\n"
  },
  {
    "path": "src/madness/external/gtest/src/gtest-typed-test.cc",
    "content": "// Copyright 2008 Google Inc.\n// All Rights Reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n\n#include \"gtest/gtest-typed-test.h\"\n#include \"gtest/gtest.h\"\n\nnamespace testing {\nnamespace internal {\n\n#if GTEST_HAS_TYPED_TEST_P\n\n// Skips to the first non-space char in str. Returns an empty string if str\n// contains only whitespace characters.\nstatic const char* SkipSpaces(const char* str) {\n  while (IsSpace(*str))\n    str++;\n  return str;\n}\n\n// Verifies that registered_tests match the test names in\n// defined_test_names_; returns registered_tests if successful, or\n// aborts the program otherwise.\nconst char* TypedTestCasePState::VerifyRegisteredTestNames(\n    const char* file, int line, const char* registered_tests) {\n  typedef ::std::set<const char*>::const_iterator DefinedTestIter;\n  registered_ = true;\n\n  // Skip initial whitespace in registered_tests since some\n  // preprocessors prefix stringizied literals with whitespace.\n  registered_tests = SkipSpaces(registered_tests);\n\n  Message errors;\n  ::std::set<std::string> tests;\n  for (const char* names = registered_tests; names != NULL;\n       names = SkipComma(names)) {\n    const std::string name = GetPrefixUntilComma(names);\n    if (tests.count(name) != 0) {\n      errors << \"Test \" << name << \" is listed more than once.\\n\";\n      continue;\n    }\n\n    bool found = false;\n    for (DefinedTestIter it = defined_test_names_.begin();\n         it != defined_test_names_.end();\n         ++it) {\n      if (name == *it) {\n        found = true;\n        break;\n      }\n    }\n\n    if (found) {\n      tests.insert(name);\n    } else {\n      errors << \"No test named \" << name\n             << \" can be found in this test case.\\n\";\n    }\n  }\n\n  for (DefinedTestIter it = defined_test_names_.begin();\n       it != defined_test_names_.end();\n       ++it) {\n    if (tests.count(*it) == 0) {\n      errors << \"You forgot to list test \" << *it << \".\\n\";\n    }\n  }\n\n  const std::string& errors_str = errors.GetString();\n  if (errors_str != \"\") {\n    fprintf(stderr, \"%s %s\", FormatFileLocation(file, line).c_str(),\n            errors_str.c_str());\n    fflush(stderr);\n    posix::Abort();\n  }\n\n  return registered_tests;\n}\n\n#endif  // GTEST_HAS_TYPED_TEST_P\n\n}  // namespace internal\n}  // namespace testing\n"
  },
  {
    "path": "src/madness/external/gtest/src/gtest.cc",
    "content": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Author: wan@google.com (Zhanyong Wan)\n//\n// The Google C++ Testing Framework (Google Test)\n\n#include \"gtest/gtest.h\"\n#include \"gtest/gtest-spi.h\"\n\n#include <ctype.h>\n#include <math.h>\n#include <stdarg.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n#include <wchar.h>\n#include <wctype.h>\n\n#include <algorithm>\n#include <iomanip>\n#include <limits>\n#include <ostream>  // NOLINT\n#include <sstream>\n#include <vector>\n\n#if GTEST_OS_LINUX\n\n// TODO(kenton@google.com): Use autoconf to detect availability of\n// gettimeofday().\n# define GTEST_HAS_GETTIMEOFDAY_ 1\n\n# include <fcntl.h>  // NOLINT\n# include <limits.h>  // NOLINT\n# include <sched.h>  // NOLINT\n// Declares vsnprintf().  This header is not available on Windows.\n# include <strings.h>  // NOLINT\n# include <sys/mman.h>  // NOLINT\n# include <sys/time.h>  // NOLINT\n# include <unistd.h>  // NOLINT\n# include <string>\n\n#elif GTEST_OS_SYMBIAN\n# define GTEST_HAS_GETTIMEOFDAY_ 1\n# include <sys/time.h>  // NOLINT\n\n#elif GTEST_OS_ZOS\n# define GTEST_HAS_GETTIMEOFDAY_ 1\n# include <sys/time.h>  // NOLINT\n\n// On z/OS we additionally need strings.h for strcasecmp.\n# include <strings.h>  // NOLINT\n\n#elif GTEST_OS_WINDOWS_MOBILE  // We are on Windows CE.\n\n# include <windows.h>  // NOLINT\n\n#elif GTEST_OS_WINDOWS  // We are on Windows proper.\n\n# include <io.h>  // NOLINT\n# include <sys/timeb.h>  // NOLINT\n# include <sys/types.h>  // NOLINT\n# include <sys/stat.h>  // NOLINT\n\n# if GTEST_OS_WINDOWS_MINGW\n// MinGW has gettimeofday() but not _ftime64().\n// TODO(kenton@google.com): Use autoconf to detect availability of\n//   gettimeofday().\n// TODO(kenton@google.com): There are other ways to get the time on\n//   Windows, like GetTickCount() or GetSystemTimeAsFileTime().  MinGW\n//   supports these.  consider using them instead.\n#  define GTEST_HAS_GETTIMEOFDAY_ 1\n#  include <sys/time.h>  // NOLINT\n# endif  // GTEST_OS_WINDOWS_MINGW\n\n// cpplint thinks that the header is already included, so we want to\n// silence it.\n# include <windows.h>  // NOLINT\n\n#else\n\n// Assume other platforms have gettimeofday().\n// TODO(kenton@google.com): Use autoconf to detect availability of\n//   gettimeofday().\n# define GTEST_HAS_GETTIMEOFDAY_ 1\n\n// cpplint thinks that the header is already included, so we want to\n// silence it.\n# include <sys/time.h>  // NOLINT\n# include <unistd.h>  // NOLINT\n\n#endif  // GTEST_OS_LINUX\n\n#if GTEST_HAS_EXCEPTIONS\n# include <stdexcept>\n#endif\n\n#if GTEST_CAN_STREAM_RESULTS_\n# include <arpa/inet.h>  // NOLINT\n# include <netdb.h>  // NOLINT\n#endif\n\n// Indicates that this translation unit is part of Google Test's\n// implementation.  It must come before gtest-internal-inl.h is\n// included, or there will be a compiler error.  This trick is to\n// prevent a user from accidentally including gtest-internal-inl.h in\n// his code.\n#define GTEST_IMPLEMENTATION_ 1\n#include \"src/gtest-internal-inl.h\"\n#undef GTEST_IMPLEMENTATION_\n\n#if GTEST_OS_WINDOWS\n# define vsnprintf _vsnprintf\n#endif  // GTEST_OS_WINDOWS\n\nnamespace testing {\n\nusing internal::CountIf;\nusing internal::ForEach;\nusing internal::GetElementOr;\nusing internal::Shuffle;\n\n// Constants.\n\n// A test whose test case name or test name matches this filter is\n// disabled and not run.\nstatic const char kDisableTestFilter[] = \"DISABLED_*:*/DISABLED_*\";\n\n// A test case whose name matches this filter is considered a death\n// test case and will be run before test cases whose name doesn't\n// match this filter.\nstatic const char kDeathTestCaseFilter[] = \"*DeathTest:*DeathTest/*\";\n\n// A test filter that matches everything.\nstatic const char kUniversalFilter[] = \"*\";\n\n// The default output file for XML output.\nstatic const char kDefaultOutputFile[] = \"test_detail.xml\";\n\n// The environment variable name for the test shard index.\nstatic const char kTestShardIndex[] = \"GTEST_SHARD_INDEX\";\n// The environment variable name for the total number of test shards.\nstatic const char kTestTotalShards[] = \"GTEST_TOTAL_SHARDS\";\n// The environment variable name for the test shard status file.\nstatic const char kTestShardStatusFile[] = \"GTEST_SHARD_STATUS_FILE\";\n\nnamespace internal {\n\n// The text used in failure messages to indicate the start of the\n// stack trace.\nconst char kStackTraceMarker[] = \"\\nStack trace:\\n\";\n\n// g_help_flag is true iff the --help flag or an equivalent form is\n// specified on the command line.\nbool g_help_flag = false;\n\n}  // namespace internal\n\nstatic const char* GetDefaultFilter() {\n  return kUniversalFilter;\n}\n\nGTEST_DEFINE_bool_(\n    also_run_disabled_tests,\n    internal::BoolFromGTestEnv(\"also_run_disabled_tests\", false),\n    \"Run disabled tests too, in addition to the tests normally being run.\");\n\nGTEST_DEFINE_bool_(\n    break_on_failure,\n    internal::BoolFromGTestEnv(\"break_on_failure\", false),\n    \"True iff a failed assertion should be a debugger break-point.\");\n\nGTEST_DEFINE_bool_(\n    catch_exceptions,\n    internal::BoolFromGTestEnv(\"catch_exceptions\", true),\n    \"True iff \" GTEST_NAME_\n    \" should catch exceptions and treat them as test failures.\");\n\nGTEST_DEFINE_string_(\n    color,\n    internal::StringFromGTestEnv(\"color\", \"auto\"),\n    \"Whether to use colors in the output.  Valid values: yes, no, \"\n    \"and auto.  'auto' means to use colors if the output is \"\n    \"being sent to a terminal and the TERM environment variable \"\n    \"is set to a terminal type that supports colors.\");\n\nGTEST_DEFINE_string_(\n    filter,\n    internal::StringFromGTestEnv(\"filter\", GetDefaultFilter()),\n    \"A colon-separated list of glob (not regex) patterns \"\n    \"for filtering the tests to run, optionally followed by a \"\n    \"'-' and a : separated list of negative patterns (tests to \"\n    \"exclude).  A test is run if it matches one of the positive \"\n    \"patterns and does not match any of the negative patterns.\");\n\nGTEST_DEFINE_bool_(list_tests, false,\n                   \"List all tests without running them.\");\n\nGTEST_DEFINE_string_(\n    output,\n    internal::StringFromGTestEnv(\"output\", \"\"),\n    \"A format (currently must be \\\"xml\\\"), optionally followed \"\n    \"by a colon and an output file name or directory. A directory \"\n    \"is indicated by a trailing pathname separator. \"\n    \"Examples: \\\"xml:filename.xml\\\", \\\"xml::directoryname/\\\". \"\n    \"If a directory is specified, output files will be created \"\n    \"within that directory, with file-names based on the test \"\n    \"executable's name and, if necessary, made unique by adding \"\n    \"digits.\");\n\nGTEST_DEFINE_bool_(\n    print_time,\n    internal::BoolFromGTestEnv(\"print_time\", true),\n    \"True iff \" GTEST_NAME_\n    \" should display elapsed time in text output.\");\n\nGTEST_DEFINE_int32_(\n    random_seed,\n    internal::Int32FromGTestEnv(\"random_seed\", 0),\n    \"Random number seed to use when shuffling test orders.  Must be in range \"\n    \"[1, 99999], or 0 to use a seed based on the current time.\");\n\nGTEST_DEFINE_int32_(\n    repeat,\n    internal::Int32FromGTestEnv(\"repeat\", 1),\n    \"How many times to repeat each test.  Specify a negative number \"\n    \"for repeating forever.  Useful for shaking out flaky tests.\");\n\nGTEST_DEFINE_bool_(\n    show_internal_stack_frames, false,\n    \"True iff \" GTEST_NAME_ \" should include internal stack frames when \"\n    \"printing test failure stack traces.\");\n\nGTEST_DEFINE_bool_(\n    shuffle,\n    internal::BoolFromGTestEnv(\"shuffle\", false),\n    \"True iff \" GTEST_NAME_\n    \" should randomize tests' order on every run.\");\n\nGTEST_DEFINE_int32_(\n    stack_trace_depth,\n    internal::Int32FromGTestEnv(\"stack_trace_depth\", kMaxStackTraceDepth),\n    \"The maximum number of stack frames to print when an \"\n    \"assertion fails.  The valid range is 0 through 100, inclusive.\");\n\nGTEST_DEFINE_string_(\n    stream_result_to,\n    internal::StringFromGTestEnv(\"stream_result_to\", \"\"),\n    \"This flag specifies the host name and the port number on which to stream \"\n    \"test results. Example: \\\"localhost:555\\\". The flag is effective only on \"\n    \"Linux.\");\n\nGTEST_DEFINE_bool_(\n    throw_on_failure,\n    internal::BoolFromGTestEnv(\"throw_on_failure\", false),\n    \"When this flag is specified, a failed assertion will throw an exception \"\n    \"if exceptions are enabled or exit the program with a non-zero code \"\n    \"otherwise.\");\n\nnamespace internal {\n\n// Generates a random number from [0, range), using a Linear\n// Congruential Generator (LCG).  Crashes if 'range' is 0 or greater\n// than kMaxRange.\nUInt32 Random::Generate(UInt32 range) {\n  // These constants are the same as are used in glibc's rand(3).\n  state_ = (1103515245U*state_ + 12345U) % kMaxRange;\n\n  GTEST_CHECK_(range > 0)\n      << \"Cannot generate a number in the range [0, 0).\";\n  GTEST_CHECK_(range <= kMaxRange)\n      << \"Generation of a number in [0, \" << range << \") was requested, \"\n      << \"but this can only generate numbers in [0, \" << kMaxRange << \").\";\n\n  // Converting via modulus introduces a bit of downward bias, but\n  // it's simple, and a linear congruential generator isn't too good\n  // to begin with.\n  return state_ % range;\n}\n\n// GTestIsInitialized() returns true iff the user has initialized\n// Google Test.  Useful for catching the user mistake of not initializing\n// Google Test before calling RUN_ALL_TESTS().\n//\n// A user must call testing::InitGoogleTest() to initialize Google\n// Test.  g_init_gtest_count is set to the number of times\n// InitGoogleTest() has been called.  We don't protect this variable\n// under a mutex as it is only accessed in the main thread.\nGTEST_API_ int g_init_gtest_count = 0;\nstatic bool GTestIsInitialized() { return g_init_gtest_count != 0; }\n\n// Iterates over a vector of TestCases, keeping a running sum of the\n// results of calling a given int-returning method on each.\n// Returns the sum.\nstatic int SumOverTestCaseList(const std::vector<TestCase*>& case_list,\n                               int (TestCase::*method)() const) {\n  int sum = 0;\n  for (size_t i = 0; i < case_list.size(); i++) {\n    sum += (case_list[i]->*method)();\n  }\n  return sum;\n}\n\n// Returns true iff the test case passed.\nstatic bool TestCasePassed(const TestCase* test_case) {\n  return test_case->should_run() && test_case->Passed();\n}\n\n// Returns true iff the test case failed.\nstatic bool TestCaseFailed(const TestCase* test_case) {\n  return test_case->should_run() && test_case->Failed();\n}\n\n// Returns true iff test_case contains at least one test that should\n// run.\nstatic bool ShouldRunTestCase(const TestCase* test_case) {\n  return test_case->should_run();\n}\n\n// AssertHelper constructor.\nAssertHelper::AssertHelper(TestPartResult::Type type,\n                           const char* file,\n                           int line,\n                           const char* message)\n    : data_(new AssertHelperData(type, file, line, message)) {\n}\n\nAssertHelper::~AssertHelper() {\n  delete data_;\n}\n\n// Message assignment, for assertion streaming support.\nvoid AssertHelper::operator=(const Message& message) const {\n  UnitTest::GetInstance()->\n    AddTestPartResult(data_->type, data_->file, data_->line,\n                      AppendUserMessage(data_->message, message),\n                      UnitTest::GetInstance()->impl()\n                      ->CurrentOsStackTraceExceptTop(1)\n                      // Skips the stack frame for this function itself.\n                      );  // NOLINT\n}\n\n// Mutex for linked pointers.\nGTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex);\n\n// Application pathname gotten in InitGoogleTest.\nstd::string g_executable_path;\n\n// Returns the current application's name, removing directory path if that\n// is present.\nFilePath GetCurrentExecutableName() {\n  FilePath result;\n\n#if GTEST_OS_WINDOWS\n  result.Set(FilePath(g_executable_path).RemoveExtension(\"exe\"));\n#else\n  result.Set(FilePath(g_executable_path));\n#endif  // GTEST_OS_WINDOWS\n\n  return result.RemoveDirectoryName();\n}\n\n// Functions for processing the gtest_output flag.\n\n// Returns the output format, or \"\" for normal printed output.\nstd::string UnitTestOptions::GetOutputFormat() {\n  const char* const gtest_output_flag = GTEST_FLAG(output).c_str();\n  if (gtest_output_flag == NULL) return std::string(\"\");\n\n  const char* const colon = strchr(gtest_output_flag, ':');\n  return (colon == NULL) ?\n      std::string(gtest_output_flag) :\n      std::string(gtest_output_flag, colon - gtest_output_flag);\n}\n\n// Returns the name of the requested output file, or the default if none\n// was explicitly specified.\nstd::string UnitTestOptions::GetAbsolutePathToOutputFile() {\n  const char* const gtest_output_flag = GTEST_FLAG(output).c_str();\n  if (gtest_output_flag == NULL)\n    return \"\";\n\n  const char* const colon = strchr(gtest_output_flag, ':');\n  if (colon == NULL)\n    return internal::FilePath::ConcatPaths(\n        internal::FilePath(\n            UnitTest::GetInstance()->original_working_dir()),\n        internal::FilePath(kDefaultOutputFile)).string();\n\n  internal::FilePath output_name(colon + 1);\n  if (!output_name.IsAbsolutePath())\n    // TODO(wan@google.com): on Windows \\some\\path is not an absolute\n    // path (as its meaning depends on the current drive), yet the\n    // following logic for turning it into an absolute path is wrong.\n    // Fix it.\n    output_name = internal::FilePath::ConcatPaths(\n        internal::FilePath(UnitTest::GetInstance()->original_working_dir()),\n        internal::FilePath(colon + 1));\n\n  if (!output_name.IsDirectory())\n    return output_name.string();\n\n  internal::FilePath result(internal::FilePath::GenerateUniqueFileName(\n      output_name, internal::GetCurrentExecutableName(),\n      GetOutputFormat().c_str()));\n  return result.string();\n}\n\n// Returns true iff the wildcard pattern matches the string.  The\n// first ':' or '\\0' character in pattern marks the end of it.\n//\n// This recursive algorithm isn't very efficient, but is clear and\n// works well enough for matching test names, which are short.\nbool UnitTestOptions::PatternMatchesString(const char *pattern,\n                                           const char *str) {\n  switch (*pattern) {\n    case '\\0':\n    case ':':  // Either ':' or '\\0' marks the end of the pattern.\n      return *str == '\\0';\n    case '?':  // Matches any single character.\n      return *str != '\\0' && PatternMatchesString(pattern + 1, str + 1);\n    case '*':  // Matches any string (possibly empty) of characters.\n      return (*str != '\\0' && PatternMatchesString(pattern, str + 1)) ||\n          PatternMatchesString(pattern + 1, str);\n    default:  // Non-special character.  Matches itself.\n      return *pattern == *str &&\n          PatternMatchesString(pattern + 1, str + 1);\n  }\n}\n\nbool UnitTestOptions::MatchesFilter(\n    const std::string& name, const char* filter) {\n  const char *cur_pattern = filter;\n  for (;;) {\n    if (PatternMatchesString(cur_pattern, name.c_str())) {\n      return true;\n    }\n\n    // Finds the next pattern in the filter.\n    cur_pattern = strchr(cur_pattern, ':');\n\n    // Returns if no more pattern can be found.\n    if (cur_pattern == NULL) {\n      return false;\n    }\n\n    // Skips the pattern separater (the ':' character).\n    cur_pattern++;\n  }\n}\n\n// Returns true iff the user-specified filter matches the test case\n// name and the test name.\nbool UnitTestOptions::FilterMatchesTest(const std::string &test_case_name,\n                                        const std::string &test_name) {\n  const std::string& full_name = test_case_name + \".\" + test_name.c_str();\n\n  // Split --gtest_filter at '-', if there is one, to separate into\n  // positive filter and negative filter portions\n  const char* const p = GTEST_FLAG(filter).c_str();\n  const char* const dash = strchr(p, '-');\n  std::string positive;\n  std::string negative;\n  if (dash == NULL) {\n    positive = GTEST_FLAG(filter).c_str();  // Whole string is a positive filter\n    negative = \"\";\n  } else {\n    positive = std::string(p, dash);   // Everything up to the dash\n    negative = std::string(dash + 1);  // Everything after the dash\n    if (positive.empty()) {\n      // Treat '-test1' as the same as '*-test1'\n      positive = kUniversalFilter;\n    }\n  }\n\n  // A filter is a colon-separated list of patterns.  It matches a\n  // test if any pattern in it matches the test.\n  return (MatchesFilter(full_name, positive.c_str()) &&\n          !MatchesFilter(full_name, negative.c_str()));\n}\n\n#if GTEST_HAS_SEH\n// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the\n// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.\n// This function is useful as an __except condition.\nint UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) {\n  // Google Test should handle a SEH exception if:\n  //   1. the user wants it to, AND\n  //   2. this is not a breakpoint exception, AND\n  //   3. this is not a C++ exception (VC++ implements them via SEH,\n  //      apparently).\n  //\n  // SEH exception code for C++ exceptions.\n  // (see http://support.microsoft.com/kb/185294 for more information).\n  const DWORD kCxxExceptionCode = 0xe06d7363;\n\n  bool should_handle = true;\n\n  if (!GTEST_FLAG(catch_exceptions))\n    should_handle = false;\n  else if (exception_code == EXCEPTION_BREAKPOINT)\n    should_handle = false;\n  else if (exception_code == kCxxExceptionCode)\n    should_handle = false;\n\n  return should_handle ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;\n}\n#endif  // GTEST_HAS_SEH\n\n}  // namespace internal\n\n// The c'tor sets this object as the test part result reporter used by\n// Google Test.  The 'result' parameter specifies where to report the\n// results. Intercepts only failures from the current thread.\nScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter(\n    TestPartResultArray* result)\n    : intercept_mode_(INTERCEPT_ONLY_CURRENT_THREAD),\n      result_(result) {\n  Init();\n}\n\n// The c'tor sets this object as the test part result reporter used by\n// Google Test.  The 'result' parameter specifies where to report the\n// results.\nScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter(\n    InterceptMode intercept_mode, TestPartResultArray* result)\n    : intercept_mode_(intercept_mode),\n      result_(result) {\n  Init();\n}\n\nvoid ScopedFakeTestPartResultReporter::Init() {\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  if (intercept_mode_ == INTERCEPT_ALL_THREADS) {\n    old_reporter_ = impl->GetGlobalTestPartResultReporter();\n    impl->SetGlobalTestPartResultReporter(this);\n  } else {\n    old_reporter_ = impl->GetTestPartResultReporterForCurrentThread();\n    impl->SetTestPartResultReporterForCurrentThread(this);\n  }\n}\n\n// The d'tor restores the test part result reporter used by Google Test\n// before.\nScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() {\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  if (intercept_mode_ == INTERCEPT_ALL_THREADS) {\n    impl->SetGlobalTestPartResultReporter(old_reporter_);\n  } else {\n    impl->SetTestPartResultReporterForCurrentThread(old_reporter_);\n  }\n}\n\n// Increments the test part result count and remembers the result.\n// This method is from the TestPartResultReporterInterface interface.\nvoid ScopedFakeTestPartResultReporter::ReportTestPartResult(\n    const TestPartResult& result) {\n  result_->Append(result);\n}\n\nnamespace internal {\n\n// Returns the type ID of ::testing::Test.  We should always call this\n// instead of GetTypeId< ::testing::Test>() to get the type ID of\n// testing::Test.  This is to work around a suspected linker bug when\n// using Google Test as a framework on Mac OS X.  The bug causes\n// GetTypeId< ::testing::Test>() to return different values depending\n// on whether the call is from the Google Test framework itself or\n// from user test code.  GetTestTypeId() is guaranteed to always\n// return the same value, as it always calls GetTypeId<>() from the\n// gtest.cc, which is within the Google Test framework.\nTypeId GetTestTypeId() {\n  return GetTypeId<Test>();\n}\n\n// The value of GetTestTypeId() as seen from within the Google Test\n// library.  This is solely for testing GetTestTypeId().\nextern const TypeId kTestTypeIdInGoogleTest = GetTestTypeId();\n\n// This predicate-formatter checks that 'results' contains a test part\n// failure of the given type and that the failure message contains the\n// given substring.\nAssertionResult HasOneFailure(const char* /* results_expr */,\n                              const char* /* type_expr */,\n                              const char* /* substr_expr */,\n                              const TestPartResultArray& results,\n                              TestPartResult::Type type,\n                              const string& substr) {\n  const std::string expected(type == TestPartResult::kFatalFailure ?\n                        \"1 fatal failure\" :\n                        \"1 non-fatal failure\");\n  Message msg;\n  if (results.size() != 1) {\n    msg << \"Expected: \" << expected << \"\\n\"\n        << \"  Actual: \" << results.size() << \" failures\";\n    for (int i = 0; i < results.size(); i++) {\n      msg << \"\\n\" << results.GetTestPartResult(i);\n    }\n    return AssertionFailure() << msg;\n  }\n\n  const TestPartResult& r = results.GetTestPartResult(0);\n  if (r.type() != type) {\n    return AssertionFailure() << \"Expected: \" << expected << \"\\n\"\n                              << \"  Actual:\\n\"\n                              << r;\n  }\n\n  if (strstr(r.message(), substr.c_str()) == NULL) {\n    return AssertionFailure() << \"Expected: \" << expected << \" containing \\\"\"\n                              << substr << \"\\\"\\n\"\n                              << \"  Actual:\\n\"\n                              << r;\n  }\n\n  return AssertionSuccess();\n}\n\n// The constructor of SingleFailureChecker remembers where to look up\n// test part results, what type of failure we expect, and what\n// substring the failure message should contain.\nSingleFailureChecker:: SingleFailureChecker(\n    const TestPartResultArray* results,\n    TestPartResult::Type type,\n    const string& substr)\n    : results_(results),\n      type_(type),\n      substr_(substr) {}\n\n// The destructor of SingleFailureChecker verifies that the given\n// TestPartResultArray contains exactly one failure that has the given\n// type and contains the given substring.  If that's not the case, a\n// non-fatal failure will be generated.\nSingleFailureChecker::~SingleFailureChecker() {\n  EXPECT_PRED_FORMAT3(HasOneFailure, *results_, type_, substr_);\n}\n\nDefaultGlobalTestPartResultReporter::DefaultGlobalTestPartResultReporter(\n    UnitTestImpl* unit_test) : unit_test_(unit_test) {}\n\nvoid DefaultGlobalTestPartResultReporter::ReportTestPartResult(\n    const TestPartResult& result) {\n  unit_test_->current_test_result()->AddTestPartResult(result);\n  unit_test_->listeners()->repeater()->OnTestPartResult(result);\n}\n\nDefaultPerThreadTestPartResultReporter::DefaultPerThreadTestPartResultReporter(\n    UnitTestImpl* unit_test) : unit_test_(unit_test) {}\n\nvoid DefaultPerThreadTestPartResultReporter::ReportTestPartResult(\n    const TestPartResult& result) {\n  unit_test_->GetGlobalTestPartResultReporter()->ReportTestPartResult(result);\n}\n\n// Returns the global test part result reporter.\nTestPartResultReporterInterface*\nUnitTestImpl::GetGlobalTestPartResultReporter() {\n  internal::MutexLock lock(&global_test_part_result_reporter_mutex_);\n  return global_test_part_result_repoter_;\n}\n\n// Sets the global test part result reporter.\nvoid UnitTestImpl::SetGlobalTestPartResultReporter(\n    TestPartResultReporterInterface* reporter) {\n  internal::MutexLock lock(&global_test_part_result_reporter_mutex_);\n  global_test_part_result_repoter_ = reporter;\n}\n\n// Returns the test part result reporter for the current thread.\nTestPartResultReporterInterface*\nUnitTestImpl::GetTestPartResultReporterForCurrentThread() {\n  return per_thread_test_part_result_reporter_.get();\n}\n\n// Sets the test part result reporter for the current thread.\nvoid UnitTestImpl::SetTestPartResultReporterForCurrentThread(\n    TestPartResultReporterInterface* reporter) {\n  per_thread_test_part_result_reporter_.set(reporter);\n}\n\n// Gets the number of successful test cases.\nint UnitTestImpl::successful_test_case_count() const {\n  return CountIf(test_cases_, TestCasePassed);\n}\n\n// Gets the number of failed test cases.\nint UnitTestImpl::failed_test_case_count() const {\n  return CountIf(test_cases_, TestCaseFailed);\n}\n\n// Gets the number of all test cases.\nint UnitTestImpl::total_test_case_count() const {\n  return static_cast<int>(test_cases_.size());\n}\n\n// Gets the number of all test cases that contain at least one test\n// that should run.\nint UnitTestImpl::test_case_to_run_count() const {\n  return CountIf(test_cases_, ShouldRunTestCase);\n}\n\n// Gets the number of successful tests.\nint UnitTestImpl::successful_test_count() const {\n  return SumOverTestCaseList(test_cases_, &TestCase::successful_test_count);\n}\n\n// Gets the number of failed tests.\nint UnitTestImpl::failed_test_count() const {\n  return SumOverTestCaseList(test_cases_, &TestCase::failed_test_count);\n}\n\n// Gets the number of disabled tests that will be reported in the XML report.\nint UnitTestImpl::reportable_disabled_test_count() const {\n  return SumOverTestCaseList(test_cases_,\n                             &TestCase::reportable_disabled_test_count);\n}\n\n// Gets the number of disabled tests.\nint UnitTestImpl::disabled_test_count() const {\n  return SumOverTestCaseList(test_cases_, &TestCase::disabled_test_count);\n}\n\n// Gets the number of tests to be printed in the XML report.\nint UnitTestImpl::reportable_test_count() const {\n  return SumOverTestCaseList(test_cases_, &TestCase::reportable_test_count);\n}\n\n// Gets the number of all tests.\nint UnitTestImpl::total_test_count() const {\n  return SumOverTestCaseList(test_cases_, &TestCase::total_test_count);\n}\n\n// Gets the number of tests that should run.\nint UnitTestImpl::test_to_run_count() const {\n  return SumOverTestCaseList(test_cases_, &TestCase::test_to_run_count);\n}\n\n// Returns the current OS stack trace as an std::string.\n//\n// The maximum number of stack frames to be included is specified by\n// the gtest_stack_trace_depth flag.  The skip_count parameter\n// specifies the number of top frames to be skipped, which doesn't\n// count against the number of frames to be included.\n//\n// For example, if Foo() calls Bar(), which in turn calls\n// CurrentOsStackTraceExceptTop(1), Foo() will be included in the\n// trace but Bar() and CurrentOsStackTraceExceptTop() won't.\nstd::string UnitTestImpl::CurrentOsStackTraceExceptTop(int skip_count) {\n  (void)skip_count;\n  return \"\";\n}\n\n// Returns the current time in milliseconds.\nTimeInMillis GetTimeInMillis() {\n#if GTEST_OS_WINDOWS_MOBILE || defined(__BORLANDC__)\n  // Difference between 1970-01-01 and 1601-01-01 in milliseconds.\n  // http://analogous.blogspot.com/2005/04/epoch.html\n  const TimeInMillis kJavaEpochToWinFileTimeDelta =\n    static_cast<TimeInMillis>(116444736UL) * 100000UL;\n  const DWORD kTenthMicrosInMilliSecond = 10000;\n\n  SYSTEMTIME now_systime;\n  FILETIME now_filetime;\n  ULARGE_INTEGER now_int64;\n  // TODO(kenton@google.com): Shouldn't this just use\n  //   GetSystemTimeAsFileTime()?\n  GetSystemTime(&now_systime);\n  if (SystemTimeToFileTime(&now_systime, &now_filetime)) {\n    now_int64.LowPart = now_filetime.dwLowDateTime;\n    now_int64.HighPart = now_filetime.dwHighDateTime;\n    now_int64.QuadPart = (now_int64.QuadPart / kTenthMicrosInMilliSecond) -\n      kJavaEpochToWinFileTimeDelta;\n    return now_int64.QuadPart;\n  }\n  return 0;\n#elif GTEST_OS_WINDOWS && !GTEST_HAS_GETTIMEOFDAY_\n  __timeb64 now;\n\n# ifdef _MSC_VER\n\n  // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996\n  // (deprecated function) there.\n  // TODO(kenton@google.com): Use GetTickCount()?  Or use\n  //   SystemTimeToFileTime()\n#  pragma warning(push)          // Saves the current warning state.\n#  pragma warning(disable:4996)  // Temporarily disables warning 4996.\n  _ftime64(&now);\n#  pragma warning(pop)           // Restores the warning state.\n# else\n\n  _ftime64(&now);\n\n# endif  // _MSC_VER\n\n  return static_cast<TimeInMillis>(now.time) * 1000 + now.millitm;\n#elif GTEST_HAS_GETTIMEOFDAY_\n  struct timeval now;\n  gettimeofday(&now, NULL);\n  return static_cast<TimeInMillis>(now.tv_sec) * 1000 + now.tv_usec / 1000;\n#else\n# error \"Don't know how to get the current time on your system.\"\n#endif\n}\n\n// Utilities\n\n// class String.\n\n#if GTEST_OS_WINDOWS_MOBILE\n// Creates a UTF-16 wide string from the given ANSI string, allocating\n// memory using new. The caller is responsible for deleting the return\n// value using delete[]. Returns the wide string, or NULL if the\n// input is NULL.\nLPCWSTR String::AnsiToUtf16(const char* ansi) {\n  if (!ansi) return NULL;\n  const int length = strlen(ansi);\n  const int unicode_length =\n      MultiByteToWideChar(CP_ACP, 0, ansi, length,\n                          NULL, 0);\n  WCHAR* unicode = new WCHAR[unicode_length + 1];\n  MultiByteToWideChar(CP_ACP, 0, ansi, length,\n                      unicode, unicode_length);\n  unicode[unicode_length] = 0;\n  return unicode;\n}\n\n// Creates an ANSI string from the given wide string, allocating\n// memory using new. The caller is responsible for deleting the return\n// value using delete[]. Returns the ANSI string, or NULL if the\n// input is NULL.\nconst char* String::Utf16ToAnsi(LPCWSTR utf16_str)  {\n  if (!utf16_str) return NULL;\n  const int ansi_length =\n      WideCharToMultiByte(CP_ACP, 0, utf16_str, -1,\n                          NULL, 0, NULL, NULL);\n  char* ansi = new char[ansi_length + 1];\n  WideCharToMultiByte(CP_ACP, 0, utf16_str, -1,\n                      ansi, ansi_length, NULL, NULL);\n  ansi[ansi_length] = 0;\n  return ansi;\n}\n\n#endif  // GTEST_OS_WINDOWS_MOBILE\n\n// Compares two C strings.  Returns true iff they have the same content.\n//\n// Unlike strcmp(), this function can handle NULL argument(s).  A NULL\n// C string is considered different to any non-NULL C string,\n// including the empty string.\nbool String::CStringEquals(const char * lhs, const char * rhs) {\n  if ( lhs == NULL ) return rhs == NULL;\n\n  if ( rhs == NULL ) return false;\n\n  return strcmp(lhs, rhs) == 0;\n}\n\n#if GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING\n\n// Converts an array of wide chars to a narrow string using the UTF-8\n// encoding, and streams the result to the given Message object.\nstatic void StreamWideCharsToMessage(const wchar_t* wstr, size_t length,\n                                     Message* msg) {\n  for (size_t i = 0; i != length; ) {  // NOLINT\n    if (wstr[i] != L'\\0') {\n      *msg << WideStringToUtf8(wstr + i, static_cast<int>(length - i));\n      while (i != length && wstr[i] != L'\\0')\n        i++;\n    } else {\n      *msg << '\\0';\n      i++;\n    }\n  }\n}\n\n#endif  // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING\n\n}  // namespace internal\n\n// Constructs an empty Message.\n// We allocate the stringstream separately because otherwise each use of\n// ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's\n// stack frame leading to huge stack frames in some cases; gcc does not reuse\n// the stack space.\nMessage::Message() : ss_(new ::std::stringstream) {\n  // By default, we want there to be enough precision when printing\n  // a double to a Message.\n  *ss_ << std::setprecision(std::numeric_limits<double>::digits10 + 2);\n}\n\n// These two overloads allow streaming a wide C string to a Message\n// using the UTF-8 encoding.\nMessage& Message::operator <<(const wchar_t* wide_c_str) {\n  return *this << internal::String::ShowWideCString(wide_c_str);\n}\nMessage& Message::operator <<(wchar_t* wide_c_str) {\n  return *this << internal::String::ShowWideCString(wide_c_str);\n}\n\n#if GTEST_HAS_STD_WSTRING\n// Converts the given wide string to a narrow string using the UTF-8\n// encoding, and streams the result to this Message object.\nMessage& Message::operator <<(const ::std::wstring& wstr) {\n  internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);\n  return *this;\n}\n#endif  // GTEST_HAS_STD_WSTRING\n\n#if GTEST_HAS_GLOBAL_WSTRING\n// Converts the given wide string to a narrow string using the UTF-8\n// encoding, and streams the result to this Message object.\nMessage& Message::operator <<(const ::wstring& wstr) {\n  internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this);\n  return *this;\n}\n#endif  // GTEST_HAS_GLOBAL_WSTRING\n\n// Gets the text streamed to this object so far as an std::string.\n// Each '\\0' character in the buffer is replaced with \"\\\\0\".\nstd::string Message::GetString() const {\n  return internal::StringStreamToString(ss_.get());\n}\n\n// AssertionResult constructors.\n// Used in EXPECT_TRUE/FALSE(assertion_result).\nAssertionResult::AssertionResult(const AssertionResult& other)\n    : success_(other.success_),\n      message_(other.message_.get() != NULL ?\n               new ::std::string(*other.message_) :\n               static_cast< ::std::string*>(NULL)) {\n}\n\n// Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.\nAssertionResult AssertionResult::operator!() const {\n  AssertionResult negation(!success_);\n  if (message_.get() != NULL)\n    negation << *message_;\n  return negation;\n}\n\n// Makes a successful assertion result.\nAssertionResult AssertionSuccess() {\n  return AssertionResult(true);\n}\n\n// Makes a failed assertion result.\nAssertionResult AssertionFailure() {\n  return AssertionResult(false);\n}\n\n// Makes a failed assertion result with the given failure message.\n// Deprecated; use AssertionFailure() << message.\nAssertionResult AssertionFailure(const Message& message) {\n  return AssertionFailure() << message;\n}\n\nnamespace internal {\n\n// Constructs and returns the message for an equality assertion\n// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.\n//\n// The first four parameters are the expressions used in the assertion\n// and their values, as strings.  For example, for ASSERT_EQ(foo, bar)\n// where foo is 5 and bar is 6, we have:\n//\n//   expected_expression: \"foo\"\n//   actual_expression:   \"bar\"\n//   expected_value:      \"5\"\n//   actual_value:        \"6\"\n//\n// The ignoring_case parameter is true iff the assertion is a\n// *_STRCASEEQ*.  When it's true, the string \" (ignoring case)\" will\n// be inserted into the message.\nAssertionResult EqFailure(const char* expected_expression,\n                          const char* actual_expression,\n                          const std::string& expected_value,\n                          const std::string& actual_value,\n                          bool ignoring_case) {\n  Message msg;\n  msg << \"Value of: \" << actual_expression;\n  if (actual_value != actual_expression) {\n    msg << \"\\n  Actual: \" << actual_value;\n  }\n\n  msg << \"\\nExpected: \" << expected_expression;\n  if (ignoring_case) {\n    msg << \" (ignoring case)\";\n  }\n  if (expected_value != expected_expression) {\n    msg << \"\\nWhich is: \" << expected_value;\n  }\n\n  return AssertionFailure() << msg;\n}\n\n// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.\nstd::string GetBoolAssertionFailureMessage(\n    const AssertionResult& assertion_result,\n    const char* expression_text,\n    const char* actual_predicate_value,\n    const char* expected_predicate_value) {\n  const char* actual_message = assertion_result.message();\n  Message msg;\n  msg << \"Value of: \" << expression_text\n      << \"\\n  Actual: \" << actual_predicate_value;\n  if (actual_message[0] != '\\0')\n    msg << \" (\" << actual_message << \")\";\n  msg << \"\\nExpected: \" << expected_predicate_value;\n  return msg.GetString();\n}\n\n// Helper function for implementing ASSERT_NEAR.\nAssertionResult DoubleNearPredFormat(const char* expr1,\n                                     const char* expr2,\n                                     const char* abs_error_expr,\n                                     double val1,\n                                     double val2,\n                                     double abs_error) {\n  const double diff = fabs(val1 - val2);\n  if (diff <= abs_error) return AssertionSuccess();\n\n  // TODO(wan): do not print the value of an expression if it's\n  // already a literal.\n  return AssertionFailure()\n      << \"The difference between \" << expr1 << \" and \" << expr2\n      << \" is \" << diff << \", which exceeds \" << abs_error_expr << \", where\\n\"\n      << expr1 << \" evaluates to \" << val1 << \",\\n\"\n      << expr2 << \" evaluates to \" << val2 << \", and\\n\"\n      << abs_error_expr << \" evaluates to \" << abs_error << \".\";\n}\n\n\n// Helper template for implementing FloatLE() and DoubleLE().\ntemplate <typename RawType>\nAssertionResult FloatingPointLE(const char* expr1,\n                                const char* expr2,\n                                RawType val1,\n                                RawType val2) {\n  // Returns success if val1 is less than val2,\n  if (val1 < val2) {\n    return AssertionSuccess();\n  }\n\n  // or if val1 is almost equal to val2.\n  const FloatingPoint<RawType> lhs(val1), rhs(val2);\n  if (lhs.AlmostEquals(rhs)) {\n    return AssertionSuccess();\n  }\n\n  // Note that the above two checks will both fail if either val1 or\n  // val2 is NaN, as the IEEE floating-point standard requires that\n  // any predicate involving a NaN must return false.\n\n  ::std::stringstream val1_ss;\n  val1_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)\n          << val1;\n\n  ::std::stringstream val2_ss;\n  val2_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)\n          << val2;\n\n  return AssertionFailure()\n      << \"Expected: (\" << expr1 << \") <= (\" << expr2 << \")\\n\"\n      << \"  Actual: \" << StringStreamToString(&val1_ss) << \" vs \"\n      << StringStreamToString(&val2_ss);\n}\n\n}  // namespace internal\n\n// Asserts that val1 is less than, or almost equal to, val2.  Fails\n// otherwise.  In particular, it fails if either val1 or val2 is NaN.\nAssertionResult FloatLE(const char* expr1, const char* expr2,\n                        float val1, float val2) {\n  return internal::FloatingPointLE<float>(expr1, expr2, val1, val2);\n}\n\n// Asserts that val1 is less than, or almost equal to, val2.  Fails\n// otherwise.  In particular, it fails if either val1 or val2 is NaN.\nAssertionResult DoubleLE(const char* expr1, const char* expr2,\n                         double val1, double val2) {\n  return internal::FloatingPointLE<double>(expr1, expr2, val1, val2);\n}\n\nnamespace internal {\n\n// The helper function for {ASSERT|EXPECT}_EQ with int or enum\n// arguments.\nAssertionResult CmpHelperEQ(const char* expected_expression,\n                            const char* actual_expression,\n                            BiggestInt expected,\n                            BiggestInt actual) {\n  if (expected == actual) {\n    return AssertionSuccess();\n  }\n\n  return EqFailure(expected_expression,\n                   actual_expression,\n                   FormatForComparisonFailureMessage(expected, actual),\n                   FormatForComparisonFailureMessage(actual, expected),\n                   false);\n}\n\n// A macro for implementing the helper functions needed to implement\n// ASSERT_?? and EXPECT_?? with integer or enum arguments.  It is here\n// just to avoid copy-and-paste of similar code.\n#define GTEST_IMPL_CMP_HELPER_(op_name, op)\\\nAssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \\\n                                   BiggestInt val1, BiggestInt val2) {\\\n  if (val1 op val2) {\\\n    return AssertionSuccess();\\\n  } else {\\\n    return AssertionFailure() \\\n        << \"Expected: (\" << expr1 << \") \" #op \" (\" << expr2\\\n        << \"), actual: \" << FormatForComparisonFailureMessage(val1, val2)\\\n        << \" vs \" << FormatForComparisonFailureMessage(val2, val1);\\\n  }\\\n}\n\n// Implements the helper function for {ASSERT|EXPECT}_NE with int or\n// enum arguments.\nGTEST_IMPL_CMP_HELPER_(NE, !=)\n// Implements the helper function for {ASSERT|EXPECT}_LE with int or\n// enum arguments.\nGTEST_IMPL_CMP_HELPER_(LE, <=)\n// Implements the helper function for {ASSERT|EXPECT}_LT with int or\n// enum arguments.\nGTEST_IMPL_CMP_HELPER_(LT, < )\n// Implements the helper function for {ASSERT|EXPECT}_GE with int or\n// enum arguments.\nGTEST_IMPL_CMP_HELPER_(GE, >=)\n// Implements the helper function for {ASSERT|EXPECT}_GT with int or\n// enum arguments.\nGTEST_IMPL_CMP_HELPER_(GT, > )\n\n#undef GTEST_IMPL_CMP_HELPER_\n\n// The helper function for {ASSERT|EXPECT}_STREQ.\nAssertionResult CmpHelperSTREQ(const char* expected_expression,\n                               const char* actual_expression,\n                               const char* expected,\n                               const char* actual) {\n  if (String::CStringEquals(expected, actual)) {\n    return AssertionSuccess();\n  }\n\n  return EqFailure(expected_expression,\n                   actual_expression,\n                   PrintToString(expected),\n                   PrintToString(actual),\n                   false);\n}\n\n// The helper function for {ASSERT|EXPECT}_STRCASEEQ.\nAssertionResult CmpHelperSTRCASEEQ(const char* expected_expression,\n                                   const char* actual_expression,\n                                   const char* expected,\n                                   const char* actual) {\n  if (String::CaseInsensitiveCStringEquals(expected, actual)) {\n    return AssertionSuccess();\n  }\n\n  return EqFailure(expected_expression,\n                   actual_expression,\n                   PrintToString(expected),\n                   PrintToString(actual),\n                   true);\n}\n\n// The helper function for {ASSERT|EXPECT}_STRNE.\nAssertionResult CmpHelperSTRNE(const char* s1_expression,\n                               const char* s2_expression,\n                               const char* s1,\n                               const char* s2) {\n  if (!String::CStringEquals(s1, s2)) {\n    return AssertionSuccess();\n  } else {\n    return AssertionFailure() << \"Expected: (\" << s1_expression << \") != (\"\n                              << s2_expression << \"), actual: \\\"\"\n                              << s1 << \"\\\" vs \\\"\" << s2 << \"\\\"\";\n  }\n}\n\n// The helper function for {ASSERT|EXPECT}_STRCASENE.\nAssertionResult CmpHelperSTRCASENE(const char* s1_expression,\n                                   const char* s2_expression,\n                                   const char* s1,\n                                   const char* s2) {\n  if (!String::CaseInsensitiveCStringEquals(s1, s2)) {\n    return AssertionSuccess();\n  } else {\n    return AssertionFailure()\n        << \"Expected: (\" << s1_expression << \") != (\"\n        << s2_expression << \") (ignoring case), actual: \\\"\"\n        << s1 << \"\\\" vs \\\"\" << s2 << \"\\\"\";\n  }\n}\n\n}  // namespace internal\n\nnamespace {\n\n// Helper functions for implementing IsSubString() and IsNotSubstring().\n\n// This group of overloaded functions return true iff needle is a\n// substring of haystack.  NULL is considered a substring of itself\n// only.\n\nbool IsSubstringPred(const char* needle, const char* haystack) {\n  if (needle == NULL || haystack == NULL)\n    return needle == haystack;\n\n  return strstr(haystack, needle) != NULL;\n}\n\nbool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) {\n  if (needle == NULL || haystack == NULL)\n    return needle == haystack;\n\n  return wcsstr(haystack, needle) != NULL;\n}\n\n// StringType here can be either ::std::string or ::std::wstring.\ntemplate <typename StringType>\nbool IsSubstringPred(const StringType& needle,\n                     const StringType& haystack) {\n  return haystack.find(needle) != StringType::npos;\n}\n\n// This function implements either IsSubstring() or IsNotSubstring(),\n// depending on the value of the expected_to_be_substring parameter.\n// StringType here can be const char*, const wchar_t*, ::std::string,\n// or ::std::wstring.\ntemplate <typename StringType>\nAssertionResult IsSubstringImpl(\n    bool expected_to_be_substring,\n    const char* needle_expr, const char* haystack_expr,\n    const StringType& needle, const StringType& haystack) {\n  if (IsSubstringPred(needle, haystack) == expected_to_be_substring)\n    return AssertionSuccess();\n\n  const bool is_wide_string = sizeof(needle[0]) > 1;\n  const char* const begin_string_quote = is_wide_string ? \"L\\\"\" : \"\\\"\";\n  return AssertionFailure()\n      << \"Value of: \" << needle_expr << \"\\n\"\n      << \"  Actual: \" << begin_string_quote << needle << \"\\\"\\n\"\n      << \"Expected: \" << (expected_to_be_substring ? \"\" : \"not \")\n      << \"a substring of \" << haystack_expr << \"\\n\"\n      << \"Which is: \" << begin_string_quote << haystack << \"\\\"\";\n}\n\n}  // namespace\n\n// IsSubstring() and IsNotSubstring() check whether needle is a\n// substring of haystack (NULL is considered a substring of itself\n// only), and return an appropriate error message when they fail.\n\nAssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const char* needle, const char* haystack) {\n  return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const wchar_t* needle, const wchar_t* haystack) {\n  return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const char* needle, const char* haystack) {\n  return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const wchar_t* needle, const wchar_t* haystack) {\n  return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::string& needle, const ::std::string& haystack) {\n  return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::string& needle, const ::std::string& haystack) {\n  return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);\n}\n\n#if GTEST_HAS_STD_WSTRING\nAssertionResult IsSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::wstring& needle, const ::std::wstring& haystack) {\n  return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);\n}\n\nAssertionResult IsNotSubstring(\n    const char* needle_expr, const char* haystack_expr,\n    const ::std::wstring& needle, const ::std::wstring& haystack) {\n  return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);\n}\n#endif  // GTEST_HAS_STD_WSTRING\n\nnamespace internal {\n\n#if GTEST_OS_WINDOWS\n\nnamespace {\n\n// Helper function for IsHRESULT{SuccessFailure} predicates\nAssertionResult HRESULTFailureHelper(const char* expr,\n                                     const char* expected,\n                                     long hr) {  // NOLINT\n# if GTEST_OS_WINDOWS_MOBILE\n\n  // Windows CE doesn't support FormatMessage.\n  const char error_text[] = \"\";\n\n# else\n\n  // Looks up the human-readable system message for the HRESULT code\n  // and since we're not passing any params to FormatMessage, we don't\n  // want inserts expanded.\n  const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM |\n                       FORMAT_MESSAGE_IGNORE_INSERTS;\n  const DWORD kBufSize = 4096;\n  // Gets the system's human readable message string for this HRESULT.\n  char error_text[kBufSize] = { '\\0' };\n  DWORD message_length = ::FormatMessageA(kFlags,\n                                          0,  // no source, we're asking system\n                                          hr,  // the error\n                                          0,  // no line width restrictions\n                                          error_text,  // output buffer\n                                          kBufSize,  // buf size\n                                          NULL);  // no arguments for inserts\n  // Trims tailing white space (FormatMessage leaves a trailing CR-LF)\n  for (; message_length && IsSpace(error_text[message_length - 1]);\n          --message_length) {\n    error_text[message_length - 1] = '\\0';\n  }\n\n# endif  // GTEST_OS_WINDOWS_MOBILE\n\n  const std::string error_hex(\"0x\" + String::FormatHexInt(hr));\n  return ::testing::AssertionFailure()\n      << \"Expected: \" << expr << \" \" << expected << \".\\n\"\n      << \"  Actual: \" << error_hex << \" \" << error_text << \"\\n\";\n}\n\n}  // namespace\n\nAssertionResult IsHRESULTSuccess(const char* expr, long hr) {  // NOLINT\n  if (SUCCEEDED(hr)) {\n    return AssertionSuccess();\n  }\n  return HRESULTFailureHelper(expr, \"succeeds\", hr);\n}\n\nAssertionResult IsHRESULTFailure(const char* expr, long hr) {  // NOLINT\n  if (FAILED(hr)) {\n    return AssertionSuccess();\n  }\n  return HRESULTFailureHelper(expr, \"fails\", hr);\n}\n\n#endif  // GTEST_OS_WINDOWS\n\n// Utility functions for encoding Unicode text (wide strings) in\n// UTF-8.\n\n// A Unicode code-point can have upto 21 bits, and is encoded in UTF-8\n// like this:\n//\n// Code-point length   Encoding\n//   0 -  7 bits       0xxxxxxx\n//   8 - 11 bits       110xxxxx 10xxxxxx\n//  12 - 16 bits       1110xxxx 10xxxxxx 10xxxxxx\n//  17 - 21 bits       11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n\n// The maximum code-point a one-byte UTF-8 sequence can represent.\nconst UInt32 kMaxCodePoint1 = (static_cast<UInt32>(1) <<  7) - 1;\n\n// The maximum code-point a two-byte UTF-8 sequence can represent.\nconst UInt32 kMaxCodePoint2 = (static_cast<UInt32>(1) << (5 + 6)) - 1;\n\n// The maximum code-point a three-byte UTF-8 sequence can represent.\nconst UInt32 kMaxCodePoint3 = (static_cast<UInt32>(1) << (4 + 2*6)) - 1;\n\n// The maximum code-point a four-byte UTF-8 sequence can represent.\nconst UInt32 kMaxCodePoint4 = (static_cast<UInt32>(1) << (3 + 3*6)) - 1;\n\n// Chops off the n lowest bits from a bit pattern.  Returns the n\n// lowest bits.  As a side effect, the original bit pattern will be\n// shifted to the right by n bits.\ninline UInt32 ChopLowBits(UInt32* bits, int n) {\n  const UInt32 low_bits = *bits & ((static_cast<UInt32>(1) << n) - 1);\n  *bits >>= n;\n  return low_bits;\n}\n\n// Converts a Unicode code point to a narrow string in UTF-8 encoding.\n// code_point parameter is of type UInt32 because wchar_t may not be\n// wide enough to contain a code point.\n// If the code_point is not a valid Unicode code point\n// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be converted\n// to \"(Invalid Unicode 0xXXXXXXXX)\".\nstd::string CodePointToUtf8(UInt32 code_point) {\n  if (code_point > kMaxCodePoint4) {\n    return \"(Invalid Unicode 0x\" + String::FormatHexInt(code_point) + \")\";\n  }\n\n  char str[5];  // Big enough for the largest valid code point.\n  if (code_point <= kMaxCodePoint1) {\n    str[1] = '\\0';\n    str[0] = static_cast<char>(code_point);                          // 0xxxxxxx\n  } else if (code_point <= kMaxCodePoint2) {\n    str[2] = '\\0';\n    str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[0] = static_cast<char>(0xC0 | code_point);                   // 110xxxxx\n  } else if (code_point <= kMaxCodePoint3) {\n    str[3] = '\\0';\n    str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[0] = static_cast<char>(0xE0 | code_point);                   // 1110xxxx\n  } else {  // code_point <= kMaxCodePoint4\n    str[4] = '\\0';\n    str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6));  // 10xxxxxx\n    str[0] = static_cast<char>(0xF0 | code_point);                   // 11110xxx\n  }\n  return str;\n}\n\n// The following two functions only make sense if the the system\n// uses UTF-16 for wide string encoding. All supported systems\n// with 16 bit wchar_t (Windows, Cygwin, Symbian OS) do use UTF-16.\n\n// Determines if the arguments constitute UTF-16 surrogate pair\n// and thus should be combined into a single Unicode code point\n// using CreateCodePointFromUtf16SurrogatePair.\ninline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {\n  return sizeof(wchar_t) == 2 &&\n      (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00;\n}\n\n// Creates a Unicode code point from UTF16 surrogate pair.\ninline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,\n                                                    wchar_t second) {\n  const UInt32 mask = (1 << 10) - 1;\n  return (sizeof(wchar_t) == 2) ?\n      (((first & mask) << 10) | (second & mask)) + 0x10000 :\n      // This function should not be called when the condition is\n      // false, but we provide a sensible default in case it is.\n      static_cast<UInt32>(first);\n}\n\n// Converts a wide string to a narrow string in UTF-8 encoding.\n// The wide string is assumed to have the following encoding:\n//   UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS)\n//   UTF-32 if sizeof(wchar_t) == 4 (on Linux)\n// Parameter str points to a null-terminated wide string.\n// Parameter num_chars may additionally limit the number\n// of wchar_t characters processed. -1 is used when the entire string\n// should be processed.\n// If the string contains code points that are not valid Unicode code points\n// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output\n// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding\n// and contains invalid UTF-16 surrogate pairs, values in those pairs\n// will be encoded as individual Unicode characters from Basic Normal Plane.\nstd::string WideStringToUtf8(const wchar_t* str, int num_chars) {\n  if (num_chars == -1)\n    num_chars = static_cast<int>(wcslen(str));\n\n  ::std::stringstream stream;\n  for (int i = 0; i < num_chars; ++i) {\n    UInt32 unicode_code_point;\n\n    if (str[i] == L'\\0') {\n      break;\n    } else if (i + 1 < num_chars && IsUtf16SurrogatePair(str[i], str[i + 1])) {\n      unicode_code_point = CreateCodePointFromUtf16SurrogatePair(str[i],\n                                                                 str[i + 1]);\n      i++;\n    } else {\n      unicode_code_point = static_cast<UInt32>(str[i]);\n    }\n\n    stream << CodePointToUtf8(unicode_code_point);\n  }\n  return StringStreamToString(&stream);\n}\n\n// Converts a wide C string to an std::string using the UTF-8 encoding.\n// NULL will be converted to \"(null)\".\nstd::string String::ShowWideCString(const wchar_t * wide_c_str) {\n  if (wide_c_str == NULL)  return \"(null)\";\n\n  return internal::WideStringToUtf8(wide_c_str, -1);\n}\n\n// Compares two wide C strings.  Returns true iff they have the same\n// content.\n//\n// Unlike wcscmp(), this function can handle NULL argument(s).  A NULL\n// C string is considered different to any non-NULL C string,\n// including the empty string.\nbool String::WideCStringEquals(const wchar_t * lhs, const wchar_t * rhs) {\n  if (lhs == NULL) return rhs == NULL;\n\n  if (rhs == NULL) return false;\n\n  return wcscmp(lhs, rhs) == 0;\n}\n\n// Helper function for *_STREQ on wide strings.\nAssertionResult CmpHelperSTREQ(const char* expected_expression,\n                               const char* actual_expression,\n                               const wchar_t* expected,\n                               const wchar_t* actual) {\n  if (String::WideCStringEquals(expected, actual)) {\n    return AssertionSuccess();\n  }\n\n  return EqFailure(expected_expression,\n                   actual_expression,\n                   PrintToString(expected),\n                   PrintToString(actual),\n                   false);\n}\n\n// Helper function for *_STRNE on wide strings.\nAssertionResult CmpHelperSTRNE(const char* s1_expression,\n                               const char* s2_expression,\n                               const wchar_t* s1,\n                               const wchar_t* s2) {\n  if (!String::WideCStringEquals(s1, s2)) {\n    return AssertionSuccess();\n  }\n\n  return AssertionFailure() << \"Expected: (\" << s1_expression << \") != (\"\n                            << s2_expression << \"), actual: \"\n                            << PrintToString(s1)\n                            << \" vs \" << PrintToString(s2);\n}\n\n// Compares two C strings, ignoring case.  Returns true iff they have\n// the same content.\n//\n// Unlike strcasecmp(), this function can handle NULL argument(s).  A\n// NULL C string is considered different to any non-NULL C string,\n// including the empty string.\nbool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) {\n  if (lhs == NULL)\n    return rhs == NULL;\n  if (rhs == NULL)\n    return false;\n  return posix::StrCaseCmp(lhs, rhs) == 0;\n}\n\n  // Compares two wide C strings, ignoring case.  Returns true iff they\n  // have the same content.\n  //\n  // Unlike wcscasecmp(), this function can handle NULL argument(s).\n  // A NULL C string is considered different to any non-NULL wide C string,\n  // including the empty string.\n  // NB: The implementations on different platforms slightly differ.\n  // On windows, this method uses _wcsicmp which compares according to LC_CTYPE\n  // environment variable. On GNU platform this method uses wcscasecmp\n  // which compares according to LC_CTYPE category of the current locale.\n  // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the\n  // current locale.\nbool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs,\n                                              const wchar_t* rhs) {\n  if (lhs == NULL) return rhs == NULL;\n\n  if (rhs == NULL) return false;\n\n#if GTEST_OS_WINDOWS\n  return _wcsicmp(lhs, rhs) == 0;\n#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID\n  return wcscasecmp(lhs, rhs) == 0;\n#else\n  // Android, Mac OS X and Cygwin don't define wcscasecmp.\n  // Other unknown OSes may not define it either.\n  wint_t left, right;\n  do {\n    left = towlower(*lhs++);\n    right = towlower(*rhs++);\n  } while (left && left == right);\n  return left == right;\n#endif  // OS selector\n}\n\n// Returns true iff str ends with the given suffix, ignoring case.\n// Any string is considered to end with an empty suffix.\nbool String::EndsWithCaseInsensitive(\n    const std::string& str, const std::string& suffix) {\n  const size_t str_len = str.length();\n  const size_t suffix_len = suffix.length();\n  return (str_len >= suffix_len) &&\n         CaseInsensitiveCStringEquals(str.c_str() + str_len - suffix_len,\n                                      suffix.c_str());\n}\n\n// Formats an int value as \"%02d\".\nstd::string String::FormatIntWidth2(int value) {\n  std::stringstream ss;\n  ss << std::setfill('0') << std::setw(2) << value;\n  return ss.str();\n}\n\n// Formats an int value as \"%X\".\nstd::string String::FormatHexInt(int value) {\n  std::stringstream ss;\n  ss << std::hex << std::uppercase << value;\n  return ss.str();\n}\n\n// Formats a byte as \"%02X\".\nstd::string String::FormatByte(unsigned char value) {\n  std::stringstream ss;\n  ss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase\n     << static_cast<unsigned int>(value);\n  return ss.str();\n}\n\n// Converts the buffer in a stringstream to an std::string, converting NUL\n// bytes to \"\\\\0\" along the way.\nstd::string StringStreamToString(::std::stringstream* ss) {\n  const ::std::string& str = ss->str();\n  const char* const start = str.c_str();\n  const char* const end = start + str.length();\n\n  std::string result;\n  result.reserve(2 * (end - start));\n  for (const char* ch = start; ch != end; ++ch) {\n    if (*ch == '\\0') {\n      result += \"\\\\0\";  // Replaces NUL with \"\\\\0\";\n    } else {\n      result += *ch;\n    }\n  }\n\n  return result;\n}\n\n// Appends the user-supplied message to the Google-Test-generated message.\nstd::string AppendUserMessage(const std::string& gtest_msg,\n                              const Message& user_msg) {\n  // Appends the user message if it's non-empty.\n  const std::string user_msg_string = user_msg.GetString();\n  if (user_msg_string.empty()) {\n    return gtest_msg;\n  }\n\n  return gtest_msg + \"\\n\" + user_msg_string;\n}\n\n}  // namespace internal\n\n// class TestResult\n\n// Creates an empty TestResult.\nTestResult::TestResult()\n    : death_test_count_(0),\n      elapsed_time_(0) {\n}\n\n// D'tor.\nTestResult::~TestResult() {\n}\n\n// Returns the i-th test part result among all the results. i can\n// range from 0 to total_part_count() - 1. If i is not in that range,\n// aborts the program.\nconst TestPartResult& TestResult::GetTestPartResult(int i) const {\n  if (i < 0 || i >= total_part_count())\n    internal::posix::Abort();\n  return test_part_results_.at(i);\n}\n\n// Returns the i-th test property. i can range from 0 to\n// test_property_count() - 1. If i is not in that range, aborts the\n// program.\nconst TestProperty& TestResult::GetTestProperty(int i) const {\n  if (i < 0 || i >= test_property_count())\n    internal::posix::Abort();\n  return test_properties_.at(i);\n}\n\n// Clears the test part results.\nvoid TestResult::ClearTestPartResults() {\n  test_part_results_.clear();\n}\n\n// Adds a test part result to the list.\nvoid TestResult::AddTestPartResult(const TestPartResult& test_part_result) {\n  test_part_results_.push_back(test_part_result);\n}\n\n// Adds a test property to the list. If a property with the same key as the\n// supplied property is already represented, the value of this test_property\n// replaces the old value for that key.\nvoid TestResult::RecordProperty(const std::string& xml_element,\n                                const TestProperty& test_property) {\n  if (!ValidateTestProperty(xml_element, test_property)) {\n    return;\n  }\n  internal::MutexLock lock(&test_properites_mutex_);\n  const std::vector<TestProperty>::iterator property_with_matching_key =\n      std::find_if(test_properties_.begin(), test_properties_.end(),\n                   internal::TestPropertyKeyIs(test_property.key()));\n  if (property_with_matching_key == test_properties_.end()) {\n    test_properties_.push_back(test_property);\n    return;\n  }\n  property_with_matching_key->SetValue(test_property.value());\n}\n\n// The list of reserved attributes used in the <testsuites> element of XML\n// output.\nstatic const char* const kReservedTestSuitesAttributes[] = {\n  \"disabled\",\n  \"errors\",\n  \"failures\",\n  \"name\",\n  \"random_seed\",\n  \"tests\",\n  \"time\",\n  \"timestamp\"\n};\n\n// The list of reserved attributes used in the <testsuite> element of XML\n// output.\nstatic const char* const kReservedTestSuiteAttributes[] = {\n  \"disabled\",\n  \"errors\",\n  \"failures\",\n  \"name\",\n  \"tests\",\n  \"time\"\n};\n\n// The list of reserved attributes used in the <testcase> element of XML output.\nstatic const char* const kReservedTestCaseAttributes[] = {\n  \"classname\",\n  \"name\",\n  \"status\",\n  \"time\",\n  \"type_param\",\n  \"value_param\"\n};\n\ntemplate <int kSize>\nstd::vector<std::string> ArrayAsVector(const char* const (&array)[kSize]) {\n  return std::vector<std::string>(array, array + kSize);\n}\n\nstatic std::vector<std::string> GetReservedAttributesForElement(\n    const std::string& xml_element) {\n  if (xml_element == \"testsuites\") {\n    return ArrayAsVector(kReservedTestSuitesAttributes);\n  } else if (xml_element == \"testsuite\") {\n    return ArrayAsVector(kReservedTestSuiteAttributes);\n  } else if (xml_element == \"testcase\") {\n    return ArrayAsVector(kReservedTestCaseAttributes);\n  } else {\n    GTEST_CHECK_(false) << \"Unrecognized xml_element provided: \" << xml_element;\n  }\n  // This code is unreachable but some compilers may not realizes that.\n  return std::vector<std::string>();\n}\n\nstatic std::string FormatWordList(const std::vector<std::string>& words) {\n  Message word_list;\n  for (size_t i = 0; i < words.size(); ++i) {\n    if (i > 0 && words.size() > 2) {\n      word_list << \", \";\n    }\n    if (i == words.size() - 1) {\n      word_list << \"and \";\n    }\n    word_list << \"'\" << words[i] << \"'\";\n  }\n  return word_list.GetString();\n}\n\nbool ValidateTestPropertyName(const std::string& property_name,\n                              const std::vector<std::string>& reserved_names) {\n  if (std::find(reserved_names.begin(), reserved_names.end(), property_name) !=\n          reserved_names.end()) {\n    ADD_FAILURE() << \"Reserved key used in RecordProperty(): \" << property_name\n                  << \" (\" << FormatWordList(reserved_names)\n                  << \" are reserved by \" << GTEST_NAME_ << \")\";\n    return false;\n  }\n  return true;\n}\n\n// Adds a failure if the key is a reserved attribute of the element named\n// xml_element.  Returns true if the property is valid.\nbool TestResult::ValidateTestProperty(const std::string& xml_element,\n                                      const TestProperty& test_property) {\n  return ValidateTestPropertyName(test_property.key(),\n                                  GetReservedAttributesForElement(xml_element));\n}\n\n// Clears the object.\nvoid TestResult::Clear() {\n  test_part_results_.clear();\n  test_properties_.clear();\n  death_test_count_ = 0;\n  elapsed_time_ = 0;\n}\n\n// Returns true iff the test failed.\nbool TestResult::Failed() const {\n  for (int i = 0; i < total_part_count(); ++i) {\n    if (GetTestPartResult(i).failed())\n      return true;\n  }\n  return false;\n}\n\n// Returns true iff the test part fatally failed.\nstatic bool TestPartFatallyFailed(const TestPartResult& result) {\n  return result.fatally_failed();\n}\n\n// Returns true iff the test fatally failed.\nbool TestResult::HasFatalFailure() const {\n  return CountIf(test_part_results_, TestPartFatallyFailed) > 0;\n}\n\n// Returns true iff the test part non-fatally failed.\nstatic bool TestPartNonfatallyFailed(const TestPartResult& result) {\n  return result.nonfatally_failed();\n}\n\n// Returns true iff the test has a non-fatal failure.\nbool TestResult::HasNonfatalFailure() const {\n  return CountIf(test_part_results_, TestPartNonfatallyFailed) > 0;\n}\n\n// Gets the number of all test parts.  This is the sum of the number\n// of successful test parts and the number of failed test parts.\nint TestResult::total_part_count() const {\n  return static_cast<int>(test_part_results_.size());\n}\n\n// Returns the number of the test properties.\nint TestResult::test_property_count() const {\n  return static_cast<int>(test_properties_.size());\n}\n\n// class Test\n\n// Creates a Test object.\n\n// The c'tor saves the values of all Google Test flags.\nTest::Test()\n    : gtest_flag_saver_(new internal::GTestFlagSaver) {\n}\n\n// The d'tor restores the values of all Google Test flags.\nTest::~Test() {\n  delete gtest_flag_saver_;\n}\n\n// Sets up the test fixture.\n//\n// A sub-class may override this.\nvoid Test::SetUp() {\n}\n\n// Tears down the test fixture.\n//\n// A sub-class may override this.\nvoid Test::TearDown() {\n}\n\n// Allows user supplied key value pairs to be recorded for later output.\nvoid Test::RecordProperty(const std::string& key, const std::string& value) {\n  UnitTest::GetInstance()->RecordProperty(key, value);\n}\n\n// Allows user supplied key value pairs to be recorded for later output.\nvoid Test::RecordProperty(const std::string& key, int value) {\n  Message value_message;\n  value_message << value;\n  RecordProperty(key, value_message.GetString().c_str());\n}\n\nnamespace internal {\n\nvoid ReportFailureInUnknownLocation(TestPartResult::Type result_type,\n                                    const std::string& message) {\n  // This function is a friend of UnitTest and as such has access to\n  // AddTestPartResult.\n  UnitTest::GetInstance()->AddTestPartResult(\n      result_type,\n      NULL,  // No info about the source file where the exception occurred.\n      -1,    // We have no info on which line caused the exception.\n      message,\n      \"\");   // No stack trace, either.\n}\n\n}  // namespace internal\n\n// Google Test requires all tests in the same test case to use the same test\n// fixture class.  This function checks if the current test has the\n// same fixture class as the first test in the current test case.  If\n// yes, it returns true; otherwise it generates a Google Test failure and\n// returns false.\nbool Test::HasSameFixtureClass() {\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  const TestCase* const test_case = impl->current_test_case();\n\n  // Info about the first test in the current test case.\n  const TestInfo* const first_test_info = test_case->test_info_list()[0];\n  const internal::TypeId first_fixture_id = first_test_info->fixture_class_id_;\n  const char* const first_test_name = first_test_info->name();\n\n  // Info about the current test.\n  const TestInfo* const this_test_info = impl->current_test_info();\n  const internal::TypeId this_fixture_id = this_test_info->fixture_class_id_;\n  const char* const this_test_name = this_test_info->name();\n\n  if (this_fixture_id != first_fixture_id) {\n    // Is the first test defined using TEST?\n    const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId();\n    // Is this test defined using TEST?\n    const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId();\n\n    if (first_is_TEST || this_is_TEST) {\n      // The user mixed TEST and TEST_F in this test case - we'll tell\n      // him/her how to fix it.\n\n      // Gets the name of the TEST and the name of the TEST_F.  Note\n      // that first_is_TEST and this_is_TEST cannot both be true, as\n      // the fixture IDs are different for the two tests.\n      const char* const TEST_name =\n          first_is_TEST ? first_test_name : this_test_name;\n      const char* const TEST_F_name =\n          first_is_TEST ? this_test_name : first_test_name;\n\n      ADD_FAILURE()\n          << \"All tests in the same test case must use the same test fixture\\n\"\n          << \"class, so mixing TEST_F and TEST in the same test case is\\n\"\n          << \"illegal.  In test case \" << this_test_info->test_case_name()\n          << \",\\n\"\n          << \"test \" << TEST_F_name << \" is defined using TEST_F but\\n\"\n          << \"test \" << TEST_name << \" is defined using TEST.  You probably\\n\"\n          << \"want to change the TEST to TEST_F or move it to another test\\n\"\n          << \"case.\";\n    } else {\n      // The user defined two fixture classes with the same name in\n      // two namespaces - we'll tell him/her how to fix it.\n      ADD_FAILURE()\n          << \"All tests in the same test case must use the same test fixture\\n\"\n          << \"class.  However, in test case \"\n          << this_test_info->test_case_name() << \",\\n\"\n          << \"you defined test \" << first_test_name\n          << \" and test \" << this_test_name << \"\\n\"\n          << \"using two different test fixture classes.  This can happen if\\n\"\n          << \"the two classes are from different namespaces or translation\\n\"\n          << \"units and have the same name.  You should probably rename one\\n\"\n          << \"of the classes to put the tests into different test cases.\";\n    }\n    return false;\n  }\n\n  return true;\n}\n\n#if GTEST_HAS_SEH\n\n// Adds an \"exception thrown\" fatal failure to the current test.  This\n// function returns its result via an output parameter pointer because VC++\n// prohibits creation of objects with destructors on stack in functions\n// using __try (see error C2712).\nstatic std::string* FormatSehExceptionMessage(DWORD exception_code,\n                                              const char* location) {\n  Message message;\n  message << \"SEH exception with code 0x\" << std::setbase(16) <<\n    exception_code << std::setbase(10) << \" thrown in \" << location << \".\";\n\n  return new std::string(message.GetString());\n}\n\n#endif  // GTEST_HAS_SEH\n\nnamespace internal {\n\n#if GTEST_HAS_EXCEPTIONS\n\n// Adds an \"exception thrown\" fatal failure to the current test.\nstatic std::string FormatCxxExceptionMessage(const char* description,\n                                             const char* location) {\n  Message message;\n  if (description != NULL) {\n    message << \"C++ exception with description \\\"\" << description << \"\\\"\";\n  } else {\n    message << \"Unknown C++ exception\";\n  }\n  message << \" thrown in \" << location << \".\";\n\n  return message.GetString();\n}\n\nstatic std::string PrintTestPartResultToString(\n    const TestPartResult& test_part_result);\n\nGoogleTestFailureException::GoogleTestFailureException(\n    const TestPartResult& failure)\n    : ::std::runtime_error(PrintTestPartResultToString(failure).c_str()) {}\n\n#endif  // GTEST_HAS_EXCEPTIONS\n\n// We put these helper functions in the internal namespace as IBM's xlC\n// compiler rejects the code if they were declared static.\n\n// Runs the given method and handles SEH exceptions it throws, when\n// SEH is supported; returns the 0-value for type Result in case of an\n// SEH exception.  (Microsoft compilers cannot handle SEH and C++\n// exceptions in the same function.  Therefore, we provide a separate\n// wrapper function for handling SEH exceptions.)\ntemplate <class T, typename Result>\nResult HandleSehExceptionsInMethodIfSupported(\n    T* object, Result (T::*method)(), const char* location) {\n#if GTEST_HAS_SEH\n  __try {\n    return (object->*method)();\n  } __except (internal::UnitTestOptions::GTestShouldProcessSEH(  // NOLINT\n      GetExceptionCode())) {\n    // We create the exception message on the heap because VC++ prohibits\n    // creation of objects with destructors on stack in functions using __try\n    // (see error C2712).\n    std::string* exception_message = FormatSehExceptionMessage(\n        GetExceptionCode(), location);\n    internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure,\n                                             *exception_message);\n    delete exception_message;\n    return static_cast<Result>(0);\n  }\n#else\n  (void)location;\n  return (object->*method)();\n#endif  // GTEST_HAS_SEH\n}\n\n// Runs the given method and catches and reports C++ and/or SEH-style\n// exceptions, if they are supported; returns the 0-value for type\n// Result in case of an SEH exception.\ntemplate <class T, typename Result>\nResult HandleExceptionsInMethodIfSupported(\n    T* object, Result (T::*method)(), const char* location) {\n  // NOTE: The user code can affect the way in which Google Test handles\n  // exceptions by setting GTEST_FLAG(catch_exceptions), but only before\n  // RUN_ALL_TESTS() starts. It is technically possible to check the flag\n  // after the exception is caught and either report or re-throw the\n  // exception based on the flag's value:\n  //\n  // try {\n  //   // Perform the test method.\n  // } catch (...) {\n  //   if (GTEST_FLAG(catch_exceptions))\n  //     // Report the exception as failure.\n  //   else\n  //     throw;  // Re-throws the original exception.\n  // }\n  //\n  // However, the purpose of this flag is to allow the program to drop into\n  // the debugger when the exception is thrown. On most platforms, once the\n  // control enters the catch block, the exception origin information is\n  // lost and the debugger will stop the program at the point of the\n  // re-throw in this function -- instead of at the point of the original\n  // throw statement in the code under test.  For this reason, we perform\n  // the check early, sacrificing the ability to affect Google Test's\n  // exception handling in the method where the exception is thrown.\n  if (internal::GetUnitTestImpl()->catch_exceptions()) {\n#if GTEST_HAS_EXCEPTIONS\n    try {\n      return HandleSehExceptionsInMethodIfSupported(object, method, location);\n    } catch (const internal::GoogleTestFailureException&) {  // NOLINT\n      // This exception type can only be thrown by a failed Google\n      // Test assertion with the intention of letting another testing\n      // framework catch it.  Therefore we just re-throw it.\n      throw;\n    } catch (const std::exception& e) {  // NOLINT\n      internal::ReportFailureInUnknownLocation(\n          TestPartResult::kFatalFailure,\n          FormatCxxExceptionMessage(e.what(), location));\n    } catch (...) {  // NOLINT\n      internal::ReportFailureInUnknownLocation(\n          TestPartResult::kFatalFailure,\n          FormatCxxExceptionMessage(NULL, location));\n    }\n    return static_cast<Result>(0);\n#else\n    return HandleSehExceptionsInMethodIfSupported(object, method, location);\n#endif  // GTEST_HAS_EXCEPTIONS\n  } else {\n    return (object->*method)();\n  }\n}\n\n}  // namespace internal\n\n// Runs the test and updates the test result.\nvoid Test::Run() {\n  if (!HasSameFixtureClass()) return;\n\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n  internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, \"SetUp()\");\n  // We will run the test only if SetUp() was successful.\n  if (!HasFatalFailure()) {\n    impl->os_stack_trace_getter()->UponLeavingGTest();\n    internal::HandleExceptionsInMethodIfSupported(\n        this, &Test::TestBody, \"the test body\");\n  }\n\n  // However, we want to clean up as much as possible.  Hence we will\n  // always call TearDown(), even if SetUp() or the test body has\n  // failed.\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n  internal::HandleExceptionsInMethodIfSupported(\n      this, &Test::TearDown, \"TearDown()\");\n}\n\n// Returns true iff the current test has a fatal failure.\nbool Test::HasFatalFailure() {\n  return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure();\n}\n\n// Returns true iff the current test has a non-fatal failure.\nbool Test::HasNonfatalFailure() {\n  return internal::GetUnitTestImpl()->current_test_result()->\n      HasNonfatalFailure();\n}\n\n// class TestInfo\n\n// Constructs a TestInfo object. It assumes ownership of the test factory\n// object.\nTestInfo::TestInfo(const std::string& a_test_case_name,\n                   const std::string& a_name,\n                   const char* a_type_param,\n                   const char* a_value_param,\n                   internal::TypeId fixture_class_id,\n                   internal::TestFactoryBase* factory)\n    : test_case_name_(a_test_case_name),\n      name_(a_name),\n      type_param_(a_type_param ? new std::string(a_type_param) : NULL),\n      value_param_(a_value_param ? new std::string(a_value_param) : NULL),\n      fixture_class_id_(fixture_class_id),\n      should_run_(false),\n      is_disabled_(false),\n      matches_filter_(false),\n      factory_(factory),\n      result_() {}\n\n// Destructs a TestInfo object.\nTestInfo::~TestInfo() { delete factory_; }\n\nnamespace internal {\n\n// Creates a new TestInfo object and registers it with Google Test;\n// returns the created object.\n//\n// Arguments:\n//\n//   test_case_name:   name of the test case\n//   name:             name of the test\n//   type_param:       the name of the test's type parameter, or NULL if\n//                     this is not a typed or a type-parameterized test.\n//   value_param:      text representation of the test's value parameter,\n//                     or NULL if this is not a value-parameterized test.\n//   fixture_class_id: ID of the test fixture class\n//   set_up_tc:        pointer to the function that sets up the test case\n//   tear_down_tc:     pointer to the function that tears down the test case\n//   factory:          pointer to the factory that creates a test object.\n//                     The newly created TestInfo instance will assume\n//                     ownership of the factory object.\nTestInfo* MakeAndRegisterTestInfo(\n    const char* test_case_name,\n    const char* name,\n    const char* type_param,\n    const char* value_param,\n    TypeId fixture_class_id,\n    SetUpTestCaseFunc set_up_tc,\n    TearDownTestCaseFunc tear_down_tc,\n    TestFactoryBase* factory) {\n  TestInfo* const test_info =\n      new TestInfo(test_case_name, name, type_param, value_param,\n                   fixture_class_id, factory);\n  GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info);\n  return test_info;\n}\n\n#if GTEST_HAS_PARAM_TEST\nvoid ReportInvalidTestCaseType(const char* test_case_name,\n                               const char* file, int line) {\n  Message errors;\n  errors\n      << \"Attempted redefinition of test case \" << test_case_name << \".\\n\"\n      << \"All tests in the same test case must use the same test fixture\\n\"\n      << \"class.  However, in test case \" << test_case_name << \", you tried\\n\"\n      << \"to define a test using a fixture class different from the one\\n\"\n      << \"used earlier. This can happen if the two fixture classes are\\n\"\n      << \"from different namespaces and have the same name. You should\\n\"\n      << \"probably rename one of the classes to put the tests into different\\n\"\n      << \"test cases.\";\n\n  fprintf(stderr, \"%s %s\", FormatFileLocation(file, line).c_str(),\n          errors.GetString().c_str());\n}\n#endif  // GTEST_HAS_PARAM_TEST\n\n}  // namespace internal\n\nnamespace {\n\n// A predicate that checks the test name of a TestInfo against a known\n// value.\n//\n// This is used for implementation of the TestCase class only.  We put\n// it in the anonymous namespace to prevent polluting the outer\n// namespace.\n//\n// TestNameIs is copyable.\nclass TestNameIs {\n public:\n  // Constructor.\n  //\n  // TestNameIs has NO default constructor.\n  explicit TestNameIs(const char* name)\n      : name_(name) {}\n\n  // Returns true iff the test name of test_info matches name_.\n  bool operator()(const TestInfo * test_info) const {\n    return test_info && test_info->name() == name_;\n  }\n\n private:\n  std::string name_;\n};\n\n}  // namespace\n\nnamespace internal {\n\n// This method expands all parameterized tests registered with macros TEST_P\n// and INSTANTIATE_TEST_CASE_P into regular tests and registers those.\n// This will be done just once during the program runtime.\nvoid UnitTestImpl::RegisterParameterizedTests() {\n#if GTEST_HAS_PARAM_TEST\n  if (!parameterized_tests_registered_) {\n    parameterized_test_registry_.RegisterTests();\n    parameterized_tests_registered_ = true;\n  }\n#endif\n}\n\n}  // namespace internal\n\n// Creates the test object, runs it, records its result, and then\n// deletes it.\nvoid TestInfo::Run() {\n  if (!should_run_) return;\n\n  // Tells UnitTest where to store test result.\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  impl->set_current_test_info(this);\n\n  TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();\n\n  // Notifies the unit test event listeners that a test is about to start.\n  repeater->OnTestStart(*this);\n\n  const TimeInMillis start = internal::GetTimeInMillis();\n\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n\n  // Creates the test object.\n  Test* const test = internal::HandleExceptionsInMethodIfSupported(\n      factory_, &internal::TestFactoryBase::CreateTest,\n      \"the test fixture's constructor\");\n\n  // Runs the test only if the test object was created and its\n  // constructor didn't generate a fatal failure.\n  if ((test != NULL) && !Test::HasFatalFailure()) {\n    // This doesn't throw as all user code that can throw are wrapped into\n    // exception handling code.\n    test->Run();\n  }\n\n  // Deletes the test object.\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n  internal::HandleExceptionsInMethodIfSupported(\n      test, &Test::DeleteSelf_, \"the test fixture's destructor\");\n\n  result_.set_elapsed_time(internal::GetTimeInMillis() - start);\n\n  // Notifies the unit test event listener that a test has just finished.\n  repeater->OnTestEnd(*this);\n\n  // Tells UnitTest to stop associating assertion results to this\n  // test.\n  impl->set_current_test_info(NULL);\n}\n\n// class TestCase\n\n// Gets the number of successful tests in this test case.\nint TestCase::successful_test_count() const {\n  return CountIf(test_info_list_, TestPassed);\n}\n\n// Gets the number of failed tests in this test case.\nint TestCase::failed_test_count() const {\n  return CountIf(test_info_list_, TestFailed);\n}\n\n// Gets the number of disabled tests that will be reported in the XML report.\nint TestCase::reportable_disabled_test_count() const {\n  return CountIf(test_info_list_, TestReportableDisabled);\n}\n\n// Gets the number of disabled tests in this test case.\nint TestCase::disabled_test_count() const {\n  return CountIf(test_info_list_, TestDisabled);\n}\n\n// Gets the number of tests to be printed in the XML report.\nint TestCase::reportable_test_count() const {\n  return CountIf(test_info_list_, TestReportable);\n}\n\n// Get the number of tests in this test case that should run.\nint TestCase::test_to_run_count() const {\n  return CountIf(test_info_list_, ShouldRunTest);\n}\n\n// Gets the number of all tests.\nint TestCase::total_test_count() const {\n  return static_cast<int>(test_info_list_.size());\n}\n\n// Creates a TestCase with the given name.\n//\n// Arguments:\n//\n//   name:         name of the test case\n//   a_type_param: the name of the test case's type parameter, or NULL if\n//                 this is not a typed or a type-parameterized test case.\n//   set_up_tc:    pointer to the function that sets up the test case\n//   tear_down_tc: pointer to the function that tears down the test case\nTestCase::TestCase(const char* a_name, const char* a_type_param,\n                   Test::SetUpTestCaseFunc set_up_tc,\n                   Test::TearDownTestCaseFunc tear_down_tc)\n    : name_(a_name),\n      type_param_(a_type_param ? new std::string(a_type_param) : NULL),\n      set_up_tc_(set_up_tc),\n      tear_down_tc_(tear_down_tc),\n      should_run_(false),\n      elapsed_time_(0) {\n}\n\n// Destructor of TestCase.\nTestCase::~TestCase() {\n  // Deletes every Test in the collection.\n  ForEach(test_info_list_, internal::Delete<TestInfo>);\n}\n\n// Returns the i-th test among all the tests. i can range from 0 to\n// total_test_count() - 1. If i is not in that range, returns NULL.\nconst TestInfo* TestCase::GetTestInfo(int i) const {\n  const int index = GetElementOr(test_indices_, i, -1);\n  return index < 0 ? NULL : test_info_list_[index];\n}\n\n// Returns the i-th test among all the tests. i can range from 0 to\n// total_test_count() - 1. If i is not in that range, returns NULL.\nTestInfo* TestCase::GetMutableTestInfo(int i) {\n  const int index = GetElementOr(test_indices_, i, -1);\n  return index < 0 ? NULL : test_info_list_[index];\n}\n\n// Adds a test to this test case.  Will delete the test upon\n// destruction of the TestCase object.\nvoid TestCase::AddTestInfo(TestInfo * test_info) {\n  test_info_list_.push_back(test_info);\n  test_indices_.push_back(static_cast<int>(test_indices_.size()));\n}\n\n// Runs every test in this TestCase.\nvoid TestCase::Run() {\n  if (!should_run_) return;\n\n  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();\n  impl->set_current_test_case(this);\n\n  TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();\n\n  repeater->OnTestCaseStart(*this);\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n  internal::HandleExceptionsInMethodIfSupported(\n      this, &TestCase::RunSetUpTestCase, \"SetUpTestCase()\");\n\n  const internal::TimeInMillis start = internal::GetTimeInMillis();\n  for (int i = 0; i < total_test_count(); i++) {\n    GetMutableTestInfo(i)->Run();\n  }\n  elapsed_time_ = internal::GetTimeInMillis() - start;\n\n  impl->os_stack_trace_getter()->UponLeavingGTest();\n  internal::HandleExceptionsInMethodIfSupported(\n      this, &TestCase::RunTearDownTestCase, \"TearDownTestCase()\");\n\n  repeater->OnTestCaseEnd(*this);\n  impl->set_current_test_case(NULL);\n}\n\n// Clears the results of all tests in this test case.\nvoid TestCase::ClearResult() {\n  ad_hoc_test_result_.Clear();\n  ForEach(test_info_list_, TestInfo::ClearTestResult);\n}\n\n// Shuffles the tests in this test case.\nvoid TestCase::ShuffleTests(internal::Random* random) {\n  Shuffle(random, &test_indices_);\n}\n\n// Restores the test order to before the first shuffle.\nvoid TestCase::UnshuffleTests() {\n  for (size_t i = 0; i < test_indices_.size(); i++) {\n    test_indices_[i] = static_cast<int>(i);\n  }\n}\n\n// Formats a countable noun.  Depending on its quantity, either the\n// singular form or the plural form is used. e.g.\n//\n// FormatCountableNoun(1, \"formula\", \"formuli\") returns \"1 formula\".\n// FormatCountableNoun(5, \"book\", \"books\") returns \"5 books\".\nstatic std::string FormatCountableNoun(int count,\n                                       const char * singular_form,\n                                       const char * plural_form) {\n  return internal::StreamableToString(count) + \" \" +\n      (count == 1 ? singular_form : plural_form);\n}\n\n// Formats the count of tests.\nstatic std::string FormatTestCount(int test_count) {\n  return FormatCountableNoun(test_count, \"test\", \"tests\");\n}\n\n// Formats the count of test cases.\nstatic std::string FormatTestCaseCount(int test_case_count) {\n  return FormatCountableNoun(test_case_count, \"test case\", \"test cases\");\n}\n\n// Converts a TestPartResult::Type enum to human-friendly string\n// representation.  Both kNonFatalFailure and kFatalFailure are translated\n// to \"Failure\", as the user usually doesn't care about the difference\n// between the two when viewing the test result.\nstatic const char * TestPartResultTypeToString(TestPartResult::Type type) {\n  switch (type) {\n    case TestPartResult::kSuccess:\n      return \"Success\";\n\n    case TestPartResult::kNonFatalFailure:\n    case TestPartResult::kFatalFailure:\n#ifdef _MSC_VER\n      return \"error: \";\n#else\n      return \"Failure\\n\";\n#endif\n    default:\n      return \"Unknown result type\";\n  }\n}\n\nnamespace internal {\n\n// Prints a TestPartResult to an std::string.\nstatic std::string PrintTestPartResultToString(\n    const TestPartResult& test_part_result) {\n  return (Message()\n          << internal::FormatFileLocation(test_part_result.file_name(),\n                                          test_part_result.line_number())\n          << \" \" << TestPartResultTypeToString(test_part_result.type())\n          << test_part_result.message()).GetString();\n}\n\n// Prints a TestPartResult.\nstatic void PrintTestPartResult(const TestPartResult& test_part_result) {\n  const std::string& result =\n      PrintTestPartResultToString(test_part_result);\n  printf(\"%s\\n\", result.c_str());\n  fflush(stdout);\n  // If the test program runs in Visual Studio or a debugger, the\n  // following statements add the test part result message to the Output\n  // window such that the user can double-click on it to jump to the\n  // corresponding source code location; otherwise they do nothing.\n#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE\n  // We don't call OutputDebugString*() on Windows Mobile, as printing\n  // to stdout is done by OutputDebugString() there already - we don't\n  // want the same message printed twice.\n  ::OutputDebugStringA(result.c_str());\n  ::OutputDebugStringA(\"\\n\");\n#endif\n}\n\n// class PrettyUnitTestResultPrinter\n\nenum GTestColor {\n  COLOR_DEFAULT,\n  COLOR_RED,\n  COLOR_GREEN,\n  COLOR_YELLOW\n};\n\n#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE\n\n// Returns the character attribute for the given color.\nWORD GetColorAttribute(GTestColor color) {\n  switch (color) {\n    case COLOR_RED:    return FOREGROUND_RED;\n    case COLOR_GREEN:  return FOREGROUND_GREEN;\n    case COLOR_YELLOW: return FOREGROUND_RED | FOREGROUND_GREEN;\n    default:           return 0;\n  }\n}\n\n#else\n\n// Returns the ANSI color code for the given color.  COLOR_DEFAULT is\n// an invalid input.\nconst char* GetAnsiColorCode(GTestColor color) {\n  switch (color) {\n    case COLOR_RED:     return \"1\";\n    case COLOR_GREEN:   return \"2\";\n    case COLOR_YELLOW:  return \"3\";\n    default:            return NULL;\n  };\n}\n\n#endif  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE\n\n// Returns true iff Google Test should use colors in the output.\nbool ShouldUseColor(bool stdout_is_tty) {\n  const char* const gtest_color = GTEST_FLAG(color).c_str();\n\n  if (String::CaseInsensitiveCStringEquals(gtest_color, \"auto\")) {\n#if GTEST_OS_WINDOWS\n    // On Windows the TERM variable is usually not set, but the\n    // console there does support colors.\n    return stdout_is_tty;\n#else\n    // On non-Windows platforms, we rely on the TERM variable.\n    const char* const term = posix::GetEnv(\"TERM\");\n    const bool term_supports_color =\n        String::CStringEquals(term, \"xterm\") ||\n        String::CStringEquals(term, \"xterm-color\") ||\n        String::CStringEquals(term, \"xterm-256color\") ||\n        String::CStringEquals(term, \"screen\") ||\n        String::CStringEquals(term, \"screen-256color\") ||\n        String::CStringEquals(term, \"linux\") ||\n        String::CStringEquals(term, \"cygwin\");\n    return stdout_is_tty && term_supports_color;\n#endif  // GTEST_OS_WINDOWS\n  }\n\n  return String::CaseInsensitiveCStringEquals(gtest_color, \"yes\") ||\n      String::CaseInsensitiveCStringEquals(gtest_color, \"true\") ||\n      String::CaseInsensitiveCStringEquals(gtest_color, \"t\") ||\n      String::CStringEquals(gtest_color, \"1\");\n  // We take \"yes\", \"true\", \"t\", and \"1\" as meaning \"yes\".  If the\n  // value is neither one of these nor \"auto\", we treat it as \"no\" to\n  // be conservative.\n}\n\n// Helpers for printing colored strings to stdout. Note that on Windows, we\n// cannot simply emit special characters and have the terminal change colors.\n// This routine must actually emit the characters rather than return a string\n// that would be colored when printed, as can be done on Linux.\nvoid ColoredPrintf(GTestColor color, const char* fmt, ...) {\n  va_list args;\n  va_start(args, fmt);\n\n#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS || GTEST_OS_IOS\n  const bool use_color = false;\n#else\n  static const bool in_color_mode =\n      ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0);\n  const bool use_color = in_color_mode && (color != COLOR_DEFAULT);\n#endif  // GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS\n  // The '!= 0' comparison is necessary to satisfy MSVC 7.1.\n\n  if (!use_color) {\n    vprintf(fmt, args);\n    va_end(args);\n    return;\n  }\n\n#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE\n  const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);\n\n  // Gets the current text color.\n  CONSOLE_SCREEN_BUFFER_INFO buffer_info;\n  GetConsoleScreenBufferInfo(stdout_handle, &buffer_info);\n  const WORD old_color_attrs = buffer_info.wAttributes;\n\n  // We need to flush the stream buffers into the console before each\n  // SetConsoleTextAttribute call lest it affect the text that is already\n  // printed but has not yet reached the console.\n  fflush(stdout);\n  SetConsoleTextAttribute(stdout_handle,\n                          GetColorAttribute(color) | FOREGROUND_INTENSITY);\n  vprintf(fmt, args);\n\n  fflush(stdout);\n  // Restores the text color.\n  SetConsoleTextAttribute(stdout_handle, old_color_attrs);\n#else\n  printf(\"\\033[0;3%sm\", GetAnsiColorCode(color));\n  vprintf(fmt, args);\n  printf(\"\\033[m\");  // Resets the terminal to default.\n#endif  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE\n  va_end(args);\n}\n\n// Text printed in Google Test's text output and --gunit_list_tests\n// output to label the type parameter and value parameter for a test.\nstatic const char kTypeParamLabel[] = \"TypeParam\";\nstatic const char kValueParamLabel[] = \"GetParam()\";\n\nvoid PrintFullTestCommentIfPresent(const TestInfo& test_info) {\n  const char* const type_param = test_info.type_param();\n  const char* const value_param = test_info.value_param();\n\n  if (type_param != NULL || value_param != NULL) {\n    printf(\", where \");\n    if (type_param != NULL) {\n      printf(\"%s = %s\", kTypeParamLabel, type_param);\n      if (value_param != NULL)\n        printf(\" and \");\n    }\n    if (value_param != NULL) {\n      printf(\"%s = %s\", kValueParamLabel, value_param);\n    }\n  }\n}\n\n// This class implements the TestEventListener interface.\n//\n// Class PrettyUnitTestResultPrinter is copyable.\nclass PrettyUnitTestResultPrinter : public TestEventListener {\n public:\n  PrettyUnitTestResultPrinter() {}\n  static void PrintTestName(const char * test_case, const char * test) {\n    printf(\"%s.%s\", test_case, test);\n  }\n\n  // The following methods override what's in the TestEventListener class.\n  virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}\n  virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration);\n  virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test);\n  virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}\n  virtual void OnTestCaseStart(const TestCase& test_case);\n  virtual void OnTestStart(const TestInfo& test_info);\n  virtual void OnTestPartResult(const TestPartResult& result);\n  virtual void OnTestEnd(const TestInfo& test_info);\n  virtual void OnTestCaseEnd(const TestCase& test_case);\n  virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test);\n  virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {}\n  virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);\n  virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}\n\n private:\n  static void PrintFailedTests(const UnitTest& unit_test);\n};\n\n  // Fired before each iteration of tests starts.\nvoid PrettyUnitTestResultPrinter::OnTestIterationStart(\n    const UnitTest& unit_test, int iteration) {\n  if (GTEST_FLAG(repeat) != 1)\n    printf(\"\\nRepeating all tests (iteration %d) . . .\\n\\n\", iteration + 1);\n\n  const char* const filter = GTEST_FLAG(filter).c_str();\n\n  // Prints the filter if it's not *.  This reminds the user that some\n  // tests may be skipped.\n  if (!String::CStringEquals(filter, kUniversalFilter)) {\n    ColoredPrintf(COLOR_YELLOW,\n                  \"Note: %s filter = %s\\n\", GTEST_NAME_, filter);\n  }\n\n  if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {\n    const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);\n    ColoredPrintf(COLOR_YELLOW,\n                  \"Note: This is test shard %d of %s.\\n\",\n                  static_cast<int>(shard_index) + 1,\n                  internal::posix::GetEnv(kTestTotalShards));\n  }\n\n  if (GTEST_FLAG(shuffle)) {\n    ColoredPrintf(COLOR_YELLOW,\n                  \"Note: Randomizing tests' orders with a seed of %d .\\n\",\n                  unit_test.random_seed());\n  }\n\n  ColoredPrintf(COLOR_GREEN,  \"[==========] \");\n  printf(\"Running %s from %s.\\n\",\n         FormatTestCount(unit_test.test_to_run_count()).c_str(),\n         FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart(\n    const UnitTest& /*unit_test*/) {\n  ColoredPrintf(COLOR_GREEN,  \"[----------] \");\n  printf(\"Global test environment set-up.\\n\");\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) {\n  const std::string counts =\n      FormatCountableNoun(test_case.test_to_run_count(), \"test\", \"tests\");\n  ColoredPrintf(COLOR_GREEN, \"[----------] \");\n  printf(\"%s from %s\", counts.c_str(), test_case.name());\n  if (test_case.type_param() == NULL) {\n    printf(\"\\n\");\n  } else {\n    printf(\", where %s = %s\\n\", kTypeParamLabel, test_case.type_param());\n  }\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) {\n  ColoredPrintf(COLOR_GREEN,  \"[ RUN      ] \");\n  PrintTestName(test_info.test_case_name(), test_info.name());\n  printf(\"\\n\");\n  fflush(stdout);\n}\n\n// Called after an assertion failure.\nvoid PrettyUnitTestResultPrinter::OnTestPartResult(\n    const TestPartResult& result) {\n  // If the test part succeeded, we don't need to do anything.\n  if (result.type() == TestPartResult::kSuccess)\n    return;\n\n  // Print failure message from the assertion (e.g. expected this and got that).\n  PrintTestPartResult(result);\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo& test_info) {\n  if (test_info.result()->Passed()) {\n    ColoredPrintf(COLOR_GREEN, \"[       OK ] \");\n  } else {\n    ColoredPrintf(COLOR_RED, \"[  FAILED  ] \");\n  }\n  PrintTestName(test_info.test_case_name(), test_info.name());\n  if (test_info.result()->Failed())\n    PrintFullTestCommentIfPresent(test_info);\n\n  if (GTEST_FLAG(print_time)) {\n    printf(\" (%s ms)\\n\", internal::StreamableToString(\n           test_info.result()->elapsed_time()).c_str());\n  } else {\n    printf(\"\\n\");\n  }\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestCase& test_case) {\n  if (!GTEST_FLAG(print_time)) return;\n\n  const std::string counts =\n      FormatCountableNoun(test_case.test_to_run_count(), \"test\", \"tests\");\n  ColoredPrintf(COLOR_GREEN, \"[----------] \");\n  printf(\"%s from %s (%s ms total)\\n\\n\",\n         counts.c_str(), test_case.name(),\n         internal::StreamableToString(test_case.elapsed_time()).c_str());\n  fflush(stdout);\n}\n\nvoid PrettyUnitTestResultPrinter::OnEnvironmentsTearDownStart(\n    const UnitTest& /*unit_test*/) {\n  ColoredPrintf(COLOR_GREEN,  \"[----------] \");\n  printf(\"Global test environment tear-down\\n\");\n  fflush(stdout);\n}\n\n// Internal helper for printing the list of failed tests.\nvoid PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) {\n  const int failed_test_count = unit_test.failed_test_count();\n  if (failed_test_count == 0) {\n    return;\n  }\n\n  for (int i = 0; i < unit_test.total_test_case_count(); ++i) {\n    const TestCase& test_case = *unit_test.GetTestCase(i);\n    if (!test_case.should_run() || (test_case.failed_test_count() == 0)) {\n      continue;\n    }\n    for (int j = 0; j < test_case.total_test_count(); ++j) {\n      const TestInfo& test_info = *test_case.GetTestInfo(j);\n      if (!test_info.should_run() || test_info.result()->Passed()) {\n        continue;\n      }\n      ColoredPrintf(COLOR_RED, \"[  FAILED  ] \");\n      printf(\"%s.%s\", test_case.name(), test_info.name());\n      PrintFullTestCommentIfPresent(test_info);\n      printf(\"\\n\");\n    }\n  }\n}\n\nvoid PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,\n                                                     int /*iteration*/) {\n  ColoredPrintf(COLOR_GREEN,  \"[==========] \");\n  printf(\"%s from %s ran.\",\n         FormatTestCount(unit_test.test_to_run_count()).c_str(),\n         FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());\n  if (GTEST_FLAG(print_time)) {\n    printf(\" (%s ms total)\",\n           internal::StreamableToString(unit_test.elapsed_time()).c_str());\n  }\n  printf(\"\\n\");\n  ColoredPrintf(COLOR_GREEN,  \"[  PASSED  ] \");\n  printf(\"%s.\\n\", FormatTestCount(unit_test.successful_test_count()).c_str());\n\n  int num_failures = unit_test.failed_test_count();\n  if (!unit_test.Passed()) {\n    const int failed_test_count = unit_test.failed_test_count();\n    ColoredPrintf(COLOR_RED,  \"[  FAILED  ] \");\n    printf(\"%s, listed below:\\n\", FormatTestCount(failed_test_count).c_str());\n    PrintFailedTests(unit_test);\n    printf(\"\\n%2d FAILED %s\\n\", num_failures,\n                        num_failures == 1 ? \"TEST\" : \"TESTS\");\n  }\n\n  int num_disabled = unit_test.reportable_disabled_test_count();\n  if (num_disabled && !GTEST_FLAG(also_run_disabled_tests)) {\n    if (!num_failures) {\n      printf(\"\\n\");  // Add a spacer if no FAILURE banner is displayed.\n    }\n    ColoredPrintf(COLOR_YELLOW,\n                  \"  YOU HAVE %d DISABLED %s\\n\\n\",\n                  num_disabled,\n                  num_disabled == 1 ? \"TEST\" : \"TESTS\");\n  }\n  // Ensure that Google Test output is printed before, e.g., heapchecker output.\n  fflush(stdout);\n}\n\n// End PrettyUnitTestResultPrinter\n\n// class TestEventRepeater\n//\n// This class forwards events to other event listeners.\nclass TestEventRepeater : public TestEventListener {\n public:\n  TestEventRepeater() : forwarding_enabled_(true) {}\n  virtual ~TestEventRepeater();\n  void Append(TestEventListener *listener);\n  TestEventListener* Release(TestEventListener* listener);\n\n  // Controls whether events will be forwarded to listeners_. Set to false\n  // in death test child processes.\n  bool forwarding_enabled() const { return forwarding_enabled_; }\n  void set_forwarding_enabled(bool enable) { forwarding_enabled_ = enable; }\n\n  virtual void OnTestProgramStart(const UnitTest& unit_test);\n  virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration);\n  virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test);\n  virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test);\n  virtual void OnTestCaseStart(const TestCase& test_case);\n  virtual void OnTestStart(const TestInfo& test_info);\n  virtual void OnTestPartResult(const TestPartResult& result);\n  virtual void OnTestEnd(const TestInfo& test_info);\n  virtual void OnTestCaseEnd(const TestCase& test_case);\n  virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test);\n  virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test);\n  virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);\n  virtual void OnTestProgramEnd(const UnitTest& unit_test);\n\n private:\n  // Controls whether events will be forwarded to listeners_. Set to false\n  // in death test child processes.\n  bool forwarding_enabled_;\n  // The list of listeners that receive events.\n  std::vector<TestEventListener*> listeners_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventRepeater);\n};\n\nTestEventRepeater::~TestEventRepeater() {\n  ForEach(listeners_, Delete<TestEventListener>);\n}\n\nvoid TestEventRepeater::Append(TestEventListener *listener) {\n  listeners_.push_back(listener);\n}\n\n// TODO(vladl@google.com): Factor the search functionality into Vector::Find.\nTestEventListener* TestEventRepeater::Release(TestEventListener *listener) {\n  for (size_t i = 0; i < listeners_.size(); ++i) {\n    if (listeners_[i] == listener) {\n      listeners_.erase(listeners_.begin() + i);\n      return listener;\n    }\n  }\n\n  return NULL;\n}\n\n// Since most methods are very similar, use macros to reduce boilerplate.\n// This defines a member that forwards the call to all listeners.\n#define GTEST_REPEATER_METHOD_(Name, Type) \\\nvoid TestEventRepeater::Name(const Type& parameter) { \\\n  if (forwarding_enabled_) { \\\n    for (size_t i = 0; i < listeners_.size(); i++) { \\\n      listeners_[i]->Name(parameter); \\\n    } \\\n  } \\\n}\n// This defines a member that forwards the call to all listeners in reverse\n// order.\n#define GTEST_REVERSE_REPEATER_METHOD_(Name, Type) \\\nvoid TestEventRepeater::Name(const Type& parameter) { \\\n  if (forwarding_enabled_) { \\\n    for (int i = static_cast<int>(listeners_.size()) - 1; i >= 0; i--) { \\\n      listeners_[i]->Name(parameter); \\\n    } \\\n  } \\\n}\n\nGTEST_REPEATER_METHOD_(OnTestProgramStart, UnitTest)\nGTEST_REPEATER_METHOD_(OnEnvironmentsSetUpStart, UnitTest)\nGTEST_REPEATER_METHOD_(OnTestCaseStart, TestCase)\nGTEST_REPEATER_METHOD_(OnTestStart, TestInfo)\nGTEST_REPEATER_METHOD_(OnTestPartResult, TestPartResult)\nGTEST_REPEATER_METHOD_(OnEnvironmentsTearDownStart, UnitTest)\nGTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsSetUpEnd, UnitTest)\nGTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsTearDownEnd, UnitTest)\nGTEST_REVERSE_REPEATER_METHOD_(OnTestEnd, TestInfo)\nGTEST_REVERSE_REPEATER_METHOD_(OnTestCaseEnd, TestCase)\nGTEST_REVERSE_REPEATER_METHOD_(OnTestProgramEnd, UnitTest)\n\n#undef GTEST_REPEATER_METHOD_\n#undef GTEST_REVERSE_REPEATER_METHOD_\n\nvoid TestEventRepeater::OnTestIterationStart(const UnitTest& unit_test,\n                                             int iteration) {\n  if (forwarding_enabled_) {\n    for (size_t i = 0; i < listeners_.size(); i++) {\n      listeners_[i]->OnTestIterationStart(unit_test, iteration);\n    }\n  }\n}\n\nvoid TestEventRepeater::OnTestIterationEnd(const UnitTest& unit_test,\n                                           int iteration) {\n  if (forwarding_enabled_) {\n    for (int i = static_cast<int>(listeners_.size()) - 1; i >= 0; i--) {\n      listeners_[i]->OnTestIterationEnd(unit_test, iteration);\n    }\n  }\n}\n\n// End TestEventRepeater\n\n// This class generates an XML output file.\nclass XmlUnitTestResultPrinter : public EmptyTestEventListener {\n public:\n  explicit XmlUnitTestResultPrinter(const char* output_file);\n\n  virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration);\n\n private:\n  // Is c a whitespace character that is normalized to a space character\n  // when it appears in an XML attribute value?\n  static bool IsNormalizableWhitespace(char c) {\n    return c == 0x9 || c == 0xA || c == 0xD;\n  }\n\n  // May c appear in a well-formed XML document?\n  static bool IsValidXmlCharacter(char c) {\n    return IsNormalizableWhitespace(c) || c >= 0x20;\n  }\n\n  // Returns an XML-escaped copy of the input string str.  If\n  // is_attribute is true, the text is meant to appear as an attribute\n  // value, and normalizable whitespace is preserved by replacing it\n  // with character references.\n  static std::string EscapeXml(const std::string& str, bool is_attribute);\n\n  // Returns the given string with all characters invalid in XML removed.\n  static std::string RemoveInvalidXmlCharacters(const std::string& str);\n\n  // Convenience wrapper around EscapeXml when str is an attribute value.\n  static std::string EscapeXmlAttribute(const std::string& str) {\n    return EscapeXml(str, true);\n  }\n\n  // Convenience wrapper around EscapeXml when str is not an attribute value.\n  static std::string EscapeXmlText(const char* str) {\n    return EscapeXml(str, false);\n  }\n\n  // Verifies that the given attribute belongs to the given element and\n  // streams the attribute as XML.\n  static void OutputXmlAttribute(std::ostream* stream,\n                                 const std::string& element_name,\n                                 const std::string& name,\n                                 const std::string& value);\n\n  // Streams an XML CDATA section, escaping invalid CDATA sequences as needed.\n  static void OutputXmlCDataSection(::std::ostream* stream, const char* data);\n\n  // Streams an XML representation of a TestInfo object.\n  static void OutputXmlTestInfo(::std::ostream* stream,\n                                const char* test_case_name,\n                                const TestInfo& test_info);\n\n  // Prints an XML representation of a TestCase object\n  static void PrintXmlTestCase(::std::ostream* stream,\n                               const TestCase& test_case);\n\n  // Prints an XML summary of unit_test to output stream out.\n  static void PrintXmlUnitTest(::std::ostream* stream,\n                               const UnitTest& unit_test);\n\n  // Produces a string representing the test properties in a result as space\n  // delimited XML attributes based on the property key=\"value\" pairs.\n  // When the std::string is not empty, it includes a space at the beginning,\n  // to delimit this attribute from prior attributes.\n  static std::string TestPropertiesAsXmlAttributes(const TestResult& result);\n\n  // The output file.\n  const std::string output_file_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(XmlUnitTestResultPrinter);\n};\n\n// Creates a new XmlUnitTestResultPrinter.\nXmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file)\n    : output_file_(output_file) {\n  if (output_file_.c_str() == NULL || output_file_.empty()) {\n    fprintf(stderr, \"XML output file may not be null\\n\");\n    fflush(stderr);\n    exit(EXIT_FAILURE);\n  }\n}\n\n// Called after the unit test ends.\nvoid XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,\n                                                  int /*iteration*/) {\n  FILE* xmlout = NULL;\n  FilePath output_file(output_file_);\n  FilePath output_dir(output_file.RemoveFileName());\n\n  if (output_dir.CreateDirectoriesRecursively()) {\n    xmlout = posix::FOpen(output_file_.c_str(), \"w\");\n  }\n  if (xmlout == NULL) {\n    // TODO(wan): report the reason of the failure.\n    //\n    // We don't do it for now as:\n    //\n    //   1. There is no urgent need for it.\n    //   2. It's a bit involved to make the errno variable thread-safe on\n    //      all three operating systems (Linux, Windows, and Mac OS).\n    //   3. To interpret the meaning of errno in a thread-safe way,\n    //      we need the strerror_r() function, which is not available on\n    //      Windows.\n    fprintf(stderr,\n            \"Unable to open file \\\"%s\\\"\\n\",\n            output_file_.c_str());\n    fflush(stderr);\n    exit(EXIT_FAILURE);\n  }\n  std::stringstream stream;\n  PrintXmlUnitTest(&stream, unit_test);\n  fprintf(xmlout, \"%s\", StringStreamToString(&stream).c_str());\n  fclose(xmlout);\n}\n\n// Returns an XML-escaped copy of the input string str.  If is_attribute\n// is true, the text is meant to appear as an attribute value, and\n// normalizable whitespace is preserved by replacing it with character\n// references.\n//\n// Invalid XML characters in str, if any, are stripped from the output.\n// It is expected that most, if not all, of the text processed by this\n// module will consist of ordinary English text.\n// If this module is ever modified to produce version 1.1 XML output,\n// most invalid characters can be retained using character references.\n// TODO(wan): It might be nice to have a minimally invasive, human-readable\n// escaping scheme for invalid characters, rather than dropping them.\nstd::string XmlUnitTestResultPrinter::EscapeXml(\n    const std::string& str, bool is_attribute) {\n  Message m;\n\n  for (size_t i = 0; i < str.size(); ++i) {\n    const char ch = str[i];\n    switch (ch) {\n      case '<':\n        m << \"&lt;\";\n        break;\n      case '>':\n        m << \"&gt;\";\n        break;\n      case '&':\n        m << \"&amp;\";\n        break;\n      case '\\'':\n        if (is_attribute)\n          m << \"&apos;\";\n        else\n          m << '\\'';\n        break;\n      case '\"':\n        if (is_attribute)\n          m << \"&quot;\";\n        else\n          m << '\"';\n        break;\n      default:\n        if (IsValidXmlCharacter(ch)) {\n          if (is_attribute && IsNormalizableWhitespace(ch))\n            m << \"&#x\" << String::FormatByte(static_cast<unsigned char>(ch))\n              << \";\";\n          else\n            m << ch;\n        }\n        break;\n    }\n  }\n\n  return m.GetString();\n}\n\n// Returns the given string with all characters invalid in XML removed.\n// Currently invalid characters are dropped from the string. An\n// alternative is to replace them with certain characters such as . or ?.\nstd::string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(\n    const std::string& str) {\n  std::string output;\n  output.reserve(str.size());\n  for (std::string::const_iterator it = str.begin(); it != str.end(); ++it)\n    if (IsValidXmlCharacter(*it))\n      output.push_back(*it);\n\n  return output;\n}\n\n// The following routines generate an XML representation of a UnitTest\n// object.\n//\n// This is how Google Test concepts map to the DTD:\n//\n// <testsuites name=\"AllTests\">        <-- corresponds to a UnitTest object\n//   <testsuite name=\"testcase-name\">  <-- corresponds to a TestCase object\n//     <testcase name=\"test-name\">     <-- corresponds to a TestInfo object\n//       <failure message=\"...\">...</failure>\n//       <failure message=\"...\">...</failure>\n//       <failure message=\"...\">...</failure>\n//                                     <-- individual assertion failures\n//     </testcase>\n//   </testsuite>\n// </testsuites>\n\n// Formats the given time in milliseconds as seconds.\nstd::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {\n  ::std::stringstream ss;\n  ss << ms/1000.0;\n  return ss.str();\n}\n\n// Converts the given epoch time in milliseconds to a date string in the ISO\n// 8601 format, without the timezone information.\nstd::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms) {\n  // Using non-reentrant version as localtime_r is not portable.\n  time_t seconds = static_cast<time_t>(ms / 1000);\n#ifdef _MSC_VER\n# pragma warning(push)          // Saves the current warning state.\n# pragma warning(disable:4996)  // Temporarily disables warning 4996\n                                // (function or variable may be unsafe).\n  const struct tm* const time_struct = localtime(&seconds);  // NOLINT\n# pragma warning(pop)           // Restores the warning state again.\n#else\n  const struct tm* const time_struct = localtime(&seconds);  // NOLINT\n#endif\n  if (time_struct == NULL)\n    return \"\";  // Invalid ms value\n\n  // YYYY-MM-DDThh:mm:ss\n  return StreamableToString(time_struct->tm_year + 1900) + \"-\" +\n      String::FormatIntWidth2(time_struct->tm_mon + 1) + \"-\" +\n      String::FormatIntWidth2(time_struct->tm_mday) + \"T\" +\n      String::FormatIntWidth2(time_struct->tm_hour) + \":\" +\n      String::FormatIntWidth2(time_struct->tm_min) + \":\" +\n      String::FormatIntWidth2(time_struct->tm_sec);\n}\n\n// Streams an XML CDATA section, escaping invalid CDATA sequences as needed.\nvoid XmlUnitTestResultPrinter::OutputXmlCDataSection(::std::ostream* stream,\n                                                     const char* data) {\n  const char* segment = data;\n  *stream << \"<![CDATA[\";\n  for (;;) {\n    const char* const next_segment = strstr(segment, \"]]>\");\n    if (next_segment != NULL) {\n      stream->write(\n          segment, static_cast<std::streamsize>(next_segment - segment));\n      *stream << \"]]>]]&gt;<![CDATA[\";\n      segment = next_segment + strlen(\"]]>\");\n    } else {\n      *stream << segment;\n      break;\n    }\n  }\n  *stream << \"]]>\";\n}\n\nvoid XmlUnitTestResultPrinter::OutputXmlAttribute(\n    std::ostream* stream,\n    const std::string& element_name,\n    const std::string& name,\n    const std::string& value) {\n  const std::vector<std::string>& allowed_names =\n      GetReservedAttributesForElement(element_name);\n\n  GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=\n                   allowed_names.end())\n      << \"Attribute \" << name << \" is not allowed for element <\" << element_name\n      << \">.\";\n\n  *stream << \" \" << name << \"=\\\"\" << EscapeXmlAttribute(value) << \"\\\"\";\n}\n\n// Prints an XML representation of a TestInfo object.\n// TODO(wan): There is also value in printing properties with the plain printer.\nvoid XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,\n                                                 const char* test_case_name,\n                                                 const TestInfo& test_info) {\n  const TestResult& result = *test_info.result();\n  const std::string kTestcase = \"testcase\";\n\n  *stream << \"    <testcase\";\n  OutputXmlAttribute(stream, kTestcase, \"name\", test_info.name());\n\n  if (test_info.value_param() != NULL) {\n    OutputXmlAttribute(stream, kTestcase, \"value_param\",\n                       test_info.value_param());\n  }\n  if (test_info.type_param() != NULL) {\n    OutputXmlAttribute(stream, kTestcase, \"type_param\", test_info.type_param());\n  }\n\n  OutputXmlAttribute(stream, kTestcase, \"status\",\n                     test_info.should_run() ? \"run\" : \"notrun\");\n  OutputXmlAttribute(stream, kTestcase, \"time\",\n                     FormatTimeInMillisAsSeconds(result.elapsed_time()));\n  OutputXmlAttribute(stream, kTestcase, \"classname\", test_case_name);\n  *stream << TestPropertiesAsXmlAttributes(result);\n\n  int failures = 0;\n  for (int i = 0; i < result.total_part_count(); ++i) {\n    const TestPartResult& part = result.GetTestPartResult(i);\n    if (part.failed()) {\n      if (++failures == 1) {\n        *stream << \">\\n\";\n      }\n      const string location = internal::FormatCompilerIndependentFileLocation(\n          part.file_name(), part.line_number());\n      const string summary = location + \"\\n\" + part.summary();\n      *stream << \"      <failure message=\\\"\"\n              << EscapeXmlAttribute(summary.c_str())\n              << \"\\\" type=\\\"\\\">\";\n      const string detail = location + \"\\n\" + part.message();\n      OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str());\n      *stream << \"</failure>\\n\";\n    }\n  }\n\n  if (failures == 0)\n    *stream << \" />\\n\";\n  else\n    *stream << \"    </testcase>\\n\";\n}\n\n// Prints an XML representation of a TestCase object\nvoid XmlUnitTestResultPrinter::PrintXmlTestCase(std::ostream* stream,\n                                                const TestCase& test_case) {\n  const std::string kTestsuite = \"testsuite\";\n  *stream << \"  <\" << kTestsuite;\n  OutputXmlAttribute(stream, kTestsuite, \"name\", test_case.name());\n  OutputXmlAttribute(stream, kTestsuite, \"tests\",\n                     StreamableToString(test_case.reportable_test_count()));\n  OutputXmlAttribute(stream, kTestsuite, \"failures\",\n                     StreamableToString(test_case.failed_test_count()));\n  OutputXmlAttribute(\n      stream, kTestsuite, \"disabled\",\n      StreamableToString(test_case.reportable_disabled_test_count()));\n  OutputXmlAttribute(stream, kTestsuite, \"errors\", \"0\");\n  OutputXmlAttribute(stream, kTestsuite, \"time\",\n                     FormatTimeInMillisAsSeconds(test_case.elapsed_time()));\n  *stream << TestPropertiesAsXmlAttributes(test_case.ad_hoc_test_result())\n          << \">\\n\";\n\n  for (int i = 0; i < test_case.total_test_count(); ++i) {\n    if (test_case.GetTestInfo(i)->is_reportable())\n      OutputXmlTestInfo(stream, test_case.name(), *test_case.GetTestInfo(i));\n  }\n  *stream << \"  </\" << kTestsuite << \">\\n\";\n}\n\n// Prints an XML summary of unit_test to output stream out.\nvoid XmlUnitTestResultPrinter::PrintXmlUnitTest(std::ostream* stream,\n                                                const UnitTest& unit_test) {\n  const std::string kTestsuites = \"testsuites\";\n\n  *stream << \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n  *stream << \"<\" << kTestsuites;\n\n  OutputXmlAttribute(stream, kTestsuites, \"tests\",\n                     StreamableToString(unit_test.reportable_test_count()));\n  OutputXmlAttribute(stream, kTestsuites, \"failures\",\n                     StreamableToString(unit_test.failed_test_count()));\n  OutputXmlAttribute(\n      stream, kTestsuites, \"disabled\",\n      StreamableToString(unit_test.reportable_disabled_test_count()));\n  OutputXmlAttribute(stream, kTestsuites, \"errors\", \"0\");\n  OutputXmlAttribute(\n      stream, kTestsuites, \"timestamp\",\n      FormatEpochTimeInMillisAsIso8601(unit_test.start_timestamp()));\n  OutputXmlAttribute(stream, kTestsuites, \"time\",\n                     FormatTimeInMillisAsSeconds(unit_test.elapsed_time()));\n\n  if (GTEST_FLAG(shuffle)) {\n    OutputXmlAttribute(stream, kTestsuites, \"random_seed\",\n                       StreamableToString(unit_test.random_seed()));\n  }\n\n  *stream << TestPropertiesAsXmlAttributes(unit_test.ad_hoc_test_result());\n\n  OutputXmlAttribute(stream, kTestsuites, \"name\", \"AllTests\");\n  *stream << \">\\n\";\n\n  for (int i = 0; i < unit_test.total_test_case_count(); ++i) {\n    if (unit_test.GetTestCase(i)->reportable_test_count() > 0)\n      PrintXmlTestCase(stream, *unit_test.GetTestCase(i));\n  }\n  *stream << \"</\" << kTestsuites << \">\\n\";\n}\n\n// Produces a string representing the test properties in a result as space\n// delimited XML attributes based on the property key=\"value\" pairs.\nstd::string XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(\n    const TestResult& result) {\n  Message attributes;\n  for (int i = 0; i < result.test_property_count(); ++i) {\n    const TestProperty& property = result.GetTestProperty(i);\n    attributes << \" \" << property.key() << \"=\"\n        << \"\\\"\" << EscapeXmlAttribute(property.value()) << \"\\\"\";\n  }\n  return attributes.GetString();\n}\n\n// End XmlUnitTestResultPrinter\n\n#if GTEST_CAN_STREAM_RESULTS_\n\n// Checks if str contains '=', '&', '%' or '\\n' characters. If yes,\n// replaces them by \"%xx\" where xx is their hexadecimal value. For\n// example, replaces \"=\" with \"%3D\".  This algorithm is O(strlen(str))\n// in both time and space -- important as the input str may contain an\n// arbitrarily long test failure message and stack trace.\nstring StreamingListener::UrlEncode(const char* str) {\n  string result;\n  result.reserve(strlen(str) + 1);\n  for (char ch = *str; ch != '\\0'; ch = *++str) {\n    switch (ch) {\n      case '%':\n      case '=':\n      case '&':\n      case '\\n':\n        result.append(\"%\" + String::FormatByte(static_cast<unsigned char>(ch)));\n        break;\n      default:\n        result.push_back(ch);\n        break;\n    }\n  }\n  return result;\n}\n\nvoid StreamingListener::SocketWriter::MakeConnection() {\n  GTEST_CHECK_(sockfd_ == -1)\n      << \"MakeConnection() can't be called when there is already a connection.\";\n\n  addrinfo hints;\n  memset(&hints, 0, sizeof(hints));\n  hints.ai_family = AF_UNSPEC;    // To allow both IPv4 and IPv6 addresses.\n  hints.ai_socktype = SOCK_STREAM;\n  addrinfo* servinfo = NULL;\n\n  // Use the getaddrinfo() to get a linked list of IP addresses for\n  // the given host name.\n  const int error_num = getaddrinfo(\n      host_name_.c_str(), port_num_.c_str(), &hints, &servinfo);\n  if (error_num != 0) {\n    GTEST_LOG_(WARNING) << \"stream_result_to: getaddrinfo() failed: \"\n                        << gai_strerror(error_num);\n  }\n\n  // Loop through all the results and connect to the first we can.\n  for (addrinfo* cur_addr = servinfo; sockfd_ == -1 && cur_addr != NULL;\n       cur_addr = cur_addr->ai_next) {\n    sockfd_ = socket(\n        cur_addr->ai_family, cur_addr->ai_socktype, cur_addr->ai_protocol);\n    if (sockfd_ != -1) {\n      // Connect the client socket to the server socket.\n      if (connect(sockfd_, cur_addr->ai_addr, cur_addr->ai_addrlen) == -1) {\n        close(sockfd_);\n        sockfd_ = -1;\n      }\n    }\n  }\n\n  freeaddrinfo(servinfo);  // all done with this structure\n\n  if (sockfd_ == -1) {\n    GTEST_LOG_(WARNING) << \"stream_result_to: failed to connect to \"\n                        << host_name_ << \":\" << port_num_;\n  }\n}\n\n// End of class Streaming Listener\n#endif  // GTEST_CAN_STREAM_RESULTS__\n\n// Class ScopedTrace\n\n// Pushes the given source file location and message onto a per-thread\n// trace stack maintained by Google Test.\nScopedTrace::ScopedTrace(const char* file, int line, const Message& message)\n    GTEST_LOCK_EXCLUDED_(&UnitTest::mutex_) {\n  TraceInfo trace;\n  trace.file = file;\n  trace.line = line;\n  trace.message = message.GetString();\n\n  UnitTest::GetInstance()->PushGTestTrace(trace);\n}\n\n// Pops the info pushed by the c'tor.\nScopedTrace::~ScopedTrace()\n    GTEST_LOCK_EXCLUDED_(&UnitTest::mutex_) {\n  UnitTest::GetInstance()->PopGTestTrace();\n}\n\n\n// class OsStackTraceGetter\n\n// Returns the current OS stack trace as an std::string.  Parameters:\n//\n//   max_depth  - the maximum number of stack frames to be included\n//                in the trace.\n//   skip_count - the number of top frames to be skipped; doesn't count\n//                against max_depth.\n//\nstring OsStackTraceGetter::CurrentStackTrace(int /* max_depth */,\n                                             int /* skip_count */)\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  return \"\";\n}\n\nvoid OsStackTraceGetter::UponLeavingGTest()\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n}\n\nconst char* const\nOsStackTraceGetter::kElidedFramesMarker =\n    \"... \" GTEST_NAME_ \" internal frames ...\";\n\n// A helper class that creates the premature-exit file in its\n// constructor and deletes the file in its destructor.\nclass ScopedPrematureExitFile {\n public:\n  explicit ScopedPrematureExitFile(const char* premature_exit_filepath)\n      : premature_exit_filepath_(premature_exit_filepath) {\n    // If a path to the premature-exit file is specified...\n    if (premature_exit_filepath != NULL && *premature_exit_filepath != '\\0') {\n      // create the file with a single \"0\" character in it.  I/O\n      // errors are ignored as there's nothing better we can do and we\n      // don't want to fail the test because of this.\n      FILE* pfile = posix::FOpen(premature_exit_filepath, \"w\");\n      fwrite(\"0\", 1, 1, pfile);\n      fclose(pfile);\n    }\n  }\n\n  ~ScopedPrematureExitFile() {\n    if (premature_exit_filepath_ != NULL && *premature_exit_filepath_ != '\\0') {\n      remove(premature_exit_filepath_);\n    }\n  }\n\n private:\n  const char* const premature_exit_filepath_;\n\n  GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedPrematureExitFile);\n};\n\n}  // namespace internal\n\n// class TestEventListeners\n\nTestEventListeners::TestEventListeners()\n    : repeater_(new internal::TestEventRepeater()),\n      default_result_printer_(NULL),\n      default_xml_generator_(NULL) {\n}\n\nTestEventListeners::~TestEventListeners() { delete repeater_; }\n\n// Returns the standard listener responsible for the default console\n// output.  Can be removed from the listeners list to shut down default\n// console output.  Note that removing this object from the listener list\n// with Release transfers its ownership to the user.\nvoid TestEventListeners::Append(TestEventListener* listener) {\n  repeater_->Append(listener);\n}\n\n// Removes the given event listener from the list and returns it.  It then\n// becomes the caller's responsibility to delete the listener. Returns\n// NULL if the listener is not found in the list.\nTestEventListener* TestEventListeners::Release(TestEventListener* listener) {\n  if (listener == default_result_printer_)\n    default_result_printer_ = NULL;\n  else if (listener == default_xml_generator_)\n    default_xml_generator_ = NULL;\n  return repeater_->Release(listener);\n}\n\n// Returns repeater that broadcasts the TestEventListener events to all\n// subscribers.\nTestEventListener* TestEventListeners::repeater() { return repeater_; }\n\n// Sets the default_result_printer attribute to the provided listener.\n// The listener is also added to the listener list and previous\n// default_result_printer is removed from it and deleted. The listener can\n// also be NULL in which case it will not be added to the list. Does\n// nothing if the previous and the current listener objects are the same.\nvoid TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) {\n  if (default_result_printer_ != listener) {\n    // It is an error to pass this method a listener that is already in the\n    // list.\n    delete Release(default_result_printer_);\n    default_result_printer_ = listener;\n    if (listener != NULL)\n      Append(listener);\n  }\n}\n\n// Sets the default_xml_generator attribute to the provided listener.  The\n// listener is also added to the listener list and previous\n// default_xml_generator is removed from it and deleted. The listener can\n// also be NULL in which case it will not be added to the list. Does\n// nothing if the previous and the current listener objects are the same.\nvoid TestEventListeners::SetDefaultXmlGenerator(TestEventListener* listener) {\n  if (default_xml_generator_ != listener) {\n    // It is an error to pass this method a listener that is already in the\n    // list.\n    delete Release(default_xml_generator_);\n    default_xml_generator_ = listener;\n    if (listener != NULL)\n      Append(listener);\n  }\n}\n\n// Controls whether events will be forwarded by the repeater to the\n// listeners in the list.\nbool TestEventListeners::EventForwardingEnabled() const {\n  return repeater_->forwarding_enabled();\n}\n\nvoid TestEventListeners::SuppressEventForwarding() {\n  repeater_->set_forwarding_enabled(false);\n}\n\n// class UnitTest\n\n// Gets the singleton UnitTest object.  The first time this method is\n// called, a UnitTest object is constructed and returned.  Consecutive\n// calls will return the same object.\n//\n// We don't protect this under mutex_ as a user is not supposed to\n// call this before main() starts, from which point on the return\n// value will never change.\nUnitTest* UnitTest::GetInstance() {\n  // When compiled with MSVC 7.1 in optimized mode, destroying the\n  // UnitTest object upon exiting the program messes up the exit code,\n  // causing successful tests to appear failed.  We have to use a\n  // different implementation in this case to bypass the compiler bug.\n  // This implementation makes the compiler happy, at the cost of\n  // leaking the UnitTest object.\n\n  // CodeGear C++Builder insists on a public destructor for the\n  // default implementation.  Use this implementation to keep good OO\n  // design with private destructor.\n\n#if (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__)\n  static UnitTest* const instance = new UnitTest;\n  return instance;\n#else\n  static UnitTest instance;\n  return &instance;\n#endif  // (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__)\n}\n\n// Gets the number of successful test cases.\nint UnitTest::successful_test_case_count() const {\n  return impl()->successful_test_case_count();\n}\n\n// Gets the number of failed test cases.\nint UnitTest::failed_test_case_count() const {\n  return impl()->failed_test_case_count();\n}\n\n// Gets the number of all test cases.\nint UnitTest::total_test_case_count() const {\n  return impl()->total_test_case_count();\n}\n\n// Gets the number of all test cases that contain at least one test\n// that should run.\nint UnitTest::test_case_to_run_count() const {\n  return impl()->test_case_to_run_count();\n}\n\n// Gets the number of successful tests.\nint UnitTest::successful_test_count() const {\n  return impl()->successful_test_count();\n}\n\n// Gets the number of failed tests.\nint UnitTest::failed_test_count() const { return impl()->failed_test_count(); }\n\n// Gets the number of disabled tests that will be reported in the XML report.\nint UnitTest::reportable_disabled_test_count() const {\n  return impl()->reportable_disabled_test_count();\n}\n\n// Gets the number of disabled tests.\nint UnitTest::disabled_test_count() const {\n  return impl()->disabled_test_count();\n}\n\n// Gets the number of tests to be printed in the XML report.\nint UnitTest::reportable_test_count() const {\n  return impl()->reportable_test_count();\n}\n\n// Gets the number of all tests.\nint UnitTest::total_test_count() const { return impl()->total_test_count(); }\n\n// Gets the number of tests that should run.\nint UnitTest::test_to_run_count() const { return impl()->test_to_run_count(); }\n\n// Gets the time of the test program start, in ms from the start of the\n// UNIX epoch.\ninternal::TimeInMillis UnitTest::start_timestamp() const {\n    return impl()->start_timestamp();\n}\n\n// Gets the elapsed time, in milliseconds.\ninternal::TimeInMillis UnitTest::elapsed_time() const {\n  return impl()->elapsed_time();\n}\n\n// Returns true iff the unit test passed (i.e. all test cases passed).\nbool UnitTest::Passed() const { return impl()->Passed(); }\n\n// Returns true iff the unit test failed (i.e. some test case failed\n// or something outside of all tests failed).\nbool UnitTest::Failed() const { return impl()->Failed(); }\n\n// Gets the i-th test case among all the test cases. i can range from 0 to\n// total_test_case_count() - 1. If i is not in that range, returns NULL.\nconst TestCase* UnitTest::GetTestCase(int i) const {\n  return impl()->GetTestCase(i);\n}\n\n// Returns the TestResult containing information on test failures and\n// properties logged outside of individual test cases.\nconst TestResult& UnitTest::ad_hoc_test_result() const {\n  return *impl()->ad_hoc_test_result();\n}\n\n// Gets the i-th test case among all the test cases. i can range from 0 to\n// total_test_case_count() - 1. If i is not in that range, returns NULL.\nTestCase* UnitTest::GetMutableTestCase(int i) {\n  return impl()->GetMutableTestCase(i);\n}\n\n// Returns the list of event listeners that can be used to track events\n// inside Google Test.\nTestEventListeners& UnitTest::listeners() {\n  return *impl()->listeners();\n}\n\n// Registers and returns a global test environment.  When a test\n// program is run, all global test environments will be set-up in the\n// order they were registered.  After all tests in the program have\n// finished, all global test environments will be torn-down in the\n// *reverse* order they were registered.\n//\n// The UnitTest object takes ownership of the given environment.\n//\n// We don't protect this under mutex_, as we only support calling it\n// from the main thread.\nEnvironment* UnitTest::AddEnvironment(Environment* env) {\n  if (env == NULL) {\n    return NULL;\n  }\n\n  impl_->environments().push_back(env);\n  return env;\n}\n\n// Adds a TestPartResult to the current TestResult object.  All Google Test\n// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call\n// this to report their results.  The user code should use the\n// assertion macros instead of calling this directly.\nvoid UnitTest::AddTestPartResult(\n    TestPartResult::Type result_type,\n    const char* file_name,\n    int line_number,\n    const std::string& message,\n    const std::string& os_stack_trace) GTEST_LOCK_EXCLUDED_(mutex_) {\n  Message msg;\n  msg << message;\n\n  internal::MutexLock lock(&mutex_);\n  if (impl_->gtest_trace_stack().size() > 0) {\n    msg << \"\\n\" << GTEST_NAME_ << \" trace:\";\n\n    for (int i = static_cast<int>(impl_->gtest_trace_stack().size());\n         i > 0; --i) {\n      const internal::TraceInfo& trace = impl_->gtest_trace_stack()[i - 1];\n      msg << \"\\n\" << internal::FormatFileLocation(trace.file, trace.line)\n          << \" \" << trace.message;\n    }\n  }\n\n  if (os_stack_trace.c_str() != NULL && !os_stack_trace.empty()) {\n    msg << internal::kStackTraceMarker << os_stack_trace;\n  }\n\n  const TestPartResult result =\n    TestPartResult(result_type, file_name, line_number,\n                   msg.GetString().c_str());\n  impl_->GetTestPartResultReporterForCurrentThread()->\n      ReportTestPartResult(result);\n\n  if (result_type != TestPartResult::kSuccess) {\n    // gtest_break_on_failure takes precedence over\n    // gtest_throw_on_failure.  This allows a user to set the latter\n    // in the code (perhaps in order to use Google Test assertions\n    // with another testing framework) and specify the former on the\n    // command line for debugging.\n    if (GTEST_FLAG(break_on_failure)) {\n#if GTEST_OS_WINDOWS\n      // Using DebugBreak on Windows allows gtest to still break into a debugger\n      // when a failure happens and both the --gtest_break_on_failure and\n      // the --gtest_catch_exceptions flags are specified.\n      DebugBreak();\n#else\n      // Dereference NULL through a volatile pointer to prevent the compiler\n      // from removing. We use this rather than abort() or __builtin_trap() for\n      // portability: Symbian doesn't implement abort() well, and some debuggers\n      // don't correctly trap abort().\n      *static_cast<volatile int*>(NULL) = 1;\n#endif  // GTEST_OS_WINDOWS\n    } else if (GTEST_FLAG(throw_on_failure)) {\n#if GTEST_HAS_EXCEPTIONS\n      throw internal::GoogleTestFailureException(result);\n#else\n      // We cannot call abort() as it generates a pop-up in debug mode\n      // that cannot be suppressed in VC 7.1 or below.\n      exit(1);\n#endif\n    }\n  }\n}\n\n// Adds a TestProperty to the current TestResult object when invoked from\n// inside a test, to current TestCase's ad_hoc_test_result_ when invoked\n// from SetUpTestCase or TearDownTestCase, or to the global property set\n// when invoked elsewhere.  If the result already contains a property with\n// the same key, the value will be updated.\nvoid UnitTest::RecordProperty(const std::string& key,\n                              const std::string& value) {\n  impl_->RecordProperty(TestProperty(key, value));\n}\n\n// Runs all tests in this UnitTest object and prints the result.\n// Returns 0 if successful, or 1 otherwise.\n//\n// We don't protect this under mutex_, as we only support calling it\n// from the main thread.\nint UnitTest::Run() {\n  const bool in_death_test_child_process =\n      internal::GTEST_FLAG(internal_run_death_test).length() > 0;\n\n  // Google Test implements this protocol for catching that a test\n  // program exits before returning control to Google Test:\n  //\n  //   1. Upon start, Google Test creates a file whose absolute path\n  //      is specified by the environment variable\n  //      TEST_PREMATURE_EXIT_FILE.\n  //   2. When Google Test has finished its work, it deletes the file.\n  //\n  // This allows a test runner to set TEST_PREMATURE_EXIT_FILE before\n  // running a Google-Test-based test program and check the existence\n  // of the file at the end of the test execution to see if it has\n  // exited prematurely.\n\n  // If we are in the child process of a death test, don't\n  // create/delete the premature exit file, as doing so is unnecessary\n  // and will confuse the parent process.  Otherwise, create/delete\n  // the file upon entering/leaving this function.  If the program\n  // somehow exits before this function has a chance to return, the\n  // premature-exit file will be left undeleted, causing a test runner\n  // that understands the premature-exit-file protocol to report the\n  // test as having failed.\n  const internal::ScopedPrematureExitFile premature_exit_file(\n      in_death_test_child_process ?\n      NULL : internal::posix::GetEnv(\"TEST_PREMATURE_EXIT_FILE\"));\n\n  // Captures the value of GTEST_FLAG(catch_exceptions).  This value will be\n  // used for the duration of the program.\n  impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions));\n\n#if GTEST_HAS_SEH\n  // Either the user wants Google Test to catch exceptions thrown by the\n  // tests or this is executing in the context of death test child\n  // process. In either case the user does not want to see pop-up dialogs\n  // about crashes - they are expected.\n  if (impl()->catch_exceptions() || in_death_test_child_process) {\n# if !GTEST_OS_WINDOWS_MOBILE\n    // SetErrorMode doesn't exist on CE.\n    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT |\n                 SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);\n# endif  // !GTEST_OS_WINDOWS_MOBILE\n\n# if (defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW) && !GTEST_OS_WINDOWS_MOBILE\n    // Death test children can be terminated with _abort().  On Windows,\n    // _abort() can show a dialog with a warning message.  This forces the\n    // abort message to go to stderr instead.\n    _set_error_mode(_OUT_TO_STDERR);\n# endif\n\n# if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE\n    // In the debug version, Visual Studio pops up a separate dialog\n    // offering a choice to debug the aborted program. We need to suppress\n    // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement\n    // executed. Google Test will notify the user of any unexpected\n    // failure via stderr.\n    //\n    // VC++ doesn't define _set_abort_behavior() prior to the version 8.0.\n    // Users of prior VC versions shall suffer the agony and pain of\n    // clicking through the countless debug dialogs.\n    // TODO(vladl@google.com): find a way to suppress the abort dialog() in the\n    // debug mode when compiled with VC 7.1 or lower.\n    if (!GTEST_FLAG(break_on_failure))\n      _set_abort_behavior(\n          0x0,                                    // Clear the following flags:\n          _WRITE_ABORT_MSG | _CALL_REPORTFAULT);  // pop-up window, core dump.\n# endif\n  }\n#endif  // GTEST_HAS_SEH\n\n  return internal::HandleExceptionsInMethodIfSupported(\n      impl(),\n      &internal::UnitTestImpl::RunAllTests,\n      \"auxiliary test code (environments or event listeners)\") ? 0 : 1;\n}\n\n// Returns the working directory when the first TEST() or TEST_F() was\n// executed.\nconst char* UnitTest::original_working_dir() const {\n  return impl_->original_working_dir_.c_str();\n}\n\n// Returns the TestCase object for the test that's currently running,\n// or NULL if no test is running.\nconst TestCase* UnitTest::current_test_case() const\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  internal::MutexLock lock(&mutex_);\n  return impl_->current_test_case();\n}\n\n// Returns the TestInfo object for the test that's currently running,\n// or NULL if no test is running.\nconst TestInfo* UnitTest::current_test_info() const\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  internal::MutexLock lock(&mutex_);\n  return impl_->current_test_info();\n}\n\n// Returns the random seed used at the start of the current test run.\nint UnitTest::random_seed() const { return impl_->random_seed(); }\n\n#if GTEST_HAS_PARAM_TEST\n// Returns ParameterizedTestCaseRegistry object used to keep track of\n// value-parameterized tests and instantiate and register them.\ninternal::ParameterizedTestCaseRegistry&\n    UnitTest::parameterized_test_registry()\n        GTEST_LOCK_EXCLUDED_(mutex_) {\n  return impl_->parameterized_test_registry();\n}\n#endif  // GTEST_HAS_PARAM_TEST\n\n// Creates an empty UnitTest.\nUnitTest::UnitTest() {\n  impl_ = new internal::UnitTestImpl(this);\n}\n\n// Destructor of UnitTest.\nUnitTest::~UnitTest() {\n  delete impl_;\n}\n\n// Pushes a trace defined by SCOPED_TRACE() on to the per-thread\n// Google Test trace stack.\nvoid UnitTest::PushGTestTrace(const internal::TraceInfo& trace)\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  internal::MutexLock lock(&mutex_);\n  impl_->gtest_trace_stack().push_back(trace);\n}\n\n// Pops a trace from the per-thread Google Test trace stack.\nvoid UnitTest::PopGTestTrace()\n    GTEST_LOCK_EXCLUDED_(mutex_) {\n  internal::MutexLock lock(&mutex_);\n  impl_->gtest_trace_stack().pop_back();\n}\n\nnamespace internal {\n\nUnitTestImpl::UnitTestImpl(UnitTest* parent)\n    : parent_(parent),\n#ifdef _MSC_VER\n# pragma warning(push)                    // Saves the current warning state.\n# pragma warning(disable:4355)            // Temporarily disables warning 4355\n                                         // (using this in initializer).\n      default_global_test_part_result_reporter_(this),\n      default_per_thread_test_part_result_reporter_(this),\n# pragma warning(pop)                     // Restores the warning state again.\n#else\n      default_global_test_part_result_reporter_(this),\n      default_per_thread_test_part_result_reporter_(this),\n#endif  // _MSC_VER\n      global_test_part_result_repoter_(\n          &default_global_test_part_result_reporter_),\n      per_thread_test_part_result_reporter_(\n          &default_per_thread_test_part_result_reporter_),\n#if GTEST_HAS_PARAM_TEST\n      parameterized_test_registry_(),\n      parameterized_tests_registered_(false),\n#endif  // GTEST_HAS_PARAM_TEST\n      last_death_test_case_(-1),\n      current_test_case_(NULL),\n      current_test_info_(NULL),\n      ad_hoc_test_result_(),\n      os_stack_trace_getter_(NULL),\n      post_flag_parse_init_performed_(false),\n      random_seed_(0),  // Will be overridden by the flag before first use.\n      random_(0),  // Will be reseeded before first use.\n      start_timestamp_(0),\n      elapsed_time_(0),\n#if GTEST_HAS_DEATH_TEST\n      death_test_factory_(new DefaultDeathTestFactory),\n#endif\n      // Will be overridden by the flag before first use.\n      catch_exceptions_(false) {\n  listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter);\n}\n\nUnitTestImpl::~UnitTestImpl() {\n  // Deletes every TestCase.\n  ForEach(test_cases_, internal::Delete<TestCase>);\n\n  // Deletes every Environment.\n  ForEach(environments_, internal::Delete<Environment>);\n\n  delete os_stack_trace_getter_;\n}\n\n// Adds a TestProperty to the current TestResult object when invoked in a\n// context of a test, to current test case's ad_hoc_test_result when invoke\n// from SetUpTestCase/TearDownTestCase, or to the global property set\n// otherwise.  If the result already contains a property with the same key,\n// the value will be updated.\nvoid UnitTestImpl::RecordProperty(const TestProperty& test_property) {\n  std::string xml_element;\n  TestResult* test_result;  // TestResult appropriate for property recording.\n\n  if (current_test_info_ != NULL) {\n    xml_element = \"testcase\";\n    test_result = &(current_test_info_->result_);\n  } else if (current_test_case_ != NULL) {\n    xml_element = \"testsuite\";\n    test_result = &(current_test_case_->ad_hoc_test_result_);\n  } else {\n    xml_element = \"testsuites\";\n    test_result = &ad_hoc_test_result_;\n  }\n  test_result->RecordProperty(xml_element, test_property);\n}\n\n#if GTEST_HAS_DEATH_TEST\n// Disables event forwarding if the control is currently in a death test\n// subprocess. Must not be called before InitGoogleTest.\nvoid UnitTestImpl::SuppressTestEventsIfInSubprocess() {\n  if (internal_run_death_test_flag_.get() != NULL)\n    listeners()->SuppressEventForwarding();\n}\n#endif  // GTEST_HAS_DEATH_TEST\n\n// Initializes event listeners performing XML output as specified by\n// UnitTestOptions. Must not be called before InitGoogleTest.\nvoid UnitTestImpl::ConfigureXmlOutput() {\n  const std::string& output_format = UnitTestOptions::GetOutputFormat();\n  if (output_format == \"xml\") {\n    listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter(\n        UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));\n  } else if (output_format != \"\") {\n    printf(\"WARNING: unrecognized output format \\\"%s\\\" ignored.\\n\",\n           output_format.c_str());\n    fflush(stdout);\n  }\n}\n\n#if GTEST_CAN_STREAM_RESULTS_\n// Initializes event listeners for streaming test results in string form.\n// Must not be called before InitGoogleTest.\nvoid UnitTestImpl::ConfigureStreamingOutput() {\n  const std::string& target = GTEST_FLAG(stream_result_to);\n  if (!target.empty()) {\n    const size_t pos = target.find(':');\n    if (pos != std::string::npos) {\n      listeners()->Append(new StreamingListener(target.substr(0, pos),\n                                                target.substr(pos+1)));\n    } else {\n      printf(\"WARNING: unrecognized streaming target \\\"%s\\\" ignored.\\n\",\n             target.c_str());\n      fflush(stdout);\n    }\n  }\n}\n#endif  // GTEST_CAN_STREAM_RESULTS_\n\n// Performs initialization dependent upon flag values obtained in\n// ParseGoogleTestFlagsOnly.  Is called from InitGoogleTest after the call to\n// ParseGoogleTestFlagsOnly.  In case a user neglects to call InitGoogleTest\n// this function is also called from RunAllTests.  Since this function can be\n// called more than once, it has to be idempotent.\nvoid UnitTestImpl::PostFlagParsingInit() {\n  // Ensures that this function does not execute more than once.\n  if (!post_flag_parse_init_performed_) {\n    post_flag_parse_init_performed_ = true;\n\n#if GTEST_HAS_DEATH_TEST\n    InitDeathTestSubprocessControlInfo();\n    SuppressTestEventsIfInSubprocess();\n#endif  // GTEST_HAS_DEATH_TEST\n\n    // Registers parameterized tests. This makes parameterized tests\n    // available to the UnitTest reflection API without running\n    // RUN_ALL_TESTS.\n    RegisterParameterizedTests();\n\n    // Configures listeners for XML output. This makes it possible for users\n    // to shut down the default XML output before invoking RUN_ALL_TESTS.\n    ConfigureXmlOutput();\n\n#if GTEST_CAN_STREAM_RESULTS_\n    // Configures listeners for streaming test results to the specified server.\n    ConfigureStreamingOutput();\n#endif  // GTEST_CAN_STREAM_RESULTS_\n  }\n}\n\n// A predicate that checks the name of a TestCase against a known\n// value.\n//\n// This is used for implementation of the UnitTest class only.  We put\n// it in the anonymous namespace to prevent polluting the outer\n// namespace.\n//\n// TestCaseNameIs is copyable.\nclass TestCaseNameIs {\n public:\n  // Constructor.\n  explicit TestCaseNameIs(const std::string& name)\n      : name_(name) {}\n\n  // Returns true iff the name of test_case matches name_.\n  bool operator()(const TestCase* test_case) const {\n    return test_case != NULL && strcmp(test_case->name(), name_.c_str()) == 0;\n  }\n\n private:\n  std::string name_;\n};\n\n// Finds and returns a TestCase with the given name.  If one doesn't\n// exist, creates one and returns it.  It's the CALLER'S\n// RESPONSIBILITY to ensure that this function is only called WHEN THE\n// TESTS ARE NOT SHUFFLED.\n//\n// Arguments:\n//\n//   test_case_name: name of the test case\n//   type_param:     the name of the test case's type parameter, or NULL if\n//                   this is not a typed or a type-parameterized test case.\n//   set_up_tc:      pointer to the function that sets up the test case\n//   tear_down_tc:   pointer to the function that tears down the test case\nTestCase* UnitTestImpl::GetTestCase(const char* test_case_name,\n                                    const char* type_param,\n                                    Test::SetUpTestCaseFunc set_up_tc,\n                                    Test::TearDownTestCaseFunc tear_down_tc) {\n  // Can we find a TestCase with the given name?\n  const std::vector<TestCase*>::const_iterator test_case =\n      std::find_if(test_cases_.begin(), test_cases_.end(),\n                   TestCaseNameIs(test_case_name));\n\n  if (test_case != test_cases_.end())\n    return *test_case;\n\n  // No.  Let's create one.\n  TestCase* const new_test_case =\n      new TestCase(test_case_name, type_param, set_up_tc, tear_down_tc);\n\n  // Is this a death test case?\n  if (internal::UnitTestOptions::MatchesFilter(test_case_name,\n                                               kDeathTestCaseFilter)) {\n    // Yes.  Inserts the test case after the last death test case\n    // defined so far.  This only works when the test cases haven't\n    // been shuffled.  Otherwise we may end up running a death test\n    // after a non-death test.\n    ++last_death_test_case_;\n    test_cases_.insert(test_cases_.begin() + last_death_test_case_,\n                       new_test_case);\n  } else {\n    // No.  Appends to the end of the list.\n    test_cases_.push_back(new_test_case);\n  }\n\n  test_case_indices_.push_back(static_cast<int>(test_case_indices_.size()));\n  return new_test_case;\n}\n\n// Helpers for setting up / tearing down the given environment.  They\n// are for use in the ForEach() function.\nstatic void SetUpEnvironment(Environment* env) { env->SetUp(); }\nstatic void TearDownEnvironment(Environment* env) { env->TearDown(); }\n\n// Runs all tests in this UnitTest object, prints the result, and\n// returns true if all tests are successful.  If any exception is\n// thrown during a test, the test is considered to be failed, but the\n// rest of the tests will still be run.\n//\n// When parameterized tests are enabled, it expands and registers\n// parameterized tests first in RegisterParameterizedTests().\n// All other functions called from RunAllTests() may safely assume that\n// parameterized tests are ready to be counted and run.\nbool UnitTestImpl::RunAllTests() {\n  // Makes sure InitGoogleTest() was called.\n  if (!GTestIsInitialized()) {\n    printf(\"%s\",\n           \"\\nThis test program did NOT call ::testing::InitGoogleTest \"\n           \"before calling RUN_ALL_TESTS().  Please fix it.\\n\");\n    return false;\n  }\n\n  // Do not run any test if the --help flag was specified.\n  if (g_help_flag)\n    return true;\n\n  // Repeats the call to the post-flag parsing initialization in case the\n  // user didn't call InitGoogleTest.\n  PostFlagParsingInit();\n\n  // Even if sharding is not on, test runners may want to use the\n  // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding\n  // protocol.\n  internal::WriteToShardStatusFileIfNeeded();\n\n  // True iff we are in a subprocess for running a thread-safe-style\n  // death test.\n  bool in_subprocess_for_death_test = false;\n\n#if GTEST_HAS_DEATH_TEST\n  in_subprocess_for_death_test = (internal_run_death_test_flag_.get() != NULL);\n#endif  // GTEST_HAS_DEATH_TEST\n\n  const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex,\n                                        in_subprocess_for_death_test);\n\n  // Compares the full test names with the filter to decide which\n  // tests to run.\n  const bool has_tests_to_run = FilterTests(should_shard\n                                              ? HONOR_SHARDING_PROTOCOL\n                                              : IGNORE_SHARDING_PROTOCOL) > 0;\n\n  // Lists the tests and exits if the --gtest_list_tests flag was specified.\n  if (GTEST_FLAG(list_tests)) {\n    // This must be called *after* FilterTests() has been called.\n    ListTestsMatchingFilter();\n    return true;\n  }\n\n  random_seed_ = GTEST_FLAG(shuffle) ?\n      GetRandomSeedFromFlag(GTEST_FLAG(random_seed)) : 0;\n\n  // True iff at least one test has failed.\n  bool failed = false;\n\n  TestEventListener* repeater = listeners()->repeater();\n\n  start_timestamp_ = GetTimeInMillis();\n  repeater->OnTestProgramStart(*parent_);\n\n  // How many times to repeat the tests?  We don't want to repeat them\n  // when we are inside the subprocess of a death test.\n  const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG(repeat);\n  // Repeats forever if the repeat count is negative.\n  const bool forever = repeat < 0;\n  for (int i = 0; forever || i != repeat; i++) {\n    // We want to preserve failures generated by ad-hoc test\n    // assertions executed before RUN_ALL_TESTS().\n    ClearNonAdHocTestResult();\n\n    const TimeInMillis start = GetTimeInMillis();\n\n    // Shuffles test cases and tests if requested.\n    if (has_tests_to_run && GTEST_FLAG(shuffle)) {\n      random()->Reseed(random_seed_);\n      // This should be done before calling OnTestIterationStart(),\n      // such that a test event listener can see the actual test order\n      // in the event.\n      ShuffleTests();\n    }\n\n    // Tells the unit test event listeners that the tests are about to start.\n    repeater->OnTestIterationStart(*parent_, i);\n\n    // Runs each test case if there is at least one test to run.\n    if (has_tests_to_run) {\n      // Sets up all environments beforehand.\n      repeater->OnEnvironmentsSetUpStart(*parent_);\n      ForEach(environments_, SetUpEnvironment);\n      repeater->OnEnvironmentsSetUpEnd(*parent_);\n\n      // Runs the tests only if there was no fatal failure during global\n      // set-up.\n      if (!Test::HasFatalFailure()) {\n        for (int test_index = 0; test_index < total_test_case_count();\n             test_index++) {\n          GetMutableTestCase(test_index)->Run();\n        }\n      }\n\n      // Tears down all environments in reverse order afterwards.\n      repeater->OnEnvironmentsTearDownStart(*parent_);\n      std::for_each(environments_.rbegin(), environments_.rend(),\n                    TearDownEnvironment);\n      repeater->OnEnvironmentsTearDownEnd(*parent_);\n    }\n\n    elapsed_time_ = GetTimeInMillis() - start;\n\n    // Tells the unit test event listener that the tests have just finished.\n    repeater->OnTestIterationEnd(*parent_, i);\n\n    // Gets the result and clears it.\n    if (!Passed()) {\n      failed = true;\n    }\n\n    // Restores the original test order after the iteration.  This\n    // allows the user to quickly repro a failure that happens in the\n    // N-th iteration without repeating the first (N - 1) iterations.\n    // This is not enclosed in \"if (GTEST_FLAG(shuffle)) { ... }\", in\n    // case the user somehow changes the value of the flag somewhere\n    // (it's always safe to unshuffle the tests).\n    UnshuffleTests();\n\n    if (GTEST_FLAG(shuffle)) {\n      // Picks a new random seed for each iteration.\n      random_seed_ = GetNextRandomSeed(random_seed_);\n    }\n  }\n\n  repeater->OnTestProgramEnd(*parent_);\n\n  return !failed;\n}\n\n// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file\n// if the variable is present. If a file already exists at this location, this\n// function will write over it. If the variable is present, but the file cannot\n// be created, prints an error and exits.\nvoid WriteToShardStatusFileIfNeeded() {\n  const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile);\n  if (test_shard_file != NULL) {\n    FILE* const file = posix::FOpen(test_shard_file, \"w\");\n    if (file == NULL) {\n      ColoredPrintf(COLOR_RED,\n                    \"Could not write to the test shard status file \\\"%s\\\" \"\n                    \"specified by the %s environment variable.\\n\",\n                    test_shard_file, kTestShardStatusFile);\n      fflush(stdout);\n      exit(EXIT_FAILURE);\n    }\n    fclose(file);\n  }\n}\n\n// Checks whether sharding is enabled by examining the relevant\n// environment variable values. If the variables are present,\n// but inconsistent (i.e., shard_index >= total_shards), prints\n// an error and exits. If in_subprocess_for_death_test, sharding is\n// disabled because it must only be applied to the original test\n// process. Otherwise, we could filter out death tests we intended to execute.\nbool ShouldShard(const char* total_shards_env,\n                 const char* shard_index_env,\n                 bool in_subprocess_for_death_test) {\n  if (in_subprocess_for_death_test) {\n    return false;\n  }\n\n  const Int32 total_shards = Int32FromEnvOrDie(total_shards_env, -1);\n  const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1);\n\n  if (total_shards == -1 && shard_index == -1) {\n    return false;\n  } else if (total_shards == -1 && shard_index != -1) {\n    const Message msg = Message()\n      << \"Invalid environment variables: you have \"\n      << kTestShardIndex << \" = \" << shard_index\n      << \", but have left \" << kTestTotalShards << \" unset.\\n\";\n    ColoredPrintf(COLOR_RED, msg.GetString().c_str());\n    fflush(stdout);\n    exit(EXIT_FAILURE);\n  } else if (total_shards != -1 && shard_index == -1) {\n    const Message msg = Message()\n      << \"Invalid environment variables: you have \"\n      << kTestTotalShards << \" = \" << total_shards\n      << \", but have left \" << kTestShardIndex << \" unset.\\n\";\n    ColoredPrintf(COLOR_RED, msg.GetString().c_str());\n    fflush(stdout);\n    exit(EXIT_FAILURE);\n  } else if (shard_index < 0 || shard_index >= total_shards) {\n    const Message msg = Message()\n      << \"Invalid environment variables: we require 0 <= \"\n      << kTestShardIndex << \" < \" << kTestTotalShards\n      << \", but you have \" << kTestShardIndex << \"=\" << shard_index\n      << \", \" << kTestTotalShards << \"=\" << total_shards << \".\\n\";\n    ColoredPrintf(COLOR_RED, msg.GetString().c_str());\n    fflush(stdout);\n    exit(EXIT_FAILURE);\n  }\n\n  return total_shards > 1;\n}\n\n// Parses the environment variable var as an Int32. If it is unset,\n// returns default_val. If it is not an Int32, prints an error\n// and aborts.\nInt32 Int32FromEnvOrDie(const char* var, Int32 default_val) {\n  const char* str_val = posix::GetEnv(var);\n  if (str_val == NULL) {\n    return default_val;\n  }\n\n  Int32 result;\n  if (!ParseInt32(Message() << \"The value of environment variable \" << var,\n                  str_val, &result)) {\n    exit(EXIT_FAILURE);\n  }\n  return result;\n}\n\n// Given the total number of shards, the shard index, and the test id,\n// returns true iff the test should be run on this shard. The test id is\n// some arbitrary but unique non-negative integer assigned to each test\n// method. Assumes that 0 <= shard_index < total_shards.\nbool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {\n  return (test_id % total_shards) == shard_index;\n}\n\n// Compares the name of each test with the user-specified filter to\n// decide whether the test should be run, then records the result in\n// each TestCase and TestInfo object.\n// If shard_tests == true, further filters tests based on sharding\n// variables in the environment - see\n// http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide.\n// Returns the number of tests that should run.\nint UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {\n  const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ?\n      Int32FromEnvOrDie(kTestTotalShards, -1) : -1;\n  const Int32 shard_index = shard_tests == HONOR_SHARDING_PROTOCOL ?\n      Int32FromEnvOrDie(kTestShardIndex, -1) : -1;\n\n  // num_runnable_tests are the number of tests that will\n  // run across all shards (i.e., match filter and are not disabled).\n  // num_selected_tests are the number of tests to be run on\n  // this shard.\n  int num_runnable_tests = 0;\n  int num_selected_tests = 0;\n  for (size_t i = 0; i < test_cases_.size(); i++) {\n    TestCase* const test_case = test_cases_[i];\n    const std::string &test_case_name = test_case->name();\n    test_case->set_should_run(false);\n\n    for (size_t j = 0; j < test_case->test_info_list().size(); j++) {\n      TestInfo* const test_info = test_case->test_info_list()[j];\n      const std::string test_name(test_info->name());\n      // A test is disabled if test case name or test name matches\n      // kDisableTestFilter.\n      const bool is_disabled =\n          internal::UnitTestOptions::MatchesFilter(test_case_name,\n                                                   kDisableTestFilter) ||\n          internal::UnitTestOptions::MatchesFilter(test_name,\n                                                   kDisableTestFilter);\n      test_info->is_disabled_ = is_disabled;\n\n      const bool matches_filter =\n          internal::UnitTestOptions::FilterMatchesTest(test_case_name,\n                                                       test_name);\n      test_info->matches_filter_ = matches_filter;\n\n      const bool is_runnable =\n          (GTEST_FLAG(also_run_disabled_tests) || !is_disabled) &&\n          matches_filter;\n\n      const bool is_selected = is_runnable &&\n          (shard_tests == IGNORE_SHARDING_PROTOCOL ||\n           ShouldRunTestOnShard(total_shards, shard_index,\n                                num_runnable_tests));\n\n      num_runnable_tests += is_runnable;\n      num_selected_tests += is_selected;\n\n      test_info->should_run_ = is_selected;\n      test_case->set_should_run(test_case->should_run() || is_selected);\n    }\n  }\n  return num_selected_tests;\n}\n\n// Prints the given C-string on a single line by replacing all '\\n'\n// characters with string \"\\\\n\".  If the output takes more than\n// max_length characters, only prints the first max_length characters\n// and \"...\".\nstatic void PrintOnOneLine(const char* str, int max_length) {\n  if (str != NULL) {\n    for (int i = 0; *str != '\\0'; ++str) {\n      if (i >= max_length) {\n        printf(\"...\");\n        break;\n      }\n      if (*str == '\\n') {\n        printf(\"\\\\n\");\n        i += 2;\n      } else {\n        printf(\"%c\", *str);\n        ++i;\n      }\n    }\n  }\n}\n\n// Prints the names of the tests matching the user-specified filter flag.\nvoid UnitTestImpl::ListTestsMatchingFilter() {\n  // Print at most this many characters for each type/value parameter.\n  const int kMaxParamLength = 250;\n\n  for (size_t i = 0; i < test_cases_.size(); i++) {\n    const TestCase* const test_case = test_cases_[i];\n    bool printed_test_case_name = false;\n\n    for (size_t j = 0; j < test_case->test_info_list().size(); j++) {\n      const TestInfo* const test_info =\n          test_case->test_info_list()[j];\n      if (test_info->matches_filter_) {\n        if (!printed_test_case_name) {\n          printed_test_case_name = true;\n          printf(\"%s.\", test_case->name());\n          if (test_case->type_param() != NULL) {\n            printf(\"  # %s = \", kTypeParamLabel);\n            // We print the type parameter on a single line to make\n            // the output easy to parse by a program.\n            PrintOnOneLine(test_case->type_param(), kMaxParamLength);\n          }\n          printf(\"\\n\");\n        }\n        printf(\"  %s\", test_info->name());\n        if (test_info->value_param() != NULL) {\n          printf(\"  # %s = \", kValueParamLabel);\n          // We print the value parameter on a single line to make the\n          // output easy to parse by a program.\n          PrintOnOneLine(test_info->value_param(), kMaxParamLength);\n        }\n        printf(\"\\n\");\n      }\n    }\n  }\n  fflush(stdout);\n}\n\n// Sets the OS stack trace getter.\n//\n// Does nothing if the input and the current OS stack trace getter are\n// the same; otherwise, deletes the old getter and makes the input the\n// current getter.\nvoid UnitTestImpl::set_os_stack_trace_getter(\n    OsStackTraceGetterInterface* getter) {\n  if (os_stack_trace_getter_ != getter) {\n    delete os_stack_trace_getter_;\n    os_stack_trace_getter_ = getter;\n  }\n}\n\n// Returns the current OS stack trace getter if it is not NULL;\n// otherwise, creates an OsStackTraceGetter, makes it the current\n// getter, and returns it.\nOsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {\n  if (os_stack_trace_getter_ == NULL) {\n    os_stack_trace_getter_ = new OsStackTraceGetter;\n  }\n\n  return os_stack_trace_getter_;\n}\n\n// Returns the TestResult for the test that's currently running, or\n// the TestResult for the ad hoc test if no test is running.\nTestResult* UnitTestImpl::current_test_result() {\n  return current_test_info_ ?\n      &(current_test_info_->result_) : &ad_hoc_test_result_;\n}\n\n// Shuffles all test cases, and the tests within each test case,\n// making sure that death tests are still run first.\nvoid UnitTestImpl::ShuffleTests() {\n  // Shuffles the death test cases.\n  ShuffleRange(random(), 0, last_death_test_case_ + 1, &test_case_indices_);\n\n  // Shuffles the non-death test cases.\n  ShuffleRange(random(), last_death_test_case_ + 1,\n               static_cast<int>(test_cases_.size()), &test_case_indices_);\n\n  // Shuffles the tests inside each test case.\n  for (size_t i = 0; i < test_cases_.size(); i++) {\n    test_cases_[i]->ShuffleTests(random());\n  }\n}\n\n// Restores the test cases and tests to their order before the first shuffle.\nvoid UnitTestImpl::UnshuffleTests() {\n  for (size_t i = 0; i < test_cases_.size(); i++) {\n    // Unshuffles the tests in each test case.\n    test_cases_[i]->UnshuffleTests();\n    // Resets the index of each test case.\n    test_case_indices_[i] = static_cast<int>(i);\n  }\n}\n\n// Returns the current OS stack trace as an std::string.\n//\n// The maximum number of stack frames to be included is specified by\n// the gtest_stack_trace_depth flag.  The skip_count parameter\n// specifies the number of top frames to be skipped, which doesn't\n// count against the number of frames to be included.\n//\n// For example, if Foo() calls Bar(), which in turn calls\n// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in\n// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.\nstd::string GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,\n                                            int skip_count) {\n  // We pass skip_count + 1 to skip this wrapper function in addition\n  // to what the user really wants to skip.\n  return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1);\n}\n\n// Used by the GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ macro to\n// suppress unreachable code warnings.\nnamespace {\nclass ClassUniqueToAlwaysTrue {};\n}\n\nbool IsTrue(bool condition) { return condition; }\n\nbool AlwaysTrue() {\n#if GTEST_HAS_EXCEPTIONS\n  // This condition is always false so AlwaysTrue() never actually throws,\n  // but it makes the compiler think that it may throw.\n  if (IsTrue(false))\n    throw ClassUniqueToAlwaysTrue();\n#endif  // GTEST_HAS_EXCEPTIONS\n  return true;\n}\n\n// If *pstr starts with the given prefix, modifies *pstr to be right\n// past the prefix and returns true; otherwise leaves *pstr unchanged\n// and returns false.  None of pstr, *pstr, and prefix can be NULL.\nbool SkipPrefix(const char* prefix, const char** pstr) {\n  const size_t prefix_len = strlen(prefix);\n  if (strncmp(*pstr, prefix, prefix_len) == 0) {\n    *pstr += prefix_len;\n    return true;\n  }\n  return false;\n}\n\n// Parses a string as a command line flag.  The string should have\n// the format \"--flag=value\".  When def_optional is true, the \"=value\"\n// part can be omitted.\n//\n// Returns the value of the flag, or NULL if the parsing failed.\nconst char* ParseFlagValue(const char* str,\n                           const char* flag,\n                           bool def_optional) {\n  // str and flag must not be NULL.\n  if (str == NULL || flag == NULL) return NULL;\n\n  // The flag must start with \"--\" followed by GTEST_FLAG_PREFIX_.\n  const std::string flag_str = std::string(\"--\") + GTEST_FLAG_PREFIX_ + flag;\n  const size_t flag_len = flag_str.length();\n  if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL;\n\n  // Skips the flag name.\n  const char* flag_end = str + flag_len;\n\n  // When def_optional is true, it's OK to not have a \"=value\" part.\n  if (def_optional && (flag_end[0] == '\\0')) {\n    return flag_end;\n  }\n\n  // If def_optional is true and there are more characters after the\n  // flag name, or if def_optional is false, there must be a '=' after\n  // the flag name.\n  if (flag_end[0] != '=') return NULL;\n\n  // Returns the string after \"=\".\n  return flag_end + 1;\n}\n\n// Parses a string for a bool flag, in the form of either\n// \"--flag=value\" or \"--flag\".\n//\n// In the former case, the value is taken as true as long as it does\n// not start with '0', 'f', or 'F'.\n//\n// In the latter case, the value is taken as true.\n//\n// On success, stores the value of the flag in *value, and returns\n// true.  On failure, returns false without changing *value.\nbool ParseBoolFlag(const char* str, const char* flag, bool* value) {\n  // Gets the value of the flag as a string.\n  const char* const value_str = ParseFlagValue(str, flag, true);\n\n  // Aborts if the parsing failed.\n  if (value_str == NULL) return false;\n\n  // Converts the string value to a bool.\n  *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');\n  return true;\n}\n\n// Parses a string for an Int32 flag, in the form of\n// \"--flag=value\".\n//\n// On success, stores the value of the flag in *value, and returns\n// true.  On failure, returns false without changing *value.\nbool ParseInt32Flag(const char* str, const char* flag, Int32* value) {\n  // Gets the value of the flag as a string.\n  const char* const value_str = ParseFlagValue(str, flag, false);\n\n  // Aborts if the parsing failed.\n  if (value_str == NULL) return false;\n\n  // Sets *value to the value of the flag.\n  return ParseInt32(Message() << \"The value of flag --\" << flag,\n                    value_str, value);\n}\n\n// Parses a string for a string flag, in the form of\n// \"--flag=value\".\n//\n// On success, stores the value of the flag in *value, and returns\n// true.  On failure, returns false without changing *value.\nbool ParseStringFlag(const char* str, const char* flag, std::string* value) {\n  // Gets the value of the flag as a string.\n  const char* const value_str = ParseFlagValue(str, flag, false);\n\n  // Aborts if the parsing failed.\n  if (value_str == NULL) return false;\n\n  // Sets *value to the value of the flag.\n  *value = value_str;\n  return true;\n}\n\n// Determines whether a string has a prefix that Google Test uses for its\n// flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_.\n// If Google Test detects that a command line flag has its prefix but is not\n// recognized, it will print its help message. Flags starting with\n// GTEST_INTERNAL_PREFIX_ followed by \"internal_\" are considered Google Test\n// internal flags and do not trigger the help message.\nstatic bool HasGoogleTestFlagPrefix(const char* str) {\n  return (SkipPrefix(\"--\", &str) ||\n          SkipPrefix(\"-\", &str) ||\n          SkipPrefix(\"/\", &str)) &&\n         !SkipPrefix(GTEST_FLAG_PREFIX_ \"internal_\", &str) &&\n         (SkipPrefix(GTEST_FLAG_PREFIX_, &str) ||\n          SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str));\n}\n\n// Prints a string containing code-encoded text.  The following escape\n// sequences can be used in the string to control the text color:\n//\n//   @@    prints a single '@' character.\n//   @R    changes the color to red.\n//   @G    changes the color to green.\n//   @Y    changes the color to yellow.\n//   @D    changes to the default terminal text color.\n//\n// TODO(wan@google.com): Write tests for this once we add stdout\n// capturing to Google Test.\nstatic void PrintColorEncoded(const char* str) {\n  GTestColor color = COLOR_DEFAULT;  // The current color.\n\n  // Conceptually, we split the string into segments divided by escape\n  // sequences.  Then we print one segment at a time.  At the end of\n  // each iteration, the str pointer advances to the beginning of the\n  // next segment.\n  for (;;) {\n    const char* p = strchr(str, '@');\n    if (p == NULL) {\n      ColoredPrintf(color, \"%s\", str);\n      return;\n    }\n\n    ColoredPrintf(color, \"%s\", std::string(str, p).c_str());\n\n    const char ch = p[1];\n    str = p + 2;\n    if (ch == '@') {\n      ColoredPrintf(color, \"@\");\n    } else if (ch == 'D') {\n      color = COLOR_DEFAULT;\n    } else if (ch == 'R') {\n      color = COLOR_RED;\n    } else if (ch == 'G') {\n      color = COLOR_GREEN;\n    } else if (ch == 'Y') {\n      color = COLOR_YELLOW;\n    } else {\n      --str;\n    }\n  }\n}\n\nstatic const char kColorEncodedHelpMessage[] =\n\"This program contains tests written using \" GTEST_NAME_ \". You can use the\\n\"\n\"following command line flags to control its behavior:\\n\"\n\"\\n\"\n\"Test Selection:\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"list_tests@D\\n\"\n\"      List the names of all tests instead of running them. The name of\\n\"\n\"      TEST(Foo, Bar) is \\\"Foo.Bar\\\".\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"filter=@YPOSTIVE_PATTERNS\"\n    \"[@G-@YNEGATIVE_PATTERNS]@D\\n\"\n\"      Run only the tests whose name matches one of the positive patterns but\\n\"\n\"      none of the negative patterns. '?' matches any single character; '*'\\n\"\n\"      matches any substring; ':' separates two patterns.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"also_run_disabled_tests@D\\n\"\n\"      Run all disabled tests too.\\n\"\n\"\\n\"\n\"Test Execution:\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"repeat=@Y[COUNT]@D\\n\"\n\"      Run the tests repeatedly; use a negative count to repeat forever.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"shuffle@D\\n\"\n\"      Randomize tests' orders on every iteration.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"random_seed=@Y[NUMBER]@D\\n\"\n\"      Random number seed to use for shuffling test orders (between 1 and\\n\"\n\"      99999, or 0 to use a seed based on the current time).\\n\"\n\"\\n\"\n\"Test Output:\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"color=@Y(@Gyes@Y|@Gno@Y|@Gauto@Y)@D\\n\"\n\"      Enable/disable colored output. The default is @Gauto@D.\\n\"\n\"  -@G-\" GTEST_FLAG_PREFIX_ \"print_time=0@D\\n\"\n\"      Don't print the elapsed time of each test.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"output=xml@Y[@G:@YDIRECTORY_PATH@G\"\n    GTEST_PATH_SEP_ \"@Y|@G:@YFILE_PATH]@D\\n\"\n\"      Generate an XML report in the given directory or with the given file\\n\"\n\"      name. @YFILE_PATH@D defaults to @Gtest_details.xml@D.\\n\"\n#if GTEST_CAN_STREAM_RESULTS_\n\"  @G--\" GTEST_FLAG_PREFIX_ \"stream_result_to=@YHOST@G:@YPORT@D\\n\"\n\"      Stream test results to the given server.\\n\"\n#endif  // GTEST_CAN_STREAM_RESULTS_\n\"\\n\"\n\"Assertion Behavior:\\n\"\n#if GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS\n\"  @G--\" GTEST_FLAG_PREFIX_ \"death_test_style=@Y(@Gfast@Y|@Gthreadsafe@Y)@D\\n\"\n\"      Set the default death test style.\\n\"\n#endif  // GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS\n\"  @G--\" GTEST_FLAG_PREFIX_ \"break_on_failure@D\\n\"\n\"      Turn assertion failures into debugger break-points.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"throw_on_failure@D\\n\"\n\"      Turn assertion failures into C++ exceptions.\\n\"\n\"  @G--\" GTEST_FLAG_PREFIX_ \"catch_exceptions=0@D\\n\"\n\"      Do not report exceptions as test failures. Instead, allow them\\n\"\n\"      to crash the program or throw a pop-up (on Windows).\\n\"\n\"\\n\"\n\"Except for @G--\" GTEST_FLAG_PREFIX_ \"list_tests@D, you can alternatively set \"\n    \"the corresponding\\n\"\n\"environment variable of a flag (all letters in upper-case). For example, to\\n\"\n\"disable colored text output, you can either specify @G--\" GTEST_FLAG_PREFIX_\n    \"color=no@D or set\\n\"\n\"the @G\" GTEST_FLAG_PREFIX_UPPER_ \"COLOR@D environment variable to @Gno@D.\\n\"\n\"\\n\"\n\"For more information, please read the \" GTEST_NAME_ \" documentation at\\n\"\n\"@G\" GTEST_PROJECT_URL_ \"@D. If you find a bug in \" GTEST_NAME_ \"\\n\"\n\"(not one in your own code or tests), please report it to\\n\"\n\"@G<\" GTEST_DEV_EMAIL_ \">@D.\\n\";\n\n// Parses the command line for Google Test flags, without initializing\n// other parts of Google Test.  The type parameter CharType can be\n// instantiated to either char or wchar_t.\ntemplate <typename CharType>\nvoid ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {\n  for (int i = 1; i < *argc; i++) {\n    const std::string arg_string = StreamableToString(argv[i]);\n    const char* const arg = arg_string.c_str();\n\n    using internal::ParseBoolFlag;\n    using internal::ParseInt32Flag;\n    using internal::ParseStringFlag;\n\n    // Do we see a Google Test flag?\n    if (ParseBoolFlag(arg, kAlsoRunDisabledTestsFlag,\n                      &GTEST_FLAG(also_run_disabled_tests)) ||\n        ParseBoolFlag(arg, kBreakOnFailureFlag,\n                      &GTEST_FLAG(break_on_failure)) ||\n        ParseBoolFlag(arg, kCatchExceptionsFlag,\n                      &GTEST_FLAG(catch_exceptions)) ||\n        ParseStringFlag(arg, kColorFlag, &GTEST_FLAG(color)) ||\n        ParseStringFlag(arg, kDeathTestStyleFlag,\n                        &GTEST_FLAG(death_test_style)) ||\n        ParseBoolFlag(arg, kDeathTestUseFork,\n                      &GTEST_FLAG(death_test_use_fork)) ||\n        ParseStringFlag(arg, kFilterFlag, &GTEST_FLAG(filter)) ||\n        ParseStringFlag(arg, kInternalRunDeathTestFlag,\n                        &GTEST_FLAG(internal_run_death_test)) ||\n        ParseBoolFlag(arg, kListTestsFlag, &GTEST_FLAG(list_tests)) ||\n        ParseStringFlag(arg, kOutputFlag, &GTEST_FLAG(output)) ||\n        ParseBoolFlag(arg, kPrintTimeFlag, &GTEST_FLAG(print_time)) ||\n        ParseInt32Flag(arg, kRandomSeedFlag, &GTEST_FLAG(random_seed)) ||\n        ParseInt32Flag(arg, kRepeatFlag, &GTEST_FLAG(repeat)) ||\n        ParseBoolFlag(arg, kShuffleFlag, &GTEST_FLAG(shuffle)) ||\n        ParseInt32Flag(arg, kStackTraceDepthFlag,\n                       &GTEST_FLAG(stack_trace_depth)) ||\n        ParseStringFlag(arg, kStreamResultToFlag,\n                        &GTEST_FLAG(stream_result_to)) ||\n        ParseBoolFlag(arg, kThrowOnFailureFlag,\n                      &GTEST_FLAG(throw_on_failure))\n        ) {\n      // Yes.  Shift the remainder of the argv list left by one.  Note\n      // that argv has (*argc + 1) elements, the last one always being\n      // NULL.  The following loop moves the trailing NULL element as\n      // well.\n      for (int j = i; j != *argc; j++) {\n        argv[j] = argv[j + 1];\n      }\n\n      // Decrements the argument count.\n      (*argc)--;\n\n      // We also need to decrement the iterator as we just removed\n      // an element.\n      i--;\n    } else if (arg_string == \"--help\" || arg_string == \"-h\" ||\n               arg_string == \"-?\" || arg_string == \"/?\" ||\n               HasGoogleTestFlagPrefix(arg)) {\n      // Both help flag and unrecognized Google Test flags (excluding\n      // internal ones) trigger help display.\n      g_help_flag = true;\n    }\n  }\n\n  if (g_help_flag) {\n    // We print the help here instead of in RUN_ALL_TESTS(), as the\n    // latter may not be called at all if the user is using Google\n    // Test with another testing framework.\n    PrintColorEncoded(kColorEncodedHelpMessage);\n  }\n}\n\n// Parses the command line for Google Test flags, without initializing\n// other parts of Google Test.\nvoid ParseGoogleTestFlagsOnly(int* argc, char** argv) {\n  ParseGoogleTestFlagsOnlyImpl(argc, argv);\n}\nvoid ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {\n  ParseGoogleTestFlagsOnlyImpl(argc, argv);\n}\n\n// The internal implementation of InitGoogleTest().\n//\n// The type parameter CharType can be instantiated to either char or\n// wchar_t.\ntemplate <typename CharType>\nvoid InitGoogleTestImpl(int* argc, CharType** argv) {\n  g_init_gtest_count++;\n\n  // We don't want to run the initialization code twice.\n  if (g_init_gtest_count != 1) return;\n\n  if (*argc <= 0) return;\n\n  internal::g_executable_path = internal::StreamableToString(argv[0]);\n\n#if GTEST_HAS_DEATH_TEST\n\n  g_argvs.clear();\n  for (int i = 0; i != *argc; i++) {\n    g_argvs.push_back(StreamableToString(argv[i]));\n  }\n\n#endif  // GTEST_HAS_DEATH_TEST\n\n  ParseGoogleTestFlagsOnly(argc, argv);\n  GetUnitTestImpl()->PostFlagParsingInit();\n}\n\n}  // namespace internal\n\n// Initializes Google Test.  This must be called before calling\n// RUN_ALL_TESTS().  In particular, it parses a command line for the\n// flags that Google Test recognizes.  Whenever a Google Test flag is\n// seen, it is removed from argv, and *argc is decremented.\n//\n// No value is returned.  Instead, the Google Test flag variables are\n// updated.\n//\n// Calling the function for the second time has no user-visible effect.\nvoid InitGoogleTest(int* argc, char** argv) {\n  internal::InitGoogleTestImpl(argc, argv);\n}\n\n// This overloaded version can be used in Windows programs compiled in\n// UNICODE mode.\nvoid InitGoogleTest(int* argc, wchar_t** argv) {\n  internal::InitGoogleTestImpl(argc, argv);\n}\n\n}  // namespace testing\n"
  },
  {
    "path": "src/madness/external/gtest/src/gtest_main.cc",
    "content": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n//     * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//     * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//     * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#include <stdio.h>\n\n#include \"gtest/gtest.h\"\n\nGTEST_API_ int main(int argc, char **argv) {\n  printf(\"Running main() from gtest_main.cc\\n\");\n  testing::InitGoogleTest(&argc, argv);\n  return RUN_ALL_TESTS();\n}\n"
  },
  {
    "path": "src/madness/external/muParser/CMakeLists.txt",
    "content": "# src/madness/external/muParser\n\nset(MADMUPARSER_HEADERS \n    muParserBase.h muParserBytecode.h muParserCallback.h muParserDef.h\n    muParserDLL.h muParserError.h muParserFixes.h muParser.h muParserInt.h \n    muParserStack.h muParserTest.h muParserToken.h muParserTokenReader.h)\nset(MADMUPARSER_SOURCES\n    muParserBase.cpp muParserBytecode.cpp muParserCallback.cpp muParser.cpp\n    muParserError.cpp muParserTokenReader.cpp muParserBase.h muParserBytecode.h\n    muParserCallback.h muParserDef.h muParserDLL.h muParserError.h\n    muParserFixes.h muParser.h muParserInt.h muParserStack.h muParserTest.h \n    muParserToken.h muParserTokenReader.h)\n\n# Create the MADmuparser library\nadd_mad_library(muparser MADMUPARSER_SOURCES MADMUPARSER_HEADERS \"dummy\" \"madness/external/muParser\")\n"
  },
  {
    "path": "src/madness/external/muParser/README",
    "content": "The contents of this directory are from the\nmuParser project at\n\n   http://muparser.sourceforge.net/\n\n"
  },
  {
    "path": "src/madness/external/muParser/muParser.cpp",
    "content": "/* \r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n\r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n#include \"muParser.h\"\r\n\r\n//--- Standard includes ------------------------------------------------------------------------\r\n#include <cmath>\r\n#include <algorithm>\r\n#include <numeric>\r\n\r\n/** \\brief Pi (what else?). */\r\n#define PARSER_CONST_PI  3.141592653589793238462643\r\n\r\n/** \\brief The eulerian number. */\r\n#define PARSER_CONST_E   2.718281828459045235360287\r\n\r\nusing namespace std;\r\n\r\n/** \\file\r\n    \\brief Implementation of the standard floating point parser.\r\n*/\r\n\r\n\r\n/** \\brief Namespace for mathematical applications. */\r\nnamespace mu\r\n{\r\n  std::locale Parser::s_locale = std::locale(\"C\");\r\n  \r\n  //---------------------------------------------------------------------------\r\n  // Trigonometric function\r\n  value_type Parser::Sin(value_type v)   { return sin(v);  }\r\n  value_type Parser::Cos(value_type v)   { return cos(v);  }\r\n  value_type Parser::Tan(value_type v)   { return tan(v);  }\r\n  value_type Parser::ASin(value_type v)  { return asin(v); }\r\n  value_type Parser::ACos(value_type v)  { return acos(v); }\r\n  value_type Parser::ATan(value_type v)  { return atan(v); }\r\n  value_type Parser::Sinh(value_type v)  { return sinh(v); }\r\n  value_type Parser::Cosh(value_type v)  { return cosh(v); }\r\n  value_type Parser::Tanh(value_type v)  { return tanh(v); }\r\n  value_type Parser::ASinh(value_type v) { return log(v + sqrt(v * v + 1)); }\r\n  value_type Parser::ACosh(value_type v) { return log(v + sqrt(v * v - 1)); }\r\n  value_type Parser::ATanh(value_type v) { return ((value_type)0.5 * log((1 + v) / (1 - v))); }\r\n\r\n  //---------------------------------------------------------------------------\r\n  // Logarithm functions\r\n  value_type Parser::Log2(value_type v)  { return log(v)/log((value_type)2); } // Logarithm base 2\r\n  value_type Parser::Log10(value_type v) { return log10(v); } // Logarithm base 10\r\n  value_type Parser::Ln(value_type v)    { return log(v);   } // Logarithm base e (natural logarithm)\r\n\r\n  //---------------------------------------------------------------------------\r\n  //  misc\r\n  value_type Parser::Exp(value_type v)  { return exp(v);   }\r\n  value_type Parser::Abs(value_type v)  { return fabs(v);  }\r\n  value_type Parser::Sqrt(value_type v) { return sqrt(v);  }\r\n  value_type Parser::Rint(value_type v) { return floor(v + (value_type)0.5); }\r\n  value_type Parser::Sign(value_type v) { return (value_type)((v<0) ? -1 : (v>0) ? 1 : 0); }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Conditional (if then else).\r\n      \\param v1 Condition\r\n      \\param v2 First value\r\n      \\param v3 Second value\r\n      \\return v2 if v1!=0 v3 otherwise.\r\n  */\r\n  value_type Parser::Ite(value_type v1, value_type v2, value_type v3) \r\n  { \r\n    return (v1) ? v2 : v3; \r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Callback for the unary minus operator.\r\n      \\param v The value to negate\r\n      \\return -v\r\n  */\r\n  value_type Parser::UnaryMinus(value_type v) \r\n  { \r\n    return -v; \r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Callback for adding multiple values. \r\n      \\param [in] a_afArg Vector with the function arguments\r\n      \\param [in] a_iArgc The size of a_afArg\r\n  */\r\n  value_type Parser::Sum(const value_type *a_afArg, int a_iArgc)\r\n  { \r\n    if (!a_iArgc)\t\r\n      throw exception_type(_T(\"too few arguments for function sum.\"));\r\n\r\n    value_type fRes=0;\r\n    for (int i=0; i<a_iArgc; ++i) fRes += a_afArg[i];\r\n    return fRes;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Callback for averaging multiple values. \r\n      \\param [in] a_afArg Vector with the function arguments\r\n      \\param [in] a_iArgc The size of a_afArg\r\n  */\r\n  value_type Parser::Avg(const value_type *a_afArg, int a_iArgc)\r\n  { \r\n    if (!a_iArgc)\t\r\n      throw exception_type(_T(\"too few arguments for function sum.\"));\r\n\r\n    value_type fRes=0;\r\n    for (int i=0; i<a_iArgc; ++i) fRes += a_afArg[i];\r\n    return fRes/(double)a_iArgc;\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Callback for determining the minimum value out of a vector. \r\n      \\param [in] a_afArg Vector with the function arguments\r\n      \\param [in] a_iArgc The size of a_afArg\r\n  */\r\n  value_type Parser::Min(const value_type *a_afArg, int a_iArgc)\r\n  { \r\n      if (!a_iArgc)\t\r\n          throw exception_type(_T(\"too few arguments for function min.\"));\r\n\r\n      value_type fRes=a_afArg[0];\r\n      for (int i=0; i<a_iArgc; ++i) fRes = std::min(fRes, a_afArg[i]);\r\n\r\n      return fRes;\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Callback for determining the maximum value out of a vector. \r\n      \\param [in] a_afArg Vector with the function arguments\r\n      \\param [in] a_iArgc The size of a_afArg\r\n  */\r\n  value_type Parser::Max(const value_type *a_afArg, int a_iArgc)\r\n  { \r\n      if (!a_iArgc)\t\r\n          throw exception_type(_T(\"too few arguments for function min.\"));\r\n\r\n      value_type fRes=a_afArg[0];\r\n      for (int i=0; i<a_iArgc; ++i) fRes = std::max(fRes, a_afArg[i]);\r\n\r\n      return fRes;\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Default value recognition callback. \r\n      \\param [in] a_szExpr Pointer to the expression\r\n      \\param [in, out] a_iPos Pointer to an index storing the current position within the expression\r\n      \\param [out] a_fVal Pointer where the value should be stored in case one is found.\r\n      \\return 1 if a value was found 0 otherwise.\r\n  */\r\n  int Parser::IsVal(const char_type* a_szExpr, int *a_iPos, value_type *a_fVal)\r\n  {\r\n    value_type fVal(0);\r\n\r\n  // 20080309 commented the fix since it is not local aware\r\n  //\r\n  //// thanks to CodeProject member sailorickm for writing this fix:\r\n  //// http://www.codeproject.com/cpp/FastMathParser.asp?msg=1354598#xx1354598xx\r\n  //// i cant test it myself, if you see problems please contact me.\r\n  ////\r\n  //// - 20080309 ibg; support for locales wont work with this fix\r\n  //#if defined (__hpux) || (defined __GNUC__ && (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 )))\r\n  //  int iEnd = 0;\r\n  //  int nAssigned = sscanf(a_szExpr, \"%lf%n\", &fVal, &iEnd);\r\n  //  if (nAssigned == 0)\r\n  //  iEnd = -1;\r\n  //#else\r\n    stringstream_type stream(a_szExpr);\r\n    stream.seekg(0);        // todo:  check if this really is necessary\r\n    stream.imbue(Parser::s_locale);\r\n    stream >> fVal;\r\n    int iEnd = stream.tellg(); // Position after reading\r\n  //#endif\r\n\r\n    if (iEnd==-1)\r\n      return 0;\r\n\r\n    *a_iPos += iEnd;\r\n    *a_fVal = fVal;\r\n    return 1;\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Constructor. \r\n\r\n    Call ParserBase class constructor and trigger Function, Operator and Constant initialization.\r\n  */\r\n  Parser::Parser()\r\n    :ParserBase()\r\n  {\r\n    AddValIdent(IsVal);\r\n\r\n    InitCharSets();\r\n    InitFun();\r\n    InitConst();\r\n    InitOprt();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Define the character sets. \r\n      \\sa DefineNameChars, DefineOprtChars, DefineInfixOprtChars\r\n    \r\n    This function is used for initializing the default character sets that define\r\n    the characters to be useable in function and variable names and operators.\r\n  */\r\n  void Parser::InitCharSets()\r\n  {\r\n    DefineNameChars( _T(\"0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") );\r\n    DefineOprtChars( _T(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-*^/?<>=#!$%&|~'_\") );\r\n    DefineInfixOprtChars( _T(\"/+-*^?<>=#!$%&|~'_\") );\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Initialize the default functions. */\r\n  void Parser::InitFun()\r\n  {\r\n    // trigonometric functions\r\n    DefineFun(_T(\"sin\"), Sin);\r\n    DefineFun(_T(\"cos\"), Cos);\r\n    DefineFun(_T(\"tan\"), Tan);\r\n    // arcus functions\r\n    DefineFun(_T(\"asin\"), ASin);\r\n    DefineFun(_T(\"acos\"), ACos);\r\n    DefineFun(_T(\"atan\"), ATan);\r\n    // hyperbolic functions\r\n    DefineFun(_T(\"sinh\"), Sinh);\r\n    DefineFun(_T(\"cosh\"), Cosh);\r\n    DefineFun(_T(\"tanh\"), Tanh);\r\n    // arcus hyperbolic functions\r\n    DefineFun(_T(\"asinh\"), ASinh);\r\n    DefineFun(_T(\"acosh\"), ACosh);\r\n    DefineFun(_T(\"atanh\"), ATanh);\r\n    // Logarithm functions\r\n    DefineFun(_T(\"log2\"), Log2);\r\n    DefineFun(_T(\"log10\"), Log10);\r\n    DefineFun(_T(\"log\"), Log10);\r\n    DefineFun(_T(\"ln\"), Ln);\r\n    // misc\r\n    DefineFun(_T(\"exp\"), Exp);\r\n    DefineFun(_T(\"sqrt\"), Sqrt);\r\n    DefineFun(_T(\"sign\"), Sign);\r\n    DefineFun(_T(\"rint\"), Rint);\r\n    DefineFun(_T(\"abs\"), Abs);\r\n    DefineFun(_T(\"if\"), Ite);\r\n    // Functions with variable number of arguments\r\n    DefineFun(_T(\"sum\"), Sum);\r\n    DefineFun(_T(\"avg\"), Avg);\r\n    DefineFun(_T(\"min\"), Min);\r\n    DefineFun(_T(\"max\"), Max);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Initialize constants.\r\n  \r\n    By default the parser recognizes two constants. Pi (\"pi\") and the eulerian\r\n    number (\"_e\").\r\n  */\r\n  void Parser::InitConst()\r\n  {\r\n    DefineConst(_T(\"_pi\"), (value_type)PARSER_CONST_PI);\r\n    DefineConst(_T(\"_e\"), (value_type)PARSER_CONST_E);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Set the decimal separator.\r\n      \\param cDecSep Decimal separator as a character value.\r\n      \\sa SetThousandsSep\r\n\r\n      By default muparser uses the \"C\" locale. The decimal separator of this\r\n      locale is overwritten by the one provided here.\r\n  */\r\n  void Parser::SetDecSep(char_type cDecSep)\r\n  {\r\n    char_type cThousandsSep = std::use_facet< change_dec_sep<char_type> >(s_locale).thousands_sep();\r\n    s_locale = std::locale(std::locale(\"C\"), new change_dec_sep<char_type>(cDecSep, cThousandsSep));\r\n  }\r\n  \r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Sets the thousands operator. \r\n      \\param cThousandsSep The thousands separator as a character\r\n      \\sa SetDecSep\r\n\r\n      By default muparser uses the \"C\" locale. The thousands separator of this\r\n      locale is overwritten by the one provided here.\r\n  */\r\n  void Parser::SetThousandsSep(char_type cThousandsSep)\r\n  {\r\n    char_type cDecSep = std::use_facet< change_dec_sep<char_type> >(s_locale).decimal_point();\r\n    s_locale = std::locale(std::locale(\"C\"), new change_dec_sep<char_type>(cDecSep, cThousandsSep));\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Initialize operators. \r\n  \r\n    By default only the unary minus operator is added.\r\n  */\r\n  void Parser::InitOprt()\r\n  {\r\n    DefineInfixOprt(_T(\"-\"), UnaryMinus);\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Numerically differentiate with regard to a variable. \r\n      \\param [in] a_Var Pointer to the differentiation variable.\r\n      \\param [in] a_fPos Position at which the differentiation should take place.\r\n      \\param [in] a_fEpsilon Epsilon used for the numerical differentiation.\r\n\r\n    Numerical differentiation uses a 5 point operator yielding a 4th order \r\n    formula. The default value for epsilon is 0.00074 which is\r\n    numerical_limits<double>::epsilon() ^ (1/5) as suggested in the muparser\r\n    forum:\r\n\r\n    http://sourceforge.net/forum/forum.php?thread_id=1994611&forum_id=462843\r\n  */\r\n  value_type Parser::Diff(value_type *a_Var, \r\n                          value_type  a_fPos, \r\n                          value_type  a_fEpsilon) const\r\n  {\r\n    value_type fRes(0), \r\n               fBuf(*a_Var), \r\n               f[4] = {0,0,0,0};\r\n\r\n    *a_Var = a_fPos+2 * a_fEpsilon;  f[0] = Eval();\r\n    *a_Var = a_fPos+1 * a_fEpsilon;  f[1] = Eval();\r\n    *a_Var = a_fPos-1 * a_fEpsilon;  f[2] = Eval();\r\n    *a_Var = a_fPos-2 * a_fEpsilon;  f[3] = Eval();\r\n    *a_Var = fBuf; // restore variable\r\n\r\n    fRes = (-f[0] + 8*f[1] - 8*f[2] + f[3]) / (12*a_fEpsilon);\r\n    return fRes;\r\n  }\r\n} // namespace mu\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParser.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n#ifndef MU_PARSER_H\r\n#define MU_PARSER_H\r\n\r\n//--- Standard includes ------------------------------------------------------------------------\r\n#include <vector>\r\n#include <locale>\r\n#include <limits>\r\n\r\n//--- Parser includes --------------------------------------------------------------------------\r\n#include \"muParserBase.h\"\r\n\r\n\r\n/** \\file\r\n    \\brief Definition of the standard floating point parser.\r\n*/\r\n\r\nnamespace mu\r\n{\r\n  /** \\brief Mathematical expressions parser.\r\n    \r\n    Standard implementation of the mathematical expressions parser. \r\n    Can be used as a reference implementation for subclassing the parser.\r\n\r\n    <small>\r\n    (C) 2004-2008 Ingo Berg<br>\r\n    ingo_berg(at)gmx.de\r\n    </small>\r\n  */\r\n  class Parser : public ParserBase\r\n  {\r\n  public:\r\n\r\n    Parser();\r\n\r\n    virtual void InitCharSets();\r\n    virtual void InitFun();\r\n    virtual void InitConst();\r\n    virtual void InitOprt();\r\n\r\n    void SetDecSep(char_type cDecSep);\r\n    void SetThousandsSep(char_type cThousandsSep);\r\n    \r\n    value_type Diff(value_type *a_Var, \r\n                    value_type a_fPos, \r\n                    value_type a_fEpsilon = 0.00074) const;\r\n\r\n  private:\r\n\r\n    /** \\brief A facet class used to change decimal and thousands separator. */\r\n    template<class TChar>\r\n    class change_dec_sep : public std::numpunct<TChar>\r\n    {\r\n    public:\r\n      \r\n      explicit change_dec_sep(char_type cDecSep, char_type cThousandsSep = 0, int nGroup = 3)\r\n        :std::numpunct<TChar>()\r\n        ,m_nGroup(nGroup)\r\n        ,m_cDecPoint(cDecSep)\r\n        ,m_cThousandsSep(cThousandsSep)\r\n      {}\r\n\r\n    protected:\r\n      \r\n      virtual char_type do_decimal_point() const\r\n      {\r\n        return m_cDecPoint;\r\n      }\r\n\r\n      virtual char_type do_thousands_sep() const\r\n      {\r\n        return m_cThousandsSep;\r\n      }\r\n\r\n      virtual std::string do_grouping() const \r\n      { \r\n        // fix for issue 4: https://code.google.com/p/muparser/issues/detail?id=4\r\n        // courtesy of Jens Bartsch\r\n        // original code:\r\n        //        return std::string(1, (char)m_nGroup);\r\n        // new code:\r\n        return std::string(1, (char)(m_cThousandsSep > 0 ? m_nGroup : std::numeric_limits<char>::max()));\r\n      }\r\n\r\n    private:\r\n\r\n      int m_nGroup;\r\n      char_type m_cDecPoint;  \r\n      char_type m_cThousandsSep;\r\n    };\r\n     \r\n    // Trigonometric functions\r\n    static value_type  Sin(value_type);\r\n    static value_type  Cos(value_type);\r\n    static value_type  Tan(value_type);\r\n    // arcus functions\r\n    static value_type  ASin(value_type);\r\n    static value_type  ACos(value_type);\r\n    static value_type  ATan(value_type);\r\n    // hyperbolic functions\r\n    static value_type  Sinh(value_type);\r\n    static value_type  Cosh(value_type);\r\n    static value_type  Tanh(value_type);\r\n    // arcus hyperbolic functions\r\n    static value_type  ASinh(value_type);\r\n    static value_type  ACosh(value_type);\r\n    static value_type  ATanh(value_type);\r\n    // Logarithm functions\r\n    static value_type  Log2(value_type);  // Logarithm Base 2\r\n    static value_type  Log10(value_type); // Logarithm Base 10\r\n    static value_type  Ln(value_type);    // Logarithm Base e (natural logarithm)\r\n    // misc\r\n    static value_type  Exp(value_type);\r\n    static value_type  Abs(value_type);\r\n    static value_type  Sqrt(value_type);\r\n    static value_type  Rint(value_type);\r\n    static value_type  Sign(value_type);\r\n    static value_type  Ite(value_type, value_type, value_type);\r\n\r\n    // Prefix operators\r\n    // !!! Unary Minus is a MUST if you want to use negative signs !!!\r\n    static value_type  UnaryMinus(value_type);\r\n\r\n    // Functions with variable number of arguments\r\n    static value_type Sum(const value_type*, int);  // sum\r\n    static value_type Avg(const value_type*, int);  // mean value\r\n    static value_type Min(const value_type*, int);  // minimum\r\n    static value_type Max(const value_type*, int);  // maximum\r\n\r\n    static int IsVal(const char_type* a_szExpr, int *a_iPos, value_type *a_fVal);\r\n\r\n    static std::locale s_locale;  ///< The locale used by the parser\r\n  };\r\n} // namespace mu\r\n\r\n#endif\r\n\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserBase.cpp",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#include \"muParser.h\"\r\n\r\n//--- Standard includes ------------------------------------------------------------------------\r\n#include <cassert>\r\n#include <cmath>\r\n#include <memory>\r\n#include <vector>\r\n#include <deque>\r\n#include <sstream>\r\n#include <locale>\r\n\r\nusing namespace std;\r\n\r\n/** \\file\r\n    \\brief This file contains the basic implementation of the muparser engine.\r\n*/\r\n\r\nnamespace mu\r\n{\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Identifiers for built in binary operators. \r\n\r\n      When defining custom binary operators with #AddOprt(...) make sure not to choose \r\n      names conflicting with these definitions. \r\n  */\r\n  const char_type* ParserBase::c_DefaultOprt[] =\r\n  { \r\n    _T(\"<=\"), _T(\">=\"),  _T(\"!=\"), \r\n    _T(\"==\"), _T(\"<\"),   _T(\">\"), \r\n    _T(\"+\"),  _T(\"-\"),   _T(\"*\"), \r\n    _T(\"/\"),  _T(\"^\"),   _T(\"and\"), \r\n    _T(\"or\"), _T(\"xor\"), _T(\"=\"), \r\n    _T(\"(\"),  _T(\")\"), 0 \r\n  };\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Constructor.\r\n      \\throw ParserException if a_szFormula is null.\r\n  */\r\n  ParserBase::ParserBase()\r\n    :m_pParseFormula(&ParserBase::ParseString)\r\n    ,m_pCmdCode(0)\r\n    ,m_vByteCode()\r\n    ,m_vStringBuf()\r\n    ,m_pTokenReader()\r\n    ,m_FunDef()\r\n    ,m_PostOprtDef()\r\n    ,m_InfixOprtDef()\r\n    ,m_OprtDef()\r\n    ,m_ConstDef()\r\n    ,m_StrVarDef()\r\n    ,m_VarDef()\r\n    ,m_bOptimize(true)\r\n    ,m_bUseByteCode(true)\r\n    ,m_bBuiltInOp(true)\r\n    ,m_sNameChars()\r\n    ,m_sOprtChars()\r\n    ,m_sInfixOprtChars()\r\n  {\r\n    InitTokenReader();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserBase::ParserBase(const ParserBase &a_Parser)\r\n    :m_pParseFormula(&ParserBase::ParseString)\r\n    ,m_pCmdCode(0)\r\n    ,m_vByteCode()\r\n    ,m_vStringBuf()\r\n    ,m_pTokenReader()\r\n    ,m_FunDef()\r\n    ,m_PostOprtDef()\r\n    ,m_InfixOprtDef()\r\n    ,m_OprtDef()\r\n    ,m_ConstDef()\r\n    ,m_StrVarDef()\r\n    ,m_VarDef()\r\n    ,m_bOptimize(true)\r\n    ,m_bUseByteCode(true)\r\n    ,m_bBuiltInOp(true)\r\n  {\r\n    m_pTokenReader.reset(new token_reader_type(this));\r\n    Assign(a_Parser);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserBase::~ParserBase()\r\n  {}\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Assignement operator. \r\n\r\n    Implemented by calling Assign(a_Parser). Self assignement is suppressed.\r\n    \\param a_Parser Object to copy to this.\r\n    \\return *this\r\n    \\throw nothrow\r\n  */\r\n  ParserBase& ParserBase::operator=(const ParserBase &a_Parser)\r\n  {\r\n    Assign(a_Parser);\r\n    return *this;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Copy state of a parser object to this. \r\n\r\n    Clears Variables and Functions of this parser.\r\n    Copies the states of all internal variables.\r\n    Resets parse function to string parse mode.\r\n\r\n    \\param a_Parser the source object.\r\n  */\r\n  void ParserBase::Assign(const ParserBase &a_Parser)\r\n  {\r\n    if (&a_Parser==this)\r\n      return;\r\n\r\n    // Don't copy bytecode instead cause the parser to create new bytecode\r\n    // by resetting the parse function.\r\n    ReInit();\r\n\r\n    m_ConstDef = a_Parser.m_ConstDef;         // Copy user define constants\r\n    m_VarDef = a_Parser.m_VarDef;             // Copy user defined variables\r\n    m_bOptimize  = a_Parser.m_bOptimize;\r\n    m_bUseByteCode = a_Parser.m_bUseByteCode;\r\n    m_bBuiltInOp = a_Parser.m_bBuiltInOp;\r\n    m_vStringBuf = a_Parser.m_vStringBuf;\r\n    m_pTokenReader.reset(a_Parser.m_pTokenReader->Clone(this));\r\n    m_StrVarDef = a_Parser.m_StrVarDef;\r\n    m_vStringVarBuf = a_Parser.m_vStringVarBuf;\r\n\r\n    // Copy function and operator callbacks\r\n    m_FunDef = a_Parser.m_FunDef;             // Copy function definitions\r\n    m_PostOprtDef = a_Parser.m_PostOprtDef;   // post value unary operators\r\n    m_InfixOprtDef = a_Parser.m_InfixOprtDef; // unary operators for infix notation\r\n\r\n    m_sNameChars = a_Parser.m_sNameChars;\r\n    m_sOprtChars = a_Parser.m_sOprtChars;\r\n    m_sInfixOprtChars = a_Parser.m_sInfixOprtChars;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Initialize the token reader. \r\n\r\n    Create new token reader object and submit pointers to function, operator,\r\n    constant and variable definitions.\r\n\r\n    \\post m_pTokenReader.get()!=0\r\n    \\throw nothrow\r\n  */\r\n  void ParserBase::InitTokenReader()\r\n  {\r\n    m_pTokenReader.reset(new token_reader_type(this));\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Reset parser to string parsing mode and clear internal buffers.\r\n\r\n      Clear bytecode, reset the token reader.\r\n      \\throw nothrow\r\n  */\r\n  void ParserBase::ReInit() const\r\n  {\r\n    m_pParseFormula = &ParserBase::ParseString;\r\n    m_vStringBuf.clear();\r\n    m_vByteCode.clear();\r\n    m_pTokenReader->ReInit();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  void ParserBase::AddValIdent(identfun_type a_pCallback)\r\n  {\r\n    m_pTokenReader->AddValIdent(a_pCallback);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  void ParserBase::SetVarFactory(facfun_type a_pFactory, void *pUserData)\r\n  {\r\n    m_pTokenReader->SetVarCreator(a_pFactory, pUserData);  \r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add a function or operator callback to the parser. */\r\n  void ParserBase::AddCallback( const string_type &a_strName,\r\n                                const ParserCallback &a_Callback, \r\n                                funmap_type &a_Storage,\r\n                                const char_type *a_szCharSet )\r\n  {\r\n    if (a_Callback.GetAddr()==0)\r\n        Error(ecINVALID_FUN_PTR);\r\n\r\n    const funmap_type *pFunMap = &a_Storage;\r\n\r\n    // Check for conflicting operator or function names\r\n    if ( pFunMap!=&m_FunDef && m_FunDef.find(a_strName)!=m_FunDef.end() )\r\n      Error(ecNAME_CONFLICT);\r\n\r\n    if ( pFunMap!=&m_PostOprtDef && m_PostOprtDef.find(a_strName)!=m_PostOprtDef.end() )\r\n      Error(ecNAME_CONFLICT);\r\n\r\n    if ( pFunMap!=&m_InfixOprtDef && pFunMap!=&m_OprtDef && m_InfixOprtDef.find(a_strName)!=m_InfixOprtDef.end() )\r\n      Error(ecNAME_CONFLICT);\r\n\r\n    if ( pFunMap!=&m_InfixOprtDef && pFunMap!=&m_OprtDef && m_OprtDef.find(a_strName)!=m_OprtDef.end() )\r\n      Error(ecNAME_CONFLICT);\r\n\r\n    CheckName(a_strName, a_szCharSet);\r\n    a_Storage[a_strName] = a_Callback;\r\n    ReInit();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check if a name contains invalid characters. \r\n\r\n      \\throw ParserException if the name contains invalid charakters.\r\n  */\r\n  void ParserBase::CheckName(const string_type &a_sName,\r\n                            const string_type &a_szCharSet) const\r\n  {\r\n    if ( !a_sName.length() ||\r\n        (a_sName.find_first_not_of(a_szCharSet)!=string_type::npos) ||\r\n        (a_sName[0]>='0' && a_sName[0]<='9'))\r\n    {\r\n      Error(ecINVALID_NAME);\r\n    }\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Set the formula. \r\n      \\param a_sExpr Formula as string_type\r\n      \\throw ParserException in case of syntax errors.\r\n\r\n      Triggers first time calculation thus the creation of the bytecode and\r\n      scanning of used variables.\r\n  */\r\n  void ParserBase::SetExpr(const string_type &a_sExpr)\r\n  {\r\n    // Check locale compatibility\r\n    std::locale loc;\r\n    if (m_pTokenReader->GetArgSep()==std::use_facet<numpunct<char_type> >(loc).decimal_point())\r\n      Error(ecLOCALE);\r\n\r\n    // <ibg> 20060222: Bugfix for Borland-Kylix:\r\n    // adding a space to the expression will keep Borlands KYLIX from going wild\r\n    // when calling tellg on a stringstream created from the expression after \r\n    // reading a value at the end of an expression. (mu::Parser::IsVal function)\r\n    // (tellg returns -1 otherwise causing the parser to ignore the value)\r\n    string_type sBuf(a_sExpr + _T(\" \") );\r\n    m_pTokenReader->SetFormula(sBuf);\r\n    ReInit();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Get the default symbols used for the built in operators. \r\n      \\sa c_DefaultOprt\r\n  */\r\n  const char_type** ParserBase::GetOprtDef() const\r\n  {\r\n    return (const char_type **)(&c_DefaultOprt[0]);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Define the set of valid characters to be used in names of\r\n             functions, variables, constants.\r\n  */\r\n  void ParserBase::DefineNameChars(const char_type *a_szCharset)\r\n  {\r\n    m_sNameChars = a_szCharset;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Define the set of valid characters to be used in names of\r\n             binary operators and postfix operators.\r\n  */\r\n  void ParserBase::DefineOprtChars(const char_type *a_szCharset)\r\n  {\r\n    m_sOprtChars = a_szCharset;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Define the set of valid characters to be used in names of\r\n             infix operators.\r\n  */\r\n  void ParserBase::DefineInfixOprtChars(const char_type *a_szCharset)\r\n  {\r\n    m_sInfixOprtChars = a_szCharset;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Virtual function that defines the characters allowed in name identifiers. \r\n      \\sa #ValidOprtChars, #ValidPrefixOprtChars\r\n  */ \r\n  const char_type* ParserBase::ValidNameChars() const\r\n  {\r\n    assert(m_sNameChars.size());\r\n    return m_sNameChars.c_str();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Virtual function that defines the characters allowed in operator definitions. \r\n      \\sa #ValidNameChars, #ValidPrefixOprtChars\r\n  */\r\n  const char_type* ParserBase::ValidOprtChars() const\r\n  {\r\n    assert(m_sOprtChars.size());\r\n    return m_sOprtChars.c_str();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Virtual function that defines the characters allowed in infix operator definitions.\r\n      \\sa #ValidNameChars, #ValidOprtChars\r\n  */\r\n  const char_type* ParserBase::ValidInfixOprtChars() const\r\n  {\r\n    assert(m_sInfixOprtChars.size());\r\n    return m_sInfixOprtChars.c_str();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add a user defined operator. \r\n      \\post Will reset the Parser to string parsing mode.\r\n  */\r\n  void ParserBase::DefinePostfixOprt(const string_type &a_sName, \r\n                                     fun_type1 a_pFun,\r\n                                     bool a_bAllowOpt)\r\n  {\r\n    AddCallback(a_sName, \r\n                ParserCallback(a_pFun, a_bAllowOpt, prPOSTFIX, cmOPRT_POSTFIX),\r\n                m_PostOprtDef, \r\n                ValidOprtChars() );\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Initialize user defined functions. \r\n   \r\n    Calls the virtual functions InitFun(), InitConst() and InitOprt().\r\n  */\r\n  void ParserBase::Init()\r\n  {\r\n    InitCharSets();\r\n    InitFun();\r\n    InitConst();\r\n    InitOprt();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add a user defined operator. \r\n      \\post Will reset the Parser to string parsing mode.\r\n      \\param [in] a_sName  operator Identifier \r\n      \\param [in] a_pFun  Operator callback function\r\n      \\param [in] a_iPrec  Operator Precedence (default=prSIGN)\r\n      \\param [in] a_bAllowOpt  True if operator is volatile (default=false)\r\n      \\sa EPrec\r\n  */\r\n  void ParserBase::DefineInfixOprt(const string_type &a_sName, \r\n                                  fun_type1 a_pFun, \r\n                                  int a_iPrec, \r\n                                  bool a_bAllowOpt)\r\n  {\r\n    AddCallback(a_sName, \r\n                ParserCallback(a_pFun, a_bAllowOpt, a_iPrec, cmOPRT_INFIX), \r\n                m_InfixOprtDef, \r\n                ValidOprtChars() );\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Define a binary operator. \r\n      \\param [in] a_pFun Pointer to the callback function.\r\n      \\param [in] a_iPrec Precedence of the operator.\r\n      \\param [in] a_bAllowOpt If this is true the operator may be optimized away.\r\n  */\r\n  void ParserBase::DefineOprt( const string_type &a_sName, \r\n                               fun_type2 a_pFun, \r\n                               unsigned a_iPrec, \r\n                               bool a_bAllowOpt )\r\n  {\r\n    // Check for conflicts with built in operator names\r\n    for (int i=0; m_bBuiltInOp && i<cmARG_SEP; ++i)\r\n      if (a_sName == string_type(c_DefaultOprt[i]))\r\n        Error(ecBUILTIN_OVERLOAD, -1, a_sName);\r\n\r\n    AddCallback( a_sName, \r\n                ParserCallback(a_pFun, a_bAllowOpt, a_iPrec, cmOPRT_BIN), \r\n                m_OprtDef, \r\n                ValidOprtChars() );\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Define a new string constant.\r\n      \\param [in] a_strName The name of the constant.\r\n      \\param [in] a_strVal the value of the constant. \r\n  */\r\n  void ParserBase::DefineStrConst(const string_type &a_strName, const string_type &a_strVal)\r\n  {\r\n    // Test if a constant with that names already exists\r\n    if (m_StrVarDef.find(a_strName)!=m_StrVarDef.end())\r\n      Error(ecNAME_CONFLICT);\r\n\r\n    CheckName(a_strName, ValidNameChars());\r\n    \r\n    m_vStringVarBuf.push_back(a_strVal);           // Store variable string in internal buffer\r\n    m_StrVarDef[a_strName] = m_vStringBuf.size();  // bind buffer index to variable name\r\n\r\n    ReInit();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add a user defined variable. \r\n      \\param [in] a_sName the variable name\r\n      \\param [in] a_pVar A pointer to the variable vaule.\r\n      \\post Will reset the Parser to string parsing mode.\r\n      \\pre [assert] a_fVar!=0\r\n      \\throw ParserException in case the name contains invalid signs.\r\n  */\r\n  void ParserBase::DefineVar(const string_type &a_sName, value_type *a_pVar)\r\n  {\r\n    if (a_pVar==0)\r\n      Error(ecINVALID_VAR_PTR);\r\n\r\n    // Test if a constant with that names already exists\r\n    if (m_ConstDef.find(a_sName)!=m_ConstDef.end())\r\n      Error(ecNAME_CONFLICT);\r\n\r\n    if (m_FunDef.find(a_sName)!=m_FunDef.end())\r\n      Error(ecNAME_CONFLICT);\r\n\r\n    CheckName(a_sName, ValidNameChars());\r\n    m_VarDef[a_sName] = a_pVar;\r\n    ReInit();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add a user defined constant. \r\n      \\param [in] a_sName The name of the constant.\r\n      \\param [in] a_fVal the value of the constant.\r\n      \\post Will reset the Parser to string parsing mode.\r\n      \\throw ParserException in case the name contains invalid signs.\r\n  */\r\n  void ParserBase::DefineConst(const string_type &a_sName, value_type a_fVal)\r\n  {\r\n    CheckName(a_sName, ValidNameChars());\r\n    m_ConstDef[a_sName] = a_fVal;\r\n    ReInit();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Get operator priority.\r\n\r\n  \\throw ParserException if a_Oprt is no operator code\r\n  */\r\n  int ParserBase::GetOprtPri(const token_type &a_Tok) const\r\n  {\r\n    switch (a_Tok.GetCode())\r\n    {\r\n    // built in operators\r\n    case cmEND:      return -5;\r\n\t  case cmARG_SEP:    return -4;\r\n    case cmBO :\t\r\n    case cmBC :      return -2;\r\n    case cmASSIGN:   return -1;               \r\n    case cmAND:\r\n    case cmXOR:\r\n    case cmOR:       return  prLOGIC;  \r\n    case cmLT:\r\n    case cmGT:\r\n    case cmLE:\r\n    case cmGE:\r\n    case cmNEQ:\r\n    case cmEQ:       return  prCMP; \r\n    case cmADD:\r\n    case cmSUB:      return  prADD_SUB;\r\n    case cmMUL:\r\n    case cmDIV:      return  prMUL_DIV;\r\n    case cmPOW:      return  prPOW;\r\n\r\n    // user defined binary operators\r\n    case cmOPRT_INFIX: \r\n    case cmOPRT_BIN:   return a_Tok.GetPri();\r\n    default:  Error(ecINTERNAL_ERROR, 5);\r\n              return 999;\r\n    }  \r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return a map containing the used variables only. */\r\n  const varmap_type& ParserBase::GetUsedVar() const\r\n  {\r\n    try\r\n    {\r\n      m_pTokenReader->IgnoreUndefVar(true);\r\n      ParseString(); // implicitely create or update the map with the\r\n                     // used variables stored in the token reader if not already done\r\n      m_pTokenReader->IgnoreUndefVar(false);\r\n    }\r\n    catch(exception_type &e)\r\n    {\r\n      m_pTokenReader->IgnoreUndefVar(false);\r\n      throw e;\r\n    }\r\n    \r\n    // Make sure to stay in string parse mode, dont call ReInit()\r\n    // because it deletes the array with the used variables\r\n    m_pParseFormula = &ParserBase::ParseString;\r\n    \r\n    return m_pTokenReader->GetUsedVar();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return a map containing the used variables only. */\r\n  const varmap_type& ParserBase::GetVar() const\r\n  {\r\n    return m_VarDef;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return a map containing all parser constants. */\r\n  const valmap_type& ParserBase::GetConst() const\r\n  {\r\n    return m_ConstDef;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return prototypes of all parser functions.\r\n      \\return #m_FunDef\r\n      \\sa FunProt\r\n      \\throw nothrow\r\n      \r\n      The return type is a map of the public type #funmap_type containing the prototype\r\n      definitions for all numerical parser functions. String functions are not part of \r\n      this map. The Prototype definition is encapsulated in objects of the class FunProt\r\n      one per parser function each associated with function names via a map construct.\r\n  */\r\n  const funmap_type& ParserBase::GetFunDef() const\r\n  {\r\n    return m_FunDef;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Retrieve the formula. */\r\n  const string_type& ParserBase::GetExpr() const\r\n  {\r\n    return m_pTokenReader->GetFormula();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserBase::token_type ParserBase::ApplyNumFunc(const token_type &a_FunTok,\r\n                                                  const std::vector<token_type> &a_vArg) const\r\n  {\r\n    token_type  valTok;\r\n    int  iArgCount = (unsigned)a_vArg.size();\r\n    void  *pFunc = a_FunTok.GetFuncAddr();\r\n    assert(pFunc);\r\n\r\n    // Collect the function arguments from the value stack\r\n    switch(a_FunTok.GetArgCount())\r\n    {\r\n      case -1:\r\n            // Function with variable argument count\r\n \t\t        // copy arguments into a vector<value_type> \r\n\t          {\r\n              if (iArgCount==0)\r\n                Error(ecTOO_FEW_PARAMS, m_pTokenReader->GetPos(), a_FunTok.GetAsString());\r\n\r\n              std::vector<value_type> vArg(iArgCount);\r\n\t\t          for (int i=0; i<iArgCount; ++i)\r\n\t\t            vArg[iArgCount-(i+1)] = a_vArg[i].GetVal();\r\n\r\n              valTok.SetVal( ((multfun_type)a_FunTok.GetFuncAddr())(&vArg[0], (int)vArg.size()) );  \r\n\t          }\r\n\t          break;\r\n\r\n      case 0: valTok.SetVal( ((fun_type0)pFunc)() );  break;\r\n      case 1: valTok.SetVal( ((fun_type1)pFunc)(a_vArg[0].GetVal()) );  break;\r\n      case 2: valTok.SetVal( ((fun_type2)pFunc)(a_vArg[1].GetVal(),\r\n\t\t                                            a_vArg[0].GetVal()) );  break;\r\n      case 3: valTok.SetVal( ((fun_type3)pFunc)(a_vArg[2].GetVal(), \r\n\t\t                                            a_vArg[1].GetVal(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t                    a_vArg[0].GetVal()) ); break;\r\n      case 4: valTok.SetVal( ((fun_type4)pFunc)(a_vArg[3].GetVal(),\r\n\t                                              a_vArg[2].GetVal(), \r\n\t\t\t\t   \t  \t                                a_vArg[1].GetVal(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t                      a_vArg[0].GetVal()) );  break;\r\n      case 5: valTok.SetVal( ((fun_type5)pFunc)(a_vArg[4].GetVal(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t                    a_vArg[3].GetVal(), \r\n\t                                              a_vArg[2].GetVal(), \r\n\t\t\t\t   \t  \t                                a_vArg[1].GetVal(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t                      a_vArg[0].GetVal()) );  break;\r\n      default: Error(ecINTERNAL_ERROR, 6);\r\n    }\r\n\r\n    // Find out if the result will depend on a variable\r\n    /** \\todo remove this loop, put content in the loop that takes the argument values.\r\n      \r\n        (Attention: SetVal will reset Flags.)\r\n    */\r\n    bool bVolatile = a_FunTok.IsFlagSet(token_type::flVOLATILE);\r\n    for (int i=0; (bVolatile==false) && (i<iArgCount); ++i)\r\n      bVolatile |= a_vArg[i].IsFlagSet(token_type::flVOLATILE);\r\n\r\n    if (bVolatile)\r\n      valTok.AddFlags(token_type::flVOLATILE);\r\n\r\n  #if defined(_MSC_VER)\r\n    #pragma warning( disable : 4311 ) \r\n  #endif\r\n\r\n    // Formula optimization\r\n    if ( m_bOptimize && \r\n        !valTok.IsFlagSet(token_type::flVOLATILE) &&\r\n        !a_FunTok.IsFlagSet(token_type::flVOLATILE) ) \r\n\t  {\r\n      m_vByteCode.RemoveValEntries(iArgCount);\r\n      m_vByteCode.AddVal( valTok.GetVal() );\r\n\t  }\r\n\t  else \r\n\t  { \r\n      // operation dosnt depends on a variable or the function is flagged unoptimizeable\r\n      // we cant optimize here...\r\n      m_vByteCode.AddFun(pFunc, (a_FunTok.GetArgCount()==-1) ? -iArgCount : iArgCount);\r\n\t  }\r\n\r\n    return valTok;\r\n\r\n  #if defined(_MSC_VER)\r\n    #pragma warning( default : 4311 )\r\n  #endif\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Execute a function that takes a single string argument.\r\n      \\param a_FunTok Function token.\r\n      \\throw exception_type If the function token is not a string function\r\n  */\r\n  ParserBase::token_type ParserBase::ApplyStrFunc(const token_type &a_FunTok,\r\n                                                  const std::vector<token_type> &a_vArg) const\r\n  {\r\n    if (a_vArg.back().GetCode()!=cmSTRING)\r\n      Error(ecSTRING_EXPECTED, m_pTokenReader->GetPos(), a_FunTok.GetAsString());\r\n\r\n    token_type  valTok;\r\n    int  iArgCount = (unsigned)a_vArg.size();\r\n    void  *pFunc = a_FunTok.GetFuncAddr();\r\n    assert(pFunc);\r\n\r\n    try\r\n    {\r\n      // Collect the function arguments from the value stack\r\n      switch(a_FunTok.GetArgCount())\r\n      {\r\n      case 0: valTok.SetVal( ((strfun_type1)pFunc)(a_vArg[0].GetAsString().c_str()) );  break;\r\n      case 1: valTok.SetVal( ((strfun_type2)pFunc)(a_vArg[1].GetAsString().c_str(),\r\n\t\t                                              a_vArg[0].GetVal()) );  break;\r\n      case 2: valTok.SetVal( ((strfun_type3)pFunc)(a_vArg[2].GetAsString().c_str(), \r\n\t\t                                              a_vArg[1].GetVal(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t                      a_vArg[0].GetVal()) );  break;\r\n      default: Error(ecINTERNAL_ERROR);\r\n      }\r\n    }\r\n    catch(ParserError& /*e*/)\r\n    {\r\n      Error(ecVAL_EXPECTED, m_pTokenReader->GetPos(), a_FunTok.GetAsString());\r\n    }\r\n\r\n    // Find out if the result will depend on a variable\r\n    /** \\todo remove this loop, put content in the loop that takes the argument values.\r\n      \r\n        (Attention: SetVal will reset Flags.)\r\n    */\r\n    bool bVolatile = a_FunTok.IsFlagSet(token_type::flVOLATILE);\r\n    for (int i=0; (bVolatile==false) && (i<iArgCount); ++i)\r\n      bVolatile |= a_vArg[i].IsFlagSet(token_type::flVOLATILE);\r\n\r\n    if (bVolatile)\r\n      valTok.AddFlags(token_type::flVOLATILE);\r\n\r\n    // string functions won't be optimized\r\n    m_vByteCode.AddStrFun((void*)pFunc, a_FunTok.GetArgCount(), a_vArg.back().GetIdx());\r\n    \r\n    return valTok;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Apply a function token. \r\n      \\param a_iArgCount Number of Arguments actually gathered used only for multiarg functions.\r\n      \\post The result is pushed to the value stack\r\n      \\post The function token is removed from the stack\r\n      \\throw exception_type if Argument count does not mach function requirements.\r\n  */\r\n  void ParserBase::ApplyFunc( ParserStack<token_type> &a_stOpt,\r\n                              ParserStack<token_type> &a_stVal, \r\n                              int a_iArgCount) const\r\n  { \r\n    assert(m_pTokenReader.get());\r\n\r\n    // Operator stack empty or does not contain tokens with callback functions\r\n    if (a_stOpt.empty() || a_stOpt.top().GetFuncAddr()==0 )\r\n      return;\r\n\r\n    token_type funTok = a_stOpt.pop();\r\n    assert(funTok.GetFuncAddr());\r\n\r\n    // Binary operators must rely on their internal operator number\r\n    // since counting of operators relies on commas for function arguments\r\n    // binary operators do not have commas in their expression\r\n    int iArgCount = (funTok.GetCode()==cmOPRT_BIN) ? funTok.GetArgCount() : a_iArgCount;\r\n\r\n    // determine how many parameters the function needs. To remember iArgCount includes the \r\n    // string parameter whilst GetArgCount() counts only numeric parameters.\r\n    int iArgRequired = funTok.GetArgCount() + ((funTok.GetType()==tpSTR) ? 1 : 0);\r\n\r\n    // Thats the number of numerical parameters\r\n    int iArgNumerical = iArgCount - ((funTok.GetType()==tpSTR) ? 1 : 0);\r\n\r\n    if (funTok.GetCode()==cmFUNC_STR && iArgCount-iArgNumerical>1)\r\n        Error(ecINTERNAL_ERROR);\r\n\r\n    if (funTok.GetArgCount()>=0 && iArgCount>iArgRequired) \r\n\t      Error(ecTOO_MANY_PARAMS, m_pTokenReader->GetPos()-1, funTok.GetAsString());\r\n\r\n\t  if (funTok.GetCode()!=cmOPRT_BIN && iArgCount<iArgRequired )\r\n\t      Error(ecTOO_FEW_PARAMS, m_pTokenReader->GetPos()-1, funTok.GetAsString());\r\n\r\n    if (funTok.GetCode()==cmFUNC_STR && iArgCount>iArgRequired )\r\n\t      Error(ecTOO_MANY_PARAMS, m_pTokenReader->GetPos()-1, funTok.GetAsString());\r\n\r\n    // Collect the numeric function arguments from the value stack and store them\r\n    // in a vector\r\n    std::vector<token_type> stArg;  \r\n    for (int i=0; i<iArgNumerical; ++i)\r\n    {\r\n      stArg.push_back( a_stVal.pop() );\r\n      if ( stArg.back().GetType()==tpSTR && funTok.GetType()!=tpSTR )\r\n        Error(ecVAL_EXPECTED, m_pTokenReader->GetPos(), funTok.GetAsString());\r\n    }\r\n\r\n    // for string functions add the string argument\r\n    if (funTok.GetCode()==cmFUNC_STR)\r\n    {\r\n      stArg.push_back( a_stVal.pop() );\r\n      if ( stArg.back().GetType()==tpSTR && funTok.GetType()!=tpSTR )\r\n        Error(ecVAL_EXPECTED, m_pTokenReader->GetPos(), funTok.GetAsString());\r\n    }\r\n\r\n    // String functions accept only one parameter\r\n    if (funTok.GetType()==tpSTR)\r\n    {\r\n      token_type token( ApplyStrFunc(funTok, stArg)  );\r\n      a_stVal.push( token );\r\n    }\r\n    else\r\n    {\r\n      token_type token( ApplyNumFunc(funTok, stArg) );\r\n      a_stVal.push( token );\r\n    }\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  void ParserBase::ApplyBinOprt( ParserStack<token_type> &a_stOpt,\r\n                                 ParserStack<token_type> &a_stVal) const\r\n  {\r\n    assert(a_stOpt.size());\r\n\r\n    // user defined binary operator\r\n    if (a_stOpt.top().GetCode()==cmOPRT_BIN)\r\n    {\r\n      ApplyFunc(a_stOpt, a_stVal, 2);\r\n    }\r\n    else\r\n    {\r\n      // internal binary operator\r\n      MUP_ASSERT(a_stVal.size()>=2);\r\n\r\n      token_type valTok1 = a_stVal.pop(),\r\n                valTok2 = a_stVal.pop(),\r\n                optTok = a_stOpt.pop(),\r\n                resTok; \r\n\r\n      if ( valTok1.GetType()!=valTok2.GetType() || \r\n          (valTok1.GetType()==tpSTR && valTok2.GetType()==tpSTR) )\r\n        Error(ecOPRT_TYPE_CONFLICT, m_pTokenReader->GetPos(), optTok.GetAsString());\r\n\r\n      value_type x = valTok2.GetVal(),\r\n\t               y = valTok1.GetVal();\r\n\r\n      switch (optTok.GetCode())\r\n      {\r\n        // built in binary operators\r\n        case cmAND: resTok.SetVal( (int)x & (int)y ); break;\r\n        case cmOR:  resTok.SetVal( (int)x | (int)y ); break;\r\n        case cmXOR: resTok.SetVal( (int)x ^ (int)y ); break;\r\n        case cmLT:  resTok.SetVal( x < y ); break;\r\n        case cmGT:  resTok.SetVal( x > y ); break;\r\n        case cmLE:  resTok.SetVal( x <= y ); break;\r\n        case cmGE:  resTok.SetVal( x >= y ); break;\r\n        case cmNEQ: resTok.SetVal( x != y ); break;\r\n        case cmEQ:  resTok.SetVal( x == y ); break;\r\n        case cmADD: resTok.SetVal( x + y ); break;\r\n        case cmSUB: resTok.SetVal( x - y ); break;\r\n        case cmMUL: resTok.SetVal( x * y ); break;\r\n        case cmDIV: resTok.SetVal( x / y ); break;\r\n  \t    case cmPOW: resTok.SetVal(pow(x, y)); break;\r\n\r\n        case cmASSIGN: \r\n                  // The assignement operator needs special treatment\r\n                  // it uses a different format when stored in the bytecode!\r\n                  {\r\n                    if (valTok2.GetCode()!=cmVAR)\r\n                      Error(ecUNEXPECTED_OPERATOR, -1 /* m_pTokenReader->GetPos() */, _T(\"=\"));\r\n                      \r\n                    value_type *pVar = valTok2.GetVar();\r\n                    resTok.SetVal( *pVar = y );\r\n                    a_stVal.push( resTok );\r\n\r\n                    m_vByteCode.AddAssignOp(pVar);\r\n                    return;  // we must return since the following \r\n                            // stuff does not apply\r\n                  }\r\n\r\n        default:  Error(ecINTERNAL_ERROR, 8);\r\n      }\r\n\r\n      // Create the bytecode entries\r\n      if (!m_bOptimize)\r\n      {\r\n        // Optimization flag is not set\r\n        m_vByteCode.AddOp(optTok.GetCode());\r\n      }\r\n      else if ( valTok1.IsFlagSet(token_type::flVOLATILE) || \r\n                valTok2.IsFlagSet(token_type::flVOLATILE) )\r\n      {\r\n        // Optimization flag is not set, but one of the value\r\n        // depends on a variable\r\n        m_vByteCode.AddOp(optTok.GetCode());\r\n        resTok.AddFlags(token_type::flVOLATILE);\r\n      }\r\n      else\r\n      {\r\n        // operator call can be optimized; If optimization is possible \r\n        // the two previous tokens must be value tokens / they will be removed\r\n        // and replaced with the result of the pending operation.\r\n        m_vByteCode.RemoveValEntries(2);\r\n        m_vByteCode.AddVal(resTok.GetVal());\r\n      }\r\n\r\n      a_stVal.push( resTok );\r\n    }\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Parse the command code.\r\n      \\sa ParseString(), ParseValue()\r\n\r\n      Command code contains precalculated stack positions of the values and the\r\n      associated operators. The Stack is filled beginning from index one the \r\n      value at index zero is not used at all.\r\n  */\r\n  value_type ParserBase::ParseCmdCode() const\r\n  {\r\n  #if defined(_MSC_VER)\r\n    #pragma warning( disable : 4312 )\r\n  #endif\r\n\r\n    value_type Stack[99];\r\n    ECmdCode iCode;\r\n    bytecode_type idx(0);\r\n    int i(0);\r\n\r\n    __start:\r\n\r\n    idx = m_pCmdCode[i];\r\n    iCode = (ECmdCode)m_pCmdCode[i+1];\r\n    i += 2;\r\n\r\n  #ifdef _DEBUG\r\n    if (idx>=99)\r\n      throw exception_type(ecGENERIC, _T(\"\"), m_pTokenReader->GetFormula(), -1);\r\n  #endif\r\n\r\n    switch (iCode)\r\n    {\r\n      // built in binary operators\r\n      case cmAND: Stack[idx]  = (int)Stack[idx] & (int)Stack[idx+1]; goto __start;\r\n      case cmOR:  Stack[idx]  = (int)Stack[idx] | (int)Stack[idx+1]; goto __start;\r\n      case cmXOR: Stack[idx]  = (int)Stack[idx] ^ (int)Stack[idx+1]; goto __start;\r\n      case cmLE:  Stack[idx]  = Stack[idx] <= Stack[idx+1]; goto __start;\r\n      case cmGE:  Stack[idx]  = Stack[idx] >= Stack[idx+1]; goto __start;\r\n      case cmNEQ: Stack[idx]  = Stack[idx] != Stack[idx+1]; goto __start;\r\n      case cmEQ:  Stack[idx]  = Stack[idx] == Stack[idx+1]; goto __start;\r\n\t    case cmLT:  Stack[idx]  = Stack[idx] < Stack[idx+1];  goto __start;\r\n\t    case cmGT:  Stack[idx]  = Stack[idx] > Stack[idx+1];  goto __start;\r\n      case cmADD: Stack[idx] += Stack[1+idx]; goto __start;\r\n \t    case cmSUB: Stack[idx] -= Stack[1+idx]; goto __start;\r\n\t    case cmMUL: Stack[idx] *= Stack[1+idx]; goto __start;\r\n\t    case cmDIV: Stack[idx] /= Stack[1+idx]; goto __start;\r\n      case cmPOW: Stack[idx]  = pow(Stack[idx], Stack[1+idx]); goto __start;\r\n\r\n      // Assignement needs special treatment\r\n      case cmASSIGN:\r\n            {\r\n              // next is a pointer to the target\r\n              value_type **pDest = (value_type**)(&m_pCmdCode[i]);\r\n\r\n              // advance index according to pointer size\r\n              i += m_vByteCode.GetPtrSize();\r\n              // assign the value\r\n              Stack[idx] = **pDest = Stack[idx+1];\r\n            }\r\n            goto __start;\r\n\r\n      // user defined binary operators\r\n      case cmOPRT_BIN:\r\n            Stack[idx] = (**(fun_type2**)(&m_pCmdCode[i]))(Stack[idx], Stack[idx+1]);\r\n            ++i;\r\n            goto __start;\r\n\r\n      // variable tokens\r\n\t    case cmVAR:\r\n\t\t          Stack[idx] = **(value_type**)(&m_pCmdCode[i]);\r\n\t\t          i += m_vByteCode.GetValSize();\r\n\t\t          goto __start;\r\n\r\n      // value tokens\r\n\t    case cmVAL:\r\n              Stack[idx] = *(value_type*)(&m_pCmdCode[i]);\r\n \t            i += m_vByteCode.GetValSize();\r\n              goto __start;\r\n\r\n      // Next is treatment of string functions\r\n      case cmFUNC_STR:\r\n              {\r\n\t\t            // The function argument count\r\n                int iArgCount = (int)m_pCmdCode[ i++ ];  \r\n\r\n                // The index of the string argument in the string table\r\n                int iIdxStack = (int)m_pCmdCode[ i++ ];  \r\n                MUP_ASSERT( iIdxStack>=0 && iIdxStack<(int)m_vStringBuf.size() );\r\n\r\n                switch(iArgCount)  // switch according to argument count\r\n\t\t            {\r\n                  case 0: Stack[idx] = (*(strfun_type1*)(&m_pCmdCode[i]))(m_vStringBuf[iIdxStack].c_str()); break;\r\n\t\t\t            case 1: Stack[idx] = (*(strfun_type2*)(&m_pCmdCode[i]))(m_vStringBuf[iIdxStack].c_str(), Stack[idx]); break;\r\n\t\t\t            case 2: Stack[idx] = (*(strfun_type3*)(&m_pCmdCode[i]))(m_vStringBuf[iIdxStack].c_str(), Stack[idx], Stack[idx+1]); break;\r\n                }\r\n\t\t            i += m_vByteCode.GetPtrSize();\r\n              }\r\n              goto __start;\r\n\r\n      // Next is treatment of numeric functions\r\n      case cmFUNC:\r\n\t\t          {\r\n\t\t            int iArgCount = (int)m_pCmdCode[i++];\r\n\r\n                switch(iArgCount)  // switch according to argument count\r\n\t\t            {\r\n                  case 0: Stack[idx] = (*(fun_type0*)(&m_pCmdCode[i]))(); break;\r\n                  case 1: Stack[idx] = (*(fun_type1*)(&m_pCmdCode[i]))(Stack[idx]); break;\r\n\t\t\t            case 2: Stack[idx] = (*(fun_type2*)(&m_pCmdCode[i]))(Stack[idx], Stack[idx+1]); break;\r\n\t\t\t            case 3: Stack[idx] = (*(fun_type3*)(&m_pCmdCode[i]))(Stack[idx], Stack[idx+1], Stack[idx+2]); break;\r\n\t\t\t            case 4: Stack[idx] = (*(fun_type4*)(&m_pCmdCode[i]))(Stack[idx], Stack[idx+1], Stack[idx+2], Stack[idx+3]); break;\r\n  \t\t            case 5: Stack[idx] = (*(fun_type5*)(&m_pCmdCode[i]))(Stack[idx], Stack[idx+1], Stack[idx+2], Stack[idx+3], Stack[idx+4]); break;\r\n                  default:\r\n\t\t\t\t            if (iArgCount>0) // function with variable arguments store the number as a negative value\r\n                      Error(ecINTERNAL_ERROR, 1);\r\n\r\n                    Stack[idx] =(*(multfun_type*)(&m_pCmdCode[i]))(&Stack[idx], -iArgCount);\r\n                    break;\r\n\t\t            }\r\n\t\t            i += m_vByteCode.GetPtrSize();\r\n\t\t          }\r\n\t\t          goto __start;\r\n\r\n\t    case cmEND:\r\n\t\t          return Stack[1];\r\n\r\n\t    default:\r\n              Error(ecINTERNAL_ERROR, 2);\r\n              return 0;\r\n    }\r\n\r\n  #if defined(_MSC_VER)\r\n    #pragma warning( default : 4312 )\r\n  #endif\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return result for constant functions.\r\n\r\n    Seems pointless, but for parser functions that are made up of only a value, which occur\r\n    in real world applications, this speeds up things by removing the parser overhead almost\r\n    completely.\r\n  */\r\n  value_type ParserBase::ParseValue() const\r\n  {\r\n    return *(value_type*)(&m_pCmdCode[2]);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief One of the two main parse functions.\r\n\r\n  Parse expression from input string. Perform syntax checking and create bytecode.\r\n  After parsing the string and creating the bytecode the function pointer \r\n  #m_pParseFormula will be changed to the second parse routine the uses bytecode instead of string parsing.\r\n\r\n  \\sa ParseCmdCode(), ParseValue()\r\n  */\r\n  value_type ParserBase::ParseString() const\r\n  {\r\n  #if defined(_MSC_VER)\r\n    #pragma warning( disable : 4311 )\r\n  #endif\r\n    if (!m_pTokenReader->GetFormula().length())\r\n        Error(ecUNEXPECTED_EOF, 0);\r\n\r\n    ParserStack<token_type> stOpt, stVal;\r\n    ParserStack<int> stArgCount;\r\n    token_type opta, opt;  // for storing operators\r\n    token_type val, tval;  // for storing value\r\n    string_type strBuf;    // buffer for string function arguments\r\n\r\n    ReInit();\r\n\r\n    for(;;)\r\n    {\r\n      opt = m_pTokenReader->ReadNextToken();\r\n\r\n      switch (opt.GetCode())\r\n      {\r\n        //\r\n        // Next three are different kind of value entries\r\n        //\r\n        case cmSTRING:\r\n                opt.SetIdx((int)m_vStringBuf.size());      // Assign buffer index to token \r\n                stVal.push(opt);\r\n\t\t            m_vStringBuf.push_back(opt.GetAsString()); // Store string in internal buffer\r\n                break;\r\n   \r\n        case cmVAR:\r\n                stVal.push(opt);\r\n                m_vByteCode.AddVar( static_cast<value_type*>(opt.GetVar()) );\r\n                break;\r\n\r\n        case cmVAL:\r\n\t\t            stVal.push(opt);\r\n                m_vByteCode.AddVal( opt.GetVal() );\r\n                break;\r\n\r\n        case cmARG_SEP:\r\n                if (stArgCount.empty())\r\n                  Error(ecUNEXPECTED_ARG_SEP, m_pTokenReader->GetPos());\r\n\r\n                ++stArgCount.top();\r\n                // fall through...\r\n\r\n        case cmEND:\r\n        case cmBC:\r\n                {\r\n                  // The argument count for parameterless functions is zero\r\n                  // by default an opening bracket sets parameter count to 1\r\n                  // in preparation of arguments to come. If the last token\r\n                  // was an opening bracket we know better...\r\n                  if (opta.GetCode()==cmBO)\r\n                    --stArgCount.top();\r\n\r\n                  while ( stOpt.size() && stOpt.top().GetCode() != cmBO)\r\n                  {\r\n                    if (stOpt.top().GetCode()==cmOPRT_INFIX)\r\n                      ApplyFunc(stOpt, stVal, 1);  // infix operator\r\n                    else\r\n                      ApplyBinOprt(stOpt, stVal);\r\n                  }\r\n\r\n                  // <ibg> 20060218 infix operator treatment moved here\r\n                  if (stOpt.size() && stOpt.top().GetCode()==cmOPRT_INFIX) \r\n                    ApplyFunc(stOpt, stVal, 1);  // infix operator\r\n\r\n                  if ( opt.GetCode()!=cmBC || stOpt.size()==0 || stOpt.top().GetCode()!=cmBO )\r\n                    break;\r\n\r\n                  // if opt is \")\" and opta is \"(\" the bracket has been evaluated, now its time to check\r\n\t\t\t            // if there is either a function or a sign pending\r\n\t\t   \t          // neither the opening nor the closing bracket will be pushed back to\r\n\t\t\t            // the operator stack\r\n\t\t\t            // Check if a function is standing in front of the opening bracket, \r\n                  // if yes evaluate it afterwards check for infix operators\r\n\t\t\t            assert(stArgCount.size());\r\n\t\t\t            int iArgCount = stArgCount.pop();\r\n                  \r\n                  stOpt.pop(); // Take opening bracket from stack\r\n\r\n                  if (iArgCount>1 && ( stOpt.size()==0 || \r\n                                      (stOpt.top().GetCode()!=cmFUNC && \r\n                                      stOpt.top().GetCode()!=cmFUNC_STR) ) )\r\n                    Error(ecUNEXPECTED_ARG, m_pTokenReader->GetPos());\r\n                  \r\n                  if (stOpt.size() && stOpt.top().GetCode()!=cmOPRT_INFIX && stOpt.top().GetFuncAddr()!=0)\r\n                    ApplyFunc(stOpt, stVal, iArgCount);\r\n\t\t\t          } // if bracket content is evaluated\r\n                break;\r\n\r\n        //\r\n        // Next are the binary operator entries\r\n        //\r\n        case cmAND:   // built in binary operators\r\n        case cmOR:\r\n        case cmXOR:\r\n        case cmLT:\r\n        case cmGT:\r\n        case cmLE:\r\n        case cmGE:\r\n        case cmNEQ:\r\n        case cmEQ:\r\n        case cmADD:\r\n        case cmSUB:\r\n        case cmMUL:\r\n        case cmDIV:\r\n        case cmPOW:\r\n        case cmASSIGN:\r\n        case cmOPRT_BIN:\r\n                // A binary operator (user defined or built in) has been found. \r\n                while ( stOpt.size() && stOpt.top().GetCode() != cmBO)\r\n                {\r\n                  if (GetOprtPri(stOpt.top()) < GetOprtPri(opt))\r\n                    break;\r\n\r\n                  if (stOpt.top().GetCode()==cmOPRT_INFIX)\r\n                    ApplyFunc(stOpt, stVal, 1);  // infix operator\r\n                  else\r\n                    ApplyBinOprt(stOpt, stVal);\r\n                } // while ( ... )\r\n\r\n    \t\t\t      // The operator can't be evaluated right now, push back to the operator stack\r\n                stOpt.push(opt);\r\n                break;\r\n\r\n        //\r\n        // Last section contains functions and operators implicitely mapped to functions\r\n        //\r\n\t      case cmBO:\r\n                stArgCount.push(1);\r\n                stOpt.push(opt);\r\n\t\t    \t      break;\r\n\r\n        case cmFUNC:\r\n        case cmOPRT_INFIX:\r\n        case cmFUNC_STR:  \r\n                stOpt.push(opt);\r\n                break;\r\n\r\n        case cmOPRT_POSTFIX:\r\n                stOpt.push(opt);\r\n                ApplyFunc(stOpt, stVal, 1);  // this is the postfix operator\r\n                break;\r\n\r\n\t      default:  Error(ecINTERNAL_ERROR, 3);\r\n      } // end of switch operator-token\r\n\r\n      opta = opt;\r\n\r\n      if ( opt.GetCode() == cmEND )\r\n      {\r\n        m_vByteCode.Finalize();\r\n        break;\r\n      }\r\n\r\n      //if (stArgCount.size())\r\n      //  cout << \"Arguments: \" << stArgCount.top() << \"\\n\";\r\n\r\n  #if defined(MUP_DUMP_STACK)\r\n\r\n      StackDump(stVal, stOpt);\r\n      m_vByteCode.AsciiDump();\r\n  #endif\r\n    } // while (true)\r\n\r\n    // Store pointer to start of bytecode\r\n    m_pCmdCode = m_vByteCode.GetRawData();\r\n\r\n  #if defined(MUP_DUMP_CMDCODE)\r\n    m_vByteCode.AsciiDump();\r\n  #endif\r\n\r\n    // get the last value (= final result) from the stack\r\n    if (stVal.size()!=1)\r\n      Error(ecEMPTY_EXPRESSION);\r\n\r\n    if (stVal.top().GetType()!=tpDBL)\r\n      Error(ecSTR_RESULT);\r\n\r\n    // no error, so change the function pointer for the main parse routine\r\n    value_type fVal = stVal.top().GetVal();   // Result from String parsing\r\n\r\n    if (m_bUseByteCode)\r\n    {\r\n      // (n is a double requires if it is stored in the bytecode)\r\n      // pos 0:      stack index must be 0 for the final result\r\n      // pos 1:      code signaling the next entry is a value (cmVal==20)\r\n      // pos 2..2+n: the final result\r\n      // pos 2+n+1:  the bytecode end marker\r\n      // \r\n      // Check if the bytecode contains only a single constant, if so parsing is no longer necessary.\r\n      std::size_t checkEnd = 2 + m_vByteCode.GetValSize();  // \r\n      m_pParseFormula = (m_pCmdCode[1]==cmVAL && checkEnd<m_vByteCode.GetBufSize() && m_pCmdCode[checkEnd]==cmEND) ? \r\n                              &ParserBase::ParseValue :\r\n                              &ParserBase::ParseCmdCode;\r\n    }\r\n\r\n    return fVal;\r\n\r\n  #if defined(_MSC_VER)\r\n    #pragma warning( default : 4311 )\r\n  #endif\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Create an error containing the parse error position.\r\n\r\n    This function will create an Parser Exception object containing the error text and\r\n    its position.\r\n\r\n    \\param a_iErrc [in] The error code of type #EErrorCodes.\r\n    \\param a_iPos [in] The position where the error was detected.\r\n    \\param a_sTok [in] The token string representation associated with the error.\r\n    \\throw ParserException always throws thats the only purpose of this function.\r\n  */\r\n  void  ParserBase::Error(EErrorCodes a_iErrc, int a_iPos, const string_type &a_sTok) const\r\n  {\r\n    throw exception_type(a_iErrc, a_sTok, m_pTokenReader->GetFormula(), a_iPos);\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Clear all user defined variables.\r\n      \\throw nothrow\r\n\r\n      Resets the parser to string parsing mode by calling #ReInit.\r\n  */\r\n  void ParserBase::ClearVar()\r\n  {\r\n    m_VarDef.clear();\r\n    ReInit();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Remove a variable from internal storage.\r\n      \\throw nothrow\r\n\r\n      Removes a variable if it exists. If the Variable does not exist nothing will be done.\r\n  */\r\n  void ParserBase::RemoveVar(const string_type &a_strVarName)\r\n  {\r\n    varmap_type::iterator item = m_VarDef.find(a_strVarName);\r\n    if (item!=m_VarDef.end())\r\n    {\r\n      m_VarDef.erase(item);\r\n      ReInit();\r\n    }\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Clear the formula. \r\n      \\post Resets the parser to string parsing mode.\r\n      \\throw nothrow\r\n\r\n      Clear the formula and existing bytecode.\r\n  */\r\n  void ParserBase::ClearFormula()\r\n  {\r\n    m_vByteCode.clear();\r\n    m_pCmdCode = 0;\r\n    m_pTokenReader->SetFormula(_T(\"\"));\r\n    ReInit();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Clear all functions.\r\n      \\post Resets the parser to string parsing mode.\r\n      \\throw nothrow\r\n  */\r\n  void ParserBase::ClearFun()\r\n  {\r\n    m_FunDef.clear();\r\n    ReInit();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Clear all user defined constants.\r\n\r\n      Both numeric and string constants will be removed from the internal storage.\r\n      \\post Resets the parser to string parsing mode.\r\n      \\throw nothrow\r\n  */\r\n  void ParserBase::ClearConst()\r\n  {\r\n    m_ConstDef.clear();\r\n    m_StrVarDef.clear();\r\n    ReInit();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Clear all user defined postfix operators.\r\n      \\post Resets the parser to string parsing mode.\r\n      \\throw nothrow\r\n  */\r\n  void ParserBase::ClearPostfixOprt()\r\n  {\r\n    m_PostOprtDef.clear();\r\n    ReInit();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Clear all user defined binary operators.\r\n      \\post Resets the parser to string parsing mode.\r\n      \\throw nothrow\r\n  */\r\n  void ParserBase::ClearOprt()\r\n  {\r\n    m_OprtDef.clear();\r\n    ReInit();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Clear the user defined Prefix operators. \r\n      \\post Resets the parser to string parser mode.\r\n      \\throw nothrow\r\n  */\r\n  void ParserBase::ClearInfixOprt()\r\n  {\r\n    m_InfixOprtDef.clear();\r\n    ReInit();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Enable or disable the formula optimization feature. \r\n      \\post Resets the parser to string parser mode.\r\n      \\throw nothrow\r\n  */\r\n  void ParserBase::EnableOptimizer(bool a_bIsOn)\r\n  {\r\n    m_bOptimize = a_bIsOn;\r\n    ReInit();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Enable or disable parsing from Bytecode. \r\n\r\n      \\attention There is no reason to disable bytecode. It will \r\n                drastically decrease parsing speed.\r\n  */\r\n  void ParserBase::EnableByteCode(bool a_bIsOn)\r\n  {\r\n    m_bUseByteCode = a_bIsOn;\r\n    if (!a_bIsOn)\r\n      ReInit();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Enable or disable the built in binary operators.\r\n      \\throw nothrow\r\n      \\sa m_bBuiltInOp, ReInit()\r\n\r\n    If you disable the built in binary operators there will be no binary operators\r\n    defined. Thus you must add them manually one by one. It is not possible to\r\n    disable built in operators selectively. This function will Reinitialize the\r\n    parser by calling ReInit().\r\n  */\r\n  void ParserBase::EnableBuiltInOprt(bool a_bIsOn)\r\n  {\r\n    m_bBuiltInOp = a_bIsOn;\r\n    ReInit();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Query status of built in variables.\r\n      \\return #m_bBuiltInOp; true if built in operators are enabled.\r\n      \\throw nothrow\r\n  */\r\n  bool ParserBase::HasBuiltInOprt() const\r\n  {\r\n    return m_bBuiltInOp;\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Get the argument separator character. \r\n  */\r\n  char_type ParserBase::GetArgSep() const\r\n  {\r\n    return m_pTokenReader->GetArgSep();\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Set argument separator. \r\n      \\param cArgSep the argument separator character.\r\n  */\r\n  void ParserBase::SetArgSep(char_type cArgSep)\r\n  {\r\n    m_pTokenReader->SetArgSep(cArgSep);\r\n  }\r\n\r\n#if defined(MUP_DUMP_STACK) | defined(MUP_DUMP_CMDCODE)\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Dump stack content. \r\n\r\n      This function is used for debugging only.\r\n  */\r\n  void ParserBase::StackDump( const ParserStack<token_type> &a_stVal, \r\n\t\t\t\t             \t\t\t    const ParserStack<token_type> &a_stOprt ) const\r\n  {\r\n    ParserStack<token_type> stOprt(a_stOprt), \r\n                            stVal(a_stVal);\r\n\r\n    mu::console() << _T(\"\\nValue stack:\\n\");\r\n    while ( !stVal.empty() ) \r\n    {\r\n      token_type val = stVal.pop();\r\n      if (val.GetType()==tpSTR)\r\n        mu::console() << _T(\" \\\"\") << val.GetAsString() << _T(\"\\\" \");\r\n      else\r\n        mu::console() << _T(\" \") << val.GetVal() << _T(\" \");\r\n    }\r\n    mu::console() << \"\\nOperator stack:\\n\";\r\n\r\n    while ( !stOprt.empty() )\r\n    {\r\n      if (stOprt.top().GetCode()<=cmASSIGN) \r\n  \t  {\r\n\t  \t  mu::console() << _T(\"OPRT_INTRNL \\\"\")\r\n                      << ParserBase::c_DefaultOprt[stOprt.top().GetCode()] \r\n                      << _T(\"\\\" \\n\");\r\n\t    }\r\n      else\r\n      {\r\n\t\t      switch(stOprt.top().GetCode())\r\n\t\t      {\r\n          case cmVAR:   mu::console() << _T(\"VAR\\n\");  break;\r\n\t\t      case cmVAL:   mu::console() << _T(\"VAL\\n\");  break;\r\n\t\t      case cmFUNC:  mu::console() << _T(\"FUNC_NUM \\\"\") \r\n                                      << stOprt.top().GetAsString() \r\n                                      << _T(\"\\\"\\n\");   break;\r\n\t\t      case cmOPRT_INFIX: mu::console() << _T(\"OPRT_INFIX \\\"\")\r\n                                          << stOprt.top().GetAsString() \r\n                                          << _T(\"\\\"\\n\");   break;\r\n          case cmOPRT_BIN:   mu::console() << _T(\"OPRT_BIN \\\"\") \r\n                                          << stOprt.top().GetAsString() \r\n                                          << _T(\"\\\"\\n\");        break;\r\n          case cmFUNC_STR: mu::console() << _T(\"FUNC_STR\\n\");  break;\r\n\t\t      case cmEND:      mu::console() << _T(\"END\\n\");       break;\r\n\t\t      case cmUNKNOWN:  mu::console() << _T(\"UNKNOWN\\n\");   break;\r\n\t\t      case cmBO:       mu::console() << _T(\"BRACKET \\\"(\\\"\\n\");  break;\r\n\t\t      case cmBC:       mu::console() << _T(\"BRACKET \\\")\\\"\\n\");  break;\r\n          default:         mu::console() << stOprt.top().GetType() << _T(\" \");  break;\r\n\t\t      }\r\n      }\t\r\n      stOprt.pop();\r\n    }\r\n\r\n    mu::console() << dec << endl;\r\n  }\r\n\r\n#endif // defined(MUP_DUMP_STACK) | defined(MUP_DUMP_CMDCODE)\r\n} // namespace mu\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserBase.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n#ifndef MU_PARSER_BASE_H\r\n#define MU_PARSER_BASE_H\r\n\r\n//--- Standard includes ------------------------------------------------------------------------\r\n#include <cmath>\r\n#include <string>\r\n#include <iostream>\r\n#include <map>\r\n#include <memory>\r\n\r\n//--- Parser includes --------------------------------------------------------------------------\r\n#include \"muParserDef.h\"\r\n#include \"muParserStack.h\"\r\n#include \"muParserTokenReader.h\"\r\n#include \"muParserBytecode.h\"\r\n#include \"muParserError.h\"\r\n\r\n\r\nnamespace mu\r\n{\r\n/** \\file\r\n    \\brief This file contains the class definition of the muparser engine.\r\n*/\r\n\r\n//--------------------------------------------------------------------------------------------------\r\n/** \\brief Mathematical expressions parser (base parser engine).\r\n  \r\n  Version 1.30 (20080413)\r\n\r\n  This is the implementation of a bytecode based mathematical expressions parser. \r\n  The formula will be parsed from string and converted into a bytecode. \r\n  Future calculations will be done with the bytecode instead the formula string\r\n  resulting in a significant performance increase. \r\n  Complementary to a set of internally implemented functions the parser is able to handle \r\n  user defined functions and variables. \r\n\r\n  \\author (C) 2004-2008 Ingo Berg\r\n*/\r\nclass ParserBase \r\n{\r\nfriend class ParserTokenReader;\r\n\r\nprivate:\r\n\r\n    /** \\brief Typedef for the parse functions. \r\n    \r\n      The parse function do the actual work. The parser exchanges\r\n      the function pointer to the parser function depending on \r\n      which state it is in. (i.e. bytecode parser vs. string parser)\r\n    */\r\n    typedef value_type (ParserBase::*ParseFunction)() const;  \r\n\r\n    /** \\brief Type for a vector of strings. */\r\n    typedef std::vector<string_type> stringbuf_type;\r\n\r\n    /** \\brief Typedef for the token reader. */\r\n    typedef ParserTokenReader token_reader_type;\r\n    \r\n    /** \\brief Type used for parser tokens. */\r\n    typedef ParserToken<value_type, string_type> token_type;\r\n\r\n public:\r\n\r\n    /** \\brief Type of the error class. \r\n    \r\n      Included for backwards compatibility.\r\n    */\r\n    typedef ParserError exception_type;\r\n\r\n    ParserBase(); \r\n    ParserBase(const ParserBase &a_Parser);\r\n    ParserBase& operator=(const ParserBase &a_Parser);\r\n\r\n    virtual ~ParserBase();\r\n    \r\n    //---------------------------------------------------------------------------\r\n    /** \\brief Calculate the result.\r\n\r\n      A note on const correctness: \r\n      I consider it important that Calc is a const function.\r\n      Due to caching operations Calc changes only the state of internal variables with one exception\r\n      m_UsedVar this is reset during string parsing and accessible from the outside. Instead of making\r\n      Calc non const GetUsedVar is non const because it explicitely calls Eval() forcing this update. \r\n\r\n      \\pre A formula must be set.\r\n      \\pre Variables must have been set (if needed)\r\n  \r\n      \\sa #m_pParseFormula\r\n      \\return The evaluation result\r\n      \\throw ParseException if no Formula is set or in case of any other error related to the formula.\r\n    */\r\n\t  inline value_type Eval() const\r\n    {\r\n      return (this->*m_pParseFormula)(); \r\n    }\r\n\r\n    void SetExpr(const string_type &a_sExpr);\r\n    void SetVarFactory(facfun_type a_pFactory, void *pUserData = nullptr);\r\n\r\n    void EnableOptimizer(bool a_bIsOn=true);\r\n    void EnableByteCode(bool a_bIsOn=true);\r\n    void EnableBuiltInOprt(bool a_bIsOn=true);\r\n\r\n    bool HasBuiltInOprt() const;\r\n    void AddValIdent(identfun_type a_pCallback);\r\n\r\n#define MUP_DEFINE_FUNC(TYPE)                                                           \\\r\n    inline void DefineFun(const string_type &a_strName, TYPE a_pFun, bool a_bAllowOpt = true)  \\\r\n    {                                                                                   \\\r\n      AddCallback( a_strName, ParserCallback(a_pFun, a_bAllowOpt),                      \\\r\n                   m_FunDef, ValidNameChars() );                                        \\\r\n    }\r\n\r\n    MUP_DEFINE_FUNC(fun_type0)\r\n    MUP_DEFINE_FUNC(fun_type1)\r\n    MUP_DEFINE_FUNC(fun_type2)\r\n    MUP_DEFINE_FUNC(fun_type3)\r\n    MUP_DEFINE_FUNC(fun_type4)\r\n    MUP_DEFINE_FUNC(fun_type5)\r\n    MUP_DEFINE_FUNC(multfun_type)\r\n    MUP_DEFINE_FUNC(strfun_type1)\r\n    MUP_DEFINE_FUNC(strfun_type2)\r\n    MUP_DEFINE_FUNC(strfun_type3)\r\n#undef MUP_DEFINE_FUNC\r\n\r\n    void DefineOprt(const string_type &a_strName, fun_type2 a_pFun, unsigned a_iPri=0, bool a_bAllowOpt = false);\r\n    void DefineConst(const string_type &a_sName, value_type a_fVal);\r\n    void DefineStrConst(const string_type &a_sName, const string_type &a_strVal);\r\n    void DefineVar(const string_type &a_sName, value_type *a_fVar);\r\n    void DefinePostfixOprt(const string_type &a_strFun, fun_type1 a_pOprt, bool a_bAllowOpt=true);\r\n    void DefineInfixOprt(const string_type &a_strName, fun_type1 a_pOprt, int a_iPrec=prINFIX, bool a_bAllowOpt=true);\r\n\r\n    // Clear user defined variables, constants or functions\r\n\t  void ClearVar();\r\n    void ClearFun();\r\n    void ClearConst();\r\n    void ClearInfixOprt();\r\n    void ClearPostfixOprt();\r\n    void ClearOprt();\r\n    \r\n    void RemoveVar(const string_type &a_strVarName);\r\n    const varmap_type& GetUsedVar() const;\r\n    const varmap_type& GetVar() const;\r\n    const valmap_type& GetConst() const;\r\n    const string_type& GetExpr() const;\r\n    const funmap_type& GetFunDef() const;\r\n\r\n    const char_type ** GetOprtDef() const;\r\n    void DefineNameChars(const char_type *a_szCharset);\r\n    void DefineOprtChars(const char_type *a_szCharset);\r\n    void DefineInfixOprtChars(const char_type *a_szCharset);\r\n\r\n    const char_type* ValidNameChars() const;\r\n    const char_type* ValidOprtChars() const;\r\n    const char_type* ValidInfixOprtChars() const;\r\n\r\n    void SetArgSep(char_type cArgSep);\r\n    char_type GetArgSep() const;\r\n\r\n    void  Error(EErrorCodes a_iErrc, \r\n                int a_iPos = (int)mu::string_type::npos, \r\n                const string_type &a_strTok = string_type() ) const;\r\n\r\n protected:\r\n\t  \r\n    void Init();\r\n\r\n    virtual void InitCharSets() = 0;\r\n    virtual void InitFun() = 0;\r\n    virtual void InitConst() = 0;\r\n    virtual void InitOprt() = 0; \r\n\r\n    static const char_type *c_DefaultOprt[];\r\n\r\n private:\r\n\r\n    void Assign(const ParserBase &a_Parser);\r\n    void InitTokenReader();\r\n    void ReInit() const;\r\n\r\n    void AddCallback( const string_type &a_strName, \r\n                      const ParserCallback &a_Callback, \r\n                      funmap_type &a_Storage,\r\n                      const char_type *a_szCharSet );\r\n\r\n    void ApplyBinOprt(ParserStack<token_type> &a_stOpt,\r\n                      ParserStack<token_type> &a_stVal) const;\r\n\r\n    void ApplyFunc(ParserStack<token_type> &a_stOpt,\r\n                   ParserStack<token_type> &a_stVal, \r\n                   int iArgCount) const; \r\n\r\n    token_type ApplyNumFunc(const token_type &a_FunTok,\r\n                            const std::vector<token_type> &a_vArg) const;\r\n\r\n    token_type ApplyStrFunc(const token_type &a_FunTok,\r\n                            const std::vector<token_type> &a_vArg) const;\r\n\r\n    int GetOprtPri(const token_type &a_Tok) const;\r\n\r\n    value_type ParseString() const; \r\n    value_type ParseCmdCode() const;\r\n    value_type ParseValue() const;\r\n\r\n    void  ClearFormula();\r\n    void  CheckName(const string_type &a_strName, const string_type &a_CharSet) const;\r\n\r\n#if defined(MUP_DUMP_STACK) | defined(MUP_DUMP_CMDCODE)\r\n    void StackDump(const ParserStack<token_type > &a_stVal, \r\n                   const ParserStack<token_type > &a_stOprt) const;\r\n#endif\r\n\r\n    /** \\brief Pointer to the parser function. \r\n    \r\n      Eval() calls the function whose address is stored there.\r\n    */\r\n    mutable ParseFunction  m_pParseFormula;\r\n    mutable const ParserByteCode::map_type *m_pCmdCode; ///< Formula converted to bytecode, points to the data of the bytecode class.\r\n    mutable ParserByteCode m_vByteCode;   ///< The Bytecode class.\r\n    mutable stringbuf_type  m_vStringBuf; ///< String buffer, used for storing string function arguments\r\n    stringbuf_type  m_vStringVarBuf;\r\n\r\n    std::unique_ptr<token_reader_type> m_pTokenReader; ///< Managed pointer to the token reader object.\r\n\r\n    funmap_type  m_FunDef;        ///< Map of function names and pointers.\r\n    funmap_type  m_PostOprtDef;   ///< Postfix operator callbacks\r\n    funmap_type  m_InfixOprtDef;  ///< unary infix operator.\r\n    funmap_type  m_OprtDef;       ///< Binary operator callbacks\r\n    valmap_type  m_ConstDef;      ///< user constants.\r\n    strmap_type  m_StrVarDef;     ///< user defined string constants\r\n    varmap_type  m_VarDef;        ///< user defind variables.\r\n\r\n    bool m_bOptimize;             ///< Flag that indicates if the optimizer is on or off.\r\n    bool m_bUseByteCode;          ///< Flag that indicates if bytecode parsing is on or off.\r\n    bool m_bBuiltInOp;            ///< Flag that can be used for switching built in operators on and off\r\n\r\n    string_type m_sNameChars;      ///< Charset for names\r\n    string_type m_sOprtChars;      ///< Charset for postfix/ binary operator tokens\r\n    string_type m_sInfixOprtChars; ///< Charset for infix operator tokens\r\n};\r\n\r\n} // namespace mu\r\n\r\n#endif\r\n\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserBytecode.cpp",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#include \"muParserBytecode.h\"\r\n\r\n#include <cassert>\r\n#include <string>\r\n#include <stack>\r\n#include <vector>\r\n#include <iostream>\r\n\r\n#include \"muParserDef.h\"\r\n#include \"muParserError.h\"\r\n#include \"muParserToken.h\"\r\n\r\n/** \\file\r\n    \\brief Implementation of the parser bytecode class.\r\n*/\r\n\r\n\r\nnamespace mu\r\n{\r\n  //---------------------------------------------------------------------------\r\n  /** Bytecode default constructor. */\r\n  ParserByteCode::ParserByteCode()\r\n    :m_iStackPos(0)\r\n    ,m_vBase()\r\n    ,mc_iSizeVal( std::max( (int)sizeof(value_type)  / (int)sizeof(map_type), 1 ) )\r\n    ,mc_iSizePtr( std::max( (int)sizeof(value_type*) / (int)sizeof(map_type), 1 ) )\r\n    ,mc_iSizeValEntry( 2 + mc_iSizeVal)\r\n  {\r\n    m_vBase.reserve(1000);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Destructor (trivial).*/\r\n  ParserByteCode::~ParserByteCode()\r\n  {}\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Copy constructor. \r\n    \r\n      Implemented in Terms of Assign(const ParserByteCode &a_ByteCode)\r\n  */\r\n  ParserByteCode::ParserByteCode(const ParserByteCode &a_ByteCode)\r\n    :mc_iSizeVal( sizeof(value_type)/sizeof(map_type) )\r\n    ,mc_iSizePtr( sizeof(value_type*) / sizeof(map_type) )\r\n    ,mc_iSizeValEntry( 2 + mc_iSizeVal)\r\n  {\r\n    Assign(a_ByteCode);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Assignment operator.\r\n    \r\n      Implemented in Terms of Assign(const ParserByteCode &a_ByteCode)\r\n  */\r\n  ParserByteCode& ParserByteCode::operator=(const ParserByteCode &a_ByteCode)\r\n  {\r\n    Assign(a_ByteCode);\r\n    return *this;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Store an address in bytecode.\r\n  \r\n      \\param a_pAddr Address to be stored.\r\n      \\throw nothrow\r\n  */\r\n  void ParserByteCode::StorePtr(void *a_pAddr)\r\n  {\r\n    #if defined(_MSC_VER)\r\n      #pragma warning( disable : 4311 )\r\n    #endif\r\n\r\n    // demo code for packing / unpacking pointers into bytecode\r\n//    void *ptr(NULL);\r\n//    double **pVal;\r\n//    double fVal;\r\n//    map_type dbg[2]; \r\n//    dbg[0] = *( reinterpret_cast<map_type*>(&a_pAddr) ), \r\n//    dbg[1] = *( reinterpret_cast<map_type*>(&a_pAddr) + 1 );     \r\n// Version 1:\r\n//    *( (map_type*)&ptr+0) = dbg[0];\r\n//    *( (map_type*)&ptr+1) = dbg[1];\r\n// Version 2:\r\n//    memcpy(&ptr, dbg, sizeof(dbg));\r\n// Version 3:    \r\n//    pVal = (double**)dbg;\r\n//    fVal = **(double**)dbg;\r\n\r\n    for (int i=0; i<mc_iSizePtr; ++i)\r\n      m_vBase.push_back( *( reinterpret_cast<map_type*>(&a_pAddr) + i ) );\r\n\r\n    #if defined(_MSC_VER)\r\n      #pragma warning( default : 4311 )\r\n    #endif\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Copy state of another object to this. \r\n    \r\n      \\throw nowthrow\r\n  */\r\n  void ParserByteCode::Assign(const ParserByteCode &a_ByteCode)\r\n  {\r\n    if (this==&a_ByteCode)    \r\n      return;\r\n\r\n    m_iStackPos = a_ByteCode.m_iStackPos;\r\n    m_vBase = a_ByteCode.m_vBase;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add a Variable pointer to bytecode. \r\n      \\param a_pVar Pointer to be added.\r\n      \\throw nothrow\r\n  */\r\n  void ParserByteCode::AddVar(value_type *a_pVar)\r\n  {\r\n    m_vBase.push_back( ++m_iStackPos );\r\n    m_vBase.push_back( cmVAR );\r\n\r\n    StorePtr(a_pVar);\r\n\r\n    const int iSize = mc_iSizeVal - mc_iSizePtr;\r\n    assert(iSize>=0);\r\n\r\n    // Make sure variable entries have the same size as value entries.\r\n    // (necessary for optimization; fill with zeros)\r\n    for (int i=0; i<iSize; ++i)\r\n      m_vBase.push_back(0);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add a Variable pointer to bytecode. \r\n\r\n      Value entries in byte code consist of:\r\n      <ul>\r\n        <li>value array position of the value</li>\r\n        <li>the operator code according to ParserToken::cmVAL</li>\r\n        <li>the value stored in #mc_iSizeVal number of bytecode entries.</li>\r\n      </ul>\r\n\r\n      \\param a_fVal Value to be added.\r\n      \\throw nothrow\r\n  */\r\n  void ParserByteCode::AddVal(value_type a_fVal)\r\n  {\r\n    m_vBase.push_back( ++m_iStackPos );\r\n    m_vBase.push_back( cmVAL );\r\n\r\n    for (int i=0; i<mc_iSizeVal; ++i)\r\n      m_vBase.push_back( *(reinterpret_cast<map_type*>(&a_fVal) + i) );\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add an operator identifier to bytecode. \r\n    \r\n      Operator entries in byte code consist of:\r\n      <ul>\r\n        <li>value array position of the result</li>\r\n        <li>the operator code according to ParserToken::ECmdCode</li>\r\n      </ul>\r\n\r\n      \\sa  ParserToken::ECmdCode\r\n  */\r\n  void ParserByteCode::AddOp(ECmdCode a_Oprt)\r\n  {\r\n    m_vBase.push_back(--m_iStackPos);\r\n    m_vBase.push_back(a_Oprt);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add an assignement operator\r\n    \r\n      Operator entries in byte code consist of:\r\n      <ul>\r\n        <li>cmASSIGN code</li>\r\n        <li>the pointer of the destination variable</li>\r\n      </ul>\r\n\r\n      \\sa  ParserToken::ECmdCode\r\n  */\r\n  void ParserByteCode::AddAssignOp(value_type *a_pVar)\r\n  {\r\n    m_vBase.push_back(--m_iStackPos);\r\n    m_vBase.push_back(cmASSIGN);\r\n    StorePtr(a_pVar);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add function to bytecode. \r\n\r\n      \\param a_iArgc Number of arguments, negative numbers indicate multiarg functions.\r\n      \\param a_pFun Pointer to function callback.\r\n  */\r\n  void ParserByteCode::AddFun(void *a_pFun, int a_iArgc)\r\n  {\r\n    if (a_iArgc>=0)\r\n    {\r\n      m_iStackPos = m_iStackPos - a_iArgc + 1; \r\n    }\r\n    else\r\n    {\r\n      m_iStackPos = m_iStackPos + a_iArgc + 1; \r\n    }\r\n\r\n    m_vBase.push_back(m_iStackPos);\r\n    m_vBase.push_back(cmFUNC);\r\n\t  m_vBase.push_back(a_iArgc);\r\n\r\n    StorePtr(a_pFun);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add Strung function entry to the parser bytecode. \r\n      \\throw nothrow\r\n\r\n      A string function entry consists of the stack position of the return value,\r\n      followed by a cmSTRFUNC code, the function pointer and an index into the \r\n      string buffer maintained by the parser.\r\n  */\r\n  void ParserByteCode::AddStrFun(void *a_pFun, int a_iArgc, int a_iIdx)\r\n  {\r\n    m_iStackPos = m_iStackPos - a_iArgc + 1;\r\n    m_vBase.push_back(m_iStackPos);\r\n    m_vBase.push_back(cmFUNC_STR);\r\n\t  m_vBase.push_back(a_iArgc);\r\n    m_vBase.push_back(a_iIdx);\r\n\r\n    StorePtr(a_pFun);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Add end marker to bytecode.\r\n      \r\n      \\throw nothrow \r\n  */\r\n  void ParserByteCode::Finalize()\r\n  {\r\n    m_vBase.push_back(cmEND);\t\r\n    m_vBase.push_back(cmEND);\t\r\n//    m_vBase.push_back(cmEND);\t\r\n\r\n    // shrink bytecode vector to fit\r\n    storage_type(m_vBase).swap(m_vBase);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Get Pointer to bytecode data storage. */\r\n  const ParserByteCode::map_type* ParserByteCode::GetRawData() const\r\n  {\r\n    assert(m_vBase.size());\r\n    return &m_vBase[0];\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  std::size_t ParserByteCode::GetBufSize() const\r\n  {\r\n    return m_vBase.size();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Delete the bytecode. \r\n  \r\n      \\throw nothrow\r\n\r\n      The name of this function is a violation of my own coding guidelines\r\n      but this way it's more in line with the STL functions thus more \r\n      intuitive.\r\n  */\r\n  void ParserByteCode::clear()\r\n  {\r\n    m_vBase.clear();\r\n    m_iStackPos = 0;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Remove a value number of entries from the bytecode. \r\n    \r\n      \\attention Currently I don't test if the entries are really value entries.\r\n  */\r\n  void ParserByteCode::RemoveValEntries(unsigned a_iNumber)\r\n  {\r\n    unsigned iSize = a_iNumber * mc_iSizeValEntry;   \r\n    assert( m_vBase.size() >= iSize );\r\n    m_vBase.resize(m_vBase.size()-iSize);\r\n\r\n    assert(m_iStackPos >= a_iNumber);\r\n    m_iStackPos -= (a_iNumber);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Dump bytecode (for debugging only!). */\r\n  void ParserByteCode::AsciiDump()\r\n  {\r\n    if (!m_vBase.size()) \r\n    {\r\n      std::cout << \"No bytecode available\\n\";\r\n      return;\r\n    }\r\n\r\n    std::cout << \"Entries:\" << (int)m_vBase.size() \r\n              << \" (ValSize:\" << mc_iSizeVal \r\n              << \" entries, PtrSize:\" << mc_iSizePtr \r\n              << \" entries, MapSize:\" << sizeof(map_type) \r\n              << \" byte)\\n\";\r\n    int i = 0;\r\n\r\n    while ( i<(int)m_vBase.size() && m_vBase[i] != cmEND)\r\n    {\r\n      std::cout << \"IDX[\" << (int)m_vBase[i++] << \"]\\t\";\r\n      switch (m_vBase[i])\r\n      {\r\n        case cmVAL: std::cout << \"VAL \"; ++i;\r\n                    std::cout << \"[\" << *( reinterpret_cast<double*>(&m_vBase[i]) ) << \"]\\n\";\r\n                    i += mc_iSizeVal;\r\n                    break;\r\n\r\n        case cmVAR: std::cout << \"VAR \"; ++i;\r\n  \t                std::cout << \"[ADDR: 0x\" << std::hex << *(value_type**)&m_vBase[i] << \"]\\n\"; \r\n                    i += mc_iSizePtr;\r\n\r\n                    // Variable entries have the same size like value entries\r\n                    // the remaining spave must be skipped\r\n                    i+= std::max(mc_iSizeVal - mc_iSizePtr, 0);\r\n                    break;\r\n      \t\t\t\r\n        case cmFUNC:\r\n                    std::cout << \"CALL\\t\"; ++i;\r\n                    std::cout << \"[ARG:\" << std::dec << (int)m_vBase[i] << \"]\"; ++i;\r\n\t                  std::cout << \"[ADDR: 0x\" << std::hex << *(value_type**)&m_vBase[i] << \"]\\n\"; \r\n                    i += mc_iSizePtr;\r\n                    break;\r\n\r\n        case cmFUNC_STR:\r\n                    std::cout << \"CALL STRFUNC\\t\"; ++i;\r\n                    std::cout << \"[ARG:\" << std::dec << (int)m_vBase[i] << \"]\"; ++i;\r\n                    std::cout << \"[IDX:\" << std::dec << (int)m_vBase[i] << \"]\"; ++i;\r\n                    std::cout << \"[ADDR: 0x\" << *(value_type**)&m_vBase[i] << \"]\\n\"; \r\n                    i += mc_iSizePtr;\r\n                    break;\r\n\r\n        case cmLT:  std::cout << \"LT\\n\"; ++i; break;\r\n        case cmGT:  std::cout << \"GT\\n\"; ++i; break;\r\n        case cmLE:  std::cout << \"LE\\n\"; ++i; break;\r\n        case cmGE:  std::cout << \"GE\\n\"; ++i; break;\r\n        case cmEQ:  std::cout << \"EQ\\n\"; ++i; break;\r\n        case cmNEQ: std::cout << \"NEQ\\n\"; ++i; break;\r\n        case cmADD: std::cout << \"ADD\\n\"; ++i; break;\r\n        case cmAND: std::cout << \"AND\\n\"; ++i; break;\r\n        case cmOR:  std::cout << \"OR\\n\";  ++i; break;\r\n        case cmXOR: std::cout << \"XOR\\n\"; ++i; break;\r\n        case cmSUB: std::cout << \"SUB\\n\"; ++i; break;\r\n        case cmMUL: std::cout << \"MUL\\n\"; ++i; break;\r\n        case cmDIV: std::cout << \"DIV\\n\"; ++i; break;\r\n        case cmPOW: std::cout << \"POW\\n\"; ++i; break;\r\n\r\n        case cmASSIGN: \r\n                    std::cout << \"ASSIGN\\t\"; ++i; \r\n                    std::cout << \"[ADDR: 0x\" << *(value_type**)&m_vBase[i] << \"]\\n\"; \r\n                    i += mc_iSizePtr;\r\n                    break; \r\n\r\n        default:    std::cout << \"(unknown code: \" << (int)m_vBase[i] << \")\\n\"; \r\n                    ++i;\t\r\n                    break;\r\n      } // switch cmdCode\r\n    } // while bytecode\r\n\r\n    std::cout << \"END\" << std::endl;\r\n  }\r\n} // namespace mu\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserBytecode.h",
    "content": "/*\r\n                 __________\r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______\r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|\r\n        \\/                       \\/            \\/      \\/\r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this\r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify,\r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to\r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or\r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n*/\r\n#ifndef MU_PARSER_BYTECODE_H\r\n#define MU_PARSER_BYTECODE_H\r\n\r\n#include <cassert>\r\n#include <string>\r\n#include <stack>\r\n#include <vector>\r\n#include <locale>\r\n\r\n#include \"muParserDef.h\"\r\n#include \"muParserError.h\"\r\n#include \"muParserToken.h\"\r\n\r\n/** \\file\r\n    \\brief Definition of the parser bytecode class.\r\n*/\r\n\r\n\r\nnamespace mu\r\n{\r\n\r\n\r\n/** \\brief Bytecode implementation of the Math Parser.\r\n\r\n  The bytecode contains the formula converted to revers polish notation stored in a continious\r\n  memory area. Associated with this data are operator codes, variable pointers, constant\r\n  values and function pointers. Those are necessary in order to calculate the result.\r\n  All those data items will be casted to the underlying datatype of the bytecode.\r\n\r\n  \\author (C) 2004, 2005 Ingo Berg\r\n*/\r\nclass ParserByteCode\r\n{\r\npublic:\r\n    /** \\brief Underlying type of the container.\r\n\r\n       The bytecode is a vector of this type containing control codes,\r\n       values and pointers. Values and pointer will be casted to this\r\n       type before their storage.\r\n    */\r\n    typedef bytecode_type map_type;\r\n\r\nprivate:\r\n\r\n    /** \\brief Token type for internal use only. */\r\n    typedef ParserToken<value_type, string_type> token_type;\r\n\r\n    /** \\brief Core type of the bytecode. */\r\n    typedef std::vector<map_type> storage_type;\r\n\r\n    /** \\brief Position in the Calculation array. */\r\n    unsigned m_iStackPos;\r\n\r\n    /** \\brief Core type of the bytecode. */\r\n    storage_type m_vBase;\r\n\r\n    /** \\brief Size of a value entry in the bytecode, relative to TMapType size. */\r\n    const int mc_iSizeVal;\r\n\r\n    /** \\brief Size of a pointer, relative to size of underlying TMapType.\r\n\r\n        \\attention The size is related to the size of TMapType not bytes!\r\n    */\r\n    const int mc_iSizePtr;\r\n\r\n    /** \\brief A value entry requires that much entires in the bytecode.\r\n\r\n        Value entry consists of:\r\n        <ul>\r\n          <li>One entry for Stack index</li>\r\n          <li>One entry for Token identifier</li>\r\n          <li>mc_iSizeVal entries for the value</li>\r\n        </ul>\r\n\r\n        \\sa AddVal(TBaseData a_fVal)\r\n    */\r\n    const int mc_iSizeValEntry;\r\n\r\n    void StorePtr(void *a_pAddr);\r\n\r\npublic:\r\n    ParserByteCode();\r\n   ~ParserByteCode();\r\n    ParserByteCode(const ParserByteCode &a_ByteCode);\r\n    ParserByteCode& operator=(const ParserByteCode &a_ByteCode);\r\n    void Assign(const ParserByteCode &a_ByteCode);\r\n\r\n    void AddVar(value_type *a_pVar);\r\n    void AddVal(value_type a_fVal);\r\n    void AddOp(ECmdCode a_Oprt);\r\n    void AddAssignOp(value_type *a_pVar);\r\n    void AddFun(void *a_pFun, int a_iArgc);\r\n    void AddStrFun(void *a_pFun, int a_iArgc, int a_iIdx);\r\n\r\n    void Finalize();\r\n    void clear();\r\n\r\n    std::size_t GetBufSize() const;\r\n\r\n    const map_type* GetRawData() const;\r\n\r\n    /** \\brief Return size of a value entry.\r\n\r\n      That many bytecode entries are necessary to store a value.\r\n\r\n      \\sa mc_iSizeVal\r\n    */\r\n    unsigned GetValSize() const\r\n    {\r\n      return mc_iSizeVal;\r\n    }\r\n\r\n    /** \\brief Return size of a pointer entry.\r\n\r\n      That many bytecode entries are necessary to store a pointer.\r\n\r\n      \\sa mc_iSizePtr\r\n    */\r\n    unsigned GetPtrSize() const\r\n    {\r\n      return mc_iSizePtr;\r\n    }\r\n\r\n    void RemoveValEntries(unsigned a_iNumber);\r\n    void AsciiDump();\r\n};\r\n\r\n} // namespace mu\r\n\r\n#endif\r\n\r\n\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserCallback.cpp",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#include \"muParserCallback.h\"\r\n\r\n/** \\file\r\n    \\brief Implementation of the parser callback class.\r\n*/\r\n\r\n\r\nnamespace mu\r\n{\r\n  //---------------------------------------------------------------------------\r\n  ParserCallback::ParserCallback(fun_type0 a_pFun, bool a_bAllowOpti)\r\n    :m_pFun((void*)a_pFun)\r\n    ,m_iArgc(0)\r\n    ,m_iPri(-1)\r\n    ,m_iCode(cmFUNC)\r\n    ,m_iType(tpDBL)\r\n    ,m_bAllowOpti(a_bAllowOpti)\r\n  {}\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserCallback::ParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec, ECmdCode a_iCode)\r\n    :m_pFun((void*)a_pFun)\r\n    ,m_iArgc(1)\r\n    ,m_iPri(a_iPrec)\r\n    ,m_iCode(a_iCode)\r\n    ,m_iType(tpDBL)\r\n    ,m_bAllowOpti(a_bAllowOpti)\r\n  {}\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserCallback::ParserCallback( fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, ECmdCode a_iCode)\r\n    :m_pFun((void*)a_pFun)\r\n    ,m_iArgc(2)\r\n    ,m_iPri(a_iPrec)\r\n    ,m_iCode(a_iCode)\r\n    ,m_iType(tpDBL)\r\n    ,m_bAllowOpti(a_bAllowOpti)\r\n  {}\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserCallback::ParserCallback(fun_type3 a_pFun, bool a_bAllowOpti)\r\n    :m_pFun((void*)a_pFun)\r\n    ,m_iArgc(3)\r\n    ,m_iPri(-1)\r\n    ,m_iCode(cmFUNC)\r\n    ,m_iType(tpDBL)\r\n    ,m_bAllowOpti(a_bAllowOpti)\r\n  {}\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserCallback::ParserCallback(fun_type4 a_pFun, bool a_bAllowOpti)\r\n    :m_pFun((void*)a_pFun)\r\n    ,m_iArgc(4)\r\n    ,m_iPri(-1)\r\n    ,m_iCode(cmFUNC)\r\n    ,m_iType(tpDBL)\r\n    ,m_bAllowOpti(a_bAllowOpti)\r\n  {}\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserCallback::ParserCallback(fun_type5 a_pFun, bool a_bAllowOpti)\r\n    :m_pFun((void*)a_pFun)\r\n    ,m_iArgc(5)\r\n    ,m_iPri(-1)\r\n    ,m_iCode(cmFUNC)\r\n    ,m_iType(tpDBL)\r\n    ,m_bAllowOpti(a_bAllowOpti)\r\n  {}\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserCallback::ParserCallback(multfun_type a_pFun, bool a_bAllowOpti)\r\n    :m_pFun((void*)a_pFun)\r\n    ,m_iArgc(-1)\r\n    ,m_iPri(-1)\r\n    ,m_iCode(cmFUNC)\r\n    ,m_iType(tpDBL)\r\n    ,m_bAllowOpti(a_bAllowOpti)\r\n  {}\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserCallback::ParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti)\r\n    :m_pFun((void*)a_pFun)\r\n    ,m_iArgc(0)\r\n    ,m_iPri(-1)\r\n    ,m_iCode(cmFUNC_STR)\r\n    ,m_iType(tpSTR)\r\n    ,m_bAllowOpti(a_bAllowOpti)\r\n  {}\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserCallback::ParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti)\r\n    :m_pFun((void*)a_pFun)\r\n    ,m_iArgc(1)\r\n    ,m_iPri(-1)\r\n    ,m_iCode(cmFUNC_STR)\r\n    ,m_iType(tpSTR)\r\n    ,m_bAllowOpti(a_bAllowOpti)\r\n  {}\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserCallback::ParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti)\r\n    :m_pFun((void*)a_pFun)\r\n    ,m_iArgc(2)\r\n    ,m_iPri(-1)\r\n    ,m_iCode(cmFUNC_STR)\r\n    ,m_iType(tpSTR)\r\n    ,m_bAllowOpti(a_bAllowOpti)\r\n  {}\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Default constructor. \r\n\r\n      \\throw nothrow\r\n  */\r\n  ParserCallback::ParserCallback()\r\n    :m_pFun(0)\r\n    ,m_iArgc(0)\r\n    ,m_iCode(cmUNKNOWN)\r\n    ,m_iType(tpVOID)\r\n    ,m_bAllowOpti(0)\r\n  {}\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Copy constructor. \r\n\r\n      \\throw nothrow\r\n  */\r\n  ParserCallback::ParserCallback(const ParserCallback &a_Fun)\r\n  {\r\n    m_pFun = a_Fun.m_pFun;\r\n    m_iArgc = a_Fun.m_iArgc;\r\n    m_bAllowOpti = a_Fun.m_bAllowOpti;\r\n    m_iCode = a_Fun.m_iCode;\r\n    m_iType = a_Fun.m_iType;\r\n    m_iPri = a_Fun.m_iPri;\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Clone this instance and return a pointer to the new instance. */\r\n  ParserCallback* ParserCallback::Clone() const\r\n  {\r\n    return new ParserCallback(*this);\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return tru if the function is conservative.\r\n\r\n      Conservative functions return always the same result for the same argument.\r\n      \\throw nothrow\r\n  */\r\n  bool ParserCallback::IsOptimizable() const  \r\n  { \r\n    return m_bAllowOpti; \r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Get the callback address for the parser function. \r\n  \r\n      The type of the address is void. It needs to be recasted according to the\r\n      argument number to the right type.\r\n\r\n      \\throw nothrow\r\n      \\return #pFun\r\n  */\r\n  void* ParserCallback::GetAddr() const \r\n  { \r\n    return m_pFun;  \r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return the callback code. */\r\n  ECmdCode  ParserCallback::GetCode() const \r\n  { \r\n    return m_iCode; \r\n  }\r\n  \r\n\r\n  //---------------------------------------------------------------------------\r\n  ETypeCode ParserCallback::GetType() const \r\n  { \r\n    return m_iType; \r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return the operator priority. \r\n  \r\n     Only valid if the callback token is an operator token (binary or infix).\r\n  */\r\n  int ParserCallback::GetPri()  const \r\n  { \r\n    return m_iPri;  \r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Returns the number of function Arguments. */\r\n  int ParserCallback::GetArgc() const \r\n  { \r\n    return m_iArgc; \r\n  }\r\n} // namespace mu\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserCallback.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#ifndef MU_PARSER_CALLBACK_H\r\n#define MU_PARSER_CALLBACK_H\r\n\r\n#include \"muParserDef.h\"\r\n\r\n/** \\file\r\n    \\brief Definition of the parser callback class.\r\n*/\r\n\r\nnamespace mu\r\n{\r\n\r\n/** \\brief Encapsulation of prototypes for a numerical parser function.\r\n\r\n    Encapsulates the prototyp for numerical parser functions. The class\r\n    stores the number of arguments for parser functions as well\r\n    as additional flags indication the function is non optimizeable.\r\n    The pointer to the callback function pointer is stored as void* \r\n    and needs to be casted according to the argument count.\r\n    Negative argument counts indicate a parser function with a variable number\r\n    of arguments. \r\n    This class is not used for string function prototyping.\r\n\r\n    \\author (C) 2004-2007 Ingo Berg\r\n*/\r\nclass ParserCallback\r\n{\r\npublic:\r\n    ParserCallback(fun_type0 a_pFun, bool a_bAllowOpti);\r\n    ParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC);\r\n    ParserCallback(fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC);\r\n    ParserCallback(fun_type3 a_pFun, bool a_bAllowOpti);\r\n    ParserCallback(fun_type4 a_pFun, bool a_bAllowOpti);\r\n    ParserCallback(fun_type5 a_pFun, bool a_bAllowOpti);\r\n    ParserCallback(multfun_type a_pFun, bool a_bAllowOpti);\r\n    ParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti);\r\n    ParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti);\r\n    ParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti);\r\n    ParserCallback();\r\n    ParserCallback(const ParserCallback &a_Fun);\r\n    \r\n    ParserCallback* Clone() const;\r\n\r\n    bool  IsOptimizable() const;\r\n    void* GetAddr() const;\r\n    ECmdCode  GetCode() const;\r\n    ETypeCode GetType() const;\r\n    int GetPri()  const;\r\n    int GetArgc() const;\r\n\r\nprivate:\r\n    void *m_pFun;       ///< Pointer to the callback function, casted to void\r\n    \r\n    /** \\brief Number of numeric function arguments\r\n    \r\n        This number is negative for functions with variable number of arguments. in this cases\r\n        they represent the actual number of arguments found.\r\n    */\r\n    int   m_iArgc;      \r\n    int   m_iPri;       ///< Valid only for binary and infix operators; Operator precedence.\r\n    ECmdCode  m_iCode;\r\n    ETypeCode m_iType;\r\n    bool  m_bAllowOpti; ///< Flag indication optimizeability \r\n};\r\n\r\n//------------------------------------------------------------------------------\r\n/** \\brief Container for Callback objects. */\r\ntypedef std::map<string_type, ParserCallback> funmap_type; \r\n\r\n} // namespace mu\r\n\r\n#endif\r\n\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserComplex.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#ifndef MU_PARSER_COMPLEX_H\r\n#define MU_PARSER_COMPLEX_H\r\n\r\n#include \"muParserBase.h\"\r\n#include <vector>\r\n#include <complex>\r\n\r\n/** \\file \r\n    \\brief This file contains a definition of a parser using complex numbers.\r\n*/\r\n\r\n\r\nnamespace mu\r\n{\r\n  /** \\brief Mathematical expressions parser.\r\n    \r\n    This version of the parser handles only complex numbers. It disables the built in operators \r\n    thus it is slower than muParser. \r\n  */\r\n  class ParserComplex : private ParserBase\r\n  {\r\n  public:\r\n\r\n    typedef std::complex<float> complex_type;\r\n\r\n    ParserComplex();\r\n\r\n    using ParserBase::SetExpr;\r\n\r\n    complex_type Eval();\r\n\r\n  private:\r\n\r\n    // !! The unary Minus is a MUST, otherwise you cant use negative signs !!\r\n    static value_type  UnaryMinus(value_type);\r\n    // binary operator callbacks\r\n    static value_type  Add(value_type v1, value_type v2);\r\n    static value_type  Sub(value_type v1, value_type v2);\r\n    static value_type  Mul(value_type v1, value_type v2);\r\n    static value_type  Div(value_type v1, value_type v2);\r\n\r\n    static value_type  Sin(value_type);\r\n    static value_type  Cos(value_type);\r\n    static value_type  Tan(value_type);\r\n    static value_type  Sqrt(value_type);\r\n\r\n    static int IsVal(const char_type* a_szExpr, int *a_iPos, value_type *a_iVal);\r\n\r\n    static complex_type UnpackToComplex(double val);\r\n    static double PackToDouble(const complex_type &val);\r\n\r\n    virtual void InitOprt();\r\n    virtual void InitCharSets();\r\n    virtual void InitFun();\r\n    virtual void InitConst();\r\n  };\r\n} // namespace mu\r\n\r\n#endif\n"
  },
  {
    "path": "src/madness/external/muParser/muParserDLL.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n#ifndef MU_PARSER_DLL_H\r\n#define MU_PARSER_DLL_H\r\n\r\n#if defined(_WIN32)\r\n    #ifdef MUPARSERLIB_EXPORTS\r\n        #define API_EXPORT(TYPE) extern \"C\" __declspec(dllexport) TYPE __stdcall\r\n    #else\r\n        #define API_EXPORT(TYPE) extern __declspec(dllimport) TYPE __stdcall\r\n    #endif\r\n#else\r\n    #define API_EXPORT(TYPE) TYPE\r\n#endif\r\n\r\n/** \\file \r\n    \\brief This file contains the DLL interface of muparser.\r\n*/\r\n\r\n// Basic types\r\ntypedef void*  muParserHandle_t;    // parser handle\r\ntypedef char   muChar_t;            // character type\r\ntypedef int    muBool_t;            // boolean type\r\ntypedef int    muInt_t;             // integer type \r\ntypedef double muFloat_t;           // floating point type\r\n\r\n// function types for calculation\r\ntypedef muFloat_t (*muFun0_t)(); \r\ntypedef muFloat_t (*muFun1_t)(muFloat_t); \r\ntypedef muFloat_t (*muFun2_t)(muFloat_t, muFloat_t); \r\ntypedef muFloat_t (*muFun3_t)(muFloat_t, muFloat_t, muFloat_t); \r\ntypedef muFloat_t (*muFun4_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t); \r\ntypedef muFloat_t (*muFun5_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); \r\ntypedef muFloat_t (*muMultFun_t)(const muFloat_t*, muInt_t);\r\ntypedef muFloat_t (*muStrFun1_t)(const muChar_t*);\r\ntypedef muFloat_t (*muStrFun2_t)(const muChar_t*, muFloat_t);\r\ntypedef muFloat_t (*muStrFun3_t)(const muChar_t*, muFloat_t, muFloat_t);\r\n\r\n// Functions for parser management\r\ntypedef void (*muErrorHandler_t)(muParserHandle_t a_hParser);           // [optional] callback to an error handler\r\ntypedef muFloat_t* (*muFacFun_t)(const muChar_t*, void*);               // [optional] callback for creating new variables\r\ntypedef muInt_t (*muIdentFun_t)(const muChar_t*, muInt_t*, muFloat_t*); // [optional] value identification callbacks\r\n\r\n//-----------------------------------------------------------------------------------------------------\r\n//\r\n//\r\n// muParser C compatible bindings\r\n//\r\n//\r\n//-----------------------------------------------------------------------------------------------------\r\n\r\n// Basic operations / initialization  \r\nAPI_EXPORT(muParserHandle_t) mupCreate();\r\nAPI_EXPORT(void) mupRelease(muParserHandle_t a_hParser);\r\nAPI_EXPORT(const muChar_t*) mupGetExpr(muParserHandle_t a_hParser);\r\nAPI_EXPORT(void) mupSetExpr(muParserHandle_t a_hParser, const muChar_t *a_szExpr);\r\nAPI_EXPORT(void) mupSetVarFactory(muParserHandle_t a_hParser, muFacFun_t a_pFactory, void* pUserData);\r\n\r\nAPI_EXPORT(muFloat_t) mupEval(muParserHandle_t a_hParser);\r\n\r\n// Defining callbacks / variables / constants\r\nAPI_EXPORT(void) mupDefineFun0(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun0_t a_pFun, muBool_t a_bOptimize);\r\nAPI_EXPORT(void) mupDefineFun1(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun1_t a_pFun, muBool_t a_bOptimize);\r\nAPI_EXPORT(void) mupDefineFun2(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun2_t a_pFun, muBool_t a_bOptimize);\r\nAPI_EXPORT(void) mupDefineFun3(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun3_t a_pFun, muBool_t a_bOptimize);\r\nAPI_EXPORT(void) mupDefineFun4(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun4_t a_pFun, muBool_t a_bOptimize);\r\nAPI_EXPORT(void) mupDefineFun5(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun5_t a_pFun, muBool_t a_bOptimize);\r\n// string functions\r\nAPI_EXPORT(void) mupDefineStrFun1(muParserHandle_t a_hParser, const muChar_t *a_szName, muStrFun1_t a_pFun);\r\nAPI_EXPORT(void) mupDefineStrFun2(muParserHandle_t a_hParser, const muChar_t *a_szName, muStrFun2_t a_pFun);\r\nAPI_EXPORT(void) mupDefineStrFun3(muParserHandle_t a_hParser, const muChar_t *a_szName, muStrFun3_t a_pFun);\r\n\r\nAPI_EXPORT(void) mupDefineMultFun( muParserHandle_t a_hParser, \r\n                                   const muChar_t* a_szName, \r\n                                   muMultFun_t a_pFun, \r\n                                   muBool_t a_bOptimize);\r\n\r\nAPI_EXPORT(void) mupDefineOprt( muParserHandle_t a_hParser, \r\n                                const muChar_t* a_szName, \r\n                                muFun2_t a_pFun, \r\n                                muInt_t a_iPri1, \r\n                                muBool_t a_bOptimize);\r\n\r\nAPI_EXPORT(void) mupDefineConst( muParserHandle_t a_hParser, \r\n                                 const muChar_t* a_szName, \r\n                                 muFloat_t a_fVal );\r\n\r\nAPI_EXPORT(void) mupDefineStrConst( muParserHandle_t a_hParser, \r\n                                    const muChar_t* a_szName, \r\n                                    const muChar_t *a_sVal );\r\n\r\nAPI_EXPORT(void) mupDefineVar( muParserHandle_t a_hParser, \r\n                               const muChar_t* a_szName, \r\n                               muFloat_t *a_fVar);\r\n\r\nAPI_EXPORT(void) mupDefinePostfixOprt( muParserHandle_t a_hParser, \r\n                                       const muChar_t* a_szName, \r\n                                       muFun1_t a_pOprt, \r\n                                       muBool_t a_bOptimize);\r\n\r\n\r\nAPI_EXPORT(void) mupDefineInfixOprt( muParserHandle_t a_hParser, \r\n                                     const muChar_t* a_szName, \r\n                                     muFun1_t a_pOprt, \r\n                                     muBool_t a_bOptimize);\r\n\r\n// Define character sets for identifiers\r\nAPI_EXPORT(void) mupDefineNameChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);\r\nAPI_EXPORT(void) mupDefineOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);\r\nAPI_EXPORT(void) mupDefineInfixOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);\r\n\r\n// Remove all / single variables\r\nAPI_EXPORT(void) mupRemoveVar(muParserHandle_t a_hParser, const muChar_t* a_szName);\r\nAPI_EXPORT(void) mupClearVar(muParserHandle_t a_hParser);\r\nAPI_EXPORT(void) mupClearConst(muParserHandle_t a_hParser);\r\nAPI_EXPORT(void) mupClearOprt(muParserHandle_t a_hParser);\r\nAPI_EXPORT(void) mupClearFun(muParserHandle_t a_hParser);\r\n\r\n// Querying variables / expression variables / constants\r\nAPI_EXPORT(int) mupGetExprVarNum(muParserHandle_t a_hParser);\r\nAPI_EXPORT(int) mupGetVarNum(muParserHandle_t a_hParser);\r\nAPI_EXPORT(int) mupGetConstNum(muParserHandle_t a_hParser);\r\nAPI_EXPORT(void) mupGetExprVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t** a_pVar);\r\nAPI_EXPORT(void) mupGetVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t** a_pVar);\r\nAPI_EXPORT(void) mupGetConst(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t* a_pVar);\r\nAPI_EXPORT(void) mupSetArgSep(muParserHandle_t a_hParser, const muChar_t cArgSep);\r\nAPI_EXPORT(void) mupSetDecSep(muParserHandle_t a_hParser, const muChar_t cArgSep);\r\nAPI_EXPORT(void) mupSetThousandsSep(muParserHandle_t a_hParser, const muChar_t cArgSep);\r\n\r\n// Add value recognition callbacks\r\nAPI_EXPORT(void) mupAddValIdent(muParserHandle_t a_hParser, muIdentFun_t);\r\n\r\n// Error handling\r\nAPI_EXPORT(muBool_t) mupError(muParserHandle_t a_hParser);\r\nAPI_EXPORT(void) mupErrorReset(muParserHandle_t a_hParser);\r\nAPI_EXPORT(void) mupSetErrorHandler(muParserHandle_t a_hParser, muErrorHandler_t a_pErrHandler);\r\nAPI_EXPORT(const muChar_t*) mupGetErrorMsg(muParserHandle_t a_hParser);\r\nAPI_EXPORT(muInt_t) mupGetErrorCode(muParserHandle_t a_hParser);\r\nAPI_EXPORT(muInt_t) mupGetErrorPos(muParserHandle_t a_hParser);\r\nAPI_EXPORT(const muChar_t*) mupGetErrorToken(muParserHandle_t a_hParser);\r\nAPI_EXPORT(const muChar_t*) mupGetErrorExpr(muParserHandle_t a_hParser);\r\n\r\n// This is used for .NET only. It creates a new variable allowing the dll to\r\n// manage the variable rather than the .NET garbage collector.\r\nAPI_EXPORT(muFloat_t*) mupCreateVar();\r\nAPI_EXPORT(void) mupReleaseVar(muFloat_t*);\r\n\r\n\r\n#endif // include guard\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserDef.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n#ifndef MUP_DEF_H\r\n#define MUP_DEF_H\r\n\r\n#include <iostream>\r\n#include <string>\r\n#include <sstream>\r\n#include <map>\r\n\r\n#include \"muParserFixes.h\"\r\n\r\n/** \\file\r\n    \\brief This file contains standard definitions used by the parser.\r\n*/\r\n\r\n/** \\brief Define the base datatype for values.\r\n\r\n  This datatype must be a built in value type. You can not use custom classes.\r\n  It has been tested with float, double and long double types, int should\r\n  work as well.\r\n*/\r\n#define MUP_BASETYPE double\r\n\r\n/** \\brief Definition of the basic bytecode datatype.\r\n\r\n  This defines the smalles entity used in the bytecode.\r\n*/\r\n#define MUP_BYTECODE_TYPE long\r\n\r\n#if defined(_UNICODE)\r\n  /** \\brief Definition of the basic parser string type. */\r\n  #define MUP_STRING_TYPE std::wstring\r\n\r\n  #if !defined(_T)\r\n    #define _T(x) L##x\r\n  #endif // not defined _T\r\n#else\r\n  #ifndef _T\r\n  #define _T\r\n  #endif\r\n  \r\n  /** \\brief Definition of the basic parser string type. */\r\n  #define MUP_STRING_TYPE std::string\r\n#endif\r\n\r\n#if defined(_DEBUG)\r\n  /** \\brief Debug macro to force an abortion of the programm with a certain message.\r\n  */\r\n  #define MUP_FAIL(MSG)    \\\r\n          bool MSG=false;  \\\r\n          assert(MSG);\r\n\r\n  #ifndef _UNICODE\r\n    /** \\brief An assertion that does not kill the program.\r\n\r\n        This macro is neutralised in UNICODE builds. It's\r\n        too difficult to translate.\r\n    */\r\n    #define MUP_ASSERT(COND)                         \\\r\n            if (!(COND))                             \\\r\n            {                                        \\\r\n              stringstream_type ss;                  \\\r\n              ss << \"Assertion \\\"\"#COND\"\\\" failed: \" \\\r\n                 << __FILE__ << \" line \"             \\\r\n                 << __LINE__ << \".\";                 \\\r\n              throw ParserError( ss.str() );         \\\r\n            }\r\n  #else\r\n    #define MUP_ASSERT(COND)\r\n  #endif // _UNICODE\r\n#else\r\n  #define MUP_FAIL(MSG)\r\n  #define MUP_ASSERT(COND)\r\n#endif\r\n\r\n//------------------------------------------------------------------------------\r\n//\r\n// do not change anything beyond this point...\r\n//\r\n// !!! This section is devoted to macros that are used for debugging\r\n// !!! or for features that are not fully implemented yet.\r\n//\r\n//#define MUP_DUMP_STACK\r\n//#define MUP_DUMP_CMDCODE\r\n\r\n\r\nnamespace mu\r\n{\r\n#if defined(_UNICODE)\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Encapsulate wcout. */\r\n  inline std::wostream& console()\r\n  {\r\n    return std::wcout;\r\n  }\r\n\r\n  /** \\brief Encapsulate cin. */\r\n  inline std::wistream& console_in()\r\n  {\r\n    return std::wcin;\r\n  }\r\n\r\n#else\r\n\r\n  /** \\brief Encapsulate cout. \r\n  \r\n    Used for supporting UNICODE more easily.\r\n  */\r\n  inline std::ostream& console()\r\n  {\r\n    return std::cout;\r\n  }\r\n\r\n  /** \\brief Encapsulate cin. \r\n\r\n    Used for supporting UNICODE more easily.\r\n  */\r\n  inline std::istream& console_in()\r\n  {\r\n    return std::cin;\r\n  }\r\n\r\n#endif\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Bytecode values.\r\n\r\n      \\attention The order of the operator entries must match the order in ParserBase::c_DefaultOprt!\r\n  */\r\n  enum ECmdCode\r\n  {\r\n    // The following are codes for built in binary operators\r\n    // apart from built in operators the user has the opportunity to\r\n    // add user defined operators.\r\n    cmLE            = 0,   ///< Operator item:  less or equal\r\n    cmGE            = 1,   ///< Operator item:  greater or equal\r\n    cmNEQ           = 2,   ///< Operator item:  not equal\r\n    cmEQ            = 3,   ///< Operator item:  equals\r\n    cmLT            = 4,   ///< Operator item:  less than\r\n    cmGT            = 5,   ///< Operator item:  greater than\r\n    cmADD           = 6,   ///< Operator item:  add\r\n    cmSUB           = 7,   ///< Operator item:  subtract\r\n    cmMUL           = 8,   ///< Operator item:  multiply\r\n    cmDIV           = 9,   ///< Operator item:  division\r\n    cmPOW           = 10,  ///< Operator item:  y to the power of ...\r\n    cmAND           = 11,  ///< Operator item:  logical and\r\n    cmOR            = 12,  ///< Operator item:  logical or\r\n    cmXOR           = 13,  ///< Operator item:  logical xor\r\n    cmASSIGN        = 14,  ///< Operator item:  Assignment operator\r\n    cmBO            = 15,  ///< Operator item:  opening bracket\r\n    cmBC            = 16,  ///< Operator item:  closing bracket\r\n    cmARG_SEP,             ///< function argument separator\r\n    cmVAR,                 ///< variable item\r\n    cmVAL,                 ///< value item\r\n    cmFUNC,                ///< Code for a function item\r\n    cmFUNC_STR,            ///< Code for a function with a string parameter\r\n    cmSTRING,              ///< Code for a string token\r\n    cmOPRT_BIN,            ///< user defined binary operator\r\n    cmOPRT_POSTFIX,        ///< code for postfix operators\r\n    cmOPRT_INFIX,          ///< code for infix operators\r\n    cmEND,                 ///< end of formula\r\n    cmUNKNOWN,             ///< uninitialized item\r\n  };\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Types internally used by the parser.\r\n  */\r\n  enum ETypeCode\r\n  {\r\n    tpSTR  = 0,     ///< String type (Function arguments and constants only, no string variables)\r\n    tpDBL  = 1,     ///< Floating point variables\r\n    tpVOID = 2      ///< Undefined type.\r\n  };\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Parser operator precedence values. */\r\n  enum EPrec\r\n  {\r\n    // binary operators\r\n    prLOGIC   = 1,  ///< logic operators\r\n    prCMP     = 2,  ///< comparsion operators\r\n    prADD_SUB = 3,  ///< addition\r\n    prMUL_DIV = 4,  ///< multiplication/division\r\n    prPOW     = 5,  ///< power operator priority (highest)\r\n\r\n    // infix operators\r\n    prINFIX    = 4, ///< Signs have a higher priority than ADD_SUB, but lower than power operator\r\n    prPOSTFIX  = 4  ///< Postfix operator priority (currently unused)\r\n  };\r\n\r\n  //------------------------------------------------------------------------------\r\n  // basic types\r\n\r\n  /** \\brief The numeric datatype used by the parser. \r\n  \r\n    Normally this is a floating point type either single or double precision.\r\n  */\r\n  typedef MUP_BASETYPE value_type;\r\n\r\n  /** \\brief The stringtype used by the parser. \r\n\r\n    Depends on wether UNICODE is used or not.\r\n  */\r\n  typedef MUP_STRING_TYPE string_type;\r\n\r\n  /** \\brief The bytecode type used by the parser. \r\n  \r\n    The bytecode type depends on the value_type.\r\n  */\r\n  typedef MUP_BYTECODE_TYPE bytecode_type;\r\n\r\n  /** \\brief The character type used by the parser. \r\n  \r\n    Depends on wether UNICODE is used or not.\r\n  */\r\n  typedef string_type::value_type char_type;\r\n\r\n  /** \\brief Typedef for easily using stringstream that respect the parser stringtype. */\r\n  typedef std::basic_stringstream<char_type,\r\n                                  std::char_traits<char_type>,\r\n                                  std::allocator<char_type> > stringstream_type;\r\n\r\n  // Data container types\r\n\r\n  /** \\brief Type used for storing variables. */\r\n  typedef std::map<string_type, value_type*> varmap_type;\r\n  \r\n  /** \\brief Type used for storing constants. */\r\n  typedef std::map<string_type, value_type> valmap_type;\r\n  \r\n  /** \\brief Type for assigning a string name to an index in the internal string table. */\r\n  typedef std::map<string_type, std::size_t> strmap_type;\r\n\r\n  // Parser callbacks\r\n  \r\n  /** \\brief Callback type used for functions without arguments. */\r\n  typedef value_type (*fun_type0)();\r\n\r\n  /** \\brief Callback type used for functions with a single arguments. */\r\n  typedef value_type (*fun_type1)(value_type);\r\n\r\n  /** \\brief Callback type used for functions with two arguments. */\r\n  typedef value_type (*fun_type2)(value_type, value_type);\r\n\r\n  /** \\brief Callback type used for functions with three arguments. */\r\n  typedef value_type (*fun_type3)(value_type, value_type, value_type);\r\n\r\n  /** \\brief Callback type used for functions with four arguments. */\r\n  typedef value_type (*fun_type4)(value_type, value_type, value_type, value_type);\r\n\r\n  /** \\brief Callback type used for functions with five arguments. */\r\n  typedef value_type (*fun_type5)(value_type, value_type, value_type, value_type, value_type);\r\n\r\n  /** \\brief Callback type used for functions with a variable argument list. */\r\n  typedef value_type (*multfun_type)(const value_type*, int);\r\n\r\n  /** \\brief Callback type used for functions taking a string as an argument. */\r\n  typedef value_type (*strfun_type1)(const char_type*);\r\n\r\n  /** \\brief Callback type used for functions taking a string and a value as arguments. */\r\n  typedef value_type (*strfun_type2)(const char_type*, value_type);\r\n\r\n  /** \\brief Callback type used for functions taking a string and two values as arguments. */\r\n  typedef value_type (*strfun_type3)(const char_type*, value_type, value_type);\r\n\r\n  /** \\brief Callback used for functions that identify values in a string. */\r\n  typedef int (*identfun_type)(const char_type *sExpr, int *nPos, value_type *fVal);\r\n\r\n  /** \\brief Callback used for variable creation factory functions. */\r\n  typedef value_type* (*facfun_type)(const char_type*, void*);\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Static type checks\r\n    \r\n     I took the static assert from boost, but did not want to \r\n     add boost as a dependency to this project. For the original go to:\r\n  \r\n     http://www.boost.org/doc/html/boost_staticassert.html\r\n  */\r\n  template <bool> struct STATIC_ASSERTION_FAILURE;\r\n  template <> struct STATIC_ASSERTION_FAILURE<true> {};\r\n\r\n  /** \\brief This is a static typecheck.\r\n      \r\n      If you get a compiler error here you tried to use an unsigned bytecode map type!\r\n  */\r\n  typedef char MAP_TYPE_CANT_BE_UNSIGNED[ sizeof( STATIC_ASSERTION_FAILURE< bytecode_type(-1)<0 >) ];\r\n} // end fo namespace\r\n\r\n#endif\r\n\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserError.cpp",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n#include \"muParserError.h\"\r\n\r\n\r\nnamespace mu\r\n{\r\n  const ParserErrorMsg ParserErrorMsg::m_Instance;\r\n\r\n  //------------------------------------------------------------------------------\r\n  const ParserErrorMsg& ParserErrorMsg::Instance()\r\n  {\r\n    return m_Instance;\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  string_type ParserErrorMsg::operator[](unsigned a_iIdx) const\r\n  {\r\n    return (a_iIdx<m_vErrMsg.size()) ? m_vErrMsg[a_iIdx] : string_type();\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserErrorMsg::~ParserErrorMsg()\r\n  {}\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Assignement operator is deactivated.\r\n  */\r\n  ParserErrorMsg& ParserErrorMsg::operator=(const ParserErrorMsg& )\r\n  {\r\n    assert(false);\r\n    return *this;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserErrorMsg::ParserErrorMsg(const ParserErrorMsg&)\r\n  {}\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserErrorMsg::ParserErrorMsg()\r\n    :m_vErrMsg(0)\r\n  {\r\n    m_vErrMsg.resize(ecCOUNT);\r\n\r\n    m_vErrMsg[ecUNASSIGNABLE_TOKEN]  = _T(\"Undefined token \\\"$TOK$\\\" found at position $POS$.\");\r\n    m_vErrMsg[ecINTERNAL_ERROR]      = _T(\"Internal error\");\r\n    m_vErrMsg[ecINVALID_NAME]        = _T(\"Invalid function-, variable- or constant name.\");\r\n    m_vErrMsg[ecINVALID_FUN_PTR]     = _T(\"Invalid pointer to callback function.\");\r\n    m_vErrMsg[ecEMPTY_EXPRESSION]    = _T(\"Expression is empty.\");\r\n    m_vErrMsg[ecINVALID_VAR_PTR]     = _T(\"Invalid pointer to variable.\");\r\n    m_vErrMsg[ecUNEXPECTED_OPERATOR] = _T(\"Unexpected operator \\\"$TOK$\\\" found at position $POS$\");\r\n    m_vErrMsg[ecUNEXPECTED_EOF]      = _T(\"Unexpected end of formula at position $POS$\");\r\n    m_vErrMsg[ecUNEXPECTED_ARG_SEP]  = _T(\"Unexpected argument separator at position $POS$\");\r\n    m_vErrMsg[ecUNEXPECTED_PARENS]   = _T(\"Unexpected parenthesis \\\"$TOK$\\\" at position $POS$\");\r\n    m_vErrMsg[ecUNEXPECTED_FUN]      = _T(\"Unexpected function \\\"$TOK$\\\" at position $POS$\");\r\n    m_vErrMsg[ecUNEXPECTED_VAL]      = _T(\"Unexpected value \\\"$TOK$\\\" found at position $POS$\");\r\n    m_vErrMsg[ecUNEXPECTED_VAR]      = _T(\"Unexpected variable \\\"$TOK$\\\" found at position $POS$\");\r\n    m_vErrMsg[ecUNEXPECTED_ARG]      = _T(\"Function arguments used without a function (position: $POS$)\");\r\n    m_vErrMsg[ecMISSING_PARENS]      = _T(\"Missing parenthesis\");\r\n    m_vErrMsg[ecTOO_MANY_PARAMS]     = _T(\"Too many parameters for function \\\"$TOK$\\\" at formula position $POS$\");\r\n    m_vErrMsg[ecTOO_FEW_PARAMS]      = _T(\"Too few parameters for function \\\"$TOK$\\\" at formula position $POS$\");\r\n    m_vErrMsg[ecDIV_BY_ZERO]         = _T(\"Divide by zero\");\r\n    m_vErrMsg[ecDOMAIN_ERROR]        = _T(\"Domain error\");\r\n    m_vErrMsg[ecNAME_CONFLICT]       = _T(\"Name conflict\");\r\n    m_vErrMsg[ecOPT_PRI]             = _T(\"Invalid value for operator priority (must be greater or equal to zero).\");\r\n    m_vErrMsg[ecBUILTIN_OVERLOAD]    = _T(\"user defined binary operator \\\"$TOK$\\\" conflicts with a built in operator.\");\r\n    m_vErrMsg[ecUNEXPECTED_STR]      = _T(\"Unexpected string token found at position $POS$.\");\r\n    m_vErrMsg[ecUNTERMINATED_STRING] = _T(\"Unterminated string starting at position $POS$.\");\r\n    m_vErrMsg[ecSTRING_EXPECTED]     = _T(\"String function called with a non string type of argument.\");\r\n    m_vErrMsg[ecVAL_EXPECTED]        = _T(\"String value used where a numerical argument is expected.\");\r\n    m_vErrMsg[ecOPRT_TYPE_CONFLICT]  = _T(\"No suitable overload for operator \\\"$TOK$\\\" at position $POS$.\");\r\n    m_vErrMsg[ecGENERIC]             = _T(\"Parser error.\");\r\n    m_vErrMsg[ecLOCALE]              = _T(\"Decimal separator is identic to function argument separator.\");\r\n    m_vErrMsg[ecSTR_RESULT]          = _T(\"Function result is a string.\");\r\n\r\n    #if defined(_DEBUG)\r\n      for (int i=0; i<ecCOUNT; ++i)\r\n        if (!m_vErrMsg[i].length())\r\n          assert(false);\r\n    #endif\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  //\r\n  //\r\n  //\r\n  //  ParserError class\r\n  //\r\n  //\r\n  //\r\n  //---------------------------------------------------------------------------\r\n\r\n  /** \\brief Default constructor. */\r\n  ParserError::ParserError()\r\n    :m_strMsg()\r\n    ,m_strFormula()\r\n    ,m_strTok()\r\n    ,m_iPos(-1)\r\n    ,m_iErrc(ecUNDEFINED)\r\n    ,m_ErrMsg(ParserErrorMsg::Instance())\r\n  {\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief This Constructor is used for internal exceptions only. \r\n      \r\n    It does not contain any information but the error code.\r\n  */\r\n  ParserError::ParserError(EErrorCodes /*a_iErrc*/) \r\n    :m_ErrMsg(ParserErrorMsg::Instance())\r\n  {\r\n    Reset();\r\n    m_strMsg = _T(\"parser error\");\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Construct an error from a message text. */\r\n  ParserError::ParserError(const string_type &sMsg) \r\n    :m_ErrMsg(ParserErrorMsg::Instance())\r\n  {\r\n    Reset();\r\n    m_strMsg = sMsg;\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Construct an error object. \r\n      \\param [in] iErrc the error code.\r\n      \\param [in] sTok The token string related to this error.\r\n      \\param [in] sExpr The expression related to the error.\r\n      \\param [in] iPos the position in the expression where the error occurred.\r\n  */\r\n  ParserError::ParserError( EErrorCodes iErrc,\r\n                            const string_type &sTok,\r\n                            const string_type &sExpr,\r\n                            int iPos )\r\n    :m_strMsg()\r\n    ,m_strFormula(sExpr)\r\n    ,m_strTok(sTok)\r\n    ,m_iPos(iPos)\r\n    ,m_iErrc(iErrc)\r\n    ,m_ErrMsg(ParserErrorMsg::Instance())\r\n  {\r\n    m_strMsg = m_ErrMsg[m_iErrc];\r\n    stringstream_type stream;\r\n    stream << (int)m_iPos;\r\n    ReplaceSubString(m_strMsg, _T(\"$POS$\"), stream.str());\r\n    ReplaceSubString(m_strMsg, _T(\"$TOK$\"), m_strTok);\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Construct an error object. \r\n      \\param [in] iErrc the error code.\r\n      \\param [in] iPos the position in the expression where the error occurred.\r\n      \\param [in] sTok The token string related to this error.\r\n  */\r\n  ParserError::ParserError(EErrorCodes iErrc, int iPos, const string_type &sTok) \r\n    :m_strMsg()\r\n    ,m_strFormula()\r\n    ,m_strTok(sTok)\r\n    ,m_iPos(iPos)\r\n    ,m_iErrc(iErrc)\r\n    ,m_ErrMsg(ParserErrorMsg::Instance())\r\n  {\r\n    m_strMsg = m_ErrMsg[m_iErrc];\r\n    stringstream_type stream;\r\n    stream << (int)m_iPos;\r\n    ReplaceSubString(m_strMsg, _T(\"$POS$\"), stream.str());\r\n    ReplaceSubString(m_strMsg, _T(\"$TOK$\"), m_strTok);\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Construct an error object. \r\n      \\param [in] szMsg The error message text.\r\n      \\param [in] iPos the position related to the error.\r\n      \\param [in] sTok The token string related to this error.\r\n  */\r\n  ParserError::ParserError(const char_type *szMsg, int iPos, const string_type &sTok) \r\n    :m_strMsg(szMsg)\r\n    ,m_strFormula()\r\n    ,m_strTok(sTok)\r\n    ,m_iPos(iPos)\r\n    ,m_iErrc(ecGENERIC)\r\n    ,m_ErrMsg(ParserErrorMsg::Instance())\r\n  {\r\n    stringstream_type stream;\r\n    stream << (int)m_iPos;\r\n    ReplaceSubString(m_strMsg, _T(\"$POS$\"), stream.str());\r\n    ReplaceSubString(m_strMsg, _T(\"$TOK$\"), m_strTok);\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Copy constructor. */\r\n  ParserError::ParserError(const ParserError &a_Obj)\r\n    :m_strMsg(a_Obj.m_strMsg)\r\n    ,m_strFormula(a_Obj.m_strFormula)\r\n    ,m_strTok(a_Obj.m_strTok)\r\n    ,m_iPos(a_Obj.m_iPos)\r\n    ,m_iErrc(a_Obj.m_iErrc)\r\n    ,m_ErrMsg(ParserErrorMsg::Instance())\r\n  {\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Assignment operator. */\r\n  ParserError& ParserError::operator=(const ParserError &a_Obj)\r\n  {\r\n    if (this==&a_Obj)\r\n      return *this;\r\n\r\n    m_strMsg = a_Obj.m_strMsg;\r\n    m_strFormula = a_Obj.m_strFormula;\r\n    m_strTok = a_Obj.m_strTok;\r\n    m_iPos = a_Obj.m_iPos;\r\n    m_iErrc = a_Obj.m_iErrc;\r\n    return *this;\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  ParserError::~ParserError()\r\n  {}\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Replace all ocuurences of a substring with another string. \r\n      \\param strFind The string that shall be replaced.\r\n      \\param strReplaceWith The string that should be inserted instead of strFind\r\n  */\r\n  void ParserError::ReplaceSubString( string_type &strSource,\r\n                                      const string_type &strFind,\r\n                                      const string_type &strReplaceWith)\r\n  {\r\n    string_type strResult;\r\n    string_type::size_type iPos(0), iNext(0);\r\n\r\n    for(;;)\r\n    {\r\n      iNext = strSource.find(strFind, iPos);\r\n      strResult.append(strSource, iPos, iNext-iPos);\r\n\r\n      if( iNext==string_type::npos )\r\n        break;\r\n\r\n      strResult.append(strReplaceWith);\r\n      iPos = iNext + strFind.length();\r\n    } \r\n\r\n    strSource.swap(strResult);\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Reset the erro object. */\r\n  void ParserError::Reset()\r\n  {\r\n    m_strMsg = _T(\"\");\r\n    m_strFormula = _T(\"\");\r\n    m_strTok = _T(\"\");\r\n    m_iPos = -1;\r\n    m_iErrc = ecUNDEFINED;\r\n  }\r\n      \r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Set the expression related to this error. */\r\n  void ParserError::SetFormula(const string_type &a_strFormula)\r\n  {\r\n    m_strFormula = a_strFormula;\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief gets the expression related tp this error.*/\r\n  const string_type& ParserError::GetExpr() const \r\n  {\r\n    return m_strFormula;\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Returns the message string for this error. */\r\n  const string_type& ParserError::GetMsg() const\r\n  {\r\n    return m_strMsg;\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Return the formula position related to the error. \r\n\r\n    If the error is not related to a distinct position this will return -1\r\n  */\r\n  std::size_t ParserError::GetPos() const\r\n  {\r\n    return m_iPos;\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Return string related with this token (if available). */\r\n  const string_type& ParserError::GetToken() const\r\n  {\r\n    return m_strTok;\r\n  }\r\n\r\n  //------------------------------------------------------------------------------\r\n  /** \\brief Return the error code. */\r\n  EErrorCodes ParserError::GetCode() const\r\n  {\r\n    return m_iErrc;\r\n  }\r\n} // namespace mu\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserError.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#ifndef MU_PARSER_ERROR_H\r\n#define MU_PARSER_ERROR_H\r\n\r\n#include <cassert>\r\n#include <stdexcept>\r\n#include <string>\r\n#include <sstream>\r\n#include <vector>\r\n#include <memory>\r\n\r\n#include \"muParserDef.h\"\r\n\r\n/** \\file \r\n    \\brief This file defines the error class used by the parser.\r\n*/\r\n\r\nnamespace mu\r\n{\r\n\r\n/** \\brief Error codes. */\r\nenum EErrorCodes\r\n{\r\n  // Formula syntax errors\r\n  ecUNEXPECTED_OPERATOR = 0,  ///< Unexpected binary operator found\r\n  ecUNASSIGNABLE_TOKEN  = 1,  ///< Token cant be identified.\r\n  ecUNEXPECTED_EOF      = 2,  ///< Unexpected end of formula. (Example: \"2+sin(\")\r\n  ecUNEXPECTED_ARG_SEP  = 3,  ///< An unexpected comma has been found. (Example: \"1,23\")\r\n  ecUNEXPECTED_ARG      = 4,  ///< An unexpected argument has been found\r\n  ecUNEXPECTED_VAL      = 5,  ///< An unexpected value token has been found\r\n  ecUNEXPECTED_VAR      = 6,  ///< An unexpected variable token has been found\r\n  ecUNEXPECTED_PARENS   = 7,  ///< Unexpected Parenthesis, opening or closing\r\n  ecUNEXPECTED_STR      = 8,  ///< A string has been found at an inapropriate position\r\n  ecSTRING_EXPECTED     = 9,  ///< A string function has been called with a different type of argument\r\n  ecVAL_EXPECTED        = 10, ///< A numerical function has been called with a non value type of argument\r\n  ecMISSING_PARENS      = 11, ///< Missing parens. (Example: \"3*sin(3\")\r\n  ecUNEXPECTED_FUN      = 12, ///< Unexpected function found. (Example: \"sin(8)cos(9)\")\r\n  ecUNTERMINATED_STRING = 13, ///< unterminated string constant. (Example: \"3*valueof('hello')\")\r\n  ecTOO_MANY_PARAMS     = 14, ///< Too many function parameters\r\n  ecTOO_FEW_PARAMS      = 15, ///< Too few function parameters. (Example: \"ite(1<2,2)\")\r\n  ecOPRT_TYPE_CONFLICT  = 16, ///< binary operators may only be applied to value items of the same type\r\n  ecSTR_RESULT          = 17, ///< result is a string\r\n\r\n  // Invalid Parser input Parameters\r\n  ecINVALID_NAME        = 18, ///< Invalid function, variable or constant name.\r\n  ecBUILTIN_OVERLOAD    = 19, ///< Trying to overload builtin operator\r\n  ecINVALID_FUN_PTR     = 20, ///< Invalid callback function pointer \r\n  ecINVALID_VAR_PTR     = 21, ///< Invalid variable pointer \r\n  ecEMPTY_EXPRESSION    = 22, ///< The Expression is empty\r\n  ecNAME_CONFLICT       = 23, ///< Name conflict\r\n  ecOPT_PRI             = 24, ///< Invalid operator priority\r\n  // \r\n  ecDOMAIN_ERROR        = 25, ///< catch division by zero, sqrt(-1), log(0) (currently unused)\r\n  ecDIV_BY_ZERO         = 26, ///< Division by zero (currently unused)\r\n  ecGENERIC             = 27, ///< Generic error\r\n  ecLOCALE              = 28, ///< Conflict with current locale\r\n\r\n  // internal errors\r\n  ecINTERNAL_ERROR      = 29, ///< Internal error of any kind.\r\n\r\n  // The last two are special entries \r\n  ecCOUNT,                    ///< This is no error code, It just stores just the total number of error codes\r\n  ecUNDEFINED           = -1  ///< Undefined message, placeholder to detect unassigned error messages\r\n};\r\n\r\n//---------------------------------------------------------------------------\r\n/** \\brief A class that handles the error messages.\r\n*/\r\nclass ParserErrorMsg\r\n{\r\npublic:\r\n    typedef ParserErrorMsg self_type;\r\n\r\n    ParserErrorMsg& operator=(const ParserErrorMsg &);\r\n    ParserErrorMsg(const ParserErrorMsg&);\r\n    ParserErrorMsg();\r\n\r\n   ~ParserErrorMsg();\r\n\r\n    static const ParserErrorMsg& Instance();\r\n    string_type operator[](unsigned a_iIdx) const;\r\n\r\nprivate:\r\n    std::vector<string_type>  m_vErrMsg;  ///< A vector with the predefined error messages\r\n    static const self_type m_Instance;    ///< The instance pointer\r\n};\r\n\r\n//---------------------------------------------------------------------------\r\n/** \\brief Error class of the parser. \r\n\r\n  Part of the math parser package.\r\n\r\n  \\author Ingo Berg\r\n*/\r\n/* final */ class ParserError\r\n{\r\nprivate:\r\n    //------------------------------------------------------------------------------\r\n    /** \\brief Replace all ocuurences of a substring with another string. */\r\n    void ReplaceSubString( string_type &strSource, \r\n                           const string_type &strFind,\r\n                           const string_type &strReplaceWith);\r\n    void Reset();\r\n\r\npublic:\r\n    ParserError();\r\n    explicit ParserError(EErrorCodes a_iErrc);\r\n    explicit ParserError(const string_type &sMsg);\r\n    ParserError( EErrorCodes a_iErrc,\r\n                 const string_type &sTok,\r\n                 const string_type &sFormula = string_type(_T(\"(formula is not available)\")),\r\n                 int a_iPos = -1);\r\n    ParserError( EErrorCodes a_iErrc, \r\n                 int a_iPos, \r\n                 const string_type &sTok);\r\n    ParserError( const char_type *a_szMsg, \r\n                 int a_iPos = -1, \r\n                 const string_type &sTok = string_type());\r\n    ParserError(const ParserError &a_Obj);\r\n    ParserError& operator=(const ParserError &a_Obj);\r\n   ~ParserError();\r\n\r\n    void SetFormula(const string_type &a_strFormula);\r\n    const string_type& GetExpr() const;\r\n    const string_type& GetMsg() const;\r\n    std::size_t GetPos() const;\r\n    const string_type& GetToken() const;\r\n    EErrorCodes GetCode() const;\r\n\r\nprivate:\r\n    string_type m_strMsg;     ///< The message string\r\n    string_type m_strFormula; ///< Formula string\r\n    string_type m_strTok;     ///< Token related with the error\r\n    int m_iPos;               ///< Formula position related to the error \r\n    EErrorCodes m_iErrc;      ///< Error code\r\n    const ParserErrorMsg &m_ErrMsg;\r\n};\t\t\r\n\r\n} // namespace mu\r\n\r\n#endif\r\n\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserFixes.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#ifndef MU_PARSER_FIXES_H\r\n#define MU_PARSER_FIXES_H\r\n\r\n/** \\file\r\n    \\brief This file contains compatibility fixes for some platforms.\r\n*/\r\n\r\n//\r\n// Compatibility fixes\r\n//\r\n\r\n//---------------------------------------------------------------------------\r\n//\r\n// Intel Compiler\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\n#ifdef __INTEL_COMPILER\r\n\r\n// remark #981: operands are evaluated in unspecified order\r\n// disabled -> completely pointless if the functions do not have side effects\r\n//\r\n#pragma warning(disable:981)\r\n\r\n// remark #383: value copied to temporary, reference to temporary used\r\n#pragma warning(disable:383)\r\n\r\n// remark #1572: floating-point equality and inequality comparisons are unreliable\r\n// disabled -> everyone knows it, the parser passes this problem\r\n//             deliberately to the user\r\n#pragma warning(disable:1572)\r\n\r\n#endif\r\n\r\n\r\n//---------------------------------------------------------------------------\r\n//\r\n// MSVC6\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\n\r\n#if defined(_MSC_VER) && _MSC_VER==1200\r\n\r\n#error \"NOW USING UNIQUE_PTR\"\r\n\r\n/** \\brief Macro to replace the MSVC6 auto_ptr with the _my_auto_ptr class.\r\n\r\n    Hijack auto_ptr and replace it with a version that actually does\r\n    what an auto_ptr normally does. If you use std::auto_ptr in your other code\r\n    might either explode or work much better. The original crap created\r\n    by Microsoft, called auto_ptr and bundled with MSVC6 is not standard compliant.\r\n*/\r\n#define auto_ptr _my_auto_ptr\r\n\r\n// This is another stupidity that needs to be undone in order to de-pollute\r\n// the global namespace!\r\n#undef min\r\n#undef max\r\n\r\n\r\nnamespace std\r\n{\r\n  typedef ::size_t size_t;\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief MSVC6 fix: Dummy function to put rand into namespace std.\r\n\r\n    This is a hack for MSVC6 only. It's dirty, it's ugly and it works, provided\r\n    inlining is enabled. Necessary because I will not pollute or change my\r\n    code in order to adopt it to MSVC6 interpretation of how C++ should look like!\r\n  */\r\n  inline int rand(void)\r\n  {\r\n    return ::rand();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief MSVC6 fix: Dummy function to put strlen into namespace std.\r\n\r\n    This is a hack for MSVC6 only. It's dirty, it's ugly and it works, provided\r\n    inlining is enabled. Necessary because I will not pollute or change my\r\n    code in order to adopt it to MSVC6 interpretation of how C++ should look like!\r\n  */\r\n  inline size_t strlen(const char *szMsg)\r\n  {\r\n    return ::strlen(szMsg);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief MSVC6 fix: Dummy function to put strncmp into namespace std.\r\n\r\n    This is a hack for MSVC6 only. It's dirty, it's ugly and it works, provided\r\n    inlining is enabled. Necessary because I will not pollute or change my\r\n    code in order to adopt it to MSVC6 interpretation of how C++ should look like!\r\n  */\r\n  inline int strncmp(const char *a, const char *b, size_t len)\r\n  {\r\n    return ::strncmp(a,b,len);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  template<typename T>\r\n  T max(T a, T b)\r\n  {\r\n    return (a>b) ? a : b;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  template<typename T>\r\n  T min(T a, T b)\r\n  {\r\n    return (a<b) ? a : b;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** Standard compliant auto_ptr redefinition for MSVC6.\r\n\r\n    The code is taken from VS.NET 2003, slightly modified to reduce\r\n    it's dependencies from other classes.\r\n  */\r\n  template<class _Ty>\r\n  class _my_auto_ptr\r\n  {\r\n  public:\r\n    typedef _Ty element_type;\r\n\r\n\t  explicit _my_auto_ptr(_Ty *_Ptr = 0)\r\n\t    :_Myptr(_Ptr)\r\n\t  {}\r\n\r\n\t  _my_auto_ptr(_my_auto_ptr<_Ty>& _Right)\r\n\t    :_Myptr(_Right.release())\r\n\t  {}\r\n\r\n\t  template<class _Other>\r\n    operator _my_auto_ptr<_Other>()\r\n\t  {\r\n      return (_my_auto_ptr<_Other>(*this));\r\n\t  }\r\n\r\n\t  template<class _Other>\r\n\t  _my_auto_ptr<_Ty>& operator=(_my_auto_ptr<_Other>& _Right)\r\n\t  {\r\n      reset(_Right.release());\r\n\t    return (*this);\r\n\t  }\r\n\r\n\t ~auto_ptr()              { delete _Myptr;    }\r\n\t  _Ty& operator*() const  { return (*_Myptr); }\r\n\t  _Ty *operator->() const\t{ return (&**this);\t}\r\n\t  _Ty *get() const        { return (_Myptr);\t}\r\n\r\n    _Ty *release()\r\n    {\r\n\t\t  _Ty *_Tmp = _Myptr;\r\n\t\t  _Myptr = 0;\r\n\t\t  return (_Tmp);\r\n\t\t}\r\n\r\n\t  void reset(_Ty* _Ptr = 0)\r\n\t\t{\r\n\t\t  if (_Ptr != _Myptr)\r\n\t\t\t  delete _Myptr;\r\n\t\t  _Myptr = _Ptr;\r\n    }\r\n\r\n  private:\r\n\t    _Ty *_Myptr;\r\n\t}; // class _my_auto_ptr\r\n} // namespace std\r\n\r\n#endif // Microsoft Visual Studio Version 6.0\r\n\r\n#endif // include guard\r\n\r\n\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserInt.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#ifndef MU_PARSER_INT_H\r\n#define MU_PARSER_INT_H\r\n\r\n#include \"muParserBase.h\"\r\n#include <vector>\r\n\r\n/** \\file\r\n    \\brief Definition of a parser using integer value.\r\n*/\r\n\r\n\r\nnamespace mu\r\n{\r\n\r\n/** \\brief Mathematical expressions parser.\r\n  \r\n  This version of the parser handles only integer numbers. It disables the built in operators thus it is \r\n  slower than muParser. Integer values are stored in the double value_type and converted if needed.\r\n*/\r\nclass ParserInt : public ParserBase\r\n{\r\nprivate:\r\n    static int  Round(value_type v) { return (int)(v + ((v>=0) ? 0.5 : -0.5) ); };\r\n  \r\n    static value_type  Abs(value_type);\r\n\t  static value_type  Sign(value_type);\r\n    static value_type  Ite(value_type, value_type, value_type);\r\n    // !! The unary Minus is a MUST, otherwise you cant use negative signs !!\r\n    static value_type  UnaryMinus(value_type);\r\n    // Functions with variable number of arguments\r\n    static value_type  Sum(const value_type* a_afArg, int a_iArgc);  // sum\r\n    static value_type  Min(const value_type* a_afArg, int a_iArgc);  // minimum\r\n    static value_type  Max(const value_type* a_afArg, int a_iArgc);  // maximum\r\n    // binary operator callbacks\r\n    static value_type  Add(value_type v1, value_type v2);\r\n    static value_type  Sub(value_type v1, value_type v2);\r\n    static value_type  Mul(value_type v1, value_type v2);\r\n    static value_type  Div(value_type v1, value_type v2);\r\n    static value_type  Mod(value_type v1, value_type v2);\r\n    static value_type  Shr(value_type v1, value_type v2);\r\n    static value_type  Shl(value_type v1, value_type v2);\r\n    static value_type  LogAnd(value_type v1, value_type v2);\r\n    static value_type  LogOr(value_type v1, value_type v2);\r\n    static value_type  LogXor(value_type v1, value_type v2);\r\n    static value_type  And(value_type v1, value_type v2);\r\n    static value_type  Or(value_type v1, value_type v2);\r\n    static value_type  Xor(value_type v1, value_type v2);\r\n    static value_type  Less(value_type v1, value_type v2);\r\n    static value_type  Greater(value_type v1, value_type v2);\r\n    static value_type  LessEq(value_type v1, value_type v2);\r\n    static value_type  GreaterEq(value_type v1, value_type v2);\r\n    static value_type  Equal(value_type v1, value_type v2);\r\n    static value_type  NotEqual(value_type v1, value_type v2);\r\n    static value_type  Not(value_type v1);\r\n\r\n    static int IsHexVal(const char_type* a_szExpr, int *a_iPos, value_type *a_iVal);\r\n    static int IsBinVal(const char_type* a_szExpr, int *a_iPos, value_type *a_iVal);\r\n    static int IsVal   (const char_type* a_szExpr, int *a_iPos, value_type *a_iVal);\r\n\r\npublic:\r\n    ParserInt();\r\n\r\n    virtual void InitFun();\r\n\t  virtual void InitOprt();\r\n    virtual void InitConst();\r\n    virtual void InitCharSets();\r\n};\r\n\r\n} // namespace mu\r\n\r\n#endif\r\n\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserStack.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2006 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#ifndef MU_PARSER_STACK_H\r\n#define MU_PARSER_STACK_H\r\n\r\n#include <cassert>\r\n#include <string>\r\n#include <stack>\r\n#include <vector>\r\n\r\n#include \"muParserError.h\"\r\n#include \"muParserToken.h\"\r\n\r\n/** \\file \r\n    \\brief This file defines the stack used by muparser.\r\n*/\r\n\r\nnamespace mu\r\n{\r\n\r\n  /** \\brief Parser stack implementation. \r\n\r\n      Stack implementation based on a std::stack. The behaviour of pop() had been\r\n      slightly changed in order to get an error code if the stack is empty.\r\n      The stack is used within the Parser both as a value stack and as an operator stack.\r\n\r\n      \\author (C) 2004-2008 Ingo Berg \r\n  */\r\n  template <typename TValueType>\r\n  class ParserStack \r\n  {\r\n    private:\r\n\r\n      /** \\brief Type of the underlying stack implementation. */\r\n      typedef std::stack<TValueType, std::vector<TValueType> > impl_type;\r\n      \r\n      impl_type m_Stack;  ///< This is the actual stack.\r\n\r\n    public:\t\r\n  \t \r\n      //---------------------------------------------------------------------------\r\n      ParserStack()\r\n        :m_Stack()\r\n      {}\r\n\r\n      //---------------------------------------------------------------------------\r\n      virtual ~ParserStack()\r\n      {}\r\n\r\n      //---------------------------------------------------------------------------\r\n      /** \\brief Pop a value from the stack.\r\n       \r\n        Unlike the standard implementation this function will return the value that\r\n        is going to be taken from the stack.\r\n\r\n        \\throw ParserException in case the stack is empty.\r\n        \\sa pop(int &a_iErrc)\r\n      */\r\n\t    TValueType pop()\r\n      {\r\n        if (empty())\r\n          throw ParserError( _T(\"stack is empty.\") );\r\n\r\n        TValueType el = top();\r\n        m_Stack.pop();\r\n        return el;\r\n      }\r\n\r\n      /** \\brief Push an object into the stack. \r\n\r\n          \\param a_Val object to push into the stack.\r\n          \\throw nothrow\r\n      */\r\n      void push(const TValueType& a_Val) \r\n      { \r\n        m_Stack.push(a_Val); \r\n      }\r\n\r\n      /** \\brief Return the number of stored elements. */\r\n      unsigned size() const\r\n      { \r\n        return (unsigned)m_Stack.size(); \r\n      }\r\n\r\n      /** \\brief Returns true if stack is empty false otherwise. */\r\n      bool empty() const\r\n      {\r\n        return m_Stack.size()==0; \r\n      }\r\n       \r\n      /** \\brief Return reference to the top object in the stack. \r\n       \r\n          The top object is the one pushed most recently.\r\n      */\r\n      TValueType& top() \r\n      { \r\n        return m_Stack.top(); \r\n      }\r\n  };\r\n} // namespace MathUtils\r\n\r\n#endif\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserTest.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#ifndef MU_PARSER_TEST_H\r\n#define MU_PARSER_TEST_H\r\n\r\n#include <string>\r\n#include <cstdlib>\r\n#include <numeric> // for accumulate\r\n#include \"muParser.h\"\r\n#include \"muParserInt.h\"\r\n\r\n/** \\file\r\n    \\brief This file contains the parser test class.\r\n*/\r\n\r\nnamespace mu\r\n{\r\n  /** \\brief Namespace for test cases. */\r\n  namespace Test\r\n  {\r\n    //------------------------------------------------------------------------------\r\n    /** \\brief Test cases for unit testing.\r\n\r\n      (C) 2004-2006 Ingo Berg\r\n    */\r\n    class ParserTester // final\r\n    {\r\n    private:\r\n        // Multiarg callbacks\r\n        static value_type f1of1(value_type v) { return v;};\r\n      \t\r\n        static value_type f1of2(value_type v, value_type  ) {return v;};\r\n        static value_type f2of2(value_type  , value_type v) {return v;};\r\n\r\n        static value_type f1of3(value_type v, value_type  , value_type  ) {return v;};\r\n        static value_type f2of3(value_type  , value_type v, value_type  ) {return v;};\r\n        static value_type f3of3(value_type  , value_type  , value_type v) {return v;};\r\n      \t\r\n        static value_type f1of4(value_type v, value_type,   value_type  , value_type  ) {return v;}\r\n        static value_type f2of4(value_type  , value_type v, value_type  , value_type  ) {return v;}\r\n        static value_type f3of4(value_type  , value_type,   value_type v, value_type  ) {return v;}\r\n        static value_type f4of4(value_type  , value_type,   value_type  , value_type v) {return v;}\r\n\r\n\t      static value_type f1of5(value_type v, value_type,   value_type  , value_type  , value_type  ) { return v; }\r\n\t      static value_type f2of5(value_type  , value_type v, value_type  , value_type  , value_type  ) { return v; }\r\n\t      static value_type f3of5(value_type  , value_type,   value_type v, value_type  , value_type  ) { return v; }\r\n\t      static value_type f4of5(value_type  , value_type,   value_type  , value_type v, value_type  ) { return v; }\r\n\t      static value_type f5of5(value_type  , value_type,   value_type  , value_type  , value_type v) { return v; }\r\n\r\n        static value_type Min(value_type a_fVal1, value_type a_fVal2) { return (a_fVal1<a_fVal2) ? a_fVal1 : a_fVal2; }\r\n  \t    static value_type Max(value_type a_fVal1, value_type a_fVal2) { return (a_fVal1>a_fVal2) ? a_fVal1 : a_fVal2; }\r\n\r\n        static value_type plus2(value_type v1) { return v1+2; }\r\n        static value_type times3(value_type v1) { return v1*3; }\r\n        static value_type sqr(value_type v1) { return v1*v1; }\r\n        static value_type sign(value_type v) { return -v; }\r\n\r\n        static value_type FirstArg(const value_type* a_afArg, int a_iArgc)\r\n        {\r\n          if (!a_iArgc)\t\r\n            throw mu::Parser::exception_type( _T(\"too few arguments for function FirstArg.\") );\r\n\r\n          return  a_afArg[0];\r\n        }\r\n\r\n        static value_type LastArg(const value_type* a_afArg, int a_iArgc)\r\n        {\r\n          if (!a_iArgc)\t\r\n            throw mu::Parser::exception_type( _T(\"too few arguments for function LastArg.\") );\r\n\r\n          return  a_afArg[a_iArgc-1];\r\n        }\r\n\r\n        static value_type Sum(const value_type* a_afArg, int a_iArgc)\r\n        { \r\n          if (!a_iArgc)\t\r\n            throw mu::Parser::exception_type( _T(\"too few arguments for function sum.\") );\r\n\r\n          value_type fRes=0;\r\n          for (int i=0; i<a_iArgc; ++i) fRes += a_afArg[i];\r\n          return fRes;\r\n        }\r\n\r\n        static value_type Rnd(value_type v)\r\n        {\r\n          return (value_type)(1+(v*std::rand()/(RAND_MAX+1.0)));\r\n        }\r\n\r\n        static value_type RndWithString(const char_type*)\r\n        {\r\n          return (value_type)( 1 + (1000.0f * std::rand() / (RAND_MAX + 1.0) ) );\r\n        }\r\n\r\n        static value_type Ping()\r\n        { \r\n          return 10; \r\n        }\r\n\r\n        static value_type ValueOf(const char_type*)      \r\n        { \r\n          return 123; \r\n        }\r\n\r\n        static value_type StrFun1(const char_type* v1)                               \r\n        { \r\n          int val(0);\r\n          stringstream_type(v1) >> val;\r\n          return val;\r\n        }\r\n\r\n        static value_type StrFun2(const char_type* v1, value_type v2)                \r\n        { \r\n          int val(0);\r\n          stringstream_type(v1) >> val;\r\n          return val + v2;\r\n        }\r\n        \r\n        static value_type StrFun3(const char_type* v1, value_type v2, value_type v3) \r\n        { \r\n          int val(0);\r\n          stringstream_type(v1) >> val;\r\n          return val + v2 + v3;\r\n        }\r\n\r\n        static value_type StrToFloat(const char_type* a_szMsg)\r\n        {\r\n          double val(0);\r\n          stringstream_type(a_szMsg) >> val;\r\n          return val;\r\n\r\n//          using namespace std; // atof is for some compilers in std for some not... \r\n//          return atof(a_szMsg);\r\n        }\r\n\r\n        // postfix operator callback\r\n\t      static value_type Milli(value_type v) { return v/(value_type)1e3; }\r\n        \r\n        static int c_iCount;\r\n\r\n\t      int TestNames();\r\n\t      int TestSyntax();\r\n\t      int TestMultiArg();\r\n\t      int TestVolatile();\r\n\t      int TestPostFix();\r\n\t      int TestExpression();\r\n\t      int TestInfixOprt();\r\n\t      int TestBinOprt();\r\n\t      int TestVarConst();\r\n\t      int TestInterface();\r\n\t      int TestException();\r\n        int TestStrArg();\r\n\r\n        void Abort() const;\r\n\r\n    public:\r\n        typedef int (ParserTester::*testfun_type)();\r\n\r\n\t      ParserTester();\r\n\t      void Run();\r\n\r\n    private:\r\n        std::vector<testfun_type> m_vTestFun;\r\n\t      void AddTest(testfun_type a_pFun);\r\n\r\n        // Test Double Parser\r\n        int EqnTest(const string_type& a_str, double a_fRes, bool a_fPass);\r\n        int ThrowTest(const string_type& a_str, int a_iErrc, bool a_bFail = true);\r\n\r\n        // Test Int Parser\r\n        int EqnTestInt(const string_type& a_str, double a_fRes, bool a_fPass);\r\n    };\r\n  } // namespace Test\r\n} // namespace mu\r\n\r\n#endif\r\n\r\n\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserToken.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#ifndef MU_PARSER_TOKEN_H\r\n#define MU_PARSER_TOKEN_H\r\n\r\n#include <cassert>\r\n#include <string>\r\n#include <stack>\r\n#include <vector>\r\n#include <memory>\r\n\r\n#include \"muParserError.h\"\r\n#include \"muParserCallback.h\"\r\n\r\n/** \\file\r\n    \\brief This file contains the parser token definition.\r\n*/\r\n\r\nnamespace mu\r\n{\r\n  /** \\brief Encapsulation of the data for a single formula token. \r\n\r\n    Formula token implementation. Part of the Math Parser Package.\r\n    Formula tokens can be either one of the following:\r\n    <ul>\r\n      <li>value</li>\r\n      <li>variable</li>\r\n      <li>function with numerical arguments</li>\r\n      <li>functions with a string as argument</li>\r\n      <li>prefix operators</li>\r\n      <li>infix operators</li>\r\n\t    <li>binary operator</li>\r\n    </ul>\r\n\r\n   \\author (C) 2004 Ingo Berg \r\n  */\r\n  template<typename TBase, typename TString>\r\n  class ParserToken\r\n  {\r\n  public:\r\n\r\n      /** \\brief Additional token flags. */\r\n      enum ETokFlags\r\n\t    {\r\n\t      flVOLATILE = 1    ///< Mark a token that depends on a variable or a function that is not conservative\r\n\t    };\r\n\r\n  private:\r\n\r\n      ECmdCode  m_iCode;  ///< Type of the token; The token type is a constant of type #ECmdCode.\r\n      ETypeCode m_iType;\r\n      void  *m_pTok;      ///< Stores Token pointer; not applicable for all tokens\r\n  \t  int  m_iFlags;      ///< Additional flags for the token.\r\n      int  m_iIdx;        ///< An otional index to an external buffer storing the token data\r\n      TString m_strTok;   ///< Token string\r\n      TString m_strVal;   ///< Value for string variables\r\n      value_type m_fVal;\r\n      std::unique_ptr<ParserCallback> m_pCallback;\r\n\r\n  public:\r\n\r\n      //---------------------------------------------------------------------------\r\n      /** \\brief Constructor (default).\r\n        \r\n          Sets token to an neutral state of type cmUNKNOWN.\r\n          \\throw nothrow\r\n          \\sa ECmdCode\r\n      */\r\n      ParserToken()\r\n        :m_iCode(cmUNKNOWN)\r\n        ,m_iType(tpVOID)\r\n        ,m_pTok(0)\r\n        ,m_iFlags(0)\r\n        ,m_iIdx(-1)\r\n        ,m_strTok()\r\n        ,m_pCallback()\r\n      {}\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Create token from another one.\r\n      \r\n          Implemented by calling Assign(...)\r\n          \\throw nothrow\r\n          \\post m_iType==cmUNKNOWN\r\n          \\sa #Assign\r\n      */\r\n      ParserToken(const ParserToken &a_Tok)\r\n      {\r\n        Assign(a_Tok);\r\n      }\r\n      \r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Assignement operator. \r\n      \r\n          Copy token state from another token and return this.\r\n          Implemented by calling Assign(...).\r\n          \\throw nothrow\r\n      */\r\n      ParserToken& operator=(const ParserToken &a_Tok)\r\n      {\r\n        Assign(a_Tok);\r\n        return *this;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Copy token information from argument.\r\n      \r\n          \\throw nothrow\r\n      */\r\n      void Assign(const ParserToken &a_Tok)\r\n      {\r\n        m_iCode = a_Tok.m_iCode;\r\n        m_pTok = a_Tok.m_pTok;\r\n        m_iFlags = a_Tok.m_iFlags;\r\n        m_strTok = a_Tok.m_strTok;\r\n        m_iIdx = a_Tok.m_iIdx;\r\n        m_strVal = a_Tok.m_strVal;\r\n        m_iType = a_Tok.m_iType;\r\n        m_fVal = a_Tok.m_fVal;\r\n        // create new callback object if a_Tok has one \r\n        m_pCallback.reset(a_Tok.m_pCallback.get() ? a_Tok.m_pCallback->Clone() : 0);\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Add additional flags to the token. \r\n\r\n          Flags are currently used to mark volatile (non optimizeable) functions.\r\n          \\sa m_iFlags, ETokFlags    \r\n      */\r\n      void AddFlags(int a_iFlags)\r\n      {\r\n        m_iFlags |= a_iFlags;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Check if a certain flag ist set. \r\n\r\n          \\throw nothrow\r\n      */\r\n      bool IsFlagSet(int a_iFlags) const\r\n      {\r\n        #if defined(_MSC_VER)\r\n          #pragma warning( disable : 4800 )\r\n        #endif\r\n          \r\n        return (bool)(m_iFlags & a_iFlags);\r\n\r\n        #if defined(_MSC_VER)\r\n          #pragma warning( default : 4800 ) // int: Variable set to boolean value (may degrade performance)\r\n        #endif\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Assign a token type. \r\n\r\n        Token may not be of type value, variable or function. Those have seperate set functions. \r\n\r\n        \\pre [assert] a_iType!=cmVAR\r\n        \\pre [assert] a_iType!=cmVAL\r\n        \\pre [assert] a_iType!=cmFUNC\r\n        \\post m_fVal = 0\r\n        \\post m_pTok = 0\r\n      */\r\n      ParserToken& Set(ECmdCode a_iType, const TString &a_strTok=TString())\r\n      {\r\n        // The following types cant be set this way, they have special Set functions\r\n        assert(a_iType!=cmVAR);\r\n        assert(a_iType!=cmVAL);\r\n        assert(a_iType!=cmFUNC);\r\n\r\n        m_iCode = a_iType;\r\n        m_iType = tpVOID;\r\n        m_pTok = 0;\r\n        m_iFlags = 0;\r\n        m_strTok = a_strTok;\r\n        m_iIdx = -1;\r\n\r\n        return *this;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Set Callback type. */\r\n      ParserToken& Set(const ParserCallback &a_pCallback, const TString &a_sTok)\r\n      {\r\n        assert(a_pCallback.GetAddr());\r\n\r\n        m_iCode = a_pCallback.GetCode();\r\n        m_iType = tpVOID;\r\n        m_strTok = a_sTok;\r\n        m_pCallback.reset(new ParserCallback(a_pCallback));\r\n\r\n        m_pTok = 0;\r\n        m_iFlags = 0;\r\n        m_iIdx = -1;\r\n        \r\n        if (!m_pCallback->IsOptimizable())\r\n          AddFlags(flVOLATILE);\r\n\r\n        return *this;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Make this token a value token. \r\n      \r\n          Member variables not necessary for value tokens will be invalidated.\r\n          \\throw nothrow\r\n      */\r\n      ParserToken& SetVal(TBase a_fVal, const TString &a_strTok=TString())\r\n      {\r\n        m_iCode = cmVAL;\r\n        m_iType = tpDBL;\r\n        m_fVal = a_fVal;\r\n        m_iFlags = 0;\r\n        m_strTok = a_strTok;\r\n        m_iIdx = -1;\r\n        \r\n        m_pTok = 0;\r\n        m_pCallback.reset(0);\r\n\r\n        return *this;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief make this token a variable token. \r\n      \r\n          Member variables not necessary for variable tokens will be invalidated.\r\n          \\throw nothrow\r\n      */\r\n      ParserToken& SetVar(TBase *a_pVar, const TString &a_strTok)\r\n      {\r\n        m_iCode = cmVAR;\r\n        m_iType = tpDBL;\r\n        m_iFlags = 0;\r\n        m_strTok = a_strTok;\r\n        m_iIdx = -1;\r\n        m_pTok = (void*)a_pVar;\r\n        m_pCallback.reset(0);\r\n\r\n        AddFlags(ParserToken::flVOLATILE);\r\n        return *this;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Make this token a variable token. \r\n      \r\n          Member variables not necessary for variable tokens will be invalidated.\r\n          \\throw nothrow\r\n      */\r\n      ParserToken& SetString(const TString &a_strTok, std::size_t a_iSize)\r\n      {\r\n        m_iCode = cmSTRING;\r\n        m_iType = tpSTR;\r\n        m_iFlags = 0;\r\n        m_strTok = a_strTok;\r\n        m_iIdx = static_cast<int>(a_iSize);\r\n\r\n        m_pTok = 0;\r\n        m_pCallback.reset(0);\r\n\r\n        AddFlags(ParserToken::flVOLATILE);\r\n        return *this;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Set an index associated with the token related data. \r\n      \r\n          In cmSTRFUNC - This is the index to a string table in the main parser.\r\n          \\param a_iIdx The index the string function result will take in the bytecode parser.\r\n          \\throw exception_type if #a_iIdx<0 or #m_iType!=cmSTRING\r\n      */\r\n      void SetIdx(int a_iIdx)\r\n      {\r\n        if (m_iCode!=cmSTRING || a_iIdx<0)\r\n\t        throw ParserError(ecINTERNAL_ERROR);\r\n        \r\n        m_iIdx = a_iIdx;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Return Index associated with the token related data. \r\n      \r\n          In cmSTRFUNC - This is the index to a string table in the main parser.\r\n\r\n          \\throw exception_type if #m_iIdx<0 or #m_iType!=cmSTRING\r\n          \\return The index the result will take in the Bytecode calculatin array (#m_iIdx).\r\n      */\r\n      int GetIdx() const\r\n      {\r\n        if (m_iIdx<0 || m_iCode!=cmSTRING )\r\n          throw ParserError(ecINTERNAL_ERROR);\r\n\r\n        return m_iIdx;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Return the token type.\r\n      \r\n          \\return #m_iType\r\n          \\throw nothrow\r\n      */\r\n      ECmdCode GetCode() const\r\n      {\r\n        if (m_pCallback.get())\r\n        {\r\n          return m_pCallback->GetCode();\r\n        }\r\n        else\r\n        {\r\n          return m_iCode;\r\n        }\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      ETypeCode GetType() const\r\n      {\r\n        if (m_pCallback.get())\r\n        {\r\n          return m_pCallback->GetType();\r\n        }\r\n        else\r\n        {\r\n          return m_iType;\r\n        }\r\n      }\r\n      \r\n      //------------------------------------------------------------------------------\r\n      int GetPri() const\r\n      {\r\n        if ( !m_pCallback.get())\r\n\t        throw ParserError(ecINTERNAL_ERROR);\r\n            \r\n        if ( m_pCallback->GetCode()!=cmOPRT_BIN && m_pCallback->GetCode()!=cmOPRT_INFIX)\r\n\t        throw ParserError(ecINTERNAL_ERROR);\r\n\r\n        return m_pCallback->GetPri();\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Return the address of the callback function assoziated with\r\n                 function and operator tokens.\r\n\r\n          \\return The pointer stored in #m_pTok.\r\n          \\throw exception_type if token type is non of:\r\n                 <ul>\r\n                   <li>cmFUNC</li>\r\n                   <li>cmSTRFUNC</li>\r\n                   <li>cmPOSTOP</li>\r\n                   <li>cmINFIXOP</li>\r\n                   <li>cmOPRT_BIN</li>\r\n                 </ul>\r\n          \\sa ECmdCode\r\n      */\r\n      void* GetFuncAddr() const\r\n      {\r\n        return (m_pCallback.get()) ? m_pCallback->GetAddr() : 0;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Get value of the token.\r\n        \r\n          Only applicable to variable and value tokens.\r\n          \\throw exception_type if token is no value/variable token.\r\n      */\r\n      TBase GetVal() const\r\n      {\r\n        switch (m_iCode)\r\n        {\r\n          case cmVAL:  return m_fVal;\r\n          case cmVAR:  return *((TBase*)m_pTok);\r\n          default:     throw ParserError(ecVAL_EXPECTED);\r\n        }\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Get address of a variable token.\r\n\r\n        Valid only if m_iType==CmdVar.\r\n        \\throw exception_type if token is no variable token.\r\n      */\r\n      TBase* GetVar() const\r\n      {\r\n        if (m_iCode!=cmVAR)\r\n\t        throw ParserError(ecINTERNAL_ERROR);\r\n\r\n        return (TBase*)m_pTok;\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Return the number of function arguments. \r\n\r\n        Valid only if m_iType==CmdFUNC.\r\n      */\r\n      int GetArgCount() const\r\n      {\r\n        assert(m_pCallback.get());\r\n\r\n        if (!m_pCallback->GetAddr())\r\n\t        throw ParserError(ecINTERNAL_ERROR);\r\n\r\n        return m_pCallback->GetArgc();\r\n      }\r\n\r\n      //------------------------------------------------------------------------------\r\n      /** \\brief Return the token identifier. \r\n          \r\n          If #m_iType is cmSTRING the token identifier is the value of the string argument\r\n          for a string function.\r\n          \\return #m_strTok\r\n          \\throw nothrow\r\n          \\sa m_strTok\r\n      */\r\n      const TString& GetAsString() const\r\n      {\r\n        return m_strTok;\r\n      }\r\n  };\r\n} // namespace mu\r\n\r\n#endif\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserTokenReader.cpp",
    "content": "/*\r\n                 __________\r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______\r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|\r\n        \\/                       \\/            \\/      \\/\r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this\r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify,\r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to\r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or\r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n*/\r\n#include <cassert>\r\n#include <cstdio>\r\n#include <cstring>\r\n#include <map>\r\n#include <stack>\r\n#include <string>\r\n\r\n#include \"muParserTokenReader.h\"\r\n#include \"muParserBase.h\"\r\n\r\n/** \\file\r\n    \\brief This file contains the parser token reader implementation.\r\n*/\r\n\r\n\r\nnamespace mu\r\n{\r\n\r\n  // Forward declaration\r\n  class ParserBase;\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Copy constructor.\r\n\r\n      \\sa Assign\r\n      \\throw nothrow\r\n  */\r\n  ParserTokenReader::ParserTokenReader(const ParserTokenReader &a_Reader)\r\n  {\r\n    Assign(a_Reader);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Assignement operator.\r\n\r\n      Self assignement will be suppressed otherwise #Assign is called.\r\n\r\n      \\param a_Reader Object to copy to this token reader.\r\n      \\throw nothrow\r\n  */\r\n  ParserTokenReader& ParserTokenReader::operator=(const ParserTokenReader &a_Reader)\r\n  {\r\n    if (&a_Reader!=this)\r\n      Assign(a_Reader);\r\n\r\n    return *this;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Assign state of a token reader to this token reader.\r\n\r\n      \\param a_Reader Object from which the state should be copied.\r\n      \\throw nothrow\r\n  */\r\n  void ParserTokenReader::Assign(const ParserTokenReader &a_Reader)\r\n  {\r\n    m_pParser = a_Reader.m_pParser;\r\n    m_strFormula = a_Reader.m_strFormula;\r\n    m_iPos = a_Reader.m_iPos;\r\n    m_iSynFlags = a_Reader.m_iSynFlags;\r\n\r\n    m_UsedVar = a_Reader.m_UsedVar;\r\n    m_pFunDef = a_Reader.m_pFunDef;\r\n    m_pConstDef = a_Reader.m_pConstDef;\r\n    m_pVarDef = a_Reader.m_pVarDef;\r\n    m_pStrVarDef = a_Reader.m_pStrVarDef;\r\n    m_pPostOprtDef = a_Reader.m_pPostOprtDef;\r\n    m_pInfixOprtDef = a_Reader.m_pInfixOprtDef;\r\n    m_pOprtDef = a_Reader.m_pOprtDef;\r\n    m_bIgnoreUndefVar = a_Reader.m_bIgnoreUndefVar;\r\n    m_vIdentFun = a_Reader.m_vIdentFun;\r\n    m_pFactory = a_Reader.m_pFactory;\r\n    m_pFactoryData = a_Reader.m_pFactoryData;\r\n    m_iBrackets = a_Reader.m_iBrackets;\r\n    m_cArgSep = a_Reader.m_cArgSep;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Constructor.\r\n\r\n      Create a Token reader and bind it to a parser object.\r\n\r\n      \\pre [assert] a_pParser may not be NULL\r\n      \\post #m_pParser==a_pParser\r\n      \\param a_pParent Parent parser object of the token reader.\r\n  */\r\n  ParserTokenReader::ParserTokenReader(ParserBase *a_pParent)\r\n    :m_pParser(a_pParent)\r\n    ,m_strFormula()\r\n    ,m_iPos(0)\r\n    ,m_iSynFlags(0)\r\n    ,m_bIgnoreUndefVar(false)\r\n    ,m_pFunDef(NULL)\r\n    ,m_pPostOprtDef(NULL)\r\n    ,m_pInfixOprtDef(NULL)\r\n    ,m_pOprtDef(NULL)\r\n    ,m_pConstDef(NULL)\r\n    ,m_pStrVarDef(NULL)\r\n    ,m_pVarDef(NULL)\r\n    ,m_pFactory(NULL)\r\n    ,m_pFactoryData(NULL)\r\n    ,m_vIdentFun()\r\n    ,m_UsedVar()\r\n    ,m_fZero(0)\r\n    ,m_iBrackets(0)\r\n    ,m_lastTok()\r\n    ,m_cArgSep(',')\r\n  {\r\n    assert(m_pParser);\r\n    SetParent(m_pParser);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Create instance of a ParserTokenReader identical with this\r\n              and return its pointer.\r\n\r\n      This is a factory method the calling function must take care of the object destruction.\r\n\r\n      \\return A new ParserTokenReader object.\r\n      \\throw nothrow\r\n  */\r\n  ParserTokenReader* ParserTokenReader::Clone(ParserBase *a_pParent) const\r\n  {\r\n    std::unique_ptr<ParserTokenReader> ptr(new ParserTokenReader(*this));\r\n    ptr->SetParent(a_pParent);\r\n    return ptr.release();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  ParserTokenReader::token_type& ParserTokenReader::SaveBeforeReturn(const token_type &tok)\r\n  {\r\n    m_lastTok = tok;\r\n    return m_lastTok;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  void ParserTokenReader::AddValIdent(identfun_type a_pCallback)\r\n  {\r\n    m_vIdentFun.push_back(a_pCallback);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  void ParserTokenReader::SetVarCreator(facfun_type a_pFactory, void *pUserData)\r\n  {\r\n    m_pFactory = a_pFactory;\r\n    m_pFactoryData = pUserData;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return the current position of the token reader in the formula string.\r\n\r\n      \\return #m_iPos\r\n      \\throw nothrow\r\n  */\r\n  int ParserTokenReader::GetPos() const\r\n  {\r\n    return m_iPos;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return a reference to the formula.\r\n\r\n      \\return #m_strFormula\r\n      \\throw nothrow\r\n  */\r\n  const string_type& ParserTokenReader::GetFormula() const\r\n  {\r\n    return m_strFormula;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Return a map containing the used variables only. */\r\n  const varmap_type& ParserTokenReader::GetUsedVar() const\r\n  {\r\n    return m_UsedVar;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Initialize the token Reader.\r\n\r\n      Sets the formula position index to zero and set Syntax flags to default for initial formula parsing.\r\n      \\pre [assert] triggered if a_szFormula==0\r\n  */\r\n  void ParserTokenReader::SetFormula(const string_type &a_strFormula)\r\n  {\r\n    m_strFormula = a_strFormula;\r\n    ReInit();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Set Flag that controls behaviour in case of undefined variables being found.\r\n\r\n    If true, the parser does not throw an exception if an undefined variable is found.\r\n    otherwise it does. This variable is used internally only!\r\n    It supresses a \"undefined variable\" exception in GetUsedVar().\r\n    Those function should return a complete list of variables including\r\n    those the are not defined by the time of it's call.\r\n  */\r\n  void ParserTokenReader::IgnoreUndefVar(bool bIgnore)\r\n  {\r\n    m_bIgnoreUndefVar = bIgnore;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Reset the token reader to the start of the formula.\r\n\r\n      The syntax flags will be reset to a value appropriate for the\r\n      start of a formula.\r\n      \\post #m_iPos==0, #m_iSynFlags = noOPT | noBC | noPOSTOP | noSTR\r\n      \\throw nothrow\r\n      \\sa ESynCodes\r\n  */\r\n  void ParserTokenReader::ReInit()\r\n  {\r\n    m_iPos = 0;\r\n    m_iSynFlags = noOPT | noBC | noPOSTOP | noASSIGN;\r\n    m_iBrackets = 0;\r\n    m_UsedVar.clear();\r\n    m_lastTok = token_type();\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Read the next token from the string. */\r\n  ParserTokenReader::token_type ParserTokenReader::ReadNextToken()\r\n  {\r\n    assert(m_pParser);\r\n\r\n    std::stack<int> FunArgs;\r\n    const char_type *szFormula = m_strFormula.c_str();\r\n    token_type tok;\r\n\r\n    while (szFormula[m_iPos]==' ')\r\n      ++m_iPos;\r\n\r\n    if ( IsEOF(tok) ) return SaveBeforeReturn(tok);        // Check for end of formula\r\n    if ( IsOprt(tok) )   return SaveBeforeReturn(tok);     // Check for user defined binary operator\r\n    if ( IsFunTok(tok) ) return SaveBeforeReturn(tok);     // Check for function token\r\n    if ( IsBuiltIn(tok) ) return SaveBeforeReturn(tok);    // Check built in operators / tokens\r\n    if ( IsArgSep(tok) ) return SaveBeforeReturn(tok);     // Check for function argument separators\r\n    if ( IsValTok(tok) ) return SaveBeforeReturn(tok);     // Check for values / constant tokens\r\n    if ( IsVarTok(tok) ) return SaveBeforeReturn(tok);     // Check for variable tokens\r\n    if ( IsStrVarTok(tok) ) return SaveBeforeReturn(tok);  // Check for string variables\r\n    if ( IsString(tok) ) return SaveBeforeReturn(tok);     // Check for String tokens\r\n    if ( IsInfixOpTok(tok) ) return SaveBeforeReturn(tok); // Check for unary operators\r\n    if ( IsPostOpTok(tok) )  return SaveBeforeReturn(tok); // Check for unary operators\r\n\r\n    // Check String for undefined variable token. Done only if a\r\n    // flag is set indicating to ignore undefined variables.\r\n    // This is a way to conditionally avoid an error if\r\n    // undefined variables occur.\r\n    // The GetUsedVar function must supress the error for\r\n    // undefined variables in order to collect all variable\r\n    // names including the undefined ones.\r\n    if ( (m_bIgnoreUndefVar || m_pFactory) && IsUndefVarTok(tok) )\r\n      return SaveBeforeReturn(tok);\r\n\r\n    // Check for unknown token\r\n    //\r\n    // !!! From this point on there is no exit without an exception possible...\r\n    //\r\n    string_type strTok;\r\n    int iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos);\r\n    if (iEnd!=m_iPos)\r\n      Error(ecUNASSIGNABLE_TOKEN, m_iPos, strTok);\r\n\r\n    Error(ecUNASSIGNABLE_TOKEN, m_iPos, m_strFormula.substr(m_iPos));\r\n    return token_type(); // never reached\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  void ParserTokenReader::SetParent(ParserBase *a_pParent)\r\n  {\r\n    m_pParser  = a_pParent;\r\n    m_pFunDef  = &a_pParent->m_FunDef;\r\n    m_pOprtDef = &a_pParent->m_OprtDef;\r\n    m_pInfixOprtDef = &a_pParent->m_InfixOprtDef;\r\n    m_pPostOprtDef  = &a_pParent->m_PostOprtDef;\r\n    m_pVarDef       = &a_pParent->m_VarDef;\r\n    m_pStrVarDef    = &a_pParent->m_StrVarDef;\r\n    m_pConstDef     = &a_pParent->m_ConstDef;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Extract all characters that belong to a certain charset.\r\n\r\n    \\param a_szCharSet [in] Const char array of the characters allowed in the token.\r\n    \\param a_sTok [out]  The string that consists entirely of characters listed in a_szCharSet.\r\n    \\param a_iPos [in] Position in the string from where to start reading.\r\n    \\return The Position of the first character not listed in a_szCharSet.\r\n    \\throw nothrow\r\n  */\r\n  int ParserTokenReader::ExtractToken( const char_type *a_szCharSet,\r\n                                       string_type &a_sTok,\r\n                                       int a_iPos ) const\r\n  {\r\n    int iEnd = (int)m_strFormula.find_first_not_of(a_szCharSet, a_iPos);\r\n\r\n    if (iEnd==(int)string_type::npos)\r\n        iEnd = (int)m_strFormula.length();\r\n\r\n    a_sTok = string_type( m_strFormula.begin()+a_iPos, m_strFormula.begin()+iEnd);\r\n    a_iPos = iEnd;\r\n    return iEnd;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check if a built in operator or other token can be found\r\n      \\param a_Tok  [out] Operator token if one is found. This can either be a binary operator or an infix operator token.\r\n      \\return true if an operator token has been found.\r\n  */\r\n  bool ParserTokenReader::IsBuiltIn(token_type &a_Tok)\r\n  {\r\n    const char_type **const pOprtDef = m_pParser->GetOprtDef(),\r\n                     *const szFormula = m_strFormula.c_str();\r\n\r\n    // Compare token with function and operator strings\r\n    // check string for operator/function\r\n    for (int i=0; pOprtDef[i]; ++i)\r\n    {\r\n      std::size_t len( std::char_traits<char_type>::length(pOprtDef[i]) );\r\n      if ( string_type(pOprtDef[i]) == string_type(szFormula + m_iPos, szFormula + m_iPos + len) )\r\n      {\r\n        switch(i)\r\n\t      {\r\n        case cmAND:\r\n        case cmOR:\r\n        case cmXOR:\r\n        case cmLT:\r\n\t\t    case cmGT:\r\n\t\t    case cmLE:\r\n\t\t    case cmGE:\r\n\t\t    case cmNEQ:\r\n\t\t    case cmEQ:\r\n\t\t    case cmADD:\r\n\t\t    case cmSUB:\r\n\t\t    case cmMUL:\r\n\t\t    case cmDIV:\r\n\t\t    case cmPOW:\r\n        case cmASSIGN:\r\n              //if (len!=sTok.length())\r\n              //  continue;\r\n\r\n              // The assignement operator need special treatment\r\n              if (i==cmASSIGN && m_iSynFlags & noASSIGN)\r\n                Error(ecUNEXPECTED_OPERATOR, m_iPos, pOprtDef[i]);\r\n\r\n              if (!m_pParser->HasBuiltInOprt()) continue;\r\n              if (m_iSynFlags & noOPT)\r\n              {\r\n                // Maybe its an infix operator not an operator\r\n                // Both operator types can share characters in\r\n                // their identifiers\r\n                if ( IsInfixOpTok(a_Tok) )\r\n                  return true;\r\n\r\n                Error(ecUNEXPECTED_OPERATOR, m_iPos, pOprtDef[i]);\r\n              }\r\n\r\n              m_iSynFlags  = noBC | noOPT | noARG_SEP | noPOSTOP | noASSIGN;\r\n              m_iSynFlags |= ( (i != cmEND) && ( i != cmBC) ) ? noEND : 0;\r\n              break;\r\n\r\n\t\t    case cmBO:\r\n              if (m_iSynFlags & noBO)\r\n\t              Error(ecUNEXPECTED_PARENS, m_iPos, pOprtDef[i]);\r\n\r\n              if (m_lastTok.GetCode()==cmFUNC)\r\n                m_iSynFlags = noOPT | noEND | noARG_SEP | noPOSTOP | noASSIGN;\r\n              else\r\n                m_iSynFlags = noBC | noOPT | noEND | noARG_SEP | noPOSTOP | noASSIGN;\r\n\r\n              ++m_iBrackets;\r\n              break;\r\n\r\n\t\t    case cmBC:\r\n              if (m_iSynFlags & noBC)\r\n                Error(ecUNEXPECTED_PARENS, m_iPos, pOprtDef[i]);\r\n\r\n              m_iSynFlags  = noBO | noVAR | noVAL | noFUN | noINFIXOP | noSTR | noASSIGN;\r\n\r\n              if (--m_iBrackets<0)\r\n                Error(ecUNEXPECTED_PARENS, m_iPos, pOprtDef[i]);\r\n              break;\r\n\r\n\t\t    default:      // The operator is listed in c_DefaultOprt, but not here. This is a bad thing...\r\n              Error(ecINTERNAL_ERROR);\r\n\t      } // switch operator id\r\n\r\n        m_iPos += (int)len;\r\n        a_Tok.Set( (ECmdCode)i, pOprtDef[i] );\r\n        return true;\r\n\t    } // if operator string found\r\n    } // end of for all operator strings\r\n\r\n    return false;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  bool ParserTokenReader::IsArgSep(token_type &a_Tok)\r\n  {\r\n    const char_type* szFormula = m_strFormula.c_str();\r\n\r\n    if (szFormula[m_iPos]==m_cArgSep)\r\n    {\r\n      // copy the separator into null terminated string\r\n      char_type szSep[2];\r\n      szSep[0] = m_cArgSep;\r\n      szSep[1] = 0;\r\n\r\n      if (m_iSynFlags & noARG_SEP)\r\n        Error(ecUNEXPECTED_ARG_SEP, m_iPos, szSep);\r\n\r\n      m_iSynFlags  = noBC | noOPT | noEND | noARG_SEP | noPOSTOP | noASSIGN;\r\n      ++m_iPos;\r\n      a_Tok.Set(cmARG_SEP, szSep);\r\n      return true;\r\n    }\r\n\r\n    return false;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check for End of Formula.\r\n\r\n      \\return true if an end of formula is found false otherwise.\r\n      \\param a_Tok [out] If an eof is found the corresponding token will be stored there.\r\n      \\throw nothrow\r\n      \\sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsString, IsInfixOpTok, IsPostOpTok\r\n  */\r\n  bool ParserTokenReader::IsEOF(token_type &a_Tok)\r\n  {\r\n    const char_type* szFormula = m_strFormula.c_str();\r\n\r\n    // check for EOF\r\n    if ( !szFormula[m_iPos] || szFormula[m_iPos] == '\\n')\r\n    {\r\n      if ( m_iSynFlags & noEND )\r\n        Error(ecUNEXPECTED_EOF, m_iPos);\r\n\r\n      if (m_iBrackets>0)\r\n        Error(ecMISSING_PARENS, m_iPos, _T(\")\"));\r\n\r\n      m_iSynFlags = 0;\r\n      a_Tok.Set(cmEND);\r\n      return true;\r\n    }\r\n\r\n    return false;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check if a string position contains a unary infix operator.\r\n      \\return true if a function token has been found false otherwise.\r\n  */\r\n  bool ParserTokenReader::IsInfixOpTok(token_type &a_Tok)\r\n  {\r\n    string_type sTok;\r\n    int iEnd = ExtractToken(m_pParser->ValidInfixOprtChars(), sTok, m_iPos);\r\n    if (iEnd==m_iPos)\r\n      return false;\r\n\r\n    funmap_type::const_iterator item = m_pInfixOprtDef->find(sTok);\r\n    if (item==m_pInfixOprtDef->end())\r\n      return false;\r\n\r\n    a_Tok.Set(item->second, sTok);\r\n    m_iPos = (int)iEnd;\r\n\r\n    if (m_iSynFlags & noINFIXOP)\r\n      Error(ecUNEXPECTED_OPERATOR, m_iPos, a_Tok.GetAsString());\r\n\r\n    m_iSynFlags = noPOSTOP | noINFIXOP | noOPT | noBC | noSTR | noASSIGN;\r\n    return true;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check whether the token at a given position is a function token.\r\n      \\param a_Tok [out] If a value token is found it will be placed here.\r\n      \\throw ParserException if Syntaxflags do not allow a function at a_iPos\r\n      \\return true if a function token has been found false otherwise.\r\n      \\pre [assert] m_pParser!=0\r\n  */\r\n  bool ParserTokenReader::IsFunTok(token_type &a_Tok)\r\n  {\r\n    string_type strTok;\r\n    int iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos);\r\n    if (iEnd==m_iPos)\r\n      return false;\r\n\r\n    funmap_type::const_iterator item = m_pFunDef->find(strTok);\r\n    if (item==m_pFunDef->end())\r\n        return false;\r\n\r\n    a_Tok.Set(item->second, strTok);\r\n\r\n    m_iPos = (int)iEnd;\r\n    if (m_iSynFlags & noFUN)\r\n      Error(ecUNEXPECTED_FUN, m_iPos-(int)a_Tok.GetAsString().length(), a_Tok.GetAsString());\r\n\r\n    m_iSynFlags = noANY ^ noBO;\r\n    return true;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check if a string position contains a binary operator.\r\n      \\param a_Tok  [out] Operator token if one is found. This can either be a binary operator or an infix operator token.\r\n      \\return true if an operator token has been found.\r\n  */\r\n  bool ParserTokenReader::IsOprt(token_type &a_Tok)\r\n  {\r\n    string_type strTok;\r\n    int iEnd = ExtractToken(m_pParser->ValidOprtChars(), strTok, m_iPos);\r\n    if (iEnd==m_iPos)\r\n      return false;\r\n\r\n    funmap_type::const_iterator item = m_pOprtDef->find(strTok);\r\n    if (item==m_pOprtDef->end())\r\n      return false;\r\n\r\n    a_Tok.Set(item->second, strTok);\r\n\r\n    if (m_iSynFlags & noOPT)\r\n    {\r\n      // An operator was found but is not expected to occur at\r\n      // this position of the formula, maybe it is an infix\r\n      // operator, not a binary operator. Both operator types\r\n      // can share characters in their identifiers.\r\n      if ( IsInfixOpTok(a_Tok) ) return true;\r\n      // nope, no infix operator\r\n      Error(ecUNEXPECTED_OPERATOR, m_iPos, a_Tok.GetAsString());\r\n    }\r\n\r\n    m_iPos = (int)iEnd;\r\n    m_iSynFlags  = noBC | noOPT | noARG_SEP | noPOSTOP | noEND | noBC | noASSIGN;\r\n    return true;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check if a string position contains a unary post value operator. */\r\n  bool ParserTokenReader::IsPostOpTok(token_type &a_Tok)\r\n  {\r\n    // Tricky problem with equations like \"3m+5\":\r\n    //     m is a postfix operator, + is a valid sign for postfix operators and\r\n    //     for binary operators parser detects \"m+\" as operator string and\r\n    //     finds no matching postfix operator.\r\n    //\r\n    // This is a special case so this routine slightly differs from the other\r\n    // token readers.\r\n\r\n    // Test if there could be a postfix operator\r\n    string_type sTok;\r\n    int iEnd = ExtractToken(m_pParser->ValidOprtChars(), sTok, m_iPos);\r\n    if (iEnd==m_iPos)\r\n      return false;\r\n\r\n    // iteraterate over all postfix operator strings\r\n    funmap_type::const_iterator item = m_pPostOprtDef->begin();\r\n    for (item=m_pPostOprtDef->begin(); item!=m_pPostOprtDef->end(); ++item)\r\n    {\r\n      if (sTok.find(item->first)!=0)\r\n        continue;\r\n\r\n      a_Tok.Set(item->second, sTok);\r\n  \t  m_iPos += (int)item->first.length();\r\n\r\n      if (m_iSynFlags & noPOSTOP)\r\n        Error(ecUNEXPECTED_OPERATOR, m_iPos-(int)item->first.length(), item->first);\r\n\r\n      m_iSynFlags = noVAL | noVAR | noFUN | noBO | noPOSTOP | noSTR | noASSIGN;\r\n      return true;\r\n    }\r\n\r\n    return false;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check whether the token at a given position is a value token.\r\n\r\n    Value tokens are either values or constants.\r\n\r\n    \\param a_Tok [out] If a value token is found it will be placed here.\r\n    \\return true if a value token has been found.\r\n  */\r\n  bool ParserTokenReader::IsValTok(token_type &a_Tok)\r\n  {\r\n    assert(m_pConstDef);\r\n    assert(m_pParser);\r\n\r\n    #if defined(_MSC_VER)\r\n      #pragma warning( disable : 4244 )\r\n    #endif\r\n\r\n    string_type strTok;\r\n    value_type fVal(0);\r\n    int iEnd(0);\r\n\r\n    // 2.) Check for user defined constant\r\n    // Read everything that could be a constant name\r\n    iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos);\r\n    if (iEnd!=m_iPos)\r\n    {\r\n      valmap_type::const_iterator item = m_pConstDef->find(strTok);\r\n      if (item!=m_pConstDef->end())\r\n      {\r\n        m_iPos = iEnd;\r\n        a_Tok.SetVal(item->second, strTok);\r\n\r\n        if (m_iSynFlags & noVAL)\r\n          Error(ecUNEXPECTED_VAL, m_iPos - (int)strTok.length(), strTok);\r\n\r\n        m_iSynFlags = noVAL | noVAR | noFUN | noBO | noINFIXOP | noSTR | noASSIGN;\r\n        return true;\r\n      }\r\n    }\r\n\r\n    // 3.call the value recognition functions provided by the user\r\n    // Call user defined value recognition functions\r\n    std::vector<identfun_type>::const_iterator item = m_vIdentFun.begin();\r\n    for (item = m_vIdentFun.begin(); item!=m_vIdentFun.end(); ++item)\r\n    {\r\n      int iStart = m_iPos;\r\n      if ( (*item)(m_strFormula.c_str() + m_iPos, &m_iPos, &fVal)==1 )\r\n      {\r\n        strTok.assign(m_strFormula.c_str(), iStart, m_iPos);\r\n        if (m_iSynFlags & noVAL)\r\n          Error(ecUNEXPECTED_VAL, m_iPos - (int)strTok.length(), strTok);\r\n\r\n        a_Tok.SetVal(fVal, strTok);\r\n        m_iSynFlags = noVAL | noVAR | noFUN | noBO | noINFIXOP | noSTR | noASSIGN;\r\n        return true;\r\n      }\r\n    }\r\n\r\n    return false;\r\n\r\n    #if defined(_MSC_VER)\r\n      #pragma warning( default : 4244 )\r\n    #endif\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check wheter a token at a given position is a variable token.\r\n      \\param a_Tok [out] If a variable token has been found it will be placed here.\r\n\t    \\return true if a variable token has been found.\r\n  */\r\n  bool ParserTokenReader::IsVarTok(token_type &a_Tok)\r\n  {\r\n    if (!m_pVarDef->size())\r\n      return false;\r\n\r\n    string_type strTok;\r\n    int iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos);\r\n    if (iEnd==m_iPos)\r\n      return false;\r\n\r\n    varmap_type::const_iterator item =  m_pVarDef->find(strTok);\r\n    if (item==m_pVarDef->end())\r\n      return false;\r\n\r\n    if (m_iSynFlags & noVAR)\r\n      Error(ecUNEXPECTED_VAR, m_iPos, strTok);\r\n\r\n    m_iPos = iEnd;\r\n    a_Tok.SetVar(item->second, strTok);\r\n    m_UsedVar[item->first] = item->second;  // Add variable to used-var-list\r\n\r\n    m_iSynFlags = noVAL | noVAR | noFUN | noBO | noPOSTOP | noINFIXOP | noSTR;\r\n    return true;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  bool ParserTokenReader::IsStrVarTok(token_type &a_Tok)\r\n  {\r\n    if (!m_pStrVarDef || !m_pStrVarDef->size())\r\n      return false;\r\n\r\n    string_type strTok;\r\n    int iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos);\r\n    if (iEnd==m_iPos)\r\n      return false;\r\n\r\n    strmap_type::const_iterator item =  m_pStrVarDef->find(strTok);\r\n    if (item==m_pStrVarDef->end())\r\n      return false;\r\n\r\n    if (m_iSynFlags & noSTR)\r\n      Error(ecUNEXPECTED_VAR, m_iPos, strTok);\r\n\r\n    m_iPos = iEnd;\r\n    if (!m_pParser->m_vStringVarBuf.size())\r\n      Error(ecINTERNAL_ERROR);\r\n\r\n    a_Tok.SetString(m_pParser->m_vStringVarBuf[item->second], m_pParser->m_vStringVarBuf.size() );\r\n\r\n    m_iSynFlags = noANY ^ ( noBC | noOPT | noEND | noARG_SEP);\r\n    return true;\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check wheter a token at a given position is an undefined variable.\r\n\r\n      \\param a_Tok [out] If a variable tom_pParser->m_vStringBufken has been found it will be placed here.\r\n\t    \\return true if a variable token has been found.\r\n      \\throw nothrow\r\n  */\r\n  bool ParserTokenReader::IsUndefVarTok(token_type &a_Tok)\r\n  {\r\n    string_type strTok;\r\n    int iEnd( ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos) );\r\n    if ( iEnd==m_iPos )\r\n      return false;\r\n\r\n    if (m_iSynFlags & noVAR)\r\n    {\r\n      // <ibg/> 20061021 added token string strTok instead of a_Tok.GetAsString() as the\r\n      //                 token identifier.\r\n      // related bug report:\r\n      // http://sourceforge.net/tracker/index.php?func=detail&aid=1578779&group_id=137191&atid=737979\r\n      Error(ecUNEXPECTED_VAR, m_iPos - (int)a_Tok.GetAsString().length(), strTok);\r\n    }\r\n\r\n    // If a factory is available implicitely create new variables\r\n    if (m_pFactory)\r\n    {\r\n      value_type *fVar = m_pFactory(strTok.c_str(), m_pFactoryData);\r\n      a_Tok.SetVar(fVar, strTok );\r\n\r\n      // Do not use m_pParser->DefineVar( strTok, fVar );\r\n      // in order to define the new variable, it will clear the\r\n      // m_UsedVar array which will kill previousely defined variables\r\n      // from the list\r\n      // This is safe because the new variable can never override an existing one\r\n      // because they are checked first!\r\n      (*m_pVarDef)[strTok] = fVar;\r\n      m_UsedVar[strTok] = fVar;  // Add variable to used-var-list\r\n    }\r\n    else\r\n    {\r\n      a_Tok.SetVar((value_type*)&m_fZero, strTok);\r\n      m_UsedVar[strTok] = 0;  // Add variable to used-var-list\r\n    }\r\n\r\n    m_iPos = iEnd;\r\n\r\n    // Call the variable factory in order to let it define a new parser variable\r\n    m_iSynFlags = noVAL | noVAR | noFUN | noBO | noPOSTOP | noINFIXOP | noSTR;\r\n    return true;\r\n  }\r\n\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Check wheter a token at a given position is a string.\r\n      \\param a_Tok [out] If a variable token has been found it will be placed here.\r\n  \t  \\return true if a string token has been found.\r\n      \\sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsEOF, IsInfixOpTok, IsPostOpTok\r\n      \\throw nothrow\r\n  */\r\n  bool ParserTokenReader::IsString(token_type &a_Tok)\r\n  {\r\n    if (m_strFormula[m_iPos]!='\"')\r\n      return false;\r\n\r\n    string_type strBuf(&m_strFormula[m_iPos+1]);\r\n    std::size_t iEnd(0), iSkip(0);\r\n\r\n    // parser over escaped '\\\"' end replace them with '\"'\r\n    for(iEnd=(int)strBuf.find( _T(\"\\\"\") ); iEnd!=string_type::npos; iEnd=(int)strBuf.find( _T(\"\\\"\"), iEnd))\r\n    {\r\n      if (strBuf[iEnd-1]!='\\\\') break;\r\n      strBuf.replace(iEnd-1, 2, _T(\"\\\"\") );\r\n      ++iSkip;\r\n    }\r\n\r\n    if (iEnd==string_type::npos)\r\n      Error(ecUNTERMINATED_STRING, m_iPos, _T(\"\\\"\") );\r\n\r\n    string_type strTok(strBuf.begin(), strBuf.begin()+iEnd);\r\n\r\n    if (m_iSynFlags & noSTR)\r\n      Error(ecUNEXPECTED_STR, m_iPos, strTok);\r\n\r\n\t\tm_pParser->m_vStringBuf.push_back(strTok); // Store string in internal buffer\r\n    a_Tok.SetString(strTok, m_pParser->m_vStringBuf.size());\r\n\r\n    m_iPos += (int)strTok.length() + 2 + (int)iSkip;  // +2 wg Anf�hrungszeichen; +iSkip f�r entfernte escape zeichen\r\n    m_iSynFlags = noANY ^ ( noARG_SEP | noBC | noOPT | noEND );\r\n\r\n    return true;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  /** \\brief Create an error containing the parse error position.\r\n\r\n    This function will create an Parser Exception object containing the error text and its position.\r\n\r\n    \\param a_iErrc [in] The error code of type #EErrorCodes.\r\n    \\param a_iPos [in] The position where the error was detected.\r\n    \\param a_sTok [in] The token string representation associated with the error.\r\n    \\throw ParserException always throws thats the only purpose of this function.\r\n  */\r\n  void  ParserTokenReader::Error( EErrorCodes a_iErrc,\r\n                                  int a_iPos,\r\n                                  const string_type &a_sTok) const\r\n  {\r\n    m_pParser->Error(a_iErrc, a_iPos, a_sTok);\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  void ParserTokenReader::SetArgSep(char_type cArgSep)\r\n  {\r\n    m_cArgSep = cArgSep;\r\n  }\r\n\r\n  //---------------------------------------------------------------------------\r\n  char_type ParserTokenReader::GetArgSep() const\r\n  {\r\n    return m_cArgSep;\r\n  }\r\n} // namespace mu\r\n\r\n"
  },
  {
    "path": "src/madness/external/muParser/muParserTokenReader.h",
    "content": "/*\r\n                 __________                                      \r\n    _____   __ __\\______   \\_____  _______  ______  ____ _______ \r\n   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\\r\n  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/\r\n  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|   \r\n        \\/                       \\/            \\/      \\/        \r\n  Copyright (C) 2004-2008 Ingo Berg\r\n\r\n  Permission is hereby granted, free of charge, to any person obtaining a copy of this \r\n  software and associated documentation files (the \"Software\"), to deal in the Software\r\n  without restriction, including without limitation the rights to use, copy, modify, \r\n  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to \r\n  permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n  The above copyright notice and this permission notice shall be included in all copies or \r\n  substantial portions of the Software.\r\n\r\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\r\n  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \r\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \r\n*/\r\n\r\n#ifndef MU_PARSER_TOKEN_READER_H\r\n#define MU_PARSER_TOKEN_READER_H\r\n\r\n#include <cassert>\r\n#include <cstdio>\r\n#include <cstring>\r\n#include <map>\r\n#include <memory>\r\n#include <stack>\r\n#include <string>\r\n\r\n#include \"muParserDef.h\"\r\n#include \"muParserToken.h\"\r\n\r\n/** \\file\r\n    \\brief This file contains the parser token reader definition.\r\n*/\r\n\r\n\r\nnamespace mu\r\n{\r\n  // Forward declaration\r\n  class ParserBase;\r\n\r\n  /** \\brief Token reader for the ParserBase class.\r\n\r\n  */\r\n  class ParserTokenReader \r\n  {\r\n  private:\r\n\r\n      typedef ParserToken<value_type, string_type> token_type;\r\n\r\n  public:\r\n\r\n      ParserTokenReader(ParserBase *a_pParent);\r\n      ParserTokenReader* Clone(ParserBase *a_pParent) const;\r\n\r\n      void AddValIdent(identfun_type a_pCallback);\r\n      void SetVarCreator(facfun_type a_pFactory, void *pUserData);\r\n      void SetFormula(const string_type &a_strFormula);\r\n      void SetArgSep(char_type cArgSep);\r\n\r\n      int GetPos() const;\r\n      const string_type& GetFormula() const;\r\n      const varmap_type& GetUsedVar() const;\r\n      char_type GetArgSep() const;\r\n\r\n      void IgnoreUndefVar(bool bIgnore);\r\n      void ReInit();\r\n      token_type ReadNextToken();\r\n\r\n  private:\r\n\r\n      /** \\brief Syntax codes. \r\n  \t\r\n\t        The syntax codes control the syntax check done during the first time parsing of \r\n          the expression string. They are flags that indicate which tokens are allowed next\r\n          if certain tokens are identified.\r\n  \t  */\r\n      enum ESynCodes\r\n      {\r\n        noBO      = 1 << 0,  ///< to avoid i.e. \"cos(7)(\" \r\n        noBC      = 1 << 1,  ///< to avoid i.e. \"sin)\" or \"()\"\r\n        noVAL     = 1 << 2,  ///< to avoid i.e. \"tan 2\" or \"sin(8)3.14\"\r\n        noVAR     = 1 << 3,  ///< to avoid i.e. \"sin a\" or \"sin(8)a\"\r\n        noARG_SEP = 1 << 4,  ///< to avoid i.e. \",,\" or \"+,\" ...\r\n        noFUN     = 1 << 5,  ///< to avoid i.e. \"sqrt cos\" or \"(1)sin\"\t\r\n        noOPT     = 1 << 6,  ///< to avoid i.e. \"(+)\"\r\n        noPOSTOP  = 1 << 7,  ///< to avoid i.e. \"(5!!)\" \"sin!\"\r\n\t      noINFIXOP = 1 << 8,  ///< to avoid i.e. \"++4\" \"!!4\"\r\n        noEND     = 1 << 9,  ///< to avoid unexpected end of formula\r\n        noSTR     = 1 << 10, ///< to block numeric arguments on string functions\r\n        noASSIGN  = 1 << 11, ///< to block assignement to constant i.e. \"4=7\"\r\n        noANY     = ~0       ///< All of he above flags set\r\n      };\t\r\n\r\n      ParserTokenReader(const ParserTokenReader &a_Reader);\r\n      ParserTokenReader& operator=(const ParserTokenReader &a_Reader);\r\n      void Assign(const ParserTokenReader &a_Reader);\r\n\r\n      void SetParent(ParserBase *a_pParent);\r\n      int ExtractToken(const char_type *a_szCharSet, \r\n                       string_type &a_strTok, \r\n                       int a_iPos) const;\r\n      bool IsBuiltIn(token_type &a_Tok);\r\n      bool IsArgSep(token_type &a_Tok);\r\n      bool IsEOF(token_type &a_Tok);\r\n      bool IsInfixOpTok(token_type &a_Tok);\r\n      bool IsFunTok(token_type &a_Tok);\r\n      bool IsPostOpTok(token_type &a_Tok);\r\n      bool IsOprt(token_type &a_Tok);\r\n      bool IsValTok(token_type &a_Tok);\r\n      bool IsVarTok(token_type &a_Tok);\r\n      bool IsStrVarTok(token_type &a_Tok);\r\n      bool IsUndefVarTok(token_type &a_Tok);\r\n      bool IsString(token_type &a_Tok);\r\n      void Error(EErrorCodes a_iErrc, \r\n                 int a_iPos = -1, \r\n                 const string_type &a_sTok = string_type() ) const;\r\n\r\n      token_type& SaveBeforeReturn(const token_type &tok);\r\n\r\n      ParserBase *m_pParser;\r\n      string_type m_strFormula;\r\n      int  m_iPos;\r\n      int  m_iSynFlags;\r\n      bool m_bIgnoreUndefVar;\r\n\r\n      const funmap_type *m_pFunDef;\r\n      const funmap_type *m_pPostOprtDef;\r\n      const funmap_type *m_pInfixOprtDef;\r\n      const funmap_type *m_pOprtDef;\r\n      const valmap_type *m_pConstDef;\r\n      const strmap_type *m_pStrVarDef;\r\n      varmap_type *m_pVarDef;  ///< The only non const pointer to parser internals\r\n      facfun_type m_pFactory;\r\n      void *m_pFactoryData;\r\n      std::vector<identfun_type> m_vIdentFun; ///< Value token identification function\r\n      varmap_type m_UsedVar;\r\n      value_type m_fZero;      ///< Dummy value of zero, referenced by undefined variables\r\n      int m_iBrackets;\r\n      token_type m_lastTok;\r\n      char_type m_cArgSep;     ///< The character used for separating function arguments\r\n  };\r\n} // namespace mu\r\n\r\n#endif\r\n\r\n\r\n"
  },
  {
    "path": "src/madness/external/nlohmann_json/CMakeLists.txt",
    "content": "# src/madness/external/nlohmann_json\n\nset(MADNLOHMANN_JSON_HEADERS json.hpp)\nset(MADNLOHMANN_JSON_SOURCES json.cc )\n#set(MADTINYXML_SOURCES tinystr.cc tinyxml.cc tinyxmlerror.cc tinyxmlparser.cc)\n\n# Create the MADtinyxml library\nadd_mad_library(nlohmann_json MADNLOHMANN_JSON_SOURCES MADNLOHMANN_JSON_HEADERS \"dummy\" \"madness/external/nlohmann_json/\")\n#add_mad_library(tinyxml MADTINYXML_SOURCES MADTINYXML_HEADERS \"dummy\" \"madness/external/tinyxml/\")\n#add_mad_hdr_library(nlohmann_json MADNLOHMANN_JSON_HEADERS \"dummy\" \"madness/external/nlohmann_json/\")\n\n#target_compile_options(MADtinyxml PRIVATE -O0)"
  },
  {
    "path": "src/madness/external/nlohmann_json/json.cc",
    "content": "//\n// Created by Florian Bischoff on 11/1/22.\n//\n\n#include \"json.hpp\"\n"
  },
  {
    "path": "src/madness/external/nlohmann_json/json.hpp",
    "content": "/*\n    __ _____ _____ _____\n __|  |   __|     |   | |  JSON for Modern C++\n|  |  |__   |  |  | | | |  version 3.10.5\n|_____|_____|_____|_|___|  https://github.com/nlohmann/json\n\nLicensed under the MIT License <http://opensource.org/licenses/MIT>.\nSPDX-License-Identifier: MIT\nCopyright (c) 2013-2022 Niels Lohmann <http://nlohmann.me>.\n\nPermission is hereby  granted, free of charge, to any  person obtaining a copy\nof this software and associated  documentation files (the \"Software\"), to deal\nin the Software  without restriction, including without  limitation the rights\nto  use, copy,  modify, merge,  publish, distribute,  sublicense, and/or  sell\ncopies  of  the Software,  and  to  permit persons  to  whom  the Software  is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE  IS PROVIDED \"AS  IS\", WITHOUT WARRANTY  OF ANY KIND,  EXPRESS OR\nIMPLIED,  INCLUDING BUT  NOT  LIMITED TO  THE  WARRANTIES OF  MERCHANTABILITY,\nFITNESS FOR  A PARTICULAR PURPOSE AND  NONINFRINGEMENT. IN NO EVENT  SHALL THE\nAUTHORS  OR COPYRIGHT  HOLDERS  BE  LIABLE FOR  ANY  CLAIM,  DAMAGES OR  OTHER\nLIABILITY, WHETHER IN AN ACTION OF  CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE  OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n/****************************************************************************\\\n * Note on documentation: The source files contain links to the online      *\n * documentation of the public API at https://json.nlohmann.me. This URL    *\n * contains the most recent documentation and should also be applicable to  *\n * previous versions; documentation for deprecated functions is not         *\n * removed, but marked deprecated. See \"Generate documentation\" section in  *\n * file doc/README.md.                                                      *\n\\****************************************************************************/\n\n#ifndef INCLUDE_NLOHMANN_JSON_HPP_\n#define INCLUDE_NLOHMANN_JSON_HPP_\n\n#define NLOHMANN_JSON_VERSION_MAJOR 3\n#define NLOHMANN_JSON_VERSION_MINOR 10\n#define NLOHMANN_JSON_VERSION_PATCH 5\n\n#include <algorithm> // all_of, find, for_each\n#include <cstddef> // nullptr_t, ptrdiff_t, size_t\n#include <functional> // hash, less\n#include <initializer_list> // initializer_list\n#ifndef JSON_NO_IO\n    #include <iosfwd> // istream, ostream\n#endif  // JSON_NO_IO\n#include <iterator> // random_access_iterator_tag\n#include <memory> // unique_ptr\n#include <numeric> // accumulate\n#include <string> // string, stoi, to_string\n#include <utility> // declval, forward, move, pair, swap\n#include <vector> // vector\n\n// #include <nlohmann/adl_serializer.hpp>\n\n\n#include <type_traits>\n#include <utility>\n\n// #include <nlohmann/detail/conversions/from_json.hpp>\n\n\n#include <algorithm> // transform\n#include <array> // array\n#include <forward_list> // forward_list\n#include <iterator> // inserter, front_inserter, end\n#include <map> // map\n#include <string> // string\n#include <tuple> // tuple, make_tuple\n#include <type_traits> // is_arithmetic, is_same, is_enum, underlying_type, is_convertible\n#include <unordered_map> // unordered_map\n#include <utility> // pair, declval\n#include <valarray> // valarray\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n\n#include <exception> // exception\n#include <stdexcept> // runtime_error\n#include <string> // to_string\n#include <vector> // vector\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\n#include <array> // array\n#include <cstddef> // size_t\n#include <cstdint> // uint8_t\n#include <string> // string\n\nnamespace nlohmann\n{\nnamespace detail\n{\n///////////////////////////\n// JSON type enumeration //\n///////////////////////////\n\n/*!\n@brief the JSON type enumeration\n\nThis enumeration collects the different JSON types. It is internally used to\ndistinguish the stored values, and the functions @ref basic_json::is_null(),\n@ref basic_json::is_object(), @ref basic_json::is_array(),\n@ref basic_json::is_string(), @ref basic_json::is_boolean(),\n@ref basic_json::is_number() (with @ref basic_json::is_number_integer(),\n@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()),\n@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and\n@ref basic_json::is_structured() rely on it.\n\n@note There are three enumeration entries (number_integer, number_unsigned, and\nnumber_float), because the library distinguishes these three types for numbers:\n@ref basic_json::number_unsigned_t is used for unsigned integers,\n@ref basic_json::number_integer_t is used for signed integers, and\n@ref basic_json::number_float_t is used for floating-point numbers or to\napproximate integers which do not fit in the limits of their respective type.\n\n@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON\nvalue with the default value for a given type\n\n@since version 1.0.0\n*/\nenum class value_t : std::uint8_t\n{\n    null,             ///< null value\n    object,           ///< object (unordered set of name/value pairs)\n    array,            ///< array (ordered collection of values)\n    string,           ///< string value\n    boolean,          ///< boolean value\n    number_integer,   ///< number value (signed integer)\n    number_unsigned,  ///< number value (unsigned integer)\n    number_float,     ///< number value (floating-point)\n    binary,           ///< binary array (ordered collection of bytes)\n    discarded         ///< discarded by the parser callback function\n};\n\n/*!\n@brief comparison operator for JSON types\n\nReturns an ordering that is similar to Python:\n- order: null < boolean < number < object < array < string < binary\n- furthermore, each type is not smaller than itself\n- discarded values are not comparable\n- binary is represented as a b\"\" string in python and directly comparable to a\n  string; however, making a binary array directly comparable with a string would\n  be surprising behavior in a JSON file.\n\n@since version 1.0.0\n*/\ninline bool operator<(const value_t lhs, const value_t rhs) noexcept\n{\n    static constexpr std::array<std::uint8_t, 9> order = {{\n            0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */,\n            1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */,\n            6 /* binary */\n        }\n    };\n\n    const auto l_index = static_cast<std::size_t>(lhs);\n    const auto r_index = static_cast<std::size_t>(rhs);\n    return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index];\n}\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/string_escape.hpp>\n\n\n#include <string>\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\n#include <utility> // declval, pair\n// #include <nlohmann/thirdparty/hedley/hedley.hpp>\n\n\n/* Hedley - https://nemequ.github.io/hedley\n * Created by Evan Nemerson <evan@nemerson.com>\n *\n * To the extent possible under law, the author(s) have dedicated all\n * copyright and related and neighboring rights to this software to\n * the public domain worldwide. This software is distributed without\n * any warranty.\n *\n * For details, see <http://creativecommons.org/publicdomain/zero/1.0/>.\n * SPDX-License-Identifier: CC0-1.0\n */\n\n#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15)\n#if defined(JSON_HEDLEY_VERSION)\n    #undef JSON_HEDLEY_VERSION\n#endif\n#define JSON_HEDLEY_VERSION 15\n\n#if defined(JSON_HEDLEY_STRINGIFY_EX)\n    #undef JSON_HEDLEY_STRINGIFY_EX\n#endif\n#define JSON_HEDLEY_STRINGIFY_EX(x) #x\n\n#if defined(JSON_HEDLEY_STRINGIFY)\n    #undef JSON_HEDLEY_STRINGIFY\n#endif\n#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x)\n\n#if defined(JSON_HEDLEY_CONCAT_EX)\n    #undef JSON_HEDLEY_CONCAT_EX\n#endif\n#define JSON_HEDLEY_CONCAT_EX(a,b) a##b\n\n#if defined(JSON_HEDLEY_CONCAT)\n    #undef JSON_HEDLEY_CONCAT\n#endif\n#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b)\n\n#if defined(JSON_HEDLEY_CONCAT3_EX)\n    #undef JSON_HEDLEY_CONCAT3_EX\n#endif\n#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c\n\n#if defined(JSON_HEDLEY_CONCAT3)\n    #undef JSON_HEDLEY_CONCAT3\n#endif\n#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c)\n\n#if defined(JSON_HEDLEY_VERSION_ENCODE)\n    #undef JSON_HEDLEY_VERSION_ENCODE\n#endif\n#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision))\n\n#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR)\n    #undef JSON_HEDLEY_VERSION_DECODE_MAJOR\n#endif\n#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000)\n\n#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR)\n    #undef JSON_HEDLEY_VERSION_DECODE_MINOR\n#endif\n#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000)\n\n#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION)\n    #undef JSON_HEDLEY_VERSION_DECODE_REVISION\n#endif\n#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000)\n\n#if defined(JSON_HEDLEY_GNUC_VERSION)\n    #undef JSON_HEDLEY_GNUC_VERSION\n#endif\n#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__)\n    #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)\n#elif defined(__GNUC__)\n    #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK)\n    #undef JSON_HEDLEY_GNUC_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_GNUC_VERSION)\n    #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_MSVC_VERSION)\n    #undef JSON_HEDLEY_MSVC_VERSION\n#endif\n#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL)\n    #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100)\n#elif defined(_MSC_FULL_VER) && !defined(__ICL)\n    #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10)\n#elif defined(_MSC_VER) && !defined(__ICL)\n    #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0)\n#endif\n\n#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK)\n    #undef JSON_HEDLEY_MSVC_VERSION_CHECK\n#endif\n#if !defined(JSON_HEDLEY_MSVC_VERSION)\n    #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0)\n#elif defined(_MSC_VER) && (_MSC_VER >= 1400)\n    #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch)))\n#elif defined(_MSC_VER) && (_MSC_VER >= 1200)\n    #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch)))\n#else\n    #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor)))\n#endif\n\n#if defined(JSON_HEDLEY_INTEL_VERSION)\n    #undef JSON_HEDLEY_INTEL_VERSION\n#endif\n#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL)\n    #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE)\n#elif defined(__INTEL_COMPILER) && !defined(__ICL)\n    #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0)\n#endif\n\n#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK)\n    #undef JSON_HEDLEY_INTEL_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_INTEL_VERSION)\n    #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_INTEL_CL_VERSION)\n    #undef JSON_HEDLEY_INTEL_CL_VERSION\n#endif\n#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL)\n    #define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0)\n#endif\n\n#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK)\n    #undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_INTEL_CL_VERSION)\n    #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_PGI_VERSION)\n    #undef JSON_HEDLEY_PGI_VERSION\n#endif\n#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)\n    #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__)\n#endif\n\n#if defined(JSON_HEDLEY_PGI_VERSION_CHECK)\n    #undef JSON_HEDLEY_PGI_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_PGI_VERSION)\n    #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_SUNPRO_VERSION)\n    #undef JSON_HEDLEY_SUNPRO_VERSION\n#endif\n#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000)\n    #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10)\n#elif defined(__SUNPRO_C)\n    #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf)\n#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000)\n    #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10)\n#elif defined(__SUNPRO_CC)\n    #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf)\n#endif\n\n#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK)\n    #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_SUNPRO_VERSION)\n    #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION)\n    #undef JSON_HEDLEY_EMSCRIPTEN_VERSION\n#endif\n#if defined(__EMSCRIPTEN__)\n    #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__)\n#endif\n\n#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK)\n    #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION)\n    #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_ARM_VERSION)\n    #undef JSON_HEDLEY_ARM_VERSION\n#endif\n#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION)\n    #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100)\n#elif defined(__CC_ARM) && defined(__ARMCC_VERSION)\n    #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100)\n#endif\n\n#if defined(JSON_HEDLEY_ARM_VERSION_CHECK)\n    #undef JSON_HEDLEY_ARM_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_ARM_VERSION)\n    #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_IBM_VERSION)\n    #undef JSON_HEDLEY_IBM_VERSION\n#endif\n#if defined(__ibmxl__)\n    #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__)\n#elif defined(__xlC__) && defined(__xlC_ver__)\n    #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff)\n#elif defined(__xlC__)\n    #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0)\n#endif\n\n#if defined(JSON_HEDLEY_IBM_VERSION_CHECK)\n    #undef JSON_HEDLEY_IBM_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_IBM_VERSION)\n    #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_TI_VERSION)\n    #undef JSON_HEDLEY_TI_VERSION\n#endif\n#if \\\n    defined(__TI_COMPILER_VERSION__) && \\\n    ( \\\n      defined(__TMS470__) || defined(__TI_ARM__) || \\\n      defined(__MSP430__) || \\\n      defined(__TMS320C2000__) \\\n    )\n#if (__TI_COMPILER_VERSION__ >= 16000000)\n    #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))\n#endif\n#endif\n\n#if defined(JSON_HEDLEY_TI_VERSION_CHECK)\n    #undef JSON_HEDLEY_TI_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_TI_VERSION)\n    #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_TI_CL2000_VERSION)\n    #undef JSON_HEDLEY_TI_CL2000_VERSION\n#endif\n#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__)\n    #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))\n#endif\n\n#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK)\n    #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_TI_CL2000_VERSION)\n    #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_TI_CL430_VERSION)\n    #undef JSON_HEDLEY_TI_CL430_VERSION\n#endif\n#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__)\n    #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))\n#endif\n\n#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK)\n    #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_TI_CL430_VERSION)\n    #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_TI_ARMCL_VERSION)\n    #undef JSON_HEDLEY_TI_ARMCL_VERSION\n#endif\n#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__))\n    #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))\n#endif\n\n#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK)\n    #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_TI_ARMCL_VERSION)\n    #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_TI_CL6X_VERSION)\n    #undef JSON_HEDLEY_TI_CL6X_VERSION\n#endif\n#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__)\n    #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))\n#endif\n\n#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK)\n    #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_TI_CL6X_VERSION)\n    #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_TI_CL7X_VERSION)\n    #undef JSON_HEDLEY_TI_CL7X_VERSION\n#endif\n#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__)\n    #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))\n#endif\n\n#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK)\n    #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_TI_CL7X_VERSION)\n    #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_TI_CLPRU_VERSION)\n    #undef JSON_HEDLEY_TI_CLPRU_VERSION\n#endif\n#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__)\n    #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))\n#endif\n\n#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK)\n    #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_TI_CLPRU_VERSION)\n    #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_CRAY_VERSION)\n    #undef JSON_HEDLEY_CRAY_VERSION\n#endif\n#if defined(_CRAYC)\n    #if defined(_RELEASE_PATCHLEVEL)\n        #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL)\n    #else\n        #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0)\n    #endif\n#endif\n\n#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK)\n    #undef JSON_HEDLEY_CRAY_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_CRAY_VERSION)\n    #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_IAR_VERSION)\n    #undef JSON_HEDLEY_IAR_VERSION\n#endif\n#if defined(__IAR_SYSTEMS_ICC__)\n    #if __VER__ > 1000\n        #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000))\n    #else\n        #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100, __VER__ % 100, 0)\n    #endif\n#endif\n\n#if defined(JSON_HEDLEY_IAR_VERSION_CHECK)\n    #undef JSON_HEDLEY_IAR_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_IAR_VERSION)\n    #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_TINYC_VERSION)\n    #undef JSON_HEDLEY_TINYC_VERSION\n#endif\n#if defined(__TINYC__)\n    #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100)\n#endif\n\n#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK)\n    #undef JSON_HEDLEY_TINYC_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_TINYC_VERSION)\n    #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_DMC_VERSION)\n    #undef JSON_HEDLEY_DMC_VERSION\n#endif\n#if defined(__DMC__)\n    #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf)\n#endif\n\n#if defined(JSON_HEDLEY_DMC_VERSION_CHECK)\n    #undef JSON_HEDLEY_DMC_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_DMC_VERSION)\n    #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_COMPCERT_VERSION)\n    #undef JSON_HEDLEY_COMPCERT_VERSION\n#endif\n#if defined(__COMPCERT_VERSION__)\n    #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100)\n#endif\n\n#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK)\n    #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_COMPCERT_VERSION)\n    #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_PELLES_VERSION)\n    #undef JSON_HEDLEY_PELLES_VERSION\n#endif\n#if defined(__POCC__)\n    #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0)\n#endif\n\n#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK)\n    #undef JSON_HEDLEY_PELLES_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_PELLES_VERSION)\n    #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_MCST_LCC_VERSION)\n    #undef JSON_HEDLEY_MCST_LCC_VERSION\n#endif\n#if defined(__LCC__) && defined(__LCC_MINOR__)\n    #define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__)\n#endif\n\n#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK)\n    #undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_MCST_LCC_VERSION)\n    #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_VERSION)\n    #undef JSON_HEDLEY_GCC_VERSION\n#endif\n#if \\\n    defined(JSON_HEDLEY_GNUC_VERSION) && \\\n    !defined(__clang__) && \\\n    !defined(JSON_HEDLEY_INTEL_VERSION) && \\\n    !defined(JSON_HEDLEY_PGI_VERSION) && \\\n    !defined(JSON_HEDLEY_ARM_VERSION) && \\\n    !defined(JSON_HEDLEY_CRAY_VERSION) && \\\n    !defined(JSON_HEDLEY_TI_VERSION) && \\\n    !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \\\n    !defined(JSON_HEDLEY_TI_CL430_VERSION) && \\\n    !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \\\n    !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \\\n    !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \\\n    !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \\\n    !defined(__COMPCERT__) && \\\n    !defined(JSON_HEDLEY_MCST_LCC_VERSION)\n    #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION\n#endif\n\n#if defined(JSON_HEDLEY_GCC_VERSION_CHECK)\n    #undef JSON_HEDLEY_GCC_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_GCC_VERSION)\n    #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_ATTRIBUTE)\n    #undef JSON_HEDLEY_HAS_ATTRIBUTE\n#endif\n#if \\\n  defined(__has_attribute) && \\\n  ( \\\n    (!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9)) \\\n  )\n#  define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute)\n#else\n#  define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE)\n    #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE\n#endif\n#if defined(__has_attribute)\n    #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE)\n    #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE\n#endif\n#if defined(__has_attribute)\n    #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute)\n#else\n    #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE)\n    #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE\n#endif\n#if \\\n    defined(__has_cpp_attribute) && \\\n    defined(__cplusplus) && \\\n    (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0))\n    #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute)\n#else\n    #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS)\n    #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS\n#endif\n#if !defined(__cplusplus) || !defined(__has_cpp_attribute)\n    #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0)\n#elif \\\n    !defined(JSON_HEDLEY_PGI_VERSION) && \\\n    !defined(JSON_HEDLEY_IAR_VERSION) && \\\n    (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \\\n    (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0))\n    #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute)\n#else\n    #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE)\n    #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE\n#endif\n#if defined(__has_cpp_attribute) && defined(__cplusplus)\n    #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE)\n    #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE\n#endif\n#if defined(__has_cpp_attribute) && defined(__cplusplus)\n    #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)\n#else\n    #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_BUILTIN)\n    #undef JSON_HEDLEY_HAS_BUILTIN\n#endif\n#if defined(__has_builtin)\n    #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin)\n#else\n    #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN)\n    #undef JSON_HEDLEY_GNUC_HAS_BUILTIN\n#endif\n#if defined(__has_builtin)\n    #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN)\n    #undef JSON_HEDLEY_GCC_HAS_BUILTIN\n#endif\n#if defined(__has_builtin)\n    #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)\n#else\n    #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_FEATURE)\n    #undef JSON_HEDLEY_HAS_FEATURE\n#endif\n#if defined(__has_feature)\n    #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature)\n#else\n    #define JSON_HEDLEY_HAS_FEATURE(feature) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE)\n    #undef JSON_HEDLEY_GNUC_HAS_FEATURE\n#endif\n#if defined(__has_feature)\n    #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_FEATURE)\n    #undef JSON_HEDLEY_GCC_HAS_FEATURE\n#endif\n#if defined(__has_feature)\n    #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)\n#else\n    #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_EXTENSION)\n    #undef JSON_HEDLEY_HAS_EXTENSION\n#endif\n#if defined(__has_extension)\n    #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension)\n#else\n    #define JSON_HEDLEY_HAS_EXTENSION(extension) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION)\n    #undef JSON_HEDLEY_GNUC_HAS_EXTENSION\n#endif\n#if defined(__has_extension)\n    #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION)\n    #undef JSON_HEDLEY_GCC_HAS_EXTENSION\n#endif\n#if defined(__has_extension)\n    #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)\n#else\n    #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE)\n    #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE\n#endif\n#if defined(__has_declspec_attribute)\n    #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute)\n#else\n    #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE)\n    #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE\n#endif\n#if defined(__has_declspec_attribute)\n    #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE)\n    #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE\n#endif\n#if defined(__has_declspec_attribute)\n    #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)\n#else\n    #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_WARNING)\n    #undef JSON_HEDLEY_HAS_WARNING\n#endif\n#if defined(__has_warning)\n    #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning)\n#else\n    #define JSON_HEDLEY_HAS_WARNING(warning) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_WARNING)\n    #undef JSON_HEDLEY_GNUC_HAS_WARNING\n#endif\n#if defined(__has_warning)\n    #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_WARNING)\n    #undef JSON_HEDLEY_GCC_HAS_WARNING\n#endif\n#if defined(__has_warning)\n    #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)\n#else\n    #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if \\\n    (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \\\n    defined(__clang__) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n    JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \\\n    JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR))\n    #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value)\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)\n    #define JSON_HEDLEY_PRAGMA(value) __pragma(value)\n#else\n    #define JSON_HEDLEY_PRAGMA(value)\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH)\n    #undef JSON_HEDLEY_DIAGNOSTIC_PUSH\n#endif\n#if defined(JSON_HEDLEY_DIAGNOSTIC_POP)\n    #undef JSON_HEDLEY_DIAGNOSTIC_POP\n#endif\n#if defined(__clang__)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"clang diagnostic push\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"clang diagnostic pop\")\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"warning(push)\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"warning(pop)\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"GCC diagnostic push\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"GCC diagnostic pop\")\n#elif \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push))\n    #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop))\n#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"push\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"pop\")\n#elif \\\n    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"diag_push\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"diag_pop\")\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"warning(push)\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"warning(pop)\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH\n    #define JSON_HEDLEY_DIAGNOSTIC_POP\n#endif\n\n/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for\n   HEDLEY INTERNAL USE ONLY.  API subject to change without notice. */\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_\n#endif\n#if defined(__cplusplus)\n#  if JSON_HEDLEY_HAS_WARNING(\"-Wc++98-compat\")\n#    if JSON_HEDLEY_HAS_WARNING(\"-Wc++17-extensions\")\n#      if JSON_HEDLEY_HAS_WARNING(\"-Wc++1z-extensions\")\n#        define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wc++98-compat\\\"\") \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wc++17-extensions\\\"\") \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wc++1z-extensions\\\"\") \\\n    xpr \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#      else\n#        define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wc++98-compat\\\"\") \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wc++17-extensions\\\"\") \\\n    xpr \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#      endif\n#    else\n#      define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wc++98-compat\\\"\") \\\n    xpr \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#    endif\n#  endif\n#endif\n#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x\n#endif\n\n#if defined(JSON_HEDLEY_CONST_CAST)\n    #undef JSON_HEDLEY_CONST_CAST\n#endif\n#if defined(__cplusplus)\n#  define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast<T>(expr))\n#elif \\\n  JSON_HEDLEY_HAS_WARNING(\"-Wcast-qual\") || \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \\\n  JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n#  define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \\\n        JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n        JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \\\n        ((T) (expr)); \\\n        JSON_HEDLEY_DIAGNOSTIC_POP \\\n    }))\n#else\n#  define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr))\n#endif\n\n#if defined(JSON_HEDLEY_REINTERPRET_CAST)\n    #undef JSON_HEDLEY_REINTERPRET_CAST\n#endif\n#if defined(__cplusplus)\n    #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast<T>(expr))\n#else\n    #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr))\n#endif\n\n#if defined(JSON_HEDLEY_STATIC_CAST)\n    #undef JSON_HEDLEY_STATIC_CAST\n#endif\n#if defined(__cplusplus)\n    #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast<T>(expr))\n#else\n    #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr))\n#endif\n\n#if defined(JSON_HEDLEY_CPP_CAST)\n    #undef JSON_HEDLEY_CPP_CAST\n#endif\n#if defined(__cplusplus)\n#  if JSON_HEDLEY_HAS_WARNING(\"-Wold-style-cast\")\n#    define JSON_HEDLEY_CPP_CAST(T, expr) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wold-style-cast\\\"\") \\\n    ((T) (expr)) \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#  elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0)\n#    define JSON_HEDLEY_CPP_CAST(T, expr) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    _Pragma(\"diag_suppress=Pe137\") \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#  else\n#    define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr))\n#  endif\n#else\n#  define JSON_HEDLEY_CPP_CAST(T, expr) (expr)\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wdeprecated-declarations\")\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"clang diagnostic ignored \\\"-Wdeprecated-declarations\\\"\")\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"warning(disable:1478 1786)\")\n#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786))\n#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"diag_suppress 1215,1216,1444,1445\")\n#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"diag_suppress 1215,1444\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"GCC diagnostic ignored \\\"-Wdeprecated-declarations\\\"\")\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996))\n#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"diag_suppress 1215,1444\")\n#elif \\\n    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"diag_suppress 1291,1718\")\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)\")\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"error_messages(off,symdeprecated,symdeprecated2)\")\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"diag_suppress=Pe1444,Pe1215\")\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"warn(disable:2241)\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wunknown-pragmas\")\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"clang diagnostic ignored \\\"-Wunknown-pragmas\\\"\")\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"warning(disable:161)\")\n#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:161))\n#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"diag_suppress 1675\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"GCC diagnostic ignored \\\"-Wunknown-pragmas\\\"\")\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068))\n#elif \\\n    JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"diag_suppress 163\")\n#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"diag_suppress 163\")\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"diag_suppress=Pe161\")\n#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"diag_suppress 161\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wunknown-attributes\")\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"clang diagnostic ignored \\\"-Wunknown-attributes\\\"\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"GCC diagnostic ignored \\\"-Wdeprecated-declarations\\\"\")\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"warning(disable:1292)\")\n#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:1292))\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030))\n#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"diag_suppress 1097,1098\")\n#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"diag_suppress 1097\")\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"error_messages(off,attrskipunsup)\")\n#elif \\\n    JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"diag_suppress 1173\")\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"diag_suppress=Pe1097\")\n#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"diag_suppress 1097\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wcast-qual\")\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma(\"clang diagnostic ignored \\\"-Wcast-qual\\\"\")\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma(\"warning(disable:2203 2331)\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma(\"GCC diagnostic ignored \\\"-Wcast-qual\\\"\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wunused-function\")\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma(\"clang diagnostic ignored \\\"-Wunused-function\\\"\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma(\"GCC diagnostic ignored \\\"-Wunused-function\\\"\")\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505))\n#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma(\"diag_suppress 3142\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION\n#endif\n\n#if defined(JSON_HEDLEY_DEPRECATED)\n    #undef JSON_HEDLEY_DEPRECATED\n#endif\n#if defined(JSON_HEDLEY_DEPRECATED_FOR)\n    #undef JSON_HEDLEY_DEPRECATED_FOR\n#endif\n#if \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated(\"Since \" # since))\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated(\"Since \" #since \"; use \" #replacement))\n#elif \\\n    (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__(\"Since \" #since)))\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__(\"Since \" #since \"; use \" #replacement)))\n#elif defined(__cplusplus) && (__cplusplus >= 201402L)\n    #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated(\"Since \" #since)]])\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated(\"Since \" #since \"; use \" #replacement)]])\n#elif \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \\\n    JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)\n    #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__))\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__))\n#elif \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \\\n    JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated)\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated)\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DEPRECATED(since) _Pragma(\"deprecated\")\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma(\"deprecated\")\n#else\n    #define JSON_HEDLEY_DEPRECATED(since)\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement)\n#endif\n\n#if defined(JSON_HEDLEY_UNAVAILABLE)\n    #undef JSON_HEDLEY_UNAVAILABLE\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__(\"Not available until \" #available_since)))\n#else\n    #define JSON_HEDLEY_UNAVAILABLE(available_since)\n#endif\n\n#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT)\n    #undef JSON_HEDLEY_WARN_UNUSED_RESULT\n#endif\n#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG)\n    #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n    (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__))\n#elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L)\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]])\n#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard)\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])\n#elif defined(_Check_return_) /* SAL */\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_\n#else\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg)\n#endif\n\n#if defined(JSON_HEDLEY_SENTINEL)\n    #undef JSON_HEDLEY_SENTINEL\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position)))\n#else\n    #define JSON_HEDLEY_SENTINEL(position)\n#endif\n\n#if defined(JSON_HEDLEY_NO_RETURN)\n    #undef JSON_HEDLEY_NO_RETURN\n#endif\n#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_NO_RETURN __noreturn\n#elif \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__))\n#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L\n    #define JSON_HEDLEY_NO_RETURN _Noreturn\n#elif defined(__cplusplus) && (__cplusplus >= 201103L)\n    #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]])\n#elif \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n    JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)\n    #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__))\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)\n    #define JSON_HEDLEY_NO_RETURN _Pragma(\"does_not_return\")\n#elif \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_NO_RETURN __declspec(noreturn)\n#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus)\n    #define JSON_HEDLEY_NO_RETURN _Pragma(\"FUNC_NEVER_RETURNS;\")\n#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)\n    #define JSON_HEDLEY_NO_RETURN __attribute((noreturn))\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0)\n    #define JSON_HEDLEY_NO_RETURN __declspec(noreturn)\n#else\n    #define JSON_HEDLEY_NO_RETURN\n#endif\n\n#if defined(JSON_HEDLEY_NO_ESCAPE)\n    #undef JSON_HEDLEY_NO_ESCAPE\n#endif\n#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape)\n    #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__))\n#else\n    #define JSON_HEDLEY_NO_ESCAPE\n#endif\n\n#if defined(JSON_HEDLEY_UNREACHABLE)\n    #undef JSON_HEDLEY_UNREACHABLE\n#endif\n#if defined(JSON_HEDLEY_UNREACHABLE_RETURN)\n    #undef JSON_HEDLEY_UNREACHABLE_RETURN\n#endif\n#if defined(JSON_HEDLEY_ASSUME)\n    #undef JSON_HEDLEY_ASSUME\n#endif\n#if \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_ASSUME(expr) __assume(expr)\n#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume)\n    #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr)\n#elif \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0)\n    #if defined(__cplusplus)\n        #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr)\n    #else\n        #define JSON_HEDLEY_ASSUME(expr) _nassert(expr)\n    #endif\n#endif\n#if \\\n    (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) || \\\n    JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable()\n#elif defined(JSON_HEDLEY_ASSUME)\n    #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0)\n#endif\n#if !defined(JSON_HEDLEY_ASSUME)\n    #if defined(JSON_HEDLEY_UNREACHABLE)\n        #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1)))\n    #else\n        #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr)\n    #endif\n#endif\n#if defined(JSON_HEDLEY_UNREACHABLE)\n    #if  \\\n        JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \\\n        JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0)\n        #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value))\n    #else\n        #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE()\n    #endif\n#else\n    #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value)\n#endif\n#if !defined(JSON_HEDLEY_UNREACHABLE)\n    #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0)\n#endif\n\nJSON_HEDLEY_DIAGNOSTIC_PUSH\n#if JSON_HEDLEY_HAS_WARNING(\"-Wpedantic\")\n    #pragma clang diagnostic ignored \"-Wpedantic\"\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wc++98-compat-pedantic\") && defined(__cplusplus)\n    #pragma clang diagnostic ignored \"-Wc++98-compat-pedantic\"\n#endif\n#if JSON_HEDLEY_GCC_HAS_WARNING(\"-Wvariadic-macros\",4,0,0)\n    #if defined(__clang__)\n        #pragma clang diagnostic ignored \"-Wvariadic-macros\"\n    #elif defined(JSON_HEDLEY_GCC_VERSION)\n        #pragma GCC diagnostic ignored \"-Wvariadic-macros\"\n    #endif\n#endif\n#if defined(JSON_HEDLEY_NON_NULL)\n    #undef JSON_HEDLEY_NON_NULL\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)\n    #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__)))\n#else\n    #define JSON_HEDLEY_NON_NULL(...)\n#endif\nJSON_HEDLEY_DIAGNOSTIC_POP\n\n#if defined(JSON_HEDLEY_PRINTF_FORMAT)\n    #undef JSON_HEDLEY_PRINTF_FORMAT\n#endif\n#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO)\n    #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check)))\n#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO)\n    #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check)))\n#elif \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(format) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check)))\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0)\n    #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check))\n#else\n    #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)\n#endif\n\n#if defined(JSON_HEDLEY_CONSTEXPR)\n    #undef JSON_HEDLEY_CONSTEXPR\n#endif\n#if defined(__cplusplus)\n    #if __cplusplus >= 201103L\n        #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr)\n    #endif\n#endif\n#if !defined(JSON_HEDLEY_CONSTEXPR)\n    #define JSON_HEDLEY_CONSTEXPR\n#endif\n\n#if defined(JSON_HEDLEY_PREDICT)\n    #undef JSON_HEDLEY_PREDICT\n#endif\n#if defined(JSON_HEDLEY_LIKELY)\n    #undef JSON_HEDLEY_LIKELY\n#endif\n#if defined(JSON_HEDLEY_UNLIKELY)\n    #undef JSON_HEDLEY_UNLIKELY\n#endif\n#if defined(JSON_HEDLEY_UNPREDICTABLE)\n    #undef JSON_HEDLEY_UNPREDICTABLE\n#endif\n#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable)\n    #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr))\n#endif\n#if \\\n  (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) && !defined(JSON_HEDLEY_PGI_VERSION)) || \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) || \\\n  JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n#  define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability(  (expr), (value), (probability))\n#  define JSON_HEDLEY_PREDICT_TRUE(expr, probability)   __builtin_expect_with_probability(!!(expr),    1   , (probability))\n#  define JSON_HEDLEY_PREDICT_FALSE(expr, probability)  __builtin_expect_with_probability(!!(expr),    0   , (probability))\n#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )\n#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )\n#elif \\\n  (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \\\n  JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n  (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \\\n  JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n  JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n  JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n  JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \\\n  JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \\\n  JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \\\n  JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \\\n  JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n  JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n  JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \\\n  JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \\\n  JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n#  define JSON_HEDLEY_PREDICT(expr, expected, probability) \\\n    (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)))\n#  define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \\\n    (__extension__ ({ \\\n        double hedley_probability_ = (probability); \\\n        ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \\\n    }))\n#  define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \\\n    (__extension__ ({ \\\n        double hedley_probability_ = (probability); \\\n        ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \\\n    }))\n#  define JSON_HEDLEY_LIKELY(expr)   __builtin_expect(!!(expr), 1)\n#  define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0)\n#else\n#  define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))\n#  define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr))\n#  define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr))\n#  define JSON_HEDLEY_LIKELY(expr) (!!(expr))\n#  define JSON_HEDLEY_UNLIKELY(expr) (!!(expr))\n#endif\n#if !defined(JSON_HEDLEY_UNPREDICTABLE)\n    #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5)\n#endif\n\n#if defined(JSON_HEDLEY_MALLOC)\n    #undef JSON_HEDLEY_MALLOC\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_MALLOC __attribute__((__malloc__))\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)\n    #define JSON_HEDLEY_MALLOC _Pragma(\"returns_new_memory\")\n#elif \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_MALLOC __declspec(restrict)\n#else\n    #define JSON_HEDLEY_MALLOC\n#endif\n\n#if defined(JSON_HEDLEY_PURE)\n    #undef JSON_HEDLEY_PURE\n#endif\n#if \\\n  JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \\\n  JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n  JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n  JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n  JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n  JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n  (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n  JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n  (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n  JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n  (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n  JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n  (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n  JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \\\n  JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n  JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n  JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \\\n  JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n#  define JSON_HEDLEY_PURE __attribute__((__pure__))\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)\n#  define JSON_HEDLEY_PURE _Pragma(\"does_not_write_global_data\")\n#elif defined(__cplusplus) && \\\n    ( \\\n      JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \\\n      JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \\\n      JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \\\n    )\n#  define JSON_HEDLEY_PURE _Pragma(\"FUNC_IS_PURE;\")\n#else\n#  define JSON_HEDLEY_PURE\n#endif\n\n#if defined(JSON_HEDLEY_CONST)\n    #undef JSON_HEDLEY_CONST\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(const) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_CONST __attribute__((__const__))\n#elif \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)\n    #define JSON_HEDLEY_CONST _Pragma(\"no_side_effect\")\n#else\n    #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE\n#endif\n\n#if defined(JSON_HEDLEY_RESTRICT)\n    #undef JSON_HEDLEY_RESTRICT\n#endif\n#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus)\n    #define JSON_HEDLEY_RESTRICT restrict\n#elif \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \\\n    JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \\\n    defined(__clang__) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_RESTRICT __restrict\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus)\n    #define JSON_HEDLEY_RESTRICT _Restrict\n#else\n    #define JSON_HEDLEY_RESTRICT\n#endif\n\n#if defined(JSON_HEDLEY_INLINE)\n    #undef JSON_HEDLEY_INLINE\n#endif\n#if \\\n    (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \\\n    (defined(__cplusplus) && (__cplusplus >= 199711L))\n    #define JSON_HEDLEY_INLINE inline\n#elif \\\n    defined(JSON_HEDLEY_GCC_VERSION) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0)\n    #define JSON_HEDLEY_INLINE __inline__\n#elif \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_INLINE __inline\n#else\n    #define JSON_HEDLEY_INLINE\n#endif\n\n#if defined(JSON_HEDLEY_ALWAYS_INLINE)\n    #undef JSON_HEDLEY_ALWAYS_INLINE\n#endif\n#if \\\n  JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \\\n  JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n  JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n  JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n  JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n  JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n  (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n  JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n  (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n  JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n  (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n  JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n  (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n  JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \\\n  JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n  JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n  JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \\\n  JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)\n#  define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE\n#elif \\\n  JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \\\n  JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n#  define JSON_HEDLEY_ALWAYS_INLINE __forceinline\n#elif defined(__cplusplus) && \\\n    ( \\\n      JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n      JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n      JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n      JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \\\n      JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n      JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \\\n    )\n#  define JSON_HEDLEY_ALWAYS_INLINE _Pragma(\"FUNC_ALWAYS_INLINE;\")\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n#  define JSON_HEDLEY_ALWAYS_INLINE _Pragma(\"inline=forced\")\n#else\n#  define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE\n#endif\n\n#if defined(JSON_HEDLEY_NEVER_INLINE)\n    #undef JSON_HEDLEY_NEVER_INLINE\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \\\n    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \\\n    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \\\n    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \\\n    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \\\n    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \\\n    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \\\n    JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)\n    #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__))\n#elif \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline)\n#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0)\n    #define JSON_HEDLEY_NEVER_INLINE _Pragma(\"noinline\")\n#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus)\n    #define JSON_HEDLEY_NEVER_INLINE _Pragma(\"FUNC_CANNOT_INLINE;\")\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_NEVER_INLINE _Pragma(\"inline=never\")\n#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)\n    #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline))\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0)\n    #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline)\n#else\n    #define JSON_HEDLEY_NEVER_INLINE\n#endif\n\n#if defined(JSON_HEDLEY_PRIVATE)\n    #undef JSON_HEDLEY_PRIVATE\n#endif\n#if defined(JSON_HEDLEY_PUBLIC)\n    #undef JSON_HEDLEY_PUBLIC\n#endif\n#if defined(JSON_HEDLEY_IMPORT)\n    #undef JSON_HEDLEY_IMPORT\n#endif\n#if defined(_WIN32) || defined(__CYGWIN__)\n#  define JSON_HEDLEY_PRIVATE\n#  define JSON_HEDLEY_PUBLIC   __declspec(dllexport)\n#  define JSON_HEDLEY_IMPORT   __declspec(dllimport)\n#else\n#  if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \\\n    ( \\\n      defined(__TI_EABI__) && \\\n      ( \\\n        (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n        JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \\\n      ) \\\n    ) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n#    define JSON_HEDLEY_PRIVATE __attribute__((__visibility__(\"hidden\")))\n#    define JSON_HEDLEY_PUBLIC  __attribute__((__visibility__(\"default\")))\n#  else\n#    define JSON_HEDLEY_PRIVATE\n#    define JSON_HEDLEY_PUBLIC\n#  endif\n#  define JSON_HEDLEY_IMPORT    extern\n#endif\n\n#if defined(JSON_HEDLEY_NO_THROW)\n    #undef JSON_HEDLEY_NO_THROW\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__))\n#elif \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)\n    #define JSON_HEDLEY_NO_THROW __declspec(nothrow)\n#else\n    #define JSON_HEDLEY_NO_THROW\n#endif\n\n#if defined(JSON_HEDLEY_FALL_THROUGH)\n    #undef JSON_HEDLEY_FALL_THROUGH\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__))\n#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough)\n    #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]])\n#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough)\n    #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]])\n#elif defined(__fallthrough) /* SAL */\n    #define JSON_HEDLEY_FALL_THROUGH __fallthrough\n#else\n    #define JSON_HEDLEY_FALL_THROUGH\n#endif\n\n#if defined(JSON_HEDLEY_RETURNS_NON_NULL)\n    #undef JSON_HEDLEY_RETURNS_NON_NULL\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__))\n#elif defined(_Ret_notnull_) /* SAL */\n    #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_\n#else\n    #define JSON_HEDLEY_RETURNS_NON_NULL\n#endif\n\n#if defined(JSON_HEDLEY_ARRAY_PARAM)\n    #undef JSON_HEDLEY_ARRAY_PARAM\n#endif\n#if \\\n    defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \\\n    !defined(__STDC_NO_VLA__) && \\\n    !defined(__cplusplus) && \\\n    !defined(JSON_HEDLEY_PGI_VERSION) && \\\n    !defined(JSON_HEDLEY_TINYC_VERSION)\n    #define JSON_HEDLEY_ARRAY_PARAM(name) (name)\n#else\n    #define JSON_HEDLEY_ARRAY_PARAM(name)\n#endif\n\n#if defined(JSON_HEDLEY_IS_CONSTANT)\n    #undef JSON_HEDLEY_IS_CONSTANT\n#endif\n#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR)\n    #undef JSON_HEDLEY_REQUIRE_CONSTEXPR\n#endif\n/* JSON_HEDLEY_IS_CONSTEXPR_ is for\n   HEDLEY INTERNAL USE ONLY.  API subject to change without notice. */\n#if defined(JSON_HEDLEY_IS_CONSTEXPR_)\n    #undef JSON_HEDLEY_IS_CONSTEXPR_\n#endif\n#if \\\n    JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \\\n    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \\\n    (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \\\n    JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \\\n    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)\n    #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr)\n#endif\n#if !defined(__cplusplus)\n#  if \\\n       JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \\\n       JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \\\n       JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n       JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \\\n       JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \\\n       JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \\\n       JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24)\n#if defined(__INTPTR_TYPE__)\n    #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*)\n#else\n    #include <stdint.h>\n    #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*)\n#endif\n#  elif \\\n       ( \\\n          defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \\\n          !defined(JSON_HEDLEY_SUNPRO_VERSION) && \\\n          !defined(JSON_HEDLEY_PGI_VERSION) && \\\n          !defined(JSON_HEDLEY_IAR_VERSION)) || \\\n       (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) || \\\n       JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \\\n       JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \\\n       JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \\\n       JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0)\n#if defined(__INTPTR_TYPE__)\n    #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0)\n#else\n    #include <stdint.h>\n    #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0)\n#endif\n#  elif \\\n       defined(JSON_HEDLEY_GCC_VERSION) || \\\n       defined(JSON_HEDLEY_INTEL_VERSION) || \\\n       defined(JSON_HEDLEY_TINYC_VERSION) || \\\n       defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \\\n       JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \\\n       defined(JSON_HEDLEY_TI_CL2000_VERSION) || \\\n       defined(JSON_HEDLEY_TI_CL6X_VERSION) || \\\n       defined(JSON_HEDLEY_TI_CL7X_VERSION) || \\\n       defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \\\n       defined(__clang__)\n#    define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \\\n        sizeof(void) != \\\n        sizeof(*( \\\n                  1 ? \\\n                  ((void*) ((expr) * 0L) ) : \\\n((struct { char v[sizeof(void) * 2]; } *) 1) \\\n                ) \\\n              ) \\\n                                            )\n#  endif\n#endif\n#if defined(JSON_HEDLEY_IS_CONSTEXPR_)\n    #if !defined(JSON_HEDLEY_IS_CONSTANT)\n        #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr)\n    #endif\n    #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1))\n#else\n    #if !defined(JSON_HEDLEY_IS_CONSTANT)\n        #define JSON_HEDLEY_IS_CONSTANT(expr) (0)\n    #endif\n    #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr)\n#endif\n\n#if defined(JSON_HEDLEY_BEGIN_C_DECLS)\n    #undef JSON_HEDLEY_BEGIN_C_DECLS\n#endif\n#if defined(JSON_HEDLEY_END_C_DECLS)\n    #undef JSON_HEDLEY_END_C_DECLS\n#endif\n#if defined(JSON_HEDLEY_C_DECL)\n    #undef JSON_HEDLEY_C_DECL\n#endif\n#if defined(__cplusplus)\n    #define JSON_HEDLEY_BEGIN_C_DECLS extern \"C\" {\n    #define JSON_HEDLEY_END_C_DECLS }\n    #define JSON_HEDLEY_C_DECL extern \"C\"\n#else\n    #define JSON_HEDLEY_BEGIN_C_DECLS\n    #define JSON_HEDLEY_END_C_DECLS\n    #define JSON_HEDLEY_C_DECL\n#endif\n\n#if defined(JSON_HEDLEY_STATIC_ASSERT)\n    #undef JSON_HEDLEY_STATIC_ASSERT\n#endif\n#if \\\n  !defined(__cplusplus) && ( \\\n      (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \\\n      (JSON_HEDLEY_HAS_FEATURE(c_static_assert) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \\\n      JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \\\n      JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n      defined(_Static_assert) \\\n    )\n#  define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message)\n#elif \\\n  (defined(__cplusplus) && (__cplusplus >= 201103L)) || \\\n  JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \\\n  JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n#  define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message))\n#else\n#  define JSON_HEDLEY_STATIC_ASSERT(expr, message)\n#endif\n\n#if defined(JSON_HEDLEY_NULL)\n    #undef JSON_HEDLEY_NULL\n#endif\n#if defined(__cplusplus)\n    #if __cplusplus >= 201103L\n        #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr)\n    #elif defined(NULL)\n        #define JSON_HEDLEY_NULL NULL\n    #else\n        #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0)\n    #endif\n#elif defined(NULL)\n    #define JSON_HEDLEY_NULL NULL\n#else\n    #define JSON_HEDLEY_NULL ((void*) 0)\n#endif\n\n#if defined(JSON_HEDLEY_MESSAGE)\n    #undef JSON_HEDLEY_MESSAGE\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wunknown-pragmas\")\n#  define JSON_HEDLEY_MESSAGE(msg) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \\\n    JSON_HEDLEY_PRAGMA(message msg) \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#elif \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \\\n  JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n#  define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg)\n#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0)\n#  define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg)\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n#  define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg))\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0)\n#  define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg))\n#else\n#  define JSON_HEDLEY_MESSAGE(msg)\n#endif\n\n#if defined(JSON_HEDLEY_WARNING)\n    #undef JSON_HEDLEY_WARNING\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wunknown-pragmas\")\n#  define JSON_HEDLEY_WARNING(msg) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \\\n    JSON_HEDLEY_PRAGMA(clang warning msg) \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#elif \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \\\n  JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \\\n  JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n#  define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg)\n#elif \\\n  JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \\\n  JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n#  define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg))\n#else\n#  define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg)\n#endif\n\n#if defined(JSON_HEDLEY_REQUIRE)\n    #undef JSON_HEDLEY_REQUIRE\n#endif\n#if defined(JSON_HEDLEY_REQUIRE_MSG)\n    #undef JSON_HEDLEY_REQUIRE_MSG\n#endif\n#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if)\n#  if JSON_HEDLEY_HAS_WARNING(\"-Wgcc-compat\")\n#    define JSON_HEDLEY_REQUIRE(expr) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wgcc-compat\\\"\") \\\n    __attribute__((diagnose_if(!(expr), #expr, \"error\"))) \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#    define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wgcc-compat\\\"\") \\\n    __attribute__((diagnose_if(!(expr), msg, \"error\"))) \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#  else\n#    define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, \"error\")))\n#    define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, \"error\")))\n#  endif\n#else\n#  define JSON_HEDLEY_REQUIRE(expr)\n#  define JSON_HEDLEY_REQUIRE_MSG(expr,msg)\n#endif\n\n#if defined(JSON_HEDLEY_FLAGS)\n    #undef JSON_HEDLEY_FLAGS\n#endif\n#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) && (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING(\"-Wbitfield-enum-conversion\"))\n    #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__))\n#else\n    #define JSON_HEDLEY_FLAGS\n#endif\n\n#if defined(JSON_HEDLEY_FLAGS_CAST)\n    #undef JSON_HEDLEY_FLAGS_CAST\n#endif\n#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0)\n#  define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \\\n        JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n        _Pragma(\"warning(disable:188)\") \\\n        ((T) (expr)); \\\n        JSON_HEDLEY_DIAGNOSTIC_POP \\\n    }))\n#else\n#  define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr)\n#endif\n\n#if defined(JSON_HEDLEY_EMPTY_BASES)\n    #undef JSON_HEDLEY_EMPTY_BASES\n#endif\n#if \\\n    (JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0)) || \\\n    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)\n    #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases)\n#else\n    #define JSON_HEDLEY_EMPTY_BASES\n#endif\n\n/* Remaining macros are deprecated. */\n\n#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK)\n    #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK\n#endif\n#if defined(__clang__)\n    #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0)\n#else\n    #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE)\n    #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE\n#endif\n#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE)\n    #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE\n#endif\n#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN)\n    #undef JSON_HEDLEY_CLANG_HAS_BUILTIN\n#endif\n#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE)\n    #undef JSON_HEDLEY_CLANG_HAS_FEATURE\n#endif\n#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION)\n    #undef JSON_HEDLEY_CLANG_HAS_EXTENSION\n#endif\n#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE)\n    #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE\n#endif\n#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_WARNING)\n    #undef JSON_HEDLEY_CLANG_HAS_WARNING\n#endif\n#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning)\n\n#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */\n\n// #include <nlohmann/detail/meta/detected.hpp>\n\n\n#include <type_traits>\n\n// #include <nlohmann/detail/meta/void_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate<typename ...Ts> struct make_void\n{\n    using type = void;\n};\ntemplate<typename ...Ts> using void_t = typename make_void<Ts...>::type;\n} // namespace detail\n}  // namespace nlohmann\n\n\n// https://en.cppreference.com/w/cpp/experimental/is_detected\nnamespace nlohmann\n{\nnamespace detail\n{\nstruct nonesuch\n{\n    nonesuch() = delete;\n    ~nonesuch() = delete;\n    nonesuch(nonesuch const&) = delete;\n    nonesuch(nonesuch const&&) = delete;\n    void operator=(nonesuch const&) = delete;\n    void operator=(nonesuch&&) = delete;\n};\n\ntemplate<class Default,\n         class AlwaysVoid,\n         template<class...> class Op,\n         class... Args>\nstruct detector\n{\n    using value_t = std::false_type;\n    using type = Default;\n};\n\ntemplate<class Default, template<class...> class Op, class... Args>\nstruct detector<Default, void_t<Op<Args...>>, Op, Args...>\n{\n    using value_t = std::true_type;\n    using type = Op<Args...>;\n};\n\ntemplate<template<class...> class Op, class... Args>\nusing is_detected = typename detector<nonesuch, void, Op, Args...>::value_t;\n\ntemplate<template<class...> class Op, class... Args>\nstruct is_detected_lazy : is_detected<Op, Args...> { };\n\ntemplate<template<class...> class Op, class... Args>\nusing detected_t = typename detector<nonesuch, void, Op, Args...>::type;\n\ntemplate<class Default, template<class...> class Op, class... Args>\nusing detected_or = detector<Default, void, Op, Args...>;\n\ntemplate<class Default, template<class...> class Op, class... Args>\nusing detected_or_t = typename detected_or<Default, Op, Args...>::type;\n\ntemplate<class Expected, template<class...> class Op, class... Args>\nusing is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>;\n\ntemplate<class To, template<class...> class Op, class... Args>\nusing is_detected_convertible =\n    std::is_convertible<detected_t<Op, Args...>, To>;\n}  // namespace detail\n}  // namespace nlohmann\n\n\n// This file contains all internal macro definitions\n// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them\n\n// exclude unsupported compilers\n#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK)\n    #if defined(__clang__)\n        #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400\n            #error \"unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers\"\n        #endif\n    #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))\n        #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800\n            #error \"unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers\"\n        #endif\n    #endif\n#endif\n\n// C++ language standard detection\n// if the user manually specified the used c++ version this is skipped\n#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11)\n    #if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)\n        #define JSON_HAS_CPP_20\n        #define JSON_HAS_CPP_17\n        #define JSON_HAS_CPP_14\n    #elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464\n        #define JSON_HAS_CPP_17\n        #define JSON_HAS_CPP_14\n    #elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1)\n        #define JSON_HAS_CPP_14\n    #endif\n    // the cpp 11 flag is always specified because it is the minimal required version\n    #define JSON_HAS_CPP_11\n#endif\n\n#if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM)\n    #ifdef JSON_HAS_CPP_17\n        #if defined(__cpp_lib_filesystem)\n            #define JSON_HAS_FILESYSTEM 1\n        #elif defined(__cpp_lib_experimental_filesystem)\n            #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1\n        #elif !defined(__has_include)\n            #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1\n        #elif __has_include(<filesystem>)\n            #define JSON_HAS_FILESYSTEM 1\n        #elif __has_include(<experimental/filesystem>)\n            #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1\n        #endif\n\n        // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/\n        #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8\n            #undef JSON_HAS_FILESYSTEM\n            #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM\n        #endif\n\n        // no filesystem support before GCC 8: https://en.cppreference.com/w/cpp/compiler_support\n        #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 8\n            #undef JSON_HAS_FILESYSTEM\n            #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM\n        #endif\n\n        // no filesystem support before Clang 7: https://en.cppreference.com/w/cpp/compiler_support\n        #if defined(__clang_major__) && __clang_major__ < 7\n            #undef JSON_HAS_FILESYSTEM\n            #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM\n        #endif\n\n        // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support\n        #if defined(_MSC_VER) && _MSC_VER < 1940\n            #undef JSON_HAS_FILESYSTEM\n            #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM\n        #endif\n\n        // no filesystem support before iOS 13\n        #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000\n            #undef JSON_HAS_FILESYSTEM\n            #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM\n        #endif\n\n        // no filesystem support before macOS Catalina\n        #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500\n            #undef JSON_HAS_FILESYSTEM\n            #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM\n        #endif\n    #endif\n#endif\n\n#ifndef JSON_HAS_EXPERIMENTAL_FILESYSTEM\n    #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 0\n#endif\n\n#ifndef JSON_HAS_FILESYSTEM\n    #define JSON_HAS_FILESYSTEM 0\n#endif\n\n// disable documentation warnings on clang\n#if defined(__clang__)\n    #pragma clang diagnostic push\n    #pragma clang diagnostic ignored \"-Wdocumentation\"\n    #pragma clang diagnostic ignored \"-Wdocumentation-unknown-command\"\n#endif\n\n// allow disabling exceptions\n#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION)\n    #define JSON_THROW(exception) throw exception\n    #define JSON_TRY try\n    #define JSON_CATCH(exception) catch(exception)\n    #define JSON_INTERNAL_CATCH(exception) catch(exception)\n#else\n    #include <cstdlib>\n    #define JSON_THROW(exception) std::abort()\n    #define JSON_TRY if(true)\n    #define JSON_CATCH(exception) if(false)\n    #define JSON_INTERNAL_CATCH(exception) if(false)\n#endif\n\n// override exception macros\n#if defined(JSON_THROW_USER)\n    #undef JSON_THROW\n    #define JSON_THROW JSON_THROW_USER\n#endif\n#if defined(JSON_TRY_USER)\n    #undef JSON_TRY\n    #define JSON_TRY JSON_TRY_USER\n#endif\n#if defined(JSON_CATCH_USER)\n    #undef JSON_CATCH\n    #define JSON_CATCH JSON_CATCH_USER\n    #undef JSON_INTERNAL_CATCH\n    #define JSON_INTERNAL_CATCH JSON_CATCH_USER\n#endif\n#if defined(JSON_INTERNAL_CATCH_USER)\n    #undef JSON_INTERNAL_CATCH\n    #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER\n#endif\n\n// allow overriding assert\n#if !defined(JSON_ASSERT)\n    #include <cassert> // assert\n    #define JSON_ASSERT(x) assert(x)\n#endif\n\n// allow to access some private functions (needed by the test suite)\n#if defined(JSON_TESTS_PRIVATE)\n    #define JSON_PRIVATE_UNLESS_TESTED public\n#else\n    #define JSON_PRIVATE_UNLESS_TESTED private\n#endif\n\n/*!\n@brief macro to briefly define a mapping between an enum and JSON\n@def NLOHMANN_JSON_SERIALIZE_ENUM\n@since version 3.4.0\n*/\n#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...)                                            \\\n    template<typename BasicJsonType>                                                            \\\n    inline void to_json(BasicJsonType& j, const ENUM_TYPE& e)                                   \\\n    {                                                                                           \\\n        static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE \" must be an enum!\");          \\\n        static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__;                     \\\n        auto it = std::find_if(std::begin(m), std::end(m),                                      \\\n                               [e](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool  \\\n        {                                                                                       \\\n            return ej_pair.first == e;                                                          \\\n        });                                                                                     \\\n        j = ((it != std::end(m)) ? it : std::begin(m))->second;                                 \\\n    }                                                                                           \\\n    template<typename BasicJsonType>                                                            \\\n    inline void from_json(const BasicJsonType& j, ENUM_TYPE& e)                                 \\\n    {                                                                                           \\\n        static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE \" must be an enum!\");          \\\n        static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__;                     \\\n        auto it = std::find_if(std::begin(m), std::end(m),                                      \\\n                               [&j](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool \\\n        {                                                                                       \\\n            return ej_pair.second == j;                                                         \\\n        });                                                                                     \\\n        e = ((it != std::end(m)) ? it : std::begin(m))->first;                                  \\\n    }\n\n// Ugly macros to avoid uglier copy-paste when specializing basic_json. They\n// may be removed in the future once the class is split.\n\n#define NLOHMANN_BASIC_JSON_TPL_DECLARATION                                \\\n    template<template<typename, typename, typename...> class ObjectType,   \\\n             template<typename, typename...> class ArrayType,              \\\n             class StringType, class BooleanType, class NumberIntegerType, \\\n             class NumberUnsignedType, class NumberFloatType,              \\\n             template<typename> class AllocatorType,                       \\\n             template<typename, typename = void> class JSONSerializer,     \\\n             class BinaryType>\n\n#define NLOHMANN_BASIC_JSON_TPL                                            \\\n    basic_json<ObjectType, ArrayType, StringType, BooleanType,             \\\n    NumberIntegerType, NumberUnsignedType, NumberFloatType,                \\\n    AllocatorType, JSONSerializer, BinaryType>\n\n// Macros to simplify conversion from/to types\n\n#define NLOHMANN_JSON_EXPAND( x ) x\n#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME\n#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \\\n        NLOHMANN_JSON_PASTE64, \\\n        NLOHMANN_JSON_PASTE63, \\\n        NLOHMANN_JSON_PASTE62, \\\n        NLOHMANN_JSON_PASTE61, \\\n        NLOHMANN_JSON_PASTE60, \\\n        NLOHMANN_JSON_PASTE59, \\\n        NLOHMANN_JSON_PASTE58, \\\n        NLOHMANN_JSON_PASTE57, \\\n        NLOHMANN_JSON_PASTE56, \\\n        NLOHMANN_JSON_PASTE55, \\\n        NLOHMANN_JSON_PASTE54, \\\n        NLOHMANN_JSON_PASTE53, \\\n        NLOHMANN_JSON_PASTE52, \\\n        NLOHMANN_JSON_PASTE51, \\\n        NLOHMANN_JSON_PASTE50, \\\n        NLOHMANN_JSON_PASTE49, \\\n        NLOHMANN_JSON_PASTE48, \\\n        NLOHMANN_JSON_PASTE47, \\\n        NLOHMANN_JSON_PASTE46, \\\n        NLOHMANN_JSON_PASTE45, \\\n        NLOHMANN_JSON_PASTE44, \\\n        NLOHMANN_JSON_PASTE43, \\\n        NLOHMANN_JSON_PASTE42, \\\n        NLOHMANN_JSON_PASTE41, \\\n        NLOHMANN_JSON_PASTE40, \\\n        NLOHMANN_JSON_PASTE39, \\\n        NLOHMANN_JSON_PASTE38, \\\n        NLOHMANN_JSON_PASTE37, \\\n        NLOHMANN_JSON_PASTE36, \\\n        NLOHMANN_JSON_PASTE35, \\\n        NLOHMANN_JSON_PASTE34, \\\n        NLOHMANN_JSON_PASTE33, \\\n        NLOHMANN_JSON_PASTE32, \\\n        NLOHMANN_JSON_PASTE31, \\\n        NLOHMANN_JSON_PASTE30, \\\n        NLOHMANN_JSON_PASTE29, \\\n        NLOHMANN_JSON_PASTE28, \\\n        NLOHMANN_JSON_PASTE27, \\\n        NLOHMANN_JSON_PASTE26, \\\n        NLOHMANN_JSON_PASTE25, \\\n        NLOHMANN_JSON_PASTE24, \\\n        NLOHMANN_JSON_PASTE23, \\\n        NLOHMANN_JSON_PASTE22, \\\n        NLOHMANN_JSON_PASTE21, \\\n        NLOHMANN_JSON_PASTE20, \\\n        NLOHMANN_JSON_PASTE19, \\\n        NLOHMANN_JSON_PASTE18, \\\n        NLOHMANN_JSON_PASTE17, \\\n        NLOHMANN_JSON_PASTE16, \\\n        NLOHMANN_JSON_PASTE15, \\\n        NLOHMANN_JSON_PASTE14, \\\n        NLOHMANN_JSON_PASTE13, \\\n        NLOHMANN_JSON_PASTE12, \\\n        NLOHMANN_JSON_PASTE11, \\\n        NLOHMANN_JSON_PASTE10, \\\n        NLOHMANN_JSON_PASTE9, \\\n        NLOHMANN_JSON_PASTE8, \\\n        NLOHMANN_JSON_PASTE7, \\\n        NLOHMANN_JSON_PASTE6, \\\n        NLOHMANN_JSON_PASTE5, \\\n        NLOHMANN_JSON_PASTE4, \\\n        NLOHMANN_JSON_PASTE3, \\\n        NLOHMANN_JSON_PASTE2, \\\n        NLOHMANN_JSON_PASTE1)(__VA_ARGS__))\n#define NLOHMANN_JSON_PASTE2(func, v1) func(v1)\n#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2)\n#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3)\n#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4)\n#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5)\n#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6)\n#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7)\n#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8)\n#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9)\n#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10)\n#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11)\n#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12)\n#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13)\n#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14)\n#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15)\n#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16)\n#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17)\n#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18)\n#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19)\n#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20)\n#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21)\n#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22)\n#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23)\n#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24)\n#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25)\n#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26)\n#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27)\n#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28)\n#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29)\n#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30)\n#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31)\n#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32)\n#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33)\n#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34)\n#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35)\n#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36)\n#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37)\n#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38)\n#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39)\n#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40)\n#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41)\n#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42)\n#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43)\n#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44)\n#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45)\n#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46)\n#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47)\n#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48)\n#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49)\n#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50)\n#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51)\n#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52)\n#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53)\n#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54)\n#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55)\n#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56)\n#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57)\n#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58)\n#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59)\n#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60)\n#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61)\n#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62)\n#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63)\n\n#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1;\n#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1);\n\n/*!\n@brief macro\n@def NLOHMANN_DEFINE_TYPE_INTRUSIVE\n@since version 3.9.0\n*/\n#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...)  \\\n    friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \\\n    friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }\n\n/*!\n@brief macro\n@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE\n@since version 3.9.0\n*/\n#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...)  \\\n    inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \\\n    inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }\n\n\n// inspired from https://stackoverflow.com/a/26745591\n// allows to call any std function as if (e.g. with begin):\n// using std::begin; begin(x);\n//\n// it allows using the detected idiom to retrieve the return type\n// of such an expression\n#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name)                                 \\\n    namespace detail {                                                            \\\n    using std::std_name;                                                          \\\n    \\\n    template<typename... T>                                                       \\\n    using result_of_##std_name = decltype(std_name(std::declval<T>()...));        \\\n    }                                                                             \\\n    \\\n    namespace detail2 {                                                           \\\n    struct std_name##_tag                                                         \\\n    {                                                                             \\\n    };                                                                            \\\n    \\\n    template<typename... T>                                                       \\\n    std_name##_tag std_name(T&&...);                                              \\\n    \\\n    template<typename... T>                                                       \\\n    using result_of_##std_name = decltype(std_name(std::declval<T>()...));        \\\n    \\\n    template<typename... T>                                                       \\\n    struct would_call_std_##std_name                                              \\\n    {                                                                             \\\n        static constexpr auto const value = ::nlohmann::detail::                  \\\n                                            is_detected_exact<std_name##_tag, result_of_##std_name, T...>::value; \\\n    };                                                                            \\\n    } /* namespace detail2 */ \\\n    \\\n    template<typename... T>                                                       \\\n    struct would_call_std_##std_name : detail2::would_call_std_##std_name<T...>   \\\n    {                                                                             \\\n    }\n\n#ifndef JSON_USE_IMPLICIT_CONVERSIONS\n    #define JSON_USE_IMPLICIT_CONVERSIONS 1\n#endif\n\n#if JSON_USE_IMPLICIT_CONVERSIONS\n    #define JSON_EXPLICIT\n#else\n    #define JSON_EXPLICIT explicit\n#endif\n\n#ifndef JSON_DIAGNOSTICS\n    #define JSON_DIAGNOSTICS 0\n#endif\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n\n/*!\n@brief replace all occurrences of a substring by another string\n\n@param[in,out] s  the string to manipulate; changed so that all\n               occurrences of @a f are replaced with @a t\n@param[in]     f  the substring to replace with @a t\n@param[in]     t  the string to replace @a f\n\n@pre The search string @a f must not be empty. **This precondition is\nenforced with an assertion.**\n\n@since version 2.0.0\n*/\ninline void replace_substring(std::string& s, const std::string& f,\n                              const std::string& t)\n{\n    JSON_ASSERT(!f.empty());\n    for (auto pos = s.find(f);                // find first occurrence of f\n            pos != std::string::npos;         // make sure f was found\n            s.replace(pos, f.size(), t),      // replace with t, and\n            pos = s.find(f, pos + t.size()))  // find next occurrence of f\n    {}\n}\n\n/*!\n * @brief string escaping as described in RFC 6901 (Sect. 4)\n * @param[in] s string to escape\n * @return    escaped string\n *\n * Note the order of escaping \"~\" to \"~0\" and \"/\" to \"~1\" is important.\n */\ninline std::string escape(std::string s)\n{\n    replace_substring(s, \"~\", \"~0\");\n    replace_substring(s, \"/\", \"~1\");\n    return s;\n}\n\n/*!\n * @brief string unescaping as described in RFC 6901 (Sect. 4)\n * @param[in] s string to unescape\n * @return    unescaped string\n *\n * Note the order of escaping \"~1\" to \"/\" and \"~0\" to \"~\" is important.\n */\nstatic void unescape(std::string& s)\n{\n    replace_substring(s, \"~1\", \"/\");\n    replace_substring(s, \"~0\", \"~\");\n}\n\n} // namespace detail\n} // namespace nlohmann\n\n// #include <nlohmann/detail/input/position_t.hpp>\n\n\n#include <cstddef> // size_t\n\nnamespace nlohmann\n{\nnamespace detail\n{\n/// struct to capture the start position of the current token\nstruct position_t\n{\n    /// the total number of characters read\n    std::size_t chars_read_total = 0;\n    /// the number of characters read in the current line\n    std::size_t chars_read_current_line = 0;\n    /// the number of lines read\n    std::size_t lines_read = 0;\n\n    /// conversion to size_t to preserve SAX interface\n    constexpr operator size_t() const\n    {\n        return chars_read_total;\n    }\n};\n\n} // namespace detail\n} // namespace nlohmann\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n////////////////\n// exceptions //\n////////////////\n\n/// @brief general exception of the @ref basic_json class\n/// @sa https://json.nlohmann.me/api/basic_json/exception/\nclass exception : public std::exception\n{\n  public:\n    /// returns the explanatory string\n    const char* what() const noexcept override\n    {\n        return m.what();\n    }\n\n    /// the id of the exception\n    const int id; // NOLINT(cppcoreguidelines-non-private-member-variables-in-classes)\n\n  protected:\n    JSON_HEDLEY_NON_NULL(3)\n    exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} // NOLINT(bugprone-throw-keyword-missing)\n\n    static std::string name(const std::string& ename, int id_)\n    {\n        return \"[json.exception.\" + ename + \".\" + std::to_string(id_) + \"] \";\n    }\n\n    template<typename BasicJsonType>\n    static std::string diagnostics(const BasicJsonType& leaf_element)\n    {\n#if JSON_DIAGNOSTICS\n        std::vector<std::string> tokens;\n        for (const auto* current = &leaf_element; current->m_parent != nullptr; current = current->m_parent)\n        {\n            switch (current->m_parent->type())\n            {\n                case value_t::array:\n                {\n                    for (std::size_t i = 0; i < current->m_parent->m_value.array->size(); ++i)\n                    {\n                        if (&current->m_parent->m_value.array->operator[](i) == current)\n                        {\n                            tokens.emplace_back(std::to_string(i));\n                            break;\n                        }\n                    }\n                    break;\n                }\n\n                case value_t::object:\n                {\n                    for (const auto& element : *current->m_parent->m_value.object)\n                    {\n                        if (&element.second == current)\n                        {\n                            tokens.emplace_back(element.first.c_str());\n                            break;\n                        }\n                    }\n                    break;\n                }\n\n                case value_t::null: // LCOV_EXCL_LINE\n                case value_t::string: // LCOV_EXCL_LINE\n                case value_t::boolean: // LCOV_EXCL_LINE\n                case value_t::number_integer: // LCOV_EXCL_LINE\n                case value_t::number_unsigned: // LCOV_EXCL_LINE\n                case value_t::number_float: // LCOV_EXCL_LINE\n                case value_t::binary: // LCOV_EXCL_LINE\n                case value_t::discarded: // LCOV_EXCL_LINE\n                default:   // LCOV_EXCL_LINE\n                    break; // LCOV_EXCL_LINE\n            }\n        }\n\n        if (tokens.empty())\n        {\n            return \"\";\n        }\n\n        return \"(\" + std::accumulate(tokens.rbegin(), tokens.rend(), std::string{},\n                                     [](const std::string & a, const std::string & b)\n        {\n            return a + \"/\" + detail::escape(b);\n        }) + \") \";\n#else\n        static_cast<void>(leaf_element);\n        return \"\";\n#endif\n    }\n\n  private:\n    /// an exception object as storage for error messages\n    std::runtime_error m;\n};\n\n/// @brief exception indicating a parse error\n/// @sa https://json.nlohmann.me/api/basic_json/parse_error/\nclass parse_error : public exception\n{\n  public:\n    /*!\n    @brief create a parse error exception\n    @param[in] id_       the id of the exception\n    @param[in] pos       the position where the error occurred (or with\n                         chars_read_total=0 if the position cannot be\n                         determined)\n    @param[in] what_arg  the explanatory string\n    @return parse_error object\n    */\n    template<typename BasicJsonType>\n    static parse_error create(int id_, const position_t& pos, const std::string& what_arg, const BasicJsonType& context)\n    {\n        std::string w = exception::name(\"parse_error\", id_) + \"parse error\" +\n                        position_string(pos) + \": \" + exception::diagnostics(context) + what_arg;\n        return {id_, pos.chars_read_total, w.c_str()};\n    }\n\n    template<typename BasicJsonType>\n    static parse_error create(int id_, std::size_t byte_, const std::string& what_arg, const BasicJsonType& context)\n    {\n        std::string w = exception::name(\"parse_error\", id_) + \"parse error\" +\n                        (byte_ != 0 ? (\" at byte \" + std::to_string(byte_)) : \"\") +\n                        \": \" + exception::diagnostics(context) + what_arg;\n        return {id_, byte_, w.c_str()};\n    }\n\n    /*!\n    @brief byte index of the parse error\n\n    The byte index of the last read character in the input file.\n\n    @note For an input with n bytes, 1 is the index of the first character and\n          n+1 is the index of the terminating null byte or the end of file.\n          This also holds true when reading a byte vector (CBOR or MessagePack).\n    */\n    const std::size_t byte;\n\n  private:\n    parse_error(int id_, std::size_t byte_, const char* what_arg)\n        : exception(id_, what_arg), byte(byte_) {}\n\n    static std::string position_string(const position_t& pos)\n    {\n        return \" at line \" + std::to_string(pos.lines_read + 1) +\n               \", column \" + std::to_string(pos.chars_read_current_line);\n    }\n};\n\n/// @brief exception indicating errors with iterators\n/// @sa https://json.nlohmann.me/api/basic_json/invalid_iterator/\nclass invalid_iterator : public exception\n{\n  public:\n    template<typename BasicJsonType>\n    static invalid_iterator create(int id_, const std::string& what_arg, const BasicJsonType& context)\n    {\n        std::string w = exception::name(\"invalid_iterator\", id_) + exception::diagnostics(context) + what_arg;\n        return {id_, w.c_str()};\n    }\n\n  private:\n    JSON_HEDLEY_NON_NULL(3)\n    invalid_iterator(int id_, const char* what_arg)\n        : exception(id_, what_arg) {}\n};\n\n/// @brief exception indicating executing a member function with a wrong type\n/// @sa https://json.nlohmann.me/api/basic_json/type_error/\nclass type_error : public exception\n{\n  public:\n    template<typename BasicJsonType>\n    static type_error create(int id_, const std::string& what_arg, const BasicJsonType& context)\n    {\n        std::string w = exception::name(\"type_error\", id_) + exception::diagnostics(context) + what_arg;\n        return {id_, w.c_str()};\n    }\n\n  private:\n    JSON_HEDLEY_NON_NULL(3)\n    type_error(int id_, const char* what_arg) : exception(id_, what_arg) {}\n};\n\n/// @brief exception indicating access out of the defined range\n/// @sa https://json.nlohmann.me/api/basic_json/out_of_range/\nclass out_of_range : public exception\n{\n  public:\n    template<typename BasicJsonType>\n    static out_of_range create(int id_, const std::string& what_arg, const BasicJsonType& context)\n    {\n        std::string w = exception::name(\"out_of_range\", id_) + exception::diagnostics(context) + what_arg;\n        return {id_, w.c_str()};\n    }\n\n  private:\n    JSON_HEDLEY_NON_NULL(3)\n    out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {}\n};\n\n/// @brief exception indicating other library errors\n/// @sa https://json.nlohmann.me/api/basic_json/other_error/\nclass other_error : public exception\n{\n  public:\n    template<typename BasicJsonType>\n    static other_error create(int id_, const std::string& what_arg, const BasicJsonType& context)\n    {\n        std::string w = exception::name(\"other_error\", id_) + exception::diagnostics(context) + what_arg;\n        return {id_, w.c_str()};\n    }\n\n  private:\n    JSON_HEDLEY_NON_NULL(3)\n    other_error(int id_, const char* what_arg) : exception(id_, what_arg) {}\n};\n\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n\n#include <cstddef> // size_t\n#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type\n#include <utility> // index_sequence, make_index_sequence, index_sequence_for\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n\ntemplate<typename T>\nusing uncvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type;\n\n#ifdef JSON_HAS_CPP_14\n\n// the following utilities are natively available in C++14\nusing std::enable_if_t;\nusing std::index_sequence;\nusing std::make_index_sequence;\nusing std::index_sequence_for;\n\n#else\n\n// alias templates to reduce boilerplate\ntemplate<bool B, typename T = void>\nusing enable_if_t = typename std::enable_if<B, T>::type;\n\n// The following code is taken from https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h\n// which is part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0.\n\n//// START OF CODE FROM GOOGLE ABSEIL\n\n// integer_sequence\n//\n// Class template representing a compile-time integer sequence. An instantiation\n// of `integer_sequence<T, Ints...>` has a sequence of integers encoded in its\n// type through its template arguments (which is a common need when\n// working with C++11 variadic templates). `absl::integer_sequence` is designed\n// to be a drop-in replacement for C++14's `std::integer_sequence`.\n//\n// Example:\n//\n//   template< class T, T... Ints >\n//   void user_function(integer_sequence<T, Ints...>);\n//\n//   int main()\n//   {\n//     // user_function's `T` will be deduced to `int` and `Ints...`\n//     // will be deduced to `0, 1, 2, 3, 4`.\n//     user_function(make_integer_sequence<int, 5>());\n//   }\ntemplate <typename T, T... Ints>\nstruct integer_sequence\n{\n    using value_type = T;\n    static constexpr std::size_t size() noexcept\n    {\n        return sizeof...(Ints);\n    }\n};\n\n// index_sequence\n//\n// A helper template for an `integer_sequence` of `size_t`,\n// `absl::index_sequence` is designed to be a drop-in replacement for C++14's\n// `std::index_sequence`.\ntemplate <size_t... Ints>\nusing index_sequence = integer_sequence<size_t, Ints...>;\n\nnamespace utility_internal\n{\n\ntemplate <typename Seq, size_t SeqSize, size_t Rem>\nstruct Extend;\n\n// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency.\ntemplate <typename T, T... Ints, size_t SeqSize>\nstruct Extend<integer_sequence<T, Ints...>, SeqSize, 0>\n{\n    using type = integer_sequence < T, Ints..., (Ints + SeqSize)... >;\n};\n\ntemplate <typename T, T... Ints, size_t SeqSize>\nstruct Extend<integer_sequence<T, Ints...>, SeqSize, 1>\n{\n    using type = integer_sequence < T, Ints..., (Ints + SeqSize)..., 2 * SeqSize >;\n};\n\n// Recursion helper for 'make_integer_sequence<T, N>'.\n// 'Gen<T, N>::type' is an alias for 'integer_sequence<T, 0, 1, ... N-1>'.\ntemplate <typename T, size_t N>\nstruct Gen\n{\n    using type =\n        typename Extend < typename Gen < T, N / 2 >::type, N / 2, N % 2 >::type;\n};\n\ntemplate <typename T>\nstruct Gen<T, 0>\n{\n    using type = integer_sequence<T>;\n};\n\n}  // namespace utility_internal\n\n// Compile-time sequences of integers\n\n// make_integer_sequence\n//\n// This template alias is equivalent to\n// `integer_sequence<int, 0, 1, ..., N-1>`, and is designed to be a drop-in\n// replacement for C++14's `std::make_integer_sequence`.\ntemplate <typename T, T N>\nusing make_integer_sequence = typename utility_internal::Gen<T, N>::type;\n\n// make_index_sequence\n//\n// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`,\n// and is designed to be a drop-in replacement for C++14's\n// `std::make_index_sequence`.\ntemplate <size_t N>\nusing make_index_sequence = make_integer_sequence<size_t, N>;\n\n// index_sequence_for\n//\n// Converts a typename pack into an index sequence of the same length, and\n// is designed to be a drop-in replacement for C++14's\n// `std::index_sequence_for()`\ntemplate <typename... Ts>\nusing index_sequence_for = make_index_sequence<sizeof...(Ts)>;\n\n//// END OF CODE FROM GOOGLE ABSEIL\n\n#endif\n\n// dispatch utility (taken from ranges-v3)\ntemplate<unsigned N> struct priority_tag : priority_tag < N - 1 > {};\ntemplate<> struct priority_tag<0> {};\n\n// taken from ranges-v3\ntemplate<typename T>\nstruct static_const\n{\n    static constexpr T value{};\n};\n\ntemplate<typename T>\nconstexpr T static_const<T>::value; // NOLINT(readability-redundant-declaration)\n\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/meta/identity_tag.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n// dispatching helper struct\ntemplate <class T> struct identity_tag {};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n\n#include <limits> // numeric_limits\n#include <type_traits> // false_type, is_constructible, is_integral, is_same, true_type\n#include <utility> // declval\n#include <tuple> // tuple\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\n// #include <nlohmann/detail/iterators/iterator_traits.hpp>\n\n\n#include <iterator> // random_access_iterator_tag\n\n// #include <nlohmann/detail/meta/void_t.hpp>\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate<typename It, typename = void>\nstruct iterator_types {};\n\ntemplate<typename It>\nstruct iterator_types <\n    It,\n    void_t<typename It::difference_type, typename It::value_type, typename It::pointer,\n    typename It::reference, typename It::iterator_category >>\n{\n    using difference_type = typename It::difference_type;\n    using value_type = typename It::value_type;\n    using pointer = typename It::pointer;\n    using reference = typename It::reference;\n    using iterator_category = typename It::iterator_category;\n};\n\n// This is required as some compilers implement std::iterator_traits in a way that\n// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341.\ntemplate<typename T, typename = void>\nstruct iterator_traits\n{\n};\n\ntemplate<typename T>\nstruct iterator_traits < T, enable_if_t < !std::is_pointer<T>::value >>\n            : iterator_types<T>\n{\n};\n\ntemplate<typename T>\nstruct iterator_traits<T*, enable_if_t<std::is_object<T>::value>>\n{\n    using iterator_category = std::random_access_iterator_tag;\n    using value_type = T;\n    using difference_type = ptrdiff_t;\n    using pointer = T*;\n    using reference = T&;\n};\n} // namespace detail\n} // namespace nlohmann\n\n// #include <nlohmann/detail/meta/call_std/begin.hpp>\n\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nNLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin);\n} // namespace nlohmann\n\n// #include <nlohmann/detail/meta/call_std/end.hpp>\n\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nNLOHMANN_CAN_CALL_STD_FUNC_IMPL(end);\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n// #include <nlohmann/detail/meta/detected.hpp>\n\n// #include <nlohmann/json_fwd.hpp>\n#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_\n#define INCLUDE_NLOHMANN_JSON_FWD_HPP_\n\n#include <cstdint> // int64_t, uint64_t\n#include <map> // map\n#include <memory> // allocator\n#include <string> // string\n#include <vector> // vector\n\n/*!\n@brief namespace for Niels Lohmann\n@see https://github.com/nlohmann\n@since version 1.0.0\n*/\nnamespace nlohmann\n{\n/*!\n@brief default JSONSerializer template argument\n\nThis serializer ignores the template arguments and uses ADL\n([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl))\nfor serialization.\n*/\ntemplate<typename T = void, typename SFINAE = void>\nstruct adl_serializer;\n\n/// a class to store JSON values\n/// @sa https://json.nlohmann.me/api/basic_json/\ntemplate<template<typename U, typename V, typename... Args> class ObjectType =\n         std::map,\n         template<typename U, typename... Args> class ArrayType = std::vector,\n         class StringType = std::string, class BooleanType = bool,\n         class NumberIntegerType = std::int64_t,\n         class NumberUnsignedType = std::uint64_t,\n         class NumberFloatType = double,\n         template<typename U> class AllocatorType = std::allocator,\n         template<typename T, typename SFINAE = void> class JSONSerializer =\n         adl_serializer,\n         class BinaryType = std::vector<std::uint8_t>>\nclass basic_json;\n\n/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document\n/// @sa https://json.nlohmann.me/api/json_pointer/\ntemplate<typename BasicJsonType>\nclass json_pointer;\n\n/*!\n@brief default specialization\n@sa https://json.nlohmann.me/api/json/\n*/\nusing json = basic_json<>;\n\n/// @brief a minimal map-like container that preserves insertion order\n/// @sa https://json.nlohmann.me/api/ordered_map/\ntemplate<class Key, class T, class IgnoredLess, class Allocator>\nstruct ordered_map;\n\n/// @brief specialization that maintains the insertion order of object keys\n/// @sa https://json.nlohmann.me/api/ordered_json/\nusing ordered_json = basic_json<nlohmann::ordered_map>;\n\n}  // namespace nlohmann\n\n#endif  // INCLUDE_NLOHMANN_JSON_FWD_HPP_\n\n\nnamespace nlohmann\n{\n/*!\n@brief detail namespace with internal helper functions\n\nThis namespace collects functions that should not be exposed,\nimplementations of some @ref basic_json methods, and meta-programming helpers.\n\n@since version 2.1.0\n*/\nnamespace detail\n{\n/////////////\n// helpers //\n/////////////\n\n// Note to maintainers:\n//\n// Every trait in this file expects a non CV-qualified type.\n// The only exceptions are in the 'aliases for detected' section\n// (i.e. those of the form: decltype(T::member_function(std::declval<T>())))\n//\n// In this case, T has to be properly CV-qualified to constraint the function arguments\n// (e.g. to_json(BasicJsonType&, const T&))\n\ntemplate<typename> struct is_basic_json : std::false_type {};\n\nNLOHMANN_BASIC_JSON_TPL_DECLARATION\nstruct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {};\n\n//////////////////////\n// json_ref helpers //\n//////////////////////\n\ntemplate<typename>\nclass json_ref;\n\ntemplate<typename>\nstruct is_json_ref : std::false_type {};\n\ntemplate<typename T>\nstruct is_json_ref<json_ref<T>> : std::true_type {};\n\n//////////////////////////\n// aliases for detected //\n//////////////////////////\n\ntemplate<typename T>\nusing mapped_type_t = typename T::mapped_type;\n\ntemplate<typename T>\nusing key_type_t = typename T::key_type;\n\ntemplate<typename T>\nusing value_type_t = typename T::value_type;\n\ntemplate<typename T>\nusing difference_type_t = typename T::difference_type;\n\ntemplate<typename T>\nusing pointer_t = typename T::pointer;\n\ntemplate<typename T>\nusing reference_t = typename T::reference;\n\ntemplate<typename T>\nusing iterator_category_t = typename T::iterator_category;\n\ntemplate<typename T, typename... Args>\nusing to_json_function = decltype(T::to_json(std::declval<Args>()...));\n\ntemplate<typename T, typename... Args>\nusing from_json_function = decltype(T::from_json(std::declval<Args>()...));\n\ntemplate<typename T, typename U>\nusing get_template_function = decltype(std::declval<T>().template get<U>());\n\n// trait checking if JSONSerializer<T>::from_json(json const&, udt&) exists\ntemplate<typename BasicJsonType, typename T, typename = void>\nstruct has_from_json : std::false_type {};\n\n// trait checking if j.get<T> is valid\n// use this trait instead of std::is_constructible or std::is_convertible,\n// both rely on, or make use of implicit conversions, and thus fail when T\n// has several constructors/operator= (see https://github.com/nlohmann/json/issues/958)\ntemplate <typename BasicJsonType, typename T>\nstruct is_getable\n{\n    static constexpr bool value = is_detected<get_template_function, const BasicJsonType&, T>::value;\n};\n\ntemplate<typename BasicJsonType, typename T>\nstruct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json<T>::value >>\n{\n    using serializer = typename BasicJsonType::template json_serializer<T, void>;\n\n    static constexpr bool value =\n        is_detected_exact<void, from_json_function, serializer,\n        const BasicJsonType&, T&>::value;\n};\n\n// This trait checks if JSONSerializer<T>::from_json(json const&) exists\n// this overload is used for non-default-constructible user-defined-types\ntemplate<typename BasicJsonType, typename T, typename = void>\nstruct has_non_default_from_json : std::false_type {};\n\ntemplate<typename BasicJsonType, typename T>\nstruct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json<T>::value >>\n{\n    using serializer = typename BasicJsonType::template json_serializer<T, void>;\n\n    static constexpr bool value =\n        is_detected_exact<T, from_json_function, serializer,\n        const BasicJsonType&>::value;\n};\n\n// This trait checks if BasicJsonType::json_serializer<T>::to_json exists\n// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion.\ntemplate<typename BasicJsonType, typename T, typename = void>\nstruct has_to_json : std::false_type {};\n\ntemplate<typename BasicJsonType, typename T>\nstruct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json<T>::value >>\n{\n    using serializer = typename BasicJsonType::template json_serializer<T, void>;\n\n    static constexpr bool value =\n        is_detected_exact<void, to_json_function, serializer, BasicJsonType&,\n        T>::value;\n};\n\n\n///////////////////\n// is_ functions //\n///////////////////\n\n// https://en.cppreference.com/w/cpp/types/conjunction\ntemplate<class...> struct conjunction : std::true_type { };\ntemplate<class B1> struct conjunction<B1> : B1 { };\ntemplate<class B1, class... Bn>\nstruct conjunction<B1, Bn...>\n: std::conditional<bool(B1::value), conjunction<Bn...>, B1>::type {};\n\n// https://en.cppreference.com/w/cpp/types/negation\ntemplate<class B> struct negation : std::integral_constant < bool, !B::value > { };\n\n// Reimplementation of is_constructible and is_default_constructible, due to them being broken for\n// std::pair and std::tuple until LWG 2367 fix (see https://cplusplus.github.io/LWG/lwg-defects.html#2367).\n// This causes compile errors in e.g. clang 3.5 or gcc 4.9.\ntemplate <typename T>\nstruct is_default_constructible : std::is_default_constructible<T> {};\n\ntemplate <typename T1, typename T2>\nstruct is_default_constructible<std::pair<T1, T2>>\n            : conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {};\n\ntemplate <typename T1, typename T2>\nstruct is_default_constructible<const std::pair<T1, T2>>\n            : conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {};\n\ntemplate <typename... Ts>\nstruct is_default_constructible<std::tuple<Ts...>>\n            : conjunction<is_default_constructible<Ts>...> {};\n\ntemplate <typename... Ts>\nstruct is_default_constructible<const std::tuple<Ts...>>\n            : conjunction<is_default_constructible<Ts>...> {};\n\n\ntemplate <typename T, typename... Args>\nstruct is_constructible : std::is_constructible<T, Args...> {};\n\ntemplate <typename T1, typename T2>\nstruct is_constructible<std::pair<T1, T2>> : is_default_constructible<std::pair<T1, T2>> {};\n\ntemplate <typename T1, typename T2>\nstruct is_constructible<const std::pair<T1, T2>> : is_default_constructible<const std::pair<T1, T2>> {};\n\ntemplate <typename... Ts>\nstruct is_constructible<std::tuple<Ts...>> : is_default_constructible<std::tuple<Ts...>> {};\n\ntemplate <typename... Ts>\nstruct is_constructible<const std::tuple<Ts...>> : is_default_constructible<const std::tuple<Ts...>> {};\n\n\ntemplate<typename T, typename = void>\nstruct is_iterator_traits : std::false_type {};\n\ntemplate<typename T>\nstruct is_iterator_traits<iterator_traits<T>>\n{\n  private:\n    using traits = iterator_traits<T>;\n\n  public:\n    static constexpr auto value =\n        is_detected<value_type_t, traits>::value &&\n        is_detected<difference_type_t, traits>::value &&\n        is_detected<pointer_t, traits>::value &&\n        is_detected<iterator_category_t, traits>::value &&\n        is_detected<reference_t, traits>::value;\n};\n\ntemplate<typename T>\nstruct is_range\n{\n  private:\n    using t_ref = typename std::add_lvalue_reference<T>::type;\n\n    using iterator = detected_t<result_of_begin, t_ref>;\n    using sentinel = detected_t<result_of_end, t_ref>;\n\n    // to be 100% correct, it should use https://en.cppreference.com/w/cpp/iterator/input_or_output_iterator\n    // and https://en.cppreference.com/w/cpp/iterator/sentinel_for\n    // but reimplementing these would be too much work, as a lot of other concepts are used underneath\n    static constexpr auto is_iterator_begin =\n        is_iterator_traits<iterator_traits<iterator>>::value;\n\n  public:\n    static constexpr bool value = !std::is_same<iterator, nonesuch>::value && !std::is_same<sentinel, nonesuch>::value && is_iterator_begin;\n};\n\ntemplate<typename R>\nusing iterator_t = enable_if_t<is_range<R>::value, result_of_begin<decltype(std::declval<R&>())>>;\n\ntemplate<typename T>\nusing range_value_t = value_type_t<iterator_traits<iterator_t<T>>>;\n\n// The following implementation of is_complete_type is taken from\n// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/\n// and is written by Xiang Fan who agreed to using it in this library.\n\ntemplate<typename T, typename = void>\nstruct is_complete_type : std::false_type {};\n\ntemplate<typename T>\nstruct is_complete_type<T, decltype(void(sizeof(T)))> : std::true_type {};\n\ntemplate<typename BasicJsonType, typename CompatibleObjectType,\n         typename = void>\nstruct is_compatible_object_type_impl : std::false_type {};\n\ntemplate<typename BasicJsonType, typename CompatibleObjectType>\nstruct is_compatible_object_type_impl <\n    BasicJsonType, CompatibleObjectType,\n    enable_if_t < is_detected<mapped_type_t, CompatibleObjectType>::value&&\n    is_detected<key_type_t, CompatibleObjectType>::value >>\n{\n    using object_t = typename BasicJsonType::object_t;\n\n    // macOS's is_constructible does not play well with nonesuch...\n    static constexpr bool value =\n        is_constructible<typename object_t::key_type,\n        typename CompatibleObjectType::key_type>::value &&\n        is_constructible<typename object_t::mapped_type,\n        typename CompatibleObjectType::mapped_type>::value;\n};\n\ntemplate<typename BasicJsonType, typename CompatibleObjectType>\nstruct is_compatible_object_type\n    : is_compatible_object_type_impl<BasicJsonType, CompatibleObjectType> {};\n\ntemplate<typename BasicJsonType, typename ConstructibleObjectType,\n         typename = void>\nstruct is_constructible_object_type_impl : std::false_type {};\n\ntemplate<typename BasicJsonType, typename ConstructibleObjectType>\nstruct is_constructible_object_type_impl <\n    BasicJsonType, ConstructibleObjectType,\n    enable_if_t < is_detected<mapped_type_t, ConstructibleObjectType>::value&&\n    is_detected<key_type_t, ConstructibleObjectType>::value >>\n{\n    using object_t = typename BasicJsonType::object_t;\n\n    static constexpr bool value =\n        (is_default_constructible<ConstructibleObjectType>::value &&\n         (std::is_move_assignable<ConstructibleObjectType>::value ||\n          std::is_copy_assignable<ConstructibleObjectType>::value) &&\n         (is_constructible<typename ConstructibleObjectType::key_type,\n          typename object_t::key_type>::value &&\n          std::is_same <\n          typename object_t::mapped_type,\n          typename ConstructibleObjectType::mapped_type >::value)) ||\n        (has_from_json<BasicJsonType,\n         typename ConstructibleObjectType::mapped_type>::value ||\n         has_non_default_from_json <\n         BasicJsonType,\n         typename ConstructibleObjectType::mapped_type >::value);\n};\n\ntemplate<typename BasicJsonType, typename ConstructibleObjectType>\nstruct is_constructible_object_type\n    : is_constructible_object_type_impl<BasicJsonType,\n      ConstructibleObjectType> {};\n\ntemplate<typename BasicJsonType, typename CompatibleStringType>\nstruct is_compatible_string_type\n{\n    static constexpr auto value =\n        is_constructible<typename BasicJsonType::string_t, CompatibleStringType>::value;\n};\n\ntemplate<typename BasicJsonType, typename ConstructibleStringType>\nstruct is_constructible_string_type\n{\n    static constexpr auto value =\n        is_constructible<ConstructibleStringType,\n        typename BasicJsonType::string_t>::value;\n};\n\ntemplate<typename BasicJsonType, typename CompatibleArrayType, typename = void>\nstruct is_compatible_array_type_impl : std::false_type {};\n\ntemplate<typename BasicJsonType, typename CompatibleArrayType>\nstruct is_compatible_array_type_impl <\n    BasicJsonType, CompatibleArrayType,\n    enable_if_t <\n    is_detected<iterator_t, CompatibleArrayType>::value&&\n    is_iterator_traits<iterator_traits<detected_t<iterator_t, CompatibleArrayType>>>::value&&\n// special case for types like std::filesystem::path whose iterator's value_type are themselves\n// c.f. https://github.com/nlohmann/json/pull/3073\n    !std::is_same<CompatibleArrayType, detected_t<range_value_t, CompatibleArrayType>>::value >>\n{\n    static constexpr bool value =\n        is_constructible<BasicJsonType,\n        range_value_t<CompatibleArrayType>>::value;\n};\n\ntemplate<typename BasicJsonType, typename CompatibleArrayType>\nstruct is_compatible_array_type\n    : is_compatible_array_type_impl<BasicJsonType, CompatibleArrayType> {};\n\ntemplate<typename BasicJsonType, typename ConstructibleArrayType, typename = void>\nstruct is_constructible_array_type_impl : std::false_type {};\n\ntemplate<typename BasicJsonType, typename ConstructibleArrayType>\nstruct is_constructible_array_type_impl <\n    BasicJsonType, ConstructibleArrayType,\n    enable_if_t<std::is_same<ConstructibleArrayType,\n    typename BasicJsonType::value_type>::value >>\n            : std::true_type {};\n\ntemplate<typename BasicJsonType, typename ConstructibleArrayType>\nstruct is_constructible_array_type_impl <\n    BasicJsonType, ConstructibleArrayType,\n    enable_if_t < !std::is_same<ConstructibleArrayType,\n    typename BasicJsonType::value_type>::value&&\n    !is_compatible_string_type<BasicJsonType, ConstructibleArrayType>::value&&\n    is_default_constructible<ConstructibleArrayType>::value&&\n(std::is_move_assignable<ConstructibleArrayType>::value ||\n std::is_copy_assignable<ConstructibleArrayType>::value)&&\nis_detected<iterator_t, ConstructibleArrayType>::value&&\nis_iterator_traits<iterator_traits<detected_t<iterator_t, ConstructibleArrayType>>>::value&&\nis_detected<range_value_t, ConstructibleArrayType>::value&&\n// special case for types like std::filesystem::path whose iterator's value_type are themselves\n// c.f. https://github.com/nlohmann/json/pull/3073\n!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&&\n        is_complete_type <\n        detected_t<range_value_t, ConstructibleArrayType >>::value >>\n{\n    using value_type = range_value_t<ConstructibleArrayType>;\n\n    static constexpr bool value =\n        std::is_same<value_type,\n        typename BasicJsonType::array_t::value_type>::value ||\n        has_from_json<BasicJsonType,\n        value_type>::value ||\n        has_non_default_from_json <\n        BasicJsonType,\n        value_type >::value;\n};\n\ntemplate<typename BasicJsonType, typename ConstructibleArrayType>\nstruct is_constructible_array_type\n    : is_constructible_array_type_impl<BasicJsonType, ConstructibleArrayType> {};\n\ntemplate<typename RealIntegerType, typename CompatibleNumberIntegerType,\n         typename = void>\nstruct is_compatible_integer_type_impl : std::false_type {};\n\ntemplate<typename RealIntegerType, typename CompatibleNumberIntegerType>\nstruct is_compatible_integer_type_impl <\n    RealIntegerType, CompatibleNumberIntegerType,\n    enable_if_t < std::is_integral<RealIntegerType>::value&&\n    std::is_integral<CompatibleNumberIntegerType>::value&&\n    !std::is_same<bool, CompatibleNumberIntegerType>::value >>\n{\n    // is there an assert somewhere on overflows?\n    using RealLimits = std::numeric_limits<RealIntegerType>;\n    using CompatibleLimits = std::numeric_limits<CompatibleNumberIntegerType>;\n\n    static constexpr auto value =\n        is_constructible<RealIntegerType,\n        CompatibleNumberIntegerType>::value &&\n        CompatibleLimits::is_integer &&\n        RealLimits::is_signed == CompatibleLimits::is_signed;\n};\n\ntemplate<typename RealIntegerType, typename CompatibleNumberIntegerType>\nstruct is_compatible_integer_type\n    : is_compatible_integer_type_impl<RealIntegerType,\n      CompatibleNumberIntegerType> {};\n\ntemplate<typename BasicJsonType, typename CompatibleType, typename = void>\nstruct is_compatible_type_impl: std::false_type {};\n\ntemplate<typename BasicJsonType, typename CompatibleType>\nstruct is_compatible_type_impl <\n    BasicJsonType, CompatibleType,\n    enable_if_t<is_complete_type<CompatibleType>::value >>\n{\n    static constexpr bool value =\n        has_to_json<BasicJsonType, CompatibleType>::value;\n};\n\ntemplate<typename BasicJsonType, typename CompatibleType>\nstruct is_compatible_type\n    : is_compatible_type_impl<BasicJsonType, CompatibleType> {};\n\ntemplate<typename T1, typename T2>\nstruct is_constructible_tuple : std::false_type {};\n\ntemplate<typename T1, typename... Args>\nstruct is_constructible_tuple<T1, std::tuple<Args...>> : conjunction<is_constructible<T1, Args>...> {};\n\n// a naive helper to check if a type is an ordered_map (exploits the fact that\n// ordered_map inherits capacity() from std::vector)\ntemplate <typename T>\nstruct is_ordered_map\n{\n    using one = char;\n\n    struct two\n    {\n        char x[2]; // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)\n    };\n\n    template <typename C> static one test( decltype(&C::capacity) ) ;\n    template <typename C> static two test(...);\n\n    enum { value = sizeof(test<T>(nullptr)) == sizeof(char) }; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)\n};\n\n// to avoid useless casts (see https://github.com/nlohmann/json/issues/2893#issuecomment-889152324)\ntemplate < typename T, typename U, enable_if_t < !std::is_same<T, U>::value, int > = 0 >\nT conditional_static_cast(U value)\n{\n    return static_cast<T>(value);\n}\n\ntemplate<typename T, typename U, enable_if_t<std::is_same<T, U>::value, int> = 0>\nT conditional_static_cast(U value)\n{\n    return value;\n}\n\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\n#if JSON_HAS_EXPERIMENTAL_FILESYSTEM\n#include <experimental/filesystem>\nnamespace nlohmann::detail\n{\nnamespace std_fs = std::experimental::filesystem;\n} // namespace nlohmann::detail\n#elif JSON_HAS_FILESYSTEM\n#include <filesystem>\nnamespace nlohmann::detail\n{\nnamespace std_fs = std::filesystem;\n} // namespace nlohmann::detail\n#endif\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename std::nullptr_t& n)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_null()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be null, but is \" + std::string(j.type_name()), j));\n    }\n    n = nullptr;\n}\n\n// overloads for basic_json template parameters\ntemplate < typename BasicJsonType, typename ArithmeticType,\n           enable_if_t < std::is_arithmetic<ArithmeticType>::value&&\n                         !std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value,\n                         int > = 0 >\nvoid get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)\n{\n    switch (static_cast<value_t>(j))\n    {\n        case value_t::number_unsigned:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());\n            break;\n        }\n        case value_t::number_integer:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());\n            break;\n        }\n        case value_t::number_float:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());\n            break;\n        }\n\n        case value_t::null:\n        case value_t::object:\n        case value_t::array:\n        case value_t::string:\n        case value_t::boolean:\n        case value_t::binary:\n        case value_t::discarded:\n        default:\n            JSON_THROW(type_error::create(302, \"type must be number, but is \" + std::string(j.type_name()), j));\n    }\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be boolean, but is \" + std::string(j.type_name()), j));\n    }\n    b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_string()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be string, but is \" + std::string(j.type_name()), j));\n    }\n    s = *j.template get_ptr<const typename BasicJsonType::string_t*>();\n}\n\ntemplate <\n    typename BasicJsonType, typename ConstructibleStringType,\n    enable_if_t <\n        is_constructible_string_type<BasicJsonType, ConstructibleStringType>::value&&\n        !std::is_same<typename BasicJsonType::string_t,\n                      ConstructibleStringType>::value,\n        int > = 0 >\nvoid from_json(const BasicJsonType& j, ConstructibleStringType& s)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_string()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be string, but is \" + std::string(j.type_name()), j));\n    }\n\n    s = *j.template get_ptr<const typename BasicJsonType::string_t*>();\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val)\n{\n    get_arithmetic_value(j, val);\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val)\n{\n    get_arithmetic_value(j, val);\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val)\n{\n    get_arithmetic_value(j, val);\n}\n\ntemplate<typename BasicJsonType, typename EnumType,\n         enable_if_t<std::is_enum<EnumType>::value, int> = 0>\nvoid from_json(const BasicJsonType& j, EnumType& e)\n{\n    typename std::underlying_type<EnumType>::type val;\n    get_arithmetic_value(j, val);\n    e = static_cast<EnumType>(val);\n}\n\n// forward_list doesn't have an insert method\ntemplate<typename BasicJsonType, typename T, typename Allocator,\n         enable_if_t<is_getable<BasicJsonType, T>::value, int> = 0>\nvoid from_json(const BasicJsonType& j, std::forward_list<T, Allocator>& l)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name()), j));\n    }\n    l.clear();\n    std::transform(j.rbegin(), j.rend(),\n                   std::front_inserter(l), [](const BasicJsonType & i)\n    {\n        return i.template get<T>();\n    });\n}\n\n// valarray doesn't have an insert method\ntemplate<typename BasicJsonType, typename T,\n         enable_if_t<is_getable<BasicJsonType, T>::value, int> = 0>\nvoid from_json(const BasicJsonType& j, std::valarray<T>& l)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name()), j));\n    }\n    l.resize(j.size());\n    std::transform(j.begin(), j.end(), std::begin(l),\n                   [](const BasicJsonType & elem)\n    {\n        return elem.template get<T>();\n    });\n}\n\ntemplate<typename BasicJsonType, typename T, std::size_t N>\nauto from_json(const BasicJsonType& j, T (&arr)[N])  // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)\n-> decltype(j.template get<T>(), void())\n{\n    for (std::size_t i = 0; i < N; ++i)\n    {\n        arr[i] = j.at(i).template get<T>();\n    }\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json_array_impl(const BasicJsonType& j, typename BasicJsonType::array_t& arr, priority_tag<3> /*unused*/)\n{\n    arr = *j.template get_ptr<const typename BasicJsonType::array_t*>();\n}\n\ntemplate<typename BasicJsonType, typename T, std::size_t N>\nauto from_json_array_impl(const BasicJsonType& j, std::array<T, N>& arr,\n                          priority_tag<2> /*unused*/)\n-> decltype(j.template get<T>(), void())\n{\n    for (std::size_t i = 0; i < N; ++i)\n    {\n        arr[i] = j.at(i).template get<T>();\n    }\n}\n\ntemplate<typename BasicJsonType, typename ConstructibleArrayType,\n         enable_if_t<\n             std::is_assignable<ConstructibleArrayType&, ConstructibleArrayType>::value,\n             int> = 0>\nauto from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, priority_tag<1> /*unused*/)\n-> decltype(\n    arr.reserve(std::declval<typename ConstructibleArrayType::size_type>()),\n    j.template get<typename ConstructibleArrayType::value_type>(),\n    void())\n{\n    using std::end;\n\n    ConstructibleArrayType ret;\n    ret.reserve(j.size());\n    std::transform(j.begin(), j.end(),\n                   std::inserter(ret, end(ret)), [](const BasicJsonType & i)\n    {\n        // get<BasicJsonType>() returns *this, this won't call a from_json\n        // method when value_type is BasicJsonType\n        return i.template get<typename ConstructibleArrayType::value_type>();\n    });\n    arr = std::move(ret);\n}\n\ntemplate<typename BasicJsonType, typename ConstructibleArrayType,\n         enable_if_t<\n             std::is_assignable<ConstructibleArrayType&, ConstructibleArrayType>::value,\n             int> = 0>\nvoid from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr,\n                          priority_tag<0> /*unused*/)\n{\n    using std::end;\n\n    ConstructibleArrayType ret;\n    std::transform(\n        j.begin(), j.end(), std::inserter(ret, end(ret)),\n        [](const BasicJsonType & i)\n    {\n        // get<BasicJsonType>() returns *this, this won't call a from_json\n        // method when value_type is BasicJsonType\n        return i.template get<typename ConstructibleArrayType::value_type>();\n    });\n    arr = std::move(ret);\n}\n\ntemplate < typename BasicJsonType, typename ConstructibleArrayType,\n           enable_if_t <\n               is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value&&\n               !is_constructible_object_type<BasicJsonType, ConstructibleArrayType>::value&&\n               !is_constructible_string_type<BasicJsonType, ConstructibleArrayType>::value&&\n               !std::is_same<ConstructibleArrayType, typename BasicJsonType::binary_t>::value&&\n               !is_basic_json<ConstructibleArrayType>::value,\n               int > = 0 >\nauto from_json(const BasicJsonType& j, ConstructibleArrayType& arr)\n-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}),\nj.template get<typename ConstructibleArrayType::value_type>(),\nvoid())\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name()), j));\n    }\n\n    from_json_array_impl(j, arr, priority_tag<3> {});\n}\n\ntemplate < typename BasicJsonType, typename T, std::size_t... Idx >\nstd::array<T, sizeof...(Idx)> from_json_inplace_array_impl(BasicJsonType&& j,\n        identity_tag<std::array<T, sizeof...(Idx)>> /*unused*/, index_sequence<Idx...> /*unused*/)\n{\n    return { { std::forward<BasicJsonType>(j).at(Idx).template get<T>()... } };\n}\n\ntemplate < typename BasicJsonType, typename T, std::size_t N >\nauto from_json(BasicJsonType&& j, identity_tag<std::array<T, N>> tag)\n-> decltype(from_json_inplace_array_impl(std::forward<BasicJsonType>(j), tag, make_index_sequence<N> {}))\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name()), j));\n    }\n\n    return from_json_inplace_array_impl(std::forward<BasicJsonType>(j), tag, make_index_sequence<N> {});\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::binary_t& bin)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_binary()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be binary, but is \" + std::string(j.type_name()), j));\n    }\n\n    bin = *j.template get_ptr<const typename BasicJsonType::binary_t*>();\n}\n\ntemplate<typename BasicJsonType, typename ConstructibleObjectType,\n         enable_if_t<is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value, int> = 0>\nvoid from_json(const BasicJsonType& j, ConstructibleObjectType& obj)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_object()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be object, but is \" + std::string(j.type_name()), j));\n    }\n\n    ConstructibleObjectType ret;\n    const auto* inner_object = j.template get_ptr<const typename BasicJsonType::object_t*>();\n    using value_type = typename ConstructibleObjectType::value_type;\n    std::transform(\n        inner_object->begin(), inner_object->end(),\n        std::inserter(ret, ret.begin()),\n        [](typename BasicJsonType::object_t::value_type const & p)\n    {\n        return value_type(p.first, p.second.template get<typename ConstructibleObjectType::mapped_type>());\n    });\n    obj = std::move(ret);\n}\n\n// overload for arithmetic types, not chosen for basic_json template arguments\n// (BooleanType, etc..); note: Is it really necessary to provide explicit\n// overloads for boolean_t etc. in case of a custom BooleanType which is not\n// an arithmetic type?\ntemplate < typename BasicJsonType, typename ArithmeticType,\n           enable_if_t <\n               std::is_arithmetic<ArithmeticType>::value&&\n               !std::is_same<ArithmeticType, typename BasicJsonType::number_unsigned_t>::value&&\n               !std::is_same<ArithmeticType, typename BasicJsonType::number_integer_t>::value&&\n               !std::is_same<ArithmeticType, typename BasicJsonType::number_float_t>::value&&\n               !std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value,\n               int > = 0 >\nvoid from_json(const BasicJsonType& j, ArithmeticType& val)\n{\n    switch (static_cast<value_t>(j))\n    {\n        case value_t::number_unsigned:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());\n            break;\n        }\n        case value_t::number_integer:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());\n            break;\n        }\n        case value_t::number_float:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());\n            break;\n        }\n        case value_t::boolean:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());\n            break;\n        }\n\n        case value_t::null:\n        case value_t::object:\n        case value_t::array:\n        case value_t::string:\n        case value_t::binary:\n        case value_t::discarded:\n        default:\n            JSON_THROW(type_error::create(302, \"type must be number, but is \" + std::string(j.type_name()), j));\n    }\n}\n\ntemplate<typename BasicJsonType, typename... Args, std::size_t... Idx>\nstd::tuple<Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<Idx...> /*unused*/)\n{\n    return std::make_tuple(std::forward<BasicJsonType>(j).at(Idx).template get<Args>()...);\n}\n\ntemplate < typename BasicJsonType, class A1, class A2 >\nstd::pair<A1, A2> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::pair<A1, A2>> /*unused*/, priority_tag<0> /*unused*/)\n{\n    return {std::forward<BasicJsonType>(j).at(0).template get<A1>(),\n            std::forward<BasicJsonType>(j).at(1).template get<A2>()};\n}\n\ntemplate<typename BasicJsonType, typename A1, typename A2>\nvoid from_json_tuple_impl(BasicJsonType&& j, std::pair<A1, A2>& p, priority_tag<1> /*unused*/)\n{\n    p = from_json_tuple_impl(std::forward<BasicJsonType>(j), identity_tag<std::pair<A1, A2>> {}, priority_tag<0> {});\n}\n\ntemplate<typename BasicJsonType, typename... Args>\nstd::tuple<Args...> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::tuple<Args...>> /*unused*/, priority_tag<2> /*unused*/)\n{\n    return from_json_tuple_impl_base<BasicJsonType, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {});\n}\n\ntemplate<typename BasicJsonType, typename... Args>\nvoid from_json_tuple_impl(BasicJsonType&& j, std::tuple<Args...>& t, priority_tag<3> /*unused*/)\n{\n    t = from_json_tuple_impl_base<BasicJsonType, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {});\n}\n\ntemplate<typename BasicJsonType, typename TupleRelated>\nauto from_json(BasicJsonType&& j, TupleRelated&& t)\n-> decltype(from_json_tuple_impl(std::forward<BasicJsonType>(j), std::forward<TupleRelated>(t), priority_tag<3> {}))\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name()), j));\n    }\n\n    return from_json_tuple_impl(std::forward<BasicJsonType>(j), std::forward<TupleRelated>(t), priority_tag<3> {});\n}\n\ntemplate < typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator,\n           typename = enable_if_t < !std::is_constructible <\n                                        typename BasicJsonType::string_t, Key >::value >>\nvoid from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allocator>& m)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name()), j));\n    }\n    m.clear();\n    for (const auto& p : j)\n    {\n        if (JSON_HEDLEY_UNLIKELY(!p.is_array()))\n        {\n            JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(p.type_name()), j));\n        }\n        m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>());\n    }\n}\n\ntemplate < typename BasicJsonType, typename Key, typename Value, typename Hash, typename KeyEqual, typename Allocator,\n           typename = enable_if_t < !std::is_constructible <\n                                        typename BasicJsonType::string_t, Key >::value >>\nvoid from_json(const BasicJsonType& j, std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>& m)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name()), j));\n    }\n    m.clear();\n    for (const auto& p : j)\n    {\n        if (JSON_HEDLEY_UNLIKELY(!p.is_array()))\n        {\n            JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(p.type_name()), j));\n        }\n        m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>());\n    }\n}\n\n#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, std_fs::path& p)\n{\n    if (JSON_HEDLEY_UNLIKELY(!j.is_string()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be string, but is \" + std::string(j.type_name()), j));\n    }\n    p = *j.template get_ptr<const typename BasicJsonType::string_t*>();\n}\n#endif\n\nstruct from_json_fn\n{\n    template<typename BasicJsonType, typename T>\n    auto operator()(const BasicJsonType& j, T&& val) const\n    noexcept(noexcept(from_json(j, std::forward<T>(val))))\n    -> decltype(from_json(j, std::forward<T>(val)))\n    {\n        return from_json(j, std::forward<T>(val));\n    }\n};\n}  // namespace detail\n\n/// namespace to hold default `from_json` function\n/// to see why this is required:\n/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html\nnamespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces)\n{\nconstexpr const auto& from_json = detail::static_const<detail::from_json_fn>::value; // NOLINT(misc-definitions-in-headers)\n} // namespace\n} // namespace nlohmann\n\n// #include <nlohmann/detail/conversions/to_json.hpp>\n\n\n#include <algorithm> // copy\n#include <iterator> // begin, end\n#include <string> // string\n#include <tuple> // tuple, get\n#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type\n#include <utility> // move, forward, declval, pair\n#include <valarray> // valarray\n#include <vector> // vector\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/iterators/iteration_proxy.hpp>\n\n\n#include <cstddef> // size_t\n#include <iterator> // input_iterator_tag\n#include <string> // string, to_string\n#include <tuple> // tuple_size, get, tuple_element\n#include <utility> // move\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate<typename string_type>\nvoid int_to_string( string_type& target, std::size_t value )\n{\n    // For ADL\n    using std::to_string;\n    target = to_string(value);\n}\ntemplate<typename IteratorType> class iteration_proxy_value\n{\n  public:\n    using difference_type = std::ptrdiff_t;\n    using value_type = iteration_proxy_value;\n    using pointer = value_type * ;\n    using reference = value_type & ;\n    using iterator_category = std::input_iterator_tag;\n    using string_type = typename std::remove_cv< typename std::remove_reference<decltype( std::declval<IteratorType>().key() ) >::type >::type;\n\n  private:\n    /// the iterator\n    IteratorType anchor;\n    /// an index for arrays (used to create key names)\n    std::size_t array_index = 0;\n    /// last stringified array index\n    mutable std::size_t array_index_last = 0;\n    /// a string representation of the array index\n    mutable string_type array_index_str = \"0\";\n    /// an empty string (to return a reference for primitive values)\n    const string_type empty_str{};\n\n  public:\n    explicit iteration_proxy_value(IteratorType it) noexcept\n        : anchor(std::move(it))\n    {}\n\n    /// dereference operator (needed for range-based for)\n    iteration_proxy_value& operator*()\n    {\n        return *this;\n    }\n\n    /// increment operator (needed for range-based for)\n    iteration_proxy_value& operator++()\n    {\n        ++anchor;\n        ++array_index;\n\n        return *this;\n    }\n\n    /// equality operator (needed for InputIterator)\n    bool operator==(const iteration_proxy_value& o) const\n    {\n        return anchor == o.anchor;\n    }\n\n    /// inequality operator (needed for range-based for)\n    bool operator!=(const iteration_proxy_value& o) const\n    {\n        return anchor != o.anchor;\n    }\n\n    /// return key of the iterator\n    const string_type& key() const\n    {\n        JSON_ASSERT(anchor.m_object != nullptr);\n\n        switch (anchor.m_object->type())\n        {\n            // use integer array index as key\n            case value_t::array:\n            {\n                if (array_index != array_index_last)\n                {\n                    int_to_string( array_index_str, array_index );\n                    array_index_last = array_index;\n                }\n                return array_index_str;\n            }\n\n            // use key from the object\n            case value_t::object:\n                return anchor.key();\n\n            // use an empty key for all primitive types\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n                return empty_str;\n        }\n    }\n\n    /// return value of the iterator\n    typename IteratorType::reference value() const\n    {\n        return anchor.value();\n    }\n};\n\n/// proxy class for the items() function\ntemplate<typename IteratorType> class iteration_proxy\n{\n  private:\n    /// the container to iterate\n    typename IteratorType::reference container;\n\n  public:\n    /// construct iteration proxy from a container\n    explicit iteration_proxy(typename IteratorType::reference cont) noexcept\n        : container(cont) {}\n\n    /// return iterator begin (needed for range-based for)\n    iteration_proxy_value<IteratorType> begin() noexcept\n    {\n        return iteration_proxy_value<IteratorType>(container.begin());\n    }\n\n    /// return iterator end (needed for range-based for)\n    iteration_proxy_value<IteratorType> end() noexcept\n    {\n        return iteration_proxy_value<IteratorType>(container.end());\n    }\n};\n// Structured Bindings Support\n// For further reference see https://blog.tartanllama.xyz/structured-bindings/\n// And see https://github.com/nlohmann/json/pull/1391\ntemplate<std::size_t N, typename IteratorType, enable_if_t<N == 0, int> = 0>\nauto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.key())\n{\n    return i.key();\n}\n// Structured Bindings Support\n// For further reference see https://blog.tartanllama.xyz/structured-bindings/\n// And see https://github.com/nlohmann/json/pull/1391\ntemplate<std::size_t N, typename IteratorType, enable_if_t<N == 1, int> = 0>\nauto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.value())\n{\n    return i.value();\n}\n}  // namespace detail\n}  // namespace nlohmann\n\n// The Addition to the STD Namespace is required to add\n// Structured Bindings Support to the iteration_proxy_value class\n// For further reference see https://blog.tartanllama.xyz/structured-bindings/\n// And see https://github.com/nlohmann/json/pull/1391\nnamespace std\n{\n#if defined(__clang__)\n    // Fix: https://github.com/nlohmann/json/issues/1401\n    #pragma clang diagnostic push\n    #pragma clang diagnostic ignored \"-Wmismatched-tags\"\n#endif\ntemplate<typename IteratorType>\nclass tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>\n            : public std::integral_constant<std::size_t, 2> {};\n\ntemplate<std::size_t N, typename IteratorType>\nclass tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>\n{\n  public:\n    using type = decltype(\n                     get<N>(std::declval <\n                            ::nlohmann::detail::iteration_proxy_value<IteratorType >> ()));\n};\n#if defined(__clang__)\n    #pragma clang diagnostic pop\n#endif\n} // namespace std\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\n#if JSON_HAS_EXPERIMENTAL_FILESYSTEM\n#include <experimental/filesystem>\nnamespace nlohmann::detail\n{\nnamespace std_fs = std::experimental::filesystem;\n} // namespace nlohmann::detail\n#elif JSON_HAS_FILESYSTEM\n#include <filesystem>\nnamespace nlohmann::detail\n{\nnamespace std_fs = std::filesystem;\n} // namespace nlohmann::detail\n#endif\n\nnamespace nlohmann\n{\nnamespace detail\n{\n//////////////////\n// constructors //\n//////////////////\n\n/*\n * Note all external_constructor<>::construct functions need to call\n * j.m_value.destroy(j.m_type) to avoid a memory leak in case j contains an\n * allocated value (e.g., a string). See bug issue\n * https://github.com/nlohmann/json/issues/2865 for more information.\n */\n\ntemplate<value_t> struct external_constructor;\n\ntemplate<>\nstruct external_constructor<value_t::boolean>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::boolean;\n        j.m_value = b;\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::string>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::string;\n        j.m_value = s;\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::string;\n        j.m_value = std::move(s);\n        j.assert_invariant();\n    }\n\n    template < typename BasicJsonType, typename CompatibleStringType,\n               enable_if_t < !std::is_same<CompatibleStringType, typename BasicJsonType::string_t>::value,\n                             int > = 0 >\n    static void construct(BasicJsonType& j, const CompatibleStringType& str)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::string;\n        j.m_value.string = j.template create<typename BasicJsonType::string_t>(str);\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::binary>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, const typename BasicJsonType::binary_t& b)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::binary;\n        j.m_value = typename BasicJsonType::binary_t(b);\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::binary_t&& b)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::binary;\n        j.m_value = typename BasicJsonType::binary_t(std::move(b));\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::number_float>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::number_float;\n        j.m_value = val;\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::number_unsigned>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::number_unsigned;\n        j.m_value = val;\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::number_integer>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::number_integer;\n        j.m_value = val;\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::array>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::array;\n        j.m_value = arr;\n        j.set_parents();\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::array;\n        j.m_value = std::move(arr);\n        j.set_parents();\n        j.assert_invariant();\n    }\n\n    template < typename BasicJsonType, typename CompatibleArrayType,\n               enable_if_t < !std::is_same<CompatibleArrayType, typename BasicJsonType::array_t>::value,\n                             int > = 0 >\n    static void construct(BasicJsonType& j, const CompatibleArrayType& arr)\n    {\n        using std::begin;\n        using std::end;\n\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::array;\n        j.m_value.array = j.template create<typename BasicJsonType::array_t>(begin(arr), end(arr));\n        j.set_parents();\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, const std::vector<bool>& arr)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::array;\n        j.m_value = value_t::array;\n        j.m_value.array->reserve(arr.size());\n        for (const bool x : arr)\n        {\n            j.m_value.array->push_back(x);\n            j.set_parent(j.m_value.array->back());\n        }\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType, typename T,\n             enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0>\n    static void construct(BasicJsonType& j, const std::valarray<T>& arr)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::array;\n        j.m_value = value_t::array;\n        j.m_value.array->resize(arr.size());\n        if (arr.size() > 0)\n        {\n            std::copy(std::begin(arr), std::end(arr), j.m_value.array->begin());\n        }\n        j.set_parents();\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::object>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::object;\n        j.m_value = obj;\n        j.set_parents();\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj)\n    {\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::object;\n        j.m_value = std::move(obj);\n        j.set_parents();\n        j.assert_invariant();\n    }\n\n    template < typename BasicJsonType, typename CompatibleObjectType,\n               enable_if_t < !std::is_same<CompatibleObjectType, typename BasicJsonType::object_t>::value, int > = 0 >\n    static void construct(BasicJsonType& j, const CompatibleObjectType& obj)\n    {\n        using std::begin;\n        using std::end;\n\n        j.m_value.destroy(j.m_type);\n        j.m_type = value_t::object;\n        j.m_value.object = j.template create<typename BasicJsonType::object_t>(begin(obj), end(obj));\n        j.set_parents();\n        j.assert_invariant();\n    }\n};\n\n/////////////\n// to_json //\n/////////////\n\ntemplate<typename BasicJsonType, typename T,\n         enable_if_t<std::is_same<T, typename BasicJsonType::boolean_t>::value, int> = 0>\nvoid to_json(BasicJsonType& j, T b) noexcept\n{\n    external_constructor<value_t::boolean>::construct(j, b);\n}\n\ntemplate<typename BasicJsonType, typename CompatibleString,\n         enable_if_t<std::is_constructible<typename BasicJsonType::string_t, CompatibleString>::value, int> = 0>\nvoid to_json(BasicJsonType& j, const CompatibleString& s)\n{\n    external_constructor<value_t::string>::construct(j, s);\n}\n\ntemplate<typename BasicJsonType>\nvoid to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s)\n{\n    external_constructor<value_t::string>::construct(j, std::move(s));\n}\n\ntemplate<typename BasicJsonType, typename FloatType,\n         enable_if_t<std::is_floating_point<FloatType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, FloatType val) noexcept\n{\n    external_constructor<value_t::number_float>::construct(j, static_cast<typename BasicJsonType::number_float_t>(val));\n}\n\ntemplate<typename BasicJsonType, typename CompatibleNumberUnsignedType,\n         enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_unsigned_t, CompatibleNumberUnsignedType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept\n{\n    external_constructor<value_t::number_unsigned>::construct(j, static_cast<typename BasicJsonType::number_unsigned_t>(val));\n}\n\ntemplate<typename BasicJsonType, typename CompatibleNumberIntegerType,\n         enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_integer_t, CompatibleNumberIntegerType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept\n{\n    external_constructor<value_t::number_integer>::construct(j, static_cast<typename BasicJsonType::number_integer_t>(val));\n}\n\ntemplate<typename BasicJsonType, typename EnumType,\n         enable_if_t<std::is_enum<EnumType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, EnumType e) noexcept\n{\n    using underlying_type = typename std::underlying_type<EnumType>::type;\n    external_constructor<value_t::number_integer>::construct(j, static_cast<underlying_type>(e));\n}\n\ntemplate<typename BasicJsonType>\nvoid to_json(BasicJsonType& j, const std::vector<bool>& e)\n{\n    external_constructor<value_t::array>::construct(j, e);\n}\n\ntemplate < typename BasicJsonType, typename CompatibleArrayType,\n           enable_if_t < is_compatible_array_type<BasicJsonType,\n                         CompatibleArrayType>::value&&\n                         !is_compatible_object_type<BasicJsonType, CompatibleArrayType>::value&&\n                         !is_compatible_string_type<BasicJsonType, CompatibleArrayType>::value&&\n                         !std::is_same<typename BasicJsonType::binary_t, CompatibleArrayType>::value&&\n                         !is_basic_json<CompatibleArrayType>::value,\n                         int > = 0 >\nvoid to_json(BasicJsonType& j, const CompatibleArrayType& arr)\n{\n    external_constructor<value_t::array>::construct(j, arr);\n}\n\ntemplate<typename BasicJsonType>\nvoid to_json(BasicJsonType& j, const typename BasicJsonType::binary_t& bin)\n{\n    external_constructor<value_t::binary>::construct(j, bin);\n}\n\ntemplate<typename BasicJsonType, typename T,\n         enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, const std::valarray<T>& arr)\n{\n    external_constructor<value_t::array>::construct(j, std::move(arr));\n}\n\ntemplate<typename BasicJsonType>\nvoid to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr)\n{\n    external_constructor<value_t::array>::construct(j, std::move(arr));\n}\n\ntemplate < typename BasicJsonType, typename CompatibleObjectType,\n           enable_if_t < is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value&& !is_basic_json<CompatibleObjectType>::value, int > = 0 >\nvoid to_json(BasicJsonType& j, const CompatibleObjectType& obj)\n{\n    external_constructor<value_t::object>::construct(j, obj);\n}\n\ntemplate<typename BasicJsonType>\nvoid to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj)\n{\n    external_constructor<value_t::object>::construct(j, std::move(obj));\n}\n\ntemplate <\n    typename BasicJsonType, typename T, std::size_t N,\n    enable_if_t < !std::is_constructible<typename BasicJsonType::string_t,\n                  const T(&)[N]>::value, // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)\n                  int > = 0 >\nvoid to_json(BasicJsonType& j, const T(&arr)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)\n{\n    external_constructor<value_t::array>::construct(j, arr);\n}\n\ntemplate < typename BasicJsonType, typename T1, typename T2, enable_if_t < std::is_constructible<BasicJsonType, T1>::value&& std::is_constructible<BasicJsonType, T2>::value, int > = 0 >\nvoid to_json(BasicJsonType& j, const std::pair<T1, T2>& p)\n{\n    j = { p.first, p.second };\n}\n\n// for https://github.com/nlohmann/json/pull/1134\ntemplate<typename BasicJsonType, typename T,\n         enable_if_t<std::is_same<T, iteration_proxy_value<typename BasicJsonType::iterator>>::value, int> = 0>\nvoid to_json(BasicJsonType& j, const T& b)\n{\n    j = { {b.key(), b.value()} };\n}\n\ntemplate<typename BasicJsonType, typename Tuple, std::size_t... Idx>\nvoid to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<Idx...> /*unused*/)\n{\n    j = { std::get<Idx>(t)... };\n}\n\ntemplate<typename BasicJsonType, typename T, enable_if_t<is_constructible_tuple<BasicJsonType, T>::value, int > = 0>\nvoid to_json(BasicJsonType& j, const T& t)\n{\n    to_json_tuple_impl(j, t, make_index_sequence<std::tuple_size<T>::value> {});\n}\n\n#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM\ntemplate<typename BasicJsonType>\nvoid to_json(BasicJsonType& j, const std_fs::path& p)\n{\n    j = p.string();\n}\n#endif\n\nstruct to_json_fn\n{\n    template<typename BasicJsonType, typename T>\n    auto operator()(BasicJsonType& j, T&& val) const noexcept(noexcept(to_json(j, std::forward<T>(val))))\n    -> decltype(to_json(j, std::forward<T>(val)), void())\n    {\n        return to_json(j, std::forward<T>(val));\n    }\n};\n}  // namespace detail\n\n/// namespace to hold default `to_json` function\n/// to see why this is required:\n/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html\nnamespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces)\n{\nconstexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value; // NOLINT(misc-definitions-in-headers)\n} // namespace\n} // namespace nlohmann\n\n// #include <nlohmann/detail/meta/identity_tag.hpp>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n\nnamespace nlohmann\n{\n\n/// @sa https://json.nlohmann.me/api/adl_serializer/\ntemplate<typename ValueType, typename>\nstruct adl_serializer\n{\n    /// @brief convert a JSON value to any value type\n    /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/\n    template<typename BasicJsonType, typename TargetType = ValueType>\n    static auto from_json(BasicJsonType && j, TargetType& val) noexcept(\n        noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val)))\n    -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void())\n    {\n        ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);\n    }\n\n    /// @brief convert a JSON value to any value type\n    /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/\n    template<typename BasicJsonType, typename TargetType = ValueType>\n    static auto from_json(BasicJsonType && j) noexcept(\n    noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {})))\n    -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))\n    {\n        return ::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {});\n    }\n\n    /// @brief convert any value type to a JSON value\n    /// @sa https://json.nlohmann.me/api/adl_serializer/to_json/\n    template<typename BasicJsonType, typename TargetType = ValueType>\n    static auto to_json(BasicJsonType& j, TargetType && val) noexcept(\n        noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val))))\n    -> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void())\n    {\n        ::nlohmann::to_json(j, std::forward<TargetType>(val));\n    }\n};\n}  // namespace nlohmann\n\n// #include <nlohmann/byte_container_with_subtype.hpp>\n\n\n#include <cstdint> // uint8_t, uint64_t\n#include <tuple> // tie\n#include <utility> // move\n\nnamespace nlohmann\n{\n\n/// @brief an internal type for a backed binary type\n/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/\ntemplate<typename BinaryType>\nclass byte_container_with_subtype : public BinaryType\n{\n  public:\n    using container_type = BinaryType;\n    using subtype_type = std::uint64_t;\n\n    /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/\n    byte_container_with_subtype() noexcept(noexcept(container_type()))\n        : container_type()\n    {}\n\n    /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/\n    byte_container_with_subtype(const container_type& b) noexcept(noexcept(container_type(b)))\n        : container_type(b)\n    {}\n\n    /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/\n    byte_container_with_subtype(container_type&& b) noexcept(noexcept(container_type(std::move(b))))\n        : container_type(std::move(b))\n    {}\n\n    /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/\n    byte_container_with_subtype(const container_type& b, subtype_type subtype_) noexcept(noexcept(container_type(b)))\n        : container_type(b)\n        , m_subtype(subtype_)\n        , m_has_subtype(true)\n    {}\n\n    /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/\n    byte_container_with_subtype(container_type&& b, subtype_type subtype_) noexcept(noexcept(container_type(std::move(b))))\n        : container_type(std::move(b))\n        , m_subtype(subtype_)\n        , m_has_subtype(true)\n    {}\n\n    bool operator==(const byte_container_with_subtype& rhs) const\n    {\n        return std::tie(static_cast<const BinaryType&>(*this), m_subtype, m_has_subtype) ==\n               std::tie(static_cast<const BinaryType&>(rhs), rhs.m_subtype, rhs.m_has_subtype);\n    }\n\n    bool operator!=(const byte_container_with_subtype& rhs) const\n    {\n        return !(rhs == *this);\n    }\n\n    /// @brief sets the binary subtype\n    /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/set_subtype/\n    void set_subtype(subtype_type subtype_) noexcept\n    {\n        m_subtype = subtype_;\n        m_has_subtype = true;\n    }\n\n    /// @brief return the binary subtype\n    /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/subtype/\n    constexpr subtype_type subtype() const noexcept\n    {\n        return m_has_subtype ? m_subtype : static_cast<subtype_type>(-1);\n    }\n\n    /// @brief return whether the value has a subtype\n    /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/has_subtype/\n    constexpr bool has_subtype() const noexcept\n    {\n        return m_has_subtype;\n    }\n\n    /// @brief clears the binary subtype\n    /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/clear_subtype/\n    void clear_subtype() noexcept\n    {\n        m_subtype = 0;\n        m_has_subtype = false;\n    }\n\n  private:\n    subtype_type m_subtype = 0;\n    bool m_has_subtype = false;\n};\n\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/conversions/from_json.hpp>\n\n// #include <nlohmann/detail/conversions/to_json.hpp>\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/hash.hpp>\n\n\n#include <cstdint> // uint8_t\n#include <cstddef> // size_t\n#include <functional> // hash\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n\n// boost::hash_combine\ninline std::size_t combine(std::size_t seed, std::size_t h) noexcept\n{\n    seed ^= h + 0x9e3779b9 + (seed << 6U) + (seed >> 2U);\n    return seed;\n}\n\n/*!\n@brief hash a JSON value\n\nThe hash function tries to rely on std::hash where possible. Furthermore, the\ntype of the JSON value is taken into account to have different hash values for\nnull, 0, 0U, and false, etc.\n\n@tparam BasicJsonType basic_json specialization\n@param j JSON value to hash\n@return hash value of j\n*/\ntemplate<typename BasicJsonType>\nstd::size_t hash(const BasicJsonType& j)\n{\n    using string_t = typename BasicJsonType::string_t;\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n\n    const auto type = static_cast<std::size_t>(j.type());\n    switch (j.type())\n    {\n        case BasicJsonType::value_t::null:\n        case BasicJsonType::value_t::discarded:\n        {\n            return combine(type, 0);\n        }\n\n        case BasicJsonType::value_t::object:\n        {\n            auto seed = combine(type, j.size());\n            for (const auto& element : j.items())\n            {\n                const auto h = std::hash<string_t> {}(element.key());\n                seed = combine(seed, h);\n                seed = combine(seed, hash(element.value()));\n            }\n            return seed;\n        }\n\n        case BasicJsonType::value_t::array:\n        {\n            auto seed = combine(type, j.size());\n            for (const auto& element : j)\n            {\n                seed = combine(seed, hash(element));\n            }\n            return seed;\n        }\n\n        case BasicJsonType::value_t::string:\n        {\n            const auto h = std::hash<string_t> {}(j.template get_ref<const string_t&>());\n            return combine(type, h);\n        }\n\n        case BasicJsonType::value_t::boolean:\n        {\n            const auto h = std::hash<bool> {}(j.template get<bool>());\n            return combine(type, h);\n        }\n\n        case BasicJsonType::value_t::number_integer:\n        {\n            const auto h = std::hash<number_integer_t> {}(j.template get<number_integer_t>());\n            return combine(type, h);\n        }\n\n        case BasicJsonType::value_t::number_unsigned:\n        {\n            const auto h = std::hash<number_unsigned_t> {}(j.template get<number_unsigned_t>());\n            return combine(type, h);\n        }\n\n        case BasicJsonType::value_t::number_float:\n        {\n            const auto h = std::hash<number_float_t> {}(j.template get<number_float_t>());\n            return combine(type, h);\n        }\n\n        case BasicJsonType::value_t::binary:\n        {\n            auto seed = combine(type, j.get_binary().size());\n            const auto h = std::hash<bool> {}(j.get_binary().has_subtype());\n            seed = combine(seed, h);\n            seed = combine(seed, static_cast<std::size_t>(j.get_binary().subtype()));\n            for (const auto byte : j.get_binary())\n            {\n                seed = combine(seed, std::hash<std::uint8_t> {}(byte));\n            }\n            return seed;\n        }\n\n        default:                   // LCOV_EXCL_LINE\n            JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n            return 0;              // LCOV_EXCL_LINE\n    }\n}\n\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/input/binary_reader.hpp>\n\n\n#include <algorithm> // generate_n\n#include <array> // array\n#include <cmath> // ldexp\n#include <cstddef> // size_t\n#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t\n#include <cstdio> // snprintf\n#include <cstring> // memcpy\n#include <iterator> // back_inserter\n#include <limits> // numeric_limits\n#include <string> // char_traits, string\n#include <utility> // make_pair, move\n#include <vector> // vector\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/input/input_adapters.hpp>\n\n\n#include <array> // array\n#include <cstddef> // size_t\n#include <cstring> // strlen\n#include <iterator> // begin, end, iterator_traits, random_access_iterator_tag, distance, next\n#include <memory> // shared_ptr, make_shared, addressof\n#include <numeric> // accumulate\n#include <string> // string, char_traits\n#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer\n#include <utility> // pair, declval\n\n#ifndef JSON_NO_IO\n    #include <cstdio>   // FILE *\n    #include <istream>  // istream\n#endif                  // JSON_NO_IO\n\n// #include <nlohmann/detail/iterators/iterator_traits.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n/// the supported input formats\nenum class input_format_t { json, cbor, msgpack, ubjson, bson };\n\n////////////////////\n// input adapters //\n////////////////////\n\n#ifndef JSON_NO_IO\n/*!\nInput adapter for stdio file access. This adapter read only 1 byte and do not use any\n buffer. This adapter is a very low level adapter.\n*/\nclass file_input_adapter\n{\n  public:\n    using char_type = char;\n\n    JSON_HEDLEY_NON_NULL(2)\n    explicit file_input_adapter(std::FILE* f) noexcept\n        : m_file(f)\n    {}\n\n    // make class move-only\n    file_input_adapter(const file_input_adapter&) = delete;\n    file_input_adapter(file_input_adapter&&) noexcept = default;\n    file_input_adapter& operator=(const file_input_adapter&) = delete;\n    file_input_adapter& operator=(file_input_adapter&&) = delete;\n    ~file_input_adapter() = default;\n\n    std::char_traits<char>::int_type get_character() noexcept\n    {\n        return std::fgetc(m_file);\n    }\n\n  private:\n    /// the file pointer to read from\n    std::FILE* m_file;\n};\n\n\n/*!\nInput adapter for a (caching) istream. Ignores a UFT Byte Order Mark at\nbeginning of input. Does not support changing the underlying std::streambuf\nin mid-input. Maintains underlying std::istream and std::streambuf to support\nsubsequent use of standard std::istream operations to process any input\ncharacters following those used in parsing the JSON input.  Clears the\nstd::istream flags; any input errors (e.g., EOF) will be detected by the first\nsubsequent call for input from the std::istream.\n*/\nclass input_stream_adapter\n{\n  public:\n    using char_type = char;\n\n    ~input_stream_adapter()\n    {\n        // clear stream flags; we use underlying streambuf I/O, do not\n        // maintain ifstream flags, except eof\n        if (is != nullptr)\n        {\n            is->clear(is->rdstate() & std::ios::eofbit);\n        }\n    }\n\n    explicit input_stream_adapter(std::istream& i)\n        : is(&i), sb(i.rdbuf())\n    {}\n\n    // delete because of pointer members\n    input_stream_adapter(const input_stream_adapter&) = delete;\n    input_stream_adapter& operator=(input_stream_adapter&) = delete;\n    input_stream_adapter& operator=(input_stream_adapter&&) = delete;\n\n    input_stream_adapter(input_stream_adapter&& rhs) noexcept\n        : is(rhs.is), sb(rhs.sb)\n    {\n        rhs.is = nullptr;\n        rhs.sb = nullptr;\n    }\n\n    // std::istream/std::streambuf use std::char_traits<char>::to_int_type, to\n    // ensure that std::char_traits<char>::eof() and the character 0xFF do not\n    // end up as the same value, e.g. 0xFFFFFFFF.\n    std::char_traits<char>::int_type get_character()\n    {\n        auto res = sb->sbumpc();\n        // set eof manually, as we don't use the istream interface.\n        if (JSON_HEDLEY_UNLIKELY(res == std::char_traits<char>::eof()))\n        {\n            is->clear(is->rdstate() | std::ios::eofbit);\n        }\n        return res;\n    }\n\n  private:\n    /// the associated input stream\n    std::istream* is = nullptr;\n    std::streambuf* sb = nullptr;\n};\n#endif  // JSON_NO_IO\n\n// General-purpose iterator-based adapter. It might not be as fast as\n// theoretically possible for some containers, but it is extremely versatile.\ntemplate<typename IteratorType>\nclass iterator_input_adapter\n{\n  public:\n    using char_type = typename std::iterator_traits<IteratorType>::value_type;\n\n    iterator_input_adapter(IteratorType first, IteratorType last)\n        : current(std::move(first)), end(std::move(last))\n    {}\n\n    typename std::char_traits<char_type>::int_type get_character()\n    {\n        if (JSON_HEDLEY_LIKELY(current != end))\n        {\n            auto result = std::char_traits<char_type>::to_int_type(*current);\n            std::advance(current, 1);\n            return result;\n        }\n\n        return std::char_traits<char_type>::eof();\n    }\n\n  private:\n    IteratorType current;\n    IteratorType end;\n\n    template<typename BaseInputAdapter, size_t T>\n    friend struct wide_string_input_helper;\n\n    bool empty() const\n    {\n        return current == end;\n    }\n};\n\n\ntemplate<typename BaseInputAdapter, size_t T>\nstruct wide_string_input_helper;\n\ntemplate<typename BaseInputAdapter>\nstruct wide_string_input_helper<BaseInputAdapter, 4>\n{\n    // UTF-32\n    static void fill_buffer(BaseInputAdapter& input,\n                            std::array<std::char_traits<char>::int_type, 4>& utf8_bytes,\n                            size_t& utf8_bytes_index,\n                            size_t& utf8_bytes_filled)\n    {\n        utf8_bytes_index = 0;\n\n        if (JSON_HEDLEY_UNLIKELY(input.empty()))\n        {\n            utf8_bytes[0] = std::char_traits<char>::eof();\n            utf8_bytes_filled = 1;\n        }\n        else\n        {\n            // get the current character\n            const auto wc = input.get_character();\n\n            // UTF-32 to UTF-8 encoding\n            if (wc < 0x80)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc);\n                utf8_bytes_filled = 1;\n            }\n            else if (wc <= 0x7FF)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xC0u | ((static_cast<unsigned int>(wc) >> 6u) & 0x1Fu));\n                utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu));\n                utf8_bytes_filled = 2;\n            }\n            else if (wc <= 0xFFFF)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xE0u | ((static_cast<unsigned int>(wc) >> 12u) & 0x0Fu));\n                utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 6u) & 0x3Fu));\n                utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu));\n                utf8_bytes_filled = 3;\n            }\n            else if (wc <= 0x10FFFF)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xF0u | ((static_cast<unsigned int>(wc) >> 18u) & 0x07u));\n                utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 12u) & 0x3Fu));\n                utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 6u) & 0x3Fu));\n                utf8_bytes[3] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu));\n                utf8_bytes_filled = 4;\n            }\n            else\n            {\n                // unknown character\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc);\n                utf8_bytes_filled = 1;\n            }\n        }\n    }\n};\n\ntemplate<typename BaseInputAdapter>\nstruct wide_string_input_helper<BaseInputAdapter, 2>\n{\n    // UTF-16\n    static void fill_buffer(BaseInputAdapter& input,\n                            std::array<std::char_traits<char>::int_type, 4>& utf8_bytes,\n                            size_t& utf8_bytes_index,\n                            size_t& utf8_bytes_filled)\n    {\n        utf8_bytes_index = 0;\n\n        if (JSON_HEDLEY_UNLIKELY(input.empty()))\n        {\n            utf8_bytes[0] = std::char_traits<char>::eof();\n            utf8_bytes_filled = 1;\n        }\n        else\n        {\n            // get the current character\n            const auto wc = input.get_character();\n\n            // UTF-16 to UTF-8 encoding\n            if (wc < 0x80)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc);\n                utf8_bytes_filled = 1;\n            }\n            else if (wc <= 0x7FF)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xC0u | ((static_cast<unsigned int>(wc) >> 6u)));\n                utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu));\n                utf8_bytes_filled = 2;\n            }\n            else if (0xD800 > wc || wc >= 0xE000)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xE0u | ((static_cast<unsigned int>(wc) >> 12u)));\n                utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((static_cast<unsigned int>(wc) >> 6u) & 0x3Fu));\n                utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | (static_cast<unsigned int>(wc) & 0x3Fu));\n                utf8_bytes_filled = 3;\n            }\n            else\n            {\n                if (JSON_HEDLEY_UNLIKELY(!input.empty()))\n                {\n                    const auto wc2 = static_cast<unsigned int>(input.get_character());\n                    const auto charcode = 0x10000u + (((static_cast<unsigned int>(wc) & 0x3FFu) << 10u) | (wc2 & 0x3FFu));\n                    utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xF0u | (charcode >> 18u));\n                    utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((charcode >> 12u) & 0x3Fu));\n                    utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | ((charcode >> 6u) & 0x3Fu));\n                    utf8_bytes[3] = static_cast<std::char_traits<char>::int_type>(0x80u | (charcode & 0x3Fu));\n                    utf8_bytes_filled = 4;\n                }\n                else\n                {\n                    utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc);\n                    utf8_bytes_filled = 1;\n                }\n            }\n        }\n    }\n};\n\n// Wraps another input apdater to convert wide character types into individual bytes.\ntemplate<typename BaseInputAdapter, typename WideCharType>\nclass wide_string_input_adapter\n{\n  public:\n    using char_type = char;\n\n    wide_string_input_adapter(BaseInputAdapter base)\n        : base_adapter(base) {}\n\n    typename std::char_traits<char>::int_type get_character() noexcept\n    {\n        // check if buffer needs to be filled\n        if (utf8_bytes_index == utf8_bytes_filled)\n        {\n            fill_buffer<sizeof(WideCharType)>();\n\n            JSON_ASSERT(utf8_bytes_filled > 0);\n            JSON_ASSERT(utf8_bytes_index == 0);\n        }\n\n        // use buffer\n        JSON_ASSERT(utf8_bytes_filled > 0);\n        JSON_ASSERT(utf8_bytes_index < utf8_bytes_filled);\n        return utf8_bytes[utf8_bytes_index++];\n    }\n\n  private:\n    BaseInputAdapter base_adapter;\n\n    template<size_t T>\n    void fill_buffer()\n    {\n        wide_string_input_helper<BaseInputAdapter, T>::fill_buffer(base_adapter, utf8_bytes, utf8_bytes_index, utf8_bytes_filled);\n    }\n\n    /// a buffer for UTF-8 bytes\n    std::array<std::char_traits<char>::int_type, 4> utf8_bytes = {{0, 0, 0, 0}};\n\n    /// index to the utf8_codes array for the next valid byte\n    std::size_t utf8_bytes_index = 0;\n    /// number of valid bytes in the utf8_codes array\n    std::size_t utf8_bytes_filled = 0;\n};\n\n\ntemplate<typename IteratorType, typename Enable = void>\nstruct iterator_input_adapter_factory\n{\n    using iterator_type = IteratorType;\n    using char_type = typename std::iterator_traits<iterator_type>::value_type;\n    using adapter_type = iterator_input_adapter<iterator_type>;\n\n    static adapter_type create(IteratorType first, IteratorType last)\n    {\n        return adapter_type(std::move(first), std::move(last));\n    }\n};\n\ntemplate<typename T>\nstruct is_iterator_of_multibyte\n{\n    using value_type = typename std::iterator_traits<T>::value_type;\n    enum\n    {\n        value = sizeof(value_type) > 1\n    };\n};\n\ntemplate<typename IteratorType>\nstruct iterator_input_adapter_factory<IteratorType, enable_if_t<is_iterator_of_multibyte<IteratorType>::value>>\n{\n    using iterator_type = IteratorType;\n    using char_type = typename std::iterator_traits<iterator_type>::value_type;\n    using base_adapter_type = iterator_input_adapter<iterator_type>;\n    using adapter_type = wide_string_input_adapter<base_adapter_type, char_type>;\n\n    static adapter_type create(IteratorType first, IteratorType last)\n    {\n        return adapter_type(base_adapter_type(std::move(first), std::move(last)));\n    }\n};\n\n// General purpose iterator-based input\ntemplate<typename IteratorType>\ntypename iterator_input_adapter_factory<IteratorType>::adapter_type input_adapter(IteratorType first, IteratorType last)\n{\n    using factory_type = iterator_input_adapter_factory<IteratorType>;\n    return factory_type::create(first, last);\n}\n\n// Convenience shorthand from container to iterator\n// Enables ADL on begin(container) and end(container)\n// Encloses the using declarations in namespace for not to leak them to outside scope\n\nnamespace container_input_adapter_factory_impl\n{\n\nusing std::begin;\nusing std::end;\n\ntemplate<typename ContainerType, typename Enable = void>\nstruct container_input_adapter_factory {};\n\ntemplate<typename ContainerType>\nstruct container_input_adapter_factory< ContainerType,\n       void_t<decltype(begin(std::declval<ContainerType>()), end(std::declval<ContainerType>()))>>\n       {\n           using adapter_type = decltype(input_adapter(begin(std::declval<ContainerType>()), end(std::declval<ContainerType>())));\n\n           static adapter_type create(const ContainerType& container)\n{\n    return input_adapter(begin(container), end(container));\n}\n       };\n\n} // namespace container_input_adapter_factory_impl\n\ntemplate<typename ContainerType>\ntypename container_input_adapter_factory_impl::container_input_adapter_factory<ContainerType>::adapter_type input_adapter(const ContainerType& container)\n{\n    return container_input_adapter_factory_impl::container_input_adapter_factory<ContainerType>::create(container);\n}\n\n#ifndef JSON_NO_IO\n// Special cases with fast paths\ninline file_input_adapter input_adapter(std::FILE* file)\n{\n    return file_input_adapter(file);\n}\n\ninline input_stream_adapter input_adapter(std::istream& stream)\n{\n    return input_stream_adapter(stream);\n}\n\ninline input_stream_adapter input_adapter(std::istream&& stream)\n{\n    return input_stream_adapter(stream);\n}\n#endif  // JSON_NO_IO\n\nusing contiguous_bytes_input_adapter = decltype(input_adapter(std::declval<const char*>(), std::declval<const char*>()));\n\n// Null-delimited strings, and the like.\ntemplate < typename CharT,\n           typename std::enable_if <\n               std::is_pointer<CharT>::value&&\n               !std::is_array<CharT>::value&&\n               std::is_integral<typename std::remove_pointer<CharT>::type>::value&&\n               sizeof(typename std::remove_pointer<CharT>::type) == 1,\n               int >::type = 0 >\ncontiguous_bytes_input_adapter input_adapter(CharT b)\n{\n    auto length = std::strlen(reinterpret_cast<const char*>(b));\n    const auto* ptr = reinterpret_cast<const char*>(b);\n    return input_adapter(ptr, ptr + length);\n}\n\ntemplate<typename T, std::size_t N>\nauto input_adapter(T (&array)[N]) -> decltype(input_adapter(array, array + N)) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)\n{\n    return input_adapter(array, array + N);\n}\n\n// This class only handles inputs of input_buffer_adapter type.\n// It's required so that expressions like {ptr, len} can be implicitly cast\n// to the correct adapter.\nclass span_input_adapter\n{\n  public:\n    template < typename CharT,\n               typename std::enable_if <\n                   std::is_pointer<CharT>::value&&\n                   std::is_integral<typename std::remove_pointer<CharT>::type>::value&&\n                   sizeof(typename std::remove_pointer<CharT>::type) == 1,\n                   int >::type = 0 >\n    span_input_adapter(CharT b, std::size_t l)\n        : ia(reinterpret_cast<const char*>(b), reinterpret_cast<const char*>(b) + l) {}\n\n    template<class IteratorType,\n             typename std::enable_if<\n                 std::is_same<typename iterator_traits<IteratorType>::iterator_category, std::random_access_iterator_tag>::value,\n                 int>::type = 0>\n    span_input_adapter(IteratorType first, IteratorType last)\n        : ia(input_adapter(first, last)) {}\n\n    contiguous_bytes_input_adapter&& get()\n    {\n        return std::move(ia); // NOLINT(hicpp-move-const-arg,performance-move-const-arg)\n    }\n\n  private:\n    contiguous_bytes_input_adapter ia;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/input/json_sax.hpp>\n\n\n#include <cstddef>\n#include <string> // string\n#include <utility> // move\n#include <vector> // vector\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\n\n/*!\n@brief SAX interface\n\nThis class describes the SAX interface used by @ref nlohmann::json::sax_parse.\nEach function is called in different situations while the input is parsed. The\nboolean return value informs the parser whether to continue processing the\ninput.\n*/\ntemplate<typename BasicJsonType>\nstruct json_sax\n{\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using binary_t = typename BasicJsonType::binary_t;\n\n    /*!\n    @brief a null value was read\n    @return whether parsing should proceed\n    */\n    virtual bool null() = 0;\n\n    /*!\n    @brief a boolean value was read\n    @param[in] val  boolean value\n    @return whether parsing should proceed\n    */\n    virtual bool boolean(bool val) = 0;\n\n    /*!\n    @brief an integer number was read\n    @param[in] val  integer value\n    @return whether parsing should proceed\n    */\n    virtual bool number_integer(number_integer_t val) = 0;\n\n    /*!\n    @brief an unsigned integer number was read\n    @param[in] val  unsigned integer value\n    @return whether parsing should proceed\n    */\n    virtual bool number_unsigned(number_unsigned_t val) = 0;\n\n    /*!\n    @brief a floating-point number was read\n    @param[in] val  floating-point value\n    @param[in] s    raw token value\n    @return whether parsing should proceed\n    */\n    virtual bool number_float(number_float_t val, const string_t& s) = 0;\n\n    /*!\n    @brief a string value was read\n    @param[in] val  string value\n    @return whether parsing should proceed\n    @note It is safe to move the passed string value.\n    */\n    virtual bool string(string_t& val) = 0;\n\n    /*!\n    @brief a binary value was read\n    @param[in] val  binary value\n    @return whether parsing should proceed\n    @note It is safe to move the passed binary value.\n    */\n    virtual bool binary(binary_t& val) = 0;\n\n    /*!\n    @brief the beginning of an object was read\n    @param[in] elements  number of object elements or -1 if unknown\n    @return whether parsing should proceed\n    @note binary formats may report the number of elements\n    */\n    virtual bool start_object(std::size_t elements) = 0;\n\n    /*!\n    @brief an object key was read\n    @param[in] val  object key\n    @return whether parsing should proceed\n    @note It is safe to move the passed string.\n    */\n    virtual bool key(string_t& val) = 0;\n\n    /*!\n    @brief the end of an object was read\n    @return whether parsing should proceed\n    */\n    virtual bool end_object() = 0;\n\n    /*!\n    @brief the beginning of an array was read\n    @param[in] elements  number of array elements or -1 if unknown\n    @return whether parsing should proceed\n    @note binary formats may report the number of elements\n    */\n    virtual bool start_array(std::size_t elements) = 0;\n\n    /*!\n    @brief the end of an array was read\n    @return whether parsing should proceed\n    */\n    virtual bool end_array() = 0;\n\n    /*!\n    @brief a parse error occurred\n    @param[in] position    the position in the input where the error occurs\n    @param[in] last_token  the last read token\n    @param[in] ex          an exception object describing the error\n    @return whether parsing should proceed (must return false)\n    */\n    virtual bool parse_error(std::size_t position,\n                             const std::string& last_token,\n                             const detail::exception& ex) = 0;\n\n    json_sax() = default;\n    json_sax(const json_sax&) = default;\n    json_sax(json_sax&&) noexcept = default;\n    json_sax& operator=(const json_sax&) = default;\n    json_sax& operator=(json_sax&&) noexcept = default;\n    virtual ~json_sax() = default;\n};\n\n\nnamespace detail\n{\n/*!\n@brief SAX implementation to create a JSON value from SAX events\n\nThis class implements the @ref json_sax interface and processes the SAX events\nto create a JSON value which makes it basically a DOM parser. The structure or\nhierarchy of the JSON value is managed by the stack `ref_stack` which contains\na pointer to the respective array or object for each recursion depth.\n\nAfter successful parsing, the value that is passed by reference to the\nconstructor contains the parsed value.\n\n@tparam BasicJsonType  the JSON type\n*/\ntemplate<typename BasicJsonType>\nclass json_sax_dom_parser\n{\n  public:\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using binary_t = typename BasicJsonType::binary_t;\n\n    /*!\n    @param[in,out] r  reference to a JSON value that is manipulated while\n                       parsing\n    @param[in] allow_exceptions_  whether parse errors yield exceptions\n    */\n    explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true)\n        : root(r), allow_exceptions(allow_exceptions_)\n    {}\n\n    // make class move-only\n    json_sax_dom_parser(const json_sax_dom_parser&) = delete;\n    json_sax_dom_parser(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)\n    json_sax_dom_parser& operator=(const json_sax_dom_parser&) = delete;\n    json_sax_dom_parser& operator=(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)\n    ~json_sax_dom_parser() = default;\n\n    bool null()\n    {\n        handle_value(nullptr);\n        return true;\n    }\n\n    bool boolean(bool val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_integer(number_integer_t val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_unsigned(number_unsigned_t val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_float(number_float_t val, const string_t& /*unused*/)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool string(string_t& val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool binary(binary_t& val)\n    {\n        handle_value(std::move(val));\n        return true;\n    }\n\n    bool start_object(std::size_t len)\n    {\n        ref_stack.push_back(handle_value(BasicJsonType::value_t::object));\n\n        if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))\n        {\n            JSON_THROW(out_of_range::create(408, \"excessive object size: \" + std::to_string(len), *ref_stack.back()));\n        }\n\n        return true;\n    }\n\n    bool key(string_t& val)\n    {\n        // add null at given key and store the reference for later\n        object_element = &(ref_stack.back()->m_value.object->operator[](val));\n        return true;\n    }\n\n    bool end_object()\n    {\n        ref_stack.back()->set_parents();\n        ref_stack.pop_back();\n        return true;\n    }\n\n    bool start_array(std::size_t len)\n    {\n        ref_stack.push_back(handle_value(BasicJsonType::value_t::array));\n\n        if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))\n        {\n            JSON_THROW(out_of_range::create(408, \"excessive array size: \" + std::to_string(len), *ref_stack.back()));\n        }\n\n        return true;\n    }\n\n    bool end_array()\n    {\n        ref_stack.back()->set_parents();\n        ref_stack.pop_back();\n        return true;\n    }\n\n    template<class Exception>\n    bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/,\n                     const Exception& ex)\n    {\n        errored = true;\n        static_cast<void>(ex);\n        if (allow_exceptions)\n        {\n            JSON_THROW(ex);\n        }\n        return false;\n    }\n\n    constexpr bool is_errored() const\n    {\n        return errored;\n    }\n\n  private:\n    /*!\n    @invariant If the ref stack is empty, then the passed value will be the new\n               root.\n    @invariant If the ref stack contains a value, then it is an array or an\n               object to which we can add elements\n    */\n    template<typename Value>\n    JSON_HEDLEY_RETURNS_NON_NULL\n    BasicJsonType* handle_value(Value&& v)\n    {\n        if (ref_stack.empty())\n        {\n            root = BasicJsonType(std::forward<Value>(v));\n            return &root;\n        }\n\n        JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());\n\n        if (ref_stack.back()->is_array())\n        {\n            ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v));\n            return &(ref_stack.back()->m_value.array->back());\n        }\n\n        JSON_ASSERT(ref_stack.back()->is_object());\n        JSON_ASSERT(object_element);\n        *object_element = BasicJsonType(std::forward<Value>(v));\n        return object_element;\n    }\n\n    /// the parsed JSON value\n    BasicJsonType& root;\n    /// stack to model hierarchy of values\n    std::vector<BasicJsonType*> ref_stack {};\n    /// helper to hold the reference for the next object element\n    BasicJsonType* object_element = nullptr;\n    /// whether a syntax error occurred\n    bool errored = false;\n    /// whether to throw exceptions in case of errors\n    const bool allow_exceptions = true;\n};\n\ntemplate<typename BasicJsonType>\nclass json_sax_dom_callback_parser\n{\n  public:\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using binary_t = typename BasicJsonType::binary_t;\n    using parser_callback_t = typename BasicJsonType::parser_callback_t;\n    using parse_event_t = typename BasicJsonType::parse_event_t;\n\n    json_sax_dom_callback_parser(BasicJsonType& r,\n                                 const parser_callback_t cb,\n                                 const bool allow_exceptions_ = true)\n        : root(r), callback(cb), allow_exceptions(allow_exceptions_)\n    {\n        keep_stack.push_back(true);\n    }\n\n    // make class move-only\n    json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = delete;\n    json_sax_dom_callback_parser(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)\n    json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_parser&) = delete;\n    json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)\n    ~json_sax_dom_callback_parser() = default;\n\n    bool null()\n    {\n        handle_value(nullptr);\n        return true;\n    }\n\n    bool boolean(bool val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_integer(number_integer_t val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_unsigned(number_unsigned_t val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_float(number_float_t val, const string_t& /*unused*/)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool string(string_t& val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool binary(binary_t& val)\n    {\n        handle_value(std::move(val));\n        return true;\n    }\n\n    bool start_object(std::size_t len)\n    {\n        // check callback for object start\n        const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded);\n        keep_stack.push_back(keep);\n\n        auto val = handle_value(BasicJsonType::value_t::object, true);\n        ref_stack.push_back(val.second);\n\n        // check object limit\n        if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))\n        {\n            JSON_THROW(out_of_range::create(408, \"excessive object size: \" + std::to_string(len), *ref_stack.back()));\n        }\n\n        return true;\n    }\n\n    bool key(string_t& val)\n    {\n        BasicJsonType k = BasicJsonType(val);\n\n        // check callback for key\n        const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k);\n        key_keep_stack.push_back(keep);\n\n        // add discarded value at given key and store the reference for later\n        if (keep && ref_stack.back())\n        {\n            object_element = &(ref_stack.back()->m_value.object->operator[](val) = discarded);\n        }\n\n        return true;\n    }\n\n    bool end_object()\n    {\n        if (ref_stack.back())\n        {\n            if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back()))\n            {\n                // discard object\n                *ref_stack.back() = discarded;\n            }\n            else\n            {\n                ref_stack.back()->set_parents();\n            }\n        }\n\n        JSON_ASSERT(!ref_stack.empty());\n        JSON_ASSERT(!keep_stack.empty());\n        ref_stack.pop_back();\n        keep_stack.pop_back();\n\n        if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured())\n        {\n            // remove discarded value\n            for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it)\n            {\n                if (it->is_discarded())\n                {\n                    ref_stack.back()->erase(it);\n                    break;\n                }\n            }\n        }\n\n        return true;\n    }\n\n    bool start_array(std::size_t len)\n    {\n        const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::array_start, discarded);\n        keep_stack.push_back(keep);\n\n        auto val = handle_value(BasicJsonType::value_t::array, true);\n        ref_stack.push_back(val.second);\n\n        // check array limit\n        if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))\n        {\n            JSON_THROW(out_of_range::create(408, \"excessive array size: \" + std::to_string(len), *ref_stack.back()));\n        }\n\n        return true;\n    }\n\n    bool end_array()\n    {\n        bool keep = true;\n\n        if (ref_stack.back())\n        {\n            keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back());\n            if (keep)\n            {\n                ref_stack.back()->set_parents();\n            }\n            else\n            {\n                // discard array\n                *ref_stack.back() = discarded;\n            }\n        }\n\n        JSON_ASSERT(!ref_stack.empty());\n        JSON_ASSERT(!keep_stack.empty());\n        ref_stack.pop_back();\n        keep_stack.pop_back();\n\n        // remove discarded value\n        if (!keep && !ref_stack.empty() && ref_stack.back()->is_array())\n        {\n            ref_stack.back()->m_value.array->pop_back();\n        }\n\n        return true;\n    }\n\n    template<class Exception>\n    bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/,\n                     const Exception& ex)\n    {\n        errored = true;\n        static_cast<void>(ex);\n        if (allow_exceptions)\n        {\n            JSON_THROW(ex);\n        }\n        return false;\n    }\n\n    constexpr bool is_errored() const\n    {\n        return errored;\n    }\n\n  private:\n    /*!\n    @param[in] v  value to add to the JSON value we build during parsing\n    @param[in] skip_callback  whether we should skip calling the callback\n               function; this is required after start_array() and\n               start_object() SAX events, because otherwise we would call the\n               callback function with an empty array or object, respectively.\n\n    @invariant If the ref stack is empty, then the passed value will be the new\n               root.\n    @invariant If the ref stack contains a value, then it is an array or an\n               object to which we can add elements\n\n    @return pair of boolean (whether value should be kept) and pointer (to the\n            passed value in the ref_stack hierarchy; nullptr if not kept)\n    */\n    template<typename Value>\n    std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)\n    {\n        JSON_ASSERT(!keep_stack.empty());\n\n        // do not handle this value if we know it would be added to a discarded\n        // container\n        if (!keep_stack.back())\n        {\n            return {false, nullptr};\n        }\n\n        // create value\n        auto value = BasicJsonType(std::forward<Value>(v));\n\n        // check callback\n        const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);\n\n        // do not handle this value if we just learnt it shall be discarded\n        if (!keep)\n        {\n            return {false, nullptr};\n        }\n\n        if (ref_stack.empty())\n        {\n            root = std::move(value);\n            return {true, &root};\n        }\n\n        // skip this value if we already decided to skip the parent\n        // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)\n        if (!ref_stack.back())\n        {\n            return {false, nullptr};\n        }\n\n        // we now only expect arrays and objects\n        JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());\n\n        // array\n        if (ref_stack.back()->is_array())\n        {\n            ref_stack.back()->m_value.array->emplace_back(std::move(value));\n            return {true, &(ref_stack.back()->m_value.array->back())};\n        }\n\n        // object\n        JSON_ASSERT(ref_stack.back()->is_object());\n        // check if we should store an element for the current key\n        JSON_ASSERT(!key_keep_stack.empty());\n        const bool store_element = key_keep_stack.back();\n        key_keep_stack.pop_back();\n\n        if (!store_element)\n        {\n            return {false, nullptr};\n        }\n\n        JSON_ASSERT(object_element);\n        *object_element = std::move(value);\n        return {true, object_element};\n    }\n\n    /// the parsed JSON value\n    BasicJsonType& root;\n    /// stack to model hierarchy of values\n    std::vector<BasicJsonType*> ref_stack {};\n    /// stack to manage which values to keep\n    std::vector<bool> keep_stack {};\n    /// stack to manage which object keys to keep\n    std::vector<bool> key_keep_stack {};\n    /// helper to hold the reference for the next object element\n    BasicJsonType* object_element = nullptr;\n    /// whether a syntax error occurred\n    bool errored = false;\n    /// callback function\n    const parser_callback_t callback = nullptr;\n    /// whether to throw exceptions in case of errors\n    const bool allow_exceptions = true;\n    /// a discarded value for the callback\n    BasicJsonType discarded = BasicJsonType::value_t::discarded;\n};\n\ntemplate<typename BasicJsonType>\nclass json_sax_acceptor\n{\n  public:\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using binary_t = typename BasicJsonType::binary_t;\n\n    bool null()\n    {\n        return true;\n    }\n\n    bool boolean(bool /*unused*/)\n    {\n        return true;\n    }\n\n    bool number_integer(number_integer_t /*unused*/)\n    {\n        return true;\n    }\n\n    bool number_unsigned(number_unsigned_t /*unused*/)\n    {\n        return true;\n    }\n\n    bool number_float(number_float_t /*unused*/, const string_t& /*unused*/)\n    {\n        return true;\n    }\n\n    bool string(string_t& /*unused*/)\n    {\n        return true;\n    }\n\n    bool binary(binary_t& /*unused*/)\n    {\n        return true;\n    }\n\n    bool start_object(std::size_t /*unused*/ = static_cast<std::size_t>(-1))\n    {\n        return true;\n    }\n\n    bool key(string_t& /*unused*/)\n    {\n        return true;\n    }\n\n    bool end_object()\n    {\n        return true;\n    }\n\n    bool start_array(std::size_t /*unused*/ = static_cast<std::size_t>(-1))\n    {\n        return true;\n    }\n\n    bool end_array()\n    {\n        return true;\n    }\n\n    bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const detail::exception& /*unused*/)\n    {\n        return false;\n    }\n};\n}  // namespace detail\n\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/input/lexer.hpp>\n\n\n#include <array> // array\n#include <clocale> // localeconv\n#include <cstddef> // size_t\n#include <cstdio> // snprintf\n#include <cstdlib> // strtof, strtod, strtold, strtoll, strtoull\n#include <initializer_list> // initializer_list\n#include <string> // char_traits, string\n#include <utility> // move\n#include <vector> // vector\n\n// #include <nlohmann/detail/input/input_adapters.hpp>\n\n// #include <nlohmann/detail/input/position_t.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n///////////\n// lexer //\n///////////\n\ntemplate<typename BasicJsonType>\nclass lexer_base\n{\n  public:\n    /// token types for the parser\n    enum class token_type\n    {\n        uninitialized,    ///< indicating the scanner is uninitialized\n        literal_true,     ///< the `true` literal\n        literal_false,    ///< the `false` literal\n        literal_null,     ///< the `null` literal\n        value_string,     ///< a string -- use get_string() for actual value\n        value_unsigned,   ///< an unsigned integer -- use get_number_unsigned() for actual value\n        value_integer,    ///< a signed integer -- use get_number_integer() for actual value\n        value_float,      ///< an floating point number -- use get_number_float() for actual value\n        begin_array,      ///< the character for array begin `[`\n        begin_object,     ///< the character for object begin `{`\n        end_array,        ///< the character for array end `]`\n        end_object,       ///< the character for object end `}`\n        name_separator,   ///< the name separator `:`\n        value_separator,  ///< the value separator `,`\n        parse_error,      ///< indicating a parse error\n        end_of_input,     ///< indicating the end of the input buffer\n        literal_or_value  ///< a literal or the begin of a value (only for diagnostics)\n    };\n\n    /// return name of values of type token_type (only used for errors)\n    JSON_HEDLEY_RETURNS_NON_NULL\n    JSON_HEDLEY_CONST\n    static const char* token_type_name(const token_type t) noexcept\n    {\n        switch (t)\n        {\n            case token_type::uninitialized:\n                return \"<uninitialized>\";\n            case token_type::literal_true:\n                return \"true literal\";\n            case token_type::literal_false:\n                return \"false literal\";\n            case token_type::literal_null:\n                return \"null literal\";\n            case token_type::value_string:\n                return \"string literal\";\n            case token_type::value_unsigned:\n            case token_type::value_integer:\n            case token_type::value_float:\n                return \"number literal\";\n            case token_type::begin_array:\n                return \"'['\";\n            case token_type::begin_object:\n                return \"'{'\";\n            case token_type::end_array:\n                return \"']'\";\n            case token_type::end_object:\n                return \"'}'\";\n            case token_type::name_separator:\n                return \"':'\";\n            case token_type::value_separator:\n                return \"','\";\n            case token_type::parse_error:\n                return \"<parse error>\";\n            case token_type::end_of_input:\n                return \"end of input\";\n            case token_type::literal_or_value:\n                return \"'[', '{', or a literal\";\n            // LCOV_EXCL_START\n            default: // catch non-enum values\n                return \"unknown token\";\n                // LCOV_EXCL_STOP\n        }\n    }\n};\n/*!\n@brief lexical analysis\n\nThis class organizes the lexical analysis during JSON deserialization.\n*/\ntemplate<typename BasicJsonType, typename InputAdapterType>\nclass lexer : public lexer_base<BasicJsonType>\n{\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using char_type = typename InputAdapterType::char_type;\n    using char_int_type = typename std::char_traits<char_type>::int_type;\n\n  public:\n    using token_type = typename lexer_base<BasicJsonType>::token_type;\n\n    explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept\n        : ia(std::move(adapter))\n        , ignore_comments(ignore_comments_)\n        , decimal_point_char(static_cast<char_int_type>(get_decimal_point()))\n    {}\n\n    // delete because of pointer members\n    lexer(const lexer&) = delete;\n    lexer(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)\n    lexer& operator=(lexer&) = delete;\n    lexer& operator=(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)\n    ~lexer() = default;\n\n  private:\n    /////////////////////\n    // locales\n    /////////////////////\n\n    /// return the locale-dependent decimal point\n    JSON_HEDLEY_PURE\n    static char get_decimal_point() noexcept\n    {\n        const auto* loc = localeconv();\n        JSON_ASSERT(loc != nullptr);\n        return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point);\n    }\n\n    /////////////////////\n    // scan functions\n    /////////////////////\n\n    /*!\n    @brief get codepoint from 4 hex characters following `\\u`\n\n    For input \"\\u c1 c2 c3 c4\" the codepoint is:\n      (c1 * 0x1000) + (c2 * 0x0100) + (c3 * 0x0010) + c4\n    = (c1 << 12) + (c2 << 8) + (c3 << 4) + (c4 << 0)\n\n    Furthermore, the possible characters '0'..'9', 'A'..'F', and 'a'..'f'\n    must be converted to the integers 0x0..0x9, 0xA..0xF, 0xA..0xF, resp. The\n    conversion is done by subtracting the offset (0x30, 0x37, and 0x57)\n    between the ASCII value of the character and the desired integer value.\n\n    @return codepoint (0x0000..0xFFFF) or -1 in case of an error (e.g. EOF or\n            non-hex character)\n    */\n    int get_codepoint()\n    {\n        // this function only makes sense after reading `\\u`\n        JSON_ASSERT(current == 'u');\n        int codepoint = 0;\n\n        const auto factors = { 12u, 8u, 4u, 0u };\n        for (const auto factor : factors)\n        {\n            get();\n\n            if (current >= '0' && current <= '9')\n            {\n                codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);\n            }\n            else if (current >= 'A' && current <= 'F')\n            {\n                codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);\n            }\n            else if (current >= 'a' && current <= 'f')\n            {\n                codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);\n            }\n            else\n            {\n                return -1;\n            }\n        }\n\n        JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF);\n        return codepoint;\n    }\n\n    /*!\n    @brief check if the next byte(s) are inside a given range\n\n    Adds the current byte and, for each passed range, reads a new byte and\n    checks if it is inside the range. If a violation was detected, set up an\n    error message and return false. Otherwise, return true.\n\n    @param[in] ranges  list of integers; interpreted as list of pairs of\n                       inclusive lower and upper bound, respectively\n\n    @pre The passed list @a ranges must have 2, 4, or 6 elements; that is,\n         1, 2, or 3 pairs. This precondition is enforced by an assertion.\n\n    @return true if and only if no range violation was detected\n    */\n    bool next_byte_in_range(std::initializer_list<char_int_type> ranges)\n    {\n        JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6);\n        add(current);\n\n        for (auto range = ranges.begin(); range != ranges.end(); ++range)\n        {\n            get();\n            if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range)))\n            {\n                add(current);\n            }\n            else\n            {\n                error_message = \"invalid string: ill-formed UTF-8 byte\";\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    /*!\n    @brief scan a string literal\n\n    This function scans a string according to Sect. 7 of RFC 8259. While\n    scanning, bytes are escaped and copied into buffer token_buffer. Then the\n    function returns successfully, token_buffer is *not* null-terminated (as it\n    may contain \\0 bytes), and token_buffer.size() is the number of bytes in the\n    string.\n\n    @return token_type::value_string if string could be successfully scanned,\n            token_type::parse_error otherwise\n\n    @note In case of errors, variable error_message contains a textual\n          description.\n    */\n    token_type scan_string()\n    {\n        // reset token_buffer (ignore opening quote)\n        reset();\n\n        // we entered the function by reading an open quote\n        JSON_ASSERT(current == '\\\"');\n\n        while (true)\n        {\n            // get next character\n            switch (get())\n            {\n                // end of file while parsing string\n                case std::char_traits<char_type>::eof():\n                {\n                    error_message = \"invalid string: missing closing quote\";\n                    return token_type::parse_error;\n                }\n\n                // closing quote\n                case '\\\"':\n                {\n                    return token_type::value_string;\n                }\n\n                // escapes\n                case '\\\\':\n                {\n                    switch (get())\n                    {\n                        // quotation mark\n                        case '\\\"':\n                            add('\\\"');\n                            break;\n                        // reverse solidus\n                        case '\\\\':\n                            add('\\\\');\n                            break;\n                        // solidus\n                        case '/':\n                            add('/');\n                            break;\n                        // backspace\n                        case 'b':\n                            add('\\b');\n                            break;\n                        // form feed\n                        case 'f':\n                            add('\\f');\n                            break;\n                        // line feed\n                        case 'n':\n                            add('\\n');\n                            break;\n                        // carriage return\n                        case 'r':\n                            add('\\r');\n                            break;\n                        // tab\n                        case 't':\n                            add('\\t');\n                            break;\n\n                        // unicode escapes\n                        case 'u':\n                        {\n                            const int codepoint1 = get_codepoint();\n                            int codepoint = codepoint1; // start with codepoint1\n\n                            if (JSON_HEDLEY_UNLIKELY(codepoint1 == -1))\n                            {\n                                error_message = \"invalid string: '\\\\u' must be followed by 4 hex digits\";\n                                return token_type::parse_error;\n                            }\n\n                            // check if code point is a high surrogate\n                            if (0xD800 <= codepoint1 && codepoint1 <= 0xDBFF)\n                            {\n                                // expect next \\uxxxx entry\n                                if (JSON_HEDLEY_LIKELY(get() == '\\\\' && get() == 'u'))\n                                {\n                                    const int codepoint2 = get_codepoint();\n\n                                    if (JSON_HEDLEY_UNLIKELY(codepoint2 == -1))\n                                    {\n                                        error_message = \"invalid string: '\\\\u' must be followed by 4 hex digits\";\n                                        return token_type::parse_error;\n                                    }\n\n                                    // check if codepoint2 is a low surrogate\n                                    if (JSON_HEDLEY_LIKELY(0xDC00 <= codepoint2 && codepoint2 <= 0xDFFF))\n                                    {\n                                        // overwrite codepoint\n                                        codepoint = static_cast<int>(\n                                                        // high surrogate occupies the most significant 22 bits\n                                                        (static_cast<unsigned int>(codepoint1) << 10u)\n                                                        // low surrogate occupies the least significant 15 bits\n                                                        + static_cast<unsigned int>(codepoint2)\n                                                        // there is still the 0xD800, 0xDC00 and 0x10000 noise\n                                                        // in the result, so we have to subtract with:\n                                                        // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00\n                                                        - 0x35FDC00u);\n                                    }\n                                    else\n                                    {\n                                        error_message = \"invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF\";\n                                        return token_type::parse_error;\n                                    }\n                                }\n                                else\n                                {\n                                    error_message = \"invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF\";\n                                    return token_type::parse_error;\n                                }\n                            }\n                            else\n                            {\n                                if (JSON_HEDLEY_UNLIKELY(0xDC00 <= codepoint1 && codepoint1 <= 0xDFFF))\n                                {\n                                    error_message = \"invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF\";\n                                    return token_type::parse_error;\n                                }\n                            }\n\n                            // result of the above calculation yields a proper codepoint\n                            JSON_ASSERT(0x00 <= codepoint && codepoint <= 0x10FFFF);\n\n                            // translate codepoint into bytes\n                            if (codepoint < 0x80)\n                            {\n                                // 1-byte characters: 0xxxxxxx (ASCII)\n                                add(static_cast<char_int_type>(codepoint));\n                            }\n                            else if (codepoint <= 0x7FF)\n                            {\n                                // 2-byte characters: 110xxxxx 10xxxxxx\n                                add(static_cast<char_int_type>(0xC0u | (static_cast<unsigned int>(codepoint) >> 6u)));\n                                add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));\n                            }\n                            else if (codepoint <= 0xFFFF)\n                            {\n                                // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx\n                                add(static_cast<char_int_type>(0xE0u | (static_cast<unsigned int>(codepoint) >> 12u)));\n                                add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu)));\n                                add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));\n                            }\n                            else\n                            {\n                                // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n                                add(static_cast<char_int_type>(0xF0u | (static_cast<unsigned int>(codepoint) >> 18u)));\n                                add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 12u) & 0x3Fu)));\n                                add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu)));\n                                add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));\n                            }\n\n                            break;\n                        }\n\n                        // other characters after escape\n                        default:\n                            error_message = \"invalid string: forbidden character after backslash\";\n                            return token_type::parse_error;\n                    }\n\n                    break;\n                }\n\n                // invalid control characters\n                case 0x00:\n                {\n                    error_message = \"invalid string: control character U+0000 (NUL) must be escaped to \\\\u0000\";\n                    return token_type::parse_error;\n                }\n\n                case 0x01:\n                {\n                    error_message = \"invalid string: control character U+0001 (SOH) must be escaped to \\\\u0001\";\n                    return token_type::parse_error;\n                }\n\n                case 0x02:\n                {\n                    error_message = \"invalid string: control character U+0002 (STX) must be escaped to \\\\u0002\";\n                    return token_type::parse_error;\n                }\n\n                case 0x03:\n                {\n                    error_message = \"invalid string: control character U+0003 (ETX) must be escaped to \\\\u0003\";\n                    return token_type::parse_error;\n                }\n\n                case 0x04:\n                {\n                    error_message = \"invalid string: control character U+0004 (EOT) must be escaped to \\\\u0004\";\n                    return token_type::parse_error;\n                }\n\n                case 0x05:\n                {\n                    error_message = \"invalid string: control character U+0005 (ENQ) must be escaped to \\\\u0005\";\n                    return token_type::parse_error;\n                }\n\n                case 0x06:\n                {\n                    error_message = \"invalid string: control character U+0006 (ACK) must be escaped to \\\\u0006\";\n                    return token_type::parse_error;\n                }\n\n                case 0x07:\n                {\n                    error_message = \"invalid string: control character U+0007 (BEL) must be escaped to \\\\u0007\";\n                    return token_type::parse_error;\n                }\n\n                case 0x08:\n                {\n                    error_message = \"invalid string: control character U+0008 (BS) must be escaped to \\\\u0008 or \\\\b\";\n                    return token_type::parse_error;\n                }\n\n                case 0x09:\n                {\n                    error_message = \"invalid string: control character U+0009 (HT) must be escaped to \\\\u0009 or \\\\t\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0A:\n                {\n                    error_message = \"invalid string: control character U+000A (LF) must be escaped to \\\\u000A or \\\\n\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0B:\n                {\n                    error_message = \"invalid string: control character U+000B (VT) must be escaped to \\\\u000B\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0C:\n                {\n                    error_message = \"invalid string: control character U+000C (FF) must be escaped to \\\\u000C or \\\\f\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0D:\n                {\n                    error_message = \"invalid string: control character U+000D (CR) must be escaped to \\\\u000D or \\\\r\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0E:\n                {\n                    error_message = \"invalid string: control character U+000E (SO) must be escaped to \\\\u000E\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0F:\n                {\n                    error_message = \"invalid string: control character U+000F (SI) must be escaped to \\\\u000F\";\n                    return token_type::parse_error;\n                }\n\n                case 0x10:\n                {\n                    error_message = \"invalid string: control character U+0010 (DLE) must be escaped to \\\\u0010\";\n                    return token_type::parse_error;\n                }\n\n                case 0x11:\n                {\n                    error_message = \"invalid string: control character U+0011 (DC1) must be escaped to \\\\u0011\";\n                    return token_type::parse_error;\n                }\n\n                case 0x12:\n                {\n                    error_message = \"invalid string: control character U+0012 (DC2) must be escaped to \\\\u0012\";\n                    return token_type::parse_error;\n                }\n\n                case 0x13:\n                {\n                    error_message = \"invalid string: control character U+0013 (DC3) must be escaped to \\\\u0013\";\n                    return token_type::parse_error;\n                }\n\n                case 0x14:\n                {\n                    error_message = \"invalid string: control character U+0014 (DC4) must be escaped to \\\\u0014\";\n                    return token_type::parse_error;\n                }\n\n                case 0x15:\n                {\n                    error_message = \"invalid string: control character U+0015 (NAK) must be escaped to \\\\u0015\";\n                    return token_type::parse_error;\n                }\n\n                case 0x16:\n                {\n                    error_message = \"invalid string: control character U+0016 (SYN) must be escaped to \\\\u0016\";\n                    return token_type::parse_error;\n                }\n\n                case 0x17:\n                {\n                    error_message = \"invalid string: control character U+0017 (ETB) must be escaped to \\\\u0017\";\n                    return token_type::parse_error;\n                }\n\n                case 0x18:\n                {\n                    error_message = \"invalid string: control character U+0018 (CAN) must be escaped to \\\\u0018\";\n                    return token_type::parse_error;\n                }\n\n                case 0x19:\n                {\n                    error_message = \"invalid string: control character U+0019 (EM) must be escaped to \\\\u0019\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1A:\n                {\n                    error_message = \"invalid string: control character U+001A (SUB) must be escaped to \\\\u001A\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1B:\n                {\n                    error_message = \"invalid string: control character U+001B (ESC) must be escaped to \\\\u001B\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1C:\n                {\n                    error_message = \"invalid string: control character U+001C (FS) must be escaped to \\\\u001C\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1D:\n                {\n                    error_message = \"invalid string: control character U+001D (GS) must be escaped to \\\\u001D\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1E:\n                {\n                    error_message = \"invalid string: control character U+001E (RS) must be escaped to \\\\u001E\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1F:\n                {\n                    error_message = \"invalid string: control character U+001F (US) must be escaped to \\\\u001F\";\n                    return token_type::parse_error;\n                }\n\n                // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace))\n                case 0x20:\n                case 0x21:\n                case 0x23:\n                case 0x24:\n                case 0x25:\n                case 0x26:\n                case 0x27:\n                case 0x28:\n                case 0x29:\n                case 0x2A:\n                case 0x2B:\n                case 0x2C:\n                case 0x2D:\n                case 0x2E:\n                case 0x2F:\n                case 0x30:\n                case 0x31:\n                case 0x32:\n                case 0x33:\n                case 0x34:\n                case 0x35:\n                case 0x36:\n                case 0x37:\n                case 0x38:\n                case 0x39:\n                case 0x3A:\n                case 0x3B:\n                case 0x3C:\n                case 0x3D:\n                case 0x3E:\n                case 0x3F:\n                case 0x40:\n                case 0x41:\n                case 0x42:\n                case 0x43:\n                case 0x44:\n                case 0x45:\n                case 0x46:\n                case 0x47:\n                case 0x48:\n                case 0x49:\n                case 0x4A:\n                case 0x4B:\n                case 0x4C:\n                case 0x4D:\n                case 0x4E:\n                case 0x4F:\n                case 0x50:\n                case 0x51:\n                case 0x52:\n                case 0x53:\n                case 0x54:\n                case 0x55:\n                case 0x56:\n                case 0x57:\n                case 0x58:\n                case 0x59:\n                case 0x5A:\n                case 0x5B:\n                case 0x5D:\n                case 0x5E:\n                case 0x5F:\n                case 0x60:\n                case 0x61:\n                case 0x62:\n                case 0x63:\n                case 0x64:\n                case 0x65:\n                case 0x66:\n                case 0x67:\n                case 0x68:\n                case 0x69:\n                case 0x6A:\n                case 0x6B:\n                case 0x6C:\n                case 0x6D:\n                case 0x6E:\n                case 0x6F:\n                case 0x70:\n                case 0x71:\n                case 0x72:\n                case 0x73:\n                case 0x74:\n                case 0x75:\n                case 0x76:\n                case 0x77:\n                case 0x78:\n                case 0x79:\n                case 0x7A:\n                case 0x7B:\n                case 0x7C:\n                case 0x7D:\n                case 0x7E:\n                case 0x7F:\n                {\n                    add(current);\n                    break;\n                }\n\n                // U+0080..U+07FF: bytes C2..DF 80..BF\n                case 0xC2:\n                case 0xC3:\n                case 0xC4:\n                case 0xC5:\n                case 0xC6:\n                case 0xC7:\n                case 0xC8:\n                case 0xC9:\n                case 0xCA:\n                case 0xCB:\n                case 0xCC:\n                case 0xCD:\n                case 0xCE:\n                case 0xCF:\n                case 0xD0:\n                case 0xD1:\n                case 0xD2:\n                case 0xD3:\n                case 0xD4:\n                case 0xD5:\n                case 0xD6:\n                case 0xD7:\n                case 0xD8:\n                case 0xD9:\n                case 0xDA:\n                case 0xDB:\n                case 0xDC:\n                case 0xDD:\n                case 0xDE:\n                case 0xDF:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!next_byte_in_range({0x80, 0xBF})))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+0800..U+0FFF: bytes E0 A0..BF 80..BF\n                case 0xE0:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF\n                // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF\n                case 0xE1:\n                case 0xE2:\n                case 0xE3:\n                case 0xE4:\n                case 0xE5:\n                case 0xE6:\n                case 0xE7:\n                case 0xE8:\n                case 0xE9:\n                case 0xEA:\n                case 0xEB:\n                case 0xEC:\n                case 0xEE:\n                case 0xEF:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+D000..U+D7FF: bytes ED 80..9F 80..BF\n                case 0xED:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x9F, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF\n                case 0xF0:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF\n                case 0xF1:\n                case 0xF2:\n                case 0xF3:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF\n                case 0xF4:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // remaining bytes (80..C1 and F5..FF) are ill-formed\n                default:\n                {\n                    error_message = \"invalid string: ill-formed UTF-8 byte\";\n                    return token_type::parse_error;\n                }\n            }\n        }\n    }\n\n    /*!\n     * @brief scan a comment\n     * @return whether comment could be scanned successfully\n     */\n    bool scan_comment()\n    {\n        switch (get())\n        {\n            // single-line comments skip input until a newline or EOF is read\n            case '/':\n            {\n                while (true)\n                {\n                    switch (get())\n                    {\n                        case '\\n':\n                        case '\\r':\n                        case std::char_traits<char_type>::eof():\n                        case '\\0':\n                            return true;\n\n                        default:\n                            break;\n                    }\n                }\n            }\n\n            // multi-line comments skip input until */ is read\n            case '*':\n            {\n                while (true)\n                {\n                    switch (get())\n                    {\n                        case std::char_traits<char_type>::eof():\n                        case '\\0':\n                        {\n                            error_message = \"invalid comment; missing closing '*/'\";\n                            return false;\n                        }\n\n                        case '*':\n                        {\n                            switch (get())\n                            {\n                                case '/':\n                                    return true;\n\n                                default:\n                                {\n                                    unget();\n                                    continue;\n                                }\n                            }\n                        }\n\n                        default:\n                            continue;\n                    }\n                }\n            }\n\n            // unexpected character after reading '/'\n            default:\n            {\n                error_message = \"invalid comment; expecting '/' or '*' after '/'\";\n                return false;\n            }\n        }\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    static void strtof(float& f, const char* str, char** endptr) noexcept\n    {\n        f = std::strtof(str, endptr);\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    static void strtof(double& f, const char* str, char** endptr) noexcept\n    {\n        f = std::strtod(str, endptr);\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    static void strtof(long double& f, const char* str, char** endptr) noexcept\n    {\n        f = std::strtold(str, endptr);\n    }\n\n    /*!\n    @brief scan a number literal\n\n    This function scans a string according to Sect. 6 of RFC 8259.\n\n    The function is realized with a deterministic finite state machine derived\n    from the grammar described in RFC 8259. Starting in state \"init\", the\n    input is read and used to determined the next state. Only state \"done\"\n    accepts the number. State \"error\" is a trap state to model errors. In the\n    table below, \"anything\" means any character but the ones listed before.\n\n    state    | 0        | 1-9      | e E      | +       | -       | .        | anything\n    ---------|----------|----------|----------|---------|---------|----------|-----------\n    init     | zero     | any1     | [error]  | [error] | minus   | [error]  | [error]\n    minus    | zero     | any1     | [error]  | [error] | [error] | [error]  | [error]\n    zero     | done     | done     | exponent | done    | done    | decimal1 | done\n    any1     | any1     | any1     | exponent | done    | done    | decimal1 | done\n    decimal1 | decimal2 | decimal2 | [error]  | [error] | [error] | [error]  | [error]\n    decimal2 | decimal2 | decimal2 | exponent | done    | done    | done     | done\n    exponent | any2     | any2     | [error]  | sign    | sign    | [error]  | [error]\n    sign     | any2     | any2     | [error]  | [error] | [error] | [error]  | [error]\n    any2     | any2     | any2     | done     | done    | done    | done     | done\n\n    The state machine is realized with one label per state (prefixed with\n    \"scan_number_\") and `goto` statements between them. The state machine\n    contains cycles, but any cycle can be left when EOF is read. Therefore,\n    the function is guaranteed to terminate.\n\n    During scanning, the read bytes are stored in token_buffer. This string is\n    then converted to a signed integer, an unsigned integer, or a\n    floating-point number.\n\n    @return token_type::value_unsigned, token_type::value_integer, or\n            token_type::value_float if number could be successfully scanned,\n            token_type::parse_error otherwise\n\n    @note The scanner is independent of the current locale. Internally, the\n          locale's decimal point is used instead of `.` to work with the\n          locale-dependent converters.\n    */\n    token_type scan_number()  // lgtm [cpp/use-of-goto]\n    {\n        // reset token_buffer to store the number's bytes\n        reset();\n\n        // the type of the parsed number; initially set to unsigned; will be\n        // changed if minus sign, decimal point or exponent is read\n        token_type number_type = token_type::value_unsigned;\n\n        // state (init): we just found out we need to scan a number\n        switch (current)\n        {\n            case '-':\n            {\n                add(current);\n                goto scan_number_minus;\n            }\n\n            case '0':\n            {\n                add(current);\n                goto scan_number_zero;\n            }\n\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any1;\n            }\n\n            // all other characters are rejected outside scan_number()\n            default:            // LCOV_EXCL_LINE\n                JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n        }\n\nscan_number_minus:\n        // state: we just parsed a leading minus sign\n        number_type = token_type::value_integer;\n        switch (get())\n        {\n            case '0':\n            {\n                add(current);\n                goto scan_number_zero;\n            }\n\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any1;\n            }\n\n            default:\n            {\n                error_message = \"invalid number; expected digit after '-'\";\n                return token_type::parse_error;\n            }\n        }\n\nscan_number_zero:\n        // state: we just parse a zero (maybe with a leading minus sign)\n        switch (get())\n        {\n            case '.':\n            {\n                add(decimal_point_char);\n                goto scan_number_decimal1;\n            }\n\n            case 'e':\n            case 'E':\n            {\n                add(current);\n                goto scan_number_exponent;\n            }\n\n            default:\n                goto scan_number_done;\n        }\n\nscan_number_any1:\n        // state: we just parsed a number 0-9 (maybe with a leading minus sign)\n        switch (get())\n        {\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any1;\n            }\n\n            case '.':\n            {\n                add(decimal_point_char);\n                goto scan_number_decimal1;\n            }\n\n            case 'e':\n            case 'E':\n            {\n                add(current);\n                goto scan_number_exponent;\n            }\n\n            default:\n                goto scan_number_done;\n        }\n\nscan_number_decimal1:\n        // state: we just parsed a decimal point\n        number_type = token_type::value_float;\n        switch (get())\n        {\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_decimal2;\n            }\n\n            default:\n            {\n                error_message = \"invalid number; expected digit after '.'\";\n                return token_type::parse_error;\n            }\n        }\n\nscan_number_decimal2:\n        // we just parsed at least one number after a decimal point\n        switch (get())\n        {\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_decimal2;\n            }\n\n            case 'e':\n            case 'E':\n            {\n                add(current);\n                goto scan_number_exponent;\n            }\n\n            default:\n                goto scan_number_done;\n        }\n\nscan_number_exponent:\n        // we just parsed an exponent\n        number_type = token_type::value_float;\n        switch (get())\n        {\n            case '+':\n            case '-':\n            {\n                add(current);\n                goto scan_number_sign;\n            }\n\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any2;\n            }\n\n            default:\n            {\n                error_message =\n                    \"invalid number; expected '+', '-', or digit after exponent\";\n                return token_type::parse_error;\n            }\n        }\n\nscan_number_sign:\n        // we just parsed an exponent sign\n        switch (get())\n        {\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any2;\n            }\n\n            default:\n            {\n                error_message = \"invalid number; expected digit after exponent sign\";\n                return token_type::parse_error;\n            }\n        }\n\nscan_number_any2:\n        // we just parsed a number after the exponent or exponent sign\n        switch (get())\n        {\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any2;\n            }\n\n            default:\n                goto scan_number_done;\n        }\n\nscan_number_done:\n        // unget the character after the number (we only read it to know that\n        // we are done scanning a number)\n        unget();\n\n        char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)\n        errno = 0;\n\n        // try to parse integers first and fall back to floats\n        if (number_type == token_type::value_unsigned)\n        {\n            const auto x = std::strtoull(token_buffer.data(), &endptr, 10);\n\n            // we checked the number format before\n            JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());\n\n            if (errno == 0)\n            {\n                value_unsigned = static_cast<number_unsigned_t>(x);\n                if (value_unsigned == x)\n                {\n                    return token_type::value_unsigned;\n                }\n            }\n        }\n        else if (number_type == token_type::value_integer)\n        {\n            const auto x = std::strtoll(token_buffer.data(), &endptr, 10);\n\n            // we checked the number format before\n            JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());\n\n            if (errno == 0)\n            {\n                value_integer = static_cast<number_integer_t>(x);\n                if (value_integer == x)\n                {\n                    return token_type::value_integer;\n                }\n            }\n        }\n\n        // this code is reached if we parse a floating-point number or if an\n        // integer conversion above failed\n        strtof(value_float, token_buffer.data(), &endptr);\n\n        // we checked the number format before\n        JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());\n\n        return token_type::value_float;\n    }\n\n    /*!\n    @param[in] literal_text  the literal text to expect\n    @param[in] length        the length of the passed literal text\n    @param[in] return_type   the token type to return on success\n    */\n    JSON_HEDLEY_NON_NULL(2)\n    token_type scan_literal(const char_type* literal_text, const std::size_t length,\n                            token_type return_type)\n    {\n        JSON_ASSERT(std::char_traits<char_type>::to_char_type(current) == literal_text[0]);\n        for (std::size_t i = 1; i < length; ++i)\n        {\n            if (JSON_HEDLEY_UNLIKELY(std::char_traits<char_type>::to_char_type(get()) != literal_text[i]))\n            {\n                error_message = \"invalid literal\";\n                return token_type::parse_error;\n            }\n        }\n        return return_type;\n    }\n\n    /////////////////////\n    // input management\n    /////////////////////\n\n    /// reset token_buffer; current character is beginning of token\n    void reset() noexcept\n    {\n        token_buffer.clear();\n        token_string.clear();\n        token_string.push_back(std::char_traits<char_type>::to_char_type(current));\n    }\n\n    /*\n    @brief get next character from the input\n\n    This function provides the interface to the used input adapter. It does\n    not throw in case the input reached EOF, but returns a\n    `std::char_traits<char>::eof()` in that case.  Stores the scanned characters\n    for use in error messages.\n\n    @return character read from the input\n    */\n    char_int_type get()\n    {\n        ++position.chars_read_total;\n        ++position.chars_read_current_line;\n\n        if (next_unget)\n        {\n            // just reset the next_unget variable and work with current\n            next_unget = false;\n        }\n        else\n        {\n            current = ia.get_character();\n        }\n\n        if (JSON_HEDLEY_LIKELY(current != std::char_traits<char_type>::eof()))\n        {\n            token_string.push_back(std::char_traits<char_type>::to_char_type(current));\n        }\n\n        if (current == '\\n')\n        {\n            ++position.lines_read;\n            position.chars_read_current_line = 0;\n        }\n\n        return current;\n    }\n\n    /*!\n    @brief unget current character (read it again on next get)\n\n    We implement unget by setting variable next_unget to true. The input is not\n    changed - we just simulate ungetting by modifying chars_read_total,\n    chars_read_current_line, and token_string. The next call to get() will\n    behave as if the unget character is read again.\n    */\n    void unget()\n    {\n        next_unget = true;\n\n        --position.chars_read_total;\n\n        // in case we \"unget\" a newline, we have to also decrement the lines_read\n        if (position.chars_read_current_line == 0)\n        {\n            if (position.lines_read > 0)\n            {\n                --position.lines_read;\n            }\n        }\n        else\n        {\n            --position.chars_read_current_line;\n        }\n\n        if (JSON_HEDLEY_LIKELY(current != std::char_traits<char_type>::eof()))\n        {\n            JSON_ASSERT(!token_string.empty());\n            token_string.pop_back();\n        }\n    }\n\n    /// add a character to token_buffer\n    void add(char_int_type c)\n    {\n        token_buffer.push_back(static_cast<typename string_t::value_type>(c));\n    }\n\n  public:\n    /////////////////////\n    // value getters\n    /////////////////////\n\n    /// return integer value\n    constexpr number_integer_t get_number_integer() const noexcept\n    {\n        return value_integer;\n    }\n\n    /// return unsigned integer value\n    constexpr number_unsigned_t get_number_unsigned() const noexcept\n    {\n        return value_unsigned;\n    }\n\n    /// return floating-point value\n    constexpr number_float_t get_number_float() const noexcept\n    {\n        return value_float;\n    }\n\n    /// return current string value (implicitly resets the token; useful only once)\n    string_t& get_string()\n    {\n        return token_buffer;\n    }\n\n    /////////////////////\n    // diagnostics\n    /////////////////////\n\n    /// return position of last read token\n    constexpr position_t get_position() const noexcept\n    {\n        return position;\n    }\n\n    /// return the last read token (for errors only).  Will never contain EOF\n    /// (an arbitrary value that is not a valid char value, often -1), because\n    /// 255 may legitimately occur.  May contain NUL, which should be escaped.\n    std::string get_token_string() const\n    {\n        // escape control characters\n        std::string result;\n        for (const auto c : token_string)\n        {\n            if (static_cast<unsigned char>(c) <= '\\x1F')\n            {\n                // escape control characters\n                std::array<char, 9> cs{{}};\n                static_cast<void>((std::snprintf)(cs.data(), cs.size(), \"<U+%.4X>\", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)\n                result += cs.data();\n            }\n            else\n            {\n                // add character as is\n                result.push_back(static_cast<std::string::value_type>(c));\n            }\n        }\n\n        return result;\n    }\n\n    /// return syntax error message\n    JSON_HEDLEY_RETURNS_NON_NULL\n    constexpr const char* get_error_message() const noexcept\n    {\n        return error_message;\n    }\n\n    /////////////////////\n    // actual scanner\n    /////////////////////\n\n    /*!\n    @brief skip the UTF-8 byte order mark\n    @return true iff there is no BOM or the correct BOM has been skipped\n    */\n    bool skip_bom()\n    {\n        if (get() == 0xEF)\n        {\n            // check if we completely parse the BOM\n            return get() == 0xBB && get() == 0xBF;\n        }\n\n        // the first character is not the beginning of the BOM; unget it to\n        // process is later\n        unget();\n        return true;\n    }\n\n    void skip_whitespace()\n    {\n        do\n        {\n            get();\n        }\n        while (current == ' ' || current == '\\t' || current == '\\n' || current == '\\r');\n    }\n\n    token_type scan()\n    {\n        // initially, skip the BOM\n        if (position.chars_read_total == 0 && !skip_bom())\n        {\n            error_message = \"invalid BOM; must be 0xEF 0xBB 0xBF if given\";\n            return token_type::parse_error;\n        }\n\n        // read next character and ignore whitespace\n        skip_whitespace();\n\n        // ignore comments\n        while (ignore_comments && current == '/')\n        {\n            if (!scan_comment())\n            {\n                return token_type::parse_error;\n            }\n\n            // skip following whitespace\n            skip_whitespace();\n        }\n\n        switch (current)\n        {\n            // structural characters\n            case '[':\n                return token_type::begin_array;\n            case ']':\n                return token_type::end_array;\n            case '{':\n                return token_type::begin_object;\n            case '}':\n                return token_type::end_object;\n            case ':':\n                return token_type::name_separator;\n            case ',':\n                return token_type::value_separator;\n\n            // literals\n            case 't':\n            {\n                std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}};\n                return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true);\n            }\n            case 'f':\n            {\n                std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}};\n                return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false);\n            }\n            case 'n':\n            {\n                std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}};\n                return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null);\n            }\n\n            // string\n            case '\\\"':\n                return scan_string();\n\n            // number\n            case '-':\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n                return scan_number();\n\n            // end of input (the null byte is needed when parsing from\n            // string literals)\n            case '\\0':\n            case std::char_traits<char_type>::eof():\n                return token_type::end_of_input;\n\n            // error\n            default:\n                error_message = \"invalid literal\";\n                return token_type::parse_error;\n        }\n    }\n\n  private:\n    /// input adapter\n    InputAdapterType ia;\n\n    /// whether comments should be ignored (true) or signaled as errors (false)\n    const bool ignore_comments = false;\n\n    /// the current character\n    char_int_type current = std::char_traits<char_type>::eof();\n\n    /// whether the next get() call should just return current\n    bool next_unget = false;\n\n    /// the start position of the current token\n    position_t position {};\n\n    /// raw input token string (for error messages)\n    std::vector<char_type> token_string {};\n\n    /// buffer for variable-length tokens (numbers, strings)\n    string_t token_buffer {};\n\n    /// a description of occurred lexer errors\n    const char* error_message = \"\";\n\n    // number values\n    number_integer_t value_integer = 0;\n    number_unsigned_t value_unsigned = 0;\n    number_float_t value_float = 0;\n\n    /// the decimal point\n    const char_int_type decimal_point_char = '.';\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/is_sax.hpp>\n\n\n#include <cstdint> // size_t\n#include <utility> // declval\n#include <string> // string\n\n// #include <nlohmann/detail/meta/detected.hpp>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate<typename T>\nusing null_function_t = decltype(std::declval<T&>().null());\n\ntemplate<typename T>\nusing boolean_function_t =\n    decltype(std::declval<T&>().boolean(std::declval<bool>()));\n\ntemplate<typename T, typename Integer>\nusing number_integer_function_t =\n    decltype(std::declval<T&>().number_integer(std::declval<Integer>()));\n\ntemplate<typename T, typename Unsigned>\nusing number_unsigned_function_t =\n    decltype(std::declval<T&>().number_unsigned(std::declval<Unsigned>()));\n\ntemplate<typename T, typename Float, typename String>\nusing number_float_function_t = decltype(std::declval<T&>().number_float(\n                                    std::declval<Float>(), std::declval<const String&>()));\n\ntemplate<typename T, typename String>\nusing string_function_t =\n    decltype(std::declval<T&>().string(std::declval<String&>()));\n\ntemplate<typename T, typename Binary>\nusing binary_function_t =\n    decltype(std::declval<T&>().binary(std::declval<Binary&>()));\n\ntemplate<typename T>\nusing start_object_function_t =\n    decltype(std::declval<T&>().start_object(std::declval<std::size_t>()));\n\ntemplate<typename T, typename String>\nusing key_function_t =\n    decltype(std::declval<T&>().key(std::declval<String&>()));\n\ntemplate<typename T>\nusing end_object_function_t = decltype(std::declval<T&>().end_object());\n\ntemplate<typename T>\nusing start_array_function_t =\n    decltype(std::declval<T&>().start_array(std::declval<std::size_t>()));\n\ntemplate<typename T>\nusing end_array_function_t = decltype(std::declval<T&>().end_array());\n\ntemplate<typename T, typename Exception>\nusing parse_error_function_t = decltype(std::declval<T&>().parse_error(\n        std::declval<std::size_t>(), std::declval<const std::string&>(),\n        std::declval<const Exception&>()));\n\ntemplate<typename SAX, typename BasicJsonType>\nstruct is_sax\n{\n  private:\n    static_assert(is_basic_json<BasicJsonType>::value,\n                  \"BasicJsonType must be of type basic_json<...>\");\n\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using binary_t = typename BasicJsonType::binary_t;\n    using exception_t = typename BasicJsonType::exception;\n\n  public:\n    static constexpr bool value =\n        is_detected_exact<bool, null_function_t, SAX>::value &&\n        is_detected_exact<bool, boolean_function_t, SAX>::value &&\n        is_detected_exact<bool, number_integer_function_t, SAX, number_integer_t>::value &&\n        is_detected_exact<bool, number_unsigned_function_t, SAX, number_unsigned_t>::value &&\n        is_detected_exact<bool, number_float_function_t, SAX, number_float_t, string_t>::value &&\n        is_detected_exact<bool, string_function_t, SAX, string_t>::value &&\n        is_detected_exact<bool, binary_function_t, SAX, binary_t>::value &&\n        is_detected_exact<bool, start_object_function_t, SAX>::value &&\n        is_detected_exact<bool, key_function_t, SAX, string_t>::value &&\n        is_detected_exact<bool, end_object_function_t, SAX>::value &&\n        is_detected_exact<bool, start_array_function_t, SAX>::value &&\n        is_detected_exact<bool, end_array_function_t, SAX>::value &&\n        is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value;\n};\n\ntemplate<typename SAX, typename BasicJsonType>\nstruct is_sax_static_asserts\n{\n  private:\n    static_assert(is_basic_json<BasicJsonType>::value,\n                  \"BasicJsonType must be of type basic_json<...>\");\n\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using binary_t = typename BasicJsonType::binary_t;\n    using exception_t = typename BasicJsonType::exception;\n\n  public:\n    static_assert(is_detected_exact<bool, null_function_t, SAX>::value,\n                  \"Missing/invalid function: bool null()\");\n    static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value,\n                  \"Missing/invalid function: bool boolean(bool)\");\n    static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value,\n                  \"Missing/invalid function: bool boolean(bool)\");\n    static_assert(\n        is_detected_exact<bool, number_integer_function_t, SAX,\n        number_integer_t>::value,\n        \"Missing/invalid function: bool number_integer(number_integer_t)\");\n    static_assert(\n        is_detected_exact<bool, number_unsigned_function_t, SAX,\n        number_unsigned_t>::value,\n        \"Missing/invalid function: bool number_unsigned(number_unsigned_t)\");\n    static_assert(is_detected_exact<bool, number_float_function_t, SAX,\n                  number_float_t, string_t>::value,\n                  \"Missing/invalid function: bool number_float(number_float_t, const string_t&)\");\n    static_assert(\n        is_detected_exact<bool, string_function_t, SAX, string_t>::value,\n        \"Missing/invalid function: bool string(string_t&)\");\n    static_assert(\n        is_detected_exact<bool, binary_function_t, SAX, binary_t>::value,\n        \"Missing/invalid function: bool binary(binary_t&)\");\n    static_assert(is_detected_exact<bool, start_object_function_t, SAX>::value,\n                  \"Missing/invalid function: bool start_object(std::size_t)\");\n    static_assert(is_detected_exact<bool, key_function_t, SAX, string_t>::value,\n                  \"Missing/invalid function: bool key(string_t&)\");\n    static_assert(is_detected_exact<bool, end_object_function_t, SAX>::value,\n                  \"Missing/invalid function: bool end_object()\");\n    static_assert(is_detected_exact<bool, start_array_function_t, SAX>::value,\n                  \"Missing/invalid function: bool start_array(std::size_t)\");\n    static_assert(is_detected_exact<bool, end_array_function_t, SAX>::value,\n                  \"Missing/invalid function: bool end_array()\");\n    static_assert(\n        is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value,\n        \"Missing/invalid function: bool parse_error(std::size_t, const \"\n        \"std::string&, const exception&)\");\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n\n/// how to treat CBOR tags\nenum class cbor_tag_handler_t\n{\n    error,   ///< throw a parse_error exception in case of a tag\n    ignore,  ///< ignore tags\n    store    ///< store tags as binary type\n};\n\n/*!\n@brief determine system byte order\n\n@return true if and only if system's byte order is little endian\n\n@note from https://stackoverflow.com/a/1001328/266378\n*/\nstatic inline bool little_endianness(int num = 1) noexcept\n{\n    return *reinterpret_cast<char*>(&num) == 1;\n}\n\n\n///////////////////\n// binary reader //\n///////////////////\n\n/*!\n@brief deserialization of CBOR, MessagePack, and UBJSON values\n*/\ntemplate<typename BasicJsonType, typename InputAdapterType, typename SAX = json_sax_dom_parser<BasicJsonType>>\nclass binary_reader\n{\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using binary_t = typename BasicJsonType::binary_t;\n    using json_sax_t = SAX;\n    using char_type = typename InputAdapterType::char_type;\n    using char_int_type = typename std::char_traits<char_type>::int_type;\n\n  public:\n    /*!\n    @brief create a binary reader\n\n    @param[in] adapter  input adapter to read from\n    */\n    explicit binary_reader(InputAdapterType&& adapter) noexcept : ia(std::move(adapter))\n    {\n        (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {};\n    }\n\n    // make class move-only\n    binary_reader(const binary_reader&) = delete;\n    binary_reader(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)\n    binary_reader& operator=(const binary_reader&) = delete;\n    binary_reader& operator=(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)\n    ~binary_reader() = default;\n\n    /*!\n    @param[in] format  the binary format to parse\n    @param[in] sax_    a SAX event processor\n    @param[in] strict  whether to expect the input to be consumed completed\n    @param[in] tag_handler  how to treat CBOR tags\n\n    @return whether parsing was successful\n    */\n    JSON_HEDLEY_NON_NULL(3)\n    bool sax_parse(const input_format_t format,\n                   json_sax_t* sax_,\n                   const bool strict = true,\n                   const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error)\n    {\n        sax = sax_;\n        bool result = false;\n\n        switch (format)\n        {\n            case input_format_t::bson:\n                result = parse_bson_internal();\n                break;\n\n            case input_format_t::cbor:\n                result = parse_cbor_internal(true, tag_handler);\n                break;\n\n            case input_format_t::msgpack:\n                result = parse_msgpack_internal();\n                break;\n\n            case input_format_t::ubjson:\n                result = parse_ubjson_internal();\n                break;\n\n            case input_format_t::json: // LCOV_EXCL_LINE\n            default:            // LCOV_EXCL_LINE\n                JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n        }\n\n        // strict mode: next byte must be EOF\n        if (result && strict)\n        {\n            if (format == input_format_t::ubjson)\n            {\n                get_ignore_noop();\n            }\n            else\n            {\n                get();\n            }\n\n            if (JSON_HEDLEY_UNLIKELY(current != std::char_traits<char_type>::eof()))\n            {\n                return sax->parse_error(chars_read, get_token_string(),\n                                        parse_error::create(110, chars_read, exception_message(format, \"expected end of input; last byte: 0x\" + get_token_string(), \"value\"), BasicJsonType()));\n            }\n        }\n\n        return result;\n    }\n\n  private:\n    //////////\n    // BSON //\n    //////////\n\n    /*!\n    @brief Reads in a BSON-object and passes it to the SAX-parser.\n    @return whether a valid BSON-value was passed to the SAX parser\n    */\n    bool parse_bson_internal()\n    {\n        std::int32_t document_size{};\n        get_number<std::int32_t, true>(input_format_t::bson, document_size);\n\n        if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast<std::size_t>(-1))))\n        {\n            return false;\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/false)))\n        {\n            return false;\n        }\n\n        return sax->end_object();\n    }\n\n    /*!\n    @brief Parses a C-style string from the BSON input.\n    @param[in,out] result  A reference to the string variable where the read\n                            string is to be stored.\n    @return `true` if the \\x00-byte indicating the end of the string was\n             encountered before the EOF; false` indicates an unexpected EOF.\n    */\n    bool get_bson_cstr(string_t& result)\n    {\n        auto out = std::back_inserter(result);\n        while (true)\n        {\n            get();\n            if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson, \"cstring\")))\n            {\n                return false;\n            }\n            if (current == 0x00)\n            {\n                return true;\n            }\n            *out++ = static_cast<typename string_t::value_type>(current);\n        }\n    }\n\n    /*!\n    @brief Parses a zero-terminated string of length @a len from the BSON\n           input.\n    @param[in] len  The length (including the zero-byte at the end) of the\n                    string to be read.\n    @param[in,out] result  A reference to the string variable where the read\n                            string is to be stored.\n    @tparam NumberType The type of the length @a len\n    @pre len >= 1\n    @return `true` if the string was successfully parsed\n    */\n    template<typename NumberType>\n    bool get_bson_string(const NumberType len, string_t& result)\n    {\n        if (JSON_HEDLEY_UNLIKELY(len < 1))\n        {\n            auto last_token = get_token_string();\n            return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, \"string length must be at least 1, is \" + std::to_string(len), \"string\"), BasicJsonType()));\n        }\n\n        return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != std::char_traits<char_type>::eof();\n    }\n\n    /*!\n    @brief Parses a byte array input of length @a len from the BSON input.\n    @param[in] len  The length of the byte array to be read.\n    @param[in,out] result  A reference to the binary variable where the read\n                            array is to be stored.\n    @tparam NumberType The type of the length @a len\n    @pre len >= 0\n    @return `true` if the byte array was successfully parsed\n    */\n    template<typename NumberType>\n    bool get_bson_binary(const NumberType len, binary_t& result)\n    {\n        if (JSON_HEDLEY_UNLIKELY(len < 0))\n        {\n            auto last_token = get_token_string();\n            return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, \"byte array length cannot be negative, is \" + std::to_string(len), \"binary\"), BasicJsonType()));\n        }\n\n        // All BSON binary values have a subtype\n        std::uint8_t subtype{};\n        get_number<std::uint8_t>(input_format_t::bson, subtype);\n        result.set_subtype(subtype);\n\n        return get_binary(input_format_t::bson, len, result);\n    }\n\n    /*!\n    @brief Read a BSON document element of the given @a element_type.\n    @param[in] element_type The BSON element type, c.f. http://bsonspec.org/spec.html\n    @param[in] element_type_parse_position The position in the input stream,\n               where the `element_type` was read.\n    @warning Not all BSON element types are supported yet. An unsupported\n             @a element_type will give rise to a parse_error.114:\n             Unsupported BSON record type 0x...\n    @return whether a valid BSON-object/array was passed to the SAX parser\n    */\n    bool parse_bson_element_internal(const char_int_type element_type,\n                                     const std::size_t element_type_parse_position)\n    {\n        switch (element_type)\n        {\n            case 0x01: // double\n            {\n                double number{};\n                return get_number<double, true>(input_format_t::bson, number) && sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 0x02: // string\n            {\n                std::int32_t len{};\n                string_t value;\n                return get_number<std::int32_t, true>(input_format_t::bson, len) && get_bson_string(len, value) && sax->string(value);\n            }\n\n            case 0x03: // object\n            {\n                return parse_bson_internal();\n            }\n\n            case 0x04: // array\n            {\n                return parse_bson_array();\n            }\n\n            case 0x05: // binary\n            {\n                std::int32_t len{};\n                binary_t value;\n                return get_number<std::int32_t, true>(input_format_t::bson, len) && get_bson_binary(len, value) && sax->binary(value);\n            }\n\n            case 0x08: // boolean\n            {\n                return sax->boolean(get() != 0);\n            }\n\n            case 0x0A: // null\n            {\n                return sax->null();\n            }\n\n            case 0x10: // int32\n            {\n                std::int32_t value{};\n                return get_number<std::int32_t, true>(input_format_t::bson, value) && sax->number_integer(value);\n            }\n\n            case 0x12: // int64\n            {\n                std::int64_t value{};\n                return get_number<std::int64_t, true>(input_format_t::bson, value) && sax->number_integer(value);\n            }\n\n            default: // anything else not supported (yet)\n            {\n                std::array<char, 3> cr{{}};\n                static_cast<void>((std::snprintf)(cr.data(), cr.size(), \"%.2hhX\", static_cast<unsigned char>(element_type))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)\n                return sax->parse_error(element_type_parse_position, std::string(cr.data()), parse_error::create(114, element_type_parse_position, \"Unsupported BSON record type 0x\" + std::string(cr.data()), BasicJsonType()));\n            }\n        }\n    }\n\n    /*!\n    @brief Read a BSON element list (as specified in the BSON-spec)\n\n    The same binary layout is used for objects and arrays, hence it must be\n    indicated with the argument @a is_array which one is expected\n    (true --> array, false --> object).\n\n    @param[in] is_array Determines if the element list being read is to be\n                        treated as an object (@a is_array == false), or as an\n                        array (@a is_array == true).\n    @return whether a valid BSON-object/array was passed to the SAX parser\n    */\n    bool parse_bson_element_list(const bool is_array)\n    {\n        string_t key;\n\n        while (auto element_type = get())\n        {\n            if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson, \"element list\")))\n            {\n                return false;\n            }\n\n            const std::size_t element_type_parse_position = chars_read;\n            if (JSON_HEDLEY_UNLIKELY(!get_bson_cstr(key)))\n            {\n                return false;\n            }\n\n            if (!is_array && !sax->key(key))\n            {\n                return false;\n            }\n\n            if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_internal(element_type, element_type_parse_position)))\n            {\n                return false;\n            }\n\n            // get_bson_cstr only appends\n            key.clear();\n        }\n\n        return true;\n    }\n\n    /*!\n    @brief Reads an array from the BSON input and passes it to the SAX-parser.\n    @return whether a valid BSON-array was passed to the SAX parser\n    */\n    bool parse_bson_array()\n    {\n        std::int32_t document_size{};\n        get_number<std::int32_t, true>(input_format_t::bson, document_size);\n\n        if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast<std::size_t>(-1))))\n        {\n            return false;\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/true)))\n        {\n            return false;\n        }\n\n        return sax->end_array();\n    }\n\n    //////////\n    // CBOR //\n    //////////\n\n    /*!\n    @param[in] get_char  whether a new character should be retrieved from the\n                         input (true) or whether the last read character should\n                         be considered instead (false)\n    @param[in] tag_handler how CBOR tags should be treated\n\n    @return whether a valid CBOR value was passed to the SAX parser\n    */\n    bool parse_cbor_internal(const bool get_char,\n                             const cbor_tag_handler_t tag_handler)\n    {\n        switch (get_char ? get() : current)\n        {\n            // EOF\n            case std::char_traits<char_type>::eof():\n                return unexpect_eof(input_format_t::cbor, \"value\");\n\n            // Integer 0x00..0x17 (0..23)\n            case 0x00:\n            case 0x01:\n            case 0x02:\n            case 0x03:\n            case 0x04:\n            case 0x05:\n            case 0x06:\n            case 0x07:\n            case 0x08:\n            case 0x09:\n            case 0x0A:\n            case 0x0B:\n            case 0x0C:\n            case 0x0D:\n            case 0x0E:\n            case 0x0F:\n            case 0x10:\n            case 0x11:\n            case 0x12:\n            case 0x13:\n            case 0x14:\n            case 0x15:\n            case 0x16:\n            case 0x17:\n                return sax->number_unsigned(static_cast<number_unsigned_t>(current));\n\n            case 0x18: // Unsigned integer (one-byte uint8_t follows)\n            {\n                std::uint8_t number{};\n                return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);\n            }\n\n            case 0x19: // Unsigned integer (two-byte uint16_t follows)\n            {\n                std::uint16_t number{};\n                return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);\n            }\n\n            case 0x1A: // Unsigned integer (four-byte uint32_t follows)\n            {\n                std::uint32_t number{};\n                return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);\n            }\n\n            case 0x1B: // Unsigned integer (eight-byte uint64_t follows)\n            {\n                std::uint64_t number{};\n                return get_number(input_format_t::cbor, number) && sax->number_unsigned(number);\n            }\n\n            // Negative integer -1-0x00..-1-0x17 (-1..-24)\n            case 0x20:\n            case 0x21:\n            case 0x22:\n            case 0x23:\n            case 0x24:\n            case 0x25:\n            case 0x26:\n            case 0x27:\n            case 0x28:\n            case 0x29:\n            case 0x2A:\n            case 0x2B:\n            case 0x2C:\n            case 0x2D:\n            case 0x2E:\n            case 0x2F:\n            case 0x30:\n            case 0x31:\n            case 0x32:\n            case 0x33:\n            case 0x34:\n            case 0x35:\n            case 0x36:\n            case 0x37:\n                return sax->number_integer(static_cast<std::int8_t>(0x20 - 1 - current));\n\n            case 0x38: // Negative integer (one-byte uint8_t follows)\n            {\n                std::uint8_t number{};\n                return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number);\n            }\n\n            case 0x39: // Negative integer -1-n (two-byte uint16_t follows)\n            {\n                std::uint16_t number{};\n                return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number);\n            }\n\n            case 0x3A: // Negative integer -1-n (four-byte uint32_t follows)\n            {\n                std::uint32_t number{};\n                return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number);\n            }\n\n            case 0x3B: // Negative integer -1-n (eight-byte uint64_t follows)\n            {\n                std::uint64_t number{};\n                return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1)\n                        - static_cast<number_integer_t>(number));\n            }\n\n            // Binary data (0x00..0x17 bytes follow)\n            case 0x40:\n            case 0x41:\n            case 0x42:\n            case 0x43:\n            case 0x44:\n            case 0x45:\n            case 0x46:\n            case 0x47:\n            case 0x48:\n            case 0x49:\n            case 0x4A:\n            case 0x4B:\n            case 0x4C:\n            case 0x4D:\n            case 0x4E:\n            case 0x4F:\n            case 0x50:\n            case 0x51:\n            case 0x52:\n            case 0x53:\n            case 0x54:\n            case 0x55:\n            case 0x56:\n            case 0x57:\n            case 0x58: // Binary data (one-byte uint8_t for n follows)\n            case 0x59: // Binary data (two-byte uint16_t for n follow)\n            case 0x5A: // Binary data (four-byte uint32_t for n follow)\n            case 0x5B: // Binary data (eight-byte uint64_t for n follow)\n            case 0x5F: // Binary data (indefinite length)\n            {\n                binary_t b;\n                return get_cbor_binary(b) && sax->binary(b);\n            }\n\n            // UTF-8 string (0x00..0x17 bytes follow)\n            case 0x60:\n            case 0x61:\n            case 0x62:\n            case 0x63:\n            case 0x64:\n            case 0x65:\n            case 0x66:\n            case 0x67:\n            case 0x68:\n            case 0x69:\n            case 0x6A:\n            case 0x6B:\n            case 0x6C:\n            case 0x6D:\n            case 0x6E:\n            case 0x6F:\n            case 0x70:\n            case 0x71:\n            case 0x72:\n            case 0x73:\n            case 0x74:\n            case 0x75:\n            case 0x76:\n            case 0x77:\n            case 0x78: // UTF-8 string (one-byte uint8_t for n follows)\n            case 0x79: // UTF-8 string (two-byte uint16_t for n follow)\n            case 0x7A: // UTF-8 string (four-byte uint32_t for n follow)\n            case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow)\n            case 0x7F: // UTF-8 string (indefinite length)\n            {\n                string_t s;\n                return get_cbor_string(s) && sax->string(s);\n            }\n\n            // array (0x00..0x17 data items follow)\n            case 0x80:\n            case 0x81:\n            case 0x82:\n            case 0x83:\n            case 0x84:\n            case 0x85:\n            case 0x86:\n            case 0x87:\n            case 0x88:\n            case 0x89:\n            case 0x8A:\n            case 0x8B:\n            case 0x8C:\n            case 0x8D:\n            case 0x8E:\n            case 0x8F:\n            case 0x90:\n            case 0x91:\n            case 0x92:\n            case 0x93:\n            case 0x94:\n            case 0x95:\n            case 0x96:\n            case 0x97:\n                return get_cbor_array(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x1Fu), tag_handler);\n\n            case 0x98: // array (one-byte uint8_t for n follows)\n            {\n                std::uint8_t len{};\n                return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast<std::size_t>(len), tag_handler);\n            }\n\n            case 0x99: // array (two-byte uint16_t for n follow)\n            {\n                std::uint16_t len{};\n                return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast<std::size_t>(len), tag_handler);\n            }\n\n            case 0x9A: // array (four-byte uint32_t for n follow)\n            {\n                std::uint32_t len{};\n                return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast<std::size_t>(len), tag_handler);\n            }\n\n            case 0x9B: // array (eight-byte uint64_t for n follow)\n            {\n                std::uint64_t len{};\n                return get_number(input_format_t::cbor, len) && get_cbor_array(detail::conditional_static_cast<std::size_t>(len), tag_handler);\n            }\n\n            case 0x9F: // array (indefinite length)\n                return get_cbor_array(static_cast<std::size_t>(-1), tag_handler);\n\n            // map (0x00..0x17 pairs of data items follow)\n            case 0xA0:\n            case 0xA1:\n            case 0xA2:\n            case 0xA3:\n            case 0xA4:\n            case 0xA5:\n            case 0xA6:\n            case 0xA7:\n            case 0xA8:\n            case 0xA9:\n            case 0xAA:\n            case 0xAB:\n            case 0xAC:\n            case 0xAD:\n            case 0xAE:\n            case 0xAF:\n            case 0xB0:\n            case 0xB1:\n            case 0xB2:\n            case 0xB3:\n            case 0xB4:\n            case 0xB5:\n            case 0xB6:\n            case 0xB7:\n                return get_cbor_object(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x1Fu), tag_handler);\n\n            case 0xB8: // map (one-byte uint8_t for n follows)\n            {\n                std::uint8_t len{};\n                return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast<std::size_t>(len), tag_handler);\n            }\n\n            case 0xB9: // map (two-byte uint16_t for n follow)\n            {\n                std::uint16_t len{};\n                return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast<std::size_t>(len), tag_handler);\n            }\n\n            case 0xBA: // map (four-byte uint32_t for n follow)\n            {\n                std::uint32_t len{};\n                return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast<std::size_t>(len), tag_handler);\n            }\n\n            case 0xBB: // map (eight-byte uint64_t for n follow)\n            {\n                std::uint64_t len{};\n                return get_number(input_format_t::cbor, len) && get_cbor_object(detail::conditional_static_cast<std::size_t>(len), tag_handler);\n            }\n\n            case 0xBF: // map (indefinite length)\n                return get_cbor_object(static_cast<std::size_t>(-1), tag_handler);\n\n            case 0xC6: // tagged item\n            case 0xC7:\n            case 0xC8:\n            case 0xC9:\n            case 0xCA:\n            case 0xCB:\n            case 0xCC:\n            case 0xCD:\n            case 0xCE:\n            case 0xCF:\n            case 0xD0:\n            case 0xD1:\n            case 0xD2:\n            case 0xD3:\n            case 0xD4:\n            case 0xD8: // tagged item (1 bytes follow)\n            case 0xD9: // tagged item (2 bytes follow)\n            case 0xDA: // tagged item (4 bytes follow)\n            case 0xDB: // tagged item (8 bytes follow)\n            {\n                switch (tag_handler)\n                {\n                    case cbor_tag_handler_t::error:\n                    {\n                        auto last_token = get_token_string();\n                        return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::cbor, \"invalid byte: 0x\" + last_token, \"value\"), BasicJsonType()));\n                    }\n\n                    case cbor_tag_handler_t::ignore:\n                    {\n                        // ignore binary subtype\n                        switch (current)\n                        {\n                            case 0xD8:\n                            {\n                                std::uint8_t subtype_to_ignore{};\n                                get_number(input_format_t::cbor, subtype_to_ignore);\n                                break;\n                            }\n                            case 0xD9:\n                            {\n                                std::uint16_t subtype_to_ignore{};\n                                get_number(input_format_t::cbor, subtype_to_ignore);\n                                break;\n                            }\n                            case 0xDA:\n                            {\n                                std::uint32_t subtype_to_ignore{};\n                                get_number(input_format_t::cbor, subtype_to_ignore);\n                                break;\n                            }\n                            case 0xDB:\n                            {\n                                std::uint64_t subtype_to_ignore{};\n                                get_number(input_format_t::cbor, subtype_to_ignore);\n                                break;\n                            }\n                            default:\n                                break;\n                        }\n                        return parse_cbor_internal(true, tag_handler);\n                    }\n\n                    case cbor_tag_handler_t::store:\n                    {\n                        binary_t b;\n                        // use binary subtype and store in binary container\n                        switch (current)\n                        {\n                            case 0xD8:\n                            {\n                                std::uint8_t subtype{};\n                                get_number(input_format_t::cbor, subtype);\n                                b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype));\n                                break;\n                            }\n                            case 0xD9:\n                            {\n                                std::uint16_t subtype{};\n                                get_number(input_format_t::cbor, subtype);\n                                b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype));\n                                break;\n                            }\n                            case 0xDA:\n                            {\n                                std::uint32_t subtype{};\n                                get_number(input_format_t::cbor, subtype);\n                                b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype));\n                                break;\n                            }\n                            case 0xDB:\n                            {\n                                std::uint64_t subtype{};\n                                get_number(input_format_t::cbor, subtype);\n                                b.set_subtype(detail::conditional_static_cast<typename binary_t::subtype_type>(subtype));\n                                break;\n                            }\n                            default:\n                                return parse_cbor_internal(true, tag_handler);\n                        }\n                        get();\n                        return get_cbor_binary(b) && sax->binary(b);\n                    }\n\n                    default:                 // LCOV_EXCL_LINE\n                        JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n                        return false;        // LCOV_EXCL_LINE\n                }\n            }\n\n            case 0xF4: // false\n                return sax->boolean(false);\n\n            case 0xF5: // true\n                return sax->boolean(true);\n\n            case 0xF6: // null\n                return sax->null();\n\n            case 0xF9: // Half-Precision Float (two-byte IEEE 754)\n            {\n                const auto byte1_raw = get();\n                if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, \"number\")))\n                {\n                    return false;\n                }\n                const auto byte2_raw = get();\n                if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, \"number\")))\n                {\n                    return false;\n                }\n\n                const auto byte1 = static_cast<unsigned char>(byte1_raw);\n                const auto byte2 = static_cast<unsigned char>(byte2_raw);\n\n                // code from RFC 7049, Appendix D, Figure 3:\n                // As half-precision floating-point numbers were only added\n                // to IEEE 754 in 2008, today's programming platforms often\n                // still only have limited support for them. It is very\n                // easy to include at least decoding support for them even\n                // without such support. An example of a small decoder for\n                // half-precision floating-point numbers in the C language\n                // is shown in Fig. 3.\n                const auto half = static_cast<unsigned int>((byte1 << 8u) + byte2);\n                const double val = [&half]\n                {\n                    const int exp = (half >> 10u) & 0x1Fu;\n                    const unsigned int mant = half & 0x3FFu;\n                    JSON_ASSERT(0 <= exp&& exp <= 32);\n                    JSON_ASSERT(mant <= 1024);\n                    switch (exp)\n                    {\n                        case 0:\n                            return std::ldexp(mant, -24);\n                        case 31:\n                            return (mant == 0)\n                            ? std::numeric_limits<double>::infinity()\n                            : std::numeric_limits<double>::quiet_NaN();\n                        default:\n                            return std::ldexp(mant + 1024, exp - 25);\n                    }\n                }();\n                return sax->number_float((half & 0x8000u) != 0\n                                         ? static_cast<number_float_t>(-val)\n                                         : static_cast<number_float_t>(val), \"\");\n            }\n\n            case 0xFA: // Single-Precision Float (four-byte IEEE 754)\n            {\n                float number{};\n                return get_number(input_format_t::cbor, number) && sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 0xFB: // Double-Precision Float (eight-byte IEEE 754)\n            {\n                double number{};\n                return get_number(input_format_t::cbor, number) && sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            default: // anything else (0xFF is handled inside the other types)\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::cbor, \"invalid byte: 0x\" + last_token, \"value\"), BasicJsonType()));\n            }\n        }\n    }\n\n    /*!\n    @brief reads a CBOR string\n\n    This function first reads starting bytes to determine the expected\n    string length and then copies this number of bytes into a string.\n    Additionally, CBOR's strings with indefinite lengths are supported.\n\n    @param[out] result  created string\n\n    @return whether string creation completed\n    */\n    bool get_cbor_string(string_t& result)\n    {\n        if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, \"string\")))\n        {\n            return false;\n        }\n\n        switch (current)\n        {\n            // UTF-8 string (0x00..0x17 bytes follow)\n            case 0x60:\n            case 0x61:\n            case 0x62:\n            case 0x63:\n            case 0x64:\n            case 0x65:\n            case 0x66:\n            case 0x67:\n            case 0x68:\n            case 0x69:\n            case 0x6A:\n            case 0x6B:\n            case 0x6C:\n            case 0x6D:\n            case 0x6E:\n            case 0x6F:\n            case 0x70:\n            case 0x71:\n            case 0x72:\n            case 0x73:\n            case 0x74:\n            case 0x75:\n            case 0x76:\n            case 0x77:\n            {\n                return get_string(input_format_t::cbor, static_cast<unsigned int>(current) & 0x1Fu, result);\n            }\n\n            case 0x78: // UTF-8 string (one-byte uint8_t for n follows)\n            {\n                std::uint8_t len{};\n                return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result);\n            }\n\n            case 0x79: // UTF-8 string (two-byte uint16_t for n follow)\n            {\n                std::uint16_t len{};\n                return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result);\n            }\n\n            case 0x7A: // UTF-8 string (four-byte uint32_t for n follow)\n            {\n                std::uint32_t len{};\n                return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result);\n            }\n\n            case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow)\n            {\n                std::uint64_t len{};\n                return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result);\n            }\n\n            case 0x7F: // UTF-8 string (indefinite length)\n            {\n                while (get() != 0xFF)\n                {\n                    string_t chunk;\n                    if (!get_cbor_string(chunk))\n                    {\n                        return false;\n                    }\n                    result.append(chunk);\n                }\n                return true;\n            }\n\n            default:\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::cbor, \"expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0x\" + last_token, \"string\"), BasicJsonType()));\n            }\n        }\n    }\n\n    /*!\n    @brief reads a CBOR byte array\n\n    This function first reads starting bytes to determine the expected\n    byte array length and then copies this number of bytes into the byte array.\n    Additionally, CBOR's byte arrays with indefinite lengths are supported.\n\n    @param[out] result  created byte array\n\n    @return whether byte array creation completed\n    */\n    bool get_cbor_binary(binary_t& result)\n    {\n        if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, \"binary\")))\n        {\n            return false;\n        }\n\n        switch (current)\n        {\n            // Binary data (0x00..0x17 bytes follow)\n            case 0x40:\n            case 0x41:\n            case 0x42:\n            case 0x43:\n            case 0x44:\n            case 0x45:\n            case 0x46:\n            case 0x47:\n            case 0x48:\n            case 0x49:\n            case 0x4A:\n            case 0x4B:\n            case 0x4C:\n            case 0x4D:\n            case 0x4E:\n            case 0x4F:\n            case 0x50:\n            case 0x51:\n            case 0x52:\n            case 0x53:\n            case 0x54:\n            case 0x55:\n            case 0x56:\n            case 0x57:\n            {\n                return get_binary(input_format_t::cbor, static_cast<unsigned int>(current) & 0x1Fu, result);\n            }\n\n            case 0x58: // Binary data (one-byte uint8_t for n follows)\n            {\n                std::uint8_t len{};\n                return get_number(input_format_t::cbor, len) &&\n                       get_binary(input_format_t::cbor, len, result);\n            }\n\n            case 0x59: // Binary data (two-byte uint16_t for n follow)\n            {\n                std::uint16_t len{};\n                return get_number(input_format_t::cbor, len) &&\n                       get_binary(input_format_t::cbor, len, result);\n            }\n\n            case 0x5A: // Binary data (four-byte uint32_t for n follow)\n            {\n                std::uint32_t len{};\n                return get_number(input_format_t::cbor, len) &&\n                       get_binary(input_format_t::cbor, len, result);\n            }\n\n            case 0x5B: // Binary data (eight-byte uint64_t for n follow)\n            {\n                std::uint64_t len{};\n                return get_number(input_format_t::cbor, len) &&\n                       get_binary(input_format_t::cbor, len, result);\n            }\n\n            case 0x5F: // Binary data (indefinite length)\n            {\n                while (get() != 0xFF)\n                {\n                    binary_t chunk;\n                    if (!get_cbor_binary(chunk))\n                    {\n                        return false;\n                    }\n                    result.insert(result.end(), chunk.begin(), chunk.end());\n                }\n                return true;\n            }\n\n            default:\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::cbor, \"expected length specification (0x40-0x5B) or indefinite binary array type (0x5F); last byte: 0x\" + last_token, \"binary\"), BasicJsonType()));\n            }\n        }\n    }\n\n    /*!\n    @param[in] len  the length of the array or static_cast<std::size_t>(-1) for an\n                    array of indefinite size\n    @param[in] tag_handler how CBOR tags should be treated\n    @return whether array creation completed\n    */\n    bool get_cbor_array(const std::size_t len,\n                        const cbor_tag_handler_t tag_handler)\n    {\n        if (JSON_HEDLEY_UNLIKELY(!sax->start_array(len)))\n        {\n            return false;\n        }\n\n        if (len != static_cast<std::size_t>(-1))\n        {\n            for (std::size_t i = 0; i < len; ++i)\n            {\n                if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler)))\n                {\n                    return false;\n                }\n            }\n        }\n        else\n        {\n            while (get() != 0xFF)\n            {\n                if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(false, tag_handler)))\n                {\n                    return false;\n                }\n            }\n        }\n\n        return sax->end_array();\n    }\n\n    /*!\n    @param[in] len  the length of the object or static_cast<std::size_t>(-1) for an\n                    object of indefinite size\n    @param[in] tag_handler how CBOR tags should be treated\n    @return whether object creation completed\n    */\n    bool get_cbor_object(const std::size_t len,\n                         const cbor_tag_handler_t tag_handler)\n    {\n        if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len)))\n        {\n            return false;\n        }\n\n        if (len != 0)\n        {\n            string_t key;\n            if (len != static_cast<std::size_t>(-1))\n            {\n                for (std::size_t i = 0; i < len; ++i)\n                {\n                    get();\n                    if (JSON_HEDLEY_UNLIKELY(!get_cbor_string(key) || !sax->key(key)))\n                    {\n                        return false;\n                    }\n\n                    if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler)))\n                    {\n                        return false;\n                    }\n                    key.clear();\n                }\n            }\n            else\n            {\n                while (get() != 0xFF)\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!get_cbor_string(key) || !sax->key(key)))\n                    {\n                        return false;\n                    }\n\n                    if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler)))\n                    {\n                        return false;\n                    }\n                    key.clear();\n                }\n            }\n        }\n\n        return sax->end_object();\n    }\n\n    /////////////\n    // MsgPack //\n    /////////////\n\n    /*!\n    @return whether a valid MessagePack value was passed to the SAX parser\n    */\n    bool parse_msgpack_internal()\n    {\n        switch (get())\n        {\n            // EOF\n            case std::char_traits<char_type>::eof():\n                return unexpect_eof(input_format_t::msgpack, \"value\");\n\n            // positive fixint\n            case 0x00:\n            case 0x01:\n            case 0x02:\n            case 0x03:\n            case 0x04:\n            case 0x05:\n            case 0x06:\n            case 0x07:\n            case 0x08:\n            case 0x09:\n            case 0x0A:\n            case 0x0B:\n            case 0x0C:\n            case 0x0D:\n            case 0x0E:\n            case 0x0F:\n            case 0x10:\n            case 0x11:\n            case 0x12:\n            case 0x13:\n            case 0x14:\n            case 0x15:\n            case 0x16:\n            case 0x17:\n            case 0x18:\n            case 0x19:\n            case 0x1A:\n            case 0x1B:\n            case 0x1C:\n            case 0x1D:\n            case 0x1E:\n            case 0x1F:\n            case 0x20:\n            case 0x21:\n            case 0x22:\n            case 0x23:\n            case 0x24:\n            case 0x25:\n            case 0x26:\n            case 0x27:\n            case 0x28:\n            case 0x29:\n            case 0x2A:\n            case 0x2B:\n            case 0x2C:\n            case 0x2D:\n            case 0x2E:\n            case 0x2F:\n            case 0x30:\n            case 0x31:\n            case 0x32:\n            case 0x33:\n            case 0x34:\n            case 0x35:\n            case 0x36:\n            case 0x37:\n            case 0x38:\n            case 0x39:\n            case 0x3A:\n            case 0x3B:\n            case 0x3C:\n            case 0x3D:\n            case 0x3E:\n            case 0x3F:\n            case 0x40:\n            case 0x41:\n            case 0x42:\n            case 0x43:\n            case 0x44:\n            case 0x45:\n            case 0x46:\n            case 0x47:\n            case 0x48:\n            case 0x49:\n            case 0x4A:\n            case 0x4B:\n            case 0x4C:\n            case 0x4D:\n            case 0x4E:\n            case 0x4F:\n            case 0x50:\n            case 0x51:\n            case 0x52:\n            case 0x53:\n            case 0x54:\n            case 0x55:\n            case 0x56:\n            case 0x57:\n            case 0x58:\n            case 0x59:\n            case 0x5A:\n            case 0x5B:\n            case 0x5C:\n            case 0x5D:\n            case 0x5E:\n            case 0x5F:\n            case 0x60:\n            case 0x61:\n            case 0x62:\n            case 0x63:\n            case 0x64:\n            case 0x65:\n            case 0x66:\n            case 0x67:\n            case 0x68:\n            case 0x69:\n            case 0x6A:\n            case 0x6B:\n            case 0x6C:\n            case 0x6D:\n            case 0x6E:\n            case 0x6F:\n            case 0x70:\n            case 0x71:\n            case 0x72:\n            case 0x73:\n            case 0x74:\n            case 0x75:\n            case 0x76:\n            case 0x77:\n            case 0x78:\n            case 0x79:\n            case 0x7A:\n            case 0x7B:\n            case 0x7C:\n            case 0x7D:\n            case 0x7E:\n            case 0x7F:\n                return sax->number_unsigned(static_cast<number_unsigned_t>(current));\n\n            // fixmap\n            case 0x80:\n            case 0x81:\n            case 0x82:\n            case 0x83:\n            case 0x84:\n            case 0x85:\n            case 0x86:\n            case 0x87:\n            case 0x88:\n            case 0x89:\n            case 0x8A:\n            case 0x8B:\n            case 0x8C:\n            case 0x8D:\n            case 0x8E:\n            case 0x8F:\n                return get_msgpack_object(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x0Fu));\n\n            // fixarray\n            case 0x90:\n            case 0x91:\n            case 0x92:\n            case 0x93:\n            case 0x94:\n            case 0x95:\n            case 0x96:\n            case 0x97:\n            case 0x98:\n            case 0x99:\n            case 0x9A:\n            case 0x9B:\n            case 0x9C:\n            case 0x9D:\n            case 0x9E:\n            case 0x9F:\n                return get_msgpack_array(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x0Fu));\n\n            // fixstr\n            case 0xA0:\n            case 0xA1:\n            case 0xA2:\n            case 0xA3:\n            case 0xA4:\n            case 0xA5:\n            case 0xA6:\n            case 0xA7:\n            case 0xA8:\n            case 0xA9:\n            case 0xAA:\n            case 0xAB:\n            case 0xAC:\n            case 0xAD:\n            case 0xAE:\n            case 0xAF:\n            case 0xB0:\n            case 0xB1:\n            case 0xB2:\n            case 0xB3:\n            case 0xB4:\n            case 0xB5:\n            case 0xB6:\n            case 0xB7:\n            case 0xB8:\n            case 0xB9:\n            case 0xBA:\n            case 0xBB:\n            case 0xBC:\n            case 0xBD:\n            case 0xBE:\n            case 0xBF:\n            case 0xD9: // str 8\n            case 0xDA: // str 16\n            case 0xDB: // str 32\n            {\n                string_t s;\n                return get_msgpack_string(s) && sax->string(s);\n            }\n\n            case 0xC0: // nil\n                return sax->null();\n\n            case 0xC2: // false\n                return sax->boolean(false);\n\n            case 0xC3: // true\n                return sax->boolean(true);\n\n            case 0xC4: // bin 8\n            case 0xC5: // bin 16\n            case 0xC6: // bin 32\n            case 0xC7: // ext 8\n            case 0xC8: // ext 16\n            case 0xC9: // ext 32\n            case 0xD4: // fixext 1\n            case 0xD5: // fixext 2\n            case 0xD6: // fixext 4\n            case 0xD7: // fixext 8\n            case 0xD8: // fixext 16\n            {\n                binary_t b;\n                return get_msgpack_binary(b) && sax->binary(b);\n            }\n\n            case 0xCA: // float 32\n            {\n                float number{};\n                return get_number(input_format_t::msgpack, number) && sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 0xCB: // float 64\n            {\n                double number{};\n                return get_number(input_format_t::msgpack, number) && sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 0xCC: // uint 8\n            {\n                std::uint8_t number{};\n                return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number);\n            }\n\n            case 0xCD: // uint 16\n            {\n                std::uint16_t number{};\n                return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number);\n            }\n\n            case 0xCE: // uint 32\n            {\n                std::uint32_t number{};\n                return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number);\n            }\n\n            case 0xCF: // uint 64\n            {\n                std::uint64_t number{};\n                return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number);\n            }\n\n            case 0xD0: // int 8\n            {\n                std::int8_t number{};\n                return get_number(input_format_t::msgpack, number) && sax->number_integer(number);\n            }\n\n            case 0xD1: // int 16\n            {\n                std::int16_t number{};\n                return get_number(input_format_t::msgpack, number) && sax->number_integer(number);\n            }\n\n            case 0xD2: // int 32\n            {\n                std::int32_t number{};\n                return get_number(input_format_t::msgpack, number) && sax->number_integer(number);\n            }\n\n            case 0xD3: // int 64\n            {\n                std::int64_t number{};\n                return get_number(input_format_t::msgpack, number) && sax->number_integer(number);\n            }\n\n            case 0xDC: // array 16\n            {\n                std::uint16_t len{};\n                return get_number(input_format_t::msgpack, len) && get_msgpack_array(static_cast<std::size_t>(len));\n            }\n\n            case 0xDD: // array 32\n            {\n                std::uint32_t len{};\n                return get_number(input_format_t::msgpack, len) && get_msgpack_array(static_cast<std::size_t>(len));\n            }\n\n            case 0xDE: // map 16\n            {\n                std::uint16_t len{};\n                return get_number(input_format_t::msgpack, len) && get_msgpack_object(static_cast<std::size_t>(len));\n            }\n\n            case 0xDF: // map 32\n            {\n                std::uint32_t len{};\n                return get_number(input_format_t::msgpack, len) && get_msgpack_object(static_cast<std::size_t>(len));\n            }\n\n            // negative fixint\n            case 0xE0:\n            case 0xE1:\n            case 0xE2:\n            case 0xE3:\n            case 0xE4:\n            case 0xE5:\n            case 0xE6:\n            case 0xE7:\n            case 0xE8:\n            case 0xE9:\n            case 0xEA:\n            case 0xEB:\n            case 0xEC:\n            case 0xED:\n            case 0xEE:\n            case 0xEF:\n            case 0xF0:\n            case 0xF1:\n            case 0xF2:\n            case 0xF3:\n            case 0xF4:\n            case 0xF5:\n            case 0xF6:\n            case 0xF7:\n            case 0xF8:\n            case 0xF9:\n            case 0xFA:\n            case 0xFB:\n            case 0xFC:\n            case 0xFD:\n            case 0xFE:\n            case 0xFF:\n                return sax->number_integer(static_cast<std::int8_t>(current));\n\n            default: // anything else\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::msgpack, \"invalid byte: 0x\" + last_token, \"value\"), BasicJsonType()));\n            }\n        }\n    }\n\n    /*!\n    @brief reads a MessagePack string\n\n    This function first reads starting bytes to determine the expected\n    string length and then copies this number of bytes into a string.\n\n    @param[out] result  created string\n\n    @return whether string creation completed\n    */\n    bool get_msgpack_string(string_t& result)\n    {\n        if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::msgpack, \"string\")))\n        {\n            return false;\n        }\n\n        switch (current)\n        {\n            // fixstr\n            case 0xA0:\n            case 0xA1:\n            case 0xA2:\n            case 0xA3:\n            case 0xA4:\n            case 0xA5:\n            case 0xA6:\n            case 0xA7:\n            case 0xA8:\n            case 0xA9:\n            case 0xAA:\n            case 0xAB:\n            case 0xAC:\n            case 0xAD:\n            case 0xAE:\n            case 0xAF:\n            case 0xB0:\n            case 0xB1:\n            case 0xB2:\n            case 0xB3:\n            case 0xB4:\n            case 0xB5:\n            case 0xB6:\n            case 0xB7:\n            case 0xB8:\n            case 0xB9:\n            case 0xBA:\n            case 0xBB:\n            case 0xBC:\n            case 0xBD:\n            case 0xBE:\n            case 0xBF:\n            {\n                return get_string(input_format_t::msgpack, static_cast<unsigned int>(current) & 0x1Fu, result);\n            }\n\n            case 0xD9: // str 8\n            {\n                std::uint8_t len{};\n                return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result);\n            }\n\n            case 0xDA: // str 16\n            {\n                std::uint16_t len{};\n                return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result);\n            }\n\n            case 0xDB: // str 32\n            {\n                std::uint32_t len{};\n                return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result);\n            }\n\n            default:\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::msgpack, \"expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0x\" + last_token, \"string\"), BasicJsonType()));\n            }\n        }\n    }\n\n    /*!\n    @brief reads a MessagePack byte array\n\n    This function first reads starting bytes to determine the expected\n    byte array length and then copies this number of bytes into a byte array.\n\n    @param[out] result  created byte array\n\n    @return whether byte array creation completed\n    */\n    bool get_msgpack_binary(binary_t& result)\n    {\n        // helper function to set the subtype\n        auto assign_and_return_true = [&result](std::int8_t subtype)\n        {\n            result.set_subtype(static_cast<std::uint8_t>(subtype));\n            return true;\n        };\n\n        switch (current)\n        {\n            case 0xC4: // bin 8\n            {\n                std::uint8_t len{};\n                return get_number(input_format_t::msgpack, len) &&\n                       get_binary(input_format_t::msgpack, len, result);\n            }\n\n            case 0xC5: // bin 16\n            {\n                std::uint16_t len{};\n                return get_number(input_format_t::msgpack, len) &&\n                       get_binary(input_format_t::msgpack, len, result);\n            }\n\n            case 0xC6: // bin 32\n            {\n                std::uint32_t len{};\n                return get_number(input_format_t::msgpack, len) &&\n                       get_binary(input_format_t::msgpack, len, result);\n            }\n\n            case 0xC7: // ext 8\n            {\n                std::uint8_t len{};\n                std::int8_t subtype{};\n                return get_number(input_format_t::msgpack, len) &&\n                       get_number(input_format_t::msgpack, subtype) &&\n                       get_binary(input_format_t::msgpack, len, result) &&\n                       assign_and_return_true(subtype);\n            }\n\n            case 0xC8: // ext 16\n            {\n                std::uint16_t len{};\n                std::int8_t subtype{};\n                return get_number(input_format_t::msgpack, len) &&\n                       get_number(input_format_t::msgpack, subtype) &&\n                       get_binary(input_format_t::msgpack, len, result) &&\n                       assign_and_return_true(subtype);\n            }\n\n            case 0xC9: // ext 32\n            {\n                std::uint32_t len{};\n                std::int8_t subtype{};\n                return get_number(input_format_t::msgpack, len) &&\n                       get_number(input_format_t::msgpack, subtype) &&\n                       get_binary(input_format_t::msgpack, len, result) &&\n                       assign_and_return_true(subtype);\n            }\n\n            case 0xD4: // fixext 1\n            {\n                std::int8_t subtype{};\n                return get_number(input_format_t::msgpack, subtype) &&\n                       get_binary(input_format_t::msgpack, 1, result) &&\n                       assign_and_return_true(subtype);\n            }\n\n            case 0xD5: // fixext 2\n            {\n                std::int8_t subtype{};\n                return get_number(input_format_t::msgpack, subtype) &&\n                       get_binary(input_format_t::msgpack, 2, result) &&\n                       assign_and_return_true(subtype);\n            }\n\n            case 0xD6: // fixext 4\n            {\n                std::int8_t subtype{};\n                return get_number(input_format_t::msgpack, subtype) &&\n                       get_binary(input_format_t::msgpack, 4, result) &&\n                       assign_and_return_true(subtype);\n            }\n\n            case 0xD7: // fixext 8\n            {\n                std::int8_t subtype{};\n                return get_number(input_format_t::msgpack, subtype) &&\n                       get_binary(input_format_t::msgpack, 8, result) &&\n                       assign_and_return_true(subtype);\n            }\n\n            case 0xD8: // fixext 16\n            {\n                std::int8_t subtype{};\n                return get_number(input_format_t::msgpack, subtype) &&\n                       get_binary(input_format_t::msgpack, 16, result) &&\n                       assign_and_return_true(subtype);\n            }\n\n            default:           // LCOV_EXCL_LINE\n                return false;  // LCOV_EXCL_LINE\n        }\n    }\n\n    /*!\n    @param[in] len  the length of the array\n    @return whether array creation completed\n    */\n    bool get_msgpack_array(const std::size_t len)\n    {\n        if (JSON_HEDLEY_UNLIKELY(!sax->start_array(len)))\n        {\n            return false;\n        }\n\n        for (std::size_t i = 0; i < len; ++i)\n        {\n            if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal()))\n            {\n                return false;\n            }\n        }\n\n        return sax->end_array();\n    }\n\n    /*!\n    @param[in] len  the length of the object\n    @return whether object creation completed\n    */\n    bool get_msgpack_object(const std::size_t len)\n    {\n        if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len)))\n        {\n            return false;\n        }\n\n        string_t key;\n        for (std::size_t i = 0; i < len; ++i)\n        {\n            get();\n            if (JSON_HEDLEY_UNLIKELY(!get_msgpack_string(key) || !sax->key(key)))\n            {\n                return false;\n            }\n\n            if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal()))\n            {\n                return false;\n            }\n            key.clear();\n        }\n\n        return sax->end_object();\n    }\n\n    ////////////\n    // UBJSON //\n    ////////////\n\n    /*!\n    @param[in] get_char  whether a new character should be retrieved from the\n                         input (true, default) or whether the last read\n                         character should be considered instead\n\n    @return whether a valid UBJSON value was passed to the SAX parser\n    */\n    bool parse_ubjson_internal(const bool get_char = true)\n    {\n        return get_ubjson_value(get_char ? get_ignore_noop() : current);\n    }\n\n    /*!\n    @brief reads a UBJSON string\n\n    This function is either called after reading the 'S' byte explicitly\n    indicating a string, or in case of an object key where the 'S' byte can be\n    left out.\n\n    @param[out] result   created string\n    @param[in] get_char  whether a new character should be retrieved from the\n                         input (true, default) or whether the last read\n                         character should be considered instead\n\n    @return whether string creation completed\n    */\n    bool get_ubjson_string(string_t& result, const bool get_char = true)\n    {\n        if (get_char)\n        {\n            get();  // TODO(niels): may we ignore N here?\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, \"value\")))\n        {\n            return false;\n        }\n\n        switch (current)\n        {\n            case 'U':\n            {\n                std::uint8_t len{};\n                return get_number(input_format_t::ubjson, len) && get_string(input_format_t::ubjson, len, result);\n            }\n\n            case 'i':\n            {\n                std::int8_t len{};\n                return get_number(input_format_t::ubjson, len) && get_string(input_format_t::ubjson, len, result);\n            }\n\n            case 'I':\n            {\n                std::int16_t len{};\n                return get_number(input_format_t::ubjson, len) && get_string(input_format_t::ubjson, len, result);\n            }\n\n            case 'l':\n            {\n                std::int32_t len{};\n                return get_number(input_format_t::ubjson, len) && get_string(input_format_t::ubjson, len, result);\n            }\n\n            case 'L':\n            {\n                std::int64_t len{};\n                return get_number(input_format_t::ubjson, len) && get_string(input_format_t::ubjson, len, result);\n            }\n\n            default:\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, \"expected length type specification (U, i, I, l, L); last byte: 0x\" + last_token, \"string\"), BasicJsonType()));\n        }\n    }\n\n    /*!\n    @param[out] result  determined size\n    @return whether size determination completed\n    */\n    bool get_ubjson_size_value(std::size_t& result)\n    {\n        switch (get_ignore_noop())\n        {\n            case 'U':\n            {\n                std::uint8_t number{};\n                if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson, number)))\n                {\n                    return false;\n                }\n                result = static_cast<std::size_t>(number);\n                return true;\n            }\n\n            case 'i':\n            {\n                std::int8_t number{};\n                if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson, number)))\n                {\n                    return false;\n                }\n                result = static_cast<std::size_t>(number); // NOLINT(bugprone-signed-char-misuse,cert-str34-c): number is not a char\n                return true;\n            }\n\n            case 'I':\n            {\n                std::int16_t number{};\n                if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson, number)))\n                {\n                    return false;\n                }\n                result = static_cast<std::size_t>(number);\n                return true;\n            }\n\n            case 'l':\n            {\n                std::int32_t number{};\n                if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson, number)))\n                {\n                    return false;\n                }\n                result = static_cast<std::size_t>(number);\n                return true;\n            }\n\n            case 'L':\n            {\n                std::int64_t number{};\n                if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson, number)))\n                {\n                    return false;\n                }\n                result = static_cast<std::size_t>(number);\n                return true;\n            }\n\n            default:\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, \"expected length type specification (U, i, I, l, L) after '#'; last byte: 0x\" + last_token, \"size\"), BasicJsonType()));\n            }\n        }\n    }\n\n    /*!\n    @brief determine the type and size for a container\n\n    In the optimized UBJSON format, a type and a size can be provided to allow\n    for a more compact representation.\n\n    @param[out] result  pair of the size and the type\n\n    @return whether pair creation completed\n    */\n    bool get_ubjson_size_type(std::pair<std::size_t, char_int_type>& result)\n    {\n        result.first = string_t::npos; // size\n        result.second = 0; // type\n\n        get_ignore_noop();\n\n        if (current == '$')\n        {\n            result.second = get();  // must not ignore 'N', because 'N' maybe the type\n            if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, \"type\")))\n            {\n                return false;\n            }\n\n            get_ignore_noop();\n            if (JSON_HEDLEY_UNLIKELY(current != '#'))\n            {\n                if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, \"value\")))\n                {\n                    return false;\n                }\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::ubjson, \"expected '#' after type information; last byte: 0x\" + last_token, \"size\"), BasicJsonType()));\n            }\n\n            return get_ubjson_size_value(result.first);\n        }\n\n        if (current == '#')\n        {\n            return get_ubjson_size_value(result.first);\n        }\n\n        return true;\n    }\n\n    /*!\n    @param prefix  the previously read or set type prefix\n    @return whether value creation completed\n    */\n    bool get_ubjson_value(const char_int_type prefix)\n    {\n        switch (prefix)\n        {\n            case std::char_traits<char_type>::eof():  // EOF\n                return unexpect_eof(input_format_t::ubjson, \"value\");\n\n            case 'T':  // true\n                return sax->boolean(true);\n            case 'F':  // false\n                return sax->boolean(false);\n\n            case 'Z':  // null\n                return sax->null();\n\n            case 'U':\n            {\n                std::uint8_t number{};\n                return get_number(input_format_t::ubjson, number) && sax->number_unsigned(number);\n            }\n\n            case 'i':\n            {\n                std::int8_t number{};\n                return get_number(input_format_t::ubjson, number) && sax->number_integer(number);\n            }\n\n            case 'I':\n            {\n                std::int16_t number{};\n                return get_number(input_format_t::ubjson, number) && sax->number_integer(number);\n            }\n\n            case 'l':\n            {\n                std::int32_t number{};\n                return get_number(input_format_t::ubjson, number) && sax->number_integer(number);\n            }\n\n            case 'L':\n            {\n                std::int64_t number{};\n                return get_number(input_format_t::ubjson, number) && sax->number_integer(number);\n            }\n\n            case 'd':\n            {\n                float number{};\n                return get_number(input_format_t::ubjson, number) && sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 'D':\n            {\n                double number{};\n                return get_number(input_format_t::ubjson, number) && sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 'H':\n            {\n                return get_ubjson_high_precision_number();\n            }\n\n            case 'C':  // char\n            {\n                get();\n                if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, \"char\")))\n                {\n                    return false;\n                }\n                if (JSON_HEDLEY_UNLIKELY(current > 127))\n                {\n                    auto last_token = get_token_string();\n                    return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, \"byte after 'C' must be in range 0x00..0x7F; last byte: 0x\" + last_token, \"char\"), BasicJsonType()));\n                }\n                string_t s(1, static_cast<typename string_t::value_type>(current));\n                return sax->string(s);\n            }\n\n            case 'S':  // string\n            {\n                string_t s;\n                return get_ubjson_string(s) && sax->string(s);\n            }\n\n            case '[':  // array\n                return get_ubjson_array();\n\n            case '{':  // object\n                return get_ubjson_object();\n\n            default: // anything else\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::ubjson, \"invalid byte: 0x\" + last_token, \"value\"), BasicJsonType()));\n            }\n        }\n    }\n\n    /*!\n    @return whether array creation completed\n    */\n    bool get_ubjson_array()\n    {\n        std::pair<std::size_t, char_int_type> size_and_type;\n        if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type)))\n        {\n            return false;\n        }\n\n        if (size_and_type.first != string_t::npos)\n        {\n            if (JSON_HEDLEY_UNLIKELY(!sax->start_array(size_and_type.first)))\n            {\n                return false;\n            }\n\n            if (size_and_type.second != 0)\n            {\n                if (size_and_type.second != 'N')\n                {\n                    for (std::size_t i = 0; i < size_and_type.first; ++i)\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second)))\n                        {\n                            return false;\n                        }\n                    }\n                }\n            }\n            else\n            {\n                for (std::size_t i = 0; i < size_and_type.first; ++i)\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal()))\n                    {\n                        return false;\n                    }\n                }\n            }\n        }\n        else\n        {\n            if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast<std::size_t>(-1))))\n            {\n                return false;\n            }\n\n            while (current != ']')\n            {\n                if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal(false)))\n                {\n                    return false;\n                }\n                get_ignore_noop();\n            }\n        }\n\n        return sax->end_array();\n    }\n\n    /*!\n    @return whether object creation completed\n    */\n    bool get_ubjson_object()\n    {\n        std::pair<std::size_t, char_int_type> size_and_type;\n        if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type)))\n        {\n            return false;\n        }\n\n        string_t key;\n        if (size_and_type.first != string_t::npos)\n        {\n            if (JSON_HEDLEY_UNLIKELY(!sax->start_object(size_and_type.first)))\n            {\n                return false;\n            }\n\n            if (size_and_type.second != 0)\n            {\n                for (std::size_t i = 0; i < size_and_type.first; ++i)\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key) || !sax->key(key)))\n                    {\n                        return false;\n                    }\n                    if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second)))\n                    {\n                        return false;\n                    }\n                    key.clear();\n                }\n            }\n            else\n            {\n                for (std::size_t i = 0; i < size_and_type.first; ++i)\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key) || !sax->key(key)))\n                    {\n                        return false;\n                    }\n                    if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal()))\n                    {\n                        return false;\n                    }\n                    key.clear();\n                }\n            }\n        }\n        else\n        {\n            if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast<std::size_t>(-1))))\n            {\n                return false;\n            }\n\n            while (current != '}')\n            {\n                if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key, false) || !sax->key(key)))\n                {\n                    return false;\n                }\n                if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal()))\n                {\n                    return false;\n                }\n                get_ignore_noop();\n                key.clear();\n            }\n        }\n\n        return sax->end_object();\n    }\n\n    // Note, no reader for UBJSON binary types is implemented because they do\n    // not exist\n\n    bool get_ubjson_high_precision_number()\n    {\n        // get size of following number string\n        std::size_t size{};\n        auto res = get_ubjson_size_value(size);\n        if (JSON_HEDLEY_UNLIKELY(!res))\n        {\n            return res;\n        }\n\n        // get number string\n        std::vector<char> number_vector;\n        for (std::size_t i = 0; i < size; ++i)\n        {\n            get();\n            if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, \"number\")))\n            {\n                return false;\n            }\n            number_vector.push_back(static_cast<char>(current));\n        }\n\n        // parse number string\n        using ia_type = decltype(detail::input_adapter(number_vector));\n        auto number_lexer = detail::lexer<BasicJsonType, ia_type>(detail::input_adapter(number_vector), false);\n        const auto result_number = number_lexer.scan();\n        const auto number_string = number_lexer.get_token_string();\n        const auto result_remainder = number_lexer.scan();\n\n        using token_type = typename detail::lexer_base<BasicJsonType>::token_type;\n\n        if (JSON_HEDLEY_UNLIKELY(result_remainder != token_type::end_of_input))\n        {\n            return sax->parse_error(chars_read, number_string, parse_error::create(115, chars_read, exception_message(input_format_t::ubjson, \"invalid number text: \" + number_lexer.get_token_string(), \"high-precision number\"), BasicJsonType()));\n        }\n\n        switch (result_number)\n        {\n            case token_type::value_integer:\n                return sax->number_integer(number_lexer.get_number_integer());\n            case token_type::value_unsigned:\n                return sax->number_unsigned(number_lexer.get_number_unsigned());\n            case token_type::value_float:\n                return sax->number_float(number_lexer.get_number_float(), std::move(number_string));\n            case token_type::uninitialized:\n            case token_type::literal_true:\n            case token_type::literal_false:\n            case token_type::literal_null:\n            case token_type::value_string:\n            case token_type::begin_array:\n            case token_type::begin_object:\n            case token_type::end_array:\n            case token_type::end_object:\n            case token_type::name_separator:\n            case token_type::value_separator:\n            case token_type::parse_error:\n            case token_type::end_of_input:\n            case token_type::literal_or_value:\n            default:\n                return sax->parse_error(chars_read, number_string, parse_error::create(115, chars_read, exception_message(input_format_t::ubjson, \"invalid number text: \" + number_lexer.get_token_string(), \"high-precision number\"), BasicJsonType()));\n        }\n    }\n\n    ///////////////////////\n    // Utility functions //\n    ///////////////////////\n\n    /*!\n    @brief get next character from the input\n\n    This function provides the interface to the used input adapter. It does\n    not throw in case the input reached EOF, but returns a -'ve valued\n    `std::char_traits<char_type>::eof()` in that case.\n\n    @return character read from the input\n    */\n    char_int_type get()\n    {\n        ++chars_read;\n        return current = ia.get_character();\n    }\n\n    /*!\n    @return character read from the input after ignoring all 'N' entries\n    */\n    char_int_type get_ignore_noop()\n    {\n        do\n        {\n            get();\n        }\n        while (current == 'N');\n\n        return current;\n    }\n\n    /*\n    @brief read a number from the input\n\n    @tparam NumberType the type of the number\n    @param[in] format   the current format (for diagnostics)\n    @param[out] result  number of type @a NumberType\n\n    @return whether conversion completed\n\n    @note This function needs to respect the system's endianness, because\n          bytes in CBOR, MessagePack, and UBJSON are stored in network order\n          (big endian) and therefore need reordering on little endian systems.\n    */\n    template<typename NumberType, bool InputIsLittleEndian = false>\n    bool get_number(const input_format_t format, NumberType& result)\n    {\n        // step 1: read input into array with system's byte order\n        std::array<std::uint8_t, sizeof(NumberType)> vec{};\n        for (std::size_t i = 0; i < sizeof(NumberType); ++i)\n        {\n            get();\n            if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, \"number\")))\n            {\n                return false;\n            }\n\n            // reverse byte order prior to conversion if necessary\n            if (is_little_endian != InputIsLittleEndian)\n            {\n                vec[sizeof(NumberType) - i - 1] = static_cast<std::uint8_t>(current);\n            }\n            else\n            {\n                vec[i] = static_cast<std::uint8_t>(current); // LCOV_EXCL_LINE\n            }\n        }\n\n        // step 2: convert array into number of type T and return\n        std::memcpy(&result, vec.data(), sizeof(NumberType));\n        return true;\n    }\n\n    /*!\n    @brief create a string by reading characters from the input\n\n    @tparam NumberType the type of the number\n    @param[in] format the current format (for diagnostics)\n    @param[in] len number of characters to read\n    @param[out] result string created by reading @a len bytes\n\n    @return whether string creation completed\n\n    @note We can not reserve @a len bytes for the result, because @a len\n          may be too large. Usually, @ref unexpect_eof() detects the end of\n          the input before we run out of string memory.\n    */\n    template<typename NumberType>\n    bool get_string(const input_format_t format,\n                    const NumberType len,\n                    string_t& result)\n    {\n        bool success = true;\n        for (NumberType i = 0; i < len; i++)\n        {\n            get();\n            if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, \"string\")))\n            {\n                success = false;\n                break;\n            }\n            result.push_back(static_cast<typename string_t::value_type>(current));\n        }\n        return success;\n    }\n\n    /*!\n    @brief create a byte array by reading bytes from the input\n\n    @tparam NumberType the type of the number\n    @param[in] format the current format (for diagnostics)\n    @param[in] len number of bytes to read\n    @param[out] result byte array created by reading @a len bytes\n\n    @return whether byte array creation completed\n\n    @note We can not reserve @a len bytes for the result, because @a len\n          may be too large. Usually, @ref unexpect_eof() detects the end of\n          the input before we run out of memory.\n    */\n    template<typename NumberType>\n    bool get_binary(const input_format_t format,\n                    const NumberType len,\n                    binary_t& result)\n    {\n        bool success = true;\n        for (NumberType i = 0; i < len; i++)\n        {\n            get();\n            if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, \"binary\")))\n            {\n                success = false;\n                break;\n            }\n            result.push_back(static_cast<std::uint8_t>(current));\n        }\n        return success;\n    }\n\n    /*!\n    @param[in] format   the current format (for diagnostics)\n    @param[in] context  further context information (for diagnostics)\n    @return whether the last read character is not EOF\n    */\n    JSON_HEDLEY_NON_NULL(3)\n    bool unexpect_eof(const input_format_t format, const char* context) const\n    {\n        if (JSON_HEDLEY_UNLIKELY(current == std::char_traits<char_type>::eof()))\n        {\n            return sax->parse_error(chars_read, \"<end of file>\",\n                                    parse_error::create(110, chars_read, exception_message(format, \"unexpected end of input\", context), BasicJsonType()));\n        }\n        return true;\n    }\n\n    /*!\n    @return a string representation of the last read byte\n    */\n    std::string get_token_string() const\n    {\n        std::array<char, 3> cr{{}};\n        static_cast<void>((std::snprintf)(cr.data(), cr.size(), \"%.2hhX\", static_cast<unsigned char>(current))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)\n        return std::string{cr.data()};\n    }\n\n    /*!\n    @param[in] format   the current format\n    @param[in] detail   a detailed error message\n    @param[in] context  further context information\n    @return a message string to use in the parse_error exceptions\n    */\n    std::string exception_message(const input_format_t format,\n                                  const std::string& detail,\n                                  const std::string& context) const\n    {\n        std::string error_msg = \"syntax error while parsing \";\n\n        switch (format)\n        {\n            case input_format_t::cbor:\n                error_msg += \"CBOR\";\n                break;\n\n            case input_format_t::msgpack:\n                error_msg += \"MessagePack\";\n                break;\n\n            case input_format_t::ubjson:\n                error_msg += \"UBJSON\";\n                break;\n\n            case input_format_t::bson:\n                error_msg += \"BSON\";\n                break;\n\n            case input_format_t::json: // LCOV_EXCL_LINE\n            default:            // LCOV_EXCL_LINE\n                JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n        }\n\n        return error_msg + \" \" + context + \": \" + detail;\n    }\n\n  private:\n    /// input adapter\n    InputAdapterType ia;\n\n    /// the current character\n    char_int_type current = std::char_traits<char_type>::eof();\n\n    /// the number of characters read\n    std::size_t chars_read = 0;\n\n    /// whether we can assume little endianness\n    const bool is_little_endian = little_endianness();\n\n    /// the SAX parser\n    json_sax_t* sax = nullptr;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/input/input_adapters.hpp>\n\n// #include <nlohmann/detail/input/lexer.hpp>\n\n// #include <nlohmann/detail/input/parser.hpp>\n\n\n#include <cmath> // isfinite\n#include <cstdint> // uint8_t\n#include <functional> // function\n#include <string> // string\n#include <utility> // move\n#include <vector> // vector\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/input/input_adapters.hpp>\n\n// #include <nlohmann/detail/input/json_sax.hpp>\n\n// #include <nlohmann/detail/input/lexer.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/is_sax.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n////////////\n// parser //\n////////////\n\nenum class parse_event_t : std::uint8_t\n{\n    /// the parser read `{` and started to process a JSON object\n    object_start,\n    /// the parser read `}` and finished processing a JSON object\n    object_end,\n    /// the parser read `[` and started to process a JSON array\n    array_start,\n    /// the parser read `]` and finished processing a JSON array\n    array_end,\n    /// the parser read a key of a value in an object\n    key,\n    /// the parser finished reading a JSON value\n    value\n};\n\ntemplate<typename BasicJsonType>\nusing parser_callback_t =\n    std::function<bool(int /*depth*/, parse_event_t /*event*/, BasicJsonType& /*parsed*/)>;\n\n/*!\n@brief syntax analysis\n\nThis class implements a recursive descent parser.\n*/\ntemplate<typename BasicJsonType, typename InputAdapterType>\nclass parser\n{\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using lexer_t = lexer<BasicJsonType, InputAdapterType>;\n    using token_type = typename lexer_t::token_type;\n\n  public:\n    /// a parser reading from an input adapter\n    explicit parser(InputAdapterType&& adapter,\n                    const parser_callback_t<BasicJsonType> cb = nullptr,\n                    const bool allow_exceptions_ = true,\n                    const bool skip_comments = false)\n        : callback(cb)\n        , m_lexer(std::move(adapter), skip_comments)\n        , allow_exceptions(allow_exceptions_)\n    {\n        // read first token\n        get_token();\n    }\n\n    /*!\n    @brief public parser interface\n\n    @param[in] strict      whether to expect the last token to be EOF\n    @param[in,out] result  parsed JSON value\n\n    @throw parse_error.101 in case of an unexpected token\n    @throw parse_error.102 if to_unicode fails or surrogate error\n    @throw parse_error.103 if to_unicode fails\n    */\n    void parse(const bool strict, BasicJsonType& result)\n    {\n        if (callback)\n        {\n            json_sax_dom_callback_parser<BasicJsonType> sdp(result, callback, allow_exceptions);\n            sax_parse_internal(&sdp);\n\n            // in strict mode, input must be completely read\n            if (strict && (get_token() != token_type::end_of_input))\n            {\n                sdp.parse_error(m_lexer.get_position(),\n                                m_lexer.get_token_string(),\n                                parse_error::create(101, m_lexer.get_position(),\n                                                    exception_message(token_type::end_of_input, \"value\"), BasicJsonType()));\n            }\n\n            // in case of an error, return discarded value\n            if (sdp.is_errored())\n            {\n                result = value_t::discarded;\n                return;\n            }\n\n            // set top-level value to null if it was discarded by the callback\n            // function\n            if (result.is_discarded())\n            {\n                result = nullptr;\n            }\n        }\n        else\n        {\n            json_sax_dom_parser<BasicJsonType> sdp(result, allow_exceptions);\n            sax_parse_internal(&sdp);\n\n            // in strict mode, input must be completely read\n            if (strict && (get_token() != token_type::end_of_input))\n            {\n                sdp.parse_error(m_lexer.get_position(),\n                                m_lexer.get_token_string(),\n                                parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, \"value\"), BasicJsonType()));\n            }\n\n            // in case of an error, return discarded value\n            if (sdp.is_errored())\n            {\n                result = value_t::discarded;\n                return;\n            }\n        }\n\n        result.assert_invariant();\n    }\n\n    /*!\n    @brief public accept interface\n\n    @param[in] strict  whether to expect the last token to be EOF\n    @return whether the input is a proper JSON text\n    */\n    bool accept(const bool strict = true)\n    {\n        json_sax_acceptor<BasicJsonType> sax_acceptor;\n        return sax_parse(&sax_acceptor, strict);\n    }\n\n    template<typename SAX>\n    JSON_HEDLEY_NON_NULL(2)\n    bool sax_parse(SAX* sax, const bool strict = true)\n    {\n        (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {};\n        const bool result = sax_parse_internal(sax);\n\n        // strict mode: next byte must be EOF\n        if (result && strict && (get_token() != token_type::end_of_input))\n        {\n            return sax->parse_error(m_lexer.get_position(),\n                                    m_lexer.get_token_string(),\n                                    parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, \"value\"), BasicJsonType()));\n        }\n\n        return result;\n    }\n\n  private:\n    template<typename SAX>\n    JSON_HEDLEY_NON_NULL(2)\n    bool sax_parse_internal(SAX* sax)\n    {\n        // stack to remember the hierarchy of structured values we are parsing\n        // true = array; false = object\n        std::vector<bool> states;\n        // value to avoid a goto (see comment where set to true)\n        bool skip_to_state_evaluation = false;\n\n        while (true)\n        {\n            if (!skip_to_state_evaluation)\n            {\n                // invariant: get_token() was called before each iteration\n                switch (last_token)\n                {\n                    case token_type::begin_object:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast<std::size_t>(-1))))\n                        {\n                            return false;\n                        }\n\n                        // closing } -> we are done\n                        if (get_token() == token_type::end_object)\n                        {\n                            if (JSON_HEDLEY_UNLIKELY(!sax->end_object()))\n                            {\n                                return false;\n                            }\n                            break;\n                        }\n\n                        // parse key\n                        if (JSON_HEDLEY_UNLIKELY(last_token != token_type::value_string))\n                        {\n                            return sax->parse_error(m_lexer.get_position(),\n                                                    m_lexer.get_token_string(),\n                                                    parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, \"object key\"), BasicJsonType()));\n                        }\n                        if (JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string())))\n                        {\n                            return false;\n                        }\n\n                        // parse separator (:)\n                        if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator))\n                        {\n                            return sax->parse_error(m_lexer.get_position(),\n                                                    m_lexer.get_token_string(),\n                                                    parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, \"object separator\"), BasicJsonType()));\n                        }\n\n                        // remember we are now inside an object\n                        states.push_back(false);\n\n                        // parse values\n                        get_token();\n                        continue;\n                    }\n\n                    case token_type::begin_array:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast<std::size_t>(-1))))\n                        {\n                            return false;\n                        }\n\n                        // closing ] -> we are done\n                        if (get_token() == token_type::end_array)\n                        {\n                            if (JSON_HEDLEY_UNLIKELY(!sax->end_array()))\n                            {\n                                return false;\n                            }\n                            break;\n                        }\n\n                        // remember we are now inside an array\n                        states.push_back(true);\n\n                        // parse values (no need to call get_token)\n                        continue;\n                    }\n\n                    case token_type::value_float:\n                    {\n                        const auto res = m_lexer.get_number_float();\n\n                        if (JSON_HEDLEY_UNLIKELY(!std::isfinite(res)))\n                        {\n                            return sax->parse_error(m_lexer.get_position(),\n                                                    m_lexer.get_token_string(),\n                                                    out_of_range::create(406, \"number overflow parsing '\" + m_lexer.get_token_string() + \"'\", BasicJsonType()));\n                        }\n\n                        if (JSON_HEDLEY_UNLIKELY(!sax->number_float(res, m_lexer.get_string())))\n                        {\n                            return false;\n                        }\n\n                        break;\n                    }\n\n                    case token_type::literal_false:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(!sax->boolean(false)))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::literal_null:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(!sax->null()))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::literal_true:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(!sax->boolean(true)))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::value_integer:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(!sax->number_integer(m_lexer.get_number_integer())))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::value_string:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(!sax->string(m_lexer.get_string())))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::value_unsigned:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(!sax->number_unsigned(m_lexer.get_number_unsigned())))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::parse_error:\n                    {\n                        // using \"uninitialized\" to avoid \"expected\" message\n                        return sax->parse_error(m_lexer.get_position(),\n                                                m_lexer.get_token_string(),\n                                                parse_error::create(101, m_lexer.get_position(), exception_message(token_type::uninitialized, \"value\"), BasicJsonType()));\n                    }\n\n                    case token_type::uninitialized:\n                    case token_type::end_array:\n                    case token_type::end_object:\n                    case token_type::name_separator:\n                    case token_type::value_separator:\n                    case token_type::end_of_input:\n                    case token_type::literal_or_value:\n                    default: // the last token was unexpected\n                    {\n                        return sax->parse_error(m_lexer.get_position(),\n                                                m_lexer.get_token_string(),\n                                                parse_error::create(101, m_lexer.get_position(), exception_message(token_type::literal_or_value, \"value\"), BasicJsonType()));\n                    }\n                }\n            }\n            else\n            {\n                skip_to_state_evaluation = false;\n            }\n\n            // we reached this line after we successfully parsed a value\n            if (states.empty())\n            {\n                // empty stack: we reached the end of the hierarchy: done\n                return true;\n            }\n\n            if (states.back())  // array\n            {\n                // comma -> next value\n                if (get_token() == token_type::value_separator)\n                {\n                    // parse a new value\n                    get_token();\n                    continue;\n                }\n\n                // closing ]\n                if (JSON_HEDLEY_LIKELY(last_token == token_type::end_array))\n                {\n                    if (JSON_HEDLEY_UNLIKELY(!sax->end_array()))\n                    {\n                        return false;\n                    }\n\n                    // We are done with this array. Before we can parse a\n                    // new value, we need to evaluate the new state first.\n                    // By setting skip_to_state_evaluation to false, we\n                    // are effectively jumping to the beginning of this if.\n                    JSON_ASSERT(!states.empty());\n                    states.pop_back();\n                    skip_to_state_evaluation = true;\n                    continue;\n                }\n\n                return sax->parse_error(m_lexer.get_position(),\n                                        m_lexer.get_token_string(),\n                                        parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_array, \"array\"), BasicJsonType()));\n            }\n\n            // states.back() is false -> object\n\n            // comma -> next value\n            if (get_token() == token_type::value_separator)\n            {\n                // parse key\n                if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::value_string))\n                {\n                    return sax->parse_error(m_lexer.get_position(),\n                                            m_lexer.get_token_string(),\n                                            parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, \"object key\"), BasicJsonType()));\n                }\n\n                if (JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string())))\n                {\n                    return false;\n                }\n\n                // parse separator (:)\n                if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator))\n                {\n                    return sax->parse_error(m_lexer.get_position(),\n                                            m_lexer.get_token_string(),\n                                            parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, \"object separator\"), BasicJsonType()));\n                }\n\n                // parse values\n                get_token();\n                continue;\n            }\n\n            // closing }\n            if (JSON_HEDLEY_LIKELY(last_token == token_type::end_object))\n            {\n                if (JSON_HEDLEY_UNLIKELY(!sax->end_object()))\n                {\n                    return false;\n                }\n\n                // We are done with this object. Before we can parse a\n                // new value, we need to evaluate the new state first.\n                // By setting skip_to_state_evaluation to false, we\n                // are effectively jumping to the beginning of this if.\n                JSON_ASSERT(!states.empty());\n                states.pop_back();\n                skip_to_state_evaluation = true;\n                continue;\n            }\n\n            return sax->parse_error(m_lexer.get_position(),\n                                    m_lexer.get_token_string(),\n                                    parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_object, \"object\"), BasicJsonType()));\n        }\n    }\n\n    /// get next token from lexer\n    token_type get_token()\n    {\n        return last_token = m_lexer.scan();\n    }\n\n    std::string exception_message(const token_type expected, const std::string& context)\n    {\n        std::string error_msg = \"syntax error \";\n\n        if (!context.empty())\n        {\n            error_msg += \"while parsing \" + context + \" \";\n        }\n\n        error_msg += \"- \";\n\n        if (last_token == token_type::parse_error)\n        {\n            error_msg += std::string(m_lexer.get_error_message()) + \"; last read: '\" +\n                         m_lexer.get_token_string() + \"'\";\n        }\n        else\n        {\n            error_msg += \"unexpected \" + std::string(lexer_t::token_type_name(last_token));\n        }\n\n        if (expected != token_type::uninitialized)\n        {\n            error_msg += \"; expected \" + std::string(lexer_t::token_type_name(expected));\n        }\n\n        return error_msg;\n    }\n\n  private:\n    /// callback function\n    const parser_callback_t<BasicJsonType> callback = nullptr;\n    /// the type of the last read token\n    token_type last_token = token_type::uninitialized;\n    /// the lexer\n    lexer_t m_lexer;\n    /// whether to throw exceptions in case of errors\n    const bool allow_exceptions = true;\n};\n\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/iterators/internal_iterator.hpp>\n\n\n// #include <nlohmann/detail/iterators/primitive_iterator.hpp>\n\n\n#include <cstddef> // ptrdiff_t\n#include <limits>  // numeric_limits\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n/*\n@brief an iterator for primitive JSON types\n\nThis class models an iterator for primitive JSON types (boolean, number,\nstring). It's only purpose is to allow the iterator/const_iterator classes\nto \"iterate\" over primitive values. Internally, the iterator is modeled by\na `difference_type` variable. Value begin_value (`0`) models the begin,\nend_value (`1`) models past the end.\n*/\nclass primitive_iterator_t\n{\n  private:\n    using difference_type = std::ptrdiff_t;\n    static constexpr difference_type begin_value = 0;\n    static constexpr difference_type end_value = begin_value + 1;\n\n  JSON_PRIVATE_UNLESS_TESTED:\n    /// iterator as signed integer type\n    difference_type m_it = (std::numeric_limits<std::ptrdiff_t>::min)();\n\n  public:\n    constexpr difference_type get_value() const noexcept\n    {\n        return m_it;\n    }\n\n    /// set iterator to a defined beginning\n    void set_begin() noexcept\n    {\n        m_it = begin_value;\n    }\n\n    /// set iterator to a defined past the end\n    void set_end() noexcept\n    {\n        m_it = end_value;\n    }\n\n    /// return whether the iterator can be dereferenced\n    constexpr bool is_begin() const noexcept\n    {\n        return m_it == begin_value;\n    }\n\n    /// return whether the iterator is at end\n    constexpr bool is_end() const noexcept\n    {\n        return m_it == end_value;\n    }\n\n    friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept\n    {\n        return lhs.m_it == rhs.m_it;\n    }\n\n    friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept\n    {\n        return lhs.m_it < rhs.m_it;\n    }\n\n    primitive_iterator_t operator+(difference_type n) noexcept\n    {\n        auto result = *this;\n        result += n;\n        return result;\n    }\n\n    friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept\n    {\n        return lhs.m_it - rhs.m_it;\n    }\n\n    primitive_iterator_t& operator++() noexcept\n    {\n        ++m_it;\n        return *this;\n    }\n\n    primitive_iterator_t const operator++(int) noexcept // NOLINT(readability-const-return-type)\n    {\n        auto result = *this;\n        ++m_it;\n        return result;\n    }\n\n    primitive_iterator_t& operator--() noexcept\n    {\n        --m_it;\n        return *this;\n    }\n\n    primitive_iterator_t const operator--(int) noexcept // NOLINT(readability-const-return-type)\n    {\n        auto result = *this;\n        --m_it;\n        return result;\n    }\n\n    primitive_iterator_t& operator+=(difference_type n) noexcept\n    {\n        m_it += n;\n        return *this;\n    }\n\n    primitive_iterator_t& operator-=(difference_type n) noexcept\n    {\n        m_it -= n;\n        return *this;\n    }\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n/*!\n@brief an iterator value\n\n@note This structure could easily be a union, but MSVC currently does not allow\nunions members with complex constructors, see https://github.com/nlohmann/json/pull/105.\n*/\ntemplate<typename BasicJsonType> struct internal_iterator\n{\n    /// iterator for JSON objects\n    typename BasicJsonType::object_t::iterator object_iterator {};\n    /// iterator for JSON arrays\n    typename BasicJsonType::array_t::iterator array_iterator {};\n    /// generic iterator for all other types\n    primitive_iterator_t primitive_iterator {};\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/iterators/iter_impl.hpp>\n\n\n#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next\n#include <type_traits> // conditional, is_const, remove_const\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/iterators/internal_iterator.hpp>\n\n// #include <nlohmann/detail/iterators/primitive_iterator.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n// forward declare, to be able to friend it later on\ntemplate<typename IteratorType> class iteration_proxy;\ntemplate<typename IteratorType> class iteration_proxy_value;\n\n/*!\n@brief a template for a bidirectional iterator for the @ref basic_json class\nThis class implements a both iterators (iterator and const_iterator) for the\n@ref basic_json class.\n@note An iterator is called *initialized* when a pointer to a JSON value has\n      been set (e.g., by a constructor or a copy assignment). If the iterator is\n      default-constructed, it is *uninitialized* and most methods are undefined.\n      **The library uses assertions to detect calls on uninitialized iterators.**\n@requirement The class satisfies the following concept requirements:\n-\n[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator):\n  The iterator that can be moved can be moved in both directions (i.e.\n  incremented and decremented).\n@since version 1.0.0, simplified in version 2.0.9, change to bidirectional\n       iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593)\n*/\ntemplate<typename BasicJsonType>\nclass iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions)\n{\n    /// the iterator with BasicJsonType of different const-ness\n    using other_iter_impl = iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>;\n    /// allow basic_json to access private members\n    friend other_iter_impl;\n    friend BasicJsonType;\n    friend iteration_proxy<iter_impl>;\n    friend iteration_proxy_value<iter_impl>;\n\n    using object_t = typename BasicJsonType::object_t;\n    using array_t = typename BasicJsonType::array_t;\n    // make sure BasicJsonType is basic_json or const basic_json\n    static_assert(is_basic_json<typename std::remove_const<BasicJsonType>::type>::value,\n                  \"iter_impl only accepts (const) basic_json\");\n\n  public:\n\n    /// The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17.\n    /// The C++ Standard has never required user-defined iterators to derive from std::iterator.\n    /// A user-defined iterator should provide publicly accessible typedefs named\n    /// iterator_category, value_type, difference_type, pointer, and reference.\n    /// Note that value_type is required to be non-const, even for constant iterators.\n    using iterator_category = std::bidirectional_iterator_tag;\n\n    /// the type of the values when the iterator is dereferenced\n    using value_type = typename BasicJsonType::value_type;\n    /// a type to represent differences between iterators\n    using difference_type = typename BasicJsonType::difference_type;\n    /// defines a pointer to the type iterated over (value_type)\n    using pointer = typename std::conditional<std::is_const<BasicJsonType>::value,\n          typename BasicJsonType::const_pointer,\n          typename BasicJsonType::pointer>::type;\n    /// defines a reference to the type iterated over (value_type)\n    using reference =\n        typename std::conditional<std::is_const<BasicJsonType>::value,\n        typename BasicJsonType::const_reference,\n        typename BasicJsonType::reference>::type;\n\n    iter_impl() = default;\n    ~iter_impl() = default;\n    iter_impl(iter_impl&&) noexcept = default;\n    iter_impl& operator=(iter_impl&&) noexcept = default;\n\n    /*!\n    @brief constructor for a given JSON instance\n    @param[in] object  pointer to a JSON object for this iterator\n    @pre object != nullptr\n    @post The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    explicit iter_impl(pointer object) noexcept : m_object(object)\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                m_it.object_iterator = typename object_t::iterator();\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_it.array_iterator = typename array_t::iterator();\n                break;\n            }\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                m_it.primitive_iterator = primitive_iterator_t();\n                break;\n            }\n        }\n    }\n\n    /*!\n    @note The conventional copy constructor and copy assignment are implicitly\n          defined. Combined with the following converting constructor and\n          assignment, they support: (1) copy from iterator to iterator, (2)\n          copy from const iterator to const iterator, and (3) conversion from\n          iterator to const iterator. However conversion from const iterator\n          to iterator is not defined.\n    */\n\n    /*!\n    @brief const copy constructor\n    @param[in] other const iterator to copy from\n    @note This copy constructor had to be defined explicitly to circumvent a bug\n          occurring on msvc v19.0 compiler (VS 2015) debug build. For more\n          information refer to: https://github.com/nlohmann/json/issues/1608\n    */\n    iter_impl(const iter_impl<const BasicJsonType>& other) noexcept\n        : m_object(other.m_object), m_it(other.m_it)\n    {}\n\n    /*!\n    @brief converting assignment\n    @param[in] other const iterator to copy from\n    @return const/non-const iterator\n    @note It is not checked whether @a other is initialized.\n    */\n    iter_impl& operator=(const iter_impl<const BasicJsonType>& other) noexcept\n    {\n        if (&other != this)\n        {\n            m_object = other.m_object;\n            m_it = other.m_it;\n        }\n        return *this;\n    }\n\n    /*!\n    @brief converting constructor\n    @param[in] other  non-const iterator to copy from\n    @note It is not checked whether @a other is initialized.\n    */\n    iter_impl(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept\n        : m_object(other.m_object), m_it(other.m_it)\n    {}\n\n    /*!\n    @brief converting assignment\n    @param[in] other  non-const iterator to copy from\n    @return const/non-const iterator\n    @note It is not checked whether @a other is initialized.\n    */\n    iter_impl& operator=(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept // NOLINT(cert-oop54-cpp)\n    {\n        m_object = other.m_object;\n        m_it = other.m_it;\n        return *this;\n    }\n\n  JSON_PRIVATE_UNLESS_TESTED:\n    /*!\n    @brief set the iterator to the first value\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    void set_begin() noexcept\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                m_it.object_iterator = m_object->m_value.object->begin();\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_it.array_iterator = m_object->m_value.array->begin();\n                break;\n            }\n\n            case value_t::null:\n            {\n                // set to end so begin()==end() is true: null is empty\n                m_it.primitive_iterator.set_end();\n                break;\n            }\n\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                m_it.primitive_iterator.set_begin();\n                break;\n            }\n        }\n    }\n\n    /*!\n    @brief set the iterator past the last value\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    void set_end() noexcept\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                m_it.object_iterator = m_object->m_value.object->end();\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_it.array_iterator = m_object->m_value.array->end();\n                break;\n            }\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                m_it.primitive_iterator.set_end();\n                break;\n            }\n        }\n    }\n\n  public:\n    /*!\n    @brief return a reference to the value pointed to by the iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    reference operator*() const\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                JSON_ASSERT(m_it.object_iterator != m_object->m_value.object->end());\n                return m_it.object_iterator->second;\n            }\n\n            case value_t::array:\n            {\n                JSON_ASSERT(m_it.array_iterator != m_object->m_value.array->end());\n                return *m_it.array_iterator;\n            }\n\n            case value_t::null:\n                JSON_THROW(invalid_iterator::create(214, \"cannot get value\", *m_object));\n\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))\n                {\n                    return *m_object;\n                }\n\n                JSON_THROW(invalid_iterator::create(214, \"cannot get value\", *m_object));\n            }\n        }\n    }\n\n    /*!\n    @brief dereference the iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    pointer operator->() const\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                JSON_ASSERT(m_it.object_iterator != m_object->m_value.object->end());\n                return &(m_it.object_iterator->second);\n            }\n\n            case value_t::array:\n            {\n                JSON_ASSERT(m_it.array_iterator != m_object->m_value.array->end());\n                return &*m_it.array_iterator;\n            }\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))\n                {\n                    return m_object;\n                }\n\n                JSON_THROW(invalid_iterator::create(214, \"cannot get value\", *m_object));\n            }\n        }\n    }\n\n    /*!\n    @brief post-increment (it++)\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl const operator++(int) // NOLINT(readability-const-return-type)\n    {\n        auto result = *this;\n        ++(*this);\n        return result;\n    }\n\n    /*!\n    @brief pre-increment (++it)\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl& operator++()\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                std::advance(m_it.object_iterator, 1);\n                break;\n            }\n\n            case value_t::array:\n            {\n                std::advance(m_it.array_iterator, 1);\n                break;\n            }\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                ++m_it.primitive_iterator;\n                break;\n            }\n        }\n\n        return *this;\n    }\n\n    /*!\n    @brief post-decrement (it--)\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl const operator--(int) // NOLINT(readability-const-return-type)\n    {\n        auto result = *this;\n        --(*this);\n        return result;\n    }\n\n    /*!\n    @brief pre-decrement (--it)\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl& operator--()\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                std::advance(m_it.object_iterator, -1);\n                break;\n            }\n\n            case value_t::array:\n            {\n                std::advance(m_it.array_iterator, -1);\n                break;\n            }\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                --m_it.primitive_iterator;\n                break;\n            }\n        }\n\n        return *this;\n    }\n\n    /*!\n    @brief comparison: equal\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    template < typename IterImpl, detail::enable_if_t < (std::is_same<IterImpl, iter_impl>::value || std::is_same<IterImpl, other_iter_impl>::value), std::nullptr_t > = nullptr >\n    bool operator==(const IterImpl& other) const\n    {\n        // if objects are not the same, the comparison is undefined\n        if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(212, \"cannot compare iterators of different containers\", *m_object));\n        }\n\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n                return (m_it.object_iterator == other.m_it.object_iterator);\n\n            case value_t::array:\n                return (m_it.array_iterator == other.m_it.array_iterator);\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n                return (m_it.primitive_iterator == other.m_it.primitive_iterator);\n        }\n    }\n\n    /*!\n    @brief comparison: not equal\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    template < typename IterImpl, detail::enable_if_t < (std::is_same<IterImpl, iter_impl>::value || std::is_same<IterImpl, other_iter_impl>::value), std::nullptr_t > = nullptr >\n    bool operator!=(const IterImpl& other) const\n    {\n        return !operator==(other);\n    }\n\n    /*!\n    @brief comparison: smaller\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    bool operator<(const iter_impl& other) const\n    {\n        // if objects are not the same, the comparison is undefined\n        if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(212, \"cannot compare iterators of different containers\", *m_object));\n        }\n\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n                JSON_THROW(invalid_iterator::create(213, \"cannot compare order of object iterators\", *m_object));\n\n            case value_t::array:\n                return (m_it.array_iterator < other.m_it.array_iterator);\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n                return (m_it.primitive_iterator < other.m_it.primitive_iterator);\n        }\n    }\n\n    /*!\n    @brief comparison: less than or equal\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    bool operator<=(const iter_impl& other) const\n    {\n        return !other.operator < (*this);\n    }\n\n    /*!\n    @brief comparison: greater than\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    bool operator>(const iter_impl& other) const\n    {\n        return !operator<=(other);\n    }\n\n    /*!\n    @brief comparison: greater than or equal\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    bool operator>=(const iter_impl& other) const\n    {\n        return !operator<(other);\n    }\n\n    /*!\n    @brief add to iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl& operator+=(difference_type i)\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n                JSON_THROW(invalid_iterator::create(209, \"cannot use offsets with object iterators\", *m_object));\n\n            case value_t::array:\n            {\n                std::advance(m_it.array_iterator, i);\n                break;\n            }\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                m_it.primitive_iterator += i;\n                break;\n            }\n        }\n\n        return *this;\n    }\n\n    /*!\n    @brief subtract from iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl& operator-=(difference_type i)\n    {\n        return operator+=(-i);\n    }\n\n    /*!\n    @brief add to iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl operator+(difference_type i) const\n    {\n        auto result = *this;\n        result += i;\n        return result;\n    }\n\n    /*!\n    @brief addition of distance and iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    friend iter_impl operator+(difference_type i, const iter_impl& it)\n    {\n        auto result = it;\n        result += i;\n        return result;\n    }\n\n    /*!\n    @brief subtract from iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl operator-(difference_type i) const\n    {\n        auto result = *this;\n        result -= i;\n        return result;\n    }\n\n    /*!\n    @brief return difference\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    difference_type operator-(const iter_impl& other) const\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n                JSON_THROW(invalid_iterator::create(209, \"cannot use offsets with object iterators\", *m_object));\n\n            case value_t::array:\n                return m_it.array_iterator - other.m_it.array_iterator;\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n                return m_it.primitive_iterator - other.m_it.primitive_iterator;\n        }\n    }\n\n    /*!\n    @brief access to successor\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    reference operator[](difference_type n) const\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n                JSON_THROW(invalid_iterator::create(208, \"cannot use operator[] for object iterators\", *m_object));\n\n            case value_t::array:\n                return *std::next(m_it.array_iterator, n);\n\n            case value_t::null:\n                JSON_THROW(invalid_iterator::create(214, \"cannot get value\", *m_object));\n\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.get_value() == -n))\n                {\n                    return *m_object;\n                }\n\n                JSON_THROW(invalid_iterator::create(214, \"cannot get value\", *m_object));\n            }\n        }\n    }\n\n    /*!\n    @brief return the key of an object iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    const typename object_t::key_type& key() const\n    {\n        JSON_ASSERT(m_object != nullptr);\n\n        if (JSON_HEDLEY_LIKELY(m_object->is_object()))\n        {\n            return m_it.object_iterator->first;\n        }\n\n        JSON_THROW(invalid_iterator::create(207, \"cannot use key() for non-object iterators\", *m_object));\n    }\n\n    /*!\n    @brief return the value of an iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    reference value() const\n    {\n        return operator*();\n    }\n\n  JSON_PRIVATE_UNLESS_TESTED:\n    /// associated JSON instance\n    pointer m_object = nullptr;\n    /// the actual iterator of the associated instance\n    internal_iterator<typename std::remove_const<BasicJsonType>::type> m_it {};\n};\n} // namespace detail\n} // namespace nlohmann\n\n// #include <nlohmann/detail/iterators/iteration_proxy.hpp>\n\n// #include <nlohmann/detail/iterators/json_reverse_iterator.hpp>\n\n\n#include <cstddef> // ptrdiff_t\n#include <iterator> // reverse_iterator\n#include <utility> // declval\n\nnamespace nlohmann\n{\nnamespace detail\n{\n//////////////////////\n// reverse_iterator //\n//////////////////////\n\n/*!\n@brief a template for a reverse iterator class\n\n@tparam Base the base iterator type to reverse. Valid types are @ref\niterator (to create @ref reverse_iterator) and @ref const_iterator (to\ncreate @ref const_reverse_iterator).\n\n@requirement The class satisfies the following concept requirements:\n-\n[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator):\n  The iterator that can be moved can be moved in both directions (i.e.\n  incremented and decremented).\n- [OutputIterator](https://en.cppreference.com/w/cpp/named_req/OutputIterator):\n  It is possible to write to the pointed-to element (only if @a Base is\n  @ref iterator).\n\n@since version 1.0.0\n*/\ntemplate<typename Base>\nclass json_reverse_iterator : public std::reverse_iterator<Base>\n{\n  public:\n    using difference_type = std::ptrdiff_t;\n    /// shortcut to the reverse iterator adapter\n    using base_iterator = std::reverse_iterator<Base>;\n    /// the reference type for the pointed-to element\n    using reference = typename Base::reference;\n\n    /// create reverse iterator from iterator\n    explicit json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept\n        : base_iterator(it) {}\n\n    /// create reverse iterator from base class\n    explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {}\n\n    /// post-increment (it++)\n    json_reverse_iterator const operator++(int) // NOLINT(readability-const-return-type)\n    {\n        return static_cast<json_reverse_iterator>(base_iterator::operator++(1));\n    }\n\n    /// pre-increment (++it)\n    json_reverse_iterator& operator++()\n    {\n        return static_cast<json_reverse_iterator&>(base_iterator::operator++());\n    }\n\n    /// post-decrement (it--)\n    json_reverse_iterator const operator--(int) // NOLINT(readability-const-return-type)\n    {\n        return static_cast<json_reverse_iterator>(base_iterator::operator--(1));\n    }\n\n    /// pre-decrement (--it)\n    json_reverse_iterator& operator--()\n    {\n        return static_cast<json_reverse_iterator&>(base_iterator::operator--());\n    }\n\n    /// add to iterator\n    json_reverse_iterator& operator+=(difference_type i)\n    {\n        return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i));\n    }\n\n    /// add to iterator\n    json_reverse_iterator operator+(difference_type i) const\n    {\n        return static_cast<json_reverse_iterator>(base_iterator::operator+(i));\n    }\n\n    /// subtract from iterator\n    json_reverse_iterator operator-(difference_type i) const\n    {\n        return static_cast<json_reverse_iterator>(base_iterator::operator-(i));\n    }\n\n    /// return difference\n    difference_type operator-(const json_reverse_iterator& other) const\n    {\n        return base_iterator(*this) - base_iterator(other);\n    }\n\n    /// access to successor\n    reference operator[](difference_type n) const\n    {\n        return *(this->operator+(n));\n    }\n\n    /// return the key of an object iterator\n    auto key() const -> decltype(std::declval<Base>().key())\n    {\n        auto it = --this->base();\n        return it.key();\n    }\n\n    /// return the value of an iterator\n    reference value() const\n    {\n        auto it = --this->base();\n        return it.operator * ();\n    }\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/iterators/primitive_iterator.hpp>\n\n// #include <nlohmann/detail/json_pointer.hpp>\n\n\n#include <algorithm> // all_of\n#include <cctype> // isdigit\n#include <limits> // max\n#include <numeric> // accumulate\n#include <string> // string\n#include <utility> // move\n#include <vector> // vector\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/string_escape.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\n\n/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document\n/// @sa https://json.nlohmann.me/api/json_pointer/\ntemplate<typename BasicJsonType>\nclass json_pointer\n{\n    // allow basic_json to access private members\n    NLOHMANN_BASIC_JSON_TPL_DECLARATION\n    friend class basic_json;\n\n  public:\n    /// @brief create JSON pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/json_pointer/\n    explicit json_pointer(const std::string& s = \"\")\n        : reference_tokens(split(s))\n    {}\n\n    /// @brief return a string representation of the JSON pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/to_string/\n    std::string to_string() const\n    {\n        return std::accumulate(reference_tokens.begin(), reference_tokens.end(),\n                               std::string{},\n                               [](const std::string & a, const std::string & b)\n        {\n            return a + \"/\" + detail::escape(b);\n        });\n    }\n\n    /// @brief return a string representation of the JSON pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/operator_string/\n    operator std::string() const\n    {\n        return to_string();\n    }\n\n    /// @brief append another JSON pointer at the end of this JSON pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/\n    json_pointer& operator/=(const json_pointer& ptr)\n    {\n        reference_tokens.insert(reference_tokens.end(),\n                                ptr.reference_tokens.begin(),\n                                ptr.reference_tokens.end());\n        return *this;\n    }\n\n    /// @brief append an unescaped reference token at the end of this JSON pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/\n    json_pointer& operator/=(std::string token)\n    {\n        push_back(std::move(token));\n        return *this;\n    }\n\n    /// @brief append an array index at the end of this JSON pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/\n    json_pointer& operator/=(std::size_t array_idx)\n    {\n        return *this /= std::to_string(array_idx);\n    }\n\n    /// @brief create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/\n    friend json_pointer operator/(const json_pointer& lhs,\n                                  const json_pointer& rhs)\n    {\n        return json_pointer(lhs) /= rhs;\n    }\n\n    /// @brief create a new JSON pointer by appending the unescaped token at the end of the JSON pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/\n    friend json_pointer operator/(const json_pointer& lhs, std::string token) // NOLINT(performance-unnecessary-value-param)\n    {\n        return json_pointer(lhs) /= std::move(token);\n    }\n\n    /// @brief create a new JSON pointer by appending the array-index-token at the end of the JSON pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/\n    friend json_pointer operator/(const json_pointer& lhs, std::size_t array_idx)\n    {\n        return json_pointer(lhs) /= array_idx;\n    }\n\n    /// @brief returns the parent of this JSON pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/parent_pointer/\n    json_pointer parent_pointer() const\n    {\n        if (empty())\n        {\n            return *this;\n        }\n\n        json_pointer res = *this;\n        res.pop_back();\n        return res;\n    }\n\n    /// @brief remove last reference token\n    /// @sa https://json.nlohmann.me/api/json_pointer/pop_back/\n    void pop_back()\n    {\n        if (JSON_HEDLEY_UNLIKELY(empty()))\n        {\n            JSON_THROW(detail::out_of_range::create(405, \"JSON pointer has no parent\", BasicJsonType()));\n        }\n\n        reference_tokens.pop_back();\n    }\n\n    /// @brief return last reference token\n    /// @sa https://json.nlohmann.me/api/json_pointer/back/\n    const std::string& back() const\n    {\n        if (JSON_HEDLEY_UNLIKELY(empty()))\n        {\n            JSON_THROW(detail::out_of_range::create(405, \"JSON pointer has no parent\", BasicJsonType()));\n        }\n\n        return reference_tokens.back();\n    }\n\n    /// @brief append an unescaped token at the end of the reference pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/push_back/\n    void push_back(const std::string& token)\n    {\n        reference_tokens.push_back(token);\n    }\n\n    /// @brief append an unescaped token at the end of the reference pointer\n    /// @sa https://json.nlohmann.me/api/json_pointer/push_back/\n    void push_back(std::string&& token)\n    {\n        reference_tokens.push_back(std::move(token));\n    }\n\n    /// @brief return whether pointer points to the root document\n    /// @sa https://json.nlohmann.me/api/json_pointer/empty/\n    bool empty() const noexcept\n    {\n        return reference_tokens.empty();\n    }\n\n  private:\n    /*!\n    @param[in] s  reference token to be converted into an array index\n\n    @return integer representation of @a s\n\n    @throw parse_error.106  if an array index begins with '0'\n    @throw parse_error.109  if an array index begins not with a digit\n    @throw out_of_range.404 if string @a s could not be converted to an integer\n    @throw out_of_range.410 if an array index exceeds size_type\n    */\n    static typename BasicJsonType::size_type array_index(const std::string& s)\n    {\n        using size_type = typename BasicJsonType::size_type;\n\n        // error condition (cf. RFC 6901, Sect. 4)\n        if (JSON_HEDLEY_UNLIKELY(s.size() > 1 && s[0] == '0'))\n        {\n            JSON_THROW(detail::parse_error::create(106, 0, \"array index '\" + s + \"' must not begin with '0'\", BasicJsonType()));\n        }\n\n        // error condition (cf. RFC 6901, Sect. 4)\n        if (JSON_HEDLEY_UNLIKELY(s.size() > 1 && !(s[0] >= '1' && s[0] <= '9')))\n        {\n            JSON_THROW(detail::parse_error::create(109, 0, \"array index '\" + s + \"' is not a number\", BasicJsonType()));\n        }\n\n        std::size_t processed_chars = 0;\n        unsigned long long res = 0;  // NOLINT(runtime/int)\n        JSON_TRY\n        {\n            res = std::stoull(s, &processed_chars);\n        }\n        JSON_CATCH(std::out_of_range&)\n        {\n            JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + s + \"'\", BasicJsonType()));\n        }\n\n        // check if the string was completely read\n        if (JSON_HEDLEY_UNLIKELY(processed_chars != s.size()))\n        {\n            JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + s + \"'\", BasicJsonType()));\n        }\n\n        // only triggered on special platforms (like 32bit), see also\n        // https://github.com/nlohmann/json/pull/2203\n        if (res >= static_cast<unsigned long long>((std::numeric_limits<size_type>::max)()))  // NOLINT(runtime/int)\n        {\n            JSON_THROW(detail::out_of_range::create(410, \"array index \" + s + \" exceeds size_type\", BasicJsonType())); // LCOV_EXCL_LINE\n        }\n\n        return static_cast<size_type>(res);\n    }\n\n  JSON_PRIVATE_UNLESS_TESTED:\n    json_pointer top() const\n    {\n        if (JSON_HEDLEY_UNLIKELY(empty()))\n        {\n            JSON_THROW(detail::out_of_range::create(405, \"JSON pointer has no parent\", BasicJsonType()));\n        }\n\n        json_pointer result = *this;\n        result.reference_tokens = {reference_tokens[0]};\n        return result;\n    }\n\n  private:\n    /*!\n    @brief create and return a reference to the pointed to value\n\n    @complexity Linear in the number of reference tokens.\n\n    @throw parse_error.109 if array index is not a number\n    @throw type_error.313 if value cannot be unflattened\n    */\n    BasicJsonType& get_and_create(BasicJsonType& j) const\n    {\n        auto* result = &j;\n\n        // in case no reference tokens exist, return a reference to the JSON value\n        // j which will be overwritten by a primitive value\n        for (const auto& reference_token : reference_tokens)\n        {\n            switch (result->type())\n            {\n                case detail::value_t::null:\n                {\n                    if (reference_token == \"0\")\n                    {\n                        // start a new array if reference token is 0\n                        result = &result->operator[](0);\n                    }\n                    else\n                    {\n                        // start a new object otherwise\n                        result = &result->operator[](reference_token);\n                    }\n                    break;\n                }\n\n                case detail::value_t::object:\n                {\n                    // create an entry in the object\n                    result = &result->operator[](reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    // create an entry in the array\n                    result = &result->operator[](array_index(reference_token));\n                    break;\n                }\n\n                /*\n                The following code is only reached if there exists a reference\n                token _and_ the current value is primitive. In this case, we have\n                an error situation, because primitive values may only occur as\n                single value; that is, with an empty list of reference tokens.\n                */\n                case detail::value_t::string:\n                case detail::value_t::boolean:\n                case detail::value_t::number_integer:\n                case detail::value_t::number_unsigned:\n                case detail::value_t::number_float:\n                case detail::value_t::binary:\n                case detail::value_t::discarded:\n                default:\n                    JSON_THROW(detail::type_error::create(313, \"invalid value to unflatten\", j));\n            }\n        }\n\n        return *result;\n    }\n\n    /*!\n    @brief return a reference to the pointed to value\n\n    @note This version does not throw if a value is not present, but tries to\n          create nested values instead. For instance, calling this function\n          with pointer `\"/this/that\"` on a null value is equivalent to calling\n          `operator[](\"this\").operator[](\"that\")` on that value, effectively\n          changing the null value to an object.\n\n    @param[in] ptr  a JSON value\n\n    @return reference to the JSON value pointed to by the JSON pointer\n\n    @complexity Linear in the length of the JSON pointer.\n\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    @throw out_of_range.404  if the JSON pointer can not be resolved\n    */\n    BasicJsonType& get_unchecked(BasicJsonType* ptr) const\n    {\n        for (const auto& reference_token : reference_tokens)\n        {\n            // convert null values to arrays or objects before continuing\n            if (ptr->is_null())\n            {\n                // check if reference token is a number\n                const bool nums =\n                    std::all_of(reference_token.begin(), reference_token.end(),\n                                [](const unsigned char x)\n                {\n                    return std::isdigit(x);\n                });\n\n                // change value to array for numbers or \"-\" or to object otherwise\n                *ptr = (nums || reference_token == \"-\")\n                       ? detail::value_t::array\n                       : detail::value_t::object;\n            }\n\n            switch (ptr->type())\n            {\n                case detail::value_t::object:\n                {\n                    // use unchecked object access\n                    ptr = &ptr->operator[](reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    if (reference_token == \"-\")\n                    {\n                        // explicitly treat \"-\" as index beyond the end\n                        ptr = &ptr->operator[](ptr->m_value.array->size());\n                    }\n                    else\n                    {\n                        // convert array index to number; unchecked access\n                        ptr = &ptr->operator[](array_index(reference_token));\n                    }\n                    break;\n                }\n\n                case detail::value_t::null:\n                case detail::value_t::string:\n                case detail::value_t::boolean:\n                case detail::value_t::number_integer:\n                case detail::value_t::number_unsigned:\n                case detail::value_t::number_float:\n                case detail::value_t::binary:\n                case detail::value_t::discarded:\n                default:\n                    JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + reference_token + \"'\", *ptr));\n            }\n        }\n\n        return *ptr;\n    }\n\n    /*!\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    @throw out_of_range.402  if the array index '-' is used\n    @throw out_of_range.404  if the JSON pointer can not be resolved\n    */\n    BasicJsonType& get_checked(BasicJsonType* ptr) const\n    {\n        for (const auto& reference_token : reference_tokens)\n        {\n            switch (ptr->type())\n            {\n                case detail::value_t::object:\n                {\n                    // note: at performs range check\n                    ptr = &ptr->at(reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(reference_token == \"-\"))\n                    {\n                        // \"-\" always fails the range check\n                        JSON_THROW(detail::out_of_range::create(402,\n                                                                \"array index '-' (\" + std::to_string(ptr->m_value.array->size()) +\n                                                                \") is out of range\", *ptr));\n                    }\n\n                    // note: at performs range check\n                    ptr = &ptr->at(array_index(reference_token));\n                    break;\n                }\n\n                case detail::value_t::null:\n                case detail::value_t::string:\n                case detail::value_t::boolean:\n                case detail::value_t::number_integer:\n                case detail::value_t::number_unsigned:\n                case detail::value_t::number_float:\n                case detail::value_t::binary:\n                case detail::value_t::discarded:\n                default:\n                    JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + reference_token + \"'\", *ptr));\n            }\n        }\n\n        return *ptr;\n    }\n\n    /*!\n    @brief return a const reference to the pointed to value\n\n    @param[in] ptr  a JSON value\n\n    @return const reference to the JSON value pointed to by the JSON\n    pointer\n\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    @throw out_of_range.402  if the array index '-' is used\n    @throw out_of_range.404  if the JSON pointer can not be resolved\n    */\n    const BasicJsonType& get_unchecked(const BasicJsonType* ptr) const\n    {\n        for (const auto& reference_token : reference_tokens)\n        {\n            switch (ptr->type())\n            {\n                case detail::value_t::object:\n                {\n                    // use unchecked object access\n                    ptr = &ptr->operator[](reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(reference_token == \"-\"))\n                    {\n                        // \"-\" cannot be used for const access\n                        JSON_THROW(detail::out_of_range::create(402, \"array index '-' (\" + std::to_string(ptr->m_value.array->size()) + \") is out of range\", *ptr));\n                    }\n\n                    // use unchecked array access\n                    ptr = &ptr->operator[](array_index(reference_token));\n                    break;\n                }\n\n                case detail::value_t::null:\n                case detail::value_t::string:\n                case detail::value_t::boolean:\n                case detail::value_t::number_integer:\n                case detail::value_t::number_unsigned:\n                case detail::value_t::number_float:\n                case detail::value_t::binary:\n                case detail::value_t::discarded:\n                default:\n                    JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + reference_token + \"'\", *ptr));\n            }\n        }\n\n        return *ptr;\n    }\n\n    /*!\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    @throw out_of_range.402  if the array index '-' is used\n    @throw out_of_range.404  if the JSON pointer can not be resolved\n    */\n    const BasicJsonType& get_checked(const BasicJsonType* ptr) const\n    {\n        for (const auto& reference_token : reference_tokens)\n        {\n            switch (ptr->type())\n            {\n                case detail::value_t::object:\n                {\n                    // note: at performs range check\n                    ptr = &ptr->at(reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(reference_token == \"-\"))\n                    {\n                        // \"-\" always fails the range check\n                        JSON_THROW(detail::out_of_range::create(402,\n                                                                \"array index '-' (\" + std::to_string(ptr->m_value.array->size()) +\n                                                                \") is out of range\", *ptr));\n                    }\n\n                    // note: at performs range check\n                    ptr = &ptr->at(array_index(reference_token));\n                    break;\n                }\n\n                case detail::value_t::null:\n                case detail::value_t::string:\n                case detail::value_t::boolean:\n                case detail::value_t::number_integer:\n                case detail::value_t::number_unsigned:\n                case detail::value_t::number_float:\n                case detail::value_t::binary:\n                case detail::value_t::discarded:\n                default:\n                    JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + reference_token + \"'\", *ptr));\n            }\n        }\n\n        return *ptr;\n    }\n\n    /*!\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    */\n    bool contains(const BasicJsonType* ptr) const\n    {\n        for (const auto& reference_token : reference_tokens)\n        {\n            switch (ptr->type())\n            {\n                case detail::value_t::object:\n                {\n                    if (!ptr->contains(reference_token))\n                    {\n                        // we did not find the key in the object\n                        return false;\n                    }\n\n                    ptr = &ptr->operator[](reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(reference_token == \"-\"))\n                    {\n                        // \"-\" always fails the range check\n                        return false;\n                    }\n                    if (JSON_HEDLEY_UNLIKELY(reference_token.size() == 1 && !(\"0\" <= reference_token && reference_token <= \"9\")))\n                    {\n                        // invalid char\n                        return false;\n                    }\n                    if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1))\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(!('1' <= reference_token[0] && reference_token[0] <= '9')))\n                        {\n                            // first char should be between '1' and '9'\n                            return false;\n                        }\n                        for (std::size_t i = 1; i < reference_token.size(); i++)\n                        {\n                            if (JSON_HEDLEY_UNLIKELY(!('0' <= reference_token[i] && reference_token[i] <= '9')))\n                            {\n                                // other char should be between '0' and '9'\n                                return false;\n                            }\n                        }\n                    }\n\n                    const auto idx = array_index(reference_token);\n                    if (idx >= ptr->size())\n                    {\n                        // index out of range\n                        return false;\n                    }\n\n                    ptr = &ptr->operator[](idx);\n                    break;\n                }\n\n                case detail::value_t::null:\n                case detail::value_t::string:\n                case detail::value_t::boolean:\n                case detail::value_t::number_integer:\n                case detail::value_t::number_unsigned:\n                case detail::value_t::number_float:\n                case detail::value_t::binary:\n                case detail::value_t::discarded:\n                default:\n                {\n                    // we do not expect primitive values if there is still a\n                    // reference token to process\n                    return false;\n                }\n            }\n        }\n\n        // no reference token left means we found a primitive value\n        return true;\n    }\n\n    /*!\n    @brief split the string input to reference tokens\n\n    @note This function is only called by the json_pointer constructor.\n          All exceptions below are documented there.\n\n    @throw parse_error.107  if the pointer is not empty or begins with '/'\n    @throw parse_error.108  if character '~' is not followed by '0' or '1'\n    */\n    static std::vector<std::string> split(const std::string& reference_string)\n    {\n        std::vector<std::string> result;\n\n        // special case: empty reference string -> no reference tokens\n        if (reference_string.empty())\n        {\n            return result;\n        }\n\n        // check if nonempty reference string begins with slash\n        if (JSON_HEDLEY_UNLIKELY(reference_string[0] != '/'))\n        {\n            JSON_THROW(detail::parse_error::create(107, 1, \"JSON pointer must be empty or begin with '/' - was: '\" + reference_string + \"'\", BasicJsonType()));\n        }\n\n        // extract the reference tokens:\n        // - slash: position of the last read slash (or end of string)\n        // - start: position after the previous slash\n        for (\n            // search for the first slash after the first character\n            std::size_t slash = reference_string.find_first_of('/', 1),\n            // set the beginning of the first reference token\n            start = 1;\n            // we can stop if start == 0 (if slash == std::string::npos)\n            start != 0;\n            // set the beginning of the next reference token\n            // (will eventually be 0 if slash == std::string::npos)\n            start = (slash == std::string::npos) ? 0 : slash + 1,\n            // find next slash\n            slash = reference_string.find_first_of('/', start))\n        {\n            // use the text between the beginning of the reference token\n            // (start) and the last slash (slash).\n            auto reference_token = reference_string.substr(start, slash - start);\n\n            // check reference tokens are properly escaped\n            for (std::size_t pos = reference_token.find_first_of('~');\n                    pos != std::string::npos;\n                    pos = reference_token.find_first_of('~', pos + 1))\n            {\n                JSON_ASSERT(reference_token[pos] == '~');\n\n                // ~ must be followed by 0 or 1\n                if (JSON_HEDLEY_UNLIKELY(pos == reference_token.size() - 1 ||\n                                         (reference_token[pos + 1] != '0' &&\n                                          reference_token[pos + 1] != '1')))\n                {\n                    JSON_THROW(detail::parse_error::create(108, 0, \"escape character '~' must be followed with '0' or '1'\", BasicJsonType()));\n                }\n            }\n\n            // finally, store the reference token\n            detail::unescape(reference_token);\n            result.push_back(reference_token);\n        }\n\n        return result;\n    }\n\n  private:\n    /*!\n    @param[in] reference_string  the reference string to the current value\n    @param[in] value             the value to consider\n    @param[in,out] result        the result object to insert values to\n\n    @note Empty objects or arrays are flattened to `null`.\n    */\n    static void flatten(const std::string& reference_string,\n                        const BasicJsonType& value,\n                        BasicJsonType& result)\n    {\n        switch (value.type())\n        {\n            case detail::value_t::array:\n            {\n                if (value.m_value.array->empty())\n                {\n                    // flatten empty array as null\n                    result[reference_string] = nullptr;\n                }\n                else\n                {\n                    // iterate array and use index as reference string\n                    for (std::size_t i = 0; i < value.m_value.array->size(); ++i)\n                    {\n                        flatten(reference_string + \"/\" + std::to_string(i),\n                                value.m_value.array->operator[](i), result);\n                    }\n                }\n                break;\n            }\n\n            case detail::value_t::object:\n            {\n                if (value.m_value.object->empty())\n                {\n                    // flatten empty object as null\n                    result[reference_string] = nullptr;\n                }\n                else\n                {\n                    // iterate object and use keys as reference string\n                    for (const auto& element : *value.m_value.object)\n                    {\n                        flatten(reference_string + \"/\" + detail::escape(element.first), element.second, result);\n                    }\n                }\n                break;\n            }\n\n            case detail::value_t::null:\n            case detail::value_t::string:\n            case detail::value_t::boolean:\n            case detail::value_t::number_integer:\n            case detail::value_t::number_unsigned:\n            case detail::value_t::number_float:\n            case detail::value_t::binary:\n            case detail::value_t::discarded:\n            default:\n            {\n                // add primitive value with its reference string\n                result[reference_string] = value;\n                break;\n            }\n        }\n    }\n\n    /*!\n    @param[in] value  flattened JSON\n\n    @return unflattened JSON\n\n    @throw parse_error.109 if array index is not a number\n    @throw type_error.314  if value is not an object\n    @throw type_error.315  if object values are not primitive\n    @throw type_error.313  if value cannot be unflattened\n    */\n    static BasicJsonType\n    unflatten(const BasicJsonType& value)\n    {\n        if (JSON_HEDLEY_UNLIKELY(!value.is_object()))\n        {\n            JSON_THROW(detail::type_error::create(314, \"only objects can be unflattened\", value));\n        }\n\n        BasicJsonType result;\n\n        // iterate the JSON object values\n        for (const auto& element : *value.m_value.object)\n        {\n            if (JSON_HEDLEY_UNLIKELY(!element.second.is_primitive()))\n            {\n                JSON_THROW(detail::type_error::create(315, \"values in object must be primitive\", element.second));\n            }\n\n            // assign value to reference pointed to by JSON pointer; Note that if\n            // the JSON pointer is \"\" (i.e., points to the whole value), function\n            // get_and_create returns a reference to result itself. An assignment\n            // will then create a primitive value.\n            json_pointer(element.first).get_and_create(result) = element.second;\n        }\n\n        return result;\n    }\n\n    /*!\n    @brief compares two JSON pointers for equality\n\n    @param[in] lhs  JSON pointer to compare\n    @param[in] rhs  JSON pointer to compare\n    @return whether @a lhs is equal to @a rhs\n\n    @complexity Linear in the length of the JSON pointer\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n    */\n    friend bool operator==(json_pointer const& lhs,\n                           json_pointer const& rhs) noexcept\n    {\n        return lhs.reference_tokens == rhs.reference_tokens;\n    }\n\n    /*!\n    @brief compares two JSON pointers for inequality\n\n    @param[in] lhs  JSON pointer to compare\n    @param[in] rhs  JSON pointer to compare\n    @return whether @a lhs is not equal @a rhs\n\n    @complexity Linear in the length of the JSON pointer\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n    */\n    friend bool operator!=(json_pointer const& lhs,\n                           json_pointer const& rhs) noexcept\n    {\n        return !(lhs == rhs);\n    }\n\n    /// the reference tokens\n    std::vector<std::string> reference_tokens;\n};\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/json_ref.hpp>\n\n\n#include <initializer_list>\n#include <utility>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate<typename BasicJsonType>\nclass json_ref\n{\n  public:\n    using value_type = BasicJsonType;\n\n    json_ref(value_type&& value)\n        : owned_value(std::move(value))\n    {}\n\n    json_ref(const value_type& value)\n        : value_ref(&value)\n    {}\n\n    json_ref(std::initializer_list<json_ref> init)\n        : owned_value(init)\n    {}\n\n    template <\n        class... Args,\n        enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 >\n    json_ref(Args && ... args)\n        : owned_value(std::forward<Args>(args)...)\n    {}\n\n    // class should be movable only\n    json_ref(json_ref&&) noexcept = default;\n    json_ref(const json_ref&) = delete;\n    json_ref& operator=(const json_ref&) = delete;\n    json_ref& operator=(json_ref&&) = delete;\n    ~json_ref() = default;\n\n    value_type moved_or_copied() const\n    {\n        if (value_ref == nullptr)\n        {\n            return std::move(owned_value);\n        }\n        return *value_ref;\n    }\n\n    value_type const& operator*() const\n    {\n        return value_ref ? *value_ref : owned_value;\n    }\n\n    value_type const* operator->() const\n    {\n        return &** this;\n    }\n\n  private:\n    mutable value_type owned_value = nullptr;\n    value_type const* value_ref = nullptr;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/string_escape.hpp>\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n// #include <nlohmann/detail/output/binary_writer.hpp>\n\n\n#include <algorithm> // reverse\n#include <array> // array\n#include <cmath> // isnan, isinf\n#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t\n#include <cstring> // memcpy\n#include <limits> // numeric_limits\n#include <string> // string\n#include <utility> // move\n\n// #include <nlohmann/detail/input/binary_reader.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/output/output_adapters.hpp>\n\n\n#include <algorithm> // copy\n#include <cstddef> // size_t\n#include <iterator> // back_inserter\n#include <memory> // shared_ptr, make_shared\n#include <string> // basic_string\n#include <vector> // vector\n\n#ifndef JSON_NO_IO\n    #include <ios>      // streamsize\n    #include <ostream>  // basic_ostream\n#endif  // JSON_NO_IO\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n/// abstract output adapter interface\ntemplate<typename CharType> struct output_adapter_protocol\n{\n    virtual void write_character(CharType c) = 0;\n    virtual void write_characters(const CharType* s, std::size_t length) = 0;\n    virtual ~output_adapter_protocol() = default;\n\n    output_adapter_protocol() = default;\n    output_adapter_protocol(const output_adapter_protocol&) = default;\n    output_adapter_protocol(output_adapter_protocol&&) noexcept = default;\n    output_adapter_protocol& operator=(const output_adapter_protocol&) = default;\n    output_adapter_protocol& operator=(output_adapter_protocol&&) noexcept = default;\n};\n\n/// a type to simplify interfaces\ntemplate<typename CharType>\nusing output_adapter_t = std::shared_ptr<output_adapter_protocol<CharType>>;\n\n/// output adapter for byte vectors\ntemplate<typename CharType, typename AllocatorType = std::allocator<CharType>>\nclass output_vector_adapter : public output_adapter_protocol<CharType>\n{\n  public:\n    explicit output_vector_adapter(std::vector<CharType, AllocatorType>& vec) noexcept\n        : v(vec)\n    {}\n\n    void write_character(CharType c) override\n    {\n        v.push_back(c);\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    void write_characters(const CharType* s, std::size_t length) override\n    {\n        std::copy(s, s + length, std::back_inserter(v));\n    }\n\n  private:\n    std::vector<CharType, AllocatorType>& v;\n};\n\n#ifndef JSON_NO_IO\n/// output adapter for output streams\ntemplate<typename CharType>\nclass output_stream_adapter : public output_adapter_protocol<CharType>\n{\n  public:\n    explicit output_stream_adapter(std::basic_ostream<CharType>& s) noexcept\n        : stream(s)\n    {}\n\n    void write_character(CharType c) override\n    {\n        stream.put(c);\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    void write_characters(const CharType* s, std::size_t length) override\n    {\n        stream.write(s, static_cast<std::streamsize>(length));\n    }\n\n  private:\n    std::basic_ostream<CharType>& stream;\n};\n#endif  // JSON_NO_IO\n\n/// output adapter for basic_string\ntemplate<typename CharType, typename StringType = std::basic_string<CharType>>\nclass output_string_adapter : public output_adapter_protocol<CharType>\n{\n  public:\n    explicit output_string_adapter(StringType& s) noexcept\n        : str(s)\n    {}\n\n    void write_character(CharType c) override\n    {\n        str.push_back(c);\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    void write_characters(const CharType* s, std::size_t length) override\n    {\n        str.append(s, length);\n    }\n\n  private:\n    StringType& str;\n};\n\ntemplate<typename CharType, typename StringType = std::basic_string<CharType>>\nclass output_adapter\n{\n  public:\n    template<typename AllocatorType = std::allocator<CharType>>\n    output_adapter(std::vector<CharType, AllocatorType>& vec)\n        : oa(std::make_shared<output_vector_adapter<CharType, AllocatorType>>(vec)) {}\n\n#ifndef JSON_NO_IO\n    output_adapter(std::basic_ostream<CharType>& s)\n        : oa(std::make_shared<output_stream_adapter<CharType>>(s)) {}\n#endif  // JSON_NO_IO\n\n    output_adapter(StringType& s)\n        : oa(std::make_shared<output_string_adapter<CharType, StringType>>(s)) {}\n\n    operator output_adapter_t<CharType>()\n    {\n        return oa;\n    }\n\n  private:\n    output_adapter_t<CharType> oa = nullptr;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n///////////////////\n// binary writer //\n///////////////////\n\n/*!\n@brief serialization to CBOR and MessagePack values\n*/\ntemplate<typename BasicJsonType, typename CharType>\nclass binary_writer\n{\n    using string_t = typename BasicJsonType::string_t;\n    using binary_t = typename BasicJsonType::binary_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n\n  public:\n    /*!\n    @brief create a binary writer\n\n    @param[in] adapter  output adapter to write to\n    */\n    explicit binary_writer(output_adapter_t<CharType> adapter) : oa(std::move(adapter))\n    {\n        JSON_ASSERT(oa);\n    }\n\n    /*!\n    @param[in] j  JSON value to serialize\n    @pre       j.type() == value_t::object\n    */\n    void write_bson(const BasicJsonType& j)\n    {\n        switch (j.type())\n        {\n            case value_t::object:\n            {\n                write_bson_object(*j.m_value.object);\n                break;\n            }\n\n            case value_t::null:\n            case value_t::array:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                JSON_THROW(type_error::create(317, \"to serialize to BSON, top-level type must be object, but is \" + std::string(j.type_name()), j));\n            }\n        }\n    }\n\n    /*!\n    @param[in] j  JSON value to serialize\n    */\n    void write_cbor(const BasicJsonType& j)\n    {\n        switch (j.type())\n        {\n            case value_t::null:\n            {\n                oa->write_character(to_char_type(0xF6));\n                break;\n            }\n\n            case value_t::boolean:\n            {\n                oa->write_character(j.m_value.boolean\n                                    ? to_char_type(0xF5)\n                                    : to_char_type(0xF4));\n                break;\n            }\n\n            case value_t::number_integer:\n            {\n                if (j.m_value.number_integer >= 0)\n                {\n                    // CBOR does not differentiate between positive signed\n                    // integers and unsigned integers. Therefore, we used the\n                    // code from the value_t::number_unsigned case here.\n                    if (j.m_value.number_integer <= 0x17)\n                    {\n                        write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x18));\n                        write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer <= (std::numeric_limits<std::uint16_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x19));\n                        write_number(static_cast<std::uint16_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer <= (std::numeric_limits<std::uint32_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x1A));\n                        write_number(static_cast<std::uint32_t>(j.m_value.number_integer));\n                    }\n                    else\n                    {\n                        oa->write_character(to_char_type(0x1B));\n                        write_number(static_cast<std::uint64_t>(j.m_value.number_integer));\n                    }\n                }\n                else\n                {\n                    // The conversions below encode the sign in the first\n                    // byte, and the value is converted to a positive number.\n                    const auto positive_number = -1 - j.m_value.number_integer;\n                    if (j.m_value.number_integer >= -24)\n                    {\n                        write_number(static_cast<std::uint8_t>(0x20 + positive_number));\n                    }\n                    else if (positive_number <= (std::numeric_limits<std::uint8_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x38));\n                        write_number(static_cast<std::uint8_t>(positive_number));\n                    }\n                    else if (positive_number <= (std::numeric_limits<std::uint16_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x39));\n                        write_number(static_cast<std::uint16_t>(positive_number));\n                    }\n                    else if (positive_number <= (std::numeric_limits<std::uint32_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x3A));\n                        write_number(static_cast<std::uint32_t>(positive_number));\n                    }\n                    else\n                    {\n                        oa->write_character(to_char_type(0x3B));\n                        write_number(static_cast<std::uint64_t>(positive_number));\n                    }\n                }\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                if (j.m_value.number_unsigned <= 0x17)\n                {\n                    write_number(static_cast<std::uint8_t>(j.m_value.number_unsigned));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x18));\n                    write_number(static_cast<std::uint8_t>(j.m_value.number_unsigned));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x19));\n                    write_number(static_cast<std::uint16_t>(j.m_value.number_unsigned));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x1A));\n                    write_number(static_cast<std::uint32_t>(j.m_value.number_unsigned));\n                }\n                else\n                {\n                    oa->write_character(to_char_type(0x1B));\n                    write_number(static_cast<std::uint64_t>(j.m_value.number_unsigned));\n                }\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                if (std::isnan(j.m_value.number_float))\n                {\n                    // NaN is 0xf97e00 in CBOR\n                    oa->write_character(to_char_type(0xF9));\n                    oa->write_character(to_char_type(0x7E));\n                    oa->write_character(to_char_type(0x00));\n                }\n                else if (std::isinf(j.m_value.number_float))\n                {\n                    // Infinity is 0xf97c00, -Infinity is 0xf9fc00\n                    oa->write_character(to_char_type(0xf9));\n                    oa->write_character(j.m_value.number_float > 0 ? to_char_type(0x7C) : to_char_type(0xFC));\n                    oa->write_character(to_char_type(0x00));\n                }\n                else\n                {\n                    write_compact_float(j.m_value.number_float, detail::input_format_t::cbor);\n                }\n                break;\n            }\n\n            case value_t::string:\n            {\n                // step 1: write control byte and the string length\n                const auto N = j.m_value.string->size();\n                if (N <= 0x17)\n                {\n                    write_number(static_cast<std::uint8_t>(0x60 + N));\n                }\n                else if (N <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x78));\n                    write_number(static_cast<std::uint8_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x79));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x7A));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n                // LCOV_EXCL_START\n                else if (N <= (std::numeric_limits<std::uint64_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x7B));\n                    write_number(static_cast<std::uint64_t>(N));\n                }\n                // LCOV_EXCL_STOP\n\n                // step 2: write the string\n                oa->write_characters(\n                    reinterpret_cast<const CharType*>(j.m_value.string->c_str()),\n                    j.m_value.string->size());\n                break;\n            }\n\n            case value_t::array:\n            {\n                // step 1: write control byte and the array size\n                const auto N = j.m_value.array->size();\n                if (N <= 0x17)\n                {\n                    write_number(static_cast<std::uint8_t>(0x80 + N));\n                }\n                else if (N <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x98));\n                    write_number(static_cast<std::uint8_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x99));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x9A));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n                // LCOV_EXCL_START\n                else if (N <= (std::numeric_limits<std::uint64_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x9B));\n                    write_number(static_cast<std::uint64_t>(N));\n                }\n                // LCOV_EXCL_STOP\n\n                // step 2: write each element\n                for (const auto& el : *j.m_value.array)\n                {\n                    write_cbor(el);\n                }\n                break;\n            }\n\n            case value_t::binary:\n            {\n                if (j.m_value.binary->has_subtype())\n                {\n                    if (j.m_value.binary->subtype() <= (std::numeric_limits<std::uint8_t>::max)())\n                    {\n                        write_number(static_cast<std::uint8_t>(0xd8));\n                        write_number(static_cast<std::uint8_t>(j.m_value.binary->subtype()));\n                    }\n                    else if (j.m_value.binary->subtype() <= (std::numeric_limits<std::uint16_t>::max)())\n                    {\n                        write_number(static_cast<std::uint8_t>(0xd9));\n                        write_number(static_cast<std::uint16_t>(j.m_value.binary->subtype()));\n                    }\n                    else if (j.m_value.binary->subtype() <= (std::numeric_limits<std::uint32_t>::max)())\n                    {\n                        write_number(static_cast<std::uint8_t>(0xda));\n                        write_number(static_cast<std::uint32_t>(j.m_value.binary->subtype()));\n                    }\n                    else if (j.m_value.binary->subtype() <= (std::numeric_limits<std::uint64_t>::max)())\n                    {\n                        write_number(static_cast<std::uint8_t>(0xdb));\n                        write_number(static_cast<std::uint64_t>(j.m_value.binary->subtype()));\n                    }\n                }\n\n                // step 1: write control byte and the binary array size\n                const auto N = j.m_value.binary->size();\n                if (N <= 0x17)\n                {\n                    write_number(static_cast<std::uint8_t>(0x40 + N));\n                }\n                else if (N <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x58));\n                    write_number(static_cast<std::uint8_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x59));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x5A));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n                // LCOV_EXCL_START\n                else if (N <= (std::numeric_limits<std::uint64_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x5B));\n                    write_number(static_cast<std::uint64_t>(N));\n                }\n                // LCOV_EXCL_STOP\n\n                // step 2: write each element\n                oa->write_characters(\n                    reinterpret_cast<const CharType*>(j.m_value.binary->data()),\n                    N);\n\n                break;\n            }\n\n            case value_t::object:\n            {\n                // step 1: write control byte and the object size\n                const auto N = j.m_value.object->size();\n                if (N <= 0x17)\n                {\n                    write_number(static_cast<std::uint8_t>(0xA0 + N));\n                }\n                else if (N <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    oa->write_character(to_char_type(0xB8));\n                    write_number(static_cast<std::uint8_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    oa->write_character(to_char_type(0xB9));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    oa->write_character(to_char_type(0xBA));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n                // LCOV_EXCL_START\n                else if (N <= (std::numeric_limits<std::uint64_t>::max)())\n                {\n                    oa->write_character(to_char_type(0xBB));\n                    write_number(static_cast<std::uint64_t>(N));\n                }\n                // LCOV_EXCL_STOP\n\n                // step 2: write each element\n                for (const auto& el : *j.m_value.object)\n                {\n                    write_cbor(el.first);\n                    write_cbor(el.second);\n                }\n                break;\n            }\n\n            case value_t::discarded:\n            default:\n                break;\n        }\n    }\n\n    /*!\n    @param[in] j  JSON value to serialize\n    */\n    void write_msgpack(const BasicJsonType& j)\n    {\n        switch (j.type())\n        {\n            case value_t::null: // nil\n            {\n                oa->write_character(to_char_type(0xC0));\n                break;\n            }\n\n            case value_t::boolean: // true and false\n            {\n                oa->write_character(j.m_value.boolean\n                                    ? to_char_type(0xC3)\n                                    : to_char_type(0xC2));\n                break;\n            }\n\n            case value_t::number_integer:\n            {\n                if (j.m_value.number_integer >= 0)\n                {\n                    // MessagePack does not differentiate between positive\n                    // signed integers and unsigned integers. Therefore, we used\n                    // the code from the value_t::number_unsigned case here.\n                    if (j.m_value.number_unsigned < 128)\n                    {\n                        // positive fixnum\n                        write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)())\n                    {\n                        // uint 8\n                        oa->write_character(to_char_type(0xCC));\n                        write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)())\n                    {\n                        // uint 16\n                        oa->write_character(to_char_type(0xCD));\n                        write_number(static_cast<std::uint16_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)())\n                    {\n                        // uint 32\n                        oa->write_character(to_char_type(0xCE));\n                        write_number(static_cast<std::uint32_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)())\n                    {\n                        // uint 64\n                        oa->write_character(to_char_type(0xCF));\n                        write_number(static_cast<std::uint64_t>(j.m_value.number_integer));\n                    }\n                }\n                else\n                {\n                    if (j.m_value.number_integer >= -32)\n                    {\n                        // negative fixnum\n                        write_number(static_cast<std::int8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer >= (std::numeric_limits<std::int8_t>::min)() &&\n                             j.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)())\n                    {\n                        // int 8\n                        oa->write_character(to_char_type(0xD0));\n                        write_number(static_cast<std::int8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer >= (std::numeric_limits<std::int16_t>::min)() &&\n                             j.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)())\n                    {\n                        // int 16\n                        oa->write_character(to_char_type(0xD1));\n                        write_number(static_cast<std::int16_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer >= (std::numeric_limits<std::int32_t>::min)() &&\n                             j.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)())\n                    {\n                        // int 32\n                        oa->write_character(to_char_type(0xD2));\n                        write_number(static_cast<std::int32_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer >= (std::numeric_limits<std::int64_t>::min)() &&\n                             j.m_value.number_integer <= (std::numeric_limits<std::int64_t>::max)())\n                    {\n                        // int 64\n                        oa->write_character(to_char_type(0xD3));\n                        write_number(static_cast<std::int64_t>(j.m_value.number_integer));\n                    }\n                }\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                if (j.m_value.number_unsigned < 128)\n                {\n                    // positive fixnum\n                    write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    // uint 8\n                    oa->write_character(to_char_type(0xCC));\n                    write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    // uint 16\n                    oa->write_character(to_char_type(0xCD));\n                    write_number(static_cast<std::uint16_t>(j.m_value.number_integer));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    // uint 32\n                    oa->write_character(to_char_type(0xCE));\n                    write_number(static_cast<std::uint32_t>(j.m_value.number_integer));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)())\n                {\n                    // uint 64\n                    oa->write_character(to_char_type(0xCF));\n                    write_number(static_cast<std::uint64_t>(j.m_value.number_integer));\n                }\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                write_compact_float(j.m_value.number_float, detail::input_format_t::msgpack);\n                break;\n            }\n\n            case value_t::string:\n            {\n                // step 1: write control byte and the string length\n                const auto N = j.m_value.string->size();\n                if (N <= 31)\n                {\n                    // fixstr\n                    write_number(static_cast<std::uint8_t>(0xA0 | N));\n                }\n                else if (N <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    // str 8\n                    oa->write_character(to_char_type(0xD9));\n                    write_number(static_cast<std::uint8_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    // str 16\n                    oa->write_character(to_char_type(0xDA));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    // str 32\n                    oa->write_character(to_char_type(0xDB));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n\n                // step 2: write the string\n                oa->write_characters(\n                    reinterpret_cast<const CharType*>(j.m_value.string->c_str()),\n                    j.m_value.string->size());\n                break;\n            }\n\n            case value_t::array:\n            {\n                // step 1: write control byte and the array size\n                const auto N = j.m_value.array->size();\n                if (N <= 15)\n                {\n                    // fixarray\n                    write_number(static_cast<std::uint8_t>(0x90 | N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    // array 16\n                    oa->write_character(to_char_type(0xDC));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    // array 32\n                    oa->write_character(to_char_type(0xDD));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n\n                // step 2: write each element\n                for (const auto& el : *j.m_value.array)\n                {\n                    write_msgpack(el);\n                }\n                break;\n            }\n\n            case value_t::binary:\n            {\n                // step 0: determine if the binary type has a set subtype to\n                // determine whether or not to use the ext or fixext types\n                const bool use_ext = j.m_value.binary->has_subtype();\n\n                // step 1: write control byte and the byte string length\n                const auto N = j.m_value.binary->size();\n                if (N <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    std::uint8_t output_type{};\n                    bool fixed = true;\n                    if (use_ext)\n                    {\n                        switch (N)\n                        {\n                            case 1:\n                                output_type = 0xD4; // fixext 1\n                                break;\n                            case 2:\n                                output_type = 0xD5; // fixext 2\n                                break;\n                            case 4:\n                                output_type = 0xD6; // fixext 4\n                                break;\n                            case 8:\n                                output_type = 0xD7; // fixext 8\n                                break;\n                            case 16:\n                                output_type = 0xD8; // fixext 16\n                                break;\n                            default:\n                                output_type = 0xC7; // ext 8\n                                fixed = false;\n                                break;\n                        }\n\n                    }\n                    else\n                    {\n                        output_type = 0xC4; // bin 8\n                        fixed = false;\n                    }\n\n                    oa->write_character(to_char_type(output_type));\n                    if (!fixed)\n                    {\n                        write_number(static_cast<std::uint8_t>(N));\n                    }\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    std::uint8_t output_type = use_ext\n                                               ? 0xC8 // ext 16\n                                               : 0xC5; // bin 16\n\n                    oa->write_character(to_char_type(output_type));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    std::uint8_t output_type = use_ext\n                                               ? 0xC9 // ext 32\n                                               : 0xC6; // bin 32\n\n                    oa->write_character(to_char_type(output_type));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n\n                // step 1.5: if this is an ext type, write the subtype\n                if (use_ext)\n                {\n                    write_number(static_cast<std::int8_t>(j.m_value.binary->subtype()));\n                }\n\n                // step 2: write the byte string\n                oa->write_characters(\n                    reinterpret_cast<const CharType*>(j.m_value.binary->data()),\n                    N);\n\n                break;\n            }\n\n            case value_t::object:\n            {\n                // step 1: write control byte and the object size\n                const auto N = j.m_value.object->size();\n                if (N <= 15)\n                {\n                    // fixmap\n                    write_number(static_cast<std::uint8_t>(0x80 | (N & 0xF)));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    // map 16\n                    oa->write_character(to_char_type(0xDE));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    // map 32\n                    oa->write_character(to_char_type(0xDF));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n\n                // step 2: write each element\n                for (const auto& el : *j.m_value.object)\n                {\n                    write_msgpack(el.first);\n                    write_msgpack(el.second);\n                }\n                break;\n            }\n\n            case value_t::discarded:\n            default:\n                break;\n        }\n    }\n\n    /*!\n    @param[in] j  JSON value to serialize\n    @param[in] use_count   whether to use '#' prefixes (optimized format)\n    @param[in] use_type    whether to use '$' prefixes (optimized format)\n    @param[in] add_prefix  whether prefixes need to be used for this value\n    */\n    void write_ubjson(const BasicJsonType& j, const bool use_count,\n                      const bool use_type, const bool add_prefix = true)\n    {\n        switch (j.type())\n        {\n            case value_t::null:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(to_char_type('Z'));\n                }\n                break;\n            }\n\n            case value_t::boolean:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(j.m_value.boolean\n                                        ? to_char_type('T')\n                                        : to_char_type('F'));\n                }\n                break;\n            }\n\n            case value_t::number_integer:\n            {\n                write_number_with_ubjson_prefix(j.m_value.number_integer, add_prefix);\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                write_number_with_ubjson_prefix(j.m_value.number_unsigned, add_prefix);\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                write_number_with_ubjson_prefix(j.m_value.number_float, add_prefix);\n                break;\n            }\n\n            case value_t::string:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(to_char_type('S'));\n                }\n                write_number_with_ubjson_prefix(j.m_value.string->size(), true);\n                oa->write_characters(\n                    reinterpret_cast<const CharType*>(j.m_value.string->c_str()),\n                    j.m_value.string->size());\n                break;\n            }\n\n            case value_t::array:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(to_char_type('['));\n                }\n\n                bool prefix_required = true;\n                if (use_type && !j.m_value.array->empty())\n                {\n                    JSON_ASSERT(use_count);\n                    const CharType first_prefix = ubjson_prefix(j.front());\n                    const bool same_prefix = std::all_of(j.begin() + 1, j.end(),\n                                                         [this, first_prefix](const BasicJsonType & v)\n                    {\n                        return ubjson_prefix(v) == first_prefix;\n                    });\n\n                    if (same_prefix)\n                    {\n                        prefix_required = false;\n                        oa->write_character(to_char_type('$'));\n                        oa->write_character(first_prefix);\n                    }\n                }\n\n                if (use_count)\n                {\n                    oa->write_character(to_char_type('#'));\n                    write_number_with_ubjson_prefix(j.m_value.array->size(), true);\n                }\n\n                for (const auto& el : *j.m_value.array)\n                {\n                    write_ubjson(el, use_count, use_type, prefix_required);\n                }\n\n                if (!use_count)\n                {\n                    oa->write_character(to_char_type(']'));\n                }\n\n                break;\n            }\n\n            case value_t::binary:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(to_char_type('['));\n                }\n\n                if (use_type && !j.m_value.binary->empty())\n                {\n                    JSON_ASSERT(use_count);\n                    oa->write_character(to_char_type('$'));\n                    oa->write_character('U');\n                }\n\n                if (use_count)\n                {\n                    oa->write_character(to_char_type('#'));\n                    write_number_with_ubjson_prefix(j.m_value.binary->size(), true);\n                }\n\n                if (use_type)\n                {\n                    oa->write_characters(\n                        reinterpret_cast<const CharType*>(j.m_value.binary->data()),\n                        j.m_value.binary->size());\n                }\n                else\n                {\n                    for (size_t i = 0; i < j.m_value.binary->size(); ++i)\n                    {\n                        oa->write_character(to_char_type('U'));\n                        oa->write_character(j.m_value.binary->data()[i]);\n                    }\n                }\n\n                if (!use_count)\n                {\n                    oa->write_character(to_char_type(']'));\n                }\n\n                break;\n            }\n\n            case value_t::object:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(to_char_type('{'));\n                }\n\n                bool prefix_required = true;\n                if (use_type && !j.m_value.object->empty())\n                {\n                    JSON_ASSERT(use_count);\n                    const CharType first_prefix = ubjson_prefix(j.front());\n                    const bool same_prefix = std::all_of(j.begin(), j.end(),\n                                                         [this, first_prefix](const BasicJsonType & v)\n                    {\n                        return ubjson_prefix(v) == first_prefix;\n                    });\n\n                    if (same_prefix)\n                    {\n                        prefix_required = false;\n                        oa->write_character(to_char_type('$'));\n                        oa->write_character(first_prefix);\n                    }\n                }\n\n                if (use_count)\n                {\n                    oa->write_character(to_char_type('#'));\n                    write_number_with_ubjson_prefix(j.m_value.object->size(), true);\n                }\n\n                for (const auto& el : *j.m_value.object)\n                {\n                    write_number_with_ubjson_prefix(el.first.size(), true);\n                    oa->write_characters(\n                        reinterpret_cast<const CharType*>(el.first.c_str()),\n                        el.first.size());\n                    write_ubjson(el.second, use_count, use_type, prefix_required);\n                }\n\n                if (!use_count)\n                {\n                    oa->write_character(to_char_type('}'));\n                }\n\n                break;\n            }\n\n            case value_t::discarded:\n            default:\n                break;\n        }\n    }\n\n  private:\n    //////////\n    // BSON //\n    //////////\n\n    /*!\n    @return The size of a BSON document entry header, including the id marker\n            and the entry name size (and its null-terminator).\n    */\n    static std::size_t calc_bson_entry_header_size(const string_t& name, const BasicJsonType& j)\n    {\n        const auto it = name.find(static_cast<typename string_t::value_type>(0));\n        if (JSON_HEDLEY_UNLIKELY(it != BasicJsonType::string_t::npos))\n        {\n            JSON_THROW(out_of_range::create(409, \"BSON key cannot contain code point U+0000 (at byte \" + std::to_string(it) + \")\", j));\n            static_cast<void>(j);\n        }\n\n        return /*id*/ 1ul + name.size() + /*zero-terminator*/1u;\n    }\n\n    /*!\n    @brief Writes the given @a element_type and @a name to the output adapter\n    */\n    void write_bson_entry_header(const string_t& name,\n                                 const std::uint8_t element_type)\n    {\n        oa->write_character(to_char_type(element_type)); // boolean\n        oa->write_characters(\n            reinterpret_cast<const CharType*>(name.c_str()),\n            name.size() + 1u);\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and boolean value @a value\n    */\n    void write_bson_boolean(const string_t& name,\n                            const bool value)\n    {\n        write_bson_entry_header(name, 0x08);\n        oa->write_character(value ? to_char_type(0x01) : to_char_type(0x00));\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and double value @a value\n    */\n    void write_bson_double(const string_t& name,\n                           const double value)\n    {\n        write_bson_entry_header(name, 0x01);\n        write_number<double, true>(value);\n    }\n\n    /*!\n    @return The size of the BSON-encoded string in @a value\n    */\n    static std::size_t calc_bson_string_size(const string_t& value)\n    {\n        return sizeof(std::int32_t) + value.size() + 1ul;\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and string value @a value\n    */\n    void write_bson_string(const string_t& name,\n                           const string_t& value)\n    {\n        write_bson_entry_header(name, 0x02);\n\n        write_number<std::int32_t, true>(static_cast<std::int32_t>(value.size() + 1ul));\n        oa->write_characters(\n            reinterpret_cast<const CharType*>(value.c_str()),\n            value.size() + 1);\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and null value\n    */\n    void write_bson_null(const string_t& name)\n    {\n        write_bson_entry_header(name, 0x0A);\n    }\n\n    /*!\n    @return The size of the BSON-encoded integer @a value\n    */\n    static std::size_t calc_bson_integer_size(const std::int64_t value)\n    {\n        return (std::numeric_limits<std::int32_t>::min)() <= value && value <= (std::numeric_limits<std::int32_t>::max)()\n               ? sizeof(std::int32_t)\n               : sizeof(std::int64_t);\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and integer @a value\n    */\n    void write_bson_integer(const string_t& name,\n                            const std::int64_t value)\n    {\n        if ((std::numeric_limits<std::int32_t>::min)() <= value && value <= (std::numeric_limits<std::int32_t>::max)())\n        {\n            write_bson_entry_header(name, 0x10); // int32\n            write_number<std::int32_t, true>(static_cast<std::int32_t>(value));\n        }\n        else\n        {\n            write_bson_entry_header(name, 0x12); // int64\n            write_number<std::int64_t, true>(static_cast<std::int64_t>(value));\n        }\n    }\n\n    /*!\n    @return The size of the BSON-encoded unsigned integer in @a j\n    */\n    static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept\n    {\n        return (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))\n               ? sizeof(std::int32_t)\n               : sizeof(std::int64_t);\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and unsigned @a value\n    */\n    void write_bson_unsigned(const string_t& name,\n                             const BasicJsonType& j)\n    {\n        if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))\n        {\n            write_bson_entry_header(name, 0x10 /* int32 */);\n            write_number<std::int32_t, true>(static_cast<std::int32_t>(j.m_value.number_unsigned));\n        }\n        else if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)()))\n        {\n            write_bson_entry_header(name, 0x12 /* int64 */);\n            write_number<std::int64_t, true>(static_cast<std::int64_t>(j.m_value.number_unsigned));\n        }\n        else\n        {\n            JSON_THROW(out_of_range::create(407, \"integer number \" + std::to_string(j.m_value.number_unsigned) + \" cannot be represented by BSON as it does not fit int64\", j));\n        }\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and object @a value\n    */\n    void write_bson_object_entry(const string_t& name,\n                                 const typename BasicJsonType::object_t& value)\n    {\n        write_bson_entry_header(name, 0x03); // object\n        write_bson_object(value);\n    }\n\n    /*!\n    @return The size of the BSON-encoded array @a value\n    */\n    static std::size_t calc_bson_array_size(const typename BasicJsonType::array_t& value)\n    {\n        std::size_t array_index = 0ul;\n\n        const std::size_t embedded_document_size = std::accumulate(std::begin(value), std::end(value), static_cast<std::size_t>(0), [&array_index](std::size_t result, const typename BasicJsonType::array_t::value_type & el)\n        {\n            return result + calc_bson_element_size(std::to_string(array_index++), el);\n        });\n\n        return sizeof(std::int32_t) + embedded_document_size + 1ul;\n    }\n\n    /*!\n    @return The size of the BSON-encoded binary array @a value\n    */\n    static std::size_t calc_bson_binary_size(const typename BasicJsonType::binary_t& value)\n    {\n        return sizeof(std::int32_t) + value.size() + 1ul;\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and array @a value\n    */\n    void write_bson_array(const string_t& name,\n                          const typename BasicJsonType::array_t& value)\n    {\n        write_bson_entry_header(name, 0x04); // array\n        write_number<std::int32_t, true>(static_cast<std::int32_t>(calc_bson_array_size(value)));\n\n        std::size_t array_index = 0ul;\n\n        for (const auto& el : value)\n        {\n            write_bson_element(std::to_string(array_index++), el);\n        }\n\n        oa->write_character(to_char_type(0x00));\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and binary value @a value\n    */\n    void write_bson_binary(const string_t& name,\n                           const binary_t& value)\n    {\n        write_bson_entry_header(name, 0x05);\n\n        write_number<std::int32_t, true>(static_cast<std::int32_t>(value.size()));\n        write_number(value.has_subtype() ? static_cast<std::uint8_t>(value.subtype()) : static_cast<std::uint8_t>(0x00));\n\n        oa->write_characters(reinterpret_cast<const CharType*>(value.data()), value.size());\n    }\n\n    /*!\n    @brief Calculates the size necessary to serialize the JSON value @a j with its @a name\n    @return The calculated size for the BSON document entry for @a j with the given @a name.\n    */\n    static std::size_t calc_bson_element_size(const string_t& name,\n            const BasicJsonType& j)\n    {\n        const auto header_size = calc_bson_entry_header_size(name, j);\n        switch (j.type())\n        {\n            case value_t::object:\n                return header_size + calc_bson_object_size(*j.m_value.object);\n\n            case value_t::array:\n                return header_size + calc_bson_array_size(*j.m_value.array);\n\n            case value_t::binary:\n                return header_size + calc_bson_binary_size(*j.m_value.binary);\n\n            case value_t::boolean:\n                return header_size + 1ul;\n\n            case value_t::number_float:\n                return header_size + 8ul;\n\n            case value_t::number_integer:\n                return header_size + calc_bson_integer_size(j.m_value.number_integer);\n\n            case value_t::number_unsigned:\n                return header_size + calc_bson_unsigned_size(j.m_value.number_unsigned);\n\n            case value_t::string:\n                return header_size + calc_bson_string_size(*j.m_value.string);\n\n            case value_t::null:\n                return header_size + 0ul;\n\n            // LCOV_EXCL_START\n            case value_t::discarded:\n            default:\n                JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)\n                return 0ul;\n                // LCOV_EXCL_STOP\n        }\n    }\n\n    /*!\n    @brief Serializes the JSON value @a j to BSON and associates it with the\n           key @a name.\n    @param name The name to associate with the JSON entity @a j within the\n                current BSON document\n    */\n    void write_bson_element(const string_t& name,\n                            const BasicJsonType& j)\n    {\n        switch (j.type())\n        {\n            case value_t::object:\n                return write_bson_object_entry(name, *j.m_value.object);\n\n            case value_t::array:\n                return write_bson_array(name, *j.m_value.array);\n\n            case value_t::binary:\n                return write_bson_binary(name, *j.m_value.binary);\n\n            case value_t::boolean:\n                return write_bson_boolean(name, j.m_value.boolean);\n\n            case value_t::number_float:\n                return write_bson_double(name, j.m_value.number_float);\n\n            case value_t::number_integer:\n                return write_bson_integer(name, j.m_value.number_integer);\n\n            case value_t::number_unsigned:\n                return write_bson_unsigned(name, j);\n\n            case value_t::string:\n                return write_bson_string(name, *j.m_value.string);\n\n            case value_t::null:\n                return write_bson_null(name);\n\n            // LCOV_EXCL_START\n            case value_t::discarded:\n            default:\n                JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)\n                return;\n                // LCOV_EXCL_STOP\n        }\n    }\n\n    /*!\n    @brief Calculates the size of the BSON serialization of the given\n           JSON-object @a j.\n    @param[in] value  JSON value to serialize\n    @pre       value.type() == value_t::object\n    */\n    static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t& value)\n    {\n        std::size_t document_size = std::accumulate(value.begin(), value.end(), static_cast<std::size_t>(0),\n                                    [](size_t result, const typename BasicJsonType::object_t::value_type & el)\n        {\n            return result += calc_bson_element_size(el.first, el.second);\n        });\n\n        return sizeof(std::int32_t) + document_size + 1ul;\n    }\n\n    /*!\n    @param[in] value  JSON value to serialize\n    @pre       value.type() == value_t::object\n    */\n    void write_bson_object(const typename BasicJsonType::object_t& value)\n    {\n        write_number<std::int32_t, true>(static_cast<std::int32_t>(calc_bson_object_size(value)));\n\n        for (const auto& el : value)\n        {\n            write_bson_element(el.first, el.second);\n        }\n\n        oa->write_character(to_char_type(0x00));\n    }\n\n    //////////\n    // CBOR //\n    //////////\n\n    static constexpr CharType get_cbor_float_prefix(float /*unused*/)\n    {\n        return to_char_type(0xFA);  // Single-Precision Float\n    }\n\n    static constexpr CharType get_cbor_float_prefix(double /*unused*/)\n    {\n        return to_char_type(0xFB);  // Double-Precision Float\n    }\n\n    /////////////\n    // MsgPack //\n    /////////////\n\n    static constexpr CharType get_msgpack_float_prefix(float /*unused*/)\n    {\n        return to_char_type(0xCA);  // float 32\n    }\n\n    static constexpr CharType get_msgpack_float_prefix(double /*unused*/)\n    {\n        return to_char_type(0xCB);  // float 64\n    }\n\n    ////////////\n    // UBJSON //\n    ////////////\n\n    // UBJSON: write number (floating point)\n    template<typename NumberType, typename std::enable_if<\n                 std::is_floating_point<NumberType>::value, int>::type = 0>\n    void write_number_with_ubjson_prefix(const NumberType n,\n                                         const bool add_prefix)\n    {\n        if (add_prefix)\n        {\n            oa->write_character(get_ubjson_float_prefix(n));\n        }\n        write_number(n);\n    }\n\n    // UBJSON: write number (unsigned integer)\n    template<typename NumberType, typename std::enable_if<\n                 std::is_unsigned<NumberType>::value, int>::type = 0>\n    void write_number_with_ubjson_prefix(const NumberType n,\n                                         const bool add_prefix)\n    {\n        if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)()))\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('i'));  // int8\n            }\n            write_number(static_cast<std::uint8_t>(n));\n        }\n        else if (n <= (std::numeric_limits<std::uint8_t>::max)())\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('U'));  // uint8\n            }\n            write_number(static_cast<std::uint8_t>(n));\n        }\n        else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)()))\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('I'));  // int16\n            }\n            write_number(static_cast<std::int16_t>(n));\n        }\n        else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('l'));  // int32\n            }\n            write_number(static_cast<std::int32_t>(n));\n        }\n        else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)()))\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('L'));  // int64\n            }\n            write_number(static_cast<std::int64_t>(n));\n        }\n        else\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('H'));  // high-precision number\n            }\n\n            const auto number = BasicJsonType(n).dump();\n            write_number_with_ubjson_prefix(number.size(), true);\n            for (std::size_t i = 0; i < number.size(); ++i)\n            {\n                oa->write_character(to_char_type(static_cast<std::uint8_t>(number[i])));\n            }\n        }\n    }\n\n    // UBJSON: write number (signed integer)\n    template < typename NumberType, typename std::enable_if <\n                   std::is_signed<NumberType>::value&&\n                   !std::is_floating_point<NumberType>::value, int >::type = 0 >\n    void write_number_with_ubjson_prefix(const NumberType n,\n                                         const bool add_prefix)\n    {\n        if ((std::numeric_limits<std::int8_t>::min)() <= n && n <= (std::numeric_limits<std::int8_t>::max)())\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('i'));  // int8\n            }\n            write_number(static_cast<std::int8_t>(n));\n        }\n        else if (static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::min)()) <= n && n <= static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::max)()))\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('U'));  // uint8\n            }\n            write_number(static_cast<std::uint8_t>(n));\n        }\n        else if ((std::numeric_limits<std::int16_t>::min)() <= n && n <= (std::numeric_limits<std::int16_t>::max)())\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('I'));  // int16\n            }\n            write_number(static_cast<std::int16_t>(n));\n        }\n        else if ((std::numeric_limits<std::int32_t>::min)() <= n && n <= (std::numeric_limits<std::int32_t>::max)())\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('l'));  // int32\n            }\n            write_number(static_cast<std::int32_t>(n));\n        }\n        else if ((std::numeric_limits<std::int64_t>::min)() <= n && n <= (std::numeric_limits<std::int64_t>::max)())\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('L'));  // int64\n            }\n            write_number(static_cast<std::int64_t>(n));\n        }\n        // LCOV_EXCL_START\n        else\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('H'));  // high-precision number\n            }\n\n            const auto number = BasicJsonType(n).dump();\n            write_number_with_ubjson_prefix(number.size(), true);\n            for (std::size_t i = 0; i < number.size(); ++i)\n            {\n                oa->write_character(to_char_type(static_cast<std::uint8_t>(number[i])));\n            }\n        }\n        // LCOV_EXCL_STOP\n    }\n\n    /*!\n    @brief determine the type prefix of container values\n    */\n    CharType ubjson_prefix(const BasicJsonType& j) const noexcept\n    {\n        switch (j.type())\n        {\n            case value_t::null:\n                return 'Z';\n\n            case value_t::boolean:\n                return j.m_value.boolean ? 'T' : 'F';\n\n            case value_t::number_integer:\n            {\n                if ((std::numeric_limits<std::int8_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)())\n                {\n                    return 'i';\n                }\n                if ((std::numeric_limits<std::uint8_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    return 'U';\n                }\n                if ((std::numeric_limits<std::int16_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)())\n                {\n                    return 'I';\n                }\n                if ((std::numeric_limits<std::int32_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)())\n                {\n                    return 'l';\n                }\n                if ((std::numeric_limits<std::int64_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int64_t>::max)())\n                {\n                    return 'L';\n                }\n                // anything else is treated as high-precision number\n                return 'H'; // LCOV_EXCL_LINE\n            }\n\n            case value_t::number_unsigned:\n            {\n                if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)()))\n                {\n                    return 'i';\n                }\n                if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::uint8_t>::max)()))\n                {\n                    return 'U';\n                }\n                if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)()))\n                {\n                    return 'I';\n                }\n                if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))\n                {\n                    return 'l';\n                }\n                if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)()))\n                {\n                    return 'L';\n                }\n                // anything else is treated as high-precision number\n                return 'H'; // LCOV_EXCL_LINE\n            }\n\n            case value_t::number_float:\n                return get_ubjson_float_prefix(j.m_value.number_float);\n\n            case value_t::string:\n                return 'S';\n\n            case value_t::array: // fallthrough\n            case value_t::binary:\n                return '[';\n\n            case value_t::object:\n                return '{';\n\n            case value_t::discarded:\n            default:  // discarded values\n                return 'N';\n        }\n    }\n\n    static constexpr CharType get_ubjson_float_prefix(float /*unused*/)\n    {\n        return 'd';  // float 32\n    }\n\n    static constexpr CharType get_ubjson_float_prefix(double /*unused*/)\n    {\n        return 'D';  // float 64\n    }\n\n    ///////////////////////\n    // Utility functions //\n    ///////////////////////\n\n    /*\n    @brief write a number to output input\n    @param[in] n number of type @a NumberType\n    @tparam NumberType the type of the number\n    @tparam OutputIsLittleEndian Set to true if output data is\n                                 required to be little endian\n\n    @note This function needs to respect the system's endianness, because bytes\n          in CBOR, MessagePack, and UBJSON are stored in network order (big\n          endian) and therefore need reordering on little endian systems.\n    */\n    template<typename NumberType, bool OutputIsLittleEndian = false>\n    void write_number(const NumberType n)\n    {\n        // step 1: write number to array of length NumberType\n        std::array<CharType, sizeof(NumberType)> vec{};\n        std::memcpy(vec.data(), &n, sizeof(NumberType));\n\n        // step 2: write array to output (with possible reordering)\n        if (is_little_endian != OutputIsLittleEndian)\n        {\n            // reverse byte order prior to conversion if necessary\n            std::reverse(vec.begin(), vec.end());\n        }\n\n        oa->write_characters(vec.data(), sizeof(NumberType));\n    }\n\n    void write_compact_float(const number_float_t n, detail::input_format_t format)\n    {\n#ifdef __GNUC__\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wfloat-equal\"\n#endif\n        if (static_cast<double>(n) >= static_cast<double>(std::numeric_limits<float>::lowest()) &&\n                static_cast<double>(n) <= static_cast<double>((std::numeric_limits<float>::max)()) &&\n                static_cast<double>(static_cast<float>(n)) == static_cast<double>(n))\n        {\n            oa->write_character(format == detail::input_format_t::cbor\n                                ? get_cbor_float_prefix(static_cast<float>(n))\n                                : get_msgpack_float_prefix(static_cast<float>(n)));\n            write_number(static_cast<float>(n));\n        }\n        else\n        {\n            oa->write_character(format == detail::input_format_t::cbor\n                                ? get_cbor_float_prefix(n)\n                                : get_msgpack_float_prefix(n));\n            write_number(n);\n        }\n#ifdef __GNUC__\n#pragma GCC diagnostic pop\n#endif\n    }\n\n  public:\n    // The following to_char_type functions are implement the conversion\n    // between uint8_t and CharType. In case CharType is not unsigned,\n    // such a conversion is required to allow values greater than 128.\n    // See <https://github.com/nlohmann/json/issues/1286> for a discussion.\n    template < typename C = CharType,\n               enable_if_t < std::is_signed<C>::value && std::is_signed<char>::value > * = nullptr >\n    static constexpr CharType to_char_type(std::uint8_t x) noexcept\n    {\n        return *reinterpret_cast<char*>(&x);\n    }\n\n    template < typename C = CharType,\n               enable_if_t < std::is_signed<C>::value && std::is_unsigned<char>::value > * = nullptr >\n    static CharType to_char_type(std::uint8_t x) noexcept\n    {\n        static_assert(sizeof(std::uint8_t) == sizeof(CharType), \"size of CharType must be equal to std::uint8_t\");\n        static_assert(std::is_trivial<CharType>::value, \"CharType must be trivial\");\n        CharType result;\n        std::memcpy(&result, &x, sizeof(x));\n        return result;\n    }\n\n    template<typename C = CharType,\n             enable_if_t<std::is_unsigned<C>::value>* = nullptr>\n    static constexpr CharType to_char_type(std::uint8_t x) noexcept\n    {\n        return x;\n    }\n\n    template < typename InputCharType, typename C = CharType,\n               enable_if_t <\n                   std::is_signed<C>::value &&\n                   std::is_signed<char>::value &&\n                   std::is_same<char, typename std::remove_cv<InputCharType>::type>::value\n                   > * = nullptr >\n    static constexpr CharType to_char_type(InputCharType x) noexcept\n    {\n        return x;\n    }\n\n  private:\n    /// whether we can assume little endianness\n    const bool is_little_endian = little_endianness();\n\n    /// the output\n    output_adapter_t<CharType> oa = nullptr;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/output/output_adapters.hpp>\n\n// #include <nlohmann/detail/output/serializer.hpp>\n\n\n#include <algorithm> // reverse, remove, fill, find, none_of\n#include <array> // array\n#include <clocale> // localeconv, lconv\n#include <cmath> // labs, isfinite, isnan, signbit\n#include <cstddef> // size_t, ptrdiff_t\n#include <cstdint> // uint8_t\n#include <cstdio> // snprintf\n#include <limits> // numeric_limits\n#include <string> // string, char_traits\n#include <iomanip> // setfill, setw\n#include <sstream> // stringstream\n#include <type_traits> // is_same\n#include <utility> // move\n\n// #include <nlohmann/detail/conversions/to_chars.hpp>\n\n\n#include <array> // array\n#include <cmath>   // signbit, isfinite\n#include <cstdint> // intN_t, uintN_t\n#include <cstring> // memcpy, memmove\n#include <limits> // numeric_limits\n#include <type_traits> // conditional\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n\n/*!\n@brief implements the Grisu2 algorithm for binary to decimal floating-point\nconversion.\n\nThis implementation is a slightly modified version of the reference\nimplementation which may be obtained from\nhttp://florian.loitsch.com/publications (bench.tar.gz).\n\nThe code is distributed under the MIT license, Copyright (c) 2009 Florian Loitsch.\n\nFor a detailed description of the algorithm see:\n\n[1] Loitsch, \"Printing Floating-Point Numbers Quickly and Accurately with\n    Integers\", Proceedings of the ACM SIGPLAN 2010 Conference on Programming\n    Language Design and Implementation, PLDI 2010\n[2] Burger, Dybvig, \"Printing Floating-Point Numbers Quickly and Accurately\",\n    Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language\n    Design and Implementation, PLDI 1996\n*/\nnamespace dtoa_impl\n{\n\ntemplate<typename Target, typename Source>\nTarget reinterpret_bits(const Source source)\n{\n    static_assert(sizeof(Target) == sizeof(Source), \"size mismatch\");\n\n    Target target;\n    std::memcpy(&target, &source, sizeof(Source));\n    return target;\n}\n\nstruct diyfp // f * 2^e\n{\n    static constexpr int kPrecision = 64; // = q\n\n    std::uint64_t f = 0;\n    int e = 0;\n\n    constexpr diyfp(std::uint64_t f_, int e_) noexcept : f(f_), e(e_) {}\n\n    /*!\n    @brief returns x - y\n    @pre x.e == y.e and x.f >= y.f\n    */\n    static diyfp sub(const diyfp& x, const diyfp& y) noexcept\n    {\n        JSON_ASSERT(x.e == y.e);\n        JSON_ASSERT(x.f >= y.f);\n\n        return {x.f - y.f, x.e};\n    }\n\n    /*!\n    @brief returns x * y\n    @note The result is rounded. (Only the upper q bits are returned.)\n    */\n    static diyfp mul(const diyfp& x, const diyfp& y) noexcept\n    {\n        static_assert(kPrecision == 64, \"internal error\");\n\n        // Computes:\n        //  f = round((x.f * y.f) / 2^q)\n        //  e = x.e + y.e + q\n\n        // Emulate the 64-bit * 64-bit multiplication:\n        //\n        // p = u * v\n        //   = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi)\n        //   = (u_lo v_lo         ) + 2^32 ((u_lo v_hi         ) + (u_hi v_lo         )) + 2^64 (u_hi v_hi         )\n        //   = (p0                ) + 2^32 ((p1                ) + (p2                )) + 2^64 (p3                )\n        //   = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3                )\n        //   = (p0_lo             ) + 2^32 (p0_hi + p1_lo + p2_lo                      ) + 2^64 (p1_hi + p2_hi + p3)\n        //   = (p0_lo             ) + 2^32 (Q                                          ) + 2^64 (H                 )\n        //   = (p0_lo             ) + 2^32 (Q_lo + 2^32 Q_hi                           ) + 2^64 (H                 )\n        //\n        // (Since Q might be larger than 2^32 - 1)\n        //\n        //   = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H)\n        //\n        // (Q_hi + H does not overflow a 64-bit int)\n        //\n        //   = p_lo + 2^64 p_hi\n\n        const std::uint64_t u_lo = x.f & 0xFFFFFFFFu;\n        const std::uint64_t u_hi = x.f >> 32u;\n        const std::uint64_t v_lo = y.f & 0xFFFFFFFFu;\n        const std::uint64_t v_hi = y.f >> 32u;\n\n        const std::uint64_t p0 = u_lo * v_lo;\n        const std::uint64_t p1 = u_lo * v_hi;\n        const std::uint64_t p2 = u_hi * v_lo;\n        const std::uint64_t p3 = u_hi * v_hi;\n\n        const std::uint64_t p0_hi = p0 >> 32u;\n        const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;\n        const std::uint64_t p1_hi = p1 >> 32u;\n        const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;\n        const std::uint64_t p2_hi = p2 >> 32u;\n\n        std::uint64_t Q = p0_hi + p1_lo + p2_lo;\n\n        // The full product might now be computed as\n        //\n        // p_hi = p3 + p2_hi + p1_hi + (Q >> 32)\n        // p_lo = p0_lo + (Q << 32)\n        //\n        // But in this particular case here, the full p_lo is not required.\n        // Effectively we only need to add the highest bit in p_lo to p_hi (and\n        // Q_hi + 1 does not overflow).\n\n        Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up\n\n        const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u);\n\n        return {h, x.e + y.e + 64};\n    }\n\n    /*!\n    @brief normalize x such that the significand is >= 2^(q-1)\n    @pre x.f != 0\n    */\n    static diyfp normalize(diyfp x) noexcept\n    {\n        JSON_ASSERT(x.f != 0);\n\n        while ((x.f >> 63u) == 0)\n        {\n            x.f <<= 1u;\n            x.e--;\n        }\n\n        return x;\n    }\n\n    /*!\n    @brief normalize x such that the result has the exponent E\n    @pre e >= x.e and the upper e - x.e bits of x.f must be zero.\n    */\n    static diyfp normalize_to(const diyfp& x, const int target_exponent) noexcept\n    {\n        const int delta = x.e - target_exponent;\n\n        JSON_ASSERT(delta >= 0);\n        JSON_ASSERT(((x.f << delta) >> delta) == x.f);\n\n        return {x.f << delta, target_exponent};\n    }\n};\n\nstruct boundaries\n{\n    diyfp w;\n    diyfp minus;\n    diyfp plus;\n};\n\n/*!\nCompute the (normalized) diyfp representing the input number 'value' and its\nboundaries.\n\n@pre value must be finite and positive\n*/\ntemplate<typename FloatType>\nboundaries compute_boundaries(FloatType value)\n{\n    JSON_ASSERT(std::isfinite(value));\n    JSON_ASSERT(value > 0);\n\n    // Convert the IEEE representation into a diyfp.\n    //\n    // If v is denormal:\n    //      value = 0.F * 2^(1 - bias) = (          F) * 2^(1 - bias - (p-1))\n    // If v is normalized:\n    //      value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1))\n\n    static_assert(std::numeric_limits<FloatType>::is_iec559,\n                  \"internal error: dtoa_short requires an IEEE-754 floating-point implementation\");\n\n    constexpr int      kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit)\n    constexpr int      kBias      = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1);\n    constexpr int      kMinExp    = 1 - kBias;\n    constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1)\n\n    using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type;\n\n    const auto bits = static_cast<std::uint64_t>(reinterpret_bits<bits_type>(value));\n    const std::uint64_t E = bits >> (kPrecision - 1);\n    const std::uint64_t F = bits & (kHiddenBit - 1);\n\n    const bool is_denormal = E == 0;\n    const diyfp v = is_denormal\n                    ? diyfp(F, kMinExp)\n                    : diyfp(F + kHiddenBit, static_cast<int>(E) - kBias);\n\n    // Compute the boundaries m- and m+ of the floating-point value\n    // v = f * 2^e.\n    //\n    // Determine v- and v+, the floating-point predecessor and successor if v,\n    // respectively.\n    //\n    //      v- = v - 2^e        if f != 2^(p-1) or e == e_min                (A)\n    //         = v - 2^(e-1)    if f == 2^(p-1) and e > e_min                (B)\n    //\n    //      v+ = v + 2^e\n    //\n    // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_\n    // between m- and m+ round to v, regardless of how the input rounding\n    // algorithm breaks ties.\n    //\n    //      ---+-------------+-------------+-------------+-------------+---  (A)\n    //         v-            m-            v             m+            v+\n    //\n    //      -----------------+------+------+-------------+-------------+---  (B)\n    //                       v-     m-     v             m+            v+\n\n    const bool lower_boundary_is_closer = F == 0 && E > 1;\n    const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1);\n    const diyfp m_minus = lower_boundary_is_closer\n                          ? diyfp(4 * v.f - 1, v.e - 2)  // (B)\n                          : diyfp(2 * v.f - 1, v.e - 1); // (A)\n\n    // Determine the normalized w+ = m+.\n    const diyfp w_plus = diyfp::normalize(m_plus);\n\n    // Determine w- = m- such that e_(w-) = e_(w+).\n    const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e);\n\n    return {diyfp::normalize(v), w_minus, w_plus};\n}\n\n// Given normalized diyfp w, Grisu needs to find a (normalized) cached\n// power-of-ten c, such that the exponent of the product c * w = f * 2^e lies\n// within a certain range [alpha, gamma] (Definition 3.2 from [1])\n//\n//      alpha <= e = e_c + e_w + q <= gamma\n//\n// or\n//\n//      f_c * f_w * 2^alpha <= f_c 2^(e_c) * f_w 2^(e_w) * 2^q\n//                          <= f_c * f_w * 2^gamma\n//\n// Since c and w are normalized, i.e. 2^(q-1) <= f < 2^q, this implies\n//\n//      2^(q-1) * 2^(q-1) * 2^alpha <= c * w * 2^q < 2^q * 2^q * 2^gamma\n//\n// or\n//\n//      2^(q - 2 + alpha) <= c * w < 2^(q + gamma)\n//\n// The choice of (alpha,gamma) determines the size of the table and the form of\n// the digit generation procedure. Using (alpha,gamma)=(-60,-32) works out well\n// in practice:\n//\n// The idea is to cut the number c * w = f * 2^e into two parts, which can be\n// processed independently: An integral part p1, and a fractional part p2:\n//\n//      f * 2^e = ( (f div 2^-e) * 2^-e + (f mod 2^-e) ) * 2^e\n//              = (f div 2^-e) + (f mod 2^-e) * 2^e\n//              = p1 + p2 * 2^e\n//\n// The conversion of p1 into decimal form requires a series of divisions and\n// modulos by (a power of) 10. These operations are faster for 32-bit than for\n// 64-bit integers, so p1 should ideally fit into a 32-bit integer. This can be\n// achieved by choosing\n//\n//      -e >= 32   or   e <= -32 := gamma\n//\n// In order to convert the fractional part\n//\n//      p2 * 2^e = p2 / 2^-e = d[-1] / 10^1 + d[-2] / 10^2 + ...\n//\n// into decimal form, the fraction is repeatedly multiplied by 10 and the digits\n// d[-i] are extracted in order:\n//\n//      (10 * p2) div 2^-e = d[-1]\n//      (10 * p2) mod 2^-e = d[-2] / 10^1 + ...\n//\n// The multiplication by 10 must not overflow. It is sufficient to choose\n//\n//      10 * p2 < 16 * p2 = 2^4 * p2 <= 2^64.\n//\n// Since p2 = f mod 2^-e < 2^-e,\n//\n//      -e <= 60   or   e >= -60 := alpha\n\nconstexpr int kAlpha = -60;\nconstexpr int kGamma = -32;\n\nstruct cached_power // c = f * 2^e ~= 10^k\n{\n    std::uint64_t f;\n    int e;\n    int k;\n};\n\n/*!\nFor a normalized diyfp w = f * 2^e, this function returns a (normalized) cached\npower-of-ten c = f_c * 2^e_c, such that the exponent of the product w * c\nsatisfies (Definition 3.2 from [1])\n\n     alpha <= e_c + e + q <= gamma.\n*/\ninline cached_power get_cached_power_for_binary_exponent(int e)\n{\n    // Now\n    //\n    //      alpha <= e_c + e + q <= gamma                                    (1)\n    //      ==> f_c * 2^alpha <= c * 2^e * 2^q\n    //\n    // and since the c's are normalized, 2^(q-1) <= f_c,\n    //\n    //      ==> 2^(q - 1 + alpha) <= c * 2^(e + q)\n    //      ==> 2^(alpha - e - 1) <= c\n    //\n    // If c were an exact power of ten, i.e. c = 10^k, one may determine k as\n    //\n    //      k = ceil( log_10( 2^(alpha - e - 1) ) )\n    //        = ceil( (alpha - e - 1) * log_10(2) )\n    //\n    // From the paper:\n    // \"In theory the result of the procedure could be wrong since c is rounded,\n    //  and the computation itself is approximated [...]. In practice, however,\n    //  this simple function is sufficient.\"\n    //\n    // For IEEE double precision floating-point numbers converted into\n    // normalized diyfp's w = f * 2^e, with q = 64,\n    //\n    //      e >= -1022      (min IEEE exponent)\n    //           -52        (p - 1)\n    //           -52        (p - 1, possibly normalize denormal IEEE numbers)\n    //           -11        (normalize the diyfp)\n    //         = -1137\n    //\n    // and\n    //\n    //      e <= +1023      (max IEEE exponent)\n    //           -52        (p - 1)\n    //           -11        (normalize the diyfp)\n    //         = 960\n    //\n    // This binary exponent range [-1137,960] results in a decimal exponent\n    // range [-307,324]. One does not need to store a cached power for each\n    // k in this range. For each such k it suffices to find a cached power\n    // such that the exponent of the product lies in [alpha,gamma].\n    // This implies that the difference of the decimal exponents of adjacent\n    // table entries must be less than or equal to\n    //\n    //      floor( (gamma - alpha) * log_10(2) ) = 8.\n    //\n    // (A smaller distance gamma-alpha would require a larger table.)\n\n    // NB:\n    // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34.\n\n    constexpr int kCachedPowersMinDecExp = -300;\n    constexpr int kCachedPowersDecStep = 8;\n\n    static constexpr std::array<cached_power, 79> kCachedPowers =\n    {\n        {\n            { 0xAB70FE17C79AC6CA, -1060, -300 },\n            { 0xFF77B1FCBEBCDC4F, -1034, -292 },\n            { 0xBE5691EF416BD60C, -1007, -284 },\n            { 0x8DD01FAD907FFC3C,  -980, -276 },\n            { 0xD3515C2831559A83,  -954, -268 },\n            { 0x9D71AC8FADA6C9B5,  -927, -260 },\n            { 0xEA9C227723EE8BCB,  -901, -252 },\n            { 0xAECC49914078536D,  -874, -244 },\n            { 0x823C12795DB6CE57,  -847, -236 },\n            { 0xC21094364DFB5637,  -821, -228 },\n            { 0x9096EA6F3848984F,  -794, -220 },\n            { 0xD77485CB25823AC7,  -768, -212 },\n            { 0xA086CFCD97BF97F4,  -741, -204 },\n            { 0xEF340A98172AACE5,  -715, -196 },\n            { 0xB23867FB2A35B28E,  -688, -188 },\n            { 0x84C8D4DFD2C63F3B,  -661, -180 },\n            { 0xC5DD44271AD3CDBA,  -635, -172 },\n            { 0x936B9FCEBB25C996,  -608, -164 },\n            { 0xDBAC6C247D62A584,  -582, -156 },\n            { 0xA3AB66580D5FDAF6,  -555, -148 },\n            { 0xF3E2F893DEC3F126,  -529, -140 },\n            { 0xB5B5ADA8AAFF80B8,  -502, -132 },\n            { 0x87625F056C7C4A8B,  -475, -124 },\n            { 0xC9BCFF6034C13053,  -449, -116 },\n            { 0x964E858C91BA2655,  -422, -108 },\n            { 0xDFF9772470297EBD,  -396, -100 },\n            { 0xA6DFBD9FB8E5B88F,  -369,  -92 },\n            { 0xF8A95FCF88747D94,  -343,  -84 },\n            { 0xB94470938FA89BCF,  -316,  -76 },\n            { 0x8A08F0F8BF0F156B,  -289,  -68 },\n            { 0xCDB02555653131B6,  -263,  -60 },\n            { 0x993FE2C6D07B7FAC,  -236,  -52 },\n            { 0xE45C10C42A2B3B06,  -210,  -44 },\n            { 0xAA242499697392D3,  -183,  -36 },\n            { 0xFD87B5F28300CA0E,  -157,  -28 },\n            { 0xBCE5086492111AEB,  -130,  -20 },\n            { 0x8CBCCC096F5088CC,  -103,  -12 },\n            { 0xD1B71758E219652C,   -77,   -4 },\n            { 0x9C40000000000000,   -50,    4 },\n            { 0xE8D4A51000000000,   -24,   12 },\n            { 0xAD78EBC5AC620000,     3,   20 },\n            { 0x813F3978F8940984,    30,   28 },\n            { 0xC097CE7BC90715B3,    56,   36 },\n            { 0x8F7E32CE7BEA5C70,    83,   44 },\n            { 0xD5D238A4ABE98068,   109,   52 },\n            { 0x9F4F2726179A2245,   136,   60 },\n            { 0xED63A231D4C4FB27,   162,   68 },\n            { 0xB0DE65388CC8ADA8,   189,   76 },\n            { 0x83C7088E1AAB65DB,   216,   84 },\n            { 0xC45D1DF942711D9A,   242,   92 },\n            { 0x924D692CA61BE758,   269,  100 },\n            { 0xDA01EE641A708DEA,   295,  108 },\n            { 0xA26DA3999AEF774A,   322,  116 },\n            { 0xF209787BB47D6B85,   348,  124 },\n            { 0xB454E4A179DD1877,   375,  132 },\n            { 0x865B86925B9BC5C2,   402,  140 },\n            { 0xC83553C5C8965D3D,   428,  148 },\n            { 0x952AB45CFA97A0B3,   455,  156 },\n            { 0xDE469FBD99A05FE3,   481,  164 },\n            { 0xA59BC234DB398C25,   508,  172 },\n            { 0xF6C69A72A3989F5C,   534,  180 },\n            { 0xB7DCBF5354E9BECE,   561,  188 },\n            { 0x88FCF317F22241E2,   588,  196 },\n            { 0xCC20CE9BD35C78A5,   614,  204 },\n            { 0x98165AF37B2153DF,   641,  212 },\n            { 0xE2A0B5DC971F303A,   667,  220 },\n            { 0xA8D9D1535CE3B396,   694,  228 },\n            { 0xFB9B7CD9A4A7443C,   720,  236 },\n            { 0xBB764C4CA7A44410,   747,  244 },\n            { 0x8BAB8EEFB6409C1A,   774,  252 },\n            { 0xD01FEF10A657842C,   800,  260 },\n            { 0x9B10A4E5E9913129,   827,  268 },\n            { 0xE7109BFBA19C0C9D,   853,  276 },\n            { 0xAC2820D9623BF429,   880,  284 },\n            { 0x80444B5E7AA7CF85,   907,  292 },\n            { 0xBF21E44003ACDD2D,   933,  300 },\n            { 0x8E679C2F5E44FF8F,   960,  308 },\n            { 0xD433179D9C8CB841,   986,  316 },\n            { 0x9E19DB92B4E31BA9,  1013,  324 },\n        }\n    };\n\n    // This computation gives exactly the same results for k as\n    //      k = ceil((kAlpha - e - 1) * 0.30102999566398114)\n    // for |e| <= 1500, but doesn't require floating-point operations.\n    // NB: log_10(2) ~= 78913 / 2^18\n    JSON_ASSERT(e >= -1500);\n    JSON_ASSERT(e <=  1500);\n    const int f = kAlpha - e - 1;\n    const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0);\n\n    const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;\n    JSON_ASSERT(index >= 0);\n    JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size());\n\n    const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)];\n    JSON_ASSERT(kAlpha <= cached.e + e + 64);\n    JSON_ASSERT(kGamma >= cached.e + e + 64);\n\n    return cached;\n}\n\n/*!\nFor n != 0, returns k, such that pow10 := 10^(k-1) <= n < 10^k.\nFor n == 0, returns 1 and sets pow10 := 1.\n*/\ninline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10)\n{\n    // LCOV_EXCL_START\n    if (n >= 1000000000)\n    {\n        pow10 = 1000000000;\n        return 10;\n    }\n    // LCOV_EXCL_STOP\n    if (n >= 100000000)\n    {\n        pow10 = 100000000;\n        return  9;\n    }\n    if (n >= 10000000)\n    {\n        pow10 = 10000000;\n        return  8;\n    }\n    if (n >= 1000000)\n    {\n        pow10 = 1000000;\n        return  7;\n    }\n    if (n >= 100000)\n    {\n        pow10 = 100000;\n        return  6;\n    }\n    if (n >= 10000)\n    {\n        pow10 = 10000;\n        return  5;\n    }\n    if (n >= 1000)\n    {\n        pow10 = 1000;\n        return  4;\n    }\n    if (n >= 100)\n    {\n        pow10 = 100;\n        return  3;\n    }\n    if (n >= 10)\n    {\n        pow10 = 10;\n        return  2;\n    }\n\n    pow10 = 1;\n    return 1;\n}\n\ninline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta,\n                         std::uint64_t rest, std::uint64_t ten_k)\n{\n    JSON_ASSERT(len >= 1);\n    JSON_ASSERT(dist <= delta);\n    JSON_ASSERT(rest <= delta);\n    JSON_ASSERT(ten_k > 0);\n\n    //               <--------------------------- delta ---->\n    //                                  <---- dist --------->\n    // --------------[------------------+-------------------]--------------\n    //               M-                 w                   M+\n    //\n    //                                  ten_k\n    //                                <------>\n    //                                       <---- rest ---->\n    // --------------[------------------+----+--------------]--------------\n    //                                  w    V\n    //                                       = buf * 10^k\n    //\n    // ten_k represents a unit-in-the-last-place in the decimal representation\n    // stored in buf.\n    // Decrement buf by ten_k while this takes buf closer to w.\n\n    // The tests are written in this order to avoid overflow in unsigned\n    // integer arithmetic.\n\n    while (rest < dist\n            && delta - rest >= ten_k\n            && (rest + ten_k < dist || dist - rest > rest + ten_k - dist))\n    {\n        JSON_ASSERT(buf[len - 1] != '0');\n        buf[len - 1]--;\n        rest += ten_k;\n    }\n}\n\n/*!\nGenerates V = buffer * 10^decimal_exponent, such that M- <= V <= M+.\nM- and M+ must be normalized and share the same exponent -60 <= e <= -32.\n*/\ninline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent,\n                             diyfp M_minus, diyfp w, diyfp M_plus)\n{\n    static_assert(kAlpha >= -60, \"internal error\");\n    static_assert(kGamma <= -32, \"internal error\");\n\n    // Generates the digits (and the exponent) of a decimal floating-point\n    // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's\n    // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma.\n    //\n    //               <--------------------------- delta ---->\n    //                                  <---- dist --------->\n    // --------------[------------------+-------------------]--------------\n    //               M-                 w                   M+\n    //\n    // Grisu2 generates the digits of M+ from left to right and stops as soon as\n    // V is in [M-,M+].\n\n    JSON_ASSERT(M_plus.e >= kAlpha);\n    JSON_ASSERT(M_plus.e <= kGamma);\n\n    std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e)\n    std::uint64_t dist  = diyfp::sub(M_plus, w      ).f; // (significand of (M+ - w ), implicit exponent is e)\n\n    // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0):\n    //\n    //      M+ = f * 2^e\n    //         = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e\n    //         = ((p1        ) * 2^-e + (p2        )) * 2^e\n    //         = p1 + p2 * 2^e\n\n    const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e);\n\n    auto p1 = static_cast<std::uint32_t>(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.)\n    std::uint64_t p2 = M_plus.f & (one.f - 1);                    // p2 = f mod 2^-e\n\n    // 1)\n    //\n    // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0]\n\n    JSON_ASSERT(p1 > 0);\n\n    std::uint32_t pow10{};\n    const int k = find_largest_pow10(p1, pow10);\n\n    //      10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1)\n    //\n    //      p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1))\n    //         = (d[k-1]         ) * 10^(k-1) + (p1 mod 10^(k-1))\n    //\n    //      M+ = p1                                             + p2 * 2^e\n    //         = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1))          + p2 * 2^e\n    //         = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e\n    //         = d[k-1] * 10^(k-1) + (                         rest) * 2^e\n    //\n    // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0)\n    //\n    //      p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0]\n    //\n    // but stop as soon as\n    //\n    //      rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e\n\n    int n = k;\n    while (n > 0)\n    {\n        // Invariants:\n        //      M+ = buffer * 10^n + (p1 + p2 * 2^e)    (buffer = 0 for n = k)\n        //      pow10 = 10^(n-1) <= p1 < 10^n\n        //\n        const std::uint32_t d = p1 / pow10;  // d = p1 div 10^(n-1)\n        const std::uint32_t r = p1 % pow10;  // r = p1 mod 10^(n-1)\n        //\n        //      M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e\n        //         = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e)\n        //\n        JSON_ASSERT(d <= 9);\n        buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d\n        //\n        //      M+ = buffer * 10^(n-1) + (r + p2 * 2^e)\n        //\n        p1 = r;\n        n--;\n        //\n        //      M+ = buffer * 10^n + (p1 + p2 * 2^e)\n        //      pow10 = 10^n\n        //\n\n        // Now check if enough digits have been generated.\n        // Compute\n        //\n        //      p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e\n        //\n        // Note:\n        // Since rest and delta share the same exponent e, it suffices to\n        // compare the significands.\n        const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2;\n        if (rest <= delta)\n        {\n            // V = buffer * 10^n, with M- <= V <= M+.\n\n            decimal_exponent += n;\n\n            // We may now just stop. But instead look if the buffer could be\n            // decremented to bring V closer to w.\n            //\n            // pow10 = 10^n is now 1 ulp in the decimal representation V.\n            // The rounding procedure works with diyfp's with an implicit\n            // exponent of e.\n            //\n            //      10^n = (10^n * 2^-e) * 2^e = ulp * 2^e\n            //\n            const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e;\n            grisu2_round(buffer, length, dist, delta, rest, ten_n);\n\n            return;\n        }\n\n        pow10 /= 10;\n        //\n        //      pow10 = 10^(n-1) <= p1 < 10^n\n        // Invariants restored.\n    }\n\n    // 2)\n    //\n    // The digits of the integral part have been generated:\n    //\n    //      M+ = d[k-1]...d[1]d[0] + p2 * 2^e\n    //         = buffer            + p2 * 2^e\n    //\n    // Now generate the digits of the fractional part p2 * 2^e.\n    //\n    // Note:\n    // No decimal point is generated: the exponent is adjusted instead.\n    //\n    // p2 actually represents the fraction\n    //\n    //      p2 * 2^e\n    //          = p2 / 2^-e\n    //          = d[-1] / 10^1 + d[-2] / 10^2 + ...\n    //\n    // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...)\n    //\n    //      p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m\n    //                      + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...)\n    //\n    // using\n    //\n    //      10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e)\n    //                = (                   d) * 2^-e + (                   r)\n    //\n    // or\n    //      10^m * p2 * 2^e = d + r * 2^e\n    //\n    // i.e.\n    //\n    //      M+ = buffer + p2 * 2^e\n    //         = buffer + 10^-m * (d + r * 2^e)\n    //         = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e\n    //\n    // and stop as soon as 10^-m * r * 2^e <= delta * 2^e\n\n    JSON_ASSERT(p2 > delta);\n\n    int m = 0;\n    for (;;)\n    {\n        // Invariant:\n        //      M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e\n        //         = buffer * 10^-m + 10^-m * (p2                                 ) * 2^e\n        //         = buffer * 10^-m + 10^-m * (1/10 * (10 * p2)                   ) * 2^e\n        //         = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e\n        //\n        JSON_ASSERT(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10);\n        p2 *= 10;\n        const std::uint64_t d = p2 >> -one.e;     // d = (10 * p2) div 2^-e\n        const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e\n        //\n        //      M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e\n        //         = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e))\n        //         = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e\n        //\n        JSON_ASSERT(d <= 9);\n        buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d\n        //\n        //      M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e\n        //\n        p2 = r;\n        m++;\n        //\n        //      M+ = buffer * 10^-m + 10^-m * p2 * 2^e\n        // Invariant restored.\n\n        // Check if enough digits have been generated.\n        //\n        //      10^-m * p2 * 2^e <= delta * 2^e\n        //              p2 * 2^e <= 10^m * delta * 2^e\n        //                    p2 <= 10^m * delta\n        delta *= 10;\n        dist  *= 10;\n        if (p2 <= delta)\n        {\n            break;\n        }\n    }\n\n    // V = buffer * 10^-m, with M- <= V <= M+.\n\n    decimal_exponent -= m;\n\n    // 1 ulp in the decimal representation is now 10^-m.\n    // Since delta and dist are now scaled by 10^m, we need to do the\n    // same with ulp in order to keep the units in sync.\n    //\n    //      10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e\n    //\n    const std::uint64_t ten_m = one.f;\n    grisu2_round(buffer, length, dist, delta, p2, ten_m);\n\n    // By construction this algorithm generates the shortest possible decimal\n    // number (Loitsch, Theorem 6.2) which rounds back to w.\n    // For an input number of precision p, at least\n    //\n    //      N = 1 + ceil(p * log_10(2))\n    //\n    // decimal digits are sufficient to identify all binary floating-point\n    // numbers (Matula, \"In-and-Out conversions\").\n    // This implies that the algorithm does not produce more than N decimal\n    // digits.\n    //\n    //      N = 17 for p = 53 (IEEE double precision)\n    //      N = 9  for p = 24 (IEEE single precision)\n}\n\n/*!\nv = buf * 10^decimal_exponent\nlen is the length of the buffer (number of decimal digits)\nThe buffer must be large enough, i.e. >= max_digits10.\n*/\nJSON_HEDLEY_NON_NULL(1)\ninline void grisu2(char* buf, int& len, int& decimal_exponent,\n                   diyfp m_minus, diyfp v, diyfp m_plus)\n{\n    JSON_ASSERT(m_plus.e == m_minus.e);\n    JSON_ASSERT(m_plus.e == v.e);\n\n    //  --------(-----------------------+-----------------------)--------    (A)\n    //          m-                      v                       m+\n    //\n    //  --------------------(-----------+-----------------------)--------    (B)\n    //                      m-          v                       m+\n    //\n    // First scale v (and m- and m+) such that the exponent is in the range\n    // [alpha, gamma].\n\n    const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e);\n\n    const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k\n\n    // The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma]\n    const diyfp w       = diyfp::mul(v,       c_minus_k);\n    const diyfp w_minus = diyfp::mul(m_minus, c_minus_k);\n    const diyfp w_plus  = diyfp::mul(m_plus,  c_minus_k);\n\n    //  ----(---+---)---------------(---+---)---------------(---+---)----\n    //          w-                      w                       w+\n    //          = c*m-                  = c*v                   = c*m+\n    //\n    // diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and\n    // w+ are now off by a small amount.\n    // In fact:\n    //\n    //      w - v * 10^k < 1 ulp\n    //\n    // To account for this inaccuracy, add resp. subtract 1 ulp.\n    //\n    //  --------+---[---------------(---+---)---------------]---+--------\n    //          w-  M-                  w                   M+  w+\n    //\n    // Now any number in [M-, M+] (bounds included) will round to w when input,\n    // regardless of how the input rounding algorithm breaks ties.\n    //\n    // And digit_gen generates the shortest possible such number in [M-, M+].\n    // Note that this does not mean that Grisu2 always generates the shortest\n    // possible number in the interval (m-, m+).\n    const diyfp M_minus(w_minus.f + 1, w_minus.e);\n    const diyfp M_plus (w_plus.f  - 1, w_plus.e );\n\n    decimal_exponent = -cached.k; // = -(-k) = k\n\n    grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus);\n}\n\n/*!\nv = buf * 10^decimal_exponent\nlen is the length of the buffer (number of decimal digits)\nThe buffer must be large enough, i.e. >= max_digits10.\n*/\ntemplate<typename FloatType>\nJSON_HEDLEY_NON_NULL(1)\nvoid grisu2(char* buf, int& len, int& decimal_exponent, FloatType value)\n{\n    static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3,\n                  \"internal error: not enough precision\");\n\n    JSON_ASSERT(std::isfinite(value));\n    JSON_ASSERT(value > 0);\n\n    // If the neighbors (and boundaries) of 'value' are always computed for double-precision\n    // numbers, all float's can be recovered using strtod (and strtof). However, the resulting\n    // decimal representations are not exactly \"short\".\n    //\n    // The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars)\n    // says \"value is converted to a string as if by std::sprintf in the default (\"C\") locale\"\n    // and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars'\n    // does.\n    // On the other hand, the documentation for 'std::to_chars' requires that \"parsing the\n    // representation using the corresponding std::from_chars function recovers value exactly\". That\n    // indicates that single precision floating-point numbers should be recovered using\n    // 'std::strtof'.\n    //\n    // NB: If the neighbors are computed for single-precision numbers, there is a single float\n    //     (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision\n    //     value is off by 1 ulp.\n#if 0\n    const boundaries w = compute_boundaries(static_cast<double>(value));\n#else\n    const boundaries w = compute_boundaries(value);\n#endif\n\n    grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus);\n}\n\n/*!\n@brief appends a decimal representation of e to buf\n@return a pointer to the element following the exponent.\n@pre -1000 < e < 1000\n*/\nJSON_HEDLEY_NON_NULL(1)\nJSON_HEDLEY_RETURNS_NON_NULL\ninline char* append_exponent(char* buf, int e)\n{\n    JSON_ASSERT(e > -1000);\n    JSON_ASSERT(e <  1000);\n\n    if (e < 0)\n    {\n        e = -e;\n        *buf++ = '-';\n    }\n    else\n    {\n        *buf++ = '+';\n    }\n\n    auto k = static_cast<std::uint32_t>(e);\n    if (k < 10)\n    {\n        // Always print at least two digits in the exponent.\n        // This is for compatibility with printf(\"%g\").\n        *buf++ = '0';\n        *buf++ = static_cast<char>('0' + k);\n    }\n    else if (k < 100)\n    {\n        *buf++ = static_cast<char>('0' + k / 10);\n        k %= 10;\n        *buf++ = static_cast<char>('0' + k);\n    }\n    else\n    {\n        *buf++ = static_cast<char>('0' + k / 100);\n        k %= 100;\n        *buf++ = static_cast<char>('0' + k / 10);\n        k %= 10;\n        *buf++ = static_cast<char>('0' + k);\n    }\n\n    return buf;\n}\n\n/*!\n@brief prettify v = buf * 10^decimal_exponent\n\nIf v is in the range [10^min_exp, 10^max_exp) it will be printed in fixed-point\nnotation. Otherwise it will be printed in exponential notation.\n\n@pre min_exp < 0\n@pre max_exp > 0\n*/\nJSON_HEDLEY_NON_NULL(1)\nJSON_HEDLEY_RETURNS_NON_NULL\ninline char* format_buffer(char* buf, int len, int decimal_exponent,\n                           int min_exp, int max_exp)\n{\n    JSON_ASSERT(min_exp < 0);\n    JSON_ASSERT(max_exp > 0);\n\n    const int k = len;\n    const int n = len + decimal_exponent;\n\n    // v = buf * 10^(n-k)\n    // k is the length of the buffer (number of decimal digits)\n    // n is the position of the decimal point relative to the start of the buffer.\n\n    if (k <= n && n <= max_exp)\n    {\n        // digits[000]\n        // len <= max_exp + 2\n\n        std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k));\n        // Make it look like a floating-point number (#362, #378)\n        buf[n + 0] = '.';\n        buf[n + 1] = '0';\n        return buf + (static_cast<size_t>(n) + 2);\n    }\n\n    if (0 < n && n <= max_exp)\n    {\n        // dig.its\n        // len <= max_digits10 + 1\n\n        JSON_ASSERT(k > n);\n\n        std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n));\n        buf[n] = '.';\n        return buf + (static_cast<size_t>(k) + 1U);\n    }\n\n    if (min_exp < n && n <= 0)\n    {\n        // 0.[000]digits\n        // len <= 2 + (-min_exp - 1) + max_digits10\n\n        std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k));\n        buf[0] = '0';\n        buf[1] = '.';\n        std::memset(buf + 2, '0', static_cast<size_t>(-n));\n        return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k));\n    }\n\n    if (k == 1)\n    {\n        // dE+123\n        // len <= 1 + 5\n\n        buf += 1;\n    }\n    else\n    {\n        // d.igitsE+123\n        // len <= max_digits10 + 1 + 5\n\n        std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1);\n        buf[1] = '.';\n        buf += 1 + static_cast<size_t>(k);\n    }\n\n    *buf++ = 'e';\n    return append_exponent(buf, n - 1);\n}\n\n} // namespace dtoa_impl\n\n/*!\n@brief generates a decimal representation of the floating-point number value in [first, last).\n\nThe format of the resulting decimal representation is similar to printf's %g\nformat. Returns an iterator pointing past-the-end of the decimal representation.\n\n@note The input number must be finite, i.e. NaN's and Inf's are not supported.\n@note The buffer must be large enough.\n@note The result is NOT null-terminated.\n*/\ntemplate<typename FloatType>\nJSON_HEDLEY_NON_NULL(1, 2)\nJSON_HEDLEY_RETURNS_NON_NULL\nchar* to_chars(char* first, const char* last, FloatType value)\n{\n    static_cast<void>(last); // maybe unused - fix warning\n    JSON_ASSERT(std::isfinite(value));\n\n    // Use signbit(value) instead of (value < 0) since signbit works for -0.\n    if (std::signbit(value))\n    {\n        value = -value;\n        *first++ = '-';\n    }\n\n#ifdef __GNUC__\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wfloat-equal\"\n#endif\n    if (value == 0) // +-0\n    {\n        *first++ = '0';\n        // Make it look like a floating-point number (#362, #378)\n        *first++ = '.';\n        *first++ = '0';\n        return first;\n    }\n#ifdef __GNUC__\n#pragma GCC diagnostic pop\n#endif\n\n    JSON_ASSERT(last - first >= std::numeric_limits<FloatType>::max_digits10);\n\n    // Compute v = buffer * 10^decimal_exponent.\n    // The decimal digits are stored in the buffer, which needs to be interpreted\n    // as an unsigned decimal integer.\n    // len is the length of the buffer, i.e. the number of decimal digits.\n    int len = 0;\n    int decimal_exponent = 0;\n    dtoa_impl::grisu2(first, len, decimal_exponent, value);\n\n    JSON_ASSERT(len <= std::numeric_limits<FloatType>::max_digits10);\n\n    // Format the buffer like printf(\"%.*g\", prec, value)\n    constexpr int kMinExp = -4;\n    // Use digits10 here to increase compatibility with version 2.\n    constexpr int kMaxExp = std::numeric_limits<FloatType>::digits10;\n\n    JSON_ASSERT(last - first >= kMaxExp + 2);\n    JSON_ASSERT(last - first >= 2 + (-kMinExp - 1) + std::numeric_limits<FloatType>::max_digits10);\n    JSON_ASSERT(last - first >= std::numeric_limits<FloatType>::max_digits10 + 6);\n\n    return dtoa_impl::format_buffer(first, len, decimal_exponent, kMinExp, kMaxExp);\n}\n\n} // namespace detail\n} // namespace nlohmann\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n// #include <nlohmann/detail/output/binary_writer.hpp>\n\n// #include <nlohmann/detail/output/output_adapters.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n///////////////////\n// serialization //\n///////////////////\n\n/// how to treat decoding errors\nenum class error_handler_t\n{\n    strict,  ///< throw a type_error exception in case of invalid UTF-8\n    replace, ///< replace invalid UTF-8 sequences with U+FFFD\n    ignore   ///< ignore invalid UTF-8 sequences\n};\n\ntemplate<typename BasicJsonType>\nclass serializer\n{\n    using string_t = typename BasicJsonType::string_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using binary_char_t = typename BasicJsonType::binary_t::value_type;\n    static constexpr std::uint8_t UTF8_ACCEPT = 0;\n    static constexpr std::uint8_t UTF8_REJECT = 1;\n\n  public:\n    /*!\n    @param[in] s  output stream to serialize to\n    @param[in] ichar  indentation character to use\n    @param[in] error_handler_  how to react on decoding errors\n    */\n    serializer(output_adapter_t<char> s, const char ichar,\n               error_handler_t error_handler_ = error_handler_t::strict)\n        : o(std::move(s))\n        , loc(std::localeconv())\n        , thousands_sep(loc->thousands_sep == nullptr ? '\\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))\n        , decimal_point(loc->decimal_point == nullptr ? '\\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))\n        , indent_char(ichar)\n        , indent_string(512, indent_char)\n        , error_handler(error_handler_)\n    {}\n\n    // delete because of pointer members\n    serializer(const serializer&) = delete;\n    serializer& operator=(const serializer&) = delete;\n    serializer(serializer&&) = delete;\n    serializer& operator=(serializer&&) = delete;\n    ~serializer() = default;\n\n    /*!\n    @brief internal implementation of the serialization function\n\n    This function is called by the public member function dump and organizes\n    the serialization internally. The indentation level is propagated as\n    additional parameter. In case of arrays and objects, the function is\n    called recursively.\n\n    - strings and object keys are escaped using `escape_string()`\n    - integer numbers are converted implicitly via `operator<<`\n    - floating-point numbers are converted to a string using `\"%g\"` format\n    - binary values are serialized as objects containing the subtype and the\n      byte array\n\n    @param[in] val               value to serialize\n    @param[in] pretty_print      whether the output shall be pretty-printed\n    @param[in] ensure_ascii If @a ensure_ascii is true, all non-ASCII characters\n    in the output are escaped with `\\uXXXX` sequences, and the result consists\n    of ASCII characters only.\n    @param[in] indent_step       the indent level\n    @param[in] current_indent    the current indent level (only used internally)\n    */\n    void dump(const BasicJsonType& val,\n              const bool pretty_print,\n              const bool ensure_ascii,\n              const unsigned int indent_step,\n              const unsigned int current_indent = 0)\n    {\n        switch (val.m_type)\n        {\n            case value_t::object:\n            {\n                if (val.m_value.object->empty())\n                {\n                    o->write_characters(\"{}\", 2);\n                    return;\n                }\n\n                if (pretty_print)\n                {\n                    o->write_characters(\"{\\n\", 2);\n\n                    // variable to hold indentation for recursive calls\n                    const auto new_indent = current_indent + indent_step;\n                    if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))\n                    {\n                        indent_string.resize(indent_string.size() * 2, ' ');\n                    }\n\n                    // first n-1 elements\n                    auto i = val.m_value.object->cbegin();\n                    for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i)\n                    {\n                        o->write_characters(indent_string.c_str(), new_indent);\n                        o->write_character('\\\"');\n                        dump_escaped(i->first, ensure_ascii);\n                        o->write_characters(\"\\\": \", 3);\n                        dump(i->second, true, ensure_ascii, indent_step, new_indent);\n                        o->write_characters(\",\\n\", 2);\n                    }\n\n                    // last element\n                    JSON_ASSERT(i != val.m_value.object->cend());\n                    JSON_ASSERT(std::next(i) == val.m_value.object->cend());\n                    o->write_characters(indent_string.c_str(), new_indent);\n                    o->write_character('\\\"');\n                    dump_escaped(i->first, ensure_ascii);\n                    o->write_characters(\"\\\": \", 3);\n                    dump(i->second, true, ensure_ascii, indent_step, new_indent);\n\n                    o->write_character('\\n');\n                    o->write_characters(indent_string.c_str(), current_indent);\n                    o->write_character('}');\n                }\n                else\n                {\n                    o->write_character('{');\n\n                    // first n-1 elements\n                    auto i = val.m_value.object->cbegin();\n                    for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i)\n                    {\n                        o->write_character('\\\"');\n                        dump_escaped(i->first, ensure_ascii);\n                        o->write_characters(\"\\\":\", 2);\n                        dump(i->second, false, ensure_ascii, indent_step, current_indent);\n                        o->write_character(',');\n                    }\n\n                    // last element\n                    JSON_ASSERT(i != val.m_value.object->cend());\n                    JSON_ASSERT(std::next(i) == val.m_value.object->cend());\n                    o->write_character('\\\"');\n                    dump_escaped(i->first, ensure_ascii);\n                    o->write_characters(\"\\\":\", 2);\n                    dump(i->second, false, ensure_ascii, indent_step, current_indent);\n\n                    o->write_character('}');\n                }\n\n                return;\n            }\n\n            case value_t::array:\n            {\n                if (val.m_value.array->empty())\n                {\n                    o->write_characters(\"[]\", 2);\n                    return;\n                }\n\n                if (pretty_print)\n                {\n                    o->write_characters(\"[\\n\", 2);\n\n                    // variable to hold indentation for recursive calls\n                    const auto new_indent = current_indent + indent_step;\n                    if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))\n                    {\n                        indent_string.resize(indent_string.size() * 2, ' ');\n                    }\n\n                    // first n-1 elements\n                    for (auto i = val.m_value.array->cbegin();\n                            i != val.m_value.array->cend() - 1; ++i)\n                    {\n                        o->write_characters(indent_string.c_str(), new_indent);\n                        dump(*i, true, ensure_ascii, indent_step, new_indent);\n                        o->write_characters(\",\\n\", 2);\n                    }\n\n                    // last element\n                    JSON_ASSERT(!val.m_value.array->empty());\n                    o->write_characters(indent_string.c_str(), new_indent);\n                    dump(val.m_value.array->back(), true, ensure_ascii, indent_step, new_indent);\n\n                    o->write_character('\\n');\n                    o->write_characters(indent_string.c_str(), current_indent);\n                    o->write_character(']');\n                }\n                else\n                {\n                    o->write_character('[');\n\n                    // first n-1 elements\n                    for (auto i = val.m_value.array->cbegin();\n                            i != val.m_value.array->cend() - 1; ++i)\n                    {\n                        dump(*i, false, ensure_ascii, indent_step, current_indent);\n                        o->write_character(',');\n                    }\n\n                    // last element\n                    JSON_ASSERT(!val.m_value.array->empty());\n                    dump(val.m_value.array->back(), false, ensure_ascii, indent_step, current_indent);\n\n                    o->write_character(']');\n                }\n\n                return;\n            }\n\n            case value_t::string:\n            {\n                o->write_character('\\\"');\n                dump_escaped(*val.m_value.string, ensure_ascii);\n                o->write_character('\\\"');\n                return;\n            }\n\n            case value_t::binary:\n            {\n                if (pretty_print)\n                {\n                    o->write_characters(\"{\\n\", 2);\n\n                    // variable to hold indentation for recursive calls\n                    const auto new_indent = current_indent + indent_step;\n                    if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))\n                    {\n                        indent_string.resize(indent_string.size() * 2, ' ');\n                    }\n\n                    o->write_characters(indent_string.c_str(), new_indent);\n\n                    o->write_characters(\"\\\"bytes\\\": [\", 10);\n\n                    if (!val.m_value.binary->empty())\n                    {\n                        for (auto i = val.m_value.binary->cbegin();\n                                i != val.m_value.binary->cend() - 1; ++i)\n                        {\n                            dump_integer(*i);\n                            o->write_characters(\", \", 2);\n                        }\n                        dump_integer(val.m_value.binary->back());\n                    }\n\n                    o->write_characters(\"],\\n\", 3);\n                    o->write_characters(indent_string.c_str(), new_indent);\n\n                    o->write_characters(\"\\\"subtype\\\": \", 11);\n                    if (val.m_value.binary->has_subtype())\n                    {\n                        dump_integer(val.m_value.binary->subtype());\n                    }\n                    else\n                    {\n                        o->write_characters(\"null\", 4);\n                    }\n                    o->write_character('\\n');\n                    o->write_characters(indent_string.c_str(), current_indent);\n                    o->write_character('}');\n                }\n                else\n                {\n                    o->write_characters(\"{\\\"bytes\\\":[\", 10);\n\n                    if (!val.m_value.binary->empty())\n                    {\n                        for (auto i = val.m_value.binary->cbegin();\n                                i != val.m_value.binary->cend() - 1; ++i)\n                        {\n                            dump_integer(*i);\n                            o->write_character(',');\n                        }\n                        dump_integer(val.m_value.binary->back());\n                    }\n\n                    o->write_characters(\"],\\\"subtype\\\":\", 12);\n                    if (val.m_value.binary->has_subtype())\n                    {\n                        dump_integer(val.m_value.binary->subtype());\n                        o->write_character('}');\n                    }\n                    else\n                    {\n                        o->write_characters(\"null}\", 5);\n                    }\n                }\n                return;\n            }\n\n            case value_t::boolean:\n            {\n                if (val.m_value.boolean)\n                {\n                    o->write_characters(\"true\", 4);\n                }\n                else\n                {\n                    o->write_characters(\"false\", 5);\n                }\n                return;\n            }\n\n            case value_t::number_integer:\n            {\n                dump_integer(val.m_value.number_integer);\n                return;\n            }\n\n            case value_t::number_unsigned:\n            {\n                dump_integer(val.m_value.number_unsigned);\n                return;\n            }\n\n            case value_t::number_float:\n            {\n                dump_float(val.m_value.number_float);\n                return;\n            }\n\n            case value_t::discarded:\n            {\n                o->write_characters(\"<discarded>\", 11);\n                return;\n            }\n\n            case value_t::null:\n            {\n                o->write_characters(\"null\", 4);\n                return;\n            }\n\n            default:            // LCOV_EXCL_LINE\n                JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n        }\n    }\n\n  JSON_PRIVATE_UNLESS_TESTED:\n    /*!\n    @brief dump escaped string\n\n    Escape a string by replacing certain special characters by a sequence of an\n    escape character (backslash) and another character and other control\n    characters by a sequence of \"\\u\" followed by a four-digit hex\n    representation. The escaped string is written to output stream @a o.\n\n    @param[in] s  the string to escape\n    @param[in] ensure_ascii  whether to escape non-ASCII characters with\n                             \\uXXXX sequences\n\n    @complexity Linear in the length of string @a s.\n    */\n    void dump_escaped(const string_t& s, const bool ensure_ascii)\n    {\n        std::uint32_t codepoint{};\n        std::uint8_t state = UTF8_ACCEPT;\n        std::size_t bytes = 0;  // number of bytes written to string_buffer\n\n        // number of bytes written at the point of the last valid byte\n        std::size_t bytes_after_last_accept = 0;\n        std::size_t undumped_chars = 0;\n\n        for (std::size_t i = 0; i < s.size(); ++i)\n        {\n            const auto byte = static_cast<std::uint8_t>(s[i]);\n\n            switch (decode(state, codepoint, byte))\n            {\n                case UTF8_ACCEPT:  // decode found a new code point\n                {\n                    switch (codepoint)\n                    {\n                        case 0x08: // backspace\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = 'b';\n                            break;\n                        }\n\n                        case 0x09: // horizontal tab\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = 't';\n                            break;\n                        }\n\n                        case 0x0A: // newline\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = 'n';\n                            break;\n                        }\n\n                        case 0x0C: // formfeed\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = 'f';\n                            break;\n                        }\n\n                        case 0x0D: // carriage return\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = 'r';\n                            break;\n                        }\n\n                        case 0x22: // quotation mark\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = '\\\"';\n                            break;\n                        }\n\n                        case 0x5C: // reverse solidus\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = '\\\\';\n                            break;\n                        }\n\n                        default:\n                        {\n                            // escape control characters (0x00..0x1F) or, if\n                            // ensure_ascii parameter is used, non-ASCII characters\n                            if ((codepoint <= 0x1F) || (ensure_ascii && (codepoint >= 0x7F)))\n                            {\n                                if (codepoint <= 0xFFFF)\n                                {\n                                    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)\n                                    static_cast<void>((std::snprintf)(string_buffer.data() + bytes, 7, \"\\\\u%04x\",\n                                                                      static_cast<std::uint16_t>(codepoint)));\n                                    bytes += 6;\n                                }\n                                else\n                                {\n                                    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)\n                                    static_cast<void>((std::snprintf)(string_buffer.data() + bytes, 13, \"\\\\u%04x\\\\u%04x\",\n                                                                      static_cast<std::uint16_t>(0xD7C0u + (codepoint >> 10u)),\n                                                                      static_cast<std::uint16_t>(0xDC00u + (codepoint & 0x3FFu))));\n                                    bytes += 12;\n                                }\n                            }\n                            else\n                            {\n                                // copy byte to buffer (all previous bytes\n                                // been copied have in default case above)\n                                string_buffer[bytes++] = s[i];\n                            }\n                            break;\n                        }\n                    }\n\n                    // write buffer and reset index; there must be 13 bytes\n                    // left, as this is the maximal number of bytes to be\n                    // written (\"\\uxxxx\\uxxxx\\0\") for one code point\n                    if (string_buffer.size() - bytes < 13)\n                    {\n                        o->write_characters(string_buffer.data(), bytes);\n                        bytes = 0;\n                    }\n\n                    // remember the byte position of this accept\n                    bytes_after_last_accept = bytes;\n                    undumped_chars = 0;\n                    break;\n                }\n\n                case UTF8_REJECT:  // decode found invalid UTF-8 byte\n                {\n                    switch (error_handler)\n                    {\n                        case error_handler_t::strict:\n                        {\n                            std::stringstream ss;\n                            ss << std::uppercase << std::setfill('0') << std::setw(2) << std::hex << (byte | 0);\n                            JSON_THROW(type_error::create(316, \"invalid UTF-8 byte at index \" + std::to_string(i) + \": 0x\" + ss.str(), BasicJsonType()));\n                        }\n\n                        case error_handler_t::ignore:\n                        case error_handler_t::replace:\n                        {\n                            // in case we saw this character the first time, we\n                            // would like to read it again, because the byte\n                            // may be OK for itself, but just not OK for the\n                            // previous sequence\n                            if (undumped_chars > 0)\n                            {\n                                --i;\n                            }\n\n                            // reset length buffer to the last accepted index;\n                            // thus removing/ignoring the invalid characters\n                            bytes = bytes_after_last_accept;\n\n                            if (error_handler == error_handler_t::replace)\n                            {\n                                // add a replacement character\n                                if (ensure_ascii)\n                                {\n                                    string_buffer[bytes++] = '\\\\';\n                                    string_buffer[bytes++] = 'u';\n                                    string_buffer[bytes++] = 'f';\n                                    string_buffer[bytes++] = 'f';\n                                    string_buffer[bytes++] = 'f';\n                                    string_buffer[bytes++] = 'd';\n                                }\n                                else\n                                {\n                                    string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\\xEF');\n                                    string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\\xBF');\n                                    string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\\xBD');\n                                }\n\n                                // write buffer and reset index; there must be 13 bytes\n                                // left, as this is the maximal number of bytes to be\n                                // written (\"\\uxxxx\\uxxxx\\0\") for one code point\n                                if (string_buffer.size() - bytes < 13)\n                                {\n                                    o->write_characters(string_buffer.data(), bytes);\n                                    bytes = 0;\n                                }\n\n                                bytes_after_last_accept = bytes;\n                            }\n\n                            undumped_chars = 0;\n\n                            // continue processing the string\n                            state = UTF8_ACCEPT;\n                            break;\n                        }\n\n                        default:            // LCOV_EXCL_LINE\n                            JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n                    }\n                    break;\n                }\n\n                default:  // decode found yet incomplete multi-byte code point\n                {\n                    if (!ensure_ascii)\n                    {\n                        // code point will not be escaped - copy byte to buffer\n                        string_buffer[bytes++] = s[i];\n                    }\n                    ++undumped_chars;\n                    break;\n                }\n            }\n        }\n\n        // we finished processing the string\n        if (JSON_HEDLEY_LIKELY(state == UTF8_ACCEPT))\n        {\n            // write buffer\n            if (bytes > 0)\n            {\n                o->write_characters(string_buffer.data(), bytes);\n            }\n        }\n        else\n        {\n            // we finish reading, but do not accept: string was incomplete\n            switch (error_handler)\n            {\n                case error_handler_t::strict:\n                {\n                    std::stringstream ss;\n                    ss << std::uppercase << std::setfill('0') << std::setw(2) << std::hex << (static_cast<std::uint8_t>(s.back()) | 0);\n                    JSON_THROW(type_error::create(316, \"incomplete UTF-8 string; last byte: 0x\" + ss.str(), BasicJsonType()));\n                }\n\n                case error_handler_t::ignore:\n                {\n                    // write all accepted bytes\n                    o->write_characters(string_buffer.data(), bytes_after_last_accept);\n                    break;\n                }\n\n                case error_handler_t::replace:\n                {\n                    // write all accepted bytes\n                    o->write_characters(string_buffer.data(), bytes_after_last_accept);\n                    // add a replacement character\n                    if (ensure_ascii)\n                    {\n                        o->write_characters(\"\\\\ufffd\", 6);\n                    }\n                    else\n                    {\n                        o->write_characters(\"\\xEF\\xBF\\xBD\", 3);\n                    }\n                    break;\n                }\n\n                default:            // LCOV_EXCL_LINE\n                    JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n            }\n        }\n    }\n\n  private:\n    /*!\n    @brief count digits\n\n    Count the number of decimal (base 10) digits for an input unsigned integer.\n\n    @param[in] x  unsigned integer number to count its digits\n    @return    number of decimal digits\n    */\n    inline unsigned int count_digits(number_unsigned_t x) noexcept\n    {\n        unsigned int n_digits = 1;\n        for (;;)\n        {\n            if (x < 10)\n            {\n                return n_digits;\n            }\n            if (x < 100)\n            {\n                return n_digits + 1;\n            }\n            if (x < 1000)\n            {\n                return n_digits + 2;\n            }\n            if (x < 10000)\n            {\n                return n_digits + 3;\n            }\n            x = x / 10000u;\n            n_digits += 4;\n        }\n    }\n\n    // templates to avoid warnings about useless casts\n    template <typename NumberType, enable_if_t<std::is_signed<NumberType>::value, int> = 0>\n    bool is_negative_number(NumberType x)\n    {\n        return x < 0;\n    }\n\n    template < typename NumberType, enable_if_t <std::is_unsigned<NumberType>::value, int > = 0 >\n    bool is_negative_number(NumberType /*unused*/)\n    {\n        return false;\n    }\n\n    /*!\n    @brief dump an integer\n\n    Dump a given integer to output stream @a o. Works internally with\n    @a number_buffer.\n\n    @param[in] x  integer number (signed or unsigned) to dump\n    @tparam NumberType either @a number_integer_t or @a number_unsigned_t\n    */\n    template < typename NumberType, detail::enable_if_t <\n                   std::is_integral<NumberType>::value ||\n                   std::is_same<NumberType, number_unsigned_t>::value ||\n                   std::is_same<NumberType, number_integer_t>::value ||\n                   std::is_same<NumberType, binary_char_t>::value,\n                   int > = 0 >\n    void dump_integer(NumberType x)\n    {\n        static constexpr std::array<std::array<char, 2>, 100> digits_to_99\n        {\n            {\n                {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},\n                {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},\n                {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},\n                {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},\n                {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},\n                {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},\n                {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},\n                {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},\n                {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},\n                {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},\n            }\n        };\n\n        // special case for \"0\"\n        if (x == 0)\n        {\n            o->write_character('0');\n            return;\n        }\n\n        // use a pointer to fill the buffer\n        auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)\n\n        number_unsigned_t abs_value;\n\n        unsigned int n_chars{};\n\n        if (is_negative_number(x))\n        {\n            *buffer_ptr = '-';\n            abs_value = remove_sign(static_cast<number_integer_t>(x));\n\n            // account one more byte for the minus sign\n            n_chars = 1 + count_digits(abs_value);\n        }\n        else\n        {\n            abs_value = static_cast<number_unsigned_t>(x);\n            n_chars = count_digits(abs_value);\n        }\n\n        // spare 1 byte for '\\0'\n        JSON_ASSERT(n_chars < number_buffer.size() - 1);\n\n        // jump to the end to generate the string from backward,\n        // so we later avoid reversing the result\n        buffer_ptr += n_chars;\n\n        // Fast int2ascii implementation inspired by \"Fastware\" talk by Andrei Alexandrescu\n        // See: https://www.youtube.com/watch?v=o4-CwDo2zpg\n        while (abs_value >= 100)\n        {\n            const auto digits_index = static_cast<unsigned>((abs_value % 100));\n            abs_value /= 100;\n            *(--buffer_ptr) = digits_to_99[digits_index][1];\n            *(--buffer_ptr) = digits_to_99[digits_index][0];\n        }\n\n        if (abs_value >= 10)\n        {\n            const auto digits_index = static_cast<unsigned>(abs_value);\n            *(--buffer_ptr) = digits_to_99[digits_index][1];\n            *(--buffer_ptr) = digits_to_99[digits_index][0];\n        }\n        else\n        {\n            *(--buffer_ptr) = static_cast<char>('0' + abs_value);\n        }\n\n        o->write_characters(number_buffer.data(), n_chars);\n    }\n\n    /*!\n    @brief dump a floating-point number\n\n    Dump a given floating-point number to output stream @a o. Works internally\n    with @a number_buffer.\n\n    @param[in] x  floating-point number to dump\n    */\n    void dump_float(number_float_t x)\n    {\n        // NaN / inf\n        if (!std::isfinite(x))\n        {\n            o->write_characters(\"null\", 4);\n            return;\n        }\n\n        // If number_float_t is an IEEE-754 single or double precision number,\n        // use the Grisu2 algorithm to produce short numbers which are\n        // guaranteed to round-trip, using strtof and strtod, resp.\n        //\n        // NB: The test below works if <long double> == <double>.\n        static constexpr bool is_ieee_single_or_double\n            = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||\n              (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);\n\n        dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());\n    }\n\n    void dump_float(number_float_t x, std::true_type /*is_ieee_single_or_double*/)\n    {\n        auto* begin = number_buffer.data();\n        auto* end = ::nlohmann::detail::to_chars(begin, begin + number_buffer.size(), x);\n\n        o->write_characters(begin, static_cast<size_t>(end - begin));\n    }\n\n    void dump_float(number_float_t x, std::false_type /*is_ieee_single_or_double*/)\n    {\n        // get number of digits for a float -> text -> float round-trip\n        static constexpr auto d = std::numeric_limits<number_float_t>::max_digits10;\n\n        // the actual conversion\n        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)\n        std::ptrdiff_t len = (std::snprintf)(number_buffer.data(), number_buffer.size(), \"%.*g\", d, x);\n\n        // negative value indicates an error\n        JSON_ASSERT(len > 0);\n        // check if buffer was large enough\n        JSON_ASSERT(static_cast<std::size_t>(len) < number_buffer.size());\n\n        // erase thousands separator\n        if (thousands_sep != '\\0')\n        {\n            // NOLINTNEXTLINE(readability-qualified-auto,llvm-qualified-auto): std::remove returns an iterator, see https://github.com/nlohmann/json/issues/3081\n            const auto end = std::remove(number_buffer.begin(), number_buffer.begin() + len, thousands_sep);\n            std::fill(end, number_buffer.end(), '\\0');\n            JSON_ASSERT((end - number_buffer.begin()) <= len);\n            len = (end - number_buffer.begin());\n        }\n\n        // convert decimal point to '.'\n        if (decimal_point != '\\0' && decimal_point != '.')\n        {\n            // NOLINTNEXTLINE(readability-qualified-auto,llvm-qualified-auto): std::find returns an iterator, see https://github.com/nlohmann/json/issues/3081\n            const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point);\n            if (dec_pos != number_buffer.end())\n            {\n                *dec_pos = '.';\n            }\n        }\n\n        o->write_characters(number_buffer.data(), static_cast<std::size_t>(len));\n\n        // determine if we need to append \".0\"\n        const bool value_is_int_like =\n            std::none_of(number_buffer.begin(), number_buffer.begin() + len + 1,\n                         [](char c)\n        {\n            return c == '.' || c == 'e';\n        });\n\n        if (value_is_int_like)\n        {\n            o->write_characters(\".0\", 2);\n        }\n    }\n\n    /*!\n    @brief check whether a string is UTF-8 encoded\n\n    The function checks each byte of a string whether it is UTF-8 encoded. The\n    result of the check is stored in the @a state parameter. The function must\n    be called initially with state 0 (accept). State 1 means the string must\n    be rejected, because the current byte is not allowed. If the string is\n    completely processed, but the state is non-zero, the string ended\n    prematurely; that is, the last byte indicated more bytes should have\n    followed.\n\n    @param[in,out] state  the state of the decoding\n    @param[in,out] codep  codepoint (valid only if resulting state is UTF8_ACCEPT)\n    @param[in] byte       next byte to decode\n    @return               new state\n\n    @note The function has been edited: a std::array is used.\n\n    @copyright Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de>\n    @sa http://bjoern.hoehrmann.de/utf-8/decoder/dfa/\n    */\n    static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept\n    {\n        static const std::array<std::uint8_t, 400> utf8d =\n        {\n            {\n                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F\n                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F\n                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F\n                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F\n                1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F\n                7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF\n                8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF\n                0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF\n                0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF\n                0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0\n                1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2\n                1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4\n                1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6\n                1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8\n            }\n        };\n\n        JSON_ASSERT(byte < utf8d.size());\n        const std::uint8_t type = utf8d[byte];\n\n        codep = (state != UTF8_ACCEPT)\n                ? (byte & 0x3fu) | (codep << 6u)\n                : (0xFFu >> type) & (byte);\n\n        std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);\n        JSON_ASSERT(index < 400);\n        state = utf8d[index];\n        return state;\n    }\n\n    /*\n     * Overload to make the compiler happy while it is instantiating\n     * dump_integer for number_unsigned_t.\n     * Must never be called.\n     */\n    number_unsigned_t remove_sign(number_unsigned_t x)\n    {\n        JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n        return x; // LCOV_EXCL_LINE\n    }\n\n    /*\n     * Helper function for dump_integer\n     *\n     * This function takes a negative signed integer and returns its absolute\n     * value as unsigned integer. The plus/minus shuffling is necessary as we can\n     * not directly remove the sign of an arbitrary signed integer as the\n     * absolute values of INT_MIN and INT_MAX are usually not the same. See\n     * #1708 for details.\n     */\n    inline number_unsigned_t remove_sign(number_integer_t x) noexcept\n    {\n        JSON_ASSERT(x < 0 && x < (std::numeric_limits<number_integer_t>::max)()); // NOLINT(misc-redundant-expression)\n        return static_cast<number_unsigned_t>(-(x + 1)) + 1;\n    }\n\n  private:\n    /// the output of the serializer\n    output_adapter_t<char> o = nullptr;\n\n    /// a (hopefully) large enough character buffer\n    std::array<char, 64> number_buffer{{}};\n\n    /// the locale\n    const std::lconv* loc = nullptr;\n    /// the locale's thousand separator character\n    const char thousands_sep = '\\0';\n    /// the locale's decimal point character\n    const char decimal_point = '\\0';\n\n    /// string buffer\n    std::array<char, 512> string_buffer{{}};\n\n    /// the indentation character\n    const char indent_char;\n    /// the indentation string\n    string_t indent_string;\n\n    /// error_handler how to react on decoding errors\n    const error_handler_t error_handler;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/value_t.hpp>\n\n// #include <nlohmann/json_fwd.hpp>\n\n// #include <nlohmann/ordered_map.hpp>\n\n\n#include <functional> // less\n#include <initializer_list> // initializer_list\n#include <iterator> // input_iterator_tag, iterator_traits\n#include <memory> // allocator\n#include <stdexcept> // for out_of_range\n#include <type_traits> // enable_if, is_convertible\n#include <utility> // pair\n#include <vector> // vector\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\n\n/// ordered_map: a minimal map-like container that preserves insertion order\n/// for use within nlohmann::basic_json<ordered_map>\ntemplate <class Key, class T, class IgnoredLess = std::less<Key>,\n          class Allocator = std::allocator<std::pair<const Key, T>>>\n                  struct ordered_map : std::vector<std::pair<const Key, T>, Allocator>\n{\n    using key_type = Key;\n    using mapped_type = T;\n    using Container = std::vector<std::pair<const Key, T>, Allocator>;\n    using iterator = typename Container::iterator;\n    using const_iterator = typename Container::const_iterator;\n    using size_type = typename Container::size_type;\n    using value_type = typename Container::value_type;\n\n    // Explicit constructors instead of `using Container::Container`\n    // otherwise older compilers choke on it (GCC <= 5.5, xcode <= 9.4)\n    ordered_map(const Allocator& alloc = Allocator()) : Container{alloc} {}\n    template <class It>\n    ordered_map(It first, It last, const Allocator& alloc = Allocator())\n        : Container{first, last, alloc} {}\n    ordered_map(std::initializer_list<T> init, const Allocator& alloc = Allocator() )\n        : Container{init, alloc} {}\n\n    std::pair<iterator, bool> emplace(const key_type& key, T&& t)\n    {\n        for (auto it = this->begin(); it != this->end(); ++it)\n        {\n            if (it->first == key)\n            {\n                return {it, false};\n            }\n        }\n        Container::emplace_back(key, t);\n        return {--this->end(), true};\n    }\n\n    T& operator[](const Key& key)\n    {\n        return emplace(key, T{}).first->second;\n    }\n\n    const T& operator[](const Key& key) const\n    {\n        return at(key);\n    }\n\n    T& at(const Key& key)\n    {\n        for (auto it = this->begin(); it != this->end(); ++it)\n        {\n            if (it->first == key)\n            {\n                return it->second;\n            }\n        }\n\n        JSON_THROW(std::out_of_range(\"key not found\"));\n    }\n\n    const T& at(const Key& key) const\n    {\n        for (auto it = this->begin(); it != this->end(); ++it)\n        {\n            if (it->first == key)\n            {\n                return it->second;\n            }\n        }\n\n        JSON_THROW(std::out_of_range(\"key not found\"));\n    }\n\n    size_type erase(const Key& key)\n    {\n        for (auto it = this->begin(); it != this->end(); ++it)\n        {\n            if (it->first == key)\n            {\n                // Since we cannot move const Keys, re-construct them in place\n                for (auto next = it; ++next != this->end(); ++it)\n                {\n                    it->~value_type(); // Destroy but keep allocation\n                    new (&*it) value_type{std::move(*next)};\n                }\n                Container::pop_back();\n                return 1;\n            }\n        }\n        return 0;\n    }\n\n    iterator erase(iterator pos)\n    {\n        return erase(pos, std::next(pos));\n    }\n\n    iterator erase(iterator first, iterator last)\n    {\n        const auto elements_affected = std::distance(first, last);\n        const auto offset = std::distance(Container::begin(), first);\n\n        // This is the start situation. We need to delete elements_affected\n        // elements (3 in this example: e, f, g), and need to return an\n        // iterator past the last deleted element (h in this example).\n        // Note that offset is the distance from the start of the vector\n        // to first. We will need this later.\n\n        // [ a, b, c, d, e, f, g, h, i, j ]\n        //               ^        ^\n        //             first    last\n\n        // Since we cannot move const Keys, we re-construct them in place.\n        // We start at first and re-construct (viz. copy) the elements from\n        // the back of the vector. Example for first iteration:\n\n        //               ,--------.\n        //               v        |   destroy e and re-construct with h\n        // [ a, b, c, d, e, f, g, h, i, j ]\n        //               ^        ^\n        //               it       it + elements_affected\n\n        for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)\n        {\n            it->~value_type(); // destroy but keep allocation\n            new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // \"move\" next element to it\n        }\n\n        // [ a, b, c, d, h, i, j, h, i, j ]\n        //               ^        ^\n        //             first    last\n\n        // remove the unneeded elements at the end of the vector\n        Container::resize(this->size() - static_cast<size_type>(elements_affected));\n\n        // [ a, b, c, d, h, i, j ]\n        //               ^        ^\n        //             first    last\n\n        // first is now pointing past the last deleted element, but we cannot\n        // use this iterator, because it may have been invalidated by the\n        // resize call. Instead, we can return begin() + offset.\n        return Container::begin() + offset;\n    }\n\n    size_type count(const Key& key) const\n    {\n        for (auto it = this->begin(); it != this->end(); ++it)\n        {\n            if (it->first == key)\n            {\n                return 1;\n            }\n        }\n        return 0;\n    }\n\n    iterator find(const Key& key)\n    {\n        for (auto it = this->begin(); it != this->end(); ++it)\n        {\n            if (it->first == key)\n            {\n                return it;\n            }\n        }\n        return Container::end();\n    }\n\n    const_iterator find(const Key& key) const\n    {\n        for (auto it = this->begin(); it != this->end(); ++it)\n        {\n            if (it->first == key)\n            {\n                return it;\n            }\n        }\n        return Container::end();\n    }\n\n    std::pair<iterator, bool> insert( value_type&& value )\n    {\n        return emplace(value.first, std::move(value.second));\n    }\n\n    std::pair<iterator, bool> insert( const value_type& value )\n    {\n        for (auto it = this->begin(); it != this->end(); ++it)\n        {\n            if (it->first == value.first)\n            {\n                return {it, false};\n            }\n        }\n        Container::push_back(value);\n        return {--this->end(), true};\n    }\n\n    template<typename InputIt>\n    using require_input_iter = typename std::enable_if<std::is_convertible<typename std::iterator_traits<InputIt>::iterator_category,\n            std::input_iterator_tag>::value>::type;\n\n    template<typename InputIt, typename = require_input_iter<InputIt>>\n    void insert(InputIt first, InputIt last)\n    {\n        for (auto it = first; it != last; ++it)\n        {\n            insert(*it);\n        }\n    }\n};\n\n}  // namespace nlohmann\n\n\n#if defined(JSON_HAS_CPP_17)\n    #include <string_view>\n#endif\n\n/*!\n@brief namespace for Niels Lohmann\n@see https://github.com/nlohmann\n@since version 1.0.0\n*/\nnamespace nlohmann\n{\n\n/*!\n@brief a class to store JSON values\n\n@internal\n@invariant The member variables @a m_value and @a m_type have the following\nrelationship:\n- If `m_type == value_t::object`, then `m_value.object != nullptr`.\n- If `m_type == value_t::array`, then `m_value.array != nullptr`.\n- If `m_type == value_t::string`, then `m_value.string != nullptr`.\nThe invariants are checked by member function assert_invariant().\n\n@note ObjectType trick from https://stackoverflow.com/a/9860911\n@endinternal\n\n@since version 1.0.0\n\n@nosubgrouping\n*/\nNLOHMANN_BASIC_JSON_TPL_DECLARATION\nclass basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions)\n{\n  private:\n    template<detail::value_t> friend struct detail::external_constructor;\n    friend ::nlohmann::json_pointer<basic_json>;\n\n    template<typename BasicJsonType, typename InputType>\n    friend class ::nlohmann::detail::parser;\n    friend ::nlohmann::detail::serializer<basic_json>;\n    template<typename BasicJsonType>\n    friend class ::nlohmann::detail::iter_impl;\n    template<typename BasicJsonType, typename CharType>\n    friend class ::nlohmann::detail::binary_writer;\n    template<typename BasicJsonType, typename InputType, typename SAX>\n    friend class ::nlohmann::detail::binary_reader;\n    template<typename BasicJsonType>\n    friend class ::nlohmann::detail::json_sax_dom_parser;\n    template<typename BasicJsonType>\n    friend class ::nlohmann::detail::json_sax_dom_callback_parser;\n    friend class ::nlohmann::detail::exception;\n\n    /// workaround type for MSVC\n    using basic_json_t = NLOHMANN_BASIC_JSON_TPL;\n\n  JSON_PRIVATE_UNLESS_TESTED:\n    // convenience aliases for types residing in namespace detail;\n    using lexer = ::nlohmann::detail::lexer_base<basic_json>;\n\n    template<typename InputAdapterType>\n    static ::nlohmann::detail::parser<basic_json, InputAdapterType> parser(\n        InputAdapterType adapter,\n        detail::parser_callback_t<basic_json>cb = nullptr,\n        const bool allow_exceptions = true,\n        const bool ignore_comments = false\n                                 )\n    {\n        return ::nlohmann::detail::parser<basic_json, InputAdapterType>(std::move(adapter),\n                std::move(cb), allow_exceptions, ignore_comments);\n    }\n\n  private:\n    using primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t;\n    template<typename BasicJsonType>\n    using internal_iterator = ::nlohmann::detail::internal_iterator<BasicJsonType>;\n    template<typename BasicJsonType>\n    using iter_impl = ::nlohmann::detail::iter_impl<BasicJsonType>;\n    template<typename Iterator>\n    using iteration_proxy = ::nlohmann::detail::iteration_proxy<Iterator>;\n    template<typename Base> using json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator<Base>;\n\n    template<typename CharType>\n    using output_adapter_t = ::nlohmann::detail::output_adapter_t<CharType>;\n\n    template<typename InputType>\n    using binary_reader = ::nlohmann::detail::binary_reader<basic_json, InputType>;\n    template<typename CharType> using binary_writer = ::nlohmann::detail::binary_writer<basic_json, CharType>;\n\n  JSON_PRIVATE_UNLESS_TESTED:\n    using serializer = ::nlohmann::detail::serializer<basic_json>;\n\n  public:\n    using value_t = detail::value_t;\n    /// JSON Pointer, see @ref nlohmann::json_pointer\n    using json_pointer = ::nlohmann::json_pointer<basic_json>;\n    template<typename T, typename SFINAE>\n    using json_serializer = JSONSerializer<T, SFINAE>;\n    /// how to treat decoding errors\n    using error_handler_t = detail::error_handler_t;\n    /// how to treat CBOR tags\n    using cbor_tag_handler_t = detail::cbor_tag_handler_t;\n    /// helper type for initializer lists of basic_json values\n    using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>;\n\n    using input_format_t = detail::input_format_t;\n    /// SAX interface type, see @ref nlohmann::json_sax\n    using json_sax_t = json_sax<basic_json>;\n\n    ////////////////\n    // exceptions //\n    ////////////////\n\n    /// @name exceptions\n    /// Classes to implement user-defined exceptions.\n    /// @{\n\n    using exception = detail::exception;\n    using parse_error = detail::parse_error;\n    using invalid_iterator = detail::invalid_iterator;\n    using type_error = detail::type_error;\n    using out_of_range = detail::out_of_range;\n    using other_error = detail::other_error;\n\n    /// @}\n\n\n    /////////////////////\n    // container types //\n    /////////////////////\n\n    /// @name container types\n    /// The canonic container types to use @ref basic_json like any other STL\n    /// container.\n    /// @{\n\n    /// the type of elements in a basic_json container\n    using value_type = basic_json;\n\n    /// the type of an element reference\n    using reference = value_type&;\n    /// the type of an element const reference\n    using const_reference = const value_type&;\n\n    /// a type to represent differences between iterators\n    using difference_type = std::ptrdiff_t;\n    /// a type to represent container sizes\n    using size_type = std::size_t;\n\n    /// the allocator type\n    using allocator_type = AllocatorType<basic_json>;\n\n    /// the type of an element pointer\n    using pointer = typename std::allocator_traits<allocator_type>::pointer;\n    /// the type of an element const pointer\n    using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer;\n\n    /// an iterator for a basic_json container\n    using iterator = iter_impl<basic_json>;\n    /// a const iterator for a basic_json container\n    using const_iterator = iter_impl<const basic_json>;\n    /// a reverse iterator for a basic_json container\n    using reverse_iterator = json_reverse_iterator<typename basic_json::iterator>;\n    /// a const reverse iterator for a basic_json container\n    using const_reverse_iterator = json_reverse_iterator<typename basic_json::const_iterator>;\n\n    /// @}\n\n\n    /// @brief returns the allocator associated with the container\n    /// @sa https://json.nlohmann.me/api/basic_json/get_allocator/\n    static allocator_type get_allocator()\n    {\n        return allocator_type();\n    }\n\n    /// @brief returns version information on the library\n    /// @sa https://json.nlohmann.me/api/basic_json/meta/\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json meta()\n    {\n        basic_json result;\n\n        result[\"copyright\"] = \"(C) 2013-2022 Niels Lohmann\";\n        result[\"name\"] = \"JSON for Modern C++\";\n        result[\"url\"] = \"https://github.com/nlohmann/json\";\n        result[\"version\"][\"string\"] =\n            std::to_string(NLOHMANN_JSON_VERSION_MAJOR) + \".\" +\n            std::to_string(NLOHMANN_JSON_VERSION_MINOR) + \".\" +\n            std::to_string(NLOHMANN_JSON_VERSION_PATCH);\n        result[\"version\"][\"major\"] = NLOHMANN_JSON_VERSION_MAJOR;\n        result[\"version\"][\"minor\"] = NLOHMANN_JSON_VERSION_MINOR;\n        result[\"version\"][\"patch\"] = NLOHMANN_JSON_VERSION_PATCH;\n\n#ifdef _WIN32\n        result[\"platform\"] = \"win32\";\n#elif defined __linux__\n        result[\"platform\"] = \"linux\";\n#elif defined __APPLE__\n        result[\"platform\"] = \"apple\";\n#elif defined __unix__\n        result[\"platform\"] = \"unix\";\n#else\n        result[\"platform\"] = \"unknown\";\n#endif\n\n#if defined(__ICC) || defined(__INTEL_COMPILER)\n        result[\"compiler\"] = {{\"family\", \"icc\"}, {\"version\", __INTEL_COMPILER}};\n#elif defined(__clang__)\n        result[\"compiler\"] = {{\"family\", \"clang\"}, {\"version\", __clang_version__}};\n#elif defined(__GNUC__) || defined(__GNUG__)\n        result[\"compiler\"] = {{\"family\", \"gcc\"}, {\"version\", std::to_string(__GNUC__) + \".\" + std::to_string(__GNUC_MINOR__) + \".\" + std::to_string(__GNUC_PATCHLEVEL__)}};\n#elif defined(__HP_cc) || defined(__HP_aCC)\n        result[\"compiler\"] = \"hp\"\n#elif defined(__IBMCPP__)\n        result[\"compiler\"] = {{\"family\", \"ilecpp\"}, {\"version\", __IBMCPP__}};\n#elif defined(_MSC_VER)\n        result[\"compiler\"] = {{\"family\", \"msvc\"}, {\"version\", _MSC_VER}};\n#elif defined(__PGI)\n        result[\"compiler\"] = {{\"family\", \"pgcpp\"}, {\"version\", __PGI}};\n#elif defined(__SUNPRO_CC)\n        result[\"compiler\"] = {{\"family\", \"sunpro\"}, {\"version\", __SUNPRO_CC}};\n#else\n        result[\"compiler\"] = {{\"family\", \"unknown\"}, {\"version\", \"unknown\"}};\n#endif\n\n#ifdef __cplusplus\n        result[\"compiler\"][\"c++\"] = std::to_string(__cplusplus);\n#else\n        result[\"compiler\"][\"c++\"] = \"unknown\";\n#endif\n        return result;\n    }\n\n\n    ///////////////////////////\n    // JSON value data types //\n    ///////////////////////////\n\n    /// @name JSON value data types\n    /// The data types to store a JSON value. These types are derived from\n    /// the template arguments passed to class @ref basic_json.\n    /// @{\n\n    /// @brief object key comparator type\n    /// @sa https://json.nlohmann.me/api/basic_json/object_comparator_t/\n#if defined(JSON_HAS_CPP_14)\n    // Use transparent comparator if possible, combined with perfect forwarding\n    // on find() and count() calls prevents unnecessary string construction.\n    using object_comparator_t = std::less<>;\n#else\n    using object_comparator_t = std::less<StringType>;\n#endif\n\n    /// @brief a type for an object\n    /// @sa https://json.nlohmann.me/api/basic_json/object_t/\n    using object_t = ObjectType<StringType,\n          basic_json,\n          object_comparator_t,\n          AllocatorType<std::pair<const StringType,\n          basic_json>>>;\n\n    /// @brief a type for an array\n    /// @sa https://json.nlohmann.me/api/basic_json/array_t/\n    using array_t = ArrayType<basic_json, AllocatorType<basic_json>>;\n\n    /// @brief a type for a string\n    /// @sa https://json.nlohmann.me/api/basic_json/string_t/\n    using string_t = StringType;\n\n    /// @brief a type for a boolean\n    /// @sa https://json.nlohmann.me/api/basic_json/boolean_t/\n    using boolean_t = BooleanType;\n\n    /// @brief a type for a number (integer)\n    /// @sa https://json.nlohmann.me/api/basic_json/number_integer_t/\n    using number_integer_t = NumberIntegerType;\n\n    /// @brief a type for a number (unsigned)\n    /// @sa https://json.nlohmann.me/api/basic_json/number_unsigned_t/\n    using number_unsigned_t = NumberUnsignedType;\n\n    /// @brief a type for a number (floating-point)\n    /// @sa https://json.nlohmann.me/api/basic_json/number_float_t/\n    using number_float_t = NumberFloatType;\n\n    /// @brief a type for a packed binary type\n    /// @sa https://json.nlohmann.me/api/basic_json/binary_t/\n    using binary_t = nlohmann::byte_container_with_subtype<BinaryType>;\n\n    /// @}\n\n  private:\n\n    /// helper for exception-safe object creation\n    template<typename T, typename... Args>\n    JSON_HEDLEY_RETURNS_NON_NULL\n    static T* create(Args&& ... args)\n    {\n        AllocatorType<T> alloc;\n        using AllocatorTraits = std::allocator_traits<AllocatorType<T>>;\n\n        auto deleter = [&](T * obj)\n        {\n            AllocatorTraits::deallocate(alloc, obj, 1);\n        };\n        std::unique_ptr<T, decltype(deleter)> obj(AllocatorTraits::allocate(alloc, 1), deleter);\n        AllocatorTraits::construct(alloc, obj.get(), std::forward<Args>(args)...);\n        JSON_ASSERT(obj != nullptr);\n        return obj.release();\n    }\n\n    ////////////////////////\n    // JSON value storage //\n    ////////////////////////\n\n  JSON_PRIVATE_UNLESS_TESTED:\n    /*!\n    @brief a JSON value\n\n    The actual storage for a JSON value of the @ref basic_json class. This\n    union combines the different storage types for the JSON value types\n    defined in @ref value_t.\n\n    JSON type | value_t type    | used type\n    --------- | --------------- | ------------------------\n    object    | object          | pointer to @ref object_t\n    array     | array           | pointer to @ref array_t\n    string    | string          | pointer to @ref string_t\n    boolean   | boolean         | @ref boolean_t\n    number    | number_integer  | @ref number_integer_t\n    number    | number_unsigned | @ref number_unsigned_t\n    number    | number_float    | @ref number_float_t\n    binary    | binary          | pointer to @ref binary_t\n    null      | null            | *no value is stored*\n\n    @note Variable-length types (objects, arrays, and strings) are stored as\n    pointers. The size of the union should not exceed 64 bits if the default\n    value types are used.\n\n    @since version 1.0.0\n    */\n    union json_value\n    {\n        /// object (stored with pointer to save storage)\n        object_t* object;\n        /// array (stored with pointer to save storage)\n        array_t* array;\n        /// string (stored with pointer to save storage)\n        string_t* string;\n        /// binary (stored with pointer to save storage)\n        binary_t* binary;\n        /// boolean\n        boolean_t boolean;\n        /// number (integer)\n        number_integer_t number_integer;\n        /// number (unsigned integer)\n        number_unsigned_t number_unsigned;\n        /// number (floating-point)\n        number_float_t number_float;\n\n        /// default constructor (for null values)\n        json_value() = default;\n        /// constructor for booleans\n        json_value(boolean_t v) noexcept : boolean(v) {}\n        /// constructor for numbers (integer)\n        json_value(number_integer_t v) noexcept : number_integer(v) {}\n        /// constructor for numbers (unsigned)\n        json_value(number_unsigned_t v) noexcept : number_unsigned(v) {}\n        /// constructor for numbers (floating-point)\n        json_value(number_float_t v) noexcept : number_float(v) {}\n        /// constructor for empty values of a given type\n        json_value(value_t t)\n        {\n            switch (t)\n            {\n                case value_t::object:\n                {\n                    object = create<object_t>();\n                    break;\n                }\n\n                case value_t::array:\n                {\n                    array = create<array_t>();\n                    break;\n                }\n\n                case value_t::string:\n                {\n                    string = create<string_t>(\"\");\n                    break;\n                }\n\n                case value_t::binary:\n                {\n                    binary = create<binary_t>();\n                    break;\n                }\n\n                case value_t::boolean:\n                {\n                    boolean = static_cast<boolean_t>(false);\n                    break;\n                }\n\n                case value_t::number_integer:\n                {\n                    number_integer = static_cast<number_integer_t>(0);\n                    break;\n                }\n\n                case value_t::number_unsigned:\n                {\n                    number_unsigned = static_cast<number_unsigned_t>(0);\n                    break;\n                }\n\n                case value_t::number_float:\n                {\n                    number_float = static_cast<number_float_t>(0.0);\n                    break;\n                }\n\n                case value_t::null:\n                {\n                    object = nullptr;  // silence warning, see #821\n                    break;\n                }\n\n                case value_t::discarded:\n                default:\n                {\n                    object = nullptr;  // silence warning, see #821\n                    if (JSON_HEDLEY_UNLIKELY(t == value_t::null))\n                    {\n                        JSON_THROW(other_error::create(500, \"961c151d2e87f2686a955a9be24d316f1362bf21 3.10.5\", basic_json())); // LCOV_EXCL_LINE\n                    }\n                    break;\n                }\n            }\n        }\n\n        /// constructor for strings\n        json_value(const string_t& value) : string(create<string_t>(value)) {}\n\n        /// constructor for rvalue strings\n        json_value(string_t&& value) : string(create<string_t>(std::move(value))) {}\n\n        /// constructor for objects\n        json_value(const object_t& value) : object(create<object_t>(value)) {}\n\n        /// constructor for rvalue objects\n        json_value(object_t&& value) : object(create<object_t>(std::move(value))) {}\n\n        /// constructor for arrays\n        json_value(const array_t& value) : array(create<array_t>(value)) {}\n\n        /// constructor for rvalue arrays\n        json_value(array_t&& value) : array(create<array_t>(std::move(value))) {}\n\n        /// constructor for binary arrays\n        json_value(const typename binary_t::container_type& value) : binary(create<binary_t>(value)) {}\n\n        /// constructor for rvalue binary arrays\n        json_value(typename binary_t::container_type&& value) : binary(create<binary_t>(std::move(value))) {}\n\n        /// constructor for binary arrays (internal type)\n        json_value(const binary_t& value) : binary(create<binary_t>(value)) {}\n\n        /// constructor for rvalue binary arrays (internal type)\n        json_value(binary_t&& value) : binary(create<binary_t>(std::move(value))) {}\n\n        void destroy(value_t t)\n        {\n            if (t == value_t::array || t == value_t::object)\n            {\n                // flatten the current json_value to a heap-allocated stack\n                std::vector<basic_json> stack;\n\n                // move the top-level items to stack\n                if (t == value_t::array)\n                {\n                    stack.reserve(array->size());\n                    std::move(array->begin(), array->end(), std::back_inserter(stack));\n                }\n                else\n                {\n                    stack.reserve(object->size());\n                    for (auto&& it : *object)\n                    {\n                        stack.push_back(std::move(it.second));\n                    }\n                }\n\n                while (!stack.empty())\n                {\n                    // move the last item to local variable to be processed\n                    basic_json current_item(std::move(stack.back()));\n                    stack.pop_back();\n\n                    // if current_item is array/object, move\n                    // its children to the stack to be processed later\n                    if (current_item.is_array())\n                    {\n                        std::move(current_item.m_value.array->begin(), current_item.m_value.array->end(), std::back_inserter(stack));\n\n                        current_item.m_value.array->clear();\n                    }\n                    else if (current_item.is_object())\n                    {\n                        for (auto&& it : *current_item.m_value.object)\n                        {\n                            stack.push_back(std::move(it.second));\n                        }\n\n                        current_item.m_value.object->clear();\n                    }\n\n                    // it's now safe that current_item get destructed\n                    // since it doesn't have any children\n                }\n            }\n\n            switch (t)\n            {\n                case value_t::object:\n                {\n                    AllocatorType<object_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, object);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1);\n                    break;\n                }\n\n                case value_t::array:\n                {\n                    AllocatorType<array_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, array);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1);\n                    break;\n                }\n\n                case value_t::string:\n                {\n                    AllocatorType<string_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, string);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1);\n                    break;\n                }\n\n                case value_t::binary:\n                {\n                    AllocatorType<binary_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, binary);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, binary, 1);\n                    break;\n                }\n\n                case value_t::null:\n                case value_t::boolean:\n                case value_t::number_integer:\n                case value_t::number_unsigned:\n                case value_t::number_float:\n                case value_t::discarded:\n                default:\n                {\n                    break;\n                }\n            }\n        }\n    };\n\n  private:\n    /*!\n    @brief checks the class invariants\n\n    This function asserts the class invariants. It needs to be called at the\n    end of every constructor to make sure that created objects respect the\n    invariant. Furthermore, it has to be called each time the type of a JSON\n    value is changed, because the invariant expresses a relationship between\n    @a m_type and @a m_value.\n\n    Furthermore, the parent relation is checked for arrays and objects: If\n    @a check_parents true and the value is an array or object, then the\n    container's elements must have the current value as parent.\n\n    @param[in] check_parents  whether the parent relation should be checked.\n               The value is true by default and should only be set to false\n               during destruction of objects when the invariant does not\n               need to hold.\n    */\n    void assert_invariant(bool check_parents = true) const noexcept\n    {\n        JSON_ASSERT(m_type != value_t::object || m_value.object != nullptr);\n        JSON_ASSERT(m_type != value_t::array || m_value.array != nullptr);\n        JSON_ASSERT(m_type != value_t::string || m_value.string != nullptr);\n        JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr);\n\n#if JSON_DIAGNOSTICS\n        JSON_TRY\n        {\n            // cppcheck-suppress assertWithSideEffect\n            JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j)\n            {\n                return j.m_parent == this;\n            }));\n        }\n        JSON_CATCH(...) {} // LCOV_EXCL_LINE\n#endif\n        static_cast<void>(check_parents);\n    }\n\n    void set_parents()\n    {\n#if JSON_DIAGNOSTICS\n        switch (m_type)\n        {\n            case value_t::array:\n            {\n                for (auto& element : *m_value.array)\n                {\n                    element.m_parent = this;\n                }\n                break;\n            }\n\n            case value_t::object:\n            {\n                for (auto& element : *m_value.object)\n                {\n                    element.second.m_parent = this;\n                }\n                break;\n            }\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n                break;\n        }\n#endif\n    }\n\n    iterator set_parents(iterator it, typename iterator::difference_type count_set_parents)\n    {\n#if JSON_DIAGNOSTICS\n        for (typename iterator::difference_type i = 0; i < count_set_parents; ++i)\n        {\n            (it + i)->m_parent = this;\n        }\n#else\n        static_cast<void>(count_set_parents);\n#endif\n        return it;\n    }\n\n    reference set_parent(reference j, std::size_t old_capacity = static_cast<std::size_t>(-1))\n    {\n#if JSON_DIAGNOSTICS\n        if (old_capacity != static_cast<std::size_t>(-1))\n        {\n            // see https://github.com/nlohmann/json/issues/2838\n            JSON_ASSERT(type() == value_t::array);\n            if (JSON_HEDLEY_UNLIKELY(m_value.array->capacity() != old_capacity))\n            {\n                // capacity has changed: update all parents\n                set_parents();\n                return j;\n            }\n        }\n\n        // ordered_json uses a vector internally, so pointers could have\n        // been invalidated; see https://github.com/nlohmann/json/issues/2962\n#ifdef JSON_HEDLEY_MSVC_VERSION\n#pragma warning(push )\n#pragma warning(disable : 4127) // ignore warning to replace if with if constexpr\n#endif\n        if (detail::is_ordered_map<object_t>::value)\n        {\n            set_parents();\n            return j;\n        }\n#ifdef JSON_HEDLEY_MSVC_VERSION\n#pragma warning( pop )\n#endif\n\n        j.m_parent = this;\n#else\n        static_cast<void>(j);\n        static_cast<void>(old_capacity);\n#endif\n        return j;\n    }\n\n  public:\n    //////////////////////////\n    // JSON parser callback //\n    //////////////////////////\n\n    /// @brief parser event types\n    /// @sa https://json.nlohmann.me/api/basic_json/parse_event_t/\n    using parse_event_t = detail::parse_event_t;\n\n    /// @brief per-element parser callback type\n    /// @sa https://json.nlohmann.me/api/basic_json/parser_callback_t/\n    using parser_callback_t = detail::parser_callback_t<basic_json>;\n\n    //////////////////\n    // constructors //\n    //////////////////\n\n    /// @name constructors and destructors\n    /// Constructors of class @ref basic_json, copy/move constructor, copy\n    /// assignment, static functions creating objects, and the destructor.\n    /// @{\n\n    /// @brief create an empty value with a given type\n    /// @sa https://json.nlohmann.me/api/basic_json/basic_json/\n    basic_json(const value_t v)\n        : m_type(v), m_value(v)\n    {\n        assert_invariant();\n    }\n\n    /// @brief create a null object\n    /// @sa https://json.nlohmann.me/api/basic_json/basic_json/\n    basic_json(std::nullptr_t = nullptr) noexcept\n        : basic_json(value_t::null)\n    {\n        assert_invariant();\n    }\n\n    /// @brief create a JSON value from compatible types\n    /// @sa https://json.nlohmann.me/api/basic_json/basic_json/\n    template < typename CompatibleType,\n               typename U = detail::uncvref_t<CompatibleType>,\n               detail::enable_if_t <\n                   !detail::is_basic_json<U>::value && detail::is_compatible_type<basic_json_t, U>::value, int > = 0 >\n    basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload,bugprone-exception-escape)\n                JSONSerializer<U>::to_json(std::declval<basic_json_t&>(),\n                                           std::forward<CompatibleType>(val))))\n    {\n        JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));\n        set_parents();\n        assert_invariant();\n    }\n\n    /// @brief create a JSON value from an existing one\n    /// @sa https://json.nlohmann.me/api/basic_json/basic_json/\n    template < typename BasicJsonType,\n               detail::enable_if_t <\n                   detail::is_basic_json<BasicJsonType>::value&& !std::is_same<basic_json, BasicJsonType>::value, int > = 0 >\n    basic_json(const BasicJsonType& val)\n    {\n        using other_boolean_t = typename BasicJsonType::boolean_t;\n        using other_number_float_t = typename BasicJsonType::number_float_t;\n        using other_number_integer_t = typename BasicJsonType::number_integer_t;\n        using other_number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n        using other_string_t = typename BasicJsonType::string_t;\n        using other_object_t = typename BasicJsonType::object_t;\n        using other_array_t = typename BasicJsonType::array_t;\n        using other_binary_t = typename BasicJsonType::binary_t;\n\n        switch (val.type())\n        {\n            case value_t::boolean:\n                JSONSerializer<other_boolean_t>::to_json(*this, val.template get<other_boolean_t>());\n                break;\n            case value_t::number_float:\n                JSONSerializer<other_number_float_t>::to_json(*this, val.template get<other_number_float_t>());\n                break;\n            case value_t::number_integer:\n                JSONSerializer<other_number_integer_t>::to_json(*this, val.template get<other_number_integer_t>());\n                break;\n            case value_t::number_unsigned:\n                JSONSerializer<other_number_unsigned_t>::to_json(*this, val.template get<other_number_unsigned_t>());\n                break;\n            case value_t::string:\n                JSONSerializer<other_string_t>::to_json(*this, val.template get_ref<const other_string_t&>());\n                break;\n            case value_t::object:\n                JSONSerializer<other_object_t>::to_json(*this, val.template get_ref<const other_object_t&>());\n                break;\n            case value_t::array:\n                JSONSerializer<other_array_t>::to_json(*this, val.template get_ref<const other_array_t&>());\n                break;\n            case value_t::binary:\n                JSONSerializer<other_binary_t>::to_json(*this, val.template get_ref<const other_binary_t&>());\n                break;\n            case value_t::null:\n                *this = nullptr;\n                break;\n            case value_t::discarded:\n                m_type = value_t::discarded;\n                break;\n            default:            // LCOV_EXCL_LINE\n                JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n        }\n        set_parents();\n        assert_invariant();\n    }\n\n    /// @brief create a container (array or object) from an initializer list\n    /// @sa https://json.nlohmann.me/api/basic_json/basic_json/\n    basic_json(initializer_list_t init,\n               bool type_deduction = true,\n               value_t manual_type = value_t::array)\n    {\n        // check if each element is an array with two elements whose first\n        // element is a string\n        bool is_an_object = std::all_of(init.begin(), init.end(),\n                                        [](const detail::json_ref<basic_json>& element_ref)\n        {\n            return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[0].is_string();\n        });\n\n        // adjust type if type deduction is not wanted\n        if (!type_deduction)\n        {\n            // if array is wanted, do not create an object though possible\n            if (manual_type == value_t::array)\n            {\n                is_an_object = false;\n            }\n\n            // if object is wanted but impossible, throw an exception\n            if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object))\n            {\n                JSON_THROW(type_error::create(301, \"cannot create object from initializer list\", basic_json()));\n            }\n        }\n\n        if (is_an_object)\n        {\n            // the initializer list is a list of pairs -> create object\n            m_type = value_t::object;\n            m_value = value_t::object;\n\n            for (auto& element_ref : init)\n            {\n                auto element = element_ref.moved_or_copied();\n                m_value.object->emplace(\n                    std::move(*((*element.m_value.array)[0].m_value.string)),\n                    std::move((*element.m_value.array)[1]));\n            }\n        }\n        else\n        {\n            // the initializer list describes an array -> create array\n            m_type = value_t::array;\n            m_value.array = create<array_t>(init.begin(), init.end());\n        }\n\n        set_parents();\n        assert_invariant();\n    }\n\n    /// @brief explicitly create a binary array (without subtype)\n    /// @sa https://json.nlohmann.me/api/basic_json/binary/\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json binary(const typename binary_t::container_type& init)\n    {\n        auto res = basic_json();\n        res.m_type = value_t::binary;\n        res.m_value = init;\n        return res;\n    }\n\n    /// @brief explicitly create a binary array (with subtype)\n    /// @sa https://json.nlohmann.me/api/basic_json/binary/\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json binary(const typename binary_t::container_type& init, typename binary_t::subtype_type subtype)\n    {\n        auto res = basic_json();\n        res.m_type = value_t::binary;\n        res.m_value = binary_t(init, subtype);\n        return res;\n    }\n\n    /// @brief explicitly create a binary array\n    /// @sa https://json.nlohmann.me/api/basic_json/binary/\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json binary(typename binary_t::container_type&& init)\n    {\n        auto res = basic_json();\n        res.m_type = value_t::binary;\n        res.m_value = std::move(init);\n        return res;\n    }\n\n    /// @brief explicitly create a binary array (with subtype)\n    /// @sa https://json.nlohmann.me/api/basic_json/binary/\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json binary(typename binary_t::container_type&& init, typename binary_t::subtype_type subtype)\n    {\n        auto res = basic_json();\n        res.m_type = value_t::binary;\n        res.m_value = binary_t(std::move(init), subtype);\n        return res;\n    }\n\n    /// @brief explicitly create an array from an initializer list\n    /// @sa https://json.nlohmann.me/api/basic_json/array/\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json array(initializer_list_t init = {})\n    {\n        return basic_json(init, false, value_t::array);\n    }\n\n    /// @brief explicitly create an object from an initializer list\n    /// @sa https://json.nlohmann.me/api/basic_json/object/\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json object(initializer_list_t init = {})\n    {\n        return basic_json(init, false, value_t::object);\n    }\n\n    /// @brief construct an array with count copies of given value\n    /// @sa https://json.nlohmann.me/api/basic_json/basic_json/\n    basic_json(size_type cnt, const basic_json& val)\n        : m_type(value_t::array)\n    {\n        m_value.array = create<array_t>(cnt, val);\n        set_parents();\n        assert_invariant();\n    }\n\n    /// @brief construct a JSON container given an iterator range\n    /// @sa https://json.nlohmann.me/api/basic_json/basic_json/\n    template < class InputIT, typename std::enable_if <\n                   std::is_same<InputIT, typename basic_json_t::iterator>::value ||\n                   std::is_same<InputIT, typename basic_json_t::const_iterator>::value, int >::type = 0 >\n    basic_json(InputIT first, InputIT last)\n    {\n        JSON_ASSERT(first.m_object != nullptr);\n        JSON_ASSERT(last.m_object != nullptr);\n\n        // make sure iterator fits the current value\n        if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(201, \"iterators are not compatible\", basic_json()));\n        }\n\n        // copy type from first iterator\n        m_type = first.m_object->m_type;\n\n        // check if iterator range is complete for primitive values\n        switch (m_type)\n        {\n            case value_t::boolean:\n            case value_t::number_float:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::string:\n            {\n                if (JSON_HEDLEY_UNLIKELY(!first.m_it.primitive_iterator.is_begin()\n                                         || !last.m_it.primitive_iterator.is_end()))\n                {\n                    JSON_THROW(invalid_iterator::create(204, \"iterators out of range\", *first.m_object));\n                }\n                break;\n            }\n\n            case value_t::null:\n            case value_t::object:\n            case value_t::array:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n                break;\n        }\n\n        switch (m_type)\n        {\n            case value_t::number_integer:\n            {\n                m_value.number_integer = first.m_object->m_value.number_integer;\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                m_value.number_unsigned = first.m_object->m_value.number_unsigned;\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                m_value.number_float = first.m_object->m_value.number_float;\n                break;\n            }\n\n            case value_t::boolean:\n            {\n                m_value.boolean = first.m_object->m_value.boolean;\n                break;\n            }\n\n            case value_t::string:\n            {\n                m_value = *first.m_object->m_value.string;\n                break;\n            }\n\n            case value_t::object:\n            {\n                m_value.object = create<object_t>(first.m_it.object_iterator,\n                                                  last.m_it.object_iterator);\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_value.array = create<array_t>(first.m_it.array_iterator,\n                                                last.m_it.array_iterator);\n                break;\n            }\n\n            case value_t::binary:\n            {\n                m_value = *first.m_object->m_value.binary;\n                break;\n            }\n\n            case value_t::null:\n            case value_t::discarded:\n            default:\n                JSON_THROW(invalid_iterator::create(206, \"cannot construct with iterators from \" + std::string(first.m_object->type_name()), *first.m_object));\n        }\n\n        set_parents();\n        assert_invariant();\n    }\n\n\n    ///////////////////////////////////////\n    // other constructors and destructor //\n    ///////////////////////////////////////\n\n    template<typename JsonRef,\n             detail::enable_if_t<detail::conjunction<detail::is_json_ref<JsonRef>,\n                                 std::is_same<typename JsonRef::value_type, basic_json>>::value, int> = 0 >\n    basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {}\n\n    /// @brief copy constructor\n    /// @sa https://json.nlohmann.me/api/basic_json/basic_json/\n    basic_json(const basic_json& other)\n        : m_type(other.m_type)\n    {\n        // check of passed value is valid\n        other.assert_invariant();\n\n        switch (m_type)\n        {\n            case value_t::object:\n            {\n                m_value = *other.m_value.object;\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_value = *other.m_value.array;\n                break;\n            }\n\n            case value_t::string:\n            {\n                m_value = *other.m_value.string;\n                break;\n            }\n\n            case value_t::boolean:\n            {\n                m_value = other.m_value.boolean;\n                break;\n            }\n\n            case value_t::number_integer:\n            {\n                m_value = other.m_value.number_integer;\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                m_value = other.m_value.number_unsigned;\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                m_value = other.m_value.number_float;\n                break;\n            }\n\n            case value_t::binary:\n            {\n                m_value = *other.m_value.binary;\n                break;\n            }\n\n            case value_t::null:\n            case value_t::discarded:\n            default:\n                break;\n        }\n\n        set_parents();\n        assert_invariant();\n    }\n\n    /// @brief move constructor\n    /// @sa https://json.nlohmann.me/api/basic_json/basic_json/\n    basic_json(basic_json&& other) noexcept\n        : m_type(std::move(other.m_type)),\n          m_value(std::move(other.m_value))\n    {\n        // check that passed value is valid\n        other.assert_invariant(false);\n\n        // invalidate payload\n        other.m_type = value_t::null;\n        other.m_value = {};\n\n        set_parents();\n        assert_invariant();\n    }\n\n    /// @brief copy assignment\n    /// @sa https://json.nlohmann.me/api/basic_json/operator=/\n    basic_json& operator=(basic_json other) noexcept (\n        std::is_nothrow_move_constructible<value_t>::value&&\n        std::is_nothrow_move_assignable<value_t>::value&&\n        std::is_nothrow_move_constructible<json_value>::value&&\n        std::is_nothrow_move_assignable<json_value>::value\n    )\n    {\n        // check that passed value is valid\n        other.assert_invariant();\n\n        using std::swap;\n        swap(m_type, other.m_type);\n        swap(m_value, other.m_value);\n\n        set_parents();\n        assert_invariant();\n        return *this;\n    }\n\n    /// @brief destructor\n    /// @sa https://json.nlohmann.me/api/basic_json/~basic_json/\n    ~basic_json() noexcept\n    {\n        assert_invariant(false);\n        m_value.destroy(m_type);\n    }\n\n    /// @}\n\n  public:\n    ///////////////////////\n    // object inspection //\n    ///////////////////////\n\n    /// @name object inspection\n    /// Functions to inspect the type of a JSON value.\n    /// @{\n\n    /// @brief serialization\n    /// @sa https://json.nlohmann.me/api/basic_json/dump/\n    string_t dump(const int indent = -1,\n                  const char indent_char = ' ',\n                  const bool ensure_ascii = false,\n                  const error_handler_t error_handler = error_handler_t::strict) const\n    {\n        string_t result;\n        serializer s(detail::output_adapter<char, string_t>(result), indent_char, error_handler);\n\n        if (indent >= 0)\n        {\n            s.dump(*this, true, ensure_ascii, static_cast<unsigned int>(indent));\n        }\n        else\n        {\n            s.dump(*this, false, ensure_ascii, 0);\n        }\n\n        return result;\n    }\n\n    /// @brief return the type of the JSON value (explicit)\n    /// @sa https://json.nlohmann.me/api/basic_json/type/\n    constexpr value_t type() const noexcept\n    {\n        return m_type;\n    }\n\n    /// @brief return whether type is primitive\n    /// @sa https://json.nlohmann.me/api/basic_json/is_primitive/\n    constexpr bool is_primitive() const noexcept\n    {\n        return is_null() || is_string() || is_boolean() || is_number() || is_binary();\n    }\n\n    /// @brief return whether type is structured\n    /// @sa https://json.nlohmann.me/api/basic_json/is_structured/\n    constexpr bool is_structured() const noexcept\n    {\n        return is_array() || is_object();\n    }\n\n    /// @brief return whether value is null\n    /// @sa https://json.nlohmann.me/api/basic_json/is_null/\n    constexpr bool is_null() const noexcept\n    {\n        return m_type == value_t::null;\n    }\n\n    /// @brief return whether value is a boolean\n    /// @sa https://json.nlohmann.me/api/basic_json/is_boolean/\n    constexpr bool is_boolean() const noexcept\n    {\n        return m_type == value_t::boolean;\n    }\n\n    /// @brief return whether value is a number\n    /// @sa https://json.nlohmann.me/api/basic_json/is_number/\n    constexpr bool is_number() const noexcept\n    {\n        return is_number_integer() || is_number_float();\n    }\n\n    /// @brief return whether value is an integer number\n    /// @sa https://json.nlohmann.me/api/basic_json/is_number_integer/\n    constexpr bool is_number_integer() const noexcept\n    {\n        return m_type == value_t::number_integer || m_type == value_t::number_unsigned;\n    }\n\n    /// @brief return whether value is an unsigned integer number\n    /// @sa https://json.nlohmann.me/api/basic_json/is_number_unsigned/\n    constexpr bool is_number_unsigned() const noexcept\n    {\n        return m_type == value_t::number_unsigned;\n    }\n\n    /// @brief return whether value is a floating-point number\n    /// @sa https://json.nlohmann.me/api/basic_json/is_number_float/\n    constexpr bool is_number_float() const noexcept\n    {\n        return m_type == value_t::number_float;\n    }\n\n    /// @brief return whether value is an object\n    /// @sa https://json.nlohmann.me/api/basic_json/is_object/\n    constexpr bool is_object() const noexcept\n    {\n        return m_type == value_t::object;\n    }\n\n    /// @brief return whether value is an array\n    /// @sa https://json.nlohmann.me/api/basic_json/is_array/\n    constexpr bool is_array() const noexcept\n    {\n        return m_type == value_t::array;\n    }\n\n    /// @brief return whether value is a string\n    /// @sa https://json.nlohmann.me/api/basic_json/is_string/\n    constexpr bool is_string() const noexcept\n    {\n        return m_type == value_t::string;\n    }\n\n    /// @brief return whether value is a binary array\n    /// @sa https://json.nlohmann.me/api/basic_json/is_binary/\n    constexpr bool is_binary() const noexcept\n    {\n        return m_type == value_t::binary;\n    }\n\n    /// @brief return whether value is discarded\n    /// @sa https://json.nlohmann.me/api/basic_json/is_discarded/\n    constexpr bool is_discarded() const noexcept\n    {\n        return m_type == value_t::discarded;\n    }\n\n    /// @brief return the type of the JSON value (implicit)\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_value_t/\n    constexpr operator value_t() const noexcept\n    {\n        return m_type;\n    }\n\n    /// @}\n\n  private:\n    //////////////////\n    // value access //\n    //////////////////\n\n    /// get a boolean (explicit)\n    boolean_t get_impl(boolean_t* /*unused*/) const\n    {\n        if (JSON_HEDLEY_LIKELY(is_boolean()))\n        {\n            return m_value.boolean;\n        }\n\n        JSON_THROW(type_error::create(302, \"type must be boolean, but is \" + std::string(type_name()), *this));\n    }\n\n    /// get a pointer to the value (object)\n    object_t* get_impl_ptr(object_t* /*unused*/) noexcept\n    {\n        return is_object() ? m_value.object : nullptr;\n    }\n\n    /// get a pointer to the value (object)\n    constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept\n    {\n        return is_object() ? m_value.object : nullptr;\n    }\n\n    /// get a pointer to the value (array)\n    array_t* get_impl_ptr(array_t* /*unused*/) noexcept\n    {\n        return is_array() ? m_value.array : nullptr;\n    }\n\n    /// get a pointer to the value (array)\n    constexpr const array_t* get_impl_ptr(const array_t* /*unused*/) const noexcept\n    {\n        return is_array() ? m_value.array : nullptr;\n    }\n\n    /// get a pointer to the value (string)\n    string_t* get_impl_ptr(string_t* /*unused*/) noexcept\n    {\n        return is_string() ? m_value.string : nullptr;\n    }\n\n    /// get a pointer to the value (string)\n    constexpr const string_t* get_impl_ptr(const string_t* /*unused*/) const noexcept\n    {\n        return is_string() ? m_value.string : nullptr;\n    }\n\n    /// get a pointer to the value (boolean)\n    boolean_t* get_impl_ptr(boolean_t* /*unused*/) noexcept\n    {\n        return is_boolean() ? &m_value.boolean : nullptr;\n    }\n\n    /// get a pointer to the value (boolean)\n    constexpr const boolean_t* get_impl_ptr(const boolean_t* /*unused*/) const noexcept\n    {\n        return is_boolean() ? &m_value.boolean : nullptr;\n    }\n\n    /// get a pointer to the value (integer number)\n    number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept\n    {\n        return is_number_integer() ? &m_value.number_integer : nullptr;\n    }\n\n    /// get a pointer to the value (integer number)\n    constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /*unused*/) const noexcept\n    {\n        return is_number_integer() ? &m_value.number_integer : nullptr;\n    }\n\n    /// get a pointer to the value (unsigned number)\n    number_unsigned_t* get_impl_ptr(number_unsigned_t* /*unused*/) noexcept\n    {\n        return is_number_unsigned() ? &m_value.number_unsigned : nullptr;\n    }\n\n    /// get a pointer to the value (unsigned number)\n    constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t* /*unused*/) const noexcept\n    {\n        return is_number_unsigned() ? &m_value.number_unsigned : nullptr;\n    }\n\n    /// get a pointer to the value (floating-point number)\n    number_float_t* get_impl_ptr(number_float_t* /*unused*/) noexcept\n    {\n        return is_number_float() ? &m_value.number_float : nullptr;\n    }\n\n    /// get a pointer to the value (floating-point number)\n    constexpr const number_float_t* get_impl_ptr(const number_float_t* /*unused*/) const noexcept\n    {\n        return is_number_float() ? &m_value.number_float : nullptr;\n    }\n\n    /// get a pointer to the value (binary)\n    binary_t* get_impl_ptr(binary_t* /*unused*/) noexcept\n    {\n        return is_binary() ? m_value.binary : nullptr;\n    }\n\n    /// get a pointer to the value (binary)\n    constexpr const binary_t* get_impl_ptr(const binary_t* /*unused*/) const noexcept\n    {\n        return is_binary() ? m_value.binary : nullptr;\n    }\n\n    /*!\n    @brief helper function to implement get_ref()\n\n    This function helps to implement get_ref() without code duplication for\n    const and non-const overloads\n\n    @tparam ThisType will be deduced as `basic_json` or `const basic_json`\n\n    @throw type_error.303 if ReferenceType does not match underlying value\n    type of the current JSON\n    */\n    template<typename ReferenceType, typename ThisType>\n    static ReferenceType get_ref_impl(ThisType& obj)\n    {\n        // delegate the call to get_ptr<>()\n        auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();\n\n        if (JSON_HEDLEY_LIKELY(ptr != nullptr))\n        {\n            return *ptr;\n        }\n\n        JSON_THROW(type_error::create(303, \"incompatible ReferenceType for get_ref, actual type is \" + std::string(obj.type_name()), obj));\n    }\n\n  public:\n    /// @name value access\n    /// Direct access to the stored value of a JSON value.\n    /// @{\n\n    /// @brief get a pointer value (implicit)\n    /// @sa https://json.nlohmann.me/api/basic_json/get_ptr/\n    template<typename PointerType, typename std::enable_if<\n                 std::is_pointer<PointerType>::value, int>::type = 0>\n    auto get_ptr() noexcept -> decltype(std::declval<basic_json_t&>().get_impl_ptr(std::declval<PointerType>()))\n    {\n        // delegate the call to get_impl_ptr<>()\n        return get_impl_ptr(static_cast<PointerType>(nullptr));\n    }\n\n    /// @brief get a pointer value (implicit)\n    /// @sa https://json.nlohmann.me/api/basic_json/get_ptr/\n    template < typename PointerType, typename std::enable_if <\n                   std::is_pointer<PointerType>::value&&\n                   std::is_const<typename std::remove_pointer<PointerType>::type>::value, int >::type = 0 >\n    constexpr auto get_ptr() const noexcept -> decltype(std::declval<const basic_json_t&>().get_impl_ptr(std::declval<PointerType>()))\n    {\n        // delegate the call to get_impl_ptr<>() const\n        return get_impl_ptr(static_cast<PointerType>(nullptr));\n    }\n\n  private:\n    /*!\n    @brief get a value (explicit)\n\n    Explicit type conversion between the JSON value and a compatible value\n    which is [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible)\n    and [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible).\n    The value is converted by calling the @ref json_serializer<ValueType>\n    `from_json()` method.\n\n    The function is equivalent to executing\n    @code {.cpp}\n    ValueType ret;\n    JSONSerializer<ValueType>::from_json(*this, ret);\n    return ret;\n    @endcode\n\n    This overloads is chosen if:\n    - @a ValueType is not @ref basic_json,\n    - @ref json_serializer<ValueType> has a `from_json()` method of the form\n      `void from_json(const basic_json&, ValueType&)`, and\n    - @ref json_serializer<ValueType> does not have a `from_json()` method of\n      the form `ValueType from_json(const basic_json&)`\n\n    @tparam ValueType the returned value type\n\n    @return copy of the JSON value, converted to @a ValueType\n\n    @throw what @ref json_serializer<ValueType> `from_json()` method throws\n\n    @liveexample{The example below shows several conversions from JSON values\n    to other types. There a few things to note: (1) Floating-point numbers can\n    be converted to integers\\, (2) A JSON array can be converted to a standard\n    `std::vector<short>`\\, (3) A JSON object can be converted to C++\n    associative containers such as `std::unordered_map<std::string\\,\n    json>`.,get__ValueType_const}\n\n    @since version 2.1.0\n    */\n    template < typename ValueType,\n               detail::enable_if_t <\n                   detail::is_default_constructible<ValueType>::value&&\n                   detail::has_from_json<basic_json_t, ValueType>::value,\n                   int > = 0 >\n    ValueType get_impl(detail::priority_tag<0> /*unused*/) const noexcept(noexcept(\n                JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>())))\n    {\n        auto ret = ValueType();\n        JSONSerializer<ValueType>::from_json(*this, ret);\n        return ret;\n    }\n\n    /*!\n    @brief get a value (explicit); special case\n\n    Explicit type conversion between the JSON value and a compatible value\n    which is **not** [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible)\n    and **not** [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible).\n    The value is converted by calling the @ref json_serializer<ValueType>\n    `from_json()` method.\n\n    The function is equivalent to executing\n    @code {.cpp}\n    return JSONSerializer<ValueType>::from_json(*this);\n    @endcode\n\n    This overloads is chosen if:\n    - @a ValueType is not @ref basic_json and\n    - @ref json_serializer<ValueType> has a `from_json()` method of the form\n      `ValueType from_json(const basic_json&)`\n\n    @note If @ref json_serializer<ValueType> has both overloads of\n    `from_json()`, this one is chosen.\n\n    @tparam ValueType the returned value type\n\n    @return copy of the JSON value, converted to @a ValueType\n\n    @throw what @ref json_serializer<ValueType> `from_json()` method throws\n\n    @since version 2.1.0\n    */\n    template < typename ValueType,\n               detail::enable_if_t <\n                   detail::has_non_default_from_json<basic_json_t, ValueType>::value,\n                   int > = 0 >\n    ValueType get_impl(detail::priority_tag<1> /*unused*/) const noexcept(noexcept(\n                JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>())))\n    {\n        return JSONSerializer<ValueType>::from_json(*this);\n    }\n\n    /*!\n    @brief get special-case overload\n\n    This overloads converts the current @ref basic_json in a different\n    @ref basic_json type\n\n    @tparam BasicJsonType == @ref basic_json\n\n    @return a copy of *this, converted into @a BasicJsonType\n\n    @complexity Depending on the implementation of the called `from_json()`\n                method.\n\n    @since version 3.2.0\n    */\n    template < typename BasicJsonType,\n               detail::enable_if_t <\n                   detail::is_basic_json<BasicJsonType>::value,\n                   int > = 0 >\n    BasicJsonType get_impl(detail::priority_tag<2> /*unused*/) const\n    {\n        return *this;\n    }\n\n    /*!\n    @brief get special-case overload\n\n    This overloads avoids a lot of template boilerplate, it can be seen as the\n    identity method\n\n    @tparam BasicJsonType == @ref basic_json\n\n    @return a copy of *this\n\n    @complexity Constant.\n\n    @since version 2.1.0\n    */\n    template<typename BasicJsonType,\n             detail::enable_if_t<\n                 std::is_same<BasicJsonType, basic_json_t>::value,\n                 int> = 0>\n    basic_json get_impl(detail::priority_tag<3> /*unused*/) const\n    {\n        return *this;\n    }\n\n    /*!\n    @brief get a pointer value (explicit)\n    @copydoc get()\n    */\n    template<typename PointerType,\n             detail::enable_if_t<\n                 std::is_pointer<PointerType>::value,\n                 int> = 0>\n    constexpr auto get_impl(detail::priority_tag<4> /*unused*/) const noexcept\n    -> decltype(std::declval<const basic_json_t&>().template get_ptr<PointerType>())\n    {\n        // delegate the call to get_ptr\n        return get_ptr<PointerType>();\n    }\n\n  public:\n    /*!\n    @brief get a (pointer) value (explicit)\n\n    Performs explicit type conversion between the JSON value and a compatible value if required.\n\n    - If the requested type is a pointer to the internally stored JSON value that pointer is returned.\n    No copies are made.\n\n    - If the requested type is the current @ref basic_json, or a different @ref basic_json convertible\n    from the current @ref basic_json.\n\n    - Otherwise the value is converted by calling the @ref json_serializer<ValueType> `from_json()`\n    method.\n\n    @tparam ValueTypeCV the provided value type\n    @tparam ValueType the returned value type\n\n    @return copy of the JSON value, converted to @tparam ValueType if necessary\n\n    @throw what @ref json_serializer<ValueType> `from_json()` method throws if conversion is required\n\n    @since version 2.1.0\n    */\n    template < typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>>\n#if defined(JSON_HAS_CPP_14)\n    constexpr\n#endif\n    auto get() const noexcept(\n    noexcept(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {})))\n    -> decltype(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {}))\n    {\n        // we cannot static_assert on ValueTypeCV being non-const, because\n        // there is support for get<const basic_json_t>(), which is why we\n        // still need the uncvref\n        static_assert(!std::is_reference<ValueTypeCV>::value,\n                      \"get() cannot be used with reference types, you might want to use get_ref()\");\n        return get_impl<ValueType>(detail::priority_tag<4> {});\n    }\n\n    /*!\n    @brief get a pointer value (explicit)\n\n    Explicit pointer access to the internally stored JSON value. No copies are\n    made.\n\n    @warning The pointer becomes invalid if the underlying JSON object\n    changes.\n\n    @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref\n    object_t, @ref string_t, @ref boolean_t, @ref number_integer_t,\n    @ref number_unsigned_t, or @ref number_float_t.\n\n    @return pointer to the internally stored JSON value if the requested\n    pointer type @a PointerType fits to the JSON value; `nullptr` otherwise\n\n    @complexity Constant.\n\n    @liveexample{The example below shows how pointers to internal values of a\n    JSON value can be requested. Note that no type conversions are made and a\n    `nullptr` is returned if the value and the requested pointer type does not\n    match.,get__PointerType}\n\n    @sa see @ref get_ptr() for explicit pointer-member access\n\n    @since version 1.0.0\n    */\n    template<typename PointerType, typename std::enable_if<\n                 std::is_pointer<PointerType>::value, int>::type = 0>\n    auto get() noexcept -> decltype(std::declval<basic_json_t&>().template get_ptr<PointerType>())\n    {\n        // delegate the call to get_ptr\n        return get_ptr<PointerType>();\n    }\n\n    /// @brief get a value (explicit)\n    /// @sa https://json.nlohmann.me/api/basic_json/get_to/\n    template < typename ValueType,\n               detail::enable_if_t <\n                   !detail::is_basic_json<ValueType>::value&&\n                   detail::has_from_json<basic_json_t, ValueType>::value,\n                   int > = 0 >\n    ValueType & get_to(ValueType& v) const noexcept(noexcept(\n                JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v)))\n    {\n        JSONSerializer<ValueType>::from_json(*this, v);\n        return v;\n    }\n\n    // specialization to allow calling get_to with a basic_json value\n    // see https://github.com/nlohmann/json/issues/2175\n    template<typename ValueType,\n             detail::enable_if_t <\n                 detail::is_basic_json<ValueType>::value,\n                 int> = 0>\n    ValueType & get_to(ValueType& v) const\n    {\n        v = *this;\n        return v;\n    }\n\n    template <\n        typename T, std::size_t N,\n        typename Array = T (&)[N], // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)\n        detail::enable_if_t <\n            detail::has_from_json<basic_json_t, Array>::value, int > = 0 >\n    Array get_to(T (&v)[N]) const // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)\n    noexcept(noexcept(JSONSerializer<Array>::from_json(\n                          std::declval<const basic_json_t&>(), v)))\n    {\n        JSONSerializer<Array>::from_json(*this, v);\n        return v;\n    }\n\n    /// @brief get a reference value (implicit)\n    /// @sa https://json.nlohmann.me/api/basic_json/get_ref/\n    template<typename ReferenceType, typename std::enable_if<\n                 std::is_reference<ReferenceType>::value, int>::type = 0>\n    ReferenceType get_ref()\n    {\n        // delegate call to get_ref_impl\n        return get_ref_impl<ReferenceType>(*this);\n    }\n\n    /// @brief get a reference value (implicit)\n    /// @sa https://json.nlohmann.me/api/basic_json/get_ref/\n    template < typename ReferenceType, typename std::enable_if <\n                   std::is_reference<ReferenceType>::value&&\n                   std::is_const<typename std::remove_reference<ReferenceType>::type>::value, int >::type = 0 >\n    ReferenceType get_ref() const\n    {\n        // delegate call to get_ref_impl\n        return get_ref_impl<ReferenceType>(*this);\n    }\n\n    /*!\n    @brief get a value (implicit)\n\n    Implicit type conversion between the JSON value and a compatible value.\n    The call is realized by calling @ref get() const.\n\n    @tparam ValueType non-pointer type compatible to the JSON value, for\n    instance `int` for JSON integer numbers, `bool` for JSON booleans, or\n    `std::vector` types for JSON arrays. The character type of @ref string_t\n    as well as an initializer list of this type is excluded to avoid\n    ambiguities as these types implicitly convert to `std::string`.\n\n    @return copy of the JSON value, converted to type @a ValueType\n\n    @throw type_error.302 in case passed type @a ValueType is incompatible\n    to the JSON value type (e.g., the JSON value is of type boolean, but a\n    string is requested); see example below\n\n    @complexity Linear in the size of the JSON value.\n\n    @liveexample{The example below shows several conversions from JSON values\n    to other types. There a few things to note: (1) Floating-point numbers can\n    be converted to integers\\, (2) A JSON array can be converted to a standard\n    `std::vector<short>`\\, (3) A JSON object can be converted to C++\n    associative containers such as `std::unordered_map<std::string\\,\n    json>`.,operator__ValueType}\n\n    @since version 1.0.0\n    */\n    template < typename ValueType, typename std::enable_if <\n                   detail::conjunction <\n                       detail::negation<std::is_pointer<ValueType>>,\n                       detail::negation<std::is_same<ValueType, detail::json_ref<basic_json>>>,\n                                        detail::negation<std::is_same<ValueType, typename string_t::value_type>>,\n                                        detail::negation<detail::is_basic_json<ValueType>>,\n                                        detail::negation<std::is_same<ValueType, std::initializer_list<typename string_t::value_type>>>,\n\n#if defined(JSON_HAS_CPP_17) && (defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSC_VER <= 1914))\n                                                detail::negation<std::is_same<ValueType, std::string_view>>,\n#endif\n                                                detail::is_detected_lazy<detail::get_template_function, const basic_json_t&, ValueType>\n                                                >::value, int >::type = 0 >\n                                        JSON_EXPLICIT operator ValueType() const\n    {\n        // delegate the call to get<>() const\n        return get<ValueType>();\n    }\n\n    /// @brief get a binary value\n    /// @sa https://json.nlohmann.me/api/basic_json/get_binary/\n    binary_t& get_binary()\n    {\n        if (!is_binary())\n        {\n            JSON_THROW(type_error::create(302, \"type must be binary, but is \" + std::string(type_name()), *this));\n        }\n\n        return *get_ptr<binary_t*>();\n    }\n\n    /// @brief get a binary value\n    /// @sa https://json.nlohmann.me/api/basic_json/get_binary/\n    const binary_t& get_binary() const\n    {\n        if (!is_binary())\n        {\n            JSON_THROW(type_error::create(302, \"type must be binary, but is \" + std::string(type_name()), *this));\n        }\n\n        return *get_ptr<const binary_t*>();\n    }\n\n    /// @}\n\n\n    ////////////////////\n    // element access //\n    ////////////////////\n\n    /// @name element access\n    /// Access to the JSON value.\n    /// @{\n\n    /// @brief access specified array element with bounds checking\n    /// @sa https://json.nlohmann.me/api/basic_json/at/\n    reference at(size_type idx)\n    {\n        // at only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            JSON_TRY\n            {\n                return set_parent(m_value.array->at(idx));\n            }\n            JSON_CATCH (std::out_of_range&)\n            {\n                // create better exception explanation\n                JSON_THROW(out_of_range::create(401, \"array index \" + std::to_string(idx) + \" is out of range\", *this));\n            }\n        }\n        else\n        {\n            JSON_THROW(type_error::create(304, \"cannot use at() with \" + std::string(type_name()), *this));\n        }\n    }\n\n    /// @brief access specified array element with bounds checking\n    /// @sa https://json.nlohmann.me/api/basic_json/at/\n    const_reference at(size_type idx) const\n    {\n        // at only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            JSON_TRY\n            {\n                return m_value.array->at(idx);\n            }\n            JSON_CATCH (std::out_of_range&)\n            {\n                // create better exception explanation\n                JSON_THROW(out_of_range::create(401, \"array index \" + std::to_string(idx) + \" is out of range\", *this));\n            }\n        }\n        else\n        {\n            JSON_THROW(type_error::create(304, \"cannot use at() with \" + std::string(type_name()), *this));\n        }\n    }\n\n    /// @brief access specified object element with bounds checking\n    /// @sa https://json.nlohmann.me/api/basic_json/at/\n    reference at(const typename object_t::key_type& key)\n    {\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            JSON_TRY\n            {\n                return set_parent(m_value.object->at(key));\n            }\n            JSON_CATCH (std::out_of_range&)\n            {\n                // create better exception explanation\n                JSON_THROW(out_of_range::create(403, \"key '\" + key + \"' not found\", *this));\n            }\n        }\n        else\n        {\n            JSON_THROW(type_error::create(304, \"cannot use at() with \" + std::string(type_name()), *this));\n        }\n    }\n\n    /// @brief access specified object element with bounds checking\n    /// @sa https://json.nlohmann.me/api/basic_json/at/\n    const_reference at(const typename object_t::key_type& key) const\n    {\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            JSON_TRY\n            {\n                return m_value.object->at(key);\n            }\n            JSON_CATCH (std::out_of_range&)\n            {\n                // create better exception explanation\n                JSON_THROW(out_of_range::create(403, \"key '\" + key + \"' not found\", *this));\n            }\n        }\n        else\n        {\n            JSON_THROW(type_error::create(304, \"cannot use at() with \" + std::string(type_name()), *this));\n        }\n    }\n\n    /// @brief access specified array element\n    /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/\n    reference operator[](size_type idx)\n    {\n        // implicitly convert null value to an empty array\n        if (is_null())\n        {\n            m_type = value_t::array;\n            m_value.array = create<array_t>();\n            assert_invariant();\n        }\n\n        // operator[] only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            // fill up array with null values if given idx is outside range\n            if (idx >= m_value.array->size())\n            {\n#if JSON_DIAGNOSTICS\n                // remember array size & capacity before resizing\n                const auto old_size = m_value.array->size();\n                const auto old_capacity = m_value.array->capacity();\n#endif\n                m_value.array->resize(idx + 1);\n\n#if JSON_DIAGNOSTICS\n                if (JSON_HEDLEY_UNLIKELY(m_value.array->capacity() != old_capacity))\n                {\n                    // capacity has changed: update all parents\n                    set_parents();\n                }\n                else\n                {\n                    // set parent for values added above\n                    set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size));\n                }\n#endif\n                assert_invariant();\n            }\n\n            return m_value.array->operator[](idx);\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a numeric argument with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief access specified array element\n    /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/\n    const_reference operator[](size_type idx) const\n    {\n        // const operator[] only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            return m_value.array->operator[](idx);\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a numeric argument with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief access specified object element\n    /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/\n    reference operator[](const typename object_t::key_type& key)\n    {\n        // implicitly convert null value to an empty object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value.object = create<object_t>();\n            assert_invariant();\n        }\n\n        // operator[] only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            return set_parent(m_value.object->operator[](key));\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a string argument with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief access specified object element\n    /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/\n    const_reference operator[](const typename object_t::key_type& key) const\n    {\n        // const operator[] only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            JSON_ASSERT(m_value.object->find(key) != m_value.object->end());\n            return m_value.object->find(key)->second;\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a string argument with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief access specified object element\n    /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/\n    template<typename T>\n    JSON_HEDLEY_NON_NULL(2)\n    reference operator[](T* key)\n    {\n        // implicitly convert null to object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value = value_t::object;\n            assert_invariant();\n        }\n\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            return set_parent(m_value.object->operator[](key));\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a string argument with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief access specified object element\n    /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/\n    template<typename T>\n    JSON_HEDLEY_NON_NULL(2)\n    const_reference operator[](T* key) const\n    {\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            JSON_ASSERT(m_value.object->find(key) != m_value.object->end());\n            return m_value.object->find(key)->second;\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a string argument with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief access specified object element with default value\n    /// @sa https://json.nlohmann.me/api/basic_json/value/\n    /// using std::is_convertible in a std::enable_if will fail when using explicit conversions\n    template < class ValueType, typename std::enable_if <\n                   detail::is_getable<basic_json_t, ValueType>::value\n                   && !std::is_same<value_t, ValueType>::value, int >::type = 0 >\n    ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const\n    {\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            // if key is found, return value and given default value otherwise\n            const auto it = find(key);\n            if (it != end())\n            {\n                return it->template get<ValueType>();\n            }\n\n            return default_value;\n        }\n\n        JSON_THROW(type_error::create(306, \"cannot use value() with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief access specified object element with default value\n    /// @sa https://json.nlohmann.me/api/basic_json/value/\n    /// overload for a default value of type const char*\n    string_t value(const typename object_t::key_type& key, const char* default_value) const\n    {\n        return value(key, string_t(default_value));\n    }\n\n    /// @brief access specified object element via JSON Pointer with default value\n    /// @sa https://json.nlohmann.me/api/basic_json/value/\n    template<class ValueType, typename std::enable_if<\n                 detail::is_getable<basic_json_t, ValueType>::value, int>::type = 0>\n    ValueType value(const json_pointer& ptr, const ValueType& default_value) const\n    {\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            // if pointer resolves a value, return it or use default value\n            JSON_TRY\n            {\n                return ptr.get_checked(this).template get<ValueType>();\n            }\n            JSON_INTERNAL_CATCH (out_of_range&)\n            {\n                return default_value;\n            }\n        }\n\n        JSON_THROW(type_error::create(306, \"cannot use value() with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief access specified object element via JSON Pointer with default value\n    /// @sa https://json.nlohmann.me/api/basic_json/value/\n    /// overload for a default value of type const char*\n    JSON_HEDLEY_NON_NULL(3)\n    string_t value(const json_pointer& ptr, const char* default_value) const\n    {\n        return value(ptr, string_t(default_value));\n    }\n\n    /// @brief access the first element\n    /// @sa https://json.nlohmann.me/api/basic_json/front/\n    reference front()\n    {\n        return *begin();\n    }\n\n    /// @brief access the first element\n    /// @sa https://json.nlohmann.me/api/basic_json/front/\n    const_reference front() const\n    {\n        return *cbegin();\n    }\n\n    /// @brief access the last element\n    /// @sa https://json.nlohmann.me/api/basic_json/back/\n    reference back()\n    {\n        auto tmp = end();\n        --tmp;\n        return *tmp;\n    }\n\n    /// @brief access the last element\n    /// @sa https://json.nlohmann.me/api/basic_json/back/\n    const_reference back() const\n    {\n        auto tmp = cend();\n        --tmp;\n        return *tmp;\n    }\n\n    /// @brief remove element given an iterator\n    /// @sa https://json.nlohmann.me/api/basic_json/erase/\n    template < class IteratorType, typename std::enable_if <\n                   std::is_same<IteratorType, typename basic_json_t::iterator>::value ||\n                   std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int >::type\n               = 0 >\n    IteratorType erase(IteratorType pos)\n    {\n        // make sure iterator fits the current value\n        if (JSON_HEDLEY_UNLIKELY(this != pos.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(202, \"iterator does not fit current value\", *this));\n        }\n\n        IteratorType result = end();\n\n        switch (m_type)\n        {\n            case value_t::boolean:\n            case value_t::number_float:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::string:\n            case value_t::binary:\n            {\n                if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin()))\n                {\n                    JSON_THROW(invalid_iterator::create(205, \"iterator out of range\", *this));\n                }\n\n                if (is_string())\n                {\n                    AllocatorType<string_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1);\n                    m_value.string = nullptr;\n                }\n                else if (is_binary())\n                {\n                    AllocatorType<binary_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.binary);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.binary, 1);\n                    m_value.binary = nullptr;\n                }\n\n                m_type = value_t::null;\n                assert_invariant();\n                break;\n            }\n\n            case value_t::object:\n            {\n                result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator);\n                break;\n            }\n\n            case value_t::array:\n            {\n                result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator);\n                break;\n            }\n\n            case value_t::null:\n            case value_t::discarded:\n            default:\n                JSON_THROW(type_error::create(307, \"cannot use erase() with \" + std::string(type_name()), *this));\n        }\n\n        return result;\n    }\n\n    /// @brief remove elements given an iterator range\n    /// @sa https://json.nlohmann.me/api/basic_json/erase/\n    template < class IteratorType, typename std::enable_if <\n                   std::is_same<IteratorType, typename basic_json_t::iterator>::value ||\n                   std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int >::type\n               = 0 >\n    IteratorType erase(IteratorType first, IteratorType last)\n    {\n        // make sure iterator fits the current value\n        if (JSON_HEDLEY_UNLIKELY(this != first.m_object || this != last.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(203, \"iterators do not fit current value\", *this));\n        }\n\n        IteratorType result = end();\n\n        switch (m_type)\n        {\n            case value_t::boolean:\n            case value_t::number_float:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::string:\n            case value_t::binary:\n            {\n                if (JSON_HEDLEY_LIKELY(!first.m_it.primitive_iterator.is_begin()\n                                       || !last.m_it.primitive_iterator.is_end()))\n                {\n                    JSON_THROW(invalid_iterator::create(204, \"iterators out of range\", *this));\n                }\n\n                if (is_string())\n                {\n                    AllocatorType<string_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1);\n                    m_value.string = nullptr;\n                }\n                else if (is_binary())\n                {\n                    AllocatorType<binary_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.binary);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.binary, 1);\n                    m_value.binary = nullptr;\n                }\n\n                m_type = value_t::null;\n                assert_invariant();\n                break;\n            }\n\n            case value_t::object:\n            {\n                result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator,\n                                              last.m_it.object_iterator);\n                break;\n            }\n\n            case value_t::array:\n            {\n                result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator,\n                                             last.m_it.array_iterator);\n                break;\n            }\n\n            case value_t::null:\n            case value_t::discarded:\n            default:\n                JSON_THROW(type_error::create(307, \"cannot use erase() with \" + std::string(type_name()), *this));\n        }\n\n        return result;\n    }\n\n    /// @brief remove element from a JSON object given a key\n    /// @sa https://json.nlohmann.me/api/basic_json/erase/\n    size_type erase(const typename object_t::key_type& key)\n    {\n        // this erase only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            return m_value.object->erase(key);\n        }\n\n        JSON_THROW(type_error::create(307, \"cannot use erase() with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief remove element from a JSON array given an index\n    /// @sa https://json.nlohmann.me/api/basic_json/erase/\n    void erase(const size_type idx)\n    {\n        // this erase only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            if (JSON_HEDLEY_UNLIKELY(idx >= size()))\n            {\n                JSON_THROW(out_of_range::create(401, \"array index \" + std::to_string(idx) + \" is out of range\", *this));\n            }\n\n            m_value.array->erase(m_value.array->begin() + static_cast<difference_type>(idx));\n        }\n        else\n        {\n            JSON_THROW(type_error::create(307, \"cannot use erase() with \" + std::string(type_name()), *this));\n        }\n    }\n\n    /// @}\n\n\n    ////////////\n    // lookup //\n    ////////////\n\n    /// @name lookup\n    /// @{\n\n    /// @brief find an element in a JSON object\n    /// @sa https://json.nlohmann.me/api/basic_json/find/\n    template<typename KeyT>\n    iterator find(KeyT&& key)\n    {\n        auto result = end();\n\n        if (is_object())\n        {\n            result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key));\n        }\n\n        return result;\n    }\n\n    /// @brief find an element in a JSON object\n    /// @sa https://json.nlohmann.me/api/basic_json/find/\n    template<typename KeyT>\n    const_iterator find(KeyT&& key) const\n    {\n        auto result = cend();\n\n        if (is_object())\n        {\n            result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key));\n        }\n\n        return result;\n    }\n\n    /// @brief returns the number of occurrences of a key in a JSON object\n    /// @sa https://json.nlohmann.me/api/basic_json/count/\n    template<typename KeyT>\n    size_type count(KeyT&& key) const\n    {\n        // return 0 for all nonobject types\n        return is_object() ? m_value.object->count(std::forward<KeyT>(key)) : 0;\n    }\n\n    /// @brief check the existence of an element in a JSON object\n    /// @sa https://json.nlohmann.me/api/basic_json/contains/\n    template < typename KeyT, typename std::enable_if <\n                   !std::is_same<typename std::decay<KeyT>::type, json_pointer>::value, int >::type = 0 >\n    bool contains(KeyT && key) const\n    {\n        return is_object() && m_value.object->find(std::forward<KeyT>(key)) != m_value.object->end();\n    }\n\n    /// @brief check the existence of an element in a JSON object given a JSON pointer\n    /// @sa https://json.nlohmann.me/api/basic_json/contains/\n    bool contains(const json_pointer& ptr) const\n    {\n        return ptr.contains(this);\n    }\n\n    /// @}\n\n\n    ///////////////\n    // iterators //\n    ///////////////\n\n    /// @name iterators\n    /// @{\n\n    /// @brief returns an iterator to the first element\n    /// @sa https://json.nlohmann.me/api/basic_json/begin/\n    iterator begin() noexcept\n    {\n        iterator result(this);\n        result.set_begin();\n        return result;\n    }\n\n    /// @brief returns an iterator to the first element\n    /// @sa https://json.nlohmann.me/api/basic_json/begin/\n    const_iterator begin() const noexcept\n    {\n        return cbegin();\n    }\n\n    /// @brief returns a const iterator to the first element\n    /// @sa https://json.nlohmann.me/api/basic_json/cbegin/\n    const_iterator cbegin() const noexcept\n    {\n        const_iterator result(this);\n        result.set_begin();\n        return result;\n    }\n\n    /// @brief returns an iterator to one past the last element\n    /// @sa https://json.nlohmann.me/api/basic_json/end/\n    iterator end() noexcept\n    {\n        iterator result(this);\n        result.set_end();\n        return result;\n    }\n\n    /// @brief returns an iterator to one past the last element\n    /// @sa https://json.nlohmann.me/api/basic_json/end/\n    const_iterator end() const noexcept\n    {\n        return cend();\n    }\n\n    /// @brief returns an iterator to one past the last element\n    /// @sa https://json.nlohmann.me/api/basic_json/cend/\n    const_iterator cend() const noexcept\n    {\n        const_iterator result(this);\n        result.set_end();\n        return result;\n    }\n\n    /// @brief returns an iterator to the reverse-beginning\n    /// @sa https://json.nlohmann.me/api/basic_json/rbegin/\n    reverse_iterator rbegin() noexcept\n    {\n        return reverse_iterator(end());\n    }\n\n    /// @brief returns an iterator to the reverse-beginning\n    /// @sa https://json.nlohmann.me/api/basic_json/rbegin/\n    const_reverse_iterator rbegin() const noexcept\n    {\n        return crbegin();\n    }\n\n    /// @brief returns an iterator to the reverse-end\n    /// @sa https://json.nlohmann.me/api/basic_json/rend/\n    reverse_iterator rend() noexcept\n    {\n        return reverse_iterator(begin());\n    }\n\n    /// @brief returns an iterator to the reverse-end\n    /// @sa https://json.nlohmann.me/api/basic_json/rend/\n    const_reverse_iterator rend() const noexcept\n    {\n        return crend();\n    }\n\n    /// @brief returns a const reverse iterator to the last element\n    /// @sa https://json.nlohmann.me/api/basic_json/crbegin/\n    const_reverse_iterator crbegin() const noexcept\n    {\n        return const_reverse_iterator(cend());\n    }\n\n    /// @brief returns a const reverse iterator to one before the first\n    /// @sa https://json.nlohmann.me/api/basic_json/crend/\n    const_reverse_iterator crend() const noexcept\n    {\n        return const_reverse_iterator(cbegin());\n    }\n\n  public:\n    /// @brief wrapper to access iterator member functions in range-based for\n    /// @sa https://json.nlohmann.me/api/basic_json/items/\n    /// @deprecated This function is deprecated since 3.1.0 and will be removed in\n    ///             version 4.0.0 of the library. Please use @ref items() instead;\n    ///             that is, replace `json::iterator_wrapper(j)` with `j.items()`.\n    JSON_HEDLEY_DEPRECATED_FOR(3.1.0, items())\n    static iteration_proxy<iterator> iterator_wrapper(reference ref) noexcept\n    {\n        return ref.items();\n    }\n\n    /// @brief wrapper to access iterator member functions in range-based for\n    /// @sa https://json.nlohmann.me/api/basic_json/items/\n    /// @deprecated This function is deprecated since 3.1.0 and will be removed in\n    ///         version 4.0.0 of the library. Please use @ref items() instead;\n    ///         that is, replace `json::iterator_wrapper(j)` with `j.items()`.\n    JSON_HEDLEY_DEPRECATED_FOR(3.1.0, items())\n    static iteration_proxy<const_iterator> iterator_wrapper(const_reference ref) noexcept\n    {\n        return ref.items();\n    }\n\n    /// @brief helper to access iterator member functions in range-based for\n    /// @sa https://json.nlohmann.me/api/basic_json/items/\n    iteration_proxy<iterator> items() noexcept\n    {\n        return iteration_proxy<iterator>(*this);\n    }\n\n    /// @brief helper to access iterator member functions in range-based for\n    /// @sa https://json.nlohmann.me/api/basic_json/items/\n    iteration_proxy<const_iterator> items() const noexcept\n    {\n        return iteration_proxy<const_iterator>(*this);\n    }\n\n    /// @}\n\n\n    //////////////\n    // capacity //\n    //////////////\n\n    /// @name capacity\n    /// @{\n\n    /// @brief checks whether the container is empty.\n    /// @sa https://json.nlohmann.me/api/basic_json/empty/\n    bool empty() const noexcept\n    {\n        switch (m_type)\n        {\n            case value_t::null:\n            {\n                // null values are empty\n                return true;\n            }\n\n            case value_t::array:\n            {\n                // delegate call to array_t::empty()\n                return m_value.array->empty();\n            }\n\n            case value_t::object:\n            {\n                // delegate call to object_t::empty()\n                return m_value.object->empty();\n            }\n\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                // all other types are nonempty\n                return false;\n            }\n        }\n    }\n\n    /// @brief returns the number of elements\n    /// @sa https://json.nlohmann.me/api/basic_json/size/\n    size_type size() const noexcept\n    {\n        switch (m_type)\n        {\n            case value_t::null:\n            {\n                // null values are empty\n                return 0;\n            }\n\n            case value_t::array:\n            {\n                // delegate call to array_t::size()\n                return m_value.array->size();\n            }\n\n            case value_t::object:\n            {\n                // delegate call to object_t::size()\n                return m_value.object->size();\n            }\n\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                // all other types have size 1\n                return 1;\n            }\n        }\n    }\n\n    /// @brief returns the maximum possible number of elements\n    /// @sa https://json.nlohmann.me/api/basic_json/max_size/\n    size_type max_size() const noexcept\n    {\n        switch (m_type)\n        {\n            case value_t::array:\n            {\n                // delegate call to array_t::max_size()\n                return m_value.array->max_size();\n            }\n\n            case value_t::object:\n            {\n                // delegate call to object_t::max_size()\n                return m_value.object->max_size();\n            }\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                // all other types have max_size() == size()\n                return size();\n            }\n        }\n    }\n\n    /// @}\n\n\n    ///////////////\n    // modifiers //\n    ///////////////\n\n    /// @name modifiers\n    /// @{\n\n    /// @brief clears the contents\n    /// @sa https://json.nlohmann.me/api/basic_json/clear/\n    void clear() noexcept\n    {\n        switch (m_type)\n        {\n            case value_t::number_integer:\n            {\n                m_value.number_integer = 0;\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                m_value.number_unsigned = 0;\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                m_value.number_float = 0.0;\n                break;\n            }\n\n            case value_t::boolean:\n            {\n                m_value.boolean = false;\n                break;\n            }\n\n            case value_t::string:\n            {\n                m_value.string->clear();\n                break;\n            }\n\n            case value_t::binary:\n            {\n                m_value.binary->clear();\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_value.array->clear();\n                break;\n            }\n\n            case value_t::object:\n            {\n                m_value.object->clear();\n                break;\n            }\n\n            case value_t::null:\n            case value_t::discarded:\n            default:\n                break;\n        }\n    }\n\n    /// @brief add an object to an array\n    /// @sa https://json.nlohmann.me/api/basic_json/push_back/\n    void push_back(basic_json&& val)\n    {\n        // push_back only works for null objects or arrays\n        if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))\n        {\n            JSON_THROW(type_error::create(308, \"cannot use push_back() with \" + std::string(type_name()), *this));\n        }\n\n        // transform null object into an array\n        if (is_null())\n        {\n            m_type = value_t::array;\n            m_value = value_t::array;\n            assert_invariant();\n        }\n\n        // add element to array (move semantics)\n        const auto old_capacity = m_value.array->capacity();\n        m_value.array->push_back(std::move(val));\n        set_parent(m_value.array->back(), old_capacity);\n        // if val is moved from, basic_json move constructor marks it null, so we do not call the destructor\n    }\n\n    /// @brief add an object to an array\n    /// @sa https://json.nlohmann.me/api/basic_json/operator+=/\n    reference operator+=(basic_json&& val)\n    {\n        push_back(std::move(val));\n        return *this;\n    }\n\n    /// @brief add an object to an array\n    /// @sa https://json.nlohmann.me/api/basic_json/push_back/\n    void push_back(const basic_json& val)\n    {\n        // push_back only works for null objects or arrays\n        if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))\n        {\n            JSON_THROW(type_error::create(308, \"cannot use push_back() with \" + std::string(type_name()), *this));\n        }\n\n        // transform null object into an array\n        if (is_null())\n        {\n            m_type = value_t::array;\n            m_value = value_t::array;\n            assert_invariant();\n        }\n\n        // add element to array\n        const auto old_capacity = m_value.array->capacity();\n        m_value.array->push_back(val);\n        set_parent(m_value.array->back(), old_capacity);\n    }\n\n    /// @brief add an object to an array\n    /// @sa https://json.nlohmann.me/api/basic_json/operator+=/\n    reference operator+=(const basic_json& val)\n    {\n        push_back(val);\n        return *this;\n    }\n\n    /// @brief add an object to an object\n    /// @sa https://json.nlohmann.me/api/basic_json/push_back/\n    void push_back(const typename object_t::value_type& val)\n    {\n        // push_back only works for null objects or objects\n        if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object())))\n        {\n            JSON_THROW(type_error::create(308, \"cannot use push_back() with \" + std::string(type_name()), *this));\n        }\n\n        // transform null object into an object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value = value_t::object;\n            assert_invariant();\n        }\n\n        // add element to object\n        auto res = m_value.object->insert(val);\n        set_parent(res.first->second);\n    }\n\n    /// @brief add an object to an object\n    /// @sa https://json.nlohmann.me/api/basic_json/operator+=/\n    reference operator+=(const typename object_t::value_type& val)\n    {\n        push_back(val);\n        return *this;\n    }\n\n    /// @brief add an object to an object\n    /// @sa https://json.nlohmann.me/api/basic_json/push_back/\n    void push_back(initializer_list_t init)\n    {\n        if (is_object() && init.size() == 2 && (*init.begin())->is_string())\n        {\n            basic_json&& key = init.begin()->moved_or_copied();\n            push_back(typename object_t::value_type(\n                          std::move(key.get_ref<string_t&>()), (init.begin() + 1)->moved_or_copied()));\n        }\n        else\n        {\n            push_back(basic_json(init));\n        }\n    }\n\n    /// @brief add an object to an object\n    /// @sa https://json.nlohmann.me/api/basic_json/operator+=/\n    reference operator+=(initializer_list_t init)\n    {\n        push_back(init);\n        return *this;\n    }\n\n    /// @brief add an object to an array\n    /// @sa https://json.nlohmann.me/api/basic_json/emplace_back/\n    template<class... Args>\n    reference emplace_back(Args&& ... args)\n    {\n        // emplace_back only works for null objects or arrays\n        if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))\n        {\n            JSON_THROW(type_error::create(311, \"cannot use emplace_back() with \" + std::string(type_name()), *this));\n        }\n\n        // transform null object into an array\n        if (is_null())\n        {\n            m_type = value_t::array;\n            m_value = value_t::array;\n            assert_invariant();\n        }\n\n        // add element to array (perfect forwarding)\n        const auto old_capacity = m_value.array->capacity();\n        m_value.array->emplace_back(std::forward<Args>(args)...);\n        return set_parent(m_value.array->back(), old_capacity);\n    }\n\n    /// @brief add an object to an object if key does not exist\n    /// @sa https://json.nlohmann.me/api/basic_json/emplace/\n    template<class... Args>\n    std::pair<iterator, bool> emplace(Args&& ... args)\n    {\n        // emplace only works for null objects or arrays\n        if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object())))\n        {\n            JSON_THROW(type_error::create(311, \"cannot use emplace() with \" + std::string(type_name()), *this));\n        }\n\n        // transform null object into an object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value = value_t::object;\n            assert_invariant();\n        }\n\n        // add element to array (perfect forwarding)\n        auto res = m_value.object->emplace(std::forward<Args>(args)...);\n        set_parent(res.first->second);\n\n        // create result iterator and set iterator to the result of emplace\n        auto it = begin();\n        it.m_it.object_iterator = res.first;\n\n        // return pair of iterator and boolean\n        return {it, res.second};\n    }\n\n    /// Helper for insertion of an iterator\n    /// @note: This uses std::distance to support GCC 4.8,\n    ///        see https://github.com/nlohmann/json/pull/1257\n    template<typename... Args>\n    iterator insert_iterator(const_iterator pos, Args&& ... args)\n    {\n        iterator result(this);\n        JSON_ASSERT(m_value.array != nullptr);\n\n        auto insert_pos = std::distance(m_value.array->begin(), pos.m_it.array_iterator);\n        m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);\n        result.m_it.array_iterator = m_value.array->begin() + insert_pos;\n\n        // This could have been written as:\n        // result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val);\n        // but the return value of insert is missing in GCC 4.8, so it is written this way instead.\n\n        set_parents();\n        return result;\n    }\n\n    /// @brief inserts element into array\n    /// @sa https://json.nlohmann.me/api/basic_json/insert/\n    iterator insert(const_iterator pos, const basic_json& val)\n    {\n        // insert only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            // check if iterator pos fits to this JSON value\n            if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))\n            {\n                JSON_THROW(invalid_iterator::create(202, \"iterator does not fit current value\", *this));\n            }\n\n            // insert to array and return iterator\n            return insert_iterator(pos, val);\n        }\n\n        JSON_THROW(type_error::create(309, \"cannot use insert() with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief inserts element into array\n    /// @sa https://json.nlohmann.me/api/basic_json/insert/\n    iterator insert(const_iterator pos, basic_json&& val)\n    {\n        return insert(pos, val);\n    }\n\n    /// @brief inserts copies of element into array\n    /// @sa https://json.nlohmann.me/api/basic_json/insert/\n    iterator insert(const_iterator pos, size_type cnt, const basic_json& val)\n    {\n        // insert only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            // check if iterator pos fits to this JSON value\n            if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))\n            {\n                JSON_THROW(invalid_iterator::create(202, \"iterator does not fit current value\", *this));\n            }\n\n            // insert to array and return iterator\n            return insert_iterator(pos, cnt, val);\n        }\n\n        JSON_THROW(type_error::create(309, \"cannot use insert() with \" + std::string(type_name()), *this));\n    }\n\n    /// @brief inserts range of elements into array\n    /// @sa https://json.nlohmann.me/api/basic_json/insert/\n    iterator insert(const_iterator pos, const_iterator first, const_iterator last)\n    {\n        // insert only works for arrays\n        if (JSON_HEDLEY_UNLIKELY(!is_array()))\n        {\n            JSON_THROW(type_error::create(309, \"cannot use insert() with \" + std::string(type_name()), *this));\n        }\n\n        // check if iterator pos fits to this JSON value\n        if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))\n        {\n            JSON_THROW(invalid_iterator::create(202, \"iterator does not fit current value\", *this));\n        }\n\n        // check if range iterators belong to the same JSON object\n        if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(210, \"iterators do not fit\", *this));\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(first.m_object == this))\n        {\n            JSON_THROW(invalid_iterator::create(211, \"passed iterators may not belong to container\", *this));\n        }\n\n        // insert to array and return iterator\n        return insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator);\n    }\n\n    /// @brief inserts elements from initializer list into array\n    /// @sa https://json.nlohmann.me/api/basic_json/insert/\n    iterator insert(const_iterator pos, initializer_list_t ilist)\n    {\n        // insert only works for arrays\n        if (JSON_HEDLEY_UNLIKELY(!is_array()))\n        {\n            JSON_THROW(type_error::create(309, \"cannot use insert() with \" + std::string(type_name()), *this));\n        }\n\n        // check if iterator pos fits to this JSON value\n        if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))\n        {\n            JSON_THROW(invalid_iterator::create(202, \"iterator does not fit current value\", *this));\n        }\n\n        // insert to array and return iterator\n        return insert_iterator(pos, ilist.begin(), ilist.end());\n    }\n\n    /// @brief inserts range of elements into object\n    /// @sa https://json.nlohmann.me/api/basic_json/insert/\n    void insert(const_iterator first, const_iterator last)\n    {\n        // insert only works for objects\n        if (JSON_HEDLEY_UNLIKELY(!is_object()))\n        {\n            JSON_THROW(type_error::create(309, \"cannot use insert() with \" + std::string(type_name()), *this));\n        }\n\n        // check if range iterators belong to the same JSON object\n        if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(210, \"iterators do not fit\", *this));\n        }\n\n        // passed iterators must belong to objects\n        if (JSON_HEDLEY_UNLIKELY(!first.m_object->is_object()))\n        {\n            JSON_THROW(invalid_iterator::create(202, \"iterators first and last must point to objects\", *this));\n        }\n\n        m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator);\n    }\n\n    /// @brief updates a JSON object from another object, overwriting existing keys\n    /// @sa https://json.nlohmann.me/api/basic_json/update/\n    void update(const_reference j, bool merge_objects = false)\n    {\n        update(j.begin(), j.end(), merge_objects);\n    }\n\n    /// @brief updates a JSON object from another object, overwriting existing keys\n    /// @sa https://json.nlohmann.me/api/basic_json/update/\n    void update(const_iterator first, const_iterator last, bool merge_objects = false)\n    {\n        // implicitly convert null value to an empty object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value.object = create<object_t>();\n            assert_invariant();\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(!is_object()))\n        {\n            JSON_THROW(type_error::create(312, \"cannot use update() with \" + std::string(type_name()), *this));\n        }\n\n        // check if range iterators belong to the same JSON object\n        if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(210, \"iterators do not fit\", *this));\n        }\n\n        // passed iterators must belong to objects\n        if (JSON_HEDLEY_UNLIKELY(!first.m_object->is_object()))\n        {\n            JSON_THROW(type_error::create(312, \"cannot use update() with \" + std::string(first.m_object->type_name()), *first.m_object));\n        }\n\n        for (auto it = first; it != last; ++it)\n        {\n            if (merge_objects && it.value().is_object())\n            {\n                auto it2 = m_value.object->find(it.key());\n                if (it2 != m_value.object->end())\n                {\n                    it2->second.update(it.value(), true);\n                    continue;\n                }\n            }\n            m_value.object->operator[](it.key()) = it.value();\n#if JSON_DIAGNOSTICS\n            m_value.object->operator[](it.key()).m_parent = this;\n#endif\n        }\n    }\n\n    /// @brief exchanges the values\n    /// @sa https://json.nlohmann.me/api/basic_json/swap/\n    void swap(reference other) noexcept (\n        std::is_nothrow_move_constructible<value_t>::value&&\n        std::is_nothrow_move_assignable<value_t>::value&&\n        std::is_nothrow_move_constructible<json_value>::value&&\n        std::is_nothrow_move_assignable<json_value>::value\n    )\n    {\n        std::swap(m_type, other.m_type);\n        std::swap(m_value, other.m_value);\n\n        set_parents();\n        other.set_parents();\n        assert_invariant();\n    }\n\n    /// @brief exchanges the values\n    /// @sa https://json.nlohmann.me/api/basic_json/swap/\n    friend void swap(reference left, reference right) noexcept (\n        std::is_nothrow_move_constructible<value_t>::value&&\n        std::is_nothrow_move_assignable<value_t>::value&&\n        std::is_nothrow_move_constructible<json_value>::value&&\n        std::is_nothrow_move_assignable<json_value>::value\n    )\n    {\n        left.swap(right);\n    }\n\n    /// @brief exchanges the values\n    /// @sa https://json.nlohmann.me/api/basic_json/swap/\n    void swap(array_t& other) // NOLINT(bugprone-exception-escape)\n    {\n        // swap only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            std::swap(*(m_value.array), other);\n        }\n        else\n        {\n            JSON_THROW(type_error::create(310, \"cannot use swap() with \" + std::string(type_name()), *this));\n        }\n    }\n\n    /// @brief exchanges the values\n    /// @sa https://json.nlohmann.me/api/basic_json/swap/\n    void swap(object_t& other) // NOLINT(bugprone-exception-escape)\n    {\n        // swap only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            std::swap(*(m_value.object), other);\n        }\n        else\n        {\n            JSON_THROW(type_error::create(310, \"cannot use swap() with \" + std::string(type_name()), *this));\n        }\n    }\n\n    /// @brief exchanges the values\n    /// @sa https://json.nlohmann.me/api/basic_json/swap/\n    void swap(string_t& other) // NOLINT(bugprone-exception-escape)\n    {\n        // swap only works for strings\n        if (JSON_HEDLEY_LIKELY(is_string()))\n        {\n            std::swap(*(m_value.string), other);\n        }\n        else\n        {\n            JSON_THROW(type_error::create(310, \"cannot use swap() with \" + std::string(type_name()), *this));\n        }\n    }\n\n    /// @brief exchanges the values\n    /// @sa https://json.nlohmann.me/api/basic_json/swap/\n    void swap(binary_t& other) // NOLINT(bugprone-exception-escape)\n    {\n        // swap only works for strings\n        if (JSON_HEDLEY_LIKELY(is_binary()))\n        {\n            std::swap(*(m_value.binary), other);\n        }\n        else\n        {\n            JSON_THROW(type_error::create(310, \"cannot use swap() with \" + std::string(type_name()), *this));\n        }\n    }\n\n    /// @brief exchanges the values\n    /// @sa https://json.nlohmann.me/api/basic_json/swap/\n    void swap(typename binary_t::container_type& other) // NOLINT(bugprone-exception-escape)\n    {\n        // swap only works for strings\n        if (JSON_HEDLEY_LIKELY(is_binary()))\n        {\n            std::swap(*(m_value.binary), other);\n        }\n        else\n        {\n            JSON_THROW(type_error::create(310, \"cannot use swap() with \" + std::string(type_name()), *this));\n        }\n    }\n\n    /// @}\n\n  public:\n    //////////////////////////////////////////\n    // lexicographical comparison operators //\n    //////////////////////////////////////////\n\n    /// @name lexicographical comparison operators\n    /// @{\n\n    /// @brief comparison: equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/\n    friend bool operator==(const_reference lhs, const_reference rhs) noexcept\n    {\n#ifdef __GNUC__\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wfloat-equal\"\n#endif\n        const auto lhs_type = lhs.type();\n        const auto rhs_type = rhs.type();\n\n        if (lhs_type == rhs_type)\n        {\n            switch (lhs_type)\n            {\n                case value_t::array:\n                    return *lhs.m_value.array == *rhs.m_value.array;\n\n                case value_t::object:\n                    return *lhs.m_value.object == *rhs.m_value.object;\n\n                case value_t::null:\n                    return true;\n\n                case value_t::string:\n                    return *lhs.m_value.string == *rhs.m_value.string;\n\n                case value_t::boolean:\n                    return lhs.m_value.boolean == rhs.m_value.boolean;\n\n                case value_t::number_integer:\n                    return lhs.m_value.number_integer == rhs.m_value.number_integer;\n\n                case value_t::number_unsigned:\n                    return lhs.m_value.number_unsigned == rhs.m_value.number_unsigned;\n\n                case value_t::number_float:\n                    return lhs.m_value.number_float == rhs.m_value.number_float;\n\n                case value_t::binary:\n                    return *lhs.m_value.binary == *rhs.m_value.binary;\n\n                case value_t::discarded:\n                default:\n                    return false;\n            }\n        }\n        else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_float)\n        {\n            return static_cast<number_float_t>(lhs.m_value.number_integer) == rhs.m_value.number_float;\n        }\n        else if (lhs_type == value_t::number_float && rhs_type == value_t::number_integer)\n        {\n            return lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_integer);\n        }\n        else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_float)\n        {\n            return static_cast<number_float_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_float;\n        }\n        else if (lhs_type == value_t::number_float && rhs_type == value_t::number_unsigned)\n        {\n            return lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_unsigned);\n        }\n        else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_integer)\n        {\n            return static_cast<number_integer_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_integer;\n        }\n        else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_unsigned)\n        {\n            return lhs.m_value.number_integer == static_cast<number_integer_t>(rhs.m_value.number_unsigned);\n        }\n\n        return false;\n#ifdef __GNUC__\n#pragma GCC diagnostic pop\n#endif\n    }\n\n    /// @brief comparison: equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator==(const_reference lhs, ScalarType rhs) noexcept\n    {\n        return lhs == basic_json(rhs);\n    }\n\n    /// @brief comparison: equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator==(ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) == rhs;\n    }\n\n    /// @brief comparison: not equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_ne/\n    friend bool operator!=(const_reference lhs, const_reference rhs) noexcept\n    {\n        return !(lhs == rhs);\n    }\n\n    /// @brief comparison: not equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_ne/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator!=(const_reference lhs, ScalarType rhs) noexcept\n    {\n        return lhs != basic_json(rhs);\n    }\n\n    /// @brief comparison: not equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_ne/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator!=(ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) != rhs;\n    }\n\n    /// @brief comparison: less than\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_lt/\n    friend bool operator<(const_reference lhs, const_reference rhs) noexcept\n    {\n        const auto lhs_type = lhs.type();\n        const auto rhs_type = rhs.type();\n\n        if (lhs_type == rhs_type)\n        {\n            switch (lhs_type)\n            {\n                case value_t::array:\n                    // note parentheses are necessary, see\n                    // https://github.com/nlohmann/json/issues/1530\n                    return (*lhs.m_value.array) < (*rhs.m_value.array);\n\n                case value_t::object:\n                    return (*lhs.m_value.object) < (*rhs.m_value.object);\n\n                case value_t::null:\n                    return false;\n\n                case value_t::string:\n                    return (*lhs.m_value.string) < (*rhs.m_value.string);\n\n                case value_t::boolean:\n                    return (lhs.m_value.boolean) < (rhs.m_value.boolean);\n\n                case value_t::number_integer:\n                    return (lhs.m_value.number_integer) < (rhs.m_value.number_integer);\n\n                case value_t::number_unsigned:\n                    return (lhs.m_value.number_unsigned) < (rhs.m_value.number_unsigned);\n\n                case value_t::number_float:\n                    return (lhs.m_value.number_float) < (rhs.m_value.number_float);\n\n                case value_t::binary:\n                    return (*lhs.m_value.binary) < (*rhs.m_value.binary);\n\n                case value_t::discarded:\n                default:\n                    return false;\n            }\n        }\n        else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_float)\n        {\n            return static_cast<number_float_t>(lhs.m_value.number_integer) < rhs.m_value.number_float;\n        }\n        else if (lhs_type == value_t::number_float && rhs_type == value_t::number_integer)\n        {\n            return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_integer);\n        }\n        else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_float)\n        {\n            return static_cast<number_float_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_float;\n        }\n        else if (lhs_type == value_t::number_float && rhs_type == value_t::number_unsigned)\n        {\n            return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_unsigned);\n        }\n        else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_unsigned)\n        {\n            return lhs.m_value.number_integer < static_cast<number_integer_t>(rhs.m_value.number_unsigned);\n        }\n        else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_integer)\n        {\n            return static_cast<number_integer_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_integer;\n        }\n\n        // We only reach this line if we cannot compare values. In that case,\n        // we compare types. Note we have to call the operator explicitly,\n        // because MSVC has problems otherwise.\n        return operator<(lhs_type, rhs_type);\n    }\n\n    /// @brief comparison: less than\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_lt/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator<(const_reference lhs, ScalarType rhs) noexcept\n    {\n        return lhs < basic_json(rhs);\n    }\n\n    /// @brief comparison: less than\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_lt/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator<(ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) < rhs;\n    }\n\n    /// @brief comparison: less than or equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_le/\n    friend bool operator<=(const_reference lhs, const_reference rhs) noexcept\n    {\n        return !(rhs < lhs);\n    }\n\n    /// @brief comparison: less than or equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_le/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator<=(const_reference lhs, ScalarType rhs) noexcept\n    {\n        return lhs <= basic_json(rhs);\n    }\n\n    /// @brief comparison: less than or equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_le/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator<=(ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) <= rhs;\n    }\n\n    /// @brief comparison: greater than\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_gt/\n    friend bool operator>(const_reference lhs, const_reference rhs) noexcept\n    {\n        return !(lhs <= rhs);\n    }\n\n    /// @brief comparison: greater than\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_gt/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator>(const_reference lhs, ScalarType rhs) noexcept\n    {\n        return lhs > basic_json(rhs);\n    }\n\n    /// @brief comparison: greater than\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_gt/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator>(ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) > rhs;\n    }\n\n    /// @brief comparison: greater than or equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/\n    friend bool operator>=(const_reference lhs, const_reference rhs) noexcept\n    {\n        return !(lhs < rhs);\n    }\n\n    /// @brief comparison: greater than or equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator>=(const_reference lhs, ScalarType rhs) noexcept\n    {\n        return lhs >= basic_json(rhs);\n    }\n\n    /// @brief comparison: greater than or equal\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator>=(ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) >= rhs;\n    }\n\n    /// @}\n\n    ///////////////////\n    // serialization //\n    ///////////////////\n\n    /// @name serialization\n    /// @{\n#ifndef JSON_NO_IO\n    /// @brief serialize to stream\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/\n    friend std::ostream& operator<<(std::ostream& o, const basic_json& j)\n    {\n        // read width member and use it as indentation parameter if nonzero\n        const bool pretty_print = o.width() > 0;\n        const auto indentation = pretty_print ? o.width() : 0;\n\n        // reset width to 0 for subsequent calls to this stream\n        o.width(0);\n\n        // do the actual serialization\n        serializer s(detail::output_adapter<char>(o), o.fill());\n        s.dump(j, pretty_print, false, static_cast<unsigned int>(indentation));\n        return o;\n    }\n\n    /// @brief serialize to stream\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/\n    /// @deprecated This function is deprecated since 3.0.0 and will be removed in\n    ///             version 4.0.0 of the library. Please use\n    ///             operator<<(std::ostream&, const basic_json&) instead; that is,\n    ///             replace calls like `j >> o;` with `o << j;`.\n    JSON_HEDLEY_DEPRECATED_FOR(3.0.0, operator<<(std::ostream&, const basic_json&))\n    friend std::ostream& operator>>(const basic_json& j, std::ostream& o)\n    {\n        return o << j;\n    }\n#endif  // JSON_NO_IO\n    /// @}\n\n\n    /////////////////////\n    // deserialization //\n    /////////////////////\n\n    /// @name deserialization\n    /// @{\n\n    /// @brief deserialize from a compatible input\n    /// @sa https://json.nlohmann.me/api/basic_json/parse/\n    template<typename InputType>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json parse(InputType&& i,\n                            const parser_callback_t cb = nullptr,\n                            const bool allow_exceptions = true,\n                            const bool ignore_comments = false)\n    {\n        basic_json result;\n        parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result);\n        return result;\n    }\n\n    /// @brief deserialize from a pair of character iterators\n    /// @sa https://json.nlohmann.me/api/basic_json/parse/\n    template<typename IteratorType>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json parse(IteratorType first,\n                            IteratorType last,\n                            const parser_callback_t cb = nullptr,\n                            const bool allow_exceptions = true,\n                            const bool ignore_comments = false)\n    {\n        basic_json result;\n        parser(detail::input_adapter(std::move(first), std::move(last)), cb, allow_exceptions, ignore_comments).parse(true, result);\n        return result;\n    }\n\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, parse(ptr, ptr + len))\n    static basic_json parse(detail::span_input_adapter&& i,\n                            const parser_callback_t cb = nullptr,\n                            const bool allow_exceptions = true,\n                            const bool ignore_comments = false)\n    {\n        basic_json result;\n        parser(i.get(), cb, allow_exceptions, ignore_comments).parse(true, result);\n        return result;\n    }\n\n    /// @brief check if the input is valid JSON\n    /// @sa https://json.nlohmann.me/api/basic_json/accept/\n    template<typename InputType>\n    static bool accept(InputType&& i,\n                       const bool ignore_comments = false)\n    {\n        return parser(detail::input_adapter(std::forward<InputType>(i)), nullptr, false, ignore_comments).accept(true);\n    }\n\n    /// @brief check if the input is valid JSON\n    /// @sa https://json.nlohmann.me/api/basic_json/accept/\n    template<typename IteratorType>\n    static bool accept(IteratorType first, IteratorType last,\n                       const bool ignore_comments = false)\n    {\n        return parser(detail::input_adapter(std::move(first), std::move(last)), nullptr, false, ignore_comments).accept(true);\n    }\n\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, accept(ptr, ptr + len))\n    static bool accept(detail::span_input_adapter&& i,\n                       const bool ignore_comments = false)\n    {\n        return parser(i.get(), nullptr, false, ignore_comments).accept(true);\n    }\n\n    /// @brief generate SAX events\n    /// @sa https://json.nlohmann.me/api/basic_json/sax_parse/\n    template <typename InputType, typename SAX>\n    JSON_HEDLEY_NON_NULL(2)\n    static bool sax_parse(InputType&& i, SAX* sax,\n                          input_format_t format = input_format_t::json,\n                          const bool strict = true,\n                          const bool ignore_comments = false)\n    {\n        auto ia = detail::input_adapter(std::forward<InputType>(i));\n        return format == input_format_t::json\n               ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict)\n               : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia)).sax_parse(format, sax, strict);\n    }\n\n    /// @brief generate SAX events\n    /// @sa https://json.nlohmann.me/api/basic_json/sax_parse/\n    template<class IteratorType, class SAX>\n    JSON_HEDLEY_NON_NULL(3)\n    static bool sax_parse(IteratorType first, IteratorType last, SAX* sax,\n                          input_format_t format = input_format_t::json,\n                          const bool strict = true,\n                          const bool ignore_comments = false)\n    {\n        auto ia = detail::input_adapter(std::move(first), std::move(last));\n        return format == input_format_t::json\n               ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict)\n               : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia)).sax_parse(format, sax, strict);\n    }\n\n    /// @brief generate SAX events\n    /// @sa https://json.nlohmann.me/api/basic_json/sax_parse/\n    /// @deprecated This function is deprecated since 3.8.0 and will be removed in\n    ///             version 4.0.0 of the library. Please use\n    ///             sax_parse(ptr, ptr + len) instead.\n    template <typename SAX>\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, sax_parse(ptr, ptr + len, ...))\n    JSON_HEDLEY_NON_NULL(2)\n    static bool sax_parse(detail::span_input_adapter&& i, SAX* sax,\n                          input_format_t format = input_format_t::json,\n                          const bool strict = true,\n                          const bool ignore_comments = false)\n    {\n        auto ia = i.get();\n        return format == input_format_t::json\n               // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)\n               ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict)\n               // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)\n               : detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia)).sax_parse(format, sax, strict);\n    }\n#ifndef JSON_NO_IO\n    /// @brief deserialize from stream\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_gtgt/\n    /// @deprecated This stream operator is deprecated since 3.0.0 and will be removed in\n    ///             version 4.0.0 of the library. Please use\n    ///             operator>>(std::istream&, basic_json&) instead; that is,\n    ///             replace calls like `j << i;` with `i >> j;`.\n    JSON_HEDLEY_DEPRECATED_FOR(3.0.0, operator>>(std::istream&, basic_json&))\n    friend std::istream& operator<<(basic_json& j, std::istream& i)\n    {\n        return operator>>(i, j);\n    }\n\n    /// @brief deserialize from stream\n    /// @sa https://json.nlohmann.me/api/basic_json/operator_gtgt/\n    friend std::istream& operator>>(std::istream& i, basic_json& j)\n    {\n        parser(detail::input_adapter(i)).parse(false, j);\n        return i;\n    }\n#endif  // JSON_NO_IO\n    /// @}\n\n    ///////////////////////////\n    // convenience functions //\n    ///////////////////////////\n\n    /// @brief return the type as string\n    /// @sa https://json.nlohmann.me/api/basic_json/type_name/\n    JSON_HEDLEY_RETURNS_NON_NULL\n    const char* type_name() const noexcept\n    {\n        switch (m_type)\n        {\n            case value_t::null:\n                return \"null\";\n            case value_t::object:\n                return \"object\";\n            case value_t::array:\n                return \"array\";\n            case value_t::string:\n                return \"string\";\n            case value_t::boolean:\n                return \"boolean\";\n            case value_t::binary:\n                return \"binary\";\n            case value_t::discarded:\n                return \"discarded\";\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            default:\n                return \"number\";\n        }\n    }\n\n\n  JSON_PRIVATE_UNLESS_TESTED:\n    //////////////////////\n    // member variables //\n    //////////////////////\n\n    /// the type of the current element\n    value_t m_type = value_t::null;\n\n    /// the value of the current element\n    json_value m_value = {};\n\n#if JSON_DIAGNOSTICS\n    /// a pointer to a parent value (for debugging purposes)\n    basic_json* m_parent = nullptr;\n#endif\n\n    //////////////////////////////////////////\n    // binary serialization/deserialization //\n    //////////////////////////////////////////\n\n    /// @name binary serialization/deserialization support\n    /// @{\n\n  public:\n    /// @brief create a CBOR serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_cbor/\n    static std::vector<std::uint8_t> to_cbor(const basic_json& j)\n    {\n        std::vector<std::uint8_t> result;\n        to_cbor(j, result);\n        return result;\n    }\n\n    /// @brief create a CBOR serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_cbor/\n    static void to_cbor(const basic_json& j, detail::output_adapter<std::uint8_t> o)\n    {\n        binary_writer<std::uint8_t>(o).write_cbor(j);\n    }\n\n    /// @brief create a CBOR serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_cbor/\n    static void to_cbor(const basic_json& j, detail::output_adapter<char> o)\n    {\n        binary_writer<char>(o).write_cbor(j);\n    }\n\n    /// @brief create a MessagePack serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_msgpack/\n    static std::vector<std::uint8_t> to_msgpack(const basic_json& j)\n    {\n        std::vector<std::uint8_t> result;\n        to_msgpack(j, result);\n        return result;\n    }\n\n    /// @brief create a MessagePack serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_msgpack/\n    static void to_msgpack(const basic_json& j, detail::output_adapter<std::uint8_t> o)\n    {\n        binary_writer<std::uint8_t>(o).write_msgpack(j);\n    }\n\n    /// @brief create a MessagePack serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_msgpack/\n    static void to_msgpack(const basic_json& j, detail::output_adapter<char> o)\n    {\n        binary_writer<char>(o).write_msgpack(j);\n    }\n\n    /// @brief create a UBJSON serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_ubjson/\n    static std::vector<std::uint8_t> to_ubjson(const basic_json& j,\n            const bool use_size = false,\n            const bool use_type = false)\n    {\n        std::vector<std::uint8_t> result;\n        to_ubjson(j, result, use_size, use_type);\n        return result;\n    }\n\n    /// @brief create a UBJSON serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_ubjson/\n    static void to_ubjson(const basic_json& j, detail::output_adapter<std::uint8_t> o,\n                          const bool use_size = false, const bool use_type = false)\n    {\n        binary_writer<std::uint8_t>(o).write_ubjson(j, use_size, use_type);\n    }\n\n    /// @brief create a UBJSON serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_ubjson/\n    static void to_ubjson(const basic_json& j, detail::output_adapter<char> o,\n                          const bool use_size = false, const bool use_type = false)\n    {\n        binary_writer<char>(o).write_ubjson(j, use_size, use_type);\n    }\n\n    /// @brief create a BSON serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_bson/\n    static std::vector<std::uint8_t> to_bson(const basic_json& j)\n    {\n        std::vector<std::uint8_t> result;\n        to_bson(j, result);\n        return result;\n    }\n\n    /// @brief create a BSON serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_bson/\n    static void to_bson(const basic_json& j, detail::output_adapter<std::uint8_t> o)\n    {\n        binary_writer<std::uint8_t>(o).write_bson(j);\n    }\n\n    /// @brief create a BSON serialization of a given JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/to_bson/\n    static void to_bson(const basic_json& j, detail::output_adapter<char> o)\n    {\n        binary_writer<char>(o).write_bson(j);\n    }\n\n    /// @brief create a JSON value from an input in CBOR format\n    /// @sa https://json.nlohmann.me/api/basic_json/from_cbor/\n    template<typename InputType>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_cbor(InputType&& i,\n                                const bool strict = true,\n                                const bool allow_exceptions = true,\n                                const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = detail::input_adapter(std::forward<InputType>(i));\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /// @brief create a JSON value from an input in CBOR format\n    /// @sa https://json.nlohmann.me/api/basic_json/from_cbor/\n    template<typename IteratorType>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_cbor(IteratorType first, IteratorType last,\n                                const bool strict = true,\n                                const bool allow_exceptions = true,\n                                const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = detail::input_adapter(std::move(first), std::move(last));\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    template<typename T>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_cbor(ptr, ptr + len))\n    static basic_json from_cbor(const T* ptr, std::size_t len,\n                                const bool strict = true,\n                                const bool allow_exceptions = true,\n                                const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error)\n    {\n        return from_cbor(ptr, ptr + len, strict, allow_exceptions, tag_handler);\n    }\n\n\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_cbor(ptr, ptr + len))\n    static basic_json from_cbor(detail::span_input_adapter&& i,\n                                const bool strict = true,\n                                const bool allow_exceptions = true,\n                                const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = i.get();\n        // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /// @brief create a JSON value from an input in MessagePack format\n    /// @sa https://json.nlohmann.me/api/basic_json/from_msgpack/\n    template<typename InputType>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_msgpack(InputType&& i,\n                                   const bool strict = true,\n                                   const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = detail::input_adapter(std::forward<InputType>(i));\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::msgpack, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /// @brief create a JSON value from an input in MessagePack format\n    /// @sa https://json.nlohmann.me/api/basic_json/from_msgpack/\n    template<typename IteratorType>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_msgpack(IteratorType first, IteratorType last,\n                                   const bool strict = true,\n                                   const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = detail::input_adapter(std::move(first), std::move(last));\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::msgpack, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    template<typename T>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_msgpack(ptr, ptr + len))\n    static basic_json from_msgpack(const T* ptr, std::size_t len,\n                                   const bool strict = true,\n                                   const bool allow_exceptions = true)\n    {\n        return from_msgpack(ptr, ptr + len, strict, allow_exceptions);\n    }\n\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_msgpack(ptr, ptr + len))\n    static basic_json from_msgpack(detail::span_input_adapter&& i,\n                                   const bool strict = true,\n                                   const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = i.get();\n        // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::msgpack, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /// @brief create a JSON value from an input in UBJSON format\n    /// @sa https://json.nlohmann.me/api/basic_json/from_ubjson/\n    template<typename InputType>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_ubjson(InputType&& i,\n                                  const bool strict = true,\n                                  const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = detail::input_adapter(std::forward<InputType>(i));\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::ubjson, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /// @brief create a JSON value from an input in UBJSON format\n    /// @sa https://json.nlohmann.me/api/basic_json/from_ubjson/\n    template<typename IteratorType>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_ubjson(IteratorType first, IteratorType last,\n                                  const bool strict = true,\n                                  const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = detail::input_adapter(std::move(first), std::move(last));\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::ubjson, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    template<typename T>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_ubjson(ptr, ptr + len))\n    static basic_json from_ubjson(const T* ptr, std::size_t len,\n                                  const bool strict = true,\n                                  const bool allow_exceptions = true)\n    {\n        return from_ubjson(ptr, ptr + len, strict, allow_exceptions);\n    }\n\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_ubjson(ptr, ptr + len))\n    static basic_json from_ubjson(detail::span_input_adapter&& i,\n                                  const bool strict = true,\n                                  const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = i.get();\n        // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::ubjson, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /// @brief create a JSON value from an input in BSON format\n    /// @sa https://json.nlohmann.me/api/basic_json/from_bson/\n    template<typename InputType>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_bson(InputType&& i,\n                                const bool strict = true,\n                                const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = detail::input_adapter(std::forward<InputType>(i));\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::bson, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /// @brief create a JSON value from an input in BSON format\n    /// @sa https://json.nlohmann.me/api/basic_json/from_bson/\n    template<typename IteratorType>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_bson(IteratorType first, IteratorType last,\n                                const bool strict = true,\n                                const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = detail::input_adapter(std::move(first), std::move(last));\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::bson, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    template<typename T>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_bson(ptr, ptr + len))\n    static basic_json from_bson(const T* ptr, std::size_t len,\n                                const bool strict = true,\n                                const bool allow_exceptions = true)\n    {\n        return from_bson(ptr, ptr + len, strict, allow_exceptions);\n    }\n\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_bson(ptr, ptr + len))\n    static basic_json from_bson(detail::span_input_adapter&& i,\n                                const bool strict = true,\n                                const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        auto ia = i.get();\n        // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)\n        const bool res = binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::bson, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n    /// @}\n\n    //////////////////////////\n    // JSON Pointer support //\n    //////////////////////////\n\n    /// @name JSON Pointer functions\n    /// @{\n\n    /// @brief access specified element via JSON Pointer\n    /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/\n    reference operator[](const json_pointer& ptr)\n    {\n        return ptr.get_unchecked(this);\n    }\n\n    /// @brief access specified element via JSON Pointer\n    /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/\n    const_reference operator[](const json_pointer& ptr) const\n    {\n        return ptr.get_unchecked(this);\n    }\n\n    /// @brief access specified element via JSON Pointer\n    /// @sa https://json.nlohmann.me/api/basic_json/at/\n    reference at(const json_pointer& ptr)\n    {\n        return ptr.get_checked(this);\n    }\n\n    /// @brief access specified element via JSON Pointer\n    /// @sa https://json.nlohmann.me/api/basic_json/at/\n    const_reference at(const json_pointer& ptr) const\n    {\n        return ptr.get_checked(this);\n    }\n\n    /// @brief return flattened JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/flatten/\n    basic_json flatten() const\n    {\n        basic_json result(value_t::object);\n        json_pointer::flatten(\"\", *this, result);\n        return result;\n    }\n\n    /// @brief unflatten a previously flattened JSON value\n    /// @sa https://json.nlohmann.me/api/basic_json/unflatten/\n    basic_json unflatten() const\n    {\n        return json_pointer::unflatten(*this);\n    }\n\n    /// @}\n\n    //////////////////////////\n    // JSON Patch functions //\n    //////////////////////////\n\n    /// @name JSON Patch functions\n    /// @{\n\n    /// @brief applies a JSON patch\n    /// @sa https://json.nlohmann.me/api/basic_json/patch/\n    basic_json patch(const basic_json& json_patch) const\n    {\n        // make a working copy to apply the patch to\n        basic_json result = *this;\n\n        // the valid JSON Patch operations\n        enum class patch_operations {add, remove, replace, move, copy, test, invalid};\n\n        const auto get_op = [](const std::string & op)\n        {\n            if (op == \"add\")\n            {\n                return patch_operations::add;\n            }\n            if (op == \"remove\")\n            {\n                return patch_operations::remove;\n            }\n            if (op == \"replace\")\n            {\n                return patch_operations::replace;\n            }\n            if (op == \"move\")\n            {\n                return patch_operations::move;\n            }\n            if (op == \"copy\")\n            {\n                return patch_operations::copy;\n            }\n            if (op == \"test\")\n            {\n                return patch_operations::test;\n            }\n\n            return patch_operations::invalid;\n        };\n\n        // wrapper for \"add\" operation; add value at ptr\n        const auto operation_add = [&result](json_pointer & ptr, basic_json val)\n        {\n            // adding to the root of the target document means replacing it\n            if (ptr.empty())\n            {\n                result = val;\n                return;\n            }\n\n            // make sure the top element of the pointer exists\n            json_pointer top_pointer = ptr.top();\n            if (top_pointer != ptr)\n            {\n                result.at(top_pointer);\n            }\n\n            // get reference to parent of JSON pointer ptr\n            const auto last_path = ptr.back();\n            ptr.pop_back();\n            basic_json& parent = result[ptr];\n\n            switch (parent.m_type)\n            {\n                case value_t::null:\n                case value_t::object:\n                {\n                    // use operator[] to add value\n                    parent[last_path] = val;\n                    break;\n                }\n\n                case value_t::array:\n                {\n                    if (last_path == \"-\")\n                    {\n                        // special case: append to back\n                        parent.push_back(val);\n                    }\n                    else\n                    {\n                        const auto idx = json_pointer::array_index(last_path);\n                        if (JSON_HEDLEY_UNLIKELY(idx > parent.size()))\n                        {\n                            // avoid undefined behavior\n                            JSON_THROW(out_of_range::create(401, \"array index \" + std::to_string(idx) + \" is out of range\", parent));\n                        }\n\n                        // default case: insert add offset\n                        parent.insert(parent.begin() + static_cast<difference_type>(idx), val);\n                    }\n                    break;\n                }\n\n                // if there exists a parent it cannot be primitive\n                case value_t::string: // LCOV_EXCL_LINE\n                case value_t::boolean: // LCOV_EXCL_LINE\n                case value_t::number_integer: // LCOV_EXCL_LINE\n                case value_t::number_unsigned: // LCOV_EXCL_LINE\n                case value_t::number_float: // LCOV_EXCL_LINE\n                case value_t::binary: // LCOV_EXCL_LINE\n                case value_t::discarded: // LCOV_EXCL_LINE\n                default:            // LCOV_EXCL_LINE\n                    JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE\n            }\n        };\n\n        // wrapper for \"remove\" operation; remove value at ptr\n        const auto operation_remove = [this, &result](json_pointer & ptr)\n        {\n            // get reference to parent of JSON pointer ptr\n            const auto last_path = ptr.back();\n            ptr.pop_back();\n            basic_json& parent = result.at(ptr);\n\n            // remove child\n            if (parent.is_object())\n            {\n                // perform range check\n                auto it = parent.find(last_path);\n                if (JSON_HEDLEY_LIKELY(it != parent.end()))\n                {\n                    parent.erase(it);\n                }\n                else\n                {\n                    JSON_THROW(out_of_range::create(403, \"key '\" + last_path + \"' not found\", *this));\n                }\n            }\n            else if (parent.is_array())\n            {\n                // note erase performs range check\n                parent.erase(json_pointer::array_index(last_path));\n            }\n        };\n\n        // type check: top level value must be an array\n        if (JSON_HEDLEY_UNLIKELY(!json_patch.is_array()))\n        {\n            JSON_THROW(parse_error::create(104, 0, \"JSON patch must be an array of objects\", json_patch));\n        }\n\n        // iterate and apply the operations\n        for (const auto& val : json_patch)\n        {\n            // wrapper to get a value for an operation\n            const auto get_value = [&val](const std::string & op,\n                                          const std::string & member,\n                                          bool string_type) -> basic_json &\n            {\n                // find value\n                auto it = val.m_value.object->find(member);\n\n                // context-sensitive error message\n                const auto error_msg = (op == \"op\") ? \"operation\" : \"operation '\" + op + \"'\";\n\n                // check if desired value is present\n                if (JSON_HEDLEY_UNLIKELY(it == val.m_value.object->end()))\n                {\n                    // NOLINTNEXTLINE(performance-inefficient-string-concatenation)\n                    JSON_THROW(parse_error::create(105, 0, error_msg + \" must have member '\" + member + \"'\", val));\n                }\n\n                // check if result is of type string\n                if (JSON_HEDLEY_UNLIKELY(string_type && !it->second.is_string()))\n                {\n                    // NOLINTNEXTLINE(performance-inefficient-string-concatenation)\n                    JSON_THROW(parse_error::create(105, 0, error_msg + \" must have string member '\" + member + \"'\", val));\n                }\n\n                // no error: return value\n                return it->second;\n            };\n\n            // type check: every element of the array must be an object\n            if (JSON_HEDLEY_UNLIKELY(!val.is_object()))\n            {\n                JSON_THROW(parse_error::create(104, 0, \"JSON patch must be an array of objects\", val));\n            }\n\n            // collect mandatory members\n            const auto op = get_value(\"op\", \"op\", true).template get<std::string>();\n            const auto path = get_value(op, \"path\", true).template get<std::string>();\n            json_pointer ptr(path);\n\n            switch (get_op(op))\n            {\n                case patch_operations::add:\n                {\n                    operation_add(ptr, get_value(\"add\", \"value\", false));\n                    break;\n                }\n\n                case patch_operations::remove:\n                {\n                    operation_remove(ptr);\n                    break;\n                }\n\n                case patch_operations::replace:\n                {\n                    // the \"path\" location must exist - use at()\n                    result.at(ptr) = get_value(\"replace\", \"value\", false);\n                    break;\n                }\n\n                case patch_operations::move:\n                {\n                    const auto from_path = get_value(\"move\", \"from\", true).template get<std::string>();\n                    json_pointer from_ptr(from_path);\n\n                    // the \"from\" location must exist - use at()\n                    basic_json v = result.at(from_ptr);\n\n                    // The move operation is functionally identical to a\n                    // \"remove\" operation on the \"from\" location, followed\n                    // immediately by an \"add\" operation at the target\n                    // location with the value that was just removed.\n                    operation_remove(from_ptr);\n                    operation_add(ptr, v);\n                    break;\n                }\n\n                case patch_operations::copy:\n                {\n                    const auto from_path = get_value(\"copy\", \"from\", true).template get<std::string>();\n                    const json_pointer from_ptr(from_path);\n\n                    // the \"from\" location must exist - use at()\n                    basic_json v = result.at(from_ptr);\n\n                    // The copy is functionally identical to an \"add\"\n                    // operation at the target location using the value\n                    // specified in the \"from\" member.\n                    operation_add(ptr, v);\n                    break;\n                }\n\n                case patch_operations::test:\n                {\n                    bool success = false;\n                    JSON_TRY\n                    {\n                        // check if \"value\" matches the one at \"path\"\n                        // the \"path\" location must exist - use at()\n                        success = (result.at(ptr) == get_value(\"test\", \"value\", false));\n                    }\n                    JSON_INTERNAL_CATCH (out_of_range&)\n                    {\n                        // ignore out of range errors: success remains false\n                    }\n\n                    // throw an exception if test fails\n                    if (JSON_HEDLEY_UNLIKELY(!success))\n                    {\n                        JSON_THROW(other_error::create(501, \"unsuccessful: \" + val.dump(), val));\n                    }\n\n                    break;\n                }\n\n                case patch_operations::invalid:\n                default:\n                {\n                    // op must be \"add\", \"remove\", \"replace\", \"move\", \"copy\", or\n                    // \"test\"\n                    JSON_THROW(parse_error::create(105, 0, \"operation value '\" + op + \"' is invalid\", val));\n                }\n            }\n        }\n\n        return result;\n    }\n\n    /// @brief creates a diff as a JSON patch\n    /// @sa https://json.nlohmann.me/api/basic_json/diff/\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json diff(const basic_json& source, const basic_json& target,\n                           const std::string& path = \"\")\n    {\n        // the patch\n        basic_json result(value_t::array);\n\n        // if the values are the same, return empty patch\n        if (source == target)\n        {\n            return result;\n        }\n\n        if (source.type() != target.type())\n        {\n            // different types: replace value\n            result.push_back(\n            {\n                {\"op\", \"replace\"}, {\"path\", path}, {\"value\", target}\n            });\n            return result;\n        }\n\n        switch (source.type())\n        {\n            case value_t::array:\n            {\n                // first pass: traverse common elements\n                std::size_t i = 0;\n                while (i < source.size() && i < target.size())\n                {\n                    // recursive call to compare array values at index i\n                    auto temp_diff = diff(source[i], target[i], path + \"/\" + std::to_string(i));\n                    result.insert(result.end(), temp_diff.begin(), temp_diff.end());\n                    ++i;\n                }\n\n                // We now reached the end of at least one array\n                // in a second pass, traverse the remaining elements\n\n                // remove my remaining elements\n                const auto end_index = static_cast<difference_type>(result.size());\n                while (i < source.size())\n                {\n                    // add operations in reverse order to avoid invalid\n                    // indices\n                    result.insert(result.begin() + end_index, object(\n                    {\n                        {\"op\", \"remove\"},\n                        {\"path\", path + \"/\" + std::to_string(i)}\n                    }));\n                    ++i;\n                }\n\n                // add other remaining elements\n                while (i < target.size())\n                {\n                    result.push_back(\n                    {\n                        {\"op\", \"add\"},\n                        {\"path\", path + \"/-\"},\n                        {\"value\", target[i]}\n                    });\n                    ++i;\n                }\n\n                break;\n            }\n\n            case value_t::object:\n            {\n                // first pass: traverse this object's elements\n                for (auto it = source.cbegin(); it != source.cend(); ++it)\n                {\n                    // escape the key name to be used in a JSON patch\n                    const auto path_key = path + \"/\" + detail::escape(it.key());\n\n                    if (target.find(it.key()) != target.end())\n                    {\n                        // recursive call to compare object values at key it\n                        auto temp_diff = diff(it.value(), target[it.key()], path_key);\n                        result.insert(result.end(), temp_diff.begin(), temp_diff.end());\n                    }\n                    else\n                    {\n                        // found a key that is not in o -> remove it\n                        result.push_back(object(\n                        {\n                            {\"op\", \"remove\"}, {\"path\", path_key}\n                        }));\n                    }\n                }\n\n                // second pass: traverse other object's elements\n                for (auto it = target.cbegin(); it != target.cend(); ++it)\n                {\n                    if (source.find(it.key()) == source.end())\n                    {\n                        // found a key that is not in this -> add it\n                        const auto path_key = path + \"/\" + detail::escape(it.key());\n                        result.push_back(\n                        {\n                            {\"op\", \"add\"}, {\"path\", path_key},\n                            {\"value\", it.value()}\n                        });\n                    }\n                }\n\n                break;\n            }\n\n            case value_t::null:\n            case value_t::string:\n            case value_t::boolean:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::number_float:\n            case value_t::binary:\n            case value_t::discarded:\n            default:\n            {\n                // both primitive type: replace value\n                result.push_back(\n                {\n                    {\"op\", \"replace\"}, {\"path\", path}, {\"value\", target}\n                });\n                break;\n            }\n        }\n\n        return result;\n    }\n\n    /// @}\n\n    ////////////////////////////////\n    // JSON Merge Patch functions //\n    ////////////////////////////////\n\n    /// @name JSON Merge Patch functions\n    /// @{\n\n    /// @brief applies a JSON Merge Patch\n    /// @sa https://json.nlohmann.me/api/basic_json/merge_patch/\n    void merge_patch(const basic_json& apply_patch)\n    {\n        if (apply_patch.is_object())\n        {\n            if (!is_object())\n            {\n                *this = object();\n            }\n            for (auto it = apply_patch.begin(); it != apply_patch.end(); ++it)\n            {\n                if (it.value().is_null())\n                {\n                    erase(it.key());\n                }\n                else\n                {\n                    operator[](it.key()).merge_patch(it.value());\n                }\n            }\n        }\n        else\n        {\n            *this = apply_patch;\n        }\n    }\n\n    /// @}\n};\n\n/// @brief user-defined to_string function for JSON values\n/// @sa https://json.nlohmann.me/api/basic_json/to_string/\nNLOHMANN_BASIC_JSON_TPL_DECLARATION\nstd::string to_string(const NLOHMANN_BASIC_JSON_TPL& j)\n{\n    return j.dump();\n}\n\n} // namespace nlohmann\n\n///////////////////////\n// nonmember support //\n///////////////////////\n\nnamespace std // NOLINT(cert-dcl58-cpp)\n{\n\n/// @brief hash value for JSON objects\n/// @sa https://json.nlohmann.me/api/basic_json/std_hash/\nNLOHMANN_BASIC_JSON_TPL_DECLARATION\nstruct hash<nlohmann::NLOHMANN_BASIC_JSON_TPL>\n{\n    std::size_t operator()(const nlohmann::NLOHMANN_BASIC_JSON_TPL& j) const\n    {\n        return nlohmann::detail::hash(j);\n    }\n};\n\n// specialization for std::less<value_t>\ntemplate<>\nstruct less< ::nlohmann::detail::value_t> // do not remove the space after '<', see https://github.com/nlohmann/json/pull/679\n{\n    /*!\n    @brief compare two value_t enum values\n    @since version 3.0.0\n    */\n    bool operator()(nlohmann::detail::value_t lhs,\n                    nlohmann::detail::value_t rhs) const noexcept\n    {\n        return nlohmann::detail::operator<(lhs, rhs);\n    }\n};\n\n// C++20 prohibit function specialization in the std namespace.\n#ifndef JSON_HAS_CPP_20\n\n/// @brief exchanges the values of two JSON objects\n/// @sa https://json.nlohmann.me/api/basic_json/std_swap/\nNLOHMANN_BASIC_JSON_TPL_DECLARATION\ninline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC_JSON_TPL& j2) noexcept(  // NOLINT(readability-inconsistent-declaration-parameter-name)\n    is_nothrow_move_constructible<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value&&                          // NOLINT(misc-redundant-expression)\n    is_nothrow_move_assignable<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value)\n{\n    j1.swap(j2);\n}\n\n#endif\n\n} // namespace std\n\n/// @brief user-defined string literal for JSON values\n/// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json/\nJSON_HEDLEY_NON_NULL(1)\ninline nlohmann::json operator \"\" _json(const char* s, std::size_t n)\n{\n    return nlohmann::json::parse(s, s + n);\n}\n\n/// @brief user-defined string literal for JSON pointer\n/// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json_pointer/\nJSON_HEDLEY_NON_NULL(1)\ninline nlohmann::json::json_pointer operator \"\" _json_pointer(const char* s, std::size_t n)\n{\n    return nlohmann::json::json_pointer(std::string(s, n));\n}\n\n// #include <nlohmann/detail/macro_unscope.hpp>\n\n\n// restore clang diagnostic settings\n#if defined(__clang__)\n    #pragma clang diagnostic pop\n#endif\n\n// clean up\n#undef JSON_ASSERT\n#undef JSON_INTERNAL_CATCH\n#undef JSON_CATCH\n#undef JSON_THROW\n#undef JSON_TRY\n#undef JSON_PRIVATE_UNLESS_TESTED\n#undef JSON_HAS_CPP_11\n#undef JSON_HAS_CPP_14\n#undef JSON_HAS_CPP_17\n#undef JSON_HAS_CPP_20\n#undef JSON_HAS_FILESYSTEM\n#undef JSON_HAS_EXPERIMENTAL_FILESYSTEM\n#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION\n#undef NLOHMANN_BASIC_JSON_TPL\n#undef JSON_EXPLICIT\n#undef NLOHMANN_CAN_CALL_STD_FUNC_IMPL\n\n// #include <nlohmann/thirdparty/hedley/hedley_undef.hpp>\n\n\n#undef JSON_HEDLEY_ALWAYS_INLINE\n#undef JSON_HEDLEY_ARM_VERSION\n#undef JSON_HEDLEY_ARM_VERSION_CHECK\n#undef JSON_HEDLEY_ARRAY_PARAM\n#undef JSON_HEDLEY_ASSUME\n#undef JSON_HEDLEY_BEGIN_C_DECLS\n#undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE\n#undef JSON_HEDLEY_CLANG_HAS_BUILTIN\n#undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE\n#undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE\n#undef JSON_HEDLEY_CLANG_HAS_EXTENSION\n#undef JSON_HEDLEY_CLANG_HAS_FEATURE\n#undef JSON_HEDLEY_CLANG_HAS_WARNING\n#undef JSON_HEDLEY_COMPCERT_VERSION\n#undef JSON_HEDLEY_COMPCERT_VERSION_CHECK\n#undef JSON_HEDLEY_CONCAT\n#undef JSON_HEDLEY_CONCAT3\n#undef JSON_HEDLEY_CONCAT3_EX\n#undef JSON_HEDLEY_CONCAT_EX\n#undef JSON_HEDLEY_CONST\n#undef JSON_HEDLEY_CONSTEXPR\n#undef JSON_HEDLEY_CONST_CAST\n#undef JSON_HEDLEY_CPP_CAST\n#undef JSON_HEDLEY_CRAY_VERSION\n#undef JSON_HEDLEY_CRAY_VERSION_CHECK\n#undef JSON_HEDLEY_C_DECL\n#undef JSON_HEDLEY_DEPRECATED\n#undef JSON_HEDLEY_DEPRECATED_FOR\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION\n#undef JSON_HEDLEY_DIAGNOSTIC_POP\n#undef JSON_HEDLEY_DIAGNOSTIC_PUSH\n#undef JSON_HEDLEY_DMC_VERSION\n#undef JSON_HEDLEY_DMC_VERSION_CHECK\n#undef JSON_HEDLEY_EMPTY_BASES\n#undef JSON_HEDLEY_EMSCRIPTEN_VERSION\n#undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK\n#undef JSON_HEDLEY_END_C_DECLS\n#undef JSON_HEDLEY_FLAGS\n#undef JSON_HEDLEY_FLAGS_CAST\n#undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE\n#undef JSON_HEDLEY_GCC_HAS_BUILTIN\n#undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE\n#undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE\n#undef JSON_HEDLEY_GCC_HAS_EXTENSION\n#undef JSON_HEDLEY_GCC_HAS_FEATURE\n#undef JSON_HEDLEY_GCC_HAS_WARNING\n#undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK\n#undef JSON_HEDLEY_GCC_VERSION\n#undef JSON_HEDLEY_GCC_VERSION_CHECK\n#undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE\n#undef JSON_HEDLEY_GNUC_HAS_BUILTIN\n#undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE\n#undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE\n#undef JSON_HEDLEY_GNUC_HAS_EXTENSION\n#undef JSON_HEDLEY_GNUC_HAS_FEATURE\n#undef JSON_HEDLEY_GNUC_HAS_WARNING\n#undef JSON_HEDLEY_GNUC_VERSION\n#undef JSON_HEDLEY_GNUC_VERSION_CHECK\n#undef JSON_HEDLEY_HAS_ATTRIBUTE\n#undef JSON_HEDLEY_HAS_BUILTIN\n#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE\n#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS\n#undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE\n#undef JSON_HEDLEY_HAS_EXTENSION\n#undef JSON_HEDLEY_HAS_FEATURE\n#undef JSON_HEDLEY_HAS_WARNING\n#undef JSON_HEDLEY_IAR_VERSION\n#undef JSON_HEDLEY_IAR_VERSION_CHECK\n#undef JSON_HEDLEY_IBM_VERSION\n#undef JSON_HEDLEY_IBM_VERSION_CHECK\n#undef JSON_HEDLEY_IMPORT\n#undef JSON_HEDLEY_INLINE\n#undef JSON_HEDLEY_INTEL_CL_VERSION\n#undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK\n#undef JSON_HEDLEY_INTEL_VERSION\n#undef JSON_HEDLEY_INTEL_VERSION_CHECK\n#undef JSON_HEDLEY_IS_CONSTANT\n#undef JSON_HEDLEY_IS_CONSTEXPR_\n#undef JSON_HEDLEY_LIKELY\n#undef JSON_HEDLEY_MALLOC\n#undef JSON_HEDLEY_MCST_LCC_VERSION\n#undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK\n#undef JSON_HEDLEY_MESSAGE\n#undef JSON_HEDLEY_MSVC_VERSION\n#undef JSON_HEDLEY_MSVC_VERSION_CHECK\n#undef JSON_HEDLEY_NEVER_INLINE\n#undef JSON_HEDLEY_NON_NULL\n#undef JSON_HEDLEY_NO_ESCAPE\n#undef JSON_HEDLEY_NO_RETURN\n#undef JSON_HEDLEY_NO_THROW\n#undef JSON_HEDLEY_NULL\n#undef JSON_HEDLEY_PELLES_VERSION\n#undef JSON_HEDLEY_PELLES_VERSION_CHECK\n#undef JSON_HEDLEY_PGI_VERSION\n#undef JSON_HEDLEY_PGI_VERSION_CHECK\n#undef JSON_HEDLEY_PREDICT\n#undef JSON_HEDLEY_PRINTF_FORMAT\n#undef JSON_HEDLEY_PRIVATE\n#undef JSON_HEDLEY_PUBLIC\n#undef JSON_HEDLEY_PURE\n#undef JSON_HEDLEY_REINTERPRET_CAST\n#undef JSON_HEDLEY_REQUIRE\n#undef JSON_HEDLEY_REQUIRE_CONSTEXPR\n#undef JSON_HEDLEY_REQUIRE_MSG\n#undef JSON_HEDLEY_RESTRICT\n#undef JSON_HEDLEY_RETURNS_NON_NULL\n#undef JSON_HEDLEY_SENTINEL\n#undef JSON_HEDLEY_STATIC_ASSERT\n#undef JSON_HEDLEY_STATIC_CAST\n#undef JSON_HEDLEY_STRINGIFY\n#undef JSON_HEDLEY_STRINGIFY_EX\n#undef JSON_HEDLEY_SUNPRO_VERSION\n#undef JSON_HEDLEY_SUNPRO_VERSION_CHECK\n#undef JSON_HEDLEY_TINYC_VERSION\n#undef JSON_HEDLEY_TINYC_VERSION_CHECK\n#undef JSON_HEDLEY_TI_ARMCL_VERSION\n#undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK\n#undef JSON_HEDLEY_TI_CL2000_VERSION\n#undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK\n#undef JSON_HEDLEY_TI_CL430_VERSION\n#undef JSON_HEDLEY_TI_CL430_VERSION_CHECK\n#undef JSON_HEDLEY_TI_CL6X_VERSION\n#undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK\n#undef JSON_HEDLEY_TI_CL7X_VERSION\n#undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK\n#undef JSON_HEDLEY_TI_CLPRU_VERSION\n#undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK\n#undef JSON_HEDLEY_TI_VERSION\n#undef JSON_HEDLEY_TI_VERSION_CHECK\n#undef JSON_HEDLEY_UNAVAILABLE\n#undef JSON_HEDLEY_UNLIKELY\n#undef JSON_HEDLEY_UNPREDICTABLE\n#undef JSON_HEDLEY_UNREACHABLE\n#undef JSON_HEDLEY_UNREACHABLE_RETURN\n#undef JSON_HEDLEY_VERSION\n#undef JSON_HEDLEY_VERSION_DECODE_MAJOR\n#undef JSON_HEDLEY_VERSION_DECODE_MINOR\n#undef JSON_HEDLEY_VERSION_DECODE_REVISION\n#undef JSON_HEDLEY_VERSION_ENCODE\n#undef JSON_HEDLEY_WARNING\n#undef JSON_HEDLEY_WARN_UNUSED_RESULT\n#undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG\n#undef JSON_HEDLEY_FALL_THROUGH\n\n\n\n#endif  // INCLUDE_NLOHMANN_JSON_HPP_\n"
  },
  {
    "path": "src/madness/external/tinyxml/CMakeLists.txt",
    "content": "# src/madness/external/tinyxml\n\nset(MADTINYXML_HEADERS tinystr.h tinyxml.h)\nset(MADTINYXML_SOURCES tinystr.cc tinyxml.cc tinyxmlerror.cc tinyxmlparser.cc)\n\n# Create the MADtinyxml library\nadd_mad_library(tinyxml MADTINYXML_SOURCES MADTINYXML_HEADERS \"dummy\" \"madness/external/tinyxml/\")\n\ntarget_compile_options(MADtinyxml PRIVATE -O0)\n"
  },
  {
    "path": "src/madness/external/tinyxml/README",
    "content": "This directory contains the *modified* source of TinyXML from\nhttp://www.grinninglizard.com/tinyxml/ and\nhttp://sourceforge.net/projects/tinyxml.  Its C++ source files, header\nfiles, and readme.txt have been extracted, and \"*.cpp\" renamed to\n\"*.cc\".  The TinyXML license information is contained in readme.txt.\n\nThe vanilla TinyXML tar file is contained in this directory along with\nthe tinyxml C++ source files (unmodified) and a MADNESS-specific\nMakefile.\n\nThe only files in this directory that are part of MADNESS are\nREADME and Makefile.\n\n!! Message to MADNESS developers.  Please record below modifications\nto any TinyXML file.\n\n\n* RJH 2/2/2008.  Defined TIXML_USE_STL near top of tixml.h to\n  force use of STL without modifying MADNESS configuration files.\n\n"
  },
  {
    "path": "src/madness/external/tinyxml/readme.txt",
    "content": "/** @mainpage\n\n<h1> TinyXML </h1>\n\nTinyXML is a simple, small, C++ XML parser that can be easily \nintegrated into other programs.\n\n<h2> What it does. </h2>\n\t\nIn brief, TinyXML parses an XML document, and builds from that a \nDocument Object Model (DOM) that can be read, modified, and saved.\n\nXML stands for \"eXtensible Markup Language.\" It allows you to create \nyour own document markups. Where HTML does a very good job of marking \ndocuments for browsers, XML allows you to define any kind of document \nmarkup, for example a document that describes a \"to do\" list for an \norganizer application. XML is a very structured and convenient format.\nAll those random file formats created to store application data can \nall be replaced with XML. One parser for everything.\n\nThe best place for the complete, correct, and quite frankly hard to\nread spec is at <a href=\"http://www.w3.org/TR/2004/REC-xml-20040204/\">\nhttp://www.w3.org/TR/2004/REC-xml-20040204/</a>. An intro to XML\n(that I really like) can be found at \n<a href=\"http://skew.org/xml/tutorial/\">http://skew.org/xml/tutorial</a>.\n\nThere are different ways to access and interact with XML data.\nTinyXML uses a Document Object Model (DOM), meaning the XML data is parsed\ninto a C++ objects that can be browsed and manipulated, and then \nwritten to disk or another output stream. You can also construct an XML document \nfrom scratch with C++ objects and write this to disk or another output\nstream.\n\nTinyXML is designed to be easy and fast to learn. It is two headers \nand four cpp files. Simply add these to your project and off you go. \nThere is an example file - xmltest.cpp - to get you started. \n\nTinyXML is released under the ZLib license, \nso you can use it in open source or commercial code. The details\nof the license are at the top of every source file.\n\nTinyXML attempts to be a flexible parser, but with truly correct and\ncompliant XML output. TinyXML should compile on any reasonably C++\ncompliant system. It does not rely on exceptions or RTTI. It can be \ncompiled with or without STL support. TinyXML fully supports\nthe UTF-8 encoding, and the first 64k character entities.\n\n\n<h2> What it doesn't do. </h2>\n\nTinyXML doesn't parse or use DTDs (Document Type Definitions) or XSLs\n(eXtensible Stylesheet Language.) There are other parsers out there \n(check out www.sourceforge.org, search for XML) that are much more fully\nfeatured. But they are also much bigger, take longer to set up in\nyour project, have a higher learning curve, and often have a more\nrestrictive license. If you are working with browsers or have more\ncomplete XML needs, TinyXML is not the parser for you.\n\nThe following DTD syntax will not parse at this time in TinyXML:\n\n@verbatim\n\t<!DOCTYPE Archiv [\n\t <!ELEMENT Comment (#PCDATA)>\n\t]>\n@endverbatim\n\nbecause TinyXML sees this as a !DOCTYPE node with an illegally \nembedded !ELEMENT node. This may be addressed in the future.\n\n<h2> Tutorials. </h2>\n\nFor the impatient, here is a tutorial to get you going. A great way to get started, \nbut it is worth your time to read this (very short) manual completely.\n\n- @subpage tutorial0\n\n<h2> Code Status.  </h2>\n\nTinyXML is mature, tested code. It is very stable. If you find\nbugs, please file a bug report on the sourceforge web site\n(www.sourceforge.net/projects/tinyxml). We'll get them straightened \nout as soon as possible.\n\nThere are some areas of improvement; please check sourceforge if you are\ninterested in working on TinyXML.\n\n<h2> Related Projects </h2>\n\nTinyXML projects you may find useful! (Descriptions provided by the projects.)\n\n<ul>\n<li> <b>TinyXPath</b> (http://tinyxpath.sourceforge.net). TinyXPath is a small footprint \n     XPath syntax decoder, written in C++.</li>\n<li> <b>TinyXML++</b> (http://code.google.com/p/ticpp/). TinyXML++ is a completely new \n     interface to TinyXML that uses MANY of the C++ strengths. Templates, \n\t exceptions, and much better error handling.</li>\n</ul>\n\n<h2> Features </h2>\n\n<h3> Using STL </h3>\n\nTinyXML can be compiled to use or not use STL. When using STL, TinyXML\nuses the std::string class, and fully supports std::istream, std::ostream,\noperator<<, and operator>>. Many API methods have both 'const char*' and\n'const std::string&' forms.\n\nWhen STL support is compiled out, no STL files are included whatsoever. All\nthe string classes are implemented by TinyXML itself. API methods\nall use the 'const char*' form for input.\n\nUse the compile time #define:\n\n\tTIXML_USE_STL\n\nto compile one version or the other. This can be passed by the compiler,\nor set as the first line of \"tinyxml.h\".\n\nNote: If compiling the test code in Linux, setting the environment\nvariable TINYXML_USE_STL=YES/NO will control STL compilation. In the\nWindows project file, STL and non STL targets are provided. In your project,\nIt's probably easiest to add the line \"#define TIXML_USE_STL\" as the first\nline of tinyxml.h.\n\n<h3> UTF-8 </h3>\n\nTinyXML supports UTF-8 allowing to manipulate XML files in any language. TinyXML\nalso supports \"legacy mode\" - the encoding used before UTF-8 support and\nprobably best described as \"extended ascii\".\n\nNormally, TinyXML will try to detect the correct encoding and use it. However,\nby setting the value of TIXML_DEFAULT_ENCODING in the header file, TinyXML\ncan be forced to always use one encoding.\n\nTinyXML will assume Legacy Mode until one of the following occurs:\n<ol>\n\t<li> If the non-standard but common \"UTF-8 lead bytes\" (0xef 0xbb 0xbf)\n\t\t begin the file or data stream, TinyXML will read it as UTF-8. </li>\n\t<li> If the declaration tag is read, and it has an encoding=\"UTF-8\", then\n\t\t TinyXML will read it as UTF-8. </li>\n\t<li> If the declaration tag is read, and it has no encoding specified, then TinyXML will \n\t\t read it as UTF-8. </li>\n\t<li> If the declaration tag is read, and it has an encoding=\"something else\", then TinyXML \n\t\t will read it as Legacy Mode. In legacy mode, TinyXML will work as it did before. It's \n\t\t not clear what that mode does exactly, but old content should keep working.</li>\n\t<li> Until one of the above criteria is met, TinyXML runs in Legacy Mode.</li>\n</ol>\n\nWhat happens if the encoding is incorrectly set or detected? TinyXML will try\nto read and pass through text seen as improperly encoded. You may get some strange results or \nmangled characters. You may want to force TinyXML to the correct mode.\n\nYou may force TinyXML to Legacy Mode by using LoadFile( TIXML_ENCODING_LEGACY ) or\nLoadFile( filename, TIXML_ENCODING_LEGACY ). You may force it to use legacy mode all\nthe time by setting TIXML_DEFAULT_ENCODING = TIXML_ENCODING_LEGACY. Likewise, you may \nforce it to TIXML_ENCODING_UTF8 with the same technique.\n\nFor English users, using English XML, UTF-8 is the same as low-ASCII. You\ndon't need to be aware of UTF-8 or change your code in any way. You can think\nof UTF-8 as a \"superset\" of ASCII.\n\nUTF-8 is not a double byte format - but it is a standard encoding of Unicode!\nTinyXML does not use or directly support wchar, TCHAR, or Microsoft's _UNICODE at this time. \nIt is common to see the term \"Unicode\" improperly refer to UTF-16, a wide byte encoding\nof unicode. This is a source of confusion.\n\nFor \"high-ascii\" languages - everything not English, pretty much - TinyXML can\nhandle all languages, at the same time, as long as the XML is encoded\nin UTF-8. That can be a little tricky, older programs and operating systems\ntend to use the \"default\" or \"traditional\" code page. Many apps (and almost all\nmodern ones) can output UTF-8, but older or stubborn (or just broken) ones\nstill output text in the default code page. \n\nFor example, Japanese systems traditionally use SHIFT-JIS encoding. \nText encoded as SHIFT-JIS can not be read by TinyXML. \nA good text editor can import SHIFT-JIS and then save as UTF-8.\n\nThe <a href=\"http://skew.org/xml/tutorial/\">Skew.org link</a> does a great\njob covering the encoding issue.\n\nThe test file \"utf8test.xml\" is an XML containing English, Spanish, Russian,\nand Simplified Chinese. (Hopefully they are translated correctly). The file\n\"utf8test.gif\" is a screen capture of the XML file, rendered in IE. Note that\nif you don't have the correct fonts (Simplified Chinese or Russian) on your\nsystem, you won't see output that matches the GIF file even if you can parse\nit correctly. Also note that (at least on my Windows machine) console output\nis in a Western code page, so that Print() or printf() cannot correctly display\nthe file. This is not a bug in TinyXML - just an OS issue. No data is lost or \ndestroyed by TinyXML. The console just doesn't render UTF-8.\n\n\n<h3> Entities </h3>\nTinyXML recognizes the pre-defined \"character entities\", meaning special\ncharacters. Namely:\n\n@verbatim\n\t&amp;\t&\n\t&lt;\t<\n\t&gt;\t>\n\t&quot;\t\"\n\t&apos;\t'\n@endverbatim\n\nThese are recognized when the XML document is read, and translated to there\nUTF-8 equivalents. For instance, text with the XML of:\n\n@verbatim\n\tFar &amp; Away\n@endverbatim\n\nwill have the Value() of \"Far & Away\" when queried from the TiXmlText object,\nand will be written back to the XML stream/file as an ampersand. Older versions\nof TinyXML \"preserved\" character entities, but the newer versions will translate\nthem into characters.\n\nAdditionally, any character can be specified by its Unicode code point:\nThe syntax \"&#xA0;\" or \"&#160;\" are both to the non-breaking space characher.\n\n<h3> Printing </h3>\nTinyXML can print output in several different ways that all have strengths and limitations.\n\n- Print( FILE* ). Output to a std-C stream, which includes all C files as well as stdout.\n\t- \"Pretty prints\", but you don't have control over printing options.\n\t- The output is streamed directly to the FILE object, so there is no memory overhead\n\t  in the TinyXML code.\n\t- used by Print() and SaveFile()\n\n- operator<<. Output to a c++ stream.\n\t- Integrates with standart C++ iostreams.\n\t- Outputs in \"network printing\" mode without line breaks. Good for network transmission\n\t  and moving XML between C++ objects, but hard for a human to read.\n\n- TiXmlPrinter. Output to a std::string or memory buffer.\n\t- API is less concise\n\t- Future printing options will be put here.\n\t- Printing may change slightly in future versions as it is refined and expanded.\n\n<h3> Streams </h3>\nWith TIXML_USE_STL on TinyXML supports C++ streams (operator <<,>>) streams as well\nas C (FILE*) streams. There are some differences that you may need to be aware of.\n\nC style output:\n\t- based on FILE*\n\t- the Print() and SaveFile() methods\n\n\tGenerates formatted output, with plenty of white space, intended to be as \n\thuman-readable as possible. They are very fast, and tolerant of ill formed \n\tXML documents. For example, an XML document that contains 2 root elements \n\tand 2 declarations, will still print.\n\nC style input:\n\t- based on FILE*\n\t- the Parse() and LoadFile() methods\n\n\tA fast, tolerant read. Use whenever you don't need the C++ streams.\n\nC++ style output:\n\t- based on std::ostream\n\t- operator<<\n\n\tGenerates condensed output, intended for network transmission rather than\n\treadability. Depending on your system's implementation of the ostream class,\n\tthese may be somewhat slower. (Or may not.) Not tolerant of ill formed XML:\n\ta document should contain the correct one root element. Additional root level\n\telements will not be streamed out.\n\nC++ style input:\n\t- based on std::istream\n\t- operator>>\n\n\tReads XML from a stream, making it useful for network transmission. The tricky\n\tpart is knowing when the XML document is complete, since there will almost\n\tcertainly be other data in the stream. TinyXML will assume the XML data is\n\tcomplete after it reads the root element. Put another way, documents that\n\tare ill-constructed with more than one root element will not read correctly.\n\tAlso note that operator>> is somewhat slower than Parse, due to both \n\timplementation of the STL and limitations of TinyXML.\n\n<h3> White space </h3>\nThe world simply does not agree on whether white space should be kept, or condensed.\nFor example, pretend the '_' is a space, and look at \"Hello____world\". HTML, and \nat least some XML parsers, will interpret this as \"Hello_world\". They condense white\nspace. Some XML parsers do not, and will leave it as \"Hello____world\". (Remember\nto keep pretending the _ is a space.) Others suggest that __Hello___world__ should become\nHello___world.\n\nIt's an issue that hasn't been resolved to my satisfaction. TinyXML supports the\nfirst 2 approaches. Call TiXmlBase::SetCondenseWhiteSpace( bool ) to set the desired behavior.\nThe default is to condense white space.\n\nIf you change the default, you should call TiXmlBase::SetCondenseWhiteSpace( bool )\nbefore making any calls to Parse XML data, and I don't recommend changing it after\nit has been set.\n\n\n<h3> Handles </h3>\n\nWhere browsing an XML document in a robust way, it is important to check\nfor null returns from method calls. An error safe implementation can\ngenerate a lot of code like:\n\n@verbatim\nTiXmlElement* root = document.FirstChildElement( \"Document\" );\nif ( root )\n{\n\tTiXmlElement* element = root->FirstChildElement( \"Element\" );\n\tif ( element )\n\t{\n\t\tTiXmlElement* child = element->FirstChildElement( \"Child\" );\n\t\tif ( child )\n\t\t{\n\t\t\tTiXmlElement* child2 = child->NextSiblingElement( \"Child\" );\n\t\t\tif ( child2 )\n\t\t\t{\n\t\t\t\t// Finally do something useful.\n@endverbatim\n\nHandles have been introduced to clean this up. Using the TiXmlHandle class,\nthe previous code reduces to:\n\n@verbatim\nTiXmlHandle docHandle( &document );\nTiXmlElement* child2 = docHandle.FirstChild( \"Document\" ).FirstChild( \"Element\" ).Child( \"Child\", 1 ).ToElement();\nif ( child2 )\n{\n\t// do something useful\n@endverbatim\n\nWhich is much easier to deal with. See TiXmlHandle for more information.\n\n\n<h3> Row and Column tracking </h3>\nBeing able to track nodes and attributes back to their origin location\nin source files can be very important for some applications. Additionally,\nknowing where parsing errors occurred in the original source can be very\ntime saving.\n\nTinyXML can tracks the row and column origin of all nodes and attributes\nin a text file. The TiXmlBase::Row() and TiXmlBase::Column() methods return\nthe origin of the node in the source text. The correct tabs can be \nconfigured in TiXmlDocument::SetTabSize().\n\n\n<h2> Using and Installing </h2>\n\nTo Compile and Run xmltest:\n\nA Linux Makefile and a Windows Visual C++ .dsw file is provided. \nSimply compile and run. It will write the file demotest.xml to your \ndisk and generate output on the screen. It also tests walking the\nDOM by printing out the number of nodes found using different \ntechniques.\n\nThe Linux makefile is very generic and runs on many systems - it \nis currently tested on mingw and\nMacOSX. You do not need to run 'make depend'. The dependecies have been\nhard coded.\n\n<h3>Windows project file for VC6</h3>\n<ul>\n<li>tinyxml:\t\ttinyxml library, non-STL </li>\n<li>tinyxmlSTL:\t\ttinyxml library, STL </li>\n<li>tinyXmlTest:\ttest app, non-STL </li>\n<li>tinyXmlTestSTL: test app, STL </li>\n</ul>\n\n<h3>Makefile</h3>\nAt the top of the makefile you can set:\n\nPROFILE, DEBUG, and TINYXML_USE_STL. Details (such that they are) are in\nthe makefile.\n\nIn the tinyxml directory, type \"make clean\" then \"make\". The executable\nfile 'xmltest' will be created.\n\n\n\n<h3>To Use in an Application:</h3>\n\nAdd tinyxml.cpp, tinyxml.h, tinyxmlerror.cpp, tinyxmlparser.cpp, tinystr.cpp, and tinystr.h to your\nproject or make file. That's it! It should compile on any reasonably\ncompliant C++ system. You do not need to enable exceptions or\nRTTI for TinyXML.\n\n\n<h2> How TinyXML works.  </h2>\n\nAn example is probably the best way to go. Take:\n@verbatim\n\t<?xml version=\"1.0\" standalone=no>\n\t<!-- Our to do list data -->\n\t<ToDo>\n\t\t<Item priority=\"1\"> Go to the <bold>Toy store!</bold></Item>\n\t\t<Item priority=\"2\"> Do bills</Item>\n\t</ToDo>\n@endverbatim\n\nIts not much of a To Do list, but it will do. To read this file \n(say \"demo.xml\") you would create a document, and parse it in:\n@verbatim\n\tTiXmlDocument doc( \"demo.xml\" );\n\tdoc.LoadFile();\n@endverbatim\n\nAnd its ready to go. Now lets look at some lines and how they \nrelate to the DOM.\n\n@verbatim\n<?xml version=\"1.0\" standalone=no>\n@endverbatim\n\n\tThe first line is a declaration, and gets turned into the\n\tTiXmlDeclaration class. It will be the first child of the\n\tdocument node.\n\t\n\tThis is the only directive/special tag parsed by by TinyXML.\n\tGenerally directive tags are stored in TiXmlUnknown so the \n\tcommands wont be lost when it is saved back to disk.\n\n@verbatim\n<!-- Our to do list data -->\n@endverbatim\n\n\tA comment. Will become a TiXmlComment object.\n\n@verbatim\n<ToDo>\n@endverbatim\n\n\tThe \"ToDo\" tag defines a TiXmlElement object. This one does not have \n\tany attributes, but does contain 2 other elements.\n\n@verbatim\n<Item priority=\"1\"> \n@endverbatim\n\n\tCreates another TiXmlElement which is a child of the \"ToDo\" element. \n\tThis element has 1 attribute, with the name \"priority\" and the value \n\t\"1\".\n\n@verbatim\nGo to the\n@endverbatim \n\n\tA TiXmlText. This is a leaf node and cannot contain other nodes. \n\tIt is a child of the \"Item\" TiXmlElement.\n\n@verbatim\n<bold>\n@endverbatim\n\n\t\n\tAnother TiXmlElement, this one a child of the \"Item\" element.\n\nEtc.\n\nLooking at the entire object tree, you end up with:\n@verbatim\nTiXmlDocument\t\t\t\t\t\"demo.xml\"\n\tTiXmlDeclaration\t\t\t\"version='1.0'\" \"standalone=no\"\n\tTiXmlComment\t\t\t\t\" Our to do list data\"\n\tTiXmlElement\t\t\t\t\"ToDo\"\n\t\tTiXmlElement\t\t\t\"Item\" Attribtutes: priority = 1\n\t\t\tTiXmlText\t\t\t\"Go to the \"\n\t\t\tTiXmlElement\t\t\"bold\"\n\t\t\t\tTiXmlText\t\t\"Toy store!\"\n\t\tTiXmlElement\t\t\t\"Item\" Attributes: priority=2\n\t\t\tTiXmlText\t\t\t\"Do bills\"\n@endverbatim\n\n<h2> Documentation </h2>\n\nThe documentation is build with Doxygen, using the 'dox' \nconfiguration file.\n\n<h2> License </h2>\n\nTinyXML is released under the zlib license:\n\nThis software is provided 'as-is', without any express or implied \nwarranty. In no event will the authors be held liable for any \ndamages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any \npurpose, including commercial applications, and to alter it and \nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must \nnot claim that you wrote the original software. If you use this \nsoftware in a product, an acknowledgment in the product documentation \nwould be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and \nmust not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source \ndistribution.\n\n<h2> References  </h2>\n\nThe World Wide Web Consortium is the definitive standard body for \nXML, and there web pages contain huge amounts of information. \n\nThe definitive spec: <a href=\"http://www.w3.org/TR/2004/REC-xml-20040204/\">\nhttp://www.w3.org/TR/2004/REC-xml-20040204/</a>\n\nI also recommend \"XML Pocket Reference\" by Robert Eckstein and published by \nOReilly...the book that got the whole thing started.\n\n<h2> Contributors, Contacts, and a Brief History </h2>\n\nThanks very much to everyone who sends suggestions, bugs, ideas, and \nencouragement. It all helps, and makes this project fun. A special thanks\nto the contributors on the web pages that keep it lively.\n\nSo many people have sent in bugs and ideas, that rather than list here \nwe try to give credit due in the \"changes.txt\" file.\n\nTinyXML was originally written by Lee Thomason. (Often the \"I\" still\nin the documentation.) Lee reviews changes and releases new versions,\nwith the help of Yves Berquin, Andrew Ellerton, and the tinyXml community.\n\nWe appreciate your suggestions, and would love to know if you \nuse TinyXML. Hopefully you will enjoy it and find it useful. \nPlease post questions, comments, file bugs, or contact us at:\n\nwww.sourceforge.net/projects/tinyxml\n\nLee Thomason, Yves Berquin, Andrew Ellerton\n*/\n"
  },
  {
    "path": "src/madness/external/tinyxml/tinystr.cc",
    "content": "/*\nwww.sourceforge.net/projects/tinyxml\nOriginal file by Yves Berquin.\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any\ndamages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any\npurpose, including commercial applications, and to alter it and\nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must\nnot claim that you wrote the original software. If you use this\nsoftware in a product, an acknowledgment in the product documentation\nwould be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and\nmust not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source\ndistribution.\n*/\n\n/*\n * THIS FILE WAS ALTERED BY Tyge Lvset, 7. April 2005.\n */\n\n\n#ifndef TIXML_USE_STL\n\n#include \"tinystr.h\"\n\n// Error value for find primitive\nconst TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1);\n\n\n// Null rep.\nTiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\\0' } };\n\n\nvoid TiXmlString::reserve (size_type cap)\n{\n\tif (cap > capacity())\n\t{\n\t\tTiXmlString tmp;\n\t\ttmp.init(length(), cap);\n\t\tmemcpy(tmp.start(), data(), length());\n\t\tswap(tmp);\n\t}\n}\n\n\nTiXmlString& TiXmlString::assign(const char* str, size_type len)\n{\n\tsize_type cap = capacity();\n\tif (len > cap || cap > 3*(len + 8))\n\t{\n\t\tTiXmlString tmp;\n\t\ttmp.init(len);\n\t\tmemcpy(tmp.start(), str, len);\n\t\tswap(tmp);\n\t}\n\telse\n\t{\n\t\tmemmove(start(), str, len);\n\t\tset_size(len);\n\t}\n\treturn *this;\n}\n\n\nTiXmlString& TiXmlString::append(const char* str, size_type len)\n{\n\tsize_type newsize = length() + len;\n\tif (newsize > capacity())\n\t{\n\t\treserve (newsize + capacity());\n\t}\n\tmemmove(finish(), str, len);\n\tset_size(newsize);\n\treturn *this;\n}\n\n\nTiXmlString operator + (const TiXmlString & a, const TiXmlString & b)\n{\n\tTiXmlString tmp;\n\ttmp.reserve(a.length() + b.length());\n\ttmp += a;\n\ttmp += b;\n\treturn tmp;\n}\n\nTiXmlString operator + (const TiXmlString & a, const char* b)\n{\n\tTiXmlString tmp;\n\tTiXmlString::size_type b_len = static_cast<TiXmlString::size_type>( strlen(b) );\n\ttmp.reserve(a.length() + b_len);\n\ttmp += a;\n\ttmp.append(b, b_len);\n\treturn tmp;\n}\n\nTiXmlString operator + (const char* a, const TiXmlString & b)\n{\n\tTiXmlString tmp;\n\tTiXmlString::size_type a_len = static_cast<TiXmlString::size_type>( strlen(a) );\n\ttmp.reserve(a_len + b.length());\n\ttmp.append(a, a_len);\n\ttmp += b;\n\treturn tmp;\n}\n\n\n#endif\t// TIXML_USE_STL\n"
  },
  {
    "path": "src/madness/external/tinyxml/tinystr.h",
    "content": "/*\nwww.sourceforge.net/projects/tinyxml\nOriginal file by Yves Berquin.\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any\ndamages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any\npurpose, including commercial applications, and to alter it and\nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must\nnot claim that you wrote the original software. If you use this\nsoftware in a product, an acknowledgment in the product documentation\nwould be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and\nmust not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source\ndistribution.\n*/\n\n/*\n * THIS FILE WAS ALTERED BY Tyge Lovset, 7. April 2005.\n *\n * - completely rewritten. compact, clean, and fast implementation.\n * - sizeof(TiXmlString) = pointer size (4 bytes on 32-bit systems)\n * - fixed reserve() to work as per specification.\n * - fixed buggy compares operator==(), operator<(), and operator>()\n * - fixed operator+=() to take a const ref argument, following spec.\n * - added \"copy\" constructor with length, and most compare operators.\n * - added swap(), clear(), size(), capacity(), operator+().\n */\n\n#ifndef TIXML_USE_STL\n\n#ifndef MADNESS_TINYXML_TINYSTR_H__INCLUDED\n#define MADNESS_TINYXML_TINYSTR_H__INCLUDED\n\n#include <assert.h>\n#include <string.h>\n\n/*\tThe support for explicit isn't that universal, and it isn't really\n\trequired - it is used to check that the TiXmlString class isn't incorrectly\n\tused. Be nice to old compilers and macro it here:\n*/\n#if defined(_MSC_VER) && (_MSC_VER >= 1200 )\n\t// Microsoft visual studio, version 6 and higher.\n\t#define TIXML_EXPLICIT explicit\n#elif defined(__GNUC__) && (__GNUC__ >= 3 )\n\t// GCC version 3 and higher.s\n\t#define TIXML_EXPLICIT explicit\n#else\n\t#define TIXML_EXPLICIT\n#endif\n\n\n/*\n   TiXmlString is an emulation of a subset of the std::string template.\n   Its purpose is to allow compiling TinyXML on compilers with no or poor STL support.\n   Only the member functions relevant to the TinyXML project have been implemented.\n   The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase\n   a string and there's no more room, we allocate a buffer twice as big as we need.\n*/\nclass TiXmlString\n{\n  public :\n\t// The size type used\n  \ttypedef size_t size_type;\n\n\t// Error value for find primitive\n\tstatic const size_type npos; // = -1;\n\n\n\t// TiXmlString empty constructor\n\tTiXmlString () : rep_(&nullrep_)\n\t{\n\t}\n\n\t// TiXmlString copy constructor\n\tTiXmlString ( const TiXmlString & copy) : rep_(0)\n\t{\n\t\tinit(copy.length());\n\t\tmemcpy(start(), copy.data(), length());\n\t}\n\n\t// TiXmlString constructor, based on a string\n\tTIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0)\n\t{\n\t\tinit( static_cast<size_type>( strlen(copy) ));\n\t\tmemcpy(start(), copy, length());\n\t}\n\n\t// TiXmlString constructor, based on a string\n\tTIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0)\n\t{\n\t\tinit(len);\n\t\tmemcpy(start(), str, len);\n\t}\n\n\t// TiXmlString destructor\n\t~TiXmlString ()\n\t{\n\t\tquit();\n\t}\n\n\t// = operator\n\tTiXmlString& operator = (const char * copy)\n\t{\n\t\treturn assign( copy, (size_type)strlen(copy));\n\t}\n\n\t// = operator\n\tTiXmlString& operator = (const TiXmlString & copy)\n\t{\n\t\treturn assign(copy.start(), copy.length());\n\t}\n\n\n\t// += operator. Maps to append\n\tTiXmlString& operator += (const char * suffix)\n\t{\n\t\treturn append(suffix, static_cast<size_type>( strlen(suffix) ));\n\t}\n\n\t// += operator. Maps to append\n\tTiXmlString& operator += (char single)\n\t{\n\t\treturn append(&single, 1);\n\t}\n\n\t// += operator. Maps to append\n\tTiXmlString& operator += (const TiXmlString & suffix)\n\t{\n\t\treturn append(suffix.data(), suffix.length());\n\t}\n\n\n\t// Convert a TiXmlString into a null-terminated char *\n\tconst char * c_str () const { return rep_->str; }\n\n\t// Convert a TiXmlString into a char * (need not be null terminated).\n\tconst char * data () const { return rep_->str; }\n\n\t// Return the length of a TiXmlString\n\tsize_type length () const { return rep_->size; }\n\n\t// Alias for length()\n\tsize_type size () const { return rep_->size; }\n\n\t// Checks if a TiXmlString is empty\n\tbool empty () const { return rep_->size == 0; }\n\n\t// Return capacity of string\n\tsize_type capacity () const { return rep_->capacity; }\n\n\n\t// single char extraction\n\tconst char& at (size_type index) const\n\t{\n\t\tassert( index < length() );\n\t\treturn rep_->str[ index ];\n\t}\n\n\t// [] operator\n\tchar& operator [] (size_type index) const\n\t{\n\t\tassert( index < length() );\n\t\treturn rep_->str[ index ];\n\t}\n\n\t// find a char in a string. Return TiXmlString::npos if not found\n\tsize_type find (char lookup) const\n\t{\n\t\treturn find(lookup, 0);\n\t}\n\n\t// find a char in a string from an offset. Return TiXmlString::npos if not found\n\tsize_type find (char tofind, size_type offset) const\n\t{\n\t\tif (offset >= length()) return npos;\n\n\t\tfor (const char* p = c_str() + offset; *p != '\\0'; ++p)\n\t\t{\n\t\t   if (*p == tofind) return static_cast< size_type >( p - c_str() );\n\t\t}\n\t\treturn npos;\n\t}\n\n\tvoid clear ()\n\t{\n\t\t//Lee:\n\t\t//The original was just too strange, though correct:\n\t\t//\tTiXmlString().swap(*this);\n\t\t//Instead use the quit & re-init:\n\t\tquit();\n\t\tinit(0,0);\n\t}\n\n\t/*\tFunction to reserve a big amount of data when we know we'll need it. Be aware that this\n\t\tfunction DOES NOT clear the content of the TiXmlString if any exists.\n\t*/\n\tvoid reserve (size_type cap);\n\n\tTiXmlString& assign (const char* str, size_type len);\n\n\tTiXmlString& append (const char* str, size_type len);\n\n\tvoid swap (TiXmlString& other)\n\t{\n\t\tRep* r = rep_;\n\t\trep_ = other.rep_;\n\t\tother.rep_ = r;\n\t}\n\n  private:\n\n\tvoid init(size_type sz) { init(sz, sz); }\n\tvoid set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\\0'; }\n\tchar* start() const { return rep_->str; }\n\tchar* finish() const { return rep_->str + rep_->size; }\n\n\tstruct Rep\n\t{\n\t\tsize_type size, capacity;\n\t\tchar str[1];\n\t};\n\n\tvoid init(size_type sz, size_type cap)\n\t{\n\t\tif (cap)\n\t\t{\n\t\t\t// Lee: the original form:\n\t\t\t//\trep_ = static_cast<Rep*>(operator new(sizeof(Rep) + cap));\n\t\t\t// doesn't work in some cases of new being overloaded. Switching\n\t\t\t// to the normal allocation, although use an 'int' for systems\n\t\t\t// that are overly picky about structure alignment.\n\t\t\tconst size_type bytesNeeded = sizeof(Rep) + cap;\n\t\t\tconst size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int ); \n\t\t\trep_ = reinterpret_cast<Rep*>( new int[ intsNeeded ] );\n\n\t\t\trep_->str[ rep_->size = sz ] = '\\0';\n\t\t\trep_->capacity = cap;\n\t\t}\n\t\telse\n\t\t{\n\t\t\trep_ = &nullrep_;\n\t\t}\n\t}\n\n\tvoid quit()\n\t{\n\t\tif (rep_ != &nullrep_)\n\t\t{\n\t\t\t// The rep_ is really an array of ints. (see the allocator, above).\n\t\t\t// Cast it back before delete, so the compiler won't incorrectly call destructors.\n\t\t\tdelete [] ( reinterpret_cast<int*>( rep_ ) );\n\t\t}\n\t}\n\n\tRep * rep_;\n\tstatic Rep nullrep_;\n\n} ;\n\n\ninline bool operator == (const TiXmlString & a, const TiXmlString & b)\n{\n\treturn    ( a.length() == b.length() )\t\t\t\t// optimization on some platforms\n\t       && ( strcmp(a.c_str(), b.c_str()) == 0 );\t// actual compare\n}\ninline bool operator < (const TiXmlString & a, const TiXmlString & b)\n{\n\treturn strcmp(a.c_str(), b.c_str()) < 0;\n}\n\ninline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); }\ninline bool operator >  (const TiXmlString & a, const TiXmlString & b) { return b < a; }\ninline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); }\ninline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); }\n\ninline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; }\ninline bool operator == (const char* a, const TiXmlString & b) { return b == a; }\ninline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); }\ninline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); }\n\nTiXmlString operator + (const TiXmlString & a, const TiXmlString & b);\nTiXmlString operator + (const TiXmlString & a, const char* b);\nTiXmlString operator + (const char* a, const TiXmlString & b);\n\n\n/*\n   TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString.\n   Only the operators that we need for TinyXML have been developped.\n*/\nclass TiXmlOutStream : public TiXmlString\n{\npublic :\n\n\t// TiXmlOutStream << operator.\n\tTiXmlOutStream & operator << (const TiXmlString & in)\n\t{\n\t\t*this += in;\n\t\treturn *this;\n\t}\n\n\t// TiXmlOutStream << operator.\n\tTiXmlOutStream & operator << (const char * in)\n\t{\n\t\t*this += in;\n\t\treturn *this;\n\t}\n\n} ;\n\n#endif\t// MADNESS_TINYXML_TINYSTR_H__INCLUDED\n#endif\t// TIXML_USE_STL\n"
  },
  {
    "path": "src/madness/external/tinyxml/tinyxml.cc",
    "content": "/*\nwww.sourceforge.net/projects/tinyxml\nOriginal code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any\ndamages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any\npurpose, including commercial applications, and to alter it and\nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must\nnot claim that you wrote the original software. If you use this\nsoftware in a product, an acknowledgment in the product documentation\nwould be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and\nmust not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source\ndistribution.\n*/\n\n#include <ctype.h>\n\n#ifdef TIXML_USE_STL\n#include <sstream>\n#include <iostream>\n#endif\n\n#include \"tinyxml.h\"\n\n\nbool TiXmlBase::condenseWhiteSpace = true;\n\n// Microsoft compiler security\nFILE* TiXmlFOpen( const char* filename, const char* mode )\n{\n\t#if defined(_MSC_VER) && (_MSC_VER >= 1400 )\n\t\tFILE* fp = 0;\n\t\terrno_t err = fopen_s( &fp, filename, mode );\n\t\tif ( !err && fp )\n\t\t\treturn fp;\n\t\treturn 0;\n\t#else\n\t\treturn fopen( filename, mode );\n\t#endif\n}\n\nvoid TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString )\n{\n\tint i=0;\n\n\twhile( i<(int)str.length() )\n\t{\n\t\tunsigned char c = (unsigned char) str[i];\n\n\t\tif (    c == '&' \n\t\t     && i < ( (int)str.length() - 2 )\n\t\t\t && str[i+1] == '#'\n\t\t\t && str[i+2] == 'x' )\n\t\t{\n\t\t\t// Hexadecimal character reference.\n\t\t\t// Pass through unchanged.\n\t\t\t// &#xA9;\t-- copyright symbol, for example.\n\t\t\t//\n\t\t\t// The -1 is a bug fix from Rob Laveaux. It keeps\n\t\t\t// an overflow from happening if there is no ';'.\n\t\t\t// There are actually 2 ways to exit this loop -\n\t\t\t// while fails (error case) and break (semicolon found).\n\t\t\t// However, there is no mechanism (currently) for\n\t\t\t// this function to return an error.\n\t\t\twhile ( i<(int)str.length()-1 )\n\t\t\t{\n\t\t\t\toutString->append( str.c_str() + i, 1 );\n\t\t\t\t++i;\n\t\t\t\tif ( str[i] == ';' )\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse if ( c == '&' )\n\t\t{\n\t\t\toutString->append( entity[0].str, entity[0].strLength );\n\t\t\t++i;\n\t\t}\n\t\telse if ( c == '<' )\n\t\t{\n\t\t\toutString->append( entity[1].str, entity[1].strLength );\n\t\t\t++i;\n\t\t}\n\t\telse if ( c == '>' )\n\t\t{\n\t\t\toutString->append( entity[2].str, entity[2].strLength );\n\t\t\t++i;\n\t\t}\n\t\telse if ( c == '\\\"' )\n\t\t{\n\t\t\toutString->append( entity[3].str, entity[3].strLength );\n\t\t\t++i;\n\t\t}\n\t\telse if ( c == '\\'' )\n\t\t{\n\t\t\toutString->append( entity[4].str, entity[4].strLength );\n\t\t\t++i;\n\t\t}\n\t\telse if ( c < 32 )\n\t\t{\n\t\t\t// Easy pass at non-alpha/numeric/symbol\n\t\t\t// Below 32 is symbolic.\n\t\t\tchar buf[ 32 ];\n\t\t\t\n\t\t\t#if defined(TIXML_SNPRINTF)\t\t\n\t\t\t\tTIXML_SNPRINTF( buf, sizeof(buf), \"&#x%02X;\", (unsigned) ( c & 0xff ) );\n\t\t\t#else\n\t\t\t\tsprintf( buf, \"&#x%02X;\", (unsigned) ( c & 0xff ) );\n\t\t\t#endif\t\t\n\n\t\t\t//*ME:\twarning C4267: convert 'size_t' to 'int'\n\t\t\t//*ME:\tInt-Cast to make compiler happy ...\n\t\t\toutString->append( buf, (int)strlen( buf ) );\n\t\t\t++i;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//char realc = (char) c;\n\t\t\t//outString->append( &realc, 1 );\n\t\t\t*outString += (char) c;\t// somewhat more efficient function call.\n\t\t\t++i;\n\t\t}\n\t}\n}\n\n\nTiXmlNode::TiXmlNode( NodeType _type ) : TiXmlBase()\n{\n\tparent = 0;\n\ttype = _type;\n\tfirstChild = 0;\n\tlastChild = 0;\n\tprev = 0;\n\tnext = 0;\n}\n\n\nTiXmlNode::~TiXmlNode()\n{\n\tTiXmlNode* node = firstChild;\n\tTiXmlNode* temp = 0;\n\n\twhile ( node )\n\t{\n\t\ttemp = node;\n\t\tnode = node->next;\n\t\tdelete temp;\n\t}\t\n}\n\n\nvoid TiXmlNode::CopyTo( TiXmlNode* target ) const\n{\n\ttarget->SetValue (value.c_str() );\n\ttarget->userData = userData; \n}\n\n\nvoid TiXmlNode::Clear()\n{\n\tTiXmlNode* node = firstChild;\n\tTiXmlNode* temp = 0;\n\n\twhile ( node )\n\t{\n\t\ttemp = node;\n\t\tnode = node->next;\n\t\tdelete temp;\n\t}\t\n\n\tfirstChild = 0;\n\tlastChild = 0;\n}\n\n\nTiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node )\n{\n\tassert( node->parent == 0 || node->parent == this );\n\tassert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() );\n\n\tif ( node->Type() == TiXmlNode::DOCUMENT )\n\t{\n\t\tdelete node;\n\t\tif ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn 0;\n\t}\n\n\tnode->parent = this;\n\n\tnode->prev = lastChild;\n\tnode->next = 0;\n\n\tif ( lastChild )\n\t\tlastChild->next = node;\n\telse\n\t\tfirstChild = node;\t\t\t// it was an empty list.\n\n\tlastChild = node;\n\treturn node;\n}\n\n\nTiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis )\n{\n\tif ( addThis.Type() == TiXmlNode::DOCUMENT )\n\t{\n\t\tif ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn 0;\n\t}\n\tTiXmlNode* node = addThis.Clone();\n\tif ( !node )\n\t\treturn 0;\n\n\treturn LinkEndChild( node );\n}\n\n\nTiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis )\n{\t\n\tif ( !beforeThis || beforeThis->parent != this ) {\n\t\treturn 0;\n\t}\n\tif ( addThis.Type() == TiXmlNode::DOCUMENT )\n\t{\n\t\tif ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn 0;\n\t}\n\n\tTiXmlNode* node = addThis.Clone();\n\tif ( !node )\n\t\treturn 0;\n\tnode->parent = this;\n\n\tnode->next = beforeThis;\n\tnode->prev = beforeThis->prev;\n\tif ( beforeThis->prev )\n\t{\n\t\tbeforeThis->prev->next = node;\n\t}\n\telse\n\t{\n\t\tassert( firstChild == beforeThis );\n\t\tfirstChild = node;\n\t}\n\tbeforeThis->prev = node;\n\treturn node;\n}\n\n\nTiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis )\n{\n\tif ( !afterThis || afterThis->parent != this ) {\n\t\treturn 0;\n\t}\n\tif ( addThis.Type() == TiXmlNode::DOCUMENT )\n\t{\n\t\tif ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn 0;\n\t}\n\n\tTiXmlNode* node = addThis.Clone();\n\tif ( !node )\n\t\treturn 0;\n\tnode->parent = this;\n\n\tnode->prev = afterThis;\n\tnode->next = afterThis->next;\n\tif ( afterThis->next )\n\t{\n\t\tafterThis->next->prev = node;\n\t}\n\telse\n\t{\n\t\tassert( lastChild == afterThis );\n\t\tlastChild = node;\n\t}\n\tafterThis->next = node;\n\treturn node;\n}\n\n\nTiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis )\n{\n\tif ( replaceThis->parent != this )\n\t\treturn 0;\n\n\tTiXmlNode* node = withThis.Clone();\n\tif ( !node )\n\t\treturn 0;\n\n\tnode->next = replaceThis->next;\n\tnode->prev = replaceThis->prev;\n\n\tif ( replaceThis->next )\n\t\treplaceThis->next->prev = node;\n\telse\n\t\tlastChild = node;\n\n\tif ( replaceThis->prev )\n\t\treplaceThis->prev->next = node;\n\telse\n\t\tfirstChild = node;\n\n\tdelete replaceThis;\n\tnode->parent = this;\n\treturn node;\n}\n\n\nbool TiXmlNode::RemoveChild( TiXmlNode* removeThis )\n{\n\tif ( removeThis->parent != this )\n\t{\t\n\t\tassert( 0 );\n\t\treturn false;\n\t}\n\n\tif ( removeThis->next )\n\t\tremoveThis->next->prev = removeThis->prev;\n\telse\n\t\tlastChild = removeThis->prev;\n\n\tif ( removeThis->prev )\n\t\tremoveThis->prev->next = removeThis->next;\n\telse\n\t\tfirstChild = removeThis->next;\n\n\tdelete removeThis;\n\treturn true;\n}\n\nconst TiXmlNode* TiXmlNode::FirstChild( const char * _value ) const\n{\n\tconst TiXmlNode* node;\n\tfor ( node = firstChild; node; node = node->next )\n\t{\n\t\tif ( strcmp( node->Value(), _value ) == 0 )\n\t\t\treturn node;\n\t}\n\treturn 0;\n}\n\n\nconst TiXmlNode* TiXmlNode::LastChild( const char * _value ) const\n{\n\tconst TiXmlNode* node;\n\tfor ( node = lastChild; node; node = node->prev )\n\t{\n\t\tif ( strcmp( node->Value(), _value ) == 0 )\n\t\t\treturn node;\n\t}\n\treturn 0;\n}\n\n\nconst TiXmlNode* TiXmlNode::IterateChildren( const TiXmlNode* previous ) const\n{\n\tif ( !previous )\n\t{\n\t\treturn FirstChild();\n\t}\n\telse\n\t{\n\t\tassert( previous->parent == this );\n\t\treturn previous->NextSibling();\n\t}\n}\n\n\nconst TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode* previous ) const\n{\n\tif ( !previous )\n\t{\n\t\treturn FirstChild( val );\n\t}\n\telse\n\t{\n\t\tassert( previous->parent == this );\n\t\treturn previous->NextSibling( val );\n\t}\n}\n\n\nconst TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const \n{\n\tconst TiXmlNode* node;\n\tfor ( node = next; node; node = node->next )\n\t{\n\t\tif ( strcmp( node->Value(), _value ) == 0 )\n\t\t\treturn node;\n\t}\n\treturn 0;\n}\n\n\nconst TiXmlNode* TiXmlNode::PreviousSibling( const char * _value ) const\n{\n\tconst TiXmlNode* node;\n\tfor ( node = prev; node; node = node->prev )\n\t{\n\t\tif ( strcmp( node->Value(), _value ) == 0 )\n\t\t\treturn node;\n\t}\n\treturn 0;\n}\n\n\nvoid TiXmlElement::RemoveAttribute( const char * name )\n{\n    #ifdef TIXML_USE_STL\n\tTIXML_STRING str( name );\n\tTiXmlAttribute* node = attributeSet.Find( str );\n\t#else\n\tTiXmlAttribute* node = attributeSet.Find( name );\n\t#endif\n\tif ( node )\n\t{\n\t\tattributeSet.Remove( node );\n\t\tdelete node;\n\t}\n}\n\nconst TiXmlElement* TiXmlNode::FirstChildElement() const\n{\n\tconst TiXmlNode* node;\n\n\tfor (\tnode = FirstChild();\n\t\t\tnode;\n\t\t\tnode = node->NextSibling() )\n\t{\n\t\tif ( node->ToElement() )\n\t\t\treturn node->ToElement();\n\t}\n\treturn 0;\n}\n\n\nconst TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const\n{\n\tconst TiXmlNode* node;\n\n\tfor (\tnode = FirstChild( _value );\n\t\t\tnode;\n\t\t\tnode = node->NextSibling( _value ) )\n\t{\n\t\tif ( node->ToElement() )\n\t\t\treturn node->ToElement();\n\t}\n\treturn 0;\n}\n\n\nconst TiXmlElement* TiXmlNode::NextSiblingElement() const\n{\n\tconst TiXmlNode* node;\n\n\tfor (\tnode = NextSibling();\n\t\t\tnode;\n\t\t\tnode = node->NextSibling() )\n\t{\n\t\tif ( node->ToElement() )\n\t\t\treturn node->ToElement();\n\t}\n\treturn 0;\n}\n\n\nconst TiXmlElement* TiXmlNode::NextSiblingElement( const char * _value ) const\n{\n\tconst TiXmlNode* node;\n\n\tfor (\tnode = NextSibling( _value );\n\t\t\tnode;\n\t\t\tnode = node->NextSibling( _value ) )\n\t{\n\t\tif ( node->ToElement() )\n\t\t\treturn node->ToElement();\n\t}\n\treturn 0;\n}\n\n\nconst TiXmlDocument* TiXmlNode::GetDocument() const\n{\n\tconst TiXmlNode* node;\n\n\tfor( node = this; node; node = node->parent )\n\t{\n\t\tif ( node->ToDocument() )\n\t\t\treturn node->ToDocument();\n\t}\n\treturn 0;\n}\n\n\nTiXmlElement::TiXmlElement (const char * _value)\n\t: TiXmlNode( TiXmlNode::ELEMENT )\n{\n\tfirstChild = lastChild = 0;\n\tvalue = _value;\n}\n\n\n#ifdef TIXML_USE_STL\nTiXmlElement::TiXmlElement( const std::string& _value ) \n\t: TiXmlNode( TiXmlNode::ELEMENT )\n{\n\tfirstChild = lastChild = 0;\n\tvalue = _value;\n}\n#endif\n\n\nTiXmlElement::TiXmlElement( const TiXmlElement& copy)\n\t: TiXmlNode( TiXmlNode::ELEMENT )\n{\n\tfirstChild = lastChild = 0;\n\tcopy.CopyTo( this );\t\n}\n\n\nvoid TiXmlElement::operator=( const TiXmlElement& base )\n{\n\tClearThis();\n\tbase.CopyTo( this );\n}\n\n\nTiXmlElement::~TiXmlElement()\n{\n\tClearThis();\n}\n\n\nvoid TiXmlElement::ClearThis()\n{\n\tClear();\n\twhile( attributeSet.First() )\n\t{\n\t\tTiXmlAttribute* node = attributeSet.First();\n\t\tattributeSet.Remove( node );\n\t\tdelete node;\n\t}\n}\n\n\nconst char* TiXmlElement::Attribute( const char* name ) const\n{\n\tconst TiXmlAttribute* node = attributeSet.Find( name );\n\tif ( node )\n\t\treturn node->Value();\n\treturn 0;\n}\n\n\n#ifdef TIXML_USE_STL\nconst std::string* TiXmlElement::Attribute( const std::string& name ) const\n{\n\tconst TiXmlAttribute* node = attributeSet.Find( name );\n\tif ( node )\n\t\treturn &node->ValueStr();\n\treturn 0;\n}\n#endif\n\n\nconst char* TiXmlElement::Attribute( const char* name, int* i ) const\n{\n\tconst char* s = Attribute( name );\n\tif ( i )\n\t{\n\t\tif ( s ) {\n\t\t\t*i = atoi( s );\n\t\t}\n\t\telse {\n\t\t\t*i = 0;\n\t\t}\n\t}\n\treturn s;\n}\n\n\n#ifdef TIXML_USE_STL\nconst std::string* TiXmlElement::Attribute( const std::string& name, int* i ) const\n{\n\tconst std::string* s = Attribute( name );\n\tif ( i )\n\t{\n\t\tif ( s ) {\n\t\t\t*i = atoi( s->c_str() );\n\t\t}\n\t\telse {\n\t\t\t*i = 0;\n\t\t}\n\t}\n\treturn s;\n}\n#endif\n\n\nconst char* TiXmlElement::Attribute( const char* name, double* d ) const\n{\n\tconst char* s = Attribute( name );\n\tif ( d )\n\t{\n\t\tif ( s ) {\n\t\t\t*d = atof( s );\n\t\t}\n\t\telse {\n\t\t\t*d = 0;\n\t\t}\n\t}\n\treturn s;\n}\n\n\n#ifdef TIXML_USE_STL\nconst std::string* TiXmlElement::Attribute( const std::string& name, double* d ) const\n{\n\tconst std::string* s = Attribute( name );\n\tif ( d )\n\t{\n\t\tif ( s ) {\n\t\t\t*d = atof( s->c_str() );\n\t\t}\n\t\telse {\n\t\t\t*d = 0;\n\t\t}\n\t}\n\treturn s;\n}\n#endif\n\n\nint TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const\n{\n\tconst TiXmlAttribute* node = attributeSet.Find( name );\n\tif ( !node )\n\t\treturn TIXML_NO_ATTRIBUTE;\n\treturn node->QueryIntValue( ival );\n}\n\n\n#ifdef TIXML_USE_STL\nint TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const\n{\n\tconst TiXmlAttribute* node = attributeSet.Find( name );\n\tif ( !node )\n\t\treturn TIXML_NO_ATTRIBUTE;\n\treturn node->QueryIntValue( ival );\n}\n#endif\n\n\nint TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const\n{\n\tconst TiXmlAttribute* node = attributeSet.Find( name );\n\tif ( !node )\n\t\treturn TIXML_NO_ATTRIBUTE;\n\treturn node->QueryDoubleValue( dval );\n}\n\n\n#ifdef TIXML_USE_STL\nint TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const\n{\n\tconst TiXmlAttribute* node = attributeSet.Find( name );\n\tif ( !node )\n\t\treturn TIXML_NO_ATTRIBUTE;\n\treturn node->QueryDoubleValue( dval );\n}\n#endif\n\n\nvoid TiXmlElement::SetAttribute( const char * name, int val )\n{\t\n\tchar buf[64];\n\t#if defined(TIXML_SNPRINTF)\t\t\n\t\tTIXML_SNPRINTF( buf, sizeof(buf), \"%d\", val );\n\t#else\n\t\tsprintf( buf, \"%d\", val );\n\t#endif\n\tSetAttribute( name, buf );\n}\n\n\n#ifdef TIXML_USE_STL\nvoid TiXmlElement::SetAttribute( const std::string& name, int val )\n{\t\n   std::ostringstream oss;\n   oss << val;\n   SetAttribute( name, oss.str() );\n}\n#endif\n\n\nvoid TiXmlElement::SetDoubleAttribute( const char * name, double val )\n{\t\n\tchar buf[256];\n\t#if defined(TIXML_SNPRINTF)\t\t\n\t\tTIXML_SNPRINTF( buf, sizeof(buf), \"%f\", val );\n\t#else\n\t\tsprintf( buf, \"%f\", val );\n\t#endif\n\tSetAttribute( name, buf );\n}\n\n\nvoid TiXmlElement::SetAttribute( const char * cname, const char * cvalue )\n{\n    #ifdef TIXML_USE_STL\n\tTIXML_STRING _name( cname );\n\tTIXML_STRING _value( cvalue );\n\t#else\n\tconst char* _name = cname;\n\tconst char* _value = cvalue;\n\t#endif\n\n\tTiXmlAttribute* node = attributeSet.Find( _name );\n\tif ( node )\n\t{\n\t\tnode->SetValue( _value );\n\t\treturn;\n\t}\n\n\tTiXmlAttribute* attrib = new TiXmlAttribute( cname, cvalue );\n\tif ( attrib )\n\t{\n\t\tattributeSet.Add( attrib );\n\t}\n\telse\n\t{\n\t\tTiXmlDocument* document = GetDocument();\n\t\tif ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t}\n}\n\n\n#ifdef TIXML_USE_STL\nvoid TiXmlElement::SetAttribute( const std::string& name, const std::string& _value )\n{\n\tTiXmlAttribute* node = attributeSet.Find( name );\n\tif ( node )\n\t{\n\t\tnode->SetValue( _value );\n\t\treturn;\n\t}\n\n\tTiXmlAttribute* attrib = new TiXmlAttribute( name, _value );\n\tif ( attrib )\n\t{\n\t\tattributeSet.Add( attrib );\n\t}\n\telse\n\t{\n\t\tTiXmlDocument* document = GetDocument();\n\t\tif ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t}\n}\n#endif\n\n\nvoid TiXmlElement::Print( FILE* cfile, int depth ) const\n{\n\tint i;\n\tassert( cfile );\n\tfor ( i=0; i<depth; i++ ) {\n\t\tfprintf( cfile, \"    \" );\n\t}\n\n\tfprintf( cfile, \"<%s\", value.c_str() );\n\n\tconst TiXmlAttribute* attrib;\n\tfor ( attrib = attributeSet.First(); attrib; attrib = attrib->Next() )\n\t{\n\t\tfprintf( cfile, \" \" );\n\t\tattrib->Print( cfile, depth );\n\t}\n\n\t// There are 3 different formatting approaches:\n\t// 1) An element without children is printed as a <foo /> node\n\t// 2) An element with only a text child is printed as <foo> text </foo>\n\t// 3) An element with children is printed on multiple lines.\n\tTiXmlNode* node;\n\tif ( !firstChild )\n\t{\n\t\tfprintf( cfile, \" />\" );\n\t}\n\telse if ( firstChild == lastChild && firstChild->ToText() )\n\t{\n\t\tfprintf( cfile, \">\" );\n\t\tfirstChild->Print( cfile, depth + 1 );\n\t\tfprintf( cfile, \"</%s>\", value.c_str() );\n\t}\n\telse\n\t{\n\t\tfprintf( cfile, \">\" );\n\n\t\tfor ( node = firstChild; node; node=node->NextSibling() )\n\t\t{\n\t\t\tif ( !node->ToText() )\n\t\t\t{\n\t\t\t\tfprintf( cfile, \"\\n\" );\n\t\t\t}\n\t\t\tnode->Print( cfile, depth+1 );\n\t\t}\n\t\tfprintf( cfile, \"\\n\" );\n\t\tfor( i=0; i<depth; ++i ) {\n\t\t\tfprintf( cfile, \"    \" );\n\t\t}\n\t\tfprintf( cfile, \"</%s>\", value.c_str() );\n\t}\n}\n\n\nvoid TiXmlElement::CopyTo( TiXmlElement* target ) const\n{\n\t// superclass:\n\tTiXmlNode::CopyTo( target );\n\n\t// Element class: \n\t// Clone the attributes, then clone the children.\n\tconst TiXmlAttribute* attribute = 0;\n\tfor(\tattribute = attributeSet.First();\n\tattribute;\n\tattribute = attribute->Next() )\n\t{\n\t\ttarget->SetAttribute( attribute->Name(), attribute->Value() );\n\t}\n\n\tTiXmlNode* node = 0;\n\tfor ( node = firstChild; node; node = node->NextSibling() )\n\t{\n\t\ttarget->LinkEndChild( node->Clone() );\n\t}\n}\n\nbool TiXmlElement::Accept( TiXmlVisitor* visitor ) const\n{\n\tif ( visitor->VisitEnter( *this, attributeSet.First() ) ) \n\t{\n\t\tfor ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )\n\t\t{\n\t\t\tif ( !node->Accept( visitor ) )\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn visitor->VisitExit( *this );\n}\n\n\nTiXmlNode* TiXmlElement::Clone() const\n{\n\tTiXmlElement* clone = new TiXmlElement( Value() );\n\tif ( !clone )\n\t\treturn 0;\n\n\tCopyTo( clone );\n\treturn clone;\n}\n\n\nconst char* TiXmlElement::GetText() const\n{\n\tconst TiXmlNode* child = this->FirstChild();\n\tif ( child ) {\n\t\tconst TiXmlText* childText = child->ToText();\n\t\tif ( childText ) {\n\t\t\treturn childText->Value();\n\t\t}\n\t}\n\treturn 0;\n}\n\n\nTiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::DOCUMENT )\n{\n\ttabsize = 4;\n\tuseMicrosoftBOM = false;\n\tClearError();\n}\n\nTiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::DOCUMENT )\n{\n\ttabsize = 4;\n\tuseMicrosoftBOM = false;\n\tvalue = documentName;\n\tClearError();\n}\n\n\n#ifdef TIXML_USE_STL\nTiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::DOCUMENT )\n{\n\ttabsize = 4;\n\tuseMicrosoftBOM = false;\n    value = documentName;\n\tClearError();\n}\n#endif\n\n\nTiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::DOCUMENT )\n{\n\tcopy.CopyTo( this );\n}\n\n\nvoid TiXmlDocument::operator=( const TiXmlDocument& copy )\n{\n\tClear();\n\tcopy.CopyTo( this );\n}\n\n\nbool TiXmlDocument::LoadFile( TiXmlEncoding encoding )\n{\n\t// See STL_STRING_BUG below.\n\t//StringToBuffer buf( value );\n\n\treturn LoadFile( Value(), encoding );\n}\n\n\nbool TiXmlDocument::SaveFile() const\n{\n\t// See STL_STRING_BUG below.\n//\tStringToBuffer buf( value );\n//\n//\tif ( buf.buffer && SaveFile( buf.buffer ) )\n//\t\treturn true;\n//\n//\treturn false;\n\treturn SaveFile( Value() );\n}\n\nbool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )\n{\n\t// There was a really terrifying little bug here. The code:\n\t//\t\tvalue = filename\n\t// in the STL case, cause the assignment method of the std::string to\n\t// be called. What is strange, is that the std::string had the same\n\t// address as it's c_str() method, and so bad things happen. Looks\n\t// like a bug in the Microsoft STL implementation.\n\t// Add an extra string to avoid the crash.\n\tTIXML_STRING filename( _filename );\n\tvalue = filename;\n\n\t// reading in binary mode so that tinyxml can normalize the EOL\n\tFILE* file = TiXmlFOpen( value.c_str (), \"rb\" );\t\n\n\tif ( file )\n\t{\n\t\tbool result = LoadFile( file, encoding );\n\t\tfclose( file );\n\t\treturn result;\n\t}\n\telse\n\t{\n\t\tSetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn false;\n\t}\n}\n\nbool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )\n{\n\tif ( !file ) \n\t{\n\t\tSetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn false;\n\t}\n\n\t// Delete the existing data:\n\tClear();\n\tlocation.Clear();\n\n\t// Get the file size, so we can pre-allocate the string. HUGE speed impact.\n\tlong length = 0;\n\tfseek( file, 0, SEEK_END );\n\tlength = ftell( file );\n\tfseek( file, 0, SEEK_SET );\n\n\t// Strange case, but good to handle up front.\n\tif ( length <= 0 )\n\t{\n\t\tSetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn false;\n\t}\n\n\t// If we have a file, assume it is all one big XML file, and read it in.\n\t// The document parser may decide the document ends sooner than the entire file, however.\n\tTIXML_STRING data;\n\tdata.reserve( length );\n\n\t// Subtle bug here. TinyXml did use fgets. But from the XML spec:\n\t// 2.11 End-of-Line Handling\n\t// <snip>\n\t// <quote>\n\t// ...the XML processor MUST behave as if it normalized all line breaks in external \n\t// parsed entities (including the document entity) on input, before parsing, by translating \n\t// both the two-character sequence #xD #xA and any #xD that is not followed by #xA to \n\t// a single #xA character.\n\t// </quote>\n\t//\n\t// It is not clear fgets does that, and certainly isn't clear it works cross platform. \n\t// Generally, you expect fgets to translate from the convention of the OS to the c/unix\n\t// convention, and not work generally.\n\n\t/*\n\twhile( fgets( buf, sizeof(buf), file ) )\n\t{\n\t\tdata += buf;\n\t}\n\t*/\n\n\tchar* buf = new char[ length+1 ];\n\tbuf[0] = 0;\n\n\tif ( fread( buf, length, 1, file ) != 1 ) {\n\t\tdelete [] buf;\n\t\tSetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn false;\n\t}\n\n\tconst char* lastPos = buf;\n\tconst char* p = buf;\n\n\tbuf[length] = 0;\n\twhile( *p ) {\n\t\tassert( p < (buf+length) );\n\t\tif ( *p == 0xa ) {\n\t\t\t// Newline character. No special rules for this. Append all the characters\n\t\t\t// since the last string, and include the newline.\n\t\t\tdata.append( lastPos, (p-lastPos+1) );\t// append, include the newline\n\t\t\t++p;\t\t\t\t\t\t\t\t\t// move past the newline\n\t\t\tlastPos = p;\t\t\t\t\t\t\t// and point to the new buffer (may be 0)\n\t\t\tassert( p <= (buf+length) );\n\t\t}\n\t\telse if ( *p == 0xd ) {\n\t\t\t// Carriage return. Append what we have so far, then\n\t\t\t// handle moving forward in the buffer.\n\t\t\tif ( (p-lastPos) > 0 ) {\n\t\t\t\tdata.append( lastPos, p-lastPos );\t// do not add the CR\n\t\t\t}\n\t\t\tdata += (char)0xa;\t\t\t\t\t\t// a proper newline\n\n\t\t\tif ( *(p+1) == 0xa ) {\n\t\t\t\t// Carriage return - new line sequence\n\t\t\t\tp += 2;\n\t\t\t\tlastPos = p;\n\t\t\t\tassert( p <= (buf+length) );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// it was followed by something else...that is presumably characters again.\n\t\t\t\t++p;\n\t\t\t\tlastPos = p;\n\t\t\t\tassert( p <= (buf+length) );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t++p;\n\t\t}\n\t}\n\t// Handle any left over characters.\n\tif ( p-lastPos ) {\n\t\tdata.append( lastPos, p-lastPos );\n\t}\t\t\n\tdelete [] buf;\n\tbuf = 0;\n\n\tParse( data.c_str(), 0, encoding );\n\n\tif (  Error() )\n        return false;\n    else\n\t\treturn true;\n}\n\n\nbool TiXmlDocument::SaveFile( const char * filename ) const\n{\n\t// The old c stuff lives on...\n\tFILE* fp = TiXmlFOpen( filename, \"w\" );\n\tif ( fp )\n\t{\n\t\tbool result = SaveFile( fp );\n\t\tfclose( fp );\n\t\treturn result;\n\t}\n\treturn false;\n}\n\n\nbool TiXmlDocument::SaveFile( FILE* fp ) const\n{\n\tif ( useMicrosoftBOM ) \n\t{\n\t\tconst unsigned char TIXML_UTF_LEAD_0 = 0xefU;\n\t\tconst unsigned char TIXML_UTF_LEAD_1 = 0xbbU;\n\t\tconst unsigned char TIXML_UTF_LEAD_2 = 0xbfU;\n\n\t\tfputc( TIXML_UTF_LEAD_0, fp );\n\t\tfputc( TIXML_UTF_LEAD_1, fp );\n\t\tfputc( TIXML_UTF_LEAD_2, fp );\n\t}\n\tPrint( fp, 0 );\n\treturn (ferror(fp) == 0);\n}\n\n\nvoid TiXmlDocument::CopyTo( TiXmlDocument* target ) const\n{\n\tTiXmlNode::CopyTo( target );\n\n\ttarget->error = error;\n\ttarget->errorId = errorId;\n\ttarget->errorDesc = errorDesc;\n\ttarget->tabsize = tabsize;\n\ttarget->errorLocation = errorLocation;\n\ttarget->useMicrosoftBOM = useMicrosoftBOM;\n\n\tTiXmlNode* node = 0;\n\tfor ( node = firstChild; node; node = node->NextSibling() )\n\t{\n\t\ttarget->LinkEndChild( node->Clone() );\n\t}\t\n}\n\n\nTiXmlNode* TiXmlDocument::Clone() const\n{\n\tTiXmlDocument* clone = new TiXmlDocument();\n\tif ( !clone )\n\t\treturn 0;\n\n\tCopyTo( clone );\n\treturn clone;\n}\n\n\nvoid TiXmlDocument::Print( FILE* cfile, int depth ) const\n{\n\tassert( cfile );\n\tfor ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )\n\t{\n\t\tnode->Print( cfile, depth );\n\t\tfprintf( cfile, \"\\n\" );\n\t}\n}\n\n\nbool TiXmlDocument::Accept( TiXmlVisitor* visitor ) const\n{\n\tif ( visitor->VisitEnter( *this ) )\n\t{\n\t\tfor ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )\n\t\t{\n\t\t\tif ( !node->Accept( visitor ) )\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn visitor->VisitExit( *this );\n}\n\n\nconst TiXmlAttribute* TiXmlAttribute::Next() const\n{\n\t// We are using knowledge of the sentinel. The sentinel\n\t// have a value or name.\n\tif ( next->value.empty() && next->name.empty() )\n\t\treturn 0;\n\treturn next;\n}\n\n/*\nTiXmlAttribute* TiXmlAttribute::Next()\n{\n\t// We are using knowledge of the sentinel. The sentinel\n\t// have a value or name.\n\tif ( next->value.empty() && next->name.empty() )\n\t\treturn 0;\n\treturn next;\n}\n*/\n\nconst TiXmlAttribute* TiXmlAttribute::Previous() const\n{\n\t// We are using knowledge of the sentinel. The sentinel\n\t// have a value or name.\n\tif ( prev->value.empty() && prev->name.empty() )\n\t\treturn 0;\n\treturn prev;\n}\n\n/*\nTiXmlAttribute* TiXmlAttribute::Previous()\n{\n\t// We are using knowledge of the sentinel. The sentinel\n\t// have a value or name.\n\tif ( prev->value.empty() && prev->name.empty() )\n\t\treturn 0;\n\treturn prev;\n}\n*/\n\nvoid TiXmlAttribute::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const\n{\n\tTIXML_STRING n, v;\n\n\tEncodeString( name, &n );\n\tEncodeString( value, &v );\n\n\tif (value.find ('\\\"') == TIXML_STRING::npos) {\n\t\tif ( cfile ) {\n\t\tfprintf (cfile, \"%s=\\\"%s\\\"\", n.c_str(), v.c_str() );\n\t\t}\n\t\tif ( str ) {\n\t\t\t(*str) += n; (*str) += \"=\\\"\"; (*str) += v; (*str) += \"\\\"\";\n\t\t}\n\t}\n\telse {\n\t\tif ( cfile ) {\n\t\tfprintf (cfile, \"%s='%s'\", n.c_str(), v.c_str() );\n\t\t}\n\t\tif ( str ) {\n\t\t\t(*str) += n; (*str) += \"='\"; (*str) += v; (*str) += \"'\";\n\t\t}\n\t}\n}\n\n\nint TiXmlAttribute::QueryIntValue( int* ival ) const\n{\n\tif ( TIXML_SSCANF( value.c_str(), \"%d\", ival ) == 1 )\n\t\treturn TIXML_SUCCESS;\n\treturn TIXML_WRONG_TYPE;\n}\n\nint TiXmlAttribute::QueryDoubleValue( double* dval ) const\n{\n\tif ( TIXML_SSCANF( value.c_str(), \"%lf\", dval ) == 1 )\n\t\treturn TIXML_SUCCESS;\n\treturn TIXML_WRONG_TYPE;\n}\n\nvoid TiXmlAttribute::SetIntValue( int _value )\n{\n\tchar buf [64];\n\t#if defined(TIXML_SNPRINTF)\t\t\n\t\tTIXML_SNPRINTF(buf, sizeof(buf), \"%d\", _value);\n\t#else\n\t\tsprintf (buf, \"%d\", _value);\n\t#endif\n\tSetValue (buf);\n}\n\nvoid TiXmlAttribute::SetDoubleValue( double _value )\n{\n\tchar buf [256];\n\t#if defined(TIXML_SNPRINTF)\t\t\n\t\tTIXML_SNPRINTF( buf, sizeof(buf), \"%lf\", _value);\n\t#else\n\t\tsprintf (buf, \"%lf\", _value);\n\t#endif\n\tSetValue (buf);\n}\n\nint TiXmlAttribute::IntValue() const\n{\n\treturn atoi (value.c_str ());\n}\n\ndouble  TiXmlAttribute::DoubleValue() const\n{\n\treturn atof (value.c_str ());\n}\n\n\nTiXmlComment::TiXmlComment( const TiXmlComment& copy ) : TiXmlNode( TiXmlNode::COMMENT )\n{\n\tcopy.CopyTo( this );\n}\n\n\nvoid TiXmlComment::operator=( const TiXmlComment& base )\n{\n\tClear();\n\tbase.CopyTo( this );\n}\n\n\nvoid TiXmlComment::Print( FILE* cfile, int depth ) const\n{\n\tassert( cfile );\n\tfor ( int i=0; i<depth; i++ )\n\t{\n\t\tfprintf( cfile,  \"    \" );\n\t}\n\tfprintf( cfile, \"<!--%s-->\", value.c_str() );\n}\n\n\nvoid TiXmlComment::CopyTo( TiXmlComment* target ) const\n{\n\tTiXmlNode::CopyTo( target );\n}\n\n\nbool TiXmlComment::Accept( TiXmlVisitor* visitor ) const\n{\n\treturn visitor->Visit( *this );\n}\n\n\nTiXmlNode* TiXmlComment::Clone() const\n{\n\tTiXmlComment* clone = new TiXmlComment();\n\n\tif ( !clone )\n\t\treturn 0;\n\n\tCopyTo( clone );\n\treturn clone;\n}\n\n\nvoid TiXmlText::Print( FILE* cfile, int depth ) const\n{\n\tassert( cfile );\n\tif ( cdata )\n\t{\n\t\tint i;\n\t\tfprintf( cfile, \"\\n\" );\n\t\tfor ( i=0; i<depth; i++ ) {\n\t\t\tfprintf( cfile, \"    \" );\n\t\t}\n\t\tfprintf( cfile, \"<![CDATA[%s]]>\\n\", value.c_str() );\t// unformatted output\n\t}\n\telse\n\t{\n\t\tTIXML_STRING buffer;\n\t\tEncodeString( value, &buffer );\n\t\tfprintf( cfile, \"%s\", buffer.c_str() );\n\t}\n}\n\n\nvoid TiXmlText::CopyTo( TiXmlText* target ) const\n{\n\tTiXmlNode::CopyTo( target );\n\ttarget->cdata = cdata;\n}\n\n\nbool TiXmlText::Accept( TiXmlVisitor* visitor ) const\n{\n\treturn visitor->Visit( *this );\n}\n\n\nTiXmlNode* TiXmlText::Clone() const\n{\t\n\tTiXmlText* clone = 0;\n\tclone = new TiXmlText( \"\" );\n\n\tif ( !clone )\n\t\treturn 0;\n\n\tCopyTo( clone );\n\treturn clone;\n}\n\n\nTiXmlDeclaration::TiXmlDeclaration( const char * _version,\n\t\t\t\t\t\t\t\t\tconst char * _encoding,\n\t\t\t\t\t\t\t\t\tconst char * _standalone )\n\t: TiXmlNode( TiXmlNode::DECLARATION )\n{\n\tversion = _version;\n\tencoding = _encoding;\n\tstandalone = _standalone;\n}\n\n\n#ifdef TIXML_USE_STL\nTiXmlDeclaration::TiXmlDeclaration(\tconst std::string& _version,\n\t\t\t\t\t\t\t\t\tconst std::string& _encoding,\n\t\t\t\t\t\t\t\t\tconst std::string& _standalone )\n\t: TiXmlNode( TiXmlNode::DECLARATION )\n{\n\tversion = _version;\n\tencoding = _encoding;\n\tstandalone = _standalone;\n}\n#endif\n\n\nTiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy )\n\t: TiXmlNode( TiXmlNode::DECLARATION )\n{\n\tcopy.CopyTo( this );\t\n}\n\n\nvoid TiXmlDeclaration::operator=( const TiXmlDeclaration& copy )\n{\n\tClear();\n\tcopy.CopyTo( this );\n}\n\n\nvoid TiXmlDeclaration::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const\n{\n\tif ( cfile ) fprintf( cfile, \"<?xml \" );\n\tif ( str )\t (*str) += \"<?xml \";\n\n\tif ( !version.empty() ) {\n\t\tif ( cfile ) fprintf (cfile, \"version=\\\"%s\\\" \", version.c_str ());\n\t\tif ( str ) { (*str) += \"version=\\\"\"; (*str) += version; (*str) += \"\\\" \"; }\n\t}\n\tif ( !encoding.empty() ) {\n\t\tif ( cfile ) fprintf (cfile, \"encoding=\\\"%s\\\" \", encoding.c_str ());\n\t\tif ( str ) { (*str) += \"encoding=\\\"\"; (*str) += encoding; (*str) += \"\\\" \"; }\n\t}\n\tif ( !standalone.empty() ) {\n\t\tif ( cfile ) fprintf (cfile, \"standalone=\\\"%s\\\" \", standalone.c_str ());\n\t\tif ( str ) { (*str) += \"standalone=\\\"\"; (*str) += standalone; (*str) += \"\\\" \"; }\n\t}\n\tif ( cfile ) fprintf( cfile, \"?>\" );\n\tif ( str )\t (*str) += \"?>\";\n}\n\n\nvoid TiXmlDeclaration::CopyTo( TiXmlDeclaration* target ) const\n{\n\tTiXmlNode::CopyTo( target );\n\n\ttarget->version = version;\n\ttarget->encoding = encoding;\n\ttarget->standalone = standalone;\n}\n\n\nbool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const\n{\n\treturn visitor->Visit( *this );\n}\n\n\nTiXmlNode* TiXmlDeclaration::Clone() const\n{\t\n\tTiXmlDeclaration* clone = new TiXmlDeclaration();\n\n\tif ( !clone )\n\t\treturn 0;\n\n\tCopyTo( clone );\n\treturn clone;\n}\n\n\nvoid TiXmlUnknown::Print( FILE* cfile, int depth ) const\n{\n\tfor ( int i=0; i<depth; i++ )\n\t\tfprintf( cfile, \"    \" );\n\tfprintf( cfile, \"<%s>\", value.c_str() );\n}\n\n\nvoid TiXmlUnknown::CopyTo( TiXmlUnknown* target ) const\n{\n\tTiXmlNode::CopyTo( target );\n}\n\n\nbool TiXmlUnknown::Accept( TiXmlVisitor* visitor ) const\n{\n\treturn visitor->Visit( *this );\n}\n\n\nTiXmlNode* TiXmlUnknown::Clone() const\n{\n\tTiXmlUnknown* clone = new TiXmlUnknown();\n\n\tif ( !clone )\n\t\treturn 0;\n\n\tCopyTo( clone );\n\treturn clone;\n}\n\n\nTiXmlAttributeSet::TiXmlAttributeSet()\n{\n\tsentinel.next = &sentinel;\n\tsentinel.prev = &sentinel;\n}\n\n\nTiXmlAttributeSet::~TiXmlAttributeSet()\n{\n\tassert( sentinel.next == &sentinel );\n\tassert( sentinel.prev == &sentinel );\n}\n\n\nvoid TiXmlAttributeSet::Add( TiXmlAttribute* addMe )\n{\n    #ifdef TIXML_USE_STL\n\tassert( !Find( TIXML_STRING( addMe->Name() ) ) );\t// Shouldn't be multiply adding to the set.\n\t#else\n\tassert( !Find( addMe->Name() ) );\t// Shouldn't be multiply adding to the set.\n\t#endif\n\n\taddMe->next = &sentinel;\n\taddMe->prev = sentinel.prev;\n\n\tsentinel.prev->next = addMe;\n\tsentinel.prev      = addMe;\n}\n\nvoid TiXmlAttributeSet::Remove( TiXmlAttribute* removeMe )\n{\n\tTiXmlAttribute* node;\n\n\tfor( node = sentinel.next; node != &sentinel; node = node->next )\n\t{\n\t\tif ( node == removeMe )\n\t\t{\n\t\t\tnode->prev->next = node->next;\n\t\t\tnode->next->prev = node->prev;\n\t\t\tnode->next = 0;\n\t\t\tnode->prev = 0;\n\t\t\treturn;\n\t\t}\n\t}\n\tassert( 0 );\t\t// we tried to remove a non-linked attribute.\n}\n\n\n#ifdef TIXML_USE_STL\nconst TiXmlAttribute* TiXmlAttributeSet::Find( const std::string& name ) const\n{\n\tfor( const TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )\n\t{\n\t\tif ( node->name == name )\n\t\t\treturn node;\n\t}\n\treturn 0;\n}\n\n/*\nTiXmlAttribute*\tTiXmlAttributeSet::Find( const std::string& name )\n{\n\tfor( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )\n\t{\n\t\tif ( node->name == name )\n\t\t\treturn node;\n\t}\n\treturn 0;\n}\n*/\n#endif\n\n\nconst TiXmlAttribute* TiXmlAttributeSet::Find( const char* name ) const\n{\n\tfor( const TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )\n\t{\n\t\tif ( strcmp( node->name.c_str(), name ) == 0 )\n\t\t\treturn node;\n\t}\n\treturn 0;\n}\n\n/*\nTiXmlAttribute*\tTiXmlAttributeSet::Find( const char* name )\n{\n\tfor( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )\n\t{\n\t\tif ( strcmp( node->name.c_str(), name ) == 0 )\n\t\t\treturn node;\n\t}\n\treturn 0;\n}\n*/\n\n#ifdef TIXML_USE_STL\t\nstd::istream& operator>> (std::istream & in, TiXmlNode & base)\n{\n\tTIXML_STRING tag;\n\ttag.reserve( 8 * 1000 );\n\tbase.StreamIn( &in, &tag );\n\n\tbase.Parse( tag.c_str(), 0, TIXML_DEFAULT_ENCODING );\n\treturn in;\n}\n#endif\n\n\n#ifdef TIXML_USE_STL\t\nstd::ostream& operator<< (std::ostream & out, const TiXmlNode & base)\n{\n\tTiXmlPrinter printer;\n\tprinter.SetStreamPrinting();\n\tbase.Accept( &printer );\n\tout << printer.Str();\n\n\treturn out;\n}\n\n\nstd::string& operator<< (std::string& out, const TiXmlNode& base )\n{\n\tTiXmlPrinter printer;\n\tprinter.SetStreamPrinting();\n\tbase.Accept( &printer );\n\tout.append( printer.Str() );\n\n\treturn out;\n}\n#endif\n\n\nTiXmlHandle TiXmlHandle::FirstChild() const\n{\n\tif ( node )\n\t{\n\t\tTiXmlNode* child = node->FirstChild();\n\t\tif ( child )\n\t\t\treturn TiXmlHandle( child );\n\t}\n\treturn TiXmlHandle( 0 );\n}\n\n\nTiXmlHandle TiXmlHandle::FirstChild( const char * value ) const\n{\n\tif ( node )\n\t{\n\t\tTiXmlNode* child = node->FirstChild( value );\n\t\tif ( child )\n\t\t\treturn TiXmlHandle( child );\n\t}\n\treturn TiXmlHandle( 0 );\n}\n\n\nTiXmlHandle TiXmlHandle::FirstChildElement() const\n{\n\tif ( node )\n\t{\n\t\tTiXmlElement* child = node->FirstChildElement();\n\t\tif ( child )\n\t\t\treturn TiXmlHandle( child );\n\t}\n\treturn TiXmlHandle( 0 );\n}\n\n\nTiXmlHandle TiXmlHandle::FirstChildElement( const char * value ) const\n{\n\tif ( node )\n\t{\n\t\tTiXmlElement* child = node->FirstChildElement( value );\n\t\tif ( child )\n\t\t\treturn TiXmlHandle( child );\n\t}\n\treturn TiXmlHandle( 0 );\n}\n\n\nTiXmlHandle TiXmlHandle::Child( int count ) const\n{\n\tif ( node )\n\t{\n\t\tint i;\n\t\tTiXmlNode* child = node->FirstChild();\n\t\tfor (\ti=0;\n\t\t\t\tchild && i<count;\n\t\t\t\tchild = child->NextSibling(), ++i )\n\t\t{\n\t\t\t// nothing\n\t\t}\n\t\tif ( child )\n\t\t\treturn TiXmlHandle( child );\n\t}\n\treturn TiXmlHandle( 0 );\n}\n\n\nTiXmlHandle TiXmlHandle::Child( const char* value, int count ) const\n{\n\tif ( node )\n\t{\n\t\tint i;\n\t\tTiXmlNode* child = node->FirstChild( value );\n\t\tfor (\ti=0;\n\t\t\t\tchild && i<count;\n\t\t\t\tchild = child->NextSibling( value ), ++i )\n\t\t{\n\t\t\t// nothing\n\t\t}\n\t\tif ( child )\n\t\t\treturn TiXmlHandle( child );\n\t}\n\treturn TiXmlHandle( 0 );\n}\n\n\nTiXmlHandle TiXmlHandle::ChildElement( int count ) const\n{\n\tif ( node )\n\t{\n\t\tint i;\n\t\tTiXmlElement* child = node->FirstChildElement();\n\t\tfor (\ti=0;\n\t\t\t\tchild && i<count;\n\t\t\t\tchild = child->NextSiblingElement(), ++i )\n\t\t{\n\t\t\t// nothing\n\t\t}\n\t\tif ( child )\n\t\t\treturn TiXmlHandle( child );\n\t}\n\treturn TiXmlHandle( 0 );\n}\n\n\nTiXmlHandle TiXmlHandle::ChildElement( const char* value, int count ) const\n{\n\tif ( node )\n\t{\n\t\tint i;\n\t\tTiXmlElement* child = node->FirstChildElement( value );\n\t\tfor (\ti=0;\n\t\t\t\tchild && i<count;\n\t\t\t\tchild = child->NextSiblingElement( value ), ++i )\n\t\t{\n\t\t\t// nothing\n\t\t}\n\t\tif ( child )\n\t\t\treturn TiXmlHandle( child );\n\t}\n\treturn TiXmlHandle( 0 );\n}\n\n\nbool TiXmlPrinter::VisitEnter( const TiXmlDocument& )\n{\n\treturn true;\n}\n\nbool TiXmlPrinter::VisitExit( const TiXmlDocument& )\n{\n\treturn true;\n}\n\nbool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute )\n{\n\tDoIndent();\n\tbuffer += \"<\";\n\tbuffer += element.Value();\n\n\tfor( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() )\n\t{\n\t\tbuffer += \" \";\n\t\tattrib->Print( 0, 0, &buffer );\n\t}\n\n\tif ( !element.FirstChild() ) \n\t{\n\t\tbuffer += \" />\";\n\t\tDoLineBreak();\n\t}\n\telse \n\t{\n\t\tbuffer += \">\";\n\t\tif (    element.FirstChild()->ToText()\n\t\t\t  && element.LastChild() == element.FirstChild()\n\t\t\t  && element.FirstChild()->ToText()->CDATA() == false )\n\t\t{\n\t\t\tsimpleTextPrint = true;\n\t\t\t// no DoLineBreak()!\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDoLineBreak();\n\t\t}\n\t}\n\t++depth;\t\n\treturn true;\n}\n\n\nbool TiXmlPrinter::VisitExit( const TiXmlElement& element )\n{\n\t--depth;\n\tif ( !element.FirstChild() ) \n\t{\n\t\t// nothing.\n\t}\n\telse \n\t{\n\t\tif ( simpleTextPrint )\n\t\t{\n\t\t\tsimpleTextPrint = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDoIndent();\n\t\t}\n\t\tbuffer += \"</\";\n\t\tbuffer += element.Value();\n\t\tbuffer += \">\";\n\t\tDoLineBreak();\n\t}\n\treturn true;\n}\n\n\nbool TiXmlPrinter::Visit( const TiXmlText& text )\n{\n\tif ( text.CDATA() )\n\t{\n\t\tDoIndent();\n\t\tbuffer += \"<![CDATA[\";\n\t\tbuffer += text.Value();\n\t\tbuffer += \"]]>\";\n\t\tDoLineBreak();\n\t}\n\telse if ( simpleTextPrint )\n\t{\n\t\tTIXML_STRING str;\n\t\tTiXmlBase::EncodeString( text.ValueTStr(), &str );\n\t\tbuffer += str;\n\t}\n\telse\n\t{\n\t\tDoIndent();\n\t\tTIXML_STRING str;\n\t\tTiXmlBase::EncodeString( text.ValueTStr(), &str );\n\t\tbuffer += str;\n\t\tDoLineBreak();\n\t}\n\treturn true;\n}\n\n\nbool TiXmlPrinter::Visit( const TiXmlDeclaration& declaration )\n{\n\tDoIndent();\n\tdeclaration.Print( 0, 0, &buffer );\n\tDoLineBreak();\n\treturn true;\n}\n\n\nbool TiXmlPrinter::Visit( const TiXmlComment& comment )\n{\n\tDoIndent();\n\tbuffer += \"<!--\";\n\tbuffer += comment.Value();\n\tbuffer += \"-->\";\n\tDoLineBreak();\n\treturn true;\n}\n\n\nbool TiXmlPrinter::Visit( const TiXmlUnknown& unknown )\n{\n\tDoIndent();\n\tbuffer += \"<\";\n\tbuffer += unknown.Value();\n\tbuffer += \">\";\n\tDoLineBreak();\n\treturn true;\n}\n\n"
  },
  {
    "path": "src/madness/external/tinyxml/tinyxml.h",
    "content": "/*\nwww.sourceforge.net/projects/tinyxml\nOriginal code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any\ndamages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any\npurpose, including commercial applications, and to alter it and\nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must\nnot claim that you wrote the original software. If you use this\nsoftware in a product, an acknowledgment in the product documentation\nwould be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and\nmust not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source\ndistribution.\n*/\n\n\n#ifndef MADNESS_TINYXML_TINYXML_H__INCLUDED\n#define MADNESS_TINYXML_TINYXML_H__INCLUDED\n\n#ifdef _MSC_VER\n#pragma warning( push )\n#pragma warning( disable : 4530 )\n#pragma warning( disable : 4786 )\n#endif\n\n#include <ctype.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n\n// Help out windows:\n#if defined( _DEBUG ) && !defined( DEBUG )\n#define DEBUG\n#endif\n\n#define TIXML_USE_STL\n#ifdef TIXML_USE_STL\n\t#include <string>\n \t#include <iostream>\n\t#include <sstream>\n\t#define TIXML_STRING\t\tstd::string\n#else\n\t#include \"tinystr.h\"\n\t#define TIXML_STRING\t\tTiXmlString\n#endif\n\n// Deprecated library function hell. Compilers want to use the\n// new safe versions. This probably doesn't fully address the problem,\n// but it gets closer. There are too many compilers for me to fully\n// test. If you get compilation troubles, undefine TIXML_SAFE\n#define TIXML_SAFE\n\n#ifdef TIXML_SAFE\n\t#if defined(_MSC_VER) && (_MSC_VER >= 1400 )\n\t\t// Microsoft visual studio, version 2005 and higher.\n\t\t#define TIXML_SNPRINTF _snprintf_s\n\t\t#define TIXML_SNSCANF  _snscanf_s\n\t\t#define TIXML_SSCANF   sscanf_s\n\t#elif defined(_MSC_VER) && (_MSC_VER >= 1200 )\n\t\t// Microsoft visual studio, version 6 and higher.\n\t\t//#pragma message( \"Using _sn* functions.\" )\n\t\t#define TIXML_SNPRINTF _snprintf\n\t\t#define TIXML_SNSCANF  _snscanf\n\t\t#define TIXML_SSCANF   sscanf\n\t#elif defined(__GNUC__) && (__GNUC__ >= 3 )\n\t\t// GCC version 3 and higher.s\n\t\t//#warning( \"Using sn* functions.\" )\n\t\t#define TIXML_SNPRINTF snprintf\n\t\t#define TIXML_SNSCANF  snscanf\n\t\t#define TIXML_SSCANF   sscanf\n\t#else\n\t\t#define TIXML_SSCANF   sscanf\n\t#endif\n#endif\t\n\nclass TiXmlDocument;\nclass TiXmlElement;\nclass TiXmlComment;\nclass TiXmlUnknown;\nclass TiXmlAttribute;\nclass TiXmlText;\nclass TiXmlDeclaration;\nclass TiXmlParsingData;\n\nconst int TIXML_MAJOR_VERSION = 2;\nconst int TIXML_MINOR_VERSION = 5;\nconst int TIXML_PATCH_VERSION = 3;\n\n/*\tInternal structure for tracking location of items \n\tin the XML file.\n*/\nstruct TiXmlCursor\n{\n\tTiXmlCursor()\t\t{ Clear(); }\n\tvoid Clear()\t\t{ row = col = -1; }\n\n\tint row;\t// 0 based.\n\tint col;\t// 0 based.\n};\n\n\n/**\n\tIf you call the Accept() method, it requires being passed a TiXmlVisitor\n\tclass to handle callbacks. For nodes that contain other nodes (Document, Element)\n\tyou will get called with a VisitEnter/VisitExit pair. Nodes that are always leaves\n\tare simple called with Visit().\n\n\tIf you return 'true' from a Visit method, recursive parsing will continue. If you return\n\tfalse, <b>no children of this node or its sibilings</b> will be Visited.\n\n\tAll flavors of Visit methods have a default implementation that returns 'true' (continue \n\tvisiting). You need to only override methods that are interesting to you.\n\n\tGenerally Accept() is called on the TiXmlDocument, although all nodes suppert Visiting.\n\n\tYou should never change the document from a callback.\n\n\t@sa TiXmlNode::Accept()\n*/\nclass TiXmlVisitor\n{\npublic:\n\tvirtual ~TiXmlVisitor() {}\n\n\t/// Visit a document.\n\tvirtual bool VisitEnter( const TiXmlDocument& /*doc*/ )\t\t\t{ return true; }\n\t/// Visit a document.\n\tvirtual bool VisitExit( const TiXmlDocument& /*doc*/ )\t\t\t{ return true; }\n\n\t/// Visit an element.\n\tvirtual bool VisitEnter( const TiXmlElement& /*element*/, const TiXmlAttribute* /*firstAttribute*/ )\t{ return true; }\n\t/// Visit an element.\n\tvirtual bool VisitExit( const TiXmlElement& /*element*/ )\t\t{ return true; }\n\n\t/// Visit a declaration\n\tvirtual bool Visit( const TiXmlDeclaration& /*declaration*/ )\t{ return true; }\n\t/// Visit a text node\n\tvirtual bool Visit( const TiXmlText& /*text*/ )\t\t\t\t\t{ return true; }\n\t/// Visit a comment node\n\tvirtual bool Visit( const TiXmlComment& /*comment*/ )\t\t\t{ return true; }\n\t/// Visit an unknow node\n\tvirtual bool Visit( const TiXmlUnknown& /*unknown*/ )\t\t\t{ return true; }\n};\n\n// Only used by Attribute::Query functions\nenum \n{ \n\tTIXML_SUCCESS,\n\tTIXML_NO_ATTRIBUTE,\n\tTIXML_WRONG_TYPE\n};\n\n\n// Used by the parsing routines.\nenum TiXmlEncoding\n{\n\tTIXML_ENCODING_UNKNOWN,\n\tTIXML_ENCODING_UTF8,\n\tTIXML_ENCODING_LEGACY\n};\n\nconst TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;\n\n/** TiXmlBase is a base class for every class in TinyXml.\n\tIt does little except to establish that TinyXml classes\n\tcan be printed and provide some utility functions.\n\n\tIn XML, the document and elements can contain\n\tother elements and other types of nodes.\n\n\t@verbatim\n\tA Document can contain:\tElement\t(container or leaf)\n\t\t\t\t\t\t\tComment (leaf)\n\t\t\t\t\t\t\tUnknown (leaf)\n\t\t\t\t\t\t\tDeclaration( leaf )\n\n\tAn Element can contain:\tElement (container or leaf)\n\t\t\t\t\t\t\tText\t(leaf)\n\t\t\t\t\t\t\tAttributes (not on tree)\n\t\t\t\t\t\t\tComment (leaf)\n\t\t\t\t\t\t\tUnknown (leaf)\n\n\tA Decleration contains: Attributes (not on tree)\n\t@endverbatim\n*/\nclass TiXmlBase\n{\n\tfriend class TiXmlNode;\n\tfriend class TiXmlElement;\n\tfriend class TiXmlDocument;\n\npublic:\n\tTiXmlBase()\t:\tuserData(0)\t\t{}\n\tvirtual ~TiXmlBase()\t\t\t{}\n\n\t/**\tAll TinyXml classes can print themselves to a filestream\n\t\tor the string class (TiXmlString in non-STL mode, std::string\n\t\tin STL mode.) Either or both cfile and str can be null.\n\t\t\n\t\tThis is a formatted print, and will insert \n\t\ttabs and newlines.\n\t\t\n\t\t(For an unformatted stream, use the << operator.)\n\t*/\n\tvirtual void Print( FILE* cfile, int depth ) const = 0;\n\n\t/**\tThe world does not agree on whether white space should be kept or\n\t\tnot. In order to make everyone happy, these global, static functions\n\t\tare provided to set whether or not TinyXml will condense all white space\n\t\tinto a single space or not. The default is to condense. Note changing this\n\t\tvalue is not thread safe.\n\t*/\n\tstatic void SetCondenseWhiteSpace( bool condense )\t\t{ condenseWhiteSpace = condense; }\n\n\t/// Return the current white space setting.\n\tstatic bool IsWhiteSpaceCondensed()\t\t\t\t\t\t{ return condenseWhiteSpace; }\n\n\t/** Return the position, in the original source file, of this node or attribute.\n\t\tThe row and column are 1-based. (That is the first row and first column is\n\t\t1,1). If the returns values are 0 or less, then the parser does not have\n\t\ta row and column value.\n\n\t\tGenerally, the row and column value will be set when the TiXmlDocument::Load(),\n\t\tTiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set\n\t\twhen the DOM was created from operator>>.\n\n\t\tThe values reflect the initial load. Once the DOM is modified programmatically\n\t\t(by adding or changing nodes and attributes) the new values will NOT update to\n\t\treflect changes in the document.\n\n\t\tThere is a minor performance cost to computing the row and column. Computation\n\t\tcan be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value.\n\n\t\t@sa TiXmlDocument::SetTabSize()\n\t*/\n\tint Row() const\t\t\t{ return location.row + 1; }\n\tint Column() const\t\t{ return location.col + 1; }\t///< See Row()\n\n\tvoid  SetUserData( void* user )\t\t\t{ userData = user; }\t///< Set a pointer to arbitrary user data.\n\tvoid* GetUserData()\t\t\t\t\t\t{ return userData; }\t///< Get a pointer to arbitrary user data.\n\tconst void* GetUserData() const \t\t{ return userData; }\t///< Get a pointer to arbitrary user data.\n\n\t// Table that returs, for a given lead byte, the total number of bytes\n\t// in the UTF-8 sequence.\n\tstatic const int utf8ByteTable[256];\n\n\tvirtual const char* Parse(\tconst char* p, \n\t\t\t\t\t\t\t\tTiXmlParsingData* data, \n\t\t\t\t\t\t\t\tTiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */ ) = 0;\n\n\t/** Expands entities in a string. Note this should not contian the tag's '<', '>', etc, \n\t\tor they will be transformed into entities!\n\t*/\n\tstatic void EncodeString( const TIXML_STRING& str, TIXML_STRING* out );\n\n\tenum\n\t{\n\t\tTIXML_NO_ERROR = 0,\n\t\tTIXML_ERROR,\n\t\tTIXML_ERROR_OPENING_FILE,\n\t\tTIXML_ERROR_OUT_OF_MEMORY,\n\t\tTIXML_ERROR_PARSING_ELEMENT,\n\t\tTIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,\n\t\tTIXML_ERROR_READING_ELEMENT_VALUE,\n\t\tTIXML_ERROR_READING_ATTRIBUTES,\n\t\tTIXML_ERROR_PARSING_EMPTY,\n\t\tTIXML_ERROR_READING_END_TAG,\n\t\tTIXML_ERROR_PARSING_UNKNOWN,\n\t\tTIXML_ERROR_PARSING_COMMENT,\n\t\tTIXML_ERROR_PARSING_DECLARATION,\n\t\tTIXML_ERROR_DOCUMENT_EMPTY,\n\t\tTIXML_ERROR_EMBEDDED_NULL,\n\t\tTIXML_ERROR_PARSING_CDATA,\n\t\tTIXML_ERROR_DOCUMENT_TOP_ONLY,\n\n\t\tTIXML_ERROR_STRING_COUNT\n\t};\n\nprotected:\n\n\tstatic const char* SkipWhiteSpace( const char*, TiXmlEncoding encoding );\n\tinline static bool IsWhiteSpace( char c )\t\t\n\t{ \n\t\treturn ( isspace( (unsigned char) c ) || c == '\\n' || c == '\\r' ); \n\t}\n\tinline static bool IsWhiteSpace( int c )\n\t{\n\t\tif ( c < 256 )\n\t\t\treturn IsWhiteSpace( (char) c );\n\t\treturn false;\t// Again, only truly correct for English/Latin...but usually works.\n\t}\n\n\t#ifdef TIXML_USE_STL\n\tstatic bool\tStreamWhiteSpace( std::istream * in, TIXML_STRING * tag );\n\tstatic bool StreamTo( std::istream * in, int character, TIXML_STRING * tag );\n\t#endif\n\n\t/*\tReads an XML name into the string provided. Returns\n\t\ta pointer just past the last character of the name,\n\t\tor 0 if the function has an error.\n\t*/\n\tstatic const char* ReadName( const char* p, TIXML_STRING* name, TiXmlEncoding encoding );\n\n\t/*\tReads text. Returns a pointer past the given end tag.\n\t\tWickedly complex options, but it keeps the (sensitive) code in one place.\n\t*/\n\tstatic const char* ReadText(\tconst char* in,\t\t\t\t// where to start\n\t\t\t\t\t\t\t\t\tTIXML_STRING* text,\t\t\t// the string read\n\t\t\t\t\t\t\t\t\tbool ignoreWhiteSpace,\t\t// whether to keep the white space\n\t\t\t\t\t\t\t\t\tconst char* endTag,\t\t\t// what ends this text\n\t\t\t\t\t\t\t\t\tbool ignoreCase,\t\t\t// whether to ignore case in the end tag\n\t\t\t\t\t\t\t\t\tTiXmlEncoding encoding );\t// the current encoding\n\n\t// If an entity has been found, transform it into a character.\n\tstatic const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding );\n\n\t// Get a character, while interpreting entities.\n\t// The length can be from 0 to 4 bytes.\n\tinline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding )\n\t{\n\t\tassert( p );\n\t\tif ( encoding == TIXML_ENCODING_UTF8 )\n\t\t{\n\t\t\t*length = utf8ByteTable[ *((const unsigned char*)p) ];\n\t\t\tassert( *length >= 0 && *length < 5 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t*length = 1;\n\t\t}\n\n\t\tif ( *length == 1 )\n\t\t{\n\t\t\tif ( *p == '&' )\n\t\t\t\treturn GetEntity( p, _value, length, encoding );\n\t\t\t*_value = *p;\n\t\t\treturn p+1;\n\t\t}\n\t\telse if ( *length )\n\t\t{\n\t\t\t//strncpy( _value, p, *length );\t// lots of compilers don't like this function (unsafe),\n\t\t\t\t\t\t\t\t\t\t\t\t// and the null terminator isn't needed\n\t\t\tfor( int i=0; p[i] && i<*length; ++i ) {\n\t\t\t\t_value[i] = p[i];\n\t\t\t}\n\t\t\treturn p + (*length);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Not valid text.\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t// Return true if the next characters in the stream are any of the endTag sequences.\n\t// Ignore case only works for english, and should only be relied on when comparing\n\t// to English words: StringEqual( p, \"version\", true ) is fine.\n\tstatic bool StringEqual(\tconst char* p,\n\t\t\t\t\t\t\t\tconst char* endTag,\n\t\t\t\t\t\t\t\tbool ignoreCase,\n\t\t\t\t\t\t\t\tTiXmlEncoding encoding );\n\n\tstatic const char* errorString[ TIXML_ERROR_STRING_COUNT ];\n\n\tTiXmlCursor location;\n\n    /// Field containing a generic user pointer\n\tvoid*\t\t\tuserData;\n\t\n\t// None of these methods are reliable for any language except English.\n\t// Good for approximation, not great for accuracy.\n\tstatic int IsAlpha( unsigned char anyByte, TiXmlEncoding encoding );\n\tstatic int IsAlphaNum( unsigned char anyByte, TiXmlEncoding encoding );\n\tinline static int ToLower( int v, TiXmlEncoding encoding )\n\t{\n\t\tif ( encoding == TIXML_ENCODING_UTF8 )\n\t\t{\n\t\t\tif ( v < 128 ) return tolower( v );\n\t\t\treturn v;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn tolower( v );\n\t\t}\n\t}\n\tstatic void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length );\n\nprivate:\n\tTiXmlBase( const TiXmlBase& );\t\t\t\t// not implemented.\n\tvoid operator=( const TiXmlBase& base );\t// not allowed.\n\n\tstruct Entity\n\t{\n\t\tconst char*     str;\n\t\tunsigned int\tstrLength;\n\t\tchar\t\t    chr;\n\t};\n\tenum\n\t{\n\t\tNUM_ENTITY = 5,\n\t\tMAX_ENTITY_LENGTH = 6\n\n\t};\n\tstatic Entity entity[ NUM_ENTITY ];\n\tstatic bool condenseWhiteSpace;\n};\n\n\n/** The parent class for everything in the Document Object Model.\n\t(Except for attributes).\n\tNodes have siblings, a parent, and children. A node can be\n\tin a document, or stand on its own. The type of a TiXmlNode\n\tcan be queried, and it can be cast to its more defined type.\n*/\nclass TiXmlNode : public TiXmlBase\n{\n\tfriend class TiXmlDocument;\n\tfriend class TiXmlElement;\n\npublic:\n\t#ifdef TIXML_USE_STL\t\n\n\t    /** An input stream operator, for every class. Tolerant of newlines and\n\t\t    formatting, but doesn't expect them.\n\t    */\n\t    friend std::istream& operator >> (std::istream& in, TiXmlNode& base);\n\n\t    /** An output stream operator, for every class. Note that this outputs\n\t\t    without any newlines or formatting, as opposed to Print(), which\n\t\t    includes tabs and new lines.\n\n\t\t    The operator<< and operator>> are not completely symmetric. Writing\n\t\t    a node to a stream is very well defined. You'll get a nice stream\n\t\t    of output, without any extra whitespace or newlines.\n\t\t    \n\t\t    But reading is not as well defined. (As it always is.) If you create\n\t\t    a TiXmlElement (for example) and read that from an input stream,\n\t\t    the text needs to define an element or junk will result. This is\n\t\t    true of all input streams, but it's worth keeping in mind.\n\n\t\t    A TiXmlDocument will read nodes until it reads a root element, and\n\t\t\tall the children of that root element.\n\t    */\t\n\t    friend std::ostream& operator<< (std::ostream& out, const TiXmlNode& base);\n\n\t\t/// Appends the XML node or attribute to a std::string.\n\t\tfriend std::string& operator<< (std::string& out, const TiXmlNode& base );\n\n\t#endif\n\n\t/** The types of XML nodes supported by TinyXml. (All the\n\t\t\tunsupported types are picked up by UNKNOWN.)\n\t*/\n\tenum NodeType\n\t{\n\t\tDOCUMENT,\n\t\tELEMENT,\n\t\tCOMMENT,\n\t\tUNKNOWN,\n\t\tTEXT,\n\t\tDECLARATION,\n\t\tTYPECOUNT\n\t};\n\n\tvirtual ~TiXmlNode();\n\n\t/** The meaning of 'value' changes for the specific type of\n\t\tTiXmlNode.\n\t\t@verbatim\n\t\tDocument:\tfilename of the xml file\n\t\tElement:\tname of the element\n\t\tComment:\tthe comment text\n\t\tUnknown:\tthe tag contents\n\t\tText:\t\tthe text string\n\t\t@endverbatim\n\n\t\tThe subclasses will wrap this function.\n\t*/\n\tconst char *Value() const { return value.c_str (); }\n\n    #ifdef TIXML_USE_STL\n\t/** Return Value() as a std::string. If you only use STL,\n\t    this is more efficient than calling Value().\n\t\tOnly available in STL mode.\n\t*/\n\tconst std::string& ValueStr() const { return value; }\n\t#endif\n\n\tconst TIXML_STRING& ValueTStr() const { return value; }\n\n\t/** Changes the value of the node. Defined as:\n\t\t@verbatim\n\t\tDocument:\tfilename of the xml file\n\t\tElement:\tname of the element\n\t\tComment:\tthe comment text\n\t\tUnknown:\tthe tag contents\n\t\tText:\t\tthe text string\n\t\t@endverbatim\n\t*/\n\tvoid SetValue(const char * _value) { value = _value;}\n\n    #ifdef TIXML_USE_STL\n\t/// STL std::string form.\n\tvoid SetValue( const std::string& _value )\t{ value = _value; }\n\t#endif\n\n\t/// Delete all the children of this node. Does not affect 'this'.\n\tvoid Clear();\n\n\t/// One step up the DOM.\n\tTiXmlNode* Parent()\t\t\t\t\t\t\t{ return parent; }\n\tconst TiXmlNode* Parent() const\t\t\t\t{ return parent; }\n\n\tconst TiXmlNode* FirstChild()\tconst\t\t{ return firstChild; }\t///< The first child of this node. Will be null if there are no children.\n\tTiXmlNode* FirstChild()\t\t\t\t\t\t{ return firstChild; }\n\tconst TiXmlNode* FirstChild( const char * value ) const;\t\t\t///< The first child of this node with the matching 'value'. Will be null if none found.\n\t/// The first child of this node with the matching 'value'. Will be null if none found.\n\tTiXmlNode* FirstChild( const char * _value ) {\n\t\t// Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe)\n\t\t// call the method, cast the return back to non-const.\n\t\treturn const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->FirstChild( _value ));\n\t}\n\tconst TiXmlNode* LastChild() const\t{ return lastChild; }\t\t/// The last child of this node. Will be null if there are no children.\n\tTiXmlNode* LastChild()\t{ return lastChild; }\n\t\n\tconst TiXmlNode* LastChild( const char * value ) const;\t\t\t/// The last child of this node matching 'value'. Will be null if there are no children.\n\tTiXmlNode* LastChild( const char * _value ) {\n\t\treturn const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->LastChild( _value ));\n\t}\n\n    #ifdef TIXML_USE_STL\n\tconst TiXmlNode* FirstChild( const std::string& _value ) const\t{\treturn FirstChild (_value.c_str ());\t}\t///< STL std::string form.\n\tTiXmlNode* FirstChild( const std::string& _value )\t\t\t\t{\treturn FirstChild (_value.c_str ());\t}\t///< STL std::string form.\n\tconst TiXmlNode* LastChild( const std::string& _value ) const\t{\treturn LastChild (_value.c_str ());\t}\t///< STL std::string form.\n\tTiXmlNode* LastChild( const std::string& _value )\t\t\t\t{\treturn LastChild (_value.c_str ());\t}\t///< STL std::string form.\n\t#endif\n\n\t/** An alternate way to walk the children of a node.\n\t\tOne way to iterate over nodes is:\n\t\t@verbatim\n\t\t\tfor( child = parent->FirstChild(); child; child = child->NextSibling() )\n\t\t@endverbatim\n\n\t\tIterateChildren does the same thing with the syntax:\n\t\t@verbatim\n\t\t\tchild = 0;\n\t\t\twhile( child = parent->IterateChildren( child ) )\n\t\t@endverbatim\n\n\t\tIterateChildren takes the previous child as input and finds\n\t\tthe next one. If the previous child is null, it returns the\n\t\tfirst. IterateChildren will return null when done.\n\t*/\n\tconst TiXmlNode* IterateChildren( const TiXmlNode* previous ) const;\n\tTiXmlNode* IterateChildren( const TiXmlNode* previous ) {\n\t\treturn const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( previous ) );\n\t}\n\n\t/// This flavor of IterateChildren searches for children with a particular 'value'\n\tconst TiXmlNode* IterateChildren( const char * value, const TiXmlNode* previous ) const;\n\tTiXmlNode* IterateChildren( const char * _value, const TiXmlNode* previous ) {\n\t\treturn const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( _value, previous ) );\n\t}\n\n    #ifdef TIXML_USE_STL\n\tconst TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const\t{\treturn IterateChildren (_value.c_str (), previous);\t}\t///< STL std::string form.\n\tTiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) {\treturn IterateChildren (_value.c_str (), previous);\t}\t///< STL std::string form.\n\t#endif\n\n\t/** Add a new node related to this. Adds a child past the LastChild.\n\t\tReturns a pointer to the new object or NULL if an error occurred.\n\t*/\n\tTiXmlNode* InsertEndChild( const TiXmlNode& addThis );\n\n\n\t/** Add a new node related to this. Adds a child past the LastChild.\n\n\t\tNOTE: the node to be added is passed by pointer, and will be\n\t\thenceforth owned (and deleted) by tinyXml. This method is efficient\n\t\tand avoids an extra copy, but should be used with care as it\n\t\tuses a different memory model than the other insert functions.\n\n\t\t@sa InsertEndChild\n\t*/\n\tTiXmlNode* LinkEndChild( TiXmlNode* addThis );\n\n\t/** Add a new node related to this. Adds a child before the specified child.\n\t\tReturns a pointer to the new object or NULL if an error occurred.\n\t*/\n\tTiXmlNode* InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis );\n\n\t/** Add a new node related to this. Adds a child after the specified child.\n\t\tReturns a pointer to the new object or NULL if an error occurred.\n\t*/\n\tTiXmlNode* InsertAfterChild(  TiXmlNode* afterThis, const TiXmlNode& addThis );\n\n\t/** Replace a child of this node.\n\t\tReturns a pointer to the new object or NULL if an error occurred.\n\t*/\n\tTiXmlNode* ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis );\n\n\t/// Delete a child of this node.\n\tbool RemoveChild( TiXmlNode* removeThis );\n\n\t/// Navigate to a sibling node.\n\tconst TiXmlNode* PreviousSibling() const\t\t\t{ return prev; }\n\tTiXmlNode* PreviousSibling()\t\t\t\t\t\t{ return prev; }\n\n\t/// Navigate to a sibling node.\n\tconst TiXmlNode* PreviousSibling( const char * ) const;\n\tTiXmlNode* PreviousSibling( const char *_prev ) {\n\t\treturn const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->PreviousSibling( _prev ) );\n\t}\n\n    #ifdef TIXML_USE_STL\n\tconst TiXmlNode* PreviousSibling( const std::string& _value ) const\t{\treturn PreviousSibling (_value.c_str ());\t}\t///< STL std::string form.\n\tTiXmlNode* PreviousSibling( const std::string& _value ) \t\t\t{\treturn PreviousSibling (_value.c_str ());\t}\t///< STL std::string form.\n\tconst TiXmlNode* NextSibling( const std::string& _value) const\t\t{\treturn NextSibling (_value.c_str ());\t}\t///< STL std::string form.\n\tTiXmlNode* NextSibling( const std::string& _value) \t\t\t\t\t{\treturn NextSibling (_value.c_str ());\t}\t///< STL std::string form.\n\t#endif\n\n\t/// Navigate to a sibling node.\n\tconst TiXmlNode* NextSibling() const\t\t\t\t{ return next; }\n\tTiXmlNode* NextSibling()\t\t\t\t\t\t\t{ return next; }\n\n\t/// Navigate to a sibling node with the given 'value'.\n\tconst TiXmlNode* NextSibling( const char * ) const;\n\tTiXmlNode* NextSibling( const char* _next ) {\n\t\treturn const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->NextSibling( _next ) );\n\t}\n\n\t/** Convenience function to get through elements.\n\t\tCalls NextSibling and ToElement. Will skip all non-Element\n\t\tnodes. Returns 0 if there is not another element.\n\t*/\n\tconst TiXmlElement* NextSiblingElement() const;\n\tTiXmlElement* NextSiblingElement() {\n\t\treturn const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement() );\n\t}\n\n\t/** Convenience function to get through elements.\n\t\tCalls NextSibling and ToElement. Will skip all non-Element\n\t\tnodes. Returns 0 if there is not another element.\n\t*/\n\tconst TiXmlElement* NextSiblingElement( const char * ) const;\n\tTiXmlElement* NextSiblingElement( const char *_next ) {\n\t\treturn const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement( _next ) );\n\t}\n\n    #ifdef TIXML_USE_STL\n\tconst TiXmlElement* NextSiblingElement( const std::string& _value) const\t{\treturn NextSiblingElement (_value.c_str ());\t}\t///< STL std::string form.\n\tTiXmlElement* NextSiblingElement( const std::string& _value)\t\t\t\t{\treturn NextSiblingElement (_value.c_str ());\t}\t///< STL std::string form.\n\t#endif\n\n\t/// Convenience function to get through elements.\n\tconst TiXmlElement* FirstChildElement()\tconst;\n\tTiXmlElement* FirstChildElement() {\n\t\treturn const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement() );\n\t}\n\n\t/// Convenience function to get through elements.\n\tconst TiXmlElement* FirstChildElement( const char * _value ) const;\n\tTiXmlElement* FirstChildElement( const char * _value ) {\n\t\treturn const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement( _value ) );\n\t}\n\n    #ifdef TIXML_USE_STL\n\tconst TiXmlElement* FirstChildElement( const std::string& _value ) const\t{\treturn FirstChildElement (_value.c_str ());\t}\t///< STL std::string form.\n\tTiXmlElement* FirstChildElement( const std::string& _value )\t\t\t\t{\treturn FirstChildElement (_value.c_str ());\t}\t///< STL std::string form.\n\t#endif\n\n\t/** Query the type (as an enumerated value, above) of this node.\n\t\tThe possible types are: DOCUMENT, ELEMENT, COMMENT,\n\t\t\t\t\t\t\t\tUNKNOWN, TEXT, and DECLARATION.\n\t*/\n\tint Type() const\t{ return type; }\n\n\t/** Return a pointer to the Document this node lives in.\n\t\tReturns null if not in a document.\n\t*/\n\tconst TiXmlDocument* GetDocument() const;\n\tTiXmlDocument* GetDocument() {\n\t\treturn const_cast< TiXmlDocument* >( (const_cast< const TiXmlNode* >(this))->GetDocument() );\n\t}\n\n\t/// Returns true if this node has no children.\n\tbool NoChildren() const\t\t\t\t\t\t{ return !firstChild; }\n\n\tvirtual const TiXmlDocument*    ToDocument()    const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\tvirtual const TiXmlElement*     ToElement()     const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\tvirtual const TiXmlComment*     ToComment()     const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\tvirtual const TiXmlUnknown*     ToUnknown()     const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\tvirtual const TiXmlText*        ToText()        const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\tvirtual const TiXmlDeclaration* ToDeclaration() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\n\tvirtual TiXmlDocument*          ToDocument()    { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\tvirtual TiXmlElement*           ToElement()\t    { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\tvirtual TiXmlComment*           ToComment()     { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\tvirtual TiXmlUnknown*           ToUnknown()\t    { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\tvirtual TiXmlText*\t            ToText()        { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\tvirtual TiXmlDeclaration*       ToDeclaration() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.\n\n\t/** Create an exact duplicate of this node and return it. The memory must be deleted\n\t\tby the caller. \n\t*/\n\tvirtual TiXmlNode* Clone() const = 0;\n\n\t/** Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the \n\t\tXML tree will be conditionally visited and the host will be called back\n\t\tvia the TiXmlVisitor interface.\n\n\t\tThis is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse\n\t\tthe XML for the callbacks, so the performance of TinyXML is unchanged by using this\n\t\tinterface versus any other.)\n\n\t\tThe interface has been based on ideas from:\n\n\t\t- http://www.saxproject.org/\n\t\t- http://c2.com/cgi/wiki?HierarchicalVisitorPattern \n\n\t\tWhich are both good references for \"visiting\".\n\n\t\tAn example of using Accept():\n\t\t@verbatim\n\t\tTiXmlPrinter printer;\n\t\ttinyxmlDoc.Accept( &printer );\n\t\tconst char* xmlcstr = printer.CStr();\n\t\t@endverbatim\n\t*/\n\tvirtual bool Accept( TiXmlVisitor* visitor ) const = 0;\n\nprotected:\n\tTiXmlNode( NodeType _type );\n\n\t// Copy to the allocated object. Shared functionality between Clone, Copy constructor,\n\t// and the assignment operator.\n\tvoid CopyTo( TiXmlNode* target ) const;\n\n\t#ifdef TIXML_USE_STL\n\t    // The real work of the input operator.\n\tvirtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0;\n\t#endif\n\n\t// Figure out what is at *p, and parse it. Returns null if it is not an xml node.\n\tTiXmlNode* Identify( const char* start, TiXmlEncoding encoding );\n\n\tTiXmlNode*\t\tparent;\n\tNodeType\t\ttype;\n\n\tTiXmlNode*\t\tfirstChild;\n\tTiXmlNode*\t\tlastChild;\n\n\tTIXML_STRING\tvalue;\n\n\tTiXmlNode*\t\tprev;\n\tTiXmlNode*\t\tnext;\n\nprivate:\n\tTiXmlNode( const TiXmlNode& );\t\t\t\t// not implemented.\n\tvoid operator=( const TiXmlNode& base );\t// not allowed.\n};\n\n\n/** An attribute is a name-value pair. Elements have an arbitrary\n\tnumber of attributes, each with a unique name.\n\n\t@note The attributes are not TiXmlNodes, since they are not\n\t\t  part of the tinyXML document object model. There are other\n\t\t  suggested ways to look at this problem.\n*/\nclass TiXmlAttribute : public TiXmlBase\n{\n\tfriend class TiXmlAttributeSet;\n\npublic:\n\t/// Construct an empty attribute.\n\tTiXmlAttribute() : TiXmlBase()\n\t{\n\t\tdocument = 0;\n\t\tprev = next = 0;\n\t}\n\n\t#ifdef TIXML_USE_STL\n\t/// std::string constructor.\n\tTiXmlAttribute( const std::string& _name, const std::string& _value )\n\t{\n\t\tname = _name;\n\t\tvalue = _value;\n\t\tdocument = 0;\n\t\tprev = next = 0;\n\t}\n\t#endif\n\n\t/// Construct an attribute with a name and value.\n\tTiXmlAttribute( const char * _name, const char * _value )\n\t{\n\t\tname = _name;\n\t\tvalue = _value;\n\t\tdocument = 0;\n\t\tprev = next = 0;\n\t}\n\n\tconst char*\t\tName()  const\t\t{ return name.c_str(); }\t\t///< Return the name of this attribute.\n\tconst char*\t\tValue() const\t\t{ return value.c_str(); }\t\t///< Return the value of this attribute.\n\t#ifdef TIXML_USE_STL\n\tconst std::string& ValueStr() const\t{ return value; }\t\t\t\t///< Return the value of this attribute.\n\t#endif\n\tint\t\t\t\tIntValue() const;\t\t\t\t\t\t\t\t\t///< Return the value of this attribute, converted to an integer.\n\tdouble\t\t\tDoubleValue() const;\t\t\t\t\t\t\t\t///< Return the value of this attribute, converted to a double.\n\n\t// Get the tinyxml string representation\n\tconst TIXML_STRING& NameTStr() const { return name; }\n\n\t/** QueryIntValue examines the value string. It is an alternative to the\n\t\tIntValue() method with richer error checking.\n\t\tIf the value is an integer, it is stored in 'value' and \n\t\tthe call returns TIXML_SUCCESS. If it is not\n\t\tan integer, it returns TIXML_WRONG_TYPE.\n\n\t\tA specialized but useful call. Note that for success it returns 0,\n\t\twhich is the opposite of almost all other TinyXml calls.\n\t*/\n\tint QueryIntValue( int* _value ) const;\n\t/// QueryDoubleValue examines the value string. See QueryIntValue().\n\tint QueryDoubleValue( double* _value ) const;\n\n\tvoid SetName( const char* _name )\t{ name = _name; }\t\t\t\t///< Set the name of this attribute.\n\tvoid SetValue( const char* _value )\t{ value = _value; }\t\t\t\t///< Set the value.\n\n\tvoid SetIntValue( int _value );\t\t\t\t\t\t\t\t\t\t///< Set the value from an integer.\n\tvoid SetDoubleValue( double _value );\t\t\t\t\t\t\t\t///< Set the value from a double.\n\n    #ifdef TIXML_USE_STL\n\t/// STL std::string form.\n\tvoid SetName( const std::string& _name )\t{ name = _name; }\t\n\t/// STL std::string form.\t\n\tvoid SetValue( const std::string& _value )\t{ value = _value; }\n\t#endif\n\n\t/// Get the next sibling attribute in the DOM. Returns null at end.\n\tconst TiXmlAttribute* Next() const;\n\tTiXmlAttribute* Next() {\n\t\treturn const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Next() ); \n\t}\n\n\t/// Get the previous sibling attribute in the DOM. Returns null at beginning.\n\tconst TiXmlAttribute* Previous() const;\n\tTiXmlAttribute* Previous() {\n\t\treturn const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Previous() ); \n\t}\n\n\tbool operator==( const TiXmlAttribute& rhs ) const { return rhs.name == name; }\n\tbool operator<( const TiXmlAttribute& rhs )\t const { return name < rhs.name; }\n\tbool operator>( const TiXmlAttribute& rhs )  const { return name > rhs.name; }\n\n\t/*\tAttribute parsing starts: first letter of the name\n\t\t\t\t\t\t returns: the next char after the value end quote\n\t*/\n\tvirtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );\n\n\t// Prints this Attribute to a FILE stream.\n\tvirtual void Print( FILE* cfile, int depth ) const {\n\t\tPrint( cfile, depth, 0 );\n\t}\n\tvoid Print( FILE* cfile, int depth, TIXML_STRING* str ) const;\n\n\t// [internal use]\n\t// Set the document pointer so the attribute can report errors.\n\tvoid SetDocument( TiXmlDocument* doc )\t{ document = doc; }\n\nprivate:\n\tTiXmlAttribute( const TiXmlAttribute& );\t\t\t\t// not implemented.\n\tvoid operator=( const TiXmlAttribute& base );\t// not allowed.\n\n\tTiXmlDocument*\tdocument;\t// A pointer back to a document, for error reporting.\n\tTIXML_STRING name;\n\tTIXML_STRING value;\n\tTiXmlAttribute*\tprev;\n\tTiXmlAttribute*\tnext;\n};\n\n\n/*\tA class used to manage a group of attributes.\n\tIt is only used internally, both by the ELEMENT and the DECLARATION.\n\t\n\tThe set can be changed transparent to the Element and Declaration\n\tclasses that use it, but NOT transparent to the Attribute\n\twhich has to implement a next() and previous() method. Which makes\n\tit a bit problematic and prevents the use of STL.\n\n\tThis version is implemented with circular lists because:\n\t\t- I like circular lists\n\t\t- it demonstrates some independence from the (typical) doubly linked list.\n*/\nclass TiXmlAttributeSet\n{\npublic:\n\tTiXmlAttributeSet();\n\t~TiXmlAttributeSet();\n\n\tvoid Add( TiXmlAttribute* attribute );\n\tvoid Remove( TiXmlAttribute* attribute );\n\n\tconst TiXmlAttribute* First()\tconst\t{ return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }\n\tTiXmlAttribute* First()\t\t\t\t\t{ return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }\n\tconst TiXmlAttribute* Last() const\t\t{ return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }\n\tTiXmlAttribute* Last()\t\t\t\t\t{ return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }\n\n\tconst TiXmlAttribute*\tFind( const char* _name ) const;\n\tTiXmlAttribute*\tFind( const char* _name ) {\n\t\treturn const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttributeSet* >(this))->Find( _name ) );\n\t}\n\t#ifdef TIXML_USE_STL\n\tconst TiXmlAttribute*\tFind( const std::string& _name ) const;\n\tTiXmlAttribute*\tFind( const std::string& _name ) {\n\t\treturn const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttributeSet* >(this))->Find( _name ) );\n\t}\n\n\t#endif\n\nprivate:\n\t//*ME:\tBecause of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element),\n\t//*ME:\tthis class must be also use a hidden/disabled copy-constructor !!!\n\tTiXmlAttributeSet( const TiXmlAttributeSet& );\t// not allowed\n\tvoid operator=( const TiXmlAttributeSet& );\t// not allowed (as TiXmlAttribute)\n\n\tTiXmlAttribute sentinel;\n};\n\n\n/** The element is a container class. It has a value, the element name,\n\tand can contain other elements, text, comments, and unknowns.\n\tElements also contain an arbitrary number of attributes.\n*/\nclass TiXmlElement : public TiXmlNode\n{\npublic:\n\t/// Construct an element.\n\tTiXmlElement (const char * in_value);\n\n\t#ifdef TIXML_USE_STL\n\t/// std::string constructor.\n\tTiXmlElement( const std::string& _value );\n\t#endif\n\n\tTiXmlElement( const TiXmlElement& );\n\n\tvoid operator=( const TiXmlElement& base );\n\n\tvirtual ~TiXmlElement();\n\n\t/** Given an attribute name, Attribute() returns the value\n\t\tfor the attribute of that name, or null if none exists.\n\t*/\n\tconst char* Attribute( const char* name ) const;\n\n\t/** Given an attribute name, Attribute() returns the value\n\t\tfor the attribute of that name, or null if none exists.\n\t\tIf the attribute exists and can be converted to an integer,\n\t\tthe integer value will be put in the return 'i', if 'i'\n\t\tis non-null.\n\t*/\n\tconst char* Attribute( const char* name, int* i ) const;\n\n\t/** Given an attribute name, Attribute() returns the value\n\t\tfor the attribute of that name, or null if none exists.\n\t\tIf the attribute exists and can be converted to an double,\n\t\tthe double value will be put in the return 'd', if 'd'\n\t\tis non-null.\n\t*/\n\tconst char* Attribute( const char* name, double* d ) const;\n\n\t/** QueryIntAttribute examines the attribute - it is an alternative to the\n\t\tAttribute() method with richer error checking.\n\t\tIf the attribute is an integer, it is stored in 'value' and \n\t\tthe call returns TIXML_SUCCESS. If it is not\n\t\tan integer, it returns TIXML_WRONG_TYPE. If the attribute\n\t\tdoes not exist, then TIXML_NO_ATTRIBUTE is returned.\n\t*/\t\n\tint QueryIntAttribute( const char* name, int* _value ) const;\n\t/// QueryDoubleAttribute examines the attribute - see QueryIntAttribute().\n\tint QueryDoubleAttribute( const char* name, double* _value ) const;\n\t/// QueryFloatAttribute examines the attribute - see QueryIntAttribute().\n\tint QueryFloatAttribute( const char* name, float* _value ) const {\n\t\tdouble d;\n\t\tint result = QueryDoubleAttribute( name, &d );\n\t\tif ( result == TIXML_SUCCESS ) {\n\t\t\t*_value = (float)d;\n\t\t}\n\t\treturn result;\n\t}\n\n    #ifdef TIXML_USE_STL\n\t/** Template form of the attribute query which will try to read the\n\t\tattribute into the specified type. Very easy, very powerful, but\n\t\tbe careful to make sure to call this with the correct type.\n\t\t\n\t\tNOTE: This method doesn't work correctly for 'string' types.\n\n\t\t@return TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE\n\t*/\n\ttemplate< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const\n\t{\n\t\tconst TiXmlAttribute* node = attributeSet.Find( name );\n\t\tif ( !node )\n\t\t\treturn TIXML_NO_ATTRIBUTE;\n\n\t\tstd::stringstream sstream( node->ValueStr() );\n\t\tsstream >> *outValue;\n\t\tif ( !sstream.fail() )\n\t\t\treturn TIXML_SUCCESS;\n\t\treturn TIXML_WRONG_TYPE;\n\t}\n\t/*\n\t This is - in theory - a bug fix for \"QueryValueAtribute returns truncated std::string\"\n\t but template specialization is hard to get working cross-compiler. Leaving the bug for now.\n\t \n\t// The above will fail for std::string because the space character is used as a seperator.\n\t// Specialize for strings. Bug [ 1695429 ] QueryValueAtribute returns truncated std::string\n\ttemplate<> int QueryValueAttribute( const std::string& name, std::string* outValue ) const\n\t{\n\t\tconst TiXmlAttribute* node = attributeSet.Find( name );\n\t\tif ( !node )\n\t\t\treturn TIXML_NO_ATTRIBUTE;\n\t\t*outValue = node->ValueStr();\n\t\treturn TIXML_SUCCESS;\n\t}\n\t*/\n\t#endif\n\n\t/** Sets an attribute of name to a given value. The attribute\n\t\twill be created if it does not exist, or changed if it does.\n\t*/\n\tvoid SetAttribute( const char* name, const char * _value );\n\n    #ifdef TIXML_USE_STL\n\tconst std::string* Attribute( const std::string& name ) const;\n\tconst std::string* Attribute( const std::string& name, int* i ) const;\n\tconst std::string* Attribute( const std::string& name, double* d ) const;\n\tint QueryIntAttribute( const std::string& name, int* _value ) const;\n\tint QueryDoubleAttribute( const std::string& name, double* _value ) const;\n\n\t/// STL std::string form.\n\tvoid SetAttribute( const std::string& name, const std::string& _value );\n\t///< STL std::string form.\n\tvoid SetAttribute( const std::string& name, int _value );\n\t#endif\n\n\t/** Sets an attribute of name to a given value. The attribute\n\t\twill be created if it does not exist, or changed if it does.\n\t*/\n\tvoid SetAttribute( const char * name, int value );\n\n\t/** Sets an attribute of name to a given value. The attribute\n\t\twill be created if it does not exist, or changed if it does.\n\t*/\n\tvoid SetDoubleAttribute( const char * name, double value );\n\n\t/** Deletes an attribute with the given name.\n\t*/\n\tvoid RemoveAttribute( const char * name );\n    #ifdef TIXML_USE_STL\n\tvoid RemoveAttribute( const std::string& name )\t{\tRemoveAttribute (name.c_str ());\t}\t///< STL std::string form.\n\t#endif\n\n\tconst TiXmlAttribute* FirstAttribute() const\t{ return attributeSet.First(); }\t\t///< Access the first attribute in this element.\n\tTiXmlAttribute* FirstAttribute() \t\t\t\t{ return attributeSet.First(); }\n\tconst TiXmlAttribute* LastAttribute()\tconst \t{ return attributeSet.Last(); }\t\t///< Access the last attribute in this element.\n\tTiXmlAttribute* LastAttribute()\t\t\t\t\t{ return attributeSet.Last(); }\n\n\t/** Convenience function for easy access to the text inside an element. Although easy\n\t\tand concise, GetText() is limited compared to getting the TiXmlText child\n\t\tand accessing it directly.\n\t\n\t\tIf the first child of 'this' is a TiXmlText, the GetText()\n\t\treturns the character string of the Text node, else null is returned.\n\n\t\tThis is a convenient method for getting the text of simple contained text:\n\t\t@verbatim\n\t\t<foo>This is text</foo>\n\t\tconst char* str = fooElement->GetText();\n\t\t@endverbatim\n\n\t\t'str' will be a pointer to \"This is text\". \n\t\t\n\t\tNote that this function can be misleading. If the element foo was created from\n\t\tthis XML:\n\t\t@verbatim\n\t\t<foo><b>This is text</b></foo> \n\t\t@endverbatim\n\n\t\tthen the value of str would be null. The first child node isn't a text node, it is\n\t\tanother element. From this XML:\n\t\t@verbatim\n\t\t<foo>This is <b>text</b></foo> \n\t\t@endverbatim\n\t\tGetText() will return \"This is \".\n\n\t\tWARNING: GetText() accesses a child node - don't become confused with the \n\t\t\t\t similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are \n\t\t\t\t safe type casts on the referenced node.\n\t*/\n\tconst char* GetText() const;\n\n\t/// Creates a new Element and returns it - the returned element is a copy.\n\tvirtual TiXmlNode* Clone() const;\n\t// Print the Element to a FILE stream.\n\tvirtual void Print( FILE* cfile, int depth ) const;\n\n\t/*\tAttribtue parsing starts: next char past '<'\n\t\t\t\t\t\t returns: next char past '>'\n\t*/\n\tvirtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );\n\n\tvirtual const TiXmlElement*     ToElement()     const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\tvirtual TiXmlElement*           ToElement()\t          { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\n\t/** Walk the XML tree visiting this node and all of its children. \n\t*/\n\tvirtual bool Accept( TiXmlVisitor* visitor ) const;\n\nprotected:\n\n\tvoid CopyTo( TiXmlElement* target ) const;\n\tvoid ClearThis();\t// like clear, but initializes 'this' object as well\n\n\t// Used to be public [internal use]\n\t#ifdef TIXML_USE_STL\n\tvirtual void StreamIn( std::istream * in, TIXML_STRING * tag );\n\t#endif\n\t/*\t[internal use]\n\t\tReads the \"value\" of the element -- another element, or text.\n\t\tThis should terminate with the current end tag.\n\t*/\n\tconst char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding );\n\nprivate:\n\n\tTiXmlAttributeSet attributeSet;\n};\n\n\n/**\tAn XML comment.\n*/\nclass TiXmlComment : public TiXmlNode\n{\npublic:\n\t/// Constructs an empty comment.\n\tTiXmlComment() : TiXmlNode( TiXmlNode::COMMENT ) {}\n\t/// Construct a comment from text.\n\tTiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::COMMENT ) {\n\t\tSetValue( _value );\n\t}\n\tTiXmlComment( const TiXmlComment& );\n\tvoid operator=( const TiXmlComment& base );\n\n\tvirtual ~TiXmlComment()\t{}\n\n\t/// Returns a copy of this Comment.\n\tvirtual TiXmlNode* Clone() const;\n\t// Write this Comment to a FILE stream.\n\tvirtual void Print( FILE* cfile, int depth ) const;\n\n\t/*\tAttribtue parsing starts: at the ! of the !--\n\t\t\t\t\t\t returns: next char past '>'\n\t*/\n\tvirtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );\n\n\tvirtual const TiXmlComment*  ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\tvirtual TiXmlComment*  ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\n\t/** Walk the XML tree visiting this node and all of its children. \n\t*/\n\tvirtual bool Accept( TiXmlVisitor* visitor ) const;\n\nprotected:\n\tvoid CopyTo( TiXmlComment* target ) const;\n\n\t// used to be public\n\t#ifdef TIXML_USE_STL\n\tvirtual void StreamIn( std::istream * in, TIXML_STRING * tag );\n\t#endif\n//\tvirtual void StreamOut( TIXML_OSTREAM * out ) const;\n\nprivate:\n\n};\n\n\n/** XML text. A text node can have 2 ways to output the next. \"normal\" output \n\tand CDATA. It will default to the mode it was parsed from the XML file and\n\tyou generally want to leave it alone, but you can change the output mode with \n\tSetCDATA() and query it with CDATA().\n*/\nclass TiXmlText : public TiXmlNode\n{\n\tfriend class TiXmlElement;\npublic:\n\t/** Constructor for text element. By default, it is treated as \n\t\tnormal, encoded text. If you want it be output as a CDATA text\n\t\telement, set the parameter _cdata to 'true'\n\t*/\n\tTiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TEXT)\n\t{\n\t\tSetValue( initValue );\n\t\tcdata = false;\n\t}\n\tvirtual ~TiXmlText() {}\n\n\t#ifdef TIXML_USE_STL\n\t/// Constructor.\n\tTiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TEXT)\n\t{\n\t\tSetValue( initValue );\n\t\tcdata = false;\n\t}\n\t#endif\n\n\tTiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TEXT )\t{ copy.CopyTo( this ); }\n\tvoid operator=( const TiXmlText& base )\t\t\t\t\t\t\t \t{ base.CopyTo( this ); }\n\n\t// Write this text object to a FILE stream.\n\tvirtual void Print( FILE* cfile, int depth ) const;\n\n\t/// Queries whether this represents text using a CDATA section.\n\tbool CDATA() const\t\t\t\t{ return cdata; }\n\t/// Turns on or off a CDATA representation of text.\n\tvoid SetCDATA( bool _cdata )\t{ cdata = _cdata; }\n\n\tvirtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );\n\n\tvirtual const TiXmlText* ToText() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\tvirtual TiXmlText*       ToText()       { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\n\t/** Walk the XML tree visiting this node and all of its children. \n\t*/\n\tvirtual bool Accept( TiXmlVisitor* content ) const;\n\nprotected :\n\t///  [internal use] Creates a new Element and returns it.\n\tvirtual TiXmlNode* Clone() const;\n\tvoid CopyTo( TiXmlText* target ) const;\n\n\tbool Blank() const;\t// returns true if all white space and new lines\n\t// [internal use]\n\t#ifdef TIXML_USE_STL\n\tvirtual void StreamIn( std::istream * in, TIXML_STRING * tag );\n\t#endif\n\nprivate:\n\tbool cdata;\t\t\t// true if this should be input and output as a CDATA style text element\n};\n\n\n/** In correct XML the declaration is the first entry in the file.\n\t@verbatim\n\t\t<?xml version=\"1.0\" standalone=\"yes\"?>\n\t@endverbatim\n\n\tTinyXml will happily read or write files without a declaration,\n\thowever. There are 3 possible attributes to the declaration:\n\tversion, encoding, and standalone.\n\n\tNote: In this version of the code, the attributes are\n\thandled as special cases, not generic attributes, simply\n\tbecause there can only be at most 3 and they are always the same.\n*/\nclass TiXmlDeclaration : public TiXmlNode\n{\npublic:\n\t/// Construct an empty declaration.\n\tTiXmlDeclaration()   : TiXmlNode( TiXmlNode::DECLARATION ) {}\n\n#ifdef TIXML_USE_STL\n\t/// Constructor.\n\tTiXmlDeclaration(\tconst std::string& _version,\n\t\t\t\t\t\tconst std::string& _encoding,\n\t\t\t\t\t\tconst std::string& _standalone );\n#endif\n\n\t/// Construct.\n\tTiXmlDeclaration(\tconst char* _version,\n\t\t\t\t\t\tconst char* _encoding,\n\t\t\t\t\t\tconst char* _standalone );\n\n\tTiXmlDeclaration( const TiXmlDeclaration& copy );\n\tvoid operator=( const TiXmlDeclaration& copy );\n\n\tvirtual ~TiXmlDeclaration()\t{}\n\n\t/// Version. Will return an empty string if none was found.\n\tconst char *Version() const\t\t\t{ return version.c_str (); }\n\t/// Encoding. Will return an empty string if none was found.\n\tconst char *Encoding() const\t\t{ return encoding.c_str (); }\n\t/// Is this a standalone document?\n\tconst char *Standalone() const\t\t{ return standalone.c_str (); }\n\n\t/// Creates a copy of this Declaration and returns it.\n\tvirtual TiXmlNode* Clone() const;\n\t// Print this declaration to a FILE stream.\n\tvirtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const;\n\tvirtual void Print( FILE* cfile, int depth ) const {\n\t\tPrint( cfile, depth, 0 );\n\t}\n\n\tvirtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );\n\n\tvirtual const TiXmlDeclaration* ToDeclaration() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\tvirtual TiXmlDeclaration*       ToDeclaration()       { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\n\t/** Walk the XML tree visiting this node and all of its children. \n\t*/\n\tvirtual bool Accept( TiXmlVisitor* visitor ) const;\n\nprotected:\n\tvoid CopyTo( TiXmlDeclaration* target ) const;\n\t// used to be public\n\t#ifdef TIXML_USE_STL\n\tvirtual void StreamIn( std::istream * in, TIXML_STRING * tag );\n\t#endif\n\nprivate:\n\n\tTIXML_STRING version;\n\tTIXML_STRING encoding;\n\tTIXML_STRING standalone;\n};\n\n\n/** Any tag that tinyXml doesn't recognize is saved as an\n\tunknown. It is a tag of text, but should not be modified.\n\tIt will be written back to the XML, unchanged, when the file\n\tis saved.\n\n\tDTD tags get thrown into TiXmlUnknowns.\n*/\nclass TiXmlUnknown : public TiXmlNode\n{\npublic:\n\tTiXmlUnknown() : TiXmlNode( TiXmlNode::UNKNOWN )\t{}\n\tvirtual ~TiXmlUnknown() {}\n\n\tTiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::UNKNOWN )\t\t{ copy.CopyTo( this ); }\n\tvoid operator=( const TiXmlUnknown& copy )\t\t\t\t\t\t\t\t\t\t{ copy.CopyTo( this ); }\n\n\t/// Creates a copy of this Unknown and returns it.\n\tvirtual TiXmlNode* Clone() const;\n\t// Print this Unknown to a FILE stream.\n\tvirtual void Print( FILE* cfile, int depth ) const;\n\n\tvirtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );\n\n\tvirtual const TiXmlUnknown*     ToUnknown()     const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\tvirtual TiXmlUnknown*           ToUnknown()\t    { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\n\t/** Walk the XML tree visiting this node and all of its children. \n\t*/\n\tvirtual bool Accept( TiXmlVisitor* content ) const;\n\nprotected:\n\tvoid CopyTo( TiXmlUnknown* target ) const;\n\n\t#ifdef TIXML_USE_STL\n\tvirtual void StreamIn( std::istream * in, TIXML_STRING * tag );\n\t#endif\n\nprivate:\n\n};\n\n\n/** Always the top level node. A document binds together all the\n\tXML pieces. It can be saved, loaded, and printed to the screen.\n\tThe 'value' of a document node is the xml file name.\n*/\nclass TiXmlDocument : public TiXmlNode\n{\npublic:\n\t/// Create an empty document, that has no name.\n\tTiXmlDocument();\n\t/// Create a document with a name. The name of the document is also the filename of the xml.\n\tTiXmlDocument( const char * documentName );\n\n\t#ifdef TIXML_USE_STL\n\t/// Constructor.\n\tTiXmlDocument( const std::string& documentName );\n\t#endif\n\n\tTiXmlDocument( const TiXmlDocument& copy );\n\tvoid operator=( const TiXmlDocument& copy );\n\n\tvirtual ~TiXmlDocument() {}\n\n\t/** Load a file using the current document value.\n\t\tReturns true if successful. Will delete any existing\n\t\tdocument data before loading.\n\t*/\n\tbool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );\n\t/// Save a file using the current document value. Returns true if successful.\n\tbool SaveFile() const;\n\t/// Load a file using the given filename. Returns true if successful.\n\tbool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );\n\t/// Save a file using the given filename. Returns true if successful.\n\tbool SaveFile( const char * filename ) const;\n\t/** Load a file using the given FILE*. Returns true if successful. Note that this method\n\t\tdoesn't stream - the entire object pointed at by the FILE*\n\t\twill be interpreted as an XML file. TinyXML doesn't stream in XML from the current\n\t\tfile location. Streaming may be added in the future.\n\t*/\n\tbool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );\n\t/// Save a file using the given FILE*. Returns true if successful.\n\tbool SaveFile( FILE* ) const;\n\n\t#ifdef TIXML_USE_STL\n\tbool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )\t\t\t///< STL std::string version.\n\t{\n//\t\tStringToBuffer f( filename );\n//\t\treturn ( f.buffer && LoadFile( f.buffer, encoding ));\n\t\treturn LoadFile( filename.c_str(), encoding );\n\t}\n\tbool SaveFile( const std::string& filename ) const\t\t///< STL std::string version.\n\t{\n//\t\tStringToBuffer f( filename );\n//\t\treturn ( f.buffer && SaveFile( f.buffer ));\n\t\treturn SaveFile( filename.c_str() );\n\t}\n\t#endif\n\n\t/** Parse the given null terminated block of xml data. Passing in an encoding to this\n\t\tmethod (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml\n\t\tto use that encoding, regardless of what TinyXml might otherwise try to detect.\n\t*/\n\tvirtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );\n\n\t/** Get the root element -- the only top level element -- of the document.\n\t\tIn well formed XML, there should only be one. TinyXml is tolerant of\n\t\tmultiple elements at the document level.\n\t*/\n\tconst TiXmlElement* RootElement() const\t\t{ return FirstChildElement(); }\n\tTiXmlElement* RootElement()\t\t\t\t\t{ return FirstChildElement(); }\n\n\t/** If an error occurs, Error will be set to true. Also,\n\t\t- The ErrorId() will contain the integer identifier of the error (not generally useful)\n\t\t- The ErrorDesc() method will return the name of the error. (very useful)\n\t\t- The ErrorRow() and ErrorCol() will return the location of the error (if known)\n\t*/\t\n\tbool Error() const\t\t\t\t\t\t{ return error; }\n\n\t/// Contains a textual (english) description of the error if one occurs.\n\tconst char * ErrorDesc() const\t{ return errorDesc.c_str (); }\n\n\t/** Generally, you probably want the error string ( ErrorDesc() ). But if you\n\t\tprefer the ErrorId, this function will fetch it.\n\t*/\n\tint ErrorId()\tconst\t\t\t\t{ return errorId; }\n\n\t/** Returns the location (if known) of the error. The first column is column 1, \n\t\tand the first row is row 1. A value of 0 means the row and column wasn't applicable\n\t\t(memory errors, for example, have no row/column) or the parser lost the error. (An\n\t\terror in the error reporting, in that case.)\n\n\t\t@sa SetTabSize, Row, Column\n\t*/\n\tint ErrorRow() const\t{ return errorLocation.row+1; }\n\tint ErrorCol() const\t{ return errorLocation.col+1; }\t///< The column where the error occurred. See ErrorRow()\n\n\t/** SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol())\n\t\tto report the correct values for row and column. It does not change the output\n\t\tor input in any way.\n\t\t\n\t\tBy calling this method, with a tab size\n\t\tgreater than 0, the row and column of each node and attribute is stored\n\t\twhen the file is loaded. Very useful for tracking the DOM back in to\n\t\tthe source file.\n\n\t\tThe tab size is required for calculating the location of nodes. If not\n\t\tset, the default of 4 is used. The tabsize is set per document. Setting\n\t\tthe tabsize to 0 disables row/column tracking.\n\n\t\tNote that row and column tracking is not supported when using operator>>.\n\n\t\tThe tab size needs to be enabled before the parse or load. Correct usage:\n\t\t@verbatim\n\t\tTiXmlDocument doc;\n\t\tdoc.SetTabSize( 8 );\n\t\tdoc.Load( \"myfile.xml\" );\n\t\t@endverbatim\n\n\t\t@sa Row, Column\n\t*/\n\tvoid SetTabSize( int _tabsize )\t\t{ tabsize = _tabsize; }\n\n\tint TabSize() const\t{ return tabsize; }\n\n\t/** If you have handled the error, it can be reset with this call. The error\n\t\tstate is automatically cleared if you Parse a new XML block.\n\t*/\n\tvoid ClearError()\t\t\t\t\t\t{\terror = false; \n\t\t\t\t\t\t\t\t\t\t\t\terrorId = 0; \n\t\t\t\t\t\t\t\t\t\t\t\terrorDesc = \"\"; \n\t\t\t\t\t\t\t\t\t\t\t\terrorLocation.row = errorLocation.col = 0; \n\t\t\t\t\t\t\t\t\t\t\t\t//errorLocation.last = 0; \n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t/** Write the document to standard out using formatted printing (\"pretty print\"). */\n\tvoid Print() const\t\t\t\t\t\t{ Print( stdout, 0 ); }\n\n\t/* Write the document to a string using formatted printing (\"pretty print\"). This\n\t\twill allocate a character array (new char[]) and return it as a pointer. The\n\t\tcalling code pust call delete[] on the return char* to avoid a memory leak.\n\t*/\n\t//char* PrintToMemory() const; \n\n\t/// Print this Document to a FILE stream.\n\tvirtual void Print( FILE* cfile, int depth = 0 ) const;\n\t// [internal use]\n\tvoid SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );\n\n\tvirtual const TiXmlDocument*    ToDocument()    const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\tvirtual TiXmlDocument*          ToDocument()          { return this; } ///< Cast to a more defined type. Will return null not of the requested type.\n\n\t/** Walk the XML tree visiting this node and all of its children. \n\t*/\n\tvirtual bool Accept( TiXmlVisitor* content ) const;\n\nprotected :\n\t// [internal use]\n\tvirtual TiXmlNode* Clone() const;\n\t#ifdef TIXML_USE_STL\n\tvirtual void StreamIn( std::istream * in, TIXML_STRING * tag );\n\t#endif\n\nprivate:\n\tvoid CopyTo( TiXmlDocument* target ) const;\n\n\tbool error;\n\tint  errorId;\n\tTIXML_STRING errorDesc;\n\tint tabsize;\n\tTiXmlCursor errorLocation;\n\tbool useMicrosoftBOM;\t\t// the UTF-8 BOM were found when read. Note this, and try to write.\n};\n\n\n/**\n\tA TiXmlHandle is a class that wraps a node pointer with null checks; this is\n\tan incredibly useful thing. Note that TiXmlHandle is not part of the TinyXml\n\tDOM structure. It is a separate utility class.\n\n\tTake an example:\n\t@verbatim\n\t<Document>\n\t\t<Element attributeA = \"valueA\">\n\t\t\t<Child attributeB = \"value1\" />\n\t\t\t<Child attributeB = \"value2\" />\n\t\t</Element>\n\t<Document>\n\t@endverbatim\n\n\tAssuming you want the value of \"attributeB\" in the 2nd \"Child\" element, it's very \n\teasy to write a *lot* of code that looks like:\n\n\t@verbatim\n\tTiXmlElement* root = document.FirstChildElement( \"Document\" );\n\tif ( root )\n\t{\n\t\tTiXmlElement* element = root->FirstChildElement( \"Element\" );\n\t\tif ( element )\n\t\t{\n\t\t\tTiXmlElement* child = element->FirstChildElement( \"Child\" );\n\t\t\tif ( child )\n\t\t\t{\n\t\t\t\tTiXmlElement* child2 = child->NextSiblingElement( \"Child\" );\n\t\t\t\tif ( child2 )\n\t\t\t\t{\n\t\t\t\t\t// Finally do something useful.\n\t@endverbatim\n\n\tAnd that doesn't even cover \"else\" cases. TiXmlHandle addresses the verbosity\n\tof such code. A TiXmlHandle checks for null\tpointers so it is perfectly safe \n\tand correct to use:\n\n\t@verbatim\n\tTiXmlHandle docHandle( &document );\n\tTiXmlElement* child2 = docHandle.FirstChild( \"Document\" ).FirstChild( \"Element\" ).Child( \"Child\", 1 ).ToElement();\n\tif ( child2 )\n\t{\n\t\t// do something useful\n\t@endverbatim\n\n\tWhich is MUCH more concise and useful.\n\n\tIt is also safe to copy handles - internally they are nothing more than node pointers.\n\t@verbatim\n\tTiXmlHandle handleCopy = handle;\n\t@endverbatim\n\n\tWhat they should not be used for is iteration:\n\n\t@verbatim\n\tint i=0; \n\twhile ( true )\n\t{\n\t\tTiXmlElement* child = docHandle.FirstChild( \"Document\" ).FirstChild( \"Element\" ).Child( \"Child\", i ).ToElement();\n\t\tif ( !child )\n\t\t\tbreak;\n\t\t// do something\n\t\t++i;\n\t}\n\t@endverbatim\n\n\tIt seems reasonable, but it is in fact two embedded while loops. The Child method is \n\ta linear walk to find the element, so this code would iterate much more than it needs \n\tto. Instead, prefer:\n\n\t@verbatim\n\tTiXmlElement* child = docHandle.FirstChild( \"Document\" ).FirstChild( \"Element\" ).FirstChild( \"Child\" ).ToElement();\n\n\tfor( child; child; child=child->NextSiblingElement() )\n\t{\n\t\t// do something\n\t}\n\t@endverbatim\n*/\nclass TiXmlHandle\n{\npublic:\n\t/// Create a handle from any node (at any depth of the tree.) This can be a null pointer.\n\tTiXmlHandle( TiXmlNode* _node )\t\t\t\t\t{ this->node = _node; }\n\t/// Copy constructor\n\tTiXmlHandle( const TiXmlHandle& ref )\t\t\t{ this->node = ref.node; }\n\tTiXmlHandle operator=( const TiXmlHandle& ref ) { this->node = ref.node; return *this; }\n\n\t/// Return a handle to the first child node.\n\tTiXmlHandle FirstChild() const;\n\t/// Return a handle to the first child node with the given name.\n\tTiXmlHandle FirstChild( const char * value ) const;\n\t/// Return a handle to the first child element.\n\tTiXmlHandle FirstChildElement() const;\n\t/// Return a handle to the first child element with the given name.\n\tTiXmlHandle FirstChildElement( const char * value ) const;\n\n\t/** Return a handle to the \"index\" child with the given name. \n\t\tThe first child is 0, the second 1, etc.\n\t*/\n\tTiXmlHandle Child( const char* value, int index ) const;\n\t/** Return a handle to the \"index\" child. \n\t\tThe first child is 0, the second 1, etc.\n\t*/\n\tTiXmlHandle Child( int index ) const;\n\t/** Return a handle to the \"index\" child element with the given name. \n\t\tThe first child element is 0, the second 1, etc. Note that only TiXmlElements\n\t\tare indexed: other types are not counted.\n\t*/\n\tTiXmlHandle ChildElement( const char* value, int index ) const;\n\t/** Return a handle to the \"index\" child element. \n\t\tThe first child element is 0, the second 1, etc. Note that only TiXmlElements\n\t\tare indexed: other types are not counted.\n\t*/\n\tTiXmlHandle ChildElement( int index ) const;\n\n\t#ifdef TIXML_USE_STL\n\tTiXmlHandle FirstChild( const std::string& _value ) const\t\t\t\t{ return FirstChild( _value.c_str() ); }\n\tTiXmlHandle FirstChildElement( const std::string& _value ) const\t\t{ return FirstChildElement( _value.c_str() ); }\n\n\tTiXmlHandle Child( const std::string& _value, int index ) const\t\t\t{ return Child( _value.c_str(), index ); }\n\tTiXmlHandle ChildElement( const std::string& _value, int index ) const\t{ return ChildElement( _value.c_str(), index ); }\n\t#endif\n\n\t/** Return the handle as a TiXmlNode. This may return null.\n\t*/\n\tTiXmlNode* ToNode() const\t\t\t{ return node; } \n\t/** Return the handle as a TiXmlElement. This may return null.\n\t*/\n\tTiXmlElement* ToElement() const\t\t{ return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); }\n\t/**\tReturn the handle as a TiXmlText. This may return null.\n\t*/\n\tTiXmlText* ToText() const\t\t\t{ return ( ( node && node->ToText() ) ? node->ToText() : 0 ); }\n\t/** Return the handle as a TiXmlUnknown. This may return null.\n\t*/\n\tTiXmlUnknown* ToUnknown() const\t\t{ return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); }\n\n\t/** DEPRECATED: use ToNode. \n\t\tReturn the handle as a TiXmlNode. This may return null.\n\t*/\n\tTiXmlNode* Node() const\t\t\t{ return ToNode(); } \n\t/** DEPRECATED: use ToElement. \n\t\tReturn the handle as a TiXmlElement. This may return null.\n\t*/\n\tTiXmlElement* Element() const\t{ return ToElement(); }\n\t/** DEPRECATED: use ToText()\n\t\tReturn the handle as a TiXmlText. This may return null.\n\t*/\n\tTiXmlText* Text() const\t\t\t{ return ToText(); }\n\t/** DEPRECATED: use ToUnknown()\n\t\tReturn the handle as a TiXmlUnknown. This may return null.\n\t*/\n\tTiXmlUnknown* Unknown() const\t{ return ToUnknown(); }\n\nprivate:\n\tTiXmlNode* node;\n};\n\n\n/** Print to memory functionality. The TiXmlPrinter is useful when you need to:\n\n\t-# Print to memory (especially in non-STL mode)\n\t-# Control formatting (line endings, etc.)\n\n\tWhen constructed, the TiXmlPrinter is in its default \"pretty printing\" mode.\n\tBefore calling Accept() you can call methods to control the printing\n\tof the XML document. After TiXmlNode::Accept() is called, the printed document can\n\tbe accessed via the CStr(), Str(), and Size() methods.\n\n\tTiXmlPrinter uses the Visitor API.\n\t@verbatim\n\tTiXmlPrinter printer;\n\tprinter.SetIndent( \"\\t\" );\n\n\tdoc.Accept( &printer );\n\tfprintf( stdout, \"%s\", printer.CStr() );\n\t@endverbatim\n*/\nclass TiXmlPrinter : public TiXmlVisitor\n{\npublic:\n\tTiXmlPrinter() : depth( 0 ), simpleTextPrint( false ),\n\t\t\t\t\t buffer(), indent( \"    \" ), lineBreak( \"\\n\" ) {}\n\n\tvirtual bool VisitEnter( const TiXmlDocument& doc );\n\tvirtual bool VisitExit( const TiXmlDocument& doc );\n\n\tvirtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute );\n\tvirtual bool VisitExit( const TiXmlElement& element );\n\n\tvirtual bool Visit( const TiXmlDeclaration& declaration );\n\tvirtual bool Visit( const TiXmlText& text );\n\tvirtual bool Visit( const TiXmlComment& comment );\n\tvirtual bool Visit( const TiXmlUnknown& unknown );\n\n\t/** Set the indent characters for printing. By default 4 spaces\n\t\tbut tab (\\\\t) is also useful, or null/empty string for no indentation.\n\t*/\n\tvoid SetIndent( const char* _indent )\t\t\t{ indent = _indent ? _indent : \"\" ; }\n\t/// Query the indention string.\n\tconst char* Indent()\t\t\t\t\t\t\t{ return indent.c_str(); }\n\t/** Set the line breaking string. By default set to newline (\\n). \n\t\tSome operating systems prefer other characters, or can be\n\t\tset to the null/empty string for no indenation.\n\t*/\n\tvoid SetLineBreak( const char* _lineBreak )\t\t{ lineBreak = _lineBreak ? _lineBreak : \"\"; }\n\t/// Query the current line breaking string.\n\tconst char* LineBreak()\t\t\t\t\t\t\t{ return lineBreak.c_str(); }\n\n\t/** Switch over to \"stream printing\" which is the most dense formatting without \n\t\tlinebreaks. Common when the XML is needed for network transmission.\n\t*/\n\tvoid SetStreamPrinting()\t\t\t\t\t\t{ indent = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t  lineBreak = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t/// Return the result.\n\tconst char* CStr()\t\t\t\t\t\t\t\t{ return buffer.c_str(); }\n\t/// Return the length of the result string.\n\tsize_t Size()\t\t\t\t\t\t\t\t\t{ return buffer.size(); }\n\n\t#ifdef TIXML_USE_STL\n\t/// Return the result.\n\tconst std::string& Str()\t\t\t\t\t\t{ return buffer; }\n\t#endif\n\nprivate:\n\tvoid DoIndent()\t{\n\t\tfor( int i=0; i<depth; ++i )\n\t\t\tbuffer += indent;\n\t}\n\tvoid DoLineBreak() {\n\t\tbuffer += lineBreak;\n\t}\n\n\tint depth;\n\tbool simpleTextPrint;\n\tTIXML_STRING buffer;\n\tTIXML_STRING indent;\n\tTIXML_STRING lineBreak;\n};\n\n\n#ifdef _MSC_VER\n#pragma warning( pop )\n#endif\n\n#endif // MADNESS_TINYXML_TINYXML_H__INCLUDED\n\n"
  },
  {
    "path": "src/madness/external/tinyxml/tinyxmlerror.cc",
    "content": "/*\nwww.sourceforge.net/projects/tinyxml\nOriginal code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)\n\nThis software is provided 'as-is', without any express or implied \nwarranty. In no event will the authors be held liable for any \ndamages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any \npurpose, including commercial applications, and to alter it and \nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must\nnot claim that you wrote the original software. If you use this\nsoftware in a product, an acknowledgment in the product documentation\nwould be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and\nmust not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source\ndistribution.\n*/\n\n#include \"tinyxml.h\"\n\n// The goal of the seperate error file is to make the first\n// step towards localization. tinyxml (currently) only supports\n// english error messages, but the could now be translated.\n//\n// It also cleans up the code a bit.\n//\n\nconst char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =\n{\n\t\"No error\",\n\t\"Error\",\n\t\"Failed to open file\",\n\t\"Memory allocation failed.\",\n\t\"Error parsing Element.\",\n\t\"Failed to read Element name\",\n\t\"Error reading Element value.\",\n\t\"Error reading Attributes.\",\n\t\"Error: empty tag.\",\n\t\"Error reading end tag.\",\n\t\"Error parsing Unknown.\",\n\t\"Error parsing Comment.\",\n\t\"Error parsing Declaration.\",\n\t\"Error document empty.\",\n\t\"Error null (0) or unexpected EOF found in input stream.\",\n\t\"Error parsing CDATA.\",\n\t\"Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.\",\n};\n"
  },
  {
    "path": "src/madness/external/tinyxml/tinyxmlparser.cc",
    "content": "/*\nwww.sourceforge.net/projects/tinyxml\nOriginal code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com)\n\nThis software is provided 'as-is', without any express or implied \nwarranty. In no event will the authors be held liable for any \ndamages arising from the use of this software.\n\nPermission is granted to anyone to use this software for any \npurpose, including commercial applications, and to alter it and \nredistribute it freely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must \nnot claim that you wrote the original software. If you use this\nsoftware in a product, an acknowledgment in the product documentation\nwould be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and \nmust not be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source \ndistribution.\n*/\n\n#include <ctype.h>\n#include <stddef.h>\n\n#include \"tinyxml.h\"\n\n//#define DEBUG_PARSER\n#if defined( DEBUG_PARSER )\n#\tif defined( DEBUG ) && defined( _MSC_VER )\n#\t\tinclude <windows.h>\n#\t\tdefine TIXML_LOG OutputDebugString\n#\telse\n#\t\tdefine TIXML_LOG printf\n#\tendif\n#endif\n\n// Note tha \"PutString\" hardcodes the same list. This\n// is less flexible than it appears. Changing the entries\n// or order will break putstring.\t\nTiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] = \n{\n\t{ \"&amp;\",  5, '&' },\n\t{ \"&lt;\",   4, '<' },\n\t{ \"&gt;\",   4, '>' },\n\t{ \"&quot;\", 6, '\\\"' },\n\t{ \"&apos;\", 6, '\\'' }\n};\n\n// Bunch of unicode info at:\n//\t\thttp://www.unicode.org/faq/utf_bom.html\n// Including the basic of this table, which determines the #bytes in the\n// sequence from the lead byte. 1 placed for invalid sequences --\n// although the result will be junk, pass it through as much as possible.\n// Beware of the non-characters in UTF-8:\t\n//\t\t\t\tef bb bf (Microsoft \"lead bytes\")\n//\t\t\t\tef bf be\n//\t\t\t\tef bf bf \n\nconst unsigned char TIXML_UTF_LEAD_0 = 0xefU;\nconst unsigned char TIXML_UTF_LEAD_1 = 0xbbU;\nconst unsigned char TIXML_UTF_LEAD_2 = 0xbfU;\n\nconst int TiXmlBase::utf8ByteTable[256] = \n{\n\t//\t0\t1\t2\t3\t4\t5\t6\t7\t8\t9\ta\tb\tc\td\te\tf\n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0x00\n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0x10\n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0x20\n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0x30\n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0x40\n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0x50\n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0x60\n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0x70\tEnd of ASCII range\n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0x80 0x80 to 0xc1 invalid\n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0x90 \n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0xa0 \n\t\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t// 0xb0 \n\t\t1,\t1,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t// 0xc0 0xc2 to 0xdf 2 byte\n\t\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t2,\t// 0xd0\n\t\t3,\t3,\t3,\t3,\t3,\t3,\t3,\t3,\t3,\t3,\t3,\t3,\t3,\t3,\t3,\t3,\t// 0xe0 0xe0 to 0xef 3 byte\n\t\t4,\t4,\t4,\t4,\t4,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1,\t1\t// 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid\n};\n\n\nvoid TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length )\n{\n\tconst unsigned long BYTE_MASK = 0xBF;\n\tconst unsigned long BYTE_MARK = 0x80;\n\tconst unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };\n\n\tif (input < 0x80) \n\t\t*length = 1;\n\telse if ( input < 0x800 )\n\t\t*length = 2;\n\telse if ( input < 0x10000 )\n\t\t*length = 3;\n\telse if ( input < 0x200000 )\n\t\t*length = 4;\n\telse\n\t\t{ *length = 0; return; }\t// This code won't covert this correctly anyway.\n\n\toutput += *length;\n\n\t// Scary scary fall throughs.\n\tswitch (*length) \n\t{\n\t\tcase 4:\n\t\t\t--output; \n\t\t\t*output = (char)((input | BYTE_MARK) & BYTE_MASK); \n\t\t\tinput >>= 6;\n\t\tcase 3:\n\t\t\t--output; \n\t\t\t*output = (char)((input | BYTE_MARK) & BYTE_MASK); \n\t\t\tinput >>= 6;\n\t\tcase 2:\n\t\t\t--output; \n\t\t\t*output = (char)((input | BYTE_MARK) & BYTE_MASK); \n\t\t\tinput >>= 6;\n\t\tcase 1:\n\t\t\t--output; \n\t\t\t*output = (char)(input | FIRST_BYTE_MARK[*length]);\n\t}\n}\n\n\n/*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ )\n{\n\t// This will only work for low-ascii, everything else is assumed to be a valid\n\t// letter. I'm not sure this is the best approach, but it is quite tricky trying\n\t// to figure out alhabetical vs. not across encoding. So take a very \n\t// conservative approach.\n\n//\tif ( encoding == TIXML_ENCODING_UTF8 )\n//\t{\n\t\tif ( anyByte < 127 )\n\t\t\treturn isalpha( anyByte );\n\t\telse\n\t\t\treturn 1;\t// What else to do? The unicode set is huge...get the english ones right.\n//\t}\n//\telse\n//\t{\n//\t\treturn isalpha( anyByte );\n//\t}\n}\n\n\n/*static*/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding /*encoding*/ )\n{\n\t// This will only work for low-ascii, everything else is assumed to be a valid\n\t// letter. I'm not sure this is the best approach, but it is quite tricky trying\n\t// to figure out alhabetical vs. not across encoding. So take a very \n\t// conservative approach.\n\n//\tif ( encoding == TIXML_ENCODING_UTF8 )\n//\t{\n\t\tif ( anyByte < 127 )\n\t\t\treturn isalnum( anyByte );\n\t\telse\n\t\t\treturn 1;\t// What else to do? The unicode set is huge...get the english ones right.\n//\t}\n//\telse\n//\t{\n//\t\treturn isalnum( anyByte );\n//\t}\n}\n\n\nclass TiXmlParsingData\n{\n\tfriend class TiXmlDocument;\n  public:\n\tvoid Stamp( const char* now, TiXmlEncoding encoding );\n\n\tconst TiXmlCursor& Cursor()\t{ return cursor; }\n\n  private:\n\t// Only used by the document!\n\tTiXmlParsingData( const char* start, int _tabsize, int row, int col )\n\t{\n\t\tassert( start );\n\t\tstamp = start;\n\t\ttabsize = _tabsize;\n\t\tcursor.row = row;\n\t\tcursor.col = col;\n\t}\n\n\tTiXmlCursor\t\tcursor;\n\tconst char*\t\tstamp;\n\tint\t\t\t\ttabsize;\n};\n\n\nvoid TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )\n{\n\tassert( now );\n\n\t// Do nothing if the tabsize is 0.\n\tif ( tabsize < 1 )\n\t{\n\t\treturn;\n\t}\n\n\t// Get the current row, column.\n\tint row = cursor.row;\n\tint col = cursor.col;\n\tconst char* p = stamp;\n\tassert( p );\n\n\twhile ( p < now )\n\t{\n\t\t// Treat p as unsigned, so we have a happy compiler.\n\t\tconst unsigned char* pU = (const unsigned char*)p;\n\n\t\t// Code contributed by Fletcher Dunn: (modified by lee)\n\t\tswitch (*pU) {\n\t\t\tcase 0:\n\t\t\t\t// We *should* never get here, but in case we do, don't\n\t\t\t\t// advance past the terminating null character, ever\n\t\t\t\treturn;\n\n\t\t\tcase '\\r':\n\t\t\t\t// bump down to the next line\n\t\t\t\t++row;\n\t\t\t\tcol = 0;\t\t\t\t\n\t\t\t\t// Eat the character\n\t\t\t\t++p;\n\n\t\t\t\t// Check for \\r\\n sequence, and treat this as a single character\n\t\t\t\tif (*p == '\\n') {\n\t\t\t\t\t++p;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '\\n':\n\t\t\t\t// bump down to the next line\n\t\t\t\t++row;\n\t\t\t\tcol = 0;\n\n\t\t\t\t// Eat the character\n\t\t\t\t++p;\n\n\t\t\t\t// Check for \\n\\r sequence, and treat this as a single\n\t\t\t\t// character.  (Yes, this bizarre thing does occur still\n\t\t\t\t// on some arcane platforms...)\n\t\t\t\tif (*p == '\\r') {\n\t\t\t\t\t++p;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase '\\t':\n\t\t\t\t// Eat the character\n\t\t\t\t++p;\n\n\t\t\t\t// Skip to next tab stop\n\t\t\t\tcol = (col / tabsize + 1) * tabsize;\n\t\t\t\tbreak;\n\n\t\t\tcase TIXML_UTF_LEAD_0:\n\t\t\t\tif ( encoding == TIXML_ENCODING_UTF8 )\n\t\t\t\t{\n\t\t\t\t\tif ( *(p+1) && *(p+2) )\n\t\t\t\t\t{\n\t\t\t\t\t\t// In these cases, don't advance the column. These are\n\t\t\t\t\t\t// 0-width spaces.\n\t\t\t\t\t\tif ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 )\n\t\t\t\t\t\t\tp += 3;\t\n\t\t\t\t\t\telse if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU )\n\t\t\t\t\t\t\tp += 3;\t\n\t\t\t\t\t\telse if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU )\n\t\t\t\t\t\t\tp += 3;\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{ p +=3; ++col; }\t// A normal character.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++p;\n\t\t\t\t\t++col;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tif ( encoding == TIXML_ENCODING_UTF8 )\n\t\t\t\t{\n\t\t\t\t\t// Eat the 1 to 4 byte utf8 character.\n\t\t\t\t\tint step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)];\n\t\t\t\t\tif ( step == 0 )\n\t\t\t\t\t\tstep = 1;\t\t// Error case from bad encoding, but handle gracefully.\n\t\t\t\t\tp += step;\n\n\t\t\t\t\t// Just advance one column, of course.\n\t\t\t\t\t++col;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++p;\n\t\t\t\t\t++col;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tcursor.row = row;\n\tcursor.col = col;\n\tassert( cursor.row >= -1 );\n\tassert( cursor.col >= -1 );\n\tstamp = p;\n\tassert( stamp );\n}\n\n\nconst char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding )\n{\n\tif ( !p || !*p )\n\t{\n\t\treturn 0;\n\t}\n\tif ( encoding == TIXML_ENCODING_UTF8 )\n\t{\n\t\twhile ( *p )\n\t\t{\n\t\t\tconst unsigned char* pU = (const unsigned char*)p;\n\t\t\t\n\t\t\t// Skip the stupid Microsoft UTF-8 Byte order marks\n\t\t\tif (\t*(pU+0)==TIXML_UTF_LEAD_0\n\t\t\t\t && *(pU+1)==TIXML_UTF_LEAD_1 \n\t\t\t\t && *(pU+2)==TIXML_UTF_LEAD_2 )\n\t\t\t{\n\t\t\t\tp += 3;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(*(pU+0)==TIXML_UTF_LEAD_0\n\t\t\t\t && *(pU+1)==0xbfU\n\t\t\t\t && *(pU+2)==0xbeU )\n\t\t\t{\n\t\t\t\tp += 3;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(*(pU+0)==TIXML_UTF_LEAD_0\n\t\t\t\t && *(pU+1)==0xbfU\n\t\t\t\t && *(pU+2)==0xbfU )\n\t\t\t{\n\t\t\t\tp += 3;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( IsWhiteSpace( *p ) || *p == '\\n' || *p =='\\r' )\t\t// Still using old rules for white space.\n\t\t\t\t++p;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t{\n            while ( (*p) && (IsWhiteSpace( *p ) || *p == '\\n' || *p =='\\r') )\n\t\t\t++p;\n\t}\n\n\treturn p;\n}\n\n#ifdef TIXML_USE_STL\n/*static*/ bool TiXmlBase::StreamWhiteSpace( std::istream * in, TIXML_STRING * tag )\n{\n\tfor( ;; )\n\t{\n\t\tif ( !in->good() ) return false;\n\n\t\tint c = in->peek();\n\t\t// At this scope, we can't get to a document. So fail silently.\n\t\tif ( !IsWhiteSpace( c ) || c <= 0 )\n\t\t\treturn true;\n\n\t\t*tag += (char) in->get();\n\t}\n}\n\n/*static*/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag )\n{\n\t//assert( character > 0 && character < 128 );\t// else it won't work in utf-8\n\twhile ( in->good() )\n\t{\n\t\tint c = in->peek();\n\t\tif ( c == character )\n\t\t\treturn true;\n\t\tif ( c <= 0 )\t\t// Silent failure: can't get document at this scope\n\t\t\treturn false;\n\n\t\tin->get();\n\t\t*tag += (char) c;\n\t}\n\treturn false;\n}\n#endif\n\n// One of TinyXML's more performance demanding functions. Try to keep the memory overhead down. The\n// \"assign\" optimization removes over 10% of the execution time.\n//\nconst char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding )\n{\n\t// Oddly, not supported on some comilers,\n\t//name->clear();\n\t// So use this:\n\t*name = \"\";\n\tassert( p );\n\n\t// Names start with letters or underscores.\n\t// Of course, in unicode, tinyxml has no idea what a letter *is*. The\n\t// algorithm is generous.\n\t//\n\t// After that, they can be letters, underscores, numbers,\n\t// hyphens, or colons. (Colons are valid ony for namespaces,\n\t// but tinyxml can't tell namespaces from names.)\n\tif (    p && *p \n\t\t && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) )\n\t{\n\t\tconst char* start = p;\n\t\twhile(\t\tp && *p\n\t\t\t\t&&\t(\t\tIsAlphaNum( (unsigned char ) *p, encoding ) \n\t\t\t\t\t\t || *p == '_'\n\t\t\t\t\t\t || *p == '-'\n\t\t\t\t\t\t || *p == '.'\n\t\t\t\t\t\t || *p == ':' ) )\n\t\t{\n\t\t\t//(*name) += *p; // expensive\n\t\t\t++p;\n\t\t}\n\t\tif ( p-start > 0 ) {\n\t\t\tname->assign( start, p-start );\n\t\t}\n\t\treturn p;\n\t}\n\treturn 0;\n}\n\nconst char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding )\n{\n\t// Presume an entity, and pull it out.\n    TIXML_STRING ent;\n\tint i;\n\t*length = 0;\n\n\tif ( *(p+1) && *(p+1) == '#' && *(p+2) )\n\t{\n\t\tunsigned long ucs = 0;\n\t\tptrdiff_t delta = 0;\n\t\tunsigned mult = 1;\n\n\t\tif ( *(p+2) == 'x' )\n\t\t{\n\t\t\t// Hexadecimal.\n\t\t\tif ( !*(p+3) ) return 0;\n\n\t\t\tconst char* q = p+3;\n\t\t\tq = strchr( q, ';' );\n\n\t\t\tif ( !q || !*q ) return 0;\n\n\t\t\tdelta = q-p;\n\t\t\t--q;\n\n\t\t\twhile ( *q != 'x' )\n\t\t\t{\n\t\t\t\tif ( *q >= '0' && *q <= '9' )\n\t\t\t\t\tucs += mult * (*q - '0');\n\t\t\t\telse if ( *q >= 'a' && *q <= 'f' )\n\t\t\t\t\tucs += mult * (*q - 'a' + 10);\n\t\t\t\telse if ( *q >= 'A' && *q <= 'F' )\n\t\t\t\t\tucs += mult * (*q - 'A' + 10 );\n\t\t\t\telse \n\t\t\t\t\treturn 0;\n\t\t\t\tmult *= 16;\n\t\t\t\t--q;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Decimal.\n\t\t\tif ( !*(p+2) ) return 0;\n\n\t\t\tconst char* q = p+2;\n\t\t\tq = strchr( q, ';' );\n\n\t\t\tif ( !q || !*q ) return 0;\n\n\t\t\tdelta = q-p;\n\t\t\t--q;\n\n\t\t\twhile ( *q != '#' )\n\t\t\t{\n\t\t\t\tif ( *q >= '0' && *q <= '9' )\n\t\t\t\t\tucs += mult * (*q - '0');\n\t\t\t\telse \n\t\t\t\t\treturn 0;\n\t\t\t\tmult *= 10;\n\t\t\t\t--q;\n\t\t\t}\n\t\t}\n\t\tif ( encoding == TIXML_ENCODING_UTF8 )\n\t\t{\n\t\t\t// convert the UCS to UTF-8\n\t\t\tConvertUTF32ToUTF8( ucs, value, length );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t*value = (char)ucs;\n\t\t\t*length = 1;\n\t\t}\n\t\treturn p + delta + 1;\n\t}\n\n\t// Now try to match it.\n\tfor( i=0; i<NUM_ENTITY; ++i )\n\t{\n\t\tif ( strncmp( entity[i].str, p, entity[i].strLength ) == 0 )\n\t\t{\n\t\t\tassert( strlen( entity[i].str ) == entity[i].strLength );\n\t\t\t*value = entity[i].chr;\n\t\t\t*length = 1;\n\t\t\treturn ( p + entity[i].strLength );\n\t\t}\n\t}\n\n\t// So it wasn't an entity, its unrecognized, or something like that.\n\t*value = *p;\t// Don't put back the last one, since we return it!\n\t//*length = 1;\t// Leave unrecognized entities - this doesn't really work.\n\t\t\t\t\t// Just writes strange XML.\n\treturn p+1;\n}\n\n\nbool TiXmlBase::StringEqual( const char* p,\n\t\t\t\t\t\t\t const char* tag,\n\t\t\t\t\t\t\t bool ignoreCase,\n\t\t\t\t\t\t\t TiXmlEncoding encoding )\n{\n\tassert( p );\n\tassert( tag );\n\tif ( !p || !*p )\n\t{\n\t\tassert( 0 );\n\t\treturn false;\n\t}\n\n\tconst char* q = p;\n\n\tif ( ignoreCase )\n\t{\n\t\twhile ( *q && *tag && ToLower( *q, encoding ) == ToLower( *tag, encoding ) )\n\t\t{\n\t\t\t++q;\n\t\t\t++tag;\n\t\t}\n\n\t\tif ( *tag == 0 )\n\t\t\treturn true;\n\t}\n\telse\n\t{\n\t\twhile ( *q && *tag && *q == *tag )\n\t\t{\n\t\t\t++q;\n\t\t\t++tag;\n\t\t}\n\n\t\tif ( *tag == 0 )\t\t// Have we found the end of the tag, and everything equal?\n\t\t\treturn true;\n\t}\n\treturn false;\n}\n\nconst char* TiXmlBase::ReadText(\tconst char* p, \n\t\t\t\t\t\t\t\t\tTIXML_STRING * text, \n\t\t\t\t\t\t\t\t\tbool trimWhiteSpace, \n\t\t\t\t\t\t\t\t\tconst char* endTag, \n\t\t\t\t\t\t\t\t\tbool caseInsensitive,\n\t\t\t\t\t\t\t\t\tTiXmlEncoding encoding )\n{\n    *text = \"\";\n\tif (    !trimWhiteSpace\t\t\t// certain tags always keep whitespace\n\t\t || !condenseWhiteSpace )\t// if true, whitespace is always kept\n\t{\n\t\t// Keep all the white space.\n\t\twhile (\t   p && *p\n\t\t\t\t&& !StringEqual( p, endTag, caseInsensitive, encoding )\n\t\t\t  )\n\t\t{\n\t\t\tint len;\n\t\t\tchar cArr[4] = { 0, 0, 0, 0 };\n\t\t\tp = GetChar( p, cArr, &len, encoding );\n\t\t\ttext->append( cArr, len );\n\t\t}\n\t}\n\telse\n\t{\n\t\tbool whitespace = false;\n\n\t\t// Remove leading white space:\n\t\tp = SkipWhiteSpace( p, encoding );\n\t\twhile (\t   p && *p\n\t\t\t\t&& !StringEqual( p, endTag, caseInsensitive, encoding ) )\n\t\t{\n\t\t\tif ( *p == '\\r' || *p == '\\n' )\n\t\t\t{\n\t\t\t\twhitespace = true;\n\t\t\t\t++p;\n\t\t\t}\n\t\t\telse if ( IsWhiteSpace( *p ) )\n\t\t\t{\n\t\t\t\twhitespace = true;\n\t\t\t\t++p;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// If we've found whitespace, add it before the\n\t\t\t\t// new character. Any whitespace just becomes a space.\n\t\t\t\tif ( whitespace )\n\t\t\t\t{\n\t\t\t\t\t(*text) += ' ';\n\t\t\t\t\twhitespace = false;\n\t\t\t\t}\n\t\t\t\tint len;\n\t\t\t\tchar cArr[4] = { 0, 0, 0, 0 };\n\t\t\t\tp = GetChar( p, cArr, &len, encoding );\n\t\t\t\tif ( len == 1 )\n\t\t\t\t\t(*text) += cArr[0];\t// more efficient\n\t\t\t\telse\n\t\t\t\t\ttext->append( cArr, len );\n\t\t\t}\n\t\t}\n\t}\n\tif ( p ) \n\t\tp += strlen( endTag );\n\treturn p;\n}\n\n#ifdef TIXML_USE_STL\n\nvoid TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag )\n{\n\t// The basic issue with a document is that we don't know what we're\n\t// streaming. Read something presumed to be a tag (and hope), then\n\t// identify it, and call the appropriate stream method on the tag.\n\t//\n\t// This \"pre-streaming\" will never read the closing \">\" so the\n\t// sub-tag can orient itself.\n\n\tif ( !StreamTo( in, '<', tag ) ) \n\t{\n\t\tSetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn;\n\t}\n\n\twhile ( in->good() )\n\t{\n\t\tint tagIndex = (int) tag->length();\n\t\twhile ( in->good() && in->peek() != '>' )\n\t\t{\n\t\t\tint c = in->get();\n\t\t\tif ( c <= 0 )\n\t\t\t{\n\t\t\t\tSetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t(*tag) += (char) c;\n\t\t}\n\n\t\tif ( in->good() )\n\t\t{\n\t\t\t// We now have something we presume to be a node of \n\t\t\t// some sort. Identify it, and call the node to\n\t\t\t// continue streaming.\n\t\t\tTiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING );\n\n\t\t\tif ( node )\n\t\t\t{\n\t\t\t\tnode->StreamIn( in, tag );\n\t\t\t\tbool isElement = node->ToElement() != 0;\n\t\t\t\tdelete node;\n\t\t\t\tnode = 0;\n\n\t\t\t\t// If this is the root element, we're done. Parsing will be\n\t\t\t\t// done by the >> operator.\n\t\t\t\tif ( isElement )\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\t// We should have returned sooner.\n\tSetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN );\n}\n\n#endif\n\nconst char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding )\n{\n\tClearError();\n\n\t// Parse away, at the document level. Since a document\n\t// contains nothing but other tags, most of what happens\n\t// here is skipping white space.\n\tif ( !p || !*p )\n\t{\n\t\tSetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn 0;\n\t}\n\n\t// Note that, for a document, this needs to come\n\t// before the while space skip, so that parsing\n\t// starts from the pointer we are given.\n\tlocation.Clear();\n\tif ( prevData )\n\t{\n\t\tlocation.row = prevData->cursor.row;\n\t\tlocation.col = prevData->cursor.col;\n\t}\n\telse\n\t{\n\t\tlocation.row = 0;\n\t\tlocation.col = 0;\n\t}\n\tTiXmlParsingData data( p, TabSize(), location.row, location.col );\n\tlocation = data.Cursor();\n\n\tif ( encoding == TIXML_ENCODING_UNKNOWN )\n\t{\n\t\t// Check for the Microsoft UTF-8 lead bytes.\n\t\tconst unsigned char* pU = (const unsigned char*)p;\n\t\tif (\t*(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0\n\t\t\t && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1\n\t\t\t && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 )\n\t\t{\n\t\t\tencoding = TIXML_ENCODING_UTF8;\n\t\t\tuseMicrosoftBOM = true;\n\t\t}\n\t}\n\n    p = SkipWhiteSpace( p, encoding );\n\tif ( !p )\n\t{\n\t\tSetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\treturn 0;\n\t}\n\n\twhile ( p && *p )\n\t{\n\t\tTiXmlNode* node = Identify( p, encoding );\n\t\tif ( node )\n\t\t{\n\t\t\tp = node->Parse( p, &data, encoding );\n\t\t\tLinkEndChild( node );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbreak;\n\t\t}\n\n\t\t// Did we get encoding info?\n\t\tif (    encoding == TIXML_ENCODING_UNKNOWN\n\t\t\t && node->ToDeclaration() )\n\t\t{\n\t\t\tTiXmlDeclaration* dec = node->ToDeclaration();\n\t\t\tconst char* enc = dec->Encoding();\n\t\t\tassert( enc );\n\n\t\t\tif ( *enc == 0 )\n\t\t\t\tencoding = TIXML_ENCODING_UTF8;\n\t\t\telse if ( StringEqual( enc, \"UTF-8\", true, TIXML_ENCODING_UNKNOWN ) )\n\t\t\t\tencoding = TIXML_ENCODING_UTF8;\n\t\t\telse if ( StringEqual( enc, \"UTF8\", true, TIXML_ENCODING_UNKNOWN ) )\n\t\t\t\tencoding = TIXML_ENCODING_UTF8;\t// incorrect, but be nice\n\t\t\telse \n\t\t\t\tencoding = TIXML_ENCODING_LEGACY;\n\t\t}\n\n\t\tp = SkipWhiteSpace( p, encoding );\n\t}\n\n\t// Was this empty?\n\tif ( !firstChild ) {\n\t\tSetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding );\n\t\treturn 0;\n\t}\n\n\t// All is well.\n\treturn p;\n}\n\nvoid TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding )\n{\t\n\t// The first error in a chain is more accurate - don't set again!\n\tif ( error )\n\t\treturn;\n\n\tassert( err > 0 && err < TIXML_ERROR_STRING_COUNT );\n\terror   = true;\n\terrorId = err;\n\terrorDesc = errorString[ errorId ];\n\n\terrorLocation.Clear();\n\tif ( pError && data )\n\t{\n\t\tdata->Stamp( pError, encoding );\n\t\terrorLocation = data->Cursor();\n\t}\n}\n\n\nTiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding )\n{\n\tTiXmlNode* returnNode = 0;\n\n\tp = SkipWhiteSpace( p, encoding );\n\tif( !p || !*p || *p != '<' )\n\t{\n\t\treturn 0;\n\t}\n\n\tTiXmlDocument* doc = GetDocument();\n\tp = SkipWhiteSpace( p, encoding );\n\n\tif ( !p || !*p )\n\t{\n\t\treturn 0;\n\t}\n\n\t// What is this thing? \n\t// - Elements start with a letter or underscore, but xml is reserved.\n\t// - Comments: <!--\n\t// - Decleration: <?xml\n\t// - Everthing else is unknown to tinyxml.\n\t//\n\n\tconst char* xmlHeader = { \"<?xml\" };\n\tconst char* commentHeader = { \"<!--\" };\n\tconst char* dtdHeader = { \"<!\" };\n\tconst char* cdataHeader = { \"<![CDATA[\" };\n\n\tif ( StringEqual( p, xmlHeader, true, encoding ) )\n\t{\n\t\t#ifdef DEBUG_PARSER\n\t\t\tTIXML_LOG( \"XML parsing Declaration\\n\" );\n\t\t#endif\n\t\treturnNode = new TiXmlDeclaration();\n\t}\n\telse if ( StringEqual( p, commentHeader, false, encoding ) )\n\t{\n\t\t#ifdef DEBUG_PARSER\n\t\t\tTIXML_LOG( \"XML parsing Comment\\n\" );\n\t\t#endif\n\t\treturnNode = new TiXmlComment();\n\t}\n\telse if ( StringEqual( p, cdataHeader, false, encoding ) )\n\t{\n\t\t#ifdef DEBUG_PARSER\n\t\t\tTIXML_LOG( \"XML parsing CDATA\\n\" );\n\t\t#endif\n\t\tTiXmlText* text = new TiXmlText( \"\" );\n\t\ttext->SetCDATA( true );\n\t\treturnNode = text;\n\t}\n\telse if ( StringEqual( p, dtdHeader, false, encoding ) )\n\t{\n\t\t#ifdef DEBUG_PARSER\n\t\t\tTIXML_LOG( \"XML parsing Unknown(1)\\n\" );\n\t\t#endif\n\t\treturnNode = new TiXmlUnknown();\n\t}\n\telse if (    IsAlpha( *(p+1), encoding )\n\t\t\t  || *(p+1) == '_' )\n\t{\n\t\t#ifdef DEBUG_PARSER\n\t\t\tTIXML_LOG( \"XML parsing Element\\n\" );\n\t\t#endif\n\t\treturnNode = new TiXmlElement( \"\" );\n\t}\n\telse\n\t{\n\t\t#ifdef DEBUG_PARSER\n\t\t\tTIXML_LOG( \"XML parsing Unknown(2)\\n\" );\n\t\t#endif\n\t\treturnNode = new TiXmlUnknown();\n\t}\n\n\tif ( returnNode )\n\t{\n\t\t// Set the parent, so it can report errors\n\t\treturnNode->parent = this;\n\t}\n\telse\n\t{\n\t\tif ( doc )\n\t\t\tdoc->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t}\n\treturn returnNode;\n}\n\n#ifdef TIXML_USE_STL\n\nvoid TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)\n{\n\t// We're called with some amount of pre-parsing. That is, some of \"this\"\n\t// element is in \"tag\". Go ahead and stream to the closing \">\"\n\twhile( in->good() )\n\t{\n\t\tint c = in->get();\n\t\tif ( c <= 0 )\n\t\t{\n\t\t\tTiXmlDocument* document = GetDocument();\n\t\t\tif ( document )\n\t\t\t\tdocument->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\t\treturn;\n\t\t}\n\t\t(*tag) += (char) c ;\n\t\t\n\t\tif ( c == '>' )\n\t\t\tbreak;\n\t}\n\n\tif ( tag->length() < 3 ) return;\n\n\t// Okay...if we are a \"/>\" tag, then we're done. We've read a complete tag.\n\t// If not, identify and stream.\n\n\tif (    tag->at( tag->length() - 1 ) == '>' \n\t\t && tag->at( tag->length() - 2 ) == '/' )\n\t{\n\t\t// All good!\n\t\treturn;\n\t}\n\telse if ( tag->at( tag->length() - 1 ) == '>' )\n\t{\n\t\t// There is more. Could be:\n\t\t//\t\ttext\n\t\t//\t\tcdata text (which looks like another node)\n\t\t//\t\tclosing tag\n\t\t//\t\tanother node.\n\t\tfor ( ;; )\n\t\t{\n\t\t\tStreamWhiteSpace( in, tag );\n\n\t\t\t// Do we have text?\n\t\t\tif ( in->good() && in->peek() != '<' ) \n\t\t\t{\n\t\t\t\t// Yep, text.\n\t\t\t\tTiXmlText text( \"\" );\n\t\t\t\ttext.StreamIn( in, tag );\n\n\t\t\t\t// What follows text is a closing tag or another node.\n\t\t\t\t// Go around again and figure it out.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// We now have either a closing tag...or another node.\n\t\t\t// We should be at a \"<\", regardless.\n\t\t\tif ( !in->good() ) return;\n\t\t\tassert( in->peek() == '<' );\n\t\t\tint tagIndex = (int) tag->length();\n\n\t\t\tbool closingTag = false;\n\t\t\tbool firstCharFound = false;\n\n\t\t\tfor( ;; )\n\t\t\t{\n\t\t\t\tif ( !in->good() )\n\t\t\t\t\treturn;\n\n\t\t\t\tint c = in->peek();\n\t\t\t\tif ( c <= 0 )\n\t\t\t\t{\n\t\t\t\t\tTiXmlDocument* document = GetDocument();\n\t\t\t\t\tif ( document )\n\t\t\t\t\t\tdocument->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( c == '>' )\n\t\t\t\t\tbreak;\n\n\t\t\t\t*tag += (char) c;\n\t\t\t\tin->get();\n\n\t\t\t\t// Early out if we find the CDATA id.\n\t\t\t\tif ( c == '[' && tag->size() >= 9 )\n\t\t\t\t{\n\t\t\t\t\tsize_t len = tag->size();\n\t\t\t\t\tconst char* start = tag->c_str() + len - 9;\n\t\t\t\t\tif ( strcmp( start, \"<![CDATA[\" ) == 0 ) {\n\t\t\t\t\t\tassert( !closingTag );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( !firstCharFound && c != '<' && !IsWhiteSpace( c ) )\n\t\t\t\t{\n\t\t\t\t\tfirstCharFound = true;\n\t\t\t\t\tif ( c == '/' )\n\t\t\t\t\t\tclosingTag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If it was a closing tag, then read in the closing '>' to clean up the input stream.\n\t\t\t// If it was not, the streaming will be done by the tag.\n\t\t\tif ( closingTag )\n\t\t\t{\n\t\t\t\tif ( !in->good() )\n\t\t\t\t\treturn;\n\n\t\t\t\tint c = in->get();\n\t\t\t\tif ( c <= 0 )\n\t\t\t\t{\n\t\t\t\t\tTiXmlDocument* document = GetDocument();\n\t\t\t\t\tif ( document )\n\t\t\t\t\t\tdocument->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tassert( c == '>' );\n\t\t\t\t*tag += (char) c;\n\n\t\t\t\t// We are done, once we've found our closing tag.\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// If not a closing tag, id it, and stream.\n\t\t\t\tconst char* tagloc = tag->c_str() + tagIndex;\n\t\t\t\tTiXmlNode* node = Identify( tagloc, TIXML_DEFAULT_ENCODING );\n\t\t\t\tif ( !node )\n\t\t\t\t\treturn;\n\t\t\t\tnode->StreamIn( in, tag );\n\t\t\t\tdelete node;\n\t\t\t\tnode = 0;\n\n\t\t\t\t// No return: go around from the beginning: text, closing tag, or node.\n\t\t\t}\n\t\t}\n\t}\n}\n#endif\n\nconst char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )\n{\n\tp = SkipWhiteSpace( p, encoding );\n\tTiXmlDocument* document = GetDocument();\n\n\tif ( !p || !*p )\n\t{\n\t\tif ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, 0, 0, encoding );\n\t\treturn 0;\n\t}\n\n\tif ( data )\n\t{\n\t\tdata->Stamp( p, encoding );\n\t\tlocation = data->Cursor();\n\t}\n\n\tif ( *p != '<' )\n\t{\n\t\tif ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, p, data, encoding );\n\t\treturn 0;\n\t}\n\n\tp = SkipWhiteSpace( p+1, encoding );\n\n\t// Read the name.\n\tconst char* pErr = p;\n\n    p = ReadName( p, &value, encoding );\n\tif ( !p || !*p )\n\t{\n\t\tif ( document )\tdocument->SetError( TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, pErr, data, encoding );\n\t\treturn 0;\n\t}\n\n    TIXML_STRING endTag (\"</\");\n\tendTag += value;\n\tendTag += \">\";\n\n\t// Check for and read attributes. Also look for an empty\n\t// tag or an end tag.\n\twhile ( p && *p )\n\t{\n\t\tpErr = p;\n\t\tp = SkipWhiteSpace( p, encoding );\n\t\tif ( !p || !*p )\n\t\t{\n\t\t\tif ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding );\n\t\t\treturn 0;\n\t\t}\n\t\tif ( *p == '/' )\n\t\t{\n\t\t\t++p;\n\t\t\t// Empty tag.\n\t\t\tif ( *p  != '>' )\n\t\t\t{\n\t\t\t\tif ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding );\t\t\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn (p+1);\n\t\t}\n\t\telse if ( *p == '>' )\n\t\t{\n\t\t\t// Done with attributes (if there were any.)\n\t\t\t// Read the value -- which can include other\n\t\t\t// elements -- read the end tag, and return.\n\t\t\t++p;\n\t\t\tp = ReadValue( p, data, encoding );\t\t// Note this is an Element method, and will set the error if one happens.\n\t\t\tif ( !p || !*p ) {\n\t\t\t\t// We were looking for the end tag, but found nothing.\n\t\t\t\t// Fix for [ 1663758 ] Failure to report error on bad XML\n\t\t\t\tif ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding );\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t// We should find the end tag now\n\t\t\tif ( StringEqual( p, endTag.c_str(), false, encoding ) )\n\t\t\t{\n\t\t\t\tp += endTag.length();\n\t\t\t\treturn p;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding );\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Try to read an attribute:\n\t\t\tTiXmlAttribute* attrib = new TiXmlAttribute();\n\t\t\tif ( !attrib )\n\t\t\t{\n\t\t\t\tif ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, pErr, data, encoding );\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tattrib->SetDocument( document );\n\t\t\tpErr = p;\n\t\t\tp = attrib->Parse( p, data, encoding );\n\n\t\t\tif ( !p || !*p )\n\t\t\t{\n\t\t\t\tif ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, pErr, data, encoding );\n\t\t\t\tdelete attrib;\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t// Handle the strange case of double attributes:\n\t\t\t#ifdef TIXML_USE_STL\n\t\t\tTiXmlAttribute* node = attributeSet.Find( attrib->NameTStr() );\n\t\t\t#else\n\t\t\tTiXmlAttribute* node = attributeSet.Find( attrib->Name() );\n\t\t\t#endif\n\t\t\tif ( node )\n\t\t\t{\n\t\t\t\tnode->SetValue( attrib->Value() );\n\t\t\t\tdelete attrib;\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tattributeSet.Add( attrib );\n\t\t}\n\t}\n\treturn p;\n}\n\n\nconst char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )\n{\n\tTiXmlDocument* document = GetDocument();\n\n\t// Read in text and elements in any order.\n\tconst char* pWithWhiteSpace = p;\n\tp = SkipWhiteSpace( p, encoding );\n\n\twhile ( p && *p )\n\t{\n\t\tif ( *p != '<' )\n\t\t{\n\t\t\t// Take what we have, make a text element.\n\t\t\tTiXmlText* textNode = new TiXmlText( \"\" );\n\n\t\t\tif ( !textNode )\n\t\t\t{\n\t\t\t\tif ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, encoding );\n\t\t\t\t    return 0;\n\t\t\t}\n\n\t\t\tif ( TiXmlBase::IsWhiteSpaceCondensed() )\n\t\t\t{\n\t\t\t\tp = textNode->Parse( p, data, encoding );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Special case: we want to keep the white space\n\t\t\t\t// so that leading spaces aren't removed.\n\t\t\t\tp = textNode->Parse( pWithWhiteSpace, data, encoding );\n\t\t\t}\n\n\t\t\tif ( !textNode->Blank() )\n\t\t\t\tLinkEndChild( textNode );\n\t\t\telse\n\t\t\t\tdelete textNode;\n\t\t} \n\t\telse \n\t\t{\n\t\t\t// We hit a '<'\n\t\t\t// Have we hit a new element or an end tag? This could also be\n\t\t\t// a TiXmlText in the \"CDATA\" style.\n\t\t\tif ( StringEqual( p, \"</\", false, encoding ) )\n\t\t\t{\n\t\t\t\treturn p;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTiXmlNode* node = Identify( p, encoding );\n\t\t\t\tif ( node )\n\t\t\t\t{\n\t\t\t\t\tp = node->Parse( p, data, encoding );\n\t\t\t\t\tLinkEndChild( node );\n\t\t\t\t}\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tpWithWhiteSpace = p;\n\t\tp = SkipWhiteSpace( p, encoding );\n\t}\n\n\tif ( !p )\n\t{\n\t\tif ( document ) document->SetError( TIXML_ERROR_READING_ELEMENT_VALUE, 0, 0, encoding );\n\t}\t\n\treturn p;\n}\n\n\n#ifdef TIXML_USE_STL\nvoid TiXmlUnknown::StreamIn( std::istream * in, TIXML_STRING * tag )\n{\n\twhile ( in->good() )\n\t{\n\t\tint c = in->get();\t\n\t\tif ( c <= 0 )\n\t\t{\n\t\t\tTiXmlDocument* document = GetDocument();\n\t\t\tif ( document )\n\t\t\t\tdocument->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\t\treturn;\n\t\t}\n\t\t(*tag) += (char) c;\n\n\t\tif ( c == '>' )\n\t\t{\n\t\t\t// All is well.\n\t\t\treturn;\t\t\n\t\t}\n\t}\n}\n#endif\n\n\nconst char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )\n{\n\tTiXmlDocument* document = GetDocument();\n\tp = SkipWhiteSpace( p, encoding );\n\n\tif ( data )\n\t{\n\t\tdata->Stamp( p, encoding );\n\t\tlocation = data->Cursor();\n\t}\n\tif ( !p || !*p || *p != '<' )\n\t{\n\t\tif ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, p, data, encoding );\n\t\treturn 0;\n\t}\n\t++p;\n    value = \"\";\n\n\twhile ( p && *p && *p != '>' )\n\t{\n\t\tvalue += *p;\n\t\t++p;\n\t}\n\n\tif ( !p )\n\t{\n\t\tif ( document )\tdocument->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding );\n\t}\n\tif ( *p == '>' )\n\t\treturn p+1;\n\treturn p;\n}\n\n#ifdef TIXML_USE_STL\nvoid TiXmlComment::StreamIn( std::istream * in, TIXML_STRING * tag )\n{\n\twhile ( in->good() )\n\t{\n\t\tint c = in->get();\t\n\t\tif ( c <= 0 )\n\t\t{\n\t\t\tTiXmlDocument* document = GetDocument();\n\t\t\tif ( document )\n\t\t\t\tdocument->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\t\treturn;\n\t\t}\n\n\t\t(*tag) += (char) c;\n\n\t\tif ( c == '>' \n\t\t\t && tag->at( tag->length() - 2 ) == '-'\n\t\t\t && tag->at( tag->length() - 3 ) == '-' )\n\t\t{\n\t\t\t// All is well.\n\t\t\treturn;\t\t\n\t\t}\n\t}\n}\n#endif\n\n\nconst char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )\n{\n\tTiXmlDocument* document = GetDocument();\n\tvalue = \"\";\n\n\tp = SkipWhiteSpace( p, encoding );\n\n\tif ( data )\n\t{\n\t\tdata->Stamp( p, encoding );\n\t\tlocation = data->Cursor();\n\t}\n\tconst char* startTag = \"<!--\";\n\tconst char* endTag   = \"-->\";\n\n\tif ( !StringEqual( p, startTag, false, encoding ) )\n\t{\n\t\tdocument->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding );\n\t\treturn 0;\n\t}\n\tp += strlen( startTag );\n\n\t// [ 1475201 ] TinyXML parses entities in comments\n\t// Oops - ReadText doesn't work, because we don't want to parse the entities.\n\t// p = ReadText( p, &value, false, endTag, false, encoding );\n\t//\n\t// from the XML spec:\n\t/*\n\t [Definition: Comments may appear anywhere in a document outside other markup; in addition, \n\t              they may appear within the document type declaration at places allowed by the grammar. \n\t\t\t\t  They are not part of the document's character data; an XML processor MAY, but need not, \n\t\t\t\t  make it possible for an application to retrieve the text of comments. For compatibility, \n\t\t\t\t  the string \"--\" (double-hyphen) MUST NOT occur within comments.] Parameter entity \n\t\t\t\t  references MUST NOT be recognized within comments.\n\n\t\t\t\t  An example of a comment:\n\n\t\t\t\t  <!-- declarations for <head> & <body> -->\n\t*/\n\n    value = \"\";\n\t// Keep all the white space.\n\twhile (\tp && *p && !StringEqual( p, endTag, false, encoding ) )\n\t{\n\t\tvalue.append( p, 1 );\n\t\t++p;\n\t}\n\tif ( p ) \n\t\tp += strlen( endTag );\n\n\treturn p;\n}\n\n\nconst char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )\n{\n\tp = SkipWhiteSpace( p, encoding );\n\tif ( !p || !*p ) return 0;\n\n//\tint tabsize = 4;\n//\tif ( document )\n//\t\ttabsize = document->TabSize();\n\n\tif ( data )\n\t{\n\t\tdata->Stamp( p, encoding );\n\t\tlocation = data->Cursor();\n\t}\n\t// Read the name, the '=' and the value.\n\tconst char* pErr = p;\n\tp = ReadName( p, &name, encoding );\n\tif ( !p || !*p )\n\t{\n\t\tif ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding );\n\t\treturn 0;\n\t}\n\tp = SkipWhiteSpace( p, encoding );\n\tif ( !p || !*p || *p != '=' )\n\t{\n\t\tif ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );\n\t\treturn 0;\n\t}\n\n\t++p;\t// skip '='\n\tp = SkipWhiteSpace( p, encoding );\n\tif ( !p || !*p )\n\t{\n\t\tif ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );\n\t\treturn 0;\n\t}\n\t\n\tconst char* end;\n\tconst char SINGLE_QUOTE = '\\'';\n\tconst char DOUBLE_QUOTE = '\\\"';\n\n\tif ( *p == SINGLE_QUOTE )\n\t{\n\t\t++p;\n\t\tend = \"\\'\";\t\t// single quote in string\n\t\tp = ReadText( p, &value, false, end, false, encoding );\n\t}\n\telse if ( *p == DOUBLE_QUOTE )\n\t{\n\t\t++p;\n\t\tend = \"\\\"\";\t\t// double quote in string\n\t\tp = ReadText( p, &value, false, end, false, encoding );\n\t}\n\telse\n\t{\n\t\t// All attribute values should be in single or double quotes.\n\t\t// But this is such a common error that the parser will try\n\t\t// its best, even without them.\n\t\tvalue = \"\";\n\t\twhile (    p && *p\t\t\t\t\t\t\t\t\t\t\t// existence\n\t\t\t\t&& !IsWhiteSpace( *p ) && *p != '\\n' && *p != '\\r'\t// whitespace\n\t\t\t\t&& *p != '/' && *p != '>' )\t\t\t\t\t\t\t// tag end\n\t\t{\n\t\t\tif ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) {\n\t\t\t\t// [ 1451649 ] Attribute values with trailing quotes not handled correctly\n\t\t\t\t// We did not have an opening quote but seem to have a \n\t\t\t\t// closing one. Give up and throw an error.\n\t\t\t\tif ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tvalue += *p;\n\t\t\t++p;\n\t\t}\n\t}\n\treturn p;\n}\n\n#ifdef TIXML_USE_STL\nvoid TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag )\n{\n\twhile ( in->good() )\n\t{\n\t\tint c = in->peek();\t\n\t\tif ( !cdata && (c == '<' ) ) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif ( c <= 0 )\n\t\t{\n\t\t\tTiXmlDocument* document = GetDocument();\n\t\t\tif ( document )\n\t\t\t\tdocument->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\t\treturn;\n\t\t}\n\n\t\t(*tag) += (char) c;\n\t\tin->get();\t// \"commits\" the peek made above\n\n\t\tif ( cdata && c == '>' && tag->size() >= 3 ) {\n\t\t\tsize_t len = tag->size();\n\t\t\tif ( (*tag)[len-2] == ']' && (*tag)[len-3] == ']' ) {\n\t\t\t\t// terminator of cdata.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}    \n\t}\n}\n#endif\n\nconst char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )\n{\n\tvalue = \"\";\n\tTiXmlDocument* document = GetDocument();\n\n\tif ( data )\n\t{\n\t\tdata->Stamp( p, encoding );\n\t\tlocation = data->Cursor();\n\t}\n\n\tconst char* const startTag = \"<![CDATA[\";\n\tconst char* const endTag   = \"]]>\";\n\n\tif ( cdata || StringEqual( p, startTag, false, encoding ) )\n\t{\n\t\tcdata = true;\n\n\t\tif ( !StringEqual( p, startTag, false, encoding ) )\n\t\t{\n\t\t\tdocument->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding );\n\t\t\treturn 0;\n\t\t}\n\t\tp += strlen( startTag );\n\n\t\t// Keep all the white space, ignore the encoding, etc.\n\t\twhile (\t   p && *p\n\t\t\t\t&& !StringEqual( p, endTag, false, encoding )\n\t\t\t  )\n\t\t{\n\t\t\tvalue += *p;\n\t\t\t++p;\n\t\t}\n\n\t\tTIXML_STRING dummy; \n\t\tp = ReadText( p, &dummy, false, endTag, false, encoding );\n\t\treturn p;\n\t}\n\telse\n\t{\n\t\tbool ignoreWhite = true;\n\n\t\tconst char* end = \"<\";\n\t\tp = ReadText( p, &value, ignoreWhite, end, false, encoding );\n\t\tif ( p )\n\t\t\treturn p-1;\t// don't truncate the '<'\n\t\treturn 0;\n\t}\n}\n\n#ifdef TIXML_USE_STL\nvoid TiXmlDeclaration::StreamIn( std::istream * in, TIXML_STRING * tag )\n{\n\twhile ( in->good() )\n\t{\n\t\tint c = in->get();\n\t\tif ( c <= 0 )\n\t\t{\n\t\t\tTiXmlDocument* document = GetDocument();\n\t\t\tif ( document )\n\t\t\t\tdocument->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );\n\t\t\treturn;\n\t\t}\n\t\t(*tag) += (char) c;\n\n\t\tif ( c == '>' )\n\t\t{\n\t\t\t// All is well.\n\t\t\treturn;\n\t\t}\n\t}\n}\n#endif\n\nconst char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding )\n{\n\tp = SkipWhiteSpace( p, _encoding );\n\t// Find the beginning, find the end, and look for\n\t// the stuff in-between.\n\tTiXmlDocument* document = GetDocument();\n\tif ( !p || !*p || !StringEqual( p, \"<?xml\", true, _encoding ) )\n\t{\n\t\tif ( document ) document->SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding );\n\t\treturn 0;\n\t}\n\tif ( data )\n\t{\n\t\tdata->Stamp( p, _encoding );\n\t\tlocation = data->Cursor();\n\t}\n\tp += 5;\n\n\tversion = \"\";\n\tencoding = \"\";\n\tstandalone = \"\";\n\n\twhile ( p && *p )\n\t{\n\t\tif ( *p == '>' )\n\t\t{\n\t\t\t++p;\n\t\t\treturn p;\n\t\t}\n\n\t\tp = SkipWhiteSpace( p, _encoding );\n\t\tif ( StringEqual( p, \"version\", true, _encoding ) )\n\t\t{\n\t\t\tTiXmlAttribute attrib;\n\t\t\tp = attrib.Parse( p, data, _encoding );\t\t\n\t\t\tversion = attrib.Value();\n\t\t}\n\t\telse if ( StringEqual( p, \"encoding\", true, _encoding ) )\n\t\t{\n\t\t\tTiXmlAttribute attrib;\n\t\t\tp = attrib.Parse( p, data, _encoding );\t\t\n\t\t\tencoding = attrib.Value();\n\t\t}\n\t\telse if ( StringEqual( p, \"standalone\", true, _encoding ) )\n\t\t{\n\t\t\tTiXmlAttribute attrib;\n\t\t\tp = attrib.Parse( p, data, _encoding );\t\t\n\t\t\tstandalone = attrib.Value();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Read over whatever it is.\n\t\t\twhile( p && *p && *p != '>' && !IsWhiteSpace( *p ) )\n\t\t\t\t++p;\n\t\t}\n\t}\n\treturn 0;\n}\n\nbool TiXmlText::Blank() const\n{\n\tfor ( unsigned i=0; i<value.length(); i++ )\n\t\tif ( !IsWhiteSpace( value[i] ) )\n\t\t\treturn false;\n\treturn true;\n}\n\n"
  },
  {
    "path": "src/madness/fortran_ctypes.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file fortran_ctypes.h\n \\brief Correspondence between C++ and Fortran types.\n*/\n\n#ifndef FORTRAN_CTYPES_H\n#define FORTRAN_CTYPES_H\n\n#include <complex>\n#include <stdint.h>\n#include <madness/madness_config.h>\n\n/// Fortran type for 4-byte integers.\ntypedef int32_t integer4;\n#define HAVE_INTEGER4\n# ifdef HAVE_INT64_T\n/// Fortran type for 8-byte integers.\ntypedef int64_t integer8;\n#define HAVE_INTEGER8\n# endif // HAVE_INT64_T\n\n// Set the default Fortran integer type\n#if (MADNESS_FORTRAN_DEFAULT_INTEGER_SIZE == 8)\n\n#ifdef HAVE_INTEGER8\n/// Set the default Fortran integer type to integer*8.\ntypedef integer8 integer;\n#else\n/// Set the default Fortran integer type to integer*4.\ntypedef integer4 integer;\n#endif  // HAVE_INT64_T\n\n#else // (MADNESS_FORTRAN_DEFAULT_INTEGER_SIZE == 4)\n\n/// Set the default Fortran integer type to integer*4.\ntypedef integer4 integer;\n\n#endif // (MADNESS_FORTRAN_DEFAULT_INTEGER_SIZE == 8)\n\n\n/// Fortran double precision.\ntypedef double real8;\n/// Fortran double precision.\ntypedef double double_precision;\n\n/// Fortran single precision.\ntypedef float real4;\n/// Fortran single precision.\ntypedef float single_precision;\n\n/// Fortran double complex.\ntypedef std::complex<double> complex_real8;\n/// Fortran double complex.\ntypedef std::complex<double> double_precision_complex;\n\n/// Fortran single complex.\ntypedef std::complex<float> complex_real4;\n/// Fortran single complex.\ntypedef std::complex<float> single_precision_complex;\n\n/// Type of variable appended to argument list for length of fortran character strings.\ntypedef int char_len;\n\n\n#endif\n"
  },
  {
    "path": "src/madness/madness.cc",
    "content": ""
  },
  {
    "path": "src/madness/madness_config.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2014 Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file madness_config.h\n \\brief Macros and tools pertaining to the configuration of MADNESS.\n \\ingroup libraries\n*/\n\n#ifndef MADNESS_MADNESS_CONFIG_H__INCLUDED\n#define MADNESS_MADNESS_CONFIG_H__INCLUDED\n\n#include <madness/config.h>\n/* undefine what every autoheader package defines to avoid clashes */\n#undef PACKAGE\n#undef PACKAGE_NAME\n#undef PACKAGE_BUGREPORT\n#undef PACKAGE_STRING\n#undef PACKAGE_TARNAME\n#undef PACKAGE_URL\n#undef PACKAGE_VERSION\n#undef VERSION\n\n/* System check */\n#if defined(__CRAYXT)\n\n#  define HAVE_CRAYXT 1\n#  define MADNESS_HAVE_CRAYXT 1\n\n#elif defined(__CRAYXE)\n\n#  define HAVE_CRAYXE 1\n#  define MADNESS_HAVE_CRAYXE 1\n#  define X86_64 1\n#  define MADNESS_HAVE_X86_64 1\n\n#elif defined(__bgp__)\n\n#  define HAVE_IBMBGP 1\n#  define MADNESS_HAVE_POWERPC_32 1\n\n#elif defined(__bgq__)\n\n#  define HAVE_IBMBGQ 1\n#  define MADNESS_HAVE_POWERPC_64 1\n\n#endif /* System check */\n\n\n/* Processor and instruction set checks */\n#if defined(__x86_64__) || defined(_M_X64)\n   /* x86 64-bit */\n#  define X86_64 1\n#  define MADNESS_HAVE_X86_64 1\n\n/* http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130819/086386.html */\n/* AVX-512 where F=foundational; ER, CD and PF extensions may also be useful some day. */\n#  if defined(__AVX512F__)\n#    define MADNESS_HAVE_AVX512 1\n#  endif\n\n#  if defined(__AVX2__)\n#    define MADNESS_HAVE_AVX2 1\n#  endif\n\n#  if defined(__AVX__)\n#    define MADNESS_HAVE_AVX 1\n#  endif\n\n#  if defined(__SSE4_2__)\n#    define MADNESS_HAVE_SSE42 1\n#  endif\n\n#  if defined(__SSE4_1__)\n#    define MADNESS_SSE41 1\n#  endif\n\n#  if defined(__SSSE3__)\n#    define MADNESS_HAVE_SSSE3 1\n#  endif\n\n#  if defined(__SSE3__)\n#    define MADNESS_HAVE_SSE3 1\n#  endif\n\n/* x86 64-bit always has SSE2 */\n#  define MADNESS_HAVE_SSE2 1\n#  define MADNESS_HAVE_SSE 1\n\n#  if defined(_M_IX86_FP) /* Defined in MS compiler. 1 = SSE, 2: SSE2 */\n\n#    if _M_IX86_FP == 2\n#      define MADNESS_HAVE_SSE2 2\n#    elif _M_IX86_FP == 1\n#      define MADNESS_HAVE_SSE 1\n#    endif\n\n#  endif /* defined(_M_IX86_FP) */\n\n\n#elif defined(__i386) || defined(_M_IX86)\n   /* x86 32-bit */\n#  define X86_32\n#  define MADNESS_HAVE_X86_32\n\n#  if defined(__SSE2__)\n#    define MADNESS_HAVE_SSE2 2\n#  endif\n\n#  if defined(__SSE__)\n#    define MADNESS_HAVE_SSE 1\n#  endif\n\n#endif /* x86 */\n\n\n#if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)\n  /* POWER PC */\n\n#  if defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) || \\\n      defined(__64BIT__) || defined(_LP64) || defined(__LP64__)\n     /* POWER PC 64-bit */\n#    define MADNESS_HAVE_POWERPC_64 1\n\n#  else\n     /* POWER PC 32-bit */\n#    define MADNESS_HAVE_POWERPC_32 1\n\n#  endif\n\n#endif /* POWERPC */\n\n/* ----------- compiler checks -------------------*/\n/*\n * - copied from https://github.com/ValeevGroup/tiledarray/blob/master/src/TiledArray/config.h.in\n * - ids taken from CMake\n * - macros are discussed at https://sourceforge.net/p/predef/wiki/Compilers/\n*/\n#define MADNESS_CXX_COMPILER_ID_GNU 0\n#define MADNESS_CXX_COMPILER_ID_Clang 1\n#define MADNESS_CXX_COMPILER_ID_AppleClang 2\n#define MADNESS_CXX_COMPILER_ID_XLClang 3\n#define MADNESS_CXX_COMPILER_ID_Intel 4\n#if defined(__INTEL_COMPILER_BUILD_DATE)  /* macros like __ICC and even __INTEL_COMPILER can be affected by command options like -no-icc */\n# define MADNESS_CXX_COMPILER_ID MADNESS_CXX_COMPILER_ID_Intel\n# define MADNESS_CXX_COMPILER_IS_ICC 1\n#endif\n#if defined(__clang__) && !defined(MADNESS_CXX_COMPILER_IS_ICC)\n# define MADNESS_CXX_COMPILER_IS_CLANG 1\n# if defined(__apple_build_version__)\n#  define MADNESS_CXX_COMPILER_ID MADNESS_CXX_COMPILER_ID_AppleClang\n# elif defined(__ibmxl__)\n#  define MADNESS_CXX_COMPILER_ID MADNESS_CXX_COMPILER_ID_XLClang\n# else\n#  define MADNESS_CXX_COMPILER_ID MADNESS_CXX_COMPILER_ID_Clang\n# endif\n#endif\n#if defined(__GNUG__) && !defined(MADNESS_CXX_COMPILER_IS_ICC) && !defined(MADNESS_CXX_COMPILER_IS_CLANG)\n# define MADNESS_CXX_COMPILER_ID MADNESS_CXX_COMPILER_ID_GNU\n# define MADNESS_CXX_COMPILER_IS_GCC 1\n#endif\n\n/* ----------- preprocessor checks ---------------*/\n#define MADNESS_PRAGMA(x) _Pragma(#x)\n/* same as MADNESS_PRAGMA(x), but expands x */\n#define MADNESS_XPRAGMA(x) MADNESS_PRAGMA(x)\n/* \"concats\" a and b with a space in between */\n#define MADNESS_CONCAT(a,b) a b\n#ifdef MADNESS_CXX_COMPILER_IS_CLANG\n#define MADNESS_PRAGMA_CLANG(x) MADNESS_XPRAGMA( MADNESS_CONCAT(clang,x) )\n#else\n#define MADNESS_PRAGMA_CLANG(x)\n#endif\n#ifdef MADNESS_CXX_COMPILER_IS_GCC\n#define MADNESS_PRAGMA_GCC(x) MADNESS_XPRAGMA( MADNESS_CONCAT(GCC,x) )\n#else\n#define MADNESS_PRAGMA_GCC(x)\n#endif\n\n/* ----------- end of preprocessor checks ---------*/\n\n#endif // MADNESS_MADNESS_CONFIG_H__INCLUDED\n"
  },
  {
    "path": "src/madness/misc/CMakeLists.txt",
    "content": "# src/madness/misc\n\nset(MADMISC_HEADERS misc.h ran.h phandler.h interpolation_1d.h cfft.h info.h gnuplot.h array_of_bools.h kahan_accumulator.h)\nset(MADMISC_SOURCES\n    checksum_file.cc position_stream.cc gprofexit.cc ran.cc cfft.cc info.cc numerics.cc unique_filename.cc)\n# retrieve git metadata\ninclude(GetGitMetadata)\nvgkit_cmake_git_metadata()\n# feed MADNESS_GIT_{REVISION,DESCRIPTION} to info.cc only to avoid recompiling everything\nset_source_files_properties(\n        info.cc\n        PROPERTIES\n          COMPILE_DEFINITIONS\n          \"MADNESS_GIT_REVISION=\\\"${MADNESS_GIT_REVISION}\\\";MADNESS_GIT_DESCRIPTION=\\\"${MADNESS_GIT_DESCRIPTION}\\\"\"\n)\n\n# Create the MADmisc library\nadd_mad_library(misc MADMISC_SOURCES MADMISC_HEADERS \"world\" \"madness/misc/\")\n\nif(BUILD_TESTING)\n  # The list of unit test source files\n  # test_gnuplot.cc breaks the CI since gnuplot missing so disable \n  set(MISC_TEST_SOURCES interp3.cc )\n  \n  add_unittests(misc \"${MISC_TEST_SOURCES}\" \"MADmisc;MADgtest\" \"unittests;short\")\n\nendif()\n"
  },
  {
    "path": "src/madness/misc/array_of_bools.h",
    "content": "//\n// Created by Eduard Valeyev on 12/4/24.\n//\n\n#ifndef MADNESS_ARRAY_OF_BOOLS_H\n#define MADNESS_ARRAY_OF_BOOLS_H\n\n#include <cstddef>\n#include <array>\n#include <numeric>\n\nnamespace madness {\n\n/// syntactic sugar for std::array<bool, N>\n\n/// reason to exist: so can apply logical operations to the entire pack of bools, e.g. `a && b`,\n/// and perform queries like `a.any()`, `a.none()`, etc.\ntemplate <std::size_t N>\nclass array_of_bools : public std::array<bool, N> {\npublic:\n  using base_type = std::array<bool, N>;\n\n  const auto& as_array() const { return static_cast<const base_type&>(*this); }\n  auto& as_array() { return static_cast<base_type&>(*this); }\n\n  /// default ctor public only for `N==0`\n  template <std::size_t NN = N, typename = std::enable_if_t<NN==0>>\n  array_of_bools() {}\n\n  /// constructs an array filled with \\p v\n  explicit array_of_bools(bool v) { as_array().fill(v); }\n\n  /// constructs an array filled with `{v, vs...}`\n  template <typename ... Bools, typename = std::enable_if_t<sizeof...(Bools)+1==N>>\n  explicit array_of_bools(bool v, Bools... vs) : base_type{{v, static_cast<bool>(vs)...}} {}\n\n  /// @return true if any element is true\n  bool any() const { return std::accumulate(this->begin(), this->end(), false, std::logical_or{}); }\n\n  /// @return true if no elements are true\n  bool none() const { return !any(); }\n\n  /// @return true if all elements are true\n  bool all() const { return std::accumulate(this->begin(), this->end(), false, std::logical_and{}); }\n\n  /// @return first \\p C elements\n  template <std::size_t C, typename = std::enable_if_t<C <= N>>\n  array_of_bools<C> front() const {\n    array_of_bools<C> result;\n    std::copy(this->begin(), this->begin()+C, result.begin());\n    return result;\n  }\n\n  /// assigns \\p a to the first \\p C elements of this\n  /// @param a the array to assign to the front of this\n  /// @return reference to this object\n  template <std::size_t C, typename = std::enable_if_t<C <= N>>\n  array_of_bools& assign_front(const array_of_bools<C>& a) {\n    std::copy(a.begin(), a.end(), this->begin());\n    return *this;\n  }\n\n  /// @return array with first \\p C elements obtained by logical AND between\n  /// \\p a and the first \\p C elements of this, the rest filled with the\n  /// remainder of this\n  template <std::size_t C, typename = std::enable_if_t<C <= N>>\n  array_of_bools and_front(const array_of_bools<C>& a) const {\n    array_of_bools result;\n    const auto it = std::transform(a.begin(), a.end(), this->begin(), result.begin(),\n                             std::logical_and{});\n    std::copy(this->begin() + C, this->end(), it);\n    return result;\n  }\n\n  /// @return array with first \\p C elements obtained by logical OR between\n  /// \\p a and the first \\p C elements of this, the rest filled with the\n  /// remainder of this\n  template <std::size_t C, typename = std::enable_if_t<C <= N>>\n  array_of_bools or_front(const array_of_bools<C>& a) const {\n    array_of_bools result;\n    const auto it = std::transform(a.begin(), a.end(), this->begin(), result.begin(),\n                             std::logical_or{});\n    std::copy(this->begin() + C, this->end(), it);\n    return result;\n  }\n\n  /// @return last \\p C elements\n  template <std::size_t C, typename = std::enable_if_t<C <= N>>\n  array_of_bools<C> back() const {\n    array_of_bools<C> result;\n    std::copy(this->begin() + (N - C), this->end(), result.begin());\n    return result;\n  }\n\n  /// assigns \\p a to the last \\p C elements of this\n  /// @param a the array to assign to the back of this\n  /// @return reference to this object\n  template <std::size_t C, typename = std::enable_if_t<C <= N>>\n  array_of_bools& assign_back(const array_of_bools<C>& a) {\n    std::copy(a.begin(), a.end(), this->begin() + (N - C));\n    return *this;\n  }\n\n  /// @return array with last \\p C elements obtained by logical AND between\n  /// \\p a and the last \\p C elements of this, the rest filled with the\n  /// remainder of this\n  template <std::size_t C, typename = std::enable_if_t<C <= N>>\n  array_of_bools and_back(const array_of_bools<C>& a) const {\n    array_of_bools result;\n    const auto it =\n        std::copy(this->begin(), this->begin() + (N - C), result.begin());\n    std::transform(a.begin(), a.end(), this->begin() + (N - C), it,\n                   std::logical_and{});\n    return result;\n  }\n\n  /// @return array with last \\p C elements obtained by logical OR between\n  /// \\p a and the last \\p C elements of this, the rest filled with the\n  /// remainder of this\n  template <std::size_t C, typename = std::enable_if_t<C <= N>>\n  array_of_bools or_back(const array_of_bools<C>& a) const {\n    array_of_bools result;\n    const auto it =\n        std::copy(this->begin(), this->begin() + (N - C), result.begin());\n    std::transform(a.begin(), a.end(), this->begin() + (N - C), it,\n                   std::logical_or{});\n    return result;\n  }\n\n  friend array_of_bools<N> operator&&(const array_of_bools<N>& a, const array_of_bools<N>& b) {\n    array_of_bools<N> result;\n    std::transform(a.begin(), a.end(), b.begin(), result.begin(), std::logical_and{});\n    return result;\n  }\n  friend array_of_bools<N> operator||(const array_of_bools<N>& a, const array_of_bools<N>& b) {\n    array_of_bools<N> result;\n    std::transform(a.begin(), a.end(), b.begin(), result.begin(), std::logical_or{});\n    return result;\n  }\n  friend array_of_bools<N> operator^(const array_of_bools<N>& a, const array_of_bools<N>& b) {\n    array_of_bools<N> result;\n    std::transform(a.begin(), a.end(), b.begin(), result.begin(), [](auto b1, auto b2) {\n      return b1 ^ b2;\n    });\n    return result;\n  }\n  friend array_of_bools<N> operator!(const array_of_bools<N>& a) {\n    array_of_bools<N> result;\n    std::transform(a.begin(), a.end(), result.begin(), std::logical_not{});\n    return result;\n  }\n\n  friend array_of_bools<N> operator&&(const array_of_bools<N>& a, bool b) {\n    array_of_bools<N> result;\n    std::transform(a.begin(), a.end(), result.begin(), [b](auto a_v) {\n      return a_v && b;\n    });\n    return result;\n  }\n  friend array_of_bools<N> operator&&(bool b, const array_of_bools<N>& a) {\n    return a && b;\n  }\n  friend array_of_bools<N> operator||(const array_of_bools<N>& a, bool b) {\n    array_of_bools<N> result;\n    std::transform(a.begin(), a.end(), result.begin(), [b](auto a_v) {\n      return a_v || b;\n    });\n    return result;\n  }\n  friend array_of_bools<N> operator||(bool b, const array_of_bools<N>& a) {\n    return a || b;\n  }\n  friend array_of_bools<N> operator^(const array_of_bools<N>& a, bool b) {\n    array_of_bools<N> result;\n    std::transform(a.begin(), a.end(), result.begin(), [b](auto a_v) {\n      return a_v ^ b;\n    });\n    return result;\n  }\n  friend array_of_bools<N> operator^(bool b, const array_of_bools<N>& a) {\n    return a ^ b;\n  }\n\nprivate:\n  // \"default\" ctor for N!=0 only for internal use, need tagged dispatch\n  struct nonempty_default_ctor_tag{};\n  template <std::size_t NN = N, typename = std::enable_if_t<NN!=0>>\n  explicit array_of_bools(nonempty_default_ctor_tag = {}) {}\n\n  template <std::size_t NN>\n  friend class array_of_bools;\n};\n\nstatic_assert(std::is_same_v<array_of_bools<1>::value_type, bool>);\nstatic_assert(std::is_same_v<decltype(array_of_bools<1>{true}.data()), bool*>);\nstatic_assert(std::is_same_v<decltype(array_of_bools<2>{true, false}[0]), bool&>);\nstatic_assert(std::is_same_v<decltype(array_of_bools<0>{} && array_of_bools<0>{}), array_of_bools<0>>);\nstatic_assert(std::is_same_v<decltype(array_of_bools<0>{} || array_of_bools<0>{}), array_of_bools<0>>);\nstatic_assert(std::is_same_v<decltype(array_of_bools<0>{} ^ array_of_bools<0>{}), array_of_bools<0>>);\nstatic_assert(std::is_same_v<decltype(!array_of_bools<0>{}), array_of_bools<0>>);\nstatic_assert(std::is_same_v<decltype(array_of_bools<0>{} && true), array_of_bools<0>>);\nstatic_assert(std::is_same_v<decltype(true && array_of_bools<0>{}), array_of_bools<0>>);\nstatic_assert(std::is_same_v<decltype(array_of_bools<0>{} || true), array_of_bools<0>>);\nstatic_assert(std::is_same_v<decltype(true || array_of_bools<0>{}), array_of_bools<0>>);\nstatic_assert(std::is_same_v<decltype(array_of_bools<0>{} ^ true), array_of_bools<0>>);\nstatic_assert(std::is_same_v<decltype(true ^ array_of_bools<0>{}), array_of_bools<0>>);\n\n}\n\n#endif // MADNESS_ARRAY_OF_BOOLS_H\n"
  },
  {
    "path": "src/madness/misc/cfft.cc",
    "content": "//   fft.cpp - impelementation of class\n//   of fast Fourier transform - FFT\n//\n//   The code is property of LIBROW\n//   You can use it on your own\n//   When utilizing credit LIBROW site\n\n//   Include declaration file\n#include <vector>\n#include <iostream>\nusing namespace std;\n\n#include <madness/misc/cfft.h>\n//   Include math library\n#include <cmath>\n\n//   FORWARD FOURIER TRANSFORM\n//     Input  - input data\n//     Output - transform result\n//     N      - length of both input data and result\nbool CFFT::Forward(const double_complex *const Input, double_complex *const Output, const unsigned int N)\n{\n\t//   Check input parameters\n\tif (!Input || !Output || N < 1 || N & (N - 1))\n\t\treturn false;\n\t//   Initialize data\n\tRearrange(Input, Output, N);\n\t//   Call FFT implementation\n\tPerform(Output, N);\n\t//   Succeeded\n\treturn true;\n}\n\n//   FORWARD FOURIER TRANSFORM, INPLACE VERSION\n//     Data - both input data and output\n//     N    - length of input data\nbool CFFT::Forward(double_complex *const Data, const unsigned int N)\n{\n\t//   Check input parameters\n\tif (!Data || N < 1 || N & (N - 1))\n\t\treturn false;\n\t//   Rearrange\n\tRearrange(Data, N);\n\t//   Call FFT implementation\n\tPerform(Data, N);\n\t//   Succeeded\n\treturn true;\n}\n\n//   INVERSE FOURIER TRANSFORM\n//     Input  - input data\n//     Output - transform result\n//     N      - length of both input data and result\n//     Scale  - if to scale result\nbool CFFT::Inverse(const double_complex *const Input, double_complex *const Output, const unsigned int N, const bool Scale /* = true */)\n{\n\t//   Check input parameters\n\tif (!Input || !Output || N < 1 || N & (N - 1))\n\t\treturn false;\n\t//   Initialize data\n\tRearrange(Input, Output, N);\n\t//   Call FFT implementation\n\tPerform(Output, N, true);\n\t//   Scale if necessary\n\tif (Scale)\n\t\tCFFT::Scale(Output, N);\n\t//   Succeeded\n\treturn true;\n}\n\n//   INVERSE FOURIER TRANSFORM, INPLACE VERSION\n//     Data  - both input data and output\n//     N     - length of both input data and result\n//     Scale - if to scale result\nbool CFFT::Inverse(double_complex *const Data, const unsigned int N, const bool Scale /* = true */)\n{\n\t//   Check input parameters\n\tif (!Data || N < 1 || N & (N - 1))\n\t\treturn false;\n\t//   Rearrange\n\tRearrange(Data, N);\n\t//   Call FFT implementation\n\tPerform(Data, N, true);\n\t//   Scale if necessary\n\tif (Scale)\n\t\tCFFT::Scale(Data, N);\n\t//   Succeeded\n\treturn true;\n}\n\n//   Rearrange function\nvoid CFFT::Rearrange(const double_complex *const Input, double_complex *const Output, const unsigned int N)\n{\n\t//   Data entry position\n\tunsigned int Target = 0;\n\t//   Process all positions of input signal\n\tfor (unsigned int Position = 0; Position < N; ++Position)\n\t{\n\t\t//  Set data entry\n\t\tOutput[Target] = Input[Position];\n\t\t//   Bit mask\n\t\tunsigned int Mask = N;\n\t\t//   While bit is set\n\t\twhile (Target & (Mask >>= 1))\n\t\t\t//   Drop bit\n\t\t\tTarget &= ~Mask;\n\t\t//   The current bit is 0 - set it\n\t\tTarget |= Mask;\n\t}\n}\n\n//   Inplace version of rearrange function\nvoid CFFT::Rearrange(double_complex *const Data, const unsigned int N)\n{\n\t//   Swap position\n\tunsigned int Target = 0;\n\t//   Process all positions of input signal\n\tfor (unsigned int Position = 0; Position < N; ++Position)\n\t{\n\t\t//   Only for not yet swapped entries\n\t\tif (Target > Position)\n\t\t{\n\t\t\t//   Swap entries\n\t\t\tconst double_complex Temp(Data[Target]);\n\t\t\tData[Target] = Data[Position];\n\t\t\tData[Position] = Temp;\n\t\t}\n\t\t//   Bit mask\n\t\tunsigned int Mask = N;\n\t\t//   While bit is set\n\t\twhile (Target & (Mask >>= 1))\n\t\t\t//   Drop bit\n\t\t\tTarget &= ~Mask;\n\t\t//   The current bit is 0 - set it\n\t\tTarget |= Mask;\n\t}\n}\n\n//   FFT implementation\nvoid CFFT::Perform(double_complex *const Data, const unsigned int N, const bool Inverse /* = false */)\n{\n\tconst double pi = Inverse ? 3.14159265358979323846 : -3.14159265358979323846;\n\t//   Iteration through dyads, quadruples, octads and so on...\n\tfor (unsigned int Step = 1; Step < N; Step <<= 1)\n\t{\n\t\t//   Jump to the next entry of the same transform factor\n\t\tconst unsigned int Jump = Step << 1;\n\t\t//   Angle increment\n\t\tconst double delta = pi / double(Step);\n\t\t//   Auxiliary sin(delta / 2)\n\t\tconst double Sine = sin(delta * .5);\n\t\t//   Multiplier for trigonometric recurrence\n\t\tconst double_complex Multiplier(-2. * Sine * Sine, sin(delta));\n\t\t//   Start value for transform factor, fi = 0\n\t\tdouble_complex Factor(1.);\n\t\t//   Iteration through groups of different transform factor\n\t\tfor (unsigned int Group = 0; Group < Step; ++Group)\n\t\t{\n\t\t\t//   Iteration within group \n\t\t\tfor (unsigned int Pair = Group; Pair < N; Pair += Jump)\n\t\t\t{\n\t\t\t\t//   Match position\n\t\t\t\tconst unsigned int Match = Pair + Step;\n\t\t\t\t//   Second term of two-point transform\n\t\t\t\tconst double_complex Product(Factor * Data[Match]);\n\t\t\t\t//   Transform for fi + pi\n\t\t\t\tData[Match] = Data[Pair] - Product;\n\t\t\t\t//   Transform for fi\n\t\t\t\tData[Pair] += Product;\n\t\t\t}\n\t\t\t//   Successive transform factor via trigonometric recurrence\n\t\t\tFactor = Multiplier * Factor + Factor;\n\t\t}\n\t}\n}\n\n//   Scaling of inverse FFT result\nvoid CFFT::Scale(double_complex *const Data, const unsigned int N)\n{\n\tconst double Factor = 1. / double(N);\n\t//   Scale all data entries\n\tfor (unsigned int Position = 0; Position < N; ++Position)\n\t\tData[Position] *= Factor;\n}\n"
  },
  {
    "path": "src/madness/misc/cfft.h",
    "content": "//   fft.h - declaration of class\n//   of fast Fourier transform - FFT\n//\n//   The code is property of LIBROW\n//   You can use it on your own\n//   When utilizing credit LIBROW site\n\n#ifndef MADNESS_MISC_CFFT_H__INCLUDED\n#define MADNESS_MISC_CFFT_H__INCLUDED\n\n//   Include complex numbers header\n#include <complex>\n\ntypedef std::complex<double> double_complex;\n\nclass CFFT\n{\npublic:\n    //   FORWARD FOURIER TRANSFORM\n    //     Input  - input data\n    //     Output - transform result\n    //     N      - length of both input data and result\n    static bool Forward(const double_complex *const Input, double_complex *const Output, const unsigned int N);\n    \n    //   FORWARD FOURIER TRANSFORM, INPLACE VERSION\n    //     Data - both input data and output\n    //     N    - length of input data\n    static bool Forward(double_complex *const Data, const unsigned int N);\n    \n    //   INVERSE FOURIER TRANSFORM\n    //     Input  - input data\n    //     Output - transform result\n    //     N      - length of both input data and result\n    //     Scale  - if to scale result\n    static bool Inverse(const double_complex *const Input, double_complex *const Output, const unsigned int N, const bool Scale = true);\n    \n    //   INVERSE FOURIER TRANSFORM, INPLACE VERSION\n    //     Data  - both input data and output\n    //     N     - length of both input data and result\n    //     Scale - if to scale result\n    static bool Inverse(double_complex *const Data, const unsigned int N, const bool Scale = true);\n    \nprotected:\n    //   Rearrange function and its inplace version\n    static void Rearrange(const double_complex *const Input, double_complex *const Output, const unsigned int N);\n    static void Rearrange(double_complex *const Data, const unsigned int N);\n    \n    //   FFT implementation\n    static void Perform(double_complex *const Data, const unsigned int N, const bool Inverse = false);\n    \n    //   Scaling of inverse FFT result\n    static void Scale(double_complex *const Data, const unsigned int N);\n};\n\n#endif // MADNESS_MISC_CFFT_H__INCLUDED\n"
  },
  {
    "path": "src/madness/misc/checksum_file.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#include <cstdio>\nusing std::fopen;\nusing std::fgetc;\nusing std::fclose;\n\n/// \\file checksum_file.cc\n/// \\brief Miscellaneous useful stuffx\n\nnamespace madness {\n\n    /// Simple checksum for ASCII characters in file\n    unsigned  long checksum_file(const char* filename) {\n        FILE *file = fopen(filename,\"r\");\n        if (!file) return 0;\n\n        unsigned long sum = 0;\n        int c;\n        while ((c = fgetc(file)) != EOF) {\n            sum = (sum*31u + ((unsigned) c)) & 0xffffff;\n        }\n        fclose(file);\n        return sum;\n    }\n}\n"
  },
  {
    "path": "src/madness/misc/gnuplot.h",
    "content": "#ifndef MADNESS_GNUPLOT_H__INCUDED\n#define MADNESS_GNUPLOT_H__INCUDED\n\n#include <unistd.h>\n#include <sys/types.h>\n#include <sys/wait.h>\n\n#include <cstdio>\n#include <cstdlib>\n#include <cstring>\n#include <cmath>\n\n#include <iostream>\n#include <string>\n#include <vector>\n\nnamespace madness {\n    class Gnuplot {\n        FILE *f;     // pipe connection to gnuplot process\n        pid_t pid;   // pid of gnuplot process\n        FILE *ftee;  // filestream for data tee'd from gnuplot process\n        \n        // base case for unpacking datablock value\n        template <typename T>\n        void dbvalue(size_t i, const T& t) {\n            char buf[256];\n            snprintf(buf,sizeof(buf),\"%16.8e\",double(t[i]));\n            (*this)(buf); // newline\n        }\n        \n        // recursion case for unpacking datablock value\n        template <typename T, typename... Ts>\n        void dbvalue(size_t i, const T& t, Ts... values) {\n            char buf[256];\n            snprintf(buf,sizeof(buf),\"%16.8e \",double(t[i])); // space\n            (*this)(buf,false);\n            dbvalue(i,values...);\n        }\n        \n        // base case for unpacking plot value\n        template <int n, typename T>\n        void doplot(const char* name, const T& value0) {\n            char buf[256];\n            snprintf(buf, sizeof(buf), \"%s using 1:%d\", name, n);\n            (*this)(buf);\n        }\n        \n        // recursion case for unpacking plot value\n        template <int n, typename T, typename... Ts>\n        void doplot(const char* name, const T& value0, Ts... values) {\n            char buf[256];\n            snprintf(buf, sizeof(buf), \"%s using 1:%d, \", name, n);\n            (*this)(buf,false);\n            \n            doplot<n+1,Ts...>(name, values...);\n        }\n        \n    public:\n        Gnuplot& operator=(Gnuplot&&) = delete;\n        Gnuplot& operator=(const Gnuplot&) = delete;\n        Gnuplot(const Gnuplot&) = delete;\n        Gnuplot(const std::string& cmd = \"\", const std::string& teefile = \"\") : f(0), ftee(0) {\n            int p[2];\n            if (pipe (p)) {\n                throw \"Pipe failed.\";\n            }        \n            pid = fork ();\n            if (pid ==  0) { // Child process.\n                close(p[1]);\n                dup2(p[0],STDIN_FILENO);\n                close(p[0]);\n                if (execlp (\"gnuplot\", \"gnuplot\", \"-persist\", NULL) == -1) {\n                    //if (execlp (\"cat\", \"cat\", \"-\", NULL) == -1) {\n                    fprintf(stderr,\"Gnuplot: execlp failed for gnuplot ... plotting disabled\\n\");\n                    exit(1);\n                }\n            }\n            else if (pid < (pid_t) 0)  { // Failure\n                throw \"Fork failed.\";\n            }\n            else { // Parent process\n                close (p[0]);\n                f = fdopen (p[1], \"w\");\n            }\n            if (teefile.size() > 0) {\n                ftee = fopen(teefile.c_str(),\"w\");\n                if (!ftee) {\n                    fprintf(stderr,\"Gnuplot: fopen failed for tee file %s ... tee of plotting disabled\\n\",teefile.c_str());\n                }\n            }\n            \n            if (cmd.size() > 0) (*this)(cmd);\n        }\n        \n        // outputs string to gnuplot process\n        void operator()(const char* cmd, bool EOL=true) {\n            \n            if (f) {\n                if (!fprintf(f,\"%s\",cmd)) {\n                    fprintf(stderr,\"Gnuplot: failed writing to gnuplot pipe ... plotting disabled\\n\");\n                    fclose(f);\n                    f = NULL;\n                }\n            }\n            if (ftee) fprintf(ftee,\"%s\",cmd);\n\n            const int n = strlen(cmd);\n            if (EOL && ((n==0) || (cmd[n-1] != '\\n') ) ) {\n                if (f) {\n                    if (!fprintf(f,\"\\n\")) {\n                        fprintf(stderr,\"Gnuplot: failed writing newline to gnuplot pipe ... plotting disabled\\n\");\n                        fclose(f);\n                        f = NULL;\n                    }\n                }\n                if (ftee) fprintf(ftee,\"\\n\");\n            }\n            if (f) fflush(f);\n        }\n        \n        // outputs string to gnuplot process\n        void operator()(const std::string& cmd, bool EOL=true) {\n            (*this)(cmd.c_str(), EOL);\n        }\n        \n        // Define a gnuplot data block with given name assuming 1-d indexing via [] with explicit size\n        template <typename T, typename... Ts>\n        void db(const std::string& name, size_t size, const T& x, Ts... values) {\n            (*this)(\"$\",false);\n            (*this)(name,false);\n            (*this)(\" << EOD\");\n            for (size_t i = 0; i<size; ++i) {\n                dbvalue(i,x,values...);\n            }\n            (*this)(\"EOD\");\n        }\n        \n        // Define a gnuplot data block with given name assuming 1-d indexing via [] with size from x (a 1-d container that supports size())\n        template <typename T, typename... Ts>\n        void db(const std::string& name, const T& x, Ts... values) {\n            db(name,(size_t) x.size(),x,values...); // have to force x.size() to be size_t since Tensor<T>::size() returns long\n        }\n        \n        // Plots data in 2 or more vectors by generating the following gnuplot commands:\n        // $data << EOD\n        // <data values>\n        // EOD\n        // plot $data using 1:2, $data using 1:3, ...\n        template <typename T, typename... Ts>\n        void plot(const T& x, Ts... values) {\n            db(\"data\", x, values...);\n            (*this)(\"plot \",false);\n            doplot<2,Ts...>(\"$data\", values...); // note we peeled off the x values\n        }\n        \n        ~Gnuplot() {\n            if (f) {\n                fclose(f);\n                waitpid(pid,0,0);\n            }\n            if (ftee) fclose(ftee);\n        }\n        \n        static void test() {\n            std::vector<double> x = {1.0,2.0,3.0};\n            std::vector<double> y = {-1.0,-2.0,3.0};\n            std::vector<double> z = {10.0,11.0,12.0};\n            {\n                Gnuplot g(\"set style data lp; set grid\");\n                g.plot(x,y,z);\n            }\n            {\n                Gnuplot g;\n                //g(\"set term png\");\n                //g(\"set output \\\"test.png\\\"\");\n                g.db(\"xyz\",x,y,z);\n                g(\"plot $xyz using 1:2 with linespoints\");\n            }\n            {\n                // use x11 to work around bug (https://sourceforge.net/p/gnuplot/bugs/2634/) ... wxt temporarily needs GDK_BACKEND=x11\n                Gnuplot g(\"set term x11; set xrange [-10:10]; set yrange [0:1]; set grid; set style data l\", \"test3.gnuplot\");\n                size_t npts = 100;\n                std::vector<double> x(npts), y(npts);\n                for (size_t i = 0; i<npts; ++i) x[i] = -10.0 + 20.0 * i / (npts-1);\n                for (int step=0; step<40; step++) {\n                    double phase = step*0.3;\n                    for (size_t i = 0; i<npts; ++i) y[i] = 0.5 + 0.5 * std::sin(x[i]+phase);\n                    char buf[256];\n                    snprintf(buf,sizeof(buf),\"set title \\\"step %d\\\"\",step);\n                    g(buf);\n                    g.plot(x,y);\n                    usleep(100000);\n                }\n            }\n        }\n    };\n}\n#endif\n"
  },
  {
    "path": "src/madness/misc/gprofexit.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <unistd.h>\n#include <cstdio>\n\nnamespace madness {\n\n    /// Rename gmon.out for each process by ordering process termination\n\n    /// Invoke with id and nproc as rank and size in MPI::COMM_WORLD\n    void gprofexit(int id, int nproc) {\n        const std::size_t bufsize=64;\n        char buf[bufsize];\n        if (id == 0) {\n            for (int p=nproc-1; p>0; --p) {\n                while (access(\"gmon.out\",F_OK)) usleep(1000);\n                snprintf(buf,bufsize,\"gmon.out.%d\",id+1);\n                if (rename(\"gmon.out\",buf))\n                    fprintf(stderr,\"gprofexit: failed renaming gmon.out to %s\", buf);\n            }\n        }\n        else if ((id+1) < nproc) {\n            // Wait for process id+1 to commence writing\n            snprintf(buf,bufsize,\"gmon.out.%d\",id+1);\n            while (access(buf,F_OK)) usleep(10000);\n        }\n    }\n\n}\n"
  },
  {
    "path": "src/madness/misc/info.cc",
    "content": "/*\n * gitversion.cc\n *\n *  Created on: Jan 21, 2020\n *      Author: fbischoff\n */\n\n\n#include <madness/madness_config.h>\n#include <sstream>\n#include <string>\n#include <iostream>\n\nnamespace madness {\n    namespace info {\n\n        const char* version() {\n#ifdef MADNESS_VERSION // from madness_config.h\n          return MADNESS_VERSION;\n#else\n          return \"unavailable\";\n#endif\n        }\n\n\n        const char* git_commit() {\n            return MADNESS_GIT_REVISION;\n        }\n\n        const char* git_source_description() {\n          return MADNESS_GIT_DESCRIPTION;\n        }\n\n        const char* build_time() {\n            return __TIME__;\n        }\n\n        const char* build_date() {\n            return __DATE__;\n        }\n\n        std::string print_revision_information() {\n        \tstd::stringstream ss;\n                ss << \"    git source description ...     \" << info::git_source_description() << std::endl;\n        \tconst std::string time(build_time());\n        \tconst std::string date(build_date());\n        \tss << \"    built date/time ...     \" << date << \"/\" << time << std::endl;\n        \treturn ss.str();\n        }\n\n    } // namespace info\n} // namespace madness\n\n"
  },
  {
    "path": "src/madness/misc/info.h",
    "content": "\n/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2015 Stony Brook University\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#ifndef SRC_MADNESS_MISC_INFO_H_\n#define SRC_MADNESS_MISC_INFO_H_\n\n/**\n \\file info.h\n \\brief Defines functions that give information on this version of MADNESS.\n \\ingroup configuration\n*/\n\n#include <string>\n\nnamespace madness {\n    namespace info {\n\n        /// Get the git commit number for this version.\n\n        /// \\return The git commit number.\n        const char* git_commit();\n\n        /// Get the git source tree human-readable description (see `git describe --dirty`)\n\n        /// \\return The git commit number.\n        const char* git_source_description();\n\n        /// Get the MADNESS version number.\n\n        /// \\return The MADNESS version number.\n        const char* version();\n\n        /// return the build time\n        const char* build_time();\n\n        /// return the build date\n        const char* build_date();\n\n        std::string print_revision_information();\n\n    } // namespace info\n} // namespace madness\n\n\n\n#endif /* SRC_MADNESS_MISC_INFO_H_ */\n"
  },
  {
    "path": "src/madness/misc/interp3.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#include <iostream>\n#include <cmath>\n#include <vector>\n#include <madness/world/worldinit.h>\n#include <madness/misc/interpolation_1d.h>\n\nusing namespace std;\n\n/// A simple program for testing the CubicInterpolationTable class.\n\ndouble func(double x) {\n    return sin(x);\n}\n\nint main(int argc, char* argv[]) {\n  auto& world = madness::initialize(argc, argv);\n  cout.precision(12);\n\n  // Uniform mesh for sin(x)\n  madness::CubicInterpolationTable<double> fit(world, -10.0, 30.0, 1000001, func);\n  cout << \"maxerr \" << fit.err(func) << endl;\n\n  std::vector<double> xs{0.1, 0.25, 0.3, 0.42, 0.5, 0.7, 0.8};\n  std::vector<double> ys(xs.size());\n\n  for (size_t i = 0; i < ys.size(); i++) {\n    auto& x = xs[i];\n    ys[i] = 1 + 2 * x + 3 * x*x + 4.5 * x*x*x;\n  }\n  madness::CubicInterpolationTable<double> points(xs, ys);\n\n  for (size_t i = 0; i < ys.size(); i++) {\n    if(abs(points(xs[i]) - ys[i]) > 1E-12) {\n      throw std::runtime_error(\"Point based cubic table fails\");\n    }\n  }\n\n  madness::finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/madness/misc/interpolation_1d.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_MISC_INTERPOLATION_1D_H__INCLUDED\n#define MADNESS_MISC_INTERPOLATION_1D_H__INCLUDED\n\n#include <iostream>\n#include <cmath>\n#include <vector>\n\n#include \"../world/world_task_queue.h\"\n\nnamespace madness {\n\n/*!\n  \\file misc/interpolation_1d.h\n  \\brief Provides 1D cubic interpolation class\n  \\ingroup misc\n */\n\n/// An class for 1-D data interpolation based on cubic polynomials.\n\n/// \\ingroup misc\n/// Needs to be passed the endpoints of the interpolation: [lo,hi] and the\n/// number of grid points.\n///\n/// Two methods for generating the interpolation are presently supported:\n/// 1) Pass in a std::vector containing the y-points.\n/// 2) Pass in some object that provides an appropriate () operator, perhaps\n///    a function pointer.\ntemplate <typename T> class CubicInterpolationTable {\nprotected:\n  double lo;        ///< Interpolation is in range [lo,hi]\n  double hi;        ///< Interpolation is in range [lo,hi]\n  int npt;          ///< No. of grid points\n  std::vector<T> a; ///< (1+4)*npt vector of x and polynomial coefficients\n  /// Below variables meaningful if user does specifies uniform spacing\n  double h;         ///< Grid spacing.\n  double rh;        ///< 1/h\n  /// Below variables meaningful if user provides grid points\n  std::vector<double> pts_; /// Grid points. Only stored if not evenly spaced. Empty otherwise.\n\n  // Cubic interp thru 4 points ... not good for noisy data\n  static void cubic_fit(const double *x, const T *f, T *a) {\n\n    const auto base0 = f[0] / ((x[0] - x[1]) * (x[0] - x[2]) * (x[0] - x[3]));\n    const auto base1 = f[1] / ((x[1] - x[0]) * (x[1] - x[2]) * (x[1] - x[3]));\n    const auto base2 = f[2] / ((x[2] - x[0]) * (x[2] - x[1]) * (x[2] - x[3]));\n    const auto base3 = f[3] / ((x[3] - x[0]) * (x[3] - x[1]) * (x[3] - x[2]));\n    a[3] = base0 + base1 + base2 + base3;\n    auto temp0 = -base0 * (x[1] + x[2] + x[3]);\n    auto temp1 = -base1 * (x[0] + x[2] + x[3]);\n    auto temp2 = -base2 * (x[0] + x[1] + x[3]);\n    auto temp3 = -base3 * (x[0] + x[1] + x[2]);\n    a[2] = temp0 + temp1 + temp2 + temp3;\n    temp0 = base0 * (x[1] * x[2] + x[2] * x[3] + x[3] * x[1]);\n    temp1 = base1 * (x[0] * x[2] + x[2] * x[3] + x[3] * x[0]);\n    temp2 = base2 * (x[0] * x[1] + x[1] * x[3] + x[3] * x[0]);\n    temp3 = base3 * (x[0] * x[1] + x[1] * x[2] + x[2] * x[0]);\n    a[1] = temp0 + temp1 + temp2 + temp3;\n    temp0 = -base0 * (x[1] * x[2] * x[3]);\n    temp1 = -base1 * (x[0] * x[2] * x[3]);\n    temp2 = -base2 * (x[0] * x[1] * x[3]);\n    temp3 = -base3 * (x[0] * x[1] * x[2]);\n    a[0] = temp0 + temp1 + temp2 + temp3;\n  }\n\n  // Use the x- and y-points to make the interpolation\n  void make_interpolation(const std::vector<double> &x, const std::vector<T> &p,\n                          const int npts_per_task = std::numeric_limits<int>::max() - 1,\n                          World* world_ptr = nullptr) {\n    const bool use_threads = npts_per_task < npt && world_ptr;\n\n    // Generate interior polynomial coeffs\n    const auto iend = npt - 2;\n    for (int i = 1; i < iend; i += npts_per_task) {\n      auto task = [istart = i, this, &x, &p, npts_per_task, iend]() {\n        const auto ifence = std::min(istart + npts_per_task, iend);\n        for (int i = istart; i < ifence; ++i) {\n          // Center x points for numerical stability\n          double mid = (x[i] + x[i + 1]) * 0.5;\n          double y[4] = {x[i - 1] - mid, x[i] - mid, x[i + 1] - mid,\n                         x[i + 2] - mid};\n          this->a[i * 5] = mid;\n          cubic_fit(y, &p[i - 1], &this->a[i * 5 + 1]);\n        }\n      };\n      if (use_threads)\n        world_ptr->taskq.add(task);\n      else\n        task();\n    }\n    if (use_threads)\n      world_ptr->taskq.fence();\n\n    // Fixup end points\n    for (int j = 0; j < 5; ++j) {\n      a[j] = a[5 + j];\n      a[5 * npt - 5 + j] = a[5 * npt - 10 + j] = a[5 * npt - 15 + j];\n    }\n  }\n\n  /// constructs the interpolation table using optional tasking\n  /// \\param world_ptr pointer to the World object whose local taskq to use for tasking; if null, will compute serially\n  /// \\param lo the lower bound of the interpolation interval\n  /// \\param up the upper bound of the interpolation interval\n  /// \\param npt the number of interpolation points\n  /// \\param[in] f a `T(T)` callable; should be reentrant if \\p npt is less than \\p min_npts_per_task\n  /// \\param[in] min_npts_per_task if \\p npt is greater than this and there is more than 1 thread will use tasks\n  /// \\warning computes data locally even if \\p world has more than 1 rank\n  template <typename functionT>\n  CubicInterpolationTable(\n      World* world_ptr, double lo, double hi, int npt, const functionT &f,\n      const int min_npts_per_task = std::numeric_limits<double>::max())\n      : lo(lo), hi(hi), npt(npt), a(npt * 5), h((hi - lo) / (npt - 1)), rh(1.0 / h)\n         {\n\n    // Evaluate the function to be interpolated\n    std::vector<T> p(npt);\n    std::vector<double> x(npt);\n    const int nthreads = 1 + ThreadPool::size();\n    const auto npts_per_task = std::max(min_npts_per_task, (npt + nthreads - 1)/ nthreads);\n    const auto use_threads = world_ptr && nthreads && npts_per_task < npt;\n    for (int i = 0; i < npt; i += npts_per_task) {\n      auto task = [istart = i, npts_per_task, npt, &x, &f, &p, this]() {\n        const auto ifence = std::min(istart + npts_per_task, npt);\n        for (int i = istart; i < ifence; ++i) {\n          x[i] = this->lo + i * this->h;\n          p[i] = f(x[i]);\n        }\n      };\n      if (use_threads) {\n        world_ptr->taskq.add(task);\n      }\n      else\n        task();\n    }\n    if (use_threads)\n      world_ptr->taskq.fence();\n\n    make_interpolation(x, p, npts_per_task, world_ptr);\n  }\n\npublic:\n  static int min_npts_per_task_default; //!< minimum # of points per task\n\n  CubicInterpolationTable() : lo(0.0), hi(-1.0), npt(0), h(0.0), rh(0.0) {}\n\n  /// constructs the interpolation table serially\n  /// \\param lo the lower bound of the interpolation interval\n  /// \\param up the upper bound of the interpolation interval\n  /// \\param npt the number of interpolation points\n  /// \\param[in] f a `T(T)` callable; should be reentrant if \\p npt is less than \\p min_npts_per_task\n  /// \\param[in] min_npts_per_task if \\p npt is greater than this and there is more than 1 thread will use tasks\n  template <typename functionT>\n  CubicInterpolationTable(\n      double lo, double hi, int npt, const functionT &f)\n      : CubicInterpolationTable(nullptr, lo, hi, npt, f) {}\n\n  /// constructs the interpolation table using optional tasking\n  /// \\param world the World object whose local taskq to use for tasking\n  /// \\param lo the lower bound of the interpolation interval\n  /// \\param up the upper bound of the interpolation interval\n  /// \\param npt the number of interpolation points\n  /// \\param[in] f a `T(T)` callable; should be reentrant if \\p npt is less than \\p min_npts_per_task\n  /// \\param[in] min_npts_per_task if \\p npt is greater than this and there is more than 1 thread will use tasks\n  /// \\warning computes data locally even if \\p world has more than 1 rank\n  template <typename functionT>\n  CubicInterpolationTable(\n      World& world, double lo, double hi, int npt, const functionT &f,\n      const int min_npts_per_task = min_npts_per_task_default)\n      : CubicInterpolationTable(&world, lo, hi, npt, f, min_npts_per_task) {}\n\n  CubicInterpolationTable(std::vector<T> x, std::vector<T> y)\n      : npt(static_cast<int>(x.size())), a(npt * 5) {\n\n    if (x.size() != y.size()) {\n      throw std::runtime_error(\"Sizes of input and output arrays do not equal.\");\n    }\n    // Out of paranoia, re-sort the data.\n    std::vector<int> indices(x.size());\n    std::vector<T> sorted_y(x.size());\n    std::iota(indices.begin(), indices.end(), 0);\n    std::stable_sort(indices.begin(), indices.end(), [&x](int i, int j) { return x[i] < x[j]; });\n    for (size_t i = 0; i < x.size(); i++) {\n      sorted_y[i] = y[indices[i]];\n    }\n    std::stable_sort(x.begin(), x.end());\n    lo = x[0];\n    hi = x[x.size() - 1];\n    pts_ = x;\n\n    make_interpolation(x, sorted_y);\n  }\n\n  CubicInterpolationTable(double lo, double hi, int npt,\n                          const std::vector<T> &y)\n      : lo(lo), hi(hi), npt(npt), a(npt * 5) , h((hi - lo) / (npt - 1)), rh(1.0 / h) {\n\n    if ((int)y.size() < npt)\n      throw \"Insufficient y-points\";\n\n    std::vector<double> x(npt);\n    for (int i = 0; i < npt; ++i)\n      x[i] = lo + i * h;\n\n    make_interpolation(x, y);\n  }\n\n  T operator()(double y) const {\n    int i;\n\n    if (!pts_.empty()) {\n      i = std::lower_bound(pts_.begin(), pts_.end(), y) - pts_.begin();\n      if (y < lo || y > hi) throw std::runtime_error(\"Out of range point\");\n    } else {\n      i = static_cast<int>((y - lo) * rh);\n      if (i < 0 || i >= npt) throw std::runtime_error(\"Out of range point\");\n    }\n      i *= 5;\n      T y1 = y - a[i];\n      T yy = y1 * y1;\n      return (a[i + 1] + y1 * a[i + 2]) + yy * (a[i + 3] + y1 * a[i + 4]);\n  }\n\n  double get_lo() const { return lo; }\n\n  double get_hi() const { return hi; }\n\n  template <typename functionT> double err(const functionT &f) const {\n    if (! pts_.empty()) {\n      throw \"This error test is only meaningful if f generated the interpolation.\";\n    }\n    double maxabserr = 0.0;\n    double h7 = h / 7.0;\n    for (int i = 0; i < 7 * npt; ++i) {\n      double x = lo + h7 * i;\n      T fit = (*this)(x);\n      T exact = f(x);\n      maxabserr = std::max(fabs(fit - exact), maxabserr);\n    }\n    return maxabserr;\n  }\n\n  virtual ~CubicInterpolationTable(){};\n};\n\ntemplate <typename T>\nint CubicInterpolationTable<T>::min_npts_per_task_default = 1024;\n\n}  // namespace madness\n\n#endif // MADNESS_MISC_INTERPOLATION_1D_H__INCLUDED\n"
  },
  {
    "path": "src/madness/misc/kahan_accumulator.h",
    "content": "//\n// Created by Eduard Valeyev on 10/02/21.\n//\n\n#ifndef MADNESS_MISC_KAHAN_ACCUMULATOR_H_\n#define MADNESS_MISC_KAHAN_ACCUMULATOR_H_\n\n#include <iosfwd>\n#include <type_traits>\n\nnamespace madness {\n\ntemplate <typename T, typename Enabler = void>\nstruct KahanAccumulator;\n\n/// implements Kahan summation for real numbers\ntemplate <typename Real>\nstruct KahanAccumulator<Real,\n    std::enable_if_t<std::is_floating_point_v<Real>>> {\n  KahanAccumulator() = default;\n  KahanAccumulator(const KahanAccumulator&) = default;\n  KahanAccumulator& operator=(const KahanAccumulator&) = default;\n\n  template <typename Real_,\n            typename = std::enable_if_t<std::is_floating_point_v<Real_>>>\n  KahanAccumulator(Real_ v) : value_(v) {}\n\n  KahanAccumulator(Real v, Real c) : value_(v), correction_(c) {}\n\n  template <typename Real_>\n  KahanAccumulator(KahanAccumulator<Real_> v)\n      : value_(v.value_), correction_(v.correction_) {}\n\n  explicit operator Real() const { return value_ + correction_; }\n\n  template <typename Real_,\n            typename = std::enable_if_t<std::is_floating_point_v<Real_>>>\n  KahanAccumulator& operator+=(Real_ v) {\n    volatile auto y = v - correction_;\n    volatile auto t = value_ + y;\n    correction_ = (t - value_) - y;\n    value_ = t;\n    return *this;\n  }\n\n  template <typename Real_,\n            typename = std::enable_if_t<std::is_floating_point_v<Real_>>>\n  KahanAccumulator& operator-=(Real_ v) {\n    volatile auto minus_y = v + correction_;\n    volatile auto t = value_ - minus_y;\n    correction_ = (t - value_) + minus_y;\n    value_ = t;\n    return *this;\n  }\n\n  template <typename Real_>\n  KahanAccumulator& operator+=(const KahanAccumulator<Real_>& v) {\n    *this += v.correction_;\n    *this += v.value_;\n    return *this;\n  }\n\n  template <typename Real_>\n  KahanAccumulator& operator-=(const KahanAccumulator<Real_>& v) {\n    *this -= v.correction_;\n    *this -= v.value_;\n    return *this;\n  }\n\n  KahanAccumulator operator-() const {\n    return KahanAccumulator(-value_, -correction_);\n  }\n\n  auto value() const { return value_; }\n  auto correction() const { return correction_; }\n\n  template <typename Archive>\n  void serialize(Archive& ar) {\n    ar& value_& correction_;\n  }\n\n private:\n  Real value_ = Real{0};\n  Real correction_ = Real{0};\n};\n\ntemplate <typename Real1, typename Real2>\nauto operator+(KahanAccumulator<Real1> v1, Real2 v2) {\n  KahanAccumulator<decltype(std::declval<Real1>() + std::declval<Real2>())>\n      result(v1);\n  result += v2;\n  return result;\n}\n\ntemplate <typename Real1, typename Real2>\nauto operator+(Real2 v2, KahanAccumulator<Real1> v1) {\n  KahanAccumulator<decltype(std::declval<Real1>() + std::declval<Real2>())>\n      result(v1);\n  result += v2;\n  return result;\n}\n\ntemplate <typename Real1, typename Real2>\nauto operator+(KahanAccumulator<Real1> v1, KahanAccumulator<Real2> v2) {\n  KahanAccumulator<decltype(std::declval<Real1>() + std::declval<Real2>())>\n      result(v1);\n  result += v2;\n  return result;\n}\n\ntemplate <typename Real1, typename Real2>\nauto operator-(KahanAccumulator<Real1> v1, Real2 v2) {\n  KahanAccumulator<decltype(std::declval<Real1>() - std::declval<Real2>())>\n      result(v1);\n  result -= v2;\n  return result;\n}\n\ntemplate <typename Real1, typename Real2>\nauto operator-(Real2 v2, KahanAccumulator<Real1> v1) {\n  KahanAccumulator<decltype(std::declval<Real2>() - std::declval<Real1>())>\n      result(v2);\n  result -= v1;\n  return result;\n}\n\ntemplate <typename Real1, typename Real2>\nauto operator-(KahanAccumulator<Real1> v1, KahanAccumulator<Real2> v2) {\n  KahanAccumulator<decltype(std::declval<Real1>() - std::declval<Real2>())>\n      result(v1);\n  result -= v2;\n  return result;\n}\n\ntemplate <typename Char, typename Real>\nstd::basic_ostream<Char>& operator<<(std::basic_ostream<Char>& os,\n                                     const KahanAccumulator<Real>& v) {\n  os << \"{\" << v.value() << \",\" << v.correction() << \"}\";\n  return os;\n}\n\n/// implements Kahan summation for complex numbers\ntemplate <typename Complex>\nstruct KahanAccumulator<Complex,\n                        std::enable_if_t<!std::is_floating_point_v<Complex>>> {\n  using Real = typename Complex::value_type;\n  using RealAccumulator = KahanAccumulator<Real>;\n\n  KahanAccumulator() = default;\n  KahanAccumulator(const KahanAccumulator&) = default;\n  KahanAccumulator& operator=(const KahanAccumulator&) = default;\n\n  template <typename Complex_,\n            typename = std::enable_if_t<!std::is_floating_point_v<Complex_>>>\n  KahanAccumulator(const Complex_& v) : real_(v.real()), imag_(v.imag()) {}\n\n  template <typename Complex_>\n  KahanAccumulator(const KahanAccumulator<Complex_>& v)\n      : real_(v.real_), imag_(v.imag_) {}\n\n  explicit operator Complex() const { return Complex(static_cast<Real>(real_), static_cast<Real>(imag_)); }\n\n  template <typename Complex_,\n            typename = std::enable_if_t<!std::is_floating_point_v<Complex_>>>\n  KahanAccumulator& operator+=(const Complex_& v) {\n    real_ += v.real();\n    imag_ += v.imag();\n    return *this;\n  }\n\n  template <typename Complex_,\n            typename = std::enable_if_t<!std::is_floating_point_v<Complex_>>>\n  KahanAccumulator& operator-=(const Complex_& v) {\n    real_ -= v.real();\n    imag_ -= v.imag();\n    return *this;\n  }\n\n  template <typename Complex_>\n  KahanAccumulator& operator+=(const KahanAccumulator<Complex_>& v) {\n    real_ += v.real();\n    imag_ += v.imag();\n    return *this;\n  }\n\n  template <typename Complex_>\n  KahanAccumulator& operator-=(const KahanAccumulator<Complex_>& v) {\n    real_ -= v.real();\n    imag_ -= v.imag();\n    return *this;\n  }\n\n  template <typename Archive>\n  void serialize(Archive& ar) {\n    ar& real_& imag_;\n  }\n\nprivate:\n  RealAccumulator real_ = {};\n  RealAccumulator imag_ = {};\n};\n\n}  // namespace madness\n\n#endif  // MADNESS_MISC_KAHAN_ACCUMULATOR_H_\n"
  },
  {
    "path": "src/madness/misc/misc.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MISC_MISC_H__INCLUDED\n#define MADNESS_MISC_MISC_H__INCLUDED\n\n/// \\file misc.h\n/// \\brief Header to declare stuff which has not yet found a home\n\n#include <madness/world/madness_exception.h>\n#include <iostream>\n#include <string>\n\nnamespace madness {\n    unsigned long checksum_file(const char* filename);\n    std::istream& position_stream(std::istream& f, const std::string& tag, bool rewind=true);\n    std::istream& position_stream_to_word(std::istream& f, const std::string& tag,\n                                          const char comment='#', bool rewind=true, bool silent=false);\n    std::string lowercase(const std::string& s);\n    void gprofexit(int id, int nproc);\n    /// creates a unique filename, using PBS ID if available\n    std::string unique_fileid();\n\n    // get the memory usage of the current process in byte\n    long get_memory_usage();\n\n    bool nearlyEqual(double a, double b, double epsilon = 1e-9);\n}\n\n#endif // MADNESS_MISC_MISC_H__INCLUDED\n\n\n\n"
  },
  {
    "path": "src/madness/misc/numerics.cc",
    "content": "//\n// Created by Jonathon Misiewicz on 5/16/23.\n//\n\n#include <madness/misc/misc.h>\n\n#include <limits>\n\nnamespace madness {\n    // Soft equality check\n    bool nearlyEqual(double a, double b, double epsilon) {\n        // Handle equality (also covers infinity)\n        if (a == b) return true;\n\n        double diff = std::abs(a - b);\n        double norm = std::min((std::abs(a) + std::abs(b)), std::numeric_limits<double>::max());\n\n        // Use relative epsilon for large numbers, absolute for small numbers\n        return diff < std::max(epsilon, epsilon * norm);\n    }\n}\n"
  },
  {
    "path": "src/madness/misc/phandler.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MISC_PHANDLER_H__INCLUDED\n#define MADNESS_MISC_PHANDLER_H__INCLUDED\n\n/// \\file misc/phandler.h\n/// \\brief Interface for the muParser library for turning user-defined functions into bytecode.\n\n/* Example:\n\n   #include <madness/misc/phandler.h>\n\n    typedef FunctionFactory<double,3> factoryT;\n    typedef std::shared_ptr< FunctionFunctorInterface<double, 3> > functorT;\n    Function<double,3> pFunc = factoryT(world).functor(functorT(\n                      new ParserHandler<double,3>(\"exp(-abs(r))\")));\n\n    pfunc.compress();\n\n    ...\n*/\n\n#include <madness/external/muParser/muParser.h>\n#include <string>\n#include <madness/mra/mra.h>\n\n// T can be double or complex, but muParser results will always be real\n// NDIM can be 1 to 6\n// Varables allowed in strings are x,y,z,u,v,w, and r\n// \"r\" will always mean magnitude of given vector\n\ntemplate <typename T, int NDIM>\nclass ParserHandler : public madness::FunctionFunctorInterface<T, NDIM> {\n\n  private:\n    mu::Parser parser;                   // the string-to-function parser\n    static const int MAX_DIM = 6;\n    mutable double vars[MAX_DIM];              // variables used in expression\n    mutable double r;                    // distance to origin\n    typedef madness::Vector<double, NDIM> coordT;\n\n  public:\n    ParserHandler(std::string expr)   {\n        if (NDIM > MAX_DIM) MADNESS_EXCEPTION(\"too many dim for parser!\",0);\n        try {\n          if (NDIM >= 1) parser.DefineVar(\"x\", &vars[0]);\n          if (NDIM >= 2) parser.DefineVar(\"y\", &vars[1]);\n          if (NDIM >= 3) parser.DefineVar(\"z\", &vars[2]);\n          if (NDIM >= 4) parser.DefineVar(\"u\", &vars[3]);\n          if (NDIM >= 5) parser.DefineVar(\"v\", &vars[4]);\n          if (NDIM >= 6) parser.DefineVar(\"w\", &vars[5]);\n          parser.DefineVar(\"r\", &r);\n          parser.SetExpr(expr);\n        } catch (mu::Parser::exception_type &e) {\n          std::cout << \"muParser: \" << e.GetMsg() << std::endl;\n        }\n    }\n\n    virtual T operator() (const coordT &vals_in) const {\n      r = 0;\n      for (int i = 0; i < NDIM; ++i) {\n        vars[i] = vals_in[i];\n        r += vals_in[i]*vals_in[i];\n      }\n      r = sqrt(r);\n\n      try {\n        return parser.Eval();\n      } catch (mu::Parser::exception_type &e) {\n        std::cout << \"muParser: \" << e.GetMsg() << std::endl;\n        return 0.0;\n      }\n    } // end operator()\n\n    void changeExpr(const std::string newExpr) {\n      try {\n        parser.SetExpr(newExpr);\n      } catch (mu::Parser::exception_type &e) {\n        std::cout << \"muParser: \" << e.GetMsg() << std::endl;\n      }\n    }\n}; // end class parserhandler\n\n#endif // MADNESS_MISC_PHANDLER_H__INCLUDED\n"
  },
  {
    "path": "src/madness/misc/position_stream.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/misc/misc.h>\n#include <sstream>\n\nnamespace madness {\n    std::istream& position_stream(std::istream& f, const std::string& tag, bool rewind) {\n        if (rewind) f.seekg(0);\n        std::string s;\n        while (std::getline(f,s)) {\n            std::string::size_type loc = s.find(tag, 0);\n            if(loc != std::string::npos) return f;\n        }\n        std::string errmsg = std::string(\"position_stream: failed to locate \") + tag;\n        MADNESS_EXCEPTION(errmsg.c_str(),0);\n    }\n\n    /// position the input stream to tag, which must be a word (not part of a word)\n\n    /// \\param f        input stream\n    /// \\param tag      the word to look for\n    /// \\param comment  a comment character for (parts of) a line\n    /// \\param rewind   rewind to the beginning of the stream\n    /// \\param silent   throws if not successful, but doesn't print error message\n    /// \\return         a stream\n    std::istream& position_stream_to_word(std::istream& f, const std::string& tag, const char comment, bool rewind,\n                                          bool silent) {\n        if (rewind) f.seekg(0);\n        std::string line, word;\n        while (std::getline(f,line)) {\n            // remove comments from line\n            std::size_t last = line.find_first_of(comment);\n            std::string line1=line.substr(0,last);\n\n            // check for tag in line\n            std::stringstream sline(line1);\n            while (sline >> word) {\n                if (tag==word) {        // found tag as a full word in line\n                    std::string::size_type loc = line.find(tag, 0);\n                    if (loc != std::string::npos) return f;\n                }\n            }\n        }\n\n        std::string errmsg = std::string(\"position_stream: failed to locate \") + tag;\n        if (silent) {\n            throw MadnessException(errmsg.c_str(),0,0,__LINE__,__FUNCTION__,__FILE__); \\\n        } else {\n            printf(\"%s\\n\",errmsg.c_str());\n            MADNESS_EXCEPTION(errmsg.c_str(),0);\n        }\n        return f;\n    }\n\n\n    std::string lowercase(const std::string& s) {\n        std::string r(s);\n        for (unsigned int i=0; i<r.size(); ++i) r[i] = tolower(r[i]);\n        return r;\n    }\n\n}\n\n"
  },
  {
    "path": "src/madness/misc/ran.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/misc/ran.h>\n#include <iostream>\n#include <algorithm>\n#include <cstdio>\n#include <limits.h>\nusing std::fopen;\nusing std::fwrite;\n\n\nnamespace madness {\n\n\n    void Random::generate() {\n        // Assume we have the lock when we come in here\n\n        double * MADNESS_RESTRICT ur = const_cast<double*>(u);\n        double * MADNESS_RESTRICT us = const_cast<double*>(u)+r-s;\n        for (int i=0; i<s; ++i) {\n            double t = ur[i] + beta*us[i];\n            ur[i] = t - int(t);\n        }\n\n        ur = const_cast<double*>(u)+s;\n        us = const_cast<double*>(u);\n        int rs = r-s;\n        for (int i=0; i<rs; ++i) {\n            double t = ur[i] + beta*us[i];\n            ur[i] = t - int(t);\n        }\n\n        cur = 0;\n    }\n\n    unsigned int Random::simple() {\n        return simple_state = 1103515245U*simple_state + 12345U;\n    }\n\n\n    Random::Random(unsigned int seed) : r(1279), s(861), beta(7.0), cur(0), u(new double [r]) {\n        // If you switch r don't forget to change size in RandomState\n\n        // a) not clear if beta != 1 is an improvement.\n        // b) must ensure s >= r/2.\n        // c) r=19937, s=10095 or r=1279, s=861 seem worse than 4423/3004 ?\n        // Random(unsigned int seed = 5461) : r(4423), s(3004), beta(7.0), cur(0) {\n\n        setstate(seed);\n    }\n\n    void Random::setstate(unsigned int seed) {\n        ScopedMutex<Mutex> safe(this);\n        // Initialize startup generator\n        if ((seed&1) == 0) seed += 1;\n        simple_state = seed;\n        for (int i=0; i<10*r; ++i) simple();\n\n        // Initialize stream with 48 bit values by first generating\n        // roughly 52 bit values and then truncating to exactly 48 bits\n        double two21 = 2097152.0;\n        double two52 = 4503599627370496.0;\n        double two24 = 16777216.0;\n        double rtwo24 = 5.9604644775390625e-08;\n        for (int i=0; i<r; ++i) u[i] = double(simple());\n        for (int i=0; i<r; ++i) u[i] += double(simple())*two21;\n        for (int i=0; i<r; ++i) u[i] /= two52;\n        // Next line breaks on Cray X1 CC 5.3 ... sigh\n        //for (int i=0; i<r; ++i) u[i] -= int(u[i]);\n        for (int i=0; i<r; ++i) {int tmp=int(u[i]); u[i] -= double(tmp);}\n        for (int i=0; i<r; ++i) {\n            int high = int(two24*u[i]);\n            int lo = int(two24*(two24*u[i]-high));\n            u[i] = rtwo24*(high + rtwo24*lo);\n        }\n\n        // Verify that we have only set 48 bits and that at least\n        // some of the 48th bits are set.\n        double n48 = 0;\n        for (int i=0; i<r; ++i) {\n            double rem = u[i]*two24;\n            rem -= int(rem);\n            double rem48 = rem*two24;\n            rem48 -= int(rem48);\n            if (rem48 != 0) throw \"Random: bad bits?\";\n\n            double rem47 = rem*two24*0.5;\n            rem47 -= int(rem47);\n            if (rem47 != 0) ++n48;\n        }\n        if (n48 == 0) throw \"Random: bad 48'th bit?\";\n\n        // Warm up\n        for (int i=0; i<2000; ++i) generate();\n    }\n\n    Random::~Random() {delete [] u;}\n\n\n    //     // Might be faster than the one-byte-per-word version\n    //     void getbytes(int n, unsigned char * MADNESS_RESTRICT v) {\n    //         const double two24 = 16777216.0;\n    //         int n6 = n%6;\n    //         n -= n6;\n    //         while (n>0) {\n    //             if (cur >= r) generate();\n    //             int ndo = std::min(n/6,r-cur);\n    //             for (int i=0; i<ndo; ++i) {\n    //                 unsigned int high = int(two24*u[i+cur]);\n    //                 unsigned int lo = int(two24*(two24*u[i+cur]-high));\n    //                 *v++ = (high>>16)&0xff;\n    //                 *v++ = (high>>8 )&0xff;\n    //                 *v++ = (high    )&0xff;\n    //                 *v++ = (lo>>16 )&0xff;\n    //                 *v++ = (lo>>8  )&0xff;\n    //                 *v++ = (lo     )&0xff;\n    //             };\n    //             n -= ndo*6;\n    //             cur += ndo;\n    //         }\n    //         for (int i=0; i<n6; ++i) *v++ = (unsigned char) (256*get());\n    //     };\n\n    void Random::getbytes(int n, unsigned char * MADNESS_RESTRICT v) {\n        ScopedMutex<Mutex> safe(this);\n        while (n) {\n            if (cur >= r) generate();\n            int ndo = std::min(n,r-cur);\n            const double* ucur = const_cast<const double*>(u) + cur;\n            for (int i=0; i<ndo; ++i) v[i] = (unsigned char) (256.0*ucur[i]);\n            n -= ndo;\n            v += ndo;\n            cur += ndo;\n        }\n    }\n\n    RandomState Random::getstate() const {\n        ScopedMutex<Mutex> safe(this);\n        RandomState s;\n        s.cur = cur;\n        for (int i=0; i<r; ++i) s.u[i] = u[i];\n        return s;\n    }\n\n    void Random::setstate(const RandomState &s) {\n        ScopedMutex<Mutex> safe(this);\n        cur = s.cur;\n        for (int i=0; i<r; ++i) u[i] = s.u[i];\n    }\n\n\n    void Random::test() {\n        // Crude tests just to find gross errors ... the file written\n        // at the end is used as input to diehard.\n        Random r;\n        double sum1 = 0;\n        double sum2 = 0;\n        double x12 = 0;\n        double two24 = 16777216.0;\n\n        double n = 100000000.0;\n        double nn = n;\n        const int nbuf = 64;\n        nn /= nbuf;\n        n = nn*nbuf;\n\n        double buf[nbuf];\n\n        while (nn--) {\n            r.getv(nbuf,buf);\n            for (int i=0; i<nbuf; ++i) {\n                double d1 = buf[i];\n                sum1 += d1;\n                double d2 = d1 * two24;\n                d2 -= int(d2);\n                sum2 += d2;\n                x12 += (d1-0.5)*(d2-0.5);\n            }\n        }\n\n        std::cout << \"high   \" << sum1/n << std::endl;\n        std::cout << \"lo     \" << sum2/n << std::endl;\n        std::cout << \"hi-lo  \" << x12/n << std::endl;\n\n        const int nb = 100000000;\n        unsigned char *b = new unsigned char[nb+1];\n\n        b[nb-1] = 0;\n        b[nb] = 99;\n        r.getbytes(nb,b);\n\n        std::cout << int(b[nb-1]) << std::endl;\n        std::cout << int(b[nb]) << std::endl;\n\n        FILE *f = fopen(\"stream\",\"w+\");\n        if (!f) {std::cout << \"fopen?\\n\"; std::exit(1);}\n        fwrite(b, 1, nb, f);\n        fclose(f);\n    }\n\n    Random default_random_generator;\n\n\n    template <> double RandomValue<double> () {\n        return default_random_generator.get();\n    }\n\n    template <> float RandomValue<float> () {\n        return float(default_random_generator.get());\n    }\n\n    template <> double_complex RandomValue<double_complex> () {\n        return double_complex(RandomValue<double>(),RandomValue<double>());\n    }\n\n    template <> float_complex RandomValue<float_complex> () {\n        return float_complex(RandomValue<float>(),RandomValue<float>());\n    }\n\n    template <> int RandomValue<int> () {\n        return int(2147483648.0 * RandomValue<double>());\n    }\n\n    template <> long RandomValue<long> () {\n        return long(2147483648.0 * RandomValue<double>());\n    }\n\n    template <> void RandomVector<double>(int n, double* t) {\n        default_random_generator.getv(n, t);\n    }\n\n    template <> void RandomVector<float>(int n, float* t) {\n        default_random_generator.getv(n, t);\n    }\n\n    template <> void RandomVector<double_complex>(int n, double_complex* t) {\n        default_random_generator.getv(2*n, (double*)(t));\n    }\n\n    template <> void RandomVector<float_complex>(int n, float_complex* t) {\n        default_random_generator.getv(2*n, (float*)(t));\n    }\n}\n\n// using namespace madness;\n\n// int main() {\n//     Random::test();\n//     return 0;\n// }\n"
  },
  {
    "path": "src/madness/misc/ran.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MISC_RAN_H__INCLUDED\n#define MADNESS_MISC_RAN_H__INCLUDED\n\n#include <madness/madness_config.h>\n#include <madness/world/thread.h>\n\n#include <complex>\ntypedef std::complex<float> float_complex;\ntypedef std::complex<double> double_complex;\n\n\nnamespace madness {\n\n    struct RandomState {\n        int cur;\n        double u[1279];\n    };\n\n    /// A random number generator (portable, vectorized, and thread-safe)\n\n    /// Following Brent 1992, we use a 48-bit generalized Fibonacci generator\n    /// \\code\n    ///     u[n] = alpha*u[n-r] + beta*u[n-s] mod m\n    /// \\endcode\n    /// with alpha=1, beta=7, r=1279, s=861, m=2^48.  Double precision\n    /// numbers are used to perform exact integer arithmetic.  48-bit\n    /// because we have 52 bits of mantissa, alpha+1 is 3 bits and 1 bit spare.\n    ///\n    /// The period is nominally 2^m (2^r - 1) / 2 but if p is the period,\n    /// X[n] and X[n+p/2k] differ by at most k bits (0 < k < 48) so usage\n    /// should be limited to the first 2^r-1 entries (about 10^385 values).\n    ///\n    /// Each instance provides a separate stream, but it is up to the\n    /// user to partition the sequence by selecting distinct seeds or\n    /// other means.\n    ///\n    /// The streams are thread safe.\n    ///\n    /// A default stream is provided as madness::default_random_generator.\n    class Random : private Mutex {\n    private:\n        const int r;\n        const int s;\n        const double beta;\n        int cur; // Removed volatile since always access in scope of mutex with implied barriers\n        double* const u;\n        unsigned int simple_state;\n\n        void generate();\n\n        unsigned int simple();\n\n    public:\n        Random(unsigned int seed = 5461);\n\n        virtual ~Random();\n\n        double get() {\n            ScopedMutex<Mutex> safe(this);\n            if (cur >= r) generate();\n            return u[cur++];\n        }\n\n        /// Returns a vector of uniform doubles in [0,1)\n        template <typename T>\n        void getv(int n, T * MADNESS_RESTRICT v) {\n            ScopedMutex<Mutex> safe(this);\n            while (n) {\n                if (cur >= r) generate();\n                int ndo = std::min(n,r-cur);\n                const double* ucur = const_cast<const double*>(u) + cur;\n                for (int i=0; i<ndo; ++i) v[i] = (T)(ucur[i]);\n                n -= ndo;\n                v += ndo;\n                cur += ndo;\n            }\n        }\n\n        /// Returns vector of random bytes in [0,256)\n        void getbytes(int n, unsigned char * MADNESS_RESTRICT v);\n\n        /// Returns full state of the generator\n        RandomState getstate() const;\n\n        /// Restores state of the generator\n        void setstate(const RandomState &s);\n\n        /// Sets state of the generator from integer\n        void setstate(unsigned int seed);\n\n        /// Test the generator\n        static void test();\n    };\n\n\n    /// The default random number stream\n    extern Random default_random_generator;\n\n    /// Random value that wraps the default Fibonacci generator\n    template <class T> T RandomValue();\n\n    /// Random double\n    template <> double RandomValue<double> ();\n\n    /// Random float\n    template <> float RandomValue<float> ();\n\n    /// Random int\n    template <> int RandomValue<int> ();\n\n    /// Random long\n    template <> long RandomValue<long> ();\n\n    /// Random double_complex\n    template <> double_complex RandomValue<double_complex> ();\n\n    /// Random float_complex\n    template <> float_complex RandomValue<float_complex> ();\n\n    template <class T> void RandomVector(int n, T* t) {\n        for (int i=0; i<n; ++i) t[i] = RandomValue<T>();\n    }\n\n    template <> void RandomVector<double>(int n, double* t);\n\n    template <> void RandomVector<float>(int n, float* t);\n\n    template <> void RandomVector<double_complex>(int n, double_complex* t);\n\n    template <> void RandomVector<float_complex>(int n, float_complex* t);\n}\n\n#endif // MADNESS_MISC_RAN_H__INCLUDED\n"
  },
  {
    "path": "src/madness/misc/test_gnuplot.cc",
    "content": "#include <madness/misc/gnuplot.h>\n\nint main (void)\n{\n    madness::Gnuplot::test();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/misc/unique_filename.cc",
    "content": "//\n// Created by Florian Bischoff/chatgpt on 9/7/23.\n//\n\n#include<madness/misc/misc.h>\n#include<madness/misc/ran.h>\n\n#if defined(HAVE_RESOURCE_H)\n#include <sys/resource.h>\n#endif\n\nnamespace madness {\n    std::string unique_fileid() {\n        std::string uniqueFileName;\n\n        // Check if the PBS_JOBID environment variable is set\n        const char* pbsId = std::getenv(\"PBS_JOBID\");\n        if (pbsId != nullptr) {\n            uniqueFileName =std::string(pbsId);\n        } else {\n            // If PBS_ID is not available, generate a random number\n            int randomNumber = RandomValue<int>();\n            uniqueFileName = std::to_string(randomNumber);\n        }\n\n        return uniqueFileName;\n    }\n\n    long get_memory_usage() {\n        long mem = 0;\n//#ifdef HAVE_RESOURCE_H\n#if defined(HAVE_RESOURCE_H)\n        struct rusage usage;\n        getrusage(RUSAGE_SELF, &usage);\n        mem = usage.ru_maxrss;\n#endif\n        return mem;\n    }\n\n}"
  },
  {
    "path": "src/madness/mra/CMakeLists.txt",
    "content": "# src/madness/mra\n\nadd_definitions(-DMRA_DATA_DIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\")\n\n# Set the MRA sources and header files\nset(MADMRA_HEADERS\n    adquad.h  funcimpl.h  indexit.h  legendre.h  operator.h  vmra.h\n    funcdefaults.h  key.h  mra.h  power.h  qmprop.h  twoscale.h lbdeux.h\n    mraimpl.h  funcplot.h  function_common_data.h function_factory.h\n    function_interface.h gfit.h convolution1d.h simplecache.h derivative.h\n    displacements.h functypedefs.h sdf_shape_3D.h sdf_domainmask.h vmra1.h\n    leafop.h nonlinsol.h macrotaskq.h macrotaskpartitioner.h QCCalculationParametersBase.h\n    commandlineparser.h operatorinfo.h bc.h kernelrange.h mw.h memory_measurement.h)\nset(MADMRA_SOURCES\n    mra1.cc mra2.cc mra3.cc mra4.cc mra5.cc mra6.cc startup.cc legendre.cc \n    twoscale.cc qmprop.cc QCCalculationParametersBase.cc)\n\n# Create the MADmra library\nadd_mad_library(mra MADMRA_SOURCES MADMRA_HEADERS \"linalg;tinyxml;muparser\" \"madness/mra\")\ninstall(FILES autocorr coeffs gaussleg ble-first.txt ble-second.txt b-spline-deriv1.txt b-spline-deriv2.txt b-spline-deriv3.txt\n    DESTINATION \"${MADNESS_INSTALL_DATADIR}\"\n    COMPONENT mra)\n\n# Create executables\nif (NOT MADNESS_BUILD_LIBRARIES_ONLY)\n  add_mad_executable(mraplot \"mraplot.cc\" \"MADmra\") # installation fails with gnu-8 and gnu-9\n  install(TARGETS mraplot DESTINATION \"${MADNESS_INSTALL_BINDIR}\")\nendif()\n\n# Add unit tests    \nif(BUILD_TESTING)\n\n  # The list of unit test source files\n  add_library(libtest_sepop EXCLUDE_FROM_ALL test_sepop.cc)\n  target_link_libraries(libtest_sepop MADmra)\n  \n  set(MRA_TEST_SOURCES testbsh.cc testproj.cc\n      testpdiff.cc testdiff1Db.cc testgconv.cc testopdir.cc testinnerext.cc\n      testgaxpyext.cc testvmra.cc, test_vectormacrotask.cc test_cloud.cc test_tree_state.cc testsolver.cc\n      test_macrotaskpartitioner.cc test_QCCalculationParametersBase.cc test_memory_measurement.cc\n      test_keybox.cc)\n  add_unittests(mra \"${MRA_TEST_SOURCES}\" \"MADmra;MADgtest\" \"unittests;short\")\n  set(MRA_SEPOP_TEST_SOURCES testsuite.cc\n      testper.cc)\n  add_unittests(mra_sepop \"${MRA_SEPOP_TEST_SOURCES}\" \"libtest_sepop;MADgtest\" \"unittests;short\")\n  \n  # Add MPI tests for test_memory_measurement\n  # MPI options can be set at runtime via MADNESS_MPI_NODE_OPTIONS environment variable\n  # Example: MADNESS_MPI_NODE_OPTIONS=\"--hostfile /path/to/hostfile --map-by node\" ctest -R mpi\n  # use with more processes as:\n  # add_mpi_tests(mra test_memory_measurement \"2;4;8\" \"MADmra;MADgtest\" \"unittests;short\")\n  add_mpi_tests(mra test_memory_measurement \"2\" \"MADmra;MADgtest\" \"unittests;short\")\n  add_mpi_tests(mra test_cloud \"2\" \"MADmra;MADgtest\" \"unittests;short\")\n  add_mpi_tests(mra test_vectormacrotask \"2\" \"MADmra;MADgtest\" \"unittests;short\")\n\n  # Test executables that are not run with unit tests ... consider these executables (unlike unit tests)\n  if (NOT MADNESS_BUILD_LIBRARIES_ONLY)\n    set(MRA_OTHER_TESTS testperiodic testbc testqm test6\n        testdiff1D testdiff2D testdiff3D)\n  \n    foreach(_test ${MRA_OTHER_TESTS})\n      add_mad_executable(${_test} \"${_test}.cc\" \"MADmra\")\n    endforeach()\n  endif()\n  \nendif()\n"
  },
  {
    "path": "src/madness/mra/QCCalculationParametersBase.cc",
    "content": "/*\n * QCCalculationParametersBase.cpp\n *\n *  Created on: 27 Jun 2019\n *      Author: fbischoff\n */\n\n#include\"QCCalculationParametersBase.h\"\n#include <iostream>\n#include <fstream>\n#include <iomanip>\n#include\"worldgop.h\"\n\n\n\nnamespace madness {\n\n\n\n\n/// print all parameters\nvoid QCCalculationParametersBase::print(const std::string header,\n\t\tconst std::string footer) const {\n\n\tstd::string body=print_to_string({\"all\"});\n\tif (header.size()>0) madness::print(header);\n\t::madness::print(body);\n\tif (footer.size()>0) madness::print(footer);\n}\n\nstd::string QCCalculationParametersBase::print_to_string(const std::list<std::string> precedence) const {\n\n\t// sort parameters according to increasing print_order\n\ttypedef std::tuple<int,std::string,QCParameter> keyvalT;\n\tstd::list<keyvalT> list;\n\tfor (auto& p : parameters) list.push_back(keyvalT(p.second.get_print_order(),p.first,p.second));\n\tlist.sort([](const keyvalT& first, const keyvalT& second) {return std::get<0>(first) < std::get<0>(second);});\n\n\t// check if we have to print only non-default parameters\n\tbool print_all = std::find(precedence.begin(), precedence.end(), \"all\") != precedence.end();\n\tbool print_default = std::find(precedence.begin(), precedence.end(), \"default\") != precedence.end();\n\tbool print_derived = std::find(precedence.begin(), precedence.end(), \"derived\") != precedence.end();\n\tbool print_defined = std::find(precedence.begin(), precedence.end(), \"defined\") != precedence.end();\n\n\tstd::stringstream ss;\n    int counter=0;\n\tfor (auto& p : list) {\n\t\tconst QCParameter& param=std::get<2>(p);\n\t\tbool skip=\n\t\t\t(not print_default and param.precedence == QCParameter::def) or\n\t\t\t(not print_derived and param.precedence == QCParameter::derived) or\n\t\t\t(not print_defined and param.precedence == QCParameter::defined);\n\t\tif (print_all) skip=false;\n\t\tif (skip) continue;\n\t\tif ((counter++)>0) ss << std::endl; // no newline at the very end\n\t\tss << param.print_line(std::get<1>(p));\n\t}\n\treturn ss.str();\n}\n\n\nbool QCCalculationParametersBase::file_exists(World& world, std::string filename) const {\n    bool file_exists = true;\n    if (world.rank() == 0) {\n        std::ifstream ifs(filename);\n        if (not ifs.is_open()) file_exists=false;\n        ifs.close();\n    }\n    world.gop.broadcast_serializable(file_exists, 0);\n    return file_exists;\n}\n\n/// read the parameters from file and broadcast\nvoid QCCalculationParametersBase::read_input(World& world, const std::string filename, const std::string tag) {\n\n\tstd::string filecontents, line;\n    std::string errmsg;\n\tif (world.rank()==0) {\n        try {\n            std::ifstream f(filename.c_str());\n            while (std::getline(f, line)) filecontents += line + \"\\n\";\n            read_internal(world, filecontents, tag);\n        } catch (std::invalid_argument& e) {\n            errmsg=e.what();\n            throw;\n        } catch (std::exception& e) {\n            std::stringstream ss;\n            ss << \"could not read data group >>\" << tag << \"<< in file \" << filename;\n            errmsg=ss.str();\n        }\n    }\n\tworld.gop.broadcast_serializable(*this, 0);\n    if (errmsg.size()>0) throw std::runtime_error(errmsg);\n}\n\n/// read the parameters from the command line and broadcast\n\n/// syntax is: qcprogram --mp2='maxiter 10; freeze 1' --dft:maxiter=20 --Xmpi:debug=true\n/// the argument in quotes is the value of the parser keys\nvoid QCCalculationParametersBase::read_commandline_options(World& world, const commandlineparser& parser,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   const std::string tag) {\n\tif (not parser.key_exists(tag)) return;\n\tstd::string value=parser.value(tag);\n\t// turn this into a fake input file\n\tif (world.rank()==0) {\n        std::string q=\"'\";\n\t\tstd::replace_copy(value.begin(), value.end(), value.begin(), q.c_str()[0] , ' ');\n\t\tstd::replace_copy(value.begin(), value.end(), value.begin(), ';', '\\n');\n\t\tvalue=tag+\"\\n\"+value+\"\\nend\";\n//        print(\"value\",value);\n\t\tread_internal(world, value,tag);\n\t}\n\tworld.gop.broadcast_serializable(*this, 0);\n}\n\n\n\n/// read the stream, starting from tag\n\n/// only parameters that are defined in the constructor will be processed,\n/// all others will be discarded.\nvoid QCCalculationParametersBase::read_internal(World& world, std::string& filecontents, std::string tag) {\n\tstd::stringstream f(filecontents);\n\tposition_stream_to_word(f, tag, '#', true, true);\n\tstd::string line, key,value;\n\n\t// read input lines\n\twhile (std::getline(f,line)) {\n\n\t\t// all in lower case\n\t\tstd::transform(line.begin(), line.end(), line.begin(), ::tolower);\n\n\t\t// remove comments from line\n\t\tstd::size_t last = line.find_first_of('#');\n\t\tline=line.substr(0,last);\n        std::replace_copy(line.begin(), line.end(), line.begin(),'=', ' ');\n\n\t\tstd::stringstream sline(line);\n\n\t\t// sline might be empty by now\n\t\tif (not (sline >> key)) continue;\n\t\tif (print_debug) ::madness::print(\"reading key \",key);\n\n\t\t// skip comment line\n\t\tif (key[0]=='#') continue;\n\t\tif (key==\"end\") break;\n\n\t\t// check if key exists in the initialized parameter list\n\t\tif (not (parameter_exists(key))) {\n            if (not ignore_unknown_keys) {\n                if (world.rank()==0) {\n                    ::madness::print(\"found unknown key: \",key);\n                    ::madness::print(\"in datagroup:      \",tag);\n                }\n                throw std::runtime_error(\"input error\");\n            }\n            if ((not ignore_unknown_keys_silently)\n                and (world.rank()==0)) madness::print(\"ignoring unknown parameter in input file: \",key);\n\t\t\tcontinue;\n\t\t}\n\n\t\tstd::string word,line1;\n\t\twhile (sline >> word) {line1+=word+\" \";}\n\t\t// trim result\n\t\tlast = line1.find_last_not_of(' ');\n\t\tline1=line1.substr(0, last+1);\n\n\n\t\t// check which type to expect from the given key\n\t\tbool success=false;\n\t\ttry {\n\t\t\tsuccess = try_setting_any<all_parameter_types>(key, line1);\n        } catch (std::invalid_argument& e) {\n            throw;\n\t\t} catch (std::exception& e) {\n\t\t\tstd::string errmsg=\"found an error for key >> \"+key+\" << \\n\" +e.what();\n            throw std::runtime_error(errmsg);\n\t\t}\n\t\tif (not success) {\n\t\t\tmadness::print(\"\\n\\ncould not assign the input parameter for key \",key);\n\t\t\tstd::string requested_type=get_parameter(key).get_type();\n\t\t\tmadness::print(\"\\trequested type: \",requested_type,\"\\n\");\n\t\t\tmadness::print(\"add the corresponding type to QCCalculationsParametersBase.h\\n\\n\");\n\t\t\tthrow std::invalid_argument(\"add the corresponding type to QCCalculationsParametersBase.h\");\n\t\t}\n\t}\n};\n\n\nbool operator==(const QCCalculationParametersBase& p1,\n\t\t\t   const QCCalculationParametersBase& p2) {\n\tif (p1.parameters.size() != p2.parameters.size()) return false;\n\tfor (const auto& [key, value] : p1.parameters) {\n\t\tif (not p2.parameter_exists(key)) return false;\n\t\tif (not (value.get_value() == p2.get_parameter(key).get_value())) return false;\n\t}\n\treturn true;\n}\n\n\nbool operator!=(const QCCalculationParametersBase& p1,\n                const QCCalculationParametersBase& p2) {\n    return !(p1 == p2);\n}\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/mra/QCCalculationParametersBase.h",
    "content": "/*\n * QCCalculationParametersBase.h\n *\n *  Created on: 27 Jun 2019\n *      Author: fbischoff\n */\n\n#ifndef SRC_APPS_CHEM_QCCALCULATIONPARAMETERSBASE_H_\n#define SRC_APPS_CHEM_QCCALCULATIONPARAMETERSBASE_H_\n\n#include <madness/madness_config.h>\n#include <string>\n#include <algorithm>\n#include <iomanip>\n#include <typeindex>\n#include <map>\n#include <fstream>\n#include <typeinfo>\n// #include <madness/external/gtest/include/gtest/internal/gtest-type-util.h>\n\n#include \"madness/misc/misc.h\"\n#include \"madness/world/archive.h\"\n#include \"madness/world/world.h\"\n#include \"madness/mra/commandlineparser.h\"\n#include \"madness/external/nlohmann_json/json.hpp\"\n\n\nnamespace madness {\n    using json = nlohmann::json;\n\n    template <typename T>\n    static typename std::enable_if<std::is_floating_point<T>::value, void>::type\n    check_for_inf(const std::string& str, T& arg) {\n        std::string sinf;\n        std::stringstream ss;\n        ss << std::numeric_limits<T>::infinity();\n        sinf = ss.str();\n\n        if (sinf == str) arg = std::numeric_limits<T>::infinity();\n    }\n\n    template <typename T>\n    static typename std::enable_if<!std::is_floating_point<T>::value, void>::type\n    check_for_inf(const std::string& str, T& arg) {\n        return;\n    }\n\n    /// inverting the print method from print.h for std::vector\n    /// TODO: move this where it belongs (into print.h ??)\n    template <typename T, typename A=std::allocator<T>>\n    std::istream& operator>>(std::istream& is, std::vector<T, A>& v) {\n        // get the full line from opening to closing brackets [ .. ]\n        std::string word, line = \"\";\n        while (is >> word) {\n            line += word;\n            if (word.find(']') != std::string::npos) break;\n        }\n        if (line.size() != 0) is.clear();\n\n        // remove enclosing brackets and commas\n        auto find_c = [](char& c) { return ((c == ',') or (c == '[') or (c == ']')); };\n        std::replace_if(line.begin(), line.end(), find_c, ' '); // 0 2 0 4 0 6 0 8 0\n\n        // stream the values into the container\n        std::stringstream sline(line);\n        T tmp;\n        while (sline >> word) {\n            std::stringstream sword(word);\n            sword >> tmp;\n            check_for_inf(word, tmp);\n            v.push_back(tmp);\n        }\n        if (sline.bad()) {\n            madness::print(\"error while reading vector from istream: \");\n            madness::print(line, \"\\n\");\n            throw std::runtime_error(\"IO error\");\n        }\n\n        return is;\n    }\n\n\n    /// inverting the print method from print.h for std::vector\n    /// TODO: move this where it belongs (into print.h ??)\n    template <typename Q, typename T>\n    std::istream& operator>>(std::istream& is, std::pair<T, Q>& p) {\n        // get all words from the line\n        std::string word, line = \"\";\n        while (is >> word) {\n            line += word + \" \";\n        };\n        // have to set this here to account for the error handling later..\n        is.clear();\n\n        // remove enclosing brackets and commas\n        auto find_c = [](char& c) { return ((c == ',') or (c == '(') or (c == ')')); };\n        std::replace_if(line.begin(), line.end(), find_c, ' '); // 0 2 0 4 0 6 0 8 0\n\n        // stream the values into the container\n        std::stringstream sline(line);\n        T tmp1;\n        Q tmp2;\n        sline >> tmp1 >> tmp2;\n        if (sline.bad() or sline.fail()) {\n            madness::print(\"error while reading vector from istream: \");\n            madness::print(line, \"\\n\");\n            throw std::runtime_error(\"IO error\");\n        }\n        p = std::pair<T, Q>(tmp1, tmp2);\n\n        return is;\n    }\n\n\n    /// structure holding the value for a given parameter\n\n    /// keeps logic about default, derived and user-defined settings (with increasing priority),\n    /// as well as comments for the user (e.g. a recommended range for a given parameter).\n    ///\n    /// might be extended to hold allowed values for certain parameters, e.g. localization procedures.\n    ///\n    /// all values are stored as strings and must be converted to their respective types by the\n    /// QCCalculationParametersBase class (see below)\n    struct QCParameter {\n    public:\n        QCParameter() {};\n\n        QCParameter(const std::string v, const std::string t, const std::string comment = \"\",\n                    const std::vector<std::string> allowed_values1 = {})\n            : default_value(v), type(t), comment(comment), allowed_values(allowed_values1) {\n            static int i = 0;\n            print_order = i++;\n            set_all();\n        }\n\n        void set_derived_value(const std::string val) {\n            precedence = std::max(derived, precedence);\n            derived_value = val;\n            set_all();\n        }\n\n        void set_user_defined_value(const std::string val) {\n            precedence = std::max(defined, precedence);\n            user_defined_value = val;\n            set_all();\n        }\n\n        bool is_user_defined() const {\n            return (precedence == defined);\n        }\n\n        std::string get_value() const { return value; }\n        std::string get_type() const { return type; }\n        std::string get_comment() const { return comment; }\n\n        std::string print_precedence() const {\n            if (precedence == def) return \"default\";\n            if (precedence == derived) return \"derived\";\n            if (precedence == defined) return \"defined\";\n            std::stringstream sprecedence;\n            sprecedence << precedence;\n            throw std::runtime_error(\"unknown precedence in QCParameter\" + sprecedence.str());\n            return \"darn\";\n        }\n\n        int get_print_order() const { return print_order; }\n\n        std::string print_line(const std::string& key) const {\n            auto fill_left = [](const int size, const std::string word) {\n                int nspaces = std::max(int(0), size - int(word.length()));\n                return std::string(nspaces, ' ') + word;\n            };\n            auto fill_right = [](const int size, const std::string word) {\n                int nspaces = std::max(int(0), size - int(word.length()));\n                return word + std::string(nspaces, ' ');\n            };\n\n            // key-value block\n            std::string keyval = fill_left(20, key) + \"  \" + fill_right(10, get_value()) + \" # \" + fill_right(\n                10, print_precedence());\n            std::string empty_keyval(keyval.size(), ' ');\n            empty_keyval[33] = '#';\n\n            std::string allowed_val;\n            if (allowed_values.size() > 0) {\n                using madness::operators::operator<<;\n                std::stringstream ss;\n                ss << allowed_values;\n                allowed_val += ss.str();\n            }\n\n            // split comment into several lines: split onto words and add linebreak\n            bool leave_space_for_allowed_values = (allowed_val.size() > 0);\n\n            // first line breaks after 80 characters, all other lines after 120 (leave space f\n            long keyvalsize = keyval.size(); // length of key, value, precedence\n            std::string comment1 = get_comment();\n            auto commentwords = commandlineparser::split(comment1, \" \");\n            std::vector<std::string> commentlines(1);\n            long nchar = 0;\n            for (auto word : commentwords) {\n                bool is_first_line = commentlines.size() == 1;\n                long thislinebreak = 120;\n                if (is_first_line and leave_space_for_allowed_values) thislinebreak = 80;\n                long commentsize = thislinebreak - keyvalsize;\n\n                nchar += word.size() + 1;\n                if (nchar > commentsize) { // start newline\n                    commentlines.push_back(\"\");\n                    nchar = word.size() + 1;\n                }\n                commentlines.back() += word + \" \";\n            }\n\n            std::string result;\n            for (size_t i = 0; i < commentlines.size(); ++i) {\n                if (i == 0) result = keyval + fill_right(40, commentlines[i]) + allowed_val;\n                else result += \"\\n\" + empty_keyval + commentlines[i];\n            }\n\n            // trim result\n            std::size_t last = result.find_last_not_of(' ');\n            return result.substr(0, last + 1);\n        }\n\n        template <typename Archive>\n        void serialize(Archive& ar) {\n            ar & value & default_value & derived_value & user_defined_value & type & null &\n                comment & allowed_values & print_order & precedence;\n        }\n\n        enum { def, derived, defined } precedence = def;\n\n        bool operator==(const QCParameter& other) const {\n            return (value == other.value and default_value == other.default_value and\n                    derived_value == other.derived_value and user_defined_value == other.user_defined_value and\n                    type == other.type and null == other.null and comment == other.comment and\n                    allowed_values == other.allowed_values and print_order == other.print_order);\n        }\n\n        hashT hash() const {\n            return hash_value(value);\n        }\n\n    private:\n        void set_all() {\n            value = default_value;\n            if (derived_value != null) value = derived_value;\n            if (user_defined_value != null) value = user_defined_value;\n            if (not check_allowed()) throw std::invalid_argument(not_allowed_errmsg());\n        }\n\n        bool check_allowed() {\n            if (allowed_values.size() == 0) return true;\n            auto it = std::find(allowed_values.begin(), allowed_values.end(), value);\n            return (it != allowed_values.end());\n        }\n\n        std::string not_allowed_errmsg() const {\n            using madness::operators::operator<<;\n            std::stringstream ss;\n            ss << allowed_values;\n            std::string errmsg = \"\\ntrying to assign a value that's not allowed\\n\\n\";\n            errmsg += \"\\tuser-defined value: \" + value + \"\\n\";\n            errmsg += \"\\tallowed values:     \" + ss.str() + \"\\n\\n\";\n            return errmsg;\n        }\n\n\n        std::string value;\n        std::string default_value = \"\";\n        std::string derived_value = \"\";\n        std::string user_defined_value = \"\";\n        std::string type = \"\";\n        std::string null = \"\";\n        std::string comment = \"\";\n        std::vector<std::string> allowed_values = std::vector<std::string>();\n        int print_order = 0; // use this for printing the parameters in the same order as they are defined\n    };\n\n    /// class for holding the parameters for calculation\n\n    /// Actual parameter classes will be derived from this class with a simple constructor\n    /// (see test_QCCalculationParametersBase.cc for an example) and convenience\n    /// getters for the parameters of each parameter class.\n    /// Having the base class will allow consistent parameter input/output handling\n    /// for all madness programs and reuse of the parsing methods.\n    /// Even if the same parameter is used in different programs, default might differ\n    /// (i.e. econv for 3D/6D calculations). The parameter class will effectively serve as\n    /// a factory for the calculation classes (SCF, nemo, mp2, etc)\n    ///\n    /// parameters are kept in a map with key (string) and value (QCParameter),\n    /// types are converted whenever a parameter is accessed (i.e. should not be\n    /// done too frequently in an inner loop)\n    class QCCalculationParametersBase {\n    public:\n        /// print all parameters\n        void print(const std::string header = \"\", const std::string footer = \"\") const;\n\n        virtual std::string get_tag() const = 0;\n\n        std::string print_to_string(const std::list<std::string> precedences={\"all\"}) const;\n\n        template <typename T>\n        T get(const std::string key) const {\n            const QCParameter& parameter = get_parameter(key);\n            MADNESS_ASSERT(check_type<T>(key,parameter));\n            if (std::is_same<T, std::string>::value) {\n                return fromstring<T>(add_quotes(parameter.get_value()));\n            }\n            return fromstring<T>(parameter.get_value());\n        }\n\n        bool is_user_defined(std::string key) const {\n            return get_parameter(key).is_user_defined();\n        }\n\n        template <typename Archive>\n        void serialize(Archive& ar) {\n            ar & parameters & print_debug;\n        }\n\n        hashT hash() const {\n            return hash_range(parameters.begin(), parameters.end());\n        }\n\n    protected:\n        typedef std::map<std::string, QCParameter> ParameterContainerT;\n        ParameterContainerT parameters;\n\n        void read_input_and_commandline_options(World& world,\n                                                        const commandlineparser& parser,\n                                                        const std::string tag) {\n            try {\n                // check that user-defined input files actually exist\n                bool file_ok = true;\n                if (parser.key_exists(\"user_defined_input_file\")) file_ok = file_exists(world, parser.value(\"input\"));\n                if (file_ok) read_input(world, parser.value(\"input\"), tag);\n                else {\n                    std::string msg = \"could not find user-defined input file: \" + parser.value(\"input\") + \"\\n\";\n                    throw std::invalid_argument(msg);\n                }\n            }\n            catch (std::invalid_argument& e) {\n                throw;\n            } catch (std::exception& e) {\n                madness::print(e.what());\n            }\n            read_commandline_options(world, parser, tag);\n        }\n\n    public:\n        bool file_exists(World& world, std::string filename) const;\n\n    private:\n        /// read the parameters from file\n\n        /// only world.rank()==0 reads the input file and broadcasts to all other nodes,\n        /// so we don't need to serialize the ParameterMap\n        void read_input(World& world, const std::string filename, const std::string tag);\n\n        void read_commandline_options(World& world, const commandlineparser& parser, const std::string tag);\n\n    protected:\n        bool print_debug = false;\n        bool ignore_unknown_keys = true;\n        bool ignore_unknown_keys_silently = false;\n        bool throw_if_datagroup_not_found = true;\n\n        /// ctor for testing\n        QCCalculationParametersBase() {}\n\n        /// copy ctor\n        QCCalculationParametersBase(const QCCalculationParametersBase& other)\n            : parameters(other.parameters)\n              , print_debug(other.print_debug) {}\n\n        /// destructor\n        virtual ~QCCalculationParametersBase() {}\n\n        template <typename T>\n        void initialize(const std::string& key, const T& value, const std::string comment = \"\",\n                        const std::vector<T> allowed_values = {}) {\n            if (parameters.find(key) != parameters.end()) {\n                madness::print(\"you cannot initialize a parameter twice: \", key);\n                throw std::runtime_error(\"initialization error\");\n            }\n\n            std::string svalue = tostring(value);\n            std::string type = std::type_index(typeid(T)).name();\n\n            // transform everything to lower case\n            std::string key_lower = key;\n            std::transform(key_lower.begin(), key_lower.end(), key_lower.begin(), ::tolower);\n            std::transform(svalue.begin(), svalue.end(), svalue.begin(), ::tolower);\n            std::vector<std::string> av_lower_vec;\n            for (const T& av : allowed_values) {\n                std::string av_lower = tostring(av);\n                std::transform(av_lower.begin(), av_lower.end(), av_lower.begin(), ::tolower);\n                av_lower_vec.push_back(av_lower);\n            }\n\n            parameters.insert(std::make_pair<std::string, QCParameter>\n                (std::string(key_lower), QCParameter(svalue, type, comment, av_lower_vec)));\n        }\n\n    public:\n        template <typename T>\n        void set_derived_value(const std::string& key, const T& value) {\n            QCParameter& parameter = get_parameter(key);\n            if (not check_type_silent<T>(parameter)) {\n                throw std::runtime_error(\"type error in set_derived_value for key \" + key);\n            }\n            parameter.set_derived_value(tostring(value));\n        }\n\n        ParameterContainerT get_all_parameters() const {\n            return parameters;\n        }\n\n    protected:\n        /// helper function for try_setting_user_defined_value\n        template <typename Tuple, std::size_t... I>\n        bool try_setting_any_impl(const std::string& key, const std::string& value, Tuple, std::index_sequence<I...>) {\n            bool success = false;\n            (void)std::initializer_list<int>{\n                (success = try_setting_user_defined_value<std::tuple_element_t<I, Tuple>>(key, value) || success, 0)...\n            };\n            return success;\n        }\n\n        /// helper function for try_setting_user_defined_value\n        template <typename Tuple>\n        bool try_setting_any(const std::string& key, const std::string& value) {\n            return try_setting_any_impl(key, value, Tuple{}, std::make_index_sequence<std::tuple_size<Tuple>::value>{});\n        }\n\n        /// helper function for try_setting_user_defined_value\n        template <typename T>\n        bool try_setting_user_defined_value(const std::string& key, const std::string& val) {\n            if (not check_type_silent<T>(get_parameter(key))) return false;\n\n            if (print_debug) ::madness::print(\"key:\", key, \"will set type\", std::type_index(typeid(T)).name());\n            T value = fromstring<T>(val);\n            set_user_defined_value<T>(key, value);\n            return true;\n        }\n\n    public:\n\n        template <typename... Types>\n        bool try_set_from_json(QCParameter& parameter, const nlohmann::json& value) {\n            bool success = false;\n            (void)std::initializer_list<int>{\n                (parameter.get_type() == std::type_index(typeid(Types)).name()\n                    ? (parameter.set_user_defined_value(QCCalculationParametersBase::tostring(value.get<Types>())), success = true, 0)\n                    : 0)...\n            };\n            return success;\n        }\n\n        void from_json(const json& j) {\n            for (const auto& [key, value1] : j.items()) {\n                const auto& value = value1; // avoid shadowing\n                QCParameter& parameter = get_parameter(key);\n                using all_types = all_parameter_types;\n                bool ok = false;\n                std::apply([&](auto&&... args) {\n                    ok = try_set_from_json<std::decay_t<decltype(args)>...>(parameter, value);\n                }, all_types{});\n                if (!ok) {\n                    throw std::runtime_error(\"Unsupported parameter type for key: \" + key);\n                }\n            }\n        }\n        // Helper to forward tuple types to qcparameter_to_json\n        template <typename... Types>\n        void qcparameter_to_json(json& j, const std::pair<std::string, QCParameter>& p,\n                                 const std::tuple<Types...>&) const {\n            (void)std::initializer_list<int>{\n                (check_type_silent<Types>(p.second) ? (j[p.first] = get<Types>(p.first), 0) : 0)...\n            };\n        }\n\n        // Helper to forward tuple types to qcparameter_to_json\n        template <typename Tuple>\n        void qcparameter_to_json_from_tuple(json& j, const std::pair<std::string, QCParameter>& p, const Tuple&) const {\n            std::apply([&](auto&&... args) {\n                qcparameter_to_json(j, p, std::tuple<std::decay_t<decltype(args)>...>{});\n            }, Tuple{});\n        }\n\n        /// convert all parameters to a json object\n        [[nodiscard]] json to_json() const {\n            json j_params = {};\n            to_json(j_params);\n            return j_params;\n        }\n\n        /// convert all parameters to a json object\n        void to_json(json& j) const {\n            json j_params = {};\n            for (auto& p : parameters) {\n                qcparameter_to_json_from_tuple(j_params, p, all_parameter_types{});\n            }\n            j[\"parameters\"] = j_params;\n        }\n\n        /// convert all parameters to a json object, but only those with a given precedence\n        [[nodiscard]] json to_json_if_precedence(\n            const std::string& precedence) const {\n            json j_params = {};\n            for (auto& p : parameters) {\n                if (p.second.print_precedence() == precedence) {\n                    qcparameter_to_json_from_tuple(j_params, p, all_parameter_types{});\n                }\n            }\n            return j_params;\n        }\n\n        template <typename T>\n        void set_user_defined_value(const std::string& key, const T& value) {\n            QCParameter& parameter = get_parameter(key);\n            if (not check_type_silent<T>(parameter)) {\n                throw std::runtime_error(\"type error in set_user_defined_value\");\n            }\n\n            parameter.set_user_defined_value(tostring(value));\n        }\n\n        friend bool operator==(const QCCalculationParametersBase& p1,\n                        const QCCalculationParametersBase& p2);\n\n    protected:\n        const QCParameter& get_parameter(const std::string& key) const {\n            if (not parameter_exists(key)) {\n                throw std::runtime_error(\"could not find parameter for key \" + key);\n            }\n            const QCParameter& parameter = parameters.find(key)->second;\n            return parameter;\n        }\n\n    public:\n        QCParameter& get_parameter(const std::string key) {\n            if (not parameter_exists(key)) {\n                madness::print(\"\\ncould not find parameter for key\", key, \"\\n\");\n                throw std::runtime_error(\"could not find parameter for key \" + key);\n            }\n            QCParameter& parameter = parameters.find(key)->second;\n            return parameter;\n        }\n\n        bool parameter_exists(const std::string& key) const {\n            return (parameters.find(key) != parameters.end());\n        }\n\n        template <typename T>\n        static bool check_type(const std::string key, const QCParameter& parameter) {\n            if (check_type_silent<T>(parameter))\n                return true;\n\n            madness::print(\n                \"trying to get the wrong type in QCCalculationParametersBase\");\n            madness::print(\"key             \", key);\n            madness::print(\"parameter type  \", parameter.get_type());\n            madness::print(\"setting type    \", std::type_index(typeid(T)).name());\n            madness::print(\"value           \", parameter.get_value());\n            return false;\n        }\n\n        template <typename T>\n        static bool check_type_silent(const QCParameter& parameter) {\n            return (parameter.get_type() == std::type_index(typeid(T)).name());\n        }\n\n        /// read the stream, starting from tag\n\n        /// only parameters that are defined in the constructor will be processed,\n        /// all others will be discarded.\n        virtual void read_internal(World& world, std::string& filecontents,\n                                   std::string tag);\n\n        static std::string tostring(const bool& arg) {\n            std::ostringstream ss;\n            ss << std::boolalpha << arg;\n            return ss.str();\n        }\n\n        template <typename T>\n        static std::string tostring(const T& arg) {\n            using madness::operators::operator<<;\n            std::ostringstream ss;\n            static_assert(not std::is_same<T, bool>::value, \"you need to specialize tostring for this type\");\n\n            ss << std::scientific << std::setprecision(4) << arg;\n            std::string str = ss.str();\n            std::transform(str.begin(), str.end(), str.begin(), ::tolower);\n\n            overwrite_if_inf(str, arg);\n            return str;\n        }\n\n        template <typename T>\n        static typename std::enable_if<std::is_floating_point<T>::value, void>::type\n        overwrite_if_inf(std::string& str, const T& arg) {\n            MADNESS_PRAGMA_CLANG(diagnostic push)\n            MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wtautological-constant-compare\")\n            if (std::isinf(arg)) {\n                std::stringstream ss;\n                ss << std::numeric_limits<T>::infinity();\n                str = ss.str();\n            }\n            MADNESS_PRAGMA_CLANG(diagnostic pop)\n        }\n\n        template <typename T>\n        static typename std::enable_if<!std::is_floating_point<T>::value, void>::type\n        overwrite_if_inf(std::string& str, const T& arg) {\n            return;\n        }\n\n        template <typename T>\n        static typename std::enable_if<!std::is_same<T, bool>::value, T>::type\n        fromstring(const std::string& arg) {\n            std::stringstream ssvalue(arg);\n\n            // if argument is std::string read the everything between possible double quotes\n            T result = read_quotes<T>(ssvalue);\n\n            bool type_conversion_failed = ssvalue.fail();\n\n            // check for infinity in floating point conversions\n            if (type_conversion_failed and (std::is_floating_point<T>::value)) {\n                const static T inf = std::numeric_limits<T>::infinity();\n                std::string sinf = tostring(inf); // repeat type conversion from above\n                if (sinf == arg)\n                    result = inf;\n                type_conversion_failed = false;\n            }\n\n            if (type_conversion_failed) {\n                std::string errmsg = \"error in type conversion for argument >> \" + arg +\n                    \" << to type \" + std::type_index(typeid(T)).name();\n                throw std::runtime_error(errmsg);\n            }\n\n            // check for trailing characters\n            std::string word;\n            while (ssvalue >> word) {\n                std::string errmsg = \"trailing characters in arguement >> \" + arg + \" <<\";\n                throw std::runtime_error(errmsg);\n            }\n            return result;\n        }\n\n        template <typename T>\n        static typename std::enable_if<std::is_same<T, std::string>::value, T>::type\n        read_quotes(std::stringstream& ssvalue) {\n            T arg = ssvalue.str();\n            T result;\n\n            if (arg.find(\"\\\"\") == std::string::npos) { // no double quotes found\n                ssvalue >> result;\n            }\n            else { // found double quotes\n                int counter = 0;\n                while (counter < 2) {\n                    T tmp;\n                    ssvalue >> tmp;\n                    if (ssvalue.fail()) {\n                        std::string errmsg = \"missing closing double quote in line >> \" + arg;\n                        throw std::runtime_error(errmsg);\n                    }\n                    result += \" \" + tmp;\n                    counter = std::count(result.begin(), result.end(), '\"');\n                }\n\n                // use only the text between the double quotes\n                result = trim_blanks(trim_quotes(result));\n            }\n            return result;\n        }\n\n        static std::string trim_blanks(const std::string arg) {\n            std::size_t first = arg.find_first_not_of(' ');\n            std::size_t last = arg.find_last_not_of(' ');\n            return arg.substr(first, last - first + 1);\n        }\n\n        static std::string trim_quotes(const std::string arg) {\n            std::size_t first = arg.find_first_of('\"');\n            std::size_t last = arg.find_last_of('\"');\n            return arg.substr(first + 1, last - first - 1);\n        }\n\n        static std::string add_quotes(const std::string arg) {\n            return \"\\\"\" + arg + \"\\\"\";\n        }\n\n        template <typename T>\n        static typename std::enable_if<!std::is_same<T, std::string>::value, T>::type\n        read_quotes(std::stringstream& ssvalue) {\n            T result;\n            ssvalue >> result;\n            return result;\n        }\n\n        template <typename T>\n        static typename std::enable_if<std::is_same<T, bool>::value, T>::type\n        fromstring(const std::string& arg) {\n            std::string str = arg;\n            std::transform(str.begin(), str.end(), str.begin(), ::tolower);\n            if (str == \"true\" or str == \"1\" or str == \"yes\")\n                return true;\n            if (str == \"false\" or str == \"0\" or str == \"no\")\n                return false;\n            std::string errmsg = \"error in type conversion for argument >> \" + arg +\n                \" << to type \" + std::type_index(typeid(T)).name();\n            throw std::runtime_error(errmsg);\n            return 0;\n        }\n\n\n        // a templated list of all acceptable parameter types for looping in a parameter pack\n        using all_parameter_types = std::tuple<\n            double, int, unsigned int, long, std::size_t, bool, std::string,\n            std::vector<double>, std::vector<int>, std::vector<std::size_t>,\n            std::vector<std::string>, std::pair<std::string, double>>;\n    };\n\n    bool operator!=(const QCCalculationParametersBase& p1,\n                    const QCCalculationParametersBase& p2);\n} /* namespace madness */\n\n#endif /* SRC_APPS_CHEM_QCCALCULATIONPARAMETERSBASE_H_ */\n"
  },
  {
    "path": "src/madness/mra/adquad.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_MRA_ADQUAD_H__INCLUDED\n#define MADNESS_MRA_ADQUAD_H__INCLUDED\n\n#include <madness/mra/legendre.h>\n\nnamespace madness {\n\n    namespace detail {\n        template <typename T>\n        double norm(const T& t) {\n            return std::abs(t);\n        }\n\n        template <typename T>\n        double norm(const Tensor<T>& t) {\n            return t.normf();\n        }\n    }\n\n    template <typename funcT>\n    typename funcT::returnT do_adq(double lo, double hi, const funcT& func,\n                                   int n, const double* x, const double* w) {\n        // x and w provide the Gauss-Legendre quadrature rule of order n on [0,1]\n        double range = (hi-lo);\n        typename funcT::returnT sum = func(lo + range*x[0])*w[0];\n        for (int i=1; i<n; ++i) sum += func(lo + range*x[i])*w[i];\n        return sum*range;\n    }\n\n\n    template <typename funcT>\n    typename funcT::returnT adq1(double lo, double hi, const funcT& func, double thresh,\n                                 int n, const double* x, const double* w, int level) {\n        static const int MAX_LEVEL=14;\n        double d = (hi-lo)/2;\n        // Twoscale by any other name would smell just as sweet.\n        typename funcT::returnT full = do_adq(lo, hi, func, n, x, w);\n        typename funcT::returnT half = do_adq(lo, lo+d, func, n, x, w) + do_adq(lo+d, hi, func, n, x, w);\n\n        double abserr = madness::detail::norm(full-half);\n        double norm = madness::detail::norm(half);\n        double relerr = (norm==0.0) ? 0.0 : abserr/norm;\n        //for (int i=0; i<level; ++i) std::cout << \"! \";\n        //std::cout << norm << \" \" << abserr << \" \" << relerr << \" \" << thresh << std::endl;\n\n        bool converged = (relerr < 1e-14) || (abserr<thresh && relerr<0.01);\n        if (converged) {\n            return half;\n        }\n        else {\n            if (level == MAX_LEVEL) {\n                //throw \"Adaptive quadrature: failed : runaway refinement?\";\n                return half;\n            }\n            else {\n                return adq1(lo, lo+d, func, thresh*0.5, n, x, w, level+1) +\n                       adq1(lo+d, hi, func, thresh*0.5, n, x, w, level+1);\n            }\n        }\n    }\n\n    template <typename funcT>\n    typename funcT::returnT adq(double lo, double hi, const funcT& func, double thresh) {\n        const int n = 20;\n        double x[n], y[n];\n        gauss_legendre(n, 0.0, 1.0, x, y);\n\n        return adq1(lo, hi, func, thresh, n, x, y, 0);\n    }\n\n    namespace detail {\n        struct adqtest {\n            typedef double returnT;\n            double operator()(double x) const {\n                // int(exp(-x^2)*cos(a*x),x=-inf..inf) = sqrt(pi)*exp(-a^2/4)\n                return exp(-x*x)*cos(3*x);\n            }\n\n            static double exact() {\n                const double pi = 3.1415926535897932384;\n                return sqrt(pi)*exp(-9.0/4.0);\n            }\n\n            static bool runtest() {\n                double test = madness::adq(-6.0,6.0,adqtest(),1e-14);\n                return std::abs(test-exact())<1e-14;\n            }\n\n        };\n    }\n}\n\n#endif // MADNESS_MRA_ADQUAD_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/autocorr",
    "content": "0 0 0 5.00000000000000000e-01\n0 0 1 -2.88675134594812882e-01\n1 0 0 2.88675134594812882e-01\n1 0 2 -1.29099444873580563e-01\n1 1 1 -3.46410161513775459e-01\n1 1 2 2.23606797749978970e-01\n1 1 3 3.77964473009227227e-02\n2 0 1 1.29099444873580563e-01\n2 0 3 -8.45154254728516578e-02\n2 1 0 1.29099444873580563e-01\n2 1 1 -2.23606797749978970e-01\n2 1 2 -8.24786098842322521e-02\n2 1 3 1.46385010942279977e-01\n2 1 4 1.84427778390829375e-02\n2 2 1 -8.24786098842322521e-02\n2 2 2 3.19438282499969957e-01\n2 2 3 -1.25988157669742409e-01\n2 2 4 -7.14285714285714286e-02\n2 2 5 -7.17884153756580054e-03\n3 0 2 8.45154254728516578e-02\n3 0 4 -6.29940788348712045e-02\n3 1 1 3.77964473009227227e-02\n3 1 2 -1.46385010942279977e-01\n3 1 3 -3.84900179459750510e-02\n3 1 4 1.09108945117996191e-01\n3 1 5 1.09658615826628165e-02\n3 2 0 8.45154254728516578e-02\n3 2 1 -1.46385010942279977e-01\n3 2 2 1.25988157669742409e-01\n3 2 3 1.49071198499985980e-01\n3 2 4 -1.17809380962156856e-01\n3 2 5 -4.24705992864687954e-02\n3 2 6 -3.55156993135223805e-03\n3 3 1 -3.84900179459750510e-02\n3 3 2 1.49071198499985980e-01\n3 3 3 -2.72592559321806303e-01\n3 3 4 3.03030303030303030e-02\n3 3 5 8.50416612911640987e-02\n3 3 6 2.10113710691374667e-02\n3 3 7 1.50465553465711612e-03\n4 0 3 6.29940788348712045e-02\n4 0 5 -5.02518907629606038e-02\n4 1 2 1.84427778390829375e-02\n4 1 3 -1.09108945117996191e-01\n4 1 4 -2.24941663320633415e-02\n4 1 5 8.70388279778489191e-02\n4 1 6 7.27855244568577879e-03\n4 2 1 1.84427778390829375e-02\n4 2 2 -7.14285714285714286e-02\n4 2 3 1.17809380962156856e-01\n4 2 4 8.71195315909008973e-02\n4 2 5 -1.01253459197776284e-01\n4 2 6 -2.81897124066382855e-02\n4 2 7 -2.01870723492876141e-03\n4 3 0 6.29940788348712045e-02\n4 3 1 -1.09108945117996191e-01\n4 3 2 1.17809380962156856e-01\n4 3 3 -3.03030303030303030e-02\n4 3 4 -1.82374465997459291e-01\n4 3 5 6.72075194505557134e-02\n4 3 6 6.03557936294437807e-02\n4 3 7 1.19428330605589725e-02\n4 3 8 7.47889216689682875e-04\n4 4 1 -2.24941663320633415e-02\n4 4 2 8.71195315909008973e-02\n4 4 3 -1.82374465997459291e-01\n4 4 4 2.00799200799200799e-01\n4 4 5 4.96996721831478499e-02\n4 4 6 -7.56409358488948803e-02\n4 4 7 -3.66427877263556513e-02\n4 4 8 -5.93618662676339446e-03\n4 4 9 -3.30298259377608466e-04\n5 0 4 5.02518907629606038e-02\n5 0 6 -4.18121005003545385e-02\n5 1 3 1.09658615826628165e-02\n5 1 4 -8.70388279778489191e-02\n5 1 5 -1.48038530561442504e-02\n5 1 6 7.24206824377901368e-02\n5 1 7 5.18615278817878528e-03\n5 2 2 7.17884153756580054e-03\n5 2 3 -4.24705992864687954e-02\n5 2 4 1.01253459197776284e-01\n5 2 5 5.73350763461484538e-02\n5 2 6 -8.72617190674560033e-02\n5 2 7 -2.00858833795035967e-02\n5 2 8 -1.25782680801486265e-03\n5 3 1 1.09658615826628165e-02\n5 3 2 -4.24705992864687954e-02\n5 3 3 8.50416612911640987e-02\n5 3 4 -6.72075194505557134e-02\n5 3 5 -1.25988157669742409e-01\n5 3 6 7.37496131447849630e-02\n5 3 7 4.44252169097161528e-02\n5 3 8 7.44140374953745102e-03\n5 3 9 4.14050780465160044e-04\n5 4 0 5.02518907629606038e-02\n5 4 1 -8.70388279778489191e-02\n5 4 2 1.01253459197776284e-01\n5 4 3 -6.72075194505557134e-02\n5 4 4 -4.96996721831478499e-02\n5 4 5 1.79487179487179487e-01\n5 4 6 -8.19845107850088991e-03\n5 4 7 -6.51684636515302034e-02\n5 4 8 -2.35862495771098820e-02\n5 4 9 -3.28642618578904248e-03\n5 4 10 -1.64527096858241828e-04\n5 5 1 -1.48038530561442504e-02\n5 5 2 5.73350763461484538e-02\n5 5 3 -1.25988157669742409e-01\n5 5 4 1.79487179487179487e-01\n5 5 5 -1.15056365276280839e-01\n5 5 6 -1.03326507139993660e-01\n5 5 7 4.68353150013704193e-02\n5 5 8 4.81143547642927761e-02\n5 5 9 1.34950431688565745e-02\n5 5 10 1.63702394437574661e-03\n5 5 11 7.44871686319628826e-05\n6 0 5 4.18121005003545385e-02\n6 0 7 -3.58057437019716440e-02\n6 1 4 7.27855244568577879e-03\n6 1 5 -7.24206824377901368e-02\n6 1 6 -1.04972776216295594e-02\n6 1 7 6.20173672946042281e-02\n6 1 8 3.88367818690308681e-03\n6 2 3 3.55156993135223805e-03\n6 2 4 -2.81897124066382855e-02\n6 2 5 8.72617190674560033e-02\n6 2 6 4.06557814090870854e-02\n6 2 7 -7.62107256077687427e-02\n6 2 8 -1.50414209399046710e-02\n6 2 9 -8.36927048859517925e-04\n6 3 2 3.55156993135223805e-03\n6 3 3 -2.10113710691374667e-02\n6 3 4 6.03557936294437807e-02\n6 3 5 -7.37496131447849630e-02\n6 3 6 -9.14930043398450222e-02\n6 3 7 7.19363596509361188e-02\n6 3 8 3.38914124784700258e-02\n6 3 9 4.95132719368701856e-03\n6 3 10 2.47876399079082250e-04\n6 4 1 7.27855244568577879e-03\n6 4 2 -2.81897124066382855e-02\n6 4 3 6.03557936294437807e-02\n6 4 4 -7.56409358488948803e-02\n6 4 5 8.19845107850088991e-03\n6 4 6 1.44385026737967914e-01\n6 4 7 -3.33971952232856820e-02\n6 4 8 -5.37494529174086995e-02\n6 4 9 -1.59921838822789066e-02\n6 4 10 -1.96745792353635462e-03\n6 4 11 -8.95224352888916753e-05\n6 5 0 4.18121005003545385e-02\n6 5 1 -7.24206824377901368e-02\n6 5 2 8.72617190674560033e-02\n6 5 3 -7.37496131447849630e-02\n6 5 4 8.19845107850088991e-03\n6 5 5 1.03326507139993660e-01\n6 5 6 -1.45310420967817969e-01\n6 5 7 -4.61914799237590654e-02\n6 5 8 5.44407495132324623e-02\n6 5 9 3.49838782764369526e-02\n6 5 10 8.23617430146007308e-03\n6 5 11 8.90736984516375605e-04\n6 5 12 3.71463000810795470e-05\n6 6 1 -1.04972776216295594e-02\n6 6 2 4.06557814090870854e-02\n6 6 3 -9.14930043398450222e-02\n6 6 4 1.44385026737967914e-01\n6 6 5 -1.45310420967817969e-01\n6 6 6 3.06466784461053973e-02\n6 6 7 1.25066222700496566e-01\n6 6 8 -6.73065370914225477e-03\n6 6 9 -5.05130667229532649e-02\n6 6 10 -2.28234352824560614e-02\n6 6 11 -4.57053266725724248e-03\n6 6 12 -4.44205142011037825e-04\n6 6 13 -1.70974638876992419e-05\n7 0 6 3.58057437019716440e-02\n7 0 8 -3.13112145542574745e-02\n7 1 5 5.18615278817878528e-03\n7 1 6 -6.20173672946042281e-02\n7 1 7 -7.83733397089989726e-03\n7 1 8 5.42326144546640430e-02\n7 1 9 3.01758338848574734e-03\n7 2 4 2.01870723492876141e-03\n7 2 5 -2.00858833795035967e-02\n7 2 6 7.62107256077687427e-02\n7 2 7 3.03538639479609461e-02\n7 2 8 -6.74628866394061403e-02\n7 2 9 -1.16870502093974454e-02\n7 2 10 -5.85084323543695398e-04\n7 3 3 1.50465553465711612e-03\n7 3 4 -1.19428330605589725e-02\n7 3 5 4.44252169097161528e-02\n7 3 6 -7.19363596509361188e-02\n7 3 7 -6.92527081139901280e-02\n7 3 8 6.77490719251262491e-02\n7 3 9 2.66435460015444877e-02\n7 3 10 3.46140553792537105e-03\n7 3 11 1.57499405486934917e-04\n7 4 2 2.01870723492876141e-03\n7 4 3 -1.19428330605589725e-02\n7 4 4 3.66427877263556513e-02\n7 4 5 -6.51684636515302034e-02\n7 4 6 3.33971952232856820e-02\n7 4 7 1.15287189590595163e-01\n7 4 8 -4.43220210436784126e-02\n7 4 9 -4.42251424571268050e-02\n7 4 10 -1.13151625269367648e-02\n7 4 11 -1.25011277567685489e-03\n7 4 12 -5.21333065851045482e-05\n7 5 1 5.18615278817878528e-03\n7 5 2 -2.00858833795035967e-02\n7 5 3 4.44252169097161528e-02\n7 5 4 -6.51684636515302034e-02\n7 5 5 4.68353150013704193e-02\n7 5 6 4.61914799237590654e-02\n7 5 7 -1.38225610457774464e-01\n7 5 8 -1.13899779246310519e-02\n7 5 9 5.23009956644892337e-02\n7 5 10 2.58024161294539083e-02\n7 5 11 5.29857349548422604e-03\n7 5 12 5.18719851070068476e-04\n7 5 13 1.99655363766204414e-05\n7 6 0 3.58057437019716440e-02\n7 6 1 -6.20173672946042281e-02\n7 6 2 7.62107256077687427e-02\n7 6 3 -7.19363596509361188e-02\n7 6 4 3.33971952232856820e-02\n7 6 5 4.61914799237590654e-02\n7 6 6 -1.25066222700496566e-01\n7 6 7 9.04724918976977980e-02\n7 6 8 8.50423433763670595e-02\n7 6 9 -3.01264731159960255e-02\n7 6 10 -4.20266845686390068e-02\n7 6 11 -1.52833691554544440e-02\n7 6 12 -2.69583335271272126e-03\n7 6 13 -2.38753089867503153e-04\n7 6 14 -8.53233934594015449e-06\n7 7 1 -7.83733397089989726e-03\n7 7 2 3.03538639479609461e-02\n7 7 3 -6.92527081139901280e-02\n7 7 4 1.15287189590595163e-01\n7 7 5 -1.38225610457774464e-01\n7 7 6 9.04724918976977980e-02\n7 7 7 3.80208569493744988e-02\n7 7 8 -1.15824529259561936e-01\n7 7 9 -3.43830230302171854e-02\n7 7 10 4.14807632513993532e-02\n7 7 11 3.13210267745333703e-02\n7 7 12 9.37766410912190963e-03\n7 7 13 1.46802362346107284e-03\n7 7 14 1.19147634761602802e-04\n7 7 15 3.97379610346975286e-06\n8 0 7 3.13112145542574745e-02\n8 0 9 -2.78207442037328614e-02\n8 1 6 3.88367818690308681e-03\n8 1 7 -5.42326144546640430e-02\n8 1 8 -6.07737125462763963e-03\n8 1 9 4.81869424652426646e-02\n8 1 10 2.41236446586371393e-03\n8 2 5 1.25782680801486265e-03\n8 2 6 -1.50414209399046710e-02\n8 2 7 6.74628866394061403e-02\n8 2 8 2.35375576578925231e-02\n8 2 9 -6.04316730749176526e-02\n8 2 10 -9.34304740127271470e-03\n8 2 11 -4.25123376909681056e-04\n8 3 4 7.47889216689682875e-04\n8 3 5 -7.44140374953745102e-03\n8 3 6 3.38914124784700258e-02\n8 3 7 -6.77490719251262491e-02\n8 3 8 -5.41698070628609062e-02\n8 3 9 6.30915175301304235e-02\n8 3 10 2.14688250869282968e-02\n8 3 11 2.51506381545840222e-03\n8 3 12 1.04885411559291910e-04\n8 4 3 7.47889216689682875e-04\n8 4 4 -5.93618662676339446e-03\n8 4 5 2.35862495771098820e-02\n8 4 6 -5.37494529174086995e-02\n8 4 7 4.43220210436784126e-02\n8 4 8 9.31174089068825911e-02\n8 4 9 -4.86231640216219813e-02\n8 4 10 -3.66967060822800533e-02\n8 4 11 -8.28927359086239466e-03\n8 4 12 -8.32502145433637209e-04\n8 4 13 -3.20430225178034280e-05\n8 5 2 1.25782680801486265e-03\n8 5 3 -7.44140374953745102e-03\n8 5 4 2.35862495771098820e-02\n8 5 5 -4.81143547642927761e-02\n8 5 6 5.44407495132324623e-02\n8 5 7 1.13899779246310519e-02\n8 5 8 -1.22440885749146396e-01\n8 5 9 9.25795684738160939e-03\n8 5 10 4.73797652008675716e-02\n8 5 11 1.94212439631461078e-02\n8 5 12 3.55874757126704313e-03\n8 5 13 3.18824048521389453e-04\n8 5 14 1.13938419609171647e-05\n8 6 1 3.88367818690308681e-03\n8 6 2 -1.50414209399046710e-02\n8 6 3 3.38914124784700258e-02\n8 6 4 -5.37494529174086995e-02\n8 6 5 5.44407495132324623e-02\n8 6 6 -6.73065370914225477e-03\n8 6 7 -8.50423433763670595e-02\n8 6 8 1.09543768728231747e-01\n8 6 9 5.13958432956955362e-02\n8 6 10 -3.90788556983924065e-02\n8 6 11 -3.39680049489014763e-02\n8 6 12 -1.05390535382793731e-02\n8 6 13 -1.67163953080714574e-03\n8 6 14 -1.36250533034337184e-04\n8 6 15 -4.54420969707751902e-06\n8 7 0 3.13112145542574745e-02\n8 7 1 -5.42326144546640430e-02\n8 7 2 6.74628866394061403e-02\n8 7 3 -6.77490719251262491e-02\n8 7 4 4.43220210436784126e-02\n8 7 5 1.13899779246310519e-02\n8 7 6 -8.50423433763670595e-02\n8 7 7 1.15824529259561936e-01\n8 7 8 -2.86786656276111020e-02\n8 7 9 -1.01623065793991299e-01\n8 7 10 -2.18558753755867441e-03\n8 7 11 4.13722253982126514e-02\n8 7 12 2.30384785486414317e-02\n8 7 13 5.96888271453999899e-03\n8 7 14 8.45405791768836242e-04\n8 7 15 6.34564350192130212e-05\n8 7 16 1.98398257246557508e-06\n8 8 1 -6.07737125462763963e-03\n8 8 2 2.35375576578925231e-02\n8 8 3 -5.41698070628609062e-02\n8 8 4 9.31174089068825911e-02\n8 8 5 -1.22440885749146396e-01\n8 8 6 1.09543768728231747e-01\n8 8 7 -2.86786656276111020e-02\n8 8 8 -8.08509006678062639e-02\n8 8 9 8.25078213451986908e-02\n8 8 10 6.66138822825660953e-02\n8 8 11 -2.19135656442801136e-02\n8 8 12 -3.59346642468239564e-02\n8 8 13 -1.55894257325143435e-02\n8 8 14 -3.52830737777907652e-03\n8 8 15 -4.54457772560449918e-04\n8 8 16 -3.16816610391724225e-05\n8 8 17 -9.32216855194704474e-07\n9 0 8 2.78207442037328614e-02\n9 0 10 -2.50313087160879435e-02\n9 1 7 3.01758338848574734e-03\n9 1 8 -4.81869424652426646e-02\n9 1 9 -4.85168293436660306e-03\n9 1 10 4.33554984762059996e-02\n9 1 11 1.97274348809324099e-03\n9 2 6 8.36927048859517925e-04\n9 2 7 -1.16870502093974454e-02\n9 2 8 6.04316730749176526e-02\n9 2 9 1.87904872058805857e-02\n9 2 10 -5.46833565232558795e-02\n9 2 11 -7.64040267572425197e-03\n9 2 12 -3.18626817417749719e-04\n9 3 5 4.14050780465160044e-04\n9 3 6 -4.95132719368701856e-03\n9 3 7 2.66435460015444877e-02\n9 3 8 -6.30915175301304235e-02\n9 3 9 -4.34997475330312666e-02\n9 3 10 5.86046285862538564e-02\n9 3 11 1.76550693636761133e-02\n9 3 12 1.88502167287852172e-03\n9 3 13 7.25545180176462131e-05\n9 4 4 3.30298259377608466e-04\n9 4 5 -3.28642618578904248e-03\n9 4 6 1.59921838822789066e-02\n9 4 7 -4.42251424571268050e-02\n9 4 8 4.86231640216219813e-02\n9 4 9 7.63609791742784070e-02\n9 4 10 -4.97041127549122234e-02\n9 4 11 -3.07922262939465496e-02\n9 4 12 -6.24925739565407969e-03\n9 4 13 -5.75883633506540785e-04\n9 4 14 -2.05804020696765693e-05\n9 5 3 4.14050780465160044e-04\n9 5 4 -3.28642618578904248e-03\n9 5 5 1.34950431688565745e-02\n9 5 6 -3.49838782764369526e-02\n9 5 7 5.23009956644892337e-02\n9 5 8 -9.25795684738160939e-03\n9 5 9 -1.06207309691434827e-01\n9 5 10 2.14873893941407330e-02\n9 5 11 4.20415330629211204e-02\n9 5 12 1.49193315735820024e-02\n9 5 13 2.47691730615629418e-03\n9 5 14 2.04772415099312667e-04\n9 5 15 6.82954241473515809e-06\n9 6 2 8.36927048859517925e-04\n9 6 3 -4.95132719368701856e-03\n9 6 4 1.59921838822789066e-02\n9 6 5 -3.49838782764369526e-02\n9 6 6 5.05130667229532649e-02\n9 6 7 -3.01264731159960255e-02\n9 6 8 -5.13958432956955362e-02\n9 6 9 1.10798172187187710e-01\n9 6 10 2.67209801611784837e-02\n9 6 11 -4.12591818857230695e-02\n9 6 12 -2.73364708733450976e-02\n9 6 13 -7.47159131349493606e-03\n9 6 14 -1.08052970570641068e-03\n9 6 15 -8.16694489514733678e-05\n9 6 16 -2.55341737009857604e-06\n9 7 1 3.01758338848574734e-03\n9 7 2 -1.16870502093974454e-02\n9 7 3 2.66435460015444877e-02\n9 7 4 -4.42251424571268050e-02\n9 7 5 5.23009956644892337e-02\n9 7 6 -3.01264731159960255e-02\n9 7 7 -3.43830230302171854e-02\n9 7 8 1.01623065793991299e-01\n9 7 9 -6.54090308278105731e-02\n9 7 10 -7.85815058610902417e-02\n9 7 11 1.61961902372758443e-02\n9 7 12 3.74334121915136796e-02\n9 7 13 1.70460989993046888e-02\n9 7 14 3.92971855853192830e-03\n9 7 15 5.10099237217209480e-04\n9 7 16 3.56565330879857141e-05\n9 7 17 1.04917545520511765e-06\n9 8 0 2.78207442037328614e-02\n9 8 1 -4.81869424652426646e-02\n9 8 2 6.04316730749176526e-02\n9 8 3 -6.30915175301304235e-02\n9 8 4 4.86231640216219813e-02\n9 8 5 -9.25795684738160939e-03\n9 8 6 -5.13958432956955362e-02\n9 8 7 1.01623065793991299e-01\n9 8 8 -8.25078213451986908e-02\n9 8 9 -2.64127823538532389e-02\n9 8 10 9.46151191949932547e-02\n9 8 11 3.48442590358079810e-02\n9 8 12 -3.15690166418408560e-02\n9 8 13 -2.93094314006481556e-02\n9 8 14 -1.06917516154205577e-02\n9 8 15 -2.16850597139671795e-03\n9 8 16 -2.57102337819941317e-04\n9 8 17 -1.67539884693239773e-05\n9 8 18 -4.65568220623186427e-07\n9 9 1 -4.85168293436660306e-03\n9 9 2 1.87904872058805857e-02\n9 9 3 -4.34997475330312666e-02\n9 9 4 7.63609791742784070e-02\n9 9 5 -1.06207309691434827e-01\n9 9 6 1.10798172187187710e-01\n9 9 7 -6.54090308278105731e-02\n9 9 8 -2.64127823538532389e-02\n9 9 9 9.40209590743015362e-02\n9 9 10 -3.61816898759162839e-02\n9 9 11 -8.28053193707803246e-02\n9 9 12 -4.26040706943898612e-03\n9 9 13 3.41555944450875163e-02\n9 9 14 2.19476232548836316e-02\n9 9 15 6.83833540891380614e-03\n9 9 16 1.24976609546906832e-03\n9 9 17 1.36909902462919571e-04\n9 9 18 8.36728552647269933e-06\n9 9 19 2.20268007675849810e-07\n10 0 9 2.50313087160879435e-02\n10 0 11 -2.27507877596645037e-02\n10 1 8 2.41236446586371393e-03\n10 1 9 -4.33554984762059996e-02\n10 1 10 -3.96350299214846063e-03\n10 1 11 3.94055203119550322e-02\n10 1 12 1.64332379569229229e-03\n10 2 7 5.85084323543695398e-04\n10 2 8 -9.34304740127271470e-03\n10 2 9 5.46833565232558795e-02\n10 2 10 1.53505810812342542e-02\n10 2 11 -4.99084116106999366e-02\n10 2 12 -6.36456569314260769e-03\n10 2 13 -2.44972247747396109e-04\n10 3 6 2.47876399079082250e-04\n10 3 7 -3.46140553792537105e-03\n10 3 8 2.14688250869282968e-02\n10 3 9 -5.86046285862538564e-02\n10 3 10 -3.56850560463954741e-02\n10 3 11 5.44904387651376382e-02\n10 3 12 1.47677185559309311e-02\n10 3 13 1.44927536231884058e-03\n10 3 14 5.17928760791205233e-05\n10 4 5 1.64527096858241828e-04\n10 4 6 -1.96745792353635462e-03\n10 4 7 1.13151625269367648e-02\n10 4 8 -3.66967060822800533e-02\n10 4 9 4.97041127549122234e-02\n10 4 10 6.35617175932157760e-02\n10 4 11 -4.91830239411199199e-02\n10 4 12 -2.61328823547298275e-02\n10 4 13 -4.82558602800386375e-03\n10 4 14 -4.11093209370416990e-04\n10 4 15 -1.37107261661352912e-05\n10 5 4 1.64527096858241828e-04\n10 5 5 -1.63702394437574661e-03\n10 5 6 8.23617430146007308e-03\n10 5 7 -2.58024161294539083e-02\n10 5 8 4.73797652008675716e-02\n10 5 9 -2.14873893941407330e-02\n10 5 10 -9.17589108329133372e-02\n10 5 11 2.86872307020829311e-02\n10 5 12 3.70721836351588013e-02\n10 5 13 1.16787184829175248e-02\n10 5 14 1.77625541672409236e-03\n10 5 15 1.36420002889136266e-04\n10 5 16 4.26520822018763294e-06\n10 6 3 2.47876399079082250e-04\n10 6 4 -1.96745792353635462e-03\n10 6 5 8.23617430146007308e-03\n10 6 6 -2.28234352824560614e-02\n10 6 7 4.20266845686390068e-02\n10 6 8 -3.90788556983924065e-02\n10 6 9 -2.67209801611784837e-02\n10 6 10 1.04864644714665853e-01\n10 6 11 9.30486675222641471e-03\n10 6 12 -4.03385574345071268e-02\n10 6 13 -2.21038939119987771e-02\n10 6 14 -5.43060386881194915e-03\n10 6 15 -7.23308099368702754e-04\n10 6 16 -5.10044720206231548e-05\n10 6 17 -1.50078079710348494e-06\n10 7 2 5.85084323543695398e-04\n10 7 3 -3.46140553792537105e-03\n10 7 4 1.13151625269367648e-02\n10 7 5 -2.58024161294539083e-02\n10 7 6 4.20266845686390068e-02\n10 7 7 -4.14807632513993532e-02\n10 7 8 -2.18558753755867441e-03\n10 7 9 7.85815058610902417e-02\n10 7 10 -8.25587836948987819e-02\n10 7 11 -5.66221158765762898e-02\n10 7 12 2.59918172659898285e-02\n10 7 13 3.26090329464394276e-02\n10 7 14 1.27681049757543813e-02\n10 7 15 2.66624995036752867e-03\n10 7 16 3.20157264508747523e-04\n10 7 17 2.09572633038319550e-05\n10 7 18 5.82370926383378396e-07\n10 8 1 2.41236446586371393e-03\n10 8 2 -9.34304740127271470e-03\n10 8 3 2.14688250869282968e-02\n10 8 4 -3.66967060822800533e-02\n10 8 5 4.73797652008675716e-02\n10 8 6 -3.90788556983924065e-02\n10 8 7 -2.18558753755867441e-03\n10 8 8 6.66138822825660953e-02\n10 8 9 -9.46151191949932547e-02\n10 8 10 1.59546962891151468e-02\n10 8 11 8.79369239934246657e-02\n10 8 12 1.16208144428425514e-02\n10 8 13 -3.39658396743678018e-02\n10 8 14 -2.33992994614326442e-02\n10 8 15 -7.46741247499840100e-03\n10 8 16 -1.37964743586453098e-03\n10 8 17 -1.51890555439599781e-04\n10 8 18 -9.29971792333733940e-06\n10 8 19 -2.44814203177364312e-07\n10 9 0 2.50313087160879435e-02\n10 9 1 -4.33554984762059996e-02\n10 9 2 5.46833565232558795e-02\n10 9 3 -5.86046285862538564e-02\n10 9 4 4.97041127549122234e-02\n10 9 5 -2.14873893941407330e-02\n10 9 6 -2.67209801611784837e-02\n10 9 7 7.85815058610902417e-02\n10 9 8 -9.46151191949932547e-02\n10 9 9 3.61816898759162839e-02\n10 9 10 6.41233300273331695e-02\n10 9 11 -6.80635421706466036e-02\n10 9 12 -6.01511278070093138e-02\n10 9 13 1.36327905179562064e-02\n10 9 14 3.17093904501436660e-02\n10 9 15 1.62512246767944099e-02\n10 9 16 4.47598360470632244e-03\n10 9 17 7.48531335973118743e-04\n10 9 18 7.63968704247340594e-05\n10 9 19 4.39985000732863667e-06\n10 9 20 1.10030640132526772e-07\n10 10 1 -3.96350299214846063e-03\n10 10 2 1.53505810812342542e-02\n10 10 3 -3.56850560463954741e-02\n10 10 4 6.35617175932157760e-02\n10 10 5 -9.17589108329133372e-02\n10 10 6 1.04864644714665853e-01\n10 10 7 -8.25587836948987819e-02\n10 10 8 1.59546962891151468e-02\n10 10 9 6.41233300273331695e-02\n10 10 10 -8.03115310407003972e-02\n10 10 11 -1.06515933061992265e-02\n10 10 12 8.00951267100894774e-02\n10 10 13 3.11311984870053513e-02\n10 10 14 -2.49119884552280251e-02\n10 10 15 -2.66291009068528934e-02\n10 10 16 -1.12427083633603759e-02\n10 10 17 -2.75718736474113094e-03\n10 10 18 -4.23513375109156628e-04\n10 10 19 -4.03896312611472896e-05\n10 10 20 -2.19786031526607050e-06\n10 10 21 -5.23448465843325039e-08\n11 0 10 2.27507877596645037e-02\n11 0 12 -2.08514414057074763e-02\n11 1 9 1.97274348809324099e-03\n11 1 10 -3.94055203119550322e-02\n11 1 11 -3.29914439536929008e-03\n11 1 12 3.61157559257307602e-02\n11 1 13 1.39009609371383175e-03\n11 2 8 4.25123376909681056e-04\n11 2 9 -7.64040267572425197e-03\n11 2 10 4.99084116106999366e-02\n11 2 11 1.27775312999987983e-02\n11 2 12 -4.58851572308725821e-02\n11 2 13 -5.38381902058165506e-03\n11 2 14 -1.92401995242124404e-04\n11 3 7 1.57499405486934917e-04\n11 3 8 -2.51506381545840222e-03\n11 3 9 1.76550693636761133e-02\n11 3 10 -5.44904387651376382e-02\n11 3 11 -2.97950941296162750e-02\n11 3 12 5.07893372909642638e-02\n11 3 13 1.25312384993462416e-02\n11 3 14 1.13826555427996070e-03\n11 3 15 3.79632817165182197e-05\n11 4 6 8.95224352888916753e-05\n11 4 7 -1.25011277567685489e-03\n11 4 8 8.28927359086239466e-03\n11 4 9 -3.07922262939465496e-02\n11 4 10 4.91830239411199199e-02\n11 4 11 5.36340852130325815e-02\n11 4 12 -4.78706758674401986e-02\n11 4 13 -2.24166760918328857e-02\n11 4 14 -3.80262450518796354e-03\n11 4 15 -3.01324207121377443e-04\n11 4 16 -9.42098268536224320e-06\n11 5 5 7.44871686319628826e-05\n11 5 6 -8.90736984516375605e-04\n11 5 7 5.29857349548422604e-03\n11 5 8 -1.94212439631461078e-02\n11 5 9 4.20415330629211204e-02\n11 5 10 -2.86872307020829311e-02\n11 5 11 -7.94803853112293811e-02\n11 5 12 3.28280264589297311e-02\n11 5 13 3.26896765669064892e-02\n11 5 14 9.29780838638140804e-03\n11 5 15 1.30654787555164309e-03\n11 5 16 9.37375941713442053e-05\n11 5 17 2.75818130696756434e-06\n11 6 4 8.95224352888916753e-05\n11 6 5 -8.90736984516375605e-04\n11 6 6 4.57053266725724248e-03\n11 6 7 -1.52833691554544440e-02\n11 6 8 3.39680049489014763e-02\n11 6 9 -4.12591818857230695e-02\n11 6 10 -9.30486675222641471e-03\n11 6 11 9.64405736696115054e-02\n11 6 12 -2.85080770731335148e-03\n11 6 13 -3.80779181383199498e-02\n11 6 14 -1.80191385588245468e-02\n11 6 15 -4.03534812316872869e-03\n11 6 16 -4.98841936416818439e-04\n11 6 17 -3.29830512454663312e-05\n11 6 18 -9.16549543244059604e-07\n11 7 3 1.57499405486934917e-04\n11 7 4 -1.25011277567685489e-03\n11 7 5 5.29857349548422604e-03\n11 7 6 -1.52833691554544440e-02\n11 7 7 3.13210267745333703e-02\n11 7 8 -4.13722253982126514e-02\n11 7 9 1.61961902372758443e-02\n11 7 10 5.66221158765762898e-02\n11 7 11 -8.85609941826606009e-02\n11 7 12 -3.82934681411128603e-02\n11 7 13 3.07132881361792072e-02\n11 7 14 2.79805552543189292e-02\n11 7 15 9.70004307367935421e-03\n11 7 16 1.85772527767868054e-03\n11 7 17 2.07834712460393045e-04\n11 7 18 1.27989178338668299e-05\n11 7 19 3.36930313033216692e-07\n11 8 2 4.25123376909681056e-04\n11 8 3 -2.51506381545840222e-03\n11 8 4 8.28927359086239466e-03\n11 8 5 -1.94212439631461078e-02\n11 8 6 3.39680049489014763e-02\n11 8 7 -4.13722253982126514e-02\n11 8 8 2.19135656442801136e-02\n11 8 9 3.48442590358079810e-02\n11 8 10 -8.79369239934246657e-02\n11 8 11 4.36410639050910272e-02\n11 8 12 7.45939315973426309e-02\n11 8 13 -4.03939316052499536e-03\n11 8 14 -3.29668805118769613e-02\n11 8 15 -1.85891665541255309e-02\n11 8 16 -5.31569681866178441e-03\n11 8 17 -9.04930235115306446e-04\n11 8 18 -9.31324599951418657e-05\n11 8 19 -5.38034563382025249e-06\n11 8 20 -1.34550694509452529e-07\n11 9 1 1.97274348809324099e-03\n11 9 2 -7.64040267572425197e-03\n11 9 3 1.76550693636761133e-02\n11 9 4 -3.07922262939465496e-02\n11 9 5 4.20415330629211204e-02\n11 9 6 -4.12591818857230695e-02\n11 9 7 1.61961902372758443e-02\n11 9 8 3.48442590358079810e-02\n11 9 9 -8.28053193707803246e-02\n11 9 10 6.80635421706466036e-02\n11 9 11 2.81470902506911272e-02\n11 9 12 -7.86007816864608214e-02\n11 9 13 -3.82074835175713013e-02\n11 9 14 2.29430069711331248e-02\n11 9 15 2.76906788758406076e-02\n11 9 16 1.20576117759153018e-02\n11 9 17 2.99846029863051254e-03\n11 9 18 4.63799899275312515e-04\n11 9 19 4.43812329871604259e-05\n11 9 20 2.41817209353082523e-06\n11 9 21 5.75918525718781650e-08\n11 10 0 2.27507877596645037e-02\n11 10 1 -3.94055203119550322e-02\n11 10 2 4.99084116106999366e-02\n11 10 3 -5.44904387651376382e-02\n11 10 4 4.91830239411199199e-02\n11 10 5 -2.86872307020829311e-02\n11 10 6 -9.30486675222641471e-03\n11 10 7 5.66221158765762898e-02\n11 10 8 -8.79369239934246657e-02\n11 10 9 6.80635421706466036e-02\n11 10 10 1.06515933061992265e-02\n11 10 11 -7.88337494684338699e-02\n11 10 12 3.00842409970375658e-02\n11 10 13 7.23195073361361324e-02\n11 10 14 9.08129933163862332e-03\n11 10 15 -2.84151449684205039e-02\n11 10 16 -2.14391837815608122e-02\n11 10 17 -7.83523736166302336e-03\n11 10 18 -1.74454348445600804e-03\n11 10 19 -2.48656318353830074e-04\n11 10 20 -2.22919365866903583e-05\n11 10 21 -1.15039635412396839e-06\n11 10 22 -2.61521267220005581e-08\n11 11 1 -3.29914439536929008e-03\n11 11 2 1.27775312999987983e-02\n11 11 3 -2.97950941296162750e-02\n11 11 4 5.36340852130325815e-02\n11 11 5 -7.94803853112293811e-02\n11 11 6 9.64405736696115054e-02\n11 11 7 -8.85609941826606009e-02\n11 11 8 4.36410639050910272e-02\n11 11 9 2.81470902506911272e-02\n11 11 10 -7.88337494684338699e-02\n11 11 11 4.78896013099642806e-02\n11 11 12 4.69481081271960026e-02\n11 11 13 -6.03533045476924381e-02\n11 11 14 -5.23849884445014751e-02\n11 11 15 9.07853627321011036e-03\n11 11 16 2.77242023524499289e-02\n11 11 17 1.60976769688076058e-02\n11 11 18 5.15152890897287684e-03\n11 11 19 1.04588272604850024e-03\n11 11 20 1.38720765014700357e-04\n11 11 21 1.17182663220125699e-05\n11 11 22 5.74752114042538378e-07\n11 11 23 1.24975646345587106e-08\n12 0 11 2.08514414057074763e-02\n12 0 13 -1.92450089729875255e-02\n12 1 10 1.64332379569229229e-03\n12 1 11 -3.61157559257307602e-02\n12 1 12 -2.78913173521558340e-03\n12 1 13 3.33333333333333333e-02\n12 1 14 1.19123614981977204e-03\n12 2 9 3.18626817417749719e-04\n12 2 10 -6.36456569314260769e-03\n12 2 11 4.58851572308725821e-02\n12 2 12 1.08022607608685493e-02\n12 2 13 -4.24524911178490806e-02\n12 2 14 -4.61363776965222049e-03\n12 2 15 -1.53873434655651123e-04\n12 3 8 1.04885411559291910e-04\n12 3 9 -1.88502167287852172e-03\n12 3 10 1.47677185559309311e-02\n12 3 11 -5.07893372909642638e-02\n12 3 12 -2.52480016119773643e-02\n12 3 13 4.74822935575967430e-02\n12 3 14 1.07647339928840204e-02\n12 3 15 9.10327515922397439e-04\n12 3 16 2.84616355501074213e-05\n12 4 7 5.21333065851045482e-05\n12 4 8 -8.32502145433637209e-04\n12 4 9 6.24925739565407969e-03\n12 4 10 -2.61328823547298275e-02\n12 4 11 4.78706758674401986e-02\n12 4 12 4.58104281192736965e-02\n12 4 13 -4.61891384288571330e-02\n12 4 14 -1.94174180951849463e-02\n12 4 15 -3.04904431984030203e-03\n12 4 16 -2.25907228715217810e-04\n12 4 17 -6.64720596746060836e-06\n12 5 6 3.71463000810795470e-05\n12 5 7 -5.18719851070068476e-04\n12 5 8 3.55874757126704313e-03\n12 5 9 -1.49193315735820024e-02\n12 5 10 3.70721836351588013e-02\n12 5 11 -3.28280264589297311e-02\n12 5 12 -6.92025220860055608e-02\n12 5 13 3.50737108810998166e-02\n12 5 14 2.89064031291373733e-02\n12 5 15 7.51448926827492906e-03\n12 5 16 9.82245948130426814e-04\n12 5 17 6.61388642948346091e-05\n12 5 18 1.83789987800003593e-06\n12 6 5 3.71463000810795470e-05\n12 6 6 -4.44205142011037825e-04\n12 6 7 2.69583335271272126e-03\n12 6 8 -1.05390535382793731e-02\n12 6 9 2.73364708733450976e-02\n12 6 10 -4.03385574345071268e-02\n12 6 11 2.85080770731335148e-03\n12 6 12 8.75719262278936956e-02\n12 6 13 -1.13070878782869079e-02\n12 6 14 -3.53286946971012182e-02\n12 6 15 -1.48260049821842435e-02\n12 6 16 -3.05773879753781530e-03\n12 6 17 -3.52996941309709105e-04\n12 6 18 -2.19780859608386784e-05\n12 6 19 -5.78571054113805895e-07\n12 7 4 5.21333065851045482e-05\n12 7 5 -5.18719851070068476e-04\n12 7 6 2.69583335271272126e-03\n12 7 7 -9.37766410912190963e-03\n12 7 8 2.30384785486414317e-02\n12 7 9 -3.74334121915136796e-02\n12 7 10 2.59918172659898285e-02\n12 7 11 3.82934681411128603e-02\n12 7 12 -8.85486778957046571e-02\n12 7 13 -2.37417008446853554e-02\n12 7 14 3.24931425668929042e-02\n12 7 15 2.38937931798467511e-02\n12 7 16 7.47494353091855819e-03\n12 7 17 1.32510150165502507e-03\n12 7 18 1.38912319768399353e-04\n12 7 19 8.07930508202161526e-06\n12 7 20 2.02045776224211043e-07\n12 8 3 1.04885411559291910e-04\n12 8 4 -8.32502145433637209e-04\n12 8 5 3.55874757126704313e-03\n12 8 6 -1.05390535382793731e-02\n12 8 7 2.30384785486414317e-02\n12 8 8 -3.59346642468239564e-02\n12 8 9 3.15690166418408560e-02\n12 8 10 1.16208144428425514e-02\n12 8 11 -7.45939315973426309e-02\n12 8 12 6.00486030265657245e-02\n12 8 13 6.00381214056659087e-02\n12 8 14 -1.41255872596118352e-02\n12 8 15 -3.05276104377743973e-02\n12 8 16 -1.48033969529521958e-02\n12 8 17 -3.85428843624612877e-03\n12 8 18 -6.09746077425395802e-04\n12 8 19 -5.89762081724134042e-05\n12 8 20 -3.22641231106026047e-06\n12 8 21 -7.68411241911913126e-08\n12 9 2 3.18626817417749719e-04\n12 9 3 -1.88502167287852172e-03\n12 9 4 6.24925739565407969e-03\n12 9 5 -1.49193315735820024e-02\n12 9 6 2.73364708733450976e-02\n12 9 7 -3.74334121915136796e-02\n12 9 8 3.15690166418408560e-02\n12 9 9 4.26040706943898612e-03\n12 9 10 -6.01511278070093138e-02\n12 9 11 7.86007816864608214e-02\n12 9 12 -2.21926029510254415e-03\n12 9 13 -7.73315418902468758e-02\n12 9 14 -2.02895491337136598e-02\n12 9 15 2.70404319173854986e-02\n12 9 16 2.35281738975001265e-02\n12 9 17 9.01520842463078940e-03\n12 9 18 2.05334875095422208e-03\n12 9 19 2.96123792253294951e-04\n12 9 20 2.67010955758118129e-05\n12 9 21 1.38100411025096012e-06\n12 9 22 3.13945661992204168e-08\n12 10 1 1.64332379569229229e-03\n12 10 2 -6.36456569314260769e-03\n12 10 3 1.47677185559309311e-02\n12 10 4 -2.61328823547298275e-02\n12 10 5 3.70721836351588013e-02\n12 10 6 -4.03385574345071268e-02\n12 10 7 2.59918172659898285e-02\n12 10 8 1.16208144428425514e-02\n12 10 9 -6.01511278070093138e-02\n12 10 10 8.00951267100894774e-02\n12 10 11 -3.00842409970375658e-02\n12 10 12 -5.81906844455580757e-02\n12 10 13 5.39512436938627280e-02\n12 10 14 5.75176487280508036e-02\n12 10 15 -5.71869066811169869e-03\n12 10 16 -2.80417119002370714e-02\n12 10 17 -1.69728137444258353e-02\n12 10 18 -5.52609687997466959e-03\n12 10 19 -1.13194244210759751e-03\n12 10 20 -1.50851908166068846e-04\n12 10 21 -1.27736529995533680e-05\n12 10 22 -6.27105968675196076e-07\n12 10 23 -1.36359609382067647e-08\n12 11 0 2.08514414057074763e-02\n12 11 1 -3.61157559257307602e-02\n12 11 2 4.58851572308725821e-02\n12 11 3 -5.07893372909642638e-02\n12 11 4 4.78706758674401986e-02\n12 11 5 -3.28280264589297311e-02\n12 11 6 2.85080770731335148e-03\n12 11 7 3.82934681411128603e-02\n12 11 8 -7.45939315973426309e-02\n12 11 9 7.86007816864608214e-02\n12 11 10 -3.00842409970375658e-02\n12 11 11 -4.69481081271960026e-02\n12 11 12 7.07685810626546279e-02\n12 11 13 9.31515357860556413e-03\n12 11 14 -6.88885399491161869e-02\n12 11 15 -3.16766587980545074e-02\n12 11 16 1.88402688257952321e-02\n12 11 17 2.46777427581086162e-02\n12 11 18 1.19698444491617127e-02\n12 11 19 3.44001798303490018e-03\n12 11 20 6.44810955677708239e-04\n12 11 21 8.01645028627204461e-05\n12 11 22 6.40989873777586054e-06\n12 11 23 2.99681072195274360e-07\n12 11 24 6.24471100683480272e-09\n12 12 1 -2.78913173521558340e-03\n12 12 2 1.08022607608685493e-02\n12 12 3 -2.52480016119773643e-02\n12 12 4 4.58104281192736965e-02\n12 12 5 -6.92025220860055608e-02\n12 12 6 8.75719262278936956e-02\n12 12 7 -8.85486778957046571e-02\n12 12 8 6.00486030265657245e-02\n12 12 9 -2.21926029510254415e-03\n12 12 10 -5.81906844455580757e-02\n12 12 11 7.07685810626546279e-02\n12 12 12 -7.94563638353967298e-03\n12 12 13 -6.54845122106994487e-02\n12 12 14 2.94409259820778561e-02\n12 12 15 6.29788139718148209e-02\n12 12 16 1.05644331833611289e-02\n12 12 17 -2.38360288609972714e-02\n12 12 18 -2.03018443486133936e-02\n12 12 19 -8.40433228806985434e-03\n12 12 20 -2.18167452224666921e-03\n12 12 21 -3.78690834434610335e-04\n12 12 22 -4.42273789883797263e-05\n12 12 23 -3.35393826417238865e-06\n12 12 24 -1.49742909502781293e-07\n12 12 25 -2.99545734144504652e-09\n13 0 12 1.92450089729875255e-02\n13 0 14 -1.78685422472965805e-02\n13 1 11 1.39009609371383175e-03\n13 1 12 -3.33333333333333333e-02\n13 1 13 -2.38903559664672730e-03\n13 1 14 3.09492230295086439e-02\n13 1 15 1.03221437946422357e-03\n13 2 10 2.44972247747396109e-04\n13 2 11 -5.38381902058165506e-03\n13 2 12 4.24524911178490806e-02\n13 2 13 9.25269507930947461e-03\n13 2 14 -3.94912783804090595e-02\n13 2 15 -3.99774910138076097e-03\n13 2 16 -1.24990704943129790e-04\n13 3 9 7.25545180176462131e-05\n13 3 10 -1.44927536231884058e-03\n13 3 11 1.25312384993462416e-02\n13 3 12 -4.74822935575967430e-02\n13 3 13 -2.16655516752651003e-02\n13 3 14 4.45306773247051695e-02\n13 3 15 9.34572952669840121e-03\n13 3 16 7.39454982589419394e-04\n13 3 17 2.17580889327502887e-05\n13 4 8 3.20430225178034280e-05\n13 4 9 -5.75883633506540785e-04\n13 4 10 4.82558602800386375e-03\n13 4 11 -2.24166760918328857e-02\n13 4 12 4.61891384288571330e-02\n13 4 13 3.95511921458625526e-02\n13 4 14 -4.43635601244750650e-02\n13 4 15 -1.69683004592251408e-02\n13 4 16 -2.48185088973909990e-03\n13 4 17 -1.72699476960252105e-04\n13 4 18 -4.79905953965263927e-06\n13 5 7 1.99655363766204414e-05\n13 5 8 -3.18824048521389453e-04\n13 5 9 2.47691730615629418e-03\n13 5 10 -1.16787184829175248e-02\n13 5 11 3.26896765669064892e-02\n13 5 12 -3.50737108810998166e-02\n13 5 13 -6.06230722032980841e-02\n13 5 14 3.61276873369919357e-02\n13 5 15 2.56653335628944188e-02\n13 5 16 6.15498702261772340e-03\n13 5 17 7.52559845227437142e-04\n13 5 18 4.77500395188105493e-05\n13 5 19 1.25701531733020288e-06\n13 6 6 1.70974638876992419e-05\n13 6 7 -2.38753089867503153e-04\n13 6 8 1.67163953080714574e-03\n13 6 9 -7.47159131349493606e-03\n13 6 10 2.21038939119987771e-02\n13 6 11 -3.80779181383199498e-02\n13 6 12 1.13070878782869079e-02\n13 6 13 7.91174118442482576e-02\n13 6 14 -1.71747757762610070e-02\n13 6 15 -3.25009606382298710e-02\n13 6 16 -1.23137235059757310e-02\n13 6 17 -2.35742078014038360e-03\n13 6 18 -2.55449288190086492e-04\n13 6 19 -1.50317169227069116e-05\n13 6 20 -3.75910413432609315e-07\n13 7 5 1.99655363766204414e-05\n13 7 6 -2.38753089867503153e-04\n13 7 7 1.46802362346107284e-03\n13 7 8 -5.96888271453999899e-03\n13 7 9 1.70460989993046888e-02\n13 7 10 -3.26090329464394276e-02\n13 7 11 3.07132881361792072e-02\n13 7 12 2.37417008446853554e-02\n13 7 13 -8.54407948425896278e-02\n13 7 14 -1.24315860912424208e-02\n13 7 15 3.25934015616096901e-02\n13 7 16 2.04086148652993311e-02\n13 7 17 5.83926916635132543e-03\n13 7 18 9.65020304861727634e-04\n13 7 19 9.52416299757896497e-05\n13 7 20 5.24930324812538107e-06\n13 7 21 1.25018851875715106e-07\n13 8 4 3.20430225178034280e-05\n13 8 5 -3.18824048521389453e-04\n13 8 6 1.67163953080714574e-03\n13 8 7 -5.96888271453999899e-03\n13 8 8 1.55894257325143435e-02\n13 8 9 -2.93094314006481556e-02\n13 8 10 3.39658396743678018e-02\n13 8 11 -4.03939316052499536e-03\n13 8 12 -6.00381214056659087e-02\n13 8 13 6.87873094179734925e-02\n13 8 14 4.64776679940909483e-02\n13 8 15 -2.03560399736343472e-02\n13 8 16 -2.76103632061903221e-02\n13 8 17 -1.18570155095562008e-02\n13 8 18 -2.84323707108761423e-03\n13 8 19 -4.20763606560936977e-04\n13 8 20 -3.84163825688690781e-05\n13 8 21 -1.99639096814779959e-06\n13 8 22 -4.53842446548925891e-08\n13 9 3 7.25545180176462131e-05\n13 9 4 -5.75883633506540785e-04\n13 9 5 2.47691730615629418e-03\n13 9 6 -7.47159131349493606e-03\n13 9 7 1.70460989993046888e-02\n13 9 8 -2.93094314006481556e-02\n13 9 9 3.41555944450875163e-02\n13 9 10 -1.36327905179562064e-02\n13 9 11 -3.82074835175713013e-02\n13 9 12 7.73315418902468758e-02\n13 9 13 -2.47776513335877878e-02\n13 9 14 -7.03731345713656673e-02\n13 9 15 -6.69077170564554257e-03\n13 9 16 2.81370517273516205e-02\n13 9 17 1.97529025682962073e-02\n13 9 18 6.80866109005227801e-03\n13 9 19 1.43510722356521578e-03\n13 9 20 1.94163685300227796e-04\n13 9 21 1.65655598285445408e-05\n13 9 22 8.15654756079514523e-07\n13 9 23 1.77358165103408376e-08\n13 10 2 2.44972247747396109e-04\n13 10 3 -1.44927536231884058e-03\n13 10 4 4.82558602800386375e-03\n13 10 5 -1.16787184829175248e-02\n13 10 6 2.21038939119987771e-02\n13 10 7 -3.26090329464394276e-02\n13 10 8 3.39658396743678018e-02\n13 10 9 -1.36327905179562064e-02\n13 10 10 -3.11311984870053513e-02\n13 10 11 7.23195073361361324e-02\n13 10 12 -5.39512436938627280e-02\n13 10 13 -3.32382703354497990e-02\n13 10 14 6.48870970147846996e-02\n13 10 15 4.18305655859410087e-02\n13 10 16 -1.48988165111497922e-02\n13 10 17 -2.59366787569523694e-02\n13 10 18 -1.33697848984711757e-02\n13 10 19 -3.95092544349672006e-03\n13 10 20 -7.51696861309671145e-04\n13 10 21 -9.42179177460143975e-05\n13 10 22 -7.56506315002862099e-06\n13 10 23 -3.54272657324980387e-07\n13 10 24 -7.38228259266353936e-09\n13 11 1 1.39009609371383175e-03\n13 11 2 -5.38381902058165506e-03\n13 11 3 1.25312384993462416e-02\n13 11 4 -2.24166760918328857e-02\n13 11 5 3.26896765669064892e-02\n13 11 6 -3.80779181383199498e-02\n13 11 7 3.07132881361792072e-02\n13 11 8 -4.03939316052499536e-03\n13 11 9 -3.82074835175713013e-02\n13 11 10 7.23195073361361324e-02\n13 11 11 -6.03533045476924381e-02\n13 11 12 -9.31515357860556413e-03\n13 11 13 6.93388281838543229e-02\n13 11 14 -2.06607563574291034e-02\n13 11 15 -6.51599176491593956e-02\n13 11 16 -1.45578063844227668e-02\n13 11 17 2.32024024860648810e-02\n13 11 18 2.10452727962350511e-02\n13 11 19 8.90090634003419542e-03\n13 11 20 2.33575295743837009e-03\n13 11 21 4.07897020541353666e-04\n13 11 22 4.78005418458388388e-05\n13 11 23 3.63132127791309960e-06\n13 11 24 1.62242351136337153e-07\n13 11 25 3.24549618688702944e-09\n13 12 0 1.92450089729875255e-02\n13 12 1 -3.33333333333333333e-02\n13 12 2 4.24524911178490806e-02\n13 12 3 -4.74822935575967430e-02\n13 12 4 4.61891384288571330e-02\n13 12 5 -3.50737108810998166e-02\n13 12 6 1.13070878782869079e-02\n13 12 7 2.37417008446853554e-02\n13 12 8 -6.00381214056659087e-02\n13 12 9 7.73315418902468758e-02\n13 12 10 -5.39512436938627280e-02\n13 12 11 -9.31515357860556413e-03\n13 12 12 6.54845122106994487e-02\n13 12 13 -4.53735643076456541e-02\n13 12 14 -4.07335711249473759e-02\n13 12 15 5.12501187547571796e-02\n13 12 16 4.89664410366655450e-02\n13 12 17 -4.00420945681396267e-03\n13 12 18 -2.44297434879758880e-02\n13 12 19 -1.61949496361122405e-02\n13 12 20 -5.92479503836302941e-03\n13 12 21 -1.41067808336101020e-03\n13 12 22 -2.28714256474037948e-04\n13 12 23 -2.52291197996546294e-05\n13 12 24 -1.82097560355964681e-06\n13 12 25 -7.78242646093202254e-08\n13 12 26 -1.49689729199028474e-09\n13 13 1 -2.38903559664672730e-03\n13 13 2 9.25269507930947461e-03\n13 13 3 -2.16655516752651003e-02\n13 13 4 3.95511921458625526e-02\n13 13 5 -6.06230722032980841e-02\n13 13 6 7.91174118442482576e-02\n13 13 7 -8.54407948425896278e-02\n13 13 8 6.87873094179734925e-02\n13 13 9 -2.47776513335877878e-02\n13 13 10 -3.32382703354497990e-02\n13 13 11 6.93388281838543229e-02\n13 13 12 -4.53735643076456541e-02\n13 13 13 -2.81779576908020237e-02\n13 13 14 6.41515149072755355e-02\n13 13 15 4.47215296027010552e-03\n13 13 16 -6.04643295927200605e-02\n13 13 17 -2.99316991816561416e-02\n13 13 18 1.46164907278440315e-02\n13 13 19 2.25029247571786647e-02\n13 13 20 1.21800633622373598e-02\n13 13 21 3.97291676963851346e-03\n13 13 22 8.70718756070135077e-04\n13 13 23 1.32156749985220299e-04\n13 13 24 1.37939644871385591e-05\n13 13 25 9.49164350796756815e-07\n13 13 26 3.88905324515915730e-08\n13 13 27 7.20318567404937121e-10\n14 0 13 1.78685422472965805e-02\n14 0 15 -1.66759336491267518e-02\n14 1 12 1.19123614981977204e-03\n14 1 13 -3.09492230295086439e-02\n14 1 14 -2.06935580354704575e-03\n14 1 15 2.88835643439350053e-02\n14 1 16 9.03052437025571428e-04\n14 2 11 1.92401995242124404e-04\n14 2 12 -4.61363776965222049e-03\n14 2 13 3.94912783804090595e-02\n14 2 14 8.01458056451537526e-03\n14 2 15 -3.69118694981505784e-02\n14 2 16 -3.49750704935206024e-03\n14 2 17 -1.02912376296715016e-04\n14 3 10 5.17928760791205233e-05\n14 3 11 -1.13826555427996070e-03\n14 3 12 1.07647339928840204e-02\n14 3 13 -4.45306773247051695e-02\n14 3 14 -1.87935414080182714e-02\n14 3 15 4.18920716328071034e-02\n14 3 16 8.18902909944351627e-03\n14 3 17 6.08837828839735842e-04\n14 3 18 1.69186904443678044e-05\n14 4 9 2.05804020696765693e-05\n14 4 10 -4.11093209370416990e-04\n14 4 11 3.80262450518796354e-03\n14 4 12 -1.94174180951849463e-02\n14 4 13 4.43635601244750650e-02\n14 4 14 3.44737699576409254e-02\n14 4 15 -4.25152086165615369e-02\n14 4 16 -1.49461569381264220e-02\n14 4 17 -2.04688493318231172e-03\n14 4 18 -1.34287942274046237e-04\n14 4 19 -3.53511750089196671e-06\n14 5 8 1.13938419609171647e-05\n14 5 9 -2.04772415099312667e-04\n14 5 10 1.77625541672409236e-03\n14 5 11 -9.29780838638140804e-03\n14 5 12 2.89064031291373733e-02\n14 5 13 -3.61276873369919357e-02\n14 5 14 -5.34422632574019549e-02\n14 5 15 3.64249447907536893e-02\n14 5 16 2.28920899863360203e-02\n14 5 17 5.10187574928988435e-03\n14 5 18 5.86230244720984294e-04\n14 5 19 3.51739750208325724e-05\n14 5 20 8.79624301078733988e-07\n14 6 7 8.53233934594015449e-06\n14 6 8 -1.36250533034337184e-04\n14 6 9 1.08052970570641068e-03\n14 6 10 -5.43060386881194915e-03\n14 6 11 1.80191385588245468e-02\n14 6 12 -3.53286946971012182e-02\n14 6 13 1.71747757762610070e-02\n14 6 14 7.13989767640438641e-02\n14 6 15 -2.12236717495320615e-02\n14 6 16 -2.97863642394934914e-02\n14 6 17 -1.03201869546388218e-02\n14 6 18 -1.84568546537903763e-03\n14 6 19 -1.88530966902465579e-04\n14 6 20 -1.05187767482678294e-05\n14 6 21 -2.50518084028587584e-07\n14 7 6 8.53233934594015449e-06\n14 7 7 -1.19147634761602802e-04\n14 7 8 8.45405791768836242e-04\n14 7 9 -3.92971855853192830e-03\n14 7 10 1.27681049757543813e-02\n14 7 11 -2.79805552543189292e-02\n14 7 12 3.24931425668929042e-02\n14 7 13 1.24315860912424208e-02\n14 7 14 -8.08626139654088857e-02\n14 7 15 -3.72232197374830235e-03\n14 7 16 3.17578975312912493e-02\n14 7 17 1.74804378727756182e-02\n14 7 18 4.61996406408299089e-03\n14 7 19 7.15888508412150896e-04\n14 7 20 6.67817330230704535e-05\n14 7 21 3.49829466068027517e-06\n14 7 22 7.95272385461242824e-08\n14 8 5 1.13938419609171647e-05\n14 8 6 -1.36250533034337184e-04\n14 8 7 8.45405791768836242e-04\n14 8 8 -3.52830737777907652e-03\n14 8 9 1.06917516154205577e-02\n14 8 10 -2.33992994614326442e-02\n14 8 11 3.29668805118769613e-02\n14 8 12 -1.41255872596118352e-02\n14 8 13 -4.64776679940909483e-02\n14 8 14 7.25709934736540332e-02\n14 8 15 3.46517971152242210e-02\n14 8 16 -2.39900211896899268e-02\n14 8 17 -2.46736219085181437e-02\n14 8 18 -9.56656827999894638e-03\n14 8 19 -2.13104219636607256e-03\n14 8 20 -2.96583147223887844e-04\n14 8 21 -2.56557312995734247e-05\n14 8 22 -1.26994815880290946e-06\n14 8 23 -2.76140945103222912e-08\n14 9 4 2.05804020696765693e-05\n14 9 5 -2.04772415099312667e-04\n14 9 6 1.08052970570641068e-03\n14 9 7 -3.92971855853192830e-03\n14 9 8 1.06917516154205577e-02\n14 9 9 -2.19476232548836316e-02\n14 9 10 3.17093904501436660e-02\n14 9 11 -2.29430069711331248e-02\n14 9 12 -2.02895491337136598e-02\n14 9 13 7.03731345713656673e-02\n14 9 14 -4.03859581697868496e-02\n14 9 15 -6.11689869295028232e-02\n14 9 16 3.22331505512012762e-03\n14 9 17 2.75823163260090445e-02\n14 9 18 1.65138797026071914e-02\n14 9 19 5.19850928942592714e-03\n14 9 20 1.02196622505024841e-03\n14 9 21 1.30365091202553386e-04\n14 9 22 1.05607381844705821e-05\n14 9 23 4.96286050223939680e-07\n14 9 24 1.03415372137769474e-08\n14 10 3 5.17928760791205233e-05\n14 10 4 -4.11093209370416990e-04\n14 10 5 1.77625541672409236e-03\n14 10 6 -5.43060386881194915e-03\n14 10 7 1.27681049757543813e-02\n14 10 8 -2.33992994614326442e-02\n14 10 9 3.17093904501436660e-02\n14 10 10 -2.49119884552280251e-02\n14 10 11 -9.08129933163862332e-03\n14 10 12 5.75176487280508036e-02\n14 10 13 -6.48870970147846996e-02\n14 10 14 -1.03285150798513879e-02\n14 10 15 6.74316021342540694e-02\n14 10 16 2.77496500523533543e-02\n14 10 17 -2.01512736782847471e-02\n14 10 18 -2.32093147467877933e-02\n14 10 19 -1.05416692030815259e-02\n14 10 20 -2.86443036389707325e-03\n14 10 21 -5.09898896088483689e-04\n14 10 22 -6.03939438027692361e-05\n14 10 23 -4.61335301068755643e-06\n14 10 24 -2.06572044056376259e-07\n14 10 25 -4.13226741727286130e-09\n14 11 2 1.92401995242124404e-04\n14 11 3 -1.13826555427996070e-03\n14 11 4 3.80262450518796354e-03\n14 11 5 -9.29780838638140804e-03\n14 11 6 1.80191385588245468e-02\n14 11 7 -2.79805552543189292e-02\n14 11 8 3.29668805118769613e-02\n14 11 9 -2.29430069711331248e-02\n14 11 10 -9.08129933163862332e-03\n14 11 11 5.23849884445014751e-02\n14 11 12 -6.88885399491161869e-02\n14 11 13 2.06607563574291034e-02\n14 11 14 5.59545183253940585e-02\n14 11 15 -4.06624167481065791e-02\n14 11 16 -5.58187417880935890e-02\n14 11 17 -1.77199423847787114e-03\n14 11 18 2.43770299826104216e-02\n14 11 19 1.75730370050068388e-02\n14 11 20 6.65125402033677820e-03\n14 11 21 1.61254934654718495e-03\n14 11 22 2.64166447648642659e-04\n14 11 23 2.93124581098324523e-05\n14 11 24 2.12228800474738852e-06\n14 11 25 9.08159194513491016e-08\n14 11 26 1.74678301913632068e-09\n14 12 1 1.19123614981977204e-03\n14 12 2 -4.61363776965222049e-03\n14 12 3 1.07647339928840204e-02\n14 12 4 -1.94174180951849463e-02\n14 12 5 2.89064031291373733e-02\n14 12 6 -3.53286946971012182e-02\n14 12 7 3.24931425668929042e-02\n14 12 8 -1.41255872596118352e-02\n14 12 9 -2.02895491337136598e-02\n14 12 10 5.75176487280508036e-02\n14 12 11 -6.88885399491161869e-02\n14 12 12 2.94409259820778561e-02\n14 12 13 4.07335711249473759e-02\n14 12 14 -6.14942243581110615e-02\n14 12 15 -1.30238373950545974e-02\n14 12 16 5.95122934724205604e-02\n14 12 17 3.36409516572748205e-02\n14 12 18 -1.30497158673177353e-02\n14 12 19 -2.29013484421897036e-02\n14 12 20 -1.27423913698837926e-02\n14 12 21 -4.21083519419783522e-03\n14 12 22 -9.29646982481462508e-04\n14 12 23 -1.41711959117799919e-04\n14 12 24 -1.48285060650047848e-05\n14 12 25 -1.02172021226446673e-06\n14 12 26 -4.18863853378066607e-08\n14 12 27 -7.75806839822922091e-10\n14 13 0 1.78685422472965805e-02\n14 13 1 -3.09492230295086439e-02\n14 13 2 3.94912783804090595e-02\n14 13 3 -4.45306773247051695e-02\n14 13 4 4.43635601244750650e-02\n14 13 5 -3.61276873369919357e-02\n14 13 6 1.71747757762610070e-02\n14 13 7 1.24315860912424208e-02\n14 13 8 -4.64776679940909483e-02\n14 13 9 7.03731345713656673e-02\n14 13 10 -6.48870970147846996e-02\n14 13 11 2.06607563574291034e-02\n14 13 12 4.07335711249473759e-02\n14 13 13 -6.41515149072755355e-02\n14 13 14 1.15197751152721472e-02\n14 13 15 5.75701246807695033e-02\n14 13 16 -2.41813517902095462e-02\n14 13 17 -5.68367739126642721e-02\n14 13 18 -1.35389658127786047e-02\n14 13 19 1.96861292926959458e-02\n14 13 20 1.94804473477909548e-02\n14 13 21 9.08262656198492835e-03\n14 13 22 2.69318151899450630e-03\n14 13 23 5.48919304710278873e-04\n14 13 24 7.84889325656199035e-05\n14 13 25 7.78412425767843208e-06\n14 13 26 5.12095798669513722e-07\n14 13 27 2.01560529514912626e-08\n14 13 28 3.59986917440525362e-10\n14 14 1 -2.06935580354704575e-03\n14 14 2 8.01458056451537526e-03\n14 14 3 -1.87935414080182714e-02\n14 14 4 3.44737699576409254e-02\n14 14 5 -5.34422632574019549e-02\n14 14 6 7.13989767640438641e-02\n14 14 7 -8.08626139654088857e-02\n14 14 8 7.25709934736540332e-02\n14 14 9 -4.03859581697868496e-02\n14 14 10 -1.03285150798513879e-02\n14 14 11 5.59545183253940585e-02\n14 14 12 -6.14942243581110615e-02\n14 14 13 1.15197751152721472e-02\n14 14 14 5.16479028544181582e-02\n14 14 15 -4.59335242727422354e-02\n14 14 16 -3.30667594885145251e-02\n14 14 17 4.56147260798033186e-02\n14 14 18 4.46415947717189965e-02\n14 14 19 -1.06046310835615401e-03\n14 14 20 -2.14468429647757023e-02\n14 14 21 -1.58043764430217728e-02\n14 14 22 -6.44492819283545578e-03\n14 14 23 -1.74553182924689984e-03\n14 14 24 -3.31681707923096212e-04\n14 14 25 -4.47593567172474370e-05\n14 14 26 -4.22421892483287377e-06\n14 14 27 -2.66062931897255196e-07\n14 14 28 -1.00732032993623067e-08\n14 14 29 -1.73701738611091930e-10\n15 0 14 1.66759336491267518e-02\n15 0 16 -1.56326349870180604e-02\n15 1 13 1.03221437946422357e-03\n15 1 14 -2.88835643439350053e-02\n15 1 15 -1.80987545200509644e-03\n15 1 16 2.70765180536941171e-02\n15 1 17 7.96712851590331635e-04\n15 2 12 1.53873434655651123e-04\n15 2 13 -3.99774910138076097e-03\n15 2 14 3.69118694981505784e-02\n15 2 15 7.00961748432535955e-03\n15 2 16 -3.46456830595117330e-02\n15 2 17 -3.08565560591877573e-03\n15 2 18 -8.57457430231555269e-05\n15 3 11 3.79632817165182197e-05\n15 3 12 -9.10327515922397439e-04\n15 3 13 9.34572952669840121e-03\n15 3 14 -4.18920716328071034e-02\n15 3 15 -1.64561334469360513e-02\n15 3 16 3.95263670708653259e-02\n15 3 17 7.23394176585068450e-03\n15 3 18 5.07278656786145365e-04\n15 3 19 1.33540631203808393e-05\n15 4 10 1.37107261661352912e-05\n15 4 11 -3.01324207121377443e-04\n15 4 12 3.04904431984030203e-03\n15 4 13 -1.69683004592251408e-02\n15 4 14 4.25152086165615369e-02\n15 4 15 3.03030303030303030e-02\n15 4 16 -4.07088162148069830e-02\n15 4 17 -1.32593243175718606e-02\n15 4 18 -1.70779961694379763e-03\n15 4 19 -1.05994590026360709e-04\n15 4 20 -2.65069322175965977e-06\n15 5 9 6.82954241473515809e-06\n15 5 10 -1.36420002889136266e-04\n15 5 11 1.30654787555164309e-03\n15 5 12 -7.51448926827492906e-03\n15 5 13 2.56653335628944188e-02\n15 5 14 -3.64249447907536893e-02\n15 5 15 -4.74013175249001483e-02\n15 5 16 3.62401570851732969e-02\n15 5 17 2.05143538376430503e-02\n15 5 18 4.27424264588137467e-03\n15 5 19 4.63403764428730066e-04\n15 5 20 2.63740645527453330e-05\n15 5 21 6.28131985108257035e-07\n15 6 8 4.54420969707751902e-06\n15 6 9 -8.16694489514733678e-05\n15 6 10 7.23308099368702754e-04\n15 6 11 -4.03534812316872869e-03\n15 6 12 1.48260049821842435e-02\n15 6 13 -3.25009606382298710e-02\n15 6 14 2.12236717495320615e-02\n15 6 15 6.44964889683100573e-02\n15 6 16 -2.39852873878550400e-02\n15 6 17 -2.72670555708055452e-02\n15 6 18 -8.72360377183066521e-03\n15 6 19 -1.46503446558066419e-03\n15 6 20 -1.41587733418785763e-04\n15 6 21 -7.51136605900642205e-06\n15 6 22 -1.70756971131100615e-07\n15 7 7 3.97379610346975286e-06\n15 7 8 -6.34564350192130212e-05\n15 7 9 5.10099237217209480e-04\n15 7 10 -2.66624995036752867e-03\n15 7 11 9.70004307367935421e-03\n15 7 12 -2.38937931798467511e-02\n15 7 13 3.25934015616096901e-02\n15 7 14 3.72232197374830235e-03\n15 7 15 -7.57092621631589905e-02\n15 7 16 2.95671443803537946e-03\n15 7 17 3.04257823772802475e-02\n15 7 18 1.50335353088451296e-02\n15 7 19 3.69855495592914804e-03\n15 7 20 5.39912398183883684e-04\n15 7 21 4.77680016216692547e-05\n15 7 22 2.38449133402161227e-06\n15 7 23 5.18490212378316711e-08\n15 8 6 4.54420969707751902e-06\n15 8 7 -6.34564350192130212e-05\n15 8 8 4.54457772560449918e-04\n15 8 9 -2.16850597139671795e-03\n15 8 10 7.46741247499840100e-03\n15 8 11 -1.85891665541255309e-02\n15 8 12 3.05276104377743973e-02\n15 8 13 -2.03560399736343472e-02\n15 8 14 -3.46517971152242210e-02\n15 8 15 7.32482859461687294e-02\n15 8 16 2.46670673438648251e-02\n15 8 17 -2.58992640509498037e-02\n15 8 18 -2.19223850603975882e-02\n15 8 19 -7.77944392845314238e-03\n15 8 20 -1.62073615094543152e-03\n15 8 21 -2.13060969890012419e-04\n15 8 22 -1.75179667683554295e-05\n15 8 23 -8.27962472487059958e-07\n15 8 24 -1.72529627157001080e-08\n15 9 5 6.82954241473515809e-06\n15 9 6 -8.16694489514733678e-05\n15 9 7 5.10099237217209480e-04\n15 9 8 -2.16850597139671795e-03\n15 9 9 6.83833540891380614e-03\n15 9 10 -1.62512246767944099e-02\n15 9 11 2.76906788758406076e-02\n15 9 12 -2.70404319173854986e-02\n15 9 13 -6.69077170564554257e-03\n15 9 14 6.11689869295028232e-02\n15 9 15 -5.05768864961954967e-02\n15 9 16 -5.15270821268110288e-02\n15 9 17 1.02500889252641658e-02\n15 9 18 2.61737262218167959e-02\n15 9 19 1.38059958303132552e-02\n15 9 20 4.01289068918621596e-03\n15 9 21 7.40329016026704176e-04\n15 9 22 8.94092733798696445e-05\n15 9 23 6.89778062049637662e-06\n15 9 24 3.10073709555641283e-07\n15 9 25 6.20271485816357261e-09\n15 10 4 1.37107261661352912e-05\n15 10 5 -1.36420002889136266e-04\n15 10 6 7.23308099368702754e-04\n15 10 7 -2.66624995036752867e-03\n15 10 8 7.46741247499840100e-03\n15 10 9 -1.62512246767944099e-02\n15 10 10 2.66291009068528934e-02\n15 10 11 -2.84151449684205039e-02\n15 10 12 5.71869066811169869e-03\n15 10 13 4.18305655859410087e-02\n15 10 14 -6.74316021342540694e-02\n15 10 15 8.48009166530649655e-03\n15 10 16 6.50268843843081493e-02\n15 10 17 1.60281940065716663e-02\n15 10 18 -2.27951962812321763e-02\n15 10 19 -2.04049877907392817e-02\n15 10 20 -8.34567026514940928e-03\n15 10 21 -2.10525519433953840e-03\n15 10 22 -3.52653258291252488e-04\n15 10 23 -3.96253171596954323e-05\n15 10 24 -2.88780067083098424e-06\n15 10 25 -1.23899132253061306e-07\n15 10 26 -2.38311632600178061e-09\n15 11 3 3.79632817165182197e-05\n15 11 4 -3.01324207121377443e-04\n15 11 5 1.30654787555164309e-03\n15 11 6 -4.03534812316872869e-03\n15 11 7 9.70004307367935421e-03\n15 11 8 -1.85891665541255309e-02\n15 11 9 2.76906788758406076e-02\n15 11 10 -2.84151449684205039e-02\n15 11 11 9.07853627321011036e-03\n15 11 12 3.16766587980545074e-02\n15 11 13 -6.51599176491593956e-02\n15 11 14 4.06624167481065791e-02\n15 11 15 3.84611214533233941e-02\n15 11 16 -5.21540501552041262e-02\n15 11 17 -4.46947433035315495e-02\n15 11 18 7.20340704814354450e-03\n15 11 19 2.37912356696751435e-02\n15 11 20 1.45278630422162616e-02\n15 11 21 5.00661064369084358e-03\n15 11 22 1.13124675260284275e-03\n15 11 23 1.74792468945017118e-04\n15 11 24 1.84334556247707231e-05\n15 11 25 1.27539000414082027e-06\n15 11 26 5.23743694323163828e-08\n15 11 27 9.70062078866681654e-10\n15 12 2 1.53873434655651123e-04\n15 12 3 -9.10327515922397439e-04\n15 12 4 3.04904431984030203e-03\n15 12 5 -7.51448926827492906e-03\n15 12 6 1.48260049821842435e-02\n15 12 7 -2.38937931798467511e-02\n15 12 8 3.05276104377743973e-02\n15 12 9 -2.70404319173854986e-02\n15 12 10 5.71869066811169869e-03\n15 12 11 3.16766587980545074e-02\n15 12 12 -6.29788139718148209e-02\n15 12 13 5.12501187547571796e-02\n15 12 14 1.30238373950545974e-02\n15 12 15 -6.23678815249507498e-02\n15 12 16 1.05797991598183110e-02\n15 12 17 5.90867189085696105e-02\n15 12 18 1.99287088966894617e-02\n15 12 19 -1.80989401593483533e-02\n15 12 20 -2.05134302026918670e-02\n15 12 21 -9.97713326887327660e-03\n15 12 22 -3.02284973719830999e-03\n15 12 23 -6.23866570457840004e-04\n15 12 24 -8.98783635488097483e-05\n15 12 25 -8.95317213801584050e-06\n15 12 26 -5.90408481846494064e-07\n15 12 27 -2.32612714869955068e-08\n15 12 28 -4.15446091479490726e-10\n15 13 1 1.03221437946422357e-03\n15 13 2 -3.99774910138076097e-03\n15 13 3 9.34572952669840121e-03\n15 13 4 -1.69683004592251408e-02\n15 13 5 2.56653335628944188e-02\n15 13 6 -3.25009606382298710e-02\n15 13 7 3.25934015616096901e-02\n15 13 8 -2.03560399736343472e-02\n15 13 9 -6.69077170564554257e-03\n15 13 10 4.18305655859410087e-02\n15 13 11 -6.51599176491593956e-02\n15 13 12 5.12501187547571796e-02\n15 13 13 4.47215296027010552e-03\n15 13 14 -5.75701246807695033e-02\n15 13 15 3.89802525776516057e-02\n15 13 16 3.93237342386447800e-02\n15 13 17 -4.21256218508230045e-02\n15 13 18 -4.72325421545538744e-02\n15 13 19 -1.18093925731957337e-03\n15 13 20 2.13263237658665284e-02\n15 13 21 1.63321493082185088e-02\n15 13 22 6.76597091516778302e-03\n15 13 23 1.84843082426679417e-03\n15 13 24 3.53070001325339550e-04\n15 13 25 4.77983207347806228e-05\n15 13 26 4.51965384166731459e-06\n15 13 27 2.84967395061207546e-07\n15 13 28 1.07936060737257838e-08\n15 13 29 1.86124322638072894e-10\n15 14 0 1.66759336491267518e-02\n15 14 1 -2.88835643439350053e-02\n15 14 2 3.69118694981505784e-02\n15 14 3 -4.18920716328071034e-02\n15 14 4 4.25152086165615369e-02\n15 14 5 -3.64249447907536893e-02\n15 14 6 2.12236717495320615e-02\n15 14 7 3.72232197374830235e-03\n15 14 8 -3.46517971152242210e-02\n15 14 9 6.11689869295028232e-02\n15 14 10 -6.74316021342540694e-02\n15 14 11 4.06624167481065791e-02\n15 14 12 1.30238373950545974e-02\n15 14 13 -5.75701246807695033e-02\n15 14 14 4.59335242727422354e-02\n15 14 15 2.09585492913091281e-02\n15 14 16 -5.73923869481503887e-02\n15 14 17 -5.46641277090075810e-03\n15 14 18 5.33500745177226843e-02\n15 14 19 3.02231845608720538e-02\n15 14 20 -1.03830131654259592e-02\n15 14 21 -2.06542266618490905e-02\n15 14 22 -1.25202680172360904e-02\n15 14 23 -4.58281665398914843e-03\n15 14 24 -1.14784398196347339e-03\n15 14 25 -2.04842899017016832e-04\n15 14 26 -2.62140927327923151e-05\n15 14 27 -2.36208976449414349e-06\n15 14 28 -1.42773147181224052e-07\n15 14 29 -5.20815632473411634e-09\n15 14 30 -8.68146638418846423e-11\n15 15 1 -1.80987545200509644e-03\n15 15 2 7.00961748432535955e-03\n15 15 3 -1.64561334469360513e-02\n15 15 4 3.03030303030303030e-02\n15 15 5 -4.74013175249001483e-02\n15 15 6 6.44964889683100573e-02\n15 15 7 -7.57092621631589905e-02\n15 15 8 7.32482859461687294e-02\n15 15 9 -5.05768864961954967e-02\n15 15 10 8.48009166530649655e-03\n15 15 11 3.84611214533233941e-02\n15 15 12 -6.23678815249507498e-02\n15 15 13 3.89802525776516057e-02\n15 15 14 2.09585492913091281e-02\n15 15 15 -5.79672700540816658e-02\n15 15 16 1.76660117555851520e-02\n15 15 17 4.99466379289556253e-02\n15 15 18 -2.22004790808165688e-02\n15 15 19 -5.11604195748266801e-02\n15 15 20 -1.45593635060050755e-02\n15 15 21 1.63805831976078704e-02\n15 15 22 1.83402504142324391e-02\n15 15 23 9.42624876762498806e-03\n15 15 24 3.11874855831511590e-03\n15 15 25 7.24560169091337374e-04\n15 15 26 1.21665886037969634e-04\n15 15 27 1.47866802746528470e-05\n15 15 28 1.27377647596794999e-06\n15 15 29 7.39741600924417402e-08\n15 15 30 2.60299260204932392e-09\n15 15 31 4.19892136575126294e-11\n16 0 15 1.56326349870180604e-02\n16 0 17 -1.47122471584124922e-02\n16 1 14 9.03052437025571428e-04\n16 1 15 -2.70765180536941171e-02\n16 1 16 -1.59636019130772101e-03\n16 1 17 2.54823595718812772e-02\n16 1 18 7.08116567280870986e-04\n16 2 13 1.24990704943129790e-04\n16 2 14 -3.49750704935206024e-03\n16 2 15 3.46456830595117330e-02\n16 2 16 6.18267643548328948e-03\n16 2 17 -3.26394519993119925e-02\n16 2 18 -2.74252367225237717e-03\n16 2 19 -7.21966787651318284e-05\n16 3 12 2.84616355501074213e-05\n16 3 13 -7.39454982589419394e-04\n16 3 14 8.18902909944351627e-03\n16 3 15 -3.95263670708653259e-02\n16 3 16 -1.45286166367915682e-02\n16 3 17 3.73978132722754278e-02\n16 3 18 6.43631484984258156e-03\n16 3 19 4.27121311649333763e-04\n16 3 20 1.06813712414606792e-05\n16 4 11 9.42098268536224320e-06\n16 4 12 -2.25907228715217810e-04\n16 4 13 2.48185088973909990e-03\n16 4 14 -1.49461569381264220e-02\n16 4 15 4.07088162148069830e-02\n16 4 16 2.68380568714272830e-02\n16 4 17 -3.89776444007197558e-02\n16 4 18 -1.18388614464110287e-02\n16 4 19 -1.43959350728918141e-03\n16 4 20 -8.47807558981866166e-05\n16 4 21 -2.01916183206441948e-06\n16 5 10 4.26520822018763294e-06\n16 5 11 -9.37375941713442053e-05\n16 5 12 9.82245948130426814e-04\n16 5 13 -6.15498702261772340e-03\n16 5 14 2.28920899863360203e-02\n16 5 15 -3.62401570851732969e-02\n16 5 16 -4.22879933915197617e-02\n16 5 17 3.57499098919238737e-02\n16 5 18 1.84682860401463132e-02\n16 5 19 3.61527654630388343e-03\n16 5 20 3.71117649353193883e-04\n16 5 21 2.00904065638928410e-05\n16 5 22 4.56718118474512105e-07\n16 6 9 2.55341737009857604e-06\n16 6 10 -5.10044720206231548e-05\n16 6 11 4.98841936416818439e-04\n16 6 12 -3.05773879753781530e-03\n16 6 13 1.23137235059757310e-02\n16 6 14 -2.97863642394934914e-02\n16 6 15 2.39852873878550400e-02\n16 6 16 5.83839063521350449e-02\n16 6 17 -2.58285499924319971e-02\n16 6 18 -2.49702227303673939e-02\n16 6 19 -7.43301151984202005e-03\n16 6 20 -1.17732041665495086e-03\n16 6 21 -1.07997335694283371e-04\n16 6 22 -5.46155434681689146e-06\n16 6 23 -1.18757507431190465e-07\n16 7 8 1.98398257246557508e-06\n16 7 9 -3.56565330879857141e-05\n16 7 10 3.20157264508747523e-04\n16 7 11 -1.85772527767868054e-03\n16 7 12 7.47494353091855819e-03\n16 7 13 -2.04086148652993311e-02\n16 7 14 3.17578975312912493e-02\n16 7 15 -2.95671443803537946e-03\n16 7 16 -7.04663225171540484e-02\n16 7 17 8.06791896886233432e-03\n16 7 18 2.88565296844740072e-02\n16 7 19 1.29898317719669316e-02\n16 7 20 2.99317492231356658e-03\n16 7 21 4.13275498878827137e-04\n16 7 22 3.47811438762245963e-05\n16 7 23 1.65835834076881750e-06\n16 7 24 3.45566321823865839e-08\n16 8 7 1.98398257246557508e-06\n16 8 8 -3.16816610391724225e-05\n16 8 9 2.57102337819941317e-04\n16 8 10 -1.37964743586453098e-03\n16 8 11 5.31569681866178441e-03\n16 8 12 -1.48033969529521958e-02\n16 8 13 2.76103632061903221e-02\n16 8 14 -2.39900211896899268e-02\n16 8 15 -2.46670673438648251e-02\n16 8 16 7.20316242843537118e-02\n16 8 17 1.63790311948958886e-02\n16 8 18 -2.66740540379039871e-02\n16 8 19 -1.94352359170117337e-02\n16 8 20 -6.37653814655598927e-03\n16 8 21 -1.24922403183883201e-03\n16 8 22 -1.55696642161473693e-04\n16 8 23 -1.22012971808092995e-05\n16 8 24 -5.51825163512985171e-07\n16 8 25 -1.10387112333247589e-08\n16 9 6 2.55341737009857604e-06\n16 9 7 -3.56565330879857141e-05\n16 9 8 2.57102337819941317e-04\n16 9 9 -1.24976609546906832e-03\n16 9 10 4.47598360470632244e-03\n16 9 11 -1.20576117759153018e-02\n16 9 12 2.35281738975001265e-02\n16 9 13 -2.81370517273516205e-02\n16 9 14 3.22331505512012762e-03\n16 9 15 5.15270821268110288e-02\n16 9 16 -5.67850563764090742e-02\n16 9 17 -4.23334003623875161e-02\n16 9 18 1.51017976601305884e-02\n16 9 19 2.43736021124062028e-02\n16 9 20 1.15690799461006121e-02\n16 9 21 3.13086933867849756e-03\n16 9 22 5.44765478239137248e-04\n16 9 23 6.25048207609168984e-05\n16 9 24 4.60433539757093520e-06\n16 9 25 1.98389934368535596e-07\n16 9 26 3.81589671300056507e-09\n16 10 5 4.26520822018763294e-06\n16 10 6 -5.10044720206231548e-05\n16 10 7 3.20157264508747523e-04\n16 10 8 -1.37964743586453098e-03\n16 10 9 4.47598360470632244e-03\n16 10 10 -1.12427083633603759e-02\n16 10 11 2.14391837815608122e-02\n16 10 12 -2.80417119002370714e-02\n16 10 13 1.48988165111497922e-02\n16 10 14 2.77496500523533543e-02\n16 10 15 -6.50268843843081493e-02\n16 10 16 2.29971946054265242e-02\n16 10 17 5.99625371603017178e-02\n16 10 18 6.66825802158828503e-03\n16 10 19 -2.37630691172323752e-02\n16 10 20 -1.77730417112419695e-02\n16 10 21 -6.64481530103163900e-03\n16 10 22 -1.56760834422597466e-03\n16 10 23 -2.48258713819995434e-04\n16 10 24 -2.65507937652770719e-05\n16 10 25 -1.85060130079210328e-06\n16 10 26 -7.62224771441542579e-08\n16 10 27 -1.41176944822944495e-09\n16 11 4 9.42098268536224320e-06\n16 11 5 -9.37375941713442053e-05\n16 11 6 4.98841936416818439e-04\n16 11 7 -1.85772527767868054e-03\n16 11 8 5.31569681866178441e-03\n16 11 9 -1.20576117759153018e-02\n16 11 10 2.14391837815608122e-02\n16 11 11 -2.77242023524499289e-02\n16 11 12 1.88402688257952321e-02\n16 11 13 1.45578063844227668e-02\n16 11 14 -5.58187417880935890e-02\n16 11 15 5.21540501552041262e-02\n16 11 16 2.09804136584082614e-02\n16 11 17 -5.73760518463875677e-02\n16 11 18 -3.37525467888373960e-02\n16 11 19 1.31907540253314902e-02\n16 11 20 2.23110106519602211e-02\n16 11 21 1.19642121568614615e-02\n16 11 22 3.80056573597242997e-03\n16 11 23 8.05738934943733447e-04\n16 11 24 1.17944596448854804e-04\n16 11 25 1.18586650152426406e-05\n16 11 26 7.85905852650211568e-07\n16 11 27 3.10268256014503763e-08\n16 11 28 5.54138815427379038e-10\n16 12 3 2.84616355501074213e-05\n16 12 4 -2.25907228715217810e-04\n16 12 5 9.82245948130426814e-04\n16 12 6 -3.05773879753781530e-03\n16 12 7 7.47494353091855819e-03\n16 12 8 -1.48033969529521958e-02\n16 12 9 2.35281738975001265e-02\n16 12 10 -2.80417119002370714e-02\n16 12 11 1.88402688257952321e-02\n16 12 12 1.05644331833611289e-02\n16 12 13 -4.89664410366655450e-02\n16 12 14 5.95122934724205604e-02\n16 12 15 -1.05797991598183110e-02\n16 12 16 -5.44917528369099383e-02\n16 12 17 2.81304097147042847e-02\n16 12 18 5.38345533125257537e-02\n16 12 19 8.75779266614250752e-03\n16 12 20 -2.04693374175973585e-02\n16 12 21 -1.79200064509414757e-02\n16 12 22 -7.81223236482341359e-03\n16 12 23 -2.19358874115646174e-03\n16 12 24 -4.25887920527716933e-04\n16 12 25 -5.82322513586150363e-05\n16 12 26 -5.53887379171243574e-06\n16 12 27 -3.50351056638762108e-07\n16 12 28 -1.32877819965889657e-08\n16 12 29 -2.29133748868027594e-10\n16 13 2 1.24990704943129790e-04\n16 13 3 -7.39454982589419394e-04\n16 13 4 2.48185088973909990e-03\n16 13 5 -6.15498702261772340e-03\n16 13 6 1.23137235059757310e-02\n16 13 7 -2.04086148652993311e-02\n16 13 8 2.76103632061903221e-02\n16 13 9 -2.81370517273516205e-02\n16 13 10 1.48988165111497922e-02\n16 13 11 1.45578063844227668e-02\n16 13 12 -4.89664410366655450e-02\n16 13 13 6.04643295927200605e-02\n16 13 14 -2.41813517902095462e-02\n16 13 15 -3.93237342386447800e-02\n16 13 16 5.28305051135296767e-02\n16 13 17 1.83587087370836435e-02\n16 13 18 -5.08893590307608123e-02\n16 13 19 -3.58272249377015523e-02\n16 13 20 7.39496627447402391e-03\n16 13 21 2.10145110270019949e-02\n16 13 22 1.34625726365172541e-02\n16 13 23 5.05581286946948012e-03\n16 13 24 1.28509781111011059e-03\n16 13 25 2.31422767796559931e-04\n16 13 26 2.97828793985681210e-05\n16 13 27 2.69279992828369790e-06\n16 13 28 1.63066294869392649e-07\n16 13 29 5.95306942152227276e-09\n16 13 30 9.92316068168792609e-11\n16 14 1 9.03052437025571428e-04\n16 14 2 -3.49750704935206024e-03\n16 14 3 8.18902909944351627e-03\n16 14 4 -1.49461569381264220e-02\n16 14 5 2.28920899863360203e-02\n16 14 6 -2.97863642394934914e-02\n16 14 7 3.17578975312912493e-02\n16 14 8 -2.39900211896899268e-02\n16 14 9 3.22331505512012762e-03\n16 14 10 2.77496500523533543e-02\n16 14 11 -5.58187417880935890e-02\n16 14 12 5.95122934724205604e-02\n16 14 13 -2.41813517902095462e-02\n16 14 14 -3.30667594885145251e-02\n16 14 15 5.73923869481503887e-02\n16 14 16 -9.17046426640774222e-03\n16 14 17 -5.27717898479994485e-02\n16 14 18 1.73148873381762902e-02\n16 14 19 5.20937057331903893e-02\n16 14 20 1.70294494144335905e-02\n16 14 21 -1.56648288511350857e-02\n16 14 22 -1.87056089414484295e-02\n16 14 23 -9.80456000083818342e-03\n16 14 24 -3.27713785861026593e-03\n16 14 25 -7.66027932201249800e-04\n16 14 26 -1.29125730467359518e-04\n16 14 27 -1.57316149974874103e-05\n16 14 28 -1.35719448950252672e-06\n16 14 29 -7.88836338097198429e-08\n16 14 30 -2.77671243248431465e-09\n16 14 31 -4.47915109329404874e-11\n16 15 0 1.56326349870180604e-02\n16 15 1 -2.70765180536941171e-02\n16 15 2 3.46456830595117330e-02\n16 15 3 -3.95263670708653259e-02\n16 15 4 4.07088162148069830e-02\n16 15 5 -3.62401570851732969e-02\n16 15 6 2.39852873878550400e-02\n16 15 7 -2.95671443803537946e-03\n16 15 8 -2.46670673438648251e-02\n16 15 9 5.15270821268110288e-02\n16 15 10 -6.50268843843081493e-02\n16 15 11 5.21540501552041262e-02\n16 15 12 -1.05797991598183110e-02\n16 15 13 -3.93237342386447800e-02\n16 15 14 5.73923869481503887e-02\n16 15 15 -1.76660117555851520e-02\n16 15 16 -4.37505781813174576e-02\n16 15 17 4.21888749346130691e-02\n16 15 18 3.05582146565456291e-02\n16 15 19 -3.92872758804277551e-02\n16 15 20 -4.23230623719446289e-02\n16 15 21 -2.39320977969610689e-03\n16 15 22 1.87105243414852169e-02\n16 15 23 1.55652837978582387e-02\n16 15 24 7.04332480160765347e-03\n16 15 25 2.13908857351996056e-03\n16 15 26 4.64951725123955693e-04\n16 15 27 7.38675489640109908e-05\n16 15 28 8.55825382934427760e-06\n16 15 29 7.06702384006631613e-07\n16 15 30 3.95100390642851013e-08\n16 15 31 1.34299859532260821e-09\n16 15 32 2.09869150875826982e-11\n16 16 1 -1.59636019130772101e-03\n16 16 2 6.18267643548328948e-03\n16 16 3 -1.45286166367915682e-02\n16 16 4 2.68380568714272830e-02\n16 16 5 -4.22879933915197617e-02\n16 16 6 5.83839063521350449e-02\n16 16 7 -7.04663225171540484e-02\n16 16 8 7.20316242843537118e-02\n16 16 9 -5.67850563764090742e-02\n16 16 10 2.29971946054265242e-02\n16 16 11 2.09804136584082614e-02\n16 16 12 -5.44917528369099383e-02\n16 16 13 5.28305051135296767e-02\n16 16 14 -9.17046426640774222e-03\n16 16 15 -4.37505781813174576e-02\n16 16 16 4.75884849741775097e-02\n16 16 17 1.20410883134734752e-02\n16 16 18 -5.21062384977157307e-02\n16 16 19 -4.01170823069688139e-03\n16 16 20 4.77672371882550992e-02\n16 16 21 2.91337792280311072e-02\n16 16 22 -7.38858432044725932e-03\n16 16 23 -1.87773613788725525e-02\n16 16 24 -1.25012666825840147e-02\n16 16 25 -5.03754187022517390e-03\n16 16 26 -1.40994654695877641e-03\n16 16 27 -2.87332311418760498e-04\n16 16 28 -4.32541401647527602e-05\n16 16 29 -4.78327426960326614e-06\n16 16 30 -3.79045303669849169e-07\n16 16 31 -2.04222615472092964e-08\n16 16 32 -6.71253282156560211e-10\n16 16 33 -1.01716718893934801e-11\n17 0 16 1.47122471584124922e-02\n17 0 18 -1.38942503594182097e-02\n17 1 15 7.96712851590331635e-04\n17 1 16 -2.54823595718812772e-02\n17 1 17 -1.41855102994994045e-03\n17 1 18 2.40655475555944737e-02\n17 1 19 6.33523285052020842e-04\n17 2 14 1.02912376296715016e-04\n17 2 15 -3.08565560591877573e-03\n17 2 16 3.26394519993119925e-02\n17 2 17 5.49402451474149803e-03\n17 2 18 -3.08512261441155268e-02\n17 2 19 -2.45362513244109089e-03\n17 2 20 -6.13598062475005479e-05\n17 3 13 2.17580889327502887e-05\n17 3 14 -6.08837828839735842e-04\n17 3 15 7.23394176585068450e-03\n17 3 16 -3.73978132722754278e-02\n17 3 17 -1.29205821215742927e-02\n17 3 18 3.54753908562746396e-02\n17 3 19 5.76342227982835955e-03\n17 3 20 3.63009509235747507e-04\n17 3 21 8.64553444894368307e-06\n17 4 12 6.64720596746060836e-06\n17 4 13 -1.72699476960252105e-04\n17 4 14 2.04688493318231172e-03\n17 4 15 -1.32593243175718606e-02\n17 4 16 3.89776444007197558e-02\n17 4 17 2.39298626395400589e-02\n17 4 18 -3.73371905555610388e-02\n17 4 19 -1.06323215996069580e-02\n17 4 20 -1.22468971320604513e-03\n17 4 21 -6.86218023094404967e-05\n17 4 22 -1.55998935797667614e-06\n17 5 11 2.75818130696756434e-06\n17 5 12 -6.61388642948346091e-05\n17 5 13 7.52559845227437142e-04\n17 5 14 -5.10187574928988435e-03\n17 5 15 2.05143538376430503e-02\n17 5 16 -3.57499098919238737e-02\n17 5 17 -3.79317305516436169e-02\n17 5 18 3.50694193571560959e-02\n17 5 19 1.66998112709792067e-02\n17 5 20 3.08437874471331122e-03\n17 5 21 3.00698327346921189e-04\n17 5 22 1.55216981320681449e-05\n17 5 23 3.37507981100307538e-07\n17 6 10 1.50078079710348494e-06\n17 6 11 -3.29830512454663312e-05\n17 6 12 3.52996941309709105e-04\n17 6 13 -2.35742078014038360e-03\n17 6 14 1.03201869546388218e-02\n17 6 15 -2.72670555708055452e-02\n17 6 16 2.58285499924319971e-02\n17 6 17 5.29929283520387780e-02\n17 6 18 -2.70118210554861849e-02\n17 6 19 -2.28959333190208965e-02\n17 6 20 -6.38033293050123680e-03\n17 6 21 -9.56688450453571514e-04\n17 6 22 -8.35316146875619573e-05\n17 6 23 -4.03600844087521622e-06\n17 6 24 -8.41017624162420109e-08\n17 7 9 1.04917545520511765e-06\n17 7 10 -2.09572633038319550e-05\n17 7 11 2.07834712460393045e-04\n17 7 12 -1.32510150165502507e-03\n17 7 13 5.83926916635132543e-03\n17 7 14 -1.74804378727756182e-02\n17 7 15 3.04257823772802475e-02\n17 7 16 -8.06791896886233432e-03\n17 7 17 -6.53892393663525341e-02\n17 7 18 1.19718899430600224e-02\n17 7 19 2.72028121600392581e-02\n17 7 20 1.12792133373904167e-02\n17 7 21 2.44656958999659206e-03\n17 7 22 3.20601726222105125e-04\n17 7 23 2.57333747687737823e-05\n17 7 24 1.17441719848442843e-06\n17 7 25 2.34930430482530758e-08\n17 8 8 9.32216855194704474e-07\n17 8 9 -1.67539884693239773e-05\n17 8 10 1.51890555439599781e-04\n17 8 11 -9.04930235115306446e-04\n17 8 12 3.85428843624612877e-03\n17 8 13 -1.18570155095562008e-02\n17 8 14 2.46736219085181437e-02\n17 8 15 -2.58992640509498037e-02\n17 8 16 -1.63790311948958886e-02\n17 8 17 6.97031046456647893e-02\n17 8 18 9.56244802809361696e-03\n17 8 19 -2.67109125588489874e-02\n17 8 20 -1.72289688713578761e-02\n17 8 21 -5.26728926785542595e-03\n17 8 22 -9.74738460315268980e-04\n17 8 23 -1.15546498973631674e-04\n17 8 24 -8.65154963055908482e-06\n17 8 25 -3.75153812822292137e-07\n17 8 26 -7.21583081205583395e-09\n17 9 7 1.04917545520511765e-06\n17 9 8 -1.67539884693239773e-05\n17 9 9 1.36909902462919571e-04\n17 9 10 -7.48531335973118743e-04\n17 9 11 2.99846029863051254e-03\n17 9 12 -9.01520842463078940e-03\n17 9 13 1.97529025682962073e-02\n17 9 14 -2.75823163260090445e-02\n17 9 15 1.02500889252641658e-02\n17 9 16 4.23334003623875161e-02\n17 9 17 -6.01558710643367853e-02\n17 9 18 -3.39746162325966766e-02\n17 9 19 1.83481206283311455e-02\n17 9 20 2.24448725642405219e-02\n17 9 21 9.72981031755951526e-03\n17 9 22 2.46769878860578115e-03\n17 9 23 4.06642286627579081e-04\n17 9 24 4.44592991644445060e-05\n17 9 25 3.13431602866314517e-06\n17 9 26 1.29684359972794086e-07\n17 9 27 2.40197411816629138e-09\n17 10 6 1.50078079710348494e-06\n17 10 7 -2.09572633038319550e-05\n17 10 8 1.51890555439599781e-04\n17 10 9 -7.48531335973118743e-04\n17 10 10 2.75718736474113094e-03\n17 10 11 -7.83523736166302336e-03\n17 10 12 1.69728137444258353e-02\n17 10 13 -2.59366787569523694e-02\n17 10 14 2.01512736782847471e-02\n17 10 15 1.60281940065716663e-02\n17 10 16 -5.99625371603017178e-02\n17 10 17 3.37305963959479923e-02\n17 10 18 5.36672471795852879e-02\n17 10 19 -6.10417441469923353e-04\n17 10 20 -2.36856184904595174e-02\n17 10 21 -1.54113901222861793e-02\n17 10 22 -5.32499015156525937e-03\n17 10 23 -1.18174103290221750e-03\n17 10 24 -1.77622347293580221e-04\n17 10 25 -1.81321641907425677e-05\n17 10 26 -1.21135232162931707e-06\n17 10 27 -4.79793954325390860e-08\n17 10 28 -8.56911554260522393e-10\n17 11 5 2.75818130696756434e-06\n17 11 6 -3.29830512454663312e-05\n17 11 7 2.07834712460393045e-04\n17 11 8 -9.04930235115306446e-04\n17 11 9 2.99846029863051254e-03\n17 11 10 -7.83523736166302336e-03\n17 11 11 1.60976769688076058e-02\n17 11 12 -2.46777427581086162e-02\n17 11 13 2.32024024860648810e-02\n17 11 14 1.77199423847787114e-03\n17 11 15 -4.46947433035315495e-02\n17 11 16 5.73760518463875677e-02\n17 11 17 5.36551335956884786e-03\n17 11 18 -5.83331471212718360e-02\n17 11 19 -2.38795226676677368e-02\n17 11 20 1.69636403843451284e-02\n17 11 21 2.04421320116779963e-02\n17 11 22 9.85004851240206525e-03\n17 11 23 2.91076354286557426e-03\n17 11 24 5.82133302791347785e-04\n17 11 25 8.10251101187973590e-05\n17 11 26 7.78794218774205093e-06\n17 11 27 4.95394769389444955e-07\n17 11 28 1.88325688611926752e-08\n17 11 29 3.24747734805408796e-10\n17 12 4 6.64720596746060836e-06\n17 12 5 -6.61388642948346091e-05\n17 12 6 3.52996941309709105e-04\n17 12 7 -1.32510150165502507e-03\n17 12 8 3.85428843624612877e-03\n17 12 9 -9.01520842463078940e-03\n17 12 10 1.69728137444258353e-02\n17 12 11 -2.46777427581086162e-02\n17 12 12 2.38360288609972714e-02\n17 12 13 -4.00420945681396267e-03\n17 12 14 -3.36409516572748205e-02\n17 12 15 5.90867189085696105e-02\n17 12 16 -2.81304097147042847e-02\n17 12 17 -4.25499776835427616e-02\n17 12 18 3.99065584705396114e-02\n17 12 19 4.63292498798790681e-02\n17 12 20 1.51001562847387637e-04\n17 12 21 -2.11335674139142738e-02\n17 12 22 -1.54357904373210203e-02\n17 12 23 -6.13441463110372165e-03\n17 12 24 -1.60936935463715625e-03\n17 12 25 -2.95429012936844716e-04\n17 12 26 -3.84723112401090984e-05\n17 12 27 -3.50317930074100525e-06\n17 12 28 -2.12962180303375245e-07\n17 12 29 -7.78717711852089369e-09\n17 12 30 -1.29804314937900815e-10\n17 13 3 2.17580889327502887e-05\n17 13 4 -1.72699476960252105e-04\n17 13 5 7.52559845227437142e-04\n17 13 6 -2.35742078014038360e-03\n17 13 7 5.83926916635132543e-03\n17 13 8 -1.18570155095562008e-02\n17 13 9 1.97529025682962073e-02\n17 13 10 -2.59366787569523694e-02\n17 13 11 2.32024024860648810e-02\n17 13 12 -4.00420945681396267e-03\n17 13 13 -2.99316991816561416e-02\n17 13 14 5.68367739126642721e-02\n17 13 15 -4.21256218508230045e-02\n17 13 16 -1.83587087370836435e-02\n17 13 17 5.61294590045326638e-02\n17 13 18 -7.96236308294766366e-04\n17 13 19 -5.30684379628132422e-02\n17 13 20 -2.47982092475521323e-02\n17 13 21 1.29383022061881759e-02\n17 13 22 1.96887281869484499e-02\n17 13 23 1.10026294566759603e-02\n17 13 24 3.79825551315469137e-03\n17 13 25 9.04983163136947435e-04\n17 13 26 1.54384776748601035e-04\n17 13 27 1.89511028628190814e-05\n17 13 28 1.64244767189393604e-06\n17 13 29 9.57049905927635231e-08\n17 13 30 3.37241502771173984e-09\n17 13 31 5.44008673051585395e-11\n17 14 2 1.02912376296715016e-04\n17 14 3 -6.08837828839735842e-04\n17 14 4 2.04688493318231172e-03\n17 14 5 -5.10187574928988435e-03\n17 14 6 1.03201869546388218e-02\n17 14 7 -1.74804378727756182e-02\n17 14 8 2.46736219085181437e-02\n17 14 9 -2.75823163260090445e-02\n17 14 10 2.01512736782847471e-02\n17 14 11 1.77199423847787114e-03\n17 14 12 -3.36409516572748205e-02\n17 14 13 5.68367739126642721e-02\n17 14 14 -4.56147260798033186e-02\n17 14 15 -5.46641277090075810e-03\n17 14 16 5.27717898479994485e-02\n17 14 17 -3.13310364514108756e-02\n17 14 18 -3.97562095078792754e-02\n17 14 19 3.31315624711284694e-02\n17 14 20 4.59209245929747587e-02\n17 14 21 6.28916155681816923e-03\n17 14 22 -1.81606311749855969e-02\n17 14 23 -1.63718792487034847e-02\n17 14 24 -7.64227363179651685e-03\n17 14 25 -2.36118558329256220e-03\n17 14 26 -5.18691858590667116e-04\n17 14 27 -8.29662260304245928e-05\n17 14 28 -9.65420407895759271e-06\n17 14 29 -7.99331772574949495e-07\n17 14 30 -4.47552845335803926e-08\n17 14 31 -1.52225253051599981e-09\n17 14 32 -2.37880997873441124e-11\n17 15 1 7.96712851590331635e-04\n17 15 2 -3.08565560591877573e-03\n17 15 3 7.23394176585068450e-03\n17 15 4 -1.32593243175718606e-02\n17 15 5 2.05143538376430503e-02\n17 15 6 -2.72670555708055452e-02\n17 15 7 3.04257823772802475e-02\n17 15 8 -2.58992640509498037e-02\n17 15 9 1.02500889252641658e-02\n17 15 10 1.60281940065716663e-02\n17 15 11 -4.46947433035315495e-02\n17 15 12 5.90867189085696105e-02\n17 15 13 -4.21256218508230045e-02\n17 15 14 -5.46641277090075810e-03\n17 15 15 4.99466379289556253e-02\n17 15 16 -4.21888749346130691e-02\n17 15 17 -1.95385002599957540e-02\n17 15 18 5.14025984762682188e-02\n17 15 19 8.94850286126948173e-03\n17 15 20 -4.69232893306852152e-02\n17 15 21 -3.13066861947450371e-02\n17 15 22 6.13611146566643245e-03\n17 15 23 1.88548049605650787e-02\n17 15 24 1.28826454057382941e-02\n17 15 25 5.25430317581497519e-03\n17 15 26 1.48106851103902219e-03\n17 15 27 3.03187983716464301e-04\n17 15 28 4.57752085775534367e-05\n17 15 29 5.07170201097533244e-06\n17 15 30 4.02376616774284604e-07\n17 15 31 2.16937099225237951e-08\n17 15 32 7.13246415099216791e-10\n17 15 33 1.08080045245622700e-11\n17 16 0 1.47122471584124922e-02\n17 16 1 -2.54823595718812772e-02\n17 16 2 3.26394519993119925e-02\n17 16 3 -3.73978132722754278e-02\n17 16 4 3.89776444007197558e-02\n17 16 5 -3.57499098919238737e-02\n17 16 6 2.58285499924319971e-02\n17 16 7 -8.06791896886233432e-03\n17 16 8 -1.63790311948958886e-02\n17 16 9 4.23334003623875161e-02\n17 16 10 -5.99625371603017178e-02\n17 16 11 5.73760518463875677e-02\n17 16 12 -2.81304097147042847e-02\n17 16 13 -1.83587087370836435e-02\n17 16 14 5.27717898479994485e-02\n17 16 15 -4.21888749346130691e-02\n17 16 16 -1.20410883134734752e-02\n17 16 17 5.19694500242515470e-02\n17 16 18 -1.75091945841009848e-02\n17 16 19 -4.54695612538436505e-02\n17 16 20 1.79802512043647375e-02\n17 16 21 4.69142398041614040e-02\n17 16 22 1.65036930145963597e-02\n17 16 23 -1.31459377921672604e-02\n17 16 24 -1.73569816848823864e-02\n17 16 25 -9.85013236050539277e-03\n17 16 26 -3.60613447834784018e-03\n17 16 27 -9.39746643036496066e-04\n17 16 28 -1.80694558443005010e-04\n17 16 29 -2.58848576877907587e-05\n17 16 30 -2.74051168150625382e-06\n17 16 31 -2.08871181862274114e-07\n17 16 32 -1.08630184217334325e-08\n17 16 33 -3.45687228465887274e-10\n17 16 34 -5.08418550300320841e-12\n17 17 1 -1.41855102994994045e-03\n17 17 2 5.49402451474149803e-03\n17 17 3 -1.29205821215742927e-02\n17 17 4 2.39298626395400589e-02\n17 17 5 -3.79317305516436169e-02\n17 17 6 5.29929283520387780e-02\n17 17 7 -6.53892393663525341e-02\n17 17 8 6.97031046456647893e-02\n17 17 9 -6.01558710643367853e-02\n17 17 10 3.37305963959479923e-02\n17 17 11 5.36551335956884786e-03\n17 17 12 -4.25499776835427616e-02\n17 17 13 5.61294590045326638e-02\n17 17 14 -3.13310364514108756e-02\n17 17 15 -1.95385002599957540e-02\n17 17 16 5.19694500242515470e-02\n17 17 17 -2.52554150685936912e-02\n17 17 18 -3.51414338722306576e-02\n17 17 19 4.04544618151081864e-02\n17 17 20 2.67582364311615494e-02\n17 17 21 -3.50678505760433465e-02\n17 17 22 -3.94402641029027581e-02\n17 17 23 -4.45351607306949740e-03\n17 17 24 1.63017409786868257e-02\n17 17 25 1.50257373373588602e-02\n17 17 26 7.42106093906622437e-03\n17 17 27 2.48241386846293179e-03\n17 17 28 6.03873879079511826e-04\n17 17 29 1.09730795580052592e-04\n17 17 30 1.49768185113911793e-05\n17 17 31 1.51968817952452782e-06\n17 17 32 1.11508194483619629e-07\n17 17 33 5.60326447124414749e-09\n17 17 34 1.72787523491816171e-10\n17 17 35 2.46864510815577088e-12\n18 0 17 1.38942503594182097e-02\n18 0 19 -1.31624531623164096e-02\n18 1 16 7.08116567280870986e-04\n18 1 17 -2.40655475555944737e-02\n18 1 18 -1.26890169052665003e-03\n18 1 19 2.27980376293776599e-02\n18 1 20 5.70129133935835944e-04\n18 2 15 8.57457430231555269e-05\n18 2 16 -2.74252367225237717e-03\n18 2 17 3.08512261441155268e-02\n18 2 18 4.91443511538415318e-03\n18 2 19 -2.92475482026457852e-02\n18 2 20 -2.20810064092115045e-03\n18 2 21 -5.25887330004371020e-05\n18 3 14 1.69186904443678044e-05\n18 3 15 -5.07278656786145365e-04\n18 3 16 6.43631484984258156e-03\n18 3 17 -3.54753908562746396e-02\n18 3 18 -1.15652100388632721e-02\n18 3 19 3.37325177828046138e-02\n18 3 20 5.19060009126920127e-03\n18 3 21 3.11119140122709551e-04\n18 3 22 7.07271641548696628e-06\n18 4 13 4.79905953965263927e-06\n18 4 14 -1.34287942274046237e-04\n18 4 15 1.70779961694379763e-03\n18 4 16 -1.18388614464110287e-02\n18 4 17 3.73371905555610388e-02\n18 4 18 2.14663385395092712e-02\n18 4 19 -3.57928824455739007e-02\n18 4 20 -9.59934693079492249e-03\n18 4 21 -1.05048837110010362e-03\n18 4 22 -5.61379461871880780e-05\n18 4 23 -1.22067860871554105e-06\n18 5 12 1.83789987800003593e-06\n18 5 13 -4.77500395188105493e-05\n18 5 14 5.86230244720984294e-04\n18 5 15 -4.27424264588137467e-03\n18 5 16 1.84682860401463132e-02\n18 5 17 -3.50694193571560959e-02\n18 5 18 -3.41964081126086699e-02\n18 5 19 3.42747274002177771e-02\n18 5 20 1.51639791396592538e-02\n18 5 21 2.65205767838961192e-03\n18 5 22 2.46214017655629312e-04\n18 5 23 1.21455988041675075e-05\n18 5 24 2.53088238043818823e-07\n18 6 11 9.16549543244059604e-07\n18 6 12 -2.19780859608386784e-05\n18 6 13 2.55449288190086492e-04\n18 6 14 -1.84568546537903763e-03\n18 6 15 8.72360377183066521e-03\n18 6 16 -2.49702227303673939e-02\n18 6 17 2.70118210554861849e-02\n18 6 18 4.82426585078004072e-02\n18 6 19 -2.77178707468947851e-02\n18 6 20 -2.10315266573374086e-02\n18 6 21 -5.51431682302940478e-03\n18 6 22 -7.85270157976375634e-04\n18 6 23 -6.54254724233548814e-05\n18 6 24 -3.02649514154010039e-06\n18 6 25 -6.05420124443733601e-08\n18 7 10 5.82370926383378396e-07\n18 7 11 -1.27989178338668299e-05\n18 7 12 1.38912319768399353e-04\n18 7 13 -9.65020304861727634e-04\n18 7 14 4.61996406408299089e-03\n18 7 15 -1.50335353088451296e-02\n18 7 16 2.88565296844740072e-02\n18 7 17 -1.19718899430600224e-02\n18 7 18 -6.06039034041880744e-02\n18 7 19 1.49453769750488258e-02\n18 7 20 2.55532824944172600e-02\n18 7 21 9.84223622521004276e-03\n18 7 22 2.01817597484523481e-03\n18 7 23 2.51743492728942582e-04\n18 7 24 1.93164510016897498e-05\n18 7 25 8.45423194506076031e-07\n18 7 26 1.62611455025604372e-08\n18 8 9 4.65568220623186427e-07\n18 8 10 -9.29971792333733940e-06\n18 8 11 9.31324599951418657e-05\n18 8 12 -6.09746077425395802e-04\n18 8 13 2.84323707108761423e-03\n18 8 14 -9.56656827999894638e-03\n18 8 15 2.19223850603975882e-02\n18 8 16 -2.66740540379039871e-02\n18 8 17 -9.56244802809361696e-03\n18 8 18 6.67627416043278893e-02\n18 8 19 3.98429001759430655e-03\n18 8 20 -2.62756453402000966e-02\n18 8 21 -1.52915332499375633e-02\n18 8 22 -4.38349916254294603e-03\n18 8 23 -7.69156740624724263e-04\n18 8 24 -8.69594917028481863e-05\n18 8 25 -6.23465180076712076e-06\n18 8 26 -2.59669670021621106e-07\n18 8 27 -4.80952234175009750e-09\n18 9 8 4.65568220623186427e-07\n18 9 9 -8.36728552647269933e-06\n18 9 10 7.63968704247340594e-05\n18 9 11 -4.63799899275312515e-04\n18 9 12 2.05334875095422208e-03\n18 9 13 -6.80866109005227801e-03\n18 9 14 1.65138797026071914e-02\n18 9 15 -2.61737262218167959e-02\n18 9 16 1.51017976601305884e-02\n18 9 17 3.39746162325966766e-02\n18 9 18 -6.15467268625889155e-02\n18 9 19 -2.65755582600450271e-02\n18 9 20 2.04233009283702950e-02\n18 9 21 2.05329163271403657e-02\n18 9 22 8.21838130373179533e-03\n18 9 23 1.96379946317817459e-03\n18 9 24 3.07549329440205276e-04\n18 9 25 3.21250511173709146e-05\n18 9 26 2.17191455302450070e-06\n18 9 27 8.64377010645311492e-08\n18 9 28 1.54377653361761038e-09\n18 10 7 5.82370926383378396e-07\n18 10 8 -9.29971792333733940e-06\n18 10 9 7.63968704247340594e-05\n18 10 10 -4.23513375109156628e-04\n18 10 11 1.74454348445600804e-03\n18 10 12 -5.52609687997466959e-03\n18 10 13 1.33697848984711757e-02\n18 10 14 -2.32093147467877933e-02\n18 10 15 2.27951962812321763e-02\n18 10 16 6.66825802158828503e-03\n18 10 17 -5.36672471795852879e-02\n18 10 18 4.13697023834499186e-02\n18 10 19 4.69940630718679253e-02\n18 10 20 -6.16032012992337180e-03\n18 10 21 -2.29796410541336820e-02\n18 10 22 -1.33429058455339357e-02\n18 10 23 -4.29644039667080930e-03\n18 10 24 -9.01217287235024130e-04\n18 10 25 -1.28985408262999594e-04\n18 10 26 -1.25992442875364111e-05\n18 10 27 -8.08339184228623717e-07\n18 10 28 -3.08369121073043491e-08\n18 10 29 -5.31749939641870373e-10\n18 11 6 9.16549543244059604e-07\n18 11 7 -1.27989178338668299e-05\n18 11 8 9.31324599951418657e-05\n18 11 9 -4.63799899275312515e-04\n18 11 10 1.74454348445600804e-03\n18 11 11 -5.15152890897287684e-03\n18 11 12 1.19698444491617127e-02\n18 11 13 -2.10452727962350511e-02\n18 11 14 2.43770299826104216e-02\n18 11 15 -7.20340704814354450e-03\n18 11 16 -3.37525467888373960e-02\n18 11 17 5.83331471212718360e-02\n18 11 18 -7.75233806939013900e-03\n18 11 19 -5.65596173338827510e-02\n18 11 20 -1.53854991005107176e-02\n18 11 21 1.91492535614458004e-02\n18 11 22 1.84699148860147632e-02\n18 11 23 8.12422946530982803e-03\n18 11 24 2.24926510745352868e-03\n18 11 25 4.26224315177280487e-04\n18 11 26 5.65850150100551365e-05\n18 11 27 5.21159769936571102e-06\n18 11 28 3.18781188186813101e-07\n18 11 29 1.16864071973943786e-08\n18 11 30 1.94800510795529639e-10\n18 12 5 1.83789987800003593e-06\n18 12 6 -2.19780859608386784e-05\n18 12 7 1.38912319768399353e-04\n18 12 8 -6.09746077425395802e-04\n18 12 9 2.05334875095422208e-03\n18 12 10 -5.52609687997466959e-03\n18 12 11 1.19698444491617127e-02\n18 12 12 -2.03018443486133936e-02\n18 12 13 2.44297434879758880e-02\n18 12 14 -1.30497158673177353e-02\n18 12 15 -1.99287088966894617e-02\n18 12 16 5.38345533125257537e-02\n18 12 17 -3.99065584705396114e-02\n18 12 18 -2.94351519323331412e-02\n18 12 19 4.69422164183146892e-02\n18 12 20 3.81314679110460332e-02\n18 12 21 -6.21792367028354639e-03\n18 12 22 -2.07609282381692635e-02\n18 12 23 -1.31942855599829419e-02\n18 12 24 -4.83832589657594283e-03\n18 12 25 -1.19356176868352015e-03\n18 12 26 -2.08016683092553036e-04\n18 12 27 -2.58768117511364710e-05\n18 12 28 -2.26077163556806498e-06\n18 12 29 -1.32316819485909291e-07\n18 12 30 -4.67115215215310389e-09\n18 12 31 -7.53509654960556114e-11\n18 13 4 4.79905953965263927e-06\n18 13 5 -4.77500395188105493e-05\n18 13 6 2.55449288190086492e-04\n18 13 7 -9.65020304861727634e-04\n18 13 8 2.84323707108761423e-03\n18 13 9 -6.80866109005227801e-03\n18 13 10 1.33697848984711757e-02\n18 13 11 -2.10452727962350511e-02\n18 13 12 2.44297434879758880e-02\n18 13 13 -1.46164907278440315e-02\n18 13 14 -1.35389658127786047e-02\n18 13 15 4.72325421545538744e-02\n18 13 16 -5.08893590307608123e-02\n18 13 17 7.96236308294766366e-04\n18 13 18 5.25174614218849648e-02\n18 13 19 -1.63740307308873149e-02\n18 13 20 -5.10165978586880150e-02\n18 13 21 -1.51086354367698280e-02\n18 13 22 1.62302225812468182e-02\n18 13 23 1.79115183250676467e-02\n18 13 24 8.95986721008769272e-03\n18 13 25 2.87242264025954854e-03\n18 13 26 6.45305810993390589e-04\n18 13 27 1.04696827702810380e-04\n18 13 28 1.22933703937164778e-05\n18 13 29 1.02348899114107001e-06\n18 13 30 5.74823043012453005e-08\n18 13 31 1.95767550957806595e-09\n18 13 32 3.05924144907133691e-11\n18 14 3 1.69186904443678044e-05\n18 14 4 -1.34287942274046237e-04\n18 14 5 5.86230244720984294e-04\n18 14 6 -1.84568546537903763e-03\n18 14 7 4.61996406408299089e-03\n18 14 8 -9.56656827999894638e-03\n18 14 9 1.65138797026071914e-02\n18 14 10 -2.32093147467877933e-02\n18 14 11 2.43770299826104216e-02\n18 14 12 -1.30497158673177353e-02\n18 14 13 -1.35389658127786047e-02\n18 14 14 4.46415947717189965e-02\n18 14 15 -5.33500745177226843e-02\n18 14 16 1.73148873381762902e-02\n18 14 17 3.97562095078792754e-02\n18 14 18 -4.43833230080830648e-02\n18 14 19 -2.38274669738765668e-02\n18 14 20 4.24580861418729631e-02\n18 14 21 3.76264983040744076e-02\n18 14 22 -1.85098566608445613e-03\n18 14 23 -1.88615888187029048e-02\n18 14 24 -1.40471711684864883e-02\n18 14 25 -5.95351828113582337e-03\n18 14 26 -1.71576719568844892e-03\n18 14 27 -3.56173337715959833e-04\n18 14 28 -5.42644300101106945e-05\n18 14 29 -6.04752404046677457e-06\n18 14 30 -4.81537119989299440e-07\n18 14 31 -2.60143424441832716e-08\n18 14 32 -8.56041138312271827e-10\n18 14 33 -1.29718093217523548e-11\n18 15 2 8.57457430231555269e-05\n18 15 3 -5.07278656786145365e-04\n18 15 4 1.70779961694379763e-03\n18 15 5 -4.27424264588137467e-03\n18 15 6 8.72360377183066521e-03\n18 15 7 -1.50335353088451296e-02\n18 15 8 2.19223850603975882e-02\n18 15 9 -2.61737262218167959e-02\n18 15 10 2.27951962812321763e-02\n18 15 11 -7.20340704814354450e-03\n18 15 12 -1.99287088966894617e-02\n18 15 13 4.72325421545538744e-02\n18 15 14 -5.33500745177226843e-02\n18 15 15 2.22004790808165688e-02\n18 15 16 3.05582146565456291e-02\n18 15 17 -5.14025984762682188e-02\n18 15 18 4.34157591393765342e-03\n18 15 19 4.93228969466142580e-02\n18 15 20 -9.93013390298950524e-03\n18 15 21 -4.77697624796766224e-02\n18 15 22 -2.05529498442002373e-02\n18 15 23 1.16227628804428937e-02\n18 15 24 1.78143073601854296e-02\n18 15 25 1.05136546163986350e-02\n18 15 26 3.92710626922595797e-03\n18 15 27 1.03596338308752535e-03\n18 15 28 2.00777320333432339e-04\n18 15 29 2.89123988750990340e-05\n18 15 30 3.07151253182513223e-06\n18 15 31 2.34599233935797086e-07\n18 15 32 1.22158211750754281e-08\n18 15 33 3.88938022742481758e-10\n18 15 34 5.72029538253303678e-12\n18 16 1 7.08116567280870986e-04\n18 16 2 -2.74252367225237717e-03\n18 16 3 6.43631484984258156e-03\n18 16 4 -1.18388614464110287e-02\n18 16 5 1.84682860401463132e-02\n18 16 6 -2.49702227303673939e-02\n18 16 7 2.88565296844740072e-02\n18 16 8 -2.66740540379039871e-02\n18 16 9 1.51017976601305884e-02\n18 16 10 6.66825802158828503e-03\n18 16 11 -3.37525467888373960e-02\n18 16 12 5.38345533125257537e-02\n18 16 13 -5.08893590307608123e-02\n18 16 14 1.73148873381762902e-02\n18 16 15 3.05582146565456291e-02\n18 16 16 -5.21062384977157307e-02\n18 16 17 1.75091945841009848e-02\n18 16 18 3.98702806117157133e-02\n18 16 19 -3.70159304523216661e-02\n18 16 20 -3.05482506668303739e-02\n18 16 21 3.27577404999298363e-02\n18 16 22 4.08424931827671157e-02\n18 16 23 6.04669767197200029e-03\n18 16 24 -1.60042656905517540e-02\n18 16 25 -1.53327681120386699e-02\n18 16 26 -7.68454278614439716e-03\n18 16 27 -2.59168809767342064e-03\n18 16 28 -6.33724023055297788e-04\n18 16 29 -1.15549611595639323e-04\n18 16 30 -1.58071901196081266e-05\n18 16 31 -1.60637350229095630e-06\n18 16 32 -1.17981308696521752e-07\n18 16 33 -5.93175595833490753e-09\n18 16 34 -1.82960050793848556e-10\n18 16 35 -2.61398175778332734e-12\n18 17 0 1.38942503594182097e-02\n18 17 1 -2.40655475555944737e-02\n18 17 2 3.08512261441155268e-02\n18 17 3 -3.54753908562746396e-02\n18 17 4 3.73371905555610388e-02\n18 17 5 -3.50694193571560959e-02\n18 17 6 2.70118210554861849e-02\n18 17 7 -1.19718899430600224e-02\n18 17 8 -9.56244802809361696e-03\n18 17 9 3.39746162325966766e-02\n18 17 10 -5.36672471795852879e-02\n18 17 11 5.83331471212718360e-02\n18 17 12 -3.99065584705396114e-02\n18 17 13 7.96236308294766366e-04\n18 17 14 3.97562095078792754e-02\n18 17 15 -5.14025984762682188e-02\n18 17 16 1.75091945841009848e-02\n18 17 17 3.51414338722306576e-02\n18 17 18 -4.50391639914508771e-02\n18 17 19 -9.22472098206985998e-03\n18 17 20 4.74226207973460835e-02\n18 17 21 5.52224735956712364e-03\n18 17 22 -4.26786929258127960e-02\n18 17 23 -2.91660382234427141e-02\n18 17 24 4.22274724689381977e-03\n18 17 25 1.70284862678526322e-02\n18 17 26 1.25641936813620997e-02\n18 17 27 5.55326875236474100e-03\n18 17 28 1.71871607840512931e-03\n18 17 29 3.93154243781697645e-04\n18 17 30 6.78418945071716559e-05\n18 17 31 8.85245370943762759e-06\n18 17 32 8.63046131362418752e-07\n18 17 33 6.10807500156533642e-08\n18 17 34 2.96972442499450365e-09\n18 17 35 8.88369305394875511e-11\n18 17 36 1.23396527994601178e-12\n18 18 1 -1.26890169052665003e-03\n18 18 2 4.91443511538415318e-03\n18 18 3 -1.15652100388632721e-02\n18 18 4 2.14663385395092712e-02\n18 18 5 -3.41964081126086699e-02\n18 18 6 4.82426585078004072e-02\n18 18 7 -6.06039034041880744e-02\n18 18 8 6.67627416043278893e-02\n18 18 9 -6.15467268625889155e-02\n18 18 10 4.13697023834499186e-02\n18 18 11 -7.75233806939013900e-03\n18 18 12 -2.94351519323331412e-02\n18 18 13 5.25174614218849648e-02\n18 18 14 -4.43833230080830648e-02\n18 18 15 4.34157591393765342e-03\n18 18 16 3.98702806117157133e-02\n18 18 17 -4.50391639914508771e-02\n18 18 18 -1.66273205384994997e-03\n18 18 19 4.61490504176450887e-02\n18 18 20 -1.93122091427411726e-02\n18 18 21 -4.08719836912600157e-02\n18 18 22 1.59072085693919262e-02\n18 18 23 4.29649305663560453e-02\n18 18 24 1.71825800253196123e-02\n18 18 25 -1.05787279566229815e-02\n18 18 26 -1.62221525189418544e-02\n18 18 27 -1.00139629871049599e-02\n18 18 28 -3.99621443796144096e-03\n18 18 29 -1.14819346131550986e-03\n18 18 30 -2.47433265902022671e-04\n18 18 31 -4.05976003792871961e-05\n18 18 32 -5.06981094928233618e-06\n18 18 33 -4.75334012329027092e-07\n18 18 34 -3.24759423261566601e-08\n18 18 35 -1.52900438246787705e-09\n18 18 36 -4.44056083640946169e-11\n18 18 37 -6.00130587643751638e-13\n19 0 18 1.31624531623164096e-02\n19 0 20 -1.25039080820088837e-02\n19 1 17 6.33523285052020842e-04\n19 1 18 -2.27980376293776599e-02\n19 1 19 -1.14176058508165939e-03\n19 1 20 2.16574040912104985e-02\n19 1 21 5.15798700533918980e-04\n19 2 16 7.21966787651318284e-05\n19 2 17 -2.45362513244109089e-03\n19 2 18 2.92475482026457852e-02\n19 2 19 4.42201973137730329e-03\n19 2 20 -2.78014261075080770e-02\n19 2 21 -1.99767977716329488e-03\n19 2 22 -4.54135433366667991e-05\n19 3 15 1.33540631203808393e-05\n19 3 16 -4.27121311649333763e-04\n19 3 17 5.76342227982835955e-03\n19 3 18 -3.37325177828046138e-02\n19 3 19 -1.04122603976266089e-02\n19 3 20 3.21465301303418501e-02\n19 3 21 4.69898054541871306e-03\n19 3 22 2.68670145612972730e-04\n19 3 23 5.84203594582327426e-06\n19 4 14 3.53511750089196671e-06\n19 4 15 -1.05994590026360709e-04\n19 4 16 1.43959350728918141e-03\n19 4 17 -1.06323215996069580e-02\n19 4 18 3.57928824455739007e-02\n19 4 19 1.93619598043874845e-02\n19 4 20 -3.43444866865988822e-02\n19 4 21 -8.70853603043763533e-03\n19 4 22 -9.07798523530045886e-04\n19 4 23 -4.63697227888451802e-05\n19 4 24 -9.66245602907804235e-07\n19 5 13 1.25701531733020288e-06\n19 5 14 -3.51739750208325724e-05\n19 5 15 4.63403764428730066e-04\n19 5 16 -3.61527654630388343e-03\n19 5 17 1.66998112709792067e-02\n19 5 18 -3.42747274002177771e-02\n19 5 19 -3.09734255187808563e-02\n19 5 20 3.34164230610123120e-02\n19 5 21 1.38237240370026437e-02\n19 5 22 2.29656423562250706e-03\n19 5 23 2.03527747259454517e-04\n19 5 24 9.61402236052776946e-06\n19 5 25 1.92318914840671288e-07\n19 6 12 5.78571054113805895e-07\n19 6 13 -1.50317169227069116e-05\n19 6 14 1.88530966902465579e-04\n19 6 15 -1.46503446558066419e-03\n19 6 16 7.43301151984202005e-03\n19 6 17 -2.28959333190208965e-02\n19 6 18 2.77178707468947851e-02\n19 6 19 4.40530478843617217e-02\n19 6 20 -2.80773198219120329e-02\n19 6 21 -1.93590777689263588e-02\n19 6 22 -4.79607979142527607e-03\n19 6 23 -6.50494796646119690e-04\n19 6 24 -5.18312403837848113e-05\n19 6 25 -2.29979972949506032e-06\n19 6 26 -4.42350981982663552e-08\n19 7 11 3.36930313033216692e-07\n19 7 12 -8.07930508202161526e-06\n19 7 13 9.52416299757896497e-05\n19 7 14 -7.15888508412150896e-04\n19 7 15 3.69855495592914804e-03\n19 7 16 -1.29898317719669316e-02\n19 7 17 2.72028121600392581e-02\n19 7 18 -1.49453769750488258e-02\n19 7 19 -5.61634859221838628e-02\n19 7 20 1.71996152100208730e-02\n19 7 21 2.39579590606612348e-02\n19 7 22 8.62985189861694172e-03\n19 7 23 1.67887928743247704e-03\n19 7 24 1.99868444508331836e-04\n19 7 25 1.46912725356971563e-05\n19 7 26 6.17709529600282379e-07\n19 7 27 1.14410272985564067e-08\n19 8 10 2.44814203177364312e-07\n19 8 11 -5.38034563382025249e-06\n19 8 12 5.89762081724134042e-05\n19 8 13 -4.20763606560936977e-04\n19 8 14 2.13104219636607256e-03\n19 8 15 -7.77944392845314238e-03\n19 8 16 1.94352359170117337e-02\n19 8 17 -2.67109125588489874e-02\n19 8 18 -3.98429001759430655e-03\n19 8 19 6.35277935466395762e-02\n19 8 20 -5.67578628158549753e-04\n19 8 21 -2.55464292567077414e-02\n19 8 22 -1.35987722849613416e-02\n19 8 23 -3.67388961674508192e-03\n19 8 24 -6.13231924145987500e-04\n19 8 25 -6.62858262722958386e-05\n19 8 26 -4.55958937259555564e-06\n19 8 27 -1.82698554837770384e-07\n19 8 28 -3.26299448285691078e-09\n19 9 9 2.20268007675849810e-07\n19 9 10 -4.39985000732863667e-06\n19 9 11 4.43812329871604259e-05\n19 9 12 -2.96123792253294951e-04\n19 9 13 1.43510722356521578e-03\n19 9 14 -5.19850928942592714e-03\n19 9 15 1.38059958303132552e-02\n19 9 16 -2.43736021124062028e-02\n19 9 17 1.83481206283311455e-02\n19 9 18 2.65755582600450271e-02\n19 9 19 -6.15799802310387489e-02\n19 9 20 -2.01294128742978598e-02\n19 9 21 2.16507569956047816e-02\n19 9 22 1.87142174953078292e-02\n19 9 23 6.97415608024970130e-03\n19 9 24 1.57699318962254331e-03\n19 9 25 2.35424951150651739e-04\n19 9 26 2.35482879237237563e-05\n19 9 27 1.52960520036804843e-06\n19 9 28 5.86431919103568941e-08\n19 9 29 1.01123983005264819e-09\n19 10 8 2.44814203177364312e-07\n19 10 9 -4.39985000732863667e-06\n19 10 10 4.03896312611472896e-05\n19 10 11 -2.48656318353830074e-04\n19 10 12 1.13194244210759751e-03\n19 10 13 -3.95092544349672006e-03\n19 10 14 1.05416692030815259e-02\n19 10 15 -2.04049877907392817e-02\n19 10 16 2.37630691172323752e-02\n19 10 17 -6.10417441469923353e-04\n19 10 18 -4.69940630718679253e-02\n19 10 19 4.65774537850669826e-02\n19 10 20 4.04301732636948836e-02\n19 10 21 -1.03190907634732804e-02\n19 10 22 -2.19165087784495044e-02\n19 10 23 -1.15552590047089698e-02\n19 10 24 -3.49039192469878069e-03\n19 10 25 -6.94759523670931602e-04\n19 10 26 -9.49533206467800735e-05\n19 10 27 -8.89431025170692899e-06\n19 10 28 -5.48969592656795835e-07\n19 10 29 -2.01994997848976104e-08\n19 10 30 -3.36705097593174024e-10\n19 11 7 3.36930313033216692e-07\n19 11 8 -5.38034563382025249e-06\n19 11 9 4.43812329871604259e-05\n19 11 10 -2.48656318353830074e-04\n19 11 11 1.04588272604850024e-03\n19 11 12 -3.44001798303490018e-03\n19 11 13 8.90090634003419542e-03\n19 11 14 -1.75730370050068388e-02\n19 11 15 2.37912356696751435e-02\n19 11 16 -1.31907540253314902e-02\n19 11 17 -2.38795226676677368e-02\n19 11 18 5.65596173338827510e-02\n19 11 19 -1.83437679601710212e-02\n19 11 20 -5.31474740714615269e-02\n19 11 21 -8.29056437607514428e-03\n19 11 22 2.02236388991060762e-02\n19 11 23 1.65482333249768736e-02\n19 11 24 6.72146525176421246e-03\n19 11 25 1.75337731630266112e-03\n19 11 26 3.15975488265693397e-04\n19 11 27 4.01187835746000633e-05\n19 11 28 3.54800485129825262e-06\n19 11 29 2.09034803078367369e-07\n19 11 30 7.39985580169948525e-09\n19 11 31 1.19368040480683776e-10\n19 12 6 5.78571054113805895e-07\n19 12 7 -8.07930508202161526e-06\n19 12 8 5.89762081724134042e-05\n19 12 9 -2.96123792253294951e-04\n19 12 10 1.13194244210759751e-03\n19 12 11 -3.44001798303490018e-03\n19 12 12 8.40433228806985434e-03\n19 12 13 -1.61949496361122405e-02\n19 12 14 2.29013484421897036e-02\n19 12 15 -1.80989401593483533e-02\n19 12 16 -8.75779266614250752e-03\n19 12 17 4.63292498798790681e-02\n19 12 18 -4.69422164183146892e-02\n19 12 19 -1.67537904152282502e-02\n19 12 20 5.03783828068757040e-02\n19 12 21 3.01175078554599095e-02\n19 12 22 -1.07651033040602303e-02\n19 12 23 -1.97940707331268732e-02\n19 12 24 -1.12359971330011220e-02\n19 12 25 -3.83645603132343371e-03\n19 12 26 -8.94482265353725228e-04\n19 12 27 -1.48520651179271750e-04\n19 12 28 -1.76941124307749869e-05\n19 12 29 -1.48616470885731391e-06\n19 12 30 -8.38741160681937443e-08\n19 12 31 -2.86234505706666023e-09\n19 12 32 -4.47296020064636881e-11\n19 13 5 1.25701531733020288e-06\n19 13 6 -1.50317169227069116e-05\n19 13 7 9.52416299757896497e-05\n19 13 8 -4.20763606560936977e-04\n19 13 9 1.43510722356521578e-03\n19 13 10 -3.95092544349672006e-03\n19 13 11 8.90090634003419542e-03\n19 13 12 -1.61949496361122405e-02\n19 13 13 2.25029247571786647e-02\n19 13 14 -1.96861292926959458e-02\n19 13 15 -1.18093925731957337e-03\n19 13 16 3.58272249377015523e-02\n19 13 17 -5.30684379628132422e-02\n19 13 18 1.63740307308873149e-02\n19 13 19 4.49626909144064990e-02\n19 13 20 -2.80628684531532878e-02\n19 13 21 -4.65131122415944972e-02\n19 13 22 -7.05869299771170522e-03\n19 13 23 1.79281352827647703e-02\n19 13 24 1.60048249833242630e-02\n19 13 25 7.29230694570538284e-03\n19 13 26 2.18804474171415669e-03\n19 13 27 4.65689043688851338e-04\n19 13 28 7.20943320521025266e-05\n19 13 29 8.11731279972717350e-06\n19 13 30 6.50435529017461623e-07\n19 13 31 3.52627356419674383e-08\n19 13 32 1.16210914916294858e-09\n19 13 33 1.76097358168160952e-11\n19 14 4 3.53511750089196671e-06\n19 14 5 -3.51739750208325724e-05\n19 14 6 1.88530966902465579e-04\n19 14 7 -7.15888508412150896e-04\n19 14 8 2.13104219636607256e-03\n19 14 9 -5.19850928942592714e-03\n19 14 10 1.05416692030815259e-02\n19 14 11 -1.75730370050068388e-02\n19 14 12 2.29013484421897036e-02\n19 14 13 -1.96861292926959458e-02\n19 14 14 1.06046310835615401e-03\n19 14 15 3.02231845608720538e-02\n19 14 16 -5.20937057331903893e-02\n19 14 17 3.31315624711284694e-02\n19 14 18 2.38274669738765668e-02\n19 14 19 -4.97435534919737008e-02\n19 14 20 -8.20220635895157801e-03\n19 14 21 4.66493043959222883e-02\n19 14 22 2.89020355742329396e-02\n19 14 23 -7.69177968546202972e-03\n19 14 24 -1.84733120738833902e-02\n19 14 25 -1.19131216042291304e-02\n19 14 26 -4.64687875587524545e-03\n19 14 27 -1.25794411284771014e-03\n19 14 28 -2.47873443661908850e-04\n19 14 29 -3.60843908739272522e-05\n19 14 30 -3.86060673507249794e-06\n19 14 31 -2.96170551294339313e-07\n19 14 32 -1.54601955151488909e-08\n19 14 33 -4.92758042964594904e-10\n19 14 34 -7.24722550395305719e-12\n19 15 3 1.33540631203808393e-05\n19 15 4 -1.05994590026360709e-04\n19 15 5 4.63403764428730066e-04\n19 15 6 -1.46503446558066419e-03\n19 15 7 3.69855495592914804e-03\n19 15 8 -7.77944392845314238e-03\n19 15 9 1.38059958303132552e-02\n19 15 10 -2.04049877907392817e-02\n19 15 11 2.37912356696751435e-02\n19 15 12 -1.80989401593483533e-02\n19 15 13 -1.18093925731957337e-03\n19 15 14 3.02231845608720538e-02\n19 15 15 -5.11604195748266801e-02\n19 15 16 3.92872758804277551e-02\n19 15 17 8.94850286126948173e-03\n19 15 18 -4.93228969466142580e-02\n19 15 19 2.32209001247853691e-02\n19 15 20 4.05406152872042207e-02\n19 15 21 -2.42823843731283572e-02\n19 15 22 -4.43751651686047727e-02\n19 15 23 -1.11747437067129473e-02\n19 15 24 1.48098418711999509e-02\n19 15 25 1.62139756592689502e-02\n19 15 26 8.51634325416044908e-03\n19 15 27 2.94686411090605977e-03\n19 15 28 7.32225094361268887e-04\n19 15 29 1.34926541953394282e-04\n19 15 30 1.85883794367765364e-05\n19 15 31 1.89778111226339058e-06\n19 15 32 1.39791074694737100e-07\n19 15 33 7.03993599636886164e-09\n19 15 34 2.17295944456236301e-10\n19 15 35 3.10454458437436257e-12\n19 16 2 7.21966787651318284e-05\n19 16 3 -4.27121311649333763e-04\n19 16 4 1.43959350728918141e-03\n19 16 5 -3.61527654630388343e-03\n19 16 6 7.43301151984202005e-03\n19 16 7 -1.29898317719669316e-02\n19 16 8 1.94352359170117337e-02\n19 16 9 -2.43736021124062028e-02\n19 16 10 2.37630691172323752e-02\n19 16 11 -1.31907540253314902e-02\n19 16 12 -8.75779266614250752e-03\n19 16 13 3.58272249377015523e-02\n19 16 14 -5.20937057331903893e-02\n19 16 15 3.92872758804277551e-02\n19 16 16 4.01170823069688139e-03\n19 16 17 -4.54695612538436505e-02\n19 16 18 3.70159304523216661e-02\n19 16 19 2.08925910952402176e-02\n19 16 20 -4.58201337966290903e-02\n19 16 21 -1.33845669079951264e-02\n19 16 22 4.07149907310399341e-02\n19 16 23 3.25273272734340044e-02\n19 16 24 -1.88443486812050637e-03\n19 16 25 -1.69445145254034350e-02\n19 16 26 -1.31860707921162775e-02\n19 16 27 -5.96874299631705142e-03\n19 16 28 -1.87336754841236064e-03\n19 16 29 -4.32431253560638441e-04\n19 16 30 -7.50747773721411979e-05\n19 16 31 -9.83663072805007640e-06\n19 16 32 -9.61622872403978490e-07\n19 16 33 -6.81755914753682659e-08\n19 16 34 -3.31796336525213388e-09\n19 16 35 -9.92969063421648192e-11\n19 16 36 -1.37925673577633182e-12\n19 17 1 6.33523285052020842e-04\n19 17 2 -2.45362513244109089e-03\n19 17 3 5.76342227982835955e-03\n19 17 4 -1.06323215996069580e-02\n19 17 5 1.66998112709792067e-02\n19 17 6 -2.28959333190208965e-02\n19 17 7 2.72028121600392581e-02\n19 17 8 -2.67109125588489874e-02\n19 17 9 1.83481206283311455e-02\n19 17 10 -6.10417441469923353e-04\n19 17 11 -2.38795226676677368e-02\n19 17 12 4.63292498798790681e-02\n19 17 13 -5.30684379628132422e-02\n19 17 14 3.31315624711284694e-02\n19 17 15 8.94850286126948173e-03\n19 17 16 -4.54695612538436505e-02\n19 17 17 4.04544618151081864e-02\n19 17 18 9.22472098206985998e-03\n19 17 19 -4.73855101066081830e-02\n19 17 20 1.44867289216359179e-02\n19 17 21 4.27415806362732674e-02\n19 17 22 -1.27732107173314255e-02\n19 17 23 -4.32961281299899029e-02\n19 17 24 -1.88184761316160668e-02\n19 17 25 9.88990239291918005e-03\n19 17 26 1.63683647463526657e-02\n19 17 27 1.02942993297281753e-02\n19 17 28 4.14749998513053927e-03\n19 17 29 1.19870664830246170e-03\n19 17 30 2.59330998535202435e-04\n19 17 31 4.26633835483852262e-05\n19 17 32 5.33751378527606665e-06\n19 17 33 5.01045921301249820e-07\n19 17 34 3.42594095036667729e-08\n19 17 35 1.61369707122372883e-09\n19 17 36 4.68744414407037090e-11\n19 17 37 6.33496243461626941e-13\n19 18 0 1.31624531623164096e-02\n19 18 1 -2.27980376293776599e-02\n19 18 2 2.92475482026457852e-02\n19 18 3 -3.37325177828046138e-02\n19 18 4 3.57928824455739007e-02\n19 18 5 -3.42747274002177771e-02\n19 18 6 2.77178707468947851e-02\n19 18 7 -1.49453769750488258e-02\n19 18 8 -3.98429001759430655e-03\n19 18 9 2.65755582600450271e-02\n19 18 10 -4.69940630718679253e-02\n19 18 11 5.65596173338827510e-02\n19 18 12 -4.69422164183146892e-02\n19 18 13 1.63740307308873149e-02\n19 18 14 2.38274669738765668e-02\n19 18 15 -4.93228969466142580e-02\n19 18 16 3.70159304523216661e-02\n19 18 17 9.22472098206985998e-03\n19 18 18 -4.61490504176450887e-02\n19 18 19 2.64208376457797357e-02\n19 18 20 3.07580147519494613e-02\n19 18 21 -3.70379566717087658e-02\n19 18 22 -2.57327730673825348e-02\n19 18 23 3.03257668247871157e-02\n19 18 24 3.75906410736639534e-02\n19 18 25 6.93436168652069109e-03\n19 18 26 -1.39464596803998155e-02\n19 18 27 -1.45643981106737255e-02\n19 18 28 -7.85607529999415488e-03\n19 18 29 -2.87602916574918441e-03\n19 18 30 -7.73775039740902611e-04\n19 18 31 -1.57954950660786737e-04\n19 18 32 -2.47368346380874142e-05\n19 18 33 -2.96463883223363091e-06\n19 18 34 -2.67869560524339294e-07\n19 18 35 -1.76958359057695892e-08\n19 18 36 -8.07767354855387420e-10\n19 18 37 -2.27970645077736012e-11\n19 18 38 -2.99987344659936652e-13\n19 19 1 -1.14176058508165939e-03\n19 19 2 4.42201973137730329e-03\n19 19 3 -1.04122603976266089e-02\n19 19 4 1.93619598043874845e-02\n19 19 5 -3.09734255187808563e-02\n19 19 6 4.40530478843617217e-02\n19 19 7 -5.61634859221838628e-02\n19 19 8 6.35277935466395762e-02\n19 19 9 -6.15799802310387489e-02\n19 19 10 4.65774537850669826e-02\n19 19 11 -1.83437679601710212e-02\n19 19 12 -1.67537904152282502e-02\n19 19 13 4.49626909144064990e-02\n19 19 14 -4.97435534919737008e-02\n19 19 15 2.32209001247853691e-02\n19 19 16 2.08925910952402176e-02\n19 19 17 -4.73855101066081830e-02\n19 19 18 2.64208376457797357e-02\n19 19 19 2.53481595646877638e-02\n19 19 20 -4.33152215777248648e-02\n19 19 21 -4.93083458561302132e-03\n19 19 22 4.35501069496610284e-02\n19 19 23 5.30730160520227556e-03\n19 19 24 -3.86001836241317493e-02\n19 19 25 -2.83149506813760137e-02\n19 19 26 1.96457322273662408e-03\n19 19 27 1.53491820907201360e-02\n19 19 28 1.23753047747310485e-02\n19 19 29 5.92146187725449414e-03\n19 19 30 1.99806621688627184e-03\n19 19 31 5.04497805343207194e-04\n19 19 32 9.76924658844548136e-05\n19 19 33 1.46183686026218862e-05\n19 19 34 1.68287546975610147e-06\n19 19 35 1.46656578717370004e-07\n19 19 36 9.37491203782765552e-09\n19 19 37 4.15212427612119802e-10\n19 19 38 1.13955712115576118e-11\n19 19 39 1.46109074957450931e-13\n20 0 19 1.25039080820088837e-02\n20 0 21 -1.19081377057385231e-02\n20 1 18 5.70129133935835944e-04\n20 1 19 -2.16574040912104985e-02\n20 1 20 -1.03282695740541282e-03\n20 1 21 2.06254995298658067e-02\n20 1 22 4.68882464270646414e-04\n20 2 17 6.13598062475005479e-05\n20 2 18 -2.20810064092115045e-03\n20 2 19 2.78014261075080770e-02\n20 2 20 4.00012160554524096e-03\n20 2 21 -2.64908545985599318e-02\n20 2 22 -1.81597397544890774e-03\n20 2 23 -3.94870268039928312e-05\n20 3 16 1.06813712414606792e-05\n20 3 17 -3.63009509235747507e-04\n20 3 18 5.19060009126920127e-03\n20 3 19 -3.21465301303418501e-02\n20 3 20 -9.42337571508444166e-03\n20 3 21 3.06981255383903736e-02\n20 3 22 4.27393425864552323e-03\n20 3 23 2.33608400969814634e-04\n20 3 24 4.86789820304267912e-06\n20 4 15 2.65069322175965977e-06\n20 4 16 -8.47807558981866166e-05\n20 4 17 1.22468971320604513e-03\n20 4 18 -9.59934693079492249e-03\n20 4 19 3.43444866865988822e-02\n20 4 20 1.75506454576222018e-02\n20 4 21 -3.29886720695590629e-02\n20 4 22 -7.93519747601031833e-03\n20 4 23 -7.89809674689566671e-04\n20 4 24 -3.86377441584873987e-05\n20 4 25 -7.72909480527135423e-07\n20 5 14 8.79624301078733988e-07\n20 5 15 -2.63740645527453330e-05\n20 5 16 3.71117649353193883e-04\n20 5 17 -3.08437874471331122e-03\n20 5 18 1.51639791396592538e-02\n20 5 19 -3.34164230610123120e-02\n20 5 20 -2.81758717050508919e-02\n20 5 21 3.25283012534661011e-02\n20 5 22 1.26485541516770957e-02\n20 5 23 2.00163447134030133e-03\n20 5 24 1.69702833039028786e-04\n20 5 25 7.69035223145103457e-06\n20 5 26 1.47918743434317799e-07\n20 6 13 3.75910413432609315e-07\n20 6 14 -1.05187767482678294e-05\n20 6 15 1.41587733418785763e-04\n20 6 16 -1.17732041665495086e-03\n20 6 17 6.38033293050123680e-03\n20 6 18 -2.10315266573374086e-02\n20 6 19 2.80773198219120329e-02\n20 6 20 4.03505318128185647e-02\n20 6 21 -2.81844314287955732e-02\n20 6 22 -1.78592301584430047e-02\n20 6 23 -4.19586886128955022e-03\n20 6 24 -5.43373470519063064e-04\n20 6 25 -4.14900332979217611e-05\n20 6 26 -1.76885090277949020e-06\n20 6 27 -3.27621163281581348e-08\n20 7 12 2.02045776224211043e-07\n20 7 13 -5.24930324812538107e-06\n20 7 14 6.67817330230704535e-05\n20 7 15 -5.39912398183883684e-04\n20 7 16 2.99317492231356658e-03\n20 7 17 -1.12792133373904167e-02\n20 7 18 2.55532824944172600e-02\n20 7 19 -1.71996152100208730e-02\n20 7 20 -5.20808256851929422e-02\n20 7 21 1.88958142069166354e-02\n20 7 22 2.24434646995631170e-02\n20 7 23 7.60210786730909788e-03\n20 7 24 1.40751451511489889e-03\n20 7 25 1.60291607927106822e-04\n20 7 26 1.13081803044779933e-05\n20 7 27 4.57498056748282094e-07\n20 7 28 8.17091102013897215e-09\n20 8 11 1.34550694509452529e-07\n20 8 12 -3.22641231106026047e-06\n20 8 13 3.84163825688690781e-05\n20 8 14 -2.96583147223887844e-04\n20 8 15 1.62073615094543152e-03\n20 8 16 -6.37653814655598927e-03\n20 8 17 1.72289688713578761e-02\n20 8 18 -2.62756453402000966e-02\n20 8 19 5.67578628158549753e-04\n20 8 20 6.01975104584942391e-02\n20 8 21 -4.27558052995041704e-03\n20 8 22 -2.46426888244879476e-02\n20 8 23 -1.21228060335067302e-02\n20 8 24 -3.09979890872821685e-03\n20 8 25 -4.93586407587994177e-04\n20 8 26 -5.11206212349958906e-05\n20 8 27 -3.37972955231767230e-06\n20 8 28 -1.30478985508212268e-07\n20 8 29 -2.24997212519504412e-09\n20 9 10 1.10030640132526772e-07\n20 9 11 -2.41817209353082523e-06\n20 9 12 2.67010955758118129e-05\n20 9 13 -1.94163685300227796e-04\n20 9 14 1.02196622505024841e-03\n20 9 15 -4.01289068918621596e-03\n20 9 16 1.15690799461006121e-02\n20 9 17 -2.24448725642405219e-02\n20 9 18 2.04233009283702950e-02\n20 9 19 2.01294128742978598e-02\n20 9 20 -6.07002115954829687e-02\n20 9 21 -1.45679875814298081e-02\n20 9 22 2.22686370646441292e-02\n20 9 23 1.70251835857284604e-02\n20 9 24 5.94666983028233234e-03\n20 9 25 1.27715778773530731e-03\n20 9 26 1.82226422471338758e-04\n20 9 27 1.74898237194329974e-05\n20 9 28 1.09333563645422997e-06\n20 9 29 4.04369507285350234e-08\n20 9 30 6.74042802366888882e-10\n20 10 9 1.10030640132526772e-07\n20 10 10 -2.19786031526607050e-06\n20 10 11 2.22919365866903583e-05\n20 10 12 -1.50851908166068846e-04\n20 10 13 7.51696861309671145e-04\n20 10 14 -2.86443036389707325e-03\n20 10 15 8.34567026514940928e-03\n20 10 16 -1.77730417112419695e-02\n20 10 17 2.36856184904595174e-02\n20 10 18 -6.16032012992337180e-03\n20 10 19 -4.04301732636948836e-02\n20 10 20 4.99201070067906002e-02\n20 10 21 3.42369122479384954e-02\n20 10 22 -1.33788358775870673e-02\n20 10 23 -2.06707202328843898e-02\n20 10 24 -1.00213993508825023e-02\n20 10 25 -2.85474626931512371e-03\n20 10 26 -5.41037547979439124e-04\n20 10 27 -7.07847203565631405e-05\n20 10 28 -6.37063855477627747e-06\n20 10 29 -3.78872979987600570e-07\n20 10 30 -1.34639944321743137e-08\n20 10 31 -2.17189452805603886e-10\n20 11 8 1.34550694509452529e-07\n20 11 9 -2.41817209353082523e-06\n20 11 10 2.22919365866903583e-05\n20 11 11 -1.38720765014700357e-04\n20 11 12 6.44810955677708239e-04\n20 11 13 -2.33575295743837009e-03\n20 11 14 6.65125402033677820e-03\n20 11 15 -1.45278630422162616e-02\n20 11 16 2.23110106519602211e-02\n20 11 17 -1.69636403843451284e-02\n20 11 18 -1.53854991005107176e-02\n20 11 19 5.31474740714615269e-02\n20 11 20 -2.66440312346645032e-02\n20 11 21 -4.88415091557985868e-02\n20 11 22 -2.48246620797310345e-03\n20 11 23 2.05358555965916628e-02\n20 11 24 1.47540605219685609e-02\n20 11 25 5.58221228139562420e-03\n20 11 26 1.37843138289826094e-03\n20 11 27 2.36975070672431971e-04\n20 11 28 2.88433182634092360e-05\n20 11 29 2.45386829458785675e-06\n20 11 30 1.39460395230104101e-07\n20 11 31 4.77322928550775350e-09\n20 11 32 7.45908134657807632e-11\n20 12 7 2.02045776224211043e-07\n20 12 8 -3.22641231106026047e-06\n20 12 9 2.67010955758118129e-05\n20 12 10 -1.50851908166068846e-04\n20 12 11 6.44810955677708239e-04\n20 12 12 -2.18167452224666921e-03\n20 12 13 5.92479503836302941e-03\n20 12 14 -1.27423913698837926e-02\n20 12 15 2.05134302026918670e-02\n20 12 16 -2.04693374175973585e-02\n20 12 17 -1.51001562847387637e-04\n20 12 18 3.81314679110460332e-02\n20 12 19 -5.03783828068757040e-02\n20 12 20 -5.29655412130789485e-03\n20 12 21 5.12185399849186649e-02\n20 12 22 2.27346429762491073e-02\n20 12 23 -1.38870000800275405e-02\n20 12 24 -1.85178104346727818e-02\n20 12 25 -9.55623380496962122e-03\n20 12 26 -3.05971588287737428e-03\n20 12 27 -6.77088925044633791e-04\n20 12 28 -1.07425002162067853e-04\n20 12 29 -1.22842149551011548e-05\n20 12 30 -9.93675231180338812e-07\n20 12 31 -5.41538267278466508e-08\n20 12 32 -1.78862487284365136e-09\n20 12 33 -2.71034880921899587e-11\n20 13 6 3.75910413432609315e-07\n20 13 7 -5.24930324812538107e-06\n20 13 8 3.84163825688690781e-05\n20 13 9 -1.94163685300227796e-04\n20 13 10 7.51696861309671145e-04\n20 13 11 -2.33575295743837009e-03\n20 13 12 5.92479503836302941e-03\n20 13 13 -1.21800633622373598e-02\n20 13 14 1.94804473477909548e-02\n20 13 15 -2.13263237658665284e-02\n20 13 16 7.39496627447402391e-03\n20 13 17 2.47982092475521323e-02\n20 13 18 -5.10165978586880150e-02\n20 13 19 2.80628684531532878e-02\n20 13 20 3.55561091202258437e-02\n20 13 21 -3.62134830803582948e-02\n20 13 22 -4.07858251586940169e-02\n20 13 23 -6.18739160107662869e-04\n20 13 24 1.85372543182295479e-02\n20 13 25 1.41432273206090047e-02\n20 13 26 5.94313691125144487e-03\n20 13 27 1.67926805073299846e-03\n20 13 28 3.39927695540754291e-04\n20 13 29 5.03559232377464425e-05\n20 13 30 5.44836575258868094e-06\n20 13 31 4.20893846114813653e-07\n20 13 32 2.20565446047710931e-08\n20 13 33 7.04169276570166011e-10\n20 13 34 1.03565504675611266e-11\n20 14 5 8.79624301078733988e-07\n20 14 6 -1.05187767482678294e-05\n20 14 7 6.67817330230704535e-05\n20 14 8 -2.96583147223887844e-04\n20 14 9 1.02196622505024841e-03\n20 14 10 -2.86443036389707325e-03\n20 14 11 6.65125402033677820e-03\n20 14 12 -1.27423913698837926e-02\n20 14 13 1.94804473477909548e-02\n20 14 14 -2.14468429647757023e-02\n20 14 15 1.03830131654259592e-02\n20 14 16 1.70294494144335905e-02\n20 14 17 -4.59209245929747587e-02\n20 14 18 4.24580861418729631e-02\n20 14 19 8.20220635895157801e-03\n20 14 20 -4.94759387943531261e-02\n20 14 21 5.52362834428023331e-03\n20 14 22 4.71456795731434783e-02\n20 14 23 2.06682699701919544e-02\n20 14 24 -1.16667749502425849e-02\n20 14 25 -1.74699935121631077e-02\n20 14 26 -1.00372227355495627e-02\n20 14 27 -3.63955337899810872e-03\n20 14 28 -9.30634599502655271e-04\n20 14 29 -1.74711918228058845e-04\n20 14 30 -2.43679380232544021e-05\n20 14 31 -2.50798315097884968e-06\n20 14 32 -1.85673877005726008e-07\n20 14 33 -9.37735508968406504e-09\n20 14 34 -2.89798415680160478e-10\n20 14 35 -4.14039987820072630e-12\n20 15 4 2.65069322175965977e-06\n20 15 5 -2.63740645527453330e-05\n20 15 6 1.41587733418785763e-04\n20 15 7 -5.39912398183883684e-04\n20 15 8 1.62073615094543152e-03\n20 15 9 -4.01289068918621596e-03\n20 15 10 8.34567026514940928e-03\n20 15 11 -1.45278630422162616e-02\n20 15 12 2.05134302026918670e-02\n20 15 13 -2.13263237658665284e-02\n20 15 14 1.03830131654259592e-02\n20 15 15 1.45593635060050755e-02\n20 15 16 -4.23230623719446289e-02\n20 15 17 4.69232893306852152e-02\n20 15 18 -9.93013390298950524e-03\n20 15 19 -4.05406152872042207e-02\n20 15 20 3.58931825428914799e-02\n20 15 21 2.86621982704965144e-02\n20 15 22 -3.39926843608880746e-02\n20 15 23 -3.86896134267707089e-02\n20 15 24 -3.52858141923548335e-03\n20 15 25 1.63637216694894286e-02\n20 15 26 1.44220783571831197e-02\n20 15 27 6.87509912713146308e-03\n20 15 28 2.22289478406397829e-03\n20 15 29 5.22945073574350350e-04\n20 15 30 9.19445346149566204e-05\n20 15 31 1.21499164616116034e-05\n20 15 32 1.19448065684298273e-06\n20 15 33 8.49867343607027266e-08\n20 15 34 4.14454014839189530e-09\n20 15 35 1.24142970502210578e-10\n20 15 36 1.72437424862398237e-12\n20 16 3 1.06813712414606792e-05\n20 16 4 -8.47807558981866166e-05\n20 16 5 3.71117649353193883e-04\n20 16 6 -1.17732041665495086e-03\n20 16 7 2.99317492231356658e-03\n20 16 8 -6.37653814655598927e-03\n20 16 9 1.15690799461006121e-02\n20 16 10 -1.77730417112419695e-02\n20 16 11 2.23110106519602211e-02\n20 16 12 -2.04693374175973585e-02\n20 16 13 7.39496627447402391e-03\n20 16 14 1.70294494144335905e-02\n20 16 15 -4.23230623719446289e-02\n20 16 16 4.77672371882550992e-02\n20 16 17 -1.79802512043647375e-02\n20 16 18 -3.05482506668303739e-02\n20 16 19 4.58201337966290903e-02\n20 16 20 1.48228744225735452e-03\n20 16 21 -4.61655764711342693e-02\n20 16 22 2.54394680864576758e-03\n20 16 23 4.33370127123604479e-02\n20 16 24 2.38104378790314819e-02\n20 16 25 -7.50584271055712458e-03\n20 16 26 -1.67011765711759529e-02\n20 16 27 -1.11563518654761682e-02\n20 16 28 -4.63165592978860741e-03\n20 16 29 -1.36335994623312101e-03\n20 16 30 -2.98532088579616517e-04\n20 16 31 -4.95165780081726194e-05\n20 16 32 -6.22960774456538698e-06\n20 16 33 -5.86979294310997489e-07\n20 16 34 -4.02309575322547849e-08\n20 16 35 -1.89756548074395327e-09\n20 16 36 -5.51530260271530959e-11\n20 16 37 -7.45379224367740964e-13\n20 17 2 6.13598062475005479e-05\n20 17 3 -3.63009509235747507e-04\n20 17 4 1.22468971320604513e-03\n20 17 5 -3.08437874471331122e-03\n20 17 6 6.38033293050123680e-03\n20 17 7 -1.12792133373904167e-02\n20 17 8 1.72289688713578761e-02\n20 17 9 -2.24448725642405219e-02\n20 17 10 2.36856184904595174e-02\n20 17 11 -1.69636403843451284e-02\n20 17 12 -1.51001562847387637e-04\n20 17 13 2.47982092475521323e-02\n20 17 14 -4.59209245929747587e-02\n20 17 15 4.69232893306852152e-02\n20 17 16 -1.79802512043647375e-02\n20 17 17 -2.67582364311615494e-02\n20 17 18 4.74226207973460835e-02\n20 17 19 -1.44867289216359179e-02\n20 17 20 -3.81703594236403911e-02\n20 17 21 3.12209515616961328e-02\n20 17 22 3.15733528168672712e-02\n20 17 23 -2.61278576473273000e-02\n20 17 24 -3.95425441138766593e-02\n20 17 25 -9.71720115900297788e-03\n20 17 26 1.32082289517066467e-02\n20 17 27 1.50067011143357487e-02\n20 17 28 8.33462225310542610e-03\n20 17 29 3.10087916942003159e-03\n20 17 30 8.42894168266096396e-04\n20 17 31 1.73263165454059812e-04\n20 17 32 2.72644314268927452e-05\n20 17 33 3.27836627162450065e-06\n20 17 34 2.96876854404462144e-07\n20 17 35 1.96401640265119628e-08\n20 17 36 8.97261226742226437e-10\n20 17 37 2.53319297977376502e-11\n20 17 38 3.33343722940467300e-13\n20 18 1 5.70129133935835944e-04\n20 18 2 -2.20810064092115045e-03\n20 18 3 5.19060009126920127e-03\n20 18 4 -9.59934693079492249e-03\n20 18 5 1.51639791396592538e-02\n20 18 6 -2.10315266573374086e-02\n20 18 7 2.55532824944172600e-02\n20 18 8 -2.62756453402000966e-02\n20 18 9 2.04233009283702950e-02\n20 18 10 -6.16032012992337180e-03\n20 18 11 -1.53854991005107176e-02\n20 18 12 3.81314679110460332e-02\n20 18 13 -5.10165978586880150e-02\n20 18 14 4.24580861418729631e-02\n20 18 15 -9.93013390298950524e-03\n20 18 16 -3.05482506668303739e-02\n20 18 17 4.74226207973460835e-02\n20 18 18 -1.93122091427411726e-02\n20 18 19 -3.07580147519494613e-02\n20 18 20 4.13647286963347782e-02\n20 18 21 9.66006224794059908e-03\n20 18 22 -4.32922682453214066e-02\n20 18 23 -8.46938938865252804e-03\n20 18 24 3.78097305213959192e-02\n20 18 25 2.96599253878087294e-02\n20 18 26 -9.56162498334475978e-04\n20 18 27 -1.52599999714024538e-02\n20 18 28 -1.26250889432785053e-02\n20 18 29 -6.10999988863962293e-03\n20 18 30 -2.07559682767845467e-03\n20 18 31 -5.26396785024796369e-04\n20 18 32 -1.02243466159756910e-04\n20 18 33 -1.53318862379464337e-05\n20 18 34 -1.76762526249195731e-06\n20 18 35 -1.54196965710624133e-07\n20 18 36 -9.86331963617010803e-09\n20 18 37 -4.37008280160121611e-10\n20 18 38 -1.19957433584932650e-11\n20 18 39 -1.53804222096284840e-13\n20 19 0 1.25039080820088837e-02\n20 19 1 -2.16574040912104985e-02\n20 19 2 2.78014261075080770e-02\n20 19 3 -3.21465301303418501e-02\n20 19 4 3.43444866865988822e-02\n20 19 5 -3.34164230610123120e-02\n20 19 6 2.80773198219120329e-02\n20 19 7 -1.71996152100208730e-02\n20 19 8 5.67578628158549753e-04\n20 19 9 2.01294128742978598e-02\n20 19 10 -4.04301732636948836e-02\n20 19 11 5.31474740714615269e-02\n20 19 12 -5.03783828068757040e-02\n20 19 13 2.80628684531532878e-02\n20 19 14 8.20220635895157801e-03\n20 19 15 -4.05406152872042207e-02\n20 19 16 4.58201337966290903e-02\n20 19 17 -1.44867289216359179e-02\n20 19 18 -3.07580147519494613e-02\n20 19 19 4.33152215777248648e-02\n20 19 20 -2.33389543911580935e-03\n20 19 21 -4.18516107391405234e-02\n20 19 22 1.79910179816617191e-02\n20 19 23 3.81075793645371079e-02\n20 19 24 -1.24986927791091245e-02\n20 19 25 -3.96872632571194403e-02\n20 19 26 -1.84651316284395625e-02\n20 19 27 7.94834752183486274e-03\n20 19 28 1.51487576697041743e-02\n20 19 29 1.02289824539658224e-02\n20 19 30 4.43606014806495002e-03\n20 19 31 1.39406755987437841e-03\n20 19 32 3.32432851259484461e-04\n20 19 33 6.13268984753956937e-05\n20 19 34 8.79547378926469833e-06\n20 19 35 9.74861342422374279e-07\n20 19 36 8.20841896134705436e-08\n20 19 37 5.08440020148848851e-09\n20 19 38 2.18724344659096841e-10\n20 19 39 5.84253634940256933e-12\n20 19 40 7.30374106381481257e-14\n20 20 1 -1.03282695740541282e-03\n20 20 2 4.00012160554524096e-03\n20 20 3 -9.42337571508444166e-03\n20 20 4 1.75506454576222018e-02\n20 20 5 -2.81758717050508919e-02\n20 20 6 4.03505318128185647e-02\n20 20 7 -5.20808256851929422e-02\n20 20 8 6.01975104584942391e-02\n20 20 9 -6.07002115954829687e-02\n20 20 10 4.99201070067906002e-02\n20 20 11 -2.66440312346645032e-02\n20 20 12 -5.29655412130789485e-03\n20 20 13 3.55561091202258437e-02\n20 20 14 -4.94759387943531261e-02\n20 20 15 3.58931825428914799e-02\n20 20 16 1.48228744225735452e-03\n20 20 17 -3.81703594236403911e-02\n20 20 18 4.13647286963347782e-02\n20 20 19 -2.33389543911580935e-03\n20 20 20 -3.96294491099079725e-02\n20 20 21 2.87461064081732739e-02\n20 20 22 2.56070050622655328e-02\n20 20 23 -3.49732008735958368e-02\n20 20 24 -2.36984586093824151e-02\n20 20 25 2.70177233084082024e-02\n20 20 26 3.54050805341776324e-02\n20 20 27 8.43112926359091738e-03\n20 20 28 -1.19132238063701297e-02\n20 20 29 -1.39206427391543494e-02\n20 20 30 -8.10381557766695718e-03\n20 20 31 -3.20784164910813209e-03\n20 20 32 -9.41594119638997982e-04\n20 20 33 -2.12401229968679552e-04\n20 20 34 -3.73710459728982177e-05\n20 20 35 -5.14165253712393323e-06\n20 20 36 -5.49107665477779599e-07\n20 20 37 -4.47049472688461908e-08\n20 20 38 -2.68502737382194159e-09\n20 20 39 -1.12265884039528778e-10\n20 20 40 -2.92058331519715960e-12\n20 20 41 -3.56195184812058645e-14\n21 0 20 1.19081377057385231e-02\n21 0 22 -1.13665723245078916e-02\n21 1 19 5.15798700533918980e-04\n21 1 20 -2.06254995298658067e-02\n21 1 21 -9.38780925511586609e-04\n21 1 22 1.96874807739539444e-02\n21 1 23 4.28089879885002246e-04\n21 2 18 5.25887330004371020e-05\n21 2 19 -1.99767977716329488e-03\n21 2 20 2.64908545985599318e-02\n21 2 21 3.63588289024356048e-03\n21 2 22 -2.52977216656232270e-02\n21 2 23 -1.65798497547454716e-03\n21 2 24 -3.45488520501759623e-05\n21 3 17 8.64553444894368307e-06\n21 3 18 -3.11119140122709551e-04\n21 3 19 4.69898054541871306e-03\n21 3 20 -3.06981255383903736e-02\n21 3 21 -8.56886443805465317e-03\n21 3 22 2.93708451849657371e-02\n21 3 23 3.90397889831392226e-03\n21 3 24 2.04393765143345732e-04\n21 3 25 4.08869312328179232e-06\n21 4 16 2.01916183206441948e-06\n21 4 17 -6.86218023094404967e-05\n21 4 18 1.05048837110010362e-03\n21 4 19 -8.70853603043763533e-03\n21 4 20 3.29886720695590629e-02\n21 4 21 1.59807326387502828e-02\n21 4 22 -3.17205131939707504e-02\n21 4 23 -7.25972235640744918e-03\n21 4 24 -6.91402930881072238e-04\n21 4 25 -3.24529955743907333e-05\n21 4 26 -6.24211503136521666e-07\n21 5 15 6.28131985108257035e-07\n21 5 16 -2.00904065638928410e-05\n21 5 17 3.00698327346921189e-04\n21 5 18 -2.65205767838961192e-03\n21 5 19 1.38237240370026437e-02\n21 5 20 -3.25283012534661011e-02\n21 5 21 -2.57338551729249666e-02\n21 5 22 3.16329292549175789e-02\n21 5 23 1.16133653036061437e-02\n21 5 24 1.75494941594549838e-03\n21 5 25 1.42620958812545515e-04\n21 5 26 6.21082603718278556e-06\n21 5 27 1.15035023474503759e-07\n21 6 14 2.50518084028587584e-07\n21 6 15 -7.51136605900642205e-06\n21 6 16 1.07997335694283371e-04\n21 6 17 -9.56688450453571514e-04\n21 6 18 5.51431682302940478e-03\n21 6 19 -1.93590777689263588e-02\n21 6 20 2.81844314287955732e-02\n21 6 21 3.70699266766925328e-02\n21 6 22 -2.81078432732072040e-02\n21 6 23 -1.65131035780082075e-02\n21 6 24 -3.69071690522543194e-03\n21 6 25 -4.57381923995579517e-04\n21 6 26 -3.35288467281432714e-05\n21 6 27 -1.37561880529690609e-06\n21 6 28 -2.45685390132601989e-08\n21 7 13 1.25018851875715106e-07\n21 7 14 -3.49829466068027517e-06\n21 7 15 4.77680016216692547e-05\n21 7 16 -4.13275498878827137e-04\n21 7 17 2.44656958999659206e-03\n21 7 18 -9.84223622521004276e-03\n21 7 19 2.39579590606612348e-02\n21 7 20 -1.88958142069166354e-02\n21 7 21 -4.83470048052505301e-02\n21 7 22 2.01573394633818442e-02\n21 7 23 2.10222735189370939e-02\n21 7 24 6.72663653414179770e-03\n21 7 25 1.18850714374717320e-03\n21 7 26 1.29746358240290911e-04\n21 7 27 8.80015207674395776e-06\n21 7 28 3.43080976305867538e-07\n21 7 29 5.91606863255630553e-09\n21 8 12 7.68411241911913126e-08\n21 8 13 -1.99639096814779959e-06\n21 8 14 2.56557312995734247e-05\n21 8 15 -2.13060969890012419e-04\n21 8 16 1.24922403183883201e-03\n21 8 17 -5.26728926785542595e-03\n21 8 18 1.52915332499375633e-02\n21 8 19 -2.55464292567077414e-02\n21 8 20 4.27558052995041704e-03\n21 8 21 5.68949538852208451e-02\n21 8 22 -7.29213230627865981e-03\n21 8 23 -2.36443373507314091e-02\n21 8 24 -1.08360845366809750e-02\n21 8 25 -2.63193018477458314e-03\n21 8 26 -4.00785969338551919e-04\n21 8 27 -3.98500210290187380e-05\n21 8 28 -2.53627988288164684e-06\n21 8 29 -9.44720400785583855e-08\n21 8 30 -1.57475273215724769e-09\n21 9 11 5.75918525718781650e-08\n21 9 12 -1.38100411025096012e-06\n21 9 13 1.65655598285445408e-05\n21 9 14 -1.30365091202553386e-04\n21 9 15 7.40329016026704176e-04\n21 9 16 -3.13086933867849756e-03\n21 9 17 9.72981031755951526e-03\n21 9 18 -2.05329163271403657e-02\n21 9 19 2.16507569956047816e-02\n21 9 20 1.45679875814298081e-02\n21 9 21 -5.92221465906605535e-02\n21 9 22 -9.79895586194197536e-03\n21 9 23 2.24513611638654706e-02\n21 9 24 1.54792135294649568e-02\n21 9 25 5.09482065407629742e-03\n21 9 26 1.04257358270705398e-03\n21 9 27 1.42502016774938186e-04\n21 9 28 1.31480396728418058e-05\n21 9 29 7.92209101901046455e-07\n21 9 30 2.83017722427776483e-08\n21 9 31 4.56539584727460838e-10\n21 10 10 5.23448465843325039e-08\n21 10 11 -1.15039635412396839e-06\n21 10 12 1.27736529995533680e-05\n21 10 13 -9.42179177460143975e-05\n21 10 14 5.09898896088483689e-04\n21 10 15 -2.10525519433953840e-03\n21 10 16 6.64481530103163900e-03\n21 10 17 -1.54113901222861793e-02\n21 10 18 2.29796410541336820e-02\n21 10 19 -1.03190907634732804e-02\n21 10 20 -3.42369122479384954e-02\n21 10 21 5.18551319278438268e-02\n21 10 22 2.85392382943064543e-02\n21 10 23 -1.55801156236220514e-02\n21 10 24 -1.93529094696033591e-02\n21 10 25 -8.70984261061794814e-03\n21 10 26 -2.35018457810015832e-03\n21 10 27 -4.25321752509496526e-04\n21 10 28 -5.33840698927209134e-05\n21 10 29 -4.62438552631036498e-06\n21 10 30 -2.65379179093074141e-07\n21 10 31 -9.11937106256927320e-09\n21 10 32 -1.42507569858124855e-10\n21 11 9 5.75918525718781650e-08\n21 11 10 -1.15039635412396839e-06\n21 11 11 1.17182663220125699e-05\n21 11 12 -8.01645028627204461e-05\n21 11 13 4.07897020541353666e-04\n21 11 14 -1.61254934654718495e-03\n21 11 15 5.00661064369084358e-03\n21 11 16 -1.19642121568614615e-02\n21 11 17 2.04421320116779963e-02\n21 11 18 -1.91492535614458004e-02\n21 11 19 -8.29056437607514428e-03\n21 11 20 4.88415091557985868e-02\n21 11 21 -3.29798097648363363e-02\n21 11 22 -4.41340722227186997e-02\n21 11 23 2.20071254420512384e-03\n21 11 24 2.03367561933369340e-02\n21 11 25 1.31202372209316782e-02\n21 11 26 4.65575607683521426e-03\n21 11 27 1.09248933806600196e-03\n21 11 28 1.79658068443505558e-04\n21 11 29 2.10056087476154453e-05\n21 11 30 1.72199650382098090e-06\n21 11 31 9.45350741308374508e-08\n21 11 32 3.13192605380417725e-09\n21 11 33 4.74588728993489383e-11\n21 12 8 7.68411241911913126e-08\n21 12 9 -1.38100411025096012e-06\n21 12 10 1.27736529995533680e-05\n21 12 11 -8.01645028627204461e-05\n21 12 12 3.78690834434610335e-04\n21 12 13 -1.41067808336101020e-03\n21 12 14 4.21083519419783522e-03\n21 12 15 -9.97713326887327660e-03\n21 12 16 1.79200064509414757e-02\n21 12 17 -2.11335674139142738e-02\n21 12 18 6.21792367028354639e-03\n21 12 19 3.01175078554599095e-02\n21 12 20 -5.12185399849186649e-02\n21 12 21 4.62704511331496093e-03\n21 12 22 5.02643423393419764e-02\n21 12 23 1.61743669850235393e-02\n21 12 24 -1.59218911692785789e-02\n21 12 25 -1.71109927516647782e-02\n21 12 26 -8.13040362749160681e-03\n21 12 27 -2.45490488913362271e-03\n21 12 28 -5.17438788316240645e-04\n21 12 29 -7.86450739526256969e-05\n21 12 30 -8.64909814783827736e-06\n21 12 31 -6.74863512034453694e-07\n21 12 32 -3.55624345428497443e-08\n21 12 33 -1.13802379355794681e-09\n21 12 34 -1.67374539665731080e-11\n21 13 7 1.25018851875715106e-07\n21 13 8 -1.99639096814779959e-06\n21 13 9 1.65655598285445408e-05\n21 13 10 -9.42179177460143975e-05\n21 13 11 4.07897020541353666e-04\n21 13 12 -1.41067808336101020e-03\n21 13 13 3.97291676963851346e-03\n21 13 14 -9.08262656198492835e-03\n21 13 15 1.63321493082185088e-02\n21 13 16 -2.10145110270019949e-02\n21 13 17 1.29383022061881759e-02\n21 13 18 1.51086354367698280e-02\n21 13 19 -4.65131122415944972e-02\n21 13 20 3.62134830803582948e-02\n21 13 21 2.56468645757017869e-02\n21 13 22 -4.14134787288775195e-02\n21 13 23 -3.46314050796263907e-02\n21 13 24 4.38487485307754016e-03\n21 13 25 1.84273857915352834e-02\n21 13 26 1.24138125421076825e-02\n21 13 27 4.85599556386907140e-03\n21 13 28 1.29853632959237321e-03\n21 13 29 2.50831462639919452e-04\n21 13 30 3.56419482091897504e-05\n21 13 31 3.71281682368820841e-06\n21 13 32 2.76939215958356991e-07\n21 13 33 1.40457100318707409e-08\n21 13 34 4.34851809891747905e-10\n21 13 35 6.21280270454707475e-12\n21 14 6 2.50518084028587584e-07\n21 14 7 -3.49829466068027517e-06\n21 14 8 2.56557312995734247e-05\n21 14 9 -1.30365091202553386e-04\n21 14 10 5.09898896088483689e-04\n21 14 11 -1.61254934654718495e-03\n21 14 12 4.21083519419783522e-03\n21 14 13 -9.08262656198492835e-03\n21 14 14 1.58043764430217728e-02\n21 14 15 -2.06542266618490905e-02\n21 14 16 1.56648288511350857e-02\n21 14 17 6.28916155681816923e-03\n21 14 18 -3.76264983040744076e-02\n21 14 19 4.66493043959222883e-02\n21 14 20 -5.52362834428023331e-03\n21 14 21 -4.54943054968806874e-02\n21 14 22 1.67503022009847818e-02\n21 14 23 4.51751706868011845e-02\n21 14 24 1.33595621201215287e-02\n21 14 25 -1.42022257056481291e-02\n21 14 26 -1.61579063303668255e-02\n21 14 27 -8.42884461078564980e-03\n21 14 28 -2.86310262253133318e-03\n21 14 29 -6.94651549921602822e-04\n21 14 30 -1.24635716636943644e-04\n21 14 31 -1.66939395183112505e-05\n21 14 32 -1.65586552914384519e-06\n21 14 33 -1.18474618023893659e-07\n21 14 34 -5.79600609333311768e-09\n21 14 35 -1.73847497422097770e-10\n21 14 36 -2.41478149370569066e-12\n21 15 5 6.28131985108257035e-07\n21 15 6 -7.51136605900642205e-06\n21 15 7 4.77680016216692547e-05\n21 15 8 -2.13060969890012419e-04\n21 15 9 7.40329016026704176e-04\n21 15 10 -2.10525519433953840e-03\n21 15 11 5.00661064369084358e-03\n21 15 12 -9.97713326887327660e-03\n21 15 13 1.63321493082185088e-02\n21 15 14 -2.06542266618490905e-02\n21 15 15 1.63805831976078704e-02\n21 15 16 2.39320977969610689e-03\n21 15 17 -3.13066861947450371e-02\n21 15 18 4.77697624796766224e-02\n21 15 19 -2.42823843731283572e-02\n21 15 20 -2.86621982704965144e-02\n21 15 21 4.28426825506648921e-02\n21 15 22 1.60870365174119683e-02\n21 15 23 -3.96818530588509326e-02\n21 15 24 -3.20447543668433436e-02\n21 15 25 2.41395495268573987e-03\n21 15 26 1.68112693204569954e-02\n21 15 27 1.26432484686069806e-02\n21 15 28 5.54591008351905237e-03\n21 15 29 1.68679046330049178e-03\n21 15 30 3.77297655933327942e-04\n21 15 31 6.34844279145616845e-05\n21 15 32 8.06480709676006496e-06\n21 15 33 7.64828543243519393e-07\n21 15 34 5.26362962146867845e-08\n21 15 35 2.48852701935290749e-09\n21 15 36 7.24031872671831651e-11\n21 15 37 9.78510799033867853e-13\n21 16 4 2.01916183206441948e-06\n21 16 5 -2.00904065638928410e-05\n21 16 6 1.07997335694283371e-04\n21 16 7 -4.13275498878827137e-04\n21 16 8 1.24922403183883201e-03\n21 16 9 -3.13086933867849756e-03\n21 16 10 6.64481530103163900e-03\n21 16 11 -1.19642121568614615e-02\n21 16 12 1.79200064509414757e-02\n21 16 13 -2.10145110270019949e-02\n21 16 14 1.56648288511350857e-02\n21 16 15 2.39320977969610689e-03\n21 16 16 -2.91337792280311072e-02\n21 16 17 4.69142398041614040e-02\n21 16 18 -3.27577404999298363e-02\n21 16 19 -1.33845669079951264e-02\n21 16 20 4.61655764711342693e-02\n21 16 21 -1.50001680495578869e-02\n21 16 22 -4.08807579718219871e-02\n21 16 23 1.56445625606445940e-02\n21 16 24 4.22430332080368933e-02\n21 16 25 1.56949227096673187e-02\n21 16 26 -1.12314001234150399e-02\n21 16 27 -1.57824001626244289e-02\n21 16 28 -9.34619150074209115e-03\n21 16 29 -3.59862918960808696e-03\n21 16 30 -9.99506420977254656e-04\n21 16 31 -2.08441629769360484e-04\n21 16 32 -3.31262727583806774e-05\n21 16 33 -4.01036927656407442e-06\n21 16 34 -3.64828085681831368e-07\n21 16 35 -2.42062925503928773e-08\n21 16 36 -1.10773143926368704e-09\n21 16 37 -3.12970526033026660e-11\n21 16 38 -4.11838976151760793e-13\n21 17 3 8.64553444894368307e-06\n21 17 4 -6.86218023094404967e-05\n21 17 5 3.00698327346921189e-04\n21 17 6 -9.56688450453571514e-04\n21 17 7 2.44656958999659206e-03\n21 17 8 -5.26728926785542595e-03\n21 17 9 9.72981031755951526e-03\n21 17 10 -1.54113901222861793e-02\n21 17 11 2.04421320116779963e-02\n21 17 12 -2.11335674139142738e-02\n21 17 13 1.29383022061881759e-02\n21 17 14 6.28916155681816923e-03\n21 17 15 -3.13066861947450371e-02\n21 17 16 4.69142398041614040e-02\n21 17 17 -3.50678505760433465e-02\n21 17 18 -5.52224735956712364e-03\n21 17 19 4.27415806362732674e-02\n21 17 20 -3.12209515616961328e-02\n21 17 21 -2.34278361531037567e-02\n21 17 22 4.02435499953663014e-02\n21 17 23 1.79616542510675636e-02\n21 17 24 -3.44585627738867152e-02\n21 17 25 -3.34953979761628593e-02\n21 17 26 -2.33102344464136297e-03\n21 17 27 1.48310534365736445e-02\n21 17 28 1.33634697811376773e-02\n21 17 29 6.70334013379055220e-03\n21 17 30 2.32525317978431570e-03\n21 17 31 5.97813678990145550e-04\n21 17 32 1.17204268530194043e-04\n21 17 33 1.76899460493032859e-05\n21 17 34 2.04870965202918667e-06\n21 17 35 1.79264916689377252e-07\n21 17 36 1.14894641410390214e-08\n21 17 37 5.09639506955132320e-10\n21 17 38 1.39964674232743041e-11\n21 17 39 1.79456638892538815e-13\n21 18 2 5.25887330004371020e-05\n21 18 3 -3.11119140122709551e-04\n21 18 4 1.05048837110010362e-03\n21 18 5 -2.65205767838961192e-03\n21 18 6 5.51431682302940478e-03\n21 18 7 -9.84223622521004276e-03\n21 18 8 1.52915332499375633e-02\n21 18 9 -2.05329163271403657e-02\n21 18 10 2.29796410541336820e-02\n21 18 11 -1.91492535614458004e-02\n21 18 12 6.21792367028354639e-03\n21 18 13 1.51086354367698280e-02\n21 18 14 -3.76264983040744076e-02\n21 18 15 4.77697624796766224e-02\n21 18 16 -3.27577404999298363e-02\n21 18 17 -5.52224735956712364e-03\n21 18 18 4.08719836912600157e-02\n21 18 19 -3.70379566717087658e-02\n21 18 20 -9.66006224794059908e-03\n21 18 21 4.37971403000408373e-02\n21 18 22 -1.00669050773736431e-02\n21 18 23 -4.07641929514034260e-02\n21 18 24 7.14884000850300920e-03\n21 18 25 3.98110225894970802e-02\n21 18 26 2.11770829640459807e-02\n21 18 27 -6.56901917000637342e-03\n21 18 28 -1.52688130577952956e-02\n21 18 29 -1.07082835633072630e-02\n21 18 30 -4.73233218235769966e-03\n21 18 31 -1.50460481646880366e-03\n21 18 32 -3.61611547592803406e-04\n21 18 33 -6.70744307982264510e-05\n21 18 34 -9.65680357877577614e-06\n21 18 35 -1.07321134712310316e-06\n21 18 36 -9.05316015340577948e-08\n21 18 37 -5.61433411227636496e-09\n21 18 38 -2.41689210033899151e-10\n21 18 39 -6.45794606583054099e-12\n21 18 40 -8.07306331499861951e-14\n21 19 1 5.15798700533918980e-04\n21 19 2 -1.99767977716329488e-03\n21 19 3 4.69898054541871306e-03\n21 19 4 -8.70853603043763533e-03\n21 19 5 1.38237240370026437e-02\n21 19 6 -1.93590777689263588e-02\n21 19 7 2.39579590606612348e-02\n21 19 8 -2.55464292567077414e-02\n21 19 9 2.16507569956047816e-02\n21 19 10 -1.03190907634732804e-02\n21 19 11 -8.29056437607514428e-03\n21 19 12 3.01175078554599095e-02\n21 19 13 -4.65131122415944972e-02\n21 19 14 4.66493043959222883e-02\n21 19 15 -2.42823843731283572e-02\n21 19 16 -1.33845669079951264e-02\n21 19 17 4.27415806362732674e-02\n21 19 18 -3.70379566717087658e-02\n21 19 19 -4.93083458561302132e-03\n21 19 20 4.18516107391405234e-02\n21 19 21 -2.46842340128726084e-02\n21 19 22 -2.90115520075724497e-02\n21 19 23 3.29342647055105887e-02\n21 19 24 2.61450627220952263e-02\n21 19 25 -2.53169133776402450e-02\n21 19 26 -3.61704310431622331e-02\n21 19 27 -9.60320925483762807e-03\n21 19 28 1.15487736485512576e-02\n21 19 29 1.40812332763331516e-02\n21 19 30 8.31305934080168210e-03\n21 19 31 3.31622620226851158e-03\n21 19 32 9.78269599297261435e-04\n21 19 33 2.21430674049267162e-04\n21 19 34 3.90539957403041693e-05\n21 19 35 5.38244705751971853e-06\n21 19 36 5.75521504812617858e-07\n21 19 37 4.68945054441064547e-08\n21 19 38 2.81806711293267020e-09\n21 19 39 1.17866019274623068e-10\n21 19 40 3.06670163055602931e-12\n21 19 41 3.74015816763510355e-14\n21 20 0 1.19081377057385231e-02\n21 20 1 -2.06254995298658067e-02\n21 20 2 2.64908545985599318e-02\n21 20 3 -3.06981255383903736e-02\n21 20 4 3.29886720695590629e-02\n21 20 5 -3.25283012534661011e-02\n21 20 6 2.81844314287955732e-02\n21 20 7 -1.88958142069166354e-02\n21 20 8 4.27558052995041704e-03\n21 20 9 1.45679875814298081e-02\n21 20 10 -3.42369122479384954e-02\n21 20 11 4.88415091557985868e-02\n21 20 12 -5.12185399849186649e-02\n21 20 13 3.62134830803582948e-02\n21 20 14 -5.52362834428023331e-03\n21 20 15 -2.86621982704965144e-02\n21 20 16 4.61655764711342693e-02\n21 20 17 -3.12209515616961328e-02\n21 20 18 -9.66006224794059908e-03\n21 20 19 4.18516107391405234e-02\n21 20 20 -2.87461064081732739e-02\n21 20 21 -2.01264147605462347e-02\n21 20 22 4.04782023752388496e-02\n21 20 23 4.09985752591109328e-03\n21 20 24 -4.01685008595602141e-02\n21 20 25 -6.82579774988082526e-03\n21 20 26 3.46519976119238879e-02\n21 20 27 2.81220019470222598e-02\n21 20 28 4.95010487778785906e-04\n21 20 29 -1.36945470218188176e-02\n21 20 30 -1.22283187336756706e-02\n21 20 31 -6.33483136342636193e-03\n21 20 32 -2.31872927739782730e-03\n21 20 33 -6.40412210899250917e-04\n21 20 34 -1.37317072795627613e-04\n21 20 35 -2.31219400637711697e-05\n21 20 36 -3.05955899878002706e-06\n21 20 37 -3.15451040773177163e-07\n21 20 38 -2.48697287898548540e-08\n21 20 39 -1.45009475938131277e-09\n21 20 40 -5.89859355917996358e-11\n21 20 41 -1.49559567421028578e-12\n21 20 42 -1.78059722130432468e-14\n21 21 1 -9.38780925511586609e-04\n21 21 2 3.63588289024356048e-03\n21 21 3 -8.56886443805465317e-03\n21 21 4 1.59807326387502828e-02\n21 21 5 -2.57338551729249666e-02\n21 21 6 3.70699266766925328e-02\n21 21 7 -4.83470048052505301e-02\n21 21 8 5.68949538852208451e-02\n21 21 9 -5.92221465906605535e-02\n21 21 10 5.18551319278438268e-02\n21 21 11 -3.29798097648363363e-02\n21 21 12 4.62704511331496093e-03\n21 21 13 2.56468645757017869e-02\n21 21 14 -4.54943054968806874e-02\n21 21 15 4.28426825506648921e-02\n21 21 16 -1.50001680495578869e-02\n21 21 17 -2.34278361531037567e-02\n21 21 18 4.37971403000408373e-02\n21 21 19 -2.46842340128726084e-02\n21 21 20 -2.01264147605462347e-02\n21 21 21 4.14642177900629834e-02\n21 21 22 -7.50874991192265461e-03\n21 21 23 -3.75197341430880970e-02\n21 21 24 1.81327855785999362e-02\n21 21 25 3.51405849576428060e-02\n21 21 26 -1.05972378892005810e-02\n21 21 27 -3.66609855292901171e-02\n21 21 28 -1.88777236398727799e-02\n21 21 29 5.86873194520082983e-03\n21 21 30 1.40230837583878225e-02\n21 21 31 1.02431471474373443e-02\n21 21 32 4.77630863964884476e-03\n21 21 33 1.62301640006625392e-03\n21 21 34 4.22616592713834198e-04\n21 21 35 8.62426179877483897e-05\n21 21 36 1.39105852601948835e-05\n21 21 37 1.77167228611192135e-06\n21 21 38 1.76472268826925077e-07\n21 21 39 1.34814981683337658e-08\n21 21 40 7.63597650546046123e-10\n21 21 41 3.02363616057991523e-11\n21 21 42 7.47638827037688749e-13\n21 21 43 8.69406250722598298e-15\n22 0 21 1.13665723245078916e-02\n22 0 23 -1.08721345508907033e-02\n22 1 20 4.68882464270646414e-04\n22 1 21 -1.96874807739539444e-02\n22 1 22 -8.57026624230023401e-04\n22 1 23 1.88310894288677357e-02\n22 1 24 3.92399528491126331e-04\n22 2 19 4.54135433366667991e-05\n22 2 20 -1.81597397544890774e-03\n22 2 21 2.52977216656232270e-02\n22 2 22 3.31924984289924250e-03\n22 2 23 -2.42069887804605900e-02\n22 2 24 -1.51975683890577508e-03\n22 2 25 -3.04012176297874469e-05\n22 3 18 7.07271641548696628e-06\n22 3 19 -2.68670145612972730e-04\n22 3 20 4.27393425864552323e-03\n22 3 21 -2.93708451849657371e-02\n22 3 22 -7.82545529150851559e-03\n22 3 23 2.81506199654432778e-02\n22 3 24 3.58000162620397918e-03\n22 3 25 1.79856029001197142e-04\n22 3 26 3.45940953135297140e-06\n22 4 17 1.55998935797667614e-06\n22 4 18 -5.61379461871880780e-05\n22 4 19 9.07798523530045886e-04\n22 4 20 -7.93519747601031833e-03\n22 4 21 3.17205131939707504e-02\n22 4 22 1.46113887801774745e-02\n22 4 23 -3.05343741803592504e-02\n22 4 24 -6.66639254162116771e-03\n22 4 25 -6.08680708732907880e-04\n22 4 26 -2.74582119092593950e-05\n22 4 27 -5.08572617014130909e-07\n22 5 16 4.56718118474512105e-07\n22 5 17 -1.55216981320681449e-05\n22 5 18 2.46214017655629312e-04\n22 5 19 -2.29656423562250706e-03\n22 5 20 1.26485541516770957e-02\n22 5 21 -3.16329292549175789e-02\n22 5 22 -2.35908472588602050e-02\n22 5 23 3.07452854296809010e-02\n22 5 24 1.06974347971664184e-02\n22 5 25 1.54706730014605719e-03\n22 5 26 1.20731659323251498e-04\n22 5 27 5.06023364785496696e-06\n22 5 28 9.03757256841975372e-08\n22 6 15 1.70756971131100615e-07\n22 6 16 -5.46155434681689146e-06\n22 6 17 8.35316146875619573e-05\n22 6 18 -7.85270157976375634e-04\n22 6 19 4.79607979142527607e-03\n22 6 20 -1.78592301584430047e-02\n22 6 21 2.81078432732072040e-02\n22 6 22 3.41545809465757397e-02\n22 6 23 -2.78979375287863403e-02\n22 6 24 -1.53031770275007017e-02\n22 6 25 -3.26273992587994434e-03\n22 6 26 -3.87719425106562696e-04\n22 6 27 -2.73324499909790276e-05\n22 6 28 -1.08073649257864014e-06\n22 6 29 -1.86361579492044400e-08\n22 7 14 7.95272385461242824e-08\n22 7 15 -2.38449133402161227e-06\n22 7 16 3.47811438762245963e-05\n22 7 17 -3.20601726222105125e-04\n22 7 18 2.01817597484523481e-03\n22 7 19 -8.62985189861694172e-03\n22 7 20 2.24434646995631170e-02\n22 7 21 -2.01573394633818442e-02\n22 7 22 -4.49420309162163073e-02\n22 7 23 2.10789942509682842e-02\n22 7 24 1.96983729613106261e-02\n22 7 25 5.97724655801323882e-03\n22 7 26 1.01026318437551238e-03\n22 7 27 1.05919834013742119e-04\n22 7 28 6.91779428839617520e-06\n22 7 29 2.60239783096283510e-07\n22 7 30 4.33793225070720423e-09\n22 8 13 4.53842446548925891e-08\n22 8 14 -1.26994815880290946e-06\n22 8 15 1.75179667683554295e-05\n22 8 16 -1.55696642161473693e-04\n22 8 17 9.74738460315268980e-04\n22 8 18 -4.38349916254294603e-03\n22 8 19 1.35987722849613416e-02\n22 8 20 -2.46426888244879476e-02\n22 8 21 7.29213230627865981e-03\n22 8 22 5.36939787909600545e-02\n22 8 23 -9.74266470675442961e-03\n22 8 24 -2.26046080787632956e-02\n22 8 25 -9.71320040580788820e-03\n22 8 26 -2.24794314111245826e-03\n22 8 27 -3.28086153492643770e-04\n22 8 28 -3.13726704943692723e-05\n22 8 29 -1.92506587199624471e-06\n22 8 30 -6.92712229861004114e-08\n22 8 31 -1.11742314595539311e-09\n22 9 12 3.13945661992204168e-08\n22 9 13 -8.15654756079514523e-07\n22 9 14 1.05607381844705821e-05\n22 9 15 -8.94092733798696445e-05\n22 9 16 5.44765478239137248e-04\n22 9 17 -2.46769878860578115e-03\n22 9 18 8.21838130373179533e-03\n22 9 19 -1.87142174953078292e-02\n22 9 20 2.22686370646441292e-02\n22 9 21 9.79895586194197536e-03\n22 9 22 -5.73672534303673520e-02\n22 9 23 -5.72504575980167550e-03\n22 9 24 2.23263857746725494e-02\n22 9 25 1.40768095308322333e-02\n22 9 26 4.38549174633188362e-03\n22 9 27 8.57424190884484568e-04\n22 9 28 1.12499308935514052e-04\n22 9 29 9.99489246222231983e-06\n22 9 30 5.81266169927040573e-07\n22 9 31 2.00825531080772156e-08\n22 9 32 3.13828203759098474e-10\n22 10 11 2.61521267220005581e-08\n22 10 12 -6.27105968675196076e-07\n22 10 13 7.56506315002862099e-06\n22 10 14 -6.03939438027692361e-05\n22 10 15 3.52653258291252488e-04\n22 10 16 -1.56760834422597466e-03\n22 10 17 5.32499015156525937e-03\n22 10 18 -1.33429058455339357e-02\n22 10 19 2.19165087784495044e-02\n22 10 20 -1.33788358775870673e-02\n22 10 21 -2.85392382943064543e-02\n22 10 22 5.27412472067616975e-02\n22 10 23 2.33816508423427087e-02\n22 10 24 -1.71158418964530671e-02\n22 10 25 -1.80318577635411811e-02\n22 10 26 -7.58961314979512043e-03\n22 10 27 -1.94701574503935972e-03\n22 10 28 -3.37314739758800338e-04\n22 10 29 -4.06961548472682608e-05\n22 10 30 -3.39844559820139958e-06\n22 10 31 -1.88439037281485916e-07\n22 10 32 -6.26871346038325712e-09\n22 10 33 -9.49914111150238367e-11\n22 11 10 2.61521267220005581e-08\n22 11 11 -5.74752114042538378e-07\n22 11 12 6.40989873777586054e-06\n22 11 13 -4.78005418458388388e-05\n22 11 14 2.64166447648642659e-04\n22 11 15 -1.13124675260284275e-03\n22 11 16 3.80056573597242997e-03\n22 11 17 -9.85004851240206525e-03\n22 11 18 1.84699148860147632e-02\n22 11 19 -2.02236388991060762e-02\n22 11 20 -2.48246620797310345e-03\n22 11 21 4.41340722227186997e-02\n22 11 22 -3.76855372977962854e-02\n22 11 23 -3.93412332381980057e-02\n22 11 24 5.92912510470794081e-03\n22 11 25 1.98042847239651088e-02\n22 11 26 1.16549326616983413e-02\n22 11 27 3.90036952567020034e-03\n22 11 28 8.72583647413733642e-04\n22 11 29 1.37585517837644109e-04\n22 11 30 1.54812978292466591e-05\n22 11 31 1.22475307213829172e-06\n22 11 32 6.50305190706545617e-08\n22 11 33 2.08765103253779893e-09\n22 11 34 3.07040707348716997e-11\n22 12 9 3.13945661992204168e-08\n22 12 10 -6.27105968675196076e-07\n22 12 11 6.40989873777586054e-06\n22 12 12 -4.42273789883797263e-05\n22 12 13 2.28714256474037948e-04\n22 12 14 -9.29646982481462508e-04\n22 12 15 3.02284973719830999e-03\n22 12 16 -7.81223236482341359e-03\n22 12 17 1.54357904373210203e-02\n22 12 18 -2.07609282381692635e-02\n22 12 19 1.07651033040602303e-02\n22 12 20 2.27346429762491073e-02\n22 12 21 -5.02643423393419764e-02\n22 12 22 1.29740966611898222e-02\n22 12 23 4.81236915828084921e-02\n22 12 24 1.04825873788589500e-02\n22 12 25 -1.71429248677928260e-02\n22 12 26 -1.56828480663284044e-02\n22 12 27 -6.92702836800674021e-03\n22 12 28 -1.98155122787233664e-03\n22 12 29 -3.99024307682775036e-04\n22 12 30 -5.82283125020003581e-05\n22 12 31 -6.16957071593869821e-06\n22 12 32 -4.65020726027129365e-07\n22 12 33 -2.37224533534187739e-08\n22 12 34 -7.36257751621606178e-10\n22 12 35 -1.05190413066400058e-11\n22 13 8 4.53842446548925891e-08\n22 13 9 -8.15654756079514523e-07\n22 13 10 7.56506315002862099e-06\n22 13 11 -4.78005418458388388e-05\n22 13 12 2.28714256474037948e-04\n22 13 13 -8.70718756070135077e-04\n22 13 14 2.69318151899450630e-03\n22 13 15 -6.76597091516778302e-03\n22 13 16 1.34625726365172541e-02\n22 13 17 -1.96887281869484499e-02\n22 13 18 1.62302225812468182e-02\n22 13 19 7.05869299771170522e-03\n22 13 20 -4.07858251586940169e-02\n22 13 21 4.14134787288775195e-02\n22 13 22 1.60427443886135052e-02\n22 13 23 -4.42795439944605487e-02\n22 13 24 -2.85388287866933854e-02\n22 13 25 8.17232819797316558e-03\n22 13 26 1.78611658883685082e-02\n22 13 27 1.08531799275583778e-02\n22 13 28 3.98090651795343379e-03\n22 13 29 1.01160933595143118e-03\n22 13 30 1.86994498056034904e-04\n22 13 31 2.55416200066906218e-05\n22 13 32 2.56595878944531226e-06\n22 13 33 1.85056033070936205e-07\n22 13 34 9.09398115549657835e-09\n22 13 35 2.73292709850243004e-10\n22 13 36 3.79609823493013029e-12\n22 14 7 7.95272385461242824e-08\n22 14 8 -1.26994815880290946e-06\n22 14 9 1.05607381844705821e-05\n22 14 10 -6.03939438027692361e-05\n22 14 11 2.64166447648642659e-04\n22 14 12 -9.29646982481462508e-04\n22 14 13 2.69318151899450630e-03\n22 14 14 -6.44492819283545578e-03\n22 14 15 1.25202680172360904e-02\n22 14 16 -1.87056089414484295e-02\n22 14 17 1.81606311749855969e-02\n22 14 18 -1.85098566608445613e-03\n22 14 19 -2.89020355742329396e-02\n22 14 20 4.71456795731434783e-02\n22 14 21 -1.67503022009847818e-02\n22 14 22 -3.93124321479771142e-02\n22 14 23 2.54289350058914842e-02\n22 14 24 4.16834506454022072e-02\n22 14 25 7.12444157545285056e-03\n22 14 26 -1.56644855917610222e-02\n22 14 27 -1.47281615540133749e-02\n22 14 28 -7.07006474618087114e-03\n22 14 29 -2.26341821487098837e-03\n22 14 30 -5.23033471377359287e-04\n22 14 31 -8.99290360302385699e-05\n22 14 32 -1.15910684674888484e-05\n22 14 33 -1.10982626534769012e-06\n22 14 34 -7.68428818979228708e-08\n22 14 35 -3.64549672496702725e-09\n22 14 36 -1.06222941479864162e-10\n22 14 37 -1.43557624002970841e-12\n22 15 6 1.70756971131100615e-07\n22 15 7 -2.38449133402161227e-06\n22 15 8 1.75179667683554295e-05\n22 15 9 -8.94092733798696445e-05\n22 15 10 3.52653258291252488e-04\n22 15 11 -1.13124675260284275e-03\n22 15 12 3.02284973719830999e-03\n22 15 13 -6.76597091516778302e-03\n22 15 14 1.25202680172360904e-02\n22 15 15 -1.83402504142324391e-02\n22 15 16 1.87105243414852169e-02\n22 15 17 -6.13611146566643245e-03\n22 15 18 -2.05529498442002373e-02\n22 15 19 4.43751651686047727e-02\n22 15 20 -3.39926843608880746e-02\n22 15 21 -1.60870365174119683e-02\n22 15 22 4.51861224696551494e-02\n22 15 23 4.22741061063467490e-03\n22 15 24 -4.21943895787528198e-02\n22 15 25 -2.52782379934209607e-02\n22 15 26 6.85064041345935637e-03\n22 15 27 1.65424781782423535e-02\n22 15 28 1.09823106312134937e-02\n22 15 29 4.47798983849607499e-03\n22 15 30 1.28810954321605772e-03\n22 15 31 2.74910296231898788e-04\n22 15 32 4.43811777695835598e-05\n22 15 33 5.43074870488773808e-06\n22 15 34 4.97592772629733349e-07\n22 15 35 3.31663202698575956e-08\n22 15 36 1.52174517610742583e-09\n22 15 37 4.30433542803429022e-11\n22 15 38 5.66408958110108799e-13\n22 16 5 4.56718118474512105e-07\n22 16 6 -5.46155434681689146e-06\n22 16 7 3.47811438762245963e-05\n22 16 8 -1.55696642161473693e-04\n22 16 9 5.44765478239137248e-04\n22 16 10 -1.56760834422597466e-03\n22 16 11 3.80056573597242997e-03\n22 16 12 -7.81223236482341359e-03\n22 16 13 1.34625726365172541e-02\n22 16 14 -1.87056089414484295e-02\n22 16 15 1.87105243414852169e-02\n22 16 16 -7.38858432044725932e-03\n22 16 17 -1.65036930145963597e-02\n22 16 18 4.08424931827671157e-02\n22 16 19 -4.07149907310399341e-02\n22 16 20 2.54394680864576758e-03\n22 16 21 4.08807579718219871e-02\n22 16 22 -2.72990490353681592e-02\n22 16 23 -3.24218326807668514e-02\n22 16 24 2.54744270144389408e-02\n22 16 25 3.88110354780423652e-02\n22 16 26 8.64104997912044680e-03\n22 16 27 -1.34959075917366275e-02\n22 16 28 -1.45218694090583968e-02\n22 16 29 -7.78487064339654123e-03\n22 16 30 -2.80352803473457067e-03\n22 16 31 -7.38340785689452838e-04\n22 16 32 -1.47137321628772231e-04\n22 16 33 -2.24599286425847963e-05\n22 16 34 -2.62148989882961520e-06\n22 16 35 -2.30595814009506128e-07\n22 16 36 -1.48295148773758608e-08\n22 16 37 -6.59083631409026854e-10\n22 16 38 -1.81162343578186441e-11\n22 16 39 -2.32278504920287578e-13\n22 17 4 1.55998935797667614e-06\n22 17 5 -1.55216981320681449e-05\n22 17 6 8.35316146875619573e-05\n22 17 7 -3.20601726222105125e-04\n22 17 8 9.74738460315268980e-04\n22 17 9 -2.46769878860578115e-03\n22 17 10 5.32499015156525937e-03\n22 17 11 -9.85004851240206525e-03\n22 17 12 1.54357904373210203e-02\n22 17 13 -1.96887281869484499e-02\n22 17 14 1.81606311749855969e-02\n22 17 15 -6.13611146566643245e-03\n22 17 16 -1.65036930145963597e-02\n22 17 17 3.94402641029027581e-02\n22 17 18 -4.26786929258127960e-02\n22 17 19 1.27732107173314255e-02\n22 17 20 3.15733528168672712e-02\n22 17 21 -4.02435499953663014e-02\n22 17 22 -7.53049206008040610e-03\n22 17 23 4.27059656126007467e-02\n22 17 24 4.51183614661387217e-03\n22 17 25 -3.85296895052176422e-02\n22 17 26 -2.65861518584557012e-02\n22 17 27 3.32368345691158127e-03\n22 17 28 1.52988127395046235e-02\n22 17 29 1.16803327377147570e-02\n22 17 30 5.37404951175493472e-03\n22 17 31 1.75091947705137629e-03\n22 17 32 4.27712764055577803e-04\n22 17 33 8.02340935515537792e-05\n22 17 34 1.16430751781609999e-05\n22 17 35 1.30111484291619497e-06\n22 17 36 1.10170084078885165e-07\n22 17 37 6.84886944542572297e-09\n22 17 38 2.95251789520972298e-10\n22 17 39 7.89405256787948494e-12\n22 17 40 9.86833670377246505e-14\n22 18 3 7.07271641548696628e-06\n22 18 4 -5.61379461871880780e-05\n22 18 5 2.46214017655629312e-04\n22 18 6 -7.85270157976375634e-04\n22 18 7 2.01817597484523481e-03\n22 18 8 -4.38349916254294603e-03\n22 18 9 8.21838130373179533e-03\n22 18 10 -1.33429058455339357e-02\n22 18 11 1.84699148860147632e-02\n22 18 12 -2.07609282381692635e-02\n22 18 13 1.62302225812468182e-02\n22 18 14 -1.85098566608445613e-03\n22 18 15 -2.05529498442002373e-02\n22 18 16 4.08424931827671157e-02\n22 18 17 -4.26786929258127960e-02\n22 18 18 1.59072085693919262e-02\n22 18 19 2.57327730673825348e-02\n22 18 20 -4.32922682453214066e-02\n22 18 21 1.00669050773736431e-02\n22 18 22 3.74331724152843679e-02\n22 18 23 -2.50547520027236545e-02\n22 18 24 -3.27861006296812987e-02\n22 18 25 1.94459429569485983e-02\n22 18 26 3.80341279755491132e-02\n22 18 27 1.32625717070680814e-02\n22 18 28 -1.02648442973253218e-02\n22 18 29 -1.45131181811465012e-02\n22 18 30 -8.95864595925141391e-03\n22 18 31 -3.66090175250493813e-03\n22 18 32 -1.09667991804198862e-03\n22 18 33 -2.50854564403930003e-04\n22 18 34 -4.45719444251051981e-05\n22 18 35 -6.17527011289541707e-06\n22 18 36 -6.62740790550519402e-07\n22 18 37 -5.41385397273398990e-08\n22 18 38 -3.25877070641992238e-09\n22 18 39 -1.36430228941956928e-10\n22 18 40 -3.55123034654518752e-12\n22 18 41 -4.33109078934960129e-14\n22 19 2 4.54135433366667991e-05\n22 19 3 -2.68670145612972730e-04\n22 19 4 9.07798523530045886e-04\n22 19 5 -2.29656423562250706e-03\n22 19 6 4.79607979142527607e-03\n22 19 7 -8.62985189861694172e-03\n22 19 8 1.35987722849613416e-02\n22 19 9 -1.87142174953078292e-02\n22 19 10 2.19165087784495044e-02\n22 19 11 -2.02236388991060762e-02\n22 19 12 1.07651033040602303e-02\n22 19 13 7.05869299771170522e-03\n22 19 14 -2.89020355742329396e-02\n22 19 15 4.43751651686047727e-02\n22 19 16 -4.07149907310399341e-02\n22 19 17 1.27732107173314255e-02\n22 19 18 2.57327730673825348e-02\n22 19 19 -4.35501069496610284e-02\n22 19 20 1.79910179816617191e-02\n22 19 21 2.90115520075724497e-02\n22 19 22 -3.73376737231718231e-02\n22 19 23 -1.17916567584358509e-02\n22 19 24 3.93718833422259787e-02\n22 19 25 1.20316369697946345e-02\n22 19 26 -3.29411848941893238e-02\n22 19 27 -3.02157332876516967e-02\n22 19 28 -2.35524916309114431e-03\n22 19 29 1.33810091242902087e-02\n22 19 30 1.26192737584932698e-02\n22 19 31 6.68685378167613742e-03\n22 19 32 2.48026740686155612e-03\n22 19 33 6.91068537969345192e-04\n22 19 34 1.49088968618942955e-04\n22 19 35 2.52140481820506766e-05\n22 19 36 3.34685737042149478e-06\n22 19 37 3.45840244000911804e-07\n22 19 38 2.73074565190137776e-08\n22 19 39 1.59383342480726894e-09\n22 19 40 6.48710818077719250e-11\n22 19 41 1.64524452088815231e-12\n22 19 42 1.95876323579664814e-14\n22 20 1 4.68882464270646414e-04\n22 20 2 -1.81597397544890774e-03\n22 20 3 4.27393425864552323e-03\n22 20 4 -7.93519747601031833e-03\n22 20 5 1.26485541516770957e-02\n22 20 6 -1.78592301584430047e-02\n22 20 7 2.24434646995631170e-02\n22 20 8 -2.46426888244879476e-02\n22 20 9 2.22686370646441292e-02\n22 20 10 -1.33788358775870673e-02\n22 20 11 -2.48246620797310345e-03\n22 20 12 2.27346429762491073e-02\n22 20 13 -4.07858251586940169e-02\n22 20 14 4.71456795731434783e-02\n22 20 15 -3.39926843608880746e-02\n22 20 16 2.54394680864576758e-03\n22 20 17 3.15733528168672712e-02\n22 20 18 -4.32922682453214066e-02\n22 20 19 1.79910179816617191e-02\n22 20 20 2.56070050622655328e-02\n22 20 21 -4.04782023752388496e-02\n22 20 22 2.77913076529778149e-03\n22 20 23 3.88975211566917080e-02\n22 20 24 -1.50631826578242550e-02\n22 20 25 -3.63599949992695562e-02\n22 20 26 8.40448596033674446e-03\n22 20 27 3.66764451657028929e-02\n22 20 28 2.00006669328254474e-02\n22 20 29 -5.24205104072501686e-03\n22 20 30 -1.40362837504746526e-02\n22 20 31 -1.04438203414532226e-02\n22 20 32 -4.91417981620977302e-03\n22 20 33 -1.67927995759911829e-03\n22 20 34 -4.38942227173413408e-04\n22 20 35 -8.98173015697883885e-05\n22 20 36 -1.45155233992979518e-05\n22 20 37 -1.85133257716311793e-06\n22 20 38 -1.84593283014022284e-07\n22 20 39 -1.41117853143930694e-08\n22 20 40 -7.99665780323029195e-10\n22 20 41 -3.16731591227201002e-11\n22 20 42 -7.83260410645130211e-13\n22 20 43 -9.10829497254156588e-15\n22 21 0 1.13665723245078916e-02\n22 21 1 -1.96874807739539444e-02\n22 21 2 2.52977216656232270e-02\n22 21 3 -2.93708451849657371e-02\n22 21 4 3.17205131939707504e-02\n22 21 5 -3.16329292549175789e-02\n22 21 6 2.81078432732072040e-02\n22 21 7 -2.01573394633818442e-02\n22 21 8 7.29213230627865981e-03\n22 21 9 9.79895586194197536e-03\n22 21 10 -2.85392382943064543e-02\n22 21 11 4.41340722227186997e-02\n22 21 12 -5.02643423393419764e-02\n22 21 13 4.14134787288775195e-02\n22 21 14 -1.67503022009847818e-02\n22 21 15 -1.60870365174119683e-02\n22 21 16 4.08807579718219871e-02\n22 21 17 -4.02435499953663014e-02\n22 21 18 1.00669050773736431e-02\n22 21 19 2.90115520075724497e-02\n22 21 20 -4.04782023752388496e-02\n22 21 21 7.50874991192265461e-03\n22 21 22 3.49450660236132127e-02\n22 21 23 -2.80983558594689734e-02\n22 21 24 -2.32312355827799166e-02\n22 21 25 3.20731726851724187e-02\n22 21 26 2.32984720590697995e-02\n22 21 27 -2.32648931000235922e-02\n22 21 28 -3.37724610192610846e-02\n22 21 29 -1.02547980735361539e-02\n22 21 30 9.84576716604016106e-03\n22 21 31 1.33039821199600897e-02\n22 21 32 8.38855478595644552e-03\n22 21 33 3.58125695792227408e-03\n22 21 34 1.13968780001446220e-03\n22 21 35 2.81327261603335366e-04\n22 21 36 5.48473737633771172e-05\n22 21 37 8.49810774511682203e-06\n22 21 38 1.04397989902383828e-06\n22 21 39 1.00630208384988360e-07\n22 21 40 7.45906290302682477e-09\n22 21 41 4.10835261656716263e-10\n22 21 42 1.58493324414881837e-11\n22 21 43 3.82439941392023246e-13\n22 21 44 4.34618905051420054e-15\n22 22 1 -8.57026624230023401e-04\n22 22 2 3.31924984289924250e-03\n22 22 3 -7.82545529150851559e-03\n22 22 4 1.46113887801774745e-02\n22 22 5 -2.35908472588602050e-02\n22 22 6 3.41545809465757397e-02\n22 22 7 -4.49420309162163073e-02\n22 22 8 5.36939787909600545e-02\n22 22 9 -5.73672534303673520e-02\n22 22 10 5.27412472067616975e-02\n22 22 11 -3.76855372977962854e-02\n22 22 12 1.29740966611898222e-02\n22 22 13 1.60427443886135052e-02\n22 22 14 -3.93124321479771142e-02\n22 22 15 4.51861224696551494e-02\n22 22 16 -2.72990490353681592e-02\n22 22 17 -7.53049206008040610e-03\n22 22 18 3.74331724152843679e-02\n22 22 19 -3.73376737231718231e-02\n22 22 20 2.77913076529778149e-03\n22 22 21 3.49450660236132127e-02\n22 22 22 -3.14733036868732361e-02\n22 22 23 -1.39685902552364130e-02\n22 22 24 3.81976353368776660e-02\n22 22 25 2.06255764248848570e-03\n22 22 26 -3.72868590311080628e-02\n22 22 27 -7.09126287969585579e-03\n22 22 28 3.14527104860160022e-02\n22 22 29 2.73452340150957221e-02\n22 22 30 2.25456348710461107e-03\n22 22 31 -1.21614977023419115e-02\n22 22 32 -1.19063977384337915e-02\n22 22 33 -6.61352291700781570e-03\n22 22 34 -2.59998509093437457e-03\n22 22 35 -7.76847514609946340e-04\n22 22 36 -1.82049425278104844e-04\n22 22 37 -3.39417402540151072e-05\n22 22 38 -5.05574469447701571e-06\n22 22 39 -5.99490417347955220e-07\n22 22 40 -5.59540006188740154e-08\n22 22 41 -4.02656952366438476e-09\n22 22 42 -2.15784033872601891e-10\n22 22 43 -8.11478396039620681e-12\n22 22 44 -1.91182923331390758e-13\n22 22 45 -2.12438584265830288e-15\n23 0 22 1.08721345508907033e-02\n23 0 24 -1.04189279641353254e-02\n23 1 21 4.28089879885002246e-04\n23 1 22 -1.88310894288677357e-02\n23 1 23 -7.85510570326021448e-04\n23 1 24 1.80461125942825490e-02\n23 1 25 3.60994457998584196e-04\n23 2 20 3.94870268039928312e-05\n23 2 21 -1.65798497547454716e-03\n23 2 22 2.42069887804605900e-02\n23 2 23 3.04226935714257102e-03\n23 2 24 -2.32060687052625096e-02\n23 2 25 -1.39812552390168943e-03\n23 2 26 -2.68920023992144155e-05\n23 3 19 5.84203594582327426e-06\n23 3 20 -2.33608400969814634e-04\n23 3 21 3.90397889831392226e-03\n23 3 22 -2.81506199654432778e-02\n23 3 23 -7.17470180671544616e-03\n23 3 24 2.70253846284299636e-02\n23 3 25 3.29469645236093360e-03\n23 3 26 1.59095231721058773e-04\n23 3 27 2.94671330450194582e-06\n23 4 18 1.22067860871554105e-06\n23 4 19 -4.63697227888451802e-05\n23 4 20 7.89809674689566671e-04\n23 4 21 -7.25972235640744918e-03\n23 4 22 3.05343741803592504e-02\n23 4 23 1.34100151688582410e-02\n23 4 24 -2.94244244423987475e-02\n23 4 25 -6.14249861504260538e-03\n23 4 26 -5.38640039542122582e-04\n23 4 27 -2.33888117661524859e-05\n23 4 28 -4.17723959673909619e-07\n23 5 17 3.37507981100307538e-07\n23 5 18 -1.21455988041675075e-05\n23 5 19 2.03527747259454517e-04\n23 5 20 -2.00163447134030133e-03\n23 5 21 1.16133653036061437e-02\n23 5 22 -3.07452854296809010e-02\n23 5 23 -2.17008454376470146e-02\n23 5 24 2.98751734542874492e-02\n23 5 25 9.88359407648925143e-03\n23 5 26 1.37067217450971205e-03\n23 5 27 1.02884852926239496e-04\n23 5 28 4.15630092053972397e-06\n23 5 29 7.16710141385050801e-08\n23 6 16 1.18757507431190465e-07\n23 6 17 -4.03600844087521622e-06\n23 6 18 6.54254724233548814e-05\n23 6 19 -6.50494796646119690e-04\n23 6 20 4.19586886128955022e-03\n23 6 21 -1.65131035780082075e-02\n23 6 22 2.78979375287863403e-02\n23 6 23 3.15557640429286824e-02\n23 6 24 -2.75919575858612771e-02\n23 6 25 -1.42136292428015720e-02\n23 6 26 -2.89789353616862472e-03\n23 6 27 -3.30808590127202701e-04\n23 6 28 -2.24608359361936333e-05\n23 6 29 -8.57060674790750563e-07\n23 6 30 -1.42863289300088984e-08\n23 7 15 5.18490212378316711e-08\n23 7 16 -1.65835834076881750e-06\n23 7 17 2.57333747687737823e-05\n23 7 18 -2.51743492728942582e-04\n23 7 19 1.67887928743247704e-03\n23 7 20 -7.60210786730909788e-03\n23 7 21 2.10222735189370939e-02\n23 7 22 -2.10789942509682842e-02\n23 7 23 -4.18409597028125972e-02\n23 7 24 2.17339933162536421e-02\n23 7 25 1.84707541863201914e-02\n23 7 26 5.33271720717733404e-03\n23 7 27 8.64057077866335563e-04\n23 7 28 8.71511931186777113e-05\n23 7 29 5.48890507164797883e-06\n23 7 30 1.99497726522884950e-07\n23 7 31 3.21812388424095482e-09\n23 8 14 2.76140945103222912e-08\n23 8 15 -8.27962472487059958e-07\n23 8 16 1.22012971808092995e-05\n23 8 17 -1.15546498973631674e-04\n23 8 18 7.69156740624724263e-04\n23 8 19 -3.67388961674508192e-03\n23 8 20 1.21228060335067302e-02\n23 8 21 -2.36443373507314091e-02\n23 8 22 9.74266470675442961e-03\n23 8 23 5.06366870350111232e-02\n23 8 24 -1.17296031863275872e-02\n23 8 25 -2.15586453093883205e-02\n23 8 26 -8.73155487754605076e-03\n23 8 27 -1.93068421736687204e-03\n23 8 28 -2.70603601412236627e-04\n23 8 29 -2.49252568443626781e-05\n23 8 30 -1.47655742909363602e-06\n23 8 31 -5.13893173748409801e-08\n23 8 32 -8.03056119277290358e-10\n23 9 13 1.77358165103408376e-08\n23 9 14 -4.96286050223939680e-07\n23 9 15 6.89778062049637662e-06\n23 9 16 -6.25048207609168984e-05\n23 9 17 4.06642286627579081e-04\n23 9 18 -1.96379946317817459e-03\n23 9 19 6.97415608024970130e-03\n23 9 20 -1.70251835857284604e-02\n23 9 21 2.24513611638654706e-02\n23 9 22 5.72504575980167550e-03\n23 9 23 -5.52905669010357335e-02\n23 9 24 -2.25342102925561050e-03\n23 9 25 2.19867755352220212e-02\n23 9 26 1.28115583976861789e-02\n23 9 27 3.79212660799360868e-03\n23 9 28 7.10078269571446462e-04\n23 9 29 8.95984084664067411e-05\n23 9 30 7.67669473721744766e-06\n23 9 31 4.31467936778690756e-07\n23 9 32 1.44326857936736992e-08\n23 9 33 2.18702162474818763e-10\n23 10 12 1.36359609382067647e-08\n23 10 13 -3.54272657324980387e-07\n23 10 14 4.61335301068755643e-06\n23 10 15 -3.96253171596954323e-05\n23 10 16 2.48258713819995434e-04\n23 10 17 -1.18174103290221750e-03\n23 10 18 4.29644039667080930e-03\n23 10 19 -1.15552590047089698e-02\n23 10 20 2.06707202328843898e-02\n23 10 21 -1.55801156236220514e-02\n23 10 22 -2.33816508423427087e-02\n23 10 23 5.28549518982178170e-02\n23 10 24 1.87626580458371643e-02\n23 10 25 -1.81384040483180915e-02\n23 10 26 -1.67490425818168089e-02\n23 10 27 -6.63241240840720789e-03\n23 10 28 -1.62274981434250031e-03\n23 10 29 -2.69731493400507274e-04\n23 10 30 -3.13349985000280860e-05\n23 10 31 -2.52618843868580210e-06\n23 10 32 -1.35507873116236633e-07\n23 10 33 -4.36857227393500355e-09\n23 10 34 -6.42506578056986882e-11\n23 11 11 1.24975646345587106e-08\n23 11 12 -2.99681072195274360e-07\n23 11 13 3.63132127791309960e-06\n23 11 14 -2.93124581098324523e-05\n23 11 15 1.74792468945017118e-04\n23 11 16 -8.05738934943733447e-04\n23 11 17 2.91076354286557426e-03\n23 11 18 -8.12422946530982803e-03\n23 11 19 1.65482333249768736e-02\n23 11 20 -2.05358555965916628e-02\n23 11 21 2.20071254420512384e-03\n23 11 22 3.93412332381980057e-02\n23 11 23 -4.10667104138084876e-02\n23 11 24 -3.46589467729080437e-02\n23 11 25 8.86190741550109451e-03\n23 11 26 1.90634412022013331e-02\n23 11 27 1.03530951258058085e-02\n23 11 28 3.28234713519524056e-03\n23 11 29 7.02081465682419605e-04\n23 11 30 1.06363669816773090e-04\n23 11 31 1.15370026841668115e-05\n23 11 32 8.82010195040390884e-07\n23 11 33 4.53476416308727740e-08\n23 11 34 1.41205347446496872e-09\n23 11 35 2.01742511944585360e-11\n23 12 10 1.36359609382067647e-08\n23 12 11 -2.99681072195274360e-07\n23 12 12 3.35393826417238865e-06\n23 12 13 -2.52291197996546294e-05\n23 12 14 1.41711959117799919e-04\n23 12 15 -6.23866570457840004e-04\n23 12 16 2.19358874115646174e-03\n23 12 17 -6.13441463110372165e-03\n23 12 18 1.31942855599829419e-02\n23 12 19 -1.97940707331268732e-02\n23 12 20 1.38870000800275405e-02\n23 12 21 1.61743669850235393e-02\n23 12 22 -4.81236915828084921e-02\n23 12 23 1.98384147038876199e-02\n23 12 24 4.52425869975596945e-02\n23 12 25 5.62704738993260056e-03\n23 12 26 -1.77638505357077055e-02\n23 12 27 -1.42975670242767827e-02\n23 12 28 -5.91415236565913390e-03\n23 12 29 -1.60902159766715904e-03\n23 12 30 -3.10354328514043681e-04\n23 12 31 -4.35684199818104155e-05\n23 12 32 -4.45452018890862331e-06\n23 12 33 -3.24757746236900769e-07\n23 12 34 -1.60560717373208207e-08\n23 12 35 -4.83761549188067663e-10\n23 12 36 -6.71955854221720719e-12\n23 13 9 1.77358165103408376e-08\n23 13 10 -3.54272657324980387e-07\n23 13 11 3.63132127791309960e-06\n23 13 12 -2.52291197996546294e-05\n23 13 13 1.32156749985220299e-04\n23 13 14 -5.48919304710278873e-04\n23 13 15 1.84843082426679417e-03\n23 13 16 -5.05581286946948012e-03\n23 13 17 1.10026294566759603e-02\n23 13 18 -1.79115183250676467e-02\n23 13 19 1.79281352827647703e-02\n23 13 20 6.18739160107662869e-04\n23 13 21 -3.46314050796263907e-02\n23 13 22 4.42795439944605487e-02\n23 13 23 7.18557206639787360e-03\n23 13 24 -4.53677252837506523e-02\n23 13 25 -2.27888013777300460e-02\n23 13 26 1.09626558009297137e-02\n23 13 27 1.70211358011122937e-02\n23 13 28 9.46977670960625389e-03\n23 13 29 3.27588399578522759e-03\n23 13 30 7.93806223164584240e-04\n23 13 31 1.40760706149095497e-04\n23 13 32 1.85165127641659748e-05\n23 13 33 1.79671159967411841e-06\n23 13 34 1.25443974476613829e-07\n23 13 35 5.97931263314566644e-09\n23 13 36 1.74579251993304923e-10\n23 13 37 2.35939452129798198e-12\n23 14 8 2.76140945103222912e-08\n23 14 9 -4.96286050223939680e-07\n23 14 10 4.61335301068755643e-06\n23 14 11 -2.93124581098324523e-05\n23 14 12 1.41711959117799919e-04\n23 14 13 -5.48919304710278873e-04\n23 14 14 1.74553182924689984e-03\n23 14 15 -4.58281665398914843e-03\n23 14 16 9.80456000083818342e-03\n23 14 17 -1.63718792487034847e-02\n23 14 18 1.88615888187029048e-02\n23 14 19 -7.69177968546202972e-03\n23 14 20 -2.06682699701919544e-02\n23 14 21 4.51751706868011845e-02\n23 14 22 -2.54289350058914842e-02\n23 14 23 -3.20286761438729243e-02\n23 14 24 3.17817996605921248e-02\n23 14 25 3.73556070021109328e-02\n23 14 26 1.95473678670866430e-03\n23 14 27 -1.63480166188139182e-02\n23 14 28 -1.32955446289316326e-02\n23 14 29 -5.93209034082900016e-03\n23 14 30 -1.79870760270532574e-03\n23 14 31 -3.97138868542892499e-04\n23 14 32 -6.55868582825719085e-05\n23 14 33 -8.14952881813553750e-06\n23 14 34 -7.54332882678186713e-07\n23 14 35 -5.06038682148029189e-08\n23 14 36 -2.33037390365821194e-09\n23 14 37 -6.60209011077819276e-11\n23 14 38 -8.68771275732728187e-13\n23 15 7 5.18490212378316711e-08\n23 15 8 -8.27962472487059958e-07\n23 15 9 6.89778062049637662e-06\n23 15 10 -3.96253171596954323e-05\n23 15 11 1.74792468945017118e-04\n23 15 12 -6.23866570457840004e-04\n23 15 13 1.84843082426679417e-03\n23 15 14 -4.58281665398914843e-03\n23 15 15 9.42624876762498806e-03\n23 15 16 -1.55652837978582387e-02\n23 15 17 1.88548049605650787e-02\n23 15 18 -1.16227628804428937e-02\n23 15 19 -1.11747437067129473e-02\n23 15 20 3.86896134267707089e-02\n23 15 21 -3.96818530588509326e-02\n23 15 22 -4.22741061063467490e-03\n23 15 23 4.41351469506573811e-02\n23 15 24 -6.19574561069755285e-03\n23 15 25 -4.23535636340686701e-02\n23 15 26 -1.88753913084630966e-02\n23 15 27 1.00330942352076065e-02\n23 15 28 1.58343460948102788e-02\n23 15 29 9.48539171702060971e-03\n23 15 30 3.62330321498114020e-03\n23 15 31 9.90068845425590521e-04\n23 15 32 2.02216166122793046e-04\n23 15 33 3.13916236499914151e-05\n23 15 34 3.70650878075620318e-06\n23 15 35 3.28575233691856739e-07\n23 15 36 2.12355725890202643e-08\n23 15 37 9.46492754224896581e-10\n23 15 38 2.60486547263943470e-11\n23 15 39 3.33984560782652670e-13\n23 16 6 1.18757507431190465e-07\n23 16 7 -1.65835834076881750e-06\n23 16 8 1.22012971808092995e-05\n23 16 9 -6.25048207609168984e-05\n23 16 10 2.48258713819995434e-04\n23 16 11 -8.05738934943733447e-04\n23 16 12 2.19358874115646174e-03\n23 16 13 -5.05581286946948012e-03\n23 16 14 9.80456000083818342e-03\n23 16 15 -1.55652837978582387e-02\n23 16 16 1.87773613788725525e-02\n23 16 17 -1.31459377921672604e-02\n23 16 18 -6.04669767197200029e-03\n23 16 19 3.25273272734340044e-02\n23 16 20 -4.33370127123604479e-02\n23 16 21 1.56445625606445940e-02\n23 16 22 3.24218326807668514e-02\n23 16 23 -3.53555321252533150e-02\n23 16 24 -2.26110379700961838e-02\n23 16 25 3.22006980082715992e-02\n23 16 26 3.40846661343948560e-02\n23 16 27 2.78803372070898343e-03\n23 16 28 -1.46826386066810889e-02\n23 16 29 -1.31294585983616561e-02\n23 16 30 -6.46503775683892260e-03\n23 16 31 -2.19199408675007927e-03\n23 16 32 -5.49602591138604312e-04\n23 16 33 -1.04957407373925676e-04\n23 16 34 -1.54214388679140906e-05\n23 16 35 -1.73829606857236831e-06\n23 16 36 -1.48052962510379470e-07\n23 16 37 -9.23876711905221953e-09\n23 16 38 -3.99152899929257116e-10\n23 16 39 -1.06822861616101910e-11\n23 16 40 -1.33539010162856920e-13\n23 17 5 3.37507981100307538e-07\n23 17 6 -4.03600844087521622e-06\n23 17 7 2.57333747687737823e-05\n23 17 8 -1.15546498973631674e-04\n23 17 9 4.06642286627579081e-04\n23 17 10 -1.18174103290221750e-03\n23 17 11 2.91076354286557426e-03\n23 17 12 -6.13441463110372165e-03\n23 17 13 1.10026294566759603e-02\n23 17 14 -1.63718792487034847e-02\n23 17 15 1.88548049605650787e-02\n23 17 16 -1.31459377921672604e-02\n23 17 17 -4.45351607306949740e-03\n23 17 18 2.91660382234427141e-02\n23 17 19 -4.32961281299899029e-02\n23 17 20 2.61278576473273000e-02\n23 17 21 1.79616542510675636e-02\n23 17 22 -4.27059656126007467e-02\n23 17 23 6.92425420703025575e-03\n23 17 24 4.03461352406939861e-02\n23 17 25 -7.35063724166447347e-03\n23 17 26 -3.93503389665101621e-02\n23 17 27 -1.97063766352539364e-02\n23 17 28 7.43826614859907003e-03\n23 17 29 1.50209654033284227e-02\n23 17 30 1.00861179011533334e-02\n23 17 31 4.30439170561262861e-03\n23 17 32 1.32495007589854206e-03\n23 17 33 3.08685855179385018e-04\n23 17 34 5.55560227053892120e-05\n23 17 35 7.76717705448898654e-06\n23 17 36 8.38906726331316130e-07\n23 17 37 6.88283128390406302e-08\n23 17 38 4.15472575227081105e-09\n23 17 39 1.74226893232131731e-10\n23 17 40 4.53836211168118694e-12\n23 17 41 5.53499954171037674e-14\n23 18 4 1.22067860871554105e-06\n23 18 5 -1.21455988041675075e-05\n23 18 6 6.54254724233548814e-05\n23 18 7 -2.51743492728942582e-04\n23 18 8 7.69156740624724263e-04\n23 18 9 -1.96379946317817459e-03\n23 18 10 4.29644039667080930e-03\n23 18 11 -8.12422946530982803e-03\n23 18 12 1.31942855599829419e-02\n23 18 13 -1.79115183250676467e-02\n23 18 14 1.88615888187029048e-02\n23 18 15 -1.16227628804428937e-02\n23 18 16 -6.04669767197200029e-03\n23 18 17 2.91660382234427141e-02\n23 18 18 -4.29649305663560453e-02\n23 18 19 3.03257668247871157e-02\n23 18 20 8.46938938865252804e-03\n23 18 21 -4.07641929514034260e-02\n23 18 22 2.50547520027236545e-02\n23 18 23 2.62345318744711658e-02\n23 18 24 -3.44260072074679038e-02\n23 18 25 -2.21844332069237410e-02\n23 18 26 2.80444467433517816e-02\n23 18 27 3.39607674099600949e-02\n23 18 28 6.43961155380933046e-03\n23 18 29 -1.24680132942658098e-02\n23 18 30 -1.33573224064681591e-02\n23 18 31 -7.43091296555136256e-03\n23 18 32 -2.83421245496769789e-03\n23 18 33 -8.04236832028777565e-04\n23 18 34 -1.75712461278472199e-04\n23 18 35 -2.99848613651169556e-05\n23 18 36 -4.00575953520908703e-06\n23 18 37 -4.15811800353697949e-07\n23 18 38 -3.29353901334313365e-08\n23 18 39 -1.92625288740018573e-09\n23 18 40 -7.84950803415368310e-11\n23 18 41 -1.99183093672933583e-12\n23 18 42 -2.37139535263831927e-14\n23 19 3 5.84203594582327426e-06\n23 19 4 -4.63697227888451802e-05\n23 19 5 2.03527747259454517e-04\n23 19 6 -6.50494796646119690e-04\n23 19 7 1.67887928743247704e-03\n23 19 8 -3.67388961674508192e-03\n23 19 9 6.97415608024970130e-03\n23 19 10 -1.15552590047089698e-02\n23 19 11 1.65482333249768736e-02\n23 19 12 -1.97940707331268732e-02\n23 19 13 1.79281352827647703e-02\n23 19 14 -7.69177968546202972e-03\n23 19 15 -1.11747437067129473e-02\n23 19 16 3.25273272734340044e-02\n23 19 17 -4.32961281299899029e-02\n23 19 18 3.03257668247871157e-02\n23 19 19 5.30730160520227556e-03\n23 19 20 -3.81075793645371079e-02\n23 19 21 3.29342647055105887e-02\n23 19 22 1.17916567584358509e-02\n23 19 23 -4.06363005436410608e-02\n23 19 24 4.96525163201186809e-03\n23 19 25 3.88913345196037820e-02\n23 19 26 -1.43488955775683012e-03\n23 19 27 -3.61646087916493953e-02\n23 19 28 -2.33557689214311070e-02\n23 19 29 3.17998663167727596e-03\n23 19 30 1.39882038357589084e-02\n23 19 31 1.10462435997015570e-02\n23 19 32 5.34679059997348081e-03\n23 19 33 1.85912053020432312e-03\n23 19 34 4.91690677038672788e-04\n23 19 35 1.01448850543230232e-04\n23 19 36 1.64934660900388153e-05\n23 19 37 2.11267861530554946e-06\n23 19 38 2.11299426021164048e-07\n23 19 39 1.61878462554631868e-08\n23 19 40 9.18592604747084876e-10\n23 19 41 3.64135780762122063e-11\n23 19 42 9.00818154258482662e-13\n23 19 43 1.04753379005186199e-14\n23 20 2 3.94870268039928312e-05\n23 20 3 -2.33608400969814634e-04\n23 20 4 7.89809674689566671e-04\n23 20 5 -2.00163447134030133e-03\n23 20 6 4.19586886128955022e-03\n23 20 7 -7.60210786730909788e-03\n23 20 8 1.21228060335067302e-02\n23 20 9 -1.70251835857284604e-02\n23 20 10 2.06707202328843898e-02\n23 20 11 -2.05358555965916628e-02\n23 20 12 1.38870000800275405e-02\n23 20 13 6.18739160107662869e-04\n23 20 14 -2.06682699701919544e-02\n23 20 15 3.86896134267707089e-02\n23 20 16 -4.33370127123604479e-02\n23 20 17 2.61278576473273000e-02\n23 20 18 8.46938938865252804e-03\n23 20 19 -3.81075793645371079e-02\n23 20 20 3.49732008735958368e-02\n23 20 21 4.09985752591109328e-03\n23 20 22 -3.88975211566917080e-02\n23 20 23 2.15007112569827801e-02\n23 20 24 2.87307879673110870e-02\n23 20 25 -2.84281984000754558e-02\n23 20 26 -2.71759444490405105e-02\n23 20 27 2.01319774972728488e-02\n23 20 28 3.47994101961568281e-02\n23 20 29 1.23039680881267858e-02\n23 20 30 -9.05512904817135272e-03\n23 20 31 -1.35041710755110572e-02\n23 20 32 -8.75955254746143945e-03\n23 20 33 -3.79726125140143860e-03\n23 20 34 -1.22038490985230204e-03\n23 20 35 -3.03309972783106412e-04\n23 20 36 -5.94232878801949829e-05\n23 20 37 -9.23994080873169859e-06\n23 20 38 -1.13805527207155230e-06\n23 20 39 -1.09902230654953452e-07\n23 20 40 -8.15689629748666995e-09\n23 20 41 -4.49655093710949697e-10\n23 20 42 -1.73556998665207840e-11\n23 20 43 -4.18882553830947840e-13\n23 20 44 -4.76033638715922761e-15\n23 21 1 4.28089879885002246e-04\n23 21 2 -1.65798497547454716e-03\n23 21 3 3.90397889831392226e-03\n23 21 4 -7.25972235640744918e-03\n23 21 5 1.16133653036061437e-02\n23 21 6 -1.65131035780082075e-02\n23 21 7 2.10222735189370939e-02\n23 21 8 -2.36443373507314091e-02\n23 21 9 2.24513611638654706e-02\n23 21 10 -1.55801156236220514e-02\n23 21 11 2.20071254420512384e-03\n23 21 12 1.61743669850235393e-02\n23 21 13 -3.46314050796263907e-02\n23 21 14 4.51751706868011845e-02\n23 21 15 -3.96818530588509326e-02\n23 21 16 1.56445625606445940e-02\n23 21 17 1.79616542510675636e-02\n23 21 18 -4.07641929514034260e-02\n23 21 19 3.29342647055105887e-02\n23 21 20 4.09985752591109328e-03\n23 21 21 -3.75197341430880970e-02\n23 21 22 2.80983558594689734e-02\n23 21 23 1.79818652082067744e-02\n23 21 24 -3.74758992750445889e-02\n23 21 25 -5.24239626861933490e-03\n23 21 26 3.71087465204143779e-02\n23 21 27 9.25685457688348703e-03\n23 21 28 -3.07128119147258526e-02\n23 21 29 -2.81947650917596489e-02\n23 21 30 -3.07007449229551360e-03\n23 21 31 1.19845431161663086e-02\n23 21 32 1.20589437188374048e-02\n23 21 33 6.77181859045025517e-03\n23 21 34 2.67929319886274430e-03\n23 21 35 8.03965364701435175e-04\n23 21 36 1.88973082642440601e-04\n23 21 37 3.53098245360578423e-05\n23 21 38 5.26798210867743038e-06\n23 21 39 6.25391867253279161e-07\n23 21 40 5.84211085319080604e-08\n23 21 41 4.20660809033648781e-09\n23 21 42 2.25521100201692805e-10\n23 21 43 8.48293747758382480e-12\n23 21 44 1.99877449555576808e-13\n23 21 45 2.22099765346980478e-15\n23 22 0 1.08721345508907033e-02\n23 22 1 -1.88310894288677357e-02\n23 22 2 2.42069887804605900e-02\n23 22 3 -2.81506199654432778e-02\n23 22 4 3.05343741803592504e-02\n23 22 5 -3.07452854296809010e-02\n23 22 6 2.78979375287863403e-02\n23 22 7 -2.10789942509682842e-02\n23 22 8 9.74266470675442961e-03\n23 22 9 5.72504575980167550e-03\n23 22 10 -2.33816508423427087e-02\n23 22 11 3.93412332381980057e-02\n23 22 12 -4.81236915828084921e-02\n23 22 13 4.42795439944605487e-02\n23 22 14 -2.54289350058914842e-02\n23 22 15 -4.22741061063467490e-03\n23 22 16 3.24218326807668514e-02\n23 22 17 -4.27059656126007467e-02\n23 22 18 2.50547520027236545e-02\n23 22 19 1.17916567584358509e-02\n23 22 20 -3.88975211566917080e-02\n23 22 21 2.80983558594689734e-02\n23 22 22 1.39685902552364130e-02\n23 22 23 -3.87024652218898500e-02\n23 22 24 9.00394311468315820e-03\n23 22 25 3.45916009082023225e-02\n23 22 26 -1.64932388111370428e-02\n23 22 27 -3.32720658479586558e-02\n23 22 28 7.79813331822275408e-03\n23 22 29 3.39358962988769264e-02\n23 22 30 1.96911963034279742e-02\n23 22 31 -3.67970581117832474e-03\n23 22 32 -1.29012584186605429e-02\n23 22 33 -1.02829254833432139e-02\n23 22 34 -5.15436693352158482e-03\n23 22 35 -1.88616043127096816e-03\n23 22 36 -5.32495656620365524e-04\n23 22 37 -1.18974430099911405e-04\n23 22 38 -2.12785745150660693e-05\n23 22 39 -3.05417157531611449e-06\n23 22 40 -3.50192296065401584e-07\n23 22 41 -3.16951166552332969e-08\n23 22 42 -2.21689168862908477e-09\n23 22 43 -1.15699805496638439e-10\n23 22 44 -4.24454852470127472e-12\n23 22 45 -9.76986548830129156e-14\n23 22 46 -1.06200463932442335e-15\n23 23 1 -7.85510570326021448e-04\n23 23 2 3.04226935714257102e-03\n23 23 3 -7.17470180671544616e-03\n23 23 4 1.34100151688582410e-02\n23 23 5 -2.17008454376470146e-02\n23 23 6 3.15557640429286824e-02\n23 23 7 -4.18409597028125972e-02\n23 23 8 5.06366870350111232e-02\n23 23 9 -5.52905669010357335e-02\n23 23 10 5.28549518982178170e-02\n23 23 11 -4.10667104138084876e-02\n23 23 12 1.98384147038876199e-02\n23 23 13 7.18557206639787360e-03\n23 23 14 -3.20286761438729243e-02\n23 23 15 4.41351469506573811e-02\n23 23 16 -3.53555321252533150e-02\n23 23 17 6.92425420703025575e-03\n23 23 18 2.62345318744711658e-02\n23 23 19 -4.06363005436410608e-02\n23 23 20 2.15007112569827801e-02\n23 23 21 1.79818652082067744e-02\n23 23 22 -3.87024652218898500e-02\n23 23 23 1.34596580549595001e-02\n23 23 24 2.97320539198803741e-02\n23 23 25 -2.83535571651088786e-02\n23 23 26 -2.01433617195370023e-02\n23 23 27 3.01318353141408228e-02\n23 23 28 2.21312858141265127e-02\n23 23 29 -2.05660644512226966e-02\n23 23 30 -3.19544935112641799e-02\n23 23 31 -1.13501944210989352e-02\n23 23 32 8.08582464550079312e-03\n23 23 33 1.25841467676765064e-02\n23 23 34 8.51703530155004486e-03\n23 23 35 3.88707030045058967e-03\n23 23 36 1.32849913716657012e-03\n23 23 37 3.55001228575764456e-04\n23 23 38 7.57067108678164900e-05\n23 23 39 1.29994729422017805e-05\n23 23 40 1.79917146903444113e-06\n23 23 41 1.99601620587524362e-07\n23 23 42 1.75278792939463912e-08\n23 23 43 1.19222956165758147e-09\n23 23 44 6.06280967197502692e-11\n23 23 45 2.17084821689450706e-12\n23 23 46 4.88406685160743465e-14\n23 23 47 5.19610983856281034e-16\n24 0 23 1.04189279641353254e-02\n24 0 25 -1.00020006002000700e-02\n24 1 22 3.92399528491126331e-04\n24 1 23 -1.80461125942825490e-02\n24 1 24 -7.22591075331196201e-04\n24 1 25 1.73239732168809267e-02\n24 1 26 3.33214951982413496e-04\n24 2 21 3.45488520501759623e-05\n24 2 22 -1.51975683890577508e-03\n24 2 23 2.32060687052625096e-02\n24 2 24 2.79858320087583191e-03\n24 2 25 -2.22843478017052967e-02\n24 2 26 -1.29053595973519156e-03\n24 2 27 -2.39029129996641527e-05\n24 3 20 4.86789820304267912e-06\n24 3 21 -2.04393765143345732e-04\n24 3 22 3.58000162620397918e-03\n24 3 23 -2.70253846284299636e-02\n24 3 24 -6.60183063426354655e-03\n24 3 25 2.59847547042364483e-02\n24 3 26 3.04215130049323007e-03\n24 3 27 1.41411540354502093e-04\n24 3 28 2.52560878983835572e-06\n24 4 19 9.66245602907804235e-07\n24 4 20 -3.86377441584873987e-05\n24 4 21 6.91402930881072238e-04\n24 4 22 -6.66639254162116771e-03\n24 4 23 2.94244244423987475e-02\n24 4 24 1.23503435898646894e-02\n24 4 25 -2.83849337860938595e-02\n24 4 26 -5.67768012160519136e-03\n24 4 27 -4.78941997420777885e-04\n24 4 28 -2.00463983008532510e-05\n24 4 29 -3.45678939882915494e-07\n24 5 18 2.53088238043818823e-07\n24 5 19 -9.61402236052776946e-06\n24 5 20 1.69702833039028786e-04\n24 5 21 -1.75494941594549838e-03\n24 5 22 1.06974347971664184e-02\n24 5 23 -2.98751734542874492e-02\n24 5 24 -2.00261782704436763e-02\n24 5 25 2.90288453713876270e-02\n24 5 26 9.15755886969661078e-03\n24 5 27 1.22003776085848084e-03\n24 5 28 8.82169346893598829e-05\n24 5 29 3.43946202455835440e-06\n24 5 30 5.73323304526972406e-08\n24 6 17 8.41017624162420109e-08\n24 6 18 -3.02649514154010039e-06\n24 6 19 5.18312403837848113e-05\n24 6 20 -5.43373470519063064e-04\n24 6 21 3.69071690522543194e-03\n24 6 22 -1.53031770275007017e-02\n24 6 23 2.75919575858612771e-02\n24 6 24 2.92317752827689251e-02\n24 6 25 -2.72175995458941127e-02\n24 6 26 -1.32303977025181974e-02\n24 6 27 -2.58505833134273859e-03\n24 6 28 -2.83952392710105948e-04\n24 6 29 -1.85950251347737747e-05\n24 6 30 -6.85594956563006215e-07\n24 6 31 -1.10594217943504030e-08\n24 7 16 3.45566321823865839e-08\n24 7 17 -1.17441719848442843e-06\n24 7 18 1.93164510016897498e-05\n24 7 19 -1.99868444508331836e-04\n24 7 20 1.40751451511489889e-03\n24 7 21 -6.72663653414179770e-03\n24 7 22 1.96983729613106261e-02\n24 7 23 -2.17339933162536421e-02\n24 7 24 -3.90173614485064537e-02\n24 7 25 2.21791755022022437e-02\n24 7 26 1.73355716466742243e-02\n24 7 27 4.77580755258850008e-03\n24 7 28 7.43254172124552913e-04\n24 7 29 7.22321657797345810e-05\n24 7 30 4.39281628326570229e-06\n24 7 31 1.54436420681598854e-07\n24 7 32 2.41336369119309815e-09\n24 8 15 1.72529627157001080e-08\n24 8 16 -5.51825163512985171e-07\n24 8 17 8.65154963055908482e-06\n24 8 18 -8.69594917028481863e-05\n24 8 19 6.13231924145987500e-04\n24 8 20 -3.09979890872821685e-03\n24 8 21 1.08360845366809750e-02\n24 8 22 -2.26046080787632956e-02\n24 8 23 1.17296031863275872e-02\n24 8 24 4.77447621381137567e-02\n24 8 25 -1.33362984112659303e-02\n24 8 26 -2.05292883712513795e-02\n24 8 27 -7.87145327084754480e-03\n24 8 28 -1.66688781711477079e-03\n24 8 29 -2.24760138651478632e-04\n24 8 30 -1.99711497448770794e-05\n24 8 31 -1.14360561370985944e-06\n24 8 32 -3.85383276495249568e-08\n24 8 33 -5.83981090949035102e-10\n24 9 14 1.03415372137769474e-08\n24 9 15 -3.10073709555641283e-07\n24 9 16 4.60433539757093520e-06\n24 9 17 -4.44592991644445060e-05\n24 9 18 3.07549329440205276e-04\n24 9 19 -1.57699318962254331e-03\n24 9 20 5.94666983028233234e-03\n24 9 21 -1.54792135294649568e-02\n24 9 22 2.23263857746725494e-02\n24 9 23 2.25342102925561050e-03\n24 9 24 -5.30999645515289039e-02\n24 9 25 7.00206596175065568e-04\n24 9 26 2.15004612686009963e-02\n24 9 27 1.16736503378141813e-02\n24 9 28 3.29345454139145652e-03\n24 9 29 5.91899562390624934e-04\n24 9 30 7.19456647675322964e-05\n24 9 31 5.95286329488797165e-06\n24 9 32 3.23738659161984053e-07\n24 9 33 1.04954254040170350e-08\n24 9 34 1.54361183442508006e-10\n24 10 13 7.38228259266353936e-09\n24 10 14 -2.06572044056376259e-07\n24 10 15 2.88780067083098424e-06\n24 10 16 -2.65507937652770719e-05\n24 10 17 1.77622347293580221e-04\n24 10 18 -9.01217287235024130e-04\n24 10 19 3.49039192469878069e-03\n24 10 20 -1.00213993508825023e-02\n24 10 21 1.93529094696033591e-02\n24 10 22 -1.71158418964530671e-02\n24 10 23 -1.87626580458371643e-02\n24 10 24 5.24071699490460141e-02\n24 10 25 1.46557887774531117e-02\n24 10 26 -1.87671445085630499e-02\n24 10 27 -1.55282190026968941e-02\n24 10 28 -5.81337409120136599e-03\n24 10 29 -1.36027383171582462e-03\n24 10 30 -2.17359014963633370e-04\n24 10 31 -2.43522584823417867e-05\n24 10 32 -1.89782596633623541e-06\n24 10 33 -9.85948776820824833e-08\n24 10 34 -3.08336222435102027e-09\n24 10 35 -4.40525271616440584e-11\n24 11 12 6.24471100683480272e-09\n24 11 13 -1.62242351136337153e-07\n24 11 14 2.12228800474738852e-06\n24 11 15 -1.84334556247707231e-05\n24 11 16 1.17944596448854804e-04\n24 11 17 -5.82133302791347785e-04\n24 11 18 2.24926510745352868e-03\n24 11 19 -6.72146525176421246e-03\n24 11 20 1.47540605219685609e-02\n24 11 21 -2.03367561933369340e-02\n24 11 22 5.92912510470794081e-03\n24 11 23 3.46589467729080437e-02\n24 11 24 -4.33869642311422751e-02\n24 11 25 -3.02027408789806962e-02\n24 11 26 1.11395310638126989e-02\n24 11 27 1.82012599517635111e-02\n24 11 28 9.20311687109099534e-03\n24 11 29 2.77472538129851466e-03\n24 11 30 5.68844891635506558e-04\n24 11 31 8.29554885634675272e-05\n24 11 32 8.68681276167166558e-06\n24 11 33 6.42578190583351606e-07\n24 11 34 3.20248211614740050e-08\n24 11 35 9.68153886076551454e-10\n24 11 36 1.34478788698383406e-11\n24 12 11 6.24471100683480272e-09\n24 12 12 -1.49742909502781293e-07\n24 12 13 1.82097560355964681e-06\n24 12 14 -1.48285060650047848e-05\n24 12 15 8.98783635488097483e-05\n24 12 16 -4.25887920527716933e-04\n24 12 17 1.60936935463715625e-03\n24 12 18 -4.83832589657594283e-03\n24 12 19 1.12359971330011220e-02\n24 12 20 -1.85178104346727818e-02\n24 12 21 1.59218911692785789e-02\n24 12 22 1.04825873788589500e-02\n24 12 23 -4.52425869975596945e-02\n24 12 24 2.53751042031849242e-02\n24 12 25 4.19404036538975960e-02\n24 12 26 1.53737348977011807e-03\n24 12 27 -1.79487313798426622e-02\n24 12 28 -1.29905841388537369e-02\n24 12 29 -5.06225328492546884e-03\n24 12 30 -1.31415037651281741e-03\n24 12 31 -2.43350787056943520e-04\n24 12 32 -3.29222967542110084e-05\n24 12 33 -3.25274164353954002e-06\n24 12 34 -2.29652394728257464e-07\n24 12 35 -1.10151090292577327e-08\n24 12 36 -3.22468807028308711e-10\n24 12 37 -4.35808452553838109e-12\n24 13 10 7.38228259266353936e-09\n24 13 11 -1.62242351136337153e-07\n24 13 12 1.82097560355964681e-06\n24 13 13 -1.37939644871385591e-05\n24 13 14 7.84889325656199035e-05\n24 13 15 -3.53070001325339550e-04\n24 13 16 1.28509781111011059e-03\n24 13 17 -3.79825551315469137e-03\n24 13 18 8.95986721008769272e-03\n24 13 19 -1.60048249833242630e-02\n24 13 20 1.85372543182295479e-02\n24 13 21 -4.38487485307754016e-03\n24 13 22 -2.85388287866933854e-02\n24 13 23 4.53677252837506523e-02\n24 13 24 -7.17772857313870659e-04\n24 13 25 -4.51435132517091233e-02\n24 13 26 -1.75262523807251788e-02\n24 13 27 1.29529307507144119e-02\n24 13 28 1.60318832638868785e-02\n24 13 29 8.25713786433580111e-03\n24 13 30 2.70666429335441160e-03\n24 13 31 6.27272783627145112e-04\n24 13 32 1.06931511584458899e-04\n24 13 33 1.35697442980424880e-05\n24 13 34 1.27351880830779180e-06\n24 13 35 8.61776413007102342e-08\n24 13 36 3.98815870681583552e-09\n24 13 37 1.13226357328682706e-10\n24 13 38 1.48994947437054495e-12\n24 14 9 1.03415372137769474e-08\n24 14 10 -2.06572044056376259e-07\n24 14 11 2.12228800474738852e-06\n24 14 12 -1.48285060650047848e-05\n24 14 13 7.84889325656199035e-05\n24 14 14 -3.31681707923096212e-04\n24 14 15 1.14784398196347339e-03\n24 14 16 -3.27713785861026593e-03\n24 14 17 7.64227363179651685e-03\n24 14 18 -1.40471711684864883e-02\n24 14 19 1.84733120738833902e-02\n24 14 20 -1.16667749502425849e-02\n24 14 21 -1.33595621201215287e-02\n24 14 22 4.16834506454022072e-02\n24 14 23 -3.17817996605921248e-02\n24 14 24 -2.43928348576935594e-02\n24 14 25 3.61400371983577205e-02\n24 14 26 3.26660341188805576e-02\n24 14 27 -2.23582347294144068e-03\n24 14 28 -1.64803994654106909e-02\n24 14 29 -1.19254763194254387e-02\n24 14 30 -4.98365037392339370e-03\n24 14 31 -1.43708204731747805e-03\n24 14 32 -3.03994801126870581e-04\n24 14 33 -4.83203452618730306e-05\n24 14 34 -5.79747166881168837e-06\n24 14 35 -5.19448022380524128e-07\n24 14 36 -3.37998682859075967e-08\n24 14 37 -1.51235321526662600e-09\n24 14 38 -4.16919705522135339e-11\n24 14 39 -5.34556376108554263e-13\n24 15 8 1.72529627157001080e-08\n24 15 9 -3.10073709555641283e-07\n24 15 10 2.88780067083098424e-06\n24 15 11 -1.84334556247707231e-05\n24 15 12 8.98783635488097483e-05\n24 15 13 -3.53070001325339550e-04\n24 15 14 1.14784398196347339e-03\n24 15 15 -3.11874855831511590e-03\n24 15 16 7.04332480160765347e-03\n24 15 17 -1.28826454057382941e-02\n24 15 18 1.78143073601854296e-02\n24 15 19 -1.48098418711999509e-02\n24 15 20 -3.52858141923548335e-03\n24 15 21 3.20447543668433436e-02\n24 15 22 -4.21943895787528198e-02\n24 15 23 6.19574561069755285e-03\n24 15 24 4.07640984104202261e-02\n24 15 25 -1.49027366067645995e-02\n24 15 26 -4.08636090495461850e-02\n24 15 27 -1.30868267664230287e-02\n24 15 28 1.22098808268577486e-02\n24 15 29 1.48777491788310385e-02\n24 15 30 8.16542233097691088e-03\n24 15 31 2.94011474751146450e-03\n24 15 32 7.65964863364376054e-04\n24 15 33 1.50102167212638729e-04\n24 15 34 2.24503342451904076e-05\n24 15 35 2.56176738902792320e-06\n24 15 36 2.19997814292730436e-07\n24 15 37 1.38011595406082553e-08\n24 15 38 5.98092444088991794e-10\n24 15 39 1.60277795341476045e-11\n24 15 40 2.00362898139769040e-13\n24 16 7 3.45566321823865839e-08\n24 16 8 -5.51825163512985171e-07\n24 16 9 4.60433539757093520e-06\n24 16 10 -2.65507937652770719e-05\n24 16 11 1.17944596448854804e-04\n24 16 12 -4.25887920527716933e-04\n24 16 13 1.28509781111011059e-03\n24 16 14 -3.27713785861026593e-03\n24 16 15 7.04332480160765347e-03\n24 16 16 -1.25012666825840147e-02\n24 16 17 1.73569816848823864e-02\n24 16 18 -1.60042656905517540e-02\n24 16 19 1.88443486812050637e-03\n24 16 20 2.38104378790314819e-02\n24 16 21 -4.22430332080368933e-02\n24 16 22 2.54744270144389408e-02\n24 16 23 2.26110379700961838e-02\n24 16 24 -3.96851524905201685e-02\n24 16 25 -1.26687322819899676e-02\n24 16 26 3.62615491166411885e-02\n24 16 27 2.87975366979254528e-02\n24 16 28 -1.89892621043253851e-03\n24 16 29 -1.51021919710535210e-02\n24 16 30 -1.17313429227207002e-02\n24 16 31 -5.36304985751002020e-03\n24 16 32 -1.72105213661478204e-03\n24 16 33 -4.12222464971894266e-04\n24 16 34 -7.56231957789132429e-05\n24 16 35 -1.07154211024207056e-05\n24 16 36 -1.16820690848282842e-06\n24 16 37 -9.64579680001866397e-08\n24 16 38 -5.84658089380867711e-09\n24 16 39 -2.45761697183855033e-10\n24 16 40 -6.40848130549194280e-12\n24 16 41 -7.81580231283430916e-14\n24 17 6 8.41017624162420109e-08\n24 17 7 -1.17441719848442843e-06\n24 17 8 8.65154963055908482e-06\n24 17 9 -4.44592991644445060e-05\n24 17 10 1.77622347293580221e-04\n24 17 11 -5.82133302791347785e-04\n24 17 12 1.60936935463715625e-03\n24 17 13 -3.79825551315469137e-03\n24 17 14 7.64227363179651685e-03\n24 17 15 -1.28826454057382941e-02\n24 17 16 1.73569816848823864e-02\n24 17 17 -1.63017409786868257e-02\n24 17 18 4.22274724689381977e-03\n24 17 19 1.88184761316160668e-02\n24 17 20 -3.95425441138766593e-02\n24 17 21 3.44585627738867152e-02\n24 17 22 4.51183614661387217e-03\n24 17 23 -4.03461352406939861e-02\n24 17 24 1.86888396022333256e-02\n24 17 25 3.48481849164264541e-02\n24 17 26 -1.70116112298664817e-02\n24 17 27 -3.78835165400380020e-02\n24 17 28 -1.33562141106466569e-02\n24 17 29 1.02755300480030150e-02\n24 17 30 1.42915027503175423e-02\n24 17 31 8.64139178431505320e-03\n24 17 32 3.44982891762377388e-03\n24 17 33 1.00801392147974924e-03\n24 17 34 2.24696244766383778e-04\n24 17 35 3.88896848540617426e-05\n24 17 36 5.24781611415624477e-06\n24 17 37 5.48610383047860137e-07\n24 17 38 4.36657340207525765e-08\n24 17 39 2.56192429129141378e-09\n24 17 40 1.04592194314106762e-10\n24 17 41 2.65622315499410906e-12\n24 17 42 3.16239452313480717e-14\n24 18 5 2.53088238043818823e-07\n24 18 6 -3.02649514154010039e-06\n24 18 7 1.93164510016897498e-05\n24 18 8 -8.69594917028481863e-05\n24 18 9 3.07549329440205276e-04\n24 18 10 -9.01217287235024130e-04\n24 18 11 2.24926510745352868e-03\n24 18 12 -4.83832589657594283e-03\n24 18 13 8.95986721008769272e-03\n24 18 14 -1.40471711684864883e-02\n24 18 15 1.78143073601854296e-02\n24 18 16 -1.60042656905517540e-02\n24 18 17 4.22274724689381977e-03\n24 18 18 1.71825800253196123e-02\n24 18 19 -3.75906410736639534e-02\n24 18 20 3.78097305213959192e-02\n24 18 21 -7.14884000850300920e-03\n24 18 22 -3.27861006296812987e-02\n24 18 23 3.44260072074679038e-02\n24 18 24 1.33189820542401534e-02\n24 18 25 -3.86429444814514194e-02\n24 18 26 -1.09747027956454803e-02\n24 18 27 3.32473843747514906e-02\n24 18 28 2.87138541788744606e-02\n24 18 29 8.69576531342199991e-04\n24 18 30 -1.35694992123294825e-02\n24 18 31 -1.20349411052920841e-02\n24 18 32 -6.13219945667555436e-03\n24 18 33 -2.19878215910552182e-03\n24 18 34 -5.93586827426040345e-04\n24 18 35 -1.24248388421220313e-04\n24 18 36 -2.04093840162584352e-05\n24 18 37 -2.63369869657856560e-06\n24 18 38 -2.64799008260616539e-07\n24 18 39 -2.03604732270431213e-08\n24 18 40 -1.15813109482253635e-09\n24 18 41 -4.59734295959947473e-11\n24 18 42 -1.13802272210791849e-12\n24 18 43 -1.32337170340016941e-14\n24 19 4 9.66245602907804235e-07\n24 19 5 -9.61402236052776946e-06\n24 19 6 5.18312403837848113e-05\n24 19 7 -1.99868444508331836e-04\n24 19 8 6.13231924145987500e-04\n24 19 9 -1.57699318962254331e-03\n24 19 10 3.49039192469878069e-03\n24 19 11 -6.72146525176421246e-03\n24 19 12 1.12359971330011220e-02\n24 19 13 -1.60048249833242630e-02\n24 19 14 1.84733120738833902e-02\n24 19 15 -1.48098418711999509e-02\n24 19 16 1.88443486812050637e-03\n24 19 17 1.88184761316160668e-02\n24 19 18 -3.75906410736639534e-02\n24 19 19 3.86001836241317493e-02\n24 19 20 -1.24986927791091245e-02\n24 19 21 -2.61450627220952263e-02\n24 19 22 3.93718833422259787e-02\n24 19 23 -4.96525163201186809e-03\n24 19 24 -3.68868493385394110e-02\n24 19 25 1.86460251366356252e-02\n24 19 26 3.36693213473758028e-02\n24 19 27 -1.27873908007466415e-02\n24 19 28 -3.60856825228604813e-02\n24 19 29 -1.65542170939805159e-02\n24 19 30 7.16079554764647548e-03\n24 19 31 1.37966443880715194e-02\n24 19 32 9.52010154148693858e-03\n24 19 33 4.26226827745272908e-03\n24 19 34 1.39819461972240531e-03\n24 19 35 3.52437047629814901e-04\n24 19 36 6.97466374158955531e-05\n24 19 37 1.09245681769551381e-05\n24 19 38 1.35268411243894618e-06\n24 19 39 1.31124963418219319e-07\n24 19 40 9.75773910709606994e-09\n24 19 41 5.38838152838979200e-10\n24 19 42 2.08193109836762835e-11\n24 19 43 5.02707089279121242e-13\n24 19 44 5.71294943485302026e-15\n24 20 3 4.86789820304267912e-06\n24 20 4 -3.86377441584873987e-05\n24 20 5 1.69702833039028786e-04\n24 20 6 -5.43373470519063064e-04\n24 20 7 1.40751451511489889e-03\n24 20 8 -3.09979890872821685e-03\n24 20 9 5.94666983028233234e-03\n24 20 10 -1.00213993508825023e-02\n24 20 11 1.47540605219685609e-02\n24 20 12 -1.85178104346727818e-02\n24 20 13 1.85372543182295479e-02\n24 20 14 -1.16667749502425849e-02\n24 20 15 -3.52858141923548335e-03\n24 20 16 2.38104378790314819e-02\n24 20 17 -3.95425441138766593e-02\n24 20 18 3.78097305213959192e-02\n24 20 19 -1.24986927791091245e-02\n24 20 20 -2.36984586093824151e-02\n24 20 21 4.01685008595602141e-02\n24 20 22 -1.50631826578242550e-02\n24 20 23 -2.87307879673110870e-02\n24 20 24 3.30729103598737682e-02\n24 20 25 1.47241723256806813e-02\n24 20 26 -3.53647793580067743e-02\n24 20 27 -1.57098309009967360e-02\n24 20 28 2.79437528348607748e-02\n24 20 29 3.05710071801199935e-02\n24 20 30 5.64949863256948857e-03\n24 20 31 -1.13388820356370552e-02\n24 20 32 -1.24937430041782532e-02\n24 20 33 -7.26090380683626050e-03\n24 20 34 -2.93020322192664323e-03\n24 20 35 -8.90852589719957738e-04\n24 20 36 -2.11336467426763724e-04\n24 20 37 -3.97531734580884465e-05\n24 20 38 -5.95999041404451457e-06\n24 20 39 -7.10079423510280875e-07\n24 20 40 -6.65034525787898629e-08\n24 20 41 -4.79722207508137455e-09\n24 20 42 -2.57491777576324489e-10\n24 20 43 -9.69236296921203700e-12\n24 20 44 -2.28446554364592512e-13\n24 20 45 -2.53845174788436107e-15\n24 21 2 3.45488520501759623e-05\n24 21 3 -2.04393765143345732e-04\n24 21 4 6.91402930881072238e-04\n24 21 5 -1.75494941594549838e-03\n24 21 6 3.69071690522543194e-03\n24 21 7 -6.72663653414179770e-03\n24 21 8 1.08360845366809750e-02\n24 21 9 -1.54792135294649568e-02\n24 21 10 1.93529094696033591e-02\n24 21 11 -2.03367561933369340e-02\n24 21 12 1.59218911692785789e-02\n24 21 13 -4.38487485307754016e-03\n24 21 14 -1.33595621201215287e-02\n24 21 15 3.20447543668433436e-02\n24 21 16 -4.22430332080368933e-02\n24 21 17 3.44585627738867152e-02\n24 21 18 -7.14884000850300920e-03\n24 21 19 -2.61450627220952263e-02\n24 21 20 4.01685008595602141e-02\n24 21 21 -1.81327855785999362e-02\n24 21 22 -2.32312355827799166e-02\n24 21 23 3.74758992750445889e-02\n24 21 24 -1.22727695144107923e-03\n24 21 25 -3.67610743858701799e-02\n24 21 26 1.12449981887932778e-02\n24 21 27 3.50309222152022486e-02\n24 21 28 -3.97551630283992772e-03\n24 21 29 -3.36607584784816774e-02\n24 21 30 -2.15575562068456792e-02\n24 21 31 2.46270990890887906e-03\n24 21 32 1.28165417495106608e-02\n24 21 33 1.06152201278431422e-02\n24 21 34 5.41762187803444283e-03\n24 21 35 2.00461601684179143e-03\n24 21 36 5.70244630371441865e-04\n24 21 37 1.28102771454197811e-04\n24 21 38 2.30026187000191423e-05\n24 21 39 3.31135760700969614e-06\n24 21 40 3.80504459336210131e-07\n24 21 41 3.44926981450950403e-08\n24 21 42 2.41522945660820374e-09\n24 21 43 1.26143499503982613e-10\n24 21 44 4.62970216972993192e-12\n24 21 45 1.06584749463431338e-13\n24 21 46 1.15859833021177686e-15\n24 22 1 3.92399528491126331e-04\n24 22 2 -1.51975683890577508e-03\n24 22 3 3.58000162620397918e-03\n24 22 4 -6.66639254162116771e-03\n24 22 5 1.06974347971664184e-02\n24 22 6 -1.53031770275007017e-02\n24 22 7 1.96983729613106261e-02\n24 22 8 -2.26046080787632956e-02\n24 22 9 2.23263857746725494e-02\n24 22 10 -1.71158418964530671e-02\n24 22 11 5.92912510470794081e-03\n24 22 12 1.04825873788589500e-02\n24 22 13 -2.85388287866933854e-02\n24 22 14 4.16834506454022072e-02\n24 22 15 -4.21943895787528198e-02\n24 22 16 2.54744270144389408e-02\n24 22 17 4.51183614661387217e-03\n24 22 18 -3.27861006296812987e-02\n24 22 19 3.93718833422259787e-02\n24 22 20 -1.50631826578242550e-02\n24 22 21 -2.32312355827799166e-02\n24 22 22 3.81976353368776660e-02\n24 22 23 -9.00394311468315820e-03\n24 22 24 -3.20506659099803117e-02\n24 22 25 2.60199530408255838e-02\n24 22 26 2.25947278416972974e-02\n24 22 27 -2.87434394353896232e-02\n24 22 28 -2.37793768736864254e-02\n24 22 29 1.92361678222173828e-02\n24 22 30 3.23477854868748248e-02\n24 22 31 1.22279929479681361e-02\n24 22 32 -7.70609760126059651e-03\n24 22 33 -1.26449940485385961e-02\n24 22 34 -8.67760693805259470e-03\n24 22 35 -3.98970140675177396e-03\n24 22 36 -1.37009403025440835e-03\n24 22 37 -3.67339963243818914e-04\n24 22 38 -7.85283655580962800e-05\n24 22 39 -1.35082225342023637e-05\n24 22 40 -1.87208569121420520e-06\n24 22 41 -2.07896472036246475e-07\n24 22 42 -1.82694509343798105e-08\n24 22 43 -1.24330289595886694e-09\n24 22 44 -6.32467632322389268e-11\n24 22 45 -2.26507040485671079e-12\n24 22 46 -5.09651589386221421e-14\n24 22 47 -5.42213224820488763e-16\n24 23 0 1.04189279641353254e-02\n24 23 1 -1.80461125942825490e-02\n24 23 2 2.32060687052625096e-02\n24 23 3 -2.70253846284299636e-02\n24 23 4 2.94244244423987475e-02\n24 23 5 -2.98751734542874492e-02\n24 23 6 2.75919575858612771e-02\n24 23 7 -2.17339933162536421e-02\n24 23 8 1.17296031863275872e-02\n24 23 9 2.25342102925561050e-03\n24 23 10 -1.87626580458371643e-02\n24 23 11 3.46589467729080437e-02\n24 23 12 -4.52425869975596945e-02\n24 23 13 4.53677252837506523e-02\n24 23 14 -3.17817996605921248e-02\n24 23 15 6.19574561069755285e-03\n24 23 16 2.26110379700961838e-02\n24 23 17 -4.03461352406939861e-02\n24 23 18 3.44260072074679038e-02\n24 23 19 -4.96525163201186809e-03\n24 23 20 -2.87307879673110870e-02\n24 23 21 3.74758992750445889e-02\n24 23 22 -9.00394311468315820e-03\n24 23 23 -2.97320539198803741e-02\n24 23 24 3.12830094967828317e-02\n24 23 25 1.10392813167100244e-02\n24 23 26 -3.57436389034247309e-02\n24 23 27 -2.15362847240197836e-03\n24 23 28 3.47074873484134052e-02\n24 23 29 8.46383791039463952e-03\n24 23 30 -2.82128143152745004e-02\n24 23 31 -2.69608366893632073e-02\n24 23 32 -4.20056583710128726e-03\n24 23 33 1.05988444449827737e-02\n24 23 34 1.15954201648850511e-02\n24 23 35 6.92222721748411722e-03\n24 23 36 2.91648394246451042e-03\n24 23 37 9.37961918922710483e-04\n24 23 38 2.38387608627487960e-04\n24 23 39 4.86901322841541995e-05\n24 23 40 8.04720202657577863e-06\n24 23 41 1.07608260733101114e-06\n24 23 42 1.15689387383139490e-07\n24 23 43 9.86920814572879845e-09\n24 23 44 6.53479449066412594e-10\n24 23 45 3.24064330796582038e-11\n24 23 46 1.13328044952561137e-12\n24 23 47 2.49359140232525802e-14\n24 23 48 2.59763197846639110e-16\n24 24 1 -7.22591075331196201e-04\n24 24 2 2.79858320087583191e-03\n24 24 3 -6.60183063426354655e-03\n24 24 4 1.23503435898646894e-02\n24 24 5 -2.00261782704436763e-02\n24 24 6 2.92317752827689251e-02\n24 24 7 -3.90173614485064537e-02\n24 24 8 4.77447621381137567e-02\n24 24 9 -5.30999645515289039e-02\n24 24 10 5.24071699490460141e-02\n24 24 11 -4.33869642311422751e-02\n24 24 12 2.53751042031849242e-02\n24 24 13 -7.17772857313870659e-04\n24 24 14 -2.43928348576935594e-02\n24 24 15 4.07640984104202261e-02\n24 24 16 -3.96851524905201685e-02\n24 24 17 1.86888396022333256e-02\n24 24 18 1.33189820542401534e-02\n24 24 19 -3.68868493385394110e-02\n24 24 20 3.30729103598737682e-02\n24 24 21 -1.22727695144107923e-03\n24 24 22 -3.20506659099803117e-02\n24 24 23 3.12830094967828317e-02\n24 24 24 6.88476534250933770e-03\n24 24 25 -3.58724674701539058e-02\n24 24 26 1.14735343414237717e-02\n24 24 27 3.15245045401815320e-02\n24 24 28 -1.59638041551176270e-02\n24 24 29 -3.12170504578989432e-02\n24 24 30 6.11323032808799086e-03\n24 24 31 3.14500450360720631e-02\n24 24 32 1.98848689742629451e-02\n24 24 33 -1.95627532212758191e-03\n24 24 34 -1.17896670815766222e-02\n24 24 35 -1.01693896866218701e-02\n24 24 36 -5.43562130885673361e-03\n24 24 37 -2.12431321199329563e-03\n24 24 38 -6.44304811091400930e-04\n24 24 39 -1.55948440523526164e-04\n24 24 40 -3.05337272106601851e-05\n24 24 41 -4.86072623531410256e-06\n24 24 42 -6.28371028671772963e-07\n24 24 43 -6.55021669112364522e-08\n24 24 44 -5.43110076603247479e-09\n24 24 45 -3.50240655448585975e-10\n24 24 46 -1.69454841551103983e-11\n24 24 47 -5.79039481329493217e-13\n24 24 48 -1.24659273363253861e-14\n24 24 49 -1.27209963098418691e-16\n25 0 24 1.00020006002000700e-02\n25 0 26 -9.61716310141025403e-03\n25 1 23 3.60994457998584196e-04\n25 1 24 -1.73239732168809267e-02\n25 1 25 -6.66942937069263494e-04\n25 1 26 1.66574151163192390e-02\n25 1 27 3.08523556682890839e-04\n25 2 22 3.04012176297874469e-05\n25 2 23 -1.39812552390168943e-03\n25 2 24 2.22843478017052967e-02\n25 2 25 2.58305888813991879e-03\n25 2 26 -2.14328153530593324e-02\n25 2 27 -1.19490659694551622e-03\n25 2 28 -2.13410206600960331e-05\n25 3 21 4.08869312328179232e-06\n25 3 22 -1.79856029001197142e-04\n25 3 23 3.29469645236093360e-03\n25 3 24 -2.59847547042364483e-02\n25 3 25 -6.09489807471854423e-03\n25 3 26 2.50197580680286408e-02\n25 3 27 2.81754099012300098e-03\n25 3 28 1.26255180877905364e-04\n25 3 29 2.17713708096593221e-06\n25 4 20 7.72909480527135423e-07\n25 4 21 -3.24529955743907333e-05\n25 4 22 6.08680708732907880e-04\n25 4 23 -6.14249861504260538e-03\n25 4 24 2.83849337860938595e-02\n25 4 25 1.14110240278732565e-02\n25 4 26 -2.74104343574627400e-02\n25 4 27 -5.26342708957651587e-03\n25 4 28 -4.27746585218059103e-04\n25 4 29 -1.72804898589988526e-05\n25 4 30 -2.88048173786079516e-07\n25 5 19 1.92318914840671288e-07\n25 5 20 -7.69035223145103457e-06\n25 5 21 1.42620958812545515e-04\n25 5 22 -1.54706730014605719e-03\n25 5 23 9.88359407648925143e-03\n25 5 24 -2.90288453713876270e-02\n25 5 25 -1.85358046897062885e-02\n25 5 26 2.82101054645438755e-02\n25 5 27 8.50739077967415559e-03\n25 5 28 1.09063988292262061e-03\n25 5 29 7.60720584773743507e-05\n25 5 30 2.86604314198653527e-06\n25 5 31 4.62325162759878892e-08\n25 6 18 6.05420124443733601e-08\n25 6 19 -2.29979972949506032e-06\n25 6 20 4.14900332979217611e-05\n25 6 21 -4.57381923995579517e-04\n25 6 22 3.26273992587994434e-03\n25 6 23 -1.42136292428015720e-02\n25 6 24 2.72175995458941127e-02\n25 6 25 2.71470037034092116e-02\n25 6 26 -2.67955600308631564e-02\n25 6 27 -1.23410980993807769e-02\n25 6 28 -2.31536187716469040e-03\n25 6 29 -2.45095459851503924e-04\n25 6 30 -1.55008705992823213e-05\n25 6 31 -5.52860484437942415e-07\n25 6 32 -8.63949976015556415e-09\n25 7 17 2.34930430482530758e-08\n25 7 18 -8.45423194506076031e-07\n25 7 19 1.46912725356971563e-05\n25 7 20 -1.60291607927106822e-04\n25 7 21 1.18850714374717320e-03\n25 7 22 -5.97724655801323882e-03\n25 7 23 1.84707541863201914e-02\n25 7 24 -2.21791755022022437e-02\n25 7 25 -3.64452322958889946e-02\n25 7 26 2.24588988784049934e-02\n25 7 27 1.62874789868085630e-02\n25 7 28 4.29245899913783094e-03\n25 7 29 6.42760681984817654e-04\n25 7 30 6.02730687387264452e-05\n25 7 31 3.54381295620825610e-06\n25 7 32 1.20644048508896492e-07\n25 7 33 1.82814998371114153e-09\n25 8 16 1.10387112333247589e-08\n25 8 17 -3.75153812822292137e-07\n25 8 18 6.23465180076712076e-06\n25 8 19 -6.62858262722958386e-05\n25 8 20 4.93586407587994177e-04\n25 8 21 -2.63193018477458314e-03\n25 8 22 9.71320040580788820e-03\n25 8 23 -2.15586453093883205e-02\n25 8 24 1.33362984112659303e-02\n25 8 25 4.50268600955856162e-02\n25 8 26 -1.46305201428816631e-02\n25 8 27 -1.95309891104722682e-02\n25 8 28 -7.11593287841445828e-03\n25 8 29 -1.44622106245251294e-03\n25 8 30 -1.87904574648126373e-04\n25 8 31 -1.61280650889526388e-05\n25 8 32 -8.93766399169352844e-07\n25 8 33 -2.91932141524443484e-08\n25 8 34 -4.29358402503354957e-10\n25 9 15 6.20271485816357261e-09\n25 9 16 -1.98389934368535596e-07\n25 9 17 3.13431602866314517e-06\n25 9 18 -3.21250511173709146e-05\n25 9 19 2.35424951150651739e-04\n25 9 20 -1.27715778773530731e-03\n25 9 21 5.09482065407629742e-03\n25 9 22 -1.40768095308322333e-02\n25 9 23 2.19867755352220212e-02\n25 9 24 -7.00206596175065568e-04\n25 9 25 -5.08698919309618565e-02\n25 9 26 3.21023891012234336e-03\n25 9 27 2.09170003112202049e-02\n25 9 28 1.06519246079760816e-02\n25 9 29 2.87242126924230798e-03\n25 9 30 4.96415815716230124e-04\n25 9 31 5.82131912786506077e-05\n25 9 32 4.65739582237923824e-06\n25 9 33 2.45349982738589772e-07\n25 9 34 7.71651540589891180e-09\n25 9 35 1.10247184656728039e-10\n25 10 14 4.13226741727286130e-09\n25 10 15 -1.23899132253061306e-07\n25 10 16 1.85060130079210328e-06\n25 10 17 -1.81321641907425677e-05\n25 10 18 1.28985408262999594e-04\n25 10 19 -6.94759523670931602e-04\n25 10 20 2.85474626931512371e-03\n25 10 21 -8.70984261061794814e-03\n25 10 22 1.80318577635411811e-02\n25 10 23 -1.81384040483180915e-02\n25 10 24 -1.46557887774531117e-02\n25 10 25 5.15577363390290169e-02\n25 10 26 1.10222457342445274e-02\n25 10 27 -1.90950682185895461e-02\n25 10 28 -1.43817222636617967e-02\n25 10 29 -5.11112552468108489e-03\n25 10 30 -1.14649586644567816e-03\n25 10 31 -1.76426197200879765e-04\n25 10 32 -1.90901886061347589e-05\n25 10 33 -1.43990809589599736e-06\n25 10 34 -7.25250376219926706e-08\n25 10 35 -2.20218578874924661e-09\n25 10 36 -3.05888641897551100e-11\n25 11 13 3.24549618688702944e-09\n25 11 14 -9.08159194513491016e-08\n25 11 15 1.27539000414082027e-06\n25 11 16 -1.18586650152426406e-05\n25 11 17 8.10251101187973590e-05\n25 11 18 -4.26224315177280487e-04\n25 11 19 1.75337731630266112e-03\n25 11 20 -5.58221228139562420e-03\n25 11 21 1.31202372209316782e-02\n25 11 22 -1.98042847239651088e-02\n25 11 23 8.86190741550109451e-03\n25 11 24 3.02027408789806962e-02\n25 11 25 -4.48665794319926143e-02\n25 11 26 -2.60351068335695684e-02\n25 11 27 1.28820086430168875e-02\n25 11 28 1.72777536358271382e-02\n25 11 29 8.19065265056495449e-03\n25 11 30 2.35603226922509173e-03\n25 11 31 4.63945664324990722e-04\n25 11 32 6.52359395598871904e-05\n25 11 33 6.60405023990984634e-06\n25 11 34 4.73219989223112854e-07\n25 11 35 2.28843082523572858e-08\n25 11 36 6.72259451252649528e-10\n25 11 37 9.08541678387484811e-12\n25 12 12 2.99545734144504652e-09\n25 12 13 -7.78242646093202254e-08\n25 12 14 1.02172021226446673e-06\n25 12 15 -8.95317213801584050e-06\n25 12 16 5.82322513586150363e-05\n25 12 17 -2.95429012936844716e-04\n25 12 18 1.19356176868352015e-03\n25 12 19 -3.83645603132343371e-03\n25 12 20 9.55623380496962122e-03\n25 12 21 -1.71109927516647782e-02\n25 12 22 1.71429248677928260e-02\n25 12 23 5.62704738993260056e-03\n25 12 24 -4.19404036538975960e-02\n25 12 25 2.97584902436439688e-02\n25 12 26 3.84410979228648118e-02\n25 12 27 -1.87183392267542244e-03\n25 12 28 -1.78218958058367954e-02\n25 12 29 -1.17792383157563119e-02\n25 12 30 -4.34534087879107366e-03\n25 12 31 -1.07939056406755400e-03\n25 12 32 -1.92279198379596026e-04\n25 12 33 -2.51084564868205931e-05\n25 12 34 -2.40036021048758907e-06\n25 12 35 -1.64301365146466081e-07\n25 12 36 -7.65264431547371445e-09\n25 12 37 -2.17860641072707310e-10\n25 12 38 -2.86683556117619278e-12\n25 13 11 3.24549618688702944e-09\n25 13 12 -7.78242646093202254e-08\n25 13 13 9.49164350796756815e-07\n25 13 14 -7.78412425767843208e-06\n25 13 15 4.77983207347806228e-05\n25 13 16 -2.31422767796559931e-04\n25 13 17 9.04983163136947435e-04\n25 13 18 -2.87242264025954854e-03\n25 13 19 7.29230694570538284e-03\n25 13 20 -1.41432273206090047e-02\n25 13 21 1.84273857915352834e-02\n25 13 22 -8.17232819797316558e-03\n25 13 23 -2.27888013777300460e-02\n25 13 24 4.51435132517091233e-02\n25 13 25 -7.60460030264171345e-03\n25 13 26 -4.39800536509759537e-02\n25 13 27 -1.28104973811885695e-02\n25 13 28 1.43113095948420620e-02\n25 13 29 1.49769004121851188e-02\n25 13 30 7.20159338118363697e-03\n25 13 31 2.24573560332802894e-03\n25 13 32 4.99027790798658546e-04\n25 13 33 8.19370973954895173e-05\n25 13 34 1.00459598828708378e-05\n25 13 35 9.13026448777824896e-07\n25 13 36 5.99447462514238494e-08\n25 13 37 2.69588649145297146e-09\n25 13 38 7.44825727335360034e-11\n25 13 39 9.54983265034637051e-13\n25 14 10 4.13226741727286130e-09\n25 14 11 -9.08159194513491016e-08\n25 14 12 1.02172021226446673e-06\n25 14 13 -7.78412425767843208e-06\n25 14 14 4.47593567172474370e-05\n25 14 15 -2.04842899017016832e-04\n25 14 16 7.66027932201249800e-04\n25 14 17 -2.36118558329256220e-03\n25 14 18 5.95351828113582337e-03\n25 14 19 -1.19131216042291304e-02\n25 14 20 1.74699935121631077e-02\n25 14 21 -1.42022257056481291e-02\n25 14 22 -7.12444157545285056e-03\n25 14 23 3.73556070021109328e-02\n25 14 24 -3.61400371983577205e-02\n25 14 25 -1.68892559824298238e-02\n25 14 26 3.88558778764826883e-02\n25 14 27 2.79300360836247682e-02\n25 14 28 -5.56589657269231312e-03\n25 14 29 -1.62330887401158984e-02\n25 14 30 -1.06521190043134548e-02\n25 14 31 -4.19500769453728844e-03\n25 14 32 -1.15435043648384744e-03\n25 14 33 -2.34506243221420097e-04\n25 14 34 -3.59411795679107038e-05\n25 14 35 -4.16988899564498867e-06\n25 14 36 -3.62096195986639955e-07\n25 14 37 -2.28766130886807985e-08\n25 14 38 -9.95418691904794236e-10\n25 14 39 -2.67224727070033135e-11\n25 14 40 -3.34057008060836909e-13\n25 15 9 6.20271485816357261e-09\n25 15 10 -1.23899132253061306e-07\n25 15 11 1.27539000414082027e-06\n25 15 12 -8.95317213801584050e-06\n25 15 13 4.77983207347806228e-05\n25 15 14 -2.04842899017016832e-04\n25 15 15 7.24560169091337374e-04\n25 15 16 -2.13908857351996056e-03\n25 15 17 5.25430317581497519e-03\n25 15 18 -1.05136546163986350e-02\n25 15 19 1.62139756592689502e-02\n25 15 20 -1.63637216694894286e-02\n25 15 21 2.41395495268573987e-03\n25 15 22 2.52782379934209607e-02\n25 15 23 -4.23535636340686701e-02\n25 15 24 1.49027366067645995e-02\n25 15 25 3.59363907031174038e-02\n25 15 26 -2.18744524161578889e-02\n25 15 27 -3.82855143508178098e-02\n25 15 28 -8.01478819734324276e-03\n25 15 29 1.36019003797006253e-02\n25 15 30 1.38008104137471648e-02\n25 15 31 7.01753326717814156e-03\n25 15 32 2.39372694894592809e-03\n25 15 33 5.96421032231466945e-04\n25 15 34 1.12390456289755449e-04\n25 15 35 1.62238930237950895e-05\n25 15 36 1.79161754194091631e-06\n25 15 37 1.49223520668409726e-07\n25 15 38 9.09554150153640066e-09\n25 15 39 3.83570106985271843e-10\n25 15 40 1.00161410776040736e-11\n25 15 41 1.22157145926172309e-13\n25 16 8 1.10387112333247589e-08\n25 16 9 -1.98389934368535596e-07\n25 16 10 1.85060130079210328e-06\n25 16 11 -1.18586650152426406e-05\n25 16 12 5.82322513586150363e-05\n25 16 13 -2.31422767796559931e-04\n25 16 14 7.66027932201249800e-04\n25 16 15 -2.13908857351996056e-03\n25 16 16 5.03754187022517390e-03\n25 16 17 -9.85013236050539277e-03\n25 16 18 1.53327681120386699e-02\n25 16 19 -1.69445145254034350e-02\n25 16 20 7.50584271055712458e-03\n25 16 21 1.56949227096673187e-02\n25 16 22 -3.88110354780423652e-02\n25 16 23 3.22006980082715992e-02\n25 16 24 1.26687322819899676e-02\n25 16 25 -4.10085356566054434e-02\n25 16 26 -3.33944935082400844e-03\n25 16 27 3.81742023769751868e-02\n25 16 28 2.34348295606617359e-02\n25 16 29 -5.53815191254442255e-03\n25 16 30 -1.49941819223361412e-02\n25 16 31 -1.03989975306841967e-02\n25 16 32 -4.44980540928463083e-03\n25 16 33 -1.35744855160225595e-03\n25 16 34 -3.11488050559041998e-04\n25 16 35 -5.50108607751129819e-05\n25 16 36 -7.52955117142789345e-06\n25 16 37 -7.95021058937679497e-07\n25 16 38 -6.37102596952621854e-08\n25 16 39 -3.75448936853385590e-09\n25 16 40 -1.53673790704914332e-10\n25 16 41 -3.90711949801221251e-12\n25 16 42 -4.65166237200971941e-14\n25 17 7 2.34930430482530758e-08\n25 17 8 -3.75153812822292137e-07\n25 17 9 3.13431602866314517e-06\n25 17 10 -1.81321641907425677e-05\n25 17 11 8.10251101187973590e-05\n25 17 12 -2.95429012936844716e-04\n25 17 13 9.04983163136947435e-04\n25 17 14 -2.36118558329256220e-03\n25 17 15 5.25430317581497519e-03\n25 17 16 -9.85013236050539277e-03\n25 17 17 1.50257373373588602e-02\n25 17 18 -1.70284862678526322e-02\n25 17 19 9.88990239291918005e-03\n25 17 20 9.71720115900297788e-03\n25 17 21 -3.34953979761628593e-02\n25 17 22 3.85296895052176422e-02\n25 17 23 -7.35063724166447347e-03\n25 17 24 -3.48481849164264541e-02\n25 17 25 2.73888670649666399e-02\n25 17 26 2.75930591477816302e-02\n25 17 27 -2.43541600504633809e-02\n25 17 28 -3.49326305080676225e-02\n25 17 29 -7.77513835126862410e-03\n25 17 30 1.21005930129963499e-02\n25 17 31 1.33134481974277380e-02\n25 17 32 7.36715907554899470e-03\n25 17 33 2.76963457726898159e-03\n25 17 34 7.71214814913009276e-04\n25 17 35 1.64928599383987206e-04\n25 17 36 2.75071620350042675e-05\n25 17 37 3.58840938567470375e-06\n25 17 38 3.63572779710511002e-07\n25 17 39 2.81036838836129338e-08\n25 17 40 1.60411558935627328e-09\n25 17 41 6.38065496753180480e-11\n25 17 42 1.58088099048481850e-12\n25 17 43 1.83835799462398471e-14\n25 18 6 6.05420124443733601e-08\n25 18 7 -8.45423194506076031e-07\n25 18 8 6.23465180076712076e-06\n25 18 9 -3.21250511173709146e-05\n25 18 10 1.28985408262999594e-04\n25 18 11 -4.26224315177280487e-04\n25 18 12 1.19356176868352015e-03\n25 18 13 -2.87242264025954854e-03\n25 18 14 5.95351828113582337e-03\n25 18 15 -1.05136546163986350e-02\n25 18 16 1.53327681120386699e-02\n25 18 17 -1.70284862678526322e-02\n25 18 18 1.05787279566229815e-02\n25 18 19 6.93436168652069109e-03\n25 18 20 -2.96599253878087294e-02\n25 18 21 3.98110225894970802e-02\n25 18 22 -1.94459429569485983e-02\n25 18 23 -2.21844332069237410e-02\n25 18 24 3.86429444814514194e-02\n25 18 25 7.62243682281629270e-04\n25 18 26 -3.87263904249225422e-02\n25 18 27 -4.21399851562912084e-04\n25 18 28 3.56424066020426000e-02\n25 18 29 2.30715404903656716e-02\n25 18 30 -3.48459274453753503e-03\n25 18 31 -1.38926377931924214e-02\n25 18 32 -1.06883176314664282e-02\n25 18 33 -5.04654982667993406e-03\n25 18 34 -1.71089979642799996e-03\n25 18 35 -4.41012093602635117e-04\n25 18 36 -8.86680707964330872e-05\n25 18 37 -1.40475796539717441e-05\n25 18 38 -1.75375815211359929e-06\n25 18 39 -1.71005754782498564e-07\n25 18 40 -1.27774825787228150e-08\n25 18 41 -7.07486306508635387e-10\n25 18 42 -2.73786114999833510e-11\n25 18 43 -6.61553501293380246e-13\n25 18 44 -7.51813885648344463e-15\n25 19 5 1.92318914840671288e-07\n25 19 6 -2.29979972949506032e-06\n25 19 7 1.46912725356971563e-05\n25 19 8 -6.62858262722958386e-05\n25 19 9 2.35424951150651739e-04\n25 19 10 -6.94759523670931602e-04\n25 19 11 1.75337731630266112e-03\n25 19 12 -3.83645603132343371e-03\n25 19 13 7.29230694570538284e-03\n25 19 14 -1.19131216042291304e-02\n25 19 15 1.62139756592689502e-02\n25 19 16 -1.69445145254034350e-02\n25 19 17 9.88990239291918005e-03\n25 19 18 6.93436168652069109e-03\n25 19 19 -2.83149506813760137e-02\n25 19 20 3.96872632571194403e-02\n25 19 21 -2.53169133776402450e-02\n25 19 22 -1.20316369697946345e-02\n25 19 23 3.88913345196037820e-02\n25 19 24 -1.86460251366356252e-02\n25 19 25 -2.87482117668014240e-02\n25 19 26 2.82737363533651576e-02\n25 19 27 2.57203511181240016e-02\n25 19 28 -2.14760465130886412e-02\n25 19 29 -3.37611709142168271e-02\n25 19 30 -1.03485917922236511e-02\n25 19 31 9.84413122853800635e-03\n25 19 32 1.31187406739234967e-02\n25 19 33 8.12021041958794861e-03\n25 19 34 3.39420322358684479e-03\n25 19 35 1.05586012152741878e-03\n25 19 36 2.54522923835366298e-04\n25 19 37 4.84319044577213818e-05\n25 19 38 7.32246319404551139e-06\n25 19 39 8.77767800887695538e-07\n25 19 40 8.25714769553931517e-08\n25 19 41 5.97463383552788652e-09\n25 19 42 3.21341703109251358e-10\n25 19 43 1.21103141377969107e-11\n25 19 44 2.85590336534210172e-13\n25 19 45 3.17342185777572668e-15\n25 20 4 7.72909480527135423e-07\n25 20 5 -7.69035223145103457e-06\n25 20 6 4.14900332979217611e-05\n25 20 7 -1.60291607927106822e-04\n25 20 8 4.93586407587994177e-04\n25 20 9 -1.27715778773530731e-03\n25 20 10 2.85474626931512371e-03\n25 20 11 -5.58221228139562420e-03\n25 20 12 9.55623380496962122e-03\n25 20 13 -1.41432273206090047e-02\n25 20 14 1.74699935121631077e-02\n25 20 15 -1.63637216694894286e-02\n25 20 16 7.50584271055712458e-03\n25 20 17 9.71720115900297788e-03\n25 20 18 -2.96599253878087294e-02\n25 20 19 3.96872632571194403e-02\n25 20 20 -2.70177233084082024e-02\n25 20 21 -6.82579774988082526e-03\n25 20 22 3.63599949992695562e-02\n25 20 23 -2.84281984000754558e-02\n25 20 24 -1.47241723256806813e-02\n25 20 25 3.74637819071046288e-02\n25 20 26 3.94611534646439930e-04\n25 20 27 -3.67218315855608951e-02\n25 20 28 -4.12902531997399611e-03\n25 20 29 3.21974281330660826e-02\n25 20 30 2.51853154226226636e-02\n25 20 31 2.48620150340419526e-04\n25 20 32 -1.24822844387689402e-02\n25 20 33 -1.12653346305590363e-02\n25 20 34 -5.97340424260336441e-03\n25 20 35 -2.26200425184955368e-03\n25 20 36 -6.53626535158235289e-04\n25 20 37 -1.48483886742857602e-04\n25 20 38 -2.68808051421266196e-05\n25 20 39 -3.89298030144998530e-06\n25 20 40 -4.49317683642646707e-07\n25 20 41 -4.08609394246578299e-08\n25 20 42 -2.86756531443105374e-09\n25 20 43 -1.49991259415086678e-10\n25 20 44 -5.50982714197101731e-12\n25 20 45 -1.26897200337779645e-13\n25 20 46 -1.37939888361180222e-15\n25 21 3 4.08869312328179232e-06\n25 21 4 -3.24529955743907333e-05\n25 21 5 1.42620958812545515e-04\n25 21 6 -4.57381923995579517e-04\n25 21 7 1.18850714374717320e-03\n25 21 8 -2.63193018477458314e-03\n25 21 9 5.09482065407629742e-03\n25 21 10 -8.70984261061794814e-03\n25 21 11 1.31202372209316782e-02\n25 21 12 -1.71109927516647782e-02\n25 21 13 1.84273857915352834e-02\n25 21 14 -1.42022257056481291e-02\n25 21 15 2.41395495268573987e-03\n25 21 16 1.56949227096673187e-02\n25 21 17 -3.34953979761628593e-02\n25 21 18 3.98110225894970802e-02\n25 21 19 -2.53169133776402450e-02\n25 21 20 -6.82579774988082526e-03\n25 21 21 3.51405849576428060e-02\n25 21 22 -3.20731726851724187e-02\n25 21 23 -5.24239626861933490e-03\n25 21 24 3.67610743858701799e-02\n25 21 25 -1.75005343971193699e-02\n25 21 26 -2.91261644047538057e-02\n25 21 27 2.36038832571991658e-02\n25 21 28 2.82996872563577669e-02\n25 21 29 -1.48335080031297625e-02\n25 21 30 -3.32328834855616633e-02\n25 21 31 -1.49119410693445651e-02\n25 21 32 6.44430770174350492e-03\n25 21 33 1.27795920221495849e-02\n25 21 34 9.16384130435268613e-03\n25 21 35 4.31086671788016491e-03\n25 21 36 1.50225406553291287e-03\n25 21 37 4.06908645286418577e-04\n25 21 38 8.76337366101840890e-05\n25 21 39 1.51572054159466946e-05\n25 21 40 2.10917308449313924e-06\n25 21 41 2.34930264946646023e-07\n25 21 42 2.06903082891693287e-08\n25 21 43 1.41022361161188693e-09\n25 21 44 7.18117377714117004e-11\n25 21 45 2.57338504438583546e-12\n25 21 46 5.79183293684566174e-14\n25 21 47 6.16187309077292233e-16\n25 22 2 3.04012176297874469e-05\n25 22 3 -1.79856029001197142e-04\n25 22 4 6.08680708732907880e-04\n25 22 5 -1.54706730014605719e-03\n25 22 6 3.26273992587994434e-03\n25 22 7 -5.97724655801323882e-03\n25 22 8 9.71320040580788820e-03\n25 22 9 -1.40768095308322333e-02\n25 22 10 1.80318577635411811e-02\n25 22 11 -1.98042847239651088e-02\n25 22 12 1.71429248677928260e-02\n25 22 13 -8.17232819797316558e-03\n25 22 14 -7.12444157545285056e-03\n25 22 15 2.52782379934209607e-02\n25 22 16 -3.88110354780423652e-02\n25 22 17 3.85296895052176422e-02\n25 22 18 -1.94459429569485983e-02\n25 22 19 -1.20316369697946345e-02\n25 22 20 3.63599949992695562e-02\n25 22 21 -3.20731726851724187e-02\n25 22 22 -2.06255764248848570e-03\n25 22 23 3.45916009082023225e-02\n25 22 24 -2.60199530408255838e-02\n25 22 25 -1.77425068864508321e-02\n25 22 26 3.44515945762844295e-02\n25 22 27 7.49218033325680343e-03\n25 22 28 -3.41216012979107842e-02\n25 22 29 -1.21027558610032112e-02\n25 22 30 2.66805770175548882e-02\n25 22 31 2.82719263787795605e-02\n25 22 32 5.69205960704205894e-03\n25 22 33 -1.01690111311933020e-02\n25 22 34 -1.18166514689016417e-02\n25 22 35 -7.21111158729562985e-03\n25 22 36 -3.07685573335538652e-03\n25 22 37 -9.97914835760025696e-04\n25 22 38 -2.55151070692516089e-04\n25 22 39 -5.23443357306399714e-05\n25 22 40 -8.67964955319573145e-06\n25 22 41 -1.16351525550351945e-06\n25 22 42 -1.25318462810713599e-07\n25 22 43 -1.07049591256296965e-08\n25 22 44 -7.09489689204376909e-10\n25 22 45 -3.52063078993805533e-11\n25 22 46 -1.23166091281870361e-12\n25 22 47 -2.71052385664545387e-14\n25 22 48 -2.82361554577572263e-16\n25 23 1 3.60994457998584196e-04\n25 23 2 -1.39812552390168943e-03\n25 23 3 3.29469645236093360e-03\n25 23 4 -6.14249861504260538e-03\n25 23 5 9.88359407648925143e-03\n25 23 6 -1.42136292428015720e-02\n25 23 7 1.84707541863201914e-02\n25 23 8 -2.15586453093883205e-02\n25 23 9 2.19867755352220212e-02\n25 23 10 -1.81384040483180915e-02\n25 23 11 8.86190741550109451e-03\n25 23 12 5.62704738993260056e-03\n25 23 13 -2.27888013777300460e-02\n25 23 14 3.73556070021109328e-02\n25 23 15 -4.23535636340686701e-02\n25 23 16 3.22006980082715992e-02\n25 23 17 -7.35063724166447347e-03\n25 23 18 -2.21844332069237410e-02\n25 23 19 3.88913345196037820e-02\n25 23 20 -2.84281984000754558e-02\n25 23 21 -5.24239626861933490e-03\n25 23 22 3.45916009082023225e-02\n25 23 23 -2.83535571651088786e-02\n25 23 24 -1.10392813167100244e-02\n25 23 25 3.61159161795637805e-02\n25 23 26 -8.37444873492003533e-03\n25 23 27 -3.26947252267090349e-02\n25 23 28 1.38349735018995497e-02\n25 23 29 3.20046032341601347e-02\n25 23 30 -4.49264082260261309e-03\n25 23 31 -3.12925623227911136e-02\n25 23 32 -2.06673775730506040e-02\n25 23 33 1.40147298437341081e-03\n25 23 34 1.17206510771791432e-02\n25 23 35 1.03056056127324646e-02\n25 23 36 5.55679201043458407e-03\n25 23 37 2.18336610077654262e-03\n25 23 38 6.64664749580038292e-04\n25 23 39 1.61307021629542133e-04\n25 23 40 3.16457264243130577e-05\n25 23 41 5.04528193968549114e-06\n25 23 42 6.52963994558087766e-07\n25 23 43 6.81230469108907888e-08\n25 23 44 5.65189929089568760e-09\n25 23 45 3.64639442247329726e-10\n25 23 46 1.76473240831001408e-11\n25 23 47 6.03128280007927116e-13\n25 23 48 1.29855620005383256e-14\n25 23 49 1.32512633704123705e-16\n25 24 0 1.00020006002000700e-02\n25 24 1 -1.73239732168809267e-02\n25 24 2 2.22843478017052967e-02\n25 24 3 -2.59847547042364483e-02\n25 24 4 2.83849337860938595e-02\n25 24 5 -2.90288453713876270e-02\n25 24 6 2.72175995458941127e-02\n25 24 7 -2.21791755022022437e-02\n25 24 8 1.33362984112659303e-02\n25 24 9 -7.00206596175065568e-04\n25 24 10 -1.46557887774531117e-02\n25 24 11 3.02027408789806962e-02\n25 24 12 -4.19404036538975960e-02\n25 24 13 4.51435132517091233e-02\n25 24 14 -3.61400371983577205e-02\n25 24 15 1.49027366067645995e-02\n25 24 16 1.26687322819899676e-02\n25 24 17 -3.48481849164264541e-02\n25 24 18 3.86429444814514194e-02\n25 24 19 -1.86460251366356252e-02\n25 24 20 -1.47241723256806813e-02\n25 24 21 3.67610743858701799e-02\n25 24 22 -2.60199530408255838e-02\n25 24 23 -1.10392813167100244e-02\n25 24 24 3.58724674701539058e-02\n25 24 25 -1.56467597926944057e-02\n25 24 26 -2.64471685159149891e-02\n25 24 27 2.71195590964951013e-02\n25 24 28 1.89013565508414310e-02\n25 24 29 -2.76718880709534227e-02\n25 24 30 -2.19849354627217974e-02\n25 24 31 1.74805196220574474e-02\n25 24 32 3.04259967065269760e-02\n25 24 33 1.26904359762228523e-02\n25 24 34 -6.25393578237922506e-03\n25 24 35 -1.18567956631045665e-02\n25 24 36 -8.66420981917985070e-03\n25 24 37 -4.22554145541858507e-03\n25 24 38 -1.54578539515488874e-03\n25 24 39 -4.44605731189312206e-04\n25 24 40 -1.02875053648029126e-04\n25 24 41 -1.93627430802935279e-05\n25 24 42 -2.97534993170393406e-06\n25 24 43 -3.72478780655253430e-07\n25 24 44 -3.76982669499335096e-08\n25 24 45 -3.04140999063318677e-09\n25 24 46 -1.91193917204987459e-10\n25 24 47 -9.03174612733962083e-12\n25 24 48 -3.01744798365035437e-13\n25 24 49 -6.35922592805453891e-15\n25 24 50 -6.35954391320002630e-17\n25 25 1 -6.66942937069263494e-04\n25 25 2 2.58305888813991879e-03\n25 25 3 -6.09489807471854423e-03\n25 25 4 1.14110240278732565e-02\n25 25 5 -1.85358046897062885e-02\n25 25 6 2.71470037034092116e-02\n25 25 7 -3.64452322958889946e-02\n25 25 8 4.50268600955856162e-02\n25 25 9 -5.08698919309618565e-02\n25 25 10 5.15577363390290169e-02\n25 25 11 -4.48665794319926143e-02\n25 25 12 2.97584902436439688e-02\n25 25 13 -7.60460030264171345e-03\n25 25 14 -1.68892559824298238e-02\n25 25 15 3.59363907031174038e-02\n25 25 16 -4.10085356566054434e-02\n25 25 17 2.73888670649666399e-02\n25 25 18 7.62243682281629270e-04\n25 25 19 -2.87482117668014240e-02\n25 25 20 3.74637819071046288e-02\n25 25 21 -1.75005343971193699e-02\n25 25 22 -1.77425068864508321e-02\n25 25 23 3.61159161795637805e-02\n25 25 24 -1.56467597926944057e-02\n25 25 25 -2.36806669774456087e-02\n25 25 26 3.14311878095266488e-02\n25 25 27 7.30536136657510655e-03\n25 25 28 -3.36550836957846938e-02\n25 25 29 -1.27439940567039964e-03\n25 25 30 3.24747904042627764e-02\n25 25 31 8.90002957927260407e-03\n25 25 32 -2.55713289756208530e-02\n25 25 33 -2.61861998320904803e-02\n25 25 34 -5.58943602455557274e-03\n25 25 35 9.18565866727555493e-03\n25 25 36 1.11666714123772303e-02\n25 25 37 7.11108907603921980e-03\n25 25 38 3.18704687755105733e-03\n25 25 39 1.09451324097955098e-03\n25 25 40 2.99004500656645012e-04\n25 25 41 6.62055869854154894e-05\n25 25 42 1.19876072777259218e-05\n25 25 43 1.77917168635728187e-06\n25 25 44 2.15805059308920189e-07\n25 25 45 2.12165293184725022e-08\n25 25 46 1.66628673661525662e-09\n25 25 47 1.02155437937636918e-10\n25 25 48 4.71363155462630811e-12\n25 25 49 1.54034891752578308e-13\n25 25 50 3.17913593860053174e-15\n25 25 51 3.11694973914318820e-17\n26 0 25 9.61716310141025403e-03\n26 0 27 -9.26084733220795093e-03\n26 1 24 3.33214951982413496e-04\n26 1 25 -1.66574151163192390e-02\n26 1 26 -6.17486918919385844e-04\n26 1 27 1.60402581005228643e-02\n26 1 28 2.86478859846933836e-04\n26 2 23 2.68920023992144155e-05\n26 2 24 -1.29053595973519156e-03\n26 2 25 2.14328153530593324e-02\n26 2 26 2.39151655347571091e-03\n26 2 27 -2.06437730675813838e-02\n26 2 28 -1.10952785322766341e-03\n26 2 29 -1.91326345170933177e-05\n26 3 22 3.45940953135297140e-06\n26 3 23 -1.59095231721058773e-04\n26 3 24 3.04215130049323007e-03\n26 3 25 -2.50197580680286408e-02\n26 3 26 -5.64416409776957067e-03\n26 3 27 2.41226126089817595e-02\n26 3 28 2.61689622445955820e-03\n26 3 29 1.13190192264009662e-04\n26 3 30 1.88676527333306387e-06\n26 4 21 6.24211503136521666e-07\n26 4 22 -2.74582119092593950e-05\n26 4 23 5.38640039542122582e-04\n26 4 24 -5.67768012160519136e-03\n26 4 25 2.74104343574627400e-02\n26 4 26 1.05745647541313176e-02\n26 4 27 -2.64958021762168455e-02\n26 4 28 -4.89269975277418487e-03\n26 4 29 -3.83592902591940000e-04\n26 4 30 -1.49757350867762830e-05\n26 4 31 -2.41575538763303152e-07\n26 5 20 1.47918743434317799e-07\n26 5 21 -6.21082603718278556e-06\n26 5 22 1.20731659323251498e-04\n26 5 23 -1.37067217450971205e-03\n26 5 24 9.15755886969661078e-03\n26 5 25 -2.82101054645438755e-02\n26 5 26 -1.72039917662882737e-02\n26 5 27 2.74210686152904378e-02\n26 5 28 7.92306565442666796e-03\n26 5 29 9.78872887226002510e-04\n26 5 30 6.59469352128604075e-05\n26 5 31 2.40364626181749926e-06\n26 5 32 3.75615582719442536e-08\n26 6 19 4.42350981982663552e-08\n26 6 20 -1.76885090277949020e-06\n26 6 21 3.35288467281432714e-05\n26 6 22 -3.87719425106562696e-04\n26 6 23 2.89789353616862472e-03\n26 6 24 -1.32303977025181974e-02\n26 6 25 2.67955600308631564e-02\n26 6 26 2.52710429693482518e-02\n26 6 27 -2.63413620199375740e-02\n26 6 28 -1.15348812547374796e-02\n26 6 29 -2.08167199911074774e-03\n26 6 30 -2.12655651890338049e-04\n26 6 31 -1.30044998556683215e-05\n26 6 32 -4.49170907733106553e-07\n26 6 33 -6.80640112632861709e-09\n26 7 18 1.62611455025604372e-08\n26 7 19 -6.17709529600282379e-07\n26 7 20 1.13081803044779933e-05\n26 7 21 -1.29746358240290911e-04\n26 7 22 1.01026318437551238e-03\n26 7 23 -5.33271720717733404e-03\n26 7 24 1.73355716466742243e-02\n26 7 25 -2.24588988784049934e-02\n26 7 26 -3.40999937412719490e-02\n26 7 27 2.26079585697255454e-02\n26 7 28 1.53204509771431941e-02\n26 7 29 3.87116018874634013e-03\n26 7 30 5.58630143541251363e-04\n26 7 31 5.06114322463209561e-05\n26 7 32 2.88023671270359444e-06\n26 7 33 9.50462191622320984e-08\n26 7 34 1.39788968115601648e-09\n26 8 17 7.21583081205583395e-09\n26 8 18 -2.59669670021621106e-07\n26 8 19 4.55958937259555564e-06\n26 8 20 -5.11206212349958906e-05\n26 8 21 4.00785969338551919e-04\n26 8 22 -2.24794314111245826e-03\n26 8 23 8.73155487754605076e-03\n26 8 24 -2.05292883712513795e-02\n26 8 25 1.46305201428816631e-02\n26 8 26 4.24834441262494917e-02\n26 8 27 -1.56674109417260302e-02\n26 8 28 -1.85724809044413821e-02\n26 8 29 -6.45048130554017212e-03\n26 8 30 -1.26057817305438725e-03\n26 8 31 -1.58051968552570545e-04\n26 8 32 -1.31203105518891341e-05\n26 8 33 -7.04409233946757012e-07\n26 8 34 -2.23225081022278879e-08\n26 8 35 -3.18925517969718849e-10\n26 9 16 3.81589671300056507e-09\n26 9 17 -1.29684359972794086e-07\n26 9 18 2.17191455302450070e-06\n26 9 19 -2.35482879237237563e-05\n26 9 20 1.82226422471338758e-04\n26 9 21 -1.04257358270705398e-03\n26 9 22 4.38549174633188362e-03\n26 9 23 -1.28115583976861789e-02\n26 9 24 2.15004612686009963e-02\n26 9 25 -3.21023891012234336e-03\n26 9 26 -4.86511004060432503e-02\n26 9 27 5.34125839289801133e-03\n26 9 28 2.02724975872138477e-02\n26 9 29 9.73503240461705327e-03\n26 9 30 2.51532049481027957e-03\n26 9 31 4.18733085233584631e-04\n26 9 32 4.74386456309207613e-05\n26 9 33 3.67422097414110336e-06\n26 9 34 1.87684812838307612e-07\n26 9 35 5.73179343503914730e-09\n26 9 36 7.96159215284566381e-11\n26 10 15 2.38311632600178061e-09\n26 10 16 -7.62224771441542579e-08\n26 10 17 1.21135232162931707e-06\n26 10 18 -1.25992442875364111e-05\n26 10 19 9.49533206467800735e-05\n26 10 20 -5.41037547979439124e-04\n26 10 21 2.35018457810015832e-03\n26 10 22 -7.58961314979512043e-03\n26 10 23 1.67490425818168089e-02\n26 10 24 -1.87671445085630499e-02\n26 10 25 -1.10222457342445274e-02\n26 10 26 5.04272076214032429e-02\n26 10 27 7.81839624339751516e-03\n26 10 28 -1.91944611786864800e-02\n26 10 29 -1.33146120996488616e-02\n26 10 30 -4.50753274311086757e-03\n26 10 31 -9.71341359638229037e-04\n26 10 32 -1.44176650059864999e-04\n26 10 33 -1.50867837736276425e-05\n26 10 34 -1.10259259805752046e-06\n26 10 35 -5.38950017483849124e-08\n26 10 36 -1.59032678697471505e-09\n26 10 37 -2.14928650765754338e-11\n26 11 14 1.74678301913632068e-09\n26 11 15 -5.23743694323163828e-08\n26 11 16 7.85905852650211568e-07\n26 11 17 -7.78794218774205093e-06\n26 11 18 5.65850150100551365e-05\n26 11 19 -3.15975488265693397e-04\n26 11 20 1.37843138289826094e-03\n26 11 21 -4.65575607683521426e-03\n26 11 22 1.16549326616983413e-02\n26 11 23 -1.90634412022013331e-02\n26 11 24 1.11395310638126989e-02\n26 11 25 2.60351068335695684e-02\n26 11 26 -4.56860226405418326e-02\n26 11 27 -2.21841299482944384e-02\n26 11 28 1.41898691250614942e-02\n26 11 29 1.63337949863756838e-02\n26 11 30 7.30075208294662137e-03\n26 11 31 2.00919281241413413e-03\n26 11 32 3.80763753002952088e-04\n26 11 33 5.17008527301072529e-05\n26 11 34 5.06607617133038930e-06\n26 11 35 3.52027127625118324e-07\n26 11 36 1.65336958312624505e-08\n26 11 37 4.72354304906327781e-10\n26 11 38 6.21572631069323777e-12\n26 12 13 1.49689729199028474e-09\n26 12 14 -4.18863853378066607e-08\n26 12 15 5.90408481846494064e-07\n26 12 16 -5.53887379171243574e-06\n26 12 17 3.84723112401090984e-05\n26 12 18 -2.08016683092553036e-04\n26 12 19 8.94482265353725228e-04\n26 12 20 -3.05971588287737428e-03\n26 12 21 8.13040362749160681e-03\n26 12 22 -1.56828480663284044e-02\n26 12 23 1.77638505357077055e-02\n26 12 24 1.53737348977011807e-03\n26 12 25 -3.84410979228648118e-02\n26 12 26 3.31598653073319938e-02\n26 12 27 3.48983749037030901e-02\n26 12 28 -4.68818547492369375e-03\n26 12 29 -1.74767057212358310e-02\n26 12 30 -1.06696946076094948e-02\n26 12 31 -3.74115114204807784e-03\n26 12 32 -8.91408379155962777e-04\n26 12 33 -1.53029548977295363e-04\n26 12 34 -1.93159095506548910e-05\n26 12 35 -1.78890638875294650e-06\n26 12 36 -1.18833893330637347e-07\n26 12 37 -5.37960152083793285e-09\n26 12 38 -1.49047880905534504e-10\n26 12 39 -1.91102732800169317e-12\n26 13 12 1.49689729199028474e-09\n26 13 13 -3.88905324515915730e-08\n26 13 14 5.12095798669513722e-07\n26 13 15 -4.51965384166731459e-06\n26 13 16 2.97828793985681210e-05\n26 13 17 -1.54384776748601035e-04\n26 13 18 6.45305810993390589e-04\n26 13 19 -2.18804474171415669e-03\n26 13 20 5.94313691125144487e-03\n26 13 21 -1.24138125421076825e-02\n26 13 22 1.78611658883685082e-02\n26 13 23 -1.09626558009297137e-02\n26 13 24 -1.75262523807251788e-02\n26 13 25 4.39800536509759537e-02\n26 13 26 -1.34963092959232387e-02\n26 13 27 -4.21680764844400790e-02\n26 13 28 -8.64882707519132890e-03\n26 13 29 1.51768230621777533e-02\n26 13 30 1.39109392993277827e-02\n26 13 31 6.28665368857035598e-03\n26 13 32 1.87120396084078971e-03\n26 13 33 3.99576964013441826e-04\n26 13 34 6.32992558411993424e-05\n26 13 35 7.50843096839300588e-06\n26 13 36 6.61603163608665589e-07\n26 13 37 4.21861918399109194e-08\n26 13 38 1.84528545085038640e-09\n26 13 39 4.96499464012728960e-11\n26 13 40 6.20672821974419080e-13\n26 14 11 1.74678301913632068e-09\n26 14 12 -4.18863853378066607e-08\n26 14 13 5.12095798669513722e-07\n26 14 14 -4.22421892483287377e-06\n26 14 15 2.62140927327923151e-05\n26 14 16 -1.29125730467359518e-04\n26 14 17 5.18691858590667116e-04\n26 14 18 -1.71576719568844892e-03\n26 14 19 4.64687875587524545e-03\n26 14 20 -1.00372227355495627e-02\n26 14 21 1.61579063303668255e-02\n26 14 22 -1.56644855917610222e-02\n26 14 23 -1.95473678670866430e-03\n26 14 24 3.26660341188805576e-02\n26 14 25 -3.88558778764826883e-02\n26 14 26 -9.81129629807037469e-03\n26 14 27 4.02591774280297210e-02\n26 14 28 2.33477740356483589e-02\n26 14 29 -8.16120418902865667e-03\n26 14 30 -1.57329033125450152e-02\n26 14 31 -9.49028233971615337e-03\n26 14 32 -3.53963933403862895e-03\n26 14 33 -9.32196023066299773e-04\n26 14 34 -1.82246617836334864e-04\n26 14 35 -2.69756921681022265e-05\n26 14 36 -3.03039846768637467e-06\n26 14 37 -2.55314015137770220e-07\n26 14 38 -1.56764269368897587e-08\n26 14 39 -6.63883107827977353e-10\n26 14 40 -1.73677520355171591e-11\n26 14 41 -2.11817605540331023e-13\n26 15 10 2.38311632600178061e-09\n26 15 11 -5.23743694323163828e-08\n26 15 12 5.90408481846494064e-07\n26 15 13 -4.51965384166731459e-06\n26 15 14 2.62140927327923151e-05\n26 15 15 -1.21665886037969634e-04\n26 15 16 4.64951725123955693e-04\n26 15 17 -1.48106851103902219e-03\n26 15 18 3.92710626922595797e-03\n26 15 19 -8.51634325416044908e-03\n26 15 20 1.44220783571831197e-02\n26 15 21 -1.68112693204569954e-02\n26 15 22 6.85064041345935637e-03\n26 15 23 1.88753913084630966e-02\n26 15 24 -4.08636090495461850e-02\n26 15 25 2.18744524161578889e-02\n26 15 26 3.03046323320880706e-02\n26 15 27 -2.72323958263368287e-02\n26 15 28 -3.50458258361968192e-02\n26 15 29 -3.67247043752674969e-03\n26 15 30 1.43945881730247953e-02\n26 15 31 1.26872229200087831e-02\n26 15 32 6.02812834218871225e-03\n26 15 33 1.95600396258037020e-03\n26 15 34 4.67349308799546807e-04\n26 15 35 8.48535794767145196e-05\n26 15 36 1.18401705378203526e-05\n26 15 37 1.26698738670695696e-06\n26 15 38 1.02456598612237400e-07\n26 15 39 6.07323063191917097e-09\n26 15 40 2.49424863568715565e-10\n26 15 41 6.35099689160201883e-12\n26 15 42 7.56124640683397393e-14\n26 16 9 3.81589671300056507e-09\n26 16 10 -7.62224771441542579e-08\n26 16 11 7.85905852650211568e-07\n26 16 12 -5.53887379171243574e-06\n26 16 13 2.97828793985681210e-05\n26 16 14 -1.29125730467359518e-04\n26 16 15 4.64951725123955693e-04\n26 16 16 -1.40994654695877641e-03\n26 16 17 3.60613447834784018e-03\n26 16 18 -7.68454278614439716e-03\n26 16 19 1.31860707921162775e-02\n26 16 20 -1.67011765711759529e-02\n26 16 21 1.12314001234150399e-02\n26 16 22 8.64104997912044680e-03\n26 16 23 -3.40846661343948560e-02\n26 16 24 3.62615491166411885e-02\n26 16 25 3.33944935082400844e-03\n26 16 26 -4.00558039944473153e-02\n26 16 27 4.97380877228711682e-03\n26 16 28 3.84367167891929165e-02\n26 16 29 1.82976170691895363e-02\n26 16 30 -8.27903005928476298e-03\n26 16 31 -1.45374920603605595e-02\n26 16 32 -9.16914573423676554e-03\n26 16 33 -3.69620075182709116e-03\n26 16 34 -1.07575665822700140e-03\n26 16 35 -2.37078621228963875e-04\n26 16 36 -4.03828931172889888e-05\n26 16 37 -5.34727144263751930e-06\n26 16 38 -5.47486068912172444e-07\n26 16 39 -4.26248610118510249e-08\n26 16 40 -2.44434494141459487e-09\n26 16 41 -9.74933894520550885e-11\n26 16 42 -2.41841711685621871e-12\n26 16 43 -2.81230305625008532e-14\n26 17 8 7.21583081205583395e-09\n26 17 9 -1.29684359972794086e-07\n26 17 10 1.21135232162931707e-06\n26 17 11 -7.78794218774205093e-06\n26 17 12 3.84723112401090984e-05\n26 17 13 -1.54384776748601035e-04\n26 17 14 5.18691858590667116e-04\n26 17 15 -1.48106851103902219e-03\n26 17 16 3.60613447834784018e-03\n26 17 17 -7.42106093906622437e-03\n26 17 18 1.25641936813620997e-02\n26 17 19 -1.63683647463526657e-02\n26 17 20 1.32082289517066467e-02\n26 17 21 2.33102344464136297e-03\n26 17 22 -2.65861518584557012e-02\n26 17 23 3.93503389665101621e-02\n26 17 24 -1.70116112298664817e-02\n26 17 25 -2.75930591477816302e-02\n26 17 26 3.31483630635196958e-02\n26 17 27 1.96079008253017846e-02\n26 17 28 -2.95341125740782722e-02\n26 17 29 -3.11177588053382859e-02\n26 17 30 -3.04026114475157126e-03\n26 17 31 1.31500703752151074e-02\n26 17 32 1.22223896766153349e-02\n26 17 33 6.26266429712382282e-03\n26 17 34 2.22897258512795970e-03\n26 17 35 5.93436302472683459e-04\n26 17 36 1.22041022311217715e-04\n26 17 37 1.96493749485988178e-05\n26 17 38 2.48166514328509359e-06\n26 17 39 2.43978825965934020e-07\n26 17 40 1.83337627169605982e-08\n26 17 41 1.01891553704776488e-09\n26 17 42 3.95165619341868611e-11\n26 17 43 9.55769375666722960e-13\n26 17 44 1.08617169540915167e-14\n26 18 7 1.62611455025604372e-08\n26 18 8 -2.59669670021621106e-07\n26 18 9 2.17191455302450070e-06\n26 18 10 -1.25992442875364111e-05\n26 18 11 5.65850150100551365e-05\n26 18 12 -2.08016683092553036e-04\n26 18 13 6.45305810993390589e-04\n26 18 14 -1.71576719568844892e-03\n26 18 15 3.92710626922595797e-03\n26 18 16 -7.68454278614439716e-03\n26 18 17 1.25641936813620997e-02\n26 18 18 -1.62221525189418544e-02\n26 18 19 1.39464596803998155e-02\n26 18 20 -9.56162498334475978e-04\n26 18 21 -2.11770829640459807e-02\n26 18 22 3.80341279755491132e-02\n26 18 23 -2.80444467433517816e-02\n26 18 24 -1.09747027956454803e-02\n26 18 25 3.87263904249225422e-02\n26 18 26 -1.02458325187344557e-02\n26 18 27 -3.58094535615468384e-02\n26 18 28 8.78749046762894692e-03\n26 18 29 3.58783160253884762e-02\n26 18 30 1.75331729884266764e-02\n26 18 31 -6.75521682335813628e-03\n26 18 32 -1.36888517220495272e-02\n26 18 33 -9.39904134069754972e-03\n26 18 34 -4.14858775067327678e-03\n26 18 35 -1.33603667363942715e-03\n26 18 36 -3.29836283887353480e-04\n26 18 37 -6.38407256963109942e-05\n26 18 38 -9.77195940713707331e-06\n26 18 39 -1.18192270342626667e-06\n26 18 40 -1.11897742704645459e-07\n26 18 41 -8.13276423536066026e-09\n26 18 42 -4.38701352931734059e-10\n26 18 43 -1.65618882121043706e-11\n26 18 44 -3.90870924055607939e-13\n26 18 45 -4.34327837916349814e-15\n26 19 6 4.42350981982663552e-08\n26 19 7 -6.17709529600282379e-07\n26 19 8 4.55958937259555564e-06\n26 19 9 -2.35482879237237563e-05\n26 19 10 9.49533206467800735e-05\n26 19 11 -3.15975488265693397e-04\n26 19 12 8.94482265353725228e-04\n26 19 13 -2.18804474171415669e-03\n26 19 14 4.64687875587524545e-03\n26 19 15 -8.51634325416044908e-03\n26 19 16 1.31860707921162775e-02\n26 19 17 -1.63683647463526657e-02\n26 19 18 1.39464596803998155e-02\n26 19 19 -1.96457322273662408e-03\n26 19 20 -1.84651316284395625e-02\n26 19 21 3.61704310431622331e-02\n26 19 22 -3.29411848941893238e-02\n26 19 23 1.43488955775683012e-03\n26 19 24 3.36693213473758028e-02\n26 19 25 -2.82737363533651576e-02\n26 19 26 -1.84990014487818229e-02\n26 19 27 3.38686426591055635e-02\n26 19 28 1.66204358419528429e-02\n26 19 29 -2.75019667740761401e-02\n26 19 30 -3.00669099022273402e-02\n26 19 31 -4.98856802208548115e-03\n26 19 32 1.15016161453492372e-02\n26 19 33 1.21727105637566206e-02\n26 19 34 6.87895191943381620e-03\n26 19 35 2.70393332294564329e-03\n26 19 36 8.01005724327958879e-04\n26 19 37 1.85189310084016853e-04\n26 19 38 3.39560534633051972e-05\n26 19 39 4.96384683050666007e-06\n26 19 40 5.76847959613611671e-07\n26 19 41 5.27181071507266590e-08\n26 19 42 3.71249169882581445e-09\n26 19 43 1.94630922937146442e-10\n26 19 44 7.15934160396810572e-12\n26 19 45 1.64987420110946145e-13\n26 19 46 1.79344747169551785e-15\n26 20 5 1.47918743434317799e-07\n26 20 6 -1.76885090277949020e-06\n26 20 7 1.13081803044779933e-05\n26 20 8 -5.11206212349958906e-05\n26 20 9 1.82226422471338758e-04\n26 20 10 -5.41037547979439124e-04\n26 20 11 1.37843138289826094e-03\n26 20 12 -3.05971588287737428e-03\n26 20 13 5.94313691125144487e-03\n26 20 14 -1.00372227355495627e-02\n26 20 15 1.44220783571831197e-02\n26 20 16 -1.67011765711759529e-02\n26 20 17 1.32082289517066467e-02\n26 20 18 -9.56162498334475978e-04\n26 20 19 -1.84651316284395625e-02\n26 20 20 3.54050805341776324e-02\n26 20 21 -3.46519976119238879e-02\n26 20 22 8.40448596033674446e-03\n26 20 23 2.71759444490405105e-02\n26 20 24 -3.53647793580067743e-02\n26 20 25 -3.94611534646439930e-04\n26 20 26 3.60451443995640859e-02\n26 20 27 -1.21244823312395567e-02\n26 20 28 -3.39016452542766851e-02\n26 20 29 6.26630843595949559e-03\n26 20 30 3.35702116794798649e-02\n26 20 31 1.94706123668618180e-02\n26 20 32 -3.91660208123903268e-03\n26 20 33 -1.28177446783356693e-02\n26 20 34 -9.98125667814872700e-03\n26 20 35 -4.89149702896637379e-03\n26 20 36 -1.74898817183936888e-03\n26 20 37 -4.82215734103314731e-04\n26 20 38 -1.05187674737508807e-04\n26 20 39 -1.83651638622882637e-05\n26 20 40 -2.57342260799495832e-06\n26 20 41 -2.88115888519675435e-07\n26 20 42 -2.54690955632190969e-08\n26 20 43 -1.74049806079673073e-09\n26 20 44 -8.87848090464307899e-11\n26 20 45 -3.18492392986803678e-12\n26 20 46 -7.17154772705023656e-14\n26 20 47 -7.62973784643922086e-16\n26 21 4 6.24211503136521666e-07\n26 21 5 -6.21082603718278556e-06\n26 21 6 3.35288467281432714e-05\n26 21 7 -1.29746358240290911e-04\n26 21 8 4.00785969338551919e-04\n26 21 9 -1.04257358270705398e-03\n26 21 10 2.35018457810015832e-03\n26 21 11 -4.65575607683521426e-03\n26 21 12 8.13040362749160681e-03\n26 21 13 -1.24138125421076825e-02\n26 21 14 1.61579063303668255e-02\n26 21 15 -1.68112693204569954e-02\n26 21 16 1.12314001234150399e-02\n26 21 17 2.33102344464136297e-03\n26 21 18 -2.11770829640459807e-02\n26 21 19 3.61704310431622331e-02\n26 21 20 -3.46519976119238879e-02\n26 21 21 1.05972378892005810e-02\n26 21 22 2.32984720590697995e-02\n26 21 23 -3.71087465204143779e-02\n26 21 24 1.12449981887932778e-02\n26 21 25 2.91261644047538057e-02\n26 21 26 -2.85349194376580360e-02\n26 21 27 -1.78919427816264863e-02\n26 21 28 3.10812582963318225e-02\n26 21 29 1.91640018320096760e-02\n26 21 30 -2.27692087495320389e-02\n26 21 31 -3.05456259674729730e-02\n26 21 32 -8.85384910383084867e-03\n26 21 33 9.10986759563308277e-03\n26 21 34 1.22041977764062092e-02\n26 21 35 7.80682755268181030e-03\n26 21 36 3.42028259527846860e-03\n26 21 37 1.12881402409914203e-03\n26 21 38 2.92203110817599236e-04\n26 21 39 6.04895359456605670e-05\n26 21 40 1.00978981383564940e-05\n26 21 41 1.36044262309802748e-06\n26 21 42 1.47075714537573589e-07\n26 21 43 1.25977132383855380e-08\n26 21 44 8.36541949485438080e-10\n26 21 45 4.15642318003941184e-11\n26 21 46 1.45520304965067871e-12\n26 21 47 3.20358146461577094e-14\n26 21 48 3.33724508768684720e-16\n26 22 3 3.45940953135297140e-06\n26 22 4 -2.74582119092593950e-05\n26 22 5 1.20731659323251498e-04\n26 22 6 -3.87719425106562696e-04\n26 22 7 1.01026318437551238e-03\n26 22 8 -2.24794314111245826e-03\n26 22 9 4.38549174633188362e-03\n26 22 10 -7.58961314979512043e-03\n26 22 11 1.16549326616983413e-02\n26 22 12 -1.56828480663284044e-02\n26 22 13 1.78611658883685082e-02\n26 22 14 -1.56644855917610222e-02\n26 22 15 6.85064041345935637e-03\n26 22 16 8.64104997912044680e-03\n26 22 17 -2.65861518584557012e-02\n26 22 18 3.80341279755491132e-02\n26 22 19 -3.29411848941893238e-02\n26 22 20 8.40448596033674446e-03\n26 22 21 2.32984720590697995e-02\n26 22 22 -3.72868590311080628e-02\n26 22 23 1.64932388111370428e-02\n26 22 24 2.25947278416972974e-02\n26 22 25 -3.44515945762844295e-02\n26 22 26 -1.45823037674013692e-03\n26 22 27 3.49650719158007624e-02\n26 22 28 -6.92372506540371166e-03\n26 22 29 -3.37068560272726433e-02\n26 22 30 -5.57005040578965193e-04\n26 22 31 3.04688275603711134e-02\n26 22 32 2.29664199514429165e-02\n26 22 33 3.68915036742137903e-04\n26 22 34 -1.14441711366483238e-02\n26 22 35 -1.07047314576371123e-02\n26 22 36 -5.93131172202578659e-03\n26 22 37 -2.36939186410192652e-03\n26 22 38 -7.29494765648484788e-04\n26 22 39 -1.78490829713083367e-04\n26 22 40 -3.52294253378608345e-05\n26 22 41 -5.64220574337942875e-06\n26 22 42 -7.32717694921391254e-07\n26 22 43 -7.66389247948035132e-08\n26 22 44 -6.37033496940486531e-09\n26 22 45 -4.11536510846674877e-10\n26 22 46 -1.99347250892664775e-11\n26 22 47 -6.81667870446968105e-13\n26 22 48 -1.46800855720210757e-14\n26 22 49 -1.49804590827087535e-16\n26 23 2 2.68920023992144155e-05\n26 23 3 -1.59095231721058773e-04\n26 23 4 5.38640039542122582e-04\n26 23 5 -1.37067217450971205e-03\n26 23 6 2.89789353616862472e-03\n26 23 7 -5.33271720717733404e-03\n26 23 8 8.73155487754605076e-03\n26 23 9 -1.28115583976861789e-02\n26 23 10 1.67490425818168089e-02\n26 23 11 -1.90634412022013331e-02\n26 23 12 1.77638505357077055e-02\n26 23 13 -1.09626558009297137e-02\n26 23 14 -1.95473678670866430e-03\n26 23 15 1.88753913084630966e-02\n26 23 16 -3.40846661343948560e-02\n26 23 17 3.93503389665101621e-02\n26 23 18 -2.80444467433517816e-02\n26 23 19 1.43488955775683012e-03\n26 23 20 2.71759444490405105e-02\n26 23 21 -3.71087465204143779e-02\n26 23 22 1.64932388111370428e-02\n26 23 23 2.01433617195370023e-02\n26 23 24 -3.57436389034247309e-02\n26 23 25 8.37444873492003533e-03\n26 23 26 3.04253566772170607e-02\n26 23 27 -2.31504166986325535e-02\n26 23 28 -2.29550233381970489e-02\n26 23 29 2.50992863071895171e-02\n26 23 30 2.46382112790690481e-02\n26 23 31 -1.50163192971774709e-02\n26 23 32 -3.08963764983009531e-02\n26 23 33 -1.42214440573827199e-02\n26 23 34 5.47609316713034806e-03\n26 23 35 1.18923890588919730e-02\n26 23 36 8.94135429354046057e-03\n26 23 37 4.42517641595887236e-03\n26 23 38 1.63413500921350003e-03\n26 23 39 4.73135280020917494e-04\n26 23 40 1.10008488346532498e-04\n26 23 41 2.07807757556771835e-05\n26 23 42 3.20204642621238470e-06\n26 23 43 4.01693889653488889e-07\n26 23 44 4.07186566426182553e-08\n26 23 45 3.28886935938119420e-09\n26 23 46 2.06919641283708816e-10\n26 23 47 9.77999733659669852e-12\n26 23 48 3.26851646729824622e-13\n26 23 49 6.88938267484993290e-15\n26 23 50 6.88972716982101355e-17\n26 24 1 3.33214951982413496e-04\n26 24 2 -1.29053595973519156e-03\n26 24 3 3.04215130049323007e-03\n26 24 4 -5.67768012160519136e-03\n26 24 5 9.15755886969661078e-03\n26 24 6 -1.32303977025181974e-02\n26 24 7 1.73355716466742243e-02\n26 24 8 -2.05292883712513795e-02\n26 24 9 2.15004612686009963e-02\n26 24 10 -1.87671445085630499e-02\n26 24 11 1.11395310638126989e-02\n26 24 12 1.53737348977011807e-03\n26 24 13 -1.75262523807251788e-02\n26 24 14 3.26660341188805576e-02\n26 24 15 -4.08636090495461850e-02\n26 24 16 3.62615491166411885e-02\n26 24 17 -1.70116112298664817e-02\n26 24 18 -1.09747027956454803e-02\n26 24 19 3.36693213473758028e-02\n26 24 20 -3.53647793580067743e-02\n26 24 21 1.12449981887932778e-02\n26 24 22 2.25947278416972974e-02\n26 24 23 -3.57436389034247309e-02\n26 24 24 1.14735343414237717e-02\n26 24 25 2.64471685159149891e-02\n26 24 26 -2.98288837415016636e-02\n26 24 27 -1.02321340865173251e-02\n26 24 28 3.33875777607418038e-02\n26 24 29 3.53193987283992507e-03\n26 24 30 -3.22836201829635810e-02\n26 24 31 -1.04489945175423951e-02\n26 24 32 2.48847813552477723e-02\n26 24 33 2.67178130234310692e-02\n26 24 34 6.24944215653134217e-03\n26 24 35 -8.96478949536506792e-03\n26 24 36 -1.12465937151693064e-02\n26 24 37 -7.23957412081894023e-03\n26 24 38 -3.26458929854283691e-03\n26 24 39 -1.12574489340478814e-03\n26 24 40 -3.08440958903465243e-04\n26 24 41 -6.84441837430087657e-05\n26 24 42 -1.24134151112317073e-05\n26 24 43 -1.84468742830218151e-06\n26 24 44 -2.23965992005209590e-07\n26 24 45 -2.20347405890208495e-08\n26 24 46 -1.73146938535314277e-09\n26 24 47 -1.06192059335403116e-10\n26 24 48 -4.90114742976803785e-12\n26 24 49 -1.60187445929610651e-13\n26 24 50 -3.30635128371040481e-15\n26 24 51 -3.24167666004666516e-17\n26 25 0 9.61716310141025403e-03\n26 25 1 -1.66574151163192390e-02\n26 25 2 2.14328153530593324e-02\n26 25 3 -2.50197580680286408e-02\n26 25 4 2.74104343574627400e-02\n26 25 5 -2.82101054645438755e-02\n26 25 6 2.67955600308631564e-02\n26 25 7 -2.24588988784049934e-02\n26 25 8 1.46305201428816631e-02\n26 25 9 -3.21023891012234336e-03\n26 25 10 -1.10222457342445274e-02\n26 25 11 2.60351068335695684e-02\n26 25 12 -3.84410979228648118e-02\n26 25 13 4.39800536509759537e-02\n26 25 14 -3.88558778764826883e-02\n26 25 15 2.18744524161578889e-02\n26 25 16 3.33944935082400844e-03\n26 25 17 -2.75930591477816302e-02\n26 25 18 3.87263904249225422e-02\n26 25 19 -2.82737363533651576e-02\n26 25 20 -3.94611534646439930e-04\n26 25 21 2.91261644047538057e-02\n26 25 22 -3.44515945762844295e-02\n26 25 23 8.37444873492003533e-03\n26 25 24 2.64471685159149891e-02\n26 25 25 -3.14311878095266488e-02\n26 25 26 -3.20989436276020102e-03\n26 25 27 3.33122483477286782e-02\n26 25 28 -1.17318070253200048e-02\n26 25 29 -2.95367529828196100e-02\n26 25 30 1.42961178959636517e-02\n26 25 31 2.98308109063920978e-02\n26 25 32 -3.78259055811248116e-03\n26 25 33 -2.90700007368293913e-02\n26 25 34 -2.03420783075034444e-02\n26 25 35 1.15340668734550469e-04\n26 25 36 1.06479003778560748e-02\n26 25 37 1.00603484478237131e-02\n26 25 38 5.74304394965509656e-03\n26 25 39 2.39254437751738591e-03\n26 25 40 7.76369901700908300e-04\n26 25 41 2.02309147624715555e-04\n26 25 42 4.29984944369217542e-05\n26 25 43 7.50734819224630069e-06\n26 25 44 1.07815203809176769e-06\n26 25 45 1.26893423843246135e-07\n26 25 46 1.21327824528139754e-08\n26 25 47 9.28497608425760767e-10\n26 25 48 5.55590618374294293e-11\n26 25 49 2.50573905976630985e-12\n26 25 50 8.01375878593803997e-14\n26 25 51 1.62051412993407634e-15\n26 25 52 1.55825869995136133e-17\n26 26 1 -6.17486918919385844e-04\n26 26 2 2.39151655347571091e-03\n26 26 3 -5.64416409776957067e-03\n26 26 4 1.05745647541313176e-02\n26 26 5 -1.72039917662882737e-02\n26 26 6 2.52710429693482518e-02\n26 26 7 -3.40999937412719490e-02\n26 26 8 4.24834441262494917e-02\n26 26 9 -4.86511004060432503e-02\n26 26 10 5.04272076214032429e-02\n26 26 11 -4.56860226405418326e-02\n26 26 12 3.31598653073319938e-02\n26 26 13 -1.34963092959232387e-02\n26 26 14 -9.81129629807037469e-03\n26 26 15 3.03046323320880706e-02\n26 26 16 -4.00558039944473153e-02\n26 26 17 3.31483630635196958e-02\n26 26 18 -1.02458325187344557e-02\n26 26 19 -1.84990014487818229e-02\n26 26 20 3.60451443995640859e-02\n26 26 21 -2.85349194376580360e-02\n26 26 22 -1.45823037674013692e-03\n26 26 23 3.04253566772170607e-02\n26 26 24 -2.98288837415016636e-02\n26 26 25 -3.20989436276020102e-03\n26 26 26 3.24867104255073996e-02\n26 26 27 -1.84441554855882815e-02\n26 26 28 -2.26886746415947593e-02\n26 26 29 2.65804614800829146e-02\n26 26 30 1.70398863739672274e-02\n26 26 31 -2.59299146854743689e-02\n26 26 32 -2.12574774248463888e-02\n26 26 33 1.52124465141240934e-02\n26 26 34 2.88134858015869230e-02\n26 26 35 1.34759536147426864e-02\n26 26 36 -4.71115607424943260e-03\n26 26 37 -1.10818139857552368e-02\n26 26 38 -8.68307762521347812e-03\n26 26 39 -4.49450839095813787e-03\n26 26 40 -1.74749176087434400e-03\n26 26 41 -5.36845640343200929e-04\n26 26 42 -1.33596062228267252e-04\n26 26 43 -2.72775299181906381e-05\n26 26 44 -4.59524730419495796e-06\n26 26 45 -6.38915219483763310e-07\n26 26 46 -7.30005272900045903e-08\n26 26 47 -6.79124140953621258e-09\n26 26 48 -5.06638351718950055e-10\n26 26 49 -2.96013329450162516e-11\n26 26 50 -1.30542112026379504e-12\n26 26 51 -4.08747883220554434e-14\n26 26 52 -8.10144677551979635e-16\n26 26 53 -7.64321444577847412e-18\n27 0 26 9.26084733220795093e-03\n27 0 28 -8.92999532961366392e-03\n27 1 25 3.08523556682890839e-04\n27 1 26 -1.60402581005228643e-02\n27 1 27 -5.73336910813928267e-04\n27 1 28 1.54672056222436492e-02\n27 1 29 2.66715604579236539e-04\n27 2 24 2.39029129996641527e-05\n27 2 25 -1.19490659694551622e-03\n27 2 26 2.06437730675813838e-02\n27 2 27 2.22052430734835124e-03\n27 2 28 -1.99106053167945160e-02\n27 2 29 -1.03298509470902577e-03\n27 2 30 -1.72188099126267379e-05\n27 3 23 2.94671330450194582e-06\n27 3 24 -1.41411540354502093e-04\n27 3 25 2.81754099012300098e-03\n27 3 26 -2.41226126089817595e-02\n27 3 27 -5.24162207859068848e-03\n27 3 28 2.32865421794596739e-02\n27 3 29 2.43692783960041702e-03\n27 3 30 1.01867853213126310e-04\n27 3 31 1.64324364580619881e-06\n27 4 22 5.08572617014130909e-07\n27 4 23 -2.33888117661524859e-05\n27 4 24 4.78941997420777885e-04\n27 4 25 -5.26342708957651587e-03\n27 4 26 2.64958021762168455e-02\n27 4 27 9.82652835931134105e-03\n27 4 28 -2.56362903811352811e-02\n27 4 29 -4.55963577409179520e-03\n27 4 30 -3.45311096884629787e-04\n27 4 31 -1.30428420908709247e-05\n27 4 32 -2.03819289472975137e-07\n27 5 21 1.15035023474503759e-07\n27 5 22 -5.06023364785496696e-06\n27 5 23 1.02884852926239496e-04\n27 5 24 -1.22003776085848084e-03\n27 5 25 8.50739077967415559e-03\n27 5 26 -2.74210686152904378e-02\n27 5 27 -1.60092819294433909e-02\n27 5 28 2.66626857728866579e-02\n27 5 29 7.39612749610051212e-03\n27 5 30 8.81839792464930940e-04\n27 5 31 5.74515952915377086e-05\n27 5 32 2.02797632465607816e-06\n27 5 33 3.07304415817345256e-08\n27 6 20 3.27621163281581348e-08\n27 6 21 -1.37561880529690609e-06\n27 6 22 2.73324499909790276e-05\n27 6 23 -3.30808590127202701e-04\n27 6 24 2.58505833134273859e-03\n27 6 25 -1.23410980993807769e-02\n27 6 26 2.63413620199375740e-02\n27 6 27 2.35779022687924249e-02\n27 6 28 -2.58666758980879335e-02\n27 6 29 -1.08022686730457072e-02\n27 6 30 -1.87821498809259973e-03\n27 6 31 -1.85403706614917111e-04\n27 6 32 -1.09754079425832226e-05\n27 6 33 -3.67482633185026810e-07\n27 6 34 -5.40474082463572847e-09\n27 7 19 1.14410272985564067e-08\n27 7 20 -4.57498056748282094e-07\n27 7 21 8.80015207674395776e-06\n27 7 22 -1.05919834013742119e-04\n27 7 23 8.64057077866335563e-04\n27 7 24 -4.77580755258850008e-03\n27 7 25 1.62874789868085630e-02\n27 7 26 -2.26079585697255454e-02\n27 7 27 -3.19589600386097686e-02\n27 7 28 2.26537813808029856e-02\n27 7 29 1.44282828109455027e-02\n27 7 30 3.50244363606286789e-03\n27 7 31 4.87778771685210191e-04\n27 7 32 4.27488111614677312e-05\n27 7 33 2.35721216831759439e-06\n27 7 34 7.54730982495710081e-08\n27 7 35 1.07829715378719426e-09\n27 8 18 4.80952234175009750e-09\n27 8 19 -1.82698554837770384e-07\n27 8 20 3.37972955231767230e-06\n27 8 21 -3.98500210290187380e-05\n27 8 22 3.28086153492643770e-04\n27 8 23 -1.93068421736687204e-03\n27 8 24 7.87145327084754480e-03\n27 8 25 -1.95309891104722682e-02\n27 8 26 1.56674109417260302e-02\n27 8 27 4.01099528804934378e-02\n27 8 28 -1.64919173983770000e-02\n27 8 29 -1.76586069365076394e-02\n27 8 30 -5.86272581653447094e-03\n27 8 31 -1.10355634920013599e-03\n27 8 32 -1.33701611592276375e-04\n27 8 33 -1.07467817620356204e-05\n27 8 34 -5.59548232366827660e-07\n27 8 35 -1.72190247030927636e-08\n27 8 36 -2.39176190680121174e-10\n27 9 17 2.40197411816629138e-09\n27 9 18 -8.64377010645311492e-08\n27 9 19 1.52960520036804843e-06\n27 9 20 -1.74898237194329974e-05\n27 9 21 1.42502016774938186e-04\n27 9 22 -8.57424190884484568e-04\n27 9 23 3.79212660799360868e-03\n27 9 24 -1.16736503378141813e-02\n27 9 25 2.09170003112202049e-02\n27 9 26 -5.34125839289801133e-03\n27 9 27 -4.64775525556403717e-02\n27 9 28 7.14875614028042402e-03\n27 9 29 1.95931876255084484e-02\n27 9 30 8.91207139525461079e-03\n27 9 31 2.21110089330346345e-03\n27 9 32 3.55119164676886811e-04\n27 9 33 3.89169922503363434e-05\n27 9 34 2.92117091870217655e-06\n27 9 35 1.44830154175425849e-07\n27 9 36 4.29852251486553685e-09\n27 9 37 5.80934467037280640e-11\n27 10 16 1.41176944822944495e-09\n27 10 17 -4.79793954325390860e-08\n27 10 18 8.08339184228623717e-07\n27 10 19 -8.89431025170692899e-06\n27 10 20 7.07847203565631405e-05\n27 10 21 -4.25321752509496526e-04\n27 10 22 1.94701574503935972e-03\n27 10 23 -6.63241240840720789e-03\n27 10 24 1.55282190026968941e-02\n27 10 25 -1.90950682185895461e-02\n27 10 26 -7.81839624339751516e-03\n27 10 27 4.91061690196694665e-02\n27 10 28 5.00009063967032781e-03\n27 10 29 -1.91214284194701012e-02\n27 10 30 -1.23273962896687124e-02\n27 10 31 -3.98732430268820475e-03\n27 10 32 -8.27010437598768824e-04\n27 10 33 -1.18575801930313565e-04\n27 10 34 -1.20136644500731238e-05\n27 10 35 -8.51606626507661975e-07\n27 10 36 -4.04343013865589736e-08\n27 10 37 -1.16041568906044972e-09\n27 10 38 -1.52699493895046231e-11\n27 11 15 9.70062078866681654e-10\n27 11 16 -3.10268256014503763e-08\n27 11 17 4.95394769389444955e-07\n27 11 18 -5.21159769936571102e-06\n27 11 19 4.01187835746000633e-05\n27 11 20 -2.36975070672431971e-04\n27 11 21 1.09248933806600196e-03\n27 11 22 -3.90036952567020034e-03\n27 11 23 1.03530951258058085e-02\n27 11 24 -1.82012599517635111e-02\n27 11 25 1.28820086430168875e-02\n27 11 26 2.21841299482944384e-02\n27 11 27 -4.59912956592564447e-02\n27 11 28 -1.86560372683554827e-02\n27 11 29 1.51462850801373110e-02\n27 11 30 1.53967485543719541e-02\n27 11 31 6.51899892864444224e-03\n27 11 32 1.72062029750985580e-03\n27 11 33 3.14351655101219705e-04\n27 11 34 4.12738409475235167e-05\n27 11 35 3.91920996235298229e-06\n27 11 36 2.64353996731137863e-07\n27 11 37 1.20691809519884792e-08\n27 11 38 3.35591662820949340e-10\n27 11 39 4.30281084711852518e-12\n27 12 14 7.75806839822922091e-10\n27 12 15 -2.32612714869955068e-08\n27 12 16 3.50351056638762108e-07\n27 12 17 -3.50317930074100525e-06\n27 12 18 2.58768117511364710e-05\n27 12 19 -1.48520651179271750e-04\n27 12 20 6.77088925044633791e-04\n27 12 21 -2.45490488913362271e-03\n27 12 22 6.92702836800674021e-03\n27 12 23 -1.42975670242767827e-02\n27 12 24 1.79487313798426622e-02\n27 12 25 -1.87183392267542244e-03\n27 12 26 -3.48983749037030901e-02\n27 12 27 3.57367075126142586e-02\n27 12 28 3.14150412058803778e-02\n27 12 29 -6.99480087416245656e-03\n27 12 30 -1.69827655811438264e-02\n27 12 31 -9.66140703338953148e-03\n27 12 32 -3.23091864815395353e-03\n27 12 33 -7.40029160607631633e-04\n27 12 34 -1.22628564224436322e-04\n27 12 35 -1.49813139537206982e-05\n27 12 36 -1.34560086262952294e-06\n27 12 37 -8.68300215797454888e-08\n27 12 38 -3.82367808919617987e-09\n27 12 39 -1.03177779497314649e-10\n27 12 40 -1.28982301507602094e-12\n27 13 13 7.20318567404937121e-10\n27 13 14 -2.01560529514912626e-08\n27 13 15 2.84967395061207546e-07\n27 13 16 -2.69279992828369790e-06\n27 13 17 1.89511028628190814e-05\n27 13 18 -1.04696827702810380e-04\n27 13 19 4.65689043688851338e-04\n27 13 20 -1.67926805073299846e-03\n27 13 21 4.85599556386907140e-03\n27 13 22 -1.08531799275583778e-02\n27 13 23 1.70211358011122937e-02\n27 13 24 -1.29529307507144119e-02\n27 13 25 -1.28104973811885695e-02\n27 13 26 4.21680764844400790e-02\n27 13 27 -1.84598569809303036e-02\n27 13 28 -3.99294628704042403e-02\n27 13 29 -5.01846547062452606e-03\n27 13 30 1.56621280952117751e-02\n27 13 31 1.28688687905849240e-02\n27 13 32 5.49542202302159289e-03\n27 13 33 1.56572405172921364e-03\n27 13 34 3.21931683502299888e-04\n27 13 35 4.92794539803096053e-05\n27 13 36 5.66236978358912312e-06\n27 13 37 4.84241388017628961e-07\n27 13 38 3.00148323670681636e-08\n27 13 39 1.27796403792060150e-09\n27 13 40 3.35105849232501939e-11\n27 13 41 4.08696061769136873e-13\n27 14 12 7.75806839822922091e-10\n27 14 13 -2.01560529514912626e-08\n27 14 14 2.66062931897255196e-07\n27 14 15 -2.36208976449414349e-06\n27 14 16 1.57316149974874103e-05\n27 14 17 -8.29662260304245928e-05\n27 14 18 3.56173337715959833e-04\n27 14 19 -1.25794411284771014e-03\n27 14 20 3.63955337899810872e-03\n27 14 21 -8.42884461078564980e-03\n27 14 22 1.47281615540133749e-02\n27 14 23 -1.63480166188139182e-02\n27 14 24 2.23582347294144068e-03\n27 14 25 2.79300360836247682e-02\n27 14 26 -4.02591774280297210e-02\n27 14 27 -3.32029205267955355e-03\n27 14 28 4.06390242377270850e-02\n27 14 29 1.90385727172382499e-02\n27 14 30 -1.01414215331818791e-02\n27 14 31 -1.50722734951037804e-02\n27 14 32 -8.44313212972212113e-03\n27 14 33 -2.99471724663943465e-03\n27 14 34 -7.56742074655970821e-04\n27 14 35 -1.42638184226055042e-04\n27 14 36 -2.04199837870849019e-05\n27 14 37 -2.22381378553978747e-06\n27 14 38 -1.81966068848746453e-07\n27 14 39 -1.08679702468846729e-08\n27 14 40 -4.48286694357490248e-10\n27 14 41 -1.14361892568760192e-11\n27 14 42 -1.36154758697441035e-13\n27 15 11 9.70062078866681654e-10\n27 15 12 -2.32612714869955068e-08\n27 15 13 2.84967395061207546e-07\n27 15 14 -2.36208976449414349e-06\n27 15 15 1.47866802746528470e-05\n27 15 16 -7.38675489640109908e-05\n27 15 17 3.03187983716464301e-04\n27 15 18 -1.03596338308752535e-03\n27 15 19 2.94686411090605977e-03\n27 15 20 -6.87509912713146308e-03\n27 15 21 1.26432484686069806e-02\n27 15 22 -1.65424781782423535e-02\n27 15 23 1.00330942352076065e-02\n27 15 24 1.30868267664230287e-02\n27 15 25 -3.82855143508178098e-02\n27 15 26 2.72323958263368287e-02\n27 15 27 2.43398460752848968e-02\n27 15 28 -3.11635369805697451e-02\n27 15 29 -3.14575938288269553e-02\n27 15 30 -2.30164796464180820e-05\n27 15 31 1.47382572567673469e-02\n27 15 32 1.15898660638533553e-02\n27 15 33 5.18008717632809736e-03\n27 15 34 1.60445966575916997e-03\n27 15 35 3.68470227302566669e-04\n27 15 36 6.45714760982256876e-05\n27 15 37 8.72160474118366742e-06\n27 15 38 9.05392760042758372e-07\n27 15 39 7.11551390013385146e-08\n27 15 40 4.10526750625587311e-09\n27 15 41 1.64317698502544669e-10\n27 15 42 4.08237288424839962e-12\n27 15 43 4.74726615979654352e-14\n27 16 10 1.41176944822944495e-09\n27 16 11 -3.10268256014503763e-08\n27 16 12 3.50351056638762108e-07\n27 16 13 -2.69279992828369790e-06\n27 16 14 1.57316149974874103e-05\n27 16 15 -7.38675489640109908e-05\n27 16 16 2.87332311418760498e-04\n27 16 17 -9.39746643036496066e-04\n27 16 18 2.59168809767342064e-03\n27 16 19 -5.96874299631705142e-03\n27 16 20 1.11563518654761682e-02\n27 16 21 -1.57824001626244289e-02\n27 16 22 1.34959075917366275e-02\n27 16 23 2.78803372070898343e-03\n27 16 24 -2.87975366979254528e-02\n27 16 25 3.81742023769751868e-02\n27 16 26 -4.97380877228711682e-03\n27 16 27 -3.74763608554422102e-02\n27 16 28 1.20972881636166600e-02\n27 16 29 3.74847404382641945e-02\n27 16 30 1.35573904267990077e-02\n27 16 31 -1.02734892968292847e-02\n27 16 32 -1.38624239819403276e-02\n27 16 33 -8.05705681944482423e-03\n27 16 34 -3.07562848089900026e-03\n27 16 35 -8.56654327113600188e-04\n27 16 36 -1.81713128489831234e-04\n27 16 37 -2.99028746141088029e-05\n27 16 38 -3.83570909105618556e-06\n27 16 39 -3.81244134725120434e-07\n27 16 40 -2.88644847396102925e-08\n27 16 41 -1.61203713529882814e-09\n27 16 42 -6.26986647229428041e-11\n27 16 43 -1.51838322961511460e-12\n27 16 44 -1.72554690365697323e-14\n27 17 9 2.40197411816629138e-09\n27 17 10 -4.79793954325390860e-08\n27 17 11 4.95394769389444955e-07\n27 17 12 -3.50317930074100525e-06\n27 17 13 1.89511028628190814e-05\n27 17 14 -8.29662260304245928e-05\n27 17 15 3.03187983716464301e-04\n27 17 16 -9.39746643036496066e-04\n27 17 17 2.48241386846293179e-03\n27 17 18 -5.55326875236474100e-03\n27 17 19 1.02942993297281753e-02\n27 17 20 -1.50067011143357487e-02\n27 17 21 1.48310534365736445e-02\n27 17 22 -3.32368345691158127e-03\n27 17 23 -1.97063766352539364e-02\n27 17 24 3.78835165400380020e-02\n27 17 25 -2.43541600504633809e-02\n27 17 26 -1.96079008253017846e-02\n27 17 27 3.63361445794696597e-02\n27 17 28 1.16017547596553940e-02\n27 17 29 -3.28347939828150734e-02\n27 17 30 -2.68917136841695505e-02\n27 17 31 8.65698352392058719e-04\n27 17 32 1.36217303432241876e-02\n27 17 33 1.11058133548308315e-02\n27 17 34 5.31610293344845318e-03\n27 17 35 1.79912414103093984e-03\n27 17 36 4.59271761277509793e-04\n27 17 37 9.10131584039402007e-05\n27 17 38 1.41688804661069598e-05\n27 17 39 1.73473329080510709e-06\n27 17 40 1.65665238945708124e-07\n27 17 41 1.21131414361318451e-08\n27 17 42 6.55992853860672407e-10\n27 17 43 2.48225737783672156e-11\n27 17 44 5.86432135443803390e-13\n27 17 45 6.51631487011654147e-15\n27 18 8 4.80952234175009750e-09\n27 18 9 -8.64377010645311492e-08\n27 18 10 8.08339184228623717e-07\n27 18 11 -5.21159769936571102e-06\n27 18 12 2.58768117511364710e-05\n27 18 13 -1.04696827702810380e-04\n27 18 14 3.56173337715959833e-04\n27 18 15 -1.03596338308752535e-03\n27 18 16 2.59168809767342064e-03\n27 18 17 -5.55326875236474100e-03\n27 18 18 1.00139629871049599e-02\n27 18 19 -1.45643981106737255e-02\n27 18 20 1.52599999714024538e-02\n27 18 21 -6.56901917000637342e-03\n27 18 22 -1.32625717070680814e-02\n27 18 23 3.39607674099600949e-02\n27 18 24 -3.32473843747514906e-02\n27 18 25 -4.21399851562912084e-04\n27 18 26 3.58094535615468384e-02\n27 18 27 -1.91569955017728850e-02\n27 18 28 -3.09195492231033166e-02\n27 18 29 1.63611579514626788e-02\n27 18 30 3.45541002432185715e-02\n27 18 31 1.23924296872764887e-02\n27 18 32 -9.10929989040411005e-03\n27 18 33 -1.31457949157446843e-02\n27 18 34 -8.20961397682580422e-03\n27 18 35 -3.41073848419828219e-03\n27 18 36 -1.04744919788313345e-03\n27 18 37 -2.48317466795414193e-04\n27 18 38 -4.63597173419515131e-05\n27 18 39 -6.86665987192673763e-06\n27 18 40 -8.05637241098815456e-07\n27 18 41 -7.41343135443522832e-08\n27 18 42 -5.24571326208542756e-09\n27 18 43 -2.75882204336084159e-10\n27 18 44 -1.01670919420840464e-11\n27 18 45 -2.34496813485855361e-13\n27 18 46 -2.54902899253808424e-15\n27 19 7 1.14410272985564067e-08\n27 19 8 -1.82698554837770384e-07\n27 19 9 1.52960520036804843e-06\n27 19 10 -8.89431025170692899e-06\n27 19 11 4.01187835746000633e-05\n27 19 12 -1.48520651179271750e-04\n27 19 13 4.65689043688851338e-04\n27 19 14 -1.25794411284771014e-03\n27 19 15 2.94686411090605977e-03\n27 19 16 -5.96874299631705142e-03\n27 19 17 1.02942993297281753e-02\n27 19 18 -1.45643981106737255e-02\n27 19 19 1.53491820907201360e-02\n27 19 20 -7.94834752183486274e-03\n27 19 21 -9.60320925483762807e-03\n27 19 22 3.02157332876516967e-02\n27 19 23 -3.61646087916493953e-02\n27 19 24 1.27873908007466415e-02\n27 19 25 2.57203511181240016e-02\n27 19 26 -3.38686426591055635e-02\n27 19 27 -7.81570285474620698e-03\n27 19 28 3.59610015959057756e-02\n27 19 29 7.47303350017502398e-03\n27 19 30 -3.11530206333490987e-02\n27 19 31 -2.56673442754185402e-02\n27 19 32 -5.44331235868119463e-04\n27 19 33 1.23801682253381988e-02\n27 19 34 1.11050022098312963e-02\n27 19 35 5.80202719764440346e-03\n27 19 36 2.15698633767569681e-03\n27 19 37 6.10641550899409881e-04\n27 19 38 1.35738700361348454e-04\n27 19 39 2.40281419986444471e-05\n27 19 40 3.40131881896687298e-06\n27 19 41 3.83656738881648775e-07\n27 19 42 3.40983095916108038e-08\n27 19 43 2.33904077893417846e-09\n27 19 44 1.19617438909600817e-10\n27 19 45 4.29737644483242033e-12\n27 19 46 9.68295560525090760e-14\n27 19 47 1.03015995512534815e-15\n27 20 6 3.27621163281581348e-08\n27 20 7 -4.57498056748282094e-07\n27 20 8 3.37972955231767230e-06\n27 20 9 -1.74898237194329974e-05\n27 20 10 7.07847203565631405e-05\n27 20 11 -2.36975070672431971e-04\n27 20 12 6.77088925044633791e-04\n27 20 13 -1.67926805073299846e-03\n27 20 14 3.63955337899810872e-03\n27 20 15 -6.87509912713146308e-03\n27 20 16 1.11563518654761682e-02\n27 20 17 -1.50067011143357487e-02\n27 20 18 1.52599999714024538e-02\n27 20 19 -7.94834752183486274e-03\n27 20 20 -8.43112926359091738e-03\n27 20 21 2.81220019470222598e-02\n27 20 22 -3.66764451657028929e-02\n27 20 23 2.01319774972728488e-02\n27 20 24 1.57098309009967360e-02\n27 20 25 -3.67218315855608951e-02\n27 20 26 1.21244823312395567e-02\n27 20 27 3.06009006770053653e-02\n27 20 28 -2.18132320418592870e-02\n27 20 29 -2.83388452708575901e-02\n27 20 30 1.48362538290228078e-02\n27 20 31 3.28000164519875604e-02\n27 20 32 1.39516218624028436e-02\n27 20 33 -6.97729506036230982e-03\n27 20 34 -1.26082078552404169e-02\n27 20 35 -8.73668517966227596e-03\n27 20 36 -3.99526370057998420e-03\n27 20 37 -1.35565095055124055e-03\n27 20 38 -3.57799721646772133e-04\n27 20 39 -7.51215996602631503e-05\n27 20 40 -1.26722172328184126e-05\n27 20 41 -1.72059007970516475e-06\n27 20 42 -1.87083858323980681e-07\n27 20 43 -1.60918479605071258e-08\n27 20 44 -1.07172978152037223e-09\n27 20 45 -5.33547289707377632e-11\n27 20 46 -1.87019594271091827e-12\n27 20 47 -4.11935191929146913e-14\n27 20 48 -4.29122440273503528e-16\n27 21 5 1.15035023474503759e-07\n27 21 6 -1.37561880529690609e-06\n27 21 7 8.80015207674395776e-06\n27 21 8 -3.98500210290187380e-05\n27 21 9 1.42502016774938186e-04\n27 21 10 -4.25321752509496526e-04\n27 21 11 1.09248933806600196e-03\n27 21 12 -2.45490488913362271e-03\n27 21 13 4.85599556386907140e-03\n27 21 14 -8.42884461078564980e-03\n27 21 15 1.26432484686069806e-02\n27 21 16 -1.57824001626244289e-02\n27 21 17 1.48310534365736445e-02\n27 21 18 -6.56901917000637342e-03\n27 21 19 -9.60320925483762807e-03\n27 21 20 2.81220019470222598e-02\n27 21 21 -3.66609855292901171e-02\n27 21 22 2.32648931000235922e-02\n27 21 23 9.25685457688348703e-03\n27 21 24 -3.50309222152022486e-02\n27 21 25 2.36038832571991658e-02\n27 21 26 1.78919427816264863e-02\n27 21 27 -3.39937175908044893e-02\n27 21 28 -5.70614420788766470e-03\n27 21 29 3.40244476010067584e-02\n27 21 30 9.33865743119480571e-03\n27 21 31 -2.78460446436593626e-02\n27 21 32 -2.65324481958768598e-02\n27 21 33 -3.66330920809640732e-03\n27 21 34 1.07282814211724955e-02\n27 21 35 1.13257230889705850e-02\n27 21 36 6.59107226909337049e-03\n27 21 37 2.71064607064928928e-03\n27 21 38 8.51115816273767966e-04\n27 21 39 2.11201337352682486e-04\n27 21 40 4.21211351221200815e-05\n27 21 41 6.79861965034801911e-06\n27 21 42 8.88059261747692152e-07\n27 21 43 9.32914786798958346e-08\n27 21 44 7.77922732544893260e-09\n27 21 45 5.03688431343318022e-10\n27 21 46 2.44353997663305645e-11\n27 21 47 8.36323853515160326e-13\n27 21 48 1.80180331667944068e-14\n27 21 49 1.83867053963563451e-16\n27 22 4 5.08572617014130909e-07\n27 22 5 -5.06023364785496696e-06\n27 22 6 2.73324499909790276e-05\n27 22 7 -1.05919834013742119e-04\n27 22 8 3.28086153492643770e-04\n27 22 9 -8.57424190884484568e-04\n27 22 10 1.94701574503935972e-03\n27 22 11 -3.90036952567020034e-03\n27 22 12 6.92702836800674021e-03\n27 22 13 -1.08531799275583778e-02\n27 22 14 1.47281615540133749e-02\n27 22 15 -1.65424781782423535e-02\n27 22 16 1.34959075917366275e-02\n27 22 17 -3.32368345691158127e-03\n27 22 18 -1.32625717070680814e-02\n27 22 19 3.02157332876516967e-02\n27 22 20 -3.66764451657028929e-02\n27 22 21 2.32648931000235922e-02\n27 22 22 7.09126287969585579e-03\n27 22 23 -3.32720658479586558e-02\n27 22 24 2.87434394353896232e-02\n27 22 25 7.49218033325680343e-03\n27 22 26 -3.49650719158007624e-02\n27 22 27 1.29985842045853473e-02\n27 22 28 2.96629949610547047e-02\n27 22 29 -1.85132068323918566e-02\n27 22 30 -2.91643232672456472e-02\n27 22 31 9.49763030552170943e-03\n27 22 32 3.13160450071106981e-02\n27 22 33 1.73168153853268560e-02\n27 22 34 -3.72099747365829381e-03\n27 22 35 -1.18681602570574284e-02\n27 22 36 -9.49430842882634515e-03\n27 22 37 -4.84593636919539393e-03\n27 22 38 -1.82478090374221878e-03\n27 22 39 -5.35570404758256843e-04\n27 22 40 -1.25768427138829213e-04\n27 22 41 -2.39349088318392653e-05\n27 22 42 -3.70879031927519970e-06\n27 22 43 -4.67238944841705391e-07\n27 22 44 -4.75132956471807484e-08\n27 22 45 -3.84664284767945490e-09\n27 22 46 -2.42414383252422361e-10\n27 22 47 -1.14704390685114558e-11\n27 22 48 -3.83603915208742584e-13\n27 22 49 -8.08806070617792231e-15\n27 22 50 -8.08846513954598660e-17\n27 23 3 2.94671330450194582e-06\n27 23 4 -2.33888117661524859e-05\n27 23 5 1.02884852926239496e-04\n27 23 6 -3.30808590127202701e-04\n27 23 7 8.64057077866335563e-04\n27 23 8 -1.93068421736687204e-03\n27 23 9 3.79212660799360868e-03\n27 23 10 -6.63241240840720789e-03\n27 23 11 1.03530951258058085e-02\n27 23 12 -1.42975670242767827e-02\n27 23 13 1.70211358011122937e-02\n27 23 14 -1.63480166188139182e-02\n27 23 15 1.00330942352076065e-02\n27 23 16 2.78803372070898343e-03\n27 23 17 -1.97063766352539364e-02\n27 23 18 3.39607674099600949e-02\n27 23 19 -3.61646087916493953e-02\n27 23 20 2.01319774972728488e-02\n27 23 21 9.25685457688348703e-03\n27 23 22 -3.32720658479586558e-02\n27 23 23 3.01318353141408228e-02\n27 23 24 2.15362847240197836e-03\n27 23 25 -3.26947252267090349e-02\n27 23 26 2.31504166986325535e-02\n27 23 27 1.86076201425529213e-02\n27 23 28 -3.13238336637130064e-02\n27 23 29 -1.03091011438997342e-02\n27 23 30 3.10013122466226168e-02\n27 23 31 1.50291688555079252e-02\n27 23 32 -2.24968914834729597e-02\n27 23 33 -2.81704115942832933e-02\n27 23 34 -8.29466681033441966e-03\n27 23 35 8.22072781601170995e-03\n27 23 36 1.14602910438828629e-02\n27 23 37 7.63062379411227042e-03\n27 23 38 3.50664940552807957e-03\n27 23 39 1.22448779936288345e-03\n27 23 40 3.38516237187342477e-04\n27 23 41 7.56187284124263198e-05\n27 23 42 1.37836127863699651e-05\n27 23 43 2.05613876351301267e-06\n27 23 44 2.50363876256371742e-07\n27 23 45 2.46857423921794430e-08\n27 23 46 1.94291497670281749e-09\n27 23 47 1.19297573448793349e-10\n27 23 48 5.51029302006199671e-12\n27 23 49 1.80180830110404397e-13\n27 23 50 3.71981467930018230e-15\n27 23 51 3.64705241242676762e-17\n27 24 2 2.39029129996641527e-05\n27 24 3 -1.41411540354502093e-04\n27 24 4 4.78941997420777885e-04\n27 24 5 -1.22003776085848084e-03\n27 24 6 2.58505833134273859e-03\n27 24 7 -4.77580755258850008e-03\n27 24 8 7.87145327084754480e-03\n27 24 9 -1.16736503378141813e-02\n27 24 10 1.55282190026968941e-02\n27 24 11 -1.82012599517635111e-02\n27 24 12 1.79487313798426622e-02\n27 24 13 -1.29529307507144119e-02\n27 24 14 2.23582347294144068e-03\n27 24 15 1.30868267664230287e-02\n27 24 16 -2.87975366979254528e-02\n27 24 17 3.78835165400380020e-02\n27 24 18 -3.32473843747514906e-02\n27 24 19 1.27873908007466415e-02\n27 24 20 1.57098309009967360e-02\n27 24 21 -3.50309222152022486e-02\n27 24 22 2.87434394353896232e-02\n27 24 23 2.15362847240197836e-03\n27 24 24 -3.15245045401815320e-02\n27 24 25 2.71195590964951013e-02\n27 24 26 1.02321340865173251e-02\n27 24 27 -3.38606628068313016e-02\n27 24 28 6.47373107121714576e-03\n27 24 29 3.14020095260847742e-02\n27 24 30 -1.05518143111283175e-02\n27 24 31 -3.09592328915814830e-02\n27 24 32 9.21959350727834178e-04\n27 24 33 2.85753502628986483e-02\n27 24 34 2.16363980574909426e-02\n27 24 35 9.41983970046280259e-04\n27 24 36 -1.04381483888281311e-02\n27 24 37 -1.02750574393426230e-02\n27 24 38 -5.96943912027117067e-03\n27 24 39 -2.51343239962742220e-03\n27 24 40 -8.21571461479783216e-04\n27 24 41 -2.15228412382195162e-04\n27 24 42 -4.59270611460159832e-05\n27 24 43 -8.04305134705667470e-06\n27 24 44 -1.15777558780754587e-06\n27 24 45 -1.36507092611742925e-07\n27 24 46 -1.30695340590550021e-08\n27 24 47 -1.00118228840361918e-09\n27 24 48 -5.99511292117148476e-11\n27 24 49 -2.70512841991714311e-12\n27 24 50 -8.65395946093112592e-14\n27 24 51 -1.75020521544101069e-15\n27 24 52 -1.68296743192985856e-17\n27 25 1 3.08523556682890839e-04\n27 25 2 -1.19490659694551622e-03\n27 25 3 2.81754099012300098e-03\n27 25 4 -5.26342708957651587e-03\n27 25 5 8.50739077967415559e-03\n27 25 6 -1.23410980993807769e-02\n27 25 7 1.62874789868085630e-02\n27 25 8 -1.95309891104722682e-02\n27 25 9 2.09170003112202049e-02\n27 25 10 -1.90950682185895461e-02\n27 25 11 1.28820086430168875e-02\n27 25 12 -1.87183392267542244e-03\n27 25 13 -1.28104973811885695e-02\n27 25 14 2.79300360836247682e-02\n27 25 15 -3.82855143508178098e-02\n27 25 16 3.81742023769751868e-02\n27 25 17 -2.43541600504633809e-02\n27 25 18 -4.21399851562912084e-04\n27 25 19 2.57203511181240016e-02\n27 25 20 -3.67218315855608951e-02\n27 25 21 2.36038832571991658e-02\n27 25 22 7.49218033325680343e-03\n27 25 23 -3.26947252267090349e-02\n27 25 24 2.71195590964951013e-02\n27 25 25 7.30536136657510655e-03\n27 25 26 -3.33122483477286782e-02\n27 25 27 1.56892222561293791e-02\n27 25 28 2.46712660402713199e-02\n27 25 29 -2.51119867583348872e-02\n27 25 30 -1.88385352521594262e-02\n27 25 31 2.48848077399640684e-02\n27 25 32 2.23965018158350066e-02\n27 25 33 -1.41354184446474532e-02\n27 25 34 -2.89770014060427431e-02\n27 25 35 -1.41376152180927134e-02\n27 25 36 4.34206699485959966e-03\n27 25 37 1.10739209548494602e-02\n27 25 38 8.80097644739690626e-03\n27 25 39 4.58822286858900602e-03\n27 25 40 1.79211049293199180e-03\n27 25 41 5.52332098927673079e-04\n27 25 42 1.37778203589461729e-04\n27 25 43 2.81823535571297645e-05\n27 25 44 4.75426985278725944e-06\n27 25 45 6.61732451494000901e-07\n27 25 46 7.56696170217574468e-08\n27 25 47 7.04393306828668261e-09\n27 25 48 5.25733118275753946e-10\n27 25 49 3.07272132333582029e-11\n27 25 50 1.35537834937280313e-12\n27 25 51 4.24448240586985512e-14\n27 25 52 8.41315402388695198e-16\n27 25 53 7.93729097427863732e-18\n27 26 0 9.26084733220795093e-03\n27 26 1 -1.60402581005228643e-02\n27 26 2 2.06437730675813838e-02\n27 26 3 -2.41226126089817595e-02\n27 26 4 2.64958021762168455e-02\n27 26 5 -2.74210686152904378e-02\n27 26 6 2.63413620199375740e-02\n27 26 7 -2.26079585697255454e-02\n27 26 8 1.56674109417260302e-02\n27 26 9 -5.34125839289801133e-03\n27 26 10 -7.81839624339751516e-03\n27 26 11 2.21841299482944384e-02\n27 26 12 -3.48983749037030901e-02\n27 26 13 4.21680764844400790e-02\n27 26 14 -4.02591774280297210e-02\n27 26 15 2.72323958263368287e-02\n27 26 16 -4.97380877228711682e-03\n27 26 17 -1.96079008253017846e-02\n27 26 18 3.58094535615468384e-02\n27 26 19 -3.38686426591055635e-02\n27 26 20 1.21244823312395567e-02\n27 26 21 1.78919427816264863e-02\n27 26 22 -3.49650719158007624e-02\n27 26 23 2.31504166986325535e-02\n27 26 24 1.02321340865173251e-02\n27 26 25 -3.33122483477286782e-02\n27 26 26 1.84441554855882815e-02\n27 26 27 1.97708581038009151e-02\n27 26 28 -3.03487883435975045e-02\n27 26 29 -5.78565946239713882e-03\n27 26 30 3.16586516108925399e-02\n27 26 31 1.79712078907814714e-03\n27 26 32 -3.03949983045580346e-02\n27 26 33 -1.00828597116558446e-02\n27 26 34 2.28094432050314565e-02\n27 26 35 2.56393261028926077e-02\n27 26 36 7.13470387466714773e-03\n27 26 37 -7.71598920218678619e-03\n27 26 38 -1.07259574065736488e-02\n27 26 39 -7.31597651160204179e-03\n27 26 40 -3.48625289128036851e-03\n27 26 41 -1.27489403853523253e-03\n27 26 42 -3.72607238287192554e-04\n27 26 43 -8.88538730617105013e-05\n27 26 44 -1.74730219951717566e-05\n27 26 45 -2.84577815424697058e-06\n27 26 46 -3.83671992255699723e-07\n27 26 47 -4.26109259537638259e-08\n27 26 48 -3.86101318496676705e-09\n27 26 49 -2.81032038384121623e-10\n27 26 50 -1.60443618490726500e-11\n27 26 51 -6.92282261536304751e-13\n27 26 52 -2.12330782630468493e-14\n27 26 53 -4.12662803499439380e-16\n27 26 54 -3.82111568730579103e-18\n27 27 1 -5.73336910813928267e-04\n27 27 2 2.22052430734835124e-03\n27 27 3 -5.24162207859068848e-03\n27 27 4 9.82652835931134105e-03\n27 27 5 -1.60092819294433909e-02\n27 27 6 2.35779022687924249e-02\n27 27 7 -3.19589600386097686e-02\n27 27 8 4.01099528804934378e-02\n27 27 9 -4.64775525556403717e-02\n27 27 10 4.91061690196694665e-02\n27 27 11 -4.59912956592564447e-02\n27 27 12 3.57367075126142586e-02\n27 27 13 -1.84598569809303036e-02\n27 27 14 -3.32029205267955355e-03\n27 27 15 2.43398460752848968e-02\n27 27 16 -3.74763608554422102e-02\n27 27 17 3.63361445794696597e-02\n27 27 18 -1.91569955017728850e-02\n27 27 19 -7.81570285474620698e-03\n27 27 20 3.06009006770053653e-02\n27 27 21 -3.39937175908044893e-02\n27 27 22 1.29985842045853473e-02\n27 27 23 1.86076201425529213e-02\n27 27 24 -3.38606628068313016e-02\n27 27 25 1.56892222561293791e-02\n27 27 26 1.97708581038009151e-02\n27 27 27 -3.14158333987416654e-02\n27 27 28 1.16945339086037092e-03\n27 27 29 3.06687978397449098e-02\n27 27 30 -1.27912641421836325e-02\n27 27 31 -2.73747719571408509e-02\n27 27 32 1.34928280159615309e-02\n27 27 33 2.83001730256326461e-02\n27 27 34 -2.30790137883884173e-03\n27 27 35 -2.69255749636457702e-02\n27 27 36 -2.03490567571032712e-02\n27 27 37 -1.32642025517721437e-03\n27 27 38 9.55709176007941016e-03\n27 27 39 9.83675573643214071e-03\n27 27 40 5.95940312322055486e-03\n27 27 41 2.62967632282558291e-03\n27 27 42 9.06785387473115574e-04\n27 27 43 2.52484128292930181e-04\n27 27 44 5.77480510932144239e-05\n27 27 45 1.09446819833300840e-05\n27 27 46 1.72426551640716474e-06\n27 27 47 2.25525376388394448e-07\n27 27 48 2.43569609816540403e-08\n27 27 49 2.15048953871575842e-09\n27 27 50 1.52779934221738011e-10\n27 27 51 8.52607993016993871e-12\n27 27 52 3.60072713851529391e-13\n27 27 53 1.08218099579540542e-14\n27 27 54 2.06304863379859271e-16\n27 27 55 1.87557626275144496e-18\n28 0 27 8.92999532961366392e-03\n28 0 29 -8.62197125625809006e-03\n28 1 26 2.86478859846933836e-04\n28 1 27 -1.54672056222436492e-02\n28 1 28 -5.33759879065909798e-04\n28 1 29 1.49336922772374724e-02\n28 1 30 2.48929447222901126e-04\n28 2 25 2.13410206600960331e-05\n28 2 26 -1.10952785322766341e-03\n28 2 27 1.99106053167945160e-02\n28 2 28 2.06724312249595349e-03\n28 2 29 -1.92275958485769591e-02\n28 2 30 -9.64099603474914183e-04\n28 2 31 -1.55520166309962838e-05\n28 3 24 2.52560878983835572e-06\n28 3 25 -1.26255180877905364e-04\n28 3 26 2.61689622445955820e-03\n28 3 27 -2.32865421794596739e-02\n28 3 28 -4.88064152783368181e-03\n28 3 29 2.25056240565520264e-02\n28 3 30 2.27489172268484654e-03\n28 3 31 9.20069711770661160e-05\n28 3 32 1.43778444615194422e-06\n28 4 23 4.17723959673909619e-07\n28 4 24 -2.00463983008532510e-05\n28 4 25 4.27746585218059103e-04\n28 4 26 -4.89269975277418487e-03\n28 4 27 2.56362903811352811e-02\n28 4 28 9.15491581661953935e-03\n28 4 29 -2.48275339107602275e-02\n28 4 30 -4.25932287058704962e-03\n28 4 31 -3.11956922970032604e-04\n28 4 32 -1.14120602503043480e-05\n28 4 33 -1.72929854547827036e-07\n28 5 22 9.03757256841975372e-08\n28 5 23 -4.15630092053972397e-06\n28 5 24 8.82169346893598829e-05\n28 5 25 -1.09063988292262061e-03\n28 5 26 7.92306565442666796e-03\n28 5 27 -2.66626857728866579e-02\n28 5 28 -1.49336819548438007e-02\n28 5 29 2.59351106432132540e-02\n28 5 30 6.91941042988451235e-03\n28 5 31 7.97195348534575431e-04\n28 5 32 5.02811469145349123e-05\n28 5 33 1.72063032775762990e-06\n28 5 34 2.53061237096766558e-08\n28 6 21 2.45685390132601989e-08\n28 6 22 -1.08073649257864014e-06\n28 6 23 2.24608359361936333e-05\n28 6 24 -2.83952392710105948e-04\n28 6 25 2.31536187716469040e-03\n28 6 26 -1.15348812547374796e-02\n28 6 27 2.58666758980879335e-02\n28 6 28 2.20453231588674175e-02\n28 6 29 -2.53802839107632051e-02\n28 6 30 -1.01349881295084963e-02\n28 6 31 -1.70028560299814349e-03\n28 6 32 -1.62376202427191653e-04\n28 6 33 -9.31465923660501586e-06\n28 6 34 -3.02617225717493873e-07\n28 6 35 -4.32354442504956174e-09\n28 7 20 8.17091102013897215e-09\n28 7 21 -3.43080976305867538e-07\n28 7 22 6.91779428839617520e-06\n28 7 23 -8.71511931186777113e-05\n28 7 24 7.43254172124552913e-04\n28 7 25 -4.29245899913783094e-03\n28 7 26 1.53204509771431941e-02\n28 7 27 -2.26537813808029856e-02\n28 7 28 -3.00014990051423884e-02\n28 7 29 2.26180846755960653e-02\n28 7 30 1.36048861643929678e-02\n28 7 31 3.17848730281416667e-03\n28 7 32 4.27777450544453922e-04\n28 7 33 3.63065149642492926e-05\n28 7 34 1.94172101946948939e-06\n28 7 35 6.03750121912910536e-08\n28 7 36 8.38622725570816312e-10\n28 8 19 3.26299448285691078e-09\n28 8 20 -1.30478985508212268e-07\n28 8 21 2.53627988288164684e-06\n28 8 22 -3.13726704943692723e-05\n28 8 23 2.70603601412236627e-04\n28 8 24 -1.66688781711477079e-03\n28 8 25 7.11593287841445828e-03\n28 8 26 -1.85724809044413821e-02\n28 8 27 1.64919173983770000e-02\n28 8 28 3.78988757101871562e-02\n28 8 29 -1.71407620342491132e-02\n28 8 30 -1.67915783755827000e-02\n28 8 31 -5.34213288769740513e-03\n28 8 32 -9.70064050128654938e-04\n28 8 33 -1.13708451070608900e-04\n28 8 34 -8.85921178586540699e-06\n28 8 35 -4.47757613717754005e-07\n28 8 36 -1.33917310061162480e-08\n28 8 37 -1.80985864046082072e-10\n28 9 18 1.54377653361761038e-09\n28 9 19 -5.86431919103568941e-08\n28 9 20 1.09333563645422997e-06\n28 9 21 -1.31480396728418058e-05\n28 9 22 1.12499308935514052e-04\n28 9 23 -7.10078269571446462e-04\n28 9 24 3.29345454139145652e-03\n28 9 25 -1.06519246079760816e-02\n28 9 26 2.02724975872138477e-02\n28 9 27 -7.14875614028042402e-03\n28 9 28 -4.43713247270811766e-02\n28 9 29 8.68012101884280396e-03\n28 9 30 1.88980463907074612e-02\n28 9 31 8.17290571244860834e-03\n28 9 32 1.95081818646533866e-03\n28 9 33 3.02704574604038887e-04\n28 9 34 3.21264239484909174e-05\n28 9 35 2.33940363728302572e-06\n28 9 36 1.12677184574046683e-07\n28 9 37 3.25271428256398348e-09\n28 9 38 4.28025775086564378e-11\n28 10 17 8.56911554260522393e-10\n28 10 18 -3.08369121073043491e-08\n28 10 19 5.48969592656795835e-07\n28 10 20 -6.37063855477627747e-06\n28 10 21 5.33840698927209134e-05\n28 10 22 -3.37314739758800338e-04\n28 10 23 1.62274981434250031e-03\n28 10 24 -5.81337409120136599e-03\n28 10 25 1.43817222636617967e-02\n28 10 26 -1.91944611786864800e-02\n28 10 27 -5.00009063967032781e-03\n28 10 28 4.76624316029447745e-02\n28 10 29 2.52504287024276439e-03\n28 10 30 -1.89194859009170793e-02\n28 10 31 -1.14178173945196474e-02\n28 10 32 -3.53769140302914530e-03\n28 10 33 -7.07427127100439180e-04\n28 10 34 -9.81078459425018547e-05\n28 10 35 -9.63482464949675017e-06\n28 10 36 -6.63090134314233378e-07\n28 10 37 -3.06078840275142334e-08\n28 10 38 -8.54980816107842408e-10\n28 10 39 -1.09621934546981323e-11\n28 11 16 5.54138815427379038e-10\n28 11 17 -1.88325688611926752e-08\n28 11 18 3.18781188186813101e-07\n28 11 19 -3.54800485129825262e-06\n28 11 20 2.88433182634092360e-05\n28 11 21 -1.79658068443505558e-04\n28 11 22 8.72583647413733642e-04\n28 11 23 -3.28234713519524056e-03\n28 11 24 9.20311687109099534e-03\n28 11 25 -1.72777536358271382e-02\n28 11 26 1.41898691250614942e-02\n28 11 27 1.86560372683554827e-02\n28 11 28 -4.58995400646646052e-02\n28 11 29 -1.54435800071520324e-02\n28 11 30 1.58195284591640572e-02\n28 11 31 1.44844780804978316e-02\n28 11 32 5.83207101477901137e-03\n28 11 33 1.47948291059480378e-03\n28 11 34 2.60983131955264341e-04\n28 11 35 3.31766509412793265e-05\n28 11 36 3.05609581630589562e-06\n28 11 37 2.00280635236726824e-07\n28 11 38 8.89578955125378706e-09\n28 11 39 2.40918986421501106e-10\n28 11 40 3.01172263029102150e-12\n28 12 15 4.15446091479490726e-10\n28 12 16 -1.32877819965889657e-08\n28 12 17 2.12962180303375245e-07\n28 12 18 -2.26077163556806498e-06\n28 12 19 1.76941124307749869e-05\n28 12 20 -1.07425002162067853e-04\n28 12 21 5.17438788316240645e-04\n28 12 22 -1.98155122787233664e-03\n28 12 23 5.91415236565913390e-03\n28 12 24 -1.29905841388537369e-02\n28 12 25 1.78218958058367954e-02\n28 12 26 -4.68818547492369375e-03\n28 12 27 -3.14150412058803778e-02\n28 12 28 3.76283548773016620e-02\n28 12 29 2.80574822352086175e-02\n28 12 30 -8.86717241478246114e-03\n28 12 31 -1.63916323954070800e-02\n28 12 32 -8.74997431177837286e-03\n28 12 33 -2.79897924639760939e-03\n28 12 34 -6.17451694821307507e-04\n28 12 35 -9.89058911573226283e-05\n28 12 36 -1.17089308678163329e-05\n28 12 37 -1.02098482361053731e-06\n28 12 38 -6.40558518666538436e-08\n28 12 39 -2.74607168266817214e-09\n28 12 40 -7.22185716491199004e-11\n28 12 41 -8.80779786064230797e-13\n28 13 14 3.59986917440525362e-10\n28 13 15 -1.07936060737257838e-08\n28 13 16 1.63066294869392649e-07\n28 13 17 -1.64244767189393604e-06\n28 13 18 1.22933703937164778e-05\n28 13 19 -7.20943320521025266e-05\n28 13 20 3.39927695540754291e-04\n28 13 21 -1.29853632959237321e-03\n28 13 22 3.98090651795343379e-03\n28 13 23 -9.46977670960625389e-03\n28 13 24 1.60318832638868785e-02\n28 13 25 -1.43113095948420620e-02\n28 13 26 -8.64882707519132890e-03\n28 13 27 3.99294628704042403e-02\n28 13 28 -2.25837563502436728e-02\n28 13 29 -3.74307368379572356e-02\n28 13 30 -1.88062492346153272e-03\n28 13 31 1.58572793685035849e-02\n28 13 32 1.18719366674167397e-02\n28 13 33 4.81184854854484679e-03\n28 13 34 1.31557679745720514e-03\n28 13 35 2.60913387561418730e-04\n28 13 36 3.86457366961342815e-05\n28 13 37 4.30637917438101159e-06\n28 13 38 3.57779646973768475e-07\n28 13 39 2.15754792324837822e-08\n28 13 40 8.94866653656168860e-10\n28 13 41 2.28833300961434089e-11\n28 13 42 2.72439902615374608e-13\n28 14 13 3.59986917440525362e-10\n28 14 14 -1.00732032993623067e-08\n28 14 15 1.42773147181224052e-07\n28 14 16 -1.35719448950252672e-06\n28 14 17 9.65420407895759271e-06\n28 14 18 -5.42644300101106945e-05\n28 14 19 2.47873443661908850e-04\n28 14 20 -9.30634599502655271e-04\n28 14 21 2.86310262253133318e-03\n28 14 22 -7.07006474618087114e-03\n28 14 23 1.32955446289316326e-02\n28 14 24 -1.64803994654106909e-02\n28 14 25 5.56589657269231312e-03\n28 14 26 2.33477740356483589e-02\n28 14 27 -4.06390242377270850e-02\n28 14 28 2.51063419541661352e-03\n28 14 29 4.02388137806808162e-02\n28 14 30 1.50664360062140188e-02\n28 14 31 -1.16141528094480540e-02\n28 14 32 -1.43176688970497378e-02\n28 14 33 -7.50711576681379330e-03\n28 14 34 -2.54100593656985403e-03\n28 14 35 -6.17452822776936568e-04\n28 14 36 -1.12393722265331785e-04\n28 14 37 -1.55826104334804439e-05\n28 14 38 -1.64693538421924503e-06\n28 14 39 -1.31006915379567347e-07\n28 14 40 -7.61716225296767535e-09\n28 14 41 -3.06249862886000165e-10\n28 14 42 -7.62345072264060539e-12\n28 14 43 -8.86507692036349751e-14\n28 15 12 4.15446091479490726e-10\n28 15 13 -1.07936060737257838e-08\n28 15 14 1.42773147181224052e-07\n28 15 15 -1.27377647596794999e-06\n28 15 16 8.55825382934427760e-06\n28 15 17 -4.57752085775534367e-05\n28 15 18 2.00777320333432339e-04\n28 15 19 -7.32225094361268887e-04\n28 15 20 2.22289478406397829e-03\n28 15 21 -5.54591008351905237e-03\n28 15 22 1.09823106312134937e-02\n28 15 23 -1.58343460948102788e-02\n28 15 24 1.22098808268577486e-02\n28 15 25 8.01478819734324276e-03\n28 15 26 -3.50458258361968192e-02\n28 15 27 3.11635369805697451e-02\n28 15 28 1.83681102625980825e-02\n28 15 29 -3.38756590945304827e-02\n28 15 30 -2.77434999559106947e-02\n28 15 31 2.99573616995104431e-03\n28 15 32 1.47519314817566566e-02\n28 15 33 1.05406075624357205e-02\n28 15 34 4.45564033373714149e-03\n28 15 35 1.32127230972096721e-03\n28 15 36 2.92249058447373158e-04\n28 15 37 4.95084166576501115e-05\n28 15 38 6.48114795450662170e-06\n28 15 39 6.53400130088258016e-07\n28 15 40 4.99510048963769640e-08\n28 15 41 2.80722370793258771e-09\n28 15 42 1.09582931617683624e-10\n28 15 43 2.65804515264059117e-12\n28 15 44 3.02070089649371494e-14\n28 16 11 5.54138815427379038e-10\n28 16 12 -1.32877819965889657e-08\n28 16 13 1.63066294869392649e-07\n28 16 14 -1.35719448950252672e-06\n28 16 15 8.55825382934427760e-06\n28 16 16 -4.32541401647527602e-05\n28 16 17 1.80694558443005010e-04\n28 16 18 -6.33724023055297788e-04\n28 16 19 1.87336754841236064e-03\n28 16 20 -4.63165592978860741e-03\n28 16 21 9.34619150074209115e-03\n28 16 22 -1.45218694090583968e-02\n28 16 23 1.46826386066810889e-02\n28 16 24 -1.89892621043253851e-03\n28 16 25 -2.34348295606617359e-02\n28 16 26 3.84367167891929165e-02\n28 16 27 -1.20972881636166600e-02\n28 16 28 -3.38073542860470523e-02\n28 16 29 1.80022446666529748e-02\n28 16 30 3.56782825535648171e-02\n28 16 31 9.29809370395263585e-03\n28 16 32 -1.16618399873398224e-02\n28 16 33 -1.30619340223001479e-02\n28 16 34 -7.06521155049979494e-03\n28 16 35 -2.56490026433550916e-03\n28 16 36 -6.85496120705646217e-04\n28 16 37 -1.40222546142681949e-04\n28 16 38 -2.23261686461668989e-05\n28 16 39 -2.77763022573192817e-06\n28 16 40 -2.68283286763006604e-07\n28 16 41 -1.97699636953600750e-08\n28 16 42 -1.07611560722851685e-09\n28 16 43 -4.08414727416191333e-11\n28 16 44 -9.66152187076017833e-13\n28 16 45 -1.07356870180290160e-14\n28 17 10 8.56911554260522393e-10\n28 17 11 -1.88325688611926752e-08\n28 17 12 2.12962180303375245e-07\n28 17 13 -1.64244767189393604e-06\n28 17 14 9.65420407895759271e-06\n28 17 15 -4.57752085775534367e-05\n28 17 16 1.80694558443005010e-04\n28 17 17 -6.03873879079511826e-04\n28 17 18 1.71871607840512931e-03\n28 17 19 -4.14749998513053927e-03\n28 17 20 8.33462225310542610e-03\n28 17 21 -1.33634697811376773e-02\n28 17 22 1.52988127395046235e-02\n28 17 23 -7.43826614859907003e-03\n28 17 24 -1.33562141106466569e-02\n28 17 25 3.49326305080676225e-02\n28 17 26 -2.95341125740782722e-02\n28 17 27 -1.16017547596553940e-02\n28 17 28 3.74100244562489980e-02\n28 17 29 4.02933330917239635e-03\n28 17 30 -3.45799772402005984e-02\n28 17 31 -2.25698707287930867e-02\n28 17 32 4.00998756969373718e-03\n28 17 33 1.36742660972583674e-02\n28 17 34 1.00178328303980219e-02\n28 17 35 4.51087214851509740e-03\n28 17 36 1.45692307012022953e-03\n28 17 37 3.57471231948853087e-04\n28 17 38 6.83856954731008998e-05\n28 17 39 1.03088054044138119e-05\n28 17 40 1.22495587812681220e-06\n28 17 41 1.13746985030365291e-07\n28 17 42 8.09953077271366659e-09\n28 17 43 4.27736933859800641e-10\n28 17 44 1.58018943615529568e-11\n28 17 45 3.64855446704833558e-13\n28 17 46 3.96605436940043103e-15\n28 18 9 1.54377653361761038e-09\n28 18 10 -3.08369121073043491e-08\n28 18 11 3.18781188186813101e-07\n28 18 12 -2.26077163556806498e-06\n28 18 13 1.22933703937164778e-05\n28 18 14 -5.42644300101106945e-05\n28 18 15 2.00777320333432339e-04\n28 18 16 -6.33724023055297788e-04\n28 18 17 1.71871607840512931e-03\n28 18 18 -3.99621443796144096e-03\n28 18 19 7.85607529999415488e-03\n28 18 20 -1.26250889432785053e-02\n28 18 21 1.52688130577952956e-02\n28 18 22 -1.02648442973253218e-02\n28 18 23 -6.43961155380933046e-03\n28 18 24 2.87138541788744606e-02\n28 18 25 -3.56424066020426000e-02\n28 18 26 8.78749046762894692e-03\n28 18 27 3.09195492231033166e-02\n28 18 28 -2.58407421018114264e-02\n28 18 29 -2.48952755371050921e-02\n28 18 30 2.22600352393578891e-02\n28 18 31 3.21740834309557712e-02\n28 18 32 7.80046322443278957e-03\n28 18 33 -1.07155173775519778e-02\n28 18 34 -1.23992499521942941e-02\n28 18 35 -7.13821892445342473e-03\n28 18 36 -2.80678290993014830e-03\n28 18 37 -8.24658932759094570e-04\n28 18 38 -1.88161905521389980e-04\n28 18 39 -3.39431398911376982e-05\n28 18 40 -4.87169048193453438e-06\n28 18 41 -5.55081715185069926e-07\n28 18 42 -4.96938244469770115e-08\n28 18 43 -3.42620568452374670e-09\n28 18 44 -1.75804201474022304e-10\n28 18 45 -6.32852506835051076e-12\n28 18 46 -1.42722862580061519e-13\n28 18 47 -1.51841424978863763e-15\n28 19 8 3.26299448285691078e-09\n28 19 9 -5.86431919103568941e-08\n28 19 10 5.48969592656795835e-07\n28 19 11 -3.54800485129825262e-06\n28 19 12 1.76941124307749869e-05\n28 19 13 -7.20943320521025266e-05\n28 19 14 2.47873443661908850e-04\n28 19 15 -7.32225094361268887e-04\n28 19 16 1.87336754841236064e-03\n28 19 17 -4.14749998513053927e-03\n28 19 18 7.85607529999415488e-03\n28 19 19 -1.23753047747310485e-02\n28 19 20 1.51487576697041743e-02\n28 19 21 -1.15487736485512576e-02\n28 19 22 -2.35524916309114431e-03\n28 19 23 2.33557689214311070e-02\n28 19 24 -3.60856825228604813e-02\n28 19 25 2.14760465130886412e-02\n28 19 26 1.66204358419528429e-02\n28 19 27 -3.59610015959057756e-02\n28 19 28 2.20524739085610574e-03\n28 19 29 3.52752453251190030e-02\n28 19 30 -1.02345971756261992e-03\n28 19 31 -3.28345056759966760e-02\n28 19 32 -2.10342572848532234e-02\n28 19 33 3.01704081486781498e-03\n28 19 34 1.26873679100230557e-02\n28 19 35 1.00100541245090435e-02\n28 19 36 4.88101048038372652e-03\n28 19 37 1.72424253438127142e-03\n28 19 38 4.67878077873155738e-04\n28 19 39 1.00212920928381863e-04\n28 19 40 1.71545641689752342e-05\n28 19 41 2.35459530935468338e-06\n28 19 42 2.58075580868204626e-07\n28 19 43 2.23272399457152204e-08\n28 19 44 1.49309018457995763e-09\n28 19 45 7.45335212627215050e-11\n28 19 46 2.61677802383848136e-12\n28 19 47 5.76797588969128662e-14\n28 19 48 6.00863421654148888e-16\n28 20 7 8.17091102013897215e-09\n28 20 8 -1.30478985508212268e-07\n28 20 9 1.09333563645422997e-06\n28 20 10 -6.37063855477627747e-06\n28 20 11 2.88433182634092360e-05\n28 20 12 -1.07425002162067853e-04\n28 20 13 3.39927695540754291e-04\n28 20 14 -9.30634599502655271e-04\n28 20 15 2.22289478406397829e-03\n28 20 16 -4.63165592978860741e-03\n28 20 17 8.33462225310542610e-03\n28 20 18 -1.26250889432785053e-02\n28 20 19 1.51487576697041743e-02\n28 20 20 -1.19132238063701297e-02\n28 20 21 -4.95010487778785906e-04\n28 20 22 2.00006669328254474e-02\n28 20 23 -3.47994101961568281e-02\n28 20 24 2.79437528348607748e-02\n28 20 25 4.12902531997399611e-03\n28 20 26 -3.39016452542766851e-02\n28 20 27 2.18132320418592870e-02\n28 20 28 2.28045638280071547e-02\n28 20 29 -2.84092374394936486e-02\n28 20 30 -2.12600245434121232e-02\n28 20 31 2.13848700019529692e-02\n28 20 32 3.05570960610857036e-02\n28 20 33 8.92727224218035784e-03\n28 20 34 -9.10782334199018200e-03\n28 20 35 -1.20514802786268727e-02\n28 20 36 -7.58273070189430942e-03\n28 20 37 -3.25969567481150283e-03\n28 20 38 -1.05398343009118219e-03\n28 20 39 -2.67037755411925096e-04\n28 20 40 -5.40746725565243151e-05\n28 20 41 -8.82753962965837712e-06\n28 20 42 -1.16289369403424769e-06\n28 20 43 -1.22933895292736062e-07\n28 20 44 -1.02981741806281219e-08\n28 20 45 -6.68953574436116145e-10\n28 20 46 -3.25233656692916203e-11\n28 20 47 -1.11458561905344660e-12\n28 20 48 -2.40270248994670270e-14\n28 20 49 -2.45186488607188789e-16\n28 21 6 2.45685390132601989e-08\n28 21 7 -3.43080976305867538e-07\n28 21 8 2.53627988288164684e-06\n28 21 9 -1.31480396728418058e-05\n28 21 10 5.33840698927209134e-05\n28 21 11 -1.79658068443505558e-04\n28 21 12 5.17438788316240645e-04\n28 21 13 -1.29853632959237321e-03\n28 21 14 2.86310262253133318e-03\n28 21 15 -5.54591008351905237e-03\n28 21 16 9.34619150074209115e-03\n28 21 17 -1.33634697811376773e-02\n28 21 18 1.52688130577952956e-02\n28 21 19 -1.15487736485512576e-02\n28 21 20 -4.95010487778785906e-04\n28 21 21 1.88777236398727799e-02\n28 21 22 -3.37724610192610846e-02\n28 21 23 3.07128119147258526e-02\n28 21 24 -3.97551630283992772e-03\n28 21 25 -2.82996872563577669e-02\n28 21 26 3.10812582963318225e-02\n28 21 27 5.70614420788766470e-03\n28 21 28 -3.46117494090728385e-02\n28 21 29 5.64879665559063774e-03\n28 21 30 3.32932287495432139e-02\n28 21 31 -2.76335945069526221e-05\n28 21 32 -3.04381347307743556e-02\n28 21 33 -2.18985928504966184e-02\n28 21 34 5.79611048963972467e-04\n28 21 35 1.15521325617886984e-02\n28 21 36 1.03041832231347173e-02\n28 21 37 5.53104235118535339e-03\n28 21 38 2.14858165692122823e-03\n28 21 39 6.44258539042112347e-04\n28 21 40 1.53658367978400620e-04\n28 21 41 2.95820647603311739e-05\n28 21 42 4.62379399625370676e-06\n28 21 43 5.86332536993456215e-07\n28 21 44 5.99158312025724450e-08\n28 21 45 4.86816701190014135e-09\n28 21 46 3.07573115194016927e-10\n28 21 47 1.45784752567386114e-11\n28 21 48 4.88045290947362488e-13\n28 21 49 1.02949132209410710e-14\n28 21 50 1.02954280052112600e-16\n28 22 5 9.03757256841975372e-08\n28 22 6 -1.08073649257864014e-06\n28 22 7 6.91779428839617520e-06\n28 22 8 -3.13726704943692723e-05\n28 22 9 1.12499308935514052e-04\n28 22 10 -3.37314739758800338e-04\n28 22 11 8.72583647413733642e-04\n28 22 12 -1.98155122787233664e-03\n28 22 13 3.98090651795343379e-03\n28 22 14 -7.07006474618087114e-03\n28 22 15 1.09823106312134937e-02\n28 22 16 -1.45218694090583968e-02\n28 22 17 1.52988127395046235e-02\n28 22 18 -1.02648442973253218e-02\n28 22 19 -2.35524916309114431e-03\n28 22 20 2.00006669328254474e-02\n28 22 21 -3.37724610192610846e-02\n28 22 22 3.14527104860160022e-02\n28 22 23 -7.79813331822275408e-03\n28 22 24 -2.37793768736864254e-02\n28 22 25 3.41216012979107842e-02\n28 22 26 -6.92372506540371166e-03\n28 22 27 -2.96629949610547047e-02\n28 22 28 2.36929656509516595e-02\n28 22 29 2.09036202804242665e-02\n28 22 30 -2.64345324745273646e-02\n28 22 31 -2.21440279251922127e-02\n28 22 32 1.74350313758602263e-02\n28 22 33 3.00167796382909532e-02\n28 22 34 1.18859858992362799e-02\n28 22 35 -6.69396677812634494e-03\n28 22 36 -1.17143285136181526e-02\n28 22 37 -8.29709172036795062e-03\n28 22 38 -3.94246951228051512e-03\n28 22 39 -1.40707096643698547e-03\n28 22 40 -3.95059050877918467e-04\n28 22 41 -8.92622632475092654e-05\n28 22 42 -1.64108360961821435e-05\n28 22 43 -2.46404992640924318e-06\n28 22 44 -3.01518780194198833e-07\n28 22 45 -2.98401811821136337e-08\n28 22 46 -2.35504028595080102e-09\n28 22 47 -1.44885401266812475e-10\n28 22 48 -6.70098826196219663e-12\n28 22 49 -2.19288760570332490e-13\n28 22 50 -4.52881823617701476e-15\n28 22 51 -4.44023127431688956e-17\n28 23 4 4.17723959673909619e-07\n28 23 5 -4.15630092053972397e-06\n28 23 6 2.24608359361936333e-05\n28 23 7 -8.71511931186777113e-05\n28 23 8 2.70603601412236627e-04\n28 23 9 -7.10078269571446462e-04\n28 23 10 1.62274981434250031e-03\n28 23 11 -3.28234713519524056e-03\n28 23 12 5.91415236565913390e-03\n28 23 13 -9.46977670960625389e-03\n28 23 14 1.32955446289316326e-02\n28 23 15 -1.58343460948102788e-02\n28 23 16 1.46826386066810889e-02\n28 23 17 -7.43826614859907003e-03\n28 23 18 -6.43961155380933046e-03\n28 23 19 2.33557689214311070e-02\n28 23 20 -3.47994101961568281e-02\n28 23 21 3.07128119147258526e-02\n28 23 22 -7.79813331822275408e-03\n28 23 23 -2.21312858141265127e-02\n28 23 24 3.47074873484134052e-02\n28 23 25 -1.38349735018995497e-02\n28 23 26 -2.29550233381970489e-02\n28 23 27 3.13238336637130064e-02\n28 23 28 4.75563160997840193e-03\n28 23 29 -3.31481351632631367e-02\n28 23 30 2.35508071049163720e-03\n28 23 31 3.21117403572128002e-02\n28 23 32 5.01005872202566918e-03\n28 23 33 -2.70052091221260578e-02\n28 23 34 -2.40951968306416285e-02\n28 23 35 -3.21535429349074648e-03\n28 23 36 9.89199111885556695e-03\n28 23 37 1.06775301378935722e-02\n28 23 38 6.43778248336944443e-03\n28 23 39 2.77112252524110793e-03\n28 23 40 9.19518334016805655e-04\n28 23 41 2.43524580541354128e-04\n28 23 42 5.23899420042152635e-05\n28 23 43 9.23182047296974327e-06\n28 23 44 1.33519652893531495e-06\n28 23 45 1.57994938503506650e-07\n28 23 46 1.51681180451568455e-08\n28 23 47 1.16429053581915435e-09\n28 23 48 6.98189420523075844e-11\n28 23 49 3.15346247543690833e-12\n28 23 50 1.00941649722073773e-13\n28 23 51 2.04202369531617051e-15\n28 23 52 1.96357509629533233e-17\n28 24 3 2.52560878983835572e-06\n28 24 4 -2.00463983008532510e-05\n28 24 5 8.82169346893598829e-05\n28 24 6 -2.83952392710105948e-04\n28 24 7 7.43254172124552913e-04\n28 24 8 -1.66688781711477079e-03\n28 24 9 3.29345454139145652e-03\n28 24 10 -5.81337409120136599e-03\n28 24 11 9.20311687109099534e-03\n28 24 12 -1.29905841388537369e-02\n28 24 13 1.60318832638868785e-02\n28 24 14 -1.64803994654106909e-02\n28 24 15 1.22098808268577486e-02\n28 24 16 -1.89892621043253851e-03\n28 24 17 -1.33562141106466569e-02\n28 24 18 2.87138541788744606e-02\n28 24 19 -3.60856825228604813e-02\n28 24 20 2.79437528348607748e-02\n28 24 21 -3.97551630283992772e-03\n28 24 22 -2.37793768736864254e-02\n28 24 23 3.47074873484134052e-02\n28 24 24 -1.59638041551176270e-02\n28 24 25 -1.89013565508414310e-02\n28 24 26 3.33875777607418038e-02\n28 24 27 -6.47373107121714576e-03\n28 24 28 -2.95549453352557540e-02\n28 24 29 1.97613855182551800e-02\n28 24 30 2.37905837912676928e-02\n28 24 31 -2.11732000194493607e-02\n28 24 32 -2.55262345552844959e-02\n28 24 33 1.06726329173968845e-02\n28 24 34 2.92588707553405050e-02\n28 24 35 1.61292424717118351e-02\n28 24 36 -3.15547726711132603e-03\n28 24 37 -1.10081843785309534e-02\n28 24 38 -9.15170772628345878e-03\n28 24 39 -4.87781994233958769e-03\n28 24 40 -1.93215538536422011e-03\n28 24 41 -6.01390128338364964e-04\n28 24 42 -1.51109367776609959e-04\n28 24 43 -3.10795822323583558e-05\n28 24 44 -5.26515410743840907e-06\n28 24 45 -7.35219844081745047e-07\n28 24 46 -8.42821647205194824e-08\n28 24 47 -7.86046305862380739e-09\n28 24 48 -5.87498671942590910e-10\n28 24 49 -3.43717744819532138e-11\n28 24 50 -1.51717416382933610e-12\n28 24 51 -4.75311982824606957e-14\n28 24 52 -9.42311484950501282e-16\n28 24 53 -8.89012660795334433e-18\n28 25 2 2.13410206600960331e-05\n28 25 3 -1.26255180877905364e-04\n28 25 4 4.27746585218059103e-04\n28 25 5 -1.09063988292262061e-03\n28 25 6 2.31536187716469040e-03\n28 25 7 -4.29245899913783094e-03\n28 25 8 7.11593287841445828e-03\n28 25 9 -1.06519246079760816e-02\n28 25 10 1.43817222636617967e-02\n28 25 11 -1.72777536358271382e-02\n28 25 12 1.78218958058367954e-02\n28 25 13 -1.43113095948420620e-02\n28 25 14 5.56589657269231312e-03\n28 25 15 8.01478819734324276e-03\n28 25 16 -2.34348295606617359e-02\n28 25 17 3.49326305080676225e-02\n28 25 18 -3.56424066020426000e-02\n28 25 19 2.14760465130886412e-02\n28 25 20 4.12902531997399611e-03\n28 25 21 -2.82996872563577669e-02\n28 25 22 3.41216012979107842e-02\n28 25 23 -1.38349735018995497e-02\n28 25 24 -1.89013565508414310e-02\n28 25 25 3.36550836957846938e-02\n28 25 26 -1.17318070253200048e-02\n28 25 27 -2.46712660402713199e-02\n28 25 28 2.77685515551907917e-02\n28 25 29 1.07714713404682447e-02\n28 25 30 -3.10875306941541323e-02\n28 25 31 -5.67512996750500879e-03\n28 25 32 2.98438118526945984e-02\n28 25 33 1.27174017335164369e-02\n28 25 34 -2.14266350385466231e-02\n28 25 35 -2.64376067029645548e-02\n28 25 36 -8.33252367314605489e-03\n28 25 37 7.23428676839645044e-03\n28 25 38 1.08211032376973357e-02\n28 25 39 7.54497317381725839e-03\n28 25 40 3.63945851601669241e-03\n28 25 41 1.34173679644713649e-03\n28 25 42 3.94430730667985375e-04\n28 25 43 9.44681334497840921e-05\n28 25 44 1.86389158739711379e-05\n28 25 45 3.04346287540985566e-06\n28 25 46 4.11139575101246164e-07\n28 25 47 4.57313871369693290e-08\n28 25 48 4.14858966083720417e-09\n28 25 49 3.02226308195153574e-10\n28 25 50 1.72651621819784044e-11\n28 25 51 7.45273984598759072e-13\n28 25 52 2.28642845612959724e-14\n28 25 53 4.44417420239682605e-16\n28 25 54 4.11515252111189712e-18\n28 26 1 2.86478859846933836e-04\n28 26 2 -1.10952785322766341e-03\n28 26 3 2.61689622445955820e-03\n28 26 4 -4.89269975277418487e-03\n28 26 5 7.92306565442666796e-03\n28 26 6 -1.15348812547374796e-02\n28 26 7 1.53204509771431941e-02\n28 26 8 -1.85724809044413821e-02\n28 26 9 2.02724975872138477e-02\n28 26 10 -1.91944611786864800e-02\n28 26 11 1.41898691250614942e-02\n28 26 12 -4.68818547492369375e-03\n28 26 13 -8.64882707519132890e-03\n28 26 14 2.33477740356483589e-02\n28 26 15 -3.50458258361968192e-02\n28 26 16 3.84367167891929165e-02\n28 26 17 -2.95341125740782722e-02\n28 26 18 8.78749046762894692e-03\n28 26 19 1.66204358419528429e-02\n28 26 20 -3.39016452542766851e-02\n28 26 21 3.10812582963318225e-02\n28 26 22 -6.92372506540371166e-03\n28 26 23 -2.29550233381970489e-02\n28 26 24 3.33875777607418038e-02\n28 26 25 -1.17318070253200048e-02\n28 26 26 -2.26886746415947593e-02\n28 26 27 3.03487883435975045e-02\n28 26 28 1.82767263411788132e-03\n28 26 29 -3.12841744047129232e-02\n28 26 30 1.06482098873190976e-02\n28 26 31 2.82980951349654410e-02\n28 26 32 -1.19178631838775651e-02\n28 26 33 -2.87957666657316725e-02\n28 26 34 1.06762281287349897e-03\n28 26 35 2.66728736066673168e-02\n28 26 36 2.08934686324216494e-02\n28 26 37 1.80923857114148811e-03\n28 26 38 -9.43774267888342722e-03\n28 26 39 -9.92094152554295784e-03\n28 26 40 -6.06241728270240724e-03\n28 26 41 -2.68900572812468419e-03\n28 26 42 -9.30546770797251275e-04\n28 26 43 -2.59775691893711792e-04\n28 26 44 -5.95329740295978229e-05\n28 26 45 -1.13001107629808676e-05\n28 26 46 -1.78236144699192902e-06\n28 26 47 -2.33337868616618523e-07\n28 26 48 -2.52185950940499052e-08\n28 26 49 -2.22777049451539212e-09\n28 26 50 -1.58334467725015420e-10\n28 26 51 -8.83864526696504139e-12\n28 26 52 -3.73347338620428982e-13\n28 26 53 -1.12221310986220243e-14\n28 26 54 -2.13948358664544955e-16\n28 26 55 -1.94506545503487143e-18\n28 27 0 8.92999532961366392e-03\n28 27 1 -1.54672056222436492e-02\n28 27 2 1.99106053167945160e-02\n28 27 3 -2.32865421794596739e-02\n28 27 4 2.56362903811352811e-02\n28 27 5 -2.66626857728866579e-02\n28 27 6 2.58666758980879335e-02\n28 27 7 -2.26537813808029856e-02\n28 27 8 1.64919173983770000e-02\n28 27 9 -7.14875614028042402e-03\n28 27 10 -5.00009063967032781e-03\n28 27 11 1.86560372683554827e-02\n28 27 12 -3.14150412058803778e-02\n28 27 13 3.99294628704042403e-02\n28 27 14 -4.06390242377270850e-02\n28 27 15 3.11635369805697451e-02\n28 27 16 -1.20972881636166600e-02\n28 27 17 -1.16017547596553940e-02\n28 27 18 3.09195492231033166e-02\n28 27 19 -3.59610015959057756e-02\n28 27 20 2.18132320418592870e-02\n28 27 21 5.70614420788766470e-03\n28 27 22 -2.96629949610547047e-02\n28 27 23 3.13238336637130064e-02\n28 27 24 -6.47373107121714576e-03\n28 27 25 -2.46712660402713199e-02\n28 27 26 3.03487883435975045e-02\n28 27 27 -1.16945339086037092e-03\n28 27 28 -2.95535701482638683e-02\n28 27 29 1.90673983439505685e-02\n28 27 30 2.05169077884406872e-02\n28 27 31 -2.52225469622771192e-02\n28 27 32 -1.64421073643571943e-02\n28 27 33 2.38049006866457196e-02\n28 27 34 2.11895300607130427e-02\n28 27 35 -1.26094188181451197e-02\n28 27 36 -2.73361265706265940e-02\n28 27 37 -1.44379282526385185e-02\n28 27 38 3.08431742506643051e-03\n28 27 39 1.02767585628808545e-02\n28 27 40 8.70486217944148224e-03\n28 27 41 4.78714816893281508e-03\n28 27 42 1.97498122115308310e-03\n28 27 43 6.45811261813393833e-04\n28 27 44 1.71967502137655728e-04\n28 27 45 3.78303744238761622e-05\n28 27 46 6.92485672652560577e-06\n28 27 47 1.05709924808006225e-06\n28 27 48 1.34317972183213938e-07\n28 27 49 1.41226654197808184e-08\n28 27 50 1.21610066107391666e-09\n28 27 51 8.43939032928205911e-11\n28 27 52 4.60674951918880084e-12\n28 27 53 1.90526217744335763e-13\n28 27 54 5.61366261244325812e-15\n28 27 55 1.05015523162238179e-16\n28 27 56 9.37675975885113230e-19\n28 28 1 -5.33759879065909798e-04\n28 28 2 2.06724312249595349e-03\n28 28 3 -4.88064152783368181e-03\n28 28 4 9.15491581661953935e-03\n28 28 5 -1.49336819548438007e-02\n28 28 6 2.20453231588674175e-02\n28 28 7 -3.00014990051423884e-02\n28 28 8 3.78988757101871562e-02\n28 28 9 -4.43713247270811766e-02\n28 28 10 4.76624316029447745e-02\n28 28 11 -4.58995400646646052e-02\n28 28 12 3.76283548773016620e-02\n28 28 13 -2.25837563502436728e-02\n28 28 14 2.51063419541661352e-03\n28 28 15 1.83681102625980825e-02\n28 28 16 -3.38073542860470523e-02\n28 28 17 3.74100244562489980e-02\n28 28 18 -2.58407421018114264e-02\n28 28 19 2.20524739085610574e-03\n28 28 20 2.28045638280071547e-02\n28 28 21 -3.46117494090728385e-02\n28 28 22 2.36929656509516595e-02\n28 28 23 4.75563160997840193e-03\n28 28 24 -2.95549453352557540e-02\n28 28 25 2.77685515551907917e-02\n28 28 26 1.82767263411788132e-03\n28 28 27 -2.95535701482638683e-02\n28 28 28 2.14745432591245638e-02\n28 28 29 1.52396554733157863e-02\n28 28 30 -2.95341378633205804e-02\n28 28 31 -3.57063657353087853e-03\n28 28 32 2.99066848074487990e-02\n28 28 33 1.53692565939528617e-03\n28 28 34 -2.85828079809837233e-02\n28 28 35 -1.05496524341382298e-02\n28 28 36 2.05490141955790069e-02\n28 28 37 2.48341480403617670e-02\n28 28 38 8.22790705726196682e-03\n28 28 39 -6.40981028651010949e-03\n28 28 40 -1.02111791136540832e-02\n28 28 41 -7.41637264656417060e-03\n28 28 42 -3.73568281283312842e-03\n28 28 43 -1.44589293421836119e-03\n28 28 44 -4.49133848831426351e-04\n28 28 45 -1.14495611658213438e-04\n28 28 46 -2.42435735225071205e-05\n28 28 47 -4.28866119588732291e-06\n28 28 48 -6.34660059986012512e-07\n28 28 49 -7.83742506136214551e-08\n28 28 50 -8.02569892036377800e-09\n28 28 51 -6.74274568436700967e-10\n28 28 52 -4.57242614928798832e-11\n28 28 53 -2.44220214576239065e-12\n28 28 54 -9.89482731226752059e-14\n28 28 55 -2.85907534127422478e-15\n28 28 56 -5.25014818751131230e-17\n28 28 57 -4.60557034218988303e-19\n29 0 28 8.62197125625809006e-03\n29 0 30 -8.33449098192311385e-03\n29 1 27 2.66715604579236539e-04\n29 1 28 -1.49336922772374724e-02\n29 1 29 -4.98145184805544232e-04\n29 1 30 1.44357618359154544e-02\n29 1 31 2.32865159724236114e-04\n29 2 26 1.91326345170933177e-05\n29 2 27 -1.03298509470902577e-03\n29 2 28 1.92275958485769591e-02\n29 2 29 1.92930800474528878e-03\n29 2 30 -1.85897804024780533e-02\n29 2 31 -9.01882885523896589e-04\n29 2 32 -1.40936406064426006e-05\n29 3 25 2.17713708096593221e-06\n29 3 26 -1.13190192264009662e-04\n29 3 27 2.43692783960041702e-03\n29 3 28 -2.25056240565520264e-02\n29 3 29 -4.55569383369293675e-03\n29 3 30 2.17746622414455130e-02\n29 3 31 2.12848399846969841e-03\n29 3 32 8.33791022620468818e-05\n29 3 33 1.26346476536693981e-06\n29 4 24 3.45678939882915494e-07\n29 4 25 -1.72804898589988526e-05\n29 4 26 3.83592902591940000e-04\n29 4 27 -4.55963577409179520e-03\n29 4 28 2.48275339107602275e-02\n29 4 29 8.54969017177817868e-03\n29 4 30 -2.40655377827756981e-02\n29 4 31 -3.98762077403301949e-03\n29 4 32 -2.82762587380543622e-04\n29 4 33 -1.00284406783604890e-05\n29 4 34 -1.47493018301309469e-07\n29 5 23 7.16710141385050801e-08\n29 5 24 -3.43946202455835440e-06\n29 5 25 7.60720584773743507e-05\n29 5 26 -9.78872887226002510e-04\n29 5 27 7.39612749610051212e-03\n29 5 28 -2.59351106432132540e-02\n29 5 29 -1.39620224676671486e-02\n29 5 30 2.52379570036524086e-02\n29 5 31 6.48681468672980268e-03\n29 5 32 7.23027498410645438e-04\n29 5 33 4.41952109722375590e-05\n29 5 34 1.46753700270739701e-06\n29 5 35 2.09669539186536687e-08\n29 6 22 1.86361579492044400e-08\n29 6 23 -8.57060674790750563e-07\n29 6 24 1.85950251347737747e-05\n29 6 25 -2.45095459851503924e-04\n29 6 26 2.08167199911074774e-03\n29 6 27 -1.08022686730457072e-02\n29 6 28 2.53802839107632051e-02\n29 6 29 2.06541979421673503e-02\n29 6 30 -2.48887902189586911e-02\n29 6 31 -9.52581973266765276e-03\n29 6 32 -1.54402506498953672e-03\n29 6 33 -1.42811914228764677e-04\n29 6 34 -7.94655018556501997e-06\n29 6 35 -2.50728301947852189e-07\n29 6 36 -3.48267344925821534e-09\n29 7 21 5.91606863255630553e-09\n29 7 22 -2.60239783096283510e-07\n29 7 23 5.48890507164797883e-06\n29 7 24 -7.22321657797345810e-05\n29 7 25 6.42760681984817654e-04\n29 7 26 -3.87116018874634013e-03\n29 7 27 1.44282828109455027e-02\n29 7 28 -2.26180846755960653e-02\n29 7 29 -2.82090206252536567e-02\n29 7 30 2.25181371378557872e-02\n29 7 31 1.28444571855417070e-02\n29 7 32 2.89279897372168219e-03\n29 7 33 3.76698228737843962e-04\n29 7 34 3.09942138122893366e-05\n29 7 35 1.60922088047186757e-06\n29 7 36 4.86328880395024702e-08\n29 7 37 6.57261205356182292e-10\n29 8 20 2.24997212519504412e-09\n29 8 21 -9.44720400785583855e-08\n29 8 22 1.92506587199624471e-06\n29 8 23 -2.49252568443626781e-05\n29 8 24 2.24760138651478632e-04\n29 8 25 -1.44622106245251294e-03\n29 8 26 6.45048130554017212e-03\n29 8 27 -1.76586069365076394e-02\n29 8 28 1.71407620342491132e-02\n29 8 29 3.58411074342757992e-02\n29 8 30 -1.76440299492569559e-02\n29 8 31 -1.59718433618334993e-02\n29 8 32 -4.87973524090730245e-03\n29 8 33 -8.56026302010927355e-04\n29 8 34 -9.71912475235892617e-05\n29 8 35 -7.34719464367218819e-06\n29 8 36 -3.60780682671477625e-07\n29 8 37 -1.04956197757396259e-08\n29 8 38 -1.38112216422023147e-10\n29 9 19 1.01123983005264819e-09\n29 9 20 -4.04369507285350234e-08\n29 9 21 7.92209101901046455e-07\n29 9 22 -9.99489246222231983e-06\n29 9 23 8.95984084664067411e-05\n29 9 24 -5.91899562390624934e-04\n29 9 25 2.87242126924230798e-03\n29 9 26 -9.73503240461705327e-03\n29 9 27 1.95931876255084484e-02\n29 9 28 -8.68012101884280396e-03\n29 9 29 -4.23460945042310808e-02\n29 9 30 9.97568177299230458e-03\n29 9 31 1.82007009164829691e-02\n29 9 32 7.50830087570052051e-03\n29 9 33 1.72720381429911519e-03\n29 9 34 2.59265995041958268e-04\n29 9 35 2.66770377625462368e-05\n29 9 36 1.88632404799803056e-06\n29 9 37 8.83369921310898544e-08\n29 9 38 2.48218048033905354e-09\n29 9 39 3.18254422816430847e-11\n29 10 18 5.31749939641870373e-10\n29 10 19 -2.01994997848976104e-08\n29 10 20 3.78872979987600570e-07\n29 10 21 -4.62438552631036498e-06\n29 10 22 4.06961548472682608e-05\n29 10 23 -2.69731493400507274e-04\n29 10 24 1.36027383171582462e-03\n29 10 25 -5.11112552468108489e-03\n29 10 26 1.33146120996488616e-02\n29 10 27 -1.91214284194701012e-02\n29 10 28 -2.52504287024276439e-03\n29 10 29 4.61465390687277880e-02\n29 10 30 3.54038249557148660e-04\n29 10 31 -1.86223710624480835e-02\n29 10 32 -1.05820205398192770e-02\n29 10 33 -3.14791021531767377e-03\n29 10 34 -6.07829372174603872e-04\n29 10 35 -8.16334724117365787e-05\n29 10 36 -7.77887167873573787e-06\n29 10 37 -5.20238922473498917e-07\n29 10 38 -2.33648628710360038e-08\n29 10 39 -6.35712711680721358e-10\n29 10 40 -7.94702978196503812e-12\n29 11 17 3.24747734805408796e-10\n29 11 18 -1.16864071973943786e-08\n29 11 19 2.09034803078367369e-07\n29 11 20 -2.45386829458785675e-06\n29 11 21 2.10056087476154453e-05\n29 11 22 -1.37585517837644109e-04\n29 11 23 7.02081465682419605e-04\n29 11 24 -2.77472538129851466e-03\n29 11 25 8.19065265056495449e-03\n29 11 26 -1.63337949863756838e-02\n29 11 27 1.51462850801373110e-02\n29 11 28 1.54435800071520324e-02\n29 11 29 -4.55042084584532763e-02\n29 11 30 -1.25315877679812488e-02\n29 11 31 1.62653583541195907e-02\n29 11 32 1.36081921555498938e-02\n29 11 33 5.22796757263054541e-03\n29 11 34 1.27712119820972594e-03\n29 11 35 2.17830588189480859e-04\n29 11 36 2.68410710358888323e-05\n29 11 37 2.40089288941410187e-06\n29 11 38 1.53004707111321827e-07\n29 11 39 6.61665141712471893e-09\n29 11 40 1.74653947500985997e-10\n29 11 41 2.13008458908043954e-12\n29 12 16 2.29133748868027594e-10\n29 12 17 -7.78717711852089369e-09\n29 12 18 1.32316819485909291e-07\n29 12 19 -1.48616470885731391e-06\n29 12 20 1.22842149551011548e-05\n29 12 21 -7.86450739526256969e-05\n29 12 22 3.99024307682775036e-04\n29 12 23 -1.60902159766715904e-03\n29 12 24 5.06225328492546884e-03\n29 12 25 -1.17792383157563119e-02\n29 12 26 1.74767057212358310e-02\n29 12 27 -6.99480087416245656e-03\n29 12 28 -2.80574822352086175e-02\n29 12 29 3.89551778332480918e-02\n29 12 30 2.48663084767150833e-02\n29 12 31 -1.03720546930636644e-02\n29 12 32 -1.57412411915026593e-02\n29 12 33 -7.92894944654025191e-03\n29 12 34 -2.43233068985872454e-03\n29 12 35 -5.17663817546479834e-04\n29 12 36 -8.02635192685659697e-05\n29 12 37 -9.21779431254822291e-06\n29 12 38 -7.81042723190203470e-07\n29 12 39 -4.76826178337575464e-08\n29 12 40 -1.99147452762874425e-09\n29 12 41 -5.10776340981729630e-11\n29 12 42 -6.08110165830943099e-13\n29 13 15 1.86124322638072894e-10\n29 13 16 -5.95306942152227276e-09\n29 13 17 9.57049905927635231e-08\n29 13 18 -1.02348899114107001e-06\n29 13 19 8.11731279972717350e-06\n29 13 20 -5.03559232377464425e-05\n29 13 21 2.50831462639919452e-04\n29 13 22 -1.01160933595143118e-03\n29 13 23 3.27588399578522759e-03\n29 13 24 -8.25713786433580111e-03\n29 13 25 1.49769004121851188e-02\n29 13 26 -1.51768230621777533e-02\n29 13 27 -5.01846547062452606e-03\n29 13 28 3.74307368379572356e-02\n29 13 29 -2.59635892078843390e-02\n29 13 30 -3.47949814865062628e-02\n29 13 31 8.10696950876467274e-04\n29 13 32 1.58335752194607817e-02\n29 13 33 1.09321569500155679e-02\n29 13 34 4.22131504146691120e-03\n29 13 35 1.10990887074024800e-03\n29 13 36 2.12658842884095861e-04\n29 13 37 3.05166807305890571e-05\n29 13 38 3.30128812941012652e-06\n29 13 39 2.66698481416928110e-07\n29 13 40 1.56596425360522802e-08\n29 13 41 6.33142641049958629e-10\n29 13 42 1.57991655572749333e-11\n29 13 43 1.83723648303829714e-13\n29 14 14 1.73701738611091930e-10\n29 14 15 -5.20815632473411634e-09\n29 14 16 7.88836338097198429e-08\n29 14 17 -7.99331772574949495e-07\n29 14 18 6.04752404046677457e-06\n29 14 19 -3.60843908739272522e-05\n29 14 20 1.74711918228058845e-04\n29 14 21 -6.94651549921602822e-04\n29 14 22 2.26341821487098837e-03\n29 14 23 -5.93209034082900016e-03\n29 14 24 1.19254763194254387e-02\n29 14 25 -1.62330887401158984e-02\n29 14 26 8.16120418902865667e-03\n29 14 27 1.90385727172382499e-02\n29 14 28 -4.02388137806808162e-02\n29 14 29 7.66528956401076896e-03\n29 14 30 3.92580631013456808e-02\n29 14 31 1.14584511904111764e-02\n29 14 32 -1.26728744419896234e-02\n29 14 33 -1.35162320561917045e-02\n29 14 34 -6.67506588304538269e-03\n29 14 35 -2.16250614222807928e-03\n29 14 36 -5.06303391528514820e-04\n29 14 37 -8.91337928326985659e-05\n29 14 38 -1.19823118863140990e-05\n29 14 39 -1.23029704713513433e-06\n29 14 40 -9.52210178436484827e-08\n29 14 41 -5.39393002778273209e-09\n29 14 42 -2.11523026460926400e-10\n29 14 43 -5.14098032623859302e-12\n29 14 44 -5.84240033127280712e-14\n29 15 13 1.86124322638072894e-10\n29 15 14 -5.20815632473411634e-09\n29 15 15 7.39741600924417402e-08\n29 15 16 -7.06702384006631613e-07\n29 15 17 5.07170201097533244e-06\n29 15 18 -2.89123988750990340e-05\n29 15 19 1.34926541953394282e-04\n29 15 20 -5.22945073574350350e-04\n29 15 21 1.68679046330049178e-03\n29 15 22 -4.47798983849607499e-03\n29 15 23 9.48539171702060971e-03\n29 15 24 -1.48777491788310385e-02\n29 15 25 1.36019003797006253e-02\n29 15 26 3.67247043752674969e-03\n29 15 27 -3.14575938288269553e-02\n29 15 28 3.38756590945304827e-02\n29 15 29 1.26051339888461710e-02\n29 15 30 -3.55724008924601287e-02\n29 15 31 -2.40569090241433739e-02\n29 15 32 5.45608883219614055e-03\n29 15 33 1.45282827952033544e-02\n29 15 34 9.55721629629930796e-03\n29 15 35 3.83786766758991716e-03\n29 15 36 1.09237935096111518e-03\n29 15 37 2.33134295278062448e-04\n29 15 38 3.82323024786103024e-05\n29 15 39 4.85648010574113885e-06\n29 15 40 4.75948167820393475e-07\n29 15 41 3.54231034835730037e-08\n29 15 42 1.94060608725111994e-09\n29 15 43 7.39280395466989818e-11\n29 15 44 1.75174609536142792e-12\n29 15 45 1.94650470872194068e-14\n29 16 12 2.29133748868027594e-10\n29 16 13 -5.95306942152227276e-09\n29 16 14 7.88836338097198429e-08\n29 16 15 -7.06702384006631613e-07\n29 16 16 4.78327426960326614e-06\n29 16 17 -2.58848576877907587e-05\n29 16 18 1.15549611595639323e-04\n29 16 19 -4.32431253560638441e-04\n29 16 20 1.36335994623312101e-03\n29 16 21 -3.59862918960808696e-03\n29 16 22 7.78487064339654123e-03\n29 16 23 -1.31294585983616561e-02\n29 16 24 1.51021919710535210e-02\n29 16 25 -5.53815191254442255e-03\n29 16 26 -1.82976170691895363e-02\n29 16 27 3.74847404382641945e-02\n29 16 28 -1.80022446666529748e-02\n29 16 29 -2.94721237753725120e-02\n29 16 30 2.27456797501761547e-02\n29 16 31 3.33035852920220812e-02\n29 16 32 5.54678844814546461e-03\n29 16 33 -1.25668699785139614e-02\n29 16 34 -1.22010127922227077e-02\n29 16 35 -6.18884194425011513e-03\n29 16 36 -2.14436887825605848e-03\n29 16 37 -5.51183772186219567e-04\n29 16 38 -1.08912761361600751e-04\n29 16 39 -1.68007792325881079e-05\n29 16 40 -2.02955298784919495e-06\n29 16 41 -1.90673906113302610e-07\n29 16 42 -1.36870239879353382e-08\n29 16 43 -7.26629468948692567e-10\n29 16 44 -2.69269340653959044e-11\n29 16 45 -6.22577291140742696e-13\n29 16 46 -6.76754426477228608e-15\n29 17 11 3.24747734805408796e-10\n29 17 12 -7.78717711852089369e-09\n29 17 13 9.57049905927635231e-08\n29 17 14 -7.99331772574949495e-07\n29 17 15 5.07170201097533244e-06\n29 17 16 -2.58848576877907587e-05\n29 17 17 1.09730795580052592e-04\n29 17 18 -3.93154243781697645e-04\n29 17 19 1.19870664830246170e-03\n29 17 20 -3.10087916942003159e-03\n29 17 21 6.70334013379055220e-03\n29 17 22 -1.16803327377147570e-02\n29 17 23 1.50209654033284227e-02\n29 17 24 -1.02755300480030150e-02\n29 17 25 -7.77513835126862410e-03\n29 17 26 3.11177588053382859e-02\n29 17 27 -3.28347939828150734e-02\n29 17 28 -4.02933330917239635e-03\n29 17 29 3.68291771879201885e-02\n29 17 30 -2.84409079843913345e-03\n29 17 31 -3.50857392544185758e-02\n29 17 32 -1.83614011371412611e-02\n29 17 33 6.48210707279748897e-03\n29 17 34 1.34314897919374038e-02\n29 17 35 8.98993073673877186e-03\n29 17 36 3.82908383746005577e-03\n29 17 37 1.18392600635543860e-03\n29 17 38 2.79800114948626860e-04\n29 17 39 5.17561991519859590e-05\n29 17 40 7.56449135329577967e-06\n29 17 41 8.73321633901752623e-07\n29 17 42 7.89244538510870216e-08\n29 17 43 5.47732691128826465e-09\n29 17 44 2.82266094799720479e-10\n29 17 45 1.01868069001387715e-11\n29 17 46 2.29996960760089964e-13\n29 17 47 2.44691464501908394e-15\n29 18 10 5.31749939641870373e-10\n29 18 11 -1.16864071973943786e-08\n29 18 12 1.32316819485909291e-07\n29 18 13 -1.02348899114107001e-06\n29 18 14 6.04752404046677457e-06\n29 18 15 -2.89123988750990340e-05\n29 18 16 1.15549611595639323e-04\n29 18 17 -3.93154243781697645e-04\n29 18 18 1.14819346131550986e-03\n29 18 19 -2.87602916574918441e-03\n29 18 20 6.10999988863962293e-03\n29 18 21 -1.07082835633072630e-02\n29 18 22 1.45131181811465012e-02\n29 18 23 -1.24680132942658098e-02\n29 18 24 -8.69576531342199991e-04\n29 18 25 2.30715404903656716e-02\n29 18 26 -3.58783160253884762e-02\n29 18 27 1.63611579514626788e-02\n29 18 28 2.48952755371050921e-02\n29 18 29 -3.04128982473649043e-02\n29 18 30 -1.83744137045762201e-02\n29 18 31 2.65896905705997052e-02\n29 18 32 2.91386023686592651e-02\n29 18 33 3.81468808499982194e-03\n29 18 34 -1.17279935098364077e-02\n29 18 35 -1.15448726713722675e-02\n29 18 36 -6.18848437340121093e-03\n29 18 37 -2.31338519141401408e-03\n29 18 38 -6.52083752545438307e-04\n29 18 39 -1.43486211981012677e-04\n29 18 40 -2.50488703946641094e-05\n29 18 41 -3.48804694052264617e-06\n29 18 42 -3.86363504712274036e-07\n29 18 43 -3.36816006626930991e-08\n29 18 44 -2.26444343741264870e-09\n29 18 45 -1.13439098333910309e-10\n29 18 46 -3.99106823913700017e-12\n29 18 47 -8.80549357367972083e-14\n29 18 48 -9.17288681371030442e-16\n29 19 9 1.01123983005264819e-09\n29 19 10 -2.01994997848976104e-08\n29 19 11 2.09034803078367369e-07\n29 19 12 -1.48616470885731391e-06\n29 19 13 8.11731279972717350e-06\n29 19 14 -3.60843908739272522e-05\n29 19 15 1.34926541953394282e-04\n29 19 16 -4.32431253560638441e-04\n29 19 17 1.19870664830246170e-03\n29 19 18 -2.87602916574918441e-03\n29 19 19 5.92146187725449414e-03\n29 19 20 -1.02289824539658224e-02\n29 19 21 1.40812332763331516e-02\n29 19 22 -1.33810091242902087e-02\n29 19 23 3.17998663167727596e-03\n29 19 24 1.65542170939805159e-02\n29 19 25 -3.37611709142168271e-02\n29 19 26 2.75019667740761401e-02\n29 19 27 7.47303350017502398e-03\n29 19 28 -3.52752453251190030e-02\n29 19 29 1.09345933610560894e-02\n29 19 30 3.25486744088575964e-02\n29 19 31 -8.47994559245585385e-03\n29 19 32 -3.29705070348843791e-02\n29 19 33 -1.64827089392180634e-02\n29 19 34 5.78132952887909865e-03\n29 19 35 1.25894881752341999e-02\n29 19 36 8.94592370438111512e-03\n29 19 37 4.10085184264257515e-03\n29 19 38 1.38186329641147000e-03\n29 19 39 3.60336593869968893e-04\n29 19 40 7.45067548356037093e-05\n29 19 41 1.23519966331649940e-05\n29 19 42 1.64592533960406593e-06\n29 19 43 1.75475472292973264e-07\n29 19 44 1.47903058569923842e-08\n29 19 45 9.64931382324557502e-10\n29 19 46 4.70490178265630908e-11\n29 19 47 1.61516305070138311e-12\n29 19 48 3.48448982138524218e-14\n29 19 49 3.55578698348079443e-16\n29 20 8 2.24997212519504412e-09\n29 20 9 -4.04369507285350234e-08\n29 20 10 3.78872979987600570e-07\n29 20 11 -2.45386829458785675e-06\n29 20 12 1.22842149551011548e-05\n29 20 13 -5.03559232377464425e-05\n29 20 14 1.74711918228058845e-04\n29 20 15 -5.22945073574350350e-04\n29 20 16 1.36335994623312101e-03\n29 20 17 -3.10087916942003159e-03\n29 20 18 6.10999988863962293e-03\n29 20 19 -1.02289824539658224e-02\n29 20 20 1.39206427391543494e-02\n29 20 21 -1.36945470218188176e-02\n29 20 22 5.24205104072501686e-03\n29 20 23 1.23039680881267858e-02\n29 20 24 -3.05710071801199935e-02\n29 20 25 3.21974281330660826e-02\n29 20 26 -6.26630843595949559e-03\n29 20 27 -2.83388452708575901e-02\n29 20 28 2.84092374394936486e-02\n29 20 29 1.40044564247496601e-02\n29 20 30 -3.21005386383340776e-02\n29 20 31 -1.36078605492344455e-02\n29 20 32 2.59846607730142769e-02\n29 20 33 2.73938570347919019e-02\n29 20 34 4.54053435543717473e-03\n29 20 35 -1.04869459471917813e-02\n29 20 36 -1.12908764904897627e-02\n29 20 37 -6.54265698569313441e-03\n29 20 38 -2.65953700436289642e-03\n29 20 39 -8.22283161529518732e-04\n29 20 40 -2.00470252254715555e-04\n29 20 41 -3.92242688814435517e-05\n29 20 42 -6.20559715172016584e-06\n29 20 43 -7.94093457227614477e-07\n29 20 44 -8.16967520878939777e-08\n29 20 45 -6.67078312191288227e-09\n29 20 46 -4.22943175183898745e-10\n29 20 47 -2.00939113896673333e-11\n29 20 48 -6.73631270507430650e-13\n29 20 49 -1.42187025054870687e-14\n29 20 50 -1.42194134939369212e-16\n29 21 7 5.91606863255630553e-09\n29 21 8 -9.44720400785583855e-08\n29 21 9 7.92209101901046455e-07\n29 21 10 -4.62438552631036498e-06\n29 21 11 2.10056087476154453e-05\n29 21 12 -7.86450739526256969e-05\n29 21 13 2.50831462639919452e-04\n29 21 14 -6.94651549921602822e-04\n29 21 15 1.68679046330049178e-03\n29 21 16 -3.59862918960808696e-03\n29 21 17 6.70334013379055220e-03\n29 21 18 -1.07082835633072630e-02\n29 21 19 1.40812332763331516e-02\n29 21 20 -1.36945470218188176e-02\n29 21 21 5.86873194520082983e-03\n29 21 22 1.02547980735361539e-02\n29 21 23 -2.81947650917596489e-02\n29 21 24 3.36607584784816774e-02\n29 21 25 -1.48335080031297625e-02\n29 21 26 -1.91640018320096760e-02\n29 21 27 3.40244476010067584e-02\n29 21 28 -5.64879665559063774e-03\n29 21 29 -3.15549028232791433e-02\n29 21 30 1.51585859784098998e-02\n29 21 31 2.98876690138651408e-02\n29 21 32 -8.26180854541640023e-03\n29 21 33 -3.10362950277702282e-02\n29 21 34 -1.71372213558020363e-02\n29 21 35 3.91040796732865261e-03\n29 21 36 1.17970476189792378e-02\n29 21 37 9.24366859161915598e-03\n29 21 38 4.62328672909498781e-03\n29 21 39 1.70490924417578216e-03\n29 21 40 4.89758089127599440e-04\n29 21 41 1.12526245614710075e-04\n29 21 42 2.09485066510670289e-05\n29 21 43 3.17525767612753784e-06\n29 21 44 3.91334105556129740e-07\n29 21 45 3.89368639330116758e-08\n29 21 46 3.08510087027131392e-09\n29 21 47 1.90333054073088045e-10\n29 21 48 8.81956681320925708e-12\n29 21 49 2.88945961473644714e-13\n29 21 50 5.97046064015727492e-15\n29 21 51 5.85367410966859177e-17\n29 22 6 1.86361579492044400e-08\n29 22 7 -2.60239783096283510e-07\n29 22 8 1.92506587199624471e-06\n29 22 9 -9.99489246222231983e-06\n29 22 10 4.06961548472682608e-05\n29 22 11 -1.37585517837644109e-04\n29 22 12 3.99024307682775036e-04\n29 22 13 -1.01160933595143118e-03\n29 22 14 2.26341821487098837e-03\n29 22 15 -4.47798983849607499e-03\n29 22 16 7.78487064339654123e-03\n29 22 17 -1.16803327377147570e-02\n29 22 18 1.45131181811465012e-02\n29 22 19 -1.33810091242902087e-02\n29 22 20 5.24205104072501686e-03\n29 22 21 1.02547980735361539e-02\n29 22 22 -2.73452340150957221e-02\n29 22 23 3.39358962988769264e-02\n29 22 24 -1.92361678222173828e-02\n29 22 25 -1.21027558610032112e-02\n29 22 26 3.37068560272726433e-02\n29 22 27 -1.85132068323918566e-02\n29 22 28 -2.09036202804242665e-02\n29 22 29 3.00714979304409392e-02\n29 22 30 1.07153996251717195e-02\n29 22 31 -3.06917593368982999e-02\n29 22 32 -1.40101553494558691e-02\n29 22 33 2.31190063502756761e-02\n29 22 34 2.72937494020273322e-02\n29 22 35 6.99182325191638581e-03\n29 22 36 -8.72282477657469287e-03\n29 22 37 -1.11914941133893796e-02\n29 22 38 -7.17535603857829370e-03\n29 22 39 -3.19969135420950980e-03\n29 22 40 -1.08718404236248625e-03\n29 22 41 -2.92870838526454488e-04\n29 22 42 -6.38082955265562525e-05\n29 22 43 -1.13520959221539724e-05\n29 22 44 -1.65387841946163845e-06\n29 22 45 -1.96794713131778355e-07\n29 22 46 -1.89722886634951977e-08\n29 22 47 -1.46080828401466375e-09\n29 22 48 -8.77942049178315239e-11\n29 22 49 -3.97125851909027009e-12\n29 22 50 -1.27233462888187624e-13\n29 22 51 -2.57495133209475391e-15\n29 22 52 -2.47602920645389634e-17\n29 23 5 7.16710141385050801e-08\n29 23 6 -8.57060674790750563e-07\n29 23 7 5.48890507164797883e-06\n29 23 8 -2.49252568443626781e-05\n29 23 9 8.95984084664067411e-05\n29 23 10 -2.69731493400507274e-04\n29 23 11 7.02081465682419605e-04\n29 23 12 -1.60902159766715904e-03\n29 23 13 3.27588399578522759e-03\n29 23 14 -5.93209034082900016e-03\n29 23 15 9.48539171702060971e-03\n29 23 16 -1.31294585983616561e-02\n29 23 17 1.50209654033284227e-02\n29 23 18 -1.24680132942658098e-02\n29 23 19 3.17998663167727596e-03\n29 23 20 1.23039680881267858e-02\n29 23 21 -2.81947650917596489e-02\n29 23 22 3.39358962988769264e-02\n29 23 23 -2.05660644512226966e-02\n29 23 24 -8.46383791039463952e-03\n29 23 25 3.20046032341601347e-02\n29 23 26 -2.50992863071895171e-02\n29 23 27 -1.03091011438997342e-02\n29 23 28 3.31481351632631367e-02\n29 23 29 -8.19832296621739806e-03\n29 23 30 -2.99734934556970581e-02\n29 23 31 1.32289471826264434e-02\n29 23 32 2.95309347014394578e-02\n29 23 33 -4.22323032982707090e-03\n29 23 34 -2.89598929526825099e-02\n29 23 35 -1.94173764839791336e-02\n29 23 36 9.11309006892323859e-04\n29 23 37 1.07432296607509089e-02\n29 23 38 9.71962035964824851e-03\n29 23 39 5.38838029960522787e-03\n29 23 40 2.18729574426812188e-03\n29 23 41 6.92491751973331090e-04\n29 23 42 1.76185277368574894e-04\n29 23 43 3.65795415312500608e-05\n29 23 44 6.24159548481365529e-06\n29 23 45 8.76391195022980913e-07\n29 23 46 1.00890583352300695e-07\n29 23 47 9.43957120132753678e-09\n29 23 48 7.07200129262234341e-10\n29 23 49 4.14455011234882930e-11\n29 23 50 1.83151948193010045e-12\n29 23 51 5.74192432254097007e-14\n29 23 52 1.13870426955443023e-15\n29 23 53 1.07429711799465978e-17\n29 24 4 3.45678939882915494e-07\n29 24 5 -3.43946202455835440e-06\n29 24 6 1.85950251347737747e-05\n29 24 7 -7.22321657797345810e-05\n29 24 8 2.24760138651478632e-04\n29 24 9 -5.91899562390624934e-04\n29 24 10 1.36027383171582462e-03\n29 24 11 -2.77472538129851466e-03\n29 24 12 5.06225328492546884e-03\n29 24 13 -8.25713786433580111e-03\n29 24 14 1.19254763194254387e-02\n29 24 15 -1.48777491788310385e-02\n29 24 16 1.51021919710535210e-02\n29 24 17 -1.02755300480030150e-02\n29 24 18 -8.69576531342199991e-04\n29 24 19 1.65542170939805159e-02\n29 24 20 -3.05710071801199935e-02\n29 24 21 3.36607584784816774e-02\n29 24 22 -1.92361678222173828e-02\n29 24 23 -8.46383791039463952e-03\n29 24 24 3.12170504578989432e-02\n29 24 25 -2.76718880709534227e-02\n29 24 26 -3.53193987283992507e-03\n29 24 27 3.14020095260847742e-02\n29 24 28 -1.97613855182551800e-02\n29 24 29 -2.00284240903842636e-02\n29 24 30 2.79805229275815101e-02\n29 24 31 1.33225632957657633e-02\n29 24 32 -2.76114688126741014e-02\n29 24 33 -1.77902522895058210e-02\n29 24 34 1.81485214237028955e-02\n29 24 35 2.77593509288511317e-02\n29 24 36 1.08088081643184078e-02\n29 24 37 -6.13144449587375861e-03\n29 24 38 -1.09563056744298831e-02\n29 24 39 -8.00717582798674771e-03\n29 24 40 -3.96175065730412108e-03\n29 24 41 -1.48513321582894487e-03\n29 24 42 -4.41822142687292853e-04\n29 24 43 -1.06763179623887604e-04\n29 24 44 -2.12079182895371400e-05\n29 24 45 -3.48105861536794229e-06\n29 24 46 -4.72153467551574653e-07\n29 24 47 -5.26811377618288436e-08\n29 24 48 -4.79033388377277734e-09\n29 24 49 -3.49591608712808673e-10\n29 24 50 -1.99962690411677771e-11\n29 24 51 -8.63907364859407643e-13\n29 24 52 -2.65176357642741272e-14\n29 24 53 -5.15550698542437086e-16\n29 24 54 -4.77382222263858939e-18\n29 25 3 2.17713708096593221e-06\n29 25 4 -1.72804898589988526e-05\n29 25 5 7.60720584773743507e-05\n29 25 6 -2.45095459851503924e-04\n29 25 7 6.42760681984817654e-04\n29 25 8 -1.44622106245251294e-03\n29 25 9 2.87242126924230798e-03\n29 25 10 -5.11112552468108489e-03\n29 25 11 8.19065265056495449e-03\n29 25 12 -1.17792383157563119e-02\n29 25 13 1.49769004121851188e-02\n29 25 14 -1.62330887401158984e-02\n29 25 15 1.36019003797006253e-02\n29 25 16 -5.53815191254442255e-03\n29 25 17 -7.77513835126862410e-03\n29 25 18 2.30715404903656716e-02\n29 25 19 -3.37611709142168271e-02\n29 25 20 3.21974281330660826e-02\n29 25 21 -1.48335080031297625e-02\n29 25 22 -1.21027558610032112e-02\n29 25 23 3.20046032341601347e-02\n29 25 24 -2.76718880709534227e-02\n29 25 25 -1.27439940567039964e-03\n29 25 26 2.95367529828196100e-02\n29 25 27 -2.51119867583348872e-02\n29 25 28 -1.07714713404682447e-02\n29 25 29 3.18104137599784222e-02\n29 25 30 -3.79033619021326713e-03\n29 25 31 -3.03527500846992469e-02\n29 25 32 6.87815762420759350e-03\n29 25 33 2.98599980393473859e-02\n29 25 34 2.73896214796473932e-03\n29 25 35 -2.56833981770120257e-02\n29 25 36 -2.24684515140534426e-02\n29 25 37 -3.31867805301770291e-03\n29 25 38 9.02596410253961584e-03\n29 25 39 1.01596445828903133e-02\n29 25 40 6.37689145212492413e-03\n29 25 41 2.87380050000075483e-03\n29 25 42 1.00535974175686400e-03\n29 25 43 2.82895339329021016e-04\n29 25 44 6.52207989889636793e-05\n29 25 45 1.24369014305478966e-05\n29 25 46 1.96869130055889160e-06\n29 25 47 2.58447889370516368e-07\n29 25 48 2.79924355180565458e-08\n29 25 49 2.47686276435113002e-09\n29 25 50 1.76254026017074349e-10\n29 25 51 9.84766889278876135e-12\n29 25 52 4.16219224688482284e-13\n29 25 53 1.25153544164503590e-14\n29 25 54 2.38643368134925858e-16\n29 25 55 2.16957481856735680e-18\n29 26 2 1.91326345170933177e-05\n29 26 3 -1.13190192264009662e-04\n29 26 4 3.83592902591940000e-04\n29 26 5 -9.78872887226002510e-04\n29 26 6 2.08167199911074774e-03\n29 26 7 -3.87116018874634013e-03\n29 26 8 6.45048130554017212e-03\n29 26 9 -9.73503240461705327e-03\n29 26 10 1.33146120996488616e-02\n29 26 11 -1.63337949863756838e-02\n29 26 12 1.74767057212358310e-02\n29 26 13 -1.51768230621777533e-02\n29 26 14 8.16120418902865667e-03\n29 26 15 3.67247043752674969e-03\n29 26 16 -1.82976170691895363e-02\n29 26 17 3.11177588053382859e-02\n29 26 18 -3.58783160253884762e-02\n29 26 19 2.75019667740761401e-02\n29 26 20 -6.26630843595949559e-03\n29 26 21 -1.91640018320096760e-02\n29 26 22 3.37068560272726433e-02\n29 26 23 -2.50992863071895171e-02\n29 26 24 -3.53193987283992507e-03\n29 26 25 2.95367529828196100e-02\n29 26 26 -2.65804614800829146e-02\n29 26 27 -5.78565946239713882e-03\n29 26 28 3.12841744047129232e-02\n29 26 29 -1.44578515324711489e-02\n29 26 30 -2.39233217910190212e-02\n29 26 31 2.26226440200136371e-02\n29 26 32 1.94681070469930945e-02\n29 26 33 -2.18265764128657862e-02\n29 26 34 -2.30351296262341721e-02\n29 26 35 1.06098926317157312e-02\n29 26 36 2.74569841230454534e-02\n29 26 37 1.55854170215062586e-02\n29 26 38 -2.35187835439541783e-03\n29 26 39 -1.01997429565510802e-02\n29 26 40 -8.90113795306974449e-03\n29 26 41 -4.96570253784434170e-03\n29 26 42 -2.06728545850596666e-03\n29 26 43 -6.80321071704304866e-04\n29 26 44 -1.82016994440403745e-04\n29 26 45 -4.01862426262359379e-05\n29 26 46 -7.37676243624174347e-06\n29 26 47 -1.12855211680349204e-06\n29 26 48 -1.43642255796411609e-07\n29 26 49 -1.51230965160772385e-08\n29 26 50 -1.30357158757022093e-09\n29 26 51 -9.05330911993633179e-11\n29 26 52 -4.94459149349233310e-12\n29 26 53 -2.04575636473556151e-13\n29 26 54 -6.02899468528029632e-15\n29 26 55 -1.12797027340069333e-16\n29 26 56 -1.00715646128468150e-18\n29 27 1 2.66715604579236539e-04\n29 27 2 -1.03298509470902577e-03\n29 27 3 2.43692783960041702e-03\n29 27 4 -4.55963577409179520e-03\n29 27 5 7.39612749610051212e-03\n29 27 6 -1.08022686730457072e-02\n29 27 7 1.44282828109455027e-02\n29 27 8 -1.76586069365076394e-02\n29 27 9 1.95931876255084484e-02\n29 27 10 -1.91214284194701012e-02\n29 27 11 1.51462850801373110e-02\n29 27 12 -6.99480087416245656e-03\n29 27 13 -5.01846547062452606e-03\n29 27 14 1.90385727172382499e-02\n29 27 15 -3.14575938288269553e-02\n29 27 16 3.74847404382641945e-02\n29 27 17 -3.28347939828150734e-02\n29 27 18 1.63611579514626788e-02\n29 27 19 7.47303350017502398e-03\n29 27 20 -2.83388452708575901e-02\n29 27 21 3.40244476010067584e-02\n29 27 22 -1.85132068323918566e-02\n29 27 23 -1.03091011438997342e-02\n29 27 24 3.14020095260847742e-02\n29 27 25 -2.51119867583348872e-02\n29 27 26 -5.78565946239713882e-03\n29 27 27 3.06687978397449098e-02\n29 27 28 -1.90673983439505685e-02\n29 27 29 -1.76219323039122764e-02\n29 27 30 2.87782483711873675e-02\n29 27 31 5.74039504018981447e-03\n29 27 32 -2.98012099929539977e-02\n29 27 33 -3.21011565647934539e-03\n29 27 34 2.83603224661774945e-02\n29 27 35 1.16883361914319435e-02\n29 27 36 -1.99175286310404676e-02\n29 27 37 -2.51518665580004539e-02\n29 27 38 -8.76039581628454933e-03\n29 27 39 6.17091292303956866e-03\n29 27 40 1.02366501012301973e-02\n29 27 41 7.51669159266625338e-03\n29 27 42 3.80882361941839010e-03\n29 27 43 1.48002769130554728e-03\n29 27 44 4.61046215201316955e-04\n29 27 45 1.17784275262369950e-04\n29 27 46 2.49811206375716377e-05\n29 27 47 4.42483018041316056e-06\n29 27 48 6.55473463354032384e-07\n29 27 49 8.10086800661578547e-08\n29 27 50 8.30059211689196222e-09\n29 27 51 6.97700453613338235e-10\n29 27 52 4.73297073721306155e-11\n29 27 53 2.52860574191110986e-12\n29 27 54 1.02467121378706552e-13\n29 27 55 2.96107057409849846e-15\n29 27 56 5.43771225869327370e-17\n29 27 57 4.77010655957720840e-19\n29 28 0 8.62197125625809006e-03\n29 28 1 -1.49336922772374724e-02\n29 28 2 1.92275958485769591e-02\n29 28 3 -2.25056240565520264e-02\n29 28 4 2.48275339107602275e-02\n29 28 5 -2.59351106432132540e-02\n29 28 6 2.53802839107632051e-02\n29 28 7 -2.26180846755960653e-02\n29 28 8 1.71407620342491132e-02\n29 28 9 -8.68012101884280396e-03\n29 28 10 -2.52504287024276439e-03\n29 28 11 1.54435800071520324e-02\n29 28 12 -2.80574822352086175e-02\n29 28 13 3.74307368379572356e-02\n29 28 14 -4.02388137806808162e-02\n29 28 15 3.38756590945304827e-02\n29 28 16 -1.80022446666529748e-02\n29 28 17 -4.02933330917239635e-03\n29 28 18 2.48952755371050921e-02\n29 28 19 -3.52752453251190030e-02\n29 28 20 2.84092374394936486e-02\n29 28 21 -5.64879665559063774e-03\n29 28 22 -2.09036202804242665e-02\n29 28 23 3.31481351632631367e-02\n29 28 24 -1.97613855182551800e-02\n29 28 25 -1.07714713404682447e-02\n29 28 26 3.12841744047129232e-02\n29 28 27 -1.90673983439505685e-02\n29 28 28 -1.52396554733157863e-02\n29 28 29 3.02753412745762259e-02\n29 28 30 -3.17814990662909192e-03\n29 28 31 -2.86067751067482863e-02\n29 28 32 1.24431202322458953e-02\n29 28 33 2.60038663094132405e-02\n29 28 34 -1.18949489169680034e-02\n29 28 35 -2.71744065571743719e-02\n29 28 36 3.51348807083411225e-04\n29 28 37 2.47799884022413056e-02\n29 28 38 2.05226458269851957e-02\n29 28 39 2.87646273938904097e-03\n29 28 40 -8.41729499880562293e-03\n29 28 41 -9.60097673405871705e-03\n29 28 42 -6.19091071726780746e-03\n29 28 43 -2.89209784280446619e-03\n29 28 44 -1.05722623798774033e-03\n29 28 45 -3.13315915583830988e-04\n29 28 46 -7.67018494237578639e-05\n29 28 47 -1.56688839378038984e-05\n29 28 48 -2.68355782451945547e-06\n29 28 49 -3.85551616766771101e-07\n29 28 50 -4.63287551190125004e-08\n29 28 51 -4.62508512767878732e-09\n29 28 52 -3.79434394246774671e-10\n29 28 53 -2.51605294677109000e-11\n29 28 54 -1.31572113048463132e-12\n29 28 55 -5.22487083396248855e-14\n29 28 56 -1.48116839974152334e-15\n29 28 57 -2.67083373703375514e-17\n29 28 58 -2.30252843602852186e-19\n29 29 1 -4.98145184805544232e-04\n29 29 2 1.92930800474528878e-03\n29 29 3 -4.55569383369293675e-03\n29 29 4 8.54969017177817868e-03\n29 29 5 -1.39620224676671486e-02\n29 29 6 2.06541979421673503e-02\n29 29 7 -2.82090206252536567e-02\n29 29 8 3.58411074342757992e-02\n29 29 9 -4.23460945042310808e-02\n29 29 10 4.61465390687277880e-02\n29 29 11 -4.55042084584532763e-02\n29 29 12 3.89551778332480918e-02\n29 29 13 -2.59635892078843390e-02\n29 29 14 7.66528956401076896e-03\n29 29 15 1.26051339888461710e-02\n29 29 16 -2.94721237753725120e-02\n29 29 17 3.68291771879201885e-02\n29 29 18 -3.04128982473649043e-02\n29 29 19 1.09345933610560894e-02\n29 29 20 1.40044564247496601e-02\n29 29 21 -3.15549028232791433e-02\n29 29 22 3.00714979304409392e-02\n29 29 23 -8.19832296621739806e-03\n29 29 24 -2.00284240903842636e-02\n29 29 25 3.18104137599784222e-02\n29 29 26 -1.44578515324711489e-02\n29 29 27 -1.76219323039122764e-02\n29 29 28 3.02753412745762259e-02\n29 29 29 -6.08401047781566890e-03\n29 29 30 -2.62201927426561220e-02\n29 29 31 2.01948043002254754e-02\n29 29 32 1.79094373989521119e-02\n29 29 33 -2.44045723137954010e-02\n29 29 34 -1.53202487335800896e-02\n29 29 35 2.22442793519253734e-02\n29 29 36 2.06812991638361636e-02\n29 29 37 -1.06647479224722672e-02\n29 29 38 -2.58444689210476321e-02\n29 29 39 -1.49701514541799360e-02\n29 29 40 1.72664064217170057e-03\n29 29 41 9.46413926281523819e-03\n29 29 42 8.62329934213781090e-03\n29 29 43 5.01107977155073148e-03\n29 29 44 2.18161528738958686e-03\n29 29 45 7.54905348632674232e-04\n29 29 46 2.13713996582206776e-04\n29 29 47 5.02840623544489972e-05\n29 29 48 9.91645278674355164e-06\n29 29 49 1.64510942707300397e-06\n29 29 50 2.29565327162181830e-07\n29 29 51 2.68521922051623964e-08\n29 29 52 2.61436515553086906e-09\n29 29 53 2.09505848496077747e-10\n29 29 54 1.35892883241669120e-11\n29 29 55 6.95969318866951473e-13\n29 29 56 2.70971561323083852e-14\n29 29 57 7.53872819242866033e-16\n29 29 58 1.33526798431233252e-17\n29 29 59 1.13162367400760009e-19\n30 0 29 8.33449098192311385e-03\n30 0 31 -8.06556530826378791e-03\n30 1 28 2.48929447222901126e-04\n30 1 29 -1.44357618359154544e-02\n30 1 30 -4.65980846803572046e-04\n30 1 31 1.39699689056778146e-02\n30 1 32 2.18307414632256647e-04\n30 2 27 1.72188099126267379e-05\n30 2 28 -9.64099603474914183e-04\n30 2 29 1.85897804024780533e-02\n30 2 30 1.80473605932186416e-03\n30 2 31 -1.79928273073484792e-02\n30 2 32 -8.45500981224327351e-04\n30 2 33 -1.28120916378152343e-05\n30 3 26 1.88676527333306387e-06\n30 3 27 -1.01867853213126310e-04\n30 3 28 2.27489172268484654e-03\n30 3 29 -2.17746622414455130e-02\n30 3 30 -4.26213969197715005e-03\n30 3 31 2.10890819185430569e-02\n30 3 32 1.99575898047423556e-03\n30 3 33 7.57973563176983556e-05\n30 3 34 1.11478755482700476e-06\n30 4 25 2.88048173786079516e-07\n30 4 26 -1.49757350867762830e-05\n30 4 27 3.45311096884629787e-04\n30 4 28 -4.25932287058704962e-03\n30 4 29 2.40655377827756981e-02\n30 4 30 8.00240496939872497e-03\n30 4 31 -2.33466564765413608e-02\n30 4 32 -3.74102073548955447e-03\n30 4 33 -2.57099457647874422e-04\n30 4 34 -8.84835190422611103e-06\n30 4 35 -1.26417927649985514e-07\n30 5 24 5.73323304526972406e-08\n30 5 25 -2.86604314198653527e-06\n30 5 26 6.59469352128604075e-05\n30 5 27 -8.81839792464930940e-04\n30 5 28 6.91941042988451235e-03\n30 5 29 -2.52379570036524086e-02\n30 5 30 -1.30814491544065312e-02\n30 5 31 2.45704799842709200e-02\n30 5 32 6.09312545338201479e-03\n30 5 33 6.57767012047678828e-04\n30 5 34 3.90027826920995986e-05\n30 5 35 1.25784249836789193e-06\n30 5 36 1.74717199390022959e-08\n30 6 23 1.42863289300088984e-08\n30 6 24 -6.85594956563006215e-07\n30 6 25 1.55008705992823213e-05\n30 6 26 -2.12655651890338049e-04\n30 6 27 1.87821498809259973e-03\n30 6 28 -1.01349881295084963e-02\n30 6 29 2.48887902189586911e-02\n30 6 30 1.93880792086480708e-02\n30 6 31 -2.43971477568619322e-02\n30 6 32 -8.96845690018606834e-03\n30 6 33 -1.40624980913517416e-03\n30 6 34 -1.26104789202258112e-04\n30 6 35 -6.81264826136511342e-06\n30 6 36 -2.08931382661033107e-07\n30 6 37 -2.82365489569492649e-09\n30 7 22 4.33793225070720423e-09\n30 7 23 -1.99497726522884950e-07\n30 7 24 4.39281628326570229e-06\n30 7 25 -6.02730687387264452e-05\n30 7 26 5.58630143541251363e-04\n30 7 27 -3.50244363606286789e-03\n30 7 28 1.36048861643929678e-02\n30 7 29 -2.25181371378557872e-02\n30 7 30 -2.65648735256172325e-02\n30 7 31 2.23677223957484022e-02\n30 7 32 1.21415640681279384e-02\n30 7 33 2.63996567805372496e-03\n30 7 34 3.32999979673023022e-04\n30 7 35 2.65874216724048490e-05\n30 7 36 1.34129513782155051e-06\n30 7 37 3.94301947642473053e-08\n30 7 38 5.18863269554606465e-10\n30 8 21 1.57475273215724769e-09\n30 8 22 -6.92712229861004114e-08\n30 8 23 1.47655742909363602e-06\n30 8 24 -1.99711497448770794e-05\n30 8 25 1.87904574648126373e-04\n30 8 26 -1.26057817305438725e-03\n30 8 27 5.86272581653447094e-03\n30 8 28 -1.67915783755827000e-02\n30 8 29 1.76440299492569559e-02\n30 8 30 3.39268261172936758e-02\n30 8 31 -1.80264405213645817e-02\n30 8 32 -1.51986886026604067e-02\n30 8 33 -4.46789222288415764e-03\n30 8 34 -7.58161516191871248e-04\n30 8 35 -8.34662774529999125e-05\n30 8 36 -6.12774640508723581e-06\n30 8 37 -2.92589154561905621e-07\n30 8 38 -8.28558197024738469e-09\n30 8 39 -1.06234140850189777e-10\n30 9 20 6.74042802366888882e-10\n30 9 21 -2.83017722427776483e-08\n30 9 22 5.81266169927040573e-07\n30 9 23 -7.67669473721744766e-06\n30 9 24 7.19456647675322964e-05\n30 9 25 -4.96415815716230124e-04\n30 9 26 2.51532049481027957e-03\n30 9 27 -8.91207139525461079e-03\n30 9 28 1.88980463907074612e-02\n30 9 29 -9.97568177299230458e-03\n30 9 30 -4.04096270082499813e-02\n30 9 31 1.10696992522959406e-02\n30 9 32 1.75108300794143359e-02\n30 9 33 6.90995213703085806e-03\n30 9 34 1.53432584629331851e-03\n30 9 35 2.23068031587963995e-04\n30 9 36 2.22748637218889463e-05\n30 9 37 1.53078453840066608e-06\n30 9 38 6.97558800943474402e-08\n30 9 39 1.90926130645951164e-09\n30 9 40 2.38676310622645555e-11\n30 10 19 3.36705097593174024e-10\n30 10 20 -1.34639944321743137e-08\n30 10 21 2.65379179093074141e-07\n30 10 22 -3.39844559820139958e-06\n30 10 23 3.13349985000280860e-05\n30 10 24 -2.17359014963633370e-04\n30 10 25 1.14649586644567816e-03\n30 10 26 -4.50753274311086757e-03\n30 10 27 1.23273962896687124e-02\n30 10 28 -1.89194859009170793e-02\n30 10 29 -3.54038249557148660e-04\n30 10 30 4.45959568376089073e-02\n30 10 31 -1.54855835497763986e-03\n30 10 32 -1.82562280397397110e-02\n30 10 33 -9.81531149306990304e-03\n30 10 34 -2.80900528189023546e-03\n30 10 35 -5.24462441949295437e-04\n30 10 36 -6.82891728011209000e-05\n30 10 37 -6.32011174410194928e-06\n30 10 38 -4.11088933838819973e-07\n30 10 39 -1.79773324659845624e-08\n30 10 40 -4.76755557070104819e-10\n30 10 41 -5.81452454641918219e-12\n30 11 18 1.94800510795529639e-10\n30 11 19 -7.39985580169948525e-09\n30 11 20 1.39460395230104101e-07\n30 11 21 -1.72199650382098090e-06\n30 11 22 1.54812978292466591e-05\n30 11 23 -1.06363669816773090e-04\n30 11 24 5.68844891635506558e-04\n30 11 25 -2.35603226922509173e-03\n30 11 26 7.30075208294662137e-03\n30 11 27 -1.53967485543719541e-02\n30 11 28 1.58195284591640572e-02\n30 11 29 1.25315877679812488e-02\n30 11 30 -4.48795500832392821e-02\n30 11 31 -9.90061269983777861e-03\n30 11 32 1.65291694406490291e-02\n30 11 33 1.27744630066040711e-02\n30 11 34 4.69605078047779733e-03\n30 11 35 1.10658936524134848e-03\n30 11 36 1.82732716858125226e-04\n30 11 37 2.18483968563405875e-05\n30 11 38 1.89945574575472005e-06\n30 11 39 1.17807499649033722e-07\n30 11 40 4.96374407406520010e-09\n30 11 41 1.27787323407058291e-10\n30 11 42 1.52138547135522477e-12\n30 12 17 1.29804314937900815e-10\n30 12 18 -4.67115215215310389e-09\n30 12 19 8.38741160681937443e-08\n30 12 20 -9.93675231180338812e-07\n30 12 21 8.64909814783827736e-06\n30 12 22 -5.82283125020003581e-05\n30 12 23 3.10354328514043681e-04\n30 12 24 -1.31415037651281741e-03\n30 12 25 4.34534087879107366e-03\n30 12 26 -1.06696946076094948e-02\n30 12 27 1.69827655811438264e-02\n30 12 28 -8.86717241478246114e-03\n30 12 29 -2.48663084767150833e-02\n30 12 30 3.98195352173852604e-02\n30 12 31 2.18640962727842639e-02\n30 12 32 -1.15674614109238849e-02\n30 12 33 -1.50592901194615452e-02\n30 12 34 -7.19097049996795252e-03\n30 12 35 -2.12021204648857715e-03\n30 12 36 -4.36007476975352690e-04\n30 12 37 -6.55150530569338906e-05\n30 12 38 -7.30641365302962715e-06\n30 12 39 -6.02115295418126888e-07\n30 12 40 -3.57971280625941378e-08\n30 12 41 -1.45755926289148723e-09\n30 12 42 -3.64815420131768372e-11\n30 12 43 -4.24232657738308513e-13\n30 13 16 9.92316068168792609e-11\n30 13 17 -3.37241502771173984e-09\n30 13 18 5.74823043012453005e-08\n30 13 19 -6.50435529017461623e-07\n30 13 20 5.44836575258868094e-06\n30 13 21 -3.56419482091897504e-05\n30 13 22 1.86994498056034904e-04\n30 13 23 -7.93806223164584240e-04\n30 13 24 2.70666429335441160e-03\n30 13 25 -7.20159338118363697e-03\n30 13 26 1.39109392993277827e-02\n30 13 27 -1.56621280952117751e-02\n30 13 28 -1.88062492346153272e-03\n30 13 29 3.47949814865062628e-02\n30 13 30 -2.86936207461921783e-02\n30 13 31 -3.21117508535990516e-02\n30 13 32 3.10336421787843934e-03\n30 13 33 1.56470599624098436e-02\n30 13 34 1.00553634646586263e-02\n30 13 35 3.71084153114758180e-03\n30 13 36 9.40121459236701595e-04\n30 13 37 1.74266657585564806e-04\n30 13 38 2.42558349652735060e-05\n30 13 39 2.54988403770171606e-06\n30 13 40 2.00474192509906086e-07\n30 13 41 1.14699237992501252e-08\n30 13 42 4.52367640229249789e-10\n30 13 43 1.10218877614909257e-11\n30 13 44 1.25256812169325043e-13\n30 14 15 8.68146638418846423e-11\n30 14 16 -2.77671243248431465e-09\n30 14 17 4.47552845335803926e-08\n30 14 18 -4.81537119989299440e-07\n30 14 19 3.86060673507249794e-06\n30 14 20 -2.43679380232544021e-05\n30 14 21 1.24635716636943644e-04\n30 14 22 -5.23033471377359287e-04\n30 14 23 1.79870760270532574e-03\n30 14 24 -4.98365037392339370e-03\n30 14 25 1.06521190043134548e-02\n30 14 26 -1.57329033125450152e-02\n30 14 27 1.01414215331818791e-02\n30 14 28 1.50664360062140188e-02\n30 14 29 -3.92580631013456808e-02\n30 14 30 1.21626838083999946e-02\n30 14 31 3.78572009258482877e-02\n30 14 32 8.21777872779602741e-03\n30 14 33 -1.33969918755898957e-02\n30 14 34 -1.27008642815162540e-02\n30 14 35 -5.93812311139431130e-03\n30 14 36 -1.84601525565193875e-03\n30 14 37 -4.17157600542966307e-04\n30 14 38 -7.11225153167856835e-05\n30 14 39 -9.28075451226666265e-06\n30 14 40 -9.26600083137974318e-07\n30 14 41 -6.98351544306048449e-08\n30 14 42 -3.85684495136929302e-09\n30 14 43 -1.47615559915005597e-10\n30 14 44 -3.50495329825452776e-12\n30 14 45 -3.89463297047926672e-14\n30 15 14 8.68146638418846423e-11\n30 15 15 -2.60299260204932392e-09\n30 15 16 3.95100390642851013e-08\n30 15 17 -4.02376616774284604e-07\n30 15 18 3.07151253182513223e-06\n30 15 19 -1.85883794367765364e-05\n30 15 20 9.19445346149566204e-05\n30 15 21 -3.77297655933327942e-04\n30 15 22 1.28810954321605772e-03\n30 15 23 -3.62330321498114020e-03\n30 15 24 8.16542233097691088e-03\n30 15 25 -1.38008104137471648e-02\n30 15 26 1.43945881730247953e-02\n30 15 27 2.30164796464180820e-05\n30 15 28 -2.77434999559106947e-02\n30 15 29 3.55724008924601287e-02\n30 15 30 7.18535629436627410e-03\n30 15 31 -3.64405301255026807e-02\n30 15 32 -2.04994166601140350e-02\n30 15 33 7.43156575600457734e-03\n30 15 34 1.41385270947952942e-02\n30 15 35 8.64816702011203373e-03\n30 15 36 3.31139804809945589e-03\n30 15 37 9.06705120677112843e-04\n30 15 38 1.87012917833460397e-04\n30 15 39 2.97267937528045025e-05\n30 15 40 3.66789499983109449e-06\n30 15 41 3.49750280492108154e-07\n30 15 42 2.53622839658095282e-08\n30 15 43 1.35537013903772156e-09\n30 15 44 5.04200078487752903e-11\n30 15 45 1.16774060524137795e-12\n30 15 46 1.26935825450088196e-14\n30 16 13 9.92316068168792609e-11\n30 16 14 -2.77671243248431465e-09\n30 16 15 3.95100390642851013e-08\n30 16 16 -3.79045303669849169e-07\n30 16 17 2.74051168150625382e-06\n30 16 18 -1.58071901196081266e-05\n30 16 19 7.50747773721411979e-05\n30 16 20 -2.98532088579616517e-04\n30 16 21 9.99506420977254656e-04\n30 16 22 -2.80352803473457067e-03\n30 16 23 6.46503775683892260e-03\n30 16 24 -1.17313429227207002e-02\n30 16 25 1.49941819223361412e-02\n30 16 26 -8.27903005928476298e-03\n30 16 27 -1.35573904267990077e-02\n30 16 28 3.56782825535648171e-02\n30 16 29 -2.27456797501761547e-02\n30 16 30 -2.47921877646489316e-02\n30 16 31 2.64305387200661559e-02\n30 16 32 3.05816477888982215e-02\n30 16 33 2.29520445980165822e-03\n30 16 34 -1.30924581737640004e-02\n30 16 35 -1.13240982705449622e-02\n30 16 36 -5.41940570732280882e-03\n30 16 37 -1.79767468421931242e-03\n30 16 38 -4.45295628622578566e-04\n30 16 39 -8.51256618544373758e-05\n30 16 40 -1.27378472727790071e-05\n30 16 41 -1.49561903248080124e-06\n30 16 42 -1.36792699829065972e-07\n30 16 43 -9.57229798506429392e-09\n30 16 44 -4.95976813603436146e-10\n30 16 45 -1.79565967499669474e-11\n30 16 46 -4.05996255767183759e-13\n30 16 47 -4.31935352874463380e-15\n30 17 12 1.29804314937900815e-10\n30 17 13 -3.37241502771173984e-09\n30 17 14 4.47552845335803926e-08\n30 17 15 -4.02376616774284604e-07\n30 17 16 2.74051168150625382e-06\n30 17 17 -1.49768185113911793e-05\n30 17 18 6.78418945071716559e-05\n30 17 19 -2.59330998535202435e-04\n30 17 20 8.42894168266096396e-04\n30 17 21 -2.32525317978431570e-03\n30 17 22 5.37404951175493472e-03\n30 17 23 -1.00861179011533334e-02\n30 17 24 1.42915027503175423e-02\n30 17 25 -1.21005930129963499e-02\n30 17 26 -3.04026114475157126e-03\n30 17 27 2.68917136841695505e-02\n30 17 28 -3.45799772402005984e-02\n30 17 29 2.84409079843913345e-03\n30 17 30 3.50100800775238028e-02\n30 17 31 -8.88716737850471513e-03\n30 17 32 -3.46367062981311159e-02\n30 17 33 -1.43967999301782917e-02\n30 17 34 8.37733571519753941e-03\n30 17 35 1.29879784134901995e-02\n30 17 36 8.03857311407992996e-03\n30 17 37 3.25343297950423839e-03\n30 17 38 9.65563819971830889e-04\n30 17 39 2.20210012072591845e-04\n30 17 40 3.94430237419598709e-05\n30 17 41 5.59593611177940507e-06\n30 17 42 6.28316512347363333e-07\n30 17 43 5.53096975355125223e-08\n30 17 44 3.74381973435700615e-09\n30 17 45 1.88390328622974361e-10\n30 17 46 6.64558049905125204e-12\n30 17 47 1.46794486329534604e-13\n30 17 48 1.52919219883646508e-15\n30 18 11 1.94800510795529639e-10\n30 18 12 -4.67115215215310389e-09\n30 18 13 5.74823043012453005e-08\n30 18 14 -4.81537119989299440e-07\n30 18 15 3.07151253182513223e-06\n30 18 16 -1.58071901196081266e-05\n30 18 17 6.78418945071716559e-05\n30 18 18 -2.47433265902022671e-04\n30 18 19 7.73775039740902611e-04\n30 18 20 -2.07559682767845467e-03\n30 18 21 4.73233218235769966e-03\n30 18 22 -8.95864595925141391e-03\n30 18 23 1.33573224064681591e-02\n30 18 24 -1.35694992123294825e-02\n30 18 25 3.48459274453753503e-03\n30 18 26 1.75331729884266764e-02\n30 18 27 -3.45541002432185715e-02\n30 18 28 2.22600352393578891e-02\n30 18 29 1.83744137045762201e-02\n30 18 30 -3.31167828487808356e-02\n30 18 31 -1.18146550571461504e-02\n30 18 32 2.95291242711396364e-02\n30 18 33 2.57517850300492792e-02\n30 18 34 4.34102820463647179e-04\n30 18 35 -1.22797803349327637e-02\n30 18 36 -1.06482872237984004e-02\n30 18 37 -5.35577897634473577e-03\n30 18 38 -1.91054554423477153e-03\n30 18 39 -5.17902861334075724e-04\n30 18 40 -1.10095782860680306e-04\n30 18 41 -1.86255317390454706e-05\n30 18 42 -2.51920337324206363e-06\n30 18 43 -2.71537276316494156e-07\n30 18 44 -2.30692685970544210e-08\n30 18 45 -1.51345660675079605e-09\n30 18 46 -7.40675599599432668e-11\n30 18 47 -2.54827820076315669e-12\n30 18 48 -5.50296762790049703e-14\n30 18 49 -5.61556545285755864e-16\n30 19 10 3.36705097593174024e-10\n30 19 11 -7.39985580169948525e-09\n30 19 12 8.38741160681937443e-08\n30 19 13 -6.50435529017461623e-07\n30 19 14 3.86060673507249794e-06\n30 19 15 -1.85883794367765364e-05\n30 19 16 7.50747773721411979e-05\n30 19 17 -2.59330998535202435e-04\n30 19 18 7.73775039740902611e-04\n30 19 19 -1.99806621688627184e-03\n30 19 20 4.43606014806495002e-03\n30 19 21 -8.31305934080168210e-03\n30 19 22 1.26192737584932698e-02\n30 19 23 -1.39882038357589084e-02\n30 19 24 7.16079554764647548e-03\n30 19 25 1.03485917922236511e-02\n30 19 26 -3.00669099022273402e-02\n30 19 27 3.11530206333490987e-02\n30 19 28 -1.02345971756261992e-03\n30 19 29 -3.25486744088575964e-02\n30 19 30 1.80821582032185120e-02\n30 19 31 2.84407086885882221e-02\n30 19 32 -1.47256842593086013e-02\n30 19 33 -3.19523745985118217e-02\n30 19 34 -1.22087201567159911e-02\n30 19 35 7.85595202633889560e-03\n30 19 36 1.22153084544642634e-02\n30 19 37 7.94593539626206514e-03\n30 19 38 3.44419542760128032e-03\n30 19 39 1.11070435715135238e-03\n30 19 40 2.78944831574284541e-04\n30 19 41 5.57738501704033210e-05\n30 19 42 8.96681575959002727e-06\n30 19 43 1.16125195270827631e-06\n30 19 44 1.20534827004477984e-07\n30 19 45 9.90586566472284063e-09\n30 19 46 6.30929007417246753e-10\n30 19 47 3.00667090316463127e-11\n30 19 48 1.00979536287114597e-12\n30 19 49 2.13317585392619048e-14\n30 19 50 2.13328252071896292e-16\n30 20 9 6.74042802366888882e-10\n30 20 10 -1.34639944321743137e-08\n30 20 11 1.39460395230104101e-07\n30 20 12 -9.93675231180338812e-07\n30 20 13 5.44836575258868094e-06\n30 20 14 -2.43679380232544021e-05\n30 20 15 9.19445346149566204e-05\n30 20 16 -2.98532088579616517e-04\n30 20 17 8.42894168266096396e-04\n30 20 18 -2.07559682767845467e-03\n30 20 19 4.43606014806495002e-03\n30 20 20 -8.10381557766695718e-03\n30 20 21 1.22283187336756706e-02\n30 20 22 -1.40362837504746526e-02\n30 20 23 9.05512904817135272e-03\n30 20 24 5.64949863256948857e-03\n30 20 25 -2.51853154226226636e-02\n30 20 26 3.35702116794798649e-02\n30 20 27 -1.48362538290228078e-02\n30 20 28 -2.12600245434121232e-02\n30 20 29 3.21005386383340776e-02\n30 20 30 5.17989440715738059e-03\n30 20 31 -3.33024781807905807e-02\n30 20 32 -6.04896348440522043e-03\n30 20 33 2.88508179729907428e-02\n30 20 34 2.37368081850341418e-02\n30 20 35 8.33237427394153401e-04\n30 20 36 -1.12784267472687840e-02\n30 20 37 -1.04269362817395326e-02\n30 20 38 -5.62283387472702778e-03\n30 20 39 -2.17158675890949601e-03\n30 20 40 -6.43915919759415543e-04\n30 20 41 -1.51375842081555127e-04\n30 20 42 -2.86644546495326688e-05\n30 20 43 -4.40065375000291050e-06\n30 20 44 -5.47593652047843164e-07\n30 20 45 -5.48765154004522277e-08\n30 20 46 -4.37098378389317388e-09\n30 20 47 -2.70673553741402355e-10\n30 20 48 -1.25737827610127332e-11\n30 20 49 -4.12559828032702367e-13\n30 20 50 -8.53046306293795451e-15\n30 20 51 -8.36360103258108984e-17\n30 21 8 1.57475273215724769e-09\n30 21 9 -2.83017722427776483e-08\n30 21 10 2.65379179093074141e-07\n30 21 11 -1.72199650382098090e-06\n30 21 12 8.64909814783827736e-06\n30 21 13 -3.56419482091897504e-05\n30 21 14 1.24635716636943644e-04\n30 21 15 -3.77297655933327942e-04\n30 21 16 9.99506420977254656e-04\n30 21 17 -2.32525317978431570e-03\n30 21 18 4.73233218235769966e-03\n30 21 19 -8.31305934080168210e-03\n30 21 20 1.22283187336756706e-02\n30 21 21 -1.40230837583878225e-02\n30 21 22 9.84576716604016106e-03\n30 21 23 3.07007449229551360e-03\n30 21 24 -2.15575562068456792e-02\n30 21 25 3.32328834855616633e-02\n30 21 26 -2.27692087495320389e-02\n30 21 27 -9.33865743119480571e-03\n30 21 28 3.32932287495432139e-02\n30 21 29 -1.51585859784098998e-02\n30 21 30 -2.60365916194828116e-02\n30 21 31 2.23861984271866378e-02\n30 21 32 2.47453192382843830e-02\n30 21 33 -1.50438790168442205e-02\n30 21 34 -3.01361749582243643e-02\n30 21 35 -1.25683627777450802e-02\n30 21 36 6.42362902724490692e-03\n30 21 37 1.16367700548865661e-02\n30 21 38 8.20854925888301370e-03\n30 21 39 3.85535730352750118e-03\n30 21 40 1.35523173932306466e-03\n30 21 41 3.73976682130648129e-04\n30 21 42 8.29385646954303138e-05\n30 21 43 1.49539531142224748e-05\n30 21 44 2.20081407622691626e-06\n30 21 45 2.63893492318838202e-07\n30 21 46 2.55882828002602941e-08\n30 21 47 1.97862079148070918e-09\n30 21 48 1.19276078235076949e-10\n30 21 49 5.40633392641874558e-12\n30 21 50 1.73424239423218200e-13\n30 21 51 3.51171662574521473e-15\n30 21 52 3.37680670766748025e-17\n30 22 7 4.33793225070720423e-09\n30 22 8 -6.92712229861004114e-08\n30 22 9 5.81266169927040573e-07\n30 22 10 -3.39844559820139958e-06\n30 22 11 1.54812978292466591e-05\n30 22 12 -5.82283125020003581e-05\n30 22 13 1.86994498056034904e-04\n30 22 14 -5.23033471377359287e-04\n30 22 15 1.28810954321605772e-03\n30 22 16 -2.80352803473457067e-03\n30 22 17 5.37404951175493472e-03\n30 22 18 -8.95864595925141391e-03\n30 22 19 1.26192737584932698e-02\n30 22 20 -1.40362837504746526e-02\n30 22 21 9.84576716604016106e-03\n30 22 22 2.25456348710461107e-03\n30 22 23 -1.96911963034279742e-02\n30 22 24 3.23477854868748248e-02\n30 22 25 -2.66805770175548882e-02\n30 22 26 -5.57005040578965193e-04\n30 22 27 2.91643232672456472e-02\n30 22 28 -2.64345324745273646e-02\n30 22 29 -1.07153996251717195e-02\n30 22 30 3.24266039869289875e-02\n30 22 31 5.96111443746535193e-04\n30 22 32 -3.17533969440614609e-02\n30 22 33 -5.76603329346528077e-03\n30 22 34 2.67016925253525739e-02\n30 22 35 2.37376314901348797e-02\n30 22 36 2.78163563388840866e-03\n30 22 37 -9.99104771923553776e-03\n30 22 38 -1.04522227395742388e-02\n30 22 39 -6.15945796060125153e-03\n30 22 40 -2.59402652432859312e-03\n30 22 41 -8.42216096563588534e-04\n30 22 42 -2.18236612956308979e-04\n30 22 43 -4.59357229833055056e-05\n30 22 44 -7.92022271168148662e-06\n30 22 45 -1.12099773294128088e-06\n30 22 46 -1.29838050932395387e-07\n30 22 47 -1.22039908333290874e-08\n30 22 48 -9.17428846039974679e-10\n30 22 49 -5.38974056051469744e-11\n30 22 50 -2.38571377079033654e-12\n30 22 51 -7.48680648732144231e-14\n30 22 52 -1.48541117377427012e-15\n30 22 53 -1.40139365916945389e-17\n30 23 6 1.42863289300088984e-08\n30 23 7 -1.99497726522884950e-07\n30 23 8 1.47655742909363602e-06\n30 23 9 -7.67669473721744766e-06\n30 23 10 3.13349985000280860e-05\n30 23 11 -1.06363669816773090e-04\n30 23 12 3.10354328514043681e-04\n30 23 13 -7.93806223164584240e-04\n30 23 14 1.79870760270532574e-03\n30 23 15 -3.62330321498114020e-03\n30 23 16 6.46503775683892260e-03\n30 23 17 -1.00861179011533334e-02\n30 23 18 1.33573224064681591e-02\n30 23 19 -1.39882038357589084e-02\n30 23 20 9.05512904817135272e-03\n30 23 21 3.07007449229551360e-03\n30 23 22 -1.96911963034279742e-02\n30 23 23 3.19544935112641799e-02\n30 23 24 -2.82128143152745004e-02\n30 23 25 4.49264082260261309e-03\n30 23 26 2.46382112790690481e-02\n30 23 27 -3.10013122466226168e-02\n30 23 28 2.35508071049163720e-03\n30 23 29 2.99734934556970581e-02\n30 23 30 -1.85641028868388332e-02\n30 23 31 -2.34717707975827216e-02\n30 23 32 2.14240069592498248e-02\n30 23 33 2.44610220843981861e-02\n30 23 34 -1.20097215506939580e-02\n30 23 35 -2.89075034489440025e-02\n30 23 36 -1.46575784229636633e-02\n30 23 37 4.11170960571040281e-03\n30 23 38 1.09962202847652412e-02\n30 23 39 8.70254129990482842e-03\n30 23 40 4.48560616920124104e-03\n30 23 41 1.72644337791032510e-03\n30 23 42 5.23281540135777893e-04\n30 23 43 1.28206132384268868e-04\n30 23 44 2.57357780792987513e-05\n30 23 45 4.25839421360808048e-06\n30 23 46 5.81180395977571733e-07\n30 23 47 6.51554313159488942e-08\n30 23 48 5.94608720191000525e-09\n30 23 49 4.35105491358173465e-10\n30 23 50 2.49357403849525809e-11\n30 23 51 1.07872210479526141e-12\n30 23 52 3.31376492049399112e-14\n30 23 53 6.44488739819102149e-16\n30 23 54 5.96774415607840767e-18\n30 24 5 5.73323304526972406e-08\n30 24 6 -6.85594956563006215e-07\n30 24 7 4.39281628326570229e-06\n30 24 8 -1.99711497448770794e-05\n30 24 9 7.19456647675322964e-05\n30 24 10 -2.17359014963633370e-04\n30 24 11 5.68844891635506558e-04\n30 24 12 -1.31415037651281741e-03\n30 24 13 2.70666429335441160e-03\n30 24 14 -4.98365037392339370e-03\n30 24 15 8.16542233097691088e-03\n30 24 16 -1.17313429227207002e-02\n30 24 17 1.42915027503175423e-02\n30 24 18 -1.35694992123294825e-02\n30 24 19 7.16079554764647548e-03\n30 24 20 5.64949863256948857e-03\n30 24 21 -2.15575562068456792e-02\n30 24 22 3.23477854868748248e-02\n30 24 23 -2.82128143152745004e-02\n30 24 24 6.11323032808799086e-03\n30 24 25 2.19849354627217974e-02\n30 24 26 -3.22836201829635810e-02\n30 24 27 1.05518143111283175e-02\n30 24 28 2.37905837912676928e-02\n30 24 29 -2.79805229275815101e-02\n30 24 30 -8.30992496497074722e-03\n30 24 31 3.10594793242662956e-02\n30 24 32 2.25555275143919910e-03\n30 24 33 -3.00728763394404398e-02\n30 24 34 -9.22155859242258887e-03\n30 24 35 2.32339302470770623e-02\n30 24 36 2.48386967575109432e-02\n30 24 37 6.02485582254597191e-03\n30 24 38 -8.14872019347814858e-03\n30 24 39 -1.05023868352416941e-02\n30 24 40 -6.91720510059354204e-03\n30 24 41 -3.20522286298779413e-03\n30 24 42 -1.14257819384534424e-03\n30 24 43 -3.25918765302281771e-04\n30 24 44 -7.59139035175618088e-05\n30 24 45 -1.45901991459431642e-05\n30 24 46 -2.32364019509184022e-06\n30 24 47 -3.06487633658499737e-07\n30 24 48 -3.33166700779319806e-08\n30 24 49 -2.95616345018049799e-09\n30 24 50 -2.10797688821687609e-10\n30 24 51 -1.17953161213940369e-11\n30 24 52 -4.99044926552914880e-13\n30 24 53 -1.50151104404231948e-14\n30 24 54 -2.86389548743447676e-16\n30 24 55 -2.60364894323546888e-18\n30 25 4 2.88048173786079516e-07\n30 25 5 -2.86604314198653527e-06\n30 25 6 1.55008705992823213e-05\n30 25 7 -6.02730687387264452e-05\n30 25 8 1.87904574648126373e-04\n30 25 9 -4.96415815716230124e-04\n30 25 10 1.14649586644567816e-03\n30 25 11 -2.35603226922509173e-03\n30 25 12 4.34534087879107366e-03\n30 25 13 -7.20159338118363697e-03\n30 25 14 1.06521190043134548e-02\n30 25 15 -1.38008104137471648e-02\n30 25 16 1.49941819223361412e-02\n30 25 17 -1.21005930129963499e-02\n30 25 18 3.48459274453753503e-03\n30 25 19 1.03485917922236511e-02\n30 25 20 -2.51853154226226636e-02\n30 25 21 3.32328834855616633e-02\n30 25 22 -2.66805770175548882e-02\n30 25 23 4.49264082260261309e-03\n30 25 24 2.19849354627217974e-02\n30 25 25 -3.24747904042627764e-02\n30 25 26 1.42961178959636517e-02\n30 25 27 1.88385352521594262e-02\n30 25 28 -3.10875306941541323e-02\n30 25 29 3.79033619021326713e-03\n30 25 30 2.90239558911226607e-02\n30 25 31 -1.59870805535113817e-02\n30 25 32 -2.47268130542459362e-02\n30 25 33 1.69921239027562145e-02\n30 25 34 2.61940759073430563e-02\n30 25 35 -6.27900473668387573e-03\n30 25 36 -2.73311674262072575e-02\n30 25 37 -1.78583667284931116e-02\n30 25 38 7.59813993132491398e-04\n30 25 39 9.96549833483738749e-03\n30 25 40 9.28161898691213638e-03\n30 25 41 5.33566885996049345e-03\n30 25 42 2.26325597551217513e-03\n30 25 43 7.54624951434561496e-04\n30 25 44 2.03860045190431946e-04\n30 25 45 4.53417910775865195e-05\n30 25 46 8.37074297566653914e-06\n30 25 47 1.28632303195053178e-06\n30 25 48 1.64291629044600061e-07\n30 25 49 1.73436454810469265e-08\n30 25 50 1.49805400668419895e-09\n30 25 51 1.04200296684482541e-10\n30 25 52 5.69739036987439377e-12\n30 25 53 2.35900726586924675e-13\n30 25 54 6.95538075518035645e-15\n30 25 55 1.30156408068171286e-16\n30 25 56 1.16215711047287060e-18\n30 26 3 1.88676527333306387e-06\n30 26 4 -1.49757350867762830e-05\n30 26 5 6.59469352128604075e-05\n30 26 6 -2.12655651890338049e-04\n30 26 7 5.58630143541251363e-04\n30 26 8 -1.26057817305438725e-03\n30 26 9 2.51532049481027957e-03\n30 26 10 -4.50753274311086757e-03\n30 26 11 7.30075208294662137e-03\n30 26 12 -1.06696946076094948e-02\n30 26 13 1.39109392993277827e-02\n30 26 14 -1.57329033125450152e-02\n30 26 15 1.43945881730247953e-02\n30 26 16 -8.27903005928476298e-03\n30 26 17 -3.04026114475157126e-03\n30 26 18 1.75331729884266764e-02\n30 26 19 -3.00669099022273402e-02\n30 26 20 3.35702116794798649e-02\n30 26 21 -2.27692087495320389e-02\n30 26 22 -5.57005040578965193e-04\n30 26 23 2.46382112790690481e-02\n30 26 24 -3.22836201829635810e-02\n30 26 25 1.42961178959636517e-02\n30 26 26 1.70398863739672274e-02\n30 26 27 -3.16586516108925399e-02\n30 26 28 1.06482098873190976e-02\n30 26 29 2.39233217910190212e-02\n30 26 30 -2.53350428818385576e-02\n30 26 31 -1.21282640527622473e-02\n30 26 32 2.87212916158662203e-02\n30 26 33 8.23332702867631684e-03\n30 26 34 -2.72475617567193433e-02\n30 26 35 -1.50306211880696448e-02\n30 26 36 1.78191224100608191e-02\n30 26 37 2.59896533120828108e-02\n30 26 38 1.03858665433045602e-02\n30 26 39 -5.39672983514026296e-03\n30 26 40 -1.02876631994108575e-02\n30 26 41 -7.81783259357746761e-03\n30 26 42 -4.03472425922913735e-03\n30 26 43 -1.58683217186652450e-03\n30 26 44 -4.98618469980560703e-04\n30 26 45 -1.28214634140765060e-04\n30 26 46 -2.73298739822844563e-05\n30 26 47 -4.85980172640657346e-06\n30 26 48 -7.22115588286093115e-07\n30 26 49 -8.94591403696020513e-08\n30 26 50 -9.18359717967056582e-09\n30 26 51 -7.73028287633246651e-10\n30 26 52 -5.24962276703833825e-11\n30 26 53 -2.80682125363061971e-12\n30 26 54 -1.13802025117132521e-13\n30 26 55 -3.28969432322153222e-15\n30 26 56 -6.04209941236440451e-17\n30 26 57 -5.30029112784703911e-19\n30 27 2 1.72188099126267379e-05\n30 27 3 -1.01867853213126310e-04\n30 27 4 3.45311096884629787e-04\n30 27 5 -8.81839792464930940e-04\n30 27 6 1.87821498809259973e-03\n30 27 7 -3.50244363606286789e-03\n30 27 8 5.86272581653447094e-03\n30 27 9 -8.91207139525461079e-03\n30 27 10 1.23273962896687124e-02\n30 27 11 -1.53967485543719541e-02\n30 27 12 1.69827655811438264e-02\n30 27 13 -1.56621280952117751e-02\n30 27 14 1.01414215331818791e-02\n30 27 15 2.30164796464180820e-05\n30 27 16 -1.35573904267990077e-02\n30 27 17 2.68917136841695505e-02\n30 27 18 -3.45541002432185715e-02\n30 27 19 3.11530206333490987e-02\n30 27 20 -1.48362538290228078e-02\n30 27 21 -9.33865743119480571e-03\n30 27 22 2.91643232672456472e-02\n30 27 23 -3.10013122466226168e-02\n30 27 24 1.05518143111283175e-02\n30 27 25 1.88385352521594262e-02\n30 27 26 -3.16586516108925399e-02\n30 27 27 1.27912641421836325e-02\n30 27 28 2.05169077884406872e-02\n30 27 29 -2.87782483711873675e-02\n30 27 30 -1.95251009077373855e-03\n30 27 31 2.96952922784641984e-02\n30 27 32 -8.70949594831047088e-03\n30 27 33 -2.74884006303259873e-02\n30 27 34 9.06984467430362082e-03\n30 27 35 2.78608343820273539e-02\n30 27 36 1.85327423644554363e-03\n30 27 37 -2.41687723804600711e-02\n30 27 38 -2.14115801400744862e-02\n30 27 39 -3.78417161991990694e-03\n30 27 40 8.13335775500533551e-03\n30 27 41 9.72161567904549746e-03\n30 27 42 6.37930021205718444e-03\n30 27 43 3.01089014768176455e-03\n30 27 44 1.10841713677220629e-03\n30 27 45 3.30184940136771187e-04\n30 27 46 8.11492871629020580e-05\n30 27 47 1.66280089758608024e-05\n30 27 48 2.85464290324244277e-06\n30 27 49 4.10905317645146516e-07\n30 27 50 4.94485596323610816e-08\n30 27 51 4.94225950341320313e-09\n30 27 52 4.05816687648021884e-10\n30 27 53 2.69280486306512213e-11\n30 27 54 1.40883838186506186e-12\n30 27 55 5.59652133807950559e-14\n30 27 56 1.58684968450174220e-15\n30 27 57 2.86166639925774228e-17\n30 27 58 2.46704546500006469e-19\n30 28 1 2.48929447222901126e-04\n30 28 2 -9.64099603474914183e-04\n30 28 3 2.27489172268484654e-03\n30 28 4 -4.25932287058704962e-03\n30 28 5 6.91941042988451235e-03\n30 28 6 -1.01349881295084963e-02\n30 28 7 1.36048861643929678e-02\n30 28 8 -1.67915783755827000e-02\n30 28 9 1.88980463907074612e-02\n30 28 10 -1.89194859009170793e-02\n30 28 11 1.58195284591640572e-02\n30 28 12 -8.86717241478246114e-03\n30 28 13 -1.88062492346153272e-03\n30 28 14 1.50664360062140188e-02\n30 28 15 -2.77434999559106947e-02\n30 28 16 3.56782825535648171e-02\n30 28 17 -3.45799772402005984e-02\n30 28 18 2.22600352393578891e-02\n30 28 19 -1.02345971756261992e-03\n30 28 20 -2.12600245434121232e-02\n30 28 21 3.32932287495432139e-02\n30 28 22 -2.64345324745273646e-02\n30 28 23 2.35508071049163720e-03\n30 28 24 2.37905837912676928e-02\n30 28 25 -3.10875306941541323e-02\n30 28 26 1.06482098873190976e-02\n30 28 27 2.05169077884406872e-02\n30 28 28 -2.95341378633205804e-02\n30 28 29 3.17814990662909192e-03\n30 28 30 2.74062188644031906e-02\n30 28 31 -1.84346287661761989e-02\n30 28 32 -1.95194576485223834e-02\n30 28 33 2.33968136113157825e-02\n30 28 34 1.66666618099473362e-02\n30 28 35 -2.14016128910046001e-02\n30 28 36 -2.14774957744668840e-02\n30 28 37 9.77437133271023313e-03\n30 28 38 2.58612977157102469e-02\n30 28 39 1.54674399856225368e-02\n30 28 40 -1.38152422592077104e-03\n30 28 41 -9.40900504026235183e-03\n30 28 42 -8.70431222751149806e-03\n30 28 43 -5.09391548837341626e-03\n30 28 44 -2.22750290650093382e-03\n30 28 45 -7.73189037671667170e-04\n30 28 46 -2.19399366199554326e-04\n30 28 47 -5.17141049064814607e-05\n30 28 48 -1.02127432742101669e-05\n30 28 49 -1.69613472804229367e-06\n30 28 50 -2.36892541257046253e-07\n30 28 51 -2.77283812553545418e-08\n30 28 52 -2.70113201582412786e-09\n30 28 53 -2.16549464976651750e-10\n30 28 54 -1.40505943109580482e-11\n30 28 55 -7.19760330239001879e-13\n30 28 56 -2.80278640438457593e-14\n30 28 57 -7.79841384322614400e-16\n30 28 58 -1.38132517092077574e-17\n30 28 59 -1.17065658974933550e-19\n30 29 0 8.33449098192311385e-03\n30 29 1 -1.44357618359154544e-02\n30 29 2 1.85897804024780533e-02\n30 29 3 -2.17746622414455130e-02\n30 29 4 2.40655377827756981e-02\n30 29 5 -2.52379570036524086e-02\n30 29 6 2.48887902189586911e-02\n30 29 7 -2.25181371378557872e-02\n30 29 8 1.76440299492569559e-02\n30 29 9 -9.97568177299230458e-03\n30 29 10 -3.54038249557148660e-04\n30 29 11 1.25315877679812488e-02\n30 29 12 -2.48663084767150833e-02\n30 29 13 3.47949814865062628e-02\n30 29 14 -3.92580631013456808e-02\n30 29 15 3.55724008924601287e-02\n30 29 16 -2.27456797501761547e-02\n30 29 17 2.84409079843913345e-03\n30 29 18 1.83744137045762201e-02\n30 29 19 -3.25486744088575964e-02\n30 29 20 3.21005386383340776e-02\n30 29 21 -1.51585859784098998e-02\n30 29 22 -1.07153996251717195e-02\n30 29 23 2.99734934556970581e-02\n30 29 24 -2.79805229275815101e-02\n30 29 25 3.79033619021326713e-03\n30 29 26 2.39233217910190212e-02\n30 29 27 -2.87782483711873675e-02\n30 29 28 3.17814990662909192e-03\n30 29 29 2.62201927426561220e-02\n30 29 30 -2.23394238104219251e-02\n30 29 31 -1.25704673580650230e-02\n30 29 32 2.82454316436729001e-02\n30 29 33 2.89755129268850062e-03\n30 29 34 -2.82933666290367553e-02\n30 29 35 -2.25311315405760664e-03\n30 29 36 2.68193261764610969e-02\n30 29 37 1.15355625894896994e-02\n30 29 38 -1.81347794016796967e-02\n30 29 39 -2.41498150440968528e-02\n30 29 40 -9.44383282057996263e-03\n30 29 41 5.03637530970447031e-03\n30 29 42 9.66823943498173672e-03\n30 29 43 7.52032653107234770e-03\n30 29 44 4.00685290322666475e-03\n30 29 45 1.63905345498686178e-03\n30 29 46 5.39544219739488282e-04\n30 29 47 1.46414050372948027e-04\n30 29 48 3.31938776588325411e-05\n30 29 49 6.33189382911875168e-06\n30 29 50 1.01911069764105921e-06\n30 29 51 1.38302630049054750e-07\n30 29 52 1.57641588203433193e-08\n30 29 53 1.49816914259953728e-09\n30 29 54 1.17362481863728151e-10\n30 29 55 7.45115181313684579e-12\n30 29 56 3.73939302434175548e-13\n30 29 57 1.42809525761026943e-14\n30 29 58 3.90075204243138712e-16\n30 29 59 6.78879895882068266e-18\n30 29 60 5.65752891107055045e-20\n30 30 1 -4.65980846803572046e-04\n30 30 2 1.80473605932186416e-03\n30 30 3 -4.26213969197715005e-03\n30 30 4 8.00240496939872497e-03\n30 30 5 -1.30814491544065312e-02\n30 30 6 1.93880792086480708e-02\n30 30 7 -2.65648735256172325e-02\n30 30 8 3.39268261172936758e-02\n30 30 9 -4.04096270082499813e-02\n30 30 10 4.45959568376089073e-02\n30 30 11 -4.48795500832392821e-02\n30 30 12 3.98195352173852604e-02\n30 30 13 -2.86936207461921783e-02\n30 30 14 1.21626838083999946e-02\n30 30 15 7.18535629436627410e-03\n30 30 16 -2.47921877646489316e-02\n30 30 17 3.50100800775238028e-02\n30 30 18 -3.31167828487808356e-02\n30 30 19 1.80821582032185120e-02\n30 30 20 5.17989440715738059e-03\n30 30 21 -2.60365916194828116e-02\n30 30 22 3.24266039869289875e-02\n30 30 23 -1.85641028868388332e-02\n30 30 24 -8.30992496497074722e-03\n30 30 25 2.90239558911226607e-02\n30 30 26 -2.53350428818385576e-02\n30 30 27 -1.95251009077373855e-03\n30 30 28 2.74062188644031906e-02\n30 30 29 -2.23394238104219251e-02\n30 30 30 -1.00335166574176061e-02\n30 30 31 2.90277617993860770e-02\n30 30 32 -5.77405027972125553e-03\n30 30 33 -2.64371770727192931e-02\n30 30 34 1.27537894110981831e-02\n30 30 35 2.44592377710468648e-02\n30 30 36 -1.09880873021275686e-02\n30 30 37 -2.59490293828679956e-02\n30 30 38 -9.28946318715500492e-04\n30 30 39 2.28675509013255404e-02\n30 30 40 2.03669984040202572e-02\n30 30 41 4.08154267888222461e-03\n30 30 42 -7.35534949430539358e-03\n30 30 43 -9.28267943341050127e-03\n30 30 44 -6.33883204346282136e-03\n30 30 45 -3.11903907047173503e-03\n30 30 46 -1.20238156336302653e-03\n30 30 47 -3.77115032976880742e-04\n30 30 48 -9.81897121965551789e-05\n30 30 49 -2.14642445842612472e-05\n30 30 50 -3.96251508800272692e-06\n30 30 51 -6.19013370241536489e-07\n30 30 52 -8.17289459417051912e-08\n30 30 53 -9.08109016167810824e-09\n30 30 54 -8.42707630213789790e-10\n30 30 55 -6.45539346886745193e-11\n30 30 56 -4.01277221526183207e-12\n30 30 57 -1.97395391690380136e-13\n30 30 58 -7.39678619365757713e-15\n30 30 59 -1.98415715231491256e-16\n30 30 60 -3.39404585315486365e-18\n30 30 61 -2.78209825859878132e-20\n"
  },
  {
    "path": "src/madness/mra/b-spline-deriv1.txt",
    "content": "1\n-5.00000000000000000e-01 \n0.00000000000000000e+00 \n5.00000000000000000e-01 \n2\n-5.90785907859078591e-01 -7.58847914788532509e-01 \n1.44337567297406441e-01 -2.50000000000000000e-01 \n0.00000000000000000e+00 8.88712609484301990e-01 \n-2.88675134594812882e-01 0.00000000000000000e+00 \n5.90785907859078591e-01 -7.58847914788532509e-01 \n1.44337567297406441e-01 2.50000000000000000e-01 \n3\n-4.81060606060606061e-01 -6.88883843919439833e-01 -5.25137176534041520e-01 \n4.02609461620371669e-01 1.36592379583033789e-01 -5.82850117761384568e-01 \n-5.92896812215853329e-02 2.20055871943603232e-01 6.43939393939393939e-01 \n0.00000000000000000e+00 1.50898365810924916e+00 0.00000000000000000e+00 \n-8.05218923240743338e-01 0.00000000000000000e+00 2.24601478500406155e-01 \n0.00000000000000000e+00 -8.50882704848599164e-01 0.00000000000000000e+00 \n4.81060606060606061e-01 -6.88883843919439833e-01 5.25137176534041520e-01 \n4.02609461620371669e-01 -1.36592379583033789e-01 -5.82850117761384568e-01 \n5.92896812215853329e-02 2.20055871943603232e-01 -6.43939393939393939e-01 \n4\n-4.30864206514058745e-01 -5.82677407031139195e-01 -3.78801732111359981e-01 -5.39622741097298342e-02 \n6.85749078318818368e-01 7.31296444460006452e-01 -9.32156837398662135e-02 -8.64786361286721033e-01 \n-3.28982899952057271e-01 -1.71961205870193343e-01 5.68339250581564010e-01 1.02920708513723376e+00 \n-6.38240874163713966e-02 -1.22444973775530020e-01 -3.55391961729035191e-02 1.54738510413532301e-01 \n0.00000000000000000e+00 1.64434164181923710e+00 0.00000000000000000e+00 -3.19611165140621045e-01 \n-1.37149815663763674e+00 0.00000000000000000e+00 8.61015206487314057e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.93533797841286115e+00 0.00000000000000000e+00 6.85706336972576734e-01 \n1.27648174832742793e-01 0.00000000000000000e+00 -1.13251007913175226e-01 0.00000000000000000e+00 \n4.30864206514058745e-01 -5.82677407031139195e-01 3.78801732111359981e-01 -5.39622741097298342e-02 \n6.85749078318818368e-01 -7.31296444460006452e-01 -9.32156837398662135e-02 8.64786361286721033e-01 \n3.28982899952057271e-01 -1.71961205870193343e-01 -5.68339250581564010e-01 1.02920708513723376e+00 \n-6.38240874163713966e-02 1.22444973775530020e-01 -3.55391961729035191e-02 -1.54738510413532301e-01 \n5\n-4.80363797336674312e-01 -6.70419421804421449e-01 -4.62741750512123150e-01 2.04888609758938112e-02 3.09910259080033162e-01 \n7.99107410805922064e-01 1.08830291362777092e+00 6.38544580045235502e-01 -3.56322233895605997e-01 -8.70310389811210767e-01 \n-6.31735501747852359e-01 -7.47894168685877700e-01 -1.39730149481274762e-01 8.78081676477499227e-01 1.17540708718858546e+00 \n-1.20928703335496475e-01 -2.88792074783565536e-01 -3.48056597182995484e-01 1.25155534140603563e-02 4.08962003887146564e-01 \n1.53939159224053351e-01 2.47003635073901433e-01 1.64320266474489453e-01 -1.91723783682552702e-01 -4.26640701102413312e-01 \n0.00000000000000000e+00 1.47688244633124049e+00 0.00000000000000000e+00 -1.75607054105157368e-01 0.00000000000000000e+00 \n-1.59821482161184413e+00 0.00000000000000000e+00 1.88649187013112431e+00 0.00000000000000000e+00 -2.16785177113906069e-01 \n0.00000000000000000e+00 -2.88100360651743488e+00 0.00000000000000000e+00 1.77274875208492775e+00 0.00000000000000000e+00 \n2.41857406670992951e-01 0.00000000000000000e+00 -5.32976777178845829e-01 0.00000000000000000e+00 7.16663790547153588e-02 \n0.00000000000000000e+00 5.72514510054179505e-01 0.00000000000000000e+00 -4.45754076956194686e-01 0.00000000000000000e+00 \n4.80363797336674312e-01 -6.70419421804421449e-01 4.62741750512123150e-01 2.04888609758938112e-02 -3.09910259080033162e-01 \n7.99107410805922064e-01 -1.08830291362777092e+00 6.38544580045235502e-01 3.56322233895605997e-01 -8.70310389811210767e-01 \n6.31735501747852359e-01 -7.47894168685877700e-01 1.39730149481274762e-01 8.78081676477499227e-01 -1.17540708718858546e+00 \n-1.20928703335496475e-01 2.88792074783565536e-01 -3.48056597182995484e-01 -1.25155534140603563e-02 4.08962003887146564e-01 \n-1.53939159224053351e-01 2.47003635073901433e-01 -1.64320266474489453e-01 -1.91723783682552702e-01 4.26640701102413312e-01 \n6\n-5.36800402833370785e-01 -8.01172863506063298e-01 -6.94329946510802425e-01 -2.50699320413427576e-01 3.22486615163569389e-01 4.60615499815238438e-01 \n7.40128369358438744e-01 1.08022066589393632e+00 8.88990290573942194e-01 2.67116185407683379e-01 -4.54888851245386084e-01 -5.83822885115130463e-01 \n-7.67500006689656809e-01 -1.07887167037080640e+00 -7.65027702843894906e-01 6.42644336288162824e-02 9.65968604578546371e-01 9.79384671895308206e-01 \n-8.43119592310177103e-02 -3.25672895839951482e-01 -6.55047979593893497e-01 -5.98118553491467451e-01 1.91593587945514590e-01 7.28987924686630734e-01 \n2.54099031489819223e-01 4.77256204616238090e-01 5.67161341341559635e-01 2.71506495179874613e-01 -4.48066510776072131e-01 -7.27402422823865908e-01 \n7.87834927267766128e-04 1.62886796335638973e-02 5.35252130527957789e-02 6.90209245936473349e-02 -8.42426639463396272e-03 -8.30511353030256170e-02 \n0.00000000000000000e+00 1.34738505722652712e+00 0.00000000000000000e+00 3.00185399403210143e-01 0.00000000000000000e+00 -1.26723375329595088e-01 \n-1.48025673871687749e+00 0.00000000000000000e+00 2.84296455667365844e+00 0.00000000000000000e+00 -5.34203101216625837e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -3.15965268484214240e+00 0.00000000000000000e+00 3.13297033265666375e+00 0.00000000000000000e+00 -6.23170795261478834e-01 \n1.68623918462035421e-01 0.00000000000000000e+00 -1.47287958252835438e+00 0.00000000000000000e+00 3.55630770709655319e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 8.05937321545167689e-01 0.00000000000000000e+00 -1.28233446912377678e+00 0.00000000000000000e+00 2.89220830926521529e-01 \n-1.57566985453553226e-03 0.00000000000000000e+00 1.24152884275380126e-01 0.00000000000000000e+00 -3.27175100474461430e-02 0.00000000000000000e+00 \n5.36800402833370785e-01 -8.01172863506063298e-01 6.94329946510802425e-01 -2.50699320413427576e-01 -3.22486615163569389e-01 4.60615499815238438e-01 \n7.40128369358438744e-01 -1.08022066589393632e+00 8.88990290573942194e-01 -2.67116185407683379e-01 -4.54888851245386084e-01 5.83822885115130463e-01 \n7.67500006689656809e-01 -1.07887167037080640e+00 7.65027702843894906e-01 6.42644336288162824e-02 -9.65968604578546371e-01 9.79384671895308206e-01 \n-8.43119592310177103e-02 3.25672895839951482e-01 -6.55047979593893497e-01 5.98118553491467451e-01 1.91593587945514590e-01 -7.28987924686630734e-01 \n-2.54099031489819223e-01 4.77256204616238090e-01 -5.67161341341559635e-01 2.71506495179874613e-01 4.48066510776072131e-01 -7.27402422823865908e-01 \n7.87834927267766128e-04 -1.62886796335638973e-02 5.35252130527957789e-02 -6.90209245936473349e-02 -8.42426639463396272e-03 8.30511353030256170e-02 \n7\n-5.26005805664371724e-01 -8.16637083984714581e-01 -8.05174837362788627e-01 -5.17360703109971888e-01 -2.15743927247656558e-02 4.21571314962222335e-01 3.94613538937072831e-01 \n6.67271361645759104e-01 9.69611185881373910e-01 8.10926651277394457e-01 3.38654353846130464e-01 -1.50982309943912117e-01 -3.06133421638385218e-01 -1.32642902492944102e-01 \n-7.33975120488137314e-01 -1.08053149870360022e+00 -9.30404708671255141e-01 -3.91702184296549366e-01 3.06783831312178219e-01 7.42250749094773583e-01 5.30012664737757068e-01 \n1.12043999864122393e-01 -6.02100523804343112e-02 -5.72221095104803576e-01 -1.03190766146593182e+00 -7.32244136443198789e-01 4.71240819919521947e-01 9.90372181091053574e-01 \n2.43469711339336187e-01 5.41711290949236374e-01 8.65279760030843050e-01 9.23395615688289142e-01 3.10314409176305951e-01 -7.89786561061952355e-01 -1.00921908515668544e+00 \n-3.97271884641803843e-02 -3.52414737212397952e-02 4.88040062076179493e-02 1.80149392616545199e-01 1.86048068231253774e-01 -6.97826717652700598e-02 -2.30546333582866986e-01 \n-2.79930659597879618e-02 -7.49166320923655017e-02 -1.49549561919113079e-01 -2.00908708289151796e-01 -1.07103341870935621e-01 1.53560922751561429e-01 2.42352923201706026e-01 \n0.00000000000000000e+00 1.45310066115961185e+00 0.00000000000000000e+00 8.84390574558045817e-01 0.00000000000000000e+00 -3.99077164915407316e-01 0.00000000000000000e+00 \n-1.33454272329151821e+00 0.00000000000000000e+00 3.24049580177482611e+00 0.00000000000000000e+00 -8.07016685241048735e-01 0.00000000000000000e+00 6.60716715158452146e-02 \n0.00000000000000000e+00 -2.92406580330056855e+00 0.00000000000000000e+00 4.18622961628372464e+00 0.00000000000000000e+00 -1.14151659410748219e+00 0.00000000000000000e+00 \n-2.24087999728244787e-01 0.00000000000000000e+00 -2.79478393237104461e+00 0.00000000000000000e+00 1.10154005035238787e+00 0.00000000000000000e+00 -1.13153445492443332e-01 \n0.00000000000000000e+00 6.03385058676961987e-01 0.00000000000000000e+00 -2.67614121179907965e+00 0.00000000000000000e+00 9.15472420771418234e-01 0.00000000000000000e+00 \n7.94543769283607686e-02 0.00000000000000000e+00 4.22425751842325602e-01 0.00000000000000000e+00 -1.90377525042088415e-01 0.00000000000000000e+00 2.06960018574513412e-02 \n0.00000000000000000e+00 -4.41083858231873503e-02 0.00000000000000000e+00 4.70293202294114959e-01 0.00000000000000000e+00 -1.73289020959892172e-01 0.00000000000000000e+00 \n5.26005805664371724e-01 -8.16637083984714581e-01 8.05174837362788627e-01 -5.17360703109971888e-01 2.15743927247656558e-02 4.21571314962222335e-01 -3.94613538937072831e-01 \n6.67271361645759104e-01 -9.69611185881373910e-01 8.10926651277394457e-01 -3.38654353846130464e-01 -1.50982309943912117e-01 3.06133421638385218e-01 -1.32642902492944102e-01 \n7.33975120488137314e-01 -1.08053149870360022e+00 9.30404708671255141e-01 -3.91702184296549366e-01 -3.06783831312178219e-01 7.42250749094773583e-01 -5.30012664737757068e-01 \n1.12043999864122393e-01 6.02100523804343112e-02 -5.72221095104803576e-01 1.03190766146593182e+00 -7.32244136443198789e-01 -4.71240819919521947e-01 9.90372181091053574e-01 \n-2.43469711339336187e-01 5.41711290949236374e-01 -8.65279760030843050e-01 9.23395615688289142e-01 -3.10314409176305951e-01 -7.89786561061952355e-01 1.00921908515668544e+00 \n-3.97271884641803843e-02 3.52414737212397952e-02 4.88040062076179493e-02 -1.80149392616545199e-01 1.86048068231253774e-01 6.97826717652700598e-02 -2.30546333582866986e-01 \n2.79930659597879618e-02 -7.49166320923655017e-02 1.49549561919113079e-01 -2.00908708289151796e-01 1.07103341870935621e-01 1.53560922751561429e-01 -2.42352923201706026e-01 \n8\n-4.77943978650884688e-01 -7.45734215681497826e-01 -7.55326676495560777e-01 -5.52216028305634385e-01 -2.01823140825826857e-01 1.48235653235922788e-01 3.02881151075241706e-01 1.82567326697980760e-01 \n6.98958473382870934e-01 1.01822192003023362e+00 8.47237303319389360e-01 3.14048928832836637e-01 -2.71958402531104815e-01 -4.17991194528161567e-01 2.27359621320858402e-02 2.97907757673885311e-01 \n-6.81218234704270799e-01 -9.96255476112864687e-01 -8.50220624447980212e-01 -3.74024423291484655e-01 1.80555921547338130e-01 4.44454477732350909e-01 2.51744676230990141e-01 -1.54716153029880757e-02 \n3.91507190078396135e-01 4.16222868196696960e-01 -5.51882245132659723e-02 -8.00168324474164877e-01 -1.24125184507039289e+00 -6.59049126915746110e-01 7.29772035870324079e-01 1.06614763588357735e+00 \n6.35085832612706677e-02 2.92356118052283065e-01 7.42090915622285685e-01 1.19190612409619568e+00 1.15665455899522695e+00 2.23736878525715528e-01 -1.09426704277357773e+00 -1.14614545803807602e+00 \n-1.46705812220635482e-01 -2.14135681714188550e-01 -1.34916347133476300e-01 1.22441921768765900e-01 4.13751830737200189e-01 3.40793624746657503e-01 -2.23471816928742362e-01 -4.54591020471575466e-01 \n3.03974000632264235e-02 2.54811006177263974e-03 -1.22979964154691138e-01 -3.16588212802515765e-01 -4.15656758622392165e-01 -1.71026566066158611e-01 3.47804044628802811e-01 4.43036120118782457e-01 \n1.20258372749655891e-02 1.87609732723196132e-02 1.53151191130510233e-02 -4.12481901086555244e-03 -3.31246629204007129e-02 -3.41462490716730241e-02 1.71388497709841382e-02 4.36749090870204571e-02 \n0.00000000000000000e+00 1.64427702972096195e+00 0.00000000000000000e+00 1.23039303275115552e+00 0.00000000000000000e+00 -6.97879951157695484e-01 0.00000000000000000e+00 1.18309244930203751e-01 \n-1.39791694676574187e+00 0.00000000000000000e+00 3.07069432265487358e+00 0.00000000000000000e+00 -6.92213799915927129e-01 0.00000000000000000e+00 5.22579606248713758e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.72710742197497954e+00 0.00000000000000000e+00 4.46594118497059715e+00 0.00000000000000000e+00 -1.43762063463109307e+00 0.00000000000000000e+00 2.00609635646407939e-01 \n-7.83014380156792270e-01 0.00000000000000000e+00 -3.94676689197019966e+00 0.00000000000000000e+00 2.41295366011445965e+00 0.00000000000000000e+00 -3.86533152736106534e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.44711864403609559e-01 0.00000000000000000e+00 -4.22438844600958567e+00 0.00000000000000000e+00 2.12349394364048797e+00 0.00000000000000000e+00 -3.69635092356603497e-01 \n2.93411624441270964e-01 0.00000000000000000e+00 8.88987003671578985e-01 0.00000000000000000e+00 -6.78669279737601394e-01 0.00000000000000000e+00 1.18071079198716963e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 2.05503145186476995e-01 0.00000000000000000e+00 1.02805544930485413e+00 0.00000000000000000e+00 -5.86571220878204012e-01 0.00000000000000000e+00 1.07370177739091737e-01 \n-2.40516745499311783e-02 0.00000000000000000e+00 -6.26735656548433842e-02 0.00000000000000000e+00 5.32318712573376954e-02 0.00000000000000000e+00 -9.62042981039363142e-03 0.00000000000000000e+00 \n4.77943978650884688e-01 -7.45734215681497826e-01 7.55326676495560777e-01 -5.52216028305634385e-01 2.01823140825826857e-01 1.48235653235922788e-01 -3.02881151075241706e-01 1.82567326697980760e-01 \n6.98958473382870934e-01 -1.01822192003023362e+00 8.47237303319389360e-01 -3.14048928832836637e-01 -2.71958402531104815e-01 4.17991194528161567e-01 2.27359621320858402e-02 -2.97907757673885311e-01 \n6.81218234704270799e-01 -9.96255476112864687e-01 8.50220624447980212e-01 -3.74024423291484655e-01 -1.80555921547338130e-01 4.44454477732350909e-01 -2.51744676230990141e-01 -1.54716153029880757e-02 \n3.91507190078396135e-01 -4.16222868196696960e-01 -5.51882245132659723e-02 8.00168324474164877e-01 -1.24125184507039289e+00 6.59049126915746110e-01 7.29772035870324079e-01 -1.06614763588357735e+00 \n-6.35085832612706677e-02 2.92356118052283065e-01 -7.42090915622285685e-01 1.19190612409619568e+00 -1.15665455899522695e+00 2.23736878525715528e-01 1.09426704277357773e+00 -1.14614545803807602e+00 \n-1.46705812220635482e-01 2.14135681714188550e-01 -1.34916347133476300e-01 -1.22441921768765900e-01 4.13751830737200189e-01 -3.40793624746657503e-01 -2.23471816928742362e-01 4.54591020471575466e-01 \n-3.03974000632264235e-02 2.54811006177263974e-03 1.22979964154691138e-01 -3.16588212802515765e-01 4.15656758622392165e-01 -1.71026566066158611e-01 -3.47804044628802811e-01 4.43036120118782457e-01 \n1.20258372749655891e-02 -1.87609732723196132e-02 1.53151191130510233e-02 4.12481901086555244e-03 -3.31246629204007129e-02 3.41462490716730241e-02 1.71388497709841382e-02 -4.36749090870204571e-02 \n9\n-4.64704163488558550e-01 -7.20809949252894479e-01 -7.19747589782960746e-01 -5.10506363363541797e-01 -1.71245532629838771e-01 1.32056403788967971e-01 2.06279283635097779e-01 4.57830966329881946e-02 -6.30732768548084663e-02 \n7.92957524251403199e-01 1.19760167303215627e+00 1.09956201011869850e+00 5.75140545957744521e-01 -1.78760017878958304e-01 -6.93831684619781575e-01 -4.46522594192799722e-01 3.63583446828484759e-01 5.51741203445498355e-01 \n-7.33829622610443070e-01 -1.07973010300292898e+00 -9.28359477729938516e-01 -3.90161777020975891e-01 2.97049362031006687e-01 6.91942732936608733e-01 3.97212773983659941e-01 -3.22148462537430686e-01 -4.65525363009072735e-01 \n5.90692056421032785e-01 8.05205576865083970e-01 5.15258472791567143e-01 -1.63409349527908150e-01 -9.14310169791491589e-01 -1.15117530656380056e+00 -3.93063659101518228e-01 8.18075431921436373e-01 8.97413043930690258e-01 \n-1.98851985605513825e-01 -1.50415997230074406e-01 2.44736592829695006e-01 8.56412009946657141e-01 1.33052511584678563e+00 1.13980908429074493e+00 2.73662622503306840e-02 -1.21878172429837144e+00 -1.06695202623300602e+00 \n-2.87910792187068500e-01 -4.84370083564811316e-01 -5.16889858675257310e-01 -2.76590747078993794e-01 2.60698376040184606e-01 7.34883784167952104e-01 4.75510603060865563e-01 -4.80151251600155454e-01 -7.15212497384811537e-01 \n1.73185884524584870e-01 2.39987832583420253e-01 1.33433999638542586e-01 -1.67181403008429094e-01 -5.60918320034891479e-01 -7.02725450223139784e-01 -2.03821107451915771e-01 6.41019250933150387e-01 6.83214466891432392e-01 \n3.66877609684976735e-02 6.51346080730170439e-02 7.86659304316089819e-02 5.77697288293093935e-02 -1.75240109743152007e-02 -1.07203565604778423e-01 -8.85302584872651798e-02 6.90170613172213553e-02 1.21894170690119415e-01 \n-3.15069730878294684e-02 -4.68782889283037350e-02 -3.55370404873425278e-02 1.06733096789697580e-02 8.42060092940796180e-02 1.27378203528021159e-01 5.16105512408259779e-02 -1.11487660561995821e-01 -1.31712183568166109e-01 \n0.00000000000000000e+00 1.68615662703963387e+00 0.00000000000000000e+00 1.24586918052178325e+00 0.00000000000000000e+00 -7.91335177915616389e-01 0.00000000000000000e+00 1.56017070543123823e-01 0.00000000000000000e+00 \n-1.58591504850280640e+00 0.00000000000000000e+00 2.82272488239925510e+00 0.00000000000000000e+00 -1.98776639759042755e-02 0.00000000000000000e+00 -1.53987461982429179e-01 0.00000000000000000e+00 2.01239397003877315e-02 \n0.00000000000000000e+00 -2.92466055583567154e+00 0.00000000000000000e+00 4.17503652305792039e+00 0.00000000000000000e+00 -1.11715911368006085e+00 0.00000000000000000e+00 1.18999847666469123e-01 0.00000000000000000e+00 \n-1.18138411284206557e+00 0.00000000000000000e+00 -4.40625689081475426e+00 0.00000000000000000e+00 4.00031729651110478e+00 0.00000000000000000e+00 -9.12526926033856395e-01 0.00000000000000000e+00 8.13097712116795958e-02 \n0.00000000000000000e+00 -1.07685497455867112e+00 0.00000000000000000e+00 -5.28441299445162449e+00 0.00000000000000000e+00 3.81706105934063129e+00 0.00000000000000000e+00 -8.98799967706070994e-01 0.00000000000000000e+00 \n5.75821584374137001e-01 0.00000000000000000e+00 1.25540788259328450e+00 0.00000000000000000e+00 -1.71823020283676747e+00 0.00000000000000000e+00 4.45627145156995717e-01 0.00000000000000000e+00 -4.24210278195107612e-02 \n0.00000000000000000e+00 7.19891339434509703e-01 0.00000000000000000e+00 1.65783774864466748e+00 0.00000000000000000e+00 -1.50406380261627918e+00 0.00000000000000000e+00 3.84077136682660406e-01 0.00000000000000000e+00 \n-7.33755219369953469e-02 0.00000000000000000e+00 -1.32706781162941061e-01 0.00000000000000000e+00 2.24393769895662347e-01 0.00000000000000000e+00 -6.14765094052100984e-02 0.00000000000000000e+00 6.01853500919213575e-03 \n0.00000000000000000e+00 -1.24530134866696187e-01 0.00000000000000000e+00 -2.33663412803405046e-01 0.00000000000000000e+00 2.35421931433449885e-01 0.00000000000000000e+00 -6.22150304699451980e-02 0.00000000000000000e+00 \n4.64704163488558550e-01 -7.20809949252894479e-01 7.19747589782960746e-01 -5.10506363363541797e-01 1.71245532629838771e-01 1.32056403788967971e-01 -2.06279283635097779e-01 4.57830966329881946e-02 6.30732768548084663e-02 \n7.92957524251403199e-01 -1.19760167303215627e+00 1.09956201011869850e+00 -5.75140545957744521e-01 -1.78760017878958304e-01 6.93831684619781575e-01 -4.46522594192799722e-01 -3.63583446828484759e-01 5.51741203445498355e-01 \n7.33829622610443070e-01 -1.07973010300292898e+00 9.28359477729938516e-01 -3.90161777020975891e-01 -2.97049362031006687e-01 6.91942732936608733e-01 -3.97212773983659941e-01 -3.22148462537430686e-01 4.65525363009072735e-01 \n5.90692056421032785e-01 -8.05205576865083970e-01 5.15258472791567143e-01 1.63409349527908150e-01 -9.14310169791491589e-01 1.15117530656380056e+00 -3.93063659101518228e-01 -8.18075431921436373e-01 8.97413043930690258e-01 \n1.98851985605513825e-01 -1.50415997230074406e-01 -2.44736592829695006e-01 8.56412009946657141e-01 -1.33052511584678563e+00 1.13980908429074493e+00 -2.73662622503306840e-02 -1.21878172429837144e+00 1.06695202623300602e+00 \n-2.87910792187068500e-01 4.84370083564811316e-01 -5.16889858675257310e-01 2.76590747078993794e-01 2.60698376040184606e-01 -7.34883784167952104e-01 4.75510603060865563e-01 4.80151251600155454e-01 -7.15212497384811537e-01 \n-1.73185884524584870e-01 2.39987832583420253e-01 -1.33433999638542586e-01 -1.67181403008429094e-01 5.60918320034891479e-01 -7.02725450223139784e-01 2.03821107451915771e-01 6.41019250933150387e-01 -6.83214466891432392e-01 \n3.66877609684976735e-02 -6.51346080730170439e-02 7.86659304316089819e-02 -5.77697288293093935e-02 -1.75240109743152007e-02 1.07203565604778423e-01 -8.85302584872651798e-02 -6.90170613172213553e-02 1.21894170690119415e-01 \n3.15069730878294684e-02 -4.68782889283037350e-02 3.55370404873425278e-02 1.06733096789697580e-02 -8.42060092940796180e-02 1.27378203528021159e-01 -5.16105512408259779e-02 -1.11487660561995821e-01 1.31712183568166109e-01 \n10\n-4.97721225993044972e-01 -7.80432535050620531e-01 -7.98116605687908310e-01 -5.90221817006132181e-01 -2.11330543338151521e-01 1.87584147688415763e-01 3.61856250699278137e-01 1.49434689429101547e-01 -2.20603789449084052e-01 -2.40551474155978984e-01 \n8.33603069342161828e-01 1.30253869553309657e+00 1.31560502750395791e+00 9.28836574587936857e-01 2.29474943621943398e-01 -5.03724298687183499e-01 -7.85066017355939709e-01 -2.74031578137710376e-01 5.42826669338893415e-01 5.59834754841246154e-01 \n-8.52046193449543950e-01 -1.29734210276531096e+00 -1.22559874384111281e+00 -7.15411654891119158e-01 8.45609802405687349e-02 8.10772074647948853e-01 9.32341254436074400e-01 1.86709739324655185e-01 -7.51989721717370046e-01 -6.82336250865926302e-01 \n6.29045818467545668e-01 9.16709330607186556e-01 7.67252272846668695e-01 2.76807631281174079e-01 -3.68861520365909489e-01 -8.32946911643113505e-01 -7.43315915340003611e-01 -4.59557692573304576e-02 6.42364406162152382e-01 5.18591152305444488e-01 \n-3.83797244748129856e-01 -4.97805315277514521e-01 -2.48190317956789665e-01 2.80881531979162550e-01 8.82771762124504125e-01 1.19180288988782048e+00 8.26245287334541884e-01 -1.97278286782245441e-01 -1.05496851541044840e+00 -7.65533434047735498e-01 \n-3.61995463691246702e-01 -6.69131903569531104e-01 -8.85232337206538251e-01 -8.63891051399292440e-01 -3.95331539128375568e-01 4.63610727535569114e-01 1.06277876233469371e+00 5.18822009371438615e-01 -7.93810288816100319e-01 -9.37444499781098817e-01 \n3.52423452237617584e-01 5.71192090343027984e-01 5.89133999625748963e-01 3.37979609058915085e-01 -2.17148794130697355e-01 -8.53838611307174278e-01 -9.94910363943993345e-01 -1.63220687565470416e-01 9.87970864920654339e-01 9.03627862026294609e-01 \n5.91902588602332437e-02 1.18256632409062113e-01 1.78878773215638234e-01 2.10029825568914921e-01 1.42088282514595508e-01 -5.81041036764591414e-02 -2.53809345557506350e-01 -1.64910476153759478e-01 1.87194637882172799e-01 2.55061310992238945e-01 \n-7.97339696221246933e-02 -1.35175367314352251e-01 -1.54847855467507984e-01 -1.17388196777547059e-01 4.93090313973104016e-03 1.81848739945588699e-01 2.64186016718868328e-01 7.68025786354419162e-02 -2.49247585960417298e-01 -2.51603949237504151e-01 \n-3.83618418413379561e-03 -8.00490450063934262e-03 -1.29472128554749237e-02 -1.66048928550545170e-02 -1.31500520696763748e-02 2.19394959577243059e-03 2.03232668498347642e-02 1.55482371639886226e-02 -1.50435654193429283e-02 -2.26237133448142945e-02 \n0.00000000000000000e+00 1.57665287953729475e+00 0.00000000000000000e+00 1.17163373429700169e+00 0.00000000000000000e+00 -5.39575399058127326e-01 0.00000000000000000e+00 5.57491365720950424e-02 0.00000000000000000e+00 7.12296632638239674e-04 \n-1.66720613868432366e+00 0.00000000000000000e+00 2.92568178815004552e+00 0.00000000000000000e+00 9.38087848308641111e-01 0.00000000000000000e+00 -6.35255943049105275e-01 0.00000000000000000e+00 1.00266553967470815e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -3.30846498427045985e+00 0.00000000000000000e+00 3.97408816706712790e+00 0.00000000000000000e+00 -1.38240428981278921e-01 0.00000000000000000e+00 -3.04105960732021572e-01 0.00000000000000000e+00 6.81746035722325047e-02 \n-1.25809163693509134e+00 0.00000000000000000e+00 -4.21197519534010342e+00 0.00000000000000000e+00 5.23693060928595129e+00 0.00000000000000000e+00 -1.57160072087341867e+00 0.00000000000000000e+00 1.96971246647707460e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.66341468027980442e+00 0.00000000000000000e+00 -5.48941797436295129e+00 0.00000000000000000e+00 5.48228041354869713e+00 0.00000000000000000e+00 -1.67195386595382676e+00 0.00000000000000000e+00 2.46008628362191920e-01 \n7.23990927382493404e-01 0.00000000000000000e+00 1.11767537097184662e+00 0.00000000000000000e+00 -3.30591638599385921e+00 0.00000000000000000e+00 1.23083658447265194e+00 0.00000000000000000e+00 -1.72301923776509821e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.29927711953145280e+00 0.00000000000000000e+00 1.94156762916637963e+00 0.00000000000000000e+00 -3.02648922919502457e+00 0.00000000000000000e+00 1.05700529551249572e+00 0.00000000000000000e+00 -1.66348728260725898e-01 \n-1.18380517720466487e-01 0.00000000000000000e+00 -1.13974983843286167e-01 0.00000000000000000e+00 6.31912502893377201e-01 0.00000000000000000e+00 -2.55340702582152223e-01 0.00000000000000000e+00 3.71732507136796491e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.82062411269989118e-01 0.00000000000000000e+00 -3.22640824187261510e-01 0.00000000000000000e+00 6.33918463503458689e-01 0.00000000000000000e+00 -2.33726537095596821e-01 0.00000000000000000e+00 3.77496960824024460e-02 \n7.67236836826759122e-03 0.00000000000000000e+00 4.81860175431480293e-03 0.00000000000000000e+00 -4.60293845629578134e-02 0.00000000000000000e+00 1.94205343332942153e-02 0.00000000000000000e+00 -2.88661423754044553e-03 0.00000000000000000e+00 \n4.97721225993044972e-01 -7.80432535050620531e-01 7.98116605687908310e-01 -5.90221817006132181e-01 2.11330543338151521e-01 1.87584147688415763e-01 -3.61856250699278137e-01 1.49434689429101547e-01 2.20603789449084052e-01 -2.40551474155978984e-01 \n8.33603069342161828e-01 -1.30253869553309657e+00 1.31560502750395791e+00 -9.28836574587936857e-01 2.29474943621943398e-01 5.03724298687183499e-01 -7.85066017355939709e-01 2.74031578137710376e-01 5.42826669338893415e-01 -5.59834754841246154e-01 \n8.52046193449543950e-01 -1.29734210276531096e+00 1.22559874384111281e+00 -7.15411654891119158e-01 -8.45609802405687349e-02 8.10772074647948853e-01 -9.32341254436074400e-01 1.86709739324655185e-01 7.51989721717370046e-01 -6.82336250865926302e-01 \n6.29045818467545668e-01 -9.16709330607186556e-01 7.67252272846668695e-01 -2.76807631281174079e-01 -3.68861520365909489e-01 8.32946911643113505e-01 -7.43315915340003611e-01 4.59557692573304576e-02 6.42364406162152382e-01 -5.18591152305444488e-01 \n3.83797244748129856e-01 -4.97805315277514521e-01 2.48190317956789665e-01 2.80881531979162550e-01 -8.82771762124504125e-01 1.19180288988782048e+00 -8.26245287334541884e-01 -1.97278286782245441e-01 1.05496851541044840e+00 -7.65533434047735498e-01 \n-3.61995463691246702e-01 6.69131903569531104e-01 -8.85232337206538251e-01 8.63891051399292440e-01 -3.95331539128375568e-01 -4.63610727535569114e-01 1.06277876233469371e+00 -5.18822009371438615e-01 -7.93810288816100319e-01 9.37444499781098817e-01 \n-3.52423452237617584e-01 5.71192090343027984e-01 -5.89133999625748963e-01 3.37979609058915085e-01 2.17148794130697355e-01 -8.53838611307174278e-01 9.94910363943993345e-01 -1.63220687565470416e-01 -9.87970864920654339e-01 9.03627862026294609e-01 \n5.91902588602332437e-02 -1.18256632409062113e-01 1.78878773215638234e-01 -2.10029825568914921e-01 1.42088282514595508e-01 5.81041036764591414e-02 -2.53809345557506350e-01 1.64910476153759478e-01 1.87194637882172799e-01 -2.55061310992238945e-01 \n7.97339696221246933e-02 -1.35175367314352251e-01 1.54847855467507984e-01 -1.17388196777547059e-01 -4.93090313973104016e-03 1.81848739945588699e-01 -2.64186016718868328e-01 7.68025786354419162e-02 2.49247585960417298e-01 -2.51603949237504151e-01 \n-3.83618418413379561e-03 8.00490450063934262e-03 -1.29472128554749237e-02 1.66048928550545170e-02 -1.31500520696763748e-02 -2.19394959577243059e-03 2.03232668498347642e-02 -1.55482371639886226e-02 -1.50435654193429283e-02 2.26237133448142945e-02 \n11\n-5.24512783056389006e-01 -8.38623412334418051e-01 -9.00417261039235050e-01 -7.45293071864746047e-01 -3.97193107536300052e-01 5.19785913830133787e-02 4.04182806338479907e-01 4.13993537600650338e-01 2.56792643811179711e-02 -3.74386845159116288e-01 -2.92790504141814192e-01 \n7.91639885962943401e-01 1.25397919868990430e+00 1.32006015384333056e+00 1.05582365216233574e+00 5.22802999268529986e-01 -1.16755044264316498e-01 -5.74455178684038160e-01 -5.47999886140880133e-01 -2.56906002103651019e-02 4.68476215312995220e-01 3.55567659853262592e-01 \n-9.12219090357457777e-01 -1.43147072666453760e+00 -1.46873532135106600e+00 -1.09440969376486004e+00 -3.84324111365839268e-01 4.44578109211765693e-01 9.90335021221548317e-01 8.17899437648539945e-01 -7.83829087983987634e-02 -8.65249083090521393e-01 -6.24329507983059823e-01 \n5.91008658238085996e-01 8.64084580639891749e-01 7.38205484056043037e-01 3.19066085030919222e-01 -2.12090972023730798e-01 -5.76954330908163614e-01 -5.35813664524419618e-01 -1.32420460271751440e-01 2.31853918383627761e-01 2.22678753319384329e-01 4.42435028630788832e-02 \n-4.21126473900703808e-01 -5.89630701164741720e-01 -4.32578525910468205e-01 -3.12841373225919202e-02 4.62934423385687647e-01 8.10510343683250043e-01 7.70539176552631318e-01 2.88641073735732189e-01 -3.37726386951157191e-01 -5.96504747728249635e-01 -3.16346117290470973e-01 \n-2.81337390764657448e-01 -5.88896292691359517e-01 -9.43922074346533029e-01 -1.21743808212339886e+00 -1.12066711177052957e+00 -4.15845896255615983e-01 6.88674896720592356e-01 1.27605613588963220e+00 4.27942575414357897e-01 -1.06256674184837924e+00 -1.03866440023652596e+00 \n4.55962240907857646e-01 7.98436664377520896e-01 9.93526076219812648e-01 9.57562922288170818e-01 5.34346397472164958e-01 -2.89985667879412179e-01 -1.13000059293885528e+00 -1.19399772575124403e+00 -3.22241259600748693e-02 1.29495023456399247e+00 1.03415798403174688e+00 \n3.43621006746075053e-02 9.87279913128453504e-02 2.16676015398499134e-01 3.61780490591223819e-01 4.28355303171655396e-01 2.65253072738370447e-01 -1.49689150352214649e-01 -4.84026256943832725e-01 -2.39077331269121174e-01 3.94063597470189015e-01 4.39253039933635433e-01 \n-1.22362380642332222e-01 -2.26201456222628766e-01 -3.11423422896990078e-01 -3.49555406311336015e-01 -2.65914221358806555e-01 -4.53253905660807947e-03 3.44650216043918772e-01 4.66608616618281616e-01 8.04454914687740124e-02 -4.72580112794689025e-01 -4.15792817315407258e-01 \n-1.27885287003286376e-03 -6.98167731972624067e-03 -2.05956096946267967e-02 -4.03434054351125481e-02 -5.44019641516072555e-02 -4.07977082264596926e-02 1.15113390937148521e-02 6.33642183760971665e-02 3.78438073767789079e-02 -5.16793506613524574e-02 -6.26995243899680244e-02 \n1.62837783695642034e-02 3.09019515470249374e-02 4.45550071119708202e-02 5.34034815242979825e-02 4.54845746255817600e-02 8.65365443419077494e-03 -4.83381041767930544e-02 -7.57950440040675318e-02 -1.88354992001943513e-02 7.50456600230012641e-02 6.99474812021287881e-02 \n0.00000000000000000e+00 1.50741728191451902e+00 0.00000000000000000e+00 1.27529580856930729e+00 0.00000000000000000e+00 -7.40091074528729669e-02 0.00000000000000000e+00 -2.50083553814202066e-01 0.00000000000000000e+00 7.42334975561785257e-02 0.00000000000000000e+00 \n-1.58327977192588680e+00 0.00000000000000000e+00 3.29048141223437988e+00 0.00000000000000000e+00 1.64706580579668659e+00 0.00000000000000000e+00 -1.24524042812613028e+00 0.00000000000000000e+00 2.51247993536695305e-01 0.00000000000000000e+00 -2.21261350269551762e-02 \n0.00000000000000000e+00 -3.45709779520445034e+00 0.00000000000000000e+00 4.26660320050395453e+00 0.00000000000000000e+00 1.01711105945493684e+00 0.00000000000000000e+00 -1.08834565651560863e+00 0.00000000000000000e+00 2.61079262935268576e-01 0.00000000000000000e+00 \n-1.18201731647617199e+00 0.00000000000000000e+00 -3.94849662731602058e+00 0.00000000000000000e+00 5.64553798936506538e+00 0.00000000000000000e+00 -1.98360938827059084e+00 0.00000000000000000e+00 3.08537126441925966e-01 0.00000000000000000e+00 -2.36962289249898939e-02 \n0.00000000000000000e+00 -1.73838839450390759e+00 0.00000000000000000e+00 -5.15818210883531185e+00 0.00000000000000000e+00 6.47371034882092254e+00 0.00000000000000000e+00 -2.40279415889145549e+00 0.00000000000000000e+00 4.35632313059057371e-01 0.00000000000000000e+00 \n5.62674781529314896e-01 0.00000000000000000e+00 3.13776376091717312e-01 0.00000000000000000e+00 -5.03182940010980362e+00 0.00000000000000000e+00 2.63233911680943016e+00 0.00000000000000000e+00 -5.08158118526184560e-01 0.00000000000000000e+00 4.46632749190197917e-02 \n0.00000000000000000e+00 1.56212574158643746e+00 0.00000000000000000e+00 1.49802190051630846e+00 0.00000000000000000e+00 -4.91530085790528897e+00 0.00000000000000000e+00 2.32212958704672277e+00 0.00000000000000000e+00 -4.75980753295123342e-01 0.00000000000000000e+00 \n-6.87242013492150106e-02 0.00000000000000000e+00 1.74103518342278852e-01 0.00000000000000000e+00 1.30829030512986219e+00 0.00000000000000000e+00 -7.78988835778488779e-01 0.00000000000000000e+00 1.59120746467115761e-01 0.00000000000000000e+00 -1.44381288557173363e-02 \n0.00000000000000000e+00 -3.95348528385150004e-01 0.00000000000000000e+00 -1.83385419542005642e-01 0.00000000000000000e+00 1.33632831323721608e+00 0.00000000000000000e+00 -6.88587926926073586e-01 0.00000000000000000e+00 1.46807108968044784e-01 0.00000000000000000e+00 \n2.55770574006572753e-03 0.00000000000000000e+00 -3.26532371549512221e-02 0.00000000000000000e+00 -1.44056530498666043e-01 0.00000000000000000e+00 9.17843317355161717e-02 0.00000000000000000e+00 -1.92958663555586558e-02 0.00000000000000000e+00 1.77970674384899125e-03 \n0.00000000000000000e+00 5.10134228070553032e-02 0.00000000000000000e+00 1.09907331692021512e-02 0.00000000000000000e+00 -1.84387255945789261e-01 0.00000000000000000e+00 9.91768028557271821e-02 0.00000000000000000e+00 -2.15534589422255158e-02 0.00000000000000000e+00 \n5.24512783056389006e-01 -8.38623412334418051e-01 9.00417261039235050e-01 -7.45293071864746047e-01 3.97193107536300052e-01 5.19785913830133787e-02 -4.04182806338479907e-01 4.13993537600650338e-01 -2.56792643811179711e-02 -3.74386845159116288e-01 2.92790504141814192e-01 \n7.91639885962943401e-01 -1.25397919868990430e+00 1.32006015384333056e+00 -1.05582365216233574e+00 5.22802999268529986e-01 1.16755044264316498e-01 -5.74455178684038160e-01 5.47999886140880133e-01 -2.56906002103651019e-02 -4.68476215312995220e-01 3.55567659853262592e-01 \n9.12219090357457777e-01 -1.43147072666453760e+00 1.46873532135106600e+00 -1.09440969376486004e+00 3.84324111365839268e-01 4.44578109211765693e-01 -9.90335021221548317e-01 8.17899437648539945e-01 7.83829087983987634e-02 -8.65249083090521393e-01 6.24329507983059823e-01 \n5.91008658238085996e-01 -8.64084580639891749e-01 7.38205484056043037e-01 -3.19066085030919222e-01 -2.12090972023730798e-01 5.76954330908163614e-01 -5.35813664524419618e-01 1.32420460271751440e-01 2.31853918383627761e-01 -2.22678753319384329e-01 4.42435028630788832e-02 \n4.21126473900703808e-01 -5.89630701164741720e-01 4.32578525910468205e-01 -3.12841373225919202e-02 -4.62934423385687647e-01 8.10510343683250043e-01 -7.70539176552631318e-01 2.88641073735732189e-01 3.37726386951157191e-01 -5.96504747728249635e-01 3.16346117290470973e-01 \n-2.81337390764657448e-01 5.88896292691359517e-01 -9.43922074346533029e-01 1.21743808212339886e+00 -1.12066711177052957e+00 4.15845896255615983e-01 6.88674896720592356e-01 -1.27605613588963220e+00 4.27942575414357897e-01 1.06256674184837924e+00 -1.03866440023652596e+00 \n-4.55962240907857646e-01 7.98436664377520896e-01 -9.93526076219812648e-01 9.57562922288170818e-01 -5.34346397472164958e-01 -2.89985667879412179e-01 1.13000059293885528e+00 -1.19399772575124403e+00 3.22241259600748693e-02 1.29495023456399247e+00 -1.03415798403174688e+00 \n3.43621006746075053e-02 -9.87279913128453504e-02 2.16676015398499134e-01 -3.61780490591223819e-01 4.28355303171655396e-01 -2.65253072738370447e-01 -1.49689150352214649e-01 4.84026256943832725e-01 -2.39077331269121174e-01 -3.94063597470189015e-01 4.39253039933635433e-01 \n1.22362380642332222e-01 -2.26201456222628766e-01 3.11423422896990078e-01 -3.49555406311336015e-01 2.65914221358806555e-01 -4.53253905660807947e-03 -3.44650216043918772e-01 4.66608616618281616e-01 -8.04454914687740124e-02 -4.72580112794689025e-01 4.15792817315407258e-01 \n-1.27885287003286376e-03 6.98167731972624067e-03 -2.05956096946267967e-02 4.03434054351125481e-02 -5.44019641516072555e-02 4.07977082264596926e-02 1.15113390937148521e-02 -6.33642183760971665e-02 3.78438073767789079e-02 5.16793506613524574e-02 -6.26995243899680244e-02 \n-1.62837783695642034e-02 3.09019515470249374e-02 -4.45550071119708202e-02 5.34034815242979825e-02 -4.54845746255817600e-02 8.65365443419077494e-03 4.83381041767930544e-02 -7.57950440040675318e-02 1.88354992001943513e-02 7.50456600230012641e-02 -6.99474812021287881e-02 \n12\n-5.09841119915471758e-01 -8.24598513321324353e-01 -9.12983094119853337e-01 -8.14569831868884490e-01 -5.45362980480898475e-01 -1.58494448037430159e-01 2.24814429596106248e-01 4.23193802906002406e-01 2.92252301444439788e-01 -8.99032014532956281e-02 -3.53079228476905083e-01 -2.21408906738405765e-01 \n7.47386502820169506e-01 1.18090355080344519e+00 1.23965656667413477e+00 9.97752495854896269e-01 5.30549476512081054e-01 -4.04031369134225885e-03 -3.75210651710465347e-01 -3.97036269170969755e-01 -1.15384294037258851e-01 1.58804335062917772e-01 1.72465753676170748e-01 4.79918488009319498e-02 \n-8.78467161972524638e-01 -1.39470576108470112e+00 -1.48024732956129728e+00 -1.21432514682576444e+00 -6.60370300485651182e-01 3.56803210982322936e-02 6.20156020599436567e-01 7.95406544554620011e-01 4.16601193784030721e-01 -2.60865256646807835e-01 -6.22312241162943211e-01 -3.52845499480392407e-01 \n6.16401793307752262e-01 8.99653794742988296e-01 7.59396228847016460e-01 2.95259199530736890e-01 -3.09035086352280367e-01 -7.39091999036984862e-01 -6.72604501519275047e-01 -8.96555181019376739e-02 4.74301404732849218e-01 3.28961815879233083e-01 -3.02873788975535283e-01 -3.75908390384911824e-01 \n-3.97935097929812116e-01 -5.52501126563401051e-01 -3.94641879414977947e-01 -9.77334001097079300e-03 4.43767455802893294e-01 7.27309765739417618e-01 6.27482070038858039e-01 1.59223012178434546e-01 -3.05398251282551056e-01 -3.12324220073235492e-01 4.27243247047026939e-02 1.53933258009796183e-01 \n-7.25038328356648365e-02 -2.58099192756523687e-01 -6.19525038138677431e-01 -1.06914709868248858e+00 -1.35987004307269603e+00 -1.15872063625244628e+00 -2.94204801055111577e-01 8.52914547394053905e-01 1.26094233569417635e+00 2.19933624436677316e-01 -1.16261522712055972e+00 -9.61980790607670180e-01 \n4.00437929528086024e-01 7.52377157236641231e-01 1.06807074957920308e+00 1.28045112004321641e+00 1.19351027755784245e+00 6.18316109814744230e-01 -3.91670135992788370e-01 -1.29496581369695421e+00 -1.20340449735100395e+00 1.61297178502846076e-01 1.44227442008759974e+00 1.01601211474082069e+00 \n-8.10799784540828138e-02 -8.11033144330032754e-02 4.91645687530099475e-02 3.06540846034416541e-01 6.02904696383069888e-01 7.18290692301214981e-01 3.99194333294970780e-01 -3.10582382207851861e-01 -7.75283417935539033e-01 -2.71666726283368780e-01 6.84570304095561803e-01 6.47320617876272289e-01 \n-1.01482582448979050e-01 -2.16825145695750890e-01 -3.70069529131217760e-01 -5.40076803002494720e-01 -6.26476455730740905e-01 -4.75551161953088858e-01 -4.57843954326467166e-03 5.78138058280571529e-01 7.13847536378927565e-01 3.48041197729885531e-02 -7.75916213400704487e-01 -6.04508258198411208e-01 \n2.09819083066516213e-02 2.71389224544885427e-02 9.55443338964802475e-03 -3.44887940643951482e-02 -9.54477465293984024e-02 -1.35110954049874129e-01 -9.44550927594946558e-02 4.03801611019854230e-02 1.51921618197430077e-01 6.79672418468713120e-02 -1.33519983634168074e-01 -1.36219360319368020e-01 \n1.31062415034321050e-02 3.13235436724469956e-02 6.05928763850457433e-02 9.84156386311628057e-02 1.26392910163307239e-01 1.10126589681208357e-01 2.12651611993402531e-02 -1.09188325132912949e-01 -1.58356362413237112e-01 -2.12510890865382392e-02 1.66775934107147362e-01 1.37518739389491314e-01 \n-1.81435036565436070e-03 -2.50925561469609216e-03 -1.42435173492898109e-03 1.75654901658688964e-03 6.60213496330526405e-03 1.04195338851206531e-02 8.24320280646965648e-03 -2.19916339264771664e-03 -1.21714979749093480e-02 -6.28255439477979255e-03 1.07426091616708934e-02 1.15680348692460758e-02 \n0.00000000000000000e+00 1.58101574785474863e+00 0.00000000000000000e+00 1.53905738514662960e+00 0.00000000000000000e+00 3.00034540850210574e-01 0.00000000000000000e+00 -6.76058245263127403e-01 0.00000000000000000e+00 2.16841509887441841e-01 0.00000000000000000e+00 -3.30425514088470319e-02 \n-1.49477300564033901e+00 0.00000000000000000e+00 3.50664839276150658e+00 0.00000000000000000e+00 1.82822556184964970e+00 0.00000000000000000e+00 -1.61457600855890997e+00 0.00000000000000000e+00 3.90307897877245670e-01 0.00000000000000000e+00 -4.44671382996678476e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -3.29678750709960188e+00 0.00000000000000000e+00 4.79361070276050593e+00 0.00000000000000000e+00 1.72510649601093455e+00 0.00000000000000000e+00 -1.92917427525441831e+00 0.00000000000000000e+00 5.48395786585703752e-01 0.00000000000000000e+00 -7.91381093103274982e-02 \n-1.23280358661550452e+00 0.00000000000000000e+00 -4.12121153559334334e+00 0.00000000000000000e+00 5.38048096246829328e+00 0.00000000000000000e+00 -1.71588400293072941e+00 0.00000000000000000e+00 2.38884313859269805e-01 0.00000000000000000e+00 -1.66318823665390848e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.65197297779052328e+00 0.00000000000000000e+00 -5.00666152788269967e+00 0.00000000000000000e+00 6.55662420540044206e+00 0.00000000000000000e+00 -2.61136074507498603e+00 0.00000000000000000e+00 5.24475505885490436e-01 0.00000000000000000e+00 -6.28455826079351293e-02 \n1.45007665671329673e-01 0.00000000000000000e+00 -8.13923438387086997e-01 0.00000000000000000e+00 -6.24329717192238894e+00 0.00000000000000000e+00 4.50904583204068472e+00 0.00000000000000000e+00 -1.14974204119848974e+00 0.00000000000000000e+00 1.39572078546975262e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.26956104240803983e+00 0.00000000000000000e+00 3.73963140236505655e-01 0.00000000000000000e+00 -6.57647444775472731e+00 0.00000000000000000e+00 4.16783641609554295e+00 0.00000000000000000e+00 -1.08868732490277997e+00 0.00000000000000000e+00 1.54003149496232825e-01 \n1.62159956908165628e-01 0.00000000000000000e+00 8.20827839259568637e-01 0.00000000000000000e+00 2.05646453138609787e+00 0.00000000000000000e+00 -1.85081019971217183e+00 0.00000000000000000e+00 5.13826739196888823e-01 0.00000000000000000e+00 -6.53798807841730989e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.69441664148215569e-01 0.00000000000000000e+00 3.81165297036863860e-01 0.00000000000000000e+00 2.23613974931625089e+00 0.00000000000000000e+00 -1.63888727392248266e+00 0.00000000000000000e+00 4.54702294047663669e-01 0.00000000000000000e+00 -6.64406626398752314e-02 \n-4.19638166133032426e-02 0.00000000000000000e+00 -1.61678167234387829e-01 0.00000000000000000e+00 -3.03176886007687473e-01 0.00000000000000000e+00 3.06244972535225780e-01 0.00000000000000000e+00 -8.85446965973943483e-02 0.00000000000000000e+00 1.15201494513905410e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 2.81556173759552647e-02 0.00000000000000000e+00 -1.08054663404776174e-01 0.00000000000000000e+00 -3.86121149796882217e-01 0.00000000000000000e+00 3.04557659138428227e-01 0.00000000000000000e+00 -8.69690635061904726e-02 0.00000000000000000e+00 1.29052866987163353e-02 \n3.62870073130872140e-03 0.00000000000000000e+00 1.26596116727332858e-02 0.00000000000000000e+00 2.07710049174299724e-02 0.00000000000000000e+00 -2.24635992824846541e-02 0.00000000000000000e+00 6.64737290580040824e-03 0.00000000000000000e+00 -8.76028989227837122e-04 0.00000000000000000e+00 \n5.09841119915471758e-01 -8.24598513321324353e-01 9.12983094119853337e-01 -8.14569831868884490e-01 5.45362980480898475e-01 -1.58494448037430159e-01 -2.24814429596106248e-01 4.23193802906002406e-01 -2.92252301444439788e-01 -8.99032014532956281e-02 3.53079228476905083e-01 -2.21408906738405765e-01 \n7.47386502820169506e-01 -1.18090355080344519e+00 1.23965656667413477e+00 -9.97752495854896269e-01 5.30549476512081054e-01 4.04031369134225885e-03 -3.75210651710465347e-01 3.97036269170969755e-01 -1.15384294037258851e-01 -1.58804335062917772e-01 1.72465753676170748e-01 -4.79918488009319498e-02 \n8.78467161972524638e-01 -1.39470576108470112e+00 1.48024732956129728e+00 -1.21432514682576444e+00 6.60370300485651182e-01 3.56803210982322936e-02 -6.20156020599436567e-01 7.95406544554620011e-01 -4.16601193784030721e-01 -2.60865256646807835e-01 6.22312241162943211e-01 -3.52845499480392407e-01 \n6.16401793307752262e-01 -8.99653794742988296e-01 7.59396228847016460e-01 -2.95259199530736890e-01 -3.09035086352280367e-01 7.39091999036984862e-01 -6.72604501519275047e-01 8.96555181019376739e-02 4.74301404732849218e-01 -3.28961815879233083e-01 -3.02873788975535283e-01 3.75908390384911824e-01 \n3.97935097929812116e-01 -5.52501126563401051e-01 3.94641879414977947e-01 -9.77334001097079300e-03 -4.43767455802893294e-01 7.27309765739417618e-01 -6.27482070038858039e-01 1.59223012178434546e-01 3.05398251282551056e-01 -3.12324220073235492e-01 -4.27243247047026939e-02 1.53933258009796183e-01 \n-7.25038328356648365e-02 2.58099192756523687e-01 -6.19525038138677431e-01 1.06914709868248858e+00 -1.35987004307269603e+00 1.15872063625244628e+00 -2.94204801055111577e-01 -8.52914547394053905e-01 1.26094233569417635e+00 -2.19933624436677316e-01 -1.16261522712055972e+00 9.61980790607670180e-01 \n-4.00437929528086024e-01 7.52377157236641231e-01 -1.06807074957920308e+00 1.28045112004321641e+00 -1.19351027755784245e+00 6.18316109814744230e-01 3.91670135992788370e-01 -1.29496581369695421e+00 1.20340449735100395e+00 1.61297178502846076e-01 -1.44227442008759974e+00 1.01601211474082069e+00 \n-8.10799784540828138e-02 8.11033144330032754e-02 4.91645687530099475e-02 -3.06540846034416541e-01 6.02904696383069888e-01 -7.18290692301214981e-01 3.99194333294970780e-01 3.10582382207851861e-01 -7.75283417935539033e-01 2.71666726283368780e-01 6.84570304095561803e-01 -6.47320617876272289e-01 \n1.01482582448979050e-01 -2.16825145695750890e-01 3.70069529131217760e-01 -5.40076803002494720e-01 6.26476455730740905e-01 -4.75551161953088858e-01 4.57843954326467166e-03 5.78138058280571529e-01 -7.13847536378927565e-01 3.48041197729885531e-02 7.75916213400704487e-01 -6.04508258198411208e-01 \n2.09819083066516213e-02 -2.71389224544885427e-02 9.55443338964802475e-03 3.44887940643951482e-02 -9.54477465293984024e-02 1.35110954049874129e-01 -9.44550927594946558e-02 -4.03801611019854230e-02 1.51921618197430077e-01 -6.79672418468713120e-02 -1.33519983634168074e-01 1.36219360319368020e-01 \n-1.31062415034321050e-02 3.13235436724469956e-02 -6.05928763850457433e-02 9.84156386311628057e-02 -1.26392910163307239e-01 1.10126589681208357e-01 -2.12651611993402531e-02 -1.09188325132912949e-01 1.58356362413237112e-01 -2.12510890865382392e-02 -1.66775934107147362e-01 1.37518739389491314e-01 \n-1.81435036565436070e-03 2.50925561469609216e-03 -1.42435173492898109e-03 -1.75654901658688964e-03 6.60213496330526405e-03 -1.04195338851206531e-02 8.24320280646965648e-03 2.19916339264771664e-03 -1.21714979749093480e-02 6.28255439477979255e-03 1.07426091616708934e-02 -1.15680348692460758e-02 \n13\n-4.80174819273297965e-01 -7.76555262221843816e-01 -8.61902150470302458e-01 -7.79436714362372147e-01 -5.51914757793678651e-01 -2.30993403147520053e-01 8.79320722575429290e-02 2.82373340100918628e-01 2.65256632352362452e-01 6.98049799409046251e-02 -1.33872073671050736e-01 -1.75888083884935950e-01 -7.53535957627563307e-02 \n7.69322990485029453e-01 1.21699328175078020e+00 1.27900594491799560e+00 1.02541302675626381e+00 5.24854644666294768e-01 -6.22862723493746347e-02 -4.76158466263838181e-01 -4.72250599661959092e-01 -6.67652847067493392e-02 3.13688995016518792e-01 1.96721765820629384e-01 -2.08659424489331172e-01 -2.30724923219431302e-01 \n-8.37257983273116615e-01 -1.32630796156796176e+00 -1.40278634343883677e+00 -1.15041343375538841e+00 -6.43581219790089837e-01 -3.23849380656266564e-02 4.53658566920587386e-01 5.89116176315673434e-01 3.23918046488016363e-01 -9.05096012067349072e-02 -2.68508342559671114e-01 -1.33141090410928038e-01 2.42113513879153270e-03 \n7.33855994222181595e-01 1.10243363890808939e+00 1.00794352588435920e+00 5.32762074707039602e-01 -1.83876640206937720e-01 -8.53536239484098132e-01 -1.07662658331281486e+00 -5.83258134984572439e-01 3.64111519431134325e-01 8.62531066978709642e-01 2.28986911396234528e-01 -7.33481054628602964e-01 -6.15436208988021356e-01 \n-4.45168562188449077e-01 -6.22734532424173528e-01 -4.51477150789103710e-01 -8.87745374627372583e-03 5.51413704427018533e-01 9.64882980037977493e-01 9.33021254897355825e-01 3.41850019218686640e-01 -4.69190385335603720e-01 -7.55446458313590122e-01 -1.17730160282893410e-01 6.60530670763044866e-01 5.10163810495033018e-01 \n1.30162165251879677e-01 9.72585984107771818e-02 -1.69000661576694587e-01 -6.08207807371251455e-01 -1.05482903159409686e+00 -1.24281593620743250e+00 -9.11645003353534205e-01 -4.74918024707867418e-02 8.61598309251077090e-01 9.67581970039148773e-01 -2.64271712020493232e-02 -1.00293303542383926e+00 -7.02730467357970511e-01 \n2.23142782339634327e-01 4.71745575234600057e-01 7.88157550048361750e-01 1.12917433629968237e+00 1.33253419358953022e+00 1.17571208992713077e+00 5.12360722835942717e-01 -5.01966854466763629e-01 -1.25558056609366157e+00 -9.74170938321257860e-01 3.44250989012813797e-01 1.33113129674787074e+00 8.27659542980585348e-01 \n-2.71470647248313838e-01 -4.11321444360439806e-01 -3.59752177457719675e-01 -9.28141331879792172e-02 3.74346791448022996e-01 8.69104196710811278e-01 1.02486953063238642e+00 4.94688602249870343e-01 -5.35695999727491680e-01 -1.06418002284675236e+00 -2.25712425186680780e-01 1.01189675669299216e+00 8.31414434421498687e-01 \n2.78541844632073882e-02 -1.56071336921159732e-02 -1.79539063796148999e-01 -4.61261450230253965e-01 -7.81355116938533565e-01 -9.48229724997791677e-01 -7.09394594771735762e-01 2.53150410924161810e-02 8.62337015529670101e-01 9.54717027213221909e-01 -8.04754950460984016e-02 -1.11789371607546840e+00 -7.80664968270067654e-01 \n7.45409270370143671e-02 1.19363795972231804e-01 1.21945303504365528e-01 7.16911013823574815e-02 -4.15863841010517579e-02 -1.89937923033018323e-01 -2.77198718903696728e-01 -1.77105951090048813e-01 1.07883060076359150e-01 3.01611574765080352e-01 9.32174274946285580e-02 -2.82706570988566005e-01 -2.49371207773495399e-01 \n-2.23955263072276200e-02 -2.32172131130225239e-02 1.09812505001731184e-02 8.29360121193079623e-02 1.79202288247085337e-01 2.52299987584821213e-01 2.22739841677240649e-01 3.70207462303379565e-02 -2.19255232362664104e-01 -2.88210998833849859e-01 -4.15573586768344425e-03 3.22997646525411723e-01 2.38540487742132296e-01 \n-8.59638707907990226e-03 -1.40846357877527654e-02 -1.52519966604896833e-02 -1.07553955537831889e-02 1.32911899364593036e-03 1.91149424035169230e-02 3.21527828119221553e-02 2.37731670377047382e-02 -9.80661171300796705e-03 -3.66287866335266879e-02 -1.37158604837533735e-02 3.43059808090277271e-02 3.17907506236039729e-02 \n4.05093526780447096e-03 4.97138114796697792e-03 9.01657087724608321e-04 -8.75776357913863931e-03 -2.27418603874525359e-02 -3.49349956221876560e-02 -3.36090986815711406e-02 -8.85643315474627033e-03 2.96189727893873498e-02 4.34185446578625397e-02 3.05864149964619557e-03 -4.77838416569125645e-02 -3.65748513008574008e-02 \n0.00000000000000000e+00 1.69046340559522043e+00 0.00000000000000000e+00 1.72789497435041584e+00 0.00000000000000000e+00 4.06764949771491480e-01 0.00000000000000000e+00 -9.92207139096892724e-01 0.00000000000000000e+00 3.68056186988128808e-01 0.00000000000000000e+00 -6.64728846107098596e-02 0.00000000000000000e+00 \n-1.53864598097005891e+00 0.00000000000000000e+00 3.39843161271177502e+00 0.00000000000000000e+00 1.73382451735318705e+00 0.00000000000000000e+00 -1.43693798255009126e+00 0.00000000000000000e+00 3.28973219558524145e-01 0.00000000000000000e+00 -3.63627639765617030e-02 0.00000000000000000e+00 2.13887279059514303e-03 \n0.00000000000000000e+00 -3.14807754115084124e+00 0.00000000000000000e+00 5.02737339661607231e+00 0.00000000000000000e+00 1.82041692424112200e+00 0.00000000000000000e+00 -2.33136758531904575e+00 0.00000000000000000e+00 7.53604099217546109e-01 0.00000000000000000e+00 -1.26550271415483421e-01 0.00000000000000000e+00 \n-1.46771198844436319e+00 0.00000000000000000e+00 -4.62848122192712515e+00 0.00000000000000000e+00 5.11850925649125794e+00 0.00000000000000000e+00 -6.88432806900922581e-01 0.00000000000000000e+00 -2.31961022177089721e-01 0.00000000000000000e+00 7.29690968386684447e-02 0.00000000000000000e+00 -7.77494060639293559e-03 \n0.00000000000000000e+00 -1.83874920572276973e+00 0.00000000000000000e+00 -5.41501532624507061e+00 0.00000000000000000e+00 6.18683111359943104e+00 0.00000000000000000e+00 -1.96582634177665102e+00 0.00000000000000000e+00 2.63155579948122267e-01 0.00000000000000000e+00 -1.25110001943285936e-02 0.00000000000000000e+00 \n-2.60324330503759355e-01 0.00000000000000000e+00 -1.64789234438611809e+00 0.00000000000000000e+00 -6.55516964074966662e+00 0.00000000000000000e+00 6.33078743701553236e+00 0.00000000000000000e+00 -2.04918119881991484e+00 0.00000000000000000e+00 3.22673321861592255e-01 0.00000000000000000e+00 -2.66510397589884631e-02 \n0.00000000000000000e+00 6.02487394948919269e-01 0.00000000000000000e+00 -8.66599434200138934e-01 0.00000000000000000e+00 -7.42205174850229298e+00 0.00000000000000000e+00 6.21473734309622812e+00 0.00000000000000000e+00 -2.02251510068555570e+00 0.00000000000000000e+00 3.53941394625185753e-01 0.00000000000000000e+00 \n5.42941294496627675e-01 0.00000000000000000e+00 1.63166179284873501e+00 0.00000000000000000e+00 2.44139091623293605e+00 0.00000000000000000e+00 -3.54377930819471545e+00 0.00000000000000000e+00 1.31359450846867116e+00 0.00000000000000000e+00 -2.22619288218604163e-01 0.00000000000000000e+00 1.92312710277448072e-02 \n0.00000000000000000e+00 2.24193718158915273e-01 0.00000000000000000e+00 1.34686141130003142e+00 0.00000000000000000e+00 2.96652913760839827e+00 0.00000000000000000e+00 -3.21888714328385646e+00 0.00000000000000000e+00 1.15262420819971540e+00 0.00000000000000000e+00 -2.12307892189978665e-01 0.00000000000000000e+00 \n-1.49081854074028734e-01 0.00000000000000000e+00 -3.94857590773909456e-01 0.00000000000000000e+00 -4.28462443804290042e-01 0.00000000000000000e+00 7.81961981890481547e-01 0.00000000000000000e+00 -3.07507719611960822e-01 0.00000000000000000e+00 5.37382058480453281e-02 0.00000000000000000e+00 -4.72896361970246991e-03 \n0.00000000000000000e+00 -1.08726331479409494e-01 0.00000000000000000e+00 -3.85247173533244517e-01 0.00000000000000000e+00 -6.09581463490772951e-01 0.00000000000000000e+00 7.57287027734152747e-01 0.00000000000000000e+00 -2.83124844202224102e-01 0.00000000000000000e+00 5.33355664034369281e-02 0.00000000000000000e+00 \n1.71927741581598045e-02 0.00000000000000000e+00 4.29710243842078578e-02 0.00000000000000000e+00 3.92666745814887916e-02 0.00000000000000000e+00 -8.30374221122831215e-02 0.00000000000000000e+00 3.37657105381450984e-02 0.00000000000000000e+00 -6.00398288761034159e-03 0.00000000000000000e+00 5.33959212510273104e-04 \n0.00000000000000000e+00 1.81229405121059647e-02 0.00000000000000000e+00 5.47997808660632639e-02 0.00000000000000000e+00 7.47802537945234536e-02 0.00000000000000000e+00 -1.00322867065244018e-01 0.00000000000000000e+00 3.83814880582302136e-02 0.00000000000000000e+00 -7.31766849403017082e-03 0.00000000000000000e+00 \n4.80174819273297965e-01 -7.76555262221843816e-01 8.61902150470302458e-01 -7.79436714362372147e-01 5.51914757793678651e-01 -2.30993403147520053e-01 -8.79320722575429290e-02 2.82373340100918628e-01 -2.65256632352362452e-01 6.98049799409046251e-02 1.33872073671050736e-01 -1.75888083884935950e-01 7.53535957627563307e-02 \n7.69322990485029453e-01 -1.21699328175078020e+00 1.27900594491799560e+00 -1.02541302675626381e+00 5.24854644666294768e-01 6.22862723493746347e-02 -4.76158466263838181e-01 4.72250599661959092e-01 -6.67652847067493392e-02 -3.13688995016518792e-01 1.96721765820629384e-01 2.08659424489331172e-01 -2.30724923219431302e-01 \n8.37257983273116615e-01 -1.32630796156796176e+00 1.40278634343883677e+00 -1.15041343375538841e+00 6.43581219790089837e-01 -3.23849380656266564e-02 -4.53658566920587386e-01 5.89116176315673434e-01 -3.23918046488016363e-01 -9.05096012067349072e-02 2.68508342559671114e-01 -1.33141090410928038e-01 -2.42113513879153270e-03 \n7.33855994222181595e-01 -1.10243363890808939e+00 1.00794352588435920e+00 -5.32762074707039602e-01 -1.83876640206937720e-01 8.53536239484098132e-01 -1.07662658331281486e+00 5.83258134984572439e-01 3.64111519431134325e-01 -8.62531066978709642e-01 2.28986911396234528e-01 7.33481054628602964e-01 -6.15436208988021356e-01 \n4.45168562188449077e-01 -6.22734532424173528e-01 4.51477150789103710e-01 -8.87745374627372583e-03 -5.51413704427018533e-01 9.64882980037977493e-01 -9.33021254897355825e-01 3.41850019218686640e-01 4.69190385335603720e-01 -7.55446458313590122e-01 1.17730160282893410e-01 6.60530670763044866e-01 -5.10163810495033018e-01 \n1.30162165251879677e-01 -9.72585984107771818e-02 -1.69000661576694587e-01 6.08207807371251455e-01 -1.05482903159409686e+00 1.24281593620743250e+00 -9.11645003353534205e-01 4.74918024707867418e-02 8.61598309251077090e-01 -9.67581970039148773e-01 -2.64271712020493232e-02 1.00293303542383926e+00 -7.02730467357970511e-01 \n-2.23142782339634327e-01 4.71745575234600057e-01 -7.88157550048361750e-01 1.12917433629968237e+00 -1.33253419358953022e+00 1.17571208992713077e+00 -5.12360722835942717e-01 -5.01966854466763629e-01 1.25558056609366157e+00 -9.74170938321257860e-01 -3.44250989012813797e-01 1.33113129674787074e+00 -8.27659542980585348e-01 \n-2.71470647248313838e-01 4.11321444360439806e-01 -3.59752177457719675e-01 9.28141331879792172e-02 3.74346791448022996e-01 -8.69104196710811278e-01 1.02486953063238642e+00 -4.94688602249870343e-01 -5.35695999727491680e-01 1.06418002284675236e+00 -2.25712425186680780e-01 -1.01189675669299216e+00 8.31414434421498687e-01 \n-2.78541844632073882e-02 -1.56071336921159732e-02 1.79539063796148999e-01 -4.61261450230253965e-01 7.81355116938533565e-01 -9.48229724997791677e-01 7.09394594771735762e-01 2.53150410924161810e-02 -8.62337015529670101e-01 9.54717027213221909e-01 8.04754950460984016e-02 -1.11789371607546840e+00 7.80664968270067654e-01 \n7.45409270370143671e-02 -1.19363795972231804e-01 1.21945303504365528e-01 -7.16911013823574815e-02 -4.15863841010517579e-02 1.89937923033018323e-01 -2.77198718903696728e-01 1.77105951090048813e-01 1.07883060076359150e-01 -3.01611574765080352e-01 9.32174274946285580e-02 2.82706570988566005e-01 -2.49371207773495399e-01 \n2.23955263072276200e-02 -2.32172131130225239e-02 -1.09812505001731184e-02 8.29360121193079623e-02 -1.79202288247085337e-01 2.52299987584821213e-01 -2.22739841677240649e-01 3.70207462303379565e-02 2.19255232362664104e-01 -2.88210998833849859e-01 4.15573586768344425e-03 3.22997646525411723e-01 -2.38540487742132296e-01 \n-8.59638707907990226e-03 1.40846357877527654e-02 -1.52519966604896833e-02 1.07553955537831889e-02 1.32911899364593036e-03 -1.91149424035169230e-02 3.21527828119221553e-02 -2.37731670377047382e-02 -9.80661171300796705e-03 3.66287866335266879e-02 -1.37158604837533735e-02 -3.43059808090277271e-02 3.17907506236039729e-02 \n-4.05093526780447096e-03 4.97138114796697792e-03 -9.01657087724608321e-04 -8.75776357913863931e-03 2.27418603874525359e-02 -3.49349956221876560e-02 3.36090986815711406e-02 -8.85643315474627033e-03 -2.96189727893873498e-02 4.34185446578625397e-02 -3.05864149964619557e-03 -4.77838416569125645e-02 3.65748513008574008e-02 \n14\n-4.78604495239227219e-01 -7.72755483399441604e-01 -8.54231065052784521e-01 -7.65790714894504873e-01 -5.31137028478922009e-01 -2.05470154597803120e-01 1.08889377502622695e-01 2.81997084266669329e-01 2.29635341734918365e-01 1.38198277943789611e-02 -1.47776300773890965e-01 -8.59889760729105785e-02 7.09763844668306117e-02 7.61889707075938536e-02 \n8.26266052872044190e-01 1.32361584817501870e+00 1.43233912490706694e+00 1.21799792147487103e+00 7.21623083818657137e-01 6.16560007526290634e-02 -5.25506168211408861e-01 -7.33320654347016529e-01 -3.87528670732486836e-01 2.66239198942335480e-01 5.61575863205581889e-01 9.68921625457331738e-02 -5.01184738923250989e-01 -3.79096050247594829e-01 \n-8.68506962041949680e-01 -1.37793144017608478e+00 -1.46058837985733905e+00 -1.19676032926337188e+00 -6.52872943686358940e-01 2.30316426434414201e-02 5.81194353678569590e-01 7.39984970469748790e-01 3.80486353993716446e-01 -2.28742729825446907e-01 -4.93578309745721581e-01 -1.02912178674333806e-01 3.93209586017071469e-01 3.00190640151200591e-01 \n8.43870829874398623e-01 1.31102653637205381e+00 1.31435630203649786e+00 9.28648560117451373e-01 2.38177462935378926e-01 -5.57293421628516154e-01 -1.11953695794887600e+00 -1.07707523727929416e+00 -3.19878672720632042e-01 6.60347014098897461e-01 9.02569740078377762e-01 1.57966494891586657e-02 -8.93784905933864859e-01 -6.17442544090011816e-01 \n-5.80204732142020894e-01 -8.54172317529528632e-01 -7.34298341744556450e-01 -2.87613255464829827e-01 3.70413043534087422e-01 1.00790318901933143e+00 1.29382869209465014e+00 9.42703967983577751e-01 1.30849662255712379e-03 -9.16021525697287033e-01 -9.11985098951328139e-01 1.60411615805700805e-01 1.04438821014346074e+00 6.58502510648936531e-01 \n2.14418053787864806e-01 2.60809078375805886e-01 8.05372471282631404e-02 -2.70235576809037970e-01 -6.70483370192358864e-01 -9.33296121172644252e-01 -8.68550070569594502e-01 -4.10869091556056874e-01 2.44449530417325905e-01 6.54311505409054162e-01 4.46411401975734806e-01 -2.03048363930521363e-01 -5.75920935520142869e-01 -3.16372369643576793e-01 \n5.81778486205019721e-02 1.84964310114603982e-01 4.26652005748701654e-01 7.50678280549123110e-01 1.04323010785782874e+00 1.13306861596666023e+00 8.60512500667623872e-01 2.05924891055280270e-01 -5.73781485098013013e-01 -9.60532496722221638e-01 -5.36361031092775796e-01 4.24839484960797496e-01 9.30697474496357612e-01 4.97373501564521602e-01 \n-4.42996513102545719e-01 -7.35717913253370315e-01 -8.34201831979220681e-01 -7.02221687876156877e-01 -2.69810752640535456e-01 4.25522706448143683e-01 1.10614182089444668e+00 1.26011366685235239e+00 4.99292698532212949e-01 -7.82534115151737235e-01 -1.25857618748558969e+00 -9.00478585793385434e-02 1.28891924249213631e+00 9.35229039956298614e-01 \n2.39319854275043860e-01 3.47864685929992181e-01 2.67488403369180083e-01 -1.48665121705924466e-02 -4.79774951939132968e-01 -9.89173314621174339e-01 -1.24603658848856813e+00 -9.01710620780518513e-01 1.02725764916321527e-01 1.14324897187895901e+00 1.11642511649644548e+00 -2.61177135974001763e-01 -1.42025889337255504e+00 -8.97115179693807596e-01 \n1.44236448348263806e-01 2.49966849060325864e-01 3.09978049909937594e-01 3.08160937342047595e-01 2.00575372739112656e-01 -3.58147338537092725e-02 -3.32891612658893946e-01 -4.89005327490444100e-01 -2.78764372208895156e-01 2.34760734522035577e-01 5.13466159936750948e-01 9.07734624285597102e-02 -5.11453482253113148e-01 -3.97873010419362298e-01 \n-1.02362780040685300e-01 -1.59903384307912641e-01 -1.55057933699671808e-01 -7.87834743887511118e-02 7.76924409671698541e-02 2.84748413081544892e-01 4.40962603834406645e-01 3.89350104351767066e-01 4.63394236842187001e-02 -3.93907761495639253e-01 -4.63014090135148873e-01 5.23698535418203685e-02 5.54069353874636048e-01 3.70324750796533666e-01 \n-2.11572603118538915e-02 -3.74212979926780056e-02 -4.83476276533074272e-02 -5.15119984983000341e-02 -3.90604189081440601e-02 -4.38982722999223524e-03 4.56968888639975296e-02 7.96283331738860305e-02 5.38952833358005356e-02 -3.17727860379025701e-02 -8.79339337277111928e-02 -2.12575040236453210e-02 8.69484818041382607e-02 7.08175658023537085e-02 \n1.93427231089396759e-02 3.09785580940368976e-02 3.21390711008897248e-02 2.09640908700539340e-02 -5.43397006924046104e-03 -4.39238482125348830e-02 -7.77127947982252433e-02 -7.62306009154002643e-02 -1.74346097819205258e-02 6.88087461965252047e-02 9.08585457111301698e-02 -4.34125063104646193e-03 -1.05926328414621831e-01 -7.33843972776979390e-02 \n1.52745913827072422e-03 2.73333858707538025e-03 3.61328763496594620e-03 3.99591862423910387e-03 3.26290504231010004e-03 7.93392730383236714e-04 -3.10459487722466096e-03 -6.11983539771843349e-03 -4.59588808643857706e-03 2.09810865955937956e-03 7.04508718177964639e-03 2.02597503274525769e-03 -6.96256378764180976e-03 -5.86397408226091302e-03 \n0.00000000000000000e+00 1.69374337199584423e+00 0.00000000000000000e+00 1.71668472963706012e+00 0.00000000000000000e+00 3.70920401296768024e-01 0.00000000000000000e+00 -1.00332347202124874e+00 0.00000000000000000e+00 3.93903736699023800e-01 0.00000000000000000e+00 -7.69986868546920289e-02 0.00000000000000000e+00 9.21726153740841116e-03 \n-1.65253210574408838e+00 0.00000000000000000e+00 3.21561224896499491e+00 0.00000000000000000e+00 1.83019312059660410e+00 0.00000000000000000e+00 -7.93786240392077896e-01 0.00000000000000000e+00 -9.85963096179954385e-02 0.00000000000000000e+00 7.20960769728338409e-02 0.00000000000000000e+00 -1.16005055106112686e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -3.26132985958363524e+00 0.00000000000000000e+00 4.84580215042416440e+00 0.00000000000000000e+00 1.73985979448331327e+00 0.00000000000000000e+00 -2.01929205292442061e+00 0.00000000000000000e+00 5.97917206519149824e-01 0.00000000000000000e+00 -9.19168529227657480e-02 0.00000000000000000e+00 8.79954971759208375e-03 \n-1.68774165974879725e+00 0.00000000000000000e+00 -4.96180731479295656e+00 0.00000000000000000e+00 5.37967411267926133e+00 0.00000000000000000e+00 6.28697186269131940e-01 0.00000000000000000e+00 -1.15329035007093147e+00 0.00000000000000000e+00 3.15886198844025695e-01 0.00000000000000000e+00 -3.99472708747408063e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.31143166438842844e+00 0.00000000000000000e+00 -6.05866470723389217e+00 0.00000000000000000e+00 6.11568628292921668e+00 0.00000000000000000e+00 -6.46770076059033165e-01 0.00000000000000000e+00 -5.37114141689344664e-01 0.00000000000000000e+00 1.99171736110784911e-01 0.00000000000000000e+00 -3.20817405373119662e-02 \n-4.28836107575729612e-01 0.00000000000000000e+00 -1.87407775237418548e+00 0.00000000000000000e+00 -6.24528781782976176e+00 0.00000000000000000e+00 7.44870689956530422e+00 0.00000000000000000e+00 -2.89508205350836377e+00 0.00000000000000000e+00 5.58206546202704755e-01 0.00000000000000000e+00 -5.97264790272007802e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 3.31393385138333744e-02 0.00000000000000000e+00 -1.58452513033738661e+00 0.00000000000000000e+00 -7.37379351366253001e+00 0.00000000000000000e+00 7.81491233612415435e+00 0.00000000000000000e+00 -3.06621870336398014e+00 0.00000000000000000e+00 6.44641552481768168e-01 0.00000000000000000e+00 -8.30952410153231964e-02 \n8.85993026205091437e-01 0.00000000000000000e+00 2.15755456692335835e+00 0.00000000000000000e+00 2.05494414658332376e+00 0.00000000000000000e+00 -5.58946240803525800e+00 0.00000000000000000e+00 2.73896053714039388e+00 0.00000000000000000e+00 -5.98836503115570147e-01 0.00000000000000000e+00 6.93247228761787015e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 9.62327215597438632e-01 0.00000000000000000e+00 2.33729486968791068e+00 0.00000000000000000e+00 3.04156705208175893e+00 0.00000000000000000e+00 -5.29427981662236883e+00 0.00000000000000000e+00 2.43662469779808497e+00 0.00000000000000000e+00 -5.57781526157003681e-01 0.00000000000000000e+00 7.56185946879419205e-02 \n-2.88472896696527612e-01 0.00000000000000000e+00 -6.17756365839796085e-01 0.00000000000000000e+00 -3.05171088810067209e-01 0.00000000000000000e+00 1.58540417742891781e+00 0.00000000000000000e+00 -8.50002137386973289e-01 0.00000000000000000e+00 1.94068893852489351e-01 0.00000000000000000e+00 -2.30533396937585933e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -3.89383374722032027e-01 0.00000000000000000e+00 -7.72750446751158487e-01 0.00000000000000000e+00 -6.62985090370952868e-01 0.00000000000000000e+00 1.54970383876225054e+00 0.00000000000000000e+00 -7.61867533346594226e-01 0.00000000000000000e+00 1.80186185439005443e-01 0.00000000000000000e+00 -2.48907420140553059e-02 \n4.23145206237077831e-02 0.00000000000000000e+00 8.46758669297514485e-02 0.00000000000000000e+00 2.25549348141590986e-02 0.00000000000000000e+00 -2.24028864783396535e-01 0.00000000000000000e+00 1.26271380394558257e-01 0.00000000000000000e+00 -2.95183710385143475e-02 0.00000000000000000e+00 3.55623789539615479e-03 0.00000000000000000e+00 \n0.00000000000000000e+00 7.20532005376068067e-02 0.00000000000000000e+00 1.31134846781577500e-01 0.00000000000000000e+00 8.92805412292878813e-02 0.00000000000000000e+00 -2.53685297757938563e-01 0.00000000000000000e+00 1.29252773959048887e-01 0.00000000000000000e+00 -3.11064963172688406e-02 0.00000000000000000e+00 4.34043300362238974e-03 \n-3.05491827654144844e-03 0.00000000000000000e+00 -5.86790555309473490e-03 0.00000000000000000e+00 -7.59888828491104775e-04 0.00000000000000000e+00 1.60139211338753524e-02 0.00000000000000000e+00 -9.30433699920294191e-03 0.00000000000000000e+00 2.20638464499730707e-03 0.00000000000000000e+00 -2.68112824892303595e-04 0.00000000000000000e+00 \n4.78604495239227219e-01 -7.72755483399441604e-01 8.54231065052784521e-01 -7.65790714894504873e-01 5.31137028478922009e-01 -2.05470154597803120e-01 -1.08889377502622695e-01 2.81997084266669329e-01 -2.29635341734918365e-01 1.38198277943789611e-02 1.47776300773890965e-01 -8.59889760729105785e-02 -7.09763844668306117e-02 7.61889707075938536e-02 \n8.26266052872044190e-01 -1.32361584817501870e+00 1.43233912490706694e+00 -1.21799792147487103e+00 7.21623083818657137e-01 -6.16560007526290634e-02 -5.25506168211408861e-01 7.33320654347016529e-01 -3.87528670732486836e-01 -2.66239198942335480e-01 5.61575863205581889e-01 -9.68921625457331738e-02 -5.01184738923250989e-01 3.79096050247594829e-01 \n8.68506962041949680e-01 -1.37793144017608478e+00 1.46058837985733905e+00 -1.19676032926337188e+00 6.52872943686358940e-01 2.30316426434414201e-02 -5.81194353678569590e-01 7.39984970469748790e-01 -3.80486353993716446e-01 -2.28742729825446907e-01 4.93578309745721581e-01 -1.02912178674333806e-01 -3.93209586017071469e-01 3.00190640151200591e-01 \n8.43870829874398623e-01 -1.31102653637205381e+00 1.31435630203649786e+00 -9.28648560117451373e-01 2.38177462935378926e-01 5.57293421628516154e-01 -1.11953695794887600e+00 1.07707523727929416e+00 -3.19878672720632042e-01 -6.60347014098897461e-01 9.02569740078377762e-01 -1.57966494891586657e-02 -8.93784905933864859e-01 6.17442544090011816e-01 \n5.80204732142020894e-01 -8.54172317529528632e-01 7.34298341744556450e-01 -2.87613255464829827e-01 -3.70413043534087422e-01 1.00790318901933143e+00 -1.29382869209465014e+00 9.42703967983577751e-01 -1.30849662255712379e-03 -9.16021525697287033e-01 9.11985098951328139e-01 1.60411615805700805e-01 -1.04438821014346074e+00 6.58502510648936531e-01 \n2.14418053787864806e-01 -2.60809078375805886e-01 8.05372471282631404e-02 2.70235576809037970e-01 -6.70483370192358864e-01 9.33296121172644252e-01 -8.68550070569594502e-01 4.10869091556056874e-01 2.44449530417325905e-01 -6.54311505409054162e-01 4.46411401975734806e-01 2.03048363930521363e-01 -5.75920935520142869e-01 3.16372369643576793e-01 \n-5.81778486205019721e-02 1.84964310114603982e-01 -4.26652005748701654e-01 7.50678280549123110e-01 -1.04323010785782874e+00 1.13306861596666023e+00 -8.60512500667623872e-01 2.05924891055280270e-01 5.73781485098013013e-01 -9.60532496722221638e-01 5.36361031092775796e-01 4.24839484960797496e-01 -9.30697474496357612e-01 4.97373501564521602e-01 \n-4.42996513102545719e-01 7.35717913253370315e-01 -8.34201831979220681e-01 7.02221687876156877e-01 -2.69810752640535456e-01 -4.25522706448143683e-01 1.10614182089444668e+00 -1.26011366685235239e+00 4.99292698532212949e-01 7.82534115151737235e-01 -1.25857618748558969e+00 9.00478585793385434e-02 1.28891924249213631e+00 -9.35229039956298614e-01 \n-2.39319854275043860e-01 3.47864685929992181e-01 -2.67488403369180083e-01 -1.48665121705924466e-02 4.79774951939132968e-01 -9.89173314621174339e-01 1.24603658848856813e+00 -9.01710620780518513e-01 -1.02725764916321527e-01 1.14324897187895901e+00 -1.11642511649644548e+00 -2.61177135974001763e-01 1.42025889337255504e+00 -8.97115179693807596e-01 \n1.44236448348263806e-01 -2.49966849060325864e-01 3.09978049909937594e-01 -3.08160937342047595e-01 2.00575372739112656e-01 3.58147338537092725e-02 -3.32891612658893946e-01 4.89005327490444100e-01 -2.78764372208895156e-01 -2.34760734522035577e-01 5.13466159936750948e-01 -9.07734624285597102e-02 -5.11453482253113148e-01 3.97873010419362298e-01 \n1.02362780040685300e-01 -1.59903384307912641e-01 1.55057933699671808e-01 -7.87834743887511118e-02 -7.76924409671698541e-02 2.84748413081544892e-01 -4.40962603834406645e-01 3.89350104351767066e-01 -4.63394236842187001e-02 -3.93907761495639253e-01 4.63014090135148873e-01 5.23698535418203685e-02 -5.54069353874636048e-01 3.70324750796533666e-01 \n-2.11572603118538915e-02 3.74212979926780056e-02 -4.83476276533074272e-02 5.15119984983000341e-02 -3.90604189081440601e-02 4.38982722999223524e-03 4.56968888639975296e-02 -7.96283331738860305e-02 5.38952833358005356e-02 3.17727860379025701e-02 -8.79339337277111928e-02 2.12575040236453210e-02 8.69484818041382607e-02 -7.08175658023537085e-02 \n-1.93427231089396759e-02 3.09785580940368976e-02 -3.21390711008897248e-02 2.09640908700539340e-02 5.43397006924046104e-03 -4.39238482125348830e-02 7.77127947982252433e-02 -7.62306009154002643e-02 1.74346097819205258e-02 6.88087461965252047e-02 -9.08585457111301698e-02 -4.34125063104646193e-03 1.05926328414621831e-01 -7.33843972776979390e-02 \n1.52745913827072422e-03 -2.73333858707538025e-03 3.61328763496594620e-03 -3.99591862423910387e-03 3.26290504231010004e-03 -7.93392730383236714e-04 -3.10459487722466096e-03 6.11983539771843349e-03 -4.59588808643857706e-03 -2.09810865955937956e-03 7.04508718177964639e-03 -2.02597503274525769e-03 -6.96256378764180976e-03 5.86397408226091302e-03 \n15\n-5.03849359029895126e-01 -8.18550976291110623e-01 -9.17073100802980058e-01 -8.41534397270193198e-01 -6.07546550696272156e-01 -2.57786061892446837e-01 1.14385397789872290e-01 3.67253374130913119e-01 3.66556194482933164e-01 1.01451395685375574e-01 -2.19219873114684556e-01 -2.70300858710692397e-01 2.24934873465780565e-02 2.76427309917004880e-01 1.73563983691440260e-01 \n8.43244877875875393e-01 1.36817832799681244e+00 1.52751142835548373e+00 1.38939058626124461e+00 9.77438673482248971e-01 3.62742618224802528e-01 -2.91592542527600422e-01 -7.29195427449937081e-01 -6.98073014195496838e-01 -1.70707157687253061e-01 4.56462416063390126e-01 5.45317818842743409e-01 -5.62286842104979912e-02 -5.75368665757856567e-01 -3.60433902964482806e-01 \n-9.41846082006829197e-01 -1.51210004466167483e+00 -1.64757664187480674e+00 -1.42726400515249512e+00 -8.93777376397268922e-01 -1.56429698861093564e-01 5.66717392794473621e-01 9.68304641420706002e-01 7.89271908438860149e-01 7.50743479189172677e-02 -6.44133600607791381e-01 -6.44573289519038849e-01 1.41361203944282489e-01 7.39493250959077935e-01 4.40609818934869534e-01 \n8.60966390547362612e-01 1.36231622098225260e+00 1.43496307824634099e+00 1.15804970989280774e+00 5.93471566641063593e-01 -1.23961210879576206e-01 -7.61501869663851612e-01 -1.02955284204860540e+00 -7.28690306597605301e-01 2.32943443177619842e-02 6.81099399637766195e-01 6.05057989698893887e-01 -1.73706387195738574e-01 -7.13353384011182205e-01 -4.11045457181040372e-01 \n-7.00296962286729535e-01 -1.07642571325353391e+00 -1.05050710804973275e+00 -6.88727970162894254e-01 -6.68680630869581174e-02 6.51920550958347959e-01 1.20129917052227084e+00 1.27269309852012546e+00 6.95163167615169372e-01 -3.07968906666619093e-01 -1.03005738358719351e+00 -7.39339534802574062e-01 3.83919555683565572e-01 1.05782487121049863e+00 5.77686571894314871e-01 \n2.03840091318300034e-01 2.47880426439478663e-01 7.85056058307852717e-02 -2.45655816455883636e-01 -6.03914830086294349e-01 -8.19819456204549262e-01 -7.31035941948794696e-01 -3.13803409797581054e-01 2.13942494177526002e-01 4.69221622684183133e-01 2.46701600725349541e-01 -1.57708741902539623e-01 -2.25682577176439335e-01 2.22897258708461929e-02 9.70037063051743954e-02 \n3.77863464636949944e-03 8.11656331188729619e-02 2.71168493673731489e-01 5.40057807333800250e-01 7.92888731433225294e-01 8.96104286766358282e-01 7.35014266305675676e-01 3.02687624856364631e-01 -2.28791246767599457e-01 -5.50871585634004808e-01 -4.36637679826821898e-01 -1.36949255256850752e-03 3.36217747975166721e-01 3.07387336668989156e-01 9.97037337134187187e-02 \n-4.88381290264745122e-01 -8.55263100541327846e-01 -1.09017650322099010e+00 -1.16370733606205125e+00 -9.58765968884858624e-01 -3.85221331950977596e-01 4.76015080366123130e-01 1.24630048045189921e+00 1.32726101343004599e+00 3.83251166791482821e-01 -9.72254952598435570e-01 -1.26909553040060695e+00 1.04050745599906393e-01 1.41046285010111864e+00 9.12823401523344864e-01 \n4.28790881381931061e-01 6.97649259571329216e-01 7.62945173510308081e-01 6.09807109362853373e-01 1.95302300142624467e-01 -4.48812316393030324e-01 -1.12240109526635937e+00 -1.43301457842247328e+00 -9.75442941968921702e-01 2.28065269233839140e-01 1.33785654302109664e+00 1.12837839386651175e+00 -4.67143528351511622e-01 -1.58441212272694122e+00 -9.10691418498506620e-01 \n1.76442501239785180e-01 3.27811038955535754e-01 4.64626884898355898e-01 5.73636456839722071e-01 5.82673673291305319e-01 3.97045798703598364e-01 -1.96526927339881626e-02 -5.25234422189121480e-01 -7.57394627495727689e-01 -3.73365911887072714e-01 4.32232758093974446e-01 7.63563324558500924e-01 3.45810489384207204e-02 -8.09016216615191773e-01 -5.63232836062267939e-01 \n-2.02419921621797012e-01 -3.43345952349429257e-01 -4.11695921320079595e-01 -3.96825550431970473e-01 -2.57429812730019640e-01 3.01582932837787039e-02 4.08905942881252423e-01 6.88988330538045086e-01 5.99296692103408385e-01 3.27424873309610835e-02 -6.36179721909335071e-01 -6.61624358955763467e-01 1.67235131216259123e-01 8.50890882392299951e-01 5.19128130230411094e-01 \n-2.99671353792239542e-02 -5.76936230923600430e-02 -8.66981299453518589e-02 -1.15033938376247087e-01 -1.27877565288710776e-01 -1.01822959138535413e-01 -2.03402682265661974e-02 9.59410371858677850e-02 1.67961781723867483e-01 1.01720010094014565e-01 -8.24374083498197939e-02 -1.78501239313249085e-01 -2.02363183519708095e-02 1.86234657163974799e-01 1.35439166940044020e-01 \n4.42840891560941059e-02 7.64689843687150975e-02 9.51814912133204092e-02 9.80435620800453257e-02 7.41421066166031035e-02 1.38864283277649793e-02 -7.56851390684210142e-02 -1.54009602530103123e-01 -1.51653535531044454e-01 -2.70003667351246938e-02 1.43112769719391249e-01 1.68213119858992069e-01 -2.93987639579376694e-02 -2.08650384230133974e-01 -1.31923284072269166e-01 \n2.76535629754674954e-03 5.45880200895149721e-03 8.52510615577641635e-03 1.18216155950248699e-02 1.38404850707203556e-02 1.19429994506785277e-02 3.81151754658892524e-03 -9.11737972197801003e-03 -1.84535390099653224e-02 -1.26229169533813670e-02 8.06769692121087081e-03 2.05154137555757519e-02 3.28325089918676052e-03 -2.12890543678493707e-02 -1.59815272125223737e-02 \n-5.71635945915463708e-03 -9.96496705520002403e-03 -1.26465484598636954e-02 -1.34642637543332798e-02 -1.08940959523107501e-02 -3.37727761102200173e-03 8.64074588666108308e-03 2.01134143357850323e-02 2.13340510955810075e-02 5.28559571560636834e-03 -1.88145713532042854e-02 -2.39670505265425624e-02 3.07662950219150015e-03 2.92000650230610161e-02 1.89092922765872436e-02 \n0.00000000000000000e+00 1.61043281091681163e+00 0.00000000000000000e+00 1.63945257398443241e+00 0.00000000000000000e+00 4.47671070544087698e-01 0.00000000000000000e+00 -7.43178863021777316e-01 0.00000000000000000e+00 1.77970689600774851e-01 0.00000000000000000e+00 -6.92070345287001112e-03 0.00000000000000000e+00 -3.22900772430043178e-03 0.00000000000000000e+00 \n-1.68648975575175079e+00 0.00000000000000000e+00 3.26003692829052976e+00 0.00000000000000000e+00 2.25322659825200949e+00 0.00000000000000000e+00 -1.32189345198803997e-01 0.00000000000000000e+00 -8.34747409647474881e-01 0.00000000000000000e+00 3.30128811638772172e-01 0.00000000000000000e+00 -5.63622296587984460e-02 0.00000000000000000e+00 5.04052661187315628e-03 \n0.00000000000000000e+00 -3.50110097845869649e+00 0.00000000000000000e+00 4.64098411147093086e+00 0.00000000000000000e+00 2.00749084087802757e+00 0.00000000000000000e+00 -1.24193345477605279e+00 0.00000000000000000e+00 -8.03241216431713242e-02 0.00000000000000000e+00 1.35505376463314665e-01 0.00000000000000000e+00 -3.28811293446110615e-02 0.00000000000000000e+00 \n-1.72193278109472522e+00 0.00000000000000000e+00 -4.86716651924115405e+00 0.00000000000000000e+00 6.00741921992944182e+00 0.00000000000000000e+00 1.54417392323274242e+00 0.00000000000000000e+00 -2.22180222339260643e+00 0.00000000000000000e+00 7.00158727440215745e-01 0.00000000000000000e+00 -1.08270492201865157e-01 0.00000000000000000e+00 9.16546860274405931e-03 \n0.00000000000000000e+00 -2.69894824975997817e+00 0.00000000000000000e+00 -6.34974396439835676e+00 0.00000000000000000e+00 6.65541636033155202e+00 0.00000000000000000e+00 6.75858245250235550e-01 0.00000000000000000e+00 -1.76455113935612044e+00 0.00000000000000000e+00 6.26424732410253655e-01 0.00000000000000000e+00 -1.13101345750050352e-01 0.00000000000000000e+00 \n-4.07680182636600068e-01 0.00000000000000000e+00 -1.78646776658779962e+00 0.00000000000000000e+00 -6.04311932227504827e+00 0.00000000000000000e+00 7.61054366892168269e+00 0.00000000000000000e+00 -3.18971260604166098e+00 0.00000000000000000e+00 6.83648239400912535e-01 0.00000000000000000e+00 -8.52556618832316124e-02 0.00000000000000000e+00 6.29142992018511796e-03 \n0.00000000000000000e+00 -1.36152117474737801e-01 0.00000000000000000e+00 -1.66216858058033236e+00 0.00000000000000000e+00 -7.00523602427186576e+00 0.00000000000000000e+00 8.47388479235304900e+00 0.00000000000000000e+00 -3.76455785500555581e+00 0.00000000000000000e+00 9.05293252077738815e-01 0.00000000000000000e+00 -1.35496600671130292e-01 0.00000000000000000e+00 \n9.76762580529490245e-01 0.00000000000000000e+00 2.03531919400516712e+00 0.00000000000000000e+00 9.07532687336138794e-01 0.00000000000000000e+00 -7.38547320028094346e+00 0.00000000000000000e+00 4.74874474362855551e+00 0.00000000000000000e+00 -1.30826479967349709e+00 0.00000000000000000e+00 1.93680725369304456e-01 0.00000000000000000e+00 -1.61273404826977458e-02 \n0.00000000000000000e+00 1.57545185036031903e+00 0.00000000000000000e+00 2.81121064734167872e+00 0.00000000000000000e+00 2.22029337371649423e+00 0.00000000000000000e+00 -7.37671738364309445e+00 0.00000000000000000e+00 4.35275778303258083e+00 0.00000000000000000e+00 -1.22321355835997311e+00 0.00000000000000000e+00 2.01831883157062349e-01 0.00000000000000000e+00 \n-3.52885002479570361e-01 0.00000000000000000e+00 -5.85276114192755788e-01 0.00000000000000000e+00 2.90691205123859739e-01 0.00000000000000000e+00 2.59348868457352316e+00 0.00000000000000000e+00 -1.92749329892981087e+00 0.00000000000000000e+00 5.65749725597008613e-01 0.00000000000000000e+00 -8.69030033188830205e-02 0.00000000000000000e+00 7.40725842652736409e-03 \n0.00000000000000000e+00 -7.15714450153390928e-01 0.00000000000000000e+00 -1.04499825552631026e+00 0.00000000000000000e+00 -2.78124741453325541e-01 0.00000000000000000e+00 2.63099144787939132e+00 0.00000000000000000e+00 -1.72421114495737579e+00 0.00000000000000000e+00 5.08427253974821742e-01 0.00000000000000000e+00 -8.62415333128942877e-02 0.00000000000000000e+00 \n5.99342707584479084e-02 0.00000000000000000e+00 8.37131158009957334e-02 0.00000000000000000e+00 -1.08781118098592473e-01 0.00000000000000000e+00 -4.61950909125627771e-01 0.00000000000000000e+00 3.71646841909081342e-01 0.00000000000000000e+00 -1.12703492550342217e-01 0.00000000000000000e+00 1.76413330846294684e-02 0.00000000000000000e+00 -1.52175839246706957e-03 \n0.00000000000000000e+00 1.53871200803629636e-01 0.00000000000000000e+00 2.03066101226503516e-01 0.00000000000000000e+00 2.18825401402005702e-03 0.00000000000000000e+00 -5.20725262635192021e-01 0.00000000000000000e+00 3.61133271762821161e-01 0.00000000000000000e+00 -1.09177997606041667e-01 0.00000000000000000e+00 1.87846724406643399e-02 0.00000000000000000e+00 \n-5.53071259509349908e-03 0.00000000000000000e+00 -6.68511118776187794e-03 0.00000000000000000e+00 1.39204197654790155e-02 0.00000000000000000e+00 4.50640684419614421e-02 0.00000000000000000e+00 -3.80728648283981568e-02 0.00000000000000000e+00 1.17755132472094214e-02 0.00000000000000000e+00 -1.86439605790850888e-03 0.00000000000000000e+00 1.62004202334126524e-04 \n0.00000000000000000e+00 -1.96741659599310711e-02 0.00000000000000000e+00 -2.44979980822778263e-02 0.00000000000000000e+00 3.37307623411605499e-03 0.00000000000000000e+00 6.43474764617632366e-02 0.00000000000000000e+00 -4.61055284226656359e-02 0.00000000000000000e+00 1.41376263443511687e-02 0.00000000000000000e+00 -2.45228691740310371e-03 0.00000000000000000e+00 \n5.03849359029895126e-01 -8.18550976291110623e-01 9.17073100802980058e-01 -8.41534397270193198e-01 6.07546550696272156e-01 -2.57786061892446837e-01 -1.14385397789872290e-01 3.67253374130913119e-01 -3.66556194482933164e-01 1.01451395685375574e-01 2.19219873114684556e-01 -2.70300858710692397e-01 -2.24934873465780565e-02 2.76427309917004880e-01 -1.73563983691440260e-01 \n8.43244877875875393e-01 -1.36817832799681244e+00 1.52751142835548373e+00 -1.38939058626124461e+00 9.77438673482248971e-01 -3.62742618224802528e-01 -2.91592542527600422e-01 7.29195427449937081e-01 -6.98073014195496838e-01 1.70707157687253061e-01 4.56462416063390126e-01 -5.45317818842743409e-01 -5.62286842104979912e-02 5.75368665757856567e-01 -3.60433902964482806e-01 \n9.41846082006829197e-01 -1.51210004466167483e+00 1.64757664187480674e+00 -1.42726400515249512e+00 8.93777376397268922e-01 -1.56429698861093564e-01 -5.66717392794473621e-01 9.68304641420706002e-01 -7.89271908438860149e-01 7.50743479189172677e-02 6.44133600607791381e-01 -6.44573289519038849e-01 -1.41361203944282489e-01 7.39493250959077935e-01 -4.40609818934869534e-01 \n8.60966390547362612e-01 -1.36231622098225260e+00 1.43496307824634099e+00 -1.15804970989280774e+00 5.93471566641063593e-01 1.23961210879576206e-01 -7.61501869663851612e-01 1.02955284204860540e+00 -7.28690306597605301e-01 -2.32943443177619842e-02 6.81099399637766195e-01 -6.05057989698893887e-01 -1.73706387195738574e-01 7.13353384011182205e-01 -4.11045457181040372e-01 \n7.00296962286729535e-01 -1.07642571325353391e+00 1.05050710804973275e+00 -6.88727970162894254e-01 6.68680630869581174e-02 6.51920550958347959e-01 -1.20129917052227084e+00 1.27269309852012546e+00 -6.95163167615169372e-01 -3.07968906666619093e-01 1.03005738358719351e+00 -7.39339534802574062e-01 -3.83919555683565572e-01 1.05782487121049863e+00 -5.77686571894314871e-01 \n2.03840091318300034e-01 -2.47880426439478663e-01 7.85056058307852717e-02 2.45655816455883636e-01 -6.03914830086294349e-01 8.19819456204549262e-01 -7.31035941948794696e-01 3.13803409797581054e-01 2.13942494177526002e-01 -4.69221622684183133e-01 2.46701600725349541e-01 1.57708741902539623e-01 -2.25682577176439335e-01 -2.22897258708461929e-02 9.70037063051743954e-02 \n-3.77863464636949944e-03 8.11656331188729619e-02 -2.71168493673731489e-01 5.40057807333800250e-01 -7.92888731433225294e-01 8.96104286766358282e-01 -7.35014266305675676e-01 3.02687624856364631e-01 2.28791246767599457e-01 -5.50871585634004808e-01 4.36637679826821898e-01 -1.36949255256850752e-03 -3.36217747975166721e-01 3.07387336668989156e-01 -9.97037337134187187e-02 \n-4.88381290264745122e-01 8.55263100541327846e-01 -1.09017650322099010e+00 1.16370733606205125e+00 -9.58765968884858624e-01 3.85221331950977596e-01 4.76015080366123130e-01 -1.24630048045189921e+00 1.32726101343004599e+00 -3.83251166791482821e-01 -9.72254952598435570e-01 1.26909553040060695e+00 1.04050745599906393e-01 -1.41046285010111864e+00 9.12823401523344864e-01 \n-4.28790881381931061e-01 6.97649259571329216e-01 -7.62945173510308081e-01 6.09807109362853373e-01 -1.95302300142624467e-01 -4.48812316393030324e-01 1.12240109526635937e+00 -1.43301457842247328e+00 9.75442941968921702e-01 2.28065269233839140e-01 -1.33785654302109664e+00 1.12837839386651175e+00 4.67143528351511622e-01 -1.58441212272694122e+00 9.10691418498506620e-01 \n1.76442501239785180e-01 -3.27811038955535754e-01 4.64626884898355898e-01 -5.73636456839722071e-01 5.82673673291305319e-01 -3.97045798703598364e-01 -1.96526927339881626e-02 5.25234422189121480e-01 -7.57394627495727689e-01 3.73365911887072714e-01 4.32232758093974446e-01 -7.63563324558500924e-01 3.45810489384207204e-02 8.09016216615191773e-01 -5.63232836062267939e-01 \n2.02419921621797012e-01 -3.43345952349429257e-01 4.11695921320079595e-01 -3.96825550431970473e-01 2.57429812730019640e-01 3.01582932837787039e-02 -4.08905942881252423e-01 6.88988330538045086e-01 -5.99296692103408385e-01 3.27424873309610835e-02 6.36179721909335071e-01 -6.61624358955763467e-01 -1.67235131216259123e-01 8.50890882392299951e-01 -5.19128130230411094e-01 \n-2.99671353792239542e-02 5.76936230923600430e-02 -8.66981299453518589e-02 1.15033938376247087e-01 -1.27877565288710776e-01 1.01822959138535413e-01 -2.03402682265661974e-02 -9.59410371858677850e-02 1.67961781723867483e-01 -1.01720010094014565e-01 -8.24374083498197939e-02 1.78501239313249085e-01 -2.02363183519708095e-02 -1.86234657163974799e-01 1.35439166940044020e-01 \n-4.42840891560941059e-02 7.64689843687150975e-02 -9.51814912133204092e-02 9.80435620800453257e-02 -7.41421066166031035e-02 1.38864283277649793e-02 7.56851390684210142e-02 -1.54009602530103123e-01 1.51653535531044454e-01 -2.70003667351246938e-02 -1.43112769719391249e-01 1.68213119858992069e-01 2.93987639579376694e-02 -2.08650384230133974e-01 1.31923284072269166e-01 \n2.76535629754674954e-03 -5.45880200895149721e-03 8.52510615577641635e-03 -1.18216155950248699e-02 1.38404850707203556e-02 -1.19429994506785277e-02 3.81151754658892524e-03 9.11737972197801003e-03 -1.84535390099653224e-02 1.26229169533813670e-02 8.06769692121087081e-03 -2.05154137555757519e-02 3.28325089918676052e-03 2.12890543678493707e-02 -1.59815272125223737e-02 \n5.71635945915463708e-03 -9.96496705520002403e-03 1.26465484598636954e-02 -1.34642637543332798e-02 1.08940959523107501e-02 -3.37727761102200173e-03 -8.64074588666108308e-03 2.01134143357850323e-02 -2.13340510955810075e-02 5.28559571560636834e-03 1.88145713532042854e-02 -2.39670505265425624e-02 -3.07662950219150015e-03 2.92000650230610161e-02 -1.89092922765872436e-02 \n16\n-5.17801265252916300e-01 -8.48984129979990433e-01 -9.71734166222728314e-01 -9.29939395221298039e-01 -7.32855290767507340e-01 -4.05950247338581334e-01 -1.48835001291873998e-02 3.23747475920283958e-01 4.65533159598986691e-01 3.17523595821178841e-01 -4.53054335388470509e-02 -3.38036598291058677e-01 -2.60037433155427806e-01 1.27359565225124214e-01 3.54335922517243047e-01 1.87902067332474876e-01 \n8.08137943392022983e-01 1.31724489982948133e+00 1.48924372251097942e+00 1.39664174340813714e+00 1.06548739721289010e+00 5.52720957339097995e-01 -2.44065319356701551e-02 -4.86629402960282462e-01 -6.42932284653544338e-01 -4.06076870992406421e-01 7.65859523546478812e-02 4.24234517482466631e-01 3.03548468664931078e-01 -1.56435071207668088e-01 -4.02450912640910891e-01 -2.07163467633897799e-01 \n-9.71480237135351802e-01 -1.57831571119739901e+00 -1.76977750880087979e+00 -1.62919529806435043e+00 -1.18502867532183302e+00 -5.06937630173685978e-01 2.52387086419478386e-01 8.47636929492163150e-01 1.00278996462872394e+00 5.78117111856583433e-01 -2.12883302778597485e-01 -7.65492012503169079e-01 -5.15534984336068785e-01 3.26236261302854119e-01 7.71863912866664833e-01 3.96253230622288861e-01 \n8.22177672873453192e-01 1.30359786586264616e+00 1.38323152145781516e+00 1.14430482314173757e+00 6.53111461078668553e-01 3.52808161790333822e-02 -5.14906358275885501e-01 -7.80247785215843427e-01 -6.31335675340363824e-01 -1.57455613496739236e-01 3.10766245168735185e-01 4.13946036606879018e-01 1.14229277546693252e-01 -2.23599863872749976e-01 -2.60587699205633182e-01 -9.40425147793441348e-02 \n-7.24808848949392517e-01 -1.13591722905925599e+00 -1.16986977280477920e+00 -8.98192121979485579e-01 -3.82987681378563940e-01 2.54701864656971955e-01 8.22202635038002318e-01 1.08835612387400235e+00 8.81898911142810440e-01 2.40448555945071096e-01 -4.88391136855100170e-01 -7.71702938144283641e-01 -3.30130116980707488e-01 4.29144448748324021e-01 6.99225467917771362e-01 3.22514502685693624e-01 \n2.18645050963077443e-01 2.62962719226338568e-01 6.99145918539208816e-02 -3.05592159769269001e-01 -7.39320283819599604e-01 -1.03190883275538203e+00 -9.69864331110338945e-01 -4.63918668189703331e-01 2.85924974348716023e-01 7.73298628637230887e-01 5.32113475472280026e-01 -2.56093383394494762e-01 -6.55963639152699104e-01 -8.06814154399366793e-02 6.15686869210839697e-01 4.25990361294281042e-01 \n2.42322905227278003e-02 1.18324176851104131e-01 3.22414626088289533e-01 6.02584442925335702e-01 8.57653572101161936e-01 9.43567460846944967e-01 7.36130085317177920e-01 2.33138399909536230e-01 -3.56554561337958006e-01 -6.56135197998113619e-01 -3.98256098339585251e-01 2.00664372446198317e-01 4.73565430264076740e-01 7.71263571543630629e-02 -3.83715266788058111e-01 -2.66646087254563737e-01 \n-3.88691800964008898e-01 -7.14161626026058608e-01 -9.95114447447747828e-01 -1.21543115495630552e+00 -1.26215206730704889e+00 -9.95395131382794368e-01 -3.48525724815025477e-01 5.35504868706823749e-01 1.22431384133618968e+00 1.15715138421956494e+00 1.61212809312245931e-01 -1.01179628435314433e+00 -1.04907191665961008e+00 2.84971628324761535e-01 1.29159979349464821e+00 7.47281540971577442e-01 \n4.91416262258997303e-01 8.39180328302413781e-01 1.02733968823041298e+00 1.05067538261596080e+00 8.35518354272223796e-01 3.26653456689543479e-01 -4.20058760168773044e-01 -1.15070896441835814e+00 -1.42714290723945956e+00 -8.70293431507571179e-01 3.74151918902030542e-01 1.35567658081573266e+00 9.52357957720454741e-01 -6.26004395555873494e-01 -1.52239947604810534e+00 -7.97690041864509488e-01 \n1.08194736834447163e-01 2.35705114399729955e-01 4.16882651176856490e-01 6.48799923207890493e-01 8.58745677266697447e-01 9.05963796807707403e-01 6.31010451031281176e-01 -7.20885955141357627e-03 -7.52724100802095318e-01 -1.04013491886634447e+00 -4.23502620505369129e-01 6.88043837646673554e-01 1.00026115721605974e+00 -9.12098619389713322e-02 -1.13263394798445587e+00 -7.13508433048387331e-01 \n-2.56171788568437501e-01 -4.59432550742671673e-01 -6.17733152821441844e-01 -7.26673289785881353e-01 -7.20767103056822738e-01 -5.12380384132608624e-01 -5.74044359395757670e-02 5.42795127780904840e-01 9.72753735907175625e-01 8.19581406247687138e-01 -2.23000433230927095e-02 -9.25834660780605550e-01 -8.42854581165456282e-01 3.46984208246017847e-01 1.17671238647907740e+00 6.59893291384342940e-01 \n-1.16800632114682306e-02 -3.40730455884096735e-02 -7.79838277381602059e-02 -1.44495324045070598e-01 -2.17802315115911377e-01 -2.59307919987170348e-01 -2.14424935619297492e-01 -4.98427953531065132e-02 1.81722305573917639e-01 3.10764831878823568e-01 1.63905398898978415e-01 -1.80071011142479202e-01 -3.15500090937062882e-01 4.77347362283603591e-03 3.48245603891895156e-01 2.28921608194193341e-01 \n6.27018975994262873e-02 1.15329330354708470e-01 1.62223849817065148e-01 2.02789730594506004e-01 2.18193120610946717e-01 1.78756194351976668e-01 6.07981628924997384e-02 -1.20100067986583324e-01 -2.76502221051380922e-01 -2.68995605893143563e-01 -3.06705424745299354e-02 2.68362980701574664e-01 2.78340989468179544e-01 -8.74939761391950095e-02 -3.69863485958231867e-01 -2.14981196245853439e-01 \n3.01187772058835408e-04 2.47013479722581997e-03 8.09704409202881637e-03 1.74912887793509568e-02 2.88532284493865276e-02 3.69739417718951947e-02 3.34957149867006322e-02 1.17598404954416041e-02 -2.29399988356513042e-02 -4.60360205565808960e-02 -2.80345114191844236e-02 2.42935469551342359e-02 4.89810984549855479e-02 1.68252910187195165e-03 -5.34617259441445960e-02 -3.62233666456447669e-02 \n-9.24949010462634152e-03 -1.72860342448986457e-02 -2.49883250201446210e-02 -3.23478566551063235e-02 -3.63733796619736052e-02 -3.19234150107318807e-02 -1.41387364591812060e-02 1.59261050397014444e-02 4.46993927759816687e-02 4.75067201616949368e-02 9.19528846391479536e-03 -4.41724947018621431e-02 -4.99304041511873567e-02 1.28604162578495473e-02 6.46886231707573268e-02 3.85255375032377836e-02 \n3.67971527875196449e-05 -8.09955754865833907e-05 -4.74452651236340217e-04 -1.17362442811469064e-03 -2.06513793240761733e-03 -2.77578779574717079e-03 -2.65756542853376965e-03 -1.11927281076474315e-03 1.56614882217142729e-03 3.55389572135710297e-03 2.37264588650391063e-03 -1.74651453044442843e-03 -3.92678474125096248e-03 -2.71658958224526740e-04 4.26474666601363811e-03 2.95545138039475512e-03 \n0.00000000000000000e+00 1.57463747653173497e+00 0.00000000000000000e+00 1.68780621800516134e+00 0.00000000000000000e+00 7.12366208174780749e-01 0.00000000000000000e+00 -4.58056777278520488e-01 0.00000000000000000e+00 -2.50939774845773068e-01 0.00000000000000000e+00 1.83208292645572318e-01 0.00000000000000000e+00 -4.72160664289624925e-02 0.00000000000000000e+00 6.84578874790074248e-03 \n-1.61627588678404597e+00 0.00000000000000000e+00 3.48953296760054362e+00 0.00000000000000000e+00 2.69287163602850823e+00 0.00000000000000000e+00 1.55349475155043191e-01 0.00000000000000000e+00 -1.54140996633908538e+00 0.00000000000000000e+00 6.73416772288610969e-01 0.00000000000000000e+00 -1.35073836473255253e-01 0.00000000000000000e+00 1.50986067874075886e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -3.57398109467516400e+00 0.00000000000000000e+00 4.77200985546097323e+00 0.00000000000000000e+00 2.64098266680576218e+00 0.00000000000000000e+00 -5.86492675633762674e-01 0.00000000000000000e+00 -1.09908796172245018e+00 0.00000000000000000e+00 5.93415752883109373e-01 0.00000000000000000e+00 -1.40036504646254796e-01 0.00000000000000000e+00 1.94651024469966393e-02 \n-1.64435534574690638e+00 0.00000000000000000e+00 -4.63255373789690978e+00 0.00000000000000000e+00 6.41705673841037695e+00 0.00000000000000000e+00 1.76811252472648576e+00 0.00000000000000000e+00 -2.88509339509678036e+00 0.00000000000000000e+00 1.03821394575311298e+00 0.00000000000000000e+00 -1.88714500494781602e-01 0.00000000000000000e+00 1.98502284654591047e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.74978855050494285e+00 0.00000000000000000e+00 -6.15646804034833805e+00 0.00000000000000000e+00 7.39302802042924448e+00 0.00000000000000000e+00 1.36719612911141439e+00 0.00000000000000000e+00 -2.93017543692211867e+00 0.00000000000000000e+00 1.16739158651804139e+00 0.00000000000000000e+00 -2.42957901765660451e-01 0.00000000000000000e+00 3.15651221585327992e-02 \n-4.37290101926154886e-01 0.00000000000000000e+00 -1.93289061752790130e+00 0.00000000000000000e+00 -6.42825602375515668e+00 0.00000000000000000e+00 7.24276030936787217e+00 0.00000000000000000e+00 -2.58014581621218849e+00 0.00000000000000000e+00 4.27894032197520570e-01 0.00000000000000000e+00 -3.39372565912956061e-02 0.00000000000000000e+00 7.26836773349574366e-04 0.00000000000000000e+00 \n0.00000000000000000e+00 -6.87621202256709097e-02 0.00000000000000000e+00 -1.59908118590836326e+00 0.00000000000000000e+00 -7.05690676012740028e+00 0.00000000000000000e+00 8.28925895714111769e+00 0.00000000000000000e+00 -3.64148225483193035e+00 0.00000000000000000e+00 8.80182837659899393e-01 0.00000000000000000e+00 -1.35343754186249758e-01 0.00000000000000000e+00 1.43247223063924340e-02 \n7.77383601928017796e-01 0.00000000000000000e+00 1.35618002952626453e+00 0.00000000000000000e+00 -4.52360574464216874e-01 0.00000000000000000e+00 -8.34039674593194606e+00 0.00000000000000000e+00 6.94040310447223118e+00 0.00000000000000000e+00 -2.35531246230290111e+00 0.00000000000000000e+00 4.31279278843486724e-01 0.00000000000000000e+00 -4.62609499981784363e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 1.72627107898787434e+00 0.00000000000000000e+00 2.50506563776616069e+00 0.00000000000000000e+00 8.05121859207423243e-01 0.00000000000000000e+00 -8.82011513121825995e+00 0.00000000000000000e+00 6.63388033725341497e+00 0.00000000000000000e+00 -2.25853578379924580e+00 0.00000000000000000e+00 4.46574494965195706e-01 0.00000000000000000e+00 -5.68808555516098273e-02 \n-2.16389473668894326e-01 0.00000000000000000e+00 -8.54068080437316770e-02 0.00000000000000000e+00 1.36310645708260846e+00 0.00000000000000000e+00 3.42333254075387021e+00 0.00000000000000000e+00 -3.65594330574936074e+00 0.00000000000000000e+00 1.36715427175434245e+00 0.00000000000000000e+00 -2.64519663362032307e-01 0.00000000000000000e+00 2.93856737499891246e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -8.55945111579960102e-01 0.00000000000000000e+00 -8.78940277717853632e-01 0.00000000000000000e+00 6.94646990227020836e-01 0.00000000000000000e+00 3.70410772434415761e+00 0.00000000000000000e+00 -3.32219736654472642e+00 0.00000000000000000e+00 1.21708552907748623e+00 0.00000000000000000e+00 -2.50842089500272456e-01 0.00000000000000000e+00 3.27694997952219613e-02 \n2.33601264229364612e-02 0.00000000000000000e+00 -5.84807131295370542e-02 0.00000000000000000e+00 -4.29809663968237489e-01 0.00000000000000000e+00 -7.26760284094272019e-01 0.00000000000000000e+00 8.90953658853543770e-01 0.00000000000000000e+00 -3.48989997577311659e-01 0.00000000000000000e+00 6.92679563912217291e-02 0.00000000000000000e+00 -7.81970906971119546e-03 0.00000000000000000e+00 \n0.00000000000000000e+00 2.03752828783332458e-01 0.00000000000000000e+00 1.62549390104372872e-01 0.00000000000000000e+00 -2.90511090143540532e-01 0.00000000000000000e+00 -8.61414353864593174e-01 0.00000000000000000e+00 8.49667051864004239e-01 0.00000000000000000e+00 -3.22670835194373920e-01 0.00000000000000000e+00 6.78390028067596627e-02 0.00000000000000000e+00 -8.96999944908769310e-03 \n-6.02375544117670816e-04 0.00000000000000000e+00 1.39913595583312958e-02 0.00000000000000000e+00 6.34104036170421979e-02 0.00000000000000000e+00 8.87120306439928378e-02 0.00000000000000000e+00 -1.18749953005937871e-01 0.00000000000000000e+00 4.78165245401238511e-02 0.00000000000000000e+00 -9.63555271322339775e-03 0.00000000000000000e+00 1.09825536124466586e-03 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.95102787314762852e-02 0.00000000000000000e+00 -1.91062018173901479e-02 0.00000000000000000e+00 5.36808620174722702e-02 0.00000000000000000e+00 1.25972594721661600e-01 0.00000000000000000e+00 -1.31577075728652096e-01 0.00000000000000000e+00 5.10166414363798983e-02 0.00000000000000000e+00 -1.08496373573506557e-02 0.00000000000000000e+00 1.44465771944145934e-03 \n-7.35943055750392897e-05 0.00000000000000000e+00 -1.29324397756748985e-03 0.00000000000000000e+00 -4.84953109425799151e-03 0.00000000000000000e+00 -6.09522836874661252e-03 0.00000000000000000e+00 8.64295183772212965e-03 0.00000000000000000e+00 -3.54132039812584337e-03 0.00000000000000000e+00 7.20490934964307280e-04 0.00000000000000000e+00 -8.26252512357207802e-05 0.00000000000000000e+00 \n5.17801265252916300e-01 -8.48984129979990433e-01 9.71734166222728314e-01 -9.29939395221298039e-01 7.32855290767507340e-01 -4.05950247338581334e-01 1.48835001291873998e-02 3.23747475920283958e-01 -4.65533159598986691e-01 3.17523595821178841e-01 4.53054335388470509e-02 -3.38036598291058677e-01 2.60037433155427806e-01 1.27359565225124214e-01 -3.54335922517243047e-01 1.87902067332474876e-01 \n8.08137943392022983e-01 -1.31724489982948133e+00 1.48924372251097942e+00 -1.39664174340813714e+00 1.06548739721289010e+00 -5.52720957339097995e-01 -2.44065319356701551e-02 4.86629402960282462e-01 -6.42932284653544338e-01 4.06076870992406421e-01 7.65859523546478812e-02 -4.24234517482466631e-01 3.03548468664931078e-01 1.56435071207668088e-01 -4.02450912640910891e-01 2.07163467633897799e-01 \n9.71480237135351802e-01 -1.57831571119739901e+00 1.76977750880087979e+00 -1.62919529806435043e+00 1.18502867532183302e+00 -5.06937630173685978e-01 -2.52387086419478386e-01 8.47636929492163150e-01 -1.00278996462872394e+00 5.78117111856583433e-01 2.12883302778597485e-01 -7.65492012503169079e-01 5.15534984336068785e-01 3.26236261302854119e-01 -7.71863912866664833e-01 3.96253230622288861e-01 \n8.22177672873453192e-01 -1.30359786586264616e+00 1.38323152145781516e+00 -1.14430482314173757e+00 6.53111461078668553e-01 -3.52808161790333822e-02 -5.14906358275885501e-01 7.80247785215843427e-01 -6.31335675340363824e-01 1.57455613496739236e-01 3.10766245168735185e-01 -4.13946036606879018e-01 1.14229277546693252e-01 2.23599863872749976e-01 -2.60587699205633182e-01 9.40425147793441348e-02 \n7.24808848949392517e-01 -1.13591722905925599e+00 1.16986977280477920e+00 -8.98192121979485579e-01 3.82987681378563940e-01 2.54701864656971955e-01 -8.22202635038002318e-01 1.08835612387400235e+00 -8.81898911142810440e-01 2.40448555945071096e-01 4.88391136855100170e-01 -7.71702938144283641e-01 3.30130116980707488e-01 4.29144448748324021e-01 -6.99225467917771362e-01 3.22514502685693624e-01 \n2.18645050963077443e-01 -2.62962719226338568e-01 6.99145918539208816e-02 3.05592159769269001e-01 -7.39320283819599604e-01 1.03190883275538203e+00 -9.69864331110338945e-01 4.63918668189703331e-01 2.85924974348716023e-01 -7.73298628637230887e-01 5.32113475472280026e-01 2.56093383394494762e-01 -6.55963639152699104e-01 8.06814154399366793e-02 6.15686869210839697e-01 -4.25990361294281042e-01 \n-2.42322905227278003e-02 1.18324176851104131e-01 -3.22414626088289533e-01 6.02584442925335702e-01 -8.57653572101161936e-01 9.43567460846944967e-01 -7.36130085317177920e-01 2.33138399909536230e-01 3.56554561337958006e-01 -6.56135197998113619e-01 3.98256098339585251e-01 2.00664372446198317e-01 -4.73565430264076740e-01 7.71263571543630629e-02 3.83715266788058111e-01 -2.66646087254563737e-01 \n-3.88691800964008898e-01 7.14161626026058608e-01 -9.95114447447747828e-01 1.21543115495630552e+00 -1.26215206730704889e+00 9.95395131382794368e-01 -3.48525724815025477e-01 -5.35504868706823749e-01 1.22431384133618968e+00 -1.15715138421956494e+00 1.61212809312245931e-01 1.01179628435314433e+00 -1.04907191665961008e+00 -2.84971628324761535e-01 1.29159979349464821e+00 -7.47281540971577442e-01 \n-4.91416262258997303e-01 8.39180328302413781e-01 -1.02733968823041298e+00 1.05067538261596080e+00 -8.35518354272223796e-01 3.26653456689543479e-01 4.20058760168773044e-01 -1.15070896441835814e+00 1.42714290723945956e+00 -8.70293431507571179e-01 -3.74151918902030542e-01 1.35567658081573266e+00 -9.52357957720454741e-01 -6.26004395555873494e-01 1.52239947604810534e+00 -7.97690041864509488e-01 \n1.08194736834447163e-01 -2.35705114399729955e-01 4.16882651176856490e-01 -6.48799923207890493e-01 8.58745677266697447e-01 -9.05963796807707403e-01 6.31010451031281176e-01 7.20885955141357627e-03 -7.52724100802095318e-01 1.04013491886634447e+00 -4.23502620505369129e-01 -6.88043837646673554e-01 1.00026115721605974e+00 9.12098619389713322e-02 -1.13263394798445587e+00 7.13508433048387331e-01 \n2.56171788568437501e-01 -4.59432550742671673e-01 6.17733152821441844e-01 -7.26673289785881353e-01 7.20767103056822738e-01 -5.12380384132608624e-01 5.74044359395757670e-02 5.42795127780904840e-01 -9.72753735907175625e-01 8.19581406247687138e-01 2.23000433230927095e-02 -9.25834660780605550e-01 8.42854581165456282e-01 3.46984208246017847e-01 -1.17671238647907740e+00 6.59893291384342940e-01 \n-1.16800632114682306e-02 3.40730455884096735e-02 -7.79838277381602059e-02 1.44495324045070598e-01 -2.17802315115911377e-01 2.59307919987170348e-01 -2.14424935619297492e-01 4.98427953531065132e-02 1.81722305573917639e-01 -3.10764831878823568e-01 1.63905398898978415e-01 1.80071011142479202e-01 -3.15500090937062882e-01 -4.77347362283603591e-03 3.48245603891895156e-01 -2.28921608194193341e-01 \n-6.27018975994262873e-02 1.15329330354708470e-01 -1.62223849817065148e-01 2.02789730594506004e-01 -2.18193120610946717e-01 1.78756194351976668e-01 -6.07981628924997384e-02 -1.20100067986583324e-01 2.76502221051380922e-01 -2.68995605893143563e-01 3.06705424745299354e-02 2.68362980701574664e-01 -2.78340989468179544e-01 -8.74939761391950095e-02 3.69863485958231867e-01 -2.14981196245853439e-01 \n3.01187772058835408e-04 -2.47013479722581997e-03 8.09704409202881637e-03 -1.74912887793509568e-02 2.88532284493865276e-02 -3.69739417718951947e-02 3.34957149867006322e-02 -1.17598404954416041e-02 -2.29399988356513042e-02 4.60360205565808960e-02 -2.80345114191844236e-02 -2.42935469551342359e-02 4.89810984549855479e-02 -1.68252910187195165e-03 -5.34617259441445960e-02 3.62233666456447669e-02 \n9.24949010462634152e-03 -1.72860342448986457e-02 2.49883250201446210e-02 -3.23478566551063235e-02 3.63733796619736052e-02 -3.19234150107318807e-02 1.41387364591812060e-02 1.59261050397014444e-02 -4.46993927759816687e-02 4.75067201616949368e-02 -9.19528846391479536e-03 -4.41724947018621431e-02 4.99304041511873567e-02 1.28604162578495473e-02 -6.46886231707573268e-02 3.85255375032377836e-02 \n3.67971527875196449e-05 8.09955754865833907e-05 -4.74452651236340217e-04 1.17362442811469064e-03 -2.06513793240761733e-03 2.77578779574717079e-03 -2.65756542853376965e-03 1.11927281076474315e-03 1.56614882217142729e-03 -3.55389572135710297e-03 2.37264588650391063e-03 1.74651453044442843e-03 -3.92678474125096248e-03 2.71658958224526740e-04 4.26474666601363811e-03 -2.95545138039475512e-03 \n17\n-5.02483274886948420e-01 -8.27728732297333028e-01 -9.58609731519822421e-01 -9.40991699474509336e-01 -7.85076391281552428e-01 -5.10465269341839033e-01 -1.63945693510848354e-01 1.71480120746513088e-01 3.86044117703472797e-01 3.84736889507994086e-01 1.59633417445092760e-01 -1.50107056549510874e-01 -3.00343120318371546e-01 -1.41986419753070778e-01 1.66460451811041285e-01 2.78775271133158617e-01 1.27053528732864609e-01 \n7.80426893790286186e-01 1.26996812450273115e+00 1.43149628137694401e+00 1.33820658709417279e+00 1.02174814255977835e+00 5.44937013071738994e-01 2.41770181333095617e-02 -3.78854415003608718e-01 -5.12706427576156667e-01 -3.34627063706419321e-01 1.07663779302724102e-02 2.45975836586150198e-01 1.90509140467351903e-01 -3.23442751890280302e-02 -1.36669500107652599e-01 -6.33337282661372111e-02 1.87678792286518165e-03 \n-9.38534560533466016e-01 -1.53146467670988844e+00 -1.73715439300658587e+00 -1.64276982202246058e+00 -1.27928429805188834e+00 -7.05981715625865206e-01 -3.96683299411617853e-02 5.40358546672873677e-01 8.29361192914430663e-01 6.91181666979085566e-01 1.84734757156537185e-01 -3.74571912466204465e-01 -5.59346607617087781e-01 -1.99580295109406840e-01 3.42316711149921502e-01 4.91996768514962662e-01 2.11872763452849727e-01 \n8.26655332224066545e-01 1.30870522966876644e+00 1.38267177871599562e+00 1.13056260658499783e+00 6.18809789211863524e-01 -2.22144829905379262e-02 -5.85597976294264528e-01 -8.34670287544003116e-01 -6.26929739128465847e-01 -7.26875550491840051e-02 4.24241250036460973e-01 4.29812206783640254e-01 -3.27591314074956636e-02 -3.58049909792585794e-01 -1.00576550520439610e-01 2.84344663296413490e-01 2.08641376102988805e-01 \n-6.96342392047581154e-01 -1.09196565447146680e+00 -1.12824866013606226e+00 -8.78764853385624929e-01 -4.09262371386202117e-01 1.61320384088415391e-01 6.56948027064608935e-01 8.84475830554301650e-01 7.24506193438569453e-01 2.42261425265650103e-01 -2.76002892493983066e-01 -4.74185015329258792e-01 -2.38138424614747246e-01 1.36461885543475345e-01 2.51696790884173819e-01 1.06308435907143149e-01 -4.99229788924293427e-04 \n3.27506514916267121e-01 4.41396769359113714e-01 2.68295850709177690e-01 -1.42763538869579334e-01 -6.86500235651264299e-01 -1.17017575930206365e+00 -1.34093926088631368e+00 -9.92672207266324086e-01 -1.51162162108712144e-01 7.69932929466729805e-01 1.08427176725380071e+00 4.03100695896085190e-01 -6.87675081514195728e-01 -8.90761658377487734e-01 1.60557773750822082e-01 1.01024251566448820e+00 5.86131383259131694e-01 \n3.25587495540881261e-03 9.58342492728397734e-02 3.30046360134044166e-01 6.77064851285928021e-01 1.03414045806897574e+00 1.23604353206261510e+00 1.10537560479895866e+00 5.57952134169285749e-01 -2.62707761954233542e-01 -9.29640289815103953e-01 -9.25147052844340084e-01 -1.30081900295662376e-01 7.73125912204713958e-01 7.44695891219325312e-01 -2.73090739947773904e-01 -9.44807563460614093e-01 -5.10291526114164006e-01 \n-2.41111784159006836e-01 -4.68223905703455919e-01 -7.10389213298409676e-01 -9.57673195365785300e-01 -1.12443882241082610e+00 -1.08877681487705997e+00 -7.50520670208969786e-01 -1.20753221674840351e-01 5.93163171657574400e-01 1.00004775920639359e+00 7.43610873483650186e-01 -1.03318563068429930e-01 -8.32572640284905875e-01 -6.24490692558150330e-01 3.65698045783937454e-01 9.07729693798506709e-01 4.61394993686665082e-01 \n4.19614241379720855e-01 7.39430193769906839e-01 9.65340962500346550e-01 1.10127091746549595e+00 1.07788190199693140e+00 8.12515330946516137e-01 2.73085910980190212e-01 -4.42642889689937844e-01 -1.05685363794947048e+00 -1.17974882589173505e+00 -5.72187062980969048e-01 4.87521072500821945e-01 1.13353735174143977e+00 6.06693825478575391e-01 -6.55485052419807655e-01 -1.19356183585160465e+00 -5.65659784431424426e-01 \n-7.19059446566306780e-02 -6.08801971006672034e-02 8.32519171477406556e-02 3.66588650502552424e-01 7.48145779314299092e-01 1.10092195415666646e+00 1.20703124496811203e+00 8.41883485865930097e-01 -2.05917000466651129e-02 -9.80348228487921274e-01 -1.26798984892398465e+00 -3.93938539500995446e-01 9.56708636432489367e-01 1.15404534492028362e+00 -2.77234430882972739e-01 -1.40890109802649350e+00 -8.09701144876553538e-01 \n-1.95653075476199099e-01 -3.81477680184963624e-01 -5.89140020368814676e-01 -8.24097340685893156e-01 -1.02177448154517308e+00 -1.05917993461808986e+00 -7.92884038993884418e-01 -1.59923466176404379e-01 6.74878981948174415e-01 1.24519550860999916e+00 9.96722168445923369e-01 -1.29671586792297970e-01 -1.21299920662247492e+00 -9.53504898614044881e-01 5.73887642429307401e-01 1.46694466433425736e+00 7.60311091739881337e-01 \n5.75184953507274848e-02 7.91404243991931159e-02 4.73216278398571788e-02 -4.27704831697817438e-02 -1.87126946107638915e-01 -3.50655015709046941e-01 -4.52652342025432849e-01 -3.84861622860806381e-01 -9.07831296399505386e-02 3.14227937211040363e-01 5.12653224120147896e-01 2.27192188182392795e-01 -3.40935727181163541e-01 -4.93526494901343135e-01 7.33173212757933055e-02 5.79399205025317601e-01 3.47616382709764364e-01 \n4.22912330437848338e-02 9.06324917895183039e-02 1.58738341789341592e-01 2.49878281171754953e-01 3.44780001331732373e-01 3.98633092394797157e-01 3.47743949928791052e-01 1.43958540416458379e-01 -1.79756839429476551e-01 -4.54239299574151274e-01 -4.29749120291549212e-01 -1.60445407094254329e-02 4.56260325285919281e-01 4.14140699210046524e-01 -1.95740812664319824e-01 -5.95272352395278242e-01 -3.20066526685919684e-01 \n-1.30949580158303173e-02 -1.93041587301636015e-02 -1.56073768393175653e-02 -9.20670772552660044e-04 2.51530684170096847e-02 5.77278140556231910e-02 8.26902217820510047e-02 7.80772324945428554e-02 2.80119072161626455e-02 -5.15114101313574979e-02 -9.95189662943195141e-02 -5.25256696483364134e-02 6.10777451915501777e-02 1.00498397969401732e-01 -9.40552780469201231e-03 -1.15862311068157199e-01 -7.15702351411984981e-02 \n-5.45118813620266959e-03 -1.30288869373923267e-02 -2.56468723490130292e-02 -4.41271008221543169e-02 -6.52326221096621891e-02 -8.03211748022132741e-02 -7.57144960054856494e-02 -3.88821979801200900e-02 2.74526484900098522e-02 9.05769397722495870e-02 9.48255072662743009e-02 1.20734203750871009e-02 -9.35393293499965441e-02 -9.30379588755083067e-02 3.73696698109864115e-02 1.29195893426890858e-01 7.11823186231862128e-02 \n1.48085003759585933e-03 2.24582422649480410e-03 2.00206942257226527e-03 6.29949668550865735e-04 -1.97996687892774961e-03 -5.43696209931937354e-03 -8.37409315663200600e-03 -8.44656649573799435e-03 -3.66045501440455799e-03 4.78135119436472626e-03 1.05477344931602761e-02 6.21156073794590648e-03 -6.10352008744938555e-03 -1.10811989697674481e-02 6.14797106124862998e-04 1.26542503826344756e-02 7.98954548460436320e-03 \n4.72522466363355200e-04 1.27626000843602084e-03 2.78902567299573202e-03 5.12727486952355269e-03 7.93299551418141274e-03 1.01524738047566909e-02 1.00071022361025157e-02 5.70020618299561787e-03 -2.75586928809433283e-03 -1.13837978654430505e-02 -1.27239897900551940e-02 -2.31975291001855836e-03 1.20071740700757019e-02 1.27000832558423289e-02 -4.54678891429836714e-03 -1.72977240170892684e-02 -9.69304562653826411e-03 \n0.00000000000000000e+00 1.63825283150124796e+00 0.00000000000000000e+00 1.85561635773005271e+00 0.00000000000000000e+00 9.88340729998471276e-01 0.00000000000000000e+00 -3.62893822617904588e-01 0.00000000000000000e+00 -6.90880521585876100e-01 0.00000000000000000e+00 4.50555667699751864e-01 0.00000000000000000e+00 -1.25735981629377592e-01 0.00000000000000000e+00 2.06696800155036660e-02 0.00000000000000000e+00 \n-1.56085378758057237e+00 0.00000000000000000e+00 3.61618468350526519e+00 0.00000000000000000e+00 2.82509651079910878e+00 0.00000000000000000e+00 1.17028326945424723e-01 0.00000000000000000e+00 -1.82830791497632283e+00 0.00000000000000000e+00 8.87365845756182366e-01 0.00000000000000000e+00 -2.01862576938362270e-01 0.00000000000000000e+00 2.65843883497697111e-02 0.00000000000000000e+00 -2.10789101053259211e-03 \n0.00000000000000000e+00 -3.43942882059338778e+00 0.00000000000000000e+00 5.11250143889384849e+00 0.00000000000000000e+00 3.18302783571804880e+00 0.00000000000000000e+00 -4.18135636278389798e-01 0.00000000000000000e+00 -1.96754924686329436e+00 0.00000000000000000e+00 1.12994684726471906e+00 0.00000000000000000e+00 -2.99431666893871068e-01 0.00000000000000000e+00 4.78186282686841705e-02 0.00000000000000000e+00 \n-1.65331066444813309e+00 0.00000000000000000e+00 -4.67245952081347333e+00 0.00000000000000000e+00 6.31965287272387656e+00 0.00000000000000000e+00 1.67864930873537489e+00 0.00000000000000000e+00 -2.75884926579323929e+00 0.00000000000000000e+00 1.00177138710613958e+00 0.00000000000000000e+00 -1.87684676235714331e-01 0.00000000000000000e+00 2.11825718178241753e-02 0.00000000000000000e+00 -1.48151499977920239e-03 \n0.00000000000000000e+00 -2.64047030101889319e+00 0.00000000000000000e+00 -5.92474834446829145e+00 0.00000000000000000e+00 7.70372631705655410e+00 0.00000000000000000e+00 1.40139218042867122e+00 0.00000000000000000e+00 -3.44199265516187035e+00 0.00000000000000000e+00 1.51268503641132439e+00 0.00000000000000000e+00 -3.51437987484678815e-01 0.00000000000000000e+00 5.17942944869512229e-02 0.00000000000000000e+00 \n-6.55013029832534243e-01 0.00000000000000000e+00 -2.48642431934980631e+00 0.00000000000000000e+00 -7.16673508612463925e+00 0.00000000000000000e+00 7.11821473893899689e+00 0.00000000000000000e+00 -1.22002754417268821e+00 0.00000000000000000e+00 -4.21575549089904587e-01 0.00000000000000000e+00 2.01981042297073225e-01 0.00000000000000000e+00 -3.56232922022023997e-02 0.00000000000000000e+00 3.32799360087684413e-03 \n0.00000000000000000e+00 -1.69111135162243082e-01 0.00000000000000000e+00 -1.94813497810926935e+00 0.00000000000000000e+00 -7.73624618315455270e+00 0.00000000000000000e+00 7.94592472603303288e+00 0.00000000000000000e+00 -2.57931276477061497e+00 0.00000000000000000e+00 2.84207867969572918e-01 0.00000000000000000e+00 2.97470586220574536e-02 0.00000000000000000e+00 -1.31883226009328939e-02 0.00000000000000000e+00 \n4.82223568318013671e-01 0.00000000000000000e+00 6.36792944923667376e-01 0.00000000000000000e+00 -1.33211770378487204e+00 0.00000000000000000e+00 -8.35557012680303093e+00 0.00000000000000000e+00 8.66073134711302527e+00 0.00000000000000000e+00 -3.50940875082902823e+00 0.00000000000000000e+00 7.69424928875645877e-01 0.00000000000000000e+00 -1.01355057170996607e-01 0.00000000000000000e+00 8.12418075994781297e-03 \n0.00000000000000000e+00 1.42831235505677558e+00 0.00000000000000000e+00 1.72027497948254333e+00 0.00000000000000000e+00 -4.85093019208560626e-01 0.00000000000000000e+00 -9.26383000362670043e+00 0.00000000000000000e+00 8.70085819127296735e+00 0.00000000000000000e+00 -3.52020379566606790e+00 0.00000000000000000e+00 8.19154215761120703e-01 0.00000000000000000e+00 -1.22946933487821590e-01 0.00000000000000000e+00 \n1.43811889313261356e-01 0.00000000000000000e+00 8.19783170628449748e-01 0.00000000000000000e+00 2.54386631473028689e+00 0.00000000000000000e+00 3.57620887077802349e+00 0.00000000000000000e+00 -5.87638848950123467e+00 0.00000000000000000e+00 2.78717244279629247e+00 0.00000000000000000e+00 -6.67186013409517246e-01 0.00000000000000000e+00 9.29768987186070169e-02 0.00000000000000000e+00 -7.73807345316082897e-03 \n0.00000000000000000e+00 -5.92568909157613355e-01 0.00000000000000000e+00 -1.06968628647363354e-01 0.00000000000000000e+00 2.06239738220611644e+00 0.00000000000000000e+00 4.27712373141492169e+00 0.00000000000000000e+00 -5.49763023101328148e+00 0.00000000000000000e+00 2.49974594741846526e+00 0.00000000000000000e+00 -6.20751822352406512e-01 0.00000000000000000e+00 9.70116318035658585e-02 0.00000000000000000e+00 \n-1.15036990701454970e-01 0.00000000000000000e+00 -4.11988259653053306e-01 0.00000000000000000e+00 -9.06093069672093903e-01 0.00000000000000000e+00 -8.13723154051235931e-01 0.00000000000000000e+00 1.77274597909347097e+00 0.00000000000000000e+00 -9.00334643376790557e-01 0.00000000000000000e+00 2.23262807314225398e-01 0.00000000000000000e+00 -3.18014247383273537e-02 0.00000000000000000e+00 2.68499054258664823e-03 \n0.00000000000000000e+00 1.11737273807247832e-01 0.00000000000000000e+00 -1.26675112677611274e-01 0.00000000000000000e+00 -8.25400499487853027e-01 0.00000000000000000e+00 -1.10736690643595868e+00 0.00000000000000000e+00 1.69921985773414019e+00 0.00000000000000000e+00 -8.14740876027830174e-01 0.00000000000000000e+00 2.08059658853937009e-01 0.00000000000000000e+00 -3.30737173625265979e-02 0.00000000000000000e+00 \n2.61899160316606347e-02 0.00000000000000000e+00 8.35306080115908317e-02 0.00000000000000000e+00 1.60021022516985652e-01 0.00000000000000000e+00 1.11056300226756568e-01 0.00000000000000000e+00 -2.95605553861164956e-01 0.00000000000000000e+00 1.56231091337132330e-01 0.00000000000000000e+00 -3.95333853630064675e-02 0.00000000000000000e+00 5.70223461774485904e-03 0.00000000000000000e+00 -4.85440994701778140e-04 \n0.00000000000000000e+00 -1.17091653792942144e-02 0.00000000000000000e+00 4.08661629002225875e-02 0.00000000000000000e+00 1.68976870132475315e-01 0.00000000000000000e+00 1.83132554954653727e-01 0.00000000000000000e+00 -3.14866703418736170e-01 0.00000000000000000e+00 1.55650149796321389e-01 0.00000000000000000e+00 -4.03850074328951090e-02 0.00000000000000000e+00 6.48212745084339877e-03 0.00000000000000000e+00 \n-2.96170007519171866e-03 0.00000000000000000e+00 -8.94735571681993864e-03 0.00000000000000000e+00 -1.59014776418811689e-02 0.00000000000000000e+00 -9.30648544702497775e-03 0.00000000000000000e+00 2.86758234773955898e-02 0.00000000000000000e+00 -1.55445008070836271e-02 0.00000000000000000e+00 3.98425274375991803e-03 0.00000000000000000e+00 -5.79304053156079855e-04 0.00000000000000000e+00 4.95800775012696316e-05 \n0.00000000000000000e+00 7.21211660964306444e-04 0.00000000000000000e+00 -6.21753291179846931e-03 0.00000000000000000e+00 -2.15156065779848889e-02 0.00000000000000000e+00 -2.06934901996406441e-02 0.00000000000000000e+00 3.82601549829014638e-02 0.00000000000000000e+00 -1.92618937757620922e-02 0.00000000000000000e+00 5.04537151380320914e-03 0.00000000000000000e+00 -8.14539095797050375e-04 0.00000000000000000e+00 \n5.02483274886948420e-01 -8.27728732297333028e-01 9.58609731519822421e-01 -9.40991699474509336e-01 7.85076391281552428e-01 -5.10465269341839033e-01 1.63945693510848354e-01 1.71480120746513088e-01 -3.86044117703472797e-01 3.84736889507994086e-01 -1.59633417445092760e-01 -1.50107056549510874e-01 3.00343120318371546e-01 -1.41986419753070778e-01 -1.66460451811041285e-01 2.78775271133158617e-01 -1.27053528732864609e-01 \n7.80426893790286186e-01 -1.26996812450273115e+00 1.43149628137694401e+00 -1.33820658709417279e+00 1.02174814255977835e+00 -5.44937013071738994e-01 2.41770181333095617e-02 3.78854415003608718e-01 -5.12706427576156667e-01 3.34627063706419321e-01 1.07663779302724102e-02 -2.45975836586150198e-01 1.90509140467351903e-01 3.23442751890280302e-02 -1.36669500107652599e-01 6.33337282661372111e-02 1.87678792286518165e-03 \n9.38534560533466016e-01 -1.53146467670988844e+00 1.73715439300658587e+00 -1.64276982202246058e+00 1.27928429805188834e+00 -7.05981715625865206e-01 3.96683299411617853e-02 5.40358546672873677e-01 -8.29361192914430663e-01 6.91181666979085566e-01 -1.84734757156537185e-01 -3.74571912466204465e-01 5.59346607617087781e-01 -1.99580295109406840e-01 -3.42316711149921502e-01 4.91996768514962662e-01 -2.11872763452849727e-01 \n8.26655332224066545e-01 -1.30870522966876644e+00 1.38267177871599562e+00 -1.13056260658499783e+00 6.18809789211863524e-01 2.22144829905379262e-02 -5.85597976294264528e-01 8.34670287544003116e-01 -6.26929739128465847e-01 7.26875550491840051e-02 4.24241250036460973e-01 -4.29812206783640254e-01 -3.27591314074956636e-02 3.58049909792585794e-01 -1.00576550520439610e-01 -2.84344663296413490e-01 2.08641376102988805e-01 \n6.96342392047581154e-01 -1.09196565447146680e+00 1.12824866013606226e+00 -8.78764853385624929e-01 4.09262371386202117e-01 1.61320384088415391e-01 -6.56948027064608935e-01 8.84475830554301650e-01 -7.24506193438569453e-01 2.42261425265650103e-01 2.76002892493983066e-01 -4.74185015329258792e-01 2.38138424614747246e-01 1.36461885543475345e-01 -2.51696790884173819e-01 1.06308435907143149e-01 4.99229788924293427e-04 \n3.27506514916267121e-01 -4.41396769359113714e-01 2.68295850709177690e-01 1.42763538869579334e-01 -6.86500235651264299e-01 1.17017575930206365e+00 -1.34093926088631368e+00 9.92672207266324086e-01 -1.51162162108712144e-01 -7.69932929466729805e-01 1.08427176725380071e+00 -4.03100695896085190e-01 -6.87675081514195728e-01 8.90761658377487734e-01 1.60557773750822082e-01 -1.01024251566448820e+00 5.86131383259131694e-01 \n-3.25587495540881261e-03 9.58342492728397734e-02 -3.30046360134044166e-01 6.77064851285928021e-01 -1.03414045806897574e+00 1.23604353206261510e+00 -1.10537560479895866e+00 5.57952134169285749e-01 2.62707761954233542e-01 -9.29640289815103953e-01 9.25147052844340084e-01 -1.30081900295662376e-01 -7.73125912204713958e-01 7.44695891219325312e-01 2.73090739947773904e-01 -9.44807563460614093e-01 5.10291526114164006e-01 \n-2.41111784159006836e-01 4.68223905703455919e-01 -7.10389213298409676e-01 9.57673195365785300e-01 -1.12443882241082610e+00 1.08877681487705997e+00 -7.50520670208969786e-01 1.20753221674840351e-01 5.93163171657574400e-01 -1.00004775920639359e+00 7.43610873483650186e-01 1.03318563068429930e-01 -8.32572640284905875e-01 6.24490692558150330e-01 3.65698045783937454e-01 -9.07729693798506709e-01 4.61394993686665082e-01 \n-4.19614241379720855e-01 7.39430193769906839e-01 -9.65340962500346550e-01 1.10127091746549595e+00 -1.07788190199693140e+00 8.12515330946516137e-01 -2.73085910980190212e-01 -4.42642889689937844e-01 1.05685363794947048e+00 -1.17974882589173505e+00 5.72187062980969048e-01 4.87521072500821945e-01 -1.13353735174143977e+00 6.06693825478575391e-01 6.55485052419807655e-01 -1.19356183585160465e+00 5.65659784431424426e-01 \n-7.19059446566306780e-02 6.08801971006672034e-02 8.32519171477406556e-02 -3.66588650502552424e-01 7.48145779314299092e-01 -1.10092195415666646e+00 1.20703124496811203e+00 -8.41883485865930097e-01 -2.05917000466651129e-02 9.80348228487921274e-01 -1.26798984892398465e+00 3.93938539500995446e-01 9.56708636432489367e-01 -1.15404534492028362e+00 -2.77234430882972739e-01 1.40890109802649350e+00 -8.09701144876553538e-01 \n1.95653075476199099e-01 -3.81477680184963624e-01 5.89140020368814676e-01 -8.24097340685893156e-01 1.02177448154517308e+00 -1.05917993461808986e+00 7.92884038993884418e-01 -1.59923466176404379e-01 -6.74878981948174415e-01 1.24519550860999916e+00 -9.96722168445923369e-01 -1.29671586792297970e-01 1.21299920662247492e+00 -9.53504898614044881e-01 -5.73887642429307401e-01 1.46694466433425736e+00 -7.60311091739881337e-01 \n5.75184953507274848e-02 -7.91404243991931159e-02 4.73216278398571788e-02 4.27704831697817438e-02 -1.87126946107638915e-01 3.50655015709046941e-01 -4.52652342025432849e-01 3.84861622860806381e-01 -9.07831296399505386e-02 -3.14227937211040363e-01 5.12653224120147896e-01 -2.27192188182392795e-01 -3.40935727181163541e-01 4.93526494901343135e-01 7.33173212757933055e-02 -5.79399205025317601e-01 3.47616382709764364e-01 \n-4.22912330437848338e-02 9.06324917895183039e-02 -1.58738341789341592e-01 2.49878281171754953e-01 -3.44780001331732373e-01 3.98633092394797157e-01 -3.47743949928791052e-01 1.43958540416458379e-01 1.79756839429476551e-01 -4.54239299574151274e-01 4.29749120291549212e-01 -1.60445407094254329e-02 -4.56260325285919281e-01 4.14140699210046524e-01 1.95740812664319824e-01 -5.95272352395278242e-01 3.20066526685919684e-01 \n-1.30949580158303173e-02 1.93041587301636015e-02 -1.56073768393175653e-02 9.20670772552660044e-04 2.51530684170096847e-02 -5.77278140556231910e-02 8.26902217820510047e-02 -7.80772324945428554e-02 2.80119072161626455e-02 5.15114101313574979e-02 -9.95189662943195141e-02 5.25256696483364134e-02 6.10777451915501777e-02 -1.00498397969401732e-01 -9.40552780469201231e-03 1.15862311068157199e-01 -7.15702351411984981e-02 \n5.45118813620266959e-03 -1.30288869373923267e-02 2.56468723490130292e-02 -4.41271008221543169e-02 6.52326221096621891e-02 -8.03211748022132741e-02 7.57144960054856494e-02 -3.88821979801200900e-02 -2.74526484900098522e-02 9.05769397722495870e-02 -9.48255072662743009e-02 1.20734203750871009e-02 9.35393293499965441e-02 -9.30379588755083067e-02 -3.73696698109864115e-02 1.29195893426890858e-01 -7.11823186231862128e-02 \n1.48085003759585933e-03 -2.24582422649480410e-03 2.00206942257226527e-03 -6.29949668550865735e-04 -1.97996687892774961e-03 5.43696209931937354e-03 -8.37409315663200600e-03 8.44656649573799435e-03 -3.66045501440455799e-03 -4.78135119436472626e-03 1.05477344931602761e-02 -6.21156073794590648e-03 -6.10352008744938555e-03 1.10811989697674481e-02 6.14797106124862998e-04 -1.26542503826344756e-02 7.98954548460436320e-03 \n-4.72522466363355200e-04 1.27626000843602084e-03 -2.78902567299573202e-03 5.12727486952355269e-03 -7.93299551418141274e-03 1.01524738047566909e-02 -1.00071022361025157e-02 5.70020618299561787e-03 2.75586928809433283e-03 -1.13837978654430505e-02 1.27239897900551940e-02 -2.31975291001855836e-03 -1.20071740700757019e-02 1.27000832558423289e-02 4.54678891429836714e-03 -1.72977240170892684e-02 9.69304562653826411e-03 \n18\n-4.82579466276246206e-01 -7.94307439590081734e-01 -9.19003496071692779e-01 -9.02679318098990970e-01 -7.58606551201175955e-01 -5.09379232152469897e-01 -2.00890558762119930e-01 9.38484320426555868e-02 2.87361316828435287e-01 3.12560477760766903e-01 1.70871754321597713e-01 -4.09162466565187256e-02 -1.72095708140882435e-01 -1.32354524517655225e-01 1.49887730749849362e-02 1.12815761731067748e-01 9.08387181168485132e-02 2.65682928937293096e-02 \n8.01988901385119188e-01 1.30674865125213311e+00 1.47641775675759654e+00 1.38368524990060185e+00 1.05590280684299367e+00 5.51390606557697607e-01 -1.27781428552808810e-02 -4.61462001526970487e-01 -6.12992408522370113e-01 -3.90593541447947889e-01 5.92850470570091492e-02 3.80013152021291019e-01 2.72186689136806160e-01 -1.32823189844356401e-01 -3.05906016061159424e-01 -4.73490544025995896e-03 2.91891509217441520e-01 1.78460167447225428e-01 \n-9.09538951580566819e-01 -1.48207020263986865e+00 -1.67669902400489176e+00 -1.58047345136866769e+00 -1.22898748519991382e+00 -6.87069681668751707e-01 -7.30462094545359016e-02 4.44014979290507423e-01 6.88265279409305740e-01 5.66632965184703306e-01 1.65613071067075907e-01 -2.39379794514816317e-01 -3.51453240382932056e-01 -1.27318364551786362e-01 1.42062414382743524e-01 1.66634886170522256e-01 2.96465057330048516e-02 -2.26371543319745840e-02 \n9.00516356491743413e-01 1.43729707684479406e+00 1.54674095152018466e+00 1.31046616605844770e+00 7.79798193003716619e-01 6.53494436621913426e-02 -6.34595485892178942e-01 -1.05451702341122008e+00 -9.63080814123548118e-01 -3.44179908861035378e-01 4.49955346810610295e-01 8.02645378753934087e-01 3.45066472352486344e-01 -4.69719149283938477e-01 -6.26056849006163025e-01 1.28745173236837041e-01 7.05022313877964663e-01 3.92624278177850827e-01 \n-7.14767506813960645e-01 -1.11998916476364232e+00 -1.15354123815720344e+00 -8.87500659563268183e-01 -3.85396284052006234e-01 2.31700263219600871e-01 7.75273187259932652e-01 1.02510969423544136e+00 8.26490247262810661e-01 2.28914849365367036e-01 -4.32337318932476615e-01 -6.72659293410464270e-01 -2.69249435420636146e-01 3.66602861826000432e-01 4.73722805941700859e-01 -8.45573422503826099e-02 -4.96620889702437549e-01 -2.74361347210467410e-01 \n4.70594818451790865e-01 6.93020614532484277e-01 5.95968620800535665e-01 2.29011218406009130e-01 -3.32205811605873785e-01 -9.37408581427710674e-01 -1.36094303387976153e+00 -1.35739459636372126e+00 -7.94623873570617664e-01 1.67880004359329512e-01 9.98962052731833862e-01 1.04104205386164929e+00 1.36428473725960061e-01 -8.83836206197347985e-01 -8.01862882548723383e-01 3.70086723621040834e-01 1.06944360310039678e+00 5.48359480200335037e-01 \n-1.12545885421172551e-01 -9.35844816222500843e-02 1.19228196830842664e-01 5.00249020950538769e-01 9.63480326869061764e-01 1.35258453196636786e+00 1.46480130836837009e+00 1.12712079413817958e+00 3.28353662163516018e-01 -6.48835224908284337e-01 -1.24106183176959063e+00 -9.29532832105856662e-01 1.81729892830908590e-01 1.09868841603555855e+00 7.40549943010891245e-01 -5.77204477025338770e-01 -1.20442618481391141e+00 -5.77148532787777645e-01 \n-1.65514084898130267e-01 -3.33082132703529983e-01 -5.28644846602863823e-01 -7.40856929697250419e-01 -9.00083866056898703e-01 -9.10550468266655832e-01 -6.95661514026390788e-01 -2.60210573015678546e-01 2.59700352737391137e-01 6.15627777326143100e-01 5.81607578407561118e-01 1.61579117676233575e-01 -3.17313758033195973e-01 -4.30389297183213895e-01 -9.69986121292233381e-02 2.83579065493302042e-01 3.18467004685795397e-01 1.15140212706509707e-01 \n3.14387324861514676e-01 5.64131047752811913e-01 7.61376634691988486e-01 9.11453591149064232e-01 9.60907555038988235e-01 8.40464464173385075e-01 5.07628445555407733e-01 -1.17837984289208541e-03 -5.32614003984730178e-01 -8.38593053804411578e-01 -7.00525894956095434e-01 -1.30479375451311718e-01 5.05444389991775416e-01 6.70580931161571626e-01 1.70369029638021744e-01 -4.98583164019958268e-01 -6.31293861896418668e-01 -2.55714474417467151e-01 \n-2.89385158431267920e-01 -4.43020384836405533e-01 -4.13591023492733059e-01 -1.95673196184472877e-01 2.14670403185455501e-01 7.54251684333558840e-01 1.24487566924271195e+00 1.40000028552279808e+00 9.52641471112508159e-01 -7.94746643227236607e-02 -1.15250718843026930e+00 -1.36010273634585757e+00 -2.69906041004166170e-01 1.16188830521767819e+00 1.15978020761895691e+00 -4.80421004020414611e-01 -1.54916051387210254e+00 -8.16744008791908333e-01 \n-1.61751279648763912e-02 -8.70798384068284431e-02 -2.59172180206675333e-01 -5.42402832120556190e-01 -8.98206573505164336e-01 -1.21855527684591959e+00 -1.32384270655405080e+00 -1.01872017416779221e+00 -2.33619555593820753e-01 7.89293706358349551e-01 1.43971281036312086e+00 1.06851249179446855e+00 -2.81336552969685894e-01 -1.42214707006655784e+00 -9.45253061062323420e-01 7.99850428579805594e-01 1.64024575779389765e+00 7.88766605355045707e-01 \n1.72577789285033138e-01 2.80393555755317194e-01 3.06571566919643823e-01 2.46177654603966639e-01 7.96517611856972395e-02 -1.89999171115394184e-01 -4.99037473053532938e-01 -7.00338713122867249e-01 -6.05445055299891546e-01 -1.32588284238194427e-01 4.98241011350976571e-01 7.60755670991685006e-01 2.68428266638124621e-01 -5.69460038744117412e-01 -6.89108435447583223e-01 2.01737387065451222e-01 8.67391598558717273e-01 4.78659909597568808e-01 \n-4.48167375587922491e-02 -5.13456288284480932e-02 2.11335540721566422e-03 1.21402146280801647e-01 2.99615423944293975e-01 4.97596252459994164e-01 6.30439882272494149e-01 5.80409222124706236e-01 2.62819714533580675e-01 -2.57803807890164712e-01 -6.86477309755563067e-01 -6.21802571909395768e-01 3.28606464831316155e-02 7.06000987762839862e-01 5.55262586551141611e-01 -3.66132259911084157e-01 -8.74775136647593812e-01 -4.37408704767420714e-01 \n-4.22217495241832770e-02 -7.00583126084508779e-02 -8.04831743268024775e-02 -7.22947045595229591e-02 -3.91813163184500618e-02 2.17225076234832524e-02 9.97329632333889555e-02 1.61791984449992909e-01 1.57806442349997380e-01 5.52068397652800492e-02 -1.05019974394133739e-01 -1.90970989686911346e-01 -8.43597888645649432e-02 1.32821989348977874e-01 1.81610599136513878e-01 -4.14720151212731365e-02 -2.22576499797944394e-01 -1.26380125480094118e-01 \n1.68351013783521317e-02 2.31017798686654093e-02 1.36718882827726735e-02 -1.30137430760361171e-02 -5.68176834499247933e-02 -1.10187249119292040e-01 -1.53232100102476084e-01 -1.54511991981821160e-01 -8.59182861741236700e-02 4.55769619690549663e-02 1.68878446341512110e-01 1.71412591737732779e-01 8.56616828877389766e-03 -1.79954325195974381e-01 -1.56234704345853994e-01 8.86082795433914010e-02 2.34997694236469912e-01 1.20419663738889385e-01 \n5.66578278689573686e-03 9.50763004278083510e-03 1.12040784964906021e-02 1.06047201960651152e-02 6.76055386398652890e-03 -9.89015028462849691e-04 -1.16292973849787031e-02 -2.10263738790154619e-02 -2.21647584960240502e-02 -9.52387221011665895e-03 1.26773924857910410e-02 2.64347144470680993e-02 1.33464537077665994e-02 -1.74698430421414027e-02 -2.61798873116676661e-02 4.84650611188988732e-03 3.16107975201552076e-02 1.83337515828139043e-02 \n-3.05939196633932064e-03 -4.41827904769848513e-03 -3.32042447658326370e-03 4.79437544376932675e-04 7.10247841168440507e-03 1.56080096212770223e-02 2.31057981500918842e-02 2.46295583414131335e-02 1.52042615411134779e-02 -5.08457630522613652e-03 -2.57168328669487198e-02 -2.81521832257033908e-02 -3.18627928257033981e-03 2.81927049051388503e-02 2.61761952008917214e-02 -1.33690568859988411e-02 -3.83330041810874460e-02 -1.99871979728779337e-02 \n-4.29794347965632749e-04 -7.26096019383314911e-04 -8.68522698662005987e-04 -8.46513063556519629e-04 -5.83839824634060117e-04 -1.76351549635245793e-05 7.96080954582106117e-04 1.56116876553616159e-03 1.73396096839344447e-03 8.36358340206000185e-04 -8.85431629503250428e-04 -2.05539113205374010e-03 -1.13268685240314668e-03 1.30863861441671359e-03 2.10268435441235798e-03 -3.25185432822362697e-04 -2.51689657951758788e-03 -1.48339518144127053e-03 \n0.00000000000000000e+00 1.70930787719819795e+00 0.00000000000000000e+00 1.97019733715691470e+00 0.00000000000000000e+00 1.08902047559792122e+00 0.00000000000000000e+00 -4.25519506229379043e-01 0.00000000000000000e+00 -9.11437393801043779e-01 0.00000000000000000e+00 6.51531581516995664e-01 0.00000000000000000e+00 -2.02306236633005024e-01 0.00000000000000000e+00 3.75283390614333880e-02 0.00000000000000000e+00 -4.64161670286226491e-03 \n-1.60397780277023838e+00 0.00000000000000000e+00 3.51757382644368099e+00 0.00000000000000000e+00 2.72169455276930003e+00 0.00000000000000000e+00 1.45634202742023436e-01 0.00000000000000000e+00 -1.60340648763755181e+00 0.00000000000000000e+00 7.22043511049315359e-01 0.00000000000000000e+00 -1.51690329204227072e-01 0.00000000000000000e+00 1.84620508642003195e-02 0.00000000000000000e+00 -1.38777217887918711e-03 0.00000000000000000e+00 \n0.00000000000000000e+00 -3.33733029712214568e+00 0.00000000000000000e+00 5.26693301384024427e+00 0.00000000000000000e+00 3.29887877464988378e+00 0.00000000000000000e+00 -5.32508074719272147e-01 0.00000000000000000e+00 -2.25224326493340678e+00 0.00000000000000000e+00 1.41236202818844104e+00 0.00000000000000000e+00 -4.11643646792345819e-01 0.00000000000000000e+00 7.33213288399152087e-02 0.00000000000000000e+00 -8.82419932011109212e-03 \n-1.80103271298348683e+00 0.00000000000000000e+00 -4.99036078994207973e+00 0.00000000000000000e+00 6.04388165732362388e+00 0.00000000000000000e+00 1.89112175420734386e+00 0.00000000000000000e+00 -2.00548102816117342e+00 0.00000000000000000e+00 3.48580314173592049e-01 0.00000000000000000e+00 3.78383656063278804e-02 0.00000000000000000e+00 -2.12485315834030331e-02 0.00000000000000000e+00 3.25299774993650627e-03 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.71207622007716951e+00 0.00000000000000000e+00 -6.08233517522622891e+00 0.00000000000000000e+00 7.48336701347778157e+00 0.00000000000000000e+00 1.36406573738552487e+00 0.00000000000000000e+00 -3.08593698413663475e+00 0.00000000000000000e+00 1.28270880478264768e+00 0.00000000000000000e+00 -2.82675796842338992e-01 0.00000000000000000e+00 3.98942542442899515e-02 0.00000000000000000e+00 -3.94578984894513141e-03 \n-9.41189636903581730e-01 0.00000000000000000e+00 -3.08309209395862646e+00 0.00000000000000000e+00 -7.62522364585379499e+00 0.00000000000000000e+00 7.64092172361920386e+00 0.00000000000000000e+00 2.24403263730556777e-01 0.00000000000000000e+00 -1.77341141421841515e+00 0.00000000000000000e+00 6.92200577140106582e-01 0.00000000000000000e+00 -1.32398402666739805e-01 0.00000000000000000e+00 1.47780371180848498e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -5.92571803684684830e-01 0.00000000000000000e+00 -2.70369517632397179e+00 0.00000000000000000e+00 -8.54152177755438062e+00 0.00000000000000000e+00 8.14661744989949765e+00 0.00000000000000000e+00 -1.03072833634959643e+00 0.00000000000000000e+00 -9.65694124875532207e-01 0.00000000000000000e+00 4.74230204320548754e-01 0.00000000000000000e+00 -1.05687176034033270e-01 0.00000000000000000e+00 1.44445000096352814e-02 \n3.31028169796260533e-01 0.00000000000000000e+00 3.38412422476333456e-01 0.00000000000000000e+00 -1.50772811632393144e+00 0.00000000000000000e+00 -7.98157773241753182e+00 0.00000000000000000e+00 9.41021648819742917e+00 0.00000000000000000e+00 -4.29983834786578775e+00 0.00000000000000000e+00 1.07575056082605262e+00 0.00000000000000000e+00 -1.65517578286872247e-01 0.00000000000000000e+00 1.62318114154312462e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 1.04987718415759804e+00 0.00000000000000000e+00 1.08987770207992615e+00 0.00000000000000000e+00 -1.07805573651203231e+00 0.00000000000000000e+00 -8.97640734260810069e+00 0.00000000000000000e+00 9.94465428946107864e+00 0.00000000000000000e+00 -4.61235056885339916e+00 0.00000000000000000e+00 1.22799688526641217e+00 0.00000000000000000e+00 -2.11912268163774634e-01 0.00000000000000000e+00 2.52520991770187828e-02 \n5.78770316862535840e-01 0.00000000000000000e+00 1.72895838816060589e+00 0.00000000000000000e+00 3.24942133409316086e+00 0.00000000000000000e+00 2.79087196629082574e+00 0.00000000000000000e+00 -8.08564718672423772e+00 0.00000000000000000e+00 4.85094880993416437e+00 0.00000000000000000e+00 -1.41661856077361650e+00 0.00000000000000000e+00 2.41449731488591133e-01 0.00000000000000000e+00 -2.54230306758595473e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 6.20951029972805502e-02 0.00000000000000000e+00 1.04967539679993841e+00 0.00000000000000000e+00 3.27529573012859853e+00 0.00000000000000000e+00 3.93726382162248391e+00 0.00000000000000000e+00 -7.86660091994933779e+00 0.00000000000000000e+00 4.44046896763836160e+00 0.00000000000000000e+00 -1.31877593041683314e+00 0.00000000000000000e+00 2.43980424874373889e-01 0.00000000000000000e+00 -3.04253670206306475e-02 \n-3.45155578570066275e-01 0.00000000000000000e+00 -9.00052865518017534e-01 0.00000000000000000e+00 -1.30714172222302854e+00 0.00000000000000000e+00 -4.37333242858269399e-01 0.00000000000000000e+00 2.95356085489493968e+00 0.00000000000000000e+00 -1.96970550500263904e+00 0.00000000000000000e+00 6.04924842578055869e-01 0.00000000000000000e+00 -1.06296811261833371e-01 0.00000000000000000e+00 1.14192168607286032e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.07808208268338011e-01 0.00000000000000000e+00 -7.04142016303409204e-01 0.00000000000000000e+00 -1.45412894697689860e+00 0.00000000000000000e+00 -9.71877578014416158e-01 0.00000000000000000e+00 2.90140167436423480e+00 0.00000000000000000e+00 -1.77632089720559314e+00 0.00000000000000000e+00 5.49114716977372362e-01 0.00000000000000000e+00 -1.04066934172210348e-01 0.00000000000000000e+00 1.31769504096033659e-02 \n8.44434990483665539e-02 0.00000000000000000e+00 2.08556061450430067e-01 0.00000000000000000e+00 2.67342342102711596e-01 0.00000000000000000e+00 2.37287643158845743e-02 0.00000000000000000e+00 -5.97995986520481957e-01 0.00000000000000000e+00 4.23545362804736603e-01 0.00000000000000000e+00 -1.33696920051317807e-01 0.00000000000000000e+00 2.38838458908258370e-02 0.00000000000000000e+00 -2.59380231901676181e-03 0.00000000000000000e+00 \n0.00000000000000000e+00 7.04334440141840975e-02 0.00000000000000000e+00 1.92075942812719294e-01 0.00000000000000000e+00 3.38518358769437756e-01 0.00000000000000000e+00 1.54803679398468716e-01 0.00000000000000000e+00 -6.34465489982648346e-01 0.00000000000000000e+00 4.06732286009814532e-01 0.00000000000000000e+00 -1.28530186885921796e-01 0.00000000000000000e+00 2.46813504313780061e-02 0.00000000000000000e+00 -3.15128900255043649e-03 \n-1.13315655737914737e-02 0.00000000000000000e+00 -2.71454912095801324e-02 0.00000000000000000e+00 -3.22452986003563215e-02 0.00000000000000000e+00 2.00131281606731968e-03 0.00000000000000000e+00 7.28325682234898609e-02 0.00000000000000000e+00 -5.36102368084423733e-02 0.00000000000000000e+00 1.72174765076910205e-02 0.00000000000000000e+00 -3.10794059895127589e-03 0.00000000000000000e+00 3.39858586010310173e-04 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.23595312084740529e-02 0.00000000000000000e+00 -3.07456694714533688e-02 0.00000000000000000e+00 -4.98095710085786874e-02 0.00000000000000000e+00 -1.72412821913777841e-02 0.00000000000000000e+00 9.09892624947650372e-02 0.00000000000000000e+00 -6.00059958103540245e-02 0.00000000000000000e+00 1.92179991836880701e-02 0.00000000000000000e+00 -3.72013113519176401e-03 0.00000000000000000e+00 4.77412612406578317e-04 \n8.59588695931265499e-04 0.00000000000000000e+00 2.02100677480394561e-03 0.00000000000000000e+00 2.28556024181636320e-03 0.00000000000000000e+00 -3.68597741245956633e-04 0.00000000000000000e+00 -5.23104377706448118e-03 0.00000000000000000e+00 3.94899870199859097e-03 0.00000000000000000e+00 -1.28262897766100213e-03 0.00000000000000000e+00 2.33113579945547149e-04 0.00000000000000000e+00 -2.56074756301011717e-05 0.00000000000000000e+00 \n4.82579466276246206e-01 -7.94307439590081734e-01 9.19003496071692779e-01 -9.02679318098990970e-01 7.58606551201175955e-01 -5.09379232152469897e-01 2.00890558762119930e-01 9.38484320426555868e-02 -2.87361316828435287e-01 3.12560477760766903e-01 -1.70871754321597713e-01 -4.09162466565187256e-02 1.72095708140882435e-01 -1.32354524517655225e-01 -1.49887730749849362e-02 1.12815761731067748e-01 -9.08387181168485132e-02 2.65682928937293096e-02 \n8.01988901385119188e-01 -1.30674865125213311e+00 1.47641775675759654e+00 -1.38368524990060185e+00 1.05590280684299367e+00 -5.51390606557697607e-01 -1.27781428552808810e-02 4.61462001526970487e-01 -6.12992408522370113e-01 3.90593541447947889e-01 5.92850470570091492e-02 -3.80013152021291019e-01 2.72186689136806160e-01 1.32823189844356401e-01 -3.05906016061159424e-01 4.73490544025995896e-03 2.91891509217441520e-01 -1.78460167447225428e-01 \n9.09538951580566819e-01 -1.48207020263986865e+00 1.67669902400489176e+00 -1.58047345136866769e+00 1.22898748519991382e+00 -6.87069681668751707e-01 7.30462094545359016e-02 4.44014979290507423e-01 -6.88265279409305740e-01 5.66632965184703306e-01 -1.65613071067075907e-01 -2.39379794514816317e-01 3.51453240382932056e-01 -1.27318364551786362e-01 -1.42062414382743524e-01 1.66634886170522256e-01 -2.96465057330048516e-02 -2.26371543319745840e-02 \n9.00516356491743413e-01 -1.43729707684479406e+00 1.54674095152018466e+00 -1.31046616605844770e+00 7.79798193003716619e-01 -6.53494436621913426e-02 -6.34595485892178942e-01 1.05451702341122008e+00 -9.63080814123548118e-01 3.44179908861035378e-01 4.49955346810610295e-01 -8.02645378753934087e-01 3.45066472352486344e-01 4.69719149283938477e-01 -6.26056849006163025e-01 -1.28745173236837041e-01 7.05022313877964663e-01 -3.92624278177850827e-01 \n7.14767506813960645e-01 -1.11998916476364232e+00 1.15354123815720344e+00 -8.87500659563268183e-01 3.85396284052006234e-01 2.31700263219600871e-01 -7.75273187259932652e-01 1.02510969423544136e+00 -8.26490247262810661e-01 2.28914849365367036e-01 4.32337318932476615e-01 -6.72659293410464270e-01 2.69249435420636146e-01 3.66602861826000432e-01 -4.73722805941700859e-01 -8.45573422503826099e-02 4.96620889702437549e-01 -2.74361347210467410e-01 \n4.70594818451790865e-01 -6.93020614532484277e-01 5.95968620800535665e-01 -2.29011218406009130e-01 -3.32205811605873785e-01 9.37408581427710674e-01 -1.36094303387976153e+00 1.35739459636372126e+00 -7.94623873570617664e-01 -1.67880004359329512e-01 9.98962052731833862e-01 -1.04104205386164929e+00 1.36428473725960061e-01 8.83836206197347985e-01 -8.01862882548723383e-01 -3.70086723621040834e-01 1.06944360310039678e+00 -5.48359480200335037e-01 \n1.12545885421172551e-01 -9.35844816222500843e-02 -1.19228196830842664e-01 5.00249020950538769e-01 -9.63480326869061764e-01 1.35258453196636786e+00 -1.46480130836837009e+00 1.12712079413817958e+00 -3.28353662163516018e-01 -6.48835224908284337e-01 1.24106183176959063e+00 -9.29532832105856662e-01 -1.81729892830908590e-01 1.09868841603555855e+00 -7.40549943010891245e-01 -5.77204477025338770e-01 1.20442618481391141e+00 -5.77148532787777645e-01 \n-1.65514084898130267e-01 3.33082132703529983e-01 -5.28644846602863823e-01 7.40856929697250419e-01 -9.00083866056898703e-01 9.10550468266655832e-01 -6.95661514026390788e-01 2.60210573015678546e-01 2.59700352737391137e-01 -6.15627777326143100e-01 5.81607578407561118e-01 -1.61579117676233575e-01 -3.17313758033195973e-01 4.30389297183213895e-01 -9.69986121292233381e-02 -2.83579065493302042e-01 3.18467004685795397e-01 -1.15140212706509707e-01 \n-3.14387324861514676e-01 5.64131047752811913e-01 -7.61376634691988486e-01 9.11453591149064232e-01 -9.60907555038988235e-01 8.40464464173385075e-01 -5.07628445555407733e-01 -1.17837984289208541e-03 5.32614003984730178e-01 -8.38593053804411578e-01 7.00525894956095434e-01 -1.30479375451311718e-01 -5.05444389991775416e-01 6.70580931161571626e-01 -1.70369029638021744e-01 -4.98583164019958268e-01 6.31293861896418668e-01 -2.55714474417467151e-01 \n-2.89385158431267920e-01 4.43020384836405533e-01 -4.13591023492733059e-01 1.95673196184472877e-01 2.14670403185455501e-01 -7.54251684333558840e-01 1.24487566924271195e+00 -1.40000028552279808e+00 9.52641471112508159e-01 7.94746643227236607e-02 -1.15250718843026930e+00 1.36010273634585757e+00 -2.69906041004166170e-01 -1.16188830521767819e+00 1.15978020761895691e+00 4.80421004020414611e-01 -1.54916051387210254e+00 8.16744008791908333e-01 \n1.61751279648763912e-02 -8.70798384068284431e-02 2.59172180206675333e-01 -5.42402832120556190e-01 8.98206573505164336e-01 -1.21855527684591959e+00 1.32384270655405080e+00 -1.01872017416779221e+00 2.33619555593820753e-01 7.89293706358349551e-01 -1.43971281036312086e+00 1.06851249179446855e+00 2.81336552969685894e-01 -1.42214707006655784e+00 9.45253061062323420e-01 7.99850428579805594e-01 -1.64024575779389765e+00 7.88766605355045707e-01 \n1.72577789285033138e-01 -2.80393555755317194e-01 3.06571566919643823e-01 -2.46177654603966639e-01 7.96517611856972395e-02 1.89999171115394184e-01 -4.99037473053532938e-01 7.00338713122867249e-01 -6.05445055299891546e-01 1.32588284238194427e-01 4.98241011350976571e-01 -7.60755670991685006e-01 2.68428266638124621e-01 5.69460038744117412e-01 -6.89108435447583223e-01 -2.01737387065451222e-01 8.67391598558717273e-01 -4.78659909597568808e-01 \n4.48167375587922491e-02 -5.13456288284480932e-02 -2.11335540721566422e-03 1.21402146280801647e-01 -2.99615423944293975e-01 4.97596252459994164e-01 -6.30439882272494149e-01 5.80409222124706236e-01 -2.62819714533580675e-01 -2.57803807890164712e-01 6.86477309755563067e-01 -6.21802571909395768e-01 -3.28606464831316155e-02 7.06000987762839862e-01 -5.55262586551141611e-01 -3.66132259911084157e-01 8.74775136647593812e-01 -4.37408704767420714e-01 \n-4.22217495241832770e-02 7.00583126084508779e-02 -8.04831743268024775e-02 7.22947045595229591e-02 -3.91813163184500618e-02 -2.17225076234832524e-02 9.97329632333889555e-02 -1.61791984449992909e-01 1.57806442349997380e-01 -5.52068397652800492e-02 -1.05019974394133739e-01 1.90970989686911346e-01 -8.43597888645649432e-02 -1.32821989348977874e-01 1.81610599136513878e-01 4.14720151212731365e-02 -2.22576499797944394e-01 1.26380125480094118e-01 \n-1.68351013783521317e-02 2.31017798686654093e-02 -1.36718882827726735e-02 -1.30137430760361171e-02 5.68176834499247933e-02 -1.10187249119292040e-01 1.53232100102476084e-01 -1.54511991981821160e-01 8.59182861741236700e-02 4.55769619690549663e-02 -1.68878446341512110e-01 1.71412591737732779e-01 -8.56616828877389766e-03 -1.79954325195974381e-01 1.56234704345853994e-01 8.86082795433914010e-02 -2.34997694236469912e-01 1.20419663738889385e-01 \n5.66578278689573686e-03 -9.50763004278083510e-03 1.12040784964906021e-02 -1.06047201960651152e-02 6.76055386398652890e-03 9.89015028462849691e-04 -1.16292973849787031e-02 2.10263738790154619e-02 -2.21647584960240502e-02 9.52387221011665895e-03 1.26773924857910410e-02 -2.64347144470680993e-02 1.33464537077665994e-02 1.74698430421414027e-02 -2.61798873116676661e-02 -4.84650611188988732e-03 3.16107975201552076e-02 -1.83337515828139043e-02 \n3.05939196633932064e-03 -4.41827904769848513e-03 3.32042447658326370e-03 4.79437544376932675e-04 -7.10247841168440507e-03 1.56080096212770223e-02 -2.31057981500918842e-02 2.46295583414131335e-02 -1.52042615411134779e-02 -5.08457630522613652e-03 2.57168328669487198e-02 -2.81521832257033908e-02 3.18627928257033981e-03 2.81927049051388503e-02 -2.61761952008917214e-02 -1.33690568859988411e-02 3.83330041810874460e-02 -1.99871979728779337e-02 \n-4.29794347965632749e-04 7.26096019383314911e-04 -8.68522698662005987e-04 8.46513063556519629e-04 -5.83839824634060117e-04 1.76351549635245793e-05 7.96080954582106117e-04 -1.56116876553616159e-03 1.73396096839344447e-03 -8.36358340206000185e-04 -8.85431629503250428e-04 2.05539113205374010e-03 -1.13268685240314668e-03 -1.30863861441671359e-03 2.10268435441235798e-03 3.25185432822362697e-04 -2.51689657951758788e-03 1.48339518144127053e-03 \n19\n-4.86541006279407637e-01 -8.00616141892748261e-01 -9.25541677906224665e-01 -9.07112318161906291e-01 -7.57979709506585201e-01 -5.00546050281306166e-01 -1.82012631491346223e-01 1.20612437473936007e-01 3.13071835032801001e-01 3.21944487912807194e-01 1.50757796850304683e-01 -8.47333056793666785e-02 -2.03554167558771346e-01 -1.07641668621739478e-01 8.53415609421798872e-02 1.34920829823982947e-01 -1.10218480819800586e-02 -1.23619186405940129e-01 -6.84295987025174670e-02 \n8.41849895172028932e-01 1.38104747962321916e+00 1.58411419262175813e+00 1.52596392105527612e+00 1.22514606842022367e+00 7.21825215087582604e-01 1.09714471140924159e-01 -4.50417683944719218e-01 -7.56432322882891193e-01 -6.53368842571415094e-01 -1.71592382931126984e-01 3.83551416435591105e-01 5.59579984897367171e-01 1.62063556462728181e-01 -3.94389855017227297e-01 -4.08140558089524370e-01 1.63339988273716812e-01 5.12555624604406114e-01 2.60050319456548492e-01 \n-9.37078479305115144e-01 -1.52882215918053038e+00 -1.73349159983359941e+00 -1.63819069076419861e+00 -1.27420444368202704e+00 -7.01445823671934953e-01 -3.75350465398300834e-02 5.37740472572700899e-01 8.20514302533735701e-01 6.78020815690450940e-01 1.74844388720619342e-01 -3.69486811275358918e-01 -5.32392713465038508e-01 -1.63721238233659739e-01 3.38704003523225541e-01 3.59014423387505895e-01 -1.23370758233353129e-01 -4.17931794772379965e-01 -2.12241927323857849e-01 \n9.70861647542082109e-01 1.56951758429947027e+00 1.74107951462364170e+00 1.57159363211997308e+00 1.09668666173688559e+00 3.93383183285706867e-01 -3.84994554082202497e-01 -1.00423365942860924e+00 -1.20265177719144712e+00 -8.25700965866540286e-01 -6.31368836476117220e-03 7.57709468716859169e-01 8.48038083369385780e-01 1.15915044809685361e-01 -7.06990893956183483e-01 -6.07801806136545880e-01 3.33366000698232292e-01 8.38954557039178575e-01 4.09239843955823541e-01 \n-8.02740223583043872e-01 -1.27223165126703919e+00 -1.34630764704046047e+00 -1.09878871031056968e+00 -5.79442037802427965e-01 1.09940208257035671e-01 7.92887940996019025e-01 1.23200582255391865e+00 1.20220956021404468e+00 6.30605588415916198e-01 -2.53903916138005287e-01 -9.13444354693949801e-01 -8.08678493819473051e-01 4.27424309341412642e-02 8.08786985652545284e-01 5.66940579443847836e-01 -4.30858272120030802e-01 -8.86550219416354044e-01 -4.13033915144449486e-01 \n5.44943247971005191e-01 8.34727059521826778e-01 8.08993622125446849e-01 5.22885890214659701e-01 3.51571139952296149e-02 -5.42184173393198368e-01 -1.03766724509417552e+00 -1.24953257498587717e+00 -1.02379424276110985e+00 -3.72694999456410342e-01 4.30140140826783038e-01 9.03069473693764688e-01 6.60850044248860219e-01 -1.49701775177009623e-01 -7.55404450178931079e-01 -4.52129229017287244e-01 4.23645578148945585e-01 7.71557387323216780e-01 3.47030867650495143e-01 \n-2.53816705194129963e-01 -3.40202372509071740e-01 -1.98704055952043361e-01 1.41081368516055553e-01 6.15252639870554219e-01 1.10106305611632347e+00 1.42229561319831251e+00 1.39089622750955642e+00 8.96779376963079455e-01 2.94014275839787957e-02 -8.45235116126162742e-01 -1.18707124336260313e+00 -6.54569429696611972e-01 4.27641199265183651e-01 1.06263032038782858e+00 4.92543180161745266e-01 -6.94943409756603106e-01 -1.08254043195431171e+00 -4.67549971047868381e-01 \n-1.82368531457021879e-01 -3.61832260936299061e-01 -5.63814326902422384e-01 -7.76693475933649056e-01 -9.27521661408891185e-01 -9.16635304000039778e-01 -6.66701538986072269e-01 -1.90926646116571309e-01 3.51999601516108809e-01 6.82214588664123543e-01 5.60647597082965843e-01 3.86872457757430909e-02 -4.44318197786264985e-01 -3.96315411807718875e-01 1.13769248165653960e-01 3.86171981888572797e-01 3.71394040923700624e-02 -3.38334690957778009e-01 -2.10376552418509604e-01 \n2.83363797435735347e-01 5.07985860401193537e-01 6.83778291113831035e-01 8.14138638309712291e-01 8.50480742685322614e-01 7.33381302370851436e-01 4.32889495301551147e-01 -6.24393825444680819e-03 -4.39466439383275380e-01 -6.58392602416821262e-01 -5.12806104226450820e-01 -6.94095110972647820e-02 3.47233211925934142e-01 3.84426096434273035e-01 4.71737768346554682e-02 -2.38505048886729405e-01 -1.57445674047154704e-01 5.29541451536534323e-02 6.63094352610028047e-02 \n-4.29089940069893090e-01 -7.07084717472403788e-01 -8.05263722578719555e-01 -7.27616609540610299e-01 -4.38752563317243621e-01 6.68806683479245800e-02 7.05093389737137913e-01 1.25882018902988202e+00 1.40786482485456619e+00 8.94909591383391215e-01 -1.87760233197531648e-01 -1.20283779104093503e+00 -1.25080046250530441e+00 -7.18021820624149161e-02 1.21530697378740845e+00 9.84280856158928700e-01 -6.29491337742059378e-01 -1.47680526082349779e+00 -7.15793819725440137e-01 \n1.98762996148395352e-01 2.87660048905500883e-01 2.22670521728035860e-01 -3.90286960261353920e-04 -3.76528638779133217e-01 -8.48102490683868660e-01 -1.27404440155053945e+00 -1.43309715114530315e+00 -1.10230970509026114e+00 -2.30496198290442772e-01 8.63868498635530273e-01 1.48353836307146807e+00 9.84450378588905920e-01 -4.43327132698852036e-01 -1.46972014617558941e+00 -7.95463973752526450e-01 9.52203164168486542e-01 1.62056536320539751e+00 7.24315316911098228e-01 \n2.79918365849821516e-01 4.81384871625607194e-01 6.00113424463092779e-01 6.37519386396255073e-01 5.50158834274326548e-01 2.90966301367037555e-01 -1.41880904864040717e-01 -6.44052320300606713e-01 -9.76142459546725633e-01 -8.46791698060213906e-01 -1.56389876209695216e-01 7.24575795411670747e-01 1.01904262683465143e+00 2.60264720394439452e-01 -8.47513526448191137e-01 -8.61013841900611870e-01 3.92400081044502570e-01 1.17511177112962478e+00 6.00181069739940526e-01 \n-1.87915281079072262e-01 -2.99782995765854374e-01 -3.14565361049652210e-01 -2.29707085399454923e-01 -2.98071548312910762e-02 2.78132156946533661e-01 6.31188525607332646e-01 8.88155842094635060e-01 8.55640335921997420e-01 4.02301041807068723e-01 -3.56588756522697916e-01 -9.56033873205045817e-01 -8.15931413674907783e-01 1.29863305005807074e-01 9.95876662546498424e-01 6.69316771064098682e-01 -5.96172820979064435e-01 -1.17692164168135785e+00 -5.49709379669401001e-01 \n-7.77258448245817396e-02 -1.36138972230363358e-01 -1.76018504357397519e-01 -1.98074140637741204e-01 -1.88154800569347266e-01 -1.27426572505913384e-01 -6.33629277846806658e-03 1.53921404615538814e-01 2.84281095249059184e-01 2.83427542217513653e-01 9.28857513334031257e-02 -1.95940018065799791e-01 -3.29893729205397205e-01 -1.15857592103049388e-01 2.55320025597598753e-01 2.93116671882476618e-01 -1.10102663581220898e-01 -3.85218025159435796e-01 -2.02426739622272985e-01 \n6.30351538553337620e-02 1.03072819784679658e-01 1.14981949085567228e-01 9.81428315209078722e-02 4.55104560469120839e-02 -4.54109117012146250e-02 -1.60973451558643989e-01 -2.60749803567280630e-01 -2.80115792051904703e-01 -1.62882164421701983e-01 7.43261699581511984e-02 2.91349189844023096e-01 2.82529421492489071e-01 -1.09436361107185456e-02 -3.16356680732218365e-01 -2.37417904319193072e-01 1.81458104151399004e-01 3.92194940859233859e-01 1.87794903680782291e-01 \n1.22616459702089202e-02 2.17150440424877034e-02 2.86836810837022855e-02 3.33393604334128688e-02 3.32877415844400807e-02 2.50076735968446576e-02 6.01229169446875680e-03 -2.13636987122985436e-02 -4.62194519478109009e-02 -5.04091800080718711e-02 -2.08399799041418004e-02 3.00745720180039448e-02 5.81106116905532310e-02 2.42148105544069790e-02 -4.29178411513906289e-02 -5.38147088674744800e-02 1.74633669607195873e-02 6.92295885177470414e-02 3.71393345882694282e-02 \n-1.20977369216231315e-02 -2.00205388231157684e-02 -2.29727784853126721e-02 -2.08718273122686976e-02 -1.21967146019551100e-02 4.01439398898721851e-03 2.59349779073752585e-02 4.65878677632753404e-02 5.36151295252949402e-02 3.47976444787688922e-02 -9.32136043489662297e-03 -5.35675722870996647e-02 -5.65251626525292723e-02 -1.88957492815829647e-03 6.01724587730064909e-02 4.85996332610543576e-02 -3.35198093795074255e-02 -7.74442050757106655e-02 -3.77397098715110702e-02 \n-1.17086448226299244e-03 -2.08869005937404666e-03 -2.79747084702418181e-03 -3.31856745470835583e-03 -3.41495739536464278e-03 -2.71673578045168559e-03 -9.21179588214467028e-04 1.82410383355050384e-03 4.49350720983270957e-03 5.21667100321207033e-03 2.45765233020475457e-03 -2.78454142601957963e-03 -6.00250750895820494e-03 -2.79047866910311521e-03 4.28762811359165148e-03 5.74988437677382395e-03 -1.66007466932824444e-03 -7.30003346593538065e-03 -3.97878544573988209e-03 \n1.51638486525799435e-03 2.52629140525032732e-03 2.94363770425825273e-03 2.76141959593575081e-03 1.77794206477527110e-03 -1.61836151077398207e-04 -2.88868917526961038e-03 -5.59080669389200583e-03 -6.72777128200573358e-03 -4.65651511696894019e-03 7.73964490127331605e-04 6.55623021917679153e-03 7.32464419591484222e-03 5.82916873771194705e-04 -7.55570033133945876e-03 -6.41633141390425241e-03 4.12369083156724017e-03 1.00030919413873304e-02 4.93596045320364464e-03 \n0.00000000000000000e+00 1.69447892755676233e+00 0.00000000000000000e+00 1.94136884766619990e+00 0.00000000000000000e+00 1.05377102446172036e+00 0.00000000000000000e+00 -4.28148239425539304e-01 0.00000000000000000e+00 -8.59029244917613066e-01 0.00000000000000000e+00 6.22891302911320867e-01 0.00000000000000000e+00 -1.97242845351474638e-01 0.00000000000000000e+00 3.78469858899157458e-02 0.00000000000000000e+00 -4.94135159722207560e-03 0.00000000000000000e+00 \n-1.68369979034405786e+00 0.00000000000000000e+00 3.38363075331239198e+00 0.00000000000000000e+00 2.72417776438370103e+00 0.00000000000000000e+00 4.99785049711395113e-01 0.00000000000000000e+00 -1.17882850724769098e+00 0.00000000000000000e+00 1.15849657750292198e-01 0.00000000000000000e+00 1.21417233786021498e-01 0.00000000000000000e+00 -4.62629205674811089e-02 0.00000000000000000e+00 7.80761922011536440e-03 0.00000000000000000e+00 -7.39019062585223468e-04 \n0.00000000000000000e+00 -3.43462582898229986e+00 0.00000000000000000e+00 5.11733681890096400e+00 0.00000000000000000e+00 3.18153582518823524e+00 0.00000000000000000e+00 -4.28623403521395563e-01 0.00000000000000000e+00 -1.96952181840276778e+00 0.00000000000000000e+00 1.13809772456850955e+00 0.00000000000000000e+00 -3.04434716763025621e-01 0.00000000000000000e+00 4.95441653756016796e-02 0.00000000000000000e+00 -5.47372889271984083e-03 0.00000000000000000e+00 \n-1.94172329508416422e+00 0.00000000000000000e+00 -5.21824885477955450e+00 0.00000000000000000e+00 6.08332153050789936e+00 0.00000000000000000e+00 2.57647129965589999e+00 0.00000000000000000e+00 -1.24030916202765856e+00 0.00000000000000000e+00 -8.03236852094355021e-01 0.00000000000000000e+00 5.69585470865463352e-01 0.00000000000000000e+00 -1.49998674223598045e-01 0.00000000000000000e+00 2.19801636477495075e-02 0.00000000000000000e+00 -1.93207658240456434e-03 \n0.00000000000000000e+00 -3.01708410756605065e+00 0.00000000000000000e+00 -6.50936347585674762e+00 0.00000000000000000e+00 7.23635843092157462e+00 0.00000000000000000e+00 1.81846599537292920e+00 0.00000000000000000e+00 -2.26397272775174783e+00 0.00000000000000000e+00 3.30246167379204336e-01 0.00000000000000000e+00 1.32623237765330218e-01 0.00000000000000000e+00 -6.23487752000926069e-02 0.00000000000000000e+00 1.22582637408933997e-02 0.00000000000000000e+00 \n-1.08988649594201038e+00 0.00000000000000000e+00 -3.30881299973630786e+00 0.00000000000000000e+00 -7.52100745915187965e+00 0.00000000000000000e+00 8.47300914745960918e+00 0.00000000000000000e+00 1.06146600679238950e+00 0.00000000000000000e+00 -3.13758288576354008e+00 0.00000000000000000e+00 1.34351863772883765e+00 0.00000000000000000e+00 -2.94624976260702378e-01 0.00000000000000000e+00 3.90915230979531874e-02 0.00000000000000000e+00 -3.23382969990677458e-03 \n0.00000000000000000e+00 -1.07808897180571434e+00 0.00000000000000000e+00 -3.35187520110394330e+00 0.00000000000000000e+00 -8.84359885660145284e+00 0.00000000000000000e+00 8.96759466788783669e+00 0.00000000000000000e+00 2.30197597834944052e-01 0.00000000000000000e+00 -2.55415027387314391e+00 0.00000000000000000e+00 1.19677887395140207e+00 0.00000000000000000e+00 -2.89990660495243575e-01 0.00000000000000000e+00 4.46942460008898214e-02 0.00000000000000000e+00 \n3.64737062914043758e-01 0.00000000000000000e+00 4.15608570433910028e-01 0.00000000000000000e+00 -1.42398454909812508e+00 0.00000000000000000e+00 -7.98608452973415667e+00 0.00000000000000000e+00 9.26694853525568804e+00 0.00000000000000000e+00 -4.23854512428196964e+00 0.00000000000000000e+00 1.07894171158515607e+00 0.00000000000000000e+00 -1.72849488358164153e-01 0.00000000000000000e+00 1.83328423984782065e-02 0.00000000000000000e+00 -1.28401813344164170e-03 \n0.00000000000000000e+00 9.47230255935009599e-01 0.00000000000000000e+00 9.82443372238404068e-01 0.00000000000000000e+00 -1.05645915014473327e+00 0.00000000000000000e+00 -8.71159450226840544e+00 0.00000000000000000e+00 1.01653038403281057e+01 0.00000000000000000e+00 -5.01418032530070101e+00 0.00000000000000000e+00 1.43756568192669540e+00 0.00000000000000000e+00 -2.70897541963283683e-01 0.00000000000000000e+00 3.58058185893043535e-02 0.00000000000000000e+00 \n8.58179880139786180e-01 0.00000000000000000e+00 2.17010939813495526e+00 0.00000000000000000e+00 3.12306962672456310e+00 0.00000000000000000e+00 1.34338083720478120e+00 0.00000000000000000e+00 -9.63486921088916930e+00 0.00000000000000000e+00 7.26954799714195185e+00 0.00000000000000000e+00 -2.55409736732388887e+00 0.00000000000000000e+00 5.21852043373678874e-01 0.00000000000000000e+00 -6.70917242598840055e-02 0.00000000000000000e+00 5.46556294199083666e-03 \n0.00000000000000000e+00 8.01750334163549502e-01 0.00000000000000000e+00 2.04425602761999663e+00 0.00000000000000000e+00 3.75539595589068919e+00 0.00000000000000000e+00 2.70391659813967184e+00 0.00000000000000000e+00 -9.80671580483178655e+00 0.00000000000000000e+00 6.86202179213907279e+00 0.00000000000000000e+00 -2.41752934700160665e+00 0.00000000000000000e+00 5.24100208665867590e-01 0.00000000000000000e+00 -7.64456624108964001e-02 0.00000000000000000e+00 \n-5.59836731699643031e-01 0.00000000000000000e+00 -1.25364241552777688e+00 0.00000000000000000e+00 -1.27010049885255362e+00 0.00000000000000000e+00 5.73661499358904717e-01 0.00000000000000000e+00 4.12226804730321251e+00 0.00000000000000000e+00 -3.69818075020479427e+00 0.00000000000000000e+00 1.40022933849719517e+00 0.00000000000000000e+00 -2.98986359221375098e-01 0.00000000000000000e+00 3.95673851084470463e-02 0.00000000000000000e+00 -3.28718830460190757e-03 \n0.00000000000000000e+00 -7.02349265858449968e-01 0.00000000000000000e+00 -1.38478797442229616e+00 0.00000000000000000e+00 -1.82009795811327010e+00 0.00000000000000000e+00 -1.93300461779650707e-01 0.00000000000000000e+00 4.22767436106034481e+00 0.00000000000000000e+00 -3.36963040137769870e+00 0.00000000000000000e+00 1.25945985547079440e+00 0.00000000000000000e+00 -2.82731530597459537e-01 0.00000000000000000e+00 4.21712538204189997e-02 0.00000000000000000e+00 \n1.55451689649163479e-01 0.00000000000000000e+00 3.28584391479209741e-01 0.00000000000000000e+00 2.67623342878159601e-01 0.00000000000000000e+00 -2.90015805015961200e-01 0.00000000000000000e+00 -9.81274382894265714e-01 0.00000000000000000e+00 9.70450104390209229e-01 0.00000000000000000e+00 -3.81740312549132502e-01 0.00000000000000000e+00 8.33220835669234556e-02 0.00000000000000000e+00 -1.11856198355852395e-02 0.00000000000000000e+00 9.38326416744618757e-04 \n0.00000000000000000e+00 2.30574716992077769e-01 0.00000000000000000e+00 4.16018901527439316e-01 0.00000000000000000e+00 4.67160020465598268e-01 0.00000000000000000e+00 -8.72874365373537413e-02 0.00000000000000000e+00 -1.07151659321107852e+00 0.00000000000000000e+00 9.18579866127685220e-01 0.00000000000000000e+00 -3.54093099938794251e-01 0.00000000000000000e+00 8.09221153789826857e-02 0.00000000000000000e+00 -1.22082545105119163e-02 0.00000000000000000e+00 \n-2.45232919404178404e-02 0.00000000000000000e+00 -4.99738332776248183e-02 0.00000000000000000e+00 -3.44445365057040628e-02 0.00000000000000000e+00 5.68318988182049344e-02 0.00000000000000000e+00 1.43709906141294830e-01 0.00000000000000000e+00 -1.51373000601411137e-01 0.00000000000000000e+00 6.09673746259258420e-02 0.00000000000000000e+00 -1.34887805863430097e-02 0.00000000000000000e+00 1.82691922683663318e-03 0.00000000000000000e+00 -1.54180796198891194e-04 \n0.00000000000000000e+00 -4.37745023731811375e-02 0.00000000000000000e+00 -7.53133607323485278e-02 0.00000000000000000e+00 -7.68677383192760724e-02 0.00000000000000000e+00 2.85045168198190923e-02 0.00000000000000000e+00 1.78277413350343445e-01 0.00000000000000000e+00 -1.59977870593138057e-01 0.00000000000000000e+00 6.28363702796977927e-02 0.00000000000000000e+00 -1.45168171242453310e-02 0.00000000000000000e+00 2.20529980625241721e-03 0.00000000000000000e+00 \n2.34172896452598488e-03 0.00000000000000000e+00 4.65468533003148435e-03 0.00000000000000000e+00 2.81017032344113983e-03 0.00000000000000000e+00 -6.09324363746836017e-03 0.00000000000000000e+00 -1.31863441210157665e-02 0.00000000000000000e+00 1.44929578373446860e-02 0.00000000000000000e+00 -5.92864242199406069e-03 0.00000000000000000e+00 1.32346342930935442e-03 0.00000000000000000e+00 -1.80306088980937900e-04 0.00000000000000000e+00 1.52780086452825485e-05 \n0.00000000000000000e+00 5.45323971132067458e-03 0.00000000000000000e+00 9.12490980506988261e-03 0.00000000000000000e+00 8.77069343880575335e-03 0.00000000000000000e+00 -4.30548975212241080e-03 0.00000000000000000e+00 -2.06429364952494772e-02 0.00000000000000000e+00 1.90651881032656283e-02 0.00000000000000000e+00 -7.57620287870630122e-03 0.00000000000000000e+00 1.76214527436281325e-03 0.00000000000000000e+00 -2.68854774502336401e-04 0.00000000000000000e+00 \n4.86541006279407637e-01 -8.00616141892748261e-01 9.25541677906224665e-01 -9.07112318161906291e-01 7.57979709506585201e-01 -5.00546050281306166e-01 1.82012631491346223e-01 1.20612437473936007e-01 -3.13071835032801001e-01 3.21944487912807194e-01 -1.50757796850304683e-01 -8.47333056793666785e-02 2.03554167558771346e-01 -1.07641668621739478e-01 -8.53415609421798872e-02 1.34920829823982947e-01 1.10218480819800586e-02 -1.23619186405940129e-01 6.84295987025174670e-02 \n8.41849895172028932e-01 -1.38104747962321916e+00 1.58411419262175813e+00 -1.52596392105527612e+00 1.22514606842022367e+00 -7.21825215087582604e-01 1.09714471140924159e-01 4.50417683944719218e-01 -7.56432322882891193e-01 6.53368842571415094e-01 -1.71592382931126984e-01 -3.83551416435591105e-01 5.59579984897367171e-01 -1.62063556462728181e-01 -3.94389855017227297e-01 4.08140558089524370e-01 1.63339988273716812e-01 -5.12555624604406114e-01 2.60050319456548492e-01 \n9.37078479305115144e-01 -1.52882215918053038e+00 1.73349159983359941e+00 -1.63819069076419861e+00 1.27420444368202704e+00 -7.01445823671934953e-01 3.75350465398300834e-02 5.37740472572700899e-01 -8.20514302533735701e-01 6.78020815690450940e-01 -1.74844388720619342e-01 -3.69486811275358918e-01 5.32392713465038508e-01 -1.63721238233659739e-01 -3.38704003523225541e-01 3.59014423387505895e-01 1.23370758233353129e-01 -4.17931794772379965e-01 2.12241927323857849e-01 \n9.70861647542082109e-01 -1.56951758429947027e+00 1.74107951462364170e+00 -1.57159363211997308e+00 1.09668666173688559e+00 -3.93383183285706867e-01 -3.84994554082202497e-01 1.00423365942860924e+00 -1.20265177719144712e+00 8.25700965866540286e-01 -6.31368836476117220e-03 -7.57709468716859169e-01 8.48038083369385780e-01 -1.15915044809685361e-01 -7.06990893956183483e-01 6.07801806136545880e-01 3.33366000698232292e-01 -8.38954557039178575e-01 4.09239843955823541e-01 \n8.02740223583043872e-01 -1.27223165126703919e+00 1.34630764704046047e+00 -1.09878871031056968e+00 5.79442037802427965e-01 1.09940208257035671e-01 -7.92887940996019025e-01 1.23200582255391865e+00 -1.20220956021404468e+00 6.30605588415916198e-01 2.53903916138005287e-01 -9.13444354693949801e-01 8.08678493819473051e-01 4.27424309341412642e-02 -8.08786985652545284e-01 5.66940579443847836e-01 4.30858272120030802e-01 -8.86550219416354044e-01 4.13033915144449486e-01 \n5.44943247971005191e-01 -8.34727059521826778e-01 8.08993622125446849e-01 -5.22885890214659701e-01 3.51571139952296149e-02 5.42184173393198368e-01 -1.03766724509417552e+00 1.24953257498587717e+00 -1.02379424276110985e+00 3.72694999456410342e-01 4.30140140826783038e-01 -9.03069473693764688e-01 6.60850044248860219e-01 1.49701775177009623e-01 -7.55404450178931079e-01 4.52129229017287244e-01 4.23645578148945585e-01 -7.71557387323216780e-01 3.47030867650495143e-01 \n2.53816705194129963e-01 -3.40202372509071740e-01 1.98704055952043361e-01 1.41081368516055553e-01 -6.15252639870554219e-01 1.10106305611632347e+00 -1.42229561319831251e+00 1.39089622750955642e+00 -8.96779376963079455e-01 2.94014275839787957e-02 8.45235116126162742e-01 -1.18707124336260313e+00 6.54569429696611972e-01 4.27641199265183651e-01 -1.06263032038782858e+00 4.92543180161745266e-01 6.94943409756603106e-01 -1.08254043195431171e+00 4.67549971047868381e-01 \n-1.82368531457021879e-01 3.61832260936299061e-01 -5.63814326902422384e-01 7.76693475933649056e-01 -9.27521661408891185e-01 9.16635304000039778e-01 -6.66701538986072269e-01 1.90926646116571309e-01 3.51999601516108809e-01 -6.82214588664123543e-01 5.60647597082965843e-01 -3.86872457757430909e-02 -4.44318197786264985e-01 3.96315411807718875e-01 1.13769248165653960e-01 -3.86171981888572797e-01 3.71394040923700624e-02 3.38334690957778009e-01 -2.10376552418509604e-01 \n-2.83363797435735347e-01 5.07985860401193537e-01 -6.83778291113831035e-01 8.14138638309712291e-01 -8.50480742685322614e-01 7.33381302370851436e-01 -4.32889495301551147e-01 -6.24393825444680819e-03 4.39466439383275380e-01 -6.58392602416821262e-01 5.12806104226450820e-01 -6.94095110972647820e-02 -3.47233211925934142e-01 3.84426096434273035e-01 -4.71737768346554682e-02 -2.38505048886729405e-01 1.57445674047154704e-01 5.29541451536534323e-02 -6.63094352610028047e-02 \n-4.29089940069893090e-01 7.07084717472403788e-01 -8.05263722578719555e-01 7.27616609540610299e-01 -4.38752563317243621e-01 -6.68806683479245800e-02 7.05093389737137913e-01 -1.25882018902988202e+00 1.40786482485456619e+00 -8.94909591383391215e-01 -1.87760233197531648e-01 1.20283779104093503e+00 -1.25080046250530441e+00 7.18021820624149161e-02 1.21530697378740845e+00 -9.84280856158928700e-01 -6.29491337742059378e-01 1.47680526082349779e+00 -7.15793819725440137e-01 \n-1.98762996148395352e-01 2.87660048905500883e-01 -2.22670521728035860e-01 -3.90286960261353920e-04 3.76528638779133217e-01 -8.48102490683868660e-01 1.27404440155053945e+00 -1.43309715114530315e+00 1.10230970509026114e+00 -2.30496198290442772e-01 -8.63868498635530273e-01 1.48353836307146807e+00 -9.84450378588905920e-01 -4.43327132698852036e-01 1.46972014617558941e+00 -7.95463973752526450e-01 -9.52203164168486542e-01 1.62056536320539751e+00 -7.24315316911098228e-01 \n2.79918365849821516e-01 -4.81384871625607194e-01 6.00113424463092779e-01 -6.37519386396255073e-01 5.50158834274326548e-01 -2.90966301367037555e-01 -1.41880904864040717e-01 6.44052320300606713e-01 -9.76142459546725633e-01 8.46791698060213906e-01 -1.56389876209695216e-01 -7.24575795411670747e-01 1.01904262683465143e+00 -2.60264720394439452e-01 -8.47513526448191137e-01 8.61013841900611870e-01 3.92400081044502570e-01 -1.17511177112962478e+00 6.00181069739940526e-01 \n1.87915281079072262e-01 -2.99782995765854374e-01 3.14565361049652210e-01 -2.29707085399454923e-01 2.98071548312910762e-02 2.78132156946533661e-01 -6.31188525607332646e-01 8.88155842094635060e-01 -8.55640335921997420e-01 4.02301041807068723e-01 3.56588756522697916e-01 -9.56033873205045817e-01 8.15931413674907783e-01 1.29863305005807074e-01 -9.95876662546498424e-01 6.69316771064098682e-01 5.96172820979064435e-01 -1.17692164168135785e+00 5.49709379669401001e-01 \n-7.77258448245817396e-02 1.36138972230363358e-01 -1.76018504357397519e-01 1.98074140637741204e-01 -1.88154800569347266e-01 1.27426572505913384e-01 -6.33629277846806658e-03 -1.53921404615538814e-01 2.84281095249059184e-01 -2.83427542217513653e-01 9.28857513334031257e-02 1.95940018065799791e-01 -3.29893729205397205e-01 1.15857592103049388e-01 2.55320025597598753e-01 -2.93116671882476618e-01 -1.10102663581220898e-01 3.85218025159435796e-01 -2.02426739622272985e-01 \n-6.30351538553337620e-02 1.03072819784679658e-01 -1.14981949085567228e-01 9.81428315209078722e-02 -4.55104560469120839e-02 -4.54109117012146250e-02 1.60973451558643989e-01 -2.60749803567280630e-01 2.80115792051904703e-01 -1.62882164421701983e-01 -7.43261699581511984e-02 2.91349189844023096e-01 -2.82529421492489071e-01 -1.09436361107185456e-02 3.16356680732218365e-01 -2.37417904319193072e-01 -1.81458104151399004e-01 3.92194940859233859e-01 -1.87794903680782291e-01 \n1.22616459702089202e-02 -2.17150440424877034e-02 2.86836810837022855e-02 -3.33393604334128688e-02 3.32877415844400807e-02 -2.50076735968446576e-02 6.01229169446875680e-03 2.13636987122985436e-02 -4.62194519478109009e-02 5.04091800080718711e-02 -2.08399799041418004e-02 -3.00745720180039448e-02 5.81106116905532310e-02 -2.42148105544069790e-02 -4.29178411513906289e-02 5.38147088674744800e-02 1.74633669607195873e-02 -6.92295885177470414e-02 3.71393345882694282e-02 \n1.20977369216231315e-02 -2.00205388231157684e-02 2.29727784853126721e-02 -2.08718273122686976e-02 1.21967146019551100e-02 4.01439398898721851e-03 -2.59349779073752585e-02 4.65878677632753404e-02 -5.36151295252949402e-02 3.47976444787688922e-02 9.32136043489662297e-03 -5.35675722870996647e-02 5.65251626525292723e-02 -1.88957492815829647e-03 -6.01724587730064909e-02 4.85996332610543576e-02 3.35198093795074255e-02 -7.74442050757106655e-02 3.77397098715110702e-02 \n-1.17086448226299244e-03 2.08869005937404666e-03 -2.79747084702418181e-03 3.31856745470835583e-03 -3.41495739536464278e-03 2.71673578045168559e-03 -9.21179588214467028e-04 -1.82410383355050384e-03 4.49350720983270957e-03 -5.21667100321207033e-03 2.45765233020475457e-03 2.78454142601957963e-03 -6.00250750895820494e-03 2.79047866910311521e-03 4.28762811359165148e-03 -5.74988437677382395e-03 -1.66007466932824444e-03 7.30003346593538065e-03 -3.97878544573988209e-03 \n-1.51638486525799435e-03 2.52629140525032732e-03 -2.94363770425825273e-03 2.76141959593575081e-03 -1.77794206477527110e-03 -1.61836151077398207e-04 2.88868917526961038e-03 -5.59080669389200583e-03 6.72777128200573358e-03 -4.65651511696894019e-03 -7.73964490127331605e-04 6.55623021917679153e-03 -7.32464419591484222e-03 5.82916873771194705e-04 7.55570033133945876e-03 -6.41633141390425241e-03 -4.12369083156724017e-03 1.00030919413873304e-02 -4.93596045320364464e-03 \n"
  },
  {
    "path": "src/madness/mra/b-spline-deriv2.txt",
    "content": "1\n1.00000000000000000e+00 \n-2.00000000000000000e+00 \n1.00000000000000000e+00 \n2\n2.31578947368421053e+00 2.27901422048536486e+00 \n2.54713354054246661e-01 1.32352941176470588e+00 \n-4.63157894736842105e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -8.82352941176470588e-01 \n2.31578947368421053e+00 -2.27901422048536486e+00 \n-2.54713354054246661e-01 1.32352941176470588e+00 \n3\n2.32010412577732785e+00 2.71081356377456561e+00 1.26796598926588699e+00 \n-6.38808004826369598e-02 1.77127050743990843e+00 3.30136981787551973e+00 \n-1.47525142642973130e+00 -3.31219571358351586e+00 -3.67730305972770283e+00 \n-4.64020825155465570e+00 0.00000000000000000e+00 4.03770041876405634e+00 \n0.00000000000000000e+00 -3.98512018313620755e+00 0.00000000000000000e+00 \n2.95050285285946260e+00 0.00000000000000000e+00 -4.37255955209387848e+00 \n2.32010412577732785e+00 -2.71081356377456561e+00 1.26796598926588699e+00 \n6.38808004826369598e-02 1.77127050743990843e+00 -3.30136981787551973e+00 \n-1.47525142642973130e+00 3.31219571358351586e+00 -3.67730305972770283e+00 \n4\n2.04749747155493384e+00 2.07162117888911845e+00 1.50186781753387885e-01 -1.06719974064584315e+00 \n-1.39706348467954633e+00 1.91435837990369860e-01 4.28057219429975629e+00 5.08784517063697953e+00 \n-1.40121999153293475e+00 -4.32085044382880987e+00 -7.71646597027268175e+00 -6.56907865688135345e+00 \n3.06653710840826116e-01 2.58467520596266334e-01 -6.34236187960396460e-01 -1.26129426147779234e+00 \n-4.09499494310986767e+00 0.00000000000000000e+00 3.68573710657393854e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.00620114234375319e+01 0.00000000000000000e+00 2.59083363247947286e+00 \n2.80243998306586951e+00 0.00000000000000000e+00 -1.39067174710704000e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.60762418883085075e+00 0.00000000000000000e+00 -4.76622460656803150e-01 \n2.04749747155493384e+00 -2.07162117888911845e+00 1.50186781753387885e-01 1.06719974064584315e+00 \n1.39706348467954633e+00 1.91435837990369860e-01 -4.28057219429975629e+00 5.08784517063697953e+00 \n-1.40121999153293475e+00 4.32085044382880987e+00 -7.71646597027268175e+00 6.56907865688135345e+00 \n-3.06653710840826116e-01 2.58467520596266334e-01 6.34236187960396460e-01 -1.26129426147779234e+00 \n5\n2.46052766266833418e+00 2.48341605111240827e+00 -2.92634544141388817e-01 -3.38441537886993691e+00 -3.16171050810677238e+00 \n-3.08201658575662870e+00 -2.73364143023087496e+00 1.49980407918824182e+00 5.87822931118892870e+00 5.07670329807149444e+00 \n4.04755544890521359e-01 -1.88379613311361453e+00 -7.03734589159499375e+00 -1.08532550615905944e+01 -7.65752197433652779e+00 \n1.32008317539616334e+00 1.94510787812544247e+00 6.96716904853967389e-01 -2.54722463294724709e+00 -3.53265739788841039e+00 \n-5.39823952137630430e-01 -2.41090478145474796e-01 1.56584247957326251e+00 4.06363491243699148e+00 3.72776467083627719e+00 \n-4.92105532533666837e+00 0.00000000000000000e+00 -1.31884522010370147e-01 0.00000000000000000e+00 1.16169850232701611e+00 \n0.00000000000000000e+00 -1.58855544047400209e+01 0.00000000000000000e+00 7.14229859123888210e+00 0.00000000000000000e+00 \n-8.09511089781042719e-01 0.00000000000000000e+00 -2.59696833733479310e+01 0.00000000000000000e+00 9.07269369034329155e+00 \n0.00000000000000000e+00 5.25558876376116543e+00 0.00000000000000000e+00 -3.01538243117679287e+00 0.00000000000000000e+00 \n1.07964790427526086e+00 0.00000000000000000e+00 7.61835404805506125e+00 0.00000000000000000e+00 -2.97956498803642154e+00 \n2.46052766266833418e+00 -2.48341605111240827e+00 -2.92634544141388817e-01 3.38441537886993691e+00 -3.16171050810677238e+00 \n3.08201658575662870e+00 -2.73364143023087496e+00 -1.49980407918824182e+00 5.87822931118892870e+00 -5.07670329807149444e+00 \n4.04755544890521359e-01 1.88379613311361453e+00 -7.03734589159499375e+00 1.08532550615905944e+01 -7.65752197433652779e+00 \n-1.32008317539616334e+00 1.94510787812544247e+00 -6.96716904853967389e-01 -2.54722463294724709e+00 3.53265739788841039e+00 \n-5.39823952137630430e-01 2.41090478145474796e-01 1.56584247957326251e+00 -4.06363491243699148e+00 3.72776467083627719e+00 \n6\n3.49515667139335456e+00 4.21512420293994380e+00 1.48227221045310502e+00 -2.89207646206817811e+00 -5.62258952118995620e+00 -3.80804005730444682e+00 \n-3.83965811876974477e+00 -4.36921009599097506e+00 -1.13571043858159200e+00 3.07349909665868966e+00 4.75717137168314738e+00 2.68678480591986609e+00 \n2.56626613507519520e+00 1.84641201380918841e+00 -2.83529232006997471e+00 -8.54010381834580667e+00 -1.05700397688776406e+01 -6.07946073029857689e+00 \n2.81900021556521891e+00 4.96409098884545945e+00 4.96376179826097603e+00 6.64976935969598392e-01 -6.09187055896402616e+00 -6.54343715588697384e+00 \n-2.39640299131628878e+00 -3.30401949025223685e+00 -1.43577563037494306e+00 3.58517365125926657e+00 8.59952753294178995e+00 6.80835327051489373e+00 \n-2.69422553496501742e-01 -5.08427873942884559e-01 -6.16117960616309379e-01 -2.35562170855836832e-01 6.77981852523741214e-01 8.98136013514507166e-01 \n-6.99031334278670911e+00 0.00000000000000000e+00 -4.61620024114910021e+00 0.00000000000000000e+00 5.46154547582087684e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.78635115896321803e+01 0.00000000000000000e+00 1.20870792079932253e+01 0.00000000000000000e+00 -1.68399933241730193e+00 \n-5.13253227015039040e+00 0.00000000000000000e+00 -3.45850697575844337e+01 0.00000000000000000e+00 1.84375113046810794e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 9.60242442193538745e+00 0.00000000000000000e+00 -1.06639301275196408e+01 0.00000000000000000e+00 1.76152772600973264e+00 \n4.79280598263257756e+00 0.00000000000000000e+00 1.59881412963880771e+01 0.00000000000000000e+00 -1.06714355441153409e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 -8.49758457557770429e-01 0.00000000000000000e+00 1.12499339153498045e+00 0.00000000000000000e+00 -1.95424020072138827e-01 \n3.49515667139335456e+00 -4.21512420293994380e+00 1.48227221045310502e+00 2.89207646206817811e+00 -5.62258952118995620e+00 3.80804005730444682e+00 \n3.83965811876974477e+00 -4.36921009599097506e+00 1.13571043858159200e+00 3.07349909665868966e+00 -4.75717137168314738e+00 2.68678480591986609e+00 \n2.56626613507519520e+00 -1.84641201380918841e+00 -2.83529232006997471e+00 8.54010381834580667e+00 -1.05700397688776406e+01 6.07946073029857689e+00 \n-2.81900021556521891e+00 4.96409098884545945e+00 -4.96376179826097603e+00 6.64976935969598392e-01 6.09187055896402616e+00 -6.54343715588697384e+00 \n-2.39640299131628878e+00 3.30401949025223685e+00 -1.43577563037494306e+00 -3.58517365125926657e+00 8.59952753294178995e+00 -6.80835327051489373e+00 \n2.69422553496501742e-01 -5.08427873942884559e-01 6.16117960616309379e-01 -2.35562170855836832e-01 -6.77981852523741214e-01 8.98136013514507166e-01 \n7\n4.23424075200562276e+00 5.66164997966357556e+00 3.62198642916375399e+00 -4.45212305399003952e-01 -4.20129293848172280e+00 -5.12479836840992792e+00 -2.66752480294250158e+00 \n-3.66920473674141022e+00 -4.11071228162372484e+00 -9.65552844879677465e-01 2.79020505989944392e+00 3.50758705134352273e+00 6.59490345849756529e-01 -1.18933584557050265e+00 \n3.38030274752649730e+00 3.52685826462231970e+00 -1.12249509368295067e-01 -4.92501201593124709e+00 -7.34881834502361178e+00 -5.56635789274019865e+00 -1.87911312604972227e+00 \n3.54868475258809043e+00 7.12042562932757885e+00 9.73772362928795486e+00 8.02551043484451484e+00 -5.11378459454294791e-01 -1.03161778558219550e+01 -9.09875133085516546e+00 \n-4.83556618801626656e+00 -7.92968648213034612e+00 -7.87302724940791947e+00 -2.92595599375696401e+00 6.64984584910518385e+00 1.40357734976799458e+01 9.79222845034380153e+00 \n-5.29757144474657201e-01 -1.19759514099409624e+00 -2.00711497548256931e+00 -2.19167629312816784e+00 -4.72431346426601796e-01 2.44930515573265492e+00 2.61705343712364118e+00 \n1.03014222027611828e+00 1.78435691690634658e+00 2.02753286949420613e+00 1.19833586635283189e+00 -1.13714489833577108e+00 -3.52390111509179791e+00 -2.78260452950847156e+00 \n-8.46848150401124551e+00 0.00000000000000000e+00 -6.31785465017249464e+00 0.00000000000000000e+00 1.08903687722663548e+01 0.00000000000000000e+00 -2.69959700759615599e+00 \n0.00000000000000000e+00 -1.71995715463865878e+01 0.00000000000000000e+00 1.28316142502852954e+01 0.00000000000000000e+00 -2.17885529446852452e+00 0.00000000000000000e+00 \n-6.76060549505299460e+00 0.00000000000000000e+00 -3.58406884239811540e+01 0.00000000000000000e+00 2.56231019451050395e+01 0.00000000000000000e+00 -5.28820552449767770e+00 \n0.00000000000000000e+00 1.03451579074550965e+01 0.00000000000000000e+00 -2.50989670016115997e+01 0.00000000000000000e+00 6.54809173867237976e+00 0.00000000000000000e+00 \n9.67113237603253311e+00 0.00000000000000000e+00 2.26517362283150185e+01 0.00000000000000000e+00 -2.67107506457704322e+01 0.00000000000000000e+00 6.55536250749463428e+00 \n0.00000000000000000e+00 -1.27507487762265715e+00 0.00000000000000000e+00 4.97710196161089839e+00 0.00000000000000000e+00 -1.40361864962120738e+00 0.00000000000000000e+00 \n-2.06028444055223657e+00 0.00000000000000000e+00 -4.05354361987479657e+00 0.00000000000000000e+00 5.66684097026991363e+00 0.00000000000000000e+00 -1.45523367156149493e+00 \n4.23424075200562276e+00 -5.66164997966357556e+00 3.62198642916375399e+00 4.45212305399003952e-01 -4.20129293848172280e+00 5.12479836840992792e+00 -2.66752480294250158e+00 \n3.66920473674141022e+00 -4.11071228162372484e+00 9.65552844879677465e-01 2.79020505989944392e+00 -3.50758705134352273e+00 6.59490345849756529e-01 1.18933584557050265e+00 \n3.38030274752649730e+00 -3.52685826462231970e+00 -1.12249509368295067e-01 4.92501201593124709e+00 -7.34881834502361178e+00 5.56635789274019865e+00 -1.87911312604972227e+00 \n-3.54868475258809043e+00 7.12042562932757885e+00 -9.73772362928795486e+00 8.02551043484451484e+00 5.11378459454294791e-01 -1.03161778558219550e+01 9.09875133085516546e+00 \n-4.83556618801626656e+00 7.92968648213034612e+00 -7.87302724940791947e+00 2.92595599375696401e+00 6.64984584910518385e+00 -1.40357734976799458e+01 9.79222845034380153e+00 \n5.29757144474657201e-01 -1.19759514099409624e+00 2.00711497548256931e+00 -2.19167629312816784e+00 4.72431346426601796e-01 2.44930515573265492e+00 -2.61705343712364118e+00 \n1.03014222027611828e+00 -1.78435691690634658e+00 2.02753286949420613e+00 -1.19833586635283189e+00 -1.13714489833577108e+00 3.52390111509179791e+00 -2.78260452950847156e+00 \n8\n4.24938016361129496e+00 5.80154287994482686e+00 4.09812512233361719e+00 5.93055045971972999e-01 -2.57738538342318407e+00 -3.43997335512254964e+00 -1.94612578988401200e+00 -3.21623472602909915e-01 \n-3.86560095793636138e+00 -4.13633169116312015e+00 -1.58777548647937525e-01 5.03239682760314794e+00 6.72467530763080487e+00 2.01439198587060423e+00 -4.83021255634630327e+00 -4.83823373789585118e+00 \n2.97843509879944952e+00 2.79630940349570295e+00 -1.05693253541431030e+00 -5.74167683229995251e+00 -7.15929627299744753e+00 -3.13218179026128634e+00 2.66856901344254846e+00 3.25455801568559117e+00 \n2.45565723845061041e+00 6.07487812727258292e+00 1.07718808331181308e+01 1.33341670836532328e+01 9.05073885033468885e+00 -2.78989031665242324e+00 -1.30926081548744420e+01 -9.71153039523347882e+00 \n-6.12814427299207824e+00 -1.10229455080315502e+01 -1.38234799785266881e+01 -1.22030302674410375e+01 -3.49686533154322787e+00 1.01049992773192459e+01 1.82388372689963405e+01 1.13065819648699752e+01 \n-1.27268229469113626e-01 -9.37328500481169400e-01 -2.86057547623657151e+00 -5.10843254595241438e+00 -5.07245948861764027e+00 -3.06529068753261212e-01 5.95691305102877071e+00 5.35674637263334877e+00 \n1.69795152011352030e+00 3.29443356729975066e+00 4.75525341796346117e+00 5.19608415516809898e+00 2.82409616950333889e+00 -2.82583564131706882e+00 -7.59567601073100937e+00 -5.37353546133043671e+00 \n-1.31035358323057678e-02 3.97791261929929515e-02 2.07277607489719640e-01 4.48002076631162357e-01 5.25041752347535288e-01 1.06205310627550751e-01 -5.85531690654949760e-01 -5.85417927940098404e-01 \n-8.49876032722258992e+00 0.00000000000000000e+00 -5.50915358622004403e+00 0.00000000000000000e+00 1.37503155426946913e+01 0.00000000000000000e+00 -4.32103760323369533e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.85090056614045613e+01 0.00000000000000000e+00 6.92399183508251582e+00 0.00000000000000000e+00 7.28144784915940779e-01 0.00000000000000000e+00 -2.65505689392511224e-01 \n-5.95687019759889904e+00 0.00000000000000000e+00 -3.44856960966856222e+01 0.00000000000000000e+00 2.42822814326075397e+01 0.00000000000000000e+00 -5.28587970523467779e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 4.86353615733778953e+00 0.00000000000000000e+00 -4.26603178345345505e+01 0.00000000000000000e+00 1.65514202480961171e+01 0.00000000000000000e+00 -2.10182637266922925e+00 \n1.22562885459841565e+01 0.00000000000000000e+00 2.13155884860569699e+01 0.00000000000000000e+00 -4.97344121322369706e+01 0.00000000000000000e+00 1.73942800363449248e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 9.92916842442981025e-01 0.00000000000000000e+00 1.36151864709279193e+01 0.00000000000000000e+00 -6.00484744214107635e+00 0.00000000000000000e+00 8.07882372867496927e-01 \n-3.39590304022704061e+00 0.00000000000000000e+00 -4.03418172824761367e+00 0.00000000000000000e+00 1.54395590466448221e+01 0.00000000000000000e+00 -5.83651120000066099e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.70342211667397606e-01 0.00000000000000000e+00 -1.16216051054520007e+00 0.00000000000000000e+00 5.42540709866240851e-01 0.00000000000000000e+00 -7.48659910950367544e-02 \n4.24938016361129496e+00 -5.80154287994482686e+00 4.09812512233361719e+00 -5.93055045971972999e-01 -2.57738538342318407e+00 3.43997335512254964e+00 -1.94612578988401200e+00 3.21623472602909915e-01 \n3.86560095793636138e+00 -4.13633169116312015e+00 1.58777548647937525e-01 5.03239682760314794e+00 -6.72467530763080487e+00 2.01439198587060423e+00 4.83021255634630327e+00 -4.83823373789585118e+00 \n2.97843509879944952e+00 -2.79630940349570295e+00 -1.05693253541431030e+00 5.74167683229995251e+00 -7.15929627299744753e+00 3.13218179026128634e+00 2.66856901344254846e+00 -3.25455801568559117e+00 \n-2.45565723845061041e+00 6.07487812727258292e+00 -1.07718808331181308e+01 1.33341670836532328e+01 -9.05073885033468885e+00 -2.78989031665242324e+00 1.30926081548744420e+01 -9.71153039523347882e+00 \n-6.12814427299207824e+00 1.10229455080315502e+01 -1.38234799785266881e+01 1.22030302674410375e+01 -3.49686533154322787e+00 -1.01049992773192459e+01 1.82388372689963405e+01 -1.13065819648699752e+01 \n1.27268229469113626e-01 -9.37328500481169400e-01 2.86057547623657151e+00 -5.10843254595241438e+00 5.07245948861764027e+00 -3.06529068753261212e-01 -5.95691305102877071e+00 5.35674637263334877e+00 \n1.69795152011352030e+00 -3.29443356729975066e+00 4.75525341796346117e+00 -5.19608415516809898e+00 2.82409616950333889e+00 2.82583564131706882e+00 -7.59567601073100937e+00 5.37353546133043671e+00 \n1.31035358323057678e-02 3.97791261929929515e-02 -2.07277607489719640e-01 4.48002076631162357e-01 -5.25041752347535288e-01 1.06205310627550751e-01 5.85531690654949760e-01 -5.85417927940098404e-01 \n9\n4.16072096891167806e+00 5.56578201642954251e+00 3.59462451580959258e+00 -2.68748147255219202e-01 -3.63467568426506478e+00 -3.97646875808696333e+00 -8.18866265677471258e-01 2.56160026327886294e+00 2.18183213877910167e+00 \n-5.22393772262839701e+00 -6.22428358686241686e+00 -1.93260417473049395e+00 5.06647048110363322e+00 1.01201452307891925e+01 8.24547620071519031e+00 -9.22484861726179060e-01 -9.01836030917971438e+00 -6.59246592573004072e+00 \n3.10798045081874232e+00 2.62410291421204154e+00 -2.31635804334112831e+00 -8.89929663759503151e+00 -1.22356519638641056e+01 -7.89772715214270888e+00 3.01001481757305951e+00 1.09896402836221854e+01 7.31877163517654129e+00 \n2.41125046202283185e-01 2.57108674447162061e+00 7.48276382499462917e+00 1.24897874164941301e+01 1.32786795840953577e+01 6.62297739574395195e+00 -5.07538952014450799e+00 -1.22185191786928515e+01 -7.53963380212339694e+00 \n-5.15802524827534504e+00 -1.01244244449195215e+01 -1.48049956872680835e+01 -1.71391064694163812e+01 -1.34521807985860718e+01 -2.03680116630325558e+00 1.24213449647897478e+01 1.85853687395167881e+01 1.01774330609834550e+01 \n1.73763147563080394e+00 1.91161003862482284e+00 -4.91987007268884429e-01 -5.28925334858249620e+00 -9.87519039894337128e+00 -8.82444254812721734e+00 8.72258889267266149e-01 1.11315866187964680e+01 8.66825629794312039e+00 \n1.27239534543436823e+00 3.13442139376936897e+00 6.08699781857786389e+00 9.34567037976745722e+00 1.01411674966307999e+01 4.94759354136165257e+00 -5.85712717125359955e+00 -1.34504982350085199e+01 -8.60296830417540846e+00 \n-3.48142276084045407e-01 -4.57411544888641971e-01 -1.61346877852468171e-01 6.03056430828278008e-01 1.54684642519686199e+00 1.68842039629544434e+00 1.05169662167835574e-01 -1.98301741982620832e+00 -1.70442695913216098e+00 \n-1.34295775093205541e-01 -4.06962249321082886e-01 -9.35716323976708791e-01 -1.62691065152633987e+00 -1.98990758416867217e+00 -1.21046985400215957e+00 9.29470415071412975e-01 2.71543178987943698e+00 1.86080074082908759e+00 \n-8.32144193782335612e+00 0.00000000000000000e+00 -5.77556813135590986e+00 0.00000000000000000e+00 1.17136912443765073e+01 0.00000000000000000e+00 -3.34281883370168880e+00 0.00000000000000000e+00 4.10607187676550684e-01 \n0.00000000000000000e+00 -2.37439350309473133e+01 0.00000000000000000e+00 -1.88473879396259984e+00 0.00000000000000000e+00 9.27824433899280857e+00 0.00000000000000000e+00 -2.22294101856435346e+00 0.00000000000000000e+00 \n-6.21596090163748464e+00 0.00000000000000000e+00 -3.81107231006611929e+01 0.00000000000000000e+00 1.36917563674474093e+01 0.00000000000000000e+00 1.83449959626936175e+00 0.00000000000000000e+00 -9.88642892750581312e-01 \n0.00000000000000000e+00 -3.47161016494425146e+00 0.00000000000000000e+00 -5.54789522694356134e+01 0.00000000000000000e+00 3.03099332670759295e+01 0.00000000000000000e+00 -5.43189427560409230e+00 0.00000000000000000e+00 \n1.03160504965506901e+01 0.00000000000000000e+00 1.11674233317486738e+01 0.00000000000000000e+00 -7.16108376681849921e+01 0.00000000000000000e+00 3.45601673362539071e+01 0.00000000000000000e+00 -6.53944099419591634e+00 \n0.00000000000000000e+00 8.21544392524408986e+00 0.00000000000000000e+00 2.60170083345274578e+01 0.00000000000000000e+00 -1.79108271102362942e+01 0.00000000000000000e+00 3.53325691902707774e+00 0.00000000000000000e+00 \n-2.54479069086873645e+00 0.00000000000000000e+00 2.24230195535740834e+00 0.00000000000000000e+00 3.12822937402768889e+01 0.00000000000000000e+00 -1.73546298992750514e+01 0.00000000000000000e+00 3.48706027411465841e+00 \n0.00000000000000000e+00 -1.49717735198366759e+00 0.00000000000000000e+00 -3.63012317519606594e+00 0.00000000000000000e+00 2.75185491316920103e+00 0.00000000000000000e+00 -5.63221201713659100e-01 0.00000000000000000e+00 \n2.68591550186411082e-01 0.00000000000000000e+00 -8.29665622276072131e-01 0.00000000000000000e+00 -5.22270571003276248e+00 0.00000000000000000e+00 3.06758284177875260e+00 0.00000000000000000e+00 -6.31071509725899802e-01 \n4.16072096891167806e+00 -5.56578201642954251e+00 3.59462451580959258e+00 2.68748147255219202e-01 -3.63467568426506478e+00 3.97646875808696333e+00 -8.18866265677471258e-01 -2.56160026327886294e+00 2.18183213877910167e+00 \n5.22393772262839701e+00 -6.22428358686241686e+00 1.93260417473049395e+00 5.06647048110363322e+00 -1.01201452307891925e+01 8.24547620071519031e+00 9.22484861726179060e-01 -9.01836030917971438e+00 6.59246592573004072e+00 \n3.10798045081874232e+00 -2.62410291421204154e+00 -2.31635804334112831e+00 8.89929663759503151e+00 -1.22356519638641056e+01 7.89772715214270888e+00 3.01001481757305951e+00 -1.09896402836221854e+01 7.31877163517654129e+00 \n-2.41125046202283185e-01 2.57108674447162061e+00 -7.48276382499462917e+00 1.24897874164941301e+01 -1.32786795840953577e+01 6.62297739574395195e+00 5.07538952014450799e+00 -1.22185191786928515e+01 7.53963380212339694e+00 \n-5.15802524827534504e+00 1.01244244449195215e+01 -1.48049956872680835e+01 1.71391064694163812e+01 -1.34521807985860718e+01 2.03680116630325558e+00 1.24213449647897478e+01 -1.85853687395167881e+01 1.01774330609834550e+01 \n-1.73763147563080394e+00 1.91161003862482284e+00 4.91987007268884429e-01 -5.28925334858249620e+00 9.87519039894337128e+00 -8.82444254812721734e+00 -8.72258889267266149e-01 1.11315866187964680e+01 -8.66825629794312039e+00 \n1.27239534543436823e+00 -3.13442139376936897e+00 6.08699781857786389e+00 -9.34567037976745722e+00 1.01411674966307999e+01 -4.94759354136165257e+00 -5.85712717125359955e+00 1.34504982350085199e+01 -8.60296830417540846e+00 \n3.48142276084045407e-01 -4.57411544888641971e-01 1.61346877852468171e-01 6.03056430828278008e-01 -1.54684642519686199e+00 1.68842039629544434e+00 -1.05169662167835574e-01 -1.98301741982620832e+00 1.70442695913216098e+00 \n-1.34295775093205541e-01 4.06962249321082886e-01 -9.35716323976708791e-01 1.62691065152633987e+00 -1.98990758416867217e+00 1.21046985400215957e+00 9.29470415071412975e-01 -2.71543178987943698e+00 1.86080074082908759e+00 \n10\n4.74211098949988092e+00 6.43661970511418545e+00 4.29753189972015473e+00 -3.28955813556438189e-01 -5.10360712735111244e+00 -6.95825151564384835e+00 -3.86835629175051924e+00 2.47313766513782224e+00 6.25318606835967386e+00 3.71632249750083138e+00 \n-6.88675816197045230e+00 -9.15997559004860964e+00 -5.62310085274361910e+00 1.59524328597525737e+00 8.80279492242660221e+00 1.13039377929976495e+01 6.18587773793640417e+00 -3.71990143264150788e+00 -9.49986372738295377e+00 -5.62361429918637815e+00 \n4.83558961821189056e+00 5.28007235054643514e+00 4.24484249619111582e-02 -8.45173189663479354e+00 -1.55733111480682682e+01 -1.56839632150189580e+01 -5.95809430103169269e+00 8.61655168072910228e+00 1.56105209203170710e+01 8.60764948289345074e+00 \n-1.17161083345531640e+00 2.19770380528406087e-02 4.12530393950811141e+00 9.01212444757477281e+00 1.12730286801415907e+01 8.29736914897600943e+00 9.71173106853688675e-01 -5.69986490593747048e+00 -6.68383798086235751e+00 -2.85921548115278082e+00 \n-3.01673402733040915e+00 -6.70678949022612198e+00 -1.13841504037167788e+01 -1.54314266554386839e+01 -1.56985492326353679e+01 -9.70830762262793173e+00 1.49310131703698632e+00 1.18096223270539333e+01 1.35317162508680924e+01 6.23902380089082716e+00 \n4.83279736709622991e+00 7.31663793377848418e+00 6.13787075513520101e+00 6.07891425883300833e-01 -8.33995458917341092e+00 -1.53834409357911237e+01 -1.21336637355184778e+01 3.39669582022219153e+00 1.68024054757355071e+01 1.15349135187016884e+01 \n-1.18284700517309412e+00 -6.31260730076080352e-01 2.76771473562396327e+00 8.77605641937434798e+00 1.49630485674690462e+01 1.60255565145480957e+01 6.75507312682827818e+00 -1.01949015443616325e+01 -2.00418966045576984e+01 -1.16727088148014396e+01 \n-1.27527285120548005e+00 -2.05680939263272253e+00 -2.06845719997688106e+00 -9.79416041025744360e-01 1.38063446158287557e+00 3.91804710758531865e+00 3.90916368216671998e+00 -3.18086909201070597e-01 -4.88931384723821415e+00 -3.69409410729354611e+00 \n5.54861252872490766e-01 6.27759786058332353e-01 -9.11348935200030808e-02 -1.66492731299528044e+00 -3.65596410534654629e+00 -4.62148258358324863e+00 -2.59492068097196561e+00 2.39856660965023781e+00 5.95223638600536789e+00 3.72472947256842066e+00 \n1.08629268853422608e-01 1.79524000839459574e-01 1.92388921217671786e-01 1.15860574708973146e-01 -8.11645778736715396e-02 -3.27009069789344326e-01 -3.72694180679470429e-01 -6.56918116740879514e-03 4.49505764421671109e-01 3.61066970504487332e-01 \n-9.48422197899976184e+00 0.00000000000000000e+00 -9.29075472677819580e+00 0.00000000000000000e+00 7.19637432291493707e+00 0.00000000000000000e+00 2.19837597265057873e+00 0.00000000000000000e+00 -1.30755200465403551e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.93929089637926965e+01 0.00000000000000000e+00 -6.78877084370604836e+00 0.00000000000000000e+00 2.13503878634653644e+01 0.00000000000000000e+00 -6.46824046712407763e+00 0.00000000000000000e+00 7.66484541921866601e-01 \n-9.67117923642378112e+00 0.00000000000000000e+00 -4.80388528995459568e+01 0.00000000000000000e+00 1.89393926654928696e+00 0.00000000000000000e+00 1.75829550163627361e+01 0.00000000000000000e+00 -6.06608810191648005e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -8.16111203707658589e+00 0.00000000000000000e+00 -5.88067683026130948e+01 0.00000000000000000e+00 4.11272467963627620e+01 0.00000000000000000e+00 -9.50826206202126530e+00 0.00000000000000000e+00 9.95676475055319242e-01 \n6.03346805466081831e+00 0.00000000000000000e+00 -1.85366939455209338e-01 0.00000000000000000e+00 -8.32355088606941477e+01 0.00000000000000000e+00 5.27743146920247228e+01 0.00000000000000000e+00 -1.27954126006850511e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.88493264624261074e+01 0.00000000000000000e+00 3.60525248932558535e+01 0.00000000000000000e+00 -3.99920889354878446e+01 0.00000000000000000e+00 1.10712215447975961e+01 0.00000000000000000e+00 -1.28412293447863795e+00 \n2.36569401034618825e+00 0.00000000000000000e+00 1.64242370765435011e+01 0.00000000000000000e+00 4.83176905936754277e+01 0.00000000000000000e+00 -4.00099329179793648e+01 0.00000000000000000e+00 1.08071913410566900e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 -4.72173070193902061e+00 0.00000000000000000e+00 -6.93851656704382713e+00 0.00000000000000000e+00 9.25129084669831533e+00 0.00000000000000000e+00 -2.70608494664151330e+00 0.00000000000000000e+00 3.23133171732730087e-01 \n-1.10972250574498153e+00 0.00000000000000000e+00 -4.98100717971246280e+00 0.00000000000000000e+00 -1.05600525986324900e+01 0.00000000000000000e+00 9.72309524125962567e+00 0.00000000000000000e+00 -2.72648064202648763e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 3.93557649693830119e-01 0.00000000000000000e+00 5.13250563165073178e-01 0.00000000000000000e+00 -7.57776238904225543e-01 0.00000000000000000e+00 2.28022530581941309e-01 0.00000000000000000e+00 -2.76410098141535733e-02 \n4.74211098949988092e+00 -6.43661970511418545e+00 4.29753189972015473e+00 3.28955813556438189e-01 -5.10360712735111244e+00 6.95825151564384835e+00 -3.86835629175051924e+00 -2.47313766513782224e+00 6.25318606835967386e+00 -3.71632249750083138e+00 \n6.88675816197045230e+00 -9.15997559004860964e+00 5.62310085274361910e+00 1.59524328597525737e+00 -8.80279492242660221e+00 1.13039377929976495e+01 -6.18587773793640417e+00 -3.71990143264150788e+00 9.49986372738295377e+00 -5.62361429918637815e+00 \n4.83558961821189056e+00 -5.28007235054643514e+00 4.24484249619111582e-02 8.45173189663479354e+00 -1.55733111480682682e+01 1.56839632150189580e+01 -5.95809430103169269e+00 -8.61655168072910228e+00 1.56105209203170710e+01 -8.60764948289345074e+00 \n1.17161083345531640e+00 2.19770380528406087e-02 -4.12530393950811141e+00 9.01212444757477281e+00 -1.12730286801415907e+01 8.29736914897600943e+00 -9.71173106853688675e-01 -5.69986490593747048e+00 6.68383798086235751e+00 -2.85921548115278082e+00 \n-3.01673402733040915e+00 6.70678949022612198e+00 -1.13841504037167788e+01 1.54314266554386839e+01 -1.56985492326353679e+01 9.70830762262793173e+00 1.49310131703698632e+00 -1.18096223270539333e+01 1.35317162508680924e+01 -6.23902380089082716e+00 \n-4.83279736709622991e+00 7.31663793377848418e+00 -6.13787075513520101e+00 6.07891425883300833e-01 8.33995458917341092e+00 -1.53834409357911237e+01 1.21336637355184778e+01 3.39669582022219153e+00 -1.68024054757355071e+01 1.15349135187016884e+01 \n-1.18284700517309412e+00 6.31260730076080352e-01 2.76771473562396327e+00 -8.77605641937434798e+00 1.49630485674690462e+01 -1.60255565145480957e+01 6.75507312682827818e+00 1.01949015443616325e+01 -2.00418966045576984e+01 1.16727088148014396e+01 \n1.27527285120548005e+00 -2.05680939263272253e+00 2.06845719997688106e+00 -9.79416041025744360e-01 -1.38063446158287557e+00 3.91804710758531865e+00 -3.90916368216671998e+00 -3.18086909201070597e-01 4.88931384723821415e+00 -3.69409410729354611e+00 \n5.54861252872490766e-01 -6.27759786058332353e-01 -9.11348935200030808e-02 1.66492731299528044e+00 -3.65596410534654629e+00 4.62148258358324863e+00 -2.59492068097196561e+00 -2.39856660965023781e+00 5.95223638600536789e+00 -3.72472947256842066e+00 \n-1.08629268853422608e-01 1.79524000839459574e-01 -1.92388921217671786e-01 1.15860574708973146e-01 8.11645778736715396e-02 -3.27009069789344326e-01 3.72694180679470429e-01 -6.56918116740879514e-03 -4.49505764421671109e-01 3.61066970504487332e-01 \n11\n5.76945160124576483e+00 8.21316461933341088e+00 6.48148079998667534e+00 1.76473482086829244e+00 -4.00465873716091790e+00 -8.01526539000059892e+00 -7.57627205263500308e+00 -2.14709463072974197e+00 4.79526492037785262e+00 7.28794805584293379e+00 3.63732945479564124e+00 \n-7.55013484813528084e+00 -1.05048269839203211e+01 -7.78421177786648794e+00 -1.40605573214204734e+00 5.53030881338574929e+00 9.29925322649914965e+00 7.49425534428605696e+00 1.26492857153355474e+00 -4.57179374129855998e+00 -5.48933454249963808e+00 -2.32117317703531053e+00 \n7.00940107340403906e+00 9.06640921807749043e+00 4.77284138265647649e+00 -3.75931409896323147e+00 -1.27814389378885555e+01 -1.73142380006653137e+01 -1.33846403388272458e+01 -1.54202739975983192e+00 1.09135777685518485e+01 1.40128840650553381e+01 6.55705761850314053e+00 \n-9.43111511876915044e-01 3.76698268905734744e-01 4.44076673356323246e+00 9.03976557231208970e+00 1.06722778315398591e+01 6.86959007579945075e+00 -7.37512394035036223e-01 -5.88216780167576701e+00 -3.45318494290796731e+00 2.41194199614171793e+00 2.90812738374185173e+00 \n-1.96805825248220002e+00 -4.80846161878081170e+00 -8.81461997289852041e+00 -1.24786044919293111e+01 -1.31294411931300132e+01 -8.91570839164034817e+00 -1.01650582963179868e+00 5.88675462847397836e+00 7.10721114755871133e+00 3.41544608142362451e+00 3.58193006510887003e-01 \n7.47266449819537994e+00 1.24572332403220320e+01 1.39018924791553912e+01 1.05873194192947028e+01 1.30910906843294193e+00 -1.15212258932545670e+01 -1.97020407119534359e+01 -1.32692845212944861e+01 6.80437101171003388e+00 2.08166937709407160e+01 1.27220596026793433e+01 \n-5.11460914253993220e+00 -7.41736985476698339e+00 -5.53931708555111518e+00 8.81572410192973063e-01 1.09491159249028773e+01 2.02653744272386978e+01 2.09518295736769002e+01 7.12229479809307528e+00 -1.49558791244284307e+01 -2.52718974417384619e+01 -1.34569855552475046e+01 \n-2.57386402111602978e+00 -4.54489038953990719e+00 -5.72647509222407083e+00 -5.50978770942313530e+00 -2.71995415693772726e+00 2.78595308785929719e+00 8.01789287186154087e+00 7.19571668360323239e+00 -1.70065300124841066e+00 -9.69592528852818831e+00 -6.54501368902641543e+00 \n2.23126695681482008e+00 3.49337192885990627e+00 3.33978226281879969e+00 1.43763874669103871e+00 -2.40230753324061106e+00 -6.99477162325489438e+00 -8.97635925226123946e+00 -4.52557366964094604e+00 5.22303660656020656e+00 1.10958812264503791e+01 6.37850989792951016e+00 \n3.23522557348345982e-01 5.85473093219615374e-01 7.74725491995380789e-01 8.11581776993373456e-01 5.06549280648868400e-01 -2.42362624072802814e-01 -1.08982138261235380e+00 -1.13494720522935053e+00 1.36866624572451324e-01 1.45276191107607677e+00 1.03932593348413804e+00 \n-3.74956520819228597e-01 -6.01664090791514972e-01 -6.15267863113670423e-01 -3.52967605818447792e-01 2.53001202558420308e-01 1.06263590029541391e+00 1.52813358092011017e+00 8.97984005724002857e-01 -7.96953175356109397e-01 -1.94993639457017710e+00 -1.16973287804250547e+00 \n-1.15389032024915297e+01 0.00000000000000000e+00 -1.37029783879892446e+01 0.00000000000000000e+00 4.99996283948761858e+00 0.00000000000000000e+00 1.09122560816129768e+01 0.00000000000000000e+00 -5.32716334237242615e+00 0.00000000000000000e+00 1.01326211488218321e+00 \n0.00000000000000000e+00 -3.12992146760259014e+01 0.00000000000000000e+00 -5.89543363702438226e+00 0.00000000000000000e+00 3.01821795363142906e+01 0.00000000000000000e+00 -1.13964483831572775e+01 0.00000000000000000e+00 1.75745163450987671e+00 0.00000000000000000e+00 \n-1.40188021468080781e+01 0.00000000000000000e+00 -5.71714424995479321e+01 0.00000000000000000e+00 -2.10335631720078963e+00 0.00000000000000000e+00 3.61455479201233672e+01 0.00000000000000000e+00 -1.48631443002704300e+01 0.00000000000000000e+00 2.64908350286587973e+00 \n0.00000000000000000e+00 -7.28746476090713153e+00 0.00000000000000000e+00 -5.73072714346844021e+01 0.00000000000000000e+00 4.09705219867122533e+01 0.00000000000000000e+00 -1.01406677168935527e+01 0.00000000000000000e+00 1.21860264815709865e+00 0.00000000000000000e+00 \n3.93611650496440004e+00 0.00000000000000000e+00 -4.05458270110980023e+00 0.00000000000000000e+00 -8.34475077236948213e+01 0.00000000000000000e+00 6.20284522985101697e+01 0.00000000000000000e+00 -1.77903510601372225e+01 0.00000000000000000e+00 2.68979074787209161e+00 \n0.00000000000000000e+00 2.68576718345182840e+01 0.00000000000000000e+00 3.59956191653541882e+01 0.00000000000000000e+00 -6.97095789134587937e+01 0.00000000000000000e+00 2.63234161742714741e+01 0.00000000000000000e+00 -4.18573758389255526e+00 0.00000000000000000e+00 \n1.02292182850798644e+01 0.00000000000000000e+00 3.34085991431428152e+01 0.00000000000000000e+00 5.70277413089226633e+01 0.00000000000000000e+00 -7.35573597952908763e+01 0.00000000000000000e+00 2.62595027630748755e+01 0.00000000000000000e+00 -4.49542981458384836e+00 \n0.00000000000000000e+00 -8.74247224630617453e+00 0.00000000000000000e+00 -7.57885472866335122e+00 0.00000000000000000e+00 2.29054210400343394e+01 0.00000000000000000e+00 -9.43064672854614481e+00 0.00000000000000000e+00 1.56570491222234473e+00 0.00000000000000000e+00 \n-4.46253391362964015e+00 0.00000000000000000e+00 -1.24316544119503111e+01 0.00000000000000000e+00 -1.49425408905845664e+01 0.00000000000000000e+00 2.40163533377125230e+01 0.00000000000000000e+00 -9.10284773061491042e+00 0.00000000000000000e+00 1.60598501449888776e+00 \n0.00000000000000000e+00 1.07048384044857355e+00 0.00000000000000000e+00 7.12942519407516852e-01 0.00000000000000000e+00 -2.90164536901848678e+00 0.00000000000000000e+00 1.24663293790383626e+00 0.00000000000000000e+00 -2.11359853189108793e-01 0.00000000000000000e+00 \n7.49913041638457194e-01 0.00000000000000000e+00 1.97073494154440524e+00 0.00000000000000000e+00 2.03279902813951403e+00 0.00000000000000000e+00 -3.67457574719478022e+00 0.00000000000000000e+00 1.43283401100154876e+00 0.00000000000000000e+00 -2.56396200011364929e-01 \n5.76945160124576483e+00 -8.21316461933341088e+00 6.48148079998667534e+00 -1.76473482086829244e+00 -4.00465873716091790e+00 8.01526539000059892e+00 -7.57627205263500308e+00 2.14709463072974197e+00 4.79526492037785262e+00 -7.28794805584293379e+00 3.63732945479564124e+00 \n7.55013484813528084e+00 -1.05048269839203211e+01 7.78421177786648794e+00 -1.40605573214204734e+00 -5.53030881338574929e+00 9.29925322649914965e+00 -7.49425534428605696e+00 1.26492857153355474e+00 4.57179374129855998e+00 -5.48933454249963808e+00 2.32117317703531053e+00 \n7.00940107340403906e+00 -9.06640921807749043e+00 4.77284138265647649e+00 3.75931409896323147e+00 -1.27814389378885555e+01 1.73142380006653137e+01 -1.33846403388272458e+01 1.54202739975983192e+00 1.09135777685518485e+01 -1.40128840650553381e+01 6.55705761850314053e+00 \n9.43111511876915044e-01 3.76698268905734744e-01 -4.44076673356323246e+00 9.03976557231208970e+00 -1.06722778315398591e+01 6.86959007579945075e+00 7.37512394035036223e-01 -5.88216780167576701e+00 3.45318494290796731e+00 2.41194199614171793e+00 -2.90812738374185173e+00 \n-1.96805825248220002e+00 4.80846161878081170e+00 -8.81461997289852041e+00 1.24786044919293111e+01 -1.31294411931300132e+01 8.91570839164034817e+00 -1.01650582963179868e+00 -5.88675462847397836e+00 7.10721114755871133e+00 -3.41544608142362451e+00 3.58193006510887003e-01 \n-7.47266449819537994e+00 1.24572332403220320e+01 -1.39018924791553912e+01 1.05873194192947028e+01 -1.30910906843294193e+00 -1.15212258932545670e+01 1.97020407119534359e+01 -1.32692845212944861e+01 -6.80437101171003388e+00 2.08166937709407160e+01 -1.27220596026793433e+01 \n-5.11460914253993220e+00 7.41736985476698339e+00 -5.53931708555111518e+00 -8.81572410192973063e-01 1.09491159249028773e+01 -2.02653744272386978e+01 2.09518295736769002e+01 -7.12229479809307528e+00 -1.49558791244284307e+01 2.52718974417384619e+01 -1.34569855552475046e+01 \n2.57386402111602978e+00 -4.54489038953990719e+00 5.72647509222407083e+00 -5.50978770942313530e+00 2.71995415693772726e+00 2.78595308785929719e+00 -8.01789287186154087e+00 7.19571668360323239e+00 1.70065300124841066e+00 -9.69592528852818831e+00 6.54501368902641543e+00 \n2.23126695681482008e+00 -3.49337192885990627e+00 3.33978226281879969e+00 -1.43763874669103871e+00 -2.40230753324061106e+00 6.99477162325489438e+00 -8.97635925226123946e+00 4.52557366964094604e+00 5.22303660656020656e+00 -1.10958812264503791e+01 6.37850989792951016e+00 \n-3.23522557348345982e-01 5.85473093219615374e-01 -7.74725491995380789e-01 8.11581776993373456e-01 -5.06549280648868400e-01 -2.42362624072802814e-01 1.08982138261235380e+00 -1.13494720522935053e+00 -1.36866624572451324e-01 1.45276191107607677e+00 -1.03932593348413804e+00 \n-3.74956520819228597e-01 6.01664090791514972e-01 -6.15267863113670423e-01 3.52967605818447792e-01 2.53001202558420308e-01 -1.06263590029541391e+00 1.52813358092011017e+00 -8.97984005724002857e-01 -7.96953175356109397e-01 1.94993639457017710e+00 -1.16973287804250547e+00 \n12\n6.36827521517392724e+00 9.35857483888848693e+00 8.18959703760069947e+00 4.01654950568806634e+00 -1.53409167433770159e+00 -6.17338919718581018e+00 -7.63173572732347947e+00 -4.91908026165757791e+00 4.74898246309047535e-01 4.83317253100066499e+00 5.01885297512485035e+00 2.03550309978724934e+00 \n-7.34540044762485868e+00 -1.01631774555099994e+01 -7.39913252828302207e+00 -1.11485570018364829e+00 5.49701877709642391e+00 8.66829929872810141e+00 6.21722070162991909e+00 8.84411870437388685e-03 -4.27284755442862792e+00 -2.56317958464687978e+00 1.61292579211944602e+00 1.90068524126473582e+00 \n7.86741349737216638e+00 1.07409812096394321e+01 7.35234267586232640e+00 -2.19075089806769692e-01 -8.67775265272013906e+00 -1.38887727459832826e+01 -1.27083258847696217e+01 -5.34805883313707206e+00 3.66423738604940872e+00 8.23800871871931562e+00 6.31624248144996471e+00 2.01223370463419296e+00 \n-4.62368163483553695e-01 1.52400714482193821e+00 6.67439311316635048e+00 1.27302955518224033e+01 1.55442127717924118e+01 1.12701001521532172e+01 1.15145732077004093e-01 -1.08143808581554663e+01 -1.09841645698812634e+01 1.43924648257041666e+00 1.19549234280292608e+01 7.72734539696061810e+00 \n-2.76167104008773869e+00 -6.20910420551787560e+00 -1.06141428758761942e+01 -1.43597839253880294e+01 -1.44223866880957319e+01 -8.59838661482221512e+00 1.69143741894987935e+00 1.00965137828085722e+01 9.07443557067120047e+00 -1.17948952314996012e+00 -9.00786749705404847e+00 -5.65685358424508597e+00 \n7.91945818281015375e+00 1.39789832763956514e+01 1.77316296242025683e+01 1.79808468946679228e+01 1.23550646803691476e+01 3.01953251993774730e-01 -1.38556020012644123e+01 -2.04455639013603181e+01 -1.09379922437520012e+01 9.67484907168046529e+00 2.07677444657430076e+01 1.12920533201271062e+01 \n-8.37689700949724667e+00 -1.35586106831077388e+01 -1.44534430098970030e+01 -1.04541612099576679e+01 -8.36348824042920110e-01 1.25498784778908854e+01 2.34205735738632245e+01 2.25281880826436301e+01 5.23856365589415983e+00 -1.83871903637302943e+01 -2.66571328215785179e+01 -1.29691544634251138e+01 \n-3.13319803524717555e+00 -6.05405778193997520e+00 -8.99485997140665665e+00 -1.13118453310110607e+01 -1.08589649403932913e+01 -5.25872994452723495e+00 5.08879263186101555e+00 1.37956762477723817e+01 1.09551442529747833e+01 -4.52810983443531063e+00 -1.61352161001936410e+01 -9.84720832106304462e+00 \n4.41418888417751192e+00 7.55034893754184749e+00 9.09725713151034202e+00 8.53027028936525525e+00 4.60216246037743036e+00 -3.04559362196177767e+00 -1.17469718287705302e+01 -1.49670370278676207e+01 -6.55414445249990194e+00 9.74443605637718193e+00 1.79440294416905001e+01 9.52794884918630181e+00 \n4.87244220323204575e-01 9.90209559644230068e-01 1.58844004066075194e+00 2.18536184199637963e+00 2.35282002106746203e+00 1.47595074497794066e+00 -6.36914982334572440e-01 -2.81129594782605676e+00 -2.63514662340569950e+00 7.10339689674892932e-01 3.61304022685531811e+00 2.33292016575811230e+00 \n-9.18492568499943480e-01 -1.60377961898440978e+00 -2.01694959069141071e+00 -2.04328932709087245e+00 -1.35646394365625197e+00 2.60878627855548323e-01 2.37501054216264464e+00 3.49231353029357237e+00 1.85814750824220390e+00 -2.04780660946022256e+00 -4.31805339921377361e+00 -2.39635293769735018e+00 \n-3.39750625894521638e-02 -7.14476440410136600e-02 -1.20162664349640412e-01 -1.73894008120175438e-01 -1.98911692834450264e-01 -1.40205120152960840e-01 3.17394555392398477e-02 2.30877982383891963e-01 2.40192357631941347e-01 -4.55915381305281785e-02 -3.18758267169924403e-01 -2.13941459417472985e-01 \n-1.27365504303478545e+01 0.00000000000000000e+00 -1.54427157308724629e+01 0.00000000000000000e+00 6.65333847025484646e+00 0.00000000000000000e+00 1.80431527117177092e+01 0.00000000000000000e+00 -1.04146743732408003e+01 0.00000000000000000e+00 2.39314542329203076e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -3.05640721978817181e+01 0.00000000000000000e+00 -4.84413437215803692e+00 0.00000000000000000e+00 3.01941129816709839e+01 0.00000000000000000e+00 -1.23205193682637768e+01 0.00000000000000000e+00 2.14526508724637360e+00 0.00000000000000000e+00 -1.94276928695428409e-01 \n-1.57348269947443328e+01 0.00000000000000000e+00 -5.94109766109657143e+01 0.00000000000000000e+00 1.18426697057546552e+00 0.00000000000000000e+00 4.71966177828780785e+01 0.00000000000000000e+00 -2.31900063893843430e+01 0.00000000000000000e+00 4.97662004090302611e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -6.25139489346718785e+00 0.00000000000000000e+00 -6.10188761627650936e+01 0.00000000000000000e+00 2.86271771999903732e+01 0.00000000000000000e+00 -1.39061246165644349e+00 0.00000000000000000e+00 -8.96362784621280065e-01 0.00000000000000000e+00 1.62640301178693862e-01 \n5.52334208017547739e+00 0.00000000000000000e+00 -8.59332854051512052e-01 0.00000000000000000e+00 -8.24198057074574426e+01 0.00000000000000000e+00 5.54509764308552178e+01 0.00000000000000000e+00 -1.46344858645260395e+01 0.00000000000000000e+00 2.07061934129019340e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 2.69096492113858183e+01 0.00000000000000000e+00 2.43786106071982632e+01 0.00000000000000000e+00 -9.75745249812716126e+01 0.00000000000000000e+00 4.89723989028028305e+01 0.00000000000000000e+00 -1.01944207577016744e+01 0.00000000000000000e+00 1.06453417999898297e+00 \n1.67537940189944933e+01 0.00000000000000000e+00 4.36335263712555829e+01 0.00000000000000000e+00 5.06866103976709362e+01 0.00000000000000000e+00 -1.10206586433478288e+02 0.00000000000000000e+00 5.12077991048383866e+01 0.00000000000000000e+00 -1.10957402442734603e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 -9.59931718501240990e+00 0.00000000000000000e+00 -1.15148926583080661e-01 0.00000000000000000e+00 4.36878832264581325e+01 0.00000000000000000e+00 -2.53439267330773635e+01 0.00000000000000000e+00 5.64363952930164562e+00 0.00000000000000000e+00 -6.13147141975549098e-01 \n-8.82837776835502385e+00 0.00000000000000000e+00 -1.96701284169412768e+01 0.00000000000000000e+00 -1.21181179510047882e+01 0.00000000000000000e+00 4.73813489071052612e+01 0.00000000000000000e+00 -2.43176471715669767e+01 0.00000000000000000e+00 5.52585939669094102e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 1.39530786188783770e+00 0.00000000000000000e+00 -8.13987329822650399e-01 0.00000000000000000e+00 -7.69954235503669417e+00 0.00000000000000000e+00 4.77708953955499020e+00 0.00000000000000000e+00 -1.09581457017838944e+00 0.00000000000000000e+00 1.21129652403937446e-01 \n1.83698513699988696e+00 0.00000000000000000e+00 3.83399400005990741e+00 0.00000000000000000e+00 1.54383381733728832e+00 0.00000000000000000e+00 -9.34407260363878129e+00 0.00000000000000000e+00 5.02220731864852223e+00 0.00000000000000000e+00 -1.16587578468610106e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -9.24908502990277667e-02 0.00000000000000000e+00 9.73641990153316989e-02 0.00000000000000000e+00 5.92334788735653113e-01 0.00000000000000000e+00 -3.81847505048058113e-01 0.00000000000000000e+00 8.90715057537667446e-02 0.00000000000000000e+00 -9.94317433317343423e-03 \n6.36827521517392724e+00 -9.35857483888848693e+00 8.18959703760069947e+00 -4.01654950568806634e+00 -1.53409167433770159e+00 6.17338919718581018e+00 -7.63173572732347947e+00 4.91908026165757791e+00 4.74898246309047535e-01 -4.83317253100066499e+00 5.01885297512485035e+00 -2.03550309978724934e+00 \n7.34540044762485868e+00 -1.01631774555099994e+01 7.39913252828302207e+00 -1.11485570018364829e+00 -5.49701877709642391e+00 8.66829929872810141e+00 -6.21722070162991909e+00 8.84411870437388685e-03 4.27284755442862792e+00 -2.56317958464687978e+00 -1.61292579211944602e+00 1.90068524126473582e+00 \n7.86741349737216638e+00 -1.07409812096394321e+01 7.35234267586232640e+00 2.19075089806769692e-01 -8.67775265272013906e+00 1.38887727459832826e+01 -1.27083258847696217e+01 5.34805883313707206e+00 3.66423738604940872e+00 -8.23800871871931562e+00 6.31624248144996471e+00 -2.01223370463419296e+00 \n4.62368163483553695e-01 1.52400714482193821e+00 -6.67439311316635048e+00 1.27302955518224033e+01 -1.55442127717924118e+01 1.12701001521532172e+01 -1.15145732077004093e-01 -1.08143808581554663e+01 1.09841645698812634e+01 1.43924648257041666e+00 -1.19549234280292608e+01 7.72734539696061810e+00 \n-2.76167104008773869e+00 6.20910420551787560e+00 -1.06141428758761942e+01 1.43597839253880294e+01 -1.44223866880957319e+01 8.59838661482221512e+00 1.69143741894987935e+00 -1.00965137828085722e+01 9.07443557067120047e+00 1.17948952314996012e+00 -9.00786749705404847e+00 5.65685358424508597e+00 \n-7.91945818281015375e+00 1.39789832763956514e+01 -1.77316296242025683e+01 1.79808468946679228e+01 -1.23550646803691476e+01 3.01953251993774730e-01 1.38556020012644123e+01 -2.04455639013603181e+01 1.09379922437520012e+01 9.67484907168046529e+00 -2.07677444657430076e+01 1.12920533201271062e+01 \n-8.37689700949724667e+00 1.35586106831077388e+01 -1.44534430098970030e+01 1.04541612099576679e+01 -8.36348824042920110e-01 -1.25498784778908854e+01 2.34205735738632245e+01 -2.25281880826436301e+01 5.23856365589415983e+00 1.83871903637302943e+01 -2.66571328215785179e+01 1.29691544634251138e+01 \n3.13319803524717555e+00 -6.05405778193997520e+00 8.99485997140665665e+00 -1.13118453310110607e+01 1.08589649403932913e+01 -5.25872994452723495e+00 -5.08879263186101555e+00 1.37956762477723817e+01 -1.09551442529747833e+01 -4.52810983443531063e+00 1.61352161001936410e+01 -9.84720832106304462e+00 \n4.41418888417751192e+00 -7.55034893754184749e+00 9.09725713151034202e+00 -8.53027028936525525e+00 4.60216246037743036e+00 3.04559362196177767e+00 -1.17469718287705302e+01 1.49670370278676207e+01 -6.55414445249990194e+00 -9.74443605637718193e+00 1.79440294416905001e+01 -9.52794884918630181e+00 \n-4.87244220323204575e-01 9.90209559644230068e-01 -1.58844004066075194e+00 2.18536184199637963e+00 -2.35282002106746203e+00 1.47595074497794066e+00 6.36914982334572440e-01 -2.81129594782605676e+00 2.63514662340569950e+00 7.10339689674892932e-01 -3.61304022685531811e+00 2.33292016575811230e+00 \n-9.18492568499943480e-01 1.60377961898440978e+00 -2.01694959069141071e+00 2.04328932709087245e+00 -1.35646394365625197e+00 -2.60878627855548323e-01 2.37501054216264464e+00 -3.49231353029357237e+00 1.85814750824220390e+00 2.04780660946022256e+00 -4.31805339921377361e+00 2.39635293769735018e+00 \n3.39750625894521638e-02 -7.14476440410136600e-02 1.20162664349640412e-01 -1.73894008120175438e-01 1.98911692834450264e-01 -1.40205120152960840e-01 -3.17394555392398477e-02 2.30877982383891963e-01 -2.40192357631941347e-01 -4.55915381305281785e-02 3.18758267169924403e-01 -2.13941459417472985e-01 \n13\n6.30261808443813226e+00 9.29650476482772646e+00 8.24815068600754718e+00 4.33626946133762352e+00 -8.22445761854854160e-01 -5.04647191674769000e+00 -6.33226527377305166e+00 -4.07368087097998266e+00 3.52237974221749267e-02 2.77730262828443824e+00 2.30060288138906478e+00 3.27156902909107450e-01 -3.48219979865040774e-01 \n-7.66298510377116078e+00 -1.05199136192383635e+01 -7.33629234208152304e+00 -1.01650342123798084e-01 7.88310681055931257e+00 1.22557073626623822e+01 9.61661467361596025e+00 6.77822617830823942e-01 -7.96993083322817410e+00 -7.80763061622359003e+00 1.62722724362765209e+00 8.74493196626835897e+00 5.25308332472341856e+00 \n7.52854699734396056e+00 1.01467266536169754e+01 6.59353506188060232e+00 -1.01671740614912425e+00 -9.25094725223700037e+00 -1.38045378502882393e+01 -1.15245142998226312e+01 -3.13530671997720613e+00 5.57507197563082100e+00 7.30121959222201324e+00 1.10498793711016641e+00 -4.59753268822669919e+00 -3.17022544705505554e+00 \n-1.55601537931127742e+00 7.74713700659302299e-02 6.04721334571404257e+00 1.42988601710854636e+01 2.05694916938136661e+01 1.97874388268576562e+01 9.29915002568620148e+00 -7.03972986328570454e+00 -1.78428589557952109e+01 -1.19048472092703625e+01 7.03979516455590841e+00 1.79919207983816234e+01 9.79214360565599501e+00 \n-3.62649398606669348e+00 -8.08911014302700282e+00 -1.39581757929348596e+01 -1.96416678394093945e+01 -2.15145748404291626e+01 -1.59801397609721969e+01 -2.60662434691977012e+00 1.28848543166262189e+01 1.94593736888722673e+01 9.21154621815189713e+00 -1.05881449988483623e+01 -1.94463377718569782e+01 -9.78020993990103685e+00 \n6.39356569212505144e+00 1.17867020675247551e+01 1.61832914918261650e+01 1.86362014346690078e+01 1.68173850917600588e+01 9.11726930063555291e+00 -3.07047248276492278e+00 -1.40304033562831699e+01 -1.58370933970324023e+01 -5.14085438584109542e+00 1.00735662845676585e+01 1.51399685256618645e+01 7.09948331047200394e+00 \n-9.12235589056388426e+00 -1.54840286392319304e+01 -1.85163229650168971e+01 -1.77278327133078197e+01 -1.16637235367494578e+01 -1.67052078699720889e-01 1.36032934794025271e+01 2.25487996172415562e+01 1.87698417109992713e+01 1.17140445538156056e+00 -1.83035743589024968e+01 -2.22450848721955533e+01 -9.75581452116203400e+00 \n-1.57204552742351097e+00 -3.98139972035521595e+00 -8.06789366851524681e+00 -1.34724749225020020e+01 -1.78853088380835940e+01 -1.72068659902843636e+01 -7.83249423856055367e+00 8.37754882798850213e+00 2.03228385305553939e+01 1.39867326545217739e+01 -8.81269683148623623e+00 -2.29818900682607580e+01 -1.27886363422812338e+01 \n5.53477108726594722e+00 1.01105703950601443e+01 1.39101557376789885e+01 1.64770322816469099e+01 1.56960094669198808e+01 9.07997953988398634e+00 -3.70346836275503178e+00 -1.75480386726863578e+01 -2.16832390169353869e+01 -7.86183602451900669e+00 1.57385597374271688e+01 2.54105787669696285e+01 1.25172400437987076e+01 \n5.28585655069009928e-02 4.46980580818963813e-01 1.45925815445530537e+00 3.07674095265491006e+00 4.78275048692697299e+00 5.35783241814696322e+00 3.30808763706068784e+00 -1.52285986875571828e+00 -6.02854636714660089e+00 -5.01747440094032830e+00 2.19327258725858111e+00 7.45505947887088968e+00 4.38948973513976156e+00 \n-1.34030327779430379e+00 -2.53032487721605375e+00 -3.68435170053954848e+00 -4.70099134936806274e+00 -4.95249870634052453e+00 -3.52091464254396296e+00 9.32971268395593196e-02 4.72532015970246382e+00 6.92302211746963813e+00 3.23962446660540317e+00 -4.52894413878260674e+00 -8.33229209336680368e+00 -4.29691682863770597e+00 \n1.62089359024169210e-02 -1.42970134052616532e-02 -1.26720929413077006e-01 -3.25000735001429676e-01 -5.57684061523076676e-01 -6.79099736820443582e-01 -4.79700599077768795e-01 1.16429985213496678e-01 7.51765887246541835e-01 7.01260292152935109e-01 -2.38041542690238861e-01 -9.95805113287884502e-01 -6.08669082538641282e-01 \n1.78488211382004384e-01 3.43437220493584684e-01 5.15869597177544462e-01 6.83969475980856823e-01 7.56646395110743297e-01 5.86708198233507510e-01 6.80041231099279294e-02 -6.62204973283968887e-01 -1.07690506018082566e+00 -5.69968557062563208e-01 6.64263713050154917e-01 1.32977191658953359e+00 7.05465109370353437e-01 \n-1.26052361688762645e+01 0.00000000000000000e+00 -1.47596427898329630e+01 0.00000000000000000e+00 8.44508794286069463e+00 0.00000000000000000e+00 1.96674326598633641e+01 0.00000000000000000e+00 -1.29715256755453019e+01 0.00000000000000000e+00 3.42040931699046722e+00 0.00000000000000000e+00 -5.02104286942743880e-01 \n0.00000000000000000e+00 -3.20508909110237369e+01 0.00000000000000000e+00 -9.65906629581369210e+00 0.00000000000000000e+00 2.35281759175945636e+01 0.00000000000000000e+00 -4.53028368215493612e+00 0.00000000000000000e+00 -4.07757082324481014e-01 0.00000000000000000e+00 1.93511658429524694e-01 0.00000000000000000e+00 \n-1.50570939946879211e+01 0.00000000000000000e+00 -5.80067710262076636e+01 0.00000000000000000e+00 1.97132946882158229e+00 0.00000000000000000e+00 4.54222976541519224e+01 0.00000000000000000e+00 -2.32271796897312064e+01 0.00000000000000000e+00 5.31730647192727963e+00 0.00000000000000000e+00 -7.06907988211498870e-01 \n0.00000000000000000e+00 -1.09353335174346243e+01 0.00000000000000000e+00 -7.37354103312530591e+01 0.00000000000000000e+00 1.32438603797520494e+01 0.00000000000000000e+00 1.89916010615698539e+01 0.00000000000000000e+00 -8.02990794143257422e+00 0.00000000000000000e+00 1.31831415890860396e+00 0.00000000000000000e+00 \n7.25298797213338695e+00 0.00000000000000000e+00 -9.05590183829710401e-02 0.00000000000000000e+00 -9.16465349204579101e+01 0.00000000000000000e+00 3.74103719502206214e+01 0.00000000000000000e+00 2.78873927990287651e+00 0.00000000000000000e+00 -3.67301842250908509e+00 0.00000000000000000e+00 7.99839012176854118e-01 \n0.00000000000000000e+00 2.07225183461099427e+01 0.00000000000000000e+00 9.71961498133878640e+00 0.00000000000000000e+00 -1.12992252948222665e+02 0.00000000000000000e+00 7.22948062614985845e+01 0.00000000000000000e+00 -1.88493018968424149e+01 0.00000000000000000e+00 2.54207191795437488e+00 0.00000000000000000e+00 \n1.82447117811277685e+01 0.00000000000000000e+00 4.19336003572156937e+01 0.00000000000000000e+00 3.32896648487374793e+01 0.00000000000000000e+00 -1.37144494460069193e+02 0.00000000000000000e+00 8.10309170772561492e+01 0.00000000000000000e+00 -2.16586004043744374e+01 0.00000000000000000e+00 3.27428829995565272e+00 \n0.00000000000000000e+00 -2.92865146052530337e+00 0.00000000000000000e+00 1.79184244847829141e+01 0.00000000000000000e+00 6.54765849277579285e+01 0.00000000000000000e+00 -5.44465490843415968e+01 0.00000000000000000e+00 1.59070269157027580e+01 0.00000000000000000e+00 -2.29320488691446170e+00 0.00000000000000000e+00 \n-1.10695421745318944e+01 0.00000000000000000e+00 -1.97015211247801900e+01 0.00000000000000000e+00 3.73094367085205804e+00 0.00000000000000000e+00 7.55707482231816649e+01 0.00000000000000000e+00 -5.31803072774027130e+01 0.00000000000000000e+00 1.53778680339637794e+01 0.00000000000000000e+00 -2.43161114555123581e+00 \n0.00000000000000000e+00 -5.27746277345286561e-01 0.00000000000000000e+00 -6.43415092169064485e+00 0.00000000000000000e+00 -1.49767498168817717e+01 0.00000000000000000e+00 1.39650186491971667e+01 0.00000000000000000e+00 -4.25959878391699275e+00 0.00000000000000000e+00 6.29120239418241474e-01 0.00000000000000000e+00 \n2.68060655558860757e+00 0.00000000000000000e+00 4.13318983663685635e+00 0.00000000000000000e+00 -3.28653315571364586e+00 0.00000000000000000e+00 -1.86309626262696574e+01 0.00000000000000000e+00 1.41691193561736490e+01 0.00000000000000000e+00 -4.23025799160210748e+00 0.00000000000000000e+00 6.80912608366307188e-01 \n0.00000000000000000e+00 1.40892828888976894e-01 0.00000000000000000e+00 8.48511668696248682e-01 0.00000000000000000e+00 1.64249025933844356e+00 0.00000000000000000e+00 -1.63573816146053498e+00 0.00000000000000000e+00 5.10909666980632415e-01 0.00000000000000000e+00 -7.64730225745771705e-02 0.00000000000000000e+00 \n-3.56976422764008768e-01 0.00000000000000000e+00 -5.00573938587578521e-01 0.00000000000000000e+00 6.19202635434950540e-01 0.00000000000000000e+00 2.55379431970248094e+00 0.00000000000000000e+00 -2.02476264353039508e+00 0.00000000000000000e+00 6.14696799091207701e-01 0.00000000000000000e+00 -9.98699205114485416e-02 \n6.30261808443813226e+00 -9.29650476482772646e+00 8.24815068600754718e+00 -4.33626946133762352e+00 -8.22445761854854160e-01 5.04647191674769000e+00 -6.33226527377305166e+00 4.07368087097998266e+00 3.52237974221749267e-02 -2.77730262828443824e+00 2.30060288138906478e+00 -3.27156902909107450e-01 -3.48219979865040774e-01 \n7.66298510377116078e+00 -1.05199136192383635e+01 7.33629234208152304e+00 -1.01650342123798084e-01 -7.88310681055931257e+00 1.22557073626623822e+01 -9.61661467361596025e+00 6.77822617830823942e-01 7.96993083322817410e+00 -7.80763061622359003e+00 -1.62722724362765209e+00 8.74493196626835897e+00 -5.25308332472341856e+00 \n7.52854699734396056e+00 -1.01467266536169754e+01 6.59353506188060232e+00 1.01671740614912425e+00 -9.25094725223700037e+00 1.38045378502882393e+01 -1.15245142998226312e+01 3.13530671997720613e+00 5.57507197563082100e+00 -7.30121959222201324e+00 1.10498793711016641e+00 4.59753268822669919e+00 -3.17022544705505554e+00 \n1.55601537931127742e+00 7.74713700659302299e-02 -6.04721334571404257e+00 1.42988601710854636e+01 -2.05694916938136661e+01 1.97874388268576562e+01 -9.29915002568620148e+00 -7.03972986328570454e+00 1.78428589557952109e+01 -1.19048472092703625e+01 -7.03979516455590841e+00 1.79919207983816234e+01 -9.79214360565599501e+00 \n-3.62649398606669348e+00 8.08911014302700282e+00 -1.39581757929348596e+01 1.96416678394093945e+01 -2.15145748404291626e+01 1.59801397609721969e+01 -2.60662434691977012e+00 -1.28848543166262189e+01 1.94593736888722673e+01 -9.21154621815189713e+00 -1.05881449988483623e+01 1.94463377718569782e+01 -9.78020993990103685e+00 \n-6.39356569212505144e+00 1.17867020675247551e+01 -1.61832914918261650e+01 1.86362014346690078e+01 -1.68173850917600588e+01 9.11726930063555291e+00 3.07047248276492278e+00 -1.40304033562831699e+01 1.58370933970324023e+01 -5.14085438584109542e+00 -1.00735662845676585e+01 1.51399685256618645e+01 -7.09948331047200394e+00 \n-9.12235589056388426e+00 1.54840286392319304e+01 -1.85163229650168971e+01 1.77278327133078197e+01 -1.16637235367494578e+01 1.67052078699720889e-01 1.36032934794025271e+01 -2.25487996172415562e+01 1.87698417109992713e+01 -1.17140445538156056e+00 -1.83035743589024968e+01 2.22450848721955533e+01 -9.75581452116203400e+00 \n1.57204552742351097e+00 -3.98139972035521595e+00 8.06789366851524681e+00 -1.34724749225020020e+01 1.78853088380835940e+01 -1.72068659902843636e+01 7.83249423856055367e+00 8.37754882798850213e+00 -2.03228385305553939e+01 1.39867326545217739e+01 8.81269683148623623e+00 -2.29818900682607580e+01 1.27886363422812338e+01 \n5.53477108726594722e+00 -1.01105703950601443e+01 1.39101557376789885e+01 -1.64770322816469099e+01 1.56960094669198808e+01 -9.07997953988398634e+00 -3.70346836275503178e+00 1.75480386726863578e+01 -2.16832390169353869e+01 7.86183602451900669e+00 1.57385597374271688e+01 -2.54105787669696285e+01 1.25172400437987076e+01 \n-5.28585655069009928e-02 4.46980580818963813e-01 -1.45925815445530537e+00 3.07674095265491006e+00 -4.78275048692697299e+00 5.35783241814696322e+00 -3.30808763706068784e+00 -1.52285986875571828e+00 6.02854636714660089e+00 -5.01747440094032830e+00 -2.19327258725858111e+00 7.45505947887088968e+00 -4.38948973513976156e+00 \n-1.34030327779430379e+00 2.53032487721605375e+00 -3.68435170053954848e+00 4.70099134936806274e+00 -4.95249870634052453e+00 3.52091464254396296e+00 9.32971268395593196e-02 -4.72532015970246382e+00 6.92302211746963813e+00 -3.23962446660540317e+00 -4.52894413878260674e+00 8.33229209336680368e+00 -4.29691682863770597e+00 \n-1.62089359024169210e-02 -1.42970134052616532e-02 1.26720929413077006e-01 -3.25000735001429676e-01 5.57684061523076676e-01 -6.79099736820443582e-01 4.79700599077768795e-01 1.16429985213496678e-01 -7.51765887246541835e-01 7.01260292152935109e-01 2.38041542690238861e-01 -9.95805113287884502e-01 6.08669082538641282e-01 \n1.78488211382004384e-01 -3.43437220493584684e-01 5.15869597177544462e-01 -6.83969475980856823e-01 7.56646395110743297e-01 -5.86708198233507510e-01 6.80041231099279294e-02 6.62204973283968887e-01 -1.07690506018082566e+00 5.69968557062563208e-01 6.64263713050154917e-01 -1.32977191658953359e+00 7.05465109370353437e-01 \n14\n6.31588397613715697e+00 9.24878643080966719e+00 8.00328450611180474e+00 3.73583811757238680e+00 -1.88969390404984524e+00 -6.50358773050035441e+00 -7.73627869601367498e+00 -4.58786164545900850e+00 1.17278803533050957e+00 5.16539442769010457e+00 3.64984794221455203e+00 -1.79859100950790905e+00 -4.74328850559373803e+00 -2.47530397248389002e+00 \n-9.14047712396606737e+00 -1.29397952130886460e+01 -9.99337654834186797e+00 -2.14059818079161253e+00 7.64046024787564795e+00 1.49891493593692054e+01 1.55036313244733267e+01 7.47951381852549103e+00 -5.11028039691360967e+00 -1.27997921800186840e+01 -7.69941470210092367e+00 5.88988278292916778e+00 1.25758258137312075e+01 6.36617291833259538e+00 \n7.82794955228928257e+00 1.04206573145637202e+01 6.29786891547495085e+00 -2.51478987813923712e+00 -1.24934560879048400e+01 -1.87783806319649681e+01 -1.69880808118488057e+01 -6.30004618635680835e+00 7.81598465539283592e+00 1.48619214428514298e+01 7.58649716868428740e+00 -7.66317972185219142e+00 -1.41950434586853960e+01 -6.90944105797966777e+00 \n-3.99122925205751638e+00 -3.94981232755988776e+00 1.51526833273632707e+00 1.05806883849525833e+01 1.95430122487415343e+01 2.34580464215327973e+01 1.82748013517580571e+01 4.13469252758785686e+00 -1.20156220711210184e+01 -1.84226652542409265e+01 -8.04707136643730249e+00 1.04242312917949919e+01 1.75152434560464072e+01 8.30782968362872433e+00 \n-2.54405932871612696e+00 -6.70193163736441053e+00 -1.34904354113959898e+01 -2.15163601580157677e+01 -2.71119078225701362e+01 -2.57573351035023808e+01 -1.46456611645326433e+01 3.93474893249427929e+00 2.06809723397086110e+01 2.29132308434974881e+01 5.75869251999074539e+00 -1.73626903800213707e+01 -2.37063762791325935e+01 -1.05579478642421601e+01 \n5.10218792188181025e+00 9.58671479096662167e+00 1.35273967636308924e+01 1.60729952176009628e+01 1.52388285232254668e+01 9.69082446384660896e+00 5.01040955210083334e-01 -8.15123542590371509e+00 -1.09198507979440626e+01 -5.83293708713479652e+00 2.49645667162982990e+00 6.52679975777678274e+00 4.33618615818293839e+00 1.01177871131624604e+00 \n-7.91192405684735081e+00 -1.37214125070974761e+01 -1.71746770528413657e+01 -1.79377699144595252e+01 -1.46598370151190504e+01 -6.72824647627144878e+00 4.25596046991166709e+00 1.38850516545477377e+01 1.65020959332912327e+01 9.25468153611882766e+00 -3.84683915259725467e+00 -1.30827440118313931e+01 -1.17582436127631247e+01 -4.24893598918016556e+00 \n2.27337308166076210e+00 2.33828832848841490e+00 -1.06682463521735570e+00 -7.96106857213519968e+00 -1.68820915632263129e+01 -2.37937367936434022e+01 -2.26284810923983209e+01 -9.16265339396073225e+00 1.22660672918568126e+01 2.57054733442691172e+01 1.48474938515061509e+01 -1.37039120435380478e+01 -2.81218451385165514e+01 -1.43448877723949543e+01 \n3.97278264638712303e+00 8.10889686798966848e+00 1.32343242083026943e+01 1.91759886572809907e+01 2.37510746522788966e+01 2.31367215227245323e+01 1.35851307989771150e+01 -4.70284192787137408e+00 -2.33836926251089767e+01 -2.73439154162833318e+01 -7.54929906759594396e+00 2.20986098819782441e+01 3.15476593385428159e+01 1.44591136449120309e+01 \n-1.62168421886408196e+00 -2.27787372474621810e+00 -1.48340124031274256e+00 9.22790462751300334e-01 4.76937027169757705e+00 8.77233363601544834e+00 1.01927250553313508e+01 6.07307772481590601e+00 -3.27250401967578274e+00 -1.11082777325055087e+01 -8.09098265522804496e+00 5.13572815536376553e+00 1.32263009122523827e+01 7.15935568103430639e+00 \n-7.75960783637445099e-01 -1.86512671038314181e+00 -3.66414448212157445e+00 -6.18995027368110286e+00 -8.74576342080823744e+00 -9.77156279779922594e+00 -7.24058323139241007e+00 -2.57383037240654366e-01 8.48378353559021115e+00 1.21002553256550573e+01 4.80531738200487581e+00 -8.75817140282470270e+00 -1.42359550023368840e+01 -6.85097935300626658e+00 \n3.22943647753124083e-01 4.80072195164882984e-01 3.93808943867898984e-01 2.70232128056330031e-02 -6.27323197396566373e-01 -1.39505358264627954e+00 -1.80943993014550159e+00 -1.26017849721973198e+00 3.71976297190264237e-01 1.96077470942818266e+00 1.61977227761845831e+00 -8.24395181127668354e-01 -2.48921499566073196e+00 -1.39754696957663768e+00 \n7.95662791760751994e-02 2.38170792732090068e-01 5.56020762676130759e-01 1.04494450515631605e+00 1.59273549201558352e+00 1.90847650920486951e+00 1.56217220894309977e+00 2.76876289651818604e-01 -1.52686220726496062e+00 -2.45986272565576540e+00 -1.14388730799982219e+00 1.67981636873209674e+00 2.96346469668800745e+00 1.46870740626343628e+00 \n-2.77817353787733016e-02 -4.23072518415181044e-02 -3.76624970071371368e-02 -1.05298628078953341e-02 4.12752475851524470e-02 1.06210218186144575e-01 1.47738821239008474e-01 1.12378093359018478e-01 -1.92016076032056655e-02 -1.60210951592036458e-01 -1.43833527670922499e-01 6.25664121893209497e-02 2.13851244395972041e-01 1.23246427844613819e-01 \n-1.26317679522743139e+01 0.00000000000000000e+00 -1.53651209093383369e+01 0.00000000000000000e+00 6.21207305590790694e+00 0.00000000000000000e+00 1.71009458287337235e+01 0.00000000000000000e+00 -9.47505541975209059e+00 0.00000000000000000e+00 2.06060454334184782e+00 0.00000000000000000e+00 -2.37832943498723342e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -3.74474927103438117e+01 0.00000000000000000e+00 -1.86728114828908212e+01 0.00000000000000000e+00 1.86922463029781521e+01 0.00000000000000000e+00 1.13181145303818139e+01 0.00000000000000000e+00 -8.05294971012812476e+00 0.00000000000000000e+00 1.82453087753196880e+00 0.00000000000000000e+00 -2.04169715932493141e-01 \n-1.56558991045785651e+01 0.00000000000000000e+00 -6.12055367678852976e+01 0.00000000000000000e+00 -6.70562027053862668e+00 0.00000000000000000e+00 3.71516828510512769e+01 0.00000000000000000e+00 -9.63203551910744273e+00 0.00000000000000000e+00 -4.78425459522368198e-01 0.00000000000000000e+00 5.20011081159565048e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.97524227417552139e+01 0.00000000000000000e+00 -8.79285050957402946e+01 0.00000000000000000e+00 6.54860719083013858e+00 0.00000000000000000e+00 4.45143152049368583e+01 0.00000000000000000e+00 -2.07557761808228602e+01 0.00000000000000000e+00 4.10558008349493918e+00 0.00000000000000000e+00 -4.28701252069667700e-01 \n5.08811865743225392e+00 0.00000000000000000e+00 -8.58073247931897692e+00 0.00000000000000000e+00 -1.10763974029482915e+02 0.00000000000000000e+00 2.20899326248597072e+01 0.00000000000000000e+00 3.27821949201816002e+01 0.00000000000000000e+00 -1.73383816159330768e+01 0.00000000000000000e+00 3.85286684485948810e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 1.61755652599210017e+01 0.00000000000000000e+00 3.29501657792333929e+00 0.00000000000000000e+00 -1.14419090210626249e+02 0.00000000000000000e+00 8.48077739181570139e+01 0.00000000000000000e+00 -2.57883839592944996e+01 0.00000000000000000e+00 4.18065592577943890e+00 0.00000000000000000e+00 -3.88488179967450464e-01 \n1.58238481136947016e+01 0.00000000000000000e+00 3.40773458870790356e+01 0.00000000000000000e+00 1.84411223105598966e+01 0.00000000000000000e+00 -1.46495167816534151e+02 0.00000000000000000e+00 1.04373743923009306e+02 0.00000000000000000e+00 -3.30763563229682301e+01 0.00000000000000000e+00 5.96114328032362854e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 1.10738140710066511e+01 0.00000000000000000e+00 4.10191049786718045e+01 0.00000000000000000e+00 7.73714166852925797e+01 0.00000000000000000e+00 -9.56413652691822308e+01 0.00000000000000000e+00 3.61136977141018649e+01 0.00000000000000000e+00 -6.67558692422038250e+00 0.00000000000000000e+00 6.76996765782346737e-01 \n-7.94556529277424606e+00 0.00000000000000000e+00 -7.44710299909291080e+00 0.00000000000000000e+00 3.13609473296295752e+01 0.00000000000000000e+00 9.77841841851889328e+01 0.00000000000000000e+00 -9.67601734739100891e+01 0.00000000000000000e+00 3.53027872203358914e+01 0.00000000000000000e+00 -6.90429906883754979e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -6.67961039412851224e+00 0.00000000000000000e+00 -1.69639044541137399e+01 0.00000000000000000e+00 -2.10679252266239017e+01 0.00000000000000000e+00 3.24643993066513606e+01 0.00000000000000000e+00 -1.30821336818241265e+01 0.00000000000000000e+00 2.50380252539366741e+00 0.00000000000000000e+00 -2.59467188452934718e-01 \n1.55192156727489020e+00 0.00000000000000000e+00 -7.44917066230974974e-01 0.00000000000000000e+00 -1.50835964220953352e+01 0.00000000000000000e+00 -2.88545696821407346e+01 0.00000000000000000e+00 3.28660203718329917e+01 0.00000000000000000e+00 -1.25885987449042240e+01 0.00000000000000000e+00 2.52741744803996078e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 1.27727483323038449e+00 0.00000000000000000e+00 2.86068812702131509e+00 0.00000000000000000e+00 2.92183811922026967e+00 0.00000000000000000e+00 -5.14069439294401452e+00 0.00000000000000000e+00 2.14403388336038576e+00 0.00000000000000000e+00 -4.17881519454877398e-01 0.00000000000000000e+00 4.37980820032378524e-02 \n-1.59132558352150399e-01 0.00000000000000000e+00 4.42697222412190504e-01 0.00000000000000000e+00 3.04446198253745359e+00 0.00000000000000000e+00 4.78406950609568770e+00 0.00000000000000000e+00 -5.89596636063501612e+00 0.00000000000000000e+00 2.31624711976636098e+00 0.00000000000000000e+00 -4.71380312840528526e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.07863005110840376e-01 0.00000000000000000e+00 -2.26830705987488447e-01 0.00000000000000000e+00 -2.07200551683527313e-01 0.00000000000000000e+00 3.97045968343103513e-01 0.00000000000000000e+00 -1.69051507161470408e-01 0.00000000000000000e+00 3.33115053828982431e-02 0.00000000000000000e+00 -3.51542795670089509e-03 \n6.31588397613715697e+00 -9.24878643080966719e+00 8.00328450611180474e+00 -3.73583811757238680e+00 -1.88969390404984524e+00 6.50358773050035441e+00 -7.73627869601367498e+00 4.58786164545900850e+00 1.17278803533050957e+00 -5.16539442769010457e+00 3.64984794221455203e+00 1.79859100950790905e+00 -4.74328850559373803e+00 2.47530397248389002e+00 \n9.14047712396606737e+00 -1.29397952130886460e+01 9.99337654834186797e+00 -2.14059818079161253e+00 -7.64046024787564795e+00 1.49891493593692054e+01 -1.55036313244733267e+01 7.47951381852549103e+00 5.11028039691360967e+00 -1.27997921800186840e+01 7.69941470210092367e+00 5.88988278292916778e+00 -1.25758258137312075e+01 6.36617291833259538e+00 \n7.82794955228928257e+00 -1.04206573145637202e+01 6.29786891547495085e+00 2.51478987813923712e+00 -1.24934560879048400e+01 1.87783806319649681e+01 -1.69880808118488057e+01 6.30004618635680835e+00 7.81598465539283592e+00 -1.48619214428514298e+01 7.58649716868428740e+00 7.66317972185219142e+00 -1.41950434586853960e+01 6.90944105797966777e+00 \n3.99122925205751638e+00 -3.94981232755988776e+00 -1.51526833273632707e+00 1.05806883849525833e+01 -1.95430122487415343e+01 2.34580464215327973e+01 -1.82748013517580571e+01 4.13469252758785686e+00 1.20156220711210184e+01 -1.84226652542409265e+01 8.04707136643730249e+00 1.04242312917949919e+01 -1.75152434560464072e+01 8.30782968362872433e+00 \n-2.54405932871612696e+00 6.70193163736441053e+00 -1.34904354113959898e+01 2.15163601580157677e+01 -2.71119078225701362e+01 2.57573351035023808e+01 -1.46456611645326433e+01 -3.93474893249427929e+00 2.06809723397086110e+01 -2.29132308434974881e+01 5.75869251999074539e+00 1.73626903800213707e+01 -2.37063762791325935e+01 1.05579478642421601e+01 \n-5.10218792188181025e+00 9.58671479096662167e+00 -1.35273967636308924e+01 1.60729952176009628e+01 -1.52388285232254668e+01 9.69082446384660896e+00 -5.01040955210083334e-01 -8.15123542590371509e+00 1.09198507979440626e+01 -5.83293708713479652e+00 -2.49645667162982990e+00 6.52679975777678274e+00 -4.33618615818293839e+00 1.01177871131624604e+00 \n-7.91192405684735081e+00 1.37214125070974761e+01 -1.71746770528413657e+01 1.79377699144595252e+01 -1.46598370151190504e+01 6.72824647627144878e+00 4.25596046991166709e+00 -1.38850516545477377e+01 1.65020959332912327e+01 -9.25468153611882766e+00 -3.84683915259725467e+00 1.30827440118313931e+01 -1.17582436127631247e+01 4.24893598918016556e+00 \n-2.27337308166076210e+00 2.33828832848841490e+00 1.06682463521735570e+00 -7.96106857213519968e+00 1.68820915632263129e+01 -2.37937367936434022e+01 2.26284810923983209e+01 -9.16265339396073225e+00 -1.22660672918568126e+01 2.57054733442691172e+01 -1.48474938515061509e+01 -1.37039120435380478e+01 2.81218451385165514e+01 -1.43448877723949543e+01 \n3.97278264638712303e+00 -8.10889686798966848e+00 1.32343242083026943e+01 -1.91759886572809907e+01 2.37510746522788966e+01 -2.31367215227245323e+01 1.35851307989771150e+01 4.70284192787137408e+00 -2.33836926251089767e+01 2.73439154162833318e+01 -7.54929906759594396e+00 -2.20986098819782441e+01 3.15476593385428159e+01 -1.44591136449120309e+01 \n1.62168421886408196e+00 -2.27787372474621810e+00 1.48340124031274256e+00 9.22790462751300334e-01 -4.76937027169757705e+00 8.77233363601544834e+00 -1.01927250553313508e+01 6.07307772481590601e+00 3.27250401967578274e+00 -1.11082777325055087e+01 8.09098265522804496e+00 5.13572815536376553e+00 -1.32263009122523827e+01 7.15935568103430639e+00 \n-7.75960783637445099e-01 1.86512671038314181e+00 -3.66414448212157445e+00 6.18995027368110286e+00 -8.74576342080823744e+00 9.77156279779922594e+00 -7.24058323139241007e+00 2.57383037240654366e-01 8.48378353559021115e+00 -1.21002553256550573e+01 4.80531738200487581e+00 8.75817140282470270e+00 -1.42359550023368840e+01 6.85097935300626658e+00 \n-3.22943647753124083e-01 4.80072195164882984e-01 -3.93808943867898984e-01 2.70232128056330031e-02 6.27323197396566373e-01 -1.39505358264627954e+00 1.80943993014550159e+00 -1.26017849721973198e+00 -3.71976297190264237e-01 1.96077470942818266e+00 -1.61977227761845831e+00 -8.24395181127668354e-01 2.48921499566073196e+00 -1.39754696957663768e+00 \n7.95662791760751994e-02 -2.38170792732090068e-01 5.56020762676130759e-01 -1.04494450515631605e+00 1.59273549201558352e+00 -1.90847650920486951e+00 1.56217220894309977e+00 -2.76876289651818604e-01 -1.52686220726496062e+00 2.45986272565576540e+00 -1.14388730799982219e+00 -1.67981636873209674e+00 2.96346469668800745e+00 -1.46870740626343628e+00 \n2.77817353787733016e-02 -4.23072518415181044e-02 3.76624970071371368e-02 -1.05298628078953341e-02 -4.12752475851524470e-02 1.06210218186144575e-01 -1.47738821239008474e-01 1.12378093359018478e-01 1.92016076032056655e-02 -1.60210951592036458e-01 1.43833527670922499e-01 6.25664121893209497e-02 -2.13851244395972041e-01 1.23246427844613819e-01 \n15\n7.02985673087662899e+00 1.04031552676029053e+01 9.24126341365171049e+00 4.65214535850253350e+00 -1.82306092623226470e+00 -7.82575251753169423e+00 -1.06417757328126781e+01 -8.36822285267995673e+00 -1.54086260205737546e+00 5.89174034409778848e+00 8.17181442291369464e+00 2.69811823633441511e+00 -5.54877352753386496e+00 -7.91615971603872438e+00 -3.47501826540037850e+00 \n-1.07306424970462719e+01 -1.57647910808935593e+01 -1.37207670922395081e+01 -6.38013097833120370e+00 3.74109021651932939e+00 1.28967495660258893e+01 1.69309486802478443e+01 1.31199901470689807e+01 2.55340345321551060e+00 -8.66289699579735825e+00 -1.20678867084735938e+01 -4.13481564295742718e+00 7.70691598657669858e+00 1.10973003115852193e+01 4.86206511607376604e+00 \n9.68753108600113970e+00 1.34495100719099052e+01 9.60938003075154589e+00 7.68048688049313734e-02 -1.19527072513842812e+01 -2.16999139301129365e+01 -2.40023783757378024e+01 -1.58453956711914353e+01 4.43755452656883632e-01 1.57664470481705133e+01 1.83611443935021373e+01 4.36018818183921203e+00 -1.40129574102093083e+01 -1.82740509320458285e+01 -7.78145759863064529e+00 \n-5.73076137163645130e+00 -7.06769746223257996e+00 -2.67078111706390433e+00 5.68535064144857118e+00 1.48114432374424160e+01 2.05002505976156172e+01 1.91239053283251344e+01 9.92656909345109914e+00 -3.20369385470908905e+00 -1.25757295387707534e+01 -1.15511378386811418e+01 -1.07958939647249427e+00 9.15669041315328543e+00 1.00072318043816550e+01 3.85327390455001460e+00 \n2.66815400256593367e-02 -2.46114206879121787e+00 -8.70244173517199440e+00 -1.74394002892457933e+01 -2.54791863557568647e+01 -2.85374837426332057e+01 -2.30081999202986651e+01 -8.53332023098875897e+00 9.76208417378171447e+00 2.17935209338287219e+01 1.82400684026768195e+01 -1.10907975780507794e-02 -1.80142287949526725e+01 -1.95666790000574025e+01 -7.72534706677604843e+00 \n5.75348652807683380e+00 1.06766003583330215e+01 1.47892786592671822e+01 1.71813680215336578e+01 1.57013461601691055e+01 8.92386547230147740e+00 -1.80110062613211447e+00 -1.13486444243136241e+01 -1.29784112302509099e+01 -4.31955637779249898e+00 7.28681317659981296e+00 9.21665395507985484e+00 -9.16893535607089487e-01 -8.97729929678198550e+00 -5.28021748381798013e+00 \n-7.28872234488430965e+00 -1.26155935640978733e+01 -1.57094806484954026e+01 -1.62337620268345150e+01 -1.29844916031264219e+01 -5.58753677568114049e+00 4.14372829023464237e+00 1.18936885817745238e+01 1.27947308773834405e+01 5.59531970822190841e+00 -4.21897356465335127e+00 -7.78704259838976144e+00 -2.72792228909531909e+00 2.83703693455051386e+00 2.25801979635205160e+00 \n6.58153278827458506e+00 9.96716959411204395e+00 8.93397285636228638e+00 3.29360791894035143e+00 -6.73222942683354311e+00 -1.87049022434775835e+01 -2.70716871159526980e+01 -2.46547652398658468e+01 -7.95661482857047128e+00 1.56951684585793217e+01 2.74971285363282966e+01 1.25165871518765323e+01 -1.74232831590597305e+01 -2.91189774939655568e+01 -1.36308680978201787e+01 \n-2.05723532979945601e-01 1.26442397350476422e+00 5.64142259436543721e+00 1.29924425910578411e+01 2.18823817029925964e+01 2.87512124638338768e+01 2.82962801581404311e+01 1.60925306720891380e+01 -6.38751484827811699e+00 -2.75663607901817211e+01 -2.96333875109694764e+01 -5.09948624301516395e+00 2.67972254844903653e+01 3.39428781665081479e+01 1.44830038022566397e+01 \n-4.46559854772045801e+00 -7.27633597465492768e+00 -7.93730121199245951e+00 -6.15673681153638459e+00 -1.30193646729154497e+00 6.30295031931668825e+00 1.40424511197681453e+01 1.67225465191344882e+01 9.40875597874595369e+00 -6.24638826921956452e+00 -1.78940328807963730e+01 -1.11982658750342898e+01 9.87262180338848303e+00 2.05612418236192015e+01 1.02979005617894186e+01 \n1.59742047666129029e+00 1.98393363335628168e+00 4.97932905791294502e-01 -3.03019129422589170e+00 -8.30971004629742622e+00 -1.38362472090091524e+01 -1.64988141233929543e+01 -1.25172285391600155e+01 -6.11497525086664866e-01 1.38247795897828241e+01 1.88167648587044840e+01 6.02313733550829680e+00 -1.49720113358418503e+01 -2.17368348686510616e+01 -9.79829320846574271e+00 \n1.04956632197021113e+00 1.75018805119964475e+00 2.01527327838341049e+00 1.77098745432760222e+00 8.08333876369227721e-01 -9.24817655157770902e-01 -2.95206606726634352e+00 -4.04132714831697898e+00 -2.72979025766925063e+00 1.02669907723486730e+00 4.33570629373018021e+00 3.13032923264435212e+00 -2.22025098142474212e+00 -5.28245776054020307e+00 -2.74339538902028760e+00 \n-5.28218757241846602e-01 -7.40029097738073885e-01 -4.80686831720867271e-01 3.03586458542945181e-01 1.60038332102555916e+00 3.11425020123287242e+00 4.09890620957050896e+00 3.49225457110807566e+00 6.90971881799120161e-01 -3.19095243763379371e+00 -4.97416622588396201e+00 -1.96274644934079614e+00 3.72908683865443203e+00 5.86044754487636906e+00 2.72283484437108131e+00 \n-1.19956406405513318e-01 -2.02410970711957944e-01 -2.39368863448315058e-01 -2.22420164237026150e-01 -1.24383704285649617e-01 6.89600208350573558e-02 3.13783188122702255e-01 4.71042273209240160e-01 3.52525438463313617e-01 -8.29193516491461282e-02 -5.09699413660232041e-01 -4.03423824631008431e-01 2.47434107041290049e-01 6.50810852138626592e-01 3.46782102701368092e-01 \n8.30519288867495620e-02 1.20899695210332361e-01 9.27363136736836376e-02 -9.67692909128074505e-03 -1.89035585079187682e-01 -4.10525535939643875e-01 -5.73263344851198063e-01 -5.20286872753670565e-01 -1.42942708794380235e-01 4.25855842288185037e-01 7.25953383987906431e-01 3.20150106610100360e-01 -5.25662390489658363e-01 -8.71106472584870000e-01 -4.12860724023448906e-01 \n-1.40597134617532580e+01 0.00000000000000000e+00 -1.91155729674569290e+01 0.00000000000000000e+00 9.28392215833153722e-01 0.00000000000000000e+00 1.57969568210623399e+01 0.00000000000000000e+00 -2.47767268940613131e-01 0.00000000000000000e+00 -3.49257597032354133e+00 0.00000000000000000e+00 1.29346881907234787e+00 0.00000000000000000e+00 -2.27574077073647617e-01 \n0.00000000000000000e+00 -4.28144898491805180e+01 0.00000000000000000e+00 -2.46007705146245941e+01 0.00000000000000000e+00 2.11436949692244951e+01 0.00000000000000000e+00 2.74927500182370852e+01 0.00000000000000000e+00 -1.96439533189538228e+01 0.00000000000000000e+00 5.14210732259571379e+00 0.00000000000000000e+00 -7.05228788370218374e-01 0.00000000000000000e+00 \n-1.93750621720022794e+01 0.00000000000000000e+00 -7.08035824781700850e+01 0.00000000000000000e+00 -1.98116921670073771e+01 0.00000000000000000e+00 3.45363124139765136e+01 0.00000000000000000e+00 1.36660459565182901e+01 0.00000000000000000e+00 -1.48315700265967400e+01 0.00000000000000000e+00 4.54362485798283168e+00 0.00000000000000000e+00 -7.42004153927623804e-01 \n0.00000000000000000e+00 -2.55684845224446097e+01 0.00000000000000000e+00 -9.39431999211591080e+01 0.00000000000000000e+00 1.02285763256080150e+01 0.00000000000000000e+00 6.24030967559755549e+01 0.00000000000000000e+00 -3.41869447835848114e+01 0.00000000000000000e+00 8.06344122537281311e+00 0.00000000000000000e+00 -1.04273303440897308e+00 0.00000000000000000e+00 \n-5.33630800513186734e-02 0.00000000000000000e+00 -2.14389063568725027e+01 0.00000000000000000e+00 -1.27300692164539394e+02 0.00000000000000000e+00 2.03617455370363118e+01 0.00000000000000000e+00 6.32232458901775097e+01 0.00000000000000000e+00 -3.69247819572454778e+01 0.00000000000000000e+00 9.50597077938686732e+00 0.00000000000000000e+00 -1.42517939647636058e+00 \n0.00000000000000000e+00 1.85081232325025010e+01 0.00000000000000000e+00 6.86984684420371102e+00 0.00000000000000000e+00 -1.12998546593119215e+02 0.00000000000000000e+00 7.85894770754282705e+01 0.00000000000000000e+00 -2.27973918826794299e+01 0.00000000000000000e+00 3.59233474367931177e+00 0.00000000000000000e+00 -3.37445495713887022e-01 0.00000000000000000e+00 \n1.45774446897686193e+01 0.00000000000000000e+00 3.15559697792964645e+01 0.00000000000000000e+00 1.67323656052689182e+01 0.00000000000000000e+00 -1.44165645408168374e+02 0.00000000000000000e+00 1.09136042207533111e+02 0.00000000000000000e+00 -3.74111498564567461e+01 0.00000000000000000e+00 7.44877242788864183e+00 0.00000000000000000e+00 -9.56612678048133522e-01 \n0.00000000000000000e+00 2.56638575356640711e+01 0.00000000000000000e+00 5.74993425148988089e+01 0.00000000000000000e+00 7.15676841297299122e+01 0.00000000000000000e+00 -1.39573366846063924e+02 0.00000000000000000e+00 6.71906893755198201e+01 0.00000000000000000e+00 -1.55213428957476380e+01 0.00000000000000000e+00 2.00998457237004260e+00 0.00000000000000000e+00 \n4.11447065959891203e-01 0.00000000000000000e+00 1.38256684307615044e+01 0.00000000000000000e+00 5.96900349364590834e+01 0.00000000000000000e+00 1.02302520053259752e+02 0.00000000000000000e+00 -1.48128593298367708e+02 0.00000000000000000e+00 6.76657865095713343e+01 0.00000000000000000e+00 -1.61355284466215849e+01 0.00000000000000000e+00 2.34152901576314784e+00 \n0.00000000000000000e+00 -1.63859023341206443e+01 0.00000000000000000e+00 -2.84841289338196884e+01 0.00000000000000000e+00 -1.85726715436459306e+01 0.00000000000000000e+00 6.13764050798269103e+01 0.00000000000000000e+00 -3.27663682685651164e+01 0.00000000000000000e+00 7.97359059600091513e+00 0.00000000000000000e+00 -1.06607156367279099e+00 0.00000000000000000e+00 \n-3.19484095332258058e+00 0.00000000000000000e+00 -1.31241874172811241e+01 0.00000000000000000e+00 -3.23278569963988882e+01 0.00000000000000000e+00 -3.27968859304336745e+01 0.00000000000000000e+00 6.34888030958277706e+01 0.00000000000000000e+00 -3.13124248136157364e+01 0.00000000000000000e+00 7.76705701017307708e+00 0.00000000000000000e+00 -1.15415523801251823e+00 \n0.00000000000000000e+00 3.77123267986311237e+00 0.00000000000000000e+00 5.92393537509708372e+00 0.00000000000000000e+00 2.52995271917178076e+00 0.00000000000000000e+00 -1.25453452087571800e+01 0.00000000000000000e+00 7.05372343455396548e+00 0.00000000000000000e+00 -1.76016309363726052e+00 0.00000000000000000e+00 2.38960097593569539e-01 0.00000000000000000e+00 \n1.05643751448369320e+00 0.00000000000000000e+00 3.67048875664663059e+00 0.00000000000000000e+00 7.68694683528388399e+00 0.00000000000000000e+00 6.06507591264763112e+00 0.00000000000000000e+00 -1.40457636108149140e+01 0.00000000000000000e+00 7.20040881089410035e+00 0.00000000000000000e+00 -1.82101378662547768e+00 0.00000000000000000e+00 2.73748452087949560e-01 \n0.00000000000000000e+00 -4.26260420927003262e-01 0.00000000000000000e+00 -6.32881009776931473e-01 0.00000000000000000e+00 -1.92846289246236813e-01 0.00000000000000000e+00 1.34415926935928516e+00 0.00000000000000000e+00 -7.79614034906063802e-01 0.00000000000000000e+00 1.97470313581502808e-01 0.00000000000000000e+00 -2.70546952181234225e-02 0.00000000000000000e+00 \n-1.66103857773499124e-01 0.00000000000000000e+00 -5.41019706741693355e-01 0.00000000000000000e+00 -1.04974921727170854e+00 0.00000000000000000e+00 -7.17847871596436707e-01 0.00000000000000000e+00 1.86281970495894381e+00 0.00000000000000000e+00 -9.76047387885119613e-01 0.00000000000000000e+00 2.49550908347826700e-01 0.00000000000000000e+00 -3.77603805249262794e-02 \n7.02985673087662899e+00 -1.04031552676029053e+01 9.24126341365171049e+00 -4.65214535850253350e+00 -1.82306092623226470e+00 7.82575251753169423e+00 -1.06417757328126781e+01 8.36822285267995673e+00 -1.54086260205737546e+00 -5.89174034409778848e+00 8.17181442291369464e+00 -2.69811823633441511e+00 -5.54877352753386496e+00 7.91615971603872438e+00 -3.47501826540037850e+00 \n1.07306424970462719e+01 -1.57647910808935593e+01 1.37207670922395081e+01 -6.38013097833120370e+00 -3.74109021651932939e+00 1.28967495660258893e+01 -1.69309486802478443e+01 1.31199901470689807e+01 -2.55340345321551060e+00 -8.66289699579735825e+00 1.20678867084735938e+01 -4.13481564295742718e+00 -7.70691598657669858e+00 1.10973003115852193e+01 -4.86206511607376604e+00 \n9.68753108600113970e+00 -1.34495100719099052e+01 9.60938003075154589e+00 -7.68048688049313734e-02 -1.19527072513842812e+01 2.16999139301129365e+01 -2.40023783757378024e+01 1.58453956711914353e+01 4.43755452656883632e-01 -1.57664470481705133e+01 1.83611443935021373e+01 -4.36018818183921203e+00 -1.40129574102093083e+01 1.82740509320458285e+01 -7.78145759863064529e+00 \n5.73076137163645130e+00 -7.06769746223257996e+00 2.67078111706390433e+00 5.68535064144857118e+00 -1.48114432374424160e+01 2.05002505976156172e+01 -1.91239053283251344e+01 9.92656909345109914e+00 3.20369385470908905e+00 -1.25757295387707534e+01 1.15511378386811418e+01 -1.07958939647249427e+00 -9.15669041315328543e+00 1.00072318043816550e+01 -3.85327390455001460e+00 \n2.66815400256593367e-02 2.46114206879121787e+00 -8.70244173517199440e+00 1.74394002892457933e+01 -2.54791863557568647e+01 2.85374837426332057e+01 -2.30081999202986651e+01 8.53332023098875897e+00 9.76208417378171447e+00 -2.17935209338287219e+01 1.82400684026768195e+01 1.10907975780507794e-02 -1.80142287949526725e+01 1.95666790000574025e+01 -7.72534706677604843e+00 \n-5.75348652807683380e+00 1.06766003583330215e+01 -1.47892786592671822e+01 1.71813680215336578e+01 -1.57013461601691055e+01 8.92386547230147740e+00 1.80110062613211447e+00 -1.13486444243136241e+01 1.29784112302509099e+01 -4.31955637779249898e+00 -7.28681317659981296e+00 9.21665395507985484e+00 9.16893535607089487e-01 -8.97729929678198550e+00 5.28021748381798013e+00 \n-7.28872234488430965e+00 1.26155935640978733e+01 -1.57094806484954026e+01 1.62337620268345150e+01 -1.29844916031264219e+01 5.58753677568114049e+00 4.14372829023464237e+00 -1.18936885817745238e+01 1.27947308773834405e+01 -5.59531970822190841e+00 -4.21897356465335127e+00 7.78704259838976144e+00 -2.72792228909531909e+00 -2.83703693455051386e+00 2.25801979635205160e+00 \n-6.58153278827458506e+00 9.96716959411204395e+00 -8.93397285636228638e+00 3.29360791894035143e+00 6.73222942683354311e+00 -1.87049022434775835e+01 2.70716871159526980e+01 -2.46547652398658468e+01 7.95661482857047128e+00 1.56951684585793217e+01 -2.74971285363282966e+01 1.25165871518765323e+01 1.74232831590597305e+01 -2.91189774939655568e+01 1.36308680978201787e+01 \n-2.05723532979945601e-01 -1.26442397350476422e+00 5.64142259436543721e+00 -1.29924425910578411e+01 2.18823817029925964e+01 -2.87512124638338768e+01 2.82962801581404311e+01 -1.60925306720891380e+01 -6.38751484827811699e+00 2.75663607901817211e+01 -2.96333875109694764e+01 5.09948624301516395e+00 2.67972254844903653e+01 -3.39428781665081479e+01 1.44830038022566397e+01 \n4.46559854772045801e+00 -7.27633597465492768e+00 7.93730121199245951e+00 -6.15673681153638459e+00 1.30193646729154497e+00 6.30295031931668825e+00 -1.40424511197681453e+01 1.67225465191344882e+01 -9.40875597874595369e+00 -6.24638826921956452e+00 1.78940328807963730e+01 -1.11982658750342898e+01 -9.87262180338848303e+00 2.05612418236192015e+01 -1.02979005617894186e+01 \n1.59742047666129029e+00 -1.98393363335628168e+00 4.97932905791294502e-01 3.03019129422589170e+00 -8.30971004629742622e+00 1.38362472090091524e+01 -1.64988141233929543e+01 1.25172285391600155e+01 -6.11497525086664866e-01 -1.38247795897828241e+01 1.88167648587044840e+01 -6.02313733550829680e+00 -1.49720113358418503e+01 2.17368348686510616e+01 -9.79829320846574271e+00 \n-1.04956632197021113e+00 1.75018805119964475e+00 -2.01527327838341049e+00 1.77098745432760222e+00 -8.08333876369227721e-01 -9.24817655157770902e-01 2.95206606726634352e+00 -4.04132714831697898e+00 2.72979025766925063e+00 1.02669907723486730e+00 -4.33570629373018021e+00 3.13032923264435212e+00 2.22025098142474212e+00 -5.28245776054020307e+00 2.74339538902028760e+00 \n-5.28218757241846602e-01 7.40029097738073885e-01 -4.80686831720867271e-01 -3.03586458542945181e-01 1.60038332102555916e+00 -3.11425020123287242e+00 4.09890620957050896e+00 -3.49225457110807566e+00 6.90971881799120161e-01 3.19095243763379371e+00 -4.97416622588396201e+00 1.96274644934079614e+00 3.72908683865443203e+00 -5.86044754487636906e+00 2.72283484437108131e+00 \n1.19956406405513318e-01 -2.02410970711957944e-01 2.39368863448315058e-01 -2.22420164237026150e-01 1.24383704285649617e-01 6.89600208350573558e-02 -3.13783188122702255e-01 4.71042273209240160e-01 -3.52525438463313617e-01 -8.29193516491461282e-02 5.09699413660232041e-01 -4.03423824631008431e-01 -2.47434107041290049e-01 6.50810852138626592e-01 -3.46782102701368092e-01 \n8.30519288867495620e-02 -1.20899695210332361e-01 9.27363136736836376e-02 9.67692909128074505e-03 -1.89035585079187682e-01 4.10525535939643875e-01 -5.73263344851198063e-01 5.20286872753670565e-01 -1.42942708794380235e-01 -4.25855842288185037e-01 7.25953383987906431e-01 -3.20150106610100360e-01 -5.25662390489658363e-01 8.71106472584870000e-01 -4.12860724023448906e-01 \n16\n8.03232261185567089e+00 1.21585253761485008e+01 1.15071091467275026e+01 7.18421518133125709e+00 5.20391355923312089e-01 -6.41724339256442189e+00 -1.10784312949120695e+01 -1.12263167807549350e+01 -6.21132069209456485e+00 1.82270065057678406e+00 8.04260511369546721e+00 7.64319453151072885e+00 4.81305801400044865e-01 -7.00033046284083731e+00 -7.71980006554966350e+00 -3.00031236989332397e+00 \n-1.12197163084185467e+01 -1.67472337587962289e+01 -1.53106178326136883e+01 -8.72506281329854847e+00 6.71556200140775556e-01 9.54869744865490818e+00 1.43437479498344207e+01 1.27553916056603796e+01 5.41689988737065071e+00 -3.51147226777446230e+00 -8.27169490268524833e+00 -5.80428856072452061e+00 9.83019350251513405e-01 5.53701141427072516e+00 4.64463258933295199e+00 1.47135062744237319e+00 \n1.17901890160692915e+01 1.71436852938043074e+01 1.44104165684684469e+01 5.50313366047607500e+00 -6.82544293999595817e+00 -1.84279402236509151e+01 -2.45397802249360700e+01 -2.15351074931933890e+01 -9.33668085972759730e+00 6.78365860861440982e+00 1.73073690368537160e+01 1.42517181140636421e+01 -7.13576807492772536e-01 -1.45149147257909736e+01 -1.48587408157434492e+01 -5.57738599629304205e+00 \n-5.72259402550979537e+00 -7.12786554524818253e+00 -2.94259660833203778e+00 5.02553903119635622e+00 1.36079308933559156e+01 1.87357271886655800e+01 1.71012599429177732e+01 8.41743609371355857e+00 -3.10287861804089877e+00 -1.02036666671063194e+01 -7.94044756650482822e+00 5.80630851277135745e-01 5.79893977454661158e+00 2.77775009388880266e+00 -2.04136515456011441e+00 -1.83863313523973427e+00 \n1.69922964506165869e+00 5.14537934713234042e-01 -4.73721400339959706e+00 -1.27749844029254644e+01 -2.07616435679263180e+01 -2.49777452631002075e+01 -2.22973109524810244e+01 -1.21451890833932993e+01 2.02252930455129755e+00 1.32961870499153451e+01 1.50577678338412621e+01 6.43744335991433366e+00 -5.46903258960138234e+00 -1.11121716129538702e+01 -7.97777918687068419e+00 -2.34873890261920660e+00 \n7.42217046147653871e+00 1.38172015150020838e+01 1.93897781111741947e+01 2.32513433388182386e+01 2.27074900770701556e+01 1.53170438529806067e+01 1.32071083503119590e+00 -1.42782357543472937e+01 -2.23060003897917582e+01 -1.50633549529571433e+01 4.48819119464145783e+00 1.93354831883452692e+01 1.23260041577734224e+01 -1.01624342201120595e+01 -2.05385195244969148e+01 -9.82928607102200640e+00 \n-8.85776452054718491e+00 -1.52993769650791013e+01 -1.90053472725959209e+01 -1.96009159873676763e+01 -1.55595064307423372e+01 -6.15961450350845554e+00 6.75870676492227071e+00 1.78966494645241365e+01 2.01260363611391577e+01 9.62488581545979813e+00 -7.96915871905792270e+00 -1.78016712178804028e+01 -8.71818789274311309e+00 1.04969610969213173e+01 1.75775414029237656e+01 7.95917228742336868e+00 \n8.90409886344556868e+00 1.44765425126113352e+01 1.58750165663627345e+01 1.30010049834752966e+01 5.27701359144934069e+00 -6.53392387177069117e+00 -1.90137544106943481e+01 -2.60014110521128570e+01 -2.11744931262392689e+01 -3.61471838616804057e+00 1.70464820001955306e+01 2.36079119544198205e+01 7.06208161175043351e+00 -1.77296236456138836e+01 -2.41658917843808756e+01 -1.02901253985683904e+01 \n-4.73247046113937288e+00 -6.67619159820306279e+00 -4.64554022080883015e+00 1.42658250769629230e+00 1.10551805324395252e+01 2.20143763563732197e+01 2.97946570784718127e+01 2.85612023887992347e+01 1.45508173573916502e+01 -8.78164951257794163e+00 -2.80615923235205436e+01 -2.65056538254710712e+01 -8.41421779290572412e-01 2.73556898684898167e+01 3.05473112053177338e+01 1.20787374195312103e+01 \n-7.08270487822428903e+00 -1.22639256628750197e+01 -1.53934338946369494e+01 -1.62391577009771143e+01 -1.32972094367641153e+01 -5.18507915047397421e+00 7.47459092666959541e+00 2.00427198047030440e+01 2.40269909607458938e+01 1.24258068872962402e+01 -1.05334742827171004e+01 -2.53898041358609848e+01 -1.32893499889605237e+01 1.61358299640626765e+01 2.82505902285185802e+01 1.31562357655947440e+01 \n5.51393791315731242e+00 8.80385869417389204e+00 9.20055098888752032e+00 6.50716477274238969e+00 1.99433876324632388e-01 -9.28372858910320570e+00 -1.92909703972175648e+01 -2.44615412647698494e+01 -1.86850471905411714e+01 -5.68173760596780994e-01 2.04678409217883597e+01 2.61284311424297961e+01 6.16987679901669080e+00 -2.27699575536044746e+01 -2.97891003873391331e+01 -1.26160658784750999e+01 \n1.97968855482791957e+00 3.50674878647040605e+00 4.60257757158265642e+00 5.20728901330167839e+00 4.80746115191988875e+00 2.77677901269099858e+00 -1.04289747339367743e+00 -5.51255417706798656e+00 -7.84550137452685722e+00 -5.05360277424371776e+00 2.44934904186979613e+00 8.36324490295502311e+00 5.19286784240948770e+00 -4.97379522668361458e+00 -9.80867655327086244e+00 -4.73970618341379171e+00 \n-1.85582564800377944e+00 -3.04189160302670742e+00 -3.39166840526866137e+00 -2.83697292834484339e+00 -1.11595377381932387e+00 1.81839112837653146e+00 5.32965803130055526e+00 7.74985931070723632e+00 6.78672018751198031e+00 1.31672992566790748e+00 -6.08518463752272738e+00 -9.01054017090907339e+00 -2.87569278699472101e+00 7.36594664115296272e+00 1.04164887671094820e+01 4.55227849020667708e+00 \n-2.83166870234335009e-01 -5.08118872352238868e-01 -6.83517267855702479e-01 -8.02244714705947659e-01 -7.84575409488240216e-01 -5.20885222349346703e-01 4.42275416167837318e-02 7.71325387300820146e-01 1.23180131318950410e+00 8.92891699923716437e-01 -2.86494435453371168e-01 -1.33283462265767260e+00 -9.17666799943724847e-01 7.59275742183200650e-01 1.63130666512877294e+00 8.08452822063681266e-01 \n3.30820754167555875e-01 5.48859393715481337e-01 6.29607246499045904e-01 5.61334268851082381e-01 2.90610089051615648e-01 -2.08378289408119440e-01 -8.47530231743805952e-01 -1.34559583564671145e+00 -1.27177923546216673e+00 -3.54513382029638130e-01 1.01523213159894253e+00 1.65971832689142574e+00 6.14646505195270443e-01 -1.30852389016452434e+00 -1.94964830510331631e+00 -8.69877292745055814e-01 \n2.15030352970096280e-02 3.89000195229406977e-02 5.31275576126582929e-02 6.37439264450148573e-02 6.44412840449765165e-02 4.59539841751727035e-02 2.37010487921716490e-03 -5.72257445071626656e-02 -9.91717893212551767e-02 -7.74209340139477039e-02 1.75257058356881495e-02 1.08769180494198287e-01 8.03301320521407033e-02 -6.00770904783394092e-02 -1.37756378685460059e-01 -6.95528353378561583e-02 \n-1.60646452237113418e+01 0.00000000000000000e+00 -2.33521699062191370e+01 0.00000000000000000e+00 -2.49856811936224062e+00 0.00000000000000000e+00 1.91111221781815149e+01 0.00000000000000000e+00 9.63368243444507736e+00 0.00000000000000000e+00 -1.24775241516600516e+01 0.00000000000000000e+00 4.53420176008487152e+00 0.00000000000000000e+00 -8.80670449646946199e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -4.42380072531677287e+01 0.00000000000000000e+00 -2.44258612053067417e+01 0.00000000000000000e+00 2.66515803600512140e+01 0.00000000000000000e+00 3.51982422723613756e+01 0.00000000000000000e+00 -2.90803130542120360e+01 0.00000000000000000e+00 8.82837999179532503e+00 0.00000000000000000e+00 -1.44172555080666537e+00 0.00000000000000000e+00 1.38582882142790510e-01 \n-2.35803780321385831e+01 0.00000000000000000e+00 -7.95959718848640910e+01 0.00000000000000000e+00 -2.66364464515315745e+01 0.00000000000000000e+00 4.19933201103241911e+01 0.00000000000000000e+00 3.42807181086927919e+01 0.00000000000000000e+00 -3.40028658925729492e+01 0.00000000000000000e+00 1.15444160609124026e+01 0.00000000000000000e+00 -2.16719091929299505e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.53915633225959288e+01 0.00000000000000000e+00 -9.25906235985749416e+01 0.00000000000000000e+00 1.34376843642796167e+01 0.00000000000000000e+00 6.44147987491610702e+01 0.00000000000000000e+00 -3.84337122707894879e+01 0.00000000000000000e+00 1.00231217555763444e+01 0.00000000000000000e+00 -1.48113125510674957e+00 0.00000000000000000e+00 1.32548640152711327e-01 \n-3.39845929012331737e+00 0.00000000000000000e+00 -2.81495005335440513e+01 0.00000000000000000e+00 -1.31632262163680041e+02 0.00000000000000000e+00 2.78183850526223516e+01 0.00000000000000000e+00 7.92714270655655702e+01 0.00000000000000000e+00 -5.31433352268096233e+01 0.00000000000000000e+00 1.56831558830619477e+01 0.00000000000000000e+00 -2.72467813622398913e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 2.37879023368530545e+01 0.00000000000000000e+00 1.00133318459156866e+01 0.00000000000000000e+00 -1.22698885241390941e+02 0.00000000000000000e+00 5.81490750289232414e+01 0.00000000000000000e+00 -2.66131030637613023e+00 0.00000000000000000e+00 -3.45871365183241961e+00 0.00000000000000000e+00 9.46087377718445421e-01 0.00000000000000000e+00 -1.14550371782707993e-01 \n1.77155290410943698e+01 0.00000000000000000e+00 3.86725289323409712e+01 0.00000000000000000e+00 2.39758501700072402e+01 0.00000000000000000e+00 -1.46761938913747646e+02 0.00000000000000000e+00 9.29846899789186585e+01 0.00000000000000000e+00 -2.48899860761768050e+01 0.00000000000000000e+00 3.35997384880453279e+00 0.00000000000000000e+00 -2.02677516360165810e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 3.27363214831934084e+01 0.00000000000000000e+00 5.94257856254497539e+01 0.00000000000000000e+00 5.20770365269032838e+01 0.00000000000000000e+00 -1.71963865553769679e+02 0.00000000000000000e+00 1.03320846774468451e+02 0.00000000000000000e+00 -2.90765003434935939e+01 0.00000000000000000e+00 4.63806399652329530e+00 0.00000000000000000e+00 -4.43061357880375815e-01 \n9.46494092227874576e+00 0.00000000000000000e+00 3.28494727693052733e+01 0.00000000000000000e+00 7.47438610576863282e+01 0.00000000000000000e+00 8.66780535974508104e+01 0.00000000000000000e+00 -1.92866621657992019e+02 0.00000000000000000e+00 1.08984929860808992e+02 0.00000000000000000e+00 -3.12014894691848137e+01 0.00000000000000000e+00 5.41086820641689788e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.45425674906515866e+01 0.00000000000000000e+00 -3.23087950430901501e+01 0.00000000000000000e+00 -6.02197989941330481e-01 0.00000000000000000e+00 9.54057267519720671e+01 0.00000000000000000e+00 -6.83031826558441828e+01 0.00000000000000000e+00 2.08771200965969595e+01 0.00000000000000000e+00 -3.50108204812751278e+00 0.00000000000000000e+00 3.45657692659502965e-01 \n-1.10278758263146248e+01 0.00000000000000000e+00 -2.99667895285765919e+01 0.00000000000000000e+00 -4.68367654047722646e+01 0.00000000000000000e+00 -2.13010538016197455e+01 0.00000000000000000e+00 1.02847508743448112e+02 0.00000000000000000e+00 -6.59867090673133658e+01 0.00000000000000000e+00 2.00939302481948862e+01 0.00000000000000000e+00 -3.61572219991359435e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 6.70218706755743470e+00 0.00000000000000000e+00 7.56504925020821375e+00 0.00000000000000000e+00 -3.18941548893838459e+00 0.00000000000000000e+00 -2.42701868778331779e+01 0.00000000000000000e+00 1.88742714659521435e+01 0.00000000000000000e+00 -5.97762127920260539e+00 0.00000000000000000e+00 1.02362075218975941e+00 0.00000000000000000e+00 -1.02444858266621281e-01 \n3.71165129600755888e+00 0.00000000000000000e+00 9.45558237246341252e+00 0.00000000000000000e+00 1.28991968776574245e+01 0.00000000000000000e+00 2.56010964995862138e+00 0.00000000000000000e+00 -2.75597388861890622e+01 0.00000000000000000e+00 1.87962214142701817e+01 0.00000000000000000e+00 -5.88538817678826017e+00 0.00000000000000000e+00 1.07646787411121128e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -9.45599880360047999e-01 0.00000000000000000e+00 -9.64938637427895082e-01 0.00000000000000000e+00 7.08527323227121589e-01 0.00000000000000000e+00 3.35329340370771954e+00 0.00000000000000000e+00 -2.73983897180287527e+00 0.00000000000000000e+00 8.85786025375513413e-01 0.00000000000000000e+00 -1.53533595130620539e-01 0.00000000000000000e+00 1.54879950072286500e-02 \n-6.61641508335111750e-01 0.00000000000000000e+00 -1.63317366415667733e+00 0.00000000000000000e+00 -2.07107549955873439e+00 0.00000000000000000e+00 -1.27126832166835280e-01 0.00000000000000000e+00 4.42101666436137244e+00 0.00000000000000000e+00 -3.12335108380504467e+00 0.00000000000000000e+00 9.93496627070828583e-01 0.00000000000000000e+00 -1.83402486860859721e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 7.11773595595890022e-02 0.00000000000000000e+00 6.77280336710685913e-02 0.00000000000000000e+00 -6.55089800212711931e-02 0.00000000000000000e+00 -2.51188689693811165e-01 0.00000000000000000e+00 2.11779843060712752e-01 0.00000000000000000e+00 -6.93592300291094111e-02 0.00000000000000000e+00 1.21143172445225926e-02 0.00000000000000000e+00 -1.22821473535715910e-03 \n8.03232261185567089e+00 -1.21585253761485008e+01 1.15071091467275026e+01 -7.18421518133125709e+00 5.20391355923312089e-01 6.41724339256442189e+00 -1.10784312949120695e+01 1.12263167807549350e+01 -6.21132069209456485e+00 -1.82270065057678406e+00 8.04260511369546721e+00 -7.64319453151072885e+00 4.81305801400044865e-01 7.00033046284083731e+00 -7.71980006554966350e+00 3.00031236989332397e+00 \n1.12197163084185467e+01 -1.67472337587962289e+01 1.53106178326136883e+01 -8.72506281329854847e+00 -6.71556200140775556e-01 9.54869744865490818e+00 -1.43437479498344207e+01 1.27553916056603796e+01 -5.41689988737065071e+00 -3.51147226777446230e+00 8.27169490268524833e+00 -5.80428856072452061e+00 -9.83019350251513405e-01 5.53701141427072516e+00 -4.64463258933295199e+00 1.47135062744237319e+00 \n1.17901890160692915e+01 -1.71436852938043074e+01 1.44104165684684469e+01 -5.50313366047607500e+00 -6.82544293999595817e+00 1.84279402236509151e+01 -2.45397802249360700e+01 2.15351074931933890e+01 -9.33668085972759730e+00 -6.78365860861440982e+00 1.73073690368537160e+01 -1.42517181140636421e+01 -7.13576807492772536e-01 1.45149147257909736e+01 -1.48587408157434492e+01 5.57738599629304205e+00 \n5.72259402550979537e+00 -7.12786554524818253e+00 2.94259660833203778e+00 5.02553903119635622e+00 -1.36079308933559156e+01 1.87357271886655800e+01 -1.71012599429177732e+01 8.41743609371355857e+00 3.10287861804089877e+00 -1.02036666671063194e+01 7.94044756650482822e+00 5.80630851277135745e-01 -5.79893977454661158e+00 2.77775009388880266e+00 2.04136515456011441e+00 -1.83863313523973427e+00 \n1.69922964506165869e+00 -5.14537934713234042e-01 -4.73721400339959706e+00 1.27749844029254644e+01 -2.07616435679263180e+01 2.49777452631002075e+01 -2.22973109524810244e+01 1.21451890833932993e+01 2.02252930455129755e+00 -1.32961870499153451e+01 1.50577678338412621e+01 -6.43744335991433366e+00 -5.46903258960138234e+00 1.11121716129538702e+01 -7.97777918687068419e+00 2.34873890261920660e+00 \n-7.42217046147653871e+00 1.38172015150020838e+01 -1.93897781111741947e+01 2.32513433388182386e+01 -2.27074900770701556e+01 1.53170438529806067e+01 -1.32071083503119590e+00 -1.42782357543472937e+01 2.23060003897917582e+01 -1.50633549529571433e+01 -4.48819119464145783e+00 1.93354831883452692e+01 -1.23260041577734224e+01 -1.01624342201120595e+01 2.05385195244969148e+01 -9.82928607102200640e+00 \n-8.85776452054718491e+00 1.52993769650791013e+01 -1.90053472725959209e+01 1.96009159873676763e+01 -1.55595064307423372e+01 6.15961450350845554e+00 6.75870676492227071e+00 -1.78966494645241365e+01 2.01260363611391577e+01 -9.62488581545979813e+00 -7.96915871905792270e+00 1.78016712178804028e+01 -8.71818789274311309e+00 -1.04969610969213173e+01 1.75775414029237656e+01 -7.95917228742336868e+00 \n-8.90409886344556868e+00 1.44765425126113352e+01 -1.58750165663627345e+01 1.30010049834752966e+01 -5.27701359144934069e+00 -6.53392387177069117e+00 1.90137544106943481e+01 -2.60014110521128570e+01 2.11744931262392689e+01 -3.61471838616804057e+00 -1.70464820001955306e+01 2.36079119544198205e+01 -7.06208161175043351e+00 -1.77296236456138836e+01 2.41658917843808756e+01 -1.02901253985683904e+01 \n-4.73247046113937288e+00 6.67619159820306279e+00 -4.64554022080883015e+00 -1.42658250769629230e+00 1.10551805324395252e+01 -2.20143763563732197e+01 2.97946570784718127e+01 -2.85612023887992347e+01 1.45508173573916502e+01 8.78164951257794163e+00 -2.80615923235205436e+01 2.65056538254710712e+01 -8.41421779290572412e-01 -2.73556898684898167e+01 3.05473112053177338e+01 -1.20787374195312103e+01 \n7.08270487822428903e+00 -1.22639256628750197e+01 1.53934338946369494e+01 -1.62391577009771143e+01 1.32972094367641153e+01 -5.18507915047397421e+00 -7.47459092666959541e+00 2.00427198047030440e+01 -2.40269909607458938e+01 1.24258068872962402e+01 1.05334742827171004e+01 -2.53898041358609848e+01 1.32893499889605237e+01 1.61358299640626765e+01 -2.82505902285185802e+01 1.31562357655947440e+01 \n5.51393791315731242e+00 -8.80385869417389204e+00 9.20055098888752032e+00 -6.50716477274238969e+00 1.99433876324632388e-01 9.28372858910320570e+00 -1.92909703972175648e+01 2.44615412647698494e+01 -1.86850471905411714e+01 5.68173760596780994e-01 2.04678409217883597e+01 -2.61284311424297961e+01 6.16987679901669080e+00 2.27699575536044746e+01 -2.97891003873391331e+01 1.26160658784750999e+01 \n-1.97968855482791957e+00 3.50674878647040605e+00 -4.60257757158265642e+00 5.20728901330167839e+00 -4.80746115191988875e+00 2.77677901269099858e+00 1.04289747339367743e+00 -5.51255417706798656e+00 7.84550137452685722e+00 -5.05360277424371776e+00 -2.44934904186979613e+00 8.36324490295502311e+00 -5.19286784240948770e+00 -4.97379522668361458e+00 9.80867655327086244e+00 -4.73970618341379171e+00 \n-1.85582564800377944e+00 3.04189160302670742e+00 -3.39166840526866137e+00 2.83697292834484339e+00 -1.11595377381932387e+00 -1.81839112837653146e+00 5.32965803130055526e+00 -7.74985931070723632e+00 6.78672018751198031e+00 -1.31672992566790748e+00 -6.08518463752272738e+00 9.01054017090907339e+00 -2.87569278699472101e+00 -7.36594664115296272e+00 1.04164887671094820e+01 -4.55227849020667708e+00 \n2.83166870234335009e-01 -5.08118872352238868e-01 6.83517267855702479e-01 -8.02244714705947659e-01 7.84575409488240216e-01 -5.20885222349346703e-01 -4.42275416167837318e-02 7.71325387300820146e-01 -1.23180131318950410e+00 8.92891699923716437e-01 2.86494435453371168e-01 -1.33283462265767260e+00 9.17666799943724847e-01 7.59275742183200650e-01 -1.63130666512877294e+00 8.08452822063681266e-01 \n3.30820754167555875e-01 -5.48859393715481337e-01 6.29607246499045904e-01 -5.61334268851082381e-01 2.90610089051615648e-01 2.08378289408119440e-01 -8.47530231743805952e-01 1.34559583564671145e+00 -1.27177923546216673e+00 3.54513382029638130e-01 1.01523213159894253e+00 -1.65971832689142574e+00 6.14646505195270443e-01 1.30852389016452434e+00 -1.94964830510331631e+00 8.69877292745055814e-01 \n-2.15030352970096280e-02 3.89000195229406977e-02 -5.31275576126582929e-02 6.37439264450148573e-02 -6.44412840449765165e-02 4.59539841751727035e-02 -2.37010487921716490e-03 -5.72257445071626656e-02 9.91717893212551767e-02 -7.74209340139477039e-02 -1.75257058356881495e-02 1.08769180494198287e-01 -8.03301320521407033e-02 -6.00770904783394092e-02 1.37756378685460059e-01 -6.95528353378561583e-02 \n17\n8.48897950387555158e+00 1.30296491772342453e+01 1.28187178892071943e+01 8.99746770106359341e+00 2.79277310854318378e+00 -3.96613699710498311e+00 -9.07015441977409757e+00 -1.05642156817507752e+01 -7.67522664905093406e+00 -1.63285621460342065e+00 4.35384931585805611e+00 6.62448081388491100e+00 3.74175880334849047e+00 -1.76454428066317184e+00 -5.15113466183858738e+00 -4.16650433221925813e+00 -1.33873381137552343e+00 \n-1.09970855833057051e+01 -1.63485711824154310e+01 -1.47739048235300271e+01 -8.08834926992367948e+00 1.31191848305276293e+00 9.99978957350833283e+00 1.43250202873185227e+01 1.20223682977085117e+01 4.04364427314727697e+00 -4.82030291980019422e+00 -8.29381989700721076e+00 -3.87422563243067029e+00 3.38849210208405834e+00 5.04767800553543205e+00 -1.80841735056391332e-01 -4.15793627890630904e+00 -2.32977399373625646e+00 \n1.24760735643109428e+01 1.84741353798471093e+01 1.64664602141218032e+01 8.42950367465411116e+00 -3.04164525763400632e+00 -1.41868360206489616e+01 -2.08302520892798926e+01 -1.98961380464761186e+01 -1.12539862124040373e+01 1.18852136142006082e+00 1.06473045927528189e+01 1.14963307497558577e+01 4.02046092668187255e+00 -4.94820885984837881e+00 -8.14893036489703643e+00 -5.15740741951828492e+00 -1.33293537777805552e+00 \n-5.38366034021093325e+00 -6.35472263209875438e+00 -1.48384224177193241e+00 7.47771920687753707e+00 1.71989038328393441e+01 2.31438864138541594e+01 2.12219581547151082e+01 1.03630183820235601e+01 -5.15827549032375409e+00 -1.61288804356202591e+01 -1.39224073106858964e+01 5.10902199125733500e-01 1.32176304410915191e+01 9.43557070384969790e+00 -6.54118276104223659e+00 -1.39715675446785470e+01 -6.58303592780966429e+00 \n1.38163482482210317e+00 -2.91159207546872273e-03 -5.30440268881604598e+00 -1.32223842124532081e+01 -2.08553105329953162e+01 -2.44384873458402332e+01 -2.09155807347664327e+01 -1.00252059597700487e+01 4.16011731016563609e+00 1.40625893093866921e+01 1.31269773884509662e+01 2.24963852322113970e+00 -8.34924843277023540e+00 -7.90885973213957427e+00 1.59690443771490153e+00 7.03480235770636770e+00 3.57453075551298995e+00 \n7.65989919863332750e+00 1.47216665201601935e+01 2.18109686239935152e+01 2.82015726708728561e+01 3.09239336614611439e+01 2.65116843505591976e+01 1.32415995267670397e+01 -6.25425256696223745e+00 -2.36738274445760035e+01 -2.77687608144323013e+01 -1.26253767531004891e+01 1.27637109768925173e+01 2.56774588926485501e+01 1.05377284821344327e+01 -1.75361142490647559e+01 -2.60247197018802425e+01 -1.11590501643570672e+01 \n-1.12698569232759845e+01 -1.97564906775707165e+01 -2.53703317061552318e+01 -2.78503635420526981e+01 -2.51347227857844236e+01 -1.54421649120481726e+01 6.85658405094379136e-01 1.86014433602628352e+01 2.96554006909896936e+01 2.51535212123787578e+01 4.13423931400743163e+00 -2.03756288897059891e+01 -2.67941579420721033e+01 -5.87174764150461259e+00 2.23918220030046975e+01 2.77172239034267734e+01 1.11512120261990276e+01 \n8.67545658883809029e+00 1.44571442083440661e+01 1.68292321268345492e+01 1.58251616135448653e+01 1.07530632444084700e+01 1.72286247101293392e+00 -9.28150862690774814e+00 -1.80964427956279222e+01 -1.97050863489379843e+01 -1.14802027673868435e+01 3.19874283644958566e+00 1.46845029949864811e+01 1.34157442457055613e+01 -7.71315152572546809e-02 -1.28734138886622985e+01 -1.30697613291307433e+01 -4.75639451623148430e+00 \n-7.01827913916847089e+00 -1.10052363975968397e+01 -1.10879884583697540e+01 -7.35892202784335574e+00 2.14080545323366899e-01 1.05526822502459545e+01 2.07413027121841241e+01 2.61637318020698553e+01 2.22380310964065000e+01 7.83846101568540933e+00 -1.13117905532002663e+01 -2.31599890213178972e+01 -1.71665077828950856e+01 3.90134327094019596e+00 2.17654957548641351e+01 2.06113160655508168e+01 7.37010068145791919e+00 \n-7.38561958494319520e+00 -1.34955210239871066e+01 -1.87831321497656540e+01 -2.32477709597924217e+01 -2.49964673572697457e+01 -2.11866642356007909e+01 -9.63722741815164434e+00 8.40720936766961834e+00 2.57290530310608429e+01 3.03287021124019224e+01 1.38643388046495418e+01 -1.56361385506445534e+01 -3.16929633212184952e+01 -1.32640676808356240e+01 2.27441132536885613e+01 3.42938155818470523e+01 1.49004367095677231e+01 \n9.10080272800703425e+00 1.54749854649107720e+01 1.88338753955751118e+01 1.91703304231179554e+01 1.51599010416983268e+01 5.60927527973824919e+00 -8.90234060539362969e+00 -2.42171881892352517e+01 -3.22134688112638354e+01 -2.43020606412158843e+01 3.88436615136799804e-01 2.74312906363341560e+01 3.23061313048608025e+01 4.61588629643706035e+00 -3.08312415205601549e+01 -3.65832819740497911e+01 -1.45886196815344998e+01 \n2.23255487530948326e+00 4.26098550492572406e+00 6.37502210476783489e+00 8.61500006217632434e+00 1.02646070883360474e+01 1.00068617411839924e+01 6.41461412996047701e+00 -8.26437228696579386e-01 -9.30199792244405277e+00 -1.35080740993480871e+01 -8.14734701689200381e+00 5.09446660805270444e+00 1.43011134889885536e+01 7.46907638413318197e+00 -9.60051504227561981e+00 -1.62126460905286980e+01 -7.32487415078259255e+00 \n-3.48924646698312516e+00 -6.05957083891263359e+00 -7.69934262846676289e+00 -8.41659962616584326e+00 -7.58712293513220401e+00 -4.44964144412232138e+00 1.22926224790914971e+00 8.20835292230618084e+00 1.31594212841535010e+01 1.16945823455268202e+01 2.01595770455337247e+00 -1.06238053189257011e+01 -1.47318435010651969e+01 -3.51894457894322604e+00 1.30720342793782267e+01 1.67807460006976415e+01 6.91937526827480208e+00 \n-3.59205241603480505e-01 -7.07771862585952011e-01 -1.11164622304035583e+00 -1.58450696860692164e+00 -1.99755829289345760e+00 -2.08592073722351602e+00 -1.51955338119669115e+00 -1.39366547103268349e-01 1.66795500246510117e+00 2.77967025996324428e+00 1.92113324833799967e+00 -8.22842093090209140e-01 -3.00167851133104570e+00 -1.76787347699494556e+00 1.93923555631984100e+00 3.53400878204234181e+00 1.63722138816640184e+00 \n7.20025478541323346e-01 1.26428589734435722e+00 1.64189479121501399e+00 1.85746482332496572e+00 1.77163989197949764e+00 1.19382056454513759e+00 1.84986107853795887e-02 -1.55266863894059089e+00 -2.82116268907590854e+00 -2.74302641857546557e+00 -7.29092608382509000e-01 2.20917133455118142e+00 3.40514408931371334e+00 1.00429119876274793e+00 -2.90662045475784869e+00 -3.92660299285812423e+00 -1.65390440035623799e+00 \n3.34500626765852406e-02 6.75802596159732317e-02 1.10002764809134921e-01 1.62600618934701684e-01 2.12521508735043204e-01 2.31318802606779179e-01 1.80641006142848450e-01 3.66214264022951384e-02 -1.66569565198666187e-01 -3.07153506606437698e-01 -2.31213599373930897e-01 7.34371586238881167e-02 3.37805473717583789e-01 2.15533618205867147e-01 -2.12592387603932148e-01 -4.10361815366004388e-01 -1.93659890612871686e-01 \n-9.29884285771042733e-02 -1.64332029958526378e-01 -2.16112255770518546e-01 -2.49232864697488163e-01 -2.45020832529492601e-01 -1.76367948276264683e-01 -2.50062153523866877e-02 1.88009171447694070e-01 3.72554882737742217e-01 3.82817222150921297e-01 1.22866527377830246e-01 -2.85756397789467380e-01 -4.73558031855553927e-01 -1.56899656814411495e-01 3.94926790640226080e-01 5.52604822675886876e-01 2.36179415038249614e-01 \n-1.69779590077511032e+01 0.00000000000000000e+00 -2.47333857302213701e+01 0.00000000000000000e+00 -1.84960093293463130e+00 0.00000000000000000e+00 2.41660068017972274e+01 0.00000000000000000e+00 1.45760514247857284e+01 0.00000000000000000e+00 -2.05758755963501856e+01 0.00000000000000000e+00 8.42298724578832403e+00 0.00000000000000000e+00 -1.86902487479734063e+00 0.00000000000000000e+00 2.62522321139514447e-01 \n0.00000000000000000e+00 -4.34929014970439562e+01 0.00000000000000000e+00 -2.36192455773885615e+01 0.00000000000000000e+00 2.64599902247590375e+01 0.00000000000000000e+00 3.35075597702176193e+01 0.00000000000000000e+00 -2.85730694143800582e+01 0.00000000000000000e+00 9.04725800497076029e+00 0.00000000000000000e+00 -1.58082226163222577e+00 0.00000000000000000e+00 1.69845271986483503e-01 0.00000000000000000e+00 \n-2.49521471286218856e+01 0.00000000000000000e+00 -8.15010287663756098e+01 0.00000000000000000e+00 -2.49715255627575359e+01 0.00000000000000000e+00 5.07411692472030163e+01 0.00000000000000000e+00 4.19692435169704578e+01 0.00000000000000000e+00 -4.76390394560881953e+01 0.00000000000000000e+00 1.82686888184250947e+01 0.00000000000000000e+00 -3.90812361501669407e+00 0.00000000000000000e+00 5.36281215536910027e-01 \n0.00000000000000000e+00 -2.45896476955580257e+01 0.00000000000000000e+00 -9.43779668756872835e+01 0.00000000000000000e+00 5.37874197287862448e+00 0.00000000000000000e+00 5.59523810195778679e+01 0.00000000000000000e+00 -2.54496181740643069e+01 0.00000000000000000e+00 4.37314934899172986e+00 0.00000000000000000e+00 -2.45402665289391235e-01 0.00000000000000000e+00 -2.24738039168868130e-02 0.00000000000000000e+00 \n-2.76326964964420634e+00 0.00000000000000000e+00 -2.65094534734437051e+01 0.00000000000000000e+00 -1.29318012795433172e+02 0.00000000000000000e+00 2.89262360375801677e+01 0.00000000000000000e+00 7.68800953954187016e+01 0.00000000000000000e+00 -5.33803794590693732e+01 0.00000000000000000e+00 1.64989936552987499e+01 0.00000000000000000e+00 -3.05859993345351540e+00 0.00000000000000000e+00 3.78621014137444413e-01 \n0.00000000000000000e+00 2.36260053312358166e+01 0.00000000000000000e+00 2.18784035843845393e+00 0.00000000000000000e+00 -1.45287546590653214e+02 0.00000000000000000e+00 3.93649381105784030e+01 0.00000000000000000e+00 3.31168387826041719e+01 0.00000000000000000e+00 -2.05066584279893843e+01 0.00000000000000000e+00 4.98453181875100162e+00 0.00000000000000000e+00 -6.68540887868940325e-01 0.00000000000000000e+00 \n2.25397138465519690e+01 0.00000000000000000e+00 4.70764200430773809e+01 0.00000000000000000e+00 2.50528788601946522e+01 0.00000000000000000e+00 -1.65960448622984101e+02 0.00000000000000000e+00 6.85169895874760795e+01 0.00000000000000000e+00 8.46300248424372625e+00 0.00000000000000000e+00 -1.15363065824006972e+01 0.00000000000000000e+00 3.38499683674497797e+00 0.00000000000000000e+00 -5.42724781555038998e-01 \n0.00000000000000000e+00 3.11910379462148747e+01 0.00000000000000000e+00 5.15192715590558639e+01 0.00000000000000000e+00 3.40304640461525620e+01 0.00000000000000000e+00 -1.84061408524678068e+02 0.00000000000000000e+00 1.31564266011485362e+02 0.00000000000000000e+00 -4.34383613173987844e+01 0.00000000000000000e+00 8.21669658788327559e+00 0.00000000000000000e+00 -9.59541879499830717e-01 0.00000000000000000e+00 \n1.40365582783369418e+01 0.00000000000000000e+00 4.00037786438593349e+01 0.00000000000000000e+00 7.24621523968341156e+01 0.00000000000000000e+00 6.29361652671879578e+01 0.00000000000000000e+00 -2.17350881456459481e+02 0.00000000000000000e+00 1.47735413407204396e+02 0.00000000000000000e+00 -4.96223669927064011e+01 0.00000000000000000e+00 1.00682164981490803e+01 0.00000000000000000e+00 -1.34876069939152990e+00 \n0.00000000000000000e+00 -2.41780314180152971e+01 0.00000000000000000e+00 -2.08921176677680729e+01 0.00000000000000000e+00 3.19574419161533584e+01 0.00000000000000000e+00 1.22290592525714674e+02 0.00000000000000000e+00 -1.20099105785191001e+02 0.00000000000000000e+00 4.57243199239313108e+01 0.00000000000000000e+00 -9.43129158317736067e+00 0.00000000000000000e+00 1.16722925081562042e+00 0.00000000000000000e+00 \n-1.82016054560140685e+01 0.00000000000000000e+00 -4.21304694332162743e+01 0.00000000000000000e+00 -4.70648758878489353e+01 0.00000000000000000e+00 9.63224415550704040e+00 0.00000000000000000e+00 1.39954907960659909e+02 0.00000000000000000e+00 -1.18913837488358445e+02 0.00000000000000000e+00 4.42617922660031987e+01 0.00000000000000000e+00 -9.54899970447723399e+00 0.00000000000000000e+00 1.33090423786880653e+00 \n0.00000000000000000e+00 6.94562288903505042e+00 0.00000000000000000e+00 3.00332469877592984e+00 0.00000000000000000e+00 -1.75713709849640965e+01 0.00000000000000000e+00 -3.70232333775370164e+01 0.00000000000000000e+00 4.19738326333280646e+01 0.00000000000000000e+00 -1.68330618448555448e+01 0.00000000000000000e+00 3.57515874630295256e+00 0.00000000000000000e+00 -4.50884774378792923e-01 0.00000000000000000e+00 \n6.97849293396625032e+00 0.00000000000000000e+00 1.51505249649455028e+01 0.00000000000000000e+00 1.36323850385269030e+01 0.00000000000000000e+00 -1.05037825123098889e+01 0.00000000000000000e+00 -4.42990318264052011e+01 0.00000000000000000e+00 4.16985184652314216e+01 0.00000000000000000e+00 -1.61682705172741809e+01 0.00000000000000000e+00 3.57000511692616109e+00 0.00000000000000000e+00 -5.04895216773552405e-01 \n0.00000000000000000e+00 -1.07310319003722433e+00 0.00000000000000000e+00 -8.51548581403617789e-02 0.00000000000000000e+00 3.76995828216281013e+00 0.00000000000000000e+00 6.24004796927155617e+00 0.00000000000000000e+00 -7.71430826581997758e+00 0.00000000000000000e+00 3.18477485702642349e+00 0.00000000000000000e+00 -6.87437120932681307e-01 0.00000000000000000e+00 8.76051392857933637e-02 0.00000000000000000e+00 \n-1.44005095708264669e+00 0.00000000000000000e+00 -3.01786766799422793e+00 0.00000000000000000e+00 -2.35721739043392400e+00 0.00000000000000000e+00 2.80882182907681821e+00 0.00000000000000000e+00 8.39359458155502507e+00 0.00000000000000000e+00 -8.38799650480185319e+00 0.00000000000000000e+00 3.32700305827986391e+00 0.00000000000000000e+00 -7.44066745332211373e-01 0.00000000000000000e+00 1.06082211871366586e-01 \n0.00000000000000000e+00 9.65883130568896452e-02 0.00000000000000000e+00 -2.18697334813581276e-02 0.00000000000000000e+00 -4.22223955111217125e-01 0.00000000000000000e+00 -6.12868523262258795e-01 0.00000000000000000e+00 8.01826514683811678e-01 0.00000000000000000e+00 -3.37113725917071339e-01 0.00000000000000000e+00 7.35099138523467621e-02 0.00000000000000000e+00 -9.42982299484660600e-03 0.00000000000000000e+00 \n1.85976857154208547e-01 0.00000000000000000e+00 3.81545019461183604e-01 0.00000000000000000e+00 2.70821148744215312e-01 0.00000000000000000e+00 -4.08372280528504791e-01 0.00000000000000000e+00 -1.03845237906332390e+00 0.00000000000000000e+00 1.07617132512473206e+00 0.00000000000000000e+00 -4.32633574213868595e-01 0.00000000000000000e+00 9.74934948465727752e-02 0.00000000000000000e+00 -1.39666154930459658e-02 \n8.48897950387555158e+00 -1.30296491772342453e+01 1.28187178892071943e+01 -8.99746770106359341e+00 2.79277310854318378e+00 3.96613699710498311e+00 -9.07015441977409757e+00 1.05642156817507752e+01 -7.67522664905093406e+00 1.63285621460342065e+00 4.35384931585805611e+00 -6.62448081388491100e+00 3.74175880334849047e+00 1.76454428066317184e+00 -5.15113466183858738e+00 4.16650433221925813e+00 -1.33873381137552343e+00 \n1.09970855833057051e+01 -1.63485711824154310e+01 1.47739048235300271e+01 -8.08834926992367948e+00 -1.31191848305276293e+00 9.99978957350833283e+00 -1.43250202873185227e+01 1.20223682977085117e+01 -4.04364427314727697e+00 -4.82030291980019422e+00 8.29381989700721076e+00 -3.87422563243067029e+00 -3.38849210208405834e+00 5.04767800553543205e+00 1.80841735056391332e-01 -4.15793627890630904e+00 2.32977399373625646e+00 \n1.24760735643109428e+01 -1.84741353798471093e+01 1.64664602141218032e+01 -8.42950367465411116e+00 -3.04164525763400632e+00 1.41868360206489616e+01 -2.08302520892798926e+01 1.98961380464761186e+01 -1.12539862124040373e+01 -1.18852136142006082e+00 1.06473045927528189e+01 -1.14963307497558577e+01 4.02046092668187255e+00 4.94820885984837881e+00 -8.14893036489703643e+00 5.15740741951828492e+00 -1.33293537777805552e+00 \n5.38366034021093325e+00 -6.35472263209875438e+00 1.48384224177193241e+00 7.47771920687753707e+00 -1.71989038328393441e+01 2.31438864138541594e+01 -2.12219581547151082e+01 1.03630183820235601e+01 5.15827549032375409e+00 -1.61288804356202591e+01 1.39224073106858964e+01 5.10902199125733500e-01 -1.32176304410915191e+01 9.43557070384969790e+00 6.54118276104223659e+00 -1.39715675446785470e+01 6.58303592780966429e+00 \n1.38163482482210317e+00 2.91159207546872273e-03 -5.30440268881604598e+00 1.32223842124532081e+01 -2.08553105329953162e+01 2.44384873458402332e+01 -2.09155807347664327e+01 1.00252059597700487e+01 4.16011731016563609e+00 -1.40625893093866921e+01 1.31269773884509662e+01 -2.24963852322113970e+00 -8.34924843277023540e+00 7.90885973213957427e+00 1.59690443771490153e+00 -7.03480235770636770e+00 3.57453075551298995e+00 \n-7.65989919863332750e+00 1.47216665201601935e+01 -2.18109686239935152e+01 2.82015726708728561e+01 -3.09239336614611439e+01 2.65116843505591976e+01 -1.32415995267670397e+01 -6.25425256696223745e+00 2.36738274445760035e+01 -2.77687608144323013e+01 1.26253767531004891e+01 1.27637109768925173e+01 -2.56774588926485501e+01 1.05377284821344327e+01 1.75361142490647559e+01 -2.60247197018802425e+01 1.11590501643570672e+01 \n-1.12698569232759845e+01 1.97564906775707165e+01 -2.53703317061552318e+01 2.78503635420526981e+01 -2.51347227857844236e+01 1.54421649120481726e+01 6.85658405094379136e-01 -1.86014433602628352e+01 2.96554006909896936e+01 -2.51535212123787578e+01 4.13423931400743163e+00 2.03756288897059891e+01 -2.67941579420721033e+01 5.87174764150461259e+00 2.23918220030046975e+01 -2.77172239034267734e+01 1.11512120261990276e+01 \n-8.67545658883809029e+00 1.44571442083440661e+01 -1.68292321268345492e+01 1.58251616135448653e+01 -1.07530632444084700e+01 1.72286247101293392e+00 9.28150862690774814e+00 -1.80964427956279222e+01 1.97050863489379843e+01 -1.14802027673868435e+01 -3.19874283644958566e+00 1.46845029949864811e+01 -1.34157442457055613e+01 -7.71315152572546809e-02 1.28734138886622985e+01 -1.30697613291307433e+01 4.75639451623148430e+00 \n-7.01827913916847089e+00 1.10052363975968397e+01 -1.10879884583697540e+01 7.35892202784335574e+00 2.14080545323366899e-01 -1.05526822502459545e+01 2.07413027121841241e+01 -2.61637318020698553e+01 2.22380310964065000e+01 -7.83846101568540933e+00 -1.13117905532002663e+01 2.31599890213178972e+01 -1.71665077828950856e+01 -3.90134327094019596e+00 2.17654957548641351e+01 -2.06113160655508168e+01 7.37010068145791919e+00 \n7.38561958494319520e+00 -1.34955210239871066e+01 1.87831321497656540e+01 -2.32477709597924217e+01 2.49964673572697457e+01 -2.11866642356007909e+01 9.63722741815164434e+00 8.40720936766961834e+00 -2.57290530310608429e+01 3.03287021124019224e+01 -1.38643388046495418e+01 -1.56361385506445534e+01 3.16929633212184952e+01 -1.32640676808356240e+01 -2.27441132536885613e+01 3.42938155818470523e+01 -1.49004367095677231e+01 \n9.10080272800703425e+00 -1.54749854649107720e+01 1.88338753955751118e+01 -1.91703304231179554e+01 1.51599010416983268e+01 -5.60927527973824919e+00 -8.90234060539362969e+00 2.42171881892352517e+01 -3.22134688112638354e+01 2.43020606412158843e+01 3.88436615136799804e-01 -2.74312906363341560e+01 3.23061313048608025e+01 -4.61588629643706035e+00 -3.08312415205601549e+01 3.65832819740497911e+01 -1.45886196815344998e+01 \n-2.23255487530948326e+00 4.26098550492572406e+00 -6.37502210476783489e+00 8.61500006217632434e+00 -1.02646070883360474e+01 1.00068617411839924e+01 -6.41461412996047701e+00 -8.26437228696579386e-01 9.30199792244405277e+00 -1.35080740993480871e+01 8.14734701689200381e+00 5.09446660805270444e+00 -1.43011134889885536e+01 7.46907638413318197e+00 9.60051504227561981e+00 -1.62126460905286980e+01 7.32487415078259255e+00 \n-3.48924646698312516e+00 6.05957083891263359e+00 -7.69934262846676289e+00 8.41659962616584326e+00 -7.58712293513220401e+00 4.44964144412232138e+00 1.22926224790914971e+00 -8.20835292230618084e+00 1.31594212841535010e+01 -1.16945823455268202e+01 2.01595770455337247e+00 1.06238053189257011e+01 -1.47318435010651969e+01 3.51894457894322604e+00 1.30720342793782267e+01 -1.67807460006976415e+01 6.91937526827480208e+00 \n3.59205241603480505e-01 -7.07771862585952011e-01 1.11164622304035583e+00 -1.58450696860692164e+00 1.99755829289345760e+00 -2.08592073722351602e+00 1.51955338119669115e+00 -1.39366547103268349e-01 -1.66795500246510117e+00 2.77967025996324428e+00 -1.92113324833799967e+00 -8.22842093090209140e-01 3.00167851133104570e+00 -1.76787347699494556e+00 -1.93923555631984100e+00 3.53400878204234181e+00 -1.63722138816640184e+00 \n7.20025478541323346e-01 -1.26428589734435722e+00 1.64189479121501399e+00 -1.85746482332496572e+00 1.77163989197949764e+00 -1.19382056454513759e+00 1.84986107853795887e-02 1.55266863894059089e+00 -2.82116268907590854e+00 2.74302641857546557e+00 -7.29092608382509000e-01 -2.20917133455118142e+00 3.40514408931371334e+00 -1.00429119876274793e+00 -2.90662045475784869e+00 3.92660299285812423e+00 -1.65390440035623799e+00 \n-3.34500626765852406e-02 6.75802596159732317e-02 -1.10002764809134921e-01 1.62600618934701684e-01 -2.12521508735043204e-01 2.31318802606779179e-01 -1.80641006142848450e-01 3.66214264022951384e-02 1.66569565198666187e-01 -3.07153506606437698e-01 2.31213599373930897e-01 7.34371586238881167e-02 -3.37805473717583789e-01 2.15533618205867147e-01 2.12592387603932148e-01 -4.10361815366004388e-01 1.93659890612871686e-01 \n-9.29884285771042733e-02 1.64332029958526378e-01 -2.16112255770518546e-01 2.49232864697488163e-01 -2.45020832529492601e-01 1.76367948276264683e-01 -2.50062153523866877e-02 -1.88009171447694070e-01 3.72554882737742217e-01 -3.82817222150921297e-01 1.22866527377830246e-01 2.85756397789467380e-01 -4.73558031855553927e-01 1.56899656814411495e-01 3.94926790640226080e-01 -5.52604822675886876e-01 2.36179415038249614e-01 \n18\n8.37242294893226670e+00 1.28489178196292260e+01 1.26447305743530684e+01 8.90839332881958672e+00 2.88343556103002766e+00 -3.59918252786345223e+00 -8.37365961472559108e+00 -9.60628254104707012e+00 -6.72863306162290918e+00 -1.17863364881717849e+00 3.83319667490574680e+00 5.11445299628644289e+00 2.15473925141535256e+00 -1.83049055128036840e+00 -2.79010258294333592e+00 -5.39588033996544174e-01 1.24028790817586851e+00 7.51570614374682917e-01 \n-1.14914793810508955e+01 -1.70604827988596166e+01 -1.52991363134018205e+01 -7.97205983897296303e+00 2.56173057881778213e+00 1.27386489535834530e+01 1.84276212879312315e+01 1.64724722825371870e+01 6.83686924168451021e+00 -5.84651847263026186e+00 -1.34468423824621655e+01 -9.70126342404492629e+00 2.71696639637566970e+00 1.14250208088531036e+01 6.12761578251986635e+00 -6.99858486942576295e+00 -1.15235545225011518e+01 -4.97683734689374787e+00 \n1.21399791782249832e+01 1.78707646986547250e+01 1.56466766767242102e+01 7.43208431802197305e+00 -4.11150275992763275e+00 -1.51015775158585848e+01 -2.12235704256957609e+01 -1.93559509021941183e+01 -9.60138041149665626e+00 3.46931192132416563e+00 1.21642996417244559e+01 1.05575652262334154e+01 4.58169322137064335e-01 -8.05593619571008364e+00 -6.05773510950554942e+00 2.90197774336660155e+00 6.87894980567901218e+00 3.15678708439316136e+00 \n-6.62990969514587772e+00 -8.22196137613934084e+00 -3.08962724923271005e+00 7.11499667701056608e+00 1.91801123656576211e+01 2.83593411791749291e+01 2.96384878665918399e+01 2.01027692815270681e+01 1.79664873486984848e+00 -1.68338394710327560e+01 -2.38507528698974328e+01 -1.24613140929149538e+01 9.44526870064964246e+00 2.09651161948410007e+01 8.33468344900514789e+00 -1.46694787963013337e+01 -2.08542377245679188e+01 -8.62317700383707698e+00 \n7.90404414174685789e-01 -1.26171151631081692e+00 -7.51007814722205953e+00 -1.67545864545682369e+01 -2.59325017654326678e+01 -3.07820023168772143e+01 -2.73700066045145662e+01 -1.44057197293116455e+01 4.48325608632426199e+00 2.04005299190520758e+01 2.30273571296640325e+01 8.78231568850560677e+00 -1.21786245460829268e+01 -2.03470184398842670e+01 -6.01502563428615666e+00 1.54311619770762012e+01 1.98103287496703971e+01 7.88612576951304608e+00 \n5.68177980997432662e+00 1.16679549107094561e+01 1.89134971425438500e+01 2.68142533141548401e+01 3.26214551630043349e+01 3.26993454035364833e+01 2.42155353085476130e+01 7.37043269866607917e+00 -1.27499042373099513e+01 -2.65665194368542930e+01 -2.45935835462132318e+01 -5.68169997307200230e+00 1.71478845549312294e+01 2.32194300279890377e+01 4.75090584338018065e+00 -1.92349533211470859e+01 -2.28676061056967183e+01 -8.85428445832610095e+00 \n-1.18508897122117714e+01 -2.12611924959252661e+01 -2.85730452115215666e+01 -3.37309552170291406e+01 -3.44540176044563713e+01 -2.80897912186542855e+01 -1.34608467807709522e+01 7.08134634618579627e+00 2.64784073420305847e+01 3.45285358659758224e+01 2.36358423942863476e+01 -2.90814973885821221e+00 -2.72720633049522343e+01 -2.74861776420857058e+01 -2.81301163440310677e-01 2.81855165034427195e+01 2.94809963590929060e+01 1.08599604749386300e+01 \n7.98670249036312866e+00 1.32989045108899490e+01 1.54522318098073567e+01 1.44857582102792485e+01 9.81846089437767801e+00 1.67597042652682874e+00 -7.96805831810894943e+00 -1.52766944420951517e+01 -1.60191222722840539e+01 -8.63303973642542830e+00 2.98038768561771872e+00 1.04832705785776884e+01 7.81247645198548155e+00 -1.44008865851958602e+00 -6.46501529075078405e+00 -2.68794162190095591e+00 2.19537795755975410e+00 1.75275677805628116e+00 \n-6.83319266437668600e+00 -1.09121666859968871e+01 -1.15617306388270339e+01 -8.96311609846351460e+00 -3.06635415678834904e+00 5.32546153733766972e+00 1.39878473754735162e+01 1.94282852722872129e+01 1.82238703579625206e+01 9.41775010791146845e+00 -3.40570263009958017e+00 -1.28086112240120534e+01 -1.23623003971393413e+01 -2.84763120940329405e+00 7.16140200157780149e+00 9.59977592688839621e+00 5.38294754843613429e+00 1.21306121644135542e+00 \n-4.44320558388858491e+00 -8.99645107531267079e+00 -1.46403504968312634e+01 -2.15708436423445155e+01 -2.82045071550513558e+01 -3.13631515261402777e+01 -2.70441016007081031e+01 -1.26505910984959221e+01 9.50112475084879185e+00 2.96300049113735936e+01 3.32830742817006971e+01 1.25343140972693189e+01 -2.02748244905305860e+01 -3.43530709925167918e+01 -1.05025939622191725e+01 2.76037639261965746e+01 3.63388881049540215e+01 1.47503948764709674e+01 \n9.93863541176476786e+00 1.76397275395392610e+01 2.34322167093159680e+01 2.76017587995099013e+01 2.85068427439357182e+01 2.37036290402782181e+01 1.13121207840975035e+01 -7.78197051922166411e+00 -2.77042212188542177e+01 -3.76777872384300379e+01 -2.73594986636045082e+01 2.62674625860662856e+00 3.29638341236915390e+01 3.51472712432230764e+01 1.22518920637475772e+00 -3.69200888361569590e+01 -3.98736670223733855e+01 -1.49857515831212947e+01 \n6.02022393326844400e-01 1.81780789585866479e+00 4.27261735295746918e+00 8.13395137724095855e+00 1.28370091918261027e+01 1.67846527309151227e+01 1.73433568468575576e+01 1.18063627648763849e+01 -2.80799635418159434e-01 -1.43653533730352112e+01 -2.08535071787308893e+01 -1.15298476383570127e+01 9.32693105120863193e+00 2.18708284582793507e+01 9.29041706622033224e+00 -1.62865085487557345e+01 -2.40841772234275125e+01 -1.02148413554848837e+01 \n-4.14413828790267559e+00 -7.59906418535271851e+00 -1.07033241744578699e+01 -1.36324305489981772e+01 -1.55483944512480333e+01 -1.49307852359567264e+01 -1.01150593616012474e+01 -5.22626503168572253e-01 1.16098986103065078e+01 2.03069875248009693e+01 1.80680610737756546e+01 2.45137523638854695e+00 -1.69989118220677350e+01 -2.18267641070218366e+01 -3.34011308603949807e+00 2.09753015702973721e+01 2.46238570925945709e+01 9.60565403387451607e+00 \n5.51202408017050535e-02 -9.81439845750151509e-02 -6.20642038502525179e-01 -1.56221336844813855e+00 -2.82768454005141717e+00 -4.05954575803952079e+00 -4.57743870786630339e+00 -3.55738511772941018e+00 -6.27203607732330441e-01 3.26635760226123185e+00 5.55917088256891596e+00 3.60490455801104465e+00 -2.02219275203914776e+00 -5.96829113698655821e+00 -2.93815400637688341e+00 4.28051441064643243e+00 6.78971185740003622e+00 2.95332664124734191e+00 \n9.41856922960597292e-01 1.76296822000964956e+00 2.57121437974063982e+00 3.41865005130728532e+00 4.09845654257256348e+00 4.19551677328002622e+00 3.19346542247697578e+00 7.89149509746087815e-01 -2.58750533032317266e+00 -5.37329234513076948e+00 -5.30797300979736221e+00 -1.27187355961902960e+00 4.40786044881741873e+00 6.32789946851511829e+00 1.36186837770410119e+00 -5.82566503523164311e+00 -7.19070005464247163e+00 -2.86707690578246438e+00 \n-2.41564510697207680e-02 -1.52720663544967698e-02 4.90907907413469709e-02 1.76458920476685812e-01 3.57758430102644559e-01 5.47958765036741924e-01 6.52620917338336257e-01 5.46112238740575658e-01 1.52710058027698822e-01 -4.18638749986184600e-01 -8.02326739989640416e-01 -5.73572027182816591e-01 2.45871818292631594e-01 8.80435057313081927e-01 4.76114418162545733e-01 -6.16348164360340169e-01 -1.02980966958881522e+00 -4.56232028871394678e-01 \n-1.36684932577067411e-01 -2.59543180793522119e-01 -3.87474213739895124e-01 -5.29478237388750784e-01 -6.54229384805705203e-01 -6.94729507112508389e-01 -5.61675764312064749e-01 -1.91714434556905493e-01 3.64265685284321908e-01 8.60770295293903634e-01 9.08453004697207761e-01 2.74117781372636856e-01 -6.96967797064146320e-01 -1.08147388514625617e+00 -2.76493928009077583e-01 9.70431926024224653e-01 1.24060147208662531e+00 5.02243080044940244e-01 \n2.69757548765387862e-03 2.61690557050201978e-03 -1.99503872812577161e-03 -1.17538827791251453e-02 -2.61619713785908730e-02 -4.19576646303620961e-02 -5.18162748646193836e-02 -4.54000867575661406e-02 -1.55189776967001816e-02 3.06752881036411437e-02 6.43250297115759333e-02 4.90708915985721993e-02 -1.70374729374840413e-02 -7.18762201540119482e-02 -4.14616787101810082e-02 4.94843046413870859e-02 8.60107236489901411e-02 3.86343295845351688e-02 \n-1.67448458978645334e+01 0.00000000000000000e+00 -2.40577486921634167e+01 0.00000000000000000e+00 -6.44903919127458386e-01 0.00000000000000000e+00 2.53781956540001632e+01 0.00000000000000000e+00 1.41845724435641498e+01 0.00000000000000000e+00 -2.24400815066867684e+01 0.00000000000000000e+00 9.94119192246097049e+00 0.00000000000000000e+00 -2.40967377208952856e+00 0.00000000000000000e+00 3.75503328242625763e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -4.54943389707219896e+01 0.00000000000000000e+00 -2.85871863214519764e+01 0.00000000000000000e+00 1.85716567147800266e+01 0.00000000000000000e+00 3.08796998592470027e+01 0.00000000000000000e+00 -1.57116737157585528e+01 0.00000000000000000e+00 1.28953743330413204e+00 0.00000000000000000e+00 6.18555154160371634e-01 0.00000000000000000e+00 -1.88282878484854729e-01 0.00000000000000000e+00 2.40437132865472207e-02 \n-2.42799583564499664e+01 0.00000000000000000e+00 -8.01904813612409590e+01 0.00000000000000000e+00 -2.41882740171291490e+01 0.00000000000000000e+00 4.93815239970767186e+01 0.00000000000000000e+00 3.92399133318925001e+01 0.00000000000000000e+00 -4.55714672295973290e+01 0.00000000000000000e+00 1.79212288466906331e+01 0.00000000000000000e+00 -3.98956894674611416e+00 0.00000000000000000e+00 5.81218524566456637e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.94894390140659046e+01 0.00000000000000000e+00 -1.05596771036352129e+02 0.00000000000000000e+00 -1.12079947323121044e+01 0.00000000000000000e+00 5.17904281936947763e+01 0.00000000000000000e+00 2.21264778323491173e+00 0.00000000000000000e+00 -1.30733059437668502e+01 0.00000000000000000e+00 4.87138178156023764e+00 0.00000000000000000e+00 -8.84566680149036793e-01 0.00000000000000000e+00 9.30838857000500700e-02 \n-1.58080882834937158e+00 0.00000000000000000e+00 -2.57349704648414364e+01 0.00000000000000000e+00 -1.34400955387229756e+02 0.00000000000000000e+00 1.48715961820750740e+01 0.00000000000000000e+00 6.82299290025286154e+01 0.00000000000000000e+00 -3.18448349859912698e+01 0.00000000000000000e+00 4.51841149229633226e+00 0.00000000000000000e+00 3.55878547193698435e-01 0.00000000000000000e+00 -2.19234767689191147e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.60286154117593863e+01 0.00000000000000000e+00 -1.40058452281260211e+01 0.00000000000000000e+00 -1.67534987482202743e+02 0.00000000000000000e+00 3.58101096772257102e+01 0.00000000000000000e+00 7.11534753418055489e+01 0.00000000000000000e+00 -4.56137986174105576e+01 0.00000000000000000e+00 1.25903517159737867e+01 0.00000000000000000e+00 -1.99024229979725440e+00 0.00000000000000000e+00 1.93362983279251604e-01 \n2.37017794244235427e+01 0.00000000000000000e+00 4.57618524784297830e+01 0.00000000000000000e+00 1.12946863019383300e+01 0.00000000000000000e+00 -1.95600726189753266e+02 0.00000000000000000e+00 5.47872047176137476e+01 0.00000000000000000e+00 5.39635155045963630e+01 0.00000000000000000e+00 -3.87901013049341077e+01 0.00000000000000000e+00 1.15932213216015917e+01 0.00000000000000000e+00 -2.05569723805155173e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 2.87356889712033838e+01 0.00000000000000000e+00 4.75867545499520592e+01 0.00000000000000000e+00 3.06060951527957657e+01 0.00000000000000000e+00 -1.82057742266988029e+02 0.00000000000000000e+00 1.38545150418434294e+02 0.00000000000000000e+00 -4.94045807500832370e+01 0.00000000000000000e+00 1.03047035479201259e+01 0.00000000000000000e+00 -1.36760748656952537e+00 0.00000000000000000e+00 1.17949564099007900e-01 \n1.36663853287533720e+01 0.00000000000000000e+00 3.74267015048228825e+01 0.00000000000000000e+00 6.41984280370865215e+01 0.00000000000000000e+00 4.95427814401887965e+01 0.00000000000000000e+00 -2.20501484706567393e+02 0.00000000000000000e+00 1.68344234287376971e+02 0.00000000000000000e+00 -6.32832710844958397e+01 0.00000000000000000e+00 1.44631608420551676e+01 0.00000000000000000e+00 -2.20514584481852555e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.27905291284497322e+01 0.00000000000000000e+00 3.97897373752886918e+00 0.00000000000000000e+00 6.70576429149910821e+01 0.00000000000000000e+00 1.29074580875720825e+02 0.00000000000000000e+00 -1.79835414485848528e+02 0.00000000000000000e+00 8.46475411717220099e+01 0.00000000000000000e+00 -2.11402296900823990e+01 0.00000000000000000e+00 3.19251373940025964e+00 0.00000000000000000e+00 -3.02811491852601099e-01 \n-1.98772708235295357e+01 0.00000000000000000e+00 -4.02725220610559773e+01 0.00000000000000000e+00 -2.73665408030944381e+01 0.00000000000000000e+00 5.21819830575302486e+01 0.00000000000000000e+00 1.59757745267220235e+02 0.00000000000000000e+00 -1.84482850366959179e+02 0.00000000000000000e+00 8.36137436615671709e+01 0.00000000000000000e+00 -2.14348070770187657e+01 0.00000000000000000e+00 3.53021922346597365e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 5.35317698427906928e-01 0.00000000000000000e+00 -1.16809002135588654e+01 0.00000000000000000e+00 -3.93257962725221554e+01 0.00000000000000000e+00 -4.25178535172829919e+01 0.00000000000000000e+00 7.85661574305621248e+01 0.00000000000000000e+00 -4.00413757278834703e+01 0.00000000000000000e+00 1.04332631719738535e+01 0.00000000000000000e+00 -1.61853967773922288e+00 0.00000000000000000e+00 1.56333704141143187e-01 \n8.28827657580535118e+00 0.00000000000000000e+00 1.48813512413062233e+01 0.00000000000000000e+00 3.22363366511238381e+00 0.00000000000000000e+00 -3.47778534694334068e+01 0.00000000000000000e+00 -5.68500909900795473e+01 0.00000000000000000e+00 7.92151891058067887e+01 0.00000000000000000e+00 -3.81982482958891401e+01 0.00000000000000000e+00 1.01275854369651637e+01 0.00000000000000000e+00 -1.70354253518316411e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 5.78172199525967175e-01 0.00000000000000000e+00 3.84911600934340394e+00 0.00000000000000000e+00 9.82032519915630130e+00 0.00000000000000000e+00 8.03362248294792816e+00 0.00000000000000000e+00 -1.78308504360307624e+01 0.00000000000000000e+00 9.47947891018805671e+00 0.00000000000000000e+00 -2.52463030174165093e+00 0.00000000000000000e+00 3.97087755054360100e-01 0.00000000000000000e+00 -3.87129225431398866e-02 \n-1.88371384592119458e+00 0.00000000000000000e+00 -3.10331579334419163e+00 0.00000000000000000e+00 4.25425724943341969e-01 0.00000000000000000e+00 9.69932672273900619e+00 0.00000000000000000e+00 1.22212451973519065e+01 0.00000000000000000e+00 -1.90819194546576970e+01 0.00000000000000000e+00 9.51214443092644870e+00 0.00000000000000000e+00 -2.56690807390245626e+00 0.00000000000000000e+00 4.36556770128069551e-01 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.36816669624238164e-01 0.00000000000000000e+00 -6.03636032519729941e-01 0.00000000000000000e+00 -1.35370048596669495e+00 0.00000000000000000e+00 -9.31792185482937552e-01 0.00000000000000000e+00 2.35425987407870194e+00 0.00000000000000000e+00 -1.28500278981492385e+00 0.00000000000000000e+00 3.46898903231405310e-01 0.00000000000000000e+00 -5.50314529983429819e-02 0.00000000000000000e+00 5.39638767378195566e-03 \n2.73369865154134822e-01 0.00000000000000000e+00 4.21764369047321695e-01 0.00000000000000000e+00 -1.79178246517035154e-01 0.00000000000000000e+00 -1.59096573666527478e+00 0.00000000000000000e+00 -1.73880925087437796e+00 0.00000000000000000e+00 2.92226858003762915e+00 0.00000000000000000e+00 -1.48623334900988168e+00 0.00000000000000000e+00 4.05348558170406760e-01 0.00000000000000000e+00 -6.93970524018293857e-02 0.00000000000000000e+00 \n0.00000000000000000e+00 1.34555400664715942e-02 0.00000000000000000e+00 5.04861860057075238e-02 0.00000000000000000e+00 1.05291683063192330e-01 0.00000000000000000e+00 6.46706521247778298e-02 0.00000000000000000e+00 -1.79136432823024778e-01 0.00000000000000000e+00 9.94680675511353757e-02 0.00000000000000000e+00 -2.70903285334376904e-02 0.00000000000000000e+00 4.32170990967068022e-03 0.00000000000000000e+00 -4.25409030040791349e-04 \n8.37242294893226670e+00 -1.28489178196292260e+01 1.26447305743530684e+01 -8.90839332881958672e+00 2.88343556103002766e+00 3.59918252786345223e+00 -8.37365961472559108e+00 9.60628254104707012e+00 -6.72863306162290918e+00 1.17863364881717849e+00 3.83319667490574680e+00 -5.11445299628644289e+00 2.15473925141535256e+00 1.83049055128036840e+00 -2.79010258294333592e+00 5.39588033996544174e-01 1.24028790817586851e+00 -7.51570614374682917e-01 \n1.14914793810508955e+01 -1.70604827988596166e+01 1.52991363134018205e+01 -7.97205983897296303e+00 -2.56173057881778213e+00 1.27386489535834530e+01 -1.84276212879312315e+01 1.64724722825371870e+01 -6.83686924168451021e+00 -5.84651847263026186e+00 1.34468423824621655e+01 -9.70126342404492629e+00 -2.71696639637566970e+00 1.14250208088531036e+01 -6.12761578251986635e+00 -6.99858486942576295e+00 1.15235545225011518e+01 -4.97683734689374787e+00 \n1.21399791782249832e+01 -1.78707646986547250e+01 1.56466766767242102e+01 -7.43208431802197305e+00 -4.11150275992763275e+00 1.51015775158585848e+01 -2.12235704256957609e+01 1.93559509021941183e+01 -9.60138041149665626e+00 -3.46931192132416563e+00 1.21642996417244559e+01 -1.05575652262334154e+01 4.58169322137064335e-01 8.05593619571008364e+00 -6.05773510950554942e+00 -2.90197774336660155e+00 6.87894980567901218e+00 -3.15678708439316136e+00 \n6.62990969514587772e+00 -8.22196137613934084e+00 3.08962724923271005e+00 7.11499667701056608e+00 -1.91801123656576211e+01 2.83593411791749291e+01 -2.96384878665918399e+01 2.01027692815270681e+01 -1.79664873486984848e+00 -1.68338394710327560e+01 2.38507528698974328e+01 -1.24613140929149538e+01 -9.44526870064964246e+00 2.09651161948410007e+01 -8.33468344900514789e+00 -1.46694787963013337e+01 2.08542377245679188e+01 -8.62317700383707698e+00 \n7.90404414174685789e-01 1.26171151631081692e+00 -7.51007814722205953e+00 1.67545864545682369e+01 -2.59325017654326678e+01 3.07820023168772143e+01 -2.73700066045145662e+01 1.44057197293116455e+01 4.48325608632426199e+00 -2.04005299190520758e+01 2.30273571296640325e+01 -8.78231568850560677e+00 -1.21786245460829268e+01 2.03470184398842670e+01 -6.01502563428615666e+00 -1.54311619770762012e+01 1.98103287496703971e+01 -7.88612576951304608e+00 \n-5.68177980997432662e+00 1.16679549107094561e+01 -1.89134971425438500e+01 2.68142533141548401e+01 -3.26214551630043349e+01 3.26993454035364833e+01 -2.42155353085476130e+01 7.37043269866607917e+00 1.27499042373099513e+01 -2.65665194368542930e+01 2.45935835462132318e+01 -5.68169997307200230e+00 -1.71478845549312294e+01 2.32194300279890377e+01 -4.75090584338018065e+00 -1.92349533211470859e+01 2.28676061056967183e+01 -8.85428445832610095e+00 \n-1.18508897122117714e+01 2.12611924959252661e+01 -2.85730452115215666e+01 3.37309552170291406e+01 -3.44540176044563713e+01 2.80897912186542855e+01 -1.34608467807709522e+01 -7.08134634618579627e+00 2.64784073420305847e+01 -3.45285358659758224e+01 2.36358423942863476e+01 2.90814973885821221e+00 -2.72720633049522343e+01 2.74861776420857058e+01 -2.81301163440310677e-01 -2.81855165034427195e+01 2.94809963590929060e+01 -1.08599604749386300e+01 \n-7.98670249036312866e+00 1.32989045108899490e+01 -1.54522318098073567e+01 1.44857582102792485e+01 -9.81846089437767801e+00 1.67597042652682874e+00 7.96805831810894943e+00 -1.52766944420951517e+01 1.60191222722840539e+01 -8.63303973642542830e+00 -2.98038768561771872e+00 1.04832705785776884e+01 -7.81247645198548155e+00 -1.44008865851958602e+00 6.46501529075078405e+00 -2.68794162190095591e+00 -2.19537795755975410e+00 1.75275677805628116e+00 \n-6.83319266437668600e+00 1.09121666859968871e+01 -1.15617306388270339e+01 8.96311609846351460e+00 -3.06635415678834904e+00 -5.32546153733766972e+00 1.39878473754735162e+01 -1.94282852722872129e+01 1.82238703579625206e+01 -9.41775010791146845e+00 -3.40570263009958017e+00 1.28086112240120534e+01 -1.23623003971393413e+01 2.84763120940329405e+00 7.16140200157780149e+00 -9.59977592688839621e+00 5.38294754843613429e+00 -1.21306121644135542e+00 \n4.44320558388858491e+00 -8.99645107531267079e+00 1.46403504968312634e+01 -2.15708436423445155e+01 2.82045071550513558e+01 -3.13631515261402777e+01 2.70441016007081031e+01 -1.26505910984959221e+01 -9.50112475084879185e+00 2.96300049113735936e+01 -3.32830742817006971e+01 1.25343140972693189e+01 2.02748244905305860e+01 -3.43530709925167918e+01 1.05025939622191725e+01 2.76037639261965746e+01 -3.63388881049540215e+01 1.47503948764709674e+01 \n9.93863541176476786e+00 -1.76397275395392610e+01 2.34322167093159680e+01 -2.76017587995099013e+01 2.85068427439357182e+01 -2.37036290402782181e+01 1.13121207840975035e+01 7.78197051922166411e+00 -2.77042212188542177e+01 3.76777872384300379e+01 -2.73594986636045082e+01 -2.62674625860662856e+00 3.29638341236915390e+01 -3.51472712432230764e+01 1.22518920637475772e+00 3.69200888361569590e+01 -3.98736670223733855e+01 1.49857515831212947e+01 \n-6.02022393326844400e-01 1.81780789585866479e+00 -4.27261735295746918e+00 8.13395137724095855e+00 -1.28370091918261027e+01 1.67846527309151227e+01 -1.73433568468575576e+01 1.18063627648763849e+01 2.80799635418159434e-01 -1.43653533730352112e+01 2.08535071787308893e+01 -1.15298476383570127e+01 -9.32693105120863193e+00 2.18708284582793507e+01 -9.29041706622033224e+00 -1.62865085487557345e+01 2.40841772234275125e+01 -1.02148413554848837e+01 \n-4.14413828790267559e+00 7.59906418535271851e+00 -1.07033241744578699e+01 1.36324305489981772e+01 -1.55483944512480333e+01 1.49307852359567264e+01 -1.01150593616012474e+01 5.22626503168572253e-01 1.16098986103065078e+01 -2.03069875248009693e+01 1.80680610737756546e+01 -2.45137523638854695e+00 -1.69989118220677350e+01 2.18267641070218366e+01 -3.34011308603949807e+00 -2.09753015702973721e+01 2.46238570925945709e+01 -9.60565403387451607e+00 \n-5.51202408017050535e-02 -9.81439845750151509e-02 6.20642038502525179e-01 -1.56221336844813855e+00 2.82768454005141717e+00 -4.05954575803952079e+00 4.57743870786630339e+00 -3.55738511772941018e+00 6.27203607732330441e-01 3.26635760226123185e+00 -5.55917088256891596e+00 3.60490455801104465e+00 2.02219275203914776e+00 -5.96829113698655821e+00 2.93815400637688341e+00 4.28051441064643243e+00 -6.78971185740003622e+00 2.95332664124734191e+00 \n9.41856922960597292e-01 -1.76296822000964956e+00 2.57121437974063982e+00 -3.41865005130728532e+00 4.09845654257256348e+00 -4.19551677328002622e+00 3.19346542247697578e+00 -7.89149509746087815e-01 -2.58750533032317266e+00 5.37329234513076948e+00 -5.30797300979736221e+00 1.27187355961902960e+00 4.40786044881741873e+00 -6.32789946851511829e+00 1.36186837770410119e+00 5.82566503523164311e+00 -7.19070005464247163e+00 2.86707690578246438e+00 \n2.41564510697207680e-02 -1.52720663544967698e-02 -4.90907907413469709e-02 1.76458920476685812e-01 -3.57758430102644559e-01 5.47958765036741924e-01 -6.52620917338336257e-01 5.46112238740575658e-01 -1.52710058027698822e-01 -4.18638749986184600e-01 8.02326739989640416e-01 -5.73572027182816591e-01 -2.45871818292631594e-01 8.80435057313081927e-01 -4.76114418162545733e-01 -6.16348164360340169e-01 1.02980966958881522e+00 -4.56232028871394678e-01 \n-1.36684932577067411e-01 2.59543180793522119e-01 -3.87474213739895124e-01 5.29478237388750784e-01 -6.54229384805705203e-01 6.94729507112508389e-01 -5.61675764312064749e-01 1.91714434556905493e-01 3.64265685284321908e-01 -8.60770295293903634e-01 9.08453004697207761e-01 -2.74117781372636856e-01 -6.96967797064146320e-01 1.08147388514625617e+00 -2.76493928009077583e-01 -9.70431926024224653e-01 1.24060147208662531e+00 -5.02243080044940244e-01 \n-2.69757548765387862e-03 2.61690557050201978e-03 1.99503872812577161e-03 -1.17538827791251453e-02 2.61619713785908730e-02 -4.19576646303620961e-02 5.18162748646193836e-02 -4.54000867575661406e-02 1.55189776967001816e-02 3.06752881036411437e-02 -6.43250297115759333e-02 4.90708915985721993e-02 1.70374729374840413e-02 -7.18762201540119482e-02 4.14616787101810082e-02 4.94843046413870859e-02 -8.60107236489901411e-02 3.86343295845351688e-02 \n"
  },
  {
    "path": "src/madness/mra/b-spline-deriv3.txt",
    "content": "1\n-9.45138511678435633e-02 \n0.00000000000000000e+00 \n9.45138511678435633e-02 \n2\n-7.19298245614035088e+00 -5.67221317098579698e+00 \n-4.33012701892219323e+00 -7.50000000000000000e+00 \n0.00000000000000000e+00 -3.84900179459750510e+01 \n8.66025403784438647e+00 0.00000000000000000e+00 \n7.19298245614035088e+00 -5.67221317098579698e+00 \n-4.33012701892219323e+00 7.50000000000000000e+00 \n3\n-8.82352941176470588e+00 -8.15082732973589315e+00 -1.57840092529396920e+00 \n-9.20185144300350174e+00 -1.98331317827022443e+01 -1.92028150455873213e+01 \n2.07165121444833457e+01 3.26925358929861366e+01 2.47058823529411765e+01 \n0.00000000000000000e+00 -4.48295503135474123e+01 0.00000000000000000e+00 \n1.84037028860070035e+01 0.00000000000000000e+00 -2.19363421540722571e+01 \n0.00000000000000000e+00 7.81431345734790583e+01 0.00000000000000000e+00 \n8.82352941176470588e+00 -8.15082732973589315e+00 1.57840092529396920e+00 \n-9.20185144300350174e+00 1.98331317827022443e+01 -1.92028150455873213e+01 \n-2.07165121444833457e+01 3.26925358929861366e+01 -2.47058823529411765e+01 \n4\n-5.11420119384098997e-01 7.07984674284728584e+00 1.76197130498686281e+01 1.44527756807473145e+01 \n-1.04911800542579568e+01 -2.82558838257386079e+01 -4.33746983164390980e+01 -3.07585601478157634e+01 \n3.40459733133822285e+01 6.16473022836824246e+01 6.98081182212472861e+01 4.17668131204996087e+01 \n1.54790779673167423e+00 5.20031940250701389e+00 1.13561267747883089e+01 1.06705898007850937e+01 \n0.00000000000000000e+00 -1.77029160088393729e+01 0.00000000000000000e+00 -2.87153341612424460e+00 \n2.09823601085159136e+01 0.00000000000000000e+00 -6.94809721388216912e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.12582817720283686e+02 0.00000000000000000e+00 -1.18244765381729660e+02 \n-3.09581559346334845e+00 0.00000000000000000e+00 1.63160235371718559e+01 0.00000000000000000e+00 \n5.11420119384098997e-01 7.07984674284728584e+00 -1.76197130498686281e+01 1.44527756807473145e+01 \n-1.04911800542579568e+01 2.82558838257386079e+01 -4.33746983164390980e+01 3.07585601478157634e+01 \n-3.40459733133822285e+01 6.16473022836824246e+01 -6.98081182212472861e+01 4.17668131204996087e+01 \n1.54790779673167423e+00 -5.20031940250701389e+00 1.13561267747883089e+01 -1.06705898007850937e+01 \n5\n3.75155966202125040e+00 1.84173383875992652e+01 4.10011982276819018e+01 4.95455604422443194e+01 2.81596361677691103e+01 \n-3.55404023582231868e+00 -1.99707608071786351e+01 -4.44054178884804361e+01 -5.15114609810190757e+01 -2.77825036472469054e+01 \n3.77895561012967062e+01 7.58804486430889359e+01 1.05788927989321925e+02 1.01194208903698230e+02 5.05494992545486456e+01 \n-2.98124530611858606e+00 1.90591165005220427e+00 2.03619966036367141e+01 4.06920394378472721e+01 3.14063348721747505e+01 \n-1.21160321901111311e+01 -2.73461570239406924e+01 -4.66751893571692858e+01 -5.63619426522109015e+01 -3.45944472151616446e+01 \n0.00000000000000000e+00 -1.08431090062116059e+01 0.00000000000000000e+00 -6.25819377514251430e+01 0.00000000000000000e+00 \n7.10808047164463735e+00 0.00000000000000000e+00 -1.25209953547400650e+02 0.00000000000000000e+00 3.44992611168198606e+01 \n0.00000000000000000e+00 1.10052827365503545e+02 0.00000000000000000e+00 -2.54325684296641394e+02 0.00000000000000000e+00 \n5.96249061223717211e+00 0.00000000000000000e+00 6.87974690577060511e+01 0.00000000000000000e+00 -2.16642661635918064e+01 \n0.00000000000000000e+00 -2.92500193097686061e+01 0.00000000000000000e+00 1.04039645075328823e+02 0.00000000000000000e+00 \n-3.75155966202125040e+00 1.84173383875992652e+01 -4.10011982276819018e+01 4.95455604422443194e+01 -2.81596361677691103e+01 \n-3.55404023582231868e+00 1.99707608071786351e+01 -4.44054178884804361e+01 5.15114609810190757e+01 -2.77825036472469054e+01 \n-3.77895561012967062e+01 7.58804486430889359e+01 -1.05788927989321925e+02 1.01194208903698230e+02 -5.05494992545486456e+01 \n-2.98124530611858606e+00 -1.90591165005220427e+00 2.03619966036367141e+01 -4.06920394378472721e+01 3.14063348721747505e+01 \n1.21160321901111311e+01 -2.73461570239406924e+01 4.66751893571692858e+01 -5.63619426522109015e+01 3.45944472151616446e+01 \n6\n-1.92603157197245889e+00 1.16305546770758343e+01 4.11208354486840103e+01 6.56381248382594128e+01 6.14652947216917020e+01 2.82024972337950325e+01 \n1.77935703831703418e+00 -1.03714371647653467e+01 -3.21796436079084355e+01 -4.05198782829872893e+01 -2.46738618249909762e+01 -4.74092008104631822e+00 \n2.53314486541592191e+01 5.74728390110512079e+01 9.22328173660701405e+01 1.05797182437998842e+02 7.96502110898505465e+01 3.05288875939271004e+01 \n-2.11855958622816273e+01 -2.59518924860693372e+01 -5.87670898716104462e-01 5.25277107319596646e+01 9.14241860369812277e+01 6.01659324180003694e+01 \n-3.13932811559397194e+00 -1.92845316895789037e+01 -5.72721795851956836e+01 -1.04459888443238093e+02 -1.18259689992841243e+02 -6.46527031325917252e+01 \n3.04864151609243039e+00 4.19041818602100263e+00 1.61695329151569969e+00 -5.80886299521795663e+00 -1.33724420610698575e+01 -1.00525747810656224e+01 \n0.00000000000000000e+00 -3.66050475127038751e+01 0.00000000000000000e+00 -1.30862687435428488e+02 0.00000000000000000e+00 5.76056043625664423e+01 \n-3.55871407663406837e+00 0.00000000000000000e+00 -1.44059485972709594e+02 0.00000000000000000e+00 5.57984924064805989e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 6.05557463712016856e+01 0.00000000000000000e+00 -3.47528850220239801e+02 0.00000000000000000e+00 1.25793040873258683e+02 \n4.23711917245632547e+01 0.00000000000000000e+00 1.67599542095784345e+02 0.00000000000000000e+00 -8.99403682839444523e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.68191601878049240e+01 0.00000000000000000e+00 2.55610380941202519e+02 0.00000000000000000e+00 -1.07008156757819563e+02 \n-6.09728303218486078e+00 0.00000000000000000e+00 -2.01198632187435733e+01 0.00000000000000000e+00 1.16819381202460979e+01 0.00000000000000000e+00 \n1.92603157197245889e+00 1.16305546770758343e+01 -4.11208354486840103e+01 6.56381248382594128e+01 -6.14652947216917020e+01 2.82024972337950325e+01 \n1.77935703831703418e+00 1.03714371647653467e+01 -3.21796436079084355e+01 4.05198782829872893e+01 -2.46738618249909762e+01 4.74092008104631822e+00 \n-2.53314486541592191e+01 5.74728390110512079e+01 -9.22328173660701405e+01 1.05797182437998842e+02 -7.96502110898505465e+01 3.05288875939271004e+01 \n-2.11855958622816273e+01 2.59518924860693372e+01 -5.87670898716104462e-01 -5.25277107319596646e+01 9.14241860369812277e+01 -6.01659324180003694e+01 \n3.13932811559397194e+00 -1.92845316895789037e+01 5.72721795851956836e+01 -1.04459888443238093e+02 1.18259689992841243e+02 -6.46527031325917252e+01 \n3.04864151609243039e+00 -4.19041818602100263e+00 1.61695329151569969e+00 5.80886299521795663e+00 -1.33724420610698575e+01 1.00525747810656224e+01 \n7\n-9.85512575297261172e+00 -1.80289314530808999e+00 2.56093771195681490e+01 5.32037521285047188e+01 5.93364191888584175e+01 3.93717428550364418e+01 1.25105931466562398e+01 \n-5.36827147028658605e+00 -2.22501953677644895e+01 -4.41001198256728344e+01 -4.30176311242867868e+01 -4.45986765332808790e+00 3.78296230501970458e+01 3.16960646130358492e+01 \n1.97090684967170152e+01 4.61039427063284876e+01 7.36116576248014566e+01 7.83256020322905487e+01 4.57278286869656079e+01 8.58783928629207998e-01 -1.24211462183246651e+01 \n-4.95346446907713248e+01 -7.69435331024156631e+01 -6.43712367005499417e+01 9.15250090791188925e-01 9.78957596607447716e+01 1.46240563347547460e+02 8.40304476158204985e+01 \n2.94646982247523693e+01 3.15429136120794728e+01 -1.16421373729871771e+01 -9.73592401693170250e+01 -1.84704573236503491e+02 -1.94864178006101773e+02 -9.62671804922741202e+01 \n1.29697372268740729e+01 2.16039374586528963e+01 2.21179832709210771e+01 7.79699991014292123e+00 -2.28202002450485172e+01 -4.63245506771607224e+01 -3.06090340466971352e+01 \n-9.97027974938417799e+00 -1.28562128384328363e+01 -3.62094140797139603e+00 1.98249800440581966e+01 4.98340744689863127e+01 6.08130608332550110e+01 3.30976472739281702e+01 \n0.00000000000000000e+00 -6.46725277859000282e+01 0.00000000000000000e+00 -1.64916310615910444e+02 0.00000000000000000e+00 1.02228290624850147e+02 0.00000000000000000e+00 \n1.07365429405731721e+01 0.00000000000000000e+00 -1.12452465634704863e+02 0.00000000000000000e+00 2.70213771910674691e+01 0.00000000000000000e+00 -1.10058131401052604e+00 \n0.00000000000000000e+00 4.43405466120191230e+01 0.00000000000000000e+00 -3.45784664057338754e+02 0.00000000000000000e+00 1.53535241938161214e+02 0.00000000000000000e+00 \n9.90692893815426496e+01 0.00000000000000000e+00 2.65892377423404812e+02 0.00000000000000000e+00 -2.42066092882243568e+02 0.00000000000000000e+00 4.73037463239725234e+01 \n0.00000000000000000e+00 1.41051590195663480e+02 0.00000000000000000e+00 4.58335054988388321e+02 0.00000000000000000e+00 -3.01627897670067986e+02 0.00000000000000000e+00 \n-2.59394744537481459e+01 0.00000000000000000e+00 -5.75637756575656169e+01 0.00000000000000000e+00 6.14972428018885599e+01 0.00000000000000000e+00 -1.26315650557382526e+01 \n0.00000000000000000e+00 -4.33636986895682834e+01 0.00000000000000000e+00 -1.07716455093449560e+02 0.00000000000000000e+00 7.70874271955190800e+01 0.00000000000000000e+00 \n9.85512575297261172e+00 -1.80289314530808999e+00 -2.56093771195681490e+01 5.32037521285047188e+01 -5.93364191888584175e+01 3.93717428550364418e+01 -1.25105931466562398e+01 \n-5.36827147028658605e+00 2.22501953677644895e+01 -4.41001198256728344e+01 4.30176311242867868e+01 -4.45986765332808790e+00 -3.78296230501970458e+01 3.16960646130358492e+01 \n-1.97090684967170152e+01 4.61039427063284876e+01 -7.36116576248014566e+01 7.83256020322905487e+01 -4.57278286869656079e+01 8.58783928629207998e-01 1.24211462183246651e+01 \n-4.95346446907713248e+01 7.69435331024156631e+01 -6.43712367005499417e+01 -9.15250090791188925e-01 9.78957596607447716e+01 -1.46240563347547460e+02 8.40304476158204985e+01 \n-2.94646982247523693e+01 3.15429136120794728e+01 1.16421373729871771e+01 -9.73592401693170250e+01 1.84704573236503491e+02 -1.94864178006101773e+02 9.62671804922741202e+01 \n1.29697372268740729e+01 -2.16039374586528963e+01 2.21179832709210771e+01 -7.79699991014292123e+00 -2.28202002450485172e+01 4.63245506771607224e+01 -3.06090340466971352e+01 \n9.97027974938417799e+00 -1.28562128384328363e+01 3.62094140797139603e+00 1.98249800440581966e+01 -4.98340744689863127e+01 6.08130608332550110e+01 -3.30976472739281702e+01 \n8\n-8.42695647064252834e+00 -1.86902728907226364e-01 2.50349762244666224e+01 4.68320952632834217e+01 4.30253590686540918e+01 1.23888414839592186e+01 -1.60522273469777415e+01 -1.43757556896524789e+01 \n-1.84861446276726255e+01 -4.86188073002224823e+01 -8.47630293312577173e+01 -9.25681300949368861e+01 -3.93924206492286928e+01 5.56997078511580349e+01 1.08909178108113561e+02 6.34179558279101973e+01 \n3.67786600616208614e+01 7.45624199036252173e+01 1.04625460846849447e+02 9.70602030102672406e+01 2.85885310105041246e+01 -7.08157314961406951e+01 -1.16618579237897924e+02 -6.40357441785844231e+01 \n-6.89094671950474169e+01 -1.17718428712117907e+02 -1.31723881792732962e+02 -8.94754932196682857e+01 1.68398180248070052e+01 1.36467580144800096e+02 1.70974600457107582e+02 8.58038779003357009e+01 \n7.38512505309216526e+01 1.10258243759315077e+02 8.85227200208034522e+01 2.39062166549506013e-01 -1.37601484064813858e+02 -2.51439498421970955e+02 -2.43105864603171211e+02 -1.08704229590370753e+02 \n2.77495580135648066e+01 5.14308270757224948e+01 6.83755168056751697e+01 6.46613998918309908e+01 1.87001274963176908e+01 -6.18506323746431395e+01 -1.09550887787223316e+02 -6.47272451081912596e+01 \n-3.43114449497179569e+01 -5.51273220589710610e+01 -5.48586829994569578e+01 -2.45587345302008269e+01 4.06942288538766715e+01 1.14175669685556126e+02 1.32528764333242049e+02 6.64647866544428115e+01 \n-2.64440915882024700e+00 -5.04904343543706303e+00 -7.11034995317750606e+00 -7.44565590166255146e+00 -3.22225011697036592e+00 5.98381843699777235e+00 1.27367995415771860e+01 8.11585620307280042e+00 \n0.00000000000000000e+00 -5.80098615834822161e+01 0.00000000000000000e+00 -1.47616218036221292e+02 0.00000000000000000e+00 1.00860113902410818e+02 0.00000000000000000e+00 -2.18565957590075249e+01 \n3.69722892553452510e+01 0.00000000000000000e+00 -8.76379529299792299e+01 0.00000000000000000e+00 -9.10975514408286859e+01 0.00000000000000000e+00 3.99335415144034933e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.05685191636876075e+02 0.00000000000000000e+00 -2.70472499917097659e+02 0.00000000000000000e+00 5.14767891217734799e+01 0.00000000000000000e+00 3.37550973039676488e+00 \n1.37818934390094834e+02 0.00000000000000000e+00 2.88796743107528640e+02 0.00000000000000000e+00 -4.58803119798890256e+02 0.00000000000000000e+00 1.29720149509423836e+02 0.00000000000000000e+00 \n0.00000000000000000e+00 2.91139984969587152e+02 0.00000000000000000e+00 5.86266700609680957e+02 0.00000000000000000e+00 -6.11932612357599365e+02 0.00000000000000000e+00 1.64757313318453039e+02 \n-5.54991160271296132e+01 0.00000000000000000e+00 -8.45868633944227052e+01 0.00000000000000000e+00 1.99415946489784690e+02 0.00000000000000000e+00 -6.14771209588591303e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.27462019618114133e+02 0.00000000000000000e+00 -1.90873608963375270e+02 0.00000000000000000e+00 2.40183757045082734e+02 0.00000000000000000e+00 -6.82393093352986951e+01 \n5.28881831764049400e+00 0.00000000000000000e+00 6.95819902079381769e+00 0.00000000000000000e+00 -2.00301597413207275e+01 0.00000000000000000e+00 6.39473511158630065e+00 0.00000000000000000e+00 \n8.42695647064252834e+00 -1.86902728907226364e-01 -2.50349762244666224e+01 4.68320952632834217e+01 -4.30253590686540918e+01 1.23888414839592186e+01 1.60522273469777415e+01 -1.43757556896524789e+01 \n-1.84861446276726255e+01 4.86188073002224823e+01 -8.47630293312577173e+01 9.25681300949368861e+01 -3.93924206492286928e+01 -5.56997078511580349e+01 1.08909178108113561e+02 -6.34179558279101973e+01 \n-3.67786600616208614e+01 7.45624199036252173e+01 -1.04625460846849447e+02 9.70602030102672406e+01 -2.85885310105041246e+01 -7.08157314961406951e+01 1.16618579237897924e+02 -6.40357441785844231e+01 \n-6.89094671950474169e+01 1.17718428712117907e+02 -1.31723881792732962e+02 8.94754932196682857e+01 1.68398180248070052e+01 -1.36467580144800096e+02 1.70974600457107582e+02 -8.58038779003357009e+01 \n-7.38512505309216526e+01 1.10258243759315077e+02 -8.85227200208034522e+01 2.39062166549506013e-01 1.37601484064813858e+02 -2.51439498421970955e+02 2.43105864603171211e+02 -1.08704229590370753e+02 \n2.77495580135648066e+01 -5.14308270757224948e+01 6.83755168056751697e+01 -6.46613998918309908e+01 1.87001274963176908e+01 6.18506323746431395e+01 -1.09550887787223316e+02 6.47272451081912596e+01 \n3.43114449497179569e+01 -5.51273220589710610e+01 5.48586829994569578e+01 -2.45587345302008269e+01 -4.06942288538766715e+01 1.14175669685556126e+02 -1.32528764333242049e+02 6.64647866544428115e+01 \n-2.64440915882024700e+00 5.04904343543706303e+00 -7.11034995317750606e+00 7.44565590166255146e+00 -3.22225011697036592e+00 -5.98381843699777235e+00 1.27367995415771860e+01 -8.11585620307280042e+00 \n9\n1.25629142855885571e+00 1.78993774550395996e+01 5.04969564047134119e+01 7.63905342263941525e+01 6.61256129213276545e+01 1.02477592921949533e+01 -5.82671411447887998e+01 -8.02042948787831584e+01 -3.95333951206558476e+01 \n-1.96904934573455609e+01 -5.69317085746951165e+01 -1.11127999343549664e+02 -1.46999843170535854e+02 -1.18030783967218764e+02 -1.22622083134653028e+01 1.10362775794784036e+02 1.46758694006318248e+02 7.15746013762213736e+01 \n6.28045709355122012e+01 1.24358008156861731e+02 1.77786988448196481e+02 1.87861070939427113e+02 1.11366184693780765e+02 -4.68783731569605453e+01 -1.98074235200449192e+02 -2.18591499551075141e+02 -9.92620405615919218e+01 \n-6.63730552411953217e+01 -1.19698574355973194e+02 -1.50884687897684148e+02 -1.38945429057600926e+02 -6.50824690509126542e+01 4.93565489503238521e+01 1.35997248882041922e+02 1.30916403674448046e+02 5.39614597315510753e+01 \n1.00954808538719729e+02 1.64508325341346624e+02 1.74255203966003969e+02 1.17705421825847456e+02 -9.70241195853463749e+00 -1.66734638797878426e+02 -2.63506545785746818e+02 -2.24445663430807956e+02 -8.89768590702008256e+01 \n3.15651049017914665e+01 6.71837221589181495e+01 1.11283246211472676e+02 1.47663209813586384e+02 1.32596393813814455e+02 2.78398387597150160e+01 -1.28615227318794736e+02 -1.99565034309736077e+02 -1.06776383523676611e+02 \n-6.57117864377598057e+01 -1.15545271622776751e+02 -1.44467278762311724e+02 -1.37329357340816521e+02 -6.52995326957993997e+01 7.52289683547930016e+01 2.16292184445434846e+02 2.36539361354107996e+02 1.09908487511112232e+02 \n-4.23267170736861804e+00 -9.84094723312002487e+00 -1.81953939878053280e+01 -2.70784921550783650e+01 -2.80971787655454037e+01 -1.04984485452618203e+01 2.28476728750810972e+01 4.25250334858917917e+01 2.45457809159304551e+01 \n1.27614474434675149e+01 2.29657121330686732e+01 3.00856368000823554e+01 3.10221329146572390e+01 1.85306276310166749e+01 -1.12060564417805307e+01 -4.57322275773344574e+01 -5.50322559444012121e+01 -2.70368581095756166e+01 \n0.00000000000000000e+00 -2.70949125765703009e+01 0.00000000000000000e+00 -1.34571134610879235e+02 0.00000000000000000e+00 1.78301259158477781e+01 0.00000000000000000e+00 1.42401502997932164e+01 0.00000000000000000e+00 \n3.93809869146911217e+01 0.00000000000000000e+00 -1.31374855462939038e+02 0.00000000000000000e+00 -2.63824367895057987e+02 0.00000000000000000e+00 1.40964994809314595e+02 0.00000000000000000e+00 -2.34939582202517667e+01 \n0.00000000000000000e+00 1.86406814917759528e+02 0.00000000000000000e+00 -2.54841683394645423e+02 0.00000000000000000e+00 -2.04854410575934598e+02 0.00000000000000000e+00 1.25149862981183762e+02 0.00000000000000000e+00 \n1.32746110482390643e+02 0.00000000000000000e+00 2.28382996337488115e+02 0.00000000000000000e+00 -6.37750271349633983e+02 0.00000000000000000e+00 2.44477180200666421e+02 0.00000000000000000e+00 -3.60276452744061980e+01 \n0.00000000000000000e+00 3.70418779947110332e+02 0.00000000000000000e+00 5.63240797120218586e+02 0.00000000000000000e+00 -9.46234074563545341e+02 0.00000000000000000e+00 3.41988333498652375e+02 0.00000000000000000e+00 \n-6.31302098035829330e+01 0.00000000000000000e+00 -2.87413875198910725e+01 0.00000000000000000e+00 4.54273365414378441e+02 0.00000000000000000e+00 -2.05812561791512157e+02 0.00000000000000000e+00 3.28713860591643011e+01 \n0.00000000000000000e+00 -2.24174067819708378e+02 0.00000000000000000e+00 -2.03871991311106314e+02 0.00000000000000000e+00 5.62943541757201398e+02 0.00000000000000000e+00 -2.25167622976858980e+02 0.00000000000000000e+00 \n8.46534341473723609e+00 0.00000000000000000e+00 -2.49001103411267274e+00 0.00000000000000000e+00 -7.73888317664033295e+01 0.00000000000000000e+00 3.71337161272865000e+01 0.00000000000000000e+00 -6.08687160800767700e+00 \n0.00000000000000000e+00 4.24824771346854288e+01 0.00000000000000000e+00 3.06686773461928778e+01 0.00000000000000000e+00 -1.08776466025934004e+02 0.00000000000000000e+00 4.51264067578764403e+01 0.00000000000000000e+00 \n-1.25629142855885571e+00 1.78993774550395996e+01 -5.04969564047134119e+01 7.63905342263941525e+01 -6.61256129213276545e+01 1.02477592921949533e+01 5.82671411447887998e+01 -8.02042948787831584e+01 3.95333951206558476e+01 \n-1.96904934573455609e+01 5.69317085746951165e+01 -1.11127999343549664e+02 1.46999843170535854e+02 -1.18030783967218764e+02 1.22622083134653028e+01 1.10362775794784036e+02 -1.46758694006318248e+02 7.15746013762213736e+01 \n-6.28045709355122012e+01 1.24358008156861731e+02 -1.77786988448196481e+02 1.87861070939427113e+02 -1.11366184693780765e+02 -4.68783731569605453e+01 1.98074235200449192e+02 -2.18591499551075141e+02 9.92620405615919218e+01 \n-6.63730552411953217e+01 1.19698574355973194e+02 -1.50884687897684148e+02 1.38945429057600926e+02 -6.50824690509126542e+01 -4.93565489503238521e+01 1.35997248882041922e+02 -1.30916403674448046e+02 5.39614597315510753e+01 \n-1.00954808538719729e+02 1.64508325341346624e+02 -1.74255203966003969e+02 1.17705421825847456e+02 9.70241195853463749e+00 -1.66734638797878426e+02 2.63506545785746818e+02 -2.24445663430807956e+02 8.89768590702008256e+01 \n3.15651049017914665e+01 -6.71837221589181495e+01 1.11283246211472676e+02 -1.47663209813586384e+02 1.32596393813814455e+02 -2.78398387597150160e+01 -1.28615227318794736e+02 1.99565034309736077e+02 -1.06776383523676611e+02 \n6.57117864377598057e+01 -1.15545271622776751e+02 1.44467278762311724e+02 -1.37329357340816521e+02 6.52995326957993997e+01 7.52289683547930016e+01 -2.16292184445434846e+02 2.36539361354107996e+02 -1.09908487511112232e+02 \n-4.23267170736861804e+00 9.84094723312002487e+00 -1.81953939878053280e+01 2.70784921550783650e+01 -2.80971787655454037e+01 1.04984485452618203e+01 2.28476728750810972e+01 -4.25250334858917917e+01 2.45457809159304551e+01 \n-1.27614474434675149e+01 2.29657121330686732e+01 -3.00856368000823554e+01 3.10221329146572390e+01 -1.85306276310166749e+01 -1.12060564417805307e+01 4.57322275773344574e+01 -5.50322559444012121e+01 2.70368581095756166e+01 \n10\n5.03950008165965917e+00 2.80538150998790770e+01 7.24615627514695781e+01 1.15544262987072511e+02 1.21623836886548297e+02 6.64925178654442339e+01 -3.43355731441817020e+01 -1.18099159104788267e+02 -1.19239337869871694e+02 -4.98789011440414381e+01 \n-6.13855795591453189e+00 -3.70943562899312006e+01 -9.64067269268287547e+01 -1.51708618577068041e+02 -1.56638380474727226e+02 -8.60330400594216174e+01 3.21502977909951770e+01 1.21133918414614211e+02 1.17468077132070272e+02 4.68813014841160041e+01 \n6.81269980581745674e+01 1.41641145764593266e+02 2.20262071506279222e+02 2.69254097629889446e+02 2.33277800727005324e+02 8.62008946426002666e+01 -1.22638261892372164e+02 -2.68739101248714553e+02 -2.44800498540057121e+02 -9.72310022953893537e+01 \n-5.75223506655187543e+01 -1.04939234688305978e+02 -1.34259938579305600e+02 -1.26254931934623063e+02 -6.57075831370124336e+01 2.46978297863843239e+01 8.44683044878103599e+01 6.99716590559644277e+01 1.53204856686102263e+01 -7.97780045956746216e+00 \n9.72024723472778523e+01 1.63302720308999069e+02 1.86710056033638165e+02 1.56715355927094283e+02 6.49524817542089793e+01 -6.29637002290021428e+01 -1.64130702092749224e+02 -1.78888725292097964e+02 -1.10988457315356303e+02 -3.20851342556807162e+01 \n4.99239871483319691e+00 3.10543979999515609e+01 9.31357718878905555e+01 1.80839394002579108e+02 2.45203827282864225e+02 2.06939280732905719e+02 2.28185647942405215e+01 -2.13950538542425290e+02 -2.91906946857153757e+02 -1.42453078840706067e+02 \n-7.69012165703224561e+01 -1.46993833719678017e+02 -2.14854235045879841e+02 -2.65323465914435648e+02 -2.49501770003548675e+02 -1.15723734659670045e+02 1.25169600616075029e+02 3.41185828182458219e+02 3.49028042104239987e+02 1.50792878279806365e+02 \n3.85488178060672564e+00 3.82545301400996260e-01 -1.56502853504736505e+01 -4.37760934673615178e+01 -7.24141350962153097e+01 -7.41874862089898118e+01 -2.26415721148616011e+01 6.33013663300469773e+01 1.03831788398162775e+02 5.48604480727578188e+01 \n1.83689038991366762e+01 3.68521624715932616e+01 5.81143838574930327e+01 7.86668876488189019e+01 8.33142020681742060e+01 5.06644961356152749e+01 -2.57208317083759625e+01 -1.07489663777269123e+02 -1.22545350636229135e+02 -5.62914123271420972e+01 \n-5.71411232109241454e-01 -4.24982648070741825e-01 9.47863610362612840e-01 3.61064591643437722e+00 6.67098171080280182e+00 7.51914297946808475e+00 3.00392673859952497e+00 -5.83452297865690643e+00 -1.07392760755323411e+01 -5.94871554900426368e+00 \n0.00000000000000000e+00 -2.11929494550300110e+01 0.00000000000000000e+00 -1.83355833694029901e+02 0.00000000000000000e+00 -1.15720500285352516e+02 0.00000000000000000e+00 1.14200830665067806e+02 0.00000000000000000e+00 -2.92398771496838808e+01 \n1.22771159118290638e+01 0.00000000000000000e+00 -2.17135048264129417e+02 0.00000000000000000e+00 -3.86329463502392071e+02 0.00000000000000000e+00 2.74102485633715334e+02 0.00000000000000000e+00 -6.01789806613498363e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.88715396486431847e+02 0.00000000000000000e+00 -3.76909527124817398e+02 0.00000000000000000e+00 -4.99368126871419510e+02 0.00000000000000000e+00 3.57332060505569443e+02 0.00000000000000000e+00 -8.41211495652328859e+01 \n1.15044701331037509e+02 0.00000000000000000e+00 1.86294879676530742e+02 0.00000000000000000e+00 -6.70925118705409551e+02 0.00000000000000000e+00 3.05036771253215749e+02 0.00000000000000000e+00 -5.56947071424998197e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 3.46833042289178133e+02 0.00000000000000000e+00 4.53631119857332410e+02 0.00000000000000000e+00 -1.12861143866108860e+03 0.00000000000000000e+00 5.13248749555564778e+02 0.00000000000000000e+00 -1.02690604140231675e+02 \n-9.98479742966639382e+00 0.00000000000000000e+00 1.60861006579660741e+02 0.00000000000000000e+00 7.67540949385194125e+02 0.00000000000000000e+00 -5.09687972376080778e+02 0.00000000000000000e+00 1.12443409556119948e+02 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.38799589615268520e+02 0.00000000000000000e+00 -3.38306197899230212e+01 0.00000000000000000e+00 1.01198192817093993e+03 0.00000000000000000e+00 -5.67995306523889334e+02 0.00000000000000000e+00 1.25578116687015447e+02 \n-7.70976356121345127e+00 0.00000000000000000e+00 -6.62103954530137060e+01 0.00000000000000000e+00 -1.93591544750729377e+02 0.00000000000000000e+00 1.42154274938738695e+02 0.00000000000000000e+00 -3.26372126595724371e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 5.35591743874325925e+01 0.00000000000000000e+00 -2.12726612347027418e+01 0.00000000000000000e+00 -2.68184154675100906e+02 0.00000000000000000e+00 1.60646294986507479e+02 0.00000000000000000e+00 -3.65104463602389384e+01 \n1.14282246421848291e+00 0.00000000000000000e+00 6.85304220289242467e+00 0.00000000000000000e+00 1.68788794377721308e+01 0.00000000000000000e+00 -1.30430783528208802e+01 0.00000000000000000e+00 3.05417506172974447e+00 0.00000000000000000e+00 \n-5.03950008165965917e+00 2.80538150998790770e+01 -7.24615627514695781e+01 1.15544262987072511e+02 -1.21623836886548297e+02 6.64925178654442339e+01 3.43355731441817020e+01 -1.18099159104788267e+02 1.19239337869871694e+02 -4.98789011440414381e+01 \n-6.13855795591453189e+00 3.70943562899312006e+01 -9.64067269268287547e+01 1.51708618577068041e+02 -1.56638380474727226e+02 8.60330400594216174e+01 3.21502977909951770e+01 -1.21133918414614211e+02 1.17468077132070272e+02 -4.68813014841160041e+01 \n-6.81269980581745674e+01 1.41641145764593266e+02 -2.20262071506279222e+02 2.69254097629889446e+02 -2.33277800727005324e+02 8.62008946426002666e+01 1.22638261892372164e+02 -2.68739101248714553e+02 2.44800498540057121e+02 -9.72310022953893537e+01 \n-5.75223506655187543e+01 1.04939234688305978e+02 -1.34259938579305600e+02 1.26254931934623063e+02 -6.57075831370124336e+01 -2.46978297863843239e+01 8.44683044878103599e+01 -6.99716590559644277e+01 1.53204856686102263e+01 7.97780045956746216e+00 \n-9.72024723472778523e+01 1.63302720308999069e+02 -1.86710056033638165e+02 1.56715355927094283e+02 -6.49524817542089793e+01 -6.29637002290021428e+01 1.64130702092749224e+02 -1.78888725292097964e+02 1.10988457315356303e+02 -3.20851342556807162e+01 \n4.99239871483319691e+00 -3.10543979999515609e+01 9.31357718878905555e+01 -1.80839394002579108e+02 2.45203827282864225e+02 -2.06939280732905719e+02 2.28185647942405215e+01 2.13950538542425290e+02 -2.91906946857153757e+02 1.42453078840706067e+02 \n7.69012165703224561e+01 -1.46993833719678017e+02 2.14854235045879841e+02 -2.65323465914435648e+02 2.49501770003548675e+02 -1.15723734659670045e+02 -1.25169600616075029e+02 3.41185828182458219e+02 -3.49028042104239987e+02 1.50792878279806365e+02 \n3.85488178060672564e+00 -3.82545301400996260e-01 -1.56502853504736505e+01 4.37760934673615178e+01 -7.24141350962153097e+01 7.41874862089898118e+01 -2.26415721148616011e+01 -6.33013663300469773e+01 1.03831788398162775e+02 -5.48604480727578188e+01 \n-1.83689038991366762e+01 3.68521624715932616e+01 -5.81143838574930327e+01 7.86668876488189019e+01 -8.33142020681742060e+01 5.06644961356152749e+01 2.57208317083759625e+01 -1.07489663777269123e+02 1.22545350636229135e+02 -5.62914123271420972e+01 \n-5.71411232109241454e-01 4.24982648070741825e-01 9.47863610362612840e-01 -3.61064591643437722e+00 6.67098171080280182e+00 -7.51914297946808475e+00 3.00392673859952497e+00 5.83452297865690643e+00 -1.07392760755323411e+01 5.94871554900426368e+00 \n11\n-4.12041515766980377e+00 1.49949959911299242e+01 6.35731977906080902e+01 1.20470087796178516e+02 1.50305035641072987e+02 1.22515528646515421e+02 3.52895757085645452e+01 -7.07594794215483251e+01 -1.30100805091562470e+02 -1.06295527763340623e+02 -3.82757566718419669e+01 \n2.00341009483230300e+00 -2.25743058141675466e+01 -7.73010824878662974e+01 -1.30716255811330469e+02 -1.39999600806465220e+02 -8.42726197382234873e+01 8.26956361297520939e+00 7.17086427208355782e+01 6.35544169041844347e+01 1.72354955949136828e+01 -4.22191585927439576e+00 \n4.95257377846648896e+01 1.13963255619861455e+02 1.97704737456877429e+02 2.68909814025724081e+02 2.74125725895767185e+02 1.78740540978192653e+02 4.63183645565188435e+00 -1.63111529694931409e+02 -2.26433438219364164e+02 -1.61351247045977982e+02 -5.25197952962990777e+01 \n-7.14265963329389086e+01 -1.26547445128480136e+02 -1.54207426382666893e+02 -1.32227892746896126e+02 -4.29449955462327060e+01 8.31336431156893024e+01 1.57303857377463397e+02 9.67564515868959545e+01 -6.09178201354562098e+01 -1.47994167724565692e+02 -8.03155177360139135e+01 \n8.99961932292911995e+01 1.49306744150663481e+02 1.65249682137765892e+02 1.27411530807572894e+02 3.18185855216899380e+01 -8.67084920566177646e+01 -1.54306282595208088e+02 -1.11441781069578253e+02 8.14591566713812703e+00 8.16774554622568547e+01 4.82360995127788696e+01 \n-4.94480172191610522e+01 -5.92538280649696839e+01 -7.66146028706470615e+00 1.03929900988997845e+02 2.42477958295403841e+02 3.25024401562615225e+02 2.49266648668046831e+02 -6.93840871479700180e+00 -2.87097866299302998e+02 -3.43236590017353446e+02 -1.52859683665130765e+02 \n-4.36843968593256357e+01 -1.01677232611905486e+02 -1.90512252803839816e+02 -3.01147031074776415e+02 -3.83305033542796462e+02 -3.54455052189132721e+02 -1.49861310143137184e+02 1.86095242547151993e+02 4.51744813307026071e+02 4.28560148556683026e+02 1.72186268021953208e+02 \n3.36674702586465497e+01 4.90112106190908358e+01 3.62817866423753883e+01 -9.27474041205602100e+00 -8.37188096450366421e+01 -1.53643437699504371e+02 -1.53311562687097028e+02 -3.49459465473822540e+01 1.39756022828524014e+02 2.03953479736846395e+02 9.94283638954213055e+01 \n4.48335977278983521e+00 1.94942726186392972e+01 5.40793973605061231e+01 1.07640024864316384e+02 1.62532176925922009e+02 1.78426008314180511e+02 1.07356285020091669e+02 -5.48971392441937636e+01 -2.14767859882365991e+02 -2.30730941871566657e+02 -9.94171139017083708e+01 \n-5.60318764003247380e+00 -8.51217786248609807e+00 -7.34548027243369115e+00 -1.13145496101485652e+00 1.03385161738070409e+01 2.28341009863352375e+01 2.56850815071420861e+01 8.56329158517640465e+00 -2.12656889128596603e+01 -3.46789394994544637e+01 -1.77189283667651678e+01 \n2.19521357734538918e-01 -1.66352064608417145e+00 -7.32919608561783541e+00 -1.69293806010754855e+01 -2.78378822172551478e+01 -3.29511444776287422e+01 -2.24019147339464496e+01 7.02804408352376602e+00 3.92011842579586670e+01 4.49201411687895091e+01 2.00578105854035563e+01 \n0.00000000000000000e+00 -5.85370655877039544e+01 0.00000000000000000e+00 -2.73017788422365293e+02 0.00000000000000000e+00 -2.11458337339392129e+02 0.00000000000000000e+00 2.52752918945773571e+02 0.00000000000000000e+00 -7.94309698561796993e+01 0.00000000000000000e+00 \n-4.00682018966460601e+00 0.00000000000000000e+00 -2.48874610812376046e+02 0.00000000000000000e+00 -3.94746746433106289e+02 0.00000000000000000e+00 3.38544924863722335e+02 0.00000000000000000e+00 -8.98139108370016537e+01 0.00000000000000000e+00 1.12565582750300615e+01 \n0.00000000000000000e+00 1.15197865261770217e+02 0.00000000000000000e+00 -5.38733963607577651e+02 0.00000000000000000e+00 -6.55434434165589991e+02 0.00000000000000000e+00 6.05603841049049078e+02 0.00000000000000000e+00 -1.77054924207946405e+02 0.00000000000000000e+00 \n1.42853192665877817e+02 0.00000000000000000e+00 2.64526960437195096e+02 0.00000000000000000e+00 -5.79605764914825947e+02 0.00000000000000000e+00 1.81584982423895352e+02 0.00000000000000000e+00 -1.71326086282805184e+01 0.00000000000000000e+00 -2.15752791713923794e-01 \n0.00000000000000000e+00 3.24898428342347234e+02 0.00000000000000000e+00 4.48241050261596910e+02 0.00000000000000000e+00 -1.08019923586213589e+03 0.00000000000000000e+00 5.15096626349160419e+02 0.00000000000000000e+00 -1.12898152083322801e+02 0.00000000000000000e+00 \n9.88960344383221044e+01 0.00000000000000000e+00 4.24196097650959218e+02 0.00000000000000000e+00 9.87548208668497136e+02 0.00000000000000000e+00 -9.70896900981313619e+02 0.00000000000000000e+00 2.86273598303785504e+02 0.00000000000000000e+00 -3.87671859997522023e+01 \n0.00000000000000000e+00 -9.92999142096062050e+01 0.00000000000000000e+00 3.27389399521526869e+02 0.00000000000000000e+00 1.42897511735102888e+03 0.00000000000000000e+00 -1.13330491394448920e+03 0.00000000000000000e+00 3.25876089171522252e+02 0.00000000000000000e+00 \n-6.73349405172930993e+01 0.00000000000000000e+00 -2.16678188809372481e+02 0.00000000000000000e+00 -3.34404842592845493e+02 0.00000000000000000e+00 4.00019207331358338e+02 0.00000000000000000e+00 -1.25777778888634362e+02 0.00000000000000000e+00 1.76358270180603599e+01 \n0.00000000000000000e+00 -7.92691757694878526e+00 0.00000000000000000e+00 -2.00285910101570459e+02 0.00000000000000000e+00 -4.96676382199118960e+02 0.00000000000000000e+00 4.45037711046319010e+02 0.00000000000000000e+00 -1.33878169178303137e+02 0.00000000000000000e+00 \n1.12063752800649476e+01 0.00000000000000000e+00 3.31701695850017608e+01 0.00000000000000000e+00 4.37119761619708939e+01 0.00000000000000000e+00 -5.77280330549194109e+01 0.00000000000000000e+00 1.86931372848288092e+01 0.00000000000000000e+00 -2.66272138667161590e+00 \n0.00000000000000000e+00 4.84792987193924106e+00 0.00000000000000000e+00 3.84376641456608509e+01 0.00000000000000000e+00 7.93869096258732209e+01 0.00000000000000000e+00 -7.53565295159835245e+01 0.00000000000000000e+00 2.31322188916259652e+01 0.00000000000000000e+00 \n4.12041515766980377e+00 1.49949959911299242e+01 -6.35731977906080902e+01 1.20470087796178516e+02 -1.50305035641072987e+02 1.22515528646515421e+02 -3.52895757085645452e+01 -7.07594794215483251e+01 1.30100805091562470e+02 -1.06295527763340623e+02 3.82757566718419669e+01 \n2.00341009483230300e+00 2.25743058141675466e+01 -7.73010824878662974e+01 1.30716255811330469e+02 -1.39999600806465220e+02 8.42726197382234873e+01 8.26956361297520939e+00 -7.17086427208355782e+01 6.35544169041844347e+01 -1.72354955949136828e+01 -4.22191585927439576e+00 \n-4.95257377846648896e+01 1.13963255619861455e+02 -1.97704737456877429e+02 2.68909814025724081e+02 -2.74125725895767185e+02 1.78740540978192653e+02 -4.63183645565188435e+00 -1.63111529694931409e+02 2.26433438219364164e+02 -1.61351247045977982e+02 5.25197952962990777e+01 \n-7.14265963329389086e+01 1.26547445128480136e+02 -1.54207426382666893e+02 1.32227892746896126e+02 -4.29449955462327060e+01 -8.31336431156893024e+01 1.57303857377463397e+02 -9.67564515868959545e+01 -6.09178201354562098e+01 1.47994167724565692e+02 -8.03155177360139135e+01 \n-8.99961932292911995e+01 1.49306744150663481e+02 -1.65249682137765892e+02 1.27411530807572894e+02 -3.18185855216899380e+01 -8.67084920566177646e+01 1.54306282595208088e+02 -1.11441781069578253e+02 -8.14591566713812703e+00 8.16774554622568547e+01 -4.82360995127788696e+01 \n-4.94480172191610522e+01 5.92538280649696839e+01 -7.66146028706470615e+00 -1.03929900988997845e+02 2.42477958295403841e+02 -3.25024401562615225e+02 2.49266648668046831e+02 6.93840871479700180e+00 -2.87097866299302998e+02 3.43236590017353446e+02 -1.52859683665130765e+02 \n4.36843968593256357e+01 -1.01677232611905486e+02 1.90512252803839816e+02 -3.01147031074776415e+02 3.83305033542796462e+02 -3.54455052189132721e+02 1.49861310143137184e+02 1.86095242547151993e+02 -4.51744813307026071e+02 4.28560148556683026e+02 -1.72186268021953208e+02 \n3.36674702586465497e+01 -4.90112106190908358e+01 3.62817866423753883e+01 9.27474041205602100e+00 -8.37188096450366421e+01 1.53643437699504371e+02 -1.53311562687097028e+02 3.49459465473822540e+01 1.39756022828524014e+02 -2.03953479736846395e+02 9.94283638954213055e+01 \n-4.48335977278983521e+00 1.94942726186392972e+01 -5.40793973605061231e+01 1.07640024864316384e+02 -1.62532176925922009e+02 1.78426008314180511e+02 -1.07356285020091669e+02 -5.48971392441937636e+01 2.14767859882365991e+02 -2.30730941871566657e+02 9.94171139017083708e+01 \n-5.60318764003247380e+00 8.51217786248609807e+00 -7.34548027243369115e+00 1.13145496101485652e+00 1.03385161738070409e+01 -2.28341009863352375e+01 2.56850815071420861e+01 -8.56329158517640465e+00 -2.12656889128596603e+01 3.46789394994544637e+01 -1.77189283667651678e+01 \n-2.19521357734538918e-01 -1.66352064608417145e+00 7.32919608561783541e+00 -1.69293806010754855e+01 2.78378822172551478e+01 -3.29511444776287422e+01 2.24019147339464496e+01 7.02804408352376602e+00 -3.92011842579586670e+01 4.49201411687895091e+01 -2.00578105854035563e+01 \n12\n-1.39704400550330986e+01 -1.92673936720526276e+00 4.27431433127519700e+01 9.95192378087725311e+01 1.35679256692909421e+02 1.23258652955456022e+02 5.94334981442106916e+01 -2.41348252829842369e+01 -7.80651470422556175e+01 -7.52502396779704931e+01 -3.73556803923225450e+01 -7.67811191702811947e+00 \n-1.06935997371442851e+01 -4.44433943409471390e+01 -1.03976614404109724e+02 -1.55954137570794871e+02 -1.52705983738516721e+02 -7.03592495597161148e+01 5.49616977282201459e+01 1.30277093451088402e+02 7.98412167101363867e+01 -5.24485032560265753e+01 -1.18529661464732357e+02 -6.09043957849991083e+01 \n3.95339797830059534e+01 9.57825370527884699e+01 1.72557982568144039e+02 2.38140627319966681e+02 2.42358080328897515e+02 1.56442923684295115e+02 8.36154085337413273e+00 -1.17047076562907316e+02 -1.37402891518768133e+02 -5.89327292864732935e+01 1.70587606153976529e+01 2.09293466573577557e+01 \n-1.10216350679014141e+02 -1.95362461821364943e+02 -2.43686209584665460e+02 -2.28438248255575167e+02 -1.16172799474967876e+02 7.82258655388628365e+01 2.56937040049742214e+02 2.73628694031853435e+02 6.51114227267037565e+01 -2.15624866531862181e+02 -2.95197844397583159e+02 -1.33528781702011562e+02 \n1.17635923986945136e+02 1.93037858047812774e+02 2.08862037743398540e+02 1.51067750087765386e+02 1.04176677572804484e+01 -1.73651604426100058e+02 -2.98175025796689165e+02 -2.46177320588789505e+02 -4.16682137187587817e+00 2.54260044284779880e+02 2.95220793820730768e+02 1.25089684769946584e+02 \n-9.90056771249077275e+01 -1.48952186084105688e+02 -1.29069218971418299e+02 -3.59486033707338089e+01 1.18385640817115131e+02 2.76651394017034609e+02 3.38228418342104111e+02 2.16756558767753131e+02 -5.90947961199228171e+01 -3.01054068743397494e+02 -3.07483101442910797e+02 -1.23126541111661575e+02 \n2.32761527756857690e+01 9.37738606134736149e+00 -6.46374426578338397e+01 -1.95923781731723998e+02 -3.49863321710405292e+02 -4.48833265527229913e+02 -3.93359389983390595e+02 -1.33235382070403732e+02 2.40223214526136506e+02 4.89186415016249634e+02 4.22990886045388095e+02 1.56877235128442805e+02 \n8.37977849626200540e+01 1.38302199731102038e+02 1.53346467388826060e+02 1.18512466210958178e+02 1.73130521404301320e+01 -1.37886055920709591e+02 -2.72074935389302916e+02 -2.59863706213299273e+02 -3.64043933556486144e+01 2.56050737043708360e+02 3.35188686285643810e+02 1.51650893165063668e+02 \n-4.58544231749386087e+01 -6.25200891399078234e+01 -3.47450436166335200e+01 4.22114219123493334e+01 1.61502384838716398e+02 2.81704072791167698e+02 3.18605656199823070e+02 1.85231687297047898e+02 -1.06564615796134134e+02 -3.70078863568275792e+02 -3.73602770728164356e+02 -1.51434528708346303e+02 \n-1.87248683902521523e+01 -3.16796090939127428e+01 -3.71749237035346245e+01 -3.26548622444883174e+01 -1.27212293027115149e+01 2.31334751783137891e+01 6.02435793778038530e+01 6.65030913076155830e+01 1.73257870057728729e+01 -5.90970253235185339e+01 -8.62657290226264827e+01 -4.09371682279860170e+01 \n1.32354166072771345e+01 1.93118343453725149e+01 1.47309433870578969e+01 -2.13107487713803376e+00 -3.12556225218176731e+01 -6.44745206167777527e+01 -8.10078637429183589e+01 -5.46962662449924711e+01 1.87242500390134074e+01 9.34913438271321682e+01 1.01210930132409316e+02 4.26231290549859469e+01 \n1.64432146383644223e+00 2.81562103640649699e+00 3.39339498906674423e+00 3.15042836888732500e+00 1.54412435514783979e+00 -1.63222606444925186e+00 -5.24256166810210521e+00 -6.30891289984240429e+00 -2.08049018670162817e+00 5.29729341591410404e+00 8.32108367447714091e+00 4.07536451514378763e+00 \n0.00000000000000000e+00 -9.29365691832401502e+01 0.00000000000000000e+00 -3.19813998358735663e+02 0.00000000000000000e+00 -2.19275562831260770e+02 0.00000000000000000e+00 3.43028919870394123e+02 0.00000000000000000e+00 -1.29414040035286152e+02 0.00000000000000000e+00 2.39118268297679143e+01 \n2.13871994742885702e+01 0.00000000000000000e+00 -1.93621484480307403e+02 0.00000000000000000e+00 -3.64253903019541687e+02 0.00000000000000000e+00 2.32473589638663544e+02 0.00000000000000000e+00 -4.38320037508192080e+01 0.00000000000000000e+00 3.05863234711634227e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 8.23343723326915795e+01 0.00000000000000000e+00 -5.69157143221317209e+02 0.00000000000000000e+00 -6.31972034514571274e+02 0.00000000000000000e+00 6.80861697118434287e+02 0.00000000000000000e+00 -2.28745121759808064e+02 0.00000000000000000e+00 3.95501386017656500e+01 \n2.20432701358028282e+02 0.00000000000000000e+00 4.18245202939184709e+02 0.00000000000000000e+00 -5.38295719899172350e+02 0.00000000000000000e+00 -1.74218633481545085e+02 0.00000000000000000e+00 1.64146592890848335e+02 0.00000000000000000e+00 -3.74763174525293903e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 4.28929872467172001e+02 0.00000000000000000e+00 6.42588090839660227e+02 0.00000000000000000e+00 -9.42140934570834692e+02 0.00000000000000000e+00 2.00462285754299814e+02 0.00000000000000000e+00 2.44910104491369274e+01 0.00000000000000000e+00 -1.37274342698199579e+01 \n1.98011354249815455e+02 0.00000000000000000e+00 6.07182184119394061e+02 0.00000000000000000e+00 9.94111350082071607e+02 0.00000000000000000e+00 -1.45446364483387009e+03 0.00000000000000000e+00 5.54997302169352865e+02 0.00000000000000000e+00 -9.75537082188701307e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.42507144726197681e+02 0.00000000000000000e+00 7.12442979371054820e+02 0.00000000000000000e+00 1.60532542540944847e+03 0.00000000000000000e+00 -1.81471441201039994e+03 0.00000000000000000e+00 6.64938937314211879e+02 0.00000000000000000e+00 -1.23257811143904498e+02 \n-1.67595569925240108e+02 0.00000000000000000e+00 -4.12654992051949155e+02 0.00000000000000000e+00 -3.78238819887285573e+02 0.00000000000000000e+00 8.69638433486349538e+02 0.00000000000000000e+00 -3.70891447057301523e+02 0.00000000000000000e+00 6.90814729880106340e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.92648584483214191e+02 0.00000000000000000e+00 -5.14633435718527521e+02 0.00000000000000000e+00 -6.75404118376393089e+02 0.00000000000000000e+00 9.83926863595212863e+02 0.00000000000000000e+00 -3.89389359872041267e+02 0.00000000000000000e+00 7.51447000999352891e+01 \n3.74497367805043047e+01 0.00000000000000000e+00 8.60123967508193708e+01 0.00000000000000000e+00 6.04245825285906293e+01 0.00000000000000000e+00 -1.78793825831685512e+02 0.00000000000000000e+00 7.97899436945283425e+01 0.00000000000000000e+00 -1.52020412971011332e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 5.30739874018345337e+01 0.00000000000000000e+00 1.23676358276898150e+02 0.00000000000000000e+00 1.33039642519819646e+02 0.00000000000000000e+00 -2.19600972770411857e+02 0.00000000000000000e+00 8.97714515006762368e+01 0.00000000000000000e+00 -1.76126149051231007e+01 \n-3.28864292767288445e+00 0.00000000000000000e+00 -7.28915128520193235e+00 0.00000000000000000e+00 -4.35401896285171439e+00 0.00000000000000000e+00 1.51969280955747816e+01 0.00000000000000000e+00 -6.95432755518986899e+00 0.00000000000000000e+00 1.34167493172365004e+00 0.00000000000000000e+00 \n1.39704400550330986e+01 -1.92673936720526276e+00 -4.27431433127519700e+01 9.95192378087725311e+01 -1.35679256692909421e+02 1.23258652955456022e+02 -5.94334981442106916e+01 -2.41348252829842369e+01 7.80651470422556175e+01 -7.52502396779704931e+01 3.73556803923225450e+01 -7.67811191702811947e+00 \n-1.06935997371442851e+01 4.44433943409471390e+01 -1.03976614404109724e+02 1.55954137570794871e+02 -1.52705983738516721e+02 7.03592495597161148e+01 5.49616977282201459e+01 -1.30277093451088402e+02 7.98412167101363867e+01 5.24485032560265753e+01 -1.18529661464732357e+02 6.09043957849991083e+01 \n-3.95339797830059534e+01 9.57825370527884699e+01 -1.72557982568144039e+02 2.38140627319966681e+02 -2.42358080328897515e+02 1.56442923684295115e+02 -8.36154085337413273e+00 -1.17047076562907316e+02 1.37402891518768133e+02 -5.89327292864732935e+01 -1.70587606153976529e+01 2.09293466573577557e+01 \n-1.10216350679014141e+02 1.95362461821364943e+02 -2.43686209584665460e+02 2.28438248255575167e+02 -1.16172799474967876e+02 -7.82258655388628365e+01 2.56937040049742214e+02 -2.73628694031853435e+02 6.51114227267037565e+01 2.15624866531862181e+02 -2.95197844397583159e+02 1.33528781702011562e+02 \n-1.17635923986945136e+02 1.93037858047812774e+02 -2.08862037743398540e+02 1.51067750087765386e+02 -1.04176677572804484e+01 -1.73651604426100058e+02 2.98175025796689165e+02 -2.46177320588789505e+02 4.16682137187587817e+00 2.54260044284779880e+02 -2.95220793820730768e+02 1.25089684769946584e+02 \n-9.90056771249077275e+01 1.48952186084105688e+02 -1.29069218971418299e+02 3.59486033707338089e+01 1.18385640817115131e+02 -2.76651394017034609e+02 3.38228418342104111e+02 -2.16756558767753131e+02 -5.90947961199228171e+01 3.01054068743397494e+02 -3.07483101442910797e+02 1.23126541111661575e+02 \n-2.32761527756857690e+01 9.37738606134736149e+00 6.46374426578338397e+01 -1.95923781731723998e+02 3.49863321710405292e+02 -4.48833265527229913e+02 3.93359389983390595e+02 -1.33235382070403732e+02 -2.40223214526136506e+02 4.89186415016249634e+02 -4.22990886045388095e+02 1.56877235128442805e+02 \n8.37977849626200540e+01 -1.38302199731102038e+02 1.53346467388826060e+02 -1.18512466210958178e+02 1.73130521404301320e+01 1.37886055920709591e+02 -2.72074935389302916e+02 2.59863706213299273e+02 -3.64043933556486144e+01 -2.56050737043708360e+02 3.35188686285643810e+02 -1.51650893165063668e+02 \n4.58544231749386087e+01 -6.25200891399078234e+01 3.47450436166335200e+01 4.22114219123493334e+01 -1.61502384838716398e+02 2.81704072791167698e+02 -3.18605656199823070e+02 1.85231687297047898e+02 1.06564615796134134e+02 -3.70078863568275792e+02 3.73602770728164356e+02 -1.51434528708346303e+02 \n-1.87248683902521523e+01 3.16796090939127428e+01 -3.71749237035346245e+01 3.26548622444883174e+01 -1.27212293027115149e+01 -2.31334751783137891e+01 6.02435793778038530e+01 -6.65030913076155830e+01 1.73257870057728729e+01 5.90970253235185339e+01 -8.62657290226264827e+01 4.09371682279860170e+01 \n-1.32354166072771345e+01 1.93118343453725149e+01 -1.47309433870578969e+01 -2.13107487713803376e+00 3.12556225218176731e+01 -6.44745206167777527e+01 8.10078637429183589e+01 -5.46962662449924711e+01 -1.87242500390134074e+01 9.34913438271321682e+01 -1.01210930132409316e+02 4.26231290549859469e+01 \n1.64432146383644223e+00 -2.81562103640649699e+00 3.39339498906674423e+00 -3.15042836888732500e+00 1.54412435514783979e+00 1.63222606444925186e+00 -5.24256166810210521e+00 6.30891289984240429e+00 -2.08049018670162817e+00 -5.29729341591410404e+00 8.32108367447714091e+00 -4.07536451514378763e+00 \n13\n-9.55025212091591586e+00 5.21235204414833504e+00 5.02742492797824012e+01 1.04519606356830822e+02 1.34049085570543931e+02 1.10715928211335359e+02 3.50172508202310994e+01 -5.22344049899383833e+01 -8.91406556203534331e+01 -4.56797811312566930e+01 3.26514556003074795e+01 6.25657864174035558e+01 2.93127601273334088e+01 \n-2.94492073850485128e+01 -8.10088797644340349e+01 -1.60169629226916645e+02 -2.32819107929759678e+02 -2.41572700870507575e+02 -1.44995307804160317e+02 3.71823242735519731e+01 2.03505548097280956e+02 2.19530815851151701e+02 4.33214901795835848e+01 -1.78565453277711479e+02 -2.27454088569358413e+02 -9.71572773351920131e+01 \n6.24158497794203164e+01 1.34886752108001673e+02 2.20068919452257305e+02 2.84488591699950095e+02 2.71583298197815105e+02 1.47050160650403777e+02 -5.61196173315789286e+01 -2.25208708385510419e+02 -2.28030878280074932e+02 -3.93472780400837367e+01 1.81369372111290319e+02 2.23237723484644842e+02 9.34581363122365027e+01 \n-1.39641324205209113e+02 -2.54015801715865679e+02 -3.36862713346006278e+02 -3.60727550797980295e+02 -2.76231302430605731e+02 -6.75024519888414181e+01 2.00006937019589091e+02 3.74839982165005389e+02 3.03807208399189945e+02 -9.17695224398412299e+00 -3.21334660135008880e+02 -3.51407463057985340e+02 -1.41313464554254843e+02 \n1.77037136587208910e+02 2.97293806926415960e+02 3.43083452634575136e+02 2.97512102370567645e+02 1.34384924500284981e+02 -1.27066274956047440e+02 -3.86323966992877725e+02 -4.78933359688391662e+02 -2.81439328909686177e+02 1.34706210719799429e+02 4.67647198859746938e+02 4.42144767578903975e+02 1.66864460647507349e+02 \n-1.12944364383938649e+02 -1.78835234942595555e+02 -1.81388909992171710e+02 -1.17689098500566512e+02 8.93127884198930645e+00 1.61023438768901104e+02 2.64199668408815124e+02 2.42953248109678457e+02 8.63248580406117356e+01 -1.12318593086177922e+02 -2.11924958503247556e+02 -1.59767808496991474e+02 -5.10591630031459750e+01 \n7.75190100926948790e+01 1.06575589295188705e+02 6.58480699959940630e+01 -4.31939906123745115e+01 -2.01694638199947249e+02 -3.54725364403346499e+02 -4.16277233533346140e+02 -3.10783529634436726e+02 -4.30570643207717552e+01 2.57205385600026056e+02 3.97166599483877660e+02 2.96143216296645961e+02 9.75628773736956341e+01 \n1.26421527257948130e+02 2.22612696448029338e+02 2.85756595073378133e+02 3.04118991978599817e+02 2.38494238405800820e+02 5.85433351109732646e+01 -2.03665332723059002e+02 -4.10707525339220953e+02 -3.67772480107425963e+02 -1.35372538488205394e+01 3.96282030746642298e+02 4.67907340795126938e+02 1.97195810474510793e+02 \n-1.25114383335732566e+02 -2.02002950244310088e+02 -2.15322295441737882e+02 -1.56787148904253002e+02 -1.06773705035789819e+01 2.09098652634601951e+02 4.23450789057747490e+02 4.85775444769287046e+02 2.65896310096335481e+02 -1.84813978973281647e+02 -5.54939367584916877e+02 -5.25274215801716860e+02 -2.00679568139785407e+02 \n-3.59950185612977288e+01 -6.52670798411406062e+01 -8.85833790991238927e+01 -1.02618227838236527e+02 -9.30950837928044790e+01 -4.37459975364060251e+01 4.49545301360994142e+01 1.32282774108182743e+02 1.40956025812019310e+02 2.54756319574648195e+01 -1.34895140452892182e+02 -1.77882394490630307e+02 -7.88316247004960216e+01 \n4.24384091673062061e+01 7.03504566838948518e+01 7.98654192385617090e+01 6.78529995869427482e+01 2.61187208892094736e+01 -4.64534224846254192e+01 -1.28896246484331688e+02 -1.70107460314184590e+02 -1.12007903612502668e+02 4.53024725262424162e+01 1.93679307719106473e+02 1.97666735403114010e+02 7.86968503041982731e+01 \n4.44732170210997453e+00 8.19083790679164960e+00 1.14387309239393269e+01 1.38066525408710188e+01 1.33581575811742497e+01 7.55037623847347355e+00 -4.32699218274762464e+00 -1.73994141315456142e+01 -2.04978855158728021e+01 -5.27618294464472807e+00 1.84856986254711992e+01 2.61630382275146815e+01 1.19650569153361247e+01 \n-6.82000308172277101e+00 -1.14352073549701930e+01 -1.33251821655447059e+01 -1.19820295126193306e+01 -5.89875790085618379e+00 5.55812508000394635e+00 1.95662727013716978e+01 2.79229069425396706e+01 2.00905201063492156e+01 -5.69826412544795535e+00 -3.19882818750429358e+01 -3.41357460184945011e+01 -1.39263605664757198e+01 \n0.00000000000000000e+00 -7.65907916823718510e+01 0.00000000000000000e+00 -2.91337183184806921e+02 0.00000000000000000e+00 -2.01159021455902509e+02 0.00000000000000000e+00 3.03716213619804543e+02 0.00000000000000000e+00 -1.15367060032617815e+02 0.00000000000000000e+00 2.21534703573643251e+01 0.00000000000000000e+00 \n5.88984147700970256e+01 0.00000000000000000e+00 -1.44439755278967248e+02 0.00000000000000000e+00 -4.37479146353936036e+02 0.00000000000000000e+00 -2.36075583446857259e+01 0.00000000000000000e+00 1.49445475378323946e+02 0.00000000000000000e+00 -4.99082888817810802e+01 0.00000000000000000e+00 7.22391558450608905e+00 \n0.00000000000000000e+00 1.62656187846167416e+02 0.00000000000000000e+00 -4.57751157047907863e+02 0.00000000000000000e+00 -6.12260425708700473e+02 0.00000000000000000e+00 4.63666610507667212e+02 0.00000000000000000e+00 -1.04880152625137619e+02 0.00000000000000000e+00 9.00405266519008198e+00 0.00000000000000000e+00 \n2.79282648410418227e+02 0.00000000000000000e+00 4.85499468506932332e+02 0.00000000000000000e+00 -6.91877368402450939e+02 0.00000000000000000e+00 -6.21308805900777032e+02 0.00000000000000000e+00 5.21989548133659512e+02 0.00000000000000000e+00 -1.39170138145335412e+02 0.00000000000000000e+00 1.82582131211095403e+01 \n0.00000000000000000e+00 6.31961647729395381e+02 0.00000000000000000e+00 8.85819024050879391e+02 0.00000000000000000e+00 -9.85693585121272297e+02 0.00000000000000000e+00 -3.81590819857868564e+02 0.00000000000000000e+00 4.12218498273871865e+02 0.00000000000000000e+00 -1.20771982402764881e+02 0.00000000000000000e+00 \n2.25888728767877298e+02 0.00000000000000000e+00 6.22889590649205948e+02 0.00000000000000000e+00 8.58307324372559394e+02 0.00000000000000000e+00 -1.73969603945408733e+03 0.00000000000000000e+00 8.13242794093425926e+02 0.00000000000000000e+00 -1.76001455613193818e+02 0.00000000000000000e+00 2.06601674504029589e+01 \n0.00000000000000000e+00 3.23916277541591049e+02 0.00000000000000000e+00 9.01048614015688413e+02 0.00000000000000000e+00 1.49632492360445735e+03 0.00000000000000000e+00 -2.36002992968934814e+03 0.00000000000000000e+00 1.06810344850117977e+03 0.00000000000000000e+00 -2.41680301148860683e+02 0.00000000000000000e+00 \n-2.52843054515896259e+02 0.00000000000000000e+00 -5.15057671373953112e+02 0.00000000000000000e+00 -1.74374757682335801e+02 0.00000000000000000e+00 1.49924029375121388e+03 0.00000000000000000e+00 -8.67377211901084493e+02 0.00000000000000000e+00 2.09305559271413567e+02 0.00000000000000000e+00 -2.62937102367736352e+01 \n0.00000000000000000e+00 -4.62811974291930522e+02 0.00000000000000000e+00 -8.32952940582677756e+02 0.00000000000000000e+00 -6.03655571079764114e+02 0.00000000000000000e+00 1.76841755300757118e+03 0.00000000000000000e+00 -9.21417673238264030e+02 0.00000000000000000e+00 2.23990533042146251e+02 0.00000000000000000e+00 \n7.19900371225954577e+01 0.00000000000000000e+00 1.31901205330079064e+02 0.00000000000000000e+00 -5.33943984909222715e+00 0.00000000000000000e+00 -4.15888511351329061e+02 0.00000000000000000e+00 2.58987320001613683e+02 0.00000000000000000e+00 -6.46143148102038642e+01 0.00000000000000000e+00 8.27893794789083044e+00 \n0.00000000000000000e+00 1.53321010112894935e+02 0.00000000000000000e+00 2.46913885288452475e+02 0.00000000000000000e+00 1.18641347178689385e+02 0.00000000000000000e+00 -5.08373814941861676e+02 0.00000000000000000e+00 2.79256869611385244e+02 0.00000000000000000e+00 -6.96040819206919877e+01 0.00000000000000000e+00 \n-8.89464340421994906e+00 0.00000000000000000e+00 -1.53197103546604199e+01 0.00000000000000000e+00 4.13272501400496177e+00 0.00000000000000000e+00 5.15862850305211947e+01 0.00000000000000000e+00 -3.34303864184930992e+01 0.00000000000000000e+00 8.48934325761027524e+00 0.00000000000000000e+00 -1.09920299091710451e+00 \n0.00000000000000000e+00 -2.43799526713402434e+01 0.00000000000000000e+00 -3.72506505812554736e+01 0.00000000000000000e+00 -1.37079540581735260e+01 0.00000000000000000e+00 7.63803910540655716e+01 0.00000000000000000e+00 -4.31139215285005643e+01 0.00000000000000000e+00 1.08834583973348534e+01 0.00000000000000000e+00 \n9.55025212091591586e+00 5.21235204414833504e+00 -5.02742492797824012e+01 1.04519606356830822e+02 -1.34049085570543931e+02 1.10715928211335359e+02 -3.50172508202310994e+01 -5.22344049899383833e+01 8.91406556203534331e+01 -4.56797811312566930e+01 -3.26514556003074795e+01 6.25657864174035558e+01 -2.93127601273334088e+01 \n-2.94492073850485128e+01 8.10088797644340349e+01 -1.60169629226916645e+02 2.32819107929759678e+02 -2.41572700870507575e+02 1.44995307804160317e+02 3.71823242735519731e+01 -2.03505548097280956e+02 2.19530815851151701e+02 -4.33214901795835848e+01 -1.78565453277711479e+02 2.27454088569358413e+02 -9.71572773351920131e+01 \n-6.24158497794203164e+01 1.34886752108001673e+02 -2.20068919452257305e+02 2.84488591699950095e+02 -2.71583298197815105e+02 1.47050160650403777e+02 5.61196173315789286e+01 -2.25208708385510419e+02 2.28030878280074932e+02 -3.93472780400837367e+01 -1.81369372111290319e+02 2.23237723484644842e+02 -9.34581363122365027e+01 \n-1.39641324205209113e+02 2.54015801715865679e+02 -3.36862713346006278e+02 3.60727550797980295e+02 -2.76231302430605731e+02 6.75024519888414181e+01 2.00006937019589091e+02 -3.74839982165005389e+02 3.03807208399189945e+02 9.17695224398412299e+00 -3.21334660135008880e+02 3.51407463057985340e+02 -1.41313464554254843e+02 \n-1.77037136587208910e+02 2.97293806926415960e+02 -3.43083452634575136e+02 2.97512102370567645e+02 -1.34384924500284981e+02 -1.27066274956047440e+02 3.86323966992877725e+02 -4.78933359688391662e+02 2.81439328909686177e+02 1.34706210719799429e+02 -4.67647198859746938e+02 4.42144767578903975e+02 -1.66864460647507349e+02 \n-1.12944364383938649e+02 1.78835234942595555e+02 -1.81388909992171710e+02 1.17689098500566512e+02 8.93127884198930645e+00 -1.61023438768901104e+02 2.64199668408815124e+02 -2.42953248109678457e+02 8.63248580406117356e+01 1.12318593086177922e+02 -2.11924958503247556e+02 1.59767808496991474e+02 -5.10591630031459750e+01 \n-7.75190100926948790e+01 1.06575589295188705e+02 -6.58480699959940630e+01 -4.31939906123745115e+01 2.01694638199947249e+02 -3.54725364403346499e+02 4.16277233533346140e+02 -3.10783529634436726e+02 4.30570643207717552e+01 2.57205385600026056e+02 -3.97166599483877660e+02 2.96143216296645961e+02 -9.75628773736956341e+01 \n1.26421527257948130e+02 -2.22612696448029338e+02 2.85756595073378133e+02 -3.04118991978599817e+02 2.38494238405800820e+02 -5.85433351109732646e+01 -2.03665332723059002e+02 4.10707525339220953e+02 -3.67772480107425963e+02 1.35372538488205394e+01 3.96282030746642298e+02 -4.67907340795126938e+02 1.97195810474510793e+02 \n1.25114383335732566e+02 -2.02002950244310088e+02 2.15322295441737882e+02 -1.56787148904253002e+02 1.06773705035789819e+01 2.09098652634601951e+02 -4.23450789057747490e+02 4.85775444769287046e+02 -2.65896310096335481e+02 -1.84813978973281647e+02 5.54939367584916877e+02 -5.25274215801716860e+02 2.00679568139785407e+02 \n-3.59950185612977288e+01 6.52670798411406062e+01 -8.85833790991238927e+01 1.02618227838236527e+02 -9.30950837928044790e+01 4.37459975364060251e+01 4.49545301360994142e+01 -1.32282774108182743e+02 1.40956025812019310e+02 -2.54756319574648195e+01 -1.34895140452892182e+02 1.77882394490630307e+02 -7.88316247004960216e+01 \n-4.24384091673062061e+01 7.03504566838948518e+01 -7.98654192385617090e+01 6.78529995869427482e+01 -2.61187208892094736e+01 -4.64534224846254192e+01 1.28896246484331688e+02 -1.70107460314184590e+02 1.12007903612502668e+02 4.53024725262424162e+01 -1.93679307719106473e+02 1.97666735403114010e+02 -7.86968503041982731e+01 \n4.44732170210997453e+00 -8.19083790679164960e+00 1.14387309239393269e+01 -1.38066525408710188e+01 1.33581575811742497e+01 -7.55037623847347355e+00 -4.32699218274762464e+00 1.73994141315456142e+01 -2.04978855158728021e+01 5.27618294464472807e+00 1.84856986254711992e+01 -2.61630382275146815e+01 1.19650569153361247e+01 \n6.82000308172277101e+00 -1.14352073549701930e+01 1.33251821655447059e+01 -1.19820295126193306e+01 5.89875790085618379e+00 5.55812508000394635e+00 -1.95662727013716978e+01 2.79229069425396706e+01 -2.00905201063492156e+01 -5.69826412544795535e+00 3.19882818750429358e+01 -3.41357460184945011e+01 1.39263605664757198e+01 \n14\n3.70039223385786024e+00 2.99060519759293232e+01 8.58562361989542944e+01 1.50504824598868632e+02 1.85692739778939605e+02 1.55563367796007887e+02 5.26423769440621225e+01 -8.19055320351756031e+01 -1.65705184773677439e+02 -1.27287689215296317e+02 1.79426650460383099e+01 1.48627615269240254e+02 1.49160868837745348e+02 5.62511226296126844e+01 \n-2.76458992484743707e+01 -8.40150900891805654e+01 -1.79888208171926244e+02 -2.82905376084282409e+02 -3.31695533921635587e+02 -2.69543580680916989e+02 -8.73319440286656110e+01 1.43821211058261963e+02 2.85832603715546580e+02 2.20438097119336350e+02 -2.50069362190033620e+01 -2.46299489502582236e+02 -2.49035792299983846e+02 -9.41632793005030621e+01 \n9.56584979446868778e+01 1.97526905451028550e+02 3.12031001183074766e+02 4.06204980304908906e+02 4.12658933530206481e+02 2.76564525031973070e+02 8.06939011791461925e+00 -2.83623507062793736e+02 -4.18758863428928044e+02 -2.66534614794894350e+02 1.00280846404778224e+02 3.91378186035153642e+02 3.64510551709333711e+02 1.33053308068182757e+02 \n-1.33523510380298458e+02 -2.51051599051627099e+02 -3.53013900524307945e+02 -4.14399169210506135e+02 -3.82107392514197483e+02 -2.22797713036755830e+02 3.36656383739696794e+01 2.77360687454360073e+02 3.60750083589544893e+02 2.05333386272794364e+02 -9.48908326679868012e+01 -3.04835763692813957e+02 -2.67630101663823547e+02 -9.38169829532218855e+01 \n2.19946104429300078e+02 3.79866657971880085e+02 4.68500651734613917e+02 4.70436476439779050e+02 3.45147876022263210e+02 8.24216917091767179e+01 -2.53790259774982299e+02 -5.14490870881081468e+02 -5.24232727100126739e+02 -2.14225897525044783e+02 2.53417552839164858e+02 5.40735260889899216e+02 4.43212952426763136e+02 1.51646619234183393e+02 \n-1.04258998937878921e+02 -1.63834007547113428e+02 -1.62715967193913577e+02 -9.86020537513032475e+01 2.24005631045571961e+01 1.59477870435205590e+02 2.37815793730658486e+02 1.90792262782680264e+02 3.03579325699964337e+01 -1.23083558854335413e+02 -1.31944796793024463e+02 -7.29050037993314710e+00 8.14967890696928649e+01 4.78844819992683797e+01 \n8.53009989285131647e+01 1.24013754899000344e+02 9.82182712484663845e+01 1.08362018762309758e+01 -1.22399230626543477e+02 -2.56172850806266368e+02 -3.21331867470850205e+02 -2.60805075991993739e+02 -8.32249103384749842e+01 1.13659220037711684e+02 2.03250014054219508e+02 1.49870406152955261e+02 4.90592890406866104e+01 1.97826740790641770e+00 \n1.23020668941639560e+02 2.31377239650210286e+02 3.34849106219439495e+02 4.25754890393249011e+02 4.54964342954139934e+02 3.55250368436637417e+02 9.00578095295814029e+01 -2.73769284094203067e+02 -5.29421079858824661e+02 -4.32137475349394731e+02 4.04044328210304091e+01 5.18348609671988946e+02 5.52684069668436028e+02 2.17171278266715137e+02 \n-1.90760554479334344e+02 -3.27437493518193285e+02 -4.03693937678082367e+02 -4.13057275235163358e+02 -3.18070859919609489e+02 -8.92673296303822468e+01 2.46133300544573220e+02 5.58987007102986122e+02 6.34962239743146583e+02 3.15682518351056953e+02 -2.81832969032259643e+02 -7.21703213153834752e+02 -6.38428676941214238e+02 -2.29981524499465565e+02 \n-3.78343287915982678e+01 -7.63624150419941762e+01 -1.23036129817396870e+02 -1.76427890100546373e+02 -2.15677472196344805e+02 -2.03165063787512433e+02 -1.02302133464743499e+02 8.00985982069159893e+01 2.50301062302544584e+02 2.53507423360826016e+02 2.35632512476215010e+01 -2.62107080016954769e+02 -3.14676760966023593e+02 -1.30810020779003981e+02 \n7.81199119113949877e+01 1.37663264553573991e+02 1.78863789746425172e+02 1.99153784473435431e+02 1.78720300842560146e+02 9.44490263525860447e+01 -5.71135547878680757e+01 -2.28657597614859490e+02 -3.11977869870655008e+02 -1.96882765214223913e+02 9.76178706936168800e+01 3.53477799334819473e+02 3.39934647525677839e+02 1.28242232396214979e+02 \n5.41943888050644729e+00 1.15306079903654802e+01 1.99204973121581165e+01 3.05492827703648465e+01 3.98993341047450887e+01 4.07359919253142562e+01 2.46377953918093181e+01 -9.85383193647871921e+00 -4.65090007289552153e+01 -5.27861225448762677e+01 -9.46087729848090984e+00 5.11452302195735650e+01 6.57859844721557671e+01 2.82271627367027319e+01 \n-1.53036531818478049e+01 -2.73095055895700108e+01 -3.63536814692726586e+01 -4.19981316346168749e+01 -4.00066059379411147e+01 -2.47678576543402790e+01 6.10361500288671090e+00 4.44274859701261710e+01 6.71634958896126552e+01 4.71629337595217282e+01 -1.64701204486206324e+01 -7.68130820522777202e+01 -7.74490895367814566e+01 -2.99853023369489398e+01 \n-3.84409965738608322e-01 -8.53197057807863166e-01 -1.55006616587192350e+00 -2.48312212664031950e+00 -3.37472065400370548e+00 -3.60656877794537798e+00 -2.38863188690078815e+00 5.54060882886298230e-01 3.93972939916108911e+00 4.81767879025161832e+00 1.12317832611778517e+00 -4.49448322432648355e+00 -6.06820846101732138e+00 -2.66216628653703734e+00 \n0.00000000000000000e+00 -3.41750345239582116e+01 0.00000000000000000e+00 -2.61951082706909334e+02 0.00000000000000000e+00 -2.66426071422862463e+02 0.00000000000000000e+00 1.53178973730623439e+02 0.00000000000000000e+00 2.54902217212441062e+01 0.00000000000000000e+00 -2.61698756455628362e+01 0.00000000000000000e+00 6.30379370461567634e+00 \n5.52917984969487413e+01 0.00000000000000000e+00 -1.99962442413807540e+02 0.00000000000000000e+00 -6.37892056657840972e+02 0.00000000000000000e+00 -2.63688675711075748e+02 0.00000000000000000e+00 4.72733592793051463e+02 0.00000000000000000e+00 -1.72851069705004293e+02 0.00000000000000000e+00 2.98961193374996776e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 2.67687703561625682e+02 0.00000000000000000e+00 -3.96150450334717959e+02 0.00000000000000000e+00 -8.05347615811210896e+02 0.00000000000000000e+00 6.64596543619029499e+01 0.00000000000000000e+00 2.86824886262341130e+02 0.00000000000000000e+00 -1.29391338034139615e+02 0.00000000000000000e+00 2.61180395398779442e+01 \n2.67047020760596916e+02 0.00000000000000000e+00 3.99564902042795720e+02 0.00000000000000000e+00 -9.54921216866802144e+02 0.00000000000000000e+00 -9.08225907981122377e+02 0.00000000000000000e+00 9.39006666395826485e+02 0.00000000000000000e+00 -3.02834723412191967e+02 0.00000000000000000e+00 4.92033562888172499e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 7.64097995249831108e+02 0.00000000000000000e+00 9.35120243508482142e+02 0.00000000000000000e+00 -1.30813523569668241e+03 0.00000000000000000e+00 -9.43147808640815066e+02 0.00000000000000000e+00 1.01369738981189289e+03 0.00000000000000000e+00 -3.42415727487011331e+02 0.00000000000000000e+00 6.13222119677132011e+01 \n2.08517997875757842e+02 0.00000000000000000e+00 5.84888909992372619e+02 0.00000000000000000e+00 8.26936169576405932e+02 0.00000000000000000e+00 -1.71351354796520405e+03 0.00000000000000000e+00 8.46479616474195406e+02 0.00000000000000000e+00 -1.99867607867440506e+02 0.00000000000000000e+00 2.67370725675464248e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 3.42955146524251966e+02 0.00000000000000000e+00 8.66697839906578361e+02 0.00000000000000000e+00 1.33315307863124727e+03 0.00000000000000000e+00 -2.53088272305950048e+03 0.00000000000000000e+00 1.31352941294519372e+03 0.00000000000000000e+00 -3.43134223737301445e+02 0.00000000000000000e+00 5.35032264749370681e+01 \n-2.46041337883279121e+02 0.00000000000000000e+00 -3.86208369704089583e+02 0.00000000000000000e+00 3.02681605671229382e+02 0.00000000000000000e+00 2.07964369309034613e+03 0.00000000000000000e+00 -1.64354607383094696e+03 0.00000000000000000e+00 5.04426904780905304e+02 0.00000000000000000e+00 -8.08432434174627681e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 -6.66752902716484881e+02 0.00000000000000000e+00 -9.23905067260444436e+02 0.00000000000000000e+00 -1.46474152614275494e+02 0.00000000000000000e+00 2.60780703795219761e+03 0.00000000000000000e+00 -1.80018029539455878e+03 0.00000000000000000e+00 5.44892364644140858e+02 0.00000000000000000e+00 -9.31600652912902139e+01 \n7.56686575831965355e+01 0.00000000000000000e+00 7.82723854325993932e+01 0.00000000000000000e+00 -2.50644901278571238e+02 0.00000000000000000e+00 -7.42879584671533196e+02 0.00000000000000000e+00 6.67874381154178433e+02 0.00000000000000000e+00 -2.15710290981778761e+02 0.00000000000000000e+00 3.55971695034282017e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 2.65904096946216999e+02 0.00000000000000000e+00 3.11513440045313954e+02 0.00000000000000000e+00 -9.38157750364804478e+01 0.00000000000000000e+00 -9.42898859752283497e+02 0.00000000000000000e+00 7.12437410697754936e+02 0.00000000000000000e+00 -2.24114163205349222e+02 0.00000000000000000e+00 3.91697775410255975e+01 \n-1.08388777610128946e+01 0.00000000000000000e+00 -6.62838859160284127e+00 0.00000000000000000e+00 5.36596336190177541e+01 0.00000000000000000e+00 1.22671572481234535e+02 0.00000000000000000e+00 -1.18068780937380428e+02 0.00000000000000000e+00 3.91150750472749681e+01 0.00000000000000000e+00 -6.54874355336853868e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -5.14078082303540145e+01 0.00000000000000000e+00 -5.48763862145823678e+01 0.00000000000000000e+00 3.15287915207479601e+01 0.00000000000000000e+00 1.76910695708501498e+02 0.00000000000000000e+00 -1.40046971777050661e+02 0.00000000000000000e+00 4.49048153483429063e+01 0.00000000000000000e+00 -7.93394471667695409e+00 \n7.68819931477216643e-01 0.00000000000000000e+00 1.97262123490484191e-01 0.00000000000000000e+00 -4.86933274475219545e+00 0.00000000000000000e+00 -9.79877222551322376e+00 0.00000000000000000e+00 9.82919017019807461e+00 0.00000000000000000e+00 -3.30568838464396428e+00 0.00000000000000000e+00 5.58215293835759366e-01 0.00000000000000000e+00 \n-3.70039223385786024e+00 2.99060519759293232e+01 -8.58562361989542944e+01 1.50504824598868632e+02 -1.85692739778939605e+02 1.55563367796007887e+02 -5.26423769440621225e+01 -8.19055320351756031e+01 1.65705184773677439e+02 -1.27287689215296317e+02 -1.79426650460383099e+01 1.48627615269240254e+02 -1.49160868837745348e+02 5.62511226296126844e+01 \n-2.76458992484743707e+01 8.40150900891805654e+01 -1.79888208171926244e+02 2.82905376084282409e+02 -3.31695533921635587e+02 2.69543580680916989e+02 -8.73319440286656110e+01 -1.43821211058261963e+02 2.85832603715546580e+02 -2.20438097119336350e+02 -2.50069362190033620e+01 2.46299489502582236e+02 -2.49035792299983846e+02 9.41632793005030621e+01 \n-9.56584979446868778e+01 1.97526905451028550e+02 -3.12031001183074766e+02 4.06204980304908906e+02 -4.12658933530206481e+02 2.76564525031973070e+02 -8.06939011791461925e+00 -2.83623507062793736e+02 4.18758863428928044e+02 -2.66534614794894350e+02 -1.00280846404778224e+02 3.91378186035153642e+02 -3.64510551709333711e+02 1.33053308068182757e+02 \n-1.33523510380298458e+02 2.51051599051627099e+02 -3.53013900524307945e+02 4.14399169210506135e+02 -3.82107392514197483e+02 2.22797713036755830e+02 3.36656383739696794e+01 -2.77360687454360073e+02 3.60750083589544893e+02 -2.05333386272794364e+02 -9.48908326679868012e+01 3.04835763692813957e+02 -2.67630101663823547e+02 9.38169829532218855e+01 \n-2.19946104429300078e+02 3.79866657971880085e+02 -4.68500651734613917e+02 4.70436476439779050e+02 -3.45147876022263210e+02 8.24216917091767179e+01 2.53790259774982299e+02 -5.14490870881081468e+02 5.24232727100126739e+02 -2.14225897525044783e+02 -2.53417552839164858e+02 5.40735260889899216e+02 -4.43212952426763136e+02 1.51646619234183393e+02 \n-1.04258998937878921e+02 1.63834007547113428e+02 -1.62715967193913577e+02 9.86020537513032475e+01 2.24005631045571961e+01 -1.59477870435205590e+02 2.37815793730658486e+02 -1.90792262782680264e+02 3.03579325699964337e+01 1.23083558854335413e+02 -1.31944796793024463e+02 7.29050037993314710e+00 8.14967890696928649e+01 -4.78844819992683797e+01 \n-8.53009989285131647e+01 1.24013754899000344e+02 -9.82182712484663845e+01 1.08362018762309758e+01 1.22399230626543477e+02 -2.56172850806266368e+02 3.21331867470850205e+02 -2.60805075991993739e+02 8.32249103384749842e+01 1.13659220037711684e+02 -2.03250014054219508e+02 1.49870406152955261e+02 -4.90592890406866104e+01 1.97826740790641770e+00 \n1.23020668941639560e+02 -2.31377239650210286e+02 3.34849106219439495e+02 -4.25754890393249011e+02 4.54964342954139934e+02 -3.55250368436637417e+02 9.00578095295814029e+01 2.73769284094203067e+02 -5.29421079858824661e+02 4.32137475349394731e+02 4.04044328210304091e+01 -5.18348609671988946e+02 5.52684069668436028e+02 -2.17171278266715137e+02 \n1.90760554479334344e+02 -3.27437493518193285e+02 4.03693937678082367e+02 -4.13057275235163358e+02 3.18070859919609489e+02 -8.92673296303822468e+01 -2.46133300544573220e+02 5.58987007102986122e+02 -6.34962239743146583e+02 3.15682518351056953e+02 2.81832969032259643e+02 -7.21703213153834752e+02 6.38428676941214238e+02 -2.29981524499465565e+02 \n-3.78343287915982678e+01 7.63624150419941762e+01 -1.23036129817396870e+02 1.76427890100546373e+02 -2.15677472196344805e+02 2.03165063787512433e+02 -1.02302133464743499e+02 -8.00985982069159893e+01 2.50301062302544584e+02 -2.53507423360826016e+02 2.35632512476215010e+01 2.62107080016954769e+02 -3.14676760966023593e+02 1.30810020779003981e+02 \n-7.81199119113949877e+01 1.37663264553573991e+02 -1.78863789746425172e+02 1.99153784473435431e+02 -1.78720300842560146e+02 9.44490263525860447e+01 5.71135547878680757e+01 -2.28657597614859490e+02 3.11977869870655008e+02 -1.96882765214223913e+02 -9.76178706936168800e+01 3.53477799334819473e+02 -3.39934647525677839e+02 1.28242232396214979e+02 \n5.41943888050644729e+00 -1.15306079903654802e+01 1.99204973121581165e+01 -3.05492827703648465e+01 3.98993341047450887e+01 -4.07359919253142562e+01 2.46377953918093181e+01 9.85383193647871921e+00 -4.65090007289552153e+01 5.27861225448762677e+01 -9.46087729848090984e+00 -5.11452302195735650e+01 6.57859844721557671e+01 -2.82271627367027319e+01 \n1.53036531818478049e+01 -2.73095055895700108e+01 3.63536814692726586e+01 -4.19981316346168749e+01 4.00066059379411147e+01 -2.47678576543402790e+01 -6.10361500288671090e+00 4.44274859701261710e+01 -6.71634958896126552e+01 4.71629337595217282e+01 1.64701204486206324e+01 -7.68130820522777202e+01 7.74490895367814566e+01 -2.99853023369489398e+01 \n-3.84409965738608322e-01 8.53197057807863166e-01 -1.55006616587192350e+00 2.48312212664031950e+00 -3.37472065400370548e+00 3.60656877794537798e+00 -2.38863188690078815e+00 -5.54060882886298230e-01 3.93972939916108911e+00 -4.81767879025161832e+00 1.12317832611778517e+00 4.49448322432648355e+00 -6.06820846101732138e+00 2.66216628653703734e+00 \n15\n5.94611182112653465e+00 3.74076136838420174e+01 1.04721086600893584e+02 1.88068575052945938e+02 2.47230164444100825e+02 2.38731254086661978e+02 1.40564601546720180e+02 -2.35413208274437697e+01 -1.77398826821603729e+02 -2.23344961183785693e+02 -1.13329812705746005e+02 8.49073984809609225e+01 2.14303929937386978e+02 1.78597840444728431e+02 6.03245510345062328e+01 \n-6.91089580727063361e+00 -5.11830618200020391e+01 -1.46582411957170283e+02 -2.62292792902226555e+02 -3.39989500376825129e+02 -3.21722244111317322e+02 -1.85917690686473842e+02 2.42977609905382286e+01 2.05000787207354148e+02 2.45439909071975760e+02 1.14751921152047418e+02 -8.82967308811627896e+01 -2.01532457918608318e+02 -1.56748184289519047e+02 -4.99159943629457360e+01 \n9.81441244916085127e+01 2.09815776226078267e+02 3.48315598105263025e+02 4.83444691647377697e+02 5.43859183745663490e+02 4.58743230501560728e+02 2.06649430940065203e+02 -1.42739144309080324e+02 -4.27285685402801328e+02 -4.65174579005904129e+02 -1.94296866260591442e+02 2.18727817571231757e+02 4.59536392846926676e+02 3.64523621383973736e+02 1.19859192049980458e+02 \n-1.14733065897317409e+02 -2.20137009414827052e+02 -3.18317483850960144e+02 -3.85242314811072444e+02 -3.71249671296194232e+02 -2.44782412576405365e+02 -3.02730079028043314e+01 1.80803184198452579e+02 2.70988853628923490e+02 1.84169939435032063e+02 -6.36888809372252396e+00 -1.42262592155611211e+02 -1.34337510536935402e+02 -5.17623667410862193e+01 -4.45107076873234224e+00 \n2.15481060792984387e+02 3.79790029033047081e+02 4.88339097817172296e+02 5.28516039565302487e+02 4.57664827525144310e+02 2.52586561629309060e+02 -5.16268334674748415e+01 -3.46618816446598250e+02 -4.84748377272267219e+02 -3.67237831632864109e+02 -4.14293087615935910e+01 2.87932622330053031e+02 4.00797754937720507e+02 2.67956866619261463e+02 7.86024232900275058e+01 \n-1.21578338082946942e+02 -1.88246603861223069e+02 -1.78839773153820250e+02 -8.86952628689763992e+01 7.68349970921171903e+01 2.68348793152690903e+02 3.85483453827952122e+02 3.20511543941046010e+02 5.49950058467361798e+01 -2.56354801233695904e+02 -3.45266439163389514e+02 -8.83743365757713575e+01 2.71426385105907024e+02 3.48711415733371814e+02 1.43304701014122569e+02 \n7.21313964924740793e+01 9.81916350951208570e+01 5.78154638215313984e+01 -4.68428864929126364e+01 -1.95569434597799589e+02 -3.32829276013070117e+02 -3.75062940148401770e+02 -2.55405904129513402e+02 4.41766540416821597e+00 2.53804865171665768e+02 2.90622159001877274e+02 6.06723646828710307e+01 -2.18161850607893871e+02 -2.64649902950292858e+02 -1.05455595570888760e+02 \n6.54482707765490206e+01 1.42108709184622492e+02 2.49710759531761865e+02 3.85492179272988695e+02 5.07579297873113161e+02 5.40479957449523227e+02 4.03574575862321634e+02 7.52726614265574622e+01 -3.32676094867213490e+02 -5.70134731612660731e+02 -4.03208397139304928e+02 1.15052182911666393e+02 5.59437646143929858e+02 5.34276605293714652e+02 1.94792630016966996e+02 \n-1.95015659319193855e+02 -3.50614534607760754e+02 -4.74059306696720985e+02 -5.64314257371785469e+02 -5.76176712192350015e+02 -4.48728673122200502e+02 -1.46989893951418487e+02 2.77738527820151786e+02 6.46124921676110813e+02 7.00724274230878377e+02 2.96302438381086623e+02 -3.71464114518555104e+02 -7.99428484937761447e+02 -6.56171140430612552e+02 -2.22244005900912757e+02 \n3.48072257589236196e+00 -1.40569433338618965e+01 -6.87443736506776660e+01 -1.63267741987830831e+02 -2.80861644693490260e+02 -3.73516222778288143e+02 -3.64303708548087528e+02 -1.86747584132066897e+02 1.33849374710335802e+02 4.15009941789654034e+02 3.93582216468349744e+02 -2.11937545340129894e+00 -4.41686649050857562e+02 -4.85781699566654337e+02 -1.90072507645713384e+02 \n8.79787005085353465e+01 1.66059021145461432e+02 2.44121811461300687e+02 3.23314136527090914e+02 3.76581261810393880e+02 3.55963150721915836e+02 2.12218296280238243e+02 -5.98933824141206408e+01 -3.65869286954363271e+02 -5.06238648554688655e+02 -3.00637945863056625e+02 1.86232706426752789e+02 5.73378588922481338e+02 5.19651866328549565e+02 1.86130624693573466e+02 \n-5.30067464270954653e+00 -4.29212652821632305e+00 7.16223923453719430e+00 3.01922133384281720e+01 6.21044526821453847e+01 9.20813021666142189e+01 9.95650895142313166e+01 6.23110934605411758e+01 -2.10030271623267391e+01 -1.05984763447472648e+02 -1.14289092550509583e+02 -1.08257015820781219e+01 1.19076048171581557e+02 1.40243298168833792e+02 5.66845092866426832e+01 \n-1.93705177839281054e+01 -3.76477194289975808e+01 -5.79564253435815373e+01 -8.09015946640996083e+01 -9.98342116361785918e+01 -1.01509109972265800e+02 -7.00394223585989644e+01 1.02886641502515174e+00 9.05560542000453504e+01 1.42330122935076197e+02 9.60337782506330310e+01 -4.19735521909454862e+01 -1.62997487081946455e+02 -1.55242394865486075e+02 -5.71472609152622670e+01 \n9.28432249889338392e-01 1.03166074905681799e+00 -1.91330537776926534e-01 -2.90555143043369621e+00 -6.89439074985325795e+00 -1.09625912759967511e+01 -1.25846985374611155e+01 -8.69477246168330276e+00 1.50545191787382465e+00 1.29061965795982708e+01 1.51205166580953943e+01 2.33910269906949025e+00 -1.51151425241446550e+01 -1.86617294642057797e+01 -7.71259142315831050e+00 \n2.53326515406979666e+00 5.02060366734745447e+00 7.95679404982665995e+00 1.14573445903399296e+01 1.46014828007103104e+01 1.54289743823348155e+01 1.14025654920830464e+01 1.14100287948712145e+00 -1.26679531301007740e+01 -2.15875013947764606e+01 -1.56370873402232123e+01 5.41191133143751005e+00 2.50122270754501357e+01 2.45892070382151261e+01 9.21206010654524907e+00 \n0.00000000000000000e+00 -3.36193562409757868e+01 0.00000000000000000e+00 -3.16753146595280644e+02 0.00000000000000000e+00 -4.29372281322847104e+02 0.00000000000000000e+00 1.66144370784636478e+01 0.00000000000000000e+00 2.79370250073377209e+02 0.00000000000000000e+00 -1.46309113389740520e+02 0.00000000000000000e+00 3.50316780919156081e+01 0.00000000000000000e+00 \n1.38217916145412672e+01 0.00000000000000000e+00 -3.14320966507044682e+02 0.00000000000000000e+00 -8.14506407552588937e+02 0.00000000000000000e+00 -3.36058353399002452e+02 0.00000000000000000e+00 7.69176281717618662e+02 0.00000000000000000e+00 -3.32816205101540863e+02 0.00000000000000000e+00 6.90896382371253178e+01 0.00000000000000000e+00 -8.10182371182599580e+00 \n0.00000000000000000e+00 2.60330887883167279e+02 0.00000000000000000e+00 -5.28913815911734709e+02 0.00000000000000000e+00 -1.17044555065004194e+03 0.00000000000000000e+00 -2.22880404896800181e+02 0.00000000000000000e+00 8.53256670360506677e+02 0.00000000000000000e+00 -4.02060418585595182e+02 0.00000000000000000e+00 9.21304509153954279e+01 0.00000000000000000e+00 \n2.29466131794634818e+02 0.00000000000000000e+00 3.04898297672173836e+02 0.00000000000000000e+00 -1.07946627242144753e+03 0.00000000000000000e+00 -9.30521443342843122e+02 0.00000000000000000e+00 1.15687737659545636e+03 0.00000000000000000e+00 -4.31635794905570905e+02 0.00000000000000000e+00 8.26012777713438779e+01 0.00000000000000000e+00 -9.18680148945645955e+00 \n0.00000000000000000e+00 7.33316523383053636e+02 0.00000000000000000e+00 7.75658212289819176e+02 0.00000000000000000e+00 -1.67181748211885316e+03 0.00000000000000000e+00 -1.18582392775076495e+03 0.00000000000000000e+00 1.57120164474932522e+03 0.00000000000000000e+00 -6.23488312227098378e+02 0.00000000000000000e+00 1.31566010226067883e+02 0.00000000000000000e+00 \n2.43156676165893884e+02 0.00000000000000000e+00 7.03664841908203379e+02 0.00000000000000000e+00 1.06668480791487387e+03 0.00000000000000000e+00 -1.54045441228583265e+03 0.00000000000000000e+00 4.65573767298108204e+02 0.00000000000000000e+00 -2.30630955089598208e+01 0.00000000000000000e+00 -1.19380882471743430e+01 0.00000000000000000e+00 2.55335210957947256e+00 \n0.00000000000000000e+00 3.03357703993200734e+02 0.00000000000000000e+00 8.59473771859564442e+02 0.00000000000000000e+00 1.44736671327498826e+03 0.00000000000000000e+00 -2.35821293190362607e+03 0.00000000000000000e+00 1.12264859779131161e+03 0.00000000000000000e+00 -2.73643822948148537e+02 0.00000000000000000e+00 4.05160848213946806e+01 0.00000000000000000e+00 \n-1.30896541553098041e+02 0.00000000000000000e+00 -5.40442525653388587e+01 0.00000000000000000e+00 8.51408191015301666e+02 0.00000000000000000e+00 2.35196866285926336e+03 0.00000000000000000e+00 -2.55458641191637739e+03 0.00000000000000000e+00 9.79287929801175395e+02 0.00000000000000000e+00 -1.94709836435045557e+02 0.00000000000000000e+00 2.24103275672961929e+01 \n0.00000000000000000e+00 -6.49879051634025562e+02 0.00000000000000000e+00 -6.57678512938479955e+02 0.00000000000000000e+00 5.79619791422815309e+02 0.00000000000000000e+00 3.18085743950470619e+03 0.00000000000000000e+00 -2.93172173515110086e+03 0.00000000000000000e+00 1.09238681975203166e+03 0.00000000000000000e+00 -2.26422190594490516e+02 0.00000000000000000e+00 \n-6.96144515178472391e+00 0.00000000000000000e+00 -1.73678069907320534e+02 0.00000000000000000e+00 -6.98644531704815331e+02 0.00000000000000000e+00 -1.00508676493907184e+03 0.00000000000000000e+00 1.40288379218733118e+03 0.00000000000000000e+00 -5.84112104835584516e+02 0.00000000000000000e+00 1.21553790955448442e+02 0.00000000000000000e+00 -1.44031512879367822e+01 \n0.00000000000000000e+00 2.77416274767753304e+02 0.00000000000000000e+00 1.52657033471777260e+02 0.00000000000000000e+00 -6.01690386314133078e+02 0.00000000000000000e+00 -1.39076590670065033e+03 0.00000000000000000e+00 1.51427292058224590e+03 0.00000000000000000e+00 -6.00091063362614988e+02 0.00000000000000000e+00 1.28712173602364916e+02 0.00000000000000000e+00 \n1.06013492854190931e+01 0.00000000000000000e+00 6.14142092090335732e+01 0.00000000000000000e+00 1.80666222766073134e+02 0.00000000000000000e+00 2.04163086063692232e+02 0.00000000000000000e+00 -3.25738626338577415e+02 0.00000000000000000e+00 1.40815070961716297e+02 0.00000000000000000e+00 -2.98984892246417054e+01 0.00000000000000000e+00 3.58800882158736968e+00 \n0.00000000000000000e+00 -5.89074450247247356e+01 0.00000000000000000e+00 -1.42068794629403321e+01 0.00000000000000000e+00 1.77478199594375741e+02 0.00000000000000000e+00 3.14466015733952418e+02 0.00000000000000000e+00 -3.73070781602796844e+02 0.00000000000000000e+00 1.52155777309293560e+02 0.00000000000000000e+00 -3.31496799240277481e+01 0.00000000000000000e+00 \n-1.85686449977867678e+00 0.00000000000000000e+00 -8.54737080338203333e+00 0.00000000000000000e+00 -2.21039326779711190e+01 0.00000000000000000e+00 -2.19200804284569239e+01 0.00000000000000000e+00 3.80449765272127048e+01 0.00000000000000000e+00 -1.68110388785747265e+01 0.00000000000000000e+00 3.61138687191122991e+00 0.00000000000000000e+00 -4.36617747802272520e-01 \n0.00000000000000000e+00 7.50976848887584176e+00 0.00000000000000000e+00 1.36640202129316367e-01 0.00000000000000000e+00 -2.72192128669464961e+01 0.00000000000000000e+00 -4.24861716522027918e+01 0.00000000000000000e+00 5.29652329409854102e+01 0.00000000000000000e+00 -2.19484075316988365e+01 0.00000000000000000e+00 4.82332492633214761e+00 0.00000000000000000e+00 \n-5.94611182112653465e+00 3.74076136838420174e+01 -1.04721086600893584e+02 1.88068575052945938e+02 -2.47230164444100825e+02 2.38731254086661978e+02 -1.40564601546720180e+02 -2.35413208274437697e+01 1.77398826821603729e+02 -2.23344961183785693e+02 1.13329812705746005e+02 8.49073984809609225e+01 -2.14303929937386978e+02 1.78597840444728431e+02 -6.03245510345062328e+01 \n-6.91089580727063361e+00 5.11830618200020391e+01 -1.46582411957170283e+02 2.62292792902226555e+02 -3.39989500376825129e+02 3.21722244111317322e+02 -1.85917690686473842e+02 -2.42977609905382286e+01 2.05000787207354148e+02 -2.45439909071975760e+02 1.14751921152047418e+02 8.82967308811627896e+01 -2.01532457918608318e+02 1.56748184289519047e+02 -4.99159943629457360e+01 \n-9.81441244916085127e+01 2.09815776226078267e+02 -3.48315598105263025e+02 4.83444691647377697e+02 -5.43859183745663490e+02 4.58743230501560728e+02 -2.06649430940065203e+02 -1.42739144309080324e+02 4.27285685402801328e+02 -4.65174579005904129e+02 1.94296866260591442e+02 2.18727817571231757e+02 -4.59536392846926676e+02 3.64523621383973736e+02 -1.19859192049980458e+02 \n-1.14733065897317409e+02 2.20137009414827052e+02 -3.18317483850960144e+02 3.85242314811072444e+02 -3.71249671296194232e+02 2.44782412576405365e+02 -3.02730079028043314e+01 -1.80803184198452579e+02 2.70988853628923490e+02 -1.84169939435032063e+02 -6.36888809372252396e+00 1.42262592155611211e+02 -1.34337510536935402e+02 5.17623667410862193e+01 -4.45107076873234224e+00 \n-2.15481060792984387e+02 3.79790029033047081e+02 -4.88339097817172296e+02 5.28516039565302487e+02 -4.57664827525144310e+02 2.52586561629309060e+02 5.16268334674748415e+01 -3.46618816446598250e+02 4.84748377272267219e+02 -3.67237831632864109e+02 4.14293087615935910e+01 2.87932622330053031e+02 -4.00797754937720507e+02 2.67956866619261463e+02 -7.86024232900275058e+01 \n-1.21578338082946942e+02 1.88246603861223069e+02 -1.78839773153820250e+02 8.86952628689763992e+01 7.68349970921171903e+01 -2.68348793152690903e+02 3.85483453827952122e+02 -3.20511543941046010e+02 5.49950058467361798e+01 2.56354801233695904e+02 -3.45266439163389514e+02 8.83743365757713575e+01 2.71426385105907024e+02 -3.48711415733371814e+02 1.43304701014122569e+02 \n-7.21313964924740793e+01 9.81916350951208570e+01 -5.78154638215313984e+01 -4.68428864929126364e+01 1.95569434597799589e+02 -3.32829276013070117e+02 3.75062940148401770e+02 -2.55405904129513402e+02 -4.41766540416821597e+00 2.53804865171665768e+02 -2.90622159001877274e+02 6.06723646828710307e+01 2.18161850607893871e+02 -2.64649902950292858e+02 1.05455595570888760e+02 \n6.54482707765490206e+01 -1.42108709184622492e+02 2.49710759531761865e+02 -3.85492179272988695e+02 5.07579297873113161e+02 -5.40479957449523227e+02 4.03574575862321634e+02 -7.52726614265574622e+01 -3.32676094867213490e+02 5.70134731612660731e+02 -4.03208397139304928e+02 -1.15052182911666393e+02 5.59437646143929858e+02 -5.34276605293714652e+02 1.94792630016966996e+02 \n1.95015659319193855e+02 -3.50614534607760754e+02 4.74059306696720985e+02 -5.64314257371785469e+02 5.76176712192350015e+02 -4.48728673122200502e+02 1.46989893951418487e+02 2.77738527820151786e+02 -6.46124921676110813e+02 7.00724274230878377e+02 -2.96302438381086623e+02 -3.71464114518555104e+02 7.99428484937761447e+02 -6.56171140430612552e+02 2.22244005900912757e+02 \n3.48072257589236196e+00 1.40569433338618965e+01 -6.87443736506776660e+01 1.63267741987830831e+02 -2.80861644693490260e+02 3.73516222778288143e+02 -3.64303708548087528e+02 1.86747584132066897e+02 1.33849374710335802e+02 -4.15009941789654034e+02 3.93582216468349744e+02 2.11937545340129894e+00 -4.41686649050857562e+02 4.85781699566654337e+02 -1.90072507645713384e+02 \n-8.79787005085353465e+01 1.66059021145461432e+02 -2.44121811461300687e+02 3.23314136527090914e+02 -3.76581261810393880e+02 3.55963150721915836e+02 -2.12218296280238243e+02 -5.98933824141206408e+01 3.65869286954363271e+02 -5.06238648554688655e+02 3.00637945863056625e+02 1.86232706426752789e+02 -5.73378588922481338e+02 5.19651866328549565e+02 -1.86130624693573466e+02 \n-5.30067464270954653e+00 4.29212652821632305e+00 7.16223923453719430e+00 -3.01922133384281720e+01 6.21044526821453847e+01 -9.20813021666142189e+01 9.95650895142313166e+01 -6.23110934605411758e+01 -2.10030271623267391e+01 1.05984763447472648e+02 -1.14289092550509583e+02 1.08257015820781219e+01 1.19076048171581557e+02 -1.40243298168833792e+02 5.66845092866426832e+01 \n1.93705177839281054e+01 -3.76477194289975808e+01 5.79564253435815373e+01 -8.09015946640996083e+01 9.98342116361785918e+01 -1.01509109972265800e+02 7.00394223585989644e+01 1.02886641502515174e+00 -9.05560542000453504e+01 1.42330122935076197e+02 -9.60337782506330310e+01 -4.19735521909454862e+01 1.62997487081946455e+02 -1.55242394865486075e+02 5.71472609152622670e+01 \n9.28432249889338392e-01 -1.03166074905681799e+00 -1.91330537776926534e-01 2.90555143043369621e+00 -6.89439074985325795e+00 1.09625912759967511e+01 -1.25846985374611155e+01 8.69477246168330276e+00 1.50545191787382465e+00 -1.29061965795982708e+01 1.51205166580953943e+01 -2.33910269906949025e+00 -1.51151425241446550e+01 1.86617294642057797e+01 -7.71259142315831050e+00 \n-2.53326515406979666e+00 5.02060366734745447e+00 -7.95679404982665995e+00 1.14573445903399296e+01 -1.46014828007103104e+01 1.54289743823348155e+01 -1.14025654920830464e+01 1.14100287948712145e+00 1.26679531301007740e+01 -2.15875013947764606e+01 1.56370873402232123e+01 5.41191133143751005e+00 -2.50122270754501357e+01 2.45892070382151261e+01 -9.21206010654524907e+00 \n16\n-7.80514644338633510e+00 1.59792363333546676e+01 8.38123385762553303e+01 1.76675561029692851e+02 2.56014332687127526e+02 2.77637077230094084e+02 2.12721275423298036e+02 6.92357944938523866e+01 -9.84132990502444062e+01 -2.05786197684803937e+02 -1.85681539096492996e+02 -4.51214412643215530e+01 1.18672644383413280e+02 1.86249316949151650e+02 1.29492829536616606e+02 3.85248771187340432e+01 \n1.42766825761962106e+00 -3.61060561120980604e+01 -1.25851226641786163e+02 -2.36718510265628950e+02 -3.12180023605521578e+02 -2.97610177741653490e+02 -1.75203011569589054e+02 1.07430033023710213e+01 1.62755286642723358e+02 1.87751921396102935e+02 7.77543825395095676e+01 -6.22715999991225602e+01 -1.04294597932058818e+02 -3.86496103561152998e+01 2.33401874942289812e+01 1.87735781043867759e+01 \n7.07170678747227391e+01 1.66444101099721698e+02 3.04156313246636472e+02 4.54990575676146169e+02 5.51134614770876963e+02 5.21507997320616465e+02 3.33640453741670038e+02 2.94286210383867870e+01 -2.69945440680303449e+02 -4.12189284954924187e+02 -3.09446923962671405e+02 -2.39827586214472002e+01 2.46923850264643111e+02 3.21890925339593633e+02 2.02991148532902732e+02 5.61063315061288687e+01 \n-1.28583463513489588e+02 -2.42231555810536253e+02 -3.41174532047505983e+02 -4.00320684339808318e+02 -3.67707006476077599e+02 -2.12003990636149602e+02 3.47393183831001448e+01 2.62174969369674982e+02 3.27405232568097828e+02 1.64665433373065371e+02 -1.12610081763829304e+02 -2.53695404344774428e+02 -1.10556635061612944e+02 1.50130001400057717e+02 2.23893485722502089e+02 9.36327870078144875e+01 \n1.97756594154434173e+02 3.49723256678521113e+02 4.51886993405069315e+02 4.91670265668276428e+02 4.29384290033204951e+02 2.45422393985533843e+02 -2.39705256492352278e+01 -2.76689178693143228e+02 -3.83635812635167918e+02 -2.75350881722914554e+02 -2.25407107895022274e+01 1.84073538290644883e+02 1.93456608323440703e+02 5.62500819735677688e+01 -4.13858337468105295e+01 -2.91741139557410717e+01 \n-1.88054875780124032e+02 -3.00119842074338667e+02 -3.11430737569310787e+02 -2.15236903209848005e+02 -4.51095458838160704e+00 2.81588489197771220e+02 5.33538485122582022e+02 5.94214595721316741e+02 3.52371592892323204e+02 -1.22175775875428379e+02 -5.22783766162384410e+02 -4.86522289922220830e+02 2.01235929096096732e+01 5.28296752016876745e+02 5.42667638609095235e+02 2.00133291746700452e+02 \n9.97262715415116299e+01 1.37515705016390261e+02 8.55029943925829293e+01 -5.72375233527033724e+01 -2.72563919517550430e+02 -4.96677051709301917e+02 -6.17422134262626990e+02 -5.15352758630923233e+02 -1.54576900847552613e+02 3.21935943878497464e+02 6.01729497318449577e+02 4.14323014458025138e+02 -1.51786519267143571e+02 -6.04995033115060492e+02 -5.47793603340005593e+02 -1.90569167214169097e+02 \n-3.41780194659023253e+00 2.42517162581702742e+01 1.04648389509358066e+02 2.36165026045977694e+02 3.90198852348537666e+02 5.05671070894611358e+02 5.01660061167888334e+02 3.19221170203210497e+02 -1.61691351159494172e+01 -3.55120267559392498e+02 -4.75508739995552690e+02 -2.50456782330797310e+02 1.78563926611736245e+02 4.57377501211443681e+02 3.75426424157543566e+02 1.23557179067740291e+02 \n-1.36777985937153852e+02 -2.60246583341212959e+02 -3.86984160988101495e+02 -5.19457810996810632e+02 -6.19315593865084055e+02 -6.21806046984397174e+02 -4.61519557607804587e+02 -1.21091573868404295e+02 3.13104753991967175e+02 6.36672635522843316e+02 6.15861529643398444e+02 1.82485685541961575e+02 -4.09434192573269444e+02 -7.13402055522886216e+02 -5.31879615528031419e+02 -1.67180097876428837e+02 \n9.57393026627489268e+01 1.41688334924628473e+02 1.17178526793147036e+02 1.69120394379028942e+01 -1.59546520417665002e+02 -3.79197668017781470e+02 -5.54574330634099298e+02 -5.54333142517692685e+02 -2.78505458174699518e+02 2.09699816361461911e+02 6.06504217347746740e+02 5.29941754439755733e+02 -6.32198194741077063e+01 -6.50536416040091961e+02 -6.58320285678898245e+02 -2.43027598916601303e+02 \n3.41947164693083954e+01 8.56678796839469704e+01 1.75596283243534524e+02 3.09563384503132312e+02 4.65732507293949287e+02 5.86867287374746940e+02 5.83230559904537789e+02 3.68980208886823016e+02 -5.82285750910170018e+01 -5.31654112916231463e+02 -7.30094771016204303e+02 -3.99228171990470514e+02 3.14026510769219788e+02 8.28779968894501944e+02 7.07889695177115086e+02 2.41079965535898750e+02 \n-3.97596367666463560e+01 -6.20950894457095973e+01 -6.08390601823003627e+01 -3.37168255411242546e+01 2.28742001115155479e+01 1.02942326695663965e+02 1.80237667536905674e+02 2.05857504944898855e+02 1.30391791396040626e+02 -4.31306507682112179e+01 -2.11674813612264944e+02 -2.14277845194099794e+02 -5.65156753168685359e-01 2.40547338843676708e+02 2.61086541799508231e+02 9.97464753126095714e+01 \n-1.01519773231577927e+00 -1.08652571593218078e+01 -3.70997017119672719e+01 -8.20811353984395615e+01 -1.40684007991718916e+02 -1.95256590302712241e+02 -2.13471533393021896e+02 -1.57826783724571743e+02 -1.43174316266136402e+01 1.68344796086223134e+02 2.69553496039122883e+02 1.72152339634021108e+02 -9.43999404407698785e+01 -3.09409880064816708e+02 -2.78552019177257946e+02 -9.76825649989798328e+01 \n7.03874827254137141e+00 1.12195387186705840e+01 1.16256794164612392e+01 7.86346350259065138e+00 -9.39519822683584034e-01 -1.43051215288518752e+01 -2.84029150046796835e+01 -3.50581327078798839e+01 -2.48001005536504785e+01 3.97751224343740316e+00 3.49725509542118216e+01 3.87644510293947498e+01 2.72766520646465153e+00 -4.15367743413370494e+01 -4.72101485144945825e+01 -1.84446931099972761e+01 \n-8.14987045828487570e-01 2.51247323221492505e-01 4.60105095917715786e+00 1.27114741320504704e+01 2.38900088333299530e+01 3.51490512360993700e+01 4.04917120023389705e+01 3.22684188590994668e+01 6.43092704751710096e+00 -2.92685273217551412e+01 -5.17632084016136595e+01 -3.59636107120132868e+01 1.56732478685452132e+01 6.02086566834683833e+01 5.60397129475825582e+01 2.00204246307935098e+01 \n-6.12123538232616736e-01 -9.86164843273263314e-01 -1.05071875518584875e+00 -7.72529066505679576e-01 -6.53564039898958381e-02 1.05708898458613064e+00 2.30340171537790531e+00 2.99034150032855760e+00 2.25866910356409852e+00 -1.49492931148452172e-01 -2.92752233117523109e+00 -3.45441106030409107e+00 -3.96272411474600536e-01 3.59746714529724954e+00 4.22771664805759592e+00 1.67884011663592203e+00 \n0.00000000000000000e+00 -8.60341134685519435e+01 0.00000000000000000e+00 -4.25641201502408436e+02 0.00000000000000000e+00 -5.74358875568316159e+02 0.00000000000000000e+00 -1.01509679925589235e+00 0.00000000000000000e+00 5.24885275271446837e+02 0.00000000000000000e+00 -3.10277050277409500e+02 0.00000000000000000e+00 8.54596192837171640e+01 0.00000000000000000e+00 -1.39697978910435006e+01 \n-2.85533651523924211e+00 0.00000000000000000e+00 -3.45958522074246743e+02 0.00000000000000000e+00 -8.29595328045149194e+02 0.00000000000000000e+00 -2.93045150645870528e+02 0.00000000000000000e+00 8.38549429197895916e+02 0.00000000000000000e+00 -4.04494254370285585e+02 0.00000000000000000e+00 9.49125431399486716e+01 0.00000000000000000e+00 -1.29819156318647516e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.57054015885823120e+02 0.00000000000000000e+00 -7.34792831972859144e+02 0.00000000000000000e+00 -1.43137008103537935e+03 0.00000000000000000e+00 -2.37787204207010663e+02 0.00000000000000000e+00 1.30239452940719440e+03 0.00000000000000000e+00 -7.10309096149191573e+02 0.00000000000000000e+00 1.88479578302368623e+02 0.00000000000000000e+00 -3.01336973864989453e+01 \n2.57166927026979176e+02 0.00000000000000000e+00 3.79970320156854540e+02 0.00000000000000000e+00 -9.67339606840431607e+02 0.00000000000000000e+00 -8.89750760177091444e+02 0.00000000000000000e+00 9.73219314618934366e+02 0.00000000000000000e+00 -3.33057980500500806e+02 0.00000000000000000e+00 5.90440559660143139e+01 0.00000000000000000e+00 -6.18794715720928713e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 6.70651361071991486e+02 0.00000000000000000e+00 6.79041375318721486e+02 0.00000000000000000e+00 -1.74926853169274085e+03 0.00000000000000000e+00 -1.13002531097511503e+03 0.00000000000000000e+00 1.73015900939869906e+03 0.00000000000000000e+00 -7.61645068964664099e+02 0.00000000000000000e+00 1.80011825105471083e+02 0.00000000000000000e+00 -2.66984339049829375e+01 \n3.76109751560248065e+02 0.00000000000000000e+00 1.01946670319300046e+03 0.00000000000000000e+00 1.43277823010987341e+03 0.00000000000000000e+00 -1.56677799901284564e+03 0.00000000000000000e+00 -2.81895802372083688e+02 0.00000000000000000e+00 4.92065261229747550e+02 0.00000000000000000e+00 -1.63914508490747204e+02 0.00000000000000000e+00 2.72102996589074054e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 4.15892466604452933e+02 0.00000000000000000e+00 1.14376284498628927e+03 0.00000000000000000e+00 1.90321674045400367e+03 0.00000000000000000e+00 -2.20437637688431746e+03 0.00000000000000000e+00 3.90398141889512618e+02 0.00000000000000000e+00 1.67964647957971662e+02 0.00000000000000000e+00 -8.66123739896457862e+01 0.00000000000000000e+00 1.76545704689154761e+01 \n6.83560389318046507e+00 0.00000000000000000e+00 2.58118443555130750e+02 0.00000000000000000e+00 1.17266559003675987e+03 0.00000000000000000e+00 2.24954617959478793e+03 0.00000000000000000e+00 -3.28464511208057058e+03 0.00000000000000000e+00 1.52849908621268980e+03 0.00000000000000000e+00 -3.66009166345319290e+02 0.00000000000000000e+00 5.16160570563533395e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 -4.27132517317941569e+02 0.00000000000000000e+00 -1.89551279709391429e+02 0.00000000000000000e+00 1.21160862225207349e+03 0.00000000000000000e+00 3.26827268695738057e+03 0.00000000000000000e+00 -4.00212686349644330e+03 0.00000000000000000e+00 1.80417129917294620e+03 0.00000000000000000e+00 -4.45161513160223487e+02 0.00000000000000000e+00 6.87108276733291051e+01 \n-1.91478605325497854e+02 0.00000000000000000e+00 -6.08285873994513574e+02 0.00000000000000000e+00 -1.19267119018005081e+03 0.00000000000000000e+00 -9.49624300719641055e+02 0.00000000000000000e+00 2.43514034352295752e+03 0.00000000000000000e+00 -1.30922456800430165e+03 0.00000000000000000e+00 3.38633240784275181e+02 0.00000000000000000e+00 -5.01617699123924377e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 6.55721857331236385e+01 0.00000000000000000e+00 -3.34639648502558291e+02 0.00000000000000000e+00 -1.32366584750345338e+03 0.00000000000000000e+00 -1.57137436553856457e+03 0.00000000000000000e+00 2.70667612009896024e+03 0.00000000000000000e+00 -1.35447792946879663e+03 0.00000000000000000e+00 3.53518797814490947e+02 0.00000000000000000e+00 -5.65151433281996339e+01 \n7.95192735332927119e+01 0.00000000000000000e+00 2.26568137997682220e+02 0.00000000000000000e+00 3.76222319019991083e+02 0.00000000000000000e+00 1.97501665852424530e+02 0.00000000000000000e+00 -7.22293784617338076e+02 0.00000000000000000e+00 4.11496756171401760e+02 0.00000000000000000e+00 -1.09525637548901095e+02 0.00000000000000000e+00 1.65131955097925046e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.46970181102450621e+01 0.00000000000000000e+00 1.63858085147528966e+02 0.00000000000000000e+00 4.53688492416883075e+02 0.00000000000000000e+00 3.97854769365091892e+02 0.00000000000000000e+00 -8.25209669436729608e+02 0.00000000000000000e+00 4.31662872378430968e+02 0.00000000000000000e+00 -1.15241063736555942e+02 0.00000000000000000e+00 1.86795151533486045e+01 \n-1.40774965450827428e+01 0.00000000000000000e+00 -3.83084477617012606e+01 0.00000000000000000e+00 -5.86549550133110613e+01 0.00000000000000000e+00 -2.31156978970846863e+01 0.00000000000000000e+00 1.10528512510270532e+02 0.00000000000000000e+00 -6.50816519657830041e+01 0.00000000000000000e+00 1.76026539866800165e+01 0.00000000000000000e+00 -2.68037430509893608e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -6.14889052998460703e+00 0.00000000000000000e+00 -3.44445415381157876e+01 0.00000000000000000e+00 -8.29718730094254524e+01 0.00000000000000000e+00 -6.16672717399748876e+01 0.00000000000000000e+00 1.43812701112451853e+02 0.00000000000000000e+00 -7.71043842491816930e+01 0.00000000000000000e+00 2.08421231283451277e+01 0.00000000000000000e+00 -3.40410464408047630e+00 \n1.22424707646523347e+00 0.00000000000000000e+00 3.24883555731118276e+00 0.00000000000000000e+00 4.74500211001004422e+00 0.00000000000000000e+00 1.51132167162129090e+00 0.00000000000000000e+00 -8.89065016267996841e+00 0.00000000000000000e+00 5.34415625273157608e+00 0.00000000000000000e+00 -1.45996266236413521e+00 0.00000000000000000e+00 2.23692570452661167e-01 0.00000000000000000e+00 \n7.80514644338633510e+00 1.59792363333546676e+01 -8.38123385762553303e+01 1.76675561029692851e+02 -2.56014332687127526e+02 2.77637077230094084e+02 -2.12721275423298036e+02 6.92357944938523866e+01 9.84132990502444062e+01 -2.05786197684803937e+02 1.85681539096492996e+02 -4.51214412643215530e+01 -1.18672644383413280e+02 1.86249316949151650e+02 -1.29492829536616606e+02 3.85248771187340432e+01 \n1.42766825761962106e+00 3.61060561120980604e+01 -1.25851226641786163e+02 2.36718510265628950e+02 -3.12180023605521578e+02 2.97610177741653490e+02 -1.75203011569589054e+02 -1.07430033023710213e+01 1.62755286642723358e+02 -1.87751921396102935e+02 7.77543825395095676e+01 6.22715999991225602e+01 -1.04294597932058818e+02 3.86496103561152998e+01 2.33401874942289812e+01 -1.87735781043867759e+01 \n-7.07170678747227391e+01 1.66444101099721698e+02 -3.04156313246636472e+02 4.54990575676146169e+02 -5.51134614770876963e+02 5.21507997320616465e+02 -3.33640453741670038e+02 2.94286210383867870e+01 2.69945440680303449e+02 -4.12189284954924187e+02 3.09446923962671405e+02 -2.39827586214472002e+01 -2.46923850264643111e+02 3.21890925339593633e+02 -2.02991148532902732e+02 5.61063315061288687e+01 \n-1.28583463513489588e+02 2.42231555810536253e+02 -3.41174532047505983e+02 4.00320684339808318e+02 -3.67707006476077599e+02 2.12003990636149602e+02 3.47393183831001448e+01 -2.62174969369674982e+02 3.27405232568097828e+02 -1.64665433373065371e+02 -1.12610081763829304e+02 2.53695404344774428e+02 -1.10556635061612944e+02 -1.50130001400057717e+02 2.23893485722502089e+02 -9.36327870078144875e+01 \n-1.97756594154434173e+02 3.49723256678521113e+02 -4.51886993405069315e+02 4.91670265668276428e+02 -4.29384290033204951e+02 2.45422393985533843e+02 2.39705256492352278e+01 -2.76689178693143228e+02 3.83635812635167918e+02 -2.75350881722914554e+02 2.25407107895022274e+01 1.84073538290644883e+02 -1.93456608323440703e+02 5.62500819735677688e+01 4.13858337468105295e+01 -2.91741139557410717e+01 \n-1.88054875780124032e+02 3.00119842074338667e+02 -3.11430737569310787e+02 2.15236903209848005e+02 -4.51095458838160704e+00 -2.81588489197771220e+02 5.33538485122582022e+02 -5.94214595721316741e+02 3.52371592892323204e+02 1.22175775875428379e+02 -5.22783766162384410e+02 4.86522289922220830e+02 2.01235929096096732e+01 -5.28296752016876745e+02 5.42667638609095235e+02 -2.00133291746700452e+02 \n-9.97262715415116299e+01 1.37515705016390261e+02 -8.55029943925829293e+01 -5.72375233527033724e+01 2.72563919517550430e+02 -4.96677051709301917e+02 6.17422134262626990e+02 -5.15352758630923233e+02 1.54576900847552613e+02 3.21935943878497464e+02 -6.01729497318449577e+02 4.14323014458025138e+02 1.51786519267143571e+02 -6.04995033115060492e+02 5.47793603340005593e+02 -1.90569167214169097e+02 \n-3.41780194659023253e+00 -2.42517162581702742e+01 1.04648389509358066e+02 -2.36165026045977694e+02 3.90198852348537666e+02 -5.05671070894611358e+02 5.01660061167888334e+02 -3.19221170203210497e+02 -1.61691351159494172e+01 3.55120267559392498e+02 -4.75508739995552690e+02 2.50456782330797310e+02 1.78563926611736245e+02 -4.57377501211443681e+02 3.75426424157543566e+02 -1.23557179067740291e+02 \n1.36777985937153852e+02 -2.60246583341212959e+02 3.86984160988101495e+02 -5.19457810996810632e+02 6.19315593865084055e+02 -6.21806046984397174e+02 4.61519557607804587e+02 -1.21091573868404295e+02 -3.13104753991967175e+02 6.36672635522843316e+02 -6.15861529643398444e+02 1.82485685541961575e+02 4.09434192573269444e+02 -7.13402055522886216e+02 5.31879615528031419e+02 -1.67180097876428837e+02 \n9.57393026627489268e+01 -1.41688334924628473e+02 1.17178526793147036e+02 -1.69120394379028942e+01 -1.59546520417665002e+02 3.79197668017781470e+02 -5.54574330634099298e+02 5.54333142517692685e+02 -2.78505458174699518e+02 -2.09699816361461911e+02 6.06504217347746740e+02 -5.29941754439755733e+02 -6.32198194741077063e+01 6.50536416040091961e+02 -6.58320285678898245e+02 2.43027598916601303e+02 \n-3.41947164693083954e+01 8.56678796839469704e+01 -1.75596283243534524e+02 3.09563384503132312e+02 -4.65732507293949287e+02 5.86867287374746940e+02 -5.83230559904537789e+02 3.68980208886823016e+02 5.82285750910170018e+01 -5.31654112916231463e+02 7.30094771016204303e+02 -3.99228171990470514e+02 -3.14026510769219788e+02 8.28779968894501944e+02 -7.07889695177115086e+02 2.41079965535898750e+02 \n-3.97596367666463560e+01 6.20950894457095973e+01 -6.08390601823003627e+01 3.37168255411242546e+01 2.28742001115155479e+01 -1.02942326695663965e+02 1.80237667536905674e+02 -2.05857504944898855e+02 1.30391791396040626e+02 4.31306507682112179e+01 -2.11674813612264944e+02 2.14277845194099794e+02 -5.65156753168685359e-01 -2.40547338843676708e+02 2.61086541799508231e+02 -9.97464753126095714e+01 \n1.01519773231577927e+00 -1.08652571593218078e+01 3.70997017119672719e+01 -8.20811353984395615e+01 1.40684007991718916e+02 -1.95256590302712241e+02 2.13471533393021896e+02 -1.57826783724571743e+02 1.43174316266136402e+01 1.68344796086223134e+02 -2.69553496039122883e+02 1.72152339634021108e+02 9.43999404407698785e+01 -3.09409880064816708e+02 2.78552019177257946e+02 -9.76825649989798328e+01 \n7.03874827254137141e+00 -1.12195387186705840e+01 1.16256794164612392e+01 -7.86346350259065138e+00 -9.39519822683584034e-01 1.43051215288518752e+01 -2.84029150046796835e+01 3.50581327078798839e+01 -2.48001005536504785e+01 -3.97751224343740316e+00 3.49725509542118216e+01 -3.87644510293947498e+01 2.72766520646465153e+00 4.15367743413370494e+01 -4.72101485144945825e+01 1.84446931099972761e+01 \n8.14987045828487570e-01 2.51247323221492505e-01 -4.60105095917715786e+00 1.27114741320504704e+01 -2.38900088333299530e+01 3.51490512360993700e+01 -4.04917120023389705e+01 3.22684188590994668e+01 -6.43092704751710096e+00 -2.92685273217551412e+01 5.17632084016136595e+01 -3.59636107120132868e+01 -1.56732478685452132e+01 6.02086566834683833e+01 -5.60397129475825582e+01 2.00204246307935098e+01 \n-6.12123538232616736e-01 9.86164843273263314e-01 -1.05071875518584875e+00 7.72529066505679576e-01 -6.53564039898958381e-02 -1.05708898458613064e+00 2.30340171537790531e+00 -2.99034150032855760e+00 2.25866910356409852e+00 1.49492931148452172e-01 -2.92752233117523109e+00 3.45441106030409107e+00 -3.96272411474600536e-01 -3.59746714529724954e+00 4.22771664805759592e+00 -1.67884011663592203e+00 \n17\n-1.83105031696065457e+01 -2.32501245298738050e+00 6.02920120117705455e+01 1.50207099018433412e+02 2.30457973092134611e+02 2.59304090752920796e+02 2.09953984584773256e+02 8.95921872945306491e+01 -5.40027243395288945e+01 -1.50011080572742617e+02 -1.46693547651935685e+02 -5.46260562043323275e+01 5.13226038356207403e+01 9.25874169133583686e+01 6.10814811244783493e+01 1.57371248160213052e+01 -6.26750285732414036e-01 \n-1.87147513770571105e+01 -7.13607982932958968e+01 -1.71339713986018713e+02 -2.87587393178942936e+02 -3.59470671018694753e+02 -3.26650107190641956e+02 -1.67981932847102364e+02 6.61487455876574266e+01 2.55844949892988330e+02 2.72756422449915502e+02 8.75919755802137387e+01 -1.58082023823104657e+02 -2.33032047447667269e+02 -5.16858660264720204e+01 1.85378669793543049e+02 2.18607496864053699e+02 8.31024413012257916e+01 \n5.98697243598962736e+01 1.46738288867005898e+02 2.76713603263813751e+02 4.20180917605311000e+02 5.11024864343314214e+02 4.81842238474037425e+02 3.05255094893849978e+02 2.73574578523843442e+01 -2.32363869990573054e+02 -3.35678237942156543e+02 -2.23085906391485929e+02 1.35672576807619787e+01 1.78035381540746612e+02 1.46623150630893335e+02 4.29493473746403869e+00 -6.73670339281141513e+01 -3.36582337036826763e+01 \n-1.77700608824348549e+02 -3.29398245067534279e+02 -4.56796862378445004e+02 -5.35514061169018788e+02 -5.03521151618415675e+02 -3.13868553712079234e+02 1.40203242201062671e+01 3.62534297453312133e+02 5.41924887275628497e+02 4.00334497179893591e+02 -1.99277003232554040e+01 -4.18188466651141032e+02 -4.26069280184092440e+02 2.35992045964768414e+00 4.38303392627203388e+02 4.46421818371030281e+02 1.60609007251811731e+02 \n2.24857371742386639e+02 3.93651868704592008e+02 4.99669054572666224e+02 5.29404318601447514e+02 4.39283236569400134e+02 2.08069641500887555e+02 -1.20986716089674286e+02 -4.23312231810710451e+02 -5.31741837170878637e+02 -3.41796898573924321e+02 6.49763451207122243e+01 4.01315709359601011e+02 3.69077831071778394e+02 -2.26851299776288036e+01 -3.85848967614308677e+02 -3.75973355178066541e+02 -1.32016424765403442e+02 \n-2.63582381929937617e+02 -4.35683937313220916e+02 -4.95213536497960243e+02 -4.37335016805946980e+02 -2.39471374283000613e+02 8.53843820867074931e+01 4.52826479800809779e+02 7.04191918740990253e+02 6.66151231401387645e+02 2.76062849553778720e+02 -2.93034150271489595e+02 -6.51268660253858742e+02 -4.66288265560829309e+02 1.54349692343027558e+02 6.42460044917769166e+02 5.70674081411072777e+02 1.92926461578740134e+02 \n1.87970462799902163e+02 2.85609387108902740e+02 2.60896822925081898e+02 1.12567540569798995e+02 -1.54211808812659553e+02 -4.88125303336079183e+02 -7.72982318709264241e+02 -8.47590695095115153e+02 -5.84466101386406071e+02 -1.27312061022015325e+01 5.97382066751798657e+02 8.23634877381538993e+02 4.14502125332117603e+02 -3.69833131991184863e+02 -8.64637806873455153e+02 -6.90317499387763591e+02 -2.21495993709140453e+02 \n-2.85749327871057253e+01 -2.24598090552794928e+01 3.73291212385215944e+01 1.47712796552070713e+02 2.85355294374028556e+02 4.00108414469983584e+02 4.25258783223746070e+02 3.11147735735803458e+02 7.25608510518497423e+01 -1.85668909566849436e+02 -3.10940530242111213e+02 -2.17683183807785225e+02 1.35207242689481463e+01 1.85945508540626730e+02 1.83024121398158538e+02 8.12488737573282326e+01 1.31866438360843522e+01 \n-7.53686708265286298e+01 -1.55055420727537529e+02 -2.56573568757605666e+02 -3.81500804781653824e+02 -5.00656980629684983e+02 -5.61006865247335527e+02 -5.02233858560356892e+02 -2.91117081722714399e+02 3.61582523216352559e+01 3.54413694012010269e+02 4.91811671347765098e+02 3.42493185758781251e+02 -1.84310619012641730e+01 -3.45973450422863287e+02 -4.19089379234188618e+02 -2.54558189286155110e+02 -6.80483643703825532e+01 \n2.02466548472558481e+02 3.32866436547527553e+02 3.75363063163946720e+02 3.27157451958368859e+02 1.65893300927280563e+02 -1.11749039886827635e+02 -4.52142178291584149e+02 -7.19158244470600668e+02 -7.22893942462325659e+02 -3.40830691784592076e+02 3.03684595722731511e+02 7.77990156999292426e+02 6.13277251968189840e+02 -1.59017870787016361e+02 -8.35085548493892931e+02 -7.79037965186407926e+02 -2.71605900032749821e+02 \n-8.71787743422046075e+01 -1.18380241254595231e+02 -6.70489561687851020e+01 7.26444246318632566e+01 2.96657848756908605e+02 5.65307529669719341e+02 7.84516261199657441e+02 8.13340425997213257e+02 5.26408617879204992e+02 -6.47020417512262245e+01 -7.01083819614680910e+02 -9.32770361440697778e+02 -4.55709376209998837e+02 4.66768860897608446e+02 1.06336779555894151e+03 8.55318441543833164e+02 2.77115574715680135e+02 \n-9.64341704416558331e+01 -1.63004571491735783e+02 -1.95548190972870188e+02 -1.92795154358202471e+02 -1.39561032761234948e+02 -2.34839892155921675e+01 1.44762100502754960e+02 3.09840695953299745e+02 3.70916533315629386e+02 2.33388002906969492e+02 -8.46436818916353514e+01 -3.76032235349889576e+02 -3.53404684968972916e+02 3.50979150462865522e+01 4.29036826281836885e+02 4.31468405524869882e+02 1.56256345555201953e+02 \n5.75565327476390015e+01 8.69979619489237275e+01 7.76295095494394260e+01 2.66696568033177315e+01 -6.92611971499211557e+01 -2.00058633972942255e+02 -3.29012409160237857e+02 -3.88372704798875451e+02 -3.01320094416709451e+02 -4.24377051881223215e+01 2.87981977827185141e+02 4.60307986771279889e+02 2.73968166953977611e+02 -1.88493770753402542e+02 -5.29707361588729057e+02 -4.51244885584696845e+02 -1.51013381909208715e+02 \n2.05975813008933487e+01 3.52504712704035970e+01 4.34198741375233765e+01 4.48956744188968584e+01 3.60508633537592471e+01 1.31544808265619655e+01 -2.32380896328704848e+01 -6.27050542280211746e+01 -8.28677226805221538e+01 -5.91035904868240754e+01 1.04631807682756615e+01 8.20384447353644124e+01 8.51294903925872144e+01 -1.77866375117801256e+00 -9.79243610406350826e+01 -1.03064385478851322e+02 -3.81822722675007562e+01 \n-1.51038258353388648e+01 -2.35088295084118094e+01 -2.29426879756760381e+01 -1.27727543140099704e+01 8.36124512161652466e+00 3.91295875093428987e+01 7.20298835347150784e+01 9.13622860791988886e+01 7.71719778193726382e+01 1.93802104374214115e+01 -6.20130128732994903e+01 -1.11311270756786989e+02 -7.31392558810008872e+01 3.99775853003410618e+01 1.29849103503142115e+02 1.14500257574645401e+02 3.90700770072438129e+01 \n-2.34479831696938699e+00 -4.04168199293876599e+00 -5.05347855815919693e+00 -5.36282134974080148e+00 -4.53471132993946995e+00 -2.07228652191751198e+00 2.08636748224747434e+00 6.87312238882958838e+00 9.70604472754298759e+00 7.45887684916748348e+00 -5.65097493936906587e-01 -9.48174712620383811e+00 -1.05307478322812485e+01 -3.08003318786265617e-01 1.17275510414077767e+01 1.27550061345932762e+01 4.80357170879510329e+00 \n2.23747994906710435e+00 3.52959229975113959e+00 3.57725839983203374e+00 2.29473263057118840e+00 -5.51664962297193446e-01 -4.85957271284784517e+00 -9.67500027551326912e+00 -1.28289626503659271e+01 -1.13765518925499482e+01 -3.54563604298568274e+00 8.20632287089594096e+00 1.59437133459460397e+01 1.11208424855701954e+01 -5.21194351521086828e+00 -1.88249042015827210e+01 -1.69884269162515893e+01 -5.87340176288488938e+00 \n0.00000000000000000e+00 -1.22208862301663259e+02 0.00000000000000000e+00 -4.74645377936093507e+02 0.00000000000000000e+00 -6.00071613540102940e+02 0.00000000000000000e+00 5.31065990616649340e+01 0.00000000000000000e+00 6.16208631033735175e+02 0.00000000000000000e+00 -4.14101021016647187e+02 0.00000000000000000e+00 1.28724826083394134e+02 0.00000000000000000e+00 -2.39664811429948821e+01 0.00000000000000000e+00 \n3.74295027541142209e+01 0.00000000000000000e+00 -2.60667830342679274e+02 0.00000000000000000e+00 -7.59452365556339526e+02 0.00000000000000000e+00 -3.56459268361766316e+02 0.00000000000000000e+00 6.37372699349983618e+02 0.00000000000000000e+00 -2.27583784087037016e+02 0.00000000000000000e+00 3.40135940109130004e+01 0.00000000000000000e+00 -1.65000073917930893e+00 0.00000000000000000e+00 -1.61844359119692822e-01 \n0.00000000000000000e+00 1.21313039971925907e+02 0.00000000000000000e+00 -7.71291465322909427e+02 0.00000000000000000e+00 -1.42333063069888156e+03 0.00000000000000000e+00 -1.54151179562496676e+02 0.00000000000000000e+00 1.36212462941531590e+03 0.00000000000000000e+00 -8.14067255087115528e+02 0.00000000000000000e+00 2.37574939656735310e+02 0.00000000000000000e+00 -4.23703274495162378e+01 0.00000000000000000e+00 \n3.55401217648697097e+02 0.00000000000000000e+00 5.78785746782959430e+02 0.00000000000000000e+00 -8.32723988349749895e+02 0.00000000000000000e+00 -1.10100691122886529e+03 0.00000000000000000e+00 4.78787605012875292e+02 0.00000000000000000e+00 1.53669507316222322e+02 0.00000000000000000e+00 -1.20871886958090624e+02 0.00000000000000000e+00 2.96234237989082738e+01 0.00000000000000000e+00 -3.85367255407786583e+00 \n0.00000000000000000e+00 7.70553831847680091e+02 0.00000000000000000e+00 8.63063802754415314e+02 0.00000000000000000e+00 -1.54161856786741387e+03 0.00000000000000000e+00 -1.15639089365898306e+03 0.00000000000000000e+00 1.35280041106610458e+03 0.00000000000000000e+00 -4.78955283558493177e+02 0.00000000000000000e+00 8.60560190295494239e+01 0.00000000000000000e+00 -8.61365871921551925e+00 0.00000000000000000e+00 \n5.27164763859875234e+02 0.00000000000000000e+00 1.31349802329902994e+03 0.00000000000000000e+00 1.59328674791737489e+03 0.00000000000000000e+00 -1.96408570419198101e+03 0.00000000000000000e+00 -1.04757615443875990e+03 0.00000000000000000e+00 1.31204189299686146e+03 0.00000000000000000e+00 -4.81233200133306289e+02 0.00000000000000000e+00 9.28965756936057947e+01 0.00000000000000000e+00 -1.06960426763852185e+01 \n0.00000000000000000e+00 7.31078793348859118e+02 0.00000000000000000e+00 1.65449421420595780e+03 0.00000000000000000e+00 2.36231111476014557e+03 0.00000000000000000e+00 -2.46468682534712458e+03 0.00000000000000000e+00 -6.22363961104958576e+02 0.00000000000000000e+00 1.06831767134089227e+03 0.00000000000000000e+00 -4.21141338398149772e+02 0.00000000000000000e+00 8.88159062255876013e+01 0.00000000000000000e+00 \n5.71498655742114506e+01 0.00000000000000000e+00 3.44141797776043894e+02 0.00000000000000000e+00 1.17872411674546592e+03 0.00000000000000000e+00 2.04349612746596905e+03 0.00000000000000000e+00 -3.54426871006486836e+03 0.00000000000000000e+00 1.87359508944634795e+03 0.00000000000000000e+00 -5.12818067528069709e+02 0.00000000000000000e+00 8.42721313677964312e+01 0.00000000000000000e+00 -8.75704915986725952e+00 \n0.00000000000000000e+00 -2.12058627226852125e+02 0.00000000000000000e+00 1.28529420778974026e+02 0.00000000000000000e+00 1.43937318961679110e+03 0.00000000000000000e+00 3.01306305102085089e+03 0.00000000000000000e+00 -4.61585950236742853e+03 0.00000000000000000e+00 2.42308499000966562e+03 0.00000000000000000e+00 -6.90686127633792380e+02 0.00000000000000000e+00 1.23653846326751015e+02 0.00000000000000000e+00 \n-4.04933096945116962e+02 0.00000000000000000e+00 -1.02672905194072889e+03 0.00000000000000000e+00 -1.43098959925627060e+03 0.00000000000000000e+00 -4.04226075149019207e+02 0.00000000000000000e+00 3.52181563515074664e+03 0.00000000000000000e+00 -2.45966900774065759e+03 0.00000000000000000e+00 7.82077966937668366e+02 0.00000000000000000e+00 -1.41807023451627709e+02 0.00000000000000000e+00 1.57906592984508253e+01 \n0.00000000000000000e+00 -3.67231783499931178e+02 0.00000000000000000e+00 -1.03097610537696399e+03 0.00000000000000000e+00 -1.94020655597940974e+03 0.00000000000000000e+00 -1.19983054941980351e+03 0.00000000000000000e+00 4.09121654616709707e+03 0.00000000000000000e+00 -2.60055102023223621e+03 0.00000000000000000e+00 8.20415549621864983e+02 0.00000000000000000e+00 -1.56633519609142619e+02 0.00000000000000000e+00 \n1.92868340883311666e+02 0.00000000000000000e+00 4.53440744509184838e+02 0.00000000000000000e+00 5.21275428674431116e+02 0.00000000000000000e+00 -6.42270656658863535e+01 0.00000000000000000e+00 -1.30065110331147358e+03 0.00000000000000000e+00 9.98843978743015198e+02 0.00000000000000000e+00 -3.31288087366390094e+02 0.00000000000000000e+00 6.16052960426667059e+01 0.00000000000000000e+00 -6.97576190327219292e+00 \n0.00000000000000000e+00 2.24767432207803203e+02 0.00000000000000000e+00 5.10547222711764672e+02 0.00000000000000000e+00 7.77534611613007260e+02 0.00000000000000000e+00 2.39216691190674552e+02 0.00000000000000000e+00 -1.52268541011447197e+03 0.00000000000000000e+00 1.03942625091405746e+03 0.00000000000000000e+00 -3.39054891443277759e+02 0.00000000000000000e+00 6.60394331786960865e+01 0.00000000000000000e+00 \n-4.11951626017866974e+01 0.00000000000000000e+00 -9.34328991006151344e+01 0.00000000000000000e+00 -9.67072165166284893e+01 0.00000000000000000e+00 3.45905237872314576e+01 0.00000000000000000e+00 2.49693533642130184e+02 0.00000000000000000e+00 -2.02096499133659568e+02 0.00000000000000000e+00 6.85467788199257973e+01 0.00000000000000000e+00 -1.29171932252479122e+01 0.00000000000000000e+00 1.47559305338391519e+00 \n0.00000000000000000e+00 -5.76247159250897952e+01 0.00000000000000000e+00 -1.21040315202564214e+02 0.00000000000000000e+00 -1.66996500560751154e+02 0.00000000000000000e+00 -2.68523126142319689e+01 0.00000000000000000e+00 3.20020470464917196e+02 0.00000000000000000e+00 -2.27161998610706988e+02 0.00000000000000000e+00 7.54269542612968662e+01 0.00000000000000000e+00 -1.48473994147445782e+01 0.00000000000000000e+00 \n4.68959663393877398e+00 0.00000000000000000e+00 1.04110300822931961e+01 0.00000000000000000e+00 1.00732475810142609e+01 0.00000000000000000e+00 -5.20045652289038973e+00 0.00000000000000000e+00 -2.68745089578183672e+01 0.00000000000000000e+00 2.24829182190674040e+01 0.00000000000000000e+00 -7.73210108085232986e+00 0.00000000000000000e+00 1.46911717976759237e+00 0.00000000000000000e+00 -1.68747632766264825e-01 \n0.00000000000000000e+00 8.44253121130111495e+00 0.00000000000000000e+00 1.70433237965798209e+01 0.00000000000000000e+00 2.22569870087502489e+01 0.00000000000000000e+00 1.75130741089433718e+00 0.00000000000000000e+00 -4.23767634950403673e+01 0.00000000000000000e+00 3.07857790656278540e+01 0.00000000000000000e+00 -1.03291828988224679e+01 0.00000000000000000e+00 2.04590900122232514e+00 0.00000000000000000e+00 \n1.83105031696065457e+01 -2.32501245298738050e+00 -6.02920120117705455e+01 1.50207099018433412e+02 -2.30457973092134611e+02 2.59304090752920796e+02 -2.09953984584773256e+02 8.95921872945306491e+01 5.40027243395288945e+01 -1.50011080572742617e+02 1.46693547651935685e+02 -5.46260562043323275e+01 -5.13226038356207403e+01 9.25874169133583686e+01 -6.10814811244783493e+01 1.57371248160213052e+01 6.26750285732414036e-01 \n-1.87147513770571105e+01 7.13607982932958968e+01 -1.71339713986018713e+02 2.87587393178942936e+02 -3.59470671018694753e+02 3.26650107190641956e+02 -1.67981932847102364e+02 -6.61487455876574266e+01 2.55844949892988330e+02 -2.72756422449915502e+02 8.75919755802137387e+01 1.58082023823104657e+02 -2.33032047447667269e+02 5.16858660264720204e+01 1.85378669793543049e+02 -2.18607496864053699e+02 8.31024413012257916e+01 \n-5.98697243598962736e+01 1.46738288867005898e+02 -2.76713603263813751e+02 4.20180917605311000e+02 -5.11024864343314214e+02 4.81842238474037425e+02 -3.05255094893849978e+02 2.73574578523843442e+01 2.32363869990573054e+02 -3.35678237942156543e+02 2.23085906391485929e+02 1.35672576807619787e+01 -1.78035381540746612e+02 1.46623150630893335e+02 -4.29493473746403869e+00 -6.73670339281141513e+01 3.36582337036826763e+01 \n-1.77700608824348549e+02 3.29398245067534279e+02 -4.56796862378445004e+02 5.35514061169018788e+02 -5.03521151618415675e+02 3.13868553712079234e+02 1.40203242201062671e+01 -3.62534297453312133e+02 5.41924887275628497e+02 -4.00334497179893591e+02 -1.99277003232554040e+01 4.18188466651141032e+02 -4.26069280184092440e+02 -2.35992045964768414e+00 4.38303392627203388e+02 -4.46421818371030281e+02 1.60609007251811731e+02 \n-2.24857371742386639e+02 3.93651868704592008e+02 -4.99669054572666224e+02 5.29404318601447514e+02 -4.39283236569400134e+02 2.08069641500887555e+02 1.20986716089674286e+02 -4.23312231810710451e+02 5.31741837170878637e+02 -3.41796898573924321e+02 -6.49763451207122243e+01 4.01315709359601011e+02 -3.69077831071778394e+02 -2.26851299776288036e+01 3.85848967614308677e+02 -3.75973355178066541e+02 1.32016424765403442e+02 \n-2.63582381929937617e+02 4.35683937313220916e+02 -4.95213536497960243e+02 4.37335016805946980e+02 -2.39471374283000613e+02 -8.53843820867074931e+01 4.52826479800809779e+02 -7.04191918740990253e+02 6.66151231401387645e+02 -2.76062849553778720e+02 -2.93034150271489595e+02 6.51268660253858742e+02 -4.66288265560829309e+02 -1.54349692343027558e+02 6.42460044917769166e+02 -5.70674081411072777e+02 1.92926461578740134e+02 \n-1.87970462799902163e+02 2.85609387108902740e+02 -2.60896822925081898e+02 1.12567540569798995e+02 1.54211808812659553e+02 -4.88125303336079183e+02 7.72982318709264241e+02 -8.47590695095115153e+02 5.84466101386406071e+02 -1.27312061022015325e+01 -5.97382066751798657e+02 8.23634877381538993e+02 -4.14502125332117603e+02 -3.69833131991184863e+02 8.64637806873455153e+02 -6.90317499387763591e+02 2.21495993709140453e+02 \n-2.85749327871057253e+01 2.24598090552794928e+01 3.73291212385215944e+01 -1.47712796552070713e+02 2.85355294374028556e+02 -4.00108414469983584e+02 4.25258783223746070e+02 -3.11147735735803458e+02 7.25608510518497423e+01 1.85668909566849436e+02 -3.10940530242111213e+02 2.17683183807785225e+02 1.35207242689481463e+01 -1.85945508540626730e+02 1.83024121398158538e+02 -8.12488737573282326e+01 1.31866438360843522e+01 \n7.53686708265286298e+01 -1.55055420727537529e+02 2.56573568757605666e+02 -3.81500804781653824e+02 5.00656980629684983e+02 -5.61006865247335527e+02 5.02233858560356892e+02 -2.91117081722714399e+02 -3.61582523216352559e+01 3.54413694012010269e+02 -4.91811671347765098e+02 3.42493185758781251e+02 1.84310619012641730e+01 -3.45973450422863287e+02 4.19089379234188618e+02 -2.54558189286155110e+02 6.80483643703825532e+01 \n2.02466548472558481e+02 -3.32866436547527553e+02 3.75363063163946720e+02 -3.27157451958368859e+02 1.65893300927280563e+02 1.11749039886827635e+02 -4.52142178291584149e+02 7.19158244470600668e+02 -7.22893942462325659e+02 3.40830691784592076e+02 3.03684595722731511e+02 -7.77990156999292426e+02 6.13277251968189840e+02 1.59017870787016361e+02 -8.35085548493892931e+02 7.79037965186407926e+02 -2.71605900032749821e+02 \n8.71787743422046075e+01 -1.18380241254595231e+02 6.70489561687851020e+01 7.26444246318632566e+01 -2.96657848756908605e+02 5.65307529669719341e+02 -7.84516261199657441e+02 8.13340425997213257e+02 -5.26408617879204992e+02 -6.47020417512262245e+01 7.01083819614680910e+02 -9.32770361440697778e+02 4.55709376209998837e+02 4.66768860897608446e+02 -1.06336779555894151e+03 8.55318441543833164e+02 -2.77115574715680135e+02 \n-9.64341704416558331e+01 1.63004571491735783e+02 -1.95548190972870188e+02 1.92795154358202471e+02 -1.39561032761234948e+02 2.34839892155921675e+01 1.44762100502754960e+02 -3.09840695953299745e+02 3.70916533315629386e+02 -2.33388002906969492e+02 -8.46436818916353514e+01 3.76032235349889576e+02 -3.53404684968972916e+02 -3.50979150462865522e+01 4.29036826281836885e+02 -4.31468405524869882e+02 1.56256345555201953e+02 \n-5.75565327476390015e+01 8.69979619489237275e+01 -7.76295095494394260e+01 2.66696568033177315e+01 6.92611971499211557e+01 -2.00058633972942255e+02 3.29012409160237857e+02 -3.88372704798875451e+02 3.01320094416709451e+02 -4.24377051881223215e+01 -2.87981977827185141e+02 4.60307986771279889e+02 -2.73968166953977611e+02 -1.88493770753402542e+02 5.29707361588729057e+02 -4.51244885584696845e+02 1.51013381909208715e+02 \n2.05975813008933487e+01 -3.52504712704035970e+01 4.34198741375233765e+01 -4.48956744188968584e+01 3.60508633537592471e+01 -1.31544808265619655e+01 -2.32380896328704848e+01 6.27050542280211746e+01 -8.28677226805221538e+01 5.91035904868240754e+01 1.04631807682756615e+01 -8.20384447353644124e+01 8.51294903925872144e+01 1.77866375117801256e+00 -9.79243610406350826e+01 1.03064385478851322e+02 -3.81822722675007562e+01 \n1.51038258353388648e+01 -2.35088295084118094e+01 2.29426879756760381e+01 -1.27727543140099704e+01 -8.36124512161652466e+00 3.91295875093428987e+01 -7.20298835347150784e+01 9.13622860791988886e+01 -7.71719778193726382e+01 1.93802104374214115e+01 6.20130128732994903e+01 -1.11311270756786989e+02 7.31392558810008872e+01 3.99775853003410618e+01 -1.29849103503142115e+02 1.14500257574645401e+02 -3.90700770072438129e+01 \n-2.34479831696938699e+00 4.04168199293876599e+00 -5.05347855815919693e+00 5.36282134974080148e+00 -4.53471132993946995e+00 2.07228652191751198e+00 2.08636748224747434e+00 -6.87312238882958838e+00 9.70604472754298759e+00 -7.45887684916748348e+00 -5.65097493936906587e-01 9.48174712620383811e+00 -1.05307478322812485e+01 3.08003318786265617e-01 1.17275510414077767e+01 -1.27550061345932762e+01 4.80357170879510329e+00 \n-2.23747994906710435e+00 3.52959229975113959e+00 -3.57725839983203374e+00 2.29473263057118840e+00 5.51664962297193446e-01 -4.85957271284784517e+00 9.67500027551326912e+00 -1.28289626503659271e+01 1.13765518925499482e+01 -3.54563604298568274e+00 -8.20632287089594096e+00 1.59437133459460397e+01 -1.11208424855701954e+01 -5.21194351521086828e+00 1.88249042015827210e+01 -1.69884269162515893e+01 5.87340176288488938e+00 \n18\n-9.37876699556072309e+00 1.29117580615034916e+01 7.90064588444734760e+01 1.69641173227658816e+02 2.46457945897256780e+02 2.65983185738565221e+02 2.00786359123525507e+02 6.07854675581694203e+01 -9.79411408324372167e+01 -1.91500278048505263e+02 -1.58159405919841625e+02 -1.67178286771119866e+01 1.21373304083510980e+02 1.31971957261737602e+02 7.28539642602318496e+00 -1.16293131937643019e+02 -1.16890288767072722e+02 -4.06542618955215206e+01 \n-4.12864959544113958e+01 -1.15075135023424100e+02 -2.38717411740574322e+02 -3.83198402818511178e+02 -4.82773549409550749e+02 -4.64765526285640055e+02 -2.89585545382090014e+02 9.24374164698233346e+00 3.09810607124339994e+02 4.42019531908089166e+02 2.94238307666681260e+02 -6.28552880467660183e+01 -3.57924272393332140e+02 -3.13142608632123408e+02 5.12648604117882956e+01 3.68563742854884148e+02 3.39938399503434176e+02 1.14915997036479386e+02 \n9.18145114925134831e+01 2.02157905436626940e+02 3.47270710325981238e+02 4.98307443003611255e+02 5.84245090922777379e+02 5.30551063827789083e+02 3.04811338912718514e+02 -4.21718278204564709e+01 -3.67603449228257498e+02 -4.90072106733940270e+02 -3.07708820145221713e+02 8.10528058503757074e+01 3.81282531426872334e+02 3.18977422871694416e+02 -5.98211585325726548e+01 -3.74129563221524077e+02 -3.37671723026634695e+02 -1.12579427120991970e+02 \n-2.12185883534079003e+02 -3.97223160256553303e+02 -5.63762684961509271e+02 -6.91004886674136129e+02 -7.08952194075595312e+02 -5.50429925405908024e+02 -2.03435749727765118e+02 2.45284915249126749e+02 6.07994879809199391e+02 6.69514321342051137e+02 3.36325267978190254e+02 -2.20595756772696023e+02 -5.91747159978022586e+02 -4.31901361031362977e+02 1.47396615641531738e+02 5.89925779126705917e+02 5.09757327745732635e+02 1.67052446687028482e+02 \n2.96337216995581014e+02 5.19408203072938509e+02 6.64403579853006586e+02 7.20526083969538480e+02 6.33379550755890066e+02 3.64017163862691752e+02 -6.07748139174612240e+01 -5.15463145771465151e+02 -7.92786053432924035e+02 -6.98439167015030918e+02 -2.06709544077251440e+02 4.23469656963198769e+02 7.33993095742827269e+02 4.21950114542967277e+02 -2.86786458655668823e+02 -7.48628151283578541e+02 -5.99613967846197224e+02 -1.89270102256659660e+02 \n-2.91145119768935306e+02 -4.91923197595839879e+02 -5.88579098731540512e+02 -5.80023523656170679e+02 -4.36995464191259548e+02 -1.53627611115499478e+02 2.17147282674991133e+02 5.51321318887744304e+02 6.87106591207955285e+02 5.12069731241640560e+02 7.09581746496508071e+01 -3.91896085231955083e+02 -5.50357231410128633e+02 -2.61122045114152875e+02 2.43165546665828876e+02 5.21186551302093178e+02 3.90463118911564343e+02 1.18019833439363910e+02 \n2.80252945556138924e+02 4.49703918543043251e+02 4.80391160797216591e+02 3.75523212835874818e+02 1.26451927131413707e+02 -2.40119171680427239e+02 -6.34410061881117753e+02 -9.03486117151397769e+02 -8.80050777579523493e+02 -4.84003376454232618e+02 1.65202592864803497e+02 7.24504345258368505e+02 7.96114024260812987e+02 2.61763937953426825e+02 -4.97329539481573549e+02 -8.60831638475785383e+02 -6.14127743788473327e+02 -1.82006102100189077e+02 \n-9.37612380286303595e+00 1.23057485767863172e+01 8.52620436425880620e+01 2.07097680463317755e+02 3.50499375400869659e+02 4.58050325163537297e+02 4.54981027426008229e+02 2.89300170571789960e+02 -1.05751288543377021e+01 -3.03521236875956049e+02 -3.91140469133880402e+02 -1.78410558652693794e+02 1.73858756639021756e+02 3.22912840139658302e+02 1.00761651651053420e+02 -2.29572068263969706e+02 -2.87894320806104050e+02 -1.09979913176675048e+02 \n-7.18475189800542351e+01 -1.46899453462737026e+02 -2.40774252529165608e+02 -3.53818691992718172e+02 -4.57224824533539537e+02 -5.00830892592888182e+02 -4.30985763686516588e+02 -2.25142375890574532e+02 6.91186708079389656e+01 3.23782996840825114e+02 3.86693066738940393e+02 2.01553934679014683e+02 -9.78180731108323244e+01 -2.57492884166222860e+02 -1.49689926860083385e+02 6.41289292281885656e+01 1.33969781789126567e+02 5.59119105188108201e+01 \n2.60132074725906394e+02 4.47305039020087582e+02 5.58185919503274286e+02 5.96381586832500657e+02 5.26017282884460269e+02 3.08607640136615315e+02 -5.78194422973875332e+01 -4.93414414736850119e+02 -8.16209534524950067e+02 -7.98348251453088691e+02 -3.27772959706750347e+02 3.97812314014805724e+02 8.59772361262482126e+02 5.90288882800451791e+02 -2.66750301903408125e+02 -9.17286578380694856e+02 -7.86795688494732571e+02 -2.58614888677225711e+02 \n-2.22790138388897978e+02 -3.58886502799618857e+02 -3.87112992664845216e+02 -3.07861234888368008e+02 -1.04842722155481067e+02 2.17706057797561704e+02 6.02478258964300306e+02 9.17030290957388843e+02 9.73207914677924453e+02 6.20424312530936716e+02 -9.77638046673613147e+01 -8.30729329152453551e+02 -1.03962104796907990e+03 -4.30900556547180199e+02 6.05955207274622919e+02 1.19334377803536306e+03 9.01214072994937525e+02 2.77471885866507455e+02 \n-1.44432063831097888e+02 -2.56322391414212853e+02 -3.40208630778600528e+02 -3.99297154971018262e+02 -4.07443258967085710e+02 -3.25615359088813961e+02 -1.24388646621390121e+02 1.78003108255325293e+02 4.77699571070237736e+02 5.91998349559518011e+02 3.63229057263679253e+02 -1.55368750813394298e+02 -5.98519861429170982e+02 -5.16386951874746945e+02 1.11025711672847031e+02 6.82043716251899086e+02 6.38306237692376724e+02 2.19635894310126421e+02 \n1.50016087822439212e+02 2.50052360255174593e+02 2.92235533100945945e+02 2.77515627555454313e+02 1.88598721491480962e+02 1.24165232510697537e+01 -2.36550374134118516e+02 -4.91241142257535020e+02 -6.25868069777268368e+02 -5.01594714212393703e+02 -7.96522494646584400e+01 4.54864980215229802e+02 7.11866563489249325e+02 3.87944113598007602e+02 -3.36053799897538874e+02 -8.21400532866670362e+02 -6.62840281214052274e+02 -2.12012597342444204e+02 \n3.62683896865175601e+01 6.53815429268593027e+01 8.93434668621333416e+01 1.09253977213307958e+02 1.17957198779709318e+02 1.03475247670021313e+02 5.43749479785241295e+01 -2.92927435993575796e+01 -1.22459848406911265e+02 -1.71769331576687639e+02 -1.21794400968694447e+02 2.63048461249558257e+01 1.70566370462321664e+02 1.64179403177144917e+02 -1.98370167009868708e+01 -2.03328634198094411e+02 -1.99188085472945418e+02 -7.01625918743898288e+01 \n-4.40981409918643486e+01 -7.44580866714950868e+01 -8.95249799614770123e+01 -8.97373456111937761e+01 -6.93673663871917277e+01 -2.26889638816484144e+01 4.91836922641420848e+01 1.29744601892900160e+02 1.82502332130228239e+02 1.61389548607116403e+02 4.45670282435570773e+01 -1.21562056954965336e+02 -2.16893642221503661e+02 -1.32920682403361470e+02 9.06888688295017074e+01 2.53505832355446689e+02 2.12032998054353220e+02 6.92159238684259499e+01 \n-5.06834154841175869e+00 -9.22852535689737764e+00 -1.28409374370815441e+01 -1.60930109969198467e+01 -1.79438207328119806e+01 -1.65333819928323236e+01 -9.88525778690772911e+00 2.46811377449475513e+00 1.72226246944434338e+01 2.62850466997929100e+01 2.02812957183038650e+01 -2.12844321612423023e+00 -2.58954859375370263e+01 -2.68170749446902817e+01 1.69737062654858013e+00 3.19928264281093578e+01 3.23688806697488807e+01 1.15918792563123800e+01 \n7.56263017354038042e+00 1.28579538220779691e+01 1.56921565304332910e+01 1.61609332208018583e+01 1.32290480635881510e+01 5.73905272881252053e+00 -6.43228588482419215e+00 -2.08043304296412296e+01 -3.12161296857919979e+01 -2.92461136035476709e+01 -9.98825275304860747e+00 1.95799931154348136e+01 3.82887637805753120e+01 2.51765460668984239e+01 -1.46933332125753617e+01 -4.53171423969467271e+01 -3.88332700438673112e+01 -1.28536684264784882e+01 \n3.99604697714612956e-01 7.32532016931944812e-01 1.03157378977683561e+00 1.31354007415827875e+00 1.49459727134337197e+00 1.41859402184355769e+00 9.09215045303435736e-01 -9.79279259094018745e-02 -1.35733084195357088e+00 -2.19985155914832618e+00 -1.79322703966315473e+00 6.57542669070340598e-02 2.15788120817652606e+00 2.35400994829989140e+00 -5.76150124484053678e-02 -2.74199669691827213e+00 -2.84138660327521828e+00 -1.03018172043594657e+00 \n0.00000000000000000e+00 -9.08015199176521169e+01 0.00000000000000000e+00 -4.27351250232822035e+02 0.00000000000000000e+00 -5.64458968275173392e+02 0.00000000000000000e+00 1.94472006218165232e+01 0.00000000000000000e+00 5.29354441327826983e+02 0.00000000000000000e+00 -3.31149729950373430e+02 0.00000000000000000e+00 9.73613471705743306e+01 0.00000000000000000e+00 -1.73492738643435656e+01 0.00000000000000000e+00 2.07734920539524753e+00 \n8.25729919088227917e+01 0.00000000000000000e+00 -1.97468564470009618e+02 0.00000000000000000e+00 -8.13038602001153740e+02 0.00000000000000000e+00 -6.48301434864312724e+02 0.00000000000000000e+00 3.66432483160736937e+02 0.00000000000000000e+00 2.41648860145577591e+02 0.00000000000000000e+00 -1.93298921773424790e+02 0.00000000000000000e+00 5.51114825638410723e+01 0.00000000000000000e+00 -8.62412446043522600e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 2.31793784235345895e+02 0.00000000000000000e+00 -6.18360028592664924e+02 0.00000000000000000e+00 -1.33736416515068666e+03 0.00000000000000000e+00 -3.18537420304948090e+02 0.00000000000000000e+00 1.06828423660561655e+03 0.00000000000000000e+00 -4.77629509914067037e+02 0.00000000000000000e+00 9.40950963942313956e+01 0.00000000000000000e+00 -8.18924927127445419e+00 0.00000000000000000e+00 -1.23547879925582336e-01 \n4.24371767068158006e+02 0.00000000000000000e+00 6.67315345693622845e+02 0.00000000000000000e+00 -9.48184922910193833e+02 0.00000000000000000e+00 -1.60704348434015293e+03 0.00000000000000000e+00 4.39343918795890796e+01 0.00000000000000000e+00 9.58083127484355506e+02 0.00000000000000000e+00 -5.20180127861118829e+02 0.00000000000000000e+00 1.31242104204234180e+02 0.00000000000000000e+00 -1.92827865554745303e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.01426805789376188e+03 0.00000000000000000e+00 1.17457957202053627e+03 0.00000000000000000e+00 -1.42762890970866302e+03 0.00000000000000000e+00 -1.60766900491901476e+03 0.00000000000000000e+00 7.26799061832067136e+02 0.00000000000000000e+00 3.49770313203607515e+02 0.00000000000000000e+00 -2.94699747407199069e+02 0.00000000000000000e+00 8.79328719662644543e+01 0.00000000000000000e+00 -1.50893794794526667e+01 \n5.82290239537870613e+02 0.00000000000000000e+00 1.36856013930381446e+03 0.00000000000000000e+00 1.43531739314835709e+03 0.00000000000000000e+00 -2.48612736629525713e+03 0.00000000000000000e+00 -1.43582502723540002e+03 0.00000000000000000e+00 2.12597492272197825e+03 0.00000000000000000e+00 -9.02131710186244767e+02 0.00000000000000000e+00 2.03293865636306370e+02 0.00000000000000000e+00 -2.79336597657333177e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 1.04224152561018159e+03 0.00000000000000000e+00 2.02614068891609909e+03 0.00000000000000000e+00 2.43142317795832923e+03 0.00000000000000000e+00 -3.13067978360606802e+03 0.00000000000000000e+00 -1.39955032482207185e+03 0.00000000000000000e+00 2.21491163551984041e+03 0.00000000000000000e+00 -9.72998998344054633e+02 0.00000000000000000e+00 2.33766534384528812e+02 0.00000000000000000e+00 -3.58513082360684083e+01 \n1.87522476057260719e+01 0.00000000000000000e+00 2.71703552180727019e+02 0.00000000000000000e+00 1.14625175119081783e+03 0.00000000000000000e+00 2.15266781592263154e+03 0.00000000000000000e+00 -3.36060374343730256e+03 0.00000000000000000e+00 1.67460643626832676e+03 0.00000000000000000e+00 -4.38487058866332679e+02 0.00000000000000000e+00 7.00650300534088954e+01 0.00000000000000000e+00 -7.27584797377168089e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -2.03975306159418657e+02 0.00000000000000000e+00 1.09446562401739247e+02 0.00000000000000000e+00 1.35700232979555072e+03 0.00000000000000000e+00 2.89737567080286987e+03 0.00000000000000000e+00 -4.61021474205007187e+03 0.00000000000000000e+00 2.54800302357768237e+03 0.00000000000000000e+00 -7.76156092360277679e+02 0.00000000000000000e+00 1.50947900617243097e+02 0.00000000000000000e+00 -2.01343425298097082e+01 \n-5.20264149451812788e+02 0.00000000000000000e+00 -1.16682799839089669e+03 0.00000000000000000e+00 -1.20425019565358911e+03 0.00000000000000000e+00 5.04157083843261204e+02 0.00000000000000000e+00 4.27376742170064800e+03 0.00000000000000000e+00 -3.90202956535213625e+03 0.00000000000000000e+00 1.50868757251443508e+03 0.00000000000000000e+00 -3.29094724638297475e+02 0.00000000000000000e+00 4.46192175966828557e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 -8.25762350860252979e+02 0.00000000000000000e+00 -1.58823286172358842e+03 0.00000000000000000e+00 -2.06970440269308487e+03 0.00000000000000000e+00 -2.48275387297325464e+02 0.00000000000000000e+00 5.25017686251490259e+03 0.00000000000000000e+00 -4.26944520854097683e+03 0.00000000000000000e+00 1.61713926467383311e+03 0.00000000000000000e+00 -3.64905913816008318e+02 0.00000000000000000e+00 5.41732109636935660e+01 \n2.88864127662195775e+02 0.00000000000000000e+00 5.85006803011062588e+02 0.00000000000000000e+00 3.94883553842207195e+02 0.00000000000000000e+00 -7.09965054438231993e+02 0.00000000000000000e+00 -1.89084604744347949e+03 0.00000000000000000e+00 2.04291085928750171e+03 0.00000000000000000e+00 -8.43140181113743892e+02 0.00000000000000000e+00 1.90969082473098338e+02 0.00000000000000000e+00 -2.65401770720512534e+01 0.00000000000000000e+00 \n0.00000000000000000e+00 5.39237223734368637e+02 0.00000000000000000e+00 9.06677776210345164e+02 0.00000000000000000e+00 9.07032225851692114e+02 0.00000000000000000e+00 -3.67125005800343059e+02 0.00000000000000000e+00 -2.33319795093084817e+03 0.00000000000000000e+00 2.14370563652339405e+03 0.00000000000000000e+00 -8.54540145032412092e+02 0.00000000000000000e+00 1.98637070706466077e+02 0.00000000000000000e+00 -3.00612504309650304e+01 \n-7.25367793730351203e+01 0.00000000000000000e+00 -1.38983443386047665e+02 0.00000000000000000e+00 -6.62030336434197176e+01 0.00000000000000000e+00 2.26665865246284977e+02 0.00000000000000000e+00 4.36965393788835026e+02 0.00000000000000000e+00 -5.17375881615744378e+02 0.00000000000000000e+00 2.20483046962125972e+02 0.00000000000000000e+00 -5.08485949658390592e+01 0.00000000000000000e+00 7.15043969490418191e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 -1.56604709525989252e+02 0.00000000000000000e+00 -2.48476070601802400e+02 0.00000000000000000e+00 -2.15753544408031271e+02 0.00000000000000000e+00 1.55189987146144827e+02 0.00000000000000000e+00 5.78981104492865105e+02 0.00000000000000000e+00 -5.68110982182514155e+02 0.00000000000000000e+00 2.32351328106681699e+02 0.00000000000000000e+00 -5.48071736852744393e+01 0.00000000000000000e+00 8.37296433239263210e+00 \n1.01366830968235174e+01 0.00000000000000000e+00 1.87120496301202855e+01 0.00000000000000000e+00 6.35613387797128067e+00 0.00000000000000000e+00 -3.58756431145518795e+01 0.00000000000000000e+00 -5.87649318016455129e+01 0.00000000000000000e+00 7.37637494587112260e+01 0.00000000000000000e+00 -3.20538826672158100e+01 0.00000000000000000e+00 7.47377556258107186e+00 0.00000000000000000e+00 -1.05853238877607345e+00 0.00000000000000000e+00 \n0.00000000000000000e+00 2.66795311535455601e+01 0.00000000000000000e+00 4.09603027883474752e+01 0.00000000000000000e+00 3.25062294903784830e+01 0.00000000000000000e+00 -3.04449035674249160e+01 0.00000000000000000e+00 -9.08400138593082451e+01 0.00000000000000000e+00 9.27837801766645204e+01 0.00000000000000000e+00 -3.85283733287328108e+01 0.00000000000000000e+00 9.16708436732982652e+00 0.00000000000000000e+00 -1.40830420155640188e+00 \n-7.99209395429225912e-01 0.00000000000000000e+00 -1.43732958960661720e+00 0.00000000000000000e+00 -3.47792642201099474e-01 0.00000000000000000e+00 3.05195312883563888e+00 0.00000000000000000e+00 4.54524096020388934e+00 0.00000000000000000e+00 -5.93108856365389938e+00 0.00000000000000000e+00 2.61007007388215483e+00 0.00000000000000000e+00 -6.12905998053888007e-01 0.00000000000000000e+00 8.72133061348790853e-02 0.00000000000000000e+00 \n9.37876699556072309e+00 1.29117580615034916e+01 -7.90064588444734760e+01 1.69641173227658816e+02 -2.46457945897256780e+02 2.65983185738565221e+02 -2.00786359123525507e+02 6.07854675581694203e+01 9.79411408324372167e+01 -1.91500278048505263e+02 1.58159405919841625e+02 -1.67178286771119866e+01 -1.21373304083510980e+02 1.31971957261737602e+02 -7.28539642602318496e+00 -1.16293131937643019e+02 1.16890288767072722e+02 -4.06542618955215206e+01 \n-4.12864959544113958e+01 1.15075135023424100e+02 -2.38717411740574322e+02 3.83198402818511178e+02 -4.82773549409550749e+02 4.64765526285640055e+02 -2.89585545382090014e+02 -9.24374164698233346e+00 3.09810607124339994e+02 -4.42019531908089166e+02 2.94238307666681260e+02 6.28552880467660183e+01 -3.57924272393332140e+02 3.13142608632123408e+02 5.12648604117882956e+01 -3.68563742854884148e+02 3.39938399503434176e+02 -1.14915997036479386e+02 \n-9.18145114925134831e+01 2.02157905436626940e+02 -3.47270710325981238e+02 4.98307443003611255e+02 -5.84245090922777379e+02 5.30551063827789083e+02 -3.04811338912718514e+02 -4.21718278204564709e+01 3.67603449228257498e+02 -4.90072106733940270e+02 3.07708820145221713e+02 8.10528058503757074e+01 -3.81282531426872334e+02 3.18977422871694416e+02 5.98211585325726548e+01 -3.74129563221524077e+02 3.37671723026634695e+02 -1.12579427120991970e+02 \n-2.12185883534079003e+02 3.97223160256553303e+02 -5.63762684961509271e+02 6.91004886674136129e+02 -7.08952194075595312e+02 5.50429925405908024e+02 -2.03435749727765118e+02 -2.45284915249126749e+02 6.07994879809199391e+02 -6.69514321342051137e+02 3.36325267978190254e+02 2.20595756772696023e+02 -5.91747159978022586e+02 4.31901361031362977e+02 1.47396615641531738e+02 -5.89925779126705917e+02 5.09757327745732635e+02 -1.67052446687028482e+02 \n-2.96337216995581014e+02 5.19408203072938509e+02 -6.64403579853006586e+02 7.20526083969538480e+02 -6.33379550755890066e+02 3.64017163862691752e+02 6.07748139174612240e+01 -5.15463145771465151e+02 7.92786053432924035e+02 -6.98439167015030918e+02 2.06709544077251440e+02 4.23469656963198769e+02 -7.33993095742827269e+02 4.21950114542967277e+02 2.86786458655668823e+02 -7.48628151283578541e+02 5.99613967846197224e+02 -1.89270102256659660e+02 \n-2.91145119768935306e+02 4.91923197595839879e+02 -5.88579098731540512e+02 5.80023523656170679e+02 -4.36995464191259548e+02 1.53627611115499478e+02 2.17147282674991133e+02 -5.51321318887744304e+02 6.87106591207955285e+02 -5.12069731241640560e+02 7.09581746496508071e+01 3.91896085231955083e+02 -5.50357231410128633e+02 2.61122045114152875e+02 2.43165546665828876e+02 -5.21186551302093178e+02 3.90463118911564343e+02 -1.18019833439363910e+02 \n-2.80252945556138924e+02 4.49703918543043251e+02 -4.80391160797216591e+02 3.75523212835874818e+02 -1.26451927131413707e+02 -2.40119171680427239e+02 6.34410061881117753e+02 -9.03486117151397769e+02 8.80050777579523493e+02 -4.84003376454232618e+02 -1.65202592864803497e+02 7.24504345258368505e+02 -7.96114024260812987e+02 2.61763937953426825e+02 4.97329539481573549e+02 -8.60831638475785383e+02 6.14127743788473327e+02 -1.82006102100189077e+02 \n-9.37612380286303595e+00 -1.23057485767863172e+01 8.52620436425880620e+01 -2.07097680463317755e+02 3.50499375400869659e+02 -4.58050325163537297e+02 4.54981027426008229e+02 -2.89300170571789960e+02 -1.05751288543377021e+01 3.03521236875956049e+02 -3.91140469133880402e+02 1.78410558652693794e+02 1.73858756639021756e+02 -3.22912840139658302e+02 1.00761651651053420e+02 2.29572068263969706e+02 -2.87894320806104050e+02 1.09979913176675048e+02 \n7.18475189800542351e+01 -1.46899453462737026e+02 2.40774252529165608e+02 -3.53818691992718172e+02 4.57224824533539537e+02 -5.00830892592888182e+02 4.30985763686516588e+02 -2.25142375890574532e+02 -6.91186708079389656e+01 3.23782996840825114e+02 -3.86693066738940393e+02 2.01553934679014683e+02 9.78180731108323244e+01 -2.57492884166222860e+02 1.49689926860083385e+02 6.41289292281885656e+01 -1.33969781789126567e+02 5.59119105188108201e+01 \n2.60132074725906394e+02 -4.47305039020087582e+02 5.58185919503274286e+02 -5.96381586832500657e+02 5.26017282884460269e+02 -3.08607640136615315e+02 -5.78194422973875332e+01 4.93414414736850119e+02 -8.16209534524950067e+02 7.98348251453088691e+02 -3.27772959706750347e+02 -3.97812314014805724e+02 8.59772361262482126e+02 -5.90288882800451791e+02 -2.66750301903408125e+02 9.17286578380694856e+02 -7.86795688494732571e+02 2.58614888677225711e+02 \n2.22790138388897978e+02 -3.58886502799618857e+02 3.87112992664845216e+02 -3.07861234888368008e+02 1.04842722155481067e+02 2.17706057797561704e+02 -6.02478258964300306e+02 9.17030290957388843e+02 -9.73207914677924453e+02 6.20424312530936716e+02 9.77638046673613147e+01 -8.30729329152453551e+02 1.03962104796907990e+03 -4.30900556547180199e+02 -6.05955207274622919e+02 1.19334377803536306e+03 -9.01214072994937525e+02 2.77471885866507455e+02 \n-1.44432063831097888e+02 2.56322391414212853e+02 -3.40208630778600528e+02 3.99297154971018262e+02 -4.07443258967085710e+02 3.25615359088813961e+02 -1.24388646621390121e+02 -1.78003108255325293e+02 4.77699571070237736e+02 -5.91998349559518011e+02 3.63229057263679253e+02 1.55368750813394298e+02 -5.98519861429170982e+02 5.16386951874746945e+02 1.11025711672847031e+02 -6.82043716251899086e+02 6.38306237692376724e+02 -2.19635894310126421e+02 \n-1.50016087822439212e+02 2.50052360255174593e+02 -2.92235533100945945e+02 2.77515627555454313e+02 -1.88598721491480962e+02 1.24165232510697537e+01 2.36550374134118516e+02 -4.91241142257535020e+02 6.25868069777268368e+02 -5.01594714212393703e+02 7.96522494646584400e+01 4.54864980215229802e+02 -7.11866563489249325e+02 3.87944113598007602e+02 3.36053799897538874e+02 -8.21400532866670362e+02 6.62840281214052274e+02 -2.12012597342444204e+02 \n3.62683896865175601e+01 -6.53815429268593027e+01 8.93434668621333416e+01 -1.09253977213307958e+02 1.17957198779709318e+02 -1.03475247670021313e+02 5.43749479785241295e+01 2.92927435993575796e+01 -1.22459848406911265e+02 1.71769331576687639e+02 -1.21794400968694447e+02 -2.63048461249558257e+01 1.70566370462321664e+02 -1.64179403177144917e+02 -1.98370167009868708e+01 2.03328634198094411e+02 -1.99188085472945418e+02 7.01625918743898288e+01 \n4.40981409918643486e+01 -7.44580866714950868e+01 8.95249799614770123e+01 -8.97373456111937761e+01 6.93673663871917277e+01 -2.26889638816484144e+01 -4.91836922641420848e+01 1.29744601892900160e+02 -1.82502332130228239e+02 1.61389548607116403e+02 -4.45670282435570773e+01 -1.21562056954965336e+02 2.16893642221503661e+02 -1.32920682403361470e+02 -9.06888688295017074e+01 2.53505832355446689e+02 -2.12032998054353220e+02 6.92159238684259499e+01 \n-5.06834154841175869e+00 9.22852535689737764e+00 -1.28409374370815441e+01 1.60930109969198467e+01 -1.79438207328119806e+01 1.65333819928323236e+01 -9.88525778690772911e+00 -2.46811377449475513e+00 1.72226246944434338e+01 -2.62850466997929100e+01 2.02812957183038650e+01 2.12844321612423023e+00 -2.58954859375370263e+01 2.68170749446902817e+01 1.69737062654858013e+00 -3.19928264281093578e+01 3.23688806697488807e+01 -1.15918792563123800e+01 \n-7.56263017354038042e+00 1.28579538220779691e+01 -1.56921565304332910e+01 1.61609332208018583e+01 -1.32290480635881510e+01 5.73905272881252053e+00 6.43228588482419215e+00 -2.08043304296412296e+01 3.12161296857919979e+01 -2.92461136035476709e+01 9.98825275304860747e+00 1.95799931154348136e+01 -3.82887637805753120e+01 2.51765460668984239e+01 1.46933332125753617e+01 -4.53171423969467271e+01 3.88332700438673112e+01 -1.28536684264784882e+01 \n3.99604697714612956e-01 -7.32532016931944812e-01 1.03157378977683561e+00 -1.31354007415827875e+00 1.49459727134337197e+00 -1.41859402184355769e+00 9.09215045303435736e-01 9.79279259094018745e-02 -1.35733084195357088e+00 2.19985155914832618e+00 -1.79322703966315473e+00 -6.57542669070340598e-02 2.15788120817652606e+00 -2.35400994829989140e+00 -5.76150124484053678e-02 2.74199669691827213e+00 -2.84138660327521828e+00 1.03018172043594657e+00 \n"
  },
  {
    "path": "src/madness/mra/bc.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MRA_BC_H__INCLUDED\n#define MADNESS_MRA_BC_H__INCLUDED\n\n\n/// \\file bc.h\n/// \\brief Provides BoundaryConditions\n/// \\ingroup mrabcext\n\n#include <madness/world/madness_exception.h>\n#include <madness/misc/array_of_bools.h>\n#include <madness/mra/kernelrange.h>\n\n#include <array>\n#include <cstddef>\n#include <iostream>\n\nnamespace madness {\n\nenum BCType {\n  BC_ZERO,\n  BC_PERIODIC,\n  BC_FREE,\n  BC_DIRICHLET,\n  BC_ZERONEUMANN,\n  BC_NEUMANN\n};\n\n/*!\n  \\brief This class is used to specify boundary conditions for all operators\n  \\ingroup mrabcext\n\n  Exterior boundary conditions (i.e., on the simulation domain)\n  are associated with operators (not functions).  The types of\n  boundary conditions available are in the enum BCType.\n\n  The default boundary conditions are obtained from the FunctionDefaults.\n  For non-zero Dirichlet and Neumann conditions additional information\n  must be provided when derivative operators are constructed. For integral\n  operators, only periodic and free space are supported.\n*/\ntemplate <std::size_t NDIM> class BoundaryConditions {\nprivate:\n  // Used to use STL vector but static data on  a MAC was\n  // causing problems.\n  BCType bc[NDIM * 2];\n\npublic:\n  /// Constructor. Default boundary condition set to free space\n  BoundaryConditions(BCType code = BC_FREE) {\n    for (std::size_t i = 0; i < NDIM * 2; ++i)\n      bc[i] = code;\n  }\n\n  /// Constructor sets boundary condition per axis\n  template <std::size_t N = NDIM, typename = std::enable_if_t<N!=0>>\n  BoundaryConditions(const std::array<BCType, N>& bc_per_axis) {\n    for (std::size_t i = 0; i < NDIM * 2; ++i)\n      bc[i] = bc_per_axis[i / 2];\n  }\n\n  /// Constructor sets boundary condition per boundary\n  template <std::size_t N = NDIM, typename = std::enable_if_t<N!=0>>\n  BoundaryConditions(const std::array<BCType, N*2>& bc_per_boundary) {\n    for (std::size_t i = 0; i < NDIM * 2; ++i)\n      bc[i] = bc_per_boundary[i];\n  }\n\n  /// Copy constructor is deep\n  BoundaryConditions(const BoundaryConditions<NDIM> &other) { *this = other; }\n\n  /// Assignment makes deep copy\n  BoundaryConditions<NDIM> &operator=(const BoundaryConditions<NDIM> &other) {\n    if (&other != this) {\n      for (std::size_t i = 0; i < NDIM * 2; ++i)\n        bc[i] = other.bc[i];\n    }\n    return *this;\n  }\n\n  /// Returns value of boundary condition\n\n  /// @param d Dimension (0,...,NDIM-1) for boundary condition\n  /// @param i Side (0=left, 1=right) for boundary condition\n  /// @return Value of boundary condition\n  BCType operator()(std::size_t d, int i) const {\n    MADNESS_ASSERT(d < NDIM && i >= 0 && i < 2);\n    return bc[2 * d + i];\n  }\n\n  /// Returns reference to boundary condition\n\n  /// @param d Dimension (0,...,NDIM-1) for boundary condition\n  /// @param i Side (0=left, 1=right) for boundary condition\n  /// @return Value of boundary condition\n  BCType &operator()(std::size_t d, int i) {\n    MADNESS_ASSERT(d < NDIM && i >= 0 && i < 2);\n    return bc[2 * d + i];\n  }\n\n  template <typename Archive> void serialize(const Archive &ar) { ar & bc; }\n\n  /// Translates code into human readable string\n\n  /// @param code Code for boundary condition\n  /// @return String describing boundary condition code\n  static const char *code_as_string(BCType code) {\n    static const char *codes[] = {\"zero\",      \"periodic\",     \"free\",\n                                  \"Dirichlet\", \"zero Neumann\", \"Neumann\"};\n    return codes[code];\n  }\n\n  /// Convenience for application of integral operators\n\n  /// @return Returns a vector indicating if dimensions [0, ND) are periodic\n  template <std::size_t ND = NDIM>\n  std::enable_if_t<ND <= NDIM, array_of_bools<ND>> is_periodic() const {\n    array_of_bools<ND> v(false);\n    for (std::size_t d = 0; d < ND; ++d) {\n      MADNESS_ASSERT(bc[2 * d + 1] == bc[2 * d]);\n      v[d] = (bc[2 * d] == BC_PERIODIC);\n    }\n    return v;\n  }\n\n  /// Checks whether the boundary condition along any axis is periodic\n\n  /// @return Returns true if any dimension is periodic\n  bool is_periodic_any() const {\n    for (std::size_t d = 0; d < NDIM; ++d) {\n      MADNESS_ASSERT(bc[2 * d + 1] == bc[2 * d]);\n      if (bc[2 * d] == BC_PERIODIC)\n        return true;\n    }\n    return false;\n  }\n\n  /// Checks whether the boundary condition along all axes is periodic\n\n  /// @return Returns true if every dimension is periodic\n  bool is_periodic_all() const {\n    for (std::size_t d = 0; d < NDIM; ++d) {\n      MADNESS_ASSERT(bc[2 * d + 1] == bc[2 * d]);\n      if (bc[2 * d] != BC_PERIODIC)\n        return false;\n    }\n    return true;\n  }\n\n  /// Convenience for construction of range-restricted integral operators\n\n  /// constructs array of KernelRange objects for every dimension; for every periodic dimension the range is restricted according to \\p r and \\p sigma\n  /// @param r range extent in simulation cell units; kernel is restricted to `[-r/2, r/2]`\n  /// @param sigma optional smoothing paramter (in simulation cell units); if given, use erf-attenuated range restriction (\\sa KernelRange::Type)\n  /// @return an array of kernel ranges for each dimension\n  template <std::size_t ND = NDIM>\n  std::enable_if_t<ND <= NDIM, std::array<KernelRange, ND>> make_range(unsigned int r, std::optional<double> sigma = {}) const {\n    std::array<KernelRange, ND> result;\n    for (std::size_t d = 0; d < ND; ++d) {\n      MADNESS_ASSERT(bc[2 * d + 1] == bc[2 * d]);\n      if (bc[2 * d] == BC_PERIODIC)\n        result[d] = sigma ? KernelRange{r, *sigma} : KernelRange{r};\n    }\n    return result;\n  }\n\n  /// Convenience for construction of range-restricted integral operators\n\n  /// \\note same as make_range(), but makes a std::vector\n  /// constructs vector of KernelRange objects for every dimension; for every periodic dimension the range is restricted according to \\p r and \\p sigma\n  /// @param r range extent in simulation cell units; kernel is restricted to `[-r/2, r/2]`\n  /// @param sigma optional smoothing paramter (in simulation cell units); if given, use erf-attenuated range restriction (\\sa KernelRange::Type)\n  /// @return a vector of kernel ranges for each dimension\n  std::vector<KernelRange> make_range_vector(unsigned int r, std::optional<double> sigma = {}) const {\n    const auto result_array = make_range(r, sigma);\n    return std::vector<KernelRange>(result_array.begin(), result_array.end());\n  }\n\n  std::array<LatticeRange, NDIM> lattice_range() const {\n    std::array<LatticeRange, NDIM> result;\n    const auto periodic = is_periodic();\n    for (size_t i = 0; i < NDIM; i++) {\n      if (periodic[i]) {\n        result[i].set_infinite();\n      }\n    }\n    return result;\n  }\n\n};\n\ntemplate <std::size_t NDIM>\nstatic inline std::ostream &operator<<(std::ostream &s,\n                                       const BoundaryConditions<NDIM> &bc) {\n  s << \"BoundaryConditions(\";\n  for (unsigned int d = 0; d < NDIM; ++d) {\n    s << bc.code_as_string(bc(d, 0)) << \":\" << bc.code_as_string(bc(d, 1));\n    if (d == NDIM - 1)\n      s << \")\";\n    else\n      s << \", \";\n  }\n  return s;\n}\n\ntemplate <std::size_t NDIM>\narray_of_bools<NDIM> no_lattice_sum() {\n  return array_of_bools<NDIM>{false};\n}\n\ntemplate <std::size_t NDIM>\nstd::array<LatticeRange, NDIM> no_lattice_sum_range() {\n  std::array<LatticeRange, NDIM> result;\n  return result;\n}\n\ntemplate <std::size_t NDIM>\narray_of_bools<NDIM> lattice_sum() {\n  return array_of_bools<NDIM>{true};\n}\n\ntemplate <std::size_t NDIM>\nstd::array<LatticeRange, NDIM> lattice_sum_range() {\n  std::array<LatticeRange, NDIM> result;\n  for (auto& range: result) range.set_infinite();\n  return result;\n}\n\n}  // namespace madness\n\n#endif // MADNESS_MRA_BC_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/ble-first.txt",
    "content": "6\n-0.531862659238 -0.792768328725 -0.68694551281 -0.255545751768 0.301586368944 0.481722462986 \n0.702193700738 1.02074202247 0.840564312611 0.285935762602 -0.325463240762 -0.464503934539 \n-0.76126055916 -1.06606875739 -0.747719896008 0.0736172656609 0.95846525674 1.03088486001 \n-0.0109163328696 -0.245700966307 -0.697395703011 -0.884266666076 -0.137367548229 1.02768287154 \n0.24272180172 0.458318745613 0.552536655193 0.288636703198 -0.401048430759 -0.798809987339 \n-0.0155390916764 0.00309585093652 0.0805544183041 0.163881172541 0.071282620536 -0.210671470262 \n0.0 1.36478567885 0.0 0.289155449255 0.0 -0.126867969672 \n-1.40438740144 0.0 3.03627132296 0.0 -0.696831601209 0.0 \n0.0 -3.14203035018 0.0 3.07678909923 0.0 -0.603241376359 \n0.0218326646972 0.0 -2.11867616093 0.0 0.695381801118 0.0 \n0.0 0.764988479362 0.0 -1.25148969078 0.0 0.285063269363 \n0.0310781837006 0.0 0.303809634518 0.0 -0.113054614268 0.0 \n0.531862659238 -0.792768328725 0.68694551281 -0.255545751768 -0.301586368944 0.481722462986 \n0.702193700738 -1.02074202247 0.840564312611 -0.285935762602 -0.325463240762 0.464503934539 \n0.76126055916 -1.06606875739 0.747719896008 0.0736172656609 -0.95846525674 1.03088486001 \n-0.0109163328696 0.245700966307 -0.697395703011 0.884266666076 -0.137367548229 -1.02768287154 \n-0.24272180172 0.458318745613 -0.552536655193 0.288636703198 0.401048430759 -0.798809987339 \n-0.0155390916764 -0.00309585093652 0.0805544183041 -0.163881172541 0.071282620536 0.210671470262 \n7\n-0.521135983093 -0.766823690416 -0.638270689658 -0.191912997318 0.317349785397 0.319937671052 -0.333234963026 \n0.707942759255 1.02670083861 0.835406020921 0.256526402074 -0.364744590445 -0.403882235953 0.294910619533 \n-0.731097231607 -0.993112641907 -0.610846682498 0.252552062383 1.00279185777 0.575947318685 -0.937054051564 \n-0.0203934254712 -0.255545217011 -0.688966702536 -0.835880814835 -0.0725741154451 0.927801915213 -0.48707011374 \n0.224170298696 0.413448179042 0.468354834408 0.178585535379 -0.428310843088 -0.519007463599 0.576321065402 \n-0.0137302733634 0.00497577951471 0.078949230121 0.154650703757 0.0589140869487 -0.19161046479 0.0930078149683 \n-0.0211681378227 -0.0424002145169 -0.0582949177465 -0.0386136923005 0.0423018853728 0.0831797004451 -0.0803194023055 \n0.0 1.38721299457 0.0 0.184606321659 0.0 -0.0976128137439 0.0 \n-1.41588551837 0.0 2.98463810854 0.0 -0.673848228609 0.0 0.0548923839899 \n0.0 -3.07896491769 0.0 2.78279778838 0.0 -0.520976111806 0.0 \n0.0407868497407 0.0 -2.03374363709 0.0 0.65755125235 0.0 -0.0647250861472 \n0.0 0.726201029284 0.0 -1.07067473651 0.0 0.234467250025 0.0 \n0.027460547105 0.0 0.287608065703 0.0 -0.105836931544 0.0 0.011108053891 \n0.0 -0.0618567317669 0.0 0.119514117239 0.0 -0.0281621325433 0.0 \n0.521135983093 -0.766823690416 0.638270689658 -0.191912997318 -0.317349785397 0.319937671052 0.333234963026 \n0.707942759255 -1.02670083861 0.835406020921 -0.256526402074 -0.364744590445 0.403882235953 0.294910619533 \n0.731097231607 -0.993112641907 0.610846682498 0.252552062383 -1.00279185777 0.575947318685 0.937054051564 \n-0.0203934254712 0.255545217011 -0.688966702536 0.835880814835 -0.0725741154451 -0.927801915213 -0.48707011374 \n-0.224170298696 0.413448179042 -0.468354834408 0.178585535379 0.428310843088 -0.519007463599 -0.576321065402 \n-0.0137302733634 -0.00497577951471 0.078949230121 -0.154650703757 0.0589140869487 0.19161046479 0.0930078149683 \n0.0211681378227 -0.0424002145169 0.0582949177465 -0.0386136923005 -0.0423018853728 0.0831797004451 0.0803194023055 \n8\n-0.522294995142 -0.770034369804 -0.644924842817 -0.201208145693 0.312581486095 0.328849853906 -0.326096999052 0.10376261699 \n0.680169827803 0.983444956296 0.80122440819 0.273729287076 -0.263357517139 -0.315655113881 0.118692436853 0.0236146757588 \n-0.732165684059 -0.997688733459 -0.623080165915 0.231620969284 0.984331764501 0.583768428991 -0.896143868864 0.322371962684 \n0.237528773401 0.145029753753 -0.376024062495 -1.00439028153 -1.01798419076 0.131059901493 1.13074556082 -0.7324499853 \n0.227375340382 0.421706935935 0.484420547149 0.199564552578 -0.420527224717 -0.543987941886 0.570018550366 -0.188337256175 \n-0.0962437609739 -0.123146529279 -0.0210547716745 0.208776572059 0.361461687181 0.0627187366982 -0.424093041146 0.247560674049 \n-0.0220296181751 -0.044452776862 -0.061982197918 -0.0429743643578 0.0416662834949 0.0899511287534 -0.0822025477597 0.0261538263252 \n0.00973699751955 0.0139502198959 0.00732727674456 -0.0142847254891 -0.0371597915627 -0.0142982424964 0.0484235546549 -0.0267425664089 \n0.0 1.38560449121 0.0 0.205073703419 0.0 -0.105193224865 0.0 0.0102732176386 \n-1.36033965561 0.0 3.12810997511 0.0 -0.789821238808 0.0 0.0763251934937 0.0 \n0.0 -3.07721517246 0.0 2.83019405524 0.0 -0.54074384261 0.0 0.0412502321756 \n-0.475057546802 0.0 -3.37472638734 0.0 1.73511518716 0.0 -0.263382208686 0.0 \n0.0 0.731888675264 0.0 -1.11627574635 0.0 0.250495291816 0.0 -0.0208939009949 \n0.192487521948 0.0 0.716822812623 0.0 -0.450580475847 0.0 0.0746521246486 0.0 \n0.0 -0.0637201135922 0.0 0.128813170329 0.0 -0.03114455237 0.0 0.00270953936174 \n-0.0194739950391 0.0 -0.0598097354002 0.0 0.0419824792248 0.0 -0.00729504763263 0.0 \n0.522294995142 -0.770034369804 0.644924842817 -0.201208145693 -0.312581486095 0.328849853906 0.326096999052 0.10376261699 \n0.680169827803 -0.983444956296 0.80122440819 -0.273729287076 -0.263357517139 0.315655113881 0.118692436853 -0.0236146757588 \n0.732165684059 -0.997688733459 0.623080165915 0.231620969284 -0.984331764501 0.583768428991 0.896143868864 0.322371962684 \n0.237528773401 -0.145029753753 -0.376024062495 1.00439028153 -1.01798419076 -0.131059901493 1.13074556082 0.7324499853 \n-0.227375340382 0.421706935935 -0.484420547149 0.199564552578 0.420527224717 -0.543987941886 -0.570018550366 -0.188337256175 \n-0.0962437609739 0.123146529279 -0.0210547716745 -0.208776572059 0.361461687181 -0.0627187366982 -0.424093041146 -0.247560674049 \n0.0220296181751 -0.044452776862 0.061982197918 -0.0429743643578 -0.0416662834949 0.0899511287534 0.0822025477597 0.0261538263252 \n0.00973699751955 -0.0139502198959 0.00732727674456 0.0142847254891 -0.0371597915627 0.0142982424964 0.0484235546549 0.0267425664089 \n9\n-0.525015121023 -0.80862938239 -0.778857979408 -0.464620779279 0.0393605933351 0.415620062435 0.212126938951 -0.371217422461 0.155499655149 \n0.682504228759 0.986937246435 0.803499163419 0.27086513032 -0.273857917959 -0.32316835477 0.14020446397 0.00909234054704 -0.011145963548 \n-0.737554589405 -1.07443398613 -0.889499207697 -0.29244050474 0.440641651552 0.756245765524 0.17499992352 -0.622841724429 0.290964339663 \n0.254655719181 0.174053944151 -0.345252783399 -0.992863011315 -1.05304227461 0.0673002682026 1.16195776853 -0.702667048489 0.163517456722 \n0.233732777084 0.511848140554 0.797209027589 0.814722088931 0.217510096626 -0.746660459852 -0.686835408189 0.920843201604 -0.369741969837 \n-0.104170858593 -0.136298543839 -0.0341312348926 0.206135511752 0.381164907832 0.0915162799159 -0.449027693421 0.245067028232 -0.054729001868 \n-0.0234492290983 -0.0645582080725 -0.131739882195 -0.180159241258 -0.100611464551 0.135161382143 0.198056106725 -0.221180779518 0.0846953079722 \n0.0109200035129 0.0158843494408 0.00916027944613 -0.0141643988938 -0.0404536422117 -0.0185235958496 0.0532111376202 -0.0275183471287 0.00600729304764 \n0.00104547449727 0.0037035213525 0.00906176289688 0.014584243641 0.0109896611075 -0.00923875515353 -0.0201045312284 0.0202894280149 -0.00754637463519 \n0.0 1.44394892244 0.0 0.783091846031 0.0 -0.360281655069 0.0 0.0470820804606 0.0 \n-1.36500845713 0.0 3.11502435308 0.0 -0.781304349795 0.0 0.0751508975694 0.0 -0.00352272022542 \n0.0 -2.96106011662 0.0 3.98016384138 0.0 -1.04827094928 0.0 0.114487139743 0.0 \n-0.509311437025 0.0 -3.44619191093 0.0 1.8222675659 0.0 -0.284852549589 0.0 0.0196689680301 \n0.0 0.595651900341 0.0 -2.46614479979 0.0 0.846207929352 0.0 -0.106854070799 0.0 \n0.208341716443 0.0 0.751931738336 0.0 -0.488875195906 0.0 0.0835247843749 0.0 -0.00608176970483 \n0.0 -0.0333446087219 0.0 0.429844829645 0.0 -0.163991156029 0.0 0.0218789518605 0.0 \n-0.0218400069025 0.0 -0.0652556804906 0.0 0.0474896847921 0.0 -0.00851091829897 0.0 0.000638188999274 \n0.0 -0.000163782905337 0.0 -0.0324544831255 0.0 0.0131773465543 0.0 -0.00181699083369 0.0 \n0.525015121023 -0.80862938239 0.778857979408 -0.464620779279 -0.0393605933351 0.415620062435 -0.212126938951 -0.371217422461 -0.155499655149 \n0.682504228759 -0.986937246435 0.803499163419 -0.27086513032 -0.273857917959 0.32316835477 0.14020446397 -0.00909234054704 -0.011145963548 \n0.737554589405 -1.07443398613 0.889499207697 -0.29244050474 -0.440641651552 0.756245765524 -0.17499992352 -0.622841724429 -0.290964339663 \n0.254655719181 -0.174053944151 -0.345252783399 0.992863011315 -1.05304227461 -0.0673002682026 1.16195776853 0.702667048489 0.163517456722 \n-0.233732777084 0.511848140554 -0.797209027589 0.814722088931 -0.217510096626 -0.746660459852 0.686835408189 0.920843201604 0.369741969837 \n-0.104170858593 0.136298543839 -0.0341312348926 -0.206135511752 0.381164907832 -0.0915162799159 -0.449027693421 -0.245067028232 -0.054729001868 \n0.0234492290983 -0.0645582080725 0.131739882195 -0.180159241258 0.100611464551 0.135161382143 -0.198056106725 -0.221180779518 -0.0846953079722 \n0.0109200035129 -0.0158843494408 0.00916027944613 0.0141643988938 -0.0404536422117 0.0185235958496 0.0532111376202 0.0275183471287 0.00600729304764 \n-0.00104547449727 0.0037035213525 -0.00906176289688 0.014584243641 -0.0109896611075 -0.00923875515353 0.0201045312284 0.0202894280149 0.00754637463519 \n10\n-0.482916466714 -0.752065526617 -0.756291057916 -0.538163090344 -0.164895957874 0.193758110411 0.289619462638 0.0237022689704 -0.215634622337 0.113244848372 \n0.76491934172 1.13936014443 1.00414728585 0.447488498624 -0.284709083095 -0.648217977185 -0.15046011991 0.568723966623 -0.297413970972 0.0661114021351 \n-0.694918887535 -1.01719451816 -0.866824406027 -0.367313777183 0.233260847253 0.531393052213 0.254301216539 -0.2223348057 -0.0863765696668 0.0880060400349 \n0.519666260772 0.663953473068 0.299026673505 -0.427042016885 -1.09093895818 -0.978807098681 0.233668371236 1.09514091214 -0.759514534872 0.196590782238 \n0.0561028810498 0.273037595323 0.701422926169 1.12381550412 1.07784921994 0.189247512273 -1.01124059671 -0.745185148261 1.19357254535 -0.530193751862 \n-0.259598203812 -0.423700552022 -0.412319116993 -0.126460924347 0.4023611455 0.704885921194 0.0979651389578 -0.810908952227 0.486604810201 -0.118440843098 \n0.040591581065 0.0215776227852 -0.0970613942423 -0.291292597442 -0.410427919441 -0.202249776698 0.314362872694 0.379606484959 -0.478539904333 0.200065733759 \n0.0382928194205 0.0665120142081 0.0758150365626 0.0445283752037 -0.044025878936 -0.126534427464 -0.0435593612327 0.158800016064 -0.0894133970399 0.0211389053134 \n-0.00777639535974 -0.00816796762056 0.00426190507911 0.0298461617587 0.0536143343458 0.0372455691793 -0.0360243669291 -0.0625239073379 0.0700241718901 -0.0282904417237 \n-0.00266000841784 -0.00476067744437 -0.00582577920843 -0.00424474572409 0.00205518342076 0.00975165074924 0.00508590776003 -0.0135143276396 0.00730642635942 -0.0016947032286 \n0.0 1.62248924374 0.0 1.18087742445 0.0 -0.671883914043 0.0 0.115996234891 0.0 -0.00979127829795 \n-1.52983868385 0.0 2.86362374261 0.0 -0.254658946655 0.0 -0.0859130066811 0.0 0.0162786175879 0.0 \n0.0 -2.78015024509 0.0 4.38376270246 0.0 -1.36401141121 0.0 0.184241407095 0.0 -0.0133033480652 \n-1.03933252218 0.0 -4.25623952884 0.0 3.51264766674 0.0 -0.801004768094 0.0 0.0830222159352 0.0 \n0.0 -0.15738302906 0.0 -4.14213617084 0.0 2.16022485396 0.0 -0.397643948632 0.0 0.0358564294267 \n0.519196408306 0.0 1.22644842574 0.0 -1.48118123763 0.0 0.386751724395 0.0 -0.0433262845625 0.0 \n0.0 0.23807147756 0.0 1.03346171611 0.0 -0.637508498531 0.0 0.126705795346 0.0 -0.0119781151596 \n-0.0765856390172 0.0 -0.148734586276 0.0 0.222373935717 0.0 -0.0619821719045 0.0 0.00720898914276 0.0 \n0.0 -0.0375405122247 0.0 -0.115504616395 0.0 0.0783658458113 0.0 -0.0162531653697 0.0 0.00157811797725 \n0.00532001685566 0.0 0.00927498075291 0.0 -0.0159714534916 0.0 0.00463499818852 0.0 -0.000552024800688 0.0 \n0.482916466714 -0.752065526617 0.756291057916 -0.538163090344 0.164895957874 0.193758110411 -0.289619462638 0.0237022689704 0.215634622337 0.113244848372 \n0.76491934172 -1.13936014443 1.00414728585 -0.447488498624 -0.284709083095 0.648217977185 -0.15046011991 -0.568723966623 -0.297413970972 -0.0661114021351 \n0.694918887535 -1.01719451816 0.866824406027 -0.367313777183 -0.233260847253 0.531393052213 -0.254301216539 -0.2223348057 0.0863765696668 0.0880060400349 \n0.519666260772 -0.663953473068 0.299026673505 0.427042016885 -1.09093895818 0.978807098681 0.233668371236 -1.09514091214 -0.759514534872 -0.196590782238 \n-0.0561028810498 0.273037595323 -0.701422926169 1.12381550412 -1.07784921994 0.189247512273 1.01124059671 -0.745185148261 -1.19357254535 -0.530193751862 \n-0.259598203812 0.423700552022 -0.412319116993 0.126460924347 0.4023611455 -0.704885921194 0.0979651389578 0.810908952227 0.486604810201 0.118440843098 \n-0.040591581065 0.0215776227852 0.0970613942423 -0.291292597442 0.410427919441 -0.202249776698 -0.314362872694 0.379606484959 0.478539904333 0.200065733759 \n0.0382928194205 -0.0665120142081 0.0758150365626 -0.0445283752037 -0.044025878936 0.126534427464 -0.0435593612327 -0.158800016064 -0.0894133970399 -0.0211389053134 \n0.00777639535974 -0.00816796762056 -0.00426190507911 0.0298461617587 -0.0536143343458 0.0372455691793 0.0360243669291 -0.0625239073379 -0.0700241718901 -0.0282904417237 \n-0.00266000841784 0.00476067744437 -0.00582577920843 0.00424474572409 0.00205518342076 -0.00975165074924 0.00508590776003 0.0135143276396 0.00730642635942 0.0016947032286 \n11\n-0.480206866691 -0.747581866324 -0.751504748785 -0.535459812054 -0.167674668878 0.184100536057 0.280205400901 0.0298255697943 -0.201430223229 0.0972856715519 -0.0173668531665 \n0.823475607264 1.27313086243 1.24780991697 0.804631587174 0.0613283682439 -0.624442594856 -0.680047884373 0.111939981112 0.654914879758 -0.47786280823 0.143015463632 \n-0.694891271171 -1.01656255432 -0.864441343933 -0.362000864418 0.240864681713 0.535340607565 0.244330723139 -0.240171139817 -0.0538721241296 0.066837747488 -0.0157593765246 \n0.607229722594 0.864001386367 0.66343533462 0.107114651038 -0.573341908231 -0.943147143753 -0.558356904438 0.411762699611 0.664886919422 -0.616933131948 0.204184041746 \n0.0360659322188 0.241819049157 0.673742393428 1.12129001405 1.12361682826 0.274033580617 -0.974253351229 -0.849613546914 1.19546390904 -0.48158806003 0.0777997730868 \n-0.357412749155 -0.647153648296 -0.819332486635 -0.723023717731 -0.175638010296 0.665198250594 0.982585313845 -0.0479904625074 -1.1040587421 0.790158935805 -0.237213542763 \n0.0500650298148 0.0360357135302 -0.0851765424567 -0.292821282763 -0.435998643225 -0.24442136999 0.301961618893 0.438203502884 -0.496106815338 0.187906908327 -0.0291348615131 \n0.0642157496946 0.125729634225 0.183673609598 0.202610701267 0.109126512477 -0.116039147699 -0.277982710562 -0.0433129588944 0.332059263954 -0.219624477908 0.0637207126198 \n-0.00944785321411 -0.0106794401776 0.00232208888881 0.0304716023302 0.0586396546318 0.044958625354 -0.0345007943985 -0.0740680309372 0.0753024042543 -0.0275593210416 0.00417307288343 \n-0.00569881010335 -0.0117021680056 -0.0184684066475 -0.022773509192 -0.0158944221302 0.00852413573499 0.03256364003 0.0101684545206 -0.0420889000674 0.0265235388398 -0.00753090036438 \n0.000721065563228 0.00091271925449 0.000180051539634 -0.00165026037303 -0.00383901199927 -0.00355998625064 0.00187680168078 0.00586216176724 -0.00556107773172 0.00198822825806 -0.000296157896458 \n0.0 1.63229458306 0.0 1.19323424207 0.0 -0.690393657219 0.0 0.121882948273 0.0 -0.0106243487828 0.0 \n-1.64695121453 0.0 2.87743614275 0.0 0.660489488627 0.0 -0.526071950214 0.0 0.0948801592798 0.0 -0.0081777027236 \n0.0 -2.78122284279 0.0 4.37482449407 0.0 -1.36377644179 0.0 0.185630444494 0.0 -0.0136390755566 0.0 \n-1.21445944519 0.0 -4.23550199847 0.0 4.88139537436 0.0 -1.4593717002 0.0 0.200596224791 0.0 -0.0151018541894 \n0.0 -0.233765998232 0.0 -4.26346331785 0.0 2.29849955728 0.0 -0.436782862202 0.0 0.0409353929132 0.0 \n0.71482549831 0.0 1.20339419919 0.0 -3.00982431258 0.0 1.12197677375 0.0 -0.174618785574 0.0 0.0142719992183 \n0.0 0.274789278949 0.0 1.0954942486 0.0 -0.703102329533 0.0 0.144525707442 0.0 -0.0142108115423 0.0 \n-0.128431499389 0.0 -0.142641478813 0.0 0.627445522325 0.0 -0.256800475786 0.0 0.0419976417509 0.0 -0.00354495545702 \n0.0 -0.0440977677564 0.0 -0.127059388039 0.0 0.0899673269001 0.0 -0.0193077175522 0.0 0.00195000699246 0.0 \n0.0113976202067 0.0 0.00856272732062 0.0 -0.0634496745582 0.0 0.0274687193027 0.0 -0.00462933611145 0.0 0.000398627898388 \n0.0 0.00317025034952 0.0 0.00785068455488 0.0 -0.0059248514216 0.0 0.00130759012234 0.0 -0.000134429575581 0.0 \n0.480206866691 -0.747581866324 0.751504748785 -0.535459812054 0.167674668878 0.184100536057 -0.280205400901 0.0298255697943 0.201430223229 0.0972856715519 0.0173668531665 \n0.823475607264 -1.27313086243 1.24780991697 -0.804631587174 0.0613283682439 0.624442594856 -0.680047884373 -0.111939981112 0.654914879758 0.47786280823 0.143015463632 \n0.694891271171 -1.01656255432 0.864441343933 -0.362000864418 -0.240864681713 0.535340607565 -0.244330723139 -0.240171139817 0.0538721241296 0.066837747488 0.0157593765246 \n0.607229722594 -0.864001386367 0.66343533462 -0.107114651038 -0.573341908231 0.943147143753 -0.558356904438 -0.411762699611 0.664886919422 0.616933131948 0.204184041746 \n-0.0360659322188 0.241819049157 -0.673742393428 1.12129001405 -1.12361682826 0.274033580617 0.974253351229 -0.849613546914 -1.19546390904 -0.48158806003 -0.0777997730868 \n-0.357412749155 0.647153648296 -0.819332486635 0.723023717731 -0.175638010296 -0.665198250594 0.982585313845 0.0479904625074 -1.1040587421 -0.790158935805 -0.237213542763 \n-0.0500650298148 0.0360357135302 0.0851765424567 -0.292821282763 0.435998643225 -0.24442136999 -0.301961618893 0.438203502884 0.496106815338 0.187906908327 0.0291348615131 \n0.0642157496946 -0.125729634225 0.183673609598 -0.202610701267 0.109126512477 0.116039147699 -0.277982710562 0.0433129588944 0.332059263954 0.219624477908 0.0637207126198 \n0.00944785321411 -0.0106794401776 -0.00232208888881 0.0304716023302 -0.0586396546318 0.044958625354 0.0345007943985 -0.0740680309372 -0.0753024042543 -0.0275593210416 -0.00417307288343 \n-0.00569881010335 0.0117021680056 -0.0184684066475 0.022773509192 -0.0158944221302 -0.00852413573499 0.03256364003 -0.0101684545206 -0.0420889000674 -0.0265235388398 -0.00753090036438 \n-0.000721065563228 0.00091271925449 -0.000180051539634 -0.00165026037303 0.00383901199927 -0.00355998625064 -0.00187680168078 0.00586216176724 0.00556107773172 0.00198822825806 0.000296157896458 \n12\n-0.477754091235 -0.743497918672 -0.747072485326 -0.532793310492 -0.16989849325 0.175440734522 0.27114939389 0.0349433974778 -0.187333349877 0.081908731673 -0.0106652675129 -0.0013524093634 \n0.791418985871 1.24818342667 1.29804974653 1.00465644661 0.436232232294 -0.217117581073 -0.614485788746 -0.425404991047 0.222533316788 0.436800013605 -0.379056480827 0.117653645951 \n-0.77487739763 -1.15379048504 -1.02517757817 -0.486495551633 0.254723003468 0.770522884384 0.575557730594 -0.26635763969 -0.604461956137 0.517976864355 -0.161108392445 0.0153223569794 \n0.5855948407 0.847763570607 0.699639804633 0.247138086478 -0.312935585003 -0.662332409724 -0.516616238671 0.0373589498182 0.371554567319 0.0159526928588 -0.160836392245 0.0685921042891 \n-0.25426808554 -0.255434204222 0.0937315189797 0.67735449439 1.18639112621 1.13788676579 0.22079562246 -0.974332422548 -0.785895142701 1.16928473045 -0.466896647585 0.0616118141812 \n-0.281187812436 -0.586964334455 -0.935470375667 -1.19141082093 -1.05656157343 -0.295122892701 0.822838502202 1.21348253147 -0.0762022321944 -1.3667925875 0.989804936738 -0.287189469231 \n0.23660482629 0.355732713006 0.288326787267 -0.00563813334986 -0.473315580461 -0.797168211422 -0.468094369971 0.510854294996 0.783725785056 -0.872807445403 0.318606634258 -0.0384401052661 \n0.0325983745477 0.100447528628 0.230637324985 0.394261623956 0.470698955709 0.279311790204 -0.21031172454 -0.560678215535 -0.0942569932472 0.668688654679 -0.440143914346 0.121876912982 \n-0.0503972510116 -0.0808964150228 -0.0798168495718 -0.0329100444365 0.0663144350427 0.16593041193 0.134987076843 -0.0886946165235 -0.207149398292 0.205703342424 -0.072022008972 0.00830391245257 \n-0.000165541214156 -0.00722769788995 -0.026496748518 -0.0559000253722 -0.0785738027977 -0.060205678142 0.0204911360809 0.0998081879139 0.0325777502172 -0.128082047238 0.079974555725 -0.0215567124765 \n0.00519599725585 0.00859036532854 0.00917362533177 0.00531622236178 -0.00461689653806 -0.0167383221206 -0.0167018946893 0.00730192633159 0.0255085470344 -0.0235840021474 0.00803299970275 -0.00089767250989 \n-0.000234532370612 0.000180460571656 0.00173968508 0.00439278842865 0.00688440219802 0.00610613014798 -0.000791931375747 -0.00920878424452 -0.00428397358574 0.012773065645 -0.00769069788553 0.00203408796572 \n0.0 1.64112001684 0.0 1.20402319002 0.0 -0.707003779481 0.0 0.127183521442 0.0 -0.0113704651993 0.0 0.000578292444506 \n-1.58283797174 0.0 3.25064188349 0.0 1.51793021266 0.0 -1.22975138683 0.0 0.27958419993 0.0 -0.0322327672162 0.0 \n0.0 -3.060927111 0.0 4.08582011522 0.0 -0.793568579642 0.0 -0.018372913397 0.0 0.0186014288191 0.0 -0.00220024213366 \n-1.1711896814 0.0 -3.97894129957 0.0 5.47633111845 0.0 -1.9449021989 0.0 0.327560543794 0.0 -0.03157430011 0.0 \n0.0 -1.25075255154 0.0 -5.32580831864 0.0 4.36184593835 0.0 -1.17042463587 0.0 0.156220327103 0.0 -0.0120491455096 \n0.562375624872 0.0 0.322789143755 0.0 -5.02484652983 0.0 2.77928662751 0.0 -0.610213275243 0.0 0.0710718475757 0.0 \n0.0 0.927780882664 0.0 1.7747808485 0.0 -2.02994479473 0.0 0.617265264996 0.0 -0.0886280581811 0.0 0.0071768457681 \n-0.0651967490954 0.0 0.220145592115 0.0 1.45458066107 0.0 -0.938427303434 0.0 0.221359608057 0.0 -0.0269579623217 0.0 \n0.0 -0.187369563203 0.0 -0.275609845353 0.0 0.381381730617 0.0 -0.123284100991 0.0 0.0183362020713 0.0 -0.00152027200278 \n0.000331082428312 0.0 -0.0545355796587 0.0 -0.206826185568 0.0 0.145824479464 0.0 -0.0358026849281 0.0 0.00447111576267 0.0 \n0.0 0.0188181937325 0.0 0.024016999244 0.0 -0.0377834226582 0.0 0.0126907809231 0.0 -0.00193024116188 0.0 0.000162499438218 \n0.000469064741224 0.0 0.00560947679887 0.0 0.0168503426569 0.0 -0.0126033244391 0.0 0.0031773955083 0.0 -0.000403563655345 0.0 \n0.477754091235 -0.743497918672 0.747072485326 -0.532793310492 0.16989849325 0.175440734522 -0.27114939389 0.0349433974778 0.187333349877 0.081908731673 0.0106652675129 -0.0013524093634 \n0.791418985871 -1.24818342667 1.29804974653 -1.00465644661 0.436232232294 0.217117581073 -0.614485788746 0.425404991047 0.222533316788 -0.436800013605 -0.379056480827 -0.117653645951 \n0.77487739763 -1.15379048504 1.02517757817 -0.486495551633 -0.254723003468 0.770522884384 -0.575557730594 -0.26635763969 0.604461956137 0.517976864355 0.161108392445 0.0153223569794 \n0.5855948407 -0.847763570607 0.699639804633 -0.247138086478 -0.312935585003 0.662332409724 -0.516616238671 -0.0373589498182 0.371554567319 -0.0159526928588 -0.160836392245 -0.0685921042891 \n0.25426808554 -0.255434204222 -0.0937315189797 0.67735449439 -1.18639112621 1.13788676579 -0.22079562246 -0.974332422548 0.785895142701 1.16928473045 0.466896647585 0.0616118141812 \n-0.281187812436 0.586964334455 -0.935470375667 1.19141082093 -1.05656157343 0.295122892701 0.822838502202 -1.21348253147 -0.0762022321944 1.3667925875 0.989804936738 0.287189469231 \n-0.23660482629 0.355732713006 -0.288326787267 -0.00563813334986 0.473315580461 -0.797168211422 0.468094369971 0.510854294996 -0.783725785056 -0.872807445403 -0.318606634258 -0.0384401052661 \n0.0325983745477 -0.100447528628 0.230637324985 -0.394261623956 0.470698955709 -0.279311790204 -0.21031172454 0.560678215535 -0.0942569932472 -0.668688654679 -0.440143914346 -0.121876912982 \n0.0503972510116 -0.0808964150228 0.0798168495718 -0.0329100444365 -0.0663144350427 0.16593041193 -0.134987076843 -0.0886946165235 0.207149398292 0.205703342424 0.072022008972 0.00830391245257 \n-0.000165541214156 0.00722769788995 -0.026496748518 0.0559000253722 -0.0785738027977 0.060205678142 0.0204911360809 -0.0998081879139 0.0325777502172 0.128082047238 0.079974555725 0.0215567124765 \n-0.00519599725585 0.00859036532854 -0.00917362533177 0.00531622236178 0.00461689653806 -0.0167383221206 0.0167018946893 0.00730192633159 -0.0255085470344 -0.0235840021474 -0.00803299970275 -0.00089767250989 \n-0.000234532370612 -0.000180460571656 0.00173968508 -0.00439278842865 0.00688440219802 -0.00610613014798 -0.000791931375747 0.00920878424452 -0.00428397358574 -0.012773065645 -0.00769069788553 -0.00203408796572 \n13\n-0.508941185474 -0.803872775067 -0.837193982362 -0.64592620087 -0.272094396685 0.154044959237 0.394689876938 0.233612542781 -0.195475914508 -0.260402882 0.291771444368 -0.114985716395 0.0187884480988 \n0.78559869505 1.23939515058 1.29072245594 1.00450647558 0.449366284168 -0.190063404131 -0.588188209085 -0.429288477067 0.18143395528 0.434347973119 -0.338774213995 0.0886514835771 -0.00271193884026 \n-0.873885471766 -1.3454706609 -1.31132584448 -0.845755385386 -0.0698848327744 0.702404360938 0.96768931323 0.364583204456 -0.629876169941 -0.569291691528 0.79909850332 -0.345264910189 0.0613938052175 \n0.584174712306 0.844922822022 0.695138760622 0.240989371686 -0.319215169527 -0.664424707625 -0.508605241207 0.0536438844723 0.374214099224 -0.0260315335386 -0.117817828678 0.0479586466148 -0.00402373758562 \n-0.389215526734 -0.516714466085 -0.296370725919 0.187490775453 0.743627011131 1.04467276904 0.755141100078 -0.113921862591 -0.819714244955 -0.313658680537 0.841955409928 -0.429534723027 0.0867760972372 \n-0.262929043508 -0.560808234586 -0.917990770505 -1.20334560932 -1.11701379606 -0.397639042836 0.743576289186 1.26064178642 0.0784848388818 -1.44310583857 0.930805177029 -0.223725831864 0.0040678676315 \n0.395621193663 0.663588325086 0.747903980888 0.571356781388 0.0480167556787 -0.687782327016 -1.09788389471 -0.502428722378 0.824629069601 0.873101273389 -1.22319946054 0.540481544622 -0.0988817708734 \n0.0233512168763 0.0876160596298 0.223402687257 0.403950731961 0.506970625602 0.336415278724 -0.171119982329 -0.594838481413 -0.180165098473 0.732019047839 -0.43005730241 0.0978211338741 -0.000909919065701 \n-0.100379259149 -0.177656930811 -0.224252752501 -0.214228049115 -0.0974784142235 0.131629369433 0.332964309777 0.22968726436 -0.220201933228 -0.342745251525 0.412445677724 -0.173653409943 0.0306240534657 \n0.00175395968976 -0.00463108076095 -0.0252556550939 -0.058498451826 -0.0870141404234 -0.0728942833148 0.0125089526162 0.108554746131 0.05162941944 -0.145204511022 0.0810698772117 -0.0178659755197 7.24397212896e-05 \n0.0127062693111 0.0231288693096 0.0308737758131 0.0325545955114 0.0199837846869 -0.0115962924028 -0.0464527832422 -0.0405203975688 0.0274996394681 0.0587720714094 -0.0647335728073 0.0264376057671 -0.00455275188814 \n-0.00044977599095 -0.000103769844326 0.00162755884582 0.00474508698506 0.00792539884422 0.00761562790702 8.72647920061e-05 -0.0103613715665 -0.00654682036082 0.0151056874884 -0.00814441560699 0.00175539468082 -5.26199743264e-07 \n-0.000949220099621 -0.00175918441829 -0.00243022613972 -0.00271297411142 -0.00191946682335 0.000524833711916 0.00365188192239 0.00376281019982 -0.00190615054688 -0.00550711241725 0.0057054927945 -0.00227938962469 0.00038572887288 \n0.0 1.54579920003 0.0 1.20048667192 0.0 -0.368585870023 0.0 -0.0556250715415 0.0 0.0283673451367 0.0 -0.00405784866567 0.0 \n-1.57119739023 0.0 3.28532385095 0.0 1.56138978505 0.0 -1.28944283131 0.0 0.300526506803 0.0 -0.0357708514205 0.0 0.00254187377353 \n0.0 -3.36351482662 0.0 4.07478018366 0.0 0.281075596817 0.0 -0.598984586699 0.0 0.144829315907 0.0 -0.0169292189934 0.0 \n-1.16834942445 0.0 -3.97584183405 0.0 5.46924335587 0.0 -1.94983642664 0.0 0.331379446674 0.0 -0.0324733272268 0.0 0.00200649778685 \n0.0 -1.66313533746 0.0 -5.3404995036 0.0 5.82712833698 0.0 -1.96229129499 0.0 0.328411143854 0.0 -0.0321456011138 0.0 \n0.525858087823 0.0 0.203104414007 0.0 -5.19708985257 0.0 2.9860886586 0.0 -0.678530768069 0.0 0.0820984687705 0.0 -0.0059701695707 \n0.0 1.41376738183 0.0 1.79252320773 0.0 -3.7559407185 0.0 1.5498009178 0.0 -0.291369856788 0.0 0.0308345583951 0.0 \n-0.0467024342779 0.0 0.283957813403 0.0 1.55236288045 0.0 -1.04890450293 0.0 0.256728651779 0.0 -0.0325210443791 0.0 0.0024404998502 \n0.0 -0.340134045909 0.0 -0.281262445627 0.0 0.923791338563 0.0 -0.416304904741 0.0 0.0820359117009 0.0 -0.00895269357138 0.0 \n-0.00350791925188 0.0 -0.0682967441732 0.0 -0.228823131465 0.0 0.169682126434 0.0 -0.043268477141 0.0 0.0056224429653 0.0 -0.000429456600104 \n0.0 0.041773877475 0.0 0.0248774718308 0.0 -0.119270796711 0.0 0.0567068305376 0.0 -0.0114981341488 0.0 0.00127879508319 0.0 \n0.000899551965685 0.0 0.00720604086217 0.0 0.0194933107122 0.0 -0.0153745848468 0.0 0.00402743577915 0.0 -0.000532310518974 0.0 4.11497671453e-05 \n0.0 -0.00305802092477 0.0 -0.00135339818666 0.0 0.00916628757494 0.0 -0.00452002028989 0.0 0.000934654936533 0.0 -0.000105333320313 0.0 \n0.508941185474 -0.803872775067 0.837193982362 -0.64592620087 0.272094396685 0.154044959237 -0.394689876938 0.233612542781 0.195475914508 -0.260402882 -0.291771444368 -0.114985716395 -0.0187884480988 \n0.78559869505 -1.23939515058 1.29072245594 -1.00450647558 0.449366284168 0.190063404131 -0.588188209085 0.429288477067 0.18143395528 -0.434347973119 -0.338774213995 -0.0886514835771 -0.00271193884026 \n0.873885471766 -1.3454706609 1.31132584448 -0.845755385386 0.0698848327744 0.702404360938 -0.96768931323 0.364583204456 0.629876169941 -0.569291691528 -0.79909850332 -0.345264910189 -0.0613938052175 \n0.584174712306 -0.844922822022 0.695138760622 -0.240989371686 -0.319215169527 0.664424707625 -0.508605241207 -0.0536438844723 0.374214099224 0.0260315335386 -0.117817828678 -0.0479586466148 -0.00402373758562 \n0.389215526734 -0.516714466085 0.296370725919 0.187490775453 -0.743627011131 1.04467276904 -0.755141100078 -0.113921862591 0.819714244955 -0.313658680537 -0.841955409928 -0.429534723027 -0.0867760972372 \n-0.262929043508 0.560808234586 -0.917990770505 1.20334560932 -1.11701379606 0.397639042836 0.743576289186 -1.26064178642 0.0784848388818 1.44310583857 0.930805177029 0.223725831864 0.0040678676315 \n-0.395621193663 0.663588325086 -0.747903980888 0.571356781388 -0.0480167556787 -0.687782327016 1.09788389471 -0.502428722378 -0.824629069601 0.873101273389 1.22319946054 0.540481544622 0.0988817708734 \n0.0233512168763 -0.0876160596298 0.223402687257 -0.403950731961 0.506970625602 -0.336415278724 -0.171119982329 0.594838481413 -0.180165098473 -0.732019047839 -0.43005730241 -0.0978211338741 -0.000909919065701 \n0.100379259149 -0.177656930811 0.224252752501 -0.214228049115 0.0974784142235 0.131629369433 -0.332964309777 0.22968726436 0.220201933228 -0.342745251525 -0.412445677724 -0.173653409943 -0.0306240534657 \n0.00175395968976 0.00463108076095 -0.0252556550939 0.058498451826 -0.0870141404234 0.0728942833148 0.0125089526162 -0.108554746131 0.05162941944 0.145204511022 0.0810698772117 0.0178659755197 7.24397212896e-05 \n-0.0127062693111 0.0231288693096 -0.0308737758131 0.0325545955114 -0.0199837846869 -0.0115962924028 0.0464527832422 -0.0405203975688 -0.0274996394681 0.0587720714094 0.0647335728073 0.0264376057671 0.00455275188814 \n-0.00044977599095 0.000103769844326 0.00162755884582 -0.00474508698506 0.00792539884422 -0.00761562790702 8.72647920061e-05 0.0103613715665 -0.00654682036082 -0.0151056874884 -0.00814441560699 -0.00175539468082 -5.26199743264e-07 \n0.000949220099621 -0.00175918441829 0.00243022613972 -0.00271297411142 0.00191946682335 0.000524833711916 -0.00365188192239 0.00376281019982 0.00190615054688 -0.00550711241725 -0.0057054927945 -0.00227938962469 -0.00038572887288 \n14\n-0.514423383143 -0.815600965617 -0.857363347207 -0.675673401348 -0.306284484594 0.131704189946 0.407430249467 0.283611268394 -0.163479903539 -0.326596881564 0.299799287347 -0.0919662310204 0.00456990018834 0.00394270967132 \n0.755130828532 1.19011199538 1.2395576948 0.974678462685 0.472341973374 -0.0925269235358 -0.44866738092 -0.371668152316 0.0370960691121 0.256562098677 -0.0403327217351 -0.0686688606151 0.0328528120761 -0.0036766259006 \n-0.886510478498 -1.37309315593 -1.3601449335 -0.919634056923 -0.157427367159 0.640824446362 0.991680269998 0.486742669397 -0.539237723695 -0.717199516266 0.783611780233 -0.263327081885 0.0173763608983 0.0107545709443 \n0.640142905628 0.935546705684 0.789490854686 0.296619940128 -0.360058648727 -0.842162524605 -0.764620906622 -0.0542274725792 0.636728952916 0.303559970348 -0.664827579441 0.334119528963 -0.0677307203167 -0.000941687840598 \n-0.397619285462 -0.536646470693 -0.334838189057 0.124779870355 0.663176090333 0.978165513396 0.757637342423 -0.0149355322552 -0.716679533254 -0.400685125327 0.746050971061 -0.302116127168 0.0290710644393 0.0112229410789 \n-0.0340225890687 -0.190334932022 -0.532775702473 -0.977382474516 -1.28660777646 -1.12727409237 -0.304086606082 0.823189339499 1.15715088502 -0.100381571865 -1.30937101345 0.952475389686 -0.259752232711 0.0112100078023 \n0.419180564528 0.714442543024 0.836331750399 0.703163696022 0.201454627023 -0.584285263836 -1.14868701358 -0.722506497488 0.674550807776 1.15435430365 -1.23266715306 0.420154651773 -0.0293990264947 -0.0170161464703 \n-0.134562174013 -0.167993002035 -0.0424765576348 0.247759415587 0.623470504683 0.83925428574 0.551561236712 -0.292279177679 -0.923399283308 -0.195629691817 1.11542507086 -0.712970150223 0.180671078978 -0.00560497132892 \n-0.110822940958 -0.199713400323 -0.261571050388 -0.268394015661 -0.158510887269 0.0937864072733 0.359731241833 0.321690366925 -0.167105855674 -0.471083045314 0.443652441229 -0.143278357904 0.00876269692503 0.00597105194188 \n0.042142500734 0.0607511268807 0.0427726592328 -0.0184910967223 -0.116716171553 -0.201408558535 -0.172323046696 0.0310155742336 0.241562978253 0.092360170636 -0.314316304253 0.189460315139 -0.0463212277468 0.00115397417149 \n0.0148051367535 0.0274999331392 0.0381355218628 0.0429007328543 0.0313653615563 -0.00500816816214 -0.0523700707099 -0.0583084712916 0.018527055615 0.0850367759204 -0.0744336986454 0.0232445735559 -0.00129175030815 -0.000986559851613 \n-0.00589279926128 -0.00891603560704 -0.00754402891702 -0.000654854999343 0.0119151152997 0.0249222766142 0.0249966368573 0.000110617608255 -0.0321224925003 -0.0169571579498 0.045164394259 -0.0261861315443 0.00624811069352 -0.000129267140433 \n-0.00118785012507 -0.00225090722123 -0.00323558816819 -0.00384336823485 -0.00313828184581 -0.000137669354 0.00437047193933 0.00572569434188 -0.00103022934488 -0.00853470571678 0.0071013800572 -0.00216476922966 0.000111507976124 9.311586069e-05 \n0.000476521212117 0.000739219025944 0.000678818322555 0.000199399765463 -0.000757034016508 -0.00185904509555 -0.00208020836641 -0.000266757928346 0.00252782083264 0.00167833369812 -0.00383891825285 0.00216320557973 -0.000506841583504 8.86946717175e-06 \n0.0 1.53127379662 0.0 1.21939318231 0.0 -0.273416839978 0.0 -0.121215166092 0.0 0.0456247284904 0.0 -0.0064961544559 0.0 0.000519117228988 \n-1.51026165706 0.0 3.441700681 0.0 1.70594992896 0.0 -1.56403973275 0.0 0.409766703713 0.0 -0.0561667353664 0.0 0.00473055088371 0.0 \n0.0 -3.39573845972 0.0 4.12919349798 0.0 0.520949630873 0.0 -0.769559819259 0.0 0.190628755658 0.0 -0.0235116084357 0.0 0.00174293551381 \n-1.28028581126 0.0 -4.26239109689 0.0 5.20602086372 0.0 -1.4460326671 0.0 0.13037003223 0.0 0.00515328941897 0.0 -0.00204228779057 0.0 \n0.0 -1.68149428231 0.0 -5.2768935991 0.0 6.03895661554 0.0 -2.1250157595 0.0 0.374153145677 0.0 -0.0389630665775 0.0 0.0026072993925 \n0.0680451781374 0.0 -0.970182823675 0.0 -6.27798688169 0.0 5.04769195552 0.0 -1.49995500049 0.0 0.235672550316 0.0 -0.0224738598689 0.0 \n0.0 1.47528307601 0.0 1.70324733402 0.0 -4.18018813815 0.0 1.84605547634 0.0 -0.369990602862 0.0 0.0420240866185 0.0 -0.00299261283566 \n0.269124348026 0.0 1.09309874274 0.0 2.29716614269 0.0 -2.47083392796 0.0 0.823476386894 0.0 -0.138511004546 0.0 0.0138339339631 0.0 \n0.0 -0.368377066599 0.0 -0.25031597582 0.0 1.09541492751 0.0 -0.532125648046 0.0 0.112076628038 0.0 -0.0131444637268 0.0 0.000957348161154 \n-0.084285001468 0.0 -0.275194865931 0.0 -0.419149569685 0.0 0.533294232713 0.0 -0.188229429684 0.0 0.0327371273182 0.0 -0.00334466626053 0.0 \n0.0 0.0475731320186 0.0 0.0197506904472 0.0 -0.151679196003 0.0 0.0780187935387 0.0 -0.0169257682829 0.0 0.00202382099231 0.0 -0.00014944178955 \n0.0117855985226 0.0 0.0350818251316 0.0 0.0451194160058 0.0 -0.0643670596192 0.0 0.023563582429 0.0 -0.00418710872671 0.0 0.00043414993123 0.0 \n0.0 -0.0037278528664 0.0 -0.000863495732287 0.0 0.0126735556357 0.0 -0.00677573232973 0.0 0.00149980467058 0.0 -0.000181738588455 0.0 1.35494565166e-05 \n-0.000953042424235 0.0 -0.00269211064163 0.0 -0.00311234222097 0.0 0.00482554252727 0.0 -0.00181209167803 0.0 0.000326909402619 0.0 -3.42562895097e-05 0.0 \n0.514423383143 -0.815600965617 0.857363347207 -0.675673401348 0.306284484594 0.131704189946 -0.407430249467 0.283611268394 0.163479903539 -0.326596881564 -0.299799287347 -0.0919662310204 -0.00456990018834 0.00394270967132 \n0.755130828532 -1.19011199538 1.2395576948 -0.974678462685 0.472341973374 0.0925269235358 -0.44866738092 0.371668152316 0.0370960691121 -0.256562098677 -0.0403327217351 0.0686688606151 0.0328528120761 0.0036766259006 \n0.886510478498 -1.37309315593 1.3601449335 -0.919634056923 0.157427367159 0.640824446362 -0.991680269998 0.486742669397 0.539237723695 -0.717199516266 -0.783611780233 -0.263327081885 -0.0173763608983 0.0107545709443 \n0.640142905628 -0.935546705684 0.789490854686 -0.296619940128 -0.360058648727 0.842162524605 -0.764620906622 0.0542274725792 0.636728952916 -0.303559970348 -0.664827579441 -0.334119528963 -0.0677307203167 0.000941687840598 \n0.397619285462 -0.536646470693 0.334838189057 0.124779870355 -0.663176090333 0.978165513396 -0.757637342423 -0.0149355322552 0.716679533254 -0.400685125327 -0.746050971061 -0.302116127168 -0.0290710644393 0.0112229410789 \n-0.0340225890687 0.190334932022 -0.532775702473 0.977382474516 -1.28660777646 1.12727409237 -0.304086606082 -0.823189339499 1.15715088502 0.100381571865 -1.30937101345 -0.952475389686 -0.259752232711 -0.0112100078023 \n-0.419180564528 0.714442543024 -0.836331750399 0.703163696022 -0.201454627023 -0.584285263836 1.14868701358 -0.722506497488 -0.674550807776 1.15435430365 1.23266715306 0.420154651773 0.0293990264947 -0.0170161464703 \n-0.134562174013 0.167993002035 -0.0424765576348 -0.247759415587 0.623470504683 -0.83925428574 0.551561236712 0.292279177679 -0.923399283308 0.195629691817 1.11542507086 0.712970150223 0.180671078978 0.00560497132892 \n0.110822940958 -0.199713400323 0.261571050388 -0.268394015661 0.158510887269 0.0937864072733 -0.359731241833 0.321690366925 0.167105855674 -0.471083045314 -0.443652441229 -0.143278357904 -0.00876269692503 0.00597105194188 \n0.042142500734 -0.0607511268807 0.0427726592328 0.0184910967223 -0.116716171553 0.201408558535 -0.172323046696 -0.0310155742336 0.241562978253 -0.092360170636 -0.314316304253 -0.189460315139 -0.0463212277468 -0.00115397417149 \n-0.0148051367535 0.0274999331392 -0.0381355218628 0.0429007328543 -0.0313653615563 -0.00500816816214 0.0523700707099 -0.0583084712916 -0.018527055615 0.0850367759204 0.0744336986454 0.0232445735559 0.00129175030815 -0.000986559851613 \n-0.00589279926128 0.00891603560704 -0.00754402891702 0.000654854999343 0.0119151152997 -0.0249222766142 0.0249966368573 -0.000110617608255 -0.0321224925003 0.0169571579498 0.045164394259 0.0261861315443 0.00624811069352 0.000129267140433 \n0.00118785012507 -0.00225090722123 0.00323558816819 -0.00384336823485 0.00313828184581 -0.000137669354 -0.00437047193933 0.00572569434188 0.00103022934488 -0.00853470571678 -0.0071013800572 -0.00216476922966 -0.000111507976124 9.311586069e-05 \n0.000476521212117 -0.000739219025944 0.000678818322555 -0.000199399765463 -0.000757034016508 0.00185904509555 -0.00208020836641 0.000266757928346 0.00252782083264 -0.00167833369812 -0.00383891825285 -0.00216320557973 -0.000506841583504 -8.86946717175e-06 \n15\n-0.513541728135 -0.827278754922 -0.906320794228 -0.788411571237 -0.491413247349 -0.0806068684808 0.295042490241 0.421818155274 0.167907666988 -0.251037969809 -0.26604634774 0.330943421218 -0.119969480035 0.00872427936331 0.00555008155104 \n0.796258682179 1.26392417615 1.33751173281 1.08285274798 0.55768393613 -0.0839646003801 -0.562399984532 -0.569701614632 -0.0601139684179 0.447363624859 0.205413793313 -0.475075989342 0.249253494769 -0.0525758645837 -0.00117997582361 \n-0.884768081711 -1.39809616606 -1.46430718033 -1.15912440376 -0.55038427062 0.190519290831 0.753839334786 0.780737535445 0.163863807104 -0.558501779147 -0.416358595332 0.634864002655 -0.247786664229 0.0212615730958 0.0110132476217 \n0.774865304737 1.17722739423 1.10994121287 0.649984166797 -0.0822124565782 -0.816294006107 -1.13872088644 -0.701994037877 0.322213944855 0.931306250278 0.133113800207 -0.99550091655 0.643947396215 -0.163534253633 0.00304975392281 \n-0.397221350814 -0.548344006031 -0.381676444423 0.0181660977811 0.489153249692 0.779763108446 0.654389695271 0.117095690209 -0.406237843756 -0.335367731661 0.218128254954 0.0968309869924 -0.0905422857503 0.016861481962 0.00275793241592 \n0.145825946572 0.132201932758 -0.105368819892 -0.506551311084 -0.917252130188 -1.09473081319 -0.80492037458 -0.0407397620643 0.740827894198 0.740186461049 -0.250356290952 -0.821476401105 0.693258908051 -0.208217377029 0.0105563992314 \n0.415214370625 0.765122158483 1.04943656241 1.1942658401 1.00822802189 0.341332305238 -0.658130544529 -1.32423295724 -0.770276430455 0.822722651141 1.23693569817 -1.42516226755 0.51407565586 -0.0379528644866 -0.023803920835 \n-0.355802941515 -0.564866068635 -0.568663282167 -0.332403477934 0.167422421491 0.79708537482 1.16619497802 0.771529435738 -0.407302240506 -1.22715224778 -0.19503133335 1.47246288915 -0.9902082791 0.262532206474 -0.00740611862239 \n-0.10865099341 -0.224577150236 -0.367148894022 -0.51228147647 -0.559662325464 -0.367021724718 0.114662240315 0.619923040512 0.551950095884 -0.303244992413 -0.787208186606 0.774739572587 -0.260898742877 0.0160279670765 0.0125560567807 \n0.121513134036 0.203150378457 0.231623045679 0.189831425375 0.0472179237716 -0.185870870325 -0.392555317039 -0.350862499723 0.0556230398479 0.461987423756 0.157493585845 -0.595587028762 0.373780493819 -0.0948429352703 0.00188035812768 \n0.0142888115575 0.0329309815851 0.0613876208211 0.0967209440784 0.119982239841 0.0968924094884 0.00198129107454 -0.12401569291 -0.140450525411 0.0473924789216 0.198110646271 -0.179753926777 0.0582370305082 -0.0031619044252 -0.00286578827658 \n-0.0202895458479 -0.0347487100245 -0.0418123746763 -0.0384734640746 -0.0178753340767 0.0220351733746 0.0649000513725 0.0694214750679 0.00174060305237 -0.0839351404456 -0.0407220056142 0.116430092186 -0.0699995681791 0.0172674611914 -0.00024745566847 \n-0.00111848665872 -0.00292333143031 -0.00613918149771 -0.0105779831279 -0.0142390086863 -0.0129160815361 -0.00246575290173 0.013934430524 0.0189029294549 -0.00374349995235 -0.0271314729308 0.0233009468713 -0.00734605314118 0.000361381816357 0.000367310470683 \n0.00203936261524 0.00354388510939 0.00440039304211 0.00430850430277 0.00248328075603 -0.00153766399943 -0.00640698957572 -0.00779618067903 -0.00116427526312 0.00894180160472 0.00552205637144 -0.0133480079959 0.00777897766043 -0.00187926968748 1.91881422525e-05 \n5.60427316252e-05 0.000171527187539 0.000404183389033 0.000747752825697 0.00106623838241 0.0010425758791 0.00031204602942 -0.000989992991343 -0.00155242935165 0.000141638411174 0.00229279636983 -0.00189096923529 0.000583979967392 -2.64502089482e-05 -2.95600440035e-05 \n0.0 1.56073766634 0.0 1.45924887119 0.0 0.183768305557 0.0 -0.567747770093 0.0 0.189837410076 0.0 -0.0307357459161 0.0 0.00299353466379 0.0 \n-1.59251736436 0.0 3.28570987532 0.0 1.69313649389 0.0 -1.1658955206 0.0 0.173455600959 0.0 0.00384376339068 0.0 -0.00385386004854 0.0 0.000511882853236 \n0.0 -3.33366074797 0.0 4.63764861363 0.0 1.49133964584 0.0 -1.71659358857 0.0 0.496339489607 0.0 -0.0748735585405 0.0 0.00698360499053 0.0 \n-1.54973060947 0.0 -4.7741719922 0.0 5.16124612243 0.0 -0.143386101006 0.0 -0.641223631396 0.0 0.200797045054 0.0 -0.0299868615217 0.0 0.00271356970561 \n0.0 -1.65534223509 0.0 -5.05363927772 0.0 6.46862486894 0.0 -2.5421999918 0.0 0.508413475444 0.0 -0.0614562041959 0.0 0.00489551820386 0.0 \n-0.291651893144 0.0 -1.65411957708 0.0 -6.34032180264 0.0 6.78520144191 0.0 -2.52767354853 0.0 0.495976450825 0.0 -0.0596142341837 0.0 0.00474262267104 \n0.0 1.34644522061 0.0 0.657439616419 0.0 -6.1722823546 0.0 3.79229024485 0.0 -0.998615586411 0.0 0.147690455512 0.0 -0.0137794360067 0.0 \n0.71160588303 0.0 1.93365382205 0.0 2.37111412359 0.0 -4.60959094533 0.0 2.08999144235 0.0 -0.459568881452 0.0 0.0596796191832 0.0 -0.00502285645595 \n0.0 -0.303601858544 0.0 0.27067634808 0.0 2.08586022657 0.0 -1.50085310978 0.0 0.425162217207 0.0 -0.0657991524769 0.0 0.00633536223247 0.0 \n-0.243026268071 0.0 -0.57659349482 0.0 -0.445157753905 0.0 1.30079723984 0.0 -0.642985058756 0.0 0.148061857214 0.0 -0.0198184336327 0.0 0.00170450015236 \n0.0 0.0331338259397 0.0 -0.0955158667682 0.0 -0.370446866664 0.0 0.292180835432 0.0 -0.0861732746708 0.0 0.0136742558612 0.0 -0.00133981470502 0.0 \n0.0405790916959 0.0 0.08972569326 0.0 0.0497498543128 0.0 -0.203613411182 0.0 0.106110321342 0.0 -0.02512760454 0.0 0.00342628175602 0.0 -0.000298653246646 \n0.0 -0.00190243982214 0.0 0.0135977396797 0.0 0.0400730372928 0.0 -0.0336223184765 0.0 0.010184237295 0.0 -0.00164333891064 0.0 0.000162933791647 0.0 \n-0.00407872523048 0.0 -0.00862099528496 0.0 -0.00360493951254 0.0 0.0199447237204 0.0 -0.0107795109719 0.0 0.00260250155789 0.0 -0.000359496254633 0.0 3.16344236076e-05 \n0.0 4.52210399248e-05 0.0 -0.00112740396002 0.0 -0.0028513935932 0.0 0.00250098853968 0.0 -0.000772087017283 0.0 0.000126097153794 0.0 -1.26107908692e-05 0.0 \n0.513541728135 -0.827278754922 0.906320794228 -0.788411571237 0.491413247349 -0.0806068684808 -0.295042490241 0.421818155274 -0.167907666988 -0.251037969809 0.26604634774 0.330943421218 0.119969480035 0.00872427936331 -0.00555008155104 \n0.796258682179 -1.26392417615 1.33751173281 -1.08285274798 0.55768393613 0.0839646003801 -0.562399984532 0.569701614632 -0.0601139684179 -0.447363624859 0.205413793313 0.475075989342 0.249253494769 0.0525758645837 -0.00117997582361 \n0.884768081711 -1.39809616606 1.46430718033 -1.15912440376 0.55038427062 0.190519290831 -0.753839334786 0.780737535445 -0.163863807104 -0.558501779147 0.416358595332 0.634864002655 0.247786664229 0.0212615730958 -0.0110132476217 \n0.774865304737 -1.17722739423 1.10994121287 -0.649984166797 -0.0822124565782 0.816294006107 -1.13872088644 0.701994037877 0.322213944855 -0.931306250278 0.133113800207 0.99550091655 0.643947396215 0.163534253633 0.00304975392281 \n0.397221350814 -0.548344006031 0.381676444423 0.0181660977811 -0.489153249692 0.779763108446 -0.654389695271 0.117095690209 0.406237843756 -0.335367731661 -0.218128254954 0.0968309869924 0.0905422857503 0.016861481962 -0.00275793241592 \n0.145825946572 -0.132201932758 -0.105368819892 0.506551311084 -0.917252130188 1.09473081319 -0.80492037458 0.0407397620643 0.740827894198 -0.740186461049 -0.250356290952 0.821476401105 0.693258908051 0.208217377029 0.0105563992314 \n-0.415214370625 0.765122158483 -1.04943656241 1.1942658401 -1.00822802189 0.341332305238 0.658130544529 -1.32423295724 0.770276430455 0.822722651141 -1.23693569817 -1.42516226755 -0.51407565586 -0.0379528644866 0.023803920835 \n-0.355802941515 0.564866068635 -0.568663282167 0.332403477934 0.167422421491 -0.79708537482 1.16619497802 -0.771529435738 -0.407302240506 1.22715224778 -0.19503133335 -1.47246288915 -0.9902082791 -0.262532206474 -0.00740611862239 \n0.10865099341 -0.224577150236 0.367148894022 -0.51228147647 0.559662325464 -0.367021724718 -0.114662240315 0.619923040512 -0.551950095884 -0.303244992413 0.787208186606 0.774739572587 0.260898742877 0.0160279670765 -0.0125560567807 \n0.121513134036 -0.203150378457 0.231623045679 -0.189831425375 0.0472179237716 0.185870870325 -0.392555317039 0.350862499723 0.0556230398479 -0.461987423756 0.157493585845 0.595587028762 0.373780493819 0.0948429352703 0.00188035812768 \n-0.0142888115575 0.0329309815851 -0.0613876208211 0.0967209440784 -0.119982239841 0.0968924094884 -0.00198129107454 -0.12401569291 0.140450525411 0.0473924789216 -0.198110646271 -0.179753926777 -0.0582370305082 -0.0031619044252 0.00286578827658 \n-0.0202895458479 0.0347487100245 -0.0418123746763 0.0384734640746 -0.0178753340767 -0.0220351733746 0.0649000513725 -0.0694214750679 0.00174060305237 0.0839351404456 -0.0407220056142 -0.116430092186 -0.0699995681791 -0.0172674611914 -0.00024745566847 \n0.00111848665872 -0.00292333143031 0.00613918149771 -0.0105779831279 0.0142390086863 -0.0129160815361 0.00246575290173 0.013934430524 -0.0189029294549 -0.00374349995235 0.0271314729308 0.0233009468713 0.00734605314118 0.000361381816357 -0.000367310470683 \n0.00203936261524 -0.00354388510939 0.00440039304211 -0.00430850430277 0.00248328075603 0.00153766399943 -0.00640698957572 0.00779618067903 -0.00116427526312 -0.00894180160472 0.00552205637144 0.0133480079959 0.00777897766043 0.00187926968748 1.91881422525e-05 \n-5.60427316252e-05 0.000171527187539 -0.000404183389033 0.000747752825697 -0.00106623838241 0.0010425758791 -0.00031204602942 -0.000989992991343 0.00155242935165 0.000141638411174 -0.00229279636983 -0.00189096923529 -0.000583979967392 -2.64502089482e-05 2.95600440035e-05 \n16\n-0.483874762302 -0.781503356033 -0.864121504576 -0.773853530438 -0.532880223331 -0.195770783084 0.131783824569 0.30926099611 0.238138513917 -0.0171066421667 -0.190897643886 -0.0605885137886 0.155837046011 -0.0637195528565 0.00299053746517 0.00429026770778 \n0.838683528064 1.35325057976 1.49005856878 1.31434806441 0.854517294131 0.201665664683 -0.440110874205 -0.765735740159 -0.524688021384 0.163231501555 0.606419816037 0.125069647664 -0.658754870495 0.402790333898 -0.0879012536244 -0.00686143031323 \n-0.845370046452 -1.33744182919 -1.40879513195 -1.14100834988 -0.607506159003 0.0350641991024 0.535341028295 0.632311812144 0.261205848509 -0.244834737437 -0.322474861395 0.113178134119 0.124725603267 -0.0791092056014 0.00885842064575 0.00449534270041 \n0.845507764808 1.32573511094 1.36305313207 1.03338623377 0.408496551361 -0.34536145051 -0.939217885779 -1.02901535425 -0.446238432824 0.465707971419 0.800887600339 -0.0104916150813 -0.857785454363 0.594168653375 -0.143593258862 -0.0072781475272 \n-0.453578680218 -0.635819269354 -0.46385465653 -0.0141192746656 0.560125352458 0.988999809084 0.958177275169 0.335007067651 -0.52418972067 -0.768588493768 0.0523854555028 0.835628639158 -0.592344130017 0.139451722189 0.0121411528271 -0.0124517057984 \n0.180427350433 0.204536322062 0.0170336558638 -0.32238381735 -0.683141322233 -0.872281071755 -0.714448132823 -0.20196120959 0.373476284325 0.525390543029 0.0767630159912 -0.364502832716 -0.0236943557225 0.161437437711 -0.0649787198212 0.00338600265658 \n0.222899487925 0.467860544025 0.773842045945 1.0952150984 1.26918504876 1.0783652239 0.39403962159 -0.590128677355 -1.21004820193 -0.683345936667 0.724830873682 1.11352964471 -1.25710517199 0.419359749117 -0.00339676334881 -0.0311094443686 \n-0.481001743103 -0.828312863597 -1.01821655506 -1.01413998751 -0.706133473952 -0.0426822571934 0.808081622178 1.35058747621 0.960760574748 -0.393171688236 -1.37903153454 -0.292805186525 1.68974280092 -1.0867004235 0.252536960292 0.0151283208895 \n0.0455158402315 0.0140244376433 -0.145034042157 -0.430153261908 -0.764282203333 -0.952314360491 -0.725216795812 0.028840119459 0.895460835659 0.898030960313 -0.362140994783 -1.26074077713 1.1492214226 -0.343412666886 -0.00602399533188 0.0269626198071 \n0.186853999268 0.340847998167 0.467041800071 0.547472136218 0.506311274616 0.256612223918 -0.201941738011 -0.652597359049 -0.663219829465 0.019708473381 0.775642711252 0.340397708098 -1.03749821689 0.612537947916 -0.132955363096 -0.0104178811295 \n-0.0333585926432 -0.0408746493285 -0.00750273908755 0.0707827274393 0.182295540103 0.276673449975 0.26086526542 0.0592407403015 -0.24479574905 -0.322771924624 0.0635340700439 0.450195183503 -0.376379780369 0.106868374105 0.00322519932126 -0.00862927777197 \n-0.0363183967644 -0.0685682275083 -0.0997216406926 -0.126573338554 -0.131130805413 -0.0873511821488 0.0173987907008 0.143352391359 0.179073271582 0.0259880335573 -0.192431240337 -0.116285215143 0.27905163117 -0.157167499035 0.0327788372209 0.00293909009465 \n0.00698837532575 0.00964404322843 0.00562034387797 -0.00607723561899 -0.0246955089773 -0.0433312701803 -0.0464081930991 -0.0173410546968 0.0363714323853 0.0590774438298 -0.00370109607491 -0.0841064584447 0.0665029058889 -0.0182389821602 -0.000711834770921 0.00150218477894 \n0.00435537967233 0.00843631969676 0.0127904376365 0.017090711276 0.0189388489252 0.0143885811022 0.000563269695664 -0.018466506698 -0.0269325144936 -0.00714913485262 0.0274554284114 0.0207430471814 -0.0431006300002 0.0234833284269 -0.0047576779782 -0.0004668715905 \n-0.000812878749067 -0.00117657829547 -0.000860472260369 0.00025570076643 0.00217099661535 0.00428365704511 0.00501076153073 0.00237320416866 -0.00339352262501 -0.00657532289429 -0.000279643907512 0.00965383422271 -0.00732820499577 0.00195779675341 8.98145016384e-05 -0.000163751327961 \n-0.000352969432072 -0.000697992793261 -0.00109242906049 -0.00151452325512 -0.00175621143876 -0.00144533613008 -0.000253186259384 0.00155936152639 0.00257651859382 0.000924037388366 -0.00252309468422 -0.00227703664462 0.00428080460643 -0.0022740729318 0.000450401247841 4.72476491738e-05 \n0.0 1.67472563593 0.0 1.68698770469 0.0 0.359509882554 0.0 -0.954639496096 0.0 0.369624364864 0.0 -0.0715965304688 0.0 0.00855595070861 0.0 -0.000690983547374 \n-1.67736705613 0.0 3.22607682462 0.0 2.06459113054 0.0 -0.372927426448 0.0 -0.603007856426 0.0 0.276419156469 0.0 -0.055799220918 0.0 0.00672552730434 0.0 \n0.0 -3.18201182737 0.0 4.94245517533 0.0 1.7292159378 0.0 -2.23374721828 0.0 0.735632951563 0.0 -0.129067718846 0.0 0.0143356299533 0.0 -0.00109225172465 \n-1.69101552962 0.0 -4.87526029147 0.0 5.77268908623 0.0 1.16903480164 0.0 -1.92288311815 0.0 0.650008379849 0.0 -0.115472748335 0.0 0.0129245754725 0.0 \n0.0 -1.870846735 0.0 -5.47724813681 0.0 6.15188304025 0.0 -1.82018011779 0.0 0.169050562632 0.0 0.0163811948419 0.0 -0.00579460542293 0.0 0.000697148803971 \n-0.360854700865 0.0 -1.70677808214 0.0 -6.05322994271 0.0 7.41411025813 0.0 -3.13579418827 0.0 0.707873545329 0.0 -0.0997272125113 0.0 0.00950841541309 0.0 \n0.0 0.608571868797 0.0 -0.809700783851 0.0 -7.29412273343 0.0 6.28660060826 0.0 -2.1613888883 0.0 0.412615063268 0.0 -0.0499287681103 0.0 0.00411436394243 \n0.962003486207 0.0 2.11089654533 0.0 1.28003289097 0.0 -6.94356201478 0.0 4.37259430521 0.0 -1.26020251068 0.0 0.212132475434 0.0 -0.0232427200257 0.0 \n0.0 0.287294109903 0.0 1.44145120587 0.0 2.97503565698 0.0 -3.49240443746 0.0 1.35571757447 0.0 -0.278199056948 0.0 0.0353670344173 0.0 -0.00302123140716 \n-0.373707998537 0.0 -0.667508050001 0.0 0.130479910594 0.0 2.52569709219 0.0 -1.84381365345 0.0 0.569812343573 0.0 -0.100215191752 0.0 0.0113231115446 0.0 \n0.0 -0.149365808184 0.0 -0.456264683264 0.0 -0.643179068172 0.0 0.905985786471 0.0 -0.373386797148 0.0 0.0793010444259 0.0 -0.0103186237086 0.0 0.00089650486513 \n0.0726367935288 0.0 0.111713716822 0.0 -0.092683037996 0.0 -0.505418291987 0.0 0.402535770219 0.0 -0.129338130556 0.0 0.0233071408473 0.0 -0.00267891937999 0.0 \n0.0 0.0291287975314 0.0 0.0748030052618 0.0 0.0861468506265 0.0 -0.137777008632 0.0 0.0589824908253 0.0 -0.0128035980069 0.0 0.00169104417 0.0 -0.00014854140279 \n-0.00871075934467 0.0 -0.011753072757 0.0 0.0171495626265 0.0 0.0637394027394 0.0 -0.0538703641193 0.0 0.0177649575089 0.0 -0.00325414247477 0.0 0.000378416805846 0.0 \n0.0 -0.00327863251724 0.0 -0.00766840329696 0.0 -0.00775328373979 0.0 0.0136329929064 0.0 -0.00599418277546 0.0 0.00132143783956 0.0 -0.000176401438532 0.0 1.5618331542e-05 \n0.000705938864145 0.0 0.000842764000327 0.0 -0.00179409380441 0.0 -0.0054485396903 0.0 0.00480874462357 0.0 -0.00161585754286 0.0 0.000299544428669 0.0 -3.513401482e-05 0.0 \n0.483874762302 -0.781503356033 0.864121504576 -0.773853530438 0.532880223331 -0.195770783084 -0.131783824569 0.30926099611 -0.238138513917 -0.0171066421667 0.190897643886 -0.0605885137886 -0.155837046011 -0.0637195528565 -0.00299053746517 0.00429026770778 \n0.838683528064 -1.35325057976 1.49005856878 -1.31434806441 0.854517294131 -0.201665664683 -0.440110874205 0.765735740159 -0.524688021384 -0.163231501555 0.606419816037 -0.125069647664 -0.658754870495 -0.402790333898 -0.0879012536244 0.00686143031323 \n0.845370046452 -1.33744182919 1.40879513195 -1.14100834988 0.607506159003 0.0350641991024 -0.535341028295 0.632311812144 -0.261205848509 -0.244834737437 0.322474861395 0.113178134119 -0.124725603267 -0.0791092056014 -0.00885842064575 0.00449534270041 \n0.845507764808 -1.32573511094 1.36305313207 -1.03338623377 0.408496551361 0.34536145051 -0.939217885779 1.02901535425 -0.446238432824 -0.465707971419 0.800887600339 0.0104916150813 -0.857785454363 -0.594168653375 -0.143593258862 0.0072781475272 \n0.453578680218 -0.635819269354 0.46385465653 -0.0141192746656 -0.560125352458 0.988999809084 -0.958177275169 0.335007067651 0.52418972067 -0.768588493768 -0.0523854555028 0.835628639158 0.592344130017 0.139451722189 -0.0121411528271 -0.0124517057984 \n0.180427350433 -0.204536322062 0.0170336558638 0.32238381735 -0.683141322233 0.872281071755 -0.714448132823 0.20196120959 0.373476284325 -0.525390543029 0.0767630159912 0.364502832716 -0.0236943557225 -0.161437437711 -0.0649787198212 -0.00338600265658 \n-0.222899487925 0.467860544025 -0.773842045945 1.0952150984 -1.26918504876 1.0783652239 -0.39403962159 -0.590128677355 1.21004820193 -0.683345936667 -0.724830873682 1.11352964471 1.25710517199 0.419359749117 0.00339676334881 -0.0311094443686 \n-0.481001743103 0.828312863597 -1.01821655506 1.01413998751 -0.706133473952 0.0426822571934 0.808081622178 -1.35058747621 0.960760574748 0.393171688236 -1.37903153454 0.292805186525 1.68974280092 1.0867004235 0.252536960292 -0.0151283208895 \n-0.0455158402315 0.0140244376433 0.145034042157 -0.430153261908 0.764282203333 -0.952314360491 0.725216795812 0.028840119459 -0.895460835659 0.898030960313 0.362140994783 -1.26074077713 -1.1492214226 -0.343412666886 0.00602399533188 0.0269626198071 \n0.186853999268 -0.340847998167 0.467041800071 -0.547472136218 0.506311274616 -0.256612223918 -0.201941738011 0.652597359049 -0.663219829465 -0.019708473381 0.775642711252 -0.340397708098 -1.03749821689 -0.612537947916 -0.132955363096 0.0104178811295 \n0.0333585926432 -0.0408746493285 0.00750273908755 0.0707827274393 -0.182295540103 0.276673449975 -0.26086526542 0.0592407403015 0.24479574905 -0.322771924624 -0.0635340700439 0.450195183503 0.376379780369 0.106868374105 -0.00322519932126 -0.00862927777197 \n-0.0363183967644 0.0685682275083 -0.0997216406926 0.126573338554 -0.131130805413 0.0873511821488 0.0173987907008 -0.143352391359 0.179073271582 -0.0259880335573 -0.192431240337 0.116285215143 0.27905163117 0.157167499035 0.0327788372209 -0.00293909009465 \n-0.00698837532575 0.00964404322843 -0.00562034387797 -0.00607723561899 0.0246955089773 -0.0433312701803 0.0464081930991 -0.0173410546968 -0.0363714323853 0.0590774438298 0.00370109607491 -0.0841064584447 -0.0665029058889 -0.0182389821602 0.000711834770921 0.00150218477894 \n0.00435537967233 -0.00843631969676 0.0127904376365 -0.017090711276 0.0189388489252 -0.0143885811022 0.000563269695664 0.018466506698 -0.0269325144936 0.00714913485262 0.0274554284114 -0.0207430471814 -0.0431006300002 -0.0234833284269 -0.0047576779782 0.0004668715905 \n0.000812878749067 -0.00117657829547 0.000860472260369 0.00025570076643 -0.00217099661535 0.00428365704511 -0.00501076153073 0.00237320416866 0.00339352262501 -0.00657532289429 0.000279643907512 0.00965383422271 0.00732820499577 0.00195779675341 -8.98145016384e-05 -0.000163751327961 \n-0.000352969432072 0.000697992793261 -0.00109242906049 0.00151452325512 -0.00175621143876 0.00144533613008 -0.000253186259384 -0.00155936152639 0.00257651859382 -0.000924037388366 -0.00252309468422 0.00227703664462 0.00428080460643 0.0022740729318 0.000450401247841 -4.72476491738e-05 \n"
  },
  {
    "path": "src/madness/mra/ble-second.txt",
    "content": "6\n2.28072486537 2.26118969287 -0.268773488354 -2.67097845416 -1.42826929831 2.5332502429 \n-3.65732149026 -4.07336329296 -0.879135634793 2.93778115556 3.71927899884 1.11711106027 \n-0.3393131806 -2.85045984435 -7.11197895882 -8.18733828322 -0.672679818654 9.26255175257 \n3.42070555079 6.39173043825 7.5042392562 3.61648360607 -5.65942134213 -10.4911788269 \n-0.281944990478 0.0760887349505 1.52909252954 3.05283117296 1.27814754398 -3.88694261006 \n-0.542021527331 -1.10796974301 -1.58827886236 -1.21029574985 0.886302901184 2.74472938533 \n-4.56144973408 0.0 1.20229111092 0.0 0.563580455492 0.0 \n0.0 -17.1919399775 0.0 12.5417395278 0.0 -2.12663866775 \n0.678626353422 0.0 -20.830451884 0.0 6.65783858246 0.0 \n0.0 10.9158823686 0.0 -17.2472359961 0.0 3.88915399841 \n0.563889987065 0.0 5.68595753425 0.0 -2.10641607983 0.0 \n0.0 -1.53929580976 0.0 3.28377587903 0.0 -0.797374888333 \n2.28072486537 -2.26118969287 -0.268773488354 2.67097845416 -1.42826929831 -2.5332502429 \n3.65732149026 -4.07336329296 0.879135634793 2.93778115556 -3.71927899884 1.11711106027 \n-0.3393131806 2.85045984435 -7.11197895882 8.18733828322 -0.672679818654 -9.26255175257 \n-3.42070555079 6.39173043825 -7.5042392562 3.61648360607 5.65942134213 -10.4911788269 \n-0.281944990478 -0.0760887349505 1.52909252954 -3.05283117296 1.27814754398 3.88694261006 \n0.542021527331 -1.10796974301 1.58827886236 -1.21029574985 -0.886302901184 2.74472938533 \n7\n2.26165104499 2.24133810456 -0.251943857943 -2.57376714887 -1.29779242755 2.33232094067 -0.981962274189 \n-3.58603003217 -3.90093046571 -0.555633827914 3.36069611875 3.8240455573 0.0418596442928 -2.21474071551 \n-0.426495555352 -2.94100613657 -7.03439080557 -7.74216326931 -0.0766526398602 8.34368651604 -4.48010223257 \n3.17270774718 5.79189753295 6.3788907261 2.14531181642 -6.02386719701 -6.75075891356 7.70430073575 \n-0.248468239257 0.110880771491 1.49938172615 2.88199455261 1.0492380585 -3.53416866182 1.72131046915 \n-0.483732977634 -0.966987082674 -1.32378081936 -0.864516598887 0.971960999824 1.86559397028 -1.81079231259 \n0.0297587189178 0.0142587646843 -0.0861583934666 -0.234980500924 -0.147992819652 0.335113689346 -0.155665685903 \n-4.52330209364 0.0 1.37289651541 0.0 0.487544591989 0.0 -0.0834954441543 \n0.0 -17.0428839216 0.0 11.8468868402 0.0 -1.9322035329 0.0 \n0.85299110146 0.0 -20.0490174431 0.0 6.3097887843 0.0 -0.611896066993 \n0.0 10.3973689945 0.0 -14.8300889076 0.0 3.21278283587 0.0 \n0.496936485186 0.0 5.38609983427 0.0 -1.97283254077 0.0 0.206534168619 \n0.0 -1.41742621199 0.0 2.71565795161 0.0 -0.638402939599 0.0 \n-0.0595174388639 0.0 -0.40529810724 0.0 0.160201619416 0.0 -0.0174428311897 \n2.26165104499 -2.24133810456 -0.251943857943 2.57376714887 -1.29779242755 -2.33232094067 -0.981962274189 \n3.58603003217 -3.90093046571 0.555633827914 3.36069611875 -3.8240455573 0.0418596442928 2.21474071551 \n-0.426495555352 2.94100613657 -7.03439080557 7.74216326931 -0.0766526398602 -8.34368651604 -4.48010223257 \n-3.17270774718 5.79189753295 -6.3788907261 2.14531181642 6.02386719701 -6.75075891356 -7.70430073575 \n-0.248468239257 -0.110880771491 1.49938172615 -2.88199455261 1.0492380585 3.53416866182 1.72131046915 \n0.483732977634 -0.966987082674 1.32378081936 -0.864516598887 -0.971960999824 1.86559397028 1.81079231259 \n0.0297587189178 -0.0142587646843 -0.0861583934666 0.234980500924 -0.147992819652 -0.335113689346 -0.155665685903 \n8\n3.04659787747 3.46015718739 0.699380813243 -3.08867873966 -4.17591652246 -0.0870743428623 3.93717676716 -2.34868951191 \n-3.57063950269 -3.87361822802 -0.525070081361 3.36703301403 3.75397495819 -0.0814209335709 -1.98231509374 0.847186677666 \n1.54382712277 0.119414808543 -4.64239453842 -9.02679356297 -7.29767465663 2.25034984868 7.88440722831 -5.43474789854 \n3.20885926919 5.88776271059 6.57032614797 2.4026516173 -5.91247903603 -7.03161373194 7.5752809279 -2.52025747609 \n-1.69939094663 -2.14206418916 -0.259228921735 3.8334870097 6.36914007807 0.938649703656 -7.37198698519 4.33580360835 \n-0.50219417072 -1.0111609098 -1.40350746493 -0.959401257418 0.956701399331 2.01062906461 -1.84710873538 0.58855413384 \n0.259402245534 0.370795856995 0.19200250934 -0.385931379036 -0.990152497198 -0.371897468419 1.28280463833 -0.709802769953 \n0.0288173050356 0.060716942446 0.0921249609724 0.07986938035 -0.0464894250234 -0.164289402393 0.138833917886 -0.0431534600726 \n-6.09319575493 0.0 -2.71022066195 0.0 3.76707544972 0.0 -0.687986482538 0.0 \n0.0 -16.9908797042 0.0 11.8459245593 0.0 -1.95291220692 0.0 0.134314951006 \n-3.08765424554 0.0 -30.2904733115 0.0 14.5413657907 0.0 -2.12959694915 0.0 \n0.0 10.456103484 0.0 -15.3923590084 0.0 3.41504475893 0.0 -0.282909852594 \n3.39878189326 0.0 12.9331861456 0.0 -8.03481025139 0.0 1.32390881786 0.0 \n0.0 -1.45698135888 0.0 2.91826371696 0.0 -0.703808205236 0.0 0.0611371112757 \n-0.518804491068 0.0 -1.60015293224 0.0 1.1196775152 0.0 -0.194278767534 0.0 \n0.0 0.0782182493084 0.0 -0.189758228885 0.0 0.0479490936989 0.0 -0.00428055124494 \n3.04659787747 -3.46015718739 0.699380813243 3.08867873966 -4.17591652246 0.0870743428623 3.93717676716 2.34868951191 \n3.57063950269 -3.87361822802 0.525070081361 3.36703301403 -3.75397495819 -0.0814209335709 1.98231509374 0.847186677666 \n1.54382712277 -0.119414808543 -4.64239453842 9.02679356297 -7.29767465663 -2.25034984868 7.88440722831 5.43474789854 \n-3.20885926919 5.88776271059 -6.57032614797 2.4026516173 5.91247903603 -7.03161373194 -7.5752809279 -2.52025747609 \n-1.69939094663 2.14206418916 -0.259228921735 -3.8334870097 6.36914007807 -0.938649703656 -7.37198698519 -4.33580360835 \n0.50219417072 -1.0111609098 1.40350746493 -0.959401257418 -0.956701399331 2.01062906461 1.84710873538 0.58855413384 \n0.259402245534 -0.370795856995 0.19200250934 0.385931379036 -0.990152497198 0.371897468419 1.28280463833 0.709802769953 \n-0.0288173050356 0.060716942446 -0.0921249609724 0.07986938035 0.0464894250234 -0.164289402393 -0.138833917886 -0.0431534600726 \n9\n3.10122252103 3.55249451289 0.79656100298 -3.05413487274 -4.29059209299 -0.28983168817 4.04534673583 -2.26299042314 0.507725268988 \n-3.56234537433 -3.75836945638 -0.12595718564 4.15127826314 4.56643272766 -0.341072991141 -3.58177253081 2.25925506404 -0.633811702255 \n1.64788934699 0.298836182122 -4.44271320634 -8.92736546549 -7.47276127269 1.85516795531 7.95965118583 -5.13062938561 1.22164447775 \n3.28529114747 6.97187019276 10.3322937803 9.80138500626 1.76159887747 -9.46901816874 -7.54187493401 10.820631783 -4.41089986228 \n-1.8316586578 -2.36208989519 -0.479807214386 3.78389405888 6.69076656065 1.42061035766 -7.76651505977 4.27103194454 -0.956751095072 \n-0.532893133734 -1.44594758329 -2.9120436351 -3.92607852481 -2.1201152125 2.98831308756 4.21361148444 -4.76016855069 1.82841669805 \n0.290024841155 0.420908307474 0.239643908057 -0.382369712489 -1.07483807243 -0.48138991261 1.40499105105 -0.728009287874 0.159055638713 \n0.0326162149951 0.114509628278 0.278760333706 0.446901802654 0.334164102654 -0.285254094559 -0.610967895283 0.618563710413 -0.230280518825 \n-0.0171008499981 -0.0259783746158 -0.0185125713827 0.0151181286252 0.0628613644393 0.0411057838618 -0.0927587186905 0.0463550576071 -0.00997047281477 \n-6.2024450377 0.0 -2.93982906523 0.0 4.04335952158 0.0 -0.755588317684 0.0 0.0562274372266 \n0.0 -17.163913816 0.0 10.1250003409 0.0 -1.19367527312 0.0 0.0247709191398 0.0 \n-3.2957786872 0.0 -30.7025325171 0.0 15.0931842179 0.0 -2.27166319082 0.0 0.153015245372 \n0.0 8.81742435717 0.0 -31.6277401796 0.0 10.5799400424 0.0 -1.31679190172 0.0 \n3.66331730347 0.0 13.5148307254 0.0 -8.67796926467 0.0 1.4741380492 0.0 -0.106943693569 \n0.0 -0.800096765601 0.0 9.42819134471 0.0 -3.5766684502 0.0 0.475683154789 0.0 \n-0.580049679137 0.0 -1.7407865229 0.0 1.26257307674 0.0 -0.225928858959 0.0 0.0169244522357 \n0.0 -0.00304749015432 0.0 -0.995157254665 0.0 0.403374817545 0.0 -0.0555676207347 0.0 \n0.0342016996844 0.0 0.0934337569963 0.0 -0.0728913532716 0.0 0.0134573981301 0.0 -0.00102827056321 \n3.10122252103 -3.55249451289 0.79656100298 3.05413487274 -4.29059209299 0.28983168817 4.04534673583 2.26299042314 0.507725268988 \n3.56234537433 -3.75836945638 0.12595718564 4.15127826314 -4.56643272766 -0.341072991141 3.58177253081 2.25925506404 0.633811702255 \n1.64788934699 -0.298836182122 -4.44271320634 8.92736546549 -7.47276127269 -1.85516795531 7.95965118583 5.13062938561 1.22164447775 \n-3.28529114747 6.97187019276 -10.3322937803 9.80138500626 -1.76159887747 -9.46901816874 7.54187493401 10.820631783 4.41089986228 \n-1.8316586578 2.36208989519 -0.479807214386 -3.78389405888 6.69076656065 -1.42061035766 -7.76651505977 -4.27103194454 -0.956751095072 \n0.532893133734 -1.44594758329 2.9120436351 -3.92607852481 2.1201152125 2.98831308756 -4.21361148444 -4.76016855069 -1.82841669805 \n0.290024841155 -0.420908307474 0.239643908057 0.382369712489 -1.07483807243 0.48138991261 1.40499105105 0.728009287874 0.159055638713 \n-0.0326162149951 0.114509628278 -0.278760333706 0.446901802654 -0.334164102654 -0.285254094559 0.610967895283 0.618563710413 0.230280518825 \n-0.0171008499981 0.0259783746158 -0.0185125713827 -0.0151181286252 0.0628613644393 -0.0411057838618 -0.0927587186905 -0.0463550576071 -0.00997047281477 \n10\n3.95193879161 5.12503006646 2.86435425661 -1.23876416507 -4.41354222166 -3.64782324468 1.06959423159 3.50372889216 -2.45320526418 0.633245489051 \n-4.39512547222 -4.87828054804 -0.576207472884 5.59778574992 8.59636184946 4.0452696534 -5.09728227296 -5.54594682227 6.68302461108 -2.70385271014 \n2.91176403761 2.63446988592 -1.37320060101 -6.23619188677 -7.66363335452 -3.1357058843 3.55714448755 3.42925907496 -3.18177502047 0.903883241035 \n1.50872610777 4.58391122458 9.37623323449 12.8968741969 10.3711800602 -0.108275921745 -10.7951598568 -5.84087280625 11.2305100723 -5.1715047459 \n-4.342904751 -7.00542238139 -6.58924321517 -1.58764753141 7.03627599211 11.3310900788 1.06303973065 -12.7839891821 7.78812031754 -1.90809529669 \n0.774855029977 0.312857277427 -2.20440960409 -6.19655876654 -8.44796641813 -3.90170899536 6.59098474967 7.50707566446 -9.67360433845 4.06789816463 \n0.989164097846 1.71397348868 1.94195426114 1.11639055369 -1.16652768895 -3.24014385084 -1.06537059854 4.02967854563 -2.27773868367 0.539447825236 \n-0.228825429422 -0.237291618068 0.136581392438 0.899337821522 1.59752857024 1.09231436127 -1.08306522738 -1.8354564385 2.06855604367 -0.837250222304 \n-0.0918221568463 -0.164219715961 -0.200628436058 -0.145480819955 0.0720983684691 0.335939289903 0.172876546337 -0.463552087145 0.250941064544 -0.0582403068148 \n0.0219833531106 0.0265298027225 0.000525658246833 -0.0606310981434 -0.129176074523 -0.109410439588 0.0759246123269 0.181646362509 -0.188893932918 0.0745889600344 \n-7.90387758467 0.0 -5.54091409374 0.0 9.46892190974 0.0 -2.41210703054 0.0 0.25954194303 0.0 \n0.0 -20.6937613989 0.0 2.27218656537 0.0 4.96607450194 0.0 -1.33894134987 0.0 0.140940663794 \n-5.82352807526 0.0 -34.5713947009 0.0 23.1457327825 0.0 -4.72815600109 0.0 0.454259797993 0.0 \n0.0 1.28493864339 0.0 -48.3985574863 0.0 23.7250047715 0.0 -4.22524042309 0.0 0.372697757183 \n8.68580951197 0.0 21.1833147048 0.0 -24.7082938831 0.0 6.37206955613 0.0 -0.708483347293 0.0 \n0.0 4.74263856824 0.0 21.7566664351 0.0 -13.2470643974 0.0 2.61639548935 0.0 -0.24633257259 \n-1.97832820002 0.0 -3.87320434177 0.0 5.72902938639 0.0 -1.59148142118 0.0 0.184723003497 0.0 \n0.0 -1.11076584357 0.0 -3.45670218729 0.0 2.33540493692 0.0 -0.483408593347 0.0 0.0468760792111 \n0.183644314366 0.0 0.321023136681 0.0 -0.550658225568 0.0 0.159623192597 0.0 -0.0189978137919 0.0 \n0.0 0.0992455326402 0.0 0.261354351465 0.0 -0.188401888965 0.0 0.0401518801183 0.0 -0.00396721966893 \n3.95193879161 -5.12503006646 2.86435425661 1.23876416507 -4.41354222166 3.64782324468 1.06959423159 -3.50372889216 -2.45320526418 -0.633245489051 \n4.39512547222 -4.87828054804 0.576207472884 5.59778574992 -8.59636184946 4.0452696534 5.09728227296 -5.54594682227 -6.68302461108 -2.70385271014 \n2.91176403761 -2.63446988592 -1.37320060101 6.23619188677 -7.66363335452 3.1357058843 3.55714448755 -3.42925907496 -3.18177502047 -0.903883241035 \n-1.50872610777 4.58391122458 -9.37623323449 12.8968741969 -10.3711800602 -0.108275921745 10.7951598568 -5.84087280625 -11.2305100723 -5.1715047459 \n-4.342904751 7.00542238139 -6.58924321517 1.58764753141 7.03627599211 -11.3310900788 1.06303973065 12.7839891821 7.78812031754 1.90809529669 \n-0.774855029977 0.312857277427 2.20440960409 -6.19655876654 8.44796641813 -3.90170899536 -6.59098474967 7.50707566446 9.67360433845 4.06789816463 \n0.989164097846 -1.71397348868 1.94195426114 -1.11639055369 -1.16652768895 3.24014385084 -1.06537059854 -4.02967854563 -2.27773868367 -0.539447825236 \n0.228825429422 -0.237291618068 -0.136581392438 0.899337821522 -1.59752857024 1.09231436127 1.08306522738 -1.8354564385 -2.06855604367 -0.837250222304 \n-0.0918221568463 0.164219715961 -0.200628436058 0.145480819955 0.0720983684691 -0.335939289903 0.172876546337 0.463552087145 0.250941064544 0.0582403068148 \n-0.0219833531106 0.0265298027225 -0.000525658246833 -0.0606310981434 0.129176074523 -0.109410439588 -0.0759246123269 0.181646362509 0.188893932918 0.0745889600344 \n11\n4.14533357248 5.56689287801 3.6693219923 -0.0587288030346 -3.26993450962 -3.56873478784 -0.679975600415 1.9933437018 0.693912627225 -1.16393117595 0.434598775747 \n-4.50646122446 -5.04980062296 -0.722264946794 5.60130037302 8.87600840048 4.52981422419 -4.92454973643 -6.18560959034 6.80095094346 -2.50350805595 0.377648559862 \n2.8906330316 2.5863216432 -1.46064064918 -6.36397106974 -7.78684334321 -3.1430220382 3.74715659603 3.59016865451 -3.52131304005 1.09888016553 -0.13600061229 \n1.33833117583 4.31443248536 9.12492998687 12.8393796407 10.7083774402 0.585170031179 -10.41333408 -6.60693147287 11.0260477342 -4.61500661643 0.763335161589 \n-5.76128183403 -10.2456822009 -12.4913645076 -10.2385555218 -1.34562599499 10.7551901933 13.8909791944 -1.71981351676 -15.2790898292 11.2678123057 -3.42378514532 \n0.959983925907 0.596289025115 -1.96859925009 -6.21837538901 -8.93603103844 -4.71964994631 6.33359179974 8.62486919944 -9.96754910566 3.79826443371 -0.59130467111 \n1.62387067295 3.16388662516 4.5828312767 4.98699997335 2.58340907287 -2.98309834643 -6.80514352001 -0.919193678609 8.04206402025 -5.35562815555 1.55844515977 \n-0.27722047917 -0.310107143067 0.080022713415 0.916555352755 1.74174333287 1.31495361471 -1.03728726717 -2.16668045665 2.21591963151 -0.8125370706 0.123197306417 \n-0.193919420255 -0.397439728866 -0.62539661122 -0.768014231391 -0.530980020197 0.294689714213 1.09607647986 0.332166789877 -1.40867038975 0.889848228626 -0.252926140621 \n0.0275960738634 0.0348520111135 0.00659649716056 -0.0637344930912 -0.147499844282 -0.136079414958 0.0726821039358 0.223812642931 -0.212764590111 0.0761229992697 -0.01134461348 \n0.0121378997702 0.0257716837617 0.042722796199 0.0562008855232 0.0448303691889 -0.0130096504375 -0.0826955026371 -0.0370466936816 0.115800636695 -0.0706035353991 0.0197475453371 \n-8.29066714496 0.0 -5.49486651957 0.0 12.4927323243 0.0 -3.86667039708 0.0 0.51931946217 0.0 -0.0377744704308 \n0.0 -21.1220780171 0.0 1.56793507063 0.0 5.73581121478 0.0 -1.55200713647 0.0 0.168076020823 0.0 \n-5.78126606319 0.0 -34.5754195863 0.0 22.8184691223 0.0 -4.5712020503 0.0 0.426295065898 0.0 -0.0211220707798 \n0.0 0.643365349007 0.0 -49.368561106 0.0 24.8980168264 0.0 -4.56713910025 0.0 0.418120080964 0.0 \n11.5225636681 0.0 20.8487166654 0.0 -46.8755604093 0.0 17.0338964209 0.0 -2.61243150092 0.0 0.211396271473 \n0.0 5.45838577579 0.0 22.9550822876 0.0 -14.5282478212 0.0 2.9666573617 0.0 -0.290462773618 0.0 \n-3.2477413459 0.0 -3.72396423296 0.0 15.6471156343 0.0 -6.36158596107 0.0 1.03652202701 0.0 -0.0872698772101 \n0.0 -1.30042556048 0.0 -3.78972832196 0.0 2.67124102592 0.0 -0.572073906762 0.0 0.0576989233169 0.0 \n0.387838840509 0.0 0.297087483352 0.0 -2.14584171218 0.0 0.926797626321 0.0 -0.155988829555 0.0 0.0134198754893 \n0.0 0.121487189401 0.0 0.301875154239 0.0 -0.227439135526 0.0 0.0501564122951 0.0 -0.00515383858476 0.0 \n-0.0242757995404 0.0 -0.0118864116746 0.0 0.14984279186 0.0 -0.0672965057993 0.0 0.0115699418299 0.0 -0.00100981436653 \n4.14533357248 -5.56689287801 3.6693219923 0.0587288030346 -3.26993450962 3.56873478784 -0.679975600415 -1.9933437018 0.693912627225 1.16393117595 0.434598775747 \n4.50646122446 -5.04980062296 0.722264946794 5.60130037302 -8.87600840048 4.52981422419 4.92454973643 -6.18560959034 -6.80095094346 -2.50350805595 -0.377648559862 \n2.8906330316 -2.5863216432 -1.46064064918 6.36397106974 -7.78684334321 3.1430220382 3.74715659603 -3.59016865451 -3.52131304005 -1.09888016553 -0.13600061229 \n-1.33833117583 4.31443248536 -9.12492998687 12.8393796407 -10.7083774402 0.585170031179 10.41333408 -6.60693147287 -11.0260477342 -4.61500661643 -0.763335161589 \n-5.76128183403 10.2456822009 -12.4913645076 10.2385555218 -1.34562599499 -10.7551901933 13.8909791944 1.71981351676 -15.2790898292 -11.2678123057 -3.42378514532 \n-0.959983925907 0.596289025115 1.96859925009 -6.21837538901 8.93603103844 -4.71964994631 -6.33359179974 8.62486919944 9.96754910566 3.79826443371 0.59130467111 \n1.62387067295 -3.16388662516 4.5828312767 -4.98699997335 2.58340907287 2.98309834643 -6.80514352001 0.919193678609 8.04206402025 5.35562815555 1.55844515977 \n0.27722047917 -0.310107143067 -0.080022713415 0.916555352755 -1.74174333287 1.31495361471 1.03728726717 -2.16668045665 -2.21591963151 -0.8125370706 -0.123197306417 \n-0.193919420255 0.397439728866 -0.62539661122 0.768014231391 -0.530980020197 -0.294689714213 1.09607647986 -0.332166789877 -1.40867038975 -0.889848228626 -0.252926140621 \n-0.0275960738634 0.0348520111135 -0.00659649716056 -0.0637344930912 0.147499844282 -0.136079414958 -0.0726821039358 0.223812642931 0.212764590111 0.0761229992697 0.01134461348 \n0.0121378997702 -0.0257716837617 0.042722796199 -0.0562008855232 0.0448303691889 0.0130096504375 -0.0826955026371 0.0370466936816 0.115800636695 0.0706035353991 0.0197475453371 \n12\n4.22406065195 5.63313435592 3.56499732657 -0.508340896491 -4.12971492381 -4.52071990011 -0.862253731957 3.21712355099 1.74722347911 -3.29059839437 1.61991357877 -0.359977448094 \n-6.33186661534 -8.17634321569 -4.36967370735 2.80841899599 9.26763989398 9.95738874308 2.58761980922 -6.96451505399 -5.64316392656 7.85140421476 -3.03029823574 0.384136436744 \n3.31498165455 2.92768409718 -2.08307373989 -8.91872017306 -12.6133636388 -8.42685145254 2.83172849408 10.4888798435 2.18317481138 -10.7414400531 6.55839575483 -1.71627526708 \n-0.503613005384 1.16226256037 5.45527784656 10.0462238726 11.1426305537 6.09321282899 -2.85743635944 -7.4868863767 -1.46798496746 5.86443313131 -2.72259680767 0.405481526812 \n-4.84851531097 -9.52992907567 -13.901174273 -15.8889142454 -11.954904707 -0.791606562183 12.0001909886 13.4792540599 -2.96920953069 -14.6643952293 11.3522098126 -3.39149079829 \n4.42855870293 6.54004970932 4.97331901265 -0.885576146319 -9.64085870849 -15.005414225 -7.97576345221 10.0036616389 13.798899333 -15.9170163611 5.87817025713 -0.717761627821 \n0.897844169928 2.58459580535 5.66606512916 9.39830415649 10.9012702677 6.10692032105 -5.25700007595 -12.8222338144 -1.74605341326 15.0645146451 -10.0290328469 2.79250845364 \n-1.43657076806 -2.29794130148 -2.24494353641 -0.876665647333 1.96088727598 4.74114782287 3.75947915119 -2.58562396999 -5.77462714001 5.78911471222 -2.03397503247 0.235408710361 \n-0.0143845047643 -0.252438423784 -0.886572097778 -1.84433452735 -2.56683963315 -1.93697265481 0.705208261435 3.24384088367 1.01363849005 -4.12927144928 2.58843151898 -0.699080866628 \n0.194691969081 0.321525615332 0.342368297964 0.196277217481 -0.176726862221 -0.628283524199 -0.620875502149 0.278051140033 0.946732723887 -0.878449886595 0.299624635179 -0.0335354010544 \n-0.00937411687296 0.00817668292905 0.0731744787433 0.18334104352 0.286138213275 0.252390214772 -0.0348250840203 -0.382006412851 -0.174883907202 0.52744515478 -0.318100209501 0.0842050462559 \n-0.0141798374922 -0.0238303128993 -0.0265352908741 -0.0177201221049 0.00849165723075 0.0444627797421 0.0510122257321 -0.0150299150152 -0.0795835278439 0.0701185322165 -0.0234278903335 0.00255980293058 \n-8.44812130391 0.0 -6.37247782573 0.0 10.5224187378 0.0 -2.22776781609 0.0 0.0854006195025 0.0 0.0192144136062 0.0 \n0.0 -27.5157722373 0.0 -5.10838562831 0.0 18.7128279327 0.0 -6.16812709653 0.0 0.893816611133 0.0 -0.0719230449415 \n-6.62996330909 0.0 -39.4286573619 0.0 11.7710067167 0.0 4.54417300745 0.0 -1.97468830986 0.0 0.292638676232 0.0 \n0.0 -5.81365836301 0.0 -56.1472635023 0.0 37.9739468838 0.0 -9.20457852898 0.0 1.14523235203 0.0 -0.0838306498757 \n9.69703062195 0.0 10.2646400862 0.0 -71.1415987096 0.0 36.9710131034 0.0 -7.8491848063 0.0 0.893842459212 0.0 \n0.0 17.601855072 0.0 35.5979277209 0.0 -39.1967765745 0.0 11.7526063479 0.0 -1.67312052858 0.0 0.134687687165 \n-1.79568833986 0.0 4.6165685596 0.0 34.6752893402 0.0 -22.0372405265 0.0 5.16063281196 0.0 -0.625526429983 0.0 \n0.0 -5.35697152383 0.0 -7.99750786938 0.0 10.9212990116 0.0 -3.51519321265 0.0 0.521463110676 0.0 -0.0431570607514 \n0.0287690095285 0.0 -1.75163826341 0.0 -6.80287051131 0.0 4.77041594749 0.0 -1.16824954807 0.0 0.145651433706 0.0 \n0.0 0.705814277118 0.0 0.905732800353 0.0 -1.41702154922 0.0 0.475153792211 0.0 -0.0721964414805 0.0 0.00607359791765 \n0.0187482337459 0.0 0.231857617223 0.0 0.701731795989 0.0 -0.523662497702 0.0 0.131879364463 0.0 -0.0167384169712 0.0 \n0.0 -0.0505801679458 0.0 -0.059132981166 0.0 0.10168961298 0.0 -0.0350343764374 0.0 0.00540947189518 0.0 -0.000460174558974 \n4.22406065195 -5.63313435592 3.56499732657 0.508340896491 -4.12971492381 4.52071990011 -0.862253731957 -3.21712355099 1.74722347911 3.29059839437 1.61991357877 0.359977448094 \n6.33186661534 -8.17634321569 4.36967370735 2.80841899599 -9.26763989398 9.95738874308 -2.58761980922 -6.96451505399 5.64316392656 7.85140421476 3.03029823574 0.384136436744 \n3.31498165455 -2.92768409718 -2.08307373989 8.91872017306 -12.6133636388 8.42685145254 2.83172849408 -10.4888798435 2.18317481138 10.7414400531 6.55839575483 1.71627526708 \n0.503613005384 1.16226256037 -5.45527784656 10.0462238726 -11.1426305537 6.09321282899 2.85743635944 -7.4868863767 1.46798496746 5.86443313131 2.72259680767 0.405481526812 \n-4.84851531097 9.52992907567 -13.901174273 15.8889142454 -11.954904707 0.791606562183 12.0001909886 -13.4792540599 -2.96920953069 14.6643952293 11.3522098126 3.39149079829 \n-4.42855870293 6.54004970932 -4.97331901265 -0.885576146319 9.64085870849 -15.005414225 7.97576345221 10.0036616389 -13.798899333 -15.9170163611 -5.87817025713 -0.717761627821 \n0.897844169928 -2.58459580535 5.66606512916 -9.39830415649 10.9012702677 -6.10692032105 -5.25700007595 12.8222338144 -1.74605341326 -15.0645146451 -10.0290328469 -2.79250845364 \n1.43657076806 -2.29794130148 2.24494353641 -0.876665647333 -1.96088727598 4.74114782287 -3.75947915119 -2.58562396999 5.77462714001 5.78911471222 2.03397503247 0.235408710361 \n-0.0143845047643 0.252438423784 -0.886572097778 1.84433452735 -2.56683963315 1.93697265481 0.705208261435 -3.24384088367 1.01363849005 4.12927144928 2.58843151898 0.699080866628 \n-0.194691969081 0.321525615332 -0.342368297964 0.196277217481 0.176726862221 -0.628283524199 0.620875502149 0.278051140033 -0.946732723887 -0.878449886595 -0.299624635179 -0.0335354010544 \n-0.00937411687296 -0.00817668292905 0.0731744787433 -0.18334104352 0.286138213275 -0.252390214772 -0.0348250840203 0.382006412851 -0.174883907202 -0.52744515478 -0.318100209501 -0.0842050462559 \n0.0141798374922 -0.0238303128993 0.0265352908741 -0.0177201221049 -0.00849165723075 0.0444627797421 -0.0510122257321 -0.0150299150152 0.0795835278439 0.0701185322165 0.0234278903335 0.00255980293058 \n13\n4.26068493805 5.68186445512 3.58550778962 -0.565059500311 -4.30183667472 -4.77297421105 -1.01269032727 3.40413490088 2.12554629604 -3.66562351017 1.67956541167 -0.305384893673 -0.0101271247033 \n-7.12025244606 -9.70284469119 -6.64894701423 -0.0539870120746 6.68002924063 9.4118000254 5.70909798169 -1.9363932166 -5.83824884362 -0.816536981303 4.61847485341 -2.48554402584 0.513769416141 \n3.44195982674 3.10472160547 -1.98045400143 -9.04438515618 -13.0999755026 -9.20046999291 2.29164186451 10.9371312877 3.34748463279 -11.5610282814 6.37975621101 -1.36955282058 -0.00163835132472 \n-0.536412922565 1.09848346688 5.35938230703 9.92464615074 11.0308017059 6.06580153546 -2.72906314764 -7.27169614703 -1.46527706761 5.48866929236 -2.40022413006 0.288498296122 0.0583744466967 \n-4.6556123768 -9.24731284805 -13.6920435878 -15.9599036909 -12.5080777168 -1.79631054964 11.1484180959 13.8221311569 -1.44934274631 -15.0975092922 10.4296411888 -2.5987678363 0.0616767749953 \n7.0728620039 11.6595099468 12.6160442492 8.71018303847 -0.97014894602 -13.1848409852 -18.4481798609 -6.8485370905 14.4752855027 13.1221400156 -19.7635412901 8.90928481773 -1.65364629029 \n0.692998403984 2.29869531414 5.49935757964 9.59842408428 11.6822459322 7.35124611394 -4.38502726858 -13.5380321639 -3.61897753131 16.3691238335 -9.72675331895 2.22741343586 -0.0231629853616 \n-2.78977522607 -4.91763904895 -6.15545574632 -5.78582404352 -2.47392490007 3.81213784575 9.11939567675 6.03470222733 -6.12714482956 -9.06103330735 11.0832577359 -4.69102482091 0.830574732353 \n0.0466959325427 -0.169573887128 -0.846153674081 -1.9249339291 -2.83218403228 -2.33777084408 0.450663445175 3.51628555742 1.61555267798 -4.66000432457 2.61196083203 -0.577011768103 0.00257259737824 \n0.468283967958 0.851151905771 1.13289409938 1.18856889208 0.71949264691 -0.440919313473 -1.70466162911 -1.46413797742 1.01915271054 2.1219164061 -2.35131800635 0.962293643185 -0.165982253524 \n-0.0181710073688 -0.00345930680048 0.0685154016396 0.19756687241 0.328415626074 0.313837312452 0.00115214966843 -0.428625814663 -0.267007279326 0.621610435799 -0.335706899264 0.0724324380066 -3.46824730673e-05 \n-0.0432736111272 -0.0801476947195 -0.110587549565 -0.123211586036 -0.0867636823837 0.0245927725334 0.166274319263 0.170152695102 -0.0874217351336 -0.24868267589 0.258320984875 -0.103299126776 0.017493849576 \n0.00174430430088 0.00120221374748 -0.00329854821573 -0.0120032470486 -0.0217579509078 -0.0228081028596 -0.00292797405437 0.0292448189503 0.0226456487778 -0.046210733136 0.0243061945943 -0.00515550242898 -1.26060273415e-05 \n-8.52136987343 0.0 -6.6413076694 0.0 10.0820444056 0.0 -1.76130766834 0.0 -0.0585570837883 0.0 0.0411404029712 0.0 -0.00464786940225 \n0.0 -29.9248666148 0.0 -5.19326981465 0.0 27.2745376477 0.0 -10.7954830433 0.0 1.90009819631 0.0 -0.189373626135 0.0 \n-6.88391964648 0.0 -40.2984245315 0.0 10.4496633743 0.0 6.04957754738 0.0 -2.4588059318 0.0 0.369072561328 0.0 -0.0300822215201 \n0.0 -5.91334467608 0.0 -56.1463000069 0.0 38.3368131268 0.0 -9.40309152894 0.0 1.18880436181 0.0 -0.0889637716694 0.0 \n9.31122476037 0.0 9.04852248701 0.0 -72.8018520879 0.0 39.0690536715 0.0 -8.55931995717 0.0 1.01066088997 0.0 -0.0722117002411 \n0.0 25.6832054906 0.0 35.8914864157 0.0 -67.9006512348 0.0 27.2617046866 0.0 -5.04505411274 0.0 0.528167395591 0.0 \n-1.38599681915 0.0 6.0174195165 0.0 36.7993742408 0.0 -24.4616947975 0.0 5.941073364 0.0 -0.748846572043 0.0 0.0559980261781 \n0.0 -9.4928516362 0.0 -8.15022229507 0.0 25.6068376254 0.0 -11.4487716006 0.0 2.2461632934 0.0 -0.244395710434 0.0 \n-0.0933918610892 0.0 -2.18770282222 0.0 -7.49680015086 0.0 5.52630522184 0.0 -1.40537830355 0.0 0.182300049029 0.0 -0.0139071218812 \n0.0 1.54206268825 0.0 0.93703771872 0.0 -4.38558187826 0.0 2.07866332933 0.0 -0.420758366914 0.0 0.0467409152076 0.0 \n0.0363420140802 0.0 0.296957048742 0.0 0.809249422419 0.0 -0.636650789861 0.0 0.166583653124 0.0 -0.0220012440894 0.0 0.00169987594818 \n0.0 -0.139512982999 0.0 -0.0625117437645 0.0 0.417301717946 0.0 -0.205494731599 0.0 0.04246013729 0.0 -0.00478263900599 0.0 \n-0.00348860854141 0.0 -0.0215828759152 0.0 -0.0519028318983 0.0 0.0426962257605 0.0 -0.0113913680154 0.0 0.00152339033207 0.0 -0.000118756789151 \n4.26068493805 -5.68186445512 3.58550778962 0.565059500311 -4.30183667472 4.77297421105 -1.01269032727 -3.40413490088 2.12554629604 3.66562351017 1.67956541167 0.305384893673 -0.0101271247033 \n7.12025244606 -9.70284469119 6.64894701423 -0.0539870120746 -6.68002924063 9.4118000254 -5.70909798169 -1.9363932166 5.83824884362 -0.816536981303 -4.61847485341 -2.48554402584 -0.513769416141 \n3.44195982674 -3.10472160547 -1.98045400143 9.04438515618 -13.0999755026 9.20046999291 2.29164186451 -10.9371312877 3.34748463279 11.5610282814 6.37975621101 1.36955282058 -0.00163835132472 \n0.536412922565 1.09848346688 -5.35938230703 9.92464615074 -11.0308017059 6.06580153546 2.72906314764 -7.27169614703 1.46527706761 5.48866929236 2.40022413006 0.288498296122 -0.0583744466967 \n-4.6556123768 9.24731284805 -13.6920435878 15.9599036909 -12.5080777168 1.79631054964 11.1484180959 -13.8221311569 -1.44934274631 15.0975092922 10.4296411888 2.5987678363 0.0616767749953 \n-7.0728620039 11.6595099468 -12.6160442492 8.71018303847 0.97014894602 -13.1848409852 18.4481798609 -6.8485370905 -14.4752855027 13.1221400156 19.7635412901 8.90928481773 1.65364629029 \n0.692998403984 -2.29869531414 5.49935757964 -9.59842408428 11.6822459322 -7.35124611394 -4.38502726858 13.5380321639 -3.61897753131 -16.3691238335 -9.72675331895 -2.22741343586 -0.0231629853616 \n2.78977522607 -4.91763904895 6.15545574632 -5.78582404352 2.47392490007 3.81213784575 -9.11939567675 6.03470222733 6.12714482956 -9.06103330735 -11.0832577359 -4.69102482091 -0.830574732353 \n0.0466959325427 0.169573887128 -0.846153674081 1.9249339291 -2.83218403228 2.33777084408 0.450663445175 -3.51628555742 1.61555267798 4.66000432457 2.61196083203 0.577011768103 0.00257259737824 \n-0.468283967958 0.851151905771 -1.13289409938 1.18856889208 -0.71949264691 -0.440919313473 1.70466162911 -1.46413797742 -1.01915271054 2.1219164061 2.35131800635 0.962293643185 0.165982253524 \n-0.0181710073688 0.00345930680048 0.0685154016396 -0.19756687241 0.328415626074 -0.313837312452 0.00115214966843 0.428625814663 -0.267007279326 -0.621610435799 -0.335706899264 -0.0724324380066 -3.46824730673e-05 \n0.0432736111272 -0.0801476947195 0.110587549565 -0.123211586036 0.0867636823837 0.0245927725334 -0.166274319263 0.170152695102 0.0874217351336 -0.24868267589 -0.258320984875 -0.103299126776 -0.017493849576 \n0.00174430430088 -0.00120221374748 -0.00329854821573 0.0120032470486 -0.0217579509078 0.0228081028596 -0.00292797405437 -0.0292448189503 0.0226456487778 0.046210733136 0.0243061945943 0.00515550242898 -1.26060273415e-05 \n14\n5.05072990331 6.96067299604 4.91566995758 0.216293714325 -4.88476291265 -7.28862468835 -4.62789453704 1.89092328435 5.84349988606 0.972742541579 -6.04760397827 3.74724164515 -0.916993390755 0.0221318175222 \n-7.13080315983 -9.74232177036 -6.75309097293 -0.259296094239 6.37160694316 9.08967276587 5.58621415236 -1.64695114089 -5.30974136482 -0.818459423969 3.6974714104 -1.644332472 0.175990188196 0.0585420629416 \n5.44455715358 6.34597011181 1.39019956284 -7.06617945944 -14.5814071198 -15.5811497978 -6.87292418895 7.10716213252 12.779118056 0.18779697669 -13.2104376772 8.91099375381 -2.30493634474 0.0779672702118 \n-0.403148309892 1.36501500118 5.77793503358 10.4851755776 11.5954961002 6.30236739405 -3.20063612613 -8.27497635499 -1.73041711744 7.23580169606 -3.62383874897 0.603968710757 0.063229578163 -0.0378253212221 \n-2.85731364933 -6.33733120684 -10.6676303483 -14.1889701404 -13.847256665 -7.53539044763 2.91698518256 10.3960930333 7.0372272276 -4.56690905371 -7.16985135565 6.65136957752 -2.01720475793 0.119552900762 \n7.40715072399 12.3902667907 13.9062207104 10.660775116 1.33868604958 -11.5648123106 -19.0890024696 -10.0760184924 12.092549986 17.0440907755 -19.3889491541 6.76914986844 -0.499244407065 -0.270750257142 \n-2.62036164177 -3.064374714 -0.0787545339309 6.32256915627 14.12885122 17.9040628379 10.7784737299 -7.19327669333 -19.217329469 -3.08796356752 22.6985110766 -14.7859467679 3.78799145879 -0.124419687856 \n-3.0573875227 -5.48457991493 -7.11850742711 -7.18919002498 -4.0630730251 2.81340809659 9.78992998405 8.41225369164 -4.71812270856 -12.3361511742 11.7851053715 -3.82961678755 0.238078260383 0.159066923889 \n1.30107302579 1.86101967771 1.26653320678 -0.682666742368 -3.75509161076 -6.32955327234 -5.28979700085 1.1088217597 7.51515113853 2.71668988151 -9.66707951588 5.86206356007 -1.43843757901 0.0367290726481 \n0.542488157339 1.00588760895 1.3903990759 1.55609583986 1.12474115721 -0.204709934812 -1.91212151773 -2.09528854708 0.69644805728 3.04891804848 -2.68312299088 0.839963332294 -0.0470216549169 -0.0356019721205 \n-0.237529765645 -0.358597889182 -0.301093440497 -0.0200229280547 0.489256415929 1.01136046495 1.00501966283 -0.00668473595683 -1.29780992052 -0.670353937625 1.81256834626 -1.05361428072 0.251797613919 -0.00527915012363 \n-0.0538859676104 -0.102029428184 -0.146457054173 -0.173603548885 -0.141165152541 -0.00509825921714 0.198110357517 0.257602368864 -0.0480884134689 -0.383211653635 0.319620525422 -0.097543526779 0.00504319889036 0.0041930810296 \n0.023442502942 0.0363356721703 0.033279040184 0.00955893690828 -0.0376063412388 -0.0917456635378 -0.102230237832 -0.0125986790134 0.124513907487 0.0818206165131 -0.18833405504 0.106255324034 -0.0249151418722 0.000439409259058 \n0.00333852943051 0.00641447234245 0.00944387632664 0.0116125696677 0.0101213223307 0.00162968490722 -0.0124492240066 -0.0184106768692 0.00142980495233 0.0282769613559 -0.0226984253375 0.00679896261466 -0.000329956196624 -0.000295353319916 \n-10.1014598066 0.0 -10.6895466346 0.0 6.35549300847 0.0 5.35327999204 0.0 -2.89441446877 0.0 0.571527926244 0.0 -0.0616682697285 0.0 \n0.0 -29.9190099392 0.0 -4.85725344567 0.0 28.028438044 0.0 -11.4599408555 0.0 2.10028406159 0.0 -0.220731246324 0.0 0.0147409650865 \n-10.8891143072 0.0 -50.5618517639 0.0 0.99708306884 0.0 24.0852976403 0.0 -9.64614674585 0.0 1.71304095549 0.0 -0.17453713275 0.0 \n0.0 -5.52312328773 0.0 -56.2768535426 0.0 36.6501871576 0.0 -8.39979423284 0.0 0.952687042872 0.0 -0.058979445504 0.0 0.00189450499545 \n5.71462729866 0.0 -0.172481570111 0.0 -81.305291841 0.0 55.2688746181 0.0 -15.011224009 0.0 2.21647968141 0.0 -0.201745822459 0.0 \n0.0 26.5377122784 0.0 34.4620873795 0.0 -74.2302782998 0.0 31.7575803651 0.0 -6.25129717955 0.0 0.701420587418 0.0 -0.049509715111 \n5.24072328354 0.0 22.9961012996 0.0 52.4308085795 0.0 -54.2983126524 0.0 17.8324600402 0.0 -2.97259056588 0.0 0.295028249938 0.0 \n0.0 -10.2130425282 0.0 -7.32606129438 0.0 30.0640112568 0.0 -14.4726594363 0.0 3.03333280373 0.0 -0.354586086244 0.0 0.025764236581 \n-2.60214605158 0.0 -8.61372633746 0.0 -13.4086797519 0.0 16.8196114133 0.0 -5.90752852463 0.0 1.0243993748 0.0 -0.104442708709 0.0 \n0.0 1.74669305723 0.0 0.752247985934 0.0 -5.53810565106 0.0 2.83849715473 0.0 -0.614623882121 0.0 0.0733964083591 0.0 -0.00541461510285 \n0.475059531289 0.0 1.4204047123 0.0 1.84209785912 0.0 -2.6111349878 0.0 0.953908962357 0.0 -0.169290962671 0.0 0.0175377317497 0.0 \n0.0 -0.169274088943 0.0 -0.0404794282294 0.0 0.573745572564 0.0 -0.306252910557 0.0 0.067730759986 0.0 -0.00820247799726 0.0 0.000611270584491 \n-0.0468850058839 0.0 -0.132676630616 0.0 -0.153957633814 0.0 0.237953895056 0.0 -0.0892697079369 0.0 0.0160950966808 0.0 -0.0016858651507 0.0 \n0.0 0.0103010666082 0.0 0.00101019991485 0.0 -0.0368996163402 0.0 0.0202607185312 0.0 -0.00454770883693 0.0 0.000556253266955 0.0 -4.17554360311e-05 \n5.05072990331 -6.96067299604 4.91566995758 -0.216293714325 -4.88476291265 7.28862468835 -4.62789453704 -1.89092328435 5.84349988606 -0.972742541579 -6.04760397827 -3.74724164515 -0.916993390755 -0.0221318175222 \n7.13080315983 -9.74232177036 6.75309097293 -0.259296094239 -6.37160694316 9.08967276587 -5.58621415236 -1.64695114089 5.30974136482 -0.818459423969 -3.6974714104 -1.644332472 -0.175990188196 0.0585420629416 \n5.44455715358 -6.34597011181 1.39019956284 7.06617945944 -14.5814071198 15.5811497978 -6.87292418895 -7.10716213252 12.779118056 -0.18779697669 -13.2104376772 -8.91099375381 -2.30493634474 -0.0779672702118 \n0.403148309892 1.36501500118 -5.77793503358 10.4851755776 -11.5954961002 6.30236739405 3.20063612613 -8.27497635499 1.73041711744 7.23580169606 3.62383874897 0.603968710757 -0.063229578163 -0.0378253212221 \n-2.85731364933 6.33733120684 -10.6676303483 14.1889701404 -13.847256665 7.53539044763 2.91698518256 -10.3960930333 7.0372272276 4.56690905371 -7.16985135565 -6.65136957752 -2.01720475793 -0.119552900762 \n-7.40715072399 12.3902667907 -13.9062207104 10.660775116 -1.33868604958 -11.5648123106 19.0890024696 -10.0760184924 -12.092549986 17.0440907755 19.3889491541 6.76914986844 0.499244407065 -0.270750257142 \n-2.62036164177 3.064374714 -0.0787545339309 -6.32256915627 14.12885122 -17.9040628379 10.7784737299 7.19327669333 -19.217329469 3.08796356752 22.6985110766 14.7859467679 3.78799145879 0.124419687856 \n3.0573875227 -5.48457991493 7.11850742711 -7.18919002498 4.0630730251 2.81340809659 -9.78992998405 8.41225369164 4.71812270856 -12.3361511742 -11.7851053715 -3.82961678755 -0.238078260383 0.159066923889 \n1.30107302579 -1.86101967771 1.26653320678 0.682666742368 -3.75509161076 6.32955327234 -5.28979700085 -1.1088217597 7.51515113853 -2.71668988151 -9.66707951588 -5.86206356007 -1.43843757901 -0.0367290726481 \n-0.542488157339 1.00588760895 -1.3903990759 1.55609583986 -1.12474115721 -0.204709934812 1.91212151773 -2.09528854708 -0.69644805728 3.04891804848 2.68312299088 0.839963332294 0.0470216549169 -0.0356019721205 \n-0.237529765645 0.358597889182 -0.301093440497 0.0200229280547 0.489256415929 -1.01136046495 1.00501966283 0.00668473595683 -1.29780992052 0.670353937625 1.81256834626 1.05361428072 0.251797613919 0.00527915012363 \n0.0538859676104 -0.102029428184 0.146457054173 -0.173603548885 0.141165152541 -0.00509825921714 -0.198110357517 0.257602368864 0.0480884134689 -0.383211653635 -0.319620525422 -0.097543526779 -0.00504319889036 0.0041930810296 \n0.023442502942 -0.0363356721703 0.033279040184 -0.00955893690828 -0.0376063412388 0.0917456635378 -0.102230237832 0.0125986790134 0.124513907487 -0.0818206165131 -0.18833405504 -0.106255324034 -0.0249151418722 -0.000439409259058 \n-0.00333852943051 0.00641447234245 -0.00944387632664 0.0116125696677 -0.0101213223307 0.00162968490722 0.0124492240066 -0.0184106768692 -0.00142980495233 0.0282769613559 0.0226984253375 0.00679896261466 0.000329956196624 -0.000295353319916 \n15\n5.95426408168 8.58120316315 7.06349206942 2.58306748206 -3.02675764892 -7.121996107 -7.14158734515 -2.45012355069 3.74681163296 5.19094756694 -0.720438091456 -5.1606003457 3.86138625414 -1.07438343753 0.0389143932104 \n-7.13878582054 -9.70420086072 -6.57010003063 0.175216350561 7.0962479438 9.93320540937 6.05165822787 -2.16582252824 -6.61931880435 -1.17665874188 5.96279992253 -3.29408286227 0.641678761403 0.0504125533875 -0.0436569869406 \n7.14634601192 9.39783903137 5.43412709271 -2.61182683828 -11.0878370486 -15.2748804329 -11.612743223 -1.06575308106 8.84376630731 8.14204788977 -3.20207694724 -7.85953038789 6.70361288319 -1.99514350433 0.0961552819491 \n-0.435958342351 1.71908525796 7.28992264031 13.9825922988 17.3519322969 12.9189672444 0.324513339939 -12.5461596579 -12.0500392028 4.81090625161 14.0347486697 -12.5436068695 3.91203184819 -0.174563878207 -0.196997652292 \n-2.7127760914 -6.07938138079 -10.3291239683 -13.8223121824 -13.5708121298 -7.53513697639 2.49650371828 9.71395207455 6.7501697819 -3.8603248615 -6.40915310244 5.25842059965 -1.22850754576 -0.0807401046169 0.0805925054622 \n7.35810237213 13.0668953611 16.7336669956 17.1666062851 12.0177715144 0.677692562391 -12.6153915152 -18.0576182706 -7.02149253271 12.7045237433 13.2527910703 -17.6511556787 6.705760187 -0.554366656547 -0.301831788305 \n-6.74800048323 -10.4683174625 -9.89400638786 -4.49740645758 5.62739395207 17.1260454366 22.2513194885 12.6490708255 -9.60533182693 -22.3422184755 -1.71519176929 25.9666930308 -18.0568238861 4.88279784246 -0.155612212082 \n-3.00389389046 -6.10985260464 -9.76845500444 -13.3077524327 -14.1245425804 -8.74151807364 3.64898234578 15.8970586411 13.3133131651 -8.14170569964 -19.0698082326 19.1905069222 -6.5267108801 0.412605034878 0.312343736281 \n3.64680090943 6.06939651773 6.84741963254 5.47313470366 1.08812783381 -5.87248319508 -11.7999234666 -10.1759082881 2.02407322235 13.6427955733 4.26740445432 -17.3326439562 10.9759482618 -2.80091333494 0.0585830880663 \n0.524623899382 1.19587902442 2.20291387843 3.43626986091 4.2200791391 3.35412223701 -0.01467146883 -4.39121346733 -4.85587624663 1.73677231853 6.83336607148 -6.24934730962 2.0322784237 -0.11174403821 -0.099788669169 \n-0.801253302417 -1.37009418306 -1.64285200157 -1.50071037907 -0.676968105757 0.898635295855 2.56769094184 2.70705614988 0.0274929101169 -3.29326360122 -1.5489089503 4.52952644903 -2.73343458023 0.675931172201 -0.0100087863068 \n-0.0508460974814 -0.131712561757 -0.274531305075 -0.470604027928 -0.630665463335 -0.568522744751 -0.103228827281 0.619665266969 0.830810264405 -0.172248754118 -1.18952147293 1.02522098322 -0.323788431648 0.0160348253187 0.0161729473339 \n0.0988134097216 0.171594279039 0.212752556609 0.207713254321 0.11863814757 -0.0762782991485 -0.310916621838 -0.375696576364 -0.0534791656705 0.432142749377 0.262960565665 -0.641672536307 0.374639720939 -0.0906169753814 0.000947075796196 \n0.00302791422206 0.00919379495722 0.0215540598854 0.0397615202622 0.0565717964832 0.0551604230263 0.0162786652244 -0.0526638631362 -0.0820648049365 0.00789114460074 0.120978672467 -0.0999537913681 0.0308961991991 -0.00140465488017 -0.00156306536592 \n-0.00770614953302 -0.0135182638975 -0.0171232872227 -0.0174082952739 -0.0111978100247 0.0039000074493 0.0236950721965 0.0316699979186 0.00755899603072 -0.0349894527875 -0.0258206807963 0.0559091090454 -0.0318455115952 0.00757449495809 -5.38186072079e-05 \n-11.9085281634 0.0 -14.1244115519 0.0 6.04641602607 0.0 14.0852028791 0.0 -8.06183647078 0.0 1.88088757451 0.0 -0.248568739986 0.0 0.0209846370001 \n0.0 -30.0505572923 0.0 -5.81905199588 0.0 26.2389645766 0.0 -9.68667710485 0.0 1.52283843795 0.0 -0.122950707835 0.0 0.00468301249774 0.0 \n-14.2926920238 0.0 -57.0341436274 0.0 0.405218367177 0.0 40.5264589839 0.0 -19.3703956798 0.0 4.17601881144 0.0 -0.525964728117 0.0 0.0429580472838 \n0.0 -6.45857857962 0.0 -63.7621471565 0.0 22.4349117862 0.0 5.51436556172 0.0 -3.54659390235 0.0 0.698105583473 0.0 -0.0754777088449 0.0 \n5.4255521828 0.0 -0.731702468003 0.0 -81.3885846821 0.0 56.6481340936 0.0 -15.8090033139 0.0 2.41516289135 0.0 -0.229629062388 0.0 0.0145576847067 \n0.0 24.844637842 0.0 20.6360703512 0.0 -100.600359319 0.0 57.5017641494 0.0 -14.5631911598 0.0 2.09808468409 0.0 -0.192035897527 0.0 \n13.4960009665 0.0 38.6813894836 0.0 53.8215375194 0.0 -94.195832029 0.0 41.4531013794 0.0 -8.95936689502 0.0 1.14978532648 0.0 -0.0959308774588 \n0.0 -8.59188204065 0.0 5.73644923416 0.0 54.9065545667 0.0 -38.7653085729 0.0 10.8836721079 0.0 -1.6747348789 0.0 0.160589088932 0.0 \n-7.29360181886 0.0 -17.5220895124 0.0 -14.180029483 0.0 39.5014739451 0.0 -19.3455388853 0.0 4.4320250317 0.0 -0.591184364277 0.0 0.0507160155604 \n0.0 1.24294290227 0.0 -3.27313872923 0.0 -13.1797091198 0.0 10.3183514319 0.0 -3.03303262062 0.0 0.480259236218 0.0 -0.0469837472456 0.0 \n1.60250660483 0.0 3.56017839867 0.0 2.02381671015 0.0 -8.06337534465 0.0 4.18586863086 0.0 -0.989146144279 0.0 0.134681118558 0.0 -0.0117270279293 \n0.0 -0.0888469646829 0.0 0.597118698038 0.0 1.7819822033 0.0 -1.49001413299 0.0 0.450643683482 0.0 -0.0726453375217 0.0 0.00719755398393 0.0 \n-0.197626819443 0.0 -0.418619986768 0.0 -0.177754132373 0.0 0.967092379724 0.0 -0.521715133238 0.0 0.125830655883 0.0 -0.0173695528008 0.0 0.00152767008077 \n0.0 0.00259041417166 0.0 -0.0595974850908 0.0 -0.151527068589 0.0 0.132677313502 0.0 -0.0409283744726 0.0 0.00668115624618 0.0 -0.000667935073677 0.0 \n0.015412299066 0.0 0.0316002209648 0.0 0.0103007641857 0.0 -0.0746016197871 0.0 0.0413631140768 0.0 -0.0101233471564 0.0 0.00141136611906 0.0 -0.000125046529508 \n5.95426408168 -8.58120316315 7.06349206942 -2.58306748206 -3.02675764892 7.121996107 -7.14158734515 2.45012355069 3.74681163296 -5.19094756694 -0.720438091456 5.1606003457 3.86138625414 1.07438343753 0.0389143932104 \n7.13878582054 -9.70420086072 6.57010003063 0.175216350561 -7.0962479438 9.93320540937 -6.05165822787 -2.16582252824 6.61931880435 -1.17665874188 -5.96279992253 -3.29408286227 -0.641678761403 0.0504125533875 0.0436569869406 \n7.14634601192 -9.39783903137 5.43412709271 2.61182683828 -11.0878370486 15.2748804329 -11.612743223 1.06575308106 8.84376630731 -8.14204788977 -3.20207694724 7.85953038789 6.70361288319 1.99514350433 0.0961552819491 \n0.435958342351 1.71908525796 -7.28992264031 13.9825922988 -17.3519322969 12.9189672444 -0.324513339939 -12.5461596579 12.0500392028 4.81090625161 -14.0347486697 -12.5436068695 -3.91203184819 -0.174563878207 0.196997652292 \n-2.7127760914 6.07938138079 -10.3291239683 13.8223121824 -13.5708121298 7.53513697639 2.49650371828 -9.71395207455 6.7501697819 3.8603248615 -6.40915310244 -5.25842059965 -1.22850754576 0.0807401046169 0.0805925054622 \n-7.35810237213 13.0668953611 -16.7336669956 17.1666062851 -12.0177715144 0.677692562391 12.6153915152 -18.0576182706 7.02149253271 12.7045237433 -13.2527910703 -17.6511556787 -6.705760187 -0.554366656547 0.301831788305 \n-6.74800048323 10.4683174625 -9.89400638786 4.49740645758 5.62739395207 -17.1260454366 22.2513194885 -12.6490708255 -9.60533182693 22.3422184755 -1.71519176929 -25.9666930308 -18.0568238861 -4.88279784246 -0.155612212082 \n3.00389389046 -6.10985260464 9.76845500444 -13.3077524327 14.1245425804 -8.74151807364 -3.64898234578 15.8970586411 -13.3133131651 -8.14170569964 19.0698082326 19.1905069222 6.5267108801 0.412605034878 -0.312343736281 \n3.64680090943 -6.06939651773 6.84741963254 -5.47313470366 1.08812783381 5.87248319508 -11.7999234666 10.1759082881 2.02407322235 -13.6427955733 4.26740445432 17.3326439562 10.9759482618 2.80091333494 0.0585830880663 \n-0.524623899382 1.19587902442 -2.20291387843 3.43626986091 -4.2200791391 3.35412223701 0.01467146883 -4.39121346733 4.85587624663 1.73677231853 -6.83336607148 -6.24934730962 -2.0322784237 -0.11174403821 0.099788669169 \n-0.801253302417 1.37009418306 -1.64285200157 1.50071037907 -0.676968105757 -0.898635295855 2.56769094184 -2.70705614988 0.0274929101169 3.29326360122 -1.5489089503 -4.52952644903 -2.73343458023 -0.675931172201 -0.0100087863068 \n0.0508460974814 -0.131712561757 0.274531305075 -0.470604027928 0.630665463335 -0.568522744751 0.103228827281 0.619665266969 -0.830810264405 -0.172248754118 1.18952147293 1.02522098322 0.323788431648 0.0160348253187 -0.0161729473339 \n0.0988134097216 -0.171594279039 0.212752556609 -0.207713254321 0.11863814757 0.0762782991485 -0.310916621838 0.375696576364 -0.0534791656705 -0.432142749377 0.262960565665 0.641672536307 0.374639720939 0.0906169753814 0.000947075796196 \n-0.00302791422206 0.00919379495722 -0.0215540598854 0.0397615202622 -0.0565717964832 0.0551604230263 -0.0162786652244 -0.0526638631362 0.0820648049365 0.00789114460074 -0.120978672467 -0.0999537913681 -0.0308961991991 -0.00140465488017 0.00156306536592 \n-0.00770614953302 0.0135182638975 -0.0171232872227 0.0174082952739 -0.0111978100247 -0.0039000074493 0.0236950721965 -0.0316699979186 0.00755899603072 0.0349894527875 -0.0258206807963 -0.0559091090454 -0.0318455115952 -0.00757449495809 -5.38186072079e-05 \n16\n6.17245156293 9.03770904087 7.83681026627 3.74776155437 -1.54475347786 -5.71178069691 -6.56448560122 -3.4654868956 1.42323320541 3.8255567179 1.34104206157 -2.2639278915 -0.661098381065 1.24557517399 -0.428634558 0.0103700636108 \n-8.25034614218 -11.4255847013 -8.17564100561 -0.426388042936 8.55534331477 14.1325748313 12.0917475295 2.10120414856 -9.06326942567 -9.80652296986 2.86766584517 11.3178362844 -9.42622209215 2.58375028719 0.106733649623 -0.211829458248 \n7.30560660867 9.72669785897 5.98169643867 -1.80064673014 -10.0732362834 -14.3340254325 -11.2695518691 -1.81770073524 7.24666213268 7.2898190988 -1.69864648629 -6.03108198659 3.62443236544 -0.334809750274 -0.277575826396 0.0763365778334 \n-2.60005861993 -1.6280437841 4.18059087636 12.849274368 20.2566125895 21.1729794442 12.1362089769 -4.27197190311 -16.9350020082 -12.0827875905 8.19600595057 15.9491387498 -15.8745653248 4.88277649981 0.0582240962802 -0.376764454417 \n-3.62051986722 -7.99565788176 -13.6125097528 -18.8203189922 -19.9993463679 -13.7486700921 -0.21006871709 13.8964108916 16.8062329953 2.38743377342 -14.9926699195 -7.9249963538 18.4796082324 -9.88132937865 1.90706526733 0.217953276496 \n5.76675580041 10.611782816 14.4712391262 16.388387873 14.246653948 6.8608866643 -3.85394394482 -12.0217566608 -10.7979047686 0.148142082463 9.23177978848 3.36450354459 -8.11232141379 3.34583003784 -0.168618123364 -0.224513421765 \n-8.66651794502 -14.5013821659 -16.7675864303 -14.9089088879 -7.69785882374 4.33808399915 16.8346429425 21.5316169467 11.266324692 -9.69617591537 -19.8548510383 -0.807020406729 22.7764115785 -15.7369018625 3.84607215108 0.180965832733 \n0.508876042742 -0.674741310607 -4.71346560044 -11.4501790838 -18.8099017771 -22.1053121464 -15.5053646631 2.44300971354 21.1855709203 19.2578060673 -9.46302839538 -27.1702968236 25.6358862808 -7.80499267502 -0.102037108959 0.606664304892 \n5.45142132636 9.87122648678 13.3447602969 15.3400442567 13.7492562963 6.32395082221 -6.55690667345 -18.5119589444 -17.8006969163 1.46889538385 21.3378444923 8.42858459618 -27.9202342653 16.7105925528 -3.66723195589 -0.276217476294 \n-1.06331854601 -1.26349630804 -0.0916686676066 2.57485016963 6.30182038844 9.35166173776 8.6167715122 1.71287588466 -8.34323041178 -10.6052397641 2.36665424475 14.7374125143 -12.4558381484 3.55953334385 0.101689929646 -0.286377083799 \n-1.40589536888 -2.64561201543 -3.82643346688 -4.82198874404 -4.94567557808 -3.22297194493 0.779971790635 5.49635203282 6.71124294033 0.845233047742 -7.27121381619 -4.23102975756 10.4164158671 -5.89808661971 1.23566215677 0.109195464287 \n0.296356237229 0.40647749335 0.228921847635 -0.278269834548 -1.07920344322 -1.8719843224 -1.98569816746 -0.719325212527 1.58033090121 2.51898504291 -0.188723883521 -3.57343499664 2.83919181354 -0.781010146881 -0.029878846665 0.0642124832601 \n0.207811514342 0.401817307871 0.60750068855 0.809023018141 0.892638050595 0.672664838914 0.0166023038749 -0.87792745126 -1.26548603184 -0.32411744345 1.29513339266 0.960411068696 -2.01760462229 1.10214837021 -0.22379986394 -0.0218117900581 \n-0.0420327478716 -0.0607119276867 -0.0440110673223 0.0142846630695 0.113928843539 0.223314978722 0.259990739309 0.121698419546 -0.177669711765 -0.340502559125 -0.0121625780746 0.498580593469 -0.37940559859 0.101522158184 0.00461510569001 -0.00848333960017 \n-0.0199258120339 -0.0393620246987 -0.0615092948864 -0.0851247970558 -0.0984983334111 -0.0807642963569 -0.0136417512545 0.0879078438023 0.144288460691 0.0510109740639 -0.141621773802 -0.126475205158 0.239068799293 -0.127177310892 0.0252201652648 0.00263611292203 \n0.00370682801059 0.00550162003606 0.00444104936669 -2.72644935124e-05 -0.00811074595461 -0.0175908539533 -0.0218941877061 -0.011911226187 0.0131221362994 0.0294459393752 0.00373690425141 -0.0446707117156 0.0329085039585 -0.00861983406058 -0.000440712394004 0.000729579295103 \n-12.3449031259 0.0 -14.4534737789 0.0 7.86880622837 0.0 18.0653092 0.0 -11.9170526414 0.0 3.22580453478 0.0 -0.503463416142 0.0 0.051306939077 0.0 \n0.0 -34.3089053439 0.0 -14.2425692485 0.0 19.8617997744 0.0 4.6521150554 0.0 -5.18685443392 0.0 1.41055871454 0.0 -0.2052111266 0.0 0.0189500459554 \n-14.6112132173 0.0 -57.3080335113 0.0 1.60293149776 0.0 43.2839428297 0.0 -21.9764610264 0.0 5.07198464274 0.0 -0.693559515984 0.0 0.0626300930054 0.0 \n0.0 -14.7576469002 0.0 -80.235802174 0.0 9.87904140099 0.0 33.5362766449 0.0 -16.6271774858 0.0 3.68181387142 0.0 -0.483086634787 0.0 0.0418703700303 \n7.24103973445 0.0 0.505562694726 0.0 -89.4880400342 0.0 39.5136509461 0.0 1.04030672927 0.0 -3.51378167394 0.0 0.902565317294 0.0 -0.12114418777 0.0 \n0.0 18.7296905343 0.0 8.41496076798 0.0 -110.03689301 0.0 78.2610746158 0.0 -24.207333764 0.0 4.2894162818 0.0 -0.490269953206 0.0 0.0386142005227 \n17.33303589 0.0 41.4278054134 0.0 37.2209650244 0.0 -129.830229101 0.0 76.247582165 0.0 -21.1529128551 0.0 3.46987653111 0.0 -0.373005415104 0.0 \n0.0 4.87507913861 0.0 32.4402693282 0.0 75.2183539763 0.0 -84.18595397 0.0 32.096230864 0.0 -6.51475250863 0.0 0.821922644577 0.0 -0.0698162599342 \n-10.9028426527 0.0 -20.0421213774 0.0 1.68282973947 0.0 73.2930401937 0.0 -52.4570171966 0.0 16.0583593322 0.0 -2.80701234157 0.0 0.315764938338 0.0 \n0.0 -4.83989429036 0.0 -15.3017823541 0.0 -22.2804117916 0.0 30.7842221609 0.0 -12.6073408006 0.0 2.66758656197 0.0 -0.346203468728 0.0 0.0300207466366 \n2.81179073776 0.0 4.39135320923 0.0 -3.34230766048 0.0 -19.4408600273 0.0 15.3575828054 0.0 -4.91611675819 0.0 0.883773983648 0.0 -0.101404844445 0.0 \n0.0 1.2402612317 0.0 3.21927513123 0.0 3.75684583754 0.0 -5.95216391664 0.0 2.54094750874 0.0 -0.550656170623 0.0 0.0726435419193 0.0 -0.00637544025792 \n-0.415623028683 0.0 -0.566242484225 0.0 0.798165722028 0.0 3.02729247406 0.0 -2.54844076617 0.0 0.838915701246 0.0 -0.153494737154 0.0 0.0178347040369 0.0 \n0.0 -0.169787560786 0.0 -0.398881523249 0.0 -0.405881846342 0.0 0.710096394675 0.0 -0.311772924616 0.0 0.0686735523101 0.0 -0.00916193972213 0.0 0.000810822371549 \n0.0398516240678 0.0 0.0478903681852 0.0 -0.100112035964 0.0 -0.306635641368 0.0 0.270061129809 0.0 -0.0906630931831 0.0 0.0167968308089 0.0 -0.00196925782412 0.0 \n0.0 0.0146784173778 0.0 0.0324402794168 0.0 0.0300293123947 0.0 -0.0566448331087 0.0 0.0253811935991 0.0 -0.0056573485369 0.0 0.000761032743742 0.0 -6.77693833931e-05 \n6.17245156293 -9.03770904087 7.83681026627 -3.74776155437 -1.54475347786 5.71178069691 -6.56448560122 3.4654868956 1.42323320541 -3.8255567179 1.34104206157 2.2639278915 -0.661098381065 -1.24557517399 -0.428634558 -0.0103700636108 \n8.25034614218 -11.4255847013 8.17564100561 -0.426388042936 -8.55534331477 14.1325748313 -12.0917475295 2.10120414856 9.06326942567 -9.80652296986 -2.86766584517 11.3178362844 9.42622209215 2.58375028719 -0.106733649623 -0.211829458248 \n7.30560660867 -9.72669785897 5.98169643867 1.80064673014 -10.0732362834 14.3340254325 -11.2695518691 1.81770073524 7.24666213268 -7.2898190988 -1.69864648629 6.03108198659 3.62443236544 0.334809750274 -0.277575826396 -0.0763365778334 \n2.60005861993 -1.6280437841 -4.18059087636 12.849274368 -20.2566125895 21.1729794442 -12.1362089769 -4.27197190311 16.9350020082 -12.0827875905 -8.19600595057 15.9491387498 15.8745653248 4.88277649981 -0.0582240962802 -0.376764454417 \n-3.62051986722 7.99565788176 -13.6125097528 18.8203189922 -19.9993463679 13.7486700921 -0.21006871709 -13.8964108916 16.8062329953 -2.38743377342 -14.9926699195 7.9249963538 18.4796082324 9.88132937865 1.90706526733 -0.217953276496 \n-5.76675580041 10.611782816 -14.4712391262 16.388387873 -14.246653948 6.8608866643 3.85394394482 -12.0217566608 10.7979047686 0.148142082463 -9.23177978848 3.36450354459 8.11232141379 3.34583003784 0.168618123364 -0.224513421765 \n-8.66651794502 14.5013821659 -16.7675864303 14.9089088879 -7.69785882374 -4.33808399915 16.8346429425 -21.5316169467 11.266324692 9.69617591537 -19.8548510383 0.807020406729 22.7764115785 15.7369018625 3.84607215108 -0.180965832733 \n-0.508876042742 -0.674741310607 4.71346560044 -11.4501790838 18.8099017771 -22.1053121464 15.5053646631 2.44300971354 -21.1855709203 19.2578060673 9.46302839538 -27.1702968236 -25.6358862808 -7.80499267502 0.102037108959 0.606664304892 \n5.45142132636 -9.87122648678 13.3447602969 -15.3400442567 13.7492562963 -6.32395082221 -6.55690667345 18.5119589444 -17.8006969163 -1.46889538385 21.3378444923 -8.42858459618 -27.9202342653 -16.7105925528 -3.66723195589 0.276217476294 \n1.06331854601 -1.26349630804 0.0916686676066 2.57485016963 -6.30182038844 9.35166173776 -8.6167715122 1.71287588466 8.34323041178 -10.6052397641 -2.36665424475 14.7374125143 12.4558381484 3.55953334385 -0.101689929646 -0.286377083799 \n-1.40589536888 2.64561201543 -3.82643346688 4.82198874404 -4.94567557808 3.22297194493 0.779971790635 -5.49635203282 6.71124294033 -0.845233047742 -7.27121381619 4.23102975756 10.4164158671 5.89808661971 1.23566215677 -0.109195464287 \n-0.296356237229 0.40647749335 -0.228921847635 -0.278269834548 1.07920344322 -1.8719843224 1.98569816746 -0.719325212527 -1.58033090121 2.51898504291 0.188723883521 -3.57343499664 -2.83919181354 -0.781010146881 0.029878846665 0.0642124832601 \n0.207811514342 -0.401817307871 0.60750068855 -0.809023018141 0.892638050595 -0.672664838914 0.0166023038749 0.87792745126 -1.26548603184 0.32411744345 1.29513339266 -0.960411068696 -2.01760462229 -1.10214837021 -0.22379986394 0.0218117900581 \n0.0420327478716 -0.0607119276867 0.0440110673223 0.0142846630695 -0.113928843539 0.223314978722 -0.259990739309 0.121698419546 0.177669711765 -0.340502559125 0.0121625780746 0.498580593469 0.37940559859 0.101522158184 -0.00461510569001 -0.00848333960017 \n-0.0199258120339 0.0393620246987 -0.0615092948864 0.0851247970558 -0.0984983334111 0.0807642963569 -0.0136417512545 -0.0879078438023 0.144288460691 -0.0510109740639 -0.141621773802 0.126475205158 0.239068799293 0.127177310892 0.0252201652648 -0.00263611292203 \n-0.00370682801059 0.00550162003606 -0.00444104936669 -2.72644935124e-05 0.00811074595461 -0.0175908539533 0.0218941877061 -0.011911226187 -0.0131221362994 0.0294459393752 -0.00373690425141 -0.0446707117156 -0.0329085039585 -0.00861983406058 0.000440712394004 0.000729579295103 \n"
  },
  {
    "path": "src/madness/mra/coeffs",
    "content": "7.07106781186547462e-01\n7.07106781186547462e-01\n7.07106781186547462e-01\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n7.07106781186547462e-01\n3.53553390593273731e-01\n6.12372435695794470e-01\n7.07106781186547462e-01\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n2.35702260395515839e-01\n4.08248290463863017e-01\n-5.27046276694729920e-01\n0.0\n1.76776695296636865e-01\n6.84653196881457649e-01\n2.63523138347364960e-01\n4.56435464587638395e-01\n4.71404520791031678e-01\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n1.53392997769474099e-01\n5.94088525786004573e-01\n-3.51467511677403643e-01\n1.54303349962091912e-01\n2.67261241912424397e-01\n1.72516389835588563e-01\n-6.12372435695794470e-01\n0.0\n8.78668779193509109e-02\n3.40306954864886324e-01\n6.13571991077896395e-01\n2.15645487294485683e-01\n3.73508940416998003e-01\n4.43622131141014231e-01\n3.42326598440728824e-01\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n1.46647115021353303e-01\n2.54000254000381009e-01\n1.63956458945988232e-01\n-5.81987695247377923e-01\n2.19970672532029926e-01\n0.0\n7.02439358686270526e-02\n2.72053593791254378e-01\n4.29197537639476046e-01\n-4.86664263392287633e-01\n1.22012412152227842e-01\n2.11331697001692936e-01\n2.08908333645301647e-01\n-5.53396284716417136e-02\n-6.27492405354314609e-01\n0.0\n5.36496922049345057e-02\n2.07784364438865221e-01\n4.39024599178919062e-01\n5.11081959901581784e-01\n1.84174088668055735e-01\n3.18998879010767955e-01\n3.95016566365811783e-01\n3.87834176035668388e-01\n2.40553911729705472e-01\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n6.90065559342354223e-02\n2.67261241912424397e-01\n4.21637021355783903e-01\n-4.78091443733757449e-01\n1.32137494528681981e-01\n1.07622738385727293e-01\n1.86408050933772967e-01\n1.82895336805923264e-01\n-5.69486002368798858e-02\n-5.38113691928636451e-01\n3.56944242136036816e-01\n0.0\n4.17814244489654665e-02\n1.61818761071666650e-01\n3.19724575109042120e-01\n2.21973542660274664e-01\n-5.66191613825598794e-01\n1.05568077133336241e-01\n1.82849273252288558e-01\n2.04676750730998752e-01\n9.36564731418126489e-02\n-2.45278210958604637e-01\n-5.87023011762966229e-01\n0.0\n3.61235077077327743e-02\n1.39905743758644285e-01\n3.11370427776249681e-01\n4.69258130230493342e-01\n4.02450914986221098e-01\n1.61557581910374198e-01\n2.79825940216738678e-01\n3.52652456017037375e-01\n3.76555328895631147e-01\n3.19268554727644260e-01\n1.65850868000944340e-01\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n1.06980326843028148e-01\n1.85295361502449324e-01\n1.81803615137878849e-01\n-5.66086680006120252e-02\n-5.34901634215140698e-01\n3.54813604087910350e-01\n-7.71446107796869146e-02\n0.0\n3.95284707521047426e-02\n1.53093108923948618e-01\n3.01903682212279978e-01\n2.05395959064437306e-01\n-5.29838811967061063e-01\n2.46855220726643731e-01\n8.64761849358180318e-02\n1.49781145953559208e-01\n1.65785918816308386e-01\n6.56248039525380994e-02\n-2.21885517531997534e-01\n-4.11325226866508298e-01\n4.68907524824438315e-01\n0.0\n2.86703685130632151e-02\n1.11039859780723338e-01\n2.36848948891486638e-01\n2.90857133198612394e-01\n7.84279657250585606e-03\n-5.88295294497251042e-01\n9.50931665454351344e-02\n1.64706195909302688e-01\n1.94920686522911973e-01\n1.46794852602623371e-01\n-4.81649604788955202e-02\n-3.74916788415118829e-01\n-5.11276729635545601e-01\n0.0\n2.58315268968977788e-02\n1.00045073478794044e-01\n2.27981341507730889e-01\n3.77817254856742446e-01\n4.49169532791078352e-01\n3.04711463781546343e-01\n1.44438546738283158e-01\n2.50174901522118354e-01\n3.18080857425383445e-01\n3.53197832400995226e-01\n3.37620129221579190e-01\n2.52721159802372086e-01\n1.13006849013016109e-01\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n3.94514921576235855e-02\n1.52794972109508653e-01\n3.01315748485444623e-01\n2.04995966554227471e-01\n-5.28806992464035619e-01\n2.46374489558189386e-01\n-4.41081091391230876e-02\n8.43312289034136020e-02\n1.46065973125433374e-01\n1.61631737532109604e-01\n6.37484169813984647e-02\n-2.16851731465920683e-01\n-3.99564349117424833e-01\n4.56090854901222809e-01\n-1.63306722554063227e-01\n0.0\n2.58430814883383597e-02\n1.00089824219015661e-01\n2.12700425618062072e-01\n2.55888324646720178e-01\n-1.03051686103246484e-02\n-4.96282756040329176e-01\n3.63580920890125281e-01\n7.42292692888545658e-02\n1.28568865817008215e-01\n1.50304516117233611e-01\n1.03644762948322117e-01\n-6.69121025632302135e-02\n-3.09991123262384927e-01\n-2.33350256358479807e-01\n5.38147107915712630e-01\n0.0\n2.13434791213833602e-02\n8.26629391872434616e-02\n1.82959231101957831e-01\n2.69218188725434293e-01\n1.96827002538047469e-01\n-1.80532124571328556e-01\n-5.61628047792796514e-01\n8.71939722326492833e-02\n1.51024390020698451e-01\n1.84102234147576760e-01\n1.66389240058105320e-01\n5.20293149261530224e-02\n-1.83637591370366171e-01\n-4.40134468134723178e-01\n-4.21736491643413425e-01\n0.0\n1.92854509208143926e-02\n7.46922302404146310e-02\n1.72371744816637279e-01\n2.99250122582078892e-01\n4.05043262634303791e-01\n4.00361235182952080e-01\n2.24582556324644078e-01\n1.30994289272089087e-01\n2.26888764520633029e-01\n2.89907908446132789e-01\n3.28805065784444794e-01\n3.33689839232842345e-01\n2.90099600883832520e-01\n1.94575209516250514e-01\n7.63964570434042811e-02\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n8.42792584469231471e-02\n1.45975957654299354e-01\n1.61532129411937286e-01\n6.37091310089995394e-02\n-2.16718093149230961e-01\n-3.99318111254050090e-01\n4.55809781682694426e-01\n-1.63206082197822067e-01\n2.48208774732423983e-02\n0.0\n2.55826160045998577e-02\n9.90810457382345772e-02\n2.10543186526815251e-01\n2.53202232631380975e-01\n-1.04972100214821631e-02\n-4.90701827637742893e-01\n3.59570944408087345e-01\n-1.04397954978139834e-01\n6.98295820824746949e-02\n1.20948384038147491e-01\n1.41274481628820670e-01\n9.67842712489446200e-02\n-6.48168048065920765e-02\n-2.92246884167049470e-01\n-2.09939549356038924e-01\n4.95960059392540953e-01\n-2.67412021339565542e-01\n0.0\n1.85039393315955744e-02\n7.16654488705020520e-02\n1.57855884003784086e-01\n2.27349818186954933e-01\n1.48804573982203869e-01\n-1.84903565406234149e-01\n-3.88267619132195818e-01\n4.59163776792766987e-01\n6.67803031919601692e-02\n1.15666878073329080e-01\n1.39376700703139261e-01\n1.17827382371290271e-01\n1.12588060760871606e-02\n-1.84242596995609603e-01\n-3.15833473518240371e-01\n-3.92018502414369710e-02\n5.59904227853391112e-01\n0.0\n1.66416380133660273e-02\n6.44527868793789011e-02\n1.45659749318545001e-01\n2.33765216256414499e-01\n2.47288638357724272e-01\n6.37660677766828110e-02\n-3.20321912564716038e-01\n-5.01878516690173138e-01\n8.07069192195687957e-02\n1.39788484610650271e-01\n1.73398419299368722e-01\n1.71717133489792978e-01\n1.04029695662908067e-01\n-5.79991433603740669e-02\n-2.90124027851231980e-01\n-4.51983807980708752e-01\n-3.34281908854268950e-01\n0.0\n1.48845960620674032e-02\n5.76477926634115512e-02\n1.34034618659144067e-01\n2.38878751987926574e-01\n3.45697430762867186e-01\n4.00168393617256923e-01\n3.39713656770383565e-01\n1.62419266616139757e-01\n1.20131817436616412e-01\n2.08074411405808374e-01\n2.66669288884877065e-01\n3.06281134811372646e-01\n3.21622407413684697e-01\n3.02414084535261696e-01\n2.41431493954213150e-01\n1.46733530264100548e-01\n5.13575304039249891e-02\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n2.55777482388236804e-02\n9.90621929624502101e-02\n2.10503125146165287e-01\n2.53154054244845605e-01\n-1.04952126510928830e-02\n-4.90608458704618444e-01\n3.59502526575564585e-01\n-1.04378090520484149e-01\n1.37934117450112005e-02\n6.95493887309795999e-02\n1.20463074917414995e-01\n1.40706002805930291e-01\n9.63863928860014957e-02\n-6.45815752501953388e-02\n-2.91082595748077766e-01\n-2.08969906038936920e-01\n4.93833311205647940e-01\n-2.66276656225330699e-01\n6.49625907992928409e-02\n0.0\n1.79676449726445531e-02\n6.95883897496197834e-02\n1.53240758123111914e-01\n2.20442842618909340e-01\n1.43367659836025091e-01\n-1.80766642629617252e-01\n-3.72354382446131060e-01\n4.42012821524356059e-01\n-1.88422019522498735e-01\n6.00969132163765851e-02\n1.04090907068821806e-01\n1.25226851161405861e-01\n1.04846094724564715e-01\n6.66957652297663073e-03\n-1.70442311878614111e-01\n-2.79288187446689595e-01\n-9.23284951943496857e-03\n4.63380177395335213e-01\n-3.70102128292582544e-01\n0.0\n1.41766533894944757e-02\n5.49059424824670378e-02\n1.23443000635784256e-01\n1.94048555860884847e-01\n1.90650234799112750e-01\n1.08364519699476417e-02\n-2.91586699711520070e-01\n-2.30660137744290339e-01\n5.18844389222818947e-01\n6.18257465852510429e-02\n1.07085334301532831e-01\n1.31477462842682774e-01\n1.23528959514926220e-01\n5.46716532881320327e-02\n-9.24251883137655744e-02\n-2.59903771653139770e-01\n-2.49677227887536518e-01\n1.39170988700743070e-01\n5.39792481712323080e-01\n0.0\n1.33475171279176553e-02\n5.16947115496433351e-02\n1.18338593246817739e-01\n1.99488974442547706e-01\n2.47433444106952810e-01\n1.76857335792483722e-01\n-7.73147289209733524e-02\n-4.03957976370276362e-01\n-4.26248972480881949e-01\n7.51973000625467125e-02\n1.30245544300333221e-01\n1.63341276003923536e-01\n1.70526599796504891e-01\n1.30939192440971686e-01\n2.03151545067934980e-02\n-1.63221495163531127e-01\n-3.58668304344964883e-01\n-4.27241532923655742e-01\n-2.57379984592180533e-01\n0.0\n1.17970395645446788e-02\n4.56897377680315353e-02\n1.06735478516165258e-01\n1.93328295713620590e-01\n2.90991615491047739e-01\n3.66618714800346246e-01\n3.73047290429373513e-01\n2.78093697547176333e-01\n1.15841260276673477e-01\n1.11154188252270858e-01\n1.92524701527008762e-01\n2.47219185509918865e-01\n2.86223068194520869e-01\n3.06988572573322294e-01\n3.02386479720596069e-01\n2.65378536168870360e-01\n1.95946684919057451e-01\n1.08883370572501789e-01\n3.43800712548983714e-02\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n6.95453840939869034e-02\n1.20456138682677766e-01\n1.40697900988298069e-01\n9.63808429807962025e-02\n-6.45778566587021235e-02\n-2.91065835282570684e-01\n-2.08957873602256261e-01\n4.93804876402950677e-01\n-2.66261324079825612e-01\n6.49588502690164049e-02\n-7.58802349632078238e-03\n0.0\n1.79409066807431142e-02\n6.94848327903794666e-02\n1.53012297620643473e-01\n2.20111480159701112e-01\n1.43142586615585377e-01\n-1.80510381278339072e-01\n-3.71751672089394636e-01\n4.41314970123832251e-01\n-1.88126215358685317e-01\n3.95559811435529790e-02\n5.92363103432655136e-02\n1.02600299167453682e-01\n1.23425366129515574e-01\n1.03296130267200331e-01\n6.43340478975442179e-03\n-1.68184087365804286e-01\n-2.75066440817059277e-01\n-8.11908042567650347e-03\n4.55183095357789891e-01\n-3.63842490854997702e-01\n1.28189609146893341e-01\n0.0\n1.33705655534651809e-02\n5.17839777179451982e-02\n1.16356419625834262e-01\n1.82478485662474710e-01\n1.77734876478498172e-01\n6.03803797757294057e-03\n-2.75417777068005853e-01\n-2.01120294025606938e-01\n4.70642176902570486e-01\n-2.84372829253447090e-01\n5.35216692036052100e-02\n9.27022503665387160e-02\n1.13563582111631145e-01\n1.05431106363779017e-01\n4.27057080338058836e-02\n-8.82457560722657575e-02\n-2.28716795670387857e-01\n-1.93890834223618747e-01\n1.62143135477166356e-01\n3.65319804536886006e-01\n-4.53060970710558064e-01\n0.0\n1.13991489495187583e-02\n4.41487140424239172e-02\n1.00557166842546120e-01\n1.66342803436241277e-01\n1.94843109840054735e-01\n1.08914161690773961e-01\n-1.24469037296297352e-01\n-3.19982790793915006e-01\n-5.39795070473810742e-02\n5.38068612254463230e-01\n5.81003036574986309e-02\n1.00632677869967505e-01\n1.25099551604094861e-01\n1.25223109819501383e-01\n8.02359439172549704e-02\n-2.88090605695263055e-02\n-1.83611348705344929e-01\n-2.79057603856599057e-01\n-1.35124956388181033e-01\n2.79191283496871556e-01\n4.90006249842694475e-01\n0.0\n1.09203683039434275e-02\n4.22944045756242296e-02\n9.76376615575970247e-02\n1.69706665552446234e-01\n2.29621252277138310e-01\n2.20016360616412915e-01\n7.54144520608128061e-02\n-2.01599709739908206e-01\n-4.36954383967810944e-01\n-3.48376849056570181e-01\n7.04498935794742737e-02\n1.22022795067469880e-01\n1.54144282832189089e-01\n1.66358282134883323e-01\n1.44282391046699932e-01\n6.86391663509140215e-02\n-7.06468697561107029e-02\n-2.49966711292477245e-01\n-3.90468780131501936e-01\n-3.81614344777228387e-01\n-1.93941370348083009e-01\n0.0\n9.55497517822956159e-03\n3.70062597387083372e-02\n8.67236719212111928e-02\n1.58757326897540935e-01\n2.45014253055384296e-01\n3.24949361259582570e-01\n3.65483819865823845e-01\n3.32953285490653506e-01\n2.21520404340856625e-01\n8.17476669329120081e-02\n1.03596158798840002e-01\n1.79433810508564495e-01\n2.30710206912506183e-01\n2.68541299016661239e-01\n2.92062712041121220e-01\n2.96375682161050480e-01\n2.75584628986549118e-01\n2.26878876755555181e-01\n1.55827356111508858e-01\n7.97573931637260147e-02\n2.29395468045778227e-02\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n1.79405992366967609e-02\n6.94836420647080427e-02\n1.53009675527972261e-01\n2.20107708223013954e-01\n1.43140133655051210e-01\n-1.80507287965218560e-01\n-3.71745301573102427e-01\n4.41307407537250285e-01\n-1.88122991536951834e-01\n3.95553032931457021e-02\n-4.13960582596097516e-03\n5.92042739052351316e-02\n1.02544810429091512e-01\n1.23358545941716607e-01\n1.03239858496742873e-01\n6.42874691395230007e-03\n-1.68094658831724530e-01\n-2.74915815906286221e-01\n-8.10646549502497954e-03\n4.54923839398665320e-01\n-3.63637675288058404e-01\n1.28117698133496105e-01\n-2.36611435924639416e-02\n0.0\n1.32868156385064183e-02\n5.14596156920636219e-02\n1.15625405105624579e-01\n1.81318129237539372e-01\n1.76554704778879884e-01\n5.86790700107329803e-03\n-2.73694164721663524e-01\n-1.99361636924890923e-01\n4.67119216521966918e-01\n-2.82296166134538007e-01\n8.47279654920732178e-02\n5.16869543201819090e-02\n8.95244309710467451e-02\n1.09649145854854774e-01\n1.01689786395819826e-01\n4.08535191494143884e-02\n-8.58956775115069515e-02\n-2.21107051048299086e-01\n-1.85301150312198321e-01\n1.59393161477496770e-01\n3.45224822887257587e-01\n-4.31359400012225391e-01\n2.09811522929268135e-01\n0.0\n1.04273737468520162e-02\n4.03850448662382913e-02\n9.18988661694853659e-02\n1.51480921149954290e-01\n1.75480170854953127e-01\n9.29109878353302776e-02\n-1.21619684116086271e-01\n-2.84462788190268545e-01\n-1.47751774362918815e-02\n4.35935313295703342e-01\n-3.76130796734891359e-01\n4.90852233087547829e-02\n8.50181006716274057e-02\n1.05411633284127587e-01\n1.04154456883593094e-01\n6.26055685259493955e-02\n-3.48056650511157153e-02\n-1.66238714881184219e-01\n-2.28052142197570862e-01\n-6.47562432345634154e-02\n2.75258171680958119e-01\n2.21943954915193087e-01\n-5.04389995376418487e-01\n0.0\n9.46149101697223160e-03\n3.66441971390245244e-02\n8.42044896200951354e-02\n1.43943355413596485e-01\n1.86008805742434641e-01\n1.54830437870518450e-01\n1.98664699054677216e-04\n-2.27002070529181199e-01\n-2.76318548354278493e-01\n1.12917701824061967e-01\n5.21107983067733871e-01\n5.49972807548282511e-02\n9.52580845454925468e-02\n1.19442483483223866e-01\n1.24594751130013559e-01\n9.54606130089945826e-02\n1.49295180909319678e-02\n-1.15446236008278372e-01\n-2.42133820536057531e-01\n-2.42542150223730241e-01\n-1.04789590010064514e-03\n3.71316866970702597e-01\n4.24399092303758829e-01\n0.0\n9.07713494377025178e-03\n3.51555924684995788e-02\n8.16263402165752910e-02\n1.44783104823619169e-01\n2.06662831376364181e-01\n2.28702789269028622e-01\n1.57920066848658530e-01\n-3.66328605538904575e-02\n-2.95180275650738067e-01\n-4.31423735164084943e-01\n-2.76592919298255246e-01\n6.63210971285699280e-02\n1.14871509840393488e-01\n1.45839291729334464e-01\n1.60920366664859038e-01\n1.50081254036663614e-01\n9.83488566098736916e-02\n-6.00956356846753074e-03\n-1.56620953132782514e-01\n-3.11584605075992616e-01\n-3.92110493854978592e-01\n-3.27078900989143273e-01\n-1.43743708296987904e-01\n0.0\n7.87983895639305168e-03\n3.05184850489067239e-02\n7.16769100690038269e-02\n1.32172830670511804e-01\n2.07457161548428720e-01\n2.84525642567234227e-01\n3.40557427528965007e-01\n3.47576352228320173e-01\n2.87258556737363890e-01\n1.72705911026777098e-01\n5.72056487761727350e-02\n9.71353300365080524e-02\n1.68243326833203199e-01\n2.16519250582972222e-01\n2.52961453846670126e-01\n2.77766273229655913e-01\n2.87597564039939912e-01\n2.77772627813182793e-01\n2.44788153887645576e-01\n1.89794465728551104e-01\n1.21848699822935794e-01\n5.78048706132345408e-02\n1.52658200454799751e-02\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n5.92039761577872539e-02\n1.02544294715383982e-01\n1.23357925552514860e-01\n1.03239339287531123e-01\n6.42871458279003008e-03\n-1.68093813457693780e-01\n-2.74914433312139439e-01\n-8.10642472635655052e-03\n4.54921551516334843e-01\n-3.63635846497962212e-01\n1.28117053809782111e-01\n-2.36610245969142326e-02\n2.24257485446163838e-03\n0.0\n1.32843180022840460e-02\n5.14499423885694945e-02\n1.15603655016669332e-01\n1.81283926309183108e-01\n1.76521057662319986e-01\n5.86589672061072452e-03\n-2.73642726627294719e-01\n-1.99320740373186756e-01\n4.67027465583425228e-01\n-2.82241074828867233e-01\n8.47114676964416807e-02\n-1.39449174083987014e-02\n5.15467511306718848e-02\n8.92815919234321853e-02\n1.09351168859313147e-01\n1.01410701806513529e-01\n4.07328039415079043e-02\n-8.56797742038073740e-02\n-2.20512597250098835e-01\n-1.84748454600594608e-01\n1.59027582512921178e-01\n3.44102254279421205e-01\n-4.30036746221718447e-01\n2.09177667785642507e-01\n-5.46708877792467518e-02\n0.0\n1.02458808400733500e-02\n3.96821258608297395e-02\n9.02934395388044347e-02\n1.48797600255256457e-01\n1.72237785539674643e-01\n9.08419703448000992e-02\n-1.19989761937002198e-01\n-2.78879170059002091e-01\n-1.24822508197185364e-02\n4.24889178103870557e-01\n-3.67264273640395378e-01\n1.49558684112145235e-01\n4.60709227052357659e-02\n7.97971788770469315e-02\n9.88991849872545431e-02\n9.75266522707939065e-02\n5.80318550316639356e-02\n-3.41133334610623715e-02\n-1.57439952956026724e-01\n-2.12607956398721043e-01\n-5.40346040550959417e-02\n2.61102283818259784e-01\n1.86702512861098319e-01\n-4.49913582066643669e-01\n2.98868341103225521e-01\n0.0\n8.46316868571372546e-03\n3.27777113759133709e-02\n7.52276266615852507e-02\n1.28024354590673212e-01\n1.63353727251642405e-01\n1.30388792134372766e-01\n-1.31914074031135413e-02\n-2.09121355374356471e-01\n-2.18003233152459730e-01\n1.49296496630480197e-01\n3.43474492440830836e-01\n-4.48802353913798746e-01\n4.60099915916724889e-02\n7.96916430925935920e-02\n9.96488430668254210e-02\n1.02606523573959080e-01\n7.46179422174153284e-02\n1.13200899285538048e-03\n-1.12344703252253542e-01\n-2.08516761006346862e-01\n-1.70919644540708959e-01\n7.39554756430130383e-02\n3.16720983931285172e-01\n5.95345133286655295e-02\n-5.20447081045442461e-01\n0.0\n8.01157007723828085e-03\n3.10286774861175257e-02\n7.17489124288095415e-02\n1.25443051868337124e-01\n1.72456034546490389e-01\n1.73057794421517919e-01\n7.99738892061562096e-02\n-1.10443758007290727e-01\n-2.77527129357300950e-01\n-1.80191630209226794e-01\n2.49005786388079603e-01\n4.77819240655940725e-01\n5.22657116980259906e-02\n9.05268681547280324e-02\n1.14212692633971463e-01\n1.22563100870104372e-01\n1.04276850159143022e-01\n4.48710620085357031e-02\n-6.09307111052797903e-02\n-1.87392715193011122e-01\n-2.57739163184549480e-01\n-1.63593017058622087e-01\n1.27430585903872157e-01\n4.17375522017277012e-01\n3.54483062569559970e-01\n0.0\n7.64726783979975851e-03\n2.96177409875320354e-02\n6.90497365004251323e-02\n1.24210686620131308e-01\n1.83685962917620016e-01\n2.21273422037784884e-01\n1.96784492159175900e-01\n7.33072851523406260e-02\n-1.42103060454228824e-01\n-3.54003619439739625e-01\n-4.00541660881756800e-01\n-2.14760631352937825e-01\n6.27008298710993728e-02\n1.08601023013476447e-01\n1.38371826989090146e-01\n1.55055556855518056e-01\n1.51602240642226826e-01\n1.16436228122936997e-01\n3.84872200590096053e-02\n-8.35959427495277935e-02\n-2.28957847926069658e-01\n-3.47043661778509538e-01\n-3.71974529953821298e-01\n-2.71646078266148283e-01\n-1.05155176283512980e-01\n0.0\n6.59797708312419903e-03\n2.55538553615982100e-02\n6.01115096742749627e-02\n1.11423307467675592e-01\n1.76976086889520073e-01\n2.48395492267943108e-01\n3.09913121191117913e-01\n3.39911027810560762e-01\n3.18447840248598624e-01\n2.41178425998515022e-01\n1.32331226468230062e-01\n3.97592892805590029e-02\n9.15411455185830003e-02\n1.58553915021241804e-01\n2.04183672008142497e-01\n2.39186470917833072e-01\n2.64439191466085688e-01\n2.77706141076044688e-01\n2.75350113892164239e-01\n2.53981812826658548e-01\n2.12746386263812481e-01\n1.55869361219563213e-01\n9.39320190673302441e-02\n4.15238748625613857e-02\n1.01371917721128149e-02\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n1.32842986277409529e-02\n5.14498673512867530e-02\n1.15603486414261936e-01\n1.81283661915238203e-01\n1.76520800214791412e-01\n5.86588816548062539e-03\n-2.73642327532452379e-01\n-1.99320449673410310e-01\n4.67026784446180843e-01\n-2.82240663193744856e-01\n8.47113441488134972e-02\n-1.39448970704029382e-02\n1.20766351161281406e-03\n5.15434386235685271e-02\n8.92758544928287379e-02\n1.09344138579136788e-01\n1.01404166388139150e-01\n4.07301298214212820e-02\n-8.56743658708723071e-02\n-2.20498456954178884e-01\n-1.84736296316904414e-01\n1.59017744528104882e-01\n3.44079078291168405e-01\n-4.30008239590454866e-01\n2.09163855806099030e-01\n-5.46672833886332893e-02\n8.11598677207533981e-03\n0.0\n1.02347386039792695e-02\n3.96389721659978628e-02\n9.01951243815012765e-02\n1.48634813295055429e-01\n1.72046572506774798e-01\n9.07338366442035221e-02\n-1.19869133265714162e-01\n-2.78562345216570528e-01\n-1.24283304451213543e-02\n4.24357554701113249e-01\n-3.66818047598351071e-01\n1.49378686303239139e-01\n-3.45691007235739284e-02\n4.56599146988214966e-02\n7.90852921276198190e-02\n9.80147625055961536e-02\n9.66440381946502836e-02\n5.74746929871433471e-02\n-3.38866319657478710e-02\n-1.56108655759109677e-01\n-2.10626683832180195e-01\n-5.31930433643634237e-02\n2.58872771747908348e-01\n1.83965075577817688e-01\n-4.44712140449778748e-01\n2.95555019922776274e-01\n-1.03533327745445353e-01\n0.0\n8.16250374834931458e-03\n3.16132410807125133e-02\n7.25440897602803864e-02\n1.23388983088150037e-01\n1.57190634723091804e-01\n1.24806087435550286e-01\n-1.42288588024024869e-02\n-2.02169956409104817e-01\n-2.06726978349170171e-01\n1.48140412137884647e-01\n3.19133487496107371e-01\n-4.22276719620985175e-01\n2.28561693094687102e-01\n4.19263225431599704e-02\n7.26185208192734466e-02\n9.07478350769860415e-02\n9.31649411122857513e-02\n6.69220167627589957e-02\n-1.25645886773967418e-03\n-1.05385899360504298e-01\n-1.90599828001530747e-01\n-1.48521677725344164e-01\n8.06837424610863524e-02\n2.83034031487554349e-01\n1.26629573458276901e-02\n-4.11984782776102232e-01\n3.81537168692520912e-01\n0.0\n7.09649923757630849e-03\n2.74846233635066758e-02\n6.34648155400773378e-02\n1.10408445233505126e-01\n1.49783499695078454e-01\n1.44895412687874120e-01\n5.46255711152920584e-02\n-1.15219659155100532e-01\n-2.38466185178264400e-01\n-1.00880046985396307e-01\n2.62766540350455990e-01\n2.10428809103090808e-01\n-4.92866801002861343e-01\n4.37202776444573782e-02\n7.57257422012179299e-02\n9.52804037304249007e-02\n1.00994542643411969e-01\n8.22393133951418442e-02\n2.62487310037855387e-02\n-6.88831923822721404e-02\n-1.72220969408418134e-01\n-2.04283354639478415e-01\n-7.31206700917579611e-02\n1.90281486011692813e-01\n2.89309682011844982e-01\n-9.64523704528028186e-02\n-5.04906052746662448e-01\n0.0\n6.87366880979738831e-03\n2.66216048276906418e-02\n6.18414571736072699e-02\n1.09873953570590266e-01\n1.57515436981424117e-01\n1.76272963414328993e-01\n1.26760077955732187e-01\n-1.41540327255551806e-02\n-1.99166685729917997e-01\n-2.71600518162267601e-01\n-5.72479300193324200e-02\n3.44150035045159119e-01\n4.19577030504663884e-01\n4.98084677652231647e-02\n8.62707968165231792e-02\n1.09338312155682932e-01\n1.19730902494640426e-01\n1.09018235987536516e-01\n6.52571527174963945e-02\n-1.92266514415370925e-02\n-1.33538171591856158e-01\n-2.31488934839658156e-01\n-2.30918405654971598e-01\n-6.09177078863790689e-02\n2.33726973401547855e-01\n4.25810913054445850e-01\n2.87881738831480161e-01\n0.0\n6.51872897341939164e-03\n2.52469287524930731e-02\n5.90356197979780631e-02\n1.07276072392555238e-01\n1.62600907132288142e-01\n2.06958359318976354e-01\n2.10491924070092540e-01\n1.39505404462848009e-01\n-2.02876497523106179e-02\n-2.29550141677306641e-01\n-3.80622145455153216e-01\n-3.55617429238878457e-01\n-1.63845913336338661e-01\n5.95017277084905899e-02\n1.03060015529234578e-01\n1.31656134186257795e-01\n1.49181097398981000e-01\n1.50675101531914379e-01\n1.27169144910433546e-01\n6.89631568776652160e-02\n-2.85139728634747382e-02\n-1.56055273305446635e-01\n-2.82908968220030144e-01\n-3.58996355405342749e-01\n-3.38106145957929927e-01\n-2.20063224951406011e-01\n-7.61130349169669013e-02\n0.0\n5.59689929818312643e-03\n2.16766977722632273e-02\n5.10504426681507167e-02\n9.49886804814698976e-02\n1.52178692973077900e-01\n2.17156532404923247e-01\n2.78940650674480706e-01\n3.21262200388016894e-01\n3.26297227788915289e-01\n2.83042930396243397e-01\n1.98011088380686540e-01\n9.99530083951144510e-02\n2.74776254209024295e-02\n8.66442422902638371e-02\n1.50072229830044951e-01\n1.93354930788752044e-01\n2.26946726459306969e-01\n2.52165768578531291e-01\n2.67559471052438436e-01\n2.70332823868720040e-01\n2.57486894896499674e-01\n2.27350697578589195e-01\n1.81451363757204082e-01\n1.25990278614804940e-01\n7.15340733529741257e-02\n2.96042484474846532e-02\n6.71941389263263581e-03\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n5.15434170459601951e-02\n8.92758171193147876e-02\n1.09344092804445403e-01\n1.01404123937355026e-01\n4.07301127705839289e-02\n-8.56743300050480522e-02\n-2.20498364647001288e-01\n-1.84736218980825290e-01\n1.59017677958572440e-01\n3.44078934249486545e-01\n-4.30008059576283852e-01\n2.09163768243920828e-01\n-5.46672605032911124e-02\n8.11598337448316172e-03\n-6.47015840362148058e-04\n0.0\n1.02345204713736940e-02\n3.96381273420491967e-02\n9.01932014647020691e-02\n1.48631640752308336e-01\n1.72042886812074303e-01\n9.07318577009378902e-02\n-1.19866626117744568e-01\n-2.78556342786648037e-01\n-1.24278706777272187e-02\n4.24348174375699161e-01\n-3.66810003408135521e-01\n1.49375418771085511e-01\n-3.45683453683461109e-02\n4.67292841287900423e-03\n4.56402673113407778e-02\n7.90512618542672379e-02\n9.79725507602303841e-02\n9.66022385460268834e-02\n5.74492903029507479e-02\n-3.38733689791177461e-02\n-1.56042713345257850e-01\n-2.10534577182466875e-01\n-5.31640641753261256e-02\n2.58762820690945194e-01\n1.83868187371393987e-01\n-4.44501009764610155e-01\n2.95417047630041396e-01\n-1.03485302624008568e-01\n2.14843001832535317e-02\n0.0\n8.12912460759887719e-03\n3.14839642244753581e-02\n7.22469477706704499e-02\n1.22880551428569601e-01\n1.56531943471275747e-01\n1.24253944355539062e-01\n-1.42358179562934173e-02\n-2.01360376925500961e-01\n-2.05725225187899541e-01\n1.47693663186258123e-01\n3.17329991380057796e-01\n-4.20110441713433536e-01\n2.27419448851854250e-01\n-6.99033276675538329e-02\n4.10297942157901441e-02\n7.10656882058441630e-02\n8.88019032921207457e-02\n9.11406174107342870e-02\n6.53881115867177148e-02\n-1.44751846286906953e-03\n-1.03412924137976980e-01\n-1.86557191759852775e-01\n-1.44631570021123201e-01\n8.01476739993138565e-02\n2.76248811948479944e-01\n9.01758169088214684e-03\n-3.97865184071187594e-01\n3.69707177639399698e-01\n-1.69060785466634611e-01\n0.0\n6.69108512145757516e-03\n2.59144612434614209e-02\n5.98230773687858305e-02\n1.03973375720904482e-01\n1.40691277887584232e-01\n1.35123093031426056e-01\n4.87006924873865168e-02\n-1.11357448564891104e-01\n-2.22826711365856689e-01\n-8.52172490221473344e-02\n2.50654509305022422e-01\n1.69772540806247846e-01\n-4.31841862527909515e-01\n3.11477713781712129e-01\n3.89206098439871667e-02\n6.74124737113511591e-02\n8.47505293234426249e-02\n8.94938750487602741e-02\n7.18681913725857796e-02\n2.03699991688146460e-02\n-6.58966274036392324e-02\n-1.56665876085612832e-01\n-1.77336286387778180e-01\n-4.78481697831399239e-02\n1.84913063030193114e-01\n2.30660944839252757e-01\n-1.43031356989373498e-01\n-3.22810842715636814e-01\n4.45513944971131615e-01\n0.0\n6.09629634148589009e-03\n2.36108542041200548e-02\n5.47669144410873124e-02\n9.68078670100125660e-02\n1.36978127741709116e-01\n1.48385427406026504e-01\n9.56432742748578452e-02\n-3.62876094447236036e-02\n-1.89104964810651532e-01\n-2.06723594375194636e-01\n3.45805196047870994e-02\n3.11178565271484464e-01\n5.96517316884773302e-02\n-5.05674739868913092e-01\n4.18509982496457072e-02\n7.24880553158625263e-02\n9.16355307926945972e-02\n9.92137771828147247e-02\n8.70322524681697851e-02\n4.41876449317896713e-02\n-3.44612062130624786e-02\n-1.33122029096842481e-01\n-1.99718535763681621e-01\n-1.54532101465627625e-01\n4.08122605000156569e-02\n2.61877903891442498e-01\n2.08793542247244224e-01\n-2.27003222552311812e-01\n-4.66024434980309432e-01\n0.0\n5.95522658054399839e-03\n2.30644933693386484e-02\n5.37631855181224111e-02\n9.66598954559635265e-02\n1.42754470894737029e-01\n1.71467132592813737e-01\n1.51471117197272992e-01\n5.49843260397175002e-02\n-1.08068779964157480e-01\n-2.50106921390080283e-01\n-2.17538624764376659e-01\n6.86229503778111316e-02\n3.97951828625221715e-01\n3.56121051218615148e-01\n4.75820332724135250e-02\n8.24144991552530348e-02\n1.04808265200625458e-01\n1.16493151200735098e-01\n1.11149764223140657e-01\n7.90293377396858732e-02\n1.20352091717696175e-02\n-8.67793560531009700e-02\n-1.90511421397489888e-01\n-2.41619148469467276e-01\n-1.70026424653347663e-01\n4.73105261799996041e-02\n3.10092578379215389e-01\n4.07235376275711380e-01\n2.28677108793722716e-01\n0.0\n5.61447241937270813e-03\n2.17447581779713628e-02\n5.09599949717605971e-02\n9.32967729076156355e-02\n1.43954973884038190e-01\n1.90322910966592207e-01\n2.10308756626867821e-01\n1.75771380891642126e-01\n6.56128043394830496e-02\n-1.10945798512427266e-01\n-2.93318711727292292e-01\n-3.81022417973643390e-01\n-3.05136501784301017e-01\n-1.23235519228990537e-01\n5.66540947006088647e-02\n9.81277704782732296e-02\n1.25601772134096817e-01\n1.43499523518761385e-01\n1.48353737907410577e-01\n1.33182101353086307e-01\n8.97495380500523687e-02\n1.23985445002494608e-02\n-9.59945989486137158e-02\n-2.17529109934118753e-01\n-3.17109648800381727e-01\n-3.52019036510441585e-01\n-2.97191309629163292e-01\n-1.74710718626530842e-01\n-5.46077906279090197e-02\n0.0\n4.80130465451401693e-03\n1.85953729670009435e-02\n4.38321166393646072e-02\n8.17913248604780901e-02\n1.31881072510292491e-01\n1.90507645135955028e-01\n2.49949083816400797e-01\n2.98062029555558161e-01\n3.20049707080477919e-01\n3.03366530777123666e-01\n2.45309059248744132e-01\n1.59554704290216870e-01\n7.45942315392765787e-02\n1.88992490205324402e-02\n8.23173052401406091e-02\n1.42577755018079316e-01\n1.83766327022205106e-01\n2.16011779060915843e-01\n2.40918994536585579e-01\n2.57599202011181472e-01\n2.63918783977479032e-01\n2.57329614168113285e-01\n2.35920936472461290e-01\n1.99767139982350128e-01\n1.52232056483038086e-01\n1.00438510208436360e-01\n5.39048301117054651e-02\n2.09696969143137353e-02\n4.44713251072412045e-03\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n1.02345192525151608e-02\n3.96381226214303981e-02\n9.01931907233338298e-02\n1.48631623051337980e-01\n1.72042866322991206e-01\n9.07318468954195212e-02\n-1.19866611842482679e-01\n-2.78556309612570552e-01\n-1.24278691976562917e-02\n4.24348123838852342e-01\n-3.66809959723675305e-01\n1.49375400981536510e-01\n-3.45683412515022589e-02\n4.67292785636649541e-03\n-3.45098354468233854e-04\n4.56399489668368186e-02\n7.90507104654120663e-02\n9.79718672442896898e-02\n9.66015638527436271e-02\n5.74488868114029910e-02\n-3.38731381648036539e-02\n-1.56041630028019768e-01\n-2.10533102586574261e-01\n-5.31636681514541312e-02\n2.58761021764139287e-01\n1.83866831520396762e-01\n-4.44497827523619327e-01\n2.95414942403525616e-01\n-1.03484566427448521e-01\n2.14841474629042309e-02\n-2.66551553893987691e-03\n0.0\n8.12781063613857505e-03\n3.14788752348922063e-02\n7.22352630055050626e-02\n1.22860634170828320e-01\n1.56506414777892428e-01\n1.24233263704007363e-01\n-1.42344425157081272e-02\n-2.01328056930509175e-01\n-2.05689733454248319e-01\n1.47671954934094435e-01\n3.17271741067472635e-01\n-4.20036377537249983e-01\n2.27379775826296288e-01\n-6.98911871698369713e-02\n1.31549824624217996e-02\n4.09532806835184310e-02\n7.09331628804830000e-02\n8.86361084122174736e-02\n9.09695047868854245e-02\n6.52624919914473051e-02\n-1.45259727378020459e-03\n-1.03229995430704727e-01\n-1.86210135804853433e-01\n-1.44336008402111027e-01\n8.00394962227069101e-02\n2.75704809564723707e-01\n8.88843471968916478e-03\n-3.96942378474349877e-01\n3.68891884284460236e-01\n-1.68694334826996611e-01\n4.61947168848699519e-02\n0.0\n6.61670537302144323e-03\n2.56263897164731823e-02\n5.91567943886656747e-02\n1.02807462623384027e-01\n1.39084918415800340e-01\n1.33503180850202630e-01\n4.79409840033613588e-02\n-1.10321692370949451e-01\n-2.20169502964461139e-01\n-8.35134114180246800e-02\n2.47972001640512113e-01\n1.65892351144060313e-01\n-4.24689870654414492e-01\n3.06621728939327209e-01\n-1.21473546510530273e-01\n3.73662168055605426e-02\n6.47201859938648927e-02\n8.13553206928023936e-02\n8.58576995869319015e-02\n6.87968567593834068e-02\n1.91102871759617696e-02\n-6.39341482202827882e-02\n-1.50859713973024362e-01\n-1.69491218497555746e-01\n-4.33791213343562160e-02\n1.79410612313006423e-01\n2.17065670476472822e-01\n-1.43534101923363328e-01\n-2.94150179912740173e-01\n4.13865524123857409e-01\n-2.45264465744961802e-01\n0.0\n5.63045210520655027e-03\n2.18066472350834581e-02\n5.05620535165914181e-02\n8.92525264392907136e-02\n1.25841405855628252e-01\n1.35109209179443607e-01\n8.43384041599745393e-02\n-3.88342420973135788e-02\n-1.76500656459326832e-01\n-1.81523516695283715e-01\n4.93372982091927620e-02\n2.79420188726255625e-01\n6.16265125686795041e-03\n-3.90377324296412143e-01\n3.86281112020468553e-01\n3.67476336721161076e-02\n6.36487685780339763e-02\n8.03837305715512929e-02\n8.66561634583911944e-02\n7.49135138720450483e-02\n3.53324104782903395e-02\n-3.60387983145474128e-02\n-1.22893218091002371e-01\n-1.75106086759483193e-01\n-1.20624434793589475e-01\n6.29456563539905339e-02\n2.35878875631365670e-01\n1.24861726459531988e-01\n-2.53814455087119806e-01\n-1.97580313204279434e-01\n4.83220503518339617e-01\n0.0\n5.32371937604757262e-03\n2.06186764833139885e-02\n4.79919150859744459e-02\n8.58535385519472866e-02\n1.25231053411363702e-01\n1.46154200300103898e-01\n1.19490469509231242e-01\n2.31996910867493314e-02\n-1.21993162460493493e-01\n-2.18105950876099075e-01\n-1.25664411050493752e-01\n1.56612190427971643e-01\n2.95033898061115518e-01\n-8.64961257483830570e-02\n-4.90626506171466858e-01\n4.02101225088081354e-02\n6.96459751638246194e-02\n8.83614600642369796e-02\n9.72095101082088020e-02\n8.98389644945389865e-02\n5.70576819347236239e-02\n-7.46517891710742065e-03\n-9.66670508584898669e-02\n-1.77333293141995502e-01\n-1.88005077138011151e-01\n-7.14556852843431928e-02\n1.45312071841256663e-01\n2.80009239548299427e-01\n9.74281680717939691e-02\n-3.22172764846062887e-01\n-4.13329226937413918e-01\n0.0\n5.20156594615810326e-03\n2.01455782836699598e-02\n4.70831596862029272e-02\n8.54109464811953767e-02\n1.28928862513235293e-01\n1.62641563764844760e-01\n1.62095381409089773e-01\n1.00762887155296910e-01\n-2.89304430236159704e-02\n-1.84294559129724200e-01\n-2.57736402297321976e-01\n-1.30881556025735979e-01\n1.79957559362333652e-01\n4.16201129789133317e-01\n2.94252698004569213e-01\n4.55585122548586852e-02\n7.89096579426645794e-02\n1.00614302242120673e-01\n1.13096265271506222e-01\n1.11607505742739796e-01\n8.82131260123498046e-02\n3.52400658239354694e-02\n-4.83074942879838307e-02\n-1.47420161171721270e-01\n-2.23349246746128827e-01\n-2.18460188990239057e-01\n-8.73623930149192568e-02\n1.46865042542932700e-01\n3.55594337837898067e-01\n3.71670290783577828e-01\n1.78438524215638661e-01\n0.0\n4.88008737645021732e-03\n1.89004971370287378e-02\n4.43698855496412331e-02\n8.16931515898542820e-02\n1.27735348966983131e-01\n1.73571548015061861e-01\n2.02803734283758030e-01\n1.92781918177713507e-01\n1.21894977097790985e-01\n-1.53314330123597992e-02\n-1.89885757331642313e-01\n-3.32408766116818633e-01\n-3.62299691206809438e-01\n-2.54835025031357409e-01\n-9.16039889040857480e-02\n5.41021939796102261e-02\n9.37077487736319437e-02\n1.20124595583546309e-01\n1.38102888772737492e-01\n1.45259307410308680e-01\n1.36129333783226725e-01\n1.03818876044478717e-01\n4.25783254485118043e-02\n-4.80715625124011753e-02\n-1.58298558418786595e-01\n-2.64587976943379488e-01\n-3.32693904282811259e-01\n-3.31284610409329716e-01\n-2.54240732297991878e-01\n-1.36401368574986886e-01\n-3.88874367343566146e-02\n0.0\n4.15933598682088380e-03\n1.61090390082384745e-02\n3.79970942801209563e-02\n7.10587858672756950e-02\n1.15139353631775868e-01\n1.67870689868319267e-01\n2.23771555214613310e-01\n2.73778936362534253e-01\n3.06003218530616683e-01\n3.08547813027234219e-01\n2.74582349993513997e-01\n2.08117945995765607e-01\n1.26537559423437557e-01\n5.51016666359811086e-02\n1.29459535683894358e-02\n7.84626965899099665e-02\n1.35901376992585338e-01\n1.75210671179304195e-01\n2.06189180057526206e-01\n2.30626513600981686e-01\n2.48044412304442075e-01\n2.56824276919989214e-01\n2.54845308788739178e-01\n2.40227525824909749e-01\n2.12302339202899815e-01\n1.72665768644376549e-01\n1.25872406476923188e-01\n7.90994580814313175e-02\n4.02468462645480460e-02\n1.47700082098983464e-02\n2.93939020785524176e-03\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n4.56399474326533716e-02\n7.90507078081283815e-02\n9.79718639509727512e-02\n9.66015606054893283e-02\n5.74488848802629862e-02\n-3.38731370261606615e-02\n-1.56041624782692123e-01\n-2.10533095509519874e-01\n-5.31636663643614282e-02\n2.58761013065907042e-01\n1.83866825339727064e-01\n-4.44497812581858276e-01\n2.95414932473174574e-01\n-1.03484562948822606e-01\n2.14841467407162340e-02\n-2.66551544933877260e-03\n1.83343732315790049e-04\n0.0\n8.12779248418321783e-03\n3.14788049326714114e-02\n7.22351016565580956e-02\n1.22860359586750206e-01\n1.56506064435345399e-01\n1.24232984113934339e-01\n-1.42344140432468722e-02\n-2.01327608116713991e-01\n-2.05689266060100129e-01\n1.47671632894469079e-01\n3.17271007561669927e-01\n-4.20035417390599020e-01\n2.27379257573251503e-01\n-6.98910280647729587e-02\n1.31549525329151852e-02\n-1.50807485560315309e-03\n4.09508245656199574e-02\n7.09289087594934670e-02\n8.86307902259619307e-02\n9.09640350812962323e-02\n6.52585334046741766e-02\n-1.45260419653880338e-03\n-1.03223923884160046e-01\n-1.86198976887775397e-01\n-1.44327038064191865e-01\n8.00351903344340421e-02\n2.75687914786719390e-01\n8.88657679374218676e-03\n-3.96916421316341306e-01\n3.68868260150342187e-01\n-1.68683606842578965e-01\n4.61917885492455146e-02\n-7.95115711902459957e-03\n0.0\n6.61148958343895504e-03\n2.56061890502828834e-02\n5.91101243504775220e-02\n1.02726119081083436e-01\n1.38974012746621883e-01\n1.33394425006174433e-01\n4.78967098994526608e-02\n-1.10240606587060655e-01\n-2.19990307774043187e-01\n-8.34253198074399044e-02\n2.47778161442858580e-01\n1.65705272136600051e-01\n-4.24287801477659210e-01\n3.06339972631976210e-01\n-1.21363238334938117e-01\n2.99647627841365394e-02\n3.71485607173190624e-02\n6.43431945904539559e-02\n8.08807580438549861e-02\n8.53536046169842411e-02\n6.83832262622150466e-02\n1.89704424971343689e-02\n-6.36041810425825305e-02\n-1.50008389121879970e-01\n-1.68452675148121372e-01\n-4.29634916684525497e-02\n1.78473675471781779e-01\n2.15513459708107868e-01\n-1.43037040897303763e-01\n-2.91509140373769682e-01\n4.10627646106692723e-01\n-2.43418736897158650e-01\n8.51050068183352437e-02\n0.0\n5.49925948599563376e-03\n2.12985404057342495e-02\n4.93814097262503804e-02\n8.71528898963484788e-02\n1.22824476712762046e-01\n1.31716892339920844e-01\n8.18748300533102130e-02\n-3.85739342982375569e-02\n-1.72557603562921436e-01\n-1.76065779146773432e-01\n5.01784689510784560e-02\n2.71549902453194658e-01\n1.05008589124075359e-03\n-3.72970637092618296e-01\n3.71129634936913977e-01\n-1.87022550304204199e-01\n3.45002077453906986e-02\n5.97561126866979972e-02\n7.54511280135322787e-02\n8.12590135554466797e-02\n7.00131455816282722e-02\n3.24416482192075098e-02\n-3.50336928888274404e-02\n-1.16563855370399927e-01\n-1.64164497523515557e-01\n-1.09914375271317061e-01\n6.44370508610721815e-02\n2.21408353860236329e-01\n1.05030948130134041e-01\n-2.43604308041988071e-01\n-1.51726883050863293e-01\n4.15380038365047499e-01\n-3.22541660029388833e-01\n0.0\n4.85000483882526857e-03\n1.87839879697956520e-02\n4.36996400441381910e-02\n7.80405862898792962e-02\n1.13345612990428765e-01\n1.30948686208534809e-01\n1.04037692135989582e-01\n1.36157577115173980e-02\n-1.17513721192403442e-01\n-1.94590359879910246e-01\n-9.31823077519262771e-02\n1.62136491827496843e-01\n2.36884712670613534e-01\n-1.41136811733010764e-01\n-3.03206229731324939e-01\n4.42725173438030861e-01\n3.51249572348408950e-02\n6.08382105444284504e-02\n7.71065349421041213e-02\n8.44408058951744006e-02\n7.69093667627129829e-02\n4.61511427135039703e-02\n-1.30411262566282309e-02\n-9.25058048164422442e-02\n-1.58990673953554290e-01\n-1.54687877520335665e-01\n-3.39180742180049399e-02\n1.56471336921575332e-01\n2.25773382149426716e-01\n-4.78780069976142853e-03\n-3.05349033961479721e-01\n-5.64188947209028138e-02\n4.92908868128289268e-01\n0.0\n4.69927585431174910e-03\n1.82002171229840373e-02\n4.24771507795458567e-02\n7.66916268654283390e-02\n1.14445164299894736e-01\n1.40754263330446272e-01\n1.32099488030162943e-01\n6.55278555396987678e-02\n-5.79943247836230275e-02\n-1.82976121513954065e-01\n-1.97306588421312157e-01\n-1.74339327457409821e-02\n2.41434052067455829e-01\n2.26996759941105630e-01\n-2.11038174949050278e-01\n-4.54834745443422617e-01\n3.87129067199080898e-02\n6.70527213475554246e-02\n8.53124459800308627e-02\n9.50163420719666169e-02\n9.12236764396714001e-02\n6.62325884154392336e-02\n1.35319103844044920e-02\n-6.48130859605403897e-02\n-1.48172522932136647e-01\n-1.91669039630034205e-01\n-1.39742627072237752e-01\n2.62265451028006955e-02\n2.20674022039266116e-01\n2.48470537471253666e-01\n-2.28391542633973842e-02\n-3.80298499764430198e-01\n-3.55127304516216658e-01\n0.0\n4.57613223215147091e-03\n1.77232839251656206e-02\n4.15070207040571862e-02\n7.58167704347556676e-02\n1.16351832420829707e-01\n1.52084463342870402e-01\n1.64045966702556834e-01\n1.28983577130354354e-01\n3.21628193693993189e-02\n-1.10221075516985359e-01\n-2.31074353998113324e-01\n-2.25475358262571646e-01\n-2.88636306866886898e-02\n2.66813018652859724e-01\n4.07332352518613938e-01\n2.37947652458516457e-01\n4.37145962066001689e-02\n7.57159016621892084e-02\n9.67395271107019811e-02\n1.09686959661154895e-01\n1.10994002979477244e-01\n9.41977336579225139e-02\n5.23693437560886904e-02\n-1.74717038746334263e-02\n-1.07573950441625765e-01\n-1.92506038567444610e-01\n-2.28365812348739233e-01\n-1.67766224106181777e-01\n4.20654069945770176e-03\n2.28604322490172845e-01\n3.73592724525456110e-01\n3.27298078957348859e-01\n1.37205369103317903e-01\n0.0\n4.27639285831495422e-03\n1.65623983220941524e-02\n3.89326443094694941e-02\n7.19965336557325530e-02\n1.13719680922454408e-01\n1.57715333389739198e-01\n1.91735742427340511e-01\n1.97834382123167868e-01\n1.56355207294911008e-01\n5.55184080901751295e-02\n-9.46562424181583983e-02\n-2.51850884869141145e-01\n-3.48982124787564685e-01\n-3.31220864708856144e-01\n-2.08187675016574730e-01\n-6.74166766704158565e-02\n5.18012290251738394e-02\n8.97223605661127133e-02\n1.15150310145045801e-01\n1.33025743434312838e-01\n1.41764361438956349e-01\n1.37068581617106944e-01\n1.13199461779641325e-01\n6.47554112220732475e-02\n-1.04379743026358704e-02\n-1.07523764980801240e-01\n-2.11268299995111541e-01\n-2.96009827636703859e-01\n-3.32354853749608048e-01\n-3.01699466508721592e-01\n-2.12669199436563289e-01\n-1.04998669121053337e-01\n-2.75159386617439411e-02\n0.0\n3.63438701232963405e-03\n1.40759203724252022e-02\n3.32190273939250089e-02\n6.22296811281547388e-02\n1.01218454017093493e-01\n1.48634123628793136e-01\n2.00553935049600646e-01\n2.50189687221119339e-01\n2.88126474348110728e-01\n3.03909982313591509e-01\n2.89338078123891007e-01\n2.42909389785746860e-01\n1.73362632081274837e-01\n9.89876473211268870e-02\n4.03448151881532491e-02\n8.83661703914521458e-03\n7.50042216834125586e-02\n1.29911122737829815e-01\n1.67524708585460341e-01\n1.97319470215024800e-01\n2.21201198249628694e-01\n2.38993539580122205e-01\n2.49478623191366683e-01\n2.50911338942161832e-01\n2.41560388592107766e-01\n2.20412979313437507e-01\n1.87994715245433930e-01\n1.47061663062772324e-01\n1.02735829347482516e-01\n6.16246870222807164e-02\n2.98055546573539228e-02\n1.03519020776536175e-02\n1.94060861642960931e-03\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n8.12779240760018971e-03\n3.14788046360666221e-02\n7.22351009759325813e-02\n1.22860358429115038e-01\n1.56506062960688114e-01\n1.24232982943365794e-01\n-1.42344139091250266e-02\n-2.01327606219731753e-01\n-2.05689264122020765e-01\n1.47671631503053041e-01\n3.17271004572226623e-01\n-4.20035413432871929e-01\n2.27379255430801119e-01\n-6.98910274062341658e-02\n1.31549524089644189e-02\n-1.50807484139352114e-03\n9.70688678748477522e-05\n4.09507955979091093e-02\n7.09288585859464971e-02\n8.86307275231119074e-02\n9.09639706916687413e-02\n6.52584871025503471e-02\n-1.45260346379467520e-03\n-1.03223851240542785e-01\n-1.86198845202262292e-01\n-1.44326934986166222e-01\n8.00351352690559098e-02\n2.75687718643415902e-01\n8.88656635444290757e-03\n-3.96916133803263405e-01\n3.68867994517823372e-01\n-1.68683485604885136e-01\n4.61917553793050675e-02\n-7.95115141188241885e-03\n8.47091517267953959e-04\n0.0\n6.61134781769220220e-03\n2.56056399939066474e-02\n5.91088564935601593e-02\n1.02723913234016209e-01\n1.38971019591510037e-01\n1.33391528047897390e-01\n4.78956154379315130e-02\n-1.10238303471198340e-01\n-2.19985530937590545e-01\n-8.34233001541278829e-02\n2.47772860185538485e-01\n1.65701143668206735e-01\n-4.24278012880483613e-01\n3.06332992134317472e-01\n-1.21360486265594494e-01\n2.99640848990915531e-02\n-4.75142721677540222e-03\n3.71362896101055037e-02\n6.43219404092949532e-02\n8.08540242581121116e-02\n8.53253105996190919e-02\n6.83603150308757235e-02\n1.89634632793902018e-02\n-6.35842276308632159e-02\n-1.49959507247531154e-01\n-1.68395722443553275e-01\n-4.29452364888722113e-02\n1.78417286237766315e-01\n2.15435007292515329e-01\n-1.42997640533805287e-01\n-2.91390537676749273e-01\n4.10471974143303775e-01\n-2.43328200326233396e-01\n8.50736188525397646e-02\n-1.91237995393348063e-02\n0.0\n5.48409161461312338e-03\n2.12397954924723707e-02\n4.92450726811088646e-02\n8.69114369126287034e-02\n1.22481172159332102e-01\n1.31340557035283217e-01\n8.16225257293253237e-02\n-3.85013053163518817e-02\n-1.72089166322800302e-01\n-1.75513694098229950e-01\n5.01412140345518231e-02\n2.70721115724049666e-01\n8.08763001757665514e-04\n-3.71529040857277393e-01\n3.69797481851287912e-01\n-1.86368588912950189e-01\n5.83253072290180752e-02\n3.40178468756307806e-02\n5.89206391526907111e-02\n7.43945102468368674e-02\n8.01128061617302906e-02\n6.90012552957102732e-02\n3.19126869471517555e-02\n-3.46668213503307579e-02\n-1.15052896913342015e-01\n-1.61836779888384186e-01\n-1.08026630457725217e-01\n6.40680522822292681e-02\n2.18249881773404375e-01\n1.02326817170125428e-01\n-2.40507463209703454e-01\n-1.46563700708749717e-01\n4.06013558623566695e-01\n-3.15826242766083065e-01\n1.38609543413955733e-01\n0.0\n4.65865385536051030e-03\n1.80428887975562328e-02\n4.19714906341643948e-02\n7.49295736024737369e-02\n1.08736954558723370e-01\n1.25378373300179535e-01\n9.90562572740574659e-02\n1.17402369461028604e-02\n-1.13927633036530751e-01\n-1.85980843976655347e-01\n-8.56612590359816517e-02\n1.58513671381932536e-01\n2.21227061464706248e-01\n-1.43281217194620031e-01\n-2.70157938630390171e-01\n4.05647034189952072e-01\n-2.60278127678070237e-01\n3.23069182031033575e-02\n5.59572237637468300e-02\n7.08981479613886439e-02\n7.75348150443078421e-02\n7.03060318047314808e-02\n4.14346057430626802e-02\n-1.37629501078059512e-02\n-8.71950041019804029e-02\n-1.47087711054231823e-01\n-1.39268082963799333e-01\n-2.33951625213075255e-02\n1.50537502456398298e-01\n2.00034813769854380e-01\n-2.62613965870860527e-02\n-2.75319468075516105e-01\n2.91994418595805045e-03\n3.70406370561131126e-01\n-3.90360904126161867e-01\n0.0\n4.25852169768549307e-03\n1.64931836145988490e-02\n3.84709926918558875e-02\n6.93228078004781700e-02\n1.02955044578591157e-01\n1.25270884381671499e-01\n1.14500762350298838e-01\n5.04377191397839125e-02\n-6.27929835075630438e-02\n-1.68726094560171541e-01\n-1.62532115098578400e-01\n1.71102522495363424e-02\n2.27712518327370439e-01\n1.40642597666205543e-01\n-2.47712462853473647e-01\n-1.84125535208905122e-01\n4.74825584793445665e-01\n3.38290629522420075e-02\n5.85936558057291584e-02\n7.44706878226608360e-02\n8.25613800292430700e-02\n7.81623133826988836e-02\n5.41615630566800732e-02\n4.98862390976463968e-03\n-6.60324158583947274e-02\n-1.37163472981015500e-01\n-1.64341311654565447e-01\n-9.86483915915150888e-02\n6.19789750555204688e-02\n2.11251897297509122e-01\n1.62037378807139365e-01\n-1.27910139941909723e-01\n-2.96813154362826070e-01\n8.09872061372120811e-02\n4.77845042739844073e-01\n0.0\n4.17890226242130514e-03\n1.61848188677862111e-02\n3.78543652351533699e-02\n6.88414361231712985e-02\n1.04545234309198362e-01\n1.33629535425829143e-01\n1.37274744042920283e-01\n9.41712366681136115e-02\n-4.39639236854121127e-03\n-1.30770157719331148e-01\n-2.06257444511149773e-01\n-1.34028327709017459e-01\n9.26641275679943310e-02\n2.77383534394831544e-01\n1.26250863215846693e-01\n-3.04597452875772390e-01\n-4.06418888935662082e-01\n3.73262401055887427e-02\n6.46509443183947985e-02\n8.24417426801556386e-02\n9.27081323676769986e-02\n9.16029732014229103e-02\n7.26877889840290142e-02\n2.97526090409193679e-02\n-3.79403701417137182e-02\n-1.18027798899329864e-01\n-1.78731111862988429e-01\n-1.73031683588891788e-01\n-6.52841989760783725e-02\n1.19070620394329488e-01\n2.56414827833961689e-01\n1.79240428956921577e-01\n-1.34756884553208389e-01\n-4.05311557335357453e-01\n-2.97436570454592764e-01\n0.0\n4.05235468434214392e-03\n1.56947022053827365e-02\n3.68158884225152014e-02\n6.76127606713811669e-02\n1.05093386444442910e-01\n1.41074730091542699e-01\n1.60845053186828846e-01\n1.44807460603129712e-01\n7.62163222294671844e-02\n-4.33977913990095804e-02\n-1.76083711031963380e-01\n-2.43534282740055286e-01\n-1.62580970931874152e-01\n7.33620530942944299e-02\n3.25687011164815576e-01\n3.79988147774739882e-01\n1.89047686326440700e-01\n4.20293567776259674e-02\n7.27969813482875344e-02\n9.31606690724403885e-02\n1.06349047689076812e-01\n1.09700083238993232e-01\n9.79375943321213333e-02\n6.49552560058246076e-02\n6.91203530381846645e-03\n-7.28316131607495559e-02\n-1.57978157244335254e-01\n-2.16392407233038125e-01\n-2.06408585877852463e-01\n-9.81679142649797831e-02\n9.35217819593191224e-02\n2.88175900662183404e-01\n3.69576475259823234e-01\n2.80154871943763539e-01\n1.04203665387296474e-01\n0.0\n3.77469401590580823e-03\n1.46193270606319904e-02\n3.44011219700300283e-02\n6.38356624684974505e-02\n1.01627328524412891e-01\n1.43163500299065383e-01\n1.79228429706281556e-01\n1.95682093655343975e-01\n1.75569589761259137e-01\n1.05136321630715845e-01\n-1.62066518686527286e-02\n-1.65593852290850968e-01\n-2.94769142733368406e-01\n-3.46964068936834069e-01\n-2.93487846461671253e-01\n-1.66988064090951516e-01\n-4.91938592282780973e-02\n4.97149355346475016e-02\n8.61087942410208862e-02\n1.10614831235796268e-01\n1.28272743303929238e-01\n1.38094842222223568e-01\n1.36687913530436050e-01\n1.19281346398576682e-01\n8.09912469249701172e-02\n1.88720524204025845e-02\n-6.52415897435827813e-02\n-1.61824198074474929e-01\n-2.52389775695580909e-01\n-3.12314808799817767e-01\n-3.19529550533561302e-01\n-2.67433165589849808e-01\n-1.74558351521187927e-01\n-7.98549314693714346e-02\n-1.93618518828249479e-02\n0.0\n3.20005016599178918e-03\n1.23937409999144797e-02\n2.92613660141229984e-02\n5.48901093096764020e-02\n8.95497316668522614e-02\n1.32241272382193853e-01\n1.80139234624896172e-01\n2.28133249997746312e-01\n2.68810762488097432e-01\n2.93320894157064194e-01\n2.93472454245975622e-01\n2.64958018221025771e-01\n2.10682926072381260e-01\n1.42134258011799908e-01\n7.65185019533614619e-02\n2.93135619980519554e-02\n6.01303224586266245e-03\n7.18815020393739484e-02\n1.24502413656561547e-01\n1.60578114430394658e-01\n1.89270623342051941e-01\n2.12555181997584108e-01\n2.30479361930558069e-01\n2.42137996812850420e-01\n2.46105019065561953e-01\n2.40840069140233121e-01\n2.25206863750758407e-01\n1.99102469151662381e-01\n1.64066944498318740e-01\n1.23605730140354100e-01\n8.28817925060057470e-02\n4.75493640033227832e-02\n2.19137325418306897e-02\n7.22368038430300057e-03\n1.27992152246078411e-03\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n4.09507954904213892e-02\n7.09288583997723099e-02\n8.86307272904738319e-02\n9.09639704529063564e-02\n6.52584869312597543e-02\n-1.45260345998187920e-03\n-1.03223850969600642e-01\n-1.86198844713527240e-01\n-1.44326934607336616e-01\n8.00351350589795507e-02\n2.75687717919790298e-01\n8.88656633111743234e-03\n-3.96916132761437279e-01\n3.68867993549618023e-01\n-1.68683485162124447e-01\n4.61917552580608723e-02\n-7.95115139101222265e-03\n8.47091515044506621e-04\n-5.12328186744221586e-05\n0.0\n6.61134636070666044e-03\n2.56056343510259084e-02\n5.91088434662579223e-02\n1.02723890587345767e-01\n1.38970988928990236e-01\n1.33391498550148341e-01\n4.78956046963824877e-02\n-1.10238279345102400e-01\n-2.19985482292798185e-01\n-8.34232811313837530e-02\n2.47772805614534297e-01\n1.65701105560714324e-01\n-4.24277917469331245e-01\n3.06332923486964837e-01\n-1.21360459106519436e-01\n2.99640781979130764e-02\n-4.75142615452689345e-03\n4.72770516492681593e-04\n3.71360079956776015e-02\n6.43214526387976826e-02\n8.08534109682291641e-02\n8.53246626547087550e-02\n6.83597937205695366e-02\n1.89633130332297721e-02\n-6.35837549903706112e-02\n-1.49958376065520094e-01\n-1.68394433539741484e-01\n-4.29448741329973502e-02\n1.78415955988762892e-01\n2.15433307728774615e-01\n-1.42996625046262260e-01\n-2.91388129199623813e-01\n4.10468682475755742e-01\n-2.43326264518732377e-01\n8.50729444071970375e-02\n-1.91236482007753929e-02\n2.81084242029596559e-03\n0.0\n5.48337236918122403e-03\n2.12370098668927879e-02\n4.92386112358821001e-02\n8.69000154092856025e-02\n1.22465011408076058e-01\n1.31323052332810220e-01\n8.16112550523219321e-02\n-3.84969725328466530e-02\n-1.72066742289315316e-01\n-1.75489243649982363e-01\n5.01367532617389006e-02\n2.70683835815330454e-01\n8.03804415049405845e-04\n-3.71471765167450951e-01\n3.69742564837183929e-01\n-1.86341267383669046e-01\n5.83168094239268908e-02\n-1.20315953181113038e-02\n3.39735351741142222e-02\n5.88438890342941959e-02\n7.42975281465438897e-02\n8.00080032883962733e-02\n6.89099102304428363e-02\n3.18677786594419032e-02\n-3.46270904966219512e-02\n-1.14908206312129030e-01\n-1.61624349606830198e-01\n-1.07870231467670288e-01\n6.40077086511573745e-02\n2.17961578707380282e-01\n1.02139476013386687e-01\n-2.40203178442036702e-01\n-1.46247080154544906e-01\n4.05335137678244584e-01\n-3.15321598762679733e-01\n1.38392090693180314e-01\n-3.92067985726896884e-02\n0.0\n4.62425232039701765e-03\n1.79096522255586532e-02\n4.16612042113528036e-02\n7.43734780778798621e-02\n1.07922115285046111e-01\n1.24417508370260374e-01\n9.82491150439724903e-02\n1.15392993761323157e-02\n-1.13172377787663203e-01\n-1.84519641945233043e-01\n-8.46994317701070393e-02\n1.57551181939699886e-01\n2.19037354765085734e-01\n-1.42760422819647431e-01\n-2.66529257423772425e-01\n4.01102291800773003e-01\n-2.57511106059764516e-01\n1.00175988364366766e-01\n3.14361185352450903e-02\n5.44489544958022056e-02\n6.89837397508910322e-02\n7.54247007852254653e-02\n6.83443489654929209e-02\n4.01620829658992581e-02\n-1.36617653130762032e-02\n-8.51610955810625653e-02\n-1.43234321237128759e-01\n-1.35025382298741892e-01\n-2.15745667335795130e-02\n1.47383057538655576e-01\n1.93324316235562788e-01\n-2.86504745178190294e-02\n-2.66434520341363668e-01\n9.56906561698763272e-03\n3.49513351813696083e-01\n-3.71529731008417963e-01\n2.03649952279694624e-01\n0.0\n4.01955391052363255e-03\n1.55676653546409256e-02\n3.63066874812193185e-02\n6.53891069142940456e-02\n9.69902093619080669e-02\n1.17677475530234055e-01\n1.06798872656262006e-01\n4.54539687880883558e-02\n-6.16211529888213705e-02\n-1.59631044149916024e-01\n-1.49131835823712866e-01\n2.36101592659384504e-02\n2.15153364810911768e-01\n1.17209210372320100e-01\n-2.39182672617654607e-01\n-1.33261855639022375e-01\n3.99919931629413694e-01\n-3.32282189872844469e-01\n3.06570679811755467e-02\n5.30995993544890743e-02\n6.74611207903885179e-02\n7.46614616348927340e-02\n7.03083079931911270e-02\n4.78328261752781481e-02\n2.24696642781937799e-03\n-6.28786974227983492e-02\n-1.26544020620394937e-01\n-1.47262266692316041e-01\n-8.10505910732842449e-02\n6.83017977261381748e-02\n1.94030178389811542e-01\n1.25624964520888449e-01\n-1.42699827439101756e-01\n-2.39362474148641396e-01\n1.42164398930499591e-01\n2.84512544046317983e-01\n-4.40166155315595498e-01\n0.0\n3.79245653062312360e-03\n1.46881209843189153e-02\n3.43325752546826471e-02\n6.23070912877604216e-02\n9.41505264817822790e-02\n1.19049307138631669e-01\n1.19352605757839583e-01\n7.58918184249457450e-02\n-1.68373710662541622e-02\n-1.28023064929671276e-01\n-1.80101614657553699e-01\n-8.96007978627355872e-02\n1.20933637685658235e-01\n2.34664132892676791e-01\n1.74373608775911029e-02\n-2.99972692148094244e-01\n-5.10585890967498943e-02\n4.81603728553955057e-01\n3.27143008975857782e-02\n5.66628312887146948e-02\n7.21799729023179931e-02\n8.08068604706852489e-02\n7.87976485361951279e-02\n6.01042316942958371e-02\n1.92471624972970663e-02\n-4.33258227255371026e-02\n-1.13718197999718315e-01\n-1.59310821934600083e-01\n-1.35925940244485538e-01\n-1.91664102909702115e-02\n1.44652885647377077e-01\n2.16939957262873184e-01\n6.35733351457161422e-02\n-2.20530293921387732e-01\n-2.38505249270102582e-01\n1.99551448630089001e-01\n4.44282722058959523e-01\n0.0\n3.73743233695049372e-03\n1.44750131985863281e-02\n3.39136117449086935e-02\n6.20314218927105962e-02\n9.55056308942146270e-02\n1.25696636396715078e-01\n1.37594338234458075e-01\n1.12438860289873641e-01\n3.73859897167176380e-02\n-7.70375184052448647e-02\n-1.80163529437680964e-01\n-1.88350601103810245e-01\n-4.41937564299379332e-02\n1.83001422444898476e-01\n2.64619102594514710e-01\n1.26244118068323183e-02\n-3.64845967305191254e-01\n-3.52530331344909131e-01\n3.60365922909571118e-02\n6.24172087795826364e-02\n7.97373607974751486e-02\n9.03571429712630575e-02\n9.12849379292280799e-02\n7.71384665365855843e-02\n4.22169500368891823e-02\n-1.57252675526638568e-02\n-8.97037396401582504e-02\n-1.57690742032450870e-01\n-1.82367036857128406e-01\n-1.25086729432506594e-01\n2.08984715724631689e-02\n1.91377861801590887e-01\n2.51151680795779153e-01\n8.76079504449936292e-02\n-2.27293647779614777e-01\n-4.03910768611995541e-01\n-2.43991266313763500e-01\n0.0\n3.61009536160416004e-03\n1.39818392137135532e-02\n3.28406149685708387e-02\n6.05725055608425586e-02\n9.50998549653563618e-02\n1.30300179713831316e-01\n1.54729546467280293e-01\n1.52186703432243997e-01\n1.06342540965392848e-01\n1.11587561452623704e-02\n-1.14596627157052239e-01\n-2.17750612637654078e-01\n-2.22989436409529590e-01\n-8.08759919849951492e-02\n1.64582237700154094e-01\n3.57650770846849042e-01\n3.41716149016202286e-01\n1.47994250439974939e-01\n4.04841087551484971e-02\n7.01205332630612105e-02\n8.98520027966209778e-02\n1.03128081951237113e-01\n1.07981587013147640e-01\n1.00092562687659162e-01\n7.41476211414240638e-02\n2.60525020210474988e-02\n-4.34556199612471314e-02\n-1.24244650185104888e-01\n-1.93364065239210764e-01\n-2.16881623273942503e-01\n-1.61813652164302352e-01\n-1.91245295836716157e-02\n1.72303955330921160e-01\n3.25016537916643422e-01\n3.49606224082161687e-01\n2.34302158536397243e-01\n7.83069025054091428e-02\n0.0\n3.35364478329771166e-03\n1.29886103948074188e-02\n3.05894598467247592e-02\n5.69184495159705192e-02\n9.11820289515951066e-02\n1.30025293554261318e-01\n1.66461119684207348e-01\n1.89353898844464297e-01\n1.84459324514507916e-01\n1.38163357922289093e-01\n4.44133476481793771e-02\n-8.67083169040364643e-02\n-2.23673339500588375e-01\n-3.19045071949566383e-01\n-3.30940949953096641e-01\n-2.53479365781752730e-01\n-1.31877312955044068e-01\n-3.56314494472542431e-02\n4.78137106462560024e-02\n8.28157761377123353e-02\n1.06463421146648307e-01\n1.23833342968527021e-01\n1.34388271939670095e-01\n1.35441866407602834e-01\n1.23025361958016360e-01\n9.28118206986794925e-02\n4.15941836989639352e-02\n-3.05939037331006483e-02\n-1.18083369330317212e-01\n-2.07927698285129414e-01\n-2.80676951455489487e-01\n-3.15218843670818649e-01\n-2.97783867921658507e-01\n-2.31735998594493176e-01\n-1.40973139033494510e-01\n-6.01004649176720279e-02\n-1.35579733808579971e-02\n0.0\n2.83690622312752095e-03\n1.09872905569250723e-02\n2.59495127254497464e-02\n4.87305690720515397e-02\n7.96928610140384269e-02\n1.18215102527935448e-01\n1.62253495129167952e-01\n2.07939519526926075e-01\n2.49443429922302146e-01\n2.79415579310566098e-01\n2.90304388921442724e-01\n2.76619644549386423e-01\n2.37675052587097257e-01\n1.79600324677747669e-01\n1.14918016730974168e-01\n5.85336352258931242e-02\n2.11549345787391020e-02\n4.08051653199263155e-03\n6.90460394563811586e-02\n1.19591248399857547e-01\n1.54265603811558766e-01\n1.81933022275066303e-01\n2.04605986377375926e-01\n2.22499272653306768e-01\n2.34952855542994221e-01\n2.40807082697188701e-01\n2.38718122972983338e-01\n2.27545403542667279e-01\n2.06833127712324011e-01\n1.77318949590327818e-01\n1.41305136023021166e-01\n1.02651272154436868e-01\n6.61659413139371738e-02\n3.63720213509099513e-02\n1.60073590780887842e-02\n5.02115004695320635e-03\n8.43419961827895090e-04\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n6.61134635589927938e-03\n2.56056343324069999e-02\n5.91088434232774629e-02\n1.02723890512651017e-01\n1.38970988827938735e-01\n1.33391498453153901e-01\n4.78956046615556311e-02\n-1.10238279264943617e-01\n-2.19985482132837723e-01\n-8.34232810707232764e-02\n2.47772805434368526e-01\n1.65701105440226260e-01\n-4.24277917160821361e-01\n3.06332923264217627e-01\n-1.21360459018273262e-01\n2.99640781761249669e-02\n-4.75142615107193664e-03\n4.72770516148910737e-04\n-2.69655523597814966e-05\n3.71360054687458127e-02\n6.43214482620234340e-02\n8.08534054661585455e-02\n8.53246568465523547e-02\n6.83597890618411058e-02\n1.89633117270390540e-02\n-6.35837506872225511e-02\n-1.49958365876298128e-01\n-1.68394422052014658e-01\n-4.29448711206503950e-02\n1.78415943904255886e-01\n2.15433292907720869e-01\n-1.42996615485302181e-01\n-2.91388108883609276e-01\n4.10468654105603070e-01\n-2.43326247738950757e-01\n8.50729385463677434e-02\n-1.91236468839779926e-02\n2.81084222680158926e-03\n-2.62346470385553857e-04\n0.0\n5.48335806558068913e-03\n2.12369544692861227e-02\n4.92384827719774057e-02\n8.68997885446642776e-02\n1.22464691181123200e-01\n1.31322707554214713e-01\n8.16110376775116275e-02\n-3.84968777841204618e-02\n-1.72066294559199751e-01\n-1.75488774488416238e-01\n5.01366391262672087e-02\n2.70683115446431533e-01\n8.03764524445842329e-04\n-3.71470729136920252e-01\n3.69741549942072978e-01\n-1.86340758673977064e-01\n5.83166506307927490e-02\n-1.20315626019127618e-02\n1.64793642180634725e-03\n3.39717821100734632e-02\n5.88408526383066843e-02\n7.42936929353900793e-02\n8.00038665591621401e-02\n6.89063274652654129e-02\n3.18660728187449352e-02\n-3.46254033846237139e-02\n-1.14902371492522609e-01\n-1.61615978216460121e-01\n-1.07864375516342176e-01\n6.40048270913611550e-02\n2.17950247336426012e-01\n1.02133217402767193e-01\n-2.40190910063332180e-01\n-1.46237297233430208e-01\n4.05311539200820914e-01\n-3.15303650105624833e-01\n1.38384284655054896e-01\n-3.92045973311981391e-02\n7.47406439523238056e-03\n0.0\n4.62160609753640376e-03\n1.78994034484891394e-02\n4.16373503831602640e-02\n7.43308127444043953e-02\n1.07859908096838236e-01\n1.24344988587787614e-01\n9.81900419893422527e-02\n1.15284172863124590e-02\n-1.13110767450746150e-01\n-1.84410604345367213e-01\n-8.46386202012945899e-02\n1.57468267914887244e-01\n2.18890930663001249e-01\n-1.42696707108217108e-01\n-2.66318537496278873e-01\n4.00816993789518961e-01\n-2.57333198496184912e-01\n1.00107691194398163e-01\n-2.59090724903621346e-02\n3.13126886416873820e-02\n5.42351676489874410e-02\n6.87126381900432237e-02\n7.51271015327464736e-02\n6.80712184399089038e-02\n3.99932289319240714e-02\n-1.36274018195470248e-02\n-8.48491128146700996e-02\n-1.42679179988442040e-01\n-1.34459224972335478e-01\n-2.14049444740012605e-02\n1.46864920037962504e-01\n1.92465892656553506e-01\n-2.87498113044804895e-02\n-2.65265329579525644e-01\n9.95904994535844884e-03\n3.47419552290394229e-01\n-3.69514989423564366e-01\n2.02584673222554801e-01\n-7.08057001119049984e-02\n0.0\n3.95610503274635046e-03\n1.53219289076739623e-02\n3.57328641699109634e-02\n6.43512193394448900e-02\n9.54346653368103315e-02\n1.15746245022895752e-01\n1.04946889452058087e-01\n4.44587716074825653e-02\n-6.09442746559024362e-02\n-1.57138378209070340e-01\n-1.46205106407843843e-01\n2.41645445254446943e-02\n2.11671265899932182e-01\n1.13400573380350742e-01\n-2.35691013290472623e-01\n-1.26698579939925116e-01\n3.88083834464821531e-01\n-3.23380916032544541e-01\n1.54978253630040863e-01\n2.93308734074307770e-02\n5.08025629720409849e-02\n6.45371134350769399e-02\n7.13979249633472923e-02\n6.71551114930365456e-02\n4.54982340150808656e-02\n1.66992980043322546e-03\n-6.07902702581663776e-02\n-1.21509697855959525e-01\n-1.40476213850271814e-01\n-7.57360796848513262e-02\n6.77986958746453899e-02\n1.85825175713219548e-01\n1.15541948489930602e-01\n-1.41173332824323622e-01\n-2.21806440862476362e-01\n1.45879247531334383e-01\n2.47023417768919284e-01\n-3.97353533534096748e-01\n2.73837658628469260e-01\n0.0\n3.52901117755675085e-03\n1.36678015192571202e-02\n3.19410072328316294e-02\n5.79262321687471007e-02\n8.73830164825595418e-02\n1.10086733399274203e-01\n1.09444524350073000e-01\n6.77042819758940789e-02\n-1.94476484779268315e-02\n-1.21539357333489723e-01\n-1.64723551307172922e-01\n-7.34575057129377013e-02\n1.21754934149568728e-01\n2.09726152871452909e-01\n-9.72552164018238713e-03\n-2.71349874845203176e-01\n1.35236214206033278e-02\n3.51621553751189087e-01\n-3.93793166481615498e-01\n2.94078486648232419e-02\n5.09358880287704222e-02\n6.48548923642413289e-02\n7.24633009090091124e-02\n7.02469499858576485e-02\n5.26148266361716951e-02\n1.46481424175273038e-02\n-4.27682547685834663e-02\n-1.05867410744298340e-01\n-1.43471935640474280e-01\n-1.15085262550862405e-01\n-2.44172030013265796e-03\n1.42570577344735716e-01\n1.85864476480696456e-01\n2.05925204864215450e-02\n-2.17721535007832118e-01\n-1.50814385830924991e-01\n2.43797893377776353e-01\n1.70449667241759750e-01\n-4.67290192193814569e-01\n0.0\n3.41018324578793797e-03\n1.32075829184522368e-02\n3.09246267838281692e-02\n5.64450749380943084e-02\n8.64715166799191332e-02\n1.12615551906601927e-01\n1.20556033534422083e-01\n9.30299765452049371e-02\n1.99259748563037735e-02\n-8.44240615135542910e-02\n-1.66858351079633149e-01\n-1.49013154627884697e-01\n5.23894895910824096e-03\n1.93887763116028344e-01\n1.86631356996179165e-01\n-1.04265972159322304e-01\n-2.96425380829508534e-01\n7.85886666962686137e-02\n4.66246483212461482e-01\n3.17024186472255401e-02\n5.49101998198136335e-02\n7.00767789215384351e-02\n7.90729522431928011e-02\n7.89133282961398397e-02\n6.44542055447291373e-02\n3.05330857865336383e-02\n-2.40812376403966334e-02\n-9.08191200891502598e-02\n-1.46016112478828314e-01\n-1.52720739696260072e-01\n-7.87736058088956692e-02\n6.61310673597382548e-02\n1.96273747687576550e-01\n1.75698736351415363e-01\n-4.58530156576896011e-02\n-2.69243883177023136e-01\n-1.46998211267456463e-01\n2.90620703488382315e-01\n3.99242533347035855e-01\n0.0\n3.35901063903036460e-03\n1.30093922646981348e-02\n3.05224468627840403e-02\n5.60891445334507424e-02\n8.73070556799186853e-02\n1.17547676086242503e-01\n1.34838138590223616e-01\n1.23113259740311592e-01\n6.83653578239632187e-02\n-2.88973300450619808e-02\n-1.38607858525927996e-01\n-1.97003368659691952e-01\n-1.34823018263392380e-01\n5.30268728731010316e-02\n2.39634161776246912e-01\n2.11801573177360258e-01\n-9.74171042080169691e-02\n-3.94428532210364224e-01\n-2.98487601499475674e-01\n3.48360963078755762e-02\n6.03378887426030755e-02\n7.71944868505371612e-02\n8.80181531074754747e-02\n9.04919634591603711e-02\n8.01109126277317063e-02\n5.17505018684090434e-02\n2.42116454773513758e-03\n-6.43649380359939405e-02\n-1.33628802778987227e-01\n-1.76781864423184304e-01\n-1.58287103583553745e-01\n-5.66134089934476059e-02\n1.03915657689216068e-01\n2.33488690415039973e-01\n2.10427369368839184e-01\n-1.15984475150167163e-02\n-2.95223308222736958e-01\n-3.83473777370759439e-01\n-1.96721331734197952e-01\n0.0\n3.23379945213864064e-03\n1.25244514231076243e-02\n2.94485332350193640e-02\n5.45051277634841375e-02\n8.62629275021657149e-02\n1.20107733188487775e-01\n1.47097547401579543e-01\n1.53960430413191851e-01\n1.25818218538694848e-01\n5.31535484804356792e-02\n-5.72177368027574212e-02\n-1.71786475037203734e-01\n-2.31228734613954323e-01\n-1.75249638244165090e-01\n7.87961954772568689e-03\n2.37940170073356189e-01\n3.66498956845456803e-01\n2.98460661939430494e-01\n1.14407071837070440e-01\n3.90624502907983215e-02\n6.76581485717963615e-02\n8.67880227574099189e-02\n1.00046750569201939e-01\n1.06007547444325056e-01\n1.01122890622150699e-01\n8.07994607333857723e-02\n4.10101707791996686e-02\n-1.90403446133639333e-02\n-9.33442521808620362e-02\n-1.65813445879100158e-01\n-2.09934899409644243e-01\n-1.94979312638972196e-01\n-1.01040616171451228e-01\n6.06367316587657010e-02\n2.35446840330613999e-01\n3.41147415097729001e-01\n3.19344704144734592e-01\n1.92192785801512112e-01\n5.83085202959151699e-02\n0.0\n2.99713248187664667e-03\n1.16078441886855559e-02\n2.73561866687677506e-02\n5.10150566938483568e-02\n8.21352732285362402e-02\n1.18265116897000117e-01\n1.54068501437432476e-01\n1.80756197231999871e-01\n1.86520518618981362e-01\n1.58831888507757535e-01\n8.91850474814925853e-02\n-2.02421932252880334e-02\n-1.50685485501907496e-01\n-2.66654307057526685e-01\n-3.26749513834583394e-01\n-3.05401503649595618e-01\n-2.14281633231272473e-01\n-1.02768753014179287e-01\n-2.56407158603216417e-02\n4.60731799031743675e-02\n7.98010884585593355e-02\n1.02649467071351932e-01\n1.19689732351821579e-01\n1.30727849900251075e-01\n1.33634694030624862e-01\n1.25102393547662949e-01\n1.01339736020551449e-01\n5.91533735208931433e-02\n-2.46355684735761419e-03\n-8.04125576076769044e-02\n-1.65855149038215632e-01\n-2.43967354902774797e-01\n-2.96397961598312443e-01\n-3.07116098625636769e-01\n-2.70405898540056255e-01\n-1.96942862894637943e-01\n-1.12261283420481098e-01\n-4.48211108815009251e-02\n-9.45307483129517387e-03\n0.0\n2.53042916814801185e-03\n9.80031002699473762e-03\n2.31524805242822457e-02\n4.35164968105800562e-02\n7.13052494190747066e-02\n1.06157990684816073e-01\n1.46593973328711574e-01\n1.89669191257555214e-01\n2.30792253372306966e-01\n2.63920844596718274e-01\n2.82375993867017283e-01\n2.80401093254540545e-01\n2.55284320100302387e-01\n2.09367321038902210e-01\n1.50785020265741782e-01\n9.17744610730347604e-02\n4.43627605947123776e-02\n1.51758147480278906e-02\n2.76237618780212843e-03\n6.64584052931337654e-02\n1.15109334557712079e-01\n1.48501190737995753e-01\n1.75215240548994344e-01\n1.97278835398974783e-01\n2.15032202717318571e-01\n2.28008507784710795e-01\n2.35268822703817521e-01\n2.35654600250723711e-01\n2.28082451661337365e-01\n2.11913765725987358e-01\n1.87368230707136818e-01\n1.55881212886982645e-01\n1.20240865873587635e-01\n8.43222917825594553e-02\n5.23203742196164182e-02\n2.76048383488123432e-02\n1.16248652697517434e-02\n3.47799767764919590e-03\n5.55343528420833158e-04\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n3.71360054613026486e-02\n6.43214482491314965e-02\n8.08534054499531057e-02\n8.53246568294507429e-02\n6.83597890481397602e-02\n1.89633117232382402e-02\n-6.35837506744784675e-02\n-1.49958365846241976e-01\n-1.68394422018263379e-01\n-4.29448711120429608e-02\n1.78415943868495991e-01\n2.15433292864541603e-01\n-1.42996615456641385e-01\n-2.91388108825206382e-01\n4.10468654023332880e-01\n-2.43326247690180908e-01\n8.50729385293165774e-02\n-1.91236468801450413e-02\n2.81084222623821265e-03\n-2.62346470332971732e-04\n1.41573265450527287e-05\n0.0\n5.48335795185743002e-03\n2.12369540288378372e-02\n4.92384817507350234e-02\n8.68997867419869785e-02\n1.22464688639544309e-01\n1.31322704825747122e-01\n8.16110359750574499e-02\n-3.84968769981727313e-02\n-1.72066290993040771e-01\n-1.75488770823795326e-01\n5.01366381230374802e-02\n2.70683109801159505e-01\n8.03764424712609697e-04\n-3.71470721285403427e-01\n3.69741542162956682e-01\n-1.86340754759585447e-01\n5.83166494066599747e-02\n-1.20315623494557204e-02\n1.64793638723524823e-03\n-1.44828248494368179e-04\n3.39717519152563791e-02\n5.88408003393493667e-02\n7.42936268918567289e-02\n8.00037953922571876e-02\n6.89062660309140290e-02\n3.18660440648528831e-02\n-3.46253733071537617e-02\n-1.14902270025800016e-01\n-1.61615834344313730e-01\n-1.07864277609981296e-01\n6.40047731454516794e-02\n2.17950052998598209e-01\n1.02133119714662601e-01\n-2.40190697358924177e-01\n-1.46237151778288388e-01\n4.05311160325690367e-01\n-3.15303358195684114e-01\n1.38384157032346411e-01\n-3.92045612461228710e-02\n7.47405752330387342e-03\n-9.58375551240054388e-04\n0.0\n4.62151595630338596e-03\n1.78990543329948584e-02\n4.16365380619811015e-02\n7.43293612791842417e-02\n1.07857797136321293e-01\n1.24342542049023383e-01\n9.81880810443514773e-02\n1.15281238415695982e-02\n-1.13108611290887492e-01\n-1.84406951076189929e-01\n-8.46367714754535788e-02\n1.57465308471042592e-01\n2.18886321657310728e-01\n-1.42694195883338398e-01\n-2.66312432963714651e-01\n4.00808299392099221e-01\n-2.57327698127340854e-01\n1.00105565618267361e-01\n-2.59085243155968599e-02\n4.59051575328258115e-03\n3.13048628469292795e-02\n5.42216129748568018e-02\n6.86954573397434848e-02\n7.51082786785971790e-02\n6.80540518528062743e-02\n3.99828747761686934e-02\n-1.36246146847853310e-02\n-8.48286219479212206e-02\n-1.42643741877088254e-01\n-1.34424447288225807e-01\n-2.13968726697520012e-02\n1.46830089857749313e-01\n1.92414519882726398e-01\n-2.87492588012713199e-02\n-2.65194804047386601e-01\n9.96943464375663058e-03\n3.47310504652740215e-01\n-3.69405407423012533e-01\n2.02525784232356010e-01\n-7.07853193928252578e-02\n1.68637289543786366e-02\n0.0\n3.94857260037030297e-03\n1.52927559225250961e-02\n3.56647847907340457e-02\n6.42283457978600480e-02\n9.52514607935574242e-02\n1.15521375634357645e-01\n1.04736972025156957e-01\n4.43573281254393548e-02\n-6.08458821886866813e-02\n-1.56840153553560652e-01\n-1.45891475544189297e-01\n2.41733952692948194e-02\n2.11259561371253846e-01\n1.13068212166155813e-01\n-2.35248073364995758e-01\n-1.26209925741860768e-01\n3.87031519310287786e-01\n-3.22556069847097449e-01\n1.54592951165385156e-01\n-4.90682940023881436e-02\n2.90540328574772286e-02\n5.03230610739261244e-02\n6.39273566191096293e-02\n7.07203599837776115e-02\n6.65091129312461032e-02\n4.50399677552948893e-02\n1.60220691079973523e-03\n-6.02843595542138094e-02\n-1.20408564104321603e-01\n-1.39101785698204833e-01\n-7.48230775509103607e-02\n6.74175401338636127e-02\n1.84072006390372411e-01\n1.13942134176256274e-01\n-1.40287347584137301e-01\n-2.18901134847287682e-01\n1.45352765392513184e-01\n2.42265732163778835e-01\n-3.91261652463812781e-01\n2.69910776628826010e-01\n-1.15040072219038808e-01\n0.0\n3.43080419901404740e-03\n1.32874475268798826e-02\n3.10509111682080348e-02\n5.63044969266943973e-02\n8.49092792565386695e-02\n1.06895394172273589e-01\n1.06101668877088010e-01\n6.52886810915354887e-02\n-1.95827485304895417e-02\n-1.18555758215739535e-01\n-1.59555169253655288e-01\n-6.96035784283685760e-02\n1.19855714407121408e-01\n2.02061926422212462e-01\n-1.37651564074642747e-02\n-2.61479440208699010e-01\n2.17403909649769335e-02\n3.27060816521754505e-01\n-3.70926333151470944e-01\n2.19080602376312522e-01\n2.76514212228384966e-02\n4.78936664594446088e-02\n6.09731121204942425e-02\n6.80866601162253421e-02\n6.58896201233681034e-02\n4.90832040470696798e-02\n1.30473431041528594e-02\n-4.12458493185054523e-02\n-1.00491271671571028e-01\n-1.34868511418039766e-01\n-1.06143621534523377e-01\n1.71312826904403831e-03\n1.37019686197178914e-01\n1.71523716677827065e-01\n9.68954776175967765e-03\n-2.07439549804083495e-01\n-1.24178974824466423e-01\n2.36687932093019304e-01\n1.14753074338294347e-01\n-3.85092135612286279e-01\n3.40856218298003000e-01\n0.0\n3.14643443637104480e-03\n1.21860881719985763e-02\n2.85255577454162981e-02\n5.20214976040237892e-02\n7.95323126230946392e-02\n1.03131546537081398e-01\n1.09382939117626560e-01\n8.23392828077726957e-02\n1.33438188951585553e-02\n-8.25499461147925634e-02\n-1.53852608668540364e-01\n-1.28221722635770530e-01\n2.04179841425961503e-02\n1.83992812159763569e-01\n1.48445196618609415e-01\n-1.26910865832800646e-01\n-2.39571759640622661e-01\n1.45149913782955386e-01\n2.66599940109819078e-01\n-4.37676287640231254e-01\n2.84229090582542171e-02\n4.92299225878059799e-02\n6.27962734183298149e-02\n7.07079680035939684e-02\n7.01322198942258973e-02\n5.62817001955884105e-02\n2.44841202401588943e-02\n-2.59809077267708077e-02\n-8.62719462199187936e-02\n-1.33243859533832470e-01\n-1.32212359460181006e-01\n-5.60551044878948301e-02\n7.83217853770896144e-02\n1.81531527983551211e-01\n1.30351443867176592e-01\n-8.72350134432212515e-02\n-2.37593625255373059e-01\n-3.38363971164070895e-02\n2.95272460152969207e-01\n4.43231149730096974e-02\n-4.71392010952323415e-01\n0.0\n3.08639071782377400e-03\n1.19535398500206311e-02\n2.80277080758733442e-02\n5.13978990346804013e-02\n7.96166397604637643e-02\n1.06124652756458188e-01\n1.19287772210208004e-01\n1.03988084538655379e-01\n4.83078441100544334e-02\n-4.36540880352378619e-02\n-1.37765414486728327e-01\n-1.70103063936718257e-01\n-8.33062346712156454e-02\n9.88877450129964780e-02\n2.21415930569610175e-01\n9.91808171306669678e-02\n-2.01067790004175712e-01\n-2.45609884600928585e-01\n1.91421447080693974e-01\n4.34335182117360941e-01\n3.07582821056898575e-02\n5.32749073605914628e-02\n6.80934496518677268e-02\n7.73312200180323178e-02\n7.86136764445919956e-02\n6.75640852089943039e-02\n3.94373366761441024e-02\n-7.93507259077303774e-03\n-6.95858541105213030e-02\n-1.28631661210462434e-01\n-1.55439244828996126e-01\n-1.17457148815868578e-01\n-4.43947155311087780e-03\n1.39186829696907294e-01\n2.07624351501295684e-01\n9.96310962792272686e-02\n-1.44174903172276436e-01\n-2.71503896435970116e-01\n-4.00860364590498106e-02\n3.51565130918886914e-01\n3.48937167675944959e-01\n0.0\n3.03240540640007869e-03\n1.17444556379368379e-02\n2.75863342422094093e-02\n5.08867725093671217e-02\n7.99131046618727497e-02\n1.09548609406875358e-01\n1.30223011537678457e-01\n1.28381503411195363e-01\n9.03620444425248942e-02\n1.11549793221950369e-02\n-9.33194088294435481e-02\n-1.78004469989740705e-01\n-1.79289286923379976e-01\n-5.75631711474681659e-02\n1.39991492863202643e-01\n2.57192870312794808e-01\n1.31936252267228438e-01\n-1.92480293816272241e-01\n-3.98695757943376028e-01\n-2.47736994109089531e-01\n3.37179514761691695e-02\n5.84012050838670360e-02\n7.48070867678905238e-02\n8.57274363621485791e-02\n8.93814748962041272e-02\n8.19913966959724821e-02\n5.90054987449821350e-02\n1.71379447122131622e-02\n-4.23188122781722048e-02\n-1.09401763027286228e-01\n-1.62694663704661457e-01\n-1.71907746939705397e-01\n-1.10506420666834804e-01\n2.09153209627554043e-02\n1.71320056423088951e-01\n2.42133630250716408e-01\n1.43860577842467724e-01\n-1.06262433120955985e-01\n-3.37818708256287348e-01\n-3.50812636169500147e-01\n-1.56306504446740324e-01\n0.0\n2.91132740713876065e-03\n1.12755225632056397e-02\n2.65348729506629938e-02\n4.92518811222198011e-02\n7.84568233541192428e-02\n1.10650918927806735e-01\n1.38811120470287125e-01\n1.52104946171956745e-01\n1.37444324085751107e-01\n8.41135102111164185e-02\n-8.17338604415883754e-03\n-1.20019705806070021e-01\n-2.08305666803981826e-01\n-2.16976340831305903e-01\n-1.08630263752765993e-01\n9.37103261966445722e-02\n2.90472563917131277e-01\n3.57256943403506833e-01\n2.54520724744468019e-01\n8.74852202988358335e-02\n3.77501527553079780e-02\n6.53851825656796698e-02\n8.39448216319953755e-02\n9.71141975719725381e-02\n1.03890501910622657e-01\n1.01352765675424464e-01\n8.55421255402136343e-02\n5.26590467174326560e-02\n1.04919228503244037e-03\n-6.60192535029708732e-02\n-1.37469690008385187e-01\n-1.93105869071011405e-01\n-2.06466555620369807e-01\n-1.54190103958773583e-01\n-3.13332145855721861e-02\n1.34090309857301276e-01\n2.80729827370028828e-01\n3.40056588381298708e-01\n2.83552772056556046e-01\n1.55075599235815653e-01\n4.30694197987669183e-02\n0.0\n2.69282874779490627e-03\n1.04292808943982438e-02\n2.45923422225775429e-02\n4.59439464001894643e-02\n7.42725280238729496e-02\n1.07782535913406793e-01\n1.42371497483919945e-01\n1.71076792159096436e-01\n1.84173141814497260e-01\n1.70557011466305058e-01\n1.20964969335294159e-01\n3.29613209351861669e-02\n-8.36922017590937817e-02\n-2.04429004450145946e-01\n-2.94177242453158960e-01\n-3.20873651363719481e-01\n-2.74287689094021792e-01\n-1.77867525154190437e-01\n-7.91621380216504383e-02\n-1.83453339112186892e-02\n4.44731034716176893e-02\n7.70296747831096668e-02\n9.91332536055084257e-02\n1.15821150219860655e-01\n1.27162912667761030e-01\n1.31472265478980110e-01\n1.25985747203254672e-01\n1.07401187511336094e-01\n7.26810434564080926e-02\n2.02499341750031377e-02\n-4.84866512217907164e-02\n-1.27668257698009269e-01\n-2.06276447429653287e-01\n-2.69182490416393694e-01\n-3.00733054373584940e-01\n-2.90651265923246971e-01\n-2.40179728335078474e-01\n-1.64581248897387983e-01\n-8.83038212857302773e-02\n-3.31577091774450106e-02\n-6.56577824362875907e-03\n0.0\n2.26958598438987318e-03\n8.79006872032774521e-03\n2.07705452334510446e-02\n3.90678682612849229e-02\n6.41185779057820565e-02\n9.57426983996211567e-02\n1.32869122489605779e-01\n1.73246852208278346e-01\n2.13250006496172900e-01\n2.47934482560342867e-01\n2.71529071954069112e-01\n2.78495209953469436e-01\n2.65114174413335124e-01\n2.31240920294141977e-01\n1.81485036993748766e-01\n1.24885413844431040e-01\n7.24906306550781449e-02\n3.33457840571533964e-02\n1.08285492756125309e-02\n1.86598254472809680e-03\n6.40861957356029105e-02\n1.11000547077868147e-01\n1.43213950473290108e-01\n1.69040611498407795e-01\n1.90507148177633090e-01\n2.08048160194155729e-01\n2.21349884530071400e-01\n2.29655715068818933e-01\n2.31974359297148464e-01\n2.27308426196695446e-01\n2.14940097099388633e-01\n1.94763250076741085e-01\n1.67602266714264453e-01\n1.35407660392670159e-01\n1.01189379426788462e-01\n6.85768629048025546e-02\n4.10142045770005223e-02\n2.08022444451908053e-02\n8.39772556071505596e-03\n2.40151888082386269e-03\n3.65403279809749628e-04\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n5.48335795155586656e-03\n2.12369540276698895e-02\n4.92384817480271061e-02\n8.68997867372078292e-02\n1.22464688632809238e-01\n1.31322704818524899e-01\n8.16110359705691790e-02\n-3.84968769960555568e-02\n-1.72066290983577813e-01\n-1.75488770814144129e-01\n5.01366381202801650e-02\n2.70683109786273024e-01\n8.03764424668405798e-04\n-3.71470721264973991e-01\n3.69741542142622392e-01\n-1.86340754749337451e-01\n5.83166494034527902e-02\n-1.20315623487940327e-02\n1.64793638714461825e-03\n-1.44828248486403196e-04\n7.41592932462512607e-06\n3.39717517021132648e-02\n5.88407999701746620e-02\n7.42936264257096773e-02\n8.00037948901887869e-02\n6.89062655982135425e-02\n3.18660438640695487e-02\n-3.46253730912906912e-02\n-1.14902269306195390e-01\n-1.61615833329871256e-01\n-1.07864276929204042e-01\n6.40047727496973751e-02\n2.17950051629927199e-01\n1.02133119060201200e-01\n-2.40190695853483877e-01\n-1.46237150830171803e-01\n4.05311157745881945e-01\n-3.15303356194368722e-01\n1.38384156154962329e-01\n-3.92045609976977641e-02\n7.47405747595815580e-03\n-9.58375545170103206e-04\n7.95788306797307467e-05\n0.0\n4.62151458644960520e-03\n1.78990490275739780e-02\n4.16365257192481616e-02\n7.43293392367818107e-02\n1.07857765121226717e-01\n1.24342505059903408e-01\n9.81880516543238990e-02\n1.15281199963691103e-02\n-1.13108578075339986e-01\n-1.84406896061113323e-01\n-8.46367451528990955e-02\n1.57465262485223856e-01\n2.18886254652998408e-01\n-1.42694155246734400e-01\n-2.66312348399257992e-01\n4.00808175157514934e-01\n-2.57327618869228281e-01\n1.00105534872732077e-01\n-2.59085163703131269e-02\n4.59051434673153277e-03\n-5.53303487994026371e-04\n3.13046340400007922e-02\n5.42212166696315404e-02\n6.86949551336876463e-02\n7.51077290524274493e-02\n6.80535522730584264e-02\n3.99825774769951778e-02\n-1.36245238259761585e-02\n-8.48280119917850101e-02\n-1.42642702326341353e-01\n-1.34423448116353594e-01\n-2.13966779201931676e-02\n1.46829042634604251e-01\n1.92413066843186653e-01\n-2.87491410197224691e-02\n-2.65192804231831114e-01\n9.96953748407835086e-03\n3.47307659315224559e-01\n-3.69402468701682252e-01\n2.02524189384269498e-01\n-7.07847647411923298e-02\n1.68635971807802702e-02\n-2.79083316657079833e-03\n0.0\n3.94816408854749886e-03\n1.52911737630386478e-02\n3.56610937502139097e-02\n6.42216910954168663e-02\n9.52415643715605470e-02\n1.15509298472178529e-01\n1.04725854024089932e-01\n4.43522711073695217e-02\n-6.08400751167841938e-02\n-1.56823943994521819e-01\n-1.45875390544740691e-01\n2.41724040880534445e-02\n2.11237411805820979e-01\n1.13053303585102127e-01\n-2.35223738712505293e-01\n-1.26190293666633618e-01\n3.86983043151356731e-01\n-3.22517045460806062e-01\n1.54574512880481546e-01\n-4.90624852253331578e-02\n1.08283437272036868e-02\n2.90272382567916543e-02\n5.02766514641701939e-02\n6.38683686824259716e-02\n7.06549500436898653e-02\n6.64471499546123168e-02\n4.49969462648440247e-02\n1.59805904332770317e-03\n-6.02322351594435229e-02\n-1.20299815975653451e-01\n-1.38970907638633540e-01\n-7.47438278904056647e-02\n6.73684645118538677e-02\n1.83901738310199375e-01\n1.13810771412178879e-01\n-1.40179318980373002e-01\n-2.18656926696603193e-01\n1.45256858447019188e-01\n2.41925495994628093e-01\n-3.90786639740366648e-01\n2.69596048955313028e-01\n-1.14908423858896214e-01\n3.34117610528059869e-02\n0.0\n3.41350819098763325e-03\n1.32204603758377098e-02\n3.08942580225518883e-02\n5.60197431996237796e-02\n8.44773333369223944e-02\n1.06344682569823698e-01\n1.05539362124840677e-01\n6.49107366856101209e-02\n-1.95454762724732029e-02\n-1.17992658876982778e-01\n-1.58694181568905329e-01\n-6.90867954102663828e-02\n1.19378547947287153e-01\n2.00864600376494090e-01\n-1.40692484168778737e-02\n-2.59914465986983090e-01\n2.23121271159527519e-02\n3.24178438877843700e-01\n-3.68047555293627093e-01\n2.17457701871262621e-01\n-8.35138412979259809e-02\n2.71354049648681386e-02\n4.69999000831083785e-02\n5.98339833163097773e-02\n6.68084859916661111e-02\n6.46348519939437260e-02\n4.81067522446718826e-02\n1.26913563980170455e-02\n-4.06349718482178351e-02\n-9.87586332828356700e-02\n-1.32337739146530298e-01\n-1.03832724169830304e-01\n2.29792200254956254e-03\n1.34883114657651876e-01\n1.67766453995907810e-01\n8.05005433010028484e-03\n-2.03794346833056694e-01\n-1.19182577450779176e-01\n2.32800450910134404e-01\n1.06695970258023326e-01\n-3.70541961439468714e-01\n3.29434885549012846e-01\n-1.70601031913522466e-01\n0.0\n3.01543185813999857e-03\n1.16787173681995003e-02\n2.73360932302668079e-02\n4.98413155881571174e-02\n7.61592561964895415e-02\n9.86479082539380575e-02\n1.04377215272130425e-01\n7.80636823744099706e-02\n1.15848731362039499e-02\n-8.01769159556592059e-02\n-1.47301076613459980e-01\n-1.20543256332816734e-01\n2.31751859570343034e-02\n1.77003927083055124e-01\n1.36269050378158174e-01\n-1.27571459050282110e-01\n-2.20209862398448197e-01\n1.50324524222891082e-01\n2.24637145228647445e-01\n-3.88833530141024841e-01\n2.86107782837355995e-01\n2.63420973336538494e-02\n4.56258509598131204e-02\n5.81884345786531365e-02\n6.54688671941615341e-02\n6.47890446634285799e-02\n5.16537255501779077e-02\n2.17217726308387288e-02\n-2.55352727519517347e-02\n-8.15175670945491176e-02\n-1.24120757046359359e-01\n-1.20730800221168708e-01\n-4.69552912744480785e-02\n7.85636923622311245e-02\n1.68954449949330399e-01\n1.10810484373581541e-01\n-9.43353819978198505e-02\n-2.14199845089296376e-01\n-1.76989824965727294e-03\n2.67688193205457337e-01\n-2.49921217571827704e-02\n-3.33727421378321787e-01\n3.96603875154439345e-01\n0.0\n2.84015210191790194e-03\n1.09998617914240232e-02\n2.57840618036429582e-02\n4.72374382288252917e-02\n7.30047455008635965e-02\n9.68507144320584212e-02\n1.07808437833353241e-01\n9.18488404309969197e-02\n3.84934015731831225e-02\n-4.68272201273127672e-02\n-1.29957591368755204e-01\n-1.50357790137883751e-01\n-5.92948452513420085e-02\n1.08212211024736771e-01\n1.96401634370099831e-01\n5.06824599499938744e-02\n-2.07738845636662534e-01\n-1.57070911264926144e-01\n2.41524560938726429e-01\n1.56767291295697497e-01\n-4.60358858075808453e-01\n2.75955335025004529e-02\n4.77968660882999163e-02\n6.10601482095848996e-02\n6.91930326007218210e-02\n6.99061191087500949e-02\n5.90843350334335285e-02\n3.23841696760376052e-02\n-1.18584662801453026e-02\n-6.81912320208832023e-02\n-1.19623752584577220e-01\n-1.37598056536362451e-01\n-9.30717569384747340e-02\n1.74945352681817497e-02\n1.42250553952398856e-01\n1.76610203928397658e-01\n4.32251935813629390e-02\n-1.72128999338899413e-01\n-2.02941614309365803e-01\n8.51599792301414305e-02\n2.94844346430314541e-01\n-7.84065292738586328e-02\n-4.55596024286507306e-01\n0.0\n2.80631216001336545e-03\n1.08688002599911290e-02\n2.55140630935214614e-02\n4.69699898634789378e-02\n7.34199858770379910e-02\n9.97040725909269510e-02\n1.16354822949592249e-01\n1.10346529733910209e-01\n6.94941397405423322e-02\n-8.20522404283461661e-03\n-1.02470570264130437e-01\n-1.65120559737679196e-01\n-1.37084448384137275e-01\n1.33940301487280814e-03\n1.70532041591691386e-01\n2.01057871087374052e-01\n-6.07218307130039017e-03\n-2.58700149364661680e-01\n-1.61941002953344598e-01\n2.79549708689502963e-01\n3.92012651462660178e-01\n2.98683155797166075e-02\n5.17334401205702329e-02\n6.62070150667903451e-02\n7.55894429187054379e-02\n7.80006361672704318e-02\n6.97128538604562670e-02\n4.64290720021685449e-02\n5.50387965706808022e-03\n-5.05154759498711442e-02\n-1.09783217244550937e-01\n-1.49144114474687561e-01\n-1.38992994874098663e-01\n-5.96946654332994042e-02\n7.22772616090753967e-02\n1.85919532900376161e-01\n1.78953245108544573e-01\n6.10765687155619217e-03\n-2.15367437583848159e-01\n-2.33151939422684473e-01\n6.68084835457235654e-02\n3.84143705482748621e-01\n2.98076275811140823e-01\n0.0\n2.74896562955254413e-03\n1.06466981025535902e-02\n2.50316518586688672e-02\n4.63194367328983725e-02\n7.32690927206488540e-02\n1.01909181906857632e-01\n1.24565012808830020e-01\n1.29888243868784004e-01\n1.05266434672797893e-01\n4.29285147529360755e-02\n-5.04885565585143081e-02\n-1.45044789273411967e-01\n-1.88867693236785317e-01\n-1.31591629842955138e-01\n2.87610716047524730e-02\n2.03667421084829936e-01\n2.37617859660929631e-01\n3.88278030103852423e-02\n-2.66272600558971062e-01\n-3.83934783436198079e-01\n-2.02195378753061455e-01\n3.26754477456271120e-02\n5.65955356554880898e-02\n7.25668512424264139e-02\n8.35068467080543192e-02\n8.80638605738052749e-02\n8.30633040709364279e-02\n6.44896092167284718e-02\n2.90189760583908218e-02\n-2.34541090639544710e-02\n-8.65033508202481261e-02\n-1.44344994258357645e-01\n-1.72221036502453267e-01\n-1.43642630892848150e-01\n-4.65732827080588482e-02\n9.57745903523757186e-02\n2.14767351735053708e-01\n2.19467701041460489e-01\n6.25025352465968242e-02\n-1.87914509771367949e-01\n-3.57349892151630322e-01\n-3.11578742990554214e-01\n-1.22641106097095123e-01\n0.0\n2.63312857340202615e-03\n1.01980631132089408e-02\n2.40164433078837308e-02\n4.46818100030281079e-02\n7.15568244796210423e-02\n1.01975673244816725e-01\n1.30393167358524159e-01\n1.47972662638379326e-01\n1.43422399401487433e-01\n1.06049911881276271e-01\n3.15853873150397577e-02\n-7.01951353003815171e-02\n-1.69798780574900915e-01\n-2.20985353205471691e-01\n-1.78909026845604335e-01\n-3.21426517929829930e-02\n1.69280937992732528e-01\n3.22226924268245618e-01\n3.35129416719156414e-01\n2.12743763544830683e-01\n6.62641871234394275e-02\n3.65349406720137243e-02\n6.32803734954423963e-02\n8.13006419159128246e-02\n9.43316152611636677e-02\n1.01705729990012012e-01\n1.01012759804954999e-01\n8.88439689485785861e-02\n6.16985793980185313e-02\n1.74786355930190464e-02\n-4.23531627756969301e-02\n-1.10333129987213299e-01\n-1.71346629089678820e-01\n-2.03581794927319953e-01\n-1.84088357931834923e-01\n-9.95997770737380855e-02\n4.03758105982090706e-02\n1.96337056195062726e-01\n3.08221555071639786e-01\n3.25807497409733970e-01\n2.45912317565085220e-01\n1.23362379754393042e-01\n3.15872865218176507e-02\n0.0\n2.43118181210156842e-03\n9.41592666987174469e-03\n2.22130599610185497e-02\n4.15609240719503406e-02\n6.74123000970971303e-02\n9.84533043029970772e-02\n1.31511166865039719e-01\n1.61046383377161706e-01\n1.79068126986806936e-01\n1.75942528934664472e-01\n1.42557894193246798e-01\n7.39850606601975408e-02\n-2.60392721717707179e-02\n-1.41713376646468908e-01\n-2.45845007100034180e-01\n-3.07284334883514254e-01\n-3.04731058105128627e-01\n-2.40786576783764222e-01\n-1.45330968914073183e-01\n-6.03608511744785289e-02\n-1.30584186581242552e-02\n4.29965389421562150e-02\n7.44721899974283563e-02\n9.58808590286965440e-02\n1.12206214576097793e-01\n1.23721468039061741e-01\n1.29095030454880300e-01\n1.26012675142677721e-01\n1.11606525761732162e-01\n8.30614675947096148e-02\n3.85249645576527730e-02\n-2.16967182108219504e-02\n-9.38711328494090252e-02\n-1.69976311998830870e-01\n-2.37947681585164827e-01\n-2.83742179878587741e-01\n-2.95431667111388907e-01\n-2.68404624517142865e-01\n-2.09296832369430169e-01\n-1.35524365097511618e-01\n-6.87079349621063651e-02\n-2.43541534375312195e-02\n-4.54471232105063769e-03\n0.0\n2.04588071400237060e-03\n7.92366193365811981e-03\n1.87267669740585688e-02\n3.52448858487728819e-02\n5.79211286332387970e-02\n8.67012619401700962e-02\n1.20814874735011402e-01\n1.58534206839539032e-01\n1.96986402740416067e-01\n2.32132567953002300e-01\n2.59052568446109355e-01\n2.72657058321323975e-01\n2.68850116492497015e-01\n2.45963735428445213e-01\n2.06009226235001341e-01\n1.55066444587060259e-01\n1.02183114705075656e-01\n5.66968202904644669e-02\n2.48794311237145564e-02\n7.68960456104154748e-03\n1.25800882923982494e-03\n6.19025193580484412e-02\n1.07218308644655869e-01\n1.38344848770376588e-01\n1.63344475907367198e-01\n1.84232194044718439e-01\n2.01513609412918876e-01\n2.14996871328352018e-01\n2.24075938368892252e-01\n2.27906965509710679e-01\n2.25589110267123971e-01\n2.16387359590411665e-01\n1.99998113073112160e-01\n1.76822791334976248e-01\n1.48176791512110245e-01\n1.16331824873297546e-01\n8.42917721477684789e-02\n5.52617313007383384e-02\n3.18965817979033409e-02\n1.55744726010622527e-02\n6.03738311454656094e-03\n1.65348996644014250e-03\n2.40273767297542555e-04\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n3.39717517016027357e-02\n5.88407999692904041e-02\n7.42936264245931954e-02\n8.00037948889864847e-02\n6.89062655971780236e-02\n3.18660438635906679e-02\n-3.46253730907703436e-02\n-1.14902269304468646e-01\n-1.61615833327442504e-01\n-1.07864276927583061e-01\n6.40047727487355056e-02\n2.17950051626651875e-01\n1.02133119058666344e-01\n-2.40190695849874292e-01\n-1.46237150827974144e-01\n4.05311157739790928e-01\n-3.15303356189630346e-01\n1.38384156152882687e-01\n-3.92045609971085965e-02\n7.47405747584583592e-03\n-9.58375545155700772e-04\n7.95788306785348310e-05\n-3.87659371888857287e-06\n0.0\n4.62151457776880607e-03\n1.78990489939533856e-02\n4.16365256410380080e-02\n7.43293390971467016e-02\n1.07857764918551771e-01\n1.24342504826107342e-01\n9.81880514693806855e-02\n1.15281199739493585e-02\n-1.13108577863438919e-01\n-1.84406895714097741e-01\n-8.46367449917117959e-02\n1.57465262190680771e-01\n2.18886254238053607e-01\n-1.42694154981673454e-01\n-2.66312347888964684e-01\n4.00808174394941763e-01\n-2.57327618380539858e-01\n1.00105534682779010e-01\n-2.59085163211725152e-02\n4.59051433802687685e-03\n-5.53303486944984875e-04\n4.35403668583563152e-05\n3.13046309711751056e-02\n5.42212113542695287e-02\n6.86949483988250065e-02\n7.51077216858410390e-02\n6.80535455895308755e-02\n3.99825735291110748e-02\n-1.36245225391634951e-02\n-8.48280037322188402e-02\n-1.42642688359709502e-01\n-1.34423434845161172e-01\n-2.13966756080519287e-02\n1.46829028385005722e-01\n1.92413047718280605e-01\n-2.87491387156086110e-02\n-2.65192777886443687e-01\n9.96953747734385595e-03\n3.47307623565236756e-01\n-3.69402431162008327e-01\n2.02524168893422868e-01\n-7.07847575947064961e-02\n1.68635954802411267e-02\n-2.79083288533529903e-03\n3.17334210234233134e-04\n0.0\n3.94815360383361791e-03\n1.52911331559163963e-02\n3.56609990334651877e-02\n6.42215204263591882e-02\n9.52413109233903044e-02\n1.15508990152276697e-01\n1.04725572379329487e-01\n4.43521474699878349e-02\n-6.08399196334685477e-02\n-1.56823527680587743e-01\n-1.45874990695458256e-01\n2.41723586712416505e-02\n2.11236846857000504e-01\n1.13052963398928091e-01\n-2.35223113127253580e-01\n-1.26189878250866860e-01\n3.86981911769356035e-01\n-3.22516119312817262e-01\n1.54574072233629373e-01\n-4.90623458945490323e-02\n1.08283130435127602e-02\n-1.68111899529490910e-03\n2.90260034495900127e-02\n5.02745127153594040e-02\n6.38656509679206563e-02\n7.06519397989393838e-02\n6.64443080677416670e-02\n4.49949959713399628e-02\n1.59792610007853742e-03\n-6.02297571583775004e-02\n-1.20294753614493669e-01\n-1.38964931434563149e-01\n-7.47403982660197475e-02\n6.73659146255219388e-02\n1.83893895431666926e-01\n1.13805289448452376e-01\n-1.40173853781127844e-01\n-2.18646588899975042e-01\n1.45251536236475964e-01\n2.41912464599999794e-01\n-3.90767318039771938e-01\n2.69583020831342002e-01\n-1.14902929079825467e-01\n3.34101725634900967e-02\n-6.86858402616148146e-03\n0.0\n3.41208398194494441e-03\n1.32149444379338586e-02\n3.08813630316932541e-02\n5.59963300602337524e-02\n8.44419138927609003e-02\n1.06299786503036023e-01\n1.05494108723778651e-01\n6.48814883673849152e-02\n-1.95400323939715903e-02\n-1.17944913275780647e-01\n-1.58625384751436838e-01\n-6.90506199313751651e-02\n1.19334135808702835e-01\n2.00772616388427166e-01\n-1.40793800780276285e-02\n-2.59794353904855002e-01\n2.23305752553413055e-02\n3.23991320118172443e-01\n-3.67851218503087718e-01\n2.17344901545400621e-01\n-8.34711265473853520e-02\n2.23956292987397936e-02\n2.70619170841706405e-02\n4.68726153399997569e-02\n5.96718416982707431e-02\n6.66269658699973205e-02\n6.44578490520058556e-02\n4.79717647811049308e-02\n1.26482491075939826e-02\n-4.05372098337362929e-02\n-9.85020763679562844e-02\n-1.31977887589303788e-01\n-1.03525487018552978e-01\n2.33935575484836610e-03\n1.34548749839094539e-01\n1.67266685736119969e-01\n7.91705405617798910e-03\n-2.03251906615983302e-01\n-1.18655485032839833e-01\n2.32188174504104228e-01\n1.05991697847448482e-01\n-3.69007966374286178e-01\n3.28174684796752991e-01\n-1.69969954147838914e-01\n5.94309005051338324e-02\n0.0\n2.98243369266948215e-03\n1.15509160228767938e-02\n2.70367120006931756e-02\n4.92939947190473918e-02\n7.53176044018885049e-02\n9.75431028523044280e-02\n1.03174935035769258e-01\n7.70971494990361494e-02\n1.13000245734691720e-02\n-7.94358261516174141e-02\n-1.45661267219753615e-01\n-1.18908245526357981e-01\n2.33859185983557212e-02\n1.75116919460842069e-01\n1.33974878549427689e-01\n-1.26857505103517954e-01\n-2.16515740716696076e-01\n1.49799117910100199e-01\n2.18620136024562706e-01\n-3.80951837822580686e-01\n2.80763784492841006e-01\n-1.29634503813219171e-01\n2.55216905594211167e-02\n4.42048647439683348e-02\n5.63739605970956514e-02\n6.34166635490391456e-02\n6.27271723948766569e-02\n4.99380464521096690e-02\n2.08414958264744841e-02\n-2.50440409431553247e-02\n-7.92994396347145580e-02\n-1.20370926121561098e-01\n-1.16568190974046554e-01\n-4.44344973596505904e-02\n7.73217824762000711e-02\n1.63716591157337998e-01\n1.05187859484289839e-01\n-9.39811921805595446e-02\n-2.05836777093810930e-01\n3.98161750204866459e-03\n2.56826455243301444e-01\n-3.47735312090644774e-02\n-3.05338458887712438e-01\n3.69350519619053186e-01\n-2.33411437844590869e-01\n0.0\n2.68581350212819016e-03\n1.04021109647614990e-02\n2.43805838064100958e-02\n4.46519904600920503e-02\n6.89572825014917179e-02\n9.13388553962736910e-02\n1.01347064993388636e-01\n8.56849541444947849e-02\n3.46069615591212965e-02\n-4.62248277847074757e-02\n-1.23677008560240331e-01\n-1.40073100121303945e-01\n-5.07927644892819871e-02\n1.06905103571009741e-01\n1.82410631002470680e-01\n3.60143157996740612e-02\n-1.99875046942233126e-01\n-1.27511982568985077e-01\n2.35554047893048790e-01\n9.64174200123429082e-02\n-3.70666422044367005e-01\n3.48382325289261108e-01\n2.53305758808503242e-02\n4.38738444106115330e-02\n5.60360142687324342e-02\n6.34399137536062058e-02\n6.39211726115268830e-02\n5.36290169604622807e-02\n2.85468300548956527e-02\n-1.27298163464908565e-02\n-6.47825550115645188e-02\n-1.11274070376900444e-01\n-1.25253759653547514e-01\n-8.02998942969501417e-02\n2.43068478733526536e-02\n1.36156236410413356e-01\n1.56361592894117607e-01\n2.14918405690898776e-02\n-1.69618762829979924e-01\n-1.64341803455417962e-01\n1.14497576695643768e-01\n2.38346309794226136e-01\n-1.49437173623671760e-01\n-2.49364291238797664e-01\n4.35158518821773421e-01\n0.0\n2.58677060121635530e-03\n1.00185194589698899e-02\n2.35106557166035457e-02\n4.32366650759451535e-02\n6.74202079860697356e-02\n9.11037527089615662e-02\n1.05278792392789020e-01\n9.77428810307563872e-02\n5.75639074613643331e-02\n-1.57241018549903327e-02\n-1.00734120527409002e-01\n-1.50337101206697410e-01\n-1.11221138724751700e-01\n2.49511233763492213e-02\n1.68228531018998650e-01\n1.58542746010714636e-01\n-5.72401277143087042e-02\n-2.37148516257792957e-01\n-4.57676643454246260e-02\n2.91257701198554209e-01\n3.66947544745406806e-02\n-4.62018638097721868e-01\n2.68571669899428170e-02\n4.65179777739426481e-02\n5.95015484812001713e-02\n6.77863689322626140e-02\n6.95249156786556105e-02\n6.11717171945080421e-02\n3.87442188023426198e-02\n5.18915270971932800e-05\n-5.17935145223517440e-02\n-1.04474271623551399e-01\n-1.35056317149748223e-01\n-1.16019603101349469e-01\n-3.30109170721251052e-02\n8.93781097875766678e-02\n1.74706697306860170e-01\n1.30395395395521085e-01\n-5.34436223201047444e-02\n-2.16649376782089620e-01\n-1.26293526601918366e-01\n1.83774138351743166e-01\n2.49754831380480019e-01\n-1.85835819263128921e-01\n-4.24937865546294313e-01\n0.0\n2.56110284035795856e-03\n9.91910864863088625e-03\n2.33074923050541893e-02\n4.30467571980886199e-02\n6.77936377274388074e-02\n9.34690504744307010e-02\n1.12351605992408496e-01\n1.13325069807829068e-01\n8.47458001348089102e-02\n2.11822645745976465e-02\n-6.67273440144551394e-02\n-1.44684855317087135e-01\n-1.60586679363842716e-01\n-7.53588088686517610e-02\n8.61254035479706859e-02\n2.06452110989289450e-01\n1.40907367514533644e-01\n-1.07591382597994653e-01\n-2.72710209344251331e-01\n-6.13696647348518365e-02\n3.40259712448485074e-01\n3.44720844347002287e-01\n2.90274444257063065e-02\n5.02770085592053120e-02\n6.44114458589876149e-02\n7.38656560619040670e-02\n7.71622050662393449e-02\n7.11219440145972048e-02\n5.18888271146119295e-02\n1.66243798703915556e-02\n-3.37346200753067885e-02\n-9.10405236546536767e-02\n-1.37518164984649721e-01\n-1.47710193509878046e-01\n-9.87642121325688072e-02\n1.00330420894497122e-02\n1.36966839047802907e-01\n1.98790766615154268e-01\n1.18271167791539955e-01\n-8.69459556585869403e-02\n-2.51073524360978961e-01\n-1.64946801733915738e-01\n1.62376646829999471e-01\n3.92669188558987581e-01\n2.49813013671691619e-01\n0.0\n2.50174404499391070e-03\n9.68921302273499478e-03\n2.27986299297911338e-02\n4.22977856908692690e-02\n6.73094604407304536e-02\n9.47365146644201239e-02\n1.18400724348982647e-01\n1.28835075324336523e-01\n1.14745493546848723e-01\n6.72408955603446823e-02\n-1.28989308796659957e-02\n-1.07065976352817949e-01\n-1.75835690365908154e-01\n-1.70262917503264222e-01\n-6.31766232098568969e-02\n1.09943516126159171e-01\n2.36891118747066060e-01\n1.87883451938086948e-01\n-5.53167052438363685e-02\n-3.16737545203193305e-01\n-3.56231482387660670e-01\n-1.62675267622909958e-01\n3.17020307884054581e-02\n5.49095280286310897e-02\n7.04640732859620200e-02\n8.13683213145945661e-02\n8.66163749425191559e-02\n8.35351672003268875e-02\n6.85951618105900135e-02\n3.85791819448457057e-02\n-7.47728705535095906e-03\n-6.56256161653799713e-02\n-1.24397443792951895e-01\n-1.64072142149996769e-01\n-1.60542292389620617e-01\n-9.60769858994164616e-02\n2.41401562214764789e-02\n1.57950192749875512e-01\n2.30516679051831985e-01\n1.71439140127002815e-01\n-2.31730457863305421e-02\n-2.51740260278744188e-01\n-3.57745007831903994e-01\n-2.70088490969375983e-01\n-9.51754518330246574e-02\n0.0\n2.39163031747944383e-03\n9.26274438988264337e-03\n2.18267984135899241e-02\n4.06872344278068065e-02\n6.54476102863204012e-02\n9.40698396363644079e-02\n1.22152956294595355e-01\n1.42479217735925395e-01\n1.45412408577379554e-01\n1.20896605682110622e-01\n6.26252568341059412e-02\n-2.59345105624668552e-02\n-1.25794978581951433e-01\n-2.01425325429203078e-01\n-2.09978319988906731e-01\n-1.23118272962449773e-01\n4.58824000157680711e-02\n2.30072526221021034e-01\n3.35278814175328621e-01\n3.04852624444434561e-01\n1.74811398504645416e-01\n4.97695706493358203e-02\n3.54062352178420789e-02\n6.13253983020369958e-02\n7.88359858284245207e-02\n9.16956089504023381e-02\n9.95036238537800044e-02\n1.00268346233545413e-01\n9.10540353641963174e-02\n6.86806982485718143e-02\n3.08613986664450224e-02\n-2.21174395389338342e-02\n-8.53758608548883524e-02\n-1.47763430717810812e-01\n-1.91780352173573337e-01\n-1.96677126529909152e-01\n-1.45771263633484804e-01\n-3.69514172173006777e-02\n1.08217788039636692e-01\n2.44608126215465571e-01\n3.19584641466451103e-01\n3.02410823109092397e-01\n2.09053344548160547e-01\n9.69267608024939192e-02\n2.30194798988370489e-02\n0.0\n2.20470526511123803e-03\n8.53878677507163321e-03\n2.01515386450579446e-02\n3.77507102539996406e-02\n6.14025446155277085e-02\n9.01499675090595004e-02\n1.21526781578210605e-01\n1.51105598784214729e-01\n1.72320994903869401e-01\n1.76914845386439534e-01\n1.56380685046752677e-01\n1.04616748239766050e-01\n2.15053431461594106e-02\n-8.37030195320807302e-02\n-1.91243620843068396e-01\n-2.74274042605144264e-01\n-3.07924299101682730e-01\n-2.81532343187649858e-01\n-2.07289261991827761e-01\n-1.17120871959358344e-01\n-4.56122990603727713e-02\n-9.25237624279761327e-03\n4.16291965020900712e-02\n7.21038834198885897e-02\n9.28632094041762640e-02\n1.08824150853912255e-01\n1.20418010936839362e-01\n1.26599330202788768e-01\n1.25425705616724253e-01\n1.14409111224535398e-01\n9.09810808934998771e-02\n5.31899670966011762e-02\n6.42703377144757918e-04\n-6.44327973386674413e-02\n-1.36314400997979729e-01\n-2.05601850136131303e-01\n-2.60298449796813713e-01\n-2.88517410689149323e-01\n-2.82511391450768090e-01\n-2.42687653726192942e-01\n-1.79361351550131498e-01\n-1.10151431295043678e-01\n-5.29455624792010068e-02\n-1.77736110467187312e-02\n-3.13603065909748638e-03\n0.0\n1.85268918054703698e-03\n7.17543434195734055e-03\n1.69610621725910897e-02\n3.19378001176429741e-02\n5.25445479690374515e-02\n7.88144215968881595e-02\n1.10199457569754022e-01\n1.45369799959396667e-01\n1.82041351812567032e-01\n2.16913994140170957e-01\n2.45825410906204189e-01\n2.64223328384918021e-01\n2.68005483047354665e-01\n2.54650442930867194e-01\n2.24369377000182141e-01\n1.80811360445574498e-01\n1.30786220840072187e-01\n8.26949351109796810e-02\n4.39511048106903598e-02\n1.84387225718671069e-02\n5.43695848582089261e-03\n8.46626639218010400e-04\n5.98848615020996580e-02\n1.03723622725862080e-01\n1.33844338992486711e-01\n1.58071984667375792e-01\n1.78402399777739418e-01\n1.95394471124694075e-01\n2.08953907165694119e-01\n2.18599173644915962e-01\n2.23614681704122603e-01\n2.23196715309448984e-01\n2.16629121623010790e-01\n2.03495737707547586e-01\n1.83910376814417881e-01\n1.58716788894623262e-01\n1.29585515953439506e-01\n9.89257308542844521e-02\n6.95565044670531929e-02\n4.41565855825184275e-02\n2.46252486463892223e-02\n1.15912799921790346e-02\n4.32145333548556755e-03\n1.13549948407030629e-03\n1.57902675727756810e-04\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n4.62151457774989931e-03\n1.78990489938801629e-02\n4.16365256408676790e-02\n7.43293390968426254e-02\n1.07857764918110527e-01\n1.24342504825598651e-01\n9.81880514689789929e-02\n1.15281199739021983e-02\n-1.13108577862976206e-01\n-1.84406895713343344e-01\n-8.46367449913655590e-02\n1.57465262190036592e-01\n2.18886254237158157e-01\n-1.42694154981089699e-01\n-2.66312347887875167e-01\n4.00808174393302075e-01\n-2.57327618379487144e-01\n1.00105534682369490e-01\n-2.59085163210665236e-02\n4.59051433800809761e-03\n-5.53303486942721386e-04\n4.35403668581781943e-05\n-2.02260965120281937e-06\n3.13046309536830353e-02\n5.42212113239723681e-02\n6.86949483604393507e-02\n7.51077216438671286e-02\n6.80535455514848509e-02\n3.99825735067239341e-02\n-1.36245225316298981e-02\n-8.48280036849109464e-02\n-1.42642688280032404e-01\n-1.34423434769897376e-01\n-2.13966755957471742e-02\n1.46829028303196607e-01\n1.92413047610339338e-01\n-2.87491387003805596e-02\n-2.65192777737695784e-01\n9.96953747335137773e-03\n3.47307623368402651e-01\n-3.69402430953440164e-01\n2.02524168779222469e-01\n-7.07847575548169183e-02\n1.68635954707412189e-02\n-2.79083288376343226e-03\n3.17334210055523276e-04\n-2.37299576748644414e-05\n0.0\n3.94815347800601003e-03\n1.52911326685881699e-02\n3.56609978968716601e-02\n6.42215183790015853e-02\n9.52413078853966283e-02\n1.15508986463054381e-01\n1.04725569023871895e-01\n4.43521460269292594e-02\n-6.08399177251578854e-02\n-1.56823522683236349e-01\n-1.45874985983403399e-01\n2.41723579953957088e-02\n2.11236840104118306e-01\n1.13052959594665714e-01\n-2.35223105624088935e-01\n-1.26189873827790067e-01\n3.86981898916442524e-01\n-3.22516108684704927e-01\n1.54574067155986122e-01\n-4.90623442855460667e-02\n1.08283126887340157e-02\n-1.68111894024574227e-03\n1.80904937894860640e-04\n2.90259756653636278e-02\n5.02744645916676502e-02\n6.38655898258315285e-02\n7.06518721180755260e-02\n6.64442442956237195e-02\n4.49949524975869278e-02\n1.59792384522276180e-03\n-6.02297004448156606e-02\n-1.20294639077625928e-01\n-1.38964797687671310e-01\n-7.47403239268167596e-02\n6.73658536531896446e-02\n1.83893719142178280e-01\n1.13805173355303810e-01\n-1.40173725041014274e-01\n-2.18646368005632086e-01\n1.45251406367594732e-01\n2.41912203021487582e-01\n-3.90766914322988990e-01\n2.69582745603335228e-01\n-1.14902812405425353e-01\n3.34101387389467014e-02\n-6.86857708461229358e-03\n1.00420143575108856e-03\n0.0\n3.41202670309500656e-03\n1.32147225979019588e-02\n3.08808445153847151e-02\n5.59953891807296877e-02\n8.44404926286236035e-02\n1.06297990705265591e-01\n1.05492311529594929e-01\n6.48803526312095730e-02\n-1.95397624657030200e-02\n-1.17942964621696220e-01\n-1.58622665436149779e-01\n-6.90493028992099633e-02\n1.19332245591275060e-01\n2.00769067300071213e-01\n-1.40794807379105661e-02\n-2.59789733915364751e-01\n2.23307684356200548e-02\n3.23984799880145002e-01\n-3.67844147019922296e-01\n2.17340789442846571e-01\n-8.34695598130633792e-02\n2.23952108481302453e-02\n-4.30897216983719931e-03\n2.70568293086875800e-02\n4.68638030543655909e-02\n5.96606192528762597e-02\n6.66144169423009275e-02\n6.44456551848323622e-02\n4.79625646946235246e-02\n1.26455351335317354e-02\n-4.05300600616545006e-02\n-9.84839727097599066e-02\n-1.31953010724129849e-01\n-1.03505013325525766e-01\n2.34074313385062432e-03\n1.34524604534315168e-01\n1.67233443731288955e-01\n7.91133880130338342e-03\n-2.03213883869563405e-01\n-1.18625417287332793e-01\n2.32144757868117058e-01\n1.05956719322256226e-01\n-3.68919061554516647e-01\n3.28099361471746398e-01\n-1.69931722331570917e-01\n5.94176760911095392e-02\n-1.48004679713969346e-02\n0.0\n2.97844493039229902e-03\n1.15354676130052826e-02\n2.70005365176136068e-02\n4.92279403692375411e-02\n7.52163209168331404e-02\n9.74109512149390205e-02\n1.03032924317940214e-01\n7.69865377048573191e-02\n1.12744048225246613e-02\n-7.93385109928472637e-02\n-1.45464267843021355e-01\n-1.18727904275703552e-01\n2.33851082507684944e-02\n1.74884583749590733e-01\n1.33741903043784305e-01\n-1.26729422025050109e-01\n-2.16139600665438941e-01\n1.49661218420125086e-01\n2.18108469235049118e-01\n-3.80215236539914070e-01\n2.80248751251014283e-01\n-1.29402532297561601e-01\n4.15430416483687295e-02\n2.53552804478568046e-02\n4.39166339758457480e-02\n5.60061318326520313e-02\n6.30016783154544457e-02\n6.23132149863205864e-02\n4.96004138425852822e-02\n2.06827411854402579e-02\n-2.49147329966590628e-02\n-7.88178872369068861e-02\n-1.19597995151825190e-01\n-1.15761491482730808e-01\n-4.40255895468954841e-02\n7.69494325820143932e-02\n1.62644011451060583e-01\n1.04254888025382936e-01\n-9.36417422631156959e-02\n-2.04281182547821794e-01\n4.55831147698868185e-03\n2.54808998030723710e-01\n-3.55542068069547162e-02\n-3.01530980901565104e-01\n3.65412902136868056e-01\n-2.31062694097770055e-01\n9.63484500952122430e-02\n0.0\n2.63227452377016264e-03\n1.01947553932079001e-02\n2.38941539739535580e-02\n4.37585047416495163e-02\n6.75679602677172336e-02\n8.94724882898088603e-02\n9.92164979878490533e-02\n8.37631473512365637e-02\n3.35924170673481404e-02\n-4.56485237876635419e-02\n-1.21335446360855789e-01\n-1.36874231776376143e-01\n-4.88233819602425304e-02\n1.05538334223635830e-01\n1.78075252664369160e-01\n3.31966092532291479e-02\n-1.96202839971575171e-01\n-1.21257563836449853e-01\n2.31249308440715617e-01\n8.67966907660602527e-02\n-3.53170733204259568e-01\n3.34101307891160215e-01\n-1.85489621648880942e-01\n2.41913676817755649e-02\n4.19006779294150006e-02\n5.35124749485656193e-02\n6.05667001448206982e-02\n6.09792713441719494e-02\n5.10528324978223591e-02\n2.69440545870235880e-02\n-1.26532028422703807e-02\n-6.24492436113617544e-02\n-1.06638864817847068e-01\n-1.19290989113163506e-01\n-7.52629587842455344e-02\n2.54046561163535599e-02\n1.31353064688079751e-01\n1.47517634152398824e-01\n1.56829753199382721e-02\n-1.64366711650445474e-01\n-1.50472804718015413e-01\n1.17361314207568901e-01\n2.17217606786431983e-01\n-1.55929924295861583e-01\n-2.02918770648933988e-01\n3.80004036297135861e-01\n-2.97210913480642491e-01\n0.0\n2.42231720536786963e-03\n9.38159419562145137e-03\n2.20132239202577816e-02\n4.04661010474883370e-02\n6.30391017062413156e-02\n8.50157357444649847e-02\n9.78580122100467104e-02\n9.00738734449282874e-02\n5.15534763798080609e-02\n-1.76053929652738479e-02\n-9.63765401287117879e-02\n-1.39712523638303110e-01\n-9.83691044440521134e-02\n3.15367766936515276e-02\n1.59974836298179351e-01\n1.37394980888604357e-01\n-6.99485853736912105e-02\n-2.15668607886649405e-01\n-9.39609438399488343e-03\n2.64332681619491916e-01\n-3.69021168430763297e-02\n-3.16526068297387331e-01\n3.98823888367130341e-01\n2.45347937546631922e-02\n4.24955093363002245e-02\n5.43425389104259873e-02\n6.18429448378775420e-02\n6.32387869876417236e-02\n5.52057666103789035e-02\n3.40575390232741512e-02\n-2.10975882169962695e-03\n-5.00626808361218020e-02\n-9.77816458809964151e-02\n-1.23396399598121181e-01\n-1.01521677681990108e-01\n-2.08577869355814696e-02\n9.14605827409071537e-02\n1.60447240494165422e-01\n1.03367445447899511e-01\n-7.23821182077516306e-02\n-1.98686562632846231e-01\n-7.43298268706574783e-02\n1.98607309406068161e-01\n1.60530944049053298e-01\n-2.40463791457886045e-01\n-1.43202653507274458e-01\n4.53860026492683755e-01\n0.0\n2.37047921474668440e-03\n9.18082652124474312e-03\n2.15656717091151362e-02\n3.97869185718683210e-02\n6.25040510982846770e-02\n8.57462336403822523e-02\n1.02079168514264240e-01\n1.00963279597209660e-01\n7.17544454041342122e-02\n1.04959199452040464e-02\n-7.05472485755329615e-02\n-1.36504106236627870e-01\n-1.38163108294786008e-01\n-4.53125186739978536e-02\n1.03971482688722597e-01\n1.86854702703695918e-01\n8.24029385097510697e-02\n-1.49415304310206748e-01\n-2.13518949921446016e-01\n6.99290086077269529e-02\n2.92611580147583816e-01\n-7.98260410273229776e-02\n-4.45716967748610748e-01\n2.61712602291530316e-02\n4.53299524149997496e-02\n5.80440027248903950e-02\n6.64223667969262715e-02\n6.89813062147136835e-02\n6.26614702405934171e-02\n4.38447833225847489e-02\n1.00810863083425871e-02\n-3.71297851791056177e-02\n-8.89919616232013183e-02\n-1.27407676864885105e-01\n-1.27889244485270198e-01\n-7.12802359242679373e-02\n3.59249428341026078e-02\n1.43856356387219608e-01\n1.69062493270644015e-01\n5.50359009051080011e-02\n-1.37592633188186486e-01\n-2.14584801657872970e-01\n-2.69410938788582389e-02\n2.47477071479350802e-01\n1.72653341926740839e-01\n-2.70819120987940143e-01\n-3.84844535716745484e-01\n0.0\n2.34494104379763665e-03\n9.08191761046648303e-03\n2.13579317342168368e-02\n3.95535027467413883e-02\n6.26831966878672736e-02\n8.75089905699588527e-02\n1.07716431630795639e-01\n1.13869515997787413e-01\n9.52518493906046454e-02\n4.46960170313565192e-02\n-3.36399082207716610e-02\n-1.16588916534364512e-01\n-1.61842380011048226e-01\n-1.25207605833124569e-01\n1.83196350076825893e-03\n1.53934361133076930e-01\n2.01990915252135889e-01\n5.57421518579041333e-02\n-1.88343092190257189e-01\n-2.46664669748701160e-01\n4.18016646171576606e-02\n3.74702311778522701e-01\n2.96644005300313374e-01\n2.82330438993780991e-02\n4.89010664860453984e-02\n6.27048507079608769e-02\n7.21764479271519988e-02\n7.61680775622405604e-02\n7.19644477071537114e-02\n5.61241674928626352e-02\n2.57879767726775233e-02\n-1.91641571669278650e-02\n-7.32781785344092801e-02\n-1.23094038749921642e-01\n-1.47439800305247393e-01\n-1.23604922669421621e-01\n-4.12717731555622344e-02\n7.93708818033807412e-02\n1.78541038862927937e-01\n1.77349217903902040e-01\n3.83217301982841443e-02\n-1.64570041365120656e-01\n-2.50126087280024612e-01\n-7.93535650428361661e-02\n2.39733138344214503e-01\n3.82514931669306946e-01\n2.05997032083048537e-01\n0.0\n2.28506847891346652e-03\n8.85003216377536900e-03\n2.08380147477781712e-02\n3.87452639806799282e-02\n6.19653767531716873e-02\n8.80736358308748662e-02\n1.12076235413390041e-01\n1.26083944232873751e-01\n1.20162410154329782e-01\n8.52468997113144111e-02\n1.85829750271264971e-02\n-6.93353621963777450e-02\n-1.50064737798122849e-01\n-1.81315888608646392e-01\n-1.26163378417231103e-01\n1.43873956206819736e-02\n1.74580034165357278e-01\n2.38178404977744312e-01\n1.17567454138045410e-01\n-1.41151721907083083e-01\n-3.44875475781001306e-01\n-3.20855367679112824e-01\n-1.29259326067264174e-01\n3.07915108679883628e-02\n5.33324612651651098e-02\n6.84886121583137136e-02\n7.93173727677911333e-02\n8.50931720656939033e-02\n8.35612559624664131e-02\n7.16247832719779237e-02\n4.62494605840939321e-02\n5.96499656586842349e-03\n-4.70054334333807888e-02\n-1.04452374390360425e-01\n-1.50940055564890152e-01\n-1.65606059414119572e-01\n-1.29073099207595049e-01\n-3.58105882755129640e-02\n9.21537061586345241e-02\n2.00376889449372875e-01\n2.19030414326800316e-01\n1.06017058372095033e-01\n-1.04531028185836872e-01\n-2.96044518444856297e-01\n-3.43555365860795436e-01\n-2.29390544867649648e-01\n-7.31483053703651243e-02\n0.0\n2.18078071796750381e-03\n8.44612740241839494e-03\n1.99125211353473608e-02\n3.71796005833799140e-02\n6.00262980947316588e-02\n8.68915683046649068e-02\n1.14265585111889306e-01\n1.36239200598158972e-01\n1.44637677508735574e-01\n1.30311740908206686e-01\n8.61035488181514375e-02\n1.14960564584766292e-02\n-8.22188900828653008e-02\n-1.69125286186525892e-01\n-2.12434052036692356e-01\n-1.78122816504025144e-01\n-5.66058181584343512e-02\n1.18660350077930479e-01\n2.74106376568737709e-01\n3.32840426752070040e-01\n2.70365085425259777e-01\n1.41535348489365220e-01\n3.71009916807564233e-02\n3.43549057122948601e-02\n5.95044421829329442e-02\n7.65335152467460783e-02\n8.92002349616026480e-02\n9.73177607667641692e-02\n9.92392339283467012e-02\n9.24339415793057617e-02\n7.40382745948463122e-02\n4.17304198025124917e-02\n-4.95579634894029002e-03\n-6.29770586857836823e-02\n-1.24220415741727264e-01\n-1.74900461920299982e-01\n-1.97113811251309473e-01\n-1.73604655875098185e-01\n-9.56746526111644791e-02\n2.81419660334655472e-02\n1.67793745620335444e-01\n2.77994163192948285e-01\n3.17419587627447930e-01\n2.73438517084116040e-01\n1.74690747843799093e-01\n7.53300097566283189e-02\n1.66801309630585717e-02\n0.0\n2.00746882467307992e-03\n7.77489332598941575e-03\n1.83546761363978690e-02\n3.44205093899025358e-02\n5.61164066945494810e-02\n8.27517093285151384e-02\n1.12401532958746456e-01\n1.41511282201110700e-01\n1.64679252579444907e-01\n1.74874611854175910e-01\n1.64390031272651893e-01\n1.26748498260841252e-01\n5.94878951196469163e-02\n-3.28126822940013885e-02\n-1.36613537721087086e-01\n-2.30429576348828324e-01\n-2.90196782267721942e-01\n-2.98512539956585388e-01\n-2.54120853947899572e-01\n-1.75452040206576121e-01\n-9.32459279215639980e-02\n-3.41916928111210341e-02\n-6.52842030376562729e-03\n4.03589383462328796e-02\n6.99037317552151788e-02\n9.00552862255319664e-02\n1.05655402029236567e-01\n1.17258470440482765e-01\n1.24051400312824300e-01\n1.24400694711209847e-01\n1.16147786982976606e-01\n9.69717632675596297e-02\n6.49286680102383329e-02\n1.91945134301829967e-02\n-3.90563219669825268e-02\n-1.05838518541399848e-01\n-1.73959888710752020e-01\n-2.33489669123586874e-01\n-2.73465251281689414e-01\n-2.84844177216419137e-01\n-2.64020273039300479e-01\n-2.15432952458873062e-01\n-1.51451609897528400e-01\n-8.84935893849552319e-02\n-4.04466754736235654e-02\n-1.28964594248184624e-02\n-2.15791241646804376e-03\n0.0\n1.68478788679334241e-03\n6.52515542744260164e-03\n1.54259898526839453e-02\n2.90595755947373920e-02\n4.78539268169081156e-02\n7.19024655947220065e-02\n1.00822877503193825e-01\n1.33589998246672448e-01\n1.68381755119621751e-01\n2.02498158042104692e-01\n2.32432699636595269e-01\n2.54180233329888594e-01\n2.63837488976257140e-01\n2.58474479959919512e-01\n2.37123390454430844e-01\n2.01575013067042313e-01\n1.56568154232312601e-01\n1.09019241603489164e-01\n6.62605261061926104e-02\n3.37966475442380426e-02\n1.35825676707967153e-02\n3.82913657592729058e-03\n5.68855589574466234e-04\n5.80142199233684153e-02\n1.00483576468748712e-01\n1.29670519414618907e-01\n1.53176344682287330e-01\n1.72972550525643198e-01\n1.89657748470530546e-01\n2.03216048830239526e-01\n2.13269108594268231e-01\n2.19212062854693246e-01\n2.20333700064721666e-01\n2.15956643983629598e-01\n2.05607807163034756e-01\n1.89209587966900461e-01\n1.67261032493199902e-01\n1.40957309243483736e-01\n1.12183476687168979e-01\n8.33272525921615603e-02\n5.68971545835290221e-02\n3.50080209243093521e-02\n1.88838735334546926e-02\n8.57970591235975369e-03\n3.08079730567206679e-03\n7.77926998365635570e-04\n1.03715663670916284e-04\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n3.13046309536482922e-02\n5.42212113239121940e-02\n6.86949483603631061e-02\n7.51077216437837647e-02\n6.80535455514093279e-02\n3.99825735066795598e-02\n-1.36245225316147783e-02\n-8.48280036848167995e-02\n-1.42642688279874086e-01\n-1.34423434769748218e-01\n-2.13966755957234259e-02\n1.46829028303033654e-01\n1.92413047610125787e-01\n-2.87491387003486545e-02\n-2.65192777737401519e-01\n9.96953747334031366e-03\n3.47307623368017238e-01\n-3.69402430953030214e-01\n2.02524168778997704e-01\n-7.07847575547383701e-02\n1.68635954707225047e-02\n-2.79083288376033491e-03\n3.17334210055171127e-04\n-2.37299576748381054e-05\n1.05346045745215675e-06\n0.0\n3.94815347735534040e-03\n1.52911326660681354e-02\n3.56609978909944864e-02\n6.42215183684167329e-02\n9.52413078696965759e-02\n1.15508986444006284e-01\n1.04725569006586250e-01\n4.43521460195759887e-02\n-6.08399177151767515e-02\n-1.56823522657392161e-01\n-1.45874985959269121e-01\n2.41723579915523352e-02\n2.11236840069274900e-01\n1.13052959575735412e-01\n-2.35223105585313536e-01\n-1.26189873806397679e-01\n3.86981898851894934e-01\n-3.22516108631034248e-01\n1.54574067130287068e-01\n-4.90623442773930468e-02\n1.08283126869351005e-02\n-1.68111893996650275e-03\n1.80904937864814633e-04\n-1.28870149231429051e-05\n2.90259753668060429e-02\n5.02744640745507454e-02\n6.38655891688781618e-02\n7.06518713911234719e-02\n6.64442436114070639e-02\n4.49949520329280123e-02\n1.59792382547019503e-03\n-6.02296998295941410e-02\n-1.20294637843078700e-01\n-1.38964796254957917e-01\n-7.47403231452521549e-02\n6.73658529763012104e-02\n1.83893717249391686e-01\n1.13805172151982811e-01\n-1.40173723623842145e-01\n-2.18646365703552031e-01\n1.45251404914754995e-01\n2.41912200397006116e-01\n-3.90766910168775961e-01\n2.69582742752317472e-01\n-1.14902811193126717e-01\n3.34101383869047364e-02\n-6.86857701229364251e-03\n1.00420142518283656e-03\n-1.02561832464517766e-04\n0.0\n3.41202555437487105e-03\n1.32147181489280056e-02\n3.08808341176964318e-02\n5.59953703201699002e-02\n8.44404641626871344e-02\n1.06297954804182346e-01\n1.05492275749872952e-01\n6.48803303205346543e-02\n-1.95397564694914441e-02\n-1.17942925225037284e-01\n-1.58622611461525453e-01\n-6.90492780683848589e-02\n1.19332206535434471e-01\n2.00768997898554180e-01\n-1.40794793443828441e-02\n-2.59789643814178184e-01\n2.23307664728786721e-02\n3.23984680121738366e-01\n-3.67844014300205413e-01\n2.17340711674412546e-01\n-8.34695300691746800e-02\n2.23952028865151732e-02\n-4.30897064016241404e-03\n5.95275885079765265e-04\n2.70566512851700136e-02\n4.68634947085882284e-02\n5.96602266356320576e-02\n6.66139782111800083e-02\n6.44452297163673193e-02\n4.79622456616271217e-02\n1.26454455203166335e-02\n-4.05298023704295518e-02\n-9.84833325996943287e-02\n-1.31952141204404017e-01\n-1.03504312931467057e-01\n2.34076252198007605e-03\n1.34523740933561675e-01\n1.67232308642103533e-01\n7.91120668744670769e-03\n-2.03212548535336102e-01\n-1.18624489915801101e-01\n2.32143230129634753e-01\n1.05955744808140628e-01\n-3.68916270973057681e-01\n3.28096948456042703e-01\n-1.69930486925820051e-01\n5.94172467699294188e-02\n-1.48003614191815607e-02\n2.67618492221444876e-03\n0.0\n2.97820542943027719e-03\n1.15345400297679705e-02\n2.69983648208926043e-02\n4.92239775516069428e-02\n7.52102539348116356e-02\n9.74030607740664217e-02\n1.03024503011469093e-01\n7.69800933570404106e-02\n1.12731438603587506e-02\n-7.93324295042353439e-02\n-1.45452490254309702e-01\n-1.18717632268271200e-01\n2.33842470394953275e-02\n1.74870555153844337e-01\n1.33729327677491988e-01\n-1.26720559097699914e-01\n-2.16119284805839751e-01\n1.49651067145202016e-01\n2.18083862526054745e-01\n-3.80177269451042743e-01\n2.80221654915525420e-01\n-1.29390207241980137e-01\n4.15391180534753213e-02\n-9.65652832933943349e-03\n2.53385382746934423e-02\n4.38876356812976792e-02\n5.59691363292908889e-02\n6.29599924723421439e-02\n6.22717840691815600e-02\n4.95669707397600259e-02\n2.06677698251211996e-02\n-2.49002316858613591e-02\n-7.87678688855694559e-02\n-1.19519673483214697e-01\n-1.15682322422882067e-01\n-4.39896540876874506e-02\n7.69060829824863706e-02\n1.62536060117074804e-01\n1.04171740299469642e-01\n-9.35950469129550877e-02\n-2.04133283681486116e-01\n4.58865312081857286e-03\n2.54619358729768930e-01\n-3.55831721761811701e-02\n-3.01233811600015666e-01\n3.65088218668281783e-01\n-2.30864816471978068e-01\n9.62674757559344035e-02\n-2.85750104673830121e-02\n0.0\n2.62303092633266958e-03\n1.01589550942734422e-02\n2.38102049320074866e-02\n4.36045120512816714e-02\n6.73292599180111556e-02\n8.91538785212964979e-02\n9.88574221340101228e-02\n8.34483847541816620e-02\n3.34432770528611534e-02\n-4.55210068501906359e-02\n-1.20920262385452906e-01\n-1.36353216455248782e-01\n-4.85600781497098968e-02\n1.05237495632066858e-01\n1.77377622473095659e-01\n3.28822812583904889e-02\n-1.95527781091667713e-01\n-1.20483298266948896e-01\n2.30433642034666597e-01\n8.58341798657491495e-02\n-3.51039102852390594e-01\n3.32273512393024217e-01\n-1.84516607844546154e-01\n7.01921861788206286e-02\n2.38729600058623058e-02\n4.13491796572133113e-02\n5.28076120150636555e-02\n5.97663848980755363e-02\n6.01661891530023973e-02\n5.03552664569272557e-02\n2.65397876338437019e-02\n-1.25635666418532164e-02\n-6.17165467520376654e-02\n-1.05290273741678014e-01\n-1.17665647957053726e-01\n-7.40474835419998867e-02\n2.54072346320704454e-02\n1.29812844419909340e-01\n1.45273249774679480e-01\n1.47335165806657103e-02\n-1.62507044722703692e-01\n-1.47452532093360789e-01\n1.16905244828463623e-01\n2.12663639557762657e-01\n-1.55399245857201163e-01\n-1.95525455238711399e-01\n3.70090294041539314e-01\n-2.90176110694543299e-01\n1.43905360223580553e-01\n0.0\n2.34691849538304353e-03\n9.08957624752469544e-03\n2.13273635334931821e-02\n3.92012736836230627e-02\n6.10540556833514825e-02\n8.22982357236638068e-02\n9.46372694379696705e-02\n8.69220247125091217e-02\n4.93901306581700436e-02\n-1.77321796947074034e-02\n-9.38330546855668801e-02\n-1.35060261889434818e-01\n-9.38999352305614488e-02\n3.24331589933467973e-02\n1.55375606203265376e-01\n1.30354264162128308e-01\n-7.13031546935670862e-02\n-2.06810639839248356e-01\n-1.89724447187718769e-03\n2.52444785097882374e-01\n-4.82138599862396017e-02\n-2.84171754217302730e-01\n3.66841190398886130e-01\n-2.46714416790224988e-01\n2.31211424436586835e-02\n4.00469934414540707e-02\n5.12068062326628756e-02\n5.82523793756717853e-02\n5.95037063196357935e-02\n5.17998115775579956e-02\n3.16516425532003057e-02\n-2.70015229910329415e-03\n-4.80740526415853464e-02\n-9.28840465185107045e-02\n-1.16219937535771478e-01\n-9.41086969414591107e-02\n-1.65668290260364871e-02\n8.92366066951513076e-02\n1.51038223991569270e-01\n9.18901449314503821e-02\n-7.53931237607814025e-02\n-1.85928782187921693e-01\n-5.64738820293768651e-02\n1.93168765118987507e-01\n1.28239063186608299e-01\n-2.35342384319313480e-01\n-7.83880018333438511e-02\n3.56497978788671233e-01\n-3.54955207482986645e-01\n0.0\n2.20826555749827069e-03\n8.55257572819423904e-03\n2.00869052949293470e-02\n3.70403675077434491e-02\n5.81226288147984674e-02\n7.95514983309171114e-02\n9.42807955200513359e-02\n9.23928594280832016e-02\n6.40475206081078663e-02\n6.04655578651609477e-03\n-6.91321470598461607e-02\n-1.27733834504098920e-01\n-1.23749162918578973e-01\n-3.20024469106302833e-02\n1.05509758975414300e-01\n1.69626294439318537e-01\n5.62172080104301683e-02\n-1.53876668045316717e-01\n-1.75325816987619065e-01\n1.05016312168268733e-01\n2.36167734927044876e-01\n-1.54569754643120505e-01\n-2.32724787918230702e-01\n4.32554592420007489e-01\n2.38790842886131838e-02\n4.13597872260977606e-02\n5.29456988784525046e-02\n6.05185044824120624e-02\n6.26498664284019791e-02\n5.64546507938955278e-02\n3.85671971044161399e-02\n6.81928410628523593e-03\n-3.70724713415564178e-02\n-8.43399737671272215e-02\n-1.17458882463946868e-01\n-1.13459820391081073e-01\n-5.59086847691615818e-02\n4.53233599927753070e-02\n1.38744041548286179e-01\n1.45628144031090173e-01\n2.41250409312054187e-02\n-1.47038103977091272e-01\n-1.77049043132018719e-01\n3.14220954668682703e-02\n2.34900559502034284e-01\n5.42554840481351067e-02\n-2.87854585811604780e-01\n-2.84934077951256581e-02\n4.53301867387322810e-01\n0.0\n2.18142626606943058e-03\n8.44862759946633270e-03\n1.98620956638814634e-02\n3.67435809040935341e-02\n5.80857925712973538e-02\n8.06919827977701648e-02\n9.84055832688192494e-02\n1.02164710827032670e-01\n8.19991928701671174e-02\n3.20189545634279871e-02\n-4.18638384123787982e-02\n-1.14978119515303429e-01\n-1.45682476911626085e-01\n-9.54928604608318438e-02\n3.20927413104529907e-02\n1.59316356497911538e-01\n1.61501055410175870e-01\n-1.20202817185368800e-02\n-2.06656948044294270e-01\n-1.46782600798851470e-01\n1.68819547220810079e-01\n2.51868795613703511e-01\n-1.82198793904763484e-01\n-4.16033226782648369e-01\n2.55215239787851648e-02\n4.42045762178433083e-02\n5.66546025767415140e-02\n6.50787268148549508e-02\n6.82949878506280000e-02\n6.36603495978678158e-02\n4.79080318392154092e-02\n1.84984479061654356e-02\n-2.41691791748242096e-02\n-7.39367169638758537e-02\n-1.16713258148552546e-01\n-1.31509771243682100e-01\n-9.79178614363567790e-02\n-1.13147998843943533e-02\n9.96742348835935599e-02\n1.69565984543253723e-01\n1.27696566274152185e-01\n-3.18540538973390921e-02\n-1.92433601267719634e-01\n-1.70320766230980913e-01\n7.46640611364134676e-02\n2.70538492197971270e-01\n7.78673532846061445e-02\n-3.30687160545029835e-01\n-3.40117973472159385e-01\n0.0\n2.15353058086795255e-03\n8.34058807524996372e-03\n1.96283254544029964e-02\n3.64342232000360866e-02\n5.80449532753464434e-02\n8.18810379717384851e-02\n1.02762806966327128e-01\n1.12701433371409046e-01\n1.02052875410410207e-01\n6.29603317357337877e-02\n-4.62601752100615885e-03\n-8.59904005730157683e-02\n-1.48606470393765011e-01\n-1.50606367015868936e-01\n-6.61972269050413870e-02\n7.91177537086855537e-02\n1.92790012488635282e-01\n1.60908755987039354e-01\n-3.73673337528085750e-02\n-2.37906491145498805e-01\n-1.89289729336936996e-01\n1.36608238514456637e-01\n3.86392372348048463e-01\n2.50655619216331838e-01\n2.74827794621010021e-02\n4.76015703615693953e-02\n6.10850477566792505e-02\n7.05336169087537324e-02\n7.50707408045043489e-02\n7.23738906151193406e-02\n5.93814910534690155e-02\n3.33151673150779842e-02\n-6.62370576320179573e-03\n-5.69314734640235728e-02\n-1.07538737019578945e-01\n-1.41214918595482297e-01\n-1.37052476627456565e-01\n-8.00724054786759037e-02\n2.40627803043058051e-02\n1.36710945313801069e-01\n1.90943728561577514e-01\n1.27181269036201083e-01\n-4.66633087209406411e-02\n-2.16715523049258979e-01\n-2.16873342745635272e-01\n1.18349375632484065e-02\n2.95882571085283264e-01\n3.59097546064671702e-01\n1.67506009974011216e-01\n0.0\n2.09427831884595851e-03\n8.11110505121366392e-03\n1.91090309064491717e-02\n3.55965442119387521e-02\n5.71699317811300983e-02\n8.19253361369892963e-02\n1.05809881844919199e-01\n1.22245847747897540e-01\n1.22587856333021411e-01\n9.81181954273152579e-02\n4.40828842311571448e-02\n-3.46411289518069945e-02\n-1.18495804649617217e-01\n-1.73357819285515524e-01\n-1.61324777933325864e-01\n-6.41157286420570988e-02\n8.95250038780479457e-02\n2.15322224097602821e-01\n2.10614247245721808e-01\n3.67741781885097402e-02\n-2.12566737608219980e-01\n-3.53588966725605747e-01\n-2.82009851230896336e-01\n-1.01588504550262387e-01\n2.99381947472588950e-02\n5.18544743891440896e-02\n6.66305332289354596e-02\n7.73554785589832261e-02\n8.35322907537001530e-02\n8.32564210972149277e-02\n7.38122214464261711e-02\n5.23836670952519956e-02\n1.72255612955458590e-02\n-3.06319865599572264e-02\n-8.54185869269520615e-02\n-1.35210238706989033e-01\n-1.62499705891997415e-01\n-1.48465453036033090e-01\n-8.18488915790024640e-02\n2.93166010642844956e-02\n1.49287766624452062e-01\n2.19423427607082666e-01\n1.84015149983402987e-01\n3.16286306966099204e-02\n-1.75355992437573882e-01\n-3.21475792661247428e-01\n-3.19245256272805700e-01\n-1.91452020767998943e-01\n-5.57357853380870405e-02\n0.0\n1.99570482202865223e-03\n7.72933153966280737e-03\n1.82303739722689921e-02\n3.40859187577428682e-02\n5.52028717182194151e-02\n8.03854969952945836e-02\n1.06822241574288032e-01\n1.29661241594441479e-01\n1.41987511339814715e-01\n1.35639696186029002e-01\n1.03309269511262680e-01\n4.20778985627307187e-02\n-4.22027476802031357e-02\n-1.31500364332105019e-01\n-1.96203950301342800e-01\n-2.02912380453002084e-01\n-1.30071695665063769e-01\n1.37703401797564726e-02\n1.81347697669166030e-01\n3.01426070575037841e-01\n3.18552175218655476e-01\n2.34703082507512290e-01\n1.13121480165111740e-01\n2.74710866405457506e-02\n3.33730480175330052e-02\n5.78038147698029595e-02\n7.43778650881241760e-02\n8.68382417715242438e-02\n9.51702486637295980e-02\n9.80126186579442504e-02\n9.31809766730880701e-02\n7.81102372974199627e-02\n5.05347093300892794e-02\n9.52079081086818109e-03\n-4.31862764137691535e-02\n-1.01775241889276613e-01\n-1.55534095989482396e-01\n-1.89459460036991295e-01\n-1.87238916432688279e-01\n-1.36963226113477277e-01\n-3.84824797572327071e-02\n9.07737358246628462e-02\n2.16284875302912155e-01\n2.97033246976005083e-01\n3.04722601715925689e-01\n2.41831862901809080e-01\n1.43805276241755098e-01\n5.79809942410372120e-02\n1.20243944896046579e-02\n0.0\n1.83472871103721011e-03\n7.10587374265571510e-03\n1.67798707287119160e-02\n3.14951078800539339e-02\n5.14481313615276770e-02\n7.61485462744119074e-02\n1.04089310375873281e-01\n1.32404171582217955e-01\n1.56639037223082617e-01\n1.70829083584179253e-01\n1.68116602030992573e-01\n1.42112364178173078e-01\n8.90274617976601068e-02\n1.02337683210638603e-02\n-8.56140768209148056e-02\n-1.82237402609099680e-01\n-2.58528229717317426e-01\n-2.94900706550379532e-01\n-2.81582204215869936e-01\n-2.24839968014652947e-01\n-1.46309976277367276e-01\n-7.34392219585446454e-02\n-2.54465159900433766e-02\n-4.58904259712412683e-03\n3.91753867500243338e-02\n6.78537602572027443e-02\n8.74354698008519976e-02\n1.02681891793280425e-01\n1.14243379233477452e-01\n1.21496709741618719e-01\n1.23066076956394280e-01\n1.17077433622521390e-01\n1.01446048184353030e-01\n7.42976409700829982e-02\n3.45567858491415761e-02\n-1.73320048683024489e-02\n-7.86804529729994012e-02\n-1.44074630189722469e-01\n-2.05473471816001091e-01\n-2.53223317950309612e-01\n-2.78131651915470401e-01\n-2.74306778121774120e-01\n-2.41867914019189001e-01\n-1.88156524984746443e-01\n-1.26208994180591255e-01\n-7.03554506947221131e-02\n-3.06574973262286818e-02\n-9.30884270043802822e-03\n-1.48107092671812012e-03\n0.0\n1.53801510854351597e-03\n5.95670690160442998e-03\n1.40837108500639751e-02\n2.65405393928442798e-02\n4.37403381751230239e-02\n6.58176366187498835e-02\n9.25141369932453717e-02\n1.23039514089733154e-01\n1.55935839402413234e-01\n1.88989879494220747e-01\n2.19253357993385550e-01\n2.43238675580659258e-01\n2.57344199518785899e-01\n2.58515732603297688e-01\n2.45062334818486965e-01\n2.17427128501598843e-01\n1.78609787194676628e-01\n1.33921714993654323e-01\n8.99077139606854758e-02\n5.26126581087711306e-02\n2.57976641535032740e-02\n9.95009713972175823e-03\n2.68713717659986714e-03\n3.81658213590530947e-04\n5.62744387204612076e-02\n9.74701870312601332e-02\n1.25787704427925556e-01\n1.48617415032223699e-01\n1.67903000014981069e-01\n1.84272355374632352e-01\n1.97772826312566957e-01\n2.08111828115719294e-01\n2.14779700961622522e-01\n2.17150650690977193e-01\n2.14596027493409280e-01\n2.06621808095994119e-01\n1.93026717308941248e-01\n1.74061427035724803e-01\n1.50552686229842608e-01\n1.23943724652605614e-01\n9.62021630177449516e-02\n6.95683022805191481e-02\n4.61646954525904707e-02\n2.75541757332786082e-02\n1.43911327077510635e-02\n6.31859081435054686e-03\n2.18820427261414959e-03\n5.31792317015709805e-04\n6.80911316243667971e-05\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n3.94815347735415559e-03\n1.52911326660635470e-02\n3.56609978909837796e-02\n6.42215183683974566e-02\n9.52413078696680016e-02\n1.15508986443971617e-01\n1.04725569006554817e-01\n4.43521460195626799e-02\n-6.08399177151584952e-02\n-1.56823522657345116e-01\n-1.45874985959225351e-01\n2.41723579915450806e-02\n2.11236840069211507e-01\n1.13052959575701481e-01\n-2.35223105585242925e-01\n-1.26189873806359792e-01\n3.86981898851778805e-01\n-3.22516108630937492e-01\n1.54574067130240689e-01\n-4.90623442773783225e-02\n1.08283126869318513e-02\n-1.68111893996599837e-03\n1.80904937864760342e-04\n-1.28870149231390376e-05\n5.47807706733101586e-07\n2.90259753654028702e-02\n5.02744640721203839e-02\n6.38655891657907149e-02\n7.06518713877077043e-02\n6.64442436081939675e-02\n4.49949520307503584e-02\n1.59792382538843599e-03\n-6.02296998266883682e-02\n-1.20294637837267224e-01\n-1.38964796248235545e-01\n-7.47403231416216562e-02\n6.73658529730664229e-02\n1.83893717240500187e-01\n1.13805172146436720e-01\n-1.40173723617099399e-01\n-2.18646365692909989e-01\n1.45251404907789317e-01\n2.41912200385126314e-01\n-3.90766910149702107e-01\n2.69582742739179038e-01\n-1.14902811187530707e-01\n3.34101383852782111e-02\n-6.86857701195933180e-03\n1.00420142513396615e-03\n-1.02561832459526913e-04\n6.97559986676108865e-06\n0.0\n3.41202554320560892e-03\n1.32147181056696383e-02\n3.08808340166034853e-02\n5.59953701368328394e-02\n8.44404638861149803e-02\n1.06297954455741264e-01\n1.05492275403444857e-01\n6.48803301062016446e-02\n-1.95397564079512129e-02\n-1.17942924840240992e-01\n-1.58622610939886721e-01\n-6.90492778357557208e-02\n1.19332206149437375e-01\n2.00768997233777780e-01\n-1.40794793121703007e-02\n-2.59789642952701683e-01\n2.23307664226693701e-02\n3.23984679016970700e-01\n-3.67844013059292263e-01\n2.17340710943897841e-01\n-8.34695297891290267e-02\n2.23952028114554162e-02\n-4.30897062572950431e-03\n5.95275883086654185e-04\n-5.78518951810302876e-05\n2.70566481045231670e-02\n4.68634891995462904e-02\n5.96602196216043310e-02\n6.66139703764346419e-02\n6.44452221274409986e-02\n4.79622399920791101e-02\n1.26454439756918235e-02\n-4.05297976872678531e-02\n-9.84833210936381376e-02\n-1.31952125680360077e-01\n-1.03504300588019418e-01\n2.34076256172824826e-03\n1.34523725312551246e-01\n1.67232288665693507e-01\n7.91120503476121402e-03\n-2.03212524653431037e-01\n-1.18624474645868533e-01\n2.32143202814596855e-01\n1.05955729885372940e-01\n-3.68916224357737799e-01\n3.28096907609571220e-01\n-1.69930465897987049e-01\n5.94172394409580862e-02\n-1.48003595970489406e-02\n2.67618459312477614e-03\n-3.50403117063513613e-04\n0.0\n2.97819799457994675e-03\n1.15345112347164606e-02\n2.69982974123066134e-02\n4.92238545937752486e-02\n7.52100658577542630e-02\n9.74028166310627330e-02\n1.03024243487139039e-01\n7.69798968441297721e-02\n1.12731096701585327e-02\n-7.93322365193673829e-02\n-1.45452125700864410e-01\n-1.18717323467055116e-01\n2.33842059716259307e-02\n1.74870118899037752e-01\n1.33728962699721843e-01\n-1.26720264664961918e-01\n-2.16118695060072225e-01\n1.49650723559443422e-01\n2.18083200635392688e-01\n-3.80176196777553044e-01\n2.80220878934315298e-01\n-1.29389852021310453e-01\n4.15390045638775393e-02\n-9.65650202410351516e-03\n1.64691696354611183e-03\n2.53376711917863429e-02\n4.38861338496482137e-02\n5.59672206373110076e-02\n6.29578354287023689e-02\n6.22696446137335560e-02\n4.95652539089103811e-02\n2.06670233565535467e-02\n-2.48994377031400219e-02\n-7.87652335877515458e-02\n-1.19515602236457297e-01\n-1.15678281390531879e-01\n-4.39879437313708613e-02\n7.69036716605674409e-02\n1.62530476771339139e-01\n1.04167747068165478e-01\n-9.35922850769304315e-02\n-2.04125897451145871e-01\n4.58946716889139465e-03\n2.54609980793776947e-01\n-3.55834256867316942e-02\n-3.01220687645099405e-01\n3.65073315736916704e-01\n-2.30855603440347501e-01\n9.62636777454037307e-02\n-2.85738906167188542e-02\n6.22736389551831453e-03\n0.0\n2.62222898273986550e-03\n1.01558491800939153e-02\n2.38029233097857285e-02\n4.35911641921832779e-02\n6.73086032936944245e-02\n8.91263987328077822e-02\n9.88266609361853482e-02\n8.34218344455519706e-02\n3.34314878549772099e-02\n-4.55087239003371599e-02\n-1.20883810051154977e-01\n-1.36309463636439032e-01\n-4.85406249512822449e-02\n1.05208710723119492e-01\n1.77319613189338560e-01\n3.28624351758619593e-02\n-1.95468232261012842e-01\n-1.20429266645515926e-01\n2.30361904563091052e-01\n8.57772222231123066e-02\n-3.50889294516089689e-01\n3.32140507282542241e-01\n-1.84444700381124177e-01\n7.01652262141780753e-02\n-1.93705634736372929e-02\n2.38275847575564054e-02\n4.12705874217414448e-02\n5.27071969463617507e-02\n5.96525278309905094e-02\n6.00509652599394914e-02\n5.02574388553907320e-02\n2.64852435454875877e-02\n-1.25460275103187434e-02\n-6.16065655033439519e-02\n-1.05094569895564080e-01\n-1.17437245307055890e-01\n-7.38880228447433562e-02\n2.53865667174400615e-02\n1.29580855520447846e-01\n1.44971136425399910e-01\n1.46447594891172816e-02\n-1.62220033914719786e-01\n-1.47085259376226657e-01\n1.16765257491619825e-01\n2.12117456706540780e-01\n-1.55206828658334378e-01\n-1.94797267271032776e-01\n3.69009096723283914e-01\n-2.89382510243352931e-01\n1.43523947871964486e-01\n-5.02214124731064498e-02\n0.0\n2.32880492313612556e-03\n9.01942268387205710e-03\n2.11626692044892123e-02\n3.88980090509849982e-02\n6.05797582311716279e-02\n8.16534546905124531e-02\n9.38833321219282591e-02\n8.62043899052807594e-02\n4.89341919343681681e-02\n-1.76848259840424633e-02\n-9.31675713156700225e-02\n-1.33973446031556198e-01\n-9.29846182332852433e-02\n3.24286980057212904e-02\n1.54212020015752987e-01\n1.28970132755647698e-01\n-7.11964389503592643e-02\n-2.04886415747892098e-01\n-9.82154629358815553e-04\n2.49915613595207725e-01\n-4.92225997272328214e-02\n-2.79305307734375563e-01\n3.61639118224667933e-01\n-2.43450602586943732e-01\n1.09222386902780272e-01\n2.25961236072842742e-02\n3.91376341419228946e-02\n5.00430795806483600e-02\n5.69239567553193396e-02\n5.81335599680810125e-02\n5.05768593235634209e-02\n3.08410028674674722e-02\n-2.78589575169033762e-03\n-4.71661647909464091e-02\n-9.09227209254974272e-02\n-1.13558685460811201e-01\n-9.16387224018385960e-02\n-1.55513115906467849e-02\n8.78155503626422557e-02\n1.47523753546387082e-01\n8.86328077651187540e-02\n-7.50861133212476495e-02\n-1.81268191124934364e-01\n-5.24307646557160209e-02\n1.89579673047331670e-01\n1.20664716926027871e-01\n-2.30579347250542938e-01\n-6.71584091527409749e-02\n3.35840849469693448e-01\n-3.37472095835987917e-01\n1.99650240789310401e-01\n0.0\n2.11427631100763501e-03\n8.18855694181342200e-03\n1.92310471834584579e-02\n3.54566171553959905e-02\n5.56173113294209792e-02\n7.60669091970067324e-02\n9.00231186369763181e-02\n8.79617592812305671e-02\n6.04874678212436595e-02\n4.69033520942699952e-03\n-6.71628177706810880e-02\n-1.22383327530289299e-01\n-1.16915035826905447e-01\n-2.76171637305832052e-02\n1.03336348283071353e-01\n1.60678995118546358e-01\n4.77456198782296171e-02\n-1.50669369171588519e-01\n-1.60085042116989457e-01\n1.10054075251680678e-01\n2.13272071614967557e-01\n-1.62213758112103812e-01\n-1.81813167175176593e-01\n3.70824517025668932e-01\n-3.07242895158431506e-01\n2.22753379441316679e-02\n3.85820170750029098e-02\n4.93840778925314430e-02\n5.64201265466492546e-02\n5.83285420936711790e-02\n5.23814906080797005e-02\n3.54152429508526878e-02\n5.43670207421568207e-03\n-3.58105791292020470e-02\n-7.98501187295951459e-02\n-1.09941099009561324e-01\n-1.04443020852097362e-01\n-4.85113577772002258e-02\n4.70106782921406036e-02\n1.31784971189075617e-01\n1.31757236181329451e-01\n1.23770706032306221e-02\n-1.43752985642657344e-01\n-1.55625998994963044e-01\n4.90474975660912249e-02\n2.15471449678620197e-01\n1.40378186088471989e-02\n-2.61215001161644311e-01\n4.89709167452708968e-02\n2.99883050617017921e-01\n-4.00486518504055089e-01\n0.0\n2.03000317426484025e-03\n7.86216848667591929e-03\n1.84802487339752533e-02\n3.41682305548546769e-02\n5.39454497642270214e-02\n7.47492680270735732e-02\n9.07178078244326586e-02\n9.32906310727506932e-02\n7.32092598593113708e-02\n2.53995646951899294e-02\n-4.36259253499411206e-02\n-1.09451319546991208e-01\n-1.32456056479332535e-01\n-7.85589037945361168e-02\n4.30998845397242911e-02\n1.52674120890201603e-01\n1.34745391539871640e-01\n-3.85527093624069492e-02\n-1.95939987837733143e-01\n-9.27557596525618727e-02\n1.90663491423196774e-01\n1.61945837696767958e-01\n-2.40284660704970149e-01\n-1.29829804043791491e-01\n4.47675942673288585e-01\n2.33065182000768423e-02\n4.03680736700618298e-02\n5.17226967021602521e-02\n5.93425959502272976e-02\n6.20719922166025756e-02\n5.73986195060831733e-02\n4.22617338129916281e-02\n1.43798012281597231e-02\n-2.55867628300360563e-02\n-7.13291169211166115e-02\n-1.08951147510648993e-01\n-1.18400253106448181e-01\n-8.14029901876093392e-02\n3.27864423066677024e-03\n1.03720603217951041e-01\n1.54934949857200105e-01\n9.56432889407971554e-02\n-6.12602714501901471e-02\n-1.85113949785509907e-01\n-1.13006196868797926e-01\n1.27566342505531033e-01\n2.20161339214707930e-01\n-5.79377731011112007e-02\n-2.90029933107367799e-01\n8.24138518533415465e-02\n4.36474705664632201e-01\n0.0\n2.01370157784338741e-03\n7.79903267521903781e-03\n1.83478950647244579e-02\n3.40212320569072413e-02\n5.40690599145496331e-02\n7.59084087619623510e-02\n9.44260046720904606e-02\n1.01852438994295191e-01\n8.90688487073362789e-02\n4.92532555950869755e-02\n-1.59911752276610392e-02\n-9.00354539201532467e-02\n-1.39550017461691600e-01\n-1.25572238903880501e-01\n-3.14521974310528474e-02\n1.03485546040637491e-01\n1.79209515068016800e-01\n1.00096481132974202e-01\n-1.02733339307651786e-01\n-2.19913047872590806e-01\n-5.39818840138348369e-02\n2.36507480051358493e-01\n1.80236635754827679e-01\n-2.63976638809098940e-01\n-3.77800169290525956e-01\n2.49018599800081841e-02\n4.31312866883402854e-02\n5.53222315978257745e-02\n6.37542211516377716e-02\n6.74969190085798892e-02\n6.42644634785557167e-02\n5.11189986559192067e-02\n2.55383324406929721e-02\n-1.28189455011131978e-02\n-5.97592390694314871e-02\n-1.04435089168304060e-01\n-1.29287447919859466e-01\n-1.14620458878091802e-01\n-4.95852183775327277e-02\n5.26727823734949793e-02\n1.45545699935024253e-01\n1.61855060923483673e-01\n6.04662826572540668e-02\n-1.11990325100796304e-01\n-2.09286895867402845e-01\n-9.57851354098002983e-02\n1.61236777060295544e-01\n2.54748081166216500e-01\n-2.14038050053274240e-02\n-3.66175224470659366e-01\n-2.94489766193492042e-01\n0.0\n1.98342718209194076e-03\n7.68178044465719304e-03\n1.80887816078185368e-02\n3.36425600834557442e-02\n5.38376911712281775e-02\n7.66133395836298137e-02\n9.77069303030654590e-02\n1.10360340417158365e-01\n1.06014500532115363e-01\n7.67507898349184120e-02\n1.98965904410928450e-02\n-5.60187513436660733e-02\n-1.27050439462345954e-01\n-1.56939088694326989e-01\n-1.13131926817535783e-01\n5.13756839271865568e-03\n1.42419718905687692e-01\n1.97456060428055968e-01\n9.30693285337186177e-02\n-1.22724537584100221e-01\n-2.52621487800602729e-01\n-1.11628895234481273e-01\n2.15899102254289099e-01\n3.79947250378203094e-01\n2.08510869292145989e-01\n2.67741090926674578e-02\n4.63741172758918921e-02\n5.95487014969084891e-02\n6.89443320976489277e-02\n7.39087134895618503e-02\n7.24526191413019938e-02\n6.18569351032694920e-02\n3.94812335109347851e-02\n4.10627133441806430e-03\n-4.21689549000314121e-02\n-9.19056705433939913e-02\n-1.31292198558983053e-01\n-1.41908232330705181e-01\n-1.07153949674015980e-01\n-2.35759473675817739e-02\n8.68521304088828439e-02\n1.73233591218458355e-01\n1.73561066047275309e-01\n5.79209496479485761e-02\n-1.23682885753754759e-01\n-2.38752318103652855e-01\n-1.59082522839499113e-01\n9.89396309688408832e-02\n3.30815045426612664e-01\n3.27278380013623582e-01\n1.34549498436091819e-01\n0.0\n1.92553026817605965e-03\n7.45754666126418036e-03\n1.75778485047239988e-02\n3.27961269894396640e-02\n5.28609670319305502e-02\n7.62746902744935867e-02\n9.97351822893007001e-02\n1.17750156231691785e-01\n1.22843377964177061e-01\n1.06908134846465705e-01\n6.41832568422878447e-02\n-4.22657159286473835e-03\n-8.56001123265791447e-02\n-1.53689219748223804e-01\n-1.74008813407171309e-01\n-1.19470676790435743e-01\n6.46919734940593853e-03\n1.52445212663763152e-01\n2.29138733371659881e-01\n1.60326352917364523e-01\n-4.53620040167449778e-02\n-2.66464220812563046e-01\n-3.46718604504964334e-01\n-2.42811950123939219e-01\n-7.90677680665215210e-02\n2.91369302226869575e-02\n5.04666435222829723e-02\n6.48804501789535804e-02\n7.54816342738230811e-02\n8.19604575862672990e-02\n8.27067156041901702e-02\n7.53385896242480813e-02\n5.72695367508016390e-02\n2.66294470049095316e-02\n-1.63683492172946345e-02\n-6.77677935913121587e-02\n-1.18460320195926630e-01\n-1.54050251722881754e-01\n-1.57353856793646302e-01\n-1.14582405729985903e-01\n-2.47097668863171666e-02\n9.14814612511219705e-02\n1.89594045851228465e-01\n2.14744039037207346e-01\n1.31231361920666728e-01\n-4.40117064108037012e-02\n-2.31911527879693380e-01\n-3.30221298064421576e-01\n-2.88766714177509043e-01\n-1.57385662444183561e-01\n-4.21403769935432826e-02\n0.0\n1.83244531709042535e-03\n7.09703019592698714e-03\n1.67451169363971517e-02\n3.13458167438550317e-02\n5.08994108792873642e-02\n7.44918489856371546e-02\n9.98620533355003004e-02\n1.23013569946427342e-01\n1.38102555351555106e-01\n1.37937005972826709e-01\n1.15454487716860163e-01\n6.63891711715826199e-02\n-7.13931664113639456e-03\n-9.32319058059846162e-02\n-1.69137250703954606e-01\n-2.05145510804200237e-01\n-1.75061288926888742e-01\n-7.13850486846123872e-02\n8.20454801845989790e-02\n2.31068023311428478e-01\n3.13501013043464505e-01\n2.95980852630425617e-01\n2.00037981758227124e-01\n8.93849813129579396e-02\n2.02170071135444086e-02\n3.24537946805142294e-02\n5.62116212850592017e-02\n7.23554315345924653e-02\n8.46018263992847214e-02\n9.30753145445981089e-02\n9.66523671880395174e-02\n9.34448316931598411e-02\n8.11621955626371239e-02\n5.76462429316983299e-02\n2.16875770950987271e-02\n-2.58796849032302267e-02\n-8.09756525935111798e-02\n-1.35371173773592063e-01\n-1.76737819204431684e-01\n-1.90417681207495221e-01\n-1.63416419009863090e-01\n-9.02528932364598524e-02\n2.11769010996159419e-02\n1.47090787032029741e-01\n2.52346695410914312e-01\n3.03261310748388913e-01\n2.84484602459790070e-01\n2.09848866153310692e-01\n1.16827705780184837e-01\n4.42425309621534285e-02\n8.62764240587893770e-03\n0.0\n1.68265586849487099e-03\n6.51689815607881320e-03\n1.53926514072314276e-02\n2.89131283359426311e-02\n4.73094493437354532e-02\n7.02425940092437778e-02\n9.65303241902399911e-02\n1.23852096234924061e-01\n1.48525329404642359e-01\n1.65496907740664417e-01\n1.68733500604349246e-01\n1.52187233335147387e-01\n1.11410742683124175e-01\n4.56546193458447006e-02\n-4.00964467074071615e-02\n-1.34098904454705153e-01\n-2.18972686378081899e-01\n-2.75718111074198358e-01\n-2.90160761557503755e-01\n-2.59535478309835088e-01\n-1.95497071096424418e-01\n-1.20408225035203931e-01\n-5.72819264711282861e-02\n-1.88152197395648861e-02\n-3.21469577166983572e-03\n3.80696145832726054e-02\n6.59385066827932187e-02\n8.49849975123703749e-02\n9.98870948680369852e-02\n1.11369923265804846e-01\n1.18966274395121030e-01\n1.21516223455311434e-01\n1.17390987188869728e-01\n1.04724744272157139e-01\n8.17467294716234943e-02\n4.72494288343125943e-02\n1.17866539486764050e-03\n-5.47375283429395731e-02\n-1.16491289367289974e-01\n-1.77680523987387817e-01\n-2.30058311063816440e-01\n-2.64935372008091918e-01\n-2.75358361661381446e-01\n-2.58558266336513964e-01\n-2.17720415819154967e-01\n-1.61970242923731717e-01\n-1.03934116655382769e-01\n-5.54097103776787919e-02\n-2.30732353339541257e-02\n-6.68739335886202671e-03\n-1.01414792730299217e-03\n0.0\n1.40902355345902896e-03\n5.45712475696081504e-03\n1.29037627952354565e-02\n2.43244297226091165e-02\n4.01151913595737750e-02\n6.04379700849313681e-02\n8.51276955301884242e-02\n1.13576137835322680e-01\n1.44613700701483272e-01\n1.76422118719023108e-01\n2.06523734609954074e-01\n2.31901021434224086e-01\n2.49294743020443577e-01\n2.55700667513922508e-01\n2.49025997206887673e-01\n2.28781092023806698e-01\n1.96592571899810969e-01\n1.56277254616556671e-01\n1.13273086506897741e-01\n7.34240768358653539e-02\n4.14303262465285788e-02\n1.95596198550281875e-02\n7.25222072795964935e-03\n1.87955477152004910e-03\n2.55718835375908578e-04\n5.46516892274593671e-02\n9.46595024614243080e-02\n1.22165305255065262e-01\n1.44360578913904136e-01\n1.63158941359957066e-01\n1.79209482930194980e-01\n1.92610700984079064e-01\n2.03141491055955747e-01\n2.10373906855889747e-01\n2.13759566920906363e-01\n2.12722414544926686e-01\n2.06770334203257022e-01\n1.95625718414671024e-01\n1.79362896044864245e-01\n1.58527342224763584e-01\n1.34200327983990592e-01\n1.07968533806597280e-01\n8.17680700989312920e-02\n5.76015465111943958e-02\n3.71736579163028241e-02\n2.15414948538966075e-02\n1.09040525848132508e-02\n4.63167610230921616e-03\n1.54891377109978522e-03\n3.62803388423976010e-04\n4.46833039188022736e-05\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n2.90259753654005248e-02\n5.02744640721163177e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257495e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609829e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670521e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052453e-06\n-2.84442442190961185e-07\n0.0\n3.41202554315757182e-03\n1.32147181054835909e-02\n3.08808340161687150e-02\n5.59953701360444422e-02\n8.44404638849259731e-02\n1.06297954454244115e-01\n1.05492275401958283e-01\n6.48803301052857662e-02\n-1.95397564076791493e-02\n-1.17942924838582111e-01\n-1.58622610937650510e-01\n-6.90492778347753383e-02\n1.19332206147763131e-01\n2.00768997230941743e-01\n-1.40794793119894471e-02\n-2.59789642949030342e-01\n2.23307664223836265e-02\n3.23984679012354060e-01\n-3.67844013054067442e-01\n2.17340710940814114e-01\n-8.34695297879453624e-02\n2.23952028111379306e-02\n-4.30897062566842990e-03\n5.95275883078217791e-04\n-5.78518951802104478e-05\n3.76438326621829816e-06\n2.70566480765158587e-02\n4.68634891510361987e-02\n5.96602195598453580e-02\n6.66139703074651451e-02\n6.44452220606817061e-02\n4.79622399423123361e-02\n1.26454439623809312e-02\n-4.05297976456234915e-02\n-9.84833209919650787e-02\n-1.31952125543723792e-01\n-1.03504300480207700e-01\n2.34076256050359029e-03\n1.34523725174032188e-01\n1.67232288491373227e-01\n7.91120502382517028e-03\n-2.03212524443090292e-01\n-1.18624474518040771e-01\n2.32143202574165375e-01\n1.05955729766373685e-01\n-3.68916223963565326e-01\n3.28096907261319515e-01\n-1.69930465718100138e-01\n5.94172393781484537e-02\n-1.48003595814166240e-02\n2.67618459029961763e-03\n-3.50403116693724019e-04\n3.24801224606235245e-05\n0.0\n2.97819787474944402e-03\n1.15345107706149204e-02\n2.69982963259286224e-02\n4.92238526125978598e-02\n7.52100628289662509e-02\n9.74028127038636532e-02\n1.03024239322655711e-01\n7.69798937110531822e-02\n1.12731091668272550e-02\n-7.93322333688820797e-02\n-1.45452119836298993e-01\n-1.18717318587825263e-01\n2.33842051727451532e-02\n1.74870111864149719e-01\n1.33728957062687948e-01\n-1.26720259743269476e-01\n-2.16118685950772660e-01\n1.49650717775705655e-01\n2.18083190908157615e-01\n-3.80176180475430447e-01\n2.80220867036814092e-01\n-1.29389846552656396e-01\n4.15390028126803104e-02\n-9.65650161763285768e-03\n1.64691689428990754e-03\n-2.04933724393066471e-04\n2.53376473494465355e-02\n4.38860925535042926e-02\n5.59671679664136695e-02\n6.29577761470787034e-02\n6.22695858880302211e-02\n4.95652069513581664e-02\n2.06670033066091094e-02\n-2.48994151651980508e-02\n-7.87651603921932786e-02\n-1.19515490055603787e-01\n-1.15678171265025151e-01\n-4.39878991873227654e-02\n7.69036026618269142e-02\n1.62530323461255150e-01\n1.04167642450819317e-01\n-9.35922036864836465e-02\n-2.04125699102589042e-01\n4.58947755063562283e-03\n2.54609730767372533e-01\n-3.55834139849761782e-02\n-3.01220361913333956e-01\n3.65072935883795302e-01\n-2.30855366383081212e-01\n9.62635795480577816e-02\n-2.85738615810656946e-02\n6.22735758272838572e-03\n-1.00500904706331924e-03\n0.0\n2.62219233132614206e-03\n1.01557072297789493e-02\n2.38025905558891769e-02\n4.35905544675527223e-02\n6.73076605890208790e-02\n8.91251470580112087e-02\n9.88252652912760404e-02\n8.34206408076076239e-02\n3.34309789755629014e-02\n-4.55081310893383426e-02\n-1.20882133677711334e-01\n-1.36307502847950512e-01\n-4.85398240589961852e-02\n1.05207328474522049e-01\n1.77317031847300022e-01\n3.28617177306365221e-02\n-1.95465498799151816e-01\n-1.20427131305252455e-01\n2.30358633778961486e-01\n8.57752423197466335e-02\n-3.50883295803051443e-01\n3.32135052042606072e-01\n-1.84441720581663332e-01\n7.01641026982667559e-02\n-1.93702549664395221e-02\n3.97340159405804982e-03\n2.38242208465897533e-02\n4.12647609570350668e-02\n5.26997539585755126e-02\n5.96440948088237596e-02\n6.00424491992386997e-02\n5.02502502100592024e-02\n2.64813236183245974e-02\n-1.25445355526677318e-02\n-6.15981896053962238e-02\n-1.05079924536422772e-01\n-1.17420450804486001e-01\n-7.38767622328309892e-02\n2.53841947824112457e-02\n1.29563188736499552e-01\n1.44949497315725928e-01\n1.46400319720227275e-02\n-1.62198008532972920e-01\n-1.47060633869618901e-01\n1.16752188962604711e-01\n2.12081222164599015e-01\n-1.55188887871344050e-01\n-1.94754903529114370e-01\n3.68941067165522218e-01\n-2.89331395333823349e-01\n1.43499099826638166e-01\n-5.02128164456739079e-02\n1.29581102065204467e-02\n0.0\n2.32658736110178711e-03\n9.01083410304388301e-03\n2.11425109979948914e-02\n3.88609180107989186e-02\n6.05218499281448760e-02\n8.15750090070826023e-02\n9.37922374606045134e-02\n8.61189361068647602e-02\n4.88822273736432972e-02\n-1.76743789193549473e-02\n-9.30829673245796296e-02\n-1.33842515111100069e-01\n-9.28822928702839612e-02\n3.24152238776093948e-02\n1.54067063745178867e-01\n1.28819866301843805e-01\n-7.11591884278211378e-02\n-2.04666137132948095e-01\n-9.19471054527140337e-04\n2.49632780061383064e-01\n-4.92637054326064486e-02\n-2.78860877036648580e-01\n3.61134505103953896e-01\n-2.43126339460850299e-01\n1.09080349049724051e-01\n-3.53494746055409148e-02\n2.24925586783840045e-02\n3.89582544231853733e-02\n4.98136065528029803e-02\n5.66624042001894340e-02\n5.78649311134429301e-02\n5.03396734308079116e-02\n3.06890806634031107e-02\n-2.79000243799749133e-03\n-4.69709822777260033e-02\n-9.05226601597716174e-02\n-1.13035081296424950e-01\n-9.11798218917830861e-02\n-1.54066315452024739e-02\n8.74808203421586633e-02\n1.46834425517466283e-01\n8.80904613665269148e-02\n-7.48974585800611936e-02\n-1.80376175008269746e-01\n-5.18783404448030019e-02\n1.88773868670902123e-01\n1.19589026376769547e-01\n-2.29522009777939906e-01\n-6.58980360132677828e-02\n3.32989712213533573e-01\n-3.34928494733906068e-01\n1.98220248437462637e-01\n-8.12609832708973273e-02\n0.0\n2.08373119220142461e-03\n8.07025620536904430e-03\n1.89530497256455571e-02\n3.49430630662113662e-02\n5.48080965467997588e-02\n7.49500808356335924e-02\n8.86782215671743090e-02\n8.66008852941028695e-02\n5.94634884326370947e-02\n4.42626056791746263e-03\n-6.63629768579258039e-02\n-1.20622088032319372e-01\n-1.14935278493911178e-01\n-2.66774583800313964e-02\n1.02232443810648707e-01\n1.58007787573677588e-01\n4.59741444140183558e-02\n-1.48988099431656362e-01\n-1.56322545854119255e-01\n1.09930701952607152e-01\n2.07787799123987038e-01\n-1.61657159238019682e-01\n-1.72942080867634379e-01\n3.58639867315390215e-01\n-2.98229613873079225e-01\n1.57805389833642395e-01\n2.15153869106466944e-02\n3.72657432737424563e-02\n4.76977579629772261e-02\n5.44862890763266258e-02\n5.63084225210227982e-02\n5.05197566377339341e-02\n3.40582792392989872e-02\n5.00718846840906857e-03\n-3.49108559292288095e-02\n-7.74288221848670744e-02\n-1.06273289078215427e-01\n-1.00490425462706159e-01\n-4.58826850082876408e-02\n4.66306130417870890e-02\n1.27827584992299598e-01\n1.26080737240490737e-01\n9.30597656473908588e-03\n-1.40315534003313064e-01\n-1.47528629306459241e-01\n5.21898756001172928e-02\n2.06273559203999313e-01\n4.77331906785418737e-03\n-2.48242377521636914e-01\n6.17496021159004843e-02\n2.63451606526410365e-01\n-3.63442551664207858e-01\n2.59045878478520009e-01\n0.0\n1.92422882931142275e-03\n7.45250621021533496e-03\n1.75161904709067347e-02\n3.23788645815784593e-02\n5.10952437059598030e-02\n7.07304820734665635e-02\n8.56804662497224201e-02\n8.77861895347274435e-02\n6.82829062690264166e-02\n2.25158710667583729e-02\n-4.29685896762850086e-02\n-1.04506945547420849e-01\n-1.24276610141725211e-01\n-7.06981129472688818e-02\n4.53600767556479323e-02\n1.45672406085853440e-01\n1.21649689934835201e-01\n-4.56127613059066420e-02\n-1.84983286403472225e-01\n-7.21986459339204883e-02\n1.87577310948398690e-01\n1.27049298350105644e-01\n-2.35717742882395720e-01\n-6.07511175406608567e-02\n3.42496471270880287e-01\n-3.60653950120976396e-01\n2.16057243157074079e-02\n3.74222122491315451e-02\n4.79415959679599102e-02\n5.49728129364457641e-02\n5.74103862740211329e-02\n5.28817421636650215e-02\n3.85163061015539737e-02\n1.22194844203814146e-02\n-2.52575462935350249e-02\n-6.77521401139273560e-02\n-1.01923074325987920e-01\n-1.08815078714793886e-01\n-7.17332031006056164e-02\n9.01568174817138877e-03\n1.01216585045471305e-01\n1.42610268925065564e-01\n7.86363474851581173e-02\n-6.99040682093113458e-02\n-1.72344836309141380e-01\n-8.40903667873575261e-02\n1.38392800682163281e-01\n1.82836150383956036e-01\n-9.80106498977417750e-02\n-2.33320074541791933e-01\n1.60223922699145399e-01\n2.16619459936872732e-01\n-4.29830789744694519e-01\n0.0\n1.87729200172189001e-03\n7.27072065863726587e-03\n1.71018814555179213e-02\n3.16918917638234418e-02\n5.02982819483741433e-02\n7.04242434444063425e-02\n8.71643277142582495e-02\n9.31272666549284589e-02\n7.97795876661898939e-02\n4.10733988325778301e-02\n-2.05906351270727025e-02\n-8.82157563140710949e-02\n-1.29378493394093103e-01\n-1.08310101386275059e-01\n-1.40036632420879863e-02\n1.08793675558615785e-01\n1.61751850224321647e-01\n6.55843518203485937e-02\n-1.22478688429708799e-01\n-1.88434832558666387e-01\n9.62683518089936345e-03\n2.31795355246928320e-01\n6.00654472937052902e-02\n-2.84963028921374151e-01\n-1.99373890177737753e-02\n4.45109415623014371e-01\n2.27816098810018561e-02\n3.94589057921083744e-02\n5.05970887426763216e-02\n5.82385169509537920e-02\n6.14557791041535420e-02\n5.80570145540386384e-02\n4.52674885225277379e-02\n2.07904895942707391e-02\n-1.54448456547765442e-02\n-5.89919391840369595e-02\n-9.89364984609447939e-02\n-1.18183405856650894e-01\n-9.85426607232999657e-02\n-3.21056808072022262e-02\n6.41132123259595815e-02\n1.41246360104890334e-01\n1.36313253585141070e-01\n2.28662594719111177e-02\n-1.32336989417696504e-01\n-1.79502156177815481e-01\n-2.39914295730135479e-02\n1.94043081185522076e-01\n1.62187139351301940e-01\n-1.56119314654462077e-01\n-2.52560417793463277e-01\n1.80067259933181872e-01\n4.07567300794139276e-01\n0.0\n1.86364545540726413e-03\n7.21786781202747064e-03\n1.69909923956957573e-02\n3.15681055076745889e-02\n5.03991416240444218e-02\n7.13913427518216848e-02\n9.02864279850474072e-02\n1.00432779195026869e-01\n9.36172921365592686e-02\n6.27185863403851157e-02\n6.50712063018531444e-03\n-6.45020027532533097e-02\n-1.24724103188290802e-01\n-1.38693611851275156e-01\n-7.98850798620874547e-02\n4.02646808868830502e-02\n1.53576075112868943e-01\n1.60746824205628608e-01\n1.78203954118130899e-02\n-1.71174882925248045e-01\n-1.90381772612863293e-01\n4.57840057029461622e-02\n2.66456578830615520e-01\n9.06317563823871714e-02\n-3.22608049736571256e-01\n-3.35282447254812765e-01\n2.43102278899882673e-02\n4.21065498490376250e-02\n5.40442359465798314e-02\n6.24547424277647339e-02\n6.66183884937106008e-02\n6.45561911294135204e-02\n5.36325453223795781e-02\n3.14076472233194570e-02\n-2.94714058886409030e-03\n-4.66938708074412095e-02\n-9.15712257914000904e-02\n-1.23134040531118830e-01\n-1.23381614265693176e-01\n-7.84740705667126420e-02\n8.98108020214983052e-03\n1.08766316836034313e-01\n1.64918417205977885e-01\n1.23166302865287985e-01\n-1.83675360674821937e-02\n-1.70420260865196543e-01\n-1.87898432784324665e-01\n-6.52553134695893142e-03\n2.21048478437445794e-01\n2.07076136235470804e-01\n-1.14678741745082372e-01\n-3.80183169265239207e-01\n-2.50574833032238209e-01\n0.0\n1.83175337265339597e-03\n7.09435030664587116e-03\n1.67141575715616247e-02\n3.11384358570154438e-02\n5.00212206455119754e-02\n7.17124171040305347e-02\n9.26927018496932209e-02\n1.07242923079514468e-01\n1.07832819884379802e-01\n8.68420257194348483e-02\n4.00569676027476146e-02\n-2.83943764318643210e-02\n-1.01600078665761026e-01\n-1.49871184389886308e-01\n-1.40078172252883049e-01\n-5.62303776910819467e-02\n7.60282672552421296e-02\n1.81480169199967345e-01\n1.69314058154684255e-01\n1.14772403363841442e-02\n-1.88398291074199725e-01\n-2.34467923078736817e-01\n-2.47796135346990722e-02\n2.76044634156420887e-01\n3.60187513431354578e-01\n1.71109490480762960e-01\n2.61043265079395313e-02\n4.52140198091183151e-02\n5.80915910523028545e-02\n6.74122630612628143e-02\n7.27099463881341612e-02\n7.22790303098008041e-02\n6.37062239306114136e-02\n4.45180627417347957e-02\n1.32501628736553141e-02\n-2.90039438242477889e-02\n-7.68296878254726007e-02\n-1.19283324977885685e-01\n-1.40580937903800302e-01\n-1.24266540470803169e-01\n-6.16266479906019682e-02\n3.74954567786043372e-02\n1.37627997343764713e-01\n1.84113076291810868e-01\n1.30550512821116904e-01\n-1.90395605160832530e-02\n-1.82792879619784132e-01\n-2.30921714471563150e-01\n-8.59506691196592204e-02\n1.75026989025516805e-01\n3.46534769225025407e-01\n2.91076139879521856e-01\n1.06911664133421361e-01\n0.0\n1.77564372164165760e-03\n6.87703856271589843e-03\n1.62163312593727148e-02\n3.02969745256599053e-02\n4.89822736501974235e-02\n7.10932858341688373e-02\n9.39297252008500366e-02\n1.12896227404559082e-01\n1.21550426831765979e-01\n1.12508585270193390e-01\n7.96298594950862609e-02\n2.15689876583763165e-02\n-5.40374948858843712e-02\n-1.27783713572074409e-01\n-1.70383002206257489e-01\n-1.52432857501708541e-01\n-6.21245276130573468e-02\n7.60044856623943721e-02\n1.96244435511720522e-01\n2.16833136407072719e-01\n9.49355591298269713e-02\n-1.21560098344194623e-01\n-3.02208390726764031e-01\n-3.28326062573388533e-01\n-2.05400454195696663e-01\n-6.10049701116508816e-02\n2.83830953315770927e-02\n4.91609631903625333e-02\n6.32296733351436491e-02\n7.36933453676707623e-02\n8.03963935217341247e-02\n8.19770004182365924e-02\n7.63447883188871079e-02\n6.11399405426149220e-02\n3.44637927268972993e-02\n-4.02128917170194687e-03\n-5.17023498867095130e-02\n-1.01697089781152522e-01\n-1.42338177452832032e-01\n-1.58510835916724713e-01\n-1.35840613790414538e-01\n-6.78627922985626242e-02\n3.56729589163840843e-02\n1.43916892680873182e-01\n2.09770590481793640e-01\n1.88691836855862993e-01\n6.73288297147967146e-02\n-1.14632295525160549e-01\n-2.72658129775464941e-01\n-3.25297326936183018e-01\n-2.55355603613676152e-01\n-1.27672447941264172e-01\n-3.16389347296652940e-02\n0.0\n1.68776588283924326e-03\n6.53668915653344770e-03\n1.54278331927937429e-02\n2.89091493586744255e-02\n4.70488447425743417e-02\n6.91514169630680353e-02\n9.33923188110346858e-02\n1.16468900199898001e-01\n1.33441069713764071e-01\n1.38018548709173683e-01\n1.23594048627455946e-01\n8.52417380907891514e-02\n2.25980901432001197e-02\n-5.70438315259152590e-02\n-1.36877954043555655e-01\n-1.92026268994221566e-01\n-1.96073163339126749e-01\n-1.32575160315570678e-01\n-7.72806867614659297e-03\n1.43580911483088769e-01\n2.66690852197565720e-01\n3.12660875915297454e-01\n2.68307489875484584e-01\n1.67790617610361931e-01\n6.99141307040542781e-02\n1.47962106041308016e-02\n3.15911553412318857e-02\n5.47174861208145347e-02\n7.04541639068266279e-02\n8.24830920759260233e-02\n9.10417429169418091e-02\n9.52054534227503996e-02\n9.33397537388414578e-02\n8.34027948567860472e-02\n6.33703505810356560e-02\n3.18855162374505063e-02\n-1.08511215719041994e-02\n-6.20549666859063764e-02\n-1.15472651563485698e-01\n-1.61116420766065527e-01\n-1.86227643661751985e-01\n-1.77985018803721889e-01\n-1.27967057223824038e-01\n-3.73818869715278057e-02\n7.91730382729697035e-02\n1.94432928333994504e-01\n2.75869387896361062e-01\n2.98794672031080510e-01\n2.59427777376224356e-01\n1.79101104717928450e-01\n9.38037257572335720e-02\n3.34970084592976433e-02\n6.16402028027381033e-03\n0.0\n1.54813370004534346e-03\n5.99589603797808391e-03\n1.41649031871367240e-02\n2.66241543229897536e-02\n4.36265101733771046e-02\n6.49478681439423222e-02\n8.96601119623133269e-02\n1.15877619593578285e-01\n1.40546800909477299e-01\n1.59387309170277131e-01\n1.67128145303636233e-01\n1.58187498893889611e-01\n1.27887253250538846e-01\n7.41367275747801535e-02\n-7.45457493039487751e-04\n-8.87266076368041501e-02\n-1.76161556989466922e-01\n-2.46092195482165460e-01\n-2.82869087611611669e-01\n-2.77966123001841925e-01\n-2.34487853486814696e-01\n-1.67391332034525442e-01\n-9.79294518985427964e-02\n-4.42907156384509532e-02\n-1.38300845676462437e-02\n-2.24485148200666632e-03\n3.70338988778757677e-02\n6.41445944588488609e-02\n8.26875172176161216e-02\n9.72560028859470321e-02\n1.08633275774463980e-01\n1.16480978026437212e-01\n1.19820812079145439e-01\n1.17235374177454554e-01\n1.07058217389527394e-01\n8.76383576754252852e-02\n5.77148530746313740e-02\n1.68994020698666099e-02\n-3.37853247914394750e-02\n-9.14294229335160108e-02\n-1.51007382066383367e-01\n-2.05623283793635342e-01\n-2.47420488793174798e-01\n-2.69190391201290680e-01\n-2.66423369579319613e-01\n-2.39184940497469606e-01\n-1.92948519406402008e-01\n-1.37625082788451703e-01\n-8.46777055997934014e-02\n-4.32665100331202299e-02\n-1.72533142215022632e-02\n-4.78335681423480881e-03\n-6.92936331850796416e-04\n0.0\n1.29509744944545095e-03\n5.01589085341793382e-03\n1.18614110824599491e-02\n2.23654451053270469e-02\n3.69059322943521145e-02\n5.56623481326092573e-02\n7.85398935534328269e-02\n1.05072314841211448e-01\n1.34319397255684203e-01\n1.64783890512922387e-01\n1.94382756710260257e-01\n2.20515215084512800e-01\n2.40269185881982872e-01\n2.50791093504832197e-01\n2.49805320190252172e-01\n2.36208473717914424e-01\n2.10591723568315847e-01\n1.75490246034315317e-01\n1.35164809468283242e-01\n9.48264336874798108e-02\n5.94255153972954309e-02\n3.23765940042196540e-02\n1.47384147334890282e-02\n5.26128512811374714e-03\n1.31072683782135517e-03\n1.71124824142435025e-04\n5.31340612288112302e-02\n9.20308936607766581e-02\n1.18776944728336650e-01\n1.40375832772398845e-01\n1.58709757256197126e-01\n1.74442701142669410e-01\n1.87714630899398188e-01\n1.98364199142721215e-01\n2.06033565989065581e-01\n2.10243694622994526e-01\n2.10471349839651822e-01\n2.06240400837656018e-01\n1.97229733932778623e-01\n1.83390658334424861e-01\n1.65056562762653930e-01\n1.43017994510920232e-01\n1.18530724709386387e-01\n9.32276780544601530e-02\n6.89225023553667743e-02\n4.73241881167316206e-02\n2.97222912603400669e-02\n1.67352096145155123e-02\n8.21760200721967024e-03\n3.38042993180608098e-03\n1.09292614887835857e-03\n2.47054581239534174e-04\n2.93105300462584805e-05\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n3.41202554315749767e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241412e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.70566480764054471e-02\n4.68634891508449627e-02\n5.96602195596018930e-02\n6.66139703071932932e-02\n6.44452220604186526e-02\n4.79622399421164719e-02\n1.26454439623290733e-02\n-4.05297976454584569e-02\n-9.84833209915634972e-02\n-1.31952125543185250e-01\n-1.03504300479784553e-01\n2.34076256049542278e-03\n1.34523725173484071e-01\n1.67232288490689385e-01\n7.91120502378971253e-03\n-2.03212524442261067e-01\n-1.18624474517550871e-01\n2.32143202573217883e-01\n1.05955729765930540e-01\n-3.68916223962045653e-01\n3.28096907259970649e-01\n-1.69930465717402085e-01\n5.94172393779044822e-02\n-1.48003595813558653e-02\n2.67618459028863337e-03\n-3.50403116692285933e-04\n3.24801224604902354e-05\n-2.02575184274583893e-06\n0.0\n2.97819787378590228e-03\n1.15345107668831381e-02\n2.69982963171935438e-02\n4.92238525966702395e-02\n7.52100628046241670e-02\n9.74028126723223975e-02\n1.03024239289256928e-01\n7.69798936860228711e-02\n1.12731091630062195e-02\n-7.93322333433604809e-02\n-1.45452119789197670e-01\n-1.18717318549057801e-01\n2.33842051656752634e-02\n1.74870111807575945e-01\n1.33728957018526384e-01\n-1.26720259702885280e-01\n-2.16118685879405664e-01\n1.49650717728105842e-01\n2.18083190834292423e-01\n-3.80176180348934467e-01\n2.80220866943987179e-01\n-1.29389846509880752e-01\n4.15390027989631511e-02\n-9.65650161444623137e-03\n1.64691689374666197e-03\n-2.04933724325486225e-04\n1.81567597578413773e-05\n2.53376470027989395e-02\n4.38860919530930441e-02\n5.59671672006698123e-02\n6.29577752854502404e-02\n6.22695850351291311e-02\n4.95652062708680508e-02\n2.06670030193400016e-02\n-2.48994148312356792e-02\n-7.87651593214979961e-02\n-1.19515488422583804e-01\n-1.15678169672825057e-01\n-4.39878985618626650e-02\n7.69036016348739332e-02\n1.62530321234694880e-01\n1.04167640976138953e-01\n-9.35922024557466203e-02\n-2.04125696262437956e-01\n4.58947759724143839e-03\n2.54609727204786029e-01\n-3.55834136582822702e-02\n-3.01220357478946321e-01\n3.65072930619461666e-01\n-2.30855363077365067e-01\n9.62635781744364399e-02\n-2.85738611741635368e-02\n6.22735749416096756e-03\n-1.00500903278138770e-03\n1.19143394459784329e-04\n0.0\n2.62219142542411158e-03\n1.01557037212354710e-02\n2.38025823319113483e-02\n4.35905394019393683e-02\n6.73076373091593960e-02\n8.91251161847593787e-02\n9.88252309500485121e-02\n8.34206116030785233e-02\n3.34309668473455057e-02\n-4.55081159678077038e-02\n-1.20882092095999136e-01\n-1.36307454978870674e-01\n-4.85398055873891912e-02\n1.05207293340362815e-01\n1.77316969137390423e-01\n3.28617028068778905e-02\n-1.95465431190325278e-01\n-1.20427083457257764e-01\n2.30358553353229079e-01\n8.57752021132381359e-02\n-3.50883159649204246e-01\n3.32134926176143985e-01\n-1.84441651356677810e-01\n7.01640765001498579e-02\n-1.93702477564432311e-02\n3.97340011801682567e-03\n-6.08556067567250303e-04\n2.38240855630665778e-02\n4.12645266390994914e-02\n5.26994546620121532e-02\n5.96437558527113734e-02\n6.00421073424909357e-02\n5.02499626415972428e-02\n2.64811689384218986e-02\n-1.25444709680689482e-02\n-6.15978474661713557e-02\n-1.05079332364852632e-01\n-1.17419778841001243e-01\n-7.38763229155241230e-02\n2.53840794260991182e-02\n1.29562467617537230e-01\n1.44948645913675900e-01\n1.46398857643946483e-02\n-1.62197107084226827e-01\n-1.47059706536723872e-01\n1.16751604288797647e-01\n2.12079867861389687e-01\n-1.55188093238959463e-01\n-1.94753455832235522e-01\n3.68938602970246832e-01\n-2.89329513901123936e-01\n1.43498178211954042e-01\n-5.02124962187722526e-02\n1.29580279283087966e-02\n-2.51059934896624226e-03\n0.0\n2.32644312672607200e-03\n9.01027548570878731e-03\n2.11412000370481030e-02\n3.88585068614097501e-02\n6.05180892104909413e-02\n8.15699246621121865e-02\n9.37863563720242599e-02\n8.61134652619341689e-02\n4.88789868993902629e-02\n-1.76735325300880139e-02\n-9.30773551091996776e-02\n-1.33834082160680573e-01\n-9.28759931159273688e-02\n3.24138890589573611e-02\n1.54057569961011442e-01\n1.28810798977826851e-01\n-7.11559392549691999e-02\n-2.04652426386805114e-01\n-9.17071213237460338e-04\n2.49615482989694465e-01\n-4.92638368680020713e-02\n-2.78836920975275238e-01\n3.61106081333495144e-01\n-2.43107772393810539e-01\n1.09072145862150138e-01\n-3.53468403300384801e-02\n8.56415406304947453e-03\n2.24818249081356510e-02\n3.89396629877584513e-02\n4.97898278629621271e-02\n5.66353231207823576e-02\n5.78371799963389860e-02\n5.03153132324543270e-02\n3.06737726270845147e-02\n-2.78972796293560938e-03\n-4.69498783683695159e-02\n-9.04804934466222066e-02\n-1.12980920265283613e-01\n-9.11338472050517850e-02\n-1.53946814674877190e-02\n8.74432480942284734e-02\n1.46763393004358006e-01\n8.80398360212753944e-02\n-7.48712199158336478e-02\n-1.80285850819494470e-01\n-5.18342602036235486e-02\n1.88686667154779109e-01\n1.19499827373551248e-01\n-2.29410158812117904e-01\n-6.58116547786104372e-02\n3.32753363536771485e-01\n-3.34709327873316975e-01\n1.98094874753259542e-01\n-8.12105337974211444e-02\n2.45141518014091071e-02\n0.0\n2.07855520803512921e-03\n8.05020970489274922e-03\n1.89059538512801883e-02\n3.48561333139338902e-02\n5.46713813895594522e-02\n7.47621132848000497e-02\n8.84535072001181866e-02\n8.63767613321916594e-02\n5.93008065830294140e-02\n4.39577331477480297e-03\n-6.62148473205780158e-02\n-1.20322616296565113e-01\n-1.14620273261747563e-01\n-2.65575058695393836e-02\n1.02015556437573193e-01\n1.57578126598285073e-01\n4.57530697572872125e-02\n-1.48661052246096853e-01\n-1.55787574943353685e-01\n1.09789319905400085e-01\n2.07029826713409665e-01\n-1.61394124076073203e-01\n-1.71950621445226298e-01\n3.57120930168462469e-01\n-2.97064036037467394e-01\n1.57211839817377852e-01\n-5.93707524857388022e-02\n2.13128305741005220e-02\n3.69149054074494679e-02\n4.72484715038366740e-02\n5.39719293105106468e-02\n5.57736147650694306e-02\n5.00325280389422450e-02\n3.37145339009446016e-02\n4.92221077546877231e-03\n-3.46319180064506016e-02\n-7.67461705464020510e-02\n-1.05284265032121543e-01\n-9.94820993132090325e-02\n-4.52987362313749323e-02\n4.63788548470617026e-02\n1.26699843032516801e-01\n1.24701706841401749e-01\n8.81115637940035890e-03\n-1.39196615223164205e-01\n-1.45686208201771139e-01\n5.24050383910365375e-02\n2.03975673746256803e-01\n3.45726171849759312e-03\n-2.45138894534671747e-01\n6.29956226609903885e-02\n2.57397737377612956e-01\n-3.56762310815052441e-01\n2.54658000371534576e-01\n-1.22058931737328819e-01\n0.0\n1.87919683604596452e-03\n7.27809805025169017e-03\n1.71059987163818331e-02\n3.16189948742719718e-02\n4.98902291579285465e-02\n6.90460791027836113e-02\n8.36024451221169529e-02\n8.55810108187816387e-02\n6.64253810727277877e-02\n2.16271421551602373e-02\n-4.23321072978367005e-02\n-1.02221895785108347e-01\n-1.21049129401049047e-01\n-6.81570737448464053e-02\n4.53146439206709925e-02\n1.42402329378580023e-01\n1.17330903483457899e-01\n-4.65456117061827934e-02\n-1.80228748953733864e-01\n-6.69116913781858530e-02\n1.84156313285803536e-01\n1.18099005143468050e-01\n-2.30437010383507529e-01\n-4.78924661759650983e-02\n3.18479915484003173e-01\n-3.39626338588808474e-01\n2.13086359268880920e-01\n2.06219849491142207e-02\n3.57183256847865213e-02\n4.57565859669722269e-02\n5.24570383193711659e-02\n5.47534638535798340e-02\n5.03671730536632903e-02\n3.65477485105030891e-02\n1.13033152165486258e-02\n-2.46025994272241096e-02\n-6.51840928215077775e-02\n-9.75579855129123652e-02\n-1.03518763948309944e-01\n-6.72273692041399640e-02\n1.05272735677829059e-02\n9.81403269102475162e-02\n1.35595975716604311e-01\n7.16995469147754944e-02\n-7.07179748843198980e-02\n-1.64132361710295993e-01\n-7.34018616307238331e-02\n1.37390747135046676e-01\n1.66469723835442618e-01\n-1.05165138565701158e-01\n-2.08629172615168945e-01\n1.68831315127481313e-01\n1.61284878254159908e-01\n-3.61281698957373443e-01\n3.16282327103187599e-01\n0.0\n1.76764551618786023e-03\n6.84606164619379516e-03\n1.61017043289873422e-02\n2.98304570144999372e-02\n4.73149891406325768e-02\n6.61670312944239447e-02\n8.17098874890226506e-02\n8.69236158478098597e-02\n7.37646139560992342e-02\n3.66788749992896165e-02\n-2.16813401168411517e-02\n-8.46862038589761279e-02\n-1.21283584910650444e-01\n-9.81426459527597744e-02\n-6.93717391750540199e-03\n1.06847311954442165e-01\n1.49043184633392389e-01\n5.00975334986239126e-02\n-1.24253618843664732e-01\n-1.67673927381183085e-01\n3.15340691488963792e-02\n2.14409806590049490e-01\n1.63582563307340667e-02\n-2.58248535779132982e-01\n6.10044242301543554e-02\n2.83706279917640525e-01\n-4.01626111906381145e-01\n2.10603167790962831e-02\n3.64775386848900998e-02\n4.67668738661993766e-02\n5.37951140796735575e-02\n5.66673408494169986e-02\n5.33080605906006699e-02\n4.11107840244062731e-02\n1.79616891731581088e-02\n-1.60775996942725853e-02\n-5.65847029928400330e-02\n-9.29765329101977372e-02\n-1.08963931816796894e-01\n-8.77281295274864592e-02\n-2.30984117805824798e-02\n6.66176365971671014e-02\n1.33334005697507751e-01\n1.18811365412993752e-01\n5.21581011694588828e-03\n-1.33845709753225850e-01\n-1.55293477178320483e-01\n8.25622905454205698e-03\n1.90333273635016925e-01\n1.07030476434488736e-01\n-1.83988570770419607e-01\n-1.61829816765078738e-01\n2.40732743262596416e-01\n1.16693745406257543e-01\n-4.41724492961451387e-01\n0.0\n1.74318103655378073e-03\n6.75131112399737516e-03\n1.58896963361543110e-02\n2.95036548341401431e-02\n4.70366686263217829e-02\n6.64442267961563443e-02\n8.36039737490556489e-02\n9.21332650253605112e-02\n8.42741342472350663e-02\n5.35827357637109550e-02\n-3.21732582426488578e-04\n-6.61821225862805756e-02\n-1.18455211655458428e-01\n-1.23582246204747323e-01\n-5.97050943863947983e-02\n5.52151394670957613e-02\n1.49421643585359476e-01\n1.31359398337617617e-01\n-1.96093395721002491e-02\n-1.75719194789410560e-01\n-1.36339664707842978e-01\n1.07462297161073111e-01\n2.24117748557612212e-01\n-4.86328780712756217e-02\n-2.87267643860368072e-01\n8.58577841376994416e-02\n4.27765404441914188e-01\n2.22858482246312307e-02\n3.86002214148299522e-02\n4.95294058666156944e-02\n5.71686680824024171e-02\n6.07834863875310119e-02\n5.84592523202013062e-02\n4.76864744450214983e-02\n2.62163218652962660e-02\n-6.52101028396898357e-03\n-4.74868911734790261e-02\n-8.81889505533904883e-02\n-1.14297252217448644e-01\n-1.08757427223443170e-01\n-6.00516470323784329e-02\n2.54712295325280821e-02\n1.13917043227526119e-01\n1.49569167198867897e-01\n8.73804405168254889e-02\n-5.55602580771384913e-02\n-1.73489116507863667e-01\n-1.33885537344053840e-01\n6.89456487814673474e-02\n2.19769064904527078e-01\n7.59655442498426703e-02\n-2.26271539276788808e-01\n-1.85470992056666617e-01\n2.58662360919983791e-01\n3.70911504121975266e-01\n0.0\n1.72876248165195552e-03\n6.69546830098622855e-03\n1.57695688143625612e-02\n2.93493296184876191e-02\n4.70406441354200983e-02\n6.71444210758512933e-02\n8.61049528818153692e-02\n9.82297420394041970e-02\n9.61954897445902596e-02\n7.29690470955692283e-02\n2.55346421563310624e-02\n-4.01129720075295224e-02\n-1.05041387613645287e-01\n-1.38938154549886811e-01\n-1.12011528114350417e-01\n-1.76778777221328551e-02\n1.04855139850353538e-01\n1.72625679175033547e-01\n1.09495114733678525e-01\n-6.73730901801778692e-02\n-2.05647686844964372e-01\n-1.27213925575138498e-01\n1.35477533241784714e-01\n2.59100234890812631e-01\n-4.78607017475564649e-03\n-3.58546670605287610e-01\n-2.91820929184547828e-01\n2.37457227664601596e-02\n4.11287982939539942e-02\n5.28200873908315771e-02\n6.11867425883005842e-02\n6.56860746258609712e-02\n6.46032034105292752e-02\n5.55768768468058033e-02\n3.62871481556724801e-02\n5.59617547300178281e-03\n-3.48310857033945626e-02\n-7.87746823046115291e-02\n-1.14497160383178309e-01\n-1.26092045617446830e-01\n-9.87653433685301146e-02\n-2.83951293905175990e-02\n6.77018264036478024e-02\n1.46829110931688184e-01\n1.54703409600624592e-01\n6.17721406242795826e-02\n-9.36400543491166110e-02\n-1.97963544751898562e-01\n-1.34906415624842624e-01\n8.18880049048707898e-02\n2.48541508622885488e-01\n1.37192171650771799e-01\n-1.94760180372636094e-01\n-3.76705855155982261e-01\n-2.10022068438692755e-01\n0.0\n1.69606854160458693e-03\n6.56884521566086701e-03\n1.54829979455132129e-02\n2.88868259509472598e-02\n4.65570256789174797e-02\n6.71705288600302208e-02\n8.78124056484748949e-02\n1.03637217989821451e-01\n1.08055416546812444e-01\n9.39366688749329604e-02\n5.62509578700668283e-02\n-3.92395487239539584e-03\n-7.52022007967400735e-02\n-1.34246012493351941e-01\n-1.50602377789732372e-01\n-1.00879048323077813e-01\n1.02913281522665906e-02\n1.34757662596090955e-01\n1.91177803534772567e-01\n1.15004131982094498e-01\n-7.05387753747336588e-02\n-2.27289823377765571e-01\n-1.89345831045220570e-01\n6.16163922385660340e-02\n3.16255859912338011e-01\n3.31573507249821653e-01\n1.38744390161744779e-01\n2.54707043682761841e-02\n4.41165540704208936e-02\n5.67090548396897917e-02\n6.59386949513550147e-02\n7.14946395080316294e-02\n7.19133444536614319e-02\n6.50530419035248164e-02\n4.86187852247611588e-02\n2.10198225461342945e-02\n-1.73643337364710569e-02\n-6.26677893438121192e-02\n-1.06303371670150221e-01\n-1.34998649160646134e-01\n-1.33389276192748957e-01\n-9.01044058698251965e-02\n-6.68668283331185897e-03\n9.43405375570824101e-02\n1.69318149244083116e-01\n1.68822810231994747e-01\n6.94651075582347066e-02\n-9.26355583326124721e-02\n-2.17971708505464074e-01\n-1.97171022683751779e-01\n-6.51634896820912739e-03\n2.35944210872985144e-01\n3.46191285376197255e-01\n2.53588659166758101e-01\n8.41314356595346535e-02\n0.0\n1.64197563293230742e-03\n6.35934428122520920e-03\n1.50010015701279448e-02\n2.80592316414216905e-02\n4.54838308255052018e-02\n6.63474183950814173e-02\n8.84344560589187256e-02\n1.07890877343243999e-01\n1.19174709766593848e-01\n1.15649439525039782e-01\n9.11803256050535693e-02\n4.29000150441979713e-02\n-2.52376171080405352e-02\n-9.94358749361430039e-02\n-1.55951758837904519e-01\n-1.66713597539513647e-01\n-1.11996538398458939e-01\n2.85633334368431144e-03\n1.36109097271882612e-01\n2.17318025394645620e-01\n1.82117632722731099e-01\n2.22369998479150822e-02\n-1.86746049783284185e-01\n-3.20950771523696776e-01\n-3.02218622082562116e-01\n-1.71103096669815685e-01\n-4.66993161760211328e-02\n2.76725602802448643e-02\n4.79302803808965561e-02\n6.16702483604886359e-02\n7.19872589763320275e-02\n7.88531085013955968e-02\n8.11164198614599818e-02\n7.69409219846551307e-02\n6.41830392231684949e-02\n4.09762693456988195e-02\n6.61967978592168868e-03\n-3.72634447565469290e-02\n-8.55353808250070291e-02\n-1.28844143766775943e-01\n-1.54214417505405599e-01\n-1.47798136857061863e-01\n-1.00198288708399544e-01\n-1.35147821206689188e-02\n9.27438306277187097e-02\n1.81616181468549520e-01\n2.09122384467683720e-01\n1.45503454134703586e-01\n-1.12610064895740680e-03\n-1.75733835463301846e-01\n-2.97792234121004307e-01\n-3.09992730964825547e-01\n-2.21482799972243904e-01\n-1.02356202354372761e-01\n-2.36038149667448793e-02\n0.0\n1.55900110639207155e-03\n6.03798532177543014e-03\n1.42546389791996294e-02\n2.67340772934403711e-02\n4.35935884471182061e-02\n6.43081571683829512e-02\n8.74013746662864188e-02\n1.10135098522278638e-01\n1.28328641772597007e-01\n1.36505298292289912e-01\n1.28607872503413184e-01\n9.94891629485056689e-02\n4.71941619619424546e-02\n-2.43505214842764384e-02\n-1.03211932554656771e-01\n-1.69431191116213992e-01\n-1.98753385494855161e-01\n-1.70796099443660865e-01\n-7.99732567732787669e-02\n5.57451347094288299e-02\n1.95219960803493464e-01\n2.88476406449953482e-01\n3.01622185027882073e-01\n2.38168713805928134e-01\n1.38776972463386411e-01\n5.41876758705975708e-02\n1.07742261228311962e-02\n3.07798836798217207e-02\n5.33123223845113209e-02\n6.86633725691867397e-02\n8.04743198947867194e-02\n8.90745506230573164e-02\n9.37065166500393454e-02\n9.29534206778039190e-02\n8.49964628675468487e-02\n6.79564811917260508e-02\n4.04143236664496058e-02\n2.13603919101240615e-03\n-4.50583102972189758e-02\n-9.64721062423992554e-02\n-1.44102642677696485e-01\n-1.77080018345830842e-01\n-1.83443252445569194e-01\n-1.53441967553145681e-01\n-8.38998937396393113e-02\n1.77707145186607532e-02\n1.32159075452759178e-01\n2.31307941632953040e-01\n2.87676299221812648e-01\n2.85983600011100236e-01\n2.31859180358498174e-01\n1.50640043766626375e-01\n7.45297110370724547e-02\n2.51828145202734298e-02\n4.38666140177300292e-03\n0.0\n1.42860582604313439e-03\n5.53296657255994938e-03\n1.30735243845723700e-02\n2.45865108518920801e-02\n4.03373346692058876e-02\n6.01894037523151917e-02\n8.34146052096117335e-02\n1.08475758276367629e-01\n1.32833253825205944e-01\n1.52858485382984355e-01\n1.63965898634879120e-01\n1.61086890691586160e-01\n1.39577802937707440e-01\n9.65536699104088680e-02\n3.24540175578741652e-02\n-4.76016172656808373e-02\n-1.33336850920972805e-01\n-2.10432736483479044e-01\n-2.63616740149773099e-01\n-2.81308691911736519e-01\n-2.60307927183330345e-01\n-2.08189340920669208e-01\n-1.41378054928844032e-01\n-7.88055976359128968e-02\n-3.39756454339234029e-02\n-1.01111659473288318e-02\n-1.56306119354001401e-03\n3.60615230288546529e-02\n6.24603900842913631e-02\n8.05287186091349361e-02\n9.47750367921085246e-02\n1.06027468248315937e-01\n1.14054562119953296e-01\n1.18031468861329758e-01\n1.16723110980599343e-01\n1.08642648334038597e-01\n9.22643032751382236e-02\n6.63248116873874916e-02\n3.02185399738727316e-02\n-1.55457290414440924e-02\n-6.89076673260272665e-02\n-1.25974163072607059e-01\n-1.81071363237431615e-01\n-2.27302895190213683e-01\n-2.57700154361831080e-01\n-2.66858990325143708e-01\n-2.52684886931654640e-01\n-2.17614500823652551e-01\n-1.68616187740744328e-01\n-1.15569825749173002e-01\n-6.83194550606694428e-02\n-3.35212858668111693e-02\n-1.28253030254335074e-02\n-3.40784480843481230e-03\n-4.72525499382581301e-04\n0.0\n1.19401562918708664e-03\n4.62440264695295703e-03\n1.09364122235319858e-02\n2.06260174231903473e-02\n3.40527457143843804e-02\n5.14065482806012608e-02\n7.26456556622461364e-02\n9.74150578276601065e-02\n1.24957873757711252e-01\n1.54038389875328335e-01\n1.82903567738429224e-01\n2.09316590933071256e-01\n2.30697414314569055e-01\n2.44395952645894921e-01\n2.48098338632362359e-01\n2.40323583185233919e-01\n2.20912413617548625e-01\n1.91358928753982277e-01\n1.54817650586197286e-01\n1.15666099790794771e-01\n7.86336869634283175e-02\n4.76984109735681394e-02\n2.51238341920732161e-02\n1.10423265664582292e-02\n3.80056039655794287e-03\n9.11514826974609222e-04\n1.14384397750122058e-04\n5.17112379654159487e-02\n8.95664914783850796e-02\n1.15599750944352583e-01\n1.36637046918146016e-01\n1.54528452260936422e-01\n1.69947912906814352e-01\n1.83069060752270391e-01\n1.93780650202856813e-01\n2.01785020821283495e-01\n2.06664798761764912e-01\n2.07947697842419010e-01\n2.05181826952407165e-01\n1.98025112809426640e-01\n1.86345023157135969e-01\n1.70316875031152448e-01\n1.50501092663366198e-01\n1.27873984365257404e-01\n1.03786385916229879e-01\n7.98336378070258756e-02\n5.76409518292063036e-02\n3.85980580444039711e-02\n2.36072945470036759e-02\n1.29250513910634055e-02\n6.16203140634984450e-03\n2.45726522970044848e-03\n7.68911645028359444e-04\n1.67944492257229096e-04\n1.92193700943647954e-05\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n2.70566480764052875e-02\n4.68634891508446921e-02\n5.96602195596015461e-02\n6.66139703071929046e-02\n6.44452220604182779e-02\n4.79622399421161943e-02\n1.26454439623290005e-02\n-4.05297976454582209e-02\n-9.84833209915629282e-02\n-1.31952125543184501e-01\n-1.03504300479783956e-01\n2.34076256049540890e-03\n1.34523725173483294e-01\n1.67232288490688413e-01\n7.91120502378966570e-03\n-2.03212524442259873e-01\n-1.18624474517550191e-01\n2.32143202573216523e-01\n1.05955729765929915e-01\n-3.68916223962043488e-01\n3.28096907259968762e-01\n-1.69930465717401114e-01\n5.94172393779041352e-02\n-1.48003595813557803e-02\n2.67618459028861775e-03\n-3.50403116692283873e-04\n3.24801224604900457e-05\n-2.02575184274582707e-06\n7.63798078664119372e-08\n0.0\n2.97819787378240117e-03\n1.15345107668695778e-02\n2.69982963171618018e-02\n4.92238525966123691e-02\n7.52100628045357378e-02\n9.74028126722078502e-02\n1.03024239289135733e-01\n7.69798936859322352e-02\n1.12731091629927806e-02\n-7.93322333432673610e-02\n-1.45452119789026613e-01\n-1.18717318548917844e-01\n2.33842051656483023e-02\n1.74870111807370360e-01\n1.33728957018368205e-01\n-1.26720259702736981e-01\n-2.16118685879150035e-01\n1.49650717727930760e-01\n2.18083190834032520e-01\n-3.80176180348483772e-01\n2.80220866943655444e-01\n-1.29389846509727652e-01\n4.15390027989140237e-02\n-9.65650161443481168e-03\n1.64691689374471474e-03\n-2.04933724325243933e-04\n1.81567597578199101e-05\n-1.08729028832708228e-06\n2.53376470002513350e-02\n4.38860919486804626e-02\n5.59671671950423624e-02\n6.29577752791191242e-02\n6.22695850288649960e-02\n4.95652062658767864e-02\n2.06670030172474602e-02\n-2.48994148287536646e-02\n-7.87651593136006467e-02\n-1.19515488410573648e-01\n-1.15678169661163122e-01\n-4.39878985573636944e-02\n7.69036016272224843e-02\n1.62530321218343293e-01\n1.04167640965505723e-01\n-9.35922024464957564e-02\n-2.04125696241760468e-01\n4.58947759713090701e-03\n2.54609727178929768e-01\n-3.55834136552155220e-02\n-3.01220357447656351e-01\n3.65072930581890553e-01\n-2.30855363053680984e-01\n9.62635781645758970e-02\n-2.85738611712392891e-02\n6.22735749352401960e-03\n-1.00500903267863049e-03\n1.19143394447605310e-04\n-1.01091688837591613e-05\n0.0\n2.62219141342609008e-03\n1.01557036747673343e-02\n2.38025822229956142e-02\n4.35905392024453775e-02\n6.73076370010045888e-02\n8.91251157763920387e-02\n9.88252304964942346e-02\n8.34206112187361182e-02\n3.34309666904035532e-02\n-4.55081157637020478e-02\n-1.20882091544116221e-01\n-1.36307454349818502e-01\n-4.85398053535969140e-02\n1.05207292867251917e-01\n1.77316968316017426e-01\n3.28617026320533676e-02\n-1.95465430295178350e-01\n-1.20427082863503468e-01\n2.30358552292925844e-01\n8.57752016491865332e-02\n-3.50883157942175228e-01\n3.32134924580695934e-01\n-1.84441650475235169e-01\n7.01640761657582185e-02\n-1.93702476642801658e-02\n3.97340009913141681e-03\n-6.08556064676790080e-04\n6.88856522459394845e-05\n2.38240825599733003e-02\n4.12645214375893590e-02\n5.26994480185134923e-02\n5.96437483309951583e-02\n6.00420997624833488e-02\n5.02499562792763643e-02\n2.64811655459167711e-02\n-1.25444694708302801e-02\n-6.15978397980359652e-02\n-1.05079319176005798e-01\n-1.17419763973510588e-01\n-7.38763133522174348e-02\n2.53840765896260270e-02\n1.29562451467680473e-01\n1.44948627281465930e-01\n1.46398831237921131e-02\n-1.62197086876417096e-01\n-1.47059686830857295e-01\n1.16751590538308636e-01\n2.12079839230531447e-01\n-1.55188074712543339e-01\n-1.94753427053226541e-01\n3.68938551874436083e-01\n-2.89329474459594893e-01\n1.43498158792280783e-01\n-5.02124894514208858e-02\n1.29580261863570141e-02\n-2.51059901202486382e-03\n3.65863979474351740e-04\n0.0\n2.32643793460051958e-03\n9.01025537669299104e-03\n2.11411528489441683e-02\n3.88584200942543867e-02\n6.05179539589487531e-02\n8.15697420297307324e-02\n9.37861456278755862e-02\n8.61132702338925360e-02\n4.88788732947547447e-02\n-1.76734984355556950e-02\n-9.30771507501225309e-02\n-1.33833780501014604e-01\n-9.28757741606365400e-02\n3.24138311373644503e-02\n1.54057227148337028e-01\n1.28810488164244619e-01\n-7.11558049868482451e-02\n-2.04651947170753967e-01\n-9.17019801352729328e-04\n2.49614885932477576e-01\n-4.92637920672929774e-02\n-2.78836159435656039e-01\n3.61105148751309390e-01\n-2.43107156310941624e-01\n1.09071872083884275e-01\n-3.53467521072707361e-02\n8.56413276444970180e-03\n-1.57211521095946584e-03\n2.24812151936727780e-02\n3.89386069313306452e-02\n4.97884773047588963e-02\n5.66337857220583982e-02\n5.78356066459154994e-02\n5.03139368900304557e-02\n3.06729176231297918e-02\n-2.78968914709754609e-03\n-4.69486506985887439e-02\n-9.04780752900846835e-02\n-1.12977848029234051e-01\n-9.11312892026790722e-02\n-1.53941037018767990e-02\n8.74410205517448524e-02\n1.46759376195843283e-01\n8.80371477361057420e-02\n-7.48695152305226819e-02\n-1.80280804357822400e-01\n-5.18321865267592219e-02\n1.88681627170441207e-01\n1.19495481654060487e-01\n-2.29403809567423539e-01\n-6.58080552772614541e-02\n3.32741740945810327e-01\n-3.34698248984957591e-01\n1.98088461211686884e-01\n-8.12079359313152283e-02\n2.45133733703651012e-02\n-5.59766189413159979e-03\n0.0\n2.07808723277309567e-03\n8.04839724449645487e-03\n1.89016963609578217e-02\n3.48482783539040344e-02\n5.46590406488160901e-02\n7.47451814731588948e-02\n8.84333459553284795e-02\n8.63568143237862240e-02\n5.92866257790237022e-02\n4.39370708831289102e-03\n-6.62008550482258984e-02\n-1.20295515955810187e-01\n-1.14592814844477781e-01\n-2.65485626822400816e-02\n1.01994578125413016e-01\n1.57540511415816653e-01\n4.57368909133040250e-02\n-1.48629741544507948e-01\n-1.55744324210362217e-01\n1.09771386480008309e-01\n2.06969812006354947e-01\n-1.61364199209142634e-01\n-1.71882782043638188e-01\n3.57007489421858282e-01\n-2.96974674970970187e-01\n1.57165742729807850e-01\n-5.93535983659945962e-02\n1.67708394071872137e-02\n2.12840112195069077e-02\n3.68649888210519847e-02\n4.71845612788213548e-02\n5.38988267011645400e-02\n5.56977902008615605e-02\n4.99638667305794260e-02\n3.36669423301286241e-02\n4.91227932075261487e-03\n-3.45893827574048213e-02\n-7.66463656052454451e-02\n-1.05142817418406087e-01\n-9.93420868058138423e-02\n-4.52242733696983923e-02\n4.63322070884566867e-02\n1.26534640284753419e-01\n1.24515993065994146e-01\n8.76422463716939465e-03\n-1.39024495643395363e-01\n-1.45448924185204082e-01\n5.23930280691614486e-02\n2.03665653791634926e-01\n3.34777340412254799e-03\n-2.44735355782027791e-01\n6.30488975396976403e-02\n2.56764316789777014e-01\n-3.56016017252419381e-01\n2.54154762886789509e-01\n-1.21824726784242332e-01\n4.26665132450249826e-02\n0.0\n1.86883061321493817e-03\n7.23794984186405029e-03\n1.70116005963470672e-02\n3.14442874127693200e-02\n4.96137648301352430e-02\n6.86612517697723634e-02\n8.31313963707512316e-02\n8.50885227876377465e-02\n6.60239216291508835e-02\n2.14591991505232518e-02\n-4.21477453511913125e-02\n-1.01678350145933405e-01\n-1.20336635036007333e-01\n-6.76609557330574846e-02\n4.51987561618763523e-02\n1.41628782395336827e-01\n1.16481224546281237e-01\n-4.65485845329739745e-02\n-1.79157902986026352e-01\n-6.60662374583656370e-02\n1.83223747602888593e-01\n1.16666603031486987e-01\n-2.29094757149619910e-01\n-4.62995743529978077e-02\n3.14783886908380051e-01\n-3.36204214188263517e-01\n2.11065189944143972e-01\n-9.25545770775629273e-02\n2.02773452209003488e-02\n3.51213921652133651e-02\n4.49914501206906889e-02\n5.15777576589273382e-02\n5.38296585890163937e-02\n4.95036715373795427e-02\n3.58932278996178175e-02\n1.10413231840346890e-02\n-2.42916302261262998e-02\n-6.41984208321381977e-02\n-9.59807589795170918e-02\n-1.01715041005376719e-01\n-6.58483913148087685e-02\n1.07397216207814478e-02\n9.67980133201938320e-02\n1.33201541162110665e-01\n6.98089182506635847e-02\n-7.03148723970054151e-02\n-1.61245599851280424e-01\n-7.07750533764406192e-02\n1.36022700261514473e-01\n1.61957631202623659e-01\n-1.05437682560795234e-01\n-2.02143917075697788e-01\n1.68213162908436215e-01\n1.50852063775423845e-01\n-3.46593635999557559e-01\n3.04991518831814024e-01\n-1.71292973994237152e-01\n0.0\n1.70868981640486710e-03\n6.61772720277025925e-03\n1.55642840161203787e-02\n2.88324720798559010e-02\n4.57235341326920688e-02\n6.39179237990669252e-02\n7.88780660085477564e-02\n8.38007734352272243e-02\n7.09090839892766722e-02\n3.48771085749920509e-02\n-2.16146373872115813e-02\n-8.23080928443073317e-02\n-1.17041918352739194e-01\n-9.37192655479139741e-02\n-4.91142228247375308e-03\n1.04444102954999701e-01\n1.42957708839853426e-01\n4.50445518853008486e-02\n-1.22330553813772780e-01\n-1.58853656928827525e-01\n3.64888961396735295e-02\n2.04983111047250727e-01\n5.32216195910772353e-03\n-2.44113623481304359e-01\n7.51595960849906208e-02\n2.43112719992275989e-01\n-3.59202508044786761e-01\n2.70452336650140734e-01\n1.98994776693559791e-02\n3.44669063674068604e-02\n4.41862909629818917e-02\n5.08133461234579475e-02\n5.34880310691096331e-02\n5.02303933971204944e-02\n3.85620285307843105e-02\n1.64901590370900158e-02\n-1.58762445645591992e-02\n-5.42361887447112209e-02\n-8.83991861717687150e-02\n-1.02792848094727288e-01\n-8.15434858598236417e-02\n-1.92920639355315358e-02\n6.56481886627315186e-02\n1.26769439377722559e-01\n1.09212186701832539e-01\n-1.10097997598962633e-03\n-1.30129557906830451e-01\n-1.41742936652091950e-01\n1.89365744965486818e-02\n1.81515338036098456e-01\n8.41655747974319884e-02\n-1.83134103265027159e-01\n-1.24413596838252885e-01\n2.36425115072359943e-01\n4.35654264902073304e-02\n-3.28607292673035178e-01\n3.65546971615839600e-01\n0.0\n1.63637721975844154e-03\n6.33766172023763827e-03\n1.49147149597040792e-02\n2.76846484573376600e-02\n4.41051521328830465e-02\n6.22158851587772954e-02\n7.80817261502404075e-02\n8.56370827963496700e-02\n7.75691588382888264e-02\n4.79427910238077737e-02\n-3.22099165704221261e-03\n-6.46776412265437917e-02\n-1.11723742793077341e-01\n-1.12793012334537701e-01\n-4.89511986766192272e-02\n5.94196732886743822e-02\n1.41567621790810866e-01\n1.13258073920252972e-01\n-3.42320906606088590e-02\n-1.68102056171302944e-01\n-1.06021738031824991e-01\n1.23999585131603432e-01\n1.87884966505500600e-01\n-9.30679016097813866e-02\n-2.29974136282755676e-01\n1.66166242065003827e-01\n2.01000891550737554e-01\n-4.26969301876926999e-01\n2.05939264129683698e-02\n3.56697268745959015e-02\n4.57614853513188813e-02\n5.27829671032318051e-02\n5.60155841759839151e-02\n5.36369290034241636e-02\n4.32798236042057430e-02\n2.28639717024471389e-02\n-8.02717262494862319e-03\n-4.62909082290624829e-02\n-8.35801997632912158e-02\n-1.06088168956061893e-01\n-9.78338536387561991e-02\n-4.89505986469020576e-02\n3.24075752349786209e-02\n1.11635262739430252e-01\n1.35453539027956510e-01\n6.59536236930137465e-02\n-7.01007001353543546e-02\n-1.63826862068785661e-01\n-9.87028938834433878e-02\n9.73192694471044228e-02\n1.94749103232017634e-01\n8.54839957500430452e-03\n-2.28394192558136561e-01\n-6.37708946497139162e-02\n2.82481298748287202e-01\n1.11792612346128459e-02\n-4.37343252957096418e-01\n0.0\n1.62330457155649213e-03\n6.28703157146066026e-03\n1.48047395128042530e-02\n2.75363051168852763e-02\n4.40717648003449286e-02\n6.27323307859432716e-02\n8.00428912195477876e-02\n9.04911474783273856e-02\n8.70913886648811281e-02\n6.33712059454385468e-02\n1.71227460483879164e-02\n-4.47419437859739449e-02\n-1.02751261085899728e-01\n-1.27400770863835361e-01\n-9.22418643917997383e-02\n3.15727940895076326e-03\n1.13306491298907186e-01\n1.55798766926426663e-01\n6.98157486582185738e-02\n-9.99476014003935487e-02\n-1.87539429424850329e-01\n-5.44096188353879809e-02\n1.80442671721568970e-01\n1.73714003158125463e-01\n-1.45482567926984135e-01\n-2.52235582055974850e-01\n1.79107022712951897e-01\n3.99491985619599255e-01\n2.18111786246425882e-02\n3.77780695508412312e-02\n4.85029858940261432e-02\n5.61197164995655071e-02\n6.00574680712129619e-02\n5.86424576839743306e-02\n4.96087945437860764e-02\n3.07946756203318975e-02\n1.29836183088728827e-03\n-3.69022890234234902e-02\n-7.72640663329182270e-02\n-1.07925423495262560e-01\n-1.13476316906432589e-01\n-8.08174823204100695e-02\n-9.08132025380379779e-03\n8.02848302234418221e-02\n1.42302604029011098e-01\n1.26984917147282994e-01\n1.92819562201320197e-02\n-1.22287171743647227e-01\n-1.77128449122081311e-01\n-6.03764441242204616e-02\n1.46497528877249011e-01\n2.03331663609186919e-01\n-2.08431871652290622e-02\n-2.61396579172909038e-01\n-1.00459023038448281e-01\n3.15804730653442223e-01\n3.30316348764071399e-01\n0.0\n1.60714784717524181e-03\n6.22445684700281398e-03\n1.46669480522360098e-02\n2.73381158649202809e-02\n4.39658585045948624e-02\n6.31686873924885428e-02\n8.19696948126849428e-02\n9.54951288062701464e-02\n9.72577672857836417e-02\n8.05391720201607958e-02\n4.12664400713622301e-02\n-1.78284818390222650e-02\n-8.32554373590792401e-02\n-1.30202409023382676e-01\n-1.29499584808594914e-01\n-6.42438452565518153e-02\n4.88995676760611148e-02\n1.49731741446698180e-01\n1.57975172712481626e-01\n3.71723977210086237e-02\n-1.38964259617896407e-01\n-2.02433177986176521e-01\n-4.41178450887931770e-02\n2.02639906643721363e-01\n2.19933620588836337e-01\n-9.60837214221834796e-02\n-3.74216155110975002e-01\n-2.49795334476526965e-01\n2.32074894215665642e-02\n4.01965507942705427e-02\n5.16490661223961006e-02\n5.99550136481734330e-02\n6.47209131116810443e-02\n6.44596297535707519e-02\n5.70569685648213767e-02\n4.03323356576079858e-02\n1.29633103334647563e-02\n-2.41713937060266289e-02\n-6.64520160739811711e-02\n-1.04434312849596478e-01\n-1.24374019532257324e-01\n-1.11738856597190697e-01\n-5.84324483635513398e-02\n2.77431411029431460e-02\n1.16571956276758468e-01\n1.60376989074866694e-01\n1.17454259879130649e-01\n-1.05114558025887813e-02\n-1.52321083430005388e-01\n-1.91969678961316836e-01\n-6.13359162633540303e-02\n1.56492987212590862e-01\n2.43681289755001917e-01\n5.53665122139788621e-02\n-2.57613781216580073e-01\n-3.60042438945927246e-01\n-1.73726020126317243e-01\n0.0\n1.57429408533101911e-03\n6.09721477451987542e-03\n1.43769364240825051e-02\n2.68571602401737053e-02\n4.34091136452301324e-02\n6.29714239219751754e-02\n8.31224606664092563e-02\n9.97503349274164453e-02\n1.07106982517929536e-01\n9.86397746639129380e-02\n6.89780275500694040e-02\n1.71455371620388465e-02\n-4.96878896320129063e-02\n-1.13793667637718754e-01\n-1.48826824505704197e-01\n-1.29044951486350951e-01\n-4.57609194171838263e-02\n7.56399939530136983e-02\n1.72574218730280421e-01\n1.71649714937409936e-01\n4.44167174685962882e-02\n-1.41507760099444990e-01\n-2.37107941651059528e-01\n-1.25265771101296219e-01\n1.40172096897157872e-01\n3.37779866701735487e-01\n2.97904385850549736e-01\n1.11306542909210521e-01\n2.48706068431925019e-02\n4.30771546674796196e-02\n5.53963346482454974e-02\n6.45233728209118201e-02\n7.02773630312573394e-02\n7.14020201845270430e-02\n6.59958425444920199e-02\n5.19432689451825580e-02\n2.76068993886377685e-02\n-7.13519099263579086e-03\n-4.95967114336897594e-02\n-9.31011941422863337e-02\n-1.26638160675998035e-01\n-1.36378901201305663e-01\n-1.09974326856966273e-01\n-4.36181597231068904e-02\n5.02100255126199033e-02\n1.39166838079132910e-01\n1.78113091836636372e-01\n1.30666566776621029e-01\n-4.16109441565485575e-04\n-1.53698103558640276e-01\n-2.27157207635001052e-01\n-1.43760699458464342e-01\n7.14179596691004309e-02\n2.79977928774174822e-01\n3.33390067776024535e-01\n2.17042475170014237e-01\n6.56292863784367214e-02\n0.0\n1.52231953260409674e-03\n5.89591819738192503e-03\n1.39121917448118328e-02\n2.60490858194600029e-02\n4.23215408278010893e-02\n6.20017673211325643e-02\n8.32665268392768082e-02\n1.02875245075446625e-01\n1.16062846370921680e-01\n1.16915708936385490e-01\n9.95327315644593813e-02\n6.01643299749108351e-02\n1.60725947999359098e-04\n-7.11111476181062463e-02\n-1.35081220168488586e-01\n-1.66801403557934463e-01\n-1.43525276897487591e-01\n-5.82250598300768640e-02\n6.74059857057559692e-02\n1.80530991874682051e-01\n2.15199623945995427e-01\n1.30518779988965217e-01\n-5.07637893185833994e-02\n-2.38012076561628066e-01\n-3.24971666228740241e-01\n-2.71677651274872312e-01\n-1.40618201160385065e-01\n-3.54935500260824544e-02\n2.70016392529860046e-02\n4.67682110738179072e-02\n6.01949382797544452e-02\n7.03595675838610962e-02\n7.73395105305906133e-02\n8.01623733316834258e-02\n7.72134207603991513e-02\n6.65509060853120421e-02\n4.63775075327885478e-02\n1.57613123575826436e-02\n-2.43997884877206923e-02\n-7.03266972094072074e-02\n-1.14592431450215748e-01\n-1.46244949078272013e-01\n-1.52543205656476999e-01\n-1.22815147490569279e-01\n-5.41589764848230612e-02\n4.27145424023150297e-02\n1.40845673174329444e-01\n2.01670526862067545e-01\n1.89185940175310791e-01\n9.04364092881892456e-02\n-6.83516285763441228e-02\n-2.24605777091469394e-01\n-3.08731916733222811e-01\n-2.87477278978366391e-01\n-1.88902658459998679e-01\n-8.12011062033557995e-02\n-1.75073075840793922e-02\n0.0\n1.44394109877137673e-03\n5.59235982844598096e-03\n1.32056840622319493e-02\n2.47855286847814792e-02\n4.04842318183561214e-02\n5.99104020042268634e-02\n8.18667728244624610e-02\n1.04076137759028589e-01\n1.22994797581649579e-01\n1.33866557801387842e-01\n1.31211455936528915e-01\n1.09932753033745584e-01\n6.71090290544668344e-02\n4.26509801322577740e-03\n-7.05172419201126610e-02\n-1.41770700629324370e-01\n-1.88473268804231125e-01\n-1.89515610004809876e-01\n-1.32349660261848939e-01\n-2.19842015690421173e-02\n1.14793967695335411e-01\n2.35233468979446247e-01\n2.97676398394679909e-01\n2.83131231295436214e-01\n2.07610207844039163e-01\n1.13355833617774376e-01\n4.16539765780894675e-02\n7.80919237000905937e-03\n3.00153667587546996e-02\n5.19881402339771106e-02\n6.69735571820709169e-02\n7.85681238308767321e-02\n8.71761477843450705e-02\n9.21811221259125901e-02\n9.23534608747490077e-02\n8.60732577346966510e-02\n7.16080402229339191e-02\n4.75323778418751258e-02\n1.33203205465301979e-02\n-2.99228611268615094e-02\n-7.87187518221349608e-02\n-1.26714963370035821e-01\n-1.64791208510945364e-01\n-1.82173844165339716e-01\n-1.68816499810902354e-01\n-1.18889486152790352e-01\n-3.45361388576393494e-02\n7.16975830738245251e-02\n1.77708734083548675e-01\n2.57253569778828239e-01\n2.89215491649596423e-01\n2.67151943825255811e-01\n2.03614187242443179e-01\n1.25063766438365059e-01\n5.86574731664796650e-02\n1.88109531052934598e-02\n3.11055934850720285e-03\n0.0\n1.32196028178625195e-03\n5.11993015570581713e-03\n1.20994007764301664e-02\n2.27655404454686558e-02\n3.73897227067614968e-02\n5.59021101534062301e-02\n7.77328500971089936e-02\n1.01625339005313356e-01\n1.25461184116904184e-01\n1.46160106322300282e-01\n1.59742304459311174e-01\n1.61654242054804276e-01\n1.47443925573419066e-01\n1.13807748631764710e-01\n5.99026518801960214e-02\n-1.13689340187323844e-02\n-9.25900542526273962e-02\n-1.72168288398032027e-01\n-2.36244276685540905e-01\n-2.72151356064368966e-01\n-2.72610737737989217e-01\n-2.39030218550343454e-01\n-1.82003608888682250e-01\n-1.17949184307003047e-01\n-6.28091075721710912e-02\n-2.58754863656338319e-02\n-7.35589974638372647e-03\n-1.08543211501483674e-03\n3.51466168210390686e-02\n6.08757260481945991e-02\n7.84960281508688407e-02\n9.24319350619778324e-02\n1.03545958636906466e-01\n1.11695715170780363e-01\n1.16186521810197355e-01\n1.15940802829200190e-01\n1.09632412774171253e-01\n9.58596569515610397e-02\n7.33893976200932219e-02\n4.14812614604050597e-02\n2.73297166809756582e-04\n-4.88267812255792355e-02\n-1.02844254881819391e-01\n-1.57171412153248924e-01\n-2.05880957766765765e-01\n-2.42522368002167282e-01\n-2.61382735913870679e-01\n-2.58997104356691710e-01\n-2.35473411376482200e-01\n-1.95062916089970617e-01\n-1.45497136348590850e-01\n-9.60141663651358085e-02\n-5.46321385357338776e-02\n-2.57854964231142916e-02\n-9.48206833618980491e-03\n-2.41899845015907571e-03\n-3.21634056740028912e-04\n0.0\n1.10394789143487566e-03\n4.27557179860806654e-03\n1.01120762807560376e-02\n1.90751144522267636e-02\n3.15060074800478165e-02\n4.76000903411583562e-02\n6.73555881099998505e-02\n9.05050341550993620e-02\n1.16438737193417616e-01\n1.44134672782869094e-01\n1.72115507562451170e-01\n1.98459305035499078e-01\n2.20892906224045255e-01\n2.36992132358923246e-01\n2.44496716993856278e-01\n2.41717778998317978e-01\n2.27973756183218107e-01\n2.03946738383189774e-01\n1.71823830426257179e-01\n1.35102084154086421e-01\n9.80104303817633388e-02\n6.46357638221726899e-02\n3.79926795184034258e-02\n1.93691503532659841e-02\n8.22953450648513524e-03\n2.73450301608686936e-03\n6.32266756782644940e-04\n7.63766741442415716e-05\n5.03742354711097934e-02\n8.72507352284005028e-02\n1.12613788971131515e-01\n1.33121362064097026e-01\n1.50591162359871855e-01\n1.65703229596085772e-01\n1.78658538790185284e-01\n1.89387966523381662e-01\n1.97645567797913341e-01\n2.03068551592591962e-01\n2.05232570248763568e-01\n2.03714385766656791e-01\n1.98166255340802372e-01\n1.88400406446614377e-01\n1.74475774023859082e-01\n1.56772732943588816e-01\n1.36036174391555631e-01\n1.13365309917881629e-01\n9.01329349262580404e-02\n6.78297887974326358e-02\n4.78508950664035745e-02\n3.12658009851224869e-02\n1.86339284303023642e-02\n9.92752790826271526e-03\n4.59903146087753227e-03\n1.77949135422572819e-03\n5.39475669745039139e-04\n1.13983669586568140e-04\n1.25980593220233969e-05\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n2.97819787378239640e-03\n1.15345107668695605e-02\n2.69982963171617601e-02\n4.92238525966122928e-02\n7.52100628045356129e-02\n9.74028126722076976e-02\n1.03024239289135566e-01\n7.69798936859321103e-02\n1.12731091629927633e-02\n-7.93322333432672500e-02\n-1.45452119789026391e-01\n-1.18717318548917664e-01\n2.33842051656482641e-02\n1.74870111807370082e-01\n1.33728957018368011e-01\n-1.26720259702736759e-01\n-2.16118685879149702e-01\n1.49650717727930538e-01\n2.18083190834032159e-01\n-3.80176180348483217e-01\n2.80220866943655000e-01\n-1.29389846509727457e-01\n4.15390027989139543e-02\n-9.65650161443479607e-03\n1.64691689374471214e-03\n-2.04933724325243608e-04\n1.81567597578198830e-05\n-1.08729028832708058e-06\n3.95071822269082113e-08\n2.53376470002427898e-02\n4.38860919486656620e-02\n5.59671671950234817e-02\n6.29577752790978912e-02\n6.22695850288439851e-02\n4.95652062658600637e-02\n2.06670030172404762e-02\n-2.48994148287452893e-02\n-7.87651593135740985e-02\n-1.19515488410533346e-01\n-1.15678169661124083e-01\n-4.39878985573487757e-02\n7.69036016271966300e-02\n1.62530321218288476e-01\n1.04167640965470432e-01\n-9.35922024464643509e-02\n-2.04125696241691468e-01\n4.58947759712970832e-03\n2.54609727178843614e-01\n-3.55834136552040242e-02\n-3.01220357447553710e-01\n3.65072930581766542e-01\n-2.30855363053602658e-01\n9.62635781645432426e-02\n-2.85738611712295990e-02\n6.22735749352190931e-03\n-1.00500903267828983e-03\n1.19143394447564924e-04\n-1.01091688837557359e-05\n5.82169454590600455e-07\n0.0\n2.62219141334495663e-03\n1.01557036744531065e-02\n2.38025822222591235e-02\n4.35905392010965190e-02\n6.73076369989214773e-02\n8.91251157736327182e-02\n9.88252304934323922e-02\n8.34206112161471336e-02\n3.34309666893573346e-02\n-4.55081157623062268e-02\n-1.20882091540379613e-01\n-1.36307454345585027e-01\n-4.85398053520602543e-02\n1.05207292864021223e-01\n1.77316968310501089e-01\n3.28617026309639057e-02\n-1.95465430289127856e-01\n-1.20427082859650425e-01\n2.30358552285779006e-01\n8.57752016463209505e-02\n-3.50883157931017819e-01\n3.32134924570194889e-01\n-1.84441650469417157e-01\n7.01640761635476951e-02\n-1.93702476636703549e-02\n3.97340009900638488e-03\n-6.08556064657646430e-04\n6.88856522437729369e-05\n-5.60751591119793710e-06\n2.38240825237338097e-02\n4.12645213748207215e-02\n5.26994479383471742e-02\n5.96437482402475475e-02\n6.00420996710787705e-02\n5.02499562026617955e-02\n2.64811655052914728e-02\n-1.25444694522790258e-02\n-6.15978397049462417e-02\n-1.05079319016523370e-01\n-1.17419763794478632e-01\n-7.38763132382556087e-02\n2.53840765533050530e-02\n1.29562451271738488e-01\n1.44948627058690466e-01\n1.46398830965096104e-02\n-1.62197086631160337e-01\n-1.47059686599774753e-01\n1.16751590366735256e-01\n2.12079838895946587e-01\n-1.55188074482817462e-01\n-1.94753426730587931e-01\n3.68938551284517247e-01\n-2.89329474000882603e-01\n1.43498158565659062e-01\n-5.02124893722960680e-02\n1.29580261659655444e-02\n-2.51059900807753308e-03\n3.65863978899450665e-04\n-3.96241972769333743e-05\n0.0\n2.32643782990374489e-03\n9.01025497120412633e-03\n2.11411518974650298e-02\n3.88584183450071050e-02\n6.05179512332812836e-02\n8.15697383520691266e-02\n9.37861413906397601e-02\n8.61132663256831132e-02\n4.88788710428604764e-02\n-1.76734977019185960e-02\n-9.30771466000541170e-02\n-1.33833774443365305e-01\n-9.28757698458223813e-02\n3.24138298446237302e-02\n1.54057220225395197e-01\n1.28810482097165530e-01\n-7.11558020649164930e-02\n-2.04651937697753861e-01\n-9.17019196842371650e-04\n2.49614874231878919e-01\n-4.92637905799715933e-02\n-2.78836145307059691e-01\n3.61105131058387097e-01\n-2.43107144532181269e-01\n1.09071866828974462e-01\n-3.53467504099716362e-02\n8.56413235408103220e-03\n-1.57211513573320160e-03\n2.18501632797911090e-04\n2.24811955803285585e-02\n3.89385729600219554e-02\n4.97884338629596274e-02\n5.66337362850327028e-02\n5.78355560949765368e-02\n5.03138927651229431e-02\n3.06728904127505052e-02\n-2.78968743047776878e-03\n-4.69486106262065120e-02\n-9.04779970457315202e-02\n-1.12977749298386373e-01\n-9.11312080070654090e-02\n-1.53940871521744960e-02\n8.74409470475896594e-02\n1.46759247409016885e-01\n8.80370650624396484e-02\n-7.48694561863602059e-02\n-1.80280643906538834e-01\n-5.18321283792773160e-02\n1.88681463777409936e-01\n1.19495356093898580e-01\n-2.29403606395617438e-01\n-6.58079637454301314e-02\n3.32741401299756601e-01\n-3.34697918833944175e-01\n1.98088268512558813e-01\n-8.12078575246351214e-02\n2.45133498111735244e-02\n-5.59765653042696744e-03\n9.76291489848449788e-04\n0.0\n2.07806355386595419e-03\n8.04830553648343966e-03\n1.89014809553985294e-02\n3.48478810435288722e-02\n5.46584168336244902e-02\n7.47443266556694214e-02\n8.84323305524754300e-02\n8.63558146306473567e-02\n5.92859242082582130e-02\n4.39362331801078192e-03\n-6.62001292294176341e-02\n-1.20294144527396923e-01\n-1.14591456913023901e-01\n-2.65481674094364024e-02\n1.01993477067221366e-01\n1.57538647682683858e-01\n4.57361863167678462e-02\n-1.48628111145200359e-01\n-1.55742292293585605e-01\n1.09770338227204320e-01\n2.06967033863477201e-01\n-1.61362537657220695e-01\n-1.71879948724601439e-01\n3.57002419499171164e-01\n-2.96970606599144538e-01\n1.57163625323691464e-01\n-5.93528063365336631e-02\n1.67706169587043576e-02\n-3.62151819877249434e-03\n2.12817544335585813e-02\n3.68610799531276789e-02\n4.71795571978203335e-02\n5.38931057362477262e-02\n5.56918644504339755e-02\n4.99585194927591944e-02\n3.36632742174493432e-02\n4.91159773434797844e-03\n-3.45859255347295419e-02\n-7.66384323396614026e-02\n-1.05131711536375516e-01\n-9.93312805984078312e-02\n-4.52188283827554410e-02\n4.63280779341347024e-02\n1.26521509991900455e-01\n1.24501937130029175e-01\n8.76158561138754011e-03\n-1.39010499858690573e-01\n-1.45431494989373161e-01\n5.23902839620662072e-02\n2.03642279814047283e-01\n3.34244746604128859e-03\n-2.44705719027712348e-01\n6.30484245321098341e-02\n2.56723810224896598e-01\n-3.55965872164390740e-01\n2.54120317699247089e-01\n-1.21808538285666512e-01\n4.26609101337241392e-02\n-1.13315658557849551e-02\n0.0\n1.86754978574540302e-03\n7.23298921840517545e-03\n1.69999387043393464e-02\n3.14227146786574194e-02\n4.95796654545266960e-02\n6.86138920552861603e-02\n8.30736667935690620e-02\n8.50286488574181487e-02\n6.59759999476565717e-02\n2.14407933458871207e-02\n-4.21225731184438693e-02\n-1.01610147825210134e-01\n-1.20250667630912272e-01\n-6.76054045128755832e-02\n4.51778440591750347e-02\n1.41532298491123698e-01\n1.16385795430654151e-01\n-4.65359562277700700e-02\n-1.79028373768386317e-01\n-6.59851917600939586e-02\n1.83102334271581874e-01\n1.16528617987581018e-01\n-2.28928101242496573e-01\n-4.61759852917039207e-02\n3.14430181298344991e-01\n-3.35862522565298860e-01\n2.10859460660843046e-01\n-9.24664162188989502e-02\n3.02030360766636398e-02\n2.02111273372108727e-02\n3.50066994262935097e-02\n4.48444740339564579e-02\n5.14090196139492597e-02\n5.36528467834691061e-02\n4.93394644623523990e-02\n3.57708970461684539e-02\n1.09967223936803769e-02\n-2.42239887880659789e-02\n-6.40008017567752219e-02\n-9.56733344142174230e-02\n-1.01373953797580865e-01\n-6.56032363927557816e-02\n1.07498790716666764e-02\n9.65157186373820086e-02\n1.32749931081336481e-01\n6.94993563011364474e-02\n-7.01737211483233758e-02\n-1.60697299846529529e-01\n-7.03803791403408846e-02\n1.35676152214439905e-01\n1.61221330653826406e-01\n-1.05306963354252742e-01\n-2.01129100361123636e-01\n1.67858987953861394e-01\n1.49550571651023062e-01\n-3.44534995481667439e-01\n3.03345407165416192e-01\n-1.70409801453909993e-01\n6.89190635418032299e-02\n0.0\n1.69063483265463263e-03\n6.54780055138955500e-03\n1.53997540696632646e-02\n2.85272648891385719e-02\n4.52380027463157863e-02\n6.32349789636794252e-02\n7.80255628083879049e-02\n8.28753852727632662e-02\n7.00894630586191281e-02\n3.44060173876483757e-02\n-2.15017257044149285e-02\n-8.15149264932782669e-02\n-1.15766015018034740e-01\n-9.25213289852652998e-02\n-4.54360625643184836e-03\n1.03533365434698446e-01\n1.41232223052226852e-01\n4.39709291625246870e-02\n-1.21391700820941473e-01\n-1.56566432867880162e-01\n3.71073681091016877e-02\n2.02308850549708819e-01\n3.54668057286131174e-03\n-2.40369394716656831e-01\n7.66406683948587381e-02\n2.35751061760433117e-01\n-3.50825132457685318e-01\n2.64713181188148849e-01\n-1.34789630099789892e-01\n1.93819118932520018e-02\n3.35704561469359619e-02\n4.30363243700151929e-02\n4.94874533343247144e-02\n5.20824396628740208e-02\n4.88879691301602054e-02\n3.74861257394546454e-02\n1.59372763905188050e-02\n-1.56390541501317294e-02\n-5.30217602942769373e-02\n-8.62360190654166137e-02\n-1.00068635877661516e-01\n-7.90664706625742314e-02\n-1.81366710208549914e-02\n6.46187296274439854e-02\n1.23632927781602509e-01\n1.05544971024110729e-01\n-2.60759182723073165e-03\n-1.27571796312621583e-01\n-1.36649273452945558e-01\n2.12030173552318693e-02\n1.76867056233779268e-01\n7.76330128421086479e-02\n-1.79942749796420998e-01\n-1.14036149980830434e-01\n2.30550462619040969e-01\n2.90828033829556194e-02\n-3.01053506095850465e-01\n3.40635291096171133e-01\n-2.25800581922902033e-01\n0.0\n1.56671182586271625e-03\n6.06784880987251436e-03\n1.42792464756065288e-02\n2.65020217887279308e-02\n4.22099182704443951e-02\n5.95115417266138605e-02\n7.46163253448743347e-02\n8.16912011833520607e-02\n7.37252374324373488e-02\n4.50785128882325373e-02\n-4.09211285862907427e-03\n-6.27809058128271230e-02\n-1.07088460617658643e-01\n-1.06795436355356849e-01\n-4.43715857165848104e-02\n5.94136488122020134e-02\n1.35715001497477977e-01\n1.04714991462405718e-01\n-3.80250565849386060e-02\n-1.61235145616377029e-01\n-9.35515498422074404e-02\n1.25264638452239396e-01\n1.70573486625768461e-01\n-1.02263406427255843e-01\n-2.03440254547768290e-01\n1.75531774854011058e-01\n1.41313027428948745e-01\n-3.51380213050696999e-01\n3.24396291754132815e-01\n1.93205926194467414e-02\n3.34642480492220243e-02\n4.29286424703896330e-02\n4.94993408211993821e-02\n5.24846736359660185e-02\n5.01516352781344113e-02\n4.02586297661837803e-02\n2.08541781767661791e-02\n-8.40178044035123743e-03\n-4.44653646736164754e-02\n-7.92837605630615366e-02\n-9.96600868360345282e-02\n-9.05248549307588191e-02\n-4.30043493695613996e-02\n3.42023917547413236e-02\n1.07202389591578573e-01\n1.25390773598524602e-01\n5.51572794514762349e-02\n-7.33914225589810398e-02\n-1.53789443328583075e-01\n-8.08465688931376270e-02\n1.03928272971647112e-01\n1.75278295256679373e-01\n-1.70888420261165394e-02\n-2.12956296257655331e-01\n-1.68562915785440762e-02\n2.55348841388826353e-01\n-7.28664850905037659e-02\n-2.67932490239783550e-01\n4.02277164313814939e-01\n0.0\n1.52369760957792770e-03\n5.90125546655136460e-03\n1.38948279098766343e-02\n2.58348838735919482e-02\n4.13158939467359598e-02\n5.87189085852728790e-02\n7.47119069493680094e-02\n8.40363776702028747e-02\n8.00846466376530369e-02\n5.68620657345725172e-02\n1.26378488234281470e-02\n-4.54224315188870228e-02\n-9.81881409145332201e-02\n-1.17534562848897142e-01\n-7.96393430123689822e-02\n1.27219046970073000e-02\n1.12514561533835225e-01\n1.40999275289666021e-01\n4.81267465951724233e-02\n-1.09173715641403449e-01\n-1.67310145077073202e-01\n-1.80457735750333761e-02\n1.83286087717831558e-01\n1.18028677484028330e-01\n-1.78539038328291572e-01\n-1.60541814853278481e-01\n2.41612234605294740e-01\n1.03822066811582903e-01\n-4.35947796906542950e-01\n2.01741549737777283e-02\n3.49426614143513933e-02\n4.48547453403483898e-02\n5.18610641981462062e-02\n5.53927050868290652e-02\n5.38459970106763899e-02\n4.50717094794627349e-02\n2.70571896125141112e-02\n-9.41168468173442870e-04\n-3.68254757951765530e-02\n-7.40599837790894694e-02\n-1.01068022742568542e-01\n-1.03204346947058281e-01\n-6.87782199511770553e-02\n1.14890749507343733e-03\n8.34955927133317344e-02\n1.33742256877839860e-01\n1.06677275038909780e-01\n-3.32421742593590848e-03\n-1.28956501391508105e-01\n-1.53496480331567375e-01\n-1.81377065845746421e-02\n1.61851400508378651e-01\n1.53784503010156448e-01\n-8.94549821600548606e-02\n-2.26250682317892471e-01\n4.15512757972047314e-02\n2.84415903339791387e-01\n-8.99286581790325334e-02\n-4.19507996495966151e-01\n0.0\n1.51499724455173793e-03\n5.86755909769900563e-03\n1.38233103477659394e-02\n2.57494539990686076e-02\n4.13521663518401222e-02\n5.92506485416233533e-02\n7.65079468398754681e-02\n8.83619429753900315e-02\n8.85644781022734001e-02\n7.08417769510080175e-02\n3.18397355130305496e-02\n-2.47534584848937526e-02\n-8.45708394866040575e-02\n-1.22786470072018469e-01\n-1.12283677058069270e-01\n-4.11995641384149888e-02\n6.67914908477764691e-02\n1.47368025409894021e-01\n1.27170615947403642e-01\n-7.71969379183151238e-03\n-1.57357676068422603e-01\n-1.57743603889320655e-01\n3.77606858140945856e-02\n2.16117000988137381e-01\n9.37566215156150351e-02\n-2.16991139254019610e-01\n-1.88916225740332566e-01\n2.54589599256152432e-01\n3.64193284810973517e-01\n2.13547495090427170e-02\n3.69875111325685263e-02\n4.75124616690759463e-02\n5.50900878816928813e-02\n5.92890399759669201e-02\n5.86452008180793002e-02\n5.11146562196976295e-02\n3.46453990718379803e-02\n8.12375677167312231e-03\n-2.72677978805148068e-02\n-6.65435626016682574e-02\n-9.99820180099242201e-02\n-1.13996889009126259e-01\n-9.51941921450958906e-02\n-3.81105090432135377e-02\n4.54623334381080019e-02\n1.21687181951142198e-01\n1.43476911749618324e-01\n7.84568109373991879e-02\n-5.32810736165170787e-02\n-1.63753510172612582e-01\n-1.44380242152669258e-01\n2.44318437840217971e-02\n1.94885171025306336e-01\n1.51352001110183487e-01\n-1.11756824878255320e-01\n-2.60912534249200745e-01\n-8.72776191305477990e-03\n3.51759884049786253e-01\n2.88784247446302988e-01\n0.0\n1.49722556385356045e-03\n5.79872967432084902e-03\n1.36692787870290287e-02\n2.55118729127378832e-02\n4.11500328247379060e-02\n5.94595970578550639e-02\n7.79417901601638374e-02\n9.24196847790766385e-02\n9.71706337940708154e-02\n8.59127671526760950e-02\n5.40154484978718555e-02\n1.91071559585027028e-03\n-6.12202352190959267e-02\n-1.15738886407326075e-01\n-1.35146669543499603e-01\n-9.76463906962136974e-02\n-4.09411005390345872e-03\n1.07319680203907128e-01\n1.66925409470873060e-01\n1.13770585251227102e-01\n-4.15864798135650721e-02\n-1.84889615721212874e-01\n-1.65005995557186758e-01\n4.40304281799808531e-02\n2.40333657774510545e-01\n1.57363967670314825e-01\n-1.76160672683502051e-01\n-3.73098948514228590e-01\n-2.10745265016578975e-01\n2.26944623180856744e-02\n3.93079617853817481e-02\n5.05297492137750798e-02\n5.87624140407840140e-02\n6.37386640829776807e-02\n6.41682089261232103e-02\n5.81582136283290557e-02\n4.36753348085024695e-02\n1.92993500324955408e-02\n-1.46628354346927496e-02\n-5.48394996284113229e-02\n-9.36957316903475890e-02\n-1.19541401929931151e-01\n-1.18780786959885518e-01\n-8.12471016460672851e-02\n-8.08593978554945567e-03\n8.10170127824148129e-02\n1.47516567472018856e-01\n1.47525031057708977e-01\n6.03405598605861460e-02\n-8.09415611098843885e-02\n-1.85569045902980095e-01\n-1.55680105051936163e-01\n2.00993765563155166e-02\n2.08406539969910432e-01\n2.10605845903003325e-01\n-2.90342779633553615e-02\n-3.01864785610510611e-01\n-3.34276041621394515e-01\n-1.42032185029235591e-01\n0.0\n1.46465789450856624e-03\n5.67259563332289662e-03\n1.33802487369004165e-02\n2.50228514662116271e-02\n4.05445331986754032e-02\n5.90943331664136665e-02\n7.86548039225754003e-02\n9.57298434999360737e-02\n1.05313834645032620e-01\n1.01456548202541325e-01\n7.87516671189804757e-02\n3.48898385524441662e-02\n-2.61018681633201702e-02\n-9.11963457155915147e-02\n-1.38532306457252952e-01\n-1.43016842567070673e-01\n-8.84962364217231068e-02\n1.66507821656602349e-02\n1.29946891656802704e-01\n1.84764004767354301e-01\n1.27473230178537456e-01\n-3.14276634117309842e-02\n-1.93158374851662568e-01\n-2.19602194369312970e-01\n-5.07738210766518899e-02\n2.05987440882326622e-01\n3.43133284682473116e-01\n2.62203449769321750e-01\n8.84420002658066612e-02\n2.43015535197076346e-02\n4.20915253989879029e-02\n5.41487877974571527e-02\n6.31650804251962794e-02\n6.90685929209346738e-02\n7.07810656984954739e-02\n6.66132437922407061e-02\n5.46234711463624220e-02\n3.31804807577630936e-02\n1.81586309003735108e-03\n-3.76789928001331348e-02\n-8.01629887842898597e-02\n-1.16596029372413548e-01\n-1.34829835883183258e-01\n-1.22570287651315321e-01\n-7.28127740748291535e-02\n9.32572910688920891e-03\n1.01568153513612314e-01\n1.66280677731102527e-01\n1.63678252009582748e-01\n7.57770795439832723e-02\n-6.96968255673687948e-02\n-1.95878678551662688e-01\n-2.11689854975712133e-01\n-7.79343733746728495e-02\n1.41868540859132308e-01\n3.07324335346591204e-01\n3.11699996264779511e-01\n1.82910430826351500e-01\n5.07919975844795396e-02\n0.0\n1.41482444534439663e-03\n5.47959151462599440e-03\n1.29333541059589285e-02\n2.42377854068478830e-02\n3.94567330591634666e-02\n5.80215177028469212e-02\n7.84278576373074604e-02\n9.79439462444405551e-02\n1.12471339463007011e-01\n1.16769987996376140e-01\n1.05297627718719561e-01\n7.38563821864945680e-02\n2.20023347933746387e-02\n-4.43031632195030056e-02\n-1.10990157156722821e-01\n-1.56903535568482938e-01\n-1.59281157744391805e-01\n-1.04005828328462155e-01\n2.18303031807441346e-03\n1.24326953563875783e-01\n2.05579055316006065e-01\n1.92007282304378329e-01\n6.83276204128304698e-02\n-1.18436482335118290e-01\n-2.74325591735223251e-01\n-3.17117377909978293e-01\n-2.39342151211219545e-01\n-1.14184802900082330e-01\n-2.68010836404352949e-02\n2.63670410481866811e-02\n4.56690547407134773e-02\n5.87971788494911773e-02\n6.88062674062319413e-02\n7.58615461473550329e-02\n7.91434201427945322e-02\n7.72304326300039673e-02\n6.83666231213527348e-02\n5.08451405884722957e-02\n2.35961364837359786e-02\n-1.30105915558347933e-02\n-5.62491119042071580e-02\n-1.00271513358231285e-01\n-1.35947396996404679e-01\n-1.51895674768752542e-01\n-1.37217547889488256e-01\n-8.59641275370436331e-02\n-2.39066660490855646e-03\n9.52678049198246724e-02\n1.75756950504769777e-01\n2.03273872661312638e-01\n1.53155188746217419e-01\n2.89916114192648074e-02\n-1.29768035974532070e-01\n-2.60131137429870818e-01\n-3.07633528006014623e-01\n-2.60559266218253260e-01\n-1.58753684080795376e-01\n-6.38115426420304416e-02\n-1.29164222636624759e-02\n0.0\n1.34074211111589363e-03\n5.19267186791083028e-03\n1.22643723898892380e-02\n2.30339673882051232e-02\n3.76783519555819180e-02\n5.59112840529603292e-02\n7.67604547712314039e-02\n9.83264338295395252e-02\n1.17599702194340586e-01\n1.30454776114335563e-01\n1.31977155499689830e-01\n1.17281886771738203e-01\n8.29121756900686180e-02\n2.87215705790480648e-02\n-4.01716275384897473e-02\n-1.12159367030991025e-01\n-1.69744939984698806e-01\n-1.92971815543708097e-01\n-1.65871706118821294e-01\n-8.44895256413665252e-02\n3.69522765475146162e-02\n1.66291056259111669e-01\n2.63127362147732358e-01\n2.96153660979131483e-01\n2.59722589277867788e-01\n1.78113910299361050e-01\n9.15618267899989402e-02\n3.17806460395623838e-02\n5.63599781457648896e-03\n2.92935329267508954e-02\n5.07378873623243881e-02\n6.53762557707493197e-02\n7.67575324734199732e-02\n8.53471487342722102e-02\n9.06481152342901719e-02\n9.15922744779384818e-02\n8.67364514737436754e-02\n7.44908646827542598e-02\n5.34598069319684108e-02\n2.29272923142653205e-02\n-1.65281126771902528e-02\n-6.23764541637324005e-02\n-1.09619371265079951e-01\n-1.50692134573398084e-01\n-1.76117138572199128e-01\n-1.76177881890961258e-01\n-1.43626234880003506e-01\n-7.69568272838206807e-02\n1.68271871552478358e-02\n1.21494956931875342e-01\n2.14329222778797540e-01\n2.72635428348443398e-01\n2.82280876828938432e-01\n2.44421509160591161e-01\n1.76062535575118223e-01\n1.02624954263647011e-01\n4.57704941275130367e-02\n1.39690015528930265e-02\n2.19835313707907693e-03\n0.0\n1.22644056286328341e-03\n4.74998387508274687e-03\n1.12266146468599157e-02\n2.11322555072771603e-02\n3.47395445821111967e-02\n5.20295768345785115e-02\n7.25583374074712378e-02\n9.52962573550623637e-02\n1.18471256808450720e-01\n1.39464032238899499e-01\n1.54824308788287068e-01\n1.60490295106014924e-01\n1.52288139162566172e-01\n1.26748108676778687e-01\n8.21859567589229151e-02\n1.98604572542456573e-02\n-5.51428292958428615e-02\n-1.33771323842730799e-01\n-2.04056752336860936e-01\n-2.53540177497663555e-01\n-2.72711536542889432e-01\n-2.58420841833912729e-01\n-2.15738305871457370e-01\n-1.56926668463433172e-01\n-9.73159883954135274e-02\n-4.96231013438896001e-02\n-1.95767716770687029e-02\n-5.32723228314060417e-03\n-7.51890041941666570e-04\n3.42840261156384524e-02\n5.93816751203040602e-02\n7.65783557963164718e-02\n9.02156343735047578e-02\n1.01181999931878139e-01\n1.09409545322400839e-01\n1.14314435240985557e-01\n1.14955414037021211e-01\n1.10149508400636212e-01\n9.86141721424123457e-02\n7.91662276345669463e-02\n5.09886818435338826e-02\n1.39555182579492246e-02\n-3.10236209109128885e-02\n-8.17113055301956631e-02\n-1.34408261490575609e-01\n-1.84100053395291119e-01\n-2.24988035230992339e-01\n-2.51433032275029611e-01\n-2.59202957208033047e-01\n-2.46739913591316251e-01\n-2.16014234566888452e-01\n-1.72512712799429480e-01\n-1.24108439844523119e-01\n-7.89889791892071647e-02\n-4.33309093580383636e-02\n-1.97044720937182317e-02\n-6.97530695563591038e-03\n-1.71128319031263508e-03\n-2.18555388258802059e-04\n0.0\n1.02337573493573985e-03\n3.96351717831889671e-03\n9.37454881138028752e-03\n1.76869338445062481e-02\n2.92243021653275023e-02\n4.41837176743110974e-02\n6.25934878165848169e-02\n8.42552962164825336e-02\n1.08678129628816095e-01\n1.35015104000687142e-01\n1.62019288907121278e-01\n1.88039567626741122e-01\n2.11080388806138275e-01\n2.28947123855783613e-01\n2.39488447906886559e-01\n2.40926312592677050e-01\n2.32232995334637926e-01\n2.13478747418999082e-01\n1.86044718789422692e-01\n1.52591762881003318e-01\n1.16714106054596839e-01\n8.22945714747605056e-02\n5.26982244191113100e-02\n3.00469142775905036e-02\n1.48425355373943031e-02\n6.10323412410519999e-03\n1.96023837882874832e-03\n4.37524999465979442e-04\n5.09480590918736477e-05\n4.91151917935640572e-02\n8.50700076099429187e-02\n1.09801600085229711e-01\n1.29808694092172855e-01\n1.46876733956123051e-01\n1.61688809315373577e-01\n1.74468090943198512e-01\n1.85180958938238521e-01\n1.93625975811990342e-01\n1.99488535765258657e-01\n2.02388679147904149e-01\n2.01933725351945009e-01\n1.97780443453588417e-01\n1.89706568312195178e-01\n1.77686565394480245e-01\n1.61961353010184161e-01\n1.43086949864945273e-01\n1.21944326739137993e-01\n9.96942568570506754e-02\n7.76686895832095769e-02\n5.72047988691795559e-02\n3.94473174532090839e-02\n2.51633115206718189e-02\n1.46223916998362326e-02\n7.58585760796935855e-03\n3.41744162764264815e-03\n1.28413141993863095e-03\n3.77534026503026289e-04\n7.72450872902576331e-05\n8.25520460803832142e-06\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568337e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241417e-02\n9.88252304934228859e-02\n8.34206112161390984e-02\n3.34309666893541080e-02\n-4.55081157623018623e-02\n-1.20882091540367984e-01\n-1.36307454345571899e-01\n-4.85398053520555497e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606791e-02\n-1.95465430289109038e-01\n-1.20427082859638712e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983791e-01\n3.32134924570162693e-01\n-1.84441650469399282e-01\n7.01640761635408949e-02\n-1.93702476636684814e-02\n3.97340009900600064e-03\n-6.08556064657587558e-04\n6.88856522437662826e-05\n-5.60751591119739500e-06\n3.11005444185247502e-07\n2.38240825235081187e-02\n4.12645213744298120e-02\n5.26994479378479277e-02\n5.96437482396824648e-02\n6.00420996705097743e-02\n5.02499562021852808e-02\n2.64811655050396604e-02\n-1.25444694521616509e-02\n-6.15978397043643877e-02\n-1.05079319015528916e-01\n-1.17419763793365134e-01\n-7.38763132375513804e-02\n2.53840765530709001e-02\n1.29562451270514245e-01\n1.44948627057311014e-01\n1.46398830963571109e-02\n-1.62197086629627812e-01\n-1.47059686598361244e-01\n1.16751590365645752e-01\n2.12079838893904471e-01\n-1.55188074481364541e-01\n-1.94753426728670576e-01\n3.68938551280943328e-01\n-2.89329473998090558e-01\n1.43498158564276751e-01\n-5.02124893718128434e-02\n1.29580261658409183e-02\n-2.51059900805339657e-03\n3.65863978895934272e-04\n-3.96241972765525957e-05\n3.09965072143932509e-06\n0.0\n2.32643782874356227e-03\n9.01025496671075884e-03\n2.11411518869216788e-02\n3.88584183256256988e-02\n6.05179512030886088e-02\n8.15697383113512253e-02\n9.37861413437724861e-02\n8.61132662825474099e-02\n4.88788710181807251e-02\n-1.76734976934642546e-02\n-9.30771465538615950e-02\n-1.33833774376419523e-01\n-9.28757697987178110e-02\n3.24138298294240831e-02\n1.54057220148621415e-01\n1.28810482031352258e-01\n-7.11558020310540662e-02\n-2.04651937594151817e-01\n-9.17019193126749222e-04\n2.49614874104658713e-01\n-4.92637905595816258e-02\n-2.78836145158891602e-01\n3.61105130869973201e-01\n-2.43107144406097792e-01\n1.09071866772577089e-01\n-3.53467503917275425e-02\n8.56413234966568564e-03\n-1.57211513492328198e-03\n2.18501632685399799e-04\n-2.26839141863322184e-05\n2.24811952212222860e-02\n3.89385723380316420e-02\n4.97884330676077597e-02\n5.66337353800911922e-02\n5.78355551701447146e-02\n5.03138919589975475e-02\n3.06728899180235548e-02\n-2.78968739350994111e-03\n-4.69486098856530878e-02\n-9.04779956077707836e-02\n-1.12977747491928973e-01\n-9.11312065334308058e-02\n-1.53940868732494740e-02\n8.74409456801676227e-02\n1.46759245056559462e-01\n8.80370635939503599e-02\n-7.48694550564043687e-02\n-1.80280640992535379e-01\n-5.18321274149582886e-02\n1.88681460774547144e-01\n1.19495353960849954e-01\n-2.29403602695635506e-01\n-6.58079623407154812e-02\n3.32741395470024903e-01\n-3.34697913088910060e-01\n1.98088265140374364e-01\n-8.12078561483215722e-02\n2.45133493968477216e-02\n-5.59765643598197742e-03\n9.76291473395679869e-04\n-1.29690704078251688e-04\n0.0\n2.07806286422521861e-03\n8.04830286551635500e-03\n1.89014746821070563e-02\n3.48478694745908563e-02\n5.46583986765402999e-02\n7.47443017948865029e-02\n8.84323010670974435e-02\n8.63557856931871926e-02\n5.92859040711801663e-02\n4.39362126230645814e-03\n-6.62001077634715995e-02\n-1.20294104588613976e-01\n-1.14591417953150504e-01\n-2.65481569547723201e-02\n1.01993444289065927e-01\n1.57538594164563506e-01\n4.57361678932535556e-02\n-1.48628062889533924e-01\n-1.55742236033312470e-01\n1.09770305276233229e-01\n2.06966957738114854e-01\n-1.61362486986687287e-01\n-1.71879876586991776e-01\n3.57002283619470506e-01\n-2.96970496125546213e-01\n1.57163567471646198e-01\n-5.93527846196479150e-02\n1.67706108455995123e-02\n-3.62151688198844492e-03\n6.01624945481667173e-04\n2.12816529820524999e-02\n3.68609042339646392e-02\n4.71793322612571939e-02\n5.38928486554149377e-02\n5.56915983973724910e-02\n4.99582799368387467e-02\n3.36631109593233391e-02\n4.91156977414167976e-03\n-3.45857666048358381e-02\n-7.66380724558464038e-02\n-1.05131211526045695e-01\n-9.93307993027577746e-02\n-4.52185944134328374e-02\n4.63278791563182107e-02\n1.26520914694266601e-01\n1.24501319216023476e-01\n8.76149565387124643e-03\n-1.39009857422535299e-01\n-1.45430744406451540e-01\n5.23901122699923366e-02\n2.03641256931707038e-01\n3.34229419089391048e-03\n-2.44704445740645454e-01\n6.30482893787401716e-02\n2.56722223684781148e-01\n-3.55963834591455641e-01\n2.54118899671799625e-01\n-1.21807867306567980e-01\n4.26606769432471694e-02\n-1.13315042240613832e-02\n2.32099292180477229e-03\n0.0\n1.86746092298903182e-03\n7.23264505442965111e-03\n1.69991296820693125e-02\n3.14212185373484859e-02\n4.95773021001229483e-02\n6.86106139314555108e-02\n8.30696807036139101e-02\n8.50245344055682167e-02\n6.59727431373878098e-02\n2.14396107515103240e-02\n-4.21207312132203249e-02\n-1.01605376287039070e-01\n-1.20244789785097311e-01\n-6.76017834428006836e-02\n4.51761324217093141e-02\n1.41525580037760029e-01\n1.16379567091301386e-01\n-4.65345738731748060e-02\n-1.79019533269578146e-01\n-6.59804966406308813e-02\n1.83093743553752714e-01\n1.16520569064200150e-01\n-2.28916674950060101e-01\n-4.61700043045671360e-02\n3.14409423511414210e-01\n-3.35841835512504905e-01\n2.10846835799178567e-01\n-9.24609650049680182e-02\n3.02012725125980035e-02\n-7.56928345305558654e-03\n2.02041014785466801e-02\n3.49945302821203230e-02\n4.48288815801472992e-02\n5.13911281122885547e-02\n5.36341268616449610e-02\n4.93221416331916657e-02\n3.57581182918200319e-02\n1.09923258686377128e-02\n-2.42163515114770869e-02\n-6.39793571136679784e-02\n-9.56404706262785481e-02\n-1.01338100662252795e-01\n-6.55783972998137815e-02\n1.07491713158756989e-02\n9.64843927856978700e-02\n1.32702596206069084e-01\n6.94696916333876202e-02\n-7.01551507746161901e-02\n-1.60639764697024651e-01\n-7.03449524952869110e-02\n1.35635068500802120e-01\n1.61151181428072221e-01\n-1.05283671526078565e-01\n-2.01035331776213660e-01\n1.67811309472049364e-01\n1.49448122946604617e-01\n-3.44356438218428040e-01\n3.03198432446640520e-01\n-1.70329802822395376e-01\n6.88872963099834701e-02\n-2.10869585633256078e-02\n0.0\n1.68762793089158357e-03\n6.53615487093758395e-03\n1.53723575308578400e-02\n2.84764710158123512e-02\n4.51572979580976766e-02\n6.31217342181844554e-02\n7.78848311791106585e-02\n8.27238840703559547e-02\n6.99575816921601396e-02\n3.43343214164424856e-02\n-2.14752486584536655e-02\n-8.13776130435590050e-02\n-1.15555822212432477e-01\n-9.23352727659238481e-02\n-4.50333983392095516e-03\n1.03368116228962456e-01\n1.40957923368149746e-01\n4.38317557359281032e-02\n-1.21209369626492841e-01\n-1.56223532846092500e-01\n3.71399473266203137e-02\n2.01890931664474471e-01\n3.37397067986034468e-03\n-2.39813709007094311e-01\n7.67037037465951310e-02\n2.34883360503160360e-01\n-3.49765385073435575e-01\n2.63966186744834741e-01\n-1.34422465821813997e-01\n5.04734756190004241e-02\n1.92499552253041356e-02\n3.33419004936527583e-02\n4.27432106747621388e-02\n4.91498674365956414e-02\n5.17256186392366368e-02\n4.85495620701567460e-02\n3.72196340470583517e-02\n1.58096242483822154e-02\n-1.55596575640385079e-02\n-5.26908614504365894e-02\n-8.56694259661651830e-02\n-9.93787364262158079e-02\n-7.84723492818535651e-02\n-1.79121843010418905e-02\n6.42816905106385339e-02\n1.22812025649757642e-01\n1.04694997046118232e-01\n-2.82478951010748129e-03\n-1.26819657618249315e-01\n-1.35491099644787560e-01\n2.14725904776139620e-02\n1.75641730782882061e-01\n7.64420639565288607e-02\n-1.78888010053276869e-01\n-1.12191437602815927e-01\n2.28874511978682554e-01\n2.71295733984208247e-02\n-2.96386199411600770e-01\n3.36159198908445866e-01\n-2.23034977814084517e-01\n1.03996993897359155e-01\n0.0\n1.53902550000656704e-03\n5.96062013091397652e-03\n1.40267934045556972e-02\n2.60327695954311322e-02\n4.14599808306694087e-02\n5.84471363768232777e-02\n7.32654109481020444e-02\n8.01789938002365754e-02\n7.22988476011383191e-02\n4.40947840225086735e-02\n-4.24740541809434484e-03\n-6.18615031123576214e-02\n-1.05215002391734147e-01\n-1.04626895399540440e-01\n-4.30187134212340755e-02\n5.89189819549601618e-02\n1.33318469770068421e-01\n1.01994057049407713e-01\n-3.85030551705438651e-02\n-1.58345290469055489e-01\n-9.00720486933430653e-02\n1.24326363360918291e-01\n1.65308182717701951e-01\n-1.02983301130001134e-01\n-1.95882955273737058e-01\n1.74801200604784435e-01\n1.29253769040009403e-01\n-3.33965496725379229e-01\n3.10520271332428266e-01\n-1.84331615698552997e-01\n1.86242029683117011e-02\n3.22580657915909619e-02\n4.13802548467236964e-02\n4.77088514344371009e-02\n5.05715758701658913e-02\n4.82905392657030086e-02\n3.86984450983620595e-02\n1.99144344311935825e-02\n-8.37279754004754614e-03\n-4.31863561195190981e-02\n-7.66930831549498676e-02\n-9.60956450726936778e-02\n-8.68475353069276812e-02\n-4.05238876026170203e-02\n3.41501422188954726e-02\n1.04056484764145835e-01\n1.20251983820434935e-01\n5.10156385035480872e-02\n-7.30278230553652041e-02\n-1.48013466234855062e-01\n-7.41274305817768292e-02\n1.03733770897410107e-01\n1.66024322904449850e-01\n-2.38473102944329572e-02\n-2.03373855979244234e-01\n-4.05258021682849273e-03\n2.39959297323652648e-01\n-8.82826498812539912e-02\n-2.23119561991326765e-01\n3.54171526395453351e-01\n-2.80974156368209438e-01\n0.0\n1.44811163651469292e-03\n5.60851225167057453e-03\n1.32049366529266628e-02\n2.45484416428115582e-02\n3.92450804709565254e-02\n5.57384616070201525e-02\n7.08331296920935299e-02\n7.94972315322989981e-02\n7.54315567042665447e-02\n5.29750574208064096e-02\n1.06277206703623249e-02\n-4.45189140173647621e-02\n-9.39391235646383077e-02\n-1.10754692166827345e-01\n-7.27901079973130166e-02\n1.59656953231394061e-02\n1.09085461068223186e-01\n1.31415294884077494e-01\n3.86236322397802423e-02\n-1.09112818010487250e-01\n-1.54223250624002300e-01\n-4.22365518870419440e-03\n1.76782584872495346e-01\n9.31647777920917158e-02\n-1.79767199962204471e-01\n-1.20661540465692399e-01\n2.37270804291949383e-01\n2.68723268851413510e-02\n-3.14799708727310001e-01\n3.69695076248037768e-01\n1.88508006648874168e-02\n3.26505445149381790e-02\n4.19085734410475780e-02\n4.84363417781545347e-02\n5.16822287727011082e-02\n5.01207224040450677e-02\n4.17179384851632667e-02\n2.45881867218338927e-02\n-1.91631926479369444e-03\n-3.56997203159946166e-02\n-7.04147521827454270e-02\n-9.49510496798034037e-02\n-9.54526767128985182e-02\n-6.12501119274689726e-02\n5.69204205951732035e-03\n8.22014093568051163e-02\n1.25382936469031758e-01\n9.38410889156127553e-02\n-1.32369595249049541e-02\n-1.26704639080621018e-01\n-1.36378966599940921e-01\n1.14457277412250281e-03\n1.59584879498093801e-01\n1.23046090112484657e-01\n-1.11072970870267199e-01\n-1.91179538656840869e-01\n8.98339834673591991e-02\n2.26234753676636369e-01\n-1.72226150601543671e-01\n-1.85832684751197297e-01\n4.23962794940895116e-01\n0.0\n1.42460573699785577e-03\n5.51747429430423861e-03\n1.29970602396895750e-02\n2.42013029559319318e-02\n3.88330603927779724e-02\n5.55501669912652762e-02\n7.15185174397566098e-02\n8.21686951273110783e-02\n8.15572793199682566e-02\n6.38308449289026886e-02\n2.61263429794244585e-02\n-2.74486123030385429e-02\n-8.24750127135670530e-02\n-1.14898203809559424e-01\n-9.96435887786733671e-02\n-2.80986464621584622e-02\n7.29855934600473488e-02\n1.39568544178622939e-01\n1.05543825399832092e-01\n-2.93978735835008879e-02\n-1.56067246184550118e-01\n-1.24035628159047673e-01\n7.31425902810743933e-02\n1.97544234772247307e-01\n2.35741458810673314e-02\n-2.25022432206558709e-01\n-6.58042812940115990e-02\n2.80316032875005561e-01\n2.32775301155093393e-03\n-4.29929608210017911e-01\n1.97815302375897971e-02\n3.42626154229655686e-02\n4.40042848904381792e-02\n5.09848219662090291e-02\n5.47634594663900798e-02\n5.39273703099580615e-02\n4.65261578833727207e-02\n3.06362600192637453e-02\n5.29668426666593615e-03\n-2.81597327636231159e-02\n-6.46613169574387914e-02\n-9.45886132348522646e-02\n-1.04845112429988729e-01\n-8.31446450056401026e-02\n-2.58290235096772826e-02\n5.32449242843732878e-02\n1.19287221985903830e-01\n1.27624743936219143e-01\n5.33941780773607017e-02\n-7.26996047648450494e-02\n-1.57757748511707263e-01\n-1.06721066010282514e-01\n6.62427636773116058e-02\n1.88393368303060943e-01\n7.96277953426242635e-02\n-1.66850311480021968e-01\n-1.82288221964684694e-01\n1.36684781235033803e-01\n2.51169278995643286e-01\n-1.79062690731852520e-01\n-3.91765401115738099e-01\n0.0\n1.41656289945210059e-03\n5.48632451843327710e-03\n1.29303879895461358e-02\n2.41178876807666941e-02\n3.88473052300551472e-02\n5.59819160985161393e-02\n7.30339598569533788e-02\n8.58868503215654416e-02\n8.89779416622937802e-02\n7.63650637953890016e-02\n4.40283041049439328e-02\n-6.68791528602870593e-03\n-6.55682878899350174e-02\n-1.12406258521505473e-01\n-1.21677379085731813e-01\n-7.52856245116206718e-02\n1.93968646865307175e-02\n1.17716569004853874e-01\n1.50331245496213295e-01\n7.07555595790913955e-02\n-8.35525765177305840e-02\n-1.80500497537961047e-01\n-9.52018346315344488e-02\n1.20864636534859848e-01\n2.11008342170070640e-01\n4.87549219433219957e-04\n-2.55945913038597261e-01\n-1.07954155049966652e-01\n3.10086654448675725e-01\n3.25288423411349836e-01\n2.09157581123519259e-02\n3.62271557294144494e-02\n4.65568324038486830e-02\n5.40823571589064411e-02\n5.84914602592897376e-02\n5.85028921466845334e-02\n5.22738289042278606e-02\n3.78737112412334334e-02\n1.40628289463943495e-02\n-1.85691267514240498e-02\n-5.62741329526409914e-02\n-9.11503748133427050e-02\n-1.11424292323160673e-01\n-1.04181385892332390e-01\n-6.12623595666884069e-02\n1.26534706449351435e-02\n9.37699708656914988e-02\n1.41694849866937811e-01\n1.17295836887414989e-01\n1.40796424344673057e-02\n-1.15584942982814354e-01\n-1.72687910679274415e-01\n-8.36471031486234751e-02\n1.03612736112353665e-01\n2.07584629263546705e-01\n7.56168459373593310e-02\n-1.84007920958839888e-01\n-2.29097366826562593e-01\n8.03576859122580311e-02\n3.68580710511250409e-01\n2.48482772151923659e-01\n0.0\n1.39763924877463999e-03\n5.41303353451002590e-03\n1.27645849261289451e-02\n2.38507218455405248e-02\n3.85699880954173333e-02\n5.60075546635114968e-02\n7.40607870361332382e-02\n8.91450033074221021e-02\n9.62247586031444307e-02\n8.95098794553380595e-02\n6.41477297328842122e-02\n1.89922317411877276e-02\n-4.01051719928578326e-02\n-9.80539512364339838e-02\n-1.31915268678091030e-01\n-1.18536902431972027e-01\n-4.86809033927246768e-02\n5.76800816160978891e-02\n1.47175676234137215e-01\n1.54195771867048914e-01\n4.93218712522968672e-02\n-1.12453769328485512e-01\n-1.99038424348288473e-01\n-1.02063331973549637e-01\n1.23893873589351097e-01\n2.46878352352262992e-01\n8.07966930940374473e-02\n-2.40747011764665980e-01\n-3.59042250119187611e-01\n-1.75543166180000931e-01\n2.22053942334068805e-02\n3.84608710143576824e-02\n4.94601245126953942e-02\n5.76102390761775440e-02\n6.27509583531218607e-02\n6.37625520854293026e-02\n5.89499200758292277e-02\n4.64275129727309971e-02\n2.47372397657093096e-02\n-6.22565290064311123e-03\n-4.40589108768807830e-02\n-8.27992622916211424e-02\n-1.12619014243238127e-01\n-1.21188915064399591e-01\n-9.75367583499923418e-02\n-3.83901731679114414e-02\n4.48738905627074566e-02\n1.23064272897439042e-01\n1.55721430229251528e-01\n1.10952892676786763e-01\n-6.60941753753716433e-03\n-1.38207005743242961e-01\n-1.89626074192782851e-01\n-9.66785021663664895e-02\n9.73333439482555463e-02\n2.33241803983603807e-01\n1.56039404753356176e-01\n-1.08442725540714713e-01\n-3.28138248608014660e-01\n-3.02973987021493696e-01\n-1.14910627668763879e-01\n0.0\n1.36564765861572381e-03\n5.28913063860585002e-03\n1.24794686680624132e-02\n2.33608356110296816e-02\n3.79335427924680363e-02\n5.55165533488282681e-02\n7.44248796825807413e-02\n9.16797927648344141e-02\n1.02925052340662737e-01\n1.02800696610237496e-01\n8.60539006898736469e-02\n4.95557282338234747e-02\n-4.96106619977360747e-03\n-6.82772196024812594e-02\n-1.22825763962934667e-01\n-1.45767206452330905e-01\n-1.17565435746672761e-01\n-3.50018739740820678e-02\n7.71043273811150842e-02\n1.65745282763651580e-01\n1.70857851805957278e-01\n6.62721660058158274e-02\n-1.02211923601897264e-01\n-2.20934677479283248e-01\n-1.79410345919649827e-01\n2.62268227124117168e-02\n2.56488955956852782e-01\n3.35459227596483778e-01\n2.26725030921548387e-01\n6.96662403983392686e-02\n2.37612467232464347e-02\n4.11556865758423290e-02\n5.29620004390471757e-02\n6.18620213877261529e-02\n6.78758103812714814e-02\n7.00785092859845388e-02\n6.69682488232102024e-02\n5.67682231502073670e-02\n3.78874849622240356e-02\n9.62397463526756987e-03\n-2.69069838532879774e-02\n-6.77903535146127667e-02\n-1.05666277204040565e-01\n-1.30042338610939306e-01\n-1.29277092743537408e-01\n-9.46705880589465004e-02\n-2.62003625790080200e-02\n6.21141671758545857e-02\n1.40940938906201463e-01\n1.72712593559239180e-01\n1.28796284022444779e-01\n1.18607253575559613e-02\n-1.30163400161598719e-01\n-2.15953214397344218e-01\n-1.75421265891182204e-01\n-6.82982238285470989e-03\n2.00845286569011988e-01\n3.19510782194020182e-01\n2.84340908186075769e-01\n1.52056184541921102e-01\n3.90258908831577489e-02\n0.0\n1.31792995512665140e-03\n5.10432076767340908e-03\n1.20505032157104536e-02\n2.26008114667794156e-02\n3.68555878996148917e-02\n5.43735300964857671e-02\n7.39108430440614528e-02\n9.31587041630429075e-02\n1.08588916956135123e-01\n1.15574712841959762e-01\n1.08992613698332977e-01\n8.44852353134276368e-02\n4.04108042514972135e-02\n-1.98314993013055628e-02\n-8.59210695858846629e-02\n-1.40529733036653559e-01\n-1.62561774886478161e-01\n-1.34552337735103861e-01\n-5.30424191241137960e-02\n6.23459110046783310e-02\n1.68048094956450927e-01\n2.10120540721018656e-01\n1.51683787134629738e-01\n1.72942359414153209e-03\n-1.76775694783298520e-01\n-2.96113292078071411e-01\n-3.00367310277987520e-01\n-2.07199229143423980e-01\n-9.17282427955441459e-02\n-2.01165814804028474e-02\n2.57658226536666528e-02\n4.46277139349597965e-02\n5.74710233710840901e-02\n6.73233232133310239e-02\n7.44230167321848629e-02\n7.80814217202757122e-02\n7.70459185637162869e-02\n6.97300215200921253e-02\n5.45282543626655139e-02\n3.02979506548860245e-02\n-2.97201171508125212e-03\n-4.33689419336206750e-02\n-8.63284207722899571e-02\n-1.24311588996695754e-01\n-1.47355911354947383e-01\n-1.44964520392489526e-01\n-1.09523851420798596e-01\n-4.07782986674080847e-02\n5.01112757335724357e-02\n1.39376121549730808e-01\n1.94959776221522829e-01\n1.87470525216131750e-01\n1.05236369363968976e-01\n-3.37003277405252960e-02\n-1.82164549974769524e-01\n-2.82474248793961158e-01\n-2.96986725212323444e-01\n-2.31563660399599330e-01\n-1.31679377512693818e-01\n-4.97182623141580946e-02\n-9.48274420695388760e-03\n0.0\n1.24785676091174950e-03\n4.83292845346353604e-03\n1.14167503904450286e-02\n2.14544050058919945e-02\n3.51394722755304367e-02\n5.22687214424148311e-02\n7.20519958626868323e-02\n9.29006674447627606e-02\n1.12253535060737417e-01\n1.26533198510352440e-01\n1.31357811880748687e-01\n1.22143180414674299e-01\n9.51893047875564946e-02\n4.92210230160131795e-02\n-1.28748426672059008e-02\n-8.26794694148808157e-02\n-1.46085172081821063e-01\n-1.85257724067896729e-01\n-1.83206797028764384e-01\n-1.30389251318894756e-01\n-3.12129435394946295e-02\n9.30368804568325880e-02\n2.08253926292723601e-01\n2.79378145272545286e-01\n2.86057852213292108e-01\n2.33578204445770071e-01\n1.50667519576915349e-01\n7.32162021742139846e-02\n2.40826507718555280e-02\n4.05155411061254578e-03\n2.86107749877544809e-02\n4.95553159227115833e-02\n6.38639133444147966e-02\n7.50360248688164699e-02\n8.35869419700154409e-02\n8.91213359674430244e-02\n9.07106229132618180e-02\n8.70683675612065333e-02\n7.67402964965528955e-02\n5.83828206720423126e-02\n3.11626758876863766e-02\n-4.72682673764419654e-03\n-4.74911389643023762e-02\n-9.32327716208241064e-02\n-1.35734658305524308e-01\n-1.66797986123887548e-01\n-1.77386593066875070e-01\n-1.59677691708252328e-01\n-1.09792007636632744e-01\n-3.05081258175729370e-02\n6.71855665087109366e-02\n1.64985789240490788e-01\n2.41382557580567592e-01\n2.78421699382508325e-01\n2.68783104870275236e-01\n2.19610266943818244e-01\n1.50153200197575248e-01\n8.33288688100126407e-02\n3.54361782151853752e-02\n1.03175732230749214e-02\n1.54887998217232759e-03\n0.0\n1.14057666429480029e-03\n4.41743442588656953e-03\n1.04418296501724676e-02\n1.96622780210179635e-02\n3.23493487095101936e-02\n4.85229368526745308e-02\n6.78395176695121283e-02\n8.94540859881290396e-02\n1.11880266870712619e-01\n1.32886442445288605e-01\n1.49482063518852848e-01\n1.58060944863238739e-01\n1.54768295481214041e-01\n1.36133739240051649e-01\n9.99522560159965823e-02\n4.62945545717553600e-02\n-2.15993216752211614e-02\n-9.69045580357946745e-02\n-1.69669203602800078e-01\n-2.28409054613921692e-01\n-2.62756520077460309e-01\n-2.66559271633850958e-01\n-2.40324516860789872e-01\n-1.91754461633251910e-01\n-1.33629382509782152e-01\n-7.94853321450819245e-02\n-3.88924142834156036e-02\n-1.47217088416221435e-02\n-3.84194802413541413e-03\n-5.19646762749812114e-04\n3.34692059759978122e-02\n5.79703652394161079e-02\n7.47658839163800742e-02\n8.81161519381207237e-02\n9.89288762746885209e-02\n1.07198626185845719e-01\n1.12436312413711270e-01\n1.13818926376336740e-01\n1.10290747717568277e-01\n1.00681373170999566e-01\n8.38689202047218918e-02\n5.90003829743528871e-02\n2.57649466640073772e-02\n-1.53054050858595497e-02\n-6.25605962907087587e-02\n-1.13062995948334036e-01\n-1.62623345701300909e-01\n-2.06137107595692648e-01\n-2.38272119857078468e-01\n-2.54465200723482443e-01\n-2.52051684510568030e-01\n-2.31215675853383373e-01\n-1.95378270030920176e-01\n-1.50714728888445920e-01\n-1.04752563520941061e-01\n-6.43995574754263472e-02\n-3.41092086489540591e-02\n-1.49660734976733902e-02\n-5.10754038556663487e-03\n-1.20683235696680629e-03\n-1.48277568096977490e-04\n0.0\n9.51031148045578477e-04\n3.68332779810504572e-03\n8.71225572312780625e-03\n1.64398894295301017e-02\n2.71728695612984440e-02\n4.11073802765163365e-02\n5.82942357864903796e-02\n7.85899106584589807e-02\n1.01599466439677336e-01\n1.26620030223797586e-01\n1.52597419301901710e-01\n1.78112629290673147e-01\n2.01417730932612171e-01\n2.20540174988537979e-01\n2.33468128110362910e-01\n2.38415130071089915e-01\n2.34139557619504085e-01\n2.20265868684882904e-01\n1.97527883756871692e-01\n1.67841736159602822e-01\n1.34131883617512132e-01\n9.98874273824301162e-02\n6.85137503280161403e-02\n4.26404998035400315e-02\n2.36057221491514403e-02\n1.13099345752814464e-02\n4.50570459413968463e-03\n1.40039555181033638e-03\n3.02095091002935927e-04\n3.39544637132938111e-05\n4.79271952569656906e-02\n8.30123372493386802e-02\n1.07147825489485884e-01\n1.26681325434370801e-01\n1.43366363602540625e-01\n1.57886681841534732e-01\n1.70483436797158328e-01\n1.81153002036432836e-01\n1.89732309162895574e-01\n1.95949228813431214e-01\n1.99464464731809288e-01\n1.99916185085960901e-01\n1.96972266437990290e-01\n1.90390893982355119e-01\n1.80086336540260017e-01\n1.66192534702206268e-01\n1.49113091036007367e-01\n1.29543395203140649e-01\n1.08450523699369611e-01\n8.70008883180437148e-02\n6.64353694028668867e-02\n4.79061752086087506e-02\n3.23056521404102986e-02\n2.01288071058233833e-02\n1.14113157315127046e-02\n5.76842010199561921e-03\n2.52897689951476915e-03\n9.23610406271516918e-04\n2.63572767978455897e-04\n5.22748915041414524e-05\n5.40780853123020900e-06\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n2.38240825235074664e-02\n4.12645213744286810e-02\n5.26994479378464845e-02\n5.96437482396808341e-02\n6.00420996705081367e-02\n5.02499562021839000e-02\n2.64811655050389352e-02\n-1.25444694521613092e-02\n-6.15978397043627016e-02\n-1.05079319015526043e-01\n-1.17419763793361914e-01\n-7.38763132375493542e-02\n2.53840765530702096e-02\n1.29562451270510692e-01\n1.44948627057307045e-01\n1.46398830963566980e-02\n-1.62197086629623372e-01\n-1.47059686598357192e-01\n1.16751590365642560e-01\n2.12079838893898615e-01\n-1.55188074481360322e-01\n-1.94753426728665191e-01\n3.68938551280933114e-01\n-2.89329473998082620e-01\n1.43498158564272810e-01\n-5.02124893718114626e-02\n1.29580261658405627e-02\n-2.51059900805332761e-03\n3.65863978895924189e-04\n-3.96241972765515047e-05\n3.09965072143923996e-06\n-1.65792360586761576e-07\n0.0\n2.32643782873687100e-03\n9.01025496668484555e-03\n2.11411518868608733e-02\n3.88584183255139270e-02\n6.05179512029145189e-02\n8.15697383111165242e-02\n9.37861413435024938e-02\n8.61132662822992612e-02\n4.88788710180393660e-02\n-1.76734976934143466e-02\n-9.30771465535944753e-02\n-1.33833774376034081e-01\n-9.28757697984486652e-02\n3.24138298293333293e-02\n1.54057220148178464e-01\n1.28810482030977752e-01\n-7.11558020308535599e-02\n-2.04651937593559263e-01\n-9.17019193115785228e-04\n2.49614874103933765e-01\n-4.92637905594505709e-02\n-2.78836145158066373e-01\n3.61105130868913327e-01\n-2.43107144405386222e-01\n1.09071866772258275e-01\n-3.53467503916243056e-02\n8.56413234964068480e-03\n-1.57211513491869429e-03\n2.18501632684762288e-04\n-2.26839141862660482e-05\n1.70781453290449499e-06\n2.24811952175667136e-02\n3.89385723317000054e-02\n4.97884330595116040e-02\n5.66337353708806293e-02\n5.78355551607349985e-02\n5.03138919508031232e-02\n3.06728899130102629e-02\n-2.78968739309723912e-03\n-4.69486098780695291e-02\n-9.04779955930978264e-02\n-1.12977747473548343e-01\n-9.11312065185155423e-02\n-1.53940868705683600e-02\n8.74409456661068563e-02\n1.46759245032650754e-01\n8.80370635792994821e-02\n-7.48694550445843238e-02\n-1.80280640963033922e-01\n-5.18321274057967976e-02\n1.88681460743920559e-01\n1.19495353940214918e-01\n-2.29403602658131173e-01\n-6.58079623281328796e-02\n3.32741395413169716e-01\n-3.34697913032353578e-01\n1.98088265107050771e-01\n-8.12078561346930156e-02\n2.45133493927398201e-02\n-5.59765643504482168e-03\n9.76291473232333644e-04\n-1.29690704056562034e-04\n1.29282256992436070e-05\n0.0\n2.07806285265645140e-03\n8.04830282071071317e-03\n1.89014745768757951e-02\n3.48478692805497745e-02\n5.46583983720786218e-02\n7.47443013782353449e-02\n8.84323005734437700e-02\n8.63557852097161793e-02\n5.92859037366238253e-02\n4.39362123202307990e-03\n-6.62001073998269712e-02\n-1.20294103918731493e-01\n-1.14591417306107141e-01\n-2.65481567909567652e-02\n1.01993443731604225e-01\n1.57538593275366873e-01\n4.57361676070577247e-02\n-1.48628062072217765e-01\n-1.55742235121629269e-01\n1.09770304698344937e-01\n2.06966956513447792e-01\n-1.61362486114899339e-01\n-1.71879875485470845e-01\n3.57002281464585458e-01\n-2.96970494357431614e-01\n1.57163566541779348e-01\n-5.93527842697361210e-02\n1.67706107469508814e-02\n-3.62151686071748380e-03\n6.01624941951586214e-04\n-7.65357433913478808e-05\n2.12816503096068393e-02\n3.68608996051529719e-02\n4.71793263362445814e-02\n5.38928418850740804e-02\n5.56915913947036295e-02\n4.99582736405972533e-02\n3.36631066869190060e-02\n4.91156908363329665e-03\n-3.45857623580518858e-02\n-7.66380629202753766e-02\n-1.05131198342495721e-01\n-9.93307867024927488e-02\n-4.52185884362329982e-02\n4.63278736956769521e-02\n1.26520898930721493e-01\n1.24501303183082099e-01\n8.76149377392218195e-03\n-1.39009840285587216e-01\n-1.45430725209137801e-01\n5.23901069414082765e-02\n2.03641230495958780e-01\n3.34229157852650605e-03\n-2.44704413256374209e-01\n6.30482840383843751e-02\n2.56722185697728644e-01\n-3.55963784469465194e-01\n2.54118864466032990e-01\n-1.21807850568864284e-01\n4.26606711097116675e-02\n-1.13315026794273497e-02\n2.32099260609221723e-03\n-3.68093456135718715e-04\n0.0\n1.86745732005106236e-03\n7.23263110031089826e-03\n1.69990968820891049e-02\n3.14211578906684122e-02\n4.95772063405158434e-02\n6.86104812167576961e-02\n8.30695195794672464e-02\n8.50243686005431737e-02\n6.59726128319111926e-02\n2.14395652155587070e-02\n-4.21206541088700245e-02\n-1.01605181852492982e-01\n-1.20244553740076657e-01\n-6.76016426112763247e-02\n4.51760564476503118e-02\n1.41525307234932812e-01\n1.16379324727554592e-01\n-4.65345052147974961e-02\n-1.79019179175746029e-01\n-6.59803296603801714e-02\n1.83093392412426587e-01\n1.16520280712144875e-01\n-2.28916217845617831e-01\n-4.61698221137645456e-02\n3.14408672325463268e-01\n-3.35841069654497282e-01\n2.10846363924268365e-01\n-9.24607601778326127e-02\n3.02012060287487269e-02\n-7.56926685957885412e-03\n1.47453550333635146e-03\n2.02036712782826394e-02\n3.49937851534055794e-02\n4.48279269142168452e-02\n5.13900330441282166e-02\n5.36329821207808671e-02\n4.93210846628195226e-02\n3.57573433171337121e-02\n1.09920691574848222e-02\n-2.42158667816864265e-02\n-6.39780264292457018e-02\n-9.56384495086200076e-02\n-1.01335918321479090e-01\n-6.55769203655762467e-02\n1.07490617960213034e-02\n9.64824250014629653e-02\n1.32699721811340765e-01\n6.94679944721058318e-02\n-7.01538836855221115e-02\n-1.60636272578423195e-01\n-7.03430228350476333e-02\n1.35632407838540942e-01\n1.61147189425747961e-01\n-1.05281928398847827e-01\n-2.01030111107675574e-01\n1.67808098182230192e-01\n1.49443045440624006e-01\n-3.44346872388000602e-01\n3.03190391485451960e-01\n-1.70325381564832151e-01\n6.88855301778071027e-02\n-2.10864221849190632e-02\n5.00299794491102217e-03\n0.0\n1.68734682293617813e-03\n6.53506614450781280e-03\n1.53697965331887152e-02\n2.84717243113477535e-02\n4.51497613308622439e-02\n6.31111733598644781e-02\n7.78717403521764912e-02\n8.27098586272540237e-02\n6.99454958827081669e-02\n3.43279738182702895e-02\n-2.14723731497292042e-02\n-8.13645097639329462e-02\n-1.15536305606098719e-01\n-9.23185964422883198e-02\n-4.50067079342172938e-03\n1.03351993841523992e-01\n1.40933017836289476e-01\n4.38208182047157765e-02\n-1.21191081822659336e-01\n-1.56193577692636476e-01\n3.71394846062672937e-02\n2.01853605213816706e-01\n3.36384453441027163e-03\n-2.39765813593070115e-01\n7.67016383263633000e-02\n2.34818972445945934e-01\n-3.49682295804751742e-01\n2.63906400143823716e-01\n-1.34392754787879709e-01\n5.04624829460469659e-02\n-1.45365860570748403e-02\n1.92312339082816343e-02\n3.33094742213851797e-02\n4.27016311613837365e-02\n4.91020075143351192e-02\n5.16751124190139438e-02\n4.85018442668714161e-02\n3.71824208685736513e-02\n1.57925256315466743e-02\n-1.55469584325996068e-02\n-5.26423124085497185e-02\n-8.55879273816065600e-02\n-9.92812656909635854e-02\n-7.83909608397767160e-02\n-1.78856718745819231e-02\n6.42283248484003533e-02\n1.22694223371054206e-01\n1.04581139920280813e-01\n-2.84304170865947716e-03\n-1.26706123567818796e-01\n-1.35338247845332826e-01\n2.14881770886510282e-02\n1.75467173019106082e-01\n7.63088148095342617e-02\n-1.78725352129448622e-01\n-1.11988700135074906e-01\n2.28635117061249421e-01\n2.69612587514689202e-02\n-2.95879353199783757e-01\n3.35650141705743865e-01\n-2.22713759379834148e-01\n1.03851315018956544e-01\n-3.64058890155023254e-02\n0.0\n1.53289311452842886e-03\n5.93686950408462387e-03\n1.39708866467732149e-02\n2.59289147653614729e-02\n4.12942332300844372e-02\n5.82125166562384166e-02\n7.29690863394108630e-02\n7.98502005724475716e-02\n7.19940147595992952e-02\n4.38937721271222270e-02\n-4.26113306593972618e-03\n-6.16403074620943681e-02\n-1.04797591311348651e-01\n-1.04171146215701393e-01\n-4.27702856513659871e-02\n5.87576841915410722e-02\n1.32784259634336654e-01\n1.01468029308432933e-01\n-3.85011527182909236e-02\n-1.57699998482459691e-01\n-8.94657331446391813e-02\n1.23985331832972015e-01\n1.64336880209912606e-01\n-1.02876004443515218e-01\n-1.94563296453584111e-01\n1.74330147911441857e-01\n1.27597205632080962e-01\n-3.31257971276801677e-01\n3.08270298886972938e-01\n-1.83065598490963100e-01\n7.87976893267801626e-02\n1.83934615658374843e-02\n3.18584099590959180e-02\n4.08673672083379180e-02\n4.71165047184334343e-02\n4.99407658548485928e-02\n4.76815851023425219e-02\n3.81972302713983053e-02\n1.96302285288182388e-02\n-8.32351892567101750e-03\n-4.27153914901569204e-02\n-7.57951394647851245e-02\n-9.49089142894196658e-02\n-8.56869176980140229e-02\n-3.98353893270479778e-02\n3.39599025891893086e-02\n1.02902760972465770e-01\n1.18628376156461740e-01\n4.99512700832142609e-02\n-7.25614323499949865e-02\n-1.46102091408647300e-01\n-7.24432487134545333e-02\n1.03100854330187758e-01\n1.63319697987232310e-01\n-2.49423021441391030e-02\n-2.00320441669030180e-01\n-1.76410472450625778e-03\n2.35503915419933429e-01\n-8.99838730264271858e-02\n-2.14340373991317279e-01\n3.43875731825775022e-01\n-2.73640113962204168e-01\n1.47353016475964771e-01\n0.0\n1.41026552803275745e-03\n5.46193490380127850e-03\n1.28596541206987408e-02\n2.39054907541256002e-02\n3.82133635296424828e-02\n5.42625065011213686e-02\n6.89328255397490958e-02\n7.73143363068604511e-02\n7.32672185824220362e-02\n5.12892104615549488e-02\n9.96147991660998981e-03\n-4.37292852028541013e-02\n-9.16449698881778851e-02\n-1.07572573871248134e-01\n-7.00574145759740585e-02\n1.66249712174985388e-02\n1.06781557883534203e-01\n1.27175959203697925e-01\n3.56095793440405900e-02\n-1.07616087417496134e-01\n-1.48654384584186644e-01\n-5.92652814962038436e-04\n1.72407258850032580e-01\n8.53932811060960084e-02\n-1.76845522824323420e-01\n-1.08810355380805662e-01\n2.30710933206873470e-01\n1.07960341531032449e-02\n-2.83553043040071784e-01\n3.40565388940867186e-01\n-2.37795914183912077e-01\n1.79977842089472789e-02\n3.11730766735575232e-02\n4.00107241765601945e-02\n4.62359917398033893e-02\n4.93147112050140654e-02\n4.77802886744069649e-02\n3.96813724458369779e-02\n2.32160125766966430e-02\n-2.21598451900220043e-03\n-3.45617915368712017e-02\n-6.76704824482667611e-02\n-9.08253589747558820e-02\n-9.07380622016612792e-02\n-5.73279568811067564e-02\n7.15103128872189055e-03\n7.99710703285825553e-02\n1.19725671469554928e-01\n8.72925311560696082e-02\n-1.63601710503634701e-02\n-1.22939114451817155e-01\n-1.27170391340530264e-01\n7.68378076834325390e-03\n1.54477733397451827e-01\n1.09185851624538394e-01\n-1.14602855665466158e-01\n-1.73048512715316960e-01\n1.00981995767843793e-01\n1.97797517103213361e-01\n-1.82130407532216265e-01\n-1.21887163940156792e-01\n3.41136558014031532e-01\n-3.31643967707185183e-01\n0.0\n1.34795925770952833e-03\n5.22062375647511494e-03\n1.22970998385415493e-02\n2.28937185919969553e-02\n3.67196159283120147e-02\n5.24844962734437176e-02\n6.74732167884119771e-02\n7.73203047836398399e-02\n7.63722111559955869e-02\n5.91155562601801410e-02\n2.29823852915340722e-02\n-2.78383161033533034e-02\n-7.92848666068292629e-02\n-1.08294858490107532e-01\n-9.14018906797772340e-02\n-2.17119217968033199e-02\n7.33812947677466576e-02\n1.31849066253588332e-01\n9.29315072425717925e-02\n-3.74392014175609980e-02\n-1.49609452862883741e-01\n-1.04993419009086861e-01\n8.41989435625958987e-02\n1.79759432912642930e-01\n-5.32853119584910436e-03\n-2.11382516837100409e-01\n-1.59106434082790203e-02\n2.52441601419593931e-01\n-8.44601350028355430e-02\n-2.52518303212934281e-01\n4.02473741864963208e-01\n1.84556282325559450e-02\n3.19660857843894960e-02\n4.10505941966575749e-02\n4.75425800398500686e-02\n5.10089223364161362e-02\n5.01015363645958833e-02\n4.29709469531842220e-02\n2.78119297518807616e-02\n3.76862245604386989e-03\n-2.77841566601185544e-02\n-6.18685161269085931e-02\n-8.91840120132281339e-02\n-9.72582984040330362e-02\n-7.47407905017906660e-02\n-1.90383099149147722e-02\n5.53082452041482459e-02\n1.14085516533618508e-01\n1.15378326860793620e-01\n3.92281626038197689e-02\n-7.90806409301980928e-02\n-1.47768930506717799e-01\n-8.33918482168015257e-02\n8.22519469687513771e-02\n1.72944273528840398e-01\n4.04409250869408737e-02\n-1.75704180476219551e-01\n-1.26442266066556064e-01\n1.74214915619707172e-01\n1.58337427856392432e-01\n-2.42772021074977085e-01\n-9.12315830073607004e-02\n4.30304795239984772e-01\n0.0\n1.33573402921051626e-03\n5.17327565009486050e-03\n1.21911240294397764e-02\n2.27301526250022062e-02\n3.65798972874086248e-02\n5.26253265176312018e-02\n6.84481063374673543e-02\n8.00713290110215553e-02\n8.21680668215820226e-02\n6.91488940664843066e-02\n3.74582639551684707e-02\n-1.10594806004352363e-02\n-6.58670824087776718e-02\n-1.07019538344513832e-01\n-1.10374999499764426e-01\n-6.06681998190760213e-02\n3.10620799232220780e-02\n1.18025238551463643e-01\n1.34171961408195539e-01\n4.42327916445879182e-02\n-9.99623108369196295e-02\n-1.64369253845940477e-01\n-5.08075745592781250e-02\n1.45718811225365286e-01\n1.66588273832618622e-01\n-7.36087877003347574e-02\n-2.27154418753041487e-01\n3.63123230397213587e-02\n2.81521470638570470e-01\n-9.44554396576112454e-02\n-4.11638462508449599e-01\n1.94061983243049643e-02\n3.36125214794542118e-02\n4.31888754404685937e-02\n5.01329342109264470e-02\n5.41142033443020171e-02\n5.38872882495924702e-02\n4.76830138710851933e-02\n3.36793523917405038e-02\n1.07779696093774358e-02\n-2.02688905695429175e-02\n-5.55692564795435273e-02\n-8.71922552695893749e-02\n-1.03629679916164827e-01\n-9.27767683433196183e-02\n-4.80272140879695331e-02\n2.37942040312276171e-02\n9.70872786580647545e-02\n1.31947786756166308e-01\n9.43009610440565804e-02\n-1.24561687339860561e-02\n-1.26395715849415363e-01\n-1.50720958769431951e-01\n-3.56757034777559490e-02\n1.35130490637421663e-01\n1.73423233826547646e-01\n-9.82748800834875105e-03\n-2.10337200157125759e-01\n-1.08108528472381671e-01\n2.08741976848842492e-01\n1.90979377402343053e-01\n-2.51529032956367415e-01\n-3.57650327925712053e-01\n0.0\n1.32680732524590871e-03\n5.13870267430341192e-03\n1.21154215413835867e-02\n2.26240509078721175e-02\n3.65365333671221759e-02\n5.29168528160063739e-02\n6.96532739569739878e-02\n8.31838973528227360e-02\n8.85715317157007576e-02\n8.02757094183079584e-02\n5.39448079791206223e-02\n9.25702130163845796e-03\n-4.68665575611663249e-02\n-9.84328986987657445e-02\n-1.22658278002949317e-01\n-9.88153294300171958e-02\n-2.30868355840878649e-02\n7.74572698938100906e-02\n1.45515922468267389e-01\n1.22177613430645177e-01\n-6.30686925673234339e-04\n-1.41754385914503123e-01\n-1.66401338981061492e-01\n-1.45347855964571317e-02\n1.79827244659349961e-01\n1.69529343833524554e-01\n-9.03400163128108419e-02\n-2.61019554127662090e-01\n-1.96840886713787952e-02\n3.45741092516712811e-01\n2.85485370419815310e-01\n2.04939369417662803e-02\n3.54965400302519329e-02\n4.56361441339866863e-02\n5.30996275594860234e-02\n5.76766563663889398e-02\n5.82457601215907311e-02\n5.31455423009661101e-02\n4.05711259196231550e-02\n1.92178586531560093e-02\n-1.07629324004100239e-02\n-4.66024400861526494e-02\n-8.19257669860806725e-02\n-1.06658401412331724e-01\n-1.08796050649311263e-01\n-7.88098616193654844e-02\n-1.63756131948235815e-02\n6.30724691016917582e-02\n1.27112135735086895e-01\n1.36537673176879815e-01\n6.89803154402826024e-02\n-5.34198607467097700e-02\n-1.55939309104813323e-01\n-1.48835353889893135e-01\n-7.87964133655337517e-03\n1.63256863542422775e-01\n1.85200408172259329e-01\n-1.00270867858088929e-02\n-2.29703177163776806e-01\n-1.73233313827127117e-01\n1.59883849684513191e-01\n3.69326905406592132e-01\n2.10844187635108926e-01\n0.0\n1.30720558375190541e-03\n5.06278545594047481e-03\n1.19423738951690596e-02\n2.23369665872281790e-02\n3.62039745430471349e-02\n5.27995118270578392e-02\n7.03501805451447054e-02\n8.57745620909905609e-02\n9.46479483043652925e-02\n9.16854097588673256e-02\n7.20328716838755795e-02\n3.34985047559321902e-02\n-2.05883498435186635e-02\n-7.89709682590159223e-02\n-1.22470617611001253e-01\n-1.28720252276428804e-01\n-8.27430590642841551e-02\n9.16928635820986153e-03\n1.10416123436223354e-01\n1.61968268091357476e-01\n1.14847389989174181e-01\n-2.32811808531076039e-02\n-1.63964027912756494e-01\n-1.81319676531747881e-01\n-2.50880230709381591e-02\n1.85411063474619719e-01\n2.24835544489170674e-01\n-8.18326626684838542e-04\n-2.88038233247135733e-01\n-3.35782877007210379e-01\n-1.44565403506270562e-01\n2.17389466400278869e-02\n3.76529600835570355e-02\n4.84378305150310676e-02\n5.64986835511131213e-02\n6.17663001820221089e-02\n6.32691190140265147e-02\n5.94883785898603010e-02\n4.86823304997927309e-02\n2.93959002614606960e-02\n1.23216715705498354e-03\n-3.41569559711867449e-02\n-7.20916629724447922e-02\n-1.04384716035211988e-01\n-1.20090627629219460e-01\n-1.08238009016755093e-01\n-6.28064369638275527e-02\n1.10673892330536445e-02\n9.26288040895288101e-02\n1.47485516619152157e-01\n1.40243980797088719e-01\n5.70434290669704566e-02\n-7.25291577636670015e-02\n-1.74134630430911319e-01\n-1.65655285433722044e-01\n-2.49445560738776433e-02\n1.60614912965481277e-01\n2.30724911735049304e-01\n8.77993636556723411e-02\n-1.77465475318299759e-01\n-3.38391658032671405e-01\n-2.69051849921736863e-01\n-9.20926627150752825e-02\n0.0\n1.27597050751100389e-03\n4.94181252584194406e-03\n1.16630498253808956e-02\n2.18511241645472989e-02\n3.55495407028015437e-02\n5.22150435070725463e-02\n7.04371663677188231e-02\n8.76725271526448968e-02\n1.00129759483680331e-01\n1.03006674152481673e-01\n9.13152066567531201e-02\n6.14675072726726043e-02\n1.35568575178667827e-02\n-4.62060524819602678e-02\n-1.04092135843300557e-01\n-1.40226870347025412e-01\n-1.34348265019917312e-01\n-7.60351153207080438e-02\n2.37752473367888947e-02\n1.27208063632852308e-01\n1.78833167076835192e-01\n1.34117928586538177e-01\n-2.88003486256251367e-03\n-1.59639209878609523e-01\n-2.23838872063551436e-01\n-1.22817469476326019e-01\n9.92191272555064674e-02\n2.91040244256376979e-01\n3.18040048098368444e-01\n1.93032514747965622e-01\n5.44436285342008511e-02\n2.32475767392673130e-02\n4.02659840652673934e-02\n5.18318387885065221e-02\n6.06120670295972400e-02\n6.67042911431370844e-02\n6.93162470322742641e-02\n6.71115326475584112e-02\n5.84673257566770757e-02\n4.18543606707530921e-02\n1.64189485474018973e-02\n-1.72317843348816085e-02\n-5.61573610911629134e-02\n-9.44104910704470501e-02\n-1.23041047321362548e-01\n-1.31373064501619036e-01\n-1.10023773987359449e-01\n-5.55631667343420010e-02\n2.44007445839714773e-02\n1.08347495765123841e-01\n1.63743024006303250e-01\n1.58352554980977639e-01\n7.86050664801294652e-02\n-5.30579103366749724e-02\n-1.75648078941482350e-01\n-2.13624640464443294e-01\n-1.23716985956769027e-01\n6.32909220012381202e-02\n2.46234254943055425e-01\n3.18860080991938299e-01\n2.54017916289703216e-01\n1.24879454704159648e-01\n2.97873246944008255e-02\n0.0\n1.23031419181136555e-03\n4.76498637548805615e-03\n1.12517656750831911e-02\n2.11171872962382969e-02\n3.44885589160452630e-02\n5.10269302389047413e-02\n6.97021518203256724e-02\n8.85580511241777640e-02\n1.04553524587987889e-01\n1.13611954013826788e-01\n1.11047795433055513e-01\n9.25317249930818764e-02\n5.56568963680760392e-02\n1.93232593296195718e-03\n-6.13541981338658823e-02\n-1.20407748523217784e-01\n-1.56611619440776451e-01\n-1.51624563343638774e-01\n-9.56557491254662051e-02\n3.55894708619349876e-03\n1.16047875761212893e-01\n1.95025605515661005e-01\n1.95252574471985851e-01\n9.91928624136288323e-02\n-6.38232677849007862e-02\n-2.23390945123931234e-01\n-3.04815852837779344e-01\n-2.77534039643389574e-01\n-1.76640398935723530e-01\n-7.29767630195322231e-02\n-1.50162199318490050e-02\n2.51953473363836708e-02\n4.36396217009616949e-02\n5.62110852716495440e-02\n6.59067721698351205e-02\n7.30261678415637244e-02\n7.69931339584777746e-02\n7.67027754698551556e-02\n7.07222823031528475e-02\n5.75516632151973698e-02\n3.60206572541552569e-02\n5.84693491572261734e-03\n-3.16824829684201822e-02\n-7.30396989886893389e-02\n-1.12049373464317981e-01\n-1.40116802469156254e-01\n-1.47495478103627065e-01\n-1.25849538780926556e-01\n-7.19310351628587030e-02\n8.54492040884387988e-03\n9.85938372784637140e-02\n1.71472268086520302e-01\n1.97659326863894425e-01\n1.56738335375151389e-01\n5.00329992434478746e-02\n-9.32978864556236326e-02\n-2.23671862952032896e-01\n-2.92727564725533074e-01\n-2.79306893408631185e-01\n-2.02298681016843868e-01\n-1.07948572888150338e-01\n-3.84367528122612143e-02\n-6.93037087157029764e-03\n0.0\n1.16397915716404663e-03\n4.50807189102889801e-03\n1.06510236415632252e-02\n2.00256060384390658e-02\n3.28361667797090404e-02\n4.89451710126288728e-02\n6.77106059861613541e-02\n8.78005191634277232e-02\n1.07030519362161514e-01\n1.22297361876545732e-01\n1.29708926190498924e-01\n1.25024059950258087e-01\n1.04493543513096990e-01\n6.61103010841561228e-02\n1.11139527603515680e-02\n-5.46406815807577440e-02\n-1.20089546615684620e-01\n-1.69907330625555603e-01\n-1.87585555220101063e-01\n-1.60570147125036450e-01\n-8.62525077260386658e-02\n2.36433584697323396e-02\n1.43313891746050859e-01\n2.39753865520593246e-01\n2.85148677424091779e-01\n2.69573849433636881e-01\n2.06465704281813683e-01\n1.25852886086710913e-01\n5.80135528196603079e-02\n1.81354882788780300e-02\n2.90191183086864826e-03\n2.79638858935285124e-02\n4.84348711446499977e-02\n6.24297681146167710e-02\n7.33975379454266108e-02\n8.18940925889223847e-02\n8.76108775666245149e-02\n8.97403193966885004e-02\n8.71348817261267672e-02\n7.84669807259971847e-02\n6.24582890530157725e-02\n3.82099648072294004e-02\n5.63634066892604486e-03\n-3.40360803382095053e-02\n-7.77990625874933894e-02\n-1.20583122330300802e-01\n-1.55383471459446809e-01\n-1.74014607757999373e-01\n-1.68631130561254977e-01\n-1.33934692022314256e-01\n-6.96397737531152944e-02\n1.76208061263021624e-02\n1.14014421826042364e-01\n2.00748666176366025e-01\n2.58948755911686035e-01\n2.75964853133848109e-01\n2.50577562135469167e-01\n1.94189106206224010e-01\n1.26479387266697024e-01\n6.70158769635668533e-02\n2.72392047524359672e-02\n7.58283779706356385e-03\n1.08816473009799484e-03\n0.0\n1.06313115923663618e-03\n4.11748927455767716e-03\n9.73380850250987056e-03\n1.83349999684629672e-02\n3.01872271334349268e-02\n4.53398346784278303e-02\n6.35298495413676861e-02\n8.40629637631314930e-02\n1.05689332073281697e-01\n1.26503757223432239e-01\n1.43913141849894177e-01\n1.54725420841281852e-01\n1.55417062365750813e-01\n1.42621823507837225e-01\n1.13842513845157436e-01\n6.83147148475191091e-02\n7.85216890469087568e-03\n-6.25981484657225223e-02\n-1.35020792143346446e-01\n-1.99296648165293633e-01\n-2.45137793702057294e-01\n-2.64689732209155593e-01\n-2.55061495797528348e-01\n-2.19757078317984217e-01\n-1.68109462125287767e-01\n-1.12511513124321422e-01\n-6.43250525296907433e-02\n-3.02585768650184619e-02\n-1.10089290628608005e-02\n-2.76007476913446050e-03\n-3.58371533166736741e-04\n3.26981324549439067e-02\n5.66348267245797080e-02\n7.30498907070873671e-02\n8.61244743217101649e-02\n9.67800507840643059e-02\n1.05063744290760999e-01\n1.10567733963575859e-01\n1.12571823925083553e-01\n1.10133263529556769e-01\n1.02185812850348709e-01\n8.76745315140824433e-02\n6.57384733832784840e-02\n3.59407717238961130e-02\n-1.47087189291541013e-03\n-4.53113783770540610e-02\n-9.32743461546741287e-02\n-1.41896690637783263e-01\n-1.86755045754138899e-01\n-2.22952899542695954e-01\n-2.45895748840747719e-01\n-2.52253238867341467e-01\n-2.40892635298735197e-01\n-2.13481267095387145e-01\n-1.74457032594306366e-01\n-1.30205810895831581e-01\n-8.75614766637105857e-02\n-5.20699125321041900e-02\n-2.66634049939079541e-02\n-1.13031448267673813e-02\n-3.72386624709742774e-03\n-8.48608647458522496e-04\n-1.00450082094999637e-04\n0.0\n8.85848916706437925e-04\n3.43087810165991491e-03\n8.11547029214784547e-03\n1.53158178859748688e-02\n2.53223789059663848e-02\n3.83286144025663314e-02\n5.44020306192471159e-02\n7.34426207403964804e-02\n9.51335139875176261e-02\n1.18890639129078712e-01\n1.43821316358462570e-01\n1.68705107803668153e-01\n1.92012909024777106e-01\n2.11980625632304409e-01\n2.26749972393489208e-01\n2.34579164491290626e-01\n2.34109680840303563e-01\n2.24653127416541948e-01\n2.06439088269487064e-01\n1.80749090235869436e-01\n1.49864339136413227e-01\n1.16785332112443102e-01\n8.47418311157932397e-02\n5.65897791810682643e-02\n3.42587019727801090e-02\n1.84307863549550630e-02\n8.57293839633305882e-03\n3.31219719021697261e-03\n9.97250417026829825e-04\n2.08155431407700079e-04\n2.26097044412430697e-05\n4.68041435444426362e-02\n8.10671546237215213e-02\n1.04638896940907458e-01\n1.23723566134089275e-01\n1.40043290075962890e-01\n1.54280573994576370e-01\n1.66691102814813530e-01\n1.77296639622364610e-01\n1.85967253033562957e-01\n1.92468236767334211e-01\n1.96497277531303277e-01\n1.97722672847450043e-01\n1.95827495425577924e-01\n1.90561047059817856e-01\n1.81795761257460553e-01\n1.69584345587367014e-01\n1.54208556250555379e-01\n1.36208261424712124e-01\n1.16378503337863676e-01\n9.57244312190808910e-02\n7.53702788908262034e-02\n5.64290339652666062e-02\n3.98523818998963303e-02\n2.62921030715053822e-02\n1.60090406679559219e-02\n8.85913797970168740e-03\n4.36636453260917656e-03\n1.86424949107061094e-03\n6.62248776156327732e-04\n1.83598822917731746e-04\n3.53303583893397935e-05\n3.54154425010445197e-06\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n2.38240825235074664e-02\n4.12645213744286810e-02\n5.26994479378464845e-02\n5.96437482396808272e-02\n6.00420996705081297e-02\n5.02499562021839000e-02\n2.64811655050389352e-02\n-1.25444694521613075e-02\n-6.15978397043627016e-02\n-1.05079319015526029e-01\n-1.17419763793361914e-01\n-7.38763132375493542e-02\n2.53840765530702096e-02\n1.29562451270510692e-01\n1.44948627057307045e-01\n1.46398830963566963e-02\n-1.62197086629623372e-01\n-1.47059686598357192e-01\n1.16751590365642560e-01\n2.12079838893898615e-01\n-1.55188074481360294e-01\n-1.94753426728665163e-01\n3.68938551280933114e-01\n-2.89329473998082620e-01\n1.43498158564272810e-01\n-5.02124893718114626e-02\n1.29580261658405627e-02\n-2.51059900805332718e-03\n3.65863978895924189e-04\n-3.96241972765515047e-05\n3.09965072143923996e-06\n-1.65792360586761576e-07\n5.43236853336919907e-09\n0.0\n2.32643782873685322e-03\n9.01025496668477442e-03\n2.11411518868607103e-02\n3.88584183255136287e-02\n6.05179512029140540e-02\n8.15697383111158858e-02\n9.37861413435017721e-02\n8.61132662822985950e-02\n4.88788710180389913e-02\n-1.76734976934142078e-02\n-9.30771465535937537e-02\n-1.33833774376033027e-01\n-9.28757697984479436e-02\n3.24138298293330795e-02\n1.54057220148177271e-01\n1.28810482030976753e-01\n-7.11558020308530048e-02\n-2.04651937593557681e-01\n-9.17019193115771350e-04\n2.49614874103931822e-01\n-4.92637905594501962e-02\n-2.78836145158064208e-01\n3.61105130868910496e-01\n-2.43107144405384334e-01\n1.09071866772257428e-01\n-3.53467503916240280e-02\n8.56413234964061888e-03\n-1.57211513491868214e-03\n2.18501632684760607e-04\n-2.26839141862658720e-05\n1.70781453290448186e-06\n-8.82056392174331490e-08\n2.24811952175471737e-02\n3.89385723316661644e-02\n4.97884330594683261e-02\n5.66337353708313979e-02\n5.78355551606847124e-02\n5.03138919507593596e-02\n3.06728899129835413e-02\n-2.78968739309491199e-03\n-4.69486098780288463e-02\n-9.04779955930192781e-02\n-1.12977747473450130e-01\n-9.11312065184361059e-02\n-1.53940868705545551e-02\n8.74409456660312362e-02\n1.46759245032523078e-01\n8.80370635792221690e-02\n-7.48694550445200974e-02\n-1.80280640962876770e-01\n-5.18321274057499948e-02\n1.88681460743756690e-01\n1.19495353940108184e-01\n-2.29403602657931277e-01\n-6.58079623280712067e-02\n3.32741395412873953e-01\n-3.34697913032057592e-01\n1.98088265106875938e-01\n-8.12078561346214201e-02\n2.45133493927182228e-02\n-5.59765643503989246e-03\n9.76291473231474089e-04\n-1.29690704056447867e-04\n1.29282256992322279e-05\n-9.38087883931939055e-07\n0.0\n2.07806285254757582e-03\n8.04830282028904179e-03\n1.89014745758854727e-02\n3.48478692787238045e-02\n5.46583983692140521e-02\n7.47443013743165768e-02\n8.84323005688038427e-02\n8.63557852051781427e-02\n5.92859037334951405e-02\n4.39362123176376563e-03\n-6.62001073963830317e-02\n-1.20294103912427910e-01\n-1.14591417300057785e-01\n-2.65481567894857440e-02\n1.01993443726312000e-01\n1.57538593267051830e-01\n4.57361676045037122e-02\n-1.48628062064480426e-01\n-1.55742235113246030e-01\n1.09770304692757933e-01\n2.06966956502242005e-01\n-1.61362486106573527e-01\n-1.71879875475749178e-01\n3.57002281445050029e-01\n-2.96970494341301849e-01\n1.57163566533272070e-01\n-5.93527842665295541e-02\n1.67706107460459386e-02\n-3.62151686052222289e-03\n6.01624941919166076e-04\n-7.65357433872250801e-05\n7.33749012839107027e-06\n2.12816502685388639e-02\n3.68608995340211493e-02\n4.71793262451967454e-02\n5.38928417810504157e-02\n5.56915912871507879e-02\n4.99582735439863534e-02\n3.36631066215515792e-02\n4.91156907349162269e-03\n-3.45857622921770247e-02\n-7.66380627731771125e-02\n-1.05131198139782236e-01\n-9.93307865096657028e-02\n-4.52185883462815075e-02\n4.63278736094836219e-02\n1.26520898687672606e-01\n1.24501302939223346e-01\n8.76149375000816882e-03\n-1.39009840020157205e-01\n-1.45430724920051241e-01\n5.23901068514729257e-02\n2.03641230095112036e-01\n3.34229155254040736e-03\n-2.44704412768231849e-01\n6.30482839393254613e-02\n2.56722185151324278e-01\n-3.55963783734328632e-01\n2.54118863946312223e-01\n-1.21807850320960961e-01\n4.26606710231407366e-02\n-1.13315026564754905e-02\n2.32099260139699299e-03\n-3.68093455391732625e-04\n4.49246874353744315e-05\n0.0\n1.86745723332197209e-03\n7.23263076441057681e-03\n1.69990960925643260e-02\n3.14211564310238473e-02\n4.95772040364090769e-02\n6.86104780252145136e-02\n8.30695157087558561e-02\n8.50243646254830732e-02\n6.59726097229209191e-02\n2.14395641577023247e-02\n-4.21206522145472217e-02\n-1.01605177157160109e-01\n-1.20244548094797343e-01\n-6.76016393164804857e-02\n4.51760545155207097e-02\n1.41525300664201020e-01\n1.16379319056123559e-01\n-4.65345033657805218e-02\n-1.79019170727708898e-01\n-6.59803260077719556e-02\n1.83093383930629128e-01\n1.16520274361999993e-01\n-2.28916206967706898e-01\n-4.61698186215079506e-02\n3.14408655611173982e-01\n-3.35841052329481971e-01\n2.10846353176961931e-01\n-9.24607554953788546e-02\n3.02012045053870991e-02\n-7.56926647878776969e-03\n1.47453542928972455e-03\n-2.23710680306839709e-04\n2.02036555725649200e-02\n3.49937579503045160e-02\n4.48278920631395850e-02\n5.13899930760676124e-02\n5.36329403642773414e-02\n4.93210461634920050e-02\n3.57573152020774707e-02\n1.09920600819101537e-02\n-2.42158486803505518e-02\n-6.39779774333085610e-02\n-9.56383755173187133e-02\n-1.01335838964471570e-01\n-6.55768674956553471e-02\n1.07490562320946368e-02\n9.64823520086268566e-02\n1.32699617481566806e-01\n6.94679353549977618e-02\n-7.01538344085327059e-02\n-1.60636145937832764e-01\n-7.03429580550241906e-02\n1.35632307527301793e-01\n1.61147050971059080e-01\n-1.05281857811345123e-01\n-2.01029932861081173e-01\n1.67807975317422198e-01\n1.49442886350065474e-01\n-3.44346553727684968e-01\n3.03190119504060607e-01\n-1.70325230937504180e-01\n6.88854697555074946e-02\n-2.10864037852709768e-02\n5.00299359465619133e-03\n-9.29183639236160191e-04\n0.0\n1.68733136728886060e-03\n6.53500628504314739e-03\n1.53696557346749002e-02\n2.84714633967155517e-02\n4.51493472413323285e-02\n6.31105936056556571e-02\n7.78710228560496320e-02\n8.27090922121669625e-02\n6.99448397043519188e-02\n3.43276369147221608e-02\n-2.14722014886496622e-02\n-8.13637804641823004e-02\n-1.15535237446642555e-01\n-9.23177042736879200e-02\n-4.50056115788092549e-03\n1.03351085468230200e-01\n1.40931674903079840e-01\n4.38202871666811475e-02\n-1.21190037108977619e-01\n-1.56192004652178390e-01\n3.71393446437390737e-02\n2.01851619076419964e-01\n3.36348154504614990e-03\n-2.39763327560883643e-01\n7.67012908438364088e-02\n2.34815954900762458e-01\n-3.49678234444593339e-01\n2.63903434043823326e-01\n-1.34391269292679083e-01\n5.04619307258321881e-02\n-1.45364280194523569e-02\n3.27456687557667195e-03\n1.92297006631424114e-02\n3.33068185629035937e-02\n4.26982261543597044e-02\n4.90980895624680350e-02\n5.16709817500530244e-02\n4.84979504953095553e-02\n3.71794020209489304e-02\n1.57911742789633332e-02\n-1.55458490747420897e-02\n-5.26382592279504152e-02\n-8.55812000279094209e-02\n-9.92733046454988693e-02\n-7.83844377199080095e-02\n-1.78837590573650944e-02\n6.42236899998832045e-02\n1.22684520337276698e-01\n1.04572149937989717e-01\n-2.84393367737569534e-03\n-1.26696521878152946e-01\n-1.35326308999776435e-01\n2.14883865416974351e-02\n1.75452918491669191e-01\n7.62996075965258619e-02\n-1.78711569161329714e-01\n-1.11974860063654494e-01\n2.28615758997085305e-01\n2.69520482015755194e-02\n-2.95844638053076592e-01\n3.35614041314886091e-01\n-2.22690633120737613e-01\n1.03840737004628925e-01\n-3.64022251789052273e-02\n9.90430216950106100e-03\n0.0\n1.53213022662886892e-03\n5.93391485195460429e-03\n1.39639323758616509e-02\n2.59160004904967212e-02\n4.12736381732681235e-02\n5.81834067592490040e-02\n7.29324193486378392e-02\n7.98097151774377206e-02\n7.19568448206619193e-02\n4.38699054633191338e-02\n-4.26145308167609309e-03\n-6.16116287064579979e-02\n-1.04745542114154919e-01\n-1.04116156819204664e-01\n-4.27428462444003482e-02\n5.87342193902484488e-02\n1.32717764784681919e-01\n1.01407885026356032e-01\n-3.84938656733955220e-02\n-1.57619905106984814e-01\n-8.94014684088485917e-02\n1.23934990731937450e-01\n1.64229807545241441e-01\n-1.02846990040012798e-01\n-1.94423542348206913e-01\n1.74256989494049996e-01\n1.27449853724130840e-01\n-3.30989948916072529e-01\n3.08040385434522057e-01\n-1.82934162333759254e-01\n7.87423537843436744e-02\n-2.58941405873561493e-02\n1.83501986860584131e-02\n3.17834764532368280e-02\n4.07712185251056514e-02\n4.70055327209749907e-02\n4.98227954419526511e-02\n4.75681686558691239e-02\n3.81048057628824433e-02\n1.95796149075308339e-02\n-8.31038573956571769e-03\n-4.26224836082967420e-02\n-7.56229772108541476e-02\n-9.46860039240909196e-02\n-8.54751883901579135e-02\n-3.97195250408209979e-02\n3.39074270338953487e-02\n1.02676181991791474e-01\n1.18332711890950487e-01\n4.97823526597920216e-02\n-7.24413972226577579e-02\n-1.45746893835511038e-01\n-7.21817438259777788e-02\n1.02931269579105020e-01\n1.62854495329702031e-01\n-2.50418079920157431e-02\n-1.99775642360636468e-01\n-1.51026259405039141e-03\n2.34760676496040155e-01\n-9.00509371671608938e-02\n-2.13190706440536171e-01\n3.42421202668701186e-01\n-2.72571734642081787e-01\n1.46801103508473613e-01\n-5.87175785253147078e-02\n0.0\n1.39928641609143411e-03\n5.41941298609638616e-03\n1.27595092713310397e-02\n2.37191398051321833e-02\n3.79148011523512615e-02\n5.38366781484805601e-02\n6.83875351545351756e-02\n7.66939273621888434e-02\n7.26629412363661714e-02\n5.08371164154707220e-02\n9.81613559972689502e-03\n-4.34535018226166261e-02\n-9.09580578357309794e-02\n-1.06682627102277799e-01\n-6.93654045182297840e-02\n1.66819331054903625e-02\n1.06039257093468592e-01\n1.26037188929930155e-01\n3.49827268525615132e-02\n-1.06997830413348635e-01\n-1.47209106266109835e-01\n1.11511338943059180e-05\n1.71057591638299283e-01\n8.38069956552708883e-02\n-1.75672451818211478e-01\n-1.06498147882086919e-01\n2.28646582923944131e-01\n8.46321214782840524e-03\n-2.77789636073596136e-01\n3.34849214662108485e-01\n-2.34114016055857743e-01\n1.15517962652628065e-01\n1.76396864021924824e-02\n3.05528330781792284e-02\n3.92142766574420168e-02\n4.53138956404919649e-02\n4.83262655821057735e-02\n4.68114388110977483e-02\n3.88545213065890210e-02\n2.26890653351522684e-02\n-2.26849344166414699e-03\n-3.39930206289420639e-02\n-6.64330455232850781e-02\n-8.90578582749753100e-02\n-8.88293568067271694e-02\n-5.58957757580990922e-02\n7.43684959262097458e-03\n7.87411770139979234e-02\n1.17326554602843997e-01\n8.49621591742397292e-02\n-1.69543513278883756e-02\n-1.20930948113630046e-01\n-1.23823340014991137e-01\n9.14471104867181292e-03\n1.51782187587725714e-01\n1.04880077430949861e-01\n-1.14192735611663460e-01\n-1.67026641715659230e-01\n1.02188825229299979e-01\n1.89097031856256703e-01\n-1.81221444772162205e-01\n-1.08157417733208375e-01\n3.20784001839355792e-01\n-3.14869230996732197e-01\n1.96889672922327813e-01\n0.0\n1.30122401853951619e-03\n5.03961895348863705e-03\n1.18705076078600494e-02\n2.20980776110333219e-02\n3.54382185879065295e-02\n5.06383993302348401e-02\n6.50661548961533054e-02\n7.44931365439217424e-02\n7.34519316837411868e-02\n5.66297046456725323e-02\n2.15970751435343236e-02\n-2.74975913455281253e-02\n-7.69378152570333457e-02\n-1.04363471435948318e-01\n-8.72236149490903390e-02\n-1.93077420525562225e-02\n7.22305228147285816e-02\n1.27071471621637455e-01\n8.72680955036750916e-02\n-3.92778595010860529e-02\n-1.44722707053966143e-01\n-9.69722201252817273e-02\n8.58428986030950469e-02\n1.70311505187530465e-01\n-1.38624008295360323e-02\n-2.01684875158743809e-01\n-1.35210473210516601e-03\n2.35694091794735577e-01\n-1.00998881708779131e-01\n-2.03456949919054664e-01\n3.48401762741588739e-01\n-2.90647920088883793e-01\n1.74882011119370344e-02\n3.02904528588574806e-02\n3.88969475269241582e-02\n4.50397208080480574e-02\n4.82989212248850774e-02\n4.73842542938966160e-02\n4.05304902156920013e-02\n2.60228684550575795e-02\n3.06878101118597231e-03\n-2.69710985952042077e-02\n-5.92724319191536009e-02\n-8.48823109536324949e-02\n-9.18780426233314351e-02\n-6.95653850062067231e-02\n-1.58597667368360409e-02\n5.47532450378656957e-02\n1.09122850915579633e-01\n1.07520678758228003e-01\n3.25609606674390692e-02\n-7.94360756271253188e-02\n-1.39601040903553325e-01\n-7.17240099234429107e-02\n8.58640115457109526e-02\n1.61003337869596419e-01\n2.39442419402512291e-02\n-1.71579455375130252e-01\n-9.98158000934689787e-02\n1.77359879349604871e-01\n1.16029689649540232e-01\n-2.38107951974791454e-01\n-1.07017873453170171e-02\n3.01059096239256641e-01\n-3.73153384757510032e-01\n0.0\n1.26181656396638078e-03\n4.88699453821045838e-03\n1.15157369041878812e-02\n2.14663552804937423e-02\n3.45295331039867995e-02\n4.96298095666586475e-02\n6.44456390646889477e-02\n7.51720358150882589e-02\n7.67369056207526379e-02\n6.38713752073990920e-02\n3.33441072271089406e-02\n-1.27995983217667024e-02\n-6.41423715083476315e-02\n-1.01410811998526834e-01\n-1.01826601436160347e-01\n-5.19873797160528214e-02\n3.55328601561851823e-02\n1.14280655518607416e-01\n1.21989976491408789e-01\n3.03012401273537006e-02\n-1.03510460313889913e-01\n-1.49729568277137404e-01\n-2.81523973857146781e-02\n1.48696355000590141e-01\n1.36128788703673953e-01\n-9.97333233688057763e-02\n-1.93213177146098536e-01\n8.80120720991122429e-02\n2.22167876442057433e-01\n-1.78277795343335099e-01\n-1.71086696571669056e-01\n4.20810874008303526e-01\n1.81069609225176509e-02\n3.13621762884647992e-02\n4.02929677038555978e-02\n4.67503492332803222e-02\n5.04028140129268443e-02\n5.00563284311753495e-02\n4.40270196701860669e-02\n3.05989363277939068e-02\n8.78015732565319562e-03\n-2.06053173683545775e-02\n-5.36842975116430948e-02\n-8.27149464817880375e-02\n-9.66425183231844342e-02\n-8.41490505345183493e-02\n-3.96987297347147633e-02\n2.88494507581830914e-02\n9.56280057222372998e-02\n1.22286944107445172e-01\n7.88470280152794301e-02\n-2.56653600556186537e-02\n-1.26259775376608485e-01\n-1.31830008058331422e-01\n-9.18683926020591630e-03\n1.41992361629898894e-01\n1.42658918203066365e-01\n-5.07722515342206790e-02\n-1.97962140005729981e-01\n-3.59070364365813646e-02\n2.21860466080181312e-01\n6.64949965191886788e-02\n-2.78385614154889827e-01\n6.53839850049610545e-03\n4.22812219767478070e-01\n0.0\n1.25496593371548582e-03\n4.86046216133771778e-03\n1.14580185372088091e-02\n2.13879304142409674e-02\n3.45094003266927934e-02\n4.98953278134455919e-02\n6.54772214619090687e-02\n7.77896961332146253e-02\n8.20714382925523539e-02\n7.30675144080384920e-02\n4.68417037800737818e-02\n3.59098189112754679e-03\n-4.92804121002843251e-02\n-9.56604960005917326e-02\n-1.13541655543613243e-01\n-8.43990723338278043e-02\n-8.00252742186205630e-03\n8.50892060688910046e-02\n1.37559524288086127e-01\n9.77846493511306536e-02\n-2.79480393101664837e-02\n-1.46915715274376940e-01\n-1.33631812727657562e-01\n3.37113079311561273e-02\n1.84305613282213843e-01\n1.00269457758354844e-01\n-1.53846969540985701e-01\n-1.88611166564206456e-01\n1.29502133135829256e-01\n2.49550523259439883e-01\n-1.79736708486295499e-01\n-3.84351477448504897e-01\n1.90440349750796642e-02\n3.29852361579566766e-02\n4.23998817154304028e-02\n4.92979610093651141e-02\n5.34441652552256341e-02\n5.37404601562894435e-02\n4.85824696652520233e-02\n3.62557053097001258e-02\n1.55828050478592512e-02\n-1.31220283536884683e-02\n-4.69140346279031811e-02\n-7.93005962752785371e-02\n-1.00299974342204459e-01\n-9.84527417609398908e-02\n-6.54843816342653290e-02\n-3.08039525070313977e-03\n7.11176233407512653e-02\n1.23806405244009279e-01\n1.18512526550400718e-01\n4.07531811032200500e-02\n-7.64593422083751223e-02\n-1.52908704162190573e-01\n-1.10566891460408712e-01\n4.29328923337447890e-02\n1.74442413359795767e-01\n1.22687279684753292e-01\n-9.57816688759902946e-02\n-2.14853869160837374e-01\n-1.86143671032555011e-02\n2.50469665307928080e-01\n1.13580117740760017e-01\n-3.05290061885116037e-01\n-3.20245471127477532e-01\n0.0\n1.24479062869355638e-03\n4.82105337444520363e-03\n1.13701015795738304e-02\n2.12540838454340700e-02\n3.44034239340897594e-02\n5.00477090344100053e-02\n6.63907939192781155e-02\n8.03470152627305950e-02\n8.75425911399362600e-02\n8.28676557477047021e-02\n6.18669246950516449e-02\n2.30656667223569402e-02\n-2.91774778266787362e-02\n-8.25329265267820550e-02\n-1.17402562314328482e-01\n-1.12763529032684967e-01\n-5.77735561250082505e-02\n3.46011402468763204e-02\n1.21614892728102122e-01\n1.44918432273636183e-01\n6.93782352828384158e-02\n-7.19274936115450875e-02\n-1.71378869239017739e-01\n-1.19904893232915630e-01\n6.77822220168332323e-02\n2.05968039222048760e-01\n1.01605764499217502e-01\n-1.65946816237450584e-01\n-2.35497881110661639e-01\n6.70900432947594133e-02\n3.63315405517359191e-01\n2.46761126359400118e-01\n2.00889832813645579e-02\n3.47951397157251555e-02\n4.47502503479100394e-02\n5.21442359534174393e-02\n5.68542199819763103e-02\n5.78986044279895667e-02\n5.37792496246849785e-02\n4.28163575376009770e-02\n2.36833976059251869e-02\n-3.78915303734546609e-03\n-3.76043470852527387e-02\n-7.26566677845627840e-02\n-1.00408467542594915e-01\n-1.09972974951695154e-01\n-9.13454079773145800e-02\n-4.08501985843605087e-02\n3.26799062272537244e-02\n1.04648090458287032e-01\n1.39512679654027277e-01\n1.07221168839630926e-01\n7.73444070357087732e-03\n-1.11438842385092191e-01\n-1.67677206486845198e-01\n-9.81197826464117878e-02\n6.85568977173727639e-02\n1.94528365402296816e-01\n1.34036980310538067e-01\n-9.23417064820561406e-02\n-2.45858397758981662e-01\n-1.01878944297249405e-01\n2.25467941344820261e-01\n3.57455525111507189e-01\n1.76708676138539855e-01\n0.0\n1.22488968951275858e-03\n4.74397736842408716e-03\n1.11934359090061636e-02\n2.09548655658039068e-02\n3.40318212693950031e-02\n4.98205161207413497e-02\n6.68220647965956510e-02\n8.23829715165644988e-02\n9.26173151033475167e-02\n9.27338991577552341e-02\n7.80175709608161988e-02\n4.56180672643772614e-02\n-3.01071508151459473e-03\n-5.97521365029511434e-02\n-1.09009546923590633e-01\n-1.30373791374719439e-01\n-1.06214655638365865e-01\n-3.33336415601329372e-02\n6.63679615848849908e-02\n1.45469463235471302e-01\n1.49929757008061521e-01\n5.65217461361377932e-02\n-9.16718841105067517e-02\n-1.89059546065163619e-01\n-1.36652170436228126e-01\n5.39811721221709340e-02\n2.22558724371718586e-01\n1.79657026142512499e-01\n-7.99264833658874518e-02\n-3.18157735617046245e-01\n-3.06657443931339091e-01\n-1.17840101676261161e-01\n2.12937670262044638e-02\n3.68818863739209732e-02\n4.74603587075562439e-02\n5.54272205400916651e-02\n6.07908721141312905e-02\n6.27088066861502536e-02\n5.98194118060944718e-02\n5.05180737993950676e-02\n3.33801038019687635e-02\n7.80546971132195858e-03\n-2.51324842248200064e-02\n-6.17961526469074443e-02\n-9.54159464140485053e-02\n-1.16421736972871684e-01\n-1.14330344944887821e-01\n-8.15741260608472407e-02\n-1.87993862516291563e-02\n6.03102805375573259e-02\n1.28229206141142721e-01\n1.50793789353911800e-01\n1.03883876433514682e-01\n-5.51653987124776056e-03\n-1.27577949065662610e-01\n-1.84568591137485527e-01\n-1.18794157270857237e-01\n4.90510744913431398e-02\n2.03417072693567846e-01\n2.03817533331691753e-01\n1.35891541877003388e-02\n-2.32870551094080058e-01\n-3.35326798428027151e-01\n-2.34750052331681863e-01\n-7.31733022784175624e-02\n0.0\n1.19451840644975156e-03\n4.62634989491810932e-03\n1.09210714498432122e-02\n2.04763870624484652e-02\n3.33688629489198793e-02\n4.91673699816280452e-02\n6.66889766368844034e-02\n8.37573420454647138e-02\n9.70708507066293663e-02\n1.02342474764025540e-01\n9.49084934870042252e-02\n7.09715443711799177e-02\n2.94822306293679795e-02\n-2.56795067216624845e-02\n-8.40708758109956211e-02\n-1.28955475366374250e-01\n-1.40950864967982537e-01\n-1.05710442568365592e-01\n-2.41109617497141139e-02\n7.98223465169212026e-02\n1.60584729594473535e-01\n1.68490664394465639e-01\n8.05418636178181352e-02\n-7.09521937979269851e-02\n-1.98159247212259748e-01\n-2.03817324973348313e-01\n-5.66360299261952985e-02\n1.63422394985184349e-01\n3.10455724531352062e-01\n2.93964449918723891e-01\n1.62110769328072557e-01\n4.22397366451923578e-02\n2.27586153071363505e-02\n3.94190780218749287e-02\n5.07544647072254926e-02\n5.94129174089770770e-02\n6.55576769904078899e-02\n6.85114330185240955e-02\n6.70840008405206994e-02\n5.97949718404661781e-02\n4.51893028552917062e-02\n2.23211203168495811e-02\n-8.58202659194490236e-03\n-4.53514801747070748e-02\n-8.32158524985065068e-02\n-1.14613206706104490e-01\n-1.29964972447382171e-01\n-1.19861717681790644e-01\n-7.87586972531982427e-02\n-9.49917559010215323e-03\n7.31397175930252053e-02\n1.42680333383786884e-01\n1.67700562503157374e-01\n1.25657238796849785e-01\n1.96274270817165183e-02\n-1.11701193887053407e-01\n-2.02433611850845963e-01\n-1.90987085017605279e-01\n-6.25247223510139311e-02\n1.27489106915359418e-01\n2.77502435081038001e-01\n3.08047010305397773e-01\n2.22864537224427700e-01\n1.01447071925161877e-01\n2.25974520549576292e-02\n0.0\n1.15085207168552726e-03\n4.45723090758635108e-03\n1.05270164022439622e-02\n1.97689060185387878e-02\n3.23298314036275861e-02\n4.79533489374914315e-02\n6.57852484683583705e-02\n8.41642388654625095e-02\n1.00465148714690269e-01\n1.11100083903360874e-01\n1.11815792449366000e-01\n9.84286687692087353e-02\n6.80767284881741985e-02\n2.09024158572617552e-02\n-3.82059755590363967e-02\n-9.85502631541794738e-02\n-1.44265470434894627e-01\n-1.57653903383779770e-01\n-1.25483616891729238e-01\n-4.69766838586577057e-02\n5.98557384650402757e-02\n1.58358017772240928e-01\n2.03813160988104952e-01\n1.63774275030647426e-01\n3.97898408736065204e-02\n-1.23986445830430905e-01\n-2.57322104640448135e-01\n-3.02476622460364886e-01\n-2.51081225038682243e-01\n-1.48551968564944320e-01\n-5.75497623118357560e-02\n-1.11520067769729815e-02\n2.46532475876198830e-02\n4.27006773933324979e-02\n5.50124825863023206e-02\n6.45527875391617850e-02\n7.16721177996439696e-02\n7.58913997484795821e-02\n7.62352289453755300e-02\n7.14096060466354737e-02\n6.00197619289386183e-02\n4.08988732096338195e-02\n1.35751221045829571e-02\n-2.11439171372539841e-02\n-6.05634458754327754e-02\n-9.96608258333364777e-02\n-1.31102070825718842e-01\n-1.46057628914790100e-01\n-1.36087959400434666e-01\n-9.60892550218983565e-02\n-2.77608557682513281e-02\n5.76350894887735568e-02\n1.39010654014324775e-01\n1.89400703909122392e-01\n1.84605120410516244e-01\n1.14498321409878326e-01\n-7.97136861676775270e-03\n-1.46477390360323034e-01\n-2.53603303296433824e-01\n-2.92571515711198216e-01\n-2.56924520143991808e-01\n-1.74081081405048743e-01\n-8.75634373318271292e-02\n-2.95040220061031089e-02\n-5.04374467137633838e-03\n0.0\n1.08800143060779541e-03\n4.21381142139383609e-03\n9.95717245638719564e-03\n1.87294460342975339e-02\n3.07412976663677603e-02\n4.59072703824517994e-02\n6.37063284634225846e-02\n8.30192878117151090e-02\n1.01979074514325321e-01\n1.17891594949918660e-01\n1.27307947410869371e-01\n1.26342756043612170e-01\n1.11322837748842454e-01\n7.97954669400500471e-02\n3.18091007493659997e-02\n-2.87995088445246877e-02\n-9.35856366340317020e-02\n-1.49769175692136075e-01\n-1.82181832517749775e-01\n-1.77087518213253470e-01\n-1.27286912826218485e-01\n-3.68843795784968148e-02\n7.67021898170149735e-02\n1.85743265939049551e-01\n2.60747839178384011e-01\n2.82021018787517452e-01\n2.48744718548483623e-01\n1.79733670023033087e-01\n1.03937342575500372e-01\n4.55860227816541966e-02\n1.35786014376227185e-02\n2.07143160801749127e-03\n2.73500047161513785e-02\n4.73715977556225937e-02\n6.10677531934630119e-02\n7.18364567256425807e-02\n8.02666272863255398e-02\n8.61240173433762968e-02\n8.87062590037427795e-02\n8.69889017078704641e-02\n7.97615697474624158e-02\n6.58180836366188682e-02\n4.42305186249773927e-02\n1.47140137869520155e-02\n-2.19419602367644934e-02\n-6.34440077807478797e-02\n-1.05688260000125878e-01\n-1.42747597650540070e-01\n-1.67343685101029593e-01\n-1.71951267049341466e-01\n-1.50540676591226413e-01\n-1.00713671267364094e-01\n-2.56688536497343064e-02\n6.48349436381775862e-02\n1.55375436833945446e-01\n2.28073627872740770e-01\n2.67660784442532884e-01\n2.66809968325039670e-01\n2.29347901055085596e-01\n1.69281090288635777e-01\n1.05350121427021812e-01\n5.34269524810574922e-02\n2.08007761042246428e-02\n5.54742065936003441e-03\n7.62453578236961201e-04\n0.0\n9.93056697424444124e-04\n3.84609205096460944e-03\n9.09303191137248411e-03\n1.71329143516556273e-02\n2.82258898683283889e-02\n4.24435138383352020e-02\n5.95875917350404960e-02\n7.90873684869768806e-02\n9.98895035868376108e-02\n1.20364093231735844e-01\n1.38260832803339756e-01\n1.50759342257183487e-01\n1.54661986275378111e-01\n1.46769608316567657e-01\n1.24453080191787843e-01\n8.63810953476855797e-02\n3.32886093111130141e-02\n-3.14152669824646277e-02\n-1.01465417881691722e-01\n-1.68247493278539856e-01\n-2.22138228127884696e-01\n-2.54570715850003515e-01\n-2.60368233060559950e-01\n-2.39577313341279158e-01\n-1.97950570747218363e-01\n-1.45558893362144837e-01\n-9.37584825889371670e-02\n-5.16168232109673331e-02\n-2.33820903558851108e-02\n-8.18998860683581992e-03\n-1.97574311110306541e-03\n-2.46656370627377792e-04\n3.19672293454091733e-02\n5.53688654034554667e-02\n7.14226018452783079e-02\n8.42324550263492677e-02\n9.47292544534516501e-02\n1.03004436077211645e-01\n1.08720118503062957e-01\n1.11245717631951513e-01\n1.09738739500486460e-01\n1.03228835939218860e-01\n9.07298907923079906e-02\n7.13921215144467242e-02\n4.46960111095141346e-02\n1.06771445187999608e-02\n-2.98455080736718843e-02\n-7.50842138602075548e-02\n-1.22203262442109994e-01\n-1.67416617195539491e-01\n-2.06321493493303920e-01\n-2.34487310973969271e-01\n-2.48249019533834853e-01\n-2.45562310739083689e-01\n-2.26693145018712600e-01\n-1.94478694720159079e-01\n-1.53956685716344299e-01\n-1.11336000141576533e-01\n-7.25385934706544722e-02\n-4.17777776576282733e-02\n-2.07084727208565571e-02\n-8.49205087842911169e-03\n-2.70420922618444613e-03\n-5.95100216132211078e-04\n-6.79560174277824138e-05\n0.0\n8.26929154012922326e-04\n3.20268284198543633e-03\n7.57597267648357602e-03\n1.42993530358572346e-02\n2.36479552667822265e-02\n3.58112357849422330e-02\n5.08689140020428671e-02\n6.87556071965385041e-02\n8.92180982446256904e-02\n1.11770637237297077e-01\n1.35656130034191053e-01\n1.59823883884005702e-01\n1.82936974441490402e-01\n2.03423143551167640e-01\n2.19581001600204384e-01\n2.29746722706729384e-01\n2.32514437114026196e-01\n2.26986552593503838e-01\n2.13010975141848719e-01\n1.91346230150333363e-01\n1.63690846559166797e-01\n1.32528407657696495e-01\n1.00778952245886594e-01\n7.13065680837352139e-02\n4.63952136847214161e-02\n2.73425593143085087e-02\n1.43071265917136814e-02\n6.46642250027378539e-03\n2.42515936388117137e-03\n7.08043395704745552e-04\n1.43150788233322834e-04\n1.50433847760349660e-05\n4.57406273055418477e-02\n7.92250904632707947e-02\n1.02262780775871309e-01\n1.20921471261463673e-01\n1.36892531149977237e-01\n1.50855742968278833e-01\n1.63078469290614397e-01\n1.73604002031337690e-01\n1.82331080934190759e-01\n1.89057972385611867e-01\n1.93515834436243289e-01\n1.95401767008090366e-01\n1.94416384816774590e-01\n1.90307629568078063e-01\n1.82919916445440783e-01\n1.72244984449828081e-01\n1.58467996460439658e-01\n1.41999951455500539e-01\n1.23486126900581181e-01\n1.03781081116118890e-01\n8.38846469797083077e-02\n6.48407059495202664e-02\n4.76105721557666256e-02\n3.29432124538619198e-02\n2.12715141027565238e-02\n1.26631898609929870e-02\n6.84399530350930044e-03\n3.29083418141032239e-03\n1.36922808738424470e-03\n4.73462984409122808e-04\n1.27621257175292743e-04\n2.38490230791858655e-05\n2.31872765263249969e-06\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n2.32643782873685322e-03\n9.01025496668477442e-03\n2.11411518868607103e-02\n3.88584183255136287e-02\n6.05179512029140540e-02\n8.15697383111158858e-02\n9.37861413435017721e-02\n8.61132662822985950e-02\n4.88788710180389913e-02\n-1.76734976934142078e-02\n-9.30771465535937537e-02\n-1.33833774376033027e-01\n-9.28757697984479436e-02\n3.24138298293330795e-02\n1.54057220148177271e-01\n1.28810482030976753e-01\n-7.11558020308530048e-02\n-2.04651937593557681e-01\n-9.17019193115771350e-04\n2.49614874103931822e-01\n-4.92637905594501962e-02\n-2.78836145158064208e-01\n3.61105130868910496e-01\n-2.43107144405384334e-01\n1.09071866772257414e-01\n-3.53467503916240280e-02\n8.56413234964061888e-03\n-1.57211513491868214e-03\n2.18501632684760607e-04\n-2.26839141862658686e-05\n1.70781453290448186e-06\n-8.82056392174331490e-08\n2.79851150262300353e-09\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n0.0\n2.07806285254703415e-03\n8.04830282028694277e-03\n1.89014745758805426e-02\n3.48478692787147146e-02\n5.46583983691997927e-02\n7.47443013742970785e-02\n8.84323005687807639e-02\n8.63557852051556052e-02\n5.92859037334796252e-02\n4.39362123176255479e-03\n-6.62001073963658232e-02\n-1.20294103912396533e-01\n-1.14591417300027809e-01\n-2.65481567894786420e-02\n1.01993443726285521e-01\n1.57538593267010613e-01\n4.57361676044914373e-02\n-1.48628062064441790e-01\n-1.55742235113204924e-01\n1.09770304692729678e-01\n2.06966956502187244e-01\n-1.61362486106531727e-01\n-1.71879875475702770e-01\n3.57002281444955050e-01\n-2.96970494341223135e-01\n1.57163566533230492e-01\n-5.93527842665138652e-02\n1.67706107460415046e-02\n-3.62151686052126619e-03\n6.01624941919007132e-04\n-7.65357433872048732e-05\n7.33749012838913311e-06\n-5.13809584741640654e-07\n2.12816502681813825e-02\n3.68608995334019779e-02\n4.71793262444042266e-02\n5.38928417801450288e-02\n5.56915912862149184e-02\n4.99582735431462199e-02\n3.36631066209842345e-02\n4.91156907340603230e-03\n-3.45857622916000973e-02\n-7.66380627718934726e-02\n-1.05131198138017037e-01\n-9.93307865079918473e-02\n-4.52185883455094167e-02\n4.63278736087203366e-02\n1.26520898685552441e-01\n1.24501302937115213e-01\n8.76149374982842372e-03\n-1.39009840017835173e-01\n-1.45430724917568976e-01\n5.23901068506446091e-02\n2.03641230091654468e-01\n3.34229155239388221e-03\n-2.44704412764046975e-01\n6.30482839383700588e-02\n2.56722185146776583e-01\n-3.55963783728126426e-01\n2.54118863941907969e-01\n-1.21807850318855451e-01\n4.26606710224044852e-02\n-1.13315026562801277e-02\n2.32099260135700501e-03\n-3.68093455385393674e-04\n4.49246874346010362e-05\n-4.14816878940966803e-06\n0.0\n1.86745723209210800e-03\n7.23263075964733319e-03\n1.69990960813687225e-02\n3.14211564103274998e-02\n4.95772040037451081e-02\n6.86104779799865810e-02\n8.30695156539416196e-02\n8.50243645692682765e-02\n6.59726096790968913e-02\n2.14395641430644608e-02\n-4.21206521873227283e-02\n-1.01605177090439175e-01\n-1.20244548015097374e-01\n-6.76016392706643016e-02\n4.51760544871489880e-02\n1.41525300571004126e-01\n1.16379318977252025e-01\n-4.65345033377235831e-02\n-1.79019170608671702e-01\n-6.59803259594283625e-02\n1.83093383810175758e-01\n1.16520274277478131e-01\n-2.28916206814809009e-01\n-4.61698185800636235e-02\n3.14408655386713198e-01\n-3.35841052094047576e-01\n2.10846353030214512e-01\n-9.24607554312767976e-02\n3.02012044844990196e-02\n-7.56926647356088826e-03\n1.47453542827259568e-03\n-2.23710680152640221e-04\n2.62373116337808903e-05\n2.02036552273015535e-02\n3.49937573522908218e-02\n4.48278912970247329e-02\n5.13899921975950191e-02\n5.36329394468589293e-02\n4.93210453184591280e-02\n3.57573145866440997e-02\n1.09920598867813291e-02\n-2.42158482764455903e-02\n-6.39779763501004545e-02\n-9.56383738877778361e-02\n-1.01335837224692166e-01\n-6.55768663489858378e-02\n1.07490560866888730e-02\n9.64823503872283411e-02\n1.32699615197467508e-01\n6.94679340975662418e-02\n-7.01538332813591570e-02\n-1.60636143167644407e-01\n-7.03429567145097412e-02\n1.35632305277973930e-01\n1.61147048035827190e-01\n-1.05281856162795479e-01\n-2.01029929124651063e-01\n1.67807972545956724e-01\n1.49442883220330058e-01\n-3.44346547155459426e-01\n3.03190113832213393e-01\n-1.70325227780179361e-01\n6.88854684852296534e-02\n-2.10864033977172030e-02\n5.00299350290946826e-03\n-9.29183622222744775e-04\n1.35114242048321417e-04\n0.0\n1.68733085322476418e-03\n6.53500429408146368e-03\n1.53696510518114664e-02\n2.84714547199636167e-02\n4.51493334746945196e-02\n6.31105743423511778e-02\n7.78709990412343595e-02\n8.27090668244649108e-02\n6.99448180619587356e-02\n3.43276259741001066e-02\n-2.14721954831113108e-02\n-8.13637560162513429e-02\n-1.15535202031394973e-01\n-9.23176751454225369e-02\n-4.50055832098764531e-03\n1.03351054790692579e-01\n1.40931630834726818e-01\n4.38202710386290661e-02\n-1.21190001551572057e-01\n-1.56191953986204196e-01\n3.71393375619129551e-02\n2.01851554564014518e-01\n3.36347353273041107e-03\n-2.39763248219840241e-01\n7.67012747084436231e-02\n2.34815865273722557e-01\n-3.49678109901016831e-01\n2.63903342099925775e-01\n-1.34391222988571368e-01\n5.04619134547630160e-02\n-1.45364230658070227e-02\n3.27456576300043942e-03\n-5.81100902545361123e-04\n1.92296251470454801e-02\n3.33066877651869153e-02\n4.26980584584626954e-02\n4.90978966474119316e-02\n5.16707784850725105e-02\n4.84977591679998238e-02\n3.71792542477835594e-02\n1.57911092699578176e-02\n-1.55457922488367196e-02\n-5.26380571744836379e-02\n-8.55808670491759460e-02\n-9.92729132724618490e-02\n-7.83841209874044376e-02\n-1.78836730174036160e-02\n6.42234534744303420e-02\n1.22684040917750842e-01\n1.04571717936075378e-01\n-2.84395869861246969e-03\n-1.26696040018947187e-01\n-1.35325739829621483e-01\n2.14883638909121807e-02\n1.75452219443895274e-01\n7.62992073000397231e-02\n-1.78710879453438498e-01\n-1.11974263250068873e-01\n2.28614819842036521e-01\n2.69517245032072708e-02\n-2.95843127402172223e-01\n3.35612428925947170e-01\n-2.22689588876672284e-01\n1.03840256458685831e-01\n-3.64020580985483164e-02\n9.90425695927411170e-03\n-2.12385782023243172e-03\n0.0\n1.53207440263372391e-03\n5.93369864655108985e-03\n1.39634235313325031e-02\n2.59150557421242780e-02\n4.12721322246338770e-02\n5.81812800956477347e-02\n7.29297449837138650e-02\n7.98067711831052934e-02\n7.19541582272048147e-02\n4.38682093780657992e-02\n-4.26141546425702535e-03\n-6.16094796387508248e-02\n-1.04741729459197991e-01\n-1.04112209926564683e-01\n-4.27409915899554654e-02\n5.87323553983065752e-02\n1.32712903552338085e-01\n1.01403721354287546e-01\n-3.84930288856335026e-02\n-1.57614069174763949e-01\n-8.93972590932024247e-02\n1.23930992040524560e-01\n1.64222594246133780e-01\n-1.02844248475708264e-01\n-1.94414395585673194e-01\n1.74251164735512915e-01\n1.27441387197710670e-01\n-3.30973119477560807e-01\n3.08025605345973008e-01\n-1.82925616297960725e-01\n7.87387315847342395e-02\n-2.58929612129595865e-02\n6.67539132230176007e-03\n1.83455206927080755e-02\n3.17753739310765726e-02\n4.07608229618004678e-02\n4.69935389672304984e-02\n4.98100581880191254e-02\n4.75559521147602624e-02\n3.80949081187009764e-02\n1.95743077137512031e-02\n-8.30872489632319966e-03\n-4.26121539294959661e-02\n-7.56041296757050812e-02\n-9.46618823099090456e-02\n-8.54526664976449080e-02\n-3.97078199552085148e-02\n3.39007212343270456e-02\n1.02651076391567772e-01\n1.18301324533923238e-01\n4.97659978041677525e-02\n-7.24264637726189514e-02\n-1.45708804513464352e-01\n-7.21568551384244167e-02\n1.02909997447714910e-01\n1.62807024843606707e-01\n-2.50463338529649700e-02\n-1.99719024770144915e-01\n-1.49289551260270545e-03\n2.34686870823015509e-01\n-9.00455203271375709e-02\n-2.13093457720656909e-01\n3.42290451473635182e-01\n-2.72473492342289236e-01\n1.46749731578035891e-01\n-5.86973956108654202e-02\n1.81814796984524941e-02\n0.0\n1.39748685982006614e-03\n5.41244333462681439e-03\n1.27430966422278115e-02\n2.36886101328073612e-02\n3.78659285732339049e-02\n5.37670850750916959e-02\n6.82986768261897165e-02\n7.65933500585828375e-02\n7.25659352478938424e-02\n5.07662014676241446e-02\n9.79642339070772340e-03\n-4.34043369384735714e-02\n-9.08437501835254874e-02\n-1.06539780321755206e-01\n-6.92607535480561365e-02\n1.66798561397317850e-02\n1.05911735312640795e-01\n1.25858991371076034e-01\n3.49012362073863741e-02\n-1.06881981826220621e-01\n-1.46988401021704906e-01\n7.25916947192739126e-05\n1.70833478190393989e-01\n8.36039572426262173e-02\n-1.75460927074019640e-01\n-1.06212494407879610e-01\n2.28312948191016107e-01\n8.24364107076237806e-03\n-2.77089343795231091e-01\n3.34119102630506704e-01\n-2.33632877085948959e-01\n1.15288207938622031e-01\n-4.30886902627137525e-02\n1.75520700700731169e-02\n3.04010771393756589e-02\n3.90194434806958659e-02\n4.50884911247688980e-02\n4.80851157835114965e-02\n4.65761329013609296e-02\n3.86557975243667709e-02\n2.25663867682969269e-02\n-2.27203479715873359e-03\n-3.38423555212826951e-02\n-6.61196270307414652e-02\n-8.86212740775099705e-02\n-8.83718608949044387e-02\n-5.55730731002040609e-02\n7.46540854464687771e-03\n7.84043239828530608e-02\n1.16739109516097270e-01\n8.44474819303316082e-02\n-1.70098634374742964e-02\n-1.20391995760973522e-01\n-1.23077804826183579e-01\n9.34262637388620643e-03\n1.51071618660111540e-01\n1.04028182212111492e-01\n-1.13885384336067610e-01\n-1.65786620805020296e-01\n1.02117556767986811e-01\n1.87422018015700298e-01\n-1.80601857101156227e-01\n-1.06104236728896129e-01\n3.17313037502747364e-01\n-3.11878039253879136e-01\n1.95131188918934190e-01\n-8.89408646405878273e-02\n0.0\n1.28380142584573150e-03\n4.97214154213785481e-03\n1.17115156403809033e-02\n2.18017760956600755e-02\n3.49618735583907408e-02\n4.99544932201715086e-02\n6.41798666284934954e-02\n7.34631054197839861e-02\n7.24078519660303482e-02\n5.57746087460086540e-02\n2.11777337749949612e-02\n-2.72664979693804550e-02\n-7.59937008751800647e-02\n-1.02922333899172075e-01\n-8.58279332236178971e-02\n-1.86841630963501433e-02\n7.15615426254925385e-02\n1.25305962285524763e-01\n8.55481546809990501e-02\n-3.94268855843248056e-02\n-1.42803043192883866e-01\n-9.46847987573881528e-02\n8.56275364372537373e-02\n1.67225170851789756e-01\n-1.54991019681912819e-02\n-1.98247620183419793e-01\n1.49732300988264207e-03\n2.30453344147060063e-01\n-1.02891775662854193e-01\n-1.93163470416633343e-01\n3.35966914986459864e-01\n-2.81461049674617991e-01\n1.59693841172734552e-01\n1.69889863366659531e-02\n2.94257875041988859e-02\n3.77860468227206314e-02\n4.37507361955835478e-02\n4.69090954023443085e-02\n4.60037192559360278e-02\n3.93158984717101798e-02\n2.51786205233355057e-02\n2.82770488138050320e-03\n-2.63969972790375484e-02\n-5.77756818648551829e-02\n-8.25681647834948795e-02\n-8.91611742760877179e-02\n-6.71870800030735654e-02\n-1.47387617092104555e-02\n5.38929265812549060e-02\n1.06284775121073635e-01\n1.03857203679982787e-01\n3.02129093767679428e-02\n-7.84787946429683220e-02\n-1.35364107216484370e-01\n-6.73963249518450824e-02\n8.56603407923176574e-02\n1.55243734211652662e-01\n1.89603444292312379e-02\n-1.67611407480360602e-01\n-9.08151252678546794e-02\n1.74728246001984278e-01\n1.02663158489376155e-01\n-2.30758417442157610e-01\n6.91305818364661064e-03\n2.65987712266926746e-01\n-3.39480073523648507e-01\n2.49076594433046666e-01\n0.0\n1.20892001393231824e-03\n4.68212708085670708e-03\n1.10326858478830385e-02\n2.05640807744361075e-02\n3.30715607134137515e-02\n4.75158843763997044e-02\n6.16580298664053880e-02\n7.18334001443298731e-02\n7.31670102568106329e-02\n6.06164159119777016e-02\n3.11384947460893111e-02\n-1.31840961416002517e-02\n-6.21855863209327744e-02\n-9.72340778115806520e-02\n-9.65337204257505910e-02\n-4.76748626440979054e-02\n3.64269475133118942e-02\n1.10406826629172866e-01\n1.14779315409878846e-01\n2.44852713460595312e-02\n-1.02350360962483261e-01\n-1.40681077330768678e-01\n-1.92179726059419527e-02\n1.45606854353689363e-01\n1.21213363731748708e-01\n-1.05485261575813782e-01\n-1.74342803460852153e-01\n1.01014503270331235e-01\n1.91759713192740600e-01\n-1.88490181451917566e-01\n-1.03004023053905852e-01\n3.30575051261167319e-01\n-3.38078947242607897e-01\n1.70734268961571407e-02\n2.95720428434571650e-02\n3.79909346149481172e-02\n4.40692338370611628e-02\n4.74832060697477562e-02\n4.70915816454873029e-02\n4.12908008839180246e-02\n2.84556779613557471e-02\n7.66780013576945883e-03\n-2.02352994486198479e-02\n-5.14830886510242863e-02\n-7.86105658686196140e-02\n-9.10461633535989689e-02\n-7.81211012417015044e-02\n-3.49429222665334493e-02\n3.03367020058007662e-02\n9.23834696465758026e-02\n1.14585760015604790e-01\n6.97172648649459631e-02\n-3.07596520322490248e-02\n-1.22262635268708258e-01\n-1.19161126428013076e-01\n2.74755271729162573e-03\n1.39555026745866145e-01\n1.23388988276925904e-01\n-6.58261092525018465e-02\n-1.82089999741034514e-01\n-4.12259021950588112e-03\n2.09837190868852053e-01\n1.38122581291102789e-02\n-2.49464958531277231e-01\n9.57157247546868706e-02\n2.37434184541333082e-01\n-4.02249088736534866e-01\n0.0\n1.18607660346162062e-03\n4.59365493253311493e-03\n1.08282713877421548e-02\n2.02077016183899727e-02\n3.25879584875415629e-02\n4.70696911937944773e-02\n6.16587127084879047e-02\n7.30271735686825046e-02\n7.66264946423359655e-02\n6.74867543987696800e-02\n4.19952848326155675e-02\n6.25483212834493114e-04\n-4.91462972515479615e-02\n-9.15664241254061650e-02\n-1.05645076501963919e-01\n-7.45825548028129365e-02\n-1.33177237747365390e-04\n8.61383576675973650e-02\n1.28738609864412962e-01\n8.18572312077175540e-02\n-4.04589802297539505e-02\n-1.42814667088169783e-01\n-1.10631707055382875e-01\n5.53731618906175560e-02\n1.73993003819005593e-01\n5.92697761164334702e-02\n-1.68150436676268916e-01\n-1.32809961920427544e-01\n1.70895166072529719e-01\n1.55402367275466025e-01\n-2.44095126903594389e-01\n-7.89322445914243387e-02\n4.24766296801629362e-01\n1.77856158974141164e-02\n3.08055903782259825e-02\n3.95935709424297330e-02\n4.60134582785304697e-02\n4.98216618335304354e-02\n4.99594006955814962e-02\n4.48926890239106369e-02\n3.29996467688948997e-02\n1.32051889304110274e-02\n-1.40873585758127320e-02\n-4.58979127824577157e-02\n-7.58188174078908705e-02\n-9.41680015888015920e-02\n-9.01027960769592989e-02\n-5.63244283766380360e-02\n4.30405189034142616e-03\n7.32985360906537597e-02\n1.17836063624213255e-01\n1.04334350092260442e-01\n2.37126533590702841e-02\n-8.55926446345754433e-02\n-1.43566558289450308e-01\n-8.35388471470177585e-02\n6.72875565131517001e-02\n1.66552771972772323e-01\n7.81953015063327345e-02\n-1.28791188482134111e-01\n-1.75799447466872955e-01\n5.98393872478844985e-02\n2.27237894366132537e-01\n-3.26052322371249981e-02\n-2.78605514788199782e-01\n9.93086599367692946e-02\n4.04105701888408941e-01\n0.0\n1.18099163033286592e-03\n4.57396091628953574e-03\n1.07860244429798316e-02\n2.01542147079618143e-02\n3.25938452584434851e-02\n4.73341532904222040e-02\n6.26024634183503376e-02\n7.53758228788465739e-02\n8.14068881847627851e-02\n7.58100333151340289e-02\n5.44872615622203488e-02\n1.64621565343675350e-02\n-3.33454656245499720e-02\n-8.22293102934708586e-02\n-1.10871036039712226e-01\n-9.97865356729810415e-02\n-4.12546601308474425e-02\n4.77848837207239668e-02\n1.22294643829646568e-01\n1.27276149193807475e-01\n3.90495967322496765e-02\n-9.41385357960090041e-02\n-1.60198291082881639e-01\n-7.25804547805534300e-02\n1.09946271671378298e-01\n1.82657342752342466e-01\n1.47118757000212642e-02\n-2.03382530439688985e-01\n-1.19652261403935922e-01\n2.01518578991913527e-01\n1.91960221505243001e-01\n-2.49296203383268855e-01\n-3.51281750627698175e-01\n1.86937073442504618e-02\n3.23784509020652658e-02\n4.16347782903568747e-02\n4.84790672585813931e-02\n5.27583470058158727e-02\n5.35045439290941019e-02\n4.92627877501831887e-02\n3.84276176802918479e-02\n1.97848373931604066e-02\n-6.67912954795527470e-03\n-3.87773900934566262e-02\n-7.12305638933078966e-02\n-9.54670536835366956e-02\n-1.00924592831531532e-01\n-7.85565683787168428e-02\n-2.64474756007854056e-02\n4.42746624376710723e-02\n1.07278016014213176e-01\n1.27860732451706344e-01\n8.14693483245230998e-02\n-2.18704433026906155e-02\n-1.25148314134693461e-01\n-1.47291000737392708e-01\n-4.70575965123980339e-02\n1.12157179539315546e-01\n1.77704372229919805e-01\n4.85453015260323556e-02\n-1.62482126716197162e-01\n-1.82940167889943689e-01\n7.12537611278917099e-02\n2.60005571535034841e-01\n2.85231612584461759e-02\n-3.40412065874689806e-01\n-2.82001479100733143e-01\n0.0\n1.16971399335856008e-03\n4.53028281610347652e-03\n1.06873466577247830e-02\n1.99960541561494155e-02\n3.24333572150895533e-02\n4.73659017417780576e-02\n6.32630895404616006e-02\n7.74480877113004063e-02\n8.60501857923020308e-02\n8.43927421969101338e-02\n6.80687592004356745e-02\n3.48341808398904829e-02\n-1.29112250034943629e-02\n-6.59223338693048222e-02\n-1.07812060068223831e-01\n-1.18669199450571763e-01\n-8.37582292432420411e-02\n-5.58427290998868113e-03\n8.70888220101377064e-02\n1.43537658722166783e-01\n1.16545633740443119e-01\n2.97370481836367216e-03\n-1.29195399895639690e-01\n-1.68076249192089799e-01\n-5.15822402903075503e-02\n1.36886183313018217e-01\n1.97420635434354619e-01\n1.98873222380585059e-02\n-2.17818050164555160e-01\n-1.85679517032224545e-01\n1.45696096631017791e-01\n3.65519200985041759e-01\n2.10445260327880773e-01\n1.97004234706034537e-02\n3.41221343817075737e-02\n4.38985317333165440e-02\n5.12175311917240916e-02\n5.60314509349062184e-02\n5.74813885094697247e-02\n5.42158868395591562e-02\n4.46765653601019011e-02\n2.75449808671885295e-02\n2.42006765495847475e-03\n-2.93075455893228448e-02\n-6.35806174539429586e-02\n-9.32198262277511708e-02\n-1.08522570410258312e-01\n-9.95871043983900389e-02\n-6.06303284131545356e-02\n4.51312492753638828e-03\n7.82244094091839870e-02\n1.30356366208313951e-01\n1.28787251566321592e-01\n5.90906291539114517e-02\n-5.52963920619369831e-02\n-1.49889488028331408e-01\n-1.49858211094068550e-01\n-3.07392460901030652e-02\n1.32693406655218227e-01\n1.94353026300852771e-01\n6.40014111576160394e-02\n-1.60582701067573524e-01\n-2.33673770629764022e-01\n-2.34925517852962833e-02\n2.74999032462635351e-01\n3.36389944872067748e-01\n1.46468167088152051e-01\n0.0\n1.14978713624610401e-03\n4.45310643036467887e-03\n1.05096975113352538e-02\n1.96904662967666705e-02\n3.20350529679936935e-02\n4.70548777358106504e-02\n6.34806801821010402e-02\n7.90232674177922950e-02\n9.02697673732800188e-02\n9.28968894950596702e-02\n8.24134731586455144e-02\n5.55889769428665054e-02\n1.25090993223836919e-02\n-4.12268189362414231e-02\n-9.32412385378789121e-02\n-1.25621578306804454e-01\n-1.20139551495529046e-01\n-6.75394400672791051e-02\n2.19910441377542676e-02\n1.13798385502428018e-01\n1.57566353935215925e-01\n1.13877393173308056e-01\n-1.06172597695232476e-02\n-1.45331566142606672e-01\n-1.85572742839407112e-01\n-7.33316554445304913e-02\n1.24600583786828090e-01\n2.33308724617009022e-01\n1.18313381578537755e-01\n-1.50841109658697292e-01\n-3.32580533261510436e-01\n-2.74455550969623874e-01\n-9.51662382454215861e-02\n2.08685390355986301e-02\n3.61453698893912448e-02\n4.65251888437523409e-02\n5.43948710696643689e-02\n5.98291376900550245e-02\n6.20981806125990923e-02\n5.99804328442864881e-02\n5.20003016584872149e-02\n3.67812713307341249e-02\n1.35864631146768982e-02\n-1.69549760551772274e-02\n-5.20481415672667466e-02\n-8.61326321434159881e-02\n-1.10935420942817484e-01\n-1.16733172126937221e-01\n-9.52471601029159926e-02\n-4.40312824453234636e-02\n2.88672406995240868e-02\n1.02553955770247632e-01\n1.46654927229542154e-01\n1.32791544586717797e-01\n5.24374238147831545e-02\n-6.73369902920337576e-02\n-1.64348690529815794e-01\n-1.69443277063692527e-01\n-5.67674319883491041e-02\n1.15907175606111565e-01\n2.22655624081952802e-01\n1.57627810558483600e-01\n-5.98445349650993941e-02\n-2.73324361227866408e-01\n-3.21921763445541520e-01\n-2.01681006740097174e-01\n-5.76847473992657608e-02\n0.0\n1.12033887418864098e-03\n4.33905380184137265e-03\n1.02449868342332495e-02\n1.92215787882805134e-02\n3.13705221565617337e-02\n4.63522353936075895e-02\n6.31730636267316403e-02\n7.99668104369088417e-02\n9.38557180487520626e-02\n1.01021457824570310e-01\n9.71504357360413323e-02\n7.84050256927333322e-02\n4.29649539861221702e-02\n-7.06457684560153707e-03\n-6.39737652197398532e-02\n-1.14034372433616582e-01\n-1.39620994592105974e-01\n-1.24754614762723468e-01\n-6.35538046779631632e-02\n3.13529594525774058e-02\n1.25951686472301677e-01\n1.73560546860271281e-01\n1.37140677672035666e-01\n1.76468313838942133e-02\n-1.30135195206520587e-01\n-2.15149328771862269e-01\n-1.64910200573329335e-01\n1.26737496663654296e-02\n2.15833536264568554e-01\n3.16512210911620295e-01\n2.65928594064033352e-01\n1.34488022951978953e-01\n3.25533686724625848e-02\n2.22926036415305034e-02\n3.86119221401257998e-02\n4.97263320055083280e-02\n5.82622062189968176e-02\n6.44383938779306970e-02\n6.76775328715175511e-02\n6.69187860097693737e-02\n6.08125685462679311e-02\n4.79845666969759901e-02\n2.74396004665861705e-02\n-8.75880458502231404e-04\n-3.54025134868361513e-02\n-7.23409638054937215e-02\n-1.05351190082305396e-01\n-1.25973076592604954e-01\n-1.25175452620255090e-01\n-9.62320107352539478e-02\n-3.85863997316158308e-02\n3.84884687613620130e-02\n1.14548802190088173e-01\n1.61431210556717580e-01\n1.52926010625844183e-01\n7.90482854410231861e-02\n-4.12228189494157488e-02\n-1.58301208831008206e-01\n-2.09254778277151748e-01\n-1.51817301291602286e-01\n2.38599075482087610e-03\n1.82318479842042969e-01\n2.95321321423931360e-01\n2.89765182676550659e-01\n1.92459108545823487e-01\n8.16028464392796055e-02\n1.70465904303397087e-02\n0.0\n1.07858164826369913e-03\n4.17732876125025306e-03\n9.86758400311030411e-03\n1.85404570628756628e-02\n3.03568331585219106e-02\n4.51269548215149710e-02\n6.21420550597336085e-02\n7.99881660987313559e-02\n9.63954506022831892e-02\n1.08207384516813720e-01\n1.11582982587630039e-01\n1.02554193927004086e-01\n7.80228061717612303e-02\n3.71660133926394742e-02\n-1.69921987709755438e-02\n-7.63765227519522111e-02\n-1.27831519265008048e-01\n-1.55154387862580678e-01\n-1.43700637599464193e-01\n-8.70486718107104096e-02\n6.38619195150672437e-03\n1.10446767172589319e-01\n1.85983409927292925e-01\n1.94868467575783355e-01\n1.19578601547263547e-01\n-2.15614839358357346e-02\n-1.75678460337154452e-01\n-2.78758733454498697e-01\n-2.91399566540138655e-01\n-2.23035779133255840e-01\n-1.23417065140767071e-01\n-4.50210757200682349e-02\n-8.24313171295403165e-03\n2.41373927090846319e-02\n4.18071905343771685e-02\n5.38707862497714296e-02\n6.32577158089873415e-02\n7.03611712902650760e-02\n7.47860483364597289e-02\n7.56706756816429987e-02\n7.18461346194087525e-02\n6.20198742051784949e-02\n4.50494128653186471e-02\n2.03342306331663614e-02\n-1.16837496139834910e-02\n-4.89768376647864850e-02\n-8.74877982318575248e-02\n-1.21011953260873009e-01\n-1.41689016672575385e-01\n-1.41363606820619270e-01\n-1.13898449709627148e-01\n-5.81522879597550502e-02\n1.92047118685284950e-02\n1.02399949723234254e-01\n1.68341815220162644e-01\n1.92438263792503228e-01\n1.57778813284806196e-01\n6.46270004004263626e-02\n-6.47974200505100906e-02\n-1.90999582833633635e-01\n-2.72223064754360422e-01\n-2.83980418922292754e-01\n-2.31859639852920435e-01\n-1.47795586818941532e-01\n-7.03496443214294831e-02\n-2.24994704949566041e-02\n-3.65638522980910605e-03\n0.0\n1.01897905994507575e-03\n3.94648892930136736e-03\n9.32664418938427241e-03\n1.75503911581325577e-02\n2.88313705192460613e-02\n4.31254389820692335e-02\n6.00107232361520374e-02\n7.85450529092397431e-02\n9.71291651757936747e-02\n1.13421589857311170e-01\n1.24370364618033982e-01\n1.26440450821384998e-01\n1.16112301109271968e-01\n9.06912581974775867e-02\n4.93847277396137069e-02\n-5.53072956324607463e-03\n-6.77992527929632688e-02\n-1.27027809236434502e-01\n-1.69807348986498380e-01\n-1.82435390220358346e-01\n-1.55039251389698457e-01\n-8.61046138867455207e-02\n1.43795014475946205e-02\n1.25235211285624454e-01\n2.19169547396863285e-01\n2.71873731322977097e-01\n2.71768537341652183e-01\n2.25361927258612038e-01\n1.54343846521432265e-01\n8.49581998874065908e-02\n3.55482320942710622e-02\n1.01128456210517782e-02\n1.47394489873385278e-03\n2.67665710769287128e-02\n4.63610610496441311e-02\n5.97724117272256245e-02\n7.03475945285951115e-02\n7.87022364081061271e-02\n8.46659097151618439e-02\n8.76279602685136744e-02\n8.66730670752684507e-02\n8.06985182492933467e-02\n6.85729740480912897e-02\n4.93649285165277882e-02\n2.26501589845631568e-02\n-1.11165582270127145e-02\n-5.02142550627331374e-02\n-9.13446824066089930e-02\n-1.29531839862366077e-01\n-1.58392177271466622e-01\n-1.70917766056338682e-01\n-1.60825475517249544e-01\n-1.24347811852244389e-01\n-6.20918932738395782e-02\n1.96571297800515257e-02\n1.08931789776349125e-01\n1.89950536531008102e-01\n2.46868064707610552e-01\n2.68535098754328461e-01\n2.52539934974788716e-01\n2.06538122064415547e-01\n1.45688622258107969e-01\n8.68595108382069075e-02\n4.22529576120821981e-02\n1.57878678087645073e-02\n4.04110932355034123e-03\n5.32906231080504215e-04\n0.0\n9.29462251594309120e-04\n3.59979182135320742e-03\n8.51139530991953594e-03\n1.60410789093071299e-02\n2.64419079260026467e-02\n3.98020234772056697e-02\n5.59754648741611141e-02\n7.44931654800796844e-02\n9.44656016405119592e-02\n1.14495509431976714e-01\n1.32627901146329191e-01\n1.46373179529723646e-01\n1.52844012213463720e-01\n1.49042839805100608e-01\n1.32318625705136916e-01\n1.00973835982674107e-01\n5.49449673992650420e-02\n-3.59000464986089854e-03\n-6.98860237721507099e-02\n-1.36817459202250857e-01\n-1.95749187959410154e-01\n-2.38100417649289076e-01\n-2.57348837818824505e-01\n-2.50937770287522677e-01\n-2.21375523568002608e-01\n-1.75910855868980864e-01\n-1.24614639137255775e-01\n-7.73950715468088024e-02\n-4.10967391927406153e-02\n-1.79551606466628842e-02\n-6.06365707305607342e-03\n-1.40957592285171599e-03\n-1.69449705056967193e-04\n3.12733070096983534e-02\n5.41669566614974632e-02\n6.98770653658280644e-02\n8.24327216241662747e-02\n9.27705357613026887e-02\n1.01019375224689095e-01\n1.06901736524127836e-01\n1.09865334860347469e-01\n1.09156675231493042e-01\n1.03893151362795103e-01\n9.31569047437281195e-02\n7.61220096914253380e-02\n5.22182333518260086e-02\n2.13246704987324412e-02\n-1.60264307043507630e-02\n-5.84706816809211563e-02\n-1.03707285014260478e-01\n-1.48528447187658702e-01\n-1.89037489995673963e-01\n-2.21086195238043681e-01\n-2.40912587437805581e-01\n-2.45889892737461896e-01\n-2.35222059562140540e-01\n-2.10370777436830525e-01\n-1.75010194694533272e-01\n-1.34405982816577590e-01\n-9.43000887044448677e-02\n-5.95960105276388680e-02\n-3.32809265163921467e-02\n-1.59868887638049233e-02\n-6.34896904029747314e-03\n-1.95644378141252885e-03\n-4.16267942857787455e-04\n-4.59141135304200177e-05\n0.0\n7.73507630113966964e-04\n2.99578216959576083e-03\n7.08678009876696161e-03\n1.33774287198306918e-02\n2.21284012561495554e-02\n3.35242814007712456e-02\n4.76535425156416614e-02\n6.44783743463995113e-02\n8.37976224459000690e-02\n1.05207163817529592e-01\n1.28063978155770725e-01\n1.51462490436526959e-01\n1.74233871858682943e-01\n1.94980056289906861e-01\n2.12153168185107793e-01\n2.24186681421041173e-01\n2.29676027674979077e-01\n2.27593499390753073e-01\n2.17506664934282834e-01\n1.99754785536689267e-01\n1.75529665473881519e-01\n1.46812736504616070e-01\n1.16144145658910680e-01\n8.62420596268630574e-02\n5.95424627280033980e-02\n3.77731355056350679e-02\n2.16873001375922393e-02\n1.10458551161558352e-02\n4.85508027444892919e-03\n1.76906379417671091e-03\n5.01302139730205182e-04\n9.82685884771035558e-05\n1.00016249682269634e-05\n4.47318334264499504e-02\n7.74778082103191323e-02\n1.00008764853541668e-01\n1.18262604145389943e-01\n1.33900658344552059e-01\n1.47598821408043424e-01\n1.59633775166291597e-01\n1.70067091636111306e-01\n1.78822362959853959e-01\n1.85726920975766818e-01\n1.90542117837366826e-01\n1.92992190013558829e-01\n1.92796438444457818e-01\n1.89706663831108041e-01\n1.83549602254927474e-01\n1.74271886655357755e-01\n1.61982725349178208e-01\n1.46987304229566657e-01\n1.29802443707769000e-01\n1.11146044395650026e-01\n9.18941285425757398e-02\n7.30043165295902047e-02\n5.54121330966666353e-02\n3.99152721433379681e-02\n2.70683108855125192e-02\n1.71130623404602139e-02\n9.96493943421403877e-03\n5.26265138582914828e-03\n2.47011809601738750e-03\n1.00218794427347178e-03\n3.37563977004435342e-04\n8.85347148443645999e-05\n1.60802450668156279e-05\n1.51774772272301630e-06\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n2.12816502681797241e-02\n3.68608995333991052e-02\n4.71793262444005490e-02\n5.38928417801408308e-02\n5.56915912862105747e-02\n4.99582735431423272e-02\n3.36631066209816046e-02\n4.91156907340564285e-03\n-3.45857622915974119e-02\n-7.66380627718875052e-02\n-1.05131198138008849e-01\n-9.93307865079841035e-02\n-4.52185883455058640e-02\n4.63278736087167561e-02\n1.26520898685542615e-01\n1.24501302937105471e-01\n8.76149374982767432e-03\n-1.39009840017824376e-01\n-1.45430724917557569e-01\n5.23901068506406331e-02\n2.03641230091638537e-01\n3.34229155239343378e-03\n-2.44704412764027740e-01\n6.30482839383653682e-02\n2.56722185146756099e-01\n-3.55963783728098226e-01\n2.54118863941887874e-01\n-1.21807850318845834e-01\n4.26606710224011199e-02\n-1.13315026562792326e-02\n2.32099260135682200e-03\n-3.68093455385364672e-04\n4.49246874345974990e-05\n-4.14816878940934107e-06\n2.80666439932428835e-07\n0.0\n1.86745723208215373e-03\n7.23263075960878070e-03\n1.69990960812781110e-02\n3.14211564101599949e-02\n4.95772040034807848e-02\n6.86104779796206654e-02\n8.30695156534983631e-02\n8.50243645688140981e-02\n6.59726096787435906e-02\n2.14395641429479290e-02\n-4.21206521871004408e-02\n-1.01605177089898413e-01\n-1.20244548014454208e-01\n-6.76016392702983304e-02\n4.51760544869141689e-02\n1.41525300570249757e-01\n1.16379318976622001e-01\n-4.65345033374867448e-02\n-1.79019170607712441e-01\n-6.59803259590554664e-02\n1.83093383809200233e-01\n1.16520274276823349e-01\n-2.28916206813579298e-01\n-4.61698185797701013e-02\n3.14408655384962266e-01\n-3.35841052092195835e-01\n2.10846353029056549e-01\n-9.24607554307700780e-02\n3.02012044843337213e-02\n-7.56926647351949602e-03\n1.47453542826453681e-03\n-2.23710680151418054e-04\n2.62373116336375961e-05\n-2.33651175827050132e-06\n2.02036552227834593e-02\n3.49937573444652553e-02\n4.48278912869996340e-02\n5.13899921861007761e-02\n5.36329394348583274e-02\n4.93210453074127073e-02\n3.57573145786139190e-02\n1.09920598842667867e-02\n-2.42158482711070933e-02\n-6.39779763358715309e-02\n-9.56383738664277477e-02\n-1.01335837201968176e-01\n-6.55768663341193270e-02\n1.07490560845814494e-02\n9.64823503658635839e-02\n1.32699615167664042e-01\n6.94679340814865487e-02\n-7.01538332662237502e-02\n-1.60636143131523773e-01\n-7.03429566977080006e-02\n1.35632305248164442e-01\n1.61147047998383669e-01\n-1.05281856140399310e-01\n-2.01029929077367109e-01\n1.67807972509137704e-01\n1.49442883182514086e-01\n-3.44346547073186571e-01\n3.03190113760648583e-01\n-1.70325227740196872e-01\n6.88854684691100894e-02\n-2.10864033927927082e-02\n5.00299350174263861e-03\n-9.29183622006235347e-04\n1.35114242016858818e-04\n-1.52511118944312022e-05\n0.0\n1.68733084281870536e-03\n6.53500425377897057e-03\n1.53696509570200174e-02\n2.84714545443421341e-02\n4.51493331961060479e-02\n6.31105739526803267e-02\n7.78709985598398519e-02\n8.27090663119766090e-02\n6.99448176263682275e-02\n3.43276257562726006e-02\n-2.14721953574879762e-02\n-8.13637555187672334e-02\n-1.15535201316090227e-01\n-9.23176745633271928e-02\n-4.50055827464882711e-03\n1.03351054163476563e-01\n1.40931629951078663e-01\n4.38202707331680971e-02\n-1.21190000821164434e-01\n-1.56191952983633892e-01\n3.71393373860482920e-02\n2.01851553280289697e-01\n3.36347342450209153e-03\n-2.39763246660708834e-01\n7.67012743240048367e-02\n2.34815863600254665e-01\n-3.49678107519329595e-01\n2.63903340327844627e-01\n-1.34391222092570234e-01\n5.04619131197604903e-02\n-1.45364229695717946e-02\n3.27456574136304442e-03\n-5.81100898710719318e-04\n8.11283243096222071e-05\n1.92296228612664731e-02\n3.33066838061015363e-02\n4.26980533827004058e-02\n4.90978908092084693e-02\n5.16707723361815030e-02\n4.84977533859578952e-02\n3.71792497934996316e-02\n1.57911073338050760e-02\n-1.55457904842158517e-02\n-5.26380510092989140e-02\n-8.55808569372749350e-02\n-9.92729014415990318e-02\n-7.83841114937427197e-02\n-1.78836705797768038e-02\n6.42234461484420954e-02\n1.22684026378661257e-01\n1.04571705082678823e-01\n-2.84395907248690717e-03\n-1.26696025260668449e-01\n-1.35325722993683062e-01\n2.14883625446609661e-02\n1.75452198371249590e-01\n7.62991962559262660e-02\n-1.78710858408800410e-01\n-1.11974246875406303e-01\n2.28614791791558747e-01\n2.69517171522314150e-02\n-2.95843085519047644e-01\n3.35612383342949905e-01\n-2.22689559120063663e-01\n1.03840242705222699e-01\n-3.64020533035435689e-02\n9.90425565941753516e-03\n-2.12385754219969599e-03\n3.60844406126030839e-04\n0.0\n1.53207190651344512e-03\n5.93368897911881934e-03\n1.39634007797171979e-02\n2.59150135058048431e-02\n4.12720649192606995e-02\n5.81811851044629694e-02\n7.29296256571533991e-02\n7.98066400861276587e-02\n7.19540390712607031e-02\n4.38681350072088194e-02\n-4.26141200838086893e-03\n-6.16093820896116903e-02\n-1.04741558894812417e-01\n-1.04112035721135698e-01\n-4.27409131296915268e-02\n5.87322678374611051e-02\n1.32712686452380935e-01\n1.01403542170394767e-01\n-3.84929827981150274e-02\n-1.57613809311495101e-01\n-8.93970852340923577e-02\n1.23930804810781989e-01\n1.64222290061364656e-01\n-1.02844109423984365e-01\n-1.94414017907292652e-01\n1.74250893841208399e-01\n1.27441070591743089e-01\n-3.30972442923643750e-01\n3.08025000704979290e-01\n-1.82925263793404846e-01\n7.87385814558744374e-02\n-2.58929121789640213e-02\n6.67537873949676334e-03\n-1.36588230204187644e-03\n1.83452158578086000e-02\n3.17748459415427564e-02\n4.07601455881991329e-02\n4.69927576403018146e-02\n4.98092289544976863e-02\n4.75551579723659454e-02\n3.80942670928614349e-02\n1.95739686589460476e-02\n-8.30860682716779222e-03\n-4.26114692505256479e-02\n-7.56028921335983872e-02\n-9.46603099063445808e-02\n-8.54512143729866114e-02\n-3.97070910260029913e-02\n3.39002423296442465e-02\n1.02649416546741451e-01\n1.18299304286858531e-01\n4.97650105435181594e-02\n-7.24254127058287234e-02\n-1.45706339118076039e-01\n-7.21553724687972187e-02\n1.02908497923298384e-01\n1.62804053877452309e-01\n-2.50463839528319021e-02\n-1.99715444644356421e-01\n-1.49215221927829047e-03\n2.34682348938180158e-01\n-9.00447263891711314e-02\n-2.13088128114954117e-01\n3.42282935581499637e-01\n-2.72467750096698047e-01\n1.46746702525521883e-01\n-5.86961991536093103e-02\n1.81811121517509201e-02\n-4.45406988413175192e-03\n0.0\n1.39731390909200552e-03\n5.41177349933732229e-03\n1.27415193704662547e-02\n2.36856768286568577e-02\n3.78612351651759702e-02\n5.37604081342210049e-02\n6.82901661384096581e-02\n7.65837465215103846e-02\n7.25567270655059771e-02\n5.07595650413623645e-02\n9.79475900484582176e-03\n-4.33993918613913149e-02\n-9.08326729184819742e-02\n-1.06526227905530263e-01\n-6.92511921676159797e-02\n1.66790222864612731e-02\n1.05899171799088615e-01\n1.25842363726263479e-01\n3.48945929899068460e-02\n-1.06870087900901189e-01\n-1.46968154702876108e-01\n7.64446795393896857e-05\n1.70811929959075348e-01\n8.35875959054815376e-02\n-1.75439841379564587e-01\n-1.06190087052387527e-01\n2.28281733404995135e-01\n8.23037802640443419e-03\n-2.77034355076190897e-01\n3.34059522088600014e-01\n-2.33592952562913875e-01\n1.15268961494049166e-01\n-4.30816017211388333e-02\n1.26147096936231815e-02\n1.75396826751446008e-02\n3.03796215419860523e-02\n3.89919002687911104e-02\n4.50566391511487349e-02\n4.80510761591423780e-02\n4.65430020624848437e-02\n3.86279833274072865e-02\n2.25495333282264149e-02\n-2.27180554820313003e-03\n-3.38201550146746965e-02\n-6.60744894550817086e-02\n-8.85592449361108230e-02\n-8.83079535797457182e-02\n-5.55296468552149286e-02\n7.46620843387352153e-03\n7.83539518256021056e-02\n1.16656154360074205e-01\n8.43791815045934757e-02\n-1.70107364363443862e-02\n-1.20312410047400009e-01\n-1.22978515006993930e-01\n9.35832744941297000e-03\n1.50968111423937373e-01\n1.03923892057302167e-01\n-1.13827428598865896e-01\n-1.65630810634439712e-01\n1.02082492296354244e-01\n1.87221697198126091e-01\n-1.80493125178238567e-01\n-1.05900916074454801e-01\n3.16926435300983966e-01\n-3.11533171734927672e-01\n1.94924906999790898e-01\n-8.88492762209247278e-02\n3.11760148796011820e-02\n0.0\n1.28007447299636383e-03\n4.95770711582015251e-03\n1.16775091739598109e-02\n2.17384268304658401e-02\n3.48601255407430671e-02\n4.98086711159156439e-02\n6.39914958658551747e-02\n7.32454039929656131e-02\n7.21894160782906302e-02\n5.55995546294664536e-02\n2.10986428796949115e-02\n-2.72057928618685031e-02\n-7.57844692549292515e-02\n-1.02617202078715372e-01\n-8.55475494758175248e-02\n-1.85805754743997298e-02\n7.13932039979365968e-02\n1.24931880121226122e-01\n8.52242668022493571e-02\n-3.94019220119378941e-02\n-1.42386670699313767e-01\n-9.42747485970574228e-02\n8.54983700184651224e-02\n1.66623142080289499e-01\n-1.56902920851888922e-02\n-1.97556013164166322e-01\n1.85117050990254409e-03\n2.29483220433437524e-01\n-1.02952923737379465e-01\n-1.91683100370852871e-01\n3.34027503693419603e-01\n-2.79980449714968216e-01\n1.58893210086946374e-01\n-6.73459786427104967e-02\n1.68320516027317020e-02\n2.91539685715524605e-02\n3.74368917374536883e-02\n4.33459479667018324e-02\n4.64736055157237982e-02\n4.55733040254179961e-02\n3.89414573732431019e-02\n2.49262266590838388e-02\n2.77164528317055958e-03\n-2.61912568968320249e-02\n-5.72797561979072820e-02\n-8.18260406852471950e-02\n-8.83182005040643314e-02\n-6.64888678542051581e-02\n-1.44720568188229128e-02\n5.35303834182305135e-02\n1.05352717896848469e-01\n1.02776912407551047e-01\n2.96562981227647925e-02\n-7.80009381043936384e-02\n-1.34049557655207541e-01\n-6.63241957376934921e-02\n8.52845640873722000e-02\n1.53549810372032858e-01\n1.79631883874077497e-02\n-1.66170751687453128e-01\n-8.87861804365492613e-02\n1.73438754777461179e-01\n9.98294437039692339e-02\n-2.28244866879545483e-01\n9.63461071343446780e-03\n2.59007517212565541e-01\n-3.32329320886346591e-01\n2.44288744066599672e-01\n-1.27052296174251317e-01\n0.0\n1.18417153003930230e-03\n4.58627661489517321e-03\n1.08067466408336976e-02\n2.01424441230371662e-02\n3.23916485938165813e-02\n4.65339503750063152e-02\n6.03720917946849664e-02\n7.03112551050089213e-02\n7.15720608655122242e-02\n5.92170035060626682e-02\n3.02800905492890370e-02\n-1.31644404106591624e-02\n-6.11080128843637105e-02\n-9.52554670973614070e-02\n-9.42676380304934419e-02\n-4.61115552156580663e-02\n3.63210527695236873e-02\n1.08365450882862813e-01\n1.11821611865538240e-01\n2.27450997055941816e-02\n-1.01051401609334207e-01\n-1.36952363248426329e-01\n-1.67372247913032679e-02\n1.43279733195497277e-01\n1.16121803346175959e-01\n-1.05684652462060463e-01\n-1.67558911710559505e-01\n1.02735989791481880e-01\n1.81845463476717761e-01\n-1.87322258870405572e-01\n-8.75815089306112432e-02\n3.07088124633446924e-01\n-3.18089019571932974e-01\n2.08940196676024148e-01\n1.64399684915726811e-02\n2.84748607022353613e-02\n3.65806168524205194e-02\n4.24295750521622092e-02\n4.57059526446696313e-02\n4.53052284320900195e-02\n3.96776237223374004e-02\n2.72557469380069854e-02\n7.16164733763422368e-03\n-1.97757767361535046e-02\n-4.98823506248418092e-02\n-7.59099093661730201e-02\n-8.76264801498600893e-02\n-7.47636421434444837e-02\n-3.27352207225403286e-02\n3.03348801433307828e-02\n8.97123739616098453e-02\n1.10001038007665877e-01\n6.54017574477035318e-02\n-3.19491659135781453e-02\n-1.18711722590061255e-01\n-1.12685474577792169e-01\n6.71264401309245185e-03\n1.35986607255311615e-01\n1.14430863351634396e-01\n-6.93440800369397453e-02\n-1.72639686248929003e-01\n6.14810221581400286e-03\n2.00037330561364413e-01\n-2.47987531598726574e-03\n-2.31248592237712797e-01\n1.13217966263793837e-01\n1.84123561494090232e-01\n-3.41946349130095362e-01\n2.99507953218218659e-01\n0.0\n1.13034445223332450e-03\n4.37780523897761051e-03\n1.03191110019321998e-02\n1.92553557048541144e-02\n3.10443437973838381e-02\n4.48184516816101733e-02\n5.86593815782203501e-02\n6.93718770082353137e-02\n7.25995501870621701e-02\n6.36057541502863255e-02\n3.89987290360409924e-02\n-6.37048067978613600e-04\n-4.79581204421160728e-02\n-8.77178964758889429e-02\n-9.98450280134311474e-02\n-6.86826399964965001e-02\n3.17500094822953383e-03\n8.44508431228275652e-02\n1.21781196907420383e-01\n7.30604531579932964e-02\n-4.45682495432180789e-02\n-1.37036389172793510e-01\n-9.77958085440039787e-02\n6.24553214350324279e-02\n1.63677489512864732e-01\n4.05235928738126791e-02\n-1.66393879796026128e-01\n-1.04597463053006948e-01\n1.75781491625861430e-01\n1.10692370049419675e-01\n-2.38825649340297513e-01\n4.92425556266841685e-03\n2.87381715671700344e-01\n-3.75972577672014086e-01\n1.67281420352649417e-02\n2.89739919213075278e-02\n3.72370696861237110e-02\n4.32634602660403877e-02\n4.68115027937664185e-02\n4.68678670252888063e-02\n4.19711997369028866e-02\n3.05857154962063289e-02\n1.17143652978468991e-02\n-1.42035489420954310e-02\n-4.42415101295939098e-02\n-7.21904756544958642e-02\n-8.87586625341042629e-02\n-8.36890312557616867e-02\n-5.03711313705892741e-02\n7.79047785802438469e-03\n7.23468532126303604e-02\n1.11592070317923314e-01\n9.43743923482241454e-02\n1.47087963611903412e-02\n-8.72533593843205363e-02\n-1.34115004356158529e-01\n-6.74384694740459839e-02\n7.62297985591766647e-02\n1.55362711396954595e-01\n5.33120221375125922e-02\n-1.36732227747086571e-01\n-1.46097651576522186e-01\n8.99629696967455678e-02\n1.94330012881778341e-01\n-8.73557158919087001e-02\n-2.17816393799657032e-01\n1.84227726713953766e-01\n1.56740932257091070e-01\n-4.17517721861555113e-01\n0.0\n1.11811035758938417e-03\n4.33042279416570412e-03\n1.02109443236253570e-02\n1.90748916642757803e-02\n3.08310647692906573e-02\n4.47262659388518377e-02\n5.90419421186035229e-02\n7.08605587738293935e-02\n7.61054116167094175e-02\n7.01335516871662568e-02\n4.91496196072158248e-02\n1.24893961709523216e-02\n-3.47199688993091934e-02\n-7.98675809013322247e-02\n-1.04293352747767770e-01\n-8.99358251773469813e-02\n-3.11307574877021792e-02\n5.33263282195234056e-02\n1.18447094474725068e-01\n1.13086988839821045e-01\n2.12784193701238897e-02\n-1.01629835740003602e-01\n-1.46026196466968433e-01\n-4.34637116463842330e-02\n1.24285604232856894e-01\n1.55771557333404365e-01\n-3.05660721974804865e-02\n-1.96827455676284291e-01\n-4.59569673229211217e-02\n2.18999715406624773e-01\n6.60967169375323987e-02\n-2.76620572629774963e-01\n1.53614516277746811e-02\n4.15947670895795818e-01\n1.74805074397970175e-02\n3.02771270278141894e-02\n3.89281420917518828e-02\n4.53056925149733641e-02\n4.92426582090743914e-02\n4.97998508514321953e-02\n4.55794918518731274e-02\n3.50555492839280114e-02\n1.71088189238814831e-02\n-8.17720537614733713e-03\n-3.85443485201869482e-02\n-6.87204133269897488e-02\n-9.03060281692625866e-02\n-9.31911153299616046e-02\n-6.91589897576264934e-02\n-1.74679563908144118e-02\n4.95848200150508442e-02\n1.05323538968605274e-01\n1.16701965153139200e-01\n6.36093340960757064e-02\n-3.77548205021796465e-02\n-1.26702759510222751e-01\n-1.27346343970532017e-01\n-1.52183537138975093e-02\n1.27658741505992379e-01\n1.51625421777101949e-01\n-3.71935343082266693e-03\n-1.76990390033416461e-01\n-1.17009407018375769e-01\n1.41750558918704306e-01\n1.93212178005032764e-01\n-1.23726686695298113e-01\n-2.47510970181993639e-01\n1.80974560370336768e-01\n3.77219280709365279e-01\n0.0\n1.11295595917854052e-03\n4.31045989496078950e-03\n1.01675181250446018e-02\n1.90158926565480862e-02\n3.08160978193346945e-02\n4.49279091675870712e-02\n5.98296119394004233e-02\n7.28812211337166865e-02\n8.02987662734566537e-02\n7.75766172236002083e-02\n6.06059056372706267e-02\n2.75981687410624954e-02\n-1.84655523316464565e-02\n-6.78065998300154266e-02\n-1.03943754078082706e-01\n-1.07901186970825999e-01\n-6.74301948882716357e-02\n1.10963289602320405e-02\n9.53420410207333757e-02\n1.34746185697978693e-01\n8.96155548088321541e-02\n-2.86752102264458825e-02\n-1.39756017857772002e-01\n-1.38087769867055704e-01\n3.97044234584975446e-03\n1.62001193617520384e-01\n1.43679396287834604e-01\n-7.21093147422695591e-02\n-2.15971055629070985e-01\n-3.39485253636480147e-02\n2.45189126199648277e-01\n1.17694052366970878e-01\n-3.01275488256809498e-01\n-3.15219564647054917e-01\n1.83549502503852005e-02\n3.17917064040662486e-02\n4.08933413892280245e-02\n4.76777354982747745e-02\n5.20632661825515403e-02\n5.31966654096003022e-02\n4.97584294310522562e-02\n4.02505475605412083e-02\n2.34521956091376937e-02\n-8.92768677736429099e-04\n-3.12017665799735125e-02\n-6.32114120553527725e-02\n-8.96193681948040943e-02\n-1.00872452142947544e-01\n-8.77588294963873861e-02\n-4.59608672025248743e-02\n1.85037259154126436e-02\n8.58378635222241948e-02\n1.25351843748616437e-01\n1.08175173545882769e-01\n2.80665558766575868e-02\n-8.08756727992072932e-02\n-1.48871725571689206e-01\n-1.11650080632685847e-01\n2.58724230689607280e-02\n1.58461093840879058e-01\n1.46323199192425896e-01\n-3.35564981394567557e-02\n-1.99671272050354787e-01\n-1.22800185484269381e-01\n1.48906751138997234e-01\n2.39834095117801127e-01\n-5.59269282877820906e-02\n-3.58428687014652192e-01\n-2.44724431484513033e-01\n0.0\n1.10087330444941407e-03\n4.26366397441690827e-03\n1.00608940372794425e-02\n1.88392788967579848e-02\n3.06127308007374949e-02\n4.48616585762029105e-02\n6.02794889631172379e-02\n7.45405274179914146e-02\n8.42205782855263152e-02\n8.50627146456634092e-02\n7.28061187647917468e-02\n4.47205595709087370e-02\n1.73325311881123573e-03\n-4.94479217165455509e-02\n-9.54411922044063332e-02\n-1.18209808158300123e-01\n-1.01342540672483508e-01\n-4.01133079274869978e-02\n4.86712133539847144e-02\n1.24845744182399618e-01\n1.39416563433082730e-01\n6.63452648454497251e-02\n-6.40618599246893933e-02\n-1.62256859228921607e-01\n-1.34090639051698546e-01\n2.51103052637976012e-02\n1.81962444570544585e-01\n1.58210020457036499e-01\n-6.28075393825043987e-02\n-2.41964267221190632e-01\n-1.19325138646616091e-01\n2.11726195802438982e-01\n3.55473108314241948e-01\n1.77339960613398379e-01\n1.93276353964155073e-02\n3.34764464967582942e-02\n4.30799633531543102e-02\n5.03200334908897318e-02\n5.52137528616503670e-02\n5.70100755651262794e-02\n5.44892430959953294e-02\n4.62087879421108141e-02\n3.08788170758610633e-02\n7.93449332744670943e-03\n-2.17081356073862454e-02\n-5.48532714796395454e-02\n-8.55032892562050673e-02\n-1.05121398785114825e-01\n-1.04265307144194880e-01\n-7.59516028781972302e-02\n-2.03714086831266565e-02\n5.07169009177070446e-02\n1.13034985742423141e-01\n1.35879739993436693e-01\n9.67919952009663603e-02\n5.96472911934769578e-04\n-1.09224444588029559e-01\n-1.62802328009072350e-01\n-1.06780263968253158e-01\n4.12124904617430232e-02\n1.74979903370644091e-01\n1.64954709147007827e-01\n-1.36056127387278371e-02\n-2.07516450706768663e-01\n-1.97408458038821150e-01\n5.45155391947270973e-02\n3.08201999705446039e-01\n3.09244806238314573e-01\n1.20192904965607153e-01\n0.0\n1.08110805094605174e-03\n4.18711347676481785e-03\n9.88408968823923338e-03\n1.85314394272864981e-02\n3.01969081106069868e-02\n4.44869468479376501e-02\n6.03249860577191738e-02\n7.57324726103848350e-02\n8.77106320407952389e-02\n9.23708355814379378e-02\n8.54932822202442710e-02\n6.36641528960042169e-02\n2.59928355633181514e-02\n-2.39046321779727497e-02\n-7.64373502745972072e-02\n-1.16333347244943847e-01\n-1.26049003254723957e-01\n-9.28812757524067056e-02\n-1.83301435956952398e-02\n7.47735031515699700e-02\n1.44265356650025989e-01\n1.45411309537594152e-01\n6.02798313167343530e-02\n-7.58587695645252386e-02\n-1.77030895079559270e-01\n-1.55805099849541662e-01\n-1.21159289044274845e-03\n1.78822106313723250e-01\n2.19026345150656693e-01\n4.81092260366351790e-02\n-2.09846343431254079e-01\n-3.33602226958726877e-01\n-2.41375497749209467e-01\n-7.62051205793435743e-02\n2.04620100455109311e-02\n3.54412410238096887e-02\n4.56298688702058003e-02\n5.34003851088015666e-02\n5.88842819295180980e-02\n6.14504175220096233e-02\n6.00020863338986479e-02\n5.31839537993755301e-02\n3.96786884147982480e-02\n1.86617470936176512e-02\n-9.57693963898388276e-03\n-4.29215554568932525e-02\n-7.68335875122996281e-02\n-1.04224084633464484e-01\n-1.16258927106453802e-01\n-1.04511598598919744e-01\n-6.45172918639689702e-02\n-4.58255570393658795e-06\n7.40172089879992667e-02\n1.32069046465886131e-01\n1.45487035786166008e-01\n9.63777630588493472e-02\n-6.44713282682061843e-03\n-1.19819107208053388e-01\n-1.78667686271198251e-01\n-1.32208938962966788e-01\n1.16117068756037105e-02\n1.68350756951164832e-01\n2.18377793519405006e-01\n9.83308923815324476e-02\n-1.27194044522944527e-01\n-2.98998545271547622e-01\n-3.01092453739817467e-01\n-1.70914652986185550e-01\n-4.51466317866413766e-02\n0.0\n1.05261045075646931e-03\n4.07674274582368792e-03\n9.62741085112245841e-03\n1.80736116433222911e-02\n2.95359307779392982e-02\n4.37497466693159490e-02\n5.98794049151725669e-02\n7.63214077533680701e-02\n9.05645568034944975e-02\n9.92126392477618441e-02\n9.83063210385439895e-02\n8.40797199566310771e-02\n5.42166599920137909e-02\n9.49351005413398043e-03\n-4.46042560663495388e-02\n-9.70732012423855956e-02\n-1.32442701339761021e-01\n-1.34614500695910355e-01\n-9.35616660331497485e-02\n-1.32124124682232429e-02\n8.33647299642630984e-02\n1.56710752554375221e-01\n1.65361502991674125e-01\n8.96146613929846153e-02\n-4.67330081247063628e-02\n-1.74609361876444269e-01\n-2.10667735094715342e-01\n-1.12351180377819673e-01\n7.95998969662426586e-02\n2.55056506525543125e-01\n3.11516951651782281e-01\n2.36142722970681618e-01\n1.10351666717666386e-01\n2.49339836259027392e-02\n2.18479384315735138e-02\n3.78417394041220129e-02\n4.87441729394857137e-02\n5.71575690736264713e-02\n6.33479608300964725e-02\n6.68251280208142784e-02\n6.66428108280673337e-02\n6.15710470737925383e-02\n5.03186695549314444e-02\n3.18718983016089835e-02\n5.97143404167274194e-03\n-2.63028394936936083e-02\n-6.19510063193039473e-02\n-9.56922457762330175e-02\n-1.20141275871477493e-01\n-1.26877412366391579e-01\n-1.08646153495423572e-01\n-6.25713306007567999e-02\n6.38255207662689721e-03\n8.32385731605309043e-02\n1.44197044375506261e-01\n1.62903673229763846e-01\n1.21666246619604818e-01\n2.41436489822146466e-02\n-9.75132194252592288e-02\n-1.89022566340189935e-01\n-1.96996952464991493e-01\n-1.00834184091392318e-01\n6.59653627360468758e-02\n2.25783208976489763e-01\n3.01181073417256640e-01\n2.66501595630411259e-01\n1.63884925680829713e-01\n6.50544557857245104e-02\n1.27921485213135372e-02\n0.0\n1.01267687905782881e-03\n3.92208068768027350e-03\n9.26601124636483760e-03\n1.74184344125168609e-02\n2.85498017409149957e-02\n4.25243685010356226e-02\n5.87540332848824134e-02\n7.60328947256611043e-02\n9.23949893573970116e-02\n1.05062950927588508e-01\n1.10580351072243260e-01\n1.05232185106129583e-01\n8.58361762651702609e-02\n5.09078911566865980e-02\n2.04629427235199050e-03\n-5.48411373333040145e-02\n-1.09097991840997971e-01\n-1.46420829938173763e-01\n-1.52095188078151533e-01\n-1.16306539495733913e-01\n-4.02958632861905378e-02\n5.92492531932735031e-02\n1.50977403985747022e-01\n1.97367786890978975e-01\n1.70182512681509079e-01\n6.70600413910217297e-02\n-8.05958681657807652e-02\n-2.17060567079970235e-01\n-2.88726378826213215e-01\n-2.73890020008664081e-01\n-1.94968917107793988e-01\n-1.01414838880032138e-01\n-3.49617410011174093e-02\n-6.06626935407080653e-03\n2.36458606054660639e-02\n4.09558319573586002e-02\n5.27819729332247786e-02\n6.20180961897126709e-02\n6.90930499315725311e-02\n7.36845780175084397e-02\n7.50311093111760002e-02\n7.20762773674654411e-02\n6.36251026287371901e-02\n4.85731264444381611e-02\n2.62362418495791921e-02\n-3.22081411680419719e-03\n-3.83028529755731553e-02\n-7.57557372188773503e-02\n-1.10367210099537344e-01\n-1.35229614722771452e-01\n-1.42699264548071886e-01\n-1.26182515576803767e-01\n-8.26216490281462684e-02\n-1.51445846384261843e-02\n6.51237923241830274e-02\n1.39389198216859717e-01\n1.84756949780227581e-01\n1.81160792363946943e-01\n1.20014309174649253e-01\n1.10267187597300111e-02\n-1.17213239190433666e-01\n-2.25653190182561247e-01\n-2.80489116841955322e-01\n-2.68990171901485553e-01\n-2.05764176743742588e-01\n-1.23969962811734821e-01\n-5.60274096176686526e-02\n-1.70546150124787216e-02\n-2.64099641748055062e-03\n0.0\n9.56103031635313324e-04\n3.70297111878199140e-03\n8.75210543510581036e-03\n1.64750743905043052e-02\n2.70859907812399034e-02\n4.05734775432173636e-02\n5.65972202844809494e-02\n7.43628326452938637e-02\n9.24976241883507105e-02\n1.08963939217099834e-01\n1.21062805636432735e-01\n1.25593403445501711e-01\n1.19234707545186100e-01\n9.91928928638955570e-02\n6.40995667499746069e-02\n1.50449788179337959e-02\n-4.35045506575052962e-02\n-1.03290240041384304e-01\n-1.52797915560654946e-01\n-1.79109417360985235e-01\n-1.71096977767072833e-01\n-1.23407249197765134e-01\n-3.99902915086075977e-02\n6.45423983943835683e-02\n1.67250533640098981e-01\n2.43219018040573526e-01\n2.74240424722282605e-01\n2.56177459770552951e-01\n2.00910739604953759e-01\n1.30923998770908712e-01\n6.87953017573965792e-02\n2.75267041555385741e-02\n7.49470025095044096e-03\n1.04569868167942066e-03\n2.62112865531017973e-02\n4.53992800417192255e-02\n5.85388236017586397e-02\n6.89261677865639216e-02\n7.71984170451309598e-02\n8.32401053694260123e-02\n8.65207430809512568e-02\n8.62218522284068090e-02\n8.13391364547309953e-02\n7.08160173923037678e-02\n5.37349578264964198e-02\n2.95771684255972944e-02\n-1.45743947285048299e-03\n-3.81047682130314438e-02\n-7.77345257355582658e-02\n-1.16197264323294955e-01\n-1.47952661385101464e-01\n-1.66608857431781443e-01\n-1.65948655015955709e-01\n-1.41395391112948049e-01\n-9.16820113023430472e-02\n-2.02712157465583416e-02\n6.40802322135100993e-02\n1.48191321485858785e-01\n2.17017679016947740e-01\n2.57534531957414881e-01\n2.62814766938289035e-01\n2.34660603299138099e-01\n1.83323645406446800e-01\n1.23936471537948859e-01\n7.09484813840139117e-02\n3.31697639096199606e-02\n1.19157720832704581e-02\n2.93217468325401073e-03\n3.71600353817490747e-04\n0.0\n8.71586120970831483e-04\n3.37563853130555319e-03\n7.98196585932378459e-03\n1.50466836813487933e-02\n2.48150925336204191e-02\n3.73875352132785124e-02\n5.26602583889905843e-02\n7.02481882327572749e-02\n8.93988277884926463e-02\n1.08911946272828242e-01\n1.27086912270970326e-01\n1.41726840820606381e-01\n1.50233637470033488e-01\n1.49826807352596930e-01\n1.37906992049027149e-01\n1.12558371273748237e-01\n7.31406358070538776e-02\n2.08651860495484634e-02\n-4.08056366083602365e-02\n-1.06130087859277106e-01\n-1.67602452625855741e-01\n-2.17084814626053446e-01\n-2.47441309758915262e-01\n-2.54324743548386856e-01\n-2.37566425579321755e-01\n-2.01580586463770112e-01\n-1.54417414137369563e-01\n-1.05583920214027654e-01\n-6.33327284821546266e-02\n-3.24849023771751760e-02\n-1.37076147900970311e-02\n-4.46934342747979697e-03\n-1.00251758727390341e-03\n-1.16206317028435247e-04\n3.06135110210400928e-02\n5.30241564865112161e-02\n6.84070456992139642e-02\n8.07185924018627710e-02\n9.08982842220652509e-02\n9.91066527735126324e-02\n1.05118470712685375e-01\n1.08450036977296618e-01\n1.08426917806023898e-01\n1.04246461344236804e-01\n9.50569519581938999e-02\n8.00644419408500785e-02\n5.86713492764642658e-02\n3.06430580220169411e-02\n-3.71147481854258547e-03\n-4.33715161483309991e-02\n-8.64879163839965270e-02\n-1.30366568865028148e-01\n-1.71601100138646046e-01\n-2.06389621824482367e-01\n-2.31036608689614592e-01\n-2.42588112926797383e-01\n-2.39485612595974645e-01\n-2.22070527339366941e-01\n-1.92755702834583403e-01\n-1.55728632091025554e-01\n-1.16173374926285433e-01\n-7.91697816421104983e-02\n-4.85858255328929928e-02\n-2.63359353841609786e-02\n-1.22726421003306694e-02\n-4.72509988345344838e-03\n-1.41052481577214300e-03\n-2.90486902131344247e-04\n-3.09841458292136612e-05\n0.0\n7.24932106277488292e-04\n2.80764997474377762e-03\n6.64193148190857317e-03\n1.25388810952453758e-02\n2.07455710720550433e-02\n3.14411488254963956e-02\n4.47201650738975193e-02\n6.05667671145884087e-02\n7.88225012330917296e-02\n9.91512159493649625e-02\n1.21006086163244833e-01\n1.43605679960146643e-01\n1.65927823595074270e-01\n1.86731161551413782e-01\n2.04613926420844083e-01\n2.18116583627437050e-01\n2.25868884605739395e-01\n2.26772172600002042e-01\n2.20195325739502040e-01\n2.06149834657533865e-01\n1.85400258219625746e-01\n1.59465922107124930e-01\n1.30483079381463446e-01\n1.00925755460255867e-01\n7.32242679233146010e-02\n4.93616345730540987e-02\n3.05526343981119657e-02\n1.71014058688126955e-02\n8.48450759409691280e-03\n3.62950749498729131e-03\n1.28595077929444029e-03\n3.53995406566955247e-04\n6.73439899754949272e-05\n6.64491727955225977e-06\n4.37734641756219733e-02\n7.58178639754733541e-02\n9.78672802270537934e-02\n1.15735837048254825e-01\n1.31055603858134473e-01\n1.44497675795153768e-01\n1.56346096694847336e-01\n1.66677975715286253e-01\n1.75438485389755205e-01\n1.82480598659557847e-01\n1.87592847677843344e-01\n1.90524778040458614e-01\n1.91014702583573642e-01\n1.88821815363091394e-01\n1.83762859540331419e-01\n1.75751720037084336e-01\n1.64838384954493239e-01\n1.51241834704596595e-01\n1.35369960512171483e-01\n1.17819158469033250e-01\n9.93474371009259172e-02\n8.08182169740581657e-02\n6.31175434148650710e-02\n4.70544646102652869e-02\n3.32611887863212552e-02\n2.21138873842661038e-02\n1.36941100259143494e-02\n7.80321995545335545e-03\n4.02885340480873492e-03\n1.84692708465700227e-03\n7.31149004253975159e-04\n2.40047923702565893e-04\n6.13042675069584735e-05\n1.08303711712572984e-05\n9.93227320663544938e-07\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n2.12816502681797207e-02\n3.68608995333990982e-02\n4.71793262444005421e-02\n5.38928417801408238e-02\n5.56915912862105678e-02\n4.99582735431423203e-02\n3.36631066209815977e-02\n4.91156907340564199e-03\n-3.45857622915974050e-02\n-7.66380627718874913e-02\n-1.05131198138008836e-01\n-9.93307865079840757e-02\n-4.52185883455058571e-02\n4.63278736087167492e-02\n1.26520898685542588e-01\n1.24501302937105457e-01\n8.76149374982767258e-03\n-1.39009840017824349e-01\n-1.45430724917557541e-01\n5.23901068506406262e-02\n2.03641230091638481e-01\n3.34229155239343292e-03\n-2.44704412764027684e-01\n6.30482839383653543e-02\n2.56722185146756043e-01\n-3.55963783728098171e-01\n2.54118863941887818e-01\n-1.21807850318845806e-01\n4.26606710224011129e-02\n-1.13315026562792309e-02\n2.32099260135682156e-03\n-3.68093455385364618e-04\n4.49246874345974923e-05\n-4.14816878940934023e-06\n2.80666439932428782e-07\n-1.31402313931041177e-08\n0.0\n1.86745723208211058e-03\n7.23263075960861330e-03\n1.69990960812777155e-02\n3.14211564101592664e-02\n4.95772040034796399e-02\n6.86104779796190833e-02\n8.30695156534964479e-02\n8.50243645688121413e-02\n6.59726096787420641e-02\n2.14395641429474294e-02\n-4.21206521870994693e-02\n-1.01605177089896068e-01\n-1.20244548014451419e-01\n-6.76016392702967622e-02\n4.51760544869131350e-02\n1.41525300570246482e-01\n1.16379318976619281e-01\n-4.65345033374856901e-02\n-1.79019170607708306e-01\n-6.59803259590538982e-02\n1.83093383809195986e-01\n1.16520274276820587e-01\n-2.28916206813573997e-01\n-4.61698185797689425e-02\n3.14408655384954883e-01\n-3.35841052092187953e-01\n2.10846353029051609e-01\n-9.24607554307679130e-02\n3.02012044843330170e-02\n-7.56926647351931822e-03\n1.47453542826450233e-03\n-2.23710680151412822e-04\n2.62373116336369795e-05\n-2.33651175827044669e-06\n1.52924036405231572e-07\n2.02036552227494379e-02\n3.49937573444063302e-02\n4.48278912869241528e-02\n5.13899921860142342e-02\n5.36329394347679900e-02\n4.93210453073295862e-02\n3.57573145785535715e-02\n1.09920598842480483e-02\n-2.42158482710666291e-02\n-6.39779763357641168e-02\n-9.56383738662668625e-02\n-1.01335837201797285e-01\n-6.55768663340080965e-02\n1.07490560845645532e-02\n9.64823503657019771e-02\n1.32699615167440055e-01\n6.94679340813673524e-02\n-7.01538332661078706e-02\n-1.60636143131252462e-01\n-7.03429566975852100e-02\n1.35632305247938179e-01\n1.61147047998106613e-01\n-1.05281856140226643e-01\n-2.01029929077019165e-01\n1.67807972508857928e-01\n1.49442883182244746e-01\n-3.44346547072585496e-01\n3.03190113760122892e-01\n-1.70325227739902413e-01\n6.88854684689912122e-02\n-2.10864033927563553e-02\n5.00299350173402050e-03\n-9.29183622004635498e-04\n1.35114242016626257e-04\n-1.52511118944049594e-05\n1.31152186994803854e-06\n0.0\n1.68733084269228500e-03\n6.53500425328934660e-03\n1.53696509558684420e-02\n2.84714545422087226e-02\n4.51493331927222685e-02\n6.31105739479485839e-02\n7.78709985539971922e-02\n8.27090663057623854e-02\n6.99448176210972078e-02\n3.43276257536564711e-02\n-2.14721953559282412e-02\n-8.13637555127021128e-02\n-1.15535201307413737e-01\n-9.23176745563182716e-02\n-4.50055827417764499e-03\n1.03351054155806032e-01\n1.40931629940414388e-01\n4.38202707296310584e-02\n-1.21190000812205573e-01\n-1.56191952971646897e-01\n3.71393373836468657e-02\n2.01851553264883188e-01\n3.36347342362441730e-03\n-2.39763246642161865e-01\n7.67012743188827950e-02\n2.34815863581055162e-01\n-3.49678107491521617e-01\n2.63903340307038214e-01\n-1.34391222082020312e-01\n5.04619131158093384e-02\n-1.45364229684355039e-02\n3.27456574110736916e-03\n-5.81100898665383729e-04\n8.11283243032964431e-05\n-8.82579521795368050e-06\n1.92296228186749803e-02\n3.33066837323309148e-02\n4.26980532881248431e-02\n4.90978907004378726e-02\n5.16707722216551008e-02\n4.84977532783378990e-02\n3.71792497107411996e-02\n1.57911072981339884e-02\n-1.55457904507632586e-02\n-5.26380508937903113e-02\n-8.55808567484367538e-02\n-9.92729012213570405e-02\n-7.83841113180512722e-02\n-1.78836705364967853e-02\n6.42234460098097260e-02\n1.22684026107426986e-01\n1.04571704846065913e-01\n-2.84395907455035381e-03\n-1.26696024983541350e-01\n-1.35325722685079475e-01\n2.14883625112043883e-02\n1.75452197979937274e-01\n7.62991960637851158e-02\n-1.78710858014992480e-01\n-1.11974246591606555e-01\n2.28614791274445089e-01\n2.69517170448941822e-02\n-2.95843084786022226e-01\n3.35612382533570841e-01\n-2.22689558588644310e-01\n1.03840242458827642e-01\n-3.64020532174719053e-02\n9.90425563605416316e-03\n-2.12385753719783812e-03\n3.60844405277192424e-04\n-4.84457942235173850e-05\n0.0\n1.53207183710975855e-03\n5.93368871031949713e-03\n1.39634001471344686e-02\n2.59150123315778566e-02\n4.12720630484638834e-02\n5.81811824651815093e-02\n7.29296223441718017e-02\n7.98066364512981519e-02\n7.19540357766268873e-02\n4.38681329671694459e-02\n-4.26141187876748033e-03\n-6.16093793499655276e-02\n-1.04741554151163735e-01\n-1.04112030921009444e-01\n-4.27409110328093103e-02\n5.87322653240453380e-02\n1.32712680422920892e-01\n1.01403537321626325e-01\n-3.84929813549951330e-02\n-1.57613802111641998e-01\n-8.93970806713713789e-02\n1.23930799455699875e-01\n1.64222281953681881e-01\n-1.02844105267327401e-01\n-1.94414007995153348e-01\n1.74250886153426071e-01\n1.27441062889383394e-01\n-3.30972425482367050e-01\n3.08024984913737032e-01\n-1.82925254531555448e-01\n7.87385774975417063e-02\n-2.58929108832135560e-02\n6.67537840647887577e-03\n-1.36588223405005723e-03\n2.22587497073102706e-04\n1.83452035030111579e-02\n3.17748245424058703e-02\n4.07601181356578232e-02\n4.69927259797632904e-02\n4.98091953670700693e-02\n4.75551258386597564e-02\n3.80942412194252636e-02\n1.95739551012722029e-02\n-8.30860177505187217e-03\n-4.26114411881632835e-02\n-7.56028417248358342e-02\n-9.46602461668337031e-02\n-8.54511559442771296e-02\n-3.97070624028370775e-02\n3.39002217883888138e-02\n1.02649348645358157e-01\n1.18299223112197815e-01\n4.97649726650087887e-02\n-7.24253680343781014e-02\n-1.45706239721754727e-01\n-7.21553161591213105e-02\n1.02908434213059730e-01\n1.62803936908651969e-01\n-2.50463795598264531e-02\n-1.99715302797088046e-01\n-1.49213213173458132e-03\n2.34682173770260599e-01\n-9.00446836785820381e-02\n-2.13087937549481576e-01\n3.42282656662803941e-01\n-2.72467534346295615e-01\n1.46746587989049299e-01\n-5.86961537365549568e-02\n1.81810981639040428e-02\n-4.45406647084802335e-03\n8.71481643496780072e-04\n0.0\n1.39730371886924356e-03\n5.41173403277427079e-03\n1.27414264418560051e-02\n2.36855040301536916e-02\n3.78609587671397754e-02\n5.37600151642949470e-02\n6.82896657973171561e-02\n7.65831830535293190e-02\n7.25561888588033832e-02\n5.07591807773658879e-02\n9.79466959443110567e-03\n-4.33990922774231055e-02\n-9.08320169445889641e-02\n-1.06525436230583845e-01\n-6.92506476268697074e-02\n1.66789494432801992e-02\n1.05898420563199397e-01\n1.25841403482788272e-01\n3.48942462009540072e-02\n-1.06869360048403916e-01\n-1.46966999684068927e-01\n7.65960655334233702e-05\n1.70810664181921923e-01\n8.35867489698899485e-02\n-1.75438579140021256e-01\n-1.06188950690890904e-01\n2.28279940000295833e-01\n8.22985908761203651e-03\n-2.77031542942874853e-01\n3.34056383994699058e-01\n-2.33590823765074090e-01\n1.15267928207173367e-01\n-4.30812194998981268e-02\n1.26145985518165797e-02\n-2.94418134494056150e-03\n1.75386295227603871e-02\n3.03777974285484795e-02\n3.89895587408367328e-02\n4.50539320021614009e-02\n4.80481850209398473e-02\n4.65401924819290325e-02\n3.86256332729564902e-02\n2.25481260022637360e-02\n-2.27174817826245740e-03\n-3.38182210308314718e-02\n-6.60706094708373715e-02\n-8.85539563291193321e-02\n-8.83025615822470300e-02\n-5.55260698295288735e-02\n7.46610874558037776e-03\n7.83495295110042955e-02\n1.16649111937958128e-01\n8.43736105721468455e-02\n-1.70104518664292124e-02\n-1.20305481396720579e-01\n-1.22970403781607895e-01\n9.35903533529710598e-03\n1.50959189245772646e-01\n1.03915872416368682e-01\n-1.13821814942717633e-01\n-1.65618610616482531e-01\n1.02078353431131461e-01\n1.87206565097631256e-01\n-1.80483101006048863e-01\n-1.05887628432434391e-01\n3.16898489499984781e-01\n-3.11507583761458706e-01\n1.94909407293128500e-01\n-8.88423426154715673e-02\n3.11736113434189638e-02\n-8.65607040337136764e-03\n0.0\n1.27960843338104677e-03\n4.95590215215135736e-03\n1.16732571140956733e-02\n2.17305076889312485e-02\n3.48474129696979898e-02\n4.97904703998867451e-02\n6.39680273261290233e-02\n7.32183681483379312e-02\n7.21624488175753170e-02\n5.55782201015046079e-02\n2.10894998114631686e-02\n-2.71974138707993217e-02\n-7.57578080418900429e-02\n-1.02579291412120549e-01\n-8.55137901263584577e-02\n-1.85697185768553402e-02\n7.13704280874670471e-02\n1.24885446179009124e-01\n8.51869202275968296e-02\n-3.93948950215579977e-02\n-1.42334439941703916e-01\n-9.42291445280795947e-02\n8.54767464900765411e-02\n1.66552409860041828e-01\n-1.57035578148024720e-02\n-1.97473613904036338e-01\n1.87877857879287019e-03\n2.29373900502584410e-01\n-1.02941302441718771e-01\n-1.91542430535465741e-01\n3.33830473877356815e-01\n-2.79826258404066996e-01\n1.58808712308571853e-01\n-6.73109193998996935e-02\n2.22641920803646649e-02\n1.68032828112731694e-02\n2.91041395630739289e-02\n3.73728927910850495e-02\n4.32717853648272935e-02\n4.63939142605918689e-02\n4.54947574346046893e-02\n3.88735504734727261e-02\n2.48812515294344061e-02\n2.76332613278870275e-03\n-2.61510421313708684e-02\n-5.71863495406904551e-02\n-8.16885976628953375e-02\n-8.81648545078000112e-02\n-6.63658655308825007e-02\n-1.44316890846129895e-02\n5.34549285972640426e-02\n1.05178255342211202e-01\n1.02586386483804554e-01\n2.95723666042804062e-02\n-7.78964716445821326e-02\n-1.33811580688891679e-01\n-6.61567571772374297e-02\n8.51865967846878042e-02\n1.53253778202238261e-01\n1.78357809941682155e-02\n-1.65893925935357817e-01\n-8.84935972863063469e-02\n1.73169971713190179e-01\n9.94407471616360616e-02\n-2.27791640197767681e-01\n9.91017230512216893e-03\n2.58069623219148725e-01\n-3.31315494967506452e-01\n2.43593037455552497e-01\n-1.26703977279087804e-01\n5.02150910742439061e-02\n0.0\n1.17733845824318016e-03\n4.55981224162535330e-03\n1.07443736713160147e-02\n2.00261013061327382e-02\n3.22042373620631747e-02\n4.62638367577800635e-02\n6.00196156396323593e-02\n6.98965944828835312e-02\n7.11422552716538814e-02\n5.88479009805569081e-02\n3.00672580673137096e-02\n-1.31314421468965124e-02\n-6.07885646370009552e-02\n-9.47069129408961013e-02\n-9.36726060282051520e-02\n-4.57437985401068434e-02\n3.62203696739657466e-02\n1.07774261821694653e-01\n1.11067783563350453e-01\n2.24010415275876541e-02\n-1.00597207893007135e-01\n-1.36006165063251083e-01\n-1.62856786241003977e-02\n1.42542894008742205e-01\n1.14994701800914798e-01\n-1.05441091533168982e-01\n-1.66016295439183753e-01\n1.02712349879536674e-01\n1.79762574083902837e-01\n-1.86515980704551332e-01\n-8.50954127784114139e-02\n3.02735837374726702e-01\n-3.14206300999776367e-01\n2.06562865744437968e-01\n-9.92854923771077508e-02\n1.61891213899785676e-02\n2.80403807773429645e-02\n3.60222666376260464e-02\n4.17810468262048290e-02\n4.50047673799538472e-02\n4.46043976541940015e-02\n3.90524190124978132e-02\n2.68047626788882228e-02\n6.99846809312534759e-03\n-1.95446834795921232e-02\n-4.91959012521748923e-02\n-7.48029550997851150e-02\n-8.62773563479693473e-02\n-7.35089998443671511e-02\n-3.20129669649846030e-02\n3.01431286141311088e-02\n8.85201788722691091e-02\n1.08230597691215402e-01\n6.39764171102901597e-02\n-3.20199382717997402e-02\n-1.17112108467344739e-01\n-1.10439585847030244e-01\n7.58412075448268268e-03\n1.34234286543509579e-01\n1.11576728094692143e-01\n-6.96419385018947623e-02\n-1.69211155541127173e-01\n8.38419922590337256e-03\n1.96208248764072390e-01\n-5.93189229025040555e-03\n-2.25144899612307797e-01\n1.15259889691427184e-01\n1.72234131048085298e-01\n-3.27155411946025432e-01\n2.88198245521206098e-01\n-1.71762587863176969e-01\n0.0\n1.09853375590514691e-03\n4.25460294186731734e-03\n1.00285879365220824e-02\n1.87125281137096970e-02\n3.01665782380931835e-02\n4.35440374168166999e-02\n5.69746921604986772e-02\n6.73453615933878036e-02\n7.04152347418505742e-02\n6.15811551723256106e-02\n3.75642507420655969e-02\n-1.02268935590238896e-03\n-4.69703245599883620e-02\n-8.53851476371655510e-02\n-9.67421645592352192e-02\n-6.59487889501306906e-02\n4.16301650767235930e-03\n8.28062345073552475e-02\n1.17987337167275552e-01\n6.93400286840980956e-02\n-4.52211137915891764e-02\n-1.33314770003615773e-01\n-9.24331941128394563e-02\n6.36764649668291050e-02\n1.57981356874647622e-01\n3.42252810268810909e-02\n-1.62937788638040620e-01\n-9.43771197759212255e-02\n1.73442319560609737e-01\n9.57745330957264773e-02\n-2.30570923290937868e-01\n2.39984593792519803e-02\n2.48378881885797431e-01\n-3.37440874369471289e-01\n2.59648616489557782e-01\n1.59858572168244152e-02\n2.76883169020814938e-02\n3.55837256220410403e-02\n4.13377490003026191e-02\n4.47141756740791624e-02\n4.47372994116635447e-02\n4.00028612098974126e-02\n2.90390300492705880e-02\n1.08992539076658238e-02\n-1.39709231907197366e-02\n-4.27222592561141146e-02\n-6.93443643851312380e-02\n-8.48811014410312675e-02\n-7.95098674642263914e-02\n-4.70279722163844324e-02\n9.00376027645833493e-03\n7.05076984439229337e-02\n1.06855182554630307e-01\n8.85079342136264879e-02\n1.08732296123008089e-02\n-8.60123088736831215e-02\n-1.27445834772039274e-01\n-5.96314065094768753e-02\n7.78607157844845299e-02\n1.47141409112181099e-01\n4.23790320877619892e-02\n-1.35800347458084614e-01\n-1.30402816581096342e-01\n9.78695202128370689e-02\n1.74763757895623567e-01\n-1.02106757753577790e-01\n-1.85366894511779706e-01\n1.94509287444304041e-01\n8.46650542696339853e-02\n-3.19725024053297335e-01\n3.43750735824978615e-01\n0.0\n1.06257197839638279e-03\n4.11532357647585809e-03\n9.70335380084034506e-03\n1.81242662158822947e-02\n2.92858229425518417e-02\n4.24603938504795331e-02\n5.59945229514090329e-02\n6.70878009311414863e-02\n7.18386936609944349e-02\n6.58276132263205249e-02\n4.54930657990574722e-02\n1.03386251884037515e-02\n-3.45245145108787552e-02\n-7.68236445438777588e-02\n-9.86580792410066271e-02\n-8.30949533044339078e-02\n-2.56224727172817898e-02\n5.45067107129922207e-02\n1.13461855955273472e-01\n1.03340677372980430e-01\n1.24365465098408064e-02\n-1.01944336189832105e-01\n-1.34715860160627338e-01\n-2.86281553387043308e-02\n1.25976442451453008e-01\n1.37013021425257203e-01\n-4.91619860429308789e-02\n-1.82973518220088643e-01\n-1.16037275798466944e-02\n2.08394139566509512e-01\n1.07876508066748044e-02\n-2.46369374078997311e-01\n1.06583161859375650e-01\n2.22660274960337384e-01\n-4.01635356476767957e-01\n1.64289898684953015e-02\n2.84558451692681867e-02\n3.65838747058961078e-02\n4.25650355988481180e-02\n4.62286504852963340e-02\n4.66728869614742928e-02\n4.25631596556633046e-02\n3.24518501237117118e-02\n1.52975920155487312e-02\n-8.76440100065435136e-03\n-3.74882055806644854e-02\n-6.57271412484450174e-02\n-8.53731089067634868e-02\n-8.68066971629381512e-02\n-6.24730665828156784e-02\n-1.23091863985730857e-02\n5.10347902113987908e-02\n1.01374734730416180e-01\n1.07486097774639217e-01\n5.23452013689215123e-02\n-4.48116158875376744e-02\n-1.23111950606083764e-01\n-1.12211993416739181e-01\n1.84642031088851533e-03\n1.29739810277650996e-01\n1.30446482009130726e-01\n-2.98888943787551792e-02\n-1.71873009066044108e-01\n-7.49647585039892178e-02\n1.60962332333865671e-01\n1.37548266230289429e-01\n-1.68455723726252643e-01\n-1.51874332774713738e-01\n2.45490789434034795e-01\n6.69295073263269924e-02\n-4.19311589890191516e-01\n0.0\n1.05617133792949586e-03\n4.09053400254254327e-03\n9.64798361407032470e-03\n1.80395384868284221e-02\n2.92168442842525369e-02\n4.25490676670604862e-02\n5.65518133488141020e-02\n6.86628930381384950e-02\n7.52308957990718147e-02\n7.19502235457457340e-02\n5.49825773831546932e-02\n2.28576451732650301e-02\n-2.11535217613078586e-02\n-6.71698386724473295e-02\n-9.90479411909420127e-02\n-9.88701490394707644e-02\n-5.62635987372889154e-02\n2.01576530661797364e-02\n9.67961327007605121e-02\n1.24866093058680003e-01\n7.08751696744715221e-02\n-4.50677948234482137e-02\n-1.38422169701033354e-01\n-1.13278273392317330e-01\n3.42467591154227563e-02\n1.62406611422244912e-01\n1.00609014553133605e-01\n-1.12008504778126572e-01\n-1.82265611128624078e-01\n4.79923620847994212e-02\n2.26781951072676874e-01\n-3.01764887618694508e-02\n-2.75674660695057749e-01\n1.04389107398200454e-01\n3.96868513616908503e-01\n1.71862323406926885e-02\n2.97674276047631275e-02\n3.82849726043010263e-02\n4.46149654302345419e-02\n4.86570008024499664e-02\n4.95780766502370088e-02\n4.61043479085521402e-02\n3.68050837617068319e-02\n2.05456460355796129e-02\n-2.83162387917147967e-03\n-3.16510466789195408e-02\n-6.16014124885176165e-02\n-8.54527530344328934e-02\n-9.39585496057393638e-02\n-7.85745450351561375e-02\n-3.60626831644129953e-02\n2.62574520500562548e-02\n8.76867283293700783e-02\n1.18123370313407722e-01\n9.18964805130562251e-02\n8.57626351431334082e-03\n-9.19619517998331443e-02\n-1.39862932512948623e-01\n-8.19712034297786080e-02\n5.67389850715597430e-02\n1.58575739282571765e-01\n1.02416985439017227e-01\n-8.39515853771641285e-02\n-1.86976485133523190e-01\n-3.59895120017416775e-02\n1.95900367149755061e-01\n1.28905222896575161e-01\n-1.95272169860876171e-01\n-1.92082278861380490e-01\n2.47741825473105082e-01\n3.45083469148503630e-01\n0.0\n1.05023773241930346e-03\n4.06755324721860302e-03\n9.59697290519404694e-03\n1.79635273360683606e-02\n2.91641019780113642e-02\n4.26677763675882352e-02\n5.71662844599289052e-02\n7.03512857704418071e-02\n7.88539992637487253e-02\n7.85436362652152942e-02\n6.54017562175245037e-02\n3.71004341387402084e-02\n-4.86916735819214498e-03\n-5.31850969881423677e-02\n-9.41095190395194736e-02\n-1.10039743571561405e-01\n-8.63899082536270374e-02\n-2.18530533085023217e-02\n6.26957461883514006e-02\n1.25037752176125116e-01\n1.19916815576300642e-01\n3.28688834515721839e-02\n-9.06877634972569069e-02\n-1.55614256115208294e-01\n-8.67128185474320967e-02\n7.91543684219336852e-02\n1.80594626121152568e-01\n7.74086457060401967e-02\n-1.44227523793206969e-01\n-1.92597928353484799e-01\n5.43973894228800825e-02\n2.58279240155102896e-01\n3.56000418143551864e-02\n-3.35696520079028171e-01\n-2.78389668192982442e-01\n1.80277437938439790e-02\n3.12249681967722813e-02\n4.01758341652529993e-02\n4.68957331618191225e-02\n5.13649652721587593e-02\n5.28318426862028484e-02\n5.00992641280826115e-02\n4.17730978967256958e-02\n2.66471998290206818e-02\n4.28861411201528469e-03\n-2.42003241170774819e-02\n-5.54023812706258695e-02\n-8.31374400045422762e-02\n-9.88840951015534514e-02\n-9.36602900040725828e-02\n-6.16510002169119650e-02\n-5.00555146201596586e-03\n6.21937292357003374e-02\n1.14214484090140886e-01\n1.21739023619846787e-01\n6.82714556912396853e-02\n-3.13707651131351836e-02\n-1.24757797961335321e-01\n-1.43520871930086141e-01\n-5.40404624231770742e-02\n9.34699998852628888e-02\n1.74039387371922399e-01\n8.81716408650562028e-02\n-1.08507315879245725e-01\n-2.03437265213332968e-01\n-4.58329263724583588e-02\n2.05465057860036798e-01\n1.95404543416930920e-01\n-1.33369268704965099e-01\n-3.61758263792325008e-01\n-2.09647183408607662e-01\n0.0\n1.03764068698351656e-03\n4.01876510003438322e-03\n9.48514156360041709e-03\n1.77740927071911511e-02\n2.89288107345760138e-02\n4.25243891369589885e-02\n5.74437547330384213e-02\n7.16630957803928159e-02\n8.21529609878594302e-02\n8.50532932447296969e-02\n7.63093456269537812e-02\n5.29111815448776862e-02\n1.46986928495688243e-02\n-3.36699596026708639e-02\n-8.15009969918995547e-02\n-1.12968536149124180e-01\n-1.11471428857277191e-01\n-6.76682522310068230e-02\n1.11015619492811444e-02\n9.56178727571450060e-02\n1.41264642350587694e-01\n1.10414045414865936e-01\n4.01473540734023724e-03\n-1.19503398911012471e-01\n-1.66197771064774819e-01\n-7.69757496626182758e-02\n9.66831258548054434e-02\n1.97438393039805427e-01\n9.65240047817795127e-02\n-1.35436207186448193e-01\n-2.38439703535602981e-01\n-4.43710892314225711e-02\n2.62859124870716276e-01\n3.36319117309700322e-01\n1.47841980549137664e-01\n1.89699070964095551e-02\n3.28568429058427453e-02\n4.22932589322135705e-02\n4.94516678458697193e-02\n5.44050672939544316e-02\n5.64974280712500290e-02\n5.46272246210482704e-02\n4.74613766089826902e-02\n3.37521220303703406e-02\n1.28221863078440707e-02\n-1.47823403178164656e-02\n-4.65709083987020239e-02\n-7.75625260488926604e-02\n-1.00319505380974477e-01\n-1.06061744007498668e-01\n-8.72485129563087547e-02\n-4.15185985983609687e-02\n2.40845950867086094e-02\n9.09058165418928227e-02\n1.31580754881555823e-01\n1.20283556613404480e-01\n4.89070922017003432e-02\n-5.84049645114715840e-02\n-1.45325390829821405e-01\n-1.48959329701054854e-01\n-4.66132400208806308e-02\n1.06053651078091199e-01\n1.90330082975496362e-01\n1.12609657776657476e-01\n-8.80060517052108082e-02\n-2.29660866414188758e-01\n-1.43149327930923775e-01\n1.26317715126969571e-01\n3.26142310173433037e-01\n2.78675391415228291e-01\n9.77354411225592745e-02\n0.0\n1.01816248136336971e-03\n3.94332633405355005e-03\n9.31042410226706751e-03\n1.74669075868051638e-02\n2.85022767993244018e-02\n4.21015904514934966e-02\n5.73504801833207845e-02\n7.25357690530354371e-02\n8.50205567219605440e-02\n9.13145750597144923e-02\n8.74913848264795985e-02\n7.00911179259228051e-02\n3.75459534939146383e-02\n-8.06689246928486529e-03\n-5.95064893843192874e-02\n-1.04054423078469793e-01\n-1.25585518935300178e-01\n-1.09824431961110691e-01\n-5.22433555399334781e-02\n3.42632933553129390e-02\n1.17201988834388510e-01\n1.53526053475560420e-01\n1.11546344098598676e-01\n-2.16597955328734493e-03\n-1.29702415913165697e-01\n-1.83481179908064118e-01\n-1.05482666405994518e-01\n6.99581305438190110e-02\n2.11833742872249015e-01\n1.83564832540271033e-01\n-2.42094529623262424e-02\n-2.55042859079701978e-01\n-3.23898267356831804e-01\n-2.09047760026660756e-01\n-6.05477911087185169e-02\n2.00730037999926093e-02\n3.47674624421103404e-02\n4.47720575916140742e-02\n5.24423602821798909e-02\n5.79585324501374899e-02\n6.07760269442020606e-02\n5.99095516445982065e-02\n5.41151309965755209e-02\n4.21408569849212045e-02\n2.31108869479530327e-02\n-2.94211302019481945e-03\n-3.44479709462786818e-02\n-6.77260025922693104e-02\n-9.67450035236486344e-02\n-1.13598353551211811e-01\n-1.10076529617119862e-01\n-8.04957554798060027e-02\n-2.53913854540338928e-02\n4.51738393521387768e-02\n1.10820408206213569e-01\n1.44981276102870316e-01\n1.25118317900100667e-01\n4.68896330210739135e-02\n-6.45636173931817686e-02\n-1.56315484978707564e-01\n-1.69774114766399115e-01\n-7.88408540407406766e-02\n7.77927150201317696e-02\n2.01764416478740605e-01\n1.93114345890289418e-01\n3.22450151732834381e-02\n-1.84766590356272520e-01\n-3.11139048514709304e-01\n-2.75473407031372242e-01\n-1.43079355298070338e-01\n-3.50983280421616403e-02\n0.0\n9.90622259339521676e-04\n3.83666351280433256e-03\n9.06194181673531871e-03\n1.70210746301443436e-02\n2.78486320825419680e-02\n4.13415216975594885e-02\n5.67964194171869385e-02\n7.28328959389980962e-02\n8.72567638579033189e-02\n9.70493454965647706e-02\n9.85962560395733517e-02\n8.82748176851136240e-02\n6.34739852993557868e-02\n2.39930857622349565e-02\n-2.64619058245636647e-02\n-7.92669412973321247e-02\n-1.21202915603437905e-01\n-1.36986614066065243e-01\n-1.14389308100351181e-01\n-5.11157982601497321e-02\n3.91559606306362620e-02\n1.25734673776800893e-01\n1.68930373190165767e-01\n1.37875089079293162e-01\n3.22117396648523777e-02\n-1.05463107454145166e-01\n-2.00890476525452139e-01\n-1.86927183422250148e-01\n-5.17518175378650983e-02\n1.39902466880536175e-01\n2.81010524291023800e-01\n2.97961283624368911e-01\n2.06313819261057407e-01\n8.96495346429262846e-02\n1.89890491826660499e-02\n2.14231576054708071e-02\n3.71059974312310456e-02\n4.78049801978316993e-02\n5.60966875925986361e-02\n6.22872200964122089e-02\n6.59625338898677249e-02\n6.62780165400113641e-02\n6.21127457160279769e-02\n5.22583866513802661e-02\n3.57043149857284928e-02\n1.20430900958114883e-02\n-1.80214310804173716e-02\n-5.21442020429910558e-02\n-8.59527449918333630e-02\n-1.13058149494990046e-01\n-1.25766572683599170e-01\n-1.16738375810983494e-01\n-8.16029429604901990e-02\n-2.20706945925990168e-02\n5.15502403254613495e-02\n1.20083930569496816e-01\n1.59148320953610922e-01\n1.47414993763499563e-01\n7.78126330817525413e-02\n-3.30412536165717446e-02\n-1.43950391481087181e-01\n-2.02066926091222343e-01\n-1.68207126779489957e-01\n-4.30291476954253321e-02\n1.24203932959352850e-01\n2.57156208181094192e-01\n2.97041957027260939e-01\n2.40404308544416634e-01\n1.37811604218418399e-01\n5.14386540408641318e-02\n9.55291227293246156e-03\n0.0\n9.52425480084660627e-04\n3.68872802287149469e-03\n8.71585953058040541e-03\n1.63912120385097601e-02\n2.68914066071014486e-02\n4.01245129728874383e-02\n5.56028751160391119e-02\n7.22961592780266976e-02\n8.84986323929797258e-02\n1.01765326190318056e-01\n1.08993226024836840e-01\n1.06736302903292224e-01\n9.18318490602569593e-02\n6.23609183664724995e-02\n1.88507909309352274e-02\n-3.45493976124492466e-02\n-8.93951356705446620e-02\n-1.33402213647135948e-01\n-1.52617244776006439e-01\n-1.35496327142791390e-01\n-7.82580978258806265e-02\n1.02509480366315305e-02\n1.06890925086669974e-01\n1.78442672776208955e-01\n1.92578553643723671e-01\n1.32818642281112592e-01\n1.06045711812653501e-02\n-1.33979540756774651e-01\n-2.47398708115868837e-01\n-2.88784820258500108e-01\n-2.52076968210933450e-01\n-1.68022849518600498e-01\n-8.25086250091417728e-02\n-2.69668271637932902e-02\n-4.44600438762716293e-03\n2.31769132887997067e-02\n4.01435913788193779e-02\n5.17423825524728626e-02\n6.08306684670023440e-02\n6.78670624450253279e-02\n7.25926775084784481e-02\n7.43342294716097529e-02\n7.21365653640879539e-02\n6.48967230560481556e-02\n5.15568075407719512e-02\n3.13824938840192372e-02\n4.33005706509781256e-03\n-2.85291087997730682e-02\n-6.46056051373302132e-02\n-9.95477277367272095e-02\n-1.27344699635203701e-01\n-1.40983380694047339e-01\n-1.33805832593389629e-01\n-1.01540992458328649e-01\n-4.46798329702298436e-02\n2.95222002776297614e-02\n1.06455536378528753e-01\n1.66043293394576186e-01\n1.87631626839605103e-01\n1.57202141563720366e-01\n7.46078308766970622e-02\n-4.27129167613721425e-02\n-1.62847685149722587e-01\n-2.50116970005161532e-01\n-2.79805366081567586e-01\n-2.49530797875174126e-01\n-1.79913977510474082e-01\n-1.02852879006408562e-01\n-4.42645665287053555e-02\n-1.28554203034600602e-02\n-1.90109579831092322e-03\n0.0\n8.98677346151575355e-04\n3.48056239525892930e-03\n8.22724128412446500e-03\n1.54919489010889640e-02\n2.54874062688578602e-02\n3.82281872558782251e-02\n5.34412645111890794e-02\n7.04560472697969564e-02\n8.80920102592345905e-02\n1.04573354579798175e-01\n1.17513536104162888e-01\n1.24024044372872302e-01\n1.21005083025435625e-01\n1.05661817469603486e-01\n7.62487013344180509e-02\n3.29692069114096570e-02\n-2.11480173308346599e-02\n-7.96918629236104265e-02\n-1.33006237680332567e-01\n-1.69374682873536214e-01\n-1.77404994556999485e-01\n-1.49357035700770330e-01\n-8.45980922442099020e-02\n8.13556537498673002e-03\n1.11115777279038569e-01\n2.01495757628950500e-01\n2.58155009880106867e-01\n2.69234660849996421e-01\n2.36919224516317056e-01\n1.76557257790619843e-01\n1.09829224602950526e-01\n5.52297852576064952e-02\n2.11774804561033238e-02\n5.52903350563980264e-03\n7.39823633682672329e-04\n2.56820818628719430e-02\n4.44826706306373706e-02\n5.73625420722688184e-02\n6.75677684227043301e-02\n7.57525739954257732e-02\n8.18489423320414716e-02\n8.53966339986030609e-02\n8.56632114253641774e-02\n8.17340446361535383e-02\n7.26254510268409953e-02\n5.74456627363386027e-02\n3.56147765243780140e-02\n7.14005048147818133e-03\n-2.70779155795425469e-02\n-6.49600413828395479e-02\n-1.03067300004658205e-01\n-1.36631056375663085e-01\n-1.59909668592953386e-01\n-1.66955204891566733e-01\n-1.52790577584448889e-01\n-1.14856699088970421e-01\n-5.44121031745445766e-02\n2.25900865768056888e-02\n1.05671436977955807e-01\n1.81409698079670501e-01\n2.36384806801273856e-01\n2.60838919015537130e-01\n2.51835662310121056e-01\n2.14523913646777781e-01\n1.60611255448807055e-01\n1.04321492304886465e-01\n5.74565196733478681e-02\n2.58617676386587031e-02\n8.94643645398200509e-03\n2.11970330505510890e-03\n2.58554536473807196e-04\n0.0\n8.18774194879915785e-04\n3.17109882107429993e-03\n7.49878648409775181e-03\n1.41387003404190789e-02\n2.33279844052986379e-02\n3.51757585200516837e-02\n4.96124261435627253e-02\n6.63225191763363725e-02\n8.46685320857086254e-02\n1.03617504943782149e-01\n1.21687971347961985e-01\n1.36941099719112142e-01\n1.47044540477274138e-01\n1.49437838599710937e-01\n1.41620719937685630e-01\n1.21566548057782498e-01\n8.82307260133214366e-02\n4.20795008917957403e-02\n-1.44834785624213362e-02\n-7.69514900616107556e-02\n-1.38969793928227697e-01\n-1.93114229630689804e-01\n-2.32168436580835247e-01\n-2.50690292058834308e-01\n-2.46469314531824552e-01\n-2.21371678730884702e-01\n-1.81143119376313388e-01\n-1.34038803284845159e-01\n-8.86102603090729718e-02\n-5.14089869075734646e-02\n-2.55057736179956536e-02\n-1.04082047206506614e-02\n-3.28050350686841631e-03\n-7.10933078797105198e-04\n-7.95619165353869662e-05\n2.99852788244627383e-02\n5.19360264030886420e-02\n6.70069335796342064e-02\n7.90840020281343148e-02\n8.91072368270960785e-02\n9.72639799521328452e-02\n1.03374389375939305e-01\n1.07014983832061247e-01\n1.07581633838043533e-01\n1.04344346504773200e-01\n9.65145003493877301e-02\n8.33349982114552773e-02\n6.41978751506092765e-02\n3.87876275809241264e-02\n7.24042906924745634e-03\n-2.97006267116974344e-02\n-7.05648995811375135e-02\n-1.13107788385320637e-01\n-1.54381237046086528e-01\n-1.90956292844064679e-01\n-2.19310316817070555e-01\n-2.36352651545009756e-01\n-2.40012019903833057e-01\n-2.29759212934949830e-01\n-2.06909903275325158e-01\n-1.74567474826578362e-01\n-1.37139628963616145e-01\n-9.94892991608794519e-02\n-6.59239268621357455e-02\n-3.93252540200177136e-02\n-2.07107241582905992e-02\n-9.37190458604919736e-03\n-3.50156517000129635e-03\n-1.01362132932946098e-03\n-2.02262238402569993e-04\n-2.08852263983269867e-05\n0.0\n6.80643328072520304e-04\n2.63612027433206232e-03\n6.23631437812535543e-03\n1.17741283926682833e-02\n1.94838640920338528e-02\n2.95388932208830862e-02\n4.20377710034232285e-02\n5.69821136437556469e-02\n7.42485748025901587e-02\n9.35577660250738047e-02\n1.14444172057546423e-01\n1.36232672116016029e-01\n1.58028855006984298e-01\n1.78731439891106708e-01\n1.97075150466290538e-01\n2.11710590472867777e-01\n2.21323331012757446e-01\n2.24787173277471081e-01\n2.21336739274480165e-01\n2.10733631615077216e-01\n1.93391202244428267e-01\n1.70419428181498883e-01\n1.43557684463776619e-01\n1.14982022003339721e-01\n8.70039169132629242e-02\n6.17129161141116503e-02\n4.06442759139980583e-02\n2.45603655361126549e-02\n1.34111368086493512e-02\n6.48580210646802942e-03\n2.70226633730493620e-03\n9.31692490387782922e-04\n2.49357135769311664e-04\n4.60776148600475737e-05\n4.41184815992385687e-06\n4.28616692516404080e-02\n7.42385888410538736e-02\n9.58297510932737406e-02\n1.13331182594607296e-01\n1.28346494746791329e-01\n1.41541278395868247e-01\n1.53205310542888634e-01\n1.63428914094472161e-01\n1.72176032272276708e-01\n1.79322280271063755e-01\n1.84680625514677926e-01\n1.88024049137129667e-01\n1.89109653893701629e-01\n1.87706334059005109e-01\n1.83626507128609673e-01\n1.76760895318780503e-01\n1.67113752603231663e-01\n1.54834325595514632e-01\n1.40238975454750114e-01\n1.23817696546010325e-01\n1.06219258873134229e-01\n8.82113364082086765e-02\n7.06159563995934908e-02\n5.42260924629351521e-02\n3.97151953477494143e-02\n2.75561789573202931e-02\n1.79677760572441204e-02\n1.09025617872959731e-02\n6.08199695495809448e-03\n3.07140877180581313e-03\n1.37590785814462133e-03\n5.31766758342025383e-04\n1.70283586537568998e-04\n4.23739917304210946e-05\n7.28700806393126698e-06\n6.49834581103333769e-07\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n2.12816502681797207e-02\n3.68608995333990982e-02\n4.71793262444005421e-02\n5.38928417801408238e-02\n5.56915912862105678e-02\n4.99582735431423203e-02\n3.36631066209815977e-02\n4.91156907340564199e-03\n-3.45857622915974050e-02\n-7.66380627718874913e-02\n-1.05131198138008836e-01\n-9.93307865079840757e-02\n-4.52185883455058571e-02\n4.63278736087167492e-02\n1.26520898685542588e-01\n1.24501302937105457e-01\n8.76149374982767258e-03\n-1.39009840017824349e-01\n-1.45430724917557541e-01\n5.23901068506406262e-02\n2.03641230091638481e-01\n3.34229155239343292e-03\n-2.44704412764027684e-01\n6.30482839383653543e-02\n2.56722185146756043e-01\n-3.55963783728098171e-01\n2.54118863941887818e-01\n-1.21807850318845806e-01\n4.26606710224011129e-02\n-1.13315026562792309e-02\n2.32099260135682156e-03\n-3.68093455385364618e-04\n4.49246874345974923e-05\n-4.14816878940934023e-06\n2.80666439932428782e-07\n-1.31402313931041177e-08\n3.80686279394582920e-10\n0.0\n1.86745723208211058e-03\n7.23263075960861330e-03\n1.69990960812777155e-02\n3.14211564101592664e-02\n4.95772040034796330e-02\n6.86104779796190833e-02\n8.30695156534964341e-02\n8.50243645688121275e-02\n6.59726096787420641e-02\n2.14395641429474260e-02\n-4.21206521870994693e-02\n-1.01605177089896068e-01\n-1.20244548014451419e-01\n-6.76016392702967622e-02\n4.51760544869131281e-02\n1.41525300570246454e-01\n1.16379318976619281e-01\n-4.65345033374856831e-02\n-1.79019170607708278e-01\n-6.59803259590538982e-02\n1.83093383809195986e-01\n1.16520274276820573e-01\n-2.28916206813573997e-01\n-4.61698185797689356e-02\n3.14408655384954827e-01\n-3.35841052092187953e-01\n2.10846353029051609e-01\n-9.24607554307678992e-02\n3.02012044843330135e-02\n-7.56926647351931822e-03\n1.47453542826450233e-03\n-2.23710680151412822e-04\n2.62373116336369795e-05\n-2.33651175827044669e-06\n1.52924036405231572e-07\n-6.94311662653946591e-09\n2.02036552227493026e-02\n3.49937573444060943e-02\n4.48278912869238474e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662662103e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901247e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625335e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200711e-08\n0.0\n1.68733084269139552e-03\n6.53500425328590144e-03\n1.53696509558603409e-02\n2.84714545421937103e-02\n4.51493331926984681e-02\n6.31105739479152911e-02\n7.78709985539561139e-02\n8.27090663057187259e-02\n6.99448176210602235e-02\n3.43276257536382079e-02\n-2.14721953559171078e-02\n-8.13637555126593415e-02\n-1.15535201307352745e-01\n-9.23176745562692552e-02\n-4.50055827417476274e-03\n1.03351054155751826e-01\n1.40931629940339698e-01\n4.38202707296069943e-02\n-1.21190000812142137e-01\n-1.56191952971563491e-01\n3.71393373836287274e-02\n2.01851553264775690e-01\n3.36347342362027608e-03\n-2.39763246642033245e-01\n7.67012743188447144e-02\n2.34815863580925294e-01\n-3.49678107491331158e-01\n2.63903340306895162e-01\n-1.34391222081947648e-01\n5.04619131157820894e-02\n-1.45364229684276612e-02\n3.27456574110560365e-03\n-5.81100898665070612e-04\n8.11283243032527362e-05\n-8.82579521794892695e-06\n7.33777653934234678e-07\n1.92296228181945347e-02\n3.33066837314987541e-02\n4.26980532870580159e-02\n4.90978906992110137e-02\n5.16707722203635714e-02\n4.84977532771248346e-02\n3.71792497098095212e-02\n1.57911072977347695e-02\n-1.55457904503814495e-02\n-5.26380508924824270e-02\n-8.55808567463033354e-02\n-9.92729012188742627e-02\n-7.83841113160788500e-02\n-1.78836705360252493e-02\n6.42234460082294345e-02\n1.22684026104365018e-01\n1.04571704843419475e-01\n-2.84395907453556399e-03\n-1.26696024980399141e-01\n-1.35325722681638450e-01\n2.14883625107624085e-02\n1.75452197975534796e-01\n7.62991960617232789e-02\n-1.78710858010539680e-01\n-1.11974246588569026e-01\n2.28614791268658829e-01\n2.69517170439048277e-02\n-2.95843084778112331e-01\n3.35612382524744790e-01\n-2.22689558582825325e-01\n1.03840242456123583e-01\n-3.64020532165259952e-02\n9.90425563579716561e-03\n-2.12385753714278234e-03\n3.60844405267844921e-04\n-4.84457942222630444e-05\n5.08613529820529562e-06\n0.0\n1.53207183591126954e-03\n5.93368870567776915e-03\n1.39634001362110016e-02\n2.59150123113025231e-02\n4.12720630161655180e-02\n5.81811824196283925e-02\n7.29296222870202543e-02\n7.98066363886539565e-02\n7.19540357199554559e-02\n4.38681329322749072e-02\n-4.26141187612787999e-03\n-6.16093793023306385e-02\n-1.04741554069238421e-01\n-1.04112030838645925e-01\n-4.27409109976152127e-02\n5.87322652797062847e-02\n1.32712680318901322e-01\n1.01403537239503377e-01\n-3.84929813281586902e-02\n-1.57613801987661478e-01\n-8.93970805958284459e-02\n1.23930799361527177e-01\n1.64222281817890475e-01\n-1.02844105192250013e-01\n-1.94414007831007013e-01\n1.74250886019146650e-01\n1.27441062768970853e-01\n-3.30972425197040176e-01\n3.08024984652912504e-01\n-1.82925254377904606e-01\n7.87385774317082149e-02\n-2.58929108616281350e-02\n6.67537840092512474e-03\n-1.36588223291527334e-03\n2.22587496888361269e-04\n-2.87801523864582855e-05\n1.83452031876896737e-02\n3.17748239962530390e-02\n4.07601174350275056e-02\n4.69927251718273639e-02\n4.98091945102168004e-02\n4.75551250194664460e-02\n3.80942405609732623e-02\n1.95739547585081011e-02\n-8.30860164139180651e-03\n-4.26114404664298466e-02\n-7.56028404338687093e-02\n-9.46602445399252618e-02\n-8.54511544606380569e-02\n-3.97070616886216199e-02\n3.39002212441915501e-02\n1.02649346901492092e-01\n1.18299221053240644e-01\n4.97649717361004981e-02\n-7.24253668581674309e-02\n-1.45706237195186467e-01\n-7.21553147889437835e-02\n1.02908432536953962e-01\n1.62803933985789545e-01\n-2.50463793369890241e-02\n-1.99715299237933602e-01\n-1.49213179006463812e-03\n2.34682169446130323e-01\n-9.00446824196242390e-02\n-2.13087933112456246e-01\n3.42282649979436637e-01\n-2.72467529128812669e-01\n1.46746585206241981e-01\n-5.86961526299658518e-02\n1.81810978224524397e-02\n-4.45406638741980415e-03\n8.71481627204025167e-04\n-1.36448789798972512e-04\n0.0\n1.39730334054542901e-03\n5.41173256753243754e-03\n1.27414229918730651e-02\n2.36854976155972397e-02\n3.78609485089937692e-02\n5.37600005857943458e-02\n6.82896472495226614e-02\n7.65831621939532109e-02\n7.25561689866464909e-02\n5.07591666812171674e-02\n9.79466649249121149e-03\n-4.33990809494205765e-02\n-9.08319925103989179e-02\n-1.06525407014304213e-01\n-6.92506278857319274e-02\n1.66789461458005314e-02\n1.05898392407525271e-01\n1.25841368334886156e-01\n3.48942344454637454e-02\n-1.06869332375297874e-01\n-1.46966957784034735e-01\n7.65998167320578962e-05\n1.70810617362633033e-01\n8.35867204344972747e-02\n-1.75438531934331954e-01\n-1.06188913000886662e-01\n2.28279874795676851e-01\n8.22984585159454787e-03\n-2.77031448659493196e-01\n3.34056276382961259e-01\n-2.33590750095955868e-01\n1.15267892269279720e-01\n-4.30812061640558075e-02\n1.26145946657282050e-02\n-2.94418044101227424e-03\n5.51921797966277287e-04\n1.75385735370934236e-02\n3.03777004585288057e-02\n3.89894342700326524e-02\n4.50537881195608447e-02\n4.80480314277396472e-02\n4.65400433751737494e-02\n3.86255088584858616e-02\n2.25480520843915795e-02\n-2.27174380040293849e-03\n-3.38181165916788123e-02\n-6.60704017316400133e-02\n-8.85536746807006475e-02\n-8.83022764197223808e-02\n-5.55258837303223493e-02\n7.46609757690518214e-03\n7.83492895965640646e-02\n1.16648738059884724e-01\n8.43733227951505016e-02\n-1.70104242535956476e-02\n-1.20305107736511319e-01\n-1.22969984493112541e-01\n9.35905129022030456e-03\n1.50958711606466345e-01\n1.03915475933251025e-01\n-1.13821494228441261e-01\n-1.65617999463698234e-01\n1.02078096441891156e-01\n1.87205826876241377e-01\n-1.80482548132841703e-01\n-1.05887049763434854e-01\n3.16897164622939376e-01\n-3.11506346463490458e-01\n1.94908650810533046e-01\n-8.88420023610615034e-02\n3.11734929738417890e-02\n-8.65603772866425231e-03\n1.92915868019591288e-03\n0.0\n1.27957277144170357e-03\n4.95576403405418708e-03\n1.16729317556831039e-02\n2.17299018218982155e-02\n3.48464406947586944e-02\n4.97890792728855752e-02\n6.39662356214511091e-02\n7.32163082697336182e-02\n7.21604018494570454e-02\n5.55766140651474116e-02\n2.10888357426905516e-02\n-2.71967353584279189e-02\n-7.57557447041824622e-02\n-1.02576402934140026e-01\n-8.55112695914955340e-02\n-1.85689875334342294e-02\n7.13686049108494258e-02\n1.24881912616840771e-01\n8.51842144541998803e-02\n-3.93941749856510925e-02\n-1.42330443778782539e-01\n-9.42259275115786277e-02\n8.54748451918562052e-02\n1.66547228677725839e-01\n-1.57040871321672895e-02\n-1.97467534879223333e-01\n1.88014887611767656e-03\n2.29366140627104281e-01\n-1.02939647760882602e-01\n-1.91533580346218063e-01\n3.33817393486981084e-01\n-2.79815830313234815e-01\n1.58802941767828693e-01\n-6.73085106930182558e-02\n2.22634034096236139e-02\n-5.87887185442609143e-03\n1.68001232416844955e-02\n2.90986670280162923e-02\n3.73658644859998015e-02\n4.32636430927295507e-02\n4.63851712766814653e-02\n4.54861541260010230e-02\n3.88661403278003290e-02\n2.48763961944077697e-02\n2.76253966827742304e-03\n-2.61464634829848309e-02\n-5.71759301092999855e-02\n-8.16734143986777017e-02\n-8.81480939385819173e-02\n-6.63526848929311686e-02\n-1.44278102295042031e-02\n5.34460641611750747e-02\n1.05158877388885658e-01\n1.02565968991171277e-01\n2.95643279829239866e-02\n-7.78839357015415762e-02\n-1.33785697533993775e-01\n-6.61402763840757552e-02\n8.51740373079984125e-02\n1.53222333691267865e-01\n1.78253184064177186e-02\n-1.65862979792596649e-01\n-8.84665715548240694e-02\n1.73138918789028706e-01\n9.94062344035534368e-02\n-2.27743343439728546e-01\n9.92811816859875268e-03\n2.57986418065617618e-01\n-3.31221661799588174e-01\n2.43527457225246935e-01\n-1.26670798944672480e-01\n5.02021699122944254e-02\n-1.57086490800741815e-02\n0.0\n1.17623469312553848e-03\n4.55553737770660223e-03\n1.07342991881124276e-02\n2.00073144471282598e-02\n3.21739920311494079e-02\n4.62202930521158212e-02\n5.99629069700516881e-02\n6.98301092143494145e-02\n7.10737612504381833e-02\n5.87898035137632141e-02\n3.00350057781889612e-02\n-1.31236991327347251e-02\n-6.07350715694515014e-02\n-9.46181716512819737e-02\n-9.35792613372413568e-02\n-4.56900439738645997e-02\n3.61979168492520750e-02\n1.07676593541995338e-01\n1.10951811581679050e-01\n2.23574259535877194e-02\n-1.00516017297782173e-01\n-1.35861360325411795e-01\n-1.62329842741344918e-02\n1.42417204027013911e-01\n1.14837814732744334e-01\n-1.05378340053813871e-01\n-1.65798117741450091e-01\n1.02670795900445061e-01\n1.79484726886228518e-01\n-1.86358790994005902e-01\n-8.48248033451670935e-02\n3.02196834430344230e-01\n-3.13707164148583184e-01\n2.06251472563337035e-01\n-9.91403266047854587e-02\n3.69125927472437124e-02\n1.61300321044108505e-02\n2.79380351325567329e-02\n3.58907586597953174e-02\n4.16283773562867582e-02\n4.48399248662990427e-02\n4.44401376559417985e-02\n3.89068614138357166e-02\n2.67015744042902424e-02\n6.96471285419337886e-03\n-1.94840913832924380e-02\n-4.90276565550923291e-02\n-7.45376208877568946e-02\n-8.59604097071581530e-02\n-7.32231240374708325e-02\n-3.18620757961360079e-02\n3.00741733172845624e-02\n8.82232435335126713e-02\n1.07820444383065400e-01\n6.36771387838361569e-02\n-3.19871604149683172e-02\n-1.16714056709029596e-01\n-1.09953720214356357e-01\n7.70296708341166366e-03\n1.33786525259661560e-01\n1.10997042315111732e-01\n-6.95842991798577420e-02\n-1.68459919693264570e-01\n8.69370653451208460e-03\n1.95348775970989708e-01\n-6.40498826372726607e-03\n-2.23904762898548659e-01\n1.15300105198724551e-01\n1.70374752716608069e-01\n-3.24633324029673431e-01\n2.86201325941804308e-01\n-1.70636072384865056e-01\n7.63059068545835217e-02\n0.0\n1.08735891379097439e-03\n4.21132296446263040e-03\n9.92654647775793875e-03\n1.85219717616510043e-02\n2.98588172677458769e-02\n4.30982360918472224e-02\n5.63877588790959519e-02\n6.66441750617076945e-02\n6.96683053800547514e-02\n6.09038990025436988e-02\n3.71092906849409057e-02\n-1.09916794027438663e-03\n-4.65697067722464914e-02\n-8.45440180803184727e-02\n-9.56922783727848503e-02\n-6.51031899104497214e-02\n4.35199216550215002e-03\n8.21156990306545209e-02\n1.16698601640347746e-01\n6.82708401782463753e-02\n-4.51624540316292664e-02\n-1.31964148339609982e-01\n-9.09179047654874173e-02\n6.36410820202060329e-02\n1.56088988574846071e-01\n3.27842128062609817e-02\n-1.61440592119012349e-01\n-9.18604901195994444e-02\n1.72035353970667937e-01\n9.23672746175799725e-02\n-2.27541309335466346e-01\n2.71064288927961410e-02\n2.40067863523875547e-01\n-3.28655132963512064e-01\n2.53548479406975613e-01\n-1.38539534773853001e-01\n1.56245814715820844e-02\n2.70625689557794646e-02\n3.47792443504004317e-02\n4.04017567197903146e-02\n4.36976671667679908e-02\n4.37111427196690688e-02\n3.90673686861721936e-02\n2.83265601072559894e-02\n1.05654751445160393e-02\n-1.37726673647879817e-02\n-4.18872839957571824e-02\n-6.78809552638599129e-02\n-8.29774305641305943e-02\n-7.75707382850504418e-02\n-4.56337753079535946e-02\n9.26033705716051286e-03\n6.93097821487021343e-02\n1.04484426238643124e-01\n8.59914975851301666e-02\n9.68602943656027282e-03\n-8.48094234024643623e-02\n-1.24292030854912403e-01\n-5.68361406765031038e-02\n7.75036208422534845e-02\n1.43283853392559724e-01\n3.88909671650906202e-02\n-1.33989460979655223e-01\n-1.24572673778359982e-01\n9.87442790957019090e-02\n1.67208797651233976e-01\n-1.04358774971947343e-01\n-1.74169756894794414e-01\n1.92988043926537678e-01\n6.75499881391023738e-02\n-2.92924218390551661e-01\n3.20229001699120830e-01\n-2.20460802618906659e-01\n0.0\n1.02512171907325443e-03\n3.97027934580623278e-03\n9.36120581288402316e-03\n1.74842548136788720e-02\n2.82482737985145990e-02\n4.09466739345151973e-02\n5.39764105269099209e-02\n6.46250288604565265e-02\n6.91180519428952339e-02\n6.31892187521976706e-02\n4.34208536623168842e-02\n9.38726162410612880e-03\n-3.38873112206848418e-02\n-7.44520416822103265e-02\n-9.49769840587381259e-02\n-7.92251498813950072e-02\n-2.31917706155977676e-02\n5.40102560187259093e-02\n1.09705057138822212e-01\n9.80091333053639269e-02\n9.02172836722212393e-03\n-1.00198322467929979e-01\n-1.28125147284498753e-01\n-2.27674513033914415e-02\n1.24017203072707485e-01\n1.27456847253707428e-01\n-5.45391846649376164e-02\n-1.73668358008990747e-01\n3.60570458808516297e-04\n1.98481806067927813e-01\n-7.20839003565936984e-03\n-2.26568818044302067e-01\n1.24871489843427233e-01\n1.65127357662194885e-01\n-3.34858788046060729e-01\n3.07587295788329274e-01\n1.56133420594506966e-02\n2.70431017229206955e-02\n3.47663739156880286e-02\n4.04445609587173946e-02\n4.39090301140181299e-02\n4.42936954731884061e-02\n4.03204276495453956e-02\n3.06073443258257846e-02\n1.41701605336169087e-02\n-8.83510287837906486e-03\n-3.62147354828569676e-02\n-6.29865042940988829e-02\n-8.13448500391084628e-02\n-8.20969973836210842e-02\n-5.81516827368855557e-02\n-9.76059608569868238e-03\n5.05321497155697338e-02\n9.73336791519514855e-02\n1.00945616143319747e-01\n4.61552550123792010e-02\n-4.68273060021330567e-02\n-1.18463920594528690e-01\n-1.02684306114827706e-01\n9.23408976789580511e-03\n1.26927948710023442e-01\n1.17322877297659195e-01\n-4.01157840971917493e-02\n-1.63498927546721268e-01\n-5.43390434493087326e-02\n1.61513908122053435e-01\n1.07877709923145035e-01\n-1.74902751068176432e-01\n-1.04781579279544304e-01\n2.39340770854956281e-01\n-1.99898409911555587e-02\n-2.73771110171715903e-01\n3.78199707791040507e-01\n0.0\n1.00301525933642723e-03\n3.88466139540189588e-03\n9.16198569518428610e-03\n1.71282585169644438e-02\n2.77315881064119363e-02\n4.03601345779541071e-02\n5.35821673434291670e-02\n6.49335179590927458e-02\n7.09141390251498555e-02\n6.74204964867083367e-02\n5.08440136545685109e-02\n1.99170658738170650e-02\n-2.20082942861673861e-02\n-6.52219155871469197e-02\n-9.41356074446415281e-02\n-9.18229864295389275e-02\n-4.91724067029432055e-02\n2.42028095673985123e-02\n9.48764061998306901e-02\n1.16313450640292249e-01\n5.93141927772445204e-02\n-5.18523589046972003e-02\n-1.33009616761822352e-01\n-9.67117723101281468e-02\n4.78413227213282874e-02\n1.55219353434699919e-01\n7.44601965129190052e-02\n-1.24545225480018382e-01\n-1.53632001496229298e-01\n8.16740900925651686e-02\n1.94770271788663546e-01\n-8.76607868143915447e-02\n-2.13209512208532959e-01\n1.90006382694524273e-01\n1.42777956445871990e-01\n-4.14090490004309586e-01\n1.61580613238970147e-02\n2.79865831648032706e-02\n3.59918361784228799e-02\n4.19297266439506017e-02\n4.56915215481945788e-02\n4.64737400277126372e-02\n4.30560401212054591e-02\n3.40771395865148222e-02\n1.84767935622162233e-02\n-3.84150449640990529e-03\n-3.11828947240625765e-02\n-5.93003459727687865e-02\n-8.11635327666808265e-02\n-8.79118121200236774e-02\n-7.15910312175266628e-02\n-2.96840108142379690e-02\n2.98810740594332054e-02\n8.63704869157035648e-02\n1.10811187786382798e-01\n8.01653038331425205e-02\n-2.45819689237728378e-03\n-9.49101543490569466e-02\n-1.29652398971799171e-01\n-6.22989064948419255e-02\n7.09383604730409040e-02\n1.50256292366713090e-01\n7.25361046759152167e-02\n-1.04873712556326298e-01\n-1.64503961161396206e-01\n1.26074835227332205e-02\n1.94727858242832452e-01\n5.40776885031338042e-02\n-2.16477309880490160e-01\n-6.48071016539809724e-02\n2.74962731116646986e-01\n-2.40986643481792412e-02\n-4.09302100168909944e-01\n0.0\n9.99163663334845780e-04\n3.86974422823145201e-03\n9.12951299281730168e-03\n1.70839915512596488e-02\n2.77196469225884368e-02\n4.05086898644248100e-02\n5.41668257274652565e-02\n6.64409148658943044e-02\n7.40622489469012907e-02\n7.30607193905577351e-02\n5.96519878121898606e-02\n3.18125992046043790e-02\n-8.63524251721546621e-03\n-5.41317486899773326e-02\n-9.10182819814259747e-02\n-1.02392297082215464e-01\n-7.52273984283336888e-02\n-1.04917720835537697e-02\n6.88793284996559313e-02\n1.20676729392880017e-01\n1.03742277118374956e-01\n1.18817418747700250e-02\n-1.01501305561399538e-01\n-1.42560006375526183e-01\n-5.34672827871094866e-02\n1.03555248110813514e-01\n1.62170210863897574e-01\n2.31034056438259826e-02\n-1.67713894807242608e-01\n-1.30487773447005656e-01\n1.30714117652444506e-01\n1.96490268028898574e-01\n-1.19171993161487522e-01\n-2.45143472206481028e-01\n1.82654182831039652e-01\n3.70342296243705460e-01\n1.69006531462098028e-02\n2.92727899303341747e-02\n3.76595642290760632e-02\n4.39372856982484655e-02\n4.80638569797865386e-02\n4.93007917390541270e-02\n4.64869953075899081e-02\n3.82847670728229950e-02\n2.35648593726107899e-02\n1.98998091195923743e-03\n-2.52329374335801236e-02\n-5.46019584090562671e-02\n-7.99342989825470862e-02\n-9.28935960353601126e-02\n-8.50073449432554723e-02\n-5.13988094491128616e-02\n4.48294639717782776e-03\n6.73268547078672008e-02\n1.11164694563173794e-01\n1.08642822640497475e-01\n4.80979267540369987e-02\n-4.92289959229714677e-02\n-1.27199301307648532e-01\n-1.22562460415146179e-01\n-1.82487412685992390e-02\n1.16098362340791711e-01\n1.54328862376577031e-01\n3.13254626827250832e-02\n-1.45579017779525921e-01\n-1.59171850983334529e-01\n5.02884779438395116e-02\n2.15189645203365476e-01\n4.68729711518035969e-02\n-2.40232464691156639e-01\n-1.20573824079480335e-01\n2.97924628925470225e-01\n3.10232730942203883e-01\n0.0\n9.92333663421932815e-04\n3.84329175231414195e-03\n9.06990901060220241e-03\n1.69894566286642387e-02\n2.76280222757123300e-02\n4.05464281950780672e-02\n5.46183633137168265e-02\n6.78228452455811592e-02\n7.71614124229296067e-02\n7.88630422147326010e-02\n6.90651419433116615e-02\n4.51036673726270057e-02\n7.34282581037968077e-03\n-3.89189129011331750e-02\n-8.24625842403483161e-02\n-1.07506256858374269e-01\n-9.86650468944124670e-02\n-4.94092863142507263e-02\n2.88988381384460702e-02\n1.03675809560517043e-01\n1.30965166142549300e-01\n8.09946939849946340e-02\n-3.09854867436997125e-02\n-1.34261903482455758e-01\n-1.39416359130219603e-01\n-1.78605504382918882e-02\n1.37885816334350320e-01\n1.64030084417373850e-01\n-2.08648897755389336e-03\n-1.90295901234224352e-01\n-1.39921711639976576e-01\n1.33118552291814352e-01\n2.42630689916178643e-01\n-4.65670333591390109e-02\n-3.53911477066066349e-01\n-2.42444852963542568e-01\n1.77120047598798777e-02\n3.06780921480137407e-02\n3.94823301977585486e-02\n4.61343762124849996e-02\n5.06683513142564546e-02\n5.24225953362923089e-02\n5.03106086796104024e-02\n4.30373457256694875e-02\n2.94260648285456297e-02\n8.91763540252929303e-03\n-1.77658828101550474e-02\n-4.79089956738411871e-02\n-7.63113054487843251e-02\n-9.54514437585438497e-02\n-9.68206205483315568e-02\n-7.37706747928635054e-02\n-2.56219674496606688e-02\n3.83110867091523005e-02\n9.73925293296832029e-02\n1.24228954734873137e-01\n9.68284050087883930e-02\n1.54403560151809213e-02\n-8.56477122928085977e-02\n-1.45437798461342221e-01\n-1.10900779347191447e-01\n1.37423676014384859e-02\n1.43185571282606589e-01\n1.57587231219329105e-01\n1.51651690988819331e-02\n-1.64188256149857159e-01\n-1.75737616330352092e-01\n3.57650282864060837e-02\n2.36184818721951628e-01\n1.33743769708776605e-01\n-1.99432804047875972e-01\n-3.53231066019311979e-01\n-1.77531103552201780e-01\n0.0\n9.79455695966268075e-04\n3.79341559882535135e-03\n8.95507516347713792e-03\n1.67917606297128125e-02\n2.73697625187613938e-02\n4.03431809834603541e-02\n5.47556685542432420e-02\n6.88432965693368815e-02\n7.99247088929788962e-02\n8.45090190487980397e-02\n7.87810231148805135e-02\n5.95996484478637095e-02\n2.60186414932034558e-02\n-1.89348660413874992e-02\n-6.68988088800175768e-02\n-1.04325670510366050e-01\n-1.15360109504937081e-01\n-8.80378349426002710e-02\n-2.26545474034841980e-02\n6.15234880052466931e-02\n1.27307962500369076e-01\n1.33731858655477931e-01\n6.21064771614210642e-02\n-5.91226906465053131e-02\n-1.54057403385875702e-01\n-1.41642616377577302e-01\n-7.54296600359895611e-03\n1.51932722223745792e-01\n1.83023847999167766e-01\n2.26972691919892812e-02\n-1.89922831574813822e-01\n-2.10424244548931771e-01\n3.20017905949335144e-02\n2.98507529632765223e-01\n3.10962644130615418e-01\n1.22051600246348466e-01\n1.86264886496393250e-02\n3.22620247077803207e-02\n4.15369976165960442e-02\n4.86119647889489623e-02\n5.36082392231164162e-02\n5.59536770355447896e-02\n5.46529316080014774e-02\n4.84753115812207452e-02\n3.62237965105905654e-02\n1.71474590515714731e-02\n-8.49458596588016819e-03\n-3.87874031197758609e-02\n-6.96175943433107597e-02\n-9.45551502019376933e-02\n-1.05581250859773365e-01\n-9.50401569561012127e-02\n-5.88678198976130412e-02\n-4.43913519324001435e-04\n6.65890121490754217e-02\n1.19057541598996383e-01\n1.30916760205111588e-01\n8.60520626480827250e-02\n-7.07111104200686298e-03\n-1.08437921425275557e-01\n-1.58335125497329754e-01\n-1.11599422122475783e-01\n2.04309603706027756e-02\n1.54350727204374899e-01\n1.78227648826262047e-01\n4.60238822520312590e-02\n-1.50337503317050203e-01\n-2.26939255658504729e-01\n-7.76820558676822176e-02\n1.87859271854651705e-01\n3.30750525105174442e-01\n2.46819459719516077e-01\n7.88122157388073119e-02\n0.0\n9.60347108203595239e-04\n3.71940835665097655e-03\n8.78327916509135352e-03\n1.64872776015251160e-02\n2.69375908101224248e-02\n3.98844620758830939e-02\n5.45504700129918196e-02\n6.94496071172209517e-02\n8.22609575550382749e-02\n8.98559464275524161e-02\n8.86067387092937253e-02\n7.51009675927543363e-02\n4.73194727998287878e-02\n6.16309039114486257e-03\n-4.30704968452884085e-02\n-9.00057543942263255e-02\n-1.20296514921442693e-01\n-1.19374555918350167e-01\n-7.88396725570984502e-02\n-3.78809595197556782e-03\n8.27468496109203810e-02\n1.43292738152927007e-01\n1.40729163347859648e-01\n6.15976217989056968e-02\n-6.41193537183747803e-02\n-1.65141346259337130e-01\n-1.65254789357351356e-01\n-4.24021412971793618e-02\n1.31814922783181854e-01\n2.21940371591754559e-01\n1.32274492515748660e-01\n-9.30296454651355353e-02\n-2.86042262074055420e-01\n-3.06190044432457620e-01\n-1.78598431610766634e-01\n-4.77625566072432048e-02\n1.97004241776276394e-02\n3.41221356063093895e-02\n4.39495445021535758e-02\n5.15193193196801166e-02\n5.70533953677393943e-02\n6.00834065828580455e-02\n5.97235787726065823e-02\n5.48325810766063237e-02\n4.42268317089167876e-02\n2.70059258683004177e-02\n3.00919831414674923e-03\n-2.66303852536888715e-02\n-5.89486634268553272e-02\n-8.88452184217070201e-02\n-1.09323079565021977e-01\n-1.12613344174480240e-01\n-9.23931029095260287e-02\n-4.69220883193455368e-02\n1.77321431449970757e-02\n8.59840670473246693e-02\n1.34604369077902158e-01\n1.39737353161090760e-01\n8.85198073403454105e-02\n-8.85310464149660289e-03\n-1.14361060897586631e-01\n-1.72831250295597899e-01\n-1.39973384019729002e-01\n-1.66742076204815307e-02\n1.34525100569405032e-01\n2.14244256423459317e-01\n1.51079330291256253e-01\n-3.48619809603695624e-02\n-2.30430728712656546e-01\n-3.11660224547996356e-01\n-2.47297713993637869e-01\n-1.18462883187102630e-01\n-2.71179190766295229e-02\n0.0\n9.33757015467194485e-04\n3.61642537030878574e-03\n8.54301263590734675e-03\n1.60539936788617922e-02\n2.62940502977177179e-02\n3.91106979760225890e-02\n5.39117920565590630e-02\n6.95068023459449180e-02\n8.39758529872223630e-02\n9.46363402866892273e-02\n9.82015747657276478e-02\n9.12350748191281397e-02\n7.09760841401324422e-02\n3.65209263813405238e-02\n-9.82714848701343735e-03\n-6.14691127855564456e-02\n-1.07356188036934530e-01\n-1.33544786721545655e-01\n-1.26978265147210528e-01\n-8.12074974586158294e-02\n-2.40867900182016158e-03\n8.74176640530708454e-02\n1.53798341680204065e-01\n1.61889003045505270e-01\n9.50914781036496237e-02\n-2.82723563350103686e-02\n-1.52838604464255567e-01\n-2.07810695329164019e-01\n-1.47632785109006043e-01\n1.15495488148331174e-02\n1.90709494002082897e-01\n2.94590852224642541e-01\n2.78267587728965093e-01\n1.77677912259221055e-01\n7.21731658332490783e-02\n1.43848011694515405e-02\n2.10169267288777967e-02\n3.64023849133687100e-02\n4.69059872812353368e-02\n5.50773172709366626e-02\n6.12565098430048055e-02\n6.50962780906380045e-02\n6.58423325499806200e-02\n6.24729424427724403e-02\n5.38605087981141040e-02\n3.90127347708429592e-02\n1.74180266808541054e-02\n-1.05134641240942715e-02\n-4.29714602712858162e-02\n-7.63563633705684197e-02\n-1.05181186273578503e-01\n-1.22519609560525003e-01\n-1.21235870007681573e-01\n-9.60784089763298266e-02\n-4.63837467174011420e-02\n2.13624594031065936e-02\n9.23792783709744825e-02\n1.45361157295409466e-01\n1.58186587867862216e-01\n1.17072034513370865e-01\n2.62788211542726580e-02\n-8.68112900913831365e-02\n-1.76782796240294415e-01\n-1.97519815666095416e-01\n-1.26526079267764380e-01\n1.68705011359397625e-02\n1.74259563658306110e-01\n2.76722538772084803e-01\n2.85048222226270687e-01\n2.13223538688843223e-01\n1.14581931581651558e-01\n4.03676950786323735e-02\n7.10160082482026028e-03\n0.0\n8.97210829649788279e-04\n3.47488260127056968e-03\n8.21154856433363098e-03\n1.54486743941261127e-02\n2.53664217520630682e-02\n3.79084339981621138e-02\n5.26709294880072371e-02\n6.87721563947050890e-02\n8.47296078583232720e-02\n9.83892894756124847e-02\n1.06969665941830369e-01\n1.07295524866528311e-01\n9.62923466385239568e-02\n7.17747122464075377e-02\n3.34781812640128629e-02\n-1.58523022687447335e-02\n-6.96752605807944014e-02\n-1.17674277436726427e-01\n-1.47124520623426652e-01\n-1.45921170581933685e-01\n-1.07022833667428666e-01\n-3.31876969599399635e-02\n6.00319833869589481e-02\n1.45465462810972557e-01\n1.91292039480530529e-01\n1.73042001653514799e-01\n8.64368987271094402e-02\n-4.58012573250261290e-02\n-1.79392085838621151e-01\n-2.66857464490818541e-01\n-2.80766084433221152e-01\n-2.27806773359418624e-01\n-1.42963965888312561e-01\n-6.65193320402208688e-02\n-2.06704761535859184e-02\n-3.24602964385962544e-03\n2.27289756121568792e-02\n3.93677405642496384e-02\n5.07486802659842598e-02\n5.96923732404992524e-02\n6.66822305651819797e-02\n7.15146263611295546e-02\n7.35943087724470341e-02\n7.20571324379130906e-02\n6.58861802519876139e-02\n5.40750184244936719e-02\n3.58636585688227594e-02\n1.10532654873499656e-02\n-1.96210089769518689e-02\n-5.41178653934802217e-02\n-8.88246723101848989e-02\n-1.18551899218351853e-01\n-1.36964010744136555e-01\n-1.37594892961124038e-01\n-1.15480476825650602e-01\n-6.92193734665653426e-02\n-2.96424785056712253e-03\n7.24594332324920432e-02\n1.40247440409083685e-01\n1.80819037462153359e-01\n1.77442749056433730e-01\n1.22954082163301753e-01\n2.49621618542502088e-02\n-9.35492585081038885e-02\n-2.00197102415806016e-01\n-2.64777983844301235e-01\n-2.71804980627983028e-01\n-2.27318695944954907e-01\n-1.55233870716084937e-01\n-8.44865159894555434e-02\n-3.47141293530579542e-02\n-9.64005937540163976e-03\n-1.36412404828163518e-03\n0.0\n8.46100735597875167e-04\n3.27693405818441563e-03\n7.74659178219464124e-03\n1.45910032960094964e-02\n2.40201221653966283e-02\n3.60690189446739723e-02\n5.05203312212195027e-02\n6.68075014102398335e-02\n8.39134044096444265e-02\n1.00288124194646305e-01\n1.13820792761809939e-01\n1.21910655512166455e-01\n1.21687053581644430e-01\n1.10419918996787075e-01\n8.61336570632762200e-02\n4.83814989130324016e-02\n-9.45592677898570376e-04\n-5.69991016387647459e-02\n-1.11847427357468471e-01\n-1.55165156804264348e-01\n-1.75947452026823437e-01\n-1.65181967542066460e-01\n-1.18981125132387566e-01\n-4.12123005808271298e-02\n5.56101240677009181e-02\n1.52209353104041240e-01\n2.27397921023517663e-01\n2.64716750172856508e-01\n2.58357778460051701e-01\n2.15469239867969953e-01\n1.53164219491431913e-01\n9.12033378101881897e-02\n4.39892708421027595e-02\n1.61951648357757973e-02\n4.06156950031693036e-03\n5.22059742613459614e-04\n2.51770888537902852e-02\n4.36079970814408427e-02\n5.62395388868487944e-02\n6.62683356445094851e-02\n7.43620904893357998e-02\n8.04938420010891525e-02\n8.42650659539392610e-02\n8.50198711504267790e-02\n8.19251473386441720e-02\n7.40671323083254007e-02\n6.05874779347754799e-02\n4.08700555854595859e-02\n1.47779130460136236e-02\n-1.70766139888932737e-02\n-5.30676296546330126e-02\n-9.03618006958124276e-02\n-1.24882731242902376e-01\n-1.51532294037732468e-01\n-1.64752277681475823e-01\n-1.59454295955823167e-01\n-1.32243208698788139e-01\n-8.27184039309469960e-02\n-1.44929042931635343e-02\n6.45145810179955231e-02\n1.42905939912045005e-01\n2.07886498155595095e-01\n2.48298052788563817e-01\n2.57783033224680214e-01\n2.36920710361538195e-01\n1.93283993034158857e-01\n1.39058542301575522e-01\n8.69625979117361059e-02\n4.61628470835525120e-02\n2.00363767459430728e-02\n6.68441146465914918e-03\n1.52707735148577034e-03\n1.79529578809016255e-04\n0.0\n7.70462341379682522e-04\n2.98398781704348410e-03\n7.05671687153899135e-03\n1.33075962852389172e-02\n2.19654321121463339e-02\n3.31454421752770956e-02\n4.68056952802871767e-02\n6.26885809324276566e-02\n8.02533956761402323e-02\n9.86095300658180740e-02\n1.16464522655822092e-01\n1.32106500537822469e-01\n1.43444841756304370e-01\n1.48134147029089530e-01\n1.43802021228099791e-01\n1.28387793585777787e-01\n1.00575067866443393e-01\n6.02662921897568274e-02\n9.00721006891618513e-03\n-4.97660697023453030e-02\n-1.10797830341505532e-01\n-1.67513662974276750e-01\n-2.12980053118780932e-01\n-2.41213386751574027e-01\n-2.48566402165308786e-01\n-2.34792108927774246e-01\n-2.03369231418494417e-01\n-1.60830048386922692e-01\n-1.15157678431016805e-01\n-7.37125709237795995e-02\n-4.14187404513472121e-02\n-1.99011682416404892e-02\n-7.86299344241518476e-03\n-2.39851324568416411e-03\n-5.02780016434526138e-04\n-5.43887848266079874e-05\n2.93863029891707934e-02\n5.08985698238569872e-02\n6.56716691504382888e-02\n7.75234355395549718e-02\n8.73924734476000664e-02\n9.54888349614663318e-02\n1.01672181162737435e-01\n1.05572032328470997e-01\n1.06646852921663912e-01\n1.04232564676286693e-01\n9.76000743573228607e-02\n8.60317136882480238e-02\n6.89213211113174767e-02\n4.58976224326222426e-02\n1.69641196820338805e-02\n-1.73593969242588908e-02\n-5.59176342415604738e-02\n-9.68549728878163041e-02\n-1.37641494005464188e-01\n-1.75223079643026025e-01\n-2.06314249256411092e-01\n-2.27824471456271938e-01\n-2.37369216666730692e-01\n-2.33773651271215133e-01\n-2.17443698403114810e-01\n-1.90474318720436131e-01\n-1.56404059396951955e-01\n-1.19611970311025842e-01\n-8.44705180299613750e-02\n-5.44752923136325659e-02\n-3.16158664033285020e-02\n-1.61922123588262371e-02\n-7.12156872273204695e-03\n-2.58446885739469639e-03\n-7.26171140603572253e-04\n-1.40538681202497407e-04\n-1.40628632589600923e-05\n0.0\n6.40159661520979984e-04\n2.47932770798453246e-03\n5.86552499410413451e-03\n1.10749114509655737e-02\n1.83298128838627269e-02\n2.77976505736698409e-02\n3.95793792726760046e-02\n5.36904829789368876e-02\n7.00365392786359287e-02\n8.83856908881802961e-02\n1.08341313332773373e-01\n1.29319447339868721e-01\n1.50536911355231728e-01\n1.71017067713961579e-01\n1.89620498923119274e-01\n2.05106767731558781e-01\n2.16230395528874547e-01\n2.21868803982038787e-01\n2.21172310206192879e-01\n2.13717228932811532e-01\n1.99634630226543486e-01\n1.79682241141055993e-01\n1.55228769497239238e-01\n1.28131357853053157e-01\n1.00508520246874566e-01\n7.44395342202739951e-02\n5.16491147836800474e-02\n3.32523236281509690e-02\n1.96287181657855969e-02\n1.04626458515925686e-02\n4.93547219963539566e-03\n2.00418818949577721e-03\n6.72930551404682083e-04\n1.75240278305318389e-04\n3.14795286267500885e-05\n2.92738550242375306e-06\n4.19929883820596567e-02\n7.27339894393769087e-02\n9.38884679074127732e-02\n1.11039650583823993e-01\n1.25763510176817139e-01\n1.38719592302121775e-01\n1.50202048321547987e-01\n1.60312440850566978e-01\n1.69031065586496665e-01\n1.76253553945382779e-01\n1.81814826160686144e-01\n1.85509452572002742e-01\n1.87112747384973355e-01\n1.86404721791802980e-01\n1.83197601758233630e-01\n1.77366347940185964e-01\n1.68880295316891499e-01\n1.57832669034297352e-01\n1.44463503122992221e-01\n1.29170699205986006e-01\n1.12504013687074508e-01\n9.51380539549405990e-02\n7.78231457497542134e-02\n6.13171132755087611e-02\n4.63059846663889246e-02\n3.33262139980729649e-02\n2.27035932707984646e-02\n1.45230410934973873e-02\n8.63805719315237364e-03\n4.71943111724354956e-03\n2.33218609945906813e-03\n1.02145011384432820e-03\n3.85624348940016197e-04\n1.20513842597142195e-04\n2.92402431232896461e-05\n4.89818089824432064e-06\n4.25076847121686860e-07\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n1.86745723208211058e-03\n7.23263075960861330e-03\n1.69990960812777155e-02\n3.14211564101592664e-02\n4.95772040034796330e-02\n6.86104779796190833e-02\n8.30695156534964341e-02\n8.50243645688121275e-02\n6.59726096787420641e-02\n2.14395641429474260e-02\n-4.21206521870994693e-02\n-1.01605177089896068e-01\n-1.20244548014451419e-01\n-6.76016392702967622e-02\n4.51760544869131281e-02\n1.41525300570246454e-01\n1.16379318976619281e-01\n-4.65345033374856831e-02\n-1.79019170607708278e-01\n-6.59803259590538982e-02\n1.83093383809195986e-01\n1.16520274276820573e-01\n-2.28916206813573997e-01\n-4.61698185797689356e-02\n3.14408655384954827e-01\n-3.35841052092187953e-01\n2.10846353029051609e-01\n-9.24607554307678992e-02\n3.02012044843330135e-02\n-7.56926647351931822e-03\n1.47453542826450233e-03\n-2.23710680151412822e-04\n2.62373116336369795e-05\n-2.33651175827044669e-06\n1.52924036405231572e-07\n-6.94311662653946591e-09\n1.95488476130819222e-10\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92296228181913741e-02\n3.33066837314932793e-02\n4.26980532870510007e-02\n4.90978906992029437e-02\n5.16707722203550782e-02\n4.84977532771168618e-02\n3.71792497098034011e-02\n1.57911072977321570e-02\n-1.55457904503789185e-02\n-5.26380508924738019e-02\n-8.55808567462892911e-02\n-9.92729012188579424e-02\n-7.83841113160659159e-02\n-1.78836705360222205e-02\n6.42234460082189706e-02\n1.22684026104344868e-01\n1.04571704843402169e-01\n-2.84395907453529728e-03\n-1.26696024980378408e-01\n-1.35325722681615968e-01\n2.14883625107592131e-02\n1.75452197975505902e-01\n7.62991960617101783e-02\n-1.78710858010510343e-01\n-1.11974246588549764e-01\n2.28614791268620998e-01\n2.69517170438992801e-02\n-2.95843084778061871e-01\n3.35612382524688058e-01\n-2.22689558582787828e-01\n1.03840242456106124e-01\n-3.64020532165198821e-02\n9.90425563579550548e-03\n-2.12385753714242585e-03\n3.60844405267784422e-04\n-4.84457942222549264e-05\n5.08613529820444350e-06\n-4.09272977624966860e-07\n0.0\n1.53207183589865311e-03\n5.93368870562890546e-03\n1.39634001360960120e-02\n2.59150123110890966e-02\n4.12720630158255677e-02\n5.81811824191490259e-02\n7.29296222864190408e-02\n7.98066363879953999e-02\n7.19540357193605012e-02\n4.38681329319100116e-02\n-4.26141187609716237e-03\n-6.16093793018268193e-02\n-1.04741554068375944e-01\n-1.04112030837782754e-01\n-4.27409109972521489e-02\n5.87322652792327260e-02\n1.32712680317807113e-01\n1.01403537238650671e-01\n-3.84929813278622954e-02\n-1.57613801986359131e-01\n-8.93970805950569103e-02\n1.23930799360523869e-01\n1.64222281816491900e-01\n-1.02844105191436497e-01\n-1.94414007829330132e-01\n1.74250886017723650e-01\n1.27441062767792324e-01\n-3.30972425194149600e-01\n3.08024984650251688e-01\n-1.82925254376332169e-01\n7.87385774310332687e-02\n-2.58929108614065796e-02\n6.67537840086807489e-03\n-1.36588223290361015e-03\n2.22587496886461774e-04\n-2.87801523862127883e-05\n2.91948181034436340e-06\n1.83452031826443242e-02\n3.17748239875142377e-02\n4.07601174238171673e-02\n4.69927251589010997e-02\n4.98091944965107641e-02\n4.75551250063692768e-02\n3.80942405504589229e-02\n1.95739547530603027e-02\n-8.30860163920008922e-03\n-4.26114404548196338e-02\n-7.56028404131628556e-02\n-9.46602445138925719e-02\n-8.54511544369847831e-02\n-3.97070616773774476e-02\n3.39002212352604027e-02\n1.02649346873468814e-01\n1.18299221020442602e-01\n4.97649717216634424e-02\n-7.24253668389459315e-02\n-1.45706237154882706e-01\n-7.21553147677735651e-02\n1.02908432509587019e-01\n1.62803933939736079e-01\n-2.50463793322023183e-02\n-1.99715299181699502e-01\n-1.49213178646747757e-03\n2.34682169378611888e-01\n-9.00446823977157224e-02\n-2.13087933046075373e-01\n3.42282649877241274e-01\n-2.72467529048488810e-01\n1.46746585163253590e-01\n-5.86961526128361860e-02\n1.81810978171597012e-02\n-4.45406638612539513e-03\n8.71481626951070175e-04\n-1.36448789759401897e-04\n1.70142351256437475e-05\n0.0\n1.39730333161478676e-03\n5.41173253294420856e-03\n1.27414229104350490e-02\n2.36854974641894471e-02\n3.78609482668989875e-02\n5.37600002418383918e-02\n6.82896468121493155e-02\n7.65831617025355543e-02\n7.25561685193566036e-02\n5.07591663512758084e-02\n9.79466642285458863e-03\n-4.33990806786359873e-02\n-9.08319919323167663e-02\n-1.06525406327573541e-01\n-6.92506274276018519e-02\n1.66789460582171117e-02\n1.05898391738654007e-01\n1.25841367513636254e-01\n3.48942341863936467e-02\n-1.06869331711687221e-01\n-1.46966956811480698e-01\n7.65998748658665627e-05\n1.70810616261232590e-01\n8.35867198083817681e-02\n-1.75438530816187543e-01\n-1.06188912183788522e-01\n2.28279873281696299e-01\n8.22984563200675028e-03\n-2.77031446593338337e-01\n3.34056273983867502e-01\n-2.33590748442406904e-01\n1.15267891459640545e-01\n-4.30812058629167771e-02\n1.26145945778382996e-02\n-2.94418042054601535e-03\n5.51921794135925453e-04\n-8.31546620449315958e-05\n1.75385716352198830e-02\n3.03776971643872039e-02\n3.89894300417875511e-02\n4.50537832324631668e-02\n4.80480262124201168e-02\n4.65400383158116257e-02\n3.86255046441452282e-02\n2.25480495944144418e-02\n-2.27174362047290494e-03\n-3.38181130055953474e-02\n-6.60703946400189035e-02\n-8.85536651013890258e-02\n-8.83022667677705042e-02\n-5.55258775041418406e-02\n7.46609705976144285e-03\n7.83492813345277872e-02\n1.16648725373147216e-01\n8.43733132178036416e-02\n-1.70104230239547655e-02\n-1.20305094924219647e-01\n-1.22969970535015752e-01\n9.35905132866477786e-03\n1.50958695319129144e-01\n1.03915463167343139e-01\n-1.13821482841298144e-01\n-1.65617979591288100e-01\n1.02078086906382579e-01\n1.87205803341859767e-01\n-1.80482528999974440e-01\n-1.05887032899187314e-01\n3.16897123193501051e-01\n-3.11506307187741416e-01\n1.94908626630703935e-01\n-8.88419914415139039e-02\n3.11734891651677358e-02\n-8.65603667542766582e-03\n1.92915844614665460e-03\n-3.47110561317597846e-04\n0.0\n1.27957104043690205e-03\n4.95575732990141855e-03\n1.16729159634960684e-02\n2.17298724173240268e-02\n3.48463935177792325e-02\n4.97890118012680322e-02\n6.39661487883626534e-02\n7.32162085761551562e-02\n7.21603030320188132e-02\n5.55765369720896685e-02\n2.10888046647234768e-02\n-2.71967012157771013e-02\n-7.57556438110948277e-02\n-1.02576263156535327e-01\n-8.55111493054250132e-02\n-1.85689552859109250e-02\n7.13685138533955293e-02\n1.24881741819699771e-01\n8.51840880991256988e-02\n-3.93941342099479314e-02\n-1.42330250038405937e-01\n-9.42257802686103513e-02\n8.54747452498988841e-02\n1.66546985040534640e-01\n-1.57040975961297603e-02\n-1.97467247875021790e-01\n1.88019254667930375e-03\n2.29365784260738004e-01\n-1.02939545986290251e-01\n-1.91533208280477457e-01\n3.33816819483492344e-01\n-2.79815366253069686e-01\n1.58802683117515858e-01\n-6.73084022521114322e-02\n2.22633677987928297e-02\n-5.87886249827645514e-03\n1.25374431802028024e-03\n1.67999062550750200e-02\n2.90982911961841229e-02\n3.73653818306147606e-02\n4.32630840353899065e-02\n4.63845712527598611e-02\n4.54855643146175603e-02\n3.88656335523989288e-02\n2.48760664834536856e-02\n2.76249129807621882e-03\n-2.61461418677251360e-02\n-5.71752074489537757e-02\n-8.16723678380194967e-02\n-8.81469466061505780e-02\n-6.63517943881337668e-02\n-1.44275684601204539e-02\n5.34454300193207416e-02\n1.05157537517980321e-01\n1.02564589941756851e-01\n2.95638282827199624e-02\n-7.78830288191072750e-02\n-1.33783933143828249e-01\n-6.61392296407051911e-02\n8.51730980866387405e-02\n1.53220225603624055e-01\n1.78247536760759336e-02\n-1.65860839683446920e-01\n-8.84649393163228909e-02\n1.73136736247784723e-01\n9.94042141221887360e-02\n-2.27740119353060877e-01\n9.92886989504557574e-03\n2.57981508494563971e-01\n-3.31215938972400925e-01\n2.43523402468181382e-01\n-1.26668731821825586e-01\n5.02013609447299058e-02\n-1.57083981058619149e-02\n3.95453807343010538e-03\n0.0\n1.17612612089870597e-03\n4.55511687928021863e-03\n1.07333082556898968e-02\n2.00054668484812674e-02\n3.21710185930900450e-02\n4.62160151396166091e-02\n5.99573423858393711e-02\n6.98235989325245443e-02\n7.10670794181538640e-02\n5.87841794213436256e-02\n3.00319595063952560e-02\n-1.31227949041298735e-02\n-6.07296991309015169e-02\n-9.46094377179465817e-02\n-9.35702473309219240e-02\n-4.56850928716919999e-02\n3.61953454731876942e-02\n1.07666868713519909e-01\n1.10940759400802183e-01\n2.23538427303606943e-02\n-1.00507592877483579e-01\n-1.35847622918560174e-01\n-1.62289863402160228e-02\n1.42404515490743788e-01\n1.14823896492046343e-01\n-1.05370904443103069e-01\n-1.65778558537853754e-01\n1.02664730128265214e-01\n1.79460863712396917e-01\n-1.86342290303814773e-01\n-8.48050101388962557e-02\n3.02152634284488908e-01\n-3.13665039741215457e-01\n2.06224825570166387e-01\n-9.91278010098008422e-02\n3.69079963681287065e-02\n-1.09594264276473251e-02\n1.61217092649505629e-02\n2.79236195517482758e-02\n3.58722368381573509e-02\n4.16068814354035657e-02\n4.48167330332128952e-02\n4.44170682599216368e-02\n3.88864981186014674e-02\n2.66872863813175237e-02\n6.96033662318618941e-03\n-1.94750606994613176e-02\n-4.90034337254528843e-02\n-7.44998853952301698e-02\n-8.59158478191051345e-02\n-7.31836523201193218e-02\n-3.18423837339785465e-02\n3.00625528842853942e-02\n8.81801635778742821e-02\n1.07763296549356416e-01\n6.36379728767598740e-02\n-3.19786025130174983e-02\n-1.16656444346897620e-01\n-1.09888934287932380e-01\n7.71282112441310733e-03\n1.33721051220989512e-01\n1.10923127372623928e-01\n-6.95664378570719222e-02\n-1.68359491840943287e-01\n8.72058461130962269e-03\n1.95232844848664544e-01\n-6.44634377698430350e-03\n-2.23748177676715870e-01\n1.15277958016238372e-01\n1.70178700497709473e-01\n-3.24347192532073059e-01\n2.85968599324030182e-01\n-1.70502867464972951e-01\n7.62478036615616278e-02\n-2.67786787722700502e-02\n0.0\n1.08504258437825156e-03\n4.20235185922282397e-03\n9.90539712694438711e-03\n1.84824880010785071e-02\n2.97950897554041354e-02\n4.30060392085027457e-02\n5.62666391882680403e-02\n6.65000166890922090e-02\n6.95157342850395155e-02\n6.07672615232826493e-02\n3.70203685801348409e-02\n-1.10856717352674958e-03\n-4.64808663080341078e-02\n-8.43674621568083899e-02\n-9.54792933452450338e-02\n-6.49406842031412385e-02\n4.37391357150071318e-03\n8.19607432954133075e-02\n1.16437168833700699e-01\n6.80757743020758560e-02\n-4.51195774621556550e-02\n-1.31681628376682125e-01\n-9.06454817072340491e-02\n6.35854580150383430e-02\n1.55713510790008419e-01\n3.25687957051915347e-02\n-1.61109214442775955e-01\n-9.14566261551809229e-02\n1.71699920016011115e-01\n9.18537609691651297e-02\n-2.26939061782727186e-01\n2.74400476348491372e-02\n2.38845245532315342e-01\n-3.27286108550840726e-01\n2.52572599952031684e-01\n-1.38029078925350324e-01\n5.77467481193655804e-02\n1.55164663293832945e-02\n2.68753080364236285e-02\n3.45385300916835405e-02\n4.01218550771650154e-02\n4.33941523792070322e-02\n4.34057859437524049e-02\n3.87910162683709342e-02\n2.81197914509826140e-02\n1.04756335435661953e-02\n-1.36998083202387998e-02\n-4.16222990567795409e-02\n-6.74308404535574057e-02\n-8.24056257772278616e-02\n-7.70062278995402999e-02\n-4.52542168357557492e-02\n9.28404277614476234e-03\n6.89045016605299016e-02\n1.03767424917497797e-01\n8.52954047548642458e-02\n9.43921879216388059e-03\n-8.43593740139135378e-02\n-1.23372131649349209e-01\n-5.61638140816523440e-02\n7.72247389097992509e-02\n1.42173864868551242e-01\n3.81408002866270371e-02\n-1.33270098819767924e-01\n-1.23144821908974689e-01\n9.85955105045493441e-02\n1.65329378285382494e-01\n-1.04392523567825302e-01\n-1.71625059233182248e-01\n1.91949993334696756e-01\n6.46016236523602461e-02\n-2.87571581652496189e-01\n3.15292897904542568e-01\n-2.17321442396951336e-01\n1.09771075614451236e-01\n0.0\n1.00869231068022617e-03\n3.90664852071199390e-03\n9.21113459516254701e-03\n1.72037116929606645e-02\n2.77941098555001299e-02\n4.02858357005464046e-02\n5.30994391298275012e-02\n6.35630790619872710e-02\n6.79600106349080024e-02\n6.20917615129465070e-02\n4.26004282194335088e-02\n9.08148982424823378e-03\n-3.34963910479138954e-02\n-7.33446348034486190e-02\n-9.33958451933464689e-02\n-7.77012744993918203e-02\n-2.24147791961169622e-02\n5.35137331244235209e-02\n1.07993438051610213e-01\n9.59742871465895653e-02\n8.09302134937545450e-03\n-9.90444004255311150e-02\n-1.25538170976886271e-01\n-2.11270429003965372e-02\n1.22593770974114252e-01\n1.24092454934039725e-01\n-5.54301393888766494e-02\n-1.69937545274477075e-01\n3.24686052883520985e-03\n1.94248598124045380e-01\n-1.12976155716463210e-02\n-2.19521909521906811e-01\n1.27005384442345381e-01\n1.51577273344024849e-01\n-3.17501196881965819e-01\n2.93875089459359418e-01\n-1.83515156573191424e-01\n1.51394080789323572e-02\n2.62222239892295761e-02\n3.37106282398278931e-02\n3.92143311109242471e-02\n4.25675516802076423e-02\n4.29273138990512032e-02\n3.90508436268692596e-02\n2.95960844488996205e-02\n1.36106194810952808e-02\n-8.74440172491948269e-03\n-3.53207490272505684e-02\n-6.12551954173964908e-02\n-7.89441146182311010e-02\n-7.94568661374198820e-02\n-5.59507612070199445e-02\n-8.78238326530163087e-03\n4.96997632368364403e-02\n9.46984440967342106e-02\n9.74208763570351133e-02\n4.34740030537437219e-02\n-4.68598875918761482e-02\n-1.15285840338018891e-01\n-9.80865708468557224e-02\n1.15414539996119541e-02\n1.24133274841068258e-01\n1.11239462143857396e-01\n-4.28141834880041844e-02\n-1.58083835667842537e-01\n-4.67798203673018206e-02\n1.58648091749875680e-01\n9.64450486495587178e-02\n-1.72842082274577397e-01\n-8.82829556902927637e-02\n2.30056398598430245e-01\n-4.04211898300702449e-02\n-2.30756129269796856e-01\n3.34508015573254214e-01\n-2.69520027027045694e-01\n0.0\n9.62087241426122508e-04\n3.72614786364200683e-03\n8.78794267392968460e-03\n1.64278450824872566e-02\n2.65934301766510388e-02\n3.86921656329207581e-02\n5.13409797696027445e-02\n6.21626049771086334e-02\n6.77856522411296736e-02\n6.42680347743118802e-02\n4.81655288684667560e-02\n1.83205308545938070e-02\n-2.19418546125003909e-02\n-6.31639984651311409e-02\n-9.02851216488434749e-02\n-8.71208003520507618e-02\n-4.52738354236441182e-02\n2.53934703639876087e-02\n9.21693767216012483e-02\n1.10396397067636140e-01\n5.33081393357859590e-02\n-5.35209802609894411e-02\n-1.27827138195575396e-01\n-8.77058226052606915e-02\n5.22065831827839902e-02\n1.48329584462130154e-01\n6.19250656070413907e-02\n-1.25825534542412187e-01\n-1.37377649469405810e-01\n9.16535574833817063e-02\n1.74522162930252633e-01\n-1.04048017967762002e-01\n-1.78648935500445000e-01\n2.00112468883325317e-01\n6.68745605201979954e-02\n-3.08618828069206097e-01\n3.48705723103692800e-01\n1.53045533184802234e-02\n2.65082639347546112e-02\n3.40892432399743858e-02\n3.97065147226697973e-02\n4.32496459299211850e-02\n4.39470673527792288e-02\n4.06311863742741600e-02\n3.20044683064483540e-02\n1.70665549117965873e-02\n-4.24622374499723960e-03\n-3.02653360882964746e-02\n-5.68665783385149046e-02\n-7.72708246551472577e-02\n-8.30032945328555843e-02\n-6.65816244208733421e-02\n-2.59108799141815581e-02\n3.09441333042627179e-02\n8.36937946703052577e-02\n1.04599835601822885e-01\n7.25082962799708519e-02\n-7.72849570510324331e-03\n-9.38265999432294773e-02\n-1.21161220431149047e-01\n-5.10438303452905515e-02\n7.55492749271628045e-02\n1.41328202612194920e-01\n5.57791549599869277e-02\n-1.10580251962567336e-01\n-1.46803304104552085e-01\n3.43160459516663047e-02\n1.82912336390692098e-01\n1.74089291921864647e-02\n-2.07081901009046165e-01\n-7.01564501488833453e-03\n2.43116482217197449e-01\n-1.17026692708302127e-01\n-2.08183469096677454e-01\n4.00663417536006206e-01\n0.0\n9.49628681652059988e-04\n3.67789606911933303e-03\n8.67646461415200881e-03\n1.62335388866220141e-02\n2.63300629491184830e-02\n3.84511325364643441e-02\n5.13529706785521498e-02\n6.28610058236842989e-02\n6.98320554804749138e-02\n6.84711526818634481e-02\n5.52076813534315702e-02\n2.82354978768810418e-02\n-1.04725998242329085e-02\n-5.33849745031677869e-02\n-8.71914823327219063e-02\n-9.57767507827576997e-02\n-6.73202235134590099e-02\n-4.08791627363386863e-03\n7.03564313218222465e-02\n1.14906572868656534e-01\n9.19251754299253016e-02\n2.33632897470905130e-04\n-1.03765648132086385e-01\n-1.30185260160144561e-01\n-3.35634244191921408e-02\n1.11581225892850341e-01\n1.43864808745517297e-01\n-6.51222753224038695e-03\n-1.67661063056289722e-01\n-8.79669910922370041e-02\n1.54330756623226706e-01\n1.40978506700091738e-01\n-1.66778266915351164e-01\n-1.47857532249657586e-01\n2.46888507252154443e-01\n5.52258056164576100e-02\n-4.13926077836116568e-01\n1.59037137744701164e-02\n2.75460402864152396e-02\n3.54352885218254601e-02\n4.13289077538723029e-02\n4.51725154044850322e-02\n4.62501161999020749e-02\n4.34450644086826071e-02\n3.54800371511652182e-02\n2.12948519514614756e-02\n6.17746103497526702e-04\n-2.53031777624013500e-02\n-5.29824083283720118e-02\n-7.63590874877581871e-02\n-8.73823374181766227e-02\n-7.80761386618931547e-02\n-4.42594183624766060e-02\n9.87439375305261720e-03\n6.85919078645929187e-02\n1.06411949453209184e-01\n9.79461624967019606e-02\n3.49460682606630435e-02\n-5.78781302714457130e-02\n-1.23879251717445404e-01\n-1.05444890041990896e-01\n3.10160367385400523e-03\n1.22832462932524228e-01\n1.33694271920947766e-01\n-2.91085540061686559e-03\n-1.53898899564387542e-01\n-1.18593152293487145e-01\n9.59438394809563749e-02\n1.86656435897848250e-01\n-3.78869048815061032e-02\n-2.25978699980911468e-01\n2.88188052183491993e-02\n2.72727527963807559e-01\n-1.09619957326754766e-01\n-3.89893362132142540e-01\n0.0\n9.46400226627381485e-04\n3.66539231657477373e-03\n8.64935961194996869e-03\n1.61973387415308596e-02\n2.63240685997760543e-02\n3.85888602068337749e-02\n5.18790724803441031e-02\n6.42109808942469551e-02\n7.26594159570863596e-02\n7.35794855517451080e-02\n6.33060820535442659e-02\n3.94545346619612144e-02\n2.73124167458557634e-03\n-4.12440090367770795e-02\n-8.11376517164193733e-02\n-1.01553020779340031e-01\n-8.83007154372337788e-02\n-3.69343675294238755e-02\n3.87617229368565630e-02\n1.04928979275086015e-01\n1.19618429043395078e-01\n5.96708021998395288e-02\n-5.04496586208415670e-02\n-1.35213160672078309e-01\n-1.13872085112526666e-01\n1.86481817856439594e-02\n1.48832472020878265e-01\n1.25453110849148064e-01\n-5.85324901649153795e-02\n-1.87653686605814690e-01\n-5.42718712561878966e-02\n1.88322867782524411e-01\n1.36286849113721797e-01\n-1.89932713024779209e-01\n-1.91514206192412467e-01\n2.46744326679656623e-01\n3.39049691249774410e-01\n1.66231780763078200e-02\n2.87921890114302172e-02\n3.70508183398161814e-02\n4.32724165696766611e-02\n4.74659106229036731e-02\n4.89770834766198801e-02\n4.67473565103970548e-02\n3.95285885875255386e-02\n2.62117723016616552e-02\n6.32805588844905214e-03\n-1.92916266690283736e-02\n-4.78239427872851827e-02\n-7.40114901645936851e-02\n-9.04202480824332078e-02\n-8.89081892695350179e-02\n-6.36066590919654729e-02\n-1.50488061165334093e-02\n4.60749455260963600e-02\n9.83162457181557398e-02\n1.15172590881196246e-01\n7.82657001097053495e-02\n-6.07217585542144198e-03\n-9.78422028540806843e-02\n-1.36187852679612836e-01\n-7.90691490757505777e-02\n4.95427979077877889e-02\n1.50451254519551492e-01\n1.17298123552126418e-01\n-4.56772662501588253e-02\n-1.77192928653887583e-01\n-1.01373661114494779e-01\n1.25977580457614285e-01\n1.99335424187112920e-01\n-3.96082988216371057e-02\n-2.56125696643858536e-01\n-4.12019787693377187e-02\n3.31523189183147660e-01\n2.74692626543293739e-01\n0.0\n9.38805665323672045e-04\n3.63597870712375603e-03\n8.58241890597888184e-03\n1.60869466730261534e-02\n2.61990185193269678e-02\n3.85566270335568201e-02\n5.21889107568116600e-02\n6.53240752494378546e-02\n7.52928989311389824e-02\n7.86632787455899957e-02\n7.17682278189692852e-02\n5.17574767657439996e-02\n1.81576704039891207e-02\n-2.53741911168143403e-02\n-6.98540176124128748e-02\n-1.01491623385954174e-01\n-1.05128304574974379e-01\n-7.09672999534873422e-02\n-2.95167346190289281e-03\n7.57008607517028198e-02\n1.26255734865632213e-01\n1.12031223825604348e-01\n2.59245651856457038e-02\n-8.90492396095112076e-02\n-1.51160060662397816e-01\n-9.55520806635722364e-02\n5.41063588048014618e-02\n1.69680024327635598e-01\n1.17436937629601834e-01\n-7.99700221071644041e-02\n-2.04763365203195685e-01\n-6.81102549491607312e-02\n1.93163824569939774e-01\n2.02965513095931083e-01\n-1.22691226663608446e-01\n-3.58095102032369106e-01\n-2.08527786558792949e-01\n1.74075172039315808e-02\n3.01507042308388172e-02\n3.88125669808273982e-02\n4.53943969867471042e-02\n4.99771578145650208e-02\n5.19791161406250035e-02\n5.04136914942041117e-02\n4.40794515878587256e-02\n3.18389233680434758e-02\n1.30457117003767373e-02\n-1.18780120195027053e-02\n-4.07967908793522016e-02\n-6.93577097271633608e-02\n-9.09766411490336296e-02\n-9.77555750023399866e-02\n-8.26882596139556919e-02\n-4.31034792460332356e-02\n1.55222561735338122e-02\n7.73288797473097173e-02\n1.18126499134598453e-01\n1.13883740719728524e-01\n5.48489345215327703e-02\n-4.07931782954181962e-02\n-1.24911768589365132e-01\n-1.39590244007764680e-01\n-5.78648153526601719e-02\n7.88232886750770828e-02\n1.66802883012782954e-01\n1.13683928054348682e-01\n-5.94653978857268284e-02\n-1.93048913621598234e-01\n-1.23035531116329533e-01\n1.10938611681829363e-01\n2.40174695882408251e-01\n6.22645518146248272e-02\n-2.51660244509184894e-01\n-3.35737599764960537e-01\n-1.48770288853854377e-01\n0.0\n9.25819065168042438e-04\n3.58568182099714729e-03\n8.46621786492012147e-03\n1.58844199440295389e-02\n2.59246895129256021e-02\n3.83072055141018691e-02\n5.22123026604841001e-02\n6.61001331275926779e-02\n7.75958455786035367e-02\n8.35480704297082294e-02\n8.03964983569050023e-02\n6.49741449020623807e-02\n3.57815543765274205e-02\n-5.43438497669247299e-03\n-5.22899340307931490e-02\n-9.34236000053681320e-02\n-1.14266675208385432e-01\n-1.01676769569376643e-01\n-5.10167923552311067e-02\n2.67996506433162245e-02\n1.02989936260917958e-01\n1.38573844901710291e-01\n1.03865485532010929e-01\n3.15510923492117769e-03\n-1.12295153383666163e-01\n-1.62705300463133279e-01\n-9.39788499511026582e-02\n6.24172917841393157e-02\n1.83428270221242501e-01\n1.42874352775638813e-01\n-5.26802103650174103e-02\n-2.21625079331171898e-01\n-1.63136796167123538e-01\n1.03937918638241616e-01\n3.19393431701036457e-01\n2.81922753349924671e-01\n9.98636952750987933e-02\n1.82966280134123395e-02\n3.16906893264181852e-02\n4.08097128709640836e-02\n4.78002070518235567e-02\n5.28252965884540987e-02\n5.53870521462734994e-02\n5.45855418390354258e-02\n4.92853544179640765e-02\n3.83452471323184052e-02\n2.09698377778447589e-02\n-2.80297509239068330e-03\n-3.15268131828793235e-02\n-6.18242700891614913e-02\n-8.81717463573137988e-02\n-1.03342736441242977e-01\n-9.98600870917963623e-02\n-7.26005522149001797e-02\n-2.21858257021649297e-02\n4.20005706384659408e-02\n1.01149840289484053e-01\n1.30940795700434404e-01\n1.11095191943489185e-01\n3.85316365328269780e-02\n-6.23640185817644771e-02\n-1.41944225068657892e-01\n-1.46993110661566423e-01\n-5.74059502888543752e-02\n8.39811024179821786e-02\n1.80064588874266268e-01\n1.42091278440763691e-01\n-2.53101238448690466e-02\n-1.94448586295555753e-01\n-2.01967604992354277e-01\n-7.58626959317840882e-03\n2.36794420978281100e-01\n3.24412720853567094e-01\n2.15302864221353724e-01\n6.30650684633881076e-02\n0.0\n9.07133451349494526e-04\n3.51331274986424816e-03\n8.29789792478331963e-03\n1.55840836772825307e-02\n2.54906918702729572e-02\n3.78221367516266976e-02\n5.19169555105134170e-02\n6.64840193077440161e-02\n7.94782885567498765e-02\n8.80974486202423801e-02\n8.90067207931001247e-02\n7.89031063621827844e-02\n5.54849401974385065e-02\n1.87677851901969436e-02\n-2.75325831618848660e-02\n-7.51172596904436801e-02\n-1.11536576388210323e-01\n-1.22754411856077647e-01\n-9.81483680371373901e-02\n-3.70398519911871518e-02\n4.58922243420167020e-02\n1.20427181774144409e-01\n1.49675966608347949e-01\n1.08266880857839018e-01\n3.12981679891744923e-03\n-1.17051340296683432e-01\n-1.78353818460672386e-01\n-1.26143900960269839e-01\n2.49501040770785734e-02\n1.78193560007699592e-01\n2.10141157888228847e-01\n7.10860508638902766e-02\n-1.54154725487500560e-01\n-3.03596945448300015e-01\n-2.83015385738803416e-01\n-1.50731811507123337e-01\n-3.74267533053630266e-02\n1.93432540777219962e-02\n3.35034988463283612e-02\n4.31602563473887091e-02\n5.06297606646293960e-02\n5.61698305527147182e-02\n5.93792729493518856e-02\n5.94613142421895058e-02\n5.53689320796504764e-02\n4.59874660229533799e-02\n3.04114498533749750e-02\n8.33672778018061320e-03\n-1.94530385804405036e-02\n-5.05898946273846128e-02\n-8.07836966507678444e-02\n-1.03896602833303695e-01\n-1.12725678643894767e-01\n-1.00718142894654056e-01\n-6.45818043503842421e-02\n-7.26143275973850037e-03\n5.98934316802465019e-02\n1.17468932328400430e-01\n1.42452253112594768e-01\n1.17196528718519544e-01\n4.06524416442946845e-02\n-6.36112738825994062e-02\n-1.49901964505167629e-01\n-1.68242040763496165e-01\n-9.39216935773421885e-02\n4.67260166551920070e-02\n1.76509535505542214e-01\n2.06302769555018306e-01\n9.73663516715148197e-02\n-9.82176734541339025e-02\n-2.63413684555838523e-01\n-3.02800393006079915e-01\n-2.18352363207047234e-01\n-9.71043414207768407e-02\n-2.08316382339828778e-02\n0.0\n8.81476899039178893e-04\n3.41394535004529640e-03\n8.06576649303877846e-03\n1.51636280264027586e-02\n2.48592644782476418e-02\n3.70418834670527344e-02\n5.12130263885680614e-02\n6.63442368969661550e-02\n8.07532258255374003e-02\n9.20556158266169766e-02\n9.72708676405567019e-02\n9.31719086355762699e-02\n7.69515532662115448e-02\n4.72143445090215177e-02\n5.17299849419912677e-03\n-4.42639625856353844e-02\n-9.20406630837277417e-02\n-1.25799512147027143e-01\n-1.32578939284913100e-01\n-1.03400576064351796e-01\n-3.87872271644189442e-02\n4.70124016908962591e-02\n1.26222457949623806e-01\n1.64851257895442471e-01\n1.37133986403129932e-01\n4.23619914753603430e-02\n-8.54070526093386601e-02\n-1.84994884017511491e-01\n-1.96227268785830050e-01\n-9.73049649427638469e-02\n7.29419912723569541e-02\n2.30444174096491400e-01\n2.97335456218744076e-01\n2.54623395076082559e-01\n1.51060634706788599e-01\n5.76227549871956499e-02\n1.08429778291558518e-02\n2.06280264161651100e-02\n3.57287898126709136e-02\n4.60446488376540092e-02\n5.40973043673907347e-02\n6.02557944554981545e-02\n6.42314724800306242e-02\n6.53504448862796822e-02\n6.26811020034362537e-02\n5.51733632436039872e-02\n4.18635917740919627e-02\n2.21695663719074579e-02\n-3.72682336171166213e-03\n-3.44508125453659303e-02\n-6.70566093403725388e-02\n-9.68602942192759997e-02\n-1.17695995622413951e-01\n-1.22810412547312245e-01\n-1.06515514752817286e-01\n-6.64816998702803807e-02\n-6.16879792882316525e-03\n6.35585752604011373e-02\n1.24895246933552098e-01\n1.56754055263034431e-01\n1.41810104994139263e-01\n7.53623227963905740e-02\n-2.76506159535031895e-02\n-1.32352803891625320e-01\n-1.93952908909142852e-01\n-1.77019145385152565e-01\n-7.61300411402818095e-02\n7.47790905506668657e-02\n2.14433699260426186e-01\n2.85499456236705695e-01\n2.67313153238285250e-01\n1.86305849655251043e-01\n9.42941932718107667e-02\n3.14604507783726103e-02\n5.25693347264514013e-03\n0.0\n8.46497108970423596e-04\n3.27846920565517562e-03\n7.74822433235441109e-03\n1.45819920189455849e-02\n2.39614434589431845e-02\n3.58591108894902311e-02\n4.99414515145803414e-02\n6.54528182216019827e-02\n8.11025407920920594e-02\n9.49911679624379501e-02\n1.04627507473706485e-01\n1.07100066284381193e-01\n9.94660674649014559e-02\n7.93965170946836774e-02\n4.60544632069034426e-02\n1.07894061544698246e-03\n-5.05919982551285841e-02\n-1.00463178571116168e-01\n-1.37257898679381596e-01\n-1.49089313103100168e-01\n-1.27019072388789012e-01\n-6.93417540896845430e-02\n1.48582537664239123e-02\n1.04897341922360832e-01\n1.72259537577597349e-01\n1.89364022211178623e-01\n1.41190768962249774e-01\n3.48605578195052071e-02\n-9.88304591319602854e-02\n-2.15491256849434043e-01\n-2.76268248818829831e-01\n-2.66565819061676923e-01\n-2.02594153440531083e-01\n-1.20247999826463059e-01\n-5.31833038713990236e-02\n-1.57526441445244927e-02\n-2.36142398233280286e-03\n2.23006167920546013e-02\n3.86258013239622403e-02\n4.97978226366690563e-02\n5.86003472826682678e-02\n6.55373823227132085e-02\n7.04536040775337602e-02\n7.28228738095259148e-02\n7.18629011059189471e-02\n6.66367432672244353e-02\n5.61917606647841725e-02\n3.97602355189437887e-02\n1.70296068288117823e-02\n-1.15308286970407063e-02\n-4.43302945900697146e-02\n-7.83864284086693008e-02\n-1.09247518828131399e-01\n-1.31256764449682650e-01\n-1.38298252628745677e-01\n-1.25090047855539149e-01\n-8.89303222978252428e-02\n-3.15622329653773848e-02\n3.94458816938620255e-02\n1.10592466280278010e-01\n1.64329564657044680e-01\n1.83199787554989002e-01\n1.55577206974098881e-01\n8.12510590896268758e-02\n-2.57060098012263337e-02\n-1.39118785835899955e-01\n-2.28553616465260623e-01\n-2.70536741220980315e-01\n-2.58176052329087913e-01\n-2.03798958065629116e-01\n-1.32341933750845547e-01\n-6.87695486038945314e-02\n-2.70392541910293438e-02\n-7.19412352460958599e-03\n-9.75892663908437354e-04\n0.0\n7.97851720078555622e-04\n3.09006642460718777e-03\n7.30541797956399484e-03\n1.37635266772858523e-02\n2.26705767692999376e-02\n3.40777562659779071e-02\n4.78138637923997481e-02\n6.34000330144471186e-02\n7.99584363877358789e-02\n9.61342383575296555e-02\n1.10059356437386985e-01\n1.19395577912593059e-01\n1.21499638732799078e-01\n1.13748690135275568e-01\n9.40447383848191931e-02\n6.14753998159269441e-02\n1.70439376957621062e-02\n-3.56989671818883705e-02\n-9.03653820938250391e-02\n-1.38061446573395641e-01\n-1.68567106891779811e-01\n-1.72410446854628613e-01\n-1.43564996256694638e-01\n-8.21041678849440820e-02\n4.17466983413062372e-03\n1.00176497112919441e-01\n1.86552462430632060e-01\n2.44962318083470576e-01\n2.63961120043058051e-01\n2.43098153909207276e-01\n1.93064488786422461e-01\n1.31324477332984219e-01\n7.50351149855169736e-02\n3.47808856619774356e-02\n1.23160617240965740e-02\n2.97173608528031015e-03\n3.67493711373179913e-04\n2.46946164997925814e-02\n4.27723304510694638e-02\n5.51661566747333881e-02\n6.50241282924421959e-02\n7.30243771465020342e-02\n7.91755342131551382e-02\n8.31334219200867280e-02\n8.43103498597941869e-02\n8.19472235128612947e-02\n7.51965810373733667e-02\n6.32381580785735670e-02\n4.54380166532239380e-02\n2.15526824249352086e-02\n-8.03327005119158256e-03\n-4.20653872300332729e-02\n-7.82236251381709519e-02\n-1.13043805316865892e-01\n-1.42040083484233609e-01\n-1.60106655691924948e-01\n-1.62241306899915200e-01\n-1.44559694921719883e-01\n-1.05459818895265192e-01\n-4.66714498423014892e-02\n2.61715344079094005e-02\n1.03806193308151912e-01\n1.74694150435701329e-01\n2.27377258200389454e-01\n2.53338396292345391e-01\n2.49491151580331860e-01\n2.19302970579738632e-01\n1.71879751948269516e-01\n1.19104911618075598e-01\n7.18468911509853869e-02\n3.68176224552920067e-02\n1.54318025224746743e-02\n4.97166233822321849e-03\n1.09658525434335103e-03\n1.24416998378972725e-04\n0.0\n7.26162053270240897e-04\n2.81241353896342612e-03\n6.65130371678838289e-03\n1.25451003215819156e-02\n2.07142427660334354e-02\n3.12779498544445214e-02\n4.42167010824372902e-02\n5.93211105332910604e-02\n7.61322088669382641e-02\n9.38808281552257762e-02\n1.11437695815865975e-01\n1.27290275315570467e-01\n1.39566282483481463e-01\n1.46125540687171179e-01\n1.44739253162674719e-01\n1.33366459458803654e-01\n1.10519459639433021e-01\n7.56830113932464299e-02\n2.97189170792053030e-02\n-2.48445174737023863e-02\n-8.37575979260161974e-02\n-1.41338712572032038e-01\n-1.91165822656784390e-01\n-2.27128588084300864e-01\n-2.44667778527776825e-01\n-2.41901928109299724e-01\n-2.20277962147277628e-01\n-1.84441487348901395e-01\n-1.41229372422146726e-01\n-9.80004906103944251e-02\n-6.08200528716316691e-02\n-3.31379119582693449e-02\n-1.54376591839955023e-02\n-5.91206903793677161e-03\n-1.74724816798821000e-03\n-3.54659791707646660e-04\n-3.71262011243373552e-05\n2.88144999082242184e-02\n4.99081778357330988e-02\n6.43966760871163973e-02\n7.60318698583847818e-02\n8.57494053233407993e-02\n9.37785689281400575e-02\n1.00013486154680822e-01\n1.04130433507026929e-01\n1.05643681261154268e-01\n1.03948887570165835e-01\n9.83726846601649108e-02\n8.82378059143745647e-02\n7.29485123431952986e-02\n5.20969160774585188e-02\n2.55856345938131023e-02\n-6.24433334156725226e-03\n-4.24991424838971690e-02\n-8.16569401582322718e-02\n-1.21562741634435062e-01\n-1.59523562284535680e-01\n-1.92525033041746646e-01\n-2.17571016877482204e-01\n-2.32117570781483595e-01\n-2.34536365833699134e-01\n-2.24509900439471138e-01\n-2.03245249178090476e-01\n-1.73408906629822612e-01\n-1.38740618807579236e-01\n-1.03393231484947654e-01\n-7.11442227248845899e-02\n-4.46931586178188622e-02\n-2.52576160061060012e-02\n-1.25903081415598885e-02\n-5.38654970180796940e-03\n-1.90038812682247682e-03\n-5.18739490951389617e-04\n-9.74591867094397552e-05\n-9.45952618060778290e-06\n0.0\n6.03064598149173365e-04\n2.33565914531901671e-03\n5.52575429879465820e-03\n1.04340822662750549e-02\n1.72717462286193363e-02\n2.62001624632191878e-02\n3.73214443237092838e-02\n5.06620453356679476e-02\n6.61514126943523462e-02\n8.35975906475317360e-02\n1.02662460325166904e-01\n1.22840352257369667e-01\n1.43444913029672244e-01\n1.63610076405826754e-01\n1.82311407721628932e-01\n1.98413492964116478e-01\n2.10746940977112052e-01\n2.18214580890094545e-01\n2.19920507139573257e-01\n2.15308255560304640e-01\n2.04286867166067698e-01\n1.87318023902371289e-01\n1.65436507669313088e-01\n1.40182500453442577e-01\n1.13439017236555306e-01\n8.71897979050240135e-02\n6.32375704377192427e-02\n4.29418293729237066e-02\n2.70401369601969768e-02\n1.56011903595400618e-02\n8.12237463389881183e-03\n3.73964189407853618e-03\n1.48105446841382822e-03\n4.84610057209368817e-04\n1.22882679982350232e-04\n2.14758429400040562e-05\n1.94125555705391490e-06\n4.11643026009301527e-02\n7.12986635629506982e-02\n9.20364795808223390e-02\n1.08853125853881724e-01\n1.23297758236028468e-01\n1.36023468706596873e-01\n1.47327647125437305e-01\n1.57321413720574566e-01\n1.65999330572375869e-01\n1.73274744763963484e-01\n1.79002294555451968e-01\n1.82996365473343359e-01\n1.85049682617917155e-01\n1.84954149432629611e-01\n1.82524772742537950e-01\n1.77626437759853262e-01\n1.70202197412002376e-01\n1.60300592057412317e-01\n1.48098427493316198e-01\n1.33914634233923246e-01\n1.18210618116153313e-01\n1.01573225679335785e-01\n8.46783438304458125e-02\n6.82362697446401295e-02\n5.29239968385804976e-02\n3.93136849689688789e-02\n2.78096311956618734e-02\n1.86066964892957695e-02\n1.16803634247868091e-02\n6.81229400114084522e-03\n3.64665997326217312e-03\n1.76417573730198031e-03\n7.55801693469418455e-04\n2.78868738668732884e-04\n8.51025116656749302e-05\n2.01452951296745962e-05\n3.28944417511680505e-06\n2.78001721198095037e-07\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n1.92296228181913637e-02\n3.33066837314932584e-02\n4.26980532870509730e-02\n4.90978906992029160e-02\n5.16707722203550504e-02\n4.84977532771168271e-02\n3.71792497098033803e-02\n1.57911072977321466e-02\n-1.55457904503789081e-02\n-5.26380508924737672e-02\n-8.55808567462892356e-02\n-9.92729012188578869e-02\n-7.83841113160658742e-02\n-1.78836705360222101e-02\n6.42234460082189290e-02\n1.22684026104344798e-01\n1.04571704843402113e-01\n-2.84395907453529597e-03\n-1.26696024980378324e-01\n-1.35325722681615912e-01\n2.14883625107592027e-02\n1.75452197975505791e-01\n7.62991960617101367e-02\n-1.78710858010510232e-01\n-1.11974246588549695e-01\n2.28614791268620859e-01\n2.69517170438992627e-02\n-2.95843084778061649e-01\n3.35612382524687836e-01\n-2.22689558582787689e-01\n1.03840242456106069e-01\n-3.64020532165198613e-02\n9.90425563579549854e-03\n-2.12385753714242455e-03\n3.60844405267784205e-04\n-4.84457942222548925e-05\n5.08613529820444096e-06\n-4.09272977624966648e-07\n2.43952796628567839e-08\n0.0\n1.53207183589857527e-03\n5.93368870562860449e-03\n1.39634001360953025e-02\n2.59150123110877782e-02\n4.12720630158234722e-02\n5.81811824191460700e-02\n7.29296222864153354e-02\n7.98066363879913476e-02\n7.19540357193568375e-02\n4.38681329319077704e-02\n-4.26141187609696027e-03\n-6.16093793018236968e-02\n-1.04741554068370615e-01\n-1.04112030837777439e-01\n-4.27409109972499424e-02\n5.87322652792297770e-02\n1.32712680317800369e-01\n1.01403537238645453e-01\n-3.84929813278604080e-02\n-1.57613801986351082e-01\n-8.93970805950522474e-02\n1.23930799360517624e-01\n1.64222281816483406e-01\n-1.02844105191431376e-01\n-1.94414007829319974e-01\n1.74250886017714823e-01\n1.27441062767785412e-01\n-3.30972425194132225e-01\n3.08024984650235645e-01\n-1.82925254376322677e-01\n7.87385774310291747e-02\n-2.58929108614052370e-02\n6.67537840086772881e-03\n-1.36588223290353924e-03\n2.22587496886450227e-04\n-2.87801523862112975e-05\n2.91948181034421221e-06\n-2.27610996871251417e-07\n1.83452031825947458e-02\n3.17748239874283689e-02\n4.07601174237070193e-02\n4.69927251587740902e-02\n4.98091944963761218e-02\n4.75551250062406575e-02\n3.80942405503557555e-02\n1.95739547530070258e-02\n-8.30860163917818834e-03\n-4.26114404547051212e-02\n-7.56028404129590603e-02\n-9.46602445136367765e-02\n-8.54511544367529685e-02\n-3.97070616772682294e-02\n3.39002212351711060e-02\n1.02649346873192646e-01\n1.18299221020121345e-01\n4.97649717215245188e-02\n-7.24253668387543070e-02\n-1.45706237154487578e-01\n-7.21553147675707274e-02\n1.02908432509314418e-01\n1.62803933939288520e-01\n-2.50463793321469945e-02\n-1.99715299181151995e-01\n-1.49213178644474575e-03\n2.34682169377960020e-01\n-9.00446823974889315e-02\n-2.13087933045454009e-01\n3.42282649876268996e-01\n-2.72467529047720869e-01\n1.46746585162841559e-01\n-5.86961526126717689e-02\n1.81810978171088496e-02\n-4.45406638611295022e-03\n8.71481626948637008e-04\n-1.36448789759021152e-04\n1.70142351255962865e-05\n-1.66955639677502591e-06\n0.0\n1.39730333148163134e-03\n5.41173253242850042e-03\n1.27414229092208293e-02\n2.36854974619321035e-02\n3.78609482632899716e-02\n5.37600002367119439e-02\n6.82896468056329864e-02\n7.65831616952189903e-02\n7.25561685124084393e-02\n5.07591663463860532e-02\n9.79466642185412503e-03\n-4.33990806745630994e-02\n-9.08319919236842133e-02\n-1.06525406317365817e-01\n-6.92506274208544298e-02\n1.66789460568088285e-02\n1.05898391728637631e-01\n1.25841367501481727e-01\n3.48942341827248939e-02\n-1.06869331701686415e-01\n-1.46966956797156850e-01\n7.65998754152446377e-05\n1.70810616244857966e-01\n8.35867197995431160e-02\n-1.75438530799489678e-01\n-1.06188912172358471e-01\n2.28279873259406685e-01\n8.22984562966303651e-03\n-2.77031446564158124e-01\n3.34056273949544236e-01\n-2.33590748418631061e-01\n1.15267891447967341e-01\n-4.30812058585676450e-02\n1.26145945765675175e-02\n-2.94418042024986032e-03\n5.51921794080466668e-04\n-8.31546620365824124e-05\n1.00122590230337923e-05\n1.75385715937159334e-02\n3.03776970925002561e-02\n3.89894299495178037e-02\n4.50537831258244897e-02\n4.80480260986443919e-02\n4.65400382054942940e-02\n3.86255045523646381e-02\n2.25480495404026954e-02\n-2.27174361606337274e-03\n-3.38181129267468572e-02\n-6.60703944847280400e-02\n-8.85536648921691205e-02\n-8.83022665576903981e-02\n-5.55258773697565322e-02\n7.46609704634699362e-03\n7.83492811525118432e-02\n1.16648725096536843e-01\n8.43733130118953234e-02\n-1.70104229926298957e-02\n-1.20305094642859323e-01\n-1.22969970234893713e-01\n9.35905132178240992e-03\n1.50958694962936207e-01\n1.03915462899644193e-01\n-1.13821482585548292e-01\n-1.65617979171467922e-01\n1.02078086686549718e-01\n1.87205802851977632e-01\n-1.80482528578275014e-01\n-1.05887032572111364e-01\n3.16897122342548632e-01\n-3.11506306371802599e-01\n1.94908626125778806e-01\n-8.88419912128107919e-02\n3.11734890852437725e-02\n-8.65603665329653729e-03\n1.92915844122405842e-03\n-3.47110560433152064e-04\n5.03961499475683288e-05\n0.0\n1.27957098617142323e-03\n4.95575711973212339e-03\n1.16729154684353399e-02\n2.17298714955994343e-02\n3.48463920391860332e-02\n4.97890096872499466e-02\n6.39661460691872130e-02\n7.32162054572509935e-02\n7.21602999460546901e-02\n5.55765345742158731e-02\n2.10888037157634829e-02\n-2.71967001190559429e-02\n-7.57556406321954201e-02\n-1.02576258784340582e-01\n-8.55111455799861114e-02\n-1.85689543458101534e-02\n7.13685109435322484e-02\n1.24881736482492733e-01\n8.51840842477818022e-02\n-3.93941328057511239e-02\n-1.42330243973380899e-01\n-9.42257758484919550e-02\n8.54747419552328302e-02\n1.66546977580051964e-01\n-1.57040976001340052e-02\n-1.97467239065433647e-01\n1.88019343674472269e-03\n2.29365773541295476e-01\n-1.02939542378206267e-01\n-1.91533197802988636e-01\n3.33816802760398379e-01\n-2.79815352588980326e-01\n1.58802675460575998e-01\n-6.73083990313842334e-02\n2.22633667388409465e-02\n-5.87886221936801800e-03\n1.25374425868976904e-03\n-2.16874130549477001e-04\n1.67998966526596433e-02\n2.90982745643128121e-02\n3.73653604720518284e-02\n4.32630592988398621e-02\n4.63845447120487392e-02\n4.54855382447000994e-02\n3.88656111903678200e-02\n2.48760520060385126e-02\n2.76248932878040820e-03\n-2.61461274177036025e-02\n-5.71751752542869821e-02\n-8.16723214096812256e-02\n-8.81468959486067793e-02\n-6.63517554291928324e-02\n-1.44275585086368410e-02\n5.34454011921099842e-02\n1.05157477962201470e-01\n1.02564529631636522e-01\n2.95638077596291488e-02\n-7.78829873192625061e-02\n-1.33783855508308125e-01\n-6.61391859103365315e-02\n8.51730542705723265e-02\n1.53220133964988653e-01\n1.78247332819434882e-02\n-1.65860744735846166e-01\n-8.84648737958609044e-02\n1.73136638547277760e-01\n9.94041350166433718e-02\n-2.27739980029942168e-01\n9.92888996943426180e-03\n2.57981314054908262e-01\n-3.31215706396612131e-01\n2.43523235975119157e-01\n-1.26668646459475398e-01\n5.02013274177564722e-02\n-1.57083876788943790e-02\n3.95453545981291898e-03\n-8.08548577476888328e-04\n0.0\n1.17611933794959885e-03\n4.55509060903128930e-03\n1.07332463500643318e-02\n2.00053514370105816e-02\n3.21708328984762482e-02\n4.62157480985321278e-02\n5.99569953032244585e-02\n6.98231934262709270e-02\n7.10666642654751851e-02\n5.87838317898932081e-02\n3.00317743744427032e-02\n-1.31227325807173889e-02\n-6.07293590092733218e-02\n-9.46088919692034541e-02\n-9.35696911858640290e-02\n-4.56847974006530377e-02\n3.61951700888310107e-02\n1.07666256698080109e-01\n1.10940083872615558e-01\n2.23536477764943696e-02\n-1.00507049443022051e-01\n-1.35846786368932465e-01\n-1.62287846279706716e-02\n1.42403711677722727e-01\n1.14823089525583635e-01\n-1.05370392095081783e-01\n-1.65777416106515613e-01\n1.02664278042196300e-01\n1.79459513728649184e-01\n-1.86341232079440700e-01\n-8.48040265943703492e-02\n3.02150208214404248e-01\n-3.13662675869485652e-01\n2.06223314655064660e-01\n-9.91270864490526593e-02\n3.69077331026476801e-02\n-1.09593488206117147e-02\n2.63629760845790354e-03\n1.61209789137944197e-02\n2.79223545464384673e-02\n3.58706115728585559e-02\n4.16049955463427892e-02\n4.48146993559233597e-02\n4.44150475583689405e-02\n3.88847188517019715e-02\n2.66860461657941229e-02\n6.95997346414465971e-03\n-1.94742409063987758e-02\n-4.90012792782457129e-02\n-7.44965543102585753e-02\n-8.59119423427723572e-02\n-7.31802329654171191e-02\n-3.18407421080335734e-02\n3.00614284955030113e-02\n8.81763158024572724e-02\n1.07758318811531112e-01\n6.36347024425948093e-02\n-3.19776365210303129e-02\n-1.16651310587758086e-01\n-1.09883456860953771e-01\n7.71331065219552081e-03\n1.33715190438866288e-01\n1.10917076781571824e-01\n-6.95643583027919371e-02\n-1.68351007396129460e-01\n8.72205883066760890e-03\n1.95223015923455034e-01\n-6.44867175132337895e-03\n-2.23735494930594636e-01\n1.15274756033055814e-01\n1.70164754830104320e-01\n-3.24325575408105915e-01\n2.85950653526120535e-01\n-1.70492485103115987e-01\n7.62432447059648577e-02\n-2.67770970090078289e-02\n7.56634099687841961e-03\n0.0\n1.08475178627312290e-03\n4.20122560300455195e-03\n9.90274211974405925e-03\n1.84775322017055356e-02\n2.97870940469749275e-02\n4.29944799519934584e-02\n5.62514732322700883e-02\n6.64820057007718263e-02\n6.94967455836370401e-02\n6.07503823983882099e-02\n3.70095991134786681e-02\n-1.10927642285619707e-03\n-4.64692933594623644e-02\n-8.43451445265817751e-02\n-9.54529057593206665e-02\n-6.49212253800832695e-02\n4.37541033882023894e-03\n8.19404551728527414e-02\n1.16404809237778031e-01\n6.80532485735196452e-02\n-4.51119984031038632e-02\n-1.31646085700083126e-01\n-9.06143817188241607e-02\n6.35750920889157495e-02\n1.55667836942966570e-01\n3.25477383826432501e-02\n-1.61066572982773326e-01\n-9.14144529972979597e-02\n1.71655580528558616e-01\n9.18027957551550977e-02\n-2.26866918544668755e-01\n2.74628870050529737e-02\n2.38724189914773094e-01\n-3.27144120282023165e-01\n2.52469347786865805e-01\n-1.37974452037691264e-01\n5.77243576256484051e-02\n-1.91905820088530896e-02\n1.54970525173055915e-02\n2.68416823275364515e-02\n3.44953094198053797e-02\n4.00716146090840178e-02\n4.33397202172596599e-02\n4.33511280005886984e-02\n3.87417544438599729e-02\n2.80833094589147993e-02\n1.04605077875362003e-02\n-1.36853720646802086e-02\n-4.15732112470156706e-02\n-6.73488144858946647e-02\n-8.23027703532260291e-02\n-7.69064854948816462e-02\n-4.51898671388343207e-02\n9.28299620421187306e-03\n6.88271393458771974e-02\n1.03638109025687597e-01\n8.51763023183509799e-02\n9.40575700560844497e-03\n-8.42699034200021097e-02\n-1.23209930555987640e-01\n-5.60597412661771252e-02\n7.71582260037156076e-02\n1.41980332948012017e-01\n3.80354207321722260e-02\n-1.33125690479760195e-01\n-1.22921584322987207e-01\n9.85319390305152976e-02\n1.65033369197373908e-01\n-1.04343726535650910e-01\n-1.71250389328398950e-01\n1.91728252401407645e-01\n6.42527852535432487e-02\n-2.86841905976176481e-01\n3.14592424202381871e-01\n-2.16866871269568551e-01\n1.09549398178175147e-01\n-4.30806355181810249e-02\n0.0\n1.00435653632470565e-03\n3.88985613884014958e-03\n9.17153431746180192e-03\n1.71297072401901569e-02\n2.76743941515705597e-02\n4.01118855606559799e-02\n5.28691625232696402e-02\n6.32853815216963128e-02\n6.76593056179930347e-02\n6.18104168023716413e-02\n4.23961122375210858e-02\n9.01607760482197630e-03\n-3.33781150056050024e-02\n-7.30435848978471525e-02\n-9.29838047685378755e-02\n-7.73235476946233652e-02\n-2.22495083865611315e-02\n5.33454488679411531e-02\n1.07535145222909495e-01\n9.54810666188726509e-02\n7.92563657218189541e-03\n-9.86911162905615841e-02\n-1.24902936806019910e-01\n-2.08210977467814320e-02\n1.22152024382660790e-01\n1.23327684783286831e-01\n-5.54774201928569660e-02\n-1.69026649123581063e-01\n3.70267640235221601e-03\n1.93198849415897433e-01\n-1.19089292758060208e-02\n-2.17965065574173916e-01\n1.27003786988633738e-01\n1.49292585411040235e-01\n-3.14292291469471741e-01\n2.91244748123196950e-01\n-1.81971577699162113e-01\n8.55448559127012648e-02\n1.49619377056359956e-02\n2.59148362858420619e-02\n3.33153559193888407e-02\n3.87540384184517639e-02\n4.20665092328848036e-02\n4.24189213444285118e-02\n3.85822559753384933e-02\n2.92296932141593510e-02\n1.34204668812052865e-02\n-8.68380090474062810e-03\n-3.49550312523341095e-02\n-6.05793553502593646e-02\n-7.80340319802328569e-02\n-7.84892718069152839e-02\n-5.51908233630577644e-02\n-8.51815400933576133e-03\n4.92809798731155824e-02\n9.36592427409058820e-02\n9.61643403909287070e-02\n4.26593469031734188e-02\n-4.66481696128962856e-02\n-1.14018187323275705e-01\n-9.65738341449041415e-02\n1.20097329456935898e-02\n1.22894511955562613e-01\n1.09314326008346896e-01\n-4.32028159526120434e-02\n-1.56050301766667593e-01\n-4.48522238525472655e-02\n1.57128184072925892e-01\n9.33977601553197812e-02\n-1.71312737741873139e-01\n-8.42529389248773825e-02\n2.26438046107797580e-01\n-4.39007160633693855e-02\n-2.21009319066580168e-01\n3.23883554760865056e-01\n-2.61886004932835037e-01\n1.49923751433575420e-01\n0.0\n9.40181837301963226e-04\n3.64130859827719493e-03\n8.58779284459916005e-03\n1.60533257953134195e-02\n2.59858256672885479e-02\n3.78044363911822362e-02\n5.01544489373462465e-02\n6.07083599883139272e-02\n6.61670452452074315e-02\n6.26763524161541852e-02\n4.68761481803067204e-02\n1.76541291482790359e-02\n-2.17049129918955620e-02\n-6.19128440598866320e-02\n-8.82181107798184483e-02\n-8.48236350595485689e-02\n-4.36362715879164698e-02\n2.54996638796547714e-02\n9.04144818571107622e-02\n1.07475148326326014e-01\n5.09397488812775232e-02\n-5.34656546879523561e-02\n-1.24906849315978868e-01\n-8.40483579012536453e-02\n5.29359122400095417e-02\n1.44583371709182840e-01\n5.74769338392148790e-02\n-1.24652501510218644e-01\n-1.30857501067784293e-01\n9.32556214268044775e-02\n1.66182643372418504e-01\n-1.06834634780423904e-01\n-1.66102298003450388e-01\n1.98130855192808902e-01\n4.80900174816513842e-02\n-2.78343745910407225e-01\n3.21338189406429997e-01\n-2.31433540056194209e-01\n1.47312799404808025e-02\n2.55153253174329776e-02\n3.28117600671928161e-02\n3.82157775166883443e-02\n4.16180435262358192e-02\n4.22715957426610389e-02\n3.90478163668811565e-02\n3.06945021940744946e-02\n1.62504822586707655e-02\n-4.33397384479512066e-03\n-2.94267286511969012e-02\n-5.50163974343389622e-02\n-7.45289658129185822e-02\n-7.97748312828453487e-02\n-6.35758120161877410e-02\n-2.40375716102287397e-02\n3.08475515263642516e-02\n8.12873315522812528e-02\n1.00476520438081460e-01\n6.83512900993978600e-02\n-9.61943371612845009e-03\n-9.17919315487271681e-02\n-1.15781208067524982e-01\n-4.58286370433240026e-02\n7.59048588593043139e-02\n1.35234369653603054e-01\n4.83398251782711022e-02\n-1.10405362248286801e-01\n-1.36947951152888742e-01\n4.15055467219591911e-02\n1.73861046573209832e-01\n3.79548029696558141e-03\n-1.97027346237981293e-01\n1.26459887227472912e-02\n2.21614781291333718e-01\n-1.35907819143364528e-01\n-1.46482296603197282e-01\n3.27192427615503656e-01\n-3.14918301802957323e-01\n0.0\n9.07509885144855335e-04\n3.51477067168463018e-03\n8.29142061852831957e-03\n1.55118075740375005e-02\n2.51546563862711167e-02\n3.67213341684144920e-02\n4.90118009132479229e-02\n5.99316381301078227e-02\n6.64592733510687012e-02\n6.49579384759420564e-02\n5.20294090150438121e-02\n2.60070917032512346e-02\n-1.11031706789389163e-02\n-5.19329533454829517e-02\n-8.36054943958266517e-02\n-9.07084212294566039e-02\n-6.22421435218330557e-02\n-1.05217555439913145e-03\n6.94852482379940822e-02\n1.09668836893722366e-01\n8.43799185027986204e-02\n-5.10737222026594242e-03\n-1.02236737242515641e-01\n-1.21185638259745224e-01\n-2.36122589231124100e-02\n1.11989974550465027e-01\n1.31181105489493077e-01\n-1.95039289740608877e-02\n-1.61418098845563324e-01\n-6.57737604089313060e-02\n1.57098659869439050e-01\n1.09939107772006828e-01\n-1.74602862230081646e-01\n-9.84000410012086935e-02\n2.39591821211097233e-01\n-3.44836839861751565e-02\n-2.60235582052517345e-01\n3.79878738419979711e-01\n1.50408439374510542e-02\n2.60515058883795496e-02\n3.35111444612749415e-02\n3.90772739877632558e-02\n4.26901918549833226e-02\n4.36609688579228036e-02\n4.09201675002549004e-02\n3.32496454341785694e-02\n1.96486899119833365e-02\n-1.13126318704098567e-04\n-2.47910382432886822e-02\n-5.09808515258888123e-02\n-7.28149010646697292e-02\n-8.25680836505294224e-02\n-7.27066229060386038e-02\n-3.95231121350164347e-02\n1.24675902463454273e-02\n6.76440688486297376e-02\n1.01368543976071313e-01\n8.99320547654022667e-02\n2.71855406807661112e-02\n-6.08358914562133618e-02\n-1.18665525393377255e-01\n-9.34134929309817091e-02\n1.40574161210671456e-02\n1.22079086997501335e-01\n1.18072120192203103e-01\n-2.02715740893725412e-02\n-1.50955008421726128e-01\n-9.19560274778459114e-02\n1.12676277247039824e-01\n1.59275349633633378e-01\n-7.47473682700508235e-02\n-1.94701695889117898e-01\n8.87579598322123797e-02\n2.08368369615086951e-01\n-1.95562077930975464e-01\n-1.29183701524310884e-01\n4.10538185641181108e-01\n0.0\n9.00957356880068005e-04\n3.48939283883955556e-03\n8.23360317215479122e-03\n1.54160738003265609e-02\n2.50445723465347395e-02\n3.66860953172644666e-02\n4.92577529099312017e-02\n6.08366114697991012e-02\n6.85983588311527837e-02\n6.90451603987871088e-02\n5.87030961739883617e-02\n3.54038622863941527e-02\n4.73900888319451146e-05\n-4.16655447945606938e-02\n-7.85673144303371540e-02\n-9.58257704936018029e-02\n-8.02976538052927180e-02\n-2.89199695026436943e-02\n4.33587208236853386e-02\n1.02744402439196247e-01\n1.09653803056344978e-01\n4.56946442533958455e-02\n-5.97058023160496332e-02\n-1.30598353160998215e-01\n-9.46960567709820705e-02\n3.81750341851915670e-02\n1.46831016568502809e-01\n9.62994653995103284e-02\n-8.50744843601265871e-02\n-1.69840799863330311e-01\n-3.17359641106633276e-03\n1.92077386250885801e-01\n6.05680600714939010e-02\n-2.14297685484377554e-01\n-6.27820032132900413e-02\n2.73363900828664685e-01\n-3.27182063035901527e-02\n-4.02848840693344812e-01\n1.56594911889372281e-02\n2.71230343599164411e-02\n3.49000525495374650e-02\n4.07470179424925180e-02\n4.46573759292926212e-02\n4.59933565946263334e-02\n4.37327985160455429e-02\n3.66794102632653149e-02\n2.37870427548776582e-02\n4.65309944224240671e-03\n-1.98361654909368149e-02\n-4.68387183300393722e-02\n-7.11568696977086523e-02\n-8.55534233344807105e-02\n-8.22839234088413168e-02\n-5.61091351181425141e-02\n-8.34984069647275000e-03\n4.96299018923142821e-02\n9.63452397234433738e-02\n1.06550950131571523e-01\n6.47775414726520088e-02\n-1.87636641974541982e-02\n-1.01558577498495756e-01\n-1.25080295511873218e-01\n-5.64429335400827778e-02\n6.81571148547445715e-02\n1.45513389121249948e-01\n8.52314717733115984e-02\n-7.72786813261075317e-02\n-1.66775740835965136e-01\n-4.65848445737210293e-02\n1.57387133484356179e-01\n1.41273919507613033e-01\n-1.20789162598086947e-01\n-1.98746385057258529e-01\n1.15674023051487718e-01\n2.42514307576485955e-01\n-1.84678283199941951e-01\n-3.63697760392433123e-01\n0.0\n8.97420504572415218e-04\n3.47569466875402100e-03\n8.20339926529678291e-03\n1.53723699744831143e-02\n2.50202402483043450e-02\n3.67801325615257774e-02\n4.96870479996149444e-02\n6.19924470870546335e-02\n7.10787566402707877e-02\n7.36105427482439817e-02\n6.60838740266359720e-02\n4.58971619494294575e-02\n1.29105248395314232e-02\n-2.88539812252788935e-02\n-7.01620410966165148e-02\n-9.73512787365142379e-02\n-9.61021782648316530e-02\n-5.83880915064663997e-02\n9.38623269053137817e-03\n8.19265387097800613e-02\n1.20750705113289961e-01\n9.36866319355803140e-02\n2.25153626838313706e-03\n-1.02321537629001452e-01\n-1.39105282554930765e-01\n-5.97058268848700141e-02\n8.64574420597046256e-02\n1.61044300692381404e-01\n6.20108401426732667e-02\n-1.26974733936409956e-01\n-1.70143130106732904e-01\n3.04950120630328343e-02\n2.13126853068884875e-01\n5.77291309196020647e-02\n-2.35667620362828650e-01\n-1.22437499379100062e-01\n2.95137235114366681e-01\n3.05300049507906568e-01\n1.63537786746647262e-02\n2.83255755602557259e-02\n3.64588583096479915e-02\n4.26213890831845382e-02\n4.68667918326980404e-02\n4.86160888561484178e-02\n4.69038636046271509e-02\n4.05672965334549149e-02\n2.85279498143965228e-02\n1.02228990781848411e-02\n-1.38174066256504108e-02\n-4.13366454459592678e-02\n-6.78870841536389491e-02\n-8.68959248172347515e-02\n-9.07089383908612490e-02\n-7.29415020707492867e-02\n-3.20011335092842686e-02\n2.52405211481410291e-02\n8.17499905944473054e-02\n1.13378226209715147e-01\n9.84916367369041701e-02\n3.25188486450999209e-02\n-5.99519891366701099e-02\n-1.27457009522538356e-01\n-1.17421908543368356e-01\n-1.90232938491941665e-02\n1.07075805007918190e-01\n1.53538340826587461e-01\n5.65261447921518861e-02\n-1.12851252403984942e-01\n-1.74431501762896568e-01\n-2.60970064464418651e-02\n1.79036331693184586e-01\n1.53637669833891016e-01\n-1.18675435499097509e-01\n-2.44281759570508683e-01\n3.87553173134038004e-02\n3.49744904867050066e-01\n2.39978354531682592e-01\n0.0\n8.89259811747838535e-04\n3.44408844135092118e-03\n8.13097999495085259e-03\n1.52498713431990021e-02\n2.48688324100746483e-02\n3.66908999061339239e-02\n4.98783109762080262e-02\n6.28755941237611887e-02\n7.33056271781196422e-02\n7.80514445294912124e-02\n7.36633022795620818e-02\n5.72137296723880737e-02\n2.76199830106224412e-02\n-1.27749745598343539e-02\n-5.69222694180016378e-02\n-9.30196300228738060e-02\n-1.06775794445204852e-01\n-8.66072843324813824e-02\n-3.09799463222359579e-02\n4.51686866702822112e-02\n1.10122103750666583e-01\n1.26223816576146258e-01\n7.19754921620709420e-02\n-3.44717558082567321e-02\n-1.30190846976486752e-01\n-1.38909498838772960e-01\n-3.35286297364045804e-02\n1.15396031328998783e-01\n1.70076753498981936e-01\n5.08264884336948677e-02\n-1.43385738477605829e-01\n-1.87776326413952893e-01\n1.13763348750209048e-02\n2.29240533707714744e-01\n1.45646254160257060e-01\n-1.88481179644779367e-01\n-3.50826535497126057e-01\n-1.77358089089057952e-01\n1.71139516131762794e-02\n2.96422337122966666e-02\n3.81659952059977686e-02\n4.46760329678518239e-02\n4.92941280724849273e-02\n5.15096321187511613e-02\n5.04262512656548853e-02\n4.49303863917538751e-02\n3.39301320551409769e-02\n1.67216409556976212e-02\n-6.50825220063475963e-03\n-3.41022054876284689e-02\n-6.24354199356757789e-02\n-8.57825207361505443e-02\n-9.69213219078748495e-02\n-8.88177032685786433e-02\n-5.74644051341540452e-02\n-5.34103413257666030e-03\n5.59187058220753097e-02\n1.05863338225446857e-01\n1.20749634614478643e-01\n8.46908390096576813e-02\n2.98879094274321147e-03\n-9.05403427963083346e-02\n-1.42420072947183285e-01\n-1.08908789362167899e-01\n5.42994777165310954e-03\n1.29754718315390039e-01\n1.61421618066727862e-01\n5.11938287456927196e-02\n-1.23626213616457689e-01\n-1.92582646698145343e-01\n-5.45157125408757409e-02\n1.71073189844030082e-01\n2.19661500693290740e-01\n-1.21333721706796717e-02\n-2.89223117258015416e-01\n-3.11988602267645909e-01\n-1.23485890923500402e-01\n0.0\n8.76286866860271382e-04\n3.39384444185010688e-03\n8.01458117150215081e-03\n1.50450179133714921e-02\n2.45836346465583278e-02\n3.64059929638692464e-02\n4.98089643336562804e-02\n6.34462494639797120e-02\n7.52126881497585664e-02\n8.22666506050089702e-02\n8.13058608657841603e-02\n6.92104347586021823e-02\n4.41061610919825237e-02\n6.74843073252242610e-03\n-3.81291424461870990e-02\n-8.11718538597486355e-02\n-1.09365851974214820e-01\n-1.09390692515121624e-01\n-7.33937076682854850e-02\n-5.68532053347044295e-03\n7.30888575309754929e-02\n1.28925537952301467e-01\n1.27788303432649769e-01\n5.69664164896843683e-02\n-5.64432423126860622e-02\n-1.47094957057954306e-01\n-1.45098741124441599e-01\n-3.18697682969608445e-02\n1.22185924607153704e-01\n1.88094921532981962e-01\n8.42317883385864941e-02\n-1.20262548501587269e-01\n-2.29212707882540528e-01\n-1.02782138834722966e-01\n1.67160800044349522e-01\n3.27124658891246645e-01\n2.51265263151819074e-01\n8.10405060917622905e-02\n1.79795927422792511e-02\n3.11415681290242996e-02\n4.01099482043140373e-02\n4.70155293915441239e-02\n5.20576563136286585e-02\n5.48041934438027109e-02\n5.44410244974923435e-02\n4.99210318486778409e-02\n4.01612325884427440e-02\n2.43436593118895039e-02\n2.33706853232667003e-03\n-2.47926087192833905e-02\n-5.42894973177577150e-02\n-8.14343501875813697e-02\n-9.97808237871465054e-02\n-1.02215984464888096e-01\n-8.30334472558205278e-02\n-4.08456151058335312e-02\n1.84552335421933611e-02\n8.02006480594402160e-02\n1.22853213602891226e-01\n1.24746296154960773e-01\n7.50558428623937790e-02\n-1.50655014084274015e-02\n-1.08680481948483412e-01\n-1.54333404503755961e-01\n-1.13852515281867753e-01\n4.92525405666519294e-03\n1.35112291733324313e-01\n1.80961739847278147e-01\n8.81708767961740386e-02\n-9.25176184127817353e-02\n-2.17139824112630497e-01\n-1.59180509416893046e-01\n6.13967428228379339e-02\n2.72259341014834177e-01\n3.09647839867119246e-01\n1.85285098393965508e-01\n5.01057541795328076e-02\n0.0\n8.58057587760563162e-04\n3.32324274748357039e-03\n7.85009840153155433e-03\n1.47498456032333098e-02\n2.41506948441135329e-02\n3.59021612386293959e-02\n4.94412391799770173e-02\n6.36443432825331834e-02\n7.67073762099680229e-02\n8.61209794306897064e-02\n8.88312065733403156e-02\n8.16834879145596909e-02\n6.22185043519829922e-02\n2.97976173789975020e-02\n-1.31339763220717238e-02\n-6.00735267464404532e-02\n-1.00434748923401970e-01\n-1.21206816908438209e-01\n-1.10751417544815753e-01\n-6.43577837920563389e-02\n1.01855171971083243e-02\n9.01711979588557533e-02\n1.42345599251460064e-01\n1.35903974939845545e-01\n6.11452273638291299e-02\n-5.56447479517686305e-02\n-1.54361992933309072e-01\n-1.68811570393263166e-01\n-7.21772792871016033e-02\n8.85943785183849475e-02\n2.05467355676060004e-01\n1.79472407482246854e-01\n5.76550627274894506e-03\n-2.04853965324373805e-01\n-3.09228767167256835e-01\n-2.56590043457460559e-01\n-1.25817606164153467e-01\n-2.91464574125856572e-02\n1.90005518073997279e-02\n3.29099211022609930e-02\n4.24022562574659992e-02\n4.97721915810897322e-02\n5.53083833186477150e-02\n5.86689978126513356e-02\n5.91369621514553773e-02\n5.57517127010430102e-02\n4.74665356800650640e-02\n3.33849625960769697e-02\n1.30981648390457450e-02\n-1.28883604953461857e-02\n-4.27012395679584114e-02\n-7.27501209538363031e-02\n-9.76885609327720755e-02\n-1.10938010292910783e-01\n-1.05996044396689845e-01\n-7.85744970471910359e-02\n-2.92496855665391152e-02\n3.42147814553768956e-02\n9.62218368638554922e-02\n1.35872294305256214e-01\n1.33514894505344955e-01\n8.03732453601903457e-02\n-1.23431313575177431e-02\n-1.10721989421033923e-01\n-1.67465335139831833e-01\n-1.44085777389355657e-01\n-3.77198440714937092e-02\n1.04508793400507075e-01\n2.00667095268703327e-01\n1.80348980600308850e-01\n3.72444086106387615e-02\n-1.54262727055200999e-01\n-2.84020606725590541e-01\n-2.86854528762849226e-01\n-1.89986208247455990e-01\n-7.88724550008287340e-02\n-1.59167985091629889e-02\n0.0\n8.33311786962632637e-04\n3.22740267310461879e-03\n7.62595293132764963e-03\n1.43422975844416135e-02\n2.35328070161969390e-02\n3.51210751728898360e-02\n4.86878082189699038e-02\n6.33432243101581527e-02\n7.76110635546638228e-02\n8.93710582081533311e-02\n9.59253744951160253e-02\n9.42660048993621824e-02\n8.16114529032177238e-02\n5.62357361049036844e-02\n1.85156048060675094e-02\n-2.80301256506794161e-02\n-7.61171962801159424e-02\n-1.15039240786442981e-01\n-1.32513386040584075e-01\n-1.18247575809173361e-01\n-6.87387680650181077e-02\n8.21327222176628652e-03\n9.17472214731072516e-02\n1.51581046480547404e-01\n1.58279501265110395e-01\n9.80428652259894562e-02\n-1.43907857725710936e-02\n-1.33788705017439974e-01\n-2.00019049663527404e-01\n-1.68563624509900922e-01\n-4.06739732102053969e-02\n1.28802797399301810e-01\n2.58643542676019744e-01\n2.91131179795010353e-01\n2.28888957602518872e-01\n1.26950048155656608e-01\n4.56553613204999029e-02\n8.13535687575428837e-03\n2.02553408806668139e-02\n3.50832795299418493e-02\n4.52186217701193646e-02\n5.31545953094936588e-02\n5.92847632852683895e-02\n6.33721041811368679e-02\n6.48144078144913122e-02\n6.27618915198265154e-02\n5.62381146616447516e-02\n4.43148819045092041e-02\n2.63648245172944488e-02\n2.39356133143128020e-03\n-2.65779256755360321e-02\n-5.81544854784085408e-02\n-8.83588283122158646e-02\n-1.11749762481027859e-01\n-1.22057460146484872e-01\n-1.13470984973374434e-01\n-8.25477861202595642e-02\n-3.04233440864448423e-02\n3.53765720850076487e-02\n1.00544265545267117e-01\n1.46084519613475045e-01\n1.53447076624807360e-01\n1.12027680733048376e-01\n2.66409554323631566e-02\n-7.89147800637879510e-02\n-1.66100630144495498e-01\n-1.95035075305037442e-01\n-1.43326953494305964e-01\n-2.12439037576649045e-02\n1.27472620776184153e-01\n2.44044120919497204e-01\n2.84969729724097454e-01\n2.45772873155989890e-01\n1.60623156259015964e-01\n7.68743950748669996e-02\n2.43616793086752076e-02\n3.87596369065028746e-03\n0.0\n7.99817042360472961e-04\n3.09767808507498393e-03\n7.32164987544802609e-03\n1.37834341392776769e-02\n2.26646475955427189e-02\n3.39612697718398027e-02\n4.73987331759539096e-02\n6.23287151174649889e-02\n7.76257287745914376e-02\n9.16129820704120884e-02\n1.02060192892859836e-01\n1.06307077232764682e-01\n1.01568371802859977e-01\n8.54601916224931174e-02\n5.67429946226951157e-02\n1.61964511294544547e-02\n-3.25704358927273729e-02\n-8.26915479935223657e-02\n-1.24395862000567153e-01\n-1.46501309629427756e-01\n-1.39178996900970547e-01\n-9.76449365773834344e-02\n-2.57894264400005159e-02\n6.18409789548013261e-02\n1.41447236608957388e-01\n1.85792176351637195e-01\n1.73693072487402095e-01\n1.00082100904826471e-01\n-1.82786824562151604e-02\n-1.45952097836780176e-01\n-2.41797645763605740e-01\n-2.76902840065397005e-01\n-2.47991042699070768e-01\n-1.77615389840839522e-01\n-1.00087050634409536e-01\n-4.21956942725640952e-02\n-1.19403082601240804e-02\n-1.71209994717079180e-03\n2.18905343303625183e-02\n3.79155176650186332e-02\n4.88870275753567271e-02\n5.75519158765571276e-02\n6.44312211481338215e-02\n6.94119298860016165e-02\n7.20292426312166417e-02\n7.15745349509618878e-02\n6.71848749831965575e-02\n5.79619634713522403e-02\n4.31433124220501341e-02\n2.23346990302644328e-02\n-4.20391529945611953e-03\n-3.52510863499231678e-02\n-6.83590822812138871e-02\n-9.97301438666926554e-02\n-1.24359230186757999e-01\n-1.36570164012394357e-01\n-1.31026188826207896e-01\n-1.04183112325033286e-01\n-5.59693529890064184e-02\n8.74918517339441822e-03\n7.95548647756487426e-02\n1.41388935540154359e-01\n1.77410306611235857e-01\n1.73609669800993432e-01\n1.24090313424803617e-01\n3.50748972379261725e-02\n-7.45812154035947056e-02\n-1.77780096720875580e-01\n-2.47883364568404568e-01\n-2.68621557315435633e-01\n-2.40532590086342479e-01\n-1.80126418236131708e-01\n-1.11602398615395892e-01\n-5.55087678059685841e-02\n-2.09284694274586951e-02\n-5.34466506281474230e-03\n-6.96186479843664699e-04\n0.0\n7.53476327387986831e-04\n2.91820126773520037e-03\n6.89959165184771996e-03\n1.30019139732946050e-02\n2.14268680378135526e-02\n3.22382333062971455e-02\n4.53031670516542417e-02\n6.02169314608714187e-02\n7.62207512448253022e-02\n9.21285079990657174e-02\n1.06285716182797918e-01\n1.16592044493141908e-01\n1.20623795317560414e-01\n1.15891137107226580e-01\n1.00251374028237528e-01\n7.24691692659187869e-02\n3.28649591996555274e-02\n-1.60726533400559861e-02\n-6.93025331024485075e-02\n-1.19311033130199598e-01\n-1.56877414748608890e-01\n-1.72633566560243645e-01\n-1.59299474357473214e-01\n-1.14159118963096801e-01\n-4.10279349287834688e-02\n4.91897049564519045e-02\n1.40069743184132040e-01\n2.13461518213070939e-01\n2.54650041915003289e-01\n2.57120522035515553e-01\n2.24839764207651394e-01\n1.70691232038919311e-01\n1.11403391641649183e-01\n6.12066488017736082e-02\n2.73140672989430518e-02\n9.31748474304050674e-03\n2.16624893617221479e-03\n2.58094503374025296e-04\n2.42331302568802344e-02\n4.19730128313512071e-02\n5.41390675501142032e-02\n6.38316984157355771e-02\n7.17369052319240252e-02\n7.78942289931950638e-02\n8.20074594458198441e-02\n8.35497661000096786e-02\n8.18292098414137997e-02\n7.60606816127209623e-02\n6.54645272837009601e-02\n4.94025207678238792e-02\n2.75539529880159950e-02\n1.24230061707039673e-04\n-3.19358060893319973e-02\n-6.67390785100610284e-02\n-1.01357263221103625e-01\n-1.31872040223367792e-01\n-1.53653466290850360e-01\n-1.61914445198308415e-01\n-1.52538263470539920e-01\n-1.23092713325802891e-01\n-7.38407232970631350e-02\n-8.46223084206208787e-03\n6.58396748351471189e-02\n1.39112860704884156e-01\n2.00375353342245183e-01\n2.40023316874859227e-01\n2.52318154543116013e-01\n2.37116013285213034e-01\n2.00075444693267629e-01\n1.51037231184736054e-01\n1.01007947290952721e-01\n5.88696912581817625e-02\n2.91644117859236503e-02\n1.18201235579015081e-02\n3.68206834835230071e-03\n7.85064021834961062e-04\n8.60658538557151876e-05\n0.0\n6.85448683258343201e-04\n2.65473133493936619e-03\n6.27867425384466202e-03\n1.18440096642626318e-02\n1.95628915659333477e-02\n2.95568990414101264e-02\n4.18246536260298146e-02\n5.61970641232073798e-02\n7.22843695961896682e-02\n8.94212606945922195e-02\n1.06619563822501096e-01\n1.22541706240081288e-01\n1.35511638291465925e-01\n1.43581837286624409e-01\n1.44673769558747667e-01\n1.36802790620750403e-01\n1.18385181440271409e-01\n8.86041608841312417e-02\n4.77847563048637916e-02\n-2.30085888703848848e-03\n-5.82968326410810908e-02\n-1.15396757906806452e-01\n-1.67817351268500975e-01\n-2.09614934265698355e-01\n-2.35744530205637071e-01\n-2.43148103731712639e-01\n-2.31575652391645015e-01\n-2.03840290029761062e-01\n-1.65322555319911385e-01\n-1.22764865127904022e-01\n-8.26682229581873068e-02\n-4.98017725036202577e-02\n-2.63404815081191811e-02\n-1.19099225327340547e-02\n-4.42546039724486025e-03\n-1.26845246666026468e-03\n-2.49572225865241429e-04\n-2.53077716435780076e-05\n2.82679830231229133e-02\n4.89615828235433551e-02\n6.31778049539792885e-02\n7.46047220505315078e-02\n8.41737594336187805e-02\n9.21304819911563100e-02\n9.83991490575030631e-02\n1.02697376031745669e-01\n1.04589260312181492e-01\n1.03524572656446934e-01\n9.88818169604530894e-02\n9.00239925560381293e-02\n7.63717437890791689e-02\n5.74951180570581061e-02\n3.32209886510506022e-02\n3.74789951261025704e-03\n-3.02461521561078715e-02\n-6.75238144382632050e-02\n-1.06262032040791418e-01\n-1.44106048577411577e-01\n-1.78325390628444574e-01\n-2.06079853051134160e-01\n-2.24780859845833986e-01\n-2.32504200584397080e-01\n-2.28380254822532325e-01\n-2.12867457620581513e-01\n-1.87815777305315512e-01\n-1.56258697940215546e-01\n-1.21935524059510372e-01\n-8.86281002337199197e-02\n-5.94703673649517248e-02\n-3.64215644295303037e-02\n-2.00584878461338989e-02\n-9.73927140203684205e-03\n-4.05649050782938905e-03\n-1.39241958194059987e-03\n-3.69554699163684379e-04\n-6.74596435919771488e-05\n-6.35696883059075729e-06\n0.0\n5.68996534648595468e-04\n2.20371410274374175e-03\n5.21369482419161649e-03\n9.84543071484315913e-03\n1.62995120831591449e-02\n2.47313828194660433e-02\n3.52433582270449963e-02\n4.78705222604279557e-02\n6.25620456867613667e-02\n7.91595478869978192e-02\n9.73747101543325499e-02\n1.16769209574383068e-01\n1.36741013455054267e-01\n1.56521945356909581e-01\n1.75191916234764322e-01\n1.91714941231145936e-01\n2.05000632199146909e-01\n2.13991924918564252e-01\n2.17775233079721575e-01\n2.15703280051887325e-01\n2.07514384415351860e-01\n1.93426475988948215e-01\n1.74181662171212837e-01\n1.51019948959782019e-01\n1.25570306332321302e-01\n9.96635714680045443e-02\n7.50920907874394472e-02\n5.33601277232484961e-02\n3.54797331101818075e-02\n2.18624641366416510e-02\n1.23355551062660478e-02\n6.27629623688185766e-03\n2.82206579172275887e-03\n1.09071310429051014e-03\n3.48023140715812901e-04\n8.59892245159351600e-05\n1.46315273039269861e-05\n1.28659770687665330e-06\n4.03727927043305845e-02\n6.99277282073466622e-02\n9.02675014836172435e-02\n1.06764263682856297e-01\n1.20941169349919178e-01\n1.33444555381126762e-01\n1.44574099040143400e-01\n1.54449040900187462e-01\n1.63076405662426815e-01\n1.70385239057799953e-01\n1.76247891906038345e-01\n1.80496889199700028e-01\n1.82941438264267620e-01\n1.83385652180726361e-01\n1.81649412796148380e-01\n1.77591872633167697e-01\n1.71136673686438395e-01\n1.62296993485478325e-01\n1.51197578960782036e-01\n1.38090155608352028e-01\n1.23358238677638635e-01\n1.07507697565371083e-01\n9.11406738885517376e-02\n7.49127314498252428e-02\n5.94762731854760057e-02\n4.54168020024553337e-02\n3.31916809542107394e-02\n2.30825945936352292e-02\n1.51719426775868676e-02\n9.34944161223639700e-03\n5.34873424248542145e-03\n2.80638895108096913e-03\n1.32969270608854369e-03\n5.57481860801737695e-04\n2.01134587449169525e-04\n5.99704346218124539e-05\n1.38583823893503376e-05\n2.20715617322219957e-06\n1.81780567979610514e-07\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n1.92296228181913637e-02\n3.33066837314932584e-02\n4.26980532870509730e-02\n4.90978906992029160e-02\n5.16707722203550504e-02\n4.84977532771168271e-02\n3.71792497098033803e-02\n1.57911072977321466e-02\n-1.55457904503789081e-02\n-5.26380508924737672e-02\n-8.55808567462892356e-02\n-9.92729012188578869e-02\n-7.83841113160658742e-02\n-1.78836705360222101e-02\n6.42234460082189290e-02\n1.22684026104344798e-01\n1.04571704843402113e-01\n-2.84395907453529597e-03\n-1.26696024980378324e-01\n-1.35325722681615912e-01\n2.14883625107592027e-02\n1.75452197975505791e-01\n7.62991960617101367e-02\n-1.78710858010510232e-01\n-1.11974246588549695e-01\n2.28614791268620859e-01\n2.69517170438992627e-02\n-2.95843084778061649e-01\n3.35612382524687836e-01\n-2.22689558582787689e-01\n1.03840242456106069e-01\n-3.64020532165198613e-02\n9.90425563579549854e-03\n-2.12385753714242455e-03\n3.60844405267784205e-04\n-4.84457942222548925e-05\n5.08613529820444096e-06\n-4.09272977624966648e-07\n2.43952796628567839e-08\n-1.01548234866318681e-09\n0.0\n1.53207183589857505e-03\n5.93368870562860362e-03\n1.39634001360953008e-02\n2.59150123110877748e-02\n4.12720630158234653e-02\n5.81811824191460561e-02\n7.29296222864153215e-02\n7.98066363879913337e-02\n7.19540357193568236e-02\n4.38681329319077634e-02\n-4.26141187609695941e-03\n-6.16093793018236829e-02\n-1.04741554068370601e-01\n-1.04112030837777425e-01\n-4.27409109972499354e-02\n5.87322652792297700e-02\n1.32712680317800341e-01\n1.01403537238645439e-01\n-3.84929813278604011e-02\n-1.57613801986351054e-01\n-8.93970805950522335e-02\n1.23930799360517610e-01\n1.64222281816483379e-01\n-1.02844105191431362e-01\n-1.94414007829319946e-01\n1.74250886017714796e-01\n1.27441062767785412e-01\n-3.30972425194132169e-01\n3.08024984650235589e-01\n-1.82925254376322621e-01\n7.87385774310291608e-02\n-2.58929108614052300e-02\n6.67537840086772707e-03\n-1.36588223290353902e-03\n2.22587496886450173e-04\n-2.87801523862112907e-05\n2.91948181034421179e-06\n-2.27610996871251364e-07\n1.31749262489557947e-08\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063810e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352916e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531968e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285966e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956301e-01\n-9.00446823974875715e-02\n-2.13087933045450539e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085616e-02\n-4.45406638611287910e-03\n8.71481626948623130e-04\n-1.36448789759018984e-04\n1.70142351255960155e-05\n-1.66955639677499944e-06\n1.26232523620632720e-07\n0.0\n1.39730333148040489e-03\n5.41173253242374988e-03\n1.27414229092096456e-02\n2.36854974619113111e-02\n3.78609482632567274e-02\n5.37600002366647386e-02\n6.82896468055729927e-02\n7.65831616951516692e-02\n7.25561685123445738e-02\n5.07591663463412071e-02\n9.79466642184515478e-03\n-4.33990806745253518e-02\n-9.08319919236046103e-02\n-1.06525406317272003e-01\n-6.92506274207928124e-02\n1.66789460567951936e-02\n1.05898391728545094e-01\n1.25841367501370371e-01\n3.48942341826923574e-02\n-1.06869331701593615e-01\n-1.46966956797026066e-01\n7.65998754182623654e-05\n1.70810616244707475e-01\n8.35867197994649008e-02\n-1.75438530799335773e-01\n-1.06188912172258010e-01\n2.28279873259203264e-01\n8.22984562964726440e-03\n-2.77031446563899664e-01\n3.34056273949237315e-01\n-2.33590748418417649e-01\n1.15267891447862356e-01\n-4.30812058585284818e-02\n1.26145945765560649e-02\n-2.94418042024718971e-03\n5.51921794079966417e-04\n-8.31546620365070739e-05\n1.00122590230247240e-05\n-9.51393116143519594e-07\n1.75385715931393252e-02\n3.03776970915015376e-02\n3.89894299482359263e-02\n4.50537831243430706e-02\n4.80480260970640796e-02\n4.65400382039625748e-02\n3.86255045510913997e-02\n2.25480495396555534e-02\n-2.27174361599731577e-03\n-3.38181129256455576e-02\n-6.60703944825653255e-02\n-8.85536648892607386e-02\n-8.83022665547772839e-02\n-5.55258773679043263e-02\n7.46609704613950768e-03\n7.83492811499661851e-02\n1.16648725092696581e-01\n8.43733130090655314e-02\n-1.70104229921502724e-02\n-1.20305094638933463e-01\n-1.22969970230769082e-01\n9.35905132161065842e-03\n1.50958694957981476e-01\n1.03915462896033192e-01\n-1.13821482581925815e-01\n-1.65617979165773477e-01\n1.02078086683384167e-01\n1.87205802845405528e-01\n-1.80482528572383699e-01\n-1.05887032567957909e-01\n3.16897122331238568e-01\n-3.11506306360865015e-01\n1.94908626118984407e-01\n-8.88419912097265368e-02\n3.11734890841644033e-02\n-8.65603665299736688e-03\n1.92915844115746846e-03\n-3.47110560421181821e-04\n5.03961499458315860e-05\n-5.86624629182482898e-06\n0.0\n1.27957098506975217e-03\n4.95575711546536977e-03\n1.16729154583850130e-02\n2.17298714768882420e-02\n3.48463920091736448e-02\n4.97890096443490138e-02\n6.39661460140269478e-02\n7.32162053940255408e-02\n7.21602998835774306e-02\n5.55765345258100868e-02\n2.10888036968650203e-02\n-2.71967000964093535e-02\n-7.57556405674296024e-02\n-1.02576258695723121e-01\n-8.55111455050161368e-02\n-1.85689543277507176e-02\n7.13685108836651233e-02\n1.24881736374402766e-01\n8.51840841711921509e-02\n-3.93941327754372891e-02\n-1.42330243850414068e-01\n-9.42257757616018904e-02\n8.54747418860706820e-02\n1.66546977431218629e-01\n-1.57040975956235541e-02\n-1.97467238889420221e-01\n1.88019344810344763e-03\n2.29365773330298756e-01\n-1.02939542299440981e-01\n-1.91533197606715944e-01\n3.33816802438668792e-01\n-2.79815352323984912e-01\n1.58802675311481817e-01\n-6.73083989685183126e-02\n2.22633667181181966e-02\n-5.87886221390903317e-03\n1.25374425752756914e-03\n-2.16874130348691297e-04\n3.03833333742785886e-05\n1.67998963750835978e-02\n2.90982740835370006e-02\n3.73653598546548546e-02\n4.32630585838588017e-02\n4.63845439450949540e-02\n4.54855374917430832e-02\n3.88656105452777484e-02\n2.48760515898725811e-02\n2.76248927537127605e-03\n-2.61461269955379494e-02\n-5.71751743192510584e-02\n-8.16723200652655079e-02\n-8.81468944866840853e-02\n-6.63517543122803949e-02\n-1.44275582363301430e-02\n5.34454003432048852e-02\n1.05157476235466965e-01\n1.02564527903231811e-01\n2.95638071990377213e-02\n-7.78829860920076944e-02\n-1.33783853273952702e-01\n-6.61391846995583316e-02\n8.51730529589458524e-02\n1.53220131351310157e-01\n1.78247327856140073e-02\n-1.65860741989501237e-01\n-8.84648720382304604e-02\n1.73136635706185482e-01\n9.94041329361161630e-02\n-2.27739976078847828e-01\n9.92889029935443632e-03\n2.57981308879215165e-01\n-3.31215700080027042e-01\n2.43523231417809655e-01\n-1.26668644112919671e-01\n5.02013264936435194e-02\n-1.57083873909682550e-02\n3.95453538754794807e-03\n-8.08548562734083152e-04\n1.34666690962410011e-04\n0.0\n1.17611906166026434e-03\n4.55508953896729789e-03\n1.07332438285228822e-02\n2.00053467364050795e-02\n3.21708253365260780e-02\n4.62157372273393832e-02\n5.99569811814080270e-02\n6.98231769433399069e-02\n7.10666474199532217e-02\n5.87838177354288241e-02\n3.00317669799846781e-02\n-1.31227298776084422e-02\n-6.07293450295668807e-02\n-9.46088697384335070e-02\n-9.35696687326471738e-02\n-4.56847857574447999e-02\n3.61951625315220515e-02\n1.07666231650705879e-01\n1.10940056786795638e-01\n2.23536406498771566e-02\n-1.00507026842144923e-01\n-1.35846752926131853e-01\n-1.62287777560515371e-02\n1.42403678670662365e-01\n1.14823058430529937e-01\n-1.05370369961936397e-01\n-1.65777371844132160e-01\n1.02664257732029904e-01\n1.79459462674550985e-01\n-1.86341188498935328e-01\n-8.48039931357369992e-02\n3.02150118325641981e-01\n-3.13662586773634844e-01\n2.06223257259918830e-01\n-9.91270591809416957e-02\n3.69077230263438749e-02\n-1.09593458441173165e-02\n2.63629689512987365e-03\n-5.17675444496189089e-04\n1.61209374870358822e-02\n2.79222827931878866e-02\n3.58705193878713566e-02\n4.16048885922065681e-02\n4.48145840586340605e-02\n4.44149330827570410e-02\n3.88846182229243484e-02\n2.66859763403515873e-02\n6.95995366523891913e-03\n-1.94741933599244001e-02\n-4.90011559733423210e-02\n-7.44963646197045193e-02\n-8.59117210222828664e-02\n-7.31800407330032848e-02\n-3.18406523132220218e-02\n3.00613607235880355e-02\n8.81760950239037361e-02\n1.07758037972797538e-01\n6.36345233681497591e-02\n-3.19775735608193584e-02\n-1.16651016614165395e-01\n-1.09883154320598961e-01\n7.71332418886702502e-03\n1.33714854110244030e-01\n1.10916750517349227e-01\n-6.95642214926034674e-02\n-1.68350539598181359e-01\n8.72210974068714055e-03\n1.95222473257456314e-01\n-6.44875674538877668e-03\n-2.23734817354206306e-01\n1.15274533452187702e-01\n1.70164078539891822e-01\n-3.24324474257526363e-01\n2.85949724959576712e-01\n-1.70491943553056080e-01\n7.62430057319903182e-02\n-2.67770138199764779e-02\n7.56631763630591890e-03\n-1.74273748973015103e-03\n0.0\n1.08472866986732966e-03\n4.20113607354989128e-03\n9.90253107239108532e-03\n1.84771383065313669e-02\n2.97864586903792417e-02\n4.29935618588681914e-02\n5.62502696762498325e-02\n6.64805784012085510e-02\n6.94952445661363022e-02\n6.07490546421599331e-02\n3.70087630892061564e-02\n-1.10930889153426334e-03\n-4.64683522115519401e-02\n-8.43433630378741667e-02\n-9.54508264796855993e-02\n-6.49197268450614623e-02\n4.37546569983272328e-03\n8.19388011415494999e-02\n1.16402262116073671e-01\n6.80515586196092648e-02\n-4.51112862409036100e-02\n-1.31643260958115182e-01\n-9.06120691083892316e-02\n6.35741020526872508e-02\n1.55664289648236226e-01\n3.25463641102482909e-02\n-1.61063149247042209e-01\n-9.14115289821620103e-02\n1.71651977948027890e-01\n9.17994047446599321e-02\n-2.26861409275659870e-01\n2.74638594581343536e-02\n2.38716071696721127e-01\n-3.27134240525033815e-01\n2.52462054073439635e-01\n-1.37970560479327958e-01\n5.77227538981982466e-02\n-1.91900543034443823e-02\n5.17285943548659224e-03\n1.54948924303344709e-02\n2.68379409471537038e-02\n3.44905006853227919e-02\n4.00660259639727123e-02\n4.33336684717347473e-02\n4.33450582649901259e-02\n3.87362978709470326e-02\n2.80792941738205737e-02\n1.04588931045118648e-02\n-1.36836741498973114e-02\n-4.15676477974131556e-02\n-6.73396073767898173e-02\n-8.22913156338471452e-02\n-7.68954998771298054e-02\n-4.51829669132268533e-02\n9.28252093122260667e-03\n6.88182256079050286e-02\n1.03623691578196550e-01\n8.51634588186301056e-02\n9.40276898898452160e-03\n-8.42593802288909705e-02\n-1.23192114084318169e-01\n-5.60492990378814865e-02\n7.71497525125222627e-02\n1.41959255542269208e-01\n3.80256724537959903e-02\n-1.33108715435193758e-01\n-1.22899047475528891e-01\n9.85225810155995613e-02\n1.65003365959437404e-01\n-1.04335022162908117e-01\n-1.71214258167725036e-01\n1.91702111778092488e-01\n6.42246289619039096e-02\n-2.86774850290459626e-01\n3.14525993028612838e-01\n-2.16823102916350596e-01\n1.09527859683731452e-01\n-4.30723086484427059e-02\n1.35968757537650465e-02\n0.0\n1.00366543577802125e-03\n3.88717951793228576e-03\n9.16522259483819844e-03\n1.71179141752906203e-02\n2.76553246844808420e-02\n4.00841991731902964e-02\n5.28325622330900815e-02\n6.32413484607580179e-02\n6.76118171610163299e-02\n6.17663175009425039e-02\n4.23646418926940452e-02\n9.00702077096289522e-03\n-3.33579170259328817e-02\n-7.29948333170512415e-02\n-9.29186332399056930e-02\n-7.72655671047376563e-02\n-2.22267377368589973e-02\n5.33153457946899390e-02\n1.07461634865776867e-01\n9.54064995030027979e-02\n7.90589248326649570e-03\n-9.86307093589698508e-02\n-1.24806278146718810e-01\n-2.07836426704460786e-02\n1.22076377212021220e-01\n1.23217331760482801e-01\n-5.54690034835936610e-02\n-1.68889463566036985e-01\n3.74920032541957741e-03\n1.93040263510168009e-01\n-1.19679426032632003e-02\n-2.17747158926445361e-01\n1.26964908243567653e-01\n1.49028088830641503e-01\n-3.13889843580912875e-01\n2.90905139072657748e-01\n-1.81769135805906784e-01\n8.54523784531054792e-02\n-3.17151916596968980e-02\n1.49215658979855292e-02\n2.58449102637980550e-02\n3.32254455488289052e-02\n3.86493765449762092e-02\n4.19526909006248741e-02\n4.23036776159143660e-02\n3.84765112831733300e-02\n2.91478777739590279e-02\n1.33796245270434242e-02\n-8.66670213210127618e-03\n-3.48680002302183059e-02\n-6.04222297517788970e-02\n-7.78257035134451158e-02\n-7.82718941228207066e-02\n-5.50260556133501180e-02\n-8.47077282237995027e-03\n4.91725672101976652e-02\n9.34167645606933938e-02\n9.58869585775422029e-02\n4.24978799751663319e-02\n-4.65726883152480509e-02\n-1.13721641409505483e-01\n-9.62570950170655582e-02\n1.20676461298159093e-02\n1.22592121501466519e-01\n1.08923105017241797e-01\n-4.32169858124095488e-02\n-1.55594707250233666e-01\n-4.45253118996814176e-02\n1.56741577127484794e-01\n9.28590964471094071e-02\n-1.70899988199157499e-01\n-8.35915846028647824e-02\n2.25653123933215738e-01\n-4.42908907662748069e-02\n-2.19452961710571048e-01\n3.22079438752661318e-01\n-2.60552856417956946e-01\n1.49197411483493997e-01\n-6.56436484245126739e-02\n0.0\n9.32899334820333189e-04\n3.61310358744712729e-03\n8.52126032423600882e-03\n1.59288775441174500e-02\n2.57840966633746949e-02\n3.75101763844038066e-02\n4.97622389088842043e-02\n6.02298873630103052e-02\n6.56386056785857597e-02\n6.21637239070098949e-02\n4.64723629304440375e-02\n1.74648823119988340e-02\n-2.15918493462515550e-02\n-6.14719690485128131e-02\n-8.75312192674251727e-02\n-8.40992179399393802e-02\n-4.31698265288636904e-02\n2.54450370995042176e-02\n8.97827470494604873e-02\n1.06551944597967019e-01\n5.03003000612788354e-02\n-5.32905292730471367e-02\n-1.23925111702100674e-01\n-8.30414076306481147e-02\n5.29160392831491272e-02\n1.43359933390436317e-01\n5.63927054497549915e-02\n-1.23996922991000541e-01\n-1.29106938902922463e-01\n9.32326189259115035e-02\n1.63931701838176430e-01\n-1.06932884302376074e-01\n-1.63041131926126931e-01\n1.96808767111669447e-01\n4.46585654468236309e-02\n-2.71872869383356364e-01\n3.15176969475731150e-01\n-2.27372435752042801e-01\n1.20339752641107578e-01\n1.44679128650584982e-02\n2.50591601617607199e-02\n3.22249824155176681e-02\n3.75315692547975935e-02\n4.08706684316964691e-02\n4.15074391357962980e-02\n3.83320773688043751e-02\n3.01138383329620923e-02\n1.59092526421946781e-02\n-4.32715842403245347e-03\n-2.89848805381051101e-02\n-5.41122351523825526e-02\n-7.32387614069455878e-02\n-7.83122470589598524e-02\n-6.22902467315413141e-02\n-2.33481249192310780e-02\n3.05981970266572395e-02\n8.00355720641022367e-02\n9.86103717761150911e-02\n6.67077596017823793e-02\n-1.00684016434059633e-02\n-9.05522648031498872e-02\n-1.13438781321510723e-01\n-4.40539690988402538e-02\n7.54180860319896146e-02\n1.32516612231608988e-01\n4.59352254936027243e-02\n-1.09451661007357745e-01\n-1.33141780608298205e-01\n4.30548825740223670e-02\n1.69865723203107333e-01\n2.14505092723565893e-04\n-1.92372704596337041e-01\n1.73993516727912259e-02\n2.13542569402112720e-01\n-1.38062275999180750e-01\n-1.31225365062594579e-01\n3.07066837998956010e-01\n-2.98516804759894339e-01\n1.94912636302714132e-01\n0.0\n8.80755158455438325e-04\n3.41115006078418709e-03\n8.04689543272489247e-03\n1.50538465522523698e-02\n2.44102018295092801e-02\n3.56295579689527714e-02\n4.75429580737956603e-02\n5.81116192876424825e-02\n6.43964149148618242e-02\n6.28641328037122110e-02\n5.02222813146243688e-02\n2.48761531424854625e-02\n-1.11818524311414844e-02\n-5.07364235941359584e-02\n-8.12327589524467486e-02\n-8.77117264803348451e-02\n-5.96144075205233825e-02\n3.84802509906585657e-05\n6.82415523914974426e-02\n1.06324530695470432e-01\n8.05517101991923418e-02\n-6.92263626359712440e-03\n-1.00248688975362099e-01\n-1.16266878536654975e-01\n-1.97720335618759777e-02\n1.10421770957074963e-01\n1.24692145146859446e-01\n-2.36733008142025886e-02\n-1.56463878470837731e-01\n-5.70137014019514721e-02\n1.54878363455136364e-01\n9.72983884920653880e-02\n-1.72791823311018611e-01\n-8.02985085690735012e-02\n2.29146629416561443e-01\n-5.61482989088956594e-02\n-2.13154341884118859e-01\n3.30740712887449995e-01\n-2.78701057724661916e-01\n1.43927949008923438e-02\n2.49290520312638042e-02\n3.20665600217743332e-02\n3.73893035426908424e-02\n4.08363382453869536e-02\n4.17429910326952078e-02\n3.90797599836725032e-02\n3.16763971493196836e-02\n1.85763784537722083e-02\n-4.28221529478583216e-04\n-2.41161485605811236e-02\n-4.91797950649758078e-02\n-6.99418913185756719e-02\n-7.89603867748186194e-02\n-6.90339666035672817e-02\n-3.67342835006995369e-02\n1.33599999022672739e-02\n6.59594402182573231e-02\n9.72541084108062004e-02\n8.47279314893236296e-02\n2.32942332096257067e-02\n-6.09040791408754431e-02\n-1.13999289981531221e-01\n-8.62754483712767500e-02\n1.84664911218828075e-02\n1.19024419930298997e-01\n1.08635809201183306e-01\n-2.71553594051264710e-02\n-1.45753785339153535e-01\n-7.81882882491122949e-02\n1.16163713627539855e-01\n1.42631177069230203e-01\n-8.67104943014159468e-02\n-1.73762435493064998e-01\n1.06663052698272823e-01\n1.71630455652703129e-01\n-2.05244852362438113e-01\n-4.96383135694895700e-02\n2.97290391525197317e-01\n-3.52987807239841189e-01\n0.0\n8.59551115650578914e-04\n3.32902715612869767e-03\n7.85496293519427277e-03\n1.47056769241639598e-02\n2.38851966180367997e-02\n3.49731455034599445e-02\n4.69236445890701195e-02\n5.78836322726566863e-02\n6.51375180808627940e-02\n6.53338248388847936e-02\n5.51678103924469684e-02\n3.26277805273644805e-02\n-1.30289636926429666e-03\n-4.09958721760191394e-02\n-7.55976460242901854e-02\n-9.08776070388560703e-02\n-7.45173110398754668e-02\n-2.42497204067760840e-02\n4.46799589207665104e-02\n9.92507806780820873e-02\n1.02023050037134563e-01\n3.75616075145899300e-02\n-6.27773494950495670e-02\n-1.24731623599177832e-01\n-8.24275050763224881e-02\n4.66639438987300204e-02\n1.40946094739766492e-01\n7.85085914052182504e-02\n-9.45504611255020694e-02\n-1.53584391860038333e-01\n2.12598009505913545e-02\n1.82261284721750100e-01\n2.17877189175728000e-02\n-2.05902111486083617e-01\n-2.63940149477819453e-03\n2.39677620771458572e-01\n-1.27021297184890553e-01\n-1.93995344367088263e-01\n3.99362740030848817e-01\n1.48062387364572695e-02\n2.56451577605384083e-02\n3.29967341233603079e-02\n3.85168094598565616e-02\n4.21902862382373400e-02\n4.34013910179560439e-02\n4.11689133890185688e-02\n3.43498284467135886e-02\n2.19547725623970222e-02\n3.62748992952302085e-03\n-1.97308114928916832e-02\n-4.53227851939043760e-02\n-6.80879774410788480e-02\n-8.10482429180147679e-02\n-7.68482513402013040e-02\n-5.07264228260695324e-02\n-4.44187607091061330e-03\n5.04820201230574417e-02\n9.30039071029062359e-02\n9.91901175541534813e-02\n5.56623172817713244e-02\n-2.53021739558791578e-02\n-1.00773202184740951e-01\n-1.15205673691920182e-01\n-4.21515674569955742e-02\n7.60054775249846132e-02\n1.37210670726984008e-01\n6.41029216590617429e-02\n-9.06894670245547430e-02\n-1.52028187002647586e-01\n-1.44559985706216518e-02\n1.62155070414105568e-01\n9.86865921917293443e-02\n-1.48352276624653612e-01\n-1.43348790678554744e-01\n1.65754073234471611e-01\n1.43432463255834391e-01\n-2.48233549961896782e-01\n-4.38214918351596608e-02\n4.08599601921255828e-01\n0.0\n8.56049056016601625e-04\n3.31546373748887839e-03\n7.82477915546193545e-03\n1.46602044467147256e-02\n2.38514249698366723e-02\n3.50350702015299331e-02\n4.72669120763184805e-02\n5.88439819404972808e-02\n6.72276975155124967e-02\n6.92031636268474748e-02\n6.14326550252839027e-02\n4.15196523096755463e-02\n9.53886392784761977e-03\n-3.03308918176287932e-02\n-6.88742221254017156e-02\n-9.27837732385943248e-02\n-8.85768340135734550e-02\n-4.95424654186119653e-02\n1.64689311888598991e-02\n8.34302589176573323e-02\n1.14022965459730938e-01\n7.99146598095240579e-02\n-1.18015355492242235e-02\n-1.06259037279320054e-01\n-1.26119246734984147e-01\n-3.58595069011973799e-02\n1.00563036474747833e-01\n1.45838297527125210e-01\n2.55634649595528271e-02\n-1.42580573966116536e-01\n-1.32769184878435503e-01\n8.09226764655763264e-02\n1.89493449374710438e-01\n-2.93393743603530370e-02\n-2.24958608770096713e-01\n2.83619622545823943e-02\n2.69758617284213242e-01\n-1.14941193798954344e-01\n-3.83152705007039462e-01\n1.54223874534664199e-02\n2.67123586434166345e-02\n3.43795938968228590e-02\n4.01772131051491774e-02\n4.41408142312360238e-02\n4.57027863719687913e-02\n4.39271988535622215e-02\n3.76953723733930296e-02\n2.59852848847285829e-02\n8.29854931956666014e-03\n-1.47709226128686193e-02\n-4.09235099183313730e-02\n-6.57234116786739875e-02\n-8.27202871244137605e-02\n-8.45632327462141203e-02\n-6.54102073324890343e-02\n-2.44357955794804044e-02\n3.06778418335365670e-02\n8.24737240835217433e-02\n1.07415916967056338e-01\n8.60989436736779717e-02\n1.76741816182315256e-02\n-6.96160399454994888e-02\n-1.23857454535720488e-01\n-9.83833328095802262e-02\n5.79166742020650969e-03\n1.17784246501681150e-01\n1.34514241883001845e-01\n1.72278825543251551e-02\n-1.33580932050071322e-01\n-1.42386874414890063e-01\n3.45247632034756877e-02\n1.85709566909968177e-01\n6.98783530946434916e-02\n-1.80931975732388700e-01\n-1.42135170111598819e-01\n1.85421652215634530e-01\n1.90384729409761505e-01\n-2.46204100793014247e-01\n-3.33173811727831171e-01\n0.0\n8.51879268075069352e-04\n3.29931421823410724e-03\n7.78854522508870377e-03\n1.46037196466334233e-02\n2.38009377326302909e-02\n3.50759930287914551e-02\n4.75911430096217503e-02\n5.98033584166021981e-02\n6.93698760336103060e-02\n7.32457176034179147e-02\n6.81130531402503459e-02\n5.12606025705360652e-02\n2.19181205529206079e-02\n-1.71913522919042196e-02\n-5.86810324718283691e-02\n-9.06776148322408215e-02\n-9.94103766565768571e-02\n-7.47063498557927336e-02\n-1.73218640127173196e-02\n5.53339020533327383e-02\n1.10494940721694523e-01\n1.12955468958530314e-01\n4.82187804828195371e-02\n-5.62586879572031448e-02\n-1.32722041552702313e-01\n-1.13003673260981694e-01\n7.37790161330358248e-03\n1.35430529043827796e-01\n1.39025968017102375e-01\n-1.36259863967150962e-02\n-1.69299604540455007e-01\n-1.20907630874380570e-01\n1.08315534892955798e-01\n2.03823576788529470e-01\n-2.66996872852534456e-02\n-2.53742933970080742e-01\n-4.55623739968040245e-02\n3.27827090243407782e-01\n2.70942560094969087e-01\n1.60925278705428762e-02\n2.78730758939984523e-02\n3.58840065073781633e-02\n4.19853385875859145e-02\n4.62698874042322891e-02\n4.82259439098600418e-02\n4.69727321916130966e-02\n4.14280843143993577e-02\n3.05510638684351812e-02\n1.37138261907561940e-02\n-8.79229139975975203e-03\n-3.51833239865476516e-02\n-6.17146845221772655e-02\n-8.26149043894368607e-02\n-9.08032811208875912e-02\n-7.97208007830410015e-02\n-4.62841248073299696e-02\n5.69768379234245406e-03\n6.32281464678846467e-02\n1.05274319140727018e-01\n1.09412103424114338e-01\n6.37928814299643238e-02\n-2.00940696496914421e-02\n-1.03090566674365516e-01\n-1.32372506231225484e-01\n-7.51380780419472483e-02\n4.50028525642492544e-02\n1.43002219530090152e-01\n1.25929252753630788e-01\n-1.49145513524454650e-02\n-1.57813071430235763e-01\n-1.39815537380769933e-01\n5.24600851496706960e-02\n2.02638774595938931e-01\n8.70967974158368130e-02\n-1.81248367169519642e-01\n-2.08803425167152196e-01\n1.13470008305467635e-01\n3.54559666821993302e-01\n2.07149001065127070e-01\n0.0\n8.43338587942596635e-04\n3.26623630631575623e-03\n7.71238759431302785e-03\n1.44726097336768510e-02\n2.36297029306761219e-02\n3.49416303206943890e-02\n4.76848428466004268e-02\n6.04919086079541077e-02\n7.12445271608532493e-02\n7.71160372325244148e-02\n7.48829694643470822e-02\n6.16186771229169719e-02\n3.58092042772774899e-02\n-1.24144469977558966e-03\n-4.41297053440906778e-02\n-8.29336363312917213e-02\n-1.04594358957277866e-01\n-9.68148489773471010e-02\n-5.42428750221996062e-02\n1.50475307512737532e-02\n8.67585733678211540e-02\n1.26007286740149410e-01\n1.03632227828869661e-01\n1.84121809293837958e-02\n-8.87973365631912204e-02\n-1.47096226662755153e-01\n-1.00759398625727373e-01\n3.44092623092194516e-02\n1.55342055278947011e-01\n1.40669219033703191e-01\n-2.33962238060228221e-02\n-1.83301989135457810e-01\n-1.44155660709836098e-01\n8.76745786523567133e-02\n2.39690234298924054e-01\n7.75783186431717314e-02\n-2.41400376902793368e-01\n-3.34771983024893638e-01\n-1.49322056960557836e-01\n1.68309045358561310e-02\n2.91519817934442899e-02\n3.75418725679030688e-02\n4.39791623500961279e-02\n4.86212358053370597e-02\n5.10207781634251720e-02\n5.03631189323286571e-02\n4.56166551791211891e-02\n3.57387411381977493e-02\n1.99908331031908408e-02\n-1.62378702423261333e-03\n-2.78409095645805009e-02\n-5.56580871195993809e-02\n-8.01243573229263595e-02\n-9.47101188707745734e-02\n-9.25751103062557035e-02\n-6.88771496507749187e-02\n-2.38217997155600603e-02\n3.45499780090210290e-02\n8.95844066729465788e-02\n1.19266014404651399e-01\n1.04575209559547633e-01\n4.13426001063803630e-02\n-4.99932288122061225e-02\n-1.25355867289467654e-01\n-1.35563311098122447e-01\n-5.93959681435412765e-02\n6.76743303393516904e-02\n1.58411438040161501e-01\n1.29320418851986335e-01\n-1.88180444740788412e-02\n-1.68158943011399831e-01\n-1.64884553521593286e-01\n1.97194062835450989e-02\n2.10633411866849890e-01\n1.79043816000533124e-01\n-8.36480798739016873e-02\n-3.12558198238727880e-01\n-2.84369109034339873e-01\n-1.01606133626277587e-01\n0.0\n8.30464739659785619e-04\n3.21637610631482756e-03\n7.59661598672230470e-03\n1.42672421840476099e-02\n2.33375471241542634e-02\n3.46295962709510241e-02\n4.75398709701187472e-02\n6.08895577459871232e-02\n7.28107601330195420e-02\n8.07428033599001255e-02\n8.16365524723153824e-02\n7.24684614397069077e-02\n5.11249971451692431e-02\n1.76045906238008476e-02\n-2.47165118020785286e-02\n-6.82714387096428343e-02\n-1.01688449138326559e-01\n-1.12126203844642683e-01\n-8.98458085611679863e-02\n-3.42015696150327619e-02\n4.13710510691620431e-02\n1.09164362485135447e-01\n1.35375529475277478e-01\n9.69485005700005953e-02\n8.73224188033526060e-04\n-1.07149080195543936e-01\n-1.58652805205679592e-01\n-1.05098039764624535e-01\n3.45470250254383271e-02\n1.63631791730661752e-01\n1.67000830373503217e-01\n1.58876590680443464e-02\n-1.72930393669416926e-01\n-2.14141674246638158e-01\n-3.56609352280571612e-02\n2.18981991440104939e-01\n3.23817647439513856e-01\n2.20595091932118764e-01\n6.52676078848470204e-02\n1.76746818308307282e-02\n3.06134469386133250e-02\n3.94362894945402068e-02\n4.62569844928335180e-02\n5.13062750424011088e-02\n5.42104702012633777e-02\n5.42327145326857094e-02\n5.04074649775678174e-02\n4.17106731456923507e-02\n2.73180513675797959e-02\n6.97042193518201091e-03\n-1.85743845515980374e-02\n-4.70835187166295729e-02\n-7.45444921136545480e-02\n-9.52529029408573369e-02\n-1.02568759409368937e-01\n-9.05463410471012975e-02\n-5.63892176432608874e-02\n-3.21124711524380709e-03\n5.80273810779295685e-02\n1.09025770836981867e-01\n1.28592740055736621e-01\n1.01302344948193457e-01\n2.80559841297535403e-02\n-6.68827293353305430e-02\n-1.39466731233504670e-01\n-1.44434532607772476e-01\n-6.45043366399150608e-02\n6.62252025102064296e-02\n1.67466129171245676e-01\n1.58381391735582661e-01\n2.42538594532125812e-02\n-1.48358068967787055e-01\n-2.17965046133346191e-01\n-1.03958991653708532e-01\n1.24728875815380419e-01\n2.94561635809221622e-01\n2.88875215058593371e-01\n1.57526204239681028e-01\n3.95466456910270603e-02\n0.0\n8.12711290506285618e-04\n3.14761729340558207e-03\n7.43619589142747311e-03\n1.39779431818958712e-02\n2.29078552255971742e-02\n3.41130523684672893e-02\n4.71143447135078872e-02\n6.09325067156324951e-02\n7.39740204107594834e-02\n8.39917500836037667e-02\n8.81964942821106546e-02\n8.36049028468824340e-02\n6.76911966738399096e-02\n3.93441698067822782e-02\n1.02387454657693473e-06\n-4.53607234463568806e-02\n-8.78979830183775762e-02\n-1.15885031975839076e-01\n-1.17511409980461681e-01\n-8.54464790349511588e-02\n-2.20941897944537495e-02\n5.67980844186599873e-02\n1.23324712606887321e-01\n1.45875244725165609e-01\n1.04292160840840351e-01\n6.04088678648816591e-03\n-1.07077595906752671e-01\n-1.72049178477891473e-01\n-1.38905181730565624e-01\n-1.05143790251385968e-02\n1.41942542624021673e-01\n2.12493632773911090e-01\n1.34266746436129597e-01\n-5.86172892453190389e-02\n-2.43745873769143195e-01\n-3.04897156677476966e-01\n-2.28741778895658943e-01\n-1.03973451514232013e-01\n-2.25673146031101501e-02\n1.86714463246835036e-02\n3.23398936851470101e-02\n4.16737388806598733e-02\n4.89451497060302554e-02\n5.44692843603291829e-02\n5.79568729054355525e-02\n5.87623154362657760e-02\n5.60041958497334985e-02\n4.87017311581613987e-02\n3.59774190356355883e-02\n1.73479490510354412e-02\n-6.90183530819662040e-03\n-3.53077855889831829e-02\n-6.48803394345958406e-02\n-9.09894768890388977e-02\n-1.07695042895582682e-01\n-1.08729545697891575e-01\n-8.92262108521739566e-02\n-4.80200598259591382e-02\n1.00626994287267655e-02\n7.29700575666768353e-02\n1.22552496445319514e-01\n1.39079789834895856e-01\n1.09017571174733846e-01\n3.39074490570386161e-02\n-6.40316027032670487e-02\n-1.44893107225856188e-01\n-1.65768122792076866e-01\n-1.04037528499579368e-01\n2.20188404882031424e-02\n1.51208695305295987e-01\n2.06084374719528646e-01\n1.40070406742507814e-01\n-2.43890447575634967e-02\n-2.00684533639156892e-01\n-2.93331543865481048e-01\n-2.65985160317172176e-01\n-1.63150929670112022e-01\n-6.35287398807845155e-02\n-1.21005222494182108e-02\n0.0\n7.88849426819223840e-04\n3.05520069273612031e-03\n7.21984079607981225e-03\n1.35832365789978950e-02\n2.23044858238108448e-02\n3.33355615530940633e-02\n4.63242379281394237e-02\n6.04996800632469911e-02\n7.45645443795496243e-02\n8.66321845706601729e-02\n9.42636634675278473e-02\n9.46705732600636035e-02\n8.51461862012811155e-02\n6.37559499693414883e-02\n3.02456907583328535e-02\n-1.29933867632819715e-02\n-6.02157567756256354e-02\n-1.02319410927827509e-01\n-1.28038183174111198e-01\n-1.26637394984530499e-01\n-9.19300371976103509e-02\n-2.66342491057855874e-02\n5.47893842399802267e-02\n1.27160289796235643e-01\n1.61208842353958076e-01\n1.35416494674539617e-01\n4.92278581306812568e-02\n-6.93997740011970399e-02\n-1.69461027947022252e-01\n-1.97817907137338655e-01\n-1.28280411999765254e-01\n1.78024274327953577e-02\n1.76591424460838808e-01\n2.75721717768013297e-01\n2.77976597787556512e-01\n2.02561707928918144e-01\n1.05570740447289882e-01\n3.59188560410395527e-02\n6.07734224756755013e-03\n1.98978476228744428e-02\n3.44640830440821472e-02\n4.44257475171149566e-02\n5.22472409927577444e-02\n5.83429057200623088e-02\n6.25212643351894526e-02\n6.42441326218181757e-02\n6.27360087461896615e-02\n5.70898699262478992e-02\n4.64171464868085790e-02\n3.00646099015259849e-02\n7.90288686606151203e-03\n-1.93336960319217648e-02\n-4.97121430210791110e-02\n-7.98715400445615953e-02\n-1.05043715276014499e-01\n-1.19489973383770376e-01\n-1.17490930099956203e-01\n-9.49132732646848359e-02\n-5.11596299428665330e-02\n8.99666436325627199e-03\n7.44966386541104086e-02\n1.28947935577031270e-01\n1.54149939429461813e-01\n1.36094161098181093e-01\n7.20105184082392019e-02\n-2.44076079590359422e-02\n-1.23153619815439763e-01\n-1.85906878862778208e-01\n-1.81013615785785870e-01\n-9.98763169856698024e-02\n3.42384649013612666e-02\n1.72671294333163722e-01\n2.63238214038714169e-01\n2.76850839713952468e-01\n2.22099913847750463e-01\n1.36821596566691045e-01\n6.21359884761548964e-02\n1.87525385487389215e-02\n2.84709789070331735e-03\n0.0\n7.56761735228795164e-04\n2.93092559758814999e-03\n6.92811454950807964e-03\n1.30462116692116985e-02\n2.14655811858154924e-02\n3.22012061110079212e-02\n4.50281556997957494e-02\n5.93896916675621250e-02\n7.43028480647582729e-02\n8.82856752610058082e-02\n9.93415374154919262e-02\n1.05045827206420472e-01\n1.02784084924008229e-01\n9.01804655252346904e-02\n6.57233474667688472e-02\n2.95339664331776240e-02\n-1.58654089118505023e-02\n-6.50308374180729870e-02\n-1.09653878490234238e-01\n-1.39533351101318370e-01\n-1.44661016422743094e-01\n-1.18290065781373410e-01\n-6.03483114552357883e-02\n1.99919098510812215e-02\n1.04095795004292654e-01\n1.67247590014394765e-01\n1.85777180085437255e-01\n1.46236312839207711e-01\n5.30340138217083035e-02\n-6.97994271851819781e-02\n-1.85463166409313956e-01\n-2.58533565731996706e-01\n-2.70272536462366653e-01\n-2.26660292301189503e-01\n-1.53729939492656176e-01\n-8.25120429448067544e-02\n-3.32413176287563242e-02\n-9.00523076368542688e-03\n-1.23738299395628770e-03\n2.14975399979633990e-02\n3.72348315142167416e-02\n4.80137476753047104e-02\n5.65445833956158481e-02\n6.33623769750824017e-02\n6.83912495454536418e-02\n7.12209508382000422e-02\n7.12092058137573231e-02\n6.75613638948571321e-02\n5.94327869473945461e-02\n4.60754380046810227e-02\n2.70382330477949955e-02\n2.41714492058731122e-03\n-2.68684117979543537e-02\n-5.88223548298354507e-02\n-9.02208254461514259e-02\n-1.16667547760157864e-01\n-1.32968159639419686e-01\n-1.33909490731641156e-01\n-1.15451278611055252e-01\n-7.61992347000840231e-02\n-1.88435403489077835e-02\n4.89356342855869278e-02\n1.14686498446986113e-01\n1.63010589316935878e-01\n1.79080233139003314e-01\n1.53257740538732784e-01\n8.54478537271666366e-02\n-1.26961054821917180e-02\n-1.19384460896640843e-01\n-2.08586463783120735e-01\n-2.58679792399346187e-01\n-2.60426431844646977e-01\n-2.20328253930185014e-01\n-1.57174289275686552e-01\n-9.31797300352964764e-02\n-4.44593307548521999e-02\n-1.61037412641167055e-02\n-3.95396978521629378e-03\n-4.95330134673144804e-04\n0.0\n7.12577949754292510e-04\n2.75980253227300042e-03\n6.52550406319868988e-03\n1.22995039652094261e-02\n2.02785225544928685e-02\n3.05360849937913736e-02\n4.29712779612916457e-02\n5.72421962475271051e-02\n7.26920681353495357e-02\n8.82809228413688335e-02\n1.02542116848294659e-01\n1.13589799525825569e-01\n1.19208377744087504e-01\n1.17055064424875621e-01\n1.04997583158580543e-01\n8.15868420785344356e-02\n4.66262067797307278e-02\n1.74631234403338736e-03\n-4.91642558567892893e-02\n-9.98684436602696318e-02\n-1.42233033207577048e-01\n-1.67362082550348540e-01\n-1.67392224711705978e-01\n-1.37685685154671722e-01\n-7.88785510533135809e-02\n1.96071428726542814e-03\n9.17905345883951174e-02\n1.74047145913702322e-01\n2.32769649665857503e-01\n2.57250485434427134e-01\n2.45484470216292716e-01\n2.04803711706168901e-01\n1.49094222004548471e-01\n9.35836991028945048e-02\n4.95328019565536570e-02\n2.13152206599337354e-02\n7.01478056093768950e-03\n1.57357700362713814e-03\n1.80868502747409693e-04\n2.37912342438649817e-02\n4.12076264851466700e-02\n5.31552370391414689e-02\n6.26878664429304927e-02\n7.04972285818459971e-02\n7.66497480245104668e-02\n8.08916437212986311e-02\n8.27504816428951406e-02\n8.15952389441076398e-02\n7.66990980121257798e-02\n6.73240236402458808e-02\n5.28373203059767371e-02\n3.28637669004525831e-02\n7.46859090094030217e-03\n-2.26448842090982913e-02\n-5.59534600019822234e-02\n-8.99942001203491299e-02\n-1.21365277360490381e-01\n-1.45910240522639623e-01\n-1.59135924398952827e-01\n-1.56878236014350608e-01\n-1.36167420472694006e-01\n-9.61606035700440509e-02\n-3.89227766987295387e-02\n3.02196355822370311e-02\n1.03014811047272406e-01\n1.69453879622933318e-01\n2.19682691264509983e-01\n2.46269927676288025e-01\n2.46185574464774792e-01\n2.21766380360293086e-01\n1.80163783253248416e-01\n1.31285430872841363e-01\n8.48806033980122193e-02\n4.78675481953391990e-02\n2.29554277921792567e-02\n9.00719389900786482e-03\n2.71611581652370917e-03\n5.60437563970545504e-04\n5.94337507470759884e-05\n0.0\n6.47951749943903978e-04\n2.50950633667869263e-03\n5.93544843925419580e-03\n1.11980302135470007e-02\n1.85012794108880829e-02\n2.79678537177878508e-02\n3.96110378472762925e-02\n5.32954831135964910e-02\n6.86901891931165076e-02\n8.52188838725946168e-02\n1.02015585704800349e-01\n1.17896278708282121e-01\n1.31360671450309635e-01\n1.40640008270299599e-01\n1.43806530637083929e-01\n1.38955875699118075e-01\n1.24463939785741787e-01\n9.93036818615880279e-02\n6.33856520429109671e-02\n1.78617862248960646e-02\n-3.46886304165625603e-02\n-9.02799143185660374e-02\n-1.43822013081355005e-01\n-1.89732087283495082e-01\n-2.22807383129339120e-01\n-2.39215961803237176e-01\n-2.37376133071974610e-01\n-2.18458183518251192e-01\n-1.86290071072823887e-01\n-1.46596228676895257e-01\n-1.05716711912178532e-01\n-6.91656587286230140e-02\n-4.04906030263447944e-02\n-2.08100128176259627e-02\n-9.14128690700186097e-03\n-3.29883741046373960e-03\n-9.17885750862544245e-04\n-1.75222924842919232e-04\n-1.72290713703581002e-05\n2.77450398254708228e-02\n4.80558186357374073e-02\n6.20112843291504984e-02\n7.32378035686144652e-02\n8.26615606385696505e-02\n9.05418774749441324e-02\n9.68294134986364269e-02\n1.01278411919727376e-01\n1.03497527363939579e-01\n1.02985546496443980e-01\n9.91690606931073804e-02\n9.14504495542615425e-02\n7.92707247773674073e-02\n6.21888562796618014e-02\n3.99758171472731488e-02\n1.27172797617500534e-02\n-1.90862715033441876e-02\n-5.44387059901457124e-02\n-9.18079943381839014e-02\n-1.29149888591499590e-01\n-1.64016301472442450e-01\n-1.93759998930153526e-01\n-2.15830508962921969e-01\n-2.28132869024639390e-01\n-2.29394888618940501e-01\n-2.19467119276880812e-01\n-1.99472078808684811e-01\n-1.71734391950313425e-01\n-1.39465587099658977e-01\n-1.06241260918444533e-01\n-7.53774371888207007e-02\n-4.93613270964794598e-02\n-2.94934208196513600e-02\n-1.58406274396579623e-02\n-7.49729713463740278e-03\n-3.04230286403063804e-03\n-1.01681405334307084e-03\n-2.62599069233770271e-04\n-4.66126863507497876e-05\n-4.26813290682483178e-06\n0.0\n5.37640367501402501e-04\n2.08227218958176698e-03\n4.92646398709018114e-03\n9.30354181147118216e-03\n1.54042487027891157e-02\n2.33781511719809987e-02\n3.33270324772130255e-02\n4.52927146933604849e-02\n5.92406798573432147e-02\n7.50408598508890134e-02\n9.24474204851704201e-02\n1.11080071998555241e-01\n1.30410259712781446e-01\n1.49756362034524027e-01\n1.68292524330048709e-01\n1.85075697143537943e-01\n1.99094497775730933e-01\n2.09341373615233944e-01\n2.14906046063928990e-01\n2.15083464844388061e-01\n2.09484040425460483e-01\n1.98128811371824726e-01\n1.81509005514789712e-01\n1.60589981637181994e-01\n1.36745339591907072e-01\n1.11618602646709891e-01\n8.69260681152904807e-02\n6.42317286745275190e-02\n4.47382282023390532e-02\n2.91407946314558332e-02\n1.75800712300564627e-02\n9.70535179064714072e-03\n4.82844383395444540e-03\n2.12144474272216903e-03\n8.00635926070049158e-04\n2.49276227306977321e-04\n6.00539911699532984e-05\n9.95583149067647452e-06\n8.52261448437682777e-07\n3.96159036736810841e-02\n6.86167579505701786e-02\n8.85758366033390782e-02\n1.04766399865548240e-01\n1.18686403821967074e-01\n1.30975215278411689e-01\n1.41934001490606421e-01\n1.51688892129476754e-01\n1.60257811289166996e-01\n1.67583733048552008e-01\n1.73554924816726713e-01\n1.78020486895971497e-01\n1.80805117207174543e-01\n1.81725133008657086e-01\n1.80606723393159890e-01\n1.77306600822000920e-01\n1.71734442144986066e-01\n1.63875693610101403e-01\n1.53812492475891932e-01\n1.41739741500078509e-01\n1.27972939718471845e-01\n1.12944442667185022e-01\n9.71856096698877070e-02\n8.12939262041063593e-02\n6.58866250255813468e-02\n5.15452747039660264e-02\n3.87586710828303621e-02\n2.78733350352072771e-02\n1.90611204591762534e-02\n1.23112603864020728e-02\n7.44962621715791404e-03\n4.18189970276962569e-03\n2.15142662048195977e-03\n9.98766371426865066e-04\n4.09968237048244290e-04\n1.44703945555957249e-04\n4.21760533953742468e-05\n9.51985350229674126e-06\n1.47974059071118862e-06\n1.18842435717913669e-07\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n1.92296228181913637e-02\n3.33066837314932584e-02\n4.26980532870509730e-02\n4.90978906992029160e-02\n5.16707722203550504e-02\n4.84977532771168271e-02\n3.71792497098033803e-02\n1.57911072977321466e-02\n-1.55457904503789081e-02\n-5.26380508924737672e-02\n-8.55808567462892356e-02\n-9.92729012188578869e-02\n-7.83841113160658742e-02\n-1.78836705360222101e-02\n6.42234460082189290e-02\n1.22684026104344798e-01\n1.04571704843402113e-01\n-2.84395907453529597e-03\n-1.26696024980378324e-01\n-1.35325722681615912e-01\n2.14883625107592027e-02\n1.75452197975505791e-01\n7.62991960617101367e-02\n-1.78710858010510232e-01\n-1.11974246588549695e-01\n2.28614791268620859e-01\n2.69517170438992627e-02\n-2.95843084778061649e-01\n3.35612382524687836e-01\n-2.22689558582787689e-01\n1.03840242456106069e-01\n-3.64020532165198613e-02\n9.90425563579549854e-03\n-2.12385753714242455e-03\n3.60844405267784205e-04\n-4.84457942222548925e-05\n5.08613529820444096e-06\n-4.09272977624966648e-07\n2.43952796628567839e-08\n-1.01548234866318681e-09\n2.63655439404206215e-11\n0.0\n1.53207183589857505e-03\n5.93368870562860362e-03\n1.39634001360953008e-02\n2.59150123110877748e-02\n4.12720630158234653e-02\n5.81811824191460561e-02\n7.29296222864153215e-02\n7.98066363879913337e-02\n7.19540357193568236e-02\n4.38681329319077634e-02\n-4.26141187609695941e-03\n-6.16093793018236829e-02\n-1.04741554068370601e-01\n-1.04112030837777425e-01\n-4.27409109972499354e-02\n5.87322652792297700e-02\n1.32712680317800341e-01\n1.01403537238645439e-01\n-3.84929813278604011e-02\n-1.57613801986351054e-01\n-8.93970805950522335e-02\n1.23930799360517610e-01\n1.64222281816483379e-01\n-1.02844105191431362e-01\n-1.94414007829319946e-01\n1.74250886017714796e-01\n1.27441062767785412e-01\n-3.30972425194132169e-01\n3.08024984650235589e-01\n-1.82925254376322621e-01\n7.87385774310291608e-02\n-2.58929108614052300e-02\n6.67537840086772707e-03\n-1.36588223290353902e-03\n2.22587496886450173e-04\n-2.87801523862112907e-05\n2.91948181034421179e-06\n-2.27610996871251364e-07\n1.31749262489557947e-08\n-5.33626204258542593e-10\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644819e-02\n6.82896468055726735e-02\n7.65831616951513083e-02\n7.25561685123442268e-02\n5.07591663463409642e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712152e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143515041e-07\n6.98245804860625677e-08\n1.75385715931343431e-02\n3.03776970914929091e-02\n3.89894299482248519e-02\n4.50537831243302753e-02\n4.80480260970504308e-02\n4.65400382039493493e-02\n3.86255045510804154e-02\n2.25480495396491211e-02\n-2.27174361599671599e-03\n-3.38181129256360097e-02\n-6.60703944825466044e-02\n-8.85536648892356199e-02\n-8.83022665547521651e-02\n-5.55258773678884154e-02\n7.46609704613758647e-03\n7.83492811499440917e-02\n1.16648725092663427e-01\n8.43733130090412731e-02\n-1.70104229921458593e-02\n-1.20305094638899449e-01\n-1.22969970230733749e-01\n9.35905132160871206e-03\n1.50958694957938649e-01\n1.03915462896002675e-01\n-1.13821482581894118e-01\n-1.65617979165725127e-01\n1.02078086683356162e-01\n1.87205802845350183e-01\n-1.80482528572332657e-01\n-1.05887032567924352e-01\n3.16897122331143921e-01\n-3.11506306360772922e-01\n1.94908626118927036e-01\n-8.88419912097004605e-02\n3.11734890841552648e-02\n-8.65603665299483245e-03\n1.92915844115690402e-03\n-3.47110560421080340e-04\n5.03961499458168544e-05\n-5.86624629182311543e-06\n5.40333524333499841e-07\n0.0\n1.27957098505542270e-03\n4.95575711540987163e-03\n1.16729154582542877e-02\n2.17298714766448742e-02\n3.48463920087833182e-02\n4.97890096437911545e-02\n6.39661460133098686e-02\n7.32162053932040313e-02\n7.21602998827663850e-02\n5.55765345251830398e-02\n2.10888036966226343e-02\n-2.71967000961112274e-02\n-7.57556405665850557e-02\n-1.02576258694571834e-01\n-8.55111455040472035e-02\n-1.85689543275253978e-02\n7.13685108828790715e-02\n1.24881736372999388e-01\n8.51840841702109219e-02\n-3.93941327750262429e-02\n-1.42330243848816401e-01\n-9.42257757604983148e-02\n8.54747418851502794e-02\n1.66546977429307630e-01\n-1.57040975955227112e-02\n-1.97467238887158031e-01\n1.88019344819007105e-03\n2.29365773327616568e-01\n-1.02939542298368450e-01\n-1.91533197604311534e-01\n3.33816802434645732e-01\n-2.79815352320651300e-01\n1.58802675309600599e-01\n-6.73083989677236705e-02\n2.22633667178559445e-02\n-5.87886221383989056e-03\n1.25374425751284004e-03\n-2.16874130346145536e-04\n3.03833333739221503e-05\n-3.42291948358842567e-06\n1.67998963698428108e-02\n2.90982740744596888e-02\n3.73653598429982275e-02\n4.32630585703605991e-02\n4.63845439306179302e-02\n4.54855374775356217e-02\n3.88656105331162127e-02\n2.48760515820469590e-02\n2.76248927441086591e-03\n-2.61461269875064260e-02\n-5.71751743015373598e-02\n-8.16723200398509347e-02\n-8.81468944591158321e-02\n-6.63517542913194258e-02\n-1.44275582313984404e-02\n5.34454003269652506e-02\n1.05157476202797071e-01\n1.02564527870805264e-01\n2.95638071888991265e-02\n-7.78829860684643049e-02\n-1.33783853231908445e-01\n-6.61391846774266462e-02\n8.51730529335797820e-02\n1.53220131302458124e-01\n1.78247327775015695e-02\n-1.65860741937658041e-01\n-8.84648720068892946e-02\n1.73136635652373833e-01\n9.94041328995909496e-02\n-2.27739976005359002e-01\n9.92889030236847846e-03\n2.57981308787330499e-01\n-3.31215699966130872e-01\n2.43523231335147805e-01\n-1.26668644070220632e-01\n5.02013264767941086e-02\n-1.57083873857113282e-02\n3.95453538622726752e-03\n-8.08548562464461154e-04\n1.34666690917553314e-04\n-1.82273378246146333e-05\n0.0\n1.17611905424410746e-03\n4.55508951024464603e-03\n1.07332437608407532e-02\n2.00053466102399526e-02\n3.21708251335855386e-02\n4.62157369356538325e-02\n5.99569808026562123e-02\n6.98231765015703415e-02\n7.10666469690350300e-02\n5.87838173602111547e-02\n3.00317667843195517e-02\n-1.31227298018954316e-02\n-6.07293446519278704e-02\n-9.46088691417309724e-02\n-9.35696681338419600e-02\n-4.56847854524682837e-02\n3.61951623207723908e-02\n1.07666230976232333e-01\n1.10940056068147191e-01\n2.23536404741954617e-02\n-1.00507026226833371e-01\n-1.35846752040894525e-01\n-1.62287775972159917e-02\n1.42403677780299137e-01\n1.14823057630056541e-01\n-1.05370369344843118e-01\n-1.65777370699994375e-01\n1.02664257152916133e-01\n1.79459461378944862e-01\n-1.86341187324008867e-01\n-8.48039923569474802e-02\n3.02150116076859709e-01\n-3.13662584514998566e-01\n2.06223255796233212e-01\n-9.91270584831584894e-02\n3.69077227679181705e-02\n-1.09593457676615200e-02\n2.63629687678657802e-03\n-5.17675440901171576e-04\n8.31331196559944278e-05\n1.61209359355488496e-02\n2.79222801059335196e-02\n3.58705159354962347e-02\n4.16048845870753206e-02\n4.48145797420925057e-02\n4.44149287992610109e-02\n3.88846144620483003e-02\n2.66859737391291936e-02\n6.95995294494681192e-03\n-1.94741915515434412e-02\n-4.90011513263254178e-02\n-7.44963574959759539e-02\n-8.59117127392779456e-02\n-7.31800335795580598e-02\n-3.18406490384573193e-02\n3.00613580799736907e-02\n8.81760866897242507e-02\n1.07758027496674832e-01\n6.36345168329120470e-02\n-3.19775709880926254e-02\n-1.16651005535378424e-01\n-1.09883143209702619e-01\n7.71332432218668849e-03\n1.33714841421911285e-01\n1.10916738751361169e-01\n-6.95642158857974480e-02\n-1.68350522451772205e-01\n8.72211080622103951e-03\n1.95222453358342513e-01\n-6.44875874027776245e-03\n-2.23734793104125529e-01\n1.15274524167896963e-01\n1.70164056055781138e-01\n-3.24324436158152207e-01\n2.85949692441553049e-01\n-1.70491924472239653e-01\n7.62429972807513040e-02\n-2.67770108707157499e-02\n7.56631680666388588e-03\n-1.74273729926091277e-03\n3.29187815023888484e-04\n0.0\n1.08472746655848798e-03\n4.20113141315478673e-03\n9.90252008671692503e-03\n1.84771178045915578e-02\n2.97864256261300975e-02\n4.29935140963079790e-02\n5.62502070986444641e-02\n6.64805042632286153e-02\n6.94951667339181040e-02\n6.07489860275675642e-02\n3.70087202869238824e-02\n-1.10930973022191869e-03\n-4.64683024705116465e-02\n-8.43432700502343147e-02\n-9.54507189121266558e-02\n-6.49196505718301342e-02\n4.37546632063725779e-03\n8.19387136049786191e-02\n1.16402130477027604e-01\n6.80514742606935508e-02\n-4.51112453198315028e-02\n-1.31643114066091610e-01\n-9.06119544642786379e-02\n6.35740447753899013e-02\n1.55664108213683428e-01\n3.25463030976935394e-02\n-1.61062970326137395e-01\n-9.14113918511741536e-02\n1.71651788577033171e-01\n9.17992509647488075e-02\n-2.26861131683262524e-01\n2.74638832077398962e-02\n2.38715698997173958e-01\n-3.27133773459492960e-01\n2.52461705260832781e-01\n-1.37970373183524342e-01\n5.77226764003804169e-02\n-1.91900287320895015e-02\n5.17285257937717246e-03\n-1.14295044499569589e-03\n1.54947372718263927e-02\n2.68376722047344862e-02\n3.44901552862686839e-02\n4.00656245989162857e-02\n4.33332339989883214e-02\n4.33446228395977240e-02\n3.87359070963050750e-02\n2.80790078462000610e-02\n1.04587803701408216e-02\n-1.36835478350950234e-02\n-4.15672433579068260e-02\n-6.73389422436721369e-02\n-8.22904924091030082e-02\n-7.68947161998595058e-02\n-4.51824836762208665e-02\n9.28246976441400931e-03\n6.88175709834367294e-02\n1.03622654947914214e-01\n8.51625560225658940e-02\n9.40258925302473771e-03\n-8.42585980574171722e-02\n-1.23190846371215593e-01\n-5.60486032993044864e-02\n7.71490944615659535e-02\n1.41957765542887304e-01\n3.80250655858831513e-02\n-1.33107457643414917e-01\n-1.22897539611938458e-01\n9.85218082264452261e-02\n1.65001353589206007e-01\n-1.04334257205889652e-01\n-1.71211923928382664e-01\n1.91700193397708996e-01\n6.42230606220893230e-02\n-2.86770652814723581e-01\n3.14521731006038252e-01\n-2.16820262513336470e-01\n1.09526452447666650e-01\n-4.30717621802973114e-02\n1.35967047523930726e-02\n-3.50420761462182095e-03\n0.0\n1.00359609698960021e-03\n3.88691096995948506e-03\n9.16458935623211228e-03\n1.71167311454171779e-02\n2.76534122159313688e-02\n4.00814238993155714e-02\n5.28288966396486953e-02\n6.32369450044037579e-02\n6.76070802627719430e-02\n6.17619395595088369e-02\n4.23615528549185633e-02\n9.00619731821108126e-03\n-3.33558072452551993e-02\n-7.29898954774935438e-02\n-9.29121277579448290e-02\n-7.72598902355034201e-02\n-2.22246757645281831e-02\n5.33121243426923908e-02\n1.07454237030226968e-01\n9.53992759312904393e-02\n7.90434144671919858e-03\n-9.86244071293157498e-02\n-1.24796881710562538e-01\n-2.07805840405918887e-02\n1.22068494513579401e-01\n1.23206999842316534e-01\n-5.54672104668259627e-02\n-1.68876258050744243e-01\n3.75230898544384132e-03\n1.93025006766826324e-01\n-1.19716417215450146e-02\n-2.17727273668513133e-01\n1.26959081244283123e-01\n1.49007089368497936e-01\n-3.13855664755186725e-01\n2.90875642885372043e-01\n-1.81751345436074851e-01\n8.54441920849962760e-02\n-3.17121965419148236e-02\n9.53172891227672264e-03\n1.49159011608469821e-02\n2.58350986512625724e-02\n3.32128305183116632e-02\n3.86346949608145779e-02\n4.19367339578773785e-02\n4.22875411435039705e-02\n3.84617445043256637e-02\n2.91365250810718991e-02\n1.33740939056697442e-02\n-8.66402869294989955e-03\n-3.48554718648006953e-02\n-6.03999052959757962e-02\n-7.77963693900313447e-02\n-7.82416263129557671e-02\n-5.50036142107733911e-02\n-8.46517961518909387e-03\n4.91562777364010287e-02\n9.33822646147560720e-02\n9.58487719164076712e-02\n4.24772144820130607e-02\n-4.65598691879198223e-02\n-1.13679441747475324e-01\n-9.62149959696515095e-02\n1.20717917547753378e-02\n1.22548182401809980e-01\n1.08872226429116953e-01\n-4.32130296477229864e-02\n-1.55531788523725234e-01\n-4.44885773750465438e-02\n1.56684771078348439e-01\n9.27962309108906896e-02\n-1.70838270260580849e-01\n-8.35189980327244313e-02\n2.25548591513439145e-01\n-4.43181278791885333e-02\n-2.19282749461207516e-01\n3.21871882292338374e-01\n-2.60396133840431143e-01\n1.49110963578411526e-01\n-6.56065028271183986e-02\n2.30614389237014383e-02\n0.0\n9.31432284590557333e-04\n3.60742172633915590e-03\n8.50785829846518668e-03\n1.59038144394824943e-02\n2.57434886294072296e-02\n3.74509943101363971e-02\n4.96834786936413350e-02\n6.01340531170552681e-02\n6.55332229812901484e-02\n6.20622838490678883e-02\n4.63937669833873120e-02\n1.74303142948541122e-02\n-2.15653192725218240e-02\n-6.13804687110529948e-02\n-8.73929754708512030e-02\n-8.39577218615401993e-02\n-4.30845019244254918e-02\n2.54242314248754112e-02\n8.96504767433735500e-02\n1.06371656634025147e-01\n5.01879296954857307e-02\n-5.32384715035510991e-02\n-1.23727164705262682e-01\n-8.28621480629643387e-02\n5.28842374369255588e-02\n1.43118122506846468e-01\n5.62178737315308374e-02\n-1.23839508427887796e-01\n-1.28802590446136817e-01\n9.31732795134392194e-02\n1.63540555811263449e-01\n-1.06875525245128292e-01\n-1.62548125683655065e-01\n1.96502778370367587e-01\n4.42216723887418756e-02\n-2.70910252658010331e-01\n3.14220073526688959e-01\n-2.26727953512920272e-01\n1.20012016099874538e-01\n-4.96539924690501677e-02\n1.43926312609003546e-02\n2.49287685984835305e-02\n3.20572733309801433e-02\n3.73360945419248039e-02\n4.06573792095833025e-02\n4.12898785674629190e-02\n3.81293074854818018e-02\n2.99511520559924901e-02\n1.58169525661158959e-02\n-4.31789548805777256e-03\n-2.88498302994707988e-02\n-5.38454728941384075e-02\n-7.28654097338186507e-02\n-7.78976629371589541e-02\n-6.19378922925027456e-02\n-2.31777873226468728e-02\n3.04953646741392970e-02\n7.96559904402064228e-02\n9.80827720964613653e-02\n6.62805130793583525e-02\n-1.01319420178039802e-02\n-9.01534600473836989e-02\n-1.12793498222952177e-01\n-4.36446594772306531e-02\n7.51832890979873825e-02\n1.31762084742250707e-01\n4.54071520162745434e-02\n-1.09058469201991859e-01\n-1.32182088394122155e-01\n4.32417784409581327e-02\n1.68786295318351098e-01\n-4.16478756238320899e-04\n-1.91108683223519982e-01\n1.81668941927150066e-02\n2.11619098577669446e-01\n-1.37991426929743227e-01\n-1.28472692118315662e-01\n3.03062210785537689e-01\n-2.95123510379270704e-01\n1.92846215260071174e-01\n-9.50108099943796081e-02\n0.0\n8.69711215852774465e-04\n3.36837705500759926e-03\n7.94597281762401270e-03\n1.48649155591127347e-02\n2.41033786381555509e-02\n3.51804188988470434e-02\n4.69406270931234729e-02\n5.73692083815687814e-02\n6.35621854626744059e-02\n6.20297280736228918e-02\n4.95221107782248329e-02\n2.44705714906495661e-02\n-1.11456030570241098e-02\n-5.01850271189231978e-02\n-8.02356605359644814e-02\n-8.65262200122418890e-02\n-5.86610872932024699e-02\n3.09390595892175655e-04\n6.75868213148526631e-02\n1.04952909004363673e-01\n7.91895749792812659e-02\n-7.33654961899448364e-03\n-9.92346703423027110e-02\n-1.14440042750546978e-01\n-1.87206923697364053e-02\n1.09437118569347097e-01\n1.22413985674430306e-01\n-2.45540252704408608e-02\n-1.54349705690506211e-01\n-5.45639323152393926e-02\n1.53367588971229568e-01\n9.36793050197266136e-02\n-1.71130604674630343e-01\n-7.56002197522007841e-02\n2.24861510443226942e-01\n-5.99711449579766950e-02\n-2.01878098847852766e-01\n3.18073146693872377e-01\n-2.69297954792863781e-01\n1.61153452521790780e-01\n1.40363180204933317e-02\n2.43116159626890621e-02\n3.12720968152750203e-02\n3.64617925230233397e-02\n3.98199676148526804e-02\n4.06965621440733630e-02\n3.80854840902108416e-02\n3.08439218174229104e-02\n1.80394463077702127e-02\n-5.26361502732455313e-04\n-2.36521288413384552e-02\n-4.80950100442675485e-02\n-6.82971003647118990e-02\n-7.69840179181006251e-02\n-6.71362727746316335e-02\n-3.54523354435242952e-02\n1.35133423855260358e-02\n6.47340172815711878e-02\n9.49132736203922023e-02\n8.21583473810341414e-02\n2.17880532491658008e-02\n-6.02838519002846518e-02\n-1.11273590750590040e-01\n-8.30367244240201308e-02\n1.96867527956484135e-02\n1.16712520928417690e-01\n1.04367588005427114e-01\n-2.90378876241083085e-02\n-1.42334232596037419e-01\n-7.28496342592330343e-02\n1.15725791516723575e-01\n1.35467231602424687e-01\n-8.90793430167972494e-02\n-1.64620061525105305e-01\n1.09976624714079096e-01\n1.57671370658862608e-01\n-2.02684480408776624e-01\n-2.92302241977667361e-02\n2.63401527200791574e-01\n-3.21465755367340955e-01\n2.41844740714719203e-01\n0.0\n8.29271095729010570e-04\n3.21175314324963473e-03\n7.57814708065278429e-03\n1.41868082486014749e-02\n2.30401632917447384e-02\n3.37295096010599427e-02\n4.52403194086975838e-02\n5.57768626353002672e-02\n6.27102107032823791e-02\n6.28009415513202385e-02\n5.28652065175967967e-02\n3.09872806795576244e-02\n-1.82976687560864617e-03\n-4.00741394812135221e-02\n-7.31903559094905648e-02\n-8.74186632637197480e-02\n-7.09764057137248078e-02\n-2.19651150182625446e-02\n4.44845537404831987e-02\n9.61974990889871290e-02\n9.72308357430999026e-02\n3.36393900676129065e-02\n-6.29272440391177024e-02\n-1.20159247036696379e-01\n-7.60012531651900747e-02\n4.91826267344195878e-02\n1.35843360271165864e-01\n6.98427628043761239e-02\n-9.62442042669284514e-02\n-1.43683581544171546e-01\n3.01958420759398279e-02\n1.73539088148171178e-01\n6.56894504227399298e-03\n-1.95659341861534108e-01\n1.86406844574755932e-02\n2.16358734159889959e-01\n-1.46288545886937765e-01\n-1.28205944744727462e-01\n3.19000003842170310e-01\n-3.21532985242127922e-01\n1.41119111960528384e-02\n2.44425471834635970e-02\n3.14485160897507374e-02\n3.67055000527218289e-02\n4.01945740612099506e-02\n4.13223484985890954e-02\n3.91461449344397694e-02\n3.25705623806406344e-02\n2.06527378125307415e-02\n3.06595143625291305e-03\n-1.92980547992282862e-02\n-4.37164172966040890e-02\n-6.52915754368662560e-02\n-7.73051079350449560e-02\n-7.27338373333070720e-02\n-4.71442641562893824e-02\n-2.48073540783965221e-03\n4.98747463545853448e-02\n8.95099850907743050e-02\n9.36168806036541123e-02\n5.01309336643680492e-02\n-2.78833636330481950e-02\n-9.81761445972952895e-02\n-1.07879941755103390e-01\n-3.43588735380953997e-02\n7.78633237213550433e-02\n1.29740535512179594e-01\n5.23900687492168046e-02\n-9.43334333754873577e-02\n-1.40354977181565144e-01\n9.10324525851269437e-04\n1.58138265467907158e-01\n7.51824266332696556e-02\n-1.53224997980122374e-01\n-1.10999240403122812e-01\n1.74772382501494461e-01\n9.16298797711000423e-02\n-2.39534261364719253e-01\n4.83983109579129572e-02\n2.46786402996209103e-01\n-3.81050905685464902e-01\n0.0\n8.16636010046665572e-04\n3.16281766682400840e-03\n7.46426620267313760e-03\n1.39832143334558037e-02\n2.27443797254968903e-02\n3.33933574889099735e-02\n4.50156803528552751e-02\n5.59665999031886754e-02\n6.38005958597009648e-02\n6.54323129862380837e-02\n5.76818888500177998e-02\n3.83147621194472876e-02\n7.52537091529281721e-03\n-3.05006014736719649e-02\n-6.67405841661629640e-02\n-8.83548584427924499e-02\n-8.26102631146923283e-02\n-4.36842980366755410e-02\n1.99129793887820906e-02\n8.22991282704796934e-02\n1.07655318082257062e-01\n7.05058874759639936e-02\n-1.90310151444598695e-02\n-1.05403906859859259e-01\n-1.15429001432147030e-01\n-2.20076747523476751e-02\n1.04553069323846726e-01\n1.32237115197806510e-01\n5.34249338406868595e-03\n-1.43900099474553456e-01\n-1.06250846327311535e-01\n1.01452195080943386e-01\n1.63455845923351412e-01\n-6.90535327176911712e-02\n-1.94241333751663275e-01\n9.05062575763037475e-02\n2.03309414242975772e-01\n-2.00856682531033004e-01\n-1.15946576563307729e-01\n4.06870893947536061e-01\n1.45891733591048539e-02\n2.52691894983999125e-02\n3.25204224985586599e-02\n3.79961159127797307e-02\n4.17206016195497201e-02\n4.31434732205452504e-02\n4.13635554957183030e-02\n3.53091238060972493e-02\n2.40109300973868553e-02\n7.01904379435987734e-03\n-1.50443641272402749e-02\n-3.98946414026876625e-02\n-6.31842197004438555e-02\n-7.86573161517589575e-02\n-7.92883768682614704e-02\n-5.96836864000037728e-02\n-1.95120368673631986e-02\n3.31908021738720124e-02\n8.10610367232041246e-02\n1.01449059857229629e-01\n7.67823052314938054e-02\n8.57616956114869156e-03\n-7.33259503970075943e-02\n-1.18110453796342718e-01\n-8.41937057452631643e-02\n1.99415564191724945e-02\n1.19386215851518859e-01\n1.17746092491153767e-01\n-6.08860370549514467e-03\n-1.37881191620944615e-01\n-1.15091799846178844e-01\n6.57465152388446439e-02\n1.72601802626631884e-01\n1.69263397818339469e-02\n-1.89164244688334343e-01\n-6.56776590798061610e-02\n2.12446091300967838e-01\n6.01457778599179677e-02\n-2.71784498608986513e-01\n4.11963138542683557e-02\n3.96566699829604852e-01\n0.0\n8.14306999643437464e-04\n3.15379744831916246e-03\n7.44460032270118695e-03\n1.39562081094906504e-02\n2.27361722322057154e-02\n3.34805612489165044e-02\n4.53651892796140752e-02\n5.68800706219003763e-02\n6.57428836246522208e-02\n6.90055273815652070e-02\n6.34915596347347677e-02\n4.66774767134032348e-02\n1.80125709132499152e-02\n-1.95759948489087968e-02\n-5.86101583251627048e-02\n-8.73914793506096188e-02\n-9.27664998014943593e-02\n-6.57174555954243844e-02\n-8.52448430620803693e-03\n6.01433398044257661e-02\n1.07636975651490913e-01\n1.01378677440939702e-01\n3.20643065980008857e-02\n-6.74408434677696567e-02\n-1.28646688206332405e-01\n-9.18441987138462618e-02\n3.17195710974448458e-02\n1.38876839616049241e-01\n1.10114849598202613e-01\n-5.07065253455100673e-02\n-1.66821479920651078e-01\n-6.68206919875095895e-02\n1.46650502831556451e-01\n1.49856155602886704e-01\n-1.11966277911232995e-01\n-2.00207860487679745e-01\n1.13089938693995459e-01\n2.39671357781075539e-01\n-1.86968693326723001e-01\n-3.57266072287735825e-01\n1.51913069478551519e-02\n2.63121154670592113e-02\n3.38716081785584572e-02\n3.96174552699517096e-02\n4.36224374231580156e-02\n4.53819858798984663e-02\n4.40389064267173586e-02\n3.85483421976461349e-02\n2.79194657165445087e-02\n1.15857180841959402e-02\n-1.00943288034078728e-02\n-3.52770751820435588e-02\n-6.01943800299352405e-02\n-7.91370342108607544e-02\n-8.52431582229351698e-02\n-7.24028341523374058e-02\n-3.82394917000133117e-02\n1.25773877201863001e-02\n6.63685867339152136e-02\n1.02183016571182173e-01\n9.91144051059497100e-02\n4.85371135523851582e-02\n-3.39939626260699901e-02\n-1.06895137664717838e-01\n-1.19985377896467293e-01\n-4.99298513108724085e-02\n6.71132298251158471e-02\n1.41150995476452268e-01\n9.33403205332724722e-02\n-5.43520506260551581e-02\n-1.60188621444836643e-01\n-8.78320310989409575e-02\n1.07481656492317446e-01\n1.77480055397474273e-01\n-1.27431655713874901e-02\n-2.10237663285847670e-01\n-6.68139921339552939e-02\n2.31523778525697888e-01\n1.23457695953740093e-01\n-2.92828304706345466e-01\n-3.00431739521037688e-01\n0.0\n8.09488886815416375e-04\n3.13513697757608839e-03\n7.40222461018675854e-03\n1.38869082375350297e-02\n2.26601035071438590e-02\n3.34709026871681317e-02\n4.55914559135340361e-02\n5.76584892805028296e-02\n6.75743559451277148e-02\n7.25639424310881298e-02\n6.95082170809496469e-02\n5.56647672834081897e-02\n2.98043261451931447e-02\n-6.39378001001255063e-03\n-4.71378170974526417e-02\n-8.22891793833089025e-02\n-9.90414346916780181e-02\n-8.61503013408446289e-02\n-4.02628530952427385e-02\n2.79853609622107355e-02\n9.23931564162583374e-02\n1.18777199699381886e-01\n8.29646266082424144e-02\n-7.49117330593773202e-03\n-1.03733000943415171e-01\n-1.35662563319484564e-01\n-6.31714550149105603e-02\n7.28210830621822541e-02\n1.56058474214732068e-01\n8.88270917013415096e-02\n-8.57754850121616036e-02\n-1.78946643573406394e-01\n-5.08564896146024015e-02\n1.66763358792432342e-01\n1.64536922748032721e-01\n-1.05586158736712191e-01\n-2.45083601179981403e-01\n3.22763866525516419e-02\n3.45905065454114591e-01\n2.37368740230892133e-01\n1.58394302536164974e-02\n2.74346979622073633e-02\n3.53264103245064590e-02\n4.13650884902062449e-02\n4.56779408596592815e-02\n4.78134850910745188e-02\n4.69678487981070522e-02\n4.21346593468997013e-02\n3.23148779391594504e-02\n1.68383320580010945e-02\n-4.19294344235006909e-03\n-2.93874755341041426e-02\n-5.56078475659040616e-02\n-7.78149980083181064e-02\n-8.95380894011932049e-02\n-8.42819777636831524e-02\n-5.79701435539455162e-02\n-1.20207373571467081e-02\n4.41009393828372537e-02\n9.27409812267320777e-02\n1.12320052180855487e-01\n8.66891391105676923e-02\n1.71066513040895977e-02\n-6.98290419507804627e-02\n-1.27333248183795433e-01\n-1.11939468161495470e-01\n-1.80759610524680245e-02\n1.00307966585067521e-01\n1.50990676853224509e-01\n7.41913705077246605e-02\n-8.29766586217645374e-02\n-1.73472079812115904e-01\n-8.12966019019994435e-02\n1.21155937818708356e-01\n1.95386272515624820e-01\n1.03841699783363533e-02\n-2.21651182869384844e-01\n-1.55458189045574208e-01\n1.78759398995012864e-01\n3.48328782707474194e-01\n1.76882733784676782e-01\n0.0\n8.00717660863346520e-04\n3.10116616553789961e-03\n7.32372839102986544e-03\n1.37500145010879954e-02\n2.24743793684773763e-02\n3.33012482024041753e-02\n4.56052960721242268e-02\n5.81827879440274323e-02\n6.91446178154197649e-02\n7.59297587263067786e-02\n7.55414416606245698e-02\n6.51085268468369199e-02\n4.28237557207908556e-02\n9.17986407296201082e-03\n-3.17982181621353222e-02\n-7.19055630358779035e-02\n-9.94886990230315488e-02\n-1.02282036614100846e-01\n-7.24568608308860246e-02\n-1.26816618441638294e-02\n5.97354282285138538e-02\n1.14733625921233193e-01\n1.20560684034675528e-01\n6.26233762243425252e-02\n-3.88165467117967886e-02\n-1.27286846672492626e-01\n-1.37350565252244511e-01\n-4.45265441970365966e-02\n9.58577781295124332e-02\n1.67975175390432219e-01\n8.80164226000994671e-02\n-9.28841459379774054e-02\n-1.95342471884893398e-01\n-8.18584226324819281e-02\n1.51872653202305252e-01\n2.25913182299733506e-01\n5.35258786651279881e-03\n-2.80437241031251561e-01\n-3.12462514444366901e-01\n-1.24554763403326246e-01\n1.65579339063260250e-02\n2.86791827941240869e-02\n3.69393470941030977e-02\n4.33034231795912175e-02\n4.79598764104120640e-02\n5.05179189760969066e-02\n5.02367243147871442e-02\n4.61609563859515931e-02\n3.72990286572436394e-02\n2.28949827382603985e-02\n2.81005549322405675e-03\n-2.20140344206787887e-02\n-4.91046824911949564e-02\n-7.42012456909691559e-02\n-9.14523636361948000e-02\n-9.43535588884738124e-02\n-7.76025924324973693e-02\n-3.97309525197047375e-02\n1.41810104284052618e-02\n7.10549979958260969e-02\n1.11390112073516692e-01\n1.15211250836079304e-01\n7.19654353301436428e-02\n-9.17768702471413039e-03\n-9.53603343878544341e-02\n-1.39643574220663286e-01\n-1.06037012561775001e-01\n5.64722451745644451e-05\n1.18497595669503908e-01\n1.61024410963431258e-01\n7.69354879640444106e-02\n-8.51849667999362570e-02\n-1.87821535366545000e-01\n-1.15585674860815751e-01\n9.01859459789072088e-02\n2.27231647419055771e-01\n1.23924600562820370e-01\n-1.47873714290583325e-01\n-3.22991313238973898e-01\n-2.54866567083915141e-01\n-8.29312915781675042e-02\n0.0\n7.88002328701502318e-04\n3.05191989583358109e-03\n7.20916465515308250e-03\n1.35454482807603471e-02\n2.21782266407783007e-02\n3.29686754932876983e-02\n4.53986230630943205e-02\n5.84344650575005509e-02\n7.04170966990354391e-02\n7.90396467019338633e-02\n8.14961391339725783e-02\n7.48911825875120535e-02\n5.69737073554064111e-02\n2.71736920410942280e-02\n-1.22357923077765496e-02\n-5.52463951310859305e-02\n-9.21009730653976066e-02\n-1.10840201884253045e-01\n-1.00826351424937621e-01\n-5.78858538905995465e-02\n1.05567038097883516e-02\n8.33148396197296442e-02\n1.29647513305992251e-01\n1.21530577054345487e-01\n5.11368838930202074e-02\n-5.55037822627409833e-02\n-1.41392911545847738e-01\n-1.46066989028130367e-01\n-4.96826989935318791e-02\n9.54094488246532701e-02\n1.82055380904690256e-01\n1.24562613743021119e-01\n-5.32518279920622395e-02\n-2.06249370667994869e-01\n-1.79909924386293441e-01\n3.24930453760040108e-02\n2.58142619610616630e-01\n3.11790127816882645e-01\n1.91087469515029723e-01\n5.21953287807551750e-02\n1.73812313371743583e-02\n3.01051757740943213e-02\n3.87873823289097974e-02\n4.55235860424345537e-02\n5.05717601467626857e-02\n5.36102293220069998e-02\n5.39717756253078815e-02\n5.07660640751762815e-02\n4.30273942338075810e-02\n2.99371356162379983e-02\n1.11407563190354612e-02\n-1.28527043999719769e-02\n-4.02492827424932656e-02\n-6.76529240125735704e-02\n-9.00484645252776078e-02\n-1.01323847505603429e-01\n-9.55358184267284111e-02\n-6.89492583425410921e-02\n-2.25257657461351117e-02\n3.59652666303475754e-02\n9.15190162802047014e-02\n1.24570372113616296e-01\n1.17495682718007310e-01\n6.38674801602178016e-02\n-2.32256657899350578e-02\n-1.09639095223493951e-01\n-1.50757116244815831e-01\n-1.14360976732817352e-01\n-6.43608492101084128e-03\n1.18232410191867879e-01\n1.77804704485905241e-01\n1.16532119884231358e-01\n-4.15826845492937233e-02\n-1.87806335117927825e-01\n-1.98738534723297555e-01\n-4.18712809162051225e-02\n1.79211177787721498e-01\n3.04847663273562663e-01\n2.64264326197135802e-01\n1.32461523951864946e-01\n3.10206088141737057e-02\n0.0\n7.70734442202818766e-04\n2.98504165899997993e-03\n7.05293615271160215e-03\n1.32625064014414203e-02\n2.17534456414204408e-02\n3.24442646103404314e-02\n4.49273010516358304e-02\n5.83479864649352059e-02\n7.12970225071396929e-02\n8.17614912349341888e-02\n8.71988872025879214e-02\n8.48083901154575021e-02\n7.20633678999994809e-02\n4.75215867452140756e-02\n1.18302944000026732e-02\n-3.13093736423645450e-02\n-7.46326039672032260e-02\n-1.07800255263653749e-01\n-1.19391613063265956e-01\n-1.00549687417858191e-01\n-4.96735657413557297e-02\n2.34953956403232966e-02\n9.69567920166792968e-02\n1.41269444909111225e-01\n1.30927328618084343e-01\n5.93779948191034621e-02\n-4.97657268361521715e-02\n-1.45047477115215123e-01\n-1.68912703755308979e-01\n-9.32385062129872932e-02\n5.15998905315933759e-02\n1.80324554212369564e-01\n2.00272403036525548e-01\n7.94450143029908906e-02\n-1.18005864998715210e-01\n-2.70580589791928616e-01\n-2.92728066374727425e-01\n-2.00897824897958627e-01\n-8.51375194480581271e-02\n-1.73790904831320758e-02\n1.83551320839222022e-02\n3.17920213489908607e-02\n4.09730234953952360e-02\n4.81472168503696979e-02\n5.36525262084997651e-02\n5.72463194793477875e-02\n5.83471845566220851e-02\n5.61460960630569828e-02\n4.97255226518219032e-02\n3.82338245781803157e-02\n2.11366444670896790e-02\n-1.45537000504848430e-03\n-2.84158928969688654e-02\n-5.72688108598317924e-02\n-8.40245508977672112e-02\n-1.03366891128723298e-01\n-1.09378205912644758e-01\n-9.69195266223509405e-02\n-6.35911765702288356e-02\n-1.18791104121912395e-02\n4.93016175085608105e-02\n1.04760157358733300e-01\n1.35923558391570359e-01\n1.26815423287427786e-01\n7.19908251142357125e-02\n-1.66304376989831852e-02\n-1.08508152504858790e-01\n-1.62716574276226739e-01\n-1.45840381093683441e-01\n-5.31993192025362466e-02\n7.89968128231179206e-02\n1.83119843919997694e-01\n1.93720977129458183e-01\n8.98180906698897580e-02\n-8.33783325178764911e-02\n-2.36318594403374660e-01\n-2.92915147809902354e-01\n-2.42103519415372198e-01\n-1.38459486570548823e-01\n-5.07760654599059419e-02\n-9.15597638120778726e-03\n0.0\n7.47727206326201572e-04\n2.89593501760757564e-03\n6.84414511149327061e-03\n1.28804693356763169e-02\n2.11652283411506159e-02\n3.16738188801537895e-02\n4.41109717988995426e-02\n5.78081240382573441e-02\n7.16235444296976914e-02\n8.38771257654326030e-02\n9.23656110428158622e-02\n9.45147504261854288e-02\n8.77247491523285849e-02\n6.99437961552021037e-02\n4.04503038495557452e-02\n7.31300032259487231e-04\n-4.47808046289083633e-02\n-8.84770042975321219e-02\n-1.20274221496041042e-01\n-1.29591915368233557e-01\n-1.08613779453730755e-01\n-5.62454325032738026e-02\n1.85784446615858793e-02\n9.61759731999476675e-02\n1.49844002770998685e-01\n1.54625084166721022e-01\n9.91884773023238159e-02\n-4.11306413507600988e-03\n-1.17639028681427213e-01\n-1.90094923904238627e-01\n-1.79815302535788285e-01\n-7.93557297875617240e-02\n7.42772112908915011e-02\n2.14814808314452738e-01\n2.82719396450428040e-01\n2.59806367168042618e-01\n1.76781218797009282e-01\n8.69523390244753558e-02\n2.80743662364635396e-02\n4.52140858488629671e-03\n1.95546081948302850e-02\n3.38695749155487752e-02\n4.36640356719995709e-02\n5.13733976123506991e-02\n5.74295683748292443e-02\n6.16813287194309806e-02\n6.36477798124080313e-02\n6.26208588417118267e-02\n5.77586119126014680e-02\n4.82143889980161666e-02\n3.33236199055456372e-02\n1.28546905699791162e-02\n-1.26896892140092032e-02\n-4.17633283312096523e-02\n-7.15394507761492465e-02\n-9.78637793209315709e-02\n-1.15540626421963749e-01\n-1.19082985621070614e-01\n-1.03982024603212028e-01\n-6.83909998145912912e-02\n-1.48770405703576233e-02\n4.83773639353690665e-02\n1.07727615964768778e-01\n1.46309552184934799e-01\n1.48610225469829604e-01\n1.06631076562561933e-01\n2.56623403179308020e-02\n-7.32658797029173831e-02\n-1.57034623256185585e-01\n-1.91033002671174734e-01\n-1.53961732902900605e-01\n-5.03490974239819492e-02\n8.70140738598431940e-02\n2.09014312224144405e-01\n2.72783221580517599e-01\n2.62911044434227636e-01\n1.97664552028498947e-01\n1.15278977979148933e-01\n4.98268192506951743e-02\n1.43549337982454266e-02\n2.08399007031178198e-03\n0.0\n7.16972213132606906e-04\n2.77682144115606096e-03\n6.56435831797286175e-03\n1.23643452538784848e-02\n2.03549834713855071e-02\n3.05666200087578062e-02\n4.28161911007453738e-02\n5.66253106431885977e-02\n7.11342327388127804e-02\n8.50316286723990372e-02\n9.65296014346878756e-02\n1.03422267906931709e-01\n1.03270625605846766e-01\n9.37505396807863656e-02\n7.31776411054933656e-02\n4.11766778404632355e-02\n-6.08042917111032886e-04\n-4.79516122138099049e-02\n-9.39069487333423630e-02\n-1.29383190270924237e-01\n-1.44671684120347560e-01\n-1.31922896549134000e-01\n-8.81929263954772946e-02\n-1.82054065486664113e-02\n6.44048390366343121e-02\n1.38613028038587965e-01\n1.80920226598560940e-01\n1.72978818828327996e-01\n1.09565566420560798e-01\n3.31237957527762443e-03\n-1.17131275539571200e-01\n-2.16440796441434019e-01\n-2.66444726781221441e-01\n-2.57963840553918411e-01\n-2.03948237064660171e-01\n-1.31518879512641879e-01\n-6.74270908975595634e-02\n-2.60152783988874883e-02\n-6.75979479010866552e-03\n-8.91615820176033975e-04\n2.11205475899812652e-02\n3.65818615095239580e-02\n4.71756465631248192e-02\n5.55760229803755612e-02\n6.23294438920706656e-02\n6.73926814591863516e-02\n7.04040908616250100e-02\n7.07812138028569154e-02\n6.77922593200420559e-02\n6.06447503709232338e-02\n4.86115160900352436e-02\n3.12037471141832154e-02\n8.38978623070524634e-03\n-1.91573387487461444e-02\n-4.98218565320337203e-02\n-8.08798331807340093e-02\n-1.08492774439399503e-01\n-1.27958319690621991e-01\n-1.34302577282282676e-01\n-1.23245185504223559e-01\n-9.24651424902426661e-02\n-4.29477862044768607e-02\n1.99688486779726337e-02\n8.63451064531085832e-02\n1.42666223338872439e-01\n1.74385406791932734e-01\n1.69739047578262137e-01\n1.23940068829678701e-01\n4.22796439946951236e-02\n-5.94799004947276638e-02\n-1.58435185219469199e-01\n-2.31208653718345730e-01\n-2.61812145467339386e-01\n-2.47379870406382069e-01\n-1.98806934102406269e-01\n-1.35560548023998140e-01\n-7.70890688393309625e-02\n-3.53546503104250828e-02\n-1.23235158914925640e-02\n-2.91360208694515675e-03\n-3.51539299541852744e-04\n0.0\n6.74808924995576277e-04\n2.61352372837999692e-03\n6.17999012962414974e-03\n1.16504439716732071e-02\n1.92162999302144914e-02\n2.89585277567998671e-02\n4.08028273633912753e-02\n5.44606861129757480e-02\n6.93629416228113971e-02\n8.45964349321213505e-02\n9.88597272248988579e-02\n1.10459682687678570e-01\n1.17375386823165201e-01\n1.17416913496523903e-01\n1.08500624154809919e-01\n8.90464581173981418e-02\n5.84734263065921564e-02\n1.77274047868261932e-02\n-3.02743376249937739e-02\n-8.04419954238866086e-02\n-1.25734493279231557e-01\n-1.57950028309349677e-01\n-1.69127443890412427e-01\n-1.53416578658671726e-01\n-1.09042540288656606e-01\n-3.97782012245206165e-02\n4.47391436832952419e-02\n1.30344766551523689e-01\n2.01373025322775429e-01\n2.44733881336662157e-01\n2.53760834913062339e-01\n2.30307968265474394e-01\n1.84017528774869266e-01\n1.28799815335187640e-01\n7.79085095670274674e-02\n3.97919106140308607e-02\n1.65361764825689671e-02\n5.25716714361549545e-03\n1.13930449034971336e-03\n1.26489372471995631e-04\n2.33676558084912923e-02\n4.04739671140889115e-02\n5.22118925724724264e-02\n6.15896981180853800e-02\n6.93029973630257812e-02\n7.54416255309941081e-02\n7.97894100308611381e-02\n8.19226154424366748e-02\n8.12654815248944340e-02\n7.71454487022925489e-02\n6.88660445617096384e-02\n5.58071229269942945e-02\n3.75565405197159849e-02\n1.40706064034303979e-02\n-1.41486007492134126e-02\n-4.58827827832536811e-02\n-7.90708020956165103e-02\n-1.10774674620031849e-01\n-1.37292788734624471e-01\n-1.54468797123277157e-01\n-1.58220312078789282e-01\n-1.45265205780194306e-01\n-1.13956881679557503e-01\n-6.50646597618557143e-02\n-2.27414396377027383e-03\n6.78329351192613061e-02\n1.36497045326585215e-01\n1.94217032845724696e-01\n2.32688546575503225e-01\n2.46781782552066092e-01\n2.35942791979550537e-01\n2.04455794959895465e-01\n1.60317283826628937e-01\n1.12980268039703791e-01\n7.07262017202243132e-02\n3.86442509520263655e-02\n1.79610617025915201e-02\n6.83059458623368806e-03\n1.99606604444841186e-03\n3.99006761066577741e-04\n4.09757208813625381e-05\n0.0\n6.13346909832070868e-04\n2.37548236722739253e-03\n5.61866616279389514e-03\n1.06016437641141634e-02\n1.75205298957685981e-02\n2.64980625844669360e-02\n3.75593462889419263e-02\n5.05973417942206863e-02\n6.53310660252589548e-02\n8.12607592836111642e-02\n9.76264376392921851e-02\n1.13378896372326926e-01\n1.27174890391380857e-01\n1.37410159739427190e-01\n1.42304161425356790e-01\n1.40047544150445652e-01\n1.29016275665374269e-01\n1.08044027122788822e-01\n7.67270921586633847e-02\n3.57156962663936414e-02\n-1.30736622831728599e-02\n-6.64014343405960744e-02\n-1.19875340281718590e-01\n-1.68390452403613583e-01\n-2.06826045950683574e-01\n-2.30909705821725375e-01\n-2.38079667679669760e-01\n-2.28122768605157067e-01\n-2.03370204444252023e-01\n-1.68318526701604687e-01\n-1.28703430495807541e-01\n-9.02448820648028976e-02\n-5.74276308319674814e-02\n-3.27017719788059366e-02\n-1.63468242759115152e-02\n-6.98247588149434033e-03\n-2.44936001252069740e-03\n-6.62182964765297257e-04\n-1.22758329153919147e-04\n-1.17147809240487373e-05\n2.72441120261420477e-02\n4.71881862363762936e-02\n6.08936784895427602e-02\n7.19272797827283095e-02\n8.12091128548719510e-02\n8.90100999502380641e-02\n9.53040715638161784e-02\n9.98777914949004059e-02\n1.02379821566170343e-01\n1.02353359248571793e-01\n9.92694443917222086e-02\n9.25684592991523753e-02\n8.17143022032630340e-02\n6.62631007018084361e-02\n4.59455563584386731e-02\n2.07585033301248452e-02\n-8.94301060423527069e-03\n-4.23664800779582212e-02\n-7.82331276585653407e-02\n-1.14779612983017074e-01\n-1.49829481146177251e-01\n-1.80947629871583443e-01\n-2.05678950219387119e-01\n-2.21854178747922348e-01\n-2.27924215139046815e-01\n-2.23263624866784638e-01\n-2.08371914938015435e-01\n-1.84905226598310657e-01\n-1.55496806599206561e-01\n-1.23371500971977355e-01\n-9.18182172472808977e-02\n-6.36366641213115258e-02\n-4.06984596978146457e-02\n-2.37409366108572543e-02\n-1.24437569531707388e-02\n-5.74497747629241530e-03\n-2.27281969251956527e-03\n-7.40177984487567489e-04\n-1.86145789492165545e-04\n-3.21546615509588678e-05\n-2.86321068406389314e-06\n0.0\n5.08720544576621043e-04\n1.97026619701882143e-03\n4.66154068001083458e-03\n8.80367753521266519e-03\n1.45781946651312323e-02\n2.21289200475006248e-02\n3.15565457351855080e-02\n4.29080980588039812e-02\n5.61625531768684197e-02\n7.12137641513376912e-02\n8.78522180058424751e-02\n1.05747721235710537e-01\n1.24435806599369675e-01\n1.43311334809756163e-01\n1.61633257363858807e-01\n1.78544582677957586e-01\n1.93110980420314771e-01\n2.04379908541074684e-01\n2.11459478464590817e-01\n2.13612503026713335e-01\n2.10356628852996830e-01\n2.01556879205147671e-01\n1.87493488045096385e-01\n1.68887043783379709e-01\n1.46866088301874670e-01\n1.22870260454109995e-01\n9.84944546009259014e-02\n7.52942092140458097e-02\n5.45858494200464478e-02\n3.72819950280122020e-02\n2.37997241744879809e-02\n1.40634382534456648e-02\n7.60016430375573624e-03\n3.69905385317536054e-03\n1.58894330578013580e-03\n5.85890856857546548e-04\n1.78102189080420019e-04\n4.18628083149948058e-05\n6.76616248983536962e-06\n5.64267047626234160e-07\n3.88913140851440756e-02\n6.73617319685886479e-02\n8.69563077074669982e-02\n1.02853473121955946e-01\n1.16526771414100574e-01\n1.28608454199817368e-01\n1.39400509572217196e-01\n1.49034898987458864e-01\n1.57539088103538338e-01\n1.64868423652527990e-01\n1.70925483294179947e-01\n1.75574494947010856e-01\n1.78654637151141493e-01\n1.79994202399308745e-01\n1.79426622235986349e-01\n1.76808642288132700e-01\n1.72040273266782923e-01\n1.65085454378325891e-01\n1.55991658236399350e-01\n1.44906017636714263e-01\n1.32085097703907250e-01\n1.17895345629829271e-01\n1.02801706019434586e-01\n8.73430293196171825e-02\n7.20947463423470825e-02\n5.76216708260290367e-02\n4.44263307491285925e-02\n3.29003077333269306e-02\n2.32869622747691046e-02\n1.56630176478231332e-02\n9.94351345131256475e-03\n5.90998281588030541e-03\n3.25641967242686591e-03\n1.64325593225289395e-03\n7.47734169618441587e-04\n3.00625794424687169e-04\n1.03856083970970154e-04\n2.96053337722193038e-05\n6.53065888946697038e-06\n9.91283335336439522e-07\n7.76825744619531195e-08\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n1.53207183589857505e-03\n5.93368870562860362e-03\n1.39634001360953008e-02\n2.59150123110877748e-02\n4.12720630158234653e-02\n5.81811824191460561e-02\n7.29296222864153215e-02\n7.98066363879913337e-02\n7.19540357193568236e-02\n4.38681329319077634e-02\n-4.26141187609695941e-03\n-6.16093793018236829e-02\n-1.04741554068370601e-01\n-1.04112030837777425e-01\n-4.27409109972499354e-02\n5.87322652792297700e-02\n1.32712680317800341e-01\n1.01403537238645439e-01\n-3.84929813278604011e-02\n-1.57613801986351054e-01\n-8.93970805950522335e-02\n1.23930799360517610e-01\n1.64222281816483379e-01\n-1.02844105191431362e-01\n-1.94414007829319946e-01\n1.74250886017714796e-01\n1.27441062767785412e-01\n-3.30972425194132169e-01\n3.08024984650235589e-01\n-1.82925254376322621e-01\n7.87385774310291608e-02\n-2.58929108614052300e-02\n6.67537840086772707e-03\n-1.36588223290353902e-03\n2.22587496886450173e-04\n-2.87801523862112907e-05\n2.91948181034421179e-06\n-2.27610996871251364e-07\n1.31749262489557947e-08\n-5.33626204258542593e-10\n1.35043502499676116e-11\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.75385715931343188e-02\n3.03776970914928675e-02\n3.89894299482247964e-02\n4.50537831243302128e-02\n4.80480260970503614e-02\n4.65400382039492799e-02\n3.86255045510803599e-02\n2.25480495396490899e-02\n-2.27174361599671252e-03\n-3.38181129256359611e-02\n-6.60703944825465073e-02\n-8.85536648892354811e-02\n-8.83022665547520402e-02\n-5.55258773678883391e-02\n7.46609704613757606e-03\n7.83492811499439806e-02\n1.16648725092663261e-01\n8.43733130090411482e-02\n-1.70104229921458350e-02\n-1.20305094638899268e-01\n-1.22969970230733555e-01\n9.35905132160869992e-03\n1.50958694957938427e-01\n1.03915462896002508e-01\n-1.13821482581893951e-01\n-1.65617979165724905e-01\n1.02078086683356023e-01\n1.87205802845349906e-01\n-1.80482528572332379e-01\n-1.05887032567924186e-01\n3.16897122331143477e-01\n-3.11506306360772478e-01\n1.94908626118926759e-01\n-8.88419912097003217e-02\n3.11734890841552197e-02\n-8.65603665299482031e-03\n1.92915844115690120e-03\n-3.47110560421079798e-04\n5.03961499458167799e-05\n-5.86624629182310696e-06\n5.40333524333498994e-07\n-3.85266344302698084e-08\n0.0\n1.27957098505530626e-03\n4.95575711540942061e-03\n1.16729154582532260e-02\n2.17298714766428966e-02\n3.48463920087801471e-02\n4.97890096437866164e-02\n6.39661460133040538e-02\n7.32162053931973561e-02\n7.21602998827598069e-02\n5.55765345251779536e-02\n2.10888036966206845e-02\n-2.71967000961087849e-02\n-7.57556405665781724e-02\n-1.02576258694562480e-01\n-8.55111455040393625e-02\n-1.85689543275236214e-02\n7.13685108828726461e-02\n1.24881736372987995e-01\n8.51840841702030255e-02\n-3.93941327750228082e-02\n-1.42330243848803439e-01\n-9.42257757604895024e-02\n8.54747418851426743e-02\n1.66546977429292226e-01\n-1.57040975955216495e-02\n-1.97467238887139795e-01\n1.88019344819042753e-03\n2.29365773327595113e-01\n-1.02939542298359471e-01\n-1.91533197604292826e-01\n3.33816802434613924e-01\n-2.79815352320624822e-01\n1.58802675309585639e-01\n-6.73083989677173422e-02\n2.22633667178538525e-02\n-5.87886221383933892e-03\n1.25374425751272251e-03\n-2.16874130346125208e-04\n3.03833333739193043e-05\n-3.42291948358810507e-06\n3.05900500334992816e-07\n1.67998963697789869e-02\n2.90982740743491418e-02\n3.73653598428562717e-02\n4.32630585701962167e-02\n4.63845439304416546e-02\n4.54855374773626767e-02\n3.88656105329682616e-02\n2.48760515819519343e-02\n2.76248927439959324e-03\n-2.61461269874080811e-02\n-5.71751743013211092e-02\n-8.16723200395411547e-02\n-8.81468944587803921e-02\n-6.63517542910652819e-02\n-1.44275582313402300e-02\n5.34454003267656186e-02\n1.05157476202398611e-01\n1.02564527870412203e-01\n2.95638071887795867e-02\n-7.78829860681743424e-02\n-1.33783853231397715e-01\n-6.61391846771635511e-02\n8.51730529332656305e-02\n1.53220131301867651e-01\n1.78247327774137959e-02\n-1.65860741937026962e-01\n-8.84648720065237676e-02\n1.73136635651717358e-01\n9.94041328991700918e-02\n-2.27739976004474237e-01\n9.92889030237806280e-03\n2.57981308786261521e-01\n-3.31215699964790000e-01\n2.43523231334170337e-01\n-1.26668644069714481e-01\n5.02013264765940881e-02\n-1.57083873856488608e-02\n3.95453538621156307e-03\n-8.08548562461253325e-04\n1.34666690917019426e-04\n-1.82273378245424085e-05\n1.98945034298997128e-06\n0.0\n1.17611905411319677e-03\n4.55508950973763059e-03\n1.07332437596460353e-02\n2.00053466080129805e-02\n3.21708251300036885e-02\n4.62157369305064986e-02\n5.99569807959743767e-02\n6.98231764937807392e-02\n7.10666469610914259e-02\n5.87838173536138764e-02\n3.00317667809017960e-02\n-1.31227298005185036e-02\n-6.07293446452311855e-02\n-9.46088691311984253e-02\n-9.35696681233219724e-02\n-4.56847854471817902e-02\n3.61951623169514056e-02\n1.07666230964300030e-01\n1.10940056055570280e-01\n2.23536404712941332e-02\n-1.00507026215863521e-01\n-1.35846752025430423e-01\n-1.62287775947386539e-02\n1.42403677764532943e-01\n1.14823057616365340e-01\n-1.05370369333667627e-01\n-1.65777370680363939e-01\n1.02664257142281695e-01\n1.79459461357025007e-01\n-1.86341187303239342e-01\n-8.48039923446599619e-02\n3.02150116039196281e-01\n-3.13662584476783246e-01\n2.06223255771356168e-01\n-9.91270584712680702e-02\n3.69077227635071434e-02\n-1.09593457663549939e-02\n2.63629687647285501e-03\n-5.17675440839648849e-04\n8.31331196461242443e-05\n-1.08836230260350923e-05\n1.61209358969004006e-02\n2.79222800389924385e-02\n3.58705158494969020e-02\n4.16048844873131707e-02\n4.48145796345919764e-02\n4.44149286926247902e-02\n3.88846143685038989e-02\n2.66859736745814549e-02\n6.95995292738730599e-03\n-1.94741915059951053e-02\n-4.90011512100408941e-02\n-7.44963573181686850e-02\n-8.59117125330516457e-02\n-7.31800334021966842e-02\n-3.18406489584774702e-02\n3.00613580122183512e-02\n8.81760864809435774e-02\n1.07758027236485809e-01\n6.36345166732261575e-02\n-3.19775709201447697e-02\n-1.16651005258213716e-01\n-1.09883142936945427e-01\n7.71332431880235141e-03\n1.33714841104318055e-01\n1.10916738466508430e-01\n-6.95642157376279158e-02\n-1.68350522031614575e-01\n8.72211081792217090e-03\n1.95222452870719654e-01\n-6.44875876930143740e-03\n-2.23734792520582038e-01\n1.15274523921249414e-01\n1.70164055544511583e-01\n-3.24324435263553978e-01\n2.85949691670869810e-01\n-1.70491924017916185e-01\n7.62429970789571115e-02\n-2.67770108001629537e-02\n7.56631678679085991e-03\n-1.74273729469408539e-03\n3.29187814162721173e-04\n-5.10371019712366366e-05\n0.0\n1.08472742480011518e-03\n4.20113125142530450e-03\n9.90251970548785068e-03\n1.84771170931635337e-02\n2.97864244789218663e-02\n4.29935124395057627e-02\n5.62502049288229680e-02\n6.64805016943752491e-02\n6.94951640404161963e-02\n6.07489836588698887e-02\n3.70087188193212180e-02\n-1.10930973825388961e-03\n-4.64683007258606673e-02\n-8.43432668172089117e-02\n-9.54507151960313355e-02\n-6.49196479680209798e-02\n4.37546628631686925e-03\n8.19387105322739034e-02\n1.16402125933259007e-01\n6.80514714230174567e-02\n-4.51112438055840115e-02\n-1.31643108974592749e-01\n-9.06119506287313276e-02\n6.35740426489872362e-02\n1.55664102001632776e-01\n3.25463012377503677e-02\n-1.61062964109385531e-01\n-9.14113874613537575e-02\n1.71651781976959461e-01\n9.17992461750585242e-02\n-2.26861122296648315e-01\n2.74638834234203905e-02\n2.38715687230688756e-01\n-3.27133758366378202e-01\n2.52461693888423433e-01\n-1.37970367047465875e-01\n5.77226738536806838e-02\n-1.91900278900187862e-02\n5.17285235326626295e-03\n-1.14295039517799818e-03\n2.07983783534782863e-04\n1.54947298702197613e-02\n2.68376593847757423e-02\n3.44901388098918169e-02\n4.00656054545979953e-02\n4.33332132805616527e-02\n4.33446020870913301e-02\n3.87358884941204074e-02\n2.80789942572605838e-02\n1.04587751009113210e-02\n-1.36835416639946549e-02\n-4.15672239040754954e-02\n-6.73389103888062945e-02\n-8.22904531255093108e-02\n-7.68946789988780022e-02\n-4.51824610402943791e-02\n9.28246675529422263e-03\n6.88175392810461417e-02\n1.03622605472041371e-01\n8.51625136247578240e-02\n9.40258184339599901e-03\n-8.42585598857404083e-02\n-1.23190786327214752e-01\n-5.60485719311771269e-02\n7.71490614626922228e-02\n1.41957695325968247e-01\n3.80250397354753092e-02\n-1.33107396478956974e-01\n-1.22897471420958124e-01\n9.85217682108785742e-02\n1.65001262430362949e-01\n-1.04334216453814924e-01\n-1.71211821180607154e-01\n1.91700101196119521e-01\n6.42229997145532250e-02\n-2.86770471978783414e-01\n3.14521543804425097e-01\n-2.16820136654885531e-01\n1.09526389773627747e-01\n-4.30717377607578791e-02\n1.35966970931397889e-02\n-3.50420564980156134e-03\n7.44011638504313267e-04\n0.0\n1.00359154179651311e-03\n3.88689332777251983e-03\n9.16454775679640711e-03\n1.71166534345601924e-02\n2.76532866118409659e-02\n4.00812416905600294e-02\n5.28286561198537952e-02\n6.32366563598580345e-02\n6.76067702992390052e-02\n6.17616540143108433e-02\n4.23613529467761693e-02\n9.00614698307224820e-03\n-3.33556649828779250e-02\n-7.29895690727623281e-02\n-9.29117019120978826e-02\n-7.72595235529618951e-02\n-2.22245501376358047e-02\n5.33119039370415770e-02\n1.07453750260195172e-01\n9.53988129585934819e-02\n7.90425845100160493e-03\n-9.86239829234897836e-02\n-1.24796278246346454e-01\n-2.07804137625995367e-02\n1.22067964894351066e-01\n1.23206354407053964e-01\n-5.54670524310314147e-02\n-1.68875417105266046e-01\n3.75244690586734857e-03\n1.93024036782156211e-01\n-1.19717926722552222e-02\n-2.17726056729952128e-01\n1.26958628040874294e-01\n1.49005933143862956e-01\n-3.13853674128423799e-01\n2.90873894832475666e-01\n-1.81750281690135213e-01\n8.54436999096880451e-02\n-3.17120158055341217e-02\n9.53167499528459819e-03\n-2.35345072285976465e-03\n1.49153903800800756e-02\n2.58342139530227596e-02\n3.32116930791154716e-02\n3.86333713753163263e-02\n4.19352959240168743e-02\n4.22860881140053116e-02\n3.84604171229619984e-02\n2.91355088282530053e-02\n1.33736068600258211e-02\n-8.66377169812252400e-03\n-3.48543238383958315e-02\n-6.03978763216038578e-02\n-7.77937186287958465e-02\n-7.82389109849811609e-02\n-5.50016303960556632e-02\n-8.46473664884386280e-03\n4.91547468148954628e-02\n9.33791272952701895e-02\n9.58453728351357642e-02\n4.24754674343999772e-02\n-4.65585854400785565e-02\n-1.13675606317601652e-01\n-9.62113394766971469e-02\n1.20719365492614628e-02\n1.22544141622841662e-01\n1.08867878152718270e-01\n-4.32123372886385471e-02\n-1.55526192227649102e-01\n-4.44857893542556296e-02\n1.56679535792783542e-01\n9.27912933179021876e-02\n-1.70832549099496050e-01\n-8.35135789743660234e-02\n2.25539577026705851e-01\n-4.43192076416230041e-02\n-2.19269938758637400e-01\n3.21855607667310972e-01\n-2.60383639956572099e-01\n1.49104007882833012e-01\n-6.56034962156254592e-02\n2.30603948109545341e-02\n-6.61579341349721999e-03\n0.0\n9.31247534411623308e-04\n3.60670619197293527e-03\n8.50617060521896388e-03\n1.59006586839177677e-02\n2.57383770138793072e-02\n3.74435486389885844e-02\n4.96735791674125932e-02\n6.01220264473545582e-02\n6.55200330949597953e-02\n6.20496478615608638e-02\n4.63840771617881620e-02\n1.74262297633950534e-02\n-2.15616957616285090e-02\n-6.13687459475196970e-02\n-8.73755812559666167e-02\n-8.39402444006266679e-02\n-4.30744127854331207e-02\n2.54208763284318046e-02\n8.96334585537217621e-02\n1.06349404981223417e-01\n5.01750293357579938e-02\n-5.32306753938282667e-02\n-1.23702279643498295e-01\n-8.28413848611821435e-02\n5.28781958056001034e-02\n1.43088141762620941e-01\n5.61991460748368921e-02\n-1.23817984900689682e-01\n-1.28768016249258571e-01\n9.31620351197829794e-02\n1.63496205575340475e-01\n-1.06863218184563014e-01\n-1.62495306727887423e-01\n1.96462730095691623e-01\n4.41832530144878749e-02\n-2.70812136790227420e-01\n3.14119131969444909e-01\n-2.26658840912432907e-01\n1.19976522537918975e-01\n-4.96395942520686875e-02\n1.65768721434787804e-02\n1.43793665716917245e-02\n2.49057934828275720e-02\n3.20277245688331061e-02\n3.73016619830294910e-02\n4.06198321626250608e-02\n4.12516321397871297e-02\n3.80937634717536319e-02\n2.99228198826085451e-02\n1.58012190627195813e-02\n-4.31552439590590902e-03\n-2.88251524139892558e-02\n-5.37976356914805082e-02\n-7.27991774527403518e-02\n-7.78249844411612740e-02\n-6.18773554997722325e-02\n-2.31504853863060273e-02\n3.04740764073745361e-02\n7.95869714624685004e-02\n9.79904957189920850e-02\n6.62096093190641388e-02\n-1.01366230291109090e-02\n-9.00788993594014153e-02\n-1.12682532989735934e-01\n-4.35825188004750202e-02\n7.51326306171029162e-02\n1.31632025057033475e-01\n4.53302632439088332e-02\n-1.08978048949653517e-01\n-1.32026924157120501e-01\n4.32500869230021887e-02\n1.68604703396098343e-01\n-4.89845006449807631e-04\n-1.90896830357503156e-01\n1.82477252920327619e-02\n2.11323399302604964e-01\n-1.37927282560425052e-01\n-1.28126008915635664e-01\n3.02511798532171194e-01\n-2.94642321511796923e-01\n1.92548209151796046e-01\n-9.48687092392046377e-02\n3.70605405069176150e-02\n0.0\n8.66914608584642629e-04\n3.35754584163224217e-03\n7.92041850718593239e-03\n1.48170882161490838e-02\n2.40257482330298033e-02\n3.50668942735053654e-02\n4.67886454764313495e-02\n5.71824205433799915e-02\n6.33532941899979801e-02\n6.18225056061263017e-02\n4.93510339417068469e-02\n2.43761712108501519e-02\n-1.11271545997009454e-02\n-5.00377381194941073e-02\n-7.99810099618885051e-02\n-8.62332978112458071e-02\n-5.84377093041681811e-02\n3.53790540522311791e-04\n6.74025002946104929e-02\n1.04607848501457809e-01\n7.88750519379462917e-02\n-7.39634282680003141e-03\n-9.89539054065291801e-02\n-1.14007619137889288e-01\n-1.85265135158630724e-02\n1.09146964308099531e-01\n1.21896204412076894e-01\n-2.46672211133109574e-02\n-1.53816631886663835e-01\n-5.41010123124317510e-02\n1.52926004676389282e-01\n9.29807477178590802e-02\n-1.70628305512507294e-01\n-7.47672262150261141e-02\n2.23855980518047643e-01\n-6.04119090513682150e-02\n-1.99938328699452661e-01\n3.15746325166150810e-01\n-2.67518653500367631e-01\n1.60146318000649268e-01\n-7.38644362910142738e-02\n1.39097356860879515e-02\n2.40923689281582684e-02\n3.09900218051920653e-02\n3.61326357673965731e-02\n3.94597234850879788e-02\n4.03266616059795233e-02\n3.77359510841760795e-02\n3.05547324766912015e-02\n1.78590846849005710e-02\n-5.46607759437464148e-04\n-2.34694037959155000e-02\n-4.76917373681956663e-02\n-6.77009379165065817e-02\n-7.62844407077845760e-02\n-6.64869799366789582e-02\n-3.50466412029054458e-02\n1.35024859110712356e-02\n6.42425194169863462e-02\n9.40701413408569498e-02\n8.13062645175147702e-02\n2.13774386419575170e-02\n-5.99401639955146753e-02\n-1.10284280582712668e-01\n-8.20283683614592973e-02\n1.98899125288558541e-02\n1.15788586926213410e-01\n1.03049956963074035e-01\n-2.93487514605415140e-02\n-1.41056666549816107e-01\n-7.14052355700249552e-02\n1.15181086034110855e-01\n1.33374937439491137e-01\n-8.92122474806155141e-02\n-1.61962208392406937e-01\n1.10143072808627618e-01\n1.54039118045551870e-01\n-2.01018835764503662e-01\n-2.53048417813358760e-02\n2.55697971956567294e-01\n-3.13899732963080547e-01\n2.36686220759552868e-01\n-1.30936396734099625e-01\n0.0\n8.14043221943185915e-04\n3.15277584167898695e-03\n7.43895777181305135e-03\n1.39260417943802041e-02\n2.26159577139268507e-02\n3.31065363664129336e-02\n4.44001787480116927e-02\n5.47316724007773855e-02\n6.15175909872770765e-02\n6.15761754200131739e-02\n5.17835041913542182e-02\n3.02669213219593503e-02\n-1.97197339789330350e-03\n-3.94972755302458803e-02\n-7.19215204153959148e-02\n-8.57290320123889338e-02\n-6.93864337354129640e-02\n-2.11208146721548473e-02\n4.40845220387171832e-02\n9.45509528213329536e-02\n9.50585102973090651e-02\n3.22181718903043895e-02\n-6.24728550746584468e-02\n-1.17850930354055736e-01\n-7.34966353083338075e-02\n4.95137682557562492e-02\n1.33207498359589005e-01\n6.67184427968016136e-02\n-9.58777292070963350e-02\n-1.39509796327717761e-01\n3.24559475601528466e-02\n1.69313042117662266e-01\n2.25460488193684680e-03\n-1.90560529040795817e-01\n2.40767922085126478e-02\n2.07178352421955037e-01\n-1.48378182454922680e-01\n-1.11215710199768975e-01\n2.95916867515424731e-01\n-3.02150853070531744e-01\n2.05921120676399644e-01\n1.36672864392465010e-02\n2.36724345143720649e-02\n3.04573253450117695e-02\n3.55470026595847560e-02\n3.89213432175620766e-02\n4.00030864337259373e-02\n3.78763033785111530e-02\n3.14777657060406890e-02\n1.98944147841869680e-02\n2.81500271425923730e-03\n-1.88837033118915525e-02\n-4.25420568068309649e-02\n-6.33873654473308262e-02\n-7.48865612201098235e-02\n-7.02337412900912589e-02\n-4.51783315088788787e-02\n-1.71127660530541762e-03\n4.89857311439775567e-02\n8.70057919535456997e-02\n9.02701879067418500e-02\n4.73789281947346111e-02\n-2.84702252784636706e-02\n-9.58487010465046418e-02\n-1.03630800625186231e-01\n-3.09607518295929307e-02\n7.74248685813705845e-02\n1.25034930250846832e-01\n4.72489830102710145e-02\n-9.41853891078820726e-02\n-1.33755260479029053e-01\n6.50364801943633785e-03\n1.53788887486563414e-01\n6.52823511250816696e-02\n-1.51685431441669655e-01\n-9.71513719173195539e-02\n1.73168561825678385e-01\n7.19115258963879955e-02\n-2.27792574753502591e-01\n7.11522575335082480e-02\n1.95611559630243181e-01\n-3.26197269255291411e-01\n2.87204135573394193e-01\n0.0\n7.84476355906754902e-04\n3.03826386192034437e-03\n7.17019535214675867e-03\n1.34315682760510428e-02\n2.18443879125247639e-02\n3.20644583691255189e-02\n4.32067134050493906e-02\n5.36814667275494137e-02\n6.11281122838767468e-02\n6.25741257585485655e-02\n5.49673669411224197e-02\n3.61869221240027211e-02\n6.47983749742501048e-03\n-3.00365732282158286e-02\n-6.45847618801351775e-02\n-8.47652791707737968e-02\n-7.84170531638239271e-02\n-4.02363490430002677e-02\n2.11060495144972243e-02\n8.02549029059847208e-02\n1.02740862076810310e-01\n6.48983597031385362e-02\n-2.19177073379280274e-02\n-1.02889439413813066e-01\n-1.08219244939225648e-01\n-1.53212492474264824e-02\n1.03981475873222040e-01\n1.23050735134183978e-01\n-3.75190876024705669e-03\n-1.40620520721761122e-01\n-9.15794148673126363e-02\n1.07101686019147907e-01\n1.46547850757949433e-01\n-8.29076760898521531e-02\n-1.72583395824130209e-01\n1.09805492490871237e-01\n1.64333626229575647e-01\n-2.09867456238680472e-01\n-3.29625377690153931e-02\n2.85774160569761793e-01\n-3.56638790123340543e-01\n1.38743112191199516e-02\n2.40310119515386444e-02\n3.09259600157728229e-02\n3.61285384298416154e-02\n3.96567254402339781e-02\n4.09796560154990636e-02\n3.92316164925092040e-02\n3.33860596398229889e-02\n2.25201364614925487e-02\n6.21832964726646772e-03\n-1.48936366486161660e-02\n-3.85819425955888293e-02\n-6.06281611934257475e-02\n-7.49993278301152866e-02\n-7.49787224547543846e-02\n-5.55181823604596822e-02\n-1.65611979044940974e-02\n3.38194963833417864e-02\n7.86505402210362220e-02\n9.62152578408384668e-02\n7.02966709202725304e-02\n3.67004715972701206e-03\n-7.35796129045483138e-02\n-1.12353963925746189e-01\n-7.47965916821276555e-02\n2.67225083755677183e-02\n1.16960072720207059e-01\n1.05734533726669452e-01\n-1.78066415105069230e-02\n-1.35398650112762364e-01\n-9.70260634847415621e-02\n7.86740665635782960e-02\n1.58047688224292548e-01\n-9.89155652350204306e-03\n-1.81268201315435057e-01\n-2.49495305266120466e-02\n2.04840953432862211e-01\n-2.22489075990185301e-03\n-2.36032348417281851e-01\n1.36550133511628119e-01\n1.80090680357833460e-01\n-3.97761308773593947e-01\n0.0\n7.77559269253692191e-04\n3.01147410050875853e-03\n7.10837960154374077e-03\n1.33243048231946794e-02\n2.17009302479999749e-02\n3.19399869747656120e-02\n4.32401726227817501e-02\n5.41383008523266748e-02\n6.24291073553473325e-02\n6.52754186080117260e-02\n5.96427172121983817e-02\n4.31657580616145800e-02\n1.54355618262873202e-02\n-2.05521225479996655e-02\n-5.74040146536870799e-02\n-8.37490134948195297e-02\n-8.70608151985017287e-02\n-5.91993883887103542e-02\n-3.32330506499734510e-03\n6.15231573839943036e-02\n1.03471109271786516e-01\n9.22834120811389103e-02\n2.20457903985463652e-02\n-7.19058761574387501e-02\n-1.22487611604784510e-01\n-7.69111471472755243e-02\n4.43031903005786376e-02\n1.35365622337755898e-01\n8.91529573290155281e-02\n-6.87750169434317854e-02\n-1.56026204623792825e-01\n-3.29687178209256346e-02\n1.55934515093465342e-01\n1.07486605502229632e-01\n-1.43063562146197559e-01\n-1.44851205688631246e-01\n1.65285292183351334e-01\n1.38662594434368847e-01\n-2.49483548115113807e-01\n-3.27154498418427558e-02\n4.03325235559683026e-01\n1.43824744453076685e-02\n2.49111764778338872e-02\n3.20663574110398933e-02\n3.74973263169967180e-02\n4.12633659687337145e-02\n4.28728400081323929e-02\n4.14976017339050290e-02\n3.61336277300462402e-02\n2.58382461552913757e-02\n1.00933429361160388e-02\n-1.07053622627862333e-02\n-3.47065708114854266e-02\n-5.81901161736497891e-02\n-7.55839075323899018e-02\n-8.02862103564680879e-02\n-6.65864270141721948e-02\n-3.26111405516064379e-02\n1.64956701438057005e-02\n6.68730059165870555e-02\n9.80474187112338885e-02\n9.05552282372663470e-02\n3.80873779595866518e-02\n-4.14962573034331275e-02\n-1.06095292357096291e-01\n-1.08705086605984158e-01\n-3.29967993139957741e-02\n7.77916819950092292e-02\n1.33874355424830616e-01\n6.92632685985517527e-02\n-7.46977625847452809e-02\n-1.51086428644681692e-01\n-5.06477937754189061e-02\n1.29626018822949912e-01\n1.43749531710181150e-01\n-6.71071690572835056e-02\n-1.91178902926700117e-01\n2.21753149468369506e-02\n2.23809204922936461e-01\n-2.86654202941904433e-02\n-2.66760613393835333e-01\n1.20305589732919729e-01\n3.76623727576484213e-01\n0.0\n7.75351466917824795e-04\n3.00292331883022633e-03\n7.08964572039117412e-03\n1.32979780775338095e-02\n2.16899707606791614e-02\n3.20125568607906238e-02\n4.35457785910280323e-02\n5.49493289491622683e-02\n6.41706613572812778e-02\n6.85111080577386206e-02\n6.49697919980996019e-02\n5.09719272770171317e-02\n2.55017980381815404e-02\n-9.53191680699015838e-03\n-4.81688865262063851e-02\n-8.02999264373263355e-02\n-9.35301049365842574e-02\n-7.75651360936479295e-02\n-3.05116809840811250e-02\n3.54500256983800513e-02\n9.34326273931349593e-02\n1.10664459859788622e-01\n6.71973213091972416e-02\n-2.34909947019708749e-02\n-1.08735171199022485e-01\n-1.22004825035979425e-01\n-3.62445929014788074e-02\n9.20632098284347444e-02\n1.44925345581536996e-01\n4.92081551568647885e-02\n-1.14940498667092522e-01\n-1.54088529425553650e-01\n1.23822900719928585e-02\n1.81942311760521058e-01\n8.31357411827108039e-02\n-1.73905532324859224e-01\n-1.46721928631373150e-01\n1.81659150306497069e-01\n1.88793194295438643e-01\n-2.46039067547469847e-01\n-3.27448947957520997e-01\n1.49660257836911163e-02\n2.59219170447388368e-02\n3.33757140514642781e-02\n3.90678577918726275e-02\n4.31039475409247669e-02\n4.50361375555941718e-02\n4.40791325441783483e-02\n3.92578814785898497e-02\n2.96174797381733232e-02\n1.45448992063323228e-02\n-5.78988830301633770e-03\n-2.99256933673076701e-02\n-5.46760386071657514e-02\n-7.50167181238780428e-02\n-8.46229303967987040e-02\n-7.73571665821830012e-02\n-4.97677301802176980e-02\n-4.12179687590789965e-03\n4.92804848084957975e-02\n9.24619020723902590e-02\n1.04707952293726342e-01\n7.24290532163550382e-02\n8.35655758543526529e-04\n-7.98826415606175427e-02\n-1.22851840135128426e-01\n-9.09007050603326677e-02\n9.56205668871112566e-03\n1.14167929143870320e-01\n1.33819189795522764e-01\n3.19669555005831496e-02\n-1.13886766577971352e-01\n-1.52786460361732407e-01\n-1.58762895520525513e-02\n1.58368034811813413e-01\n1.36562556621647985e-01\n-9.15935710773029821e-02\n-2.06595985474749028e-01\n1.54817366359321119e-02\n2.51267268485077466e-01\n4.88718426850884083e-02\n-3.24549820328338567e-01\n-2.67163947202473440e-01\n0.0\n7.69993520434062231e-04\n2.98217208132874317e-03\n7.04214502314012229e-03\n1.32179205185400332e-02\n2.15922154580995285e-02\n3.19595161416464865e-02\n4.36870448057570734e-02\n5.55689268853362672e-02\n6.57259153360410103e-02\n7.16317498052249924e-02\n7.03702717648932996e-02\n5.92244949769974785e-02\n3.66409144395097378e-02\n3.46988966672603753e-03\n-3.58532782258849866e-02\n-7.28065342933727211e-02\n-9.57738624884037631e-02\n-9.32143779284270030e-02\n-5.89540475484112911e-02\n1.89560738130293942e-03\n6.96520937046826161e-02\n1.13612525098486961e-01\n1.05022471985028509e-01\n3.65988133184061079e-02\n-6.22870738830334364e-02\n-1.30724301382447700e-01\n-1.11111937610731987e-01\n-4.64414541987735741e-04\n1.23329067326025707e-01\n1.45312750297256349e-01\n2.16324247529386497e-02\n-1.40864991827797409e-01\n-1.56068169875566237e-01\n2.66842304676159492e-02\n1.98051593789928954e-01\n1.03187751674359340e-01\n-1.69924701891196211e-01\n-2.13267117074894069e-01\n1.05534643536044359e-01\n3.51167797544824467e-01\n2.05560515182917569e-01\n1.55943882709586729e-02\n2.70102727982565981e-02\n3.47859701671211219e-02\n4.07610819886549056e-02\n4.50930213014190603e-02\n4.73843055995506399e-02\n4.69009597918921828e-02\n4.27075363277179890e-02\n3.38494115008794380e-02\n1.96315193092290140e-02\n6.96845632340764257e-06\n-2.39581337081966259e-02\n-4.96483675584222586e-02\n-7.26854669226700695e-02\n-8.72116416185179377e-02\n-8.69559336064306826e-02\n-6.72307166984984078e-02\n-2.76365989099652300e-02\n2.53496559172584346e-02\n7.73989262094999797e-02\n1.08770239242843444e-01\n1.01291933922836058e-01\n4.88176811145664344e-02\n-3.33583230925280638e-02\n-1.07611898195387704e-01\n-1.28317490018243635e-01\n-7.04057164613654390e-02\n4.25656467432415433e-02\n1.36587581643910633e-01\n1.30497025734320982e-01\n8.97524862480822937e-03\n-1.35417568380519243e-01\n-1.58636756156119857e-01\n-1.00773756527663735e-02\n1.69919043617347831e-01\n1.60590012006038840e-01\n-6.59675537679709767e-02\n-2.37612907407525276e-01\n-9.06706552554299577e-02\n2.32050987066514836e-01\n3.33518489567134258e-01\n1.49554583658024848e-01\n0.0\n7.61103683242032782e-04\n2.94774188993351775e-03\n6.96236273314508429e-03\n1.30773930134812470e-02\n2.13961419129252567e-02\n3.17623966571297725e-02\n4.36354876962668989e-02\n5.59544131900917285e-02\n6.70330001083971200e-02\n7.45520995457655683e-02\n7.57363423095593485e-02\n6.78073202282374887e-02\n4.87702874832908057e-02\n1.84930265356689771e-02\n-2.01407391751874491e-02\n-6.04554532744011053e-02\n-9.22476360165370851e-02\n-1.03774727220257268e-01\n-8.57713665167305350e-02\n-3.68435861022826036e-02\n3.18310460656588134e-02\n9.58572473230206723e-02\n1.24359875495250224e-01\n9.47505715048661268e-02\n1.04926188879896388e-02\n-8.95816164664256231e-02\n-1.43492993050272494e-01\n-1.03469582185664641e-01\n1.92751301908051058e-02\n1.40500476920492445e-01\n1.52498347133166429e-01\n2.18655757253881367e-02\n-1.47336451703960591e-01\n-1.79702466351432333e-01\n-1.03023561371761458e-02\n1.97774392665972493e-01\n1.91552727385358251e-01\n-6.53399854742475056e-02\n-3.05793599892965617e-01\n-2.86153823758534154e-01\n-1.03010616503878022e-01\n1.62945842833369763e-02\n2.82230478669529480e-02\n3.63575172389872733e-02\n4.26483017777032763e-02\n4.73110147596447900e-02\n5.00054071833683431e-02\n5.00575163389252870e-02\n4.65827557608958845e-02\n3.86410366915561285e-02\n2.54720208563398096e-02\n6.82814451629654411e-03\n-1.66127703999714334e-02\n-4.28277901913067388e-02\n-6.81663461386043806e-02\n-8.74218936292116000e-02\n-9.45099736692069231e-02\n-8.39426349413400358e-02\n-5.30623509748891012e-02\n-4.57314790248861732e-03\n5.16515937763257563e-02\n9.89585506413894478e-02\n1.17895204438095383e-01\n9.40734805062627133e-02\n2.78876453636964540e-02\n-5.88448949073061139e-02\n-1.25882457894054056e-01\n-1.31440859816791850e-01\n-5.92314415554284351e-02\n5.94372477695673598e-02\n1.50125213266596003e-01\n1.38316238305347755e-01\n1.33018609882855094e-02\n-1.38389681747313809e-01\n-1.81471510419902476e-01\n-5.24818564981823499e-02\n1.49126315440380519e-01\n2.21274069999652934e-01\n6.02544063004433889e-02\n-2.01867042119652507e-01\n-3.22392057659672771e-01\n-2.25053495000878540e-01\n-6.71845468730610518e-02\n0.0\n7.48588115927242316e-04\n2.89926930615499664e-03\n6.84941593608067237e-03\n1.28745887554325943e-02\n2.10982565990902975e-02\n3.14145300370288622e-02\n4.33785318188589439e-02\n5.60827964302748339e-02\n6.80520622367278838e-02\n7.72080727385584392e-02\n8.09749928284102249e-02\n7.66047396271503367e-02\n6.17843556593364873e-02\n3.55255446148379991e-02\n-7.85277064483070274e-04\n-4.24759866426454510e-02\n-8.13081746006500822e-02\n-1.06425112034502237e-01\n-1.06995142361226772e-01\n-7.64894037335630689e-02\n-1.75595677147098034e-02\n5.47056396973618145e-02\n1.14117511411711572e-01\n1.31611357692847236e-01\n8.96972814967996745e-02\n-2.48107770553834470e-03\n-1.03676362047848164e-01\n-1.54588272487799772e-01\n-1.12133580064339627e-01\n1.24731675354049290e-02\n1.42553002656469724e-01\n1.76367067607621886e-01\n6.74237504401055260e-02\n-1.15312783871388158e-01\n-2.18478500000286402e-01\n-1.31254101559972580e-01\n9.69359016111049354e-02\n2.84558615509414581e-01\n2.93330933489524437e-01\n1.63541595323647510e-01\n4.14680781705099380e-02\n1.70986163213087301e-02\n2.96156722076331702e-02\n3.81619402288371906e-02\n4.48143368737077413e-02\n4.98544525050553938e-02\n5.30069904954119792e-02\n5.36675748924771295e-02\n5.10151094797369892e-02\n4.41407933615583781e-02\n3.22403516091385317e-02\n1.48896257428829202e-02\n-7.60256882570507948e-03\n-3.38096715261843317e-02\n-6.08702651196781838e-02\n-8.43989298743852423e-02\n-9.88298381067772846e-02\n-9.83867822154387284e-02\n-7.87564639603419436e-02\n-3.92781279123526617e-02\n1.49412864005256003e-02\n7.20157075967269716e-02\n1.14632039878110548e-01\n1.24695538585027715e-01\n9.09948806787024694e-02\n1.75653976602632086e-02\n-7.17360953696795367e-02\n-1.37652006089633794e-01\n-1.41541166471617574e-01\n-6.88959358816934458e-02\n5.22355549239394076e-02\n1.54630270998615815e-01\n1.66027175769356772e-01\n6.15232995612513961e-02\n-1.02007113304595637e-01\n-2.08228647396523775e-01\n-1.62891326820108567e-01\n2.19128168718208463e-02\n2.22945585616778047e-01\n3.04790135169846432e-01\n2.37652958164280448e-01\n1.10275184239754728e-01\n2.41926893496688458e-02\n0.0\n7.31808559200826511e-04\n2.83428236239684564e-03\n6.69743816728053231e-03\n1.25983200451820297e-02\n2.06796433060568927e-02\n3.08861403089625876e-02\n4.28713315494968494e-02\n5.58885248709136973e-02\n6.86897668918881044e-02\n7.94710635976591806e-02\n8.59178616935564743e-02\n8.54151969590225824e-02\n7.54818552355593086e-02\n5.44539593068663064e-02\n2.23677012220471691e-02\n-1.81309128383653623e-02\n-6.11729920852173772e-02\n-9.78043491333345366e-02\n-1.17344744367959802e-01\n-1.10225101163768588e-01\n-7.20196395549070473e-02\n-7.55279159139852878e-03\n6.69148001022429745e-02\n1.25784338629302023e-01\n1.42012998106071847e-01\n9.97816094098459005e-02\n7.12960430035411083e-03\n-9.94057450466206138e-02\n-1.65578193791552197e-01\n-1.46351748918085944e-01\n-3.77584267321303471e-02\n1.07691183489885614e-01\n2.01173433041418992e-01\n1.71435445143377135e-01\n1.99174333777637907e-02\n-1.69486975641608140e-01\n-2.85976413649259908e-01\n-2.74810690611202613e-01\n-1.74108198529945080e-01\n-6.91289134708581166e-02\n-1.33159958390982602e-02\n1.80508638833046901e-02\n3.12650133663937707e-02\n4.02985462341171469e-02\n4.73770275235582128e-02\n5.28579220839655306e-02\n5.65400551071121513e-02\n5.78997447583252736e-02\n5.61941465824673039e-02\n5.05659074278005730e-02\n4.01938441613643588e-02\n2.45106921967238323e-02\n3.49040993563495480e-03\n-2.20189377660236774e-02\n-4.99784839261075836e-02\n-7.69658693111960890e-02\n-9.82569916137779331e-02\n-1.08349206893403549e-01\n-1.02050968271769335e-01\n-7.61277868858884904e-02\n-3.12485936539085123e-02\n2.63513922039522140e-02\n8.43790932486278011e-02\n1.26134708204773904e-01\n1.34894032441557510e-01\n1.00588344667878721e-01\n2.67914499725918076e-02\n-6.54843129885383513e-02\n-1.41059859819499811e-01\n-1.62876074193752413e-01\n-1.10631837241260730e-01\n2.66617008189118637e-03\n1.27872432724431911e-01\n1.98393574295658626e-01\n1.65973586293922643e-01\n3.40659250600460761e-02\n-1.36511573870933739e-01\n-2.60968115005286827e-01\n-2.84582693668046782e-01\n-2.16808394869708182e-01\n-1.16250719474052869e-01\n-4.02942220732189008e-02\n-6.89732306465412007e-03\n0.0\n7.09625236664359737e-04\n2.74836672364956206e-03\n6.49596547799356598e-03\n1.22287046845510738e-02\n2.01069451850400711e-02\n3.01254077397692006e-02\n4.20373005955596013e-02\n5.52622006463466264e-02\n6.87939428335032493e-02\n8.11350013741788945e-02\n9.02957430990370263e-02\n9.39068750674654507e-02\n8.94953752774845235e-02\n7.49597555350173111e-02\n4.92402895908140847e-02\n1.31072803158639398e-02\n-3.01117817362244120e-02\n-7.41569110183337155e-02\n-1.10178838247700819e-01\n-1.28138168623288168e-01\n-1.19386010035003806e-01\n-8.01114608825334862e-02\n-1.47210228186445535e-02\n6.23821099478398811e-02\n1.28352497046316433e-01\n1.57889306874180985e-01\n1.33031148871708527e-01\n5.36274370613680634e-02\n-5.68095601705967679e-02\n-1.55226255377285183e-01\n-1.94959132554843928e-01\n-1.48553993167046539e-01\n-2.58303777731906624e-02\n1.25710876694047569e-01\n2.42905037913695998e-01\n2.81068869938078836e-01\n2.38373625753199120e-01\n1.52360231944932756e-01\n7.09887594503554598e-02\n2.18098666131410004e-02\n3.35089186160174649e-03\n1.92247599530585254e-02\n3.32982610020128300e-02\n4.29316489774202031e-02\n5.05313251676184558e-02\n5.65439987043813777e-02\n6.08541009520057463e-02\n6.30320750310890410e-02\n6.24311085918308195e-02\n5.82699865761290639e-02\n4.97449073824847016e-02\n3.61908018170001358e-02\n1.72997777372251790e-02\n-6.61199913834383153e-03\n-3.43213079714383210e-02\n-6.34619294212687701e-02\n-9.04323002203550053e-02\n-1.10568388416670604e-01\n-1.18702619164787970e-01\n-1.10180837645200203e-01\n-8.22926377785273555e-02\n-3.58816942817240456e-02\n2.33288869547405818e-02\n8.43574461622691035e-02\n1.32224571099451765e-01\n1.51268694162622869e-01\n1.30250469632260307e-01\n6.79743056249330485e-02\n-2.28306444925609406e-02\n-1.15989145282843209e-01\n-1.78421365753053784e-01\n-1.82002873188171432e-01\n-1.16678312831622416e-01\n1.67839114355726742e-03\n1.34515443973749399e-01\n2.35959628188085746e-01\n2.73860665269415049e-01\n2.44834645674427004e-01\n1.73531396439855268e-01\n9.61629188115541711e-02\n3.96642873503918678e-02\n1.09317548267639716e-02\n1.52035921626357973e-03\n0.0\n6.80132346697457160e-04\n2.63414125197622070e-03\n6.22750832791698836e-03\n1.17325539985226029e-02\n1.93246322314027073e-02\n2.90464657281418043e-02\n4.07503716088446558e-02\n5.40251586345547458e-02\n6.81178332297369404e-02\n8.18666184443192640e-02\n9.36698206647328668e-02\n1.01522962870309832e-01\n1.03161292453007411e-01\n9.63417421964982285e-02\n7.92820642190386199e-02\n5.12398472028147006e-02\n1.31581314249094652e-02\n-3.17680002875075224e-02\n-7.78220536644764621e-02\n-1.17054557725928030e-01\n-1.40359492654549056e-01\n-1.39422339881495660e-01\n-1.09339511451088611e-01\n-5.13208541949713229e-02\n2.54892730674598882e-02\n1.04200244741790266e-01\n1.63218391531447293e-01\n1.82121159684603823e-01\n1.48996665442858583e-01\n6.65630348653731552e-02\n-4.61121347135312123e-02\n-1.58386619097932141e-01\n-2.38640829679984845e-01\n-2.66626162244557152e-01\n-2.41514298400927030e-01\n-1.80965202319869123e-01\n-1.11331223986749273e-01\n-5.46543183720526252e-02\n-2.02356542701954065e-02\n-5.05195888042372313e-03\n-6.40651779185504641e-04\n2.07585622045825535e-02\n3.59548844304159870e-02\n4.63705779194278772e-02\n5.46440658854121103e-02\n6.13310077114337451e-02\n6.64169313698956959e-02\n6.95835832325529396e-02\n7.03024900053925428e-02\n6.78996446750286808e-02\n6.16327016371008701e-02\n5.07996683163278173e-02\n3.48887246263178338e-02\n1.37697168243495292e-02\n-1.20847960943569026e-02\n-4.13784298782163343e-02\n-7.18202773925119831e-02\n-1.00075874144434446e-01\n-1.21924308921871671e-01\n-1.32701000508168132e-01\n-1.28070223523548965e-01\n-1.05095849686479503e-01\n-6.34627642121148861e-02\n-6.56275840828500837e-03\n5.79603201673708004e-02\n1.18645004120841682e-01\n1.61939741374603402e-01\n1.75205609845857369e-01\n1.50465781274369298e-01\n8.78261089256282546e-02\n-2.83509701870320648e-03\n-1.03120747669084786e-01\n-1.90652118216222605e-01\n-2.45827796950083610e-01\n-2.58383708211570362e-01\n-2.30846727766881699e-01\n-1.76982775041418405e-01\n-1.15684061496719615e-01\n-6.32403366434438063e-02\n-2.79274421848478768e-02\n-9.38243497466786924e-03\n-2.13901805929039195e-03\n-2.48898353649716338e-04\n0.0\n6.39863516577544151e-04\n2.47818074355054185e-03\n5.86026510064215512e-03\n1.10495763597262334e-02\n1.82320268229421122e-02\n2.74941674705141553e-02\n3.87839013486065282e-02\n5.18581934504199343e-02\n6.62233056897490874e-02\n8.10763075636510983e-02\n9.52611181733614837e-02\n1.07257347851591689e-01\n1.15224492579135224e-01\n1.17125675999206882e-01\n1.10951544002402092e-01\n9.50531748046673369e-02\n6.85705380634127060e-02\n3.19095542505821311e-02\n-1.28206821371082986e-02\n-6.15397406048664927e-02\n-1.08250906020027765e-01\n-1.45562464646343953e-01\n-1.65751029947034084e-01\n-1.62309186421226576e-01\n-1.31732108678641935e-01\n-7.51016555345250664e-02\n1.09838391667521390e-03\n8.54597273410225705e-02\n1.63663550431932148e-01\n2.21769951985460068e-01\n2.49933101667278196e-01\n2.45280466139913528e-01\n2.12746373001630323e-01\n1.63306274567110998e-01\n1.10146745793615192e-01\n6.43198030099554341e-02\n3.17485700687295189e-02\n1.27581462890849519e-02\n3.92313172732765888e-03\n8.22330602449788863e-04\n8.82875487417690552e-05\n2.29612321152249631e-02\n3.97700206279518395e-02\n5.13064959004759097e-02\n6.05344832484295339e-02\n6.81519659642728370e-02\n7.42691858221984497e-02\n7.87033714107725629e-02\n8.10744560108832835e-02\n8.08568314255359577e-02\n7.74282820454372245e-02\n7.01331081850267157e-02\n5.83686166950621657e-02\n4.16993161394728501e-02\n1.99976412513320698e-02\n-6.39746735031156838e-03\n-3.65225400715221138e-02\n-6.86617422122987042e-02\n-1.00289541469991944e-01\n-1.28130899281290012e-01\n-1.48384000830222684e-01\n-1.57134631757464366e-01\n-1.50957533725401188e-01\n-1.27648252886456870e-01\n-8.69657206356527213e-02\n-3.12066112178710359e-02\n3.45985152381433209e-02\n1.03052537033965039e-01\n1.65406788835904123e-01\n2.13132000221852608e-01\n2.39738847636787683e-01\n2.42362914624845993e-01\n2.22579825493215477e-01\n1.86070486994917628e-01\n1.41113485963317936e-01\n9.63324016001995409e-02\n5.84694400747998722e-02\n3.09904010975632638e-02\n1.39751047645421001e-02\n5.15650449954696555e-03\n1.46172764048068098e-03\n2.83354072518776829e-04\n2.82064371116964892e-05\n0.0\n5.81349277204649419e-04\n2.25155606894332635e-03\n5.32572663026651023e-03\n1.00499971212169945e-02\n1.66128186864132089e-02\n2.51362357701062286e-02\n3.56548425217390053e-02\n4.80853891201414377e-02\n6.21895693474376621e-02\n7.75335256163246223e-02\n9.34493848103008090e-02\n1.09006369771625117e-01\n1.23001345585542210e-01\n1.33980491716538419e-01\n1.40304331347109373e-01\n1.40266577945813931e-01\n1.32272094933088918e-01\n1.15069867140613777e-01\n8.80231184348878176e-02\n5.13817262124956695e-02\n6.50484567127968503e-03\n-4.40308296523751058e-02\n-9.65028896929473468e-02\n-1.46343946294502231e-01\n-1.88681062065165994e-01\n-2.19064201954896703e-01\n-2.34264964408939930e-01\n-2.32968566783485737e-01\n-2.16161039363523794e-01\n-1.87053244702700738e-01\n-1.50491024170971460e-01\n-1.11955942959885646e-01\n-7.64128449738851606e-02\n-4.73414537494929386e-02\n-2.62465818251408564e-02\n-1.27718572556085267e-02\n-5.30928673130906612e-03\n-1.81188335959584553e-03\n-4.76338540901702693e-04\n-8.58275859114636234e-05\n-7.95606426509902346e-06\n2.67637783924978140e-02\n4.63562239783203017e-02\n5.98218506556681476e-02\n7.06696341676298356e-02\n7.98129801004913014e-02\n8.75325614362714444e-02\n9.38225791479127130e-02\n9.84987280002284221e-02\n1.01245368797388338e-01\n1.01645957180317228e-01\n9.92125323138460247e-02\n9.34217948945786081e-02\n8.37619688181399785e-02\n6.97924491107424633e-02\n5.12159421401254325e-02\n2.79599326696478023e-02\n2.60775236634782173e-04\n-3.12602607989853412e-02\n-6.55434670559460197e-02\n-1.01076827516618339e-01\n-1.35939154405200796e-01\n-1.67913930242381992e-01\n-1.94678922853353059e-01\n-2.14062762801555589e-01\n-2.24341824882072743e-01\n-2.24532229092192948e-01\n-2.14617870764929553e-01\n-1.95652524526683469e-01\n-1.69687836113929430e-01\n-1.39511417409738214e-01\n-1.08225983338144635e-01\n-7.87497222639826910e-02\n-5.33525499405845330e-02\n-3.33455045737581848e-02\n-1.90029063152440982e-02\n-9.72658917737334421e-03\n-4.38313406096022418e-03\n-1.69171971587400174e-03\n-5.37189088743827156e-04\n-1.31648087996266954e-04\n-2.21462984072078973e-05\n-1.91917693087251524e-06\n0.0\n4.81995293025580290e-04\n1.86675974283843633e-03\n4.41671258012461387e-03\n8.34167852944117487e-03\n1.38145304761894336e-02\n2.09735266475527989e-02\n2.99178462850401630e-02\n4.06984747635416796e-02\n5.33055498483452628e-02\n6.76531705822899648e-02\n8.35629395527160701e-02\n1.00747985205358076e-01\n1.18799797376299809e-01\n1.37180804772186499e-01\n1.55226090932284233e-01\n1.72157804354936966e-01\n1.87115452903142965e-01\n1.99204161555578740e-01\n2.07560946616559910e-01\n2.11436081582094204e-01\n2.10282891017026519e-01\n2.03845314134552869e-01\n1.92229184443521828e-01\n1.75941516141784021e-01\n1.55883385220152049e-01\n1.33287155751305314e-01\n1.09597954809707590e-01\n8.63113247380678100e-02\n6.47913183897862593e-02\n4.61022599782673556e-02\n3.08891232325170656e-02\n1.93335000862119057e-02\n1.11949187003539691e-02\n5.92506669333466799e-03\n2.82255897858784766e-03\n1.18597477105871515e-03\n4.27486226024902929e-04\n1.26948479038310313e-04\n2.91302557903513403e-05\n4.59315109933108494e-06\n3.73412792290243168e-07\n3.81969097043956263e-02\n6.61589883001339335e-02\n8.54041987517090845e-02\n1.01019957910725530e-01\n1.14456161214886568e-01\n1.26337856533782517e-01\n1.36967291017995207e-01\n1.46481347910413451e-01\n1.54915852413692379e-01\n1.62237154924446542e-01\n1.68360707561067219e-01\n1.73164534129854109e-01\n1.76501295459942448e-01\n1.78210879759801016e-01\n1.78134524921758519e-01\n1.76130844777505541e-01\n1.72093562521747900e-01\n1.65970169652808225e-01\n1.57780121811279428e-01\n1.47630604315686392e-01\n1.35727448846885340e-01\n1.22378594927389284e-01\n1.07987717369753516e-01\n9.30364136150346188e-02\n7.80547189163392496e-02\n6.35816169973092843e-02\n5.01193856107356381e-02\n3.80876199813987987e-02\n2.77840400885760834e-02\n1.93591396793125654e-02\n1.28100080129243642e-02\n7.99529969838158952e-03\n4.66895008183057427e-03\n2.52595455120398649e-03\n1.25069964467384174e-03\n5.58038668786168873e-04\n2.19844076529229261e-04\n7.43685333844809008e-05\n2.07437720067185124e-05\n4.47425557135884336e-06\n6.63569093401815275e-07\n5.07700073865923185e-08\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n1.75385715931343188e-02\n3.03776970914928640e-02\n3.89894299482247964e-02\n4.50537831243302128e-02\n4.80480260970503614e-02\n4.65400382039492799e-02\n3.86255045510803599e-02\n2.25480495396490899e-02\n-2.27174361599671252e-03\n-3.38181129256359611e-02\n-6.60703944825465073e-02\n-8.85536648892354811e-02\n-8.83022665547520264e-02\n-5.55258773678883391e-02\n7.46609704613757606e-03\n7.83492811499439806e-02\n1.16648725092663261e-01\n8.43733130090411482e-02\n-1.70104229921458350e-02\n-1.20305094638899268e-01\n-1.22969970230733555e-01\n9.35905132160869992e-03\n1.50958694957938427e-01\n1.03915462896002508e-01\n-1.13821482581893951e-01\n-1.65617979165724905e-01\n1.02078086683356009e-01\n1.87205802845349906e-01\n-1.80482528572332379e-01\n-1.05887032567924186e-01\n3.16897122331143477e-01\n-3.11506306360772478e-01\n1.94908626118926759e-01\n-8.88419912097003217e-02\n3.11734890841552197e-02\n-8.65603665299482031e-03\n1.92915844115690120e-03\n-3.47110560421079798e-04\n5.03961499458167799e-05\n-5.86624629182310696e-06\n5.40333524333498994e-07\n-3.85266344302698084e-08\n2.05209553793049829e-09\n0.0\n1.27957098505530561e-03\n4.95575711540941800e-03\n1.16729154582532208e-02\n2.17298714766428862e-02\n3.48463920087801263e-02\n4.97890096437865956e-02\n6.39661460133040122e-02\n7.32162053931973283e-02\n7.21602998827597653e-02\n5.55765345251779327e-02\n2.10888036966206741e-02\n-2.71967000961087710e-02\n-7.57556405665781446e-02\n-1.02576258694562439e-01\n-8.55111455040393209e-02\n-1.85689543275236145e-02\n7.13685108828726045e-02\n1.24881736372987939e-01\n8.51840841702029838e-02\n-3.93941327750227874e-02\n-1.42330243848803356e-01\n-9.42257757604894608e-02\n8.54747418851426466e-02\n1.66546977429292142e-01\n-1.57040975955216426e-02\n-1.97467238887139712e-01\n1.88019344819042819e-03\n2.29365773327595029e-01\n-1.02939542298359415e-01\n-1.91533197604292715e-01\n3.33816802434613757e-01\n-2.79815352320624711e-01\n1.58802675309585556e-01\n-6.73083989677173145e-02\n2.22633667178538421e-02\n-5.87886221383933632e-03\n1.25374425751272208e-03\n-2.16874130346125099e-04\n3.03833333739192907e-05\n-3.42291948358810337e-06\n3.05900500334992657e-07\n-2.12071334148180759e-08\n1.67998963697784977e-02\n2.90982740743482952e-02\n3.73653598428551892e-02\n4.32630585701949608e-02\n4.63845439304403084e-02\n4.54855374773613513e-02\n3.88656105329671306e-02\n2.48760515819512092e-02\n2.76248927439950954e-03\n-2.61461269874073247e-02\n-5.71751743013194508e-02\n-8.16723200395387816e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397946e-02\n5.34454003267640781e-02\n1.05157476202395558e-01\n1.02564527870409206e-01\n2.95638071887786950e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615805e-02\n8.51730529332632019e-02\n1.53220131301863155e-01\n1.78247327774131853e-02\n-1.65860741937022133e-01\n-8.84648720065210614e-02\n1.73136635651712334e-01\n9.94041328991669970e-02\n-2.27739976004467520e-01\n9.92889030237799342e-03\n2.57981308786253638e-01\n-3.31215699964780008e-01\n2.43523231334163009e-01\n-1.26668644069710706e-01\n5.02013264765925823e-02\n-1.57083873856483924e-02\n3.95453538621144511e-03\n-8.08548562461229147e-04\n1.34666690917015414e-04\n-1.82273378245418630e-05\n1.98945034298991199e-06\n-1.72656428541676033e-07\n0.0\n1.17611905411169797e-03\n4.55508950973182621e-03\n1.07332437596323570e-02\n2.00053466079874870e-02\n3.21708251299626866e-02\n4.62157369304475804e-02\n5.99569807958979101e-02\n6.98231764936916299e-02\n7.10666469610006096e-02\n5.87838173535385616e-02\n3.00317667808629694e-02\n-1.31227298005024019e-02\n-6.07293446451542610e-02\n-9.46088691310778551e-02\n-9.35696681232019434e-02\n-4.56847854471220741e-02\n3.61951623169068232e-02\n1.07666230964163195e-01\n1.10940056055427200e-01\n2.23536404712625786e-02\n-1.00507026215737039e-01\n-1.35846752025254758e-01\n-1.62287775947129974e-02\n1.42403677764352060e-01\n1.14823057616212254e-01\n-1.05370369333537398e-01\n-1.65777370680143921e-01\n1.02664257142156656e-01\n1.79459461356781924e-01\n-1.86341187303001504e-01\n-8.48039923445310373e-02\n3.02150116038781558e-01\n-3.13662584476359196e-01\n2.06223255771079195e-01\n-9.91270584711354263e-02\n3.69077227634578703e-02\n-1.09593457663403893e-02\n2.63629687646934610e-03\n-5.17675440838960381e-04\n8.31331196460137505e-05\n-1.08836230260206335e-05\n1.15200522677866537e-06\n1.61209358962626746e-02\n2.79222800378878706e-02\n3.58705158480778774e-02\n4.16048844856671332e-02\n4.48145796328184715e-02\n4.44149286908660512e-02\n3.88846143669620697e-02\n2.66859736735194086e-02\n6.95995292710220592e-03\n-1.94741915052374683e-02\n-4.90011512081157882e-02\n-7.44963573152305214e-02\n-8.59117125296501305e-02\n-7.31800333992802671e-02\n-3.18406489571771076e-02\n3.00613580110773680e-02\n8.81760864774845249e-02\n1.07758027232202153e-01\n6.36345166706290266e-02\n-3.19775709189770649e-02\n-1.16651005253626552e-01\n-1.09883142932493919e-01\n7.71332431866577663e-03\n1.33714841099060538e-01\n1.10916738461908485e-01\n-6.95642157350822438e-02\n-1.68350522024768079e-01\n8.72211081793890577e-03\n1.95222452862774870e-01\n-6.44875876953745607e-03\n-2.23734792511203179e-01\n1.15274523917008875e-01\n1.70164055536643655e-01\n-3.24324435249431942e-01\n2.85949691658616667e-01\n-1.70491924010667317e-01\n7.62429970757305814e-02\n-2.67770107990332740e-02\n7.56631678647234039e-03\n-1.74273729462083669e-03\n3.29187814148901227e-04\n-5.10371019690958726e-05\n6.46978807842032023e-06\n0.0\n1.08472742382908420e-03\n4.20113124766451681e-03\n9.90251969662302167e-03\n1.84771170766211447e-02\n2.97864244522489108e-02\n4.29935124009911129e-02\n5.62502048783976305e-02\n6.64805016347075478e-02\n6.94951639779104041e-02\n6.07489836040006684e-02\n3.70087187854961155e-02\n-1.10930973808302563e-03\n-4.64683006849785502e-02\n-8.43432667419289211e-02\n-9.54507151099080464e-02\n-6.49196479082075756e-02\n4.37546628457202019e-03\n8.19387104602383315e-02\n1.16402125828028960e-01\n6.80514713585618075e-02\n-4.51112437687893469e-02\n-1.31643108856332430e-01\n-9.06119505419786392e-02\n6.35740425972320944e-02\n1.55664101858669995e-01\n3.25463011988246786e-02\n-1.61062963964818173e-01\n-9.14113873654779918e-02\n1.71651781823220773e-01\n9.17992460727499460e-02\n-2.26861122082786082e-01\n2.74638834188086350e-02\n2.38715686976040758e-01\n-3.27133758033668787e-01\n2.52461693636008566e-01\n-1.37970366910769304e-01\n5.77226737968143805e-02\n-1.91900278711860522e-02\n5.17285234820361733e-03\n-1.14295039406164638e-03\n2.07983783331944466e-04\n-3.11689067091673258e-05\n1.54947296324046500e-02\n2.68376589728678873e-02\n3.44901382805112081e-02\n4.00656048395386655e-02\n4.33332126150482305e-02\n4.33446014207479746e-02\n3.87358878973412118e-02\n2.80789938222747726e-02\n1.04587749341406733e-02\n-1.36835414623291841e-02\n-4.15672232752848023e-02\n-6.73389093623927987e-02\n-8.22904518630502291e-02\n-7.68946778079097476e-02\n-4.51824603227220165e-02\n9.28246664538769257e-03\n6.88175382514845252e-02\n1.03622603881963579e-01\n8.51625122782443400e-02\n9.40258163241186606e-03\n-8.42585586396187858e-02\n-1.23190784408524628e-01\n-5.60485709658184797e-02\n7.71490603657965512e-02\n1.41957693091019688e-01\n3.80250389766675287e-02\n-1.33107394488861330e-01\n-1.22897469317524682e-01\n9.85217668556271353e-02\n1.65001259615065260e-01\n-1.04334215052456658e-01\n-1.71211818077042305e-01\n1.91700098228693272e-01\n6.42229980598912065e-02\n-2.86770466598031848e-01\n3.14521538148876123e-01\n-2.16820132826779477e-01\n1.09526387859880711e-01\n-4.30717370132110144e-02\n1.35966968582542595e-02\n-3.50420558946921545e-03\n7.44011625726523373e-04\n-1.30606777461223102e-04\n0.0\n1.00359134092648330e-03\n3.88689254980623990e-03\n9.16454592242048859e-03\n1.71166500079998410e-02\n2.76532810741835604e-02\n4.00812336592265284e-02\n5.28286455227673230e-02\n6.32366436515465619e-02\n6.76067566691798266e-02\n6.17616414871888925e-02\n4.23613442260282330e-02\n9.00614488085258597e-03\n-3.33556585956605034e-02\n-7.29895546174275656e-02\n-9.29116831829449735e-02\n-7.72595075802720854e-02\n-2.22245449049998309e-02\n5.33118939466838485e-02\n1.07453728776595994e-01\n9.53987929091938552e-02\n7.90425537897100627e-03\n-9.86239639115587263e-02\n-1.24796252080060885e-01\n-2.07804072049702637e-02\n1.22067941201471630e-01\n1.23206327000161930e-01\n-5.54670442473951045e-02\n-1.68875380897037991e-01\n3.75245098309339581e-03\n1.93023995093867529e-01\n-1.19717966037383005e-02\n-2.17726005891112767e-01\n1.26958606185025691e-01\n1.49005888644417411e-01\n-3.13853593860951630e-01\n2.90873823381451013e-01\n-1.81750237912001733e-01\n8.54436795699114460e-02\n-3.17120083154787472e-02\n9.53167275642746205e-03\n-2.35345017230287768e-03\n4.80917320857951838e-04\n1.49153597447861195e-02\n2.58341608911371208e-02\n3.32116248601054334e-02\n3.86332919996867780e-02\n4.19352097068270424e-02\n4.22860010468431996e-02\n3.84603376807440001e-02\n2.91354481828136197e-02\n1.33735781304966366e-02\n-8.66375562484347252e-03\n-3.48542542241943518e-02\n-6.03977539702228242e-02\n-7.77935594125610808e-02\n-7.82387487113749003e-02\n-5.50015130646649072e-02\n-8.46471262196389455e-03\n4.91546524403277327e-02\n9.33789380701264410e-02\n9.58451708440186539e-02\n4.24753674853226154e-02\n-4.65585032084540607e-02\n-1.13675375154194749e-01\n-9.62111260489950521e-02\n1.20719358406482739e-02\n1.22543896299330962e-01\n1.08867627444433263e-01\n-4.32122822156887840e-02\n-1.55525860350755385e-01\n-4.44856435630129263e-02\n1.56679218247697455e-01\n9.27910270453289748e-02\n-1.70832201497615743e-01\n-8.35132988179793923e-02\n2.25539055651220732e-01\n-4.43192220149570340e-02\n-2.19269267487068875e-01\n3.21854726177286443e-01\n-2.60382954518582288e-01\n1.49103623583424189e-01\n-6.56033293547698404e-02\n2.30603366854171543e-02\n-6.61577684576772265e-03\n1.56781803538128548e-03\n0.0\n9.31232357455200684e-04\n3.60664741187346431e-03\n8.50603196723067820e-03\n1.59003994713080681e-02\n2.57379572255697145e-02\n3.74429373837189411e-02\n4.96727669636294264e-02\n6.01210407482515446e-02\n6.55189539609881549e-02\n6.20486173281966091e-02\n4.63832923867516927e-02\n1.74259087064619726e-02\n-2.15613829243130502e-02\n-6.13677723101023892e-02\n-8.73741534048886048e-02\n-8.39388273274710855e-02\n-4.30736194549930784e-02\n2.54205613670165712e-02\n8.96320418451442558e-02\n1.06347602385434434e-01\n5.01740372856645453e-02\n-5.32299693646057920e-02\n-1.23700240097574868e-01\n-8.28397779032945120e-02\n5.28775926411089239e-02\n1.43085709271516925e-01\n5.61977842357930316e-02\n-1.23816134387801202e-01\n-1.28765381675553098e-01\n9.31609237211593610e-02\n1.63492832919699405e-01\n-1.06861963833925960e-01\n-1.62491459284202749e-01\n1.96459411115601001e-01\n4.41808926796512721e-02\n-2.70805219906673833e-01\n3.14111819332349662e-01\n-2.26653770732879178e-01\n1.19973899319389760e-01\n-4.96385248986919853e-02\n1.65765187181745044e-02\n-4.54921804538097486e-03\n1.43778742853049764e-02\n2.49032087669862762e-02\n3.20244004358009801e-02\n3.72977890214587007e-02\n4.06156105431777215e-02\n4.12473355936554750e-02\n3.80897777367744800e-02\n2.99196559876913175e-02\n1.57994863591471371e-02\n-4.31520564354493687e-03\n-2.88223141880077777e-02\n-5.37921956685506811e-02\n-7.27916954855566262e-02\n-7.78168352578973294e-02\n-6.18706551702193630e-02\n-2.31476052800542141e-02\n3.04714594947269081e-02\n7.95790598759509027e-02\n9.79801681768145555e-02\n6.62019447426877294e-02\n-1.01366931117974502e-02\n-9.00702201559564763e-02\n-1.12670256461799373e-01\n-4.35762337420498580e-02\n7.51262988541383375e-02\n1.31617629353880938e-01\n4.53227510245155576e-02\n-1.08968274058375100e-01\n-1.32010494841667825e-01\n4.32493597425735871e-02\n1.68584989537728130e-01\n-4.95547737528701025e-04\n-1.90873951505348333e-01\n1.82532778671141080e-02\n2.11293320868125717e-01\n-1.37917214542564254e-01\n-1.28095627222936048e-01\n3.02459792784355641e-01\n-2.94595730200241546e-01\n1.92518983859976123e-01\n-9.48546621976419785e-02\n3.70551433988876716e-02\n-1.17880750026884175e-02\n0.0\n8.66474226884443089e-04\n3.35584025064139492e-03\n7.91639464161348998e-03\n1.48095582046505834e-02\n2.40135297510568266e-02\n3.50490367411279077e-02\n4.67647629062353729e-02\n5.71531181540653535e-02\n6.33206164450401954e-02\n6.17902476219040486e-02\n4.93246646862490895e-02\n2.43620651392632143e-02\n-1.11234051786051249e-02\n-5.00138526400503575e-02\n-7.99407279256615089e-02\n-8.61878559858154508e-02\n-5.84041957544053844e-02\n3.58577164693138636e-04\n6.73718233872742378e-02\n1.04553787982171423e-01\n7.88283551915126141e-02\n-7.40167601353946669e-03\n-9.89076458489687033e-02\n-1.13942444036529519e-01\n-1.85024872106806654e-02\n1.09097863389570282e-01\n1.21820356346343320e-01\n-2.46753050351024988e-02\n-1.53733613282301645e-01\n-5.40423665904324405e-02\n1.52852399453692583e-01\n9.28905121537801914e-02\n-1.70544210096458426e-01\n-7.46670552061619863e-02\n2.23708509519217419e-01\n-6.04419983121452301e-02\n-1.99706096644408249e-01\n3.15451964128910911e-01\n-2.67288253604047510e-01\n1.60014157820363767e-01\n-7.38051046839728192e-02\n2.73187612753198160e-02\n1.38818469088017558e-02\n2.40440641489376022e-02\n3.09278787867021607e-02\n3.60601397883234254e-02\n3.93804360540151513e-02\n4.02453726907191708e-02\n3.76593785200389428e-02\n3.04918125335926771e-02\n1.78206216173752673e-02\n-5.49263851586174762e-04\n-2.34269318335793009e-02\n-4.76006699602528338e-02\n-6.75681262190827164e-02\n-7.61306334512805577e-02\n-6.63470227014779645e-02\n-3.49634194402051388e-02\n1.34920461651217172e-02\n6.41274025368598066e-02\n9.38831592313623814e-02\n8.11262578774988447e-02\n2.13023871171144387e-02\n-5.98495461346041785e-02\n-1.10064414066356808e-01\n-8.18243183809359426e-02\n1.99066115306576891e-02\n1.15573873856972764e-01\n1.02785485364497969e-01\n-2.93742084098538407e-02\n-1.40770869891872680e-01\n-7.11436636430360092e-02\n1.15018535108769027e-01\n1.32973851891346195e-01\n-8.91631334467469922e-02\n-1.61456783381648511e-01\n1.10074972988946099e-01\n1.53404246375932862e-01\n-2.00604949770180674e-01\n-2.47719961956424616e-02\n2.54456800919935056e-01\n-3.12623255642162812e-01\n2.35795677231831785e-01\n-1.30465432845248558e-01\n5.66039253982682442e-02\n0.0\n8.09232864226200918e-04\n3.13414540635180384e-03\n7.39499272324786565e-03\n1.38436971267219006e-02\n2.24820834698786845e-02\n3.29101581855683403e-02\n4.41358657273568308e-02\n5.44039173198219497e-02\n6.11455817223562972e-02\n6.11975303857992953e-02\n5.14546148211771151e-02\n3.00568924085187414e-02\n-1.99643543500771384e-03\n-3.92963516109225142e-02\n-7.15114818132315949e-02\n-8.52043612393071359e-02\n-6.89167645661331874e-02\n-2.09051800778963064e-02\n4.39087214082570093e-02\n9.40145878937771323e-02\n9.44146830078357452e-02\n3.18620714527898113e-02\n-6.22442382104592754e-02\n-1.17127053810778370e-01\n-7.28310498799702999e-02\n4.94681478833008600e-02\n1.32377707258596544e-01\n6.59429140792258395e-02\n-9.55785129679667805e-02\n-1.38350543227233252e-01\n3.28176513574509748e-02\n1.68057364620952332e-01\n1.41919533013814192e-03\n-1.89056423912276561e-01\n2.50169038847174834e-02\n2.04835563875731763e-01\n-1.48203516314990208e-01\n-1.07957625279220704e-01\n2.91004628515265207e-01\n-2.97853522346262778e-01\n2.03211141183234578e-01\n-1.04652504207369573e-01\n1.34741881183247144e-02\n2.33379784116792902e-02\n3.00269141703073221e-02\n3.50442163534683757e-02\n3.83695471465948651e-02\n3.94330885132395947e-02\n3.73310332614480225e-02\n3.10145288882999401e-02\n1.95834544409952335e-02\n2.73241786586302928e-03\n-1.86705263217743674e-02\n-4.19970077498808339e-02\n-6.25335824711358568e-02\n-7.38322405829961170e-02\n-6.91823200624847590e-02\n-4.44056520392602794e-02\n-1.49538869741968196e-03\n4.84806912181482974e-02\n8.58593360054521471e-02\n8.88785494691782113e-02\n4.63808021618047281e-02\n-2.84702469354790322e-02\n-9.46931214193230397e-02\n-1.01914474039837166e-01\n-2.98784283513422594e-02\n7.68658745174981978e-02\n1.23059665763669723e-01\n4.56070198863905638e-02\n-9.35822145205922468e-02\n-1.31196910093051511e-01\n7.92932748808312243e-03\n1.51654848846276141e-01\n6.22806205537297652e-02\n-1.50212567123022694e-01\n-9.29210472927348013e-02\n1.71360787509129253e-01\n6.65040480847579191e-02\n-2.22757964721734480e-01\n7.52762605088768688e-02\n1.82725633657972231e-01\n-3.11284237460422553e-01\n2.75785038601235488e-01\n-1.72181529822378110e-01\n0.0\n7.65226858663483451e-04\n2.96371087967428788e-03\n6.99420810376336424e-03\n1.31016282284841037e-02\n2.13068037465171320e-02\n3.12726212972556858e-02\n4.21333291157692386e-02\n5.23347248760328565e-02\n5.95700078886748155e-02\n6.09364978640059909e-02\n5.34579699530349714e-02\n3.50750584496031803e-02\n6.05086124188574780e-03\n-2.95631889420789537e-02\n-6.31651676840561532e-02\n-8.26372395118697839e-02\n-7.61444753491495180e-02\n-3.86208597505673656e-02\n2.12946834834895661e-02\n7.86943369234455042e-02\n9.99431386229658048e-02\n6.22630728350416496e-02\n-2.26720981975915732e-02\n-1.00885598463313006e-01\n-1.04527816630686193e-01\n-1.28551406109666602e-02\n1.02570954383737853e-01\n1.18446450055027311e-01\n-6.79132856626435844e-03\n-1.37712240911135070e-01\n-8.54321304456882175e-02\n1.07474405927171904e-01\n1.38781443136120203e-01\n-8.60716099658244693e-02\n-1.62615075157482469e-01\n1.13626819846633267e-01\n1.48904001194976349e-01\n-2.06600153391714170e-01\n-1.09993299333304758e-02\n2.48154350683916225e-01\n-3.20661276922469984e-01\n2.51684839936340388e-01\n1.33572940737836637e-02\n2.31355119874319740e-02\n2.97730852119710357e-02\n3.47796342710903414e-02\n3.81701509653687987e-02\n3.94302211866450272e-02\n3.77225002125284523e-02\n3.20554350947001160e-02\n2.15401513387728956e-02\n5.78230614768090144e-03\n-1.46002095072736635e-02\n-3.74291716731411650e-02\n-5.86056423290635675e-02\n-7.22843167430742700e-02\n-7.19841647260865553e-02\n-5.28839871914205742e-02\n-1.50483233280994007e-02\n3.35560027016455834e-02\n7.63846076616435110e-02\n9.24617634178883235e-02\n6.64148616563658145e-02\n1.52909931519635634e-03\n-7.24767277348343925e-02\n-1.08038588377000228e-01\n-6.95487876531650923e-02\n2.91198296541576307e-02\n1.13846111556989885e-01\n9.87359867191400786e-02\n-2.23744620412051134e-02\n-1.31657196102238278e-01\n-8.74861634862367649e-02\n8.22529119705867062e-02\n1.48309993562894621e-01\n-2.04989463677715290e-02\n-1.72921817785604559e-01\n-8.16776996195722575e-03\n1.94350565080490312e-01\n-2.50673150109364702e-02\n-2.10783409220220652e-01\n1.55985941367587644e-01\n1.10317727490185591e-01\n-3.10333242699341261e-01\n3.27463193090399007e-01\n0.0\n7.45079590575187006e-04\n2.88568084589674008e-03\n6.81131344371444652e-03\n1.27666218114551901e-02\n2.07895715479857433e-02\n3.05900877528031377e-02\n4.13927693436180050e-02\n5.17842859591156543e-02\n5.96378751875796670e-02\n6.22234571176996792e-02\n5.66330917350059762e-02\n4.06247530000727886e-02\n1.38695437724215085e-02\n-2.06549995924934955e-02\n-5.57317716791884549e-02\n-8.03633110459515826e-02\n-8.25742459175810017e-02\n-5.48270779231292762e-02\n-6.76636871306957564e-04\n6.09945532035647969e-02\n9.93270513295893831e-02\n8.58824453916129937e-02\n1.66222451391722752e-02\n-7.25530054994111551e-02\n-1.16694840133660896e-01\n-6.77551066256854156e-02\n4.93980877877019595e-02\n1.30136644337490531e-01\n7.64662173478304757e-02\n-7.55046047917972557e-02\n-1.45789652563680955e-01\n-1.56011741631193884e-02\n1.54169864714293919e-01\n8.28777506704456712e-02\n-1.49918036335769639e-01\n-1.11226494595293698e-01\n1.75313898250784583e-01\n8.45384576478000332e-02\n-2.39136923176583832e-01\n6.17294503497777050e-02\n2.33436535916755228e-01\n-3.81754967988449934e-01\n1.36663121478417752e-02\n2.36707469921577061e-02\n3.04685686591650573e-02\n3.56238299341877021e-02\n3.91871900526649664e-02\n4.06832910262875103e-02\n3.93154867071563996e-02\n3.41211530886882733e-02\n2.42021375140150027e-02\n9.07744249502076030e-03\n-1.08429414143738651e-02\n-3.37365628870310158e-02\n-5.59780354893757645e-02\n-7.21754858827345080e-02\n-7.59981870074248750e-02\n-6.20722117775149851e-02\n-2.88515695771774001e-02\n1.83396983317936357e-02\n6.57983249755616090e-02\n9.37269230980221635e-02\n8.38917449094756379e-02\n3.14690977453798218e-02\n-4.47051423868837991e-02\n-1.03145948525658462e-01\n-9.97852111419777477e-02\n-2.28026935371253466e-02\n8.14977760446617266e-02\n1.25884407064605436e-01\n5.38594231925353245e-02\n-8.31413470492218393e-02\n-1.40265017139210441e-01\n-2.84181865753961593e-02\n1.35082032064180985e-01\n1.17809531484379296e-01\n-9.10556333231220399e-02\n-1.66507410119256183e-01\n6.44649438026358157e-02\n1.93470689360389830e-01\n-9.27877252920983192e-02\n-1.98046437068720715e-01\n2.05862462716250527e-01\n1.03056802516144075e-01\n-4.03099231861249852e-01\n0.0\n7.41485127825368406e-04\n2.87175955152812936e-03\n6.77971261467227599e-03\n1.27150233543232259e-02\n2.07332621346685425e-02\n3.05842463134834916e-02\n4.15648681190641939e-02\n5.23713400206693644e-02\n6.10133149336714031e-02\n6.48848225077951341e-02\n6.11091725878983444e-02\n4.72601655811271185e-02\n2.24737661370338765e-02\n-1.12293490071592242e-02\n-4.78859433986805819e-02\n-7.75846377192342118e-02\n-8.84165056282687351e-02\n-7.08835807004378343e-02\n-2.40597749303577378e-02\n3.91308673291311873e-02\n9.19226224663362013e-02\n1.03167709454534101e-01\n5.60931455707607343e-02\n-3.23519457090982940e-02\n-1.08464609378990662e-01\n-1.09952528958494861e-01\n-1.90436573662652528e-02\n9.97323781182430369e-02\n1.31933100094620587e-01\n2.36014938958719576e-02\n-1.25206395236531376e-01\n-1.29466320743513580e-01\n4.74166370739674894e-02\n1.73450046602674157e-01\n2.88343290172245817e-02\n-1.86186069265182913e-01\n-6.96136871352347197e-02\n2.10897050399225933e-01\n5.69988202376488229e-02\n-2.70192247750575598e-01\n4.95152729853147455e-02\n3.90438688775155973e-01\n1.41823356945332320e-02\n2.45645259929292009e-02\n3.16261616906605147e-02\n3.70111627640784605e-02\n4.08098309405121595e-02\n4.25835670702294777e-02\n4.15710704450721266e-02\n3.68324856873818995e-02\n2.74563060313377447e-02\n1.28764969038488997e-02\n-6.69447142225101585e-03\n-2.97712651298975318e-02\n-5.31837438576315824e-02\n-7.19962522276869910e-02\n-8.00829856252022465e-02\n-7.16476453736647340e-02\n-4.37185294800404647e-02\n9.02352721571239320e-04\n5.15369298867123099e-02\n9.03341346040430621e-02\n9.75915327913744746e-02\n6.17639159299010407e-02\n-9.35619259140676833e-03\n-8.38884437845663078e-02\n-1.16211877333496486e-01\n-7.46422581316240064e-02\n2.63695739302582145e-02\n1.17761744778192720e-01\n1.16542445529286637e-01\n4.14540364744683289e-03\n-1.25307462005212256e-01\n-1.28427469506347702e-01\n2.50765796976205324e-02\n1.63488511169389006e-01\n8.40507500371501654e-02\n-1.35943430707277879e-01\n-1.56644053962528285e-01\n1.04200946911222461e-01\n2.01046744753532181e-01\n-1.11295990236789044e-01\n-2.36649648395503009e-01\n1.89462166848714114e-01\n3.51030290996167782e-01\n0.0\n7.38920701203352659e-04\n2.86182756992849150e-03\n6.75756351615117937e-03\n1.26813552854215892e-02\n2.07069467463146147e-02\n3.06248702630825369e-02\n4.18058543474304489e-02\n5.30589904769397519e-02\n6.25376220199377608e-02\n6.77746213769497147e-02\n6.59509776153048427e-02\n5.44963817376068471e-02\n3.20580095823307099e-02\n-2.75431953135471508e-04\n-3.78498092402456132e-02\n-7.20609400458785687e-02\n-9.15245186291316765e-02\n-8.54331855040135618e-02\n-4.89202349432948380e-02\n1.12643300620830812e-02\n7.42047558831874648e-02\n1.09550029330555423e-01\n9.15609783834042956e-02\n1.84915416439114695e-02\n-7.47719227642836409e-02\n-1.26691473132548971e-01\n-8.82239528657967897e-02\n2.76824553466184058e-02\n1.31684581037063930e-01\n1.18397990262323061e-01\n-2.23073972311186100e-02\n-1.53620910539210453e-01\n-1.08951963327765883e-01\n8.79948676067978941e-02\n1.81949175370333532e-01\n3.04670409155428402e-03\n-2.06854664435616370e-01\n-7.43821481784355254e-02\n2.27805460912245045e-01\n1.23772218329940453e-01\n-2.90925647187951997e-01\n-2.95634587874770816e-01\n1.47466152614392915e-02\n2.55418868724834568e-02\n3.28921724175850055e-02\n3.85292096150290503e-02\n4.25875790052161404e-02\n4.46705314509851723e-02\n4.40584304805221941e-02\n3.98419211356915159e-02\n3.11049644899165992e-02\n1.72050467353829437e-02\n-1.83817540390704220e-03\n-2.48834223545146942e-02\n-4.92485831811938779e-02\n-7.05338308426786270e-02\n-8.29665326354095539e-02\n-8.05488414535418806e-02\n-5.91269890756293687e-02\n-1.90990942136532518e-02\n3.21546320529930152e-02\n7.96957194376615302e-02\n1.04095588030690286e-01\n8.90409935468260694e-02\n3.18941074033314495e-02\n-4.79722124060991545e-02\n-1.10856632983192413e-01\n-1.14274235262383131e-01\n-4.28583406443982171e-02\n6.73979613134712829e-02\n1.37278294127618827e-01\n9.82066509450098268e-02\n-3.59396157176046158e-02\n-1.49434037769711425e-01\n-1.14439624752607383e-01\n5.83873475601224545e-02\n1.78874506989596893e-01\n7.22908538040431259e-02\n-1.54098671992988934e-01\n-1.73124664147012969e-01\n9.38093878016278970e-02\n2.45259183234205924e-01\n-2.69483285765824074e-02\n-3.42365938957089722e-01\n-2.34650580225244709e-01\n0.0\n7.33159173358176059e-04\n2.83951326853541276e-03\n6.70620555003403548e-03\n1.25930503534836518e-02\n2.05920756619821163e-02\n3.05364806393938551e-02\n4.18758879118447738e-02\n5.35424158323068028e-02\n6.38513064132479047e-02\n7.05045026667706076e-02\n7.07868506537040754e-02\n6.20465924164583377e-02\n4.25111242619433810e-02\n1.23802512422798300e-02\n-2.50500151682578921e-02\n-6.27231639668673069e-02\n-9.03080991428093921e-02\n-9.65024097924209179e-02\n-7.33422914921689068e-02\n-2.16305669106158852e-02\n4.49071577837661592e-02\n1.00303400273401983e-01\n1.14945937115699587e-01\n7.16977759958941363e-02\n-1.72272490475222570e-02\n-1.05501600924408495e-01\n-1.32246094351580523e-01\n-6.45808150950575310e-02\n6.22818385125704851e-02\n1.49462878037792152e-01\n1.06564118746808087e-01\n-4.90408191291536871e-02\n-1.69736740185528562e-01\n-1.06549296691170831e-01\n9.86319153859293585e-02\n1.99491768842453565e-01\n2.96492355896053467e-02\n-2.13787730008340116e-01\n-1.63531753049868334e-01\n1.70157205338237666e-01\n3.45786993119207076e-01\n1.76155671605687347e-01\n1.53572188039452460e-02\n2.65994832313853138e-02\n3.42623792106426517e-02\n4.01734418295998930e-02\n4.45166259139995329e-02\n4.69429367818022455e-02\n4.67819639694265696e-02\n4.31644170582619197e-02\n3.51812243368061703e-02\n2.21258074837359028e-02\n3.83504587903374600e-03\n-1.88940571564523811e-02\n-4.38933084594310824e-02\n-6.73749066087343806e-02\n-8.40758140047924984e-02\n-8.80517517826530094e-02\n-7.42915258960155644e-02\n-4.10537758063929462e-02\n7.64747626572461186e-03\n6.05678299493266348e-02\n1.00329267974966524e-01\n1.08377818599569617e-01\n7.36451987444424749e-02\n2.07414316976320444e-03\n-7.87775603869367569e-02\n-1.26723647050177995e-01\n-1.06124555429489772e-01\n-1.58056509795039962e-02\n9.54623617884433340e-02\n1.47706599078329420e-01\n8.63069905069318993e-02\n-5.74186774853626333e-02\n-1.63812615755517255e-01\n-1.17444243211958857e-01\n6.17392127861663143e-02\n1.92855347976926550e-01\n1.04976026475982240e-01\n-1.32936287361095390e-01\n-2.29826985581831678e-01\n-2.07116991388332887e-02\n2.72197086087604623e-01\n3.12494886855149423e-01\n1.25308278782572113e-01\n0.0\n7.24232064064249783e-04\n2.80493872291026234e-03\n6.62590612972487406e-03\n1.24504840833792024e-02\n2.03888046420585070e-02\n3.03180456756785843e-02\n4.17706516883879844e-02\n5.38102825616319849e-02\n6.49304889569844168e-02\n7.30315934107389209e-02\n7.55506576817452785e-02\n6.98262637674396808e-02\n5.37566174842496747e-02\n2.67355957216942781e-02\n-9.28762163360504975e-03\n-4.89746661905059930e-02\n-8.35344436024098858e-02\n-1.02049913763542721e-01\n-9.45958257988769591e-02\n-5.68731370630638292e-02\n5.04430823703762906e-03\n7.24821326392685872e-02\n1.17573154009077807e-01\n1.14025829171824009e-01\n5.30037471435292964e-02\n-4.37664672794344026e-02\n-1.25298720752454212e-01\n-1.35192557726325574e-01\n-5.20198581921282599e-02\n7.95568660500641650e-02\n1.61661815030857053e-01\n1.12783998474572739e-01\n-4.68608340613929225e-02\n-1.79786312794267683e-01\n-1.40380226051022766e-01\n6.11545280801829017e-02\n2.22122993317549672e-01\n1.41616817196617673e-01\n-1.30035857923596926e-01\n-3.18551009710376531e-01\n-2.57752037374833542e-01\n-8.45214775967527837e-02\n1.60404029672354190e-02\n2.77827929131303220e-02\n3.57954710027576922e-02\n4.20131936036735112e-02\n4.66752943425335978e-02\n4.94867848451243306e-02\n4.98343050016755232e-02\n4.68987751382586929e-02\n3.97910770320733104e-02\n2.77562325795033503e-02\n1.04644790007447537e-02\n-1.16217292870649282e-02\n-3.68601106860977565e-02\n-6.21357333684908891e-02\n-8.28426474351587477e-02\n-9.33596867906063277e-02\n-8.82091121541377643e-02\n-6.39282475875603828e-02\n-2.13597154821729140e-02\n3.23962413291647017e-02\n8.35684448427490151e-02\n1.14154624993183712e-01\n1.07899309921127243e-01\n5.88427419255329112e-02\n-2.09548661621927965e-02\n-9.99506912607951020e-02\n-1.36955742519251911e-01\n-1.02508038273016466e-01\n-3.04735229295570887e-03\n1.09370130192714410e-01\n1.58380151528274754e-01\n9.48716147148022104e-02\n-5.16758181932603505e-02\n-1.71751392980713319e-01\n-1.51600997437890322e-01\n1.58612703731653808e-02\n1.91139839011566393e-01\n1.95348475629443546e-01\n-6.34074335895017192e-03\n-2.44047184657429805e-01\n-3.12884042491400838e-01\n-1.96107315377677061e-01\n-5.40503580788950638e-02\n0.0\n7.11944742711498042e-04\n2.75735013194155620e-03\n6.51486399024667987e-03\n1.22501469009561933e-02\n2.00909342030100337e-02\n2.99590983508164141e-02\n4.14728439001830831e-02\n5.38344900236076424e-02\n6.57307824278203084e-02\n7.52889820792092684e-02\n8.01487596809698222e-02\n7.77193819360830901e-02\n6.56814721757102427e-02\n4.27471612431716205e-02\n9.59803274522025643e-03\n-3.02242525788179832e-02\n-6.98674583418748552e-02\n-9.96714667706302404e-02\n-1.09092404481067023e-01\n-9.01696371988124773e-02\n-4.19299545490735351e-02\n2.58767436631757129e-02\n9.21669303732467610e-02\n1.29447201480093504e-01\n1.14925148634517110e-01\n4.47719557389705397e-02\n-5.59020803514256176e-02\n-1.36846718543123524e-01\n-1.45550104157519289e-01\n-6.25355467585912844e-02\n7.24710429064451822e-02\n1.70445243916720723e-01\n1.48713806710936897e-01\n3.24620028776136842e-03\n-1.64221674202000095e-01\n-2.10246118404542270e-01\n-7.34049859033351348e-02\n1.54119191737435490e-01\n2.99027690175053984e-01\n2.70543273986631472e-01\n1.38444352029017420e-01\n3.27439872905238363e-02\n1.68262506929493759e-02\n2.91439211010793495e-02\n3.75587474913182118e-02\n4.41282473872419562e-02\n4.91544890730010037e-02\n5.24036008851605783e-02\n5.33279876044795778e-02\n5.11702371480461105e-02\n4.50764294118147016e-02\n3.42628376240026594e-02\n1.82559592197363320e-02\n-2.79587400523418966e-03\n-2.77730130851129506e-02\n-5.42757206786317475e-02\n-7.84870218425273158e-02\n-9.53812520699480471e-02\n-9.94563191809934022e-02\n-8.60917509928175034e-02\n-5.34407508477483736e-02\n-4.44493049896366177e-03\n5.18228575871907196e-02\n1.00561361498271176e-01\n1.24366644987232086e-01\n1.09296292338791595e-01\n5.25580620114729918e-02\n-3.14201656048023886e-02\n-1.11067621813970702e-01\n-1.47526290748091704e-01\n-1.13654995287181454e-01\n-1.45655788326816485e-02\n1.03944688142944705e-01\n1.71649794341050682e-01\n1.34754525835955347e-01\n3.26206297548414727e-04\n-1.51164089382956529e-01\n-2.09232533393945014e-01\n-1.14797730131174405e-01\n8.30150036054195656e-02\n2.55180050937262481e-01\n2.96321196193850389e-01\n2.10517909260875713e-01\n9.09667709142091829e-02\n1.87658411203787887e-02\n0.0\n6.95651268093044331e-04\n2.69424577609243170e-03\n6.36714516914441576e-03\n1.19807411350273674e-02\n1.96794288399583829e-02\n2.94298511262755386e-02\n4.09379761500981015e-02\n5.35506643650774869e-02\n6.61614549027108312e-02\n7.71525756538980201e-02\n8.44188116049529869e-02\n8.55289375442774280e-02\n7.80789021853860177e-02\n6.02670004298304987e-02\n3.16637433373796184e-02\n-5.94766911864125399e-03\n-4.79113885508203607e-02\n-8.65929128087080668e-02\n-1.12249983286300023e-01\n-1.15185092799788669e-01\n-8.91092198028362870e-02\n-3.49976619758699536e-02\n3.60586814482790063e-02\n1.03036068186847365e-01\n1.39950081137242083e-01\n1.25781004630470011e-01\n5.66116204632777301e-02\n-4.59477502088632139e-02\n-1.37249577167147863e-01\n-1.67084343531012702e-01\n-1.07860811784113442e-01\n2.11289888699000769e-02\n1.52653008948424013e-01\n2.03927721225451719e-01\n1.29671828120224514e-01\n-3.98666637159842269e-02\n-2.11274041685146491e-01\n-2.91152122460356433e-01\n-2.53059076585413323e-01\n-1.49090297287194695e-01\n-5.56955346540070409e-02\n-1.01543498648997040e-02\n1.77579519204694655e-02\n3.07576749646184325e-02\n3.96488520655190677e-02\n4.66332738263085939e-02\n5.20851514122115597e-02\n5.58402270957057967e-02\n5.74268184254253869e-02\n5.61625774912812292e-02\n5.12470518106268799e-02\n4.18923889555948697e-02\n2.75124038551427738e-02\n7.97462840121917170e-03\n-1.61015499181763541e-02\n-4.30485544006758425e-02\n-6.99428480607984654e-02\n-9.26109175387846151e-02\n-1.05995258740774978e-01\n-1.05004702743706407e-01\n-8.58793415819765760e-02\n-4.79141253231769385e-02\n4.88210174342437308e-03\n6.28959971933262113e-02\n1.11644457688725024e-01\n1.34819589768193721e-01\n1.19653628299244530e-01\n6.34204486362578423e-02\n-2.14991742116205642e-02\n-1.07401810909255296e-01\n-1.58600158794238777e-01\n-1.46071662538341668e-01\n-6.44487432451304049e-02\n5.78501233282978714e-02\n1.64672979856584495e-01\n1.96911879928927697e-01\n1.26183185131348741e-01\n-2.30145899236451797e-02\n-1.81580434025889470e-01\n-2.75185083285900856e-01\n-2.70193450542341562e-01\n-1.91368759137116956e-01\n-9.66524713232001509e-02\n-3.17646015431026912e-02\n-5.17420727593173504e-03\n0.0\n6.74260520135591484e-04\n2.61139976549029651e-03\n6.17273401246240094e-03\n1.16232460097709656e-02\n1.91224112126697175e-02\n2.86808733658105094e-02\n4.00931852446878914e-02\n5.28550559781028190e-02\n6.60786232948080976e-02\n7.84278082906011559e-02\n8.81060141951342246e-02\n9.29374950912305181e-02\n9.05869451632300565e-02\n7.89525149321035347e-02\n5.67377429616480883e-02\n2.41515591464854587e-02\n-1.63973534693469432e-02\n-5.98420642151603691e-02\n-9.85431718510482030e-02\n-1.23234259444050448e-01\n-1.25013650431577500e-01\n-9.82544907636241083e-02\n-4.38142220583732506e-02\n2.86217407971391218e-02\n1.00567455843737635e-01\n1.48415259678329553e-01\n1.50957065076949032e-01\n9.90164115525163646e-02\n3.33212102159881167e-03\n-1.04231132391007009e-01\n-1.79632892867735178e-01\n-1.84731279527789116e-01\n-1.07268965163018190e-01\n2.85494754910775271e-02\n1.69944931728740284e-01\n2.61047213056753546e-01\n2.72392365177993534e-01\n2.15182217107534768e-01\n1.29830092139535697e-01\n5.74867721228025513e-02\n1.68472588859806816e-02\n2.47439046674576219e-03\n1.89075087045241230e-02\n3.27487657207865823e-02\n4.22268896589164597e-02\n4.97193844384544864e-02\n5.56853782556916491e-02\n6.00409264674383186e-02\n6.24025645107089549e-02\n6.21791413739678500e-02\n5.86459653716791818e-02\n5.10420368322308804e-02\n3.87097976523788495e-02\n2.12856335390241465e-02\n-1.06395377582324817e-03\n-2.73848373854197816e-02\n-5.57063589765463968e-02\n-8.29197863882588371e-02\n-1.04867014463697381e-01\n-1.16748360018457731e-01\n-1.13928275585329350e-01\n-9.31341356101369200e-02\n-5.38977888665134117e-02\n1.02793829407885461e-04\n6.03319325666020756e-02\n1.13933214210954870e-01\n1.46001429606663929e-01\n1.43623119910692487e-01\n1.00947976438332768e-01\n2.36560488353181261e-02\n-6.94172134762647969e-02\n-1.49492568403946702e-01\n-1.86396504459357043e-01\n-1.60361841450873982e-01\n-7.23300745893315222e-02\n5.30023893140394373e-02\n1.74956009994766848e-01\n2.53639437779422161e-01\n2.67882898761242882e-01\n2.24133008365897474e-01\n1.50479749149316167e-01\n7.94846886327498781e-02\n3.13603559435321755e-02\n8.28456158338470965e-03\n1.10569039952014363e-03\n0.0\n6.45962910829214710e-04\n2.50180359590921513e-03\n5.91502556609856643e-03\n1.11461613358964755e-02\n1.83672116787127852e-02\n2.76308156818414509e-02\n3.88192397179601134e-02\n5.15790521394799348e-02\n6.52499337974528221e-02\n7.88013392863976259e-02\n9.07975283831146673e-02\n9.94184228677773008e-02\n1.02568444900102154e-01\n9.81043910938230457e-02\n8.42019372892862106e-02\n5.98539558508138780e-02\n2.54497661150548254e-02\n-1.66750539096152915e-02\n-6.18928695589524083e-02\n-1.03363653108999920e-01\n-1.32758129593423840e-01\n-1.41751536016715918e-01\n-1.24211031190250787e-01\n-7.86920656037518734e-02\n-1.05178036488127319e-02\n6.75169686981223344e-02\n1.36710145986330994e-01\n1.76651703918229791e-01\n1.71429855107135098e-01\n1.16015006785232022e-01\n2.01492824211368174e-02\n-9.27306419228815376e-02\n-1.92359408516373648e-01\n-2.52366600760654536e-01\n-2.60366741530630330e-01\n-2.22326991392600481e-01\n-1.58562033775474565e-01\n-9.33316813919617128e-02\n-4.39690800958037545e-02\n-1.56502767945324063e-02\n-3.76001811402386973e-03\n-4.59095565891423640e-04\n2.04106708339668562e-02\n3.53523189009948210e-02\n4.55965668551024036e-02\n5.37466908755189279e-02\n6.03656659635048581e-02\n6.54643826773789461e-02\n6.87633943331230624e-02\n6.97830054340521644e-02\n6.79022776049667542e-02\n6.24266460758023667e-02\n5.26820375970288510e-02\n3.81448830236445699e-02\n1.86098593960233871e-02\n-5.61309980187191682e-03\n-3.34952181011398745e-02\n-6.31190244671473999e-02\n-9.16008488303698271e-02\n-1.15177821992560186e-01\n-1.29532054636902844e-01\n-1.30402084061054663e-01\n-1.14476946455927570e-01\n-8.04783419819945500e-02\n-3.02209102495485452e-02\n3.06720711684365273e-02\n9.27816090967303747e-02\n1.43967830696473786e-01\n1.71626363744279253e-01\n1.65863609550954166e-01\n1.22854003981180071e-01\n4.72516154682852407e-02\n-4.75381340484354042e-02\n-1.41959412077750036e-01\n-2.15507926886476381e-01\n-2.53015353705320023e-01\n-2.49609034101207355e-01\n-2.12061408640015714e-01\n-1.55642030922804903e-01\n-9.77643952636185476e-02\n-5.14748456546137712e-02\n-2.19236061773872976e-02\n-7.10900925059180806e-03\n-1.56487634100256081e-03\n-1.75830208957743173e-04\n0.0\n6.07472034305049646e-04\n2.35272907215019816e-03\n5.56387146660513709e-03\n1.04923429991019817e-02\n1.73184557490092227e-02\n2.61328316769839815e-02\n3.69019074063509089e-02\n4.94214684086571043e-02\n6.32628589294798871e-02\n7.77191350805295084e-02\n9.17622005551519820e-02\n1.04026268749597764e-01\n1.12836874676314036e-01\n1.16306618055617164e-01\n1.12516793279982985e-01\n9.97956434536766690e-02\n7.70869831386451904e-02\n4.43764287478014968e-02\n3.10817240724321634e-03\n-4.35109690340622843e-02\n-9.04505206959231728e-02\n-1.31170704972586510e-01\n-1.58404441743969115e-01\n-1.65404789390434098e-01\n-1.47509336594434354e-01\n-1.03701860837353471e-01\n-3.77112360903639546e-02\n4.18452691161156146e-02\n1.22620901096928109e-01\n1.90997099598357006e-01\n2.35348214169122133e-01\n2.49167267504167622e-01\n2.32924529942469594e-01\n1.93814206479942130e-01\n1.43299487915493629e-01\n9.33197924821721897e-02\n5.26911162136165789e-02\n2.51696730637353400e-02\n9.79256650336842414e-03\n2.91586545284660669e-03\n5.91811669133079595e-04\n6.15096023942459459e-05\n2.25708984526844340e-02\n3.90939428925271976e-02\n5.04367188854097509e-02\n5.95197162314688999e-02\n6.70419966960561636e-02\n7.31316029569059889e-02\n7.76354835766018270e-02\n8.02127935741123177e-02\n8.03834645279574850e-02\n7.75718865113054906e-02\n7.11618499813998218e-02\n6.05714237782544809e-02\n4.53521986042834738e-02\n2.53127816508912189e-02\n6.60317353406098223e-04\n-2.78542136366480876e-02\n-5.88106432801159401e-02\n-9.00474356695143280e-02\n-1.18682824345436352e-01\n-1.41270067859963711e-01\n-1.54117704571924224e-01\n-1.53781451105926559e-01\n-1.37694528300598001e-01\n-1.04851187268530932e-01\n-5.64043679792147756e-02\n3.99955578852859324e-03\n7.03256362998950779e-02\n1.34812431071854283e-01\n1.89183615871865579e-01\n2.26227020495356673e-01\n2.41383631517175568e-01\n2.33885747409780798e-01\n2.07025203945864489e-01\n1.67353427622008860e-01\n1.22972036545195007e-01\n8.14357594973351834e-02\n4.79825567609881848e-02\n2.46974210818438726e-02\n1.08168599816327350e-02\n3.87610209102818822e-03\n1.06686518680937348e-03\n2.00740411050960175e-04\n1.93879616562412879e-05\n0.0\n5.51707840244665209e-04\n2.13675527723965024e-03\n5.05433765712196784e-03\n9.53880912106942064e-03\n1.57712296092579335e-02\n2.38723540537941759e-02\n3.38843526358729996e-02\n4.57439925648503096e-02\n5.92494629157298558e-02\n7.40237967158465654e-02\n8.94793079266592017e-02\n1.04789342753365891e-01\n1.18875651896350326e-01\n1.30421382812662412e-01\n1.37920431999838111e-01\n1.39772867009660767e-01\n1.34432423626754199e-01\n1.20604935179332962e-01\n9.74856654799466649e-02\n6.50095263606223078e-02\n2.40730749280244523e-02\n-2.33253356448303341e-02\n-7.40857016517787320e-02\n-1.24196693341103684e-01\n-1.69139648057912428e-01\n-2.04484899681612625e-01\n-2.26601738594036872e-01\n-2.33347183017077797e-01\n-2.24564265256673362e-01\n-2.02229185456594740e-01\n-1.70151746519556529e-01\n-1.33249592275933748e-01\n-9.65537315286860848e-02\n-6.42099770700870764e-02\n-3.87652913014053802e-02\n-2.09420285950812322e-02\n-9.92814954111618381e-03\n-4.01974063386310605e-03\n-1.33561811269365931e-03\n-3.41719053830265426e-04\n-5.98915042927508208e-05\n-5.39733790451645911e-06\n2.63027398424219572e-02\n4.55576817853410379e-02\n5.87929309653324392e-02\n6.94616365824596987e-02\n7.84699679473553902e-02\n8.61067588767854691e-02\n9.23841450798252167e-02\n9.71436074325985749e-02\n1.00101671129258191e-01\n1.00878309983480935e-01\n9.90233267528725924e-02\n9.40478815574698201e-02\n8.54651723964932331e-02\n7.28423314672414779e-02\n5.58636814471789450e-02\n3.44031346284807554e-02\n8.60058783692078249e-03\n-2.10661949167897516e-02\n-5.37260876491753164e-02\n-8.80900078577614848e-02\n-1.22472618467247663e-01\n-1.54873680206983638e-01\n-1.83126394219765370e-01\n-2.05109599904896134e-01\n-2.19006346017331099e-01\n-2.23575261244969431e-01\n-2.18387139275398490e-01\n-2.03972314572860136e-01\n-1.81829860230769191e-01\n-1.54270537932528706e-01\n-1.24100659720834700e-01\n-9.41966000267190490e-02\n-6.70570987960761034e-02\n-4.44378608465048480e-02\n-2.71589915196583966e-02\n-1.51294399885427318e-02\n-7.56683394945359845e-03\n-3.33037236802708738e-03\n-1.25480400588134379e-03\n-3.88760428864609771e-04\n-9.29027564496678643e-05\n-1.52303728869796775e-05\n-1.28540648320742558e-06\n0.0\n4.57251802043812810e-04\n1.77092861433901755e-03\n4.19003216224078396e-03\n7.91388196420013401e-03\n1.31072459417946041e-02\n1.99030008840328787e-02\n2.83984999879703104e-02\n3.86476757270990193e-02\n5.06498910682517053e-02\n6.43364063839833300e-02\n7.95555319742221045e-02\n9.60579264098829627e-02\n1.13483996173804891e-01\n1.31355870804555630e-01\n1.49076862133632637e-01\n1.65941522672201497e-01\n1.81159221772633439e-01\n1.93893373115986090e-01\n2.03316917157823851e-01\n2.08682321384023234e-01\n2.09401308849990503e-01\n2.05126099647984617e-01\n1.95820771815037209e-01\n1.81809298709621064e-01\n1.63786910703108302e-01\n1.42784545741843766e-01\n1.20082690293490127e-01\n9.70803821150417051e-02\n7.51359183122051189e-02\n5.54051743449640310e-02\n3.87081479174107776e-02\n2.54516683659685612e-02\n1.56252474760484490e-02\n8.86972486380081630e-03\n4.59953865033972589e-03\n2.14559123257207452e-03\n8.82277990897333800e-04\n3.11037726518680188e-04\n9.02829651389546101e-05\n2.02361317944029641e-05\n3.11463332138035915e-06\n2.46999709013944893e-07\n3.75307606102386754e-02\n6.50051842236381017e-02\n8.39152040906427227e-02\n9.92608060561685768e-02\n1.12468980319636355e-01\n1.24157528149992480e-01\n1.34628484131016191e-01\n1.44022868442596014e-01\n1.52383834655692885e-01\n1.59687530374005210e-01\n1.65860999076300447e-01\n1.70794840825025190e-01\n1.74354231661800613e-01\n1.76390178721332086e-01\n1.76752014604742713e-01\n1.75301560362423337e-01\n1.71928893083019008e-01\n1.66569155768457045e-01\n1.59219326920852472e-01\n1.49953356547211258e-01\n1.38933646602927424e-01\n1.26416613315252696e-01\n1.12750141207704949e-01\n9.83612412978195905e-02\n8.37332301390193712e-02\n6.93732313581442855e-02\n5.57726122317447823e-02\n4.33647955623157472e-02\n3.24862913039627998e-02\n2.33472836977921087e-02\n1.60172914834915345e-02\n1.04291609477824444e-02\n6.40123755752177327e-03\n3.67372957949141203e-03\n1.95208523003055786e-03\n9.48712849823013385e-04\n4.15216021435688934e-04\n1.60349659496454333e-04\n5.31369639298281428e-05\n1.45095879545634210e-05\n3.06159485337230942e-06\n4.43880320076461106e-07\n3.31761287453942675e-08\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n1.75385715931343188e-02\n3.03776970914928640e-02\n3.89894299482247964e-02\n4.50537831243302128e-02\n4.80480260970503614e-02\n4.65400382039492799e-02\n3.86255045510803599e-02\n2.25480495396490899e-02\n-2.27174361599671252e-03\n-3.38181129256359611e-02\n-6.60703944825465073e-02\n-8.85536648892354811e-02\n-8.83022665547520264e-02\n-5.55258773678883391e-02\n7.46609704613757606e-03\n7.83492811499439806e-02\n1.16648725092663261e-01\n8.43733130090411482e-02\n-1.70104229921458350e-02\n-1.20305094638899268e-01\n-1.22969970230733555e-01\n9.35905132160869992e-03\n1.50958694957938427e-01\n1.03915462896002508e-01\n-1.13821482581893951e-01\n-1.65617979165724905e-01\n1.02078086683356009e-01\n1.87205802845349906e-01\n-1.80482528572332379e-01\n-1.05887032567924186e-01\n3.16897122331143477e-01\n-3.11506306360772478e-01\n1.94908626118926759e-01\n-8.88419912097003217e-02\n3.11734890841552197e-02\n-8.65603665299482031e-03\n1.92915844115690120e-03\n-3.47110560421079798e-04\n5.03961499458167799e-05\n-5.86624629182310696e-06\n5.40333524333498994e-07\n-3.85266344302698084e-08\n2.05209553793049829e-09\n-7.68924989414811403e-11\n0.0\n1.27957098505530561e-03\n4.95575711540941800e-03\n1.16729154582532208e-02\n2.17298714766428862e-02\n3.48463920087801263e-02\n4.97890096437865956e-02\n6.39661460133040122e-02\n7.32162053931973283e-02\n7.21602998827597653e-02\n5.55765345251779327e-02\n2.10888036966206741e-02\n-2.71967000961087710e-02\n-7.57556405665781446e-02\n-1.02576258694562439e-01\n-8.55111455040393209e-02\n-1.85689543275236145e-02\n7.13685108828726045e-02\n1.24881736372987939e-01\n8.51840841702029838e-02\n-3.93941327750227874e-02\n-1.42330243848803356e-01\n-9.42257757604894608e-02\n8.54747418851426466e-02\n1.66546977429292142e-01\n-1.57040975955216426e-02\n-1.97467238887139712e-01\n1.88019344819042819e-03\n2.29365773327595029e-01\n-1.02939542298359415e-01\n-1.91533197604292715e-01\n3.33816802434613757e-01\n-2.79815352320624711e-01\n1.58802675309585556e-01\n-6.73083989677173145e-02\n2.22633667178538421e-02\n-5.87886221383933632e-03\n1.25374425751272208e-03\n-2.16874130346125099e-04\n3.03833333739192907e-05\n-3.42291948358810337e-06\n3.05900500334992657e-07\n-2.12071334148180759e-08\n1.10031191627599894e-09\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n0.0\n1.17611905411168713e-03\n4.55508950973178457e-03\n1.07332437596322581e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471571e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380204e-02\n3.00317667808626884e-02\n-1.31227298005022839e-02\n-6.07293446451537058e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162210e-01\n1.10940056055426173e-01\n2.23536404712623565e-02\n-1.00507026215736123e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301630e-02\n3.02150116038778671e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344965e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205318e-05\n1.15200522677865436e-06\n-9.71700949266911676e-08\n1.61209358962558121e-02\n2.79222800378759808e-02\n3.58705158480626049e-02\n4.16048844856494113e-02\n4.48145796327993895e-02\n4.44149286908471289e-02\n3.88846143669454858e-02\n2.66859736735079976e-02\n6.95995292709917363e-03\n-1.94741915052292665e-02\n-4.90011512080950132e-02\n-7.44963573151988662e-02\n-8.59117125296135348e-02\n-7.31800333992489588e-02\n-3.18406489571632645e-02\n3.00613580110649058e-02\n8.81760864774471798e-02\n1.07758027232156120e-01\n6.36345166706013682e-02\n-3.19775709189641308e-02\n-1.16651005253577064e-01\n-1.09883142932446387e-01\n7.71332431866367241e-03\n1.33714841099003834e-01\n1.10916738461859760e-01\n-6.95642157350540580e-02\n-1.68350522024695054e-01\n8.72211081793771228e-03\n1.95222452862690160e-01\n-6.44875876953812221e-03\n-2.23734792511104202e-01\n1.15274523916961968e-01\n1.70164055536563330e-01\n-3.24324435249284837e-01\n2.85949691658488381e-01\n-1.70491924010591211e-01\n7.62429970756966502e-02\n-2.67770107990213807e-02\n7.56631678646898457e-03\n-1.74273729462006452e-03\n3.29187814148755511e-04\n-5.10371019690732941e-05\n6.46978807841745895e-06\n-6.64720927878315846e-07\n0.0\n1.08472742381403916e-03\n4.20113124760624831e-03\n9.90251969648567321e-03\n1.84771170763648497e-02\n2.97864244518356858e-02\n4.29935124003945138e-02\n5.62502048776167066e-02\n6.64805016337838284e-02\n6.94951639769434137e-02\n6.07489836031529576e-02\n3.70087187849754834e-02\n-1.10930973807629447e-03\n-4.64683006843415666e-02\n-8.43432667407614245e-02\n-9.54507151085770000e-02\n-6.49196479072892546e-02\n4.37546628453418587e-03\n8.19387104591156323e-02\n1.16402125826403552e-01\n6.80514713575806618e-02\n-4.51112437682013104e-02\n-1.31643108854501950e-01\n-9.06119505406624282e-02\n6.35740425964042566e-02\n1.55664101856472475e-01\n3.25463011982705663e-02\n-1.61062963962579270e-01\n-9.14113873640627905e-02\n1.71651781820837623e-01\n9.17992460712664660e-02\n-2.26861122079524663e-01\n2.74638834186330671e-02\n2.38715686972304747e-01\n-3.27133758028716692e-01\n2.52461693632231754e-01\n-1.37970366908718195e-01\n5.77226737959595990e-02\n-1.91900278709026297e-02\n5.17285234812736149e-03\n-1.14295039404482086e-03\n2.07983783328885905e-04\n-3.11689067087093181e-05\n3.82973710685642281e-06\n1.54947296272444739e-02\n2.68376589639301999e-02\n3.44901382690247088e-02\n4.00656048261937708e-02\n4.33332126006105295e-02\n4.33446014062965207e-02\n3.87358878844067805e-02\n2.80789938128624614e-02\n1.04587749305626084e-02\n-1.36835414578991340e-02\n-4.15672232615813680e-02\n-6.73389093400749844e-02\n-8.22904518356531306e-02\n-7.68946777821373079e-02\n-4.51824603073081449e-02\n9.28246664279120878e-03\n6.88175382289704374e-02\n1.03622603847457279e-01\n8.51625122492814662e-02\n9.40258162826747984e-03\n-8.42585586122696073e-02\n-1.23190784367067527e-01\n-5.60485709455539188e-02\n7.71490603414189680e-02\n1.41957693042876976e-01\n3.80250389613470408e-02\n-1.33107394445308780e-01\n-1.22897469273291302e-01\n9.85217668251537892e-02\n1.65001259555808688e-01\n-1.04334215020663881e-01\n-1.71211818012831946e-01\n1.91700098164352239e-01\n6.42229980285767693e-02\n-2.86770466487896281e-01\n3.14521538031725945e-01\n-2.16820132747068239e-01\n1.09526387819912002e-01\n-4.30717369975681039e-02\n1.35966968533324899e-02\n-3.50420558820378108e-03\n7.44011625458322438e-04\n-1.30606777414204805e-04\n1.89407228381678834e-05\n0.0\n1.00359133491229741e-03\n3.88689252651339785e-03\n9.16454586749871139e-03\n1.71166499054117606e-02\n2.76532809084063802e-02\n4.00812334188399566e-02\n5.28286452056828115e-02\n6.32366432714900895e-02\n6.76067562619277473e-02\n6.17616411135322799e-02\n4.23613439669936476e-02\n9.00614482047738633e-03\n-3.33556584019398944e-02\n-7.29895541832893402e-02\n-9.29116826232875281e-02\n-7.72595071063698902e-02\n-2.22245447550479813e-02\n5.33118936416854677e-02\n1.07453728133053289e-01\n9.53987923169918040e-02\n7.90425529980405203e-03\n-9.86239633358548390e-02\n-1.24796251306563119e-01\n-2.07804070293126607e-02\n1.22067940485196036e-01\n1.23206326202876276e-01\n-5.54670439765424794e-02\n-1.68875379832798045e-01\n3.75245106249038306e-03\n1.93023993870628741e-01\n-1.19717966644227007e-02\n-2.17726004431050835e-01\n1.26958605494924298e-01\n1.49005887446015534e-01\n-3.13853591614755845e-01\n2.90873821360555174e-01\n-1.81750236667245463e-01\n8.54436789897347754e-02\n-3.17120081013738814e-02\n9.53167269233238558e-03\n-2.35345015652377396e-03\n4.80917317640655075e-04\n-8.15438442396913002e-05\n1.49153584973241819e-02\n2.58341587304696668e-02\n3.32116220822909758e-02\n3.86332887678110803e-02\n4.19352061970334686e-02\n4.22859975038917743e-02\n3.84603344508909553e-02\n2.91354457223589949e-02\n1.33735769747998466e-02\n-8.66375495098961959e-03\n-3.48542513672863083e-02\n-6.03977489688569680e-02\n-7.77935529227216094e-02\n-7.82387421210400946e-02\n-5.50015083357002360e-02\n-8.46471171821317273e-03\n4.91546485228649410e-02\n9.33789303348537963e-02\n9.58451626752420682e-02\n4.24753635577600486e-02\n-4.65584997076769203e-02\n-1.13675365711379400e-01\n-9.62111175332350937e-02\n1.20719355382154850e-02\n1.22543886229640658e-01\n1.08867617535829006e-01\n-4.32122795838502105e-02\n-1.55525846960948178e-01\n-4.44856382481702631e-02\n1.56679205239093011e-01\n9.27910170689531105e-02\n-1.70832187256578144e-01\n-8.35132886846393224e-02\n2.25539035031708329e-01\n-4.43192212618097187e-02\n-2.19269242829791655e-01\n3.21854692920053753e-01\n-2.60382928398278368e-01\n1.49103608859115527e-01\n-6.56033229395812795e-02\n2.30603344454365089e-02\n-6.61577620621448155e-03\n1.56781788435587889e-03\n-3.08791591933052479e-04\n0.0\n9.31231518307318860e-04\n3.60664416186769329e-03\n8.50602430194601945e-03\n1.59003851402937831e-02\n2.57379340198748106e-02\n3.74429036022000394e-02\n4.96727220959927579e-02\n6.01209863362155775e-02\n6.55188944650537675e-02\n6.20485606393707326e-02\n4.63832494304312337e-02\n1.74258915145632763e-02\n-2.15613650426115661e-02\n-6.13677180704330083e-02\n-8.73740745060261198e-02\n-8.39387497062394766e-02\n-4.30735769657727627e-02\n2.54205424405255995e-02\n8.96319628159662207e-02\n1.06347503727439022e-01\n5.01739850584734109e-02\n-5.32299278332872758e-02\n-1.23700127586824318e-01\n-8.28396928983311243e-02\n5.28775552565620144e-02\n1.43085576103114620e-01\n5.61977157322989043e-02\n-1.23816029173588568e-01\n-1.28765244036106341e-01\n9.31608555015563805e-02\n1.63492657040328004e-01\n-1.06861885993386627e-01\n-1.62491265219062347e-01\n1.96459227887324506e-01\n4.41807901393334868e-02\n-2.70804878711825681e-01\n3.14111450701861750e-01\n-2.26653512644749422e-01\n1.19973765030836232e-01\n-4.96384699521761202e-02\n1.65765005106963924e-02\n-4.54921307665656204e-03\n1.03647980139227533e-03\n1.43777628479310055e-02\n2.49030157517927016e-02\n3.20241522103823853e-02\n3.72974998423912310e-02\n4.06152954150984860e-02\n4.12470150602815833e-02\n3.80894807566822050e-02\n2.99194209099101355e-02\n1.57993588549691540e-02\n-4.31517921443590018e-03\n-2.88220991182772147e-02\n-5.37917865014719346e-02\n-7.27911352386194227e-02\n-7.78162281288010127e-02\n-6.18701604250055381e-02\n-2.31473998921647925e-02\n3.04712529108323929e-02\n7.95784617968803426e-02\n9.79793998825140566e-02\n6.62013883099484279e-02\n-1.01366753800791881e-02\n-9.00695577834135508e-02\n-1.12669350754509068e-01\n-4.35758001530722472e-02\n7.51257949566304511e-02\n1.31616567569722481e-01\n4.53222474338522349e-02\n-1.08967509684948782e-01\n-1.32009321504012789e-01\n4.32492245442455889e-02\n1.68583557593071587e-01\n-4.95849551960328709e-04\n-1.90872297941166280e-01\n1.82535253716544117e-02\n2.11291239247319740e-01\n-1.37916346000769546e-01\n-1.28093753419661754e-01\n3.02456372966984577e-01\n-2.94592606984599048e-01\n1.92517005520791762e-01\n-9.48537055797343404e-02\n3.70547743503434751e-02\n-1.17879586405423408e-02\n3.10082644918586526e-03\n0.0\n8.66429282646115763e-04\n3.35566618235484497e-03\n7.91598398729677181e-03\n1.48087897995973251e-02\n2.40122831542221790e-02\n3.50472155000835575e-02\n4.67623287754437428e-02\n5.71501348799718853e-02\n6.33172955586183833e-02\n6.17869798050629387e-02\n4.93220106626485535e-02\n2.43606748957862183e-02\n-1.11229677530219895e-02\n-5.00113703788095942e-02\n-7.99366057714413353e-02\n-8.61832638246840116e-02\n-5.84008842312525381e-02\n3.58922653981235719e-04\n6.73685872968290134e-02\n1.04548292164188941e-01\n7.88237761297819056e-02\n-7.40195663780936555e-03\n-9.89027990381237398e-02\n-1.13935990127217793e-01\n-1.85004588414375490e-02\n1.09092646930132903e-01\n1.21812998624311886e-01\n-2.46755130600936866e-02\n-1.53725235456650094e-01\n-5.40372972800858345e-02\n1.52844687183323419e-01\n9.28825725596139073e-02\n-1.70535416411056434e-01\n-7.46587561943221900e-02\n2.23694304082689394e-01\n-6.04428968110986981e-02\n-1.99686690021460278e-01\n3.15426223585296095e-01\n-2.67267738797149212e-01\n1.60002271027270326e-01\n-7.37997334915134195e-02\n2.73168009663592136e-02\n-8.29854356461589247e-03\n1.38779484219039642e-02\n2.40373117715579863e-02\n3.09191923522955520e-02\n3.60500078566272711e-02\n3.93693596717692787e-02\n4.02340272302892446e-02\n3.76487117825121329e-02\n3.04830846007995461e-02\n1.78153531064442656e-02\n-5.49482182959854957e-04\n-2.34208074916893993e-02\n-4.75877529139974303e-02\n-6.75494387388022449e-02\n-7.61091638273477117e-02\n-6.63277245890632750e-02\n-3.49523108687996159e-02\n1.34899062592735899e-02\n6.41107403762188055e-02\n9.38569335083886541e-02\n8.11017661926481115e-02\n2.12932056570807431e-02\n-5.98356395123844018e-02\n-1.10033564632946876e-01\n-8.17973649790613988e-02\n1.99065943209753918e-02\n1.15543012442247586e-01\n1.02750782369605914e-01\n-2.93742001352481560e-02\n-1.40730763437357187e-01\n-7.11119326209987968e-02\n1.14992551639484394e-01\n1.32923062203937181e-01\n-8.91501946354970459e-02\n-1.61393261445299030e-01\n1.10057755108233665e-01\n1.53329365464628525e-01\n-2.00545386344529619e-01\n-2.47215580270038655e-02\n2.54317729770300593e-01\n-3.12474783245817400e-01\n2.35690237780897371e-01\n-1.30409074245209172e-01\n5.65800191499633634e-02\n-1.99049268807968693e-02\n0.0\n8.08288591234426431e-04\n3.13048825278038805e-03\n7.38636279625211681e-03\n1.38275361262667085e-02\n2.24558182738384023e-02\n3.28716551587362876e-02\n4.40841011615097852e-02\n5.43398469614414306e-02\n6.10730814908735098e-02\n6.11241176128405894e-02\n5.13914736773080777e-02\n3.00176024068317671e-02\n-1.99898169769721721e-03\n-3.92548632562839950e-02\n-7.14300101888405009e-02\n-8.51024248339161127e-02\n-6.88282202082663996e-02\n-2.08685020313734808e-02\n4.38688289707184834e-02\n9.39076808058499496e-02\n9.42931765658074489e-02\n3.18024662113635462e-02\n-6.21902337039478767e-02\n-1.16986042941170973e-01\n-7.27145373567367748e-02\n4.94430960505994610e-02\n1.32216191755442747e-01\n6.58143069561735738e-02\n-9.55010704232038959e-02\n-1.38142198785441928e-01\n3.28515438647644514e-02\n1.67823150615168781e-01\n1.31066355023150413e-03\n-1.88779085923084899e-01\n2.51237557212659612e-02\n2.04443134870516130e-01\n-1.48102787348481313e-01\n-1.07514868835130756e-01\n2.90270289245229463e-01\n-2.97189226138298901e-01\n2.02784609303905239e-01\n-1.04440796024739380e-01\n4.27983435247888469e-02\n1.34212937450780886e-02\n2.32463626697816256e-02\n2.99090228151900270e-02\n3.49065431203175180e-02\n3.82185735557726697e-02\n3.92774013990946497e-02\n3.71826165405156270e-02\n3.08893652617161125e-02\n1.95010684000019446e-02\n2.71380428217200343e-03\n-1.86070987102278027e-02\n-4.18424223303757586e-02\n-6.22957162681794657e-02\n-7.35429560238891611e-02\n-6.88996795666286521e-02\n-4.42064414909768624e-02\n-1.45421181470554539e-03\n4.83245420520074312e-02\n8.55369148149673492e-02\n8.85074550724198189e-02\n4.61377494370488472e-02\n-2.84320086479163819e-02\n-9.43561941113424951e-02\n-1.01465897648749234e-01\n-2.96421383429676458e-02\n7.66594921791289990e-02\n1.22533482049576745e-01\n4.52480762356886126e-02\n-9.33415357277581209e-02\n-1.30551080517524093e-01\n8.17151393836725200e-03\n1.51049937312464744e-01\n6.16564885841606874e-02\n-1.49716894566063741e-01\n-9.20361491211689059e-02\n1.70754825346733669e-01\n6.54753873485157539e-02\n-2.21489666627900816e-01\n7.57563199250518987e-02\n1.80353481783649627e-01\n-3.08340322769238284e-01\n2.73458872382276952e-01\n-1.70816673177772549e-01\n8.23667464431433460e-02\n0.0\n7.57724448977119031e-04\n2.93465417190257385e-03\n6.92562449167089672e-03\n1.29730884358418893e-02\n2.10975155357239798e-02\n3.09647556802588736e-02\n4.17169427477093041e-02\n5.18142298747912497e-02\n5.89714039778204344e-02\n6.03134768963659029e-02\n5.28936787151628382e-02\n3.46752469818753378e-02\n5.92427701563943802e-03\n-2.93386971071714388e-02\n-6.25861798704136496e-02\n-8.18136589378635204e-02\n-7.53095372303064087e-02\n-3.80848197559132753e-02\n2.12608415110032943e-02\n7.80207737291297720e-02\n9.88887696431393765e-02\n6.13892791401563429e-02\n-2.27683125874381630e-02\n-1.00014532470144274e-01\n-1.03232736490317570e-01\n-1.22107911681466202e-02\n1.01826090597949864e-01\n1.16866870983595106e-01\n-7.49000385000591750e-03\n-1.36444863787358345e-01\n-8.36099602161316929e-02\n1.07087050854088581e-01\n1.36330626994149662e-01\n-8.63890207234033619e-02\n-1.59514136219694874e-01\n1.13861035120564613e-01\n1.44646930367952647e-01\n-2.04524302286497484e-01\n-6.58040963000563854e-03\n2.39109426593063029e-01\n-3.11504920158816700e-01\n2.45238141636582502e-01\n-1.41508752308487556e-01\n1.30881354521518740e-02\n2.26693155794705087e-02\n2.91729924403889111e-02\n3.40779446614156781e-02\n3.73980985840282748e-02\n3.86283086310595172e-02\n3.69468233313910502e-02\n3.13810034891485318e-02\n2.10597659950777644e-02\n5.59862022603062510e-03\n-1.43918462036819496e-02\n-3.67681450484512312e-02\n-5.75014979147847535e-02\n-7.08522381949787949e-02\n-7.04654076951823777e-02\n-5.16302816296645983e-02\n-1.44499289571608930e-02\n3.32048132545899391e-02\n7.50566150066731691e-02\n9.05324035702393670e-02\n6.46523934985008542e-02\n8.40675467776069761e-04\n-7.15366614021782921e-02\n-1.05788598073802642e-01\n-6.73181998603047116e-02\n2.96287785461972174e-02\n1.11898292169557545e-01\n9.56885630431899836e-02\n-2.36038204871195402e-02\n-1.29302328940224392e-01\n-8.37149000586775022e-02\n8.25678094909094024e-02\n1.43843599115883541e-01\n-2.35111602780939920e-02\n-1.68493566696804542e-01\n-3.08682077073049168e-03\n1.88779229346041161e-01\n-3.11958852256340839e-02\n-2.00412373028135943e-01\n1.57912070770758278e-01\n9.15883593522249934e-02\n-2.84117170091634341e-01\n3.04807117190951271e-01\n-2.16511537923642305e-01\n0.0\n7.22553429612098194e-04\n2.79843739963270928e-03\n6.60532702966666000e-03\n1.23801819055713372e-02\n2.01589946812742865e-02\n2.96586780138993061e-02\n4.01241126072523144e-02\n5.01800020066986846e-02\n5.77582271912713413e-02\n6.02065567675230187e-02\n5.47050513369957830e-02\n3.90899252063929559e-02\n1.30688495648216083e-02\n-2.04258155356200170e-02\n-5.43400806304921297e-02\n-7.79680112824612109e-02\n-7.97106234129729557e-02\n-5.23715812006431136e-02\n3.78938170195143185e-04\n5.99679961846934714e-02\n9.63476660175838495e-02\n8.21835949092748624e-02\n1.42536765565474139e-02\n-7.17921518658762442e-02\n-1.12754865230088430e-01\n-6.31757787976703761e-02\n5.06608860571063566e-02\n1.26106154553791372e-01\n7.03181646533995869e-02\n-7.68794217210162084e-02\n-1.39341488139615916e-01\n-8.65699241551699285e-03\n1.50536812842578027e-01\n7.18953774340976015e-02\n-1.49077065246799811e-01\n-9.61692239678771932e-02\n1.73862667566332341e-01\n6.31983471734743896e-02\n-2.25960748629195463e-01\n8.54105627131153677e-02\n1.78167346344028366e-01\n-3.20935040892358858e-01\n2.95043803768522017e-01\n1.30987000417555396e-02\n2.26876139854251709e-02\n2.92025620312621435e-02\n3.41410756129963272e-02\n3.75488832223641184e-02\n3.89662854773345710e-02\n3.76248858367299183e-02\n3.25978004432986232e-02\n2.30230712402675272e-02\n8.44550060620580245e-03\n-1.07247410246706695e-02\n-3.27090196032111258e-02\n-5.39872910453576410e-02\n-6.93435632183640460e-02\n-7.26827569939215018e-02\n-5.88831581339323423e-02\n-2.65837046171013870e-02\n1.88921700080515731e-02\n6.41467797757591385e-02\n9.00453852035273117e-02\n7.92640460104163252e-02\n2.77876003522067247e-02\n-4.53979145835518294e-02\n-9.98400944111596800e-02\n-9.36993197234451125e-02\n-1.75782695418652823e-02\n8.15932686029925691e-02\n1.19530748289679967e-01\n4.55156877173948857e-02\n-8.51707044308414318e-02\n-1.31891600933083747e-01\n-1.74633762348218868e-02\n1.33858146574428349e-01\n1.02517279279978724e-01\n-9.87965908353773681e-02\n-1.49424325048942402e-01\n8.01165823150408601e-02\n1.71052563503441446e-01\n-1.13352429159612841e-01\n-1.56779722293442086e-01\n2.13953848137995561e-01\n1.68531780994566859e-02\n-2.74104319276916364e-01\n3.59698621301614230e-01\n0.0\n7.09885188647272009e-04\n2.74937351335019509e-03\n6.49062863447527789e-03\n1.21719368010028608e-02\n1.98443465895290008e-02\n2.92636728671179999e-02\n3.97484475068489579e-02\n5.00379168562497187e-02\n5.82110197703358187e-02\n6.17588025164150858e-02\n5.79239013334568037e-02\n4.44052268694167251e-02\n2.04382280453454697e-02\n-1.19299377102052677e-02\n-4.68406133079924611e-02\n-7.46704127398702816e-02\n-8.39971110603975335e-02\n-6.59415566756636345e-02\n-2.01363970505760090e-02\n4.03201676000452675e-02\n8.92429493728806172e-02\n9.70056305435095245e-02\n4.89563716787155961e-02\n-3.63559163325866408e-02\n-1.05800337401504935e-01\n-1.00867495138708671e-01\n-9.42811357600421146e-03\n1.01069215737241647e-01\n1.21222722815312489e-01\n9.40311300613001257e-03\n-1.26252500697560832e-01\n-1.11747312580811733e-01\n6.34489615001302132e-02\n1.60756075245181596e-01\n-7.55134799643025079e-05\n-1.80103830686090649e-01\n-2.70693069471283181e-02\n2.03876290081908579e-01\n-7.48168795745691572e-03\n-2.32167079195750081e-01\n1.45602683965346730e-01\n1.66466395206344070e-01\n-3.95885582176726869e-01\n1.34769526807543283e-02\n2.33427667742680776e-02\n3.00520334791418986e-02\n3.51635668099393589e-02\n3.87571139093774789e-02\n4.04070830083559443e-02\n3.93794534550912373e-02\n3.47714072297735932e-02\n2.57129916930665947e-02\n1.16761733086405139e-02\n-7.10429920139242672e-03\n-2.91533533044890172e-02\n-5.13643267209570945e-02\n-6.89394986716572039e-02\n-7.59797873658402401e-02\n-6.69985363301277420e-02\n-3.93713521914381068e-02\n3.81978608736697079e-03\n5.18565493998665514e-02\n8.72960980181113899e-02\n9.14372331170942992e-02\n5.42289810376753306e-02\n-1.50920877221496445e-02\n-8.42738470463699207e-02\n-1.09496618194090956e-01\n-6.32443524573347987e-02\n3.53861299996824918e-02\n1.16286834475988171e-01\n1.02729270163319106e-01\n-1.20225987389873216e-02\n-1.26828991495739923e-01\n-1.08754998268381309e-01\n4.70166629842710890e-02\n1.56821863602390005e-01\n4.91262057803831809e-02\n-1.49412577388315176e-01\n-1.14679261980818500e-01\n1.38463960735656727e-01\n1.45635055608961589e-01\n-1.65284901633535458e-01\n-1.33598989503718402e-01\n2.50605883681014163e-01\n2.19055055717767531e-02\n-3.98098407640912699e-01\n0.0\n7.07874123069401938e-04\n2.74158468985897293e-03\n6.47337177652746332e-03\n1.21464293056451744e-02\n1.98276512701616517e-02\n2.93082235342601062e-02\n3.99706838397628841e-02\n5.06518588971549000e-02\n5.95542644447714098e-02\n6.42868073817782354e-02\n6.21369945730305545e-02\n5.06700787664042668e-02\n2.86858551099975281e-02\n-2.58763913765355010e-03\n-3.84271992228518849e-02\n-7.03162469133809948e-02\n-8.72165074070741508e-02\n-7.89958893487233693e-02\n-4.17446001011479995e-02\n1.68247828373857752e-02\n7.53917456542590320e-02\n1.04482699241500443e-01\n8.09575997227575811e-02\n6.82256109722655102e-03\n-8.02584723080313062e-02\n-1.20108697528158392e-01\n-7.10126390590763990e-02\n4.38045773128115518e-02\n1.30845272271766677e-01\n9.59767944390729905e-02\n-4.75689764610909144e-02\n-1.50855253851353927e-01\n-7.22210280541670940e-02\n1.15896384961055615e-01\n1.52095251695224004e-01\n-5.45543001670516503e-02\n-1.92020878828106450e-01\n1.62349500428221639e-02\n2.22588050272500837e-01\n-2.96124398670997921e-02\n-2.63725732587057171e-01\n1.25675765496915032e-01\n3.70287375835212373e-01\n1.39870830970846623e-02\n2.42263385738384837e-02\n3.11961926251541552e-02\n3.65337907310313501e-02\n4.03569769310230392e-02\n4.22751215622153495e-02\n4.15882011509952423e-02\n3.74170040134960760e-02\n2.88842581613326550e-02\n1.53920850060043947e-02\n-2.99467381658093590e-03\n-2.50992231868578108e-02\n-4.82317468745083189e-02\n-6.80413111419867073e-02\n-7.88998657155983718e-02\n-7.50907125190539704e-02\n-5.28972738304682930e-02\n-1.32673816638215550e-02\n3.59151372232598201e-02\n7.95594287774098047e-02\n9.88380110115538446e-02\n7.90915141154531903e-02\n2.02195053900144917e-02\n-5.60058471461297516e-02\n-1.09510280352640710e-01\n-1.01349683324863910e-01\n-2.35976320732136785e-02\n8.02826710589510939e-02\n1.30869931701302844e-01\n7.21123046647698246e-02\n-6.19261706226553882e-02\n-1.46732056074053929e-01\n-7.64998175617220555e-02\n9.45390022277368680e-02\n1.61450624697895284e-01\n7.69668939004194714e-03\n-1.76964776902581750e-01\n-9.43541673219656929e-02\n1.67349714578443165e-01\n1.50265494019215462e-01\n-1.78568063637946944e-01\n-1.86817106464690325e-01\n2.46181223659526383e-01\n3.21868255760798583e-01\n0.0\n7.04812074460869084e-04\n2.72972542659284754e-03\n6.44653532733365474e-03\n1.21031375542158485e-02\n1.97826301197376840e-02\n2.93129629981199423e-02\n4.01439023370228285e-02\n5.12162278541949331e-02\n6.08676512246999479e-02\n6.68447392884841673e-02\n6.65108945352090031e-02\n5.73405471256365276e-02\n3.77449635668930528e-02\n8.15992600790657260e-03\n-2.78706812694305313e-02\n-6.31268010968382698e-02\n-8.73597143784649033e-02\n-8.97936642811704988e-02\n-6.35741180588935834e-02\n-1.10994628874632045e-02\n5.23525487008798668e-02\n1.00333489971159151e-01\n1.05033328668790407e-01\n5.39283340181910056e-02\n-3.47082467148692800e-02\n-1.10931029733738931e-01\n-1.17677347834829499e-01\n-3.51364275824195618e-02\n8.56855961498866753e-02\n1.42456029851039501e-01\n6.62116879850337681e-02\n-8.85951202856957165e-02\n-1.59767572387765344e-01\n-4.22588139596074067e-02\n1.45530380033478485e-01\n1.48898375351830620e-01\n-7.60056142993364714e-02\n-2.08073318421706011e-01\n5.77295389277386953e-03\n2.48791247694482659e-01\n5.12869122701541669e-02\n-3.21639351839669518e-01\n-2.63375503392883403e-01\n1.45331765278691738e-02\n2.51722001416368538e-02\n3.24212974699186959e-02\n3.80022990934727328e-02\n4.20753893110558802e-02\n4.42898998915925643e-02\n4.39861665920214390e-02\n4.03164358691357055e-02\n3.24051320431353040e-02\n1.95934791761195846e-02\n1.78213928849189668e-03\n-2.01546170529285085e-02\n-4.39703803104365409e-02\n-6.58285302704561953e-02\n-8.05014788762886679e-02\n-8.22428914332188621e-02\n-6.64837706741788631e-02\n-3.22048800125470935e-02\n1.56691088860542831e-02\n6.51010238390713619e-02\n9.85876713179519720e-02\n9.87740239589335323e-02\n5.74851207721994995e-02\n-1.52725643044940834e-02\n-8.86214376419166699e-02\n-1.20837754478965748e-01\n-8.29989843107908909e-02\n1.41634893257837277e-02\n1.11726618755809276e-01\n1.32243494893000607e-01\n4.24993133461876380e-02\n-9.62571864833514507e-02\n-1.54823117586666809e-01\n-5.41082758535102598e-02\n1.20798906543803264e-01\n1.67076093775291201e-01\n-3.01554946400254056e-03\n-1.91773630225110736e-01\n-1.16763769595728678e-01\n1.59311251829399120e-01\n2.16632651901042111e-01\n-9.87342758603310805e-02\n-3.47925917273320062e-01\n-2.03802494274301055e-01\n0.0\n6.98770384169378092e-04\n2.70632606071096035e-03\n6.39246800714460967e-03\n1.20088559699387514e-02\n1.96547703318905309e-02\n2.91964644036101367e-02\n4.01551082013065080e-02\n5.15839622366968814e-02\n6.19714428279077925e-02\n6.92279040204825669e-02\n7.08333503214068211e-02\n6.42283833374916319e-02\n4.75026226038150617e-02\n2.03520819449005443e-02\n-1.48739549977289012e-02\n-5.24210166222099233e-02\n-8.32492941625894295e-02\n-9.66454112837948354e-02\n-8.36519886044408412e-02\n-4.18542061859274034e-02\n2.01653790781773853e-02\n8.15921324017371413e-02\n1.14443208559241796e-01\n9.59933241428635592e-02\n2.49128799783916825e-02\n-6.83662573830707276e-02\n-1.29045755728466771e-01\n-1.08489767853611585e-01\n-5.60976673202023303e-03\n1.12976823004113200e-01\n1.47126163702333695e-01\n4.82390846890125569e-02\n-1.10172016611791893e-01\n-1.68740188211854825e-01\n-4.01700138315490840e-02\n1.54249071793410658e-01\n1.73042427927476566e-01\n-4.59663001198800311e-02\n-2.34423107503399453e-01\n-1.01853310792088231e-01\n2.23568225326171377e-01\n3.32050495623704645e-01\n1.49515719395495045e-01\n1.51276809943043135e-02\n2.62019120828291437e-02\n3.37551878435740915e-02\n3.96020570799085064e-02\n4.39498071617267852e-02\n4.64930457282928394e-02\n4.66192094490226264e-02\n4.35205742616327981e-02\n3.63337531937665478e-02\n2.43508533016189577e-02\n7.31897715893677255e-03\n-1.41869143030854440e-02\n-3.83807322798478262e-02\n-6.19984470377870633e-02\n-8.03402787827737774e-02\n-8.78489194402538309e-02\n-7.94015603143495147e-02\n-5.23005667064272359e-02\n-8.57741503604366774e-03\n4.32726762950544561e-02\n8.84332691943282984e-02\n1.09077649643135974e-01\n9.12400981133749539e-02\n3.36422994189881225e-02\n-4.57471336256805583e-02\n-1.11327952178086706e-01\n-1.23944456824079341e-01\n-6.50337104882872941e-02\n4.17832256292431439e-02\n1.31288891415230896e-01\n1.32473578565442424e-01\n2.71303547355477848e-02\n-1.13436462524176523e-01\n-1.64566320407380451e-01\n-5.79536233899334147e-02\n1.23222785000932769e-01\n1.88475019233688451e-01\n3.71607128562836883e-02\n-1.83860423347296215e-01\n-2.01254417681901276e-01\n4.88774896919868390e-02\n2.99207508736692163e-01\n2.87390449394047509e-01\n1.04118688675395366e-01\n0.0\n6.89864556151440433e-04\n2.67183393711330035e-03\n6.31220869502394002e-03\n1.18654285206707746e-02\n1.94467001584522313e-02\n2.89615570737448737e-02\n4.00057175057880743e-02\n5.17519050164867850e-02\n6.28529209872922406e-02\n7.14077277947772898e-02\n7.50546401174105732e-02\n7.12639346939788199e-02\n5.78872721756156644e-02\n3.39661119619191210e-02\n6.92034631372451616e-04\n-3.77489007155454928e-02\n-7.38909898803674359e-02\n-9.78082579362185567e-02\n-9.94750162638535773e-02\n-7.26390016568700808e-02\n-1.93050089356260543e-02\n4.71594086848325933e-02\n1.03010776867589693e-01\n1.21388944462774429e-01\n8.54293361427132109e-02\n2.30044503524371585e-03\n-9.11148679916007898e-02\n-1.40320618715815221e-01\n-1.04441467028194263e-01\n7.88014916392924120e-03\n1.26601950294015941e-01\n1.57008545745149303e-01\n5.61658483313375173e-02\n-1.07922833005894322e-01\n-1.87131302721222942e-01\n-8.40051876984777429e-02\n1.24394414455831548e-01\n2.24399660894477271e-01\n8.16659986347882116e-02\n-1.85609899269400358e-01\n-3.20355924391362790e-01\n-2.28789460593631977e-01\n-6.88428543022391037e-02\n1.57949495180183877e-02\n2.73576550681933969e-02\n3.52523097971815108e-02\n4.13974437166853837e-02\n4.60531168887045733e-02\n4.89649400651456512e-02\n4.95745384719593341e-02\n4.71234048152994189e-02\n4.07721920312728928e-02\n2.97784671543586468e-02\n1.37515291997496458e-02\n-7.02138418284553416e-03\n-3.12195156985256850e-02\n-5.61958415360396396e-02\n-7.78955989637216545e-02\n-9.11757061362508114e-02\n-9.07043941015708011e-02\n-7.25119520696083236e-02\n-3.60186387065596705e-02\n1.40095473608956578e-02\n6.65345574237640597e-02\n1.05521921637658375e-01\n1.14283054521641211e-01\n8.26233601945852714e-02\n1.46133108193195471e-02\n-6.72399858183620053e-02\n-1.26325883841176101e-01\n-1.27196224898840804e-01\n-5.77854984331499927e-02\n5.35821134502777879e-02\n1.42552865986028954e-01\n1.42962851036373462e-01\n3.79833543205935556e-02\n-1.08807679710700225e-01\n-1.81977996893154692e-01\n-1.03439919789714244e-01\n8.13182786982000888e-02\n2.13372486886105495e-01\n1.53504006192272863e-01\n-7.10207385741631336e-02\n-2.73991418158011757e-01\n-2.96620607692194338e-01\n-1.68852922366823449e-01\n-4.32022460637529193e-02\n0.0\n6.77824854128931476e-04\n2.62520437168682315e-03\n6.20327175939973732e-03\n1.16680764194687023e-02\n1.91502020962377000e-02\n2.85949382029381111e-02\n3.96748936441081793e-02\n5.16881215302614216e-02\n6.34642732526708719e-02\n7.33151230555997846e-02\n7.90805636311958798e-02\n7.83307770751344862e-02\n6.87799396704057431e-02\n4.89337312634020027e-02\n1.89199061394758408e-02\n-1.86655759655838110e-02\n-5.82083558197652798e-02\n-9.12542121936694706e-02\n-1.07858316657713033e-01\n-9.93302712697833462e-02\n-6.20696393591574358e-02\n-1.37518452478552948e-03\n6.67200054223203581e-02\n1.17843228966601904e-01\n1.27250426940187261e-01\n8.21421645477669604e-02\n-6.64643041163514355e-03\n-1.01541850916356646e-01\n-1.50775160448170964e-01\n-1.16340362707369221e-01\n-4.70876284606648599e-03\n1.22467125158894991e-01\n1.76587205764965893e-01\n1.03726938627346152e-01\n-6.03935379571915038e-02\n-1.96083792809468943e-01\n-1.84022767285445199e-01\n-1.14751253866928003e-02\n2.01720182832906797e-01\n3.02940499319142631e-01\n2.45251477598331352e-01\n1.16035361796022557e-01\n2.57070540467207627e-02\n1.65635859236261916e-02\n2.86889723752532348e-02\n3.69766589180568067e-02\n4.34643475782260230e-02\n4.84718507635412271e-02\n5.18023587275936101e-02\n5.29596461439966470e-02\n5.12448447979510641e-02\n4.58565383415148881e-02\n3.60358289704578172e-02\n2.12758230762931794e-02\n1.59686650152021051e-03\n-2.21372576774392718e-02\n-4.79241228633843080e-02\n-7.24552176753641697e-02\n-9.12234399372632287e-02\n-9.90657143415027142e-02\n-9.12539367872907542e-02\n-6.51067844157495607e-02\n-2.18453929301831440e-02\n3.19090887668544224e-02\n8.38849349835088937e-02\n1.18089942911761794e-01\n1.19410102922961850e-01\n8.02690621982305175e-02\n7.14011009240126011e-03\n-7.67471428734024519e-02\n-1.36298312252045972e-01\n-1.38446272555502292e-01\n-7.12792279841127363e-02\n4.14141467864895460e-02\n1.42610836031460908e-01\n1.68232254685259291e-01\n8.86284397005028535e-02\n-6.01782678907106308e-02\n-1.85076966295806083e-01\n-1.92292134947896459e-01\n-5.91608304402298918e-02\n1.38060074970731944e-01\n2.76089183731327459e-01\n2.81422384774577650e-01\n1.83982916304493316e-01\n7.44083507598696514e-02\n1.44825046945062253e-02\n0.0\n6.62011591412588608e-04\n2.56395986853722455e-03\n6.05978273570869762e-03\n1.14056275844673580e-02\n1.87464960616505645e-02\n2.80673360681148246e-02\n3.91191663071355639e-02\n5.13301457706964726e-02\n6.37180678771824272e-02\n7.48310972227818338e-02\n8.27553926718223309e-02\n8.52377451077747650e-02\n7.99721682630432640e-02\n6.50827508044150571e-02\n3.97914976067378634e-02\n5.18324544817491423e-03\n-3.51256787964580805e-02\n-7.47190193976879080e-02\n-1.04882205628801267e-01\n-1.16190216911027364e-01\n-1.01245192759387259e-01\n-5.81370473331588450e-02\n6.45623809592465927e-03\n7.61893585769369830e-02\n1.27726132724115649e-01\n1.38004780401757315e-01\n9.48392163435578806e-02\n6.80985870410083689e-03\n-9.36687713877419753e-02\n-1.59463660933945622e-01\n-1.50277457168178308e-01\n-5.83491418908975920e-02\n7.73386119655954524e-02\n1.83068564116598109e-01\n1.89731895595943528e-01\n7.91735639921881951e-02\n-9.62115011276167970e-02\n-2.42589166701714598e-01\n-2.87683062559245306e-01\n-2.29130001683573975e-01\n-1.26283569149999275e-01\n-4.45503085634829724e-02\n-7.70872812762498673e-03\n1.74757571547803532e-02\n3.02688992928148992e-02\n3.90225869001878181e-02\n4.59147078280229548e-02\n5.13337951356184485e-02\n5.51485196541395897e-02\n5.69341054770024710e-02\n5.60635125389610522e-02\n5.17898405801339792e-02\n4.33601633908617529e-02\n3.01801031304807545e-02\n1.20351673179083032e-02\n-1.06427153571242491e-02\n-3.65005040950754298e-02\n-6.30509622717444346e-02\n-8.66250680408978402e-02\n-1.02616642841720174e-01\n-1.06137466656317486e-01\n-9.31370968650508807e-02\n-6.19021638321657908e-02\n-1.46356391716341277e-02\n4.14310409909419905e-02\n9.41219078338420279e-02\n1.28288004506592224e-01\n1.29938550397884267e-01\n9.19277237192415997e-02\n1.94120514353943972e-02\n-6.77073672379837760e-02\n-1.38187182454254681e-01\n-1.59855035028221321e-01\n-1.14718010024784794e-01\n-1.23220081447687289e-02\n1.07283512117055488e-01\n1.86980372749866230e-01\n1.80003550977655968e-01\n7.81550628523816904e-02\n-7.78488796939484085e-02\n-2.17331891340618893e-01\n-2.80046167742405094e-01\n-2.51513223909496708e-01\n-1.66736922452726144e-01\n-7.96386089831246369e-02\n-2.48861923960554503e-02\n-3.86630921352976728e-03\n0.0\n6.41382015324228776e-04\n2.48406186390768809e-03\n5.87217121270643041e-03\n1.10599144511618550e-02\n1.82051618794650365e-02\n2.73316518739486654e-02\n3.82692635837369316e-02\n5.05796092243455259e-02\n6.34782427372996977e-02\n7.57719213928549212e-02\n8.58381050377378940e-02\n9.16820493797897568e-02\n9.11107617966058492e-02\n8.20573645980244848e-02\n6.30675858563741892e-02\n3.39164792091756206e-02\n-3.74335465911158037e-03\n-4.58829341901035720e-02\n-8.60033654890533655e-02\n-1.15731664021106906e-01\n-1.26318751704528692e-01\n-1.11033674296961482e-01\n-6.80699079777146027e-02\n-3.10826185931281163e-03\n6.97068344567144116e-02\n1.29647671253251967e-01\n1.54789187075639434e-01\n1.30169683015695592e-01\n5.61530200840061264e-02\n-4.70516608197105307e-02\n-1.42659088191692235e-01\n-1.89718023326821222e-01\n-1.61205692106131088e-01\n-5.94846931314348057e-02\n8.05801425773193941e-02\n2.05678545113486266e-01\n2.69988699421094880e-01\n2.58342106848060804e-01\n1.91458439781579975e-01\n1.09491841869007733e-01\n4.62039603986852884e-02\n1.29448824672693426e-02\n1.82089029542908780e-03\n1.86021221514400814e-02\n3.22198206948966920e-02\n4.15481870241857718e-02\n4.89360329952022166e-02\n5.48528479833912050e-02\n5.92427835463167421e-02\n6.17638223728239968e-02\n6.18754316014106173e-02\n5.89054024466645690e-02\n5.21348049799596688e-02\n4.09194202052167860e-02\n2.48561590813382652e-02\n3.99201657178700590e-03\n-2.09426256334494659e-02\n-4.83157897772322556e-02\n-7.54549581498896033e-02\n-9.86739944827956517e-02\n-1.13562393743775164e-01\n-1.15616369145232961e-01\n-1.01232252165255845e-01\n-6.89718420958496253e-02\n-2.08526555906723803e-02\n3.67533086338660830e-02\n9.31429357574754951e-02\n1.34721185681574790e-01\n1.48066538398150149e-01\n1.24266347209372199e-01\n6.34085912779574490e-02\n-2.25560537754722172e-02\n-1.10526949650606096e-01\n-1.71710818813157945e-01\n-1.81165586787614047e-01\n-1.28386617507841860e-01\n-2.41338241846464491e-02\n1.00966753848621624e-01\n2.07298231844982028e-01\n2.62697363899153657e-01\n2.56341714016466993e-01\n2.02094578771869676e-01\n1.29038114984365737e-01\n6.51460001564590080e-02\n2.46382751896974880e-02\n6.24985246738030825e-03\n8.01734475557146957e-04\n0.0\n6.14216576468150236e-04\n2.37885057162568045e-03\n5.62465982139920880e-03\n1.06010151368746246e-02\n1.74761987619437426e-02\n2.63107383986618815e-02\n3.70122874545448372e-02\n4.92771721695296136e-02\n6.25256884744079949e-02\n7.58425905792093902e-02\n8.79399836691128478e-02\n9.71659085789865623e-02\n1.01586442214307501e-01\n9.91693123676514326e-02\n8.80891475548146313e-02\n6.71546321994032358e-02\n3.63232721623724664e-02\n-2.77911211317801105e-03\n-4.64726802710087109e-02\n-8.89570343287376802e-02\n-1.22762116762009751e-01\n-1.39862912428139197e-01\n-1.33461587491719269e-01\n-1.00203265834315380e-01\n-4.22986628562047676e-02\n3.12250548268211900e-02\n1.04987560657399670e-01\n1.59998201072685864e-01\n1.78553849153748889e-01\n1.50176919376735774e-01\n7.65478963987510364e-02\n-2.69381828046633166e-02\n-1.34589056446999172e-01\n-2.18469689512293341e-01\n-2.58327680041556429e-01\n-2.49020321634486119e-01\n-2.01619010740463012e-01\n-1.37351706851851191e-01\n-7.75456221556524716e-02\n-3.51263714492641016e-02\n-1.20393301203569614e-02\n-2.78759417857569764e-03\n-3.28157111793246734e-04\n2.00760340875332996e-02\n3.47727110540923603e-02\n4.48517933625068033e-02\n5.28820139154135005e-02\n5.94320421921684452e-02\n6.45351677564116183e-02\n6.79467118444852386e-02\n6.92311047873749169e-02\n6.78161207156585816e-02\n6.30524527817716979e-02\n5.42955195290770742e-02\n4.10185665081396131e-02\n2.29597622549567067e-02\n2.97574140104950910e-04\n-2.61629769077943823e-02\n-5.48253475523302197e-02\n-8.32059149626621086e-02\n-1.07969077658854218e-01\n-1.25158142974284708e-01\n-1.30673599821590131e-01\n-1.21011379364937388e-01\n-9.42048883429043027e-02\n-5.08203483470599515e-02\n5.24632962790839378e-03\n6.64961157758908739e-02\n1.22398646535803221e-01\n1.61003590079266623e-01\n1.71512039058473231e-01\n1.47341755228439758e-01\n8.88328463237150479e-02\n4.53485527732962884e-03\n-8.98131078263875310e-02\n-1.74851299639123436e-01\n-2.32952899046263595e-01\n-2.53613560464037380e-01\n-2.36714870980296671e-01\n-1.92088455678647740e-01\n-1.35359755395401571e-01\n-8.18810565119667544e-02\n-4.15943141246161718e-02\n-1.71105586063062358e-02\n-5.36218212455602961e-03\n-1.14107149769700862e-03\n-1.23947674141149626e-04\n0.0\n5.77395889596542884e-04\n2.23624466457602667e-03\n5.28863425811657711e-03\n9.97470452685457129e-03\n1.64691446813111826e-02\n2.48654231928406647e-02\n3.51454482818384997e-02\n4.71382097402959777e-02\n6.04713336693607009e-02\n7.45216131443856428e-02\n8.83737407146309717e-02\n1.00800162313677250e-01\n1.10278450438920567e-01\n1.15064683480627872e-01\n1.13340372726674549e-01\n1.03444519072051239e-01\n8.41894965305034076e-02\n5.52385497138495399e-02\n1.74945469773727207e-02\n-2.65818326003042539e-02\n-7.28330601264283589e-02\n-1.15563373017999446e-01\n-1.48092260717611890e-01\n-1.63735336988968638e-01\n-1.57134062666860641e-01\n-1.25712767545300252e-01\n-7.09038234597189482e-02\n1.29207285029046717e-03\n8.07894549841362136e-02\n1.55101057200251385e-01\n2.12000904853687194e-01\n2.42524222226386921e-01\n2.43365305320363989e-01\n2.17758108367590825e-01\n1.74364119853232691e-01\n1.24448653126920522e-01\n7.83829636289118531e-02\n4.28540497958190894e-02\n1.98349715232126085e-02\n7.47992385665579435e-03\n2.15901627547904120e-03\n4.24737241008628103e-04\n4.27784264805800344e-05\n2.21956780089631184e-02\n3.84440420199633412e-02\n4.96004222069758860e-02\n5.85430782831685564e-02\n6.59710605225355406e-02\n7.20279466527607576e-02\n7.65871763723381810e-02\n7.93431886091329475e-02\n7.98572960970907880e-02\n7.75969643726953651e-02\n7.19838746012771841e-02\n6.24589679060224001e-02\n4.85688854348057114e-02\n3.00744361321436011e-02\n7.07672191963109893e-03\n-1.98500696207237030e-02\n-4.95381832748778284e-02\n-8.01454431238552145e-02\n-1.09148096675198952e-01\n-1.33443703080706577e-01\n-1.49594700340178605e-01\n-1.54226217756470108e-01\n-1.44561424227337698e-01\n-1.19035701392312399e-01\n-7.78838270786431780e-02\n-2.35548531711082948e-02\n3.92048647821542709e-02\n1.03730586422729892e-01\n1.62325552013652619e-01\n2.07565454822980583e-01\n2.33775492972942450e-01\n2.38309664736847171e-01\n2.22232056321142596e-01\n1.90112331299159942e-01\n1.48901136985922528e-01\n1.06174127613661545e-01\n6.82945939659958812e-02\n3.91064675811348683e-02\n1.95669765994419056e-02\n8.33112401586784922e-03\n2.90190329061066222e-03\n7.76217692145610518e-04\n1.41889896654014705e-04\n1.33079126795278718e-05\n0.0\n5.24200773285743763e-04\n2.03022086500473549e-03\n4.80247307165976734e-03\n9.06429235075898593e-03\n1.49896328588034269e-02\n2.26975055625152841e-02\n3.22360819944816634e-02\n4.35589887385275862e-02\n5.64956890047319318e-02\n7.07184336215221088e-02\n8.57094697170410064e-02\n1.00733783741339136e-01\n1.14824392685867374e-01\n1.26788738829801906e-01\n1.35245586460969069e-01\n1.38701304735924180e-01\n1.35671799656058828e-01\n1.24850943501119860e-01\n1.05317773924921573e-01\n7.67632930004524400e-02\n3.97047224567498649e-02\n-4.35678737647015105e-03\n-5.28857962470731038e-02\n-1.02417394798139466e-01\n-1.48848070212532629e-01\n-1.87910627302282945e-01\n-2.15785123039459459e-01\n-2.29747405680410965e-01\n-2.28717175131998629e-01\n-2.13556636970166025e-01\n-1.87003794084438096e-01\n-1.53204702522888203e-01\n-1.16921561513388991e-01\n-8.26037294212801088e-02\n-5.35716303845303818e-02\n-3.15425912025031618e-02\n-1.66170841923697181e-02\n-7.68065934999644009e-03\n-3.03107189034338472e-03\n-9.81273714813690398e-04\n-2.44512176323196447e-04\n-4.17165957729870678e-05\n-3.65764616069259394e-06\n2.58598064549907941e-02\n4.47904986539416766e-02\n5.78042884832890153e-02\n6.83003151437702877e-02\n7.71771057175043990e-02\n8.47302852056641270e-02\n9.09878000459718173e-02\n9.58141555202047523e-02\n9.89548208400858886e-02\n1.00062921874170513e-01\n9.87230120719746196e-02\n9.44787708110581964e-02\n8.68684455755117935e-02\n7.54701117495145957e-02\n5.99572022382303532e-02\n4.01628071381326321e-02\n1.61488125120905490e-02\n-1.17268930235206285e-02\n-4.27548654412929011e-02\n-7.58424347327828763e-02\n-1.09519410671562553e-01\n-1.41993722490818042e-01\n-1.71265480621566796e-01\n-1.95300157829387200e-01\n-2.12250234425721468e-01\n-2.20701048100805375e-01\n-2.19903426985988970e-01\n-2.09946884301772135e-01\n-1.91827113269008614e-01\n-1.67373727651976639e-01\n-1.39029409172183926e-01\n-1.09506265781309189e-01\n-8.13808255338015069e-02\n-5.67138523738402733e-02\n-3.67836486943302343e-02\n-2.19959756824874390e-02\n-1.19846882452225162e-02\n-5.86027398852599895e-03\n-2.52059759334808493e-03\n-9.27650095149619978e-04\n-2.80584115653972302e-04\n-6.54248695723545412e-05\n-1.04593404932406202e-05\n-8.60292004850915905e-07\n0.0\n4.34302184760030209e-04\n1.68204512879709372e-03\n3.97977981662501427e-03\n7.51705260779086341e-03\n1.24510286573354632e-02\n1.89094033871269433e-02\n2.69874761628315987e-02\n3.67413037278668253e-02\n4.81778627532906609e-02\n6.12429788806682293e-02\n7.58079285590731733e-02\n9.16559397451926494e-02\n1.08470235726705708e-01\n1.25825716750479683e-01\n1.43186771310292671e-01\n1.59913938582456117e-01\n1.75282063905183472e-01\n1.88512045100663383e-01\n1.98817118913842572e-01\n2.05462804602075916e-01\n2.07837145571860227e-01\n2.05524990200223107e-01\n1.98377175243191817e-01\n1.86563291241551188e-01\n1.70596042463125430e-01\n1.51316866915618797e-01\n1.29836969219769199e-01\n1.07435149649431377e-01\n8.54228239728704736e-02\n6.49955160549857275e-02\n4.70962903096240962e-02\n3.23174996613091181e-02\n2.08612740456020351e-02\n1.25667557449894978e-02\n6.99605392661829459e-03\n3.55608172275896162e-03\n1.62509724875208581e-03\n6.54283247518670677e-04\n2.25707983361319713e-04\n6.40694230330159786e-05\n1.40350204022150062e-05\n2.10986028927238860e-06\n1.63311139012571769e-07\n3.68911013060723783e-02\n6.38972618092879252e-02\n8.24853842998529152e-02\n9.75713958689318206e-02\n1.10560100077334911e-01\n1.22062045621872645e-01\n1.32378658798765120e-01\n1.41654418505708868e-01\n1.49938905235899145e-01\n1.57216998956970028e-01\n1.63426187696323555e-01\n1.68468534372921835e-01\n1.72220806679388577e-01\n1.74544595390060953e-01\n1.75297413560438209e-01\n1.74345243893193974e-01\n1.71576569292199971e-01\n1.66917494717316456e-01\n1.60347122368785316e-01\n1.51911894515514706e-01\n1.41737221346132813e-01\n1.30034446970116208e-01\n1.17101176564465656e-01\n1.03313294173066866e-01\n8.91077191382258355e-02\n7.49560918226302442e-02\n6.13310591145133227e-02\n4.86684367734364839e-02\n3.73299293083168351e-02\n2.75718871091383856e-02\n1.95253974461478859e-02\n1.31916202960299621e-02\n8.45376236820239400e-03\n5.10387304163371566e-03\n2.87951550072235727e-03\n1.50323047980009629e-03\n7.17317236014466193e-04\n3.08057593442756506e-04\n1.16663484618956351e-04\n3.78875147611595250e-05\n1.01322395298078575e-05\n2.09248384387863641e-06\n2.96723020101115216e-07\n2.16761492194377547e-08\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n1.75385715931343188e-02\n3.03776970914928640e-02\n3.89894299482247964e-02\n4.50537831243302128e-02\n4.80480260970503614e-02\n4.65400382039492799e-02\n3.86255045510803599e-02\n2.25480495396490899e-02\n-2.27174361599671252e-03\n-3.38181129256359611e-02\n-6.60703944825465073e-02\n-8.85536648892354811e-02\n-8.83022665547520264e-02\n-5.55258773678883391e-02\n7.46609704613757606e-03\n7.83492811499439806e-02\n1.16648725092663261e-01\n8.43733130090411482e-02\n-1.70104229921458350e-02\n-1.20305094638899268e-01\n-1.22969970230733555e-01\n9.35905132160869992e-03\n1.50958694957938427e-01\n1.03915462896002508e-01\n-1.13821482581893951e-01\n-1.65617979165724905e-01\n1.02078086683356009e-01\n1.87205802845349906e-01\n-1.80482528572332379e-01\n-1.05887032567924186e-01\n3.16897122331143477e-01\n-3.11506306360772478e-01\n1.94908626118926759e-01\n-8.88419912097003217e-02\n3.11734890841552197e-02\n-8.65603665299482031e-03\n1.92915844115690120e-03\n-3.47110560421079798e-04\n5.03961499458167799e-05\n-5.86624629182310696e-06\n5.40333524333498994e-07\n-3.85266344302698084e-08\n2.05209553793049829e-09\n-7.68924989414811403e-11\n1.80863485793819275e-12\n0.0\n1.27957098505530561e-03\n4.95575711540941800e-03\n1.16729154582532208e-02\n2.17298714766428862e-02\n3.48463920087801263e-02\n4.97890096437865956e-02\n6.39661460133040122e-02\n7.32162053931973283e-02\n7.21602998827597653e-02\n5.55765345251779327e-02\n2.10888036966206741e-02\n-2.71967000961087710e-02\n-7.57556405665781446e-02\n-1.02576258694562439e-01\n-8.55111455040393209e-02\n-1.85689543275236145e-02\n7.13685108828726045e-02\n1.24881736372987939e-01\n8.51840841702029838e-02\n-3.93941327750227874e-02\n-1.42330243848803356e-01\n-9.42257757604894608e-02\n8.54747418851426466e-02\n1.66546977429292142e-01\n-1.57040975955216426e-02\n-1.97467238887139712e-01\n1.88019344819042819e-03\n2.29365773327595029e-01\n-1.02939542298359415e-01\n-1.91533197604292715e-01\n3.33816802434613757e-01\n-2.79815352320624711e-01\n1.58802675309585556e-01\n-6.73083989677173145e-02\n2.22633667178538421e-02\n-5.87886221383933632e-03\n1.25374425751272208e-03\n-2.16874130346125099e-04\n3.03833333739192907e-05\n-3.42291948358810337e-06\n3.05900500334992657e-07\n-2.12071334148180759e-08\n1.10031191627599894e-09\n-4.02248428160353050e-11\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n1.61209358962557635e-02\n2.79222800378758976e-02\n3.58705158480625008e-02\n4.16048844856492933e-02\n4.48145796327992577e-02\n4.44149286908469970e-02\n3.88846143669453748e-02\n2.66859736735079213e-02\n6.95995292709915368e-03\n-1.94741915052292110e-02\n-4.90011512080948675e-02\n-7.44963573151986441e-02\n-8.59117125296132850e-02\n-7.31800333992487367e-02\n-3.18406489571631673e-02\n3.00613580110648190e-02\n8.81760864774469300e-02\n1.07758027232155815e-01\n6.36345166706011878e-02\n-3.19775709189640406e-02\n-1.16651005253576731e-01\n-1.09883142932446068e-01\n7.71332431866365419e-03\n1.33714841099003445e-01\n1.10916738461859440e-01\n-6.95642157350538637e-02\n-1.68350522024694554e-01\n8.72211081793769841e-03\n1.95222452862689577e-01\n-6.44875876953811787e-03\n-2.23734792511103536e-01\n1.15274523916961635e-01\n1.70164055536562803e-01\n-3.24324435249283838e-01\n2.85949691658487493e-01\n-1.70491924010590684e-01\n7.62429970756964143e-02\n-2.67770107990213009e-02\n7.56631678646896202e-03\n-1.74273729462005931e-03\n3.29187814148754535e-04\n-5.10371019690731382e-05\n6.46978807841743947e-06\n-6.64720927878313834e-07\n5.45366401009141338e-08\n0.0\n1.08472742381388629e-03\n4.20113124760565677e-03\n9.90251969648427849e-03\n1.84771170763622476e-02\n2.97864244518314912e-02\n4.29935124003884561e-02\n5.62502048776087754e-02\n6.64805016337744609e-02\n6.94951639769336021e-02\n6.07489836031443603e-02\n3.70087187849702237e-02\n-1.10930973807619559e-03\n-4.64683006843350649e-02\n-8.43432667407495590e-02\n-9.54507151085635108e-02\n-6.49196479072799981e-02\n4.37546628453372097e-03\n8.19387104591041832e-02\n1.16402125826387079e-01\n6.80514713575708363e-02\n-4.51112437681952042e-02\n-1.31643108854483354e-01\n-9.06119505406492720e-02\n6.35740425963956524e-02\n1.55664101856450271e-01\n3.25463011982652997e-02\n-1.61062963962556538e-01\n-9.14113873640489405e-02\n1.71651781820813393e-01\n9.17992460712521441e-02\n-2.26861122079491939e-01\n2.74638834186305379e-02\n2.38715686972268332e-01\n-3.27133758028667898e-01\n2.52461693632194395e-01\n-1.37970366908697850e-01\n5.77226737959511127e-02\n-1.91900278708998125e-02\n5.17285234812660342e-03\n-1.14295039404465346e-03\n2.07983783328855466e-04\n-3.11689067087047577e-05\n3.82973710685586292e-06\n-3.82261697502360310e-07\n1.54947296271694072e-02\n2.68376589638001824e-02\n3.44901382688576133e-02\n4.00656048259996483e-02\n4.33332126004005377e-02\n4.33446014060863694e-02\n3.87358878842187782e-02\n2.80789938127258241e-02\n1.04587749305109969e-02\n-1.36835414578341027e-02\n-4.15672232613813752e-02\n-6.73389093397498278e-02\n-8.22904518352545328e-02\n-7.68946777817631488e-02\n-4.51824603070856076e-02\n9.28246664275114881e-03\n6.88175382286410481e-02\n1.03622603846955277e-01\n8.51625122488628983e-02\n9.40258162821187675e-03\n-8.42585586118684421e-02\n-1.23190784366466383e-01\n-5.60485709452665098e-02\n7.71490603410581871e-02\n1.41957693042180561e-01\n3.80250389611364939e-02\n-1.33107394444671401e-01\n-1.22897469272663096e-01\n9.85217668246993333e-02\n1.65001259554966528e-01\n-1.04334215020187110e-01\n-1.71211818011931416e-01\n1.91700098163417737e-01\n6.42229980281688317e-02\n-2.86770466486363618e-01\n3.14521538030080372e-01\n-2.16820132745944083e-01\n1.09526387819347037e-01\n-4.30717369973466629e-02\n1.35966968532627436e-02\n-3.50420558818583579e-03\n7.44011625454516997e-04\n-1.30606777413537397e-04\n1.89407228380711624e-05\n-2.25787117362396169e-06\n0.0\n1.00359133478992459e-03\n3.88689252603944971e-03\n9.16454586638120773e-03\n1.71166499033244476e-02\n2.76532809050336129e-02\n4.00812334139498891e-02\n5.28286451992339978e-02\n6.32366432637635895e-02\n6.76067562536539768e-02\n6.17616411059507542e-02\n4.23613439617542831e-02\n9.00614481928768175e-03\n-3.33556583979607649e-02\n-7.29895541744358112e-02\n-9.29116826119170125e-02\n-7.72595070967929676e-02\n-2.22245447520983408e-02\n5.33118936353912942e-02\n1.07453728119955363e-01\n9.53987923050652331e-02\n7.90425529838624866e-03\n-9.86239633240454938e-02\n-1.24796251290977142e-01\n-2.07804070260495140e-02\n1.22067940470523481e-01\n1.23206326187008081e-01\n-5.54670439706498528e-02\n-1.68875379811451787e-01\n3.75245106347494618e-03\n1.93023993846129116e-01\n-1.19717966648257897e-02\n-2.17726004402282375e-01\n1.26958605480400111e-01\n1.49005887423566075e-01\n-3.13853591571342960e-01\n2.90873821321169790e-01\n-1.81750236642887086e-01\n8.54436789783534767e-02\n-3.17120080971669063e-02\n9.53167269107151396e-03\n-2.35345015621310581e-03\n4.80917317577270718e-04\n-8.15438442289566823e-05\n1.14556023603077188e-05\n1.49153584625404383e-02\n2.58341586702224534e-02\n3.32116220048364608e-02\n3.86332886777005155e-02\n4.19352060991873624e-02\n4.22859974051510989e-02\n3.84603343609345241e-02\n2.91354456539386769e-02\n1.33735769428670794e-02\n-8.66375493180102964e-03\n-3.48542512871673829e-02\n-6.03977488290054002e-02\n-7.77935527416283579e-02\n-7.82387419376407989e-02\n-5.50015082048486148e-02\n-8.46471169455263739e-03\n4.91546484121012373e-02\n9.33789301185620063e-02\n9.58451624486461318e-02\n4.24753634511877698e-02\n-4.65584996069439427e-02\n-1.13675365447513915e-01\n-9.62111172994313951e-02\n1.20719355241770999e-02\n1.22543885947321338e-01\n1.08867617265793595e-01\n-4.32122795025768267e-02\n-1.55525846590364308e-01\n-4.44856381126680356e-02\n1.56679204875163292e-01\n9.27910168084453146e-02\n-1.70832186858383583e-01\n-8.35132884276644366e-02\n2.25539034469983746e-01\n-4.43192212153440818e-02\n-2.19269242194792435e-01\n3.21854692044917678e-01\n-2.60382927705543665e-01\n1.49103608466968518e-01\n-6.56033227682755460e-02\n2.30603343855136748e-02\n-6.61577618908321466e-03\n1.56781788030656483e-03\n-3.08791591137068920e-04\n5.06329993169020749e-05\n0.0\n9.31231486528467933e-04\n3.60664403878873307e-03\n8.50602401166255205e-03\n1.59003845976028874e-02\n2.57379331411985018e-02\n3.74429023233049107e-02\n4.96727203979389978e-02\n6.01209842780457415e-02\n6.55188922166232424e-02\n6.20485585005537410e-02\n4.63832478156425282e-02\n1.74258908789117206e-02\n-2.15613643493609182e-02\n-6.13677160052636325e-02\n-8.73740715195929635e-02\n-8.39387467869841114e-02\n-4.30735753946295610e-02\n2.54205416823265785e-02\n8.96319598044172522e-02\n1.06347500019670110e-01\n5.01739831530388369e-02\n-5.32299261927053277e-02\n-1.23700123334747655e-01\n-8.28396897856750331e-02\n5.28775537318160876e-02\n1.43085571099796832e-01\n5.61977133242733407e-02\n-1.23816025115570466e-01\n-1.28765239046147145e-01\n9.31608527422523869e-02\n1.63492650673764423e-01\n-1.06861882831406046e-01\n-1.62491258375111886e-01\n1.96459220983562499e-01\n4.41807869692944222e-02\n-2.70804866865802130e-01\n3.14111437679499894e-01\n-2.26653503457895700e-01\n1.19973760229751966e-01\n-4.96384679821059299e-02\n1.65764998565730848e-02\n-4.54921289788913930e-03\n1.03647976078942092e-03\n-1.97023114221869539e-04\n1.43777571754090082e-02\n2.49030059266963921e-02\n3.20241395751327471e-02\n3.72974851235763627e-02\n4.06152793785680630e-02\n4.12469987555116047e-02\n3.80894656633339948e-02\n2.99194089868893114e-02\n1.57993524331653951e-02\n-4.31517777372081648e-03\n-2.88220880572189753e-02\n-5.37917655675387227e-02\n-7.27911066656332234e-02\n-7.78161972766675814e-02\n-6.18701354458539229e-02\n-2.31473897896834480e-02\n3.04712419908840515e-02\n7.95784310926517247e-02\n9.79793608862650628e-02\n6.62013605687784418e-02\n-1.01366736461809930e-02\n-9.00695235624814627e-02\n-1.12669305069630812e-01\n-4.35757793830668233e-02\n7.51257682046310576e-02\n1.31616514039363836e-01\n4.53222238797121382e-02\n-1.08967469593911931e-01\n-1.32009263766811796e-01\n4.32492148160053339e-02\n1.68583486273734845e-01\n-4.95860556561381820e-04\n-1.90872215940232515e-01\n1.82535322399479810e-02\n2.11291139317185017e-01\n-1.37916298261175629e-01\n-1.28093671297882045e-01\n3.02456214723334893e-01\n-2.94592460251497545e-01\n1.92516911868430035e-01\n-9.48536600848763622e-02\n3.70547567444543535e-02\n-1.17879530770188846e-02\n3.10082499288505398e-03\n-6.80272149310588410e-04\n0.0\n8.66426198358273602e-04\n3.35565423695939787e-03\n7.91595580676932552e-03\n1.48087370721789457e-02\n2.40121976252645371e-02\n3.50470905770978516e-02\n4.67621618880646808e-02\n5.71499304962871102e-02\n6.33170683307291149e-02\n6.17867567017734015e-02\n4.93218302839731407e-02\n2.43605818176739659e-02\n-1.11229351603796319e-02\n-5.00111979512799509e-02\n-7.99363223981646581e-02\n-8.61829508709387460e-02\n-5.84006621299801021e-02\n3.58939641943441289e-04\n6.73683603454789115e-02\n1.04547916160611848e-01\n7.88234707819635838e-02\n-7.40196355240077455e-03\n-9.89024607975352854e-02\n-1.13935556835337043e-01\n-1.85003394929406997e-02\n1.09092279915243381e-01\n1.21812512222345251e-01\n-2.46754989477449317e-02\n-1.53724666275716126e-01\n-5.40369920161232961e-02\n1.52844150859367450e-01\n9.28820866720676541e-02\n-1.70534807021763130e-01\n-7.46582735676944026e-02\n2.23693373171869270e-01\n-6.04428691041305338e-02\n-1.99685544352623728e-01\n3.15424646297850053e-01\n-2.67266463830277745e-01\n1.60001526538169181e-01\n-7.37993954198966490e-02\n2.73166771591969032e-02\n-8.29850624186547273e-03\n2.09615343365926552e-03\n1.38775885221145527e-02\n2.40366884068370923e-02\n3.09183904608928452e-02\n3.60490726244702200e-02\n3.93683375492424881e-02\n4.02329809198555891e-02\n3.76477293156107368e-02\n3.04822829697282381e-02\n1.78148733182622518e-02\n-5.49493024694638768e-04\n-2.34202307150312740e-02\n-4.75865491002563923e-02\n-6.75477062110268756e-02\n-7.61071838154605829e-02\n-6.63259594109283784e-02\n-3.49513174229954052e-02\n1.34896673476623541e-02\n6.41091678554258637e-02\n9.38545078017201384e-02\n8.10995467969786443e-02\n2.12924379201699099e-02\n-5.98342813748789781e-02\n-1.10030711919258867e-01\n-8.17949739174682888e-02\n1.99064509916523323e-02\n1.15540116552411060e-01\n1.02747720163755593e-01\n-2.93739864429707828e-02\n-1.40727061374367690e-01\n-7.11092981594615287e-02\n1.14989971036636107e-01\n1.32918702440678965e-01\n-8.91486580691566027e-02\n-1.61387843158750960e-01\n1.10055751275721689e-01\n1.53323281620514312e-01\n-2.00539873184637785e-01\n-2.47181933274368028e-02\n2.54306805060830254e-01\n-3.12462764311680574e-01\n2.35681584394384414e-01\n-1.30404411370159512e-01\n5.65780306243527376e-02\n-1.99042356948075719e-02\n5.78689360019675990e-03\n0.0\n8.08169381749094000e-04\n3.13002655642898508e-03\n7.38527334555643018e-03\n1.38254961397782303e-02\n2.24525035510943945e-02\n3.28667979534761900e-02\n4.40775755501471855e-02\n5.43317793714474043e-02\n6.10639697740991763e-02\n6.11149211427297959e-02\n5.13836132665863657e-02\n3.00127933522319895e-02\n-1.99912779200678813e-03\n-3.92494672899238520e-02\n-7.14196506943881176e-02\n-8.50896413845443622e-02\n-6.88173292847503448e-02\n-2.08643120484563807e-02\n4.38633784181905531e-02\n9.38940687176477023e-02\n9.42782279747823582e-02\n3.17957449028247116e-02\n-6.21827219357851332e-02\n-1.16968354920668635e-01\n-7.27009433718112802e-02\n4.94387114417985732e-02\n1.32195969209768449e-01\n6.57999214836448021e-02\n-9.54899313148284967e-02\n-1.38117478607393429e-01\n3.28530488300230600e-02\n1.67794725419491808e-01\n1.30109477305094729e-03\n-1.88745776932811943e-01\n2.51316824753399781e-02\n2.04399046182490080e-01\n-1.48086148643159110e-01\n-1.07472458120013367e-01\n2.90193778484990950e-01\n-2.97118147501252650e-01\n2.02738336188594243e-01\n-1.04417629709582155e-01\n4.27890291629352340e-02\n-1.43461279171779709e-02\n1.34121335070743128e-02\n2.32304966721496621e-02\n2.98886073146003156e-02\n3.48827062368494839e-02\n3.81924460509777478e-02\n3.92504854351932164e-02\n3.71570104023672479e-02\n3.08678659250558804e-02\n1.94870859003387284e-02\n2.71098948184215864e-03\n-1.85956019686760801e-02\n-4.18151151255348533e-02\n-6.22541206755372056e-02\n-7.34928173648745214e-02\n-6.88512901981496450e-02\n-4.41732201443665873e-02\n-1.44891169148656223e-03\n4.82957030845139190e-02\n8.54802638832727613e-02\n8.84442704982624645e-02\n4.60987820728743225e-02\n-2.84215219697207117e-02\n-9.42958811277733178e-02\n-1.01390548364512625e-01\n-2.96073760434594005e-02\n7.66185195883031384e-02\n1.22444186626976759e-01\n4.51952277953433790e-02\n-9.32926270475097907e-02\n-1.30445379039918763e-01\n8.19868159846347082e-03\n1.50944248430230465e-01\n6.15685132440983926e-02\n-1.49623678577444102e-01\n-9.19106838696079065e-02\n1.70642296198457527e-01\n6.53409484162206927e-02\n-2.21286494389539123e-01\n7.57862726485293847e-02\n1.80045029864390305e-01\n-3.07933875948856239e-01\n2.73129575968270755e-01\n-1.70620682243367600e-01\n8.22750833824558159e-02\n-3.19568431248528628e-02\n0.0\n7.55895081924557442e-04\n2.92756906377390162e-03\n6.90890215108946101e-03\n1.29417527860730200e-02\n2.10465146937558537e-02\n3.08897876716776390e-02\n4.16156766497064526e-02\n5.16879059265007226e-02\n5.88266091052933038e-02\n6.01636129099524172e-02\n5.27593098699843804e-02\n3.45822594341687328e-02\n5.89884522969729916e-03\n-2.92786380481611062e-02\n-6.24416439477193663e-02\n-8.16137546895895072e-02\n-7.51129028611585842e-02\n-3.79667288828912722e-02\n2.12383211325061355e-02\n7.78481599254066542e-02\n9.86370447384257720e-02\n6.11970989966175369e-02\n-2.27656034293180209e-02\n-9.97912106877550664e-02\n-1.02937409512215694e-01\n-1.20959406255919735e-02\n1.01620608832726639e-01\n1.16512934197241153e-01\n-7.59653503568458264e-03\n-1.36123146513489085e-01\n-8.32443036616677678e-02\n1.06929221980074082e-01\n1.35816416498636072e-01\n-8.63568833215650616e-02\n-1.58873476087633719e-01\n1.13778826439856040e-01\n1.43844935712435257e-01\n-2.03974630633939613e-01\n-5.94650804927314338e-03\n2.37541580465097046e-01\n-3.09837798433732270e-01\n2.44035367101313988e-01\n-1.40848790717943928e-01\n6.38994299755598627e-02\n1.29972347533851493e-02\n2.25118709507630271e-02\n2.89703455316127553e-02\n3.38410719530524429e-02\n3.71377086480186649e-02\n3.83583724347684799e-02\n3.66867325176469389e-02\n3.11566668716987058e-02\n2.09031179622923211e-02\n5.54469770824055248e-03\n-1.43110856696390936e-02\n-3.65335704223332738e-02\n-5.71191687182936655e-02\n-7.03653682389741436e-02\n-6.99603779665911724e-02\n-5.12292593858751713e-02\n-1.42833947743059679e-02\n3.30465229115791057e-02\n7.45814617681287567e-02\n8.98871377383103631e-02\n6.41070377106731787e-02\n6.87897861692779661e-04\n-7.11534064453348963e-02\n-1.05032860718125842e-01\n-6.66621686537229585e-02\n2.96649323890401211e-02\n1.11188955811168416e-01\n9.47797619838597200e-02\n-2.38090547840722720e-02\n-1.28451245798029162e-01\n-8.26766423829332076e-02\n8.24089671032506021e-02\n1.42484689113852148e-01\n-2.40827246022559081e-02\n-1.67054601933802227e-01\n-2.01778515057978022e-03\n1.87007211501146325e-01\n-3.23225086212570109e-02\n-1.97595371643932344e-01\n1.57591476132740022e-01\n8.77942622345071894e-02\n-2.78184371125442753e-01\n2.99454275723843366e-01\n-2.13022270378000894e-01\n1.14419702556102745e-01\n0.0\n7.11884420893750601e-04\n2.75711650654600739e-03\n6.50777723609260485e-03\n1.21972409081737756e-02\n1.98607215518255484e-02\n2.92187780206352166e-02\n3.95264946709846590e-02\n4.94274782533255380e-02\n5.68824601199509269e-02\n5.92769825752152077e-02\n5.38328018210833606e-02\n3.84212641488756723e-02\n1.27623901214581944e-02\n-2.02412980129670420e-02\n-5.36235476223839158e-02\n-7.68245231125665867e-02\n-7.84213591832029072e-02\n-5.13586147735788506e-02\n6.80609676941827343e-04\n5.93201457792563586e-02\n9.49220463634138784e-02\n8.06327944926050894e-02\n1.34882665657968855e-02\n-7.11420922266623734e-02\n-1.10941522205174559e-01\n-6.14778436739632575e-02\n5.07070580022204107e-02\n1.24162381213724637e-01\n6.81191739607757835e-02\n-7.67650492264743550e-02\n-1.36585171657376631e-01\n-6.64740434410382008e-03\n1.48441664983944066e-01\n6.83166261362845306e-02\n-1.47666970230003941e-01\n-9.12898369860231790e-02\n1.71888018678630766e-01\n5.70462533623948692e-02\n-2.20090062074522169e-01\n8.97793733948815675e-02\n1.63606705775658612e-01\n-3.03578853330928489e-01\n2.81352133335659393e-01\n-1.82965234010786321e-01\n1.27529473464863350e-02\n2.20887527503650268e-02\n2.84315275970835890e-02\n3.32386769721293718e-02\n3.65536400202234255e-02\n3.79272883699427743e-02\n3.66096593096754200e-02\n3.16967219455327326e-02\n2.23488706407094714e-02\n8.12519869943291971e-03\n-1.05682916435384695e-02\n-3.19876325862583008e-02\n-5.26883411248176559e-02\n-6.75738112521202527e-02\n-7.06997844145507842e-02\n-5.70916026025367687e-02\n-2.54713678116953272e-02\n1.88928179191634946e-02\n6.28565501626705825e-02\n8.77321128580301757e-02\n7.67170157003028014e-02\n2.61409497381567060e-02\n-4.51540947364727288e-02\n-9.75321472536188755e-02\n-9.04363204020354472e-02\n-1.54780638588584898e-02\n8.06929079841834374e-02\n1.15831679352937186e-01\n4.19533557685351499e-02\n-8.48646796469560705e-02\n-1.27223412580716511e-01\n-1.33109678158298446e-02\n1.31613529810532426e-01\n9.56480309260228229e-02\n-1.00036640455233514e-01\n-1.41090343578478994e-01\n8.40938010852721463e-02\n1.60230691122405983e-01\n-1.17650997047546724e-01\n-1.39827498006311668e-01\n2.09843371536189899e-01\n-6.57491418734950771e-03\n-2.32659850745263019e-01\n3.18974794078531965e-01\n-2.60948168748508236e-01\n0.0\n6.85210808362256589e-04\n2.65381004942834156e-03\n6.26495399147959913e-03\n1.17482928228288350e-02\n1.91520883862530376e-02\n2.82384509643286777e-02\n3.83456900570341430e-02\n4.82509997371946969e-02\n5.60928340005749856e-02\n5.94429521828220564e-02\n5.56385036292800297e-02\n4.24689244904486729e-02\n1.92261136379280745e-02\n-1.20607052810090334e-02\n-4.56665057518211709e-02\n-7.22407931533682324e-02\n-8.07520150991264257e-02\n-6.27352352588060186e-02\n-1.80840745839295075e-02\n4.02195818151542539e-02\n8.66511074653123076e-02\n9.27317526157171446e-02\n4.50067109727180920e-02\n-3.75316334671606036e-02\n-1.02856718805641290e-01\n-9.51372031724855433e-02\n-5.02782895465515509e-03\n9.98320139356962816e-02\n1.14261365604269999e-01\n3.01762871982782718e-03\n-1.24127197270391662e-01\n-1.01664176560309003e-01\n6.88812584995832367e-02\n1.51347765574254833e-01\n-1.22760660228493114e-02\n-1.72155943479621404e-01\n-8.76519836740743442e-03\n1.93067962588674036e-01\n-3.18213117743906329e-02\n-2.04880381752135216e-01\n1.64981071832865672e-01\n9.28376468961911450e-02\n-3.01242518046752505e-01\n3.32740661070995258e-01\n1.28809558395648737e-02\n2.23104699641773867e-02\n2.87224074056770355e-02\n3.36048305735011654e-02\n3.70306675074634634e-02\n3.85883690310478214e-02\n3.75706453190368592e-02\n3.31093840257900285e-02\n2.43711700090790823e-02\n1.08568926511109030e-02\n-7.19089837045100520e-03\n-2.83274083401971709e-02\n-4.95319518729204628e-02\n-6.61609135552581329e-02\n-7.25353397782994153e-02\n-6.34262159206872567e-02\n-3.64386152367097774e-02\n5.24925168759169444e-03\n5.10826610719462629e-02\n8.41403909788045606e-02\n8.65851342689748088e-02\n4.93436444075750005e-02\n-1.77428893490268712e-02\n-8.28193180579669397e-02\n-1.03857857310073798e-01\n-5.61075371102594117e-02\n3.92294728499509651e-02\n1.12939206078089022e-01\n9.33052713139508605e-02\n-1.99244323491183685e-02\n-1.24280767904663803e-01\n-9.58089067350622881e-02\n5.65796249122901412e-02\n1.48323654710042802e-01\n3.00989072385718544e-02\n-1.49876995974118160e-01\n-8.91277144673206512e-02\n1.47170995217280026e-01\n1.10752077897764978e-01\n-1.76141624390352081e-01\n-7.71823469619245944e-02\n2.38379230717563978e-01\n-7.44755760415421603e-02\n-2.20199720865607962e-01\n3.82027383615142657e-01\n0.0\n6.77907372695901538e-04\n2.62552396472245150e-03\n6.19917067643648532e-03\n1.16309514393703566e-02\n1.89826514221597825e-02\n2.80493536870666041e-02\n3.82308704356834964e-02\n4.83997890619549329e-02\n5.68176305677015325e-02\n6.11781320938432835e-02\n5.88771307682952189e-02\n4.76009095723006204e-02\n2.62598310046931599e-02\n-3.85631198742495546e-03\n-3.80639420750399152e-02\n-6.80451938447319687e-02\n-8.31599176408329976e-02\n-7.38573463407586894e-02\n-3.68691669846362424e-02\n1.96573088092138089e-02\n7.45575326928244742e-02\n9.94492601702408469e-02\n7.32094305015781738e-02\n5.44516605217342905e-05\n-8.14923760841389649e-02\n-1.13428901125710177e-01\n-5.94391594420213970e-02\n5.16616368281379579e-02\n1.26426915165316262e-01\n8.02727269931793330e-02\n-5.99435443725667566e-02\n-1.43297894311408630e-01\n-4.87413795643025782e-02\n1.25270619440966596e-01\n1.27069720750577236e-01\n-8.15740197276608181e-02\n-1.68688702996532436e-01\n6.08614343486993670e-02\n1.92446296482112644e-01\n-9.55031241695715877e-02\n-1.92591785016934164e-01\n2.10559734918713382e-01\n9.05059174264175870e-02\n-3.99233964589660151e-01\n1.32987108259736489e-02\n2.30340428257526306e-02\n2.96596782166693058e-02\n3.47286962577227770e-02\n3.83467964145819198e-02\n4.01333209714582612e-02\n3.94114540146515008e-02\n3.53345986010851140e-02\n2.70635533022587360e-02\n1.40379847159067886e-02\n-3.64952692347080433e-03\n-2.48177804617853472e-02\n-4.68139264701541505e-02\n-6.53865800302536049e-02\n-7.50895789866051072e-02\n-7.04786299014358436e-02\n-4.81793020730450008e-02\n-9.47849770848855841e-03\n3.75481868656204129e-02\n7.79745748409875206e-02\n9.37025491247316100e-02\n7.14216678172243657e-02\n1.26839652146758745e-02\n-5.96241555223494465e-02\n-1.06059648746066423e-01\n-9.08967320984364197e-02\n-1.12698907802924325e-02\n8.56502569043775669e-02\n1.22663708997195503e-01\n5.37599556897032232e-02\n-7.49901332667101683e-02\n-1.38375970233657525e-01\n-4.99528474044338283e-02\n1.10242083428333359e-01\n1.40051983475979358e-01\n-3.03797319454515539e-02\n-1.72911401372819767e-01\n-3.90895591608687309e-02\n1.83275611479281952e-01\n7.25477765435961486e-02\n-2.09619649670629460e-01\n-5.34231147105603266e-02\n2.68561023510372587e-01\n-5.76619646611919515e-02\n-3.84451073294623580e-01\n0.0\n6.76387844987868495e-04\n2.61963885921513836e-03\n6.18629389201474054e-03\n1.16129659057742814e-02\n1.89757158245318705e-02\n2.81014112275427691e-02\n3.84475405313901633e-02\n4.89753420542037715e-02\n5.80606562222851508e-02\n6.35114534077875492e-02\n6.27810900174065600e-02\n5.34650720129544177e-02\n3.41220543682150407e-02\n5.34169712001952759e-03\n-2.92163422072225162e-02\n-6.23312381377674682e-02\n-8.39730875747195793e-02\n-8.39046701170381021e-02\n-5.61517621552907742e-02\n-4.16833442082918844e-03\n5.59894933108712120e-02\n9.80818288456191123e-02\n9.61588072768481961e-02\n4.11958338344705008e-02\n-4.48004797754371908e-02\n-1.10803403181831295e-01\n-1.04234146821172213e-01\n-1.51177290782888822e-02\n9.65467177480519995e-02\n1.30696119460779747e-01\n3.70447647069131400e-02\n-1.07151108626598185e-01\n-1.40856096683577264e-01\n1.14401622235156628e-03\n1.57746770455433644e-01\n9.85809971465656798e-02\n-1.25558772925580792e-01\n-1.61976268703041076e-01\n9.74298587262898974e-02\n2.01393504621807995e-01\n-1.10185176345744512e-01\n-2.33475147969156693e-01\n1.92107214056066289e-01\n3.44975712241151755e-01\n1.37961788060930665e-02\n2.38956826424581228e-02\n3.07753276783897557e-02\n3.60642612407786889e-02\n3.99047871636727461e-02\n4.19497226384214009e-02\n4.15552518522530820e-02\n3.78992975969708185e-02\n3.01406810407373743e-02\n1.76623759909468186e-02\n4.10988717215214183e-04\n-2.06962774145116046e-02\n-4.33875672423327599e-02\n-6.38435905405865950e-02\n-7.69345667521031257e-02\n-7.71376641852066641e-02\n-6.02679485277497276e-02\n-2.58390981119170533e-02\n2.06523881378292071e-02\n6.68118564847849095e-02\n9.53785377835698472e-02\n9.02217968950847216e-02\n4.54479078364868894e-02\n-2.62313528008257316e-02\n-9.23676811945143839e-02\n-1.12853944629255465e-01\n-6.46800812108790507e-02\n3.31093604716370740e-02\n1.16752599416755337e-01\n1.14628560905477725e-01\n1.13194959310570099e-02\n-1.13915810341952750e-01\n-1.35148814410904455e-01\n-8.00093421953970013e-03\n1.42966380858952941e-01\n1.25762234297807363e-01\n-6.91081268169010665e-02\n-1.84193455110268522e-01\n-1.70046338014261354e-02\n2.03218777190691868e-01\n8.06499761810853116e-02\n-2.24501803571202252e-01\n-1.23491995448755096e-01\n2.89367819896241274e-01\n2.90912939677900995e-01\n0.0\n6.72852163666799990e-04\n2.60594522434114345e-03\n6.15500406961368585e-03\n1.15605779898513856e-02\n1.89131681605243553e-02\n2.80728690652470095e-02\n3.85584385742314961e-02\n4.94268572149371074e-02\n5.91808635810210718e-02\n6.57633617264558046e-02\n6.67166913365497549e-02\n5.95883369927898837e-02\n4.26330820393577489e-02\n1.57729524039648024e-02\n-1.83818430936753263e-02\n-5.38572006890187943e-02\n-8.15767551112321215e-02\n-9.11680749501536519e-02\n-7.45692253898919827e-02\n-3.08290768542828671e-02\n2.97825926546962626e-02\n8.53758840147688797e-02\n1.08693799371455235e-01\n8.04632363756769692e-02\n5.11732974153407665e-03\n-8.15652286139177535e-02\n-1.24555927865812488e-01\n-8.39479327951531962e-02\n2.55751514469826774e-02\n1.25497040601549426e-01\n1.22948221291612397e-01\n3.19342025822109011e-04\n-1.36085198778912980e-01\n-1.33641659726787737e-01\n3.18561014525821570e-02\n1.75338395278824444e-01\n9.06306052756457869e-02\n-1.41476293168599832e-01\n-1.79826583973236753e-01\n8.32757581875170766e-02\n2.44976368991624782e-01\n-2.26172817568671622e-02\n-3.39101160929969836e-01\n-2.31851357336299663e-01\n1.43257467556787369e-02\n2.48129212372005803e-02\n3.19632493387099689e-02\n3.74876801716489128e-02\n4.15690256914983611e-02\n4.38982239718395048e-02\n4.38704097707475274e-02\n4.06954309964343494e-02\n3.35387719032969808e-02\n2.17356271164292174e-02\n5.09325491593803307e-03\n-1.57364201628390349e-02\n-3.88822368599353596e-02\n-6.10115728517574285e-02\n-7.74203932172043280e-02\n-8.26843733915242768e-02\n-7.20357084870804631e-02\n-4.34114855332727312e-02\n2.81577977204020913e-04\n4.96550814207566762e-02\n8.94417290585069608e-02\n1.02438678962038315e-01\n7.69017724414360754e-02\n1.52696136445543834e-02\n-6.05633932857940413e-02\n-1.13445775343718025e-01\n-1.07941408199955027e-01\n-3.53348825039511288e-02\n6.87105465957153494e-02\n1.33938569922979839e-01\n1.00798126142718006e-01\n-2.15325497711232154e-02\n-1.37331518217451792e-01\n-1.30271250244660769e-01\n1.57953940300730802e-02\n1.60675673978669331e-01\n1.26883796128736848e-01\n-7.65847813075663936e-02\n-2.00873581722512656e-01\n-4.66071226339794115e-02\n2.05911464583684922e-01\n1.70157500478975376e-01\n-1.62569816542679269e-01\n-3.43235810696212951e-01\n-1.75218639851791369e-01\n0.0\n6.66629108792758944e-04\n2.58184343645144780e-03\n6.09914795397367617e-03\n1.14621505273388956e-02\n1.87756810211064697e-02\n2.79342441816636256e-02\n3.85212452293085608e-02\n4.96964461804806495e-02\n6.01024901302395637e-02\n6.78394975787900700e-02\n7.05742345332630860e-02\n6.58572836515444182e-02\n5.17028137694713064e-02\n2.74227851761922707e-02\n-5.41262732848943762e-03\n-4.21878655152020804e-02\n-7.51044659526684671e-02\n-9.42507441277117691e-02\n-9.02701670344027707e-02\n-5.84594894660450740e-02\n-3.15263685711490022e-03\n5.98662116981473341e-02\n1.05730830912266455e-01\n1.09453753370175558e-01\n6.00170489819989300e-02\n-2.68416181779486847e-02\n-1.07433792571995979e-01\n-1.28832864631853616e-01\n-6.44471864665916438e-02\n5.43922403246144548e-02\n1.42541650608728698e-01\n1.17818694517566713e-01\n-1.83057353131450100e-02\n-1.51540589180064078e-01\n-1.39648031322219895e-01\n3.15755921026617814e-02\n1.86454639346133044e-01\n1.24244275401756976e-01\n-1.14667362605137449e-01\n-2.31926843770258795e-01\n-3.41827973948162570e-02\n2.64521779295979031e-01\n3.12173384178748237e-01\n1.25789057828415263e-01\n1.49055008270936318e-02\n2.58170847447860910e-02\n3.32638605477592886e-02\n3.90466594730143751e-02\n4.33932842107147762e-02\n4.60376081932642039e-02\n4.64197558456335910e-02\n4.37892013188567741e-02\n3.73276547653059385e-02\n2.63336071505410156e-02\n1.04857625096711968e-02\n-9.82365029178390060e-03\n-3.31342563360306416e-02\n-5.66440194011904527e-02\n-7.61774984248288212e-02\n-8.65943763920359183e-02\n-8.28128109971872778e-02\n-6.14858525311589021e-02\n-2.30841750837637479e-02\n2.62745788166706892e-02\n7.43192934845154085e-02\n1.04644310174027172e-01\n1.01944720629141644e-01\n5.97306670187666283e-02\n-1.23912248494707396e-02\n-8.67256075331399867e-02\n-1.25546430458346736e-01\n-9.99783502713637862e-02\n-1.25114403742002511e-02\n9.22097273516399168e-02\n1.44251889053191223e-01\n9.44100988688597875e-02\n-3.63393272145375382e-02\n-1.50191896165335043e-01\n-1.38925127236471657e-01\n9.68213678134569045e-03\n1.66121099982161319e-01\n1.59206622214665416e-01\n-3.38159419872845618e-02\n-2.14785811816409961e-01\n-1.56332795899152499e-01\n1.13630339847272374e-01\n3.13953650948496366e-01\n2.60029437043062639e-01\n8.58439133597603821e-02\n0.0\n6.57786772193208404e-04\n2.54759721405982799e-03\n6.01933363393127030e-03\n1.13187360415946403e-02\n1.85646516989041582e-02\n2.76867135675096833e-02\n3.83355034708991113e-02\n4.97793257723625135e-02\n6.08121933550604538e-02\n6.97125388937800822e-02\n7.43075673607373755e-02\n7.22069816376360168e-02\n6.12608253437317771e-02\n4.02551551673761138e-02\n9.77356660463473553e-03\n-2.69791700070722042e-02\n-6.37490346770884231e-02\n-9.16704248926122345e-02\n-1.01003949230251133e-01\n-8.42987549914091111e-02\n-4.04443656966403872e-02\n2.18409415962294434e-02\n8.33374034035089528e-02\n1.18715951606833250e-01\n1.06681647982987765e-01\n4.31833598092770735e-02\n-4.91174945098279692e-02\n-1.23999465603211942e-01\n-1.32687459128552732e-01\n-5.68790180824478644e-02\n6.63204196243254718e-02\n1.53521152432094882e-01\n1.28426191582885735e-01\n-8.13662749401237832e-03\n-1.53193092865721942e-01\n-1.69989766634658035e-01\n-1.85339221220293844e-02\n1.73299102280851436e-01\n2.06338449773624533e-01\n1.71475909724530563e-02\n-2.30223699663480913e-01\n-3.13148447886134551e-01\n-2.00435454121830697e-01\n-5.56893467488799240e-02\n1.55578009578421547e-02\n2.69469017130263590e-02\n3.47271622388888590e-02\n4.08003733199394578e-02\n4.54447007505422995e-02\n4.84422294530037698e-02\n4.92845282534109252e-02\n4.72690504829431576e-02\n4.16045665072552889e-02\n3.15663936816652432e-02\n1.67198584011294081e-02\n-2.78982515021244416e-03\n-2.59129511324933080e-02\n-5.04096185318022652e-02\n-7.27253711677672138e-02\n-8.81907078629945440e-02\n-9.17101066485327687e-02\n-7.90342074121091337e-02\n-4.85260899733580831e-02\n-3.03213388506018335e-03\n4.88913619559491197e-02\n9.34039645275738378e-02\n1.14369608167330064e-01\n9.90892456092506285e-02\n4.55025712773365829e-02\n-3.22463142051465507e-02\n-1.04185687427970339e-01\n-1.34230477113362889e-01\n-9.84602419119002537e-02\n-4.38508509684664739e-03\n1.02174918541445822e-01\n1.54686898964518260e-01\n1.07081837823044271e-01\n-2.37458443614957625e-02\n-1.50836806877552854e-01\n-1.69132324457230671e-01\n-4.38561027626433175e-02\n1.37104365989024646e-01\n2.15354495861514311e-01\n1.00541797482295053e-01\n-1.29990875448551396e-01\n-2.92180770924976907e-01\n-2.75625614944176311e-01\n-1.43816738638842589e-01\n-3.43219303790452679e-02\n0.0\n6.46007447494531431e-04\n2.50197608567228258e-03\n5.91263866525298248e-03\n1.11247474252236175e-02\n1.82705840058926226e-02\n2.73151959812414531e-02\n3.79782040709140886e-02\n4.96413001836468540e-02\n6.12603319676910466e-02\n7.13126005225489801e-02\n7.78229356369765646e-02\n7.85214775299128420e-02\n7.11840916294581988e-02\n5.41825049226875785e-02\n2.72149334377493682e-02\n-7.90597234991420768e-03\n-4.66530991008747009e-02\n-8.17332343164224179e-02\n-1.03985426592917957e-01\n-1.04505259273302828e-01\n-7.78934464003607357e-02\n-2.58871329929697136e-02\n4.01180703759660071e-02\n9.96285148375166130e-02\n1.28319303861889306e-01\n1.07958160387883126e-01\n3.79896517521881444e-02\n-5.73252833833680850e-02\n-1.33303702574448207e-01\n-1.44165991976776153e-01\n-7.16524566663812867e-02\n5.33872475439729627e-02\n1.56603692212277185e-01\n1.61429281664389912e-01\n4.75790393719965621e-02\n-1.16877635111482969e-01\n-2.09219324155498265e-01\n-1.43509851141592426e-01\n4.99874992845509500e-02\n2.38546026749039686e-01\n2.98023414560275257e-01\n2.18958384328772654e-01\n9.63677718325903626e-02\n2.00736955165146773e-02\n1.63101091801766754e-02\n2.82499377770615706e-02\n3.64145977878190044e-02\n4.28216947939837819e-02\n4.78063994538970236e-02\n5.12051127695738462e-02\n5.25681442895166717e-02\n5.12504320494500953e-02\n4.65004815993985479e-02\n3.75870500251039089e-02\n2.39823613241611881e-02\n5.60533605464159663e-03\n-1.68931223396801382e-02\n-4.18515574079522251e-02\n-6.64131146891384777e-02\n-8.65583464115649848e-02\n-9.74976858313666706e-02\n-9.45388745106460066e-02\n-7.44440469431821850e-02\n-3.70984872821290973e-02\n1.29565906630982643e-02\n6.58465968886764036e-02\n1.07384625083139187e-01\n1.22406319066854480e-01\n1.00281467952398590e-01\n4.12026252111841462e-02\n-3.95393245877650665e-02\n-1.12771357786640089e-01\n-1.44549359575246339e-01\n-1.12078350758971601e-01\n-2.01725012015819445e-02\n9.21456558452755509e-02\n1.64238518077873014e-01\n1.45812460797615590e-01\n3.34777238823943044e-02\n-1.13959545977364948e-01\n-2.01748800335859485e-01\n-1.60251350636361201e-01\n-5.11785166772671255e-04\n1.84735374325198348e-01\n2.86532512821535357e-01\n2.61972882179585198e-01\n1.58850431494177158e-01\n6.03909038910718649e-02\n1.11234529853169312e-02\n0.0\n6.30665917895400076e-04\n2.44255859702949881e-03\n5.77332288070647043e-03\n1.08692765457843905e-02\n1.78751719788624724e-02\n2.67912394471027139e-02\n3.74072667086119207e-02\n4.92222041095536078e-02\n6.13631190802013116e-02\n7.25260438053906692e-02\n8.09715057536649907e-02\n8.46163039079522727e-02\n8.12653849794981870e-02\n6.90163951237865031e-02\n4.68365936380649300e-02\n1.52513061762953837e-02\n-2.30037561694220564e-02\n-6.26115907812607592e-02\n-9.59017023296628301e-02\n-1.13982254307936570e-01\n-1.08918838316520522e-01\n-7.67401025628749456e-02\n-2.05152852710085154e-02\n4.78052573600583966e-02\n1.08359890118247870e-01\n1.38304823116175368e-01\n1.20446332077852616e-01\n5.30702097178428131e-02\n-4.37693149016991634e-02\n-1.30879156769268368e-01\n-1.64266753770176327e-01\n-1.17805733433926169e-01\n-3.40523034743526586e-03\n1.25707171799844364e-01\n1.97280785909119571e-01\n1.61019144492137001e-01\n2.41585005944869972e-02\n-1.46322315347645310e-01\n-2.63485732278927243e-01\n-2.77296986305770432e-01\n-2.04385877364584023e-01\n-1.05906253830748642e-01\n-3.53973035490905696e-02\n-5.82740367593206302e-03\n1.72036870155129785e-02\n2.97976599883814607e-02\n3.84184900204218444e-02\n4.52201422012786791e-02\n5.06033631649471516e-02\n5.44662403128564759e-02\n5.64263720135586289e-02\n5.59072991076948952e-02\n5.22123460359125227e-02\n4.46241644769045653e-02\n3.25483532703346387e-02\n1.57080556060943920e-02\n-5.61802884335862052e-03\n-3.03427690326276457e-02\n-5.63589251042681191e-02\n-8.04546967729848350e-02\n-9.84654641654267027e-02\n-1.05771006133535170e-01\n-9.82052079375883430e-02\n-7.33420255574383784e-02\n-3.19519651402675325e-02\n2.07885799832984615e-02\n7.49387934919257953e-02\n1.16933274894611208e-01\n1.32629932993420047e-01\n1.12057983534595118e-01\n5.47078274473128678e-02\n-2.67825939206770280e-02\n-1.07147127977394660e-01\n-1.55067675627526907e-01\n-1.45316235232509167e-01\n-7.24915221458584669e-02\n4.06047677759152625e-02\n1.46951415984265588e-01\n1.93917839631244426e-01\n1.50071693786984844e-01\n2.57404264319191188e-02\n-1.27627403600296285e-01\n-2.43347661574506380e-01\n-2.76946408076309158e-01\n-2.30121855548181903e-01\n-1.43580808927818271e-01\n-6.50776088633386179e-02\n-1.93849452491492644e-02\n-2.87827536401532354e-03\n0.0\n6.10766447503836830e-04\n2.36548827960462657e-03\n5.59224842070326234e-03\n1.05349831763037905e-02\n1.73494029469256836e-02\n2.60699834139431104e-02\n3.65568380005256502e-02\n4.84287458878751367e-02\n6.09918209680086407e-02\n7.31792856035486522e-02\n8.35253133678140747e-02\n9.02032130372018154e-02\n9.11624452450134487e-02\n8.43957917192870860e-02\n6.83520983431188250e-02\n4.24763274200990748e-02\n7.80497985009753672e-03\n-3.25242039849377440e-02\n-7.30583829417101177e-02\n-1.06360979115602119e-01\n-1.24105323629582084e-01\n-1.19000387925361578e-01\n-8.73338793314439726e-02\n-3.15270659050588126e-02\n3.82866618847584536e-02\n1.04815668067135076e-01\n1.47157762823269977e-01\n1.47275482786483086e-01\n9.78613748214925971e-02\n8.54323805809606429e-03\n-9.32768152429553216e-02\n-1.69504392785532254e-01\n-1.85619317148127516e-01\n-1.26952195900492198e-01\n-8.67211176737319595e-03\n1.27742266129886095e-01\n2.32377317546032802e-01\n2.70853044524667907e-01\n2.40483497973459748e-01\n1.68151816374788765e-01\n9.14669142067599250e-02\n3.68770277044614889e-02\n9.89699495944354642e-03\n1.33563109183045415e-03\n1.83079240465047859e-02\n3.17102546296582841e-02\n4.08940862365935257e-02\n4.81798206369992849e-02\n5.40455274648084447e-02\n5.84603562506624125e-02\n6.11196194457544195e-02\n6.15288537108470909e-02\n5.90645033833521044e-02\n5.30485052104139598e-02\n4.28541281050294834e-02\n2.80516202306785763e-02\n8.59311600564412019e-03\n-1.49766520678288537e-02\n-4.13149474530360716e-02\n-6.81331663056971848e-02\n-9.21791515660126126e-02\n-1.09434169659337832e-01\n-1.15601021782991767e-01\n-1.06918964698098709e-01\n-8.12575810069714466e-02\n-3.93160233396038575e-02\n1.43934453330416875e-02\n7.12202936414903648e-02\n1.19173199002379521e-01\n1.45142496362343276e-01\n1.38450362065350385e-01\n9.50253364536540746e-02\n2.08533004179071238e-02\n-6.70126075608827865e-02\n-1.43320806020948849e-01\n-1.81637455334764247e-01\n-1.63875276668426439e-01\n-8.87853837523601558e-02\n2.48996553443370135e-02\n1.43552398572857343e-01\n2.31167965520521962e-01\n2.64127184489204914e-01\n2.40692579059665901e-01\n1.79765743580049958e-01\n1.09525366159551857e-01\n5.29776407834808630e-02\n1.92428485120588882e-02\n4.69470397018804855e-03\n5.79701467353617677e-04\n0.0\n5.84673672337088853e-04\n2.26443139592747691e-03\n5.35441152015599456e-03\n1.00934196955533052e-02\n1.66457651620993616e-02\n2.50781895908647641e-02\n3.53198906193147658e-02\n4.71101477173097027e-02\n5.99395201544635214e-02\n7.29941998661533947e-02\n8.51180003388608691e-02\n9.48117690499895305e-02\n1.00294280481478551e-01\n9.96496624787060054e-02\n9.10811388559568946e-02\n7.32760238823483012e-02\n4.58598609535138813e-02\n9.87812673885850138e-03\n-3.18035816725873721e-02\n-7.43342632838830120e-02\n-1.11122548102926558e-01\n-1.34642236661965425e-01\n-1.37851905763202359e-01\n-1.16103279648565899e-01\n-6.91708917117273281e-02\n-2.79325748287446649e-03\n7.10174671314884598e-02\n1.35533199845383368e-01\n1.72926845232267368e-01\n1.69379384566507585e-01\n1.20238082652337389e-01\n3.32041882476536709e-02\n-7.23070404827824004e-02\n-1.70317012193298867e-01\n-2.36672739801451149e-01\n-2.57503433612965127e-01\n-2.33906566156704465e-01\n-1.80397662614191545e-01\n-1.17740559562372976e-01\n-6.38987955609951752e-02\n-2.78796496077660765e-02\n-9.21514485074386575e-03\n-2.05908844493791609e-03\n-2.33999190904168538e-04\n1.97538788938921295e-02\n3.42147218907836587e-02\n4.41345775928601580e-02\n5.20482783042563318e-02\n5.85287959612380490e-02\n6.36292244033784399e-02\n6.71360866125634420e-02\n6.86537797246758175e-02\n6.76547824026394323e-02\n6.35324554096701050e-02\n5.56724180800771892e-02\n4.35511861448559176e-02\n2.68653283928168909e-02\n5.68748395229044454e-03\n-1.93640388192611139e-02\n-4.69677235239816526e-02\n-7.49928279873427472e-02\n-1.00496632723654319e-01\n-1.19882515072260054e-01\n-1.29269173323594500e-01\n-1.25094070134974727e-01\n-1.04922073674271879e-01\n-6.83545016142715484e-02\n-1.78457873596344595e-02\n4.08403165110205607e-02\n9.88283260229697730e-02\n1.45209169156862467e-01\n1.69038232136321742e-01\n1.61991889997164101e-01\n1.21073130041904287e-01\n5.04916950339754853e-02\n-3.81730316618803314e-02\n-1.28057547813938077e-01\n-2.01143165421889925e-01\n-2.43321624999317365e-01\n-2.48625860459909309e-01\n-2.20865947295752457e-01\n-1.71805418626085116e-01\n-1.16525397393100555e-01\n-6.80094632032511442e-02\n-3.33828453863354163e-02\n-1.32814535562176400e-02\n-4.02742922709657929e-03\n-8.29452714370842049e-04\n-8.71972909818336114e-05\n0.0\n5.49423420078216191e-04\n2.12790775597925322e-03\n5.03262326371828848e-03\n9.49307188403113351e-03\n1.56783541115569428e-02\n2.36837924417335893e-02\n3.35042050181214163e-02\n4.49970343048884808e-02\n5.78386803509579536e-02\n7.14791195450428657e-02\n8.51025457007425490e-02\n9.76049394633880102e-02\n1.07602568803079363e-01\n1.13487523759289194e-01\n1.13546177934658363e-01\n1.06152324212414523e-01\n9.00370027951720719e-02\n6.46205936312992113e-02\n3.03697872339254160e-02\n-1.08848878906838489e-02\n-5.57604685006395304e-02\n-9.93655374395234769e-02\n-1.35671868321787709e-01\n-1.58266282685001342e-01\n-1.61453033709613947e-01\n-1.41561383355428699e-01\n-9.81878953796059550e-02\n-3.50109427655580230e-02\n4.01903908088691517e-02\n1.16553917502618828e-01\n1.82160463112307269e-01\n2.26681815761232197e-01\n2.43936686116254908e-01\n2.33506368140805692e-01\n2.00750196038816386e-01\n1.55081716885516113e-01\n1.07050712770913117e-01\n6.53100074721233298e-02\n3.46188465660586253e-02\n1.55433829036960604e-02\n5.68738290805257361e-03\n1.59290538842225046e-03\n3.04032933956008917e-04\n2.97017821087520253e-05\n2.18346729042125445e-02\n3.78187628367436246e-02\n4.87956365868705971e-02\n5.76024212631137400e-02\n6.49372357216864288e-02\n7.09572175806676697e-02\n7.55594588735346712e-02\n7.84701897238894719e-02\n7.92883561389692293e-02\n7.75211926754195424e-02\n7.26264821852753428e-02\n6.40692514846397804e-02\n5.13972320704256316e-02\n3.43362333480157420e-02\n1.29024605490470293e-02\n-1.24766626996304798e-02\n-4.08483306624275663e-02\n-7.06492768722185444e-02\n-9.96785579478554201e-02\n-1.25160178502217639e-01\n-1.43924734965413997e-01\n-1.52727518739832813e-01\n-1.48697808985469249e-01\n-1.29880651799131108e-01\n-9.57923182577247179e-02\n-4.78727791814224507e-02\n1.03035344834345663e-02\n7.31880330603431190e-02\n1.33865250024386429e-01\n1.85083351276203040e-01\n2.20553541825709437e-01\n2.36238415143594810e-01\n2.31279299970752056e-01\n2.08246937986009684e-01\n1.72559721031637164e-01\n1.31169883905645296e-01\n9.08845460907549141e-02\n5.68477220135613012e-02\n3.16671339195298066e-02\n1.54167784530283725e-02\n6.38680499432198266e-03\n2.16428641308626449e-03\n5.63068697565394021e-04\n1.00076088909037232e-04\n9.12243721187669995e-06\n0.0\n4.98631485121892883e-04\n1.93119143777176249e-03\n4.56833678527345140e-03\n8.62308698955691240e-03\n1.42625815808147208e-02\n2.16037457038222545e-02\n3.06994544673957238e-02\n4.15175433747945327e-02\n5.39143272022472447e-02\n6.76047253106635826e-02\n8.21320854264492028e-02\n9.68421400317653891e-02\n1.10867031130428881e-01\n1.23126729025549608e-01\n1.32356050849927076e-01\n1.37165324574755665e-01\n1.36140924080126763e-01\n1.27987819962893490e-01\n1.11709556948846420e-01\n8.68117637987212559e-02\n5.35042850003458609e-02\n1.28661890761381844e-02\n-3.30697466726757594e-02\n-8.13571422874898587e-02\n-1.28334649615833768e-01\n-1.69993687007592126e-01\n-2.02489915023046335e-01\n-2.22729957033687836e-01\n-2.28925144976880768e-01\n-2.20982230865472945e-01\n-2.00611372303648505e-01\n-1.71082242867636292e-01\n-1.36644931578919993e-01\n-1.01732124046385652e-01\n-7.01384949916672717e-02\n-4.43963292739141119e-02\n-2.55129510598547486e-02\n-1.31163730363361968e-02\n-5.91502676822242435e-03\n-2.27679440649469853e-03\n-7.18668744170885177e-04\n-1.74528713418260523e-04\n-2.90066455363106038e-05\n-2.47620378115471624e-06\n2.54338861151069198e-02\n4.40527829852857961e-02\n5.68535066669329653e-02\n6.71829312525148853e-02\n7.59316296189707779e-02\n8.34008357197029149e-02\n8.96324498958898930e-02\n9.45115710191324621e-02\n9.78097545053835254e-02\n9.92102493662097851e-02\n9.83295696427341909e-02\n9.47419579528057942e-02\n8.80103771758139891e-02\n7.77260800915557659e-02\n6.35574215516183372e-02\n4.53069547036845932e-02\n2.29738309523191131e-02\n-3.18387422412482433e-03\n-3.25948530996988464e-02\n-6.43385390134741803e-02\n-9.71390790510265612e-02\n-1.29400832736583621e-01\n-1.59294280195308502e-01\n-1.84895520482546816e-01\n-2.04373680760164628e-01\n-2.16209289394232951e-01\n-2.19414837451713279e-01\n-2.13719306619835347e-01\n-1.99674997446628338e-01\n-1.78650912918834920e-01\n-1.52693979533864987e-01\n-1.24266199852906545e-01\n-9.58971588090332949e-02\n-6.98183503240897979e-02\n-4.76584354149275705e-02\n-3.02691755925899621e-02\n-1.77194866547976115e-02\n-9.44805805948381074e-03\n-4.51927803313888557e-03\n-1.90064521913694932e-03\n-6.83635002844977004e-04\n-2.01989105462038862e-04\n-4.59834306171208424e-05\n-7.17318925270564003e-06\n-5.75368714209189653e-07\n0.0\n4.12980078985919876e-04\n1.59946496822789119e-03\n3.78443279458807492e-03\n7.14832474559421675e-03\n1.18411698845555316e-02\n1.79856883177242667e-02\n2.56749651647319582e-02\n3.49665123906172451e-02\n4.58735762811344552e-02\n5.83543572099883973e-02\n7.22999140832085441e-02\n8.75217874173021687e-02\n1.03740728142835414e-01\n1.20578309492125973e-01\n1.37553558517765989e-01\n1.54086980615200181e-01\n1.69514350091322125e-01\n1.83112273087249117e-01\n1.94136673063000198e-01\n2.01873920660071898e-01\n2.05702331463233773e-01\n2.05159324926342840e-01\n2.00006990927911688e-01\n1.90286653434979358e-01\n1.76351911708072767e-01\n1.58870275578949449e-01\n1.38786436674297103e-01\n1.17245574578200118e-01\n9.54823853264248762e-02\n7.46894634367083615e-02\n5.58853115894934541e-02\n3.98053645712009227e-02\n2.68371982680258338e-02\n1.70130153190629699e-02\n1.00599124098423951e-02\n5.49461744037730345e-03\n2.73870568802561578e-03\n1.22662450077666509e-03\n4.83748076582015459e-04\n1.63371785737703354e-04\n4.53738736357243110e-05\n9.71926819374900962e-06\n1.42781568189206179e-06\n1.07933437162197493e-07\n3.62763133713290345e-02\n6.28324178704321168e-02\n8.11111276225599670e-02\n9.59474876611049465e-02\n1.08724808851778876e-01\n1.20046411037023112e-01\n1.30212780569549325e-01\n1.39371267953550759e-01\n1.47577090995346383e-01\n1.54822920711956136e-01\n1.61055664258365094e-01\n1.66187833305282029e-01\n1.70106914245536256e-01\n1.72684515709015662e-01\n1.73786269796035675e-01\n1.73282978035151913e-01\n1.71063110446689981e-01\n1.67046398062270146e-01\n1.61197876174614174e-01\n1.53541344848298095e-01\n1.44170851952183321e-01\n1.33258534936000955e-01\n1.21057062380670960e-01\n1.07895082604476319e-01\n9.41645872413164886e-02\n8.02999634225273207e-02\n6.67496973602086929e-02\n5.39430666923806784e-02\n4.22554782454130917e-02\n3.19770528668658002e-02\n2.32892948774712297e-02\n1.62539574889200532e-02\n1.08164682127262282e-02\n6.82373324348135944e-03\n4.05331962969866007e-03\n2.24864697713990066e-03\n1.15363261031688051e-03\n5.40679100690324857e-04\n2.27923752065437263e-04\n8.46761828624216842e-05\n2.69603983189940324e-05\n7.06431554183652954e-06\n1.42852114358024287e-06\n1.98223643268892903e-07\n1.41605253239581775e-08\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n1.27957098505530561e-03\n4.95575711540941800e-03\n1.16729154582532208e-02\n2.17298714766428862e-02\n3.48463920087801263e-02\n4.97890096437865956e-02\n6.39661460133040122e-02\n7.32162053931973283e-02\n7.21602998827597653e-02\n5.55765345251779327e-02\n2.10888036966206741e-02\n-2.71967000961087710e-02\n-7.57556405665781446e-02\n-1.02576258694562439e-01\n-8.55111455040393209e-02\n-1.85689543275236145e-02\n7.13685108828726045e-02\n1.24881736372987939e-01\n8.51840841702029838e-02\n-3.93941327750227874e-02\n-1.42330243848803356e-01\n-9.42257757604894608e-02\n8.54747418851426466e-02\n1.66546977429292142e-01\n-1.57040975955216426e-02\n-1.97467238887139712e-01\n1.88019344819042819e-03\n2.29365773327595029e-01\n-1.02939542298359415e-01\n-1.91533197604292715e-01\n3.33816802434613757e-01\n-2.79815352320624711e-01\n1.58802675309585556e-01\n-6.73083989677173145e-02\n2.22633667178538421e-02\n-5.87886221383933632e-03\n1.25374425751272208e-03\n-2.16874130346125099e-04\n3.03833333739192907e-05\n-3.42291948358810337e-06\n3.05900500334992657e-07\n-2.12071334148180759e-08\n1.10031191627599894e-09\n-4.02248428160353050e-11\n9.24415826148240616e-13\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.61209358962557635e-02\n2.79222800378758976e-02\n3.58705158480625008e-02\n4.16048844856492933e-02\n4.48145796327992577e-02\n4.44149286908469970e-02\n3.88846143669453748e-02\n2.66859736735079213e-02\n6.95995292709915281e-03\n-1.94741915052292110e-02\n-4.90011512080948675e-02\n-7.44963573151986441e-02\n-8.59117125296132850e-02\n-7.31800333992487367e-02\n-3.18406489571631673e-02\n3.00613580110648190e-02\n8.81760864774469300e-02\n1.07758027232155801e-01\n6.36345166706011878e-02\n-3.19775709189640406e-02\n-1.16651005253576731e-01\n-1.09883142932446068e-01\n7.71332431866365419e-03\n1.33714841099003445e-01\n1.10916738461859427e-01\n-6.95642157350538637e-02\n-1.68350522024694554e-01\n8.72211081793769841e-03\n1.95222452862689577e-01\n-6.44875876953811787e-03\n-2.23734792511103536e-01\n1.15274523916961635e-01\n1.70164055536562803e-01\n-3.24324435249283838e-01\n2.85949691658487493e-01\n-1.70491924010590684e-01\n7.62429970756964143e-02\n-2.67770107990213009e-02\n7.56631678646896202e-03\n-1.74273729462005931e-03\n3.29187814148754535e-04\n-5.10371019690731382e-05\n6.46978807841743947e-06\n-6.64720927878313834e-07\n5.45366401009141272e-08\n-3.49079689082634680e-09\n0.0\n1.08472742381388542e-03\n4.20113124760565244e-03\n9.90251969648426981e-03\n1.84771170763622303e-02\n2.97864244518314635e-02\n4.29935124003884145e-02\n5.62502048776087268e-02\n6.64805016337743915e-02\n6.94951639769335328e-02\n6.07489836031443048e-02\n3.70087187849701890e-02\n-1.10930973807619473e-03\n-4.64683006843350233e-02\n-8.43432667407494757e-02\n-9.54507151085634276e-02\n-6.49196479072799287e-02\n4.37546628453371750e-03\n8.19387104591040999e-02\n1.16402125826386982e-01\n6.80514713575707669e-02\n-4.51112437681951695e-02\n-1.31643108854483243e-01\n-9.06119505406491887e-02\n6.35740425963955968e-02\n1.55664101856450132e-01\n3.25463011982652650e-02\n-1.61062963962556399e-01\n-9.14113873640488572e-02\n1.71651781820813254e-01\n9.17992460712520608e-02\n-2.26861122079491717e-01\n2.74638834186305171e-02\n2.38715686972268110e-01\n-3.27133758028667621e-01\n2.52461693632194173e-01\n-1.37970366908697711e-01\n5.77226737959510572e-02\n-1.91900278708997951e-02\n5.17285234812659821e-03\n-1.14295039404465238e-03\n2.07983783328855249e-04\n-3.11689067087047306e-05\n3.82973710685585953e-06\n-3.82261697502359940e-07\n3.05284349905734929e-08\n1.54947296271686873e-02\n2.68376589637989368e-02\n3.44901382688560104e-02\n4.00656048259977887e-02\n4.33332126003985255e-02\n4.33446014060843501e-02\n3.87358878842169740e-02\n2.80789938127245162e-02\n1.04587749305105043e-02\n-1.36835414578334747e-02\n-4.15672232613794532e-02\n-6.73389093397467053e-02\n-8.22904518352507164e-02\n-7.68946777817595684e-02\n-4.51824603070834913e-02\n9.28246664275074809e-03\n6.88175382286378701e-02\n1.03622603846950462e-01\n8.51625122488589154e-02\n9.40258162821137715e-03\n-8.42585586118645702e-02\n-1.23190784366460637e-01\n-5.60485709452638037e-02\n7.71490603410546899e-02\n1.41957693042173899e-01\n3.80250389611345649e-02\n-1.33107394444665295e-01\n-1.22897469272657170e-01\n9.85217668246949063e-02\n1.65001259554958590e-01\n-1.04334215020182447e-01\n-1.71211818011923006e-01\n1.91700098163408800e-01\n6.42229980281652513e-02\n-2.86770466486349407e-01\n3.14521538030064995e-01\n-2.16820132745933564e-01\n1.09526387819341736e-01\n-4.30717369973445813e-02\n1.35966968532620879e-02\n-3.50420558818566709e-03\n7.44011625454481110e-04\n-1.30606777413531109e-04\n1.89407228380702510e-05\n-2.25787117362385284e-06\n2.19122308317213601e-07\n0.0\n1.00359133478824668e-03\n3.88689252603295144e-03\n9.16454586636588492e-03\n1.71166499032958282e-02\n2.76532809049873721e-02\n4.00812334138828524e-02\n5.28286451991456033e-02\n6.32366432636577158e-02\n6.76067562535406646e-02\n6.17616411058470177e-02\n4.23613439616827639e-02\n9.00614481927176566e-03\n-3.33556583979058227e-02\n-7.29895541743142140e-02\n-9.29116826117612898e-02\n-7.72595070966623360e-02\n-2.22245447520589383e-02\n5.33118936353040931e-02\n1.07453728119775743e-01\n9.53987923049029740e-02\n7.90425529836877999e-03\n-9.86239633238826102e-02\n-1.24796251290765020e-01\n-2.07804070260079465e-02\n1.22067940470321337e-01\n1.23206326186794154e-01\n-5.54670439705652191e-02\n-1.68875379811162324e-01\n3.75245106348209585e-03\n1.93023993845797270e-01\n-1.19717966648230333e-02\n-2.17726004401897544e-01\n1.26958605480196440e-01\n1.49005887423277417e-01\n-3.13853591570770585e-01\n2.90873821320647097e-01\n-1.81750236642562818e-01\n8.54436789782016815e-02\n-3.17120080971107290e-02\n9.53167269105466113e-03\n-2.35345015620895028e-03\n4.80917317576422547e-04\n-8.15438442288129713e-05\n1.14556023602875441e-05\n-1.32606007147867970e-06\n1.49153584618769205e-02\n2.58341586690732060e-02\n3.32116220033589898e-02\n3.86332886759816960e-02\n4.19352060973211815e-02\n4.22859974032682856e-02\n3.84603343592200414e-02\n2.91354456526361841e-02\n1.33735769422621258e-02\n-8.66375493142929227e-03\n-3.48542512856325273e-02\n-6.03977488263320247e-02\n-7.77935527381720393e-02\n-7.82387419341476070e-02\n-5.50015082023670235e-02\n-8.46471169412331068e-03\n4.91546484099665629e-02\n9.33789301144276607e-02\n9.58451624443407563e-02\n4.24753634491969873e-02\n-4.65584996049780778e-02\n-1.13675365442473017e-01\n-9.62111172950240179e-02\n1.20719355238295984e-02\n1.22543885941915204e-01\n1.08867617260732574e-01\n-4.32122795009153154e-02\n-1.55525846583337179e-01\n-4.44856381102632370e-02\n1.56679204868208438e-01\n9.27910168037262839e-02\n-1.70832186850779416e-01\n-8.35132884231201966e-02\n2.25539034459463772e-01\n-4.43192212141162792e-02\n-2.19269242183401963e-01\n3.21854692028946676e-01\n-2.60382927692823840e-01\n1.49103608459744519e-01\n-6.56033227651133394e-02\n2.30603343844059949e-02\n-6.61577618876622430e-03\n1.56781788023158228e-03\n-3.08791591122321168e-04\n5.06329993144864318e-05\n-6.89739006531364453e-06\n0.0\n9.31231485698745900e-04\n3.60664403557523329e-03\n8.50602400408354171e-03\n1.59003845834342177e-02\n2.57379331182594935e-02\n3.74429022899221697e-02\n4.96727203536255213e-02\n6.01209842243558834e-02\n6.55188921580099753e-02\n6.20485584448667304e-02\n4.63832477737146920e-02\n1.74258908626148262e-02\n-2.15613643309490836e-02\n-6.13677159511295880e-02\n-8.73740714416510744e-02\n-8.39387467111616797e-02\n-4.30735753543466382e-02\n2.54205416617282534e-02\n8.96319597254332939e-02\n1.06347499923425876e-01\n5.01739831046990742e-02\n-5.32299261485683767e-02\n-1.23700123223924555e-01\n-8.28396897064845594e-02\n5.28775536899221618e-02\n1.43085570969987724e-01\n5.61977132650048616e-02\n-1.23816025008286396e-01\n-1.28765238920203529e-01\n9.31608526669555070e-02\n1.63492650513276383e-01\n-1.06861882744981401e-01\n-1.62491258206096029e-01\n1.96459220804376944e-01\n4.41807868995598221e-02\n-2.70804866576512593e-01\n3.14111437357053713e-01\n-2.26653503229061942e-01\n1.19973760109754773e-01\n-4.96384679327573700e-02\n1.65764998401625452e-02\n-4.54921289339920397e-03\n1.03647975976877793e-03\n-1.97023114028193003e-04\n3.12759943327415793e-05\n1.43777569757819659e-02\n2.49030055809322144e-02\n3.20241391304796896e-02\n3.72974846056273943e-02\n4.06152788143286023e-02\n4.12469981820118084e-02\n3.80894651327908923e-02\n2.99194085684175506e-02\n1.57993522089508627e-02\n-4.31517772054282843e-03\n-2.88220876650200457e-02\n-5.37917648280898109e-02\n-7.27911056586944272e-02\n-7.78161961923158063e-02\n-6.18701345721389198e-02\n-2.31473894433194063e-02\n3.04712415961265054e-02\n7.95784300054478977e-02\n9.79793595169617532e-02\n6.62013596077449529e-02\n-1.01366735636439203e-02\n-9.00695223453801402e-02\n-1.12669303473113158e-01\n-4.35757786859473362e-02\n7.51257672351315631e-02\n1.31616512169743155e-01\n4.53222231046775115e-02\n-1.08967468153781014e-01\n-1.32009261787446097e-01\n4.32492144017246546e-02\n1.68583483806837048e-01\n-4.95860833819719961e-04\n-1.90872213114141376e-01\n1.82535323399032612e-02\n2.11291135957512310e-01\n-1.37916296503008823e-01\n-1.28093668731003002e-01\n3.02456209545733490e-01\n-2.94592455392162111e-01\n1.92516908748520288e-01\n-9.48536585638295737e-02\n3.70547561544135387e-02\n-1.17879528902447624e-02\n3.10082494393352712e-03\n-6.80272138600994175e-04\n1.24958469905459398e-04\n0.0\n8.66426052669416139e-04\n3.35565367270887873e-03\n7.91595447565714497e-03\n1.48087345816996611e-02\n2.40121935858648369e-02\n3.50470846782825057e-02\n4.67621540102721306e-02\n5.71499208537628728e-02\n6.33170576202104624e-02\n6.17867462025460876e-02\n4.93218218234211317e-02\n2.43605775003201686e-02\n-1.11229335333206374e-02\n-5.00111897360526886e-02\n-7.99363089969035989e-02\n-8.61829361636924501e-02\n-5.84006518150095161e-02\n3.58940215960939428e-04\n6.73683494615797546e-02\n1.04547898442535814e-01\n7.88234566639043344e-02\n-7.40196346094405995e-03\n-9.89024446369009824e-02\n-1.13935536703529044e-01\n-1.85003345278449347e-02\n1.09092262288994379e-01\n1.21812489889722070e-01\n-2.46754973339937643e-02\n-1.53724639619866710e-01\n-5.40369790310872150e-02\n1.52844125348056858e-01\n9.28820657010263895e-02\n-1.70534778138909909e-01\n-7.46582536222740317e-02\n2.23693330787860190e-01\n-6.04428650763864789e-02\n-1.99685496159892811e-01\n3.15424577887199964e-01\n-2.67266407911715631e-01\n1.60001493688534585e-01\n-7.37993804459520786e-02\n2.73166716610926015e-02\n-8.29850458126182508e-03\n2.09615301600840024e-03\n-4.43432902413646310e-04\n1.38775658619876181e-02\n2.40366491583459373e-02\n3.09183399728885401e-02\n3.60490137456508306e-02\n3.93682732128706470e-02\n4.02329150894970705e-02\n3.76476675575269440e-02\n3.04822326794392182e-02\n1.78148434016002707e-02\n-5.49493294944338991e-04\n-2.34201938960956098e-02\n-4.75864728050172936e-02\n-6.75475968056146597e-02\n-7.61070592441508709e-02\n-6.63258490029494385e-02\n-3.49512562975806268e-02\n1.34896504772552203e-02\n6.41090673426008006e-02\n9.38543548973158059e-02\n8.10994089290558301e-02\n2.12923931213095836e-02\n-5.98341926170107702e-02\n-1.10030532176237192e-01\n-8.17948277304564320e-02\n1.99064357488874799e-02\n1.15539932320372782e-01\n1.02747533742381478e-01\n-2.93739637262862459e-02\n-1.40726828658420372e-01\n-7.11091453362834303e-02\n1.14989801106904543e-01\n1.32918442729213493e-01\n-8.91485471778963728e-02\n-1.61387522056888194e-01\n1.10055608647742303e-01\n1.53322934530419563e-01\n-2.00539528157572644e-01\n-2.47180330734432206e-02\n2.54306195935482815e-01\n-3.12462077732238053e-01\n2.35681084737931035e-01\n-1.30404140447501982e-01\n5.65779146126094562e-02\n-1.99041952540329331e-02\n5.78688192107890045e-03\n-1.40596028368628924e-03\n0.0\n8.08159304335923892e-04\n3.12998752677560478e-03\n7.38518125030790829e-03\n1.38253237033364885e-02\n2.24522234036383488e-02\n3.28663875528253310e-02\n4.40770244398531741e-02\n5.43310985671782501e-02\n6.10632018469866103e-02\n6.11141477807195452e-02\n5.13829550791015804e-02\n3.00123953893345341e-02\n-1.99913021482862061e-03\n-3.92490022196895494e-02\n-7.14187708540569149e-02\n-8.50885657264134065e-02\n-6.88164250416388873e-02\n-2.08639828272981775e-02\n4.38628943942558705e-02\n9.38929119445276461e-02\n9.42769869621811196e-02\n3.17952223204261766e-02\n-6.21820483823763079e-02\n-1.16966867453382750e-01\n-7.26998579846083182e-02\n4.94382730429736364e-02\n1.32194271970166505e-01\n6.57988105777777138e-02\n-9.54889168453162129e-02\n-1.38115482128246536e-01\n3.28530244644967759e-02\n1.67792395123792820e-01\n1.30051099688057326e-03\n-1.88743069916138678e-01\n2.51320594660378351e-02\n2.04395632927583532e-01\n-1.48084568570677921e-01\n-1.07469562449839295e-01\n2.90188157944967551e-01\n-2.97112814505133938e-01\n2.02734827081083174e-01\n-1.04415861324935771e-01\n4.27883149801888477e-02\n-1.43458909405564921e-02\n3.99958161120776874e-03\n1.34110931606297272e-02\n2.32286947392501657e-02\n2.98862887514456874e-02\n3.48799994241234396e-02\n3.81894800161780984e-02\n3.92474318823506987e-02\n3.71541093074963316e-02\n3.08654370644232505e-02\n1.94855186493252362e-02\n2.71069955094634541e-03\n-1.85942590100384858e-02\n-4.18119749082793424e-02\n-6.22493676199643506e-02\n-7.34871205621304563e-02\n-6.88458357702098622e-02\n-4.41695406566670681e-02\n-1.44844298959946561e-03\n4.82922980372689700e-02\n8.54737729586527717e-02\n8.84371760794576134e-02\n4.60945854756196968e-02\n-2.84200517683381483e-02\n-9.42888948609914151e-02\n-1.01382168317382268e-01\n-2.96038770995523774e-02\n7.66134970794679765e-02\n1.22434195484713376e-01\n4.51899052963629921e-02\n-9.32865732051497143e-02\n-1.30433849883201974e-01\n8.20071441624675539e-03\n1.50932239416121494e-01\n6.15599735461246980e-02\n-1.49612664454778305e-01\n-9.18984337868215262e-02\n1.70629153394891875e-01\n6.53287062546531599e-02\n-2.21264835663218640e-01\n7.57864271506630133e-02\n1.80016674942173993e-01\n-3.07894589527900109e-01\n2.73097115467580809e-01\n-1.70601150132202228e-01\n8.22658838066984144e-02\n-3.19533271785891262e-02\n1.02347269427744293e-02\n0.0\n7.55610185450072058e-04\n2.92646566447282664e-03\n6.90629798143097169e-03\n1.29368733956070625e-02\n2.10385750119526163e-02\n3.08781219690919782e-02\n4.15999306599807023e-02\n5.16682881353673143e-02\n5.88041683689526640e-02\n6.01404651702139859e-02\n5.27386845395999559e-02\n3.45681968358428002e-02\n5.89538905798194825e-03\n-2.92687931446880163e-02\n-6.24188286671530368e-02\n-8.15827168920629092e-02\n-7.50829362113583643e-02\n-3.79495150122660108e-02\n2.12334965235122484e-02\n7.78205259489843509e-02\n9.85983775983557686e-02\n6.11691319475250600e-02\n-2.27627746743850959e-02\n-9.97554949329018947e-02\n-1.02893396848213955e-01\n-1.20819624833776833e-02\n1.01586548575465244e-01\n1.16460868162346895e-01\n-7.60729774533275283e-03\n-1.36072213428839045e-01\n-8.31947471932566185e-02\n1.06899298974041296e-01\n1.35744418548632811e-01\n-8.63426035530817371e-02\n-1.58784937453258557e-01\n1.13754931055357403e-01\n1.43741620569499018e-01\n-2.03888359094556160e-01\n-5.88268487725754352e-03\n2.37349949228945090e-01\n-3.09625601586768329e-01\n2.43879318662152539e-01\n-1.40762180614517368e-01\n6.38611282716965017e-02\n-2.35836387242849312e-02\n1.29777863108690907e-02\n2.24781852601971290e-02\n2.89269908413604324e-02\n3.37904051156882254e-02\n3.70820405194144248e-02\n3.83007281482440273e-02\n3.66313159742425801e-02\n3.11090922089787246e-02\n2.08702903947360005e-02\n5.53415817635120530e-03\n-1.42925311339583000e-02\n-3.64819955837438134e-02\n-5.70362213624492007e-02\n-7.02608262824164220e-02\n-6.98533241147929196e-02\n-5.11462387009234271e-02\n-1.42521441565016966e-02\n3.30078113747419855e-02\n7.44766166467033669e-02\n8.97499958048786212e-02\n6.39966035235344788e-02\n6.64994927132377838e-04\n-7.10635539129278043e-02\n-1.04872062554667411e-01\n-6.65340232570690859e-02\n2.96562308237585046e-02\n1.11031650354157241e-01\n9.46007794121821316e-02\n-2.38276574047235866e-02\n-1.28263944196953555e-01\n-8.24842003525138312e-02\n8.23445156137185968e-02\n1.42215001078551229e-01\n-2.41525779754373573e-02\n-1.66758978688966608e-01\n-1.86471257798068754e-03\n1.86650451742989498e-01\n-3.24593698490046462e-02\n-1.97084828113845562e-01\n1.57439607689866617e-01\n8.72420427970646423e-02\n-2.77226117018129159e-01\n2.98558172715522485e-01\n-2.12426822238339669e-01\n1.14112809301779153e-01\n-4.89092761772970813e-02\n0.0\n7.08669968604762140e-04\n2.74466698636357696e-03\n6.47838839460045980e-03\n1.21421372403053320e-02\n1.97709185784672378e-02\n2.90864451601861480e-02\n3.93469737545445036e-02\n4.92019523164749645e-02\n5.66209803543979706e-02\n5.90011272341801479e-02\n5.35767101862846054e-02\n3.82293376225247769e-02\n1.26819263457745770e-02\n-2.01733826257181233e-02\n-5.33984843097761661e-02\n-7.64788443991930994e-02\n-7.80442368276887399e-02\n-5.10781793696422418e-02\n7.39241568697107708e-04\n5.90992921470954169e-02\n9.44914275364123618e-02\n8.01995670079071604e-02\n1.33158224661820632e-02\n-7.09009954816840621e-02\n-1.10407120827810373e-01\n-6.10448285663324208e-02\n5.06340285874027560e-02\n1.23577958712271438e-01\n6.75759668603409802e-02\n-7.66139487074351672e-02\n-1.35815842564953354e-01\n-6.24638222454654279e-03\n1.47773146570163827e-01\n6.75056530068134375e-02\n-1.47118400479684330e-01\n-9.01910363978435659e-02\n1.71162091382184300e-01\n5.57982759912310639e-02\n-2.18512776526914532e-01\n9.02813114296254632e-02\n1.60755359850329488e-01\n-2.99917871103176081e-01\n2.78366787045369934e-01\n-1.81153022080269704e-01\n9.11075436828471391e-02\n1.26107154772757725e-02\n2.18423999264368424e-02\n2.81143794987671336e-02\n3.28676441371869577e-02\n3.61448571215219547e-02\n3.75014784282027766e-02\n3.61954125117240691e-02\n3.13322787284295093e-02\n2.20817323805205419e-02\n8.00840530783405308e-03\n-1.04844228088102828e-02\n-3.16689133998244096e-02\n-5.21343210778697774e-02\n-6.68359765153824920e-02\n-6.98932785593366357e-02\n-5.63903844450312636e-02\n-2.50765518634881932e-02\n1.88158044227450527e-02\n6.22619705402853371e-02\n8.67675985528187227e-02\n7.57359368634241414e-02\n2.56029927722905906e-02\n-4.49033157755113765e-02\n-9.65239016498290470e-02\n-8.92069735207942360e-02\n-1.48659209574421632e-02\n8.01154460206382341e-02\n1.14373420772190079e-01\n4.08476466900038471e-02\n-8.44112418543878362e-02\n-1.25448972070523496e-01\n-1.21828535433174505e-02\n1.30422350318114055e-01\n9.34378223963754084e-02\n-9.98514387313246821e-02\n-1.38265739227596246e-01\n8.46221462573134992e-02\n1.56649653795988941e-01\n-1.17947771331316911e-01\n-1.34893669067409155e-01\n2.07283852552199804e-01\n-1.14746995176258203e-02\n-2.22172844346289422e-01\n3.08038979171584626e-01\n-2.53008571327698939e-01\n1.52007586128716732e-01\n0.0\n6.71283309804662776e-04\n2.59986907946045285e-03\n6.13758823784921886e-03\n1.15092988178429438e-02\n1.87619258401485467e-02\n2.76616445578012071e-02\n3.75588408879086455e-02\n4.72535026201632777e-02\n5.49193810844286409e-02\n5.81753344279503024e-02\n5.44122191509958178e-02\n4.14681881707090055e-02\n1.86601318963578906e-02\n-1.20051987332203108e-02\n-4.48946129551275191e-02\n-7.08264018682117080e-02\n-7.89918273312817387e-02\n-6.11362873263982601e-02\n-1.72437258630377885e-02\n3.98492326386488405e-02\n8.50523988429542355e-02\n9.05135661742724057e-02\n4.32991254394194461e-02\n-3.76036118467178507e-02\n-1.00980572862030091e-01\n-9.23881862813725335e-02\n-3.51434204294063602e-03\n9.85196644203744226e-02\n1.10897658374488214e-01\n8.72423017050724431e-04\n-1.22229144092599579e-01\n-9.73368649821269999e-02\n6.99499326963708978e-02\n1.46661062019937116e-01\n-1.60724727958502303e-02\n-1.67547878549487217e-01\n-2.88957451332483642e-03\n1.86990161265308347e-01\n-3.86426875489501720e-02\n-1.93237832993927855e-01\n1.66632639667798010e-01\n7.23844805536595359e-02\n-2.71734392120345225e-01\n3.06517921272730920e-01\n-2.26659477842518053e-01\n1.24675447766014295e-02\n2.15944209987136426e-02\n2.78002975634867068e-02\n3.25246866256983444e-02\n3.58367408875976401e-02\n3.73360385239500589e-02\n3.63354981193071344e-02\n3.19926095276140687e-02\n2.34998973779281493e-02\n1.03767630382882309e-02\n-7.13400435119773604e-03\n-2.76186296204907408e-02\n-4.81309003265119745e-02\n-6.41510390851256079e-02\n-7.01650734055109110e-02\n-6.11193562229616558e-02\n-3.47467188936201252e-02\n5.77394732547563665e-03\n5.00914914695805083e-02\n8.17222372909752470e-02\n8.34249376632577727e-02\n4.66595591368012680e-02\n-1.86024773268553614e-02\n-8.10909941321985017e-02\n-1.00095903142668710e-01\n-5.23747796906707599e-02\n4.02598264512735102e-02\n1.09926436205083300e-01\n8.80480064461168083e-02\n-2.28657172711783513e-02\n-1.21291448674592059e-01\n-8.89718389084911826e-02\n5.95069353914735172e-02\n1.42251569411747575e-01\n2.18916474366841855e-02\n-1.47043218265722253e-01\n-7.71152801540426341e-02\n1.47031470614584381e-01\n9.44804731891386029e-02\n-1.74777425111914797e-01\n-5.42251700984128573e-02\n2.23630370403612305e-01\n-9.89054481658465379e-02\n-1.60861550744591547e-01\n3.15010323441767159e-01\n-3.02236578047343329e-01\n0.0\n6.52303779611516747e-04\n2.52636167510355723e-03\n5.96495341872968661e-03\n1.11910047599263693e-02\n1.82627872330639665e-02\n2.69805625966862417e-02\n3.67622222236966070e-02\n4.65159675077355950e-02\n5.45601791735772640e-02\n5.86673345108889716e-02\n5.63285181302290508e-02\n4.53271356853119575e-02\n2.46462372157343450e-02\n-4.41367665205747491e-03\n-3.72629826846771761e-02\n-6.58157358641486556e-02\n-7.98017939158763706e-02\n-7.01164492693841374e-02\n-3.38679883911930310e-02\n2.07084914989497000e-02\n7.28733568468652448e-02\n9.52659058636477624e-02\n6.81381564256587358e-02\n-3.24600432939190116e-03\n-8.05966522674440300e-02\n-1.08042639559794929e-01\n-5.26644729465793326e-02\n5.44332719254607134e-02\n1.21648627119007244e-01\n7.09428607236944064e-02\n-6.45118248273502115e-02\n-1.36177139145113313e-01\n-3.62840857794965513e-02\n1.26160445553222311e-01\n1.11393098031070920e-01\n-9.13207844030982652e-02\n-1.51487942442588203e-01\n7.82175615301450577e-02\n1.69216025513790030e-01\n-1.17200097629161004e-01\n-1.48989927997672411e-01\n2.17487605251605209e-01\n1.31538740864563263e-03\n-2.62314216563520608e-01\n3.62205543056209112e-01\n1.26927821463444709e-02\n2.19845435668717670e-02\n2.83075977716475621e-02\n3.31422268659674474e-02\n3.65856214055097079e-02\n3.82690865375848593e-02\n3.75401199209504446e-02\n3.35845560006285751e-02\n2.55985972297089713e-02\n1.30524307644191255e-02\n-3.94716280630172389e-03\n-2.42360107154138589e-02\n-4.52262083773349588e-02\n-6.27936058216861243e-02\n-7.16864260824185140e-02\n-6.67069640674371328e-02\n-4.47332025380019135e-02\n-7.22445614354816617e-03\n3.77716223613075372e-02\n7.56810959891028312e-02\n8.91416220056182457e-02\n6.58551961179772161e-02\n8.29666876599030254e-03\n-6.04305839064081668e-02\n-1.01999116578775292e-01\n-8.32412365566026075e-02\n-4.26865314778276245e-03\n8.66123953168861371e-02\n1.15205717396586554e-01\n4.23784900309135404e-02\n-8.00251873406025160e-02\n-1.29754232759522414e-01\n-3.40330555554719111e-02\n1.14774122405051845e-01\n1.23170003542209999e-01\n-4.91690119143385063e-02\n-1.62158793089255016e-01\n-8.33526480088912260e-03\n1.78883604204815000e-01\n2.82930523219850037e-02\n-2.02982096435984721e-01\n1.30514466297559154e-02\n2.28073880208687685e-01\n-1.54173379274671618e-01\n-1.53120780502724207e-01\n3.93760477386580376e-01\n0.0\n6.48416547863804420e-04\n2.51130649128181865e-03\n5.93030035494610148e-03\n1.11314068455235348e-02\n1.81851924595697011e-02\n2.69205753869866012e-02\n3.68082744161914513e-02\n4.68383582784032762e-02\n5.54355772899053981e-02\n6.04801644945728301e-02\n5.95211492682436449e-02\n5.02670716495123571e-02\n3.13911512652983865e-02\n3.56975274532988791e-03\n-2.95236222759111752e-02\n-6.07844494762190962e-02\n-8.04845178417088053e-02\n-7.88956023094435077e-02\n-5.06990403972140055e-02\n4.59903939493440243e-05\n5.70793056719194059e-02\n9.47774490016342896e-02\n8.88646415171105847e-02\n3.27118375837990305e-02\n-4.97728135434097191e-02\n-1.08013938982708599e-01\n-9.35256227258722261e-02\n-2.83151346579159531e-03\n1.00009509562259707e-01\n1.19382691489516121e-01\n1.85388581132047529e-02\n-1.13593484920506374e-01\n-1.23327889660045292e-01\n2.61804096204531767e-02\n1.55227511398610019e-01\n6.31069142837542563e-02\n-1.42878165519182615e-01\n-1.20528301582193881e-01\n1.34530242901154923e-01\n1.45816955739098836e-01\n-1.65676034363735097e-01\n-1.28283546982641550e-01\n2.51575677218922711e-01\n1.13887087059091809e-02\n-3.92916259506756016e-01\n1.31271313339530807e-02\n2.27368584280361469e-02\n2.92816419853430404e-02\n3.43080304161551344e-02\n3.79448958270281883e-02\n3.98523338510409358e-02\n3.94060194871403008e-02\n3.58123064314626940e-02\n2.82644682943970250e-02\n1.61816715334339931e-02\n-4.58400460270634298e-04\n-2.07231699932521364e-02\n-4.23563902626012956e-02\n-6.16053923218678051e-02\n-7.34804467833138908e-02\n-7.26897992966427237e-02\n-5.53686633129472985e-02\n-2.13954496941916456e-02\n2.34366718715051589e-02\n6.66960872452504738e-02\n9.15799472002021830e-02\n8.30718464408261581e-02\n3.69308624496613863e-02\n-3.25525386884334064e-02\n-9.25537705679998074e-02\n-1.04977921800155957e-01\n-5.14019800376215169e-02\n4.39857059960096844e-02\n1.16017381827676527e-01\n9.94007533916786007e-02\n-8.55905655489242953e-03\n-1.19561597367873099e-01\n-1.15829299880797126e-01\n2.08254955998537529e-02\n1.46451843052036790e-01\n9.04098780637844768e-02\n-1.02004599265593007e-01\n-1.58298921527188302e-01\n4.32553594422784640e-02\n1.92253987955611189e-01\n-1.13750551592409020e-02\n-2.21331787618838732e-01\n3.11054304221780112e-02\n2.60646489710191498e-01\n-1.31022006556012344e-01\n-3.64127610401250801e-01\n0.0\n6.46807126230808361e-04\n2.50507322810019934e-03\n5.91650046625325464e-03\n1.11110768259713825e-02\n1.81722140385179934e-02\n2.69576036291360836e-02\n3.69904711208987741e-02\n4.73423337088037938e-02\n5.65448729221196336e-02\n6.25898407300531229e-02\n6.30945357306761379e-02\n5.57127934771544930e-02\n3.88376601056276069e-02\n1.25500635128218112e-02\n-2.03934677213271770e-02\n-5.39505518312553140e-02\n-7.91545430342206063e-02\n-8.60352126619684798e-02\n-6.72960068862469007e-02\n-2.30398549780671119e-02\n3.54547719822675897e-02\n8.59674034706462004e-02\n1.02344813173120441e-01\n6.82323600996898316e-02\n-7.92716517419131753e-03\n-8.75449108977942314e-02\n-1.17183276025067687e-01\n-6.46486779447620202e-02\n4.45969370873366272e-02\n1.27064841601949335e-01\n1.00072341750575791e-01\n-3.04066876792250529e-02\n-1.41732013888729719e-01\n-9.89096413100008648e-02\n7.35716316870646814e-02\n1.65307990073052163e-01\n2.56787830095949812e-02\n-1.71240503983219883e-01\n-1.03815747672743167e-01\n1.61321743830705994e-01\n1.52941516917301068e-01\n-1.76075981387336628e-01\n-1.84517578535867449e-01\n2.46573947710653635e-01\n3.16425110156070333e-01\n1.36095801053821887e-02\n2.35724842122005465e-02\n3.03635385606900420e-02\n3.56028589948499813e-02\n3.94544736805060650e-02\n4.16105920374837679e-02\n4.14789721511340734e-02\n3.82912121476252018e-02\n3.12431409340397544e-02\n1.97085497831739030e-02\n3.54004821036136251e-03\n-1.65630866302460059e-02\n-3.86915638722093377e-02\n-5.95055040100092719e-02\n-7.43594653111580434e-02\n-7.79997942596061811e-02\n-6.59857763388835145e-02\n-3.67501336526992531e-02\n6.20439616692029881e-03\n5.29927699296972587e-02\n8.82974224010123349e-02\n9.57237015951878378e-02\n6.54349889098412296e-02\n2.57413700735818892e-03\n-6.86342745336891991e-02\n-1.11013838517395616e-01\n-9.31353773062894158e-02\n-1.40195122552080036e-02\n8.31957161341436296e-02\n1.28051780666485315e-01\n7.32046541731549011e-02\n-5.19743398111806726e-02\n-1.40792968922298561e-01\n-9.42654288833685572e-02\n6.17100331110834455e-02\n1.61221756058492621e-01\n6.53246611266524585e-02\n-1.31643808715394828e-01\n-1.58441870335105095e-01\n6.16393048235875235e-02\n2.08585098047057882e-01\n2.59428486123494543e-03\n-2.46376303618885850e-01\n-5.29368504423063796e-02\n3.19049585842668570e-01\n2.59591601697814867e-01\n0.0\n6.42883660610376749e-04\n2.48987771109285012e-03\n5.88155529912457765e-03\n1.10511686982159782e-02\n1.80949951997954363e-02\n2.69007673865756247e-02\n3.70475563184379797e-02\n4.76949919543515136e-02\n5.74935079051110409e-02\n6.45657801176515167e-02\n6.66269008180545852e-02\n6.13165933212485026e-02\n4.67949635797045987e-02\n2.25852363196753086e-02\n-9.48011632489508503e-03\n-4.45303246578348452e-02\n-7.46393716269407731e-02\n-9.00772226962844452e-02\n-8.21729798449556681e-02\n-4.75042582372448424e-02\n7.90956447452199202e-03\n6.68317854875203482e-02\n1.04248628172916719e-01\n9.74378494219295538e-02\n4.03273577156501237e-02\n-4.53461425435655180e-02\n-1.12718791234726085e-01\n-1.13087391544121868e-01\n-3.28458504292712325e-02\n8.11315651523784737e-02\n1.39309748017164281e-01\n7.81566508962675682e-02\n-6.52927480916991737e-02\n-1.56037024088233944e-01\n-8.18474027818509448e-02\n9.91299392672057716e-02\n1.73722231730169596e-01\n1.83977013363066100e-02\n-1.84398241969710330e-01\n-1.28174889302868716e-01\n1.49467067011672505e-01\n2.19118747314210383e-01\n-9.29365060517751140e-02\n-3.44834229023596173e-01\n-2.01907627913365667e-01\n1.41242844289287163e-02\n2.44639782514585007e-02\n3.15180027678967564e-02\n3.69856427960824213e-02\n4.10697120900101950e-02\n4.34987601178512678e-02\n4.37180209854865012e-02\n4.09910928239128614e-02\n3.45243818373350345e-02\n2.36549103593145169e-02\n8.11741715496055484e-03\n-1.16208833332030678e-02\n-3.40112128611223322e-02\n-5.61691933134084581e-02\n-7.38841140856446726e-02\n-8.20937870685732179e-02\n-7.59915907309002409e-02\n-5.27741651320379201e-02\n-1.37244409058593659e-02\n3.41101802348307073e-02\n7.77818062255579423e-02\n1.01035732980715498e-01\n9.01362321330806404e-02\n4.17738944025836251e-02\n-3.04008772971459361e-02\n-9.58054034681115330e-02\n-1.17829026705327453e-01\n-7.47099814091639336e-02\n1.93921463349212009e-02\n1.10233396665466915e-01\n1.30182577161205348e-01\n4.98023624928256164e-02\n-8.12007640828068256e-02\n-1.52030886457938164e-01\n-8.16491231257492622e-02\n8.21455388040079892e-02\n1.72291328840566887e-01\n6.65548842898245202e-02\n-1.37318623777816756e-01\n-1.82168678865231554e-01\n2.77056204668715313e-02\n2.30486877773209364e-01\n1.11394926492778296e-01\n-2.15900185921185039e-01\n-3.30424091374881157e-01\n-1.49245621329577027e-01\n0.0\n6.36554012909454001e-04\n2.46536309095981643e-03\n5.82460922027959287e-03\n1.09499978951079682e-02\n1.79504994129428865e-02\n2.67447852346890357e-02\n3.69704903245098304e-02\n4.78811461118979348e-02\n5.82568103848995350e-02\n6.63700218309682816e-02\n7.00643851035156889e-02\n6.70110059802825342e-02\n5.51958698120009403e-02\n3.36438730992109289e-02\n3.28997211542944720e-03\n-3.22341464958951635e-02\n-6.62878348320955213e-02\n-8.98735012999957172e-02\n-9.36641331249790099e-02\n-7.14291042144190730e-02\n-2.41250592735062913e-02\n3.70557106950739137e-02\n9.11022482606201472e-02\n1.13161461692931634e-01\n8.60396230981904098e-02\n1.32659079129738514e-02\n-7.43487334396781413e-02\n-1.27529766982929837e-01\n-1.05317360376588148e-01\n-8.63691298014403717e-03\n1.04446309937748394e-01\n1.46334635283119074e-01\n6.77995094055629105e-02\n-8.11516998201905759e-02\n-1.67171299739562185e-01\n-8.86448637279527996e-02\n9.75522442039083726e-02\n1.92309853495651079e-01\n6.08562950158143406e-02\n-1.69487319895676170e-01\n-2.08652047856034278e-01\n3.41132649435579791e-02\n2.92872001563341700e-01\n2.88171765624336829e-01\n1.04966441623843845e-01\n1.46903890193911691e-02\n2.54445001645374411e-02\n3.27878175543437345e-02\n3.85068805327994507e-02\n4.28475293015584749e-02\n4.55790477815629300e-02\n4.61895927799149258e-02\n4.39817159851506045e-02\n3.81811302698496363e-02\n2.80984483906901727e-02\n1.33612313787591017e-02\n-5.78822165997316257e-03\n-2.81666295749471232e-02\n-5.13776572288868749e-02\n-7.17278189873856442e-02\n-8.45025292803824740e-02\n-8.47675475577289034e-02\n-6.87667814696400620e-02\n-3.57702398780627359e-02\n1.01114785115645565e-02\n5.90037492073901201e-02\n9.63053409228178808e-02\n1.06510440678656629e-01\n7.96587388213405301e-02\n1.85345278498528776e-02\n-5.71578015262858841e-02\n-1.14177216486372649e-01\n-1.19193734258339248e-01\n-5.91390797794134476e-02\n4.22981298696863198e-02\n1.27048332704058575e-01\n1.32820920925439956e-01\n4.07027153890288929e-02\n-9.34601740001196890e-02\n-1.62650367919357830e-01\n-9.21762197185929943e-02\n7.50718497730223089e-02\n1.85677196544856704e-01\n1.10438724097921714e-01\n-9.97010575569586832e-02\n-2.24395967250839629e-01\n-1.00215608371529680e-01\n1.70299370538063405e-01\n3.17882095555194755e-01\n2.31898858444866157e-01\n7.02672541423890462e-02\n0.0\n6.27805761473840956e-04\n2.43148125884125191e-03\n5.74553604104465192e-03\n1.08072513030591146e-02\n1.77379385894093008e-02\n2.64877241460713328e-02\n3.67548484393857358e-02\n4.78915234524220010e-02\n5.88170871237090748e-02\n6.79719331912686242e-02\n7.33593198735836560e-02\n7.27310791862362943e-02\n6.39684590944901710e-02\n4.56790531627380841e-02\n1.79637334716347130e-02\n-1.67999663679751741e-02\n-5.34445488903645821e-02\n-8.41687117830742931e-02\n-9.97729145316418042e-02\n-9.21871227743387561e-02\n-5.80164580314460748e-02\n-2.08020992676968873e-03\n6.08561398453097632e-02\n1.08257418861729654e-01\n1.17180624648570902e-01\n7.57235294110912838e-02\n-6.04866216249004638e-03\n-9.31634623833921816e-02\n-1.37504842835584645e-01\n-1.04178548032064083e-01\n-5.02890450770419233e-04\n1.14277118075638701e-01\n1.57047575777245207e-01\n8.12367917382637444e-02\n-7.06340313207857728e-02\n-1.77521869804423388e-01\n-1.32053794572218525e-01\n4.79670437922097639e-02\n2.04091673877276475e-01\n1.71295324831178208e-01\n-4.70880547525314164e-02\n-2.63166178351133595e-01\n-2.98946329926117971e-01\n-1.73529785165219969e-01\n-4.47608200688613539e-02\n1.53285543027406150e-02\n2.65498348589252725e-02\n3.42191916151755177e-02\n4.02212971357487487e-02\n4.48501242802209002e-02\n4.79205748644965512e-02\n4.89696331548696781e-02\n4.73464251737368766e-02\n4.23058916751310327e-02\n3.31447737840453102e-02\n1.93979349010378471e-02\n1.09599070300128590e-03\n-2.09394335669539841e-02\n-4.48215495179658252e-02\n-6.74462375182369039e-02\n-8.46004652240681665e-02\n-9.14813402828999617e-02\n-8.37300694315294969e-02\n-5.89503317107052532e-02\n-1.84429448886100425e-02\n3.14189527789586406e-02\n7.90180555308907379e-02\n1.09400847661427700e-01\n1.08701583041372077e-01\n7.04560307718054418e-02\n1.64158383309285822e-03\n-7.50869514533963195e-02\n-1.26556368276587727e-01\n-1.22794519989775058e-01\n-5.53492661721921159e-02\n4.96614527063081942e-02\n1.35945625678986909e-01\n1.44824624525014822e-01\n5.66016640111407440e-02\n-8.17837335198390858e-02\n-1.73177968354114614e-01\n-1.36140831105306587e-01\n1.97466856551459825e-02\n1.78320175451154056e-01\n1.98597599386899859e-01\n4.13979644798899357e-02\n-1.80589995270169418e-01\n-2.99736699703319343e-01\n-2.51692478848013323e-01\n-1.21284068391920533e-01\n-2.71116359838028398e-02\n0.0\n6.16294684052112783e-04\n2.38689904768999480e-03\n5.64117231709367062e-03\n1.06168985948637828e-02\n1.74471254954828812e-02\n2.61135703526140864e-02\n3.63765516429677416e-02\n4.76909678014628829e-02\n5.91242409557350204e-02\n6.93021109221640397e-02\n7.64194800896207393e-02\n7.83624049774791498e-02\n7.29875874497843413e-02\n5.85887783009607713e-02\n3.45361876903139617e-02\n1.99965721937037577e-03\n-3.54361429548345624e-02\n-7.15617411421854421e-02\n-9.80936766361294454e-02\n-1.06278671852735401e-01\n-8.95823192540993879e-02\n-4.70003738735573634e-02\n1.41141741609886288e-02\n7.73554923233218117e-02\n1.20351637587943816e-01\n1.22284428993984215e-01\n7.43143928021626488e-02\n-1.14224978797242607e-02\n-1.00464580570348294e-01\n-1.47318693936068862e-01\n-1.18580923980178471e-01\n-1.78989708918266752e-02\n1.04395830851834168e-01\n1.71522575263401977e-01\n1.27910990646588840e-01\n-1.29803156496141360e-02\n-1.61128517082307021e-01\n-2.03937526203026187e-01\n-9.30389559610534655e-02\n1.07276799193181074e-01\n2.64359606022731675e-01\n2.86127553035363080e-01\n1.92840195758456817e-01\n7.93615928164829731e-02\n1.55952937306462307e-02\n1.60653412002967309e-02\n2.78259871998435097e-02\n3.58715528771547526e-02\n4.21993785913838473e-02\n4.71579068099038448e-02\n5.06133427332820587e-02\n5.21582054997925329e-02\n5.11968857261439064e-02\n4.70251343864517141e-02\n3.89410863728956586e-02\n2.64058503101900523e-02\n9.25861738510617982e-03\n-1.20264432836361384e-02\n-3.60798231956063684e-02\n-6.04437005323818360e-02\n-8.15503960225070490e-02\n-9.49968237624368300e-02\n-9.62267149211451372e-02\n-8.16617676379934321e-02\n-5.01756071950277688e-02\n-4.58432772192862367e-03\n4.74177397385703234e-02\n9.36103528131909807e-02\n1.19538049452473011e-01\n1.12897648831951691e-01\n6.92243455171969030e-02\n-3.14432095386012406e-03\n-8.17745648907635264e-02\n-1.35239090698639181e-01\n-1.35212462368481307e-01\n-7.21489204454115324e-02\n3.32128597851692742e-02\n1.31879838539383731e-01\n1.67158833411366670e-01\n1.07824299103545740e-01\n-2.45116449739875217e-02\n-1.56351769158545650e-01\n-2.01021601252032500e-01\n-1.16793840034428803e-01\n5.71525312588316223e-02\n2.21735847654743662e-01\n2.87820939793562325e-01\n2.39651009418032357e-01\n1.35646493059599721e-01\n4.86604730737678140e-02\n8.50497301765593128e-03\n0.0\n6.01414550954747305e-04\n2.32926854001454806e-03\n5.50595323537370930e-03\n1.03683710961759521e-02\n1.70603460483883737e-02\n2.55948508169326350e-02\n3.57950938457856152e-02\n4.72217872115058696e-02\n5.90982408989515345e-02\n7.02522938923913487e-02\n7.91029630178506638e-02\n8.37277043688576250e-02\n8.20493655507973652e-02\n7.21745241701524376e-02\n5.28902039235944615e-02\n2.42783063704446363e-02\n-1.16640640291785520e-02\n-5.05948417164706274e-02\n-8.58561774673614053e-02\n-1.09245471156492732e-01\n-1.12711740371080768e-01\n-9.08995605588844569e-02\n-4.40382446016509346e-02\n1.98225211324287720e-02\n8.45810516996716999e-02\n1.29094040338157051e-01\n1.33788534140890675e-01\n8.95361172649749709e-02\n5.39028448026887888e-03\n-8.95384889585618127e-02\n-1.53950285385564101e-01\n-1.51903029786514931e-01\n-7.37213737088533438e-02\n5.13919176452576412e-02\n1.62380834216425463e-01\n1.95260160475724920e-01\n1.21052453233479962e-01\n-3.14980895702597144e-02\n-1.88332828635427940e-01\n-2.74646574784291941e-01\n-2.61716087018771026e-01\n-1.79891024578344244e-01\n-8.80089556914691734e-02\n-2.79495144752933411e-02\n-4.38762517332914014e-03\n1.69411914627089245e-02\n2.93430043541639644e-02\n3.78353869379851604e-02\n4.45484496557317575e-02\n4.98933157380047412e-02\n5.37943898565421685e-02\n5.59076052874256588e-02\n5.57027831522848571e-02\n5.25302279525353688e-02\n4.57081310469298133e-02\n3.46482292243930970e-02\n1.90271231081615803e-02\n-1.00131190250156844e-03\n-2.45743254513684853e-02\n-4.99145204643218418e-02\n-7.42210420907770396e-02\n-9.37508942533245571e-02\n-1.04189383924946657e-01\n-1.01382062713658558e-01\n-8.24250430403006273e-02\n-4.69779662626676683e-02\n1.51354994596008445e-03\n5.51754738984877591e-02\n1.02221344079073753e-01\n1.29091861795571056e-01\n1.24266610195245195e-01\n8.30635218998719560e-02\n1.18572157499620291e-02\n-7.04958773599751315e-02\n-1.36083955971692178e-01\n-1.56855747373043836e-01\n-1.17003847480149845e-01\n-2.38059403541305871e-02\n8.96001070985881359e-02\n1.74123715149536562e-01\n1.85982883977265007e-01\n1.10193798866902615e-01\n-2.74922179722622735e-02\n-1.70364442608258754e-01\n-2.59883616810936580e-01\n-2.67424317752679386e-01\n-2.07362099544044776e-01\n-1.22326268917661810e-01\n-5.27719773327279332e-02\n-1.50182941842691951e-02\n-2.13519179230197299e-03\n0.0\n5.82214739925708872e-04\n2.25490799164875313e-03\n5.33115579749924261e-03\n1.00451209872311487e-02\n1.65499317979001699e-02\n2.48888325988343047e-02\n3.49478508585589279e-02\n4.63954531718684948e-02\n5.86171926468202764e-02\n7.06583627413406579e-02\n8.11941055369301834e-02\n8.85529208889404562e-02\n9.08238000032103171e-02\n8.60758144973802347e-02\n7.27075350632866574e-02\n4.99177120372384930e-02\n1.82456799030248848e-02\n-1.99277643915011099e-02\n-6.00900387146795154e-02\n-9.57319743454582289e-02\n-1.19116700280152074e-01\n-1.22795476196760678e-01\n-1.01774406068687470e-01\n-5.59212186410273440e-02\n8.14774158263157321e-03\n7.66961545594156274e-02\n1.30928059065427788e-01\n1.51818750318323897e-01\n1.26951760879462222e-01\n5.72357391400956372e-02\n-3.96232907508006146e-02\n-1.31831967727716159e-01\n-1.83378429896452810e-01\n-1.68542692508535957e-01\n-8.49719417496305612e-02\n4.20150743977598454e-02\n1.68250515739156670e-01\n2.50141496599090241e-01\n2.64973974355980857e-01\n2.20218156190609471e-01\n1.45955340460485444e-01\n7.57436091108933812e-02\n2.92418523483442931e-02\n7.53138951227330655e-03\n9.76673923324897393e-04\n1.80242889777962219e-02\n3.12189842798467586e-02\n4.02632381652137730e-02\n4.74493845353004748e-02\n5.32625294133752258e-02\n5.76940930302322352e-02\n6.04730612054317218e-02\n6.11469378190045501e-02\n5.91372197801329907e-02\n5.38051955482060223e-02\n4.45444808604139181e-02\n3.09087321653255878e-02\n1.27753543525716343e-02\n-9.46461146608848850e-03\n-3.47149162742503570e-02\n-6.10233376355344345e-02\n-8.55324808850206064e-02\n-1.04605506257293951e-01\n-1.14198120354769700e-01\n-1.10520752083061807e-01\n-9.09725777121273421e-02\n-5.52294277786426757e-02\n-6.24233292138808796e-03\n4.92145765417018877e-02\n1.00862997031954504e-01\n1.36444341589458118e-01\n1.44517547634926080e-01\n1.18134306054194518e-01\n5.84273563316360101e-02\n-2.33060657739977348e-02\n-1.06478045589713063e-01\n-1.65837769531719470e-01\n-1.79262760396213583e-01\n-1.36381141309693227e-01\n-4.44190330510980461e-02\n7.21505130105763587e-02\n1.79394433604663533e-01\n2.46737161443186026e-01\n2.59126705556298575e-01\n2.22273551796538182e-01\n1.57954307982564296e-01\n9.20931404226307815e-02\n4.27699336962678034e-02\n1.49458820609317446e-02\n3.51230300324693922e-03\n4.18039187444241918e-04\n0.0\n5.57138585122695404e-04\n2.15778846170976276e-03\n5.10249927084320022e-03\n9.62007764535306557e-03\n1.58706926747852958e-02\n2.39259152566240266e-02\n3.37332417910101157e-02\n4.50691028536493732e-02\n5.74854164023695241e-02\n7.02577418663639375e-02\n8.23472542521716672e-02\n9.23933831262029465e-02\n9.87579126724904138e-02\n9.96428376738711236e-02\n9.33008908431979533e-02\n7.83466183155526741e-02\n5.41547758910152915e-02\n2.13008863669642973e-02\n-1.80413309607247996e-02\n-5.98713862900276603e-02\n-9.84544672915810548e-02\n-1.26879592277123115e-01\n-1.38165485224836071e-01\n-1.26864499923012741e-01\n-9.09204387936074221e-02\n-3.33181135897704511e-02\n3.71006830649710795e-02\n1.06281932386936090e-01\n1.57433627410368593e-01\n1.75148612607122223e-01\n1.50256139623600821e-01\n8.38196415418651364e-02\n-1.15107523194617409e-02\n-1.14012251683483876e-01\n-1.99105782679165594e-01\n-2.47349693273689414e-01\n-2.51021392640118468e-01\n-2.16240808180904853e-01\n-1.59457742220431409e-01\n-9.99636511512013021e-02\n-5.22506624644738862e-02\n-2.19934408072412872e-02\n-7.02024186123019044e-03\n-1.51570418324112875e-03\n-1.66476378162650916e-04\n1.94434920509979348e-02\n3.36771161088900220e-02\n4.34433667407253393e-02\n5.12438453421805301e-02\n5.76546296344441420e-02\n6.27463405973307936e-02\n6.63335477445741450e-02\n6.80568933229970391e-02\n6.74298837403387585e-02\n6.38859627045896411e-02\n5.68410271964543967e-02\n4.57796715141565447e-02\n3.03687554724426274e-02\n1.05961723091613520e-02\n-1.30752503774957188e-02\n-3.95591355273404513e-02\n-6.70345498285775804e-02\n-9.29161731452630424e-02\n-1.13956000318319164e-01\n-1.26523997363122587e-01\n-1.27096561094758836e-01\n-1.12942650251970686e-01\n-8.29373016648544958e-02\n-3.83576607462389335e-02\n1.65551037857500499e-02\n7.45252929815129195e-02\n1.25895605434501456e-01\n1.60114286156647578e-01\n1.67942585675298378e-01\n1.43975011074884057e-01\n8.87899770491133722e-02\n9.92235717176710892e-03\n-7.89982204778692659e-02\n-1.61110898741875563e-01\n-2.20620024966862033e-01\n-2.47234351944349368e-01\n-2.39123209549389037e-01\n-2.03114278404185999e-01\n-1.51902632423171285e-01\n-9.93726179326779452e-02\n-5.60521477450708419e-02\n-2.66227827914569011e-02\n-1.02564984204793833e-02\n-3.01281852593677157e-03\n-6.01157981278920700e-04\n-6.12251994788958690e-05\n0.0\n5.23366350276280139e-04\n2.02698915858539035e-03\n4.79412097543923006e-03\n9.04424805969876976e-03\n1.49409588170514099e-02\n2.25806261098654600e-02\n3.19688297361799545e-02\n4.29874335057650117e-02\n5.53551901680805897e-02\n6.85861510111124562e-02\n8.19523902450641634e-02\n9.44602740096819188e-02\n1.04852247226702375e-01\n1.11648148478164608e-01\n1.13240340889580529e-01\n1.08054136224102884e-01\n9.47776801935550223e-02\n7.26525676987035268e-02\n4.17978156159190053e-02\n3.51701427425532695e-03\n-3.94844201280537890e-02\n-8.30609957407952709e-02\n-1.21856775437745563e-01\n-1.49865383710848676e-01\n-1.61323525933075473e-01\n-1.51850071865214209e-01\n-1.19634333129660125e-01\n-6.63814634728477904e-02\n2.31761110296449134e-03\n7.74666065309330826e-02\n1.48090004245387791e-01\n2.03417856778603606e-01\n2.35332570400872354e-01\n2.40367262475969845e-01\n2.20556712929096843e-01\n1.82745367663388586e-01\n1.36491998260113184e-01\n9.12741341385529398e-02\n5.40110169448225069e-02\n2.77896583896982269e-02\n1.21161287018505780e-02\n4.30580708434029347e-03\n1.17126144867224871e-03\n2.17091648565202261e-04\n2.05897328266763108e-05\n2.14870563036192452e-02\n3.72166732229616479e-02\n4.80205461962754931e-02\n5.66957529803094745e-02\n6.39387051288575897e-02\n6.99183744420824177e-02\n7.45530036701334692e-02\n7.75975110387896322e-02\n7.86850983866579090e-02\n7.73596911250518104e-02\n7.31132867698526256e-02\n6.54355444974218936e-02\n5.38798158659529736e-02\n3.81471106819752243e-02\n1.81860881055086986e-02\n-5.69737100782110369e-03\n-3.27331102711882968e-02\n-6.16005492046830389e-02\n-9.03876641047603180e-02\n-1.16622976338384976e-01\n-1.37407599935842450e-01\n-1.49666588716749704e-01\n-1.50522011668705741e-01\n-1.37763898750521530e-01\n-1.10361737669348842e-01\n-6.89246775019520391e-02\n-1.59931486852575924e-02\n4.39589245136761397e-02\n1.04901670046329595e-01\n1.60026508309150078e-01\n2.02839005832641778e-01\n2.28368437119686324e-01\n2.34207461226184244e-01\n2.21078209255960834e-01\n1.92705599518116333e-01\n1.54962716959518937e-01\n1.14488218494946253e-01\n7.71741143357392301e-02\n4.69892611743711122e-02\n2.54876801802120800e-02\n1.20836420730779017e-02\n4.87475067307195642e-03\n1.60834377552929913e-03\n4.07296129062985476e-04\n7.04398440101876885e-05\n6.24542752091238264e-06\n0.0\n4.74825274680922547e-04\n1.83899038119757544e-03\n4.35033236851626540e-03\n8.21220468781931438e-03\n1.35852237746283341e-02\n2.05839767722955334e-02\n2.92649715164546749e-02\n3.96080219278566875e-02\n5.14925379495168242e-02\n6.46705035315534998e-02\n7.87387454461088432e-02\n9.31142309456050310e-02\n1.07017429383415172e-01\n1.19470017037529949e-01\n1.29314079278485344e-01\n1.35260042525187862e-01\n1.35969338436110004e-01\n1.30174745705642525e-01\n1.16836084709338373e-01\n9.53214072419223402e-02\n6.55945581386291471e-02\n2.83803252589791208e-02\n-1.47294057939282522e-02\n-6.12679821644893166e-02\n-1.08019010800625370e-01\n-1.51292253452747022e-01\n-1.87341238232850343e-01\n-2.12877752318639091e-01\n-2.25601547410057168e-01\n-2.24636664714060907e-01\n-2.10761294949700501e-01\n-1.86345650647050276e-01\n-1.54973252501559189e-01\n-1.20804061093813878e-01\n-8.78189775603789441e-02\n-5.91336489950542790e-02\n-3.65599316135800101e-02\n-2.05199033930828743e-02\n-1.03018952049927729e-02\n-4.53571654879849576e-03\n-1.70398770774946593e-03\n-5.24767874224706392e-04\n-1.24285754767982645e-04\n-2.01357560523707097e-05\n-1.67476553258658339e-06\n2.50239745562118657e-02\n4.33427953386697970e-02\n5.59383618009766936e-02\n6.61069573898920571e-02\n7.47309669228921475e-02\n8.21162110354802105e-02\n8.83169168341188526e-02\n9.32366324295288706e-02\n9.66704593034840021e-02\n9.83290438486316837e-02\n9.78582873113871266e-02\n9.48610685716636121e-02\n8.89244451529673241e-02\n7.96543362730894045e-02\n6.67184946587190270e-02\n4.98972156917163942e-02\n2.91395464153012644e-02\n4.62073377983725393e-03\n-2.32055680126331716e-02\n-5.35689196913152338e-02\n-8.53676531805221683e-02\n-1.17188762408994243e-01\n-1.47370919135600187e-01\n-1.74115306900627237e-01\n-1.95642140281443055e-01\n-2.10381555924294028e-01\n-2.17177252463890441e-01\n-2.15471979336557318e-01\n-2.05438616794724666e-01\n-1.88022161615783334e-01\n-1.64868577154038604e-01\n-1.38136268572085830e-01\n-1.10211965423248598e-01\n-8.33788890997892440e-02\n-5.95030196215619936e-02\n-3.98052814787378667e-02\n-2.47696237075922393e-02\n-1.42020987787588714e-02\n-7.41434218881188017e-03\n-3.47102412490058430e-03\n-1.42811546371040231e-03\n-5.02298620706842676e-04\n-1.45054144937820491e-04\n-3.22585588726194018e-05\n-4.91317490276197182e-06\n-3.84552418330338954e-07\n0.0\n3.93137774268798761e-04\n1.52261605250810818e-03\n3.60263895659360166e-03\n6.80515304704034860e-03\n1.12734848051031789e-02\n1.71255867853220382e-02\n2.44522225275326070e-02\n3.33118155560684359e-02\n4.37227584741338854e-02\n5.56537734704193321e-02\n6.90129865052636349e-02\n8.36365909177827493e-02\n9.92782744239457809e-02\n1.15600921125701459e-01\n1.32172422414397112e-01\n1.48467664358946289e-01\n1.63878811206715463e-01\n1.77735767719071180e-01\n1.89338070571627659e-01\n1.97998350093068182e-01\n2.03095898002995184e-01\n2.04136855654372867e-01\n2.00815320281854753e-01\n1.93067631557158587e-01\n1.81110765957564146e-01\n1.65455720200860329e-01\n1.46888529681117569e-01\n1.26415410507330572e-01\n1.05174240526743776e-01\n8.43213993544498081e-02\n6.49094451357446478e-02\n4.77753945726218723e-02\n3.34597488727977760e-02\n2.21718568982282802e-02\n1.38080613939592298e-02\n8.01730614098737290e-03\n4.29778508709292937e-03\n2.10140385675213186e-03\n9.22806185520304713e-04\n3.56635262324477356e-04\n1.17965013073861560e-04\n3.20709143577216951e-05\n6.72077621698995896e-06\n9.65343594214609404e-07\n7.13058505412090433e-08\n3.56849102803939514e-02\n6.18080776691792774e-02\n7.97891162190728503e-02\n9.43851847367442043e-02\n1.06958770405051376e-01\n1.18106011737994648e-01\n1.28126177686122805e-01\n1.37168981303199905e-01\n1.45294584736425259e-01\n1.52502616629766330e-01\n1.58748485827165942e-01\n1.63954230545981350e-01\n1.68017237034696620e-01\n1.70818555511202008e-01\n1.72231770670026790e-01\n1.72132931170005971e-01\n1.70411700332323585e-01\n1.66983570803700271e-01\n1.61802656138252787e-01\n1.54874232109765891e-01\n1.46265875653897121e-01\n1.36115787341238109e-01\n1.24636749336973718e-01\n1.12114238550734102e-01\n9.88975512768146270e-02\n8.53834407694419734e-02\n7.19927107398125737e-02\n5.91413595817648213e-02\n4.72090609423343882e-02\n3.65087493398129001e-02\n2.72615715168455751e-02\n1.95812141008386009e-02\n1.34704962015685294e-02\n8.83119746229413249e-03\n5.48570252790594147e-03\n3.20672337221414132e-03\n1.74974355379961793e-03\n8.82434847968587249e-04\n4.06324907786609509e-04\n1.68188309235987589e-04\n6.13182838582439422e-05\n1.91480161333419670e-05\n4.91788373610970711e-06\n9.74187658079603989e-07\n1.32339932438314428e-07\n9.24953878827719669e-09\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n1.61209358962557635e-02\n2.79222800378758976e-02\n3.58705158480625008e-02\n4.16048844856492933e-02\n4.48145796327992577e-02\n4.44149286908469970e-02\n3.88846143669453748e-02\n2.66859736735079213e-02\n6.95995292709915281e-03\n-1.94741915052292110e-02\n-4.90011512080948675e-02\n-7.44963573151986441e-02\n-8.59117125296132850e-02\n-7.31800333992487367e-02\n-3.18406489571631673e-02\n3.00613580110648190e-02\n8.81760864774469300e-02\n1.07758027232155801e-01\n6.36345166706011878e-02\n-3.19775709189640406e-02\n-1.16651005253576731e-01\n-1.09883142932446068e-01\n7.71332431866365419e-03\n1.33714841099003445e-01\n1.10916738461859427e-01\n-6.95642157350538637e-02\n-1.68350522024694554e-01\n8.72211081793769841e-03\n1.95222452862689577e-01\n-6.44875876953811787e-03\n-2.23734792511103536e-01\n1.15274523916961635e-01\n1.70164055536562803e-01\n-3.24324435249283838e-01\n2.85949691658487493e-01\n-1.70491924010590684e-01\n7.62429970756964143e-02\n-2.67770107990213009e-02\n7.56631678646896202e-03\n-1.74273729462005931e-03\n3.29187814148754535e-04\n-5.10371019690731382e-05\n6.46978807841743947e-06\n-6.64720927878313834e-07\n5.45366401009141272e-08\n-3.49079689082634680e-09\n1.68050920657414398e-10\n0.0\n1.08472742381388542e-03\n4.20113124760565244e-03\n9.90251969648426981e-03\n1.84771170763622303e-02\n2.97864244518314635e-02\n4.29935124003884145e-02\n5.62502048776087268e-02\n6.64805016337743915e-02\n6.94951639769335328e-02\n6.07489836031443048e-02\n3.70087187849701890e-02\n-1.10930973807619473e-03\n-4.64683006843350233e-02\n-8.43432667407494757e-02\n-9.54507151085634276e-02\n-6.49196479072799287e-02\n4.37546628453371750e-03\n8.19387104591040999e-02\n1.16402125826386982e-01\n6.80514713575707669e-02\n-4.51112437681951695e-02\n-1.31643108854483243e-01\n-9.06119505406491887e-02\n6.35740425963955968e-02\n1.55664101856450132e-01\n3.25463011982652650e-02\n-1.61062963962556399e-01\n-9.14113873640488572e-02\n1.71651781820813254e-01\n9.17992460712520608e-02\n-2.26861122079491717e-01\n2.74638834186305171e-02\n2.38715686972268110e-01\n-3.27133758028667621e-01\n2.52461693632194173e-01\n-1.37970366908697711e-01\n5.77226737959510572e-02\n-1.91900278708997951e-02\n5.17285234812659821e-03\n-1.14295039404465238e-03\n2.07983783328855249e-04\n-3.11689067087047306e-05\n3.82973710685585953e-06\n-3.82261697502359940e-07\n3.05284349905734929e-08\n-1.90534375715001719e-09\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n0.0\n1.00359133478823128e-03\n3.88689252603289246e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991448053e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053231e-02\n-7.29895541743131038e-02\n-9.29116826117598743e-02\n-7.72595070966611563e-02\n-2.22245447520585879e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863601e-03\n-9.86239633238811253e-02\n-1.24796251290763105e-01\n-2.07804070260075892e-02\n1.22067940470319491e-01\n1.23206326186792239e-01\n-5.54670439705644280e-02\n-1.68875379811159715e-01\n3.75245106348211840e-03\n1.93023993845794301e-01\n-1.19717966648229535e-02\n-2.17726004401894130e-01\n1.26958605480194581e-01\n1.49005887423274919e-01\n-3.13853591570765533e-01\n2.90873821320642489e-01\n-1.81750236642559931e-01\n8.54436789782003353e-02\n-3.17120080971102294e-02\n9.53167269105451194e-03\n-2.35345015620891341e-03\n4.80917317576415012e-04\n-8.15438442288116973e-05\n1.14556023602873645e-05\n-1.32606007147865895e-06\n1.25221811336723241e-07\n1.49153584618683457e-02\n2.58341586690583533e-02\n3.32116220033398940e-02\n3.86332886759594846e-02\n4.19352060972970619e-02\n4.22859974032439578e-02\n3.84603343591978994e-02\n2.91354456526193781e-02\n1.33735769422543473e-02\n-8.66375493142443158e-03\n-3.48542512856126266e-02\n-6.03977488262974205e-02\n-7.77935527381273528e-02\n-7.82387419341025181e-02\n-5.50015082023350907e-02\n-8.46471169411797640e-03\n4.91546484099387587e-02\n9.33789301143741618e-02\n9.58451624442852868e-02\n4.24753634491716672e-02\n-4.65584996049522443e-02\n-1.13675365442407805e-01\n-9.62111172949675769e-02\n1.20719355238243353e-02\n1.22543885941845149e-01\n1.08867617260668043e-01\n-4.32122795008927710e-02\n-1.55525846583246780e-01\n-4.44856381102338994e-02\n1.56679204868118482e-01\n9.27910168036677058e-02\n-1.70832186850681106e-01\n-8.35132884230648936e-02\n2.25539034459329768e-01\n-4.43192212140972527e-02\n-2.19269242183261576e-01\n3.21854692028747169e-01\n-2.60382927692664190e-01\n1.49103608459653592e-01\n-6.56033227650734824e-02\n2.30603343843920165e-02\n-6.61577618876222143e-03\n1.56781788023063490e-03\n-3.08791591122134740e-04\n5.06329993144558912e-05\n-6.89739006530948644e-06\n7.75957347905364327e-07\n0.0\n9.31231485683844842e-04\n3.60664403551752165e-03\n8.50602400394743011e-03\n1.59003845831797719e-02\n2.57379331178475661e-02\n3.74429022893227603e-02\n4.96727203528299840e-02\n6.01209842233923000e-02\n6.55188921569585664e-02\n6.20485584438687510e-02\n4.63832477729648612e-02\n1.74258908623261995e-02\n-2.15613643306142161e-02\n-6.13677159501545139e-02\n-8.73740714402517632e-02\n-8.39387467098053758e-02\n-4.30735753536331950e-02\n2.54205416613475094e-02\n8.96319597240100990e-02\n1.06347499921705141e-01\n5.01739831038500242e-02\n-5.32299261477582539e-02\n-1.23700123221937186e-01\n-8.28396897050905634e-02\n5.28775536891419665e-02\n1.43085570967668135e-01\n5.61977132639890006e-02\n-1.23816025006342659e-01\n-1.28765238918000541e-01\n9.31608526655609698e-02\n1.63492650510471960e-01\n-1.06861882743380016e-01\n-1.62491258203189853e-01\n1.96459220801177115e-01\n4.41807868984753424e-02\n-2.70804866571578651e-01\n3.14111437351493494e-01\n-2.26653503225097558e-01\n1.19973760107670385e-01\n-4.96384679318986957e-02\n1.65764998398766558e-02\n-4.54921289332091763e-03\n1.03647975975097034e-03\n-1.97023114024812162e-04\n3.12759943322054074e-05\n-4.13512897658047135e-06\n1.43777569709036823e-02\n2.49030055724827754e-02\n3.20241391196138120e-02\n3.72974845929709142e-02\n4.06152788005424425e-02\n4.12469981680026535e-02\n3.80894651198374345e-02\n2.99194085582119990e-02\n1.57993522035044832e-02\n-4.31517771919780711e-03\n-2.88220876553819186e-02\n-5.37917648099696249e-02\n-7.27911056340623946e-02\n-7.78161961658435236e-02\n-6.18701345508866768e-02\n-2.31473894350238581e-02\n3.04712415862879657e-02\n7.95784299787587884e-02\n9.79793594835580844e-02\n6.62013595845414859e-02\n-1.01366735612324985e-02\n-9.00695223154068109e-02\n-1.12669303434310447e-01\n-4.35757786695337435e-02\n7.51257672109328783e-02\n1.31616512124327623e-01\n4.53222230867259615e-02\n-1.08967468118072036e-01\n-1.32009261740053396e-01\n4.32492143903082590e-02\n1.68583483747373308e-01\n-4.95860838620008817e-04\n-1.90872213046221789e-01\n1.82535323398421573e-02\n2.11291135878298647e-01\n-1.37916296458791499e-01\n-1.28093668673922245e-01\n3.02456209426122724e-01\n-2.94592455278820831e-01\n1.92516908675410825e-01\n-9.48536585280867484e-02\n3.70547561405223380e-02\n-1.17879528858417411e-02\n3.10082494277841292e-03\n-6.80272138348091983e-04\n1.24958469859075874e-04\n-1.92235153229379290e-05\n0.0\n8.66426047876463538e-04\n3.35565365414585304e-03\n7.91595443186592432e-03\n1.48087344997700106e-02\n2.40121934529898828e-02\n3.50470844842696166e-02\n4.67621537512332638e-02\n5.71499205368245639e-02\n6.33170572684077781e-02\n6.17867458580974652e-02\n4.93218215465441728e-02\n2.43605773602235155e-02\n-1.11229334776564402e-02\n-5.00111894640701410e-02\n-7.99363085556497183e-02\n-8.61829356817089554e-02\n-5.84006514799825793e-02\n3.58940229271265576e-04\n6.73683490995617001e-02\n1.04547897860755953e-01\n7.88234562069529410e-02\n-7.40196344776279571e-03\n-9.89024441009141164e-02\n-1.13935536049566369e-01\n-1.85003343808620747e-02\n1.09092261702378346e-01\n1.21812489170957272e-01\n-2.46754972581506374e-02\n-1.53724638749202225e-01\n-5.40369786385930598e-02\n1.52844124505638168e-01\n9.28820650589042701e-02\n-1.70534777188247499e-01\n-7.46582530336614147e-02\n2.23693329433823196e-01\n-6.04428648833161067e-02\n-1.99685494711561023e-01\n3.15424575779056748e-01\n-2.67266406173216786e-01\n1.60001492662411732e-01\n-7.37993799768198178e-02\n2.73166714884860579e-02\n-8.29850452905231233e-03\n2.09615300286298970e-03\n-4.43432899639588363e-04\n7.88025564412452625e-05\n1.38775648697449724e-02\n2.40366474397312631e-02\n3.09183377621478177e-02\n3.60490111676414621e-02\n3.93682703963120495e-02\n4.02329122084495935e-02\n3.76476648564842420e-02\n3.04822304831807549e-02\n1.78148421009825253e-02\n-5.49493293542485314e-04\n-2.34201922677135452e-02\n-4.75864694481853701e-02\n-6.75475920047422101e-02\n-7.61070537926066271e-02\n-6.63258441920554637e-02\n-3.49512536668404525e-02\n1.34896496799495943e-02\n6.41090628935063744e-02\n9.38543481969994764e-02\n8.10994029528368521e-02\n2.12923912733284856e-02\n-5.98341886274470006e-02\n-1.10030524303613111e-01\n-8.17948214705471743e-02\n1.99064348834268913e-02\n1.15539924196771865e-01\n1.02747525787105803e-01\n-2.93739624388079761e-02\n-1.40726818489345096e-01\n-7.11091390625596814e-02\n1.14989793442615507e-01\n1.32918431836318102e-01\n-8.91485418941185687e-02\n-1.61387508645473965e-01\n1.10055601921189961e-01\n1.53322920463849793e-01\n-2.00539513178817824e-01\n-2.47180275783601550e-02\n2.54306171643188861e-01\n-3.12462049808321207e-01\n2.35681064243560917e-01\n-1.30404129280908193e-01\n5.65779098157407415e-02\n-1.99041935781469233e-02\n5.78688143629751614e-03\n-1.40596016635309269e-03\n2.87177008469427150e-04\n0.0\n8.08158717046052427e-04\n3.12998525221171294e-03\n7.38517588327170307e-03\n1.38253136547159435e-02\n2.24522070799009071e-02\n3.28663636440817766e-02\n4.40769923445659823e-02\n5.43310589409567862e-02\n6.10631571909366136e-02\n6.11141028797888425e-02\n5.13829169828241838e-02\n3.00123725526079445e-02\n-1.99912994482635701e-03\n-3.92489747482939397e-02\n-7.14187194125988217e-02\n-8.50885032516274786e-02\n-6.88163730300261622e-02\n-2.08639646772202890e-02\n4.38628652298715602e-02\n9.38928442952258330e-02\n9.42769155959765348e-02\n3.17951937578213190e-02\n-6.21820075587810883e-02\n-1.16966781135837264e-01\n-7.26997973932371477e-02\n4.94382447389557292e-02\n1.32194173660675596e-01\n6.57987502015832393e-02\n-9.54888548566394380e-02\n-1.38115369755263701e-01\n3.28530169589810947e-02\n1.67792262577584173e-01\n1.30048598519540322e-03\n-1.88742917032355018e-01\n2.51320700294409873e-02\n2.04395447077393155e-01\n-1.48084470748199609e-01\n-1.07469419972157892e-01\n2.90187863306507421e-01\n-2.97112530173561318e-01\n2.02734638421643021e-01\n-1.04415765766956173e-01\n4.27882762553347673e-02\n-1.43458780594402889e-02\n3.99957804098033994e-03\n-9.36072969103644696e-04\n1.34110127881086304e-02\n2.32285555299600946e-02\n2.98861096331219864e-02\n3.48797903286420657e-02\n3.81892509438885516e-02\n3.92471961570468458e-02\n3.71538855576931809e-02\n3.08652501074809099e-02\n1.94853986778458672e-02\n2.71067873746164882e-03\n-1.85941532762538657e-02\n-4.18117302436171387e-02\n-6.22489988901682861e-02\n-7.34866803431243470e-02\n-6.88454166100372772e-02\n-4.41692614009656162e-02\n-1.44841387715314261e-03\n4.82920281130646833e-02\n8.54732685648188079e-02\n8.84366324672540005e-02\n4.60942735320449687e-02\n-2.84199234080894543e-02\n-9.42883481558348668e-02\n-1.01381530694854588e-01\n-2.96036307321368673e-02\n7.66130899155484102e-02\n1.22433432358313041e-01\n4.51895303383579236e-02\n-9.32860801146465218e-02\n-1.30432985693500231e-01\n8.20081647245840192e-03\n1.50931313952066937e-01\n6.15593903887133378e-02\n-1.49611795355553995e-01\n-9.18975924443427017e-02\n1.70628126287937915e-01\n6.53279145553821994e-02\n-2.21263245040524553e-01\n7.57862897670397162e-02\n1.80014809838723033e-01\n-3.07891894936624999e-01\n2.73094854242896423e-01\n-1.70599777952111453e-01\n8.22652340157301598e-02\n-3.19530779062882214e-02\n1.02346478147718016e-02\n-2.74111877930390208e-03\n0.0\n7.55580674177958088e-04\n2.92635136780740410e-03\n6.90602823174111136e-03\n1.29363680045465525e-02\n2.10377527715067229e-02\n3.08769142065267628e-02\n4.15983012709417177e-02\n5.16662597556321462e-02\n5.88018512058396600e-02\n6.01380803537828260e-02\n5.27365683991182499e-02\n3.45667684750823531e-02\n5.89506510214803103e-03\n-2.92677402838008131e-02\n-6.24164449775529082e-02\n-8.15795086850461260e-02\n-7.50798769603488736e-02\n-3.79478116654910491e-02\n2.12329082328763345e-02\n7.78176140880913053e-02\n9.85944103442710496e-02\n6.11663686283980823e-02\n-2.27623204892539906e-02\n-9.97517362708940508e-02\n-1.02888975647598330e-01\n-1.20807772356385044e-02\n1.01582889876540197e-01\n1.16455688985607000e-01\n-7.60802520064056756e-03\n-1.36066899819119957e-01\n-8.31901156118688978e-02\n1.06895867899210920e-01\n1.35737520974243797e-01\n-8.63405465704254749e-02\n-1.58776544268614123e-01\n1.13751801022942287e-01\n1.43732344473555596e-01\n-2.03879523732790890e-01\n-5.87813645586741148e-03\n2.37333327515637627e-01\n-3.09606577797861660e-01\n2.43865118345373583e-01\n-1.40754229730062935e-01\n6.38575916187407028e-02\n-2.35823506107580225e-02\n7.23186420757998723e-03\n1.29750775244896390e-02\n2.24734935045610672e-02\n2.89209525699630141e-02\n3.37833493208083979e-02\n3.70742907687622372e-02\n3.82927089055681222e-02\n3.66236175280203399e-02\n3.11025026361487107e-02\n2.08657777440680731e-02\n5.53277658146090687e-03\n-1.42898365305238507e-02\n-3.64746925292430968e-02\n-5.70245699567550543e-02\n-7.02462345976111457e-02\n-6.98385019475515345e-02\n-5.11349179372999826e-02\n-1.42481712808610311e-02\n3.30020024158706946e-02\n7.44617441187317292e-02\n8.97309826794051996e-02\n6.39817702867162136e-02\n6.62650675803274866e-04\n-7.10503746229384503e-02\n-1.04849768772865157e-01\n-6.65172480142566525e-02\n2.96536134650494110e-02\n1.11009312541496236e-01\n9.45772287536190137e-02\n-2.38280938904895101e-02\n-1.28237511236443502e-01\n-8.24600076366149015e-02\n8.23330443122473887e-02\n1.42179418468557361e-01\n-2.41579373594355898e-02\n-1.66719174722272184e-01\n-1.84965819478157879e-03\n1.86603186837826424e-01\n-3.24701794950492464e-02\n-1.97021977218085731e-01\n1.57413153067944594e-01\n8.71847353122356117e-02\n-2.77116865597267392e-01\n2.98453018589702745e-01\n-2.12355900608379666e-01\n1.14075915336482522e-01\n-4.88938005768105727e-02\n1.72142831042326819e-02\n0.0\n7.08053642242683127e-04\n2.74227996462741638e-03\n6.47275369663456203e-03\n1.21315734860544307e-02\n1.97537071757412953e-02\n2.90610949285178659e-02\n3.93126127159391867e-02\n4.91588446997349438e-02\n5.65711102672892333e-02\n5.89487050800052911e-02\n5.35283543025084491e-02\n3.81935974972225784e-02\n1.26678143055568015e-02\n-2.01590000940260264e-02\n-5.33543278869355181e-02\n-7.64124609012643563e-02\n-7.79732132505869813e-02\n-5.10271764439052949e-02\n7.46914711252864112e-04\n5.90541567717988158e-02\n9.44088387957481290e-02\n8.01203630231290542e-02\n1.32892038210894441e-02\n-7.08499128531068362e-02\n-1.10306234041020662e-01\n-6.09706306247069438e-02\n5.06106422575781645e-02\n1.23466561016545157e-01\n6.74852325136965636e-02\n-7.65727109131866951e-02\n-1.35676014780123477e-01\n-6.19172027947532694e-03\n1.47642598337339725e-01\n6.73797309642492209e-02\n-1.47002552892000926e-01\n-9.00212750736125999e-02\n1.71013852060066168e-01\n5.56222893654551437e-02\n-2.18238754575072941e-01\n9.03062626906375315e-02\n1.60355480858358795e-01\n-2.99369903164380002e-01\n2.77907807532133122e-01\n-1.80870119501619159e-01\n9.09700524668295707e-02\n-3.69668777211473246e-02\n1.25732621622760207e-02\n2.17775288819453891e-02\n2.80308709222091834e-02\n3.27699693647542853e-02\n3.60373079413849121e-02\n3.73895906228561420e-02\n3.60868358107150414e-02\n3.12372410078714871e-02\n2.20129095100957996e-02\n7.97987992387394138e-03\n-1.04594367351845477e-02\n-3.15817294826476538e-02\n-5.19855336517723587e-02\n-6.66402756684222469e-02\n-6.96823505537433330e-02\n-5.62111380338998351e-02\n-2.49819742039703932e-02\n1.87840668390993927e-02\n6.20960909358356378e-02\n8.65120242782412979e-02\n7.54878717010015049e-02\n2.54822166192934692e-02\n-4.48152421824997010e-02\n-9.62505322945594044e-02\n-8.89009992674481692e-02\n-1.47422701775551564e-02\n7.99340139814883055e-02\n1.14001062327241220e-01\n4.06105836731606093e-02\n-8.42460070913175763e-02\n-1.25007545810683435e-01\n-1.19713002899392504e-02\n1.30076285398250280e-01\n9.29510423553735060e-02\n-9.97099519970873482e-02\n-1.37621323469368895e-01\n8.46142688515754970e-02\n1.55851032749657725e-01\n-1.17846540686049578e-01\n-1.33897937584222582e-01\n2.06566063308359166e-01\n-1.22110745154757980e-02\n-2.20228700716481124e-01\n3.05902649746583488e-01\n-2.51416950962075392e-01\n1.51103330633467425e-01\n-7.15075594831950517e-02\n0.0\n6.66140648790473021e-04\n2.57995163899730606e-03\n6.09056241311473675e-03\n1.14210781107132626e-02\n1.86179776212912762e-02\n2.74490399889977012e-02\n3.72692936737419808e-02\n4.68874185789298695e-02\n5.44905402031816699e-02\n5.77152131901490853e-02\n5.39721891838839188e-02\n4.11171177554442088e-02\n1.84747193326435695e-02\n-1.19590475101685797e-02\n-4.45881890538889214e-02\n-7.02962237442771865e-02\n-7.83570138999823695e-02\n-6.05887094901643580e-02\n-1.69969899907669864e-02\n3.96510876229685533e-02\n8.44375887448573503e-02\n8.97363514276198759e-02\n4.27741266812276186e-02\n-3.75148360770671957e-02\n-1.00251946373177969e-01\n-9.14767062742008752e-02\n-3.14778351434973243e-03\n9.79254107496120574e-02\n1.09782951105646634e-01\n3.67489855973713220e-04\n-1.21416757483698692e-01\n-9.60302121747795556e-02\n6.99773300554754063e-02\n1.45106148134335949e-01\n-1.68883150165736878e-02\n-1.65918778948789203e-01\n-1.55821746281679246e-03\n1.84920219601103608e-01\n-3.99666410870369998e-02\n-1.89890193865055235e-01\n1.66116207884355022e-01\n6.80320887394067625e-02\n-2.64669055941406550e-01\n2.99949121372375060e-01\n-2.22240370206916921e-01\n1.24263483749445958e-01\n1.22637526699549519e-02\n2.12414427158204508e-02\n2.73457927920830561e-02\n3.19925330696530230e-02\n3.52492290202095007e-02\n3.67213415387717054e-02\n3.57322277049797188e-02\n3.14524325830049106e-02\n2.30874296750287755e-02\n1.01652841281724016e-02\n-7.07260666481262287e-03\n-2.72306632329082782e-02\n-4.74036594833254638e-02\n-6.31376977199867989e-02\n-6.90035363101141469e-02\n-6.00327551029110548e-02\n-3.40117676595099935e-02\n5.89951338513391901e-03\n4.94761269870062081e-02\n8.04709711989203824e-02\n8.19337692146251129e-02\n4.55431939885302464e-02\n-1.87494103954555201e-02\n-8.00483278363751244e-02\n-9.83061052279217973e-02\n-5.08958983169417803e-02\n4.03149327419934922e-02\n1.08288015385120812e-01\n8.58620105994820082e-02\n-2.36080519617876960e-02\n-1.19555894048581066e-01\n-8.62813110534082633e-02\n5.99666157016379778e-02\n1.39383455967071301e-01\n1.92712812331376979e-02\n-1.45042058359492965e-01\n-7.29381261415202736e-02\n1.45704424669826083e-01\n8.89158517742883875e-02\n-1.72609640322185592e-01\n-4.72993915088835565e-02\n2.16834153968635035e-01\n-1.03448560557060532e-01\n-1.44577942687627387e-01\n2.95020517589677123e-01\n-2.86008266167864789e-01\n1.93466149438880936e-01\n0.0\n6.35477563915692097e-04\n2.46119402193393459e-03\n5.81105332088737662e-03\n1.09020641385055867e-02\n1.77905174203132760e-02\n2.62807913570785659e-02\n3.58039375624963491e-02\n4.52935070748825205e-02\n5.31077128986333288e-02\n5.70731432168991720e-02\n5.47444134852808073e-02\n4.39661623349247854e-02\n2.37605815867933251e-02\n-4.58120943207909141e-03\n-3.65544718271877331e-02\n-6.42490259767587585e-02\n-7.76478580516281464e-02\n-6.79173670445295391e-02\n-3.23445596577092154e-02\n2.08877575144483414e-02\n7.14270434998971609e-02\n9.26064158929291170e-02\n6.54313551980563873e-02\n-4.47809940678803742e-03\n-7.93404940916731943e-02\n-1.04738495137303461e-01\n-4.94568652784966589e-02\n5.48496047776058579e-02\n1.18356804437019708e-01\n6.65133306249525436e-02\n-6.54279289113081919e-02\n-1.31697635992915008e-01\n-3.10958890330154461e-02\n1.24700842613798643e-01\n1.03887802744408286e-01\n-9.34688182631735753e-02\n-1.42613948342347058e-01\n8.30170565025020318e-02\n1.57508974846782362e-01\n-1.21934411255204891e-01\n-1.30470201939021674e-01\n2.12391469868999316e-01\n-2.34665441675848858e-02\n-2.16975589093747118e-01\n3.16456740014139593e-01\n-2.69632718636203528e-01\n1.22274976847691376e-02\n2.11786472394509644e-02\n2.72695755647464795e-02\n3.19253125702351620e-02\n3.52376911164154830e-02\n3.68489177638049517e-02\n3.61272448232623292e-02\n3.22853863245461808e-02\n2.45476786419457707e-02\n1.24062426925415029e-02\n-4.02696636737900036e-03\n-2.36124011417763527e-02\n-4.38297157234537396e-02\n-6.06737164717101665e-02\n-6.90595553618998936e-02\n-6.39805951399830958e-02\n-4.24791887135259755e-02\n-6.07555511154675779e-03\n3.73117147951444739e-02\n7.34866694931508441e-02\n8.56890516525448398e-02\n6.22823465097138845e-02\n6.14414530427046402e-03\n-5.98626731248599608e-02\n-9.85188713743814504e-02\n-7.83812255838138017e-02\n-9.77580083577112707e-04\n8.56088333156210385e-02\n1.09811394372869006e-01\n3.64192816660233801e-02\n-8.08652035522359897e-02\n-1.23363614873485919e-01\n-2.61297682094017054e-02\n1.14420579475839140e-01\n1.12840558957931547e-01\n-5.63909052991757309e-02\n-1.53208059157602799e-01\n5.38150076870227024e-03\n1.71336754860898555e-01\n8.50572310020983324e-03\n-1.91776802494305093e-01\n3.88141708923092910e-02\n1.98648600416456100e-01\n-1.73262355406773705e-01\n-7.57853470604772789e-02\n2.91776562652156679e-01\n-3.37396991464930573e-01\n0.0\n6.22938991329047786e-04\n2.41263233912064872e-03\n5.69719405324275920e-03\n1.06932924513454472e-02\n1.74674025709803393e-02\n2.58522974885046150e-02\n3.53343311109841907e-02\n4.49353465628086479e-02\n5.31318055872154055e-02\n5.78770634047642979e-02\n5.68113490321808523e-02\n4.77413928342949115e-02\n2.94241115789230026e-02\n2.57233778753846332e-03\n-2.91919669585564770e-02\n-5.89426313954975814e-02\n-7.72745218848936433e-02\n-7.48972687920896191e-02\n-4.69394165641406486e-02\n2.27491184880820397e-03\n5.66465021777877442e-02\n9.13272008739771657e-02\n8.33824812380744296e-02\n2.76188502788603171e-02\n-5.14401477050561995e-02\n-1.04405304539871638e-01\n-8.59721353752841422e-02\n3.68695888139984954e-03\n9.95983323209118643e-02\n1.10662957595678679e-01\n8.41956097886367022e-03\n-1.13935358343913398e-01\n-1.10734556476243834e-01\n3.82687464863305585e-02\n1.48666674969271079e-01\n4.27221562777946179e-02\n-1.45514677750274490e-01\n-9.41580011496732233e-02\n1.44958072498197810e-01\n1.09679091296076558e-01\n-1.77180518610203563e-01\n-6.96100643257005491e-02\n2.37249024957858518e-01\n-8.66375446506368468e-02\n-2.07089824247484039e-01\n3.81902443393037250e-01\n1.25242073937169556e-02\n2.16925635304475554e-02\n2.79359892248346592e-02\n3.27277885460471527e-02\n3.61868951506178690e-02\n3.79831385157736179e-02\n3.75136711211335877e-02\n3.40143271358219826e-02\n2.67116858990861343e-02\n1.50557495121139712e-02\n-9.56759418206414654e-04\n-2.03986377201964553e-02\n-4.10585300264500602e-02\n-5.92832007936688055e-02\n-7.02466927349316150e-02\n-6.88815776296261839e-02\n-5.15793913309595675e-02\n-1.84422195359892800e-02\n2.46510331625761220e-02\n6.54525669219431783e-02\n8.77224681586205035e-02\n7.73832754264974360e-02\n3.12790195422439701e-02\n-3.55931387137143063e-02\n-9.07926160453340209e-02\n-9.81970728179349522e-02\n-4.25684360655817218e-02\n4.92650012286101613e-02\n1.12736827305290568e-01\n8.79983068796035828e-02\n-1.97665889025595877e-02\n-1.19144124620218991e-01\n-1.00897695273291177e-01\n3.64865909094470378e-02\n1.42420544823826600e-01\n6.63300706094399617e-02\n-1.15027896437798538e-01\n-1.34423277095573446e-01\n7.30332316505962753e-02\n1.70199080559230886e-01\n-5.81328753307472079e-02\n-1.91207134729702105e-01\n9.85684810869029565e-02\n1.86957072266925900e-01\n-2.14935099108815975e-01\n-7.82864093479321982e-02\n3.95285738121623487e-01\n0.0\n6.20918857967169132e-04\n2.40480839625297448e-03\n5.67952636528705739e-03\n1.06650266814954566e-02\n1.74390049601559245e-02\n2.58596679778037297e-02\n3.54599524497940591e-02\n4.53340356576376752e-02\n5.40533068977888179e-02\n5.96699050917050208e-02\n5.98839560615846145e-02\n5.24522078627467983e-02\n3.58809570532144170e-02\n1.03534355474483517e-02\n-2.13192186366644200e-02\n-5.31407844008611255e-02\n-7.63534556306542794e-02\n-8.14062502314600173e-02\n-6.16219973708194840e-02\n-1.77955590205202616e-02\n3.83213334637432165e-02\n8.46819792618886957e-02\n9.63442676145808558e-02\n5.92003590742280206e-02\n-1.58261139772120328e-02\n-8.91281092554971621e-02\n-1.09577030336167960e-01\n-5.09158618862617166e-02\n5.49362022661385174e-02\n1.23715146560931855e-01\n8.22885187594042805e-02\n-4.78891576265234251e-02\n-1.38444413195777022e-01\n-7.25706120527560700e-02\n9.40851058169814847e-02\n1.47473159901683498e-01\n-1.47732253245448607e-02\n-1.71396858494007265e-01\n-4.78779919542031626e-02\n1.80519317277596208e-01\n7.46221146582335682e-02\n-2.08580823938053161e-01\n-4.94863604269130189e-02\n2.66869856845281084e-01\n-6.56267993527144128e-02\n-3.78592657048227033e-01\n1.29599623812442603e-02\n2.24473133084963916e-02\n2.89129633796520180e-02\n3.38960482737597421e-02\n3.75461302737592345e-02\n3.95603653161844676e-02\n3.93627125244521633e-02\n3.62093897420331587e-02\n2.93271491454744418e-02\n1.81240710209603223e-02\n2.48553814681223145e-03\n-1.68659802608190149e-02\n-3.80202068663557657e-02\n-5.76766759335603854e-02\n-7.12928623921286336e-02\n-7.38048390861733156e-02\n-6.10600858515785716e-02\n-3.18568263875988189e-02\n9.94131292684659156e-03\n5.42575763779647793e-02\n8.59875651856230466e-02\n8.95793178472572421e-02\n5.67054753738708353e-02\n-5.69923828876598045e-03\n-7.22795185707619942e-02\n-1.06673650458061459e-01\n-8.10335604561597533e-02\n1.53015064436865753e-04\n8.97618529728741593e-02\n1.19517579510561286e-01\n5.24521916680238259e-02\n-6.90033326003647446e-02\n-1.35453297988586796e-01\n-6.56136908136704389e-02\n8.63294081740096919e-02\n1.48247355194618097e-01\n2.06834812319970154e-02\n-1.50369554245905229e-01\n-1.10736407374520035e-01\n1.15684006150044316e-01\n1.66130171768926499e-01\n-9.15810814851175242e-02\n-2.01347249230753061e-01\n1.09664976495856423e-01\n2.30167400087504970e-01\n-1.94861691825099020e-01\n-3.39089515001605724e-01\n0.0\n6.18976194713105805e-04\n2.39728449382269840e-03\n5.66258847645881389e-03\n1.06382596834305870e-02\n1.74135315632736112e-02\n2.58727483681989272e-02\n3.55968852603546909e-02\n4.57553358210257069e-02\n5.50199133327059151e-02\n6.15515032203945642e-02\n6.31268584256773901e-02\n5.74778170474235725e-02\n4.28913970635673020e-02\n1.90479939330307595e-02\n-1.20557740392230155e-02\n-4.54316634173163661e-02\n-7.31738115348384566e-02\n-8.58280430686874374e-02\n-7.53565739054818523e-02\n-3.93248341286305050e-02\n1.51284597335986613e-02\n7.00407686353457792e-02\n1.00818342860652721e-01\n8.69244851571736726e-02\n2.60725415458574368e-02\n-5.62081838521553481e-02\n-1.12208893543362942e-01\n-9.80958592279054103e-02\n-1.04270975017213760e-02\n9.45718324302932956e-02\n1.28870006724145669e-01\n4.67458452381748005e-02\n-9.07993486237152481e-02\n-1.44442978216001661e-01\n-3.55643124044303094e-02\n1.29570707823213366e-01\n1.38760289835099720e-01\n-5.11938842812498657e-02\n-1.84741253325214544e-01\n-2.92836787875805811e-02\n1.99502596660546289e-01\n8.58004783564029622e-02\n-2.21592675169682035e-01\n-1.22707048300394791e-01\n2.88102399796907493e-01\n2.86269393571689457e-01\n1.34273940223102739e-02\n2.32569286598880258e-02\n2.99611228468202873e-02\n3.51502117982045031e-02\n3.90075195155036580e-02\n4.12610054929589756e-02\n4.13657637633933623e-02\n3.86036990170352187e-02\n3.22078438968434258e-02\n2.15505702445724714e-02\n6.41045353667194298e-03\n-1.26957506265364724e-02\n-3.41724286784100412e-02\n-5.51091961040317477e-02\n-7.13217164270893988e-02\n-7.78715732534899230e-02\n-7.02226710115134850e-02\n-4.60180356281993663e-02\n-7.12885569080200492e-03\n3.88168553759530299e-02\n7.85959291575606817e-02\n9.63893302266440877e-02\n7.99486041000894571e-02\n2.84577504900773229e-02\n-4.17260717694659389e-02\n-9.87486574574194392e-02\n-1.08111763705168520e-01\n-5.43582890942745436e-02\n4.00139484359146244e-02\n1.16142646321620274e-01\n1.12180150704932854e-01\n1.60567305475667818e-02\n-1.04085143825151327e-01\n-1.37609945751150653e-01\n-3.37919634952242101e-02\n1.18162597377182113e-01\n1.47044943647563181e-01\n-6.92099457891340655e-03\n-1.69273975438276492e-01\n-1.06170056002167182e-01\n1.29191091058575597e-01\n1.84997119906157304e-01\n-7.39018979237391488e-02\n-2.44361497695569169e-01\n1.91527987132099689e-02\n3.36085070474535841e-01\n2.28993061317338931e-01\n0.0\n6.14760570951646966e-04\n2.38095745320069177e-03\n5.62487411776177188e-03\n1.05725648268187398e-02\n1.73247261855549450e-02\n2.57928713946954241e-02\n3.56088765006547237e-02\n4.60231584079992678e-02\n5.58183528662045819e-02\n6.32813204224958459e-02\n6.62919919976073108e-02\n6.25945967392889935e-02\n5.03022066878205387e-02\n2.86334988036568289e-02\n-1.22115096352975560e-03\n-3.53553775935822392e-02\n-6.69343694640790049e-02\n-8.70105365635270717e-02\n-8.67486934609759397e-02\n-6.09934816852748946e-02\n-1.22908638612909127e-02\n4.65176742504008339e-02\n9.36196486025800273e-02\n1.05345293638570495e-01\n6.83750832231092703e-02\n-7.90978872922197887e-03\n-8.77268394369624671e-02\n-1.22140746617902876e-01\n-7.91191386139896702e-02\n2.50186005140378108e-02\n1.20394843983122335e-01\n1.25051644732618705e-01\n1.79043021019857571e-02\n-1.17650202770063134e-01\n-1.45761001203210949e-01\n-1.53091244565342222e-02\n1.47842724730861214e-01\n1.42771373145208658e-01\n-5.55144342315285200e-02\n-2.00177092542284552e-01\n-6.14693000592726815e-02\n1.98203206215529809e-01\n1.75574842565319744e-01\n-1.55899804875682529e-01\n-3.40699308543457258e-01\n-1.74106244674673644e-01\n1.39286835552675584e-02\n2.41251876002725150e-02\n3.10853801010896047e-02\n3.64962576550115214e-02\n4.05783155593178319e-02\n4.30941447050758319e-02\n4.35348129296804082e-02\n4.12139998974819580e-02\n3.53783650796957241e-02\n2.53727312390691281e-02\n1.08763391567313298e-02\n-7.79663700504180761e-03\n-2.93738058958847061e-02\n-5.13675279863848311e-02\n-7.00254195390081352e-02\n-8.06656359624694508e-02\n-7.85582127920437107e-02\n-6.04013154314134229e-02\n-2.61981595358452765e-02\n1.90211147846022395e-02\n6.45629755457248766e-02\n9.56080857782289073e-02\n9.76317042530238238e-02\n6.32354467879026327e-02\n-9.74111230361870474e-04\n-7.16647919932822397e-02\n-1.14681134595051720e-01\n-1.01003226907287164e-01\n-2.74577593010168139e-02\n7.07995973774942916e-02\n1.31097952082514374e-01\n1.01788142795123104e-01\n-1.05076797203540427e-02\n-1.25437357923945725e-01\n-1.38654451180879434e-01\n-1.87687479305527760e-02\n1.33557354171798454e-01\n1.55225482206088172e-01\n-3.27486374593241245e-03\n-1.77244857878167655e-01\n-1.40090140275432595e-01\n9.73168232448609755e-02\n2.32633645572619840e-01\n4.59836539683248086e-02\n-2.57411612456843852e-01\n-3.11567804042777508e-01\n-1.26033506439949178e-01\n0.0\n6.08379627446065411e-04\n2.35624416527048389e-03\n5.56735699646894976e-03\n1.04697046168719058e-02\n1.71752319003484651e-02\n2.56232957457333300e-02\n3.54988650527859328e-02\n4.61381555481869196e-02\n5.64437390417458634e-02\n6.48445738732372351e-02\n6.93503825906684468e-02\n6.77581166478661012e-02\n5.80609695554908031e-02\n3.90748203731299676e-02\n1.12216000229688959e-02\n-2.27081378887380586e-02\n-5.71302726987933385e-02\n-8.40028758943646425e-02\n-9.43253450196519933e-02\n-8.09432961263105155e-02\n-4.22277072465312708e-02\n1.46241976889253979e-02\n7.26708518615258037e-02\n1.08782881604735815e-01\n1.02495542280211557e-01\n4.80532336329335466e-02\n-3.62257256005287243e-02\n-1.09364650691276280e-01\n-1.25375196663361443e-01\n-6.31329236920965403e-02\n4.87149303762443933e-02\n1.35977068967676029e-01\n1.24583982622162429e-01\n6.48921420594416112e-03\n-1.29949524906182778e-01\n-1.55819976680800193e-01\n-2.47486079573679719e-02\n1.48626239515768171e-01\n1.72789910397256191e-01\n-8.53205087406367496e-03\n-2.05926380913143192e-01\n-1.68501319939925731e-01\n9.86062432032202008e-02\n3.09310462503906092e-01\n2.61789116608440287e-01\n8.69277730636717622e-02\n1.44820528169079601e-02\n2.50836512767805657e-02\n3.23264626509046984e-02\n3.79822912391785950e-02\n4.23128314207581457e-02\n4.51193445017414874e-02\n4.59338180204276678e-02\n4.41080186061196533e-02\n3.89102210318667263e-02\n2.96673611341241074e-02\n1.59697624669956316e-02\n-2.06285460341239148e-03\n-2.34825161650315563e-02\n-4.62479016688496156e-02\n-6.71042891163271121e-02\n-8.17569833654680778e-02\n-8.54909026447029513e-02\n-7.43256361585380998e-02\n-4.66314690936828133e-02\n-4.85973823247429649e-03\n4.32886491974680404e-02\n8.51783353050687142e-02\n1.05889265317986661e-01\n9.34113692292894704e-02\n4.52816253905997737e-02\n-2.61257591835141884e-02\n-9.36150499624596177e-02\n-1.23742570480618444e-01\n-9.35020945655650471e-02\n-8.42031141357292394e-03\n9.02533300583587966e-02\n1.40919783891684275e-01\n9.96310646548300288e-02\n-1.93544477342190609e-02\n-1.35397286995244615e-01\n-1.49998778501174740e-01\n-3.23204711517750473e-02\n1.29161858312520555e-01\n1.80779961931441135e-01\n4.93404496652598001e-02\n-1.53878275805620301e-01\n-2.13644570619332369e-01\n-3.81238170754380143e-02\n2.16844393908859678e-01\n3.12761957195620999e-01\n2.04152358785942428e-01\n5.71299062324753526e-02\n0.0\n5.99747736827228547e-04\n2.32281299665744456e-03\n5.48924288239408843e-03\n1.03281209974437471e-02\n1.69622592852644548e-02\n2.53592148205955131e-02\n3.52586998397726378e-02\n4.60867105167956925e-02\n5.68739204192596978e-02\n6.62067785827322730e-02\n7.22517685375188845e-02\n7.29019859784446334e-02\n6.60933406547988406e-02\n5.03155539382831515e-02\n2.52908013777315352e-02\n-7.29447516719628278e-03\n-4.32326111252584952e-02\n-7.57479895688259602e-02\n-9.63344507625981672e-02\n-9.67340084309948611e-02\n-7.19622961728057370e-02\n-2.36885213821804164e-02\n3.74247921782216789e-02\n9.22697416704728879e-02\n1.18250924190231449e-01\n9.86026663264411296e-02\n3.32312091185815450e-02\n-5.47032805454580884e-02\n-1.23192741585505541e-01\n-1.29968233959752683e-01\n-5.97417066919434386e-02\n5.58048257807895187e-02\n1.44938218143097375e-01\n1.37647918262274127e-01\n2.30017504244522317e-02\n-1.22961357384915398e-01\n-1.79022264524255487e-01\n-7.91445778761780405e-02\n1.08303621715090420e-01\n2.15321560631045350e-01\n1.23587621866626376e-01\n-1.07087023748435109e-01\n-2.84635537753505197e-01\n-2.79686257573639852e-01\n-1.48628315798581823e-01\n-3.57608613057116415e-02\n1.51068274957501386e-02\n2.61657927638177489e-02\n3.37275994787208586e-02\n3.96595347969114914e-02\n4.42693585645994037e-02\n4.74015406508147136e-02\n4.86344105192344847e-02\n4.73647953317804515e-02\n4.28916844205612588e-02\n3.45357337607570605e-02\n2.18120714405636747e-02\n4.65936161624640188e-03\n-1.62923385776799941e-02\n-3.94617187969752911e-02\n-6.21473977065917227e-02\n-8.05678991810312023e-02\n-9.02444581955117453e-02\n-8.68335963435017122e-02\n-6.74183058860100132e-02\n-3.20806696022735635e-02\n1.46793862560215104e-02\n6.33708398322713196e-02\n1.00583687157228957e-01\n1.12269296031607055e-01\n8.90458229959638636e-02\n3.21136098596014954e-02\n-4.29646123714811298e-02\n-1.07965900327114894e-01\n-1.31367180117183541e-01\n-9.39819809921009081e-02\n-4.33597781159510663e-03\n9.66662549933351573e-02\n1.50648656219617122e-01\n1.15169600305918926e-01\n-1.07936609976702017e-03\n-1.28826447300022656e-01\n-1.74163335600822006e-01\n-8.80111686195125531e-02\n8.03828277481565823e-02\n2.02157008433603347e-01\n1.66063354855630174e-01\n-1.93359570459338478e-02\n-2.21248131523246072e-01\n-2.98177244945124431e-01\n-2.26331270319528044e-01\n-1.01354223320495415e-01\n-2.13011927517763149e-02\n0.0\n5.88509113738042394e-04\n2.27928599659872480e-03\n5.38726382015605569e-03\n1.01415950029143023e-02\n1.66753401543458316e-02\n2.49842736238290626e-02\n3.48640053337894093e-02\n4.58336242942172442e-02\n5.70593242212513660e-02\n6.72999518877653857e-02\n7.49063007098484807e-02\n7.79142716489680670e-02\n7.42737671750704903e-02\n6.22433741833550644e-02\n4.09476826070493197e-02\n1.10338280798659982e-02\n-2.47216012025680623e-02\n-6.10984032692445875e-02\n-9.07203163031004844e-02\n-1.05232263911695517e-01\n-9.74803510302470894e-02\n-6.44357453704568484e-02\n-1.00681017941347348e-02\n5.31582150377571117e-02\n1.05699856738351430e-01\n1.26276485389104937e-01\n1.00632244230413032e-01\n3.08851171485871913e-02\n-5.95273329214695904e-02\n-1.30600977031970378e-01\n-1.42289922703945831e-01\n-7.79610142530982597e-02\n3.78174806073446196e-02\n1.42443818671944639e-01\n1.66467522248313904e-01\n8.07633453087675396e-02\n-7.14786876782183694e-02\n-1.89893486795968625e-01\n-1.82141498405540087e-01\n-3.70475753718120457e-02\n1.57654848837698536e-01\n2.79667972364529838e-01\n2.69068928944528107e-01\n1.67766737800961102e-01\n6.48482071927184989e-02\n1.20580071658133274e-02\n1.58288340929658849e-02\n2.74163448735953372e-02\n3.53465750088678074e-02\n4.15965235954234500e-02\n4.65260768633570659e-02\n5.00282247475077324e-02\n5.17338220417102798e-02\n5.10927195679089646e-02\n4.74452208999878514e-02\n4.01197298883618284e-02\n2.85738238215987941e-02\n1.25846745381807002e-02\n-7.51992311785522859e-03\n-3.06199430692800124e-02\n-5.46086030863236829e-02\n-7.63320827165261395e-02\n-9.17718752809784516e-02\n-9.65748023813050305e-02\n-8.69872962290939022e-02\n-6.11391318239873013e-02\n-2.04444458207238416e-02\n2.93262596235966642e-02\n7.79237372536400186e-02\n1.12076854462555608e-01\n1.18857607052022918e-01\n9.05843298338203512e-02\n2.98775535742394557e-02\n-4.74901835160467245e-02\n-1.14595266821298572e-01\n-1.41736678749121714e-01\n-1.09855252549067930e-01\n-2.37995990971755153e-02\n8.25946562337093598e-02\n1.56585603468581330e-01\n1.51945108151127217e-01\n5.90462398405596778e-02\n-7.95192285119952491e-02\n-1.84315077067010780e-01\n-1.84268294930669513e-01\n-6.59478172988052780e-02\n1.10592560649254656e-01\n2.48633337859100384e-01\n2.81510968799327743e-01\n2.15880418003756541e-01\n1.14670630550262775e-01\n3.89450638145666939e-02\n6.47516173489805485e-03\n0.0\n5.74078745590873006e-04\n2.22339742108509583e-03\n5.25605054169895822e-03\n9.89993407808372437e-03\n1.62974077436139585e-02\n2.44720480562706996e-02\n3.42759186271519162e-02\n4.53237161198538144e-02\n5.69236433654800728e-02\n6.80210902810009510e-02\n7.71788808920318981e-02\n8.26250995894213663e-02\n8.24031789076069554e-02\n7.46543685141385499e-02\n5.80442595248531201e-02\n3.23075967889746365e-02\n-1.17244407248578660e-03\n-3.89068189108921283e-02\n-7.51895121038279463e-02\n-1.02587165818730078e-01\n-1.13229272702035047e-01\n-1.00914988110723552e-01\n-6.37233223900267737e-02\n-6.38784743718605504e-03\n5.86776438608203610e-02\n1.12894625089226208e-01\n1.36275785838986835e-01\n1.14908505492723578e-01\n4.89171615106477331e-02\n-4.28986320140087238e-02\n-1.25788928014941875e-01\n-1.61028810656119487e-01\n-1.24383450364952755e-01\n-2.28723602444689880e-02\n1.01041906999584902e-01\n1.84990329642493095e-01\n1.78331883583753070e-01\n7.34841935738913127e-02\n-8.45133410063484691e-02\n-2.21243536152434306e-01\n-2.77184091527285958e-01\n-2.42544878378252254e-01\n-1.56430627871604166e-01\n-7.25220117045190793e-02\n-2.19400746604316854e-02\n-3.29107645126833302e-03\n1.66877593900413186e-02\n2.89040471280361810e-02\n3.72721827258286065e-02\n4.38985615565403511e-02\n4.92030800327353246e-02\n5.31337190961051892e-02\n5.53811414115416359e-02\n5.54575387873745690e-02\n5.27570744215311652e-02\n4.66329438976533783e-02\n3.65076074930630740e-02\n2.20238369078284008e-02\n3.23424052020425054e-03\n-1.91874282071660823e-02\n-4.37492982405418979e-02\n-6.80174949537207391e-02\n-8.86446616915733676e-02\n-1.01639312531094345e-01\n-1.02948918970166656e-01\n-8.93752347597406988e-02\n-5.97376724083567984e-02\n-1.60543827370947002e-02\n3.56488825657094791e-02\n8.54021270446736341e-02\n1.20695808708604801e-01\n1.29430062593081818e-01\n1.04066825033079680e-01\n4.58976053786386839e-02\n-3.23487098965597325e-02\n-1.07537518008484642e-01\n-1.52043051590109307e-01\n-1.43917997524378449e-01\n-7.80964947989286756e-02\n2.67110866871122267e-02\n1.30740119518204939e-01\n1.87414790913368351e-01\n1.64778638827835999e-01\n6.37425748144120202e-02\n-7.84855732141088308e-02\n-2.04871397870134475e-01\n-2.67695639653275808e-01\n-2.53024432690876988e-01\n-1.84320954467538822e-01\n-1.03202693702307197e-01\n-4.24888205341544256e-02\n-1.15763046678900305e-02\n-1.57866216078984540e-03\n0.0\n5.55548964127209818e-04\n2.15163188606746526e-03\n5.08727491608254069e-03\n9.58734381417537807e-03\n1.58020688201747396e-02\n2.37818161591775191e-02\n3.34348525280925915e-02\n4.44729126785130130e-02\n5.63513531987133928e-02\n6.82148836484401250e-02\n7.88653870676940399e-02\n8.67740967612529862e-02\n9.01645727486603404e-02\n8.71927494989146179e-02\n7.62421916308204661e-02\n5.63327802973989794e-02\n2.76067449595382639e-02\n-8.19190279875688619e-03\n-4.73827213229918859e-02\n-8.43417278661069414e-02\n-1.12013873723297214e-01\n-1.23079856381474617e-01\n-1.11761561876248042e-01\n-7.60029910692534838e-02\n-1.94600789594647702e-02\n4.75244247767548367e-02\n1.08837818111794174e-01\n1.45962620503121421e-01\n1.43565467575539091e-01\n9.59557933851383632e-02\n1.19815368237370257e-02\n-8.44570642329587756e-02\n-1.60154365895589346e-01\n-1.84038622582046507e-01\n-1.40493648016117190e-01\n-3.83849605731733379e-02\n8.99188313154506980e-02\n2.01030587376100217e-01\n2.59556821191740728e-01\n2.53758040269876639e-01\n1.98740874483285507e-01\n1.25337226196110652e-01\n6.22172889740082724e-02\n2.30468272133381342e-02\n5.70599861936129521e-03\n7.12099179417987737e-04\n1.77506377107231259e-02\n3.07450063817205597e-02\n3.96543902140699261e-02\n4.67434442750892520e-02\n5.25029705610157160e-02\n5.69442539363248929e-02\n5.98267008484085552e-02\n6.07360818211152981e-02\n5.91355817379261156e-02\n5.44241311412207163e-02\n4.60175634467562683e-02\n3.34608267101616647e-02\n1.65730285167661022e-02\n-4.38170061974219212e-03\n-2.85167675450577543e-02\n-5.41736399438592017e-02\n-7.88510613867400428e-02\n-9.92762487946007022e-02\n-1.11683246093117319e-01\n-1.12345914327598995e-01\n-9.83672063565200760e-02\n-6.86482485240597351e-02\n-2.48563247017108517e-02\n2.78977524485321329e-02\n8.10338017529433907e-02\n1.23466642876209259e-01\n1.43728191340052991e-01\n1.33070419130264794e-01\n8.88991184859799916e-02\n1.74283595731268559e-02\n-6.57684718019770909e-02\n-1.38348510767758281e-01\n-1.77041669774200272e-01\n-1.65435378999988281e-01\n-1.00997330604237295e-01\n1.93528619739405947e-03\n1.15503626828820066e-01\n2.07743792414789741e-01\n2.54593586842377595e-01\n2.48974770711859611e-01\n2.02255038288004507e-01\n1.37248144185154242e-01\n7.67658659736693283e-02\n3.42956923962697696e-02\n1.15482028049750628e-02\n2.61769407833844147e-03\n3.00694592959519977e-04\n0.0\n5.31436691136301874e-04\n2.05824545433447217e-03\n4.86733216976205623e-03\n9.17804020686481363e-03\n1.51463000171102348e-02\n2.28473656892906572e-02\n3.22442845297054720e-02\n4.31456781836942402e-02\n5.51571472771340207e-02\n6.76330981379681950e-02\n7.96393321266510301e-02\n8.99407656224154584e-02\n9.70322622256804962e-02\n9.92323403236047286e-02\n9.48575010872776819e-02\n8.24867785416437405e-02\n6.13096870990293766e-02\n3.15249942883198686e-02\n-5.27588151393971940e-03\n-4.58430949524819484e-02\n-8.52502844083549011e-02\n-1.17258136483989056e-01\n-1.35155437754926028e-01\n-1.33078793682760876e-01\n-1.07659672052433777e-01\n-5.96597574881288714e-02\n4.91287135974202357e-03\n7.47806879253237883e-02\n1.34915171566178577e-01\n1.69672415354058331e-01\n1.67035182790099379e-01\n1.22813938983230120e-01\n4.32558144024712612e-02\n-5.53474026836808311e-02\n-1.50603226211112967e-01\n-2.20649568798036488e-01\n-2.51193468741854276e-01\n-2.40056109563190262e-01\n-1.97089961413271203e-01\n-1.39393589151336122e-01\n-8.41202967711854876e-02\n-4.24211374488105281e-02\n-1.72510797155120965e-02\n-5.32440116739349434e-03\n-1.11206140312517421e-03\n-1.18180197172668651e-04\n1.91442145127970233e-02\n3.31587522071619054e-02\n4.27767233432666955e-02\n5.04671855722075569e-02\n5.68082927329843779e-02\n6.18861900452930339e-02\n6.55406962823838479e-02\n6.74453650037705188e-02\n6.71513644837533757e-02\n6.41296922074416492e-02\n5.78261428817493858e-02\n4.77369118874840376e-02\n3.35086120202317261e-02\n1.50617171571937238e-02\n-7.27013020528069053e-03\n-3.26011839647675911e-02\n-5.93814853773247317e-02\n-8.53481688487785078e-02\n-1.07583905738110788e-01\n-1.22726147257994384e-01\n-1.27358615557578853e-01\n-1.18587680378219484e-01\n-9.47590227026611359e-02\n-5.62079023617017698e-02\n-5.87108041118111074e-03\n5.04590273627046337e-02\n1.04458941600116942e-01\n1.46326048614972226e-01\n1.66545089213212705e-01\n1.58119944827799980e-01\n1.18765362305562269e-01\n5.23741898612463605e-02\n-3.09119900824959340e-02\n-1.16414339180990423e-01\n-1.88246138811760805e-01\n-2.33433497705562987e-01\n-2.45501952831726183e-01\n-2.26169092188877541e-01\n-1.84369082367739467e-01\n-1.32894851570378392e-01\n-8.40098704006712604e-02\n-4.58646038226007136e-02\n-2.11054920432200283e-02\n-7.88232807216916048e-03\n-2.24529102576076587e-03\n-4.34480563067372730e-04\n-4.29101298569475835e-05\n0.0\n4.99056780493886101e-04\n1.93283859966471121e-03\n4.57159529622440386e-03\n8.62537835625819607e-03\n1.42523720372442868e-02\n2.15493499914740996e-02\n3.05308481283558808e-02\n4.10997223797324382e-02\n5.30115728792124388e-02\n6.58366504647669160e-02\n7.89247416964923704e-02\n9.13808637786495681e-02\n1.02062022478026510e-01\n1.09607215213846088e-01\n1.12513453116934142e-01\n1.09268741723000523e-01\n9.85475040387333162e-02\n7.94638399752305713e-02\n5.18629358785500857e-02\n1.66117874346222612e-02\n-2.41699734849809451e-02\n-6.70147442292237105e-02\n-1.07227694782787167e-01\n-1.39289329663033923e-01\n-1.57563978172610253e-01\n-1.57268223980555316e-01\n-1.35562567667662309e-01\n-9.25387073787514447e-02\n-3.18160740528948272e-02\n3.95278677683495727e-02\n1.11859857920021483e-01\n1.74682970098107598e-01\n2.18808870734877425e-01\n2.38462147689398246e-01\n2.32670235103878464e-01\n2.05422581949926575e-01\n1.64450224884736290e-01\n1.18973594319812956e-01\n7.71849763851783638e-02\n4.43546124701489630e-02\n2.21752961684072505e-02\n9.39762127583520027e-03\n3.24658005435386190e-03\n8.58469590089343758e-04\n1.54647192887146764e-04\n1.42515353293095825e-05\n2.11520654617333680e-02\n3.66364520647450356e-02\n4.72734739594042816e-02\n5.58212238596974206e-02\n6.29737524427229217e-02\n6.89103546695825769e-02\n7.35682146303949513e-02\n7.67281770670609348e-02\n7.80546553956536215e-02\n7.71254130610474764e-02\n7.34647424911839264e-02\n6.65869907143623596e-02\n5.60544771068135841e-02\n4.15515204495184032e-02\n2.29734605362561795e-02\n5.25792872480276363e-04\n-2.51762229345483986e-02\n-5.30225400561478225e-02\n-8.13582245515539620e-02\n-1.07992414790581026e-01\n-1.30290953983785679e-01\n-1.45372358646791267e-01\n-1.50414525891656520e-01\n-1.43059146090723455e-01\n-1.21873306272122783e-01\n-8.67973099029622358e-02\n-3.94817477273420869e-02\n1.65944511220519272e-02\n7.63190719893082348e-02\n1.33501660505717934e-01\n1.81755955480856074e-01\n2.15578549882052439e-01\n2.31401868969597746e-01\n2.28352299033687811e-01\n2.08473298664003104e-01\n1.76291882460706123e-01\n1.37794153013935328e-01\n9.90732364705248225e-02\n6.50409745591236932e-02\n3.85856518476992844e-02\n2.03969026526556567e-02\n9.42455887876860257e-03\n3.70520031362024183e-03\n1.19112310813948618e-03\n2.93827389609799912e-04\n4.94833626519365302e-05\n4.27060225132624749e-06\n0.0\n4.52626490064166628e-04\n1.75301485807083423e-03\n4.14703719361917463e-03\n7.82898079158805306e-03\n1.29532270094234805e-02\n1.96318442396119022e-02\n2.79240887187202913e-02\n3.78198711520970690e-02\n4.92184976917473191e-02\n6.19042103011567188e-02\n7.55207263337501905e-02\n8.95479384204478090e-02\n1.03285055930002909e-01\n1.15845577085275347e-01\n1.26170324138009438e-01\n1.33065007846437294e-01\n1.35267990097440005e-01\n1.31551640801694736e-01\n1.20856574208312778e-01\n1.02451974151690134e-01\n7.61074821038416338e-02\n4.22536567144699768e-02\n2.10049962180928421e-03\n-4.23206340865144026e-02\n-8.82244930040369524e-02\n-1.32270998031886022e-01\n-1.70897911463052526e-01\n-2.00760388946226831e-01\n-2.19218206574137403e-01\n-2.24783322539124641e-01\n-2.17426992683618425e-01\n-1.98656513410897517e-01\n-1.71311502603151616e-01\n-1.39094115144601238e-01\n-1.05921432691886030e-01\n-7.52476120553372957e-02\n-4.95234165709191598e-02\n-2.99268479642255045e-02\n-1.64161499217729233e-02\n-8.05334949909363926e-03\n-3.46386475660008172e-03\n-1.27087631966027047e-03\n-3.82093459613084532e-04\n-8.83106294663736646e-05\n-1.39557862008710304e-05\n-1.13167969841205183e-06\n2.46291466034295713e-02\n4.26589332642024616e-02\n5.50568039906303361e-02\n6.50700573453432130e-02\n7.35727212196293917e-02\n8.08743175814305298e-02\n8.70399711895612077e-02\n9.19897836516052891e-02\n9.55401410654831140e-02\n9.74266333739899626e-02\n9.73221825226039949e-02\n9.48564357534733282e-02\n8.96397298125605757e-02\n8.12935702938261118e-02\n6.94885236340884865e-02\n5.39892749362182942e-02\n3.47051942968354954e-02\n1.17430465149900940e-02\n-1.45434341110719061e-02\n-4.35142734659004909e-02\n-7.42229585005149961e-02\n-1.05424376339764814e-01\n-1.35619386696756578e-01\n-1.63141546588602221e-01\n-1.86286314900937833e-01\n-2.03475686407258355e-01\n-2.13442420787766957e-01\n-2.15409393763485696e-01\n-2.09233350315871952e-01\n-1.95481052891295193e-01\n-1.75411685178111176e-01\n-1.50853282978501035e-01\n-1.23981593000906318e-01\n-9.70330986188580324e-02\n-7.20037163564040683e-02\n-5.03938603473010477e-02\n-3.30540024519118888e-02\n-2.01618303642715178e-02\n-1.13280137071330930e-02\n-5.79310845480630107e-03\n-2.65562691014375627e-03\n-1.06945520734042432e-03\n-3.68008951086018878e-04\n-1.03924845565827754e-04\n-2.25897606216453462e-05\n-3.36108818647934740e-06\n-2.56854303301693726e-07\n0.0\n3.74643774459057510e-04\n1.45098909924021736e-03\n3.43319449558787118e-03\n6.48527084624522451e-03\n1.07442447108680103e-02\n1.63235074462946723e-02\n2.33114354288670757e-02\n3.17669225651502282e-02\n4.17125673384116588e-02\n5.31260427615726852e-02\n6.59302205402199776e-02\n7.99827944088315618e-02\n9.50663994787765976e-02\n1.10880516281569419e-01\n1.27036735641572862e-01\n1.43059184691430058e-01\n1.58391999606705636e-01\n1.72415588094875810e-01\n1.84472962696318882e-01\n1.93906568851868022e-01\n2.00104746575724385e-01\n2.02555293913013551e-01\n2.00901694098762018e-01\n1.94995705157773286e-01\n1.84938594451463628e-01\n1.71102817123356898e-01\n1.54126860776240437e-01\n1.34878630201341970e-01\n1.14387125769174050e-01\n9.37478089880981469e-02\n7.40129527742164894e-02\n5.60830181431344194e-02\n4.06171331484826911e-02\n2.79788778919324785e-02\n1.82274987964082362e-02\n1.11553665020164283e-02\n6.36221923532058302e-03\n3.34850605960667572e-03\n1.60669587664328834e-03\n6.92051176897962700e-04\n2.62201700983474167e-04\n8.49810024700924950e-05\n2.26258531975591976e-05\n4.64086566573870016e-06\n6.52080684818636055e-07\n4.70902354969853708e-08\n3.51155240779012917e-02\n6.08218718373332926e-02\n7.85162965321714035e-02\n9.28808990865234996e-02\n1.05257987145892684e-01\n1.16236584412276578e-01\n1.26114510921538747e-01\n1.35043400263221258e-01\n1.43087749647424184e-01\n1.50253406290836333e-01\n1.56503459274058371e-01\n1.61768635603213973e-01\n1.65955457663101852e-01\n1.68953844609664450e-01\n1.70645094146208043e-01\n1.70910755039371060e-01\n1.69642591628340333e-01\n1.66753562183133891e-01\n1.62189448071268255e-01\n1.55940474937261292e-01\n1.48051977309052146e-01\n1.38632910092840900e-01\n1.27860855928451783e-01\n1.15982177501006645e-01\n1.03306178496417822e-01\n9.01926086888884537e-02\n7.70325838581782107e-02\n6.42239402053364911e-02\n5.21430871473173851e-02\n4.11163754584245381e-02\n3.13946278500023199e-02\n2.31345560674302252e-02\n1.63901515126276195e-02\n1.11157666492029301e-02\n7.18067908128194876e-03\n4.39282625633802964e-03\n2.52762641247409334e-03\n1.35686612529997523e-03\n6.72861479729885124e-04\n3.04483271659057694e-04\n1.23793083252276165e-04\n4.43058900458791175e-05\n1.35744674880250070e-05\n3.41867150300752509e-06\n6.63666414439954446e-07\n8.83017238851555906e-08\n6.04097120161699173e-09\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n1.61209358962557635e-02\n2.79222800378758976e-02\n3.58705158480625008e-02\n4.16048844856492933e-02\n4.48145796327992577e-02\n4.44149286908469970e-02\n3.88846143669453748e-02\n2.66859736735079213e-02\n6.95995292709915281e-03\n-1.94741915052292110e-02\n-4.90011512080948675e-02\n-7.44963573151986441e-02\n-8.59117125296132850e-02\n-7.31800333992487367e-02\n-3.18406489571631673e-02\n3.00613580110648190e-02\n8.81760864774469300e-02\n1.07758027232155801e-01\n6.36345166706011878e-02\n-3.19775709189640406e-02\n-1.16651005253576731e-01\n-1.09883142932446068e-01\n7.71332431866365419e-03\n1.33714841099003445e-01\n1.10916738461859427e-01\n-6.95642157350538637e-02\n-1.68350522024694554e-01\n8.72211081793769841e-03\n1.95222452862689577e-01\n-6.44875876953811787e-03\n-2.23734792511103536e-01\n1.15274523916961635e-01\n1.70164055536562803e-01\n-3.24324435249283838e-01\n2.85949691658487493e-01\n-1.70491924010590684e-01\n7.62429970756964143e-02\n-2.67770107990213009e-02\n7.56631678646896202e-03\n-1.74273729462005931e-03\n3.29187814148754535e-04\n-5.10371019690731382e-05\n6.46978807841743947e-06\n-6.64720927878313834e-07\n5.45366401009141272e-08\n-3.49079689082634680e-09\n1.68050920657414398e-10\n-5.72522385959717556e-12\n0.0\n1.08472742381388542e-03\n4.20113124760565244e-03\n9.90251969648426981e-03\n1.84771170763622303e-02\n2.97864244518314635e-02\n4.29935124003884145e-02\n5.62502048776087268e-02\n6.64805016337743915e-02\n6.94951639769335328e-02\n6.07489836031443048e-02\n3.70087187849701890e-02\n-1.10930973807619473e-03\n-4.64683006843350233e-02\n-8.43432667407494757e-02\n-9.54507151085634276e-02\n-6.49196479072799287e-02\n4.37546628453371750e-03\n8.19387104591040999e-02\n1.16402125826386982e-01\n6.80514713575707669e-02\n-4.51112437681951695e-02\n-1.31643108854483243e-01\n-9.06119505406491887e-02\n6.35740425963955968e-02\n1.55664101856450132e-01\n3.25463011982652650e-02\n-1.61062963962556399e-01\n-9.14113873640488572e-02\n1.71651781820813254e-01\n9.17992460712520608e-02\n-2.26861122079491717e-01\n2.74638834186305171e-02\n2.38715686972268110e-01\n-3.27133758028667621e-01\n2.52461693632194173e-01\n-1.37970366908697711e-01\n5.77226737959510572e-02\n-1.91900278708997951e-02\n5.17285234812659821e-03\n-1.14295039404465238e-03\n2.07983783328855249e-04\n-3.11689067087047306e-05\n3.82973710685585953e-06\n-3.82261697502359940e-07\n3.05284349905734929e-08\n-1.90534375715001719e-09\n8.95713424979161803e-11\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n1.49153584618682711e-02\n2.58341586690582284e-02\n3.32116220033397275e-02\n3.86332886759592903e-02\n4.19352060972968538e-02\n4.22859974032437497e-02\n3.84603343591977120e-02\n2.91354456526192324e-02\n1.33735769422542814e-02\n-8.66375493142438995e-03\n-3.48542512856124601e-02\n-6.03977488262971221e-02\n-7.77935527381269643e-02\n-7.82387419341021295e-02\n-5.50015082023348201e-02\n-8.46471169411793130e-03\n4.91546484099385228e-02\n9.33789301143737038e-02\n9.58451624442848149e-02\n4.24753634491714521e-02\n-4.65584996049520222e-02\n-1.13675365442407250e-01\n-9.62111172949670912e-02\n1.20719355238242849e-02\n1.22543885941844538e-01\n1.08867617260667501e-01\n-4.32122795008925698e-02\n-1.55525846583246002e-01\n-4.44856381102336565e-02\n1.56679204868117705e-01\n9.27910168036672200e-02\n-1.70832186850680273e-01\n-8.35132884230644357e-02\n2.25539034459328630e-01\n-4.43192212140970723e-02\n-2.19269242183260410e-01\n3.21854692028745504e-01\n-2.60382927692662802e-01\n1.49103608459652814e-01\n-6.56033227650731493e-02\n2.30603343843918986e-02\n-6.61577618876218760e-03\n1.56781788023062688e-03\n-3.08791591122133168e-04\n5.06329993144556337e-05\n-6.89739006530945087e-06\n7.75957347905360304e-07\n-7.13509751266757394e-08\n0.0\n9.31231485683662805e-04\n3.60664403551681648e-03\n8.50602400394576651e-03\n1.59003845831766598e-02\n2.57379331178425319e-02\n3.74429022893154329e-02\n4.96727203528202627e-02\n6.01209842233805317e-02\n6.55188921569457294e-02\n6.20485584438565732e-02\n4.63832477729557296e-02\n1.74258908623227092e-02\n-2.15613643306100840e-02\n-6.13677159501425651e-02\n-8.73740714402346658e-02\n-8.39387467097888473e-02\n-4.30735753536245630e-02\n2.54205416613427597e-02\n8.96319597239926685e-02\n1.06347499921684185e-01\n5.01739831038398240e-02\n-5.32299261477481925e-02\n-1.23700123221912928e-01\n-8.28396897050737852e-02\n5.28775536891321757e-02\n1.43085570967639908e-01\n5.61977132639770310e-02\n-1.23816025006318761e-01\n-1.28765238917974173e-01\n9.31608526655435393e-02\n1.63492650510438403e-01\n-1.06861882743360018e-01\n-1.62491258203155520e-01\n1.96459220801138201e-01\n4.41807868984635810e-02\n-2.70804866571520697e-01\n3.14111437351427603e-01\n-2.26653503225050401e-01\n1.19973760107645544e-01\n-4.96384679318884539e-02\n1.65764998398732419e-02\n-4.54921289331998175e-03\n1.03647975975075740e-03\n-1.97023114024771722e-04\n3.12759943321989903e-05\n-4.13512897657962347e-06\n4.52475045531943372e-07\n1.43777569708212136e-02\n2.49030055723399382e-02\n3.20241391194301256e-02\n3.72974845927569604e-02\n4.06152788003094137e-02\n4.12469981677658984e-02\n3.80894651196186027e-02\n2.99194085580397409e-02\n1.57993522034128309e-02\n-4.31517771917448549e-03\n-2.88220876552182925e-02\n-5.37917648096626552e-02\n-7.27911056336456724e-02\n-7.78161961653963397e-02\n-6.18701345505286784e-02\n-2.31473894348857845e-02\n3.04712415861191840e-02\n7.95784299783060534e-02\n9.79793594829941605e-02\n6.62013595841528385e-02\n-1.01366735611866828e-02\n-9.00695223148971907e-02\n-1.12669303433657247e-01\n-4.35757786692642507e-02\n7.51257672105173774e-02\n1.31616512123563456e-01\n4.53222230864351386e-02\n-1.08967468117461955e-01\n-1.32009261739264860e-01\n4.32492143900989751e-02\n1.68583483746378854e-01\n-4.95860838676294088e-04\n-1.90872213045088668e-01\n1.82535323398100129e-02\n2.11291135876996522e-01\n-1.37916296458029664e-01\n-1.28093668673026906e-01\n3.02456209424186662e-01\n-2.94592455276972309e-01\n1.92516908674214116e-01\n-9.48536585275003979e-02\n3.70547561402941178e-02\n-1.17879528857693303e-02\n3.10082494275940208e-03\n-6.80272138343927346e-04\n1.24958469858311728e-04\n-1.92235153228204727e-05\n2.46897240487599750e-06\n0.0\n8.66426047766331257e-04\n3.35565365371931273e-03\n7.91595443085969797e-03\n1.48087344978874956e-02\n2.40121934499369569e-02\n3.50470844798124598e-02\n4.67621537452833289e-02\n5.71499205295469617e-02\n6.33170572603337783e-02\n6.17867458501994565e-02\n4.93218215402075472e-02\n2.43605773570380532e-02\n-1.11229334763403211e-02\n-5.00111894577909000e-02\n-7.99363085455043892e-02\n-8.61829356706666216e-02\n-5.84006514723596007e-02\n3.58940229480418746e-04\n6.73683490911752419e-02\n1.04547897847408311e-01\n7.88234561965843045e-02\n-7.40196344728388193e-03\n-9.89024440885253459e-02\n-1.13935536034686702e-01\n-1.85003343777678173e-02\n1.09092261688786926e-01\n1.21812489154721565e-01\n-2.46754972560183257e-02\n-1.53724638729313995e-01\n-5.40369786301716226e-02\n1.52844124486242988e-01\n9.28820650449707907e-02\n-1.70534777166420820e-01\n-7.46582530212799439e-02\n2.23693329403428787e-01\n-6.04428648779044564e-02\n-1.99685494680562431e-01\n3.15424575733004586e-01\n-2.67266406134971879e-01\n1.60001492639754272e-01\n-7.37993799664369565e-02\n2.73166714846598373e-02\n-8.29850452789363847e-03\n2.09615300257100755e-03\n-4.43432899577931574e-04\n7.88025564303033858e-05\n-1.17598018378935141e-05\n1.38775648392477618e-02\n2.40366473869085412e-02\n3.09183376941999898e-02\n3.60490110884088416e-02\n3.93682703097573208e-02\n4.02329121199342665e-02\n3.76476647735405068e-02\n3.04822304158127375e-02\n1.78148420612239226e-02\n-5.49493293193552734e-04\n-2.34201922172912087e-02\n-4.75864693446418421e-02\n-6.75475918569498485e-02\n-7.61070536251263752e-02\n-6.63258440447393460e-02\n-3.49512535870438457e-02\n1.34896496540918547e-02\n6.41090627556630960e-02\n9.38543479909606237e-02\n8.10994027705709553e-02\n2.12923912191572487e-02\n-5.98341885024665440e-02\n-1.10030524061635854e-01\n-8.17948212814361697e-02\n1.99064348522815272e-02\n1.15539923945868497e-01\n1.02747525547447788e-01\n-2.93739623925586488e-02\n-1.40726818177446505e-01\n-7.11091388793735069e-02\n1.14989793202177351e-01\n1.32918431512666385e-01\n-8.91485417223066151e-02\n-1.61387508248335365e-01\n1.10055601704177497e-01\n1.53322920057202217e-01\n-2.00539512722458124e-01\n-2.47180274423073436e-02\n2.54306170948966237e-01\n-3.12462048997529662e-01\n2.35681063644481659e-01\n-1.30404128953242104e-01\n5.65779096746335461e-02\n-1.99041935287622568e-02\n5.78688142199385198e-03\n-1.40596016288780387e-03\n2.87177007763160237e-04\n-4.94265797900522765e-05\n0.0\n8.08158693049852543e-04\n3.12998515927483080e-03\n7.38517566398114687e-03\n1.38253132441555036e-02\n2.24522064130061628e-02\n3.28663626674473436e-02\n4.40769910338508694e-02\n5.43310573233613953e-02\n6.10631553692635443e-02\n6.11141010502827681e-02\n5.13829154341458177e-02\n3.00123716302625673e-02\n-1.99912992139029272e-03\n-3.92489736147649329e-02\n-7.14187173058117575e-02\n-8.50885007054924536e-02\n-6.88163709256909700e-02\n-2.08639639669156128e-02\n4.38628640095590772e-02\n9.38928415244459913e-02\n9.42769127093359416e-02\n3.17951926479301886e-02\n-6.21820058440511053e-02\n-1.16966777621227785e-01\n-7.26997949983154562e-02\n4.94382435006649607e-02\n1.32194169664261618e-01\n6.57987478664353032e-02\n-9.54888522410281826e-02\n-1.38115365286411357e-01\n3.28530164736431235e-02\n1.67792257265900691e-01\n1.30048522701714173e-03\n-1.88742910940891739e-01\n2.51320701347710271e-02\n2.04395439877836121e-01\n-1.48084466610204968e-01\n-1.07469414891037424e-01\n2.90187852210250286e-01\n-2.97112519318879720e-01\n2.02734631171658713e-01\n-1.04415762080102711e-01\n4.27882747572348524e-02\n-1.43458775601715410e-02\n3.99957790240283717e-03\n-9.36072936779687491e-04\n1.84837054809727888e-04\n1.34110084580240964e-02\n2.32285480300336786e-02\n2.98860999832264163e-02\n3.48797790643973205e-02\n3.81892386053275940e-02\n3.92471834642883280e-02\n3.71538735178342933e-02\n3.08652400619733973e-02\n1.94853922576610217e-02\n2.71067767809056838e-03\n-1.85941475023983192e-02\n-4.18117169817423251e-02\n-6.22489789654153067e-02\n-7.34866566226583390e-02\n-6.88453941155120069e-02\n-4.41692465523229050e-02\n-1.44841258601282078e-03\n4.82920133040986854e-02\n8.54732412791315704e-02\n8.84366033587757061e-02\n4.60942572074576271e-02\n-2.84199159183494178e-02\n-9.42883184387527662e-02\n-1.01381496735441570e-01\n-2.96036183950209933e-02\n7.66130672484046232e-02\n1.22433391609807235e-01\n4.51895115531041683e-02\n-9.32860525958798537e-02\n-1.30432940206292702e-01\n8.20081985944996934e-03\n1.50931264263406306e-01\n6.15593619331826769e-02\n-1.49611747963232955e-01\n-9.18975511637620535e-02\n1.70628070718709168e-01\n6.53278776863719934e-02\n-2.21263162755998027e-01\n7.57862772120456302e-02\n1.80014721183058918e-01\n-3.07891762303337202e-01\n2.73094741555575782e-01\n-1.70599709114704623e-01\n8.22652012808391953e-02\n-3.19530653121044284e-02\n1.02346438084917144e-02\n-2.74111771182396213e-03\n6.18871027363851424e-04\n0.0\n7.55578570007627275e-04\n2.92634321839075522e-03\n6.90600899872132433e-03\n1.29363319721420705e-02\n2.10376941552557241e-02\n3.08768281244032571e-02\n4.15981851783217421e-02\n5.16661153184266031e-02\n5.88016863598498501e-02\n6.01379109628994921e-02\n5.27364185336701152e-02\n3.45666680455893952e-02\n5.89504370050832754e-03\n-2.92676635719044502e-02\n-6.24162740183913031e-02\n-8.15792803015887164e-02\n-7.50796610932432940e-02\n-3.79476942023097771e-02\n2.12328618946470704e-02\n7.78174040697811736e-02\n9.85941294577923760e-02\n6.11661783097450715e-02\n-2.27622801345752877e-02\n-9.97514655126951894e-02\n-1.02888667452716132e-01\n-1.20807057560279665e-02\n1.01582622861537034e-01\n1.16455330686375993e-01\n-7.60805804229671302e-03\n-1.36066519826495674e-01\n-8.31898104377466890e-02\n1.06895607954600569e-01\n1.35737057579420339e-01\n-8.63403731051069906e-02\n-1.58775985158719296e-01\n1.13751548909121619e-01\n1.43731752478422820e-01\n-2.03878903807765882e-01\n-5.87790418672340213e-03\n2.37332291331529832e-01\n-3.09605359429527549e-01\n2.43864198128826537e-01\n-1.40753710971168483e-01\n6.38573598316375113e-02\n-2.35822659217767190e-02\n7.23183843912778880e-03\n-1.86373777784458613e-03\n1.29748222425458328e-02\n2.24730513432641402e-02\n2.89203835219105851e-02\n3.37826844372798862e-02\n3.70735606522110475e-02\n3.82919537567685542e-02\n3.66228932798956242e-02\n3.11018839483983983e-02\n2.08653562461581822e-02\n5.53265185808240155e-03\n-1.42895755896574866e-02\n-3.64739966973012322e-02\n-5.70234656971514015e-02\n-7.02448575485789123e-02\n-6.98371107775781902e-02\n-5.11338665188456123e-02\n-1.42478209932120001e-02\n3.30014286090565337e-02\n7.44603257026386911e-02\n8.97291968887392460e-02\n6.39804075230558517e-02\n6.62483328199535426e-04\n-7.10490912125903290e-02\n-1.04847675526371364e-01\n-6.65157359189092745e-02\n2.96532785861358048e-02\n1.11007182864081191e-01\n9.45750986739699734e-02\n-2.38280003584082425e-02\n-1.28235003590642327e-01\n-8.24578949769323027e-02\n8.23318124996291201e-02\n1.42176198070643578e-01\n-2.41581745121269807e-02\n-1.66715525029557166e-01\n-1.84862130747823401e-03\n1.86598907855292123e-01\n-3.24707135490794746e-02\n-1.97016584375123205e-01\n1.57410405841230949e-01\n8.71804492456385582e-02\n-2.77107981018277993e-01\n2.98444266877871511e-01\n-2.12349929098446244e-01\n1.14072786683570404e-01\n-4.88924818459626834e-02\n1.72138243213014047e-02\n-5.06403840023940659e-03\n0.0\n7.07975678686469665e-04\n2.74197801307259027e-03\n6.47204093938522247e-03\n1.21302373296697120e-02\n1.97515305488898292e-02\n2.90578900220836780e-02\n3.93082709260576674e-02\n4.91534024519275151e-02\n5.65648231111939778e-02\n5.89421114714577948e-02\n5.35222972369848310e-02\n3.81891612960153642e-02\n1.26661343761048581e-02\n-2.01570722817092998e-02\n-5.33486628521228426e-02\n-7.64040567278035793e-02\n-7.79643335032499524e-02\n-5.10209472575696502e-02\n7.47600523681579178e-04\n5.90482277259527580e-02\n9.43983957736329732e-02\n8.01106582029139647e-02\n1.32863514732702009e-02\n-7.08430730098616457e-02\n-1.10293613877284938e-01\n-6.09619570675055747e-02\n5.06069503550645311e-02\n1.23452554084361732e-01\n6.74748371523463258e-02\n-7.65665565131867926e-02\n-1.35658993850122395e-01\n-6.18655040539713326e-03\n1.47626000207793123e-01\n6.73661504223713320e-02\n-1.46987226441968016e-01\n-9.00030323481060684e-02\n1.70994682442115437e-01\n5.56048239521245852e-02\n-2.18206684974531107e-01\n9.03047098318101593e-02\n1.60315372207308515e-01\n-2.99311805936952169e-01\n2.77858098651003749e-01\n-1.80839116966355351e-01\n9.09548701244201618e-02\n-3.69608203639744184e-02\n1.24362491772804073e-02\n1.25668777360493852e-02\n2.17664707313436831e-02\n2.80166362340021347e-02\n3.27533222298718937e-02\n3.60189843945179847e-02\n3.73705424372240969e-02\n3.60683794644724651e-02\n3.12211362537275321e-02\n2.20013343222829685e-02\n7.97524669074869443e-03\n-1.04548794308902439e-02\n-3.15665338330690104e-02\n-5.19598747869865346e-02\n-6.66067745828407831e-02\n-6.96465489734145460e-02\n-5.61811441829278418e-02\n-2.49668205539192792e-02\n1.87774821874356866e-02\n6.20668711748696908e-02\n8.64683185931703485e-02\n7.54466678233627064e-02\n2.54637841038693850e-02\n-4.47979909613870977e-02\n-9.62031887759596666e-02\n-8.88507327564501403e-02\n-1.47250521820388655e-02\n7.99001765840059025e-02\n1.13938943169209134e-01\n4.05757641086698234e-02\n-8.42133506316664199e-02\n-1.24935241548058712e-01\n-1.19439386963553097e-02\n1.30014505918072037e-01\n9.28780548174004961e-02\n-9.96771081647866292e-02\n-1.37522259274911934e-01\n8.45991517774183771e-02\n1.55730522043389497e-01\n-1.17813604736507538e-01\n-1.33758808982878508e-01\n2.06444058366957006e-01\n-1.22889563348265035e-02\n-2.19971256170816032e-01\n3.05607052880757291e-01\n-2.51192159947702831e-01\n1.50974042108077827e-01\n-7.14481051483176893e-02\n2.76127357765577758e-02\n0.0\n6.64929300157766023e-04\n2.57526010591638049e-03\n6.07948597597621036e-03\n1.14003013725506083e-02\n1.85840864397043559e-02\n2.73990117195528939e-02\n3.72012236894584056e-02\n4.68014864202787456e-02\n5.43901210271304156e-02\n5.76078909623352758e-02\n5.38702419754896120e-02\n4.10368781274467326e-02\n1.84341760967490879e-02\n-1.19447817042093278e-02\n-4.45132010615519394e-02\n-7.01703467903835448e-02\n-7.82095693087310750e-02\n-6.04654821072626372e-02\n-1.69473198873765739e-02\n3.95963661764052732e-02\n8.42897474399021407e-02\n8.95591057228779380e-02\n4.26645917421807075e-02\n-3.74788563760106511e-02\n-1.00076171841827849e-01\n-9.12763332818032902e-02\n-3.08681727470875873e-03\n9.77720215578327945e-02\n1.09538500632774150e-01\n2.86217652159655286e-04\n-1.21213039741690842e-01\n-9.57625220522468207e-02\n6.99379771435690856e-02\n1.44767305483840203e-01\n-1.70059312189362530e-02\n-1.65552359663471593e-01\n-1.35028979088521448e-03\n1.84468280016943875e-01\n-4.01369814882405473e-02\n-1.89237798825399400e-01\n1.65894982833274057e-01\n6.73582447722415045e-02\n-2.63443338807288763e-01\n2.98765161111777977e-01\n-2.21427464758084780e-01\n1.23829355403842711e-01\n-5.53713243406394190e-02\n1.21980984380049597e-02\n2.11277262503511525e-02\n2.71993776808204593e-02\n3.18211486710065980e-02\n3.50601431039852182e-02\n3.65237892581828302e-02\n3.55388935793589864e-02\n3.12802855501322294e-02\n2.29576386969423847e-02\n1.01017234867106526e-02\n-7.04678836544629737e-03\n-2.70987106313388890e-02\n-4.71628003637391408e-02\n-6.28072589832245898e-02\n-6.86307463461970912e-02\n-5.96920477210257650e-02\n-3.37930880245968374e-02\n5.91588367676916006e-03\n4.92552522640868351e-02\n8.00578283493293685e-02\n8.14663336224438484e-02\n4.52215954347486154e-02\n-1.87469571416459466e-02\n-7.96795580162454747e-02\n-9.77436466351743888e-02\n-5.04862652186993943e-02\n4.02524253410454849e-02\n1.07737350972345658e-01\n8.52354030517493422e-02\n-2.37215180996694294e-02\n-1.18959045930532845e-01\n-8.55442480365692232e-02\n5.99460317845749435e-02\n1.38500654311083909e-01\n1.86823459395831191e-02\n-1.44320271162184016e-01\n-7.19144605011456245e-02\n1.45104086024953449e-01\n8.75747337919619284e-02\n-1.71744961529780860e-01\n-4.58094862408119502e-02\n2.14897893456098860e-01\n-1.03948139075840371e-01\n-1.41204248100753466e-01\n2.90538306674931246e-01\n-2.82240315820143139e-01\n1.91103745066652536e-01\n-1.00043466881149332e-01\n0.0\n6.27953391049579108e-04\n2.43205302572949318e-03\n5.74223958644354878e-03\n1.07729040441828065e-02\n1.75795325506614662e-02\n2.59685195197373250e-02\n3.53771159323696474e-02\n4.47506859749353184e-02\n5.24658579252188714e-02\n5.63739909352846680e-02\n5.40583245930157455e-02\n4.33902152095093502e-02\n2.34072009891133047e-02\n-4.60786268886181904e-03\n-3.61938809256605182e-02\n-6.35249218852232400e-02\n-7.66993804322887440e-02\n-6.69990878447805083e-02\n-3.17736620766631631e-02\n2.08445932207521785e-02\n7.07020289143673181e-02\n9.14457368724575226e-02\n6.43788275047566388e-02\n-4.80212903837146880e-03\n-7.86274060544143172e-02\n-1.03334983855399673e-01\n-4.83335903821264026e-02\n5.47087110473852695e-02\n1.16881607530624237e-01\n6.49656224844754049e-02\n-6.53623178291970891e-02\n-1.29807422133729394e-01\n-2.95116061957978286e-02\n1.23650978838694775e-01\n1.01285289884906704e-01\n-9.35281108231398317e-02\n-1.39401143832670160e-01\n8.37800291737765546e-02\n1.53410006094683748e-01\n-1.22283191936260111e-01\n-1.24810415523709667e-01\n2.09268521517063488e-01\n-2.88214341666001884e-02\n-2.04955873643449860e-01\n3.03551098178126810e-01\n-2.59982915357824917e-01\n1.62386837542050799e-01\n1.19582300825436753e-02\n2.07122620715642150e-02\n2.66689335903145114e-02\n3.12215271748781040e-02\n3.44591889396639803e-02\n3.60310373090879030e-02\n3.53180668946612222e-02\n3.15492360711868564e-02\n2.39654811143206435e-02\n1.20710588739786819e-02\n-4.02114231672701973e-03\n-2.31899460762765436e-02\n-4.29603696786562683e-02\n-5.94035140728479683e-02\n-6.75371739677902427e-02\n-6.24654788744276115e-02\n-4.13148874336509361e-02\n-5.61500386975418309e-03\n3.68283888621743077e-02\n7.20749339419515939e-02\n8.37229840351001037e-02\n6.04735901547843527e-02\n5.32612378236703432e-03\n-5.91373359143881616e-02\n-9.64162758526557750e-02\n-7.59621804968055175e-02\n1.96935358214170265e-04\n8.44777748113206828e-02\n1.06896889711984258e-01\n3.39774494138136846e-02\n-8.03932074874727648e-02\n-1.19922968169416583e-01\n-2.31022855645683887e-02\n1.13127077549439015e-01\n1.08057749465790554e-01\n-5.82664875973285534e-02\n-1.48368157121773175e-01\n9.98656272248829927e-03\n1.66564619461656210e-01\n1.81238946913220853e-03\n-1.85153206914609791e-01\n4.63189378791881712e-02\n1.85656596540317603e-01\n-1.74517113565302195e-01\n-5.36450800117431736e-02\n2.58835376308600040e-01\n-3.07317930919344118e-01\n2.36345005814840220e-01\n0.0\n6.03944983759781891e-04\n2.33906886412714411e-03\n5.52343858666137083e-03\n1.03669059475865293e-02\n1.69333169083909184e-02\n2.50592345058494453e-02\n3.42443192911905878e-02\n4.35366355245943165e-02\n5.14544694765443344e-02\n5.60089856048687426e-02\n5.49101294555627145e-02\n4.60353898959444813e-02\n2.81942173080304767e-02\n2.10669931875143027e-03\n-2.86732595237109075e-02\n-5.73851484934654044e-02\n-7.48849499937950941e-02\n-7.21932910651203741e-02\n-4.46987118525473473e-02\n3.21150629640862013e-03\n5.57140167916998011e-02\n8.86226586446446085e-02\n7.98944062498910396e-02\n2.50418730134448139e-02\n-5.14585720152747131e-02\n-1.01399812375657455e-01\n-8.15014377772542709e-02\n6.44366186429035093e-03\n9.79599017509795028e-02\n1.05251919392704188e-01\n3.95338076060540097e-03\n-1.12252138919750374e-01\n-1.03523396810831170e-01\n4.27228725533316880e-02\n1.43156520686586131e-01\n3.33457936189288928e-02\n-1.43538582178255048e-01\n-8.11609371062037427e-02\n1.45509824950132816e-01\n9.21862052019392780e-02\n-1.75828125412122394e-01\n-4.50506414928298626e-02\n2.20791084309114510e-01\n-1.11623641067417498e-01\n-1.43733362239546331e-01\n3.08478192894531489e-01\n-3.08800757941158410e-01\n1.20253968808504627e-02\n2.08285983788133039e-02\n2.68229590261071169e-02\n3.14219273629330609e-02\n3.47375614259332957e-02\n3.64497147863261442e-02\n3.59757283717893062e-02\n3.25781863432770963e-02\n2.55125348409853923e-02\n1.42530031757385853e-02\n-1.19379474799574540e-03\n-1.99174280101754933e-02\n-3.97631712415915869e-02\n-5.71845236955173045e-02\n-6.75135082127226865e-02\n-6.58760116444842281e-02\n-4.88516775431961300e-02\n-1.66574899070190234e-02\n2.48728788982235174e-02\n6.37757786373181618e-02\n8.43563584866042077e-02\n7.32470054468207510e-02\n2.79082160039461312e-02\n-3.65325733524595533e-02\n-8.83598226427071282e-02\n-9.30761101464859658e-02\n-3.73642609002506898e-02\n5.10261903989075935e-02\n1.08978385518792756e-01\n8.05742678062250500e-02\n-2.49810779336591612e-02\n-1.16431701130669918e-01\n-9.12311928312003056e-02\n4.34066298987320145e-02\n1.36876130043157324e-01\n5.27134645220425357e-02\n-1.18033210549110534e-01\n-1.18554814363439356e-01\n8.46924157959447615e-02\n1.52912031633142736e-01\n-7.71016813910732346e-02\n-1.67105269371743637e-01\n1.21260445895773034e-01\n1.40985699380761526e-01\n-2.20460346961149106e-01\n1.36468176179532046e-02\n2.50435950216447323e-01\n-3.64196172376217486e-01\n0.0\n5.96323284137533654e-04\n2.30955014842038151e-03\n5.45445079929844298e-03\n1.02417698325421910e-02\n1.67447009056876442e-02\n2.48239651421129394e-02\n3.40253931742781970e-02\n4.34703813698951724e-02\n5.17755632735221183e-02\n5.70584332737007482e-02\n5.71030582305895179e-02\n4.97610439608464211e-02\n3.36280218768590100e-02\n8.94408435495209174e-03\n-2.14918477702391759e-02\n-5.18051853416727284e-02\n-7.34995599586663190e-02\n-7.74227929340610271e-02\n-5.73693620679779082e-02\n-1.45278936174980597e-02\n3.92662844030857855e-02\n8.24405459959145492e-02\n9.11954066350248588e-02\n5.29960035425929080e-02\n-1.99684343813820823e-02\n-8.82296545135354826e-02\n-1.03011900926590794e-01\n-4.20930984910786732e-02\n5.94691086936710508e-02\n1.18830921181945243e-01\n7.02290480088091640e-02\n-5.62855009161739028e-02\n-1.32451775482853168e-01\n-5.56421814940833565e-02\n1.01945375648651859e-01\n1.31800998680272091e-01\n-3.59879127233477397e-02\n-1.62609281300939018e-01\n-1.54858845488827120e-02\n1.77683400106005418e-01\n2.87428341246051267e-02\n-2.02131184768929051e-01\n1.88671819026575913e-02\n2.23749438646690169e-01\n-1.62260557324956090e-01\n-1.40052952222650851e-01\n3.91409377737783060e-01\n1.23677135766769447e-02\n2.14215082882638699e-02\n2.75908833073750179e-02\n3.23422892911645610e-02\n3.58141815266732125e-02\n3.77112873120124745e-02\n3.74761454703592539e-02\n3.43912739111982557e-02\n2.77141272948601275e-02\n1.68829967705064719e-02\n1.80560949766777321e-03\n-1.67914480265596786e-02\n-3.70252134688981993e-02\n-5.56686779538377863e-02\n-6.83117559282162418e-02\n-7.00865367195431799e-02\n-5.70864694415474175e-02\n-2.83612734408240190e-02\n1.20543027817791269e-02\n5.41187089546039252e-02\n8.31056734438687245e-02\n8.42585560233958669e-02\n5.03594165786528519e-02\n-1.06262592569382145e-02\n-7.30747498997627726e-02\n-1.01836155424460659e-01\n-7.19225331641087096e-02\n8.74781445782288163e-03\n9.15309921144906863e-02\n1.11193050587825290e-01\n3.84202490052466122e-02\n-7.71072029401493331e-02\n-1.27601438616572305e-01\n-4.59736149917062409e-02\n9.73411752372058681e-02\n1.33475587596296463e-01\n-6.72648410184234925e-03\n-1.51907208558547113e-01\n-7.51239018762013266e-02\n1.36528566260119583e-01\n1.25253935310623510e-01\n-1.31226185024598707e-01\n-1.45488503215502329e-01\n1.66391043677032446e-01\n1.22751296529009180e-01\n-2.52374223018599630e-01\n-1.16153083228099610e-03\n3.87777170069809385e-01\n0.0\n5.95099193658613643e-04\n2.30480926638127305e-03\n5.44398682228774966e-03\n1.02265605707388390e-02\n1.67359503616057309e-02\n2.48557861374842162e-02\n3.41738093352941461e-02\n4.38768026512179610e-02\n5.26682653423488981e-02\n5.87588069056064338e-02\n5.99958371460445894e-02\n5.42031584317665335e-02\n3.97761186859174748e-02\n1.65054379456469197e-02\n-1.35286759068695625e-02\n-4.53278849599688810e-02\n-7.11123143540247360e-02\n-8.17528755253477540e-02\n-6.97632096604499652e-02\n-3.34200952502970855e-02\n1.94881471087542009e-02\n7.08047773840934369e-02\n9.66589484868844023e-02\n7.83972659725629406e-02\n1.63771904686165516e-02\n-6.18128920514166846e-02\n-1.08988056375171977e-01\n-8.57732770099170483e-02\n4.17064166885464018e-03\n9.98782612382391188e-02\n1.17340832960673172e-01\n2.48895285084824273e-02\n-1.02488210215620115e-01\n-1.29241185401645309e-01\n-4.44673764699676094e-03\n1.39007330243901217e-01\n1.05479186180142709e-01\n-8.83731809017236219e-02\n-1.62781355910585984e-01\n3.31623655196540551e-02\n1.92055933093990217e-01\n-7.46889132161420929e-03\n-2.20062480449266434e-01\n3.30622769535651659e-02\n2.57516111579300766e-01\n-1.36320623489696230e-01\n-3.58130826045751971e-01\n1.27962850756578456e-02\n2.21638158991747450e-02\n2.85516445543732358e-02\n3.34906550596617350e-02\n3.71488777745038815e-02\n3.92572241047993570e-02\n3.92841216061063855e-02\n3.65326902359256397e-02\n3.02635574126473850e-02\n1.98811733239568286e-02\n5.19736941148226869e-03\n-1.32426196518562762e-02\n-3.38296711601656988e-02\n-5.36709128003576771e-02\n-6.86530179338352697e-02\n-7.39883151219972862e-02\n-6.53921020939170344e-02\n-4.08565259057394881e-02\n-2.64524381129817082e-03\n4.13117387011358098e-02\n7.77990091573861481e-02\n9.15684894185941761e-02\n7.16523941812842041e-02\n1.90418211713437903e-02\n-4.82888748866367734e-02\n-9.82708285901696121e-02\n-9.87646788874623621e-02\n-3.92851553035080611e-02\n5.22967464288047607e-02\n1.15718247271116931e-01\n9.56404331040364153e-02\n-6.85204968781959883e-03\n-1.13440170338638874e-01\n-1.19690844785619671e-01\n-3.06067784711430203e-04\n1.31645932162994528e-01\n1.16620814205066842e-01\n-5.28785626765452266e-02\n-1.66400739808845372e-01\n-4.16320672198980668e-02\n1.65115331135391730e-01\n1.11770485250390558e-01\n-1.55845735399624569e-01\n-1.54891552259340787e-01\n1.74116126266203902e-01\n1.81943305895754998e-01\n-2.47169880442121515e-01\n-3.11113202724211058e-01\n0.0\n5.92770472994443259e-04\n2.29579017003097218e-03\n5.42343679430378704e-03\n1.01925205805192057e-02\n1.66968104479016215e-02\n2.48437112202363163e-02\n3.42649992488357827e-02\n4.42170288015034454e-02\n5.34976210710671474e-02\n6.04228953979646793e-02\n6.29227976266844014e-02\n5.88203243199720213e-02\n4.63430492609342923e-02\n2.48605086627631915e-02\n-4.26460539740207509e-03\n-3.69745471865819131e-02\n-6.63838295621669433e-02\n-8.37093236529474344e-02\n-8.06138311352379983e-02\n-5.28236947274674518e-02\n-4.02276184690191982e-03\n5.19617753937890309e-02\n9.31720216694259529e-02\n9.73665409520204084e-02\n5.44710254500474361e-02\n-2.20002821894644193e-02\n-9.36607771824621294e-02\n-1.13594093171920402e-01\n-5.78339413138691597e-02\n4.63833035549268968e-02\n1.23932316972082054e-01\n1.02206896766038696e-01\n-1.68320800054471142e-02\n-1.31053532351775553e-01\n-1.15868901685754686e-01\n3.48090981486730774e-02\n1.58334490892984181e-01\n8.51171831281712921e-02\n-1.17340881987612222e-01\n-1.65667264133589148e-01\n4.85125496688191896e-02\n2.08388143125030845e-01\n9.77155133552229556e-03\n-2.44061737493571573e-01\n-5.39290285560187418e-02\n3.16739807228899772e-01\n2.55823312233776301e-01\n1.32497228196224535e-02\n2.29491931097908532e-02\n2.95683605164155372e-02\n3.47068937855327525e-02\n3.85652555635865105e-02\n4.09038809295148784e-02\n4.12213267936284572e-02\n3.88465601272812502e-02\n3.30494781404396809e-02\n2.32070266422981786e-02\n9.04016400351823415e-03\n-9.08684208500350546e-03\n-2.98491498183033541e-02\n-5.07191627537018075e-02\n-6.79448800146811305e-02\n-7.69275886999917502e-02\n-7.31543265437304274e-02\n-5.37146095741187976e-02\n-1.91702052185177031e-02\n2.48280447303996406e-02\n6.71489658294386060e-02\n9.30946491897667733e-02\n8.92096074477469886e-02\n5.02523222422712121e-02\n-1.43879589581366128e-02\n-7.92694634659124597e-02\n-1.10697912412916627e-01\n-8.41527681228196461e-02\n-4.35013952061495679e-03\n8.63505024395055804e-02\n1.25353853492791240e-01\n7.29552405836305373e-02\n-4.44668196136493513e-02\n-1.34428887441819495e-01\n-1.06018165272038487e-01\n3.31806961482787807e-02\n1.50649388125105421e-01\n1.04703188083632145e-01\n-7.69811394056246212e-02\n-1.76827096588687227e-01\n-3.75533929437071798e-02\n1.76375321539780389e-01\n1.37733952555166600e-01\n-1.40411471593969439e-01\n-2.20898943662663994e-01\n8.80254556172886671e-02\n3.41888902273076667e-01\n1.99902686645471311e-01\n0.0\n5.88346838472600928e-04\n2.27865750719816835e-03\n5.38373324951055710e-03\n1.01225661753177026e-02\n1.65991409482532798e-02\n2.47454440832846310e-02\n3.42396514095613391e-02\n4.44125767162641821e-02\n5.41652342919210078e-02\n6.19341560245843803e-02\n6.57551844772698568e-02\n6.34841302401305818e-02\n5.32233596963502670e-02\n3.39637710470507698e-02\n6.37025233063601756e-03\n-2.64848202708812992e-02\n-5.87770789166996918e-02\n-8.24094293997876121e-02\n-8.87016729199989751e-02\n-7.13660188053673733e-02\n-3.02073984697456832e-02\n2.58712933679762884e-02\n7.86791799128488956e-02\n1.05361392358819625e-01\n8.81949924061787571e-02\n2.66100453344880090e-02\n-5.53052809066853224e-02\n-1.14004793445195152e-01\n-1.08205557272450195e-01\n-2.96139506201744639e-02\n7.81164595454994226e-02\n1.36011070851627974e-01\n8.63433965929309988e-02\n-4.55560784954424092e-02\n-1.47243330732289956e-01\n-1.08479181159727406e-01\n5.32731714314244875e-02\n1.70586859618189007e-01\n8.92080926014911652e-02\n-1.19888504925032918e-01\n-1.88555259592834201e-01\n1.11483688012763791e-02\n2.26081448585403771e-01\n1.19525592207353648e-01\n-2.08991568546020162e-01\n-3.28682218878067256e-01\n-1.48778148684104133e-01\n1.37387937918103317e-02\n2.37962888821273630e-02\n3.06650973067815504e-02\n3.60194354749198420e-02\n4.00954268050178614e-02\n4.26865098142244700e-02\n4.33257160338734806e-02\n4.13733393046516462e-02\n3.61152483799391105e-02\n2.69085461465037867e-02\n1.33908287334213866e-02\n-4.25014818738954445e-03\n-2.49785125012265408e-02\n-4.66564324266615163e-02\n-6.59528291831125435e-02\n-7.85689122300445436e-02\n-7.99322008448156568e-02\n-6.64324876024471878e-02\n-3.70866328608930595e-02\n4.77724597381408000e-03\n5.05643611088647180e-02\n8.71484098494142712e-02\n1.00088788913716517e-01\n7.93116976087550052e-02\n2.57438796507880319e-02\n-4.43459858331215831e-02\n-1.01424008343125122e-01\n-1.13852151760631293e-01\n-6.60738587695420126e-02\n2.50765195826316567e-02\n1.09476848332132684e-01\n1.27860117195814693e-01\n5.46369607807941152e-02\n-6.87383735876435920e-02\n-1.46722043417740089e-01\n-1.00697504813527502e-01\n4.68146188064239854e-02\n1.62155853730874155e-01\n1.13742945085871516e-01\n-7.16003267891285045e-02\n-1.92211935653589461e-01\n-8.15273329353175674e-02\n1.55083933711317873e-01\n2.14169193812806830e-01\n-2.08990875071612091e-02\n-2.86833123699281767e-01\n-2.88573805540617456e-01\n-1.05585272037235056e-01\n0.0\n5.81955303902679816e-04\n2.25390320025215495e-03\n5.32602894271661572e-03\n1.00188072428852269e-02\n1.64461933401226362e-02\n2.45652565761101845e-02\n3.41023477812746750e-02\n4.44667029939843847e-02\n5.46702088441931300e-02\n6.32835859678915758e-02\n6.84716663013390930e-02\n6.81587676183774416e-02\n6.03713630450082445e-02\n4.37787144201501402e-02\n1.83925977119387442e-02\n-1.37090584440831623e-02\n-4.78903510104429081e-02\n-7.70581741440684864e-02\n-9.27332060668620839e-02\n-8.73023683643953385e-02\n-5.72370691995357991e-02\n-6.38925051759413939e-03\n5.22400245558236956e-02\n9.81889814867930033e-02\n1.09951486831907336e-01\n7.53300465860005930e-02\n1.76218917080869027e-03\n-8.01063821978311857e-02\n-1.26039167261560864e-01\n-1.01701928727289254e-01\n-9.99297189328261608e-03\n9.76306250435865358e-02\n1.44133647234957918e-01\n8.18918850782508478e-02\n-5.54758451056192453e-02\n-1.57473907657279644e-01\n-1.20593319274258842e-01\n4.19579029874817336e-02\n1.78706385145553426e-01\n1.32038685990977428e-01\n-7.57088660445818518e-02\n-2.21992633829765557e-01\n-1.16220229722523841e-01\n1.55974335058940150e-01\n3.15105942384942661e-01\n2.34464091915189521e-01\n7.14802678716141837e-02\n1.42802032936498388e-02\n2.47340376470139428e-02\n3.18792007304853769e-02\n3.74724285972272836e-02\n4.17893425072850960e-02\n4.46601189151684674e-02\n4.56567820853607254e-02\n4.41767100305637678e-02\n3.95290722628507535e-02\n3.10601266072804381e-02\n1.83341418474278692e-02\n1.37105150609448194e-03\n-1.90806500670085734e-02\n-4.12894193710727428e-02\n-6.23970257474889753e-02\n-7.85131776968531481e-02\n-8.51870787165517757e-02\n-7.83537677227063994e-02\n-5.57308607868411063e-02\n-1.84241731777445086e-02\n2.77826182034250670e-02\n7.22298409413973663e-02\n1.01090288248363427e-01\n1.01407966540766767e-01\n6.69244427854801954e-02\n3.73140027704901237e-03\n-6.75042550950068210e-02\n-1.16116608461046697e-01\n-1.14025415816051648e-01\n-5.28113998715268734e-02\n4.38263503854025085e-02\n1.23747535992316068e-01\n1.32156594768520597e-01\n5.06864215418994651e-02\n-7.60794634795535912e-02\n-1.56342892026672842e-01\n-1.15282544546758070e-01\n3.14653010495857394e-02\n1.65341699841955014e-01\n1.53570436267389365e-01\n-1.63197529219028178e-02\n-1.91831727132312196e-01\n-1.85214605998458987e-01\n2.51475725397215001e-02\n2.52312149149088061e-01\n3.00478616380477515e-01\n1.77635955484364755e-01\n4.61555117344085025e-02\n0.0\n5.73455996704645633e-04\n2.22098552501986783e-03\n5.24903461008348685e-03\n9.87876309403548820e-03\n1.62336946279167081e-02\n2.42962108915966354e-02\n3.38421711049843171e-02\n4.43625609363466275e-02\n5.49870675338743897e-02\n6.44338037905807653e-02\n7.10199805492071068e-02\n7.27766148090448206e-02\n6.77105310049423009e-02\n5.42409332514922488e-02\n3.17970971573720354e-02\n1.49298572289341099e-03\n-3.33015296467875366e-02\n-6.67718963397474080e-02\n-9.11856193522608688e-02\n-9.84070422636813547e-02\n-8.24249899171397293e-02\n-4.24521358838783405e-02\n1.44532561577934929e-02\n7.27994499512113202e-02\n1.11657824581856344e-01\n1.11831650094021143e-01\n6.56981913329461320e-02\n-1.44528300751686923e-02\n-9.55372449680807617e-02\n-1.34956080655869254e-01\n-1.03014505333520107e-01\n-6.47310595657406458e-03\n1.03722856123348375e-01\n1.54514895151016352e-01\n9.90458977415969166e-02\n-3.78286478049106312e-02\n-1.58882221139003937e-01\n-1.58854546676814506e-01\n-1.81686966252543464e-02\n1.56826806212769371e-01\n2.07585287904528348e-01\n6.78892628339773790e-02\n-1.59927460700302448e-01\n-2.95501892994287862e-01\n-2.57118148214008080e-01\n-1.26053413638430395e-01\n-2.84090322690470909e-02\n1.48922594060720281e-02\n2.57941499308122629e-02\n3.32516269077264767e-02\n3.91144183106556242e-02\n4.37022924962058718e-02\n4.68863959473586472e-02\n4.82827412452080107e-02\n4.73321886399717881e-02\n4.33755661435936135e-02\n3.57590259903936974e-02\n2.39864483520473570e-02\n7.92323713792136147e-03\n-1.19611385958636220e-02\n-3.43490696820637487e-02\n-5.68975156776898167e-02\n-7.62272532386227553e-02\n-8.81971770662758336e-02\n-8.85682025864303751e-02\n-7.40910364624110113e-02\n-4.39078426298942642e-02\n-9.44579838586466188e-04\n4.72630622015234800e-02\n8.90142323374464445e-02\n1.10763537615040444e-01\n1.01421630279419167e-01\n5.77887844424011948e-02\n-1.09143652073410511e-02\n-8.23095191037552520e-02\n-1.26473878729174843e-01\n-1.18202069285106889e-01\n-5.21314247191700386e-02\n4.73082595374555159e-02\n1.30363503683303184e-01\n1.44947119133439023e-01\n7.04457725809289198e-02\n-5.82085248686115553e-02\n-1.59606750666196895e-01\n-1.54858455543196299e-01\n-3.09272534602656329e-02\n1.32200269418357108e-01\n2.07819686054296515e-01\n1.21598493902494498e-01\n-7.77402950827352779e-02\n-2.51356248081769262e-01\n-2.89209519351964262e-01\n-2.00752696837109057e-01\n-8.39900722658515897e-02\n-1.66513121382108852e-02\n0.0\n5.62491262208151275e-04\n2.17851929091935920e-03\n5.14946625850179994e-03\n9.69619107548392624e-03\n1.59511611299238687e-02\n2.39219928746624982e-02\n3.34349475235401761e-02\n4.40654972110856510e-02\n5.50673876402886300e-02\n6.53188468533615063e-02\n7.33132124028904597e-02\n7.72288958080104976e-02\n7.51162844180617850e-02\n6.52311736447140356e-02\n4.65189643116818916e-02\n1.92057760343279857e-02\n-1.46182248701698658e-02\n-5.06207256902471980e-02\n-8.23191396604354003e-02\n-1.01913398811094000e-01\n-1.02019031247528924e-01\n-7.81850585399552073e-02\n-3.16481754659682507e-02\n2.87135650317380010e-02\n8.65761291979868508e-02\n1.21667313070154728e-01\n1.16723146027745736e-01\n6.62479633950927016e-02\n-1.66515351831611480e-02\n-1.00211419026448784e-01\n-1.44237660716960731e-01\n-1.19444078054408986e-01\n-2.78832148927839231e-02\n8.86864596114638887e-02\n1.63697748391397141e-01\n1.43039676911546398e-01\n2.57137100406008220e-02\n-1.22380873084804984e-01\n-2.01767417033683727e-01\n-1.46851730058590563e-01\n2.03314853326254444e-02\n1.99356775632374777e-01\n2.85505024532455520e-01\n2.48517817784060374e-01\n1.44337035276717984e-01\n5.26058937805552601e-02\n9.28083349948957345e-03\n1.56001691666086580e-02\n2.70202856032356262e-02\n3.48387734147912811e-02\n4.10122909656980422e-02\n4.59105637644100645e-02\n4.94506847773536623e-02\n5.12983703950097014e-02\n5.09452760077897943e-02\n4.77736033057303139e-02\n4.11422936692268509e-02\n3.05112387298217928e-02\n1.56100346659452261e-02\n-3.35441765767954293e-03\n-2.54749115793728095e-02\n-4.89524323575753970e-02\n-7.10090525488911439e-02\n-8.79989830591006300e-02\n-9.58143725239725963e-02\n-9.06503418305177194e-02\n-7.01103290275720409e-02\n-3.44914706995414627e-02\n1.20930961209694838e-02\n6.12692479946262622e-02\n1.01212452320941310e-01\n1.19127354381829559e-01\n1.05317905053635294e-01\n5.79607008649416153e-02\n-1.32171027331466386e-02\n-8.67041793609485412e-02\n-1.34337877578885739e-01\n-1.31862888527608163e-01\n-7.18575022228845062e-02\n2.71631338630706487e-02\n1.22592967297099661e-01\n1.64228110416743761e-01\n1.21072451763825875e-01\n4.89983567755442398e-03\n-1.26640468607759960e-01\n-1.96470203032705404e-01\n-1.53992511921052455e-01\n-1.16702121501655459e-02\n1.57424898329870999e-01\n2.65704775819053218e-01\n2.69236982297727412e-01\n1.91811107436512363e-01\n9.60452078126165232e-02\n3.09736799363359017e-02\n4.90987872374978873e-03\n0.0\n5.48498158366260771e-04\n2.12432423277796652e-03\n5.02215780265327476e-03\n9.46128807148313190e-03\n1.55821915030604323e-02\n2.34172442225949184e-02\n3.28434582028885244e-02\n4.35228015968165405e-02\n5.48384720585652213e-02\n6.58407669928201267e-02\n7.52228405272159506e-02\n8.13531619083185387e-02\n8.23953684041506679e-02\n7.65436689271374454e-02\n6.23882880349629215e-02\n3.93960914436685822e-02\n8.44432966297773563e-03\n-2.77160599648166757e-02\n-6.42537267744579116e-02\n-9.45308390751793404e-02\n-1.11057980408855256e-01\n-1.07204986382551576e-01\n-7.94924263451900620e-02\n-2.99349446432670488e-02\n3.24526521328053971e-02\n9.20606440329205661e-02\n1.29851076927026410e-01\n1.29320815077381135e-01\n8.39240532540932449e-02\n3.10472848930185615e-03\n-8.67329398129992740e-02\n-1.49126526033260681e-01\n-1.52049509159331325e-01\n-8.50665456205656062e-02\n2.96954183876472419e-02\n1.41531042533401569e-01\n1.92640122537168668e-01\n1.48824740470289846e-01\n2.19758263835631747e-02\n-1.32334191579799060e-01\n-2.44801736889461968e-01\n-2.72459976053683717e-01\n-2.21199236358417650e-01\n-1.34543365207152710e-01\n-5.92952574856165510e-02\n-1.71284992982310702e-02\n-2.45971672923581434e-03\n1.64429153501622453e-02\n2.84799648110352042e-02\n3.67278558354079410e-02\n4.32694660027908157e-02\n4.85320630693513930e-02\n5.24847750901445836e-02\n5.48497709219297330e-02\n5.51780604321128604e-02\n5.29046923226205723e-02\n4.74169796629104745e-02\n3.81514564817981017e-02\n2.47272611034863553e-02\n7.11526202824160330e-03\n-1.41696893208236984e-02\n-3.78823259602291823e-02\n-6.19148365229518910e-02\n-8.32863590307032081e-02\n-9.83322598011261845e-02\n-1.03163621846345047e-01\n-9.44288753887644189e-02\n-7.03307346644407860e-02\n-3.17327724921119478e-02\n1.69500448548414832e-02\n6.74986624753209086e-02\n1.08717856735812524e-01\n1.28631130329324855e-01\n1.17938277309860576e-01\n7.40299891041365232e-02\n4.20118074683116082e-03\n-7.36872157474006556e-02\n-1.34584830206546241e-01\n-1.53947678053781623e-01\n-1.17983357039952191e-01\n-3.24924382443085094e-02\n7.46827670446617159e-02\n1.61156796005114511e-01\n1.86701655258881161e-01\n1.32694243685177793e-01\n1.40607390265747919e-02\n-1.24825258539678408e-01\n-2.30670299231820308e-01\n-2.67871493999712662e-01\n-2.35197753957759104e-01\n-1.61834593455178533e-01\n-8.62873170984063270e-02\n-3.39824846031730882e-02\n-8.88060630692082825e-03\n-1.16348856064766768e-03\n0.0\n5.30609725571260004e-04\n2.05504263047317755e-03\n4.85915523561608002e-03\n9.15897288814560180e-03\n1.51015975118734339e-02\n2.27431375257869765e-02\n3.20109653695704877e-02\n4.26545616728838048e-02\n5.41907229484242733e-02\n6.58524456878566145e-02\n7.65555417042068642e-02\n8.49021211847460072e-02\n8.92440591679012074e-02\n8.78302081126508954e-02\n7.90554618540512399e-02\n6.18145480465026043e-02\n3.59360990046465809e-02\n2.63305928995019849e-03\n-3.51414879456336260e-02\n-7.25867717544111946e-02\n-1.03367616674606547e-01\n-1.20490296193644847e-01\n-1.17777404662577509e-01\n-9.17876759146493970e-02\n-4.37717761468413985e-02\n1.89957339032135186e-02\n8.32957548606036713e-02\n1.32101892483610206e-01\n1.48902401690526931e-01\n1.23452412014355917e-01\n5.71921010613177239e-02\n-3.41068153151580650e-02\n-1.22670655359999187e-01\n-1.76720235832964506e-01\n-1.72239549623298516e-01\n-1.03989176170568576e-01\n9.82804039964357140e-03\n1.32974445698053223e-01\n2.25644696703828113e-01\n2.61545886443258824e-01\n2.38579057116145715e-01\n1.77023451746317312e-01\n1.06577953399425898e-01\n5.07235021536944497e-02\n1.80609693762925384e-02\n4.30507632229777844e-03\n5.17751795535485249e-04\n1.74864330224293665e-02\n3.02873904379978680e-02\n3.90663780373621539e-02\n4.60607969260225097e-02\n5.17659797324104276e-02\n5.62109487440193845e-02\n5.91826322640219352e-02\n6.03017278218750119e-02\n5.90699783810464812e-02\n5.49221382367000716e-02\n4.72973755143849470e-02\n3.57380663998578471e-02\n2.00184230802292473e-02\n2.98090579364608305e-04\n-2.27143545640450042e-02\n-4.76160619105137559e-02\n-7.22250123958291385e-02\n-9.36099126678595489e-02\n-1.08293539848887815e-01\n-1.12677500024985638e-01\n-1.03703100767039993e-01\n-7.97023681608322598e-02\n-4.13074445328292655e-02\n7.80989191688415043e-03\n6.06739356099737920e-02\n1.07534510001399852e-01\n1.37408895755160243e-01\n1.40609459378901569e-01\n1.11852118914441634e-01\n5.31171900019202295e-02\n-2.48657773807792852e-02\n-1.03597163596998151e-01\n-1.60784108893421068e-01\n-1.76781620069197259e-01\n-1.41675396323594854e-01\n-6.02548339534654878e-02\n4.77665488793018733e-02\n1.53398295332060092e-01\n2.28390804571275419e-01\n2.55612018812937714e-01\n2.34934819975927467e-01\n1.81615055033113343e-01\n1.18042774119302446e-01\n6.34762792241196083e-02\n2.73266859184077629e-02\n8.87935993642363294e-03\n1.94392094343520216e-03\n2.15766167714653167e-04\n0.0\n5.07411732131303646e-04\n1.96519718821479804e-03\n4.64748609166309480e-03\n8.76466444746193743e-03\n1.44683793961409880e-02\n2.18366192779265653e-02\n3.08456502896442969e-02\n4.13320344553898197e-02\n5.29484242612799985e-02\n6.51188924415231490e-02\n7.70025728653092739e-02\n8.74778928808315481e-02\n9.51629537064285214e-02\n9.84895295351181643e-02\n9.58471095949991470e-02\n8.58074610632162810e-02\n6.74274422830147130e-02\n4.06070921357869624e-02\n6.45201423019287328e-03\n-3.24425219654944363e-02\n-7.18956696772360265e-02\n-1.06354019226514662e-01\n-1.29513515275781338e-01\n-1.35384082222831936e-01\n-1.19713635706116817e-01\n-8.15316709062852418e-02\n-2.44131157334038784e-02\n4.30371724003620476e-02\n1.07943479689029564e-01\n1.55392269847163589e-01\n1.71930099279408971e-01\n1.49561009707388670e-01\n8.90029082339673649e-02\n8.32791777700848425e-04\n-9.64157103000905513e-02\n-1.81124922704846425e-01\n-2.35063982881316441e-01\n-2.49100321220769444e-01\n-2.25750687618376855e-01\n-1.77350189357569382e-01\n-1.20620467414761540e-01\n-7.02071739407509748e-02\n-3.42111288553890447e-02\n-1.34587941517068082e-02\n-4.02130116651556839e-03\n-8.13377865998525279e-04\n-8.37211691061487011e-05\n1.88554363169361541e-02\n3.26585736998128082e-02\n4.21333148258553614e-02\n4.97168706112992853e-02\n5.59885844804093660e-02\n6.10483604352776779e-02\n6.47587816659401794e-02\n6.68233233457726228e-02\n6.68277388516441279e-02\n6.42781387829304135e-02\n5.86495117062790228e-02\n4.94521740625415915e-02\n3.63199979916820140e-02\n1.91202690286324632e-02\n-1.92043860273385068e-03\n-2.60872552175898942e-02\n-5.20665118715816014e-02\n-7.78844082659699011e-02\n-1.00932601197545060e-01\n-1.18120256415214356e-01\n-1.26184508405295992e-01\n-1.22170279457044284e-01\n-1.04053687992358895e-01\n-7.14323292353910011e-02\n-2.61481846377171236e-02\n2.73399124000931470e-02\n8.20352899832028915e-02\n1.29097476174098474e-01\n1.59203866121337828e-01\n1.64448327294182545e-01\n1.40422713058356963e-01\n8.79321274011913290e-02\n1.37212388193193105e-02\n-7.02760712892782774e-02\n-1.49275546895465627e-01\n-2.09133828340988009e-01\n-2.40021468680673949e-01\n-2.39040689577479121e-01\n-2.10763708795345311e-01\n-1.65383598156966349e-01\n-1.15140352470719576e-01\n-7.04493851342537225e-02\n-3.72758047369175227e-02\n-1.66381195788815953e-02\n-6.03017754404244419e-03\n-1.66730452175330602e-03\n-3.13183051768583913e-04\n-3.00212559867164393e-05\n0.0\n4.76344616053237576e-04\n1.84487476502975551e-03\n4.36367622186518110e-03\n8.23390779386844705e-03\n1.36084801485710054e-02\n2.05840441490408102e-02\n2.91825712928127229e-02\n3.93249852521199220e-02\n5.07990022505486125e-02\n6.32242508725575220e-02\n7.60193267603306716e-02\n8.83774440884547013e-02\n9.92594781316061270e-02\n1.07414990423765955e-01\n1.11442610335212272e-01\n1.09900023288771964e-01\n1.01469776732688019e-01\n8.51792456858934677e-02\n6.06609373215666187e-02\n2.84233358147864268e-02\n-9.91534721172704012e-03\n-5.14939833105706735e-02\n-9.22473986519756900e-02\n-1.27182011243950649e-01\n-1.50924776438309954e-01\n-1.58529207831449831e-01\n-1.46448366452292394e-01\n-1.13503026512089739e-01\n-6.16075665756455684e-02\n4.00263559849414492e-03\n7.52416599011607040e-02\n1.42395551524857195e-01\n1.95935729983530593e-01\n2.28533182142943908e-01\n2.36727789834724311e-01\n2.21713869249470230e-01\n1.88918120228640185e-01\n1.46431438885067822e-01\n1.02777552989565438e-01\n6.47712374882281616e-02\n3.61856904176426283e-02\n1.75963037547273923e-02\n7.25483659157938332e-03\n2.43849185732021882e-03\n6.27298893813121048e-04\n1.09917694537571876e-04\n9.85020686524445621e-06\n2.08289955721226092e-02\n3.60768786015435369e-02\n4.65528685077044521e-02\n5.49771148513173227e-02\n6.20407579427474237e-02\n6.79320901688749423e-02\n7.26052815096654980e-02\n7.58646414146457032e-02\n7.74030497530889677e-02\n7.68294728104993163e-02\n7.36985913177544277e-02\n6.75491383746510132e-02\n5.79548249320527772e-02\n4.45897036518761308e-02\n2.73074510173362262e-02\n6.23090914817040972e-03\n-1.81557762077613136e-02\n-4.49247432890693132e-02\n-7.26487685126271932e-02\n-9.93931744092141634e-02\n-1.22777383738059284e-01\n-1.40125321356012633e-01\n-1.48715085450720624e-01\n-1.46122593411671275e-01\n-1.30631628740478206e-01\n-1.01656475686244613e-01\n-6.00984892128404863e-02\n-8.54245909945325343e-03\n4.87982898239120860e-02\n1.06449667140095100e-01\n1.58360684263220336e-01\n1.98825942004219963e-01\n2.23484171672064469e-01\n2.30168380864270383e-01\n2.19374558557782567e-01\n1.94181035897613125e-01\n1.59586886277426482e-01\n1.21411495489801471e-01\n8.50484936999994362e-02\n5.44297422489101457e-02\n3.14890875816302498e-02\n1.62348404694373782e-02\n7.31639812276666402e-03\n2.80514408589182043e-03\n8.79271558989751559e-04\n2.11429109027174751e-04\n3.46971012107814584e-05\n2.91685832826379105e-06\n0.0\n4.31896106510079917e-04\n1.67272642780536430e-03\n3.95718037997871367e-03\n7.47103353321086280e-03\n1.23627138943709323e-02\n1.87416472171503430e-02\n2.66691075528481258e-02\n3.61435114948831793e-02\n4.70813303167948727e-02\n5.92949316702226156e-02\n7.24692175884142642e-02\n8.61397403349069973e-02\n9.96759450843529293e-02\n1.12274171122144897e-01\n1.22965839411565664e-01\n1.30646584995151110e-01\n1.34131610316979011e-01\n1.32240862475561660e-01\n1.23914442069902528e-01\n1.08353766937384327e-01\n8.51775927833543084e-02\n5.45746691555009864e-02\n1.74278245310991800e-02\n-2.46205140070287869e-02\n-6.91916694496898521e-02\n-1.13306816796555632e-01\n-1.53645116594960746e-01\n-1.86910617419589115e-01\n-2.10267018475353923e-01\n-2.21772416050781518e-01\n-2.20728037259997734e-01\n-2.07854390353097274e-01\n-1.85231398615175846e-01\n-1.55986027516674897e-01\n-1.23773102076792860e-01\n-9.21553856578944536e-02\n-6.40261786339401534e-02\n-4.12139315100855941e-02\n-2.43585755201571191e-02\n-1.30667638313637473e-02\n-6.26750667969418196e-03\n-2.63505306081311544e-03\n-9.44729626070161589e-04\n-2.77456671831615928e-04\n-6.26162918686398371e-05\n-9.65802594639678623e-06\n-7.64033831501560203e-07\n2.42485484508834677e-02\n4.19997179267257575e-02\n5.42069403661930571e-02\n6.40700685827684802e-02\n7.24546587495350780e-02\n7.96731663341725405e-02\n8.58003558379138859e-02\n9.07712028929252013e-02\n9.44213615823943364e-02\n9.65091551420559635e-02\n9.67323546076764157e-02\n9.47455860551009860e-02\n9.01815240331794998e-02\n8.26777481656084390e-02\n7.19102138616307396e-02\n5.76333167448124517e-02\n3.97253461523246545e-02\n1.82366801507085584e-02\n-6.56357060697871069e-03\n-3.41484434946402876e-02\n-6.37089315950371687e-02\n-9.41528978557473195e-02\n-1.24134921560314346e-01\n-1.52122946480937049e-01\n-1.76503705680806644e-01\n-1.95723040750634958e-01\n-2.08449879514817610e-01\n-2.13744873803385527e-01\n-2.11208237354149342e-01\n-2.01078281805749715e-01\n-1.84254579022102044e-01\n-1.62228863506342774e-01\n-1.36922461174575655e-01\n-1.10448797107431690e-01\n-8.48388674822191241e-02\n-6.17806453114713994e-02\n-4.24248623120653326e-02\n-2.72967847622520021e-02\n-1.63283333288338668e-02\n-8.99400884537790435e-03\n-4.50762199413636249e-03\n-2.02429979454405579e-03\n-7.98299948457628010e-04\n-2.68887327478906882e-04\n-7.42919848635683813e-05\n-1.57919860376600020e-05\n-2.29662128498339750e-06\n-1.71455859265662237e-07\n0.0\n3.57380722204089741e-04\n1.38412958535201881e-03\n3.27502496473395339e-03\n6.18665459054181313e-03\n1.02501191445925101e-02\n1.55744514779407265e-02\n2.22456079654132534e-02\n3.03225956693552318e-02\n3.98314303981202461e-02\n5.07574010979598214e-02\n6.30361364002453434e-02\n7.65441097967720363e-02\n9.10894326360958545e-02\n1.06404036236052463e-01\n1.22138599701828179e-01\n1.37861790951304491e-01\n1.53065493410281167e-01\n1.67177616255255235e-01\n1.79583753734357338e-01\n1.89658300020346227e-01\n1.96804601141032931e-01\n2.00502351471988360e-01\n2.00358818630292257e-01\n1.96158810715752863e-01\n1.87906894989807421e-01\n1.75854631989761617e-01\n1.60505918908186523e-01\n1.42595272597260653e-01\n1.23037141101039332e-01\n1.02848879926609516e-01\n8.30552009072948877e-02\n6.45866262420040083e-02\n4.81874575233386046e-02\n3.43488060257597858e-02\n2.32786751450067657e-02\n1.49142258603206755e-02\n8.97258816066612633e-03\n5.02819398099452804e-03\n2.59912987959418865e-03\n1.22428582029959635e-03\n5.17431702252395720e-04\n1.92266666921731076e-04\n6.10838446464008066e-05\n1.59338953752672913e-05\n3.20035929324402376e-06\n4.40096096995684586e-07\n3.10870985957491063e-08\n3.45668936494965134e-02\n5.98716160607579359e-02\n7.72898531918740084e-02\n9.14313211368404238e-02\n1.03618767598144881e-01\n1.14434183019696573e-01\n1.24173746035497273e-01\n1.32990626483754454e-01\n1.40953120007321603e-01\n1.48072636004625890e-01\n1.54319207640451539e-01\n1.59631490143474331e-01\n1.63924432788018826e-01\n1.67096264366605296e-01\n1.69035706965803945e-01\n1.69629929005627955e-01\n1.68773466566434382e-01\n1.66378095754873168e-01\n1.62383391740390931e-01\n1.56767452929685552e-01\n1.49557011765251296e-01\n1.40835923489179421e-01\n1.30750861548083991e-01\n1.19513003423070904e-01\n1.07394615712692584e-01\n9.47197844570194514e-02\n8.18491028959390660e-02\n6.91588994743471408e-02\n5.70164847244337275e-02\n4.57537790006222883e-02\n3.56423692501956699e-02\n2.68733313561865771e-02\n1.95448779515809308e-02\n1.36599762854758729e-02\n9.13459966108945073e-03\n5.81547252169993360e-03\n3.50443034631955008e-03\n1.98528493156420894e-03\n1.04873098894589793e-03\n5.11503044160784037e-04\n2.27539735279756289e-04\n9.08938383325316886e-05\n3.19457919705466042e-05\n9.60628635987577786e-06\n2.37319361346666858e-06\n4.51675943871189830e-07\n5.88845174303924777e-08\n3.94495233427173186e-09\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n1.61209358962557635e-02\n2.79222800378758976e-02\n3.58705158480625008e-02\n4.16048844856492933e-02\n4.48145796327992577e-02\n4.44149286908469970e-02\n3.88846143669453748e-02\n2.66859736735079213e-02\n6.95995292709915281e-03\n-1.94741915052292110e-02\n-4.90011512080948675e-02\n-7.44963573151986441e-02\n-8.59117125296132850e-02\n-7.31800333992487367e-02\n-3.18406489571631673e-02\n3.00613580110648190e-02\n8.81760864774469300e-02\n1.07758027232155801e-01\n6.36345166706011878e-02\n-3.19775709189640406e-02\n-1.16651005253576731e-01\n-1.09883142932446068e-01\n7.71332431866365419e-03\n1.33714841099003445e-01\n1.10916738461859427e-01\n-6.95642157350538637e-02\n-1.68350522024694554e-01\n8.72211081793769841e-03\n1.95222452862689577e-01\n-6.44875876953811787e-03\n-2.23734792511103536e-01\n1.15274523916961635e-01\n1.70164055536562803e-01\n-3.24324435249283838e-01\n2.85949691658487493e-01\n-1.70491924010590684e-01\n7.62429970756964143e-02\n-2.67770107990213009e-02\n7.56631678646896202e-03\n-1.74273729462005931e-03\n3.29187814148754535e-04\n-5.10371019690731382e-05\n6.46978807841743947e-06\n-6.64720927878313834e-07\n5.45366401009141272e-08\n-3.49079689082634680e-09\n1.68050920657414398e-10\n-5.72522385959717556e-12\n1.23088840053332011e-13\n0.0\n1.08472742381388542e-03\n4.20113124760565244e-03\n9.90251969648426981e-03\n1.84771170763622303e-02\n2.97864244518314635e-02\n4.29935124003884145e-02\n5.62502048776087268e-02\n6.64805016337743915e-02\n6.94951639769335328e-02\n6.07489836031443048e-02\n3.70087187849701890e-02\n-1.10930973807619473e-03\n-4.64683006843350233e-02\n-8.43432667407494757e-02\n-9.54507151085634276e-02\n-6.49196479072799287e-02\n4.37546628453371750e-03\n8.19387104591040999e-02\n1.16402125826386982e-01\n6.80514713575707669e-02\n-4.51112437681951695e-02\n-1.31643108854483243e-01\n-9.06119505406491887e-02\n6.35740425963955968e-02\n1.55664101856450132e-01\n3.25463011982652650e-02\n-1.61062963962556399e-01\n-9.14113873640488572e-02\n1.71651781820813254e-01\n9.17992460712520608e-02\n-2.26861122079491717e-01\n2.74638834186305171e-02\n2.38715686972268110e-01\n-3.27133758028667621e-01\n2.52461693632194173e-01\n-1.37970366908697711e-01\n5.77226737959510572e-02\n-1.91900278708997951e-02\n5.17285234812659821e-03\n-1.14295039404465238e-03\n2.07983783328855249e-04\n-3.11689067087047306e-05\n3.82973710685585953e-06\n-3.82261697502359940e-07\n3.05284349905734929e-08\n-1.90534375715001719e-09\n8.95713424979161803e-11\n-2.98382267775662102e-12\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n1.49153584618682711e-02\n2.58341586690582249e-02\n3.32116220033397275e-02\n3.86332886759592903e-02\n4.19352060972968538e-02\n4.22859974032437497e-02\n3.84603343591977051e-02\n2.91354456526192324e-02\n1.33735769422542814e-02\n-8.66375493142438995e-03\n-3.48542512856124601e-02\n-6.03977488262971221e-02\n-7.77935527381269643e-02\n-7.82387419341021156e-02\n-5.50015082023348201e-02\n-8.46471169411793130e-03\n4.91546484099385228e-02\n9.33789301143736900e-02\n9.58451624442848149e-02\n4.24753634491714521e-02\n-4.65584996049520222e-02\n-1.13675365442407250e-01\n-9.62111172949670912e-02\n1.20719355238242849e-02\n1.22543885941844538e-01\n1.08867617260667501e-01\n-4.32122795008925698e-02\n-1.55525846583246002e-01\n-4.44856381102336565e-02\n1.56679204868117705e-01\n9.27910168036672200e-02\n-1.70832186850680245e-01\n-8.35132884230644357e-02\n2.25539034459328630e-01\n-4.43192212140970654e-02\n-2.19269242183260410e-01\n3.21854692028745448e-01\n-2.60382927692662802e-01\n1.49103608459652814e-01\n-6.56033227650731493e-02\n2.30603343843918986e-02\n-6.61577618876218760e-03\n1.56781788023062688e-03\n-3.08791591122133168e-04\n5.06329993144556269e-05\n-6.89739006530945087e-06\n7.75957347905360304e-07\n-7.13509751266757394e-08\n5.27725011601396538e-09\n0.0\n9.31231485683661287e-04\n3.60664403551681084e-03\n8.50602400394575263e-03\n1.59003845831766355e-02\n2.57379331178424903e-02\n3.74429022893153773e-02\n4.96727203528201863e-02\n6.01209842233804345e-02\n6.55188921569456323e-02\n6.20485584438564761e-02\n4.63832477729556533e-02\n1.74258908623226814e-02\n-2.15613643306100528e-02\n-6.13677159501424679e-02\n-8.73740714402345270e-02\n-8.39387467097887224e-02\n-4.30735753536244936e-02\n2.54205416613427181e-02\n8.96319597239925298e-02\n1.06347499921684005e-01\n5.01739831038397407e-02\n-5.32299261477481092e-02\n-1.23700123221912733e-01\n-8.28396897050736464e-02\n5.28775536891320994e-02\n1.43085570967639686e-01\n5.61977132639769339e-02\n-1.23816025006318567e-01\n-1.28765238917973951e-01\n9.31608526655434005e-02\n1.63492650510438126e-01\n-1.06861882743359851e-01\n-1.62491258203155242e-01\n1.96459220801137896e-01\n4.41807868984634908e-02\n-2.70804866571520197e-01\n3.14111437351427047e-01\n-2.26653503225050040e-01\n1.19973760107645350e-01\n-4.96384679318883706e-02\n1.65764998398732176e-02\n-4.54921289331997394e-03\n1.03647975975075567e-03\n-1.97023114024771396e-04\n3.12759943321989361e-05\n-4.13512897657961669e-06\n4.52475045531942631e-07\n-4.05416570728018729e-08\n1.43777569708202595e-02\n2.49030055723382868e-02\n3.20241391194280023e-02\n3.72974845927544901e-02\n4.06152788003067144e-02\n4.12469981677631645e-02\n3.80894651196160700e-02\n2.99194085580377495e-02\n1.57993522034117762e-02\n-4.31517771917421140e-03\n-2.88220876552163947e-02\n-5.37917648096591025e-02\n-7.27911056336408430e-02\n-7.78161961653911771e-02\n-6.18701345505245498e-02\n-2.31473894348842094e-02\n3.04712415861172134e-02\n7.95784299783008076e-02\n9.79793594829876519e-02\n6.62013595841483837e-02\n-1.01366735611861086e-02\n-9.00695223148912649e-02\n-1.12669303433649726e-01\n-4.35757786692612045e-02\n7.51257672105125202e-02\n1.31616512123554658e-01\n4.53222230864318842e-02\n-1.08967468117454849e-01\n-1.32009261739255868e-01\n4.32492143900964215e-02\n1.68583483746367474e-01\n-4.95860838676729612e-04\n-1.90872213045075706e-01\n1.82535323398093745e-02\n2.11291135876981784e-01\n-1.37916296458020726e-01\n-1.28093668673017136e-01\n3.02456209424165012e-01\n-2.94592455276951548e-01\n1.92516908674200599e-01\n-9.48536585274937644e-02\n3.70547561402915435e-02\n-1.17879528857685115e-02\n3.10082494275918654e-03\n-6.80272138343880183e-04\n1.24958469858303054e-04\n-1.92235153228191411e-05\n2.46897240487582682e-06\n-2.62966415975796246e-07\n0.0\n8.66426047764572247e-04\n3.35565365371250004e-03\n7.91595443084362749e-03\n1.48087344978574294e-02\n2.40121934498882007e-02\n3.50470844797412806e-02\n4.67621537451883285e-02\n5.71499205294307838e-02\n6.33170572602049370e-02\n6.17867458500735156e-02\n4.93218215401066487e-02\n2.43605773569875866e-02\n-1.11229334763188505e-02\n-5.00111894576902583e-02\n-7.99363085453422689e-02\n-8.61829356704906652e-02\n-5.84006514722387668e-02\n3.58940229482583790e-04\n6.73683490910404748e-02\n1.04547897847195384e-01\n7.88234561964203106e-02\n-7.40196344727409722e-03\n-9.89024440883266159e-02\n-1.13935536034450863e-01\n-1.85003343777218332e-02\n1.09092261688568531e-01\n1.21812489154465700e-01\n-2.46754972559795824e-02\n-1.53724638728997859e-01\n-5.40369786300443355e-02\n1.52844124485932903e-01\n9.28820650447581553e-02\n-1.70534777166072682e-01\n-7.46582530210958273e-02\n2.23693329402952251e-01\n-6.04428648778068539e-02\n-1.99685494680094167e-01\n3.15424575732297374e-01\n-2.67266406134381240e-01\n1.60001492639403331e-01\n-7.37993799662758493e-02\n2.73166714846003918e-02\n-8.29850452787562164e-03\n2.09615300256646431e-03\n-4.43432899576971730e-04\n7.88025564301329763e-05\n-1.17598018378681031e-05\n1.46840532288154851e-06\n1.38775648385890491e-02\n2.40366473857676205e-02\n3.09183376927323894e-02\n3.60490110866975577e-02\n3.93682703078880453e-02\n4.02329121180229968e-02\n3.76476647717502236e-02\n3.04822304143598788e-02\n1.78148420603687456e-02\n-5.49493293180977941e-04\n-2.34201922161959911e-02\n-4.75864693423993304e-02\n-6.75475918537538356e-02\n-7.61070536215102539e-02\n-6.63258440415665507e-02\n-3.49512535853378145e-02\n1.34896496535111023e-02\n6.41090627526678253e-02\n9.38543479865088931e-02\n8.10994027666576967e-02\n2.12923912180304903e-02\n-5.98341884997285189e-02\n-1.10030524056409784e-01\n-8.17948212774060879e-02\n1.99064348515343645e-02\n1.15539923940430250e-01\n1.02747525542351975e-01\n-2.93739623914508752e-02\n-1.40726818170722717e-01\n-7.11091388755753090e-02\n1.14989793196907664e-01\n1.32918431505860218e-01\n-8.91485417184468554e-02\n-1.61387508240006416e-01\n1.10055601699331984e-01\n1.53322920048835964e-01\n-2.00539512712679835e-01\n-2.47180274398806563e-02\n2.54306170934802567e-01\n-3.12462048980774121e-01\n2.35681063632035087e-01\n-1.30404128946413900e-01\n5.65779096716872779e-02\n-1.99041935277297147e-02\n5.78688142169448989e-03\n-1.40596016281522413e-03\n2.87177007748359088e-04\n-4.94265797875079928e-05\n7.16154736544994108e-06\n0.0\n8.08158692357310599e-04\n3.12998515659262738e-03\n7.38517565765236562e-03\n1.38253132323069294e-02\n2.24522063937610157e-02\n3.28663626392668440e-02\n4.40769909960377140e-02\n5.43310572767096295e-02\n6.10631553167534161e-02\n6.11141009975940397e-02\n5.13829153896229324e-02\n3.00123716038778396e-02\n-1.99912992044341299e-03\n-3.92489735818099539e-02\n-7.14187172449028823e-02\n-8.50885006321546455e-02\n-6.88163708654151857e-02\n-2.08639639470989055e-02\n4.38628639737179971e-02\n9.38928414443414711e-02\n9.42769126266735230e-02\n3.17951926171456817e-02\n-6.21820057935563927e-02\n-1.16966777520081694e-01\n-7.26997949309666769e-02\n4.94382434631666159e-02\n1.32194169549408602e-01\n6.57987478019158994e-02\n-9.54888521638002780e-02\n-1.38115365160155934e-01\n3.28530164558279297e-02\n1.67792257114968257e-01\n1.30048521074447709e-03\n-1.88742910768606664e-01\n2.51320701310050465e-02\n2.04395439678626667e-01\n-1.48084466488224709e-01\n-1.07469414759672199e-01\n2.90187851909712802e-01\n-2.97112519021647759e-01\n2.02734630972090352e-01\n-1.04415761978296190e-01\n4.27882747157801516e-02\n-1.43458775463353033e-02\n3.99957789855817213e-03\n-9.36072935882141456e-04\n1.84837054632843502e-04\n-3.08416262176218977e-05\n1.34110082930648730e-02\n2.32285477443159236e-02\n2.98860996156072034e-02\n3.48797786352970374e-02\n3.81892381353554425e-02\n3.92471829809435888e-02\n3.71538730595828426e-02\n3.08652396800451999e-02\n1.94853920143133394e-02\n2.71067763950077643e-03\n-1.85941472802291646e-02\n-4.18117164742240754e-02\n-6.22489782046764320e-02\n-7.34866557189156611e-02\n-6.88453932610847419e-02\n-4.41692459922658903e-02\n-1.44841254473590249e-03\n4.82920127323606951e-02\n8.54732402365532690e-02\n8.84366022550501923e-02\n4.60942565993381487e-02\n-2.84199156167113630e-02\n-9.42883172993594504e-02\n-1.01381495453162399e-01\n-2.96036179517285072e-02\n7.66130663644214172e-02\n1.22433390068403120e-01\n4.51895108778233440e-02\n-9.32860515212398239e-02\n-1.30432938504764340e-01\n8.20081992916101184e-03\n1.50931262377177272e-01\n6.15593609328448504e-02\n-1.49611746144722862e-01\n-9.18975497050685541e-02\n1.70628068600010147e-01\n6.53278764412299484e-02\n-2.21263159722001834e-01\n7.57862766012597222e-02\n1.80014718123662432e-01\n-3.07891757591403803e-01\n2.73094737512334595e-01\n-1.70599706631793829e-01\n8.22652000962103558e-02\n-3.19530648553026098e-02\n1.02346436629410040e-02\n-2.74111767299379172e-03\n6.18871018623259623e-04\n-1.18270476635209712e-04\n0.0\n7.55578464447109483e-04\n2.92634280955662808e-03\n6.90600803386339640e-03\n1.29363301645774482e-02\n2.10376912150042061e-02\n3.08768238070765318e-02\n4.15981793573545200e-02\n5.16661080793066330e-02\n5.88016781035636607e-02\n6.01379024888682168e-02\n5.27364110527306224e-02\n3.45666630592795301e-02\n5.89504268914013262e-03\n-2.92676596633310200e-02\n-6.24162654054860599e-02\n-8.15792688582036157e-02\n-7.50796503474488591e-02\n-3.79476884562384292e-02\n2.12328594092512056e-02\n7.78173934473776197e-02\n9.85941154417065702e-02\n6.11661690096663643e-02\n-2.27622778192744200e-02\n-9.97514518334322170e-02\n-1.02888652254910673e-01\n-1.20807026464689049e-02\n1.01582609251291395e-01\n1.16455313123635898e-01\n-7.60805900020450863e-03\n-1.36066500744180863e-01\n-8.31897960486304849e-02\n1.06895594388378215e-01\n1.35737035387122340e-01\n-8.63403634785164936e-02\n-1.58775958565095188e-01\n1.13751535305377419e-01\n1.43731725270911131e-01\n-2.03878873206384398e-01\n-5.87789561754199080e-03\n2.37332244484061344e-01\n-3.09605303113029973e-01\n2.43864155193219856e-01\n-1.40753686636728131e-01\n6.38573489205692818e-02\n-2.35822619253083440e-02\n7.23183722090403863e-03\n-1.86373746531689035e-03\n4.06441530104206740e-04\n1.29748054686915099e-02\n2.24730222900962166e-02\n2.89203461319294045e-02\n3.37826407529563943e-02\n3.70735126894599989e-02\n3.82919041663993959e-02\n3.66228457513421216e-02\n3.11018434056461596e-02\n2.08653287286152261e-02\n5.53264392040760718e-03\n-1.42895581155332158e-02\n-3.64739506209946773e-02\n-5.70233928495285022e-02\n-7.02447669803473451e-02\n-6.98370196395160514e-02\n-5.11337981637504588e-02\n-1.42477991111946978e-02\n3.30013896722816877e-02\n7.44602317259308727e-02\n8.97290798516149624e-02\n6.39803196454571954e-02\n6.62474845402085603e-04\n-7.10490049723025152e-02\n-1.04847538399907528e-01\n-6.65156398254121844e-02\n2.96532524782836850e-02\n1.11007041881736518e-01\n9.45749629830308775e-02\n-2.38279879721052038e-02\n-1.28234838250946004e-01\n-8.24577640711691290e-02\n8.23317247801187702e-02\n1.42175992978541416e-01\n-2.41581778919936797e-02\n-1.66715290509307251e-01\n-1.84857047327893786e-03\n1.86598635661632206e-01\n-3.24707273638021668e-02\n-1.97016254977558036e-01\n1.57410216168006767e-01\n8.71802154448902689e-02\n-2.77107459087616137e-01\n2.98443743036724329e-01\n-2.12349568381580645e-01\n1.14072596639249596e-01\n-4.88924014404793078e-02\n1.72137962728052020e-02\n-5.06403020522973486e-03\n1.25767326300073334e-03\n0.0\n7.07968919879669407e-04\n2.74195183632641249e-03\n6.47197915008972113e-03\n1.21301215034378112e-02\n1.97513418867822747e-02\n2.90576122914198050e-02\n3.93078948128158523e-02\n4.91529312923627074e-02\n5.65642793306825042e-02\n5.89415420970440390e-02\n5.35217756924372609e-02\n3.81887817485067199e-02\n1.26659949759070026e-02\n-2.01568987435157693e-02\n-5.33481670784791764e-02\n-7.64033278226932677e-02\n-7.79635699882852834e-02\n-5.10204204931128738e-02\n7.47643123710400523e-04\n5.90477008881361148e-02\n9.43974909998922390e-02\n8.01098357676124778e-02\n1.32861346777651407e-02\n-7.08424581564762457e-02\n-1.10292528973366680e-01\n-6.09612476458850361e-02\n5.06065876711149221e-02\n1.23451346360081454e-01\n6.74740004734910026e-02\n-7.65659695416601727e-02\n-1.35657560245702746e-01\n-6.18620382249574895e-03\n1.47624561263614895e-01\n6.73651110180471385e-02\n-1.46985866390008907e-01\n-9.00016395422759963e-02\n1.70993009433043491e-01\n5.56035805324288437e-02\n-2.18204070129346339e-01\n9.03043379246463856e-02\n1.60312460873671569e-01\n-2.99307386087245553e-01\n2.77854252255240353e-01\n-1.80836695877911735e-01\n9.09536775114926088e-02\n-3.69603425986826106e-02\n1.24360900792494112e-02\n-3.51588739836415122e-03\n1.25661466558436574e-02\n2.17652044632829569e-02\n2.80150062571140335e-02\n3.27514161822084690e-02\n3.60168868929747685e-02\n3.73683630794738042e-02\n3.60662699372652357e-02\n3.12192992872490603e-02\n2.20000206047992648e-02\n7.97473334455217620e-03\n-1.04543352284057704e-02\n-3.15647687851015046e-02\n-5.19569145151902098e-02\n-6.66029280087592351e-02\n-6.96424612031596030e-02\n-5.61777520150046616e-02\n-2.49651581307863066e-02\n1.87766403035107346e-02\n6.20634553202547151e-02\n8.64633048398626564e-02\n7.54420322410810779e-02\n2.54618355144539711e-02\n-4.47958494108900429e-02\n-9.61977156022935653e-02\n-8.88451224452590088e-02\n-1.47233698346288400e-02\n7.98960903572824427e-02\n1.13931940712146490e-01\n4.05721973743368644e-02\n-8.42092880298540430e-02\n-1.24927199043248185e-01\n-1.19414511574037520e-02\n1.30007254395747895e-01\n9.28704550575974314e-02\n-9.96727413119476713e-02\n-1.37511751700212986e-01\n8.45964677060943998e-02\n1.55717926937366413e-01\n-1.17808812292508600e-01\n-1.33745115678122001e-01\n2.06430343453287535e-01\n-1.22947768465601660e-02\n-2.19946794899411407e-01\n3.05577929146004845e-01\n-2.51169651560802509e-01\n1.50960973235375301e-01\n-7.14420574018708454e-02\n2.76104349779733582e-02\n-8.89766896044202893e-03\n0.0\n6.64742547961990086e-04\n2.57453681777227274e-03\n6.07777837718820411e-03\n1.13970985846824739e-02\n1.85788629616948676e-02\n2.73913037077375097e-02\n3.71907419815233828e-02\n4.67882666460035165e-02\n5.43746957663158934e-02\n5.75914454652977914e-02\n5.38546858670428813e-02\n4.10247396925074309e-02\n1.84282210356082228e-02\n-1.19422628264394086e-02\n-4.45013773572812271e-02\n-7.01508507769745965e-02\n-7.81870400960310574e-02\n-6.04470319649014071e-02\n-1.69404599976778203e-02\n3.95871778488628631e-02\n8.42666858870128460e-02\n8.95323486436275379e-02\n4.26490455625482823e-02\n-3.74719059305926167e-02\n-1.00048725113749626e-01\n-9.12468324615194892e-02\n-3.07979877741316370e-03\n9.77471901555117262e-02\n1.09502604576366347e-01\n2.77201650362112395e-04\n-1.21180638215344832e-01\n-9.57251204590735677e-02\n6.99278054186460996e-02\n1.44717915674306308e-01\n-1.70172861384464760e-02\n-1.65497993065239685e-01\n-1.32775751916530292e-03\n1.84402706902079550e-01\n-4.01510972893291962e-02\n-1.89150404141168849e-01\n1.65854326679962222e-01\n6.72831005549821282e-02\n-2.63291450240694891e-01\n2.98613799301532423e-01\n-2.21321864606514956e-01\n1.23772395209361494e-01\n-5.53464639544047551e-02\n2.03985363571596579e-02\n1.21844242022076162e-02\n2.11040417791954760e-02\n2.71688840031744303e-02\n3.17854601503271064e-02\n3.50207840675973575e-02\n3.64827026432595070e-02\n3.54987513366590637e-02\n3.12446615655023810e-02\n2.29309850173131345e-02\n1.00890449272632576e-02\n-7.04067238616489996e-03\n-2.70703776975420272e-02\n-4.71118361065274369e-02\n-6.27379588057240950e-02\n-6.85532898007445157e-02\n-5.96222472645595580e-02\n-3.37497684269814149e-02\n5.91634886996298282e-03\n4.92065090084341863e-02\n7.99706114382144617e-02\n8.13706375843076257e-02\n4.51593181906167901e-02\n-1.87403864173188196e-02\n-7.95988734613056470e-02\n-9.76284316455736517e-02\n-5.04092287862489344e-02\n4.02297445685870711e-02\n1.07620280039529337e-01\n8.51147207099406528e-02\n-2.37300118042077235e-02\n-1.18830931177732926e-01\n-8.54070894996305646e-02\n5.99219558133680386e-02\n1.38323291306008123e-01\n1.85904920586029455e-02\n-1.44163121474296635e-01\n-7.17407782477282041e-02\n1.44962322777007102e-01\n8.73504062555000710e-02\n-1.71552343432749943e-01\n-4.55842529359288540e-02\n2.14535361072955871e-01\n-1.03960887628606780e-01\n-1.40697167002384549e-01\n2.89815248907016487e-01\n-2.81614819657196147e-01\n1.90705147339791159e-01\n-9.98426050836159762e-02\n4.23371132786890467e-02\n0.0\n6.25783624920583578e-04\n2.42364955764672908e-03\n5.72239650210802989e-03\n1.07356650906248047e-02\n1.75187223893345650e-02\n2.58785724296280821e-02\n3.52543044289942015e-02\n4.45947657849871393e-02\n5.22819918728598051e-02\n5.61745765868260361e-02\n5.38640469088837032e-02\n4.32293545153965564e-02\n2.33121131377707139e-02\n-4.60786156945293401e-03\n-3.60829730617963848e-02\n-6.33124820285666107e-02\n-7.64283957369181061e-02\n-6.67448626113448240e-02\n-3.16267366976061420e-02\n2.08126026815137755e-02\n7.04809255588662587e-02\n9.11162734966226850e-02\n6.41010352206188155e-02\n-4.85952640000287400e-03\n-7.83987952006687250e-02\n-1.02943737656756337e-01\n-4.80600159031317337e-02\n5.46175636859548216e-02\n1.16459113600081515e-01\n6.45900231310437833e-02\n-6.52711975693757024e-02\n-1.29286658093936579e-01\n-2.91719040895218502e-02\n1.23295253021584755e-01\n1.00660910763985520e-01\n-9.34160806218832102e-02\n-1.38608788194297172e-01\n8.38039644263440936e-02\n1.52429000161304229e-01\n-1.22156109964195569e-01\n-1.23593431750747551e-01\n2.08345731936254219e-01\n-2.96571269958538150e-02\n-2.02585459013075092e-01\n3.00860135132263118e-01\n-2.57915164221621196e-01\n1.61172630328368233e-01\n-7.93937534231888981e-02\n1.18530694970827126e-02\n2.05301185945921394e-02\n2.64343744172929745e-02\n3.09467714208474728e-02\n3.41554983402627965e-02\n3.57125068461601886e-02\n3.50039300739192760e-02\n3.12652225864050171e-02\n2.37438723002475170e-02\n1.19487479776030341e-02\n-4.00736153009900210e-03\n-2.30113770166326531e-02\n-4.26074291405929423e-02\n-5.88980665233242301e-02\n-6.69424869951827511e-02\n-6.18880661377247190e-02\n-4.08915744596714190e-02\n-5.48044452769921343e-03\n3.65920921861552645e-02\n7.14935432204505811e-02\n8.29641777536851976e-02\n5.98262345718547847e-02\n5.10146239972944157e-03\n-5.87688998596547149e-02\n-9.55806611741952528e-02\n-7.51092689381254452e-02\n4.94450568320923211e-04\n8.39225518767595380e-02\n1.05816336870322172e-01\n3.32499759182606491e-02\n-8.00113311640941738e-02\n-1.18658957623068481e-01\n-2.22635309318958557e-02\n1.12415907885850014e-01\n1.06485668942079406e-01\n-5.85243293055144956e-02\n-1.46623787809074091e-01\n1.10800873039999768e-02\n1.64738242225088705e-01\n1.90964748376303917e-04\n-1.82753035950228682e-01\n4.78472062718415594e-02\n1.81721137776490349e-01\n-1.73747068625386414e-01\n-4.87217927645184762e-02\n2.50528577831461374e-01\n-2.99365393142775660e-01\n2.30831138363504190e-01\n-1.34136525275782514e-01\n0.0\n5.93822712355591108e-04\n2.29986547555292159e-03\n5.43084990507120783e-03\n1.01930392979876962e-02\n1.66490051039753749e-02\n2.46376053053779763e-02\n3.36660872455886440e-02\n4.27972480705662434e-02\n5.05726409695142071e-02\n5.50352149818271949e-02\n5.39325608466929146e-02\n4.51790966971380367e-02\n2.76092437334175926e-02\n1.94090831540210491e-03\n-2.83171829585718363e-02\n-5.65024921511330103e-02\n-7.36158671533893305e-02\n-7.08383834228030196e-02\n-4.36743185912621332e-02\n3.49613250873967484e-03\n5.50426322691821082e-02\n8.71542880967819678e-02\n7.82262844505967753e-02\n2.40347916579190177e-02\n-5.11187467160214293e-02\n-9.97352199597294903e-02\n-7.94913212346766151e-02\n7.29441285701913633e-03\n9.67445619578310850e-02\n1.02754849017784824e-01\n2.48196861648198458e-03\n-1.10886012684349305e-01\n-1.00429290006288169e-01\n4.38199695933041422e-02\n1.40262479648549099e-01\n3.00978310839983589e-02\n-1.41681703499634798e-01\n-7.63667433211952379e-02\n1.44281022909345052e-01\n8.59019382852316410e-02\n-1.73434841619024116e-01\n-3.73292884278164858e-02\n2.12978140587167103e-01\n-1.16256705337440175e-01\n-1.25696581689869080e-01\n2.85673959016963852e-01\n-2.89766507238061521e-01\n2.03650156895927970e-01\n1.16945265489358137e-02\n2.02555141532199529e-02\n2.60847736570189240e-02\n3.05563662825127300e-02\n3.37783635000828766e-02\n3.54381077153325119e-02\n3.49673595321136135e-02\n3.16474431835049863e-02\n2.47534889853266160e-02\n1.37752046013921957e-02\n-1.27680523678786535e-03\n-1.95085823015726349e-02\n-3.88113534961740322e-02\n-5.57198382656767729e-02\n-6.56802089127736244e-02\n-6.39492881917757133e-02\n-4.72202825257884845e-02\n-1.57552767329439611e-02\n2.46923244147713196e-02\n6.24027730675742187e-02\n8.20728490154395834e-02\n7.07705063969594761e-02\n2.62381306242213293e-02\n-3.65055513932221742e-02\n-8.63876017767572918e-02\n-8.99580116307417132e-02\n-3.48398665472914593e-02\n5.11447687058375622e-02\n1.06187410808955301e-01\n7.66307920521250296e-02\n-2.67675036238685139e-02\n-1.13896375741701320e-01\n-8.62065522171022586e-02\n4.55882497077189155e-02\n1.32808403432233824e-01\n4.65877743254715371e-02\n-1.17451648527558405e-01\n-1.10494786520186086e-01\n8.77756236219326413e-02\n1.43517886517552151e-01\n-8.27239668996636035e-02\n-1.54478033896394390e-01\n1.26378466213373952e-01\n1.20861759223096860e-01\n-2.14231721472543130e-01\n3.96519958441602580e-02\n2.01158298649884881e-01\n-3.13157786374231584e-01\n2.77739882776063152e-01\n0.0\n5.76073802465342085e-04\n2.23112424313465143e-03\n5.26918194310875814e-03\n9.89358406971376121e-03\n1.61743186212162035e-02\n2.39752679673071803e-02\n3.28548521880518626e-02\n4.19599315667763609e-02\n4.99484037176225262e-02\n5.49957802944622820e-02\n5.49578760034324723e-02\n4.77624915131667147e-02\n3.20684930157249110e-02\n8.14054196166627379e-03\n-2.12672604420743282e-02\n-5.04217048610841947e-02\n-7.10732815538834412e-02\n-7.43938630798686440e-02\n-5.44971621237624257e-02\n-1.27491117137595224e-02\n3.91412938401353439e-02\n8.01427773241307762e-02\n8.73617337759759333e-02\n4.92215855841050751e-02\n-2.16428542446739300e-02\n-8.64199623366859598e-02\n-9.82342602931657594e-02\n-3.71983513668598040e-02\n6.06348753280985114e-02\n1.14464140356646094e-01\n6.32565043583269010e-02\n-5.92212675354608434e-02\n-1.27067420230358746e-01\n-4.65511961573256347e-02\n1.03438435133456047e-01\n1.21482626138303809e-01\n-4.49157004045674588e-02\n-1.54210946791765363e-01\n-3.25990606045032749e-04\n1.70523334574084140e-01\n7.51032158949563843e-03\n-1.90443160119549815e-01\n4.59701330886666815e-02\n1.92093094255355867e-01\n-1.80824420673699610e-01\n-5.91794426749381319e-02\n2.81982229930363981e-01\n-3.41463581276980843e-01\n1.18522934280085000e-02\n2.05287744035254210e-02\n2.64405812019558421e-02\n3.09917043971918160e-02\n3.43123811478276142e-02\n3.61160545782688788e-02\n3.58640677072452063e-02\n3.28644623033232733e-02\n2.64030513558659620e-02\n1.59434783337065664e-02\n1.40733259574605022e-03\n-1.64875186322432539e-02\n-3.59019518534851242e-02\n-5.36990818126175454e-02\n-6.56101213713616155e-02\n-6.69513456480962804e-02\n-5.40140933641473572e-02\n-2.60040609430671095e-02\n1.30100253602872841e-02\n5.31625599953143568e-02\n8.01712336972991574e-02\n7.99616151932024399e-02\n4.60575224755236379e-02\n-1.31230377600404548e-02\n-7.22283556370586083e-02\n-9.73861039308427795e-02\n-6.56563737156156402e-02\n1.32430717955049453e-02\n9.06977185250978091e-02\n1.04428068574215965e-01\n3.00261041151216775e-02\n-7.97532463398091251e-02\n-1.20368777616852288e-01\n-3.42910974814943856e-02\n1.00601843978430500e-01\n1.21735547311057790e-01\n-2.10102850383322090e-02\n-1.47400899848734612e-01\n-5.36426215293535485e-02\n1.41257640541434248e-01\n9.81566082770703452e-02\n-1.43242744643670622e-01\n-1.08089353474929720e-01\n1.78365221244415617e-01\n6.18639723537762268e-02\n-2.35740844672730793e-01\n9.82182928065781918e-02\n1.94120380951230992e-01\n-3.81412376021893706e-01\n0.0\n5.71828152878099856e-04\n2.21468091298942940e-03\n5.23099691300298996e-03\n9.82581757479722602e-03\n1.60778035120235016e-02\n2.38718689362975717e-02\n3.28059509202688546e-02\n4.20894103954294607e-02\n5.04641835653301049e-02\n5.61976464805642659e-02\n5.72122352948369606e-02\n5.14203471808114126e-02\n3.73077368943503865e-02\n1.47362794506720393e-02\n-1.41931395133044567e-02\n-4.45508004100131430e-02\n-6.87523280311627127e-02\n-7.80094550218538435e-02\n-6.52937540933903604e-02\n-2.93511401371473607e-02\n2.17500357370149049e-02\n7.00275143720184151e-02\n9.24588450869165690e-02\n7.18849174419902703e-02\n1.03068781877516530e-02\n-6.39082722951336835e-02\n-1.04807535991097378e-01\n-7.65943797537368409e-02\n1.27070823648193325e-02\n1.00539828566882775e-01\n1.07432607814497372e-01\n1.13279800987674869e-02\n-1.06141853996877908e-01\n-1.15941074743471026e-01\n1.38148716352676695e-02\n1.38593016629581733e-01\n8.13388484925631067e-02\n-1.04753880799746929e-01\n-1.40210331457146092e-01\n6.54204867764420633e-02\n1.71191546167463238e-01\n-5.61799162149534612e-02\n-1.89779855564196742e-01\n1.01912334414724831e-01\n1.81153583363612869e-01\n-2.18980091169262286e-01\n-6.63914452210556810e-02\n3.91264895367071985e-01\n1.22183941039485690e-02\n2.11628793749389296e-02\n2.72613885028923017e-02\n3.19732205026823021e-02\n3.54543597716373421e-02\n3.74413102897380445e-02\n3.74183352290203136e-02\n3.47117344324654950e-02\n2.86100633097252470e-02\n1.85467428236866412e-02\n4.35794050630643366e-03\n-1.33997057335254639e-02\n-3.31298433068159329e-02\n-5.19903058314651542e-02\n-6.59707602442898833e-02\n-7.04491884975906729e-02\n-6.13672173427124018e-02\n-3.69772115871931442e-02\n2.28640982714373316e-04\n4.22355194484090868e-02\n7.60319384331551995e-02\n8.69872066913609521e-02\n6.51654377855566819e-02\n1.27507677046685645e-02\n-5.15116907192370854e-02\n-9.59957603337025511e-02\n-9.07673305649029233e-02\n-2.88972735094971747e-02\n5.87455160680716085e-02\n1.12389722201007000e-01\n8.25090360098841569e-02\n-2.09783222289653404e-02\n-1.15327092901280709e-01\n-1.03891260145912545e-01\n2.04858486846495012e-02\n1.33524298275971343e-01\n9.14225683931200600e-02\n-7.75430705910193641e-02\n-1.52307240338066308e-01\n6.30931891522065638e-04\n1.69223856912782022e-01\n5.53721388191119532e-02\n-1.77970716978365529e-01\n-7.59547063750492801e-02\n2.07747365324171068e-01\n4.52450631558313429e-02\n-2.65102088594213470e-01\n7.34029254065394765e-02\n3.72854235567089354e-01\n0.0\n5.70759038872426438e-04\n2.21054025225025930e-03\n5.22188254636634600e-03\n9.81273084522307076e-03\n1.60710334691656388e-02\n2.39025215902151957e-02\n3.29433313838149097e-02\n4.24628119819480399e-02\n5.12836570872790345e-02\n5.77624157223407195e-02\n5.98886056718418019e-02\n5.55662399746958968e-02\n4.31240701908286866e-02\n2.20442627977787339e-02\n-6.20785313741186850e-03\n-3.75214564300085374e-02\n-6.50668846866264972e-02\n-8.02958967491289310e-02\n-7.53381188731193641e-02\n-4.66020388894727994e-02\n1.48409137839962055e-03\n5.46210665974059748e-02\n9.11228149704708668e-02\n9.01615960820983386e-02\n4.41561027588784211e-02\n-3.07354848310214188e-02\n-9.51582384195049508e-02\n-1.04806234284923680e-01\n-4.21120236005873005e-02\n5.87482664715151190e-02\n1.21475685411038953e-01\n8.29277763643273269e-02\n-3.85430077537882651e-02\n-1.32428124652584439e-01\n-8.92487922955559759e-02\n6.43308294362441163e-02\n1.51474333037900671e-01\n4.02384244245150499e-02\n-1.41959319625797303e-01\n-1.20833753826545445e-01\n1.06431810612088840e-01\n1.69331476938824055e-01\n-8.65802947765325348e-02\n-2.00983375742903564e-01\n1.09655288134209924e-01\n2.26741363975641236e-01\n-1.97690949525091059e-01\n-3.33360467591197418e-01\n1.26358621368678828e-02\n2.18859552184910156e-02\n2.81972014289859213e-02\n3.30914980538127360e-02\n3.67533543861777862e-02\n3.89444594779269349e-02\n3.91742200321648221e-02\n3.67898044969969737e-02\n3.10856220460303326e-02\n2.14683423446703700e-02\n7.69179462754527622e-03\n-9.84795128660071427e-03\n-2.98033554539026656e-02\n-4.96470566726498752e-02\n-6.56712621905280181e-02\n-7.33926254621556085e-02\n-6.85114303574232558e-02\n-4.84390276096727246e-02\n-1.41365769686131425e-02\n2.83713793229363603e-02\n6.77989505262149850e-02\n8.97697642010710367e-02\n8.18417456771617785e-02\n4.04561454167749537e-02\n-2.31337800638417093e-02\n-8.24827944945109304e-02\n-1.05045808597734949e-01\n-7.02870959163236358e-02\n1.13630416745025709e-02\n9.35989535385245708e-02\n1.16228630204832678e-01\n5.01473124354356037e-02\n-6.47707885690131796e-02\n-1.32076317173177443e-01\n-7.67499389218177924e-02\n6.48131096557668096e-02\n1.47399825900587367e-01\n5.98665309844915935e-02\n-1.14504640490809911e-01\n-1.48472917292003098e-01\n3.44660459496850952e-02\n1.84020342633723688e-01\n4.00431242765543205e-02\n-1.95827966038120360e-01\n-8.99880562754696856e-02\n2.19052707417853099e-01\n1.21491010163963256e-01\n-2.87084544999476776e-01\n-2.81705294994049504e-01\n0.0\n5.68080574581184060e-04\n2.20016660465686617e-03\n5.19806042799113039e-03\n9.77210420209048691e-03\n1.60195214425704717e-02\n2.38676785150006704e-02\n3.29930963689622353e-02\n4.27294704076436535e-02\n5.19879433102051411e-02\n5.92268070162682916e-02\n6.25218045846042819e-02\n5.97952521580030899e-02\n4.92513355955105300e-02\n3.00225593924592776e-02\n2.94718193226569747e-03\n-2.87294759462673951e-02\n-5.90783963867404505e-02\n-8.00724026567835173e-02\n-8.34005596484237444e-02\n-6.35298898184585431e-02\n-2.13558234258529427e-02\n3.30890105953280667e-02\n8.10359431273662834e-02\n1.00358976311896761e-01\n7.58805710659790217e-02\n1.10216365198932808e-02\n-6.64656433109390710e-02\n-1.12627701844409608e-01\n-9.15054383792114068e-02\n-5.12097726580963176e-03\n9.35688228871643102e-02\n1.26736564328841811e-01\n5.35291785195820546e-02\n-7.66529708515014951e-02\n-1.43232937119088327e-01\n-6.31990854539733332e-02\n9.74543735770720398e-02\n1.55413958980217426e-01\n1.59957606590712467e-02\n-1.61439792669351767e-01\n-1.19224884454705055e-01\n1.17436083017494905e-01\n1.88928979046791901e-01\n-6.55992078188142314e-02\n-2.43509528339367676e-01\n1.64439508715492483e-02\n3.33293303104768346e-01\n2.26093386358211107e-01\n1.30766125384042323e-02\n2.26493573074083576e-02\n2.91854000211372068e-02\n3.42732959556582978e-02\n3.81287285657977842e-02\n4.05416628418043684e-02\n4.10505824596090682e-02\n3.90284211265043840e-02\n3.37812118125818961e-02\n2.46950494344217036e-02\n1.14467549868130670e-02\n-5.72645040019293013e-03\n-2.57330058354332328e-02\n-4.63850683758905633e-02\n-6.43313605751900802e-02\n-7.53217002185589957e-02\n-7.49516240787389820e-02\n-5.99457754675612950e-02\n-2.98358305031954443e-02\n1.14226734584936002e-02\n5.46892649826540497e-02\n8.67071759819427884e-02\n9.37197685685032533e-02\n6.74136028387866404e-02\n1.13587956068176114e-02\n-5.55940558908481278e-02\n-1.03072842416901483e-01\n-1.02106964404394568e-01\n-4.37628996000763576e-02\n4.69580804850301403e-02\n1.15775919808652469e-01\n1.09324997794876005e-01\n1.88512887535479123e-02\n-9.59203636447633068e-02\n-1.37477038116412126e-01\n-5.33359372572606016e-02\n9.31687630914715958e-02\n1.53941349852515397e-01\n4.34110573193609989e-02\n-1.32516510852351610e-01\n-1.54755471430062574e-01\n3.57226726927243957e-02\n1.97927433369127354e-01\n7.44508018067500249e-02\n-1.90784968059971721e-01\n-1.79981027322669906e-01\n1.50057826788168480e-01\n3.38193856529402093e-01\n1.72847335802455815e-01\n0.0\n5.63516053422045884e-04\n2.18248829022411276e-03\n5.15699091826683342e-03\n9.69911651641219147e-03\n1.59151949515722764e-02\n2.37548458311192812e-02\n3.29368998407300606e-02\n4.28634600149021758e-02\n5.25415998913675505e-02\n6.05441149929393657e-02\n6.50533340919712960e-02\n6.40398694906994109e-02\n5.56227167909121162e-02\n3.86271358467344741e-02\n1.32918431625098955e-02\n-1.80254312343165503e-02\n-5.04192390004880656e-02\n-7.66601545254398387e-02\n-8.84427737323123242e-02\n-7.88217207274250070e-02\n-4.55150379566665528e-02\n5.96526512473672700e-03\n6.10987853126948866e-02\n9.89863624282711491e-02\n9.97972448807188522e-02\n5.55717024986023475e-02\n-2.04491844732670909e-02\n-9.31747981839386730e-02\n-1.19368357532113292e-01\n-7.38148233818654020e-02\n2.57034435515548672e-02\n1.16337035244273274e-01\n1.25585827466272976e-01\n3.13205175596521987e-02\n-1.00138542682377457e-01\n-1.49489867509523172e-01\n-5.20815998119423321e-02\n1.11911792835734020e-01\n1.64986261140988494e-01\n2.26548289567984236e-02\n-1.66116587100708785e-01\n-1.52946842289177765e-01\n8.10276338106080685e-02\n2.32283738748386259e-01\n5.63097317004548209e-02\n-2.50854474128596849e-01\n-3.10733907009545951e-01\n-1.26072825479066675e-01\n1.35544379274223307e-02\n2.34769751583340652e-02\n3.02568039718773135e-02\n3.55549786103465729e-02\n3.96214304587157798e-02\n4.22775848012838865e-02\n4.30949258405798896e-02\n4.14771036885365832e-02\n3.67478949797655705e-02\n2.82799811280567900e-02\n1.56805689510518403e-02\n-9.66643565533870813e-04\n-2.08278463460468341e-02\n-4.20726852775209978e-02\n-6.17541935203310757e-02\n-7.59486748487876867e-02\n-8.02953293126311418e-02\n-7.10226171291608727e-02\n-4.64065339350031858e-02\n-8.36578081903919038e-03\n3.63987545247289462e-02\n7.65475087566773321e-02\n9.83244065024244107e-02\n9.01246921284043351e-02\n4.85374175850576406e-02\n-1.65306933683798778e-02\n-8.12020837439843546e-02\n-1.14592315479788306e-01\n-9.34885909853377106e-02\n-1.93165587784866997e-02\n7.34525268123433217e-02\n1.28678446979990674e-01\n1.01633076504047792e-01\n-2.26878563400664205e-03\n-1.14534216700039743e-01\n-1.42118722014742016e-01\n-4.56980414055004197e-02\n1.03999383378590035e-01\n1.64468417848430443e-01\n5.54999714536142247e-02\n-1.28758396083823307e-01\n-1.81887300051703865e-01\n-1.45344039069089416e-02\n1.96092264764143959e-01\n1.78502187608762297e-01\n-8.48927047464150542e-02\n-3.04703140644673909e-01\n-2.63106947989685980e-01\n-8.77989399707014700e-02\n0.0\n5.57144047610128382e-04\n2.15780961783261938e-03\n5.09938505869283066e-03\n9.59505659092911231e-03\n1.57599931243406592e-02\n2.35664325540624643e-02\n3.27769598388595457e-02\n4.28653941248081996e-02\n5.29412464385462800e-02\n6.17036360969612646e-02\n6.74615592332342418e-02\n6.82654950200151933e-02\n6.21939876982001774e-02\n4.78192430231362750e-02\n2.48288609507083570e-02\n-5.29804425012345669e-03\n-3.87655044113324743e-02\n-6.93907034605040773e-02\n-8.93333578217049562e-02\n-9.08697608306013038e-02\n-6.91457819025150383e-02\n-2.53049602014708587e-02\n3.12579574700788676e-02\n8.32082958400883199e-02\n1.09595277684949893e-01\n9.42659653697059535e-02\n3.59363454784688910e-02\n-4.52791309292294442e-02\n-1.11156382656797448e-01\n-1.21817733136589390e-01\n-6.08941762144453863e-02\n4.48635102447975248e-02\n1.30097409352261578e-01\n1.28305274331330710e-01\n2.60364136720496499e-02\n-1.08137567774192311e-01\n-1.60432829373548275e-01\n-6.79278456766523459e-02\n1.01961722428872192e-01\n1.85150881403880418e-01\n7.63331630466100308e-02\n-1.33746156093661611e-01\n-2.17940557352840986e-01\n-5.67738122091892145e-02\n2.04023061780201048e-01\n3.11869896820426540e-01\n2.07329010232741251e-01\n5.83885834043756588e-02\n1.40845596353586927e-02\n2.43951728906750334e-02\n3.14454484174532117e-02\n3.69768131689260787e-02\n4.12771110942456790e-02\n4.42026978010705979e-02\n4.53622060930812948e-02\n4.41952753972631798e-02\n4.00501659764997409e-02\n3.22945178147567846e-02\n2.04755138883768208e-02\n4.53228340857433475e-03\n-1.49554951283218940e-02\n-3.65259488570199992e-02\n-5.76770605111633014e-02\n-7.49014053472273900e-02\n-8.40379585160298259e-02\n-8.10408279052658997e-02\n-6.31746708501771254e-02\n-3.04749180447479485e-02\n1.29282768393526541e-02\n5.82626607739195473e-02\n9.30877466156935507e-02\n1.04320889331462205e-01\n8.31598538288051553e-02\n3.06019792719579922e-02\n-3.89887843206236304e-02\n-9.94033499209887039e-02\n-1.21274998161167727e-01\n-8.67022061343675071e-02\n-3.70843029881585745e-03\n8.93371431464786564e-02\n1.37844622680459744e-01\n1.02780334376257276e-01\n-5.90270106074928646e-03\n-1.20969939262487280e-01\n-1.54086935416743759e-01\n-6.44981324905690295e-02\n9.02955345202932497e-02\n1.80008532241409031e-01\n1.08679381635507596e-01\n-7.91949669375880960e-02\n-2.11260470608598400e-01\n-1.42914685374554845e-01\n8.55570668570968113e-02\n2.76651667332204476e-01\n2.82877669710815682e-01\n1.52926524086722609e-01\n3.70678300238048430e-02\n0.0\n5.48789055899219871e-04\n2.12545087407856959e-03\n5.02362856508051150e-03\n9.45683870852329425e-03\n1.55486727825155952e-02\n2.32941146876723126e-02\n3.25005776329625601e-02\n4.27163829082151114e-02\n5.31593723081554351e-02\n6.26663392592907986e-02\n6.96932584688215451e-02\n7.24040610923876449e-02\n6.88872285104305121e-02\n5.75281394994404602e-02\n3.75334957486808882e-02\n9.54698159688180219e-03\n-2.37855230390760716e-02\n-5.75316187795106571e-02\n-8.47605424858032391e-02\n-9.76732328771482694e-02\n-8.96746288067579722e-02\n-5.81321938481625389e-02\n-7.05461508132117568e-03\n5.15776034296645189e-02\n9.92824875074467261e-02\n1.16279634665851464e-01\n8.98734438243144335e-02\n2.32180817009806743e-02\n-6.03861948520148448e-02\n-1.22712233507742172e-01\n-1.27098335234260201e-01\n-6.10721865684626247e-02\n4.76297422309844981e-02\n1.36679994727590653e-01\n1.42490331000809406e-01\n4.73303280980968341e-02\n-9.31874884861159797e-02\n-1.74832126343973743e-01\n-1.20644590218927705e-01\n4.38617847070948280e-02\n1.89783268340715489e-01\n1.83083739587036609e-01\n8.73481387753377927e-03\n-2.03724208384279820e-01\n-2.97079042856927600e-01\n-2.32744550767666009e-01\n-1.05943757223183221e-01\n-2.24483004110648185e-02\n1.46845092961838831e-02\n2.54343161852079794e-02\n3.27905543724279006e-02\n3.85852969084747241e-02\n4.31487522146967381e-02\n4.63761653132959625e-02\n4.79179336605972464e-02\n4.72555699248086575e-02\n4.37695055971142194e-02\n3.68322739279637462e-02\n2.59431899642904133e-02\n1.09098142107832800e-02\n-7.93271461168896901e-03\n-2.94940046450497470e-02\n-5.17485626120823203e-02\n-7.16881035186939936e-02\n-8.55100074235112806e-02\n-8.91410262080662708e-02\n-7.91460096464628310e-02\n-5.39605959486690184e-02\n-1.52127908827113124e-02\n3.13083932455637745e-02\n7.56409940604842318e-02\n1.05190711352382310e-01\n1.08101235351305142e-01\n7.80216234853574192e-02\n1.88324276019335712e-02\n-5.30322056620956342e-02\n-1.11213923653171745e-01\n-1.28287961443604298e-01\n-8.91322142841479426e-02\n-3.18809710755301725e-03\n9.25979208218295213e-02\n1.46663876536521964e-01\n1.20321362384573999e-01\n1.69969785154530546e-02\n-1.07735399937059523e-01\n-1.71304257214597244e-01\n-1.18559543986543656e-01\n2.86331377177461502e-02\n1.70922026201773020e-01\n1.96245332534889072e-01\n6.94097124068684956e-02\n-1.30749689110466416e-01\n-2.71086686933604271e-01\n-2.74566074619339073e-01\n-1.75878257311149644e-01\n-6.90603235346828465e-02\n-1.29541777515455488e-02\n0.0\n5.38097532575017149e-04\n2.08404278229834409e-03\n4.92647594714724739e-03\n9.27829808116288450e-03\n1.52708976965195194e-02\n2.29218521229868702e-02\n3.20840821114119212e-02\n4.23826685863055788e-02\n5.31490673497644270e-02\n6.33686182485641569e-02\n7.16647661577744371e-02\n7.63503919272915804e-02\n7.55798832451894942e-02\n6.76303737578544950e-02\n5.13213108368370807e-02\n2.65432257487123596e-02\n-5.19192143248586955e-03\n-4.03381754742801885e-02\n-7.32651873109814306e-02\n-9.68173626784706726e-02\n-1.03663912361377800e-01\n-8.84224884204184991e-02\n-5.01962956162000581e-02\n5.26310601703565764e-03\n6.49055897858127478e-02\n1.10396638324786162e-01\n1.23346161937874052e-01\n9.29633509226920340e-02\n2.35386473459780199e-02\n-6.23120111185563041e-02\n-1.28582648283078471e-01\n-1.40144689365027580e-01\n-8.21507946455869026e-02\n2.53055330093857576e-02\n1.28998730459693789e-01\n1.66579042090041096e-01\n1.04704528506775960e-01\n-3.12862624742522785e-02\n-1.61517235658014818e-01\n-1.97012560162579509e-01\n-1.01722027672227405e-01\n7.55539082518521116e-02\n2.31508172238504922e-01\n2.83230402815511317e-01\n2.25931305899819745e-01\n1.22922310708684188e-01\n4.23869865509084662e-02\n7.11266028778829214e-03\n1.53789548413177449e-02\n2.66371311524696945e-02\n3.43473120841921442e-02\n4.04458788882240544e-02\n4.53109857728369730e-02\n4.88814424124263333e-02\n5.08547072753889537e-02\n5.07608963408390026e-02\n4.80215305916856239e-02\n4.20258962604127401e-02\n3.22406609707961769e-02\n1.83596114203365655e-02\n4.90126197857277345e-04\n-2.06418339592750084e-02\n-4.35063377143332167e-02\n-6.56645950848830096e-02\n-8.38253063843327623e-02\n-9.41497342168553103e-02\n-9.28727606137834255e-02\n-7.72454882630691647e-02\n-4.66933480710469903e-02\n-3.93020043057475468e-03\n4.43903264369915201e-02\n8.79987311196102351e-02\n1.14750016418193171e-01\n1.13890115180111287e-01\n8.03358420355273772e-02\n1.86584951689741547e-02\n-5.51932024033267021e-02\n-1.16415243907364338e-01\n-1.39006615769067726e-01\n-1.07132975903881392e-01\n-2.58602501936179077e-02\n7.50114626338253127e-02\n1.49257231992174749e-01\n1.54769966088350475e-01\n7.84103097079197481e-02\n-4.92048772958835895e-02\n-1.62236777801268800e-01\n-1.92953945334053245e-01\n-1.13402120446109797e-01\n4.24669417824421885e-02\n1.96121151204005667e-01\n2.73747312718405966e-01\n2.52584683037833380e-01\n1.68325584971154713e-01\n7.97606680426151821e-02\n2.44889735982738617e-02\n3.70871606636180400e-03\n0.0\n5.24528647319305596e-04\n2.03149071567637445e-03\n4.80296453826307198e-03\n9.05002062248152529e-03\n1.49109281994996810e-02\n2.24253384352869171e-02\n3.14918607023855143e-02\n4.18139275306666156e-02\n5.28410872318865327e-02\n6.37173355106070843e-02\n7.32538521930215236e-02\n7.99493496797108322e-02\n8.20851424188559775e-02\n7.79209495063932223e-02\n6.60074194048650004e-02\n4.56084197402700162e-02\n1.71878595212218224e-02\n-1.71359993987359321e-02\n-5.33219304861578675e-02\n-8.55172103090341695e-02\n-1.06740310192650442e-01\n-1.10243978892373765e-01\n-9.14813999704688074e-02\n-5.03116681921687639e-02\n7.24549298432195649e-03\n6.86306033298674095e-02\n1.16619826457151077e-01\n1.33824770190680814e-01\n1.09158316218230494e-01\n4.42751801956559263e-02\n-4.30733817249480261e-02\n-1.21814917384436033e-01\n-1.57705662244817524e-01\n-1.28548087691946089e-01\n-3.81555997547497472e-02\n7.92594318362395828e-02\n1.70066806500942996e-01\n1.85753528646445148e-01\n1.09696893215266086e-01\n-3.00987654795923550e-02\n-1.73178785706336213e-01\n-2.59350820884453159e-01\n-2.61934668909235835e-01\n-1.98869628499810241e-01\n-1.14560659759748523e-01\n-4.81299316430534099e-02\n-1.33033320192906136e-02\n-1.83209910712480622e-03\n1.62062165789968252e-02\n2.80699905132875752e-02\n3.62014523909421695e-02\n4.26602055637860314e-02\n4.78796617011883544e-02\n5.18479388753522452e-02\n5.43158262884673101e-02\n5.48699239840092431e-02\n5.29833549779957017e-02\n4.80764221914838016e-02\n3.96021167672270386e-02\n2.71640981525556949e-02\n1.06676733177211956e-02\n-9.50564533512756465e-03\n-3.23231679664958138e-02\n-5.59656257159665479e-02\n-7.77883358832038019e-02\n-9.44474928700666932e-02\n-1.02257761962950042e-01\n-9.78207644264931508e-02\n-7.89042104091028512e-02\n-4.54558592355397278e-02\n-5.16335410188127858e-04\n4.93182126879990052e-02\n9.42840656646189712e-02\n1.23009727028080926e-01\n1.25299548287058693e-01\n9.57253451513846026e-02\n3.70336988975712225e-02\n-3.80907355168589173e-02\n-1.08405278579700864e-01\n-1.49441420571025552e-01\n-1.42095973947515886e-01\n-8.18363540803427325e-02\n1.56390690001199373e-02\n1.16350180054723584e-01\n1.79141985529154724e-01\n1.72938848400827072e-01\n9.25777997389630875e-02\n-3.57916162836459661e-02\n-1.64787168778669862e-01\n-2.47871651453885400e-01\n-2.61681615806701517e-01\n-2.15236842727730054e-01\n-1.40508953272635434e-01\n-7.15453455554176942e-02\n-2.70104752622843149e-02\n-6.78198660337027848e-03\n-8.54915166092611923e-04\n0.0\n5.07253915636103440e-04\n1.96458596755713080e-03\n4.64549384811243152e-03\n8.75759858251824209e-03\n1.44447121381457537e-02\n2.17675279080490301e-02\n3.06698459691992636e-02\n4.09341312941561494e-02\n5.21313481425127734e-02\n6.35729874070879164e-02\n7.42772804265672965e-02\n8.29660708858031837e-02\n8.81125439418454087e-02\n8.80611891370359084e-02\n8.12375572030774873e-02\n6.64537808068656338e-02\n4.32941105696276335e-02\n1.25322558616094426e-02\n-2.35079480289738449e-02\n-6.07766850032493075e-02\n-9.36592238400712623e-02\n-1.15613424556331529e-01\n-1.20351964512690174e-01\n-1.03493718108414429e-01\n-6.44001258009510580e-02\n-7.68295911017303611e-03\n5.62933066243837196e-02\n1.12569204503844264e-01\n1.44743664944425976e-01\n1.39806301075001471e-01\n9.34633780520846835e-02\n1.40025582750770167e-02\n-7.74664852834352352e-02\n-1.51779909396222323e-01\n-1.81026918043731944e-01\n-1.49523223742627831e-01\n-6.17817861609777225e-02\n5.70184290509461456e-02\n1.69738691775151052e-01\n2.42185693123801227e-01\n2.57232467414272137e-01\n2.20703561169542734e-01\n1.55818305557648223e-01\n8.98081075460076123e-02\n4.10641022025090077e-02\n1.40781256378795828e-02\n3.23535055570220616e-03\n3.75448890957600842e-04\n1.72311759715201643e-02\n2.98452722568329325e-02\n3.84981180535322945e-02\n4.54003122325481595e-02\n5.10507037460135246e-02\n5.54941677936709940e-02\n5.85425667017751977e-02\n5.98485092832839322e-02\n5.89493948839204737e-02\n5.53139370572704528e-02\n4.84051837644664598e-02\n3.77676810195094123e-02\n2.31416641860090200e-02\n4.60105933523393892e-03\n-1.72964532490703232e-02\n-4.13700892607257870e-02\n-6.57225436266283269e-02\n-8.77389940717035188e-02\n-1.04230750138138303e-01\n-1.11770044522818690e-01\n-1.07238746092093232e-01\n-8.85671018137983990e-02\n-5.55689532464201594e-02\n-1.06962275752062359e-02\n4.05406186669273888e-02\n8.97737010085088855e-02\n1.26838413757888763e-01\n1.41764010419562769e-01\n1.27472691188878773e-01\n8.25988817404049031e-02\n1.35152992384367822e-02\n-6.54580498736372640e-02\n-1.34408809920493477e-01\n-1.72757711295914079e-01\n-1.65685452645391973e-01\n-1.09965254233909029e-01\n-1.66879399951884964e-02\n9.09545127365320449e-02\n1.84825059212329529e-01\n2.41566854627565553e-01\n2.50836985311651106e-01\n2.18184999901825105e-01\n1.61134176961673869e-01\n1.00573011198329273e-01\n5.20954188516842970e-02\n2.16447603703026001e-02\n6.79586939287547993e-03\n1.43864439144150355e-03\n1.54468336326219423e-04\n0.0\n4.84923563684893201e-04\n1.87810088633514325e-03\n4.44168332769504220e-03\n8.37757645988156281e-03\n1.38331414291438283e-02\n2.08883150393723294e-02\n2.95305989188256283e-02\n3.96208439753703845e-02\n5.08530147346962849e-02\n6.27128290478992656e-02\n7.44427424396709447e-02\n8.50237949154594996e-02\n9.31877898359086271e-02\n9.74752197919096230e-02\n9.63539930713068343e-02\n8.84097317816534833e-02\n7.26085514147082750e-02\n4.86166240016925391e-02\n1.71376123801153038e-02\n-1.97982943889248274e-02\n-5.86857654091489447e-02\n-9.46428424469392682e-02\n-1.21854564892221406e-01\n-1.34415026609903676e-01\n-1.27533036398228106e-01\n-9.89392809909539900e-02\n-5.01897270534849768e-02\n1.25537297851014765e-02\n7.87065676643334960e-02\n1.34719897595528409e-01\n1.66813043952269646e-01\n1.64524962989123946e-01\n1.24159294138318319e-01\n5.09184742506934851e-02\n-4.13514959636805818e-02\n-1.33242267418315297e-01\n-2.05083590939249411e-01\n-2.42793833880320636e-01\n-2.42073909781015700e-01\n-2.09160586028067169e-01\n-1.57741577451121717e-01\n-1.03400850849290765e-01\n-5.81474847713700782e-02\n-2.74176021692777785e-02\n-1.04471664743061923e-02\n-3.02509313644675273e-03\n-5.93162647698730963e-04\n-5.91923898958247581e-05\n1.85765920717367201e-02\n3.21756012997291910e-02\n4.15119041467005775e-02\n4.89915655646263812e-02\n5.51943549983027054e-02\n6.02323759013471960e-02\n6.39887643211230345e-02\n6.61942327257648289e-02\n6.64663098153635140e-02\n6.43438879607368536e-02\n5.93302222100106635e-02\n5.09514900151714217e-02\n3.88347540588757367e-02\n2.28057913685231553e-02\n3.00269545812061360e-03\n-2.00049499655390838e-02\n-4.51090066936520040e-02\n-7.05934962756476214e-02\n-9.41355432792721492e-02\n-1.12911932601544959e-01\n-1.23842374762663993e-01\n-1.23985542812065960e-01\n-1.11075675115475433e-01\n-8.41462180555674344e-02\n-4.41374092171893662e-02\n5.66220184809655865e-03\n5.95174077665875656e-02\n1.09654861239474558e-01\n1.47269976221569232e-01\n1.64086596928849165e-01\n1.54238030214225941e-01\n1.16049343376544628e-01\n5.31812846065962685e-02\n-2.53745435274280798e-02\n-1.06728782198953528e-01\n-1.76817958184355584e-01\n-2.23787541159799597e-01\n-2.41027085113545397e-01\n-2.28800443313472213e-01\n-1.93806115544308821e-01\n-1.46754889121817694e-01\n-9.88639378593894752e-02\n-5.86331118955975422e-02\n-3.01038110993348540e-02\n-1.30472877470189565e-02\n-4.59339837036960852e-03\n-1.23390238864217491e-03\n-2.25179640489951217e-04\n-2.09687124569936153e-05\n0.0\n4.55095365117555472e-04\n1.76257677003647628e-03\n4.16913585286858308e-03\n7.86754451667345117e-03\n1.30055862423189075e-02\n1.96793687514025539e-02\n2.79170163406343014e-02\n3.76550205948990580e-02\n4.87091383070349104e-02\n6.07424555851737158e-02\n7.32345742645010012e-02\n8.54576021425999116e-02\n9.64665030797264567e-02\n1.05113017791527874e-01\n1.10093253138374106e-01\n1.10038426818541729e-01\n1.03655296372970621e-01\n8.99166837362126020e-02\n6.82927235543943911e-02\n3.90001984315554578e-02\n3.23189384215563950e-03\n-3.66868523957048220e-02\n-7.72768253201731731e-02\n-1.14079923507900735e-01\n-1.42073436704425488e-01\n-1.56327742593817515e-01\n-1.52852743768023852e-01\n-1.29507734310919442e-01\n-8.67839404596812969e-02\n-2.82331452107855603e-02\n3.96642801791432242e-02\n1.08305204224580898e-01\n1.68392739129602620e-01\n2.11736451737155967e-01\n2.32996505873624138e-01\n2.30872931242704943e-01\n2.08334482054545578e-01\n1.71746497157566458e-01\n1.29122281980895620e-01\n8.80481197401574434e-02\n5.39644475230512399e-02\n2.93390488483596529e-02\n1.38891585792148484e-02\n5.57574321419981433e-03\n1.82484854994263267e-03\n4.57055119325641647e-04\n7.79590235855361291e-05\n6.79876137788162408e-06\n2.05171943154313155e-02\n3.55368229830903895e-02\n4.58572925743566881e-02\n5.41618264691582640e-02\n6.11381938714729081e-02\n6.69825191991518243e-02\n7.16642240459283847e-02\n7.50088843152924289e-02\n7.67353694414295850e-02\n7.64814203419404426e-02\n7.38302441678319460e-02\n6.83444030732068691e-02\n5.96107023048203927e-02\n4.72979974847060822e-02\n3.12278425290602908e-02\n1.14552762270973343e-02\n-1.16463290313510645e-02\n-3.73064291257849054e-02\n-6.42987369152353272e-02\n-9.09207488651470191e-02\n-1.15030998946822671e-01\n-1.34162241104995389e-01\n-1.45722619202578535e-01\n-1.47284931407738962e-01\n-1.36946234833522390e-01\n-1.13717836889771079e-01\n-7.78829606406856167e-02\n-3.12421189560053748e-02\n2.28378958987119109e-02\n7.96391538837985247e-02\n1.33598555480682751e-01\n1.79067766677132756e-01\n2.11215375055940346e-01\n2.26893549936921513e-01\n2.25259850375299053e-01\n2.07969801858801318e-01\n1.78845627549700098e-01\n1.43065795048956945e-01\n1.06068266979857564e-01\n7.24620056099110205e-02\n4.52480104441838685e-02\n2.55476804195420501e-02\n1.28560463592236468e-02\n5.65472667444790085e-03\n2.11577373523402909e-03\n6.47064188271295293e-04\n1.51768284644623669e-04\n2.42861079841063819e-05\n1.99004473967864087e-06\n0.0\n4.12509654401960820e-04\n1.59764302164857111e-03\n3.77962391928627879e-03\n7.13622905816828704e-03\n1.18102066028908589e-02\n1.79082609808621958e-02\n2.54930805140321064e-02\n3.45702398106513056e-02\n4.50710380197128224e-02\n5.68324077166804734e-02\n6.95754848696120004e-02\n8.28851216208775637e-02\n9.61934594387359593e-02\n1.08771549520027030e-01\n1.19733748058694633e-01\n1.28059999999494606e-01\n1.32640869923884491e-01\n1.32348962952182680e-01\n1.26137904951877655e-01\n1.13166136184796595e-01\n9.29374668353263184e-02\n6.54440681732753604e-02\n3.12912366115251084e-02\n-8.22169745585737792e-03\n-5.10916826559781601e-02\n-9.46973906219997358e-02\n-1.35993508327334339e-01\n-1.71810293523794760e-01\n-1.99231935938910781e-01\n-2.16002778975606768e-01\n-2.20890583431930604e-01\n-2.13928170328242628e-01\n-1.96465418860967300e-01\n-1.70995375564172492e-01\n-1.40767399393127268e-01\n-1.09255617742057762e-01\n-7.95956520718848759e-02\n-5.41192186211176332e-02\n-3.40942100963429334e-02\n-1.97198931231738726e-02\n-1.03508338636466024e-02\n-4.85698547863214116e-03\n-1.99715739718351205e-03\n-7.00079103572501639e-04\n-2.00955109296395776e-04\n-4.43084794836831622e-05\n-6.67420763907186212e-06\n-5.15392066753023819e-07\n2.38813908328112806e-02\n4.13637822778387607e-02\n5.33870202046025505e-02\n6.31049864885544903e-02\n7.13746957769195861e-02\n7.85108703277028336e-02\n8.45968048842684894e-02\n8.95808582090746874e-02\n9.33161511170205876e-02\n9.55817478639284235e-02\n9.60982788251091985e-02\n9.45436493092667446e-02\n9.05718552641002622e-02\n8.38367120410943717e-02\n7.40214735997312967e-02\n6.08744885394430987e-02\n4.42500410494165025e-02\n2.41523040939812701e-02\n7.78919626016505223e-04\n-2.54407626806961336e-02\n-5.38190903968155943e-02\n-8.34023243738453574e-02\n-1.12988835879835284e-01\n-1.41179183636615885e-01\n-1.66461093526044906e-01\n-1.87327766744396718e-01\n-2.02421873559079257e-01\n-2.10690790822334439e-01\n-2.11532387943559580e-01\n-2.04906660205891988e-01\n-1.91388567004923238e-01\n-1.72142971418418278e-01\n-1.48813973893675178e-01\n-1.23336955518250108e-01\n-9.76992207348875430e-02\n-7.36897082986684993e-02\n-5.26849126807981682e-02\n-3.55133486767643947e-02\n-2.24241165645175239e-02\n-1.31600221491283611e-02\n-7.10955691826292441e-03\n-3.49350814610311939e-03\n-1.53763428141396631e-03\n-5.94068372955270296e-04\n-1.95952512420169444e-04\n-5.29957479447957554e-05\n-1.10218206524653472e-05\n-1.56752007569816278e-06\n-1.14383506415843952e-07\n0.0\n3.41243625441885862e-04\n1.32163087833586548e-03\n3.12716906308069297e-03\n5.90749344091991754e-03\n9.78812636648358769e-03\n1.48739396232405122e-02\n2.12484623226203428e-02\n2.89705263563909028e-02\n3.80689028006540933e-02\n4.85353599167010000e-02\n6.03165756548388471e-02\n7.33054508125799420e-02\n8.73325486171244170e-02\n1.02158604199998213e-01\n1.17469273442905600e-01\n1.32873486388161377e-01\n1.47906885600351035e-01\n1.62041803615809527e-01\n1.74704999468663108e-01\n1.85303870527960879e-01\n1.93261041355412277e-01\n1.98056105911107422e-01\n1.99271926729395643e-01\n1.96641421121092091e-01\n1.90089427691387952e-01\n1.79763363153882888e-01\n1.66046303826766856e-01\n1.49547175364842605e-01\n1.31065084971580315e-01\n1.11528406493203794e-01\n9.19136134727389364e-02\n7.31532714637676967e-02\n5.60460039768823498e-02\n4.11825479376652370e-02\n2.89004135167284688e-02\n1.92750009811963538e-02\n1.21480309945095864e-02\n7.18641338665132728e-03\n3.95832206220830991e-03\n2.01021371095256880e-03\n9.29860612091367735e-04\n3.85753206015718121e-04\n1.40629879325492789e-04\n4.38134467288063743e-05\n1.12019934424470041e-05\n2.20416163418306495e-06\n2.96781262016048799e-07\n2.05153904719791467e-08\n3.40378543683966597e-02\n5.89552931466932745e-02\n7.61071859738095824e-02\n9.00333930042132996e-02\n1.02037697538981648e-01\n1.12695150107490663e-01\n1.22300128658216059e-01\n1.31007004812201344e-01\n1.38887399212458462e-01\n1.45957699571020449e-01\n1.52194222793058692e-01\n1.57542862050576021e-01\n1.61926336984045016e-01\n1.65250646579844673e-01\n1.67411617757580650e-01\n1.68302057460437027e-01\n1.67819756515405538e-01\n1.65876374686875244e-01\n1.62407020974114913e-01\n1.57380119377469568e-01\n1.50806923346461674e-01\n1.42749831402788102e-01\n1.33328493784453606e-01\n1.22722626426238865e-01\n1.11170508899802775e-01\n9.89623766592972881e-02\n8.64283476229026071e-02\n7.39211408237583356e-02\n6.17946000821401539e-02\n5.03798290100159613e-02\n3.99614313623053510e-02\n3.07567639089881481e-02\n2.29010889382815289e-02\n1.64409587775881660e-02\n1.13370790539046151e-02\n7.47642182854844472e-03\n4.69177066944867754e-03\n2.78554051929495771e-03\n1.55398270236285904e-03\n8.07993326973241899e-04\n3.87702971539202735e-04\n1.69589863514894726e-04\n6.65810530902096153e-05\n2.29870016757003249e-05\n6.78659970876967487e-06\n1.64524221540417963e-06\n3.07108250547096258e-07\n3.92461352283251552e-08\n2.57588960863157733e-09\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n1.08472742381388542e-03\n4.20113124760565244e-03\n9.90251969648426981e-03\n1.84771170763622303e-02\n2.97864244518314635e-02\n4.29935124003884145e-02\n5.62502048776087268e-02\n6.64805016337743915e-02\n6.94951639769335328e-02\n6.07489836031443048e-02\n3.70087187849701890e-02\n-1.10930973807619473e-03\n-4.64683006843350233e-02\n-8.43432667407494757e-02\n-9.54507151085634276e-02\n-6.49196479072799287e-02\n4.37546628453371750e-03\n8.19387104591040999e-02\n1.16402125826386982e-01\n6.80514713575707669e-02\n-4.51112437681951695e-02\n-1.31643108854483243e-01\n-9.06119505406491887e-02\n6.35740425963955968e-02\n1.55664101856450132e-01\n3.25463011982652650e-02\n-1.61062963962556399e-01\n-9.14113873640488572e-02\n1.71651781820813254e-01\n9.17992460712520608e-02\n-2.26861122079491717e-01\n2.74638834186305171e-02\n2.38715686972268110e-01\n-3.27133758028667621e-01\n2.52461693632194173e-01\n-1.37970366908697711e-01\n5.77226737959510572e-02\n-1.91900278708997951e-02\n5.17285234812659821e-03\n-1.14295039404465238e-03\n2.07983783328855249e-04\n-3.11689067087047306e-05\n3.82973710685585953e-06\n-3.82261697502359940e-07\n3.05284349905734929e-08\n-1.90534375715001719e-09\n8.95713424979161803e-11\n-2.98382267775662102e-12\n6.28005580839250896e-14\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n1.49153584618682711e-02\n2.58341586690582249e-02\n3.32116220033397275e-02\n3.86332886759592903e-02\n4.19352060972968538e-02\n4.22859974032437497e-02\n3.84603343591977051e-02\n2.91354456526192324e-02\n1.33735769422542814e-02\n-8.66375493142438995e-03\n-3.48542512856124601e-02\n-6.03977488262971221e-02\n-7.77935527381269643e-02\n-7.82387419341021156e-02\n-5.50015082023348201e-02\n-8.46471169411793130e-03\n4.91546484099385228e-02\n9.33789301143736900e-02\n9.58451624442848149e-02\n4.24753634491714521e-02\n-4.65584996049520222e-02\n-1.13675365442407250e-01\n-9.62111172949670912e-02\n1.20719355238242849e-02\n1.22543885941844538e-01\n1.08867617260667501e-01\n-4.32122795008925698e-02\n-1.55525846583246002e-01\n-4.44856381102336565e-02\n1.56679204868117705e-01\n9.27910168036672200e-02\n-1.70832186850680245e-01\n-8.35132884230644357e-02\n2.25539034459328630e-01\n-4.43192212140970654e-02\n-2.19269242183260410e-01\n3.21854692028745448e-01\n-2.60382927692662802e-01\n1.49103608459652814e-01\n-6.56033227650731493e-02\n2.30603343843918986e-02\n-6.61577618876218760e-03\n1.56781788023062688e-03\n-3.08791591122133168e-04\n5.06329993144556269e-05\n-6.89739006530945087e-06\n7.75957347905360304e-07\n-7.13509751266757394e-08\n5.27725011601396538e-09\n-3.06437392918077032e-10\n0.0\n9.31231485683661287e-04\n3.60664403551681084e-03\n8.50602400394575263e-03\n1.59003845831766355e-02\n2.57379331178424903e-02\n3.74429022893153773e-02\n4.96727203528201863e-02\n6.01209842233804345e-02\n6.55188921569456323e-02\n6.20485584438564691e-02\n4.63832477729556533e-02\n1.74258908623226814e-02\n-2.15613643306100493e-02\n-6.13677159501424679e-02\n-8.73740714402345270e-02\n-8.39387467097887224e-02\n-4.30735753536244936e-02\n2.54205416613427181e-02\n8.96319597239925298e-02\n1.06347499921684005e-01\n5.01739831038397407e-02\n-5.32299261477481092e-02\n-1.23700123221912733e-01\n-8.28396897050736464e-02\n5.28775536891320924e-02\n1.43085570967639686e-01\n5.61977132639769339e-02\n-1.23816025006318567e-01\n-1.28765238917973951e-01\n9.31608526655434005e-02\n1.63492650510438126e-01\n-1.06861882743359851e-01\n-1.62491258203155242e-01\n1.96459220801137896e-01\n4.41807868984634908e-02\n-2.70804866571520197e-01\n3.14111437351427047e-01\n-2.26653503225050040e-01\n1.19973760107645350e-01\n-4.96384679318883706e-02\n1.65764998398732141e-02\n-4.54921289331997394e-03\n1.03647975975075567e-03\n-1.97023114024771396e-04\n3.12759943321989361e-05\n-4.13512897657961669e-06\n4.52475045531942631e-07\n-4.05416570728018729e-08\n2.92645637485853674e-09\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367391e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n0.0\n8.66426047764552948e-04\n3.35565365371242545e-03\n7.91595443084345055e-03\n1.48087344978570998e-02\n2.40121934498876664e-02\n3.50470844797405034e-02\n4.67621537451872876e-02\n5.71499205294295140e-02\n6.33170572602035353e-02\n6.17867458500721348e-02\n4.93218215401055454e-02\n2.43605773569870350e-02\n-1.11229334763186111e-02\n-5.00111894576891480e-02\n-7.99363085453404926e-02\n-8.61829356704887362e-02\n-5.84006514722374484e-02\n3.58940229482597722e-04\n6.73683490910389898e-02\n1.04547897847193053e-01\n7.88234561964185204e-02\n-7.40196344727397232e-03\n-9.89024440883244371e-02\n-1.13935536034448295e-01\n-1.85003343777213579e-02\n1.09092261688566131e-01\n1.21812489154462925e-01\n-2.46754972559791175e-02\n-1.53724638728994417e-01\n-5.40369786300429963e-02\n1.52844124485929489e-01\n9.28820650447559071e-02\n-1.70534777166068852e-01\n-7.46582530210939121e-02\n2.23693329402947089e-01\n-6.04428648778056951e-02\n-1.99685494680089254e-01\n3.15424575732289825e-01\n-2.67266406134374968e-01\n1.60001492639399584e-01\n-7.37993799662741146e-02\n2.73166714845997569e-02\n-8.29850452787542908e-03\n2.09615300256641530e-03\n-4.43432899576961430e-04\n7.88025564301311467e-05\n-1.17598018378678304e-05\n1.46840532288151421e-06\n-1.52341139845976726e-07\n1.38775648385791109e-02\n2.40366473857504051e-02\n3.09183376927102474e-02\n3.60490110866717381e-02\n3.93682703078598456e-02\n4.02329121179941657e-02\n3.76476647717232243e-02\n3.04822304143379866e-02\n1.78148420603558809e-02\n-5.49493293180729984e-04\n-2.34201922161793967e-02\n-4.75864693423654200e-02\n-6.75475918537055686e-02\n-7.61070536214557003e-02\n-6.63258440415187833e-02\n-3.49512535853122724e-02\n1.34896496535020817e-02\n6.41090627526224310e-02\n9.38543479864417107e-02\n8.10994027665989242e-02\n2.12923912180139931e-02\n-5.98341884996867676e-02\n-1.10030524056330931e-01\n-8.17948212773459138e-02\n1.99064348515222353e-02\n1.15539923940347983e-01\n1.02747525542276036e-01\n-2.93739623914329138e-02\n-1.40726818170621437e-01\n-7.11091388755198256e-02\n1.14989793196827297e-01\n1.32918431505759660e-01\n-8.91485417183869588e-02\n-1.61387508239883626e-01\n1.10055601699257127e-01\n1.53322920048714506e-01\n-2.00539512712533341e-01\n-2.47180274398497123e-02\n2.54306170934598175e-01\n-3.12462048980529816e-01\n2.35681063631852872e-01\n-1.30404128946313702e-01\n5.65779096716439722e-02\n-1.99041935277145220e-02\n5.78688142169008195e-03\n-1.40596016281415489e-03\n2.87177007748140947e-04\n-4.94265797874704794e-05\n7.16154736544450906e-06\n-8.70066637554337680e-07\n0.0\n8.08158692343193745e-04\n3.12998515653795280e-03\n7.38517565752335944e-03\n1.38253132320654126e-02\n2.24522063933687462e-02\n3.28663626386924979e-02\n4.40769909952671568e-02\n5.43310572757591814e-02\n6.10631553156840493e-02\n6.11141009965217724e-02\n5.13829153887180728e-02\n3.00123716033436766e-02\n-1.99912992041989057e-03\n-3.92489735811344456e-02\n-7.14187172436596823e-02\n-8.50885006306620062e-02\n-6.88163708641936767e-02\n-2.08639639467056229e-02\n4.38628639729777350e-02\n9.38928414427065289e-02\n9.42769126249987099e-02\n3.17951926165376403e-02\n-6.21820057925115410e-02\n-1.16966777518024645e-01\n-7.26997949296215445e-02\n4.94382434623750686e-02\n1.32194169547075496e-01\n6.57987478006455684e-02\n-9.54888521621997249e-02\n-1.38115365157625264e-01\n3.28530164554064683e-02\n1.67792257111929688e-01\n1.30048521049847877e-03\n-1.88742910765151178e-01\n2.51320701308258912e-02\n2.04395439674699281e-01\n-1.48084466485704447e-01\n-1.07469414757222492e-01\n2.90187851903883964e-01\n-2.97112519015832022e-01\n2.02734630968169238e-01\n-1.04415761976290933e-01\n4.27882747149622711e-02\n-1.43458775460619994e-02\n3.99957789848216262e-03\n-9.36072935864385152e-04\n1.84837054629342397e-04\n-3.08416262170383597e-05\n4.34251259324456867e-06\n1.34110082885966278e-02\n2.32285477365766976e-02\n2.98860996056495958e-02\n3.48797786236744942e-02\n3.81892381226269506e-02\n3.92471829678553777e-02\n3.71538730471788967e-02\n3.08652396697157820e-02\n1.94853920077473729e-02\n2.71067763849207376e-03\n-1.85941472741656261e-02\n-4.18117164604295960e-02\n-6.22489781840356582e-02\n-7.34866556944345078e-02\n-6.88453932379934908e-02\n-4.41692459772121404e-02\n-1.44841254378143725e-03\n4.82920127167179858e-02\n8.54732402082501452e-02\n8.84366022252626172e-02\n4.60942565831519158e-02\n-2.84199156082049001e-02\n-9.42883172683497139e-02\n-1.01381495418669976e-01\n-2.96036179402732816e-02\n7.66130663400607925e-02\n1.22433390026886663e-01\n4.51895108603661902e-02\n-9.32860514916029337e-02\n-1.30432938459336484e-01\n8.20081992983818890e-03\n1.50931262326254007e-01\n6.15593609074653533e-02\n-1.49611746095247189e-01\n-9.18975496678858805e-02\n1.70628068542663769e-01\n6.53278764107059901e-02\n-2.21263159641950841e-01\n7.57862765822020501e-02\n1.80014718047062983e-01\n-3.07891757470553029e-01\n2.73094737407804267e-01\n-1.70599706567333975e-01\n8.22652000653752019e-02\n-3.19530648433910131e-02\n1.02346436591406898e-02\n-2.74111767197895420e-03\n6.18871018394651692e-04\n-1.18270476591597477e-04\n1.91502023001933051e-05\n0.0\n7.55578460676834267e-04\n2.92634279495441497e-03\n6.90600799940212229e-03\n1.29363301000194227e-02\n2.10376911099979733e-02\n3.08768236529076388e-02\n4.15981791495319345e-02\n5.16661078209353225e-02\n5.88016778090429126e-02\n6.01379021868469962e-02\n5.27364107865445839e-02\n3.45666628825852112e-02\n5.89504265469418740e-03\n-2.92676595221140964e-02\n-6.24162650968917918e-02\n-8.15792684498744952e-02\n-7.50796499659125566e-02\n-3.79476882549654448e-02\n2.12328593161671547e-02\n7.78173930656959889e-02\n9.85941149431779629e-02\n6.11661686841956237e-02\n-2.27622777287939705e-02\n-9.97514513423884003e-02\n-1.02888651719296800e-01\n-1.20807025481796653e-02\n1.01582608759637677e-01\n1.16455312507639325e-01\n-7.60805901606057509e-03\n-1.36066500062595547e-01\n-8.31897955594673860e-02\n1.06895593890494398e-01\n1.35737034623099828e-01\n-8.63403631111129555e-02\n-1.58775957654592181e-01\n1.13751534796031548e-01\n1.43731724364856289e-01\n-2.03878872129343719e-01\n-5.87789538841008638e-03\n2.37332242942113997e-01\n-3.09605301225458651e-01\n2.43864153743287015e-01\n-1.40753685811450507e-01\n6.38573485495057686e-02\n-2.35822617891322320e-02\n7.23183717933484002e-03\n-1.86373745464103258e-03\n4.06441527782241963e-04\n-7.52544597069678810e-05\n1.29748046858678204e-02\n2.24730209342058132e-02\n2.89203443869852708e-02\n3.37826387143548984e-02\n3.70735104514601163e-02\n3.82919018530366376e-02\n3.66228435352942971e-02\n3.11018415173477218e-02\n2.08653274505692030e-02\n5.53264355890257988e-03\n-1.42895572886346210e-02\n-3.64739484583415097e-02\n-5.70233894397709842e-02\n-7.02447627506832123e-02\n-6.98370153957123679e-02\n-5.11337949991313573e-02\n-1.42477981293784930e-02\n3.30013878124537294e-02\n7.44602273135133164e-02\n8.97290744005819763e-02\n6.39803156024942449e-02\n6.62474536615532310e-04\n-7.10490008821438590e-02\n-1.04847532016145065e-01\n-6.65156354547871559e-02\n2.96532511186166775e-02\n1.11007035268847129e-01\n9.45749568006118424e-02\n-2.38279871800401929e-02\n-1.28234830520816634e-01\n-8.24577582376375268e-02\n8.23317204597050767e-02\n1.42175983640067310e-01\n-2.41581776375844395e-02\n-1.66715279761973229e-01\n-1.84856868223575018e-03\n1.86598623288232429e-01\n-3.24707273120107068e-02\n-1.97016240467708326e-01\n1.57410207068863384e-01\n8.71802060735948764e-02\n-2.77107436756929337e-01\n2.98443720280564262e-01\n-2.12349552596931113e-01\n1.14072588286467561e-01\n-4.88923978960668637e-02\n1.72137950337616259e-02\n-5.06402984264370769e-03\n1.25767317331324738e-03\n-2.65243773558529699e-04\n0.0\n7.07968507316677608e-04\n2.74195023847681593e-03\n6.47197537846429510e-03\n1.21301144336510899e-02\n1.97513303721897106e-02\n2.90575953433271465e-02\n3.93078718671591582e-02\n4.91529025606840114e-02\n5.65642461938397761e-02\n5.89415074409451942e-02\n5.35217440140366291e-02\n3.81887588030365571e-02\n1.26659867419431967e-02\n-2.01568878683033234e-02\n-5.33481366120316242e-02\n-7.64032833178737020e-02\n-7.79635236634512591e-02\n-5.10203889261563112e-02\n7.47644981567441910e-04\n5.90476681697430852e-02\n9.43974358072696001e-02\n8.01097864087503275e-02\n1.32861227873979429e-02\n-7.08424196786765908e-02\n-1.10292463182059985e-01\n-6.09612062270149455e-02\n5.06065636847355810e-02\n1.23451272985727084e-01\n6.74739522586986079e-02\n-7.65659314362639315e-02\n-1.35657474674684836e-01\n-6.18618707650343998e-03\n1.47624473605270728e-01\n6.73650535964803177e-02\n-1.46985782286312594e-01\n-9.00015627200668883e-02\n1.70992907279280681e-01\n5.56035160626970545e-02\n-2.18203918132011399e-01\n9.03043061195684393e-02\n1.60312306275307348e-01\n-2.99307141864767423e-01\n2.77854036798500403e-01\n-1.80836559270615843e-01\n9.09536099096513173e-02\n-3.69603154309529683e-02\n1.24360810112831115e-02\n-3.51588485013637096e-03\n8.42644273024410187e-04\n1.25660884585646355e-02\n2.17651036626388232e-02\n2.80148765056372623e-02\n3.27512644642290185e-02\n3.60167199630398449e-02\n3.73681896961797558e-02\n3.60661022279498145e-02\n3.12191534583843959e-02\n2.19999166842156854e-02\n7.97469344130000840e-03\n-1.04542906596826746e-02\n-3.15646268855385229e-02\n-5.19566776368542288e-02\n-6.66026212355339542e-02\n-6.96421364760037437e-02\n-5.61774843689400241e-02\n-2.49650298708571916e-02\n1.87765683874701363e-02\n6.20631795382249538e-02\n8.64629052866627418e-02\n7.54416679154173014e-02\n2.54616894731623314e-02\n-4.47956697380549121e-02\n-9.61972771998562265e-02\n-8.88446841552659600e-02\n-1.47232520525636575e-02\n7.98957535807963692e-02\n1.13931389896245128e-01\n4.05719369605382282e-02\n-8.42089472284364426e-02\n-1.24926572793578952e-01\n-1.19412888245831184e-02\n1.30006668711835888e-01\n9.28698927092749676e-02\n-9.96723621046220615e-02\n-1.37510962990604363e-01\n8.45962045070857843e-02\n1.55716992618019134e-01\n-1.17808380559947551e-01\n-1.33744147352288373e-01\n2.06429274670277385e-01\n-1.22950865895902015e-02\n-2.19945105910029332e-01\n3.05575857028275000e-01\n-2.51168029408835702e-01\n1.50960024375880492e-01\n-7.14416161621438256e-02\n2.76102665324190998e-02\n-8.89761516589498286e-03\n2.42138312963063916e-03\n0.0\n6.64722948553948464e-04\n2.57446090959133171e-03\n6.07759916982620815e-03\n1.13967624798004628e-02\n1.85783148684826073e-02\n2.73904950974906206e-02\n3.71896428206852578e-02\n4.67868812313494559e-02\n5.43730808489081910e-02\n5.75897265584493293e-02\n5.38530645516590023e-02\n4.10234820221870577e-02\n1.84276167168405773e-02\n-1.19419761812158756e-02\n-4.45001182264068984e-02\n-7.01487986582615131e-02\n-7.81846901250075055e-02\n-6.04451342018915913e-02\n-1.69397958492736103e-02\n3.95861614131875900e-02\n8.42642477352259084e-02\n8.95295813492260478e-02\n4.26475081345807361e-02\n-3.74710794722323756e-02\n-1.00045822803760523e-01\n-9.12438357256159793e-02\n-3.07922767534731879e-03\n9.77445061365917189e-02\n1.09498966911806342e-01\n2.76498389532085645e-04\n-1.21177177933918953e-01\n-9.57214696774854601e-02\n6.99264637864002586e-02\n1.44712945090673589e-01\n-1.70180198774614877e-02\n-1.65492461169460758e-01\n-1.32603107959934239e-03\n1.84396147455824166e-01\n-4.01517973024772060e-02\n-1.89142159517670688e-01\n1.65849736559333993e-01\n6.72770041161149385e-02\n-2.63277883752970343e-01\n2.98599933238194337e-01\n-2.21312068417209989e-01\n1.23767070317026148e-01\n-5.53441276646391145e-02\n2.03976869097226288e-02\n-6.30796371424803635e-03\n1.21825262203729204e-02\n2.11007543782259395e-02\n2.71646515873901172e-02\n3.17805071925819360e-02\n3.50153230830277384e-02\n3.64770050319546957e-02\n3.54931906208905135e-02\n3.12397373011095367e-02\n2.29273189429146720e-02\n1.00873345501640167e-02\n-7.03975833602006433e-03\n-2.70663701972005399e-02\n-4.71046921174505737e-02\n-6.27282984460219156e-02\n-6.85425562701187097e-02\n-5.96126624901912872e-02\n-3.37439529008085118e-02\n5.91615386073764040e-03\n4.91995036619301551e-02\n7.99584066097050461e-02\n8.13575063940924215e-02\n4.51510922794293029e-02\n-1.87389421934799523e-02\n-7.95873421077422372e-02\n-9.76126237620248832e-02\n-5.03992733104596802e-02\n4.02257555453301371e-02\n1.07603848610740779e-01\n8.50988575510645828e-02\n-2.37298733722509023e-02\n-1.18812867796855626e-01\n-8.53895233508182583e-02\n5.99169292047371863e-02\n1.38299341061106612e-01\n1.85804221682761873e-02\n-1.44140878457581084e-01\n-7.17201450052849243e-02\n1.44941456238583205e-01\n8.73240636331248515e-02\n-1.71524978441990716e-01\n-4.55600766234611002e-02\n2.14489105522721851e-01\n-1.03956108413506138e-01\n-1.40642074846791254e-01\n2.89731724350139608e-01\n-2.81540884531882196e-01\n1.90657431231296304e-01\n-9.98183625282074993e-02\n4.23270435802585027e-02\n-1.49131958196982266e-02\n0.0\n6.25376415013480257e-04\n2.42207244045810699e-03\n5.71867256272105048e-03\n1.07286771020288739e-02\n1.75073134610899475e-02\n2.58617032337452382e-02\n3.52312862739174379e-02\n4.45655722489184739e-02\n5.22476220886549936e-02\n5.61373976298351340e-02\n5.38279847484714261e-02\n4.31997481472279135e-02\n2.32950270227734908e-02\n-4.60700710220518766e-03\n-3.60613929441067418e-02\n-6.32722187516234769e-02\n-7.63778350927656613e-02\n-6.66983438896788794e-02\n-3.16011403246227174e-02\n2.08044356318350734e-02\n7.04381286475115470e-02\n9.10550795738631485e-02\n6.40518045939112157e-02\n-4.86630361302997118e-03\n-7.83534297369264526e-02\n-1.02871942986949488e-01\n-4.80143243830682617e-02\n5.45949766508664058e-02\n1.16380414665531062e-01\n6.45275109916879086e-02\n-6.52463675973160712e-02\n-1.29192111129791787e-01\n-2.91211195788869601e-02\n1.23223420423782370e-01\n1.00558129781834094e-01\n-9.33818815893838611e-02\n-1.38475888156057519e-01\n8.37886332405560763e-02\n1.52268373828224279e-01\n-1.22111013570044377e-01\n-1.23410136271901047e-01\n2.08176898396675525e-01\n-2.97486913400001433e-02\n-2.02247451568537073e-01\n3.00457739774943833e-01\n-2.57599101039425293e-01\n1.60984587098151388e-01\n-7.93040370972538516e-02\n3.19891312246782175e-02\n1.18263708807814800e-02\n2.04838752346666181e-02\n2.63748260848859807e-02\n3.08770303317075501e-02\n3.40784471279510434e-02\n3.56317670898936081e-02\n3.49244516922230380e-02\n3.11936269985521319e-02\n2.36884541597101456e-02\n1.19189537274345808e-02\n-4.00217933689424321e-03\n-2.29640576000007743e-02\n-4.25158697503106447e-02\n-5.87683903026139029e-02\n-6.67915194431200898e-02\n-6.17436049110926047e-02\n-4.07887326286728788e-02\n-5.45291881150999913e-03\n3.65251955849884360e-02\n7.13416689261835157e-02\n8.27730355880158669e-02\n5.96706833517012189e-02\n5.05830559764895195e-03\n-5.86631580059787244e-02\n-9.53668866902093182e-02\n-7.49066018433075798e-02\n5.46468296283193983e-04\n8.37657955571728396e-02\n1.05551544323592636e-01\n3.30986117576340180e-02\n-7.98869216377170455e-02\n-1.18351793237940248e-01\n-2.21007825491182849e-02\n1.12208603924554354e-01\n1.06132447319341239e-01\n-5.85240543058796400e-02\n-1.46208422709385277e-01\n1.12585741506597090e-02\n1.64290989963332357e-01\n-8.29203818354617398e-05\n-1.82188249661989821e-01\n4.80536304044878876e-02\n1.80900980955870705e-01\n-1.73434225356352806e-01\n-4.79161928728182238e-02\n2.48988926976579733e-01\n-2.97830177548316144e-01\n2.29743465149588655e-01\n-1.33535764084316888e-01\n6.21600455684227990e-02\n0.0\n5.90269982963809127e-04\n2.28610581378496831e-03\n5.39835473398614894e-03\n1.01320291234705175e-02\n1.65492776931970426e-02\n2.44898173653765941e-02\n3.34636544947098172e-02\n4.25389044426840723e-02\n5.02654759380081750e-02\n5.46976619879585707e-02\n5.35963584181292155e-02\n4.48887879923041966e-02\n2.74175410377398253e-02\n1.89857649181644533e-03\n-2.81769666890544432e-02\n-5.61828024568909248e-02\n-7.31716870797817220e-02\n-7.03799037490914769e-02\n-4.33478273217090121e-02\n3.55479073535500383e-03\n5.47741803898870519e-02\n8.66351850364753678e-02\n7.76791046867425922e-02\n2.37523321090357883e-02\n-5.09338580464071128e-02\n-9.91425776879441278e-02\n-7.88607883320149305e-02\n7.47486322981552077e-03\n9.62586414565207160e-02\n1.01960172349400871e-01\n2.13922837519568134e-03\n-1.10329213768574491e-01\n-9.94986824184028451e-02\n4.39699986202909329e-02\n1.39280950640366274e-01\n2.92931288685411087e-02\n-1.40918576071820512e-01\n-7.51044641870969171e-02\n1.43629598311354051e-01\n8.42895204283222871e-02\n-1.72409872165263045e-01\n-3.55765805177726338e-02\n2.10629564104618444e-01\n-1.16722288568832794e-01\n-1.21762549955296256e-01\n2.80263751278955975e-01\n-2.85082177000531067e-01\n2.00621229715078259e-01\n-1.09131173649025706e-01\n1.15399156475023794e-02\n1.99877202165332189e-02\n2.57398597943802043e-02\n3.01520763335345471e-02\n3.33307344216876023e-02\n3.49669038791496495e-02\n3.44993622225130483e-02\n3.12184596811699022e-02\n2.44086666070137265e-02\n1.35667553752596322e-02\n-1.29551431300432883e-03\n-1.92933492344601262e-02\n-3.83417404491380870e-02\n-5.50161886697846519e-02\n-6.48187103546678245e-02\n-6.30679510097653107e-02\n-4.65069741820574173e-02\n-1.54102942408326938e-02\n2.45199578529620744e-02\n6.16929002838927654e-02\n8.09958590474381540e-02\n6.96896342954296949e-02\n2.56127005004557866e-02\n-3.63201428408906069e-02\n-8.53780581566917218e-02\n-8.85876952760800002e-02\n-3.39162444904274329e-02\n5.09260474797726403e-02\n1.04826086884427364e-01\n7.50726031597928611e-02\n-2.71603177250737578e-02\n-1.12556217603335479e-01\n-8.42692677752922142e-02\n4.59870099615529368e-02\n1.30887829350652796e-01\n4.45340743063964081e-02\n-1.16605416470943912e-01\n-1.07500339342998644e-01\n8.81187205867099144e-02\n1.39902719345852466e-01\n-8.37420179484469757e-02\n-1.49822575716162004e-01\n1.26762881479330153e-01\n1.14430528552716057e-01\n-2.10459976083232303e-01\n4.54225905129291008e-02\n1.87527282776478649e-01\n-2.98093093345671467e-01\n2.66151559282247430e-01\n-1.72603755752790494e-01\n0.0\n5.63467761171857102e-04\n2.18230125514338059e-03\n5.15385819608814213e-03\n9.67692793316780875e-03\n1.58196851708796021e-02\n2.34483774456617673e-02\n3.21299801186153561e-02\n4.10283147599064674e-02\n4.88284202058749950e-02\n5.37434378147186725e-02\n5.36747663352563353e-02\n4.65968751787682184e-02\n3.12041377665340930e-02\n7.76830435327482711e-03\n-2.09971198950369489e-02\n-4.94617889490776771e-02\n-6.95408425734316826e-02\n-7.26053081329010447e-02\n-5.29411502444677301e-02\n-1.19702300494950783e-02\n3.87475152624522368e-02\n7.85691645349864132e-02\n8.51455293813540431e-02\n4.73668107209828104e-02\n-2.20727225278019926e-02\n-8.49544387782267679e-02\n-9.55449356372637948e-02\n-3.50261959254648467e-02\n6.04963138583269056e-02\n1.11742445150166056e-01\n6.00505133455452450e-02\n-5.97192822300716616e-02\n-1.23782047020125921e-01\n-4.27137115743618373e-02\n1.02867878223065742e-01\n1.16347866465243421e-01\n-4.76348740304943993e-02\n-1.49278123276109953e-01\n5.10598286259967248e-03\n1.65595962955596421e-01\n-1.87815888021914774e-05\n-1.83229418239081232e-01\n5.41388537421490790e-02\n1.77677903862256598e-01\n-1.81550303104536764e-01\n-3.54099964096820374e-02\n2.45486626742701303e-01\n-3.07243965462278501e-01\n2.45552458891246494e-01\n1.14704706795721572e-02\n1.98674380037480829e-02\n2.55885770269558867e-02\n2.99920118714370951e-02\n3.32026263271378297e-02\n3.49413980477210340e-02\n3.46849320715721318e-02\n3.17615011379634854e-02\n2.54787244383451079e-02\n1.53184859391517682e-02\n1.20970744227936566e-03\n-1.61425822205615091e-02\n-3.49420450846838135e-02\n-5.21318667079662332e-02\n-6.35608756937887376e-02\n-6.46879245597740959e-02\n-5.19413557513570545e-02\n-2.46086866219271741e-02\n1.32759513294551917e-02\n5.20505461563838118e-02\n7.78156871004588996e-02\n7.69882833259589311e-02\n4.35167084968183931e-02\n-1.40778026223030220e-02\n-7.08918569928633224e-02\n-9.40792272887037984e-02\n-6.19457449314935737e-02\n1.50849908589159726e-02\n8.90588125936473407e-02\n9.99061169471845839e-02\n2.58252740717026461e-02\n-7.97505500413284579e-02\n-1.15292389455298294e-01\n-2.85409723792974593e-02\n1.00394802404520533e-01\n1.14444410633440394e-01\n-2.69261678925000920e-02\n-1.42601655707837394e-01\n-4.31912322344546878e-02\n1.40176843818600405e-01\n8.42129685103379516e-02\n-1.44464284332408155e-01\n-8.93669869674224016e-02\n1.76940988910630898e-01\n3.57276034885105828e-02\n-2.17441106180079252e-01\n1.23556131873305566e-01\n1.26820595583266860e-01\n-3.01392325849798859e-01\n3.14756208428559447e-01\n0.0\n5.51207816818243749e-04\n2.13481869483640686e-03\n5.04230706516193943e-03\n9.47103336906120370e-03\n1.54959978546358509e-02\n2.30044679001957381e-02\n3.16056213515542445e-02\n4.05322658311590492e-02\n4.85649869466882531e-02\n5.40264454263794103e-02\n5.49091082459670851e-02\n4.92028326118552281e-02\n3.54635688376901265e-02\n1.35932353662263188e-02\n-1.43266840670253776e-02\n-4.34748693660169661e-02\n-6.64822937577832229e-02\n-7.48721150987970846e-02\n-6.19650893046221202e-02\n-2.67777500919740979e-02\n2.25910921073502920e-02\n6.85230046368376783e-02\n8.88013050165722684e-02\n6.73347841621954185e-02\n6.97856727577134735e-03\n-6.39302284665269477e-02\n-1.00844370615464987e-01\n-7.04864843097523092e-02\n1.69047475941522356e-02\n9.90076004370785134e-02\n1.00230260077910902e-01\n4.10280544858714850e-03\n-1.05771281269207096e-01\n-1.06521293676682963e-01\n2.28210203819210131e-02\n1.34846708679868393e-01\n6.68779312945318588e-02\n-1.09836439707573882e-01\n-1.24302613559778730e-01\n7.88959981909200386e-02\n1.53828168982255958e-01\n-7.66710176320561237e-02\n-1.64741927210619699e-01\n1.25458413529332652e-01\n1.32788869051661956e-01\n-2.22870183833309449e-01\n2.80307710739362281e-02\n2.38500072242428696e-01\n-3.65705544329301024e-01\n1.16994521000358676e-02\n2.02640454579805195e-02\n2.61030264288299729e-02\n3.06122240036868845e-02\n3.39382852725316694e-02\n3.58249165359712032e-02\n3.57733251068966390e-02\n3.31334125848115543e-02\n2.72207055962600981e-02\n1.74941047483300263e-02\n3.80662520920352441e-03\n-1.32864732057169262e-02\n-3.22198491575755586e-02\n-5.02232968151053102e-02\n-6.34069715435760933e-02\n-6.73160731609021568e-02\n-5.80877831025130714e-02\n-3.41563342147562579e-02\n1.88653092046578777e-03\n4.20964807285372986e-02\n7.37835807450480108e-02\n8.29148491961805290e-02\n6.03312278494874746e-02\n8.89985129952820114e-03\n-5.24762905247164874e-02\n-9.29668476349588269e-02\n-8.44816626057405262e-02\n-2.23587834668240136e-02\n6.12927095431461608e-02\n1.08143523926793536e-01\n7.31683318511561209e-02\n-2.85941181992928027e-02\n-1.13580174419998264e-01\n-9.21477183605578232e-02\n3.17375926658868476e-02\n1.30484891619403603e-01\n7.41208113454894096e-02\n-8.85017075419384236e-02\n-1.38116879491475081e-01\n2.39656135220308909e-02\n1.62382514344249801e-01\n2.15127610816061611e-02\n-1.76550909878918472e-01\n-2.85210774009846957e-02\n2.01296849432439445e-01\n-2.48718926927469670e-02\n-2.19194186915999484e-01\n1.69865660435463972e-01\n1.27262459287195623e-01\n-3.88854157791760136e-01\n0.0\n5.49003147916092950e-04\n2.12628004889447520e-03\n5.02272891312078792e-03\n9.43783175844446071e-03\n1.54546440151435947e-02\n2.29791241038675847e-02\n3.16551506461466986e-02\n4.07703226771716706e-02\n4.91792722663898646e-02\n5.52868376823030805e-02\n5.71481915324693751e-02\n5.27480880540856928e-02\n4.05033699005073328e-02\n1.99760117877211749e-02\n-7.32263821476200442e-03\n-3.73048527671496974e-02\n-6.32735657364712489e-02\n-7.69551714917932617e-02\n-7.08968665957653565e-02\n-4.20040107585181732e-02\n4.87714163441054904e-03\n5.53609259471599877e-02\n8.82841003602739260e-02\n8.40852388570333953e-02\n3.69421367870155087e-02\n-3.55465586172658901e-02\n-9.41306694970616697e-02\n-9.70917531463931921e-02\n-3.14249991414399521e-02\n6.49129858823098427e-02\n1.16700849122997247e-01\n6.86613494989956469e-02\n-5.06201812657582698e-02\n-1.28608691727303714e-01\n-6.95534016411976236e-02\n7.94143360978357832e-02\n1.39864443388030890e-01\n1.11030116217767580e-02\n-1.47391428896386067e-01\n-8.53983464660533903e-02\n1.30494233195302456e-01\n1.29038639519733989e-01\n-1.28508751427283269e-01\n-1.44722100968619788e-01\n1.67370502527762144e-01\n1.17032044592763229e-01\n-2.52987763199029381e-01\n8.77999155806020309e-03\n3.82680403385040391e-01\n1.20734757774827988e-02\n2.09118734705523619e-02\n2.69413609941084320e-02\n3.16135836369066808e-02\n3.51002545619142209e-02\n3.71669047680385084e-02\n3.73362876718106376e-02\n3.49758451201647863e-02\n2.94051741402044653e-02\n2.00583134513384678e-02\n6.71438539542737554e-03\n-1.02138210401278851e-02\n-2.93799814532193088e-02\n-4.82883438299256534e-02\n-6.33078536965112904e-02\n-7.00910230009187812e-02\n-6.45396679816079288e-02\n-4.43200124861660230e-02\n-1.06549722397078529e-02\n3.02562631408555133e-02\n6.71806577379024383e-02\n8.61741970619634701e-02\n7.56848519120605634e-02\n3.33754677171640146e-02\n-2.83971353795934474e-02\n-8.29598494497873484e-02\n-9.91794684879854782e-02\n-5.97055740759619424e-02\n2.12823930141671121e-02\n9.58254770819795265e-02\n1.06962701160491294e-01\n3.38130876233351252e-02\n-7.55765940252691032e-02\n-1.25361066560882917e-01\n-5.45856559010131775e-02\n8.17877757733777716e-02\n1.36951679913142110e-01\n2.75962728603739368e-02\n-1.29459178802436875e-01\n-1.17759518781980460e-01\n7.52820825278540245e-02\n1.65895432886276506e-01\n-2.42055058911736960e-02\n-1.91560535143373900e-01\n4.40516364562855596e-03\n2.18792076333288649e-01\n-3.54134359952142999e-02\n-2.54328735694296981e-01\n1.41552705042163190e-01\n3.52285396438036635e-01\n0.0\n5.47767028985228716e-04\n2.12149258086130610e-03\n5.01202588520737943e-03\n9.42139177340022699e-03\n1.54410509262914893e-02\n2.29959624316052463e-02\n3.17650681686186750e-02\n4.10914443708081806e-02\n4.99054009502925555e-02\n5.66976903935804064e-02\n5.95937574068098885e-02\n5.65864603795543930e-02\n4.59727839279594624e-02\n2.69960812346568130e-02\n6.08397437608867216e-04\n-2.98605257870285454e-02\n-5.84803952237995806e-02\n-7.73773636882252869e-02\n-7.86170760853138750e-02\n-5.72877279341143381e-02\n-1.50589048835253533e-02\n3.73754656476544128e-02\n8.11383050197270472e-02\n9.50240484086436743e-02\n6.59938479339320788e-02\n2.99927056087442487e-04\n-7.22673146668367655e-02\n-1.08555154242410440e-01\n-7.74863653416292264e-02\n1.14355023421979073e-02\n1.00264904187763543e-01\n1.15033740156217368e-01\n2.90772414896655652e-02\n-9.29571623187238905e-02\n-1.31382093995481869e-01\n-2.87592203797418650e-02\n1.17992501085426985e-01\n1.30031601731340790e-01\n-3.30218844251115723e-02\n-1.65362476862709745e-01\n-5.56829280018460576e-02\n1.58843698082571094e-01\n1.18436181218359846e-01\n-1.50923735284743565e-01\n-1.56229962833581398e-01\n1.72627595817533092e-01\n1.79133496610685339e-01\n-2.47929246556637978e-01\n-3.05926587630276137e-01\n1.24787362829077986e-02\n2.16138052562495006e-02\n2.78497693412861590e-02\n3.26989258402402283e-02\n3.63604831565660647e-02\n3.86242163372536168e-02\n3.90373106039496182e-02\n3.69882419600415860e-02\n3.18047279266110913e-02\n2.29001952604954012e-02\n9.98334724666362881e-03\n-6.67496195645878032e-03\n-2.59539478587767422e-02\n-4.56526226407557995e-02\n-6.24417931581658717e-02\n-7.21553702925651075e-02\n-7.05649044752692661e-02\n-5.46833905701343340e-02\n-2.44311307836499909e-02\n1.58224885228187145e-02\n5.66610170394327706e-02\n8.49339343473132780e-02\n8.76251221525927992e-02\n5.78924314217320740e-02\n1.22453275324011391e-03\n-6.19887406764913357e-02\n-1.01467023891851083e-01\n-9.10260396717200437e-02\n-2.70158165217793365e-02\n6.01966121147201397e-02\n1.15213735765071615e-01\n9.14492187954832475e-02\n-6.56358717951436178e-03\n-1.08436588643237880e-01\n-1.21390055938913263e-01\n-1.69503795592193460e-02\n1.15436704575463997e-01\n1.31297849319807536e-01\n-8.98142168934015425e-03\n-1.52159318117331688e-01\n-1.01824439032750916e-01\n1.03076403695484653e-01\n1.70989527020151993e-01\n-3.65989144036092118e-02\n-2.07681711890093795e-01\n-1.58940779368793687e-02\n2.41871129390783923e-01\n5.43531448183098426e-02\n-3.14674119922479789e-01\n-2.52079171742891905e-01\n0.0\n5.44805513442338544e-04\n2.11002268048415820e-03\n4.98554886927074416e-03\n9.37538082692404053e-03\n1.53792892260689994e-02\n2.29419247616966353e-02\n3.17792665062049950e-02\n4.12938680085682477e-02\n5.04988133990541405e-02\n5.79823958702042896e-02\n6.19581138394103142e-02\n6.04519827869083315e-02\n5.16723809743144108e-02\n3.45751843325598565e-02\n9.56844509779901028e-03\n-2.08053105794884577e-02\n-5.14965656567537775e-02\n-7.52681531154295175e-02\n-8.40670163175713386e-02\n-7.15687437172264768e-02\n-3.64909378220548003e-02\n1.44730901906728188e-02\n6.59213773279542919e-02\n9.70869252851642855e-02\n8.99421315503261681e-02\n4.00568210285340426e-02\n-3.52142236450745938e-02\n-9.85649523431592900e-02\n-1.09318073233955718e-01\n-5.06195958106428548e-02\n4.89491022207529380e-02\n1.21387152907168283e-01\n1.02947379742571052e-01\n-6.34139337484735440e-03\n-1.20283562306122610e-01\n-1.25768556212173366e-01\n1.92015954332548384e-03\n1.40274895309242198e-01\n1.22860381293213389e-01\n-5.51522707583789323e-02\n-1.77118970208103244e-01\n-5.45400268960084186e-02\n1.68041440699431249e-01\n1.45715401843066306e-01\n-1.32137703334156809e-01\n-2.22111156711222224e-01\n8.38998128102310531e-02\n3.39083572933820576e-01\n1.97809717383165884e-01\n1.29080483645379746e-02\n2.23573955939361246e-02\n2.88122486610436039e-02\n3.38496182741930829e-02\n3.76987017700161631e-02\n4.01763424526866905e-02\n4.08577247720738890e-02\n3.91568170388032072e-02\n3.44147828904536601e-02\n2.60303076335173834e-02\n1.36471239835356008e-02\n-2.60306637793338708e-03\n-2.18293355337925987e-02\n-4.21443962731120406e-02\n-6.05651192296796925e-02\n-7.31876039174142734e-02\n-7.57753485309078101e-02\n-6.48365965509719727e-02\n-3.91104258998550627e-02\n-1.12540609028470183e-03\n4.18087620090964243e-02\n7.80300810330464972e-02\n9.41304933889876710e-02\n7.98566104136199800e-02\n3.41626496125096643e-02\n-3.02877033814255778e-02\n-8.78543864625920545e-02\n-1.08678751506965765e-01\n-7.45116677501607150e-02\n5.31682681370165139e-03\n8.95962786491446145e-02\n1.22710796382510506e-01\n7.16679332924349544e-02\n-3.90322449797779747e-02\n-1.28304920074560763e-01\n-1.13459654381848685e-01\n9.42961392146946312e-03\n1.34979706597595589e-01\n1.28694389683975119e-01\n-2.49507815439696801e-02\n-1.64814555729841355e-01\n-1.08294730823343413e-01\n1.02507608230494443e-01\n1.92712842820267988e-01\n3.78585534351536142e-03\n-2.21415393613590750e-01\n-1.26441657738239593e-01\n2.02786626891326288e-01\n3.26857771736318359e-01\n1.48141977768573130e-01\n0.0\n5.40151302297514169e-04\n2.09199699823052043e-03\n4.94358992767232868e-03\n9.30030461819301817e-03\n1.52700308440936391e-02\n2.28175781852669735e-02\n3.16975257567069096e-02\n4.13752743466195699e-02\n5.09529854498611337e-02\n5.91274039720100925e-02\n6.42177849353963576e-02\n6.43099361801434816e-02\n5.75597036993896333e-02\n4.26767001862624618e-02\n1.95574160508048232e-02\n-1.00478541552496952e-02\n-4.20576817693982807e-02\n-7.00927330062585813e-02\n-8.63651616762144414e-02\n-8.36375562635968267e-02\n-5.81032130069673233e-02\n-1.24509300670214845e-02\n4.22788729520361534e-02\n8.77949222864178036e-02\n1.03893518743220309e-01\n7.76104638630403521e-02\n1.29765877108095670e-02\n-6.44934858208699169e-02\n-1.14711157291394958e-01\n-1.03006085800612240e-01\n-2.56273669228080266e-02\n7.63750764793423298e-02\n1.32842733874904168e-01\n9.17720118117116429e-02\n-2.92951032270740500e-02\n-1.36179209075072832e-01\n-1.25079739403498646e-01\n1.28001066703144224e-02\n1.51316821079792052e-01\n1.33441603471887160e-01\n-4.62659110783806976e-02\n-1.89057316892778687e-01\n-9.93898791984410696e-02\n1.40952095690316526e-01\n2.18159578576291230e-01\n-9.09192192464895917e-03\n-2.81118053522839084e-01\n-2.88659067877859998e-01\n-1.06002539568133949e-01\n1.33754247218442774e-02\n2.31669151910471084e-02\n2.98601128115027065e-02\n3.51026197497440601e-02\n3.91565594487945784e-02\n4.18687778633585542e-02\n4.28460257288869883e-02\n4.15322617349880574e-02\n3.72877006619843007e-02\n2.95029678560022185e-02\n1.77640057526583794e-02\n2.06922453678940474e-03\n-1.69199106830856295e-02\n-3.76426339128753951e-02\n-5.74999386713107435e-02\n-7.29281813382435529e-02\n-7.98122255168795952e-02\n-7.43310442558897805e-02\n-5.42220001311893435e-02\n-2.02571898969582977e-02\n2.25307817107846947e-02\n6.45707188550820460e-02\n9.31753596743893769e-02\n9.60958569933489937e-02\n6.67995070546056752e-02\n9.78820255656022951e-03\n-5.69463406541167588e-02\n-1.05483687715742111e-01\n-1.08945931299845422e-01\n-5.71375871565920554e-02\n3.10710347691284007e-02\n1.09267277803126811e-01\n1.25391150125722495e-01\n5.75762004530024560e-02\n-5.86716513424112782e-02\n-1.40340561498532718e-01\n-1.13359192968824837e-01\n1.64791116702604525e-02\n1.43942684257100773e-01\n1.41448093080047382e-01\n-1.00755107007642324e-02\n-1.67632798099325964e-01\n-1.49215239726873838e-01\n5.28507112716633601e-02\n2.17787500721529415e-01\n1.29980512244373542e-01\n-1.42639378157688984e-01\n-3.12133098078105131e-01\n-2.36555966918693072e-01\n-7.25023235898044627e-02\n0.0\n5.33821318748379874e-04\n2.06748107736295624e-03\n4.88629715849585571e-03\n9.19640066048512013e-03\n1.51135168820555679e-02\n2.26228714916388296e-02\n3.15188223730681824e-02\n4.13323944409415486e-02\n5.12603671112442372e-02\n6.01181180227177495e-02\n6.63481610954209655e-02\n6.81240203541919193e-02\n6.35894447792795248e-02\n5.12586654821414189e-02\n3.05665190130013052e-02\n2.49284312361613275e-03\n-2.99024962306086023e-02\n-6.12889662864841839e-02\n-8.45261438568556400e-02\n-9.20319693472022166e-02\n-7.80933720235073292e-02\n-4.17316494417197953e-02\n1.08243536561601506e-02\n6.54834777989463795e-02\n1.02907685531521742e-01\n1.05006561126556153e-01\n6.40313247204649244e-02\n-9.49642253650152292e-03\n-8.55297178904700361e-02\n-1.24458648142382555e-01\n-9.77070199040988296e-02\n-1.00204055392851960e-02\n9.23504717392558960e-02\n1.41267521876665469e-01\n9.18506380258087979e-02\n-3.36146118434308486e-02\n-1.43742344432291308e-01\n-1.39526452734256956e-01\n-6.21317533730791124e-03\n1.47593226975630931e-01\n1.68615284896423051e-01\n1.29694034401288457e-02\n-1.77558264693048418e-01\n-1.95817187833154938e-01\n5.14684028448488332e-03\n2.41598428539307880e-01\n3.01360714589312517e-01\n1.81229327448208022e-01\n4.73977878464628966e-02\n1.38948515008167298e-02\n2.40665887630392428e-02\n3.10246402402199264e-02\n3.64949606017692871e-02\n4.07761071247519230e-02\n4.37481660125386695e-02\n4.50532785094360580e-02\n4.41702395009951621e-02\n4.04845255111478883e-02\n3.33864882546491409e-02\n2.24133935052605246e-02\n7.43936744144078899e-03\n-1.10985183814838670e-02\n-3.19726846195478309e-02\n-5.29996642676612215e-02\n-7.10298989254571495e-02\n-8.22032549333390067e-02\n-8.25678857757768947e-02\n-6.90946387601551054e-02\n-4.09847071053649203e-02\n-9.69082510889699377e-04\n4.39204692150837739e-02\n8.27674903851153554e-02\n1.02941600750757270e-01\n9.41229163891389858e-02\n5.33873404124107012e-02\n-1.05590590881179999e-02\n-7.67178770529326481e-02\n-1.17121181821878473e-01\n-1.08418257306139867e-01\n-4.61239065971506546e-02\n4.61408457758470392e-02\n1.21247984591219757e-01\n1.30871046162441940e-01\n5.78824568229640221e-02\n-6.13736891131170734e-02\n-1.47884848285875725e-01\n-1.29954258343270346e-01\n-5.38005029039920635e-03\n1.36764040280551863e-01\n1.72619016578032386e-01\n5.22828092818931819e-02\n-1.33123194131447631e-01\n-2.11916112961501618e-01\n-9.10987294584539725e-02\n1.39990157905680451e-01\n2.90502274557911055e-01\n2.61656825927629844e-01\n1.30376015123470801e-01\n2.96027823554956895e-02\n0.0\n5.25618980099975294e-04\n2.03571355637773184e-03\n4.81186414867190194e-03\n9.06022671345801424e-03\n1.49039365744077796e-02\n2.23486812537453117e-02\n3.12294576565659218e-02\n4.11452498170207931e-02\n5.13924778667499069e-02\n6.09149273368480987e-02\n6.82960301093051558e-02\n7.18265602922900787e-02\n6.96832123882023258e-02\n6.02456791195132846e-02\n4.25554018738062423e-02\n1.68730678594994424e-02\n-1.47757076849938402e-02\n-4.82555817964704925e-02\n-7.74295204948947380e-02\n-9.49748837617158670e-02\n-9.40521021293199144e-02\n-7.07030734479362349e-02\n-2.64390352407627392e-02\n2.99872083628358807e-02\n8.29152135777678351e-02\n1.13292242233480833e-01\n1.05447621208495643e-01\n5.54257510903647388e-02\n-2.28208050119995190e-02\n-9.80806621648158405e-02\n-1.32583920282497075e-01\n-1.01170856338858417e-01\n-1.05086718461066923e-02\n9.49161182535475656e-02\n1.50640629958853467e-01\n1.11356236037219447e-01\n-1.01481278317278913e-02\n-1.36414093176077666e-01\n-1.70014537364594542e-01\n-6.96922692296630120e-02\n1.00632460346533559e-01\n2.05377698257016267e-01\n1.45108982061600472e-01\n-4.98432572098561552e-02\n-2.37539588662086854e-01\n-2.90923585530354800e-01\n-2.07795770923835194e-01\n-8.83001313903771928e-02\n-1.76488538788328250e-02\n1.44832559975501055e-02\n2.50857352467834457e-02\n3.23437007811454499e-02\n3.80715401259487038e-02\n4.26085163299266059e-02\n4.58716701776935853e-02\n4.75428101977835235e-02\n4.71409903562654969e-02\n4.40840299906381516e-02\n3.77711979531618822e-02\n2.77024731524610664e-02\n1.36402788691016054e-02\n-4.19233910202032080e-03\n-2.49004481878711201e-02\n-4.67390335125583284e-02\n-6.70390497967654347e-02\n-8.23284380705885249e-02\n-8.87400724678145819e-02\n-8.27649263989329170e-02\n-6.23244016002041101e-02\n-2.79952014141970282e-02\n1.59586252084767816e-02\n6.12537672327014560e-02\n9.65116498021593022e-02\n1.09808478773679857e-01\n9.27089247408347528e-02\n4.48242369982779637e-02\n-2.29514656506190837e-02\n-8.88454174667020896e-02\n-1.26002865910179590e-01\n-1.13390751463917833e-01\n-4.82853061674410750e-02\n4.62247906035191253e-02\n1.25768095906484634e-01\n1.44018616759621687e-01\n8.05988042380660075e-02\n-3.82116013717826442e-02\n-1.44120272983023573e-01\n-1.63576780472137889e-01\n-7.01023939714455063e-02\n8.46514537973060421e-02\n1.94023382108987064e-01\n1.69700567339701569e-01\n1.36247925908119204e-02\n-1.76212201974996319e-01\n-2.81195857284756712e-01\n-2.55885874904293431e-01\n-1.52367243036624106e-01\n-5.63740331671417419e-02\n-1.00322506838783632e-02\n0.0\n5.15198379174046026e-04\n1.99535474253413440e-03\n4.71711608602556464e-03\n8.88575560852736430e-03\n1.46311964592085366e-02\n2.19793762606024477e-02\n3.08064337335375478e-02\n4.07811691518569844e-02\n5.13041054311164091e-02\n6.14567369598540414e-02\n6.99811127452209247e-02\n7.53162306071941678e-02\n7.57212313106125495e-02\n6.95122370039007315e-02\n5.54251292416282626e-02\n3.30861407370110147e-02\n3.52399379392861860e-03\n-3.04042735955053177e-02\n-6.38623229281482935e-02\n-9.03794694583423125e-02\n-1.02878798689534506e-01\n-9.54356744527418976e-02\n-6.55476162864671308e-02\n-1.63338509166149684e-02\n4.22664695760593123e-02\n9.43664734081259698e-02\n1.21827338057974258e-01\n1.10590631106782106e-01\n5.79800491810222168e-02\n-2.22060366926613122e-02\n-1.00589276997327157e-01\n-1.41505286917563367e-01\n-1.19330299910248780e-01\n-3.53081326600355738e-02\n7.53415593452763793e-02\n1.54704094657151209e-01\n1.51671679166327289e-01\n5.61604999555639084e-02\n-8.47201996927725576e-02\n-1.86281306263547358e-01\n-1.77243842594974388e-01\n-5.06018522833419221e-02\n1.25825844800734832e-01\n2.53987802742559554e-01\n2.74357825826013146e-01\n2.02520990899957787e-01\n1.03710664258458707e-01\n3.39377083087962772e-02\n5.42883359940678385e-03\n1.51648246741931895e-02\n2.62662468235767485e-02\n3.38714061992671650e-02\n3.98965223853943313e-02\n4.47269362960628497e-02\n4.83210468680095595e-02\n5.04052497638160374e-02\n5.05450645178172828e-02\n4.81988527973584505e-02\n4.27857161173691020e-02\n3.37824584331602382e-02\n2.08566274554843924e-02\n4.03399602935143944e-03\n-1.61135824290834194e-02\n-3.82909005357442295e-02\n-6.03635336263432729e-02\n-7.93726729583759394e-02\n-9.17590075998518384e-02\n-9.38623419057265790e-02\n-8.27186320359851596e-02\n-5.70887868237943824e-02\n-1.85264619000405535e-02\n2.78510334514006086e-02\n7.33312447123398436e-02\n1.06747897929929531e-01\n1.17017139873216020e-01\n9.68274665529776507e-02\n4.65764976299611957e-02\n-2.30124498747998167e-02\n-9.14429766533734895e-02\n-1.33483466252220906e-01\n-1.28399501046747438e-01\n-7.06584458024537843e-02\n2.28773744437624806e-02\n1.14740194090338393e-01\n1.60355225144929031e-01\n1.29942895608247483e-01\n2.86397275423426467e-02\n-9.84101266710333544e-02\n-1.84088616035034819e-01\n-1.75152253916646655e-01\n-6.60077141411565815e-02\n9.34828298003826247e-02\n2.25934386109305663e-01\n2.73900936673849182e-01\n2.33003856634247219e-01\n1.46061564877024208e-01\n6.57147544918389448e-02\n1.92549216122020680e-02\n2.79120842554431321e-03\n0.0\n5.02040368965084218e-04\n1.94439398812559826e-03\n4.59728968433882786e-03\n8.66395398110867548e-03\n1.42802023484920691e-02\n2.14916708170008394e-02\n3.02156855311963672e-02\n4.01921094191431197e-02\n5.09292812061963029e-02\n6.16549575786518797e-02\n7.12871553613880632e-02\n7.84450002266485757e-02\n8.15234950390251178e-02\n7.88560319302611529e-02\n6.89812212058728141e-02\n5.10127222675497982e-02\n2.50797986876932569e-02\n-7.23709426717421452e-03\n-4.26009580081874104e-02\n-7.59097705671713113e-02\n-1.00761474223786632e-01\n-1.10518672425216929e-01\n-9.99632117694199684e-02\n-6.73034129713150214e-02\n-1.60127823128846172e-02\n4.42693040493198214e-02\n9.86095012671699966e-02\n1.29975685576733196e-01\n1.24573520859332154e-01\n7.80434483587296585e-02\n1.33555465137558777e-04\n-8.50143282339460710e-02\n-1.44995079944504029e-01\n-1.51264222229387818e-01\n-9.33283060889954497e-02\n1.18161695285937535e-02\n1.21822316017588805e-01\n1.85149282385867253e-01\n1.65821819367535678e-01\n6.41819752107651714e-02\n-7.98582620372996765e-02\n-2.06003536685921695e-01\n-2.65671002012978885e-01\n-2.47050535087601608e-01\n-1.76510784259913844e-01\n-9.66474020532970268e-02\n-3.88031830078762532e-02\n-1.02823132194667984e-02\n-1.36019685664780471e-03\n1.59772502942132424e-02\n2.76734092748221264e-02\n3.56920809403394879e-02\n4.20698748154103991e-02\n4.72452703157897266e-02\n5.12234563384055472e-02\n5.37812546632856631e-02\n5.45379223226705317e-02\n5.30020134623441497e-02\n4.86255355571695927e-02\n4.08795651234874907e-02\n2.93587821885517297e-02\n1.39163284511510006e-02\n-5.17793029363068300e-03\n-2.70742383229076108e-02\n-5.02078368780742232e-02\n-7.22400738757035393e-02\n-9.01355198897050708e-02\n-1.00436090309026158e-01\n-9.97754206923899961e-02\n-8.56317722391272546e-02\n-5.72415883143080270e-02\n-1.64944177358395914e-02\n3.14749341704374588e-02\n7.83484794042217658e-02\n1.13666194384225330e-01\n1.26994528346304342e-01\n1.11018147073586274e-01\n6.48657854679064172e-02\n-3.49181659506543878e-03\n-7.71504712652855418e-02\n-1.33548707168244934e-01\n-1.51153154567787745e-01\n-1.18001848935076925e-01\n-3.89462958449087668e-02\n6.22671804081234986e-02\n1.48821529272375047e-01\n1.84125207705273963e-01\n1.47910558410501575e-01\n4.74352934661753517e-02\n-8.32109419285155943e-02\n-1.97317937552089151e-01\n-2.57037082731427391e-01\n-2.50455926232977522e-01\n-1.94240242812533603e-01\n-1.20749396099910658e-01\n-5.88644181803297320e-02\n-2.13439372195877199e-02\n-5.15728235191573528e-03\n-6.26374916907836295e-04\n0.0\n4.85352772909272050e-04\n1.87976320651320086e-03\n4.44511799267375933e-03\n8.38104907811464996e-03\n1.38279719258594599e-02\n2.08501933686229927e-02\n2.94056471828120676e-02\n3.93056679622632160e-02\n5.01690532324971239e-02\n6.13771655699258747e-02\n7.20403348512093922e-02\n8.09897617610846193e-02\n8.68125732722695165e-02\n8.79491832199733592e-02\n8.28696557706421477e-02\n7.03370008551502113e-02\n4.97481073761928266e-02\n2.15164194751803761e-02\n-1.25737896393519153e-02\n-4.91476026748457126e-02\n-8.32862748697165006e-02\n-1.08972464075950071e-01\n-1.20019661907232747e-01\n-1.11465161753724853e-01\n-8.12387960722228963e-02\n-3.17184794953578458e-02\n2.93898492970098672e-02\n8.94620866065877901e-02\n1.33097772893369853e-01\n1.45977795402963073e-01\n1.19719043262555919e-01\n5.62569501846835116e-02\n-3.01609832732360438e-02\n-1.15035077835016541e-01\n-1.70202861441629633e-01\n-1.73489281074997254e-01\n-1.17980731800566160e-01\n-1.66182758539045634e-02\n1.00995098167397157e-01\n1.99363458915059577e-01\n2.51157095477910597e-01\n2.47826288546868279e-01\n2.01244001376940901e-01\n1.35675435390475135e-01\n7.50440098617345536e-02\n3.30269568816575695e-02\n1.09183926480451027e-02\n2.42238764718201958e-03\n2.71570034182801884e-04\n1.69844025527798870e-02\n2.94178481576173045e-02\n3.79486006779472390e-02\n4.47609279810593924e-02\n5.03563116332815877e-02\n5.47938069827442406e-02\n5.79078961682306520e-02\n5.93803740668985905e-02\n5.87816130720912183e-02\n5.56124203188991320e-02\n4.93598381578885109e-02\n3.95742105977684930e-02\n2.59706789304517127e-02\n8.55314712713884165e-03\n-1.22483915992552400e-02\n-3.54456378911905817e-02\n-5.93941845250948799e-02\n-8.17697878441054626e-02\n-9.96648275251104943e-02\n-1.09848817171786642e-01\n-1.09220305449291233e-01\n-9.54419511014518301e-02\n-6.76945545210667909e-02\n-2.74146347548283702e-02\n2.11911801018768477e-02\n7.11069636268208266e-02\n1.13180423296407318e-01\n1.37636253453721685e-01\n1.36340509113085345e-01\n1.05422373445670667e-01\n4.75460327325823717e-02\n-2.70666464169784203e-02\n-1.01678441873340228e-01\n-1.56491312648423947e-01\n-1.74030231231211835e-01\n-1.45008017004083806e-01\n-7.25412082165646371e-02\n2.73387669891054126e-02\n1.29839322618765046e-01\n2.09282779636900562e-01\n2.47837739289981235e-01\n2.41383148912926448e-01\n1.99772536185484767e-01\n1.41404582136829549e-01\n8.49451036050564989e-02\n4.24568714636649053e-02\n1.70487445131866852e-02\n5.17863852308492884e-03\n1.06125396919953558e-03\n1.10341741932113788e-04\n0.0\n4.63846217212728236e-04\n1.79646867446620452e-03\n4.24877504483129644e-03\n8.01463955228835789e-03\n1.32371672204725701e-02\n1.99975929003917800e-02\n2.82929631947811816e-02\n3.80052739262438863e-02\n4.88648229315314722e-02\n6.04119551915917596e-02\n7.19635752685727215e-02\n8.25934542472494121e-02\n9.11380055665433342e-02\n9.62411141851582108e-02\n9.64517169936979779e-02\n9.03848064781682670e-02\n7.69489319576624059e-02\n5.56299802453341513e-02\n2.68018482907750391e-02\n-7.98884877115471799e-03\n-4.58404930373909961e-02\n-8.25095426870334769e-02\n-1.12711282806295790e-01\n-1.30771874464053195e-01\n-1.31630365107321096e-01\n-1.12087946829890622e-01\n-7.20778929872655655e-02\n-1.56153124133254616e-02\n4.89702500170474814e-02\n1.09859903312516272e-01\n1.53761240487975875e-01\n1.68895515125131845e-01\n1.48314990094277260e-01\n9.25670215408966601e-02\n1.06459272418592422e-02\n-8.14880898871581244e-02\n-1.64786832114367288e-01\n-2.22388183659628119e-01\n-2.44519951791914325e-01\n-2.31145752733400212e-01\n-1.91217580376382784e-01\n-1.38815172227171602e-01\n-8.78722615725568562e-02\n-4.78154829566084100e-02\n-2.18440416374514196e-02\n-8.07080825778742905e-03\n-2.26713969154204026e-03\n-4.31356657815811948e-04\n-4.17710298451259471e-05\n1.83071569321944620e-02\n3.17089259486975916e-02\n4.09113414117112939e-02\n4.82900220044364809e-02\n5.44245055055272500e-02\n5.94377148819909551e-02\n6.32313670214819795e-02\n6.55609985617934127e-02\n6.60733490335541213e-02\n6.43378825986702096e-02\n5.98850456228961908e-02\n5.22580114216937841e-02\n4.10816953803162938e-02\n2.61499429689903799e-02\n7.52797880946788709e-03\n-1.43379326866686797e-02\n-3.85180540251508011e-02\n-6.35254294508116046e-02\n-8.72986316487704972e-02\n-1.07272381099108000e-01\n-1.20565464402991818e-01\n-1.24304859900282436e-01\n-1.16083435558507489e-01\n-9.45154072616321839e-02\n-5.98117487078331719e-02\n-1.42545772813651231e-02\n3.75817966449589827e-02\n8.90179759196709774e-02\n1.31976295069757638e-01\n1.58219960739846233e-01\n1.60988268938091428e-01\n1.36721680077404484e-01\n8.64324583039445121e-02\n1.62377857542503092e-02\n-6.33087904727292899e-02\n-1.39158215249878370e-01\n-1.98636136984954192e-01\n-2.32498912230219151e-01\n-2.37223047579371682e-01\n-2.15707994663488695e-01\n-1.76072044823857882e-01\n-1.28932910416447638e-01\n-8.41811243705952450e-02\n-4.84548854408707319e-02\n-2.41670980868829467e-02\n-1.01805561899570695e-02\n-3.48470337514928709e-03\n-9.10217013953451407e-04\n-1.61516024855473152e-04\n-1.46224690159501365e-05\n0.0\n4.35188246163590632e-04\n1.68547682985680024e-03\n3.98687120643017884e-03\n7.52422826158675832e-03\n1.24403612713559538e-02\n1.88304991679578287e-02\n2.67278351098281623e-02\n3.60822868276116579e-02\n4.67341331524713730e-02\n5.83847703252538611e-02\n7.05679606840022705e-02\n8.26264314358589880e-02\n9.37003272350285660e-02\n1.02735530967577690e-01\n1.08520799338706841e-01\n1.09762414834184543e-01\n1.05202920669118336e-01\n9.37857673229108846e-02\n7.48598491735622679e-02\n4.84069410152936155e-02\n1.52618145305375048e-02\n-2.27186105923835244e-02\n-6.25908940120597224e-02\n-1.00421545818261349e-01\n-1.31589639960103338e-01\n-1.51313009401676080e-01\n-1.55369584238095076e-01\n-1.40926094199902679e-01\n-1.07325282780475609e-01\n-5.66386752305110264e-02\n6.21282236819734567e-03\n7.39145954620812617e-02\n1.37816368876986117e-01\n1.89452782690574528e-01\n2.22215554065783222e-01\n2.32752458879173230e-01\n2.21673746059535826e-01\n1.93303045616494917e-01\n1.54491946995581553e-01\n1.12834847598122179e-01\n7.48436030808782432e-02\n4.46580086565002976e-02\n2.36493857611611048e-02\n1.09083154508833463e-02\n4.26721150446129124e-03\n1.36088875907570679e-03\n3.32099414211174562e-04\n5.51799947034207342e-05\n4.68641935715292540e-06\n2.02160570148415160e-02\n3.50152378784147136e-02\n4.51854126483627258e-02\n5.33738688536986028e-02\n6.02646196641034790e-02\n6.60605952431601862e-02\n7.07449276258157039e-02\n7.41624929963665414e-02\n7.60559138374937854e-02\n7.60894721926426570e-02\n7.38731055622042221e-02\n6.89924705186012593e-02\n6.10486081514550125e-02\n4.97091541557397321e-02\n3.47713397628320736e-02\n1.62348290257831734e-02\n-5.62040916378805672e-03\n-3.01594203100907371e-02\n-5.63326866475930901e-02\n-8.26469005012767655e-02\n-1.07183395950558133e-01\n-1.27681138296267621e-01\n-1.41697010104048726e-01\n-1.46847154020909088e-01\n-1.41118956668475043e-01\n-1.23224743895416461e-01\n-9.29480023985274489e-02\n-5.14154939412283241e-02\n-1.22012511927540581e-03\n5.36735758491835649e-02\n1.08282164492433428e-01\n1.57206683078990883e-01\n1.95416354274278892e-01\n2.19078706202605722e-01\n2.26258524707172726e-01\n2.17305031160185014e-01\n1.94797957042780856e-01\n1.63025952418189929e-01\n1.27100971691767650e-01\n9.19278969888488728e-02\n6.13032361261249409e-02\n3.73800299935770908e-02\n2.06127979618269327e-02\n1.01311263715972242e-02\n4.35211640873949847e-03\n1.59013379981742028e-03\n4.74781674599890238e-04\n1.08690220752846237e-04\n1.69702555679869885e-05\n1.35628901191104142e-06\n0.0\n3.94355440887313733e-04\n1.52733205504284957e-03\n3.61334646919630065e-03\n6.82265135916249044e-03\n1.12925790439105875e-02\n1.71270697829673003e-02\n2.43897278517194310e-02\n3.30921417259908424e-02\n4.31784336482834222e-02\n5.45070260550422903e-02\n6.68309853298359458e-02\n7.97788903303066066e-02\n9.28388955964365159e-02\n1.05349426696374732e-01\n1.16500627070267621e-01\n1.25351088286446477e-01\n1.30864302886658845e-01\n1.31968411007978348e-01\n1.27640906241853619e-01\n1.17016836713420197e-01\n9.95146700899060821e-02\n7.49686554308116038e-02\n4.37508659679600453e-02\n6.86124123648327190e-03\n-3.40386451190386671e-02\n-7.66710006819781298e-02\n-1.18282513258790092e-01\n-1.55883454848273650e-01\n-1.86569830041291684e-01\n-2.07891801847834956e-01\n-2.18211897739439331e-01\n-2.16984492065385393e-01\n-2.04889841786981802e-01\n-1.83775443634211971e-01\n-1.56394126841527786e-01\n-1.25975500056458772e-01\n-9.57128145911822908e-02\n-6.82758840017727991e-02\n-4.54598164081588818e-02\n-2.80448770477894661e-02\n-1.58830983431168041e-02\n-8.16196164485289907e-03\n-3.74869736465596043e-03\n-1.50835969840143794e-03\n-5.17231708444957912e-04\n-1.45188603566513724e-04\n-3.12932733540016589e-05\n-4.60591545958526809e-06\n-3.47387678049166223e-07\n2.35269429695284388e-02\n4.07498605699986513e-02\n5.25954217173599387e-02\n6.21729502777847581e-02\n7.03308869590835856e-02\n7.73856413291214851e-02\n8.34280578547448443e-02\n8.84185523418565128e-02\n9.22261008475879773e-02\n9.46487113765674404e-02\n9.54280523900954969e-02\n9.42637047852378229e-02\n9.08299321545598393e-02\n8.47967039255467236e-02\n7.58559559104132475e-02\n6.37533559486766072e-02\n4.83249970685382738e-02\n2.95374059202657240e-02\n7.52804233392384212e-03\n-1.73578367733226435e-02\n-4.45393006104977049e-02\n-7.31871002058185338e-02\n-1.02232742145909175e-01\n-1.30404999500536439e-01\n-1.56297494992011787e-01\n-1.78467424249294127e-01\n-1.95560539756208879e-01\n-2.06451675563531140e-01\n-2.10384292521665350e-01\n-2.07088102153881570e-01\n-1.96852332447087802e-01\n-1.80535021469169665e-01\n-1.59496598566752107e-01\n-1.35458501221037114e-01\n-1.10302737629734304e-01\n-8.58427674940154539e-02\n-6.36056739938660604e-02\n-4.46665922474907134e-02\n-2.95668995317224445e-02\n-1.83290348839679762e-02\n-1.05576793931826483e-02\n-5.59637001853306032e-03\n-2.69730783309720746e-03\n-1.16404283194422890e-03\n-4.40790280585385207e-04\n-1.42445706888468356e-04\n-3.77274017735791006e-05\n-7.68054861474071416e-06\n-1.06874004132637547e-06\n-7.62659623653073212e-08\n0.0\n3.26138336873851365e-04\n1.26312834727221063e-03\n2.98876473201105516e-03\n5.64616319217678062e-03\n9.35559081324142255e-03\n1.42179494048963722e-02\n2.03143534119790692e-02\n2.77032278701309573e-02\n3.64155426930279913e-02\n4.64485757907194957e-02\n5.77585852495978019e-02\n7.02528612667245311e-02\n8.37817801388581612e-02\n9.81316705657452326e-02\n1.13019502142760228e-01\n1.28090585707572036e-01\n1.42920594099271353e-01\n1.57023219435470957e-01\n1.69864622934965320e-01\n1.80885451102285516e-01\n1.89530547097516933e-01\n1.95285567762648576e-01\n1.97718563108583406e-01\n1.96523289950482988e-01\n1.91559794586849602e-01\n1.82886862263519218e-01\n1.70780590258914788e-01\n1.55733885718058546e-01\n1.38433321779276974e-01\n1.19712530407938111e-01\n1.00484929660582867e-01\n8.16625348940415857e-02\n6.40710784689813156e-02\n4.83737243705579176e-02\n3.50154896744112876e-02\n2.41976581335743637e-02\n1.58862401236034255e-02\n9.85190931104920967e-03\n5.73244980846626499e-03\n3.10437352957797620e-03\n1.54937516190618049e-03\n7.04037732039911783e-04\n2.86786666152385290e-04\n1.02612720966173196e-04\n3.13619561914021397e-05\n7.86241464629048516e-06\n1.51619941889540868e-06\n1.99978461680415899e-07\n1.35343024254926537e-08\n3.35273289321080734e-02\n5.80710371524851693e-02\n7.49658894003782800e-02\n8.86842847891848862e-02\n1.00511614336153049e-01\n1.11016091118366619e-01\n1.20490161407712931e-01\n1.29089107236677769e-01\n1.36887455909724481e-01\n1.43906053312152310e-01\n1.50126907142252491e-01\n1.55502522055311843e-01\n1.59962781821476413e-01\n1.63420940183988561e-01\n1.65779591958780309e-01\n1.66937126389268664e-01\n1.66794923819817115e-01\n1.65265360670665218e-01\n1.62280498995826361e-01\n1.57801141749975199e-01\n1.51825734829674236e-01\n1.44398405894290260e-01\n1.35615272582552099e-01\n1.25628062291052639e-01\n1.14644100047051778e-01\n1.02921876125454087e-01\n9.07617257558750307e-02\n7.84916423273525621e-02\n6.64488729956916324e-02\n5.49586416476682063e-02\n4.43119990834348540e-02\n3.47452757814838767e-02\n2.64237661703637036e-02\n1.94319938569528262e-02\n1.37721556740034584e-02\n9.37118537931897269e-03\n6.09550008477204031e-03\n3.77117484465162682e-03\n2.20634953340823710e-03\n1.21236909838257859e-03\n6.20607951226155260e-04\n2.93038416937956242e-04\n1.26076427464712475e-04\n4.86612666298843230e-05\n1.65082554819775215e-05\n4.78675752825813048e-06\n1.13912178247169619e-06\n2.08621883667635180e-07\n2.61436406163116380e-08\n1.68176486712475883e-09\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n0.0\n-1.08472742381388542e-03\n-4.20113124760565244e-03\n-9.90251969648426981e-03\n-1.84771170763622303e-02\n-2.97864244518314635e-02\n-4.29935124003884145e-02\n-5.62502048776087268e-02\n-6.64805016337743915e-02\n-6.94951639769335328e-02\n-6.07489836031443048e-02\n-3.70087187849701890e-02\n1.10930973807619473e-03\n4.64683006843350233e-02\n8.43432667407494757e-02\n9.54507151085634137e-02\n6.49196479072799287e-02\n-4.37546628453371750e-03\n-8.19387104591041138e-02\n-1.16402125826386982e-01\n-6.80514713575707669e-02\n4.51112437681951625e-02\n1.31643108854483243e-01\n9.06119505406491887e-02\n-6.35740425963955968e-02\n-1.55664101856450132e-01\n-3.25463011982652650e-02\n1.61062963962556399e-01\n9.14113873640488572e-02\n-1.71651781820813254e-01\n-9.17992460712520608e-02\n2.26861122079491717e-01\n-2.74638834186305171e-02\n-2.38715686972268110e-01\n3.27133758028667565e-01\n-2.52461693632194173e-01\n1.37970366908697711e-01\n-5.77226737959510572e-02\n1.91900278708997951e-02\n-5.17285234812659821e-03\n1.14295039404465238e-03\n-2.07983783328855249e-04\n3.11689067087047306e-05\n-3.82973710685585953e-06\n3.82261697502359940e-07\n-3.05284349905734929e-08\n1.90534375715001719e-09\n-8.95713424979161803e-11\n2.98382267775662062e-12\n-6.28005580839250896e-14\n6.28036983473509968e-16\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n-3.20283468138268617e-14\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n8.08445165689827342e-13\n1.49153584618682711e-02\n2.58341586690582249e-02\n3.32116220033397275e-02\n3.86332886759592903e-02\n4.19352060972968538e-02\n4.22859974032437497e-02\n3.84603343591977051e-02\n2.91354456526192324e-02\n1.33735769422542814e-02\n-8.66375493142438995e-03\n-3.48542512856124601e-02\n-6.03977488262971221e-02\n-7.77935527381269643e-02\n-7.82387419341021156e-02\n-5.50015082023348201e-02\n-8.46471169411793130e-03\n4.91546484099385228e-02\n9.33789301143736900e-02\n9.58451624442848149e-02\n4.24753634491714521e-02\n-4.65584996049520222e-02\n-1.13675365442407250e-01\n-9.62111172949670912e-02\n1.20719355238242849e-02\n1.22543885941844538e-01\n1.08867617260667501e-01\n-4.32122795008925698e-02\n-1.55525846583246002e-01\n-4.44856381102336565e-02\n1.56679204868117705e-01\n9.27910168036672200e-02\n-1.70832186850680245e-01\n-8.35132884230644357e-02\n2.25539034459328630e-01\n-4.43192212140970654e-02\n-2.19269242183260410e-01\n3.21854692028745448e-01\n-2.60382927692662802e-01\n1.49103608459652814e-01\n-6.56033227650731493e-02\n2.30603343843918986e-02\n-6.61577618876218760e-03\n1.56781788023062688e-03\n-3.08791591122133168e-04\n5.06329993144556269e-05\n-6.89739006530945087e-06\n7.75957347905360304e-07\n-7.13509751266757394e-08\n5.27725011601396538e-09\n-3.06437392918077032e-10\n1.34576262686770477e-11\n0.0\n9.31231485683661287e-04\n3.60664403551681084e-03\n8.50602400394575263e-03\n1.59003845831766355e-02\n2.57379331178424903e-02\n3.74429022893153773e-02\n4.96727203528201863e-02\n6.01209842233804345e-02\n6.55188921569456323e-02\n6.20485584438564691e-02\n4.63832477729556533e-02\n1.74258908623226814e-02\n-2.15613643306100493e-02\n-6.13677159501424679e-02\n-8.73740714402345270e-02\n-8.39387467097887224e-02\n-4.30735753536244936e-02\n2.54205416613427181e-02\n8.96319597239925298e-02\n1.06347499921684005e-01\n5.01739831038397407e-02\n-5.32299261477481092e-02\n-1.23700123221912733e-01\n-8.28396897050736464e-02\n5.28775536891320924e-02\n1.43085570967639686e-01\n5.61977132639769339e-02\n-1.23816025006318567e-01\n-1.28765238917973951e-01\n9.31608526655434005e-02\n1.63492650510438126e-01\n-1.06861882743359851e-01\n-1.62491258203155242e-01\n1.96459220801137896e-01\n4.41807868984634908e-02\n-2.70804866571520197e-01\n3.14111437351427047e-01\n-2.26653503225050040e-01\n1.19973760107645350e-01\n-4.96384679318883706e-02\n1.65764998398732141e-02\n-4.54921289331997394e-03\n1.03647975975075567e-03\n-1.97023114024771396e-04\n3.12759943321989361e-05\n-4.13512897657961669e-06\n4.52475045531942631e-07\n-4.05416570728018729e-08\n2.92645637485853674e-09\n-1.66078551450348462e-10\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367363e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n-1.61942344080973289e-09\n0.0\n8.66426047764552840e-04\n3.35565365371242501e-03\n7.91595443084345055e-03\n1.48087344978570980e-02\n2.40121934498876630e-02\n3.50470844797404965e-02\n4.67621537451872737e-02\n5.71499205294295071e-02\n6.33170572602035214e-02\n6.17867458500721278e-02\n4.93218215401055385e-02\n2.43605773569870315e-02\n-1.11229334763186093e-02\n-5.00111894576891411e-02\n-7.99363085453404787e-02\n-8.61829356704887223e-02\n-5.84006514722374415e-02\n3.58940229482597776e-04\n6.73683490910389760e-02\n1.04547897847193039e-01\n7.88234561964185065e-02\n-7.40196344727397145e-03\n-9.89024440883244094e-02\n-1.13935536034448268e-01\n-1.85003343777213544e-02\n1.09092261688566117e-01\n1.21812489154462897e-01\n-2.46754972559791140e-02\n-1.53724638728994389e-01\n-5.40369786300429894e-02\n1.52844124485929489e-01\n9.28820650447558793e-02\n-1.70534777166068824e-01\n-7.46582530210938983e-02\n2.23693329402947061e-01\n-6.04428648778056812e-02\n-1.99685494680089226e-01\n3.15424575732289769e-01\n-2.67266406134374912e-01\n1.60001492639399556e-01\n-7.37993799662741007e-02\n2.73166714845997499e-02\n-8.29850452787542735e-03\n2.09615300256641487e-03\n-4.43432899576961322e-04\n7.88025564301311331e-05\n-1.17598018378678287e-05\n1.46840532288151399e-06\n-1.52341139845976699e-07\n1.29853215619237565e-08\n1.38775648385790068e-02\n2.40366473857502247e-02\n3.09183376927100184e-02\n3.60490110866714675e-02\n3.93682703078595542e-02\n4.02329121179938673e-02\n3.76476647717229468e-02\n3.04822304143377576e-02\n1.78148420603557490e-02\n-5.49493293180726840e-04\n-2.34201922161792232e-02\n-4.75864693423650731e-02\n-6.75475918537050551e-02\n-7.61070536214551452e-02\n-6.63258440415182976e-02\n-3.49512535853120088e-02\n1.34896496535019863e-02\n6.41090627526219453e-02\n9.38543479864410168e-02\n8.10994027665983136e-02\n2.12923912180138265e-02\n-5.98341884996863305e-02\n-1.10030524056330112e-01\n-8.17948212773452893e-02\n1.99064348515221035e-02\n1.15539923940347122e-01\n1.02747525542275245e-01\n-2.93739623914327161e-02\n-1.40726818170620382e-01\n-7.11091388755192705e-02\n1.14989793196826465e-01\n1.32918431505758633e-01\n-8.91485417183863205e-02\n-1.61387508239882377e-01\n1.10055601699256336e-01\n1.53322920048713257e-01\n-2.00539512712531814e-01\n-2.47180274398494347e-02\n2.54306170934596176e-01\n-3.12462048980527374e-01\n2.35681063631851012e-01\n-1.30404128946312675e-01\n5.65779096716435281e-02\n-1.99041935277143658e-02\n5.78688142169003685e-03\n-1.40596016281414383e-03\n2.87177007748138724e-04\n-4.94265797874700931e-05\n7.16154736544445400e-06\n-8.70066637554330904e-07\n8.79840153153714664e-08\n0.0\n8.08158692342991866e-04\n3.12998515653717087e-03\n7.38517565752151457e-03\n1.38253132320619587e-02\n2.24522063933631361e-02\n3.28663626386842891e-02\n4.40769909952561378e-02\n5.43310572757455951e-02\n6.10631553156687629e-02\n6.11141009965064583e-02\n5.13829153887051665e-02\n3.00123716033360785e-02\n-1.99912992041950763e-03\n-3.92489735811247450e-02\n-7.14187172436418771e-02\n-8.50885006306406899e-02\n-6.88163708641762878e-02\n-2.08639639467001203e-02\n4.38628639729670422e-02\n9.38928414426831309e-02\n9.42769126249748818e-02\n3.17951926165291610e-02\n-6.21820057924964281e-02\n-1.16966777517995293e-01\n-7.26997949296026152e-02\n4.94382434623634529e-02\n1.32194169547042217e-01\n6.57987478006279020e-02\n-9.54888521621765629e-02\n-1.38115365157589542e-01\n3.28530164553998139e-02\n1.67792257111886667e-01\n1.30048521049588818e-03\n-1.88742910765102412e-01\n2.51320701308222379e-02\n2.04395439674644575e-01\n-1.48084466485668087e-01\n-1.07469414757189879e-01\n2.90187851903803806e-01\n-2.97112519015751531e-01\n2.02734630968114754e-01\n-1.04415761976263011e-01\n4.27882747149508635e-02\n-1.43458775460581847e-02\n3.99957789848110184e-03\n-9.36072935864137087e-04\n1.84837054629293472e-04\n-3.08416262170302079e-05\n4.34251259324342009e-06\n-5.13695069484047414e-07\n1.34110082885106896e-02\n2.32285477364278480e-02\n2.98860996054580788e-02\n3.48797786234509646e-02\n3.81892381223821603e-02\n3.92471829676037109e-02\n3.71538730469404624e-02\n3.08652396695173505e-02\n1.94853920076214666e-02\n2.71067763847321602e-03\n-1.85941472740483275e-02\n-4.18117164601635796e-02\n-6.22489781836381567e-02\n-7.34866556939636345e-02\n-6.88453932375501509e-02\n-4.41692459769243428e-02\n-1.44841254376550793e-03\n4.82920127164148186e-02\n8.54732402077048592e-02\n8.84366022246913380e-02\n4.60942565828448558e-02\n-2.84199156080363231e-02\n-9.42883172677511511e-02\n-1.01381495418010198e-01\n-2.96036179400611527e-02\n7.66130663395861722e-02\n1.22433390026091771e-01\n4.51895108600428030e-02\n-9.32860514910252708e-02\n-1.30432938458472730e-01\n8.20081992983343055e-03\n1.50931262325277454e-01\n6.15593609070025152e-02\n-1.49611746094292980e-01\n-9.18975496672049530e-02\n1.70628068541562344e-01\n6.53278764101653253e-02\n-2.21263159640443297e-01\n7.57862765818007600e-02\n1.80014718045679284e-01\n-3.07891757468326199e-01\n2.73094737405865817e-01\n-1.70599706566134629e-01\n8.22652000648003007e-02\n-3.19530648431686146e-02\n1.02346436590696598e-02\n-2.74111767195997199e-03\n6.18871018390373105e-04\n-1.18270476590780883e-04\n1.91502023000612154e-05\n-2.62231259216840435e-06\n0.0\n7.55578460580568064e-04\n2.92634279458157736e-03\n6.90600799852222978e-03\n1.29363300983711110e-02\n2.10376911073170518e-02\n3.08768236489718774e-02\n4.15981791442272472e-02\n5.16661078143419994e-02\n5.88016778015301306e-02\n6.01379021791481269e-02\n5.27364107797678588e-02\n3.45666628781011384e-02\n5.89504265384752611e-03\n-2.92676595184768254e-02\n-6.24162650889936235e-02\n-8.15792684394565371e-02\n-7.50796499562154940e-02\n-3.79476882499040075e-02\n2.12328593137061511e-02\n7.78173930559064309e-02\n9.85941149304906672e-02\n6.11661686760170548e-02\n-2.27622777263319330e-02\n-9.97514513298042305e-02\n-1.02888651705763778e-01\n-1.20807025459194316e-02\n1.01582608746979663e-01\n1.16455312492135171e-01\n-7.60805901610926531e-03\n-1.36066500045199795e-01\n-8.31897955474622947e-02\n1.06895593877533307e-01\n1.35737034604155427e-01\n-8.63403631012909095e-02\n-1.58775957632116244e-01\n1.13751534782601721e-01\n1.43731724342986561e-01\n-2.03878872102192021e-01\n-5.87789538397576802e-03\n2.37332242905210100e-01\n-3.09605301179605996e-01\n2.43864153707852221e-01\n-1.40753685791213057e-01\n6.38573485403865215e-02\n-2.35822617857804166e-02\n7.23183717831050836e-03\n-1.86373745437773733e-03\n4.06441527724938354e-04\n-7.52544596963745211e-05\n1.18349014785456684e-05\n1.29748046596704601e-02\n2.24730208888306512e-02\n2.89203443285908392e-02\n3.37826386461355932e-02\n3.70735103765748586e-02\n3.82919017756445865e-02\n3.66228434611867854e-02\n3.11018414542524983e-02\n2.08653274079568206e-02\n5.53264354703288282e-03\n-1.42895572606716974e-02\n-3.64739483856543617e-02\n-5.70233893254083121e-02\n-7.02447626090640931e-02\n-6.98370152539384142e-02\n-5.11337948938785855e-02\n-1.42477980975276950e-02\n3.30013877491282595e-02\n7.44602271651799846e-02\n8.97290742184536777e-02\n6.39803154686895137e-02\n6.62474528501299717e-04\n-7.10490007436175158e-02\n-1.04847531802944968e-01\n-6.65156353114471494e-02\n2.96532510695378393e-02\n1.11007035046757602e-01\n9.45749565975869261e-02\n-2.38279871481297950e-02\n-1.28234830261895888e-01\n-8.24577580494720436e-02\n8.23317203095241257e-02\n1.42175983333637179e-01\n-2.41581776187988727e-02\n-1.66715279407626094e-01\n-1.84856863672631846e-03\n1.86598622882913956e-01\n-3.24707272933673005e-02\n-1.97016240004024429e-01\n1.57410206759394794e-01\n8.71802057969275623e-02\n-2.77107436058996903e-01\n2.98443719560455956e-01\n-2.12349552094501015e-01\n1.14072588019664425e-01\n-4.88923977825864581e-02\n1.72137949940251340e-02\n-5.06402983100098791e-03\n1.25767317043062161e-03\n-2.65243772952035244e-04\n4.76286954382344434e-05\n0.0\n7.07968489296331976e-04\n2.74195016868431733e-03\n6.47197521372481002e-03\n1.21301141248609003e-02\n1.97513298692926567e-02\n2.90575946032089680e-02\n3.93078708653288034e-02\n4.91529013066403717e-02\n5.65642447482906444e-02\n5.89415059304466832e-02\n5.35217426355052081e-02\n3.81887578080876977e-02\n1.26659863912967283e-02\n-2.01568873840622977e-02\n-5.33481352746541099e-02\n-7.64032813736341271e-02\n-7.79635216493074212e-02\n-5.10203875666230822e-02\n7.47645038448772935e-04\n5.90476667224968249e-02\n9.43974333979763908e-02\n8.01097842806615112e-02\n1.32861223119367065e-02\n-7.08424179675549992e-02\n-1.10292460323256375e-01\n-6.09612044798007388e-02\n5.06065625774713701e-02\n1.23451269793656865e-01\n6.74739502464399704e-02\n-7.65659296996046013e-02\n-1.35657471002659180e-01\n-6.18618648727091262e-03\n1.47624469786863638e-01\n6.73650512836229259e-02\n-1.46985778585068672e-01\n-9.00015596288191583e-02\n1.70992902827890952e-01\n5.56035136067421984e-02\n-2.18203911748817481e-01\n9.03043044660199468e-02\n1.60312300232426735e-01\n-2.99307131992456898e-01\n2.77854027992182173e-01\n-1.80836553654588006e-01\n9.09536071203445873e-02\n-3.69603143071753210e-02\n1.24360806355069825e-02\n-3.51588474439267808e-03\n8.42644247771828802e-04\n-1.72057073174933489e-04\n1.25660851622543153e-02\n2.17650979532618728e-02\n2.80148691565616538e-02\n3.27512558713807800e-02\n3.60167105097771723e-02\n3.73681798800160822e-02\n3.60660927379665361e-02\n3.12191452153659926e-02\n2.19999108255394295e-02\n7.97469122125572805e-03\n-1.04542880833044995e-02\n-3.15646187902954706e-02\n-5.19566641690440978e-02\n-6.66026038364801315e-02\n-6.96421181121408550e-02\n-5.61774693093920960e-02\n-2.49650227763948962e-02\n1.87765641103288389e-02\n6.20631637581827711e-02\n8.64628826400711675e-02\n7.54416474777122176e-02\n2.54616815802393287e-02\n-4.47956591810238849e-02\n-9.61972522619968101e-02\n-8.88446596831045377e-02\n-1.47232460532069030e-02\n7.98957340379360531e-02\n1.13931358987936507e-01\n4.05719231910565623e-02\n-8.42089272230815145e-02\n-1.24926537929388320e-01\n-1.19412811027532813e-02\n1.30006635237572221e-01\n9.28698626409816125e-02\n-9.96723393881782660e-02\n-1.37510920336965714e-01\n8.45961876623151643e-02\n1.55716942567811989e-01\n-1.17808354237360399e-01\n-1.33744097450369165e-01\n2.06429215346547373e-01\n-1.22950983414358804e-02\n-2.19945020301886451e-01\n3.05575749356662763e-01\n-2.51167944244034380e-01\n1.50959974266316521e-01\n-7.14415927705423781e-02\n2.76102575783526184e-02\n-8.89761230061021126e-03\n2.42138235402886972e-03\n-5.60748546926756399e-04\n0.0\n6.64721503039129944e-04\n2.57445531113651305e-03\n6.07758595290546280e-03\n1.13967376923077672e-02\n1.85782744504545856e-02\n2.73904354777364419e-02\n3.71895618006323134e-02\n4.67867791572005864e-02\n5.43729619512734602e-02\n5.75896001532425900e-02\n5.38529455672598217e-02\n4.10233901178928828e-02\n1.84275732297137958e-02\n-1.19419538735961867e-02\n-4.45000244108597620e-02\n-7.01486470023432590e-02\n-7.81845175784877944e-02\n-6.04449962694124654e-02\n-1.69397497919277808e-02\n3.95860837346517919e-02\n8.42640670190352298e-02\n8.95293794404829896e-02\n4.26473996955846410e-02\n-3.74710134824418270e-02\n-1.00045607717233961e-01\n-9.12436200066436137e-02\n-3.07919418331961681e-03\n9.77443043046449800e-02\n1.09498705602713312e-01\n2.76459127980955264e-04\n-1.21176920020731729e-01\n-9.57212149620847302e-02\n6.99263510444538411e-02\n1.44712590204292418e-01\n-1.70180507225656877e-02\n-1.65492063308058573e-01\n-1.32593594657147494e-03\n1.84395681919911014e-01\n-4.01518108667000551e-02\n-1.89141599913593111e-01\n1.65849386128588627e-01\n6.72766396941971434e-02\n-2.63276998921612215e-01\n2.98599009982210173e-01\n-2.21311409603374337e-01\n1.23766710034296137e-01\n-5.53439689431981657e-02\n2.03976290301836026e-02\n-6.30794595635840016e-03\n1.65487462781866400e-03\n1.21823440615135385e-02\n2.11004388698264392e-02\n2.71642453878923676e-02\n3.17800318721095307e-02\n3.50147990996140454e-02\n3.64764585466587007e-02\n3.54926576575559996e-02\n3.12392660352287764e-02\n2.29269692955450799e-02\n1.00871736506703141e-02\n-7.03966632180659784e-03\n-2.70659806539836900e-02\n-4.71040018726541776e-02\n-6.27273685948354087e-02\n-6.85415273178781870e-02\n-5.96117494655238542e-02\n-3.37434077826140946e-02\n5.91611806895392389e-03\n4.91988156482614444e-02\n7.99572289449505258e-02\n8.13562563644935482e-02\n4.51503304889356097e-02\n-1.87387686923722145e-02\n-7.95862140527486550e-02\n-9.76111194390104492e-02\n-5.03983666932687202e-02\n4.02253180041324265e-02\n1.07602261153347395e-01\n8.50973945705747747e-02\n-2.37297744555176708e-02\n-1.18811118625401155e-01\n-8.53879356638187759e-02\n5.99163393384953627e-02\n1.38297091247731624e-01\n1.85796295510211526e-02\n-1.44138724308197269e-01\n-7.17183917720982250e-02\n1.44939390094748100e-01\n8.73218461841922255e-02\n-1.71522333970894780e-01\n-4.55581988535267157e-02\n2.14484951849583327e-01\n-1.03955288693271419e-01\n-1.40637699391194027e-01\n2.89724731581919970e-01\n-2.81534579049143141e-01\n1.90653321095350464e-01\n-9.98162610519150173e-02\n4.23261668210302838e-02\n-1.49128905323315727e-02\n4.43349789602427366e-03\n0.0\n6.25324819600201419e-04\n2.42187261228173729e-03\n5.71820073051128829e-03\n1.07277917580377025e-02\n1.75058681915401040e-02\n2.58595667798054429e-02\n3.52283722681730888e-02\n4.45618789398916360e-02\n5.22432785521148163e-02\n5.61327070979698445e-02\n5.38234482571292444e-02\n4.31960447334380354e-02\n2.32929243852100371e-02\n-4.60682895000526314e-03\n-3.60585962658080128e-02\n-6.32670856162364098e-02\n-7.63714540504679545e-02\n-6.66925484461792784e-02\n-3.15980595930738586e-02\n2.08032244445153294e-02\n7.04326019464805858e-02\n9.10473818054281514e-02\n6.40458072573806270e-02\n-4.86683635303292693e-03\n-7.83474865228954154e-02\n-1.02862988404400266e-01\n-4.80090006699355684e-02\n5.45916754694401249e-02\n1.16370508944651271e-01\n6.45202498297824945e-02\n-6.52426092928738433e-02\n-1.29180422712115717e-01\n-2.91157398776192462e-02\n1.23213956666700722e-01\n1.00546304462578617e-01\n-9.33765482333919067e-02\n-1.38460389778524484e-01\n8.37851974822961254e-02\n1.52249994346836781e-01\n-1.22103808917339893e-01\n-1.23390500310067305e-01\n2.08156209901371625e-01\n-2.97557001763756011e-02\n-2.02212516153575828e-01\n3.00414461729853532e-01\n-2.57564509713058998e-01\n1.60963796073489790e-01\n-7.92940502231964384e-02\n3.19851735541973464e-02\n-1.07966134090380084e-02\n1.18218850688574430e-02\n2.04761055805009855e-02\n2.63648212384096393e-02\n3.08653142328527003e-02\n3.40655065429620943e-02\n3.56182149780383261e-02\n3.49111266598420150e-02\n3.11816507928947481e-02\n2.36792306697088603e-02\n1.19140783496518715e-02\n-4.00113415278216533e-03\n-2.29559018386621475e-02\n-4.25002846019833305e-02\n-5.87464641243520477e-02\n-6.67661583894215149e-02\n-6.17195574619025314e-02\n-4.07719362369599395e-02\n-5.44898246737849680e-03\n3.65132441556158122e-02\n7.13157189502741373e-02\n8.27410908444875387e-02\n5.96454726914346714e-02\n5.05249345298917386e-03\n-5.86441471832625308e-02\n-9.53308380022594576e-02\n-7.48740206338896486e-02\n5.52777822809987526e-04\n8.37378840703002780e-02\n1.05508125933555991e-01\n3.30766473981736267e-02\n-7.98632867054875906e-02\n-1.18301762470999439e-01\n-2.20786218142520613e-02\n1.12171260915591375e-01\n1.06078033516259815e-01\n-5.85174960367822877e-02\n-1.46141915410985784e-01\n1.12786391121869230e-02\n1.64218304595668857e-01\n-1.15307513138928605e-04\n-1.82099078523469043e-01\n4.80712913473936229e-02\n1.80782157518543096e-01\n-1.73373599393282840e-01\n-4.78204035746176981e-02\n2.48782795315356020e-01\n-2.97617599641178676e-01\n2.29590255701946522e-01\n-1.33450234108266508e-01\n6.21212939413886278e-02\n-2.39024537121060865e-02\n0.0\n5.89459239630675405e-04\n2.28296581835769246e-03\n5.39093947011450633e-03\n1.01181082477759896e-02\n1.65265276479498353e-02\n2.44561176820623817e-02\n3.34175270486169601e-02\n4.24801042147986210e-02\n5.01956896660734758e-02\n5.46211899021339306e-02\n5.35205489376075830e-02\n4.48238903304857828e-02\n2.73755891623342698e-02\n1.89100287731939088e-03\n-2.81429722937596612e-02\n-5.61085684558014636e-02\n-7.30705240549803237e-02\n-7.02775671383335382e-02\n-4.32777028894012969e-02\n3.56275711626949073e-03\n5.47086736479843877e-02\n8.65163666216324373e-02\n7.75594152828907452e-02\n2.36972551266961678e-02\n-5.08831924213813402e-02\n-9.90065637869277648e-02\n-7.87270464669136277e-02\n7.50060122854139671e-03\n9.61405390032185059e-02\n1.01790209224222189e-01\n2.08369796042587015e-03\n-1.10193158055846951e-01\n-9.93076646292596482e-02\n4.39743878991384202e-02\n1.39063700362089815e-01\n2.91532002387371002e-02\n-1.40733562603063078e-01\n-7.48720289081402507e-02\n1.43458296138870345e-01\n8.39991863613573642e-02\n-1.72162638501838106e-01\n-3.52942131397878459e-02\n2.10158279557012023e-01\n-1.16712825269032663e-01\n-1.21132467976850441e-01\n2.79328066108516349e-01\n-2.84246905394109739e-01\n2.00071729523278952e-01\n-1.08844613857274952e-01\n4.80530209963381805e-02\n1.14922600724049265e-02\n1.99051783392005174e-02\n2.56335525082367101e-02\n3.00274931483593410e-02\n3.31928662556662812e-02\n3.48219307582096280e-02\n3.43556761164212285e-02\n3.10872819159398600e-02\n2.43041219918660178e-02\n1.35051157998083166e-02\n-1.29774750300447783e-03\n-1.92227601774330459e-02\n-3.81926436974035569e-02\n-5.47959673528173041e-02\n-6.45523977185115255e-02\n-6.27997375451621598e-02\n-4.62958333653411408e-02\n-1.53174841038176360e-02\n2.44514236604417394e-02\n6.14623366026503179e-02\n8.06625715579039476e-02\n6.93703604020695502e-02\n2.54473859455272566e-02\n-3.62329639918975571e-02\n-8.50524299233205439e-02\n-8.81818186801691106e-02\n-3.36770878604011684e-02\n5.08115729216132017e-02\n1.04399042037160023e-01\n7.46443613475742951e-02\n-2.72050305540487182e-02\n-1.12120673982042812e-01\n-8.37479133491851463e-02\n4.60046507038284203e-02\n1.30301616996863545e-01\n4.40446578194190336e-02\n-1.16257358092656207e-01\n-1.06722608485485135e-01\n8.80504610712046915e-02\n1.38944047619113192e-01\n-8.38052934875489625e-02\n-1.48633166077360213e-01\n1.26600827096389673e-01\n1.12964407019800595e-01\n-2.09290755529327438e-01\n4.63490204524739241e-02\n1.84681538745610885e-01\n-2.94756072085942455e-01\n2.63509715188389004e-01\n-1.71002858002246128e-01\n8.75221712285459419e-02\n0.0\n5.58131711453350890e-04\n2.16163482344907147e-03\n5.10504548810107334e-03\n9.58524296988092980e-03\n1.56696773664142530e-02\n2.32256908981733692e-02\n3.18240492781124915e-02\n4.06360144327589240e-02\n4.83584547662697789e-02\n5.32207930160238235e-02\n5.31439334236472744e-02\n4.61219090686797867e-02\n3.08631995675286812e-02\n7.64060770214586207e-03\n-2.08525399557392514e-02\n-4.90329105871024976e-02\n-6.88878425628730168e-02\n-7.18719073849743983e-02\n-5.23375530875757819e-02\n-1.17173566102928787e-02\n3.85083125798178286e-02\n7.78724650940173513e-02\n8.42507611632472009e-02\n4.66994104076546568e-02\n-2.21134973394450027e-02\n-8.42616762087593646e-02\n-9.44815030474671635e-02\n-3.43138618804917292e-02\n6.02448640247701117e-02\n1.10606906852684372e-01\n5.89672873872162037e-02\n-5.96357128856347951e-02\n-1.22438987259566201e-01\n-4.15220689484901775e-02\n1.02320104213933422e-01\n1.14520676519610440e-01\n-4.81649146576801634e-02\n-1.47352883892214959e-01\n6.50929525527315245e-03\n1.63564406368128440e-01\n-1.95662788233916252e-03\n-1.80464368394930491e-01\n5.58739118597337062e-02\n1.73097544817943844e-01\n-1.80461120149500887e-01\n-2.99140967430888069e-02\n2.35834576936491708e-01\n-2.97734405763082632e-01\n2.38765252893100521e-01\n-1.43993377301951136e-01\n1.12606236286108431e-02\n1.95039722496645924e-02\n2.51203675081038344e-02\n2.94428594435173982e-02\n3.25936329636365360e-02\n3.42981634062413804e-02\n3.40418838633491649e-02\n3.11646212012620001e-02\n2.49862370362516281e-02\n1.49984485764832684e-02\n1.13321443545071651e-03\n-1.59136321041216770e-02\n-3.43727069977829217e-02\n-5.12356114395391832e-02\n-6.24200457307248074e-02\n-6.34650990304514301e-02\n-5.08709573955256761e-02\n-2.39585810894055590e-02\n1.32769763740984495e-02\n5.13097352256324732e-02\n7.64677262211336112e-02\n7.54314451560962329e-02\n4.23390082807185847e-02\n-1.43095623388242148e-02\n-6.99368085206240886e-02\n-9.22800021940380771e-02\n-6.02305135424969357e-02\n1.56119384562149691e-02\n8.78568435963612143e-02\n9.76290806958258206e-02\n2.41944500398057621e-02\n-7.91574511300952716e-02\n-1.12686164422595519e-01\n-2.63589086708198896e-02\n9.95361994760310120e-02\n1.11048545253290068e-01\n-2.87037835193588164e-02\n-1.39764118571189311e-01\n-3.93068729812924011e-02\n1.38508980792032416e-01\n7.87850536927434952e-02\n-1.43343461823110391e-01\n-8.23306172323834407e-02\n1.74283726075745438e-01\n2.71967167816314880e-02\n-2.08519718854860814e-01\n1.28181537170848903e-01\n1.07019447191054912e-01\n-2.75604759139765065e-01\n2.92643788537325922e-01\n-2.13487375903595566e-01\n0.0\n5.36555357201452636e-04\n2.07806996275959784e-03\n4.90824438761363301e-03\n9.21906559878469568e-03\n1.50831753362770764e-02\n2.23900421329275845e-02\n3.07577910912961612e-02\n3.94373844310681176e-02\n4.72388576841546587e-02\n5.25262956239610501e-02\n5.33434111638707090e-02\n4.77345391868528104e-02\n3.43010326442458047e-02\n1.29630663114874423e-02\n-1.42281901506084215e-02\n-4.25489996587505720e-02\n-6.48009948777088368e-02\n-7.27312829614892020e-02\n-5.98820197520797751e-02\n-2.53969483229822476e-02\n2.26982788922833432e-02\n6.71307358337995680e-02\n8.62703558816243360e-02\n6.46609287202348365e-02\n5.49537533499366935e-03\n-6.32125106598353942e-02\n-9.80150066836217304e-02\n-6.70942371179074071e-02\n1.84709411883230389e-02\n9.71754078473968941e-02\n9.59823830620914892e-02\n1.02584754071985982e-03\n-1.04259127401055057e-01\n-1.01187466850620550e-01\n2.62514643503679243e-02\n1.31379760898842790e-01\n5.99242903102223945e-02\n-1.10201068097769708e-01\n-1.15762024152693099e-01\n8.29303564026031559e-02\n1.43926030461851345e-01\n-8.31087316786464220e-02\n-1.51156866688169744e-01\n1.30898094766331435e-01\n1.11033108600868610e-01\n-2.15359810015085057e-01\n5.51105486377852644e-02\n1.85263261856443040e-01\n-3.09128634565045690e-01\n2.85274178556070734e-01\n1.12811680580826371e-02\n1.95395562453222552e-02\n2.51695135176240176e-02\n2.95161893520194986e-02\n3.27195772302126819e-02\n3.45304729036893659e-02\n3.44653410443187119e-02\n3.18947314487860248e-02\n2.61569827714676559e-02\n1.67311326569897188e-02\n3.48068509019204900e-03\n-1.30472509448252179e-02\n-3.13240449839724683e-02\n-4.86531430852249203e-02\n-6.12580497456070572e-02\n-6.48287222432731985e-02\n-5.56536714003642019e-02\n-3.22806949063371151e-02\n2.68286337091401582e-03\n4.14363035902231835e-02\n7.16262703815698232e-02\n7.97164029352947778e-02\n5.70697523806352192e-02\n6.86194382348251711e-03\n-5.21880797458486589e-02\n-9.00920060933836919e-02\n-8.01027219164692772e-02\n-1.87829085360086620e-02\n6.15996107404751178e-02\n1.04329317887244671e-01\n6.73699318561795241e-02\n-3.18659121439653081e-02\n-1.10755723671457404e-01\n-8.47316808017256062e-02\n3.66491333770704308e-02\n1.26439164000306359e-01\n6.41749031910372886e-02\n-9.18535418343983251e-02\n-1.28026181483955587e-01\n3.45050265262660943e-02\n1.54602714549515380e-01\n4.97747220514992844e-03\n-1.69749430235600574e-01\n-5.88086997816299282e-03\n1.89035356840940055e-01\n-5.32237262611455070e-02\n-1.85223847241219569e-01\n1.87667176591277657e-01\n4.30370492101894361e-02\n-2.71904303857239127e-01\n3.44971521198151554e-01\n0.0\n5.28720293470842238e-04\n2.04772489141447035e-03\n4.83710070734153386e-03\n9.08864345350572818e-03\n1.48814315787463604e-02\n2.21229133253693089e-02\n3.04665140447625375e-02\n3.92205026449857982e-02\n4.72742320110471417e-02\n5.30830918778756600e-02\n5.47678032762448849e-02\n5.03883765126470137e-02\n3.84349772006548976e-02\n1.85217174045561594e-02\n-7.83545085812736332e-03\n-3.66213360218540715e-02\n-6.13126625904659439e-02\n-7.39150649648760427e-02\n-6.73262194816851151e-02\n-3.87841816141831081e-02\n6.69572352712249647e-03\n5.48951156641775406e-02\n8.52768332946187008e-02\n7.93158773293258512e-02\n3.23003392451329738e-02\n-3.76206366892809507e-02\n-9.19051249115256375e-02\n-9.10407653400545358e-02\n-2.48937747283039246e-02\n6.70752089873782598e-02\n1.11684587092847884e-01\n5.93008969787183829e-02\n-5.61552878653565415e-02\n-1.23436024792890717e-01\n-5.69594605169501320e-02\n8.54899783819857706e-02\n1.29369772050514864e-01\n-5.04762561324832715e-03\n-1.44993316247319343e-01\n-6.30410037364621811e-02\n1.37222091553566350e-01\n1.01279085026215993e-01\n-1.41983079427635439e-01\n-1.06048529295629357e-01\n1.79638979662099213e-01\n5.39816167549671752e-02\n-2.33854556233589278e-01\n1.09222574842228748e-01\n1.81304279138667535e-01\n-3.80587437549089691e-01\n1.15596644238771355e-02\n2.00219261006016162e-02\n2.57942651780825941e-02\n3.02649415202062878e-02\n3.35954327320021062e-02\n3.55569302068828239e-02\n3.56870885508342936e-02\n3.33746973743324349e-02\n2.79644269965136291e-02\n1.89151878601466934e-02\n6.02494591915520017e-03\n-1.02887403631502714e-02\n-2.86988885354639567e-02\n-4.67640918595139260e-02\n-6.09518731263029925e-02\n-6.70607647255533901e-02\n-6.11769133069689081e-02\n-4.11601679911218835e-02\n-8.38125949856840385e-03\n3.09394614339935092e-02\n6.57661187594638652e-02\n8.26348194601607411e-02\n7.07316123558559134e-02\n2.85299151638212130e-02\n-3.11083299979108517e-02\n-8.17986990355076549e-02\n-9.38275788721491394e-02\n-5.21714556221905754e-02\n2.68638376583728959e-02\n9.51811312718125052e-02\n9.90191032614290839e-02\n2.31757969726533591e-02\n-8.01896019776125457e-02\n-1.17951415842570378e-01\n-3.97141815899693593e-02\n8.93157582821752088e-02\n1.25927363331056030e-01\n7.40746925799166261e-03\n-1.32627024109481073e-01\n-9.39945268670820400e-02\n9.47252546758667879e-02\n1.44720069164530063e-01\n-5.86997293479595283e-02\n-1.71783053528826557e-01\n5.49137468358704001e-02\n1.88182481471540403e-01\n-1.05473535618489378e-01\n-1.75192487597214924e-01\n2.22690142960156962e-01\n5.48146718465201341e-02\n-3.87181353066379796e-01\n0.0\n5.27549903976270019e-04\n2.04319199239341590e-03\n4.82693082306359569e-03\n9.07279206973634310e-03\n1.48673017290040649e-02\n2.21347772892218353e-02\n3.05597816399356403e-02\n3.94998168627004875e-02\n4.79112799609156745e-02\n5.43253784882991309e-02\n5.69241467019633574e-02\n5.37727371647507904e-02\n4.32516637307514551e-02\n2.46881128929013864e-02\n-9.01746383983634855e-04\n-3.01745398801879332e-02\n-5.72768153441599037e-02\n-7.45427962625627716e-02\n-7.43997336419524868e-02\n-5.24234965512614254e-02\n-1.07835514335407612e-02\n3.95349611097750853e-02\n7.98674552512916580e-02\n8.99668562028068525e-02\n5.84612041095112223e-02\n-6.58142644140711185e-03\n-7.45294344876500092e-02\n-1.03614527160792502e-01\n-6.67311233423242556e-02\n2.17309344677692126e-02\n1.01828942902842653e-01\n1.04183271824068252e-01\n1.25898391680724815e-02\n-9.99567863271280943e-02\n-1.18634453559362585e-01\n-5.77781503830232437e-03\n1.24888775225888302e-01\n1.06700483411468316e-01\n-6.11891095426123077e-02\n-1.55065558362304512e-01\n-1.20789390477031040e-02\n1.66635019819325186e-01\n6.17278367375001455e-02\n-1.75660058946272624e-01\n-7.66437805407317041e-02\n2.07087120324542795e-01\n4.07468726821230490e-02\n-2.63244657930888304e-01\n8.09856331229080323e-02\n3.67228176870131151e-01\n1.19316336957019219e-02\n2.06661957782565409e-02\n2.66278808544837021e-02\n3.12601256158131294e-02\n3.47487432972276716e-02\n3.68858298317748662e-02\n3.72297116936428987e-02\n3.51865058879256010e-02\n3.01065197907504009e-02\n2.14287622375400610e-02\n8.88741375910550441e-03\n-7.22626983934675660e-03\n-2.57838222226101504e-02\n-4.46002906046353148e-02\n-6.04005847785921840e-02\n-6.91267353981919325e-02\n-6.67248819156752299e-02\n-5.04480257385786571e-02\n-2.04922385990677150e-02\n1.85363528440424530e-02\n5.71511955523329798e-02\n8.24597474258219609e-02\n8.21615450071491310e-02\n5.05667861999066909e-02\n-5.55644807105217485e-03\n-6.50702686204318176e-02\n-9.83181940902296270e-02\n-8.16302207365536131e-02\n-1.52197682938142367e-02\n6.74134888854743680e-02\n1.11502366498588912e-01\n7.66629908615940880e-02\n-2.31559704014103751e-02\n-1.12381991586864738e-01\n-1.05344089744358646e-01\n7.81633385746791087e-03\n1.23353781661611539e-01\n1.07870876844029351e-01\n-4.22533701173658030e-02\n-1.51360872968417548e-01\n-5.75125346111133307e-02\n1.32976234883609434e-01\n1.29167092977889725e-01\n-9.78624701242513384e-02\n-1.71763025988065698e-01\n8.23544981481478255e-02\n2.00359301014854191e-01\n-1.10086613297911390e-01\n-2.23208712091248263e-01\n2.00566388874003992e-01\n3.27778683515516422e-01\n0.0\n5.26026649942096312e-04\n2.03729245488701782e-03\n4.81354587565808317e-03\n9.05097965145708686e-03\n1.48437054905279850e-02\n2.21334162916687720e-02\n3.06369632997608339e-02\n3.97633296877361250e-02\n4.85400239726720834e-02\n5.55810261688882354e-02\n5.91408608010129747e-02\n5.73063269312113210e-02\n4.83696892529401345e-02\n3.13931004611271922e-02\n6.90350871709215653e-03\n-2.24504895758410108e-02\n-5.15732061656821519e-02\n-7.33100245077970281e-02\n-7.98959060873341287e-02\n-6.55483919229210010e-02\n-2.97408422988967823e-02\n2.00607482275149372e-02\n6.80494773700057454e-02\n9.39164568430810170e-02\n8.13123589905993815e-02\n2.85231006854009261e-02\n-4.44240884674993591e-02\n-9.95005595396171172e-02\n-9.90674633335273530e-02\n-3.30475743270465180e-02\n6.28768043976251634e-02\n1.19497835038597719e-01\n8.24743190488392425e-02\n-3.14724800836530677e-02\n-1.26108065840049383e-01\n-1.00493304158082553e-01\n3.78966599124390818e-02\n1.45206271584976565e-01\n8.07363744938708744e-02\n-9.85927531867095697e-02\n-1.55411266263762893e-01\n1.90276048301654156e-02\n1.82373113169793488e-01\n4.94385687702858095e-02\n-1.92279138467700422e-01\n-9.33428848759044472e-02\n2.16853938149749542e-01\n1.19904576004229310e-01\n-2.86275800461866181e-01\n-2.77221089326650294e-01\n1.23250204601898054e-02\n2.13475616413746905e-02\n2.75096359063707330e-02\n3.23134446603308353e-02\n3.59713031414936740e-02\n3.82986362248967233e-02\n3.88774702758442267e-02\n3.71349708333352374e-02\n3.24314070993096115e-02\n2.41904352076736905e-02\n1.20862753636630377e-02\n-3.71502371376536238e-03\n-2.22888831909890048e-02\n-4.17247127353583824e-02\n-5.90434824006105252e-02\n-7.03982873991016583e-02\n-7.16936943520829068e-02\n-5.96900172888246774e-02\n-3.34921848217564697e-02\n3.94193712871293480e-03\n4.49421430092567312e-02\n7.77760184883503486e-02\n8.95189722241822861e-02\n7.11324098866579491e-02\n2.34027224869894877e-02\n-3.91616578579012178e-02\n-9.01747318774142326e-02\n-1.01359542428534455e-01\n-5.88402741224329853e-02\n2.22523144902723805e-02\n9.70439849227830165e-02\n1.12713516674410125e-01\n4.70173182063902545e-02\n-6.20201935913815700e-02\n-1.28662358404559335e-01\n-8.44582587814799446e-02\n4.62944038404469807e-02\n1.41264175454684865e-01\n8.79295852886337048e-02\n-7.53743862492004119e-02\n-1.59550496505827394e-01\n-3.66974179487141589e-02\n1.52437846379547520e-01\n1.30106672619224734e-01\n-1.06330615462005035e-01\n-1.91862501177080813e-01\n5.82792314033168737e-02\n2.42491639363606432e-01\n-1.43960883830743635e-02\n-3.30703097049434624e-01\n-2.23166639928462557e-01\n0.0\n5.22850383301531841e-04\n2.02499082708499723e-03\n4.78504523308061983e-03\n9.00080938045557180e-03\n1.47738399732835618e-02\n2.20637563648950694e-02\n3.06213758624054345e-02\n3.99106252447344878e-02\n4.90363339722898681e-02\n5.67055308379114248e-02\n6.12611423831417243e-02\n6.08344376937173387e-02\n5.36587822809254100e-02\n3.85625464550377883e-02\n1.56040132165241718e-02\n-1.32773440874474902e-02\n-4.38288127719698717e-02\n-6.96014906985435167e-02\n-8.29574615748125133e-02\n-7.71489118587846412e-02\n-4.92521114525752493e-02\n-3.11928516734751634e-03\n4.91375244653703552e-02\n8.88834104076512838e-02\n9.70120484940724670e-02\n6.34501560344723631e-02\n-3.68112323322499629e-03\n-7.54911423946355714e-02\n-1.12048954291140007e-01\n-8.44717113471306902e-02\n6.70050500030345956e-04\n9.33439380221364606e-02\n1.24475477900171091e-01\n5.80533352298137073e-02\n-6.48114540812377710e-02\n-1.39327871089780203e-01\n-8.32043197651492483e-02\n6.61765561547167785e-02\n1.55925926147120725e-01\n6.80833394050011781e-02\n-1.15713123783904595e-01\n-1.63389666012275087e-01\n1.73699199335063011e-02\n1.94546718526201923e-01\n8.57587858055920554e-02\n-1.83735968388531151e-01\n-1.83538670737040138e-01\n1.44962681382501901e-01\n3.35730206034800027e-01\n1.71466085303228155e-01\n1.27439666445670150e-02\n2.20731977183531332e-02\n2.84488000271803550e-02\n3.34359048621391333e-02\n3.72757023159875148e-02\n3.98095251887595272e-02\n4.06463168573024322e-02\n3.92383184009757538e-02\n3.49606299427337036e-02\n2.72270639582224520e-02\n1.56573039500282098e-02\n2.95731221151341412e-04\n-1.81390027018585795e-02\n-3.80247714906939635e-02\n-5.67143301347281664e-02\n-7.06401898657462723e-02\n-7.57732726697385589e-02\n-6.85205381156993865e-02\n-4.70271509989825323e-02\n-1.26407809159044537e-02\n2.89696934297705364e-02\n6.77725767069635165e-02\n9.11488171057912716e-02\n8.78111225341061952e-02\n5.32368906058453342e-02\n-5.36279830414123325e-03\n-6.76562569702776895e-02\n-1.05408645271849649e-01\n-9.49694396682370101e-02\n-3.29881542931299426e-02\n5.38256853624611009e-02\n1.15514693326386864e-01\n1.06137288093462873e-01\n2.00946446903618146e-02\n-8.93567216290858807e-02\n-1.35867523744538476e-01\n-6.78379222119391140e-02\n7.00553319129948726e-02\n1.51606678112260002e-01\n8.06879855822344172e-02\n-8.82630756353997015e-02\n-1.69811288510451741e-01\n-4.59728950796321062e-02\n1.53772438679457862e-01\n1.63227941682464905e-01\n-6.58674061908992303e-02\n-2.31144777618972508e-01\n-6.53346558344812117e-02\n2.44830332443425364e-01\n3.09716378156946581e-01\n1.25933843214230734e-01\n0.0\n5.18144875268162748e-04\n2.00676647283631361e-03\n4.74255536235055827e-03\n8.92436221453749359e-03\n1.46609833656573801e-02\n2.19303133971985899e-02\n3.05184080872628986e-02\n3.99469457049847626e-02\n4.94034073296349199e-02\n5.76972263960261328e-02\n6.32751416233978542e-02\n6.43365123972953062e-02\n5.90886558646720392e-02\n4.61654980902708317e-02\n2.51917996775783415e-02\n-2.59459978513986930e-03\n-3.38428720938349914e-02\n-6.29835255589216575e-02\n-8.28306553343711727e-02\n-8.61285315739844376e-02\n-6.80144034402053177e-02\n-2.88974588452075333e-02\n2.33312855070216332e-02\n7.32774029096851659e-02\n1.01591792993610458e-01\n9.23467895210927509e-02\n4.23100451626656840e-02\n-3.23711533318204528e-02\n-9.78380149717256592e-02\n-1.16176716338393243e-01\n-6.80926110339064861e-02\n2.73780313203615816e-02\n1.13219476327446125e-01\n1.25130027261880744e-01\n4.13855392027896174e-02\n-8.43999346675819856e-02\n-1.47968881720267509e-01\n-7.93132957986553422e-02\n7.49338583021186139e-02\n1.66118330415260335e-01\n8.21336033432705781e-02\n-1.07655970025589756e-01\n-1.87228219460262302e-01\n-3.53553762873080255e-02\n1.85702793208795708e-01\n1.86667017837187449e-01\n-7.24083889189320734e-02\n-3.00190852205363901e-01\n-2.64046768749817529e-01\n-8.84803722001087090e-02\n1.32015575523031486e-02\n2.28657684196336801e-02\n2.94746197099809218e-02\n3.46620489723647868e-02\n3.87009349522159582e-02\n4.14612393327834644e-02\n4.25820866931154937e-02\n4.15449026434799654e-02\n3.77447690507752218e-02\n3.05918854436054294e-02\n1.96583076244036432e-02\n4.87290467952259960e-03\n-1.32496157121863127e-02\n-3.33843581583687654e-02\n-5.32459229422683547e-02\n-6.96112341344632818e-02\n-7.86296599218090642e-02\n-7.65141349995044212e-02\n-6.06276750218677496e-02\n-3.08261728355983915e-02\n9.29847157695791113e-03\n5.18525583273821075e-02\n8.54369535135755531e-02\n9.78172911454913141e-02\n8.03799865009652142e-02\n3.32585257442576804e-02\n-3.11443321764949647e-02\n-8.91283748656856584e-02\n-1.13222238336820602e-01\n-8.54389420451842629e-02\n-1.09947436796547157e-02\n7.64904996572072088e-02\n1.26584995239663683e-01\n1.00638360074449970e-01\n3.69906914210240984e-03\n-1.04959236277897619e-01\n-1.42470168168522038e-01\n-6.61002453360126918e-02\n7.55275217273289334e-02\n1.61230444431254116e-01\n9.77840027490069486e-02\n-7.34061125918454155e-02\n-1.84274809571863096e-01\n-9.95333208085601440e-02\n1.13542373099628627e-01\n2.19807683923247593e-01\n7.32974261125039911e-02\n-1.91830313869692126e-01\n-3.10590213917559976e-01\n-2.10027838718886778e-01\n-5.94807863295647582e-02\n0.0\n5.11873866085476919e-04\n1.98247895870785765e-03\n4.68573856387527118e-03\n8.82096746598061594e-03\n1.45039062887717674e-02\n2.17308956741782619e-02\n3.03241926252740893e-02\n3.98655671286475416e-02\n4.96298891688903704e-02\n5.85377947963818535e-02\n6.51551199841841622e-02\n6.77740180891068800e-02\n6.46122037818718103e-02\n5.41564998453806859e-02\n3.56479595236840890e-02\n9.65334345680364178e-03\n-2.14067907370168176e-02\n-5.29854642229138709e-02\n-7.86619481732068748e-02\n-9.11715990924227282e-02\n-8.43120543209798373e-02\n-5.54990903060590471e-02\n-8.27450270440022867e-03\n4.64021795146344826e-02\n9.14328743395756011e-02\n1.08327331707191596e-01\n8.49596918401350487e-02\n2.37944753294131589e-02\n-5.39104201893179438e-02\n-1.12696087467304432e-01\n-1.18107456144624284e-01\n-5.79144630933184912e-02\n4.25117922727733522e-02\n1.25029375107543472e-01\n1.29998772908383353e-01\n4.11970994975997470e-02\n-8.77505395519162096e-02\n-1.57706649030367407e-01\n-9.88779336802679820e-02\n5.56583684788117886e-02\n1.73819689813054734e-01\n1.32483177541224184e-01\n-5.07612119808780737e-02\n-2.04126209451347990e-01\n-1.58919122706659671e-01\n6.54703531017176849e-02\n2.68432452142239764e-01\n2.85331844318864603e-01\n1.56755955272790293e-01\n3.82501858066885136e-02\n1.37108201926160675e-02\n2.37478371870523293e-02\n3.06162320088740648e-02\n3.60263892208479222e-02\n4.02862405685484107e-02\n4.32974079620718974e-02\n4.47327351899599115e-02\n4.41072985648421623e-02\n4.08418945999863142e-02\n3.43503501411647344e-02\n2.41657179108728318e-02\n1.01102661934463559e-02\n-7.49916167476508307e-03\n-2.76381960779074343e-02\n-4.84071809115783624e-02\n-6.69877930097867030e-02\n-7.98215979076635634e-02\n-8.31033333980582822e-02\n-7.36350864555424256e-02\n-4.99830218934032497e-02\n-1.37143865106711463e-02\n2.97020206880918257e-02\n7.09005206369192065e-02\n9.80878120900256084e-02\n1.00232692385853431e-01\n7.15581636297047963e-02\n1.59644190547944334e-02\n-5.08622628003853050e-02\n-1.04063825625110518e-01\n-1.18126297341333092e-01\n-7.95921741263335564e-02\n1.48364616201606954e-03\n8.92441838155115241e-02\n1.35069733742325504e-01\n1.04431362306104711e-01\n4.58757063017501982e-03\n-1.07694921775258259e-01\n-1.53713207414129027e-01\n-8.82240589623238675e-02\n5.38796004141452525e-02\n1.65733232506252298e-01\n1.45326860514479239e-01\n-8.85805450130959515e-03\n-1.73596689952180444e-01\n-1.95251903652511161e-01\n-3.41672085127819256e-02\n1.86304249322996968e-01\n2.94982110695329758e-01\n2.38299770749436118e-01\n1.10156334576112722e-01\n2.35160482649018725e-02\n0.0\n5.03829910157024309e-04\n1.95132485135933432e-03\n4.61268965285001505e-03\n8.68700100121147165e-03\n1.42965135003259129e-02\n2.14559935160467188e-02\n3.00245825017220885e-02\n3.96460992958243136e-02\n4.96870899412766923e-02\n5.91878248030644344e-02\n6.68486073288224181e-02\n7.10803603392643757e-02\n7.01513942982660982e-02\n6.24570231983486018e-02\n4.69198733752229230e-02\n2.34916323353857072e-02\n-6.32937943820533616e-03\n-3.91190377848723084e-02\n-6.95021232286002072e-02\n-9.07157860312962083e-02\n-9.59287326518659667e-02\n-8.02863520467518854e-02\n-4.33172568700022700e-02\n9.07508375061119067e-03\n6.41389739140280496e-02\n1.04408986533079132e-01\n1.12914286042483339e-01\n8.05858927945805326e-02\n1.32155230108062828e-02\n-6.60508233442742010e-02\n-1.22418464420581907e-01\n-1.24101350365442176e-01\n-6.12087645377138584e-02\n4.14358423512139751e-02\n1.29140680915619893e-01\n1.44427380930336136e-01\n6.59575796647769441e-02\n-6.58955103542456788e-02\n-1.62929403845807896e-01\n-1.46125008194985251e-01\n-1.21178604172365763e-02\n1.47092277867139520e-01\n2.03608664936255374e-01\n9.75360261112312860e-02\n-1.04542307403522994e-01\n-2.61235928998600653e-01\n-2.78670917426320441e-01\n-1.83231316968744118e-01\n-7.30253222873990665e-02\n-1.38093123553164505e-02\n1.42881969387842166e-02\n2.47478830465243625e-02\n3.19104220564382993e-02\n3.75725396641210380e-02\n4.20813279274512633e-02\n4.53735629469161142e-02\n4.71597799904801412e-02\n4.69937142558076240e-02\n4.43284083149644154e-02\n3.85898211578814820e-02\n2.92826534939568117e-02\n1.61346531207783514e-02\n-7.24406128362516935e-04\n-2.05674754558623080e-02\n-4.18966153022693813e-02\n-6.23510182130862442e-02\n-7.87754595784321554e-02\n-8.75332253360353724e-02\n-8.51254969465759931e-02\n-6.91156455772551775e-02\n-3.92443571245314621e-02\n1.53047051333233533e-03\n4.64882892369766418e-02\n8.55950299106207346e-02\n1.07355285414571761e-01\n1.02119398399193428e-01\n6.62554655374364282e-02\n5.80256699946101774e-03\n-6.23818928577828807e-02\n-1.13870916654734047e-01\n-1.24934524223900237e-01\n-8.39529765128962935e-02\n-1.16313109498337921e-03\n8.97430670407719233e-02\n1.42943989887789197e-01\n1.23395408890754593e-01\n3.12281934255257618e-02\n-8.85363661013500308e-02\n-1.63829048355666362e-01\n-1.38280541050058742e-01\n-1.51088029971696951e-02\n1.32128283878399977e-01\n2.00685247629988545e-01\n1.31331792209128856e-01\n-4.20364782271906781e-02\n-2.12853513891238966e-01\n-2.82832485798281519e-01\n-2.34636128557086932e-01\n-1.30653025868562617e-01\n-4.57076160469666107e-02\n-7.73597921331336830e-03\n0.0\n4.93676715917289936e-04\n1.91200169915803396e-03\n4.52032249118724042e-03\n8.51660652904040819e-03\n1.40290067617189623e-02\n2.10904571622474619e-02\n2.95973409017534182e-02\n3.92570475902511221e-02\n4.95315679676590417e-02\n5.95887707733395444e-02\n6.82787286908411589e-02\n7.41581718172140275e-02\n7.55897534960991990e-02\n7.09411646515149541e-02\n5.88982350166196850e-02\n3.88820418265325152e-02\n1.15205391701934303e-02\n-2.09272890055101565e-02\n-5.43520077384839484e-02\n-8.29735502663451474e-02\n-1.00103090032938755e-01\n-9.95742808578115451e-02\n-7.77280450789027688e-02\n-3.55350381620725547e-02\n1.98855379492025898e-02\n7.52963366236699960e-02\n1.13748313620187697e-01\n1.19567693314531570e-01\n8.49779318670862149e-02\n1.60205815867177220e-02\n-6.55205440953399998e-02\n-1.27106839108080127e-01\n-1.37857518387986488e-01\n-8.47298279499929946e-02\n1.53911556527632585e-02\n1.16775873867940638e-01\n1.63689067519124598e-01\n1.21389844888310935e-01\n2.67302693899300640e-03\n-1.29999887339071168e-01\n-1.95625735249068344e-01\n-1.45045914908645351e-01\n2.82122775010664080e-03\n1.69160835897665202e-01\n2.67263905638055688e-01\n2.60418949875379502e-01\n1.79247322585266794e-01\n8.67495742514142187e-02\n2.70118938494063113e-02\n4.12760951192416101e-03\n1.49574355107764019e-02\n2.59070382555996702e-02\n3.34103187161912743e-02\n3.93634926525710041e-02\n4.41579925950299212e-02\n4.77699066678403395e-02\n4.99520423572369990e-02\n5.03025288940253321e-02\n4.83142054514633518e-02\n4.34352181094812759e-02\n3.51549920349829154e-02\n2.31226051412646814e-02\n7.29723754719351948e-03\n-1.18800716980146780e-02\n-3.33184719848593491e-02\n-5.51555457702186253e-02\n-7.47410558107898942e-02\n-8.87957768410145981e-02\n-9.38094112886287829e-02\n-8.67093427384288823e-02\n-6.57642116341972116e-02\n-3.15821504842223183e-02\n1.20619800934416276e-02\n5.79448815880468995e-02\n9.60632906983110157e-02\n1.15533970682542453e-01\n1.07672619045442675e-01\n6.96632181268176248e-02\n7.61875525778082235e-03\n-6.25800542155348916e-02\n-1.18131656204670615e-01\n-1.36287892694833962e-01\n-1.04009198701779132e-01\n-2.66698296410573348e-02\n6.91215664945476482e-02\n1.42547094527009283e-01\n1.55427467516478096e-01\n9.28569571602535088e-02\n-2.33230755648644178e-02\n-1.38799296853767795e-01\n-1.91377306454527413e-01\n-1.45367261800379954e-01\n-1.52806856265965078e-02\n1.39094750021995089e-01\n2.46779911883310887e-01\n2.67491925281285070e-01\n2.11755573969142186e-01\n1.25444124620026604e-01\n5.37449564104345925e-02\n1.50607827492747481e-02\n2.09340717360278475e-03\n0.0\n4.80916128102177860e-04\n1.86258015506228763e-03\n4.40406674448863555e-03\n8.30111871206751749e-03\n1.36869143572750582e-02\n2.06119813792233174e-02\n2.90098811088158604e-02\n3.86525341268311035e-02\n4.91004473321563009e-02\n5.96563265349182581e-02\n6.93348817067047790e-02\n7.68662672925349982e-02\n8.07542352533404673e-02\n7.94106808251152374e-02\n7.13831137283397615e-02\n5.56776910029079738e-02\n3.21554522573704385e-02\n1.94317478200416996e-03\n-3.22429954838103078e-02\n-6.60026549303534410e-02\n-9.35444803972059064e-02\n-1.08499585970612461e-01\n-1.05289784397635727e-01\n-8.09083402844614358e-02\n-3.67308408658912205e-02\n2.02663159706942576e-02\n7.76305448891233679e-02\n1.19526346609442363e-01\n1.30929328102454529e-01\n1.03192560474489298e-01\n3.92393637834547726e-02\n-4.40845046568014570e-02\n-1.18796424889734381e-01\n-1.54486085489890762e-01\n-1.30986419276227312e-01\n-5.00448040811058981e-02\n6.04540244407985386e-02\n1.54374488472987265e-01\n1.86506055221285799e-01\n1.35104104582638412e-01\n1.54853801931412825e-02\n-1.25030930514702959e-01\n-2.30418694419799563e-01\n-2.64827737460453128e-01\n-2.29148367331991870e-01\n-1.54850322770195781e-01\n-8.08406693003520943e-02\n-3.10860523024206435e-02\n-7.91094553902158860e-03\n-1.00672397562147397e-03\n1.57556312434178822e-02\n2.72895538189193744e-02\n3.51989076362844155e-02\n4.14976177785205749e-02\n4.66282867315528440e-02\n5.06114635291939896e-02\n5.32476785184961207e-02\n5.41861794911559502e-02\n5.29684770835219462e-02\n4.90769028400093593e-02\n4.20016591115977278e-02\n3.13336035477406322e-02\n1.68847974986953420e-02\n-1.16814559807500488e-03\n-2.21326497225515784e-02\n-4.46678513536433036e-02\n-6.67120155994363750e-02\n-8.55215910111823824e-02\n-9.78773515013306866e-02\n-1.00501821323705637e-01\n-9.06987864700400243e-02\n-6.71655310557862928e-02\n-3.08439653318862417e-02\n1.44173710057306625e-02\n6.16919762587253354e-02\n1.01604113461393697e-01\n1.23959216506245945e-01\n1.20320519697285050e-01\n8.70832737301564380e-02\n2.81592506923929800e-02\n-4.39206183908794137e-02\n-1.09613421911929160e-01\n-1.47178783566452642e-01\n-1.39988126385182876e-01\n-8.41366078226569863e-02\n6.91887417377878497e-03\n1.03834530621655832e-01\n1.70200642647480915e-01\n1.76552904201400018e-01\n1.13957373258930933e-01\n1.77762664112789375e-04\n-1.26148841254665939e-01\n-2.21967571336377151e-01\n-2.59042627674045900e-01\n-2.35489177714638204e-01\n-1.73100064527981184e-01\n-1.02794339730903309e-01\n-4.80828828871949984e-02\n-1.67739097419925993e-02\n-3.90601147273766762e-03\n-4.57671772531479369e-04\n0.0\n4.64790206452847900e-04\n1.80012472907218691e-03\n4.25696991739956451e-03\n8.02736314239092461e-03\n1.32482609214904703e-02\n1.99867673738766925e-02\n2.82129810168393197e-02\n3.77635426389177145e-02\n4.82995555071994154e-02\n5.92646545311176567e-02\n6.98520234010412827e-02\n7.89926241932342177e-02\n8.53800680741045037e-02\n8.75492378552396450e-02\n8.40243176361614996e-02\n7.35453010058889495e-02\n5.53684229051365426e-02\n2.96142187819466926e-02\n-2.39204422812883035e-03\n-3.78747918193715338e-02\n-7.25709975171553306e-02\n-1.01022501171687706e-01\n-1.17291241179618352e-01\n-1.16113799974974161e-01\n-9.43802676448681904e-02\n-5.26512700751537374e-02\n3.74132136099718324e-03\n6.45581150805164400e-02\n1.15959520046676368e-01\n1.43433129209902338e-01\n1.35976360206222335e-01\n9.05013258209035470e-02\n1.48815272776005713e-02\n-7.20308613877339160e-02\n-1.44436938439777673e-01\n-1.77265587077212683e-01\n-1.55276691262976857e-01\n-8.00128594899880974e-02\n2.89530506225720123e-02\n1.40087700863002901e-01\n2.21530812696389384e-01\n2.53352651589392186e-01\n2.34531636339663396e-01\n1.81135025852614345e-01\n1.16967327011123695e-01\n6.22193507074001936e-02\n2.64001169205736463e-02\n8.42765322098499615e-03\n1.80730323093888749e-03\n1.95958753960560200e-04\n1.67456806926408776e-02\n2.90043697669791871e-02\n3.74168842011296729e-02\n4.41416455799882590e-02\n4.96819975576597503e-02\n5.41096880434463953e-02\n5.72797459877055215e-02\n5.89006875795471188e-02\n5.85733814880015566e-02\n5.58288934071076645e-02\n5.01780538505328597e-02\n4.11797445351756580e-02\n2.85312258063428852e-02\n1.21795024979243997e-02\n-7.55328151296852032e-03\n-2.98453817736774388e-02\n-5.32762930470789542e-02\n-7.57866508415163675e-02\n-9.47376612146426100e-02\n-1.07110653076629786e-01\n-1.09876204943251551e-01\n-1.00535496907161126e-01\n-7.77919177811867979e-02\n-4.22512150494102692e-02\n3.01608129830392268e-03\n5.22660201224930121e-02\n9.74498035002971941e-02\n1.29318185163318139e-01\n1.39263198505297142e-01\n1.21655167445656631e-01\n7.61504809450666981e-02\n9.21941330421732069e-03\n-6.58988303008093690e-02\n-1.31348020440856916e-01\n-1.68851399574107913e-01\n-1.65067364026332625e-01\n-1.16455901605432371e-01\n-3.17029128913480091e-02\n6.97572032108033369e-02\n1.63243055524063041e-01\n2.26709161495169065e-01\n2.47999248284557688e-01\n2.28356117762501754e-01\n1.80588754133267193e-01\n1.22848262478377129e-01\n7.11669837017425422e-02\n3.43755619747565105e-02\n1.33581631869661172e-02\n3.93002343533048124e-03\n7.80452112239006447e-04\n7.86551538802442927e-05\n0.0\n4.44066226918535408e-04\n1.71986110146865145e-03\n4.06772613148341858e-03\n7.67392669392581196e-03\n1.26773665813212331e-02\n1.91600408363095699e-02\n2.71270975606825969e-02\n3.64789645379589092e-02\n4.69779456791872344e-02\n5.82128641895110766e-02\n6.95672084908683375e-02\n8.01985451267266669e-02\n8.90393288302810393e-02\n9.48310726062883136e-02\n9.62042751645431210e-02\n9.18144229320311533e-02\n8.05385587488987309e-02\n6.17262933746570916e-02\n3.54833556949551779e-02\n2.94578639566588129e-03\n-3.35183368692250627e-02\n-7.02596702727231182e-02\n-1.02535516033984642e-01\n-1.25002503105507368e-01\n-1.32534909403406426e-01\n-1.21310241619817516e-01\n-8.99994393022761074e-02\n-4.07917490718825784e-02\n2.00891204630507490e-02\n8.27144898112318061e-02\n1.34835982653164321e-01\n1.64276888692588274e-01\n1.61925206272636374e-01\n1.24575385827165652e-01\n5.66733733950405966e-02\n-2.98670658854059100e-02\n-1.18118671255787164e-01\n-1.90426049570797395e-01\n-2.33277670025315825e-01\n-2.41072216445114312e-01\n-2.17313489366684875e-01\n-1.72710774679188800e-01\n-1.20968237994303299e-01\n-7.40742936163023974e-02\n-3.90562593716128337e-02\n-1.73072068707550465e-02\n-6.20689967478513585e-03\n-1.69304698919221265e-03\n-3.12852197044231374e-04\n-2.94238385738592297e-05\n1.80466430045568837e-02\n3.12577025899499830e-02\n4.03305563469857076e-02\n4.76110714870780355e-02\n5.36779877897741176e-02\n5.86638243029065712e-02\n6.24871171373273734e-02\n6.49260550090477173e-02\n6.56542482842580738e-02\n6.42696500796703374e-02\n6.03287319878057365e-02\n5.33923305704204695e-02\n4.30868536383961429e-02\n2.91820582315311210e-02\n1.16834056347639784e-02\n-9.06733059410924289e-03\n-3.22949843174910808e-02\n-5.67153708810760465e-02\n-8.05048776931757554e-02\n-1.01342911036234662e-01\n-1.16554504595617212e-01\n-1.23373264545610234e-01\n-1.19328590016218858e-01\n-1.02734710018631992e-01\n-7.32239753780402347e-02\n-3.22282629173540197e-02\n1.67200003117233646e-02\n6.80081706131897695e-02\n1.14403715121220606e-01\n1.48004692985458902e-01\n1.61615147633278028e-01\n1.50334379547419489e-01\n1.13010161737889164e-01\n5.31277786975195565e-02\n-2.12549497260382872e-02\n-9.87285452959789367e-02\n-1.66789310359531706e-01\n-2.14641775703679011e-01\n-2.35769290103635398e-01\n-2.29445163219558323e-01\n-2.00625331101147969e-01\n-1.58204601963986335e-01\n-1.12235563923676451e-01\n-7.11215796235267483e-02\n-3.97786000100833551e-02\n-1.92923167282388446e-02\n-7.90633267280369499e-03\n-2.63339815374157623e-03\n-6.69385646308585632e-04\n-1.15586375214438866e-04\n-1.01813589900157397e-05\n0.0\n4.16514556530805371e-04\n1.61315394089677692e-03\n3.81588939124775451e-03\n7.20210311120565109e-03\n1.19098016474486253e-02\n1.80330690879507809e-02\n2.56092502864472306e-02\n3.45998501702722214e-02\n4.48666253350459426e-02\n5.61447983942036793e-02\n6.80162793250735642e-02\n7.98870575866657551e-02\n9.09743732418855644e-02\n1.00310645717598040e-01\n1.06772075903598149e-01\n1.09139849381250958e-01\n1.06200358390817429e-01\n9.68872072930769684e-02\n8.04614819603996501e-02\n5.67177231506392210e-02\n2.61917796894564521e-02\n-9.66528500201402699e-03\n-4.83931642463975437e-02\n-8.65585665362016698e-02\n-1.19966681305189962e-01\n-1.44073410400022889e-01\n-1.54588828143241319e-01\n-1.48213620299858712e-01\n-1.23395685618305495e-01\n-8.09475712128363833e-02\n-2.43453014142494539e-02\n4.04463977112632725e-02\n1.05697843182904525e-01\n1.63132770331592430e-01\n2.05433771908487772e-01\n2.27697176209376712e-01\n2.28448109159195806e-01\n2.09895700201121360e-01\n1.77303281133963903e-01\n1.37620309828422660e-01\n9.77755903920303759e-02\n6.31560096170106500e-02\n3.67221717662380917e-02\n1.89582449237789344e-02\n8.52670134627985486e-03\n3.25270529469141390e-03\n1.01153902838481305e-03\n2.40674310760003498e-04\n3.89810636792217382e-05\n3.22629346712844243e-06\n1.99250223212381859e-02\n3.45111510023285023e-02\n4.45359897326404394e-02\n5.26118527599775260e-02\n5.94186771554682802e-02\n6.51652935298305258e-02\n6.98471721709824356e-02\n7.33267280702670776e-02\n7.53683155855171538e-02\n7.56607060483166644e-02\n7.38388504512961369e-02\n6.95106464133763702e-02\n6.22920772534853867e-02\n5.18526564635138562e-02\n3.79716594491761525e-02\n2.06037712598846658e-02\n-4.96270546473612933e-05\n-2.34702435352187946e-02\n-4.87636747187574146e-02\n-7.46242268883110654e-02\n-9.93389290336598729e-02\n-1.20846194419694880e-01\n-1.36861901895819454e-01\n-1.45079018258784748e-01\n-1.43435739413617397e-01\n-1.30431869100175707e-01\n-1.05455508126400629e-01\n-6.90654443028850124e-02\n-2.31637627134879953e-02\n2.90062510496353829e-02\n8.30849605373809447e-02\n1.34056695155215677e-01\n1.76907327934779479e-01\n2.07383695593816753e-01\n2.22711278082302760e-01\n2.22105707699511074e-01\n2.06935421889254678e-01\n1.80461993219940442e-01\n1.47189857342630182e-01\n1.11969501305873589e-01\n7.90785224411979515e-02\n5.15183815971495263e-02\n3.06976323834784494e-02\n1.65440481681020692e-02\n7.94703261003972851e-03\n3.33620867571304000e-03\n1.19102937700871539e-03\n3.47394128809614777e-04\n7.76674678216920299e-05\n1.18390599804769447e-05\n9.23427586247357585e-07\n0.0\n3.77333018679430060e-04\n1.46140449731960468e-03\n3.45742939471386113e-03\n6.52857635069686512e-03\n1.08070155114940499e-02\n1.63939084546329897e-02\n2.33533644352587437e-02\n3.17020129013387691e-02\n4.13950758264149052e-02\n5.23098041834969621e-02\n6.42274469436146522e-02\n7.68154197392412613e-02\n8.96119651946191836e-02\n1.02016273717918091e-01\n1.13287656405097581e-01\n1.22557781020834200e-01\n1.28860003157670516e-01\n1.31179220225277809e-01\n1.28524216203255576e-01\n1.20021970695052105e-01\n1.05029822528412045e-01\n8.32568675949969111e-02\n5.48809998666225582e-02\n2.06434053585246580e-02\n-1.81007234194422890e-02\n-5.93965573682472964e-02\n-1.00786126751518254e-01\n-1.39494492861210073e-01\n-1.72698522969246149e-01\n-1.97853017386039332e-01\n-2.13030490233610148e-01\n-2.17216952877188313e-01\n-2.10501925743601936e-01\n-1.94110947833011804e-01\n-1.70254463652481480e-01\n-1.41804937501299660e-01\n-1.11856030243010468e-01\n-8.32515777722627193e-02\n-5.81856022120485900e-02\n-3.79599659702619385e-02\n-2.29448386464753268e-02\n-1.27306642663692193e-02\n-6.40795489466908924e-03\n-2.88215288002499148e-03\n-1.13536932120055336e-03\n-3.81048604576065847e-04\n-1.04651006536568688e-04\n-2.20605666353112045e-05\n-3.17440933935934880e-06\n-2.33968359248931601e-07\n2.31845271871000333e-02\n4.01567790375192066e-02\n5.18306402909287298e-02\n6.12722303635416313e-02\n6.93214146527890013e-02\n7.62957859733689042e-02\n8.22928703708672576e-02\n8.72839589619436029e-02\n9.11524390146596780e-02\n9.37136394407190876e-02\n9.47286008336568897e-02\n9.39170741122139635e-02\n9.09725269092067773e-02\n8.55808218496216244e-02\n7.74435448109682539e-02\n6.63063375052642401e-02\n5.19918696052004276e-02\n3.44362068146834080e-02\n1.37262916818724143e-02\n-9.86488588468318987e-03\n-3.58499630101737285e-02\n-6.35111411336692355e-02\n-9.19021958828099839e-02\n-1.19873969788319698e-01\n-1.46127284342564390e-01\n-1.69294472590691608e-01\n-1.88046744139613142e-01\n-2.01219654071799647e-01\n-2.07943724250614248e-01\n-2.07762792736899099e-01\n-2.00720227012519986e-01\n-1.87394008103759363e-01\n-1.68866770771169378e-01\n-1.46626246415340722e-01\n-1.22404102140779486e-01\n-9.79745279585915174e-02\n-7.49447634068196450e-02\n-5.45745865952256826e-02\n-3.76581261611740811e-02\n-2.44888846859865443e-02\n-1.49101086423381012e-02\n-8.43266931977968391e-03\n-4.38757107581401289e-03\n-2.07503156079796077e-03\n-8.78385894848288432e-04\n-3.26142530790916776e-04\n-1.03302823141016470e-04\n-2.68057086430700039e-05\n-5.34419540889743212e-06\n-7.27923859195973135e-07\n-5.08234805296412965e-08\n0.0\n3.11980246145742790e-04\n1.20829429766815266e-03\n2.85903719501806163e-03\n5.40120382827173010e-03\n8.95010645023401781e-03\n1.36028609346136812e-02\n1.94381949504985226e-02\n2.65139416178595093e-02\n3.48628016716609479e-02\n4.44867339454935937e-02\n5.53503101077528134e-02\n6.73734410837113634e-02\n8.04240104761200086e-02\n9.43111125731139061e-02\n1.08779768530876064e-01\n1.23508158241908972e-01\n1.38108523573675812e-01\n1.52132929274819778e-01\n1.65084963340391772e-01\n1.76438171300002056e-01\n1.85661510134064317e-01\n1.92251360581770447e-01\n1.95768671733514671e-01\n1.95878701208447831e-01\n1.92389692587620509e-01\n1.85285896698728803e-01\n1.74749839555318032e-01\n1.61168922317551200e-01\n1.45122514409282338e-01\n1.27347754269789309e-01\n1.08685190394985851e-01\n9.00088176915642413e-02\n7.21483844286801013e-02\n5.58142916097721098e-02\n4.15362090092499248e-02\n2.96251519818098684e-02\n2.01651300537999748e-02\n1.30351430635204726e-02\n7.95641407851540444e-03\n4.55481329543833743e-03\n2.42585315907474898e-03\n1.19022767130132299e-03\n5.31460250461113963e-04\n2.12642165441290877e-04\n7.46993725471371123e-05\n2.24052265081122101e-05\n5.50976246528372201e-06\n1.04173965130418548e-06\n1.34648597766916307e-07\n8.92594696338758614e-09\n3.30343192318552775e-02\n5.72171193030230271e-02\n7.38637346360556668e-02\n8.73813735133744940e-02\n9.90375840805138574e-02\n1.09393851345441662e-01\n1.18740583051649903e-01\n1.27233717626648646e-01\n1.34950318826559085e-01\n1.41915226659312721e-01\n1.48115606619707157e-01\n1.53510006214945732e-01\n1.58034914560508555e-01\n1.61610351148418041e-01\n1.64145334403472565e-01\n1.65543724503981554e-01\n1.65710709471284107e-01\n1.64560026390218328e-01\n1.62021843334838322e-01\n1.58051056995404837e-01\n1.52635584907516719e-01\n1.45804059162047944e-01\n1.37632179510636443e-01\n1.28246884681528145e-01\n1.17827483254273849e-01\n1.06602981507273376e-01\n9.48450802462074555e-02\n8.28566950747986475e-02\n7.09563693860687933e-02\n5.94595489433041996e-02\n4.86582892705153744e-02\n3.88014615100210278e-02\n3.00777856968488036e-02\n2.26039430865289659e-02\n1.64195384458688670e-02\n1.14898144867715910e-02\n7.71587669777911919e-03\n4.95097324674442611e-03\n3.02035399136576285e-03\n1.74166010071316211e-03\n9.42840461814304265e-04\n4.75269054525761408e-04\n2.20886021042071811e-04\n9.34973894445840467e-05\n3.54869728866104238e-05\n1.18331955547527991e-05\n3.37093206261586181e-06\n7.87726678997519249e-07\n1.41594890872007995e-07\n1.74067468790892136e-08\n1.09788732232211981e-09\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n0.0\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n0.0\n0.0\n-1.08472742381388542e-03\n-4.20113124760565244e-03\n-9.90251969648426981e-03\n-1.84771170763622303e-02\n-2.97864244518314635e-02\n-4.29935124003884145e-02\n-5.62502048776087268e-02\n-6.64805016337743915e-02\n-6.94951639769335328e-02\n-6.07489836031443048e-02\n-3.70087187849701890e-02\n1.10930973807619473e-03\n4.64683006843350233e-02\n8.43432667407494757e-02\n9.54507151085634137e-02\n6.49196479072799287e-02\n-4.37546628453371750e-03\n-8.19387104591041138e-02\n-1.16402125826386982e-01\n-6.80514713575707669e-02\n4.51112437681951625e-02\n1.31643108854483243e-01\n9.06119505406491887e-02\n-6.35740425963955968e-02\n-1.55664101856450132e-01\n-3.25463011982652650e-02\n1.61062963962556399e-01\n9.14113873640488572e-02\n-1.71651781820813254e-01\n-9.17992460712520608e-02\n2.26861122079491717e-01\n-2.74638834186305171e-02\n-2.38715686972268110e-01\n3.27133758028667565e-01\n-2.52461693632194173e-01\n1.37970366908697711e-01\n-5.77226737959510572e-02\n1.91900278708997951e-02\n-5.17285234812659821e-03\n1.14295039404465238e-03\n-2.07983783328855249e-04\n3.11689067087047306e-05\n-3.82973710685585953e-06\n3.82261697502359940e-07\n-3.05284349905734929e-08\n1.90534375715001719e-09\n-8.95713424979161803e-11\n2.98382267775662062e-12\n-6.28005580839250896e-14\n6.28036983473509968e-16\n0.0\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n-3.20283468138268617e-14\n0.0\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n8.08445165689827342e-13\n-1.63282067007192764e-14\n1.49153584618682711e-02\n2.58341586690582249e-02\n3.32116220033397275e-02\n3.86332886759592903e-02\n4.19352060972968538e-02\n4.22859974032437497e-02\n3.84603343591977051e-02\n2.91354456526192324e-02\n1.33735769422542814e-02\n-8.66375493142438995e-03\n-3.48542512856124601e-02\n-6.03977488262971221e-02\n-7.77935527381269643e-02\n-7.82387419341021156e-02\n-5.50015082023348201e-02\n-8.46471169411793130e-03\n4.91546484099385228e-02\n9.33789301143736900e-02\n9.58451624442848149e-02\n4.24753634491714521e-02\n-4.65584996049520222e-02\n-1.13675365442407250e-01\n-9.62111172949670912e-02\n1.20719355238242849e-02\n1.22543885941844538e-01\n1.08867617260667501e-01\n-4.32122795008925698e-02\n-1.55525846583246002e-01\n-4.44856381102336565e-02\n1.56679204868117705e-01\n9.27910168036672200e-02\n-1.70832186850680245e-01\n-8.35132884230644357e-02\n2.25539034459328630e-01\n-4.43192212140970654e-02\n-2.19269242183260410e-01\n3.21854692028745448e-01\n-2.60382927692662802e-01\n1.49103608459652814e-01\n-6.56033227650731493e-02\n2.30603343843918986e-02\n-6.61577618876218760e-03\n1.56781788023062688e-03\n-3.08791591122133168e-04\n5.06329993144556269e-05\n-6.89739006530945087e-06\n7.75957347905360304e-07\n-7.13509751266757394e-08\n5.27725011601396538e-09\n-3.06437392918077032e-10\n1.34576262686770477e-11\n-4.20315987260463183e-13\n0.0\n9.31231485683661287e-04\n3.60664403551681084e-03\n8.50602400394575263e-03\n1.59003845831766355e-02\n2.57379331178424903e-02\n3.74429022893153773e-02\n4.96727203528201863e-02\n6.01209842233804345e-02\n6.55188921569456323e-02\n6.20485584438564691e-02\n4.63832477729556533e-02\n1.74258908623226814e-02\n-2.15613643306100493e-02\n-6.13677159501424679e-02\n-8.73740714402345270e-02\n-8.39387467097887224e-02\n-4.30735753536244936e-02\n2.54205416613427181e-02\n8.96319597239925298e-02\n1.06347499921684005e-01\n5.01739831038397407e-02\n-5.32299261477481092e-02\n-1.23700123221912733e-01\n-8.28396897050736464e-02\n5.28775536891320924e-02\n1.43085570967639686e-01\n5.61977132639769339e-02\n-1.23816025006318567e-01\n-1.28765238917973951e-01\n9.31608526655434005e-02\n1.63492650510438126e-01\n-1.06861882743359851e-01\n-1.62491258203155242e-01\n1.96459220801137896e-01\n4.41807868984634908e-02\n-2.70804866571520197e-01\n3.14111437351427047e-01\n-2.26653503225050040e-01\n1.19973760107645350e-01\n-4.96384679318883706e-02\n1.65764998398732141e-02\n-4.54921289331997394e-03\n1.03647975975075567e-03\n-1.97023114024771396e-04\n3.12759943321989361e-05\n-4.13512897657961669e-06\n4.52475045531942631e-07\n-4.05416570728018729e-08\n2.92645637485853674e-09\n-1.66078551450348462e-10\n7.13697837991790340e-12\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367363e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n-1.61942344080973289e-09\n8.98653833493966699e-11\n0.0\n8.66426047764552840e-04\n3.35565365371242501e-03\n7.91595443084345055e-03\n1.48087344978570980e-02\n2.40121934498876630e-02\n3.50470844797404965e-02\n4.67621537451872737e-02\n5.71499205294295071e-02\n6.33170572602035214e-02\n6.17867458500721278e-02\n4.93218215401055385e-02\n2.43605773569870315e-02\n-1.11229334763186093e-02\n-5.00111894576891411e-02\n-7.99363085453404787e-02\n-8.61829356704887223e-02\n-5.84006514722374415e-02\n3.58940229482597776e-04\n6.73683490910389760e-02\n1.04547897847193039e-01\n7.88234561964185065e-02\n-7.40196344727397145e-03\n-9.89024440883244094e-02\n-1.13935536034448268e-01\n-1.85003343777213544e-02\n1.09092261688566117e-01\n1.21812489154462897e-01\n-2.46754972559791140e-02\n-1.53724638728994389e-01\n-5.40369786300429894e-02\n1.52844124485929489e-01\n9.28820650447558793e-02\n-1.70534777166068824e-01\n-7.46582530210938983e-02\n2.23693329402947061e-01\n-6.04428648778056812e-02\n-1.99685494680089226e-01\n3.15424575732289769e-01\n-2.67266406134374912e-01\n1.60001492639399556e-01\n-7.37993799662741007e-02\n2.73166714845997499e-02\n-8.29850452787542735e-03\n2.09615300256641487e-03\n-4.43432899576961322e-04\n7.88025564301311331e-05\n-1.17598018378678287e-05\n1.46840532288151399e-06\n-1.52341139845976699e-07\n1.29853215619237565e-08\n-8.94333513020322284e-10\n1.38775648385790068e-02\n2.40366473857502247e-02\n3.09183376927100149e-02\n3.60490110866714675e-02\n3.93682703078595542e-02\n4.02329121179938673e-02\n3.76476647717229468e-02\n3.04822304143377576e-02\n1.78148420603557490e-02\n-5.49493293180726840e-04\n-2.34201922161792198e-02\n-4.75864693423650661e-02\n-6.75475918537050551e-02\n-7.61070536214551313e-02\n-6.63258440415182837e-02\n-3.49512535853120088e-02\n1.34896496535019863e-02\n6.41090627526219453e-02\n9.38543479864410168e-02\n8.10994027665983136e-02\n2.12923912180138231e-02\n-5.98341884996863235e-02\n-1.10030524056330112e-01\n-8.17948212773452893e-02\n1.99064348515221000e-02\n1.15539923940347122e-01\n1.02747525542275245e-01\n-2.93739623914327161e-02\n-1.40726818170620382e-01\n-7.11091388755192705e-02\n1.14989793196826451e-01\n1.32918431505758633e-01\n-8.91485417183863205e-02\n-1.61387508239882377e-01\n1.10055601699256336e-01\n1.53322920048713257e-01\n-2.00539512712531814e-01\n-2.47180274398494312e-02\n2.54306170934596121e-01\n-3.12462048980527318e-01\n2.35681063631851012e-01\n-1.30404128946312675e-01\n5.65779096716435281e-02\n-1.99041935277143658e-02\n5.78688142169003685e-03\n-1.40596016281414383e-03\n2.87177007748138670e-04\n-4.94265797874700931e-05\n7.16154736544445315e-06\n-8.70066637554330904e-07\n8.79840153153714664e-08\n-7.32143270574096396e-09\n0.0\n8.08158692342989915e-04\n3.12998515653716350e-03\n7.38517565752149635e-03\n1.38253132320619240e-02\n2.24522063933630805e-02\n3.28663626386842059e-02\n4.40769909952560268e-02\n5.43310572757454632e-02\n6.10631553156686172e-02\n6.11141009965063056e-02\n5.13829153887050347e-02\n3.00123716033360022e-02\n-1.99912992041950373e-03\n-3.92489735811246479e-02\n-7.14187172436417106e-02\n-8.50885006306404817e-02\n-6.88163708641761074e-02\n-2.08639639467000648e-02\n4.38628639729669381e-02\n9.38928414426828950e-02\n9.42769126249746459e-02\n3.17951926165290777e-02\n-6.21820057924962824e-02\n-1.16966777517995002e-01\n-7.26997949296024348e-02\n4.94382434623633349e-02\n1.32194169547041912e-01\n6.57987478006277354e-02\n-9.54888521621763270e-02\n-1.38115365157589182e-01\n3.28530164553997445e-02\n1.67792257111886223e-01\n1.30048521049586953e-03\n-1.88742910765101940e-01\n2.51320701308221928e-02\n2.04395439674644047e-01\n-1.48084466485667726e-01\n-1.07469414757189574e-01\n2.90187851903803029e-01\n-2.97112519015750753e-01\n2.02734630968114227e-01\n-1.04415761976262733e-01\n4.27882747149507525e-02\n-1.43458775460581483e-02\n3.99957789848109143e-03\n-9.36072935864134701e-04\n1.84837054629292984e-04\n-3.08416262170301266e-05\n4.34251259324340908e-06\n-5.13695069484046143e-07\n5.06657853082752451e-08\n1.34110082885095256e-02\n2.32285477364258287e-02\n2.98860996054554837e-02\n3.48797786234479393e-02\n3.81892381223788435e-02\n3.92471829676003039e-02\n3.71538730469372289e-02\n3.08652396695146651e-02\n1.94853920076197666e-02\n2.71067763847296622e-03\n-1.85941472740467316e-02\n-4.18117164601599645e-02\n-6.22489781836327652e-02\n-7.34866556939572507e-02\n-6.88453932375441557e-02\n-4.41692459769204571e-02\n-1.44841254376531755e-03\n4.82920127164106830e-02\n8.54732402076974623e-02\n8.84366022246836081e-02\n4.60942565828407341e-02\n-2.84199156080339882e-02\n-9.42883172677430187e-02\n-1.01381495418001288e-01\n-2.96036179400583667e-02\n7.66130663395796774e-02\n1.22433390026081043e-01\n4.51895108600385564e-02\n-9.32860514910173744e-02\n-1.30432938458461128e-01\n8.20081992983318249e-03\n1.50931262325264270e-01\n6.15593609069965131e-02\n-1.49611746094280046e-01\n-9.18975496671960851e-02\n1.70628068541547440e-01\n6.53278764101584836e-02\n-2.21263159640423202e-01\n7.57862765817949868e-02\n1.80014718045661437e-01\n-3.07891757468297056e-01\n2.73094737405840282e-01\n-1.70599706566118781e-01\n8.22652000647926956e-02\n-3.19530648431656655e-02\n1.02346436590687196e-02\n-2.74111767195972045e-03\n6.18871018390316401e-04\n-1.18270476590770041e-04\n1.91502023000594638e-05\n-2.62231259216816422e-06\n3.02252308581942450e-07\n0.0\n7.55578460578815018e-04\n2.92634279457478809e-03\n6.90600799850620700e-03\n1.29363300983410950e-02\n2.10376911072682332e-02\n3.08768236489002160e-02\n4.15981791441306717e-02\n5.16661078142219843e-02\n5.88016778013934205e-02\n6.01379021790081070e-02\n5.27364107796447282e-02\n3.45666628780198701e-02\n5.89504265383257106e-03\n-2.92676595184101426e-02\n-6.24162650888495305e-02\n-8.15792684392669387e-02\n-7.50796499560395375e-02\n-3.79476882498129275e-02\n2.12328593136601497e-02\n7.78173930557275462e-02\n9.85941149302602265e-02\n6.11661686758699849e-02\n-2.27622777262849671e-02\n-9.97514513295744421e-02\n-1.02888651705519377e-01\n-1.20807025458817795e-02\n1.01582608746747724e-01\n1.16455312491856033e-01\n-7.60805901610516876e-03\n-1.36066500044883187e-01\n-8.31897955472505057e-02\n1.06895593877293915e-01\n1.35737034603818418e-01\n-8.63403631011060574e-02\n-1.58775957631717840e-01\n1.13751534782351546e-01\n1.43731724342605893e-01\n-2.03878872101702857e-01\n-5.87789538391400752e-03\n2.37332242904571722e-01\n-3.09605301178803138e-01\n2.43864153707228748e-01\n-1.40753685790856009e-01\n6.38573485402253449e-02\n-2.35822617857211064e-02\n7.23183717829236662e-03\n-1.86373745437307093e-03\n4.06441527723922240e-04\n-7.52544596961866017e-05\n1.18349014785161425e-05\n-1.57729685808423272e-06\n1.29748046590401657e-02\n2.24730208877389481e-02\n2.89203443271859074e-02\n3.37826386444943227e-02\n3.70735103747733413e-02\n3.82919017737830408e-02\n3.66228434594047872e-02\n3.11018414527362702e-02\n2.08653274069345238e-02\n5.53264354675155230e-03\n-1.42895572599935159e-02\n-3.64739483838997167e-02\n-5.70233893226520863e-02\n-7.02447626056554864e-02\n-6.98370152505320141e-02\n-5.11337948913584278e-02\n-1.42477980967801177e-02\n3.30013877475845083e-02\n7.44602271615987799e-02\n8.97290742140773590e-02\n6.39803154654981776e-02\n6.62474528347350490e-04\n-7.10490007402542617e-02\n-1.04847531797824023e-01\n-6.65156353080531282e-02\n2.96532510682908299e-02\n1.11007035041400526e-01\n9.45749565927749003e-02\n-2.38279871472623118e-02\n-1.28234830255663956e-01\n-8.24577580450764763e-02\n8.23317203058094443e-02\n1.42175983326379901e-01\n-2.41581776181594050e-02\n-1.66715279399203581e-01\n-1.84856863589382379e-03\n1.86598622873330150e-01\n-3.24707272926167134e-02\n-1.97016239993273501e-01\n1.57410206751875531e-01\n8.71802057909252526e-02\n-2.77107436043090016e-01\n2.98443719543876940e-01\n-2.12349552082879034e-01\n1.14072588013475584e-01\n-4.88923977799492135e-02\n1.72137949931004432e-02\n-5.06402983072978818e-03\n1.25767317036342427e-03\n-2.65243772937888899e-04\n4.76286954356978440e-05\n-7.28115775408077022e-06\n0.0\n7.07968488728620625e-04\n2.74195016648558091e-03\n6.47197520853490683e-03\n1.21301141151330723e-02\n1.97513298534506207e-02\n2.90575945798961753e-02\n3.93078708337772365e-02\n4.91529012671555465e-02\n5.65642447027946069e-02\n5.89415058829385885e-02\n5.35217425922006121e-02\n3.81887577769190259e-02\n1.26659863804674533e-02\n-2.01568873685844460e-02\n-5.33481352323622038e-02\n-7.64032813123769333e-02\n-7.79635215860799147e-02\n-5.10203875242593100e-02\n7.47645039655398013e-04\n5.90476666764685465e-02\n9.43974333221157258e-02\n8.01097842142962230e-02\n1.32861222980166331e-02\n-7.08424179129234222e-02\n-1.10292460233567535e-01\n-6.09612044262562575e-02\n5.06065625411684442e-02\n1.23451269693434465e-01\n6.74739501853123813e-02\n-7.65659296431933090e-02\n-1.35657470888603582e-01\n-6.18618647209830813e-03\n1.47624469666910951e-01\n6.73650512154319869e-02\n-1.46985778467947581e-01\n-9.00015595377291200e-02\n1.70992902688128001e-01\n5.56035135377841300e-02\n-2.18203911554005175e-01\n9.03043044081606044e-02\n1.60312300058321394e-01\n-2.99307131699852957e-01\n2.77854027728817843e-01\n-1.80836553485848400e-01\n9.09536070362925997e-02\n-3.69603142732441228e-02\n1.24360806241443946e-02\n-3.51588474119174984e-03\n8.42644247006774983e-04\n-1.72057073019054571e-04\n2.99909204763313792e-05\n1.25660850276036358e-02\n2.17650977200400560e-02\n2.80148688563625625e-02\n3.27512555203878508e-02\n3.60167101236743420e-02\n3.73681794791704130e-02\n3.60660923505940548e-02\n3.12191448791679718e-02\n2.19999105870692900e-02\n7.97469113181242459e-03\n-1.04542879764508417e-02\n-3.15646184578174047e-02\n-5.19566636173244278e-02\n-6.66026031250340073e-02\n-6.96421173629026835e-02\n-5.61774686973404228e-02\n-2.49650224918783435e-02\n1.87765639293043657e-02\n6.20631631086722146e-02\n8.64628817145548512e-02\n7.54416466490482190e-02\n2.54616812695829392e-02\n-4.47956587380695104e-02\n-9.61972512401745167e-02\n-8.88446586945319250e-02\n-1.47232458289388007e-02\n7.98957332254277980e-02\n1.13931357734726180e-01\n4.05719226589759813e-02\n-8.42089263847133618e-02\n-1.24926536524644749e-01\n-1.19412808325705510e-02\n1.30006633862137178e-01\n9.28698614681067597e-02\n-9.96723384238690224e-02\n-1.37510918657822501e-01\n8.45961869174197550e-02\n1.55716940612621396e-01\n-1.17808353109691524e-01\n-1.33744095561647541e-01\n2.06429212966474235e-01\n-1.22950986563607687e-02\n-2.19945017099648643e-01\n3.05575745245069363e-01\n-2.51167940964634684e-01\n1.50959972327681657e-01\n-7.14415918628015650e-02\n2.76102572301320029e-02\n-8.89761218900374067e-03\n2.42138232378179231e-03\n-5.60748539944495167e-04\n1.10968955882988877e-04\n0.0\n6.64721426559368835e-04\n2.57445501493167202e-03\n6.07758525362656499e-03\n1.13967363808922095e-02\n1.85782723122205305e-02\n2.73904323240511463e-02\n3.71895575158224731e-02\n4.67867737607369633e-02\n5.43729556687635313e-02\n5.75895934798932377e-02\n5.38529392953083844e-02\n4.10233852889238595e-02\n1.84275709714433605e-02\n-1.19419526475706330e-02\n-4.45000194100727622e-02\n-7.01486389668069393e-02\n-7.81845084800797119e-02\n-6.04449890519016195e-02\n-1.69397474700632260e-02\n3.95860795188779993e-02\n8.42640574238608664e-02\n8.95293688453114717e-02\n4.26473941532613532e-02\n-3.74710097948990906e-02\n-1.00045596300478740e-01\n-9.12436088044318722e-02\n-3.07919274858467831e-03\n9.77442934807487007e-02\n1.09498692057392447e-01\n2.76457541271021737e-04\n-1.21176906282615071e-01\n-9.57212020609934794e-02\n6.99263445569908854e-02\n1.44712571904723752e-01\n-1.70180514655522419e-02\n-1.65492042687008872e-01\n-1.32593213525709973e-03\n1.84395658044374133e-01\n-4.01518101821260881e-02\n-1.89141572195603930e-01\n1.65849367266460573e-01\n6.72766235013938785e-02\n-2.63276956387414884e-01\n2.98598964841306491e-01\n-2.21311377132441062e-01\n1.23766692191409691e-01\n-5.53439610571017232e-02\n2.03976261477462860e-02\n-6.30794507046715178e-03\n1.65487439650634140e-03\n-3.70750380986621414e-04\n1.21823316312589074e-02\n2.11004173399938662e-02\n2.71642176697650638e-02\n3.17799994389069140e-02\n3.50147633504306749e-02\n3.64764212723100653e-02\n3.54926213249318195e-02\n3.12392339431787416e-02\n2.29269455453508936e-02\n1.00871628323197099e-02\n-7.03965983058811584e-03\n-2.70659538286358824e-02\n-4.71039545443386887e-02\n-6.27273050110060265e-02\n-6.85414571651942056e-02\n-5.96116875049397185e-02\n-3.37433712313978257e-02\n5.91611478161503581e-03\n4.91987679277124598e-02\n7.99571482798436678e-02\n8.13561715824278470e-02\n4.51502798832862165e-02\n-1.87387551315916639e-02\n-7.95861360427084913e-02\n-9.76110174522756696e-02\n-5.03983072592959491e-02\n4.02252854676919055e-02\n1.07602152374102727e-01\n8.50972977264424502e-02\n-2.37297635142194110e-02\n-1.18810998618276084e-01\n-8.53878322361476400e-02\n5.99162939169378544e-02\n1.38296940334190849e-01\n1.85795839514876250e-02\n-1.44138576714769401e-01\n-7.17182832786061875e-02\n1.44939246553454387e-01\n8.73217100081442460e-02\n-1.71522153505948266e-01\n-4.55580916151959239e-02\n2.14484683101123869e-01\n-1.03955217441575737e-01\n-1.40637442411962910e-01\n2.89724301846809140e-01\n-2.81534185691275696e-01\n1.90653062650891048e-01\n-9.98161282491506763e-02\n4.23261112221879621e-02\n-1.49128711237774079e-02\n4.43349216615945840e-03\n-1.12281242011363198e-03\n0.0\n6.25320245679656370e-04\n2.42185489756363993e-03\n5.71815890322652579e-03\n1.07277132766659625e-02\n1.75057400870414319e-02\n2.58593774426683770e-02\n3.52281140972222351e-02\n4.45615518786340731e-02\n5.22428941965288121e-02\n5.61322925342169349e-02\n5.38230481237844810e-02\n4.31957193839890216e-02\n2.32927418303528581e-02\n-4.60680884936265269e-03\n-3.60583445097242758e-02\n-6.32666286506921166e-02\n-7.63708899793824336e-02\n-6.66920408222497485e-02\n-3.15977965323536794e-02\n2.08031062340375793e-02\n7.04321057110735838e-02\n9.10467030257782473e-02\n6.40452905572195530e-02\n-4.86686354094290150e-03\n-7.83469479523405954e-02\n-1.02862203785995920e-01\n-4.80085575734704104e-02\n5.45913562367411342e-02\n1.16369635751756059e-01\n6.45196470722063931e-02\n-6.52422394655417237e-02\n-1.29179406000743985e-01\n-2.91153275563963594e-02\n1.23213098086882217e-01\n1.00545330731510771e-01\n-9.33760178248106421e-02\n-1.38459100487352410e-01\n8.37848074815864818e-02\n1.52248488330650522e-01\n-1.22103090364293537e-01\n-1.23388974399589527e-01\n2.08154433655297455e-01\n-2.97560721967300296e-02\n-2.02209866154691414e-01\n3.00411067879044258e-01\n-2.57561758881284630e-01\n1.60962129381521268e-01\n-7.92932454003734688e-02\n3.19848534169284784e-02\n-1.07965064546185069e-02\n3.09063320954705003e-03\n1.18213676842190002e-02\n2.04752094440201482e-02\n2.63636673197006136e-02\n3.08639630420488136e-02\n3.40640144106890974e-02\n3.56166529470028914e-02\n3.49095919884373981e-02\n3.11802735735744324e-02\n2.36781736136151173e-02\n1.19135260989543818e-02\n-4.00100015882220300e-03\n-2.29549453676811746e-02\n-4.24984715564109827e-02\n-5.87439246397050974e-02\n-6.67632337648457613e-02\n-6.17168013691369033e-02\n-4.07700363432377533e-02\n-5.44858153082634737e-03\n3.65118111213667829e-02\n7.13126932258641849e-02\n8.27374204110623013e-02\n5.96426369292809358e-02\n5.05193393770223941e-03\n-5.86418599346745784e-02\n-9.53266724729245896e-02\n-7.48703780211222442e-02\n5.53318864213260975e-04\n8.37345475912279202e-02\n1.05503205707438305e-01\n3.30743817195387688e-02\n-7.98603575264302534e-02\n-1.18296122844103235e-01\n-2.20764632907389721e-02\n1.12166776583637370e-01\n1.06072147248728557e-01\n-5.85162576438685231e-02\n-1.46134522065355377e-01\n1.12802130223340832e-02\n1.64210153681768667e-01\n-1.18036805125352177e-04\n-1.82089292406530517e-01\n4.80721268424218126e-02\n1.80769919180526928e-01\n-1.73366196194382066e-01\n-4.78120520620846923e-02\n2.48762712614627179e-01\n-2.97596308734474013e-01\n2.29574701406830284e-01\n-1.33441478503762506e-01\n6.21173044904864552e-02\n-2.39009420194487565e-02\n7.74441722444108634e-03\n0.0\n5.89335396716420207e-04\n2.28248617681323660e-03\n5.38980679355948854e-03\n1.01159819773633565e-02\n1.65230532989366317e-02\n2.44509724718684832e-02\n3.34104875366959334e-02\n4.24711371896151837e-02\n5.01850593934288075e-02\n5.46095622332109371e-02\n5.35090564657857287e-02\n4.48141066731188170e-02\n2.73693528785047754e-02\n1.89004550996732306e-03\n-2.81375893034677277e-02\n-5.60971082873164065e-02\n-7.30550929937928417e-02\n-7.02621571501265835e-02\n-4.32674125619221181e-02\n3.56345639113560828e-03\n5.46982668011067596e-02\n8.64981924798478713e-02\n7.75416376564455750e-02\n2.36897413550636003e-02\n-5.08746551501070565e-02\n-9.89857381597789576e-02\n-7.87076071602273580e-02\n7.50306545583149468e-03\n9.61218531124638093e-02\n1.01765379545690940e-01\n2.07736832579721300e-03\n-1.10171602338048236e-01\n-9.92805875993297143e-02\n4.39722897957090519e-02\n1.39031315139149819e-01\n2.91359585950359615e-02\n-1.40704531227382162e-01\n-7.48418308108656227e-02\n1.43430406092988627e-01\n8.39621648632266904e-02\n-1.72124318110863678e-01\n-3.52616589364320512e-02\n2.10093124784938412e-01\n-1.16702561927201243e-01\n-1.21058806786548984e-01\n2.79210999817276706e-01\n-2.84139778718701164e-01\n2.00000290214918386e-01\n-1.08807031212800664e-01\n4.80368070973654013e-02\n-1.76737396515202067e-02\n1.14825762845772207e-02\n1.98884055266732133e-02\n2.56119511124228566e-02\n3.00021811446631419e-02\n3.31648636678572306e-02\n3.47925041553227496e-02\n3.43265475427142683e-02\n3.10607541153452953e-02\n2.42830906790324520e-02\n1.34929091896407328e-02\n-1.29777014884518440e-03\n-1.92078985716281278e-02\n-3.81618180984899455e-02\n-5.47508145165381543e-02\n-6.44981940434664336e-02\n-6.27456637345384788e-02\n-4.62540010681203734e-02\n-1.53002783259314646e-02\n2.44356244936465225e-02\n6.14140724419847822e-02\n8.05947203402108125e-02\n6.93072142063870938e-02\n2.54171591301785502e-02\n-3.62116183147707174e-02\n-8.49845850078168319e-02\n-8.81014594481867169e-02\n-3.36340823309013714e-02\n5.07826756225155662e-02\n1.04311579167397098e-01\n7.45638476642770942e-02\n-2.72049340803413725e-02\n-1.12029845718262966e-01\n-8.36514890897664953e-02\n4.59957596518421677e-02\n1.30183965950574548e-01\n4.39627582854557886e-02\n-1.16177178851579826e-01\n-1.06582948921793430e-01\n8.80170480531540372e-02\n1.38769588183808801e-01\n-8.37904390344835492e-02\n-1.48423030947211598e-01\n1.26539512457348791e-01\n1.12727697129867271e-01\n-2.09061711481036583e-01\n4.64524369245593940e-02\n1.84246972291213396e-01\n-2.94219603184486866e-01\n2.63074938406353931e-01\n-1.70735694134456634e-01\n8.73901889264822040e-02\n-3.67069946534861608e-02\n0.0\n5.56654085445644985e-04\n2.15591200252930344e-03\n5.09152905154631238e-03\n9.55985792691170684e-03\n1.56281548372240453e-02\n2.31640798649783465e-02\n3.17394749239688356e-02\n4.05277033030300646e-02\n4.82289627325019760e-02\n5.30772397658706152e-02\n5.29988724299902125e-02\n4.59932800881095866e-02\n3.07727015162239520e-02\n7.60992254982122487e-03\n-2.08077900802442900e-02\n-4.89106662807955311e-02\n-6.87064231179638496e-02\n-7.16726319091498254e-02\n-5.21791184226099505e-02\n-1.16593727562575734e-02\n3.84308509829608333e-02\n7.76750411541754782e-02\n8.40101359744512138e-02\n4.65332405809950264e-02\n-2.21028862366878069e-02\n-8.40592028027914856e-02\n-9.41996078689332633e-02\n-3.41492810296613464e-02\n6.01460196835804026e-02\n1.10296808391185219e-01\n5.87110032228186640e-02\n-5.95682502884853290e-02\n-1.22077741455819927e-01\n-4.12602786144614167e-02\n1.02125110512033143e-01\n1.14073078507817102e-01\n-4.82193144703011792e-02\n-1.46854108589491966e-01\n6.76292559550102906e-03\n1.63025563999734113e-01\n-2.30817276092240781e-03\n-1.79767094093219781e-01\n5.61177782046675261e-02\n1.72081808561414612e-01\n-1.80030033446409138e-01\n-2.89694890667499573e-02\n2.33932401334451034e-01\n-2.95777388742578584e-01\n2.37336243588829932e-01\n-1.43178391323782322e-01\n6.92488403772155980e-02\n1.11826271062078000e-02\n1.93688783100488399e-02\n2.49463519057731842e-02\n2.92388068622504368e-02\n3.23674768389830975e-02\n3.40595849341683160e-02\n3.38039392099571817e-02\n3.09447534627842781e-02\n2.48064937394970875e-02\n1.48844895731905531e-02\n1.11161385410251333e-03\n-1.58201777634409887e-02\n-3.41522561648560374e-02\n-5.08951582004385714e-02\n-6.19930773080901582e-02\n-6.30153049458972991e-02\n-5.04879574563042305e-02\n-2.37419210516012710e-02\n1.32465884841354749e-02\n5.10072806650700705e-02\n7.59562278010626341e-02\n7.48702812042880000e-02\n4.19484985235389699e-02\n-1.43337347773499369e-02\n-6.95367514867951397e-02\n-9.16179528441786462e-02\n-5.96640155910411266e-02\n1.57054947911808435e-02\n8.73508312523825214e-02\n9.68329623531926642e-02\n2.37335880960141028e-02\n-7.88189159413583001e-02\n-1.11768038857067709e-01\n-2.57572584643700545e-02\n9.90750917403686593e-02\n1.09933935933560878e-01\n-2.90623909135176335e-02\n-1.38702460254781973e-01\n-3.82600610767846877e-02\n1.37717504321621415e-01\n7.72582847596453015e-02\n-1.42640798917269468e-01\n-8.04176629364997259e-02\n1.73073944662308049e-01\n2.51627903640801835e-02\n-2.05702668533036259e-01\n1.28573660404469686e-01\n1.02493730270897351e-01\n-2.69158901120321759e-01\n2.86899956971431003e-01\n-2.09662034952780879e-01\n1.18327681182015518e-01\n0.0\n5.29171783736723787e-04\n2.04947350569520403e-03\n4.84069326801444058e-03\n9.09213438928884593e-03\n1.48753193309434598e-02\n2.20809767681129608e-02\n3.03320141478436341e-02\n3.88889675652410866e-02\n4.65772773716096322e-02\n5.17825076880219018e-02\n5.25746071811650784e-02\n4.70251825422115799e-02\n3.37571601061573412e-02\n1.26969731007281119e-02\n-1.41242172910940548e-02\n-4.20376814088434803e-02\n-6.39359559084840129e-02\n-7.16795004119496343e-02\n-5.89140479268089601e-02\n-2.48285475713802273e-02\n2.26152408493383271e-02\n6.63425534435992809e-02\n8.50212515726532503e-02\n6.34776596415028010e-02\n4.99713744410853599e-03\n-6.26534074765714710e-02\n-9.66025070141250802e-02\n-6.56654907976778335e-02\n1.88662716646400760e-02\n9.60716039068416627e-02\n9.41193577743041354e-02\n5.26466770961998449e-05\n-1.03198173914867852e-01\n-9.89381614941589882e-02\n2.71699170524690760e-02\n1.29515847689112673e-01\n5.73994979071862851e-02\n-1.09616652193159636e-01\n-1.12379338182692690e-01\n8.35931370847942529e-02\n1.39894063775311994e-01\n-8.43986137362444794e-02\n-1.45905811141246594e-01\n1.31295583227321572e-01\n1.03789632980685192e-01\n-2.10849155095203938e-01\n6.12435211326758239e-02\n1.69956138869372386e-01\n-2.91719193388042253e-01\n2.71509761183043485e-01\n-1.82619015376261656e-01\n1.10163681838837593e-02\n1.90809094093719531e-02\n2.45786074674965473e-02\n2.88227204724747846e-02\n3.19493790466181884e-02\n3.37143807284306096e-02\n3.36444879760798218e-02\n3.11239680045273456e-02\n2.55060197971637079e-02\n1.62822485130627304e-02\n3.32152764233701074e-03\n-1.28370570293465519e-02\n-3.06928495679626087e-02\n-4.76022006501759104e-02\n-5.98667988022567599e-02\n-6.32720111853659339e-02\n-5.41992043483345357e-02\n-3.12542585650145560e-02\n2.97202165509979606e-03\n4.08046502099152150e-02\n7.01332458482486348e-02\n7.77391618391686107e-02\n5.52705970162293489e-02\n5.99868819659076912e-03\n-5.15973917118557404e-02\n-8.81339580663147992e-02\n-7.76417123541308790e-02\n-1.72049095150297732e-02\n6.11386504387541885e-02\n1.01840491833439614e-01\n6.44509790483166201e-02\n-3.28314198954088102e-02\n-1.08549135916196707e-01\n-8.09823417796415868e-02\n3.81756618248582161e-02\n1.23520646214829347e-01\n5.96265060163623031e-02\n-9.20960831024199705e-02\n-1.22641030440674162e-01\n3.80908783322117458e-02\n1.49629414015739148e-01\n-1.29464670932965598e-03\n-1.64668689498036980e-01\n2.49706935509638695e-03\n1.81182590529615467e-01\n-6.20268022236754868e-02\n-1.69317216646090535e-01\n1.87723838627736894e-01\n1.77171147111386124e-02\n-2.31753809631396468e-01\n3.06334747628457638e-01\n-2.54270222322857564e-01\n0.0\n5.12673905587070992e-04\n1.98557749837383968e-03\n4.69026564084200001e-03\n8.81255733536631496e-03\n1.44286837741525800e-02\n2.14479252854021425e-02\n2.95324494035908575e-02\n3.80087414887697803e-02\n4.57961350574415810e-02\n5.13928002870177869e-02\n5.29734488900954134e-02\n4.86574670737822748e-02\n3.69882980732723493e-02\n1.76096429391541832e-02\n-7.97868326757535107e-03\n-3.58448251051419614e-02\n-5.96278297097960069e-02\n-7.15642409059555618e-02\n-6.48062402490136580e-02\n-3.67852104525745946e-02\n7.46380632277183782e-03\n5.39776780526525085e-02\n8.27739592607152630e-02\n7.60561460063258754e-02\n2.97048925766322559e-02\n-3.80958567849208479e-02\n-8.96375223768074575e-02\n-8.69794602360106500e-02\n-2.15003720053867642e-02\n6.71436723153581577e-02\n1.07746661157348239e-01\n5.40743710892472584e-02\n-5.78777840465170001e-02\n-1.19112698713572149e-01\n-5.02157747827781872e-02\n8.68467942576513219e-02\n1.22261543395638383e-01\n-1.23342343218140246e-02\n-1.41020379840648719e-01\n-5.16045767173486519e-02\n1.37056781965170210e-01\n8.64194963420406442e-02\n-1.43843047972492949e-01\n-8.60880368677886670e-02\n1.78052073823576990e-01\n2.63042711312124443e-02\n-2.13585695781247975e-01\n1.34697940129757721e-01\n1.10159156852694701e-01\n-2.93804816540809144e-01\n3.20124124417374256e-01\n1.11198030239379152e-02\n1.92600638076185077e-02\n2.48124470869112920e-02\n2.91114828626499109e-02\n3.23108569664755860e-02\n3.41880390177182122e-02\n3.42952382530720620e-02\n3.20413815330804416e-02\n2.67939255923968535e-02\n1.80328802695767960e-02\n5.56932536542882519e-03\n-1.01823460933104393e-02\n-2.79241279269376204e-02\n-4.52782556197498104e-02\n-5.88153755870352984e-02\n-6.44726331867637725e-02\n-5.84920572277597070e-02\n-3.88700022006435095e-02\n-7.03953897672068840e-03\n3.08546303281817570e-02\n6.40412136638383173e-02\n7.95127449317001161e-02\n6.70179551441940358e-02\n2.55005258197017054e-02\n-3.20858952161555133e-02\n-7.99066057154475817e-02\n-8.94794568745316821e-02\n-4.72983957764746971e-02\n2.94071651822496727e-02\n9.32292908714303092e-02\n9.30567786915787315e-02\n1.70875823205574352e-02\n-8.11508880406057731e-02\n-1.11721583927071502e-01\n-3.10192968199995110e-02\n9.13807374908968406e-02\n1.17248804893250722e-01\n-3.37754842507750550e-03\n-1.30815324940899480e-01\n-7.89691545388367666e-02\n1.01819644700163872e-01\n1.28890303904473397e-01\n-7.38960906941867474e-02\n-1.54335824274891259e-01\n7.68381427141096168e-02\n1.62141074704648752e-01\n-1.29729767279397279e-01\n-1.24421605368477711e-01\n2.24720475734840663e-01\n-4.18352738485449210e-02\n-2.26535389008804988e-01\n3.66767133589693428e-01\n0.0\n5.08079010868798739e-04\n1.96778154765239440e-03\n4.64870912028346635e-03\n8.73738759455252971e-03\n1.43161767437746598e-02\n2.13100596446138060e-02\n2.94113588235770072e-02\n3.79951763689020394e-02\n4.60481094357014162e-02\n5.21461558990660851e-02\n5.45307817461603492e-02\n5.13377820730758355e-02\n4.10208670862175356e-02\n2.29675827168979094e-02\n-1.78095460826572139e-03\n-2.99197202036779152e-02\n-5.57242921307422451e-02\n-7.17642789799376735e-02\n-7.07958868251005874e-02\n-4.87571526793681986e-02\n-8.09246117179807448e-03\n4.01959296047701350e-02\n7.78525579271501650e-02\n8.55268461842350336e-02\n5.30476148470359690e-02\n-1.05292581837862879e-02\n-7.45561223406584067e-02\n-9.88218282457078295e-02\n-5.91392205963986520e-02\n2.73569368504411013e-02\n1.00638143729725404e-01\n9.55414029570205992e-02\n2.64531638105778557e-03\n-1.01567257918350140e-01\n-1.08044537522627063e-01\n7.73770930363034022e-03\n1.24949343901222781e-01\n8.95693842628317166e-02\n-7.49765195408083479e-02\n-1.42545096361005014e-01\n1.31013034738645621e-02\n1.61690379694204744e-01\n2.65404233924673959e-02\n-1.75513825452429412e-01\n-2.77141530390677925e-02\n2.00453825369706851e-01\n-3.10166164041503767e-02\n-2.14411568110720513e-01\n1.76992606478801467e-01\n1.14749007790759944e-01\n-3.86115222067257791e-01\n1.14277880560225906e-02\n1.97935095311599016e-02\n2.55028636159720622e-02\n2.99366349224389275e-02\n3.32696938003395198e-02\n3.52983375985694986e-02\n3.55937703837454142e-02\n3.35811365290308236e-02\n2.86337001516635374e-02\n2.02142577470913812e-02\n8.07697186631184220e-03\n-7.47731031937152752e-03\n-2.53295293017995159e-02\n-4.33332338738701070e-02\n-5.82909402515546932e-02\n-6.62681415641715871e-02\n-6.33785242748553385e-02\n-4.70690987803590311e-02\n-1.77149457887383378e-02\n1.99838082984846142e-02\n5.66242840319841068e-02\n7.96643610703805238e-02\n7.74524117980275872e-02\n4.51446854734508032e-02\n-9.74533824913965084e-03\n-6.59137543926001795e-02\n-9.45988833569023774e-02\n-7.42004697457833567e-02\n-7.49406081832467222e-03\n7.05672706435232916e-02\n1.06725404175580685e-01\n6.55798143886099222e-02\n-3.29739669737410812e-02\n-1.11774486511132795e-01\n-9.21784228891846386e-02\n2.29878962717045623e-02\n1.23805818078287277e-01\n8.90336847882867155e-02\n-6.08364064336763474e-02\n-1.43149877357429928e-01\n-2.72161888305456068e-02\n1.42096240406927310e-01\n9.41442015503361485e-02\n-1.24857327686139594e-01\n-1.32032872237768828e-01\n1.26332037223040150e-01\n1.43575384713773513e-01\n-1.68562234379984188e-01\n-1.11151566205916028e-01\n2.53406520366887489e-01\n-1.84401512678429649e-02\n-3.77625846304278034e-01\n0.0\n5.07279620140406277e-04\n1.96468552067421802e-03\n4.64188644366649722e-03\n8.72754100915318701e-03\n1.43108493747861523e-02\n2.13321701564006781e-02\n2.95121972874098672e-02\n3.82710704158311585e-02\n4.66572979491406414e-02\n5.33183509398137898e-02\n5.65569834264493879e-02\n5.45238874572329738e-02\n4.55889658211695581e-02\n2.88987228921762929e-02\n5.05611740753840553e-03\n-2.32484589368248014e-02\n-5.09492047109576518e-02\n-7.10374647565624323e-02\n-7.60469753541831578e-02\n-6.06481623450044680e-02\n-2.48489141692515569e-02\n2.34483319242785697e-02\n6.83813736173815578e-02\n9.02684826309933380e-02\n7.41961021613783411e-02\n2.03845297247478886e-02\n-4.96198710217684372e-02\n-9.80071476790350254e-02\n-9.00499804671340415e-02\n-2.06665997013392791e-02\n7.03232360105128240e-02\n1.14700627112882564e-01\n6.63544777569825828e-02\n-4.67483924099002732e-02\n-1.24764465197137409e-01\n-7.94657395745274747e-02\n5.92277325576982608e-02\n1.39833196067310150e-01\n4.82907532965466471e-02\n-1.18559561775708977e-01\n-1.27601300260596073e-01\n6.29066197024864687e-02\n1.67933135487720653e-01\n-1.63044638393491127e-02\n-1.90867871920025384e-01\n2.08655202629396720e-03\n2.17525561778613763e-01\n-3.80996338151647004e-02\n-2.51079479934804561e-01\n1.46703159709203945e-01\n3.46581314450871980e-01\n1.17923814321274755e-02\n2.04250037826766290e-02\n2.63198941053753646e-02\n3.09117588716339292e-02\n3.43990400510554989e-02\n3.65981728483246033e-02\n3.71003922782167511e-02\n3.53481539231538938e-02\n3.07219065044698134e-02\n2.26690299116022592e-02\n1.08888487236811771e-02\n-4.42980103835935186e-03\n-2.23479916216733770e-02\n-4.09587292978967205e-02\n-5.73180069873578946e-02\n-6.76620646228920652e-02\n-6.80429764675097443e-02\n-5.54403103249446957e-02\n-2.92344167853020413e-02\n7.34153744189562554e-03\n4.64526485378258386e-02\n7.64706858290793573e-02\n8.50033614946681393e-02\n6.40316417831443829e-02\n1.56681916377024479e-02\n-4.44727709419822440e-02\n-8.99365589232275220e-02\n-9.41611217426568115e-02\n-4.67785654523550989e-02\n3.31717225131043236e-02\n9.92814232595847362e-02\n1.02305596530130508e-01\n2.86428364325762574e-02\n-7.50548177907154751e-02\n-1.23069013928856691e-01\n-6.06211812772763370e-02\n6.83103269524607398e-02\n1.36046375175975370e-01\n5.40899343208092812e-02\n-1.02040721719621155e-01\n-1.39644716792240525e-01\n1.43533299421806648e-02\n1.62722379978880477e-01\n6.79873599630667624e-02\n-1.52609852613788788e-01\n-1.24000419123294958e-01\n1.46543386711120271e-01\n1.57049414095468048e-01\n-1.71555233352602560e-01\n-1.76120050223727065e-01\n2.48818517298722258e-01\n3.00859696324320025e-01\n0.0\n5.05458159501791628e-04\n1.95763103395509138e-03\n4.62572325823354912e-03\n8.70020529784473751e-03\n1.42771114989334452e-02\n2.13126994084749839e-02\n2.95574290741247893e-02\n3.84792562057856766e-02\n4.71935056964448707e-02\n5.44271611129903410e-02\n5.85566074880115583e-02\n5.77649582256112432e-02\n5.03604817144821873e-02\n3.52714470056120361e-02\n1.26756571722428674e-02\n-1.53675164910601781e-02\n-4.45250927063501195e-02\n-6.83712627622083680e-02\n-7.94737431650720250e-02\n-7.15392888178187775e-02\n-4.23484011204031327e-02\n3.42631424909099671e-03\n5.30545784861281081e-02\n8.79594202397877001e-02\n9.02206099116659443e-02\n5.21627595609954892e-02\n-1.51683260249670382e-02\n-8.10330601995678107e-02\n-1.06728628877369225e-01\n-6.86865307745930659e-02\n1.88607438736278256e-02\n1.00972208716948800e-01\n1.12489021120604049e-01\n3.15257142764937409e-02\n-8.50270769896929735e-02\n-1.31148215855555028e-01\n-4.75124341387000160e-02\n9.59145948111387869e-02\n1.41138192537216350e-01\n1.50732934672309603e-02\n-1.43593805921311463e-01\n-1.15713204299887851e-01\n8.91677194389925154e-02\n1.74764798381056574e-01\n-2.58450605046841933e-02\n-2.06619709416239333e-01\n-2.10814906907144384e-02\n2.39816930148527813e-01\n5.42845611759862900e-02\n-3.12820903033004583e-01\n-2.48365759146320753e-01\n1.21748073517810099e-02\n2.10873849056478040e-02\n2.71770396548975980e-02\n3.19354848151025481e-02\n3.55867175248829673e-02\n3.79696062294601414e-02\n3.86983238982677516e-02\n3.72362396221133304e-02\n3.29752146056084203e-02\n2.53517460335249967e-02\n1.40143495629238644e-02\n-9.58357162873756216e-04\n-1.88112816233559667e-02\n-3.78914696165676759e-02\n-5.55413765577741081e-02\n-6.82274156550075339e-02\n-7.20296809617937683e-02\n-6.35704900573609566e-02\n-4.13305147292674438e-02\n-7.08359359644071627e-03\n3.30875051165127332e-02\n6.89424647354767994e-02\n8.81169765941148542e-02\n8.02683092798908149e-02\n4.25258464043468259e-02\n-1.59395765548177824e-02\n-7.34491015261549973e-02\n-1.02269388915503592e-01\n-8.19853631669400507e-02\n-1.47404309715661354e-02\n6.75923681381353503e-02\n1.14406997011499839e-01\n8.68567288276140687e-02\n-7.43406613175545249e-03\n-1.04498594300409933e-01\n-1.21689808134227792e-01\n-2.98005732861106008e-02\n9.96070660335390268e-02\n1.37817101422422400e-01\n2.71397341778179743e-02\n-1.26345564260704923e-01\n-1.36697711920892723e-01\n3.41872308993251203e-02\n1.75224549470906404e-01\n6.94984651169040929e-02\n-1.59644799137349552e-01\n-1.52356973281537744e-01\n1.24622350307768082e-01\n2.22865163896924762e-01\n-8.04709922158527713e-02\n-3.36410372712933170e-01\n-1.95646969634635570e-01\n0.0\n5.02125846360549320e-04\n1.94472504065471181e-03\n4.59574188755927648e-03\n8.64693108689337971e-03\n1.42009976506246669e-02\n2.12305241408882010e-02\n2.95171237367617550e-02\n3.85794877667659589e-02\n4.76050631342224417e-02\n5.54092415973446717e-02\n6.04560243464438152e-02\n6.09814085121931290e-02\n5.52591378352581264e-02\n4.20297853883033340e-02\n2.10700651819363018e-02\n-6.19422959547917713e-03\n-3.62237601593463146e-02\n-6.33318559254995306e-02\n-8.03954880819417184e-02\n-8.05256789792878208e-02\n-5.96140205819582006e-02\n-1.91663212368999337e-02\n3.17589805981334863e-02\n7.70693893106383088e-02\n9.78908106267638717e-02\n8.04805562077380993e-02\n2.53445126611400624e-02\n-4.74124735528778166e-02\n-1.02235270769594586e-01\n-1.04356986931926465e-01\n-4.30635310662515550e-02\n5.21122478081469040e-02\n1.19346645028896289e-01\n1.02692907533764033e-01\n1.56842737623696569e-03\n-1.10224976485982520e-01\n-1.30789889998838421e-01\n-2.47304512920810994e-02\n1.17357774004458432e-01\n1.42697146149754150e-01\n1.87307739435583305e-03\n-1.56010604636430378e-01\n-1.24088482968083585e-01\n8.55598789940385934e-02\n1.95077872325188584e-01\n1.72013724369517208e-02\n-2.16644384447008842e-01\n-1.32310343017033899e-01\n1.97230986470372183e-01\n3.24975931523241390e-01\n1.47361497646080974e-01\n1.25842697711069026e-02\n2.17965946197103203e-02\n2.80948677853904843e-02\n3.30320863312190127e-02\n3.68600757563327108e-02\n3.94425041865180959e-02\n4.04193914000041260e-02\n3.92786608252836053e-02\n3.54280322934474243e-02\n2.82982623191042927e-02\n1.74923627031757963e-02\n2.98276883277404179e-03\n-1.46595635478590676e-02\n-3.40459188314321745e-02\n-5.28338180177176583e-02\n-6.77772799236040224e-02\n-7.50788569097728398e-02\n-7.11320136441746381e-02\n-5.36519158891910347e-02\n-2.30249939909775055e-02\n1.65203886098546117e-02\n5.65382028995327426e-02\n8.54741600703802507e-02\n9.17039383758557758e-02\n6.82390754674757766e-02\n1.77208807214446623e-02\n-4.48227849824407443e-02\n-9.43739048764846572e-02\n-1.05082479026351622e-01\n-6.43265571459612634e-02\n1.48872495035412018e-02\n9.27994512616892864e-02\n1.20051028565408224e-01\n6.95594350135122219e-02\n-3.53303823535621175e-02\n-1.22762821126982724e-01\n-1.17884985515260540e-01\n-9.81578652588547748e-03\n1.17512061555904324e-01\n1.41091835668411381e-01\n1.92345512890452208e-02\n-1.36274463277755886e-01\n-1.48165860681513190e-01\n2.21509282464319827e-02\n1.83588546851015028e-01\n1.14697914899618517e-01\n-1.27298060411696501e-01\n-2.20916886789919859e-01\n-1.44270345910573329e-03\n2.75740366826410066e-01\n2.88479082244939455e-01\n1.06242132401605044e-01\n0.0\n4.97397808240447234e-04\n1.92641342775532257e-03\n4.55299071244972490e-03\n8.56965862591889567e-03\n1.40855773847580659e-02\n2.10899100580269581e-02\n2.93964634855200524e-02\n3.85770184610571415e-02\n4.78956776087487018e-02\n5.62642986235399878e-02\n6.22479484605345523e-02\n6.41564580283901509e-02\n6.02588491311553259e-02\n4.91450805573814195e-02\n3.02270497586089523e-02\n4.31338037363513446e-03\n-2.58868032720079994e-02\n-5.55598026295294201e-02\n-7.81627744295206456e-02\n-8.66202467547418781e-02\n-7.53943201988425266e-02\n-4.31092750674549677e-02\n5.09372663030868266e-03\n5.67503084741352026e-02\n9.41683446339306313e-02\n1.00093943880485370e-01\n6.59773914127223110e-02\n-3.88639655110675807e-04\n-7.28285668649166912e-02\n-1.14776125255826450e-01\n-9.74693975412326552e-02\n-2.10323500591534304e-02\n7.56720689377734512e-02\n1.29937978248669705e-01\n9.51824798185935822e-02\n-1.61619767186161438e-02\n-1.24536933848393622e-01\n-1.34384949244850366e-01\n-2.07128004026803023e-02\n1.24427574081250242e-01\n1.55254769727003306e-01\n1.95919857592723630e-02\n-1.53656576413775503e-01\n-1.62450721497797351e-01\n3.13893518309646055e-02\n2.12264735094666757e-01\n1.41773759006366407e-01\n-1.30276050381282760e-01\n-3.09045628547764517e-01\n-2.38235348397810354e-01\n-7.33518993496766469e-02\n1.30326399316802437e-02\n2.25731945184211649e-02\n2.90999166784906491e-02\n3.42329320079988869e-02\n3.82545952331283245e-02\n4.10559104421197446e-02\n4.23057481326188992e-02\n4.15203578409701068e-02\n3.81280662460645875e-02\n3.15596998759244546e-02\n2.13793725741312120e-02\n7.45961529278036783e-03\n-9.80961686054586737e-03\n-2.93094289611867814e-02\n-4.90359083854132183e-02\n-6.60845356438521520e-02\n-7.68768533560339751e-02\n-7.77205538509406074e-02\n-6.57360228407697228e-02\n-4.00611572763025919e-02\n-3.06488742456354109e-03\n3.89024694863990064e-02\n7.58276153941817160e-02\n9.59571769842784278e-02\n8.94491352595913058e-02\n5.30730960309482927e-02\n-5.75200251771370262e-03\n-6.80789218941592333e-02\n-1.08009043639690411e-01\n-1.03162387696959387e-01\n-4.79550288271991462e-02\n3.72507220391959937e-02\n1.09439488496430176e-01\n1.22825920770660083e-01\n5.90452066839140741e-02\n-5.07240681576360264e-02\n-1.33753598520418460e-01\n-1.21380401605655622e-01\n-8.60782940127840894e-03\n1.22403923922340327e-01\n1.54327583676011543e-01\n4.07417964747202321e-02\n-1.26138575499037314e-01\n-1.77971442586641271e-01\n-3.95465381779700614e-02\n1.62035249493139910e-01\n2.03610982416215475e-01\n1.30054120656170839e-02\n-2.31147380078535664e-01\n-3.01712577965253026e-01\n-1.84362126327287656e-01\n-4.84986888989666076e-02\n0.0\n4.91198631229127543e-04\n1.90240411843028935e-03\n4.49677437686149886e-03\n8.46704856072050087e-03\n1.39285385789926549e-02\n2.08870890697737434e-02\n2.91894859304247627e-02\n3.84625772976271568e-02\n4.80511850703735921e-02\n5.69712562755288546e-02\n6.39022957628348626e-02\n6.72498302807759546e-02\n6.53109437340932131e-02\n5.65687260382756602e-02\n4.01189006343516952e-02\n1.61892041732136678e-02\n-1.33506906734088618e-02\n-4.46640331062435891e-02\n-7.20409850166058852e-02\n-8.86502868170512409e-02\n-8.80859270144019463e-02\n-6.65991154451249373e-02\n-2.55180181985819113e-02\n2.70774813032606601e-02\n7.66314849712117913e-02\n1.05354220086342057e-01\n9.85269252875005386e-02\n5.23073911076710751e-02\n-2.04123091791172072e-02\n-9.05264324196923126e-02\n-1.22694214922178163e-01\n-9.33711578374857021e-02\n-8.98228894438537519e-03\n8.84074061587537957e-02\n1.38186639711020520e-01\n9.87297629926380677e-02\n-1.54507053227446022e-02\n-1.28545957048323334e-01\n-1.48959424850291955e-01\n-4.50360703696009515e-02\n1.09583127230292149e-01\n1.78540968365221209e-01\n8.20478348795660450e-02\n-1.08392723761266824e-01\n-2.12441957965740919e-01\n-1.11245004819967561e-01\n1.20947808780377281e-01\n2.84955302872655469e-01\n2.65423104570052526e-01\n1.34283992456849660e-01\n3.06970469367606850e-02\n1.35322191024997533e-02\n2.34384910246836879e-02\n3.02197024576409123e-02\n3.55706250327270865e-02\n3.98073756247038293e-02\n4.28511412070795433e-02\n4.44029260721140462e-02\n4.40114323752839945e-02\n4.11308939207606361e-02\n3.51989398572431916e-02\n2.57489227269608080e-02\n1.25621803516944575e-02\n-4.14557855474390752e-03\n-2.35259650008968549e-02\n-4.39314176527186157e-02\n-6.28478609036289687e-02\n-7.70121462434570636e-02\n-8.28007503855673621e-02\n-7.69438095303943692e-02\n-5.75380702282437262e-02\n-2.51986584863891534e-02\n1.59798180335966114e-02\n5.81346160723947153e-02\n9.05432363224959319e-02\n1.02071634946054562e-01\n8.50110325244984172e-02\n3.93696936926194105e-02\n-2.41568470291060530e-02\n-8.47475852600224205e-02\n-1.17182686062271474e-01\n-1.02367393915529681e-01\n-3.91402297768812593e-02\n4.90579134820975094e-02\n1.19410619345519137e-01\n1.29206501352143677e-01\n6.29145341496378518e-02\n-4.91808417108809195e-02\n-1.38672226887477074e-01\n-1.38507305944087250e-01\n-3.52062491224242879e-02\n1.05779892636001391e-01\n1.74690443214952917e-01\n1.02340777629051138e-01\n-6.82450190695784303e-02\n-1.97948932002168315e-01\n-1.63970646860903679e-01\n2.38183677991181085e-02\n2.23276744305970276e-01\n2.91496042776870357e-01\n2.14044223639755393e-01\n9.23015114567401207e-02\n1.85872635662871939e-02\n0.0\n4.83316758152832417e-04\n1.87187775526887791e-03\n4.42515060113540110e-03\n8.33541021319081886e-03\n1.37236884412428716e-02\n2.06124378492227242e-02\n2.88819594076803604e-02\n3.82158078048504685e-02\n4.80431872967639131e-02\n5.74914167814378346e-02\n6.53678309427126875e-02\n7.01965046846613205e-02\n7.03384168525011677e-02\n6.42203744681948130e-02\n5.06836078717306307e-02\n2.94331503017500329e-02\n1.52229493277150196e-03\n-3.02529929804531521e-02\n-6.12324686661828987e-02\n-8.52545614748858732e-02\n-9.56784791449679511e-02\n-8.70985392343497505e-02\n-5.75200136343076013e-02\n-1.04121968479843306e-02\n4.42768897900696345e-02\n9.11706455946340033e-02\n1.13257404684408203e-01\n9.81407577284981042e-02\n4.49834156666746449e-02\n-3.10700226303524257e-02\n-1.00665716163178140e-01\n-1.30304001955789922e-01\n-9.87951956570361778e-02\n-1.29858655316277653e-02\n8.77308133006486773e-02\n1.46201432116992214e-01\n1.19602589261284226e-01\n1.26026277936298666e-02\n-1.13249026477213868e-01\n-1.70536527844801333e-01\n-1.06813622523833321e-01\n4.59325232867361516e-02\n1.79767268374384059e-01\n1.85951317640748043e-01\n4.43730496175032546e-02\n-1.52895940621183363e-01\n-2.75300374603640652e-01\n-2.61910996708297983e-01\n-1.59759160711317072e-01\n-5.99573415338661500e-02\n-1.07561522433369111e-02\n1.40990471123582112e-02\n2.44202659369116871e-02\n3.14901094576299778e-02\n3.70877104007460434e-02\n4.15669040834045350e-02\n4.48823551986967662e-02\n4.67708998802281659e-02\n4.68183270872450305e-02\n4.45108104637949864e-02\n3.93006552905283482e-02\n3.07003991313960049e-02\n1.84117170741408299e-02\n2.48703236428744019e-03\n-1.64905919175764963e-02\n-3.72403840962524726e-02\n-5.76801583231503490e-02\n-7.49541683830948352e-02\n-8.56684722419730343e-02\n-8.63962143415844125e-02\n-7.44679579545422521e-02\n-4.89728404701617187e-02\n-1.17687886342656006e-02\n3.18397355898251758e-02\n7.31948933588330158e-02\n1.01560722817321508e-01\n1.06754768260572286e-01\n8.28207408982076371e-02\n3.17495805656160396e-02\n-3.43776236992696729e-02\n-9.46452447142247383e-02\n-1.25088013029217987e-01\n-1.08339744217480730e-01\n-4.39269077393864005e-02\n4.61698018200377147e-02\n1.22073937313396691e-01\n1.42485715467196655e-01\n8.79241338378563414e-02\n-2.15637181168965054e-02\n-1.28425897924101390e-01\n-1.65506097356273585e-01\n-9.89741772152694793e-02\n4.07244068824160615e-02\n1.67426318897328008e-01\n1.91580976763524785e-01\n8.47283394467695655e-02\n-9.44770992466128778e-02\n-2.40176006640753420e-01\n-2.77366789300761418e-01\n-2.12068716447390726e-01\n-1.10982906167081702e-01\n-3.68251036355418185e-02\n-5.94092218845663263e-03\n0.0\n4.73426526809393462e-04\n1.83357305398560008e-03\n4.33513112059824048e-03\n8.16907499916747284e-03\n1.34615498722224797e-02\n2.02513221528517785e-02\n2.84524451040246047e-02\n3.78064206990252200e-02\n4.78300173700107328e-02\n5.77687503818184525e-02\n6.65710253571164812e-02\n7.29030797597998159e-02\n7.52284320825182401e-02\n7.19749752796243758e-02\n6.18047739758976894e-02\n4.39825513943639598e-02\n1.88065044157089516e-02\n-1.19794327536465045e-02\n-4.49222337565600149e-02\n-7.49143850159504493e-02\n-9.57386648552834563e-02\n-1.01213054174169786e-01\n-8.68935496800191387e-02\n-5.20493384660693850e-02\n-1.33449631398668573e-03\n5.46510537349712139e-02\n1.00729437089033411e-01\n1.20879413876370620e-01\n1.03922056047333955e-01\n4.95507338837197706e-02\n-2.79804285739524636e-02\n-1.01437846565930828e-01\n-1.39072506786367289e-01\n-1.18511237736857733e-01\n-4.06902695487683305e-02\n6.42010174829343860e-02\n1.45510579080918023e-01\n1.55787884017872524e-01\n7.94899081470134272e-02\n-5.05407321993436021e-02\n-1.63770467957954052e-01\n-1.89902351623008031e-01\n-1.03578526499927256e-01\n5.52834795245730204e-02\n2.04354550338140095e-01\n2.72226300804328081e-01\n2.42863517241309834e-01\n1.56832601388318754e-01\n7.19838923572697076e-02\n2.13798250582517349e-02\n3.12672596145383832e-03\n1.47564657660771772e-02\n2.55589484469964656e-02\n3.29633571233647477e-02\n3.88460960715171291e-02\n4.36037226400326217e-02\n4.72283141791226893e-02\n4.94968132224548676e-02\n5.00374055200405038e-02\n4.83751684278294763e-02\n4.39863542920062578e-02\n3.63747995275828448e-02\n2.51774031109049772e-02\n1.02993265031997971e-02\n-7.92923526809745198e-03\n-2.85950523821833572e-02\n-5.00779664972413469e-02\n-7.00117655838833342e-02\n-8.53912237459209800e-02\n-9.28853694523927992e-02\n-8.93944782194345811e-02\n-7.28361658173568433e-02\n-4.30614122142703171e-02\n-2.69327531205503304e-03\n4.24235272619858314e-02\n8.35272016678586943e-02\n1.10301883326077599e-01\n1.13371477843668952e-01\n8.75783761274791517e-02\n3.51668784790631975e-02\n-3.24698453853043204e-02\n-9.59149065086276759e-02\n-1.32585721825464881e-01\n-1.24813764977852612e-01\n-6.87361995801972769e-02\n2.00398705843331977e-02\n1.08230065203895401e-01\n1.56117238507220563e-01\n1.35639128409384385e-01\n4.75208374307439993e-02\n-7.28334350672418251e-02\n-1.67622465510483931e-01\n-1.84534731903495258e-01\n-1.06467518550932186e-01\n3.56102551222654620e-02\n1.77741500674220232e-01\n2.59093662328390317e-01\n2.55904313842931885e-01\n1.89887465331538663e-01\n1.06721869236070743e-01\n4.36542295475580572e-02\n1.17223937022401838e-02\n1.56487322678404038e-03\n0.0\n4.61049943270890538e-04\n1.78563875205803324e-03\n4.22233086774735644e-03\n7.95973063697138182e-03\n1.31282471942472095e-02\n1.97823726530097603e-02\n2.78697613738194822e-02\n3.71905856218263109e-02\n4.73517109325123364e-02\n5.77229748674647908e-02\n6.74066040979095921e-02\n7.52349216155329265e-02\n7.98149160152220871e-02\n7.96393066631686936e-02\n7.32801824787843170e-02\n5.96705417095494683e-02\n3.84589217297418920e-02\n1.03921867045675236e-02\n-2.23558736197063193e-02\n-5.60294007887426199e-02\n-8.54504162590716682e-02\n-1.04623714251614652e-01\n-1.07849597392730728e-01\n-9.12714965693523644e-02\n-5.45872639232583487e-02\n-2.43302556652997800e-03\n5.52102348087084235e-02\n1.04218702997511514e-01\n1.29458914505073686e-01\n1.19531136650240691e-01\n7.19282633766827606e-02\n-3.38145798908269166e-03\n-8.41836073461047635e-02\n-1.41513556178053140e-01\n-1.49908678782884608e-01\n-9.92354561986253103e-02\n-2.76096945739230529e-03\n1.03882615159438002e-01\n1.75017744771494121e-01\n1.74925875802976971e-01\n9.63184531046948067e-02\n-3.34524267290756752e-02\n-1.63995263709343864e-01\n-2.46573640243254399e-01\n-2.58038389787555222e-01\n-2.09413946359755465e-01\n-1.34409736366396887e-01\n-6.70843430236851002e-02\n-2.47559778194344250e-02\n-6.06011547309209895e-03\n-7.42911421856575025e-04\n1.55409994787865345e-02\n2.69178006976597169e-02\n3.47211518180988374e-02\n4.09426253319726471e-02\n4.60281166704952852e-02\n5.00120074545639740e-02\n5.27164463181681170e-02\n5.38182471270744964e-02\n5.28895677146994231e-02\n4.94416346295640727e-02\n4.29843609685812700e-02\n3.31088500844459663e-02\n1.95952473258168003e-02\n2.54250227308628219e-03\n-1.74916591426167896e-02\n-3.93629015685199868e-02\n-6.12588639670748961e-02\n-8.07090567164637090e-02\n-9.47359528991763150e-02\n-1.00190634642706652e-01\n-9.42919205386114068e-02\n-7.53407583475847187e-02\n-4.35120477115323451e-02\n-1.54337650507787747e-03\n4.49334435841924895e-02\n8.77013239941346473e-02\n1.17132539489739576e-01\n1.24273303850450226e-01\n1.03573554294125084e-01\n5.56123551591288443e-02\n-1.11651678453414706e-02\n-8.07789260306355644e-02\n-1.32856029491153244e-01\n-1.48467868357207600e-01\n-1.17301320517866306e-01\n-4.36125686784104155e-02\n5.20526144732740420e-02\n1.37497833115072299e-01\n1.79605132637020132e-01\n1.57700744927478237e-01\n7.37086835929538359e-02\n-4.65715008097291605e-02\n-1.63145202119177574e-01\n-2.38792462758522811e-01\n-2.54953713699349716e-01\n-2.17974029305074313e-01\n-1.52506597929475213e-01\n-8.67491655488968616e-02\n-3.90120367761814524e-02\n-1.31144356512465140e-02\n-2.94703740436648345e-03\n-3.33531075904013844e-04\n0.0\n4.45461341637078676e-04\n1.72526435753961815e-03\n4.08009373866702330e-03\n7.69476642629114520e-03\n1.27027527581662705e-02\n1.91732683057752075e-02\n2.70868830024715221e-02\n3.63024514157061981e-02\n4.65185506421682132e-02\n5.72343837927675944e-02\n6.77177135459539059e-02\n7.69904362814311100e-02\n8.38452905230110679e-02\n8.69089537105519894e-02\n8.47660537819941995e-02\n7.61537277224770132e-02\n6.02256067166192163e-02\n3.68663767734260517e-02\n7.01369375204270295e-03\n-2.70838823454836869e-02\n-6.17696581892339044e-02\n-9.21512266029907157e-02\n-1.12637080622656191e-01\n-1.17877665462893480e-01\n-1.04049574580944215e-01\n-7.02793706272507313e-02\n-1.98488704260328629e-02\n3.92897610358676416e-02\n9.51606547171760797e-02\n1.33860499114587611e-01\n1.42994459332755036e-01\n1.15782082734055061e-01\n5.46066962248462212e-02\n-2.75088399506313655e-02\n-1.08762253278998036e-01\n-1.64083736002897662e-01\n-1.73131554025191869e-01\n-1.28116901508774972e-01\n-3.81109979079573072e-02\n7.27210021737862838e-02\n1.73157229366773247e-01\n2.36364587728160325e-01\n2.49745134274264813e-01\n2.18480119402516409e-01\n1.61127761659729585e-01\n9.99175408878302390e-02\n5.12119689396878103e-02\n2.09814134601524725e-02\n6.47592664222996529e-03\n1.34387939706897327e-03\n1.41073647597696791e-04\n1.65146075465599403e-02\n2.86041393377022210e-02\n3.69020892464515526e-02\n4.35415258729572180e-02\n4.90269827302799374e-02\n5.34415750104725168e-02\n5.66590184866775162e-02\n5.84123194529188733e-02\n5.83305598281279591e-02\n5.59732815081570370e-02\n5.08746613978171974e-02\n4.26041504871043503e-02\n3.08469714707502243e-02\n1.55041955677782933e-02\n-3.19294242136825219e-03\n-2.45665914396929475e-02\n-4.73939448743471992e-02\n-6.98557080579087220e-02\n-8.95667121749614409e-02\n-1.03725725027841456e-01\n-1.09414355918907788e-01\n-1.04054997186373732e-01\n-8.60024853608181983e-02\n-5.51946023292361615e-02\n-1.37295100496937078e-02\n3.38118500321224549e-02\n8.05015937058926462e-02\n1.17828888015500163e-01\n1.37152976875430849e-01\n1.31717010095007414e-01\n9.88518250915436797e-02\n4.17688974094804905e-02\n-2.97746442719521789e-02\n-1.00549808690204329e-01\n-1.52883006387295739e-01\n-1.71199463468975771e-01\n-1.46915242597124518e-01\n-8.20077458461926784e-02\n1.03468834179473654e-02\n1.08876201812961190e-01\n1.90452676940342319e-01\n2.37396693116172786e-01\n2.42982344479398094e-01\n2.12793941252373664e-01\n1.61360568991447434e-01\n1.05740338566068626e-01\n5.91751825629319855e-02\n2.76616838625298456e-02\n1.04146361004484305e-02\n2.97082531452171755e-03\n5.72267503398064662e-04\n5.59553242928550974e-05\n0.0\n4.25481181286201451e-04\n1.64788152924611711e-03\n3.89760206767784945e-03\n7.35369658483218600e-03\n1.21509415315839697e-02\n1.83716480621405158e-02\n2.60278310395256618e-02\n3.50360042306521458e-02\n4.51867092234400983e-02\n5.61118521163084666e-02\n6.72545302722394045e-02\n7.78480412354579654e-02\n8.69128752756886391e-02\n9.32822232008227864e-02\n9.56671746043427501e-02\n9.27714102539025504e-02\n8.34607535151274116e-02\n6.69844863996001405e-02\n4.32323787800013501e-02\n1.29944447769208479e-02\n-2.18283633044710039e-02\n-5.81308042999619454e-02\n-9.17034543793365658e-02\n-1.17593722522279689e-01\n-1.30762543783874252e-01\n-1.27010653232852544e-01\n-1.04062499287327553e-01\n-6.25994339104163078e-02\n-6.95416478903992247e-03\n5.48469586496121639e-02\n1.11940324237070524e-01\n1.52444939137486746e-01\n1.66027309308633630e-01\n1.46671251743118403e-01\n9.48654235299945525e-02\n1.83826069032735143e-02\n-6.89058060703775371e-02\n-1.50161833486585183e-01\n-2.09913021598292671e-01\n-2.38242981971880069e-01\n-2.33353492438107685e-01\n-2.01496540327588819e-01\n-1.54281163000003607e-01\n-1.04464260530742828e-01\n-6.19732949588042911e-02\n-3.17010626457709527e-02\n-1.36410234580238258e-02\n-4.75308132060647207e-03\n-1.26005150202119901e-03\n-2.26327025131853213e-04\n-2.06905523137420541e-05\n1.77945961273415984e-02\n3.08211445927240278e-02\n3.97685515304422241e-02\n4.69536195772888645e-02\n5.29538031561451600e-02\n5.79101308206893539e-02\n6.17563814644084483e-02\n6.42914382222328773e-02\n6.52136471975084259e-02\n6.41474961358380752e-02\n6.06742672789443716e-02\n5.43727686868916288e-02\n4.48737167502726506e-02\n3.19291932035437390e-02\n1.54958921633444532e-02\n-4.17278317744398507e-03\n-2.64353754098746382e-02\n-5.01867430588622404e-02\n-7.38184143969057571e-02\n-9.52391414964692817e-02\n-1.11980631821708448e-01\n-1.21408824758683767e-01\n-1.21049001131899786e-01\n-1.09012189812032617e-01\n-8.44813178390535352e-02\n-4.81817945358279792e-02\n-2.72986289747080297e-03\n4.72661717351995081e-02\n9.54690501746904008e-02\n1.34512337906562834e-01\n1.57122532754416760e-01\n1.57528739409173418e-01\n1.32895883317660224e-01\n8.44204329880425680e-02\n1.77116512048418606e-02\n-5.78142120220788217e-02\n-1.30567290734826702e-01\n-1.89169266298822775e-01\n-2.25011356970316434e-01\n-2.34243478860070631e-01\n-2.18537365929346111e-01\n-1.84321832091474153e-01\n-1.40714899476120314e-01\n-9.68670328713225198e-02\n-5.96505507797922968e-02\n-3.24525328769147831e-02\n-1.53192015177591127e-02\n-6.11277381464519348e-03\n-1.98276141716518389e-03\n-4.90839044251198159e-04\n-8.25368155018457912e-05\n-7.07872465882253926e-06\n0.0\n3.98976261851533942e-04\n1.54522841768308045e-03\n3.65529478292868316e-03\n6.89949388347900483e-03\n1.14111923496913129e-02\n1.72831206012494902e-02\n2.45559982385531103e-02\n3.32013352169353501e-02\n4.30997264140273728e-02\n5.40163079431004930e-02\n6.55758495323621043e-02\n7.72410608097080092e-02\n8.82989565691692513e-02\n9.78613633713918546e-02\n1.04886565059859507e-01\n1.08229273658048061e-01\n1.06725074468296349e-01\n9.93126936971916729e-02\n8.51924181054392743e-02\n6.40115655339972833e-02\n3.60583667275511943e-02\n2.43502636566047051e-03\n-3.48289185695301526e-02\n-7.27675719394518528e-02\n-1.07616825112511111e-01\n-1.35129625689357769e-01\n-1.51072009929553525e-01\n-1.51864336065150651e-01\n-1.35284916837392355e-01\n-1.01108023604460723e-01\n-5.15195746579397013e-02\n8.84212394935794330e-03\n7.33239983040516741e-02\n1.34181242656274208e-01\n1.83863788640730691e-01\n2.16415209900865657e-01\n2.28649407431469137e-01\n2.20775822810886146e-01\n1.96260423089988173e-01\n1.60919674664893070e-01\n1.21485750969864317e-01\n8.40622978451185804e-02\n5.29286297510024040e-02\n3.00158037425544352e-02\n1.51184925218142141e-02\n6.63515558062791316e-03\n2.46996130491254889e-03\n7.49506478282795899e-04\n1.73982710487343806e-04\n2.74865386225251933e-05\n2.21840526732742774e-06\n1.96435683615407281e-02\n3.40236584441410625e-02\n4.39078710718810300e-02\n5.18744813811666469e-02\n5.85990858556670532e-02\n6.42956157269816281e-02\n6.89706555562072526e-02\n7.25025785154868041e-02\n7.46756425913291527e-02\n7.52012250497005319e-02\n7.37376605402869367e-02\n6.99141601134021656e-02\n6.33620199312194127e-02\n5.37550210529989733e-02\n4.08596699826004467e-02\n2.45943627316540653e-02\n5.09451794435606623e-03\n-1.72217868497012427e-02\n-4.15959678856927251e-02\n-6.68899520505445294e-02\n-9.15792933837438206e-02\n-1.13792368906114258e-01\n-1.31408033958068354e-01\n-1.42219277121337889e-01\n-1.44161738993842159e-01\n-1.35593510173111970e-01\n-1.15597501764087479e-01\n-8.42623085735540039e-02\n-4.28856253769156689e-02\n5.95939216088698688e-03\n5.85453288894450252e-02\n1.10324999675029040e-01\n1.56465102624436664e-01\n1.92515660067506506e-01\n2.15104327396756001e-01\n2.22513768998599065e-01\n2.15000922195728167e-01\n1.94758037603337347e-01\n1.65494127301535399e-01\n1.31714308646685707e-01\n9.78635812031871111e-02\n6.75476309133540287e-02\n4.30235776887138849e-02\n2.50686175928912965e-02\n1.32123794764373130e-02\n6.20650423434087294e-03\n2.54772371202196092e-03\n8.89209911053519915e-04\n2.53506145230425906e-04\n5.53821700500395532e-05\n8.24660019841002582e-06\n6.28105714599670257e-07\n0.0\n3.61351863687381044e-04\n1.39950975018223941e-03\n3.31104470943898669e-03\n6.25244944885511734e-03\n1.03509748391790203e-02\n1.57050115373053578e-02\n2.23788354431068599e-02\n3.03932884111931985e-02\n3.97132076242550924e-02\n5.02323645422291173e-02\n6.17569208551794202e-02\n7.39888328742992762e-02\n8.65111766214573114e-02\n9.87779621405815433e-02\n1.10111571152425369e-01\n1.19711364967970649e-01\n1.26677108815896944e-01\n1.30050453113843528e-01\n1.28876602173442462e-01\n1.22286318592909254e-01\n1.09595479818213881e-01\n9.04156085564456063e-02\n6.47644678331615459e-02\n3.31615703933272402e-02\n-3.30976434196146715e-03\n-4.29931951736302817e-02\n-8.37199904649697513e-02\n-1.22949777143886121e-01\n-1.57990342735381872e-01\n-1.86280347428519594e-01\n-2.05702247686912171e-01\n-2.14878339164736781e-01\n-2.13395078420649781e-01\n-2.01903973887669591e-01\n-1.82063804427787357e-01\n-1.56317857122868858e-01\n-1.27536135257680622e-01\n-9.85870359134362328e-02\n-7.19250017973792066e-02\n-4.92810927388158404e-02\n-3.15191110871300278e-02\n-1.86761608621477497e-02\n-1.01566658989976442e-02\n-5.00999153052869919e-03\n-2.20776299864343557e-03\n-8.51871538805981090e-04\n-2.79954611624931105e-04\n-7.52621021373149483e-05\n-1.55245253427794228e-05\n-2.18506709661953696e-06\n-1.57463354316286522e-07\n2.28535141244396757e-02\n3.95834475950224834e-02\n5.10912779964775993e-02\n6.04012170190057276e-02\n6.83445790959480021e-02\n7.52397015734175278e-02\n8.11900220681562312e-02\n8.61766519885620030e-02\n9.00960937916881754e-02\n9.27795305138003623e-02\n9.40058515022498126e-02\n9.35135696108030656e-02\n9.10143028841027407e-02\n8.62094167459145910e-02\n7.88107889744817658e-02\n6.85661121394912920e-02\n5.52885331966944185e-02\n3.88896816395904593e-02\n1.94142455196410456e-02\n-2.92674019712125914e-03\n-2.77277287213695961e-02\n-5.43703037362905303e-02\n-8.20197942265102897e-02\n-1.09641890165755707e-01\n-1.36043279782887883e-01\n-1.59938259341976086e-01\n-1.80040082194755535e-01\n-1.95171687827951384e-01\n-2.04385850491453386e-01\n-2.07080493771776508e-01\n-2.03091971193120419e-01\n-1.92748639369820840e-01\n-1.76869981281469663e-01\n-1.56703257484058611e-01\n-1.33799673103260658e-01\n-1.09843777484335714e-01\n-8.64607236942041280e-02\n-6.50330917107901502e-02\n-4.65595775025135425e-02\n-3.15807028472892479e-02\n-2.01827225445481359e-02\n-1.20733783648341152e-02\n-6.70699767583897953e-03\n-3.42664975080521177e-03\n-1.59078200828789685e-03\n-6.60786229672313406e-04\n-2.40665496108396538e-04\n-7.47450866443200723e-05\n-1.90102379127110664e-05\n-3.71321982786512420e-06\n-4.95305522746113910e-07\n-3.38511766951750868e-08\n0.0\n2.98693151517270459e-04\n1.15683360145259705e-03\n2.73728863761850752e-03\n5.17130014759911716e-03\n8.56950510721568755e-03\n1.30254100100966833e-02\n1.86153952876750156e-02\n2.53965555071644644e-02\n3.34029283824615400e-02\n4.26404442222363955e-02\n5.30808943318906851e-02\n6.46552725897967667e-02\n7.72469521743582993e-02\n9.06852995235767623e-02\n1.04740482592098894e-01\n1.19120379081111366e-01\n1.33470604863931391e-01\n1.47378728623518057e-01\n1.60383675625203614e-01\n1.71991110102476003e-01\n1.81695186189639479e-01\n1.89006451696157568e-01\n1.93484885332525114e-01\n1.94776095133602500e-01\n1.92647703622712996e-01\n1.87022047751305709e-01\n1.78000728375473122e-01\n1.65876475074376473e-01\n1.51128444976501769e-01\n1.34398565509080331e-01\n1.16448832466821528e-01\n9.81023616126749792e-02\n8.01740250243492825e-02\n6.33990686607295434e-02\n4.83695260627982834e-02\n3.54879433359517951e-02\n2.49456500545110552e-02\n1.67287629508619806e-02\n1.06500410096921211e-02\n6.39978859431567654e-03\n3.60551887732906340e-03\n1.88904775154586811e-03\n9.11419064577172612e-04\n4.00030367770194239e-04\n1.57262838009782823e-04\n5.42580905281292650e-05\n1.59764273621361724e-05\n3.85525753418517037e-06\n7.14944824975580359e-07\n9.05952735787532566e-08\n5.88491991642763858e-09\n3.25578991207277207e-02\n5.63919354648024923e-02\n7.27986533799547114e-02\n8.61222243613303379e-02\n9.76128811667513474e-02\n1.07825495230574206e-01\n1.17048349534016799e-01\n1.25437817328421297e-01\n1.33073170740796998e-01\n1.39982829298172101e-01\n1.46158636660412594e-01\n1.51564666881126908e-01\n1.56143500058267326e-01\n1.59821460029890727e-01\n1.62513644549153846e-01\n1.64129233746974967e-01\n1.64577350187471244e-01\n1.63773582481347879e-01\n1.61647136983304740e-01\n1.58148432544449685e-01\n1.53256798332010169e-01\n1.46987780619954239e-01\n1.39399425651992759e-01\n1.30596803655853716e-01\n1.20734000285896106e-01\n1.10012854039625629e-01\n9.86778854294018404e-02\n8.70071588791503370e-02\n7.52992358392431810e-02\n6.38568864481127568e-02\n5.29687671802064330e-02\n4.28907564430122332e-02\n3.38289654889227173e-02\n2.59265069486913149e-02\n1.92558343767361521e-02\n1.38178455847060531e-02\n9.54802933585166547e-03\n6.32887093610844630e-03\n4.00672406022462967e-03\n2.41063217575107798e-03\n1.37033168213317245e-03\n7.30975979917549584e-04\n3.62926550931101481e-04\n1.66062504661016098e-04\n6.91727034040646576e-05\n2.58250752434483442e-05\n8.46671570157527499e-06\n2.37030007544023388e-06\n5.44084394256316766e-07\n9.60216672850042935e-08\n1.15840388715138689e-08\n7.16649068242541563e-10\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n0.0\n0.0\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n0.0\n0.0\n0.0\n-1.08472742381388542e-03\n-4.20113124760565244e-03\n-9.90251969648426981e-03\n-1.84771170763622303e-02\n-2.97864244518314635e-02\n-4.29935124003884145e-02\n-5.62502048776087268e-02\n-6.64805016337743915e-02\n-6.94951639769335328e-02\n-6.07489836031443048e-02\n-3.70087187849701890e-02\n1.10930973807619473e-03\n4.64683006843350233e-02\n8.43432667407494757e-02\n9.54507151085634137e-02\n6.49196479072799287e-02\n-4.37546628453371750e-03\n-8.19387104591041138e-02\n-1.16402125826386982e-01\n-6.80514713575707669e-02\n4.51112437681951625e-02\n1.31643108854483243e-01\n9.06119505406491887e-02\n-6.35740425963955968e-02\n-1.55664101856450132e-01\n-3.25463011982652650e-02\n1.61062963962556399e-01\n9.14113873640488572e-02\n-1.71651781820813254e-01\n-9.17992460712520608e-02\n2.26861122079491717e-01\n-2.74638834186305171e-02\n-2.38715686972268110e-01\n3.27133758028667565e-01\n-2.52461693632194173e-01\n1.37970366908697711e-01\n-5.77226737959510572e-02\n1.91900278708997951e-02\n-5.17285234812659821e-03\n1.14295039404465238e-03\n-2.07983783328855249e-04\n3.11689067087047306e-05\n-3.82973710685585953e-06\n3.82261697502359940e-07\n-3.05284349905734929e-08\n1.90534375715001719e-09\n-8.95713424979161803e-11\n2.98382267775662062e-12\n-6.28005580839250896e-14\n6.28036983473509968e-16\n0.0\n0.0\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n-3.20283468138268617e-14\n0.0\n0.0\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n8.08445165689827342e-13\n-1.63282067007192764e-14\n0.0\n1.49153584618682711e-02\n2.58341586690582249e-02\n3.32116220033397275e-02\n3.86332886759592903e-02\n4.19352060972968538e-02\n4.22859974032437497e-02\n3.84603343591977051e-02\n2.91354456526192324e-02\n1.33735769422542814e-02\n-8.66375493142438995e-03\n-3.48542512856124601e-02\n-6.03977488262971221e-02\n-7.77935527381269643e-02\n-7.82387419341021156e-02\n-5.50015082023348201e-02\n-8.46471169411793130e-03\n4.91546484099385228e-02\n9.33789301143736900e-02\n9.58451624442848149e-02\n4.24753634491714521e-02\n-4.65584996049520222e-02\n-1.13675365442407250e-01\n-9.62111172949670912e-02\n1.20719355238242849e-02\n1.22543885941844538e-01\n1.08867617260667501e-01\n-4.32122795008925698e-02\n-1.55525846583246002e-01\n-4.44856381102336565e-02\n1.56679204868117705e-01\n9.27910168036672200e-02\n-1.70832186850680245e-01\n-8.35132884230644357e-02\n2.25539034459328630e-01\n-4.43192212140970654e-02\n-2.19269242183260410e-01\n3.21854692028745448e-01\n-2.60382927692662802e-01\n1.49103608459652814e-01\n-6.56033227650731493e-02\n2.30603343843918986e-02\n-6.61577618876218760e-03\n1.56781788023062688e-03\n-3.08791591122133168e-04\n5.06329993144556269e-05\n-6.89739006530945087e-06\n7.75957347905360304e-07\n-7.13509751266757394e-08\n5.27725011601396538e-09\n-3.06437392918077032e-10\n1.34576262686770477e-11\n-4.20315987260463183e-13\n8.32111971795923090e-15\n0.0\n9.31231485683661287e-04\n3.60664403551681084e-03\n8.50602400394575263e-03\n1.59003845831766355e-02\n2.57379331178424903e-02\n3.74429022893153773e-02\n4.96727203528201863e-02\n6.01209842233804345e-02\n6.55188921569456323e-02\n6.20485584438564691e-02\n4.63832477729556533e-02\n1.74258908623226814e-02\n-2.15613643306100493e-02\n-6.13677159501424679e-02\n-8.73740714402345270e-02\n-8.39387467097887224e-02\n-4.30735753536244936e-02\n2.54205416613427181e-02\n8.96319597239925298e-02\n1.06347499921684005e-01\n5.01739831038397407e-02\n-5.32299261477481092e-02\n-1.23700123221912733e-01\n-8.28396897050736464e-02\n5.28775536891320924e-02\n1.43085570967639686e-01\n5.61977132639769339e-02\n-1.23816025006318567e-01\n-1.28765238917973951e-01\n9.31608526655434005e-02\n1.63492650510438126e-01\n-1.06861882743359851e-01\n-1.62491258203155242e-01\n1.96459220801137896e-01\n4.41807868984634908e-02\n-2.70804866571520197e-01\n3.14111437351427047e-01\n-2.26653503225050040e-01\n1.19973760107645350e-01\n-4.96384679318883706e-02\n1.65764998398732141e-02\n-4.54921289331997394e-03\n1.03647975975075567e-03\n-1.97023114024771396e-04\n3.12759943321989361e-05\n-4.13512897657961669e-06\n4.52475045531942631e-07\n-4.05416570728018729e-08\n2.92645637485853674e-09\n-1.66078551450348462e-10\n7.13697837991790340e-12\n-2.18361705890636816e-13\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367363e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n-1.61942344080973289e-09\n8.98653833493966699e-11\n-3.78065778735820891e-12\n0.0\n8.66426047764552840e-04\n3.35565365371242501e-03\n7.91595443084345055e-03\n1.48087344978570980e-02\n2.40121934498876630e-02\n3.50470844797404965e-02\n4.67621537451872737e-02\n5.71499205294295071e-02\n6.33170572602035214e-02\n6.17867458500721278e-02\n4.93218215401055385e-02\n2.43605773569870315e-02\n-1.11229334763186093e-02\n-5.00111894576891411e-02\n-7.99363085453404787e-02\n-8.61829356704887223e-02\n-5.84006514722374415e-02\n3.58940229482597776e-04\n6.73683490910389760e-02\n1.04547897847193039e-01\n7.88234561964185065e-02\n-7.40196344727397145e-03\n-9.89024440883244094e-02\n-1.13935536034448268e-01\n-1.85003343777213544e-02\n1.09092261688566117e-01\n1.21812489154462897e-01\n-2.46754972559791140e-02\n-1.53724638728994389e-01\n-5.40369786300429894e-02\n1.52844124485929489e-01\n9.28820650447558793e-02\n-1.70534777166068824e-01\n-7.46582530210938983e-02\n2.23693329402947061e-01\n-6.04428648778056812e-02\n-1.99685494680089226e-01\n3.15424575732289769e-01\n-2.67266406134374912e-01\n1.60001492639399556e-01\n-7.37993799662741007e-02\n2.73166714845997499e-02\n-8.29850452787542735e-03\n2.09615300256641487e-03\n-4.43432899576961322e-04\n7.88025564301311331e-05\n-1.17598018378678287e-05\n1.46840532288151399e-06\n-1.52341139845976699e-07\n1.29853215619237565e-08\n-8.94333513020322284e-10\n4.85518037701355783e-11\n1.38775648385790068e-02\n2.40366473857502247e-02\n3.09183376927100149e-02\n3.60490110866714675e-02\n3.93682703078595542e-02\n4.02329121179938673e-02\n3.76476647717229468e-02\n3.04822304143377576e-02\n1.78148420603557490e-02\n-5.49493293180726840e-04\n-2.34201922161792198e-02\n-4.75864693423650661e-02\n-6.75475918537050551e-02\n-7.61070536214551313e-02\n-6.63258440415182837e-02\n-3.49512535853120088e-02\n1.34896496535019863e-02\n6.41090627526219453e-02\n9.38543479864410168e-02\n8.10994027665983136e-02\n2.12923912180138231e-02\n-5.98341884996863235e-02\n-1.10030524056330112e-01\n-8.17948212773452893e-02\n1.99064348515221000e-02\n1.15539923940347122e-01\n1.02747525542275245e-01\n-2.93739623914327161e-02\n-1.40726818170620382e-01\n-7.11091388755192705e-02\n1.14989793196826451e-01\n1.32918431505758633e-01\n-8.91485417183863205e-02\n-1.61387508239882377e-01\n1.10055601699256336e-01\n1.53322920048713257e-01\n-2.00539512712531814e-01\n-2.47180274398494312e-02\n2.54306170934596121e-01\n-3.12462048980527318e-01\n2.35681063631851012e-01\n-1.30404128946312675e-01\n5.65779096716435281e-02\n-1.99041935277143658e-02\n5.78688142169003685e-03\n-1.40596016281414383e-03\n2.87177007748138670e-04\n-4.94265797874700931e-05\n7.16154736544445315e-06\n-8.70066637554330904e-07\n8.79840153153714664e-08\n-7.32143270574096396e-09\n4.92939770466701676e-10\n0.0\n8.08158692342989915e-04\n3.12998515653716350e-03\n7.38517565752149635e-03\n1.38253132320619240e-02\n2.24522063933630805e-02\n3.28663626386842059e-02\n4.40769909952560268e-02\n5.43310572757454632e-02\n6.10631553156686172e-02\n6.11141009965063056e-02\n5.13829153887050347e-02\n3.00123716033360022e-02\n-1.99912992041950373e-03\n-3.92489735811246479e-02\n-7.14187172436417106e-02\n-8.50885006306404817e-02\n-6.88163708641761074e-02\n-2.08639639467000648e-02\n4.38628639729669381e-02\n9.38928414426828950e-02\n9.42769126249746459e-02\n3.17951926165290777e-02\n-6.21820057924962824e-02\n-1.16966777517995002e-01\n-7.26997949296024210e-02\n4.94382434623633349e-02\n1.32194169547041884e-01\n6.57987478006277354e-02\n-9.54888521621763270e-02\n-1.38115365157589182e-01\n3.28530164553997445e-02\n1.67792257111886223e-01\n1.30048521049586953e-03\n-1.88742910765101940e-01\n2.51320701308221928e-02\n2.04395439674644047e-01\n-1.48084466485667726e-01\n-1.07469414757189574e-01\n2.90187851903803029e-01\n-2.97112519015750698e-01\n2.02734630968114227e-01\n-1.04415761976262733e-01\n4.27882747149507525e-02\n-1.43458775460581483e-02\n3.99957789848109143e-03\n-9.36072935864134593e-04\n1.84837054629292984e-04\n-3.08416262170301266e-05\n4.34251259324340908e-06\n-5.13695069484046143e-07\n5.06657853082752451e-08\n-4.11821551403110582e-09\n1.34110082885095135e-02\n2.32285477364258114e-02\n2.98860996054554594e-02\n3.48797786234479046e-02\n3.81892381223788158e-02\n3.92471829676002693e-02\n3.71538730469372011e-02\n3.08652396695146408e-02\n1.94853920076197493e-02\n2.71067763847296405e-03\n-1.85941472740467142e-02\n-4.18117164601599367e-02\n-6.22489781836327166e-02\n-7.34866556939571952e-02\n-6.88453932375441002e-02\n-4.41692459769204224e-02\n-1.44841254376531581e-03\n4.82920127164106483e-02\n8.54732402076973929e-02\n8.84366022246835387e-02\n4.60942565828406994e-02\n-2.84199156080339639e-02\n-9.42883172677429493e-02\n-1.01381495418001205e-01\n-2.96036179400583389e-02\n7.66130663395796219e-02\n1.22433390026080946e-01\n4.51895108600385148e-02\n-9.32860514910172911e-02\n-1.30432938458461017e-01\n8.20081992983317902e-03\n1.50931262325264132e-01\n6.15593609069964576e-02\n-1.49611746094279907e-01\n-9.18975496671960018e-02\n1.70628068541547301e-01\n6.53278764101584142e-02\n-2.21263159640423035e-01\n7.57862765817949313e-02\n1.80014718045661271e-01\n-3.07891757468296778e-01\n2.73094737405840060e-01\n-1.70599706566118642e-01\n8.22652000647926263e-02\n-3.19530648431656378e-02\n1.02346436590687109e-02\n-2.74111767195971828e-03\n6.18871018390315859e-04\n-1.18270476590769946e-04\n1.91502023000594468e-05\n-2.62231259216816210e-06\n3.02252308581942185e-07\n-2.90938782209820251e-08\n0.0\n7.55578460578792467e-04\n2.92634279457470049e-03\n6.90600799850600057e-03\n1.29363300983407099e-02\n2.10376911072676052e-02\n3.08768236488992931e-02\n4.15981791441294296e-02\n5.16661078142204439e-02\n5.88016778013916580e-02\n6.01379021790063098e-02\n5.27364107796431461e-02\n3.45666628780188293e-02\n5.89504265383238284e-03\n-2.92676595184092822e-02\n-6.24162650888476708e-02\n-8.15792684392644962e-02\n-7.50796499560372893e-02\n-3.79476882498117687e-02\n2.12328593136595460e-02\n7.78173930557252425e-02\n9.85941149302572706e-02\n6.11661686758681045e-02\n-2.27622777262843391e-02\n-9.97514513295714722e-02\n-1.02888651705516254e-01\n-1.20807025458813284e-02\n1.01582608746744726e-01\n1.16455312491852467e-01\n-7.60805901610506641e-03\n-1.36066500044879135e-01\n-8.31897955472478412e-02\n1.06895593877290807e-01\n1.35737034603814172e-01\n-8.63403631011036288e-02\n-1.58775957631712816e-01\n1.13751534782348285e-01\n1.43731724342601147e-01\n-2.03878872101696640e-01\n-5.87789538391339430e-03\n2.37332242904563812e-01\n-3.09605301178793091e-01\n2.43864153707220921e-01\n-1.40753685790851513e-01\n6.38573485402233187e-02\n-2.35822617857203605e-02\n7.23183717829213764e-03\n-1.86373745437301216e-03\n4.06441527723909392e-04\n-7.52544596961842301e-05\n1.18349014785157698e-05\n-1.57729685808418317e-06\n1.77258137011227480e-07\n1.29748046590292994e-02\n2.24730208877201298e-02\n2.89203443271616872e-02\n3.37826386444660329e-02\n3.70735103747422898e-02\n3.82919017737509554e-02\n3.66228434593740756e-02\n3.11018414527101557e-02\n2.08653274069169406e-02\n5.53264354674675926e-03\n-1.42895572599817527e-02\n-3.64739483838693937e-02\n-5.70233893226045063e-02\n-7.02447626055967139e-02\n-6.98370152504733527e-02\n-5.11337948913151499e-02\n-1.42477980967674819e-02\n3.30013877475576270e-02\n7.44602271615368849e-02\n8.97290742140019887e-02\n6.39803154654435408e-02\n6.62474528345250824e-04\n-7.10490007401958779e-02\n-1.04847531797735857e-01\n-6.65156353079953688e-02\n2.96532510682684484e-02\n1.11007035041308003e-01\n9.45749565926929381e-02\n-2.38279871472460263e-02\n-1.28234830255556487e-01\n-8.24577580450024661e-02\n8.23317203057440800e-02\n1.42175983326256361e-01\n-2.41581776181459019e-02\n-1.66715279399059807e-01\n-1.84856863588293233e-03\n1.86598622873167225e-01\n-3.24707272925998519e-02\n-1.97016239993093562e-01\n1.57410206751745108e-01\n8.71802057908302175e-02\n-2.77107436042827338e-01\n2.98443719543600938e-01\n-2.12349552082684800e-01\n1.14072588013371917e-01\n-4.88923977799049780e-02\n1.72137949930849174e-02\n-5.06402983072523020e-03\n1.25767317036229432e-03\n-2.65243772937650917e-04\n4.76286954356551536e-05\n-7.28115775407424976e-06\n9.45147478149092966e-07\n0.0\n7.07968488715701597e-04\n2.74195016643554584e-03\n6.47197520841680338e-03\n1.21301141149117060e-02\n1.97513298530901348e-02\n2.90575945793657246e-02\n3.93078708330594079e-02\n4.91529012662574108e-02\n5.65642447017600664e-02\n5.89415058818588689e-02\n5.35217425912173569e-02\n3.81887577762128547e-02\n1.26659863802248626e-02\n-2.01568873682283004e-02\n-5.33481352313969898e-02\n-7.64032813109828540e-02\n-7.79635215846451041e-02\n-5.10203875233035398e-02\n7.47645039672516156e-04\n5.90476666754134807e-02\n9.43974333203902172e-02\n8.01097842127980464e-02\n1.32861222977185642e-02\n-7.08424179116675518e-02\n-1.10292460231533371e-01\n-6.09612044250643498e-02\n5.06065625403174860e-02\n1.23451269691160215e-01\n6.74739501839614342e-02\n-7.65659296418801788e-02\n-1.35657470886037468e-01\n-6.18618647181233376e-03\n1.47624469664188601e-01\n6.73650512139621904e-02\n-1.46985778465275302e-01\n-9.00015595357662734e-02\n1.70992902684958870e-01\n5.56035135363596375e-02\n-2.18203911549684243e-01\n9.03043044067503298e-02\n1.60312300054635065e-01\n-2.99307131693508977e-01\n2.77854027723065999e-01\n-1.80836553482149304e-01\n9.09536070344457021e-02\n-3.69603142724973521e-02\n1.24360806238940323e-02\n-3.51588474112116004e-03\n8.42644246989892004e-04\n-1.72057073015612907e-04\n2.99909204757322355e-05\n-4.46030125570808004e-06\n1.25660850236121654e-02\n2.17650977131266243e-02\n2.80148688474637746e-02\n3.27512555099836733e-02\n3.60167101122302463e-02\n3.73681794672911585e-02\n3.60660923391176030e-02\n3.12191448692139412e-02\n2.19999105800198005e-02\n7.97469112918956259e-03\n-1.04542879732464102e-02\n-3.15646184479205436e-02\n-5.19566636009337057e-02\n-6.66026031039283206e-02\n-6.96421173407139188e-02\n-5.61774686792689895e-02\n-2.49650224835657290e-02\n1.87765639237937390e-02\n6.20631630893066916e-02\n8.64628816871109707e-02\n7.54416466246272399e-02\n2.54616812606441242e-02\n-4.47956587246718455e-02\n-9.61972512098156762e-02\n-8.88446586654847298e-02\n-1.47232458227672287e-02\n7.98957332010223620e-02\n1.13931357697798663e-01\n4.05719226439001032e-02\n-8.42089263593873150e-02\n-1.24926536483460401e-01\n-1.19412808255910628e-02\n1.30006633821204309e-01\n9.28698614346102208e-02\n-9.96723383944875391e-02\n-1.37510918609507010e-01\n8.45961868940964257e-02\n1.55716940556714617e-01\n-1.17808353075161937e-01\n-1.33744095509023803e-01\n2.06429212897007441e-01\n-1.22950986621635210e-02\n-2.19945017011180882e-01\n3.05575745129514964e-01\n-2.51167940871842077e-01\n1.50959972272618898e-01\n-7.14415918369559477e-02\n2.76102572202002843e-02\n-8.89761218581655404e-03\n2.42138232291718661e-03\n-5.60748539744760190e-04\n1.10968955843538866e-04\n-1.87928471499040685e-05\n0.0\n6.64721423622625322e-04\n2.57445500355771295e-03\n6.07758522677516195e-03\n1.13967363305366529e-02\n1.85782722301209048e-02\n2.73904322029733492e-02\n3.71895573513438549e-02\n4.67867735536390758e-02\n5.43729554277615490e-02\n5.75895932240706107e-02\n5.38529390551565901e-02\n4.10233851044807321e-02\n1.84275708859764110e-02\n-1.19419525991520132e-02\n-4.45000192169625886e-02\n-7.01486386579167620e-02\n-7.81845081316228513e-02\n-6.04449887771199984e-02\n-1.69397473842774204e-02\n3.95860793539065461e-02\n8.42640570544593986e-02\n8.95293684410709001e-02\n4.26473939461720353e-02\n-3.74710096475922433e-02\n-1.00045595861095404e-01\n-9.12436083805397841e-02\n-3.07919270333864787e-03\n9.77442930610335076e-02\n1.09498691545620266e-01\n2.76457494607790244e-04\n-1.21176905752716335e-01\n-9.57212015825699702e-02\n6.99263442930348061e-02\n1.44712571216410291e-01\n-1.70180514686427385e-02\n-1.65492041908475274e-01\n-1.32593202368002532e-03\n1.84395657150557668e-01\n-4.01518101169336325e-02\n-1.89141571186183854e-01\n1.65849366535942150e-01\n6.72766229642913355e-02\n-2.63276954873578162e-01\n2.98598963212076629e-01\n-2.21311375952865791e-01\n1.23766691540721160e-01\n-5.53439607687699203e-02\n2.03976260421633755e-02\n-6.30794503797235499e-03\n1.65487438801272652e-03\n-3.70750379089211071e-04\n7.11778537698244641e-05\n1.21823310174938026e-02\n2.11004162769215242e-02\n2.71642163011474903e-02\n3.17799978375354550e-02\n3.50147615855022701e-02\n3.64764194324586552e-02\n3.54926195322872381e-02\n3.12392323610524679e-02\n2.29269443767101191e-02\n1.00871623041431761e-02\n-7.03965950217735371e-03\n-2.70659524950409222e-02\n-4.71039521990021040e-02\n-6.27273018665759352e-02\n-6.85414537036412308e-02\n-5.96116844583617911e-02\n-3.37433694507349932e-02\n5.91611458788717307e-03\n4.91987655428805098e-02\n7.99571442858875714e-02\n8.13561674157911585e-02\n4.51502774359970119e-02\n-1.87387543981882634e-02\n-7.95861321531281807e-02\n-9.76110124422239905e-02\n-5.03983044154905149e-02\n4.02252837624289539e-02\n1.07602146988074035e-01\n8.50972930569727226e-02\n-2.37297628196734209e-02\n-1.18810992672507956e-01\n-8.53878273133953786e-02\n5.99162914866615826e-02\n1.38296932985473520e-01\n1.85795820115373898e-02\n-1.44138569415830059e-01\n-7.17182783323494777e-02\n1.44939239388757246e-01\n8.73217038384701133e-02\n-1.71522144620354672e-01\n-4.55580870656116174e-02\n2.14484670390052812e-01\n-1.03955213425509355e-01\n-1.40637431167883881e-01\n2.89724282298360447e-01\n-2.81534167576822536e-01\n1.90653050673196295e-01\n-9.98161220697466045e-02\n4.23261086280129692e-02\n-1.49128702163807223e-02\n4.43349189786813608e-03\n-1.12281235245347889e-03\n2.43621785636556805e-04\n0.0\n6.25319954766356194e-04\n2.42185377086127267e-03\n5.71815624292637114e-03\n1.07277082852398238e-02\n1.75057319401157492e-02\n2.58593654030895084e-02\n3.52280976841200730e-02\n4.45615310930330064e-02\n5.22428697831335970e-02\n5.61322662253366661e-02\n5.38230227688929197e-02\n4.31956988290080959e-02\n2.32927303987105136e-02\n-4.60680737022272843e-03\n-3.60583283194115395e-02\n-6.32665994985980029e-02\n-7.63708541799008878e-02\n-6.66920088244100373e-02\n-3.15977802702915589e-02\n2.08030982118861708e-02\n7.04320738608731900e-02\n9.10466600299405793e-02\n6.40452583964196825e-02\n-4.86686433880098579e-03\n-7.83469131654940670e-02\n-1.02862154328334232e-01\n-4.80085307408337839e-02\n5.45913347142577138e-02\n1.16369580479778120e-01\n6.45196106530044472e-02\n-6.52422142796670879e-02\n-1.29179342300253186e-01\n-2.91153043200237695e-02\n1.23213042670576839e-01\n1.00545272297288463e-01\n-9.33759815647513258e-02\n-1.38459022492808392e-01\n8.37847789547204180e-02\n1.52248398330761425e-01\n-1.22103041388954989e-01\n-1.23388887077730033e-01\n2.08154323842639710e-01\n-2.97560854331912934e-02\n-2.02209717015760820e-01\n3.00410871472636065e-01\n-2.57561597875625270e-01\n1.60962031204185840e-01\n-7.92931977934276805e-02\n3.19848344241990198e-02\n-1.07965000954640730e-02\n3.09063140038190205e-03\n-7.56561211348322411e-04\n1.18213253871250739e-02\n2.04751361833044564e-02\n2.63635729860306756e-02\n3.08638525868980829e-02\n3.40638924501526497e-02\n3.56165253090867384e-02\n3.49094666554051331e-02\n3.11801612222473573e-02\n2.36780875918962651e-02\n1.19134815383909413e-02\n-4.00098842112425745e-03\n-2.29548662545775023e-02\n-4.24983224369461163e-02\n-5.87437164219601210e-02\n-6.67629947069698082e-02\n-6.17165770829220528e-02\n-4.07698832096899944e-02\n-5.44855184760561530e-03\n3.65116908006857810e-02\n7.13124439928556203e-02\n8.27371212069292206e-02\n5.96424093319995047e-02\n5.05189465319232523e-03\n-5.86416675027427517e-02\n-9.53263315984838322e-02\n-7.48700870404467034e-02\n5.53352249699839158e-04\n8.37342681998382854e-02\n1.05502808816483440e-01\n3.30742121039893436e-02\n-7.98601065911451469e-02\n-1.18295669858880848e-01\n-2.20763098613717748e-02\n1.12166400456426119e-01\n1.06071689161353344e-01\n-5.85161293243246922e-02\n-1.46133934935546161e-01\n1.12802998273735210e-02\n1.64209502802272617e-01\n-1.18203571559089818e-04\n-1.82088523844852163e-01\n4.80721303868889699e-02\n1.80769003613249518e-01\n-1.73365575765658642e-01\n-4.78115111065803081e-02\n2.48761270092133308e-01\n-2.97594744209510986e-01\n2.29573545956234720e-01\n-1.33440823819666710e-01\n6.21170048626478802e-02\n-2.39008281202289230e-02\n7.74438065117002972e-03\n-2.13783673072941854e-03\n0.0\n5.89322248125607388e-04\n2.28243525253999258e-03\n5.38968653716344944e-03\n1.01157562406856468e-02\n1.65226844779082227e-02\n2.44504263774489826e-02\n3.34097406155303769e-02\n4.24701862203438890e-02\n5.01839329113904012e-02\n5.46083315812966735e-02\n5.35078426216045108e-02\n4.48130772858968893e-02\n2.73687031680766406e-02\n1.88995823671311001e-03\n-2.81370041168929642e-02\n-5.60958829439871867e-02\n-7.30534563885650717e-02\n-7.02605372445451182e-02\n-4.32663505118575584e-02\n3.56349339089551348e-03\n5.46971333677987309e-02\n8.64962617424717140e-02\n7.75397871645326503e-02\n2.36890085097457327e-02\n-5.08736920146628940e-02\n-9.89835250039075298e-02\n-7.87056157176948823e-02\n7.50322202057385722e-03\n9.61198253964517108e-02\n1.01762827455591259e-01\n2.07685020269797503e-03\n-1.10169263287754338e-01\n-9.92778674059973110e-02\n4.39718730437786004e-02\n1.39027943310827157e-01\n2.91344221225931718e-02\n-1.40701408986869142e-01\n-7.48390045821888394e-02\n1.43427346023137448e-01\n8.39587535893806386e-02\n-1.72120248190346103e-01\n-3.52589231593716107e-02\n2.10086726217846242e-01\n-1.16700950959675184e-01\n-1.21052454626661837e-01\n2.79200287977600103e-01\n-2.84129777169884190e-01\n1.99993548471225080e-01\n-1.08803460213425282e-01\n4.80352591456890757e-02\n-1.76731776622304181e-02\n5.50671167683302112e-03\n1.14812365544733393e-02\n1.98860850460648615e-02\n2.56089626653749521e-02\n2.99986796242154505e-02\n3.31609907182165778e-02\n3.47884359715686028e-02\n3.43225238731542578e-02\n3.10570955640653117e-02\n2.42802001509996659e-02\n1.34912490790252658e-02\n-1.29773456173557151e-03\n-1.92057960614462515e-02\n-3.81575061164959872e-02\n-5.47445318109442067e-02\n-6.44906876444255039e-02\n-6.27382217886991722e-02\n-4.62483105334855760e-02\n-1.52980466838798096e-02\n2.44332710417700938e-02\n6.14072699172992578e-02\n8.05853245206359509e-02\n6.92986361930418432e-02\n2.54132805589821174e-02\n-3.62083416249555298e-02\n-8.49750545799217438e-02\n-8.80905392260748071e-02\n-3.36286370739556154e-02\n5.07781794887968083e-02\n1.04299433000929420e-01\n7.45533035251587928e-02\n-2.72041066284449823e-02\n-1.12017100540667283e-01\n-8.36390210209144724e-02\n4.59934371190088981e-02\n1.30167873597716727e-01\n4.39530013140300990e-02\n-1.16165321232303720e-01\n-1.06565314980947526e-01\n8.80107917267666101e-02\n1.38747357355271134e-01\n-8.37860973368094314e-02\n-1.48396869165451945e-01\n1.26528865713527033e-01\n1.12700269803251429e-01\n-2.09031300984773349e-01\n4.64602711272895930e-02\n1.84198418179476520e-01\n-2.94156991851697358e-01\n2.63023232558334652e-01\n-1.70703572563656952e-01\n8.73742048843483832e-02\n-3.67004124723352421e-02\n1.29396399424346470e-02\n0.0\n5.56382133662420555e-04\n2.15485873780190415e-03\n5.08904145335410674e-03\n9.55518632616053111e-03\n1.56205146394971690e-02\n2.31527466302067254e-02\n3.17239252675046018e-02\n4.05078051891029911e-02\n4.82052028756886145e-02\n5.30509510124694203e-02\n5.29723912832829255e-02\n4.59699307888165182e-02\n3.07564835346967255e-02\n7.60479749504171590e-03\n-2.07990289131343119e-02\n-4.88877826076372160e-02\n-6.86729738907129322e-02\n-7.16363907102426228e-02\n-5.21509396500251660e-02\n-1.16500472687076848e-02\n3.84153513662692930e-02\n7.76382274797242644e-02\n8.39666780859158746e-02\n4.65047573081554116e-02\n-2.20985037744767555e-02\n-8.40208076002704890e-02\n-9.41492006075438231e-02\n-3.41226581646509597e-02\n6.01246460206812244e-02\n1.10240363850847969e-01\n5.86687723532538369e-02\n-5.95510339199234184e-02\n-1.22012702761851707e-01\n-4.12197310868822053e-02\n1.02084768882933788e-01\n1.13997525723623691e-01\n-4.82194326441940310e-02\n-1.46766815722495919e-01\n6.79503266061495630e-03\n1.62930171443716160e-01\n-2.35317225287387652e-03\n-1.79647987541269399e-01\n5.61389133080542405e-02\n1.71923522707318310e-01\n-1.79942034301820875e-01\n-2.88506382685127169e-02\n2.33658729484488514e-01\n-2.95485410631994072e-01\n2.37119104549944115e-01\n-1.43053138250416129e-01\n6.91900500668690688e-02\n-2.77271583099956906e-02\n1.11634824098077179e-02\n1.93357187231884171e-02\n2.49036401865927008e-02\n2.91887293463071670e-02\n3.23119938711100632e-02\n3.40010968464892829e-02\n3.37456882767888378e-02\n3.08910720840268917e-02\n2.47628522397971007e-02\n1.48572386357421100e-02\n1.10729731832315986e-03\n-1.57960346457460092e-02\n-3.40968747811443221e-02\n-5.08105437354270731e-02\n-6.18878664188400041e-02\n-6.29056004891876269e-02\n-5.03961117827003147e-02\n-2.36923564462239548e-02\n1.32347002216799039e-02\n5.09291762195018885e-02\n7.58292488957306443e-02\n7.47351637412122793e-02\n4.18595241923956501e-02\n-1.43307643709377850e-02\n-6.94322299525199083e-02\n-9.14566854853403471e-02\n-5.95354054474357408e-02\n1.57138032224610272e-02\n8.72185498655972391e-02\n9.66453542752292727e-02\n2.36414971172097428e-02\n-7.87195573130498316e-02\n-1.11551049993141277e-01\n-2.56398267949404721e-02\n9.89430501494794890e-02\n1.09683200510445708e-01\n-2.91081038051224511e-02\n-1.38444157410047425e-01\n-3.80601042870972392e-02\n1.37503844255086827e-01\n7.69549553264444186e-02\n-1.42435898071668232e-01\n-8.00487786184403138e-02\n1.72760116255852192e-01\n2.48154964536148603e-02\n-2.05099808363858632e-01\n1.28528702417655599e-01\n1.01725464183119507e-01\n-2.67969399199361136e-01\n2.85804972637656751e-01\n-2.08919324307403897e-01\n1.17927542922931866e-01\n-5.40974773195953273e-02\n0.0\n5.26700598630380572e-04\n2.03990264693294093e-03\n4.81808571527598661e-03\n9.04965948348667240e-03\n1.48057848406964558e-02\n2.19776406436864719e-02\n3.01897864554347140e-02\n3.87060426769000460e-02\n4.63571115209750473e-02\n5.15358593010880328e-02\n5.23210917554417440e-02\n4.67935068256297160e-02\n3.35830019068654451e-02\n1.26175472011463251e-02\n-1.40792859553527661e-02\n-4.18582729158830241e-02\n-6.36432832930615699e-02\n-7.13327776176127248e-02\n-5.86056065282998390e-02\n-2.46622522404791530e-02\n2.25619942980376589e-02\n6.60631270294036038e-02\n8.46089527153567056e-02\n6.31130525527385661e-02\n4.87696716301445378e-03\n-6.24305464115555778e-02\n-9.61342691927135062e-02\n-6.52412694017860118e-02\n1.89257798747260245e-02\n9.56719817476829743e-02\n9.35513751007513855e-02\n-1.65873110659367522e-04\n-1.02793721258473914e-01\n-9.82733681884817578e-02\n2.73299339710462753e-02\n1.28883113656885512e-01\n5.67408858885097012e-02\n-1.09295721712849556e-01\n-1.11433298140799081e-01\n8.35838504822485479e-02\n1.38750051909426908e-01\n-8.45084119125914940e-02\n-1.44480523645112824e-01\n1.31086776009896461e-01\n1.02046718526191488e-01\n-2.09387647757312167e-01\n6.22458944492721919e-02\n1.66588270934238392e-01\n-2.87639765829647176e-01\n2.68185405990603809e-01\n-1.80543029543478256e-01\n9.58560297079538715e-02\n1.08988965962237977e-02\n1.88774426510991168e-02\n2.43164843530644173e-02\n2.85151816427564840e-02\n3.16080417448521764e-02\n3.33532138102072134e-02\n3.32821935119713141e-02\n3.07854996283105573e-02\n2.52230301526678580e-02\n1.60919156740253200e-02\n3.26307817016515279e-03\n-1.27287027909186775e-02\n-3.03964117614300318e-02\n-4.71214935113206945e-02\n-5.92419701303858598e-02\n-6.25864732104665089e-02\n-5.35767338449166519e-02\n-3.08407377500347288e-02\n3.04495640381463508e-03\n4.04701210364859995e-02\n6.94397114667554827e-02\n7.68764658106070031e-02\n5.45427709909718506e-02\n5.72592037904870021e-03\n-5.12328665486669055e-02\n-8.72351980919505166e-02\n-7.66357510749665349e-02\n-1.66827896431826911e-02\n6.07721136419276248e-02\n1.00730028472280214e-01\n6.33586014023831412e-02\n-3.29818671960040236e-02\n-1.07485438060547722e-01\n-7.95806926020467820e-02\n3.84596101468375334e-02\n1.22176900823013065e-01\n5.80771640801042571e-02\n-9.17713280263966341e-02\n-1.20574976541832385e-01\n3.89319204153511372e-02\n1.47533100492031083e-01\n-3.03833533983826785e-03\n-1.62422864061062017e-01\n4.77585588002479855e-03\n1.78015688993651250e-01\n-6.39659890440954920e-02\n-1.64035905452168312e-01\n1.86242552996711080e-01\n1.16587795363088213e-02\n-2.20659894164673742e-01\n2.95091348443223045e-01\n-2.46018386345627948e-01\n1.53790719126670611e-01\n0.0\n5.03209226112079052e-04\n1.94892095239000435e-03\n4.60366482442624639e-03\n8.64977044794987791e-03\n1.41618925596824694e-02\n2.10506169972606606e-02\n2.89836768402249798e-02\n3.72989424375047771e-02\n4.49342918347957823e-02\n5.04140791810567465e-02\n5.19455777163310012e-02\n4.76831076629032277e-02\n3.61998608307308248e-02\n1.71529215214306953e-02\n-7.97425990667349413e-03\n-3.53078820176679978e-02\n-5.85911007080183593e-02\n-7.01996955777083043e-02\n-6.34275089855736163e-02\n-3.57952598330673957e-02\n7.68983963006926799e-03\n5.32566183983606556e-02\n8.12677622462657789e-02\n7.43212474517997990e-02\n2.85459265523276655e-02\n-3.79902311968218012e-02\n-8.81553800221176048e-02\n-8.48618555643243788e-02\n-2.01096066385125748e-02\n6.66618213581728070e-02\n1.05499550920722607e-01\n5.17677480613908253e-02\n-5.80443932778365868e-02\n-1.16603448815128519e-01\n-4.73831399255908448e-02\n8.66069919789730497e-02\n1.18672311268012878e-01\n-1.48176600098070509e-02\n-1.38316149934133409e-01\n-4.70811313409883817e-02\n1.35616652204493704e-01\n8.03424966723947226e-02\n-1.42834220350601060e-01\n-7.82693237435182487e-02\n1.75086360110299682e-01\n1.69584839127308352e-02\n-2.03464924435261985e-01\n1.39205647373333963e-01\n8.86021011112935464e-02\n-2.64878961596618168e-01\n2.94660663052532246e-01\n-2.22952081693961662e-01\n1.08065010822096744e-02\n1.87174089264352146e-02\n2.41132105486488689e-02\n2.82904198073773254e-02\n3.13976357118063154e-02\n3.32174826186297581e-02\n3.33133922719240708e-02\n3.11095165375513995e-02\n2.59901576314953385e-02\n1.74502320810070340e-02\n5.30867082427082145e-03\n-1.00259149508078096e-02\n-2.72821553771032468e-02\n-4.41358183648579705e-02\n-5.72398608576731652e-02\n-6.26363546068756105e-02\n-5.66768428281597195e-02\n-3.74400655362734924e-02\n-6.37194866794979324e-03\n3.04817682164026417e-02\n6.25828258191566678e-02\n7.72671170648515787e-02\n6.46456310819567143e-02\n2.38848367469381775e-02\n-3.21596509310683384e-02\n-7.81797788235708002e-02\n-8.65574593987893104e-02\n-4.46174981364736850e-02\n3.01860114325650589e-02\n9.12857561281590485e-02\n8.93414316811470821e-02\n1.42149633536524846e-02\n-8.05772192223628836e-02\n-1.07601433016226808e-01\n-2.68300861983019126e-02\n9.10725188548875131e-02\n1.11884061956265352e-01\n-7.99458972756053772e-03\n-1.28103205639299722e-01\n-7.13007667011496954e-02\n1.03177390210644829e-01\n1.19934640601976242e-01\n-7.88882783099776053e-02\n-1.43930404524023392e-01\n8.40765464526211093e-02\n1.47558728123813876e-01\n-1.35419692451593632e-01\n-1.01016302275273445e-01\n2.15778570109061235e-01\n-6.98246284596272249e-02\n-1.69343803515643376e-01\n3.04419776446685220e-01\n-2.92242956702835455e-01\n0.0\n4.91350077581235371e-04\n1.90299066762984683e-03\n4.49560950681886749e-03\n8.44940868254587252e-03\n1.38435127857350522e-02\n2.06042301938526018e-02\n2.84319261282177348e-02\n3.67189934339130844e-02\n4.44809355707545540e-02\n5.03356032644166271e-02\n5.25783114138132363e-02\n4.94059513083711030e-02\n3.93305658320513979e-02\n2.17792227726535670e-02\n-2.20744813079301518e-03\n-2.93875446506401961e-02\n-5.41789345334821940e-02\n-6.93718037960752015e-02\n-6.79899450991718612e-02\n-4.62149949078035915e-02\n-6.60344816883427169e-03\n3.99796419687019552e-02\n7.57380757380880926e-02\n8.20535799223845175e-02\n4.95249839913064691e-02\n-1.23966764927889508e-02\n-7.34821371144871865e-02\n-9.49079147114555294e-02\n-5.43702199402208708e-02\n2.98029205238371890e-02\n9.84371576735440096e-02\n8.95884162718248028e-02\n-2.44991274053858905e-03\n-1.00611909510966685e-01\n-1.00724767107360058e-01\n1.44089703889327021e-02\n1.22476917239776495e-01\n7.90854365600979908e-02\n-8.01528749460117818e-02\n-1.32859401149983791e-01\n2.51542567259439506e-02\n1.54570927301962924e-01\n8.69143471422555158e-03\n-1.69031211518161029e-01\n-3.70377572581743857e-03\n1.87524738101742333e-01\n-6.05179273267755571e-02\n-1.78054825197151462e-01\n1.93795034781888698e-01\n2.73734688266534243e-02\n-2.61585354153585414e-01\n3.47951480173185557e-01\n1.09789966315713555e-02\n1.90161799820091487e-02\n2.45009670231114383e-02\n2.87588967432054268e-02\n3.19561141851546007e-02\n3.38941710839537336e-02\n3.41576530801002212e-02\n3.21906670999068181e-02\n2.73884442931130109e-02\n1.92350176063125350e-02\n7.49959350179304172e-03\n-7.51547060916325782e-03\n-2.47119052706317524e-02\n-4.19951709859492234e-02\n-5.62570957567830876e-02\n-6.36896652941030400e-02\n-6.05585421041602290e-02\n-4.44601889796615579e-02\n-1.58700188496283291e-02\n2.05217813141968519e-02\n5.54934119074565677e-02\n7.68868062999812363e-02\n7.35999049310589876e-02\n4.13591361401690755e-02\n-1.19906825959545642e-02\n-6.53633121047345195e-02\n-9.09611898268661151e-02\n-6.87429935719550689e-02\n-2.95851466094898975e-03\n7.11445823183201737e-02\n1.02092867472449195e-01\n5.80520219028314022e-02\n-3.79158568659477627e-02\n-1.09157774942769348e-01\n-8.27452444020608940e-02\n3.10426228247616329e-02\n1.21064780460620983e-01\n7.61342159054775314e-02\n-6.95327797074965087e-02\n-1.34194083011033138e-01\n-9.51106127797556912e-03\n1.41812040841206966e-01\n7.10934034608120130e-02\n-1.33481934956917542e-01\n-1.03653622197268841e-01\n1.41135095838080538e-01\n1.03609986748649185e-01\n-1.80952633700931953e-01\n-4.59966770701934202e-02\n2.31594253267710382e-01\n-1.19656729665927039e-01\n-1.68653551130691165e-01\n3.79455992316934165e-01\n0.0\n4.88878191177476292e-04\n1.89341709275437156e-03\n4.47343158148574664e-03\n8.41038270840466229e-03\n1.37892177024162635e-02\n2.05502307349965593e-02\n2.84201705089029630e-02\n3.68337553531895151e-02\n4.48651303201564808e-02\n5.12005428893396175e-02\n5.41953965345680702e-02\n5.20650443578338992e-02\n4.32500680184596739e-02\n2.69619492294172203e-02\n3.84436740739404689e-03\n-2.34208619628604731e-02\n-4.98540383719601396e-02\n-6.86335045813323275e-02\n-7.25852872651176761e-02\n-5.67434589237400047e-02\n-2.14597390855200409e-02\n2.51931438933816303e-02\n6.75439385585856478e-02\n8.66027627765295488e-02\n6.86058738501491294e-02\n1.50189917520584266e-02\n-5.19737511712673322e-02\n-9.53293646361336733e-02\n-8.28019581522062981e-02\n-1.26322368270105224e-02\n7.34416366777875806e-02\n1.09215810689322665e-01\n5.48950295250990178e-02\n-5.49186058422660439e-02\n-1.20519179062209533e-01\n-6.42746552615290345e-02\n7.02519227202466762e-02\n1.31532342169287525e-01\n2.68015662543030150e-02\n-1.25186755504554992e-01\n-1.04554324525930054e-01\n8.51265461412836488e-02\n1.48194829491126445e-01\n-5.28218503568475412e-02\n-1.72062604169015476e-01\n5.42553717917903244e-02\n1.86427034506512351e-01\n-1.09199490721570952e-01\n-1.69084938911019611e-01\n2.26063771460843443e-01\n4.35500709983439455e-02\n-3.83044523074497045e-01\n1.13006247403036955e-02\n1.95732562074758497e-02\n2.52217165116887000e-02\n2.96191162598414860e-02\n3.29524001203135089e-02\n3.50408834413178522e-02\n3.54867886559316476e-02\n3.37493724668301853e-02\n2.92298994907749590e-02\n2.13981836794032015e-02\n9.97399190133568120e-03\n-4.84066965203786004e-03\n-2.21082079069192111e-02\n-3.99465689706050425e-02\n-5.54704294702443312e-02\n-6.50174789575748147e-02\n-6.47877320709194654e-02\n-5.19469346035149881e-02\n-2.60709558034614534e-02\n9.45964511117565118e-03\n4.67977146851203119e-02\n7.45387128330987914e-02\n8.08218187227617013e-02\n5.84384777603996486e-02\n1.03813963325016644e-02\n-4.72088631857447774e-02\n-8.82436483586595266e-02\n-8.77768340563872401e-02\n-3.80355756111103588e-02\n3.95984754084865442e-02\n9.85724483383802058e-02\n9.31492130098549032e-02\n1.60028799768948092e-02\n-8.14142977052056543e-02\n-1.15722075018972359e-01\n-4.32266384166320045e-02\n7.99360022183706470e-02\n1.27078415400998374e-01\n2.99705956590024525e-02\n-1.13638772416418288e-01\n-1.18721488991914134e-01\n4.54130997912807616e-02\n1.56188021521721787e-01\n2.34274915529000989e-02\n-1.63813879437944981e-01\n-6.70834559774132200e-02\n1.73601235649069374e-01\n7.67714240036437012e-02\n-2.06569669341209405e-01\n-3.60323648455825804e-02\n2.61287506720976337e-01\n-8.83719007333238216e-02\n-3.61708097033919873e-01\n0.0\n4.88072341215238124e-04\n1.89029604927108100e-03\n4.46650761870572271e-03\n8.40009019608759823e-03\n1.37822344899780347e-02\n2.05673237473662784e-02\n2.85081976786606683e-02\n3.70812259116004364e-02\n4.54183979442857322e-02\n5.22741337595303487e-02\n5.60655470819554635e-02\n5.50316479287741023e-02\n4.75517816306997090e-02\n3.26365804222802439e-02\n1.05467417805277311e-02\n-1.65959787445327384e-02\n-4.44504505483979545e-02\n-6.66816727070779491e-02\n-7.60925480782000674e-02\n-6.67921667572493466e-02\n-3.70938582442009307e-02\n7.80267681248155830e-03\n5.48985730925631438e-02\n8.59280637126848823e-02\n8.41000059714973325e-02\n4.35926866132594348e-02\n-2.26311299220836384e-02\n-8.30751670150343402e-02\n-1.00713138627215607e-01\n-5.63447646922821954e-02\n3.05942030039797162e-02\n1.03073823916603774e-01\n1.00704782217540367e-01\n1.25816443185848732e-02\n-9.50265792306556334e-02\n-1.19588076253289863e-01\n-2.12812442472757497e-02\n1.09874817008806872e-01\n1.21735086781222634e-01\n-2.08675587626531954e-02\n-1.48643647310440441e-01\n-7.25977989265442492e-02\n1.23765260919552686e-01\n1.36001089308675466e-01\n-9.00001152790959186e-02\n-1.73572436307411454e-01\n7.88341114206357607e-02\n1.99518772848598064e-01\n-1.10898495568367811e-01\n-2.19578751288809992e-01\n2.03464335241275107e-01\n3.22335418599091761e-01\n1.16556422029865693e-02\n2.01881644904167747e-02\n2.60172572599626541e-02\n3.05684471279608246e-02\n3.40514780489456770e-02\n3.63051029121388841e-02\n3.69510167347876298e-02\n3.54657913573672087e-02\n3.12592559804107453e-02\n2.37897723356218158e-02\n1.27301973767849040e-02\n-1.81668152627539425e-03\n-1.90765691039227227e-02\n-3.73903441617502025e-02\n-5.41196618535138077e-02\n-6.57920992069796623e-02\n-6.86092895169016642e-02\n-5.93888780415698786e-02\n-3.68764262578774038e-02\n-3.14070108209058355e-03\n3.55022726273878653e-02\n6.87875328155754667e-02\n8.47065984280790663e-02\n7.37684300456131065e-02\n3.43789024999607215e-02\n-2.29780963043144625e-02\n-7.60027838096349329e-02\n-9.78766775765958497e-02\n-7.10461931643154160e-02\n-1.73028176503219923e-03\n7.51429110070256229e-02\n1.09940475093039086e-01\n7.04186026823712258e-02\n-2.60898787173870633e-02\n-1.10128369511969693e-01\n-1.05668633978047904e-01\n-2.02573951261520715e-03\n1.13081893650203658e-01\n1.17855250288151109e-01\n-1.14783677514495707e-02\n-1.38996567605489091e-01\n-9.82317095374270061e-02\n8.24511797364262944e-02\n1.60046575157580750e-01\n-4.90594349685660042e-03\n-1.80071037649021520e-01\n-5.76164120230981264e-02\n1.88912606081319046e-01\n9.59747628277792392e-02\n-2.14967528586840706e-01\n-1.17998153898112995e-01\n2.85643106761510723e-01\n2.72816576731297500e-01\n0.0\n4.85989842072607808e-04\n1.88223056477318279e-03\n4.44791075043919279e-03\n8.36790594859013713e-03\n1.37395584630785154e-02\n2.05318016314346048e-02\n2.85249213102325878e-02\n3.72396900772411568e-02\n4.58708017830668432e-02\n5.32487643975123395e-02\n5.78644684070720033e-02\n5.79976611045491738e-02\n5.19882340822410277e-02\n3.86692021139077580e-02\n1.79341852504134661e-02\n-8.66346043366590310e-03\n-3.74792614616444586e-02\n-6.28011173788040888e-02\n-7.76378904861200481e-02\n-7.54667345856792765e-02\n-5.28111503947663249e-02\n-1.19959687928146673e-02\n3.71640730673019684e-02\n7.83102849024160802e-02\n9.32819693601395217e-02\n7.03009441913066829e-02\n1.27512394906222903e-02\n-5.66989953253121265e-02\n-1.02167779336080164e-01\n-9.24166842643108638e-02\n-2.37849158123483659e-02\n6.71812569481718136e-02\n1.17678402199023563e-01\n8.11571160191020546e-02\n-2.63414595961595360e-02\n-1.20052897346130449e-01\n-1.07744831975228855e-01\n1.54516246670167844e-02\n1.33270500952502063e-01\n1.07845320210912490e-01\n-5.29928907601764365e-02\n-1.60224921089047762e-01\n-5.51418678359539005e-02\n1.42737283787204489e-01\n1.39108557353755602e-01\n-9.59413916290751678e-02\n-1.93994203005206978e-01\n5.18568155421551061e-02\n2.41360942637660836e-01\n-1.29281582957562168e-02\n-3.28293420445022077e-01\n-2.20224439164204089e-01\n1.20281418618067241e-02\n2.08333528252953558e-02\n2.68521090516251996e-02\n3.15653310917219515e-02\n3.52074218902472674e-02\n3.76386944890105962e-02\n3.85029982103683513e-02\n3.72975572547588827e-02\n3.34447262994743005e-02\n2.63957629880776506e-02\n1.57807025580979920e-02\n1.60550679066346139e-03\n-1.55209048259289072e-02\n-3.41735994169834190e-02\n-5.19884629431265344e-02\n-6.57340260410642224e-02\n-7.16935168074420426e-02\n-6.64401989638580825e-02\n-4.79901983418945383e-02\n-1.71396015295747321e-02\n2.14413287963812656e-02\n5.89953125517600346e-02\n8.40283834292792631e-02\n8.55984046895909151e-02\n5.81341720831877393e-02\n6.20601720068892585e-03\n-5.34312761010000137e-02\n-9.53742644707409881e-02\n-9.58327202266201911e-02\n-4.68891171069230894e-02\n3.27140515739426305e-02\n1.00009886597370479e-01\n1.08922325296103018e-01\n4.32032536115659338e-02\n-6.05157277490232237e-02\n-1.25458996956454544e-01\n-8.96144551863165967e-02\n3.08257089136681726e-02\n1.32428897570977810e-01\n1.06826207345137453e-01\n-3.84664938743067841e-02\n-1.52868761847682166e-01\n-8.92046903177316219e-02\n9.82161960939412493e-02\n1.69201410657723345e-01\n-5.18097222625851588e-04\n-1.90370858508332713e-01\n-9.55863371920634142e-02\n1.77104439134479680e-01\n1.86381992561228060e-01\n-1.40540991975620033e-01\n-3.33315014329183201e-01\n-1.69982840363785137e-01\n0.0\n4.82548157817235912e-04\n1.86890097896922291e-03\n4.41688093812511295e-03\n8.31237195255919194e-03\n1.36586937390162349e-02\n2.04396530630956558e-02\n2.84641172714733028e-02\n3.72997023692951540e-02\n4.62083046737700731e-02\n5.41041667215605149e-02\n5.95641654860313077e-02\n6.09269979898836786e-02\n5.65178951462511972e-02\n4.50215271782824639e-02\n2.59905271042192472e-02\n4.16152573846797211e-04\n-2.87947367011701996e-02\n-5.66760223721243517e-02\n-7.66757379994918720e-02\n-8.19743360807108773e-02\n-6.76574358547734345e-02\n-3.33473334955385059e-02\n1.46256168908195077e-02\n6.28557724698357301e-02\n9.36097534808539161e-02\n9.11232913575428516e-02\n5.00333048056251853e-02\n-1.77930514671021979e-02\n-8.32203930145289511e-02\n-1.10475332114116337e-01\n-7.70162351591332645e-02\n6.82964103804941693e-03\n9.37211277250874636e-02\n1.22177890393577987e-01\n6.08283102320069380e-02\n-5.51526597115742645e-02\n-1.34110945048486419e-01\n-9.72050400131315856e-02\n3.80246811471841861e-02\n1.46549938207503228e-01\n1.04216945812353287e-01\n-6.38965269968326116e-02\n-1.70566145987230217e-01\n-6.66236073811518892e-02\n1.40756167300462309e-01\n1.71313694438788910e-01\n-5.18521542904049962e-02\n-2.29428957897849450e-01\n-7.32115908360688322e-02\n2.39314352506236477e-01\n3.08551127541355164e-01\n1.25639702585160717e-01\n1.24288388554979288e-02\n2.15273803768086282e-02\n2.77502144644858548e-02\n3.26380159822466376e-02\n3.64520330115385080e-02\n3.90763243126337687e-02\n4.01795395088155316e-02\n3.92828624737296683e-02\n3.58252437282392186e-02\n2.92556292246378934e-02\n1.91663633367587967e-02\n5.47091550494613072e-03\n-1.13861787936521998e-02\n-3.02212787514430890e-02\n-4.89672151114105905e-02\n-6.46814911366439954e-02\n-7.38110111185288492e-02\n-7.28014050429852816e-02\n-5.90713589807331796e-02\n-3.22381771147831134e-02\n4.71257781716959232e-03\n4.48246042697413166e-02\n7.77588529457180350e-02\n9.20685538206502119e-02\n7.91551103180767046e-02\n3.79996148608504405e-02\n-2.12976360209886813e-02\n-7.77917758760500455e-02\n-1.05845645214110148e-01\n-8.68333197184631006e-02\n-2.21315745156745666e-02\n6.05097319036653480e-02\n1.15236578574227325e-01\n1.02653956028599835e-01\n2.00917001621946784e-02\n-8.42490900926307767e-02\n-1.33502578064218974e-01\n-7.84044292251257213e-02\n4.96911266255357989e-02\n1.43861473008619373e-01\n1.06359236046806971e-01\n-4.48120630319864197e-02\n-1.62074454922016303e-01\n-1.04556120776093581e-01\n8.61810286803760539e-02\n1.89482007217343318e-01\n5.39906378068992221e-02\n-1.75075085242475170e-01\n-1.93282460622864111e-01\n6.10677745188892354e-02\n2.95815590843910348e-01\n2.64662407984398496e-01\n8.89924399727858306e-02\n0.0\n4.77819313846411520e-04\n1.85058624502340693e-03\n4.37407292856054151e-03\n8.23469304686367046e-03\n1.35415209561281051e-02\n2.02934182269585497e-02\n2.83286878990090356e-02\n3.72637745266631987e-02\n4.64316547458155301e-02\n5.48372770065170406e-02\n6.11552778127930560e-02\n6.38019005755082330e-02\n6.11146872391558627e-02\n5.16646060873448346e-02\n3.46995924320684518e-02\n1.06713732594419328e-02\n-1.82700216300818383e-02\n-4.80052327531696049e-02\n-7.26443160026966350e-02\n-8.54304871305458929e-02\n-8.04530562992974430e-02\n-5.49854542584376771e-02\n-1.18389082628854031e-02\n3.93161309550054960e-02\n8.29103061166449884e-02\n1.01603399823653726e-01\n8.32919010675793603e-02\n2.88298000670016430e-02\n-4.35585663059801578e-02\n-1.01658783672896907e-01\n-1.12520462939902463e-01\n-6.19990726287035221e-02\n2.98378970620640088e-02\n1.10913682232467684e-01\n1.24057986554573313e-01\n4.87916589127450548e-02\n-7.07368158037728900e-02\n-1.43399928784195163e-01\n-9.86424517187321076e-02\n4.07323322412202204e-02\n1.54170807438729351e-01\n1.21615202824220253e-01\n-4.48584836363804668e-02\n-1.79240101393175394e-01\n-1.19118545084606023e-01\n9.37248993403098918e-02\n2.19739876358430397e-01\n8.78956199928253995e-02\n-1.80305131446251266e-01\n-3.09018414260568641e-01\n-2.12303664671757819e-01\n-6.04207723317700673e-02\n1.28684788916069975e-02\n2.22888592563909513e-02\n2.87355999581436622e-02\n3.38149223721070161e-02\n3.78175164906827052e-02\n4.06535611589354251e-02\n4.20192836239617271e-02\n4.14633036694247725e-02\n3.84455564576632117e-02\n3.24180966932473488e-02\n2.29418654081236309e-02\n9.84411863995605929e-03\n-6.59103492872837107e-03\n-2.54243314604013504e-02\n-4.49036733915361905e-02\n-6.24199323048309149e-02\n-7.46664041987660232e-02\n-7.80884525401296103e-02\n-6.96680584981231033e-02\n-4.79930210947438277e-02\n-1.44103462396796087e-02\n2.61166641418241093e-02\n6.49718665360092817e-02\n9.11940756617211357e-02\n9.43845238911795448e-02\n6.88581812984280645e-02\n1.78041832137499356e-02\n-4.46059568742142309e-02\n-9.54231915601996827e-02\n-1.10627874935914916e-01\n-7.69074228149262268e-02\n-2.57154090089695489e-03\n7.97630568957635178e-02\n1.24720601462967623e-01\n9.90072705556766242e-02\n7.81987747085688759e-03\n-9.68038689851857814e-02\n-1.40951955248534655e-01\n-8.12238633976759550e-02\n4.98218955281922241e-02\n1.50599417350455983e-01\n1.25361240749024383e-01\n-2.11982389784560708e-02\n-1.62113288036012104e-01\n-1.50867973175061093e-01\n2.36716956909089477e-02\n1.94719271636698055e-01\n1.71994084251493123e-01\n-4.68398150886141992e-02\n-2.60135498657282027e-01\n-2.87162477828302121e-01\n-1.60158037297960271e-01\n-3.93153463628660577e-02\n0.0\n4.71701741073906168e-04\n1.82689298755628164e-03\n4.31855250603927713e-03\n8.13308365438552248e-03\n1.33850066911382834e-02\n2.00882823555795578e-02\n2.81112878457340926e-02\n3.71209708579662706e-02\n4.65248826109829969e-02\n5.54252976922828197e-02\n6.26063283771034484e-02\n6.65811192455492695e-02\n6.57289694034468852e-02\n5.85473560863741666e-02\n4.40262703307132755e-02\n2.21176198239847674e-02\n-5.78024567777590641e-03\n-3.64670535042668428e-02\n-6.49158104347041104e-02\n-8.47988003593900114e-02\n-8.97213643294356988e-02\n-7.51366209398065948e-02\n-4.06007012310072996e-02\n8.35877887901195250e-03\n5.97970847458089982e-02\n9.73556729733291437e-02\n1.05156868030030270e-01\n7.47699400616858578e-02\n1.17519536229881809e-02\n-6.20376816438815426e-02\n-1.13892751401483444e-01\n-1.14198395356760338e-01\n-5.43281673436545043e-02\n4.13896858933032047e-02\n1.20788091764278516e-01\n1.30365313201300320e-01\n5.27980922190446761e-02\n-6.95274775301684966e-02\n-1.50676493100511288e-01\n-1.19711666706996150e-01\n1.42234563078124827e-02\n1.49220569832278604e-01\n1.62446940189345607e-01\n2.36074258738281882e-02\n-1.54845911442067941e-01\n-2.03247617550609383e-01\n-5.70044557924692039e-02\n1.69231463364293150e-01\n2.92100901417455650e-01\n2.43090794770502466e-01\n1.14013097374317224e-01\n2.45062417003625403e-02\n1.33588137197734914e-02\n2.31381440914958728e-02\n2.98345538146511102e-02\n3.51272050072215375e-02\n3.93393417174034699e-02\n4.24099439129489095e-02\n4.40658710805825679e-02\n4.38869999988506926e-02\n4.13591578569985699e-02\n3.59437697483255339e-02\n2.71780319830757545e-02\n1.48114274395359305e-02\n-1.02518886176952142e-03\n-1.96356119707536414e-02\n-3.95956447219646332e-02\n-5.86689780432492619e-02\n-7.38764483645386189e-02\n-8.17981100567252845e-02\n-7.91658584445152635e-02\n-6.37429198082491155e-02\n-3.53784143445922614e-02\n3.01999730165650529e-03\n4.49973317622582442e-02\n8.10218729550533368e-02\n1.00296353046131020e-01\n9.39407845371030281e-02\n5.89554105426374209e-02\n1.61091112031412978e-03\n-6.16502648620082111e-02\n-1.07585052781723436e-01\n-1.14295966427211654e-01\n-7.21927505730040192e-02\n7.04048029687594137e-03\n8.97915404293069680e-02\n1.32587579905478842e-01\n1.04986924846474969e-01\n1.26310510931632713e-02\n-9.59151918039665846e-02\n-1.50651105646277456e-01\n-1.05145550796642923e-01\n2.18325528690513845e-02\n1.44390070851291741e-01\n1.63707166287435757e-01\n4.91448225405010652e-02\n-1.20298590663892355e-01\n-2.05303716829684818e-01\n-1.21546761711782220e-01\n7.93980683245789354e-02\n2.50488498040262131e-01\n2.81573918444009585e-01\n1.89876000521747218e-01\n7.67451465479245948e-02\n1.46217179628928932e-02\n0.0\n4.63984056626678845e-04\n1.79700252422088612e-03\n4.24837944127820413e-03\n8.00385971064665816e-03\n1.31829789714701731e-02\n1.98146805913023485e-02\n2.77978291800738235e-02\n3.68512463605585941e-02\n4.64601899146356578e-02\n5.58305577147613294e-02\n6.38676175348538433e-02\n6.92015274811000475e-02\n7.02852591298681467e-02\n6.55886777015745326e-02\n5.39015757729195480e-02\n3.47345727173005853e-02\n8.76800110269671321e-03\n-2.17521961002158648e-02\n-5.28255022446843595e-02\n-7.89027963179727149e-02\n-9.36597587548469723e-02\n-9.14112418133320448e-02\n-6.90356466627716492e-02\n-2.79818949712134883e-02\n2.43818598272882957e-02\n7.49996136490876791e-02\n1.07708017497402428e-01\n1.08275392340973706e-01\n7.08366850914176199e-02\n3.29467366301684512e-03\n-7.15993695611670117e-02\n-1.22195125395389154e-01\n-1.20978816677569642e-01\n-6.03993145034752849e-02\n3.69059607004676368e-02\n1.22494277820253197e-01\n1.44495360518228533e-01\n7.99921006088827324e-02\n-4.18997420399477641e-02\n-1.47100474666776809e-01\n-1.59377118892962383e-01\n-5.70064246950075099e-02\n9.89381775568348582e-02\n1.96843083220489767e-01\n1.54958962948277518e-01\n-1.05981652248193572e-02\n-1.93281786689672441e-01\n-2.80665787979079984e-01\n-2.42102113191080659e-01\n-1.37865684269665306e-01\n-4.88959822724275919e-02\n-8.34198631067423202e-03\n1.39155380313389851e-02\n2.41024188849361144e-02\n3.10821877843265766e-02\n3.66164908030231356e-02\n4.10649434286316506e-02\n4.43984410751519232e-02\n4.63779258358458443e-02\n4.66188276012364858e-02\n4.46384453358239924e-02\n3.99148677453850312e-02\n3.19708257181542249e-02\n2.04889841811378114e-02\n5.45787828901519046e-03\n-1.26627339909465703e-02\n-3.27826040467241314e-02\n-5.30703474634593303e-02\n-7.09502934553356696e-02\n-8.32748784827727490e-02\n-8.67332798171550762e-02\n-7.85223192517330859e-02\n-5.72352596511996117e-02\n-2.38182238616969078e-02\n1.76803946998429634e-02\n5.99442800576081153e-02\n9.31991745175140829e-02\n1.07243081528798592e-01\n9.45785240490761708e-02\n5.39710769228992013e-02\n-6.84609335076231430e-03\n-7.09570217984525353e-02\n-1.15893869025996660e-01\n-1.21265269085671756e-01\n-7.84769462297344733e-02\n1.56553683052066480e-03\n8.79007665078936490e-02\n1.39587138642070674e-01\n1.25004239148391594e-01\n4.23074529043621639e-02\n-7.16034147293420076e-02\n-1.53948441919463053e-01\n-1.49861221895514707e-01\n-5.03090075563540906e-02\n9.22184257769544796e-02\n1.88404998533794582e-01\n1.68558732091704883e-01\n3.35404440363476289e-02\n-1.41332460843070384e-01\n-2.58320155947279917e-01\n-2.66249050724647274e-01\n-1.89203946611252671e-01\n-9.34574790641471698e-02\n-2.94926235059171510e-02\n-4.54464755665073047e-03\n0.0\n4.54351650741556101e-04\n1.75969637664389537e-03\n4.16066715042146939e-03\n7.84154710960366201e-03\n1.29262915440869069e-02\n1.94585048784201367e-02\n2.73676773441339644e-02\n3.64255089724685732e-02\n4.61976483691189099e-02\n5.59994681273043513e-02\n6.48688592905980743e-02\n7.15736299522877345e-02\n7.46745541302426125e-02\n7.26653052235740893e-02\n6.42046059666531721e-02\n4.84408851791829909e-02\n2.54032994466501343e-02\n-3.60459840199438405e-03\n-3.57160094505862627e-02\n-6.64623769679154874e-02\n-9.01434537217745968e-02\n-1.00726384661152191e-01\n-9.32824799352858225e-02\n-6.57764409749486967e-02\n-2.07717606320416137e-02\n3.36177953201843016e-02\n8.42913536995975321e-02\n1.15796410878607425e-01\n1.14989976084716602e-01\n7.67105301516629728e-02\n8.39427908704482376e-03\n-6.90226189526204070e-02\n-1.26047781597711073e-01\n-1.35496032290673335e-01\n-8.60711220978597480e-02\n7.65658286904772386e-03\n1.05977592600330808e-01\n1.59105857005513607e-01\n1.32571674302891462e-01\n3.05128184783528926e-02\n-9.88166175411799436e-02\n-1.84034216071083501e-01\n-1.70598518965792451e-01\n-5.62130924066971960e-02\n1.04110364760842969e-01\n2.30901860969892819e-01\n2.70030061657958120e-01\n2.22992996920985342e-01\n1.35785748874005102e-01\n5.92881799810617699e-02\n1.68333073638182833e-02\n2.36023743829664404e-03\n1.45616138331549402e-02\n2.52214549992221468e-02\n3.25298703916453644e-02\n3.83436730097200876e-02\n4.30636904937690065e-02\n4.66964659381012698e-02\n4.90410215096153262e-02\n4.97532659488883963e-02\n4.83884028605464644e-02\n4.44497413342970354e-02\n3.74567688028092927e-02\n2.70392825214911293e-02\n1.30589509657085528e-02\n-4.24776749570978003e-03\n-2.41217949097731060e-02\n-4.51581340847931889e-02\n-6.52503097632226026e-02\n-8.16564560005852980e-02\n-9.12425213630603527e-02\n-9.09427848723645404e-02\n-7.84381785811555238e-02\n-5.29848367078079030e-02\n-1.62335206961688010e-02\n2.72160702153592046e-02\n6.98472175057003042e-02\n1.02147770322023240e-01\n1.14571413605069353e-01\n1.00371165948692054e-01\n5.86886515954249677e-02\n-3.17191421523199419e-03\n-6.95921016820731514e-02\n-1.19664539503849796e-01\n-1.33520066443435975e-01\n-1.00549644442220545e-01\n-2.64703459288551345e-02\n6.46750888367128296e-02\n1.36585877787990861e-01\n1.54708694001815639e-01\n1.03479896009253891e-01\n-1.65753369625356922e-03\n-1.15913675828627299e-01\n-1.83368330322420836e-01\n-1.65005207124960224e-01\n-6.15598359616447016e-02\n8.39785458519392014e-02\n2.08543020768137299e-01\n2.63686626514583189e-01\n2.40481728316854798e-01\n1.68230345841372197e-01\n9.00031949720658392e-02\n3.52305363271066749e-02\n9.08165750099120504e-03\n1.16609730140625808e-03\n0.0\n4.42345796628476476e-04\n1.71319790360694238e-03\n4.05120757564006017e-03\n7.63817064713184085e-03\n1.26016369330611035e-02\n1.89992758196384018e-02\n2.67909819802021609e-02\n3.58018602672917352e-02\n4.56800303781088532e-02\n5.58555222366544646e-02\n6.55097909791853561e-02\n7.35690324007011731e-02\n7.87376625792667734e-02\n7.95896781574236961e-02\n7.47332559157491833e-02\n6.30556772595032428e-02\n4.40394698523375733e-02\n1.81156809174813950e-02\n-1.30119388835199384e-02\n-4.61717062143037552e-02\n-7.67819120314351400e-02\n-9.92851526213898300e-02\n-1.08037996529704916e-01\n-9.86326247998114553e-02\n-6.94663361778123656e-02\n-2.31807200876010776e-02\n3.25754491187282558e-02\n8.56548006682763402e-02\n1.21614759746639892e-01\n1.27579693328757904e-01\n9.70137866137289751e-02\n3.38858416315257482e-02\n-4.57636948538996252e-02\n-1.16584850985880881e-01\n-1.51467715951998733e-01\n-1.32189404899230256e-01\n-5.92052664158759234e-02\n4.44675572844357644e-02\n1.39016513343281967e-01\n1.82965066979540847e-01\n1.52028834305471289e-01\n5.23555383976595998e-02\n-8.01199431537553408e-02\n-1.95760076594516108e-01\n-2.55029808250702705e-01\n-2.46562797784325216e-01\n-1.88849813351075396e-01\n-1.15532308996750405e-01\n-5.52585800467944935e-02\n-1.96048983821099539e-02\n-4.62324790353622807e-03\n-5.46687902451114833e-04\n1.53330183364249265e-02\n2.65575667920731964e-02\n3.42580819641898279e-02\n4.04041326514184007e-02\n4.54441771066307898e-02\n4.94250631865783274e-02\n5.21886749653005660e-02\n5.34371860838063761e-02\n5.27712519409202704e-02\n4.97295509078970466e-02\n4.38419407695200200e-02\n3.47029553953133868e-02\n2.20683921650815865e-02\n5.97274116060610150e-03\n-1.31417923497692875e-02\n-3.43030568025709665e-02\n-5.59223920679833494e-02\n-7.57824723184564453e-02\n-9.11440731579796631e-02\n-9.90131634671724825e-02\n-9.65921729625246472e-02\n-8.19026562864679092e-02\n-5.45097129594015462e-02\n-1.62071730872568043e-02\n2.85474009881507423e-02\n7.27000877262925227e-02\n1.07399350740671251e-01\n1.23633264090101280e-01\n1.14576382987084197e-01\n7.81930768930311632e-02\n1.93164076753683973e-02\n-4.97646008712257504e-02\n-1.11049350312104056e-01\n-1.45176692366100812e-01\n-1.37679762925984994e-01\n-8.53137300683949468e-02\n1.51045334481073631e-04\n9.31128010341797097e-02\n1.61267742763703509e-01\n1.77093736028858001e-01\n1.29450163545582531e-01\n2.98436990881873823e-02\n-9.06067508087765455e-02\n-1.93309225346569441e-01\n-2.48244553728521972e-01\n-2.45918581362970207e-01\n-1.98958909324872063e-01\n-1.32964411141981043e-01\n-7.26179467724747674e-02\n-3.14528819120489175e-02\n-1.02034292676420803e-02\n-2.21544536644905374e-03\n-2.42455036193986050e-04\n0.0\n4.27271255634369910e-04\n1.65481445738504662e-03\n3.91362400466153341e-03\n7.38165077612200002e-03\n1.21888796824442050e-02\n1.84060614439191354e-02\n2.60227784570412207e-02\n3.49174100147779665e-02\n4.48217757968965777e-02\n5.52847263112825754e-02\n6.56411991831988562e-02\n7.49959372405738234e-02\n8.22336786009724985e-02\n8.60693976036207009e-02\n8.51519716760737455e-02\n7.82310586254485185e-02\n6.43885097523526351e-02\n4.33212129135159135e-02\n1.56418280797654373e-02\n-1.68606116729551163e-02\n-5.10820022502594534e-02\n-8.26829648696764535e-02\n-1.06478572808910030e-01\n-1.17192485716249684e-01\n-1.10552856978767655e-01\n-8.45914561716288316e-02\n-4.08705765141191904e-02\n1.47566132750239134e-02\n7.22897284719980632e-02\n1.18970122066452300e-01\n1.41978226566588261e-01\n1.32055722437977363e-01\n8.71551266763993387e-02\n1.48329717538853070e-02\n-6.79118096936584398e-02\n-1.38103490451576910e-01\n-1.73195136829544682e-01\n-1.58674999713860010e-01\n-9.40905567304242962e-02\n5.32726754191308743e-03\n1.12896658101493713e-01\n1.99565758145896305e-01\n2.44331524147382351e-01\n2.41390473719625104e-01\n2.00685757782135904e-01\n1.41797140636596458e-01\n8.46298498312607062e-02\n4.18655839088086026e-02\n1.65844359937457365e-02\n4.95505236902700572e-03\n9.96098916003385721e-04\n1.01337233568201139e-04\n1.62908070642105995e-02\n2.82165055315147378e-02\n3.64033937478201175e-02\n4.29596851939516092e-02\n4.83905165539666587e-02\n5.27891876016547273e-02\n5.60464293853315532e-02\n5.79177165600884211e-02\n5.80582418389932742e-02\n5.60543083145280743e-02\n5.14628280504239866e-02\n4.38652893135439773e-02\n3.29395962129922434e-02\n1.85500436941534314e-02\n8.51413089132917926e-04\n-1.96025789307206350e-02\n-4.17632978494727400e-02\n-6.40280318943928922e-02\n-8.42484032476085443e-02\n-9.98398157628932748e-02\n-1.08021179756603691e-01\n-1.06199518036114396e-01\n-9.24864218610004646e-02\n-6.62926004034535138e-02\n-2.88972970807897314e-02\n1.61584090016618671e-02\n6.30344183715111223e-02\n1.04079290505142807e-01\n1.30939570733935612e-01\n1.36244964881404668e-01\n1.15622552202713211e-01\n6.95776356611170210e-02\n4.62507486933070276e-03\n-6.69427489919430518e-02\n-1.29028875175161539e-01\n-1.65339353914960130e-01\n-1.63883423348767682e-01\n-1.21052670974089505e-01\n-4.37456051798751494e-02\n5.16259392261144007e-02\n1.43419464071923908e-01\n2.11174782825142154e-01\n2.41903992547595259e-01\n2.33772441380125151e-01\n1.95627793024287872e-01\n1.42654257831639847e-01\n9.02343377743149849e-02\n4.88577045154361053e-02\n2.21305068667445246e-02\n8.08168042623386498e-03\n2.23742045586590617e-03\n4.18444561974102528e-04\n3.97301169754753409e-05\n0.0\n4.07998465489745402e-04\n1.58017126211996550e-03\n3.73755751832573289e-03\n7.05237282044083712e-03\n1.16553543521052752e-02\n1.76287635588514568e-02\n2.49904241861734384e-02\n3.36709032348261744e-02\n4.34856919322798019e-02\n5.41050381103287056e-02\n6.50254590729312937e-02\n7.55487151556072378e-02\n8.47759014538864153e-02\n9.16259295406879060e-02\n9.48884425141146293e-02\n9.33203630975945470e-02\n8.57919184113043881e-02\n7.14812608528949400e-02\n5.01061891327115871e-02\n2.21671910143550442e-02\n-1.08404588810748301e-02\n-4.63033661320576412e-02\n-8.05228866802216725e-02\n-1.08968834169642106e-01\n-1.26796683989626874e-01\n-1.29625043916387683e-01\n-1.14500773390271066e-01\n-8.08951945537969841e-02\n-3.14960441849091791e-02\n2.74842337923480728e-02\n8.67388769359899725e-02\n1.35171961948322511e-01\n1.61998223089350690e-01\n1.59279634970604211e-01\n1.24281119890711403e-01\n6.08965994933921978e-02\n-2.05010040387993975e-02\n-1.05051151459308989e-01\n-1.76909644446719888e-01\n-2.23321184709622145e-01\n-2.37950472419439951e-01\n-2.22277019739375720e-01\n-1.84507526566067781e-01\n-1.36426264330342134e-01\n-8.94549690261211700e-02\n-5.14838551162750818e-02\n-2.55786537411109190e-02\n-1.06983453069531137e-02\n-3.62504907900987458e-03\n-9.34776277155156040e-04\n-1.63334833749730909e-04\n-1.45252984717979590e-05\n1.75505929837262847e-02\n3.03985187507757812e-02\n3.92243962963895743e-02\n4.63166403467385121e-02\n5.22510010086132889e-02\n5.71760497119549738e-02\n6.10393949920266660e-02\n6.36588477110915235e-02\n6.47555412379896556e-02\n6.39786704371543419e-02\n6.09330965545182013e-02\n5.52156335657352643e-02\n4.64634595728026234e-02\n3.44162143107553109e-02\n1.89910462191911593e-02\n3.66778230482004742e-04\n-2.09306216250384237e-02\n-4.39537473706886408e-02\n-6.72879021379306358e-02\n-8.90548157181165617e-02\n-1.06988536720661109e-01\n-1.18603350649962358e-01\n-1.21464728835143851e-01\n-1.13558026598935921e-01\n-9.37258863354121508e-02\n-6.21162426812086818e-02\n-2.05536274123892526e-02\n2.72745466556440011e-02\n7.59272676706355815e-02\n1.18698217022803129e-01\n1.48503582008285118e-01\n1.59093531029778384e-01\n1.46397292263149820e-01\n1.09709843637952179e-01\n5.23788599068579219e-02\n-1.83071610686607530e-02\n-9.21742827165680234e-02\n-1.58056348352290071e-01\n-2.06136373044955828e-01\n-2.30128791199416372e-01\n-2.28649502581993291e-01\n-2.05308966091212575e-01\n-1.67458486207527568e-01\n-1.23989835163437714e-01\n-8.29372883849383291e-02\n-4.96875724897860582e-02\n-2.63201759196846144e-02\n-1.21032811660437660e-02\n-4.70608722504987746e-03\n-1.48766610354171287e-03\n-3.58915690028623557e-04\n-5.88140692576820102e-05\n-4.91467595410212205e-06\n0.0\n3.82484772973788268e-04\n1.48135715590540663e-03\n3.50427789878353466e-03\n6.61488561793805840e-03\n1.09420747529196723e-02\n1.65770603228321337e-02\n2.35632778980069194e-02\n3.18808785933460195e-02\n4.14270024046664992e-02\n5.19932780773326442e-02\n6.32426787466886242e-02\n7.46888152573010194e-02\n8.56818608307556850e-02\n9.54064138878102791e-02\n1.02897482203872320e-01\n1.07081078175589914e-01\n1.06845233045407537e-01\n1.01145105961778767e-01\n8.91418658866823116e-02\n7.03689313636085140e-02\n4.49111113444441018e-02\n1.35729331757706954e-02\n-2.19965273469450232e-02\n-5.92613520898724877e-02\n-9.48787968832627143e-02\n-1.24933343230203123e-01\n-1.45337235323892117e-01\n-1.52378964157048546e-01\n-1.43361254160632806e-01\n-1.17228316392159110e-01\n-7.50496781857872136e-02\n-2.02184932781204335e-02\n4.17516082509735639e-02\n1.03879336275893880e-01\n1.58763095025647699e-01\n1.99850082246829042e-01\n2.22657169036186459e-01\n2.25636646873865115e-01\n2.10432936175674073e-01\n1.81422415719672409e-01\n1.44633590976344234e-01\n1.06341581379671979e-01\n7.17410755564351355e-02\n4.40711496404753503e-02\n2.43952615511288003e-02\n1.19968703018860680e-02\n5.14120250607490170e-03\n1.86878707102836332e-03\n5.53687206478489010e-04\n1.25471818939250254e-04\n1.93470987409310433e-05\n1.52360966410604410e-06\n1.93712092930531793e-02\n3.35519186996184951e-02\n4.32999827340772928e-02\n5.11605429256289934e-02\n5.78046383570448366e-02\n6.34505932091463665e-02\n6.81150126052572080e-02\n7.16908073123631862e-02\n7.39804835908487168e-02\n7.47162968337687083e-02\n7.35784263044519937e-02\n7.02164280578920358e-02\n6.42770243483374581e-02\n5.54400840134954345e-02\n4.34635597825850026e-02\n2.82368176528893650e-02\n9.84006492010933154e-03\n-1.13945679965024409e-02\n-3.48272015550595421e-02\n-5.94690529531218051e-02\n-8.39674598409890782e-02\n-1.06629617778382160e-01\n-1.25496757683648902e-01\n-1.38477045150158601e-01\n-1.43538797697291914e-01\n-1.38955552051232112e-01\n-1.23581723580563588e-01\n-9.71237981340269674e-02\n-6.03600590755969321e-02\n-1.52555947313567867e-02\n3.50771665948217889e-02\n8.66057011614764366e-02\n1.34795539771438655e-01\n1.75181578751399558e-01\n2.04010909646373834e-01\n2.18840280865165410e-01\n2.18957943905119190e-01\n2.05518684710979838e-01\n1.81335075700701176e-01\n1.50348549185133018e-01\n1.16889919027951789e-01\n8.49024220618991299e-02\n5.73157740199195589e-02\n3.57159024758661112e-02\n2.03629174378006338e-02\n1.05017255474243749e-02\n4.82696780482053112e-03\n1.93853884139215198e-03\n6.61824743048211920e-04\n1.84520141312408744e-04\n3.94115049876545362e-05\n5.73574834059172494e-06\n4.26833939288386938e-07\n0.0\n3.46330229668792284e-04\n1.34133121179542242e-03\n3.17344462801442007e-03\n5.99286612801301459e-03\n9.92215924526088783e-03\n1.50569688755190396e-02\n2.14614597407196059e-02\n2.91599794787229735e-02\n3.81256991793096911e-02\n4.82669050886969514e-02\n5.94118135997575708e-02\n7.12931422142099452e-02\n8.35341376026335902e-02\n9.56382869498970944e-02\n1.06985450118175951e-01\n1.16837547802594158e-01\n1.24357091858648308e-01\n1.28641587507644678e-01\n1.28776000715798089e-01\n1.23903914034780516e-01\n1.13315601633132729e-01\n9.65480740851979991e-02\n7.34883991709237155e-02\n4.44677631529221545e-02\n1.03305293583356179e-02\n-2.75390658032885587e-02\n-6.72489117322200014e-02\n-1.06501461051284774e-01\n-1.42769743350162820e-01\n-1.73537838568660868e-01\n-1.96582280462137743e-01\n-2.10256989839012781e-01\n-2.13734646515498450e-01\n-2.07155743520294422e-01\n-1.91645829437750770e-01\n-1.69182261130695788e-01\n-1.42321441178023783e-01\n-1.13829703048147310e-01\n-8.62869204729314471e-02\n-6.17426915758357286e-02\n-4.14949750009135782e-02\n-2.60309388214010895e-02\n-1.51274354738139116e-02\n-8.06728462762399193e-03\n-3.90146773597044695e-03\n-1.68522250149850993e-03\n-6.37201123087097481e-04\n-2.05143659485024286e-04\n-5.40098649526867897e-05\n-1.09065721016124322e-05\n-1.50225675334342520e-06\n-1.05899597792620473e-07\n2.25333184539953726e-02\n3.90288524254493660e-02\n5.03760342117312090e-02\n5.95584101835808649e-02\n6.73987894010213556e-02\n7.42158717651386357e-02\n8.01183223560485852e-02\n8.50961293187278145e-02\n8.90577453067133845e-02\n9.18488803798370307e-02\n9.32648797719508177e-02\n9.30617052172859893e-02\n9.09680955471573044e-02\n8.67004375149739159e-02\n7.99812870593890751e-02\n7.05619960724245265e-02\n5.82493708895105711e-02\n4.29356497820595553e-02\n2.46303206668774151e-02\n3.49143345893610391e-03\n-2.01468328085750784e-02\n-4.57543857663896200e-02\n-7.25977838291246291e-02\n-9.97497608939384856e-02\n-1.26119668861453593e-01\n-1.50507253263154478e-01\n-1.71679661152884022e-01\n-1.88468172096053876e-01\n-1.99877158131381572e-01\n-2.05193800124040676e-01\n-2.04083942076966701e-01\n-1.96658112512532374e-01\n-1.83493076306572189e-01\n-1.65598849337517090e-01\n-1.44328818044283713e-01\n-1.21240500906716897e-01\n-9.79247255843001541e-02\n-7.58291081756774232e-02\n-5.61052044967562391e-02\n-3.95058161233920804e-02\n-2.63494864157753014e-02\n-1.65550171016628118e-02\n-9.73346312384930010e-03\n-5.31292985232957073e-03\n-2.66631987666373759e-03\n-1.21548755293631795e-03\n-4.95622380967039415e-04\n-1.77132852841578429e-04\n-5.39636591484264855e-05\n-1.34576996626200990e-05\n-2.57645542347375992e-06\n-3.36706145644384279e-07\n-2.25355267279543939e-08\n0.0\n2.86208283509730701e-04\n1.10847991557979806e-03\n2.62288927625675726e-03\n4.95526498955090912e-03\n8.21182904215267580e-03\n1.24826474099769252e-02\n1.78418015581057500e-02\n2.43455325494278604e-02\n3.20288835939471078e-02\n4.09011482087341879e-02\n5.09403907620303159e-02\n6.20873487094102464e-02\n7.42391165005934633e-02\n8.72431321029650542e-02\n1.00892123445886120e-01\n1.14920806235312062e-01\n1.29005233681649178e-01\n1.42765753901787057e-01\n1.55774498256514460e-01\n1.67568167801159656e-01\n1.77666572848447862e-01\n1.85596891078367104e-01\n1.90922942550235092e-01\n1.93277967183773325e-01\n1.92398504888642019e-01\n1.88156139626862340e-01\n1.80583237385783496e-01\n1.69888570963547147e-01\n1.56459062560021706e-01\n1.40844918565560612e-01\n1.23727206058996231e-01\n1.05869301229686283e-01\n8.80563200269328245e-02\n7.10291473210184626e-02\n5.54214395072603824e-02\n4.17084379636033092e-02\n3.01752348146027277e-02\n2.09092609483015265e-02\n1.38176437327673634e-02\n8.66555121144415089e-03\n5.12778756945208528e-03\n2.84375878147032557e-03\n1.46610810184277969e-03\n6.95781871311570662e-04\n3.00268717341958477e-04\n1.16019708652430223e-04\n3.93261292486768205e-05\n1.13717113935403706e-05\n2.69366248270445380e-06\n4.90134860479486938e-07\n6.09125505307252019e-08\n3.87882167183901384e-09\n3.20972079661343487e-02\n5.55939949784492043e-02\n7.17687235020129238e-02\n8.49045739374738456e-02\n9.62349700232075500e-02\n1.06308287739941137e-01\n1.15410616698220350e-01\n1.23698571636737004e-01\n1.31253341921589078e-01\n1.38106555657051489e-01\n1.44254302579301386e-01\n1.49665714284639789e-01\n1.54288988825312112e-01\n1.58056320873182082e-01\n1.60888548549115329e-01\n1.62699993385730934e-01\n1.63403768318944181e-01\n1.62917680490860778e-01\n1.61170724076258876e-01\n1.58110026748733645e-01\n1.53707976972732530e-01\n1.47969121724908503e-01\n1.40936296370546582e-01\n1.32695347347757897e-01\n1.23377755906770289e-01\n1.13160491426348084e-01\n1.02262537876166765e-01\n9.09377615025863256e-02\n7.94641227163752628e-02\n6.81296615287387552e-02\n5.72161608137830222e-02\n4.69818482313601044e-02\n3.76448508115858615e-02\n2.93692759914817580e-02\n2.22556839436516204e-02\n1.63373006692617943e-02\n1.15826204013687439e-02\n7.90414998732566314e-03\n5.17211180677636974e-03\n3.23113772430899844e-03\n1.91753918237664613e-03\n1.07475087120120294e-03\n5.65033371274307030e-04\n2.76373930306334143e-04\n1.24529981565147752e-04\n5.10594084780843042e-05\n1.87557228092743708e-05\n6.04739630958521756e-06\n1.66427623070230917e-06\n3.75371594975731945e-07\n6.50636785118499293e-08\n7.70550700438403871e-09\n4.67749455666491281e-10\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.08472742381388542e-03\n-4.20113124760565244e-03\n-9.90251969648426981e-03\n-1.84771170763622303e-02\n-2.97864244518314635e-02\n-4.29935124003884145e-02\n-5.62502048776087268e-02\n-6.64805016337743915e-02\n-6.94951639769335328e-02\n-6.07489836031443048e-02\n-3.70087187849701890e-02\n1.10930973807619473e-03\n4.64683006843350233e-02\n8.43432667407494757e-02\n9.54507151085634137e-02\n6.49196479072799287e-02\n-4.37546628453371750e-03\n-8.19387104591041138e-02\n-1.16402125826386982e-01\n-6.80514713575707669e-02\n4.51112437681951625e-02\n1.31643108854483243e-01\n9.06119505406491887e-02\n-6.35740425963955968e-02\n-1.55664101856450132e-01\n-3.25463011982652650e-02\n1.61062963962556399e-01\n9.14113873640488572e-02\n-1.71651781820813254e-01\n-9.17992460712520608e-02\n2.26861122079491717e-01\n-2.74638834186305171e-02\n-2.38715686972268110e-01\n3.27133758028667565e-01\n-2.52461693632194173e-01\n1.37970366908697711e-01\n-5.77226737959510572e-02\n1.91900278708997951e-02\n-5.17285234812659821e-03\n1.14295039404465238e-03\n-2.07983783328855249e-04\n3.11689067087047306e-05\n-3.82973710685585953e-06\n3.82261697502359940e-07\n-3.05284349905734929e-08\n1.90534375715001719e-09\n-8.95713424979161803e-11\n2.98382267775662062e-12\n-6.28005580839250896e-14\n6.28036983473509968e-16\n0.0\n0.0\n0.0\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n-3.20283468138268617e-14\n0.0\n0.0\n0.0\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n8.08445165689827342e-13\n-1.63282067007192764e-14\n0.0\n0.0\n-1.49153584618682711e-02\n-2.58341586690582249e-02\n-3.32116220033397275e-02\n-3.86332886759592903e-02\n-4.19352060972968538e-02\n-4.22859974032437497e-02\n-3.84603343591977051e-02\n-2.91354456526192324e-02\n-1.33735769422542814e-02\n8.66375493142438995e-03\n3.48542512856124601e-02\n6.03977488262971221e-02\n7.77935527381269643e-02\n7.82387419341021156e-02\n5.50015082023348201e-02\n8.46471169411793130e-03\n-4.91546484099385228e-02\n-9.33789301143736900e-02\n-9.58451624442848149e-02\n-4.24753634491714521e-02\n4.65584996049520153e-02\n1.13675365442407236e-01\n9.62111172949670912e-02\n-1.20719355238242849e-02\n-1.22543885941844538e-01\n-1.08867617260667501e-01\n4.32122795008925698e-02\n1.55525846583246002e-01\n4.44856381102336565e-02\n-1.56679204868117705e-01\n-9.27910168036672200e-02\n1.70832186850680245e-01\n8.35132884230644357e-02\n-2.25539034459328630e-01\n4.43192212140970654e-02\n2.19269242183260410e-01\n-3.21854692028745448e-01\n2.60382927692662802e-01\n-1.49103608459652814e-01\n6.56033227650731493e-02\n-2.30603343843918986e-02\n6.61577618876218760e-03\n-1.56781788023062688e-03\n3.08791591122133168e-04\n-5.06329993144556269e-05\n6.89739006530945087e-06\n-7.75957347905360304e-07\n7.13509751266757394e-08\n-5.27725011601396538e-09\n3.06437392918077032e-10\n-1.34576262686770477e-11\n4.20315987260463183e-13\n-8.32111971795923090e-15\n0.0\n0.0\n9.31231485683661287e-04\n3.60664403551681084e-03\n8.50602400394575263e-03\n1.59003845831766355e-02\n2.57379331178424903e-02\n3.74429022893153773e-02\n4.96727203528201863e-02\n6.01209842233804345e-02\n6.55188921569456323e-02\n6.20485584438564691e-02\n4.63832477729556533e-02\n1.74258908623226814e-02\n-2.15613643306100493e-02\n-6.13677159501424679e-02\n-8.73740714402345270e-02\n-8.39387467097887224e-02\n-4.30735753536244936e-02\n2.54205416613427181e-02\n8.96319597239925298e-02\n1.06347499921684005e-01\n5.01739831038397407e-02\n-5.32299261477481092e-02\n-1.23700123221912733e-01\n-8.28396897050736464e-02\n5.28775536891320924e-02\n1.43085570967639686e-01\n5.61977132639769339e-02\n-1.23816025006318567e-01\n-1.28765238917973951e-01\n9.31608526655434005e-02\n1.63492650510438126e-01\n-1.06861882743359851e-01\n-1.62491258203155242e-01\n1.96459220801137896e-01\n4.41807868984634908e-02\n-2.70804866571520197e-01\n3.14111437351427047e-01\n-2.26653503225050040e-01\n1.19973760107645350e-01\n-4.96384679318883706e-02\n1.65764998398732141e-02\n-4.54921289331997394e-03\n1.03647975975075567e-03\n-1.97023114024771396e-04\n3.12759943321989361e-05\n-4.13512897657961669e-06\n4.52475045531942631e-07\n-4.05416570728018729e-08\n2.92645637485853674e-09\n-1.66078551450348462e-10\n7.13697837991790340e-12\n-2.18361705890636816e-13\n4.23906791088685720e-15\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367363e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n-1.61942344080973289e-09\n8.98653833493966699e-11\n-3.78065778735820891e-12\n1.13361214079692652e-13\n0.0\n8.66426047764552840e-04\n3.35565365371242501e-03\n7.91595443084345055e-03\n1.48087344978570980e-02\n2.40121934498876630e-02\n3.50470844797404965e-02\n4.67621537451872737e-02\n5.71499205294295071e-02\n6.33170572602035214e-02\n6.17867458500721278e-02\n4.93218215401055385e-02\n2.43605773569870315e-02\n-1.11229334763186093e-02\n-5.00111894576891411e-02\n-7.99363085453404787e-02\n-8.61829356704887223e-02\n-5.84006514722374415e-02\n3.58940229482597776e-04\n6.73683490910389760e-02\n1.04547897847193039e-01\n7.88234561964185065e-02\n-7.40196344727397145e-03\n-9.89024440883244094e-02\n-1.13935536034448268e-01\n-1.85003343777213544e-02\n1.09092261688566117e-01\n1.21812489154462897e-01\n-2.46754972559791140e-02\n-1.53724638728994389e-01\n-5.40369786300429894e-02\n1.52844124485929489e-01\n9.28820650447558793e-02\n-1.70534777166068824e-01\n-7.46582530210938983e-02\n2.23693329402947061e-01\n-6.04428648778056812e-02\n-1.99685494680089226e-01\n3.15424575732289769e-01\n-2.67266406134374912e-01\n1.60001492639399556e-01\n-7.37993799662741007e-02\n2.73166714845997499e-02\n-8.29850452787542735e-03\n2.09615300256641487e-03\n-4.43432899576961322e-04\n7.88025564301311331e-05\n-1.17598018378678287e-05\n1.46840532288151399e-06\n-1.52341139845976699e-07\n1.29853215619237565e-08\n-8.94333513020322284e-10\n4.85518037701355783e-11\n-2.00053468434833568e-12\n1.38775648385790068e-02\n2.40366473857502247e-02\n3.09183376927100149e-02\n3.60490110866714675e-02\n3.93682703078595542e-02\n4.02329121179938673e-02\n3.76476647717229468e-02\n3.04822304143377576e-02\n1.78148420603557490e-02\n-5.49493293180726840e-04\n-2.34201922161792198e-02\n-4.75864693423650661e-02\n-6.75475918537050551e-02\n-7.61070536214551313e-02\n-6.63258440415182837e-02\n-3.49512535853120088e-02\n1.34896496535019863e-02\n6.41090627526219453e-02\n9.38543479864410168e-02\n8.10994027665983136e-02\n2.12923912180138231e-02\n-5.98341884996863235e-02\n-1.10030524056330112e-01\n-8.17948212773452893e-02\n1.99064348515221000e-02\n1.15539923940347122e-01\n1.02747525542275245e-01\n-2.93739623914327161e-02\n-1.40726818170620382e-01\n-7.11091388755192705e-02\n1.14989793196826451e-01\n1.32918431505758633e-01\n-8.91485417183863205e-02\n-1.61387508239882377e-01\n1.10055601699256336e-01\n1.53322920048713257e-01\n-2.00539512712531814e-01\n-2.47180274398494312e-02\n2.54306170934596121e-01\n-3.12462048980527318e-01\n2.35681063631851012e-01\n-1.30404128946312675e-01\n5.65779096716435281e-02\n-1.99041935277143658e-02\n5.78688142169003685e-03\n-1.40596016281414383e-03\n2.87177007748138670e-04\n-4.94265797874700931e-05\n7.16154736544445315e-06\n-8.70066637554330904e-07\n8.79840153153714664e-08\n-7.32143270574096396e-09\n4.92939770466701676e-10\n-2.61925496886000591e-11\n0.0\n8.08158692342989915e-04\n3.12998515653716350e-03\n7.38517565752149635e-03\n1.38253132320619240e-02\n2.24522063933630805e-02\n3.28663626386842059e-02\n4.40769909952560268e-02\n5.43310572757454632e-02\n6.10631553156686172e-02\n6.11141009965063056e-02\n5.13829153887050347e-02\n3.00123716033360022e-02\n-1.99912992041950373e-03\n-3.92489735811246479e-02\n-7.14187172436417106e-02\n-8.50885006306404817e-02\n-6.88163708641761074e-02\n-2.08639639467000648e-02\n4.38628639729669381e-02\n9.38928414426828950e-02\n9.42769126249746459e-02\n3.17951926165290777e-02\n-6.21820057924962824e-02\n-1.16966777517995002e-01\n-7.26997949296024210e-02\n4.94382434623633349e-02\n1.32194169547041884e-01\n6.57987478006277354e-02\n-9.54888521621763270e-02\n-1.38115365157589182e-01\n3.28530164553997445e-02\n1.67792257111886223e-01\n1.30048521049586953e-03\n-1.88742910765101940e-01\n2.51320701308221928e-02\n2.04395439674644047e-01\n-1.48084466485667726e-01\n-1.07469414757189574e-01\n2.90187851903803029e-01\n-2.97112519015750698e-01\n2.02734630968114227e-01\n-1.04415761976262733e-01\n4.27882747149507525e-02\n-1.43458775460581483e-02\n3.99957789848109143e-03\n-9.36072935864134593e-04\n1.84837054629292984e-04\n-3.08416262170301266e-05\n4.34251259324340908e-06\n-5.13695069484046143e-07\n5.06657853082752451e-08\n-4.11821551403110582e-09\n2.71191472114882765e-10\n1.34110082885095135e-02\n2.32285477364258114e-02\n2.98860996054554594e-02\n3.48797786234479046e-02\n3.81892381223788158e-02\n3.92471829676002693e-02\n3.71538730469372011e-02\n3.08652396695146408e-02\n1.94853920076197493e-02\n2.71067763847296405e-03\n-1.85941472740467142e-02\n-4.18117164601599367e-02\n-6.22489781836327166e-02\n-7.34866556939571952e-02\n-6.88453932375441002e-02\n-4.41692459769204224e-02\n-1.44841254376531581e-03\n4.82920127164106483e-02\n8.54732402076973929e-02\n8.84366022246835387e-02\n4.60942565828406994e-02\n-2.84199156080339639e-02\n-9.42883172677429493e-02\n-1.01381495418001205e-01\n-2.96036179400583389e-02\n7.66130663395796219e-02\n1.22433390026080946e-01\n4.51895108600385148e-02\n-9.32860514910172911e-02\n-1.30432938458461017e-01\n8.20081992983317902e-03\n1.50931262325264132e-01\n6.15593609069964576e-02\n-1.49611746094279907e-01\n-9.18975496671960018e-02\n1.70628068541547301e-01\n6.53278764101584142e-02\n-2.21263159640423035e-01\n7.57862765817949313e-02\n1.80014718045661271e-01\n-3.07891757468296778e-01\n2.73094737405840060e-01\n-1.70599706566118642e-01\n8.22652000647926263e-02\n-3.19530648431656378e-02\n1.02346436590687109e-02\n-2.74111767195971785e-03\n6.18871018390315859e-04\n-1.18270476590769932e-04\n1.91502023000594468e-05\n-2.62231259216816210e-06\n3.02252308581942185e-07\n-2.90938782209820251e-08\n2.31116975543123349e-09\n0.0\n7.55578460578792250e-04\n2.92634279457469962e-03\n6.90600799850599884e-03\n1.29363300983407065e-02\n2.10376911072675983e-02\n3.08768236488992862e-02\n4.15981791441294158e-02\n5.16661078142204300e-02\n5.88016778013916441e-02\n6.01379021790062890e-02\n5.27364107796431322e-02\n3.45666628780188223e-02\n5.89504265383238111e-03\n-2.92676595184092718e-02\n-6.24162650888476569e-02\n-8.15792684392644823e-02\n-7.50796499560372615e-02\n-3.79476882498117618e-02\n2.12328593136595391e-02\n7.78173930557252286e-02\n9.85941149302572428e-02\n6.11661686758680906e-02\n-2.27622777262843357e-02\n-9.97514513295714444e-02\n-1.02888651705516226e-01\n-1.20807025458813250e-02\n1.01582608746744699e-01\n1.16455312491852439e-01\n-7.60805901610506555e-03\n-1.36066500044879080e-01\n-8.31897955472478273e-02\n1.06895593877290779e-01\n1.35737034603814116e-01\n-8.63403631011036010e-02\n-1.58775957631712761e-01\n1.13751534782348243e-01\n1.43731724342601119e-01\n-2.03878872101696584e-01\n-5.87789538391338996e-03\n2.37332242904563756e-01\n-3.09605301178792980e-01\n2.43864153707220865e-01\n-1.40753685790851485e-01\n6.38573485402233049e-02\n-2.35822617857203536e-02\n7.23183717829213590e-03\n-1.86373745437301173e-03\n4.06441527723909284e-04\n-7.52544596961842165e-05\n1.18349014785157664e-05\n-1.57729685808418275e-06\n1.77258137011227427e-07\n-1.66614437347434157e-08\n1.29748046590291658e-02\n2.24730208877198974e-02\n2.89203443271613923e-02\n3.37826386444656859e-02\n3.70735103747419081e-02\n3.82919017737505668e-02\n3.66228434593737009e-02\n3.11018414527098365e-02\n2.08653274069167255e-02\n5.53264354674670115e-03\n-1.42895572599816070e-02\n-3.64739483838690190e-02\n-5.70233893226039235e-02\n-7.02447626055959923e-02\n-6.98370152504726310e-02\n-5.11337948913146226e-02\n-1.42477980967673293e-02\n3.30013877475572939e-02\n7.44602271615361216e-02\n8.97290742140010728e-02\n6.39803154654428746e-02\n6.62474528345230441e-04\n-7.10490007401951562e-02\n-1.04847531797734789e-01\n-6.65156353079946611e-02\n2.96532510682681640e-02\n1.11007035041306878e-01\n9.45749565926919389e-02\n-2.38279871472458146e-02\n-1.28234830255555182e-01\n-8.24577580450015779e-02\n8.23317203057432612e-02\n1.42175983326254862e-01\n-2.41581776181457146e-02\n-1.66715279399058058e-01\n-1.84856863588283172e-03\n1.86598622873165254e-01\n-3.24707272925996021e-02\n-1.97016239993091424e-01\n1.57410206751743525e-01\n8.71802057908291350e-02\n-2.77107436042824229e-01\n2.98443719543597608e-01\n-2.12349552082682497e-01\n1.14072588013370682e-01\n-4.88923977799044437e-02\n1.72137949930847300e-02\n-5.06402983072517555e-03\n1.25767317036228087e-03\n-2.65243772937648044e-04\n4.76286954356546386e-05\n-7.28115775407417099e-06\n9.45147478149082801e-07\n-1.03626854141031375e-07\n0.0\n7.07968488715490069e-04\n2.74195016643472662e-03\n6.47197520841487003e-03\n1.21301141149080822e-02\n1.97513298530842332e-02\n2.90575945793570441e-02\n3.93078708330476603e-02\n4.91529012662427142e-02\n5.65642447017431424e-02\n5.89415058818412094e-02\n5.35217425912012865e-02\n3.81887577762013361e-02\n1.26659863802209404e-02\n-2.01568873682224196e-02\n-5.33481352313811552e-02\n-7.64032813109600389e-02\n-7.79635215846216784e-02\n-5.10203875232879966e-02\n7.47645039672664149e-04\n5.90476666753961127e-02\n9.43974333203619898e-02\n8.01097842127736770e-02\n1.32861222977139256e-02\n-7.08424179116468322e-02\n-1.10292460231500161e-01\n-6.09612044250451846e-02\n5.06065625403032404e-02\n1.23451269691123064e-01\n6.74739501839398403e-02\n-7.65659296418583213e-02\n-1.35657470885995834e-01\n-6.18618647180840461e-03\n1.47624469664144137e-01\n6.73650512139391672e-02\n-1.46985778465231476e-01\n-9.00015595357355341e-02\n1.70992902684907161e-01\n5.56035135363381339e-02\n-2.18203911549614965e-01\n9.03043044067261269e-02\n1.60312300054578138e-01\n-2.99307131693409056e-01\n2.77854027722974850e-01\n-1.80836553482090490e-01\n9.09536070344162950e-02\n-3.69603142724854450e-02\n1.24360806238900373e-02\n-3.51588474112003290e-03\n8.42644246989622254e-04\n-1.72057073015557884e-04\n2.99909204757226573e-05\n-4.46030125570665618e-06\n5.64299899789157722e-07\n1.25660850235262758e-02\n2.17650977129778614e-02\n2.80148688472722923e-02\n3.27512555097598038e-02\n3.60167101119840058e-02\n3.73681794670355852e-02\n3.60660923388707588e-02\n3.12191448689999526e-02\n2.19999105798684355e-02\n7.97469112913360388e-03\n-1.04542879731768339e-02\n-3.15646184477068881e-02\n-5.19566636005804050e-02\n-6.66026031034738925e-02\n-6.96421173402368143e-02\n-5.61774686788813343e-02\n-2.49650224833889017e-02\n1.87765639236727282e-02\n6.20631630888881028e-02\n8.64628816865203043e-02\n7.54416466241041722e-02\n2.54616812604563300e-02\n-4.47956587243790727e-02\n-9.61972512091612969e-02\n-8.88446586648640596e-02\n-1.47232458226424414e-02\n7.98957332004918974e-02\n1.13931357697007879e-01\n4.05719226435874228e-02\n-8.42089263588345072e-02\n-1.24926536482582035e-01\n-1.19412808254580997e-02\n1.30006633820321127e-01\n9.28698614339108497e-02\n-9.96723383938424023e-02\n-1.37510918608492044e-01\n8.45961868935744543e-02\n1.55716940555546163e-01\n-1.17808353074401712e-01\n-1.33744095507947108e-01\n2.06429212895532121e-01\n-1.22950986622322143e-02\n-2.19945017009381960e-01\n3.05575745127131704e-01\n-2.51167940869917672e-01\n1.50959972271473480e-01\n-7.14415918364172536e-02\n2.76102572199929952e-02\n-8.89761218574996494e-03\n2.42138232289910863e-03\n-5.60748539740581458e-04\n1.10968955842713138e-04\n-1.87928471497643927e-05\n2.72103409726907081e-06\n0.0\n6.64721423540378721e-04\n2.57445500323917349e-03\n6.07758522602316366e-03\n1.13967363291264234e-02\n1.85782722278217544e-02\n2.73904321995828808e-02\n3.71895573467386290e-02\n4.67867735478417132e-02\n5.43729554210172633e-02\n5.75895932169153343e-02\n5.38529390484458054e-02\n4.10233850993366525e-02\n1.84275708836099984e-02\n-1.19419525977668417e-02\n-4.45000192115307946e-02\n-7.01486386492588543e-02\n-7.81845081218840166e-02\n-6.04449887694760712e-02\n-1.69397473819483044e-02\n3.95860793492193719e-02\n8.42640570440937042e-02\n8.95293684298070630e-02\n4.26473939404972344e-02\n-3.74710096433432463e-02\n-1.00045595848770041e-01\n-9.12436083688057953e-02\n-3.07919270228501456e-03\n9.77442930491930345e-02\n1.09498691531471876e-01\n2.76457493609233538e-04\n-1.21176905737830437e-01\n-9.57212015695419610e-02\n6.99263442853279016e-02\n1.44712571197452816e-01\n-1.70180514681869607e-02\n-1.65492041886973085e-01\n-1.32593202129297079e-03\n1.84395657126039197e-01\n-4.01518101142997602e-02\n-1.89141571159098909e-01\n1.65849366515400054e-01\n6.72766229509933616e-02\n-2.63276954833677412e-01\n2.98598963168636766e-01\n-2.21311375921248804e-01\n1.23766691523225877e-01\n-5.53439607610013221e-02\n2.03976260393144079e-02\n-6.30794503709456930e-03\n1.65487438778309293e-03\n-3.70750379037878652e-04\n7.11778537599867117e-05\n-1.17210793947277003e-05\n1.21823309953529510e-02\n2.11004162385724434e-02\n2.71642162517765663e-02\n3.17799977797699126e-02\n3.50147615218414920e-02\n3.64764193661058292e-02\n3.54926194676570619e-02\n3.12392323040480424e-02\n2.29269443346660322e-02\n1.00871622852568670e-02\n-7.03965949011052961e-03\n-2.70659524466813871e-02\n-4.71039521141630030e-02\n-6.27273017530098204e-02\n-6.85414535788369389e-02\n-5.96116843488191314e-02\n-3.37433693871723520e-02\n5.91611458002468810e-03\n4.91987654560592097e-02\n7.99571441415114631e-02\n8.13561672660390728e-02\n4.51502773491509260e-02\n-1.87387543699599826e-02\n-7.95861320117836613e-02\n-9.76110122622300541e-02\n-5.03983043154411364e-02\n4.02252836981875431e-02\n1.07602146793411874e-01\n8.50972928916835375e-02\n-2.37297627903613265e-02\n-1.18810992457546991e-01\n-8.53878271409692496e-02\n5.99162913938849837e-02\n1.38296932723371790e-01\n1.85795819501301425e-02\n-1.44138569152463453e-01\n-7.17182781652569434e-02\n1.44939239128551001e-01\n8.73217036311128847e-02\n-1.71522144301071627e-01\n-4.55580869215089432e-02\n2.14484669947283518e-01\n-1.03955213268297028e-01\n-1.40637430800263835e-01\n2.89724281637616488e-01\n-2.81534166958356646e-01\n1.90653050262135138e-01\n-9.98161218569938585e-02\n4.23261085385001068e-02\n-1.49128701850204503e-02\n4.43349188858456651e-03\n-1.12281235011006892e-03\n2.43621785129408445e-04\n-4.54158742902403817e-05\n0.0\n6.25319941285406872e-04\n2.42185371864978060e-03\n5.71815611964867666e-03\n1.07277080539435188e-02\n1.75057315626165992e-02\n2.58593648452715048e-02\n3.52280969237907318e-02\n4.45615301304024894e-02\n5.22428686529641320e-02\n5.61322650082400759e-02\n5.38230215972776913e-02\n4.31956978813494569e-02\n2.32927298752750103e-02\n-4.60680729462854301e-03\n-3.60583275629142441e-02\n-6.32665981446381143e-02\n-7.63708525237129648e-02\n-6.66920073518257606e-02\n-3.15977795332306327e-02\n2.08030978224848610e-02\n7.04320723749498195e-02\n9.10466580439236728e-02\n6.40452569309352265e-02\n-4.86686434312517003e-03\n-7.83469115351558970e-02\n-1.02862152052645095e-01\n-4.80085295449613619e-02\n5.45913336747056027e-02\n1.16369577928817733e-01\n6.45196090329765298e-02\n-6.52422130554178026e-02\n-1.29179339383945185e-01\n-2.91153033475349751e-02\n1.23213040077273475e-01\n1.00545269712824153e-01\n-9.33759798004498986e-02\n-1.38459019020911733e-01\n8.37847775095533903e-02\n1.52248394364075140e-01\n-1.22103039016992959e-01\n-1.23388883364351581e-01\n2.08154318876722200e-01\n-2.97560857124180150e-02\n-2.02209710747547150e-01\n3.00410863021957131e-01\n-2.57561590883894409e-01\n1.60962026918751000e-01\n-7.92931957084209993e-02\n3.19848335904275652e-02\n-1.07964998158140320e-02\n3.09063132071627595e-03\n-7.56561191920392118e-04\n1.59145246060916917e-04\n1.18213228823949995e-02\n2.04751318449847078e-02\n2.63635673998749535e-02\n3.08638460463266685e-02\n3.40638852290041372e-02\n3.56165177533714697e-02\n3.49094592391927111e-02\n3.11801545796276357e-02\n2.36780825153287758e-02\n1.19134789255458014e-02\n-4.00098769145902037e-03\n-2.29548615291142073e-02\n-4.24983135668286216e-02\n-5.87437040650573353e-02\n-6.67629805524048159e-02\n-6.17165638470460604e-02\n-4.07698742383210341e-02\n-5.44855022647268167e-03\n3.65116835362423175e-02\n7.13124291522975462e-02\n8.27371035284108075e-02\n5.96423960423866223e-02\n5.05189261177346229e-03\n-5.86416558695182916e-02\n-9.53263114022970259e-02\n-7.48700701133270391e-02\n5.53353749309204663e-04\n8.37342513700247426e-02\n1.05502785558551693e-01\n3.30742027488138621e-02\n-7.98600912390895340e-02\n-1.18295643406232165e-01\n-2.20763017868528429e-02\n1.12166377792618677e-01\n1.06071663069242525e-01\n-5.85161205686536151e-02\n-1.46133900969350305e-01\n1.12803031694410031e-02\n1.64209465008104544e-01\n-1.18211046531586971e-04\n-1.82088479799350278e-01\n4.80721279282446540e-02\n1.80768953107437985e-01\n-1.73365538636566868e-01\n-4.78114848128459932e-02\n2.48761192920663038e-01\n-2.97594658916737087e-01\n2.29573482409403673e-01\n-1.33440787624477863e-01\n6.21169882388213704e-02\n-2.39008217848979618e-02\n7.74437861301446959e-03\n-2.13783617118039511e-03\n5.06428451683205768e-04\n0.0\n5.89321248723814620e-04\n2.28243138187349259e-03\n5.38967739676937587e-03\n1.01157390835266633e-02\n1.65226564475300514e-02\n2.44503848796714732e-02\n3.34096838694337428e-02\n4.24701139978336389e-02\n5.01838474076498342e-02\n5.46082382545901440e-02\n5.35077507071826317e-02\n4.48129995579440998e-02\n2.73686544655065214e-02\n1.88995239093723427e-03\n-2.81369588906775839e-02\n-5.60957893410400713e-02\n-7.30533320956794630e-02\n-7.02604150150682172e-02\n-4.32662714648209962e-02\n3.56349416403659719e-03\n5.46970456698658430e-02\n8.64961149547018721e-02\n7.75396485665110768e-02\n2.36889563694778690e-02\n-5.08736157361836944e-02\n-9.89833567415959875e-02\n-7.87054683745185280e-02\n7.50322819467056940e-03\n9.61196689990655995e-02\n1.01762638199933059e-01\n2.07681919450033179e-03\n-1.10169082980046351e-01\n-9.92776692613238226e-02\n4.39718309999429652e-02\n1.39027691070738063e-01\n2.91343212593386663e-02\n-1.40701170183252539e-01\n-7.48388104224620709e-02\n1.43427109130958325e-01\n8.39585222792481878e-02\n-1.72119940394711013e-01\n-3.52587527558000727e-02\n2.10086269163709205e-01\n-1.16700804555251531e-01\n-1.21052045667878680e-01\n2.79199561721067524e-01\n-2.84129087820034487e-01\n1.99993079785970806e-01\n-1.08803210609963855e-01\n4.80351505415507057e-02\n-1.76731381246542293e-02\n5.50669945546897709e-03\n-1.46789606176999515e-03\n1.14811058724789469e-02\n1.98858586982109398e-02\n2.56086711656131998e-02\n2.99983380966001474e-02\n3.31606130150795819e-02\n3.47880393455606285e-02\n3.43221318128542480e-02\n3.10567394801923059e-02\n2.42799195000784861e-02\n1.34910890964888199e-02\n-1.29772845540068412e-03\n-1.92055878175187607e-02\n-3.81570822977411461e-02\n-5.47439165461032010e-02\n-6.44899549635768593e-02\n-6.27374985661245388e-02\n-4.62477620834149880e-02\n-1.52978391366804002e-02\n2.44330300976364108e-02\n6.14065979412015683e-02\n8.05844075704067048e-02\n6.92978103730383377e-02\n2.54129229176860878e-02\n-3.62080001342769200e-02\n-8.49741154962732753e-02\n-8.80894878649302188e-02\n-3.36281403680226063e-02\n5.07777074806359391e-02\n1.04298245997860986e-01\n7.45523160472000151e-02\n-2.72039711647573401e-02\n-1.12015846811274911e-01\n-8.36378650827227232e-02\n4.59931379137026447e-02\n1.30166319352138904e-01\n4.39521562911168590e-02\n-1.16164117308370687e-01\n-1.06563711429133776e-01\n8.80100772705639245e-02\n1.38745322143611932e-01\n-8.37855296843958569e-02\n-1.48394517963419570e-01\n1.26527700446620733e-01\n1.12697944649204893e-01\n-2.09028444457849877e-01\n4.64606514717136598e-02\n1.84194401214339387e-01\n-2.94151617239031327e-01\n2.63018726225422939e-01\n-1.70700748740070740e-01\n8.73727917072910226e-02\n-3.66998281750364821e-02\n1.29394363190329185e-02\n-3.88326966556648166e-03\n0.0\n5.56347629058091104e-04\n2.15472510204396846e-03\n5.08872583723668764e-03\n9.55459364018056492e-03\n1.56195454267048107e-02\n2.31513092047725307e-02\n3.17219537037370450e-02\n4.05052836010341977e-02\n4.82021943862947846e-02\n5.30476266171796829e-02\n5.29690496169999761e-02\n4.59669955004708142e-02\n3.07544625387604215e-02\n7.60419097437421785e-03\n-2.07978734657205330e-02\n-4.88848472225759945e-02\n-6.86687254067710057e-02\n-7.16318294956285045e-02\n-5.21474469771119123e-02\n-1.16489768191964105e-02\n3.84132815116166731e-02\n7.76335182454920975e-02\n8.39612355945463101e-02\n4.65013202699691985e-02\n-2.20977456434889620e-02\n-8.40158454449122377e-02\n-9.41429330755986782e-02\n-3.41195882701610109e-02\n6.01216736545422958e-02\n1.10233264432993278e-01\n5.86638308689582805e-02\n-5.95484585272774217e-02\n-1.22004588872685296e-01\n-4.12152252481816361e-02\n1.02079304047431749e-01\n1.13988529536971514e-01\n-4.82186501603623432e-02\n-1.46756158969735095e-01\n6.79792474798365971e-03\n1.62918453978590533e-01\n-2.35730429820935191e-03\n-1.79633736962337004e-01\n5.61397845737438492e-02\n1.71905833389236179e-01\n-1.79930465111510451e-01\n-2.88396064957134809e-02\n2.33629823431232647e-01\n-2.95453628093274467e-01\n2.37095120857066299e-01\n-1.43039179946210349e-01\n6.91834585592406015e-02\n-2.77245617071877615e-02\n9.38560816051869917e-03\n1.11603080802397513e-02\n1.93302206230967291e-02\n2.48965584216971798e-02\n2.91804270066448948e-02\n3.23027973606697105e-02\n3.39914066723538064e-02\n3.37360459619966205e-02\n3.08822012945135158e-02\n2.47556661212311735e-02\n1.48527956306474442e-02\n1.10668460355305208e-03\n-1.57919058013940156e-02\n-3.40875597219786122e-02\n-5.07964052213102576e-02\n-6.18703801538234288e-02\n-6.28874855002826694e-02\n-5.03811109638832924e-02\n-2.36845171929858933e-02\n1.32322669217704650e-02\n5.09158256063864806e-02\n7.58080522013488134e-02\n7.47130423762652623e-02\n4.18454955435759376e-02\n-1.43293444485450231e-02\n-6.94142527698070194e-02\n-9.14300966952491523e-02\n-5.95151866941663055e-02\n1.57136582631097407e-02\n8.71958101091704074e-02\n9.66151060810089835e-02\n2.36284286167939214e-02\n-7.87014458704470010e-02\n-1.11516028667700912e-01\n-2.56235138320346882e-02\n9.89193153880348064e-02\n1.09644128428805776e-01\n-2.91113731049882432e-02\n-1.38401816903110320e-01\n-3.80328580616879630e-02\n1.37466801341148831e-01\n7.69121236284721760e-02\n-1.42399199332089721e-01\n-7.99979886200454793e-02\n1.72707378628167124e-01\n2.47727686914694101e-02\n-2.05009989799212367e-01\n1.28509749146345748e-01\n1.01629407252741832e-01\n-2.67809064568846567e-01\n2.85653384917904429e-01\n-2.08815000608926465e-01\n1.17870810296337905e-01\n-5.40721094032911923e-02\n2.07240640355911589e-02\n0.0\n5.26152817686910261e-04\n2.03778110046151043e-03\n4.81307448097357312e-03\n9.04024514592596459e-03\n1.47903755496700540e-02\n2.19547480770515384e-02\n3.01582952838750085e-02\n3.86655761114616178e-02\n4.63084730764385041e-02\n5.14814859906372949e-02\n5.22653938255402267e-02\n4.67429047739443965e-02\n3.35454284053952681e-02\n1.26012019636194891e-02\n-1.40680032460328962e-02\n-4.18174297481255577e-02\n-6.35780106582006788e-02\n-7.12566355130728885e-02\n-5.85392884880032924e-02\n-2.46285320248458353e-02\n2.25468780510331909e-02\n6.59991945294876314e-02\n8.45183904084037263e-02\n6.30364058192035698e-02\n4.85641903026660850e-03\n-6.23765818829908683e-02\n-9.60312508292331807e-02\n-6.51544207869493852e-02\n1.89295357652506276e-02\n9.55797788590801306e-02\n9.34330580725726001e-02\n-2.00384429967294609e-04\n-1.02698214974877550e-01\n-9.81380308033385357e-02\n2.73465566476602875e-02\n1.28742850590891383e-01\n5.66194592709007294e-02\n-1.09209882394092309e-01\n-1.11248988922485886e-01\n8.35539475677312821e-02\n1.38525317623671318e-01\n-8.44947182772289584e-02\n-1.44210196120711370e-01\n1.31004048860385691e-01\n1.01746584414697860e-01\n-2.09082540595071087e-01\n6.23574363901545914e-02\n1.66040253777604147e-01\n-2.86938022885828814e-01\n2.67599097646295414e-01\n-1.80171434287437066e-01\n9.56662866566559550e-02\n-4.17578403073966750e-02\n1.08641551906856794e-02\n1.88172687715807418e-02\n2.42389661878860997e-02\n2.84242464699248736e-02\n3.15071522484981978e-02\n3.32465509514072444e-02\n3.31753663803735221e-02\n3.06859946577201226e-02\n2.51403331056895274e-02\n1.60371375026109111e-02\n3.24787773664000391e-03\n-1.26940693302905645e-02\n-3.03059345703528514e-02\n-4.69768635594595210e-02\n-5.90559059564801647e-02\n-6.23846457718909148e-02\n-5.33966016873043403e-02\n-3.07256573373621590e-02\n3.05703821206220958e-03\n4.03619539123364415e-02\n6.92294318711030449e-02\n7.66240521247675277e-02\n5.43397913098751240e-02\n5.66416919649645381e-03\n-5.11077891324067252e-02\n-8.69648357141528383e-02\n-7.63535740524381584e-02\n-1.65590012502642263e-02\n6.06366983057057135e-02\n1.00401931394257252e-01\n6.30711899769273582e-02\n-3.29795679002786654e-02\n-1.07158866698749231e-01\n-7.92128762024001676e-02\n3.84779553701839264e-02\n1.21775780537867959e-01\n5.77008397871933421e-02\n-9.16071193473645684e-02\n-1.20025788701189198e-01\n3.90579409101928093e-02\n1.46944494409154941e-01\n-3.38238829995058093e-03\n-1.61780868250192916e-01\n5.21713890818661929e-03\n1.77164273457708271e-01\n-6.42470036040766745e-02\n-1.62795218456514929e-01\n1.85661995671444952e-01\n1.05716628755686392e-02\n-2.18345433998363786e-01\n2.92635239188925533e-01\n-2.44171880960483201e-01\n1.52704930534686173e-01\n-7.66092339996694432e-02\n0.0\n4.99406662833104358e-04\n1.93419368813763592e-03\n4.56887341520204916e-03\n8.58438164778551477e-03\n1.40547630425312386e-02\n2.08911787935721870e-02\n2.87636904884462918e-02\n3.70148871787769548e-02\n4.45902916071385103e-02\n5.00249914127156303e-02\n5.15395012068349534e-02\n4.73021519875595417e-02\n3.58977015804163233e-02\n1.69876830457279977e-02\n-7.95258152351553324e-03\n-3.50746221577930145e-02\n-5.81652872501138563e-02\n-6.96569255702634976e-02\n-6.28982941959133207e-02\n-3.54403304427247517e-02\n7.72988230266219087e-03\n5.29275248113229291e-02\n8.06576389670116828e-02\n7.36681998334740712e-02\n2.81644730645302585e-02\n-3.78627864273271622e-02\n-8.75314204856507128e-02\n-8.40776936011951859e-02\n-1.96886586141655426e-02\n6.63564523658834171e-02\n1.04622790516701522e-01\n5.10194355472994993e-02\n-5.79291406045473745e-02\n-1.15620985810277924e-01\n-4.65072717393540183e-02\n8.62973153698116946e-02\n1.17391357421755993e-01\n-1.54197710689532464e-02\n-1.37195914076049641e-01\n-4.57675237015326627e-02\n1.34810358543696690e-01\n7.85254944858024689e-02\n-1.42078943828976179e-01\n-7.60266844168372563e-02\n1.73664084631412363e-01\n1.46281123049110742e-02\n-2.00121077895577815e-01\n1.39476748328666883e-01\n8.34613918877034067e-02\n-2.57290736673563447e-01\n2.87706098060054871e-01\n-2.18187035995436096e-01\n1.27590698376331579e-01\n1.06429394040102061e-02\n1.84341117896225024e-02\n2.37481960394636329e-02\n2.78619389471931878e-02\n3.09214287761000149e-02\n3.27121945159711547e-02\n3.28037939758274930e-02\n3.06286019800864201e-02\n2.55799046646910874e-02\n1.71603569149572713e-02\n5.19251299680754778e-03\n-9.91915085899840177e-03\n-2.69190603418700200e-02\n-4.35135024737813084e-02\n-5.64011605748062431e-02\n-6.16807652815054147e-02\n-5.57604435094984779e-02\n-3.67571336669763674e-02\n-6.11343253277898176e-03\n3.01907442711320390e-02\n6.17525111986092362e-02\n7.60920666184997513e-02\n6.34964196627516297e-02\n2.32122557889235422e-02\n-3.20071565745592770e-02\n-7.71690995694864074e-02\n-8.50984940004852752e-02\n-4.34713879955739291e-02\n3.02768929100957658e-02\n9.01200112000904580e-02\n8.75915935802796253e-02\n1.31749936721509628e-02\n-7.99174724416041316e-02\n-1.05597066877250775e-01\n-2.52782795681311886e-02\n9.04175251000522151e-02\n1.09417325476474120e-01\n-9.46733172730519941e-03\n-1.26380901530913498e-01\n-6.83126622007340367e-02\n1.02907992829196507e-01\n1.16169532833839573e-01\n-7.99029179797634825e-02\n-1.39466493825520121e-01\n8.56509065283869858e-02\n1.41672670286890789e-01\n-1.35801246626072403e-01\n-9.29254193539215123e-02\n2.10435157524335281e-01\n-7.62527056223516464e-02\n-1.52311069793600623e-01\n2.84485746620639635e-01\n-2.76057492344532474e-01\n1.92396804129527144e-01\n0.0\n4.80032919092037802e-04\n1.85915950127479488e-03\n4.39204728514492986e-03\n8.25466962325331621e-03\n1.35241041345269299e-02\n2.01278655870572205e-02\n2.77723254781181636e-02\n3.58624641954934931e-02\n4.34345518538516578e-02\n4.91361253277630070e-02\n5.13000465990487431e-02\n4.81646540159163042e-02\n3.82795028597982465e-02\n2.10932299087874288e-02\n-2.36295501325592102e-03\n-2.89022413406899714e-02\n-5.30514473522203586e-02\n-6.77569479175289535e-02\n-6.62164214314778232e-02\n-4.47474003821424979e-02\n-5.93053373560886894e-03\n3.95236014833273766e-02\n7.41705283141965432e-02\n7.98660417572446824e-02\n4.76163750969980509e-02\n-1.30476487381944485e-02\n-7.23479109310777302e-02\n-9.23989602647368458e-02\n-5.18923868848810282e-02\n3.05156325576433005e-02\n9.65678751974939215e-02\n8.62601928267364843e-02\n-4.50542312904049849e-03\n-9.91812756656468703e-02\n-9.66810153553333135e-02\n1.69608490963485264e-02\n1.20108238567243009e-01\n7.39416152502242463e-02\n-8.12729656096743136e-02\n-1.27319880701841026e-01\n2.96189591684377466e-02\n1.49601246594440712e-01\n1.57000242246994491e-03\n-1.63792103204835421e-01\n5.53100295602080259e-03\n1.78980152563723516e-01\n-6.99155964765494353e-02\n-1.60595183691674526e-01\n1.93035515744628600e-01\n6.01760062655109086e-04\n-2.17701294449993837e-01\n3.04630610739073882e-01\n-2.62490487201346712e-01\n1.06280692124105808e-02\n1.84083558622536690e-02\n2.37176524331027955e-02\n2.78386118507808408e-02\n3.09311262701044420e-02\n3.28016984678112036e-02\n3.30464402644823560e-02\n3.11254003927536604e-02\n2.64518128479425130e-02\n1.85263018613992525e-02\n7.12823217239217342e-03\n-7.44287736386879586e-03\n-2.41120425934601111e-02\n-4.08352052844274116e-02\n-5.45852093287403153e-02\n-6.16618026331519145e-02\n-5.84502307867787035e-02\n-4.26495763603741765e-02\n-1.47793528580020504e-02\n2.05310850632877059e-02\n5.42600177775892922e-02\n7.45858437597715362e-02\n7.08131254165080964e-02\n3.90033040142416035e-02\n-1.29295166003334690e-02\n-6.42654900721951333e-02\n-8.80295075175030334e-02\n-6.52051119422639852e-02\n-7.21689998017985930e-04\n7.04760746956023393e-02\n9.84680418830983367e-02\n5.36114149680976121e-02\n-3.97672944642907256e-02\n-1.06318020608704905e-01\n-7.69739286184268207e-02\n3.44370618196487982e-02\n1.17826587369950594e-01\n6.87065434871024228e-02\n-7.24736834587514228e-02\n-1.27495437659244981e-01\n-9.59960320148812128e-04\n1.38751197638230406e-01\n5.87551203705354158e-02\n-1.34237800908769467e-01\n-8.79015878314400867e-02\n1.43593513335611600e-01\n8.24030812082197223e-02\n-1.79106242205806454e-01\n-1.68250263566387601e-02\n2.09235881669550400e-01\n-1.45047868748662323e-01\n-9.37826553587964989e-02\n2.85766002838194255e-01\n-3.24926788040486136e-01\n0.0\n4.72098030311002086e-04\n1.82842780917183553e-03\n4.31984484208075906e-03\n8.12137667473321334e-03\n1.33144656417530736e-02\n1.98401650872799783e-02\n2.74322429210204534e-02\n3.55410869444450911e-02\n4.32674959319789623e-02\n4.93368943020527501e-02\n5.21560558192649334e-02\n5.00003425844887731e-02\n4.13707910001402668e-02\n2.55259565302626903e-02\n3.12395007227699679e-03\n-2.31938940237499253e-02\n-4.85628489631436816e-02\n-6.63581178756795231e-02\n-6.96673019397434784e-02\n-5.37972601378422094e-02\n-1.92897442001156091e-02\n2.57960710661031475e-02\n6.61126518862500956e-02\n8.33261732963940377e-02\n6.45186024061667890e-02\n1.18417823664101265e-02\n-5.24783811584592641e-02\n-9.23788030468793847e-02\n-7.75063986495605067e-02\n-8.01596158460808790e-03\n7.39219502577783821e-02\n1.04321450409061461e-01\n4.76404856553846734e-02\n-5.83549680089936601e-02\n-1.15846960510511868e-01\n-5.46882011187512784e-02\n7.47026980055363055e-02\n1.23993202204470437e-01\n1.45590188331829046e-02\n-1.25377563988055801e-01\n-8.92066152194000428e-02\n9.41500822786892483e-02\n1.32529484776658685e-01\n-6.96462854018621708e-02\n-1.54509864902217575e-01\n7.75252460748511313e-02\n1.59313525139507917e-01\n-1.34019371680710486e-01\n-1.15906295052924713e-01\n2.26018824113907973e-01\n-5.50606353087532141e-02\n-2.14568835935539964e-01\n3.67412865467612759e-01\n1.08520911767116621e-02\n1.87963732864345236e-02\n2.42202572412774028e-02\n2.84412363722838894e-02\n3.16367984677507694e-02\n3.36304134571431615e-02\n3.40362685524398453e-02\n3.23310258949719084e-02\n2.79365874640592378e-02\n2.03435168183028689e-02\n9.28785647970370616e-03\n-5.02287622548579574e-03\n-2.16641352122577575e-02\n-3.87938780921128629e-02\n-5.36008977652786683e-02\n-6.25338699294469003e-02\n-6.19347299111434185e-02\n-4.91224918628462015e-02\n-2.38004246600032367e-02\n1.06042255859978597e-02\n4.63424263574989254e-02\n7.23045280879823782e-02\n7.71250959531181030e-02\n5.42028883495351971e-02\n7.03855535197185373e-03\n-4.81314446217566416e-02\n-8.58332662088636539e-02\n-8.25108779116482532e-02\n-3.21384701395401873e-02\n4.27784660017865720e-02\n9.63730335183058950e-02\n8.59017521008260398e-02\n8.10695547494281327e-03\n-8.35309654292953618e-02\n-1.08779133423662508e-01\n-3.18294555315441693e-02\n8.48462046481950061e-02\n1.18298863935102735e-01\n1.48066684555224846e-02\n-1.16808282707447461e-01\n-1.02211240982863508e-01\n6.17435494750867009e-02\n1.45457398188558490e-01\n-3.35641326180960951e-03\n-1.60694667920080358e-01\n-3.06804651998966831e-02\n1.74585735339839371e-01\n2.63953289740161412e-02\n-1.99578811189185940e-01\n3.72589444110340839e-02\n2.09407422732275139e-01\n-1.83647289237816591e-01\n-1.02512270378514639e-01\n3.83211554219321682e-01\n0.0\n4.70835521500616197e-04\n1.82353813357477058e-03\n4.30869433541349565e-03\n8.10284761277830883e-03\n1.32929239748943821e-02\n1.98326279567949369e-02\n2.74793269447449542e-02\n3.57211968405484678e-02\n4.37115955655453803e-02\n5.02379561699686228e-02\n5.37632706383990924e-02\n5.25846772838151275e-02\n4.51481389469132674e-02\n3.05309255216655480e-02\n9.04570866056086595e-03\n-1.71700870060119103e-02\n-4.38232658996330349e-02\n-6.47181002402366090e-02\n-7.29051011636195345e-02\n-6.28376109165134228e-02\n-3.32076475265217705e-02\n1.05005176385952869e-02\n5.52836547880461021e-02\n8.33385819235981790e-02\n7.88730109468948060e-02\n3.73975445067802337e-02\n-2.70352728658736843e-02\n-8.29263599287051456e-02\n-9.50030246549243979e-02\n-4.73493698297465376e-02\n3.74585801390530729e-02\n1.02128838341375636e-01\n9.07899402370972719e-02\n1.97472655189384052e-04\n-9.87188683013132950e-02\n-1.08596622639504509e-01\n-3.97803293035810506e-03\n1.14575884164150349e-01\n1.04492251883268300e-01\n-4.23552865171347367e-02\n-1.43936306469070352e-01\n-4.16207096065597179e-02\n1.36342846565119330e-01\n1.01559969321353943e-01\n-1.19665446292819833e-01\n-1.34360293482762960e-01\n1.24649738435451352e-01\n1.42094595612542091e-01\n-1.69920421272459682e-01\n-1.05132476862004276e-01\n2.53623929101003454e-01\n-2.78234902107490356e-02\n-3.72613812962807101e-01\n1.11764540336470666e-02\n1.93581862347348352e-02\n2.49470104904464286e-02\n2.93080327610047223e-02\n3.26390636148031280e-02\n3.47805689164149209e-02\n3.53635232153682727e-02\n3.38792458710769420e-02\n2.97563268487862700e-02\n2.24740823948811272e-02\n1.17257667865507658e-02\n-2.37014718965651095e-03\n-1.90343641997399483e-02\n-3.66214741115326106e-02\n-5.25353705735444668e-02\n-6.33846848531834095e-02\n-6.54985119510901048e-02\n-5.58674540920782309e-02\n-3.34375242806956990e-02\n-4.60661553730944899e-04\n3.66585964048897206e-02\n6.77643528001300732e-02\n8.12518288304417552e-02\n6.83566320231108193e-02\n2.84091727541341266e-02\n-2.73275781342151719e-02\n-7.64501826986291877e-02\n-9.32163056082750963e-02\n-6.24002559402686702e-02\n6.99751945220378289e-03\n7.85576861330163218e-02\n1.04383528890322541e-01\n5.76673968356903183e-02\n-3.77767453432435313e-02\n-1.10485104147532751e-01\n-9.14519786450896377e-02\n1.64313356111820442e-02\n1.17201623016316148e-01\n9.91311908440711265e-02\n-3.61726568544176105e-02\n-1.38773298465447059e-01\n-6.64218892439560893e-02\n1.06896045386307634e-01\n1.35347181366792385e-01\n-5.13467080234711951e-02\n-1.69133641967866788e-01\n9.37562181028194462e-03\n1.90052121646341693e-01\n-4.28116966717210167e-04\n-2.16263199001322487e-01\n4.10700352649744985e-02\n2.47764436381829239e-01\n-1.51759971713022301e-01\n-3.41009906010263153e-01\n0.0\n4.69846608233219433e-04\n1.81970808895929952e-03\n4.30005703288305861e-03\n8.08910228604553180e-03\n1.32794411132276732e-02\n1.98377195042786711e-02\n2.75454126037043903e-02\n3.59294297581557454e-02\n4.41974738139568404e-02\n5.12022875067096456e-02\n5.54688627855030175e-02\n5.53254252649495112e-02\n4.91761547244472866e-02\n3.59327361284601729e-02\n1.55747116263287091e-02\n-1.02679272642134736e-02\n-3.79127537481269289e-02\n-6.16912209753918001e-02\n-7.47869108457902554e-02\n-7.10206381369491574e-02\n-4.74210906931797557e-02\n-6.88499844986616063e-03\n4.03472377634820287e-02\n7.79506129529817515e-02\n8.85611594406466723e-02\n6.20378058975849939e-02\n3.83150859689841477e-03\n-6.19167360612053186e-02\n-9.98096918121197246e-02\n-8.19144500860961300e-02\n-9.88921927783149683e-03\n7.54974718802396139e-02\n1.12590418146031504e-01\n6.33816120254626914e-02\n-4.43056748252202218e-02\n-1.21090893449605608e-01\n-8.63333374239653867e-02\n4.17487135361173170e-02\n1.34808382101855750e-01\n7.58795064306555522e-02\n-8.48073732846268830e-02\n-1.45995152015170021e-01\n-2.92986521341118957e-03\n1.58914239277941433e-01\n7.87123767872698332e-02\n-1.46544603435014686e-01\n-1.28623492156085206e-01\n1.42683238464797968e-01\n1.57425235753056281e-01\n-1.70849302497174477e-01\n-1.72929191807113886e-01\n2.49809337725237363e-01\n2.95907333511752524e-01\n1.15214946492168784e-02\n1.99558141115765940e-02\n2.57201707640423854e-02\n3.02305439806640625e-02\n3.37067848488639618e-02\n3.60081238857502886e-02\n3.67844610783723755e-02\n3.55443730466169644e-02\n3.17261643530436510e-02\n2.48011397921450299e-02\n1.44226476620700293e-02\n6.21438552862735825e-04\n-1.59709594921680249e-02\n-3.39159124009354440e-02\n-5.08555582399834449e-02\n-6.36005684617736017e-02\n-6.85315796059259019e-02\n-6.23920192426104248e-02\n-4.34455507330505988e-02\n-1.27881940745687168e-02\n2.46305301498412066e-02\n5.99256241924064348e-02\n8.17989603538746141e-02\n7.99787758008978777e-02\n5.00544968426989839e-02\n-2.00967072240450413e-03\n-5.84386574880206150e-02\n-9.40254429538458641e-02\n-8.70589550551524455e-02\n-3.34072711770674671e-02\n4.42801225907441948e-02\n1.01822764830284740e-01\n9.71649219215536819e-02\n2.29905033500921209e-02\n-7.53342252330548023e-02\n-1.20810524802664576e-01\n-6.46410904655956159e-02\n5.69682163087837715e-02\n1.32563892653708715e-01\n7.37658338469307784e-02\n-7.41429470167736387e-02\n-1.46126520028624168e-01\n-3.69519250084093670e-02\n1.33379148003080428e-01\n1.27084929896298521e-01\n-7.58278326076824161e-02\n-1.77294498893521724e-01\n1.61825730458828275e-02\n2.05320416527969535e-01\n2.54390430775982695e-02\n-2.37903762929185636e-01\n-5.37869506958514459e-02\n3.11152307684178064e-01\n2.44688130098058010e-01\n0.0\n4.67554446333729920e-04\n1.81083058409576550e-03\n4.27950067007548934e-03\n8.05298572230985985e-03\n1.32294182543580344e-02\n1.97887610276938804e-02\n2.75377943425642487e-02\n3.60446397518377690e-02\n4.45757590599927672e-02\n5.20564341780638470e-02\n5.70847494240449907e-02\n5.80358859041264080e-02\n5.32928843368421085e-02\n4.16248486826545430e-02\n2.26964413945134960e-02\n-2.37061038362897320e-03\n-3.05471464334843255e-02\n-5.68031392443091240e-02\n-7.46544987453704040e-02\n-7.75630609872151600e-02\n-6.11628287822963690e-02\n-2.58581099395907461e-02\n2.11900754233674792e-02\n6.60640005890790610e-02\n9.13219744491371721e-02\n8.26850076974610104e-02\n3.74115777904665686e-02\n-2.97226627678974856e-02\n-8.80624247184925435e-02\n-1.03578657534294016e-01\n-5.94412360833152173e-02\n2.63515624205716004e-02\n1.01863812155481723e-01\n1.09739834147070073e-01\n3.25684140088024765e-02\n-7.86391305434986920e-02\n-1.29535317642450659e-01\n-6.16561707585213670e-02\n7.48837767604691035e-02\n1.42997091306675150e-01\n5.31757500181973056e-02\n-1.10070071766844677e-01\n-1.46691911427597410e-01\n1.44336905714717769e-02\n1.71671139067431644e-01\n8.25961166515170875e-02\n-1.51365356997197414e-01\n-1.57862805556826219e-01\n1.17831849654478807e-01\n2.23248471209431171e-01\n-7.76614656853772817e-02\n-3.33860633666362372e-01\n-1.93429619230782834e-01\n1.18850216195912906e-02\n2.05854612941866605e-02\n2.65348639827026438e-02\n3.12031262271066367e-02\n3.48339128548734028e-02\n3.73071693275521740e-02\n3.82941576793336541e-02\n3.73237479859360871e-02\n3.38476010320826887e-02\n2.73330995153106722e-02\n1.73977276538587848e-02\n3.98734543801789604e-03\n-1.24149975198599785e-02\n-3.05857732558398043e-02\n-4.84274318559845471e-02\n-6.29959423559923737e-02\n-7.07938693105189532e-02\n-6.84132442565081877e-02\n-5.35374427040950090e-02\n-2.61677653962156288e-02\n1.02602776827624715e-02\n4.84077960598442852e-02\n7.78374584508509798e-02\n8.75438588216211760e-02\n7.00868772145161467e-02\n2.62428529394024071e-02\n-3.19708933265116999e-02\n-8.25539862028918381e-02\n-1.00842208896981228e-01\n-7.18704126221792750e-02\n-2.60471839795277729e-03\n7.43991926441676527e-02\n1.13222623536903683e-01\n8.18889740611713352e-02\n-9.24944104587217125e-03\n-1.01528453518942935e-01\n-1.21113293695408339e-01\n-3.95453152231019650e-02\n8.50832222958710499e-02\n1.38917979189066260e-01\n5.53160144110807633e-02\n-9.62462518949228213e-02\n-1.51137051122338800e-01\n-2.66027782997154474e-02\n1.45047976385981547e-01\n1.36916732027743404e-01\n-6.93033309894466598e-02\n-1.96018317662339653e-01\n-2.92136042822917219e-02\n2.11883430025793962e-01\n1.37273936555821652e-01\n-1.92272717252173486e-01\n-3.23055939269262848e-01\n-1.46457533393633155e-01\n0.0\n4.64039216694349822e-04\n1.79721615824435178e-03\n4.24775491263819447e-03\n7.99584538697018302e-03\n1.31449763244141909e-02\n1.96886687864338411e-02\n2.74599369047317868e-02\n3.60701557824424091e-02\n4.48483627334059914e-02\n5.27989541809761459e-02\n5.86037606328156518e-02\n6.07010923071471808e-02\n5.74754005396977546e-02\n4.75808914758668669e-02\n3.03943234819949587e-02\n6.54185512215706318e-03\n-2.16257986516551863e-02\n-4.98121140506866678e-02\n-7.20600628742587290e-02\n-8.17716469631584175e-02\n-7.35334474307044739e-02\n-4.55001276849521658e-02\n-1.63873102104401293e-03\n4.72915516473547334e-02\n8.52757357943322858e-02\n9.58282963520871028e-02\n6.93854250372340775e-02\n1.06537937805840765e-02\n-5.84635881511205574e-02\n-1.04661508684248589e-01\n-9.87248354037542630e-02\n-3.52243289288529035e-02\n5.57139701563252876e-02\n1.17711424716695823e-01\n1.01713358238081836e-01\n7.34918383667976325e-03\n-1.01262992324406789e-01\n-1.32574469901029141e-01\n-4.56799592061678528e-02\n9.34044574544480588e-02\n1.49436081235115481e-01\n4.82295195054400078e-02\n-1.18414512546837741e-01\n-1.58460052883736102e-01\n-3.69533216110266632e-04\n1.76421865289419555e-01\n1.27717460915059228e-01\n-1.14256884288160138e-01\n-2.22683911502095155e-01\n-1.08290476628419164e-02\n2.70703909526476050e-01\n2.88076461285719954e-01\n1.06324951153951214e-01\n1.22775430693710108e-02\n2.12653283882657286e-02\n2.74145727542219608e-02\n3.22534969438047839e-02\n3.60516865201486666e-02\n3.87118332407880641e-02\n3.99289843104511447e-02\n3.92553251023858227e-02\n3.61596134332169278e-02\n3.01097779595210745e-02\n2.06923650561502796e-02\n7.77282977676958982e-03\n-8.31231882953559209e-03\n-2.65593259686841207e-02\n-4.51488299207392363e-02\n-6.14220764726528812e-02\n-7.20745275230830484e-02\n-7.36519036141683597e-02\n-6.33838486242908061e-02\n-4.02838313464998973e-02\n-6.28166795914454710e-03\n3.30301688702993937e-02\n6.85861201378664687e-02\n8.94794276558272816e-02\n8.61980740713896021e-02\n5.49235383717822795e-02\n1.41559688987822154e-03\n-5.77600398172659138e-02\n-9.88496517531470831e-02\n-1.00044738293223828e-01\n-5.37154133338802117e-02\n2.42688374961398320e-02\n9.58432673590751266e-02\n1.17304209185563640e-01\n6.67837326728855096e-02\n-3.30668185221044755e-02\n-1.17949596975266829e-01\n-1.20238362479441127e-01\n-2.51213711355955591e-02\n1.00172544145671005e-01\n1.45363927958218314e-01\n5.42100996520605838e-02\n-1.01031008516176371e-01\n-1.62796536048242402e-01\n-4.64586118710986901e-02\n1.37764376190901761e-01\n1.72246553320020673e-01\n-1.14641286134440322e-02\n-2.05812604605766919e-01\n-1.51850973072788470e-01\n1.18850929401717223e-01\n3.05906936372943639e-01\n2.39554603495366725e-01\n7.40456806347508378e-02\n0.0\n4.59326161414239694e-04\n1.77896257363473025e-03\n4.20504696550406346e-03\n7.91808560413017996e-03\n1.30266954009271019e-02\n1.95380775408416502e-02\n2.73121828168186725e-02\n3.60053225105632854e-02\n4.50124428008032360e-02\n5.34231105614345683e-02\n6.00132361601427022e-02\n6.33007826492638787e-02\n6.16959817130819099e-02\n5.37702922117038185e-02\n3.86481092167614421e-02\n1.64866489055242142e-02\n-1.10477137432001080e-02\n-4.04656055714932295e-02\n-6.65178606290110219e-02\n-8.28576019215125220e-02\n-8.34358338876609734e-02\n-6.45453146548112811e-02\n-2.70762014130814417e-02\n2.18557596680877611e-02\n6.90160432399929830e-02\n9.78624355915055089e-02\n9.42310682360665425e-02\n5.35759011598972157e-02\n-1.33173051870017628e-02\n-8.02406588114549929e-02\n-1.14155047011664387e-01\n-9.15849603868191808e-02\n-1.59465104109300197e-02\n7.58042396948690467e-02\n1.27341937761422025e-01\n9.71109918861558785e-02\n-5.73273751649481644e-03\n-1.13285741029811871e-01\n-1.38619298097855920e-01\n-4.73396929307014769e-02\n9.53282279067330790e-02\n1.60624192015580508e-01\n7.11290699358646389e-02\n-1.02512970074072382e-01\n-1.82471613566344809e-01\n-6.32725776169962562e-02\n1.45855861202243753e-01\n2.09049703086616273e-01\n2.94228655228299316e-02\n-2.21045285036601202e-01\n-3.01634407689151895e-01\n-1.87081259222243279e-01\n-4.94687199991997867e-02\n1.27088869760211762e-02\n2.20124379501190660e-02\n2.83812749440326209e-02\n3.34076693990641646e-02\n3.73896281167577088e-02\n4.02548199367053008e-02\n4.17246549607284828e-02\n4.13778483981433673e-02\n3.87043207570861650e-02\n3.31776048108267246e-02\n2.43592736988522823e-02\n1.20405719599303296e-02\n-3.58400607575297403e-03\n-2.17316122451960067e-02\n-4.08748022158801072e-02\n-5.86764833996771054e-02\n-7.20955626182206988e-02\n-7.77440156981811376e-02\n-7.25467486039155784e-02\n-5.46818106180924079e-02\n-2.46552045656025752e-02\n1.37927385028363478e-02\n5.33956181829977478e-02\n8.41741415969373269e-02\n9.56825251497784163e-02\n8.05648346126538462e-02\n3.85740128536053439e-02\n-2.05852257145943060e-02\n-7.76565062859478211e-02\n-1.09042528232103572e-01\n-9.65658734000448965e-02\n-3.85860620408572663e-02\n4.35068843035946173e-02\n1.09851782189930663e-01\n1.20177337641720200e-01\n5.93578629038992722e-02\n-4.46089678130704159e-02\n-1.27458344462852174e-01\n-1.26113546446402991e-01\n-2.88508857262364318e-02\n1.00404756441407395e-01\n1.56844093426836195e-01\n7.93875741189656453e-02\n-7.96630896309225428e-02\n-1.77870649899861177e-01\n-1.07290688433266931e-01\n8.35290367367660797e-02\n2.09918470579015332e-01\n1.28582684192401681e-01\n-1.02903873252578312e-01\n-2.79037302543595933e-01\n-2.68518498561770069e-01\n-1.37808322612682083e-01\n-3.16963682062379737e-02\n0.0\n4.53297593473104773e-04\n1.75561403039723460e-03\n4.15029550252676415e-03\n7.81764649033514676e-03\n1.28711005348609072e-02\n1.93315370699674582e-02\n2.70863594542842465e-02\n3.58382341299046947e-02\n4.50510264552832912e-02\n5.39052332226712186e-02\n6.12811235429040618e-02\n6.57934556443071500e-02\n6.59046606356037956e-02\n6.01402614417773027e-02\n4.74167022244491587e-02\n2.74636823073610842e-02\n1.27898328794518183e-03\n-2.85021656867318583e-02\n-5.74953548486770716e-02\n-7.99121940379672463e-02\n-8.95263660337806411e-02\n-8.12904957728931565e-02\n-5.33843356447010892e-02\n-9.14059253056184566e-03\n4.20179250075960048e-02\n8.55992216495768676e-02\n1.05657215145183975e-01\n9.07167886401487877e-02\n4.03176632743259961e-02\n-3.08937067660480201e-02\n-9.50197467436199178e-02\n-1.20671233953722382e-01\n-8.87192318880790087e-02\n-7.08276467892223708e-03\n8.56085944462449677e-02\n1.35152705581316646e-01\n1.03332173110174272e-01\n-6.14700408746527544e-04\n-1.13407848082936150e-01\n-1.51830023931439240e-01\n-7.47838891787420273e-02\n7.10871841639113822e-02\n1.70574311901017184e-01\n1.28545134321023768e-01\n-3.63915548914810483e-02\n-1.86722057113672152e-01\n-1.78649335417955496e-01\n-2.20488941581975170e-04\n2.08855991347601716e-01\n2.91125010410327456e-01\n2.19570234180944984e-01\n9.60062114660033827e-02\n1.94666978175671510e-02\n1.31903813801630184e-02\n2.28464107216528392e-02\n2.94603117105266925e-02\n3.46956791944267526e-02\n3.88819421102252760e-02\n4.19742774918826708e-02\n4.37233072262744743e-02\n4.37378217068104397e-02\n4.15334539402540254e-02\n3.65951662152310189e-02\n2.84667547992090778e-02\n1.68733763307529379e-02\n1.87490790041450130e-03\n-1.59638706711620476e-02\n-3.54162573099997963e-02\n-5.44982986377580900e-02\n-7.05003721866718502e-02\n-8.02178756650071684e-02\n-8.04394809693632640e-02\n-6.87050569942070088e-02\n-4.42585895605561927e-02\n-8.99849455773306037e-03\n3.19055714810088376e-02\n7.01498839382146550e-02\n9.55750731562852590e-02\n9.87349273106230135e-02\n7.44226914669701284e-02\n2.51647195281416505e-02\n-3.69090657430746899e-02\n-9.15593678660370641e-02\n-1.16307760664997678e-01\n-9.58818248045765348e-02\n-3.19183817395831612e-02\n5.24267274325956323e-02\n1.18104772756083096e-01\n1.27308973432016415e-01\n6.62597068162005115e-02\n-3.92415634021834533e-02\n-1.29539671625641978e-01\n-1.42771377463052629e-01\n-5.86490112828728996e-02\n7.57163806951873242e-02\n1.65888400295649274e-01\n1.35084443182820063e-01\n-8.29187633834562940e-03\n-1.60785171721158859e-01\n-1.96348395644149659e-01\n-7.17799562076222863e-02\n1.29859874280147336e-01\n2.68171573304580024e-01\n2.66743746399737525e-01\n1.66541405062585135e-01\n6.33521812228231979e-02\n1.14502929202138122e-02\n0.0\n4.45744943089011216e-04\n1.72636274123991336e-03\n4.08158643598752289e-03\n7.69089555600623032e-03\n1.26721130936884238e-02\n1.90596458119727460e-02\n2.67686603140699642e-02\n3.55493217241423590e-02\n4.49370933664218555e-02\n5.42088523052173463e-02\n6.23594222773717691e-02\n6.81180657423985231e-02\n7.00278240561912485e-02\n6.66097891293683797e-02\n5.66261322373011328e-02\n3.94366126054330052e-02\n1.54112206810232584e-02\n-1.36820937199470041e-02\n-4.44435182727646941e-02\n-7.19262378116934803e-02\n-9.02043993083213175e-02\n-9.35218578106773030e-02\n-7.79634519769768081e-02\n-4.33467287594380135e-02\n5.25174962107572557e-03\n5.71350549656896786e-02\n9.75685135570537043e-02\n1.11663424207301354e-01\n9.00276499249424711e-02\n3.44508721854072039e-02\n-3.91254665920011541e-02\n-1.03186598362792994e-01\n-1.28040998284860374e-01\n-9.59864889930845400e-02\n-1.41994460334935596e-02\n8.20002317316580465e-02\n1.41673731517484164e-01\n1.24896094027182200e-01\n3.09716509303495958e-02\n-9.11337424820288927e-02\n-1.64317987571234059e-01\n-1.31614136741621507e-01\n-2.19754415650772828e-03\n1.42465828199036804e-01\n1.98059872576358625e-01\n1.13845622821556275e-01\n-6.40787325102718103e-02\n-2.24856813047252996e-01\n-2.78544501245591658e-01\n-2.20518049834182689e-01\n-1.17850719674006135e-01\n-3.96231992639972525e-02\n-6.44318147553972487e-03\n1.37374167066705907e-02\n2.37939037006989831e-02\n3.06861135452021344e-02\n3.61583429174123228e-02\n4.05751321707897017e-02\n4.39221167536109208e-02\n4.59823564104407043e-02\n4.63987066085207941e-02\n4.47176807217809155e-02\n4.04424308560829698e-02\n3.31076281276507650e-02\n2.23827132898878622e-02\n8.20371180893351808e-03\n-9.07504737320460018e-03\n-2.85301925906582404e-02\n-4.85553317773962656e-02\n-6.68345551815553579e-02\n-8.04639890005490049e-02\n-8.62790492906943263e-02\n-8.14201004381737564e-02\n-6.41141842553151070e-02\n-3.45633443160977341e-02\n4.27854452810806120e-03\n4.63589971106370680e-02\n8.29702556480995529e-02\n1.04260973758116937e-01\n1.01834114375231474e-01\n7.20032050370928850e-02\n1.87360513632346022e-02\n-4.51122244027156588e-02\n-9.96714581648910775e-02\n-1.23690849054305191e-01\n-1.03035935519583580e-01\n-3.91468985318689094e-02\n4.69469854415466153e-02\n1.19176555494472189e-01\n1.40633090843310216e-01\n9.30905450008310542e-02\n-7.89258073084239675e-03\n-1.13485158926059815e-01\n-1.63051373788448278e-01\n-1.19336544958825203e-01\n2.60009943784379836e-03\n1.35144201663768643e-01\n1.94378068377403096e-01\n1.34277270624330702e-01\n-1.88234924432384917e-02\n-1.80992199006792198e-01\n-2.67911067344643594e-01\n-2.50900658641460328e-01\n-1.66834408875326912e-01\n-7.80669091883593180e-02\n-2.34881428806698114e-02\n-3.46365051004073922e-03\n0.0\n4.36364716672690064e-04\n1.69003328054584661e-03\n3.99613539186622225e-03\n7.53255383962509861e-03\n1.24209175800848101e-02\n1.87088185376052887e-02\n2.63392431863922680e-02\n3.51106610655019385e-02\n4.46323951178552447e-02\n5.42827218491375163e-02\n6.31809594589884116e-02\n7.01889199149067777e-02\n7.39603964574047090e-02\n7.30580734694003531e-02\n6.61530154084484234e-02\n5.23100694328768878e-02\n3.13409574101882055e-02\n4.17522748726658829e-03\n-2.68390775535542157e-02\n-5.78293231025137980e-02\n-8.36295369566060348e-02\n-9.84716781510742711e-02\n-9.71794257001688533e-02\n-7.67548931371297843e-02\n-3.80366348916189242e-02\n1.31140674369678925e-02\n6.57766588461322632e-02\n1.05684150102306654e-01\n1.18880091885416400e-01\n9.67611191085052252e-02\n4.10024349306476951e-02\n-3.38854437230729777e-02\n-1.02623456180703787e-01\n-1.36881144309314390e-01\n-1.17170619227812731e-01\n-4.44359787488773084e-02\n5.50399593038005813e-02\n1.36682409376519015e-01\n1.56858403636341737e-01\n9.69792039645505505e-02\n-2.07667752595295727e-02\n-1.38404236171193629e-01\n-1.90118514044654296e-01\n-1.40020376134851077e-01\n-6.22857471156943766e-03\n1.47294572852918193e-01\n2.48879250408018865e-01\n2.61960565552385283e-01\n2.01922856619018265e-01\n1.16433307178789441e-01\n4.84930717098800979e-02\n1.31879707955893551e-02\n1.77568669613813461e-03\n1.43725966140697096e-02\n2.48940675722611506e-02\n3.21092461207346663e-02\n3.78555964851384139e-02\n4.25374605187057997e-02\n4.61744795219713594e-02\n4.85858972409720577e-02\n4.94532120299246841e-02\n4.83597692521468697e-02\n4.48348169859586546e-02\n3.84142990015121991e-02\n2.87249914932985601e-02\n1.55938751964677831e-02\n-8.21682870291436367e-04\n-1.98962033602725907e-02\n-4.04153398556952106e-02\n-6.05089084282605313e-02\n-7.76848473097349196e-02\n-8.90147309832011041e-02\n-9.15116283444872142e-02\n-8.27111952692129587e-02\n-6.14124904610336281e-02\n-2.84579449554186459e-02\n1.26550210377481629e-02\n5.56077823726645881e-02\n9.18276476347358317e-02\n1.11981650804670901e-01\n1.08356295699645916e-01\n7.77169479279901515e-02\n2.38225341243050344e-02\n-4.15342591614952655e-02\n-1.00057836229482430e-01\n-1.31572100203631775e-01\n-1.21092931393669431e-01\n-6.62269521976993486e-02\n1.83949663931030384e-02\n1.02936132690134560e-01\n1.51868306346414766e-01\n1.39061008629654592e-01\n6.23704964590312619e-02\n-5.03326757257929400e-02\n-1.49517289372706780e-01\n-1.85707001288336643e-01\n-1.34962455369965623e-01\n-1.37089905555442398e-02\n1.27719649922699519e-01\n2.31216596931045376e-01\n2.61608605370020730e-01\n2.22458487433008056e-01\n1.47409873602287467e-01\n7.52900740181012967e-02\n2.82610159991949460e-02\n7.00488742165811945e-03\n8.66327631009855981e-04\n0.0\n4.24716541926969721e-04\n1.64492009374195801e-03\n3.88990290545276635e-03\n7.33496699420784805e-03\n1.21047466923559985e-02\n1.82594200751713814e-02\n2.57695168167129431e-02\n3.44821743862011032e-02\n4.40822746960556622e-02\n5.40538754263719390e-02\n6.36501823486729928e-02\n7.18835460201252552e-02\n7.75499042909627290e-02\n7.93036138744146607e-02\n7.57971535964474530e-02\n6.58938572758514113e-02\n4.89488397938734193e-02\n2.51326152670412299e-02\n-4.25554661493638114e-03\n-3.65676751104894032e-02\n-6.77883473425860972e-02\n-9.28312244945379561e-02\n-1.06237363279049327e-01\n-1.03286283205342652e-01\n-8.14025686203114357e-02\n-4.15740587796993022e-02\n1.06657445634474688e-02\n6.52272341155609447e-02\n1.08888157143900585e-01\n1.28302181049697261e-01\n1.14188440764840415e-01\n6.56088940574189455e-02\n-7.32667585721766528e-03\n-8.40743952642366010e-02\n-1.38617827543337763e-01\n-1.48218772652829289e-01\n-1.03343052677907873e-01\n-1.45404824464651049e-02\n8.79459084041190470e-02\n1.63714166332522282e-01\n1.78441525124559019e-01\n1.20008400713439115e-01\n6.03599423466460831e-03\n-1.22528980383280667e-01\n-2.19901251064949649e-01\n-2.56635041320941004e-01\n-2.31619574785503879e-01\n-1.68266825327890945e-01\n-9.84138000817816189e-02\n-4.52038492246722365e-02\n-1.54439551722007698e-02\n-3.51332354568766872e-03\n-4.01209870655583789e-04\n1.51313726005056649e-02\n2.62083061323314208e-02\n3.38090119853688975e-02\n3.98814167092347918e-02\n4.48758987263892309e-02\n4.88505479570455481e-02\n5.16652854410474191e-02\n5.30456356670836390e-02\n5.26187543701230678e-02\n4.99493396302746057e-02\n4.45871595981842880e-02\n3.61326473136530518e-02\n2.43234929950285755e-02\n9.14090719894448261e-03\n-9.07171364069021650e-03\n-2.94928288086462390e-02\n-5.07338144411135922e-02\n-7.08103963633672367e-02\n-8.72139470416004176e-02\n-9.71214247517727947e-02\n-9.77704406164060513e-02\n-8.69977303652302442e-02\n-6.38932362468897508e-02\n-2.94612510961103739e-02\n1.28841992847404559e-02\n5.72095175234924036e-02\n9.55574777611478826e-02\n1.19192039765783561e-01\n1.20560059409219017e-01\n9.56731515790482934e-02\n4.63126274296018978e-02\n-1.87683620736852283e-02\n-8.44846356900104956e-02\n-1.32405850058185642e-01\n-1.45873222280543502e-01\n-1.16051898344467053e-01\n-4.68397834069940525e-02\n4.37449382354942878e-02\n1.27348526977198784e-01\n1.74053209420644922e-01\n1.63527202461992177e-01\n9.40566480268874711e-02\n-1.51042973339011125e-02\n-1.30210319966753613e-01\n-2.16262891588732298e-01\n-2.51059173210512632e-01\n-2.33083265861574074e-01\n-1.79326566857817032e-01\n-1.14815271669170466e-01\n-6.03315427179254918e-02\n-2.52081557421919740e-02\n-7.90203237684816533e-03\n-1.65972842572032191e-03\n-1.75827110682770846e-04\n0.0\n4.10133875002651523e-04\n1.58844166760078380e-03\n3.75677571713788159e-03\n7.08655613586924287e-03\n1.17043052816422737e-02\n1.76818249586054299e-02\n2.50164508438776335e-02\n3.36037441230094269e-02\n4.32050553985606628e-02\n5.34136475383336362e-02\n6.36250087334067488e-02\n7.30193400893967975e-02\n8.05665636492809284e-02\n8.50659268237259486e-02\n8.52324461910044795e-02\n7.98398465973162441e-02\n6.79230206902283057e-02\n4.90313102181439558e-02\n2.35068326302730196e-02\n-7.25910138400698551e-03\n-4.06601730371209807e-02\n-7.28844855453294749e-02\n-9.91850321269397706e-02\n-1.14473070113130224e-01\n-1.14238791373975621e-01\n-9.57107701787344167e-02\n-5.90477966393163980e-02\n-8.24137282885424247e-03\n4.86606876987422735e-02\n1.00364710388085129e-01\n1.34347920298959089e-01\n1.39912314466251991e-01\n1.11661683776504136e-01\n5.23756893636904836e-02\n-2.59258659079200648e-02\n-1.03688327945683889e-01\n-1.58494126522584738e-01\n-1.71751838931017031e-01\n-1.35319821007725410e-01\n-5.54356038813463084e-02\n4.81400545505175984e-02\n1.48150388191574611e-01\n2.19117654804296735e-01\n2.46142257856869690e-01\n2.29350265862446834e-01\n1.82019311709178427e-01\n1.23557863055559491e-01\n7.11157888754909151e-02\n3.40067256039742263e-02\n1.30417564963110910e-02\n3.77607818977564007e-03\n7.36077159162900436e-04\n7.26398299882715184e-05\n1.60739277925643353e-02\n2.78408596139148798e-02\n3.59200283940193724e-02\n4.23952916656835446e-02\n4.77718771764658323e-02\n5.21522120911862633e-02\n5.54425381798141770e-02\n5.74189646654179389e-02\n5.77608600792126337e-02\n5.60796503064463145e-02\n5.19542530105970013e-02\n4.49792142286583943e-02\n3.48289156708487951e-02\n2.13385177948136502e-02\n4.59867681922630517e-03\n-1.49438277639784897e-02\n-3.63935168292326416e-02\n-5.83423418412471334e-02\n-7.88611963319175435e-02\n-9.55767975204433740e-02\n-1.05861824479378738e-01\n-1.07155667342881705e-01\n-9.74116649732872791e-02\n-7.56335234277433488e-02\n-4.24212916764442685e-02\n-4.03267863819365985e-04\n4.56024190695642762e-02\n8.88563797054604115e-02\n1.21512455138387043e-01\n1.35989657894285687e-01\n1.26751477834528059e-01\n9.21507026393084128e-02\n3.58316563055619125e-02\n-3.28817111322409067e-02\n-1.00067454130904288e-01\n-1.49877441239323783e-01\n-1.68403586121978061e-01\n-1.47785667226970285e-01\n-8.92360729332575264e-02\n-3.70852806048681954e-03\n9.04574907499840347e-02\n1.72527614699471560e-01\n2.25472203272804012e-01\n2.40970234178684961e-01\n2.21344865030596388e-01\n1.77659272918418265e-01\n1.24887677184833776e-01\n7.63871647006718474e-02\n4.00726888458521682e-02\n1.76088313709258822e-02\n6.24348230721385403e-03\n1.67913681154612101e-03\n3.05153719786121558e-04\n2.81577151012393878e-05\n0.0\n3.91534166632759751e-04\n1.51640530683987834e-03\n3.58682639741628086e-03\n6.76852570634909733e-03\n1.11882995644198794e-02\n1.69280592985262511e-02\n2.40105298661628559e-02\n3.23785667471427063e-02\n4.18697365235065136e-02\n5.21884561944174763e-02\n6.28791674331128231e-02\n7.33055488411099576e-02\n8.26424379302037465e-02\n8.98886277511803944e-02\n9.39095444433422216e-02\n9.35183584764687215e-02\n8.76015704523540745e-02\n7.52897823347477152e-02\n5.61656853694452660e-02\n3.04892926673159363e-02\n-5.93895461274068087e-04\n-3.49104420259079493e-02\n-6.92413076982559134e-02\n-9.94892234941436165e-02\n-1.21077412535332815e-01\n-1.29592070073196647e-01\n-1.21625853380820242e-01\n-9.57083027112944768e-02\n-5.31353829500186559e-02\n1.54301546168622268e-03\n6.06232435379248924e-02\n1.14110698754120110e-01\n1.51362712574402425e-01\n1.63300736247030676e-01\n1.44734867026931863e-01\n9.61653391819767972e-02\n2.44116170246937748e-02\n-5.83619554834993032e-02\n-1.37211510575048351e-01\n-1.98001211261454396e-01\n-2.30980084043844985e-01\n-2.33171839102530781e-01\n-2.08718072291375428e-01\n-1.67037090482410472e-01\n-1.19511659414308968e-01\n-7.60023635636192796e-02\n-4.24867536969316950e-02\n-2.05232973206204948e-02\n-8.35120698042898443e-03\n-2.75409258010408291e-03\n-6.91342880223336773e-04\n-1.17601710026707122e-04\n-1.01809410227329141e-05\n1.73142385062629960e-02\n2.99891407872129728e-02\n3.86972212375147340e-02\n4.56991713132726754e-02\n5.15686771827768980e-02\n5.64609918732461788e-02\n6.03362847071290676e-02\n6.30296978455178319e-02\n6.42833731919018186e-02\n6.37695082719708650e-02\n6.11153176210453841e-02\n5.59354488515506343e-02\n4.78751616285043591e-02\n3.66659132857607012e-02\n2.21930352300981314e-02\n4.57255874471023446e-03\n-1.57691577217985851e-02\n-3.80234061975136955e-02\n-6.09493962081463572e-02\n-8.28651900377718881e-02\n-1.01699595856760694e-01\n-1.15123907265013703e-01\n-1.20776028977611347e-01\n-1.16576905068170741e-01\n-1.01119868883054229e-01\n-7.40888385391721832e-02\n-3.66348372708748676e-02\n8.38151738272894554e-03\n5.63824888297724258e-02\n1.01387539057231635e-01\n1.36692459657702853e-01\n1.55881372986965278e-01\n1.54042592576774939e-01\n1.28961233247412349e-01\n8.19941534592590754e-02\n1.83317004315704524e-02\n-5.35579153115345249e-02\n-1.23320292863820458e-01\n-1.80716595032782396e-01\n-2.17777856837281347e-01\n-2.30527938319611547e-01\n-2.19746877938707397e-01\n-1.90503800986134925e-01\n-1.50581953372353500e-01\n-1.08304540714268496e-01\n-7.04812293386346406e-02\n-4.11221580566182784e-02\n-2.12280489578181679e-02\n-9.51696532158494146e-03\n-3.60853639144501472e-03\n-1.11248378072354727e-03\n-2.61752990069481989e-04\n-4.18260461692480806e-05\n-3.40761177012556027e-06\n0.0\n3.66959882542076889e-04\n1.42122951381169369e-03\n3.36210572066328404e-03\n6.34690570627162269e-03\n1.05002185083176245e-02\n1.59116207694731428e-02\n2.26267050676314599e-02\n3.06330858529632669e-02\n3.98424520523596518e-02\n5.00699289810165038e-02\n6.10125874831420958e-02\n7.22297614591857762e-02\n8.31288105095122076e-02\n9.29609632402605690e-02\n1.00832704120185274e-01\n1.05738547873156175e-01\n1.06620629601431052e-01\n1.02458930349911437e-01\n9.23927823996966990e-02\n7.58693132000534398e-02\n5.28077308711151217e-02\n2.37603254909287166e-02\n-9.95712212093946211e-03\n-4.61993436634957483e-02\n-8.20262057931313154e-02\n-1.13869676775478504e-01\n-1.37851123167782197e-01\n-1.50242854057047931e-01\n-1.48034790953508161e-01\n-1.29529870916652662e-01\n-9.48587192067526924e-02\n-4.62864969378610769e-02\n1.18057697311982519e-02\n7.33386825124537484e-02\n1.31345094553465797e-01\n1.79067062964682611e-01\n2.11134291033677202e-01\n2.24557559986229560e-01\n2.19276521565556826e-01\n1.98089865834005563e-01\n1.65954571691060732e-01\n1.28825618884793325e-01\n9.23534269377264683e-02\n6.08023549606768882e-02\n3.64721604211785330e-02\n1.97207726006426547e-02\n9.47510758213759678e-03\n3.96744885625055759e-03\n1.40905301377720958e-03\n4.07858136188850762e-04\n9.02808772608275622e-05\n1.35948338290090053e-05\n1.04525577454697264e-06\n1.91074922146122726e-02\n3.30951473209352212e-02\n4.27113229451092924e-02\n5.04689038731323536e-02\n5.70341959140066787e-02\n6.26292892182061106e-02\n6.72798305017579534e-02\n7.08919894023898461e-02\n7.32850201088077469e-02\n7.42104714446253505e-02\n7.33689199219573485e-02\n7.04292822900998150e-02\n6.50536246274991542e-02\n5.69292660291016925e-02\n4.58090200377295476e-02\n3.15592813471376396e-02\n1.42141951806199068e-02\n-5.96769746569422548e-03\n-2.84500916726818341e-02\n-5.23768232327830735e-02\n-7.65510201983962274e-02\n-9.94466681100041189e-02\n-1.19263511393867136e-01\n-1.34033837163341607e-01\n-1.41784593900039307e-01\n-1.40750231092598405e-01\n-1.29620945735664739e-01\n-1.07798869087683172e-01\n-7.56232859282175984e-02\n-3.45183057602549137e-02\n1.29839813228511802e-02\n6.33817891694133384e-02\n1.12518221696665421e-01\n1.56054165001373341e-01\n1.90042817705186495e-01\n2.11513450166799066e-01\n2.18950293706198507e-01\n2.12555357504600473e-01\n1.94217343718217750e-01\n1.67170036296487967e-01\n1.35399501149208928e-01\n1.02928492804268773e-01\n7.31446059788394692e-02\n4.83288634427828379e-02\n2.94822240381722236e-02\n1.64568819830216533e-02\n8.30956956818607040e-03\n3.73913307668382591e-03\n1.46991086309169973e-03\n4.91131862453762606e-04\n1.33978985150622141e-04\n2.79921198337420664e-05\n3.98372563583590420e-06\n2.89799366510791881e-07\n0.0\n3.32194153431784542e-04\n1.28658242394877288e-03\n3.04395248937549363e-03\n5.74855501367278580e-03\n9.51848718682642668e-03\n1.44466867672838548e-02\n2.05969799615981115e-02\n2.79966168370738011e-02\n3.66259944243116434e-02\n4.64061674078826078e-02\n5.71849044087459207e-02\n6.87223545056544205e-02\n8.06777946920423095e-02\n9.25993912356201654e-02\n1.03919368666660752e-01\n1.13957357293880568e-01\n1.21934873630260482e-01\n1.27003742714495216e-01\n1.28290648555963921e-01\n1.24958760155906332e-01\n1.16285432816010517e-01\n1.01752328078826851e-01\n8.11410782839954853e-02\n5.46241877006629489e-02\n2.28377799915686873e-02\n-1.30791529340581504e-02\n-5.14942745559634277e-02\n-9.03525246790341102e-02\n-1.27313779848032160e-01\n-1.59953720765013935e-01\n-1.86011825417783105e-01\n-2.03657627736845204e-01\n-2.11735938331084311e-01\n-2.09946943164212474e-01\n-1.98920931899020714e-01\n-1.80161357497059055e-01\n-1.55852997780966285e-01\n-1.28560136688114807e-01\n-1.00866187474839442e-01\n-7.50231706553934202e-02\n-5.26804133110918976e-02\n-3.47443210577534425e-02\n-2.13885826966255174e-02\n-1.21959158151254132e-02\n-6.38065181933980107e-03\n-3.02668916927682687e-03\n-1.28202725646215862e-03\n-4.75227111642556957e-04\n-1.49947666496689591e-04\n-3.86787800921236134e-05\n-7.64991767823021528e-06\n-1.03162619105145792e-06\n-7.11727270094755198e-08\n2.22233950526373736e-02\n3.84920493478427550e-02\n4.96836972195509041e-02\n5.87424102829410336e-02\n6.64825552975064765e-02\n7.32228621029596266e-02\n7.90766144885018119e-02\n8.40418320312709827e-02\n8.80378687730012793e-02\n9.09237597915447532e-02\n9.25100325499288167e-02\n9.25688759759794866e-02\n9.08451537191181380e-02\n8.70697309761732097e-02\n8.09760290402858629e-02\n7.23202879856806174e-02\n6.09055604200056597e-02\n4.66089119888620437e-02\n2.94106457560643804e-02\n9.42361318394903391e-03\n-1.30801212811563969e-02\n-3.76487347977027403e-02\n-6.36402362768282437e-02\n-9.02263803458306923e-02\n-1.16414702281857504e-01\n-1.41091344339577707e-01\n-1.63085376249083508e-01\n-1.81252524727212733e-01\n-1.94572822570991649e-01\n-2.02253093287110747e-01\n-2.03822048145622020e-01\n-1.99203889648505689e-01\n-1.88756502329110204e-01\n-1.73263182562715223e-01\n-1.53872578698153267e-01\n-1.31989577982991574e-01\n-1.09129017026491887e-01\n-8.67523825568913137e-02\n-6.61129024919812208e-02\n-4.81347198514419441e-02\n-3.33463234917929577e-02\n-2.18777619770118351e-02\n-1.35177403818125159e-02\n-7.81402559823615554e-03\n-4.19231889887528453e-03\n-2.06736227306556549e-03\n-9.25768701480140024e-04\n-3.70686525736661028e-04\n-1.30049383359951098e-04\n-3.88782396382919467e-05\n-9.51060805899616692e-06\n-1.78534484520379657e-06\n-2.28684038667992010e-07\n-1.49952799718404653e-08\n0.0\n2.74463457662538202e-04\n1.06299240066951494e-03\n2.51526960737660310e-03\n4.75202467243123362e-03\n7.87530710352245950e-03\n1.19719034754137456e-02\n1.71136509636654228e-02\n2.33558483152319710e-02\n3.07342652837538921e-02\n3.92610363547748822e-02\n4.89196784859429676e-02\n5.96595041372957324e-02\n7.13897770143607779e-02\n8.39740623918035084e-02\n9.72253437851166857e-02\n1.10902598425225554e-01\n1.24709626565602777e-01\n1.38296990126376640e-01\n1.51267906022877791e-01\n1.63188827827325994e-01\n1.73605206976958859e-01\n1.82062530254015087e-01\n1.88132178290921825e-01\n1.91440959859783932e-01\n1.91702401431215974e-01\n1.88747102246296344e-01\n1.82548830879709578e-01\n1.73242696140772479e-01\n1.61131834263395141e-01\n1.46679747393736182e-01\n1.30486764784567333e-01\n1.13251021444966501e-01\n9.57166557854171596e-02\n7.86142637169720826e-02\n6.26005441923127154e-02\n4.82050349024036387e-02\n3.57914685410984090e-02\n2.55394174707919558e-02\n1.74487212602770503e-02\n1.13652681188647041e-02\n7.02288103432190114e-03\n4.09328316987618741e-03\n2.23513115948718042e-03\n1.13419369478964653e-03\n5.29595656555220998e-04\n2.24784885962122630e-04\n8.53899177695609967e-05\n2.84447586608789554e-05\n8.08011782122011347e-06\n1.87943115492515998e-06\n3.35665375111429135e-07\n4.09276950695151863e-08\n2.55585931069274301e-09\n3.16514448885679006e-02\n5.48219106799658421e-02\n7.07721562054471620e-02\n8.37263152893453488e-02\n9.49014887324240164e-02\n1.04839677583334623e-01\n1.13824724550441500e-01\n1.22013317138431054e-01\n1.29488303287652873e-01\n1.36284187352903541e-01\n1.42400915452724458e-01\n1.47812250458059846e-01\n1.52471573633644220e-01\n1.56316544521937190e-01\n1.59273411725599112e-01\n1.61261441374869335e-01\n1.62197737765394173e-01\n1.62002593649098414e-01\n1.60605389469786058e-01\n1.57950944569431317e-01\n1.54006103131884314e-01\n1.48766215079592423e-01\n1.42261055301235284e-01\n1.34559626993048326e-01\n1.25773234518521349e-01\n1.16056208532606064e-01\n1.05603741130757947e-01\n9.46464565828445958e-02\n8.34416088798365929e-02\n7.22611505998661530e-02\n6.13773287268006146e-02\n5.10468813737446278e-02\n4.14952664097460039e-02\n3.29025712519096236e-02\n2.53927605495337973e-02\n1.90276672199554651e-02\n1.38066172976795097e-02\n9.67185175959667763e-03\n6.51907871920351812e-03\n4.21171111762104738e-03\n2.59678520905733470e-03\n1.52035071182400790e-03\n8.40338225334607788e-04\n4.35505440722084734e-04\n2.09901034156514282e-04\n9.31563737208929236e-05\n3.76059714528050360e-05\n1.35949107456459714e-05\n4.31210506616191218e-06\n1.16691423510214357e-06\n2.58689632467477203e-07\n4.40523118378444988e-08\n5.12328817116275901e-09\n3.05266837188812996e-10\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.08472742381388542e-03\n-4.20113124760565244e-03\n-9.90251969648426981e-03\n-1.84771170763622303e-02\n-2.97864244518314635e-02\n-4.29935124003884145e-02\n-5.62502048776087268e-02\n-6.64805016337743915e-02\n-6.94951639769335328e-02\n-6.07489836031443048e-02\n-3.70087187849701890e-02\n1.10930973807619473e-03\n4.64683006843350233e-02\n8.43432667407494757e-02\n9.54507151085634137e-02\n6.49196479072799287e-02\n-4.37546628453371750e-03\n-8.19387104591041138e-02\n-1.16402125826386982e-01\n-6.80514713575707669e-02\n4.51112437681951625e-02\n1.31643108854483243e-01\n9.06119505406491887e-02\n-6.35740425963955968e-02\n-1.55664101856450132e-01\n-3.25463011982652650e-02\n1.61062963962556399e-01\n9.14113873640488572e-02\n-1.71651781820813254e-01\n-9.17992460712520608e-02\n2.26861122079491717e-01\n-2.74638834186305171e-02\n-2.38715686972268110e-01\n3.27133758028667565e-01\n-2.52461693632194173e-01\n1.37970366908697711e-01\n-5.77226737959510572e-02\n1.91900278708997951e-02\n-5.17285234812659821e-03\n1.14295039404465238e-03\n-2.07983783328855249e-04\n3.11689067087047306e-05\n-3.82973710685585953e-06\n3.82261697502359940e-07\n-3.05284349905734929e-08\n1.90534375715001719e-09\n-8.95713424979161803e-11\n2.98382267775662062e-12\n-6.28005580839250896e-14\n6.28036983473509968e-16\n0.0\n0.0\n0.0\n0.0\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n-3.20283468138268617e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n8.08445165689827342e-13\n-1.63282067007192764e-14\n0.0\n0.0\n0.0\n-1.49153584618682711e-02\n-2.58341586690582249e-02\n-3.32116220033397275e-02\n-3.86332886759592903e-02\n-4.19352060972968538e-02\n-4.22859974032437497e-02\n-3.84603343591977051e-02\n-2.91354456526192324e-02\n-1.33735769422542814e-02\n8.66375493142438995e-03\n3.48542512856124601e-02\n6.03977488262971221e-02\n7.77935527381269643e-02\n7.82387419341021156e-02\n5.50015082023348201e-02\n8.46471169411793130e-03\n-4.91546484099385228e-02\n-9.33789301143736900e-02\n-9.58451624442848149e-02\n-4.24753634491714521e-02\n4.65584996049520153e-02\n1.13675365442407236e-01\n9.62111172949670912e-02\n-1.20719355238242849e-02\n-1.22543885941844538e-01\n-1.08867617260667501e-01\n4.32122795008925698e-02\n1.55525846583246002e-01\n4.44856381102336565e-02\n-1.56679204868117705e-01\n-9.27910168036672200e-02\n1.70832186850680245e-01\n8.35132884230644357e-02\n-2.25539034459328630e-01\n4.43192212140970654e-02\n2.19269242183260410e-01\n-3.21854692028745448e-01\n2.60382927692662802e-01\n-1.49103608459652814e-01\n6.56033227650731493e-02\n-2.30603343843918986e-02\n6.61577618876218760e-03\n-1.56781788023062688e-03\n3.08791591122133168e-04\n-5.06329993144556269e-05\n6.89739006530945087e-06\n-7.75957347905360304e-07\n7.13509751266757394e-08\n-5.27725011601396538e-09\n3.06437392918077032e-10\n-1.34576262686770477e-11\n4.20315987260463183e-13\n-8.32111971795923090e-15\n0.0\n0.0\n0.0\n-9.31231485683661287e-04\n-3.60664403551681084e-03\n-8.50602400394575263e-03\n-1.59003845831766355e-02\n-2.57379331178424903e-02\n-3.74429022893153773e-02\n-4.96727203528201863e-02\n-6.01209842233804345e-02\n-6.55188921569456323e-02\n-6.20485584438564761e-02\n-4.63832477729556533e-02\n-1.74258908623226814e-02\n2.15613643306100493e-02\n6.13677159501424679e-02\n8.73740714402345270e-02\n8.39387467097887224e-02\n4.30735753536244936e-02\n-2.54205416613427181e-02\n-8.96319597239925298e-02\n-1.06347499921684019e-01\n-5.01739831038397407e-02\n5.32299261477481092e-02\n1.23700123221912733e-01\n8.28396897050736464e-02\n-5.28775536891320994e-02\n-1.43085570967639686e-01\n-5.61977132639769339e-02\n1.23816025006318553e-01\n1.28765238917973951e-01\n-9.31608526655434005e-02\n-1.63492650510438126e-01\n1.06861882743359851e-01\n1.62491258203155242e-01\n-1.96459220801137896e-01\n-4.41807868984634977e-02\n2.70804866571520197e-01\n-3.14111437351427047e-01\n2.26653503225050040e-01\n-1.19973760107645350e-01\n4.96384679318883706e-02\n-1.65764998398732176e-02\n4.54921289331997394e-03\n-1.03647975975075567e-03\n1.97023114024771396e-04\n-3.12759943321989361e-05\n4.13512897657961669e-06\n-4.52475045531942631e-07\n4.05416570728018662e-08\n-2.92645637485853674e-09\n1.66078551450348462e-10\n-7.13697837991790340e-12\n2.18361705890636816e-13\n-4.23906791088685720e-15\n0.0\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367363e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n-1.61942344080973289e-09\n8.98653833493966699e-11\n-3.78065778735820891e-12\n1.13361214079692652e-13\n-2.15878791904814791e-15\n0.0\n8.66426047764552840e-04\n3.35565365371242501e-03\n7.91595443084345055e-03\n1.48087344978570980e-02\n2.40121934498876630e-02\n3.50470844797404965e-02\n4.67621537451872737e-02\n5.71499205294295071e-02\n6.33170572602035214e-02\n6.17867458500721278e-02\n4.93218215401055385e-02\n2.43605773569870315e-02\n-1.11229334763186093e-02\n-5.00111894576891411e-02\n-7.99363085453404787e-02\n-8.61829356704887223e-02\n-5.84006514722374415e-02\n3.58940229482597776e-04\n6.73683490910389760e-02\n1.04547897847193039e-01\n7.88234561964185065e-02\n-7.40196344727397145e-03\n-9.89024440883244094e-02\n-1.13935536034448268e-01\n-1.85003343777213544e-02\n1.09092261688566117e-01\n1.21812489154462897e-01\n-2.46754972559791140e-02\n-1.53724638728994389e-01\n-5.40369786300429894e-02\n1.52844124485929489e-01\n9.28820650447558793e-02\n-1.70534777166068824e-01\n-7.46582530210938983e-02\n2.23693329402947061e-01\n-6.04428648778056812e-02\n-1.99685494680089226e-01\n3.15424575732289769e-01\n-2.67266406134374912e-01\n1.60001492639399556e-01\n-7.37993799662741007e-02\n2.73166714845997499e-02\n-8.29850452787542735e-03\n2.09615300256641487e-03\n-4.43432899576961322e-04\n7.88025564301311331e-05\n-1.17598018378678287e-05\n1.46840532288151399e-06\n-1.52341139845976699e-07\n1.29853215619237565e-08\n-8.94333513020322284e-10\n4.85518037701355783e-11\n-2.00053468434833568e-12\n5.88100400988433593e-14\n1.38775648385790068e-02\n2.40366473857502247e-02\n3.09183376927100149e-02\n3.60490110866714675e-02\n3.93682703078595542e-02\n4.02329121179938673e-02\n3.76476647717229468e-02\n3.04822304143377576e-02\n1.78148420603557490e-02\n-5.49493293180726840e-04\n-2.34201922161792198e-02\n-4.75864693423650661e-02\n-6.75475918537050551e-02\n-7.61070536214551313e-02\n-6.63258440415182837e-02\n-3.49512535853120088e-02\n1.34896496535019863e-02\n6.41090627526219453e-02\n9.38543479864410168e-02\n8.10994027665983136e-02\n2.12923912180138231e-02\n-5.98341884996863235e-02\n-1.10030524056330112e-01\n-8.17948212773452893e-02\n1.99064348515221000e-02\n1.15539923940347122e-01\n1.02747525542275245e-01\n-2.93739623914327161e-02\n-1.40726818170620382e-01\n-7.11091388755192705e-02\n1.14989793196826451e-01\n1.32918431505758633e-01\n-8.91485417183863205e-02\n-1.61387508239882377e-01\n1.10055601699256336e-01\n1.53322920048713257e-01\n-2.00539512712531814e-01\n-2.47180274398494312e-02\n2.54306170934596121e-01\n-3.12462048980527318e-01\n2.35681063631851012e-01\n-1.30404128946312675e-01\n5.65779096716435281e-02\n-1.99041935277143658e-02\n5.78688142169003685e-03\n-1.40596016281414383e-03\n2.87177007748138670e-04\n-4.94265797874700931e-05\n7.16154736544445315e-06\n-8.70066637554330904e-07\n8.79840153153714664e-08\n-7.32143270574096396e-09\n4.92939770466701676e-10\n-2.61925496886000591e-11\n1.05747023582451444e-12\n0.0\n8.08158692342989915e-04\n3.12998515653716350e-03\n7.38517565752149635e-03\n1.38253132320619240e-02\n2.24522063933630805e-02\n3.28663626386842059e-02\n4.40769909952560268e-02\n5.43310572757454632e-02\n6.10631553156686172e-02\n6.11141009965063056e-02\n5.13829153887050347e-02\n3.00123716033360022e-02\n-1.99912992041950373e-03\n-3.92489735811246479e-02\n-7.14187172436417106e-02\n-8.50885006306404817e-02\n-6.88163708641761074e-02\n-2.08639639467000648e-02\n4.38628639729669381e-02\n9.38928414426828950e-02\n9.42769126249746459e-02\n3.17951926165290777e-02\n-6.21820057924962824e-02\n-1.16966777517995002e-01\n-7.26997949296024210e-02\n4.94382434623633349e-02\n1.32194169547041884e-01\n6.57987478006277354e-02\n-9.54888521621763270e-02\n-1.38115365157589182e-01\n3.28530164553997445e-02\n1.67792257111886223e-01\n1.30048521049586953e-03\n-1.88742910765101940e-01\n2.51320701308221928e-02\n2.04395439674644047e-01\n-1.48084466485667726e-01\n-1.07469414757189574e-01\n2.90187851903803029e-01\n-2.97112519015750698e-01\n2.02734630968114227e-01\n-1.04415761976262733e-01\n4.27882747149507525e-02\n-1.43458775460581483e-02\n3.99957789848109143e-03\n-9.36072935864134593e-04\n1.84837054629292984e-04\n-3.08416262170301266e-05\n4.34251259324340908e-06\n-5.13695069484046143e-07\n5.06657853082752451e-08\n-4.11821551403110582e-09\n2.71191472114882765e-10\n-1.41102151833627694e-11\n1.34110082885095135e-02\n2.32285477364258114e-02\n2.98860996054554594e-02\n3.48797786234479046e-02\n3.81892381223788158e-02\n3.92471829676002693e-02\n3.71538730469372011e-02\n3.08652396695146408e-02\n1.94853920076197493e-02\n2.71067763847296405e-03\n-1.85941472740467142e-02\n-4.18117164601599367e-02\n-6.22489781836327166e-02\n-7.34866556939571952e-02\n-6.88453932375441002e-02\n-4.41692459769204224e-02\n-1.44841254376531581e-03\n4.82920127164106483e-02\n8.54732402076973929e-02\n8.84366022246835387e-02\n4.60942565828406994e-02\n-2.84199156080339639e-02\n-9.42883172677429493e-02\n-1.01381495418001205e-01\n-2.96036179400583389e-02\n7.66130663395796219e-02\n1.22433390026080946e-01\n4.51895108600385148e-02\n-9.32860514910172911e-02\n-1.30432938458461017e-01\n8.20081992983317902e-03\n1.50931262325264132e-01\n6.15593609069964576e-02\n-1.49611746094279907e-01\n-9.18975496671960018e-02\n1.70628068541547301e-01\n6.53278764101584142e-02\n-2.21263159640423035e-01\n7.57862765817949313e-02\n1.80014718045661271e-01\n-3.07891757468296778e-01\n2.73094737405840060e-01\n-1.70599706566118642e-01\n8.22652000647926263e-02\n-3.19530648431656378e-02\n1.02346436590687109e-02\n-2.74111767195971785e-03\n6.18871018390315859e-04\n-1.18270476590769932e-04\n1.91502023000594468e-05\n-2.62231259216816210e-06\n3.02252308581942185e-07\n-2.90938782209820251e-08\n2.31116975543123349e-09\n-1.48928121109455270e-10\n0.0\n7.55578460578792250e-04\n2.92634279457469962e-03\n6.90600799850599884e-03\n1.29363300983407065e-02\n2.10376911072675983e-02\n3.08768236488992862e-02\n4.15981791441294158e-02\n5.16661078142204300e-02\n5.88016778013916441e-02\n6.01379021790062890e-02\n5.27364107796431322e-02\n3.45666628780188154e-02\n5.89504265383238111e-03\n-2.92676595184092718e-02\n-6.24162650888476569e-02\n-8.15792684392644823e-02\n-7.50796499560372615e-02\n-3.79476882498117618e-02\n2.12328593136595391e-02\n7.78173930557252286e-02\n9.85941149302572428e-02\n6.11661686758680906e-02\n-2.27622777262843357e-02\n-9.97514513295714444e-02\n-1.02888651705516226e-01\n-1.20807025458813250e-02\n1.01582608746744699e-01\n1.16455312491852439e-01\n-7.60805901610506555e-03\n-1.36066500044879080e-01\n-8.31897955472478273e-02\n1.06895593877290779e-01\n1.35737034603814116e-01\n-8.63403631011036010e-02\n-1.58775957631712761e-01\n1.13751534782348243e-01\n1.43731724342601119e-01\n-2.03878872101696557e-01\n-5.87789538391338996e-03\n2.37332242904563756e-01\n-3.09605301178792980e-01\n2.43864153707220865e-01\n-1.40753685790851485e-01\n6.38573485402233049e-02\n-2.35822617857203536e-02\n7.23183717829213590e-03\n-1.86373745437301173e-03\n4.06441527723909284e-04\n-7.52544596961842165e-05\n1.18349014785157664e-05\n-1.57729685808418275e-06\n1.77258137011227427e-07\n-1.66614437347434157e-08\n1.29420250386442746e-09\n1.29748046590291641e-02\n2.24730208877198974e-02\n2.89203443271613889e-02\n3.37826386444656790e-02\n3.70735103747419012e-02\n3.82919017737505599e-02\n3.66228434593737009e-02\n3.11018414527098330e-02\n2.08653274069167255e-02\n5.53264354674670028e-03\n-1.42895572599816070e-02\n-3.64739483838690190e-02\n-5.70233893226039165e-02\n-7.02447626055959923e-02\n-6.98370152504726310e-02\n-5.11337948913146156e-02\n-1.42477980967673293e-02\n3.30013877475572939e-02\n7.44602271615361216e-02\n8.97290742140010589e-02\n6.39803154654428746e-02\n6.62474528345230332e-04\n-7.10490007401951423e-02\n-1.04847531797734775e-01\n-6.65156353079946611e-02\n2.96532510682681640e-02\n1.11007035041306865e-01\n9.45749565926919389e-02\n-2.38279871472458146e-02\n-1.28234830255555182e-01\n-8.24577580450015779e-02\n8.23317203057432612e-02\n1.42175983326254834e-01\n-2.41581776181457111e-02\n-1.66715279399058058e-01\n-1.84856863588283085e-03\n1.86598622873165254e-01\n-3.24707272925996021e-02\n-1.97016239993091397e-01\n1.57410206751743498e-01\n8.71802057908291350e-02\n-2.77107436042824173e-01\n2.98443719543597608e-01\n-2.12349552082682469e-01\n1.14072588013370668e-01\n-4.88923977799044437e-02\n1.72137949930847300e-02\n-5.06402983072517469e-03\n1.25767317036228066e-03\n-2.65243772937648044e-04\n4.76286954356546386e-05\n-7.28115775407417099e-06\n9.45147478149082695e-07\n-1.03626854141031361e-07\n9.51685224181556748e-09\n0.0\n7.07968488715487575e-04\n2.74195016643471708e-03\n6.47197520841484748e-03\n1.21301141149080405e-02\n1.97513298530841638e-02\n2.90575945793569435e-02\n3.93078708330475285e-02\n4.91529012662425407e-02\n5.65642447017429412e-02\n5.89415058818410012e-02\n5.35217425912010991e-02\n3.81887577762012043e-02\n1.26659863802208953e-02\n-2.01568873682223502e-02\n-5.33481352313809679e-02\n-7.64032813109597753e-02\n-7.79635215846214008e-02\n-5.10203875232878162e-02\n7.47645039672664583e-04\n5.90476666753959115e-02\n9.43974333203616567e-02\n8.01097842127733856e-02\n1.32861222977138736e-02\n-7.08424179116465824e-02\n-1.10292460231499773e-01\n-6.09612044250449625e-02\n5.06065625403030739e-02\n1.23451269691122634e-01\n6.74739501839395905e-02\n-7.65659296418580576e-02\n-1.35657470885995363e-01\n-6.18618647180836558e-03\n1.47624469664143609e-01\n6.73650512139389035e-02\n-1.46985778465230976e-01\n-9.00015595357351872e-02\n1.70992902684906550e-01\n5.56035135363378979e-02\n-2.18203911549614160e-01\n9.03043044067258355e-02\n1.60312300054577500e-01\n-2.99307131693407946e-01\n2.77854027722973795e-01\n-1.80836553482089823e-01\n9.09536070344159620e-02\n-3.69603142724853131e-02\n1.24360806238899921e-02\n-3.51588474112001989e-03\n8.42644246989619110e-04\n-1.72057073015557260e-04\n2.99909204757225489e-05\n-4.46030125570664008e-06\n5.64299899789155604e-07\n-6.03979033050708685e-08\n1.25660850235249401e-02\n2.17650977129755473e-02\n2.80148688472693155e-02\n3.27512555097563204e-02\n3.60167101119801825e-02\n3.73681794670316161e-02\n3.60660923388669286e-02\n3.12191448689966289e-02\n2.19999105798660867e-02\n7.97469112913273999e-03\n-1.04542879731757445e-02\n-3.15646184477035643e-02\n-5.19566636005749094e-02\n-6.66026031034668287e-02\n-6.96421173402294036e-02\n-5.61774686788753252e-02\n-2.49650224833861782e-02\n1.87765639236708165e-02\n6.20631630888815733e-02\n8.64628816865111172e-02\n7.54416466240960676e-02\n2.54616812604534642e-02\n-4.47956587243744653e-02\n-9.61972512091511106e-02\n-8.88446586648544562e-02\n-1.47232458226406009e-02\n7.98957332004835846e-02\n1.13931357696995625e-01\n4.05719226435827113e-02\n-8.42089263588258335e-02\n-1.24926536482568476e-01\n-1.19412808254562419e-02\n1.30006633820307360e-01\n9.28698614339002471e-02\n-9.96723383938322299e-02\n-1.37510918608476584e-01\n8.45961868935661138e-02\n1.55716940555528427e-01\n-1.17808353074389693e-01\n-1.33744095507931038e-01\n2.06429212895509445e-01\n-1.22950986622326272e-02\n-2.19945017009355231e-01\n3.05575745127095899e-01\n-2.51167940869888640e-01\n1.50959972271456133e-01\n-7.14415918364090935e-02\n2.76102572199898484e-02\n-8.89761218574895360e-03\n2.42138232289883411e-03\n-5.60748539740517924e-04\n1.10968955842700588e-04\n-1.87928471497622684e-05\n2.72103409726876376e-06\n-3.35743493820971470e-07\n0.0\n6.64721423538699617e-04\n2.57445500323267044e-03\n6.07758522600781222e-03\n1.13967363290976356e-02\n1.85782722277748231e-02\n2.73904321995136757e-02\n3.71895573466446347e-02\n4.67867735477234051e-02\n5.43729554208796650e-02\n5.75895932167694163e-02\n5.38529390483090536e-02\n4.10233850992319793e-02\n1.84275708835621270e-02\n-1.19419525977380973e-02\n-4.45000192114195295e-02\n-7.01486386490819958e-02\n-7.81845081216855364e-02\n-6.04449887693208551e-02\n-1.69397473819019317e-02\n3.95860793491226159e-02\n8.42640570438817765e-02\n8.95293684295780517e-02\n4.26473939403833879e-02\n-3.74710096432545325e-02\n-1.00045595848518132e-01\n-9.12436083685684712e-02\n-3.07919270226691749e-03\n9.77442930489499928e-02\n1.09498691531186021e-01\n2.76457493593761431e-04\n-1.21176905737525903e-01\n-9.57212015692819607e-02\n6.99263442851656425e-02\n1.44712571197071010e-01\n-1.70180514681691139e-02\n-1.65492041886539099e-01\n-1.32593202125581627e-03\n1.84395657125547063e-01\n-4.01518101142335354e-02\n-1.89141571158564809e-01\n1.65849366514980001e-01\n6.72766229507486130e-02\n-2.63276954832901533e-01\n2.98598963167784059e-01\n-2.21311375920625497e-01\n1.23766691522880112e-01\n-5.53439607608475284e-02\n2.03976260392579392e-02\n-6.30794503707715615e-03\n1.65487438777853452e-03\n-3.70750379036859123e-04\n7.11778537597912301e-05\n-1.17210793946955452e-05\n1.65341926151398130e-06\n1.21823309947673396e-02\n2.11004162375581332e-02\n2.71642162504707463e-02\n3.17799977782420931e-02\n3.50147615201578458e-02\n3.64764193643512050e-02\n3.54926194659484079e-02\n3.12392323025417404e-02\n2.29269443335563400e-02\n1.00871622847607985e-02\n-7.03965948978681547e-03\n-2.70659524453970950e-02\n-4.71039521119142254e-02\n-6.27273017500032948e-02\n-6.85414535755373699e-02\n-5.96116843459292695e-02\n-3.37433693855051231e-02\n5.91611457979862587e-03\n4.91987654537465041e-02\n7.99571441376867309e-02\n8.13561672620898568e-02\n4.51502773468837673e-02\n-1.87387543691767376e-02\n-7.95861320080240853e-02\n-9.76110122574849887e-02\n-5.03983043128476207e-02\n4.02252836964322943e-02\n1.07602146788256373e-01\n8.50972928873776346e-02\n-2.37297627894984958e-02\n-1.18810992451853087e-01\n-8.53878271365160202e-02\n5.99162913913272172e-02\n1.38296932716503590e-01\n1.85795819486818531e-02\n-1.44138569145500356e-01\n-7.17182781610705838e-02\n1.44939239121639113e-01\n8.73217036259395230e-02\n-1.71522144292661743e-01\n-4.55580869180998438e-02\n2.14484669935901984e-01\n-1.03955213263907484e-01\n-1.40637430791291873e-01\n2.89724281621027591e-01\n-2.81534166942700281e-01\n1.90653050251685441e-01\n-9.98161218515713489e-02\n4.23261085362145947e-02\n-1.49128701842187027e-02\n4.43349188834699440e-03\n-1.12281235005005442e-03\n2.43621785116412737e-04\n-4.54158742878215673e-05\n7.27779075887565308e-06\n0.0\n6.25319940826525350e-04\n2.42185371687253992e-03\n5.71815611545241874e-03\n1.07277080460705457e-02\n1.75057315497676065e-02\n2.58593648262863685e-02\n3.52280968979164361e-02\n4.45615300976505008e-02\n5.22428686145244084e-02\n5.61322649668654847e-02\n5.38230215574849041e-02\n4.31956978492203519e-02\n2.32927298576242857e-02\n-4.60680729186930833e-03\n-3.60583275369994044e-02\n-6.32665980984707110e-02\n-7.63708524674118344e-02\n-6.66920073019706960e-02\n-3.15977795085785121e-02\n2.08030978087649712e-02\n7.04320723241099594e-02\n9.10466579764952488e-02\n6.40452568817105466e-02\n-4.86686434241249011e-03\n-7.83469114791858351e-02\n-1.02862151975620597e-01\n-4.80085295055126052e-02\n5.45913336382201353e-02\n1.16369577842280469e-01\n6.45196089796221672e-02\n-6.52422130122671806e-02\n-1.29179339285651201e-01\n-2.91153033171672911e-02\n1.23213039988399081e-01\n1.00545269628114914e-01\n-9.33759797382804207e-02\n-1.38459018906517156e-01\n8.37847774572727799e-02\n1.52248394234436868e-01\n-1.22103038933814939e-01\n-1.23388883246542805e-01\n2.08154318711151670e-01\n-2.97560857137613467e-02\n-2.02209710550338623e-01\n3.00410862750795704e-01\n-2.57561590657844786e-01\n1.60962026779617545e-01\n-7.92931956405447669e-02\n3.19848335632331102e-02\n-1.07964998066801491e-02\n3.09063131811147460e-03\n-7.56561191284635046e-04\n1.59145245927494537e-04\n-2.88328640337360767e-05\n1.18213227735445656e-02\n2.04751316564502246e-02\n2.63635671571138368e-02\n3.08638457620972438e-02\n3.40638849152230666e-02\n3.56165174251053748e-02\n3.49094589170897626e-02\n3.11801542913053252e-02\n2.36780822952934768e-02\n1.19134788128622462e-02\n-4.00098765859511780e-03\n-2.29548613224021085e-02\n-4.24983131800318534e-02\n-5.87437035271641469e-02\n-6.67629799373467697e-02\n-6.17165632733807853e-02\n-4.07698738516834372e-02\n-5.44855016058192181e-03\n3.65116832159087384e-02\n7.13124285046679851e-02\n8.27371027615067256e-02\n5.96423954711625959e-02\n5.05189253255993332e-03\n-5.86416553560964587e-02\n-9.53263105243864206e-02\n-7.48700693879491702e-02\n5.53353798592080620e-04\n8.37342506293455302e-02\n1.05502784556232479e-01\n3.30742023652407374e-02\n-7.98600905558941865e-02\n-1.18295642269507145e-01\n-2.20763014695129732e-02\n1.12166376795507311e-01\n1.06071661970207037e-01\n-5.85161201506448417e-02\n-1.46133899521042915e-01\n1.12803032561158076e-02\n1.64209463392383348e-01\n-1.18211293773736183e-04\n-1.82088477936074189e-01\n4.80721277375387585e-02\n1.80768951034999015e-01\n-1.73365537017064891e-01\n-4.78114838482691443e-02\n2.48761189827948315e-01\n-2.97594655444473333e-01\n2.29573479803832581e-01\n-1.33440786134088718e-01\n6.21169875523695861e-02\n-2.39008215227600011e-02\n7.74437852855316012e-03\n-2.13783614796547901e-03\n5.06428446202484314e-04\n-1.03377881165642619e-04\n0.0\n5.89321193282202165e-04\n2.28243116714905124e-03\n5.38967688971153918e-03\n1.01157381317659219e-02\n1.65226548926790361e-02\n2.44503825780054522e-02\n3.34096807225466030e-02\n4.24701099937722162e-02\n5.01838426692887835e-02\n5.46082330862127791e-02\n5.35077456227788864e-02\n4.48129952674666127e-02\n2.73686517921528961e-02\n1.88995209948097909e-03\n-2.81369563506810201e-02\n-5.60957841291460646e-02\n-7.30533252051083354e-02\n-7.02604082721170337e-02\n-4.32662671498606002e-02\n3.56349412200340169e-03\n5.46970407408907053e-02\n8.64961068111839149e-02\n7.75396409644342754e-02\n2.36889536256388901e-02\n-5.08736113779090851e-02\n-9.89833474078948561e-02\n-7.87054603701633215e-02\n7.50322829971700623e-03\n9.61196602326765959e-02\n1.01762627901869213e-01\n2.07681782097938160e-03\n-1.10169072881098576e-01\n-9.92776586328125987e-02\n4.39718282451065853e-02\n1.39027677260055965e-01\n2.91343163198441932e-02\n-1.40701156897744123e-01\n-7.48388005050820704e-02\n1.43427095848142949e-01\n8.39585105937845078e-02\n-1.72119923437291433e-01\n-3.52587447983829586e-02\n2.10086245049634551e-01\n-1.16700795580084921e-01\n-1.21052025844821762e-01\n2.79199524894563456e-01\n-2.84129052387871395e-01\n1.99993055527402541e-01\n-1.08803197634499513e-01\n4.80351448789036878e-02\n-1.76731360586406920e-02\n5.50669881578820346e-03\n-1.46789589208741597e-03\n3.36869060013093077e-04\n1.14810966490056249e-02\n1.98858427226865225e-02\n2.56086505919002339e-02\n2.99983139929393579e-02\n3.31605863610255069e-02\n3.47880113622250492e-02\n3.43221041633852975e-02\n3.10567143887045538e-02\n2.42798997594785987e-02\n1.34910779063022648e-02\n-1.29772788762136946e-03\n-1.92055729559557457e-02\n-3.81570522183850708e-02\n-5.47438729957061901e-02\n-6.44899032275502576e-02\n-6.27374476626327698e-02\n-4.62477237194217766e-02\n-1.52978250148009323e-02\n2.44330125025163866e-02\n6.14065500797525629e-02\n8.05843428357381208e-02\n6.92977526599824339e-02\n2.54128987516823029e-02\n-3.62079749034433934e-02\n-8.49740487417584983e-02\n-8.80894143965907234e-02\n-3.36281071032940096e-02\n5.07776724519895528e-02\n1.04298162144120715e-01\n7.45522485052319966e-02\n-2.72039587920666209e-02\n-1.12015757851815626e-01\n-8.36377866608294523e-02\n4.59931131019908415e-02\n1.30166210582097347e-01\n4.39521021639232568e-02\n-1.16164030090492768e-01\n-1.06563604358521649e-01\n8.80100217449711203e-02\n1.38745185546748973e-01\n-8.37854826369578420e-02\n-1.48394362499692511e-01\n1.26527612473705947e-01\n1.12697798145857342e-01\n-2.09028249363665514e-01\n4.64606606127302701e-02\n1.84194152303916447e-01\n-2.94151273615326392e-01\n2.63018434529694090e-01\n-1.70700564680018846e-01\n8.73726991770596151e-02\n-3.66997897946200885e-02\n1.29394229119290521e-02\n-3.88326567031858525e-03\n1.00083887921631975e-03\n0.0\n5.56344508631476087e-04\n2.15471301668365527e-03\n5.08869729475731024e-03\n9.55454004287190246e-03\n1.56194577859793370e-02\n2.31511792437341726e-02\n3.17217754911902627e-02\n4.05050557558991678e-02\n4.82019227049234056e-02\n5.30473266844623467e-02\n5.29687485798187793e-02\n4.59667317912706846e-02\n3.07542821198627456e-02\n7.60413892057188335e-03\n-2.07977661742350696e-02\n-4.88845797320850359e-02\n-6.86683409310916704e-02\n-7.16314193993618092e-02\n-5.21471364254610659e-02\n-1.16488872255974298e-02\n3.84130877604037524e-02\n7.76330900007490138e-02\n8.39607480739362200e-02\n4.65010208079638457e-02\n-2.20976642315755499e-02\n-8.40153911141408027e-02\n-9.41423747050193632e-02\n-3.41193303782996102e-02\n6.01213885144969776e-02\n1.10232626886343929e-01\n5.86634107899515894e-02\n-5.95482012253099741e-02\n-1.22003864820606794e-01\n-4.12148585315311039e-02\n1.02078789131676631e-01\n1.13987754575525388e-01\n-4.82185301412276432e-02\n-1.46755224097304848e-01\n6.79811297090713879e-03\n1.62917422402974771e-01\n-2.35758120066448078e-03\n-1.79632507352592008e-01\n5.61397569232230872e-02\n1.71904385175388780e-01\n-1.79929407536232960e-01\n-2.88388410383239244e-02\n2.33627552941496425e-01\n-2.95451068345134737e-01\n2.37093166378714498e-01\n-1.43038034390945396e-01\n6.91829150063745929e-02\n-2.77243468444071522e-02\n9.38553616365295912e-03\n-2.71698282910390072e-03\n1.11599396211449486e-02\n1.93295824332240171e-02\n2.48957364202433626e-02\n2.91794633849948998e-02\n3.23017301139551030e-02\n3.39902824881227750e-02\n3.37349280080702987e-02\n3.08811739907838036e-02\n2.47548359444844969e-02\n1.48522858688841693e-02\n1.10662161837804811e-03\n-1.57914166236559385e-02\n-3.40864680442369561e-02\n-5.07947555519635899e-02\n-6.18683472413304875e-02\n-6.28853888255353072e-02\n-5.03793878579026772e-02\n-2.36836372474113210e-02\n1.32319480310372859e-02\n5.09142445620155010e-02\n7.58055809721233514e-02\n7.47104974424513124e-02\n4.18439246713359567e-02\n-1.43291066068978075e-02\n-6.94121159461782988e-02\n-9.14270236874139830e-02\n-5.95129280610696421e-02\n1.57135218429933464e-02\n8.71931093965370441e-02\n9.66116655932974938e-02\n2.36270855551241193e-02\n-7.86992184932030076e-02\n-1.11512044381904041e-01\n-2.56218691641952809e-02\n9.89164235386696400e-02\n1.09639797560462243e-01\n-2.91114200820442211e-02\n-1.38396956361278523e-01\n-3.80301574921257379e-02\n1.37462399787595141e-01\n7.69077383862084851e-02\n-1.42394765552901120e-01\n-7.99928982734148669e-02\n1.72701263276649641e-01\n2.47689136142818997e-02\n-2.05000402538650178e-01\n1.28506819636587888e-01\n1.01620476211591371e-01\n-2.67793126914454949e-01\n2.85637983900393189e-01\n-2.08804278295668277e-01\n1.17864936433190265e-01\n-5.40694694524476716e-02\n2.07230672039478980e-02\n-6.74787441303007548e-03\n0.0\n5.26069846218179941e-04\n2.03745975334490743e-03\n4.81231544942062502e-03\n9.03881926532833571e-03\n1.47880419418301608e-02\n2.19512819086820736e-02\n3.01535288771995653e-02\n3.86594546769777198e-02\n4.63011219560512388e-02\n5.14732793891231402e-02\n5.22570057849663233e-02\n4.67353133246108179e-02\n3.35398373812821962e-02\n1.25988484539512301e-02\n-1.40661662565808154e-02\n-4.18111398479381752e-02\n-6.35680867040967768e-02\n-7.12451733976492002e-02\n-5.85294441056311357e-02\n-2.46237297565793448e-02\n2.25442686104184095e-02\n6.59893216478578820e-02\n8.45047595005134489e-02\n6.30252057143048106e-02\n4.85389633226323159e-03\n-6.23679743383612900e-02\n-9.60157359205651845e-02\n-6.51419718838193162e-02\n1.89291976455181268e-02\n9.55654875287163114e-02\n9.34158953733758984e-02\n-2.04270959962699468e-04\n-1.02683227952756681e-01\n-9.81187330823381082e-02\n2.73472838930091840e-02\n1.28721690417263890e-01\n5.66034539781210613e-02\n-1.09195584985452315e-01\n-1.11223598936992366e-01\n8.35469045293044804e-02\n1.38494197004874253e-01\n-8.44892682631249448e-02\n-1.44173778127120206e-01\n1.30988570345361571e-01\n1.01709183477996179e-01\n-2.09038880379594005e-01\n6.23653190122779588e-02\n1.65974436178837864e-01\n-2.86849614648902018e-01\n2.67523723730401619e-01\n-1.80123101549332393e-01\n9.56414149662931090e-02\n-4.17472201091181189e-02\n1.53362113098399963e-02\n1.08572535788100943e-02\n1.88053148291581068e-02\n2.42235670441615474e-02\n2.84061837017321669e-02\n3.14871170305760784e-02\n3.32253799302588901e-02\n3.31541833612657294e-02\n3.06662998610995330e-02\n2.51240261291699740e-02\n1.60264396794372634e-02\n3.24511213012798182e-03\n-1.26868741394952720e-02\n-3.02876195182965359e-02\n-4.69478334976677555e-02\n-5.90187907389533722e-02\n-6.23446671638624439e-02\n-5.33613041804776728e-02\n-3.07036781608385871e-02\n3.05828321490431848e-03\n4.03393487566019032e-02\n6.91870442941459191e-02\n7.65742613124441723e-02\n5.43009802956186186e-02\n5.65420686883895060e-03\n-5.10808656432464175e-02\n-8.69106242679381497e-02\n-7.62994371682294698e-02\n-1.65381467847138496e-02\n6.06065774784612793e-02\n1.00336913431607305e-01\n6.30185103355872939e-02\n-3.29734949888857987e-02\n-1.07092754356609518e-01\n-7.91456438996441108e-02\n3.84737807852451527e-02\n1.21696046026404520e-01\n5.76361536910572000e-02\n-9.15667349624877391e-02\n-1.19924730623984357e-01\n3.90685981668688481e-02\n1.46832395444655900e-01\n-3.43051900345382483e-03\n-1.61657683727670087e-01\n5.27786577967945952e-03\n1.77007741186037154e-01\n-6.42710789436594099e-02\n-1.62588278224723326e-01\n1.85537331237614900e-01\n1.04280416372088524e-02\n-2.17989329623848233e-01\n2.92242251783956630e-01\n-2.43870611591004677e-01\n1.52525623601801691e-01\n-7.65222033931119150e-02\n3.18713349330689566e-02\n0.0\n4.98392455022722254e-04\n1.93026567817843227e-03\n4.55959421336337573e-03\n8.56694336911909340e-03\n1.40261986868232442e-02\n2.08486826871050260e-02\n2.87050923169705971e-02\n3.69392975505250937e-02\n4.44988900976364538e-02\n4.99218533455173322e-02\n5.14322579914048006e-02\n4.72021676848756178e-02\n3.58193646773728655e-02\n1.69464241288257850e-02\n-7.94374076971336024e-03\n-3.50097265018042975e-02\n-5.80503208864874901e-02\n-6.95130519952715936e-02\n-6.27610050573313982e-02\n-3.53522899535158169e-02\n7.73276559503526494e-03\n5.28337874965725124e-02\n8.04943200702674527e-02\n7.35009773004668826e-02\n2.80757599343359650e-02\n-3.78158809422261682e-02\n-8.73610278548417885e-02\n-8.38792298753598536e-02\n-1.95976543794441245e-02\n6.62583777343280778e-02\n1.04393881068897826e-01\n5.08476952330590565e-02\n-5.78712776107514065e-02\n-1.15364571334674065e-01\n-4.63144294181582969e-02\n8.61840327554428132e-02\n1.17076975053580640e-01\n-1.55209323106109166e-02\n-1.36896648381093944e-01\n-4.54946342815987850e-02\n1.34567716064504350e-01\n7.81380258709586800e-02\n-1.41835831028355008e-01\n-7.55657048221549249e-02\n1.73269774191950943e-01\n1.42085269579559845e-02\n-1.99361313019291803e-01\n1.39379297540701358e-01\n8.25410944975222549e-02\n-2.55803049972752716e-01\n2.86294677546788001e-01\n-2.17201099342453879e-01\n1.27042769729272254e-01\n-6.04509615235828759e-02\n1.05849352751649795e-02\n1.83336456914137969e-02\n2.36187559924340568e-02\n2.77100193015957230e-02\n3.07526632718787794e-02\n3.25332908560703876e-02\n3.26236872453531598e-02\n3.04591996772193979e-02\n2.54363388695211870e-02\n1.70604942365935597e-02\n5.15540604370424115e-03\n-9.87614705457189219e-03\n-2.67845825770799857e-02\n-4.32875400659517434e-02\n-5.61004831655171066e-02\n-6.13426147404132344e-02\n-5.54419920099115324e-02\n-3.65280889615215015e-02\n-6.04023615022179425e-03\n3.00679111736557939e-02\n6.14442639447215916e-02\n7.56753326721765068e-02\n6.31077203110196050e-02\n2.30090147591086314e-02\n-3.19143287655398039e-02\n-7.67894704204508394e-02\n-8.45962531718698202e-02\n-4.31177834894994755e-02\n3.02452669315825956e-02\n8.96784078345562452e-02\n8.70129728777675054e-02\n1.29006580919695385e-02\n-7.96139250850956687e-02\n-1.04922279593327575e-01\n-2.48590211276103132e-02\n9.00920491084807457e-02\n1.08620612071474942e-01\n-9.80085128405467319e-03\n-1.25724754983029957e-01\n-6.74677776990492695e-02\n1.02635266654225260e-01\n1.15041019142809772e-01\n-7.99683731968329203e-02\n-1.38117451663788998e-01\n8.58137241517678978e-02\n1.39982754687891314e-01\n-1.35530899404604277e-01\n-9.08789453796853275e-02\n2.08631330811960364e-01\n-7.73093195662704902e-02\n-1.48377942977504035e-01\n2.79563905819061043e-01\n-2.71932205166533880e-01\n1.89745259204473854e-01\n-1.04357941706306093e-01\n0.0\n4.74630855036938795e-04\n1.83823739715425062e-03\n4.34261623615977369e-03\n8.16173561636752282e-03\n1.33717345813817307e-02\n1.99007879828245610e-02\n2.74582879664154421e-02\n3.54554651435775928e-02\n4.29388307258615695e-02\n4.85704627300665159e-02\n5.07014449432966752e-02\n4.75899227202509420e-02\n3.78028143023012228e-02\n2.07976313254927964e-02\n-2.40139691007514467e-03\n-2.86371213508383286e-02\n-5.24917758326195888e-02\n-6.69880853955007599e-02\n-6.54046283798856154e-02\n-4.41157621276892162e-02\n-5.69950899877047501e-03\n3.92239014171561692e-02\n7.33884659252820037e-02\n7.88694945171742601e-02\n4.68358620805657475e-02\n-1.31946021383686669e-02\n-7.17030983728384336e-02\n-9.12481107478399639e-02\n-5.09170180786356896e-02\n3.06071951017651070e-02\n9.55897738106075007e-02\n8.48760507729105496e-02\n-5.11481481764855007e-03\n-9.83155336645428202e-02\n-9.50244774020384680e-02\n1.76619959735545423e-02\n1.18845332094018402e-01\n7.20424671527250954e-02\n-8.12267141670269116e-02\n-1.25035691568844420e-01\n3.08065817457475848e-02\n1.47344095370549821e-01\n-5.42963641756846814e-04\n-1.61321348065022685e-01\n8.17297191097843094e-03\n1.75372200289545310e-01\n-7.20505551769787256e-02\n-1.54558875321150563e-01\n1.91082218831980261e-01\n-5.99614532062659779e-03\n-2.05078021984145958e-01\n2.91475092187509277e-01\n-2.52571179194117423e-01\n1.63487592113061408e-01\n1.04162962213653395e-02\n1.80415542820924826e-02\n2.32449886012455996e-02\n2.72834895857521631e-02\n3.03133906227282500e-02\n3.21444994897631675e-02\n3.23802832995047016e-02\n3.04908288711693391e-02\n2.59005407240757331e-02\n1.81200406205428953e-02\n6.93420306812622331e-03\n-7.36070245012271623e-03\n-2.37064159237846579e-02\n-4.00930827970526205e-02\n-5.35466302866305505e-02\n-6.04350883688570678e-02\n-5.72159690562071138e-02\n-4.16446392118069719e-02\n-1.42539727824173967e-02\n2.03835490032371267e-02\n5.33887436527834686e-02\n7.31557462868826780e-02\n6.92241233990675553e-02\n3.78138277103037268e-02\n-1.31915745639283356e-02\n-6.33652911127044888e-02\n-8.62485883282002042e-02\n-6.33624072349835699e-02\n1.36508625565300625e-04\n6.96806204917690408e-02\n9.63259109731501306e-02\n5.15031754527661770e-02\n-4.01563579106000226e-02\n-1.04388290666992761e-01\n-7.41603331076562816e-02\n3.54364771088693242e-02\n1.15608911303749951e-01\n6.53144531926835997e-02\n-7.29363781473576084e-02\n-1.23821985318584349e-01\n2.23958671341584897e-03\n1.36250033092222222e-01\n5.35943018614017941e-02\n-1.33057869160806086e-01\n-8.11609669681662010e-02\n1.42694814568581102e-01\n7.37743209689633028e-02\n-1.75781873021926632e-01\n-6.66811845046633329e-03\n1.97826893685143834e-01\n-1.49316467985510598e-01\n-7.04981387726757031e-02\n2.53562662311263065e-01\n-2.95841016830245218e-01\n2.32022594695587614e-01\n0.0\n4.59370621821804132e-04\n1.77913476805279273e-03\n4.20336519218435407e-03\n7.90227269631911533e-03\n1.29548220641382862e-02\n1.93030385407652223e-02\n2.66867388050920328e-02\n3.45693434630110347e-02\n4.20734464609162917e-02\n4.79560169117859841e-02\n5.06643795656123025e-02\n4.85198467461304683e-02\n4.00672615973119844e-02\n2.45948434598564601e-02\n2.76052600400917550e-03\n-2.28408906283784213e-02\n-4.74492704714849639e-02\n-6.46011367233780692e-02\n-6.75787541585427393e-02\n-5.18656864067998102e-02\n-1.80866664221838759e-02\n2.57907698042241298e-02\n6.47333017444569059e-02\n8.09091332142074654e-02\n6.19338313646412772e-02\n1.02566127316453936e-02\n-5.21184765634397223e-02\n-8.99810654120258568e-02\n-7.41979140469451182e-02\n-5.81627932899052985e-03\n7.32684693202391157e-02\n1.00840549769433380e-01\n4.37577652994151287e-02\n-5.91872391437398629e-02\n-1.12245429630226851e-01\n-4.96293400883478161e-02\n7.56988440766073606e-02\n1.18853750307988990e-01\n8.84970636500974003e-03\n-1.23540929948577530e-01\n-8.09347520782317947e-02\n9.65301925021528479e-02\n1.23214756097264663e-01\n-7.55952775091526807e-02\n-1.43598873396671795e-01\n8.55426490939962259e-02\n1.43693458666195456e-01\n-1.39879478214049613e-01\n-9.08442362902837086e-02\n2.15496924563238185e-01\n-8.37799929443822922e-02\n-1.53450883361406665e-01\n2.99081242101869371e-01\n-2.98656102454881944e-01\n1.04761209606114465e-02\n1.81451737700163013e-02\n2.33809363693680689e-02\n2.74546418991210572e-02\n3.05365065628562526e-02\n3.24544540386789843e-02\n3.28339334464093774e-02\n3.11675096430054470e-02\n2.68954075280932771e-02\n1.95257138497873066e-02\n8.80651645477001713e-03\n-5.05431374539458932e-03\n-2.11508435608595280e-02\n-3.76856623694598880e-02\n-5.19227366250355413e-02\n-6.04151185224612655e-02\n-5.96272189129445351e-02\n-4.69944592436230546e-02\n-2.22925893158143172e-02\n1.10693030067474489e-02\n4.54935443475754930e-02\n7.01714268054140639e-02\n7.41508863370579918e-02\n5.12441686443914843e-02\n5.18130807807009892e-03\n-4.79617112106805049e-02\n-8.33802348192307918e-02\n-7.85853690079773293e-02\n-2.85787230039019069e-02\n4.38347552861013678e-02\n9.38003359117271923e-02\n8.08042500463066610e-02\n3.83856616295876266e-03\n-8.33175415057074015e-02\n-1.03367116880702159e-01\n-2.53346454908366381e-02\n8.59123123511456727e-02\n1.11551327019935378e-01\n6.65076077000255252e-03\n-1.16057432354923676e-01\n-9.14788111795780401e-02\n6.86775332851879833e-02\n1.36317820334766887e-01\n-1.68257495002586480e-02\n-1.54256974242609812e-01\n-1.15732927631394221e-02\n1.68372799990323452e-01\n1.05292356101486660e-03\n-1.85886035319565490e-01\n6.78027710323440141e-02\n1.70603138356066136e-01\n-1.99216245364639055e-01\n-1.22019969895925014e-02\n2.51065633427290158e-01\n-3.50433586213163228e-01\n0.0\n4.54475565046582035e-04\n1.76017629468361780e-03\n4.15893637621179112e-03\n7.82094148729355586e-03\n1.28294548370252465e-02\n1.91383811981898980e-02\n2.65109358631889364e-02\n3.44489721364836382e-02\n4.21295724600915522e-02\n4.83755975424328341e-02\n5.16973782777283286e-02\n5.04489029302082059e-02\n4.31361886094844549e-02\n2.88884410078140003e-02\n8.04546913719693911e-03\n-1.72737229488579731e-02\n-4.28608416309934348e-02\n-6.26852159747355031e-02\n-7.00380495250329249e-02\n-5.96536853000862316e-02\n-3.04700062129318501e-02\n1.19307832365417674e-02\n5.47195915308474404e-02\n8.06176004329993978e-02\n7.46564619480459823e-02\n3.32158994179168332e-02\n-2.91953538202943952e-02\n-8.15409773429979223e-02\n-9.01420716401740013e-02\n-4.13173762093740973e-02\n4.08177668052083081e-02\n9.97617654792304076e-02\n8.33393461304918759e-02\n-6.99945926055855431e-03\n-9.88419596745936935e-02\n-9.98865831858441605e-02\n6.10511603878771680e-03\n1.14461468479794173e-01\n9.18224510222659523e-02\n-5.34221671011980009e-02\n-1.36727330841643291e-01\n-2.26482057732258907e-02\n1.38143036772072958e-01\n7.79639721299586475e-02\n-1.30080745604222503e-01\n-1.05385652252523235e-01\n1.40654849375323104e-01\n1.00817702546073279e-01\n-1.82263694466039822e-01\n-3.79396510161905745e-02\n2.28967367391289450e-01\n-1.29528470380579325e-01\n-1.56179243363019027e-01\n3.78044589912561291e-01\n1.07339199406850244e-02\n1.85916947016431730e-02\n2.39588178851444511e-02\n2.81451470935495732e-02\n3.13384772667040304e-02\n3.33823502489256491e-02\n3.39182220331914128e-02\n3.24531089274147644e-02\n2.84346485002854206e-02\n2.13620099221358724e-02\n1.09453510362733774e-02\n-2.68815732019857907e-03\n-1.87654778324847504e-02\n-3.56701631504745056e-02\n-5.08652641973077746e-02\n-6.10536771302078729e-02\n-6.26926239099754173e-02\n-5.29225895877606725e-02\n-3.08333508950236201e-02\n1.23204383099051939e-03\n3.68927517505814179e-02\n6.61949248965135184e-02\n7.79493700029663672e-02\n6.39835982353285510e-02\n2.42423541306187318e-02\n-2.96572805847988424e-02\n-7.55628776164473936e-02\n-8.88152339515816819e-02\n-5.59466373416642945e-02\n1.23586862619277944e-02\n7.93000866023611667e-02\n9.89443458139651344e-02\n4.85397876148804461e-02\n-4.42968860486030597e-02\n-1.08236661745807664e-01\n-8.03896014929930541e-02\n2.74985613489748329e-02\n1.16472957695659532e-01\n8.44957743445352155e-02\n-5.02057257770141541e-02\n-1.33474318152984051e-01\n-4.41938659886798174e-02\n1.16801917973193017e-01\n1.13279778255883812e-01\n-7.60745177232578368e-02\n-1.50835557810801657e-01\n4.77313794695713028e-02\n1.72097566675399910e-01\n-5.41346779895925459e-02\n-1.84521409677587123e-01\n1.13044748562744907e-01\n1.62842107714320589e-01\n-2.29101940670490084e-01\n-3.25918551313099242e-02\n3.78863266100449847e-01\n0.0\n4.53767445431295792e-04\n1.75743375920649160e-03\n4.15282540805357245e-03\n7.81168515409249448e-03\n1.28223849880034230e-02\n1.91503933352522235e-02\n2.65803986017883222e-02\n3.46486799210527219e-02\n4.25804969422696050e-02\n4.92563554273644996e-02\n5.32407584406964646e-02\n5.29135186637123139e-02\n4.67405085234007950e-02\n3.36994851340722268e-02\n1.38292614804847117e-02\n-1.12058062320987539e-02\n-3.77390544216229876e-02\n-6.01972930451412161e-02\n-7.19644770879900725e-02\n-6.71725683236432253e-02\n-4.32360374904794259e-02\n-3.41189638029232127e-03\n4.18950190610803547e-02\n7.65981715020616766e-02\n8.41240518513449165e-02\n5.56136745569970753e-02\n-2.12514342657444148e-03\n-6.43028352358129690e-02\n-9.64429267034189047e-02\n-7.34045852072321842e-02\n-5.24122614819819317e-04\n7.92996824733840644e-02\n1.06542998602487490e-01\n5.00514361920979603e-02\n-5.48291372757951714e-02\n-1.17987733456704047e-01\n-6.93692803131921720e-02\n5.72823234965314440e-02\n1.30045082365374737e-01\n5.15594274312869555e-02\n-1.00685945828871012e-01\n-1.27860997303451740e-01\n3.04657076702108537e-02\n1.56045329372998337e-01\n3.35073024968456715e-02\n-1.60897711627103812e-01\n-7.15604572729413857e-02\n1.71796761310003737e-01\n7.64065520258383896e-02\n-2.06166677724327896e-01\n-3.11364114538679321e-02\n2.59223082070708100e-01\n-9.55600446547810872e-02\n-3.56288607612178121e-01\n1.10545090304264675e-02\n1.91469712934276108e-02\n2.46770563664069874e-02\n2.90015072340053109e-02\n3.23278968863038724e-02\n3.45161508769132458e-02\n3.52239322968272706e-02\n3.39727101806128473e-02\n3.02176318458869282e-02\n2.34494415788531751e-02\n1.33414783362104331e-02\n-5.81692463670730080e-05\n-1.61081414453927325e-02\n-3.33744314298245123e-02\n-4.95274695091469375e-02\n-6.14406904013718932e-02\n-6.56020971560740962e-02\n-5.89116901910885643e-02\n-3.98299583283722031e-02\n-9.65711811927028214e-03\n2.65115313666691790e-02\n5.98020407275294957e-02\n7.91942064043486688e-02\n7.50308628544752998e-02\n4.38010794611213977e-02\n-7.60151491595509581e-03\n-6.09203234193264748e-02\n-9.14830077904906225e-02\n-7.94527931962306644e-02\n-2.35295560396347504e-02\n5.12257551390979324e-02\n1.00673865805560175e-01\n8.66586877510052839e-02\n8.57706650000990278e-03\n-8.30720065789638806e-02\n-1.13490604971338227e-01\n-4.52328701560834739e-02\n7.22001649349995195e-02\n1.26252172076927266e-01\n4.75151451764769805e-02\n-9.34387858500546481e-02\n-1.31289193318525843e-01\n6.82503803309056746e-04\n1.43957771516538713e-01\n8.56448292076867485e-02\n-1.14579959258686276e-01\n-1.41569035526453474e-01\n8.28444063931153690e-02\n1.74878573140484023e-01\n-7.59540590222717721e-02\n-1.98495124828301062e-01\n1.12038188282858914e-01\n2.15859080584675372e-01\n-2.06365145595816035e-01\n-3.17022902162164444e-01\n0.0\n4.52540415549723945e-04\n1.75268149290986491e-03\n4.14197426029800590e-03\n7.79356573800316348e-03\n1.28009630698919779e-02\n1.91415320629104053e-02\n2.66222804444175287e-02\n3.48155856165980881e-02\n4.29978514371916545e-02\n5.01121519502873147e-02\n5.47848663481225531e-02\n5.54328776460470823e-02\n5.04967825149011812e-02\n3.88195665456590178e-02\n2.01519613267617317e-02\n-4.29854351193549502e-03\n-3.14422443516567326e-02\n-5.62533282105013646e-02\n-7.23673062005778384e-02\n-7.35284023263574477e-02\n-5.58310827605666693e-02\n-2.02602214602639434e-02\n2.54923801201939922e-02\n6.73145951743105014e-02\n8.82385396907044567e-02\n7.53269611722631460e-02\n2.78597547212544559e-02\n-3.74665960684631011e-02\n-8.94675575610613671e-02\n-9.61864271412350424e-02\n-4.55266281989698193e-02\n3.91892795148022222e-02\n1.04105563366769807e-01\n9.69306352518060077e-02\n1.15271780730752203e-02\n-9.12029936665216534e-02\n-1.19391327821297272e-01\n-3.33254115610177384e-02\n9.50657394584057125e-02\n1.29184425525543350e-01\n1.34554959453387201e-02\n-1.29788441672761379e-01\n-1.12552799971458312e-01\n6.65261132272801231e-02\n1.62799037292990889e-01\n7.92148142567677092e-03\n-1.77327556364721639e-01\n-6.47111239398924232e-02\n1.85764429035021827e-01\n9.79764228415358762e-02\n-2.13364861060555994e-01\n-1.15813917507015945e-01\n2.85157976527504298e-01\n2.68491097277904156e-01\n1.13900443972321363e-02\n1.97281355964712898e-02\n2.54288927665459949e-02\n2.98984588145275350e-02\n3.33657164030060141e-02\n3.57086974570110863e-02\n3.66034294237779917e-02\n3.55884937983438274e-02\n3.21296644582488092e-02\n2.57126213144805472e-02\n1.59769609536411124e-02\n2.89337789717178991e-03\n-1.30302081290324841e-02\n-3.05508682781102034e-02\n-4.75668440059787770e-02\n-6.11600062089380780e-02\n-6.79084095815918054e-02\n-6.45491813624627098e-02\n-4.89916676689740385e-02\n-2.15312312857659539e-02\n1.40901121770235244e-02\n5.03270936159498222e-02\n7.67997399578471546e-02\n8.29935627908710005e-02\n6.24731315666301606e-02\n1.73910927020482636e-02\n-3.89605111945718965e-02\n-8.41852100645806567e-02\n-9.48974523788145147e-02\n-5.93316810551167695e-02\n1.13730762546102957e-02\n8.18610843580309805e-02\n1.07664747590837898e-01\n6.37902009259893182e-02\n-2.96284571710583484e-02\n-1.08460037642568341e-01\n-1.05185714613069609e-01\n-9.48238654077596110e-03\n1.03433596418400289e-01\n1.23233125836665708e-01\n1.40843924520589938e-02\n-1.20761146854665158e-01\n-1.23121621284781380e-01\n3.10856574907554424e-02\n1.58139081488648386e-01\n7.13886698461672076e-02\n-1.32697562436982525e-01\n-1.46497997494583726e-01\n8.62980162940746448e-02\n1.95484257494258296e-01\n-4.62518493265352201e-02\n-2.40156795864675116e-01\n1.19704899078555624e-02\n3.26044988239276912e-01\n2.17276249203070093e-01\n0.0\n4.50088089771498413e-04\n1.74318367601132215e-03\n4.11991509068203050e-03\n7.75439819823289106e-03\n1.27451204433312922e-02\n1.90816376705056009e-02\n2.65942880104259489e-02\n3.48936822202545044e-02\n4.33112143767331245e-02\n5.08588919100457851e-02\n5.62348537095349321e-02\n5.79074162207798282e-02\n5.43110318419425253e-02\n4.41761595759949180e-02\n2.69852002316672557e-02\n3.49408963767233694e-03\n-2.38132880564905641e-02\n-5.05469402455110892e-02\n-7.07636012534026415e-02\n-7.80685417817182925e-02\n-6.75091379672967673e-02\n-3.79608577437891212e-02\n5.75537170839904300e-03\n5.21956078563873063e-02\n8.52820824643359121e-02\n8.95396073394918446e-02\n5.76396877533447496e-02\n-2.75575332827442121e-03\n-6.74157056822144857e-02\n-1.03205634170268609e-01\n-8.49372588925206284e-02\n-1.44002535076003784e-02\n7.15424509217369581e-02\n1.15933886935604746e-01\n7.91487805203598682e-02\n-2.28491865088935667e-02\n-1.14580653877124378e-01\n-1.12148554835623540e-01\n-3.04974789162241067e-03\n1.18788902431379045e-01\n1.24143012899337740e-01\n-1.13662381962089751e-02\n-1.45864986614570202e-01\n-1.06858292995758733e-01\n8.06129767714423018e-02\n1.72672801120975078e-01\n1.48376100327666360e-02\n-1.85664786848254354e-01\n-1.04109568967024418e-01\n1.70916322348207028e-01\n1.88621939955511075e-01\n-1.36726691054225136e-01\n-3.30951964691683531e-01\n-1.68414802151368143e-01\n1.17454070100185843e-02\n2.03436416969278409e-02\n2.62252384712282349e-02\n3.08488991436240423e-02\n3.44665238364316659e-02\n3.69760464251764273e-02\n3.80740676803491690e-02\n3.73190320219722940e-02\n3.41906684650535447e-02\n2.81734062616632655e-02\n1.88770303031830788e-02\n6.19795747224671355e-03\n-9.48897642954250539e-03\n-2.71378343777679415e-02\n-4.48922983942824719e-02\n-6.00790002359774949e-02\n-6.94274350237493315e-02\n-6.95990776076046286e-02\n-5.80520398710495378e-02\n-3.41523438896794221e-02\n-2.72644088553021958e-04\n3.75671400237486269e-02\n7.00790310190740340e-02\n8.65860169375035210e-02\n7.84739443392017538e-02\n4.35197569291759373e-02\n-1.05608913933704172e-02\n-6.56873035545920275e-02\n-9.81534320684665507e-02\n-8.86917196167820165e-02\n-3.46242033460667925e-02\n4.26451104033279474e-02\n1.02420842075115107e-01\n1.04814250479755677e-01\n3.88179120099442360e-02\n-6.00447325857434572e-02\n-1.22584878622707241e-01\n-9.28862316279005784e-02\n1.81817662374802770e-02\n1.22559572517970089e-01\n1.18694528703244748e-01\n-6.24121319281131879e-03\n-1.35900951553424132e-01\n-1.22695699494052873e-01\n3.97669730762062468e-02\n1.68052022947995511e-01\n8.46737371867969518e-02\n-1.27480824804258180e-01\n-1.77545107143681491e-01\n3.89634332772188577e-02\n2.27303894769410875e-01\n8.00750376599732999e-02\n-2.34279054427950106e-01\n-3.07267085333693069e-01\n-1.25210429901994325e-01\n0.0\n4.46526494839362994e-04\n1.72938967815322499e-03\n4.08770629797133942e-03\n7.69615245971656380e-03\n1.26580145794813140e-02\n1.89752153484707663e-02\n2.65021854242074410e-02\n3.48894848325067564e-02\n4.35267514428521116e-02\n5.15006018058824372e-02\n5.75902528440595807e-02\n6.03298223522066163e-02\n5.81680690858446814e-02\n4.97488617348855050e-02\n3.43133123973486803e-02\n1.21829395262652348e-02\n-1.47770565713105650e-02\n-4.28841113131161814e-02\n-6.67766534050983213e-02\n-8.01835527585671171e-02\n-7.74357614631607932e-02\n-5.55826751160843138e-02\n-1.65981975506887570e-02\n3.12440203060915835e-02\n7.39662436905507148e-02\n9.53340750584295848e-02\n8.30583728909395774e-02\n3.60022663765187448e-02\n-3.11038158672062720e-02\n-8.96062651523896747e-02\n-1.07921147839786749e-01\n-6.91696482441740840e-02\n1.32535602219801072e-02\n9.45418743298519632e-02\n1.19876256943436663e-01\n6.22386420385926536e-02\n-4.74592822583738069e-02\n-1.28452047791815432e-01\n-1.06666036829945687e-01\n1.38254085572302246e-02\n1.31848120269406843e-01\n1.26593940637845681e-01\n-1.51802089344321087e-02\n-1.53582022176519672e-01\n-1.22902935799109311e-01\n6.49656986759024474e-02\n1.89243274336059447e-01\n7.05542986351937462e-02\n-1.64445632590975443e-01\n-1.98594511590460709e-01\n5.07852435887681322e-02\n2.91606278282330156e-01\n2.64999360974564391e-01\n8.93532303709724945e-02\n1.21302460265471403e-02\n2.10102024262901373e-02\n2.70876601443256829e-02\n3.18783012382258604e-02\n3.56590767079616178e-02\n3.83497208038209234e-02\n3.96696404198947847e-02\n3.91999192220841564e-02\n3.64376927876488357e-02\n3.08703095632051651e-02\n2.20824495938261173e-02\n9.90078747802796214e-03\n-5.43030559259281061e-03\n-2.30646390028043206e-02\n-4.14052456072965744e-02\n-5.80566617124792933e-02\n-6.99609150546215836e-02\n-7.37976662600785954e-02\n-6.66928968874382078e-02\n-4.71965179118003925e-02\n-1.63543905027504904e-02\n2.14643214248196462e-02\n5.84603149158290092e-02\n8.45066640021855942e-02\n8.97254991761630150e-02\n6.82682629936509633e-02\n2.22355317447135159e-02\n-3.61083457829177168e-02\n-8.59315372153186263e-02\n-1.04493299738151579e-01\n-7.78375360106118575e-02\n-1.12923539419631375e-02\n6.69132352463020497e-02\n1.14836202482706762e-01\n9.88905028583538515e-02\n1.90785963725725316e-02\n-8.04248553439249059e-02\n-1.30833343002297764e-01\n-8.59564972759015167e-02\n3.22862183932600341e-02\n1.33326866209854955e-01\n1.22715130629377459e-01\n-6.21036691526507829e-03\n-1.41058394601231707e-01\n-1.39574554456165317e-01\n1.72966320850873739e-02\n1.71013068739172963e-01\n1.35358214686147338e-01\n-7.46104068225657974e-02\n-2.18151989299724347e-01\n-1.00762524714604118e-01\n1.69463576267151445e-01\n3.07231650469143358e-01\n2.14204590354284963e-01\n6.12216750445814112e-02\n0.0\n4.41842050774613588e-04\n1.71124690430421032e-03\n4.04522023302258428e-03\n7.61856801760766363e-03\n1.25391439378664902e-02\n1.88213110160937863e-02\n2.63441708517995442e-02\n3.47996644229802005e-02\n4.36385502419955953e-02\n5.20273325427632535e-02\n5.88353979093790627e-02\n6.26773612084995380e-02\n6.20382810763555198e-02\n5.55051246007483706e-02\n4.21119955111144278e-02\n2.17750930329775085e-02\n-4.25488018503216488e-03\n-3.30543763872693727e-02\n-5.99880667193215811e-02\n-7.91738336673897675e-02\n-8.46017216294397412e-02\n-7.18921085669812360e-02\n-4.03930362948478339e-02\n5.04079666713155416e-03\n5.35394724977688585e-02\n8.99445792891983981e-02\n9.92287942556176333e-02\n7.29277678234887261e-02\n1.53532421263242683e-02\n-5.39082990961747624e-02\n-1.04593999790804804e-01\n-1.08370883388489020e-01\n-5.55756715508815974e-02\n3.29155900967992923e-02\n1.09287382962020771e-01\n1.22605539129134564e-01\n5.40969413253444276e-02\n-5.91615949658106169e-02\n-1.37260355452605731e-01\n-1.11794051852463106e-01\n1.09332329321101297e-02\n1.35154314072091719e-01\n1.43942505285512529e-01\n1.15455726896613910e-02\n-1.46380470594342282e-01\n-1.64313519110156764e-01\n-1.64705613143242705e-03\n1.83698331806533943e-01\n1.82513555760627583e-01\n-2.96396470522189218e-02\n-2.51881654615076056e-01\n-2.88467145525721613e-01\n-1.63170941738289665e-01\n-4.02706376153652429e-02\n1.25536833529265729e-02\n2.17436173894004388e-02\n2.80365590742896638e-02\n3.30108235683023582e-02\n3.69708240564395607e-02\n3.98601974641730680e-02\n4.14235569876002033e-02\n4.12676063251722069e-02\n3.89106610372128500e-02\n3.38477106332495947e-02\n2.56439745321156466e-02\n1.40624351932636688e-02\n-7.78099166258045937e-04\n-1.82308010771579515e-02\n-3.69681902015646310e-02\n-5.49023255286354012e-02\n-6.92476677106949878e-02\n-7.68009450342985317e-02\n-7.44924627015513263e-02\n-6.02064460803836896e-02\n-3.37675333009054349e-02\n2.14493446373188691e-03\n4.15292727315073537e-02\n7.54856403990885466e-02\n9.38925394069503316e-02\n8.83728156838447104e-02\n5.60065739997801723e-02\n2.53359572497553016e-03\n-5.67500476164664314e-02\n-1.00090780607658705e-01\n-1.06879316647861156e-01\n-6.79569684606345925e-02\n5.87711658386082161e-03\n8.31430362174223753e-02\n1.22993689254561722e-01\n9.68747172692424052e-02\n1.04348760202328042e-02\n-9.00304173797995405e-02\n-1.38397866388602575e-01\n-9.22155865311922035e-02\n2.74949923070778521e-02\n1.36133644052711805e-01\n1.41229042871121369e-01\n2.33435777807363895e-02\n-1.27484620558010464e-01\n-1.72716454378553874e-01\n-5.29227582606915034e-02\n1.34542398235220184e-01\n2.07715378027468534e-01\n7.73559287467223133e-02\n-1.52680184863088791e-01\n-2.88615576267162333e-01\n-2.47203325715173783e-01\n-1.17535556869157065e-01\n-2.54212387041673100e-02\n0.0\n4.35908034022260040e-04\n1.68826455624622928e-03\n3.99129319441843180e-03\n7.51943201059868289e-03\n1.23847896019317495e-02\n1.86141296888579257e-02\n2.61116379569899838e-02\n3.46118387105140632e-02\n4.36292080261936610e-02\n5.24151559496093544e-02\n5.99382670787568794e-02\n6.49088431461718463e-02\n6.58719272342091627e-02\n6.13911765914567781e-02\n5.03354980820672412e-02\n3.22576486610804541e-02\n7.81718080572556956e-03\n-2.08483043516788959e-02\n-4.99496673396963992e-02\n-7.42484028833688692e-02\n-8.77968307440157858e-02\n-8.52835257675099434e-02\n-6.38557514278798866e-02\n-2.50082856393550358e-02\n2.41690103580641108e-02\n7.12607422149522524e-02\n1.01035101420728635e-01\n1.00275156300377033e-01\n6.38863926113687752e-02\n-7.25103634541489746e-05\n-6.95887359513654297e-02\n-1.14674311374865778e-01\n-1.10053474113583419e-01\n-5.02365614304745300e-02\n4.12748603071031311e-02\n1.17329414379272731e-01\n1.29881103593768643e-01\n6.15562494833643559e-02\n-5.36966012729509917e-02\n-1.41409151250194792e-01\n-1.32716421886740710e-01\n-2.06641966031597991e-02\n1.18717175277778433e-01\n1.72176322751595445e-01\n8.14874675806867566e-02\n-9.20672232862888018e-02\n-2.02356755016530804e-01\n-1.41678888564882172e-01\n5.55585675376853161e-02\n2.39150917964252308e-01\n2.83447688688102550e-01\n1.95863658483269781e-01\n8.02245753926257577e-02\n1.53904733943944147e-02\n1.30267108642661087e-02\n2.25629250724183814e-02\n2.90965246824555629e-02\n3.42756120403687192e-02\n3.84349607151536557e-02\n4.15445053852357277e-02\n4.33767284525390998e-02\n4.35672492653537205e-02\n4.16597871715024340e-02\n3.71623945711324483e-02\n2.96275838558391416e-02\n1.87624217871311845e-02\n4.56762832071741249e-03\n-1.25053585029167164e-02\n-3.14041492412030013e-02\n-5.03731526347683325e-02\n-6.69559912972450683e-02\n-7.81676616435447169e-02\n-8.08936513937765084e-02\n-7.25386993643963446e-02\n-5.18787314278955358e-02\n-1.99664648662301256e-02\n1.91784451117189871e-02\n5.84595013416937745e-02\n8.85464376535811531e-02\n9.98910429117925436e-02\n8.57721847855504316e-02\n4.56781097207937109e-02\n-1.22467328188533911e-02\n-7.12781670727290900e-02\n-1.09969854054185384e-01\n-1.09797793182447700e-01\n-6.45313668156565767e-02\n1.28646179077708568e-02\n9.08248916836835174e-02\n1.30363474203424118e-01\n1.04728602084356914e-01\n1.86650877476568187e-02\n-8.57244781805649309e-02\n-1.46107071335630362e-01\n-1.16805277696128140e-01\n-5.30342401860138361e-03\n1.20242507324901077e-01\n1.68752703445731400e-01\n9.27913737133983091e-02\n-6.42175924321590347e-02\n-1.87017346845830323e-01\n-1.72997818561107075e-01\n-1.84184884544027067e-02\n1.73286716361121085e-01\n2.77044911028514473e-01\n2.48439737569811192e-01\n1.44571306747684675e-01\n5.19447727641141124e-02\n8.92823027849905422e-03\n0.0\n4.28520263439578905e-04\n1.65965184381390400e-03\n3.92405160938262467e-03\n7.39519028342276469e-03\n1.21890092029522008e-02\n1.83444944868256000e-02\n2.57911407741497865e-02\n3.43070063660237262e-02\n4.34725760810434486e-02\n5.26288870262006866e-02\n6.08526301629105509e-02\n6.69653950957750932e-02\n6.95974926541541999e-02\n6.73267446252690527e-02\n5.89064799956717303e-02\n4.35817360751454691e-02\n2.14662038270186650e-02\n-6.08476342186571074e-03\n-3.62124623595526385e-02\n-6.45478224832978648e-02\n-8.56117178375660481e-02\n-9.37328015115040658e-02\n-8.44762350107370885e-02\n-5.63794109410062499e-02\n-1.25416902015609896e-02\n3.86066019526243795e-02\n8.40950603269906838e-02\n1.09259537214121127e-01\n1.02489461092148598e-01\n6.07249597829626481e-02\n-6.47483583652128710e-03\n-7.69484176767235017e-02\n-1.21945673144215408e-01\n-1.17720964337019812e-01\n-5.88271008550696334e-02\n3.37693363842754696e-02\n1.16787813123344367e-01\n1.43409216105307158e-01\n9.04109543391045378e-02\n-2.13519969666637645e-02\n-1.29796147582471655e-01\n-1.63866245870937899e-01\n-9.09321098386550730e-02\n5.21980727668737640e-02\n1.73430748299553739e-01\n1.84473970317771629e-01\n6.60971172642248472e-02\n-1.13407868779164409e-01\n-2.47445855995068770e-01\n-2.70285252547493693e-01\n-1.98222599552311057e-01\n-9.98635739214956963e-02\n-3.19180760354626988e-02\n-4.95716697843186921e-03\n1.35644446626667966e-02\n2.34943073321953709e-02\n3.03013731447460480e-02\n3.57127520613346669e-02\n4.00971488887369026e-02\n4.34535966967641643e-02\n4.55854695615846989e-02\n4.61610144485144827e-02\n4.47541474289074592e-02\n4.08922549284495285e-02\n3.41232062243388770e-02\n2.41079455367290418e-02\n1.07396010639493646e-02\n-5.71748888632043258e-03\n-2.44859086323093098e-02\n-4.41605408250605735e-02\n-6.26648108005520010e-02\n-7.73314381281381413e-02\n-8.51615285254544996e-02\n-8.32983394101900615e-02\n-6.97093889098124170e-02\n-4.39994256138169781e-02\n-8.18325956760459529e-03\n3.28472419273115671e-02\n7.14842385648782469e-02\n9.84800305951322036e-02\n1.05045292507169929e-01\n8.57295453964141141e-02\n4.13761015724139342e-02\n-1.89976809466082079e-02\n-7.87114524064677079e-02\n-1.17253409101566092e-01\n-1.17252758342790059e-01\n-7.27320204976742019e-02\n4.85981063415286910e-03\n8.68964449072146400e-02\n1.36623836046785574e-01\n1.25580941501947346e-01\n5.08321053680440074e-02\n-5.69831191242957460e-02\n-1.43098643402899905e-01\n-1.55567107742255073e-01\n-7.76331421169406677e-02\n5.47473383057207746e-02\n1.66478856501257794e-01\n1.85937904910673690e-01\n9.18430864919254630e-02\n-6.94109916822789746e-02\n-2.12555558228058689e-01\n-2.69907495131062991e-01\n-2.32636777106883297e-01\n-1.45542405925639023e-01\n-6.47226418278313287e-02\n-1.86074790003075731e-02\n-2.63044622752707079e-03\n0.0\n4.19386208761145360e-04\n1.62427580216098315e-03\n3.84081186848102100e-03\n7.24075601958257351e-03\n1.19433120629433773e-02\n1.79993313769195099e-02\n2.53636070688424003e-02\n3.38583698087113888e-02\n4.31320153014669305e-02\n5.26195139170285708e-02\n6.15142847031419221e-02\n6.87649947430891695e-02\n7.31138449093436393e-02\n7.31939720095955426e-02\n6.77006486081219855e-02\n5.56417080627377159e-02\n3.66550691701881468e-02\n1.13547273329462524e-02\n-1.83667279835085691e-02\n-4.91845325723629725e-02\n-7.64641676993160907e-02\n-9.47792711818900013e-02\n-9.88887475198011179e-02\n-8.51193301205939307e-02\n-5.29241233469481751e-02\n-6.18671988954314859e-03\n4.63145857873193886e-02\n9.18734882103407063e-02\n1.16592856794660096e-01\n1.09669382334556531e-01\n6.82017495907825538e-02\n7.17911504363927689e-04\n-7.27098795113991642e-02\n-1.25295611870182011e-01\n-1.33091047700700349e-01\n-8.64485498678730369e-02\n1.74149371065213110e-03\n9.66350793887489623e-02\n1.53697461239698380e-01\n1.39680006985081762e-01\n5.28589102631094321e-02\n-6.98254452928053632e-02\n-1.66674458865268021e-01\n-1.82524881752253398e-01\n-1.00966488967142887e-01\n4.34188687378794722e-02\n1.83502118594619290e-01\n2.58812080952090295e-01\n2.49324762315981302e-01\n1.80567711097666672e-01\n9.89524871740360273e-02\n3.94059086183680060e-02\n1.02836128647026646e-02\n1.33164046408305523e-03\n1.41891481663377547e-02\n2.45763255402197608e-02\n3.17009078792538507e-02\n3.73812707544456599e-02\n4.20246006439960670e-02\n4.56624075785133435e-02\n4.81324750164599802e-02\n4.91399397441506236e-02\n4.82944294628883525e-02\n4.51499778587786949e-02\n3.92594487400748302e-02\n3.02498595515060982e-02\n1.79208633515163494e-02\n2.36326687430590994e-03\n-1.59130819450751873e-02\n-3.58624394220528747e-02\n-5.58286785789772755e-02\n-7.35542781162534937e-02\n-8.63185725640471108e-02\n-9.12452408385081432e-02\n-8.57967918850108396e-02\n-6.84306508108617206e-02\n-3.93273438339269074e-02\n-1.02459401655307183e-03\n4.12779723578540619e-02\n8.00076773237795441e-02\n1.06313705590038665e-01\n1.12013639291079409e-01\n9.21474892658121214e-02\n4.75283321485710716e-02\n-1.36482040187875207e-02\n-7.61793031501775963e-02\n-1.20949986143911711e-01\n-1.30653115327608732e-01\n-9.67995428761999482e-02\n-2.54491429148804606e-02\n6.14527232764629575e-02\n1.31408683931377751e-01\n1.53155235108501542e-01\n1.11164615900263539e-01\n1.62338553257586928e-02\n-9.46042339836398877e-02\n-1.71660677457154964e-01\n-1.75336301373350212e-01\n-9.70187686136688848e-02\n3.42801166241148425e-02\n1.65342365541613745e-01\n2.45968229725825688e-01\n2.54029739416635814e-01\n2.02916690746560324e-01\n1.27867761519895262e-01\n6.25078561037153285e-02\n2.25416957540094630e-02\n5.38050229423966356e-03\n6.41768929841652377e-04\n0.0\n4.08082948372588130e-04\n1.58049846291825479e-03\n3.73769477234311281e-03\n7.04877972377562258e-03\n1.16354435521234811e-02\n1.75598049586922315e-02\n2.48016352696378319e-02\n3.32275661655358559e-02\n4.25552827377958590e-02\n5.23173894541885606e-02\n6.18321008252027196e-02\n7.01907765760884095e-02\n7.62750166438641020e-02\n7.88176349957459554e-02\n7.65210374293854578e-02\n6.82417340388056515e-02\n5.32393133677888583e-02\n3.14711430245870200e-02\n3.89070943800756642e-03\n-2.73192824242883582e-02\n-5.86718387670435645e-02\n-8.55622651503115395e-02\n-1.02804698419645540e-01\n-1.05552391467046855e-01\n-9.05348763147596491e-02\n-5.74049128670630279e-02\n-9.83674068129546629e-03\n4.40915046774547487e-02\n9.26908250184780708e-02\n1.22894013537297703e-01\n1.23776351266690426e-01\n9.06297332095319097e-02\n2.82775211789011056e-02\n-4.79739177719941678e-02\n-1.15046849764173634e-01\n-1.48691955338112303e-01\n-1.32506424323048766e-01\n-6.61796344411851867e-02\n3.10319532122688251e-02\n1.24605984286318597e-01\n1.76822556908952960e-01\n1.62515682522021726e-01\n8.13750825299827119e-02\n-4.00769389922249544e-02\n-1.59248141094861823e-01\n-2.36471523910123632e-01\n-2.52409022710351094e-01\n-2.14327187654942131e-01\n-1.48290174221310661e-01\n-8.31328997055773428e-02\n-3.67397507792424707e-02\n-1.21056707744232692e-02\n-2.65997545885201560e-03\n-2.93686393546735707e-04\n1.49357668340083325e-02\n2.58695070065045885e-02\n3.33732978305523106e-02\n3.93737938593624950e-02\n4.43227276882506641e-02\n4.82883327812531349e-02\n5.11470327936955280e-02\n5.26458724914877843e-02\n5.24366549383507644e-02\n5.01086949713638666e-02\n4.52314339047650074e-02\n3.74130923372962138e-02\n2.63783902736286803e-02\n1.20647205659291240e-02\n-5.26889416915537860e-03\n-2.49324643302473170e-02\n-4.57157737245935947e-02\n-6.58478678376947790e-02\n-8.30401573085496336e-02\n-9.46489517302982891e-02\n-9.79849312480154666e-02\n-9.07755574876028537e-02\n-7.17493709755137321e-02\n-4.12599461549654420e-02\n-1.80962654450802715e-03\n4.17152789738316487e-02\n8.23019406083845412e-02\n1.11721118603721137e-01\n1.22124151787010637e-01\n1.08150749570699187e-01\n6.91085503640549714e-02\n1.05460359381546361e-02\n-5.55601249079143988e-02\n-1.12619990837183895e-01\n-1.43364255164979415e-01\n-1.35222058910182907e-01\n-8.56038820650335819e-02\n-4.99656094543142644e-03\n8.40423246537446711e-02\n1.52742803393584675e-01\n1.75623896791931355e-01\n1.40388235404198009e-01\n5.39317284860415247e-02\n-5.88934564604122607e-02\n-1.64172076531728106e-01\n-2.32060812834118474e-01\n-2.48150619885322388e-01\n-2.17528518183614156e-01\n-1.59788810351913640e-01\n-9.82642137622816991e-02\n-4.97713714550383698e-02\n-2.00904654941757715e-02\n-6.09302287986447123e-03\n-1.23932493989622724e-03\n-1.27216709497715553e-04\n0.0\n3.93971012186773793e-04\n1.52584316908785421e-03\n3.60883560431562002e-03\n6.80815468046533281e-03\n1.12469004301353117e-02\n1.69975194923320250e-02\n2.40640123158984351e-02\n3.23570769819732929e-02\n4.16643335995238520e-02\n5.16188231345182796e-02\n6.16706566590934716e-02\n7.10687599072749449e-02\n7.88617853829694515e-02\n8.39289253687034303e-02\n8.50517825443018599e-02\n8.10366379636357353e-02\n7.08912813326951635e-02\n5.40510619876274009e-02\n3.06345802362153752e-02\n1.69122887597849061e-03\n-3.06168089168343399e-02\n-6.29715878099877252e-02\n-9.10742323767852469e-02\n-1.10102075746676520e-01\n-1.15470677641243052e-01\n-1.03849980315424820e-01\n-7.42844999687920088e-02\n-2.91608790479181805e-02\n2.53135369610881303e-02\n7.94646760722014234e-02\n1.21571970219868028e-01\n1.40338439455463454e-01\n1.28027437457278681e-01\n8.34885213403793319e-02\n1.40255750126054637e-02\n-6.49055679827244131e-02\n-1.32717046519508858e-01\n-1.69094329957465400e-01\n-1.60397059823447125e-01\n-1.04864068336713440e-01\n-1.43756643820381873e-02\n8.84983775983214926e-02\n1.77608925899678083e-01\n2.31983751210504768e-01\n2.42659622818691773e-01\n2.14633309943296408e-01\n1.63198171805958636e-01\n1.06685327296060603e-01\n5.93193075759306104e-02\n2.74573685104081873e-02\n1.02061446958273162e-02\n2.86660565798021105e-03\n5.42355464900166765e-04\n5.19638536557746802e-05\n1.58636408905758960e-02\n2.74766320155046435e-02\n3.54512724919813921e-02\n4.18475617369705732e-02\n4.71703715943857099e-02\n5.15303101418028847e-02\n5.48477735590651647e-02\n5.69178405941778640e-02\n5.74422753901876262e-02\n5.60560700598661116e-02\n5.23593394263332582e-02\n4.59603534940192932e-02\n3.65330101021348677e-02\n2.38897064992948868e-02\n8.06748292203027413e-03\n-1.05788717551073014e-02\n-3.12883334289333140e-02\n-5.28272785584494933e-02\n-7.34683312250997561e-02\n-9.10411297145077986e-02\n-1.03081133702661434e-01\n-1.07095207842900886e-01\n-1.00946180028395671e-01\n-8.33317359865782814e-02\n-5.42972220005142614e-02\n-1.56823626710033311e-02\n2.86315499969038052e-02\n7.28205099822206714e-02\n1.09685629329839288e-01\n1.31739364732354397e-01\n1.32733081666419672e-01\n1.09384762206417796e-01\n6.29028213971452727e-02\n-1.98791973731437795e-04\n-6.84686583498159557e-02\n-1.27330802246520020e-01\n-1.62209674615697158e-01\n-1.62339277356587014e-01\n-1.24197618449834221e-01\n-5.33506017655304282e-02\n3.62248168465922546e-02\n1.25518350770120440e-01\n1.95732292230766519e-01\n2.33691424903530093e-01\n2.35438004413278473e-01\n2.06616723198520480e-01\n1.59551245405821635e-01\n1.08347648167773800e-01\n6.41822511643845711e-02\n3.26630432354064887e-02\n1.39388194022800407e-02\n4.80306519739934126e-03\n1.25593193949319294e-03\n2.21969515150890535e-04\n1.99208054581751351e-05\n0.0\n3.76012118274553621e-04\n1.45628867204951958e-03\n3.44471319151472407e-03\n6.50085634845471924e-03\n1.07476793068870587e-02\n1.62664976065707498e-02\n2.30841576114369403e-02\n3.11542683529908680e-02\n4.03339545881382516e-02\n5.03581247906740304e-02\n6.08142611395168925e-02\n7.11220709324487665e-02\n8.05238209225476870e-02\n8.80925481511086322e-02\n9.27662107720131079e-02\n9.34156742194810902e-02\n8.89525730639740414e-02\n7.84788778772592677e-02\n6.14729129417650733e-02\n3.79965120129143186e-02\n8.89560752314171033e-03\n-2.40464495470442408e-02\n-5.80541010029116400e-02\n-8.94583876603569778e-02\n-1.13996398110954730e-01\n-1.27333961316730054e-01\n-1.25791032519113388e-01\n-1.07189779965843057e-01\n-7.16789371387994978e-02\n-2.23316576921863755e-02\n3.47087563107537148e-02\n9.07259769006692335e-02\n1.35652484764799824e-01\n1.59918372722588104e-01\n1.56611137180007576e-01\n1.23436465536318374e-01\n6.38822948278279096e-02\n-1.29190399974270075e-02\n-9.38347885762799427e-02\n-1.64628312817157035e-01\n-2.13380148905940398e-01\n-2.33409348184581422e-01\n-2.24723668445142272e-01\n-1.93479403850010445e-01\n-1.49649459794804068e-01\n-1.03786721140965862e-01\n-6.40993722066336008e-02\n-3.48433842931542628e-02\n-1.63800134151937810e-02\n-6.49006355057269932e-03\n-2.08473278897869591e-03\n-5.09808818661299933e-04\n-8.44860408738679064e-05\n-7.12505945904020376e-06\n1.70851635400113729e-02\n2.95923713069230349e-02\n3.81862132380518804e-02\n4.51003087878175529e-02\n5.09059721196137085e-02\n5.57643693032702920e-02\n5.96470893215544640e-02\n6.24051611891024288e-02\n6.38001108447191351e-02\n6.35255519619559728e-02\n6.12298491492806046e-02\n5.65451574901027210e-02\n4.91260097309544619e-02\n3.86991366052285915e-02\n2.51245253449097587e-02\n8.46548764073646459e-03\n-1.09374081580423839e-02\n-3.23972105652473238e-02\n-5.48287441960478433e-02\n-7.67299999871965399e-02\n-9.62148532439788817e-02\n-1.11114774239019387e-01\n-1.19162763278090972e-01\n-1.18263055247697563e-01\n-1.06834588656234478e-01\n-8.41954671278206945e-02\n-5.09321754025308243e-02\n-9.17593692069857900e-03\n3.73037515921683174e-02\n8.32736142319509959e-02\n1.22535274376857836e-01\n1.48747699955335544e-01\n1.56493039844461307e-01\n1.42416235497769772e-01\n1.06194431848755849e-01\n5.10629227365005517e-02\n-1.63324817231263568e-02\n-8.68590317337550460e-02\n-1.50501676102719001e-01\n-1.98335015227801559e-01\n-2.24381829869129718e-01\n-2.26838729168973574e-01\n-2.08284632691673743e-01\n-1.74780204516411575e-01\n-1.34126216839936530e-01\n-9.38374380472597192e-02\n-5.94764177863263063e-02\n-3.38264750364351691e-02\n-1.70310081089525972e-02\n-7.44948519272175830e-03\n-2.75635961675843718e-03\n-8.29281734255453711e-04\n-1.90409315119839185e-04\n-2.96880383818674994e-05\n-2.35963023207521590e-06\n0.0\n3.52328837950376464e-04\n1.36456372177041975e-03\n3.22811325538942132e-03\n6.09430828747851809e-03\n1.00835969111881234e-02\n1.52838263060880893e-02\n2.17422715803059462e-02\n2.94529916247981867e-02\n3.83404833483267787e-02\n4.82407400364097266e-02\n5.88813051451444747e-02\n6.98626248869958638e-02\n8.06438593527107894e-02\n9.05372064135337301e-02\n9.87155655734041904e-02\n1.04238793149153200e-01\n1.06103581908674208e-01\n1.03320798928649732e-01\n9.50216016720578094e-02\n8.05895815079235023e-02\n5.98105248416268276e-02\n3.30244603717880642e-02\n1.25730253072627290e-03\n-3.36969750947747337e-02\n-6.92761081669533707e-02\n-1.02261816796725205e-01\n-1.29025707949736002e-01\n-1.45911568584565166e-01\n-1.49729934706118145e-01\n-1.38308457157809928e-01\n-1.11009902902694801e-01\n-6.91075892022905008e-02\n-1.59058354417704155e-02\n4.34808422857067278e-02\n1.02718535056552818e-01\n1.55160663803377702e-01\n1.94925509320857254e-01\n2.17926423561664029e-01\n2.22610461140428012e-01\n2.10202906354115954e-01\n1.84366553263173333e-01\n1.50341174289547769e-01\n1.13782388050170075e-01\n7.96133483243024742e-02\n5.11952949987973874e-02\n3.00091427447068196e-02\n1.58607474331697272e-02\n7.44999992308390414e-03\n3.04981766447651311e-03\n1.05891499523218702e-03\n2.99615647129887908e-04\n6.48182877825101856e-05\n9.53728982686830225e-06\n7.16319008091804236e-07\n1.88519943920238651e-02\n3.26526121109888823e-02\n4.21409560889977816e-02\n4.97985028430906473e-02\n5.62866842216539764e-02\n6.18308001664424137e-02\n6.64646612873629888e-02\n7.01065433242544639e-02\n7.25910871105435451e-02\n7.36876815346916847e-02\n7.31159435330033386e-02\n7.05631687470498897e-02\n6.57065380546989208e-02\n5.82418159927415927e-02\n4.79194319666140928e-02\n3.45878611674970624e-02\n1.82429685821514850e-02\n-9.19602832508430081e-04\n-2.24537855161079034e-02\n-4.56209650750661680e-02\n-6.93650091446196271e-02\n-9.23143427639993991e-02\n-1.12821117740864826e-01\n-1.29045957801858735e-01\n-1.39092932159769422e-01\n-1.41192999203433145e-01\n-1.33925293800893686e-01\n-1.16455092216250833e-01\n-8.87566790455659033e-02\n-5.17810723768549475e-02\n-7.52559645013472448e-03\n4.10324535292616172e-02\n9.01603498909511469e-02\n1.35749330708807070e-01\n1.73812662911806748e-01\n2.01032387262850554e-01\n2.15258966922193179e-01\n2.15859900929681603e-01\n2.03830110917487123e-01\n1.81619998627732648e-01\n1.52699566731877873e-01\n1.20943517638322368e-01\n8.99724136745746889e-02\n6.26001171241379051e-02\n4.05087921162795850e-02\n2.42060562211117818e-02\n1.32360378194640287e-02\n6.54674245212787630e-03\n2.88545670003405525e-03\n1.11088267066473414e-03\n3.63433699929127218e-04\n9.70537735335644258e-05\n1.98446479024009414e-05\n2.76310919399395892e-06\n1.96590831669705791e-07\n0.0\n3.18876588471766055e-04\n1.23500371664658575e-03\n2.92195484987943163e-03\n5.51836314234554603e-03\n9.13806964892966908e-03\n1.38713539049234707e-02\n1.97815184366259972e-02\n2.68982000384549724e-02\n3.52080619112587062e-02\n4.46434037945307380e-02\n5.50693515582932336e-02\n6.62705484498692793e-02\n7.79386224229580982e-02\n8.96621109730407345e-02\n1.00920939042422775e-01\n1.11087899276186841e-01\n1.19439785863413264e-01\n1.25180769734328678e-01\n1.27480146520113552e-01\n1.25525615642043370e-01\n1.18591667140761359e-01\n1.06120440242409686e-01\n8.78096667558989213e-02\n6.36992740783850764e-02\n3.42453354089627543e-02\n3.67942607088123596e-04\n-3.65410042801564833e-02\n-7.46623800898266604e-02\n-1.11854476436298117e-01\n-1.45817733681116002e-01\n-1.74309392955824205e-01\n-1.95386501991386352e-01\n-2.07645314929775171e-01\n-2.10418511273058134e-01\n-2.03891594949414445e-01\n-1.89108245909058309e-01\n-1.67851440942564961e-01\n-1.42410545700761282e-01\n-1.15269494613011544e-01\n-8.87711165189911389e-02\n-6.48211865807307996e-02\n-4.46887882426876271e-02\n-2.89373221945620415e-02\n-1.74884347996872996e-02\n-9.78868495576167529e-03\n-5.02624480274891164e-03\n-2.33951949718054194e-03\n-9.72151700569815359e-04\n-3.53428279993777490e-04\n-1.09339573476761824e-04\n-2.76447120623186628e-05\n-5.35737700509635599e-06\n-7.07651372262255814e-07\n-4.78022932315473063e-08\n2.19232355681776327e-02\n3.79721578703847984e-02\n4.90131366663724491e-02\n5.79519099490892337e-02\n6.55944795631763361e-02\n7.22593156899520028e-02\n7.80637783149828041e-02\n8.30131599199543241e-02\n8.70367703128721582e-02\n9.00058796966529129e-02\n9.17450328234190454e-02\n9.20415110744405712e-02\n9.06553469716810528e-02\n8.73313026276152649e-02\n8.18136979137022852e-02\n7.38645828189238712e-02\n6.32853502451586891e-02\n4.99414151817121968e-02\n3.37890192689345170e-02\n1.49025635389102521e-02\n-6.49983332408249175e-03\n-3.00355325316233601e-02\n-5.51448486915762995e-02\n-8.10905728415439592e-02\n-1.06973122534834514e-01\n-1.31764093832789114e-01\n-1.54359468672408684e-01\n-1.73651471449818934e-01\n-1.88615193622509392e-01\n-1.98402919016114399e-01\n-2.02436082351058477e-01\n-2.00482633592615034e-01\n-1.92706976421043591e-01\n-1.79681217931742243e-01\n-1.62350525776727483e-01\n-1.41951753772405986e-01\n-1.19892348853479505e-01\n-9.76044518097292091e-02\n-7.63952093649625519e-02\n-5.73168095160904445e-02\n-4.10774091550684048e-02\n-2.80068426188518939e-02\n-1.80800995564246621e-02\n-1.09896284281131972e-02\n-6.24776143266004766e-03\n-3.29576200471861378e-03\n-1.59750990714465193e-03\n-7.02944955651135100e-04\n-2.76488590781934251e-04\n-9.52541006070765364e-05\n-2.79533694062352305e-05\n-6.71010345579017911e-06\n-1.23558197444060019e-06\n-1.55182565746996084e-07\n-9.97337695681145474e-09\n0.0\n2.63402337318820537e-04\n1.02015286578790044e-03\n2.41391366240341744e-03\n4.56060631710673327e-03\n7.55833396450559126e-03\n1.14907572139721879e-02\n1.64275281764340864e-02\n2.24229360364745049e-02\n2.95132424700470519e-02\n3.77129739916533188e-02\n4.70103878068771630e-02\n5.73623501324927246e-02\n6.86889297350670724e-02\n8.08680996137136898e-02\n9.37310451401581063e-02\n1.07058685273016083e-01\n1.20580108988420281e-01\n1.33973691816806351e-01\n1.46871663286154530e-01\n1.58868818575902959e-01\n1.69535880811831352e-01\n1.78437703631286582e-01\n1.85156048224695141e-01\n1.89316085651281191e-01\n1.90615101162815576e-01\n1.88851181944526936e-01\n1.83949055501509001e-01\n1.75979842109790119e-01\n1.65171431797086876e-01\n1.51906620186320201e-01\n1.36707115459590300e-01\n1.20203051840516592e-01\n1.03089587137330754e-01\n8.60742662652412144e-02\n6.98207291120174628e-02\n5.48956016974875838e-02\n4.17256413729675465e-02\n3.05711667372366332e-02\n2.15195051496457658e-02\n1.44989671970235882e-02\n9.31033506975721854e-03\n5.66982739087063415e-03\n3.25573294845513811e-03\n1.75086585171308905e-03\n8.74696192405165153e-04\n4.01956139866333168e-04\n1.67844246631031787e-04\n6.27030354116176207e-05\n2.05334014225077811e-05\n5.73170006404587777e-06\n1.30956167002449048e-06\n2.29647913948234242e-07\n2.74819851262940710e-08\n1.68366834664328963e-09\n3.12198636024832443e-02\n5.40743899648713014e-02\n6.98072845286455829e-02\n8.25854844828918105e-02\n9.36102343187014407e-02\n1.03417282072127262e-01\n1.12288182919675864e-01\n1.20379549906985323e-01\n1.27775659464474195e-01\n1.34513594076884457e-01\n1.40596804393402081e-01\n1.46003296891300954e-01\n1.50691236644772159e-01\n1.54603368880881969e-01\n1.57671034444186092e-01\n1.59818236172900974e-01\n1.60966028804495481e-01\n1.61037377392143966e-01\n1.59962522322900563e-01\n1.57684785846910092e-01\n1.54166648834305420e-01\n1.49395817456639685e-01\n1.43390893390992979e-01\n1.36206168592446580e-01\n1.27935001374362395e-01\n1.18711211844388334e-01\n1.08707979385134754e-01\n9.81338475678500688e-02\n8.72256501823234359e-02\n7.62384617759043898e-02\n6.54330273777195964e-02\n5.50615013448151336e-02\n4.53526703136106213e-02\n3.64980848829767404e-02\n2.86406131975973192e-02\n2.18668054139567504e-02\n1.62040997633324038e-02\n1.16233312680056773e-02\n8.04629617516545471e-03\n5.35739657492381987e-03\n3.41778293008229445e-03\n2.08006235978646639e-03\n1.20163756974717498e-03\n6.55099036654078343e-04\n3.34735626346496383e-04\n1.59004472513310242e-04\n6.95221194893394463e-05\n2.76382380058150605e-05\n9.83554554689395004e-06\n3.06975145479878437e-06\n8.17081555775202103e-07\n1.78088638813503609e-07\n2.98038122429669272e-08\n3.40494276452541241e-09\n1.99208133036857234e-10\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.08472742381388542e-03\n-4.20113124760565244e-03\n-9.90251969648426981e-03\n-1.84771170763622303e-02\n-2.97864244518314635e-02\n-4.29935124003884145e-02\n-5.62502048776087268e-02\n-6.64805016337743915e-02\n-6.94951639769335328e-02\n-6.07489836031443048e-02\n-3.70087187849701890e-02\n1.10930973807619473e-03\n4.64683006843350233e-02\n8.43432667407494757e-02\n9.54507151085634137e-02\n6.49196479072799287e-02\n-4.37546628453371750e-03\n-8.19387104591041138e-02\n-1.16402125826386982e-01\n-6.80514713575707669e-02\n4.51112437681951625e-02\n1.31643108854483243e-01\n9.06119505406491887e-02\n-6.35740425963955968e-02\n-1.55664101856450132e-01\n-3.25463011982652650e-02\n1.61062963962556399e-01\n9.14113873640488572e-02\n-1.71651781820813254e-01\n-9.17992460712520608e-02\n2.26861122079491717e-01\n-2.74638834186305171e-02\n-2.38715686972268110e-01\n3.27133758028667565e-01\n-2.52461693632194173e-01\n1.37970366908697711e-01\n-5.77226737959510572e-02\n1.91900278708997951e-02\n-5.17285234812659821e-03\n1.14295039404465238e-03\n-2.07983783328855249e-04\n3.11689067087047306e-05\n-3.82973710685585953e-06\n3.82261697502359940e-07\n-3.05284349905734929e-08\n1.90534375715001719e-09\n-8.95713424979161803e-11\n2.98382267775662062e-12\n-6.28005580839250896e-14\n6.28036983473509968e-16\n0.0\n0.0\n0.0\n0.0\n0.0\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n-3.20283468138268617e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n8.08445165689827342e-13\n-1.63282067007192764e-14\n0.0\n0.0\n0.0\n0.0\n-1.49153584618682711e-02\n-2.58341586690582249e-02\n-3.32116220033397275e-02\n-3.86332886759592903e-02\n-4.19352060972968538e-02\n-4.22859974032437497e-02\n-3.84603343591977051e-02\n-2.91354456526192324e-02\n-1.33735769422542814e-02\n8.66375493142438995e-03\n3.48542512856124601e-02\n6.03977488262971221e-02\n7.77935527381269643e-02\n7.82387419341021156e-02\n5.50015082023348201e-02\n8.46471169411793130e-03\n-4.91546484099385228e-02\n-9.33789301143736900e-02\n-9.58451624442848149e-02\n-4.24753634491714521e-02\n4.65584996049520153e-02\n1.13675365442407236e-01\n9.62111172949670912e-02\n-1.20719355238242849e-02\n-1.22543885941844538e-01\n-1.08867617260667501e-01\n4.32122795008925698e-02\n1.55525846583246002e-01\n4.44856381102336565e-02\n-1.56679204868117705e-01\n-9.27910168036672200e-02\n1.70832186850680245e-01\n8.35132884230644357e-02\n-2.25539034459328630e-01\n4.43192212140970654e-02\n2.19269242183260410e-01\n-3.21854692028745448e-01\n2.60382927692662802e-01\n-1.49103608459652814e-01\n6.56033227650731493e-02\n-2.30603343843918986e-02\n6.61577618876218760e-03\n-1.56781788023062688e-03\n3.08791591122133168e-04\n-5.06329993144556269e-05\n6.89739006530945087e-06\n-7.75957347905360304e-07\n7.13509751266757394e-08\n-5.27725011601396538e-09\n3.06437392918077032e-10\n-1.34576262686770477e-11\n4.20315987260463183e-13\n-8.32111971795923090e-15\n0.0\n0.0\n0.0\n0.0\n-9.31231485683661287e-04\n-3.60664403551681084e-03\n-8.50602400394575263e-03\n-1.59003845831766355e-02\n-2.57379331178424903e-02\n-3.74429022893153773e-02\n-4.96727203528201863e-02\n-6.01209842233804345e-02\n-6.55188921569456323e-02\n-6.20485584438564761e-02\n-4.63832477729556533e-02\n-1.74258908623226814e-02\n2.15613643306100493e-02\n6.13677159501424679e-02\n8.73740714402345270e-02\n8.39387467097887224e-02\n4.30735753536244936e-02\n-2.54205416613427181e-02\n-8.96319597239925298e-02\n-1.06347499921684019e-01\n-5.01739831038397407e-02\n5.32299261477481092e-02\n1.23700123221912733e-01\n8.28396897050736464e-02\n-5.28775536891320994e-02\n-1.43085570967639686e-01\n-5.61977132639769339e-02\n1.23816025006318553e-01\n1.28765238917973951e-01\n-9.31608526655434005e-02\n-1.63492650510438126e-01\n1.06861882743359851e-01\n1.62491258203155242e-01\n-1.96459220801137896e-01\n-4.41807868984634977e-02\n2.70804866571520197e-01\n-3.14111437351427047e-01\n2.26653503225050040e-01\n-1.19973760107645350e-01\n4.96384679318883706e-02\n-1.65764998398732176e-02\n4.54921289331997394e-03\n-1.03647975975075567e-03\n1.97023114024771396e-04\n-3.12759943321989361e-05\n4.13512897657961669e-06\n-4.52475045531942631e-07\n4.05416570728018662e-08\n-2.92645637485853674e-09\n1.66078551450348462e-10\n-7.13697837991790340e-12\n2.18361705890636816e-13\n-4.23906791088685720e-15\n0.0\n0.0\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367363e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n-1.61942344080973289e-09\n8.98653833493966699e-11\n-3.78065778735820891e-12\n1.13361214079692652e-13\n-2.15878791904814791e-15\n0.0\n0.0\n8.66426047764552840e-04\n3.35565365371242501e-03\n7.91595443084345055e-03\n1.48087344978570980e-02\n2.40121934498876630e-02\n3.50470844797404965e-02\n4.67621537451872737e-02\n5.71499205294295071e-02\n6.33170572602035214e-02\n6.17867458500721278e-02\n4.93218215401055385e-02\n2.43605773569870315e-02\n-1.11229334763186093e-02\n-5.00111894576891411e-02\n-7.99363085453404787e-02\n-8.61829356704887223e-02\n-5.84006514722374415e-02\n3.58940229482597776e-04\n6.73683490910389760e-02\n1.04547897847193039e-01\n7.88234561964185065e-02\n-7.40196344727397145e-03\n-9.89024440883244094e-02\n-1.13935536034448268e-01\n-1.85003343777213544e-02\n1.09092261688566117e-01\n1.21812489154462897e-01\n-2.46754972559791140e-02\n-1.53724638728994389e-01\n-5.40369786300429894e-02\n1.52844124485929489e-01\n9.28820650447558793e-02\n-1.70534777166068824e-01\n-7.46582530210938983e-02\n2.23693329402947061e-01\n-6.04428648778056812e-02\n-1.99685494680089226e-01\n3.15424575732289769e-01\n-2.67266406134374912e-01\n1.60001492639399556e-01\n-7.37993799662741007e-02\n2.73166714845997499e-02\n-8.29850452787542735e-03\n2.09615300256641487e-03\n-4.43432899576961322e-04\n7.88025564301311331e-05\n-1.17598018378678287e-05\n1.46840532288151399e-06\n-1.52341139845976699e-07\n1.29853215619237565e-08\n-8.94333513020322284e-10\n4.85518037701355783e-11\n-2.00053468434833568e-12\n5.88100400988433593e-14\n-1.09902091182217964e-15\n1.38775648385790068e-02\n2.40366473857502247e-02\n3.09183376927100149e-02\n3.60490110866714675e-02\n3.93682703078595542e-02\n4.02329121179938673e-02\n3.76476647717229468e-02\n3.04822304143377576e-02\n1.78148420603557490e-02\n-5.49493293180726840e-04\n-2.34201922161792198e-02\n-4.75864693423650661e-02\n-6.75475918537050551e-02\n-7.61070536214551313e-02\n-6.63258440415182837e-02\n-3.49512535853120088e-02\n1.34896496535019863e-02\n6.41090627526219453e-02\n9.38543479864410168e-02\n8.10994027665983136e-02\n2.12923912180138231e-02\n-5.98341884996863235e-02\n-1.10030524056330112e-01\n-8.17948212773452893e-02\n1.99064348515221000e-02\n1.15539923940347122e-01\n1.02747525542275245e-01\n-2.93739623914327161e-02\n-1.40726818170620382e-01\n-7.11091388755192705e-02\n1.14989793196826451e-01\n1.32918431505758633e-01\n-8.91485417183863205e-02\n-1.61387508239882377e-01\n1.10055601699256336e-01\n1.53322920048713257e-01\n-2.00539512712531814e-01\n-2.47180274398494312e-02\n2.54306170934596121e-01\n-3.12462048980527318e-01\n2.35681063631851012e-01\n-1.30404128946312675e-01\n5.65779096716435281e-02\n-1.99041935277143658e-02\n5.78688142169003685e-03\n-1.40596016281414383e-03\n2.87177007748138670e-04\n-4.94265797874700931e-05\n7.16154736544445315e-06\n-8.70066637554330904e-07\n8.79840153153714664e-08\n-7.32143270574096396e-09\n4.92939770466701676e-10\n-2.61925496886000591e-11\n1.05747023582451444e-12\n-3.04893628200499972e-14\n0.0\n8.08158692342989915e-04\n3.12998515653716350e-03\n7.38517565752149635e-03\n1.38253132320619240e-02\n2.24522063933630805e-02\n3.28663626386842059e-02\n4.40769909952560268e-02\n5.43310572757454632e-02\n6.10631553156686172e-02\n6.11141009965063056e-02\n5.13829153887050347e-02\n3.00123716033360022e-02\n-1.99912992041950373e-03\n-3.92489735811246479e-02\n-7.14187172436417106e-02\n-8.50885006306404817e-02\n-6.88163708641761074e-02\n-2.08639639467000648e-02\n4.38628639729669381e-02\n9.38928414426828950e-02\n9.42769126249746459e-02\n3.17951926165290777e-02\n-6.21820057924962824e-02\n-1.16966777517995002e-01\n-7.26997949296024210e-02\n4.94382434623633349e-02\n1.32194169547041884e-01\n6.57987478006277354e-02\n-9.54888521621763270e-02\n-1.38115365157589182e-01\n3.28530164553997445e-02\n1.67792257111886223e-01\n1.30048521049586953e-03\n-1.88742910765101940e-01\n2.51320701308221928e-02\n2.04395439674644047e-01\n-1.48084466485667726e-01\n-1.07469414757189574e-01\n2.90187851903803029e-01\n-2.97112519015750698e-01\n2.02734630968114227e-01\n-1.04415761976262733e-01\n4.27882747149507525e-02\n-1.43458775460581483e-02\n3.99957789848109143e-03\n-9.36072935864134593e-04\n1.84837054629292984e-04\n-3.08416262170301266e-05\n4.34251259324340908e-06\n-5.13695069484046143e-07\n5.06657853082752451e-08\n-4.11821551403110582e-09\n2.71191472114882765e-10\n-1.41102151833627694e-11\n5.58406190060084879e-13\n1.34110082885095135e-02\n2.32285477364258114e-02\n2.98860996054554594e-02\n3.48797786234479046e-02\n3.81892381223788158e-02\n3.92471829676002693e-02\n3.71538730469372011e-02\n3.08652396695146408e-02\n1.94853920076197493e-02\n2.71067763847296405e-03\n-1.85941472740467142e-02\n-4.18117164601599367e-02\n-6.22489781836327166e-02\n-7.34866556939571952e-02\n-6.88453932375441002e-02\n-4.41692459769204224e-02\n-1.44841254376531581e-03\n4.82920127164106483e-02\n8.54732402076973929e-02\n8.84366022246835387e-02\n4.60942565828406994e-02\n-2.84199156080339639e-02\n-9.42883172677429493e-02\n-1.01381495418001205e-01\n-2.96036179400583389e-02\n7.66130663395796219e-02\n1.22433390026080946e-01\n4.51895108600385148e-02\n-9.32860514910172911e-02\n-1.30432938458461017e-01\n8.20081992983317902e-03\n1.50931262325264132e-01\n6.15593609069964576e-02\n-1.49611746094279907e-01\n-9.18975496671960018e-02\n1.70628068541547301e-01\n6.53278764101584142e-02\n-2.21263159640423035e-01\n7.57862765817949313e-02\n1.80014718045661271e-01\n-3.07891757468296778e-01\n2.73094737405840060e-01\n-1.70599706566118642e-01\n8.22652000647926263e-02\n-3.19530648431656378e-02\n1.02346436590687109e-02\n-2.74111767195971785e-03\n6.18871018390315859e-04\n-1.18270476590769932e-04\n1.91502023000594468e-05\n-2.62231259216816210e-06\n3.02252308581942185e-07\n-2.90938782209820251e-08\n2.31116975543123349e-09\n-1.48928121109455270e-10\n7.59094088571304640e-12\n0.0\n7.55578460578792250e-04\n2.92634279457469962e-03\n6.90600799850599884e-03\n1.29363300983407065e-02\n2.10376911072675983e-02\n3.08768236488992862e-02\n4.15981791441294158e-02\n5.16661078142204300e-02\n5.88016778013916441e-02\n6.01379021790062890e-02\n5.27364107796431322e-02\n3.45666628780188154e-02\n5.89504265383238111e-03\n-2.92676595184092718e-02\n-6.24162650888476569e-02\n-8.15792684392644823e-02\n-7.50796499560372615e-02\n-3.79476882498117618e-02\n2.12328593136595391e-02\n7.78173930557252286e-02\n9.85941149302572428e-02\n6.11661686758680906e-02\n-2.27622777262843357e-02\n-9.97514513295714444e-02\n-1.02888651705516226e-01\n-1.20807025458813250e-02\n1.01582608746744699e-01\n1.16455312491852439e-01\n-7.60805901610506555e-03\n-1.36066500044879080e-01\n-8.31897955472478273e-02\n1.06895593877290779e-01\n1.35737034603814116e-01\n-8.63403631011036010e-02\n-1.58775957631712761e-01\n1.13751534782348243e-01\n1.43731724342601119e-01\n-2.03878872101696557e-01\n-5.87789538391338996e-03\n2.37332242904563756e-01\n-3.09605301178792980e-01\n2.43864153707220865e-01\n-1.40753685790851485e-01\n6.38573485402233049e-02\n-2.35822617857203536e-02\n7.23183717829213590e-03\n-1.86373745437301173e-03\n4.06441527723909284e-04\n-7.52544596961842165e-05\n1.18349014785157664e-05\n-1.57729685808418275e-06\n1.77258137011227427e-07\n-1.66614437347434157e-08\n1.29420250386442746e-09\n-8.16441149024179224e-11\n1.29748046590291641e-02\n2.24730208877198974e-02\n2.89203443271613889e-02\n3.37826386444656790e-02\n3.70735103747419012e-02\n3.82919017737505599e-02\n3.66228434593737009e-02\n3.11018414527098330e-02\n2.08653274069167255e-02\n5.53264354674670028e-03\n-1.42895572599816070e-02\n-3.64739483838690190e-02\n-5.70233893226039165e-02\n-7.02447626055959923e-02\n-6.98370152504726310e-02\n-5.11337948913146156e-02\n-1.42477980967673293e-02\n3.30013877475572939e-02\n7.44602271615361216e-02\n8.97290742140010589e-02\n6.39803154654428746e-02\n6.62474528345230332e-04\n-7.10490007401951423e-02\n-1.04847531797734775e-01\n-6.65156353079946611e-02\n2.96532510682681640e-02\n1.11007035041306865e-01\n9.45749565926919389e-02\n-2.38279871472458146e-02\n-1.28234830255555182e-01\n-8.24577580450015779e-02\n8.23317203057432612e-02\n1.42175983326254834e-01\n-2.41581776181457111e-02\n-1.66715279399058058e-01\n-1.84856863588283085e-03\n1.86598622873165254e-01\n-3.24707272925996021e-02\n-1.97016239993091397e-01\n1.57410206751743498e-01\n8.71802057908291350e-02\n-2.77107436042824173e-01\n2.98443719543597608e-01\n-2.12349552082682469e-01\n1.14072588013370668e-01\n-4.88923977799044437e-02\n1.72137949930847300e-02\n-5.06402983072517469e-03\n1.25767317036228066e-03\n-2.65243772937648044e-04\n4.76286954356546386e-05\n-7.28115775407417099e-06\n9.45147478149082695e-07\n-1.03626854141031361e-07\n9.51685224181556748e-09\n-7.23195867354570885e-10\n0.0\n7.07968488715487575e-04\n2.74195016643471708e-03\n6.47197520841484748e-03\n1.21301141149080388e-02\n1.97513298530841638e-02\n2.90575945793569400e-02\n3.93078708330475216e-02\n4.91529012662425407e-02\n5.65642447017429412e-02\n5.89415058818410012e-02\n5.35217425912010991e-02\n3.81887577762012043e-02\n1.26659863802208936e-02\n-2.01568873682223502e-02\n-5.33481352313809679e-02\n-7.64032813109597614e-02\n-7.79635215846214008e-02\n-5.10203875232878162e-02\n7.47645039672664583e-04\n5.90476666753959115e-02\n9.43974333203616567e-02\n8.01097842127733856e-02\n1.32861222977138718e-02\n-7.08424179116465824e-02\n-1.10292460231499773e-01\n-6.09612044250449625e-02\n5.06065625403030739e-02\n1.23451269691122634e-01\n6.74739501839395905e-02\n-7.65659296418580576e-02\n-1.35657470885995363e-01\n-6.18618647180836558e-03\n1.47624469664143609e-01\n6.73650512139389035e-02\n-1.46985778465230976e-01\n-9.00015595357351872e-02\n1.70992902684906550e-01\n5.56035135363378979e-02\n-2.18203911549614160e-01\n9.03043044067258355e-02\n1.60312300054577500e-01\n-2.99307131693407946e-01\n2.77854027722973795e-01\n-1.80836553482089823e-01\n9.09536070344159620e-02\n-3.69603142724853131e-02\n1.24360806238899921e-02\n-3.51588474112001989e-03\n8.42644246989619110e-04\n-1.72057073015557260e-04\n2.99909204757225455e-05\n-4.46030125570664008e-06\n5.64299899789155604e-07\n-6.03979033050708685e-08\n5.42233811839169662e-09\n1.25660850235249262e-02\n2.17650977129755230e-02\n2.80148688472692808e-02\n3.27512555097562857e-02\n3.60167101119801408e-02\n3.73681794670315745e-02\n3.60660923388668869e-02\n3.12191448689965907e-02\n2.19999105798660624e-02\n7.97469112913272958e-03\n-1.04542879731757323e-02\n-3.15646184477035227e-02\n-5.19566636005748470e-02\n-6.66026031034667454e-02\n-6.96421173402293203e-02\n-5.61774686788752559e-02\n-2.49650224833861470e-02\n1.87765639236707957e-02\n6.20631630888814970e-02\n8.64628816865110200e-02\n7.54416466240959843e-02\n2.54616812604534330e-02\n-4.47956587243744167e-02\n-9.61972512091509996e-02\n-8.88446586648543590e-02\n-1.47232458226405800e-02\n7.98957332004834875e-02\n1.13931357696995500e-01\n4.05719226435826558e-02\n-8.42089263588257364e-02\n-1.24926536482568323e-01\n-1.19412808254562228e-02\n1.30006633820307221e-01\n9.28698614339001222e-02\n-9.96723383938321189e-02\n-1.37510918608476418e-01\n8.45961868935660166e-02\n1.55716940555528233e-01\n-1.17808353074389555e-01\n-1.33744095507930871e-01\n2.06429212895509195e-01\n-1.22950986622326255e-02\n-2.19945017009354954e-01\n3.05575745127095511e-01\n-2.51167940869888306e-01\n1.50959972271455967e-01\n-7.14415918364089964e-02\n2.76102572199898137e-02\n-8.89761218574894319e-03\n2.42138232289883107e-03\n-5.60748539740517273e-04\n1.10968955842700453e-04\n-1.87928471497622447e-05\n2.72103409726876037e-06\n-3.35743493820971046e-07\n3.50998701758943935e-08\n0.0\n6.64721423538674788e-04\n2.57445500323257460e-03\n6.07758522600758497e-03\n1.13967363290972089e-02\n1.85782722277741293e-02\n2.73904321995126522e-02\n3.71895573466432400e-02\n4.67867735477216565e-02\n5.43729554208776319e-02\n5.75895932167672583e-02\n5.38529390483070275e-02\n4.10233850992304389e-02\n1.84275708835614227e-02\n-1.19419525977376671e-02\n-4.45000192114178850e-02\n-7.01486386490793729e-02\n-7.81845081216826082e-02\n-6.04449887693185653e-02\n-1.69397473819012587e-02\n3.95860793491211727e-02\n8.42640570438786402e-02\n8.95293684295746656e-02\n4.26473939403817295e-02\n-3.74710096432532003e-02\n-1.00045595848514399e-01\n-9.12436083685649879e-02\n-3.07919270226668981e-03\n9.77442930489463707e-02\n1.09498691531181830e-01\n2.76457493593589584e-04\n-1.21176905737521379e-01\n-9.57212015692781859e-02\n6.99263442851631861e-02\n1.44712571197065432e-01\n-1.70180514681687496e-02\n-1.65492041886532743e-01\n-1.32593202125539907e-03\n1.84395657125539875e-01\n-4.01518101142324182e-02\n-1.89141571158557120e-01\n1.65849366514973784e-01\n6.72766229507452823e-02\n-2.63276954832890542e-01\n2.98598963167771847e-01\n-2.21311375920616532e-01\n1.23766691522875116e-01\n-5.53439607608453080e-02\n2.03976260392571239e-02\n-6.30794503707690461e-03\n1.65487438777846860e-03\n-3.70750379036844323e-04\n7.11778537597883976e-05\n-1.17210793946950794e-05\n1.65341926151391565e-06\n-1.99091031827781767e-07\n1.21823309947559997e-02\n2.11004162375384927e-02\n2.71642162504454610e-02\n3.17799977782125126e-02\n3.50147615201252468e-02\n3.64764193643172391e-02\n3.54926194659153371e-02\n3.12392323025125970e-02\n2.29269443335348919e-02\n1.00871622847512471e-02\n-7.03965948978047765e-03\n-2.70659524453721496e-02\n-4.71039521118706075e-02\n-6.27273017499450358e-02\n-6.85414535754735044e-02\n-5.96116843458734322e-02\n-3.37433693854730585e-02\n5.91611457979397161e-03\n4.91987654537014776e-02\n7.99571441376125819e-02\n8.13561672620135706e-02\n4.51502773468403229e-02\n-1.87387543691610106e-02\n-7.95861320079509632e-02\n-9.76110122573933536e-02\n-5.03983043127982089e-02\n4.02252836963974542e-02\n1.07602146788156453e-01\n8.50972928872952700e-02\n-2.37297627894804547e-02\n-1.18810992451742731e-01\n-8.53878271364314351e-02\n5.99162913912761261e-02\n1.38296932716371612e-01\n1.85795819486564776e-02\n-1.44138569145365603e-01\n-7.17182781609930764e-02\n1.44939239121504887e-01\n8.73217036258440577e-02\n-1.71522144292499540e-01\n-4.55580869180398293e-02\n2.14484669935686656e-01\n-1.03955213263819235e-01\n-1.40637430791129225e-01\n2.89724281620719504e-01\n-2.81534166942407571e-01\n1.90653050251489431e-01\n-9.98161218514694026e-02\n4.23261085361715667e-02\n-1.49128701842035933e-02\n4.43349188834251361e-03\n-1.12281235004892187e-03\n2.43621785116167355e-04\n-4.54158742877758750e-05\n7.27779075886833810e-06\n-1.00087514768788453e-06\n0.0\n6.25319940815022182e-04\n2.42185371682798831e-03\n5.71815611534722771e-03\n1.07277080458731897e-02\n1.75057315494455239e-02\n2.58593648258104991e-02\n3.52280968972679548e-02\n4.45615300968297823e-02\n5.22428686135614079e-02\n5.61322649658293829e-02\n5.38230215564891243e-02\n4.31956978484174803e-02\n2.32927298571851092e-02\n-4.60680729179647249e-03\n-3.60583275363465447e-02\n-6.32665980973118464e-02\n-7.63708524660019761e-02\n-6.66920073007263026e-02\n-3.15977795079691592e-02\n2.08030978084118960e-02\n7.04320723228304413e-02\n9.10466579748084592e-02\n6.40452568804896483e-02\n-4.86686434237770717e-03\n-7.83469114777735759e-02\n-1.02862151973698579e-01\n-4.80085295045485430e-02\n5.45913336372840716e-02\n1.16369577840117353e-01\n6.45196089783200560e-02\n-6.52422130111568327e-02\n-1.29179339283206990e-01\n-2.91153033164596488e-02\n1.23213039986160455e-01\n1.00545269626055853e-01\n-9.33759797366819772e-02\n-1.38459018903724557e-01\n8.37847774559039998e-02\n1.52248394231293188e-01\n-1.22103038931685962e-01\n-1.23388883243755604e-01\n2.08154318707072739e-01\n-2.97560857136442702e-02\n-2.02209710545700860e-01\n3.00410862744312668e-01\n-2.57561590652406691e-01\n1.60962026776258954e-01\n-7.92931956389026915e-02\n3.19848335625742067e-02\n-1.07964998064585919e-02\n3.09063131804823655e-03\n-7.56561191269190044e-04\n1.59145245924251471e-04\n-2.88328640331493675e-05\n4.49953657160533428e-06\n1.18213227700500623e-02\n2.04751316503975697e-02\n2.63635671493203487e-02\n3.08638457529726851e-02\n3.40638849051504156e-02\n3.56165174145690738e-02\n3.49094589067538499e-02\n3.11801542820579689e-02\n2.36780822882441573e-02\n1.19134788092664368e-02\n-4.00098765751106394e-03\n-2.29548613157319024e-02\n-4.24983131675811462e-02\n-5.87437035098735891e-02\n-6.67629799176030769e-02\n-6.17165632550028820e-02\n-4.07698738393525231e-02\n-5.44855015858119150e-03\n3.65116832055086618e-02\n7.13124284838098088e-02\n8.27371027369216139e-02\n5.96423954529836514e-02\n5.05189253025553359e-03\n-5.86416553394175991e-02\n-9.53263104961991348e-02\n-7.48700693649211046e-02\n5.53353799776013563e-04\n8.37342506053381647e-02\n1.05502784524271101e-01\n3.30742023535037927e-02\n-7.98600905335668659e-02\n-1.18295642233346029e-01\n-2.20763014601643853e-02\n1.12166376763207662e-01\n1.06071661935806832e-01\n-5.85161201363061309e-02\n-1.46133899475265644e-01\n1.12803032574577446e-02\n1.64209463341218692e-01\n-1.18211299814077980e-04\n-1.82088477877569432e-01\n4.80721277294153121e-02\n1.80768950971507608e-01\n-1.73365536965056882e-01\n-4.78114838215132135e-02\n2.48761189734933996e-01\n-2.97594655338669800e-01\n2.29573479723971241e-01\n-1.33440786088250329e-01\n6.21169875312086034e-02\n-2.39008215146659098e-02\n7.74437852594203266e-03\n-2.13783614724711094e-03\n5.06428446032761896e-04\n-1.03377881131069932e-04\n1.82169930552376098e-05\n0.0\n5.89321191011833593e-04\n2.28243115835595175e-03\n5.38967686894732158e-03\n1.01157380927916520e-02\n1.65226548290109930e-02\n2.44503824837639418e-02\n3.34096805937141930e-02\n4.24701098298816207e-02\n5.01838424754065607e-02\n5.46082328748466045e-02\n5.35077454150296797e-02\n4.48129950924486126e-02\n2.73686516835765919e-02\n1.88995208858393736e-03\n-2.81369562456855946e-02\n-5.60957839151102963e-02\n-7.30533249230863602e-02\n-7.02604079971897444e-02\n-4.32662669753846041e-02\n3.56349411759924236e-03\n5.46970405370393112e-02\n8.64961064777127198e-02\n7.75396406558890028e-02\n2.36889535179798383e-02\n-5.08736111954636791e-02\n-9.89833470257590886e-02\n-7.87054600477849337e-02\n7.50322829654549890e-03\n9.61196598709544575e-02\n1.01762627486609594e-01\n2.07681777562495869e-03\n-1.10169072464722448e-01\n-9.92776582091741272e-02\n4.39718281192015698e-02\n1.39027676700614167e-01\n2.91343161380813905e-02\n-1.40701156353119888e-01\n-7.48388001257161289e-02\n1.43427095300713625e-01\n8.39585101509338905e-02\n-1.72119922747894005e-01\n-3.52587445179827139e-02\n2.10086244101726827e-01\n-1.16700795189078887e-01\n-1.21052025118271608e-01\n2.79199523490881674e-01\n-2.84129051022098345e-01\n1.99993054586997315e-01\n-1.08803197129718351e-01\n4.80351446580779759e-02\n-1.76731359779305555e-02\n5.50669879076533253e-03\n-1.46789588544293760e-03\n3.36869058492893908e-04\n-6.67918708300516150e-05\n1.14810961700935309e-02\n1.98858418931864428e-02\n2.56086495236555814e-02\n2.99983127414479647e-02\n3.31605849772227818e-02\n3.47880099096507592e-02\n3.43221027286066752e-02\n3.10567130874882073e-02\n2.42798987371609550e-02\n1.34910773292826001e-02\n-1.29772785272706565e-03\n-1.92055721778181254e-02\n-3.81570506499954928e-02\n-5.47438707294974555e-02\n-6.44899005403504755e-02\n-6.27374450252005944e-02\n-4.62477217411556701e-02\n-1.52978243024087853e-02\n2.44330115656460414e-02\n6.14065475776123318e-02\n8.05843394740660274e-02\n6.92977496862283993e-02\n2.54128975395596333e-02\n-3.62079735489534774e-02\n-8.49740452574279936e-02\n-8.80894106116137943e-02\n-3.36281054471504678e-02\n5.07776705660824765e-02\n1.04298157788510842e-01\n7.45522450842193568e-02\n-2.72039580394483824e-02\n-1.12015753216575364e-01\n-8.36377827152328668e-02\n4.59931116702141096e-02\n1.30166204975236954e-01\n4.39520995705943995e-02\n-1.16164025479980157e-01\n-1.06563599042272375e-01\n8.80100186704642629e-02\n1.38745178736630170e-01\n-8.37854799343343976e-02\n-1.48394354843094683e-01\n1.26527607706156564e-01\n1.12697791215285600e-01\n-2.09028239514398528e-01\n4.64606604543648452e-02\n1.84194140664400569e-01\n-2.94151257113763553e-01\n2.63018420378777096e-01\n-1.70700555700356360e-01\n8.73726946463355969e-02\n-3.66997879105021366e-02\n1.29394222525140504e-02\n-3.88326547353001501e-03\n1.00083882872002206e-03\n-2.22738612212920652e-04\n0.0\n5.56344302735077741e-04\n2.15471221925033363e-03\n5.08869541144130882e-03\n9.55453650645129646e-03\n1.56194520036418965e-02\n2.31511706700652312e-02\n3.17217637363424176e-02\n4.05050407314735683e-02\n4.82019047976954829e-02\n5.30473069287100280e-02\n5.29687287736399642e-02\n4.59667144764215399e-02\n3.07542703304704811e-02\n7.60413562292876471e-03\n-2.07977589579060457e-02\n-4.88845619833873021e-02\n-6.86683155502379045e-02\n-7.16313924586461093e-02\n-5.21471161954371737e-02\n-1.16488816673726795e-02\n3.84130746562542300e-02\n7.76330616316895372e-02\n8.39607161391183882e-02\n4.65010016076742583e-02\n-2.20976582333692884e-02\n-8.40153608718857137e-02\n-9.41423382853185525e-02\n-3.41193143299505300e-02\n6.01213689137603743e-02\n1.10232585060305921e-01\n5.86633843907713934e-02\n-5.95481830786546776e-02\n-1.22003817558685640e-01\n-4.12148363264418366e-02\n1.02078754202358665e-01\n1.13987705366361089e-01\n-4.82185198839268012e-02\n-1.46755163907388214e-01\n6.79812189650706635e-03\n1.62917355844332673e-01\n-2.35759490630307964e-03\n-1.79632429260592447e-01\n5.61397502604722015e-02\n1.71904296940619372e-01\n-1.79929337719745591e-01\n-2.88388009023903026e-02\n2.33627418874904319e-01\n-2.95450913999105946e-01\n2.37093047395228379e-01\n-1.43037964254931871e-01\n6.91828816003869501e-02\n-2.77243336029292728e-02\n9.38553171748719717e-03\n-2.71698155008027889e-03\n6.77834613397370212e-04\n1.11599087730748416e-02\n1.93295290027992762e-02\n2.48956676014861281e-02\n2.91793827130242475e-02\n3.23016407763341284e-02\n3.39901884056703907e-02\n3.37348344881433782e-02\n3.08810881266533069e-02\n2.47547666798672086e-02\n1.48522435516413517e-02\n1.10661683776360821e-03\n-1.57913750683203423e-02\n-3.40863760163162971e-02\n-5.07946169236493175e-02\n-6.18681768525145837e-02\n-6.28852136579174381e-02\n-5.03792446985335748e-02\n-2.36835653961014296e-02\n1.32319191290862000e-02\n5.09141103069720019e-02\n7.58053734433226101e-02\n7.47102857828094574e-02\n4.18437966525780775e-02\n-1.43290822852467064e-02\n-6.94119340623537279e-02\n-9.14267672853049940e-02\n-5.95127443535011791e-02\n1.57135032174972843e-02\n8.71928797131880928e-02\n9.66113819612386959e-02\n2.36269836330707667e-02\n-7.86990246607663507e-02\n-1.11511715965712271e-01\n-2.56217464910438696e-02\n9.89161735903897471e-02\n1.09639447676052701e-01\n-2.91114043189088720e-02\n-1.38396553478935036e-01\n-3.80299590710085275e-02\n1.37462026411637933e-01\n7.69074064843205535e-02\n-1.42394385843143984e-01\n-7.99925199332418568e-02\n1.72700754521863648e-01\n2.47686541554656067e-02\n-2.04999651858200710e-01\n1.28506538153257466e-01\n1.01619851031241826e-01\n-2.67791943146260814e-01\n2.85636819206977643e-01\n-2.08803459841221617e-01\n1.17864485443351985e-01\n-5.40692659381812046e-02\n2.07229901296557342e-02\n-6.74784954184198729e-03\n1.88680958008035932e-03\n0.0\n5.26060945457702432e-04\n2.03742528084780968e-03\n4.81223402522117441e-03\n9.03866631100092195e-03\n1.47877916347738982e-02\n2.19509101745471551e-02\n3.01530178219617112e-02\n3.86587985926867411e-02\n4.63003345587832127e-02\n5.14724011984270674e-02\n5.22561095558098376e-02\n4.67345043839919039e-02\n3.35392450367250350e-02\n1.25986050441153907e-02\n-1.40659597227322797e-02\n-4.18104574767315940e-02\n-6.35670194329899518e-02\n-7.12439491668680341e-02\n-5.85284030236658259e-02\n-2.46232372539011216e-02\n2.25439650765926446e-02\n6.59882487785754257e-02\n8.45033040163968435e-02\n6.30240348525324401e-02\n4.85366934932739309e-03\n-6.23670193970019271e-02\n-9.60140790383824244e-02\n-6.51406892787339264e-02\n1.89290946883629227e-02\n9.55639319113048696e-02\n9.34141118463101272e-02\n-2.04589219991477620e-04\n-1.02681584556691186e-01\n-9.81167540346678524e-02\n2.73472317127789050e-02\n1.28719432015052343e-01\n5.66019137895886967e-02\n-1.09193963327917018e-01\n-1.11221065738509456e-01\n8.35459744443308588e-02\n1.38491081009188027e-01\n-8.44884527342867897e-02\n-1.44170210718250508e-01\n1.30986725331793202e-01\n1.01705747028352514e-01\n-2.09034420882832417e-01\n6.23655889304017552e-02\n1.65968535566571346e-01\n-2.86841357559478316e-01\n2.67516567377152237e-01\n-1.80118469710679158e-01\n9.56390168580413813e-02\n-4.17461916646791470e-02\n1.53358383998800224e-02\n-4.81099734145989076e-03\n1.08563016769275805e-02\n1.88036660867337731e-02\n2.42214431564176033e-02\n2.84036925950032944e-02\n3.14843543355125752e-02\n3.32224615958189307e-02\n3.31512652579623243e-02\n3.06635900928467243e-02\n2.51217880834471649e-02\n1.60249810143820032e-02\n3.24475388076312125e-03\n-1.26858530061099966e-02\n-3.02850623402156592e-02\n-4.69438024331277487e-02\n-5.90136579550937096e-02\n-6.23391640102712447e-02\n-5.33564805857828922e-02\n-3.07007274889118317e-02\n3.05834952727246628e-03\n4.03361295373466239e-02\n6.91811431098993540e-02\n7.65674277045786111e-02\n5.42957666374808343e-02\n5.65304324109789248e-03\n-5.10769648019415781e-02\n-8.69031052667490894e-02\n-7.62921493579857141e-02\n-1.65356119070613934e-02\n6.06021345135108955e-02\n1.00327969467054218e-01\n6.30116527718066199e-02\n-3.29721512796019162e-02\n-1.07083539329653241e-01\n-7.91369136909785276e-02\n3.84725050339122798e-02\n1.21685073222721790e-01\n5.76281565179391705e-02\n-9.15604965836707418e-02\n-1.19911560159251307e-01\n3.90688003611117177e-02\n1.46817443692638855e-01\n-3.43536852789204242e-03\n-1.61641200085314823e-01\n5.28389360624350723e-03\n1.76987437327203623e-01\n-6.42717762261899028e-02\n-1.62563322398759175e-01\n1.85519758614322045e-01\n1.04139891181681613e-02\n-2.17948774692288127e-01\n2.92196003627097078e-01\n-2.43834596704648132e-01\n1.52503983413233346e-01\n-7.65116314747232018e-02\n3.18670147821050256e-02\n-1.12427611059831133e-02\n0.0\n4.98209092911340839e-04\n1.92955551977472663e-03\n4.55791662325831775e-03\n8.56379087023849579e-03\n1.40210354410892912e-02\n2.08410029097538911e-02\n2.86945067035839635e-02\n3.69256508972403766e-02\n4.44824046313631316e-02\n4.99032785259716574e-02\n5.14129889200584667e-02\n4.71842737818068542e-02\n3.58054552913354973e-02\n1.69392806688914502e-02\n-7.94179959923889921e-03\n-3.49976944553256689e-02\n-5.80293822589920266e-02\n-6.94871451760466496e-02\n-6.27366222136822721e-02\n-3.53371192859219044e-02\n7.73241368449266789e-03\n5.28161801150433055e-02\n8.04647421655291101e-02\n7.34715407268623777e-02\n2.80611882445851446e-02\n-3.78059668078587902e-02\n-8.73298113214325544e-02\n-8.38445834684143076e-02\n-1.95835909524130006e-02\n6.62388309903853972e-02\n1.04353126886273434e-01\n5.08197986168460042e-02\n-5.78578543573915055e-02\n-1.15318982590641189e-01\n-4.62841634347121791e-02\n8.61602947709099454e-02\n1.17023391167151547e-01\n-1.55326955258982269e-02\n-1.36842872050192327e-01\n-4.54539436693690846e-02\n1.34521362743154516e-01\n7.80788830921116811e-02\n-1.41788181982964001e-01\n-7.54975179105998179e-02\n1.73198337436907324e-01\n1.41537775902047490e-02\n-1.99239916077285639e-01\n1.39347268921927503e-01\n8.24187391817342713e-02\n-2.55588037689773173e-01\n2.86084746284066216e-01\n-2.17052163851313124e-01\n1.26959171924957814e-01\n-6.04122900303139601e-02\n2.40683026475319549e-02\n1.05711353063880509e-02\n1.83097434443492968e-02\n2.35879612506776533e-02\n2.76738802944017231e-02\n3.07125277285865451e-02\n3.24907682802295233e-02\n3.25809248945686247e-02\n3.04190600063919334e-02\n2.54024569785660861e-02\n1.70371543448493458e-02\n5.14716029163456070e-03\n-9.86518356943740481e-03\n-2.67517761688009781e-02\n-4.32330336206883450e-02\n-5.60284921760706850e-02\n-6.12622787044354092e-02\n-5.53671712158144355e-02\n-3.64754796668399772e-02\n-6.02545771171562015e-03\n3.00359040768449978e-02\n6.13689967266222852e-02\n7.55762345008190867e-02\n6.30179814601223576e-02\n2.29657093598001454e-02\n-3.18867648308843038e-02\n-7.66962453415002687e-02\n-8.44790701710155245e-02\n-4.30412658864687825e-02\n3.02287366641973664e-02\n8.95696025433393161e-02\n8.68815719578749784e-02\n1.28488542062122069e-02\n-7.95322235042823789e-02\n-1.04767439532699708e-01\n-2.47779875076825015e-02\n9.00021487774278761e-02\n1.08443073023798048e-01\n-9.85373139663342675e-03\n-1.25563869127045008e-01\n-6.72978478022118187e-02\n1.02547467769702666e-01\n1.14803639373029565e-01\n-7.99452723406149923e-02\n-1.37832702356287112e-01\n8.58017711456725840e-02\n1.39640244806176539e-01\n-1.35420217474184534e-01\n-9.05048014079458674e-02\n2.08231698154835360e-01\n-7.74228971124507476e-02\n-1.47699139112860478e-01\n2.78661833592078190e-01\n-2.71155779752802861e-01\n1.89238325829919618e-01\n-1.04090811600670491e-01\n4.71306332984180801e-02\n0.0\n4.72901521024359905e-04\n1.83153971532350256e-03\n4.32679263515691349e-03\n8.13198909700767886e-03\n1.33229747388161155e-02\n1.98281511501321103e-02\n2.73579055973902502e-02\n3.53255137919153556e-02\n4.27808254307187955e-02\n4.83906411853678026e-02\n5.05119323551420085e-02\n4.74091881954209760e-02\n3.76547842653528406e-02\n2.07088111462491106e-02\n-2.40719297705662598e-03\n-2.85461901582413531e-02\n-5.23087737331718455e-02\n-6.67424274154967273e-02\n-6.51512233907230731e-02\n-4.39262148615968476e-02\n-5.64197875388544687e-03\n3.91132009636786238e-02\n7.31323242465674456e-02\n7.85596162039172846e-02\n4.66100753598699263e-02\n-1.32119886715099145e-02\n-7.14786293715014981e-02\n-9.08893115175647970e-02\n-5.06431735291024698e-02\n3.05919124144728855e-02\n9.52630259695162185e-02\n8.44720286395494596e-02\n-5.24273742187185855e-03\n-9.80085348755853625e-02\n-9.45472364784907399e-02\n1.77940411250773374e-02\n1.18423496530929290e-01\n7.15388014882918505e-02\n-8.11138099465516793e-02\n-1.24379417714925097e-01\n3.10222479848815125e-02\n1.46659647846717978e-01\n-9.93550528783042688e-04\n-1.60563731643793284e-01\n8.71619020290643857e-03\n1.74342975143350398e-01\n-7.23663498908150155e-02\n-1.53062752133929142e-01\n1.90316219740833958e-01\n-7.22465597813048629e-03\n-2.02301429047117065e-01\n2.88436462861146548e-01\n-2.50221266921706709e-01\n1.62064725503059281e-01\n-8.42111678672814168e-02\n1.03269450850708190e-02\n1.78867935743163599e-02\n2.30455725240908682e-02\n2.70493317072573632e-02\n3.00529559716218517e-02\n3.18677258046953307e-02\n3.21003101845210095e-02\n3.02251339830810345e-02\n2.56713896752892093e-02\n1.79539121024504811e-02\n6.85974492964620125e-03\n-7.31659589823417059e-03\n-2.35245698141729812e-02\n-3.97696785859022531e-02\n-5.31012781398154388e-02\n-5.99169973414486676e-02\n-5.67048363370477732e-02\n-4.12424741717947324e-02\n-1.40651040085593010e-02\n2.02837902252751487e-02\n5.29905051790394224e-02\n7.25431860164678782e-02\n6.85777332655143623e-02\n3.73699176613168788e-02\n-1.32275495102198316e-02\n-6.29289546157450475e-02\n-8.54974799655444512e-02\n-6.26595970956167481e-02\n3.77743874101087889e-04\n6.92529590069645429e-02\n9.54402227379493595e-02\n5.07583354405980874e-02\n-4.01459260743913388e-02\n-1.03533403233574239e-01\n-7.31472088637180606e-02\n3.56073977667324890e-02\n1.14630644512179192e-01\n6.41632760708907013e-02\n-7.28314763344263816e-02\n-1.22399088322907731e-01\n3.11652044323507170e-03\n1.35094843341584947e-01\n5.19909018892200023e-02\n-1.32250326482222874e-01\n-7.90281941675192862e-02\n1.41883949821872829e-01\n7.11733064094005746e-02\n-1.74116142692611858e-01\n-4.02998539832119442e-03\n1.93896522184032388e-01\n-1.49410793620263632e-01\n-6.47284607150099417e-02\n2.44728170017782354e-01\n-2.87517812793186389e-01\n2.26161541449306058e-01\n-1.36878944254097246e-01\n0.0\n4.52253567495291815e-04\n1.75157053517215706e-03\n4.13823496075021047e-03\n7.77978470089855240e-03\n1.27538581136788370e-02\n1.90031531197465686e-02\n2.62711051471877441e-02\n3.40287965528021236e-02\n4.14115224430034040e-02\n4.71944845228659399e-02\n4.98481932074737247e-02\n4.77197830679725737e-02\n3.93779033752077595e-02\n2.41253621444100300e-02\n2.61634003417584530e-03\n-2.25855493686112109e-02\n-4.67842704027748926e-02\n-6.36103166169385559e-02\n-6.64533172953011980e-02\n-5.08854537248366670e-02\n-1.75576542660929071e-02\n2.56402185436037516e-02\n6.38721562242311192e-02\n7.95869437148196968e-02\n6.06614354435831352e-02\n9.63743741851108386e-03\n-5.16859654332849638e-02\n-8.86054454768466504e-02\n-7.25922277298747393e-02\n-5.00697783059461232e-03\n7.25976051723676435e-02\n9.90043883001581887e-02\n4.21256309717391517e-02\n-5.91115230867141211e-02\n-1.10277043016127396e-01\n-4.75428436651739034e-02\n7.55533143873565044e-02\n1.16273762681522397e-01\n6.80704964810293755e-03\n-1.22040416753335851e-01\n-7.74984387864390695e-02\n9.66235611618542906e-02\n1.19074096526787826e-01\n-7.69900669656026493e-02\n-1.38686828190482891e-01\n8.74096697771606229e-02\n1.37133022715744790e-01\n-1.40209508863725962e-01\n-8.18773304626080889e-02\n2.09224304001931788e-01\n-9.04221994108193178e-02\n-1.34659601129568957e-01\n2.76450871733418535e-01\n-2.79799230511682873e-01\n2.01904878680901873e-01\n1.02192918648974698e-02\n1.77003327273777232e-02\n2.28076430324182684e-02\n2.67810164454257982e-02\n2.97859960509519774e-02\n3.16539836869317651e-02\n3.20186739268501358e-02\n3.03840812817748780e-02\n2.62033997420226400e-02\n1.89967305359628330e-02\n8.51964850840576139e-03\n-5.02168370427626739e-03\n-2.07375334139318530e-02\n-3.68659858303348950e-02\n-5.07281983930898822e-02\n-5.89535043684688079e-02\n-5.80912985875059948e-02\n-4.56506844951827667e-02\n-2.14410134032209793e-02\n1.11671213040547383e-02\n4.47102997959969370e-02\n6.86083525283011225e-02\n7.21883513236399876e-02\n4.94989617161149531e-02\n4.33654366956798612e-03\n-4.74392994238524296e-02\n-8.15428958685468774e-02\n-7.61580344260509440e-02\n-2.67811906824933291e-02\n4.38643322245485176e-02\n9.17869357291080240e-02\n7.78302101746608105e-02\n1.97753449243479214e-03\n-8.23837813557588838e-02\n-9.99981902957428059e-02\n-2.23058038837884096e-02\n8.54452652694598913e-02\n1.07466977097259248e-01\n3.12637225676752010e-03\n-1.14389353100313423e-01\n-8.58628679405207818e-02\n7.07172099295662604e-02\n1.30712045994849591e-01\n-2.21729657036872640e-02\n-1.49326502313737841e-01\n-3.59669828096859188e-03\n1.62963687566424847e-01\n-9.04153144009399098e-03\n-1.76593618380647438e-01\n7.77452411740245930e-02\n1.51536713966958447e-01\n-1.97488713619339035e-01\n1.59037578840773054e-02\n2.03391739439192698e-01\n-3.02173179779022805e-01\n2.70208991405387011e-01\n0.0\n4.40887502139700529e-04\n1.70754995333804701e-03\n4.03456732605828559e-03\n7.58691964539221810e-03\n1.24450433260243631e-02\n1.85634818177711804e-02\n2.57111742172750658e-02\n3.34027134316773958e-02\n4.08368031407393625e-02\n4.68679950717273974e-02\n5.00480094274518769e-02\n4.87788964688874657e-02\n4.16146261484212632e-02\n2.77210126904889956e-02\n7.44779210568827753e-03\n-1.71200245681163606e-02\n-4.18664285605046954e-02\n-6.09153334508792943e-02\n-6.77593256709811964e-02\n-5.73381762249913704e-02\n-2.87282219974018642e-02\n1.25036846514264104e-02\n5.37691037673545952e-02\n7.82631098189425362e-02\n7.16187219031319683e-02\n3.07052349224327878e-02\n-2.99102063806819841e-02\n-7.98084578402716710e-02\n-8.65453729318888809e-02\n-3.77582392328865632e-02\n4.19540399829334693e-02\n9.72259302598653674e-02\n7.84660508395329109e-02\n-1.04874068462976582e-02\n-9.74608736498786543e-02\n-9.40553021219121682e-02\n1.10105143961951521e-02\n1.12550758750220498e-01\n8.40171846925756999e-02\n-5.79150464606181803e-02\n-1.30627545920677907e-01\n-1.29457328564119636e-02\n1.36054588019536682e-01\n6.47985902599989422e-02\n-1.31751473610787817e-01\n-8.87580858632330688e-02\n1.43664195101854270e-01\n7.83572293746554460e-02\n-1.80056213564050382e-01\n-7.33095343318944381e-03\n2.04407385657892959e-01\n-1.54608244909617026e-01\n-7.77221342741407500e-02\n2.77324309539302871e-01\n-3.29187326736631758e-01\n1.03446486477646697e-02\n1.79174570443770935e-02\n2.30896964278635916e-02\n2.71230153454875243e-02\n3.01971096498172970e-02\n3.21592831163260012e-02\n3.26615598958007805e-02\n3.12262206834685828e-02\n2.73188450439399919e-02\n2.04563576447911871e-02\n1.03623098695546766e-02\n-2.83272895997656923e-03\n-1.83691101699952550e-02\n-3.46675498226127476e-02\n-4.92573733955706597e-02\n-5.89377268083145014e-02\n-6.02848789974564994e-02\n-5.05624011012005617e-02\n-2.89549078423557774e-02\n2.17175537426589913e-03\n3.65324729143892413e-02\n6.44191344512877739e-02\n7.50290905090814086e-02\n6.06404358285084558e-02\n2.15554133427107303e-02\n-3.05581214614592776e-02\n-7.39925663886357304e-02\n-8.50556580221328296e-02\n-5.14889004415916354e-02\n1.51955631736252327e-02\n7.85067221408493887e-02\n9.43320491969491803e-02\n4.26237530159616906e-02\n-4.72216442642078710e-02\n-1.05105284492668011e-01\n-7.27456286110562400e-02\n3.31722880050717775e-02\n1.13765308487457167e-01\n7.45812722991518323e-02\n-5.68875497821783038e-02\n-1.27378923581275311e-01\n-3.08098561551337427e-02\n1.19009834118334989e-01\n9.78143619223489080e-02\n-8.69346829665360310e-02\n-1.35394770395896119e-01\n6.60950208476707712e-02\n1.54406355811467583e-01\n-7.86631261854605912e-02\n-1.56267421408060853e-01\n1.38279798539446275e-01\n1.07265391278009284e-01\n-2.26776245184171499e-01\n6.77086598177369103e-02\n2.02625410916210780e-01\n-3.67673123954750991e-01\n0.0\n4.38123267276238041e-04\n1.69684411774685098e-03\n4.00960366932034528e-03\n7.54198621004434529e-03\n1.23786343313550939e-02\n1.84847087154305124e-02\n2.56495666653967121e-02\n3.34210746185501367e-02\n4.10450478675526143e-02\n4.74332101330976266e-02\n5.11925785397195077e-02\n5.07553918798969994e-02\n4.46453132094489502e-02\n3.18944099567581643e-02\n1.25784623863085809e-02\n-1.16370761766178676e-02\n-3.71411597830579171e-02\n-5.84907279782267836e-02\n-6.92800611113069953e-02\n-6.39129841277343846e-02\n-4.00820525682187498e-02\n-1.23113914371434296e-03\n4.22665573538778122e-02\n7.46898945963550415e-02\n8.01924295673962229e-02\n5.08536873963120889e-02\n-5.74996332165519063e-03\n-6.47737344375969720e-02\n-9.28406808363442526e-02\n-6.69764186147043250e-02\n5.22162167445815693e-03\n8.02062236045339855e-02\n1.00844035011553715e-01\n4.09200618627582613e-02\n-6.00984236286337056e-02\n-1.13468335954687222e-01\n-5.74065676640947778e-02\n6.52293893314359330e-02\n1.23551988405055366e-01\n3.53433615041671284e-02\n-1.06871774534541442e-01\n-1.12332481808036733e-01\n4.90538101763671602e-02\n1.47170200672517820e-01\n5.32961784450422613e-03\n-1.59517729471307546e-01\n-3.40317067517638475e-02\n1.73770372157484976e-01\n2.46271747718104055e-02\n-1.98650717350701139e-01\n4.35618776035494731e-02\n2.04189478545973802e-01\n-1.89837176682209896e-01\n-9.05517583478844534e-02\n3.80160773947269381e-01\n1.06209813704947892e-02\n1.83960793599395010e-02\n2.37088577662273869e-02\n2.78615925680454520e-02\n3.10514176616587673e-02\n3.31403330820762634e-02\n3.37950477516414868e-02\n3.25510245892487310e-02\n2.88807903309037661e-02\n2.22938142187114920e-02\n1.24804936243198654e-02\n-4.99996038380927832e-04\n-1.60069108732515085e-02\n-3.26255280627804969e-02\n-4.80716806392186904e-02\n-5.92966335172838491e-02\n-6.29009730585416704e-02\n-5.59261512880818989e-02\n-3.69836405676133989e-02\n-7.49663144491120349e-03\n2.74013649086628473e-02\n5.89509892142693545e-02\n7.64560699792065368e-02\n7.07980519109691758e-02\n3.91226667056545144e-02\n-1.11351872397679446e-02\n-6.16396115283165402e-02\n-8.84300650047422643e-02\n-7.32375644558790895e-02\n-1.67124925563889790e-02\n5.48415518332988558e-02\n9.80599511496818427e-02\n7.81321918400238041e-02\n-9.49251721453772397e-04\n-8.62095612729783800e-02\n-1.05995862796422355e-01\n-3.15084006982373557e-02\n7.99415183058586748e-02\n1.18218209262335491e-01\n2.90344524157656221e-02\n-1.02174010998177495e-01\n-1.16205398188622966e-01\n2.44930513943978564e-02\n1.42758459870189924e-01\n5.43870715017044995e-02\n-1.30375518295305720e-01\n-1.07824914608260575e-01\n1.14941709040848800e-01\n1.36122334849895166e-01\n-1.23416655809810316e-01\n-1.40317157124675990e-01\n1.71404806058141068e-01\n9.89948766807812186e-02\n-2.53636021533964029e-01\n3.69347372836519722e-02\n3.67644899194078445e-01\n0.0\n4.37558315465875320e-04\n1.69465606879390645e-03\n4.00477293849315144e-03\n7.53495628044604463e-03\n1.23745609214471076e-02\n1.84993801700915651e-02\n2.57185311522624173e-02\n3.36116745330237790e-02\n4.14694591546004507e-02\n4.82580802213141979e-02\n5.26376458790759269e-02\n5.30703876799483096e-02\n4.80532883307031242e-02\n3.64932702897514741e-02\n1.82044149630589333e-02\n-5.55771931926910771e-03\n-3.16931406109553157e-02\n-5.52328188181532356e-02\n-6.99665166683040296e-02\n-6.99087782835890598e-02\n-5.15262823078466367e-02\n-1.62060151870605275e-02\n2.80746542032780447e-02\n6.72416713001239286e-02\n8.48870847466713513e-02\n6.92096427502857520e-02\n2.09459831008325867e-02\n-4.20853661318165359e-02\n-8.88233621218905561e-02\n-8.93473651605183050e-02\n-3.51807496189893709e-02\n4.69958123589532817e-02\n1.03110676204271431e-01\n8.57434424051635724e-02\n-2.97566903157714001e-03\n-9.67531651120542568e-02\n-1.08385408204668549e-01\n-1.30539241458669450e-02\n1.04383176439349301e-01\n1.13643464308013073e-01\n-1.36214421587928809e-02\n-1.34605570797159735e-01\n-8.20314468128414409e-02\n9.49165600022815470e-02\n1.41316564718974497e-01\n-4.06489524947073882e-02\n-1.69691316364909778e-01\n3.33650619681171660e-03\n1.89167610241332662e-01\n6.44258234399321984e-04\n-2.15002114833026003e-01\n4.42807807818868387e-02\n2.44380622282448778e-01\n-1.56713618061962073e-01\n-3.35563600989763955e-01\n1.09345512447256675e-02\n1.89391983138303618e-02\n2.44113416695740590e-02\n2.86990317631607844e-02\n3.20186004186140960e-02\n3.42478916746837628e-02\n3.50693602177491112e-02\n3.40328206913470960e-02\n3.06191254457357787e-02\n2.43318964438561762e-02\n1.48300630031623394e-02\n2.10263245261994294e-03\n-1.33290590631266470e-02\n-3.02194906447856640e-02\n-4.64835655774796450e-02\n-5.92498619797438703e-02\n-6.51848288969800738e-02\n-6.11642491800105104e-02\n-4.52846864932455115e-02\n-1.80549927552882093e-02\n1.65967202752254211e-02\n5.10562112611505428e-02\n7.51053932825025694e-02\n7.87198070543751460e-02\n5.62900840526832924e-02\n1.09610362259367541e-02\n-4.32180458233570527e-02\n-8.38973728560764159e-02\n-8.90256007453520543e-02\n-4.94281363005069224e-02\n2.08593536924749634e-02\n8.51330955902858955e-02\n1.01031189073885710e-01\n4.94120505490729181e-02\n-4.28350598124909374e-02\n-1.09478783141641542e-01\n-9.00768519823434421e-02\n1.16828047776833029e-02\n1.11002194038032548e-01\n1.05640944702351067e-01\n-1.50254460988001846e-02\n-1.28842453148627301e-01\n-9.40256215147616675e-02\n6.70782261204287272e-02\n1.49605700732084346e-01\n1.87407898935373594e-02\n-1.54288347301611728e-01\n-8.80243681270291428e-02\n1.40738375789097037e-01\n1.32441631021942452e-01\n-1.39316403202447092e-01\n-1.57418881263342997e-01\n1.70465069288667809e-01\n1.69582707271420746e-01\n-2.50877660888750520e-01\n-2.91064662331233459e-01\n0.0\n4.36100870871311943e-04\n1.68901141015114246e-03\n3.99178133752325134e-03\n7.51261842333323087e-03\n1.23455188677092202e-02\n1.84772154740422169e-02\n2.57375006911417063e-02\n3.37396916899727270e-02\n4.18225571979109340e-02\n4.90121126361574705e-02\n5.40297274425471166e-02\n5.53792903176010889e-02\n5.15463107264774525e-02\n4.13296938853348617e-02\n2.42959634391875061e-02\n1.29189839847444277e-03\n-2.51216066339757550e-02\n-5.05268631969612511e-02\n-6.90515303774557193e-02\n-7.45231745148833558e-02\n-6.23948742520634841e-02\n-3.21043958640882324e-02\n1.09362238724451354e-02\n5.49127243219359740e-02\n8.39297769776936320e-02\n8.35254841756290917e-02\n4.82084152808229180e-02\n-1.22315654029855250e-02\n-7.22620171581966481e-02\n-9.96146333356647817e-02\n-7.28216154146402450e-02\n8.07649124998557856e-04\n8.03271799544585524e-02\n1.10269246210993835e-01\n5.98236608696560007e-02\n-4.30625659655945112e-02\n-1.17748071586309247e-01\n-9.09062629732561300e-02\n2.70384766469963338e-02\n1.27057821175502572e-01\n9.52166594399000560e-02\n-5.14417699752086482e-02\n-1.47043478048561604e-01\n-5.64685149074435552e-02\n1.22112238327060557e-01\n1.36247439769516671e-01\n-6.31918200690699400e-02\n-1.78831095476103180e-01\n7.53586459174222442e-03\n2.03874188373509263e-01\n2.90590481356055308e-02\n-2.36130803692823132e-01\n-5.29144072782025618e-02\n3.09643802350842490e-01\n2.41050147940055914e-01\n1.12613711813909778e-02\n1.95052670490611230e-02\n2.51436213735961450e-02\n2.95725198120428412e-02\n3.30289082295476266e-02\n3.54080923688330981e-02\n3.64103138357737416e-02\n3.56022714784843750e-02\n3.24761379391302341e-02\n2.65329724005888973e-02\n1.74033675564089843e-02\n5.00819562072340064e-03\n-1.02514734721020438e-02\n-2.73061002570205574e-02\n-4.42868217980258855e-02\n-5.85324791887898432e-02\n-6.68284996324222530e-02\n-6.59573663944154759e-02\n-5.35793413078674077e-02\n-2.93408759776695033e-02\n4.06669748987620056e-03\n4.03603379235469711e-02\n7.01942882539566965e-02\n8.32149175437972705e-02\n7.16373194410125508e-02\n3.45261406860439060e-02\n-1.89995373790811349e-02\n-7.00124260439671381e-02\n-9.53459970105814680e-02\n-7.81921535536300727e-02\n-1.98593527381712744e-02\n5.44917731020342910e-02\n1.03416405548271889e-01\n9.15323092288633233e-02\n1.69370695348881294e-02\n-7.62543190861995485e-02\n-1.18642809447280700e-01\n-6.70891073798454279e-02\n4.76681490928061655e-02\n1.27763145577068138e-01\n8.79031639468055431e-02\n-4.82042914776584647e-02\n-1.42345709827984584e-01\n-7.57668228439912911e-02\n9.24300930998262771e-02\n1.53353602810345574e-01\n3.90716627178666620e-03\n-1.66894801748984051e-01\n-9.40099583279137424e-02\n1.43330810004248077e-01\n1.62407102430604300e-01\n-1.11726933232394798e-01\n-2.23330916356051734e-01\n7.54032824410915264e-02\n3.31425367346411148e-01\n1.91170338280147095e-01\n0.0\n4.33530132330730688e-04\n1.67905498259601771e-03\n3.96860483767542786e-03\n7.47114545124682051e-03\n1.22851540344579915e-02\n1.84085252042472045e-02\n2.56925635603714626e-02\n3.37860468791527438e-02\n4.20791559539003754e-02\n4.96632422703131363e-02\n5.53296205645854924e-02\n5.76366736378312039e-02\n5.50759418752270746e-02\n4.63594588515889305e-02\n3.08266550851744592e-02\n8.92547723884233070e-03\n-1.73398939820300947e-02\n-4.41715879893863073e-02\n-6.61771852342866590e-02\n-7.72189687409022968e-02\n-7.20021153321673824e-02\n-4.82207421132297975e-02\n-8.68676135509595208e-03\n3.75330314349823224e-02\n7.61162041985238846e-02\n9.14010398428925924e-02\n7.28837354794311665e-02\n2.22093475348811784e-02\n-4.31108165149647338e-02\n-9.33393833119230409e-02\n-9.91912220681937656e-02\n-4.98306939602274832e-02\n3.38148290157180009e-02\n1.02820319195408058e-01\n1.06798225178835068e-01\n3.24700452795831443e-02\n-7.36661930693665729e-02\n-1.27211310686636936e-01\n-7.21233092169123041e-02\n5.59252405879203246e-02\n1.38984454690544851e-01\n8.14073034183352001e-02\n-7.32025507622859894e-02\n-1.54776796706845132e-01\n-4.89101407016371351e-02\n1.32642416638677402e-01\n1.47124352514986373e-01\n-5.39014491085672912e-02\n-1.95841225243401890e-01\n-3.99407542507023705e-02\n2.07216349723592097e-01\n1.41453506654560357e-01\n-1.87862917441779409e-01\n-3.21112445998191554e-01\n-1.45447933188358414e-01\n1.16092323684092412e-02\n2.01077802989579751e-02\n2.59231059658754301e-02\n3.05025960831757613e-02\n3.41054637095697458e-02\n3.66461384240004684e-02\n3.78446593408367088e-02\n3.72871075863771967e-02\n3.44800210048147732e-02\n2.89254443814058980e-02\n2.02294183109770556e-02\n8.24795942987096090e-03\n-6.73697321157914076e-03\n-2.38358020420337303e-02\n-4.14098313787401098e-02\n-5.70384980334370725e-02\n-6.76794258197709053e-02\n-7.01004226709517064e-02\n-6.16209873216793241e-02\n-4.11089573898990798e-02\n-1.00348663550882677e-02\n2.67814980184701082e-02\n6.12257137659270381e-02\n8.32214435775567307e-02\n8.35413761016523121e-02\n5.76966391627357494e-02\n9.66973640432046942e-03\n-4.64875252733024796e-02\n-8.92588005476246532e-02\n-9.73728786268131113e-02\n-6.09043184662777168e-02\n9.25159355147065106e-03\n8.05388190335266513e-02\n1.11597571165184303e-01\n7.65656525907738722e-02\n-1.18324154042748087e-02\n-9.94033915695751030e-02\n-1.20003497529835246e-01\n-4.67924140081738132e-02\n7.22651896542701871e-02\n1.36634997843239958e-01\n7.64412332103358988e-02\n-6.62077322730951212e-02\n-1.51116803446065040e-01\n-7.35936219278817555e-02\n9.88752296087389293e-02\n1.64912317409527498e-01\n2.10889424171705545e-02\n-1.68060080248216615e-01\n-1.38710377560625903e-01\n1.01911118812454002e-01\n2.23660711697178105e-01\n1.91805900835459037e-02\n-2.66005648739104428e-01\n-2.87486546323892256e-01\n-1.06269321812897111e-01\n0.0\n4.29942839825781127e-04\n1.66516145846637323e-03\n3.93612589371534864e-03\n7.41217975771957943e-03\n1.21960986811776792e-02\n1.82970643804463290e-02\n2.55885216156427793e-02\n3.37561600570832968e-02\n4.22443626866998989e-02\n5.02147403441272275e-02\n5.65367311425041263e-02\n5.98359940892849301e-02\n5.86286213596301300e-02\n5.15639152858379593e-02\n3.77807562039627481e-02\n1.73483329851971402e-02\n-8.28927548962414031e-03\n-3.60064008476618236e-02\n-6.10210666708146526e-02\n-7.74575404462314876e-02\n-7.95799290094228728e-02\n-6.36403956162631818e-02\n-2.99736026049085141e-02\n1.53998674548301226e-02\n6.06647501536234923e-02\n9.05229313043655337e-02\n9.11915122470152856e-02\n5.70482409398507043e-02\n-3.72988412130971546e-03\n-6.82610054233127317e-02\n-1.05847078227971375e-01\n-9.24477291709255439e-02\n-2.71615239931385088e-02\n5.96161186957862368e-02\n1.16378339246263895e-01\n1.00187065347963830e-01\n1.13822597514977274e-02\n-9.35383835595098301e-02\n-1.32300558429544107e-01\n-6.17880933840784657e-02\n7.05463773363598085e-02\n1.47378889320723877e-01\n8.28963480646861539e-02\n-7.55114758595899077e-02\n-1.64974749382096830e-01\n-7.02350410279322102e-02\n1.20746094191683973e-01\n1.79090395877043201e-01\n6.87323852233841671e-03\n-1.98739716541137673e-01\n-1.60436377717917911e-01\n1.08321354912751244e-01\n3.02765651221969800e-01\n2.40558845206568617e-01\n7.45987198252315853e-02\n1.19868099462451753e-02\n2.07617638475686046e-02\n2.67691885622391643e-02\n3.15121827400036067e-02\n3.52741910110004608e-02\n3.79905490788941189e-02\n3.94031618269418057e-02\n3.91200555694669397e-02\n3.66653287845778234e-02\n3.15459077679760766e-02\n2.33477631286425798e-02\n1.18665686998040715e-02\n-2.73172702489772688e-03\n-1.97387646199783870e-02\n-3.77566756772098958e-02\n-5.46328380348978376e-02\n-6.75494519471208504e-02\n-7.33429040726253090e-02\n-6.91024602795131671e-02\n-5.30321049200510250e-02\n-2.54480663436339009e-02\n1.03593390300727051e-02\n4.78053494021355024e-02\n7.76867487030781234e-02\n9.01751399940703691e-02\n7.80516006594733358e-02\n4.04536629564454381e-02\n-1.43309959363955557e-02\n-6.89291144943067341e-02\n-1.01336342249181185e-01\n-9.37106263449439397e-02\n-4.27989604821857189e-02\n3.33727576960443223e-02\n9.86276746092110135e-02\n1.14406870462595248e-01\n6.34517959527909209e-02\n-3.19940638815192288e-02\n-1.13900281124894129e-01\n-1.21190826474482302e-01\n-3.71167967304279131e-02\n8.39962761745062236e-02\n1.44273291599426895e-01\n8.05003203615831109e-02\n-6.51294400108942545e-02\n-1.59652489850286128e-01\n-9.68941699106370957e-02\n7.79339737655851406e-02\n1.82930225434094818e-01\n8.41568408908192345e-02\n-1.29472133970217645e-01\n-2.12531857346676234e-01\n-4.42302683095397650e-02\n2.11350732876462666e-01\n3.01209740625624445e-01\n1.89428734012113659e-01\n5.03177918544483321e-02\n0.0\n4.25297007912600470e-04\n1.64716822883734563e-03\n3.89395721606329136e-03\n7.33497439651392951e-03\n1.20770598767133298e-02\n1.81407164175790107e-02\n2.54220040309093287e-02\n3.36447456426053337e-02\n4.23100170528302733e-02\n5.06543020487064191e-02\n5.76331767312709409e-02\n6.19526574380543787e-02\n6.21732207741789514e-02\n5.69087474458212159e-02\n4.51302593994521647e-02\n2.65585690202846496e-02\n2.08933301451429869e-03\n-2.58578001608686693e-02\n-5.32249568527390429e-02\n-7.46221530493199614e-02\n-8.42087265985110717e-02\n-7.71840418128867112e-02\n-5.16930896684633309e-02\n-1.06433173919636640e-02\n3.73657323509715977e-02\n7.89066908385389759e-02\n9.90000885997630309e-02\n8.65854234518507182e-02\n4.06715454484998865e-02\n-2.56578968319886129e-02\n-8.66734745618753105e-02\n-1.12819865289088966e-01\n-8.53521733145688188e-02\n-1.04675079101814589e-02\n7.65979703677392154e-02\n1.25049406315119821e-01\n9.79414643932691037e-02\n2.40785953372981516e-03\n-1.02939928369148934e-01\n-1.39469760930929054e-01\n-6.78719288990486669e-02\n6.71274710566166083e-02\n1.55065596563123909e-01\n1.07527712855129798e-01\n-4.88577578761132045e-02\n-1.71863370542960692e-01\n-1.28094798867715604e-01\n5.91851445945076327e-02\n2.05000544060639972e-01\n1.43379875524203781e-01\n-8.59125467742259952e-02\n-2.72890225655341601e-01\n-2.71032415655815262e-01\n-1.40978448568346654e-01\n-3.26054921526745881e-02\n1.24026943733932075e-02\n2.14820968054656759e-02\n2.77010834281918097e-02\n3.26240400429273700e-02\n3.65609714209405579e-02\n3.94701058929191675e-02\n4.11174551252737400e-02\n4.11357611816913840e-02\n3.90701910742207656e-02\n3.44369623398566443e-02\n2.68073066428813206e-02\n1.59224199895876620e-02\n1.83737019779412316e-03\n-1.49191488430801145e-02\n-3.31973026427542367e-02\n-5.11363255558105190e-02\n-6.61936263116259388e-02\n-7.53605733875362949e-02\n-7.56199715642864589e-02\n-6.46569002162312723e-02\n-4.17532875153033278e-02\n-8.68122424969546870e-03\n2.97153765612677770e-02\n6.56459707191625885e-02\n8.95705108172923231e-02\n9.26109904921388893e-02\n6.98672135701532138e-02\n2.37070632096119359e-02\n-3.44674305565484188e-02\n-8.56248744454787131e-02\n-1.08643045071468186e-01\n-8.92311869667399976e-02\n-2.90951529247226656e-02\n4.97438673798011946e-02\n1.10383453434912682e-01\n1.17437703820869571e-01\n5.87462869677240693e-02\n-4.00594957152387507e-02\n-1.21719897484318648e-01\n-1.28566602963193222e-01\n-4.49026197732542084e-02\n7.95376612771458297e-02\n1.52613804290356814e-01\n1.06824197401939339e-01\n-3.51074751637095034e-02\n-1.59461242104537992e-01\n-1.48425930386942989e-01\n6.03067521491916850e-03\n1.72719692066091474e-01\n1.89632190298943293e-01\n2.22454719350196166e-02\n-1.94500140959881468e-01\n-2.89982297047854998e-01\n-2.24442090491944191e-01\n-9.94276336264425936e-02\n-2.02879328494441208e-02\n0.0\n4.19461618229184739e-04\n1.62456786177484608e-03\n3.84089607382065087e-03\n7.23724476178523590e-03\n1.19242069854640503e-02\n1.79335361018697695e-02\n2.51842340332386755e-02\n3.34392749927392222e-02\n4.22586700244701255e-02\n5.09581535380263240e-02\n5.85873778968214881e-02\n6.39461830416898636e-02\n6.56606516878965041e-02\n6.23398199637270056e-02\n5.28259404628973472e-02\n3.65328630677055066e-02\n1.38364201605760875e-02\n-1.35609864601840026e-02\n-4.24148449145607467e-02\n-6.80290767529691254e-02\n-8.48080257321400799e-02\n-8.73599528519939661e-02\n-7.20912634703244765e-02\n-3.89963315232733365e-02\n6.92294808249857736e-03\n5.53737775172279123e-02\n9.23618124932252399e-02\n1.03970965326901102e-01\n8.17811813027764373e-02\n2.82152140217826579e-02\n-4.08560089593840922e-02\n-9.89469050733634975e-02\n-1.18332163853136912e-01\n-8.37694000660516858e-02\n-4.48260069692821110e-03\n8.37771409856742783e-02\n1.32307571118379624e-01\n1.06256701088509556e-01\n1.13410581863304660e-02\n-9.91716748624454913e-02\n-1.50391768993333508e-01\n-9.66543186726951109e-02\n3.55242095651669837e-02\n1.51982042314014021e-01\n1.54926810574526286e-01\n2.68219390607444402e-02\n-1.38617941372438963e-01\n-2.01683406805523407e-01\n-9.58620918169105080e-02\n1.07437990058826802e-01\n2.60111185395952682e-01\n2.70526003418478656e-01\n1.72746599562364461e-01\n6.65579450743808143e-02\n1.21131149580450334e-02\n1.28676019131753333e-02\n2.22873402851901659e-02\n2.87427634354668338e-02\n3.38665831428167224e-02\n3.79981675087207038e-02\n4.11209087262398854e-02\n4.30274194648906719e-02\n4.33782263760436188e-02\n4.17434911614377735e-02\n3.76537714178494035e-02\n3.06718923878249346e-02\n2.04919872801758406e-02\n7.06568489584597122e-03\n-9.25318326762433058e-03\n-2.75658430631513067e-02\n-4.63226816038126016e-02\n-6.33033606418265116e-02\n-7.57412297012834135e-02\n-8.06467422678637941e-02\n-7.53592776601701708e-02\n-5.83020625195677794e-02\n-2.98292449126522571e-02\n7.05125431093811539e-03\n4.63907307471540728e-02\n7.97945521782088135e-02\n9.79552527338560103e-02\n9.32140710917995496e-02\n6.26962470728218146e-02\n1.10359152523820132e-02\n-4.86888578898130239e-02\n-9.71354590765994702e-02\n-1.14516102586373791e-01\n-8.89820459120476137e-02\n-2.45130596967976684e-02\n5.61215652974466558e-02\n1.17211724380280616e-01\n1.25262356669225777e-01\n6.82795335037517381e-02\n-3.12728677779206266e-02\n-1.20959905215106092e-01\n-1.44123105222257186e-01\n-7.66650494269242311e-02\n4.82623516801031979e-02\n1.50811574438646762e-01\n1.53643180224140891e-01\n4.18067861224068818e-02\n-1.13648657536401507e-01\n-1.97855777072546452e-01\n-1.38010559489539247e-01\n3.51281275641514221e-02\n2.08526422091681207e-01\n2.78155463301825612e-01\n2.27942076358577383e-01\n1.24311530326779773e-01\n4.23225584755840406e-02\n6.93318692291197691e-03\n0.0\n4.12237779612431175e-04\n1.59659005511646949e-03\n3.77511762095250484e-03\n7.11553025435478909e-03\n1.17317580772811833e-02\n1.76666051329763575e-02\n2.48621682921065686e-02\n3.31213597709475241e-02\n4.20650848493703267e-02\n5.10924209245229161e-02\n5.93548864254891881e-02\n6.57598964754458892e-02\n6.90216370556900188e-02\n6.77780841300946457e-02\n6.07883858044572720e-02\n4.72127011215864867e-02\n2.69547955028320643e-02\n1.01610528295470633e-03\n-2.82277556834554799e-02\n-5.69516823862452129e-02\n-8.01461685630132092e-02\n-9.23374082107422944e-02\n-8.87912455563867609e-02\n-6.70725621220040896e-02\n-2.86181481390501390e-02\n2.02334202664404550e-02\n6.84261329822920539e-02\n1.02141833332437454e-01\n1.08630844827672601e-01\n8.12271882856874516e-02\n2.39083535154187427e-02\n-4.69190068925776985e-02\n-1.05555652078134055e-01\n-1.25729603116561728e-01\n-9.28118378478973854e-02\n-1.43806575636554624e-02\n7.75493025236687478e-02\n1.37338153125864892e-01\n1.28072763997995415e-01\n4.56095330514244973e-02\n-7.09424724625595388e-02\n-1.54179742897715771e-01\n-1.46664579438303910e-01\n-4.19494177571937202e-02\n1.01369471233384231e-01\n1.90171908700185549e-01\n1.58142063948850331e-01\n1.51423138785070042e-02\n-1.56628523520453727e-01\n-2.61405981437901336e-01\n-2.57258300706527776e-01\n-1.76065038655624562e-01\n-8.39372444467691436e-02\n-2.55672543404729807e-02\n-3.79967874770494648e-03\n1.33963970004022451e-02\n2.32032402430599922e-02\n2.99274811205197874e-02\n3.52792263067786133e-02\n3.96306683440244417e-02\n4.29930272466417934e-02\n4.51883539217600438e-02\n4.59084188823597264e-02\n4.47528297762893948e-02\n4.12723064998646999e-02\n3.50287831200541966e-02\n2.56785573376940440e-02\n1.30799761894890565e-02\n-2.57928863786705508e-03\n-2.06493120620650818e-02\n-3.99046148985814364e-02\n-5.84879695380220305e-02\n-7.39586217951693076e-02\n-8.34945684701674518e-02\n-8.42866926894274004e-02\n-7.41297971822814372e-02\n-5.21578898701835075e-02\n-1.95914695917932535e-02\n1.97221345579352940e-02\n5.92580368760770304e-02\n9.05321347688891748e-02\n1.04749959309868579e-01\n9.52842668306748131e-02\n6.04892077783602683e-02\n5.93864698995901462e-03\n-5.50863233488265505e-02\n-1.03897449783560442e-01\n-1.21787034946998704e-01\n-9.74736574697734753e-02\n-3.40186537665255473e-02\n4.83953703735275909e-02\n1.16967450461926969e-01\n1.38637577137783907e-01\n9.66076222219617448e-02\n3.20677638800810931e-03\n-9.97923615088999183e-02\n-1.57936338159569895e-01\n-1.33008727437322838e-01\n-2.91776411287213606e-02\n1.01699716274928603e-01\n1.84496237227889437e-01\n1.64694423317854249e-01\n4.44841707286389096e-02\n-1.15853255595277704e-01\n-2.35741881302496070e-01\n-2.65465199691178710e-01\n-2.12617312579273854e-01\n-1.25725486131026909e-01\n-5.32839285492885950e-02\n-1.46674778417986030e-02\n-1.99092601714809681e-03\n0.0\n4.03343643970647224e-04\n1.56214321589693032e-03\n3.69403639943757366e-03\n6.96493104424857415e-03\n1.14915379494699658e-02\n1.73273443212952905e-02\n2.44374764260988989e-02\n3.26652818326902128e-02\n4.16941559428555125e-02\n5.10102136599325240e-02\n5.98743226938600603e-02\n6.73152982204569539e-02\n7.21589485841735157e-02\n7.31089558550985508e-02\n6.88936042921963893e-02\n5.84851627820782149e-02\n4.13844612406673168e-02\n1.79410219115149622e-02\n-1.03496817204601441e-02\n-4.06608273254700642e-02\n-6.88725710585627454e-02\n-8.99470643720361313e-02\n-9.87159005993660937e-02\n-9.10664972243521442e-02\n-6.53706276639604705e-02\n-2.38213418269756401e-02\n2.68146053417442735e-02\n7.55805008848741133e-02\n1.09263897145855382e-01\n1.15893142300153046e-01\n8.91579036998473989e-02\n3.23792082318457089e-02\n-3.98442832519603080e-02\n-1.04034091167813147e-01\n-1.34871281450340830e-01\n-1.15432227144709604e-01\n-4.68626395392229000e-02\n4.76194686791757416e-02\n1.28528116198824788e-01\n1.55945456666473053e-01\n1.09823303687600488e-01\n4.48821877430354618e-03\n-1.12770962571330291e-01\n-1.82183503029385102e-01\n-1.62699903362473697e-01\n-5.64253932151250470e-02\n9.02493229234685584e-02\n2.12024543816312055e-01\n2.61541907277533126e-01\n2.33369692203748147e-01\n1.59643537612690678e-01\n8.34033298355206926e-02\n3.18262171077975248e-02\n7.98323605318606612e-03\n9.95585181421897690e-04\n1.40110184572483660e-02\n2.42677958337394785e-02\n3.13043127319891021e-02\n3.69201298670884664e-02\n4.15246848790561535e-02\n4.51602495099834508e-02\n4.76816225562179744e-02\n4.88157937929334582e-02\n4.81969348816059379e-02\n4.54027006449777629e-02\n4.00030714401332990e-02\n3.16278963460308246e-02\n2.00556465581688964e-02\n5.32128585412224454e-03\n-1.21652849942135953e-02\n-3.15071777173063089e-02\n-5.12415114192918617e-02\n-6.93292140589275990e-02\n-8.32547499791066736e-02\n-9.02740297470886743e-02\n-8.78325259179413009e-02\n-7.41416401924273605e-02\n-4.88484634354906383e-02\n-1.36674329231816234e-02\n2.72233133304893224e-02\n6.72573197307063803e-02\n9.82423356614870180e-02\n1.11910997364262091e-01\n1.02136932860027188e-01\n6.73828209513497867e-02\n1.26288009873479021e-02\n-5.01562992093718268e-02\n-1.03821303626897884e-01\n-1.30384799468568985e-01\n-1.17223658970415257e-01\n-6.32330273519749186e-02\n1.77356523280285394e-02\n9.87219193166768427e-02\n1.47816979551181255e-01\n1.40870936253561119e-01\n7.39379846186898615e-02\n-3.09185115274060937e-02\n-1.31296517683877872e-01\n-1.81435670694235829e-01\n-1.53766640727020121e-01\n-5.39550771311555835e-02\n8.00131776443764320e-02\n1.95946091026147018e-01\n2.53374691875332736e-01\n2.42144150090273708e-01\n1.82764858297158300e-01\n1.09888098908001872e-01\n5.15303970101889317e-02\n1.78836450619811703e-02\n4.11642969442385306e-03\n4.74108743421451835e-04\n0.0\n3.92372861556969529e-04\n1.51965355831389136e-03\n3.59392538289856830e-03\n6.77838696572506151e-03\n1.11917780808020208e-02\n1.68976753802158319e-02\n2.38838804971099328e-02\n3.20342934693521736e-02\n4.10959078633082245e-02\n5.06449972766260664e-02\n6.00587089973916230e-02\n6.85008212211161566e-02\n7.49328816661600783e-02\n7.81635694471462528e-02\n7.69488188868762690e-02\n7.01516492262880265e-02\n5.69623363749641939e-02\n3.71655001829503395e-02\n1.14208853304602828e-02\n-1.84989509521553824e-02\n-4.95933856749667737e-02\n-7.77337128291128027e-02\n-9.80646199454402318e-02\n-1.05755249994061135e-01\n-9.70700674986236384e-02\n-7.06138673678117779e-02\n-2.84697940131467993e-02\n2.31659888650935092e-02\n7.42850420517476573e-02\n1.12625728981945283e-01\n1.26515462867125866e-01\n1.08548597788686946e-01\n5.91138713417267009e-02\n-1.16092353750201615e-02\n-8.45473102067250820e-02\n-1.36235294882762342e-01\n-1.46345676457823370e-01\n-1.06070564562807515e-01\n-2.39767056538467555e-02\n7.40255317612733277e-02\n1.52175589289368418e-01\n1.78129390769745294e-01\n1.36891163849971631e-01\n3.87241602011955260e-02\n-8.38060747857491406e-02\n-1.89387510636719825e-01\n-2.45897544288794595e-01\n-2.43445639730464791e-01\n-1.95667093051449081e-01\n-1.29375096497086117e-01\n-6.96794778986336710e-02\n-2.96791380328081250e-02\n-9.44433969467696650e-03\n-2.00679560312401646e-03\n-2.14448604178589216e-04\n1.47459238596121152e-02\n2.55406893293903398e-02\n3.29503343779954383e-02\n3.88806175223215394e-02\n4.37841268301136094e-02\n4.77382520511501901e-02\n5.06345314256091417e-02\n5.22398606173122212e-02\n5.22289725988330303e-02\n5.02144378649952497e-02\n4.57849824590451926e-02\n3.85580332790063304e-02\n2.82495587011876229e-02\n1.47611377650371904e-02\n-1.72012153891705857e-03\n-2.06189811809239648e-02\n-4.08839951754814690e-02\n-6.09385695894745713e-02\n-7.87018298136859112e-02\n-9.17120252965768490e-02\n-9.73798901816330387e-02\n-9.33831756804826552e-02\n-7.81839795089070561e-02\n-5.16077754901298202e-02\n-1.53722602748412977e-02\n2.65930825826962633e-02\n6.82208692303186703e-02\n1.01937080822323167e-01\n1.19926676685369923e-01\n1.15947729963161758e-01\n8.73857757256990414e-02\n3.70099830607124175e-02\n-2.62559833115112058e-02\n-8.81944819841796041e-02\n-1.32113092487156025e-01\n-1.43343756915747966e-01\n-1.14373604667216647e-01\n-4.89004578565770953e-02\n3.70755862600261679e-02\n1.18409562402286339e-01\n1.68072998263180867e-01\n1.66509290329688336e-01\n1.09584241927662779e-01\n1.14542179461855388e-02\n-9.96679231975402535e-02\n-1.91768415338953585e-01\n-2.41098664138784446e-01\n-2.40521314745132192e-01\n-2.00227135454117355e-01\n-1.40893057640431307e-01\n-8.34060336963045879e-02\n-4.07887224916260727e-02\n-1.59273352022871323e-02\n-4.67869716048746175e-03\n-9.22511781518563613e-04\n-9.18432740241331453e-05\n0.0\n3.78711521405194790e-04\n1.46674341541919314e-03\n3.46915447007261311e-03\n6.54523687490441743e-03\n1.08147220396286690e-02\n1.63503609449958051e-02\n2.31618764428309400e-02\n3.11733152817671756e-02\n4.01956965053942225e-02\n4.98977316759151718e-02\n5.97788487656436621e-02\n6.91505714304941066e-02\n7.71342177689638975e-02\n8.26844561763628166e-02\n8.46488505263519320e-02\n8.18722984552550798e-02\n7.33512499704239013e-02\n5.84348999950310907e-02\n3.70587020890506547e-02\n9.97996373242682720e-03\n-2.10321920700133197e-02\n-5.31158080700148000e-02\n-8.24151965274781406e-02\n-1.04424095260799238e-01\n-1.14607024707882435e-01\n-1.09276020139030747e-01\n-8.66176245534648614e-02\n-4.76698051788654181e-02\n3.03438741432236758e-03\n5.74732940383913746e-02\n1.05054220317963506e-01\n1.34528524303391211e-01\n1.36700260727712797e-01\n1.07371961640201977e-01\n4.96678037459806695e-02\n-2.52296118350011402e-02\n-9.96591828063627810e-02\n-1.53487459651450442e-01\n-1.69754760007469613e-01\n-1.40303982664270771e-01\n-6.93071209405265176e-02\n2.70188664244713148e-02\n1.24960839614859751e-01\n2.00822010811003870e-01\n2.38618334204397542e-01\n2.34819049132015345e-01\n1.98155124824641954e-01\n1.44788050941104363e-01\n9.13386498869782765e-02\n4.91378597370676282e-02\n2.20439010466704291e-02\n7.95038769550482881e-03\n2.16825482149630554e-03\n3.98511956469138476e-04\n3.71008972775254537e-05\n1.56596383323668494e-02\n2.71232892198125450e-02\n3.49964502063447661e-02\n4.13157569513810316e-02\n4.65853354185763319e-02\n5.09231259722973048e-02\n5.42624547078276037e-02\n5.64158564754192182e-02\n5.71058534498331064e-02\n5.59895315461634985e-02\n5.26873457297331038e-02\n4.68216767857482508e-02\n3.80683552422435845e-02\n2.62223210794455090e-02\n1.12759530645645065e-02\n-6.49497427415501004e-03\n-2.64473045076942456e-02\n-4.75033070055123352e-02\n-6.81202281157960166e-02\n-8.63202579420447036e-02\n-9.98050571286857452e-02\n-1.06173997695928363e-01\n-1.03252671664404119e-01\n-8.95166742093100182e-02\n-6.45656802816711867e-02\n-2.95679019102114624e-02\n1.24374781683033193e-02\n5.65110083042926967e-02\n9.61789695813316248e-02\n1.24267339266483492e-01\n1.34179992326074055e-01\n1.21461159300867094e-01\n8.53320405121037462e-02\n2.97735730585527297e-02\n-3.62995524209587528e-02\n-1.00110920098512107e-01\n-1.47394192658892587e-01\n-1.65706930053959672e-01\n-1.47900623718449808e-01\n-9.46855144567518847e-02\n-1.52775480507759895e-02\n7.44215336954483914e-02\n1.55854493933356791e-01\n2.12910505939191225e-01\n2.36388197043403359e-01\n2.26187822894256124e-01\n1.90414085854853588e-01\n1.41829036765847322e-01\n9.32098726327477700e-02\n5.35499931489932315e-02\n2.64674500690691601e-02\n1.09798523331980265e-02\n3.68016663113130424e-03\n9.36388117245587283e-04\n1.61068440749116291e-04\n1.40695135344604207e-05\n0.0\n3.61363064446083957e-04\n1.39955313053416073e-03\n3.31058536441542839e-03\n6.24818270169916722e-03\n1.03315816536419403e-02\n1.56413021662691852e-02\n2.22076412860872825e-02\n2.99936242084699600e-02\n3.88737255163772444e-02\n4.86100987782544722e-02\n5.88289224857102347e-02\n6.90006339406730590e-02\n7.84291384195807129e-02\n8.62563354325666387e-02\n9.14891735647842957e-02\n9.30564830743858123e-02\n8.99014902782285796e-02\n8.11126038751735084e-02\n6.60892932446782988e-02\n4.47314701467700845e-02\n1.76301311852939818e-02\n-1.37746210857263608e-02\n-4.71123302197160726e-02\n-7.91272798344229006e-02\n-1.05895779998705419e-01\n-1.23244407182847238e-01\n-1.27364742897688565e-01\n-1.15571442397621155e-01\n-8.70922227304030960e-02\n-4.37231400638829204e-02\n9.85105134706028285e-03\n6.62622055225236678e-02\n1.16310373260052502e-01\n1.50446670307862851e-01\n1.60688331440422744e-01\n1.42577861680672685e-01\n9.66698243541643937e-02\n2.90312504389653066e-02\n-4.95789168432918259e-02\n-1.25839003653039405e-01\n-1.86860134259223154e-01\n-2.23242417982655844e-01\n-2.31255711430839672e-01\n-2.13418204238375347e-01\n-1.77269127845332081e-01\n-1.32786097377222384e-01\n-8.94023577075797882e-02\n-5.36882925935744659e-02\n-2.84069017224324802e-02\n-1.30076799761694867e-02\n-5.02240363045423650e-03\n-1.57255093668679522e-03\n-3.74892343704935486e-04\n-6.05667105522472040e-05\n-4.97912415528262859e-06\n1.68630227345853735e-02\n2.92076121454909327e-02\n3.76906109799667252e-02\n4.45192035970885663e-02\n5.02620689478813915e-02\n5.50855993649139800e-02\n5.89717756425088349e-02\n6.17862050357523562e-02\n6.33083130728015753e-02\n6.32516550781402342e-02\n6.12845766846613210e-02\n5.70563018794662327e-02\n5.02314846362747064e-02\n4.05349212600486994e-02\n2.78066711651090391e-02\n1.20659278151695349e-02\n-6.42051847091964362e-03\n-2.70724438238022364e-02\n-4.89435786807406459e-02\n-7.06960266581948688e-02\n-9.06177752580296786e-02\n-1.06699607846890976e-01\n-1.16784752354901766e-01\n-1.18797253945035056e-01\n-1.11042622276316810e-01\n-9.25569956374740488e-02\n-6.34605645900159360e-02\n-2.52508611638871359e-02\n1.90427763155646863e-02\n6.49238930983511431e-02\n1.06775365563850699e-01\n1.38508820102489827e-01\n1.54474159341667111e-01\n1.50508374429688035e-01\n1.24928652387435599e-01\n7.92290046487251903e-02\n1.82479494446082385e-02\n-5.03454317089059716e-02\n-1.17250107605802248e-01\n-1.73228275547552102e-01\n-2.10930687856378474e-01\n-2.26387662863290706e-01\n-2.19739433002785423e-01\n-1.94969307787213691e-01\n-1.58700261986873842e-01\n-1.18419693117077743e-01\n-8.06862779485380405e-02\n-4.98587871195373539e-02\n-2.76652031695604136e-02\n-1.35955510621412392e-02\n-5.80607175596568621e-03\n-2.09774345187880781e-03\n-6.16301208019980019e-04\n-1.38175201417127346e-04\n-2.10339092541362268e-05\n-1.63191792584779412e-06\n0.0\n3.38525531121223664e-04\n1.31110374429851983e-03\n3.10169615598401317e-03\n5.85596058769775798e-03\n9.69036527666370349e-03\n1.46909630729911735e-02\n2.09063087876424913e-02\n2.83360229340182020e-02\n3.69158892992488413e-02\n4.65004589859648321e-02\n5.68445429050640424e-02\n6.75855911051583547e-02\n7.82297094604582355e-02\n8.81448641991600390e-02\n9.65655411779255540e-02\n1.02613571562847422e-01\n1.05339762413017124e-01\n1.03790090277950234e-01\n9.70982338228505160e-02\n8.46029042699908973e-02\n6.59837040217960691e-02\n4.14033052263823864e-02\n1.16371933741499754e-02\n-2.18338375175231546e-02\n-5.67972212308423055e-02\n-9.03768793904454332e-02\n-1.19218736660643795e-01\n-1.39802301505609766e-01\n-1.48865607202993494e-01\n-1.43903294101994539e-01\n-1.23668486718563383e-01\n-8.85853418637423673e-02\n-4.09693392590553332e-02\n1.50351918686882618e-02\n7.38512622617351622e-02\n1.29185099233572742e-01\n1.74967932490387917e-01\n2.06354930174300094e-01\n2.20567020625123761e-01\n2.17367713787594397e-01\n1.99035819111127943e-01\n1.69816624430820268e-01\n1.34976903582956193e-01\n9.97062988828510549e-02\n6.81538587455079031e-02\n4.28402411189161489e-02\n2.45561377986610839e-02\n1.26944385896215813e-02\n5.83278624332546781e-03\n2.33576567557268683e-03\n7.93276937180079729e-04\n2.19524040519808884e-04\n4.64399284024423809e-05\n6.68033040410028868e-06\n4.90391950753971150e-07\n1.86043207609776634e-02\n3.22236287983217878e-02\n4.15880072977581061e-02\n4.91483450143746781e-02\n5.55610894078792730e-02\n6.10542562783930667e-02\n6.56690319887190677e-02\n6.93347576272967808e-02\n7.19002242354629673e-02\n7.31513276912093280e-02\n7.28254565430076356e-02\n7.06273194040140245e-02\n6.62488745703654486e-02\n5.93950331060245293e-02\n4.98160519589288669e-02\n3.73466938359650683e-02\n2.19511587421102952e-02\n3.77143291404862619e-03\n-1.68249219672414185e-02\n-3.92032884167624468e-02\n-6.24342694514420302e-02\n-8.52884542007607410e-02\n-1.06262827452753519e-01\n-1.23647021404955593e-01\n-1.35634776440248905e-01\n-1.40480926766851560e-01\n-1.36696938192650608e-01\n-1.23268995618504712e-01\n-9.98730304025064186e-02\n-6.70527677897019697e-02\n-2.63223048344074922e-02\n1.98434912919251624e-02\n6.81572446003887167e-02\n1.14813065842711406e-01\n1.55906291335327185e-01\n1.87928536948011204e-01\n2.08260721295553092e-01\n2.15571627124486631e-01\n2.10033830305581731e-01\n1.93296273486849163e-01\n1.68200944215721876e-01\n1.38290134964519362e-01\n1.07204690488636428e-01\n7.81049076648995394e-02\n5.32415027588186013e-02\n3.37622989002003618e-02\n1.97726534737902304e-02\n1.05966447745472828e-02\n5.13670911341918956e-03\n2.21859431666759834e-03\n8.36889359662275388e-04\n2.68210775949442295e-04\n7.01476878602958403e-05\n1.40436111195544778e-05\n1.91398958451737972e-06\n1.33251044088075234e-07\n0.0\n3.06316648506673166e-04\n1.18635927833241604e-03\n2.80689457781592129e-03\n5.30124307846088858e-03\n8.77918938520373671e-03\n1.33284114539981968e-02\n1.90115382305853717e-02\n2.58601520866233656e-02\n3.38663496127893648e-02\n4.29723443162812607e-02\n5.30586907681140987e-02\n6.39319313200203132e-02\n7.53127722783591969e-02\n8.68262548211948260e-02\n9.79957574882412558e-02\n1.08242995977982856e-01\n1.16896396337193537e-01\n1.23210213835900084e-01\n1.26396442642628920e-01\n1.25670801238097318e-01\n1.20312797228730728e-01\n1.09738036806146882e-01\n9.35786015618843975e-02\n7.17646486129846356e-02\n4.45977348106540647e-02\n1.28042204200365071e-02\n-2.24438989525134712e-02\n-5.95525757448753662e-02\n-9.65823521207308522e-02\n-1.31380821694262101e-01\n-1.61765328014352450e-01\n-1.85740405833515976e-01\n-2.01724636005742169e-01\n-2.08754074195522887e-01\n-2.06626695817079070e-01\n-1.95956428886370132e-01\n-1.78117191182287804e-01\n-1.55075899499963893e-01\n-1.29135473938895823e-01\n-1.02629360716892382e-01\n-7.76222549215735275e-02\n-5.56727620064900036e-02\n-3.77008602432322981e-02\n-2.39785805650116271e-02\n-1.42327829348418578e-02\n-7.82309011786731616e-03\n-3.94400362934831453e-03\n-1.80206419989141086e-03\n-7.34894919846005288e-04\n-2.62135983426127191e-04\n-7.95450651430097320e-05\n-1.97208427906149567e-05\n-3.74628950295904613e-06\n-4.84901985998636395e-07\n-3.20856166649636887e-08\n2.16323653344065482e-02\n3.74683558470838493e-02\n4.83632967793408974e-02\n5.71856865405681522e-02\n6.47332510868514344e-02\n7.13239489015394246e-02\n7.70787320035533768e-02\n8.20094840429305139e-02\n8.60546167608220308e-02\n8.90966461515893121e-02\n9.09730683557904846e-02\n9.14852045685588672e-02\n9.04073441702306912e-02\n8.74975434161931187e-02\n8.25109359784048785e-02\n7.52160554666854303e-02\n6.54143211351411458e-02\n5.29624323117891260e-02\n3.77969282196930073e-02\n1.99595991004883899e-02\n-3.78189189133665564e-04\n-2.28948125236442049e-02\n-4.71044236740150724e-02\n-7.23530842715331690e-02\n-9.78283184325434152e-02\n-1.22584861097614808e-01\n-1.45588212956825419e-01\n-1.65775798741253505e-01\n-1.82133121586750879e-01\n-1.93779524541073361e-01\n-2.00055387478303981e-01\n-2.00600329615919948e-01\n-1.95410867092696672e-01\n-1.84866575044412923e-01\n-1.69716518476760336e-01\n-1.51022575630282346e-01\n-1.30062805224064243e-01\n-1.08205177335461977e-01\n-8.67683250468508915e-02\n-6.68898509918519624e-02\n-4.94227869845156945e-02\n-3.48764604150724189e-02\n-2.34097928808456139e-02\n-1.48746604002332750e-02\n-8.89694975654910757e-03\n-4.97605262654398847e-03\n-2.58167515506669979e-03\n-1.23041141874346053e-03\n-5.32179884398201620e-04\n-2.05687478901768256e-04\n-6.96089529121540253e-05\n-2.00593991632254990e-05\n-4.72673475059513218e-06\n-8.54067396711045408e-07\n-1.05217193684781199e-07\n-6.63037523463099430e-09\n0.0\n2.52973790466030609e-04\n9.79763277501901047e-04\n2.31835312271606777e-03\n4.38012678355582680e-03\n7.25945198721669911e-03\n1.10370092826103418e-02\n1.57803280093023295e-02\n2.15426383267818128e-02\n2.83604966863073224e-02\n3.62504352780307071e-02\n4.52048321304671583e-02\n5.51872132818276573e-02\n6.61272517026999379e-02\n7.79158054924727339e-02\n9.04004304823962102e-02\n1.03381899380173781e-01\n1.16612347903868013e-01\n1.29795731269086778e-01\n1.42591291614157623e-01\n1.54620685676082531e-01\n1.65479279323358902e-01\n1.74751862094244564e-01\n1.82032660147876418e-01\n1.86949034437872558e-01\n1.89187668210231863e-01\n1.88521426328434327e-01\n1.84834489168010763e-01\n1.78142931861137777e-01\n1.68607756079511201e-01\n1.56537602419213911e-01\n1.42379061569484766e-01\n1.26693683999961226e-01\n1.10122391317536095e-01\n9.33398385204977088e-02\n7.70030800338345894e-02\n6.17002964492466763e-02\n4.79059801604701171e-02\n3.59485784989211771e-02\n2.59950559961315483e-02\n1.80543204156413360e-02\n1.19983874085805818e-02\n7.59716897196426651e-03\n4.56055474511472218e-03\n2.58057042084018076e-03\n1.36707936585494529e-03\n6.72548914481700243e-04\n3.04242567900154560e-04\n1.25016771248070329e-04\n4.59423901349730892e-05\n1.47940998899671823e-05\n4.05928694751439254e-06\n9.11304127445854006e-07\n1.56963848363263427e-07\n1.84420696346766848e-08\n1.10882488925677219e-09\n3.08017677867408676e-02\n5.33502267695735513e-02\n6.88725530254425400e-02\n8.14802485447700120e-02\n9.23591495085343689e-02\n1.02038873435694427e-01\n1.10798658383192139e-01\n1.18794914515548661e-01\n1.26113141872919138e-01\n1.32792733297486726e-01\n1.38840325931581604e-01\n1.44237817053337325e-01\n1.48947788674297726e-01\n1.52917718240532630e-01\n1.56083733920423906e-01\n1.58374361765004301e-01\n1.59714534446769418e-01\n1.60030011574897935e-01\n1.59252264257810666e-01\n1.57323784572125175e-01\n1.54203686612195606e-01\n1.49873368861236866e-01\n1.44341911709382376e-01\n1.37650797316018619e-01\n1.29877473634186419e-01\n1.21137254901710692e-01\n1.11583072788770971e-01\n1.01402679530360501e-01\n9.08130655759954164e-02\n8.00520895214050648e-02\n6.93676148816854965e-02\n5.90047793295259623e-02\n4.91923451634262779e-02\n4.01293412240870465e-02\n3.19733482604260405e-02\n2.48317508032014356e-02\n1.87570482404866880e-02\n1.37468885549574191e-02\n9.74890429711539053e-03\n6.66977763774697762e-03\n4.38735574324304513e-03\n2.76420259230797036e-03\n1.66080909134401619e-03\n9.46837317249812102e-04\n5.09221467278361643e-04\n2.56588759165602592e-04\n1.20148297188376165e-04\n5.17653249373737777e-05\n2.02706319297804194e-05\n7.10277083627335498e-06\n2.18189720698011373e-06\n5.71380211315839789e-07\n1.22475484795933063e-07\n2.01492831422808538e-08\n2.26199189394169171e-09\n1.29986137093275802e-10\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.08472742381388542e-03\n-4.20113124760565244e-03\n-9.90251969648426981e-03\n-1.84771170763622303e-02\n-2.97864244518314635e-02\n-4.29935124003884145e-02\n-5.62502048776087268e-02\n-6.64805016337743915e-02\n-6.94951639769335328e-02\n-6.07489836031443048e-02\n-3.70087187849701890e-02\n1.10930973807619473e-03\n4.64683006843350233e-02\n8.43432667407494757e-02\n9.54507151085634137e-02\n6.49196479072799287e-02\n-4.37546628453371750e-03\n-8.19387104591041138e-02\n-1.16402125826386982e-01\n-6.80514713575707669e-02\n4.51112437681951625e-02\n1.31643108854483243e-01\n9.06119505406491887e-02\n-6.35740425963955968e-02\n-1.55664101856450132e-01\n-3.25463011982652650e-02\n1.61062963962556399e-01\n9.14113873640488572e-02\n-1.71651781820813254e-01\n-9.17992460712520608e-02\n2.26861122079491717e-01\n-2.74638834186305171e-02\n-2.38715686972268110e-01\n3.27133758028667565e-01\n-2.52461693632194173e-01\n1.37970366908697711e-01\n-5.77226737959510572e-02\n1.91900278708997951e-02\n-5.17285234812659821e-03\n1.14295039404465238e-03\n-2.07983783328855249e-04\n3.11689067087047306e-05\n-3.82973710685585953e-06\n3.82261697502359940e-07\n-3.05284349905734929e-08\n1.90534375715001719e-09\n-8.95713424979161803e-11\n2.98382267775662062e-12\n-6.28005580839250896e-14\n6.28036983473509968e-16\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n-3.20283468138268617e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n8.08445165689827342e-13\n-1.63282067007192764e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.49153584618682711e-02\n-2.58341586690582249e-02\n-3.32116220033397275e-02\n-3.86332886759592903e-02\n-4.19352060972968538e-02\n-4.22859974032437497e-02\n-3.84603343591977051e-02\n-2.91354456526192324e-02\n-1.33735769422542814e-02\n8.66375493142438995e-03\n3.48542512856124601e-02\n6.03977488262971221e-02\n7.77935527381269643e-02\n7.82387419341021156e-02\n5.50015082023348201e-02\n8.46471169411793130e-03\n-4.91546484099385228e-02\n-9.33789301143736900e-02\n-9.58451624442848149e-02\n-4.24753634491714521e-02\n4.65584996049520153e-02\n1.13675365442407236e-01\n9.62111172949670912e-02\n-1.20719355238242849e-02\n-1.22543885941844538e-01\n-1.08867617260667501e-01\n4.32122795008925698e-02\n1.55525846583246002e-01\n4.44856381102336565e-02\n-1.56679204868117705e-01\n-9.27910168036672200e-02\n1.70832186850680245e-01\n8.35132884230644357e-02\n-2.25539034459328630e-01\n4.43192212140970654e-02\n2.19269242183260410e-01\n-3.21854692028745448e-01\n2.60382927692662802e-01\n-1.49103608459652814e-01\n6.56033227650731493e-02\n-2.30603343843918986e-02\n6.61577618876218760e-03\n-1.56781788023062688e-03\n3.08791591122133168e-04\n-5.06329993144556269e-05\n6.89739006530945087e-06\n-7.75957347905360304e-07\n7.13509751266757394e-08\n-5.27725011601396538e-09\n3.06437392918077032e-10\n-1.34576262686770477e-11\n4.20315987260463183e-13\n-8.32111971795923090e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n-9.31231485683661287e-04\n-3.60664403551681084e-03\n-8.50602400394575263e-03\n-1.59003845831766355e-02\n-2.57379331178424903e-02\n-3.74429022893153773e-02\n-4.96727203528201863e-02\n-6.01209842233804345e-02\n-6.55188921569456323e-02\n-6.20485584438564761e-02\n-4.63832477729556533e-02\n-1.74258908623226814e-02\n2.15613643306100493e-02\n6.13677159501424679e-02\n8.73740714402345270e-02\n8.39387467097887224e-02\n4.30735753536244936e-02\n-2.54205416613427181e-02\n-8.96319597239925298e-02\n-1.06347499921684019e-01\n-5.01739831038397407e-02\n5.32299261477481092e-02\n1.23700123221912733e-01\n8.28396897050736464e-02\n-5.28775536891320994e-02\n-1.43085570967639686e-01\n-5.61977132639769339e-02\n1.23816025006318553e-01\n1.28765238917973951e-01\n-9.31608526655434005e-02\n-1.63492650510438126e-01\n1.06861882743359851e-01\n1.62491258203155242e-01\n-1.96459220801137896e-01\n-4.41807868984634977e-02\n2.70804866571520197e-01\n-3.14111437351427047e-01\n2.26653503225050040e-01\n-1.19973760107645350e-01\n4.96384679318883706e-02\n-1.65764998398732176e-02\n4.54921289331997394e-03\n-1.03647975975075567e-03\n1.97023114024771396e-04\n-3.12759943321989361e-05\n4.13512897657961669e-06\n-4.52475045531942631e-07\n4.05416570728018662e-08\n-2.92645637485853674e-09\n1.66078551450348462e-10\n-7.13697837991790340e-12\n2.18361705890636816e-13\n-4.23906791088685720e-15\n0.0\n0.0\n0.0\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367363e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n-1.61942344080973289e-09\n8.98653833493966699e-11\n-3.78065778735820891e-12\n1.13361214079692652e-13\n-2.15878791904814791e-15\n0.0\n0.0\n0.0\n8.66426047764552840e-04\n3.35565365371242501e-03\n7.91595443084345055e-03\n1.48087344978570980e-02\n2.40121934498876630e-02\n3.50470844797404965e-02\n4.67621537451872737e-02\n5.71499205294295071e-02\n6.33170572602035214e-02\n6.17867458500721278e-02\n4.93218215401055385e-02\n2.43605773569870315e-02\n-1.11229334763186093e-02\n-5.00111894576891411e-02\n-7.99363085453404787e-02\n-8.61829356704887223e-02\n-5.84006514722374415e-02\n3.58940229482597776e-04\n6.73683490910389760e-02\n1.04547897847193039e-01\n7.88234561964185065e-02\n-7.40196344727397145e-03\n-9.89024440883244094e-02\n-1.13935536034448268e-01\n-1.85003343777213544e-02\n1.09092261688566117e-01\n1.21812489154462897e-01\n-2.46754972559791140e-02\n-1.53724638728994389e-01\n-5.40369786300429894e-02\n1.52844124485929489e-01\n9.28820650447558793e-02\n-1.70534777166068824e-01\n-7.46582530210938983e-02\n2.23693329402947061e-01\n-6.04428648778056812e-02\n-1.99685494680089226e-01\n3.15424575732289769e-01\n-2.67266406134374912e-01\n1.60001492639399556e-01\n-7.37993799662741007e-02\n2.73166714845997499e-02\n-8.29850452787542735e-03\n2.09615300256641487e-03\n-4.43432899576961322e-04\n7.88025564301311331e-05\n-1.17598018378678287e-05\n1.46840532288151399e-06\n-1.52341139845976699e-07\n1.29853215619237565e-08\n-8.94333513020322284e-10\n4.85518037701355783e-11\n-2.00053468434833568e-12\n5.88100400988433593e-14\n-1.09902091182217964e-15\n0.0\n1.38775648385790068e-02\n2.40366473857502247e-02\n3.09183376927100149e-02\n3.60490110866714675e-02\n3.93682703078595542e-02\n4.02329121179938673e-02\n3.76476647717229468e-02\n3.04822304143377576e-02\n1.78148420603557490e-02\n-5.49493293180726840e-04\n-2.34201922161792198e-02\n-4.75864693423650661e-02\n-6.75475918537050551e-02\n-7.61070536214551313e-02\n-6.63258440415182837e-02\n-3.49512535853120088e-02\n1.34896496535019863e-02\n6.41090627526219453e-02\n9.38543479864410168e-02\n8.10994027665983136e-02\n2.12923912180138231e-02\n-5.98341884996863235e-02\n-1.10030524056330112e-01\n-8.17948212773452893e-02\n1.99064348515221000e-02\n1.15539923940347122e-01\n1.02747525542275245e-01\n-2.93739623914327161e-02\n-1.40726818170620382e-01\n-7.11091388755192705e-02\n1.14989793196826451e-01\n1.32918431505758633e-01\n-8.91485417183863205e-02\n-1.61387508239882377e-01\n1.10055601699256336e-01\n1.53322920048713257e-01\n-2.00539512712531814e-01\n-2.47180274398494312e-02\n2.54306170934596121e-01\n-3.12462048980527318e-01\n2.35681063631851012e-01\n-1.30404128946312675e-01\n5.65779096716435281e-02\n-1.99041935277143658e-02\n5.78688142169003685e-03\n-1.40596016281414383e-03\n2.87177007748138670e-04\n-4.94265797874700931e-05\n7.16154736544445315e-06\n-8.70066637554330904e-07\n8.79840153153714664e-08\n-7.32143270574096396e-09\n4.92939770466701676e-10\n-2.61925496886000591e-11\n1.05747023582451444e-12\n-3.04893628200499972e-14\n5.59323918084504584e-16\n0.0\n8.08158692342989915e-04\n3.12998515653716350e-03\n7.38517565752149635e-03\n1.38253132320619240e-02\n2.24522063933630805e-02\n3.28663626386842059e-02\n4.40769909952560268e-02\n5.43310572757454632e-02\n6.10631553156686172e-02\n6.11141009965063056e-02\n5.13829153887050347e-02\n3.00123716033360022e-02\n-1.99912992041950373e-03\n-3.92489735811246479e-02\n-7.14187172436417106e-02\n-8.50885006306404817e-02\n-6.88163708641761074e-02\n-2.08639639467000648e-02\n4.38628639729669381e-02\n9.38928414426828950e-02\n9.42769126249746459e-02\n3.17951926165290777e-02\n-6.21820057924962824e-02\n-1.16966777517995002e-01\n-7.26997949296024210e-02\n4.94382434623633349e-02\n1.32194169547041884e-01\n6.57987478006277354e-02\n-9.54888521621763270e-02\n-1.38115365157589182e-01\n3.28530164553997445e-02\n1.67792257111886223e-01\n1.30048521049586953e-03\n-1.88742910765101940e-01\n2.51320701308221928e-02\n2.04395439674644047e-01\n-1.48084466485667726e-01\n-1.07469414757189574e-01\n2.90187851903803029e-01\n-2.97112519015750698e-01\n2.02734630968114227e-01\n-1.04415761976262733e-01\n4.27882747149507525e-02\n-1.43458775460581483e-02\n3.99957789848109143e-03\n-9.36072935864134593e-04\n1.84837054629292984e-04\n-3.08416262170301266e-05\n4.34251259324340908e-06\n-5.13695069484046143e-07\n5.06657853082752451e-08\n-4.11821551403110582e-09\n2.71191472114882765e-10\n-1.41102151833627694e-11\n5.58406190060084879e-13\n-1.57966659136821553e-14\n1.34110082885095135e-02\n2.32285477364258114e-02\n2.98860996054554594e-02\n3.48797786234479046e-02\n3.81892381223788158e-02\n3.92471829676002693e-02\n3.71538730469372011e-02\n3.08652396695146408e-02\n1.94853920076197493e-02\n2.71067763847296405e-03\n-1.85941472740467142e-02\n-4.18117164601599367e-02\n-6.22489781836327166e-02\n-7.34866556939571952e-02\n-6.88453932375441002e-02\n-4.41692459769204224e-02\n-1.44841254376531581e-03\n4.82920127164106483e-02\n8.54732402076973929e-02\n8.84366022246835387e-02\n4.60942565828406994e-02\n-2.84199156080339639e-02\n-9.42883172677429493e-02\n-1.01381495418001205e-01\n-2.96036179400583389e-02\n7.66130663395796219e-02\n1.22433390026080946e-01\n4.51895108600385148e-02\n-9.32860514910172911e-02\n-1.30432938458461017e-01\n8.20081992983317902e-03\n1.50931262325264132e-01\n6.15593609069964576e-02\n-1.49611746094279907e-01\n-9.18975496671960018e-02\n1.70628068541547301e-01\n6.53278764101584142e-02\n-2.21263159640423035e-01\n7.57862765817949313e-02\n1.80014718045661271e-01\n-3.07891757468296778e-01\n2.73094737405840060e-01\n-1.70599706566118642e-01\n8.22652000647926263e-02\n-3.19530648431656378e-02\n1.02346436590687109e-02\n-2.74111767195971785e-03\n6.18871018390315859e-04\n-1.18270476590769932e-04\n1.91502023000594468e-05\n-2.62231259216816210e-06\n3.02252308581942185e-07\n-2.90938782209820251e-08\n2.31116975543123349e-09\n-1.48928121109455270e-10\n7.59094088571304640e-12\n-2.94583256847368901e-13\n0.0\n7.55578460578792250e-04\n2.92634279457469962e-03\n6.90600799850599884e-03\n1.29363300983407065e-02\n2.10376911072675983e-02\n3.08768236488992862e-02\n4.15981791441294158e-02\n5.16661078142204300e-02\n5.88016778013916441e-02\n6.01379021790062890e-02\n5.27364107796431322e-02\n3.45666628780188154e-02\n5.89504265383238111e-03\n-2.92676595184092718e-02\n-6.24162650888476569e-02\n-8.15792684392644823e-02\n-7.50796499560372615e-02\n-3.79476882498117618e-02\n2.12328593136595391e-02\n7.78173930557252286e-02\n9.85941149302572428e-02\n6.11661686758680906e-02\n-2.27622777262843357e-02\n-9.97514513295714444e-02\n-1.02888651705516226e-01\n-1.20807025458813250e-02\n1.01582608746744699e-01\n1.16455312491852439e-01\n-7.60805901610506555e-03\n-1.36066500044879080e-01\n-8.31897955472478273e-02\n1.06895593877290779e-01\n1.35737034603814116e-01\n-8.63403631011036010e-02\n-1.58775957631712761e-01\n1.13751534782348243e-01\n1.43731724342601119e-01\n-2.03878872101696557e-01\n-5.87789538391338996e-03\n2.37332242904563756e-01\n-3.09605301178792980e-01\n2.43864153707220865e-01\n-1.40753685790851485e-01\n6.38573485402233049e-02\n-2.35822617857203536e-02\n7.23183717829213590e-03\n-1.86373745437301173e-03\n4.06441527723909284e-04\n-7.52544596961842165e-05\n1.18349014785157664e-05\n-1.57729685808418275e-06\n1.77258137011227427e-07\n-1.66614437347434157e-08\n1.29420250386442746e-09\n-8.16441149024179224e-11\n4.07835591812698989e-12\n1.29748046590291641e-02\n2.24730208877198974e-02\n2.89203443271613889e-02\n3.37826386444656790e-02\n3.70735103747419012e-02\n3.82919017737505599e-02\n3.66228434593737009e-02\n3.11018414527098330e-02\n2.08653274069167255e-02\n5.53264354674670028e-03\n-1.42895572599816070e-02\n-3.64739483838690190e-02\n-5.70233893226039165e-02\n-7.02447626055959923e-02\n-6.98370152504726310e-02\n-5.11337948913146156e-02\n-1.42477980967673293e-02\n3.30013877475572939e-02\n7.44602271615361216e-02\n8.97290742140010589e-02\n6.39803154654428746e-02\n6.62474528345230332e-04\n-7.10490007401951423e-02\n-1.04847531797734775e-01\n-6.65156353079946611e-02\n2.96532510682681640e-02\n1.11007035041306865e-01\n9.45749565926919389e-02\n-2.38279871472458146e-02\n-1.28234830255555182e-01\n-8.24577580450015779e-02\n8.23317203057432612e-02\n1.42175983326254834e-01\n-2.41581776181457111e-02\n-1.66715279399058058e-01\n-1.84856863588283085e-03\n1.86598622873165254e-01\n-3.24707272925996021e-02\n-1.97016239993091397e-01\n1.57410206751743498e-01\n8.71802057908291350e-02\n-2.77107436042824173e-01\n2.98443719543597608e-01\n-2.12349552082682469e-01\n1.14072588013370668e-01\n-4.88923977799044437e-02\n1.72137949930847300e-02\n-5.06402983072517469e-03\n1.25767317036228066e-03\n-2.65243772937648044e-04\n4.76286954356546386e-05\n-7.28115775407417099e-06\n9.45147478149082695e-07\n-1.03626854141031361e-07\n9.51685224181556748e-09\n-7.23195867354570885e-10\n4.46835784501288371e-11\n0.0\n7.07968488715487575e-04\n2.74195016643471708e-03\n6.47197520841484748e-03\n1.21301141149080388e-02\n1.97513298530841638e-02\n2.90575945793569400e-02\n3.93078708330475216e-02\n4.91529012662425407e-02\n5.65642447017429412e-02\n5.89415058818410012e-02\n5.35217425912010991e-02\n3.81887577762012043e-02\n1.26659863802208936e-02\n-2.01568873682223502e-02\n-5.33481352313809679e-02\n-7.64032813109597614e-02\n-7.79635215846214008e-02\n-5.10203875232878162e-02\n7.47645039672664583e-04\n5.90476666753959115e-02\n9.43974333203616567e-02\n8.01097842127733856e-02\n1.32861222977138718e-02\n-7.08424179116465824e-02\n-1.10292460231499773e-01\n-6.09612044250449625e-02\n5.06065625403030739e-02\n1.23451269691122634e-01\n6.74739501839395905e-02\n-7.65659296418580576e-02\n-1.35657470885995363e-01\n-6.18618647180836558e-03\n1.47624469664143609e-01\n6.73650512139389035e-02\n-1.46985778465230976e-01\n-9.00015595357351872e-02\n1.70992902684906550e-01\n5.56035135363378979e-02\n-2.18203911549614160e-01\n9.03043044067258355e-02\n1.60312300054577500e-01\n-2.99307131693407946e-01\n2.77854027722973795e-01\n-1.80836553482089823e-01\n9.09536070344159620e-02\n-3.69603142724853131e-02\n1.24360806238899921e-02\n-3.51588474112001989e-03\n8.42644246989619110e-04\n-1.72057073015557260e-04\n2.99909204757225455e-05\n-4.46030125570664008e-06\n5.64299899789155604e-07\n-6.03979033050708685e-08\n5.42233811839169662e-09\n-4.03298549480480578e-10\n1.25660850235249262e-02\n2.17650977129755230e-02\n2.80148688472692808e-02\n3.27512555097562857e-02\n3.60167101119801408e-02\n3.73681794670315676e-02\n3.60660923388668869e-02\n3.12191448689965907e-02\n2.19999105798660624e-02\n7.97469112913272958e-03\n-1.04542879731757323e-02\n-3.15646184477035227e-02\n-5.19566636005748470e-02\n-6.66026031034667454e-02\n-6.96421173402293203e-02\n-5.61774686788752559e-02\n-2.49650224833861470e-02\n1.87765639236707957e-02\n6.20631630888814970e-02\n8.64628816865110200e-02\n7.54416466240959843e-02\n2.54616812604534330e-02\n-4.47956587243744167e-02\n-9.61972512091509996e-02\n-8.88446586648543590e-02\n-1.47232458226405800e-02\n7.98957332004834875e-02\n1.13931357696995486e-01\n4.05719226435826558e-02\n-8.42089263588257364e-02\n-1.24926536482568323e-01\n-1.19412808254562228e-02\n1.30006633820307221e-01\n9.28698614339001222e-02\n-9.96723383938321050e-02\n-1.37510918608476418e-01\n8.45961868935660166e-02\n1.55716940555528233e-01\n-1.17808353074389555e-01\n-1.33744095507930871e-01\n2.06429212895509195e-01\n-1.22950986622326255e-02\n-2.19945017009354954e-01\n3.05575745127095511e-01\n-2.51167940869888306e-01\n1.50959972271455967e-01\n-7.14415918364089964e-02\n2.76102572199898137e-02\n-8.89761218574894319e-03\n2.42138232289883107e-03\n-5.60748539740517273e-04\n1.10968955842700439e-04\n-1.87928471497622447e-05\n2.72103409726876037e-06\n-3.35743493820971046e-07\n3.50998701758943935e-08\n-3.08200197424011892e-09\n0.0\n6.64721423538674572e-04\n2.57445500323257330e-03\n6.07758522600758237e-03\n1.13967363290972037e-02\n1.85782722277741189e-02\n2.73904321995126418e-02\n3.71895573466432261e-02\n4.67867735477216357e-02\n5.43729554208776111e-02\n5.75895932167672375e-02\n5.38529390483070067e-02\n4.10233850992304250e-02\n1.84275708835614158e-02\n-1.19419525977376619e-02\n-4.45000192114178642e-02\n-7.01486386490793451e-02\n-7.81845081216825666e-02\n-6.04449887693185445e-02\n-1.69397473819012517e-02\n3.95860793491211588e-02\n8.42640570438786124e-02\n8.95293684295746378e-02\n4.26473939403817087e-02\n-3.74710096432531864e-02\n-1.00045595848514357e-01\n-9.12436083685649463e-02\n-3.07919270226668764e-03\n9.77442930489463291e-02\n1.09498691531181788e-01\n2.76457493593588229e-04\n-1.21176905737521337e-01\n-9.57212015692781581e-02\n6.99263442851631584e-02\n1.44712571197065376e-01\n-1.70180514681687461e-02\n-1.65492041886532687e-01\n-1.32593202125539582e-03\n1.84395657125539819e-01\n-4.01518101142324044e-02\n-1.89141571158557065e-01\n1.65849366514973728e-01\n6.72766229507452546e-02\n-2.63276954832890375e-01\n2.98598963167771736e-01\n-2.21311375920616449e-01\n1.23766691522875075e-01\n-5.53439607608452872e-02\n2.03976260392571135e-02\n-6.30794503707690201e-03\n1.65487438777846795e-03\n-3.70750379036844215e-04\n7.11778537597883705e-05\n-1.17210793946950743e-05\n1.65341926151391481e-06\n-1.99091031827781687e-07\n2.03409408147625478e-08\n1.21823309947558401e-02\n2.11004162375382186e-02\n2.71642162504451071e-02\n3.17799977782120963e-02\n3.50147615201247889e-02\n3.64764193643167603e-02\n3.54926194659148722e-02\n3.12392323025121842e-02\n2.29269443335345900e-02\n1.00871622847511135e-02\n-7.03965948978038745e-03\n-2.70659524453717958e-02\n-4.71039521118699969e-02\n-6.27273017499442170e-02\n-6.85414535754726023e-02\n-5.96116843458726481e-02\n-3.37433693854726074e-02\n5.91611457979390309e-03\n4.91987654537008393e-02\n7.99571441376115410e-02\n8.13561672620125020e-02\n4.51502773468397192e-02\n-1.87387543691607851e-02\n-7.95861320079499363e-02\n-9.76110122573920630e-02\n-5.03983043127975219e-02\n4.02252836963969546e-02\n1.07602146788155037e-01\n8.50972928872941181e-02\n-2.37297627894801876e-02\n-1.18810992451741176e-01\n-8.53878271364302693e-02\n5.99162913912753906e-02\n1.38296932716369753e-01\n1.85795819486561514e-02\n-1.44138569145363715e-01\n-7.17182781609920217e-02\n1.44939239121503000e-01\n8.73217036258427670e-02\n-1.71522144292497264e-01\n-4.55580869180390521e-02\n2.14484669935683658e-01\n-1.03955213263817958e-01\n-1.40637430791127060e-01\n2.89724281620715340e-01\n-2.81534166942403574e-01\n1.90653050251486739e-01\n-9.98161218514680010e-02\n4.23261085361709768e-02\n-1.49128701842033851e-02\n4.43349188834245202e-03\n-1.12281235004890625e-03\n2.43621785116163967e-04\n-4.54158742877752448e-05\n7.27779075886823730e-06\n-1.00087514768787077e-06\n1.17678737941843360e-07\n0.0\n6.25319940814810220e-04\n2.42185371682716779e-03\n5.71815611534529002e-03\n1.07277080458695554e-02\n1.75057315494395911e-02\n2.58593648258017353e-02\n3.52280968972560130e-02\n4.45615300968146694e-02\n5.22428686135436790e-02\n5.61322649658103148e-02\n5.38230215564708125e-02\n4.31956978484027282e-02\n2.32927298571770670e-02\n-4.60680729179507777e-03\n-3.60583275363344710e-02\n-6.32665980972904746e-02\n-7.63708524659760246e-02\n-6.66920073007034597e-02\n-3.15977795079580570e-02\n2.08030978084052590e-02\n7.04320723228067935e-02\n9.10466579747774563e-02\n6.40452568804673467e-02\n-4.86686434237681986e-03\n-7.83469114777474301e-02\n-1.02862151973663302e-01\n-4.80085295045311541e-02\n5.45913336372665162e-02\n1.16369577840077607e-01\n6.45196089782965887e-02\n-6.52422130111359744e-02\n-1.29179339283162248e-01\n-2.91153033164473947e-02\n1.23213039986119072e-01\n1.00545269626018868e-01\n-9.33759797366519734e-02\n-1.38459018903674208e-01\n8.37847774558779651e-02\n1.52248394231236817e-01\n-1.22103038931646146e-01\n-1.23388883243706643e-01\n2.08154318706998687e-01\n-2.97560857136400271e-02\n-2.02209710545619759e-01\n3.00410862744197704e-01\n-2.57561590652309769e-01\n1.60962026776198946e-01\n-7.92931956388732984e-02\n3.19848335625623967e-02\n-1.07964998064546160e-02\n3.09063131804710118e-03\n-7.56561191268912596e-04\n1.59145245924193195e-04\n-2.88328640331388168e-05\n4.49953657160368935e-06\n-6.03655674057247646e-07\n1.18213227699670628e-02\n2.04751316502538097e-02\n2.63635671491352433e-02\n3.08638457527559695e-02\n3.40638849049111972e-02\n3.56165174143188643e-02\n3.49094589065084490e-02\n3.11801542818384951e-02\n2.36780822880769994e-02\n1.19134788091814388e-02\n-4.00098765748477074e-03\n-2.29548613155728352e-02\n-4.24983131672848000e-02\n-5.87437035094624943e-02\n-6.67629799171341742e-02\n-6.17165632545671125e-02\n-4.07698738390611867e-02\n-5.44855015853582762e-03\n3.65116832052594653e-02\n7.13124284833131367e-02\n8.27371027363383582e-02\n5.96423954525548833e-02\n5.05189253020528820e-03\n-5.86416553390177869e-02\n-9.53263104955296287e-02\n-7.48700693643790521e-02\n5.53353799796657856e-04\n8.37342506047637214e-02\n1.05502784523516135e-01\n3.30742023532358681e-02\n-7.98600905330292821e-02\n-1.18295642232493531e-01\n-2.20763014599580608e-02\n1.12166376762435335e-01\n1.06071661935006473e-01\n-5.85161201359486391e-02\n-1.46133899474192169e-01\n1.12803032574630042e-02\n1.64209463340017237e-01\n-1.18211299922687472e-04\n-1.82088477876205079e-01\n4.80721277291863425e-02\n1.80768950970056214e-01\n-1.73365536963823230e-01\n-4.78114838209530157e-02\n2.48761189732838534e-01\n-2.97594655336260117e-01\n2.29573479722143647e-01\n-1.33440786087198393e-01\n6.21169875307220759e-02\n-2.39008215144795658e-02\n7.74437852588185857e-03\n-2.13783614723054346e-03\n5.06428446028845325e-04\n-1.03377881130271729e-04\n1.82169930550971345e-05\n-2.77042692765746500e-06\n0.0\n5.89321190942827485e-04\n2.28243115808869201e-03\n5.38967686831621183e-03\n1.01157380916070804e-02\n1.65226548270759471e-02\n2.44503824808998578e-02\n3.34096805897992621e-02\n4.24701098249021664e-02\n5.01838424695174035e-02\n5.46082328684290366e-02\n5.35077454087263121e-02\n4.48129950871453339e-02\n2.73686516802979923e-02\n1.88995208827753120e-03\n-2.81369562424709403e-02\n-5.60957839085904630e-02\n-7.30533249145182695e-02\n-7.02604079888623917e-02\n-4.32662669701347896e-02\n3.56349411740134424e-03\n5.46970405307957708e-02\n8.64961064675779101e-02\n7.75396406465775484e-02\n2.36889535148200152e-02\n-5.08736111898242596e-02\n-9.89833470141477101e-02\n-7.87054600381165009e-02\n7.50322829627132412e-03\n9.61196598598973440e-02\n1.01762627474144204e-01\n2.07681777450517734e-03\n-1.10169072452004302e-01\n-9.92776581965772731e-02\n4.39718281150674323e-02\n1.39027676683763229e-01\n2.91343161330420604e-02\n-1.40701156336564936e-01\n-7.48388001148195814e-02\n1.43427095284010486e-01\n8.39585101383138604e-02\n-1.72119922727084651e-01\n-3.52587445105097749e-02\n2.10086244073865419e-01\n-1.16700795176698943e-01\n-1.21052025098123545e-01\n2.79199523450614384e-01\n-2.84129050982552311e-01\n1.99993054559640671e-01\n-1.08803197114991895e-01\n4.80351446516229519e-02\n-1.76731359755679246e-02\n5.50669879003204670e-03\n-1.46789588524806028e-03\n3.36869058448278122e-04\n-6.67918708212224282e-05\n1.14567132482803126e-05\n1.14810961516243933e-02\n1.98858418611969588e-02\n2.56086494824592087e-02\n2.99983126931859072e-02\n3.31605849238615705e-02\n3.47880098536448856e-02\n3.43221026733009499e-02\n3.10567130373556738e-02\n2.42798986978160977e-02\n1.34910773071506736e-02\n-1.29772785121849395e-03\n-1.92055721476146191e-02\n-3.81570505893134224e-02\n-5.47438706419538096e-02\n-6.44899004366931289e-02\n-6.27374449236595966e-02\n-4.62477216652781506e-02\n-1.52978242755636516e-02\n2.44330115288167622e-02\n6.14065474806093081e-02\n8.05843393444162226e-02\n6.92977495722405662e-02\n2.54128974940993832e-02\n-3.62079734953873328e-02\n-8.49740451225213245e-02\n-8.80894104665567168e-02\n-3.36281053854229628e-02\n5.07776704913528651e-02\n1.04298157620521734e-01\n7.45522449548941257e-02\n-2.72039580071367498e-02\n-1.12015753037394444e-01\n-8.36377825668990355e-02\n4.59931116107513069e-02\n1.30166204760340076e-01\n4.39520994770844081e-02\n-1.16164025299888479e-01\n-1.06563598844599650e-01\n8.80100185463980195e-02\n1.38745178482571174e-01\n-8.37854798227057745e-02\n-1.48394354560315855e-01\n1.26527607516939616e-01\n1.12697790967829434e-01\n-2.09028239143496136e-01\n4.64606604307909593e-02\n1.84194140252166322e-01\n-2.94151256515972293e-01\n2.63018419861822117e-01\n-1.70700555370802143e-01\n8.73726944795642640e-02\n-3.66997878410053671e-02\n1.29394222281537553e-02\n-3.88326546625165046e-03\n1.00083882685066215e-03\n-2.22738611798036678e-04\n4.29319086920558791e-05\n0.0\n5.56344292676458981e-04\n2.15471218029347072e-03\n5.08869531943655345e-03\n9.55453633369142928e-03\n1.56194517211770949e-02\n2.31511702512776224e-02\n3.17217631622436977e-02\n4.05050399978477207e-02\n4.82019039235995067e-02\n5.30473059648940010e-02\n5.29687278082030394e-02\n4.59667136337545551e-02\n3.07542697588491856e-02\n7.60413546696597602e-03\n-2.07977586002462654e-02\n-4.88845611126324658e-02\n-6.86683143099029170e-02\n-7.16313911470137510e-02\n-5.21471152169703245e-02\n-1.16488814090869724e-02\n3.84130740041535995e-02\n7.76330602417070331e-02\n8.39607145879076588e-02\n4.65010006907165194e-02\n-2.20976579169720327e-02\n-8.40153593848738250e-02\n-9.41423365223095221e-02\n-3.41193135822641241e-02\n6.01213679272007764e-02\n1.10232583026715930e-01\n5.86633831506934919e-02\n-5.95481821491852109e-02\n-1.22003815270205651e-01\n-4.12148353160955855e-02\n1.02078752462175029e-01\n1.13987703035495186e-01\n-4.82185192976515228e-02\n-1.46755161025452524e-01\n6.79812220484490252e-03\n1.62917352653171088e-01\n-2.35759541047419205e-03\n-1.79632425563535869e-01\n5.61397497652616762e-02\n1.71904292900594474e-01\n-1.79929334322256163e-01\n-2.88387993009615561e-02\n2.33627412883297553e-01\n-2.95450906978809824e-01\n2.37093041940668325e-01\n-1.43037961024789134e-01\n6.91828800571046704e-02\n-2.77243329898469587e-02\n9.38553151128702218e-03\n-2.71698149068672415e-03\n6.77834598638178405e-04\n-1.46431685254883579e-04\n1.11599068720887214e-02\n1.93295257101947331e-02\n2.48956633606216907e-02\n2.91793777418779508e-02\n3.23016352716412394e-02\n3.39901826096088433e-02\n3.37348287286506759e-02\n3.08810828420315389e-02\n2.47547624226266277e-02\n1.48522409606651022e-02\n1.10661656606606093e-03\n-1.57913724796064636e-02\n-3.40863703159021494e-02\n-5.07946083569560947e-02\n-6.18681663437972984e-02\n-6.28852028807791175e-02\n-5.03792359279329333e-02\n-2.36835610530396722e-02\n1.32319172456907257e-02\n5.09141019463981645e-02\n7.58053606260244706e-02\n7.47102728059316212e-02\n4.18437889267633950e-02\n-1.43290805819838614e-02\n-6.94119227171660913e-02\n-9.14267515283176124e-02\n-5.95127332850040325e-02\n1.57135017363593393e-02\n8.71928653982236845e-02\n9.66113646932291875e-02\n2.36269778409197648e-02\n-7.86990123831781269e-02\n-1.11511695977260017e-01\n-2.56217396274066138e-02\n9.89161578411176801e-02\n1.09639426717489233e-01\n-2.91114024499976032e-02\n-1.38396528869704077e-01\n-3.80299481163403202e-02\n1.37462003226177409e-01\n7.69073876552486407e-02\n-1.42394362125509821e-01\n-7.99924988008432203e-02\n1.72700723423984293e-01\n2.47686409675406741e-02\n-2.04999608043320902e-01\n1.28506519401819480e-01\n1.01619817775115764e-01\n-2.67791876783046723e-01\n2.85636752929765370e-01\n-2.08803412912222514e-01\n1.17864459462027185e-01\n-5.40692541756926798e-02\n2.07229856644158099e-02\n-6.74784809834624074e-03\n1.88680917871926306e-03\n-4.56148365246522125e-04\n0.0\n5.26060250407259775e-04\n2.03742258892902067e-03\n4.81222766694652717e-03\n9.03865436736625040e-03\n1.47877720903288584e-02\n2.19508811519084322e-02\n3.01529779291645206e-02\n3.86587473937127363e-02\n4.63002731401600948e-02\n5.14723327458324748e-02\n5.22560397761501899e-02\n4.67344415254425660e-02\n3.35391992061100166e-02\n1.25985865541647715e-02\n-1.40659430546369608e-02\n-4.18104037579932059e-02\n-6.35669359418571389e-02\n-7.12438538797837695e-02\n-5.85283225868317436e-02\n-2.46232000908402707e-02\n2.25439400305590676e-02\n6.59881642267077378e-02\n8.45031907640602514e-02\n6.30239451843281895e-02\n4.85365411322092894e-03\n-6.23669430523335899e-02\n-9.60139501244531152e-02\n-6.51405921651884434e-02\n1.89290828679532092e-02\n9.55638092286112406e-02\n9.34139759280099846e-02\n-2.04608476060930291e-04\n-1.02681454333844263e-01\n-9.81166047915697920e-02\n2.73472203327797814e-02\n1.28719256570278107e-01\n5.66018035909702996e-02\n-1.09193832070237667e-01\n-1.11220878931288986e-01\n8.35458924245421758e-02\n1.38490850630888479e-01\n-8.44883767983082984e-02\n-1.44169951602483221e-01\n1.30986572268220164e-01\n1.01705510418973424e-01\n-2.09034086795501367e-01\n6.23655811120546605e-02\n1.65968135991627685e-01\n-2.86840778425067444e-01\n2.67516058633000264e-01\n-1.80118137952704260e-01\n9.56388442517452919e-02\n-4.17461173854880574e-02\n1.53358113973062066e-02\n-4.81098893815387185e-03\n1.30099499691111267e-03\n1.08562074672269981e-02\n1.88035029107457979e-02\n2.42212329576007891e-02\n2.84034460637880397e-02\n3.14840809575703401e-02\n3.32221728855658580e-02\n3.31509767029754127e-02\n3.06633223724302531e-02\n2.51215673622623044e-02\n1.60248378310734983e-02\n3.24472005173024637e-03\n-1.26857499301450301e-02\n-3.02848070802616415e-02\n-4.69434015857665352e-02\n-5.90131490174196985e-02\n-6.23386201449775759e-02\n-5.33560063572271689e-02\n-3.07004411421413874e-02\n3.05834870139702923e-03\n4.03358038534093188e-02\n6.91805552905638832e-02\n7.65667538441073270e-02\n5.42952604890201140e-02\n5.65294283143891272e-03\n-5.10765657194494280e-02\n-8.69023584087052353e-02\n-7.62914408584623865e-02\n-1.65353849874353351e-02\n6.06016748861984422e-02\n1.00327086471655696e-01\n6.30110029930879001e-02\n-3.29719832189116213e-02\n-1.07082621529461158e-01\n-7.91360882744687605e-02\n3.84723305608227137e-02\n1.21683990670429329e-01\n5.76274300649529114e-02\n-9.15598347401683638e-02\n-1.19910312359790661e-01\n3.90687342895418427e-02\n1.46816003418445390e-01\n-3.43572671096563581e-03\n-1.61639610126605326e-01\n5.28433248334843602e-03\n1.76985524675511458e-01\n-6.42716770397760429e-02\n-1.62561100587385932e-01\n1.85518016160891003e-01\n1.04129577771824109e-02\n-2.17945313079776604e-01\n2.92191945847724233e-01\n-2.43831396370594922e-01\n1.52502045768869471e-01\n-7.65106800065744330e-02\n3.18666245252746949e-02\n-1.12426249939801062e-02\n3.40290170184374572e-03\n0.0\n4.98185801577370399e-04\n1.92946531282614845e-03\n4.55770353200977280e-03\n8.56339044764985700e-03\n1.40203796723927694e-02\n2.08400276736329451e-02\n2.86931628125567557e-02\n3.69239191158251406e-02\n4.44803139556236848e-02\n4.99009252393504341e-02\n5.14105515496551466e-02\n4.71820164616914006e-02\n3.58037101465363064e-02\n1.69384002746693942e-02\n-7.94152377524295905e-03\n-3.49961406450113172e-02\n-5.80267096671365432e-02\n-6.94838636433984386e-02\n-6.27335627750421204e-02\n-3.53352562158815026e-02\n7.73229453774420400e-03\n5.28138877997623851e-02\n8.04609817981394027e-02\n7.34678706717365043e-02\n2.80594629289491575e-02\n-3.78045861291204863e-02\n-8.73258135067252611e-02\n-8.38402904482974942e-02\n-1.95820087217225339e-02\n6.62361966983832651e-02\n1.04348009429158270e-01\n5.08165260698471566e-02\n-5.78559023271864176e-02\n-1.15313267008394837e-01\n-4.62807127368861093e-02\n8.61570147394924990e-02\n1.17016875489966796e-01\n-1.55336436234951407e-02\n-1.36836095274838782e-01\n-4.54495075788810196e-02\n1.34515304276807801e-01\n7.80722980751495238e-02\n-1.41781879385456860e-01\n-7.54901267138006621e-02\n1.73189346185120857e-01\n1.41485138678269749e-02\n-1.99225908622529341e-01\n1.39342242798664084e-01\n8.24065545208649414e-02\n-2.55564944536671224e-01\n2.86061658144478093e-01\n-2.17035579461025335e-01\n1.26949789704398741e-01\n-6.04079261018275748e-02\n2.40665926421587163e-02\n-8.16878204091875046e-03\n1.05688747696149853e-02\n1.83058280798059671e-02\n2.35829169290626903e-02\n2.76679609578001882e-02\n3.07059549240822315e-02\n3.24838070960345032e-02\n3.25739293323707019e-02\n3.04125020670802174e-02\n2.53969358022515523e-02\n1.70333752420715502e-02\n5.14587094820636963e-03\n-9.86331057020985169e-03\n-2.67463168168444593e-02\n-4.32240267140332132e-02\n-5.60166520916276778e-02\n-6.12491319764857864e-02\n-5.53550153534395975e-02\n-3.64670611148207105e-02\n-6.02331471678376265e-03\n3.00303690130480742e-02\n6.13564668215694428e-02\n7.55600108252294789e-02\n6.30035741759294859e-02\n2.29591489911002318e-02\n-3.18816761873087981e-02\n-7.66806778434090536e-02\n-8.44601296096136739e-02\n-4.30295393681946678e-02\n3.02250883912017071e-02\n8.95514079219147108e-02\n8.68607296199319923e-02\n1.28417853923449322e-02\n-7.95178772161555109e-02\n-1.04742720991451280e-01\n-2.47666847104935535e-02\n8.99861770848735809e-02\n1.08415323754686405e-01\n-9.85964659274667608e-03\n-1.25537145927209437e-01\n-6.72733115842450713e-02\n1.02530863799528291e-01\n1.14768143709574319e-01\n-7.99376873561760265e-02\n-1.37790062204571823e-01\n8.57949355988959633e-02\n1.39590562011389363e-01\n-1.35398064480321434e-01\n-9.04549173192237266e-02\n2.08170353305441175e-01\n-7.74294740393690617e-02\n-1.47611957161454893e-01\n2.78539734594531851e-01\n-2.71048381083876855e-01\n1.89167324346172672e-01\n-1.04053086654946128e-01\n4.71139617866729796e-02\n-1.79942075679393257e-02\n0.0\n4.72528276625846253e-04\n1.83009414598399398e-03\n4.32337747193420677e-03\n8.12556938366547007e-03\n1.33124531155163674e-02\n1.98124812113812214e-02\n2.73362593938243879e-02\n3.52975105526763047e-02\n4.27468127764768779e-02\n4.83519948563949434e-02\n5.04713058426961500e-02\n4.73706045253194027e-02\n3.76234309753197826e-02\n2.06903979466255550e-02\n-2.40759701858073334e-03\n-2.85257787133059437e-02\n-5.22687835644295162e-02\n-6.66894793192846919e-02\n-6.50973858750249906e-02\n-4.38869624020237006e-02\n-5.63170063226118688e-03\n3.90874036676060535e-02\n7.30763229562108735e-02\n7.84939680471616746e-02\n4.65645052228852163e-02\n-1.32118974248540601e-02\n-7.14279063386031865e-02\n-9.08132252048819144e-02\n-5.05891229760422820e-02\n3.05828768340666544e-02\n9.51909158644199810e-02\n8.43900788343688313e-02\n-5.26166644560001600e-03\n-9.79387129285766572e-02\n-9.44514232950457028e-02\n1.78106966201669291e-02\n1.18330770521192688e-01\n7.14439042182913042e-02\n-8.10774144537345087e-02\n-1.24248332012463908e-01\n3.10481403205787633e-02\n1.46518370673491799e-01\n-1.06235384593635312e-03\n-1.60406906353802448e-01\n8.79607273350342146e-03\n1.74140277585474401e-01\n-7.23921891233743758e-02\n-1.52796840116066923e-01\n1.90143464609398127e-01\n-7.39368239671388695e-03\n-2.01846586391608185e-01\n2.87917250343803111e-01\n-2.49811310110749307e-01\n1.61813295832318071e-01\n-8.40851746501379144e-02\n3.63312529148072105e-02\n1.03015209981188252e-02\n1.78427577639794568e-02\n2.29888320926063955e-02\n2.69827140332111678e-02\n2.99788851635912450e-02\n3.17890581636168651e-02\n3.20208296141430010e-02\n3.01498759756526312e-02\n2.56067645949223724e-02\n1.79075280966192879e-02\n6.83980096747545136e-03\n-7.30246444449888111e-03\n-2.34710358930119711e-02\n-3.96759402964966326e-02\n-5.29733730093236432e-02\n-5.97695161414254078e-02\n-5.65610414636684086e-02\n-4.11317309231583259e-02\n-1.40168750492005723e-02\n2.02491359854534737e-02\n5.28721228253365566e-02\n7.23674656270281158e-02\n6.83979736933779253e-02\n3.72534107089725341e-02\n-1.32253219311635369e-02\n-6.27955441226054206e-02\n-8.52841606763343196e-02\n-6.24724303287480728e-02\n4.26153839683277903e-04\n6.91163434082868317e-02\n9.51920094898050656e-02\n5.05710620390214666e-02\n-4.01142422075659033e-02\n-1.03284709623690019e-01\n-7.28890559022355999e-02\n3.56149099221236623e-02\n1.14347592044112295e-01\n6.38837625602642900e-02\n-7.27539811256015662e-02\n-1.22019286712996625e-01\n3.28822396196978839e-03\n1.34755970237986022e-01\n5.16313430388469635e-02\n-1.31978749681132129e-01\n-7.85422953020561421e-02\n1.41597323774295902e-01\n7.06058241226921596e-02\n-1.73625404685927159e-01\n-3.53154786811110417e-03\n1.92952177408089787e-01\n-1.49239738025403024e-01\n-6.36444046484840320e-02\n2.42895378713476939e-01\n-2.85726500799060035e-01\n2.24874143599642223e-01\n-1.36141913512629942e-01\n6.70917688561851189e-02\n0.0\n4.49532323033752625e-04\n1.74103120069165674e-03\n4.11333296855905754e-03\n7.73295794278540741e-03\n1.26770501711246843e-02\n1.88885929236030058e-02\n2.61124567518617318e-02\n3.38227349237601310e-02\n4.11596905671267541e-02\n4.69056254056568547e-02\n4.95400250048050605e-02\n4.74199229301150854e-02\n3.91229173490535639e-02\n2.39569548185284004e-02\n2.57398143236145863e-03\n-2.24754389466420255e-02\n-4.65209947515851166e-02\n-6.32299074075873685e-02\n-6.60324952107221030e-02\n-5.05325544954475167e-02\n-1.73865923905245322e-02\n2.55509680414953699e-02\n6.35241552321272052e-02\n7.90887804741782635e-02\n6.02132579578682076e-02\n9.45862044779815711e-03\n-5.14717695966508265e-02\n-8.80742599925967706e-02\n-7.20332830687353404e-02\n-4.78851180978282723e-03\n7.22783130430580539e-02\n9.83310447946738053e-02\n4.16201287055025931e-02\n-5.89701822870423026e-02\n-1.09543009652237261e-01\n-4.69088345734572365e-02\n7.53553296190931365e-02\n1.15364959104653969e-01\n6.27246333219057348e-03\n-1.21387228887571474e-01\n-7.64527495315466821e-02\n9.64212303300703011e-02\n1.17749674720919600e-01\n-7.71462739480826554e-02\n-1.37112376288230448e-01\n8.76309640962294606e-02\n1.35148674195046753e-01\n-1.39859512837689937e-01\n-7.95021221325787064e-02\n2.07024324593794662e-01\n-9.15038629704845174e-02\n-1.30123145248798117e-01\n2.70584378450316299e-01\n-2.74745269331341191e-01\n1.98564995059466204e-01\n-1.12990252676403252e-01\n1.00918368197406780e-02\n1.74795741134851738e-02\n2.25231545762069711e-02\n2.64468174524104260e-02\n2.94138739859510431e-02\n3.12575813175738557e-02\n3.16158895918006999e-02\n2.99986687386897544e-02\n2.58656817526480218e-02\n1.87430027216221179e-02\n8.38969771317766948e-03\n-4.98950309372988773e-03\n-2.05139479452407514e-02\n-3.64408276198038006e-02\n-5.01214099434260513e-02\n-5.82243401874891209e-02\n-5.73415317280593778e-02\n-4.50168455408467352e-02\n-2.10714964590868331e-02\n1.11508297523097814e-02\n4.42624566276173387e-02\n6.78032213550709001e-02\n7.12373174806077147e-02\n4.87165161220861898e-02\n4.04290784527162796e-03\n-4.70626613534998739e-02\n-8.05890608874132303e-02\n-7.50349778859097649e-02\n-2.60792147095413387e-02\n4.36797146084475646e-02\n9.07248168239766922e-02\n7.65168712104214582e-02\n1.36550679675702781e-03\n-8.17063255463320037e-02\n-9.84487930362530350e-02\n-2.12237015313558389e-02\n8.48922170591208530e-02\n1.05638232783521954e-01\n1.97858972758764009e-03\n-1.13287871653205724e-01\n-8.36325326205343417e-02\n7.09997834705085873e-02\n1.28233551232474652e-01\n-2.37394300303912474e-02\n-1.46918491139093943e-01\n-1.08738000394920402e-03\n1.60255440518513453e-01\n-1.20662122237154487e-02\n-1.72503366134602709e-01\n8.00614402775399747e-02\n1.44694378058369127e-01\n-1.94977226507885709e-01\n2.30051183716755842e-02\n1.89162558396185870e-01\n-2.86927926366653763e-01\n2.58409170156010060e-01\n-1.73045604219878829e-01\n0.0\n4.32141635128219475e-04\n1.67367735605443587e-03\n3.95452391129095648e-03\n7.43633988934800164e-03\n1.21978260320227769e-02\n1.81941205352990631e-02\n2.51981834225660783e-02\n3.27333430194295602e-02\n4.00129621488862566e-02\n4.59128653812630114e-02\n4.90122056119832658e-02\n4.77442730875575899e-02\n4.06931167980901717e-02\n2.70455275804567553e-02\n7.15268000109810839e-03\n-1.69295772476097013e-02\n-4.11530269309375030e-02\n-5.97476598423922062e-02\n-6.63358354839703040e-02\n-5.59781017892864302e-02\n-2.78138230925889622e-02\n1.26376757247921769e-02\n5.29792186504777357e-02\n7.67234981731595017e-02\n6.98550770020290868e-02\n2.94655303845471825e-02\n-2.99639409714241370e-02\n-7.84949014624512498e-02\n-8.44313263109446321e-02\n-3.60404324152366895e-02\n4.20723224299280121e-02\n9.54330420397707657e-02\n7.58879606616588431e-02\n-1.17870554587424861e-02\n-9.60962520358222966e-02\n-9.09427301021575457e-02\n1.28558176672501166e-02\n1.10797028998485120e-01\n8.01775652512885101e-02\n-5.91376338860561818e-02\n-1.26975388092868596e-01\n-9.03183486498496460e-03\n1.33818391044960877e-01\n5.90050370908928520e-02\n-1.30857878463459337e-01\n-8.13397847387001827e-02\n1.42867806747610238e-01\n6.88936176889449331e-02\n-1.76317635488693725e-01\n3.62371602748654334e-03\n1.91624792813128830e-01\n-1.58506207344714767e-01\n-5.27586104450799287e-02\n2.41721595614366597e-01\n-2.96211745418213601e-01\n2.40681142359580741e-01\n1.00504162701173187e-02\n1.74078316170600857e-02\n2.24328376106099001e-02\n2.63508489720547731e-02\n2.93358141938203677e-02\n3.12384362674332020e-02\n3.17194357166977123e-02\n3.03133934931694264e-02\n2.65000653632143403e-02\n1.98099299400910471e-02\n9.97585044546644463e-03\n-2.87132496917822614e-03\n-1.79862786832378357e-02\n-3.38240174227084911e-02\n-4.79714461671893813e-02\n-5.73073428595097037e-02\n-5.85009560903319709e-02\n-4.89036952778501288e-02\n-2.77544494375511208e-02\n2.59455588650579988e-03\n3.59700137364846670e-02\n6.28840677157340433e-02\n7.28341805965561778e-02\n5.83975625043400282e-02\n2.00462350921446729e-02\n-3.06510270344028043e-02\n-7.24331799947979527e-02\n-8.23299715094987505e-02\n-4.88005913935100899e-02\n1.63674228109996281e-02\n7.72341316979026499e-02\n9.10585463722405203e-02\n3.93269034181979796e-02\n-4.80391518025761466e-02\n-1.02349761801670047e-01\n-6.82404741348165561e-02\n3.54195871541661406e-02\n1.11006730507426751e-01\n6.89292661332625567e-02\n-5.92187970806051928e-02\n-1.22690366676384707e-01\n-2.41231055804681238e-02\n1.18138940735184314e-01\n8.90444328237205429e-02\n-9.03519786123385266e-02\n-1.25767249659304636e-01\n7.29933893517518834e-02\n1.42981067205651069e-01\n-8.74312607609482040e-02\n-1.39569084780764852e-01\n1.44222182921150993e-01\n8.05503385694961715e-02\n-2.14528970071103997e-01\n9.69658185585974275e-02\n1.37632776725005707e-01\n-2.93162348028461917e-01\n3.04525734067743525e-01\n0.0\n4.24214401530908472e-04\n1.64297531235055479e-03\n3.88228561905812819e-03\n7.30233810352408884e-03\n1.19847007298782039e-02\n1.78947898394632883e-02\n2.48270872403522011e-02\n3.23413183169549770e-02\n3.97037562076782286e-02\n4.58565067255851527e-02\n4.94468937626357172e-02\n4.89550608180764346e-02\n4.29544512954154328e-02\n3.05188600642072941e-02\n1.17435859536552251e-02\n-1.17255127067650185e-02\n-3.63520382446760465e-02\n-5.68312405756624534e-02\n-6.69520937075161887e-02\n-6.13376303736791056e-02\n-3.78630158160435798e-02\n-3.33793308002869297e-05\n4.19242207447618684e-02\n7.26876884962330549e-02\n7.70136630906529673e-02\n4.76036248056261116e-02\n-7.63586980522124904e-03\n-6.41511559538468501e-02\n-8.96147658317163198e-02\n-6.25631375349620794e-02\n8.25211640664702539e-03\n7.95256744113966435e-02\n9.62612931968709201e-02\n3.53695510374930355e-02\n-6.19813780471287351e-02\n-1.09175372222336448e-01\n-5.00073531977307806e-02\n6.83219329002809211e-02\n1.17771582232667413e-01\n2.60069337033117486e-02\n-1.07918192859371986e-01\n-1.01607695979813589e-01\n5.76571235620293443e-02\n1.38685460014602913e-01\n-9.46306522179272275e-03\n-1.53766238360712765e-01\n-1.37159091254314379e-02\n1.67770208610206445e-01\n-2.00795675686850968e-03\n-1.84097467857788716e-01\n7.50342832112844277e-02\n1.62888323399693252e-01\n-2.03942320482307982e-01\n2.46617745405032420e-03\n2.40383012603588825e-01\n-3.52447310957509918e-01\n1.02277156896792530e-02\n1.77149232198938258e-02\n2.28307144728409003e-02\n2.68283595458348040e-02\n2.98962580342827418e-02\n3.18993862191085040e-02\n3.25140633310667601e-02\n3.12899839842484956e-02\n2.77167413799139506e-02\n2.13212400856676552e-02\n1.18080800558826061e-02\n-7.57526963958012056e-04\n-1.57430874401512967e-02\n-3.17630581117979982e-02\n-4.65891539270897395e-02\n-5.72578606451567412e-02\n-6.04807255873823918e-02\n-5.34225743957434662e-02\n-3.48047903196219283e-02\n-6.10833195001598845e-03\n2.75741966087081694e-02\n5.76644814323858737e-02\n7.38017964174957214e-02\n6.73162207794651690e-02\n3.57949534494688137e-02\n-1.30912959900551535e-02\n-6.12021693587179727e-02\n-8.53407410608629929e-02\n-6.84573066617960996e-02\n-1.23963384184002327e-02\n5.61522295663365728e-02\n9.49464504610741111e-02\n7.17742666662815193e-02\n-6.59877137510942943e-03\n-8.65431043714711551e-02\n-9.95790801581983853e-02\n-2.27606303771549397e-02\n8.28710837988773097e-02\n1.10884716953027637e-01\n1.74707565004920511e-02\n-1.04736115268746197e-01\n-1.04218566822424613e-01\n3.76510062332534035e-02\n1.37432489507830102e-01\n3.44044283616761898e-02\n-1.34205482996369391e-01\n-8.38014562643195626e-02\n1.27040548782518359e-01\n1.06561842463032866e-01\n-1.40499687550326546e-01\n-9.77084558315563789e-02\n1.83535525613851308e-01\n2.98383538853869007e-02\n-2.25983945764439365e-01\n1.38846692953755541e-01\n1.43891345165166801e-01\n-3.76378040766049138e-01\n0.0\n4.22776835118871604e-04\n1.63740764157766861e-03\n3.86943469858748749e-03\n7.28001510255021130e-03\n1.19547744033298344e-02\n1.78687622568160578e-02\n2.48346674390447948e-02\n3.24417347708170004e-02\n3.99980676090547077e-02\n4.64968573556015438e-02\n5.06356942870097304e-02\n5.09242291360183993e-02\n4.59137796118900821e-02\n3.45659328159494683e-02\n1.67386588381584524e-02\n-6.29532906869494091e-03\n-3.14653569180928239e-02\n-5.38981742204918887e-02\n-6.75589531011436539e-02\n-6.67125942830901070e-02\n-4.81150294166698411e-02\n-1.34029657542693841e-02\n2.93556770902594771e-02\n6.62898357408149563e-02\n8.15750389703521622e-02\n6.43208658952593992e-02\n1.62227538357541494e-02\n-4.44030733752433515e-02\n-8.70263981828044153e-02\n-8.35309837456934823e-02\n-2.79838261992686917e-02\n5.11338737758169487e-02\n1.00537657257881177e-01\n7.69167874005241281e-02\n-1.21283739654936846e-02\n-9.80769464381869849e-02\n-9.87644222544607070e-02\n1.07012476096798065e-04\n1.07258344631929375e-01\n1.00293554107547395e-01\n-3.01235068465878775e-02\n-1.32447899875133807e-01\n-5.95526593192586898e-02\n1.07885807503139211e-01\n1.20421325475665864e-01\n-6.76368501853175097e-02\n-1.52807532883856262e-01\n4.33707833474218304e-02\n1.71938588866732162e-01\n-5.44894518015649060e-02\n-1.82470712650192657e-01\n1.16969862306176717e-01\n1.56475173596309108e-01\n-2.31807555358440193e-01\n-2.19343934486633460e-02\n3.74645869139151377e-01\n1.05111992055545896e-02\n1.82059310724981688e-02\n2.34657619256436745e-02\n2.75852434075007091e-02\n3.07699456157423772e-02\n3.28988867096461218e-02\n3.36622393801543560e-02\n3.26222032804105513e-02\n2.92753757068053358e-02\n2.31428715915244602e-02\n1.39004870424707331e-02\n1.55000278796857752e-03\n-1.33833525085618361e-02\n-2.96651880274615247e-02\n-4.52437024382902134e-02\n-5.73100266357616725e-02\n-6.26273038505199275e-02\n-5.82011870927924002e-02\n-4.22793155130580939e-02\n-1.55140637071982165e-02\n1.80798916641158464e-02\n5.09259551141400396e-02\n7.30371663927863873e-02\n7.48509193104523185e-02\n5.14054183629647568e-02\n6.50250135280089868e-03\n-4.54592325511767592e-02\n-8.24652153444483949e-02\n-8.37144694372032039e-02\n-4.19921114697336881e-02\n2.68467222196706844e-02\n8.57590565550070127e-02\n9.46180655204220261e-02\n3.87724453362635890e-02\n-5.06721398213688806e-02\n-1.07465470654782486e-01\n-7.76132767672438884e-02\n2.53974248716160936e-02\n1.12441529243222357e-01\n9.02442329133377741e-02\n-3.36269489993391429e-02\n-1.28456478553517051e-01\n-7.03059584034616131e-02\n8.67596184722099623e-02\n1.34509084750002589e-01\n-1.64944055555559174e-02\n-1.54945005529842667e-01\n-4.24205703453623476e-02\n1.57987825424013240e-01\n7.52646416704278315e-02\n-1.70241347719714664e-01\n-7.56073239443136036e-02\n2.05852040145754867e-01\n2.60892419102706843e-02\n-2.57045921172108172e-01\n1.02549447338234748e-01\n3.50965117871455734e-01\n0.0\n4.22133663348441056e-04\n1.63491664802204047e-03\n3.86386095058443126e-03\n7.27142304719047370e-03\n1.19475412974448265e-02\n1.78770696731337629e-02\n2.48909965090072273e-02\n3.26081613980561680e-02\n4.03787441485143547e-02\n4.72478450171173528e-02\n5.19654140948425103e-02\n5.30749030275171757e-02\n4.91128315699288706e-02\n3.89388605795578102e-02\n2.21844481759743313e-02\n-2.46069398638155761e-04\n-2.57611139080297750e-02\n-4.99670191289148455e-02\n-6.71028769316384666e-02\n-7.12225192192271622e-02\n-5.81234976765883371e-02\n-2.76600215021729177e-02\n1.43864307310151464e-02\n5.60724298535915724e-02\n8.18354663992011122e-02\n7.81464667299063692e-02\n4.09369978647474500e-02\n-1.85873893101858589e-02\n-7.43432805929209739e-02\n-9.52473793914702660e-02\n-6.29609358699749072e-02\n1.12910257641857647e-02\n8.44432939099060004e-02\n1.03440154195187275e-01\n4.47737223153685179e-02\n-5.55705784742421063e-02\n-1.15710614600131947e-01\n-7.27334822395762082e-02\n4.63947269032079848e-02\n1.26327787050590556e-01\n7.01841382260229019e-02\n-7.52532872898182686e-02\n-1.37073547799292483e-01\n-1.79935647851542958e-02\n1.37836269167536607e-01\n9.68342502313375708e-02\n-1.05602510588026471e-01\n-1.46073561209219827e-01\n7.63788740079031497e-02\n1.75776932230570893e-01\n-7.36542212202746516e-02\n-1.97313742968600436e-01\n1.13459527315747044e-01\n2.12056063061158762e-01\n-2.09252497935666026e-01\n-3.11834196231429162e-01\n1.08165870082116995e-02\n1.87348782627121020e-02\n2.41498983402564996e-02\n2.84007283018211654e-02\n3.17115488266548756e-02\n3.39767131459998914e-02\n3.49017161078024191e-02\n3.40630109539889481e-02\n3.09662369464148608e-02\n2.51289449779013817e-02\n1.62002332474897037e-02\n4.11973901397419146e-03\n-1.06954768723865855e-02\n-2.71676357763983405e-02\n-4.34349597471054560e-02\n-5.68691138436485250e-02\n-6.43264641996298958e-02\n-6.27098369106032921e-02\n-4.98531768989579002e-02\n-2.56167566371959671e-02\n7.09605547907024049e-03\n4.18707326224891097e-02\n6.94213610176876300e-02\n7.97585928429312974e-02\n6.58193678395980614e-02\n2.76540123458556344e-02\n-2.46835402532930293e-02\n-7.19083494303006110e-02\n-9.16380091959090037e-02\n-6.92266947407405298e-02\n-8.98698278343409811e-03\n6.15910155952996974e-02\n1.01448560053542469e-01\n7.95403632209164685e-02\n9.64742397911617054e-04\n-8.49890406457410319e-02\n-1.11199691169744513e-01\n-4.60081635200273176e-02\n6.59778263460014391e-02\n1.24255316858201431e-01\n6.08563426374893468e-02\n-7.39068835597835316e-02\n-1.35104712464671289e-01\n-3.62779401660495784e-02\n1.18456047158725597e-01\n1.23980020129978372e-01\n-5.11290375368715147e-02\n-1.64034686824278242e-01\n-1.95087509017566225e-02\n1.74309121476775492e-01\n7.08442334875470231e-02\n-1.82855696485446223e-01\n-9.94263365179558767e-02\n2.12018221763590087e-01\n1.13387405742564090e-01\n-2.84795808828039954e-01\n-2.64243666174375336e-01\n0.0\n4.20479350539201477e-04\n1.62850952206243797e-03\n3.84903856613291869e-03\n7.24546534069427355e-03\n1.19119196969235553e-02\n1.78433143608100857e-02\n2.48897902417635694e-02\n3.27015576036255168e-02\n4.06740249845306129e-02\n4.79093328332862514e-02\n5.32176216362091475e-02\n5.51873391367935645e-02\n5.23549236525358008e-02\n4.34950980831090850e-02\n2.80279944579124619e-02\n6.49434802975863007e-03\n-1.90132683298543451e-02\n-4.46440794520583384e-02\n-6.50347090798166494e-02\n-7.42132616811363582e-02\n-6.72311641795117071e-02\n-4.23076541864854661e-02\n-2.86946309476694954e-03\n4.15201058930915190e-02\n7.64731942104215079e-02\n8.70134250456211511e-02\n6.42027868088494852e-02\n1.18255733170076656e-02\n-5.07879122023672455e-02\n-9.37138221799676402e-02\n-9.01880118422043464e-02\n-3.44084787258252117e-02\n4.74260577123478827e-02\n1.04830793299602765e-01\n9.28458802393198751e-02\n9.59998143834907801e-03\n-8.83763526429431623e-02\n-1.18485859103275443e-01\n-4.25063847249504967e-02\n8.13397734193232885e-02\n1.31397372945438407e-01\n4.11020399545507578e-02\n-1.05089638733888449e-01\n-1.34124984108945633e-01\n1.01876293840028505e-02\n1.53909749218595182e-01\n8.55605071222042823e-02\n-1.22589359193132921e-01\n-1.52513978172096887e-01\n7.74043992605613629e-02\n1.96462877533779307e-01\n-4.13900978388955718e-02\n-2.38908069606437345e-01\n1.14629667339448422e-02\n3.23940213008890754e-01\n2.14329802766989902e-01\n1.11355149172701964e-02\n1.92872776051531240e-02\n2.48644637794182347e-02\n2.92529387160411804e-02\n3.26968390347937496e-02\n3.51073516349864265e-02\n3.62071709500094083e-02\n3.55893374273398982e-02\n3.27713165491940600e-02\n2.72702070161639012e-02\n1.87114995243828977e-02\n6.97497734559303015e-03\n-7.63050147687275183e-03\n-2.41887720637505542e-02\n-4.10420571376772375e-02\n-5.57705959781769692e-02\n-6.53707491037518601e-02\n-6.67087844643508981e-02\n-5.72817165517608418e-02\n-3.62189339353583550e-02\n-5.31007589957895910e-03\n3.03241228490082788e-02\n6.24194028166741854e-02\n8.10731599030661415e-02\n7.77077305377566196e-02\n4.89864749687106971e-02\n3.22239494247264740e-04\n-5.30752798041455032e-02\n-8.95979452056517578e-02\n-8.96511718642300920e-02\n-4.68010105367254736e-02\n2.39079264716892601e-02\n8.75140605113042397e-02\n1.04662871364858759e-01\n5.68082678396558266e-02\n-3.36403258008172446e-02\n-1.07275855236170906e-01\n-1.04123503931065189e-01\n-1.49536428714917586e-02\n9.47880956028121086e-02\n1.25469363059514172e-01\n3.46375095309898393e-02\n-1.00352126054129728e-01\n-1.35508260744102854e-01\n-1.41987476576793531e-02\n1.35897566513661944e-01\n1.21255529249782057e-01\n-6.33302045708657030e-02\n-1.74232204478877911e-01\n-2.87456030358722789e-02\n1.80635671554628785e-01\n1.11486748512364245e-01\n-1.65181667443544233e-01\n-1.90350378694308403e-01\n1.33460417935118814e-01\n3.28642592801066891e-01\n1.66776569818204851e-01\n0.0\n4.17823309173651850e-04\n1.61822271808682622e-03\n3.82505083418802159e-03\n7.20228137591461155e-03\n1.18480757729200990e-02\n1.77675709798077695e-02\n2.48307487863325231e-02\n3.27207068266942985e-02\n4.08808877084981467e-02\n4.84752319347155416e-02\n5.43816686088539267e-02\n5.72450601600451164e-02\n5.56176742175814934e-02\n4.82091651194639856e-02\n3.42489026252705553e-02\n1.39272539493407697e-02\n-1.11708989612251553e-02\n-3.77892928683016271e-02\n-6.10792613294913883e-02\n-7.52375769136607586e-02\n-7.48204504971562850e-02\n-5.66410860573408684e-02\n-2.18279573491329815e-02\n2.27504851608620121e-02\n6.47229956409490631e-02\n8.89829073236729495e-02\n8.30688449725377476e-02\n4.38208407685879778e-02\n-1.76478279485270187e-02\n-7.64702693087721957e-02\n-1.02676446281182637e-01\n-7.67212111539369440e-02\n-4.97470235351007116e-03\n7.58508313601712753e-02\n1.14183256706590130e-01\n7.65721108900636466e-02\n-2.07304111114581281e-02\n-1.09834775311740351e-01\n-1.14566466986464971e-01\n-1.79902381874394134e-02\n1.03717653311364705e-01\n1.32378865681037544e-01\n2.37128681078072646e-02\n-1.21139878155424041e-01\n-1.36409441671785259e-01\n1.65521601973351619e-02\n1.62981613077338300e-01\n1.00266811801367109e-01\n-1.14254030462308059e-01\n-1.82222667281063566e-01\n2.71605983636034332e-02\n2.24901471886450655e-01\n8.60427660460936911e-02\n-2.29695795764499611e-01\n-3.05887609010333406e-01\n-1.24663406734410773e-01\n1.14764153172317741e-02\n1.98777344182071262e-02\n2.56283004557102193e-02\n3.01641067136790425e-02\n3.37508495234629183e-02\n3.63180975359617617e-02\n3.76075863258034521e-02\n3.72312246385929149e-02\n3.47210998987545899e-02\n2.95971622228017768e-02\n2.14649171599176659e-02\n1.01476472989184899e-02\n-4.15225380437903371e-03\n-2.06826914393245798e-02\n-3.80007828081843982e-02\n-5.39205633640166757e-02\n-6.56243238979233035e-02\n-7.00121131970524863e-02\n-6.43338331080085951e-02\n-4.70755428156906172e-02\n-1.89523132261620458e-02\n1.62889492125012567e-02\n5.16832154733450969e-02\n7.79313953535635262e-02\n8.56310927577225434e-02\n6.86742516839440598e-02\n2.79283560629702832e-02\n-2.64141819436403344e-02\n-7.57593913321782525e-02\n-9.86266888360013277e-02\n-8.01667482945332549e-02\n-2.22283050053037751e-02\n5.19485683221843006e-02\n1.04212041698874144e-01\n1.00356663330738907e-01\n3.39523518643245481e-02\n-6.04195856703549430e-02\n-1.20076601187529289e-01\n-9.47665338262844853e-02\n8.03045447374702188e-03\n1.12669703408188770e-01\n1.25427166354106029e-01\n2.05914000756056911e-02\n-1.14003309923831925e-01\n-1.40276170005779660e-01\n-1.28671024519150957e-02\n1.41763147761375469e-01\n1.37451017160817757e-01\n-4.44566202934016455e-02\n-1.87028129757348227e-01\n-8.51913264083111743e-02\n1.53987859005322109e-01\n2.02813168539612315e-01\n-4.14776617296916950e-02\n-2.87581907676245252e-01\n-2.65096172071222325e-01\n-8.95788192309505682e-02\n0.0\n4.14226189913043531e-04\n1.60429113509616829e-03\n3.79245033643250181e-03\n7.14289553312880045e-03\n1.17576363877507153e-02\n1.76521178918093054e-02\n2.47166818546264433e-02\n3.26685479002566531e-02\n4.10015990619194970e-02\n4.89458669737094787e-02\n5.54542714700627035e-02\n5.92394805351422471e-02\n5.88863530790655412e-02\n5.30618371659019455e-02\n4.08302062506493563e-02\n2.20533358806279355e-02\n-2.18777967106274524e-03\n-2.92681095462395957e-02\n-5.49583904899321740e-02\n-7.38184040610439934e-02\n-8.01882760537383082e-02\n-6.97792861895863148e-02\n-4.16117080745772028e-02\n2.78745894801896046e-04\n4.62262031732494916e-02\n8.23155674962927353e-02\n9.42485380422271868e-02\n7.31921945171326027e-02\n2.17002754707385503e-02\n-4.34343707644027355e-02\n-9.46201629697511482e-02\n-1.04413819083423731e-01\n-6.09716549657357831e-02\n1.98474786566379159e-02\n9.56663955912023523e-02\n1.17568587908851774e-01\n6.25705150876019189e-02\n-4.14885886037042809e-02\n-1.22875712562631176e-01\n-1.12786609221513734e-01\n-6.37293371663376091e-03\n1.14872097372237955e-01\n1.38283164283736743e-01\n2.62603070334349112e-02\n-1.23571504305879473e-01\n-1.52084013959296799e-01\n-8.61700122825868886e-03\n1.60424504194009498e-01\n1.48568413303864860e-01\n-5.64074386839877040e-02\n-2.15389258034654807e-01\n-1.12080825655411331e-01\n1.59305328060497325e-01\n3.05292086058651657e-01\n2.15772818823381257e-01\n6.18955548396092764e-02\n1.18470982838528860e-02\n2.05197761498952524e-02\n2.64588705461093372e-02\n3.11548858542280115e-02\n3.48969775482648112e-02\n3.76347755531436443e-02\n3.91309807217289293e-02\n3.90187452956970784e-02\n3.68477455758449840e-02\n3.21444267742252987e-02\n2.44985670274490488e-02\n1.36813878448872901e-02\n-2.07752417565761034e-04\n-1.65809146956899973e-02\n-3.42181069852509831e-02\n-5.11895941683057284e-02\n-6.49083340132579761e-02\n-7.23816173665082774e-02\n-7.07136926030571128e-02\n-5.78601828139135993e-02\n-3.35439342990627096e-02\n-1.17664060389929132e-04\n3.69682903941834923e-02\n6.95053680180166972e-02\n8.80173653696326164e-02\n8.44610331886228166e-02\n5.56713527432647834e-02\n6.42511860913938786e-03\n-4.95252264016994501e-02\n-9.20527991150062036e-02\n-1.01478972040359064e-01\n-6.81251237498136375e-02\n-5.69635575513978247e-04\n7.29496069933019131e-02\n1.14225308971113299e-01\n9.48516299894040238e-02\n1.72391765256158583e-02\n-7.77105455508951826e-02\n-1.28131970475315188e-01\n-9.12233185313638395e-02\n1.77178967358603556e-02\n1.21707230378260131e-01\n1.32045981147007441e-01\n2.60761420883119585e-02\n-1.13734089592665039e-01\n-1.55125404080464463e-01\n-4.15485626380895021e-02\n1.27903541064698228e-01\n1.73381522155531959e-01\n2.49517118013282205e-02\n-1.71596873497933622e-01\n-1.90823418811463918e-01\n1.38183597397164917e-02\n2.43762359635423920e-01\n2.89329356794588266e-01\n1.65829632226493801e-01\n4.11231850844761826e-02\n0.0\n4.09626817602531913e-04\n1.58647784273454923e-03\n3.75067440847466887e-03\n7.06623247342408507e-03\n1.16387749851866243e-02\n1.74940564118984607e-02\n2.45431671366282134e-02\n3.25384923421288969e-02\n4.10265168503926858e-02\n4.93074046926558762e-02\n5.64161432037800434e-02\n6.11448587575027236e-02\n6.21288750122276565e-02\n5.80174789889372072e-02\n4.77407560154443564e-02\n3.08628723442947034e-02\n7.97805272002671470e-03\n-1.89395414344789188e-02\n-4.63676560958065365e-02\n-6.94154941146121751e-02\n-8.25038316129118876e-02\n-8.06118584991326187e-02\n-6.09767396802095851e-02\n-2.48695379139438795e-02\n2.12078708510185406e-02\n6.57238620365493131e-02\n9.44036348414366566e-02\n9.47052182063467390e-02\n6.15427636864510977e-02\n2.08432315172788450e-03\n-6.33322334761616951e-02\n-1.06615149683986554e-01\n-1.03714631214529063e-01\n-4.88622365949341539e-02\n3.64720800103989010e-02\n1.08214247720826523e-01\n1.20917048433404048e-01\n5.77396340472322231e-02\n-4.95447339997934499e-02\n-1.30507440309762246e-01\n-1.20296103851563488e-01\n-1.40722468743946054e-02\n1.13143450278071961e-01\n1.53141552997506786e-01\n5.71784298223264875e-02\n-1.02437688095024362e-01\n-1.77010424862076715e-01\n-7.87841891458697929e-02\n1.13485117941734159e-01\n2.09245633231994743e-01\n9.53717077885985892e-02\n-1.36770735456275910e-01\n-2.84676493018698573e-01\n-2.50714910109354039e-01\n-1.20745030225959685e-01\n-2.62637771730362471e-02\n1.22557537859032985e-02\n2.12275882422391336e-02\n2.73744935061958107e-02\n3.22469810160428763e-02\n3.61599171258082594e-02\n3.90848745921099777e-02\n4.08076170104988978e-02\n4.09851206052011738e-02\n3.91879163550381687e-02\n3.49530646202477965e-02\n2.78596442831570042e-02\n1.76324685881810231e-02\n4.27310602424862442e-03\n-1.17922161936702928e-02\n-2.95712225514471704e-02\n-4.74095280166538097e-02\n-6.29933564341042945e-02\n-7.35123841352927077e-02\n-7.60365933440634023e-02\n-6.81283786999222485e-02\n-4.86458108076045018e-02\n-1.85956137631840129e-02\n1.82185711234956922e-02\n5.50973328427085962e-02\n8.32479346903386708e-02\n9.36946460891161514e-02\n8.01587922492206922e-02\n4.22500456258580528e-02\n-1.22403936353931170e-02\n-6.74515365405372463e-02\n-1.03157911294315396e-01\n-1.02058049639525583e-01\n-5.86580726206460470e-02\n1.42782782798635908e-02\n8.65223635115823508e-02\n1.21321326670262131e-01\n9.43301588246918676e-02\n1.18160209607171517e-02\n-8.45383928543823743e-02\n-1.35354345110256596e-01\n-1.00039051069375287e-01\n8.58405974019705795e-03\n1.20167902446927322e-01\n1.48410368795649311e-01\n5.89321532449585961e-02\n-8.86551308588406639e-02\n-1.72744045509974242e-01\n-1.08697505909906525e-01\n6.35834163344554809e-02\n1.95706986538862537e-01\n1.58237661606845631e-01\n-3.31697978633989712e-02\n-2.27472101429730039e-01\n-2.84446676995888770e-01\n-2.01245191911329335e-01\n-8.34704126358166848e-02\n-1.61152729522363349e-02\n0.0\n4.03892951813588383e-04\n1.56427067602458243e-03\n3.69850937532775368e-03\n6.96998845875094510e-03\n1.14876347852293122e-02\n1.72874167618877299e-02\n2.43014270184098713e-02\n3.23180769140115620e-02\n4.09383905332691977e-02\n4.95364872649000434e-02\n5.72364084380722893e-02\n6.29216833484461113e-02\n6.52971089297325474e-02\n6.30220894405016108e-02\n5.49288652980021927e-02\n4.03241975073250214e-02\n1.93475600162311030e-02\n-6.67685726552630105e-03\n-3.49978194626922590e-02\n-6.14417873766985589e-02\n-8.08098492267206037e-02\n-8.77693020145256519e-02\n-7.82278036073638244e-02\n-5.09864775583519503e-02\n-9.22878070279933849e-03\n3.88075385441296675e-02\n8.06802405875710338e-02\n1.02568308519756096e-01\n9.38821903019243509e-02\n5.24930872372184956e-02\n-1.15674219469065268e-02\n-7.65012180665975428e-02\n-1.14985113588277052e-01\n-1.05644932545406758e-01\n-4.57186604940837960e-02\n4.19839940608454365e-02\n1.14580032693468642e-01\n1.28865047908177904e-01\n6.80618992329905387e-02\n-4.02150435340270715e-02\n-1.31254806155067877e-01\n-1.39930960609603916e-01\n-4.88610403799713058e-02\n8.69893651424965553e-02\n1.67860668901324450e-01\n1.21677043994418865e-01\n-2.97244373818744620e-02\n-1.72624567355762315e-01\n-1.85965581200989299e-01\n-4.48362886239339065e-02\n1.53258058162290184e-01\n2.72248773106658126e-01\n2.53758338620060475e-01\n1.50786620144804040e-01\n5.48496267347126573e-02\n9.49284259080902283e-03\n1.27128647034233169e-02\n2.20193275760782320e-02\n2.83986199640574449e-02\n3.34681876114134025e-02\n3.75713228577906136e-02\n4.07036994551629311e-02\n4.26764845405459073e-02\n4.31733407522007853e-02\n4.17893077920660633e-02\n3.80767654471938430e-02\n3.16100275943787257e-02\n2.20745473698360888e-02\n9.38143035332139781e-03\n-6.19941830389921476e-03\n-2.39044158781718252e-02\n-4.23692378162334599e-02\n-5.95921459673901324e-02\n-7.30196598220030635e-02\n-7.98060006970898739e-02\n-7.72795969583362913e-02\n-6.36069831557337373e-02\n-3.85737712217497780e-02\n-4.31073471336817105e-03\n3.42977509471879966e-02\n6.98358939679493973e-02\n9.34785658140279280e-02\n9.70939494409918114e-02\n7.60553332046566971e-02\n3.20275063226954926e-02\n-2.54260437217324053e-02\n-7.96916052275686709e-02\n-1.11234096552868866e-01\n-1.04657499913614255e-01\n-5.66412261713734322e-02\n1.88717608299504049e-02\n9.22135412870615651e-02\n1.28349569510393974e-01\n1.03852552180474914e-01\n2.30501569821731679e-02\n-7.70826533706531064e-02\n-1.40880200358003554e-01\n-1.24507141862979787e-01\n-2.76974383164536909e-02\n9.59129481601821154e-02\n1.64769200420166018e-01\n1.23049752789310490e-01\n-1.25384084664804871e-02\n-1.52737997141616344e-01\n-1.93557229128204805e-01\n-9.46080345112769727e-02\n8.59820615553563983e-02\n2.35107952828615019e-01\n2.72736463661959305e-01\n2.06343564706596122e-01\n1.05955472148694607e-01\n3.42778867021686640e-02\n5.36291461660527106e-03\n0.0\n3.96831468480555180e-04\n1.53692166867622367e-03\n3.63418345323730059e-03\n6.85080441373983866e-03\n1.12986066984428202e-02\n1.70235558999189927e-02\n2.39788398081004529e-02\n3.19895430737527492e-02\n4.07129028373604263e-02\n4.96005428786670810e-02\n5.78723754304962673e-02\n6.45154612070237277e-02\n6.83240887645661099e-02\n6.79982027476352530e-02\n6.23140772438084897e-02\n5.03715185888808509e-02\n3.19039605733626372e-02\n7.61108366139901914e-03\n-2.05595152797363560e-02\n-4.92875550179095318e-02\n-7.40373844899473166e-02\n-8.96109195394404617e-02\n-9.11483146247699383e-02\n-7.55049156835697066e-02\n-4.27533657732930630e-02\n2.63865856895496376e-03\n5.15453410046395888e-02\n9.13998244070404753e-02\n1.09160768989485207e-01\n9.56868188145878068e-02\n5.03503658266375997e-02\n-1.60258622718026829e-02\n-8.20266367981600103e-02\n-1.21590406438373377e-01\n-1.14313186949316470e-01\n-5.66293067218748974e-02\n3.17986008987879015e-02\n1.11997601151901105e-01\n1.41654272053858027e-01\n9.80234696732287802e-02\n-4.06899600723552995e-03\n-1.12519684997733710e-01\n-1.62401510457407861e-01\n-1.15247414026832973e-01\n1.03726637833722116e-02\n1.41479004311301809e-01\n1.92373799993639627e-01\n1.21777788740034754e-01\n-3.58986804673673762e-02\n-1.92480786049017361e-01\n-2.67484843843871223e-01\n-2.40769656988938430e-01\n-1.54690506830215263e-01\n-7.00191115870715530e-02\n-2.03717057109983335e-02\n-2.90210242796733924e-03\n1.32330615136991899e-02\n2.29203348814113125e-02\n2.95639784504235399e-02\n3.48572958214713804e-02\n3.91753645021100938e-02\n4.25404980197322674e-02\n4.47919354144447196e-02\n4.56432548598263155e-02\n4.47181443099600243e-02\n4.15897132867775049e-02\n3.58345151150856814e-02\n2.71073231420870565e-02\n1.52385514480971873e-02\n3.50698052567110423e-04\n-1.70175355062090784e-02\n-3.58006832079576370e-02\n-5.43416784980562950e-02\n-7.04143390303408889e-02\n-8.13785076557048404e-02\n-8.45056198865777181e-02\n-7.74875838155117125e-02\n-5.90954053756376496e-02\n-2.98868575396040934e-02\n7.21521878365456552e-03\n4.67179903277230441e-02\n8.09891213810172150e-02\n1.01513195411652130e-01\n1.00970313439157952e-01\n7.58159530872166976e-02\n2.86614394830025515e-02\n-3.05504087158432677e-02\n-8.56093386915469795e-02\n-1.17932008756141682e-01\n-1.12881540947651307e-01\n-6.67440421757365260e-02\n8.60754448073763195e-03\n8.65797351806622956e-02\n1.34045169014822219e-01\n1.25429459760363765e-01\n5.72965192595516204e-02\n-4.45547774404685890e-02\n-1.32178414849713155e-01\n-1.57180637525035777e-01\n-9.82155426353511496e-02\n2.14007823766818768e-02\n1.39923828680422024e-01\n1.88717369387653877e-01\n1.32973701178174863e-01\n-4.71739658498947743e-03\n-1.56416852837961390e-01\n-2.50775845684239163e-01\n-2.55821614086024107e-01\n-1.91821499722645561e-01\n-1.07625769399407628e-01\n-4.35791394936867332e-02\n-1.15071317057407110e-02\n-1.50201850428560843e-03\n0.0\n3.88170847198040364e-04\n1.50337922668123433e-03\n3.55520605634144235e-03\n6.70396111436047729e-03\n1.10638197582037245e-02\n1.66903705957320812e-02\n2.35577859993479702e-02\n3.15282023896888072e-02\n4.03164046297909626e-02\n4.94546898803341281e-02\n5.82653399137596506e-02\n6.58510592440644804e-02\n7.11164120684462941e-02\n7.28347162182669261e-02\n6.97736237556035727e-02\n6.08870401553009422e-02\n4.55694614972953355e-02\n2.39502890660437152e-02\n-2.81908723681079196e-03\n-3.23601532545319606e-02\n-6.10417145959543800e-02\n-8.42384529008882166e-02\n-9.69548416524844969e-02\n-9.48290971791592857e-02\n-7.54166821044948976e-02\n-3.95005225949451311e-02\n7.97804247248256812e-03\n5.78633779467033066e-02\n9.80448955005905204e-02\n1.16198363340879046e-01\n1.03667988641371236e-01\n5.94965501601061875e-02\n-6.95447845112283011e-03\n-7.64912000477025733e-02\n-1.24755184001842045e-01\n-1.30651078598361114e-01\n-8.60636619160378286e-02\n-2.65656445511589304e-03\n8.86882682703790115e-02\n1.48026252828819177e-01\n1.43832669649165412e-01\n7.05104113560541534e-02\n-4.38747581181471169e-02\n-1.46598418618377385e-01\n-1.84616692991159431e-01\n-1.32767211863583895e-01\n-9.31955258955632568e-03\n1.32340868726239541e-01\n2.32695252274998682e-01\n2.58104526056886108e-01\n2.15226630114195239e-01\n1.39681637193725477e-01\n6.97580990621711194e-02\n2.55567742519898500e-02\n6.17128249627522593e-03\n7.42159828963635197e-04\n1.38379722181736064e-02\n2.39680709556032850e-02\n3.09189489454134436e-02\n3.64716362158168522e-02\n4.10372952232002167e-02\n4.46679612159705045e-02\n4.72340649207946203e-02\n4.84828143690765601e-02\n4.80713027440525242e-02\n4.55996487099660508e-02\n4.06549381708617430e-02\n3.28718907107520414e-02\n2.20129209824381361e-02\n8.06631224503727082e-03\n-8.64430571148584737e-03\n-2.73532739761662494e-02\n-4.67716727931230883e-02\n-6.50625915637661756e-02\n-7.99096288546836814e-02\n-8.87146080421199190e-02\n-8.89488985674322108e-02\n-7.86561938596783833e-02\n-5.70612472284080866e-02\n-2.51818456759011385e-02\n1.37193131919439402e-02\n5.40504653455113615e-02\n8.83820912298255990e-02\n1.08647366995489991e-01\n1.08016994059236024e-01\n8.31577086726731640e-02\n3.62917065859422600e-02\n-2.37498792063575263e-02\n-8.22993888790371775e-02\n-1.21937390076136451e-01\n-1.27646631989384335e-01\n-9.27911146121766783e-02\n-2.37528609268371459e-02\n5.92655922366100915e-02\n1.26996253044233981e-01\n1.51133032336283224e-01\n1.16608364727940977e-01\n3.08607839510314681e-02\n-7.53459194523724146e-02\n-1.58126758592779054e-01\n-1.78925450053680157e-01\n-1.23077502793716487e-01\n-8.49147781560563412e-03\n1.21593031388818232e-01\n2.19159577169980357e-01\n2.54268172334781495e-01\n2.27096840653980281e-01\n1.62733322376560186e-01\n9.36254000305028339e-02\n4.22004025980350361e-02\n1.41164004694429787e-02\n3.13746181998434456e-03\n3.49325389997553559e-04\n0.0\n3.77520465498970808e-04\n1.46213047572998564e-03\n3.45799455784756050e-03\n6.52267283671754093e-03\n1.07719661538942871e-02\n1.62704990968139708e-02\n2.30130488738023373e-02\n3.08988287509200828e-02\n3.97010512584480418e-02\n4.90353140851808242e-02\n5.83322223261769982e-02\n6.68219114577468798e-02\n7.35403750707598614e-02\n7.73691031423664188e-02\n7.71195897003580100e-02\n7.16716127263941349e-02\n6.01675751896239355e-02\n4.22536250965717397e-02\n1.83415393816260368e-02\n-1.01552288196848795e-02\n-4.06787914540242129e-02\n-6.95595462443870660e-02\n-9.23061977955318413e-02\n-1.04209222697385306e-01\n-1.01254657849321361e-01\n-8.12507701335168364e-02\n-4.49520037436540454e-02\n3.14866195160757971e-03\n5.47494522453916554e-02\n9.87353538496938826e-02\n1.23380255360895003e-01\n1.19528085850947263e-01\n8.40526448392667630e-02\n2.24679369751989190e-02\n-5.06022779016664717e-02\n-1.14064683010279860e-01\n-1.46166053601000323e-01\n-1.32185160225697457e-01\n-7.14025323092344483e-02\n1.98458811100225077e-02\n1.11448425243890717e-01\n1.69252611224931321e-01\n1.68245134083697678e-01\n1.03685125968342534e-01\n-5.45773389666424306e-03\n-1.23433125487030310e-01\n-2.12547798605130789e-01\n-2.48875547449029288e-01\n-2.30834991598574013e-01\n-1.76465254681827999e-01\n-1.11828274802325267e-01\n-5.79794745118241001e-02\n-2.38382128910665167e-02\n-7.33521976456627620e-03\n-1.50892101219485459e-03\n-1.56219032797307760e-04\n1.45615833759114091e-02\n2.52214022457288925e-02\n3.25395525870612393e-02\n3.84012759794440037e-02\n4.32595764424830026e-02\n4.72001114560599497e-02\n5.01282764571998746e-02\n5.18292943462409575e-02\n5.19992374134359697e-02\n5.02726211479759683e-02\n4.62569573974147205e-02\n3.95799185667698311e-02\n2.99521757664400860e-02\n1.72462610578080350e-02\n1.58811531927428103e-03\n-1.65469952419653801e-02\n-3.62486576720020826e-02\n-5.61166981478631449e-02\n-7.42646726273843566e-02\n-8.84111307124410967e-02\n-9.60852401983431220e-02\n-9.49613293781946810e-02\n-8.33134436789786936e-02\n-6.05456243487342838e-02\n-2.77094926590170029e-02\n1.21236374416244866e-02\n5.37989589212828773e-02\n9.04819684174322236e-02\n1.14632164803758152e-01\n1.19526145922781143e-01\n1.01126544230552090e-01\n5.98837173416089177e-02\n1.88743158808711824e-03\n-6.12536394457151648e-02\n-1.14248053281539586e-01\n-1.41678721992851697e-01\n-1.32644198526695178e-01\n-8.51841698471588749e-02\n-8.79689375743089932e-03\n7.64576173443180934e-02\n1.44846346497884942e-01\n1.72898285396457962e-01\n1.47855132116671006e-01\n7.32529523064120308e-02\n-3.11800320026638239e-02\n-1.36005426344070007e-01\n-2.12712131292179363e-01\n-2.44020020729542236e-01\n-2.29187566180647340e-01\n-1.82019003352451220e-01\n-1.23036780802776080e-01\n-7.02503491783008083e-02\n-3.32198357008136394e-02\n-1.25638992189033710e-02\n-3.57852769025406589e-03\n-6.84634783498930385e-04\n-6.61658791012309391e-05\n0.0\n3.64290557407927836e-04\n1.41089126202152129e-03\n3.33714047141831470e-03\n6.29669919964536556e-03\n1.04059942555218988e-02\n1.57377961152184304e-02\n2.23067330655594871e-02\n3.00486341256882422e-02\n3.87953865804985809e-02\n4.82477273913437324e-02\n5.79496497298990221e-02\n6.72697075813491058e-02\n7.53962178896361024e-02\n8.13548353664461099e-02\n8.40576779719953149e-02\n8.23924000256270606e-02\n7.53565136257891011e-02\n6.22360458979526118e-02\n4.28177819932047746e-02\n1.76110508336277359e-02\n-1.19604308004558815e-02\n-4.34508527135900116e-02\n-7.34322635194945700e-02\n-9.77434634251976020e-02\n-1.11988711999443671e-01\n-1.12283550548735025e-01\n-9.61779287254615478e-02\n-6.36038491606419204e-02\n-1.76142336604983574e-02\n3.53693211525684115e-02\n8.60647427682127292e-02\n1.23744033680146470e-01\n1.38483359596790673e-01\n1.23878040831957026e-01\n7.95502508611963394e-02\n1.25933131840731266e-02\n-6.28394072627936479e-02\n-1.28196311223563397e-01\n-1.65133871436461049e-01\n-1.60939622597617515e-01\n-1.13026095104822297e-01\n-3.06926979958816425e-02\n6.69330331133108775e-02\n1.56491072367484524e-01\n2.17708217575133783e-01\n2.39676767453107398e-01\n2.23563543379121626e-01\n1.80713309233182212e-01\n1.27212977553563311e-01\n7.75836635778893169e-02\n4.04397382706731118e-02\n1.76030947646186216e-02\n6.16619944415314723e-03\n1.63434303433262432e-03\n2.92044036996230879e-04\n2.64397663770917540e-05\n1.54616312785753936e-02\n2.67803309423887241e-02\n3.45549271372330574e-02\n4.07991809371122602e-02\n4.60161323876081274e-02\n5.03302921649780230e-02\n5.36868091926925722e-02\n5.59142973408673846e-02\n5.67545303953182409e-02\n5.58852999661455588e-02\n5.29465187149655014e-02\n4.75748458580801184e-02\n3.94499507436959357e-02\n2.83537284800692672e-02\n1.42415230123035114e-02\n-2.67864940969639006e-03\n-2.18668233826558762e-02\n-4.23843005084720767e-02\n-6.28565717156667481e-02\n-8.14868471680736534e-02\n-9.61422870367977245e-02\n-1.04531843972044292e-01\n-1.04485147901665104e-01\n-9.43246868737279143e-02\n-7.32986127487325334e-02\n-4.20110915619276923e-02\n-2.75665621854351414e-03\n4.03565921153321017e-02\n8.16112597684225810e-02\n1.14297597785090466e-01\n1.31756874144189629e-01\n1.28754768202540781e-01\n1.02955716984346510e-01\n5.61477521885922273e-02\n-5.19486037460398925e-03\n-7.03765661173346296e-02\n-1.26148853276509182e-01\n-1.59434691951984231e-01\n-1.60573575016596026e-01\n-1.26225148046257257e-01\n-6.09590217036588000e-02\n2.32152755190406582e-02\n1.09548212388300842e-01\n1.80870050285713402e-01\n2.24227000814069710e-01\n2.34256909270732505e-01\n2.14085795221950592e-01\n1.73452552560716150e-01\n1.24889006113292081e-01\n7.95593846115623948e-02\n4.43850600924092370e-02\n2.13282564106407717e-02\n8.60896694218332530e-03\n2.80904051972709649e-03\n6.96015413783847379e-04\n1.16604517831691450e-04\n9.92071395179884783e-06\n0.0\n3.47523926456357241e-04\n1.34595437957408279e-03\n3.18386669251909463e-03\n6.00942730897812815e-03\n9.93826148831140725e-03\n1.50499322310553001e-02\n2.13776097924576469e-02\n2.88925683011713660e-02\n3.74846914250826710e-02\n4.69405079041345721e-02\n5.69210246195092084e-02\n6.69426419991579619e-02\n7.63656043638207549e-02\n8.43955804094043832e-02\n9.01048187664807709e-02\n9.24795068769665440e-02\n9.04990107706294539e-02\n8.32500779612544983e-02\n7.00743945227036286e-02\n5.07408727572710577e-02\n2.56249232834461077e-02\n-4.13335887175787439e-03\n-3.65298804544733763e-02\n-6.87002104701907729e-02\n-9.70696481202420886e-02\n-1.17681691381909925e-01\n-1.26711776996852155e-01\n-1.21133837742374115e-01\n-9.94572571313720732e-02\n-6.24001570415396584e-02\n-1.33261396745644883e-02\n4.17362256125794126e-02\n9.46314846637767992e-02\n1.36215308517358358e-01\n1.57985785120647315e-01\n1.53929510296766520e-01\n1.22159009091044615e-01\n6.58611201864949258e-02\n-6.84044645359342500e-03\n-8.42642182707567383e-02\n-1.53590500564987104e-01\n-2.03751064009836058e-01\n-2.27980146442811088e-01\n-2.25236474864411951e-01\n-2.00025707006072057e-01\n-1.60689170788687774e-01\n-1.16774989454701938e-01\n-7.64291135320441517e-02\n-4.46765905773169325e-02\n-2.30304750890597265e-02\n-1.02805130170597302e-02\n-3.87102360714136444e-03\n-1.18225557507041089e-03\n-2.74944251690360938e-04\n-4.33310589841459594e-05\n-3.47460910951277432e-06\n1.66474926393813324e-02\n2.88343030700373808e-02\n3.72097008710111851e-02\n4.39550571518483105e-02\n4.96361915258496308e-02\n5.44241080657462961e-02\n5.83102521725165496e-02\n6.11736222782202771e-02\n6.28101861921628868e-02\n6.29520720408591333e-02\n6.12864795457451761e-02\n5.74791831557335958e-02\n5.12055316715256462e-02\n4.21906312372255093e-02\n3.02591407924149083e-02\n1.53934777590681304e-02\n-2.20291437381370204e-03\n-2.20432405239066979e-02\n-4.33049653628283862e-02\n-6.47992973086917445e-02\n-8.49767429259923046e-02\n-1.01983643197914933e-01\n-1.13782730397549353e-01\n-1.18345247536484829e-01\n-1.13912301194455834e-01\n-9.93088055848522361e-02\n-7.42756883384564082e-02\n-3.97675605136682681e-02\n1.85192361046357954e-03\n4.67906396831607660e-02\n9.00488164586673301e-02\n1.25915280102026905e-01\n1.48724260743904046e-01\n1.53791934205229963e-01\n1.38382368800854000e-01\n1.02498808440725203e-01\n4.92808636999624433e-02\n-1.51696865299593038e-02\n-8.26054306052084603e-02\n-1.44006279999365133e-01\n-1.91252731041931884e-01\n-2.18714514065623811e-01\n-2.24338189137570254e-01\n-2.09916563279289758e-01\n-1.80442439025970874e-01\n-1.42726608688473866e-01\n-1.03695912827327416e-01\n-6.88839552006035999e-02\n-4.15360249594175918e-02\n-2.25028884968076631e-02\n-1.08015784170189186e-02\n-4.50666864683502665e-03\n-1.59093726548471055e-03\n-4.56693186097736708e-04\n-1.00037382611995138e-04\n-1.48762969222643410e-05\n-1.12728525972758689e-06\n0.0\n3.25489788650874736e-04\n1.26061653080540982e-03\n2.98230425470891397e-03\n5.63083093444738045e-03\n9.31884191594368506e-03\n1.41305523859276312e-02\n2.01154549063084186e-02\n2.72779655578862558e-02\n3.55638236669085922e-02\n4.48441044728333932e-02\n5.48980485616743230e-02\n6.53964459172077378e-02\n7.58879734054399291e-02\n8.57915992257252680e-02\n9.43988279353817211e-02\n1.00890008949489768e-01\n1.04368963305057683e-01\n1.03919551079807701e-01\n9.86862464541945483e-02\n8.79780899317889331e-02\n7.13914449696429754e-02\n4.89419109657204948e-02\n2.11899685684694208e-02\n-1.06607022720097127e-02\n-4.47175057838702511e-02\n-7.84322402524100654e-02\n-1.08736171836278456e-01\n-1.32289597243273216e-01\n-1.45841666381992946e-01\n-1.46673258995678235e-01\n-1.33069717918838509e-01\n-1.04746523142359244e-01\n-6.31366311852812612e-02\n-1.14507221013190677e-02\n4.55533031037792663e-02\n1.02106403873032811e-01\n1.52218169011303112e-01\n1.90597509024414802e-01\n2.13526403213796123e-01\n2.19490656276547763e-01\n2.09405271004268256e-01\n1.86358337245117855e-01\n1.54918311197397685e-01\n1.20170398323542343e-01\n8.67268590653886562e-02\n5.79610998705996569e-02\n3.56391271788743039e-02\n1.99893905750761318e-02\n1.01133234237543255e-02\n4.54808491559409098e-03\n1.78258033255740671e-03\n5.92485829398133198e-04\n1.60439059558906025e-04\n3.32058972621137205e-05\n4.67218370457695066e-06\n3.35389948118040669e-07\n1.83641016754840236e-02\n3.18075571372990751e-02\n4.10516575645026166e-02\n4.85174970423411650e-02\n5.48564542453365556e-02\n6.02988217261739706e-02\n6.48924528106404330e-02\n6.85768129604752280e-02\n7.12137191653787055e-02\n7.26043512424393300e-02\n7.25026851052343324e-02\n7.06299018241642873e-02\n6.66923215680615272e-02\n6.04044681892446575e-02\n5.15181902740078981e-02\n3.98580361798072311e-02\n2.53621613936554843e-02\n8.12687745016461502e-03\n-1.15484588697016329e-02\n-3.31210853152583695e-02\n-5.57754236084739632e-02\n-7.84122996398263911e-02\n-9.96650736567695761e-02\n-1.17950456233706716e-01\n-1.31559736279454303e-01\n-1.38792205126943874e-01\n-1.38126616870925284e-01\n-1.28418867218270338e-01\n-1.09105528097112658e-01\n-8.03848811114217104e-02\n-4.33416332537018834e-02\n1.91621350449226700e-05\n4.68572653702599359e-02\n9.37155851486933394e-02\n1.36864093405910631e-01\n1.72735292485066111e-01\n1.98391146009755381e-01\n2.11942546941208121e-01\n2.12837842178033448e-01\n2.01951688752330105e-01\n1.81440167807808639e-01\n1.54377119217271042e-01\n1.24238573986327053e-01\n9.43419422033135585e-02\n6.73604263224862471e-02\n4.50138276740140592e-02\n2.79881215481299385e-02\n1.60726061652964429e-02\n8.44634172617616738e-03\n4.01454141597577894e-03\n1.69992058847119945e-03\n6.28562540483724877e-04\n1.97423963694982305e-04\n5.05916941404749889e-05\n9.92139939330082821e-06\n1.32414697866374445e-06\n9.02470278267533699e-08\n0.0\n2.94458945321830789e-04\n1.14043459137325100e-03\n2.69826480752992977e-03\n5.09624162706745314e-03\n8.44028270085810106e-03\n1.28155267143878898e-02\n1.82838086434248537e-02\n2.48782788244120076e-02\n3.25957435146571467e-02\n4.13871645517548611e-02\n5.11468279305974521e-02\n6.17008792485374338e-02\n7.27961895793674540e-02\n8.40908310398226083e-02\n9.51477741870139920e-02\n1.05433723233087862e-01\n1.14325216673839047e-01\n1.21124159846599022e-01\n1.25084728669190015e-01\n1.25452993876739055e-01\n1.21519580048442752e-01\n1.12684149683958054e-01\n9.85285145409134505e-02\n7.88928507252822653e-02\n5.39470856236534679e-02\n2.42474289656086014e-02\n-9.23324408489208798e-03\n-4.51122982412252571e-02\n-8.16505604545708225e-02\n-1.16856465051720079e-01\n-1.48639014541878417e-01\n-1.74999005642771377e-01\n-1.94238987466974711e-01\n-2.05164672844529161e-01\n-2.07246130024319020e-01\n-2.00708036304139387e-01\n-1.86525833965930143e-01\n-1.66318673159998237e-01\n-1.42148630085224936e-01\n-1.16255138635401378e-01\n-9.07690147589691465e-02\n-6.74571508916331497e-02\n-4.75439006227533906e-02\n-3.16384764382118058e-02\n-1.97731556858034632e-02\n-1.15314873287701326e-02\n-6.22664335526000937e-03\n-3.08329714858230491e-03\n-1.38343936445736097e-03\n-5.53891815109711755e-04\n-1.93920643749458945e-04\n-5.77413493863359790e-05\n-1.40425310886912711e-05\n-2.61594911245729665e-06\n-3.31928023892331273e-07\n-2.15232917446960350e-08\n2.13503405938593460e-02\n3.69798746674646628e-02\n4.77331902543616515e-02\n5.64425953751609283e-02\n6.38976385090700150e-02\n7.04155472436344687e-02\n7.61204329665477741e-02\n8.10301568429789287e-02\n8.50914604932370700e-02\n8.81972066472034022e-02\n9.01968670909575471e-02\n9.09048272596431062e-02\n9.01087673918187920e-02\n8.75794270583745010e-02\n8.30825796165454294e-02\n7.63937161849843338e-02\n6.73156309211315057e-02\n5.56987480805792509e-02\n4.14636089678526998e-02\n2.46244403374796528e-02\n5.31217537186713228e-03\n-1.62052601753491232e-02\n-3.95080777091280921e-02\n-6.40181820892110343e-02\n-8.90042123352223352e-02\n-1.13600765254047845e-01\n-1.36843627924162603e-01\n-1.57721400251492921e-01\n-1.75241896401846925e-01\n-1.88509315245780240e-01\n-1.96805645185628708e-01\n-1.99667534265879465e-01\n-1.96948426136722671e-01\n-1.88855665086001573e-01\n-1.75953929349950910e-01\n-1.59129926229049229e-01\n-1.39518548886264304e-01\n-1.18396958842197531e-01\n-9.70591908266268122e-02\n-7.66884905137931033e-02\n-5.82463631795524517e-02\n-4.23953648941564967e-02\n-2.94669690959876197e-02\n-1.94773740205207539e-02\n-1.21847773360158288e-02\n-7.17378982218325016e-03\n-3.94839872701702524e-03\n-2.01535123111508613e-03\n-9.44693203261510951e-04\n-4.01756004645540050e-04\n-1.52630660906551797e-04\n-5.07563176074358685e-05\n-1.43677825386595107e-05\n-3.32453082219877862e-06\n-5.89662911367440747e-07\n-7.12821589709014375e-08\n-4.40604793726934406e-09\n0.0\n2.43131327212796382e-04\n9.41643581236466546e-04\n2.22816217200802339e-03\n4.20978299094931785e-03\n6.97733534503136316e-03\n1.06086583069963294e-02\n1.51692226310283281e-02\n2.07111646411722618e-02\n2.72711701432409442e-02\n3.48674441934279933e-02\n4.34959462209345352e-02\n5.31260783714621737e-02\n6.36960592196179065e-02\n7.51082821774102932e-02\n8.72250392987751894e-02\n9.98650779314386866e-02\n1.12801538853344929e-01\n1.25761886163138548e-01\n1.38430464133540015e-01\n1.50454284945450711e-01\n1.61452543539541749e-01\n1.71030153913484195e-01\n1.78795293670231198e-01\n1.84380530629907891e-01\n1.87466603967153256e-01\n1.87807381468234641e-01\n1.85253977295863431e-01\n1.79775577294942146e-01\n1.71474283554988227e-01\n1.60591360923584170e-01\n1.47502730983073649e-01\n1.32702454839560058e-01\n1.16774245724822506e-01\n1.00352636809416071e-01\n8.40770852847369382e-02\n6.85437309887601959e-02\n5.42604258789197852e-02\n4.16107272171030024e-02\n3.08316405007386732e-02\n2.20080394741940730e-02\n1.50841427570402517e-02\n9.88966242891039723e-03\n6.17585095404142928e-03\n3.65522119345506897e-03\n2.03856449134160768e-03\n1.06407994275034817e-03\n5.15623225545877215e-04\n2.29673089979073625e-04\n9.28946181513022894e-05\n3.35904354732839201e-05\n1.06393456474672852e-05\n2.87039572166331205e-06\n6.33372135096743949e-07\n1.07184805545305846e-07\n1.23683515046840044e-08\n7.30062946077512295e-10\n3.03965069219265388e-02\n5.26482943613958282e-02\n6.79665084845549605e-02\n8.04088946114599606e-02\n9.11463107950629264e-02\n1.00702366437748311e-01\n1.09353962337931071e-01\n1.17257193829013437e-01\n1.24498601944345061e-01\n1.31119649077697270e-01\n1.37129871075137605e-01\n1.42514734702815338e-01\n1.47240901922988526e-01\n1.51260253420519547e-01\n1.54513414093468249e-01\n1.56933218259940999e-01\n1.58448380645534459e-01\n1.58987526247654942e-01\n1.58483642958045318e-01\n1.56878938353890995e-01\n1.54129998660715056e-01\n1.50213061690259997e-01\n1.45129129124825756e-01\n1.38908563220907916e-01\n1.31614748520878289e-01\n1.23346362726232589e-01\n1.14237805979016879e-01\n1.04457397143921119e-01\n9.42030685659845657e-02\n8.36954798835091718e-02\n7.31687197270090434e-02\n6.28590522498359422e-02\n5.29924611052506392e-02\n4.37720031124546119e-02\n3.53661575394063413e-02\n2.78993967823911310e-02\n2.14460751863794416e-02\n1.60284240129883668e-02\n1.16189746143856784e-02\n8.14716783075160496e-03\n5.50933593936838318e-03\n3.58077081154379835e-03\n2.22831794795186723e-03\n1.32192707695878513e-03\n7.43857068077856398e-04\n3.94722505634485527e-04\n1.96172144384057815e-04\n9.05678298732696062e-05\n3.84585144969730846e-05\n1.48373722832492690e-05\n5.12024505489334942e-06\n1.54847980670673644e-06\n3.99059484059675492e-07\n8.41459527981188749e-08\n1.36126626187121432e-08\n1.50209998337965270e-09\n8.48107489755972819e-11\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.08472742381388542e-03\n-4.20113124760565244e-03\n-9.90251969648426981e-03\n-1.84771170763622303e-02\n-2.97864244518314635e-02\n-4.29935124003884145e-02\n-5.62502048776087268e-02\n-6.64805016337743915e-02\n-6.94951639769335328e-02\n-6.07489836031443048e-02\n-3.70087187849701890e-02\n1.10930973807619473e-03\n4.64683006843350233e-02\n8.43432667407494757e-02\n9.54507151085634137e-02\n6.49196479072799287e-02\n-4.37546628453371750e-03\n-8.19387104591041138e-02\n-1.16402125826386982e-01\n-6.80514713575707669e-02\n4.51112437681951625e-02\n1.31643108854483243e-01\n9.06119505406491887e-02\n-6.35740425963955968e-02\n-1.55664101856450132e-01\n-3.25463011982652650e-02\n1.61062963962556399e-01\n9.14113873640488572e-02\n-1.71651781820813254e-01\n-9.17992460712520608e-02\n2.26861122079491717e-01\n-2.74638834186305171e-02\n-2.38715686972268110e-01\n3.27133758028667565e-01\n-2.52461693632194173e-01\n1.37970366908697711e-01\n-5.77226737959510572e-02\n1.91900278708997951e-02\n-5.17285234812659821e-03\n1.14295039404465238e-03\n-2.07983783328855249e-04\n3.11689067087047306e-05\n-3.82973710685585953e-06\n3.82261697502359940e-07\n-3.05284349905734929e-08\n1.90534375715001719e-09\n-8.95713424979161803e-11\n2.98382267775662062e-12\n-6.28005580839250896e-14\n6.28036983473509968e-16\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n-3.20283468138268617e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n8.08445165689827342e-13\n-1.63282067007192764e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.49153584618682711e-02\n-2.58341586690582249e-02\n-3.32116220033397275e-02\n-3.86332886759592903e-02\n-4.19352060972968538e-02\n-4.22859974032437497e-02\n-3.84603343591977051e-02\n-2.91354456526192324e-02\n-1.33735769422542814e-02\n8.66375493142438995e-03\n3.48542512856124601e-02\n6.03977488262971221e-02\n7.77935527381269643e-02\n7.82387419341021156e-02\n5.50015082023348201e-02\n8.46471169411793130e-03\n-4.91546484099385228e-02\n-9.33789301143736900e-02\n-9.58451624442848149e-02\n-4.24753634491714521e-02\n4.65584996049520153e-02\n1.13675365442407236e-01\n9.62111172949670912e-02\n-1.20719355238242849e-02\n-1.22543885941844538e-01\n-1.08867617260667501e-01\n4.32122795008925698e-02\n1.55525846583246002e-01\n4.44856381102336565e-02\n-1.56679204868117705e-01\n-9.27910168036672200e-02\n1.70832186850680245e-01\n8.35132884230644357e-02\n-2.25539034459328630e-01\n4.43192212140970654e-02\n2.19269242183260410e-01\n-3.21854692028745448e-01\n2.60382927692662802e-01\n-1.49103608459652814e-01\n6.56033227650731493e-02\n-2.30603343843918986e-02\n6.61577618876218760e-03\n-1.56781788023062688e-03\n3.08791591122133168e-04\n-5.06329993144556269e-05\n6.89739006530945087e-06\n-7.75957347905360304e-07\n7.13509751266757394e-08\n-5.27725011601396538e-09\n3.06437392918077032e-10\n-1.34576262686770477e-11\n4.20315987260463183e-13\n-8.32111971795923090e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-9.31231485683661287e-04\n-3.60664403551681084e-03\n-8.50602400394575263e-03\n-1.59003845831766355e-02\n-2.57379331178424903e-02\n-3.74429022893153773e-02\n-4.96727203528201863e-02\n-6.01209842233804345e-02\n-6.55188921569456323e-02\n-6.20485584438564761e-02\n-4.63832477729556533e-02\n-1.74258908623226814e-02\n2.15613643306100493e-02\n6.13677159501424679e-02\n8.73740714402345270e-02\n8.39387467097887224e-02\n4.30735753536244936e-02\n-2.54205416613427181e-02\n-8.96319597239925298e-02\n-1.06347499921684019e-01\n-5.01739831038397407e-02\n5.32299261477481092e-02\n1.23700123221912733e-01\n8.28396897050736464e-02\n-5.28775536891320994e-02\n-1.43085570967639686e-01\n-5.61977132639769339e-02\n1.23816025006318553e-01\n1.28765238917973951e-01\n-9.31608526655434005e-02\n-1.63492650510438126e-01\n1.06861882743359851e-01\n1.62491258203155242e-01\n-1.96459220801137896e-01\n-4.41807868984634977e-02\n2.70804866571520197e-01\n-3.14111437351427047e-01\n2.26653503225050040e-01\n-1.19973760107645350e-01\n4.96384679318883706e-02\n-1.65764998398732176e-02\n4.54921289331997394e-03\n-1.03647975975075567e-03\n1.97023114024771396e-04\n-3.12759943321989361e-05\n4.13512897657961669e-06\n-4.52475045531942631e-07\n4.05416570728018662e-08\n-2.92645637485853674e-09\n1.66078551450348462e-10\n-7.13697837991790340e-12\n2.18361705890636816e-13\n-4.23906791088685720e-15\n0.0\n0.0\n0.0\n0.0\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367363e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n-1.61942344080973289e-09\n8.98653833493966699e-11\n-3.78065778735820891e-12\n1.13361214079692652e-13\n-2.15878791904814791e-15\n0.0\n0.0\n0.0\n0.0\n8.66426047764552840e-04\n3.35565365371242501e-03\n7.91595443084345055e-03\n1.48087344978570980e-02\n2.40121934498876630e-02\n3.50470844797404965e-02\n4.67621537451872737e-02\n5.71499205294295071e-02\n6.33170572602035214e-02\n6.17867458500721278e-02\n4.93218215401055385e-02\n2.43605773569870315e-02\n-1.11229334763186093e-02\n-5.00111894576891411e-02\n-7.99363085453404787e-02\n-8.61829356704887223e-02\n-5.84006514722374415e-02\n3.58940229482597776e-04\n6.73683490910389760e-02\n1.04547897847193039e-01\n7.88234561964185065e-02\n-7.40196344727397145e-03\n-9.89024440883244094e-02\n-1.13935536034448268e-01\n-1.85003343777213544e-02\n1.09092261688566117e-01\n1.21812489154462897e-01\n-2.46754972559791140e-02\n-1.53724638728994389e-01\n-5.40369786300429894e-02\n1.52844124485929489e-01\n9.28820650447558793e-02\n-1.70534777166068824e-01\n-7.46582530210938983e-02\n2.23693329402947061e-01\n-6.04428648778056812e-02\n-1.99685494680089226e-01\n3.15424575732289769e-01\n-2.67266406134374912e-01\n1.60001492639399556e-01\n-7.37993799662741007e-02\n2.73166714845997499e-02\n-8.29850452787542735e-03\n2.09615300256641487e-03\n-4.43432899576961322e-04\n7.88025564301311331e-05\n-1.17598018378678287e-05\n1.46840532288151399e-06\n-1.52341139845976699e-07\n1.29853215619237565e-08\n-8.94333513020322284e-10\n4.85518037701355783e-11\n-2.00053468434833568e-12\n5.88100400988433593e-14\n-1.09902091182217964e-15\n0.0\n0.0\n-1.38775648385790068e-02\n-2.40366473857502247e-02\n-3.09183376927100149e-02\n-3.60490110866714675e-02\n-3.93682703078595542e-02\n-4.02329121179938673e-02\n-3.76476647717229468e-02\n-3.04822304143377576e-02\n-1.78148420603557490e-02\n5.49493293180726840e-04\n2.34201922161792198e-02\n4.75864693423650661e-02\n6.75475918537050551e-02\n7.61070536214551313e-02\n6.63258440415182837e-02\n3.49512535853120088e-02\n-1.34896496535019863e-02\n-6.41090627526219453e-02\n-9.38543479864410168e-02\n-8.10994027665983136e-02\n-2.12923912180138231e-02\n5.98341884996863235e-02\n1.10030524056330112e-01\n8.17948212773452893e-02\n-1.99064348515221000e-02\n-1.15539923940347122e-01\n-1.02747525542275245e-01\n2.93739623914327161e-02\n1.40726818170620382e-01\n7.11091388755192566e-02\n-1.14989793196826451e-01\n-1.32918431505758633e-01\n8.91485417183863205e-02\n1.61387508239882377e-01\n-1.10055601699256336e-01\n-1.53322920048713257e-01\n2.00539512712531787e-01\n2.47180274398494312e-02\n-2.54306170934596121e-01\n3.12462048980527318e-01\n-2.35681063631851012e-01\n1.30404128946312675e-01\n-5.65779096716435281e-02\n1.99041935277143658e-02\n-5.78688142169003685e-03\n1.40596016281414383e-03\n-2.87177007748138670e-04\n4.94265797874700931e-05\n-7.16154736544445315e-06\n8.70066637554330798e-07\n-8.79840153153714664e-08\n7.32143270574096396e-09\n-4.92939770466701676e-10\n2.61925496886000591e-11\n-1.05747023582451444e-12\n3.04893628200499972e-14\n-5.59323918084504584e-16\n0.0\n0.0\n8.08158692342989915e-04\n3.12998515653716350e-03\n7.38517565752149635e-03\n1.38253132320619240e-02\n2.24522063933630805e-02\n3.28663626386842059e-02\n4.40769909952560268e-02\n5.43310572757454632e-02\n6.10631553156686172e-02\n6.11141009965063056e-02\n5.13829153887050347e-02\n3.00123716033360022e-02\n-1.99912992041950373e-03\n-3.92489735811246479e-02\n-7.14187172436417106e-02\n-8.50885006306404817e-02\n-6.88163708641761074e-02\n-2.08639639467000648e-02\n4.38628639729669381e-02\n9.38928414426828950e-02\n9.42769126249746459e-02\n3.17951926165290777e-02\n-6.21820057924962824e-02\n-1.16966777517995002e-01\n-7.26997949296024210e-02\n4.94382434623633349e-02\n1.32194169547041884e-01\n6.57987478006277354e-02\n-9.54888521621763270e-02\n-1.38115365157589182e-01\n3.28530164553997445e-02\n1.67792257111886223e-01\n1.30048521049586953e-03\n-1.88742910765101940e-01\n2.51320701308221928e-02\n2.04395439674644047e-01\n-1.48084466485667726e-01\n-1.07469414757189574e-01\n2.90187851903803029e-01\n-2.97112519015750698e-01\n2.02734630968114227e-01\n-1.04415761976262733e-01\n4.27882747149507525e-02\n-1.43458775460581483e-02\n3.99957789848109143e-03\n-9.36072935864134593e-04\n1.84837054629292984e-04\n-3.08416262170301266e-05\n4.34251259324340908e-06\n-5.13695069484046143e-07\n5.06657853082752451e-08\n-4.11821551403110582e-09\n2.71191472114882765e-10\n-1.41102151833627694e-11\n5.58406190060084879e-13\n-1.57966659136821553e-14\n0.0\n1.34110082885095135e-02\n2.32285477364258114e-02\n2.98860996054554594e-02\n3.48797786234479046e-02\n3.81892381223788158e-02\n3.92471829676002693e-02\n3.71538730469372011e-02\n3.08652396695146408e-02\n1.94853920076197493e-02\n2.71067763847296405e-03\n-1.85941472740467142e-02\n-4.18117164601599367e-02\n-6.22489781836327166e-02\n-7.34866556939571952e-02\n-6.88453932375441002e-02\n-4.41692459769204224e-02\n-1.44841254376531581e-03\n4.82920127164106483e-02\n8.54732402076973929e-02\n8.84366022246835387e-02\n4.60942565828406994e-02\n-2.84199156080339639e-02\n-9.42883172677429493e-02\n-1.01381495418001205e-01\n-2.96036179400583389e-02\n7.66130663395796219e-02\n1.22433390026080946e-01\n4.51895108600385148e-02\n-9.32860514910172911e-02\n-1.30432938458461017e-01\n8.20081992983317902e-03\n1.50931262325264132e-01\n6.15593609069964576e-02\n-1.49611746094279907e-01\n-9.18975496671960018e-02\n1.70628068541547301e-01\n6.53278764101584142e-02\n-2.21263159640423035e-01\n7.57862765817949313e-02\n1.80014718045661271e-01\n-3.07891757468296778e-01\n2.73094737405840060e-01\n-1.70599706566118642e-01\n8.22652000647926263e-02\n-3.19530648431656378e-02\n1.02346436590687109e-02\n-2.74111767195971785e-03\n6.18871018390315859e-04\n-1.18270476590769932e-04\n1.91502023000594468e-05\n-2.62231259216816210e-06\n3.02252308581942185e-07\n-2.90938782209820251e-08\n2.31116975543123349e-09\n-1.48928121109455270e-10\n7.59094088571304640e-12\n-2.94583256847368901e-13\n8.17923176680597700e-15\n0.0\n7.55578460578792250e-04\n2.92634279457469962e-03\n6.90600799850599884e-03\n1.29363300983407065e-02\n2.10376911072675983e-02\n3.08768236488992862e-02\n4.15981791441294158e-02\n5.16661078142204300e-02\n5.88016778013916441e-02\n6.01379021790062890e-02\n5.27364107796431322e-02\n3.45666628780188154e-02\n5.89504265383238111e-03\n-2.92676595184092718e-02\n-6.24162650888476569e-02\n-8.15792684392644823e-02\n-7.50796499560372615e-02\n-3.79476882498117618e-02\n2.12328593136595391e-02\n7.78173930557252286e-02\n9.85941149302572428e-02\n6.11661686758680906e-02\n-2.27622777262843357e-02\n-9.97514513295714444e-02\n-1.02888651705516226e-01\n-1.20807025458813250e-02\n1.01582608746744699e-01\n1.16455312491852439e-01\n-7.60805901610506555e-03\n-1.36066500044879080e-01\n-8.31897955472478273e-02\n1.06895593877290779e-01\n1.35737034603814116e-01\n-8.63403631011036010e-02\n-1.58775957631712761e-01\n1.13751534782348243e-01\n1.43731724342601119e-01\n-2.03878872101696557e-01\n-5.87789538391338996e-03\n2.37332242904563756e-01\n-3.09605301178792980e-01\n2.43864153707220865e-01\n-1.40753685790851485e-01\n6.38573485402233049e-02\n-2.35822617857203536e-02\n7.23183717829213590e-03\n-1.86373745437301173e-03\n4.06441527723909284e-04\n-7.52544596961842165e-05\n1.18349014785157664e-05\n-1.57729685808418275e-06\n1.77258137011227427e-07\n-1.66614437347434157e-08\n1.29420250386442746e-09\n-8.16441149024179224e-11\n4.07835591812698989e-12\n-1.55258928744955132e-13\n1.29748046590291641e-02\n2.24730208877198974e-02\n2.89203443271613889e-02\n3.37826386444656790e-02\n3.70735103747419012e-02\n3.82919017737505599e-02\n3.66228434593737009e-02\n3.11018414527098330e-02\n2.08653274069167255e-02\n5.53264354674670028e-03\n-1.42895572599816070e-02\n-3.64739483838690190e-02\n-5.70233893226039165e-02\n-7.02447626055959923e-02\n-6.98370152504726310e-02\n-5.11337948913146156e-02\n-1.42477980967673293e-02\n3.30013877475572939e-02\n7.44602271615361216e-02\n8.97290742140010589e-02\n6.39803154654428746e-02\n6.62474528345230332e-04\n-7.10490007401951423e-02\n-1.04847531797734775e-01\n-6.65156353079946611e-02\n2.96532510682681640e-02\n1.11007035041306865e-01\n9.45749565926919389e-02\n-2.38279871472458146e-02\n-1.28234830255555182e-01\n-8.24577580450015779e-02\n8.23317203057432612e-02\n1.42175983326254834e-01\n-2.41581776181457111e-02\n-1.66715279399058058e-01\n-1.84856863588283085e-03\n1.86598622873165254e-01\n-3.24707272925996021e-02\n-1.97016239993091397e-01\n1.57410206751743498e-01\n8.71802057908291350e-02\n-2.77107436042824173e-01\n2.98443719543597608e-01\n-2.12349552082682469e-01\n1.14072588013370668e-01\n-4.88923977799044437e-02\n1.72137949930847300e-02\n-5.06402983072517469e-03\n1.25767317036228066e-03\n-2.65243772937648044e-04\n4.76286954356546386e-05\n-7.28115775407417099e-06\n9.45147478149082695e-07\n-1.03626854141031361e-07\n9.51685224181556748e-09\n-7.23195867354570885e-10\n4.46835784501288371e-11\n-2.18837865036751219e-12\n0.0\n7.07968488715487575e-04\n2.74195016643471708e-03\n6.47197520841484748e-03\n1.21301141149080388e-02\n1.97513298530841638e-02\n2.90575945793569400e-02\n3.93078708330475216e-02\n4.91529012662425407e-02\n5.65642447017429412e-02\n5.89415058818410012e-02\n5.35217425912010991e-02\n3.81887577762012043e-02\n1.26659863802208936e-02\n-2.01568873682223502e-02\n-5.33481352313809679e-02\n-7.64032813109597614e-02\n-7.79635215846214008e-02\n-5.10203875232878162e-02\n7.47645039672664583e-04\n5.90476666753959115e-02\n9.43974333203616567e-02\n8.01097842127733856e-02\n1.32861222977138718e-02\n-7.08424179116465824e-02\n-1.10292460231499773e-01\n-6.09612044250449625e-02\n5.06065625403030739e-02\n1.23451269691122634e-01\n6.74739501839395905e-02\n-7.65659296418580576e-02\n-1.35657470885995363e-01\n-6.18618647180836558e-03\n1.47624469664143609e-01\n6.73650512139389035e-02\n-1.46985778465230976e-01\n-9.00015595357351872e-02\n1.70992902684906550e-01\n5.56035135363378979e-02\n-2.18203911549614160e-01\n9.03043044067258355e-02\n1.60312300054577500e-01\n-2.99307131693407946e-01\n2.77854027722973795e-01\n-1.80836553482089823e-01\n9.09536070344159620e-02\n-3.69603142724853131e-02\n1.24360806238899921e-02\n-3.51588474112001989e-03\n8.42644246989619110e-04\n-1.72057073015557260e-04\n2.99909204757225455e-05\n-4.46030125570664008e-06\n5.64299899789155604e-07\n-6.03979033050708685e-08\n5.42233811839169662e-09\n-4.03298549480480578e-10\n2.44158479538189318e-11\n1.25660850235249262e-02\n2.17650977129755230e-02\n2.80148688472692808e-02\n3.27512555097562857e-02\n3.60167101119801408e-02\n3.73681794670315676e-02\n3.60660923388668869e-02\n3.12191448689965907e-02\n2.19999105798660624e-02\n7.97469112913272958e-03\n-1.04542879731757323e-02\n-3.15646184477035227e-02\n-5.19566636005748470e-02\n-6.66026031034667454e-02\n-6.96421173402293203e-02\n-5.61774686788752559e-02\n-2.49650224833861470e-02\n1.87765639236707957e-02\n6.20631630888814970e-02\n8.64628816865110200e-02\n7.54416466240959843e-02\n2.54616812604534330e-02\n-4.47956587243744167e-02\n-9.61972512091509996e-02\n-8.88446586648543590e-02\n-1.47232458226405800e-02\n7.98957332004834875e-02\n1.13931357696995486e-01\n4.05719226435826558e-02\n-8.42089263588257364e-02\n-1.24926536482568323e-01\n-1.19412808254562228e-02\n1.30006633820307221e-01\n9.28698614339001222e-02\n-9.96723383938321050e-02\n-1.37510918608476418e-01\n8.45961868935660166e-02\n1.55716940555528233e-01\n-1.17808353074389555e-01\n-1.33744095507930871e-01\n2.06429212895509195e-01\n-1.22950986622326255e-02\n-2.19945017009354954e-01\n3.05575745127095511e-01\n-2.51167940869888306e-01\n1.50959972271455967e-01\n-7.14415918364089964e-02\n2.76102572199898137e-02\n-8.89761218574894319e-03\n2.42138232289883107e-03\n-5.60748539740517273e-04\n1.10968955842700439e-04\n-1.87928471497622447e-05\n2.72103409726876037e-06\n-3.35743493820971046e-07\n3.50998701758943935e-08\n-3.08200197424011892e-09\n2.24463787566257334e-10\n0.0\n6.64721423538674572e-04\n2.57445500323257330e-03\n6.07758522600758237e-03\n1.13967363290972037e-02\n1.85782722277741189e-02\n2.73904321995126418e-02\n3.71895573466432261e-02\n4.67867735477216357e-02\n5.43729554208776111e-02\n5.75895932167672375e-02\n5.38529390483070067e-02\n4.10233850992304250e-02\n1.84275708835614158e-02\n-1.19419525977376619e-02\n-4.45000192114178642e-02\n-7.01486386490793451e-02\n-7.81845081216825666e-02\n-6.04449887693185445e-02\n-1.69397473819012517e-02\n3.95860793491211588e-02\n8.42640570438786124e-02\n8.95293684295746378e-02\n4.26473939403817087e-02\n-3.74710096432531864e-02\n-1.00045595848514357e-01\n-9.12436083685649463e-02\n-3.07919270226668764e-03\n9.77442930489463291e-02\n1.09498691531181788e-01\n2.76457493593588229e-04\n-1.21176905737521337e-01\n-9.57212015692781581e-02\n6.99263442851631584e-02\n1.44712571197065376e-01\n-1.70180514681687461e-02\n-1.65492041886532687e-01\n-1.32593202125539582e-03\n1.84395657125539819e-01\n-4.01518101142324044e-02\n-1.89141571158557065e-01\n1.65849366514973728e-01\n6.72766229507452546e-02\n-2.63276954832890375e-01\n2.98598963167771736e-01\n-2.21311375920616449e-01\n1.23766691522875075e-01\n-5.53439607608452872e-02\n2.03976260392571135e-02\n-6.30794503707690201e-03\n1.65487438777846795e-03\n-3.70750379036844215e-04\n7.11778537597883705e-05\n-1.17210793946950743e-05\n1.65341926151391481e-06\n-1.99091031827781687e-07\n2.03409408147625478e-08\n-1.74771461546062353e-09\n1.21823309947558384e-02\n2.11004162375382151e-02\n2.71642162504451001e-02\n3.17799977782120893e-02\n3.50147615201247819e-02\n3.64764193643167534e-02\n3.54926194659148653e-02\n3.12392323025121807e-02\n2.29269443335345866e-02\n1.00871622847511118e-02\n-7.03965948978038658e-03\n-2.70659524453717923e-02\n-4.71039521118699900e-02\n-6.27273017499442170e-02\n-6.85414535754725884e-02\n-5.96116843458726342e-02\n-3.37433693854726005e-02\n5.91611457979390222e-03\n4.91987654537008323e-02\n7.99571441376115272e-02\n8.13561672620124882e-02\n4.51502773468397123e-02\n-1.87387543691607816e-02\n-7.95861320079499224e-02\n-9.76110122573920491e-02\n-5.03983043127975150e-02\n4.02252836963969476e-02\n1.07602146788155023e-01\n8.50972928872941042e-02\n-2.37297627894801841e-02\n-1.18810992451741163e-01\n-8.53878271364302555e-02\n5.99162913912753836e-02\n1.38296932716369753e-01\n1.85795819486561480e-02\n-1.44138569145363687e-01\n-7.17182781609920078e-02\n1.44939239121502972e-01\n8.73217036258427531e-02\n-1.71522144292497236e-01\n-4.55580869180390452e-02\n2.14484669935683658e-01\n-1.03955213263817944e-01\n-1.40637430791127033e-01\n2.89724281620715285e-01\n-2.81534166942403519e-01\n1.90653050251486711e-01\n-9.98161218514679871e-02\n4.23261085361709699e-02\n-1.49128701842033834e-02\n4.43349188834245116e-03\n-1.12281235004890604e-03\n2.43621785116163940e-04\n-4.54158742877752380e-05\n7.27779075886823646e-06\n-1.00087514768787056e-06\n1.17678737941843347e-07\n-1.17561071060344039e-08\n0.0\n6.25319940814807402e-04\n2.42185371682715651e-03\n5.71815611534526400e-03\n1.07277080458695068e-02\n1.75057315494395113e-02\n2.58593648258016173e-02\n3.52280968972558534e-02\n4.45615300968144612e-02\n5.22428686135434431e-02\n5.61322649658100581e-02\n5.38230215564705627e-02\n4.31956978484025270e-02\n2.32927298571769595e-02\n-4.60680729179505869e-03\n-3.60583275363343114e-02\n-6.32665980972901831e-02\n-7.63708524659756777e-02\n-6.66920073007031544e-02\n-3.15977795079579113e-02\n2.08030978084051688e-02\n7.04320723228064743e-02\n9.10466579747770399e-02\n6.40452568804670552e-02\n-4.86686434237680512e-03\n-7.83469114777470693e-02\n-1.02862151973662830e-01\n-4.80085295045309252e-02\n5.45913336372662802e-02\n1.16369577840077065e-01\n6.45196089782962695e-02\n-6.52422130111356968e-02\n-1.29179339283161665e-01\n-2.91153033164472386e-02\n1.23213039986118517e-01\n1.00545269626018383e-01\n-9.33759797366515570e-02\n-1.38459018903673542e-01\n8.37847774558776043e-02\n1.52248394231236067e-01\n-1.22103038931645619e-01\n-1.23388883243706018e-01\n2.08154318706997715e-01\n-2.97560857136399508e-02\n-2.02209710545618704e-01\n3.00410862744196261e-01\n-2.57561590652308492e-01\n1.60962026776198169e-01\n-7.92931956388729098e-02\n3.19848335625622371e-02\n-1.07964998064545639e-02\n3.09063131804708643e-03\n-7.56561191268908910e-04\n1.59145245924192409e-04\n-2.88328640331386813e-05\n4.49953657160366817e-06\n-6.03655674057244787e-07\n6.93424329395009717e-08\n1.18213227699656091e-02\n2.04751316502512909e-02\n2.63635671491319994e-02\n3.08638457527521740e-02\n3.40638849049070061e-02\n3.56165174143144858e-02\n3.49094589065041538e-02\n3.11801542818346544e-02\n2.36780822880740746e-02\n1.19134788091799573e-02\n-4.00098765748430236e-03\n-2.29548613155700389e-02\n-4.24983131672795958e-02\n-5.87437035094552917e-02\n-6.67629799171259586e-02\n-6.17165632545594936e-02\n-4.07698738390561005e-02\n-5.44855015853506260e-03\n3.65116832052550661e-02\n7.13124284833044214e-02\n8.27371027363281442e-02\n5.96423954525474170e-02\n5.05189253020447027e-03\n-5.86416553390107301e-02\n-9.53263104955179019e-02\n-7.48700693643696291e-02\n5.53353799796915246e-04\n8.37342506047535906e-02\n1.05502784523502965e-01\n3.30742023532313301e-02\n-7.98600905330197619e-02\n-1.18295642232478682e-01\n-2.20763014599546642e-02\n1.12166376762421735e-01\n1.06071661934992692e-01\n-5.85161201359421443e-02\n-1.46133899474173573e-01\n1.12803032574627319e-02\n1.64209463339996364e-01\n-1.18211299924113022e-04\n-1.82088477876181543e-01\n4.80721277291818461e-02\n1.80768950970031567e-01\n-1.73365536963801636e-01\n-4.78114838209442103e-02\n2.48761189732803367e-01\n-2.97594655336219316e-01\n2.29573479722112589e-01\n-1.33440786087180463e-01\n6.21169875307137700e-02\n-2.39008215144763808e-02\n7.74437852588082988e-03\n-2.13783614723025983e-03\n5.06428446028778212e-04\n-1.03377881130258068e-04\n1.82169930550947289e-05\n-2.77042692765709950e-06\n3.62803868771623081e-07\n0.0\n5.89321190941269704e-04\n2.28243115808265864e-03\n5.38967686830196455e-03\n1.01157380915803397e-02\n1.65226548270322668e-02\n2.44503824808352081e-02\n3.34096805897108953e-02\n4.24701098247897910e-02\n5.01838424693845236e-02\n5.46082328682842844e-02\n5.35077454085842175e-02\n4.48129950870259086e-02\n2.73686516802243637e-02\n1.88995208827105916e-03\n-2.81369562423979536e-02\n-5.60957839084430254e-02\n-7.30533249143249241e-02\n-7.02604079886749305e-02\n-4.32662669700172309e-02\n3.56349411739572850e-03\n5.46970405306539814e-02\n8.64961064673491348e-02\n7.75396406463685489e-02\n2.36889535147506991e-02\n-5.08736111896952725e-02\n-9.89833470138856697e-02\n-7.87054600379005903e-02\n7.50322829626195748e-03\n9.61196598596466417e-02\n1.01762627473865636e-01\n2.07681777448451722e-03\n-1.10169072451716143e-01\n-9.92776581962979410e-02\n4.39718281149686779e-02\n1.39027676683385670e-01\n2.91343161329369292e-02\n-1.40701156336191374e-01\n-7.48388001145848941e-02\n1.43427095283632539e-01\n8.39585101380438542e-02\n-1.72119922726617830e-01\n-3.52587445103593675e-02\n2.10086244073253520e-01\n-1.16700795176411493e-01\n-1.21052025097701993e-01\n2.79199523449746967e-01\n-2.84129050981693887e-01\n1.99993054559044509e-01\n-1.08803197114670236e-01\n4.80351446514817315e-02\n-1.76731359755161778e-02\n5.50669879001597102e-03\n-1.46789588524378527e-03\n3.36869058447298870e-04\n-6.67918708210285593e-05\n1.14567132482470970e-05\n-1.69905031626425283e-06\n1.14810961510931359e-02\n1.98858418602767956e-02\n2.56086494812742191e-02\n2.99983126917977051e-02\n3.31605849223267704e-02\n3.47880098520341879e-02\n3.43221026717107011e-02\n3.10567130359147431e-02\n2.42798986966861995e-02\n1.34910773065168108e-02\n-1.29772785117138905e-03\n-1.92055721467413905e-02\n-3.81570505875634333e-02\n-5.47438706394323057e-02\n-6.44899004337108894e-02\n-6.27374449207427354e-02\n-4.62477216631050209e-02\n-1.52978242748057838e-02\n2.44330115277414800e-02\n6.14065474778075424e-02\n8.05843393406868447e-02\n6.92977495689776762e-02\n2.54128974928210481e-02\n-3.62079734938163256e-02\n-8.49740451186288825e-02\n-8.80894104624052321e-02\n-3.36281053836962468e-02\n5.07776704891580999e-02\n1.04298157615689890e-01\n7.45522449512338453e-02\n-2.72039580061329729e-02\n-1.12015753032231921e-01\n-8.36377825627199756e-02\n4.59931116089454806e-02\n1.30166204754190884e-01\n4.39520994745420945e-02\n-1.16164025294659412e-01\n-1.06563598839081536e-01\n8.80100185427089843e-02\n1.38745178475459752e-01\n-8.37854798193339301e-02\n-1.48394354552466051e-01\n1.26527607511386725e-01\n1.12697790961152802e-01\n-2.09028239133038918e-01\n4.64606604297430476e-02\n1.84194140241107057e-01\n-2.94151256499624592e-01\n2.63018419847586504e-01\n-1.70700555361692735e-01\n8.73726944749432521e-02\n-3.66997878390764448e-02\n1.29394222274767760e-02\n-3.88326546604918959e-03\n1.00083882679862369e-03\n-2.22738611786480438e-04\n4.29319086898323363e-05\n-7.17328569695966905e-06\n0.0\n5.56344292309638583e-04\n2.15471217887278164e-03\n5.08869531608131549e-03\n9.55453632739129873e-03\n1.56194517108766279e-02\n2.31511702360068933e-02\n3.17217631413118581e-02\n4.05050399711039608e-02\n4.82019038917434403e-02\n5.30473059297827676e-02\n5.29687277730568132e-02\n4.59667136031158968e-02\n3.07542697381268555e-02\n7.60413546142512872e-03\n-2.07977585870568020e-02\n-4.88845610807728120e-02\n-6.86683142646592193e-02\n-7.16313910993104375e-02\n-5.21471151815691425e-02\n-1.16488814000465513e-02\n3.84130739800331161e-02\n7.76330601909033247e-02\n8.39607145315955095e-02\n4.65010006578795709e-02\n-2.20976579047681837e-02\n-8.40153593303781532e-02\n-9.41423364584864225e-02\n-3.41193135560362501e-02\n6.01213678904045853e-02\n1.10232582952848920e-01\n5.86633831068912939e-02\n-5.95481821140821307e-02\n-1.22003815187359269e-01\n-4.12148352813714730e-02\n1.02078752397794542e-01\n1.13987702952605255e-01\n-4.82185192738959351e-02\n-1.46755160922081740e-01\n6.79812221251878315e-03\n1.62917352538610033e-01\n-2.35759542427136596e-03\n-1.79632425432166398e-01\n5.61397497426222580e-02\n1.71904292760885979e-01\n-1.79929334199047691e-01\n-2.88387992521719726e-02\n2.33627412680009083e-01\n-2.95450906737070640e-01\n2.37093041751622158e-01\n-1.43037960912413165e-01\n6.91828800032789626e-02\n-2.77243329684257224e-02\n9.38553150407262816e-03\n-2.71698148860654047e-03\n6.77834598120832473e-04\n-1.46431685143400789e-04\n2.74593075548966732e-05\n1.11599067847740867e-02\n1.93295255589613496e-02\n2.48956631658347367e-02\n2.91793775135540424e-02\n3.23016350188275250e-02\n3.39901823434488673e-02\n3.37348284642382604e-02\n3.08810825995406990e-02\n2.47547622274833581e-02\n1.48522408422569838e-02\n1.10661655440309151e-03\n-1.57913723597095726e-02\n-3.40863700530332006e-02\n-5.07946079626305780e-02\n-6.18681658608156576e-02\n-6.28852023863995108e-02\n-5.03792355269301884e-02\n-2.36835608565810034e-02\n1.32319171555400922e-02\n5.09141015592934967e-02\n7.58053600363217672e-02\n7.47102722122889584e-02\n4.18437885777442065e-02\n-1.43290804964795390e-02\n-6.94119221912553458e-02\n-9.14267508062196615e-02\n-5.95127327856605701e-02\n1.57135016564965285e-02\n8.71928647351447872e-02\n9.66113639077572639e-02\n2.36269775922794863e-02\n-7.86990118076658363e-02\n-1.11511695068377867e-01\n-2.56217393368745466e-02\n9.89161571059320038e-02\n1.09639425776668464e-01\n-2.91114023327340224e-02\n-1.38396527748016168e-01\n-3.80299476580869336e-02\n1.37462002156421015e-01\n7.69073868477859607e-02\n-1.42394361027025906e-01\n-7.99924979066400643e-02\n1.72700722007544993e-01\n2.47686404573961572e-02\n-2.04999606118436456e-01\n1.28506518498050171e-01\n1.01619816423490231e-01\n-2.67791873957886506e-01\n2.85636750072858880e-01\n-2.08803410876687995e-01\n1.17864458330753444e-01\n-5.40692536621815850e-02\n2.07229854691034603e-02\n-6.74784803511475472e-03\n1.88680916111789044e-03\n-4.56148361006383991e-04\n9.57383339100701232e-05\n0.0\n5.26060210176799103e-04\n2.03742243311711606e-03\n4.81222729892319314e-03\n9.03865367607005650e-03\n1.47877709591472638e-02\n2.19508794722886869e-02\n3.01529756207742222e-02\n3.86587444317427406e-02\n4.63002695881814946e-02\n5.14723287891863945e-02\n5.22560357462852274e-02\n4.67344379007984395e-02\n3.35391965720887447e-02\n1.25985855067252059e-02\n-1.40659420661261806e-02\n-4.18104006297016911e-02\n-6.35669311028627809e-02\n-7.12438483783547905e-02\n-5.85283179690766833e-02\n-2.46231979968884393e-02\n2.25439385219228169e-02\n6.59881592992191401e-02\n8.45031842273612360e-02\n6.30239400723174997e-02\n4.85365334070955723e-03\n-6.23669385564066814e-02\n-9.60139426850547956e-02\n-6.51405866789932647e-02\n1.89290820184987892e-02\n9.55638020775078090e-02\n9.34139682109448172e-02\n-2.04609345913247392e-04\n-1.02681446718595970e-01\n-9.81165963897294852e-02\n2.73472193577326758e-02\n1.28719246464694265e-01\n5.66017976544320733e-02\n-1.09193824284201754e-01\n-1.11220868606884307e-01\n8.35458872856143786e-02\n1.38490837873363110e-01\n-8.44883718984398568e-02\n-1.44169937460924796e-01\n1.30986563068093725e-01\n1.01705498075641262e-01\n-2.09034068121782907e-01\n6.23655795228592047e-02\n1.65968115381800868e-01\n-2.86840747638479110e-01\n2.67516031285032874e-01\n-1.80118120009224641e-01\n9.56388348791726850e-02\n-4.17461133408695700e-02\n1.53358099239364384e-02\n-4.81098847890830839e-03\n1.30099487334585742e-03\n-3.05094203677658347e-04\n1.08562006134528127e-02\n1.88034910396606865e-02\n2.42212176657197950e-02\n2.84034281293281919e-02\n3.14840610717607855e-02\n3.32221518881947314e-02\n3.31509557240784181e-02\n3.06633029209440709e-02\n2.51215513469371654e-02\n1.60248274784555063e-02\n3.24471767880882798e-03\n-1.26857423222662170e-02\n-3.02847883923299949e-02\n-4.69433723218570104e-02\n-5.90131119414718727e-02\n-6.23385806218956090e-02\n-5.33559720293054346e-02\n-3.07004206188278977e-02\n3.05834824118438953e-03\n4.03357797780113103e-02\n6.91805123251683363e-02\n7.65667049583452497e-02\n5.42952242035862273e-02\n5.65293632574095841e-03\n-5.10765359870676561e-02\n-8.69023039393169994e-02\n-7.62913900172875331e-02\n-1.65353697769914966e-02\n6.06016403854987701e-02\n1.00327022376935596e-01\n6.30109573004556112e-02\n-3.29719691128885356e-02\n-1.07082554491322701e-01\n-7.91360303407702692e-02\n3.84723152988438108e-02\n1.21683912178350812e-01\n5.76273807421691722e-02\n-9.15597842987792843e-02\n-1.19910224676335206e-01\n3.90687249558142949e-02\n1.46815900941822841e-01\n-3.43574635301289099e-03\n-1.61639496952503903e-01\n5.28435620209810955e-03\n1.76985391033937289e-01\n-6.42716614177264167e-02\n-1.62560952163570527e-01\n1.85517890132487234e-01\n1.04129003752413858e-02\n-2.17945089108182638e-01\n2.92191677132688177e-01\n-2.43831182219913400e-01\n1.52501915312125369e-01\n-7.65106156822861899e-02\n3.18665980635115392e-02\n-1.12426157441342742e-02\n3.40289892203897914e-03\n-8.90989034035289469e-04\n0.0\n4.98183657152961629e-04\n1.92945700750612580e-03\n4.55768391294089550e-03\n8.56335358218318111e-03\n1.40203193017056013e-02\n2.08399379024051500e-02\n2.86930391295686198e-02\n3.69237597818123861e-02\n4.44801216911071898e-02\n4.99007089808898435e-02\n5.14103278212220197e-02\n4.71818096657464769e-02\n3.58035509059156654e-02\n1.69383210016363465e-02\n-7.94149644936135470e-03\n-3.49959959107229157e-02\n-5.80264627634011557e-02\n-6.94835621430150707e-02\n-6.27332836080581324e-02\n-3.53350889218139591e-02\n7.73227865701859446e-03\n5.28136730995836315e-02\n8.04606354280282543e-02\n7.34675373975683388e-02\n2.80593123983376609e-02\n-3.78044510587837237e-02\n-8.73254434205821273e-02\n-8.38399024580686741e-02\n-1.95818765337863604e-02\n6.62359443711876134e-02\n1.04347542487949807e-01\n5.08162427556300145e-02\n-5.78557066421812941e-02\n-1.15312746284700854e-01\n-4.62804210788555007e-02\n8.61566960340763438e-02\n1.17016295486189081e-01\n-1.55336955266429811e-02\n-1.36835476338353357e-01\n-4.54491471042378081e-02\n1.34514737508570237e-01\n7.80717526290373720e-02\n-1.41781286127249190e-01\n-7.54895284446351900e-02\n1.73188528677759274e-01\n1.41481345773997649e-02\n-1.99224713878906057e-01\n1.39341729992902369e-01\n8.24056341818882598e-02\n-2.55563077106398917e-01\n2.86059754020139834e-01\n-2.17034197898525072e-01\n1.26949003194422955e-01\n-6.04075586815636667e-02\n2.40664482082712690e-02\n-8.16873351152193512e-03\n2.38878850188661883e-03\n1.05686108874674251e-02\n1.83053710225191818e-02\n2.35823280906064282e-02\n2.76672700086650694e-02\n3.07051877894076869e-02\n3.24829948371125679e-02\n3.25731134564584829e-02\n3.04117379241961583e-02\n2.53962936301498667e-02\n1.70329376588823009e-02\n5.14572539575657364e-03\n-9.86308570201152070e-03\n-2.67456726337115154e-02\n-4.32229689933198505e-02\n-5.60152661564149654e-02\n-6.12475984025333403e-02\n-5.53536045193033302e-02\n-3.64660945305053524e-02\n-6.02308700597119131e-03\n3.00296993692900256e-02\n6.13549881450816265e-02\n7.55581180086454807e-02\n6.30019162687740913e-02\n2.29584263546787383e-02\n-3.18810361071261844e-02\n-7.66788372889786185e-02\n-8.44579399861008773e-02\n-4.30282361030755595e-02\n3.02245871353771824e-02\n8.95492555303156468e-02\n8.68583531976118844e-02\n1.28410745096454344e-02\n-7.95161272296610599e-02\n-1.04739890591440940e-01\n-2.47655242988436344e-02\n8.99842167245137603e-02\n1.08412196479496181e-01\n-9.86011838031044044e-03\n-1.25534005575434787e-01\n-6.72707148724552978e-02\n1.02528759133718131e-01\n1.14764280133978422e-01\n-7.99365136581123154e-02\n-1.37785418437564394e-01\n8.57937746851651778e-02\n1.39585286702466171e-01\n-1.35395207433159803e-01\n-9.04499788917849656e-02\n2.08163576531408351e-01\n-7.74294143336522883e-02\n-1.47603537073803720e-01\n2.78527393481673380e-01\n-2.71037331194226128e-01\n1.89159945937673657e-01\n-1.04049140605880663e-01\n4.71122098157099184e-02\n-1.79935480845767222e-02\n5.88532313303688579e-03\n0.0\n4.72472177330805353e-04\n1.82987687434856667e-03\n4.32286417325342901e-03\n8.12460454022951271e-03\n1.33108719211019431e-02\n1.98101267169526682e-02\n2.73330078468468629e-02\n3.52933059814984004e-02\n4.27417094594665439e-02\n4.83462024670164095e-02\n5.04652267919336595e-02\n4.73648470918514169e-02\n3.76187771400803075e-02\n2.06877047680325207e-02\n-2.40757467316132963e-03\n-2.85226339880009887e-02\n-5.22627251804164208e-02\n-6.66815291104893293e-02\n-6.50893789496611308e-02\n-4.38812261785901589e-02\n-5.63036570732987351e-03\n3.90833407045617851e-02\n7.30678381904787400e-02\n7.84842254384147120e-02\n4.65579683401322192e-02\n-1.32115079339854401e-02\n-7.14200651625996469e-02\n-9.08019301221136416e-02\n-5.05814991310924028e-02\n3.05809614541019369e-02\n9.51799365642414935e-02\n8.43782893067047401e-02\n-5.26366535571343511e-03\n-9.79278947084327861e-02\n-9.44377490306181344e-02\n1.78120540168777049e-02\n1.18316715602887534e-01\n7.14310108481676642e-02\n-8.10708238252961511e-02\n-1.24229723258204833e-01\n3.10500699830590469e-02\n1.46497877126492093e-01\n-1.06998807481554895e-03\n-1.60384158682087857e-01\n8.80458424326599834e-03\n1.74111916580450554e-01\n-7.23923392331347754e-02\n-1.52762406983880300e-01\n1.90117452585684216e-01\n-7.41092230820513537e-03\n-2.01791009925339437e-01\n2.87851500203795241e-01\n-2.49758514838684526e-01\n1.61780585156009599e-01\n-8.40686692832463556e-02\n3.63242697260061920e-02\n-1.33259912418581712e-02\n1.02965742651031072e-02\n1.78341897710647540e-02\n2.29777923814235945e-02\n2.69697535225186316e-02\n2.99644773927027069e-02\n3.17737623644355344e-02\n3.20053875153167439e-02\n3.01352749224974119e-02\n2.55942609556961305e-02\n1.78986111532028654e-02\n6.83607171735286893e-03\n-7.29952257209163288e-03\n-2.34604022568091694e-02\n-3.96574936919993765e-02\n-5.29483440166836766e-02\n-5.97408153794582591e-02\n-5.65332660710224991e-02\n-4.11106350940607865e-02\n-1.40081629179875204e-02\n2.02416325640979618e-02\n5.28484790648062405e-02\n7.23331134397272729e-02\n6.83635168127095932e-02\n3.72319424341793284e-02\n-1.32233763007728253e-02\n-6.27684809327030968e-02\n-8.52427358819232289e-02\n-6.24375978304325605e-02\n4.33115626172423892e-04\n6.90879922852723899e-02\n9.51442453323328857e-02\n5.05376590416425492e-02\n-4.01046370531912416e-02\n-1.03235782972602538e-01\n-7.28425713778264039e-02\n3.56114583981700025e-02\n1.14292164524836287e-01\n6.38353060670358019e-02\n-7.27333559117096101e-02\n-1.21948759029554668e-01\n3.31232810909465976e-03\n1.34689369419256938e-01\n5.15731222167910355e-02\n-1.31921709732104597e-01\n-7.84625088804089960e-02\n1.41536162671794863e-01\n7.05160588885566930e-02\n-1.73530043279552459e-01\n-3.46298086688029720e-03\n1.92791060410941906e-01\n-1.49188820682621931e-01\n-6.34919910772752810e-02\n2.42612581517155423e-01\n-2.85441443503506642e-01\n2.24665868013322612e-01\n-1.36021409678953265e-01\n6.70341955592780869e-02\n-2.77084960730094934e-02\n0.0\n4.48831288509436298e-04\n1.73831610565386300e-03\n4.10691796962725508e-03\n7.72089574452974881e-03\n1.26572680956892423e-02\n1.88590960936309733e-02\n2.60716278438139423e-02\n3.37697446701994489e-02\n4.10950065361515363e-02\n4.68315637978154661e-02\n4.94612308042654616e-02\n4.73435949630495248e-02\n3.90585360921283445e-02\n2.39152571144856940e-02\n2.56500623918846189e-03\n-2.24451859966215139e-02\n-4.64518192574904648e-02\n-6.31316959316130660e-02\n-6.59255572257783917e-02\n-5.04449933329146755e-02\n-1.73472687574795954e-02\n2.55231960657233831e-02\n6.34317362359631959e-02\n7.89616722970743201e-02\n6.01037066436735101e-02\n9.42134850775174469e-03\n-5.14093142405812817e-02\n-8.79368710823112687e-02\n-7.18978472209724773e-02\n-4.74601246255973875e-03\n7.21868886804019200e-02\n9.81624360130991108e-02\n4.15080588234637629e-02\n-5.89172371586096644e-02\n-1.09357626568886743e-01\n-4.67706114486564004e-02\n7.52837865928654842e-02\n1.15144018076661470e-01\n6.17174294510409484e-03\n-1.21209284552732749e-01\n-7.62249291844835364e-02\n9.63361885613166907e-02\n1.17450186364054104e-01\n-7.71337972226847773e-02\n-1.36756820510411214e-01\n8.76211067886322886e-02\n1.34720698632789238e-01\n-1.39712766893667073e-01\n-7.90430489142483067e-02\n2.06509011646024060e-01\n-9.16105459462416977e-02\n-1.29296320962694250e-01\n2.69443268422243309e-01\n-2.73734078127650882e-01\n1.97885594326355635e-01\n-1.12621304194016100e-01\n5.28119143423775722e-02\n1.00486005669271194e-02\n1.74046867268831951e-02\n2.24266515407247312e-02\n2.63334672854541804e-02\n2.92877054583921860e-02\n3.11232782646871445e-02\n3.14796119795659676e-02\n2.98685972614809170e-02\n2.57522517574247482e-02\n1.86586774691765364e-02\n8.34807960657002121e-03\n-4.97541467881072556e-03\n-2.04344421360433438e-02\n-3.62929716900474361e-02\n-4.99128287540732962e-02\n-5.79762812751518364e-02\n-5.70897284127748830e-02\n-4.48084523945500232e-02\n-2.09567238044598703e-02\n1.11324596178568654e-02\n4.40989241203824517e-02\n6.75244986782463363e-02\n7.09195563015297126e-02\n4.84679442540294908e-02\n3.96824433332215384e-03\n-4.69119664900339781e-02\n-8.02578906159037569e-02\n-7.46709873677577352e-02\n-2.58790999262040744e-02\n4.35782503964456946e-02\n9.03536562577296337e-02\n7.61051265102171692e-02\n1.21956565622118387e-03\n-8.14365072580666982e-02\n-9.79506500393202417e-02\n-2.09405279827844341e-02\n8.46450938805558550e-02\n1.05062407851017281e-01\n1.70749968822751699e-03\n-1.12868603747261376e-01\n-8.29917927371024711e-02\n7.09602081521066852e-02\n1.27466403753020902e-01\n-2.40635845945822054e-02\n-1.46132506008633201e-01\n-5.13503307089905269e-04\n1.59368728134200693e-01\n-1.27233935176605910e-02\n-1.71270684457131311e-01\n8.04071477179452432e-02\n1.42911739358380918e-01\n-1.93985037889531808e-01\n2.43684597875927916e-02\n1.85875080094993927e-01\n-2.83218018192058829e-01\n2.55460219778136211e-01\n-1.71209078620025795e-01\n9.20232991280945101e-02\n0.0\n4.28179356057790885e-04\n1.65833151520163990e-03\n3.91826210611612765e-03\n7.36813253083935631e-03\n1.20858789675602780e-02\n1.80269567939949638e-02\n2.49662352149860045e-02\n3.24311391937575216e-02\n3.96418654757116212e-02\n4.54841026775300583e-02\n4.85496359324942839e-02\n4.72859841735826097e-02\n4.02906134558590340e-02\n2.67591379897238156e-02\n7.04208978914274558e-03\n-1.68197892729660958e-02\n-4.08111638950643327e-02\n-5.92117558749087058e-02\n-6.57026891183716127e-02\n-5.53961609726958404e-02\n-2.74532269533802956e-02\n1.26381075484344515e-02\n5.25766054104547381e-02\n7.60217438228810161e-02\n6.91075881748556137e-02\n2.90019016324740662e-02\n-2.98849428641771026e-02\n-7.78527881520652554e-02\n-8.35304636942178352e-02\n-3.54122237006650187e-02\n4.19717796090146519e-02\n9.45888885056241357e-02\n7.48722127800093423e-02\n-1.21347597988284463e-02\n-9.53710485322204482e-02\n-8.97133134415056266e-02\n1.33588206463218558e-02\n1.09896008357593528e-01\n7.87631382670401087e-02\n-5.92865815540953925e-02\n-1.25440221595058715e-01\n-7.85263963258048085e-03\n1.32653112247937577e-01\n5.70904845980605979e-02\n-1.30062212625501633e-01\n-7.88659783441465201e-02\n1.41996423364622010e-01\n6.59063930764679090e-02\n-1.74374162345432987e-01\n6.57632156950192347e-03\n1.87047611811566095e-01\n-1.58359903607742353e-01\n-4.63564633606374787e-02\n2.31541644258377838e-01\n-2.86356931154838290e-01\n2.33555376236824874e-01\n-1.46152447933365903e-01\n9.88124902073205663e-03\n1.71148253461481346e-02\n2.20552053486377832e-02\n2.59070442689563543e-02\n2.88411192755771602e-02\n3.07102852187103349e-02\n3.11805140690864305e-02\n2.97937289049134309e-02\n2.60380523070390633e-02\n1.94517986390606891e-02\n9.77288877264125173e-03\n-2.86849392787755621e-03\n-1.77367814904973997e-02\n-3.33089102368476775e-02\n-4.72075485213088036e-02\n-5.63596739074364028e-02\n-5.74889836198261561e-02\n-4.79954137673663170e-02\n-2.71427049289644506e-02\n2.73585410129374013e-03\n3.55452618572432710e-02\n6.19362698841394999e-02\n7.15810255802629275e-02\n5.72129859275849473e-02\n1.93652154785831643e-02\n-3.04993067223350567e-02\n-7.14137521387867708e-02\n-8.08162443345077086e-02\n-4.75048539402945155e-02\n1.67001591037592607e-02\n7.62830146641218093e-02\n8.92777713987940869e-02\n3.78602331395022293e-02\n-4.80351267344810429e-02\n-1.00674518206153238e-01\n-6.61357811513626492e-02\n3.60130009296088308e-02\n1.09248921621522749e-01\n6.63855102799032898e-02\n-5.96603318389714934e-02\n-1.20104555193425638e-01\n-2.15113834968217767e-02\n1.16933811156230055e-01\n8.51803182181926910e-02\n-9.08502193460129642e-02\n-1.21258041478891895e-01\n7.47926208550890453e-02\n1.37603408291284507e-01\n-8.95943515871353013e-02\n-1.32295315685865000e-01\n1.44458508339480346e-01\n7.06861838361291100e-02\n-2.07229320212124701e-01\n1.03727973753199643e-01\n1.17067563723310258e-01\n-2.67674070079418569e-01\n2.82743711080017113e-01\n-2.11114586487923306e-01\n0.0\n4.14118335539809311e-04\n1.60387341690481668e-03\n3.78987670737119826e-03\n7.12844588187571022e-03\n1.16990276395845701e-02\n1.74674664699000469e-02\n2.42324098588406651e-02\n3.15629037621806413e-02\n3.87410678756730867e-02\n4.47322569106869336e-02\n4.82141836605953292e-02\n4.77023232899969410e-02\n4.18054653610015758e-02\n2.96246133555212419e-02\n1.12630388402232447e-02\n-1.16570895290271960e-02\n-3.56650323507105294e-02\n-5.55665086453990889e-02\n-6.52947536737807921e-02\n-5.96207379115269165e-02\n-3.65216578127352393e-02\n5.01329412429122982e-04\n4.13803553438588101e-02\n7.11139636827638616e-02\n7.48718186595314361e-02\n4.57046843216274423e-02\n-8.40388071267737270e-03\n-6.32599640914111028e-02\n-8.73140733833921295e-02\n-5.99901311757048833e-02\n9.51936723338059169e-03\n7.84333039000029708e-02\n9.32571241147753804e-02\n3.25450691309358969e-02\n-6.21731262166085943e-02\n-1.06120540261439869e-01\n-4.61961632314539100e-02\n6.89315071865604645e-02\n1.13888041800954035e-01\n2.16000843800132104e-02\n-1.07068788862660622e-01\n-9.56440253799001328e-02\n6.06395636484034287e-02\n1.33092199807008066e-01\n-1.56900300687015104e-02\n-1.48902150190310112e-01\n-4.88106155723415629e-03\n1.62173144334638392e-01\n-1.29596417142417691e-02\n-1.73998757248131575e-01\n8.54620000660739204e-02\n1.42170145569944589e-01\n-2.01091860922088944e-01\n3.17704733990309754e-02\n1.88885724466506671e-01\n-2.99005039704476228e-01\n2.77424747044921371e-01\n9.90628174358909597e-03\n1.71581832939883203e-02\n2.21130515598633691e-02\n2.59843456324428332e-02\n2.89537710862750076e-02\n3.08893986255123973e-02\n3.14762504039208871e-02\n3.02765778319635456e-02\n2.67946970880865790e-02\n2.05720083647413267e-02\n1.13239040887139816e-02\n-8.81972110484897996e-04\n-1.54246085922969765e-02\n-3.09494561717498645e-02\n-4.52828019404007895e-02\n-5.55394798769341391e-02\n-5.85266595805238529e-02\n-5.15062629589567028e-02\n-3.32721059052648455e-02\n-5.31880700714012274e-03\n2.73405376210631608e-02\n5.63210080637243302e-02\n7.15575460194759760e-02\n6.47167885707673612e-02\n3.36470415160445360e-02\n-1.39453389656660019e-02\n-6.02351543546463808e-02\n-8.27020678721589741e-02\n-6.51433843589341449e-02\n-1.00129100548066920e-02\n5.61186562804804820e-02\n9.21218324374126346e-02\n6.75600465666693767e-02\n-9.42090619336313426e-03\n-8.55385352027273060e-02\n-9.48942474627580551e-02\n-1.79441058364810356e-02\n8.31510293329463246e-02\n1.05440788365417676e-01\n1.12886471040358500e-02\n-1.04310597169724253e-01\n-9.63235966433622082e-02\n4.36253255466262993e-02\n1.32084734808369381e-01\n2.36644044560816932e-02\n-1.33128217979211955e-01\n-6.98745003069397713e-02\n1.29609922253568766e-01\n8.90697433346391565e-02\n-1.44005846838533791e-01\n-7.39891161826964766e-02\n1.80861713702868021e-01\n-2.13979888115978147e-03\n-1.99119708157866115e-01\n1.63384649047068092e-01\n6.20058983725992677e-02\n-2.68526114277038985e-01\n3.32929478384723088e-01\n0.0\n4.08991201022199146e-04\n1.58401611030434719e-03\n3.74323236900609216e-03\n7.04239256314176474e-03\n1.15638999654760835e-02\n1.72826727143058113e-02\n2.40157667426148906e-02\n3.13630297971864841e-02\n3.86511961749782668e-02\n4.49015123227818128e-02\n4.88493781051756448e-02\n4.90503954017393745e-02\n4.41054313545681947e-02\n3.30208869521064624e-02\n1.56823649359321415e-02\n-6.64271692556282160e-03\n-3.09383187506131647e-02\n-5.24471962856169205e-02\n-6.53120754802560127e-02\n-6.40164769002938977e-02\n-4.55277376679348034e-02\n-1.16103962622405282e-02\n2.97144656756801115e-02\n6.48705220780943642e-02\n7.85803638891299921e-02\n6.06340854173196830e-02\n1.32747393566840267e-02\n-4.51266942463135895e-02\n-8.47637005252321885e-02\n-7.89755075364594883e-02\n-2.34237170171205447e-02\n5.27454549180041143e-02\n9.74941787276888544e-02\n7.06064934857785764e-02\n-1.71842900939388372e-02\n-9.71391908047604391e-02\n-9.14673715506812424e-02\n7.63130666382728570e-03\n1.06753357068668397e-01\n9.05660106903366652e-02\n-3.88109863482482276e-02\n-1.28014939088159030e-01\n-4.53251755191405384e-02\n1.12085452459902923e-01\n1.05007326702611634e-01\n-8.02367490513367226e-02\n-1.37629137176623617e-01\n6.31892651922866255e-02\n1.54067025739066471e-01\n-8.01901832386718444e-02\n-1.53009335404670099e-01\n1.42470200625911730e-01\n9.85212525119577159e-02\n-2.27006485496054039e-01\n7.97825932498210239e-02\n1.90728153853621518e-01\n-3.67576761576917099e-01\n1.01203215854579788e-02\n1.75289111749492334e-02\n2.25928530822310167e-02\n2.65577049498438716e-02\n2.96198332316236698e-02\n3.16604326105515421e-02\n3.23782108238523172e-02\n3.13483634037625414e-02\n2.80833904316451950e-02\n2.21211449518709004e-02\n1.31519713103659015e-02\n1.18580186579748731e-03\n-1.32557463819543142e-02\n-2.89597752515417459e-02\n-4.39197446309504830e-02\n-5.53997389670328744e-02\n-6.02629350776738640e-02\n-5.56337052027588153e-02\n-3.98776407194463209e-02\n-1.37318723517361740e-02\n1.87810302122758295e-02\n5.01999652620090178e-02\n7.08086005658524753e-02\n7.14602919523074503e-02\n4.76736879530907029e-02\n3.62750366101607458e-03\n-4.62389684737729220e-02\n-8.04172866396999225e-02\n-7.91956716552503076e-02\n-3.67281745903918905e-02\n3.01761668526625490e-02\n8.47976266179467364e-02\n8.90681581922989907e-02\n3.14794856569223305e-02\n-5.46428890190899658e-02\n-1.04185769722833832e-01\n-6.83234295489956595e-02\n3.33649993203340087e-02\n1.10787470036928959e-01\n7.85380114409976737e-02\n-4.42108743454233677e-02\n-1.24560593942314585e-01\n-5.35876533825655060e-02\n9.57984979084154226e-02\n1.20242163009290290e-01\n-3.70661165821860178e-02\n-1.47948574680354356e-01\n-1.30287273602908548e-02\n1.58251056880965718e-01\n3.66809973327234667e-02\n-1.73064673572803140e-01\n-2.24635103200496247e-02\n1.97650742704625126e-01\n-4.98929349861946744e-02\n-1.98766927376240299e-01\n1.95570984763226152e-01\n7.88667398608153963e-02\n-3.76979199351737293e-01\n0.0\n4.08257218659170066e-04\n1.58117340883592557e-03\n3.73679625007655638e-03\n7.03198888468182896e-03\n1.15530052119464932e-02\n1.72835962242737749e-02\n2.40573504983609722e-02\n3.15008760550589614e-02\n3.89789498895287689e-02\n4.55597049395495626e-02\n5.00257116304761856e-02\n5.09627317143555997e-02\n4.69575218974043612e-02\n3.69232693168357190e-02\n2.05396640727876431e-02\n-1.25935390443105886e-03\n-2.58892197548705287e-02\n-4.90205431972047939e-02\n-6.50320865009985788e-02\n-6.81989651322081891e-02\n-5.46025351807864004e-02\n-2.43847382559223523e-02\n1.64864413977334756e-02\n5.61210936070119307e-02\n7.93759149917337009e-02\n7.35342354375397161e-02\n3.55609434889084391e-02\n-2.25128190309879690e-02\n-7.45877902693205114e-02\n-9.08516676421817770e-02\n-5.54063754605299552e-02\n1.79995825684810783e-02\n8.55710806700357707e-02\n9.68811668480813876e-02\n3.39252872548480022e-02\n-6.25011674161584374e-02\n-1.11494767907637862e-01\n-5.88756390669861879e-02\n5.76628369117793901e-02\n1.21754006832570177e-01\n5.14104281908315044e-02\n-8.76766097831657848e-02\n-1.24558018406119603e-01\n7.59372880194758310e-03\n1.40075813999994164e-01\n6.56226537470750992e-02\n-1.24377140438451814e-01\n-1.13097969580272184e-01\n1.10692129733602360e-01\n1.37402098993848559e-01\n-1.22589567435353416e-01\n-1.38273650171420348e-01\n1.72979990827222957e-01\n9.27568309847965206e-02\n-2.53440933268661128e-01\n4.57787592699408566e-02\n3.62719874451400304e-01\n1.04035162556495343e-02\n1.80194187321537184e-02\n2.32271869189922958e-02\n2.73134238574600265e-02\n3.04913000291178252e-02\n3.26555476102750944e-02\n3.35181820581725853e-02\n3.26665664907883624e-02\n2.96205427490725537e-02\n2.39138992032224482e-02\n1.52121670485549018e-02\n3.46886384305751787e-03\n-1.08915650855767668e-02\n-2.67957836597743984e-02\n-4.24049486995740563e-02\n-5.51395621673603994e-02\n-6.19373274516405170e-02\n-5.98176706472839798e-02\n-4.67605211441719376e-02\n-2.27808112255427839e-02\n9.09599810599584675e-03\n4.24287583322744133e-02\n6.80752330342422052e-02\n7.64196293153143469e-02\n6.10001434371506279e-02\n2.25769444671527555e-02\n-2.82469339023388097e-02\n-7.21797673630345527e-02\n-8.77123082061140175e-02\n-6.19736738460175060e-02\n-1.38287558378847003e-03\n6.53348646876232841e-02\n9.81218383093294122e-02\n6.96624379371414970e-02\n-9.97432355127135517e-03\n-8.88428064186015248e-02\n-1.03105166793215894e-01\n-3.02811990011140619e-02\n7.62557814632821296e-02\n1.17350093054414573e-01\n4.00840464538785093e-02\n-8.79054171868693807e-02\n-1.23356974558020457e-01\n-7.73637574847608079e-03\n1.28073880352639197e-01\n9.52559065809192307e-02\n-8.29542993320156741e-02\n-1.45798003793771197e-01\n3.08230804217978840e-02\n1.69763042383745844e-01\n1.89159658138311998e-03\n-1.88253466103283890e-01\n-1.19530947297450470e-03\n2.13737429999532325e-01\n-4.76938120292999257e-02\n-2.40925908616569040e-01\n1.61556607910447403e-01\n3.30235748673201379e-01\n0.0\n4.07441359353625826e-04\n1.57801359933270441e-03\n3.72961715810105369e-03\n7.02022612127148511e-03\n1.15400207225970029e-02\n1.72818019481003199e-02\n2.40961571870891983e-02\n3.16373444685638383e-02\n3.93097771429219214e-02\n4.62312005520184588e-02\n5.12358002948842539e-02\n5.29463074589805252e-02\n4.99449161859557567e-02\n4.10632706163478606e-02\n2.57861527370567417e-02\n4.71791809323348493e-03\n-2.00027282549352509e-02\n-4.45219449243847293e-02\n-6.35494086742025427e-02\n-7.12953393091443760e-02\n-6.31190781208915697e-02\n-3.76496324905097324e-02\n1.26574861386135533e-03\n4.38035121673550770e-02\n7.57013425976346410e-02\n8.26871285739090023e-02\n5.71161322007594854e-02\n4.31953134626720733e-03\n-5.53110750291890899e-02\n-9.22163325566282416e-02\n-8.20136356537607414e-02\n-2.27983872199745002e-02\n5.58367589888793397e-02\n1.03439087620637471e-01\n8.03209625238925917e-02\n-6.73517211132825325e-03\n-9.54594654517455510e-02\n-1.07596934787456508e-01\n-1.99391190907446982e-02\n9.48711910225351757e-02\n1.18595372463897411e-01\n1.05783705541681455e-02\n-1.19265175039717314e-01\n-1.08638747757700743e-01\n4.94396594708774798e-02\n1.50961614364054336e-01\n3.30689581455162820e-02\n-1.49123938669358080e-01\n-9.60821518511437433e-02\n1.35251289491705035e-01\n1.35570182134454487e-01\n-1.36413061172734218e-01\n-1.57080673346124244e-01\n1.70362352988489230e-01\n1.66098884249172629e-01\n-2.52003044805578669e-01\n-2.86327183738081081e-01\n1.07007055150482779e-02\n1.85341656288961106e-02\n2.38929415813916440e-02\n2.81069260654309670e-02\n3.14073249253548833e-02\n3.37037102410735062e-02\n3.47229975332757207e-02\n3.40666642240763720e-02\n3.12641739250605205e-02\n2.58477295433801879e-02\n1.74603908794500676e-02\n6.00076104905033526e-03\n-8.20454427497767542e-03\n-2.42267781095713945e-02\n-4.04074497750262288e-02\n-5.43477579429069990e-02\n-6.30992384587481386e-02\n-6.36305595680224656e-02\n-5.35965329494415346e-02\n-3.23341045101068689e-02\n-1.85912562711594174e-03\n3.25296701226291327e-02\n6.25416325669597845e-02\n7.85191383555417233e-02\n7.24860464663687754e-02\n4.20340289218129742e-02\n-6.39770827929269856e-03\n-5.69326925547661844e-02\n-8.82388862325645534e-02\n-8.23587500406799816e-02\n-3.56797777870828392e-02\n3.38596581536944052e-02\n9.02459381445754882e-02\n9.66900168502468071e-02\n4.08537558484678709e-02\n-4.80396812629334466e-02\n-1.08638083965625742e-01\n-8.81625317969625677e-02\n8.46455020134544329e-03\n1.05446961613313211e-01\n1.09552533398432253e-01\n2.57946824846979521e-03\n-1.16144539336390892e-01\n-1.11799238072087262e-01\n2.88155650592135555e-02\n1.44647009275618105e-01\n7.35900478344948816e-02\n-1.10263337011440338e-01\n-1.43497608930255732e-01\n5.13374673414737359e-02\n1.79584345038283716e-01\n1.72646011668883836e-04\n-2.02349519895415414e-01\n-3.20223371775752996e-02\n2.34493500755148687e-01\n5.17131347267327027e-02\n-3.08273768003079762e-01\n-2.37454737776080116e-01\n0.0\n4.05629631675973154e-04\n1.57099680820929253e-03\n3.71332752766879558e-03\n6.99134732844231260e-03\n1.14990204543819838e-02\n1.72383972167106415e-02\n2.40778051046227695e-02\n3.17007291214198295e-02\n3.95540461183098990e-02\n4.68097499151603549e-02\n5.23607720539070870e-02\n5.48771171465904858e-02\n5.29501917225943877e-02\n4.53464943356436043e-02\n3.13716782787133164e-02\n1.13084598810068507e-02\n-1.31626576579461658e-02\n-3.87131832295068423e-02\n-6.04882937940150120e-02\n-7.27991747658350841e-02\n-7.04880381744399653e-02\n-5.08437594202000714e-02\n-1.56047717103856096e-02\n2.77821608089832590e-02\n6.66805708295220151e-02\n8.63642508677805731e-02\n7.56225076983587235e-02\n3.33002979705033023e-02\n-2.73874188777064945e-02\n-8.05534181599680266e-02\n-9.75469260227703611e-02\n-6.29354621271196735e-02\n1.13175254815470281e-02\n8.47299762390638644e-02\n1.07676632364559280e-01\n5.57558095054257880e-02\n-4.28301295626207362e-02\n-1.14826695151714175e-01\n-9.37755464392135973e-02\n1.49324360360011225e-02\n1.18128451198583173e-01\n1.07989469437663882e-01\n-2.12221543718322629e-02\n-1.36953739777730676e-01\n-9.47845129694055155e-02\n7.41969024559832602e-02\n1.57186583853687528e-01\n2.07407329486024340e-02\n-1.61251079928614482e-01\n-1.03915719758724753e-01\n1.35629118327319526e-01\n1.66137862630622246e-01\n-1.06265639222019995e-01\n-2.23168287326545589e-01\n7.36367751780475643e-02\n3.29095586888664582e-01\n1.88879747332392045e-01\n1.10124786324565863e-02\n1.90741725086814341e-02\n2.45914430020652448e-02\n2.89398196621935173e-02\n3.23698431156368496e-02\n3.48073111445460839e-02\n3.59957499874071635e-02\n3.55528754522160054e-02\n3.30203270900627233e-02\n2.79316284609425619e-02\n1.99103618327596439e-02\n8.80266786836015648e-03\n-5.16203619130459722e-03\n-2.12030664993378137e-02\n-3.78534366253875376e-02\n-5.29186013456228524e-02\n-6.36046668432150158e-02\n-6.68894545417426795e-02\n-6.01759638774395089e-02\n-4.21896634299609719e-02\n-1.39563095057112438e-02\n2.04542305385924036e-02\n5.38565597452912853e-02\n7.69965026305869105e-02\n8.09483221585172580e-02\n6.05938223280632349e-02\n1.81804501790646146e-02\n-3.47552330569173840e-02\n-7.90249079501659790e-02\n-9.40780175429673099e-02\n-6.78841623930329929e-02\n-6.38408633567181909e-03\n6.37058605787807208e-02\n1.04043126187125121e-01\n8.54146781276673289e-02\n1.05602945708833124e-02\n-7.76708783187423230e-02\n-1.16580516862856948e-01\n-6.83073567335723414e-02\n4.02262572425607229e-02\n1.22468539806334889e-01\n9.77405645849412918e-02\n-2.53150694272190058e-02\n-1.32393258089538224e-01\n-1.02611915490548808e-01\n4.94651761126975870e-02\n1.54402689152022654e-01\n6.86623381607149308e-02\n-1.19367438948557558e-01\n-1.55050809023689506e-01\n3.94479097441575999e-02\n1.94800708097476988e-01\n4.94985689993976269e-02\n-2.02703089108904666e-01\n-1.44952121541522289e-01\n1.83955979384889334e-01\n3.19156547592371109e-01\n1.44348047293494763e-01\n0.0\n4.02913842719209217e-04\n1.56047860280793173e-03\n3.68876523906220936e-03\n6.94691450917543727e-03\n1.14325172337015959e-02\n1.71569933170016911e-02\n2.40069769141019462e-02\n3.16964580028011519e-02\n3.97171730847525675e-02\n4.72994797940100159e-02\n5.34017105709126624e-02\n5.67512962204617388e-02\n5.59632774068181682e-02\n4.97575363718511798e-02\n3.72808231586351582e-02\n1.85096410557720574e-02\n-5.33547313950185394e-03\n-3.14890564327309774e-02\n-5.56271743385622700e-02\n-7.23301990419420587e-02\n-7.61548411261018937e-02\n-6.32876089344567155e-02\n-3.34792139455897600e-02\n8.37491731517906943e-03\n5.19059624618716797e-02\n8.30741526742192066e-02\n8.84599500271131961e-02\n6.12896172090578312e-02\n6.97911789915409315e-03\n-5.51298348736182983e-02\n-9.68735096827446768e-02\n-9.36613951532873634e-02\n-3.99411413865658274e-02\n4.11599547949551073e-02\n1.03733557776399629e-01\n1.03658499564101975e-01\n3.14377475786731045e-02\n-6.99507786033822104e-02\n-1.24603388898600620e-01\n-7.97248430325040447e-02\n3.94142788363014210e-02\n1.31569005740977019e-01\n1.01120041946477696e-01\n-3.78514058073895418e-02\n-1.47259138647768129e-01\n-9.50853868556727211e-02\n7.85601211801259941e-02\n1.68106117227610929e-01\n3.99226661944623376e-02\n-1.58907512648012034e-01\n-1.47924754806010056e-01\n9.03050247975144549e-02\n2.24011693729399414e-01\n2.66001234325376618e-02\n-2.61637771935697871e-01\n-2.86738730707487122e-01\n-1.06091347752520479e-01\n1.13468636520655444e-02\n1.96533443519340649e-02\n2.53406320875761183e-02\n2.98332836485802437e-02\n3.34027315288011953e-02\n3.59924492359612602e-02\n3.73642714525442357e-02\n3.71542477383181927e-02\n3.49187720057350937e-02\n3.01957696774057538e-02\n2.25928004284120729e-02\n1.19069064693961158e-02\n-1.72753884044636249e-03\n-1.76791774759626381e-02\n-3.46809320908400762e-02\n-5.07634009860760196e-02\n-6.33267722081161805e-02\n-6.94205759379322024e-02\n-6.62793664197137283e-02\n-5.21051968028337503e-02\n-2.69889977231885861e-02\n6.26719093348147502e-03\n4.17909977934729227e-02\n7.11625036939743105e-02\n8.51347872046812754e-02\n7.65302050094582020e-02\n4.37130556989819771e-02\n-6.63920084392705459e-03\n-5.91981455671321891e-02\n-9.35800623929846920e-02\n-9.20670019129534861e-02\n-4.93047507700202711e-02\n2.06965529492512644e-02\n8.59420585833055306e-02\n1.09482115641720099e-01\n7.09042039102760757e-02\n-1.50358388401698306e-02\n-9.79945262179011400e-02\n-1.18577550474550070e-01\n-5.20451338509021894e-02\n6.12543378433333396e-02\n1.32401594572911063e-01\n9.17505039696708130e-02\n-3.85237706319201054e-02\n-1.41868750856360221e-01\n-1.06256930459737955e-01\n4.92708992218138311e-02\n1.62708729729559659e-01\n9.08449823337599827e-02\n-1.03219027948913009e-01\n-1.83437193103641427e-01\n-2.36316640672235290e-02\n1.91289255669384289e-01\n1.67728385090447907e-01\n-9.86394748092494222e-02\n-2.99658714168715978e-01\n-2.41286996618807648e-01\n-7.50245905298632249e-02\n0.0\n3.99319241476669691e-04\n1.54655677205931983e-03\n3.65615916804590225e-03\n6.88734486727617286e-03\n1.13411475466630995e-02\n1.70384067404248801e-02\n2.38844930188829574e-02\n3.16249566291831805e-02\n3.97984792148065661e-02\n4.76975378508618583e-02\n5.43522279191807622e-02\n5.85575740606905024e-02\n5.89674163326555853e-02\n5.42756623334686647e-02\n4.34947053402238368e-02\n2.63176630113965554e-02\n3.51427623647129371e-03\n-2.27370818738267533e-02\n-4.87260180639053631e-02\n-6.94664053862868447e-02\n-7.94793726679201284e-02\n-7.41445409640947434e-02\n-5.14571106700596193e-02\n-1.37466449321862680e-02\n3.13638033612609682e-02\n7.15994592870081992e-02\n9.28871879979058790e-02\n8.43055253335555088e-02\n4.38434557175998024e-02\n-1.75547067146639424e-02\n-7.67230996548879246e-02\n-1.05810410272136293e-01\n-8.55639762401922827e-02\n-1.89361736144447457e-02\n6.36984789494592640e-02\n1.15248571823072882e-01\n9.82300787847082135e-02\n1.39794481749925363e-02\n-8.70563903938082473e-02\n-1.30788599170771375e-01\n-7.39523310154864000e-02\n4.98341031974460641e-02\n1.39878011101980310e-01\n1.06982747954013233e-01\n-3.39401979999830947e-02\n-1.52749451398795089e-01\n-1.17927090069558718e-01\n5.33329050317026473e-02\n1.80103904927122804e-01\n1.02306843009271328e-01\n-1.13221591952599357e-01\n-2.14403084272324157e-01\n-5.75557448977076155e-02\n2.02101193543882368e-01\n3.00508102955206302e-01\n1.91442100856859865e-01\n5.10551960462217666e-02\n1.17109773485445795e-02\n2.02840077739674662e-02\n2.61564231171821752e-02\n3.08061513067227344e-02\n3.45273550599014892e-02\n3.72827712211693321e-02\n3.88543393253774558e-02\n3.88986509787654366e-02\n3.69896157229739550e-02\n3.26729716225863040e-02\n2.55442930077882657e-02\n1.53558549499040031e-02\n2.15062933418122071e-03\n-1.35885265940918574e-02\n-3.08002589745144835e-02\n-4.77585863344144670e-02\n-6.20958382538267240e-02\n-7.09977659904127562e-02\n-7.16227984707133725e-02\n-6.17582746901414598e-02\n-4.06522685325328981e-02\n-9.85338930631632186e-03\n2.62259403577458708e-02\n6.03889623353562818e-02\n8.37215298438068051e-02\n8.77939861282637235e-02\n6.77345417681790574e-02\n2.53385117758724299e-02\n-2.91623689448086074e-02\n-7.82166801771998765e-02\n-1.01917745708583807e-01\n-8.62331795894121234e-02\n-3.16990247404067907e-02\n4.21149354935114739e-02\n1.01068290426739163e-01\n1.11304980992666280e-01\n5.96457428374614906e-02\n-3.19063822671443176e-02\n-1.10587987642364077e-01\n-1.21210908924526989e-01\n-4.63921389963441871e-02\n6.94702249676538569e-02\n1.39866548663372170e-01\n9.93888972504973905e-02\n-3.18492243321652560e-02\n-1.45395921502747605e-01\n-1.29183063642356877e-01\n1.85745602694357068e-02\n1.61695825759382489e-01\n1.44709166194912586e-01\n-3.58197848188348267e-02\n-1.98245664995138932e-01\n-1.55903399281023702e-01\n6.99919750335385726e-02\n2.66627516636060102e-01\n2.73043260369434937e-01\n1.43822063874365913e-01\n3.34292380386458365e-02\n0.0\n3.94772499706955984e-04\n1.52894731690571294e-03\n3.61483562562308746e-03\n6.81135542577646080e-03\n1.12227483694936590e-02\n1.68792482663579387e-02\n2.37052777029238479e-02\n3.14788394362647411e-02\n3.97874391647667636e-02\n4.79892196135417171e-02\n5.51922964285832748e-02\n6.02696758224194606e-02\n6.19300984575345062e-02\n5.88644110619150895e-02\n4.99796756081117358e-02\n3.47161618554997498e-02\n1.34137484323697230e-02\n-1.23447222208452438e-02\n-3.95282278919689770e-02\n-6.37375655888568898e-02\n-7.97167677210394859e-02\n-8.23820196945157651e-02\n-6.83140142840369252e-02\n-3.74407597632797490e-02\n5.61660779011434290e-03\n5.12531013803375762e-02\n8.63407016734513283e-02\n9.77515577289928689e-02\n7.74428008075213337e-02\n2.75133186475519098e-02\n-3.72764983139355563e-02\n-9.20847340556286281e-02\n-1.10757788175767216e-01\n-7.87800234742706135e-02\n-4.67911860932393019e-03\n7.79050616907711047e-02\n1.23027567343848995e-01\n9.79466671354955049e-02\n8.63149906504158751e-03\n-9.37365889078324854e-02\n-1.38163598443252822e-01\n-8.33242000386572174e-02\n4.14113720342816002e-02\n1.42915051843326951e-01\n1.30605176517013005e-01\n3.01659012344517552e-05\n-1.43080700630563995e-01\n-1.62393667543658943e-01\n-2.22000275111522635e-02\n1.56799215187809898e-01\n1.97398686439051174e-01\n4.22893020835100747e-02\n-1.80378359255572718e-01\n-2.88215764834406585e-01\n-2.28723492038610199e-01\n-1.02579949704273837e-01\n-2.10522101784165992e-02\n1.21127027365440284e-02\n2.09798165566728347e-02\n2.70564494903876816e-02\n3.18793172495504054e-02\n3.57674930776632413e-02\n3.87047631838028511e-02\n4.04951393348384064e-02\n4.08181631004591941e-02\n3.92683041152043083e-02\n3.54029643600824798e-02\n2.88104703708991806e-02\n1.92037540485999504e-02\n6.53966069295419585e-03\n-8.84434116266021898e-03\n-2.60955190820457254e-02\n-4.37464104443074861e-02\n-5.96971489596453131e-02\n-7.13347750568867345e-02\n-7.58411761986775290e-02\n-7.07170912102163263e-02\n-5.44974496620097559e-02\n-2.75518227994726653e-02\n7.23634396498818149e-03\n4.42080809230080279e-02\n7.54127680322255189e-02\n9.20782999052303930e-02\n8.70525788584515653e-02\n5.77756289441012233e-02\n8.83699019433939296e-03\n-4.71996838019563131e-02\n-9.19598761285556621e-02\n-1.06884030820830131e-01\n-8.12414117755583809e-02\n-1.95498033715246836e-02\n5.58767789714240126e-02\n1.10932058484810248e-01\n1.14588892521831381e-01\n5.73831718849805716e-02\n-3.68395002647069550e-02\n-1.16660468795273586e-01\n-1.29472704562472785e-01\n-5.74576239062042360e-02\n6.05897301703186841e-02\n1.44326524296627179e-01\n1.24934655963052560e-01\n4.14482650700540370e-03\n-1.31211592091115825e-01\n-1.66868332343533654e-01\n-5.84752163475827300e-02\n1.14547536144549572e-01\n2.02738147851799111e-01\n1.16738676333748875e-01\n-8.58683667829026054e-02\n-2.51373967039749679e-01\n-2.73389068056891560e-01\n-1.78409480372039936e-01\n-6.95763410369707735e-02\n-1.27436276357928858e-02\n0.0\n3.89142101500482371e-04\n1.50714087841952453e-03\n3.56358778030714052e-03\n6.71665660830937736e-03\n1.10734908310552958e-02\n1.66736026552038279e-02\n2.34606586475922078e-02\n3.12458399101845329e-02\n3.96671506475444122e-02\n4.81517406890714234e-02\n5.58919001932626225e-02\n6.18492174661638972e-02\n6.48043570522430085e-02\n6.34703018895197701e-02\n5.66824251651158670e-02\n4.36669001470245469e-02\n2.43677718165647324e-02\n-2.17540473083471195e-04\n-2.77808127855719705e-02\n-5.46429969162443852e-02\n-7.60247806494479539e-02\n-8.67551786988172147e-02\n-8.24402051505888911e-02\n-6.09592979378938762e-02\n-2.39498730196611130e-02\n2.22642266606593482e-02\n6.69467723552719940e-02\n9.69451805303618019e-02\n1.00469029811322136e-01\n7.19230114137256460e-02\n1.61451418559017228e-02\n-5.02227450074781145e-02\n-1.02257888246288842e-01\n-1.15634404292090626e-01\n-7.85372466075452552e-02\n-1.31070093336962674e-03\n8.27553077947779381e-02\n1.29717758196770505e-01\n1.07944005828922607e-01\n2.08578941830381906e-02\n-8.62567119809734550e-02\n-1.46288200747107439e-01\n-1.12101174127753486e-01\n4.40922080812802906e-03\n1.28054143412728860e-01\n1.65527191897446108e-01\n7.66565897063421070e-02\n-8.28538993558651793e-02\n-1.92152747172748634e-01\n-1.57457006330214477e-01\n7.95761888082690411e-03\n1.91596088441223222e-01\n2.76443193780475938e-01\n2.34418474950936317e-01\n1.30369300306800689e-01\n4.49164407090007906e-02\n7.40898795416532197e-03\n1.25623193076857317e-02\n2.17585753018151723e-02\n2.80637066007334013e-02\n3.30800361461519379e-02\n3.71541809819387406e-02\n4.02930313382670741e-02\n4.23248721289661081e-02\n4.29548690742174652e-02\n4.18014568880074253e-02\n3.84380876335925353e-02\n3.24513991729702481e-02\n2.35216631769289558e-02\n1.15267512524390853e-02\n-3.33547235406364420e-03\n-2.04202549249149594e-02\n-3.85295728304072549e-02\n-5.58630917738342364e-02\n-7.00725875100882134e-02\n-7.84675757389452222e-02\n-7.84072766900890117e-02\n-6.78805933353751473e-02\n-4.62178796278836998e-02\n-1.47995044361019217e-02\n2.24578248739088354e-02\n5.91145204862098816e-02\n8.69876247572102801e-02\n9.78346523956283298e-02\n8.58079138209390524e-02\n5.01529316061839342e-02\n-2.78308625805764789e-03\n-5.93941558391522101e-02\n-1.01473283024801825e-01\n-1.11838719244271703e-01\n-8.16979339391119691e-02\n-1.69769092326883045e-02\n6.00361128964807880e-02\n1.16625596974567119e-01\n1.23110767387751757e-01\n6.92469769014690956e-02\n-2.50035480766603972e-02\n-1.13177626222166636e-01\n-1.43566929587280012e-01\n-9.02475176739998969e-02\n2.41092897572657179e-02\n1.32665548599102234e-01\n1.61468019592604595e-01\n8.07906178438026618e-02\n-6.51427820347658670e-02\n-1.78959972997639383e-01\n-1.75519465557893217e-01\n-4.61334164972151267e-02\n1.31901844937985929e-01\n2.53125651811612340e-01\n2.62089396230249960e-01\n1.84537589011669056e-01\n8.95760449036383105e-02\n2.76067385556990272e-02\n4.13280792814786722e-03\n0.0\n3.82240900653994689e-04\n1.48041264247224529e-03\n3.50069881313491314e-03\n6.59999428224644896e-03\n1.08879437183445962e-02\n1.64131080712429066e-02\n2.31384405057401162e-02\n3.09088285739639035e-02\n3.94142035294880178e-02\n4.81538012030515092e-02\n5.64100559753140454e-02\n6.32438416529221281e-02\n6.75255616522821983e-02\n6.80177083548596934e-02\n6.35222650270778899e-02\n5.30987356692755458e-02\n3.63438749199482408e-02\n1.37016216731375186e-02\n-1.32571297800516304e-02\n-4.16752245693002496e-02\n-6.74817462012491376e-02\n-8.58052302098361724e-02\n-9.17939346037328907e-02\n-8.18138098360037813e-02\n-5.48459946367495996e-02\n-1.37278756901052686e-02\n3.42683329778116358e-02\n7.80605432511684433e-02\n1.04949021061060535e-01\n1.04287916758437391e-01\n7.18587240762761786e-02\n1.34350423764045147e-02\n-5.43890206652297148e-02\n-1.07700329328813904e-01\n-1.23314518377858645e-01\n-8.93176290477634000e-02\n-1.37119423232905033e-02\n7.42103302261491043e-02\n1.33349128594709182e-01\n1.29750102606781159e-01\n5.71489628500078742e-02\n-5.30251715895485171e-02\n-1.42064951231288039e-01\n-1.54392190065880702e-01\n-7.33024429454730148e-02\n6.12575864752922736e-02\n1.69868708757682924e-01\n1.80876646905080651e-01\n7.84207890330540919e-02\n-8.43849913377608674e-02\n-2.20342495617505102e-01\n-2.66686354529805381e-01\n-2.22002571825740985e-01\n-1.34560011706964799e-01\n-5.79972332708049501e-02\n-1.61506621666739347e-02\n-2.20901440189772954e-03\n1.30742378592749991e-02\n2.26452442425048514e-02\n2.92104309409306206e-02\n3.44465121158785970e-02\n3.87309129160849988e-02\n4.20960514757717508e-02\n4.43969999560664894e-02\n4.53675673772517968e-02\n4.46540083358938494e-02\n4.18508572105500756e-02\n3.65495930499136895e-02\n2.84059833956724662e-02\n1.72282830605494722e-02\n3.08372546369969306e-03\n-1.35859025221301572e-02\n-3.18574284247217232e-02\n-5.02557909497093405e-02\n-6.67563461461338770e-02\n-7.89010807177055462e-02\n-8.40654580287492209e-02\n-7.98939717879924710e-02\n-6.48853245363052306e-02\n-3.90519797316365019e-02\n-4.51028121935481783e-03\n3.42067065180576349e-02\n7.03527862784850688e-02\n9.58904334945666764e-02\n1.03193719270275069e-01\n8.73436645271357393e-02\n4.84968535044337026e-02\n-6.50392015321746893e-03\n-6.42425914507666340e-02\n-1.07306678980168602e-01\n-1.19364158971216647e-01\n-9.16540902675061359e-02\n-2.86036481967289584e-02\n5.03816784374494508e-02\n1.15341765276074065e-01\n1.36604539850648049e-01\n9.88598689586622503e-02\n1.21193430826720093e-02\n-8.75581571329420855e-02\n-1.51358181243966688e-01\n-1.41597406952761184e-01\n-5.49144127396594961e-02\n6.97287283663893809e-02\n1.66969183465521004e-01\n1.79755661876963124e-01\n9.35143926532159692e-02\n-5.30235711980430804e-02\n-1.89994102046095570e-01\n-2.58263706110294700e-01\n-2.42204814303729477e-01\n-1.71040962808466118e-01\n-9.13598872955143915e-02\n-3.54222169611460441e-02\n-8.98726747211510933e-03\n-1.12966532426469839e-03\n0.0\n3.73807311116689303e-04\n1.44774949064551241e-03\n3.42376937987429663e-03\n6.45682281372166912e-03\n1.06585281108412533e-02\n1.60861171878956058e-02\n2.27216825907418860e-02\n3.04440965978290401e-02\n3.89963291326382439e-02\n4.79524189061445519e-02\n5.66905906647860863e-02\n6.43816223418495898e-02\n7.00040300650811298e-02\n7.23991269062550652e-02\n7.03783419644088415e-02\n6.28909039454139812e-02\n4.92506256149966362e-02\n2.94050881229373645e-02\n4.20929401700581574e-03\n-2.43586608253592782e-02\n-5.31245025940675977e-02\n-7.78824769573395609e-02\n-9.38800544373425694e-02\n-9.66562698543158155e-02\n-8.31760415683602955e-02\n-5.30740312037457779e-02\n-9.68023487948482808e-03\n3.96056332610986647e-02\n8.40245696689493476e-02\n1.11514153596278115e-01\n1.11988062839787877e-01\n8.11670986204940104e-02\n2.37260364936095133e-02\n-4.57899750970790775e-02\n-1.05575441874577652e-01\n-1.32985264651824475e-01\n-1.13379023279568961e-01\n-4.82176089691209592e-02\n4.17113215546075569e-02\n1.21196037272284021e-01\n1.53801871480376939e-01\n1.19048964662660905e-01\n2.55202747941656038e-02\n-8.83669428795516160e-02\n-1.69321037185155371e-01\n-1.74642290220921176e-01\n-9.52541443490362849e-02\n3.76920782449858757e-02\n1.68350283814446722e-01\n2.45786195474408942e-01\n2.49625357383203239e-01\n1.95877599928158452e-01\n1.21049809141134862e-01\n5.79268615054604752e-02\n2.04110481038648969e-02\n4.75143876226350164e-03\n5.51692604529588067e-04\n1.36697878911138000e-02\n2.36767671560989199e-02\n3.05443338613243520e-02\n3.60352791056692129e-02\n4.05620230910162111e-02\n4.41854632261924271e-02\n4.67904051039005550e-02\n4.81427773051649743e-02\n4.79210822773889905e-02\n4.57467658082906237e-02\n4.12238486689600267e-02\n3.39935074183171509e-02\n2.38063675935648589e-02\n1.06118619546956196e-02\n-5.34073587905944079e-03\n-2.34013066473710458e-02\n-4.24371587271123452e-02\n-6.07975008563174796e-02\n-7.63567790240796962e-02\n-8.66702968245069427e-02\n-8.92675118312791782e-02\n-8.20878569127246743e-02\n-6.40286484579027648e-02\n-3.55259813429513877e-02\n9.65209303589727218e-04\n4.07714732605619357e-02\n7.72752588631608617e-02\n1.02813299962825427e-01\n1.10225623304713694e-01\n9.48761233519760799e-02\n5.67082216895144903e-02\n1.66501843538045683e-03\n-5.82922889829927057e-02\n-1.07164814717587875e-01\n-1.28978439026343761e-01\n-1.13194044907093755e-01\n-5.98328961118568398e-02\n1.78936886518430288e-02\n9.54537949101570554e-02\n1.44077504488166475e-01\n1.41551282312838950e-01\n8.28634241059363064e-02\n-1.43930107468044459e-02\n-1.13858245567733302e-01\n-1.73767128653331104e-01\n-1.65051163684945129e-01\n-8.56735626682809115e-02\n3.68909642303954094e-02\n1.57650186353495481e-01\n2.35055881317480619e-01\n2.49631749708906503e-01\n2.09932725930905228e-01\n1.43381751839997518e-01\n7.91319757462809886e-02\n3.43452570840467389e-02\n1.10893785710878563e-02\n2.38272256678878722e-03\n2.56733328291961090e-04\n0.0\n3.63465632219464976e-04\n1.40769634050473785e-03\n3.32935384268338028e-03\n6.28061674493623785e-03\n1.03743727857676694e-02\n1.56759464015885260e-02\n2.21861706872239148e-02\n2.98178519643342924e-02\n3.83676863439476393e-02\n4.74867210317394955e-02\n5.66540852692546393e-02\n6.51607101008187528e-02\n7.21117884411011378e-02\n7.64582776899625643e-02\n7.70680541624313847e-02\n7.28454051423423066e-02\n6.29022981387277191e-02\n4.67753617401895569e-02\n2.46684011810523462e-02\n-2.31761344519913932e-03\n-3.20241418827416913e-02\n-6.12164021726619365e-02\n-8.57824159743665604e-02\n-1.01209515573919578e-01\n-1.03353767803953181e-01\n-8.94420601800066106e-02\n-5.91455758494552342e-02\n-1.54572285569212764e-02\n3.49696064600899248e-02\n8.23602637368809065e-02\n1.15446394546696612e-01\n1.24115806951412486e-01\n1.02621570591488798e-01\n5.24708231506647998e-02\n-1.61518197164241713e-02\n-8.54850920630647604e-02\n-1.34292268722180863e-01\n-1.44383546420105979e-01\n-1.07733688435695252e-01\n-3.14612651010535357e-02\n6.20186595428698084e-02\n1.40977607392165111e-01\n1.75295044653886595e-01\n1.48439105090222095e-01\n6.52154544507138056e-02\n-4.89395819841625460e-02\n-1.57722882093155548e-01\n-2.28746720766759587e-01\n-2.46273919587036927e-01\n-2.15605347993985952e-01\n-1.57388044564930829e-01\n-9.58317830114198549e-02\n-4.79159042415754285e-02\n-1.90433111096663769e-02\n-5.67298025886471373e-03\n-1.13092663770652710e-03\n-1.13542228486958105e-04\n1.43825006956229927e-02\n2.49112219447137455e-02\n3.21404168874367194e-02\n3.79351902808301791e-02\n4.27485747015159470e-02\n4.66736945230247086e-02\n4.96286618098308388e-02\n5.14156348227435764e-02\n5.17505527523623998e-02\n5.02886213286087985e-02\n4.66555608627175003e-02\n4.04900224093142289e-02\n3.15001981223378760e-02\n1.95352901974424446e-02\n4.66933895049552981e-03\n-1.27093776299841039e-02\n-3.18155248163806553e-02\n-5.14085665602632136e-02\n-6.97828299141079883e-02\n-8.48325010689206793e-02\n-9.42168362117612179e-02\n-9.56421036936792868e-02\n-8.72583147154474964e-02\n-6.81396884342642950e-02\n-3.87798842947151903e-02\n-1.49241696750631756e-03\n3.94254192142640333e-02\n7.79144880019458641e-02\n1.06876640500315534e-01\n1.19423426369364302e-01\n1.10528701491489370e-01\n7.87795424622621532e-02\n2.77474356234858194e-02\n-3.35870420478154436e-02\n-9.18472630061229894e-02\n-1.31906146857101003e-01\n-1.40851584944852032e-01\n-1.12351459031051648e-01\n-5.00080066635876647e-02\n3.18080846785894072e-02\n1.10645572153641139e-01\n1.62055152939378971e-01\n1.67488266999481467e-01\n1.21257338088833086e-01\n3.35862215826848790e-02\n-7.20661734815475769e-02\n-1.66924929326727728e-01\n-2.27084006961357027e-01\n-2.41628861392809369e-01\n-2.15122789268674591e-01\n-1.63600589930412710e-01\n-1.06486563432876324e-01\n-5.87440706303107296e-02\n-2.68971899783960605e-02\n-9.86387410539884581e-03\n-2.72680186793414561e-03\n-5.06645053634107367e-04\n-4.75708232144266192e-05\n0.0\n3.50648923103887337e-04\n1.35805743954692075e-03\n3.21225319858685007e-03\n6.06153332096990606e-03\n1.00190917904082848e-02\n1.51574808856307815e-02\n2.14955251852859894e-02\n2.89794616217252735e-02\n3.74598111021147498e-02\n4.66660969508490425e-02\n5.61826197416582102e-02\n6.54299086569778421e-02\n7.36580085681190350e-02\n7.99591354177438263e-02\n8.33079973471737983e-02\n8.26376358121299753e-02\n7.69562748039055999e-02\n6.55056607668948604e-02\n4.79532201955281123e-02\n2.45990591780212986e-02\n-3.43472056264435173e-03\n-3.40785312237716839e-02\n-6.43097608937159143e-02\n-9.03245659222205177e-02\n-1.07931102311289759e-01\n-1.13175565382660326e-01\n-1.03158441064291007e-01\n-7.69274828501882169e-02\n-3.62590316357721057e-02\n1.39172064155960382e-02\n6.57035162721349292e-02\n1.09215029143981734e-01\n1.34379560298701434e-01\n1.33334897370044586e-01\n1.02923668525210732e-01\n4.65646721590636040e-02\n-2.52711160086666609e-02\n-9.65348665812313933e-02\n-1.49070029248733860e-01\n-1.67417100044810974e-01\n-1.43617202067953809e-01\n-8.03453361670348337e-02\n9.02334825392291616e-03\n1.03872859897362613e-01\n1.82444958450883987e-01\n2.28488810627547084e-01\n2.35939413547054166e-01\n2.09793913405479676e-01\n1.62976042336473670e-01\n1.10770551938408082e-01\n6.54144561602767183e-02\n3.30777858061132093e-02\n1.39857085170596081e-02\n4.76259050274755857e-03\n1.22782470375064020e-03\n2.13478661180329336e-04\n1.88084310200672227e-05\n1.52693485979596665e-02\n2.64472875701467422e-02\n3.41261072022845113e-02\n4.02971766067093742e-02\n4.54621536971381718e-02\n4.97514343602693254e-02\n5.31209880030797735e-02\n5.54142531417543827e-02\n5.63908691784433050e-02\n5.57480282954531600e-02\n5.31442105257777658e-02\n4.82303504160964194e-02\n4.06914436046857259e-02\n3.03000030677136219e-02\n1.69808306874336019e-02\n8.83941728767970408e-04\n-1.75409289548469800e-02\n-3.74788531319629539e-02\n-5.77081034835990464e-02\n-7.66008153107744089e-02\n-9.21859747894943904e-02\n-1.02292962170244001e-01\n-1.04786856737420164e-01\n-9.78931182216211671e-02\n-8.05886901966999664e-02\n-5.30103964404801120e-02\n-1.68036464331978823e-02\n2.46881646077632896e-02\n6.65010581967706155e-02\n1.02484758427994802e-01\n1.26132748346846874e-01\n1.31760011323499848e-01\n1.15866867248045596e-01\n7.84110703478710508e-02\n2.36290105321577543e-02\n-3.99551007428725208e-02\n-1.00578946536114988e-01\n-1.45357556876564237e-01\n-1.63141454849774326e-01\n-1.47463617614622511e-01\n-9.87170068509337778e-02\n-2.47517554259416225e-02\n6.05567377283058664e-02\n1.40595683896681534e-01\n2.00296290282246214e-01\n2.30071360385128848e-01\n2.28067581185567414e-01\n1.99944488043375834e-01\n1.56328860848573364e-01\n1.09011873799966311e-01\n6.74101265460910204e-02\n3.65605084908910624e-02\n1.70967915921299667e-02\n6.72031940192871578e-03\n2.13632814269688540e-03\n5.15838846978239080e-04\n8.42268465890239439e-05\n6.98434526551278736e-06\n0.0\n3.34437158360185516e-04\n1.29526954468193122e-03\n3.06403140353336389e-03\n5.78360650212283046e-03\n9.56612359990199543e-03\n1.44900596631472520e-02\n2.05909605544681157e-02\n2.78473289839942725e-02\n3.61627492976255571e-02\n4.53455845433267113e-02\n5.50882225970467168e-02\n6.49487379653113650e-02\n7.43388724082503088e-02\n8.25232751476746573e-02\n8.86357602629968683e-02\n9.17186223510444293e-02\n9.07904048619191661e-02\n8.49454949536071341e-02\n7.34851127389737901e-02\n5.60734218042051522e-02\n3.29047026547912222e-02\n4.85844092375149923e-03\n-2.63898306644550149e-02\n-5.83408084220358586e-02\n-8.77671185209287635e-02\n-1.10965588947878724e-01\n-1.24180620084720389e-01\n-1.24181887302922456e-01\n-1.08937493996430629e-01\n-7.82769563817664743e-02\n-3.43981062085703532e-02\n1.79468861318810707e-02\n7.17328120653275975e-02\n1.18489468680262000e-01\n1.49639755745388237e-01\n1.58162516253268354e-01\n1.40249494165843480e-01\n9.65340683519101822e-02\n3.24825191317222109e-02\n-4.23122359237024376e-02\n-1.15919738834466435e-01\n-1.76593527228967540e-01\n-2.15388754250202485e-01\n-2.28125972888102713e-01\n-2.16091470447152545e-01\n-1.85247854771013548e-01\n-1.44232225658153884e-01\n-1.01843455559484819e-01\n-6.48744539650267238e-02\n-3.69499383340586365e-02\n-1.85730894539496288e-02\n-8.08837276028573013e-03\n-2.97216970105063398e-03\n-8.86003302015461801e-04\n-2.01127522649128106e-04\n-3.09397702503569686e-05\n-2.42142330414089594e-06\n1.64382699794979915e-02\n2.84719187930247281e-02\n3.67428133496137121e-02\n4.34071178322903081e-02\n4.90276024799975937e-02\n5.37793325490142221e-02\n5.76623804175422291e-02\n6.05680575381432121e-02\n6.23076320962812555e-02\n6.26305352804597537e-02\n6.12417412039955450e-02\n5.78230018941716661e-02\n5.20607158183061247e-02\n4.36820909429092366e-02\n3.25001648241668648e-02\n1.84668434054897843e-02\n1.73127495562537407e-03\n-1.73014297196036129e-02\n-3.79187602833314513e-02\n-5.90669587490372239e-02\n-7.93472716999872874e-02\n-9.70558328985071106e-02\n-1.10279656573678997e-01\n-1.17057181965673565e-01\n-1.15604037719728533e-01\n-1.04592942990283058e-01\n-8.34615556616806614e-02\n-5.27054724996273358e-02\n-1.40987704316821501e-02\n2.92239544408875382e-02\n7.28868877870555293e-02\n1.11636975933615393e-01\n1.39957889494583015e-01\n1.52884937183914410e-01\n1.46909531963327428e-01\n1.20806051833744141e-01\n7.61837662535891635e-02\n1.75805523177305287e-02\n-4.80152865348738717e-02\n-1.12207118347451812e-01\n-1.66637330101745723e-01\n-2.04542937212688875e-01\n-2.22046445925635549e-01\n-2.18836214259876871e-01\n-1.98033028325865473e-01\n-1.65266515738364372e-01\n-1.27225011700303092e-01\n-9.01061935215939774e-02\n-5.84132689439340463e-02\n-3.43985728405566890e-02\n-1.82091622670387220e-02\n-8.54301083180236329e-03\n-3.48440151711935714e-03\n-1.20255618431867320e-03\n-3.37482205168842208e-04\n-7.22648162893001629e-05\n-1.05035619416982919e-05\n-7.77803629420258492e-07\n0.0\n3.13166748415900735e-04\n1.21288960120071137e-03\n2.86943588196773023e-03\n5.41797821627633749e-03\n8.96749136588141822e-03\n1.36003271699581974e-02\n1.93666257981594814e-02\n2.62749332451179783e-02\n3.42797771745363550e-02\n4.32669637485108075e-02\n5.30376472485748346e-02\n6.32926872727910955e-02\n7.36193895122154579e-02\n8.34833642643715984e-02\n9.22288421890594123e-02\n9.90912295064782095e-02\n1.03225791310083206e-01\n1.03755911360159395e-01\n9.98431633412732861e-02\n9.07792400485869094e-02\n7.60965065644657324e-02\n5.56896199304987571e-02\n2.99355953744395373e-02\n-2.05461598360704941e-04\n-3.31309788102816596e-02\n-6.66018811557545359e-02\n-9.78360239706785317e-02\n-1.23704139998943044e-01\n-1.41030200715259013e-01\n-1.46979203316693591e-01\n-1.39492729820464262e-01\n-1.17710103237791130e-01\n-8.22962684625772323e-02\n-3.55932194690547002e-02\n1.84743072725543390e-02\n7.47732085102448818e-02\n1.27597184573805367e-01\n1.71480176816050794e-01\n2.02047893025331438e-01\n2.16733678442631417e-01\n2.15191751798727432e-01\n1.99295143802740521e-01\n1.72700206396923295e-01\n1.40071004455289000e-01\n1.06151025754986750e-01\n7.49125875659649998e-02\n4.89867038709361421e-02\n2.94838648978347495e-02\n1.61912818796404040e-02\n8.02153984486438446e-03\n3.53258632662812894e-03\n1.35581401288204558e-03\n4.41241220230186775e-04\n1.16975170725288626e-04\n2.36975680962619714e-05\n3.26299491803044779e-06\n2.29161974028841163e-07\n1.81309908740219274e-02\n3.14037973853736260e-02\n4.05311393217934607e-02\n4.79050824242815976e-02\n5.41718745838175170e-02\n5.95636943801297961e-02\n6.41344237497904895e-02\n6.78328005717972887e-02\n7.05326444085748877e-02\n7.20492965028022153e-02\n7.21522164285715722e-02\n7.05781491877129352e-02\n6.70473067931600664e-02\n6.12841053458081098e-02\n5.30433806199188257e-02\n4.21423698052721118e-02\n2.84979562451522818e-02\n1.21676668501639520e-02\n-6.60831425161811578e-03\n-2.73682369121080217e-02\n-4.93985096751127506e-02\n-7.17187962632848675e-02\n-9.30899274712117530e-02\n-1.12051900660351172e-01\n-1.26997798083764574e-01\n-1.36286410999155033e-01\n-1.38391545567287166e-01\n-1.32079548557624799e-01\n-1.16599097300950166e-01\n-9.18598360129094377e-02\n-5.85705977837652630e-02\n-1.83056516948842951e-02\n2.65294374699774592e-02\n7.28508011974189490e-02\n1.17169662497496663e-01\n1.55965408922598026e-01\n1.86113623622892549e-01\n2.05304076970542981e-01\n2.12373360499668401e-01\n2.07481854613682570e-01\n1.92087522874156924e-01\n1.68707389174641537e-01\n1.40503872287451287e-01\n1.10775555334848452e-01\n8.24574407501237755e-02\n5.77345951627400086e-02\n3.78432505406086986e-02\n2.30825669734674374e-02\n1.30042017515204465e-02\n6.70412992211869355e-03\n3.12572763083207757e-03\n1.29816548504791199e-03\n4.70721241393479053e-04\n1.44957867049210507e-04\n3.64122350276344355e-05\n6.99769367526925988e-06\n9.14974186631180985e-07\n6.10749017540038158e-08\n0.0\n2.83253007772650762e-04\n1.09703418186663632e-03\n2.59560363350030271e-03\n4.90248992152645963e-03\n8.11992343118954005e-03\n1.23305698888106375e-02\n1.75953746192642896e-02\n2.39487325628264316e-02\n3.13915297741629643e-02\n3.98824544668138908e-02\n4.93280278952157869e-02\n5.95719648934728771e-02\n7.03847047558401329e-02\n8.14542313512237187e-02\n9.23795993056905629e-02\n1.02668862381162587e-01\n1.11743308089082574e-01\n1.18949971328084131e-01\n1.23584249479557762e-01\n1.24923987380057305e-01\n1.22275567059184576e-01\n1.15031276442961655e-01\n1.02735548865910867e-01\n8.51556474039435324e-02\n6.23502065452940998e-02\n3.47270501843495727e-02\n3.08030404740324698e-03\n-3.14034881639841459e-02\n-6.71792562423891293e-02\n-1.02423071699447657e-01\n-1.35158051196304363e-01\n-1.63419886519078905e-01\n-1.85447405122813352e-01\n-1.99876026645186666e-01\n-2.05906650545709974e-01\n-2.03421217503212348e-01\n-1.93020351297241460e-01\n-1.75968566829129341e-01\n-1.54047560256879573e-01\n-1.29335523305977751e-01\n-1.03946397508325364e-01\n-7.97732040269572285e-02\n-5.82805521189726158e-02\n-4.03817736718340842e-02\n-2.64175002085918244e-02\n-1.62295240310186550e-02\n-9.30289742778040232e-03\n-4.93655386096799285e-03\n-2.40183293445032139e-03\n-1.05865391580193939e-03\n-4.16278463131074575e-04\n-1.43099303441942058e-04\n-4.18249781188044346e-05\n-9.98165094496218835e-06\n-1.82414678869713854e-06\n-2.26989597517602290e-07\n-1.44295635646315758e-08\n2.10767459929085722e-02\n3.65059949179413895e-02\n4.71218927387101472e-02\n5.57215635980188584e-02\n6.30864843908067324e-02\n6.95329613722353024e-02\n7.51878781711504685e-02\n8.00745202870398742e-02\n8.41472601400787418e-02\n8.73084892648913480e-02\n8.94187613876851750e-02\n9.03046226183903122e-02\n8.97663248066089825e-02\n8.75866818593659530e-02\n8.35418661798736500e-02\n7.74146397976629985e-02\n6.90102412979600871e-02\n5.81748441442327263e-02\n4.48161362779041159e-02\n2.89251386411798726e-02\n1.05978951783853702e-02\n-9.94483587317837245e-03\n-3.23422215297033203e-02\n-5.60849962785580219e-02\n-8.05168962666019117e-02\n-1.04848461652122873e-01\n-1.28185140335507541e-01\n-1.49570487551515530e-01\n-1.68043618237591508e-01\n-1.82708022120875446e-01\n-1.92806599551350294e-01\n-1.97795644237434204e-01\n-1.97408910880716160e-01\n-1.91702326626889991e-01\n-1.81070749106223811e-01\n-1.66230683337689089e-01\n-1.48166993854598916e-01\n-1.28046952737859848e-01\n-1.07110617063247440e-01\n-8.65513983361403672e-02\n-6.74035591647723642e-02\n-5.04532714364873680e-02\n-3.61863907302844914e-02\n-2.47796582593853079e-02\n-1.61339090906536496e-02\n-9.93993908363650057e-03\n-5.76197641550672216e-03\n-3.12171559425506112e-03\n-1.56804683159775878e-03\n-7.23128718275073282e-04\n-3.02467558078833095e-04\n-1.12984699551376707e-04\n-3.69312607560424866e-05\n-1.02725848696827591e-05\n-2.33486185499845045e-06\n-4.06654347327358327e-07\n-4.82545421631158120e-08\n-2.92672695200677133e-09\n0.0\n2.33832606593256074e-04\n9.05629791135951373e-04\n2.14295298269811130e-03\n4.04884342782479457e-03\n6.71077608894843011e-03\n1.02038800777699418e-02\n1.45916327110616941e-02\n1.99250537222627581e-02\n2.62408197476050112e-02\n3.35585217935516489e-02\n4.18772302857500639e-02\n5.11715353609581702e-02\n6.13872666803433054e-02\n7.24371549934546416e-02\n8.41967691773292670e-02\n9.65011399729841235e-02\n1.09142555948177775e-01\n1.21870076592085236e-01\n1.34391337408166028e-01\n1.46377205683768025e-01\n1.57469765634302511e-01\n1.67293951585534645e-01\n1.75472896193867245e-01\n1.81646714684953803e-01\n1.85494016449201327e-01\n1.86754950552820764e-01\n1.85254100873923078e-01\n1.80921119261096969e-01\n1.73806707055069343e-01\n1.64091518353476407e-01\n1.52085844604769788e-01\n1.38218601086195436e-01\n1.23015170181586864e-01\n1.07064990582874858e-01\n9.09812605970135579e-02\n7.53565187073208520e-02\n6.07189017467500911e-02\n4.74942933154634192e-02\n3.59791683143319552e-02\n2.63276600979608540e-02\n1.85543595318841854e-02\n1.25519298751563448e-02\n8.12026334674639111e-03\n5.00213122137727843e-03\n2.91950896379290781e-03\n1.60518153437018331e-03\n8.25734842038016413e-04\n3.94208501751313245e-04\n1.72937293301940936e-04\n6.88667015396181331e-05\n2.45090737774332241e-05\n7.63779778246592970e-06\n2.02667155152150616e-06\n4.39675326949336808e-07\n7.31269940900796858e-08\n8.29017911192055040e-09\n4.80565353248172201e-10\n3.00034725402312658e-02\n5.19675388431782015e-02\n6.70877915675102549e-02\n7.93698201461190272e-02\n8.99699176593486832e-02\n9.94058071529398263e-02\n1.07952040109450156e-01\n1.15764299531808154e-01\n1.22930004528936196e-01\n1.29492470238583596e-01\n1.35463870509634571e-01\n1.40832948740419184e-01\n1.45570137270726430e-01\n1.49631414194330126e-01\n1.52961625367697196e-01\n1.55497700095169028e-01\n1.57172022422347568e-01\n1.57916112757062133e-01\n1.57664692220322811e-01\n1.56360127815638211e-01\n1.53957182253878500e-01\n1.50427915560074094e-01\n1.45766507874524220e-01\n1.39993698969940239e-01\n1.33160477731466664e-01\n1.25350614375814573e-01\n1.16681621123933904e-01\n1.07303764869851992e-01\n9.73968473337011725e-02\n8.71646186264174866e-02\n7.68268958756439524e-02\n6.66097064246203019e-02\n5.67340408128837043e-02\n4.74040494739643228e-02\n3.87957067551140886e-02\n3.10470531666918528e-02\n2.42510756776211991e-02\n1.84520773618231035e-02\n1.36460285380737446e-02\n9.78491945627604602e-03\n6.78461710078286789e-03\n4.53525401588334397e-03\n2.91283724177173126e-03\n1.79063464537562787e-03\n1.04900929601086236e-03\n5.82712365666299419e-04\n3.05140132541808064e-04\n1.49601547445535348e-04\n6.81100657864079612e-05\n2.85111196046297165e-05\n1.08394545720822538e-05\n3.68478655998134729e-06\n1.09733402872691800e-06\n2.78369143559769755e-07\n5.77567807259932113e-08\n9.19036429302724817e-09\n9.97101217267167161e-10\n5.53311797648239898e-11\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.08472742381388542e-03\n-4.20113124760565244e-03\n-9.90251969648426981e-03\n-1.84771170763622303e-02\n-2.97864244518314635e-02\n-4.29935124003884145e-02\n-5.62502048776087268e-02\n-6.64805016337743915e-02\n-6.94951639769335328e-02\n-6.07489836031443048e-02\n-3.70087187849701890e-02\n1.10930973807619473e-03\n4.64683006843350233e-02\n8.43432667407494757e-02\n9.54507151085634137e-02\n6.49196479072799287e-02\n-4.37546628453371750e-03\n-8.19387104591041138e-02\n-1.16402125826386982e-01\n-6.80514713575707669e-02\n4.51112437681951625e-02\n1.31643108854483243e-01\n9.06119505406491887e-02\n-6.35740425963955968e-02\n-1.55664101856450132e-01\n-3.25463011982652650e-02\n1.61062963962556399e-01\n9.14113873640488572e-02\n-1.71651781820813254e-01\n-9.17992460712520608e-02\n2.26861122079491717e-01\n-2.74638834186305171e-02\n-2.38715686972268110e-01\n3.27133758028667565e-01\n-2.52461693632194173e-01\n1.37970366908697711e-01\n-5.77226737959510572e-02\n1.91900278708997951e-02\n-5.17285234812659821e-03\n1.14295039404465238e-03\n-2.07983783328855249e-04\n3.11689067087047306e-05\n-3.82973710685585953e-06\n3.82261697502359940e-07\n-3.05284349905734929e-08\n1.90534375715001719e-09\n-8.95713424979161803e-11\n2.98382267775662062e-12\n-6.28005580839250896e-14\n6.28036983473509968e-16\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n-3.20283468138268617e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n8.08445165689827342e-13\n-1.63282067007192764e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.49153584618682711e-02\n-2.58341586690582249e-02\n-3.32116220033397275e-02\n-3.86332886759592903e-02\n-4.19352060972968538e-02\n-4.22859974032437497e-02\n-3.84603343591977051e-02\n-2.91354456526192324e-02\n-1.33735769422542814e-02\n8.66375493142438995e-03\n3.48542512856124601e-02\n6.03977488262971221e-02\n7.77935527381269643e-02\n7.82387419341021156e-02\n5.50015082023348201e-02\n8.46471169411793130e-03\n-4.91546484099385228e-02\n-9.33789301143736900e-02\n-9.58451624442848149e-02\n-4.24753634491714521e-02\n4.65584996049520153e-02\n1.13675365442407236e-01\n9.62111172949670912e-02\n-1.20719355238242849e-02\n-1.22543885941844538e-01\n-1.08867617260667501e-01\n4.32122795008925698e-02\n1.55525846583246002e-01\n4.44856381102336565e-02\n-1.56679204868117705e-01\n-9.27910168036672200e-02\n1.70832186850680245e-01\n8.35132884230644357e-02\n-2.25539034459328630e-01\n4.43192212140970654e-02\n2.19269242183260410e-01\n-3.21854692028745448e-01\n2.60382927692662802e-01\n-1.49103608459652814e-01\n6.56033227650731493e-02\n-2.30603343843918986e-02\n6.61577618876218760e-03\n-1.56781788023062688e-03\n3.08791591122133168e-04\n-5.06329993144556269e-05\n6.89739006530945087e-06\n-7.75957347905360304e-07\n7.13509751266757394e-08\n-5.27725011601396538e-09\n3.06437392918077032e-10\n-1.34576262686770477e-11\n4.20315987260463183e-13\n-8.32111971795923090e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-9.31231485683661287e-04\n-3.60664403551681084e-03\n-8.50602400394575263e-03\n-1.59003845831766355e-02\n-2.57379331178424903e-02\n-3.74429022893153773e-02\n-4.96727203528201863e-02\n-6.01209842233804345e-02\n-6.55188921569456323e-02\n-6.20485584438564761e-02\n-4.63832477729556533e-02\n-1.74258908623226814e-02\n2.15613643306100493e-02\n6.13677159501424679e-02\n8.73740714402345270e-02\n8.39387467097887224e-02\n4.30735753536244936e-02\n-2.54205416613427181e-02\n-8.96319597239925298e-02\n-1.06347499921684019e-01\n-5.01739831038397407e-02\n5.32299261477481092e-02\n1.23700123221912733e-01\n8.28396897050736464e-02\n-5.28775536891320994e-02\n-1.43085570967639686e-01\n-5.61977132639769339e-02\n1.23816025006318553e-01\n1.28765238917973951e-01\n-9.31608526655434005e-02\n-1.63492650510438126e-01\n1.06861882743359851e-01\n1.62491258203155242e-01\n-1.96459220801137896e-01\n-4.41807868984634977e-02\n2.70804866571520197e-01\n-3.14111437351427047e-01\n2.26653503225050040e-01\n-1.19973760107645350e-01\n4.96384679318883706e-02\n-1.65764998398732176e-02\n4.54921289331997394e-03\n-1.03647975975075567e-03\n1.97023114024771396e-04\n-3.12759943321989361e-05\n4.13512897657961669e-06\n-4.52475045531942631e-07\n4.05416570728018662e-08\n-2.92645637485853674e-09\n1.66078551450348462e-10\n-7.13697837991790340e-12\n2.18361705890636816e-13\n-4.23906791088685720e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367363e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n-1.61942344080973289e-09\n8.98653833493966699e-11\n-3.78065778735820891e-12\n1.13361214079692652e-13\n-2.15878791904814791e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n8.66426047764552840e-04\n3.35565365371242501e-03\n7.91595443084345055e-03\n1.48087344978570980e-02\n2.40121934498876630e-02\n3.50470844797404965e-02\n4.67621537451872737e-02\n5.71499205294295071e-02\n6.33170572602035214e-02\n6.17867458500721278e-02\n4.93218215401055385e-02\n2.43605773569870315e-02\n-1.11229334763186093e-02\n-5.00111894576891411e-02\n-7.99363085453404787e-02\n-8.61829356704887223e-02\n-5.84006514722374415e-02\n3.58940229482597776e-04\n6.73683490910389760e-02\n1.04547897847193039e-01\n7.88234561964185065e-02\n-7.40196344727397145e-03\n-9.89024440883244094e-02\n-1.13935536034448268e-01\n-1.85003343777213544e-02\n1.09092261688566117e-01\n1.21812489154462897e-01\n-2.46754972559791140e-02\n-1.53724638728994389e-01\n-5.40369786300429894e-02\n1.52844124485929489e-01\n9.28820650447558793e-02\n-1.70534777166068824e-01\n-7.46582530210938983e-02\n2.23693329402947061e-01\n-6.04428648778056812e-02\n-1.99685494680089226e-01\n3.15424575732289769e-01\n-2.67266406134374912e-01\n1.60001492639399556e-01\n-7.37993799662741007e-02\n2.73166714845997499e-02\n-8.29850452787542735e-03\n2.09615300256641487e-03\n-4.43432899576961322e-04\n7.88025564301311331e-05\n-1.17598018378678287e-05\n1.46840532288151399e-06\n-1.52341139845976699e-07\n1.29853215619237565e-08\n-8.94333513020322284e-10\n4.85518037701355783e-11\n-2.00053468434833568e-12\n5.88100400988433593e-14\n-1.09902091182217964e-15\n0.0\n0.0\n0.0\n-1.38775648385790068e-02\n-2.40366473857502247e-02\n-3.09183376927100149e-02\n-3.60490110866714675e-02\n-3.93682703078595542e-02\n-4.02329121179938673e-02\n-3.76476647717229468e-02\n-3.04822304143377576e-02\n-1.78148420603557490e-02\n5.49493293180726840e-04\n2.34201922161792198e-02\n4.75864693423650661e-02\n6.75475918537050551e-02\n7.61070536214551313e-02\n6.63258440415182837e-02\n3.49512535853120088e-02\n-1.34896496535019863e-02\n-6.41090627526219453e-02\n-9.38543479864410168e-02\n-8.10994027665983136e-02\n-2.12923912180138231e-02\n5.98341884996863235e-02\n1.10030524056330112e-01\n8.17948212773452893e-02\n-1.99064348515221000e-02\n-1.15539923940347122e-01\n-1.02747525542275245e-01\n2.93739623914327161e-02\n1.40726818170620382e-01\n7.11091388755192566e-02\n-1.14989793196826451e-01\n-1.32918431505758633e-01\n8.91485417183863205e-02\n1.61387508239882377e-01\n-1.10055601699256336e-01\n-1.53322920048713257e-01\n2.00539512712531787e-01\n2.47180274398494312e-02\n-2.54306170934596121e-01\n3.12462048980527318e-01\n-2.35681063631851012e-01\n1.30404128946312675e-01\n-5.65779096716435281e-02\n1.99041935277143658e-02\n-5.78688142169003685e-03\n1.40596016281414383e-03\n-2.87177007748138670e-04\n4.94265797874700931e-05\n-7.16154736544445315e-06\n8.70066637554330798e-07\n-8.79840153153714664e-08\n7.32143270574096396e-09\n-4.92939770466701676e-10\n2.61925496886000591e-11\n-1.05747023582451444e-12\n3.04893628200499972e-14\n-5.59323918084504584e-16\n0.0\n0.0\n0.0\n-8.08158692342989915e-04\n-3.12998515653716350e-03\n-7.38517565752149635e-03\n-1.38253132320619240e-02\n-2.24522063933630805e-02\n-3.28663626386842059e-02\n-4.40769909952560268e-02\n-5.43310572757454632e-02\n-6.10631553156686172e-02\n-6.11141009965063056e-02\n-5.13829153887050347e-02\n-3.00123716033360022e-02\n1.99912992041950330e-03\n3.92489735811246479e-02\n7.14187172436417106e-02\n8.50885006306404817e-02\n6.88163708641761074e-02\n2.08639639467000648e-02\n-4.38628639729669381e-02\n-9.38928414426828950e-02\n-9.42769126249746459e-02\n-3.17951926165290777e-02\n6.21820057924962755e-02\n1.16966777517995002e-01\n7.26997949296024210e-02\n-4.94382434623633349e-02\n-1.32194169547041912e-01\n-6.57987478006277354e-02\n9.54888521621763270e-02\n1.38115365157589182e-01\n-3.28530164553997445e-02\n-1.67792257111886223e-01\n-1.30048521049586953e-03\n1.88742910765101912e-01\n-2.51320701308221928e-02\n-2.04395439674644047e-01\n1.48084466485667726e-01\n1.07469414757189574e-01\n-2.90187851903803029e-01\n2.97112519015750698e-01\n-2.02734630968114227e-01\n1.04415761976262733e-01\n-4.27882747149507525e-02\n1.43458775460581483e-02\n-3.99957789848109143e-03\n9.36072935864134593e-04\n-1.84837054629292984e-04\n3.08416262170301266e-05\n-4.34251259324340908e-06\n5.13695069484046143e-07\n-5.06657853082752451e-08\n4.11821551403110582e-09\n-2.71191472114882765e-10\n1.41102151833627678e-11\n-5.58406190060084879e-13\n1.57966659136821553e-14\n0.0\n0.0\n1.34110082885095135e-02\n2.32285477364258114e-02\n2.98860996054554594e-02\n3.48797786234479046e-02\n3.81892381223788158e-02\n3.92471829676002693e-02\n3.71538730469372011e-02\n3.08652396695146408e-02\n1.94853920076197493e-02\n2.71067763847296405e-03\n-1.85941472740467142e-02\n-4.18117164601599367e-02\n-6.22489781836327166e-02\n-7.34866556939571952e-02\n-6.88453932375441002e-02\n-4.41692459769204224e-02\n-1.44841254376531581e-03\n4.82920127164106483e-02\n8.54732402076973929e-02\n8.84366022246835387e-02\n4.60942565828406994e-02\n-2.84199156080339639e-02\n-9.42883172677429493e-02\n-1.01381495418001205e-01\n-2.96036179400583389e-02\n7.66130663395796219e-02\n1.22433390026080946e-01\n4.51895108600385148e-02\n-9.32860514910172911e-02\n-1.30432938458461017e-01\n8.20081992983317902e-03\n1.50931262325264132e-01\n6.15593609069964576e-02\n-1.49611746094279907e-01\n-9.18975496671960018e-02\n1.70628068541547301e-01\n6.53278764101584142e-02\n-2.21263159640423035e-01\n7.57862765817949313e-02\n1.80014718045661271e-01\n-3.07891757468296778e-01\n2.73094737405840060e-01\n-1.70599706566118642e-01\n8.22652000647926263e-02\n-3.19530648431656378e-02\n1.02346436590687109e-02\n-2.74111767195971785e-03\n6.18871018390315859e-04\n-1.18270476590769932e-04\n1.91502023000594468e-05\n-2.62231259216816210e-06\n3.02252308581942185e-07\n-2.90938782209820251e-08\n2.31116975543123349e-09\n-1.48928121109455270e-10\n7.59094088571304640e-12\n-2.94583256847368901e-13\n8.17923176680597700e-15\n0.0\n0.0\n7.55578460578792250e-04\n2.92634279457469962e-03\n6.90600799850599884e-03\n1.29363300983407065e-02\n2.10376911072675983e-02\n3.08768236488992862e-02\n4.15981791441294158e-02\n5.16661078142204300e-02\n5.88016778013916441e-02\n6.01379021790062890e-02\n5.27364107796431322e-02\n3.45666628780188154e-02\n5.89504265383238111e-03\n-2.92676595184092718e-02\n-6.24162650888476569e-02\n-8.15792684392644823e-02\n-7.50796499560372615e-02\n-3.79476882498117618e-02\n2.12328593136595391e-02\n7.78173930557252286e-02\n9.85941149302572428e-02\n6.11661686758680906e-02\n-2.27622777262843357e-02\n-9.97514513295714444e-02\n-1.02888651705516226e-01\n-1.20807025458813250e-02\n1.01582608746744699e-01\n1.16455312491852439e-01\n-7.60805901610506555e-03\n-1.36066500044879080e-01\n-8.31897955472478273e-02\n1.06895593877290779e-01\n1.35737034603814116e-01\n-8.63403631011036010e-02\n-1.58775957631712761e-01\n1.13751534782348243e-01\n1.43731724342601119e-01\n-2.03878872101696557e-01\n-5.87789538391338996e-03\n2.37332242904563756e-01\n-3.09605301178792980e-01\n2.43864153707220865e-01\n-1.40753685790851485e-01\n6.38573485402233049e-02\n-2.35822617857203536e-02\n7.23183717829213590e-03\n-1.86373745437301173e-03\n4.06441527723909284e-04\n-7.52544596961842165e-05\n1.18349014785157664e-05\n-1.57729685808418275e-06\n1.77258137011227427e-07\n-1.66614437347434157e-08\n1.29420250386442746e-09\n-8.16441149024179224e-11\n4.07835591812698989e-12\n-1.55258928744955132e-13\n4.23251856697071718e-15\n1.29748046590291641e-02\n2.24730208877198974e-02\n2.89203443271613889e-02\n3.37826386444656790e-02\n3.70735103747419012e-02\n3.82919017737505599e-02\n3.66228434593737009e-02\n3.11018414527098330e-02\n2.08653274069167255e-02\n5.53264354674670028e-03\n-1.42895572599816070e-02\n-3.64739483838690190e-02\n-5.70233893226039165e-02\n-7.02447626055959923e-02\n-6.98370152504726310e-02\n-5.11337948913146156e-02\n-1.42477980967673293e-02\n3.30013877475572939e-02\n7.44602271615361216e-02\n8.97290742140010589e-02\n6.39803154654428746e-02\n6.62474528345230332e-04\n-7.10490007401951423e-02\n-1.04847531797734775e-01\n-6.65156353079946611e-02\n2.96532510682681640e-02\n1.11007035041306865e-01\n9.45749565926919389e-02\n-2.38279871472458146e-02\n-1.28234830255555182e-01\n-8.24577580450015779e-02\n8.23317203057432612e-02\n1.42175983326254834e-01\n-2.41581776181457111e-02\n-1.66715279399058058e-01\n-1.84856863588283085e-03\n1.86598622873165254e-01\n-3.24707272925996021e-02\n-1.97016239993091397e-01\n1.57410206751743498e-01\n8.71802057908291350e-02\n-2.77107436042824173e-01\n2.98443719543597608e-01\n-2.12349552082682469e-01\n1.14072588013370668e-01\n-4.88923977799044437e-02\n1.72137949930847300e-02\n-5.06402983072517469e-03\n1.25767317036228066e-03\n-2.65243772937648044e-04\n4.76286954356546386e-05\n-7.28115775407417099e-06\n9.45147478149082695e-07\n-1.03626854141031361e-07\n9.51685224181556748e-09\n-7.23195867354570885e-10\n4.46835784501288371e-11\n-2.18837865036751219e-12\n8.17541775098022728e-14\n0.0\n7.07968488715487575e-04\n2.74195016643471708e-03\n6.47197520841484748e-03\n1.21301141149080388e-02\n1.97513298530841638e-02\n2.90575945793569400e-02\n3.93078708330475216e-02\n4.91529012662425407e-02\n5.65642447017429412e-02\n5.89415058818410012e-02\n5.35217425912010991e-02\n3.81887577762012043e-02\n1.26659863802208936e-02\n-2.01568873682223502e-02\n-5.33481352313809679e-02\n-7.64032813109597614e-02\n-7.79635215846214008e-02\n-5.10203875232878162e-02\n7.47645039672664583e-04\n5.90476666753959115e-02\n9.43974333203616567e-02\n8.01097842127733856e-02\n1.32861222977138718e-02\n-7.08424179116465824e-02\n-1.10292460231499773e-01\n-6.09612044250449625e-02\n5.06065625403030739e-02\n1.23451269691122634e-01\n6.74739501839395905e-02\n-7.65659296418580576e-02\n-1.35657470885995363e-01\n-6.18618647180836558e-03\n1.47624469664143609e-01\n6.73650512139389035e-02\n-1.46985778465230976e-01\n-9.00015595357351872e-02\n1.70992902684906550e-01\n5.56035135363378979e-02\n-2.18203911549614160e-01\n9.03043044067258355e-02\n1.60312300054577500e-01\n-2.99307131693407946e-01\n2.77854027722973795e-01\n-1.80836553482089823e-01\n9.09536070344159620e-02\n-3.69603142724853131e-02\n1.24360806238899921e-02\n-3.51588474112001989e-03\n8.42644246989619110e-04\n-1.72057073015557260e-04\n2.99909204757225455e-05\n-4.46030125570664008e-06\n5.64299899789155604e-07\n-6.03979033050708685e-08\n5.42233811839169662e-09\n-4.03298549480480578e-10\n2.44158479538189318e-11\n-1.17280787071048804e-12\n1.25660850235249262e-02\n2.17650977129755230e-02\n2.80148688472692808e-02\n3.27512555097562857e-02\n3.60167101119801408e-02\n3.73681794670315676e-02\n3.60660923388668869e-02\n3.12191448689965907e-02\n2.19999105798660624e-02\n7.97469112913272958e-03\n-1.04542879731757323e-02\n-3.15646184477035227e-02\n-5.19566636005748470e-02\n-6.66026031034667454e-02\n-6.96421173402293203e-02\n-5.61774686788752559e-02\n-2.49650224833861470e-02\n1.87765639236707957e-02\n6.20631630888814970e-02\n8.64628816865110200e-02\n7.54416466240959843e-02\n2.54616812604534330e-02\n-4.47956587243744167e-02\n-9.61972512091509996e-02\n-8.88446586648543590e-02\n-1.47232458226405800e-02\n7.98957332004834875e-02\n1.13931357696995486e-01\n4.05719226435826558e-02\n-8.42089263588257364e-02\n-1.24926536482568323e-01\n-1.19412808254562228e-02\n1.30006633820307221e-01\n9.28698614339001222e-02\n-9.96723383938321050e-02\n-1.37510918608476418e-01\n8.45961868935660166e-02\n1.55716940555528233e-01\n-1.17808353074389555e-01\n-1.33744095507930871e-01\n2.06429212895509195e-01\n-1.22950986622326255e-02\n-2.19945017009354954e-01\n3.05575745127095511e-01\n-2.51167940869888306e-01\n1.50959972271455967e-01\n-7.14415918364089964e-02\n2.76102572199898137e-02\n-8.89761218574894319e-03\n2.42138232289883107e-03\n-5.60748539740517273e-04\n1.10968955842700439e-04\n-1.87928471497622447e-05\n2.72103409726876037e-06\n-3.35743493820971046e-07\n3.50998701758943935e-08\n-3.08200197424011892e-09\n2.24463787566257334e-10\n-1.33205154974024551e-11\n0.0\n6.64721423538674572e-04\n2.57445500323257330e-03\n6.07758522600758237e-03\n1.13967363290972037e-02\n1.85782722277741189e-02\n2.73904321995126418e-02\n3.71895573466432261e-02\n4.67867735477216357e-02\n5.43729554208776111e-02\n5.75895932167672375e-02\n5.38529390483070067e-02\n4.10233850992304250e-02\n1.84275708835614158e-02\n-1.19419525977376619e-02\n-4.45000192114178642e-02\n-7.01486386490793451e-02\n-7.81845081216825666e-02\n-6.04449887693185445e-02\n-1.69397473819012517e-02\n3.95860793491211588e-02\n8.42640570438786124e-02\n8.95293684295746378e-02\n4.26473939403817087e-02\n-3.74710096432531864e-02\n-1.00045595848514357e-01\n-9.12436083685649463e-02\n-3.07919270226668764e-03\n9.77442930489463291e-02\n1.09498691531181788e-01\n2.76457493593588229e-04\n-1.21176905737521337e-01\n-9.57212015692781581e-02\n6.99263442851631584e-02\n1.44712571197065376e-01\n-1.70180514681687461e-02\n-1.65492041886532687e-01\n-1.32593202125539582e-03\n1.84395657125539819e-01\n-4.01518101142324044e-02\n-1.89141571158557065e-01\n1.65849366514973728e-01\n6.72766229507452546e-02\n-2.63276954832890375e-01\n2.98598963167771736e-01\n-2.21311375920616449e-01\n1.23766691522875075e-01\n-5.53439607608452872e-02\n2.03976260392571135e-02\n-6.30794503707690201e-03\n1.65487438777846795e-03\n-3.70750379036844215e-04\n7.11778537597883705e-05\n-1.17210793946950743e-05\n1.65341926151391481e-06\n-1.99091031827781687e-07\n2.03409408147625478e-08\n-1.74771461546062353e-09\n1.24693837350385871e-10\n1.21823309947558384e-02\n2.11004162375382151e-02\n2.71642162504451001e-02\n3.17799977782120893e-02\n3.50147615201247819e-02\n3.64764193643167534e-02\n3.54926194659148653e-02\n3.12392323025121807e-02\n2.29269443335345866e-02\n1.00871622847511118e-02\n-7.03965948978038658e-03\n-2.70659524453717923e-02\n-4.71039521118699900e-02\n-6.27273017499442170e-02\n-6.85414535754725884e-02\n-5.96116843458726342e-02\n-3.37433693854726005e-02\n5.91611457979390222e-03\n4.91987654537008323e-02\n7.99571441376115272e-02\n8.13561672620124882e-02\n4.51502773468397123e-02\n-1.87387543691607816e-02\n-7.95861320079499224e-02\n-9.76110122573920491e-02\n-5.03983043127975150e-02\n4.02252836963969476e-02\n1.07602146788155023e-01\n8.50972928872941042e-02\n-2.37297627894801841e-02\n-1.18810992451741163e-01\n-8.53878271364302555e-02\n5.99162913912753836e-02\n1.38296932716369753e-01\n1.85795819486561480e-02\n-1.44138569145363687e-01\n-7.17182781609920078e-02\n1.44939239121502972e-01\n8.73217036258427531e-02\n-1.71522144292497236e-01\n-4.55580869180390452e-02\n2.14484669935683658e-01\n-1.03955213263817944e-01\n-1.40637430791127033e-01\n2.89724281620715285e-01\n-2.81534166942403519e-01\n1.90653050251486711e-01\n-9.98161218514679871e-02\n4.23261085361709699e-02\n-1.49128701842033834e-02\n4.43349188834245116e-03\n-1.12281235004890604e-03\n2.43621785116163940e-04\n-4.54158742877752380e-05\n7.27779075886823646e-06\n-1.00087514768787056e-06\n1.17678737941843347e-07\n-1.17561071060344039e-08\n9.88861749023303571e-10\n0.0\n6.25319940814807402e-04\n2.42185371682715651e-03\n5.71815611534526400e-03\n1.07277080458695051e-02\n1.75057315494395113e-02\n2.58593648258016173e-02\n3.52280968972558534e-02\n4.45615300968144612e-02\n5.22428686135434431e-02\n5.61322649658100581e-02\n5.38230215564705627e-02\n4.31956978484025270e-02\n2.32927298571769595e-02\n-4.60680729179505782e-03\n-3.60583275363343045e-02\n-6.32665980972901831e-02\n-7.63708524659756777e-02\n-6.66920073007031544e-02\n-3.15977795079579113e-02\n2.08030978084051653e-02\n7.04320723228064743e-02\n9.10466579747770260e-02\n6.40452568804670413e-02\n-4.86686434237680512e-03\n-7.83469114777470693e-02\n-1.02862151973662830e-01\n-4.80085295045309182e-02\n5.45913336372662733e-02\n1.16369577840077065e-01\n6.45196089782962695e-02\n-6.52422130111356829e-02\n-1.29179339283161665e-01\n-2.91153033164472351e-02\n1.23213039986118503e-01\n1.00545269626018383e-01\n-9.33759797366515570e-02\n-1.38459018903673542e-01\n8.37847774558776043e-02\n1.52248394231236067e-01\n-1.22103038931645605e-01\n-1.23388883243706005e-01\n2.08154318706997687e-01\n-2.97560857136399473e-02\n-2.02209710545618704e-01\n3.00410862744196205e-01\n-2.57561590652308492e-01\n1.60962026776198142e-01\n-7.92931956388729098e-02\n3.19848335625622371e-02\n-1.07964998064545639e-02\n3.09063131804708600e-03\n-7.56561191268908910e-04\n1.59145245924192409e-04\n-2.88328640331386779e-05\n4.49953657160366732e-06\n-6.03655674057244787e-07\n6.93424329395009717e-08\n-6.77681472042097395e-09\n1.18213227699655900e-02\n2.04751316502512562e-02\n2.63635671491319577e-02\n3.08638457527521254e-02\n3.40638849049069506e-02\n3.56165174143144234e-02\n3.49094589065040983e-02\n3.11801542818346059e-02\n2.36780822880740364e-02\n1.19134788091799365e-02\n-4.00098765748429629e-03\n-2.29548613155700042e-02\n-4.24983131672795333e-02\n-5.87437035094551946e-02\n-6.67629799171258476e-02\n-6.17165632545593965e-02\n-4.07698738390560381e-02\n-5.44855015853505306e-03\n3.65116832052550105e-02\n7.13124284833043104e-02\n8.27371027363280193e-02\n5.96423954525473199e-02\n5.05189253020446073e-03\n-5.86416553390106399e-02\n-9.53263104955177493e-02\n-7.48700693643695042e-02\n5.53353799796917523e-04\n8.37342506047534657e-02\n1.05502784523502799e-01\n3.30742023532312746e-02\n-7.98600905330196370e-02\n-1.18295642232478501e-01\n-2.20763014599546226e-02\n1.12166376762421569e-01\n1.06071661934992512e-01\n-5.85161201359420610e-02\n-1.46133899474173323e-01\n1.12803032574627232e-02\n1.64209463339996115e-01\n-1.18211299924126506e-04\n-1.82088477876181237e-01\n4.80721277291817836e-02\n1.80768950970031261e-01\n-1.73365536963801359e-01\n-4.78114838209441131e-02\n2.48761189732802923e-01\n-2.97594655336218816e-01\n2.29573479722112200e-01\n-1.33440786087180241e-01\n6.21169875307136660e-02\n-2.39008215144763426e-02\n7.74437852588081687e-03\n-2.13783614723025636e-03\n5.06428446028777345e-04\n-1.03377881130257892e-04\n1.82169930550946984e-05\n-2.77042692765709484e-06\n3.62803868771622499e-07\n-4.07384516307503621e-08\n0.0\n5.89321190941243683e-04\n2.28243115808255802e-03\n5.38967686830172689e-03\n1.01157380915798921e-02\n1.65226548270315382e-02\n2.44503824808341291e-02\n3.34096805897094243e-02\n4.24701098247879105e-02\n5.01838424693823032e-02\n5.46082328682818696e-02\n5.35077454085818444e-02\n4.48129950870239172e-02\n2.73686516802231390e-02\n1.88995208827095681e-03\n-2.81369562423967289e-02\n-5.60957839084405621e-02\n-7.30533249143216906e-02\n-7.02604079886717942e-02\n-4.32662669700152810e-02\n3.56349411739561965e-03\n5.46970405306516014e-02\n8.64961064673453184e-02\n7.75396406463650656e-02\n2.36889535147495681e-02\n-5.08736111896931006e-02\n-9.89833470138812982e-02\n-7.87054600378970098e-02\n7.50322829626175886e-03\n9.61196598596424367e-02\n1.01762627473861028e-01\n2.07681777448423359e-03\n-1.10169072451711314e-01\n-9.92776581962933335e-02\n4.39718281149669571e-02\n1.39027676683379398e-01\n2.91343161329352882e-02\n-1.40701156336185129e-01\n-7.48388001145811194e-02\n1.43427095283626238e-01\n8.39585101380395382e-02\n-1.72119922726610086e-01\n-3.52587445103570984e-02\n2.10086244073243528e-01\n-1.16700795176406594e-01\n-1.21052025097695373e-01\n2.79199523449733034e-01\n-2.84129050981679954e-01\n1.99993054559034850e-01\n-1.08803197114665004e-01\n4.80351446514794347e-02\n-1.76731359755153312e-02\n5.50669879001570908e-03\n-1.46789588524371545e-03\n3.36869058447282878e-04\n-6.67918708210253880e-05\n1.14567132482465549e-05\n-1.69905031626417236e-06\n2.17312671363216072e-07\n1.14810961510817405e-02\n1.98858418602570579e-02\n2.56086494812487984e-02\n2.99983126917679269e-02\n3.31605849222938523e-02\n3.47880098519996392e-02\n3.43221026716766034e-02\n3.10567130358838511e-02\n2.42798986966619931e-02\n1.34910773065032609e-02\n-1.29772785117031482e-03\n-1.92055721467225826e-02\n-3.81570505875258176e-02\n-5.47438706393781546e-02\n-6.44899004336469128e-02\n-6.27374449206802298e-02\n-4.62477216630585719e-02\n-1.52978242747897723e-02\n2.44330115277181410e-02\n6.14065474777472503e-02\n8.05843393406068392e-02\n6.92977495689079681e-02\n2.54128974927941287e-02\n-3.62079734937821099e-02\n-8.49740451185451856e-02\n-8.80894104623165392e-02\n-3.36281053836600466e-02\n5.07776704891102493e-02\n1.04298157615586251e-01\n7.45522449511563656e-02\n-2.72039580061101752e-02\n-1.12015753032121052e-01\n-8.36377825626318377e-02\n4.59931116089051309e-02\n1.30166204754059545e-01\n4.39520994744900806e-02\n-1.16164025294546447e-01\n-1.06563598838966059e-01\n8.80100185426278547e-02\n1.38745178475310593e-01\n-8.37854798192589623e-02\n-1.48394354552302543e-01\n1.26527607511265877e-01\n1.12697790961016994e-01\n-2.09028239132818316e-01\n4.64606604297146050e-02\n1.84194140240883042e-01\n-2.94151256499288027e-01\n2.63018419847291740e-01\n-1.70700555361503525e-01\n8.73726944748470791e-02\n-3.66997878390362409e-02\n1.29394222274626519e-02\n-3.88326546604496250e-03\n1.00083882679753646e-03\n-2.22738611786238905e-04\n4.29319086897858376e-05\n-7.17328569695190938e-06\n1.03803551236729479e-06\n0.0\n5.56344292299619471e-04\n2.15471217883397761e-03\n5.08869531598967265e-03\n9.55453632721922283e-03\n1.56194517105952974e-02\n2.31511702355898311e-02\n3.17217631407402390e-02\n4.05050399703737185e-02\n4.82019038908737887e-02\n5.30473059288245757e-02\n5.29687277720981842e-02\n4.59667136022810438e-02\n3.07542697375635422e-02\n7.60413546127697813e-03\n-2.07977585866933774e-02\n-4.88845610799003502e-02\n-6.86683142634232357e-02\n-7.16313910980103247e-02\n-5.21471151806083486e-02\n-1.16488813998078516e-02\n3.84130739793669546e-02\n7.76330601895132977e-02\n8.39607145300630964e-02\n4.65010006569957987e-02\n-2.20976579044204549e-02\n-8.40153593288840289e-02\n-9.41423364567535587e-02\n-3.41193135553424440e-02\n6.01213678893820005e-02\n1.10232582950838043e-01\n5.86633831057258234e-02\n-5.95481821130975225e-02\n-1.22003815185110193e-01\n-4.12148352804689658e-02\n1.02078752396016978e-01\n1.13987702950387487e-01\n-4.82185192731966125e-02\n-1.46755160919296829e-01\n6.79812221265232910e-03\n1.62917352535521892e-01\n-2.35759542455110790e-03\n-1.79632425428654652e-01\n5.61397497419092659e-02\n1.71904292757233457e-01\n-1.79929334195702673e-01\n-2.88387992510367210e-02\n2.33627412674774187e-01\n-2.95450906730767793e-01\n2.37093041746666622e-01\n-1.43037960909458223e-01\n6.91828800018606943e-02\n-2.77243329678604558e-02\n9.38553150388204450e-03\n-2.71698148855154149e-03\n6.77834598107144963e-04\n-1.46431685140449699e-04\n2.74593075543441502e-05\n-4.47225282588858650e-06\n1.11599067817644455e-02\n1.93295255537484986e-02\n2.48956631591206769e-02\n2.91793775056841571e-02\n3.23016350101139604e-02\n3.39901823342762671e-02\n3.37348284551277494e-02\n3.08810825911888034e-02\n2.47547622207678134e-02\n1.48522408381919074e-02\n1.10661655402333539e-03\n-1.57913723555497716e-02\n-3.40863700439440337e-02\n-5.07946079490156008e-02\n-6.18681658441596546e-02\n-6.28852023693760448e-02\n-5.03792355131584199e-02\n-2.36835608498917882e-02\n1.32319171523334698e-02\n5.09141015458664803e-02\n7.58053600159690616e-02\n7.47102721918929402e-02\n4.18437885658734104e-02\n-1.43290804933345044e-02\n-6.94119221729980612e-02\n-9.14267507813764230e-02\n-5.95127327686964872e-02\n1.57135016534224389e-02\n8.71928647121409522e-02\n9.66113638808956537e-02\n2.36269775841828344e-02\n-7.86990117875191464e-02\n-1.11511695037307651e-01\n-2.56217393275318776e-02\n9.89161570802818690e-02\n1.09639425744842020e-01\n-2.91114023278490758e-02\n-1.38396527709607975e-01\n-3.80299476435040015e-02\n1.37462002119449395e-01\n7.69073868215043588e-02\n-1.42394360988964103e-01\n-7.99924978778680101e-02\n1.72700721959108683e-01\n2.47686404423209106e-02\n-2.04999606054477757e-01\n1.28506518465900332e-01\n1.01619816381435718e-01\n-2.67791873866327523e-01\n2.85636749979300164e-01\n-2.08803410809684092e-01\n1.17864458293397575e-01\n-5.40692536451883379e-02\n2.07229854626299961e-02\n-6.74784803301651127e-03\n1.88680916053327497e-03\n-4.56148360865447845e-04\n9.57383338805568526e-05\n-1.74798668763076041e-05\n0.0\n5.26060208431687994e-04\n2.03742242635833026e-03\n4.81222728295920520e-03\n9.03865364608370629e-03\n1.47877709100816563e-02\n2.19508793994388635e-02\n3.01529755206635490e-02\n3.86587443033095737e-02\n4.63002694342065160e-02\n5.14723286177414877e-02\n5.22560355717860275e-02\n4.67344377440332553e-02\n3.35391964584646207e-02\n1.25985854620608365e-02\n-1.40659420224440168e-02\n-4.18104004933631257e-02\n-6.35669308927447468e-02\n-7.12438481401913987e-02\n-5.85283177700613236e-02\n-2.46231979079918339e-02\n2.25439384544917805e-02\n6.59881590843552357e-02\n8.45031839444592703e-02\n6.30239398532280448e-02\n4.85365331089726137e-03\n-6.23669383588087226e-02\n-9.60139423631518191e-02\n-6.51405864456049144e-02\n1.89290819760899592e-02\n9.55638017657012007e-02\n9.34139678813425550e-02\n-2.04609375410480147e-04\n-1.02681446385788619e-01\n-9.81165960333751502e-02\n2.73472193048817300e-02\n1.28719246028270673e-01\n5.66017974118241673e-02\n-1.09193823940498758e-01\n-1.11220868175649037e-01\n8.35458870500702389e-02\n1.38490837339674572e-01\n-8.44883716697943515e-02\n-1.44169936876420518e-01\n1.30986562658983008e-01\n1.01705497584654886e-01\n-2.09034067335197471e-01\n6.23655794190096230e-02\n1.65968114568319142e-01\n-2.86840746391385515e-01\n2.67516030166905727e-01\n-1.80118119271898386e-01\n9.56388344927921602e-02\n-4.17461131737535823e-02\n1.53358098629574283e-02\n-4.81098845987686270e-03\n1.30099486822005789e-03\n-3.05094202479473892e-04\n6.22654325397774608e-05\n1.08562002411499922e-02\n1.88034903948132819e-02\n2.42212168350570620e-02\n2.84034271551438892e-02\n3.14840599916509922e-02\n3.32221507478658931e-02\n3.31509545850536685e-02\n3.06633018653790328e-02\n2.51215504787370737e-02\n1.60248269187710374e-02\n3.24471755359797762e-03\n-1.26857419044378306e-02\n-3.02847873722667665e-02\n-4.69433707279547918e-02\n-5.90131099253793229e-02\n-6.23385784768083970e-02\n-5.33559701718271384e-02\n-3.07004195169145247e-02\n3.05834819945097810e-03\n4.03357784542994549e-02\n6.91805099829446296e-02\n7.65667023087481108e-02\n5.42952222551203387e-02\n5.65293600576889741e-03\n-5.10765343429560731e-02\n-8.69023009752324105e-02\n-7.62913872852972880e-02\n-1.65353690050460932e-02\n6.06016384675059153e-02\n1.00327018902141976e-01\n6.30109548848744039e-02\n-3.29719682687670337e-02\n-1.07082550840176330e-01\n-7.91360272830659156e-02\n3.84723143639115195e-02\n1.21683907928395146e-01\n5.76273782104754773e-02\n-9.15597814670053300e-02\n-1.19910220045311156e-01\n3.90687242644234059e-02\n1.46815895477085151e-01\n-3.43574715830866767e-03\n-1.61639490917517337e-01\n5.28435715918929537e-03\n1.76985384012562669e-01\n-6.42716602417725824e-02\n-1.62560944644226130e-01\n1.85517883345590495e-01\n1.04128979344080101e-02\n-2.17945078039475548e-01\n2.92191663588880601e-01\n-2.43831171333054902e-01\n1.52501908646654916e-01\n-7.65106123847272279e-02\n3.18665967036995332e-02\n-1.12426152679469329e-02\n3.40289877873288429e-03\n-8.90988996682897131e-04\n2.02871659241031017e-04\n0.0\n4.98183510901151270e-04\n1.92945644107529995e-03\n4.55768257490985797e-03\n8.56335106798918402e-03\n1.40203151846589845e-02\n2.08399317808660861e-02\n2.86930306967641408e-02\n3.69237489207532021e-02\n4.44801085899473175e-02\n4.99006942527955161e-02\n5.14103125976084832e-02\n4.71817956151718634e-02\n3.58035401191321087e-02\n1.69383156866249295e-02\n-7.94149448684412958e-03\n-3.49959859541293106e-02\n-5.80264458818827850e-02\n-6.94835416134419320e-02\n-6.27332646983077974e-02\n-3.53350777298837571e-02\n7.73227732265805139e-03\n5.28136582715646868e-02\n8.04606118000883858e-02\n7.34675149077349543e-02\n2.80593025589832151e-02\n-3.78044414424062933e-02\n-8.73254180838161226e-02\n-8.38398763751270759e-02\n-1.95818682092641222e-02\n6.62359266703002325e-02\n1.04347510871749621e-01\n5.08162243582498327e-02\n-5.78556924944958126e-02\n-1.15312711076369201e-01\n-4.62804025221860982e-02\n8.61566734764701581e-02\n1.17016256977132194e-01\n-1.55336972857856095e-02\n-1.36835434443362630e-01\n-4.54491249528922656e-02\n1.34514698493470558e-01\n7.80717185192638802e-02\n-1.41781245150567753e-01\n-7.54894917715944053e-02\n1.73188473644249774e-01\n1.41481138281491156e-02\n-1.99224637291094714e-01\n1.39341692965135322e-01\n8.24055809246548171e-02\n-2.55562962192533216e-01\n2.86059634904410220e-01\n-2.17034110758190624e-01\n1.26948953332975761e-01\n-6.04075353069179061e-02\n2.40664389960509144e-02\n-8.16873041019114572e-03\n2.38878760073517847e-03\n-6.06248360602072928e-04\n1.05685883161478374e-02\n1.83053319278468629e-02\n2.35822777243802767e-02\n2.76672109104463618e-02\n3.07051221806715034e-02\n3.24829253820084693e-02\n3.25730437168219727e-02\n3.04116726501862458e-02\n2.53962388482461381e-02\n1.70329004536673469e-02\n5.14571325666035150e-03\n-9.86306607774376128e-03\n-2.67456171018387694e-02\n-4.32228781265263234e-02\n-5.60151473741269668e-02\n-6.12474672994239994e-02\n-5.53534843586028016e-02\n-3.64660128683766752e-02\n-6.02306893619253617e-03\n3.00296406215938977e-02\n6.13548606729672624e-02\n7.55579561864915816e-02\n6.30017759729747523e-02\n2.29583672553500158e-02\n-3.18809784850636602e-02\n-7.66786784321679404e-02\n-8.44577540792558895e-02\n-4.30281287603903953e-02\n3.02245395692273093e-02\n8.95490697255462431e-02\n8.68581535554255602e-02\n1.28410208542126640e-02\n-7.95159729628681367e-02\n-1.04739652102338696e-01\n-2.47654349891446197e-02\n8.99840432887533404e-02\n1.08411936230554007e-01\n-9.86014521385458059e-03\n-1.25533736133592200e-01\n-6.72705095472393988e-02\n1.02528569385287815e-01\n1.14763967487169299e-01\n-7.99363962155394681e-02\n-1.37785042603827651e-01\n8.57936542856699430e-02\n1.39584868452345967e-01\n-1.35394948766838025e-01\n-9.04496098345067001e-02\n2.08163023106760880e-01\n-7.74293641661014387e-02\n-1.47602918123473398e-01\n2.78526449784281427e-01\n-2.71036473746189110e-01\n1.89159368735772632e-01\n-1.04048830288182514e-01\n4.71120715286514474e-02\n-1.79934958860576769e-02\n5.88530621308105094e-03\n-1.66484848588131762e-03\n0.0\n4.72466103133126658e-04\n1.82985334908211542e-03\n4.32280859590169261e-03\n8.12450007488367543e-03\n1.33107007330571098e-02\n1.98098718373887414e-02\n2.73326559289214163e-02\n3.52928510607631932e-02\n4.27411575676325400e-02\n4.83455765272678348e-02\n5.04645706485282314e-02\n4.73642268808932704e-02\n3.76182777036196403e-02\n2.06874188166966261e-02\n-2.40756594403018298e-03\n-2.85222876674274782e-02\n-5.22620656086027688e-02\n-6.66806689581108947e-02\n-6.50885185146788253e-02\n-4.38806175589895389e-02\n-5.63023711550131051e-03\n3.90828867711229266e-02\n7.30669145360072908e-02\n7.84831802245430782e-02\n4.65572844239395892e-02\n-1.32114373094700133e-02\n-7.14192000232353047e-02\n-9.08007183544231322e-02\n-5.05807118999748243e-02\n3.05807121101853811e-02\n9.51787380236284453e-02\n8.43770536554317163e-02\n-5.26381792011503934e-03\n-9.79267004334623825e-02\n-9.44363249392095455e-02\n1.78121150844068772e-02\n1.18315187840052766e-01\n7.14297196358122249e-02\n-8.10700290738568807e-02\n-1.24227794887529927e-01\n3.10501343338072285e-02\n1.46495720930592599e-01\n-1.07061499330766280e-03\n-1.60381768000226244e-01\n8.80525193396333727e-03\n1.74109016113470655e-01\n-7.23920978261576725e-02\n-1.52759091976900407e-01\n1.90114668542147786e-01\n-7.41224017358757797e-03\n-2.01785883796040483e-01\n2.87845249301313166e-01\n-2.49753426270174772e-01\n1.61777406605418367e-01\n-8.40670565969834915e-02\n3.63235847042069002e-02\n-1.33257431255175522e-02\n4.20624680602386600e-03\n1.02958939419332072e-02\n1.78330114167689208e-02\n2.29762741111604052e-02\n2.69679711781841518e-02\n2.99624962748141141e-02\n3.17716597073583878e-02\n3.20032658389533611e-02\n3.01332707206465392e-02\n2.55925478609044452e-02\n1.78973948167145472e-02\n6.83557285220979909e-03\n-7.29910015842882148e-03\n-2.34589196742269156e-02\n-3.96549375125248710e-02\n-5.29448886730657792e-02\n-5.97368678195201383e-02\n-5.65294651021522737e-02\n-4.11077758022247719e-02\n-1.40070270671655145e-02\n2.02405302695077387e-02\n5.28451712729639603e-02\n7.23283747338228367e-02\n6.83588269385712738e-02\n3.72291016960728527e-02\n-1.32229689357184054e-02\n-6.27646580490505146e-02\n-8.52370485948283213e-02\n-6.24329560287171584e-02\n4.33845784408188825e-04\n6.90839327338496761e-02\n9.51377306021501806e-02\n5.05333486969393522e-02\n-4.01030015255414291e-02\n-1.03229013555342850e-01\n-7.28365308768913061e-02\n3.56105357741141118e-02\n1.14284525036779133e-01\n6.38291963922816424e-02\n-7.27300249222485318e-02\n-1.21939394500833062e-01\n3.31479545711461801e-03\n1.34680189902797814e-01\n5.15661969423365785e-02\n-1.31913541046608185e-01\n-7.84528985051944766e-02\n1.41527352719140714e-01\n7.05055887529939529e-02\n-1.73517083578887232e-01\n-3.45600878689305592e-03\n1.92771061666746124e-01\n-1.49180588268087000e-01\n-6.34758378640259552e-02\n2.42579921510975183e-01\n-2.85407665903309904e-01\n2.24640858218696227e-01\n-1.36006817746320785e-01\n6.70271831338360574e-02\n-2.77056501265814069e-02\n9.78055192454186685e-03\n0.0\n4.48706598044561135e-04\n1.73783318155997088e-03\n4.10577697269279805e-03\n7.71875040917622494e-03\n1.26537500766877482e-02\n1.88538513691182130e-02\n2.60643704331767340e-02\n3.37603301633886757e-02\n4.10835231071754042e-02\n4.68184306377133208e-02\n4.94472831891596409e-02\n4.73301228127195051e-02\n3.90472324432914603e-02\n2.39080308090849417e-02\n2.56362813225246081e-03\n-2.24395929095520877e-02\n-4.64393642405305299e-02\n-6.31142056721177153e-02\n-6.59067052522024910e-02\n-5.04297993458268021e-02\n-1.73408099752012622e-02\n2.55177200945361712e-02\n6.34149924343515581e-02\n7.89392114475239715e-02\n6.00848945757284161e-02\n9.41571048384392227e-03\n-5.13973972447074601e-02\n-8.79123936004842510e-02\n-7.18747401485025916e-02\n-4.74000375942891083e-03\n7.21696252359966539e-02\n9.81330358060772678e-02\n4.14901842188104275e-02\n-5.89060031152681546e-02\n-1.09325148060054722e-01\n-4.67488738810872689e-02\n7.52688408229686273e-02\n1.15106321181779367e-01\n6.15795460753926736e-03\n-1.21176747593937068e-01\n-7.61891493853781854e-02\n9.63176324399482170e-02\n1.17401796238153319e-01\n-7.71260351336876399e-02\n-1.36699501046852356e-01\n8.76124972851024808e-02\n1.34654153578568830e-01\n-1.39681537244863402e-01\n-7.89778715878539789e-02\n2.06424514368634932e-01\n-9.16136950891863477e-02\n-1.29183302482617113e-01\n2.69278033380032311e-01\n-2.73584206024428123e-01\n1.97783551208375735e-01\n-1.12565400710910340e-01\n5.27863892135712331e-02\n-2.09198369075334345e-02\n1.00386066359417665e-02\n1.73873767306492281e-02\n2.24043456128042717e-02\n2.63072694602694279e-02\n2.92585512316384556e-02\n3.10922581772020076e-02\n3.14481623671666460e-02\n2.98386263986608613e-02\n2.57261927682638364e-02\n1.86394324387782924e-02\n8.33880749186320831e-03\n-4.97171092970988965e-03\n-2.04155491741684521e-02\n-3.62582849290219444e-02\n-4.98642324077159943e-02\n-5.79188486597823488e-02\n-5.70318893827796158e-02\n-4.47612236259561716e-02\n-2.09316903142138105e-02\n1.11264044853944914e-02\n4.40594991061190044e-02\n6.74593070023054853e-02\n7.08468222745568948e-02\n4.84128897509847334e-02\n3.95450556837256394e-03\n-4.68739374037496423e-02\n-8.01803427948364067e-02\n-7.45893250028090427e-02\n-2.58382315693500876e-02\n4.35493940531957724e-02\n9.02664941544155663e-02\n7.60148617254352010e-02\n1.19450633544533635e-03\n-8.13687478636128253e-02\n-9.78396819145929131e-02\n-2.08869220561672848e-02\n8.45800101411255251e-02\n1.04936082797808666e-01\n1.66137208497327878e-03\n-1.12766120412398627e-01\n-8.28604871986031027e-02\n7.09329384149176567e-02\n1.27300690070361766e-01\n-2.41102583282156654e-02\n-1.45957321655434014e-01\n-4.18708486255479678e-04\n1.59171578925185631e-01\n-1.28261058066830406e-02\n-1.71011750106836558e-01\n8.04327281724760007e-02\n1.42575493816951726e-01\n-1.93750409129220202e-01\n2.45620409322882122e-02\n1.85304053181605616e-01\n-2.82543660251240281e-01\n2.54912219707395415e-01\n-1.70863138081238597e-01\n9.18445844621204183e-02\n-4.11008080235954754e-02\n0.0\n4.26962594116606575e-04\n1.65361901646713413e-03\n3.90712687381452196e-03\n7.34718915654752371e-03\n1.20515111469241838e-02\n1.79756541537706288e-02\n2.48950892994785553e-02\n3.23385244063386854e-02\n3.95282892010741446e-02\n4.53531417638700848e-02\n4.84087826152260550e-02\n4.71471131719042799e-02\n4.01696814360201840e-02\n2.66746887318905675e-02\n7.01223761321797482e-03\n-1.67819079494319623e-02\n-4.07028963672808955e-02\n-5.90460156683336873e-02\n-6.55104221650193719e-02\n-5.52236148043136268e-02\n-2.73520742492833792e-02\n1.26275605933393528e-02\n5.24451533907355702e-02\n7.58057269307450265e-02\n6.88874499068061891e-02\n2.88770572521438000e-02\n-2.98424972232386281e-02\n-7.76477449218318377e-02\n-8.32645258131638755e-02\n-3.52462199024960732e-02\n4.19140071412289275e-02\n9.43251237558068029e-02\n7.45882730473866051e-02\n-1.21990755220744897e-02\n-9.51312157999032737e-02\n-8.93696296990435651e-02\n1.34548911678190174e-02\n1.09603774750106214e-01\n7.83886239833405801e-02\n-5.92636181079544411e-02\n-1.24995495050910344e-01\n-7.59461893778735041e-03\n1.32277211869628653e-01\n5.66298010422188469e-02\n-1.29762042065211802e-01\n-7.82663838068531903e-02\n1.41660145945829152e-01\n6.52173147663050734e-02\n-1.73768865831887498e-01\n7.15895452049798101e-03\n1.85888912921309601e-01\n-1.58089680024454310e-01\n-4.50998669768611499e-02\n2.29315049563691697e-01\n-2.84115768412474379e-01\n2.31899668181799440e-01\n-1.45177166789255463e-01\n7.39962387184929932e-02\n9.81323070585070345e-03\n1.69970141689284142e-02\n2.19033738997816280e-02\n2.57286354870347109e-02\n2.86423324747312157e-02\n3.04982316509781991e-02\n3.09644759441183304e-02\n2.95860043238664293e-02\n2.58543543258081369e-02\n1.93110004025436183e-02\n9.69582578891502005e-03\n-2.86145033051101068e-03\n-1.76295393580518343e-02\n-3.30947204716162541e-02\n-4.68946702526025425e-02\n-5.59763132021766988e-02\n-5.70854621980973337e-02\n-4.76410782619387102e-02\n-2.69153665434970837e-02\n2.76864640196613099e-03\n3.53507603810651536e-02\n6.15402461417624697e-02\n7.10798899314076665e-02\n5.67621034113040476e-02\n1.91357164211211905e-02\n-3.03903708004043677e-02\n-7.09762216586209554e-02\n-8.02220237588606722e-02\n-4.70440760220710158e-02\n1.67540473308563434e-02\n7.58516576916231644e-02\n8.85894663844180308e-02\n3.73734152112015841e-02\n-4.79247328477843959e-02\n-9.99863843647073175e-02\n-6.54088595970169356e-02\n3.60908699775992076e-02\n1.08513495817009809e-01\n6.55362228925172874e-02\n-5.96362963865743265e-02\n-1.19110548349822001e-01\n-2.07524290582230299e-02\n1.16312295942290062e-01\n8.39218265167319399e-02\n-9.07411172444226033e-02\n-1.19724897029466232e-01\n7.50555047598719799e-02\n1.35782456790049855e-01\n-8.98781791788041684e-02\n-1.29985940019214929e-01\n1.44007162589647963e-01\n6.79593913679709671e-02\n-2.04576055758098757e-01\n1.04797566524768918e-01\n1.11896150969912664e-01\n-2.60760009132501358e-01\n2.76624912588371075e-01\n-2.06961231910176791e-01\n1.21715371364816694e-01\n0.0\n4.08760814476572540e-04\n1.58312382704994510e-03\n3.74084193289236575e-03\n7.03618838317301987e-03\n1.15475184849007442e-02\n1.72409791212666391e-02\n2.39175665052346956e-02\n3.11514932447144108e-02\n3.82335963988967298e-02\n4.41419366802071056e-02\n4.75706999980828951e-02\n4.70542770523769277e-02\n4.12199590745378971e-02\n2.91822187108224905e-02\n1.10466229694641989e-02\n-1.15801719256964121e-02\n-3.52658092365220818e-02\n-5.48776936598458914e-02\n-6.44264084885455834e-02\n-5.87577942318888852e-02\n-3.58935583667522595e-02\n6.82327627453460000e-04\n4.10027300895768887e-02\n7.02453456833321277e-02\n7.37903961178194706e-02\n4.48414173959418988e-02\n-8.62768648879476407e-03\n-6.26583701015416827e-02\n-8.61156952895591882e-02\n-5.88261492996744115e-02\n9.90739988605153325e-03\n7.76845398554028982e-02\n9.17815213992675821e-02\n3.14230921253303777e-02\n-6.19332040215701263e-02\n-1.04553626016616094e-01\n-4.46680158034172756e-02\n6.87870641972455482e-02\n1.11981788114249553e-01\n1.99956108476568410e-02\n-1.06205214990892569e-01\n-9.31096906023928389e-02\n6.12955623804118457e-02\n1.30445060365515397e-01\n-1.76643149162364205e-02\n-1.46352377791966415e-01\n-1.95026414344134360e-03\n1.59212671796761213e-01\n-1.63834241873805839e-02\n-1.69383160948558820e-01\n8.79383488611063385e-02\n1.34474781932299697e-01\n-1.97930571861516191e-01\n3.93256065430706014e-02\n1.72986671959267313e-01\n-2.81495238415602311e-01\n2.63522683079467190e-01\n-1.82429102428388723e-01\n9.69608102765185179e-03\n1.67941049741976607e-02\n2.16437735104826647e-02\n2.54326145309599419e-02\n2.83381442336998468e-02\n3.02307366804539061e-02\n3.08014633924674243e-02\n2.96211767874812772e-02\n2.62041448187073853e-02\n2.01013436363981363e-02\n1.10348662567829273e-02\n-9.27129231293984568e-04\n-1.51731653192073747e-02\n-3.03720010797575504e-02\n-4.43893739674116813e-02\n-5.43949889927988414e-02\n-5.72605223254217532e-02\n-5.03096124389035074e-02\n-3.23758157305225891e-02\n-4.94823708653220617e-03\n2.70315799101847123e-02\n5.53240478270190933e-02\n7.00655844238043113e-02\n6.31286249134523220e-02\n3.24884330734039398e-02\n-1.41923327390912537e-02\n-5.93583933745088430e-02\n-8.09490021096613555e-02\n-6.32452518527795438e-02\n-8.94004517891543171e-03\n5.56535601001807920e-02\n9.01999657630688928e-02\n6.52550299959941960e-02\n-1.05161490387596108e-02\n-8.44071236527257351e-02\n-9.21478587116126152e-02\n-1.57939394261898472e-02\n8.25412521549056116e-02\n1.02253357237291786e-01\n8.63577478211373720e-03\n-1.03164735076179293e-01\n-9.21601264727530400e-02\n4.56414708548726206e-02\n1.28552644870475796e-01\n1.90472417014122750e-02\n-1.31210682746424667e-01\n-6.34545395625098485e-02\n1.29022520159729759e-01\n8.09599573041097365e-02\n-1.43298009465823134e-01\n-6.36691377789542212e-02\n1.76648521796850033e-01\n-1.38689912842169406e-02\n-1.84882876769655674e-01\n1.66771740501606092e-01\n3.54315537071998587e-02\n-2.29420728604071672e-01\n2.95802405110616451e-01\n-2.48913694656455825e-01\n0.0\n3.97951794456527324e-04\n1.54126067252348723e-03\n3.64218030548931881e-03\n6.85218269236480704e-03\n1.12512267614962528e-02\n1.68144241785554496e-02\n2.33628786754932240e-02\n3.05058122802158889e-02\n3.75861249376993403e-02\n4.36490477251345529e-02\n4.74617498424737133e-02\n4.76175016945771870e-02\n4.27561746869729656e-02\n3.19166706347506143e-02\n1.49995317303853216e-02\n-6.74346230265290749e-03\n-3.03544658189898627e-02\n-5.11829674247417030e-02\n-6.35205352166763604e-02\n-6.20166525566984012e-02\n-4.37755410366338291e-02\n-1.06073733039939444e-02\n2.95733388372676799e-02\n6.34788558609327147e-02\n7.62648996289078812e-02\n5.81690602400226769e-02\n1.16846211073027527e-02\n-4.49852074940431043e-02\n-8.27149644416217966e-02\n-7.58597891068321928e-02\n-2.09262199480321417e-02\n5.29283390624537484e-02\n9.48707581773678144e-02\n6.66881485132284346e-02\n-1.94441052905490325e-02\n-9.54852852794226131e-02\n-8.67614102081310512e-02\n1.11896493147015819e-02\n1.05083857924829424e-01\n8.46066861410350035e-02\n-4.24512445936164121e-02\n-1.23968258758233654e-01\n-3.77868281207219339e-02\n1.12243862911784092e-01\n9.58362835798623330e-02\n-8.46944974553461016e-02\n-1.27725487571436314e-01\n7.10242237036653873e-02\n1.42112928593988330e-01\n-8.96745466099802546e-02\n-1.35192904656319807e-01\n1.48399988701732211e-01\n7.01682454777591696e-02\n-2.12893178134437255e-01\n1.09374706409966646e-01\n1.21934833576243296e-01\n-2.86711455721329500e-01\n3.09865903591430403e-01\n9.78218694181909668e-03\n1.69432447923674907e-02\n2.18378234040935947e-02\n2.56693698422705945e-02\n2.86267863693507735e-02\n3.05938919961509723e-02\n3.12777325381722107e-02\n3.02657989749252967e-02\n2.70852592313920726e-02\n2.12888112314682555e-02\n1.25786305184829028e-02\n9.69140443763950345e-04\n-1.30261697516430019e-02\n-2.82207143334360783e-02\n-4.26569972676785480e-02\n-5.36723825817140426e-02\n-5.82234184862084406e-02\n-5.35354738940341593e-02\n-3.80602532836570376e-02\n-1.25743781862917917e-02\n1.89424476087853705e-02\n4.91829092473302365e-02\n6.86998296342373610e-02\n6.86922465824617856e-02\n4.50059930121235463e-02\n1.98396160042761541e-03\n-4.60869561276970180e-02\n-7.82505692802488995e-02\n-7.56601211869440404e-02\n-3.33231105540888334e-02\n3.16216893923956521e-02\n8.31133897620012496e-02\n8.47581240394588709e-02\n2.69932742619465385e-02\n-5.60481902293213999e-02\n-1.00817511523242601e-01\n-6.21398404006004504e-02\n3.72296946704306214e-02\n1.08043282676332342e-01\n7.07449232483352702e-02\n-4.92197221468476803e-02\n-1.20055864397881379e-01\n-4.33811332812901809e-02\n9.86595027035088862e-02\n1.09745400289361056e-01\n-4.72379054190327635e-02\n-1.40199054795054484e-01\n3.00040897868632814e-03\n1.53176199416829695e-01\n1.52006272275866990e-02\n-1.67214145531439068e-01\n5.42339762409888102e-03\n1.82140685267362712e-01\n-8.21736509343016924e-02\n-1.54931730214362212e-01\n2.07987528107186320e-01\n-1.66220002612957850e-02\n-2.29572950710527857e-01\n3.54021363102952957e-01\n0.0\n3.94905567764643325e-04\n1.52946268727704809e-03\n3.61455529421745875e-03\n6.80175498384760855e-03\n1.11740302200682567e-02\n1.67146419516805318e-02\n2.32607359814957955e-02\n3.04480972502389584e-02\n3.76579720884831076e-02\n4.39836640848285249e-02\n4.82422115639478261e-02\n4.90621835623368252e-02\n4.50780950787924295e-02\n3.52491679782943879e-02\n1.92889073514890992e-02\n-1.86121634300657275e-03\n-2.56513670824505789e-02\n-4.78433172488557587e-02\n-6.29696438335463071e-02\n-6.55119573143817802e-02\n-5.17761512026813850e-02\n-2.20827233479571686e-02\n1.75558575532469043e-02\n5.54289324682275195e-02\n7.68438539450338881e-02\n6.97534709947296716e-02\n3.18100628416363093e-02\n-2.45927940871069305e-02\n-7.36909864025054456e-02\n-8.68737224886544090e-02\n-4.99968982977668994e-02\n2.18009249126926499e-02\n8.49094046606251873e-02\n9.13208226124089945e-02\n2.67741056876590645e-02\n-6.55845337580863580e-02\n-1.06862548763057424e-01\n-4.93495678606143129e-02\n6.32473213697362230e-02\n1.16291381454678711e-01\n3.89216197839812594e-02\n-9.28526394172267122e-02\n-1.13623657103276224e-01\n2.25540168426045275e-02\n1.36710551906252975e-01\n4.48555432764452602e-02\n-1.30165112306343228e-01\n-8.87380989077487664e-02\n1.24368225249341449e-01\n1.07253478045019307e-01\n-1.40628967727753601e-01\n-9.43134884160207881e-02\n1.84736624569082991e-01\n2.17182887405026753e-02\n-2.22656061768193442e-01\n1.47621301766856144e-01\n1.31798761038164403e-01\n-3.74479491784077578e-01\n1.00187955021842096e-02\n1.73530628404255961e-02\n2.23679366263649648e-02\n2.63015323241235985e-02\n2.93574763758477318e-02\n3.14319153814088745e-02\n3.22443133991804284e-02\n3.13937352401667188e-02\n2.84146386617772015e-02\n2.28566327347095172e-02\n1.43997846310977493e-02\n3.00734929723819660e-03\n-1.08958982175277851e-02\n-2.62512010235914084e-02\n-4.12549624769968301e-02\n-5.33883565236218313e-02\n-5.96768916044963030e-02\n-5.72507105889245027e-02\n-4.42098158716853068e-02\n-2.06726806280118670e-02\n1.02871680342112685e-02\n4.22835385328824420e-02\n6.63753701553072006e-02\n7.33096577913943670e-02\n5.71053723330086568e-02\n1.89914488226706792e-02\n-3.01893336885688535e-02\n-7.13832082459323475e-02\n-8.39474670455823413e-02\n-5.63797672224981769e-02\n3.56814049915724074e-03\n6.67485281035814365e-02\n9.43771583417913063e-02\n6.20836554260349380e-02\n-1.68709161171560554e-02\n-8.96469696037223568e-02\n-9.57989929553861308e-02\n-1.94892686064702461e-02\n8.11061702666059231e-02\n1.09981135315658854e-01\n2.56775420255030730e-02\n-9.42636850486019973e-02\n-1.11868394766691678e-01\n1.06841412601072494e-02\n1.29087392820556840e-01\n7.29397551383831194e-02\n-9.87543542436241928e-02\n-1.26209937896864827e-01\n5.98462389561280478e-02\n1.54245812676487293e-01\n-3.96831509463815013e-02\n-1.71623408939062999e-01\n5.52644293194257327e-02\n1.80278215421669274e-01\n-1.20940466563913565e-01\n-1.49995297009251266e-01\n2.34185056554918641e-01\n1.15721605865415356e-02\n-3.70400040095137884e-01\n0.0\n3.94449732042348130e-04\n1.52769724311599235e-03\n3.61064321051610560e-03\n6.79596876229150455e-03\n1.11702424673177873e-02\n1.67248745479496447e-02\n2.33122193280952961e-02\n3.05927129099621831e-02\n3.79828276752105787e-02\n4.46197647108584061e-02\n4.93658384036051376e-02\n5.08811692459326531e-02\n4.77938377837136691e-02\n3.89868530825168147e-02\n2.39954645766293564e-02\n3.46276423699950434e-03\n-2.04614381827983027e-02\n-4.39600175882787977e-02\n-6.18481814329971194e-02\n-6.85246721702191530e-02\n-5.96152876498411213e-02\n-3.40536064558648113e-02\n4.05760233850023782e-03\n4.48208901401054641e-02\n7.42280456181345083e-02\n7.86772520695326050e-02\n5.15366197862066264e-02\n-8.32817992252405694e-04\n-5.75606204058560084e-02\n-8.97658506165479597e-02\n-7.51249250849922723e-02\n-1.45373027784197230e-02\n6.04873162520911944e-02\n1.00429958036142492e-01\n7.01298995068950631e-02\n-1.76033380206762173e-02\n-9.78207854946175348e-02\n-9.73001380468268423e-02\n-4.17354286212084577e-03\n1.00785893383930805e-01\n1.05664291084586429e-01\n-1.02134607778360826e-02\n-1.23230268329865597e-01\n-8.61795430238386229e-02\n7.24257661500286309e-02\n1.39043631501780118e-01\n-3.57194902053017222e-03\n-1.53138993906874465e-01\n-5.02714473192090519e-02\n1.55157713998401198e-01\n7.82877016049956798e-02\n-1.68924470725450193e-01\n-7.44231025943922625e-02\n2.05601897039151160e-01\n2.09172724301761627e-02\n-2.54752304710436306e-01\n1.09340343535478460e-01\n3.45733679156732976e-01\n1.02975026709675316e-02\n1.78357978171919812e-02\n2.29921875969906972e-02\n2.70450914421765248e-02\n3.02145120391007112e-02\n3.24097041656088436e-02\n3.33630379793738233e-02\n3.26855690164525869e-02\n2.99195367720438664e-02\n2.46121487138273379e-02\n1.64223004437790698e-02\n5.26312121288588768e-03\n-8.52875954368071017e-03\n-2.40236585005922133e-02\n-3.95773180713395595e-02\n-5.28277310966658517e-02\n-6.08934338241791245e-02\n-6.08457738153301494e-02\n-5.04769165210524895e-02\n-2.92821893323530758e-02\n5.76186924740506516e-04\n3.37215207129732894e-02\n6.19287328179575769e-02\n7.58227616753048977e-02\n6.79581836952502794e-02\n3.66385995468027428e-02\n-1.10167974869622310e-02\n-5.88395918146575186e-02\n-8.59863656813697613e-02\n-7.59645612796877590e-02\n-2.73040602525904709e-02\n4.02049530450341031e-02\n9.03984836601511021e-02\n8.90850834029707495e-02\n2.87859539670522954e-02\n-5.68723809311633827e-02\n-1.06600155138664499e-01\n-7.43944034729326631e-02\n2.44427179989255838e-02\n1.08920890072622095e-01\n9.40115782562817442e-02\n-1.96630488726709900e-02\n-1.20980395145439956e-01\n-8.89911494850309376e-02\n5.62828505113549954e-02\n1.39654057569198076e-01\n3.50017348130965827e-02\n-1.30717063693420843e-01\n-1.06357614066353412e-01\n9.69600690171695118e-02\n1.49688771896339112e-01\n-7.05768275358550079e-02\n-1.76344066659367443e-01\n7.18794994121241815e-02\n1.95993942075068289e-01\n-1.15121980368385030e-01\n-2.08175165638974619e-01\n2.12112821112247801e-01\n3.06763077824337482e-01\n0.0\n3.93440226842077241e-04\n1.52378744628743363e-03\n3.60166890508767943e-03\n6.78068987874801826e-03\n1.11509819937361428e-02\n1.67123109619716943e-02\n2.33328394686219930e-02\n3.06988698846242941e-02\n3.82642476590646236e-02\n4.52135828152612773e-02\n5.04598777116502736e-02\n5.27026475989587212e-02\n5.05740318594983043e-02\n4.28932477711935073e-02\n2.90289526001085221e-02\n9.33083205482127497e-03\n-1.44632161796173359e-02\n-3.89997694944922910e-02\n-5.94635669807313180e-02\n-7.03057164538327672e-02\n-6.66351026373163541e-02\n-4.61285424255317988e-02\n-1.09688037286389244e-02\n3.10411337516798246e-02\n6.72120536562760967e-02\n8.32916483834589827e-02\n6.91718348739299715e-02\n2.52428846157872790e-02\n-3.38806947817830023e-02\n-8.19661455394085914e-02\n-9.18938940954132782e-02\n-5.16862030858982954e-02\n2.26710647631854362e-02\n8.87807336268078839e-02\n9.98321537935231845e-02\n3.90936806790318225e-02\n-5.69709710137136574e-02\n-1.13662591786166320e-01\n-7.47343085028982917e-02\n3.74513481421043098e-02\n1.21438684139853120e-01\n8.37390601240565191e-02\n-5.11533325207080003e-02\n-1.36373534893724002e-01\n-5.66402703366126054e-02\n1.05725537288059890e-01\n1.32830716026367202e-01\n-3.64670628363247470e-02\n-1.64066932179793706e-01\n-2.99285225016315097e-02\n1.71144435350341434e-01\n7.61243497374142070e-02\n-1.80196594251060688e-01\n-1.00391069371105174e-01\n2.10901205930350999e-01\n1.10748777705126811e-01\n-2.84535316951081307e-01\n-2.60073072973808384e-01\n1.05869999499312462e-02\n1.83372218130100802e-02\n2.36406939977099398e-02\n2.78179558272108086e-02\n3.11064931608048580e-02\n3.34299149081470001e-02\n3.45350595630051910e-02\n3.40469049799974471e-02\n3.15177521764636939e-02\n2.64949122418156255e-02\n1.86185351290439720e-02\n7.75333750463737779e-03\n-5.85237979054766596e-03\n-2.14020802649528656e-02\n-3.74217861155341780e-02\n-5.17278753713377101e-02\n-6.15675990186584018e-02\n-6.40041029590842220e-02\n-5.65811219958149356e-02\n-3.82207632136373210e-02\n-1.01798285831000684e-02\n2.32613244998818476e-02\n5.48206886458340939e-02\n7.53809098864007265e-02\n7.64923489452180860e-02\n5.38733295281829949e-02\n1.08186059902215387e-02\n-4.02534866973088892e-02\n-7.99956056413298477e-02\n-8.89444500567708601e-02\n-5.75114465641486106e-02\n5.27399797630171384e-03\n7.05849318016714411e-02\n1.00920088583293793e-01\n7.18415775452072997e-02\n-6.76249752621272630e-03\n-8.70480896854207986e-02\n-1.08827820505412287e-01\n-4.57716632866077555e-02\n6.11407416594917097e-02\n1.21671593810716586e-01\n7.07957821371706375e-02\n-5.60651100408943032e-02\n-1.33085722677622281e-01\n-6.48678088626390148e-02\n8.74097612958851383e-02\n1.41323903064193540e-01\n9.35625959232179102e-03\n-1.48064761100119874e-01\n-9.78158196623211684e-02\n1.12612587053167248e-01\n1.57366886031697045e-01\n-6.92470626010704277e-02\n-1.97035677141359278e-01\n3.72034693364932043e-02\n2.37635631539348108e-01\n-1.13535164220403776e-02\n-3.21963118075201948e-01\n-2.11391429693146005e-01\n0.0\n3.91507408475567312e-04\n1.51630167294269664e-03\n3.58424674842945830e-03\n6.74953346489095499e-03\n1.11057092656820910e-02\n1.66610461703423224e-02\n2.33001382340472553e-02\n3.07365080531201637e-02\n3.84638303121550146e-02\n4.57181938777261876e-02\n5.14696214575779964e-02\n5.44663047520216742e-02\n5.33570942703714760e-02\n4.69129480816933286e-02\n3.43518516226811454e-02\n1.57404419520890022e-02\n-7.60123354066200539e-03\n-3.28212253241497581e-02\n-5.55605300782818640e-02\n-7.04683271534187611e-02\n-7.23290016146099363e-02\n-5.77482910829111157e-02\n-2.70607664148163063e-02\n1.42157190669819581e-02\n5.52949769668454050e-02\n8.22494392046126954e-02\n8.25843849978965261e-02\n5.12987529645206053e-02\n-4.00472494505509091e-03\n-6.23686079712797090e-02\n-9.58677894395832397e-02\n-8.28899590918458079e-02\n-2.31290005744079832e-02\n5.52187297312947134e-02\n1.05176731903603701e-01\n8.84449231557709742e-02\n6.94555659745796188e-03\n-8.64290466901346116e-02\n-1.17174456764807949e-01\n-4.93633995165965317e-02\n6.91185606298971855e-02\n1.30207181083091705e-01\n6.24998513132137973e-02\n-7.88565964201347475e-02\n-1.41520764858528297e-01\n-3.76318696578705342e-02\n1.23814512218316533e-01\n1.32680621010741323e-01\n-4.66667142739674856e-02\n-1.74252562737358563e-01\n-4.12812560288570163e-02\n1.75444072666494838e-01\n1.17858626168767716e-01\n-1.59899331321292665e-01\n-1.91643513803251730e-01\n1.30688894193576211e-01\n3.26386898303193118e-01\n1.65080579182455445e-01\n1.08922367551400091e-02\n1.88659074679716592e-02\n2.43245165667120081e-02\n2.86331819926462054e-02\n3.20481381845642219e-02\n3.45086344309439158e-02\n3.57775369171159999e-02\n3.54956764821337395e-02\n3.32277521368585932e-02\n2.85238791149430224e-02\n2.10083321923607361e-02\n1.04999527587346254e-02\n-2.84015029630190928e-03\n-1.83508176574253661e-02\n-3.47371133334290275e-02\n-5.00134443001522058e-02\n-6.15910233956405567e-02\n-6.65784811686561673e-02\n-6.23399783540983521e-02\n-4.72931027076910412e-02\n-2.18246425666537361e-02\n1.09312250523719533e-02\n4.48304911969368072e-02\n7.13909610733501343e-02\n8.16830078030604118e-02\n6.93451803251711602e-02\n3.40166591463010315e-02\n-1.61998790573133246e-02\n-6.50106695216046138e-02\n-9.23014454954091401e-02\n-8.24294092106029608e-02\n-3.37525898902248378e-02\n3.57107590352890025e-02\n9.20592726259395061e-02\n1.00934232336548593e-01\n4.95090968704796283e-02\n-3.80071644267542946e-02\n-1.06471360005337273e-01\n-1.02632890886320299e-01\n-1.87845798374177315e-02\n8.72984434093039829e-02\n1.25652145416461192e-01\n5.07826822709314951e-02\n-8.00157993000187306e-02\n-1.38854794292532668e-01\n-5.07879163986479226e-02\n1.03572774762281203e-01\n1.45795345242893198e-01\n5.29358371677346538e-03\n-1.55970885257783687e-01\n-1.13590392109070862e-01\n1.01299669801352396e-01\n1.85607781873182498e-01\n-1.63894910681479482e-02\n-2.22324991234628205e-01\n-9.12177196480132846e-02\n2.25535777532972020e-01\n3.04431591346615016e-01\n1.24013762671439542e-01\n0.0\n3.88751457230900337e-04\n1.50562791966914189e-03\n3.55929167704553510e-03\n6.70420904892204874e-03\n1.10371886034443221e-02\n1.65750928998919383e-02\n2.32194153262661913e-02\n3.07119814533530315e-02\n3.85883528495274408e-02\n4.61396716130346163e-02\n5.23988289930955170e-02\n5.61717348549011369e-02\n5.61370123365529453e-02\n5.10345542919882281e-02\n3.99512683952485681e-02\n2.26875196772796037e-02\n1.49003275843641639e-04\n-2.53400985916822259e-02\n-4.99536268856920346e-02\n-6.86827488922616691e-02\n-7.61974501624629874e-02\n-6.82685737519949098e-02\n-4.35466626202156634e-02\n-5.20006008488246244e-03\n3.83539870006417427e-02\n7.44663458598264910e-02\n8.95431259318728440e-02\n7.42851611302855069e-02\n2.93070727941977874e-02\n-3.16271956101844900e-02\n-8.37957519125079736e-02\n-1.00657496522139525e-01\n-6.78671727664902358e-02\n4.40842797212983185e-03\n8.00064206775217696e-02\n1.12350119574580826e-01\n7.35130240716317107e-02\n-1.97586855717463636e-02\n-1.05852067375704170e-01\n-1.15624824442156507e-01\n-2.98666716928018897e-02\n8.91978028798505462e-02\n1.34942319147948464e-01\n5.17389128365903644e-02\n-9.22408269141106185e-02\n-1.47976944655167753e-01\n-3.86100559533239449e-02\n1.27588527035550431e-01\n1.48555734836671921e-01\n-2.49544685768086014e-02\n-1.83276741330481691e-01\n-9.80613975945639482e-02\n1.43826215067249380e-01\n2.06117001247386245e-01\n-3.30659291363078617e-02\n-2.83753955463167673e-01\n-2.64985576742151840e-01\n-8.96835116964378731e-02\n1.12204800935259991e-02\n1.94344416073022191e-02\n2.50598979932080412e-02\n2.95099562112745191e-02\n3.30611114416836521e-02\n3.56696180172891286e-02\n3.71159440517376885e-02\n3.70587086382844350e-02\n3.50773968673031497e-02\n3.07278076443377526e-02\n2.36216285911593459e-02\n1.35351566652251488e-02\n5.44753228636315752e-04\n-1.48241299306043246e-02\n-3.14619666052419131e-02\n-4.75984108311178072e-02\n-6.08425144648477925e-02\n-6.84037569340648771e-02\n-6.75433414392613424e-02\n-5.62606100140550999e-02\n-3.41381861146367940e-02\n-3.15692241828894942e-03\n3.18262439904760594e-02\n6.33158279157595150e-02\n8.24600051902261016e-02\n8.14642629730628759e-02\n5.67603116522295975e-02\n1.19507929884316993e-02\n-4.09574323829446224e-02\n-8.35526803034351839e-02\n-9.69439551252187087e-02\n-7.04900823645899649e-02\n-9.87561661740526606e-03\n6.05361149796039624e-02\n1.05331495364838809e-01\n9.55270025939621431e-02\n2.86825129380194749e-02\n-6.14775739783995634e-02\n-1.17922925597153103e-01\n-9.56125014232183934e-02\n2.24966392977482973e-05\n1.03340267902768609e-01\n1.28547114070591662e-01\n4.22245922396428386e-02\n-9.06556533052816915e-02\n-1.45922361076338714e-01\n-5.54972025751106629e-02\n1.03182763026589117e-01\n1.59716480570384511e-01\n3.24685642626496504e-02\n-1.48171015183421712e-01\n-1.59081455792869086e-01\n3.92430546553433970e-02\n2.11736779529171415e-01\n1.22019364751961290e-01\n-1.49818571650098487e-01\n-3.03249652822435711e-01\n-2.17045391200755833e-01\n-6.24534622479142737e-02\n0.0\n3.85169099558713471e-04\n1.49175350806460380e-03\n3.52677173215541501e-03\n6.64464440440727840e-03\n1.09452575134174057e-02\n1.64540864407641679e-02\n2.30898794156993853e-02\n3.06236701746499980e-02\n3.86347216225336812e-02\n4.64725273110947815e-02\n5.32384813975482277e-02\n5.78053005866547287e-02\n5.88950991387538966e-02\n5.52357061123248672e-02\n4.58062325871392215e-02\n3.01639185028697715e-02\n8.81319621948602021e-03\n-1.64634369502914442e-02\n-4.24366767523012764e-02\n-6.45770771584017189e-02\n-7.76610207674408443e-02\n-7.69040210350540043e-02\n-5.95277615249492492e-02\n-2.64279795821441323e-02\n1.66499400197128132e-02\n5.91842394481619655e-02\n8.78581999930321267e-02\n9.06013247911986730e-02\n6.18996899553475796e-02\n7.44006973468986591e-03\n-5.46363011127062037e-02\n-9.82525274959352019e-02\n-9.99940159845452009e-02\n-5.24703755527486868e-02\n2.65250647903520105e-02\n9.69728732891508433e-02\n1.15234226829543013e-01\n6.20361350019135588e-02\n-3.70059518078022162e-02\n-1.17681352853930027e-01\n-1.16499764569896858e-01\n-2.28932036695786156e-02\n9.75316371261309156e-02\n1.42226682281132416e-01\n5.92423658917670959e-02\n-8.84833212140236358e-02\n-1.59714060139991482e-01\n-6.81989737915320443e-02\n1.07746908246895895e-01\n1.78657541456451546e-01\n4.61336617249975267e-02\n-1.58840802298191225e-01\n-1.97237294401546054e-01\n-6.91685179938467706e-04\n2.35845641069970441e-01\n2.89820432965184394e-01\n1.68165998692139773e-01\n4.18798428301460982e-02\n1.15783172660377989e-02\n2.00542337709294430e-02\n2.58615701562662642e-02\n3.04657200145340562e-02\n3.41652202538808500e-02\n3.69348349624812264e-02\n3.85743162947812732e-02\n3.87621301558902301e-02\n3.70951225857538147e-02\n3.31379713528574746e-02\n2.64935998233923331e-02\n1.68999595985218874e-02\n4.35243147122899715e-03\n-1.07577125500144324e-02\n-2.75103855883087577e-02\n-4.43652524749569080e-02\n-5.91614508087821567e-02\n-6.92657207077037040e-02\n-7.19197083700743450e-02\n-6.48075032118222011e-02\n-4.68044315338570979e-02\n-1.87780790578139962e-02\n1.57928883878752091e-02\n5.07023364974533500e-02\n7.77335414235945238e-02\n8.84108351300510464e-02\n7.66728387401108408e-02\n4.18726379529334516e-02\n-9.00833833748696834e-03\n-6.13418165723846331e-02\n-9.61737251093634227e-02\n-9.69450445329947535e-02\n-5.78414591802509925e-02\n9.93932805923892181e-03\n7.85425566848483303e-02\n1.13331671768884201e-01\n9.05377141825224191e-02\n1.47183804413341408e-02\n-7.59437482515083195e-02\n-1.25553682547042356e-01\n-9.47658795603263521e-02\n5.71563518143214291e-03\n1.10058779965200734e-01\n1.36316642810043381e-01\n5.19848829149124961e-02\n-8.46649473135884650e-02\n-1.56402642515082957e-01\n-8.62992875449329067e-02\n7.56696459988075443e-02\n1.76257117472558206e-01\n1.01111667753247009e-01\n-9.22898399409511766e-02\n-2.08366239870955983e-01\n-1.11224290486918592e-01\n1.21581548520735813e-01\n2.80408396844130159e-01\n2.53695242207635896e-01\n1.23662259436550959e-01\n2.70368419024186180e-02\n0.0\n3.80679830754108712e-04\n1.47436664474772110e-03\n3.48594771429111680e-03\n6.56943434111420446e-03\n1.08275560387091907e-02\n1.62943535567761713e-02\n2.29060837633825141e-02\n3.04637513048890904e-02\n3.85919558543809105e-02\n4.67016586932775812e-02\n5.39682962375974962e-02\n5.93406580453353094e-02\n6.15988503931378731e-02\n5.94795626506171710e-02\n5.18812216805799170e-02\n3.81477717253121823e-02\n1.84058578356025813e-02\n-6.10341615008612014e-03\n-3.27953851358824336e-02\n-5.77446371885120130e-02\n-7.60565355446594371e-02\n-8.27044774891676215e-02\n-7.38225330338877772e-02\n-4.82630133990803595e-02\n-9.00261303525527225e-03\n3.62177430748201815e-02\n7.56855268376995516e-02\n9.63740988648927183e-02\n8.82900749545868779e-02\n4.94146098832364128e-02\n-1.07923030389423733e-02\n-7.17577824327445962e-02\n-1.07707669264973854e-01\n-9.85519839358599825e-02\n-4.18988316460516957e-02\n4.03900560529470987e-02\n1.07577965514528598e-01\n1.19076669115433326e-01\n6.00589999226473908e-02\n-4.16971104371408191e-02\n-1.23739993778286442e-01\n-1.25396840382431873e-01\n-3.45235342356072714e-02\n9.06962141375550895e-02\n1.53057290934084933e-01\n9.13117717158949266e-02\n-5.65275992332022401e-02\n-1.66760200971366457e-01\n-1.30699628033805498e-01\n3.57337067806699493e-02\n1.86186782872382800e-01\n1.71561921987548965e-01\n-1.23053264287166647e-02\n-2.15651739558127165e-01\n-2.84707728545633421e-01\n-2.06069906156934907e-01\n-8.64908574186388640e-02\n-1.67962969846185764e-02\n1.19733896370233101e-02\n2.07385191901430510e-02\n2.67466261744546546e-02\n3.15207290566477741e-02\n3.53835202701182905e-02\n3.83299724113819393e-02\n4.01809707215795495e-02\n4.06370786415245072e-02\n3.93153448396419136e-02\n3.57929278911958207e-02\n2.96684473146849870e-02\n2.06466954605327713e-02\n8.64731205185632380e-03\n-6.06900892289827677e-03\n-2.27729646069271541e-02\n-4.01659638294920296e-02\n-5.63469221831288947e-02\n-6.88959532932945096e-02\n-7.51236780592449971e-02\n-7.25172660962947191e-02\n-5.93729715898221391e-02\n-3.55371713839255643e-02\n-3.09036816985318969e-03\n3.32775658245679229e-02\n6.64991353076851838e-02\n8.82217495916575306e-02\n9.08308553662606905e-02\n7.01330883029233493e-02\n2.79842326811055309e-02\n-2.62506730919308262e-02\n-7.66226222774436944e-02\n-1.04671423596670060e-01\n-9.62549667488656474e-02\n-4.90866200515527040e-02\n2.25620297014827720e-02\n8.98087837983034126e-02\n1.19630375893777063e-01\n9.14330778440883979e-02\n1.21796066642351451e-02\n-8.02014733909603844e-02\n-1.32170328893585903e-01\n-1.05466361863678748e-01\n-7.15572982081087976e-03\n1.04151341701669842e-01\n1.49490433442417636e-01\n8.59588410108783896e-02\n-5.06343525371019121e-02\n-1.58495077870751649e-01\n-1.43494450322421585e-01\n-3.24832448263247557e-03\n1.54919651679012310e-01\n1.94437599606886669e-01\n6.86013533904517303e-02\n-1.33496796055558725e-01\n-2.66521196277060335e-01\n-2.58163208326802784e-01\n-1.56532190920777664e-01\n-5.76085412032023153e-02\n-1.00344494347512428e-02\n0.0\n3.75154068893239902e-04\n1.45296546108546806e-03\n3.43563068258096339e-03\n6.47632409265979161e-03\n1.06803166344723310e-02\n1.60900821600736196e-02\n2.26595259046695127e-02\n3.02202336017577157e-02\n3.84435887787977909e-02\n4.68049431404194693e-02\n5.45592009142427253e-02\n6.07406375364865914e-02\n6.42025961203963186e-02\n6.37134550878897810e-02\n5.81219904250676739e-02\n4.65957617333863858e-02\n2.89185886593412121e-02\n5.80714079528624194e-03\n-2.08253628168608741e-02\n-4.77613684770667804e-02\n-7.06476724098016873e-02\n-8.45479026453412469e-02\n-8.49238394222586734e-02\n-6.89678214260320832e-02\n-3.70323124829597256e-02\n6.28845825278891591e-03\n5.19993075263885246e-02\n8.80030218457686364e-02\n1.02083427274628838e-01\n8.61824556743328030e-02\n4.07665223413398864e-02\n-2.26297590596152912e-02\n-8.27225493093542430e-02\n-1.14783795904241023e-01\n-1.00954054547660571e-01\n-4.08385610736967455e-02\n4.33649917121881334e-02\n1.12454578745569952e-01\n1.27526983588956755e-01\n7.27872303254341879e-02\n-2.89087772784515501e-02\n-1.21061147514833378e-01\n-1.43016828371928195e-01\n-7.09615789168401012e-02\n5.67400642401309982e-02\n1.54688367671229093e-01\n1.46165737957518249e-01\n2.48435821083916493e-02\n-1.28151200971652335e-01\n-1.96688554487118333e-01\n-1.19040678821237450e-01\n5.94978667496811331e-02\n2.21709828354304916e-01\n2.73803436767150132e-01\n2.13615676713546226e-01\n1.11727480548359251e-01\n3.65640332352070926e-02\n5.76000865235253099e-03\n1.24157951578203214e-02\n2.15047880297124447e-02\n2.77376550347795403e-02\n3.27017549150004846e-02\n3.67464927259776239e-02\n3.98890092514363956e-02\n4.19733959093176318e-02\n4.27248158680077275e-02\n4.17836971952166569e-02\n3.87437717874004953e-02\n3.32045622567954668e-02\n2.48440261882939377e-02\n1.35129990164071477e-02\n-6.52375411970329989e-04\n-1.71116719424285954e-02\n-3.48158417023968422e-02\n-5.21493256717859496e-02\n-6.69594356358544918e-02\n-7.67169094865395446e-02\n-7.88431490298813903e-02\n-7.12138532355517662e-02\n-5.28016053124628418e-02\n-2.43528760498292508e-02\n1.10812392543579562e-02\n4.80028149421227249e-02\n7.89665615461962039e-02\n9.58925065196966908e-02\n9.21582008005101538e-02\n6.51125228716516735e-02\n1.82778296458260200e-02\n-3.77728244733016721e-02\n-8.68552378601746833e-02\n-1.11405403271491746e-01\n-9.89106690397204280e-02\n-4.85602869752473701e-02\n2.49875105630554539e-02\n9.38462511401299271e-02\n1.26493062651100829e-01\n1.02494989003821077e-01\n2.60785260694257580e-02\n-6.98832358143107873e-02\n-1.35485641662130951e-01\n-1.29294918032793554e-01\n-4.58412553270439588e-02\n7.28912071126587707e-02\n1.55119672280083193e-01\n1.42092773895925811e-01\n3.14483772185075797e-02\n-1.11590647063132153e-01\n-1.91131355944082870e-01\n-1.45972230300129402e-01\n4.22669628283601009e-03\n1.71311921752813068e-01\n2.63109863133065391e-01\n2.47492146553572934e-01\n1.63221900870253456e-01\n7.51550638433256951e-02\n2.21161037340488441e-02\n3.17348626580615453e-03\n0.0\n3.68410689253507681e-04\n1.42684846404363109e-03\n3.37415915922743099e-03\n6.36216503896628455e-03\n1.04982864008855790e-02\n1.58331909099690381e-02\n2.23384327637955703e-02\n2.98766053355972311e-02\n3.81670933488146916e-02\n4.67523104410720383e-02\n5.49718597639075879e-02\n6.19549540987232583e-02\n6.66440310559811983e-02\n6.78637723565140155e-02\n6.44482501104069461e-02\n5.54329635663109513e-02\n4.03064708039320846e-02\n1.92973039249393248e-02\n-6.35320219664809328e-03\n-3.42087651405641041e-02\n-6.06448543904298740e-02\n-8.11463439244449053e-02\n-9.09700922404343554e-02\n-8.61734600198802853e-02\n-6.48882182032428229e-02\n-2.85636890834772804e-02\n1.72455806221597958e-02\n6.30444966935851808e-02\n9.69219562933015810e-02\n1.07522639676788712e-01\n8.79996305169616078e-02\n3.98114186730679082e-02\n-2.52945779333338082e-02\n-8.67731261043061253e-02\n-1.21064029410111809e-01\n-1.10739904879519402e-01\n-5.39102566223084306e-02\n3.08041450112543358e-02\n1.08062816455568658e-01\n1.39554384158745465e-01\n1.03476932541156752e-01\n1.02802016494697186e-02\n-9.61365730594036239e-02\n-1.57114815785974610e-01\n-1.31689767832009808e-01\n-2.51607746566056174e-02\n1.06533238643036335e-01\n1.85116257438239062e-01\n1.57418549644691042e-01\n3.11466752151860968e-02\n-1.28248950648907317e-01\n-2.40135923360880965e-01\n-2.60152354766180371e-01\n-2.01982712635904532e-01\n-1.15975739083930940e-01\n-4.77219787918294197e-02\n-1.27434237091151557e-02\n-1.67597391354680730e-03\n1.29197367806613700e-02\n2.23776405245218503e-02\n2.88664277016178021e-02\n3.40464472316708636e-02\n3.82969925949163750e-02\n4.16596909651176517e-02\n4.40042128578635866e-02\n4.50831484505315114e-02\n4.45638996497392248e-02\n4.20614567950916909e-02\n3.71823351432999938e-02\n2.95853144840207902e-02\n1.90613532351179421e-02\n5.63096031731630253e-03\n-1.03484206526403850e-02\n-2.80799695752443103e-02\n-4.62536343572774178e-02\n-6.30327920998000890e-02\n-7.61384660375208355e-02\n-8.30661238961595133e-02\n-8.14563391414612897e-02\n-6.96110796322795267e-02\n-4.71007205216364827e-02\n-1.53471524293076339e-02\n2.19920264730855824e-02\n5.90520754340231255e-02\n8.84033916474099846e-02\n1.02413135595549154e-01\n9.52367987321834364e-02\n6.50709555716082466e-02\n1.60008894835468943e-02\n-4.14164338704716001e-02\n-9.16247710552951095e-02\n-1.17922476469032728e-01\n-1.08146296057009234e-01\n-6.05383767749952603e-02\n1.27158483109912866e-02\n8.68214675063802843e-02\n1.31820174839270193e-01\n1.24761499768246797e-01\n6.21005044881907248e-02\n-3.41223620472966560e-02\n-1.21725092735250673e-01\n-1.56047363593505073e-01\n-1.13280140263273099e-01\n-7.25904148678890773e-03\n1.12046754872086290e-01\n1.81518639676859411e-01\n1.59094486897344484e-01\n4.91906844816491634e-02\n-9.81682614749083832e-02\n-2.16048571842087866e-01\n-2.59072889542550866e-01\n-2.25766815497764672e-01\n-1.50886258098744924e-01\n-7.69473616009675870e-02\n-2.86248421708062660e-02\n-6.98930477866232559e-03\n-8.47100004300341486e-04\n0.0\n3.60197629752507392e-04\n1.39503942137484630e-03\n3.29922125856895072e-03\n6.22257785514168139e-03\n1.02741659152469772e-02\n1.55124680022467199e-02\n2.19265104312099078e-02\n2.94100880526971011e-02\n3.77315077800524784e-02\n4.65025726264715403e-02\n5.51524918084104615e-02\n6.29147300586931774e-02\n6.88370694241043912e-02\n7.18266584753405740e-02\n7.07415720674273579e-02\n6.45371504615805114e-02\n5.24678216991579099e-02\n3.43322638687073717e-02\n1.07316212978702460e-02\n-1.67111993892056845e-02\n-4.52440343365377515e-02\n-7.10753950300476306e-02\n-8.97419915150710207e-02\n-9.67994958795510285e-02\n-8.88108369750873483e-02\n-6.44991180057081365e-02\n-2.58055585614389710e-02\n2.15168967661600805e-02\n6.81811809866375712e-02\n1.02824565695617695e-01\n1.14680900868754806e-01\n9.70520485171473962e-02\n5.06428191019849677e-02\n-1.45723729425421972e-02\n-8.02892296497494801e-02\n-1.24344552597350638e-01\n-1.28171586861167891e-01\n-8.50654011817870148e-02\n-5.78779874965134906e-03\n8.20326595072555370e-02\n1.42446051469686419e-01\n1.45880582242581935e-01\n8.42691326482889191e-02\n-2.12158349028126643e-02\n-1.25799349876895172e-01\n-1.79987653013603144e-01\n-1.53707908941686899e-01\n-5.28390049386241387e-02\n8.23494324701043723e-02\n1.97486091376832401e-01\n2.51898284784599857e-01\n2.37235328950976487e-01\n1.76140197944900601e-01\n1.03977113511172781e-01\n4.77788352457673635e-02\n1.62177719175833797e-02\n3.64427649760096489e-03\n4.09003812064622808e-04\n1.35062566600298237e-02\n2.33935227552371852e-02\n3.01800119278926721e-02\n3.56105733569160379e-02\n4.00984703496341174e-02\n4.37126474947513444e-02\n4.63511415735977789e-02\n4.77972286003238919e-02\n4.77494121037489241e-02\n4.58493584857532221e-02\n4.17177313420051821e-02\n3.50033799208559759e-02\n2.54486866835383491e-02\n1.29709223914436338e-02\n-2.24462237740769661e-03\n-1.96494324062480297e-02\n-3.82508373646866864e-02\n-5.65686697413330317e-02\n-7.26584623295428722e-02\n-8.42319193292969254e-02\n-8.89000954174753583e-02\n-8.45489793273376394e-02\n-6.98286372918038301e-02\n-4.46960244717868813e-02\n-1.09029761510739155e-02\n2.77239207677293931e-02\n6.53877883297859508e-02\n9.49648470996020400e-02\n1.09254203962048435e-01\n1.02739921940389611e-01\n7.35512867636650691e-02\n2.50809464991171432e-02\n-3.34222040348480243e-02\n-8.79172083266178961e-02\n-1.22587311399779658e-01\n-1.24468878375364272e-01\n-8.85484756245012855e-02\n-2.14977765185841892e-02\n5.79525073780799774e-02\n1.23299985873638301e-01\n1.48885433967611863e-01\n1.20350889907033923e-01\n4.27213110211768290e-02\n-5.82864613917749505e-02\n-1.44003738361870692e-01\n-1.77815120289539857e-01\n-1.41377168310668794e-01\n-4.40618342743084174e-02\n8.00737946280198898e-02\n1.87328356851158867e-01\n2.44056255191956534e-01\n2.40510648590573389e-01\n1.91565214252629068e-01\n1.25114706264559061e-01\n6.63830625862230073e-02\n2.77888274836337809e-02\n8.67187307286190236e-03\n1.80333994926589174e-03\n1.88225460682509888e-04\n0.0\n3.50153347270939889e-04\n1.35613808259913262e-03\n3.20750130265996108e-03\n6.05128391702745849e-03\n9.99749773194263947e-03\n1.51118718079005475e-02\n2.14004921123173257e-02\n2.87882421543177273e-02\n3.70928762170227716e-02\n4.59974322921583995e-02\n5.50251169656355704e-02\n6.35225622023991021e-02\n7.06591942548575741e-02\n7.54519361752734041e-02\n7.68249487616817911e-02\n7.37127610905192882e-02\n6.52109989067085477e-02\n5.07711241361410992e-02\n3.04237222256239018e-02\n4.99940229185854949e-03\n-2.37007328286562152e-02\n-5.28479250231791847e-02\n-7.87113572051662824e-02\n-9.70267517358171933e-02\n-1.03635831148068763e-01\n-9.53645441103701530e-02\n-7.10230096662011617e-02\n-3.23138697273571696e-02\n1.56445703853297508e-02\n6.44992350206844978e-02\n1.03793550814099356e-01\n1.23095796348227246e-01\n1.14850387641829407e-01\n7.72985637265646286e-02\n1.65038416321346693e-02\n-5.35546667358708095e-02\n-1.13535282414499616e-01\n-1.43877085591433834e-01\n-1.31400477025618218e-01\n-7.52184695791046354e-02\n1.06139832587239680e-02\n9.96612682595220262e-02\n1.61051245532784909e-01\n1.70543433711709658e-01\n1.20452810591130985e-01\n2.38126570383396033e-02\n-8.98448958652531132e-02\n-1.85908292830668648e-01\n-2.38333902237605338e-01\n-2.39048029574525672e-01\n-1.98683685545073374e-01\n-1.38948656007519183e-01\n-8.14672475888200132e-02\n-3.93459008140036523e-02\n-1.51350679046849002e-02\n-4.36974640834369120e-03\n-8.45023919627794357e-04\n-8.23441142098086396e-05\n1.42084455938213290e-02\n2.46097496650766884e-02\n3.17524227846050569e-02\n3.74818122682628457e-02\n4.22506378369046434e-02\n4.61587680157265340e-02\n4.91359955380230307e-02\n5.10001413975652851e-02\n5.14856490449422596e-02\n5.02672187403944357e-02\n4.69881486812834120e-02\n4.12985555791565082e-02\n3.29064415416330455e-02\n2.16425051168041976e-02\n7.53687242350177880e-03\n-9.09777436253661302e-03\n-2.75868744372164687e-02\n-4.68339692735077959e-02\n-6.53005408871268345e-02\n-8.10496560973519992e-02\n-9.18771159209330474e-02\n-9.55475803406055785e-02\n-9.01387359927810494e-02\n-7.44727809558471815e-02\n-4.85822212741146980e-02\n-1.41204841702981029e-02\n2.54042671398546499e-02\n6.47086389248259092e-02\n9.72457298573284612e-02\n1.16204183753000706e-01\n1.15934362421224527e-01\n9.35852659027812533e-02\n5.05719645005940494e-02\n-6.62194303590458652e-03\n-6.67990206236093592e-02\n-1.15869141668256695e-01\n-1.40065340887868789e-01\n-1.29961373048619322e-01\n-8.41882539809632874e-02\n-1.14730284222498043e-02\n7.01915724841250394e-02\n1.37685052866241414e-01\n1.69446129810265828e-01\n1.52709372973576979e-01\n8.85912454780478503e-02\n-7.31771588329616779e-03\n-1.09657005118530285e-01\n-1.91862962981247193e-01\n-2.35255599475506116e-01\n-2.34812547622191281e-01\n-1.99217420924469896e-01\n-1.45525519279842891e-01\n-9.13991794691203369e-02\n-4.87906902757190147e-02\n-2.16575515327861318e-02\n-7.70933029018704054e-03\n-2.07037446319333898e-03\n-3.73904008306799791e-04\n-3.41351071073355512e-05\n0.0\n3.37732494152738569e-04\n1.30803232532665016e-03\n3.09399845078448584e-03\n5.83881651712053317e-03\n9.65252512769067955e-03\n1.46072606729255074e-02\n2.07254277739129800e-02\n2.79624634985675795e-02\n3.61855461184317287e-02\n4.51501035178542842e-02\n5.44769258739788986e-02\n6.36339303190565642e-02\n7.19280042184255730e-02\n7.85136244559599544e-02\n8.24257432727992928e-02\n8.26442408945704254e-02\n7.81954573633700800e-02\n6.82922946202277614e-02\n5.25076295293694512e-02\n3.09661919103045441e-02\n4.52823722386355362e-03\n-2.50740807413769515e-02\n-5.51968360632755020e-02\n-8.23937491254003312e-02\n-1.02719785029434477e-01\n-1.12249734086374064e-01\n-1.07789766534154327e-01\n-8.77003732473651265e-02\n-5.26815472851667674e-02\n-6.31247537317037363e-03\n4.48875662915130050e-02\n9.20765902403102576e-02\n1.25472034237922109e-01\n1.36390954552093380e-01\n1.19597642454452868e-01\n7.53786637360048667e-02\n1.06437775438567254e-02\n-6.15673666043906262e-02\n-1.24453707108051051e-01\n-1.61412653957675650e-01\n-1.60664015541283789e-01\n-1.19132111953712427e-01\n-4.41300473855827657e-02\n4.80755243146858344e-02\n1.36697207702138612e-01\n2.02535366336977302e-01\n2.33617136144903870e-01\n2.28245515529599791e-01\n1.94333565428086608e-01\n1.45480849911908738e-01\n9.56499815479798371e-02\n5.47725728093942724e-02\n2.68998123833900753e-02\n1.10582978879321323e-02\n3.66397024535345360e-03\n9.19506098081281976e-04\n1.55670395500262537e-04\n1.33566965763233309e-05\n1.50825355234530528e-02\n2.61237178335831377e-02\n3.37094297926230566e-02\n3.98091235545364325e-02\n4.49228171981239516e-02\n4.91861750395664876e-02\n5.25650782178341824e-02\n5.49166460649012020e-02\n5.60171080494945919e-02\n5.55818324039219769e-02\n5.32869814977318737e-02\n4.87976302633019027e-02\n4.18052449994471137e-02\n3.20759901992629520e-02\n1.95096502923490858e-02\n4.20669302405605062e-03\n-1.34619502677270804e-02\n-3.27913624826566552e-02\n-5.26981520340160381e-02\n-7.17111553538594682e-02\n-8.80154315318956298e-02\n-9.95668179798855635e-02\n-1.04289220749528025e-01\n-1.00356143539213932e-01\n-8.65410963111307441e-02\n-6.25992035312336603e-02\n-2.96173297896105761e-02\n9.75235362609138366e-03\n5.12725026400930942e-02\n8.94041754641129865e-02\n1.17948407987879228e-01\n1.31033330837344253e-01\n1.24339792818589354e-01\n9.63523608411877841e-02\n4.93336179690693488e-02\n-1.03146605640554636e-02\n-7.25832295904912939e-02\n-1.25392102017421181e-01\n-1.56978797504256862e-01\n-1.58678501420909335e-01\n-1.27388183286676171e-01\n-6.69309215114184675e-02\n1.22799969512117548e-02\n9.54285316798000049e-02\n1.66879144760402720e-01\n2.14147129045601348e-01\n2.30995282448519079e-01\n2.18612735301315197e-01\n1.84496136580588721e-01\n1.39521081208809267e-01\n9.43786450106588598e-02\n5.67227396859406735e-02\n2.99388653227275169e-02\n1.36366385307294617e-02\n5.22403034950814308e-03\n1.61908517076594059e-03\n3.81238320088471460e-04\n6.07093698279695970e-05\n4.90967912775691454e-06\n0.0\n3.22050179097774908e-04\n1.24729498028879819e-03\n2.95059901029226914e-03\n5.56982087063188046e-03\n9.21370771527555386e-03\n1.39595484642221195e-02\n1.98448355272323532e-02\n2.68544068865404634e-02\n3.49040412501513686e-02\n4.38216831672568127e-02\n5.33280256637624142e-02\n6.30189570801937826e-02\n7.23532989589047160e-02\n8.06502020101153988e-02\n8.71013430002437056e-02\n9.08034149254896283e-02\n9.08159892354104548e-02\n8.62482675142059729e-02\n7.63751594640425246e-02\n6.07782685496438407e-02\n3.95007410629006975e-02\n1.31969784753790693e-02\n-1.67500268383277591e-02\n-4.81777322343097808e-02\n-7.81962917364327215e-02\n-1.03376873560981103e-01\n-1.20095455052176642e-01\n-1.25026954396055434e-01\n-1.15749595969589641e-01\n-9.13781405507257671e-02\n-5.31052967523917216e-02\n-4.50532348563120657e-03\n4.85435490600476249e-02\n9.84187564008241061e-02\n1.36808926410437209e-01\n1.56155667275751031e-01\n1.51236510245774031e-01\n1.20535716423707182e-01\n6.70146719361490589e-02\n-2.03103863374779967e-03\n-7.61456005524774882e-02\n-1.43754116677146243e-01\n-1.94617638697844375e-01\n-2.22057062929566146e-01\n-2.24301299840097335e-01\n-2.04544468566579402e-01\n-1.69701023806082374e-01\n-1.28285138449116543e-01\n-8.81327498310185975e-02\n-5.46984723541303133e-02\n-3.03825893793976641e-02\n-1.49033470720246041e-02\n-6.33626288147120728e-03\n-2.27368918836191262e-03\n-6.61968336574555744e-04\n-1.46768844735491465e-04\n-2.20506453473566056e-05\n-1.68526875863532929e-06\n1.62350700926522477e-02\n2.81199662649156551e-02\n3.62893195268942856e-02\n4.28746776640605426e-02\n4.84356012682713444e-02\n5.31507229498798320e-02\n5.70279842952589322e-02\n5.99700293252287686e-02\n6.18022894588756422e-02\n6.22903217952650648e-02\n6.11558453859680079e-02\n5.80959823236097614e-02\n5.28083620512185270e-02\n4.50237131293051915e-02\n3.45466008969764413e-02\n2.13037623595236335e-02\n5.39790030501094420e-03\n-1.28372033718130857e-02\n-3.27867230481001526e-02\n-5.35188627195635411e-02\n-7.37739650843563938e-02\n-9.19908596433686443e-02\n-1.06382210766818586e-01\n-1.15067726649617480e-01\n-1.16268025204709705e-01\n-1.08552369010075755e-01\n-9.11206896138069544e-02\n-6.40856161664755675e-02\n-2.87061043669413762e-02\n1.24855781186881988e-02\n5.57228289821089934e-02\n9.62569067240615223e-02\n1.28841538827077856e-01\n1.48425452032759864e-01\n1.50974195174793741e-01\n1.34288734453937186e-01\n9.86500092100103948e-02\n4.71128648563493846e-02\n-1.46872160217697036e-02\n-7.92621700221299019e-02\n-1.38456006543841492e-01\n-1.84874459318493861e-01\n-2.13248208555960272e-01\n-2.21393285848308002e-01\n-2.10506927774043118e-01\n-1.84704439962961320e-01\n-1.49918126769439441e-01\n-1.12471086903814937e-01\n-7.77330524647750348e-02\n-4.92201122052412163e-02\n-2.83283504617818337e-02\n-1.46622042251894295e-02\n-6.72759617194548711e-03\n-2.68396290647759895e-03\n-9.06091884896413234e-04\n-2.48726919322863119e-04\n-5.20910740281876664e-05\n-7.40413007580226801e-06\n-5.36074453361967051e-07\n0.0\n3.01506310859854184e-04\n1.16772892073665167e-03\n2.76263286428851456e-03\n5.21654259326283926e-03\n8.63490957538891671e-03\n1.30982110476831563e-02\n1.86569888052261108e-02\n2.53233396088426606e-02\n3.30595545147153169e-02\n4.17645869152319521e-02\n5.12592710531267273e-02\n6.12716143836936900e-02\n7.14239986084317519e-02\n8.12246937877768860e-02\n9.00666431150590197e-02\n9.72369044848212516e-02\n1.01940292941189573e-01\n1.03340475905259618e-01\n1.00620833459290640e-01\n9.30656248840481537e-02\n8.01592779457080129e-02\n6.16979441925240360e-02\n3.79030499496011281e-02\n9.52190250353670241e-03\n-2.21037107731237130e-02\n-5.50224513544659913e-02\n-8.67328837932424546e-02\n-1.14333647657519744e-01\n-1.34770531256605208e-01\n-1.45171326837975040e-01\n-1.43239949294659330e-01\n-1.27660637800559196e-01\n-9.84455864154070437e-02\n-5.71506233302023076e-02\n-6.88908116138341881e-03\n4.79025106631488506e-02\n1.01951860657181648e-01\n1.49842441633035117e-01\n1.86804603013038528e-01\n2.09460048247438968e-01\n2.16361130024492199e-01\n2.08194095627154629e-01\n1.87583246124563507e-01\n1.58527483171852501e-01\n1.25596256948382834e-01\n9.30776811247510660e-02\n6.42827052453658204e-02\n4.11580862557492308e-02\n2.42628708194173905e-02\n1.30528653294728781e-02\n6.33565051957452920e-03\n2.73364601056088783e-03\n1.02788519664443671e-03\n3.27696023739039259e-04\n8.50893436860199220e-05\n1.68806940618683159e-05\n2.27568128559198144e-06\n1.56435727888280488e-07\n1.79046636391369494e-02\n3.10117871154162658e-02\n4.00257324344461402e-02\n4.73102772695130278e-02\n5.35064959994192152e-02\n5.88481052708334854e-02\n6.33944399165874140e-02\n6.71027378213901321e-02\n6.98578885586954440e-02\n7.14883640907925250e-02\n7.17780801446980948e-02\n7.04784734559305015e-02\n6.73231418838266676e-02\n6.20465253529840083e-02\n5.44075390968115080e-02\n4.42185129076099540e-02\n3.13791074123801333e-02\n1.59140092452016539e-02\n-1.98785925261886921e-03\n-2.19361011591692467e-02\n-4.33083328350423943e-02\n-6.52322970315843409e-02\n-8.65872622303461292e-02\n-1.06031436848002203e-01\n-1.22061156083718300e-01\n-1.33105277630887753e-01\n-1.37654357884865186e-01\n-1.34418809769907721e-01\n-1.22503746603615682e-01\n-1.01581402102118371e-01\n-7.20361399209634296e-02\n-3.50537323335584905e-02\n7.37249509524031971e-03\n5.25394821803076145e-02\n9.72442327997277700e-02\n1.38095325738764541e-01\n1.71894587314255554e-01\n1.96037255232283880e-01\n2.08865275258645788e-01\n2.09906305893017009e-01\n1.99944024550594845e-01\n1.80893489831186999e-01\n1.55494191130832293e-01\n1.26874278635682625e-01\n9.80711211941832639e-02\n7.16054532775902697e-02\n4.91933496358932729e-02\n3.16441771806525163e-02\n1.89436776312697022e-02\n1.04748032788625402e-02\n5.29989870504322773e-03\n2.42492716987028310e-03\n9.88192195711550848e-04\n3.51531981353354840e-04\n1.06180529597888198e-04\n2.61548850434639184e-05\n4.92779010231894724e-06\n6.31505663183897429e-07\n4.13021061256035997e-08\n0.0\n2.72652770815327166e-04\n1.05597964066506990e-03\n2.49848944307375954e-03\n4.71919469902977277e-03\n7.81680882067214977e-03\n1.18715935525461544e-02\n1.69435295799298183e-02\n2.30679794903735427e-02\n3.02493602002035511e-02\n3.84531887237506628e-02\n4.75969006089514840e-02\n5.75399753881929987e-02\n6.80741041638783795e-02\n7.89143797299115268e-02\n8.96927561304854543e-02\n9.99552802830967757e-02\n1.09164799156308487e-01\n1.16710934837070901e-01\n1.21929028312518631e-01\n1.24129407082963203e-01\n1.22637662829490859e-01\n1.16845584726997659e-01\n1.06270973873255473e-01\n9.06228210245777210e-02\n6.98664060568025269e-02\n4.42810174093176759e-02\n1.45015385509254750e-02\n-1.84654716701393613e-02\n-5.32599244326753193e-02\n-8.82269921846680349e-02\n-1.21518837304064431e-01\n-1.51235748361515071e-01\n-1.75596201982767652e-01\n-1.93118315029918719e-01\n-2.02789424565945842e-01\n-2.04197741468488680e-01\n-1.97601599558327484e-01\n-1.83918564935347972e-01\n-1.64628306212543485e-01\n-1.41598040036799377e-01\n-1.16854666054959824e-01\n-9.23397294452822232e-02\n-6.96885872033088660e-02\n-5.00713845873629673e-02\n-3.41207214104299536e-02\n-2.19519314729194510e-02\n-1.32616204503095622e-02\n-7.47418800869437041e-03\n-3.89902428131107433e-03\n-1.86457762280880135e-03\n-8.07618276986610912e-04\n-3.11996709008751651e-04\n-1.05343685629177467e-04\n-3.02339407534672092e-05\n-7.08313014993010400e-06\n-1.27032597579421158e-06\n-1.55080026449005811e-07\n-9.66836297074947660e-09\n2.08111923183751032e-02\n3.60460424615128144e-02\n4.65285378416218851e-02\n5.50215846173716105e-02\n6.22986998642010015e-02\n6.86751032912280707e-02\n7.42801039791543272e-02\n7.91419123888000148e-02\n8.32218978791633007e-02\n8.64312358328082619e-02\n8.86407428453560992e-02\n8.96882891804234861e-02\n8.93859255669851999e-02\n8.75279404527197907e-02\n8.39006162466166411e-02\n7.82941708982456686e-02\n7.05171264714029855e-02\n6.04130794739988347e-02\n4.78795302937353451e-02\n3.28880525161607540e-02\n1.55046557603319805e-02\n-4.09125521054432093e-03\n-2.55913502831552585e-02\n-4.85486360861140803e-02\n-7.23760381850874629e-02\n-9.63557278643029924e-02\n-1.19661156364226043e-01\n-1.41392871635969586e-01\n-1.60627857545583314e-01\n-1.76480404405878422e-01\n-1.88170538380851710e-01\n-1.95094055701472813e-01\n-1.96886569896286806e-01\n-1.93473086695024027e-01\n-1.85094859533254497e-01\n-1.72306928500070650e-01\n-1.55942873085796518e-01\n-1.37047675562655930e-01\n-1.16784612570035862e-01\n-9.63268776319090997e-02\n-7.67481348328729329e-02\n-5.89274366272461297e-02\n-4.34822914813969980e-02\n-3.07391426187584201e-02\n-2.07438662704426090e-02\n-1.33075277812694012e-02\n-8.07630009014692792e-03\n-4.61075120213356310e-03\n-2.45957027010488280e-03\n-1.21612724803382092e-03\n-5.51915630495470764e-04\n-2.27117654680146155e-04\n-8.34410550154903894e-05\n-2.68170292838643561e-05\n-7.33189671918606403e-06\n-1.63748353328967984e-06\n-2.80139779869376311e-07\n-3.26415638360203196e-08\n-1.94331571782126399e-09\n0.0\n2.25039003138635983e-04\n8.71572311403055722e-04\n2.06237174901574040e-03\n3.89664068871827841e-03\n6.45867189201170151e-03\n9.82100923385459748e-03\n1.40452019704092428e-02\n1.91811403873255390e-02\n2.52653762569033033e-02\n3.23186390273248955e-02\n4.03426993700315081e-02\n4.93167303574380822e-02\n5.91933466123547442e-02\n6.98945517290370244e-02\n8.13078870817717375e-02\n9.32831443111799691e-02\n1.05630071554399824e-01\n1.18117559987667556e-01\n1.30474830219832139e-01\n1.42395133187307982e-01\n1.53542422057469569e-01\n1.63561325567450899e-01\n1.72090547880203393e-01\n1.78779530859006525e-01\n1.83307847718023997e-01\n1.85406372814521853e-01\n1.84878828707094933e-01\n1.81621904350058594e-01\n1.75641838712246229e-01\n1.67065251907793866e-01\n1.56142157239465534e-01\n1.43239558455315663e-01\n1.28824844022492752e-01\n1.13439294425912746e-01\n9.76633110057558984e-02\n8.20762792459357043e-02\n6.72150687410453807e-02\n5.35358051274084229e-02\n4.13835229074655531e-02\n3.09735158822910389e-02\n2.23866840757043113e-02\n1.55791426852981939e-02\n1.04041706126939883e-02\n6.64267785137670399e-03\n4.03718396161713809e-03\n2.32410363518856158e-03\n1.25997369094314770e-03\n6.38905444085376053e-04\n3.00569695255653059e-04\n1.29895218522666883e-04\n5.09399608374732529e-05\n1.78475210237876995e-05\n5.47362371672544523e-06\n1.42888457092070652e-06\n3.04860419546480170e-07\n4.98478951434992269e-08\n5.55360228195190694e-09\n3.16259149796814239e-10\n2.96220948407076197e-02\n5.13069732907295017e-02\n6.62351292602042507e-02\n7.83615241021569098e-02\n8.88282828198917185e-02\n9.81473627805815735e-02\n1.06590961000309153e-01\n1.14314263346312242e-01\n1.21405421542515393e-01\n1.27909408051271212e-01\n1.33840798310001258e-01\n1.39191345218514340e-01\n1.43934967038919781e-01\n1.48031455215725027e-01\n1.51429615742366963e-01\n1.54070263594821844e-01\n1.55889327720588222e-01\n1.56821221797884658e-01\n1.56802559544443443e-01\n1.55776226023004422e-01\n1.53695750060453079e-01\n1.50529854548256070e-01\n1.46266991613048791e-01\n1.40919602024910273e-01\n1.34527778979067175e-01\n1.27161973990052163e-01\n1.18924367000176931e-01\n1.09948544148488758e-01\n1.00397193808604734e-01\n9.04576498161158427e-02\n8.03352797619634462e-02\n7.02449273262820556e-02\n6.04008529503200914e-02\n5.10058493163521032e-02\n4.22404022337568436e-02\n3.42528854930421386e-02\n2.71517852409176030e-02\n2.10008219861820486e-02\n1.58175723783959624e-02\n1.15758096112433869e-02\n8.21132869440136318e-03\n5.63057098774089916e-03\n3.72099191934408728e-03\n2.36190094427522670e-03\n1.43449261398318146e-03\n8.29990621235702380e-04\n4.55204223357251003e-04\n2.35268734960380842e-04\n1.13806560418602679e-04\n5.11047252516699148e-05\n2.10927596165252400e-05\n7.90396901668863894e-06\n2.64738081214636614e-06\n7.76524165511831082e-07\n1.93951444574917800e-07\n3.96070269220229581e-08\n6.20066787495789650e-09\n6.61634265368125662e-10\n3.60956899951284652e-11\n7.07106781186547462e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.12372435695794470e-01\n3.53553390593273731e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.84653196881457649e-01\n1.76776695296636865e-01\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.33853586673371333e-01\n4.05046293650491274e-01\n-5.22912516583797227e-01\n8.83883476483184327e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.53093108923948618e-01\n5.92927061281571133e-01\n-3.50780380010057014e-01\n4.41941738241592164e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.46575492494482179e-01\n-2.53876200144873776e-01\n-1.63876382526586178e-01\n5.81703452155821421e-01\n-2.19863238741723255e-01\n2.20970869120796082e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-6.89981317681863104e-02\n-2.67228615257610491e-01\n-4.21585548851001302e-01\n4.78033079399323602e-01\n-1.32121363478810649e-01\n1.10485434560398041e-02\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.06977062012727761e-01\n1.85289706650490965e-01\n1.81798066847188994e-01\n-5.66069404148024924e-02\n-5.34885310063638819e-01\n3.54802775870799780e-01\n-7.71422564770761626e-02\n5.52427172801990204e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.94511911654768649e-02\n1.52793806371937069e-01\n3.01313449619951434e-01\n2.04994402553155097e-01\n-5.28802957971468812e-01\n2.46372609862835601e-01\n-4.41077726196727124e-02\n2.76213586400995102e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.42790976968414707e-02\n-1.45975679226990590e-01\n-1.61531821313557283e-01\n-6.37090094933597251e-02\n2.16717679791878087e-01\n3.99317349614470185e-01\n-4.55808912293701407e-01\n1.63205770906627440e-01\n-2.48208301311305356e-02\n1.38106793200497551e-03\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.55777360423999900e-02\n-9.90621457259043686e-02\n-2.10503024770429370e-01\n-2.53153933531557018e-01\n1.04952076465843151e-02\n4.90608224764219392e-01\n-3.59502355151360586e-01\n1.04378040749120216e-01\n-1.37934051677983741e-02\n6.90533966002487756e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.95453758035305819e-02\n1.20456124323186198e-01\n1.40697884215800262e-01\n9.63808314913036923e-02\n-6.45778489604212497e-02\n-2.91065800584817180e-01\n-2.08957848692535114e-01\n4.93804817536818708e-01\n-2.66261292339000477e-01\n6.49588425253175561e-02\n-7.58802259175783873e-03\n3.45266983001243878e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.79405987020252317e-02\n6.94836399939341154e-02\n1.53009670967928502e-01\n2.20107701663292993e-01\n1.43140129389142751e-01\n-1.80507282585682077e-01\n-3.71745290494228942e-01\n4.41307394385264451e-01\n-1.88122985930449738e-01\n3.95553021143057876e-02\n-4.13960570259110615e-03\n1.72633491500621939e-04\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.92039757166832603e-02\n-1.02544293951369436e-01\n-1.23357924633426694e-01\n-1.03239338518338108e-01\n-6.42871453489237375e-03\n1.68093812205297288e-01\n2.74914431263867276e-01\n8.10642466595897990e-03\n-4.54921548126905106e-01\n3.63635843788664037e-01\n-1.28117052855235669e-01\n2.36610244206258598e-02\n-2.24257483775315396e-03\n8.63167457503109694e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.32842986029970203e-02\n-5.14498672554539113e-02\n-1.15603486198933667e-01\n-1.81283661577571059e-01\n-1.76520799885995811e-01\n-5.86588815455455718e-03\n2.73642327022753817e-01\n1.99320449302147040e-01\n-4.67026783576275695e-01\n2.82240662668030662e-01\n-8.47113439910263250e-02\n1.39448970444285419e-02\n-1.20766350936336538e-03\n4.31583728751554847e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n5.15434170219584153e-02\n8.92758170777425003e-02\n1.09344092753528091e-01\n1.01404123890135062e-01\n4.07301127516174893e-02\n-8.56743299651528262e-02\n-2.20498364544323755e-01\n-1.84736218894800769e-01\n1.59017677884524061e-01\n3.44078934089262323e-01\n-4.30008059376045748e-01\n2.09163768146521351e-01\n-5.46672604778346838e-02\n8.11598337070386366e-03\n-6.47015840060857815e-04\n2.15791864375777424e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.02345192513237059e-02\n3.96381226168159156e-02\n9.01931907128339511e-02\n1.48631623034034988e-01\n1.72042866302962782e-01\n9.07318468848569426e-02\n-1.19866611828528369e-01\n-2.78556309580142325e-01\n-1.24278691962094977e-02\n4.24348123789451748e-01\n-3.66809959680972963e-01\n1.49375400964146920e-01\n-3.45683412474779711e-02\n4.67292785582249480e-03\n-3.45098354428059122e-04\n1.07895932187888712e-05\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-4.56399474313250730e-02\n-7.90507078058277080e-02\n-9.79718639481213932e-02\n-9.66015606026778550e-02\n-5.74488848785910042e-02\n3.38731370251748251e-02\n1.56041624778150728e-01\n2.10533095503392553e-01\n5.31636663628141590e-02\n-2.58761013058376121e-01\n-1.83866825334375844e-01\n4.44497812568921680e-01\n-2.95414932464576840e-01\n1.03484562945810807e-01\n-2.14841467400909598e-02\n2.66551544926119576e-03\n-1.83343732310454040e-04\n5.39479660939443559e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-8.12779240754105299e-03\n-3.14788046358375831e-02\n-7.22351009754070017e-02\n-1.22860358428221114e-01\n-1.56506062959549386e-01\n-1.24232982942461878e-01\n1.42344139090214566e-02\n2.01327606218266897e-01\n2.05689264120524185e-01\n-1.47671631501978595e-01\n-3.17271004569918191e-01\n4.20035413429815763e-01\n-2.27379255429146721e-01\n6.98910274057256420e-02\n-1.31549524088687038e-02\n1.50807484138254836e-03\n-9.70688678741414893e-05\n2.69739830469721780e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.09507954903469001e-02\n7.09288583996432881e-02\n8.86307272903126137e-02\n9.09639704527408915e-02\n6.52584869311410437e-02\n-1.45260345997923679e-03\n-1.03223850969412875e-01\n-1.86198844713188538e-01\n-1.44326934607074103e-01\n8.00351350588339727e-02\n2.75687717919288811e-01\n8.88656633110126819e-03\n-3.96916132760715301e-01\n3.68867993548947060e-01\n-1.68683485161817609e-01\n4.61917552579768492e-02\n-7.95115139099776026e-03\n8.47091515042965862e-04\n-5.12328186743289646e-05\n1.34869915234860890e-06\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n6.61134635589627224e-03\n2.56056343323953564e-02\n5.91088434232505816e-02\n1.02723890512604304e-01\n1.38970988827875536e-01\n1.33391498453093255e-01\n4.78956046615338499e-02\n-1.10238279264893491e-01\n-2.19985482132737692e-01\n-8.34232810706853345e-02\n2.47772805434255866e-01\n1.65701105440150903e-01\n-4.24277917160628459e-01\n3.06332923264078294e-01\n-1.21360459018218084e-01\n2.99640781761113389e-02\n-4.75142615106977605e-03\n4.72770516148695794e-04\n-2.69655523597692350e-05\n6.74349576174304449e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.71360054612984297e-02\n-6.43214482491241829e-02\n-8.08534054499439048e-02\n-8.53246568294410423e-02\n-6.83597890481319886e-02\n-1.89633117232360857e-02\n6.35837506744712372e-02\n1.49958365846224934e-01\n1.68394422018244228e-01\n4.29448711120380758e-02\n-1.78415943868475702e-01\n-2.15433292864517095e-01\n1.42996615456625148e-01\n2.91388108825173242e-01\n-4.10468654023286250e-01\n2.43326247690153236e-01\n-8.50729385293069185e-02\n1.91236468801428659e-02\n-2.81084222623789303e-03\n2.62346470332941917e-04\n-1.41573265450511193e-05\n3.37174788087152224e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-5.48335795155571130e-03\n-2.12369540276692859e-02\n-4.92384817480257045e-02\n-8.68997867372053590e-02\n-1.22464688632805754e-01\n-1.31322704818521152e-01\n-8.16110359705668614e-02\n3.84968769960544605e-02\n1.72066290983572900e-01\n1.75488770814139133e-01\n-5.01366381202787426e-02\n-2.70683109786265363e-01\n-8.03764424668383030e-04\n3.71470721264963444e-01\n-3.69741542142611901e-01\n1.86340754749332149e-01\n-5.83166494034511318e-02\n1.20315623487936910e-02\n-1.64793638714457141e-03\n1.44828248486399076e-04\n-7.41592932462491516e-06\n1.68587394043576112e-07\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.39717517016024997e-02\n5.88407999692899877e-02\n7.42936264245926681e-02\n8.00037948889859157e-02\n6.89062655971775379e-02\n3.18660438635904458e-02\n-3.46253730907700938e-02\n-1.14902269304467827e-01\n-1.61615833327441338e-01\n-1.07864276927582298e-01\n6.40047727487350615e-02\n2.17950051626650321e-01\n1.02133119058665622e-01\n-2.40190695849872599e-01\n-1.46237150827973117e-01\n4.05311157739788042e-01\n-3.15303356189628126e-01\n1.38384156152881715e-01\n-3.92045609971083189e-02\n7.47405747584578301e-03\n-9.58375545155693942e-04\n7.95788306785342618e-05\n-3.87659371888854492e-06\n8.42936970217880561e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n4.62151457774989151e-03\n1.78990489938801317e-02\n4.16365256408676027e-02\n7.43293390968425005e-02\n1.07857764918110333e-01\n1.24342504825598443e-01\n9.81880514689788264e-02\n1.15281199739021775e-02\n-1.13108577862975998e-01\n-1.84406895713343011e-01\n-8.46367449913654063e-02\n1.57465262190036315e-01\n2.18886254237157768e-01\n-1.42694154981089449e-01\n-2.66312347887874723e-01\n4.00808174393301409e-01\n-2.57327618379486700e-01\n1.00105534682369310e-01\n-2.59085163210664784e-02\n4.59051433800808980e-03\n-5.53303486942720410e-04\n4.35403668581781198e-05\n-2.02260965120281599e-06\n4.21468485108940281e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.13046309536482784e-02\n-5.42212113239121732e-02\n-6.86949483603630784e-02\n-7.51077216437837369e-02\n-6.80535455514093002e-02\n-3.99825735066795460e-02\n1.36245225316147713e-02\n8.48280036848167718e-02\n1.42642688279874030e-01\n1.34423434769748135e-01\n2.13966755957234189e-02\n-1.46829028303033599e-01\n-1.92413047610125704e-01\n2.87491387003486407e-02\n2.65192777737401353e-01\n-9.96953747334030846e-03\n-3.47307623368017071e-01\n3.69402430953030048e-01\n-2.02524168778997621e-01\n7.07847575547383423e-02\n-1.68635954707224978e-02\n2.79083288376033361e-03\n-3.17334210055170965e-04\n2.37299576748380953e-05\n-1.05346045745215633e-06\n2.10734242554470140e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-3.94815347735415559e-03\n-1.52911326660635453e-02\n-3.56609978909837796e-02\n-6.42215183683974428e-02\n-9.52413078696679877e-02\n-1.15508986443971604e-01\n-1.04725569006554803e-01\n-4.43521460195626799e-02\n6.08399177151584883e-02\n1.56823522657345088e-01\n1.45874985959225323e-01\n-2.41723579915450772e-02\n-2.11236840069211479e-01\n-1.13052959575701481e-01\n2.35223105585242898e-01\n1.26189873806359792e-01\n-3.86981898851778805e-01\n3.22516108630937437e-01\n-1.54574067130240661e-01\n4.90623442773783155e-02\n-1.08283126869318496e-02\n1.68111893996599816e-03\n-1.80904937864760315e-04\n1.28870149231390359e-05\n-5.47807706733101586e-07\n1.05367121277235070e-08\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.90259753654005213e-02\n5.02744640721163108e-02\n6.38655891657855523e-02\n7.06518713877019866e-02\n6.64442436081885829e-02\n4.49949520307467155e-02\n1.59792382538830676e-03\n-6.02296998266834901e-02\n-1.20294637837257481e-01\n-1.38964796248224304e-01\n-7.47403231416156055e-02\n6.73658529730609690e-02\n1.83893717240485283e-01\n1.13805172146427505e-01\n-1.40173723617088047e-01\n-2.18646365692892281e-01\n1.45251404907777576e-01\n2.41912200385106746e-01\n-3.90766910149670466e-01\n2.69582742739157222e-01\n-1.14902811187521409e-01\n3.34101383852755118e-02\n-6.86857701195877583e-03\n1.00420142513388483e-03\n-1.02561832459518605e-04\n6.97559986676052368e-06\n-2.84442442190961185e-07\n5.26835606386175351e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n3.41202554315749723e-03\n1.32147181054833029e-02\n3.08808340161680420e-02\n5.59953701360432279e-02\n8.44404638849241274e-02\n1.06297954454241811e-01\n1.05492275401955993e-01\n6.48803301052843645e-02\n-1.95397564076787225e-02\n-1.17942924838579544e-01\n-1.58622610937647068e-01\n-6.90492778347738256e-02\n1.19332206147760536e-01\n2.00768997230937385e-01\n-1.40794793119891400e-02\n-2.59789642949024679e-01\n2.23307664223831408e-02\n3.23984679012347010e-01\n-3.67844013054059449e-01\n2.17340710940809367e-01\n-8.34695297879435444e-02\n2.23952028111374449e-02\n-4.30897062566833623e-03\n5.95275883078204889e-04\n-5.78518951802091874e-05\n3.76438326621821642e-06\n-1.47490448466160549e-07\n2.63417803193087675e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.70566480764052875e-02\n-4.68634891508446921e-02\n-5.96602195596015461e-02\n-6.66139703071929046e-02\n-6.44452220604182779e-02\n-4.79622399421161943e-02\n-1.26454439623290005e-02\n4.05297976454582209e-02\n9.84833209915629282e-02\n1.31952125543184473e-01\n1.03504300479783942e-01\n-2.34076256049540890e-03\n-1.34523725173483294e-01\n-1.67232288490688413e-01\n-7.91120502378966570e-03\n2.03212524442259873e-01\n1.18624474517550177e-01\n-2.32143202573216523e-01\n-1.05955729765929915e-01\n3.68916223962043488e-01\n-3.28096907259968762e-01\n1.69930465717401114e-01\n-5.94172393779041352e-02\n1.48003595813557803e-02\n-2.67618459028861775e-03\n3.50403116692283873e-04\n-3.24801224604900457e-05\n2.02575184274582707e-06\n-7.63798078664119372e-08\n1.31708901596543838e-09\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.97819787378239640e-03\n-1.15345107668695605e-02\n-2.69982963171617601e-02\n-4.92238525966122928e-02\n-7.52100628045356129e-02\n-9.74028126722076976e-02\n-1.03024239289135580e-01\n-7.69798936859321103e-02\n-1.12731091629927633e-02\n7.93322333432672361e-02\n1.45452119789026391e-01\n1.18717318548917664e-01\n-2.33842051656482641e-02\n-1.74870111807370110e-01\n-1.33728957018368011e-01\n1.26720259702736759e-01\n2.16118685879149702e-01\n-1.49650717727930538e-01\n-2.18083190834032159e-01\n3.80176180348483217e-01\n-2.80220866943655000e-01\n1.29389846509727457e-01\n-4.15390027989139543e-02\n9.65650161443479607e-03\n-1.64691689374471214e-03\n2.04933724325243608e-04\n-1.81567597578198830e-05\n1.08729028832708058e-06\n-3.95071822269082113e-08\n6.58544507982719188e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.53376470002427759e-02\n4.38860919486656481e-02\n5.59671671950234609e-02\n6.29577752790978634e-02\n6.22695850288439642e-02\n4.95652062658600429e-02\n2.06670030172404658e-02\n-2.48994148287452789e-02\n-7.87651593135740707e-02\n-1.19515488410533291e-01\n-1.15678169661124028e-01\n-4.39878985573487619e-02\n7.69036016271966022e-02\n1.62530321218288393e-01\n1.04167640965470390e-01\n-9.35922024464643093e-02\n-2.04125696241691384e-01\n4.58947759712970572e-03\n2.54609727178843503e-01\n-3.55834136552040103e-02\n-3.01220357447553599e-01\n3.65072930581766375e-01\n-2.30855363053602547e-01\n9.62635781645432009e-02\n-2.85738611712295885e-02\n6.22735749352190671e-03\n-1.00500903267828940e-03\n1.19143394447564869e-04\n-1.01091688837557309e-05\n5.82169454590600243e-07\n-2.04122241533395719e-08\n3.29272253991359594e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.62219141334470423e-03\n1.01557036744521281e-02\n2.38025822222568302e-02\n4.35905392010923209e-02\n6.73076369989149964e-02\n8.91251157736241278e-02\n9.88252304934228720e-02\n8.34206112161390845e-02\n3.34309666893541010e-02\n-4.55081157623018553e-02\n-1.20882091540367970e-01\n-1.36307454345571871e-01\n-4.85398053520555428e-02\n1.05207292864011120e-01\n1.77316968310483991e-01\n3.28617026309606722e-02\n-1.95465430289109010e-01\n-1.20427082859638698e-01\n2.30358552285756801e-01\n8.57752016463124989e-02\n-3.50883157930983736e-01\n3.32134924570162637e-01\n-1.84441650469399254e-01\n7.01640761635408949e-02\n-1.93702476636684780e-02\n3.97340009900600064e-03\n-6.08556064657587450e-04\n6.88856522437662690e-05\n-5.60751591119739415e-06\n3.11005444185247449e-07\n-1.05354258294671461e-08\n1.64636126995679797e-10\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.38240825235074664e-02\n-4.12645213744286810e-02\n-5.26994479378464845e-02\n-5.96437482396808341e-02\n-6.00420996705081297e-02\n-5.02499562021839000e-02\n-2.64811655050389352e-02\n1.25444694521613075e-02\n6.15978397043627016e-02\n1.05079319015526029e-01\n1.17419763793361914e-01\n7.38763132375493542e-02\n-2.53840765530702096e-02\n-1.29562451270510692e-01\n-1.44948627057307045e-01\n-1.46398830963566980e-02\n1.62197086629623372e-01\n1.47059686598357192e-01\n-1.16751590365642560e-01\n-2.12079838893898615e-01\n1.55188074481360294e-01\n1.94753426728665163e-01\n-3.68938551280933114e-01\n2.89329473998082620e-01\n-1.43498158564272810e-01\n5.02124893718114626e-02\n-1.29580261658405627e-02\n2.51059900805332718e-03\n-3.65863978895924189e-04\n3.96241972765515047e-05\n-3.09965072143923996e-06\n1.65792360586761549e-07\n-5.43236853336919907e-09\n8.23180634978398985e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.32643782873685322e-03\n-9.01025496668477442e-03\n-2.11411518868607103e-02\n-3.88584183255136287e-02\n-6.05179512029140540e-02\n-8.15697383111158858e-02\n-9.37861413435017721e-02\n-8.61132662822985950e-02\n-4.88788710180389913e-02\n1.76734976934142078e-02\n9.30771465535937537e-02\n1.33833774376033027e-01\n9.28757697984479436e-02\n-3.24138298293330795e-02\n-1.54057220148177271e-01\n-1.28810482030976753e-01\n7.11558020308530048e-02\n2.04651937593557653e-01\n9.17019193115771350e-04\n-2.49614874103931822e-01\n4.92637905594501962e-02\n2.78836145158064208e-01\n-3.61105130868910551e-01\n2.43107144405384307e-01\n-1.09071866772257428e-01\n3.53467503916240280e-02\n-8.56413234964061888e-03\n1.57211513491868193e-03\n-2.18501632684760607e-04\n2.26839141862658686e-05\n-1.70781453290448186e-06\n8.82056392174331490e-08\n-2.79851150262300353e-09\n4.11590317489199493e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.24811952175471216e-02\n3.89385723316660742e-02\n4.97884330594682220e-02\n5.66337353708312730e-02\n5.78355551606845875e-02\n5.03138919507592486e-02\n3.06728899129834719e-02\n-2.78968739309490591e-03\n-4.69486098780287422e-02\n-9.04779955930190699e-02\n-1.12977747473449880e-01\n-9.11312065184358977e-02\n-1.53940868705545204e-02\n8.74409456660310419e-02\n1.46759245032522745e-01\n8.80370635792219747e-02\n-7.48694550445199308e-02\n-1.80280640962876354e-01\n-5.18321274057498768e-02\n1.88681460743756274e-01\n1.19495353940107921e-01\n-2.29403602657930777e-01\n-6.58079623280710541e-02\n3.32741395412873175e-01\n-3.34697913032056871e-01\n1.98088265106875522e-01\n-8.12078561346212396e-02\n2.45133493927181707e-02\n-5.59765643503988032e-03\n9.76291473231471921e-04\n-1.29690704056447569e-04\n1.29282256992322008e-05\n-9.38087883931937043e-07\n4.68398687555089186e-08\n-1.44041910716964896e-09\n2.05795158744599746e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.07806285254703285e-03\n8.04830282028693757e-03\n1.89014745758805322e-02\n3.48478692787146938e-02\n5.46583983691997649e-02\n7.47443013742970369e-02\n8.84323005687807084e-02\n8.63557852051555497e-02\n5.92859037334795905e-02\n4.39362123176255219e-03\n-6.62001073963657816e-02\n-1.20294103912396463e-01\n-1.14591417300027740e-01\n-2.65481567894786247e-02\n1.01993443726285465e-01\n1.57538593267010529e-01\n4.57361676044914095e-02\n-1.48628062064441707e-01\n-1.55742235113204841e-01\n1.09770304692729609e-01\n2.06966956502187105e-01\n-1.61362486106531616e-01\n-1.71879875475702659e-01\n3.57002281444954828e-01\n-2.96970494341222968e-01\n1.57163566533230381e-01\n-5.93527842665138236e-02\n1.67706107460414942e-02\n-3.62151686052126403e-03\n6.01624941919006806e-04\n-7.65357433872048190e-05\n7.33749012838912887e-06\n-5.13809584741640336e-07\n2.48296187252991674e-08\n-7.40791111381865768e-10\n1.02897579372299873e-11\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-2.12816502681797207e-02\n-3.68608995333990982e-02\n-4.71793262444005421e-02\n-5.38928417801408238e-02\n-5.56915912862105678e-02\n-4.99582735431423203e-02\n-3.36631066209815977e-02\n-4.91156907340564199e-03\n3.45857622915974050e-02\n7.66380627718874913e-02\n1.05131198138008822e-01\n9.93307865079840757e-02\n4.52185883455058571e-02\n-4.63278736087167492e-02\n-1.26520898685542588e-01\n-1.24501302937105457e-01\n-8.76149374982767258e-03\n1.39009840017824349e-01\n1.45430724917557541e-01\n-5.23901068506406262e-02\n-2.03641230091638509e-01\n-3.34229155239343292e-03\n2.44704412764027684e-01\n-6.30482839383653543e-02\n-2.56722185146756043e-01\n3.55963783728098171e-01\n-2.54118863941887874e-01\n1.21807850318845806e-01\n-4.26606710224011129e-02\n1.13315026562792309e-02\n-2.32099260135682156e-03\n3.68093455385364618e-04\n-4.49246874345974923e-05\n4.14816878940934023e-06\n-2.80666439932428782e-07\n1.31402313931041177e-08\n-3.80686279394582920e-10\n5.14487896861499366e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.86745723208211058e-03\n-7.23263075960861330e-03\n-1.69990960812777155e-02\n-3.14211564101592664e-02\n-4.95772040034796330e-02\n-6.86104779796190833e-02\n-8.30695156534964479e-02\n-8.50243645688121275e-02\n-6.59726096787420641e-02\n-2.14395641429474294e-02\n4.21206521870994693e-02\n1.01605177089896054e-01\n1.20244548014451419e-01\n6.76016392702967622e-02\n-4.51760544869131281e-02\n-1.41525300570246454e-01\n-1.16379318976619281e-01\n4.65345033374856831e-02\n1.79019170607708278e-01\n6.59803259590538982e-02\n-1.83093383809195986e-01\n-1.16520274276820573e-01\n2.28916206813573969e-01\n4.61698185797689356e-02\n-3.14408655384954827e-01\n3.35841052092187953e-01\n-2.10846353029051609e-01\n9.24607554307678992e-02\n-3.02012044843330135e-02\n7.56926647351931822e-03\n-1.47453542826450233e-03\n2.23710680151412822e-04\n-2.62373116336369795e-05\n2.33651175827044669e-06\n-1.52924036405231572e-07\n6.94311662653946591e-09\n-1.95488476130819222e-10\n2.57243948430749683e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n2.02036552227492991e-02\n3.49937573444060943e-02\n4.48278912869238405e-02\n5.13899921860138803e-02\n5.36329394347676222e-02\n4.93210453073292532e-02\n3.57573145785533286e-02\n1.09920598842479719e-02\n-2.42158482710664660e-02\n-6.39779763357636866e-02\n-9.56383738662661964e-02\n-1.01335837201796591e-01\n-6.55768663340076385e-02\n1.07490560845644820e-02\n9.64823503657013110e-02\n1.32699615167439139e-01\n6.94679340813668805e-02\n-7.01538332661073849e-02\n-1.60636143131251380e-01\n-7.03429566975847104e-02\n1.35632305247937235e-01\n1.61147047998105475e-01\n-1.05281856140225935e-01\n-2.01029929077017749e-01\n1.67807972508856762e-01\n1.49442883182243691e-01\n-3.44346547072583109e-01\n3.03190113760120783e-01\n-1.70325227739901219e-01\n6.88854684689907404e-02\n-2.10864033927562096e-02\n5.00299350173398581e-03\n-9.29183622004629102e-04\n1.35114242016625308e-04\n-1.52511118944048544e-05\n1.31152186994802965e-06\n-8.31227125340200578e-08\n3.66320372955605278e-09\n-1.00316894550818975e-10\n1.28621974215374841e-12\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.68733084269139205e-03\n6.53500425328588843e-03\n1.53696509558603096e-02\n2.84714545421936548e-02\n4.51493331926983710e-02\n6.31105739479151662e-02\n7.78709985539559474e-02\n8.27090663057185593e-02\n6.99448176210600847e-02\n3.43276257536381385e-02\n-2.14721953559170661e-02\n-8.13637555126591749e-02\n-1.15535201307352509e-01\n-9.23176745562690609e-02\n-4.50055827417475320e-03\n1.03351054155751618e-01\n1.40931629940339420e-01\n4.38202707296069041e-02\n-1.21190000812141901e-01\n-1.56191952971563158e-01\n3.71393373836286581e-02\n2.01851553264775274e-01\n3.36347342362026524e-03\n-2.39763246642032746e-01\n7.67012743188445617e-02\n2.34815863580924822e-01\n-3.49678107491330437e-01\n2.63903340306894607e-01\n-1.34391222081947370e-01\n5.04619131157819922e-02\n-1.45364229684276317e-02\n3.27456574110559714e-03\n-5.81100898665069419e-04\n8.11283243032525736e-05\n-8.82579521794890832e-06\n7.33777653934233196e-07\n-4.50794913787991465e-08\n1.92999704583092952e-09\n-5.14447700924341953e-11\n6.43109871076874207e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.92296228181913637e-02\n-3.33066837314932584e-02\n-4.26980532870509799e-02\n-4.90978906992029160e-02\n-5.16707722203550504e-02\n-4.84977532771168271e-02\n-3.71792497098033803e-02\n-1.57911072977321466e-02\n1.55457904503789081e-02\n5.26380508924737672e-02\n8.55808567462892356e-02\n9.92729012188578869e-02\n7.83841113160658742e-02\n1.78836705360222101e-02\n-6.42234460082189290e-02\n-1.22684026104344798e-01\n-1.04571704843402113e-01\n2.84395907453529597e-03\n1.26696024980378324e-01\n1.35325722681615912e-01\n-2.14883625107592027e-02\n-1.75452197975505791e-01\n-7.62991960617101367e-02\n1.78710858010510232e-01\n1.11974246588549695e-01\n-2.28614791268620859e-01\n-2.69517170438992627e-02\n2.95843084778061649e-01\n-3.35612382524687836e-01\n2.22689558582787689e-01\n-1.03840242456106069e-01\n3.64020532165198613e-02\n-9.90425563579549854e-03\n2.12385753714242455e-03\n-3.60844405267784205e-04\n4.84457942222548925e-05\n-5.08613529820444096e-06\n4.09272977624966595e-07\n-2.43952796628567839e-08\n1.01548234866318681e-09\n-2.63655439404206247e-11\n3.21554935538437104e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.53207183589857505e-03\n-5.93368870562860362e-03\n-1.39634001360953008e-02\n-2.59150123110877748e-02\n-4.12720630158234653e-02\n-5.81811824191460561e-02\n-7.29296222864153215e-02\n-7.98066363879913337e-02\n-7.19540357193568236e-02\n-4.38681329319077634e-02\n4.26141187609695941e-03\n6.16093793018236829e-02\n1.04741554068370601e-01\n1.04112030837777425e-01\n4.27409109972499354e-02\n-5.87322652792297700e-02\n-1.32712680317800341e-01\n-1.01403537238645439e-01\n3.84929813278604011e-02\n1.57613801986351054e-01\n8.93970805950522335e-02\n-1.23930799360517610e-01\n-1.64222281816483379e-01\n1.02844105191431348e-01\n1.94414007829319946e-01\n-1.74250886017714796e-01\n-1.27441062767785412e-01\n3.30972425194132169e-01\n-3.08024984650235589e-01\n1.82925254376322621e-01\n-7.87385774310291608e-02\n2.58929108614052300e-02\n-6.67537840086772794e-03\n1.36588223290353902e-03\n-2.22587496886450173e-04\n2.87801523862112907e-05\n-2.91948181034421179e-06\n2.27610996871251364e-07\n-1.31749262489557947e-08\n5.33626204258542593e-10\n-1.35043502499676132e-11\n1.60777467769218552e-13\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.83452031825944578e-02\n3.17748239874278693e-02\n4.07601174237063740e-02\n4.69927251587733547e-02\n4.98091944963753377e-02\n4.75551250062399081e-02\n3.80942405503551518e-02\n1.95739547530067171e-02\n-8.30860163917805997e-03\n-4.26114404547044551e-02\n-7.56028404129578668e-02\n-9.46602445136352777e-02\n-8.54511544367516224e-02\n-3.97070616772675980e-02\n3.39002212351705787e-02\n1.02649346873191036e-01\n1.18299221020119485e-01\n4.97649717215237208e-02\n-7.24253668387531829e-02\n-1.45706237154485274e-01\n-7.21553147675695755e-02\n1.02908432509312808e-01\n1.62803933939285939e-01\n-2.50463793321466406e-02\n-1.99715299181148831e-01\n-1.49213178644466335e-03\n2.34682169377956273e-01\n-9.00446823974875715e-02\n-2.13087933045450512e-01\n3.42282649876263501e-01\n-2.72467529047716484e-01\n1.46746585162839227e-01\n-5.86961526126708322e-02\n1.81810978171085581e-02\n-4.45406638611287910e-03\n8.71481626948623022e-04\n-1.36448789759018957e-04\n1.70142351255960155e-05\n-1.66955639677499923e-06\n1.26232523620632720e-07\n-7.10150915954288944e-09\n2.80077175366668184e-10\n-6.91296372191725476e-12\n8.03887338846092759e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.39730333148039816e-03\n5.41173253242372386e-03\n1.27414229092095831e-02\n2.36854974619111966e-02\n3.78609482632565469e-02\n5.37600002366644750e-02\n6.82896468055726735e-02\n7.65831616951512945e-02\n7.25561685123442129e-02\n5.07591663463409573e-02\n9.79466642184510621e-03\n-4.33990806745251437e-02\n-9.08319919236041662e-02\n-1.06525406317271490e-01\n-6.92506274207924793e-02\n1.66789460567951173e-02\n1.05898391728544580e-01\n1.25841367501369761e-01\n3.48942341826921840e-02\n-1.06869331701593101e-01\n-1.46966956797025344e-01\n7.65998754182712287e-05\n1.70810616244706642e-01\n8.35867197994644845e-02\n-1.75438530799334941e-01\n-1.06188912172257469e-01\n2.28279873259202182e-01\n8.22984562964719848e-03\n-2.77031446563898276e-01\n3.34056273949235649e-01\n-2.33590748418416511e-01\n1.15267891447861787e-01\n-4.30812058585282737e-02\n1.26145945765560024e-02\n-2.94418042024717540e-03\n5.51921794079963707e-04\n-8.31546620365066673e-05\n1.00122590230246749e-05\n-9.51393116143514935e-07\n6.98245804860625544e-08\n-3.82080056585823940e-09\n1.46831403324260475e-10\n-3.53687590646472247e-12\n4.01943669423046380e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.75385715931343188e-02\n-3.03776970914928675e-02\n-3.89894299482247964e-02\n-4.50537831243302128e-02\n-4.80480260970503614e-02\n-4.65400382039492799e-02\n-3.86255045510803599e-02\n-2.25480495396490899e-02\n2.27174361599671252e-03\n3.38181129256359611e-02\n6.60703944825465073e-02\n8.85536648892354811e-02\n8.83022665547520264e-02\n5.55258773678883391e-02\n-7.46609704613757606e-03\n-7.83492811499439806e-02\n-1.16648725092663261e-01\n-8.43733130090411482e-02\n1.70104229921458350e-02\n1.20305094638899268e-01\n1.22969970230733555e-01\n-9.35905132160869992e-03\n-1.50958694957938427e-01\n-1.03915462896002508e-01\n1.13821482581893951e-01\n1.65617979165724905e-01\n-1.02078086683356023e-01\n-1.87205802845349906e-01\n1.80482528572332379e-01\n1.05887032567924186e-01\n-3.16897122331143477e-01\n3.11506306360772478e-01\n-1.94908626118926759e-01\n8.88419912097003217e-02\n-3.11734890841552197e-02\n8.65603665299482031e-03\n-1.92915844115690120e-03\n3.47110560421079798e-04\n-5.03961499458167799e-05\n5.86624629182310696e-06\n-5.40333524333498994e-07\n3.85266344302698084e-08\n-2.05209553793049829e-09\n7.68924989414811403e-11\n-1.80863485793819275e-12\n2.00971834711523190e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.27957098505530561e-03\n-4.95575711540941800e-03\n-1.16729154582532208e-02\n-2.17298714766428862e-02\n-3.48463920087801263e-02\n-4.97890096437865956e-02\n-6.39661460133040261e-02\n-7.32162053931973283e-02\n-7.21602998827597791e-02\n-5.55765345251779327e-02\n-2.10888036966206741e-02\n2.71967000961087710e-02\n7.57556405665781446e-02\n1.02576258694562439e-01\n8.55111455040393209e-02\n1.85689543275236145e-02\n-7.13685108828726045e-02\n-1.24881736372987939e-01\n-8.51840841702029977e-02\n3.93941327750227874e-02\n1.42330243848803356e-01\n9.42257757604894608e-02\n-8.54747418851426466e-02\n-1.66546977429292170e-01\n1.57040975955216426e-02\n1.97467238887139684e-01\n-1.88019344819042819e-03\n-2.29365773327595029e-01\n1.02939542298359415e-01\n1.91533197604292715e-01\n-3.33816802434613757e-01\n2.79815352320624711e-01\n-1.58802675309585556e-01\n6.73083989677173145e-02\n-2.22633667178538421e-02\n5.87886221383933632e-03\n-1.25374425751272208e-03\n2.16874130346125099e-04\n-3.03833333739192907e-05\n3.42291948358810337e-06\n-3.05900500334992657e-07\n2.12071334148180759e-08\n-1.10031191627599894e-09\n4.02248428160353050e-11\n-9.24415826148240616e-13\n1.00485917355761595e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.67998963697784942e-02\n2.90982740743482918e-02\n3.73653598428551822e-02\n4.32630585701949538e-02\n4.63845439304403015e-02\n4.54855374773613513e-02\n3.88656105329671236e-02\n2.48760515819512057e-02\n2.76248927439950911e-03\n-2.61461269874073213e-02\n-5.71751743013194438e-02\n-8.16723200395387677e-02\n-8.81468944587778247e-02\n-6.63517542910633390e-02\n-1.44275582313397929e-02\n5.34454003267640712e-02\n1.05157476202395544e-01\n1.02564527870409192e-01\n2.95638071887786916e-02\n-7.78829860681720942e-02\n-1.33783853231393801e-01\n-6.61391846771615666e-02\n8.51730529332631880e-02\n1.53220131301863155e-01\n1.78247327774131818e-02\n-1.65860741937022105e-01\n-8.84648720065210475e-02\n1.73136635651712306e-01\n9.94041328991669831e-02\n-2.27739976004467493e-01\n9.92889030237799168e-03\n2.57981308786253583e-01\n-3.31215699964779953e-01\n2.43523231334162982e-01\n-1.26668644069710679e-01\n5.02013264765925754e-02\n-1.57083873856483890e-02\n3.95453538621144424e-03\n-8.08548562461229039e-04\n1.34666690917015387e-04\n-1.82273378245418596e-05\n1.98945034298991199e-06\n-1.72656428541676007e-07\n1.16471530897255259e-08\n-5.89036486109767969e-10\n2.10218154225839855e-11\n-4.72257085837877579e-13\n5.02429586778807974e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.17611905411168713e-03\n4.55508950973178370e-03\n1.07332437596322564e-02\n2.00053466079873031e-02\n3.21708251299623882e-02\n4.62157369304471502e-02\n5.99569807958973550e-02\n6.98231764936909777e-02\n7.10666469609999574e-02\n5.87838173535380135e-02\n3.00317667808626884e-02\n-1.31227298005022822e-02\n-6.07293446451536989e-02\n-9.46088691310769808e-02\n-9.35696681232010830e-02\n-4.56847854471216439e-02\n3.61951623169064970e-02\n1.07666230964162196e-01\n1.10940056055426159e-01\n2.23536404712623565e-02\n-1.00507026215736109e-01\n-1.35846752025253481e-01\n-1.62287775947128274e-02\n1.42403677764350756e-01\n1.14823057616211158e-01\n-1.05370369333536440e-01\n-1.65777370680142366e-01\n1.02664257142155727e-01\n1.79459461356780203e-01\n-1.86341187302999783e-01\n-8.48039923445301491e-02\n3.02150116038778616e-01\n-3.13662584476356199e-01\n2.06223255771077224e-01\n-9.91270584711344827e-02\n3.69077227634575233e-02\n-1.09593457663402852e-02\n2.63629687646932094e-03\n-5.17675440838955502e-04\n8.31331196460129645e-05\n-1.08836230260205301e-05\n1.15200522677865436e-06\n-9.71700949266911544e-08\n6.38292718635514123e-09\n-3.14852831402780183e-10\n1.09756533845464893e-11\n-2.41153117195057181e-13\n2.51214793389403987e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.61209358962557635e-02\n-2.79222800378758976e-02\n-3.58705158480625008e-02\n-4.16048844856492933e-02\n-4.48145796327992577e-02\n-4.44149286908469970e-02\n-3.88846143669453748e-02\n-2.66859736735079213e-02\n-6.95995292709915368e-03\n1.94741915052292110e-02\n4.90011512080948675e-02\n7.44963573151986441e-02\n8.59117125296132850e-02\n7.31800333992487367e-02\n3.18406489571631673e-02\n-3.00613580110648190e-02\n-8.81760864774469300e-02\n-1.07758027232155815e-01\n-6.36345166706011878e-02\n3.19775709189640406e-02\n1.16651005253576731e-01\n1.09883142932446068e-01\n-7.71332431866365419e-03\n-1.33714841099003445e-01\n-1.10916738461859440e-01\n6.95642157350538498e-02\n1.68350522024694554e-01\n-8.72211081793769841e-03\n-1.95222452862689577e-01\n6.44875876953811787e-03\n2.23734792511103536e-01\n-1.15274523916961635e-01\n-1.70164055536562803e-01\n3.24324435249283838e-01\n-2.85949691658487493e-01\n1.70491924010590684e-01\n-7.62429970756964143e-02\n2.67770107990213009e-02\n-7.56631678646896202e-03\n1.74273729462005931e-03\n-3.29187814148754535e-04\n5.10371019690731382e-05\n-6.46978807841743947e-06\n6.64720927878313834e-07\n-5.45366401009141338e-08\n3.49079689082634680e-09\n-1.68050920657414398e-10\n5.72522385959717556e-12\n-1.23088840053332011e-13\n1.25607396694701994e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.08472742381388542e-03\n-4.20113124760565244e-03\n-9.90251969648426981e-03\n-1.84771170763622303e-02\n-2.97864244518314635e-02\n-4.29935124003884145e-02\n-5.62502048776087268e-02\n-6.64805016337743915e-02\n-6.94951639769335328e-02\n-6.07489836031443048e-02\n-3.70087187849701890e-02\n1.10930973807619473e-03\n4.64683006843350233e-02\n8.43432667407494757e-02\n9.54507151085634137e-02\n6.49196479072799287e-02\n-4.37546628453371750e-03\n-8.19387104591041138e-02\n-1.16402125826386982e-01\n-6.80514713575707669e-02\n4.51112437681951625e-02\n1.31643108854483243e-01\n9.06119505406491887e-02\n-6.35740425963955968e-02\n-1.55664101856450132e-01\n-3.25463011982652650e-02\n1.61062963962556399e-01\n9.14113873640488572e-02\n-1.71651781820813254e-01\n-9.17992460712520608e-02\n2.26861122079491717e-01\n-2.74638834186305171e-02\n-2.38715686972268110e-01\n3.27133758028667565e-01\n-2.52461693632194173e-01\n1.37970366908697711e-01\n-5.77226737959510572e-02\n1.91900278708997951e-02\n-5.17285234812659821e-03\n1.14295039404465238e-03\n-2.07983783328855249e-04\n3.11689067087047306e-05\n-3.82973710685585953e-06\n3.82261697502359940e-07\n-3.05284349905734929e-08\n1.90534375715001719e-09\n-8.95713424979161803e-11\n2.98382267775662062e-12\n-6.28005580839250896e-14\n6.28036983473509968e-16\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.54947296271686838e-02\n2.68376589637989264e-02\n3.44901382688560035e-02\n4.00656048259977748e-02\n4.33332126003985116e-02\n4.33446014060843432e-02\n3.87358878842169671e-02\n2.80789938127245092e-02\n1.04587749305105025e-02\n-1.36835414578334712e-02\n-4.15672232613794393e-02\n-6.73389093397466776e-02\n-8.22904518352506886e-02\n-7.68946777817595406e-02\n-4.51824603070834774e-02\n9.28246664275074636e-03\n6.88175382286378562e-02\n1.03622603846950434e-01\n8.51625122488588876e-02\n9.40258162821137368e-03\n-8.42585586118645424e-02\n-1.23190784366460609e-01\n-5.60485709452637898e-02\n7.71490603410546621e-02\n1.41957693042173871e-01\n3.80250389611345579e-02\n-1.33107394444665239e-01\n-1.22897469272657142e-01\n9.85217668246948786e-02\n1.65001259554958535e-01\n-1.04334215020182419e-01\n-1.71211818011922978e-01\n1.91700098163408744e-01\n6.42229980281652374e-02\n-2.86770466486349296e-01\n3.14521538030064940e-01\n-2.16820132745933508e-01\n1.09526387819341708e-01\n-4.30717369973445674e-02\n1.35966968532620844e-02\n-3.50420558818566579e-03\n7.44011625454480893e-04\n-1.30606777413531082e-04\n1.89407228380702443e-05\n-2.25787117362385242e-06\n2.19122308317213548e-07\n-1.70463726472992617e-08\n1.03801372742685855e-09\n-4.76779393290707391e-11\n1.55377279452078021e-12\n-3.20283468138268617e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.00359133478823128e-03\n3.88689252603289202e-03\n9.16454586636574614e-03\n1.71166499032955680e-02\n2.76532809049869523e-02\n4.00812334138822418e-02\n5.28286451991447983e-02\n6.32366432636567583e-02\n6.76067562535396377e-02\n6.17616411058460740e-02\n4.23613439616821186e-02\n9.00614481927162341e-03\n-3.33556583979053162e-02\n-7.29895541743131038e-02\n-9.29116826117598604e-02\n-7.72595070966611425e-02\n-2.22245447520585844e-02\n5.33118936353032952e-02\n1.07453728119774106e-01\n9.53987923049015030e-02\n7.90425529836863427e-03\n-9.86239633238811253e-02\n-1.24796251290763091e-01\n-2.07804070260075857e-02\n1.22067940470319491e-01\n1.23206326186792225e-01\n-5.54670439705644211e-02\n-1.68875379811159687e-01\n3.75245106348211840e-03\n1.93023993845794273e-01\n-1.19717966648229535e-02\n-2.17726004401894102e-01\n1.26958605480194553e-01\n1.49005887423274891e-01\n-3.13853591570765478e-01\n2.90873821320642434e-01\n-1.81750236642559904e-01\n8.54436789782003214e-02\n-3.17120080971102225e-02\n9.53167269105451020e-03\n-2.35345015620891341e-03\n4.80917317576414957e-04\n-8.15438442288116838e-05\n1.14556023602873645e-05\n-1.32606007147865874e-06\n1.25221811336723241e-07\n-9.49550801958952267e-09\n5.64479827542941226e-10\n-2.53460232772240602e-11\n8.08445165689827342e-13\n-1.63282067007192764e-14\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-1.49153584618682711e-02\n-2.58341586690582249e-02\n-3.32116220033397275e-02\n-3.86332886759592903e-02\n-4.19352060972968538e-02\n-4.22859974032437497e-02\n-3.84603343591977051e-02\n-2.91354456526192324e-02\n-1.33735769422542814e-02\n8.66375493142438995e-03\n3.48542512856124601e-02\n6.03977488262971221e-02\n7.77935527381269643e-02\n7.82387419341021156e-02\n5.50015082023348201e-02\n8.46471169411793130e-03\n-4.91546484099385228e-02\n-9.33789301143736900e-02\n-9.58451624442848149e-02\n-4.24753634491714521e-02\n4.65584996049520153e-02\n1.13675365442407236e-01\n9.62111172949670912e-02\n-1.20719355238242849e-02\n-1.22543885941844538e-01\n-1.08867617260667501e-01\n4.32122795008925698e-02\n1.55525846583246002e-01\n4.44856381102336565e-02\n-1.56679204868117705e-01\n-9.27910168036672200e-02\n1.70832186850680245e-01\n8.35132884230644357e-02\n-2.25539034459328630e-01\n4.43192212140970654e-02\n2.19269242183260410e-01\n-3.21854692028745448e-01\n2.60382927692662802e-01\n-1.49103608459652814e-01\n6.56033227650731493e-02\n-2.30603343843918986e-02\n6.61577618876218760e-03\n-1.56781788023062688e-03\n3.08791591122133168e-04\n-5.06329993144556269e-05\n6.89739006530945087e-06\n-7.75957347905360304e-07\n7.13509751266757394e-08\n-5.27725011601396538e-09\n3.06437392918077032e-10\n-1.34576262686770477e-11\n4.20315987260463183e-13\n-8.32111971795923090e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n-9.31231485683661287e-04\n-3.60664403551681084e-03\n-8.50602400394575263e-03\n-1.59003845831766355e-02\n-2.57379331178424903e-02\n-3.74429022893153773e-02\n-4.96727203528201863e-02\n-6.01209842233804345e-02\n-6.55188921569456323e-02\n-6.20485584438564761e-02\n-4.63832477729556533e-02\n-1.74258908623226814e-02\n2.15613643306100493e-02\n6.13677159501424679e-02\n8.73740714402345270e-02\n8.39387467097887224e-02\n4.30735753536244936e-02\n-2.54205416613427181e-02\n-8.96319597239925298e-02\n-1.06347499921684019e-01\n-5.01739831038397407e-02\n5.32299261477481092e-02\n1.23700123221912733e-01\n8.28396897050736464e-02\n-5.28775536891320994e-02\n-1.43085570967639686e-01\n-5.61977132639769339e-02\n1.23816025006318553e-01\n1.28765238917973951e-01\n-9.31608526655434005e-02\n-1.63492650510438126e-01\n1.06861882743359851e-01\n1.62491258203155242e-01\n-1.96459220801137896e-01\n-4.41807868984634977e-02\n2.70804866571520197e-01\n-3.14111437351427047e-01\n2.26653503225050040e-01\n-1.19973760107645350e-01\n4.96384679318883706e-02\n-1.65764998398732176e-02\n4.54921289331997394e-03\n-1.03647975975075567e-03\n1.97023114024771396e-04\n-3.12759943321989361e-05\n4.13512897657961669e-06\n-4.52475045531942631e-07\n4.05416570728018662e-08\n-2.92645637485853674e-09\n1.66078551450348462e-10\n-7.13697837991790340e-12\n2.18361705890636816e-13\n-4.23906791088685720e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n1.43777569708202525e-02\n2.49030055723382729e-02\n3.20241391194279815e-02\n3.72974845927544693e-02\n4.06152788003067006e-02\n4.12469981677631437e-02\n3.80894651196160561e-02\n2.99194085580377356e-02\n1.57993522034117657e-02\n-4.31517771917420880e-03\n-2.88220876552163809e-02\n-5.37917648096590748e-02\n-7.27911056336408152e-02\n-7.78161961653911355e-02\n-6.18701345505245220e-02\n-2.31473894348841955e-02\n3.04712415861171995e-02\n7.95784299783007659e-02\n9.79793594829875963e-02\n6.62013595841483560e-02\n-1.01366735611861034e-02\n-9.00695223148912233e-02\n-1.12669303433649670e-01\n-4.35757786692611837e-02\n7.51257672105124785e-02\n1.31616512123554602e-01\n4.53222230864318634e-02\n-1.08967468117454794e-01\n-1.32009261739255784e-01\n4.32492143900964007e-02\n1.68583483746367363e-01\n-4.95860838676731781e-04\n-1.90872213045075595e-01\n1.82535323398093675e-02\n2.11291135876981673e-01\n-1.37916296458020671e-01\n-1.28093668673017053e-01\n3.02456209424164846e-01\n-2.94592455276951382e-01\n1.92516908674200515e-01\n-9.48536585274937227e-02\n3.70547561402915226e-02\n-1.17879528857685045e-02\n3.10082494275918481e-03\n-6.80272138343879858e-04\n1.24958469858303000e-04\n-1.92235153228191310e-05\n2.46897240487582555e-06\n-2.62966415975796140e-07\n2.29739838274597618e-08\n-1.61942344080973289e-09\n8.98653833493966699e-11\n-3.78065778735820891e-12\n1.13361214079692652e-13\n-2.15878791904814791e-15\n0.0\n0.0\n0.0\n0.0\n0.0\n0.0\n8.66426047764552840e-04\n3.35565365371242501e-03\n7.91595443084345055e-03\n1.48087344978570980e-02\n2.40121934498876630e-02\n3.50470844797404965e-02\n4.67621537451872737e-02\n5.71499205294295071e-02\n6.33170572602035214e-02\n6.17867458500721278e-02\n4.93218215401055385e-02\n2.43605773569870315e-02\n-1.11229334763186093e-02\n-5.00111894576891411e-02\n-7.99363085453404787e-02\n-8.61829356704887223e-02\n-5.84006514722374415e-02\n3.58940229482597776e-04\n6.73683490910389760e-02\n1.04547897847193039e-01\n7.88234561964185065e-02\n-7.40196344727397145e-03\n-9.89024440883244094e-02\n-1.13935536034448268e-01\n-1.85003343777213544e-02\n1.09092261688566117e-01\n1.21812489154462897e-01\n-2.46754972559791140e-02\n-1.53724638728994389e-01\n-5.40369786300429894e-02\n1.52844124485929489e-01\n9.28820650447558793e-02\n-1.70534777166068824e-01\n-7.46582530210938983e-02\n2.23693329402947061e-01\n-6.04428648778056812e-02\n-1.99685494680089226e-01\n3.15424575732289769e-01\n-2.67266406134374912e-01\n1.60001492639399556e-01\n-7.37993799662741007e-02\n2.73166714845997499e-02\n-8.29850452787542735e-03\n2.09615300256641487e-03\n-4.43432899576961322e-04\n7.88025564301311331e-05\n-1.17598018378678287e-05\n1.46840532288151399e-06\n-1.52341139845976699e-07\n1.29853215619237565e-08\n-8.94333513020322284e-10\n4.85518037701355783e-11\n-2.00053468434833568e-12\n5.88100400988433593e-14\n-1.09902091182217964e-15\n0.0\n0.0\n0.0\n0.0\n-1.38775648385790068e-02\n-2.40366473857502247e-02\n-3.09183376927100149e-02\n-3.60490110866714675e-02\n-3.93682703078595542e-02\n-4.02329121179938673e-02\n-3.76476647717229468e-02\n-3.04822304143377576e-02\n-1.78148420603557490e-02\n5.49493293180726840e-04\n2.34201922161792198e-02\n4.75864693423650661e-02\n6.75475918537050551e-02\n7.61070536214551313e-02\n6.63258440415182837e-02\n3.49512535853120088e-02\n-1.34896496535019863e-02\n-6.41090627526219453e-02\n-9.38543479864410168e-02\n-8.10994027665983136e-02\n-2.12923912180138231e-02\n5.98341884996863235e-02\n1.10030524056330112e-01\n8.17948212773452893e-02\n-1.99064348515221000e-02\n-1.15539923940347122e-01\n-1.02747525542275245e-01\n2.93739623914327161e-02\n1.40726818170620382e-01\n7.11091388755192566e-02\n-1.14989793196826451e-01\n-1.32918431505758633e-01\n8.91485417183863205e-02\n1.61387508239882377e-01\n-1.10055601699256336e-01\n-1.53322920048713257e-01\n2.00539512712531787e-01\n2.47180274398494312e-02\n-2.54306170934596121e-01\n3.12462048980527318e-01\n-2.35681063631851012e-01\n1.30404128946312675e-01\n-5.65779096716435281e-02\n1.99041935277143658e-02\n-5.78688142169003685e-03\n1.40596016281414383e-03\n-2.87177007748138670e-04\n4.94265797874700931e-05\n-7.16154736544445315e-06\n8.70066637554330798e-07\n-8.79840153153714664e-08\n7.32143270574096396e-09\n-4.92939770466701676e-10\n2.61925496886000591e-11\n-1.05747023582451444e-12\n3.04893628200499972e-14\n-5.59323918084504584e-16\n0.0\n0.0\n0.0\n0.0\n-8.08158692342989915e-04\n-3.12998515653716350e-03\n-7.38517565752149635e-03\n-1.38253132320619240e-02\n-2.24522063933630805e-02\n-3.28663626386842059e-02\n-4.40769909952560268e-02\n-5.43310572757454632e-02\n-6.10631553156686172e-02\n-6.11141009965063056e-02\n-5.13829153887050347e-02\n-3.00123716033360022e-02\n1.99912992041950330e-03\n3.92489735811246479e-02\n7.14187172436417106e-02\n8.50885006306404817e-02\n6.88163708641761074e-02\n2.08639639467000648e-02\n-4.38628639729669381e-02\n-9.38928414426828950e-02\n-9.42769126249746459e-02\n-3.17951926165290777e-02\n6.21820057924962755e-02\n1.16966777517995002e-01\n7.26997949296024210e-02\n-4.94382434623633349e-02\n-1.32194169547041912e-01\n-6.57987478006277354e-02\n9.54888521621763270e-02\n1.38115365157589182e-01\n-3.28530164553997445e-02\n-1.67792257111886223e-01\n-1.30048521049586953e-03\n1.88742910765101912e-01\n-2.51320701308221928e-02\n-2.04395439674644047e-01\n1.48084466485667726e-01\n1.07469414757189574e-01\n-2.90187851903803029e-01\n2.97112519015750698e-01\n-2.02734630968114227e-01\n1.04415761976262733e-01\n-4.27882747149507525e-02\n1.43458775460581483e-02\n-3.99957789848109143e-03\n9.36072935864134593e-04\n-1.84837054629292984e-04\n3.08416262170301266e-05\n-4.34251259324340908e-06\n5.13695069484046143e-07\n-5.06657853082752451e-08\n4.11821551403110582e-09\n-2.71191472114882765e-10\n1.41102151833627678e-11\n-5.58406190060084879e-13\n1.57966659136821553e-14\n0.0\n0.0\n0.0\n1.34110082885095135e-02\n2.32285477364258114e-02\n2.98860996054554594e-02\n3.48797786234479046e-02\n3.81892381223788158e-02\n3.92471829676002693e-02\n3.71538730469372011e-02\n3.08652396695146408e-02\n1.94853920076197493e-02\n2.71067763847296405e-03\n-1.85941472740467142e-02\n-4.18117164601599367e-02\n-6.22489781836327166e-02\n-7.34866556939571952e-02\n-6.88453932375441002e-02\n-4.41692459769204224e-02\n-1.44841254376531581e-03\n4.82920127164106483e-02\n8.54732402076973929e-02\n8.84366022246835387e-02\n4.60942565828406994e-02\n-2.84199156080339639e-02\n-9.42883172677429493e-02\n-1.01381495418001205e-01\n-2.96036179400583389e-02\n7.66130663395796219e-02\n1.22433390026080946e-01\n4.51895108600385148e-02\n-9.32860514910172911e-02\n-1.30432938458461017e-01\n8.20081992983317902e-03\n1.50931262325264132e-01\n6.15593609069964576e-02\n-1.49611746094279907e-01\n-9.18975496671960018e-02\n1.70628068541547301e-01\n6.53278764101584142e-02\n-2.21263159640423035e-01\n7.57862765817949313e-02\n1.80014718045661271e-01\n-3.07891757468296778e-01\n2.73094737405840060e-01\n-1.70599706566118642e-01\n8.22652000647926263e-02\n-3.19530648431656378e-02\n1.02346436590687109e-02\n-2.74111767195971785e-03\n6.18871018390315859e-04\n-1.18270476590769932e-04\n1.91502023000594468e-05\n-2.62231259216816210e-06\n3.02252308581942185e-07\n-2.90938782209820251e-08\n2.31116975543123349e-09\n-1.48928121109455270e-10\n7.59094088571304640e-12\n-2.94583256847368901e-13\n8.17923176680597700e-15\n0.0\n0.0\n0.0\n7.55578460578792250e-04\n2.92634279457469962e-03\n6.90600799850599884e-03\n1.29363300983407065e-02\n2.10376911072675983e-02\n3.08768236488992862e-02\n4.15981791441294158e-02\n5.16661078142204300e-02\n5.88016778013916441e-02\n6.01379021790062890e-02\n5.27364107796431322e-02\n3.45666628780188154e-02\n5.89504265383238111e-03\n-2.92676595184092718e-02\n-6.24162650888476569e-02\n-8.15792684392644823e-02\n-7.50796499560372615e-02\n-3.79476882498117618e-02\n2.12328593136595391e-02\n7.78173930557252286e-02\n9.85941149302572428e-02\n6.11661686758680906e-02\n-2.27622777262843357e-02\n-9.97514513295714444e-02\n-1.02888651705516226e-01\n-1.20807025458813250e-02\n1.01582608746744699e-01\n1.16455312491852439e-01\n-7.60805901610506555e-03\n-1.36066500044879080e-01\n-8.31897955472478273e-02\n1.06895593877290779e-01\n1.35737034603814116e-01\n-8.63403631011036010e-02\n-1.58775957631712761e-01\n1.13751534782348243e-01\n1.43731724342601119e-01\n-2.03878872101696557e-01\n-5.87789538391338996e-03\n2.37332242904563756e-01\n-3.09605301178792980e-01\n2.43864153707220865e-01\n-1.40753685790851485e-01\n6.38573485402233049e-02\n-2.35822617857203536e-02\n7.23183717829213590e-03\n-1.86373745437301173e-03\n4.06441527723909284e-04\n-7.52544596961842165e-05\n1.18349014785157664e-05\n-1.57729685808418275e-06\n1.77258137011227427e-07\n-1.66614437347434157e-08\n1.29420250386442746e-09\n-8.16441149024179224e-11\n4.07835591812698989e-12\n-1.55258928744955132e-13\n4.23251856697071718e-15\n0.0\n1.29748046590291641e-02\n2.24730208877198974e-02\n2.89203443271613889e-02\n3.37826386444656790e-02\n3.70735103747419012e-02\n3.82919017737505599e-02\n3.66228434593737009e-02\n3.11018414527098330e-02\n2.08653274069167255e-02\n5.53264354674670028e-03\n-1.42895572599816070e-02\n-3.64739483838690190e-02\n-5.70233893226039165e-02\n-7.02447626055959923e-02\n-6.98370152504726310e-02\n-5.11337948913146156e-02\n-1.42477980967673293e-02\n3.30013877475572939e-02\n7.44602271615361216e-02\n8.97290742140010589e-02\n6.39803154654428746e-02\n6.62474528345230332e-04\n-7.10490007401951423e-02\n-1.04847531797734775e-01\n-6.65156353079946611e-02\n2.96532510682681640e-02\n1.11007035041306865e-01\n9.45749565926919389e-02\n-2.38279871472458146e-02\n-1.28234830255555182e-01\n-8.24577580450015779e-02\n8.23317203057432612e-02\n1.42175983326254834e-01\n-2.41581776181457111e-02\n-1.66715279399058058e-01\n-1.84856863588283085e-03\n1.86598622873165254e-01\n-3.24707272925996021e-02\n-1.97016239993091397e-01\n1.57410206751743498e-01\n8.71802057908291350e-02\n-2.77107436042824173e-01\n2.98443719543597608e-01\n-2.12349552082682469e-01\n1.14072588013370668e-01\n-4.88923977799044437e-02\n1.72137949930847300e-02\n-5.06402983072517469e-03\n1.25767317036228066e-03\n-2.65243772937648044e-04\n4.76286954356546386e-05\n-7.28115775407417099e-06\n9.45147478149082695e-07\n-1.03626854141031361e-07\n9.51685224181556748e-09\n-7.23195867354570885e-10\n4.46835784501288371e-11\n-2.18837865036751219e-12\n8.17541775098022728e-14\n-2.18893726433634722e-15\n0.0\n7.07968488715487575e-04\n2.74195016643471708e-03\n6.47197520841484748e-03\n1.21301141149080388e-02\n1.97513298530841638e-02\n2.90575945793569400e-02\n3.93078708330475216e-02\n4.91529012662425407e-02\n5.65642447017429412e-02\n5.89415058818410012e-02\n5.35217425912010991e-02\n3.81887577762012043e-02\n1.26659863802208936e-02\n-2.01568873682223502e-02\n-5.33481352313809679e-02\n-7.64032813109597614e-02\n-7.79635215846214008e-02\n-5.10203875232878162e-02\n7.47645039672664583e-04\n5.90476666753959115e-02\n9.43974333203616567e-02\n8.01097842127733856e-02\n1.32861222977138718e-02\n-7.08424179116465824e-02\n-1.10292460231499773e-01\n-6.09612044250449625e-02\n5.06065625403030739e-02\n1.23451269691122634e-01\n6.74739501839395905e-02\n-7.65659296418580576e-02\n-1.35657470885995363e-01\n-6.18618647180836558e-03\n1.47624469664143609e-01\n6.73650512139389035e-02\n-1.46985778465230976e-01\n-9.00015595357351872e-02\n1.70992902684906550e-01\n5.56035135363378979e-02\n-2.18203911549614160e-01\n9.03043044067258355e-02\n1.60312300054577500e-01\n-2.99307131693407946e-01\n2.77854027722973795e-01\n-1.80836553482089823e-01\n9.09536070344159620e-02\n-3.69603142724853131e-02\n1.24360806238899921e-02\n-3.51588474112001989e-03\n8.42644246989619110e-04\n-1.72057073015557260e-04\n2.99909204757225455e-05\n-4.46030125570664008e-06\n5.64299899789155604e-07\n-6.03979033050708685e-08\n5.42233811839169662e-09\n-4.03298549480480578e-10\n2.44158479538189318e-11\n-1.17280787071048804e-12\n4.30112034470711557e-14\n1.25660850235249262e-02\n2.17650977129755230e-02\n2.80148688472692808e-02\n3.27512555097562857e-02\n3.60167101119801408e-02\n3.73681794670315676e-02\n3.60660923388668869e-02\n3.12191448689965907e-02\n2.19999105798660624e-02\n7.97469112913272958e-03\n-1.04542879731757323e-02\n-3.15646184477035227e-02\n-5.19566636005748470e-02\n-6.66026031034667454e-02\n-6.96421173402293203e-02\n-5.61774686788752559e-02\n-2.49650224833861470e-02\n1.87765639236707957e-02\n6.20631630888814970e-02\n8.64628816865110200e-02\n7.54416466240959843e-02\n2.54616812604534330e-02\n-4.47956587243744167e-02\n-9.61972512091509996e-02\n-8.88446586648543590e-02\n-1.47232458226405800e-02\n7.98957332004834875e-02\n1.13931357696995486e-01\n4.05719226435826558e-02\n-8.42089263588257364e-02\n-1.24926536482568323e-01\n-1.19412808254562228e-02\n1.30006633820307221e-01\n9.28698614339001222e-02\n-9.96723383938321050e-02\n-1.37510918608476418e-01\n8.45961868935660166e-02\n1.55716940555528233e-01\n-1.17808353074389555e-01\n-1.33744095507930871e-01\n2.06429212895509195e-01\n-1.22950986622326255e-02\n-2.19945017009354954e-01\n3.05575745127095511e-01\n-2.51167940869888306e-01\n1.50959972271455967e-01\n-7.14415918364089964e-02\n2.76102572199898137e-02\n-8.89761218574894319e-03\n2.42138232289883107e-03\n-5.60748539740517273e-04\n1.10968955842700439e-04\n-1.87928471497622447e-05\n2.72103409726876037e-06\n-3.35743493820971046e-07\n3.50998701758943935e-08\n-3.08200197424011892e-09\n2.24463787566257334e-10\n-1.33205154974024551e-11\n6.27793146210931784e-13\n0.0\n6.64721423538674572e-04\n2.57445500323257330e-03\n6.07758522600758237e-03\n1.13967363290972037e-02\n1.85782722277741189e-02\n2.73904321995126418e-02\n3.71895573466432261e-02\n4.67867735477216357e-02\n5.43729554208776111e-02\n5.75895932167672375e-02\n5.38529390483070067e-02\n4.10233850992304250e-02\n1.84275708835614158e-02\n-1.19419525977376619e-02\n-4.45000192114178642e-02\n-7.01486386490793451e-02\n-7.81845081216825666e-02\n-6.04449887693185445e-02\n-1.69397473819012517e-02\n3.95860793491211588e-02\n8.42640570438786124e-02\n8.95293684295746378e-02\n4.26473939403817087e-02\n-3.74710096432531864e-02\n-1.00045595848514357e-01\n-9.12436083685649463e-02\n-3.07919270226668764e-03\n9.77442930489463291e-02\n1.09498691531181788e-01\n2.76457493593588229e-04\n-1.21176905737521337e-01\n-9.57212015692781581e-02\n6.99263442851631584e-02\n1.44712571197065376e-01\n-1.70180514681687461e-02\n-1.65492041886532687e-01\n-1.32593202125539582e-03\n1.84395657125539819e-01\n-4.01518101142324044e-02\n-1.89141571158557065e-01\n1.65849366514973728e-01\n6.72766229507452546e-02\n-2.63276954832890375e-01\n2.98598963167771736e-01\n-2.21311375920616449e-01\n1.23766691522875075e-01\n-5.53439607608452872e-02\n2.03976260392571135e-02\n-6.30794503707690201e-03\n1.65487438777846795e-03\n-3.70750379036844215e-04\n7.11778537597883705e-05\n-1.17210793946950743e-05\n1.65341926151391481e-06\n-1.99091031827781687e-07\n2.03409408147625478e-08\n-1.74771461546062353e-09\n1.24693837350385871e-10\n-7.25636102591947080e-12\n1.21823309947558384e-02\n2.11004162375382151e-02\n2.71642162504451001e-02\n3.17799977782120893e-02\n3.50147615201247819e-02\n3.64764193643167534e-02\n3.54926194659148653e-02\n3.12392323025121807e-02\n2.29269443335345866e-02\n1.00871622847511118e-02\n-7.03965948978038658e-03\n-2.70659524453717923e-02\n-4.71039521118699900e-02\n-6.27273017499442170e-02\n-6.85414535754725884e-02\n-5.96116843458726342e-02\n-3.37433693854726005e-02\n5.91611457979390222e-03\n4.91987654537008323e-02\n7.99571441376115272e-02\n8.13561672620124882e-02\n4.51502773468397123e-02\n-1.87387543691607816e-02\n-7.95861320079499224e-02\n-9.76110122573920491e-02\n-5.03983043127975150e-02\n4.02252836963969476e-02\n1.07602146788155023e-01\n8.50972928872941042e-02\n-2.37297627894801841e-02\n-1.18810992451741163e-01\n-8.53878271364302555e-02\n5.99162913912753836e-02\n1.38296932716369753e-01\n1.85795819486561480e-02\n-1.44138569145363687e-01\n-7.17182781609920078e-02\n1.44939239121502972e-01\n8.73217036258427531e-02\n-1.71522144292497236e-01\n-4.55580869180390452e-02\n2.14484669935683658e-01\n-1.03955213263817944e-01\n-1.40637430791127033e-01\n2.89724281620715285e-01\n-2.81534166942403519e-01\n1.90653050251486711e-01\n-9.98161218514679871e-02\n4.23261085361709699e-02\n-1.49128701842033834e-02\n4.43349188834245116e-03\n-1.12281235004890604e-03\n2.43621785116163940e-04\n-4.54158742877752380e-05\n7.27779075886823646e-06\n-1.00087514768787056e-06\n1.17678737941843347e-07\n-1.17561071060344039e-08\n9.88861749023303571e-10\n-6.91435000065857640e-11\n0.0\n6.25319940814807402e-04\n2.42185371682715651e-03\n5.71815611534526400e-03\n1.07277080458695051e-02\n1.75057315494395113e-02\n2.58593648258016173e-02\n3.52280968972558534e-02\n4.45615300968144612e-02\n5.22428686135434431e-02\n5.61322649658100581e-02\n5.38230215564705627e-02\n4.31956978484025270e-02\n2.32927298571769595e-02\n-4.60680729179505782e-03\n-3.60583275363343045e-02\n-6.32665980972901831e-02\n-7.63708524659756777e-02\n-6.66920073007031544e-02\n-3.15977795079579113e-02\n2.08030978084051653e-02\n7.04320723228064743e-02\n9.10466579747770260e-02\n6.40452568804670413e-02\n-4.86686434237680512e-03\n-7.83469114777470693e-02\n-1.02862151973662830e-01\n-4.80085295045309182e-02\n5.45913336372662733e-02\n1.16369577840077065e-01\n6.45196089782962695e-02\n-6.52422130111356829e-02\n-1.29179339283161665e-01\n-2.91153033164472351e-02\n1.23213039986118503e-01\n1.00545269626018383e-01\n-9.33759797366515570e-02\n-1.38459018903673542e-01\n8.37847774558776043e-02\n1.52248394231236067e-01\n-1.22103038931645605e-01\n-1.23388883243706005e-01\n2.08154318706997687e-01\n-2.97560857136399473e-02\n-2.02209710545618704e-01\n3.00410862744196205e-01\n-2.57561590652308492e-01\n1.60962026776198142e-01\n-7.92931956388729098e-02\n3.19848335625622371e-02\n-1.07964998064545639e-02\n3.09063131804708600e-03\n-7.56561191268908910e-04\n1.59145245924192409e-04\n-2.88328640331386779e-05\n4.49953657160366732e-06\n-6.03655674057244787e-07\n6.93424329395009717e-08\n-6.77681472042097395e-09\n5.58293193763935023e-10\n1.18213227699655900e-02\n2.04751316502512562e-02\n2.63635671491319577e-02\n3.08638457527521219e-02\n3.40638849049069506e-02\n3.56165174143144234e-02\n3.49094589065040914e-02\n3.11801542818346059e-02\n2.36780822880740364e-02\n1.19134788091799365e-02\n-4.00098765748429629e-03\n-2.29548613155700042e-02\n-4.24983131672795333e-02\n-5.87437035094551946e-02\n-6.67629799171258476e-02\n-6.17165632545593895e-02\n-4.07698738390560381e-02\n-5.44855015853505306e-03\n3.65116832052550105e-02\n7.13124284833043104e-02\n8.27371027363280193e-02\n5.96423954525473199e-02\n5.05189253020445986e-03\n-5.86416553390106399e-02\n-9.53263104955177493e-02\n-7.48700693643695042e-02\n5.53353799796917523e-04\n8.37342506047534657e-02\n1.05502784523502799e-01\n3.30742023532312746e-02\n-7.98600905330196370e-02\n-1.18295642232478501e-01\n-2.20763014599546226e-02\n1.12166376762421569e-01\n1.06071661934992512e-01\n-5.85161201359420610e-02\n-1.46133899474173323e-01\n1.12803032574627232e-02\n1.64209463339996115e-01\n-1.18211299924126588e-04\n-1.82088477876181237e-01\n4.80721277291817836e-02\n1.80768950970031261e-01\n-1.73365536963801359e-01\n-4.78114838209441062e-02\n2.48761189732802923e-01\n-2.97594655336218816e-01\n2.29573479722112200e-01\n-1.33440786087180241e-01\n6.21169875307136660e-02\n-2.39008215144763426e-02\n7.74437852588081687e-03\n-2.13783614723025636e-03\n5.06428446028777345e-04\n-1.03377881130257892e-04\n1.82169930550946984e-05\n-2.77042692765709484e-06\n3.62803868771622446e-07\n-4.07384516307503621e-08\n3.89670540444586631e-09\n0.0\n5.89321190941243358e-04\n2.28243115808255672e-03\n5.38967686830172342e-03\n1.01157380915798869e-02\n1.65226548270315278e-02\n2.44503824808341153e-02\n3.34096805897094035e-02\n4.24701098247878897e-02\n5.01838424693822754e-02\n5.46082328682818419e-02\n5.35077454085818166e-02\n4.48129950870238894e-02\n2.73686516802231251e-02\n1.88995208827095573e-03\n-2.81369562423967115e-02\n-5.60957839084405274e-02\n-7.30533249143216490e-02\n-7.02604079886717664e-02\n-4.32662669700152602e-02\n3.56349411739561792e-03\n5.46970405306515667e-02\n8.64961064673452767e-02\n7.75396406463650240e-02\n2.36889535147495542e-02\n-5.08736111896930729e-02\n-9.89833470138812427e-02\n-7.87054600378969682e-02\n7.50322829626175539e-03\n9.61196598596423951e-02\n1.01762627473860959e-01\n2.07681777448423055e-03\n-1.10169072451711259e-01\n-9.92776581962932780e-02\n4.39718281149669363e-02\n1.39027676683379314e-01\n2.91343161329352673e-02\n-1.40701156336185074e-01\n-7.48388001145810777e-02\n1.43427095283626155e-01\n8.39585101380394827e-02\n-1.72119922726609975e-01\n-3.52587445103570707e-02\n2.10086244073243389e-01\n-1.16700795176406538e-01\n-1.21052025097695304e-01\n2.79199523449732867e-01\n-2.84129050981679787e-01\n1.99993054559034711e-01\n-1.08803197114664935e-01\n4.80351446514794070e-02\n-1.76731359755153208e-02\n5.50669879001570561e-03\n-1.46789588524371458e-03\n3.36869058447282661e-04\n-6.67918708210253474e-05\n1.14567132482465481e-05\n-1.69905031626417152e-06\n2.17312671363215940e-07\n-2.38649869204616125e-08\n1.14810961510815584e-02\n1.98858418602567422e-02\n2.56086494812483925e-02\n2.99983126917674515e-02\n3.31605849222933249e-02\n3.47880098519990910e-02\n3.43221026716760552e-02\n3.10567130358833585e-02\n2.42798986966616080e-02\n1.34910773065030458e-02\n-1.29772785117029704e-03\n-1.92055721467222808e-02\n-3.81570505875252208e-02\n-5.47438706393772942e-02\n-6.44899004336458997e-02\n-6.27374449206792306e-02\n-4.62477216630578294e-02\n-1.52978242747895208e-02\n2.44330115277177663e-02\n6.14065474777462858e-02\n8.05843393406055625e-02\n6.92977495689068579e-02\n2.54128974927937054e-02\n-3.62079734937815617e-02\n-8.49740451185438533e-02\n-8.80894104623151375e-02\n-3.36281053836594776e-02\n5.07776704891094791e-02\n1.04298157615584600e-01\n7.45522449511551444e-02\n-2.72039580061097935e-02\n-1.12015753032119289e-01\n-8.36377825626304500e-02\n4.59931116089044648e-02\n1.30166204754057463e-01\n4.39520994744892826e-02\n-1.16164025294544643e-01\n-1.06563598838964255e-01\n8.80100185426265363e-02\n1.38745178475308262e-01\n-8.37854798192577271e-02\n-1.48394354552299990e-01\n1.26527607511263934e-01\n1.12697790961014926e-01\n-2.09028239132814875e-01\n4.64606604297140846e-02\n1.84194140240879628e-01\n-2.94151256499282865e-01\n2.63018419847287188e-01\n-1.70700555361500583e-01\n8.73726944748455803e-02\n-3.66997878390356164e-02\n1.29394222274624316e-02\n-3.88326546604489658e-03\n1.00083882679751954e-03\n-2.22738611786235137e-04\n4.29319086897851125e-05\n-7.17328569695178826e-06\n1.03803551236727742e-06\n-1.29742649186117275e-07\n0.0\n5.56344292299414665e-04\n2.15471217883318441e-03\n5.08869531598779914e-03\n9.55453632721570481e-03\n1.56194517105895485e-02\n2.31511702355813101e-02\n3.17217631407285539e-02\n4.05050399703587999e-02\n4.82019038908560182e-02\n5.30473059288050011e-02\n5.29687277720786096e-02\n4.59667136022640158e-02\n3.07542697375520722e-02\n7.60413546127400222e-03\n-2.07977585866858973e-02\n-4.88845610798824826e-02\n-6.86683142633979643e-02\n-7.16313910979837903e-02\n-5.21471151805888086e-02\n-1.16488813998031088e-02\n3.84130739793532225e-02\n7.76330601894848482e-02\n8.39607145300318575e-02\n4.65010006569779519e-02\n-2.20976579044131136e-02\n-8.40153593288533868e-02\n-9.41423364567183091e-02\n-3.41193135553286356e-02\n6.01213678893608161e-02\n1.10232582950797048e-01\n5.86633831057025087e-02\n-5.95481821130769834e-02\n-1.22003815185064451e-01\n-4.12148352804512716e-02\n1.02078752395980341e-01\n1.13987702950342912e-01\n-4.82185192731815065e-02\n-1.46755160919240568e-01\n6.79812221265383310e-03\n1.62917352535459470e-01\n-2.35759542455526907e-03\n-1.79632425428584125e-01\n5.61397497418932023e-02\n1.71904292757161459e-01\n-1.79929334195634699e-01\n-2.88387992510166016e-02\n2.33627412674672214e-01\n-2.95450906730643725e-01\n2.37093041746568672e-01\n-1.43037960909399658e-01\n6.91828800018325363e-02\n-2.77243329678492217e-02\n9.38553150387825240e-03\n-2.71698148855044645e-03\n6.77834598106872395e-04\n-1.46431685140390881e-04\n2.74593075543331354e-05\n-4.47225282588679417e-06\n6.31868366190872477e-07\n1.11599067816864142e-02\n1.93295255536133428e-02\n2.48956631589465974e-02\n2.91793775054801155e-02\n3.23016350098880509e-02\n3.39901823340384782e-02\n3.37348284548916050e-02\n3.08810825909723932e-02\n2.47547622205939177e-02\n1.48522408380868491e-02\n1.10661655401395097e-03\n-1.57913723554413583e-02\n-3.40863700437077852e-02\n-5.07946079486621266e-02\n-6.18681658437276391e-02\n-6.28852023689350226e-02\n-5.03792355128023991e-02\n-2.36835608497200645e-02\n1.32319171522482723e-02\n5.09141015455166143e-02\n7.58053600154408314e-02\n7.47102721913655010e-02\n4.18437885655689526e-02\n-1.43290804932488646e-02\n-6.94119221725220253e-02\n-9.14267507807332985e-02\n-5.95127327682618140e-02\n1.57135016533360913e-02\n8.71928647115415151e-02\n9.66113638802036795e-02\n2.36269775839827272e-02\n-7.86990117869904859e-02\n-1.11511695036507555e-01\n-2.56217393273035429e-02\n9.89161570796106282e-02\n1.09639425744029462e-01\n-2.91114023277051666e-02\n-1.38396527708617767e-01\n-3.80299476431508604e-02\n1.37462002118489329e-01\n7.69073868208548783e-02\n-1.42394360987973978e-01\n-7.99924978771639761e-02\n1.72700721957861875e-01\n2.47686404419804503e-02\n-2.04999606052869016e-01\n1.28506518465048652e-01\n1.01619816380435171e-01\n-2.67791873864070162e-01\n2.85636749976973303e-01\n-2.08803410808010542e-01\n1.17864458292462115e-01\n-5.40692536447620400e-02\n2.07229854624673936e-02\n-6.74784803296375486e-03\n1.88680916051856473e-03\n-4.56148360861899523e-04\n9.57383338798134423e-05\n-1.74798668761720686e-05\n2.77687038608531780e-06\n0.0\n5.26060208374628711e-04\n2.03742242613734036e-03\n4.81222728243723905e-03\n9.03865364510326834e-03\n1.47877709084774430e-02\n2.19508793970571367e-02\n3.01529755173908474e-02\n3.86587442991115568e-02\n4.63002694291747077e-02\n5.14723286121406484e-02\n5.22560355660884879e-02\n4.67344377389196236e-02\n3.35391964547659613e-02\n1.25985854606204886e-02\n-1.40659420209949364e-02\n-4.18104004888887534e-02\n-6.35669308858691634e-02\n-7.12438481324167566e-02\n-5.85283177635878768e-02\n-2.46231979051354730e-02\n2.25439384522354777e-02\n6.59881590773011423e-02\n8.45031839352265307e-02\n6.30239398461339001e-02\n4.85365331001838280e-03\n-6.23669383522818116e-02\n-9.60139423526485264e-02\n-6.51405864380936311e-02\n1.89290819745597041e-02\n9.55638017554663877e-02\n9.34139678707007620e-02\n-2.04609376162264388e-04\n-1.02681446374846178e-01\n-9.81165960219357730e-02\n2.73472193028830995e-02\n1.28719246014056987e-01\n5.66017974042773292e-02\n-1.09193823929115322e-01\n-1.11220868161981984e-01\n8.35458870420545258e-02\n1.38490837322739396e-01\n-8.44883716619216352e-02\n-1.44169936858057679e-01\n1.30986562645377558e-01\n1.01705497569725620e-01\n-2.09034067310105293e-01\n6.23655794147804227e-02\n1.65968114543713879e-01\n-2.86840746352815923e-01\n2.67516030132056104e-01\n-1.80118119248821679e-01\n9.56388344806671092e-02\n-4.17461131684995421e-02\n1.53358098610376480e-02\n-4.81098845927707252e-03\n1.30099486805838123e-03\n-3.05094202441656215e-04\n6.22654325320753157e-05\n-1.10766095817292698e-05\n1.08562002259069961e-02\n1.88034903684116406e-02\n2.42212168010478464e-02\n2.84034271152593734e-02\n3.14840599474319957e-02\n3.32221507011866077e-02\n3.31509545384374785e-02\n3.06633018221956870e-02\n2.51215504432478129e-02\n1.60248268959426038e-02\n3.24471754859051572e-03\n-1.26857418871838042e-02\n-3.02847873303443704e-02\n-4.69433706625593944e-02\n-5.90131098427685505e-02\n-6.23385783890434628e-02\n-5.33559700960119995e-02\n-3.07004194722172337e-02\n3.05834819720271012e-03\n4.03357783995916888e-02\n6.91805098867835921e-02\n7.65667022004623138e-02\n5.42952221760773790e-02\n5.65293599374618472e-03\n-5.10765342747121417e-02\n-8.69023008537168073e-02\n-7.62913871744122091e-02\n-1.65353689751917797e-02\n6.06016383875790585e-02\n1.00327018760121817e-01\n6.30109547881300969e-02\n-3.29719682317165461e-02\n-1.07082550690425271e-01\n-7.91360271607771254e-02\n3.84723143222625366e-02\n1.21683907754911544e-01\n5.76273781115786907e-02\n-9.15597813482200151e-02\n-1.19910219860029227e-01\n3.90687242303095414e-02\n1.46815895256774381e-01\n-3.43574718302896986e-03\n-1.61639490674278880e-01\n5.28435718802362873e-03\n1.76985383732957829e-01\n-6.42716601837130114e-02\n-1.62560944353591280e-01\n1.85517883070310113e-01\n1.04128978547887458e-02\n-2.17945077619945610e-01\n2.92191663066895646e-01\n-2.43831170910461859e-01\n1.52501908386850210e-01\n-7.65106122558429080e-02\n3.18665966504472278e-02\n-1.12426152492712626e-02\n3.40289877310613739e-03\n-8.90988995214977812e-04\n2.02871658907769224e-04\n-4.02912936461685223e-05\n0.0\n4.98183503409068036e-04\n1.92945641205858665e-03\n4.55768250636649341e-03\n8.56335093919649223e-03\n1.40203149737654995e-02\n2.08399314673138672e-02\n2.86930302648737180e-02\n3.69237483645963802e-02\n4.44801079192665982e-02\n4.99006934991482326e-02\n5.14103118191313463e-02\n4.71817948975106344e-02\n3.58035395694787789e-02\n1.69383154179849373e-02\n-7.94149438238717260e-03\n-3.49959854406922885e-02\n-5.80264450154223885e-02\n-6.94835405631071962e-02\n-6.27332637347917388e-02\n-3.53350771652115453e-02\n7.73227724433915575e-03\n5.28136575046673634e-02\n8.04606105895824819e-02\n7.34675137652540527e-02\n2.80593020719143056e-02\n-3.78044409338333665e-02\n-8.73254167822694605e-02\n-8.38398750541931997e-02\n-1.95818678102315478e-02\n6.62359257443368432e-02\n1.04347509261706078e-01\n5.08162234526170140e-02\n-5.78556917384795560e-02\n-1.15312709285654624e-01\n-4.62804016245351585e-02\n8.61566722894859943e-02\n1.17016255046935372e-01\n-1.55336973063672570e-02\n-1.36835432311798427e-01\n-4.54491239138251207e-02\n1.34514696483766655e-01\n7.80717168934875611e-02\n-1.41781243035831367e-01\n-7.54894900537672331e-02\n1.73188470859663490e-01\n1.41481129590742584e-02\n-1.99224633562179482e-01\n1.39341691002287604e-01\n8.24055785484615194e-02\n-2.55562956774153360e-01\n2.86059629209685640e-01\n-2.17034106563731621e-01\n1.26948950922881387e-01\n-6.04075341738528337e-02\n2.40664385485651298e-02\n-8.16873025930445022e-03\n2.38878755683783134e-03\n-6.06248349506891514e-04\n1.34145108601011360e-04\n1.05685868743930003e-02\n1.83053294306542332e-02\n2.35822745072321420e-02\n2.76672071356403280e-02\n3.07051179902981496e-02\n3.24829209465977709e-02\n3.25730392644479755e-02\n3.04116684850359656e-02\n2.53962353561726049e-02\n1.70328980880676030e-02\n5.14571249641186668e-03\n-9.86306480524065145e-03\n-2.67456135337267552e-02\n-4.32228723032220194e-02\n-5.60151397754673555e-02\n-6.12474589287871490e-02\n-5.53534767085573365e-02\n-3.64660077017462878e-02\n-6.02306785055913355e-03\n3.00296367976710214e-02\n6.13548524827213851e-02\n7.55579458546297017e-02\n6.30017670859077117e-02\n2.29583636126489098e-02\n-3.18809746651404768e-02\n-7.66786682172842654e-02\n-8.44577422735864058e-02\n-4.30281221059314947e-02\n3.02245363038877619e-02\n8.95490577780253816e-02\n8.68581409831052920e-02\n1.28410177745482169e-02\n-7.95159628917613687e-02\n-1.04739637051093473e-01\n-2.47654297678135335e-02\n8.99840319410242229e-02\n1.08411919968865858e-01\n-9.86014627769571210e-03\n-1.25533718902101521e-01\n-6.72704972492888104e-02\n1.02528556820886407e-01\n1.14763948394619453e-01\n-7.99363879261272281e-02\n-1.37785019653662633e-01\n8.57936456353757676e-02\n1.39584843341257731e-01\n-1.35394931654483047e-01\n-9.04495887682853356e-02\n2.08162989104818924e-01\n-7.74293590217653566e-02\n-1.47602883179891065e-01\n2.78526394647666653e-01\n-2.71036423033200524e-01\n1.89159334370377241e-01\n-1.04048811733471816e-01\n4.71120632352405866e-02\n-1.79934927485988494e-02\n5.88530519433934189e-03\n-1.66484819934381014e-03\n4.09952148483870538e-04\n0.0\n4.72465617112133947e-04\n1.82985146673090475e-03\n4.32280414896320936e-03\n8.12449171642139895e-03\n1.33106870366282125e-02\n1.98098514467326854e-02\n2.73326277792258279e-02\n3.52928146804855417e-02\n4.27411134485779567e-02\n4.83455265167060458e-02\n5.04645182707978840e-02\n4.73641774440477989e-02\n3.76182380063641644e-02\n2.06873962718125727e-02\n-2.40756487193745893e-03\n-2.85222596128455012e-02\n-5.22620126225055784e-02\n-6.66806001760650580e-02\n-6.50884500575895364e-02\n-4.38805696025391240e-02\n-5.63022777102571269e-03\n3.90828496246514584e-02\n7.30668403464046351e-02\n7.84830971772902675e-02\n4.65572311217900756e-02\n-1.32114299786033982e-02\n-7.14191298648838291e-02\n-9.08006220869864433e-02\n-5.05806511883777066e-02\n3.05806896950632200e-02\n9.51786415962419391e-02\n8.43769572455973643e-02\n-5.26382636810819853e-03\n-9.79266036040807447e-02\n-9.44362144018907335e-02\n1.78121149464083237e-02\n1.18315065398217567e-01\n7.14296225594661383e-02\n-8.10699608835662305e-02\n-1.24227645876260437e-01\n3.10501311596525498e-02\n1.46495552432489684e-01\n-1.07065365466027561e-03\n-1.60381581454343836e-01\n8.80529093364885475e-03\n1.74108794565798281e-01\n-7.23920645253072759e-02\n-1.52758850726104262e-01\n1.90114449238448752e-01\n-7.41231638174689317e-03\n-2.01785522704412801e-01\n2.87844797488802706e-01\n-2.49753054293768817e-01\n1.61777172709020811e-01\n-8.40669373995987790e-02\n3.63235339110170030e-02\n-1.33257246838344549e-02\n4.20624103149937981e-03\n-1.15234744535988435e-03\n1.02958257240057492e-02\n1.78328932598525794e-02\n2.29761218712751653e-02\n2.69677924655609309e-02\n2.99622976499273400e-02\n3.17714489380396467e-02\n3.20030532419571662e-02\n3.01330700333870896e-02\n2.55923765548734423e-02\n1.78972735729398015e-02\n6.83552384007563366e-03\n-7.29905651799723360e-03\n-2.34587695615573917e-02\n-3.96546798156488592e-02\n-5.29445412578558525e-02\n-5.97364719714424883e-02\n-5.65290853482429967e-02\n-4.11074921322966413e-02\n-1.40069176686231835e-02\n2.02404146791279431e-02\n5.28448355809133727e-02\n7.23278985931206375e-02\n6.83583602571175980e-02\n3.72288249370642393e-02\n-1.32229180380957524e-02\n-6.27642675466554556e-02\n-8.52364791742521444e-02\n-6.24325014133975259e-02\n4.33902650770184764e-04\n6.90835143381607203e-02\n9.51370815784070151e-02\n5.05329370565544209e-02\n-4.01028151400180111e-02\n-1.03228332426652511e-01\n-7.28359509030064023e-02\n3.56104114652754655e-02\n1.14283758811824482e-01\n6.38286239828218804e-02\n-7.27296565380499277e-02\n-1.21938480984473407e-01\n3.31498278273344377e-03\n1.34679270521928740e-01\n5.15655799059164810e-02\n-1.31912702517292063e-01\n-7.84520323822116977e-02\n1.41526446551775459e-01\n7.05046711191728986e-02\n-1.73515803168182187e-01\n-3.45547600154377669e-03\n1.92769213833352160e-01\n-1.49179695344870245e-01\n-6.34745310334034474e-02\n2.42577061971530145e-01\n-2.85404644290677578e-01\n2.24638596591703599e-01\n-1.36005489287650938e-01\n6.70265417406801928e-02\n-2.77053889295250239e-02\n9.78046075441192306e-03\n-2.98331195092336370e-03\n0.0\n4.48690743829155674e-04\n1.73777177844773828e-03\n4.10563189791783752e-03\n7.71847764365914818e-03\n1.26533028132956790e-02\n1.88531846642565615e-02\n2.60634480719956520e-02\n3.37591340538104662e-02\n4.10820648972963637e-02\n4.68167642562323932e-02\n4.94455156320612321e-02\n4.73284189169133687e-02\n3.90458080626946563e-02\n2.39071285659139335e-02\n2.56347189254410145e-03\n-2.24388633467463745e-02\n-4.64377675627560271e-02\n-6.31119800795987840e-02\n-6.59043231280214276e-02\n-5.04279007071346680e-02\n-1.73400353954249534e-02\n2.55169773673371778e-02\n6.34128373823327623e-02\n7.89363690811767382e-02\n6.00825617874761395e-02\n9.41507985429061549e-03\n-5.13958125827606999e-02\n-8.79092793385880811e-02\n-7.18718888582023097e-02\n-4.73937437167107692e-03\n7.21673453874325244e-02\n9.81293519674982795e-02\n4.14880913605706059e-02\n-5.89044202138045009e-02\n-1.09321066998560285e-01\n-4.67463586718118995e-02\n7.52667544076261463e-02\n1.15101675413735560e-01\n6.15655655647806554e-03\n-1.21172548114571177e-01\n-7.61850154239092775e-02\n9.63149953026665590e-02\n1.17396078753133376e-01\n-7.71245955913526099e-02\n-1.36692744605257460e-01\n8.76108552809878177e-02\n1.34646532665937346e-01\n-1.39677204047222836e-01\n-7.89709568229496756e-02\n2.06414466947668851e-01\n-9.16129392752414867e-02\n-1.29171606697603830e-01\n2.69260046017500143e-01\n-2.73567574920360213e-01\n1.97772105911154628e-01\n-1.12559086584383850e-01\n5.27834918920136106e-02\n-2.09187069580592695e-02\n7.11743605803138741e-03\n1.00369876947098424e-02\n1.73845726421810662e-02\n2.24007322701923368e-02\n2.63030259006411422e-02\n2.92538294506264271e-02\n3.10872356721631250e-02\n3.14430731393673737e-02\n2.98337814149964679e-02\n2.57219884083464932e-02\n1.86363410703803724e-02\n8.33734240523864405e-03\n-4.97106348950396987e-03\n-2.04124340105273396e-02\n-3.62526119222865706e-02\n-4.98563197486913967e-02\n-5.79095354048356839e-02\n-5.70225591407998028e-02\n-4.47536733190037200e-02\n-2.09277941712553775e-02\n1.11252318322030124e-02\n4.40529411719663838e-02\n6.74486672000745718e-02\n7.08351184224239455e-02\n4.84042283410398427e-02\n3.95265355775661301e-03\n-4.68674409488887486e-02\n-8.01676808259656343e-02\n-7.45763652326695975e-02\n-2.58321849675434215e-02\n4.35441525673462074e-02\n9.02522428642223845e-02\n7.60007722830907395e-02\n1.19136487026033850e-03\n-8.13572205124440950e-02\n-9.78221739616778052e-02\n-2.08794955755469899e-02\n8.45686589736689559e-02\n1.04916377764270069e-01\n1.65563918694177129e-03\n-1.12748999638481937e-01\n-8.28410326256868029e-02\n7.09266827538921341e-02\n1.27275172417554178e-01\n-2.41149105888813289e-02\n-1.45929798369257735e-01\n-4.07248761841972240e-04\n1.59140720318084850e-01\n-1.28377790545642877e-02\n-1.70972845866994211e-01\n8.04317271371148418e-02\n1.42528949914293962e-01\n-1.93712799302326100e-01\n2.45823456193269285e-02\n1.85229529749793786e-01\n-2.82452156393746046e-01\n2.54836509518996668e-01\n-1.70814823342061356e-01\n9.18194404248437318e-02\n-4.10898130043346327e-02\n1.56441895939780744e-02\n0.0\n4.26706342284949682e-04\n1.65262655739069168e-03\n3.90478181342145732e-03\n7.34277873486188868e-03\n1.20442744834915964e-02\n1.79648537875834527e-02\n2.48801165689903278e-02\n3.23190440536349211e-02\n3.95044196475717382e-02\n4.53256531055960393e-02\n4.83792742229571804e-02\n4.71181090293347898e-02\n4.01445601440952524e-02\n2.66573577174262465e-02\n7.00648355668280140e-03\n-1.67733908425877799e-02\n-4.06796718935334770e-02\n-5.90109638036752093e-02\n-6.54702180126189581e-02\n-5.51880821591884882e-02\n-2.73320176659200172e-02\n1.26239579441949877e-02\n5.24164696125609883e-02\n7.57601888245297284e-02\n6.88423313347069771e-02\n2.88530475513213910e-02\n-2.98312180566790569e-02\n-7.76035911788507254e-02\n-8.32099625379115193e-02\n-3.52147696933275689e-02\n4.18984022087711128e-02\n9.42690940657474469e-02\n7.45321872117156031e-02\n-1.22071582494643754e-02\n-9.50786654732302533e-02\n-8.93017954676202513e-02\n1.34676399033880519e-02\n1.09540536047023573e-01\n7.83176826583095453e-02\n-5.92502025826297588e-02\n-1.24905792622385131e-01\n-7.55358921714619630e-03\n1.32196536696606803e-01\n5.65492862301586255e-02\n-1.29692853048557238e-01\n-7.81609272797155336e-02\n1.41582417997355769e-01\n6.51012396543471511e-02\n-1.73643285006532894e-01\n7.24294909430785692e-03\n1.85678659070705881e-01\n-1.58012374784976151e-01\n-4.49140508897770893e-02\n2.28949712745325135e-01\n-2.83735652320520504e-01\n2.31613880367574632e-01\n-1.45006929899710174e-01\n7.39123596863816845e-02\n-3.16445658235904245e-02\n9.79456130528828448e-03\n1.69646778186074501e-02\n2.18617007733913800e-02\n2.56796723105580278e-02\n2.85877898141367048e-02\n3.04400780691295170e-02\n3.09052856659614988e-02\n2.95291898512429936e-02\n2.58042738188392871e-02\n1.92728808826654954e-02\n9.67542105067525568e-03\n-2.85854649676473612e-03\n-1.75989671115761755e-02\n-3.30347710380655551e-02\n-4.68078576927949686e-02\n-5.58707193557626200e-02\n-5.69752745874074623e-02\n-4.75456240489638554e-02\n-2.68560419915336752e-02\n2.77369998094735429e-03\n3.52934995588442338e-02\n6.14291434814790427e-02\n7.09428612530235425e-02\n5.66425929156564867e-02\n1.90800365657017509e-02\n-3.03526487870237338e-02\n-7.08517392999583329e-02\n-8.00614934271596523e-02\n-4.69276297029004516e-02\n1.67557808717297523e-02\n7.57255406226485378e-02\n8.84055115429925598e-02\n3.72568744809882724e-02\n-4.78769200609504009e-02\n-9.97958806418948879e-02\n-6.52294359919423639e-02\n3.60863366113251607e-02\n1.08308242818234091e-01\n6.53323064551498134e-02\n-5.95978244381228511e-02\n-1.18847341047914806e-01\n-2.05917861601835235e-02\n1.16122449206713441e-01\n8.36264598730103309e-02\n-9.06645381973384679e-02\n-1.19353672281430956e-01\n7.50579438374319174e-02\n1.35344232990973229e-01\n-8.98704053932650598e-02\n-1.29457967756151843e-01\n1.43814456616462721e-01\n6.74044325058897331e-02\n-2.03921199578787765e-01\n1.04885113661477458e-01\n1.10904807622116380e-01\n-2.59337838735774540e-01\n2.75328063177927851e-01\n-2.06065431761102369e-01\n1.21214676175424571e-01\n-5.87859431614259700e-02\n0.0\n4.06806090249259842e-04\n1.57555321267113476e-03\n3.72295180491450956e-03\n7.00253170816316373e-03\n1.14922572459151447e-02\n1.71584014685564161e-02\n2.38028466350095787e-02\n3.10017368800749073e-02\n3.80491546901405991e-02\n4.39278740984445776e-02\n4.73381639471500346e-02\n4.68213505729613150e-02\n4.10114205131399678e-02\n2.90275546407034318e-02\n1.09757478619973876e-02\n-1.15436238009261841e-02\n-3.51129512611545042e-02\n-5.46227830682765730e-02\n-6.41120749949531388e-02\n-5.84531960837943940e-02\n-3.56820422317409014e-02\n7.26868730261408941e-04\n4.08465521925183983e-02\n6.99218830242505085e-02\n7.34079620775760361e-02\n4.45570838719055451e-02\n-8.67101447709838630e-03\n-6.24128064661614440e-02\n-8.56845147626704579e-02\n-5.84446321477987418e-02\n9.98977335974124935e-03\n7.73779956266838348e-02\n9.12705689794283542e-02\n3.10933942597473520e-02\n-6.17769057401551316e-02\n-1.03997988182418719e-01\n-4.42156477130506709e-02\n6.86413749231785664e-02\n1.11326325638473181e-01\n1.95639006078412135e-02\n-1.05814985980372506e-01\n-9.23254044926467149e-02\n6.13523288763648950e-02\n1.29564871548557142e-01\n-1.81163703510361963e-02\n-1.45459346391856009e-01\n-1.23589700094401452e-03\n1.58182274120453326e-01\n-1.71661117654668474e-02\n-1.67919478621601115e-01\n8.83061854414463610e-02\n1.32374547797425829e-01\n-1.96666755748595157e-01\n4.08109959810774234e-02\n1.69141909897932347e-01\n-2.77020953786909996e-01\n2.59869572234642021e-01\n-1.80091548239500077e-01\n1.00013305745586478e-01\n9.59680997435309255e-03\n1.66221624661633295e-02\n2.14221585250320597e-02\n2.51721086735675267e-02\n2.80476037139925950e-02\n2.99201844631396298e-02\n3.04838803658162780e-02\n2.93137155146421906e-02\n2.59287485327329079e-02\n1.98845040244808278e-02\n1.09061365613558701e-02\n-9.38259613756559671e-04\n-1.50422852079501491e-02\n-3.00865682707309283e-02\n-4.39565395788509283e-02\n-5.38488368002286028e-02\n-5.66661384094239162e-02\n-4.97606927604273414e-02\n-3.19826249039489863e-02\n-4.81431385807391983e-03\n2.68420207740486458e-02\n5.48206886642118724e-02\n6.93553794602738694e-02\n6.24114131058201363e-02\n3.20113718631330549e-02\n-1.42217235932658552e-02\n-5.88777333347289961e-02\n-8.01168957611555349e-02\n-6.24277992347871472e-02\n-8.57058083221490762e-03\n5.53132356888739532e-02\n8.92788358867301346e-02\n6.42995023168091290e-02\n-1.08238051257161967e-02\n-8.37506401594769190e-02\n-9.09538489578615578e-02\n-1.50615099249621926e-02\n8.20480276830261035e-02\n1.00876411456489873e-01\n7.77362038379622328e-03\n-1.02414190795304838e-01\n-9.05059606866104593e-02\n4.60878000191150827e-02\n1.26938692911898382e-01\n1.75422634226941598e-02\n-1.30060662032162849e-01\n-6.12089967833322271e-02\n1.28250967275503835e-01\n7.81202005686346679e-02\n-1.42358892644835505e-01\n-6.02691439390384276e-02\n1.74389718271507621e-01\n-1.71375241233328868e-02\n-1.79598972575503224e-01\n1.66313127184677473e-01\n2.84048871485764222e-02\n-2.17802698143736678e-01\n2.84249687602636136e-01\n-2.40342926003043578e-01\n1.55372825776316170e-01\n0.0\n3.91192693594621087e-04\n1.51508278744998831e-03\n3.58031265588813589e-03\n6.73575084263209473e-03\n1.10599097791931281e-02\n1.65281296794712457e-02\n2.29641953292801758e-02\n2.99833933994314329e-02\n3.69389794358381957e-02\n4.28914260738683037e-02\n4.66278975009819588e-02\n4.67650374606171787e-02\n4.19663324861105219e-02\n3.12893123872616460e-02\n1.46409922904416623e-02\n-6.74063659892875245e-03\n-2.99386613060586559e-02\n-5.03729321368975719e-02\n-6.24284218367462604e-02\n-6.08525966818083061e-02\n-4.28212406408290044e-02\n-1.01513876770135819e-02\n2.93329365553076475e-02\n6.25392071126651267e-02\n7.48850021944097721e-02\n5.68442845586168491e-02\n1.09933898398924638e-02\n-4.46435438006859350e-02\n-8.13906551182818488e-02\n-7.41634489650820072e-02\n-1.98229007470536803e-02\n5.26538140338829869e-02\n9.32314392344552462e-02\n6.47301341711152278e-02\n-2.01869370001000470e-02\n-9.41989776024478309e-02\n-8.43503375217269924e-02\n1.24817761075180205e-02\n1.03695970511316002e-01\n8.17072662372147623e-02\n-4.35313564086146979e-02\n-1.21482232335783730e-01\n-3.46205182398017994e-02\n1.11400023987133917e-01\n9.15682508217107449e-02\n-8.56340959716491296e-02\n-1.22854098430184452e-01\n7.32481233939765719e-02\n1.36250738872848054e-01\n-9.21320881932579105e-02\n-1.27167715684751020e-01\n1.48493949946342241e-01\n5.93937628029627129e-02\n-2.04468606871612862e-01\n1.16150157799970899e-01\n9.95985693896673796e-02\n-2.58215814625355866e-01\n2.84903642235275589e-01\n-2.20000852965006100e-01\n9.53585159209971965e-03\n1.65165794509532816e-02\n2.12878211951296817e-02\n2.50224811910854314e-02\n2.79042711849762613e-02\n2.98192903397319041e-02\n3.04811325467297667e-02\n2.94867673415238341e-02\n2.63744958673658922e-02\n2.07080019849928444e-02\n1.21976879288610320e-02\n8.59949659350849353e-04\n-1.28001643592799037e-02\n-2.76191040085283571e-02\n-4.16800242267465273e-02\n-5.23786781380124397e-02\n-5.67428851585088864e-02\n-5.20704669045893298e-02\n-3.68675515360967834e-02\n-1.19223009160213007e-02\n1.88417170808459905e-02\n4.82556618866046422e-02\n6.70846299916410815e-02\n6.67702676601148876e-02\n4.33502044928756672e-02\n1.20489530888676435e-03\n-4.55815561449735632e-02\n-7.65059530342273586e-02\n-7.33031970692832602e-02\n-3.14290037152229959e-02\n3.19832868689878258e-02\n8.15234457425684650e-02\n8.19321962150608291e-02\n2.46544035175921064e-02\n-5.61292406809375463e-02\n-9.82319582910771566e-02\n-5.86467608858607728e-02\n3.86103514007677187e-02\n1.05612106768138342e-01\n6.63884135440542394e-02\n-5.09499745885107214e-02\n-1.16590501172679994e-01\n-3.82074009775805745e-02\n9.87158409475815957e-02\n1.03554485153958722e-01\n-5.11709341732295223e-02\n-1.34686995681915750e-01\n1.00996774988504727e-02\n1.48397527201060586e-01\n5.50679186546872493e-03\n-1.61405275480036609e-01\n1.72244674940777165e-02\n1.71175582675696908e-01\n-9.30176941706759991e-02\n-1.32526500820605186e-01\n2.03857934005063857e-01\n-4.69729846234261741e-02\n-1.74241433221431735e-01\n2.95169401934418318e-01\n-2.84139758182619273e-01\n0.0\n3.83367373580833061e-04\n1.48477545335784370e-03\n3.50892848840419699e-03\n6.60287983768216569e-03\n1.08469158483865853e-02\n1.62242194205166577e-02\n2.25756482232674013e-02\n2.95459452508359012e-02\n3.65320494013898212e-02\n4.26508210488135697e-02\n4.67509163362993668e-02\n4.74991056684637911e-02\n4.35707266644860189e-02\n3.39613364159442252e-02\n1.84058843121454527e-02\n-2.16044485168387108e-03\n-2.52347073066300082e-02\n-4.66748024304505654e-02\n-6.11570631227606673e-02\n-6.33361418065801068e-02\n-4.96807245625123239e-02\n-2.06046628802428432e-02\n1.79225177876577157e-02\n5.44187479306317209e-02\n7.46016706856555828e-02\n6.69243957037478632e-02\n2.94395416165018839e-02\n-2.54047883825250821e-02\n-7.23255064517765028e-02\n-8.37002895181366419e-02\n-4.65062634253239071e-02\n2.35443067838603873e-02\n8.34736589476320068e-02\n8.71848125142043739e-02\n2.26312710510020755e-02\n-6.63217243745277685e-02\n-1.02918943015794795e-01\n-4.36110181445772613e-02\n6.52464206648415562e-02\n1.11618967242853306e-01\n3.17398513602541663e-02\n-9.39953305082922436e-02\n-1.05898855914712223e-01\n2.99128895597629181e-02\n1.32234672519207841e-01\n3.31880702271097616e-02\n-1.30119950968840714e-01\n-7.41056314956692608e-02\n1.27811868158315439e-01\n8.89026835060471032e-02\n-1.44572071667676438e-01\n-6.93324967157630950e-02\n1.81488715730478756e-01\n-1.15517700948384941e-02\n-1.93395345709039324e-01\n1.71385635165480221e-01\n4.66594212571295325e-02\n-2.59415639092195671e-01\n3.36177368298860302e-01\n9.67301733048779588e-03\n1.67541574788991343e-02\n2.15957613741321885e-02\n2.53926541297926633e-02\n2.83404126145143133e-02\n3.03372435048928947e-02\n3.11103257468361150e-02\n3.02703789848903886e-02\n2.73660104648819971e-02\n2.19615285259584896e-02\n1.37494249583613604e-02\n2.69923057855464988e-03\n-1.07689856646199216e-02\n-2.56174666257923157e-02\n-4.00846784487761884e-02\n-5.17174814721001394e-02\n-5.76287685201959110e-02\n-5.50487734722369323e-02\n-4.21720872475680186e-02\n-1.91783718115408446e-02\n1.08657112215180731e-02\n4.16821813544238570e-02\n6.45572249481002891e-02\n7.05673332238206941e-02\n5.40941967330926116e-02\n1.66359781651030415e-02\n-3.09512108803061507e-02\n-6.99924138657074812e-02\n-8.06278017004504743e-02\n-5.23306594791986476e-02\n6.43846089339152050e-03\n6.66575468134508048e-02\n9.08343355680448494e-02\n5.67197617368539186e-02\n-2.06748329008882327e-02\n-8.87335839240609853e-02\n-8.99746737872682278e-02\n-1.28354848033488851e-02\n8.25364700019098479e-02\n1.03666600563437933e-01\n1.67748625548456917e-02\n-9.60522241682962158e-02\n-1.02774931100640496e-01\n2.11098479677159188e-02\n1.26461035215293255e-01\n5.81409466965892921e-02\n-1.04891529058463565e-01\n-1.10983919503766126e-01\n7.40884859799714052e-02\n1.39348927870923761e-01\n-6.08767798554747525e-02\n-1.53522700008017488e-01\n8.20514771015248001e-02\n1.49545020631067394e-01\n-1.46555391957940734e-01\n-8.96959868921195363e-02\n2.26725451528624250e-01\n-9.12870414709801292e-02\n-1.78898162106063047e-01\n3.67151113909022886e-01\n0.0\n3.81713958116067600e-04\n1.47837180279844537e-03\n3.49403024268734718e-03\n6.57627026518021497e-03\n1.08083748446300108e-02\n1.61809521400287232e-02\n2.25491277036166810e-02\n2.95810765987371757e-02\n3.67075058001108262e-02\n4.30877241667701055e-02\n4.76148183659979227e-02\n4.89879445765831131e-02\n4.58801340450669462e-02\n3.72201541605512512e-02\n2.25812860852600550e-02\n2.62479159989091257e-03\n-2.05161092730582716e-02\n-4.30907985998895612e-02\n-6.00415480475587141e-02\n-6.59535927137322037e-02\n-5.66769090958475288e-02\n-3.13569337831807737e-02\n5.78339938620857884e-03\n4.49139520212151824e-02\n7.23595384003185987e-02\n7.51225805346755621e-02\n4.73181281408913482e-02\n-4.09559840513690383e-03\n-5.82011405734750714e-02\n-8.69442662243452014e-02\n-6.96588555827602901e-02\n-9.07689158524001456e-03\n6.24881999500540436e-02\n9.68810221864681853e-02\n6.24764596936688843e-02\n-2.41604730487658681e-02\n-9.74509889617868746e-02\n-8.88381882670790241e-02\n5.84882457482892304e-03\n1.02181342625146998e-01\n9.49255729959844474e-02\n-2.29551170988639454e-02\n-1.22099961164245277e-01\n-6.94472353116637742e-02\n8.41090206838708832e-02\n1.26247154066577300e-01\n-2.58714517357050700e-02\n-1.48011855157215294e-01\n-1.98172346705252495e-02\n1.56962112905596418e-01\n3.87043165738659781e-02\n-1.72460988252063047e-01\n-1.99509806436069421e-02\n1.96562345957727397e-01\n-5.62234521503587742e-02\n-1.93150074794400717e-01\n2.00858410403482124e-01\n6.74561918834878371e-02\n-3.73681912838035257e-01\n9.92076790109982544e-03\n1.71832740548033477e-02\n2.21506901725372213e-02\n2.60537115870413255e-02\n2.91025502035872422e-02\n3.12071774232144175e-02\n3.21063785309870509e-02\n3.14216503074739029e-02\n2.87085494041239321e-02\n2.35290837683301626e-02\n1.55564171808511356e-02\n4.71452711578807752e-03\n-8.65642419007579822e-03\n-2.36353938654861075e-02\n-3.86044014856329401e-02\n-5.12505687601079452e-02\n-5.87678098960445830e-02\n-5.83282224026389073e-02\n-4.78416401162802749e-02\n-2.69183487557542352e-02\n2.20044919719473205e-03\n3.41406848747839164e-02\n6.08108895942873900e-02\n7.31345039868971508e-02\n6.41179316309807429e-02\n3.25795445708965264e-02\n-1.39708047197231247e-02\n-5.93549764318204026e-02\n-8.33279835775945776e-02\n-7.06303784335110818e-02\n-2.13064566349911097e-02\n4.38365408757124403e-02\n8.90575873475000224e-02\n8.25053436109274285e-02\n2.02180149823584440e-02\n-6.16809346966703601e-02\n-1.03074745365432985e-01\n-6.36070938426746973e-02\n3.44859680390706552e-02\n1.08443892185758547e-01\n8.11018798709293165e-02\n-3.37676772505687978e-02\n-1.20120584929175156e-01\n-7.07033530326908188e-02\n7.19678123595153818e-02\n1.29981380522145529e-01\n8.13467253951973175e-03\n-1.36274612852604615e-01\n-7.54538086433728938e-02\n1.18482226838008950e-01\n1.17518201563877628e-01\n-1.06910972668200349e-01\n-1.38267634325666411e-01\n1.22127692181218606e-01\n1.35989332161250004e-01\n-1.74614826112522326e-01\n-8.64347323316052435e-02\n2.53038503941533710e-01\n-5.43605213815127400e-02\n-3.57839602024328685e-01\n0.0\n3.81282101430766170e-04\n1.47669922904832451e-03\n3.49031795301173306e-03\n6.57074080640826334e-03\n1.08045771873750973e-02\n1.61899766777873662e-02\n2.25961677303581458e-02\n2.97142657637161529e-02\n3.70079682299272322e-02\n4.36781860559661006e-02\n4.86620072989333713e-02\n5.06917522734268849e-02\n4.84410920716998178e-02\n4.07777936985213307e-02\n2.71215826108404875e-02\n7.86717932553307811e-03\n-1.52222121449980367e-02\n-3.88065804683275020e-02\n-5.81450166311634764e-02\n-6.78435004825207744e-02\n-6.32522887252360277e-02\n-4.23529103222114872e-02\n-7.62804038913583900e-03\n3.29436982729334957e-02\n6.67744311137762059e-02\n8.01194039417922887e-02\n6.37934719018384278e-02\n1.93075500009130853e-02\n-3.78954487440977955e-02\n-8.16939432800606186e-02\n-8.64838341258889892e-02\n-4.29968771760484147e-02\n3.01108559382954680e-02\n8.98062806949615350e-02\n9.22470596702603396e-02\n2.66650406368233971e-02\n-6.52676773022545093e-02\n-1.09670378618715744e-01\n-5.93270515990723044e-02\n5.16434153309437288e-02\n1.19125790743147941e-01\n6.36420546634889062e-02\n-6.91587925477009091e-02\n-1.28792114949388331e-01\n-2.74601803709831269e-02\n1.19818292372604648e-01\n1.06286455758480516e-01\n-7.12504023148015919e-02\n-1.49046537228435305e-01\n2.18540085660310079e-02\n1.69474677226763237e-01\n6.38222267324188748e-03\n-1.87337201202317866e-01\n-1.28168495674664019e-03\n2.12463060737951376e-01\n-5.12759245700534425e-02\n-2.37398938837394324e-01\n1.66283115677414245e-01\n3.25020468274059005e-01\n1.01930607870622403e-02\n1.76548991678298108e-02\n2.27605588760091508e-02\n2.67800664538822945e-02\n2.99395548174729367e-02\n3.21617079545428383e-02\n3.31978750545639661e-02\n3.26814179146807174e-02\n3.01761064902093222e-02\n2.52430700787885133e-02\n1.75375907578951273e-02\n6.93919854660612380e-03\n-6.29187263251889447e-03\n-2.13538922612571506e-02\n-3.67799030462887602e-02\n-5.04126595314174364e-02\n-5.95533289024358162e-02\n-6.13538633354170637e-02\n-5.34844737339979573e-02\n-3.50237649289920003e-02\n-7.38977760559949085e-03\n2.50199510488198149e-02\n5.49220248046075818e-02\n7.33940044963047322e-02\n7.24329147407523632e-02\n4.84331530690129547e-02\n5.43908739983981968e-03\n-4.36196134095627810e-02\n-7.95283289157569656e-02\n-8.39148902774704830e-02\n-4.91768614024322079e-02\n1.34689373403202584e-02\n7.41024196055150436e-02\n9.65683972542953767e-02\n6.05480072612747042e-02\n-1.88794773649192636e-02\n-9.12727800668822892e-02\n-9.99994605381422513e-02\n-2.82828805932691316e-02\n7.35979837702005618e-02\n1.15991425810767101e-01\n4.85158976922654625e-02\n-7.46777170081553698e-02\n-1.25655734975690991e-01\n-3.41925906325710113e-02\n1.07076555924990255e-01\n1.19962493517373869e-01\n-3.23128599925106147e-02\n-1.50498006671781176e-01\n-4.59548994253516571e-02\n1.43640964181768388e-01\n1.03033147241055986e-01\n-1.30120884782783469e-01\n-1.38106558720335393e-01\n1.33942156214478719e-01\n1.56451985947835659e-01\n-1.70505080617901927e-01\n-1.62493233789125946e-01\n2.53168078299183807e-01\n2.81690713219568567e-01\n0.0\n3.80094052240518643e-04\n1.47209793432002056e-03\n3.47968843627159555e-03\n6.55222000275545134e-03\n1.07795299819305850e-02\n1.61674818055291027e-02\n2.26000084688247199e-02\n2.97924252809515476e-02\n3.72436546333362317e-02\n4.41998386159227763e-02\n4.96475974264357772e-02\n5.23603437076116743e-02\n5.10229296737622073e-02\n4.44546652185557126e-02\n3.19339317836555697e-02\n1.35955750316893442e-02\n-9.17516916261444486e-03\n-3.34842013552784090e-02\n-5.49835057719183021e-02\n-6.84232050122613317e-02\n-6.88114915063863658e-02\n-5.31099820483716817e-02\n-2.20997755636335377e-02\n1.82808766956038468e-02\n5.70475757723814189e-02\n8.05305636772942063e-02\n7.71154742286503658e-02\n4.32456003516846765e-02\n-1.18972926417633927e-02\n-6.64516726786600065e-02\n-9.31871826131824288e-02\n-7.32397679454688671e-02\n-1.03939811792863965e-02\n6.38884610287594190e-02\n1.03060617864021292e-01\n7.45107083894035321e-02\n-1.09773650990498059e-02\n-9.47167013123045853e-02\n-1.06395541468504773e-01\n-2.49941897843205842e-02\n8.63533308857294124e-02\n1.20625981213567768e-01\n3.02971415785076165e-02\n-1.01276299372829115e-01\n-1.23736047822403314e-01\n6.99288276500122704e-03\n1.39634057196150824e-01\n8.83865545482660359e-02\n-9.81952811087018068e-02\n-1.49111516434665969e-01\n4.03011371322544443e-02\n1.79727373551225228e-01\n7.01923409792121113e-03\n-2.00797812585063795e-01\n-3.43996523469106974e-02\n2.32984817830030611e-01\n5.02228054511347985e-02\n-3.07023140922996540e-01\n-2.33904082962632098e-01\n1.04755369580514270e-02\n1.81441622479105932e-02\n2.33933175801163476e-02\n2.75340706318746263e-02\n3.08095130393361422e-02\n3.31562074558708064e-02\n3.43395306938992229e-02\n3.40065262752968153e-02\n3.17313382416230805e-02\n2.70766271357154517e-02\n1.96822015999380921e-02\n9.38501404870065344e-03\n-3.63432217410453997e-03\n-1.86964017627790045e-02\n-3.44943094451417506e-02\n-4.90449699396087804e-02\n-5.97884043099863940e-02\n-6.39026630976666926e-02\n-5.88752626619377870e-02\n-4.33064053771697183e-02\n-1.78115509964615927e-02\n1.42440445465239467e-02\n4.65647600188395100e-02\n7.07107258909306507e-02\n7.81057735733135250e-02\n6.31125368257564323e-02\n2.63840767655550770e-02\n-2.29655308314570469e-02\n-6.81355621933745492e-02\n-8.95760285773338355e-02\n-7.35939737558070767e-02\n-2.15376146397092127e-02\n4.58020059513566738e-02\n9.38839435063468924e-02\n9.14151097319413214e-02\n3.20531109367123007e-02\n-5.32956494236884390e-02\n-1.07874458286353947e-01\n-8.57968177340732441e-02\n6.54045499707083845e-03\n1.00657665529781573e-01\n1.11638818772559212e-01\n1.69212666590771582e-02\n-1.02534871183034573e-01\n-1.21923210807449778e-01\n-4.82884595890266388e-03\n1.27870298457332776e-01\n1.10302661240845451e-01\n-5.59574799540945161e-02\n-1.58663657508861911e-01\n-3.60478424344747236e-02\n1.55026320647128596e-01\n1.12481305810153878e-01\n-1.28318249780535465e-01\n-1.69180417984515580e-01\n1.01405323078944093e-01\n2.22805173751435409e-01\n-7.23094387271798200e-02\n-3.26862519388051720e-01\n-1.86566776571375076e-01\n0.0\n3.78070329966886595e-04\n1.46426009165689453e-03\n3.46141212454321133e-03\n6.51932234915192539e-03\n1.07309113202791618e-02\n1.61098674220691539e-02\n2.25553445425596341e-02\n2.98080049158738931e-02\n3.74041031779545133e-02\n4.46385449321335462e-02\n5.05530483563626024e-02\n5.39704000028774569e-02\n5.35981431599701144e-02\n4.82216690420985902e-02\n3.69937206732981055e-02\n1.98012950227196283e-02\n-2.34915750237025102e-03\n-2.70369945221463903e-02\n-5.03778134407442679e-02\n-6.73920267837298803e-02\n-7.29226861231668660e-02\n-6.31004801443314639e-02\n-3.71188046286325957e-02\n1.21813245346581852e-03\n4.29676856857584000e-02\n7.53679332944736657e-02\n8.54367697312303082e-02\n6.53586247698966366e-02\n1.78663608666786884e-02\n-4.12922991145783444e-02\n-8.67441479016725081e-02\n-9.37527261340395657e-02\n-5.24234713597232227e-02\n2.15338388369846756e-02\n8.86314340297009728e-02\n1.04763663171168697e-01\n5.12409721531215182e-02\n-4.34407507747984201e-02\n-1.12351201408804696e-01\n-9.53880365412528020e-02\n5.15387208265053517e-03\n1.09004932539229896e-01\n1.15806507915661674e-01\n4.74008163126042430e-03\n-1.20607590339792681e-01\n-1.18917671677375977e-01\n2.59768996772480817e-02\n1.50768676869365376e-01\n8.58638978775537465e-02\n-1.05673008568103799e-01\n-1.61016500200702573e-01\n2.59857199296480192e-02\n1.93105635615068522e-01\n5.79971920731959939e-02\n-1.98385362690127853e-01\n-1.47857610258073452e-01\n1.80509651830344064e-01\n3.17196581487697249e-01\n1.43171120791267981e-01\n1.07747436402860081e-02\n1.86624034235050064e-02\n2.40635957080294685e-02\n2.83329836262695631e-02\n3.17318536704598239e-02\n3.42118476756365086e-02\n3.55537985248576202e-02\n3.54201931198940070e-02\n3.33976920723100743e-02\n2.90529964947255845e-02\n2.20131790893957312e-02\n1.20751805841781950e-02\n-6.58501213247043859e-04\n-1.56320309783798302e-02\n-3.17053223731477915e-02\n-4.70857656921995701e-02\n-5.93826041903358498e-02\n-6.58477969173369843e-02\n-6.38500568753605363e-02\n-5.15798058873354129e-02\n-2.88962983017526757e-02\n1.88842917293229441e-03\n3.56112097282374820e-02\n6.46280818810988505e-02\n8.02628568548399840e-02\n7.53638272784057373e-02\n4.74972531682535531e-02\n1.68848905435348509e-03\n-4.88419366969497989e-02\n-8.54034575905972121e-02\n-9.04442174739359950e-02\n-5.64531230514041318e-02\n6.79060677211649599e-03\n7.18365370406413711e-02\n1.03694246417463831e-01\n7.88286801124609554e-02\n3.93413140720449712e-03\n-7.94526928649916531e-02\n-1.14607433046806761e-01\n-6.85527278099549581e-02\n3.44263821143846252e-02\n1.17192319056829378e-01\n1.04339454088822628e-01\n-5.77663262718034615e-03\n-1.19207461879601906e-01\n-1.19408540579456476e-01\n9.83110281833897426e-03\n1.38988459006677695e-01\n1.12711890068448797e-01\n-5.81635886252239512e-02\n-1.68591074070710251e-01\n-5.68716395796871749e-02\n1.49284959167369918e-01\n1.55589707137185063e-01\n-7.94553069514903482e-02\n-2.23871651918041897e-01\n-3.31802320298934666e-02\n2.57589231276313224e-01\n2.85857527205879869e-01\n1.05805209815967444e-01\n0.0\n3.75289299908670873e-04\n1.45348920855612298e-03\n3.43620459936045492e-03\n6.47338415221159619e-03\n1.06608793349540210e-02\n1.60202586839885593e-02\n2.24662848772079864e-02\n2.97658900384777728e-02\n3.74944387806908155e-02\n4.49987210742285593e-02\n5.13807127346015968e-02\n5.55206452629573299e-02\n5.61605840551558447e-02\n5.20679033734349206e-02\n4.22884842823562229e-02\n2.64789690421601970e-02\n5.27445046504930026e-03\n-1.93949738672756292e-02\n-4.41690577523497496e-02\n-6.44603375731219869e-02\n-7.51346043570954164e-02\n-7.17190851506087773e-02\n-5.20098505031957800e-02\n-1.76966354624897189e-02\n2.46360548060339385e-02\n6.39053495464144833e-02\n8.69296516860781354e-02\n8.28267326199015885e-02\n4.83685590557633438e-02\n-7.90350062944657726e-03\n-6.56229944959667577e-02\n-9.86988202492056765e-02\n-8.70935541915172085e-02\n-2.98634391615034966e-02\n4.83004977019561646e-02\n1.04507781579056977e-01\n1.00305715433950116e-01\n2.96329788017969976e-02\n-6.73309656456788780e-02\n-1.21973268693813669e-01\n-8.51219670299690062e-02\n2.53693186281813005e-02\n1.22451479944004085e-01\n1.14010724909124617e-01\n-6.41420722656787200e-03\n-1.30390600138655444e-01\n-1.24217965428571747e-01\n2.33779884547697832e-02\n1.56873476620663033e-01\n1.08358758694395332e-01\n-8.56541263939493147e-02\n-1.85699501709403331e-01\n-3.88606423681117780e-02\n1.83651141664144646e-01\n1.73901354091432980e-01\n-8.97550690456029032e-02\n-2.96613823035301039e-01\n-2.41772697633412303e-01\n-7.53355328555931764e-02\n1.10971654385389942e-02\n1.92208543595468982e-02\n2.47858895180732876e-02\n2.91939398515532293e-02\n3.27259555289944812e-02\n3.53499469257766777e-02\n3.68636698299133897e-02\n3.69468501729150120e-02\n3.52008849461982951e-02\n3.11992117583501302e-02\n2.45592919334256081e-02\n1.50413219210826822e-02\n2.67232284510457527e-03\n-1.21150439615696753e-02\n-2.83522210703288507e-02\n-4.44511771532817845e-02\n-5.82193305324488625e-02\n-6.70313440747463268e-02\n-6.82069841060289339e-02\n-5.96098134234662250e-02\n-4.04150483681314371e-02\n-1.18984888727973991e-02\n2.20096866721801836e-02\n5.47419285422761706e-02\n7.80063630512170536e-02\n8.37537607495319747e-02\n6.69930957141733202e-02\n2.87304140127024286e-02\n-2.22059831171126446e-02\n-6.98948803831049570e-02\n-9.55867719197834448e-02\n-8.51442705582257098e-02\n-3.72828832939464741e-02\n3.16076269233379475e-02\n9.05507636812291766e-02\n1.06840654186162676e-01\n6.49232115336727256e-02\n-1.87363171259235933e-02\n-9.71773507812374177e-02\n-1.16967612939861243e-01\n-5.57060286670817487e-02\n5.19939894549915557e-02\n1.27191358947477851e-01\n1.02472582514593985e-01\n-1.41962078894565212e-02\n-1.27376616414684146e-01\n-1.26430407571463427e-01\n3.40162171232114051e-03\n1.41223955174141685e-01\n1.34372927509203849e-01\n-2.93955891710855274e-02\n-1.74671240772249270e-01\n-1.17891246936038988e-01\n9.73502357984275951e-02\n2.14960273529703622e-01\n6.95257157916801816e-02\n-1.93318143672931736e-01\n-2.99587268602317158e-01\n-1.93154888664295310e-01\n-5.16896034369878424e-02\n0.0\n3.71726931472183034e-04\n1.43969221492855066e-03\n3.40384408353838546e-03\n6.41397702079554970e-03\n1.05686901426770251e-02\n1.58974314615131229e-02\n2.23308656747409282e-02\n2.96629730592063851e-02\n3.75098115713641336e-02\n4.52729599805629102e-02\n5.21196521293076295e-02\n5.69956984191621052e-02\n5.86900951906957694e-02\n5.59696537280931078e-02\n4.77953320628168518e-02\n3.36164204102070291e-02\n1.37125170891209298e-02\n-1.04826894271370721e-02\n-3.61814776746626210e-02\n-5.93021038915828233e-02\n-7.49259038958240836e-02\n-7.82358314579729153e-02\n-6.58944045659363153e-02\n-3.76187879975884779e-02\n2.52585132371936074e-03\n4.57775045287073454e-02\n7.99314516905634403e-02\n9.25208311554874124e-02\n7.55154273933013320e-02\n3.01238170664824799e-02\n-3.06023274734691167e-02\n-8.37927940893196110e-02\n-1.04584912114240328e-01\n-7.81230256863306854e-02\n-1.06108368072557503e-02\n6.78560119875242784e-02\n1.14231433701019527e-01\n9.59168443884408639e-02\n1.53918238231436806e-02\n-8.17514967301927881e-02\n-1.28596566222342029e-01\n-8.29847616278490546e-02\n3.16701563308082884e-02\n1.29352483729326451e-01\n1.22374644439003644e-01\n2.94263488447163999e-03\n-1.29670373800956223e-01\n-1.44525294496208628e-01\n-1.01729689982392353e-02\n1.48421069088963103e-01\n1.57480813329530733e-01\n-1.37384569407534643e-02\n-1.90121535157175475e-01\n-1.66409436826335799e-01\n5.51344234868651403e-02\n2.60339114310925768e-01\n2.74619564567519792e-01\n1.46365017923866414e-01\n3.41724036860090799e-02\n1.14489925221467614e-02\n1.98302367438343355e-02\n2.55740438147986568e-02\n3.01333356814801681e-02\n3.38104533385590253e-02\n3.65912051490880769e-02\n3.82918488611004512e-02\n3.86112727042059525e-02\n3.71680150753384286e-02\n3.35452453389515765e-02\n2.73544295690144705e-02\n1.83230710107857922e-02\n6.40653780830484094e-03\n-8.08361885867764363e-03\n-2.43529433653647646e-02\n-4.10297817607837984e-02\n-5.61469285666992696e-02\n-6.72508844467189643e-02\n-7.16873567559371816e-02\n-6.70894203044980209e-02\n-5.20464938303513425e-02\n-2.68565036892975256e-02\n5.83001860016274867e-03\n4.07502668101314899e-02\n7.04620487518395622e-02\n8.66994380769205708e-02\n8.26463684425260969e-02\n5.57277766046046646e-02\n1.00438081947657395e-02\n-4.27859705046505084e-02\n-8.55607066709067887e-02\n-1.00702340992110298e-01\n-7.77710576777445317e-02\n-2.05365465619950713e-02\n5.04171066478027244e-02\n1.03095046767572932e-01\n1.07954693893489773e-01\n5.54286234636156699e-02\n-3.26329033453760659e-02\n-1.07953483671045125e-01\n-1.20620752969633135e-01\n-5.34589621291779102e-02\n5.67589635854535354e-02\n1.33591142444074940e-01\n1.12331969149421812e-01\n-2.67687677907965660e-03\n-1.25106387105946237e-01\n-1.46166525760551225e-01\n-3.27952847408892467e-02\n1.22996840289405593e-01\n1.71028405113064025e-01\n4.79151709815649751e-02\n-1.39663897037583973e-01\n-2.02402738466846005e-01\n-6.04257898553073949e-02\n1.66616331654477673e-01\n2.85951870100724426e-01\n2.32473241044374140e-01\n1.05477636519220985e-01\n2.17611134584927736e-02\n0.0\n3.67298909595239196e-04\n1.42254255994250485e-03\n3.36355665182948640e-03\n6.33963132877839782e-03\n1.04518812213874220e-02\n1.57375681583488344e-02\n2.21434601088970513e-02\n2.94912369680268502e-02\n3.74390747575312349e-02\n4.54460827438459003e-02\n5.27496616751447073e-02\n5.83694714160364128e-02\n6.11544971199932050e-02\n5.98900658043954037e-02\n5.34774299873604295e-02\n4.11873250395191209e-02\n2.29688800473553875e-02\n-2.33623770189877880e-04\n-2.62379461089533514e-02\n-5.15678726326146211e-02\n-7.17098948794794855e-02\n-8.17841163507819768e-02\n-7.76500287056865052e-02\n-5.73215513832810372e-02\n-2.23692921480802935e-02\n2.12059502477480837e-02\n6.32411305703766691e-02\n9.13121361302450391e-02\n9.43231273091902495e-02\n6.70881525794966016e-02\n1.43318293221320024e-02\n-4.80572946098964046e-02\n-9.64460734341467535e-02\n-1.07969714728051308e-01\n-7.18861991772271058e-02\n1.34464435849781421e-03\n7.95985462695609769e-02\n1.21229612029415679e-01\n9.73192586011837751e-02\n1.32560078277140676e-02\n-8.57492084533139354e-02\n-1.35568324471221108e-01\n-9.46956554362330394e-02\n1.88303692192773771e-02\n1.27292844804572564e-01\n1.43051454118696936e-01\n4.09515428496239828e-02\n-1.05805769581139880e-01\n-1.71746217356458841e-01\n-8.61425728378241301e-02\n8.96074098608574815e-02\n2.00249265144372274e-01\n1.34595348393055092e-01\n-6.53124347616243633e-02\n-2.42172698936061664e-01\n-2.75452820051693137e-01\n-1.83565520954531491e-01\n-7.24108162251484028e-02\n-1.33413043452189507e-02\n1.18376699524123385e-02\n2.05034458008096256e-02\n2.64447126842323674e-02\n3.11709068948856742e-02\n3.50078120434177756e-02\n3.79606532561046137e-02\n3.98659313031838533e-02\n4.04438038633113950e-02\n3.93326063128446798e-02\n3.61286104685035817e-02\n3.04414845048650226e-02\n2.19709833775200945e-02\n1.06059778059148149e-02\n-3.45914257916757209e-03\n-1.96041247495929855e-02\n-3.66826168199754221e-02\n-5.29773578873439233e-02\n-6.62548831819707723e-02\n-7.39651619988660886e-02\n-7.36191228327728875e-02\n-6.33444890971710806e-02\n-4.25643691236788635e-02\n-1.26672832313687346e-02\n2.25429002598072081e-02\n5.68832844015444011e-02\n8.25668911992587101e-02\n9.18413227893494361e-02\n7.93499695456894305e-02\n4.46943420924740958e-02\n-5.71340490406674947e-03\n-5.86254756815100253e-02\n-9.66644081734703842e-02\n-1.03851339787836866e-01\n-7.26857956991702470e-02\n-1.00190690104717591e-02\n6.18299238781423455e-02\n1.11410940388016619e-01\n1.11608538847307898e-01\n5.53982891115317802e-02\n-3.47453216756266753e-02\n-1.12316142409005809e-01\n-1.29355731272773694e-01\n-6.71585634789413910e-02\n4.38635934768915464e-02\n1.33876314522407280e-01\n1.35753097963030478e-01\n3.68852415409182677e-02\n-9.90669824063961646e-02\n-1.68304046526110584e-01\n-1.05945686012862209e-01\n5.15853943265982343e-02\n1.82073281582291246e-01\n1.72530491304263067e-01\n1.72313734180664091e-02\n-1.74400723331366247e-01\n-2.73627961951158127e-01\n-2.40026109707139113e-01\n-1.36032828417943452e-01\n-4.74003351077882384e-02\n-7.86904719016904598e-03\n0.0\n3.61878320520282997e-04\n1.40154870872856571e-03\n3.31417795509347931e-03\n6.24813961580740571e-03\n1.03067664706226036e-02\n1.55349888117702045e-02\n2.18957733658213805e-02\n2.92390103998539722e-02\n3.72662441659674382e-02\n4.54966723045585955e-02\n5.32426491961600634e-02\n5.96060475061834308e-02\n6.35094943694180791e-02\n6.37774970018001319e-02\n5.92801481684186379e-02\n4.91445280419201616e-02\n3.30243809644868436e-02\n1.13964975464323857e-02\n-1.41758848258929961e-02\n-4.09011400218762672e-02\n-6.48467494912477738e-02\n-8.13600298808521555e-02\n-8.58817300144674167e-02\n-7.51157563591708793e-02\n-4.83707969362187767e-02\n-8.71649670564012512e-03\n3.65440730141065040e-02\n7.66050958439271068e-02\n9.94175867691962228e-02\n9.53385504869789929e-02\n6.13404615219131782e-02\n4.24323052614353040e-03\n-5.89262649224346000e-02\n-1.04914318058995648e-01\n-1.12548382603211178e-01\n-7.30382396038358889e-02\n2.32748686107473032e-03\n8.24043795597979439e-02\n1.27403117047708098e-01\n1.08715309769702687e-01\n2.83340089301306469e-02\n-7.48262938623882462e-02\n-1.40676923572992219e-01\n-1.22517951742805858e-01\n-2.18569952787168661e-02\n1.02325912829405563e-01\n1.64767377099716589e-01\n1.12587487951864948e-01\n-2.86383538752247729e-02\n-1.62364759231441724e-01\n-1.86951275186529209e-01\n-7.38874048271082606e-02\n1.07320072182975471e-01\n2.43442558415438826e-01\n2.65549138999249756e-01\n1.92276069980603675e-01\n9.49708252922347729e-02\n2.95981247819835716e-02\n4.46131594133006380e-03\n1.22731305205421269e-02\n2.12576856295032257e-02\n2.74201153295255649e-02\n3.23329852889013766e-02\n3.63480077774532492e-02\n3.94916970200440698e-02\n4.16227528551002951e-02\n4.24849471867107600e-02\n4.17393797962363894e-02\n3.89992464060462465e-02\n3.38772944320061345e-02\n2.60515069134337543e-02\n1.53509491956598677e-02\n1.85900231046008603e-03\n-1.39754008637450345e-02\n-3.12364474812085527e-02\n-4.84775051239585142e-02\n-6.37305955948596070e-02\n-7.46293552307046582e-02\n-7.86803633143272063e-02\n-7.36980508530174494e-02\n-5.83802358895807311e-02\n-3.29446193166081716e-02\n3.21311324135522853e-04\n3.68057009894569298e-02\n6.98471080736506877e-02\n9.17258843214268094e-02\n9.54088109036947546e-02\n7.68218198165907806e-02\n3.70930880112299508e-02\n-1.60881874143476225e-02\n-6.89462673773937051e-02\n-1.04584250880904298e-01\n-1.08316295519828965e-01\n-7.40668858935033814e-02\n-9.36114631309723638e-03\n6.40793110958528117e-02\n1.16252994080284833e-01\n1.20873205907653894e-01\n6.93680349738146212e-02\n-2.01891915904327639e-02\n-1.06297032808953307e-01\n-1.41819820070357760e-01\n-1.00299458658629451e-01\n3.37885895209353313e-03\n1.13557243393745844e-01\n1.61644991928147963e-01\n1.09311565505787911e-01\n-2.01810866552543308e-02\n-1.48459457517798654e-01\n-1.89301669438114550e-01\n-1.07656839074413729e-01\n5.36473573924573233e-02\n2.03273756868149136e-01\n2.65898146154282977e-01\n2.30132833766807904e-01\n1.42913212182150057e-01\n6.26089985542653965e-02\n1.76285436523304292e-02\n2.42851647067932443e-03\n0.0\n3.55290000026252351e-04\n1.37603225317570795e-03\n3.25410127867093455e-03\n6.13645756621001865e-03\n1.01282688843496137e-02\n1.52818877675903221e-02\n2.15764452520760749e-02\n2.88903818131887799e-02\n3.69696451617018834e-02\n4.53958393304594032e-02\n5.35608587950381423e-02\n6.06571399681126652e-02\n6.56950714703669753e-02\n6.75604650688255426e-02\n6.51240856365649934e-02\n5.74105881058859721e-02\n4.38243438238618485e-02\n2.44136438390361553e-02\n1.33098807381349093e-04\n-2.69604555490550249e-02\n-5.36644685253775539e-02\n-7.58337211687868662e-02\n-8.89068029677471672e-02\n-8.87782719036833978e-02\n-7.29407297714140951e-02\n-4.16873588483063981e-02\n9.74824464970900978e-04\n4.71437427516101654e-02\n8.59892333435064299e-02\n1.06069480158637264e-01\n9.87681179217517469e-02\n6.20404671306476960e-02\n3.10777219322473002e-03\n-6.14801709743958147e-02\n-1.09560874227439112e-01\n-1.20749957900055813e-01\n-8.55369731667426636e-02\n-1.23385096803235207e-02\n7.18298290226403735e-02\n1.29780737301475241e-01\n1.30378271175072641e-01\n6.61536712094402679e-02\n-3.74318387970039301e-02\n-1.29259099269423250e-01\n-1.56844423578199527e-01\n-9.70943147478970231e-02\n2.46966978496390606e-02\n1.42921146722110870e-01\n1.86966417848437844e-01\n1.24349503517467069e-01\n-1.71651520770960998e-02\n-1.66024437388030188e-01\n-2.52217118874835888e-01\n-2.49065013126166857e-01\n-1.81562650864671410e-01\n-9.91083481186307846e-02\n-3.90231543436687991e-02\n-1.00096457623942425e-02\n-1.26758683820192108e-03\n1.27693793843082250e-02\n2.21172138747444333e-02\n2.85315797076076925e-02\n3.36566928980145744e-02\n3.78732874541547332e-02\n4.12313875053115855e-02\n4.36141354385873800e-02\n4.47915690661997851e-02\n4.44509086515795307e-02\n4.22266401214094061e-02\n3.77402716171862385e-02\n3.06551984044671037e-02\n2.07491731430256426e-02\n8.00333780316255308e-03\n-7.29817280091497357e-03\n-2.44705915165320045e-02\n-4.23530980513781505e-02\n-5.92835204310196567e-02\n-7.31563852852028518e-02\n-8.15972471027509028e-02\n-8.22763226010098381e-02\n-7.33611842514746010e-02\n-5.40697369255707244e-02\n-2.52331913485917131e-02\n1.02768032510234305e-02\n4.74450122258243748e-02\n7.95257264228538818e-02\n9.91026663740785241e-02\n9.97785976560164600e-02\n7.82471192232543356e-02\n3.62283734164125584e-02\n-1.84690617712247526e-02\n-7.25350669577293078e-02\n-1.09891844245309636e-01\n-1.16419915518453057e-01\n-8.55845229639450034e-02\n-2.29550822168537901e-02\n5.27943697863346925e-02\n1.14201902919315534e-01\n1.34592260423610305e-01\n1.00135700822224200e-01\n1.91882179112257863e-02\n-7.68269066965821257e-02\n-1.44126570155307970e-01\n-1.46426224165847080e-01\n-7.52974684052431648e-02\n4.06007493809610875e-02\n1.45450455054782130e-01\n1.83328142467240829e-01\n1.28832666991274658e-01\n2.78069075085814058e-03\n-1.38421017291567305e-01\n-2.34531643984401295e-01\n-2.54223410211096734e-01\n-2.07539202373881154e-01\n-1.31802434110741828e-01\n-6.43360775798851037e-02\n-2.30049828612564622e-02\n-5.41346485676692107e-03\n-6.33406369638764028e-04\n0.0\n3.47290996358137695e-04\n1.34505224518284778e-03\n3.18109838564520006e-03\n6.00036485082632541e-03\n9.90935600263870460e-03\n1.49674685611552120e-02\n2.11697972663055546e-02\n2.84234555339485349e-02\n3.65195524828906479e-02\n4.51040901398006636e-02\n5.36527688516341625e-02\n6.14567640270797660e-02\n6.76286037636580628e-02\n7.11387577652093095e-02\n7.08936039963061343e-02\n6.58629996582541649e-02\n5.52595911191226946e-02\n3.87613218792319317e-02\n1.67531324319700747e-02\n-9.45522295380015441e-03\n-3.74977008776802567e-02\n-6.39831035649594954e-02\n-8.47649748490195837e-02\n-9.55028102531222112e-02\n-9.25121635704755918e-02\n-7.38132021776340408e-02\n-4.01762466077527705e-02\n4.14459644161056535e-03\n5.13585214819082328e-02\n9.10927243614039761e-02\n1.12490735525772462e-01\n1.07238723736867825e-01\n7.28465104055185941e-02\n1.50881532213672544e-02\n-5.16635397809897395e-02\n-1.07167796125089559e-01\n-1.31169766964550322e-01\n-1.11066246592844572e-01\n-4.86939191019020584e-02\n3.71086779379747947e-02\n1.14736619865267023e-01\n1.50952601028553013e-01\n1.25498326761554119e-01\n4.28021804204079398e-02\n-6.59718528545699678e-02\n-1.53830500108233459e-01\n-1.78607718039406616e-01\n-1.23810144145513029e-01\n-8.13653341627201647e-03\n1.22867856886228435e-01\n2.19448005754744185e-01\n2.51855656500579672e-01\n2.22007800951986106e-01\n1.56666478380730834e-01\n8.85794969487318229e-02\n3.91595277483700807e-02\n1.28233363736733989e-02\n2.78490945648648134e-03\n3.02436872749175178e-04\n1.33471815599307368e-02\n2.31179965996464593e-02\n2.98255528773458539e-02\n3.51970579526188765e-02\n3.96462500453165709e-02\n4.32493830792454736e-02\n4.59166832404873312e-02\n4.74475141657942287e-02\n4.75590701261216914e-02\n4.59121685551041811e-02\n4.21437331236189025e-02\n3.59111980360273322e-02\n2.69516419848725257e-02\n1.51558843413366080e-02\n6.54258572131107691e-04\n-1.60939681676494049e-02\n-3.42214065461970834e-02\n-5.24037592208870875e-02\n-6.88670270563625231e-02\n-8.14787577164704652e-02\n-8.79481534781628577e-02\n-8.61479500513704366e-02\n-7.45480407063650874e-02\n-5.27164399019401722e-02\n-2.18005711737617493e-02\n1.51405519294425042e-02\n5.31105527345960282e-02\n8.56078891240478201e-02\n1.05608734138042726e-01\n1.07069203603151072e-01\n8.67323477285185385e-02\n4.58174127632548708e-02\n-8.99590497225147973e-03\n-6.59042733187171770e-02\n-1.10056519118689328e-01\n-1.27318164611631285e-01\n-1.08994696516732784e-01\n-5.60881693867875675e-02\n1.87314845355801077e-02\n9.30071128829424443e-02\n1.40703661722282047e-01\n1.41450333784322535e-01\n8.96758425733343856e-02\n-4.67246712891594977e-04\n-9.76902673461859661e-02\n-1.64164300336307356e-01\n-1.70692684067017875e-01\n-1.09900430256367698e-01\n-6.64176950428162216e-04\n1.19372557423008993e-01\n2.10237085182545858e-01\n2.46833116530901175e-01\n2.27941509271036874e-01\n1.72761006995907240e-01\n1.08201805537873980e-01\n5.52988178648802509e-02\n2.23598421470019293e-02\n6.75211215620104190e-03\n1.36037171018142515e-03\n1.37676545902193554e-04\n0.0\n3.37533201324683807e-04\n1.30726046752257575e-03\n3.09197691352982099e-03\n5.83381699231564233e-03\n9.63996265019376880e-03\n1.45762975295112146e-02\n2.06534584534277844e-02\n2.78070682332805345e-02\n3.58737856590153198e-02\n4.45655486289028568e-02\n5.34456317173131468e-02\n6.19117070202334849e-02\n6.91927609170731595e-02\n7.43681199768334439e-02\n7.64174402784467133e-02\n7.43096020800190354e-02\n6.71351980515495494e-02\n5.42809223006912728e-02\n3.56341890544263629e-02\n1.17929731851095509e-02\n-1.57594111822107336e-02\n-4.45690586102961833e-02\n-7.12784484504115912e-02\n-9.19043003783425877e-02\n-1.02361935038197321e-01\n-9.92249326957936606e-02\n-8.06384540295945196e-02\n-4.72194082964184428e-02\n-2.69691663308520724e-03\n4.59963801189050628e-02\n8.94402981814316905e-02\n1.17371425648679140e-01\n1.21126080468715619e-01\n9.64227925682618475e-02\n4.57069801934640099e-02\n-2.08889249354365855e-02\n-8.67885620854250001e-02\n-1.32717923669100846e-01\n-1.42388295345333898e-01\n-1.08569552914501516e-01\n-3.73233994105552705e-02\n5.17678860419441972e-02\n1.30454943238600962e-01\n1.70885784371043237e-01\n1.55895110912867146e-01\n8.63106635882938539e-02\n-1.83334981877043002e-02\n-1.26705560377550569e-01\n-2.07646862052233455e-01\n-2.41903485532393187e-01\n-2.28170201423525759e-01\n-1.80872394146934873e-01\n-1.21520562051652042e-01\n-6.87386288276655572e-02\n-3.21140223293415600e-02\n-1.19705873954779676e-02\n-3.35298350080703595e-03\n-6.29546912280564601e-04\n-5.95931065433678275e-05\n1.40392012554774407e-02\n2.43166098721716989e-02\n3.13750946622036730e-02\n3.70406227119834605e-02\n4.17653000944287131e-02\n4.56550863879561231e-02\n4.86505128503498183e-02\n5.05838985525973797e-02\n5.12069303030894540e-02\n5.02126676105568298e-02\n4.72613224347978311e-02\n4.20147669231552418e-02\n3.41826614646478649e-02\n2.35812709260392328e-02\n1.02036876651757126e-02\n-5.70301501681897208e-03\n-2.35622596022506403e-02\n-4.24073380217676738e-02\n-6.08536065192109427e-02\n-7.71248785358787659e-02\n-8.91559884113038159e-02\n-9.47892303481725207e-02\n-9.20712474143490084e-02\n-7.96376191217707530e-02\n-5.71451256223381998e-02\n-2.56793606363403155e-02\n1.19655047574465222e-02\n5.12571624340291965e-02\n8.62625820495861589e-02\n1.10425999145328829e-01\n1.17772675257112047e-01\n1.04394057820395333e-01\n6.99211246574973494e-02\n1.85669868990485411e-02\n-4.07245183760969048e-02\n-9.53915206433037649e-02\n-1.31724824750041380e-01\n-1.38368995767308434e-01\n-1.10045994581973866e-01\n-5.03301801473680296e-02\n2.77384091580471781e-02\n1.03983673195097368e-01\n1.56244799882481300e-01\n1.67088182994380829e-01\n1.29885963236958668e-01\n5.18505964221298646e-02\n-4.75680209879624782e-02\n-1.42792278154456470e-01\n-2.10627650907825176e-01\n-2.37810912434985283e-01\n-2.24477944138936542e-01\n-1.82253726167042246e-01\n-1.28213053535226384e-01\n-7.78427713793269638e-02\n-4.02662074754917901e-02\n-1.73473596075234167e-02\n-5.99967780360652521e-03\n-1.56661124959216907e-03\n-2.75218778089168922e-04\n-2.44482676562014869e-05\n0.0\n3.25491710371912841e-04\n1.26062397359898637e-03\n2.98192361630123057e-03\n5.62770319815764433e-03\n9.30492736424353047e-03\n1.40851528937575108e-02\n1.99938283809465746e-02\n2.69945280253302070e-02\n3.49693370409820403e-02\n4.36970206346246476e-02\n5.28314327655150101e-02\n6.18837171867926972e-02\n7.02130881555251135e-02\n7.70321486726999877e-02\n8.14335013765091209e-02\n8.24444040059599120e-02\n7.91148906050493650e-02\n7.06415595794876866e-02\n5.65236513444582478e-02\n3.67399242757431022e-02\n1.19245645806424928e-02\n-1.64908482800850444e-02\n-4.62121607591545122e-02\n-7.41421785415136148e-02\n-9.66089060073465344e-02\n-1.09789230395674578e-01\n-1.10321296924411713e-01\n-9.60494510219040559e-02\n-6.67860886329538217e-02\n-2.49176057054726896e-02\n2.43538885299828499e-02\n7.33323342127274180e-02\n1.12838160268602841e-01\n1.33885554403594897e-01\n1.29799396347976853e-01\n9.83258712850314798e-02\n4.31315732687681322e-02\n-2.59279946951852733e-02\n-9.41907747299201431e-02\n-1.45220453533076999e-01\n-1.64925624388282899e-01\n-1.45676637884516180e-01\n-8.90721910396830574e-02\n-6.21140450648801495e-03\n8.49600252038161530e-02\n1.64620911159581884e-01\n2.16781983064118944e-01\n2.33709467228675194e-01\n2.17438961392994790e-01\n1.77906321224706204e-01\n1.28640872474277190e-01\n8.19509797695768399e-02\n4.55634433167446812e-02\n2.17561580840922170e-02\n8.70371793087094253e-03\n2.80817310447171358e-03\n6.86528185400123907e-04\n1.13252132139769564e-04\n9.46945915224525562e-06\n1.49009524287132926e-02\n2.58092066876982815e-02\n3.33043671757199261e-02\n3.93344356396859648e-02\n4.43975665051726115e-02\n4.86341365603573314e-02\n5.20191136858695682e-02\n5.44222538812901835e-02\n5.56352023427331144e-02\n5.53903563418425698e-02\n5.33806905855729943e-02\n4.92851848507521659e-02\n4.28026396336128948e-02\n3.36953765796250554e-02\n2.18428606248927369e-02\n7.30333252556537599e-03\n-9.62101747106283885e-03\n-2.83229197268205085e-02\n-4.78439324445093794e-02\n-6.68575480148131951e-02\n-8.36977529423826305e-02\n-9.64491906941820076e-02\n-1.03111481648237094e-01\n-1.01841954230158044e-01\n-9.12673034223357160e-02\n-7.08358080899527814e-02\n-4.11596161823970311e-02\n-4.27524816167637253e-03\n3.62639418971903299e-02\n7.55493123881739309e-02\n1.07795697995702947e-01\n1.27150277191796307e-01\n1.28767437823826353e-01\n1.09992047819755454e-01\n7.14046831131584098e-02\n1.74285917370172877e-02\n-4.37871691064770224e-02\n-1.01386045645672163e-01\n-1.43698073630169426e-01\n-1.60718359608549632e-01\n-1.46621665155470260e-01\n-1.01613550150508422e-01\n-3.24647709809016555e-02\n4.86367329862210235e-02\n1.26795797585613490e-01\n1.88018833385607070e-01\n2.22667105629250239e-01\n2.27654079178755964e-01\n2.06665114591882249e-01\n1.68376670566837583e-01\n1.23395057739807690e-01\n8.10874402146002926e-02\n4.74200610956460045e-02\n2.43804888229634392e-02\n1.08253361884334334e-02\n4.04467865188463428e-03\n1.22301139381116313e-03\n2.81007461014477734e-04\n4.36684994727020719e-05\n3.44627100564311199e-06\n0.0\n3.10314871103396024e-04\n1.20184432786395396e-03\n2.84312974753933578e-03\n5.36724683218819509e-03\n8.87967522253584572e-03\n1.34564365051470219e-02\n1.91365994975237347e-02\n2.59105542450656229e-02\n3.37049436110741230e-02\n4.23652933780896204e-02\n5.16378544023171071e-02\n6.11528531027404829e-02\n7.04121636775729420e-02\n7.87852658913422432e-02\n8.55180824578569559e-02\n8.97596801321452475e-02\n9.06115825484712367e-02\n8.72032477884034929e-02\n7.87947769698692929e-02\n6.49038904160748886e-02\n4.54485823285945695e-02\n2.08899344871257345e-02\n-7.64788034960188316e-03\n-3.83099530321045212e-02\n-6.85286001110173293e-02\n-9.51585611448596547e-02\n-1.14751649812138923e-01\n-1.23974114474949201e-01\n-1.20141333876549961e-01\n-1.01808742062592661e-01\n-6.93210557219283985e-02\n-2.51934787654959635e-02\n2.58095611398609058e-02\n7.70089276994815747e-02\n1.20606873449763355e-01\n1.48894090733657086e-01\n1.55697064104028116e-01\n1.37783321673640158e-01\n9.58774360463429259e-02\n3.49603647065008447e-02\n-3.63500690548898484e-02\n-1.07319747263652232e-01\n-1.67237470283029238e-01\n-2.07664216881143476e-01\n-2.24187420951844768e-01\n-2.17170739758578313e-01\n-1.91274082997351713e-01\n-1.53907937727322697e-01\n-1.13136818292681338e-01\n-7.57131156958315010e-02\n-4.58275923878724914e-02\n-2.48453243600156928e-02\n-1.19016933297960911e-02\n-4.94331281945157262e-03\n-1.73328156914474341e-03\n-4.93143798454850554e-04\n-1.06850249892009668e-04\n-1.56871449047462703e-05\n-1.17144532253526743e-06\n1.60376255098053089e-02\n2.77779822157455114e-02\n3.58486281307360960e-02\n4.23570692603827334e-02\n4.78595222877801069e-02\n5.25377437418462004e-02\n5.64068579652947516e-02\n5.93799488611784498e-02\n6.12955690667473380e-02\n6.19343106578979369e-02\n6.10336598311880044e-02\n5.83054819582781575e-02\n5.34586819103713973e-02\n4.62286198419852856e-02\n3.64140076179010411e-02\n2.39209670276193768e-02\n8.81255942739648558e-03\n-8.63964328209937578e-03\n-2.79074264922041793e-02\n-4.81689008464024904e-02\n-6.82922180310852056e-02\n-8.68509885977086366e-02\n-1.02182354993751640e-01\n-1.12496658597610349e-01\n-1.16042955170774578e-01\n-1.11326868795908668e-01\n-9.73665231575453205e-02\n-7.39594233083158692e-02\n-4.19200543056746089e-02\n-3.23754885931295611e-03\n3.89011828276296170e-02\n8.02710103990762758e-02\n1.15979011734680240e-01\n1.41039660915875442e-01\n1.51102918050408513e-01\n1.43233695946361261e-01\n1.16599600114220048e-01\n7.29049718841331684e-02\n1.64265785637490204e-02\n-4.64330668731452526e-02\n-1.08059167224472397e-01\n-1.60869573134905408e-01\n-1.98647872991572688e-01\n-2.17662406375364048e-01\n-2.17289383907588979e-01\n-1.99967046365419843e-01\n-1.70482991720400823e-01\n-1.34786888534555505e-01\n-9.86596986352423488e-02\n-6.66034223505916345e-02\n-4.12248259593158417e-02\n-2.32054165452498656e-02\n-1.17508116981664950e-02\n-5.27617619311946187e-03\n-2.06002131364894144e-03\n-6.80632075964305292e-04\n-1.82846982931436918e-04\n-3.74721495902401275e-05\n-5.21115794079057277e-06\n-3.69076719659301253e-07\n0.0\n2.90462654948630877e-04\n1.12495702531123878e-03\n2.66147611059404767e-03\n5.02573729259782678e-03\n8.31981079480385854e-03\n1.26222997532913980e-02\n1.79839393018172769e-02\n2.44198724968171209e-02\n3.18992523747864618e-02\n4.03327787463098331e-02\n4.95589799640630893e-02\n5.93303984411722649e-02\n6.93012890706916351e-02\n7.90189480022384927e-02\n8.79212933293675586e-02\n9.53437287503609704e-02\n1.00538513257124568e-01\n1.02709681275150233e-01\n1.01065836828903050e-01\n9.48917162130348407e-02\n8.36371545042392528e-02\n6.70189776861630365e-02\n4.51275108653579268e-02\n1.85252055854546634e-02\n-1.16790214365792098e-02\n-4.37988706969964503e-02\n-7.56027159269228866e-02\n-1.04425135058304266e-01\n-1.27366954026115559e-01\n-1.41580616630266581e-01\n-1.44621354696312848e-01\n-1.34826156172018041e-01\n-1.11665333331545616e-01\n-7.60001641867790872e-02\n-3.01795803946903196e-02\n2.20767645853645542e-02\n7.60310341729698302e-02\n1.26493001447157832e-01\n1.68526337065407039e-01\n1.98178120183470141e-01\n2.13089613873901240e-01\n2.12853323269860811e-01\n1.99024925166688044e-01\n1.74773013682408329e-01\n1.44237354854180849e-01\n1.11742094642281728e-01\n8.10486374112054098e-02\n5.48180642698356119e-02\n3.43870809115433551e-02\n1.98659426528676117e-02\n1.04753050731935353e-02\n4.98395839640067458e-03\n2.10787894189217156e-03\n7.76856654344704753e-04\n2.42723611534645948e-04\n6.17581601668656379e-05\n1.20034450641250671e-05\n1.58499427938943797e-06\n1.06695102818247687e-07\n1.76848151292757459e-02\n3.06309983263683555e-02\n3.95347605622006562e-02\n4.67323064348544592e-02\n5.28595106540400289e-02\n5.81513178380499915e-02\n6.26719957995411636e-02\n6.63865812046005449e-02\n6.91901829064696244e-02\n7.09234566850101972e-02\n7.13838186232839955e-02\n7.03365639597165609e-02\n6.75281488438174982e-02\n6.27030522491640319e-02\n5.56251117965331221e-02\n4.61037343937916524e-02\n3.40247911106233702e-02\n1.93852542416957235e-02\n2.32970673837137139e-03\n-1.68142214249706844e-02\n-3.75055777196807300e-02\n-5.89701267990401373e-02\n-8.01966436139703726e-02\n-9.99556337399013090e-02\n-1.16846043989218010e-01\n-1.29373783063719272e-01\n-1.36062792215266348e-01\n-1.35594957707462882e-01\n-1.26969578056467247e-01\n-1.09666980137556463e-01\n-8.37951989133502856e-02\n-5.01947159453223768e-02\n-1.04755852742653890e-02\n3.30347739467042600e-02\n7.74454515339803445e-02\n1.19555283080755109e-01\n1.56184824738867245e-01\n1.84547510158262096e-01\n2.02605180197489687e-01\n2.09346299298051042e-01\n2.04930519968159974e-01\n1.90662357729451087e-01\n1.68787593780194090e-01\n1.42142710698240443e-01\n1.13721228869066687e-01\n8.62415110732215329e-02\n6.18010980621867267e-02\n4.16810301691310642e-02\n2.63250369553168495e-02\n1.54741960723477137e-02\n8.40147193709682265e-03\n4.17365718066692055e-03\n1.87474598433696798e-03\n7.49925781453609748e-04\n2.61817963899606525e-04\n7.75978182465581249e-05\n1.87511853672040902e-05\n3.46489926372484848e-06\n4.35371558121960145e-07\n2.79108141707254904e-08\n0.0\n2.62616125118846837e-04\n1.01710787903081705e-03\n2.40653680184212734e-03\n4.54563060483033094e-03\n7.52974705119679316e-03\n1.14368144760206344e-02\n1.63257912635382078e-02\n2.22327704498296586e-02\n2.91652208048037639e-02\n3.70946985959936942e-02\n4.59483855889609646e-02\n5.55999228490407296e-02\n6.58601845811691011e-02\n7.64688526100223143e-02\n8.70878903830982209e-02\n9.72982488150644365e-02\n1.06601327947615079e-01\n1.14426820016009512e-01\n1.20148512685174069e-01\n1.23109371617856678e-01\n1.22656686983728919e-01\n1.18187211400052797e-01\n1.09201020694492015e-01\n9.53613281139824021e-02\n7.65557818116808647e-02\n5.29530645487150120e-02\n2.50471726411870856e-02\n-6.31906805488772084e-03\n-3.99594994961822922e-02\n-7.43858353526299920e-02\n-1.07888117351574678e-01\n-1.38653246953685222e-01\n-1.64914471401328533e-01\n-1.85118292581021443e-01\n-1.98089521114323458e-01\n-2.03171489450396869e-01\n-2.00318119105254100e-01\n-1.90118577911413955e-01\n-1.73743856561914878e-01\n-1.52816851406738397e-01\n-1.29221411188841256e-01\n-1.04878333981920535e-01\n-8.15242598992397816e-02\n-6.05302035302797414e-02\n-4.27890895066617982e-02\n-2.86872762889508297e-02\n-1.81570440216608057e-02\n-1.07901276774544901e-02\n-5.98126893533822406e-03\n-3.06841364398482367e-03\n-1.44273192580832805e-03\n-6.14281675389216283e-04\n-2.33221277401563317e-04\n-7.73706208921100236e-05\n-2.18120851114714092e-05\n-5.01812077609157723e-06\n-8.83520457267705057e-07\n-1.05854321961576646e-07\n-6.47465325671941101e-09\n2.05533144487835898e-02\n3.55993848892326853e-02\n4.59523126146779912e-02\n5.43417130480020466e-02\n6.15332597229804740e-02\n6.78409427375097768e-02\n7.33961856300990173e-02\n7.82316724100400041e-02\n8.23151938884792989e-02\n8.55660300493726184e-02\n8.78645091873568457e-02\n8.90590514478219464e-02\n8.89727792883861918e-02\n8.74108704206997683e-02\n8.41693941797232725e-02\n7.90461072356935662e-02\n7.18534640311285500e-02\n6.24338630498851230e-02\n5.06768738073538824e-02\n3.65378610173382606e-02\n2.00570464453940084e-02\n1.37764572079787867e-03\n-1.92386760004441305e-02\n-4.14011144882925688e-02\n-6.45860818398515946e-02\n-8.81428635851198850e-02\n-1.11310514836271898e-01\n-1.33247249385301858e-01\n-1.53072495913807394e-01\n-1.69920343477999558e-01\n-1.83001374690938107e-01\n-1.91668078916716222e-01\n-1.95477425090256340e-01\n-1.94243092609612783e-01\n-1.88069659878755013e-01\n-1.77362022882223247e-01\n-1.62805599716722149e-01\n-1.45316374874947779e-01\n-1.25964162276532621e-01\n-1.05876944707969517e-01\n-8.61379033713857434e-02\n-6.76888760617659624e-02\n-5.12537663996345538e-02\n-3.72925974346645442e-02\n-2.59917952862336876e-02\n-1.72898646913194100e-02\n-1.09312947964775239e-02\n-6.53682511276684405e-03\n-3.67627336247626675e-03\n-1.93140236620105606e-03\n-9.40286853024263885e-04\n-4.20056097546379697e-04\n-1.70105937077466118e-04\n-6.14834933654393031e-05\n-1.94344106356292230e-05\n-5.22428013198548824e-06\n-1.14683145882384240e-06\n-1.92783013708939717e-07\n-2.20643251641248255e-08\n-1.28984833785285243e-09\n0.0\n2.16715225109692417e-04\n8.39334457719430132e-04\n1.98609519266220412e-03\n3.75256489841648217e-03\n6.22001524588829385e-03\n9.45852310100337747e-03\n1.35277746912373167e-02\n1.84765261012832353e-02\n2.43411079433402781e-02\n3.11431744935036364e-02\n3.88868375717833573e-02\n4.75553204246471906e-02\n5.71072913400668195e-02\n6.74730797558340950e-02\n7.85510328124684049e-02\n9.02043320098622481e-02\n1.02258651278342452e-01\n1.14501091040584854e-01\n1.26680857332827329e-01\n1.38512158506316818e-01\n1.49679751035903974e-01\n1.59847467363653239e-01\n1.68669891694505691e-01\n1.75807108562748282e-01\n1.80942136515088559e-01\n1.83800289829948532e-01\n1.84169313662295081e-01\n1.81918756867558318e-01\n1.77016740856503513e-01\n1.69542120530122215e-01\n1.59690083586214476e-01\n1.47769553844557894e-01\n1.34191381133945770e-01\n1.19447199034386942e-01\n1.04079940275317862e-01\n8.86481854739164937e-02\n7.36876005352868763e-02\n5.96734812819759222e-02\n4.69886736858525708e-02\n3.59007393893865656e-02\n2.65511633662588245e-02\n1.89577688169660294e-02\n1.30295710788604115e-02\n8.59142873463954529e-03\n5.41442524510376850e-03\n3.24725601337929812e-03\n1.84415577741233187e-03\n9.86008721032424979e-04\n4.92951059766111484e-04\n2.28575043020170826e-04\n9.73328183518539696e-05\n3.75985366358992797e-05\n1.29717214175169958e-05\n3.91616139624731077e-06\n1.00601519678960395e-06\n2.11146132183736408e-07\n3.39510738659104306e-08\n3.71837148788436903e-09\n2.08082581082203636e-10\n2.92518396288106788e-02\n5.06656724519568280e-02\n6.54073280467383639e-02\n7.73825989279653403e-02\n8.77198233978260522e-02\n9.69253123867545169e-02\n1.05268909189256923e-01\n1.12905228896570911e-01\n1.19923025880886658e-01\n1.26368753599500672e-01\n1.32259174463800588e-01\n1.37588807012270137e-01\n1.42334793970793239e-01\n1.46460476466283962e-01\n1.49918374613170480e-01\n1.52652985375680894e-01\n1.54603650575249163e-01\n1.55707649898443351e-01\n1.55903602354841575e-01\n1.55135198286171727e-01\n1.53355224549518526e-01\n1.50529784497619584e-01\n1.46642551769794460e-01\n1.41698835277620866e-01\n1.35729177066736734e-01\n1.28792161929367627e-01\n1.20976096171613035e-01\n1.12399221811649463e-01\n1.03208179948302822e-01\n9.35745288659216717e-02\n8.36892599593307557e-02\n7.37554327263404974e-02\n6.39792559985785381e-02\n5.45601550562449245e-02\n4.56805548027453615e-02\n3.74962449164436412e-02\n3.01282415741804498e-02\n2.36569967284693955e-02\n1.81196188624785717e-02\n1.35104675487567188e-02\n9.78510001872329692e-03\n6.86713481216602670e-03\n4.65722309727012798e-03\n3.04305170737761196e-03\n1.90919851439187087e-03\n1.14574652448483794e-03\n6.54825249663380186e-04\n3.54634326095282768e-04\n1.80934008463618938e-04\n8.63700005653317320e-05\n3.82607287234502043e-05\n1.55731948012043064e-05\n5.75301864976581266e-06\n1.89900322527117982e-06\n5.48748972340011853e-07\n1.34980184364126852e-07\n2.71365219965143534e-08\n4.18089970210399160e-09\n4.38874662285997718e-10\n2.35455209956840638e-11\n"
  },
  {
    "path": "src/madness/mra/commandlineparser.h",
    "content": "//\n// Created by Florian Bischoff on 2/10/21.\n//\n\n#ifndef MADNESS_COMMANDLINEPARSER_H\n#define MADNESS_COMMANDLINEPARSER_H\n\n#include<map>\n#include<algorithm>\nnamespace madness {\n/// very simple command line parser\n\n/// parser reads out key/value pairs from the command line of the from  --key=val or --key\n/// currently no error handling, feel free to add.\nstruct commandlineparser {\n\n    std::map<std::string, std::string> keyval;\n\n    commandlineparser() {\n        set_defaults();\n    }\n\n    // parse command line arguments\n    // mp2 --mp2='maxiter 10; freeze 1' --dft:maxiter=20 --Xmpi:debug=true\n    commandlineparser(int argc, char **argv) {\n        set_defaults();\n        std::vector<std::string> allArgs_raw(argv, argv + argc);\n        allArgs_raw.erase(allArgs_raw.begin());     // first argument is the name of the binary\n        for (auto &a : allArgs_raw) {\n            // special treatment for the input file: no hyphens\n            a=check_for_input_file(a);\n            a= remove_first_equal(remove_front_hyphens(a));\n            std::replace_copy(a.begin(), a.end(), a.begin(), '=', ' ');\n            std::string key, val;\n            std::stringstream sa(a);\n            sa >> key;\n            val=a.substr(key.size());\n            if (key==\"input\") set_keyval(\"user_defined_input_file\",\"1\");\n\n            // special treatment for file names: keep captal/lower case\n            if (key==\"file\") set_keyval_keep_case(key,val);\n            else set_keyval(key,val);\n        }\n    }\n\n    /// set default values from the command line\n    void set_defaults() {\n        keyval[\"input\"]=\"input\";\n//        keyval[\"geometry\"]=\"input_file\";\n    }\n\n    void print_map() const {\n        for (auto&[key, val] : keyval) {\n            printf(\"%20s %20s \\n\", key.c_str(), val.c_str());\n        }\n    }\n\n    bool key_exists(std::string key) const {\n        return (keyval.count(tolower(key))==1);\n    }\n\n    std::string value(const std::string key) const {\n        std::string msg= \"key not found: \" + key;\n        MADNESS_CHECK_THROW(key_exists(key), msg.c_str());\n        return keyval.find(tolower(key))->second;\n    }\n\n    void set_keyval(const std::string key, const std::string value) {\n        keyval[tolower(key)]= trim_blanks(tolower(value));\n    }\n\n    void set_keyval_keep_case(const std::string key, const std::string value) {\n        keyval[tolower(key)]= trim_blanks(value);\n    }\n\npublic:\n\n    /// special option: the input file has no hyphens in front and is just a value\n    std::string check_for_input_file(std::string line) {\n        if (line[0]=='-') return line;\n        auto words=split(line,\"=\");\n        if (words.size()==1) line=\"input=\"+line;\n        return line;\n    }\n    /// make lower case\n    static std::string tolower(std::string s) {\n        std::transform(s.begin(), s.end(), s.begin(), [](unsigned char c){ return std::tolower(c); });\n        return s;\n    }\n\n    /// split a string s into a vector of strings, using delimiter\n\n    /// @param[in]  s   the string (pass by value!)\n    static std::vector<std::string> split(std::string s, const std::string delimiter) {\n        std::size_t pos = 0;\n        std::string token;\n        std::vector<std::string> result;\n        while ((pos = s.find(delimiter)) != std::string::npos) {\n            token = s.substr(0, pos);\n            result.push_back(token);\n            s.erase(0, pos + delimiter.length());\n        }\n        result.push_back(s);\n        return result;\n    }\n\n    static std::string remove_front_hyphens(const std::string arg) {\n        std::size_t first=arg.find_first_not_of('-');\n        return arg.substr(first);\n    }\n\n    static std::string remove_first_equal(const std::string arg) {\n        std::string result=arg;\n        const std::string item=\"=\";\n        const std::string blank=\" \";\n        auto it=std::find_first_of(result.begin(),result.end(),item.begin(),item.end());\n        std::replace(it,it+1,item.front(),blank.front());\n        return result;\n    }\n\n    /// remove all blanks\n    static std::string remove_blanks(const std::string arg) {\n        std::string str2 = arg;\n        str2.erase(std::remove_if(str2.begin(), str2.end(),\n                                  [](unsigned char x){return std::isspace(x);}),str2.end());\n        return str2;\n    }\n\n    /// remove blanks at the beginning and the end only\n    static std::string trim_blanks(const std::string arg) {\n        if (arg.size()==0) return arg;\n        std::size_t first=arg.find_first_not_of(' ');\n        std::size_t last=arg.find_last_not_of(' ');\n        return arg.substr(first,last-first+1);\n    }\n\n    static std::string base_name(std::string const & path, std::string const & delims = \"/\")\n    {\n        return path.substr(path.find_last_of(delims) + 1);\n    }\n\n    static std::string remove_extension(std::string const & filename)\n    {\n        std::size_t p=filename.find_last_of('.');\n        return p > 0 && p != std::string::npos ? filename.substr(0, p) : filename;\n    }\n\n};\n}\n#endif //MADNESS_COMMANDLINEPARSER_H\n"
  },
  {
    "path": "src/madness/mra/convolution1d.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MRA_CONVOLUTION1D_H__INCLUDED\n#define MADNESS_MRA_CONVOLUTION1D_H__INCLUDED\n\n#include <madness/world/vector.h>\n#include <madness/constants.h>\n#include <limits.h>\n#include <madness/tensor/tensor.h>\n#include <madness/mra/simplecache.h>\n#include <madness/mra/adquad.h>\n#include <madness/mra/twoscale.h>\n#include <madness/mra/funcdefaults.h>\n#include <madness/tensor/aligned.h>\n#include <madness/tensor/tensor_lapack.h>\n#include <madness/misc/kahan_accumulator.h>\n#include <algorithm>\n\n/// \\file mra/convolution1d.h\n/// \\brief Computes most matrix elements over 1D operators (including Gaussians)\n\n/// \\ingroup function\n\nnamespace madness {\n\n    void aligned_add(long n, double* MADNESS_RESTRICT a, const double* MADNESS_RESTRICT b);\n    void aligned_sub(long n, double* MADNESS_RESTRICT a, const double* MADNESS_RESTRICT b);\n    void aligned_add(long n, double_complex* MADNESS_RESTRICT a, const double_complex* MADNESS_RESTRICT b);\n    void aligned_sub(long n, double_complex* MADNESS_RESTRICT a, const double_complex* MADNESS_RESTRICT b);\n\n    template <typename T>\n    static void copy_2d_patch(T* MADNESS_RESTRICT out, long ldout, const T* MADNESS_RESTRICT in, long ldin, long n, long m) {\n        for (long i=0; i<n; ++i, out+=ldout, in+=ldin) {\n            for (long j=0; j<m; ++j) {\n                out[j] = in[j];\n            }\n        }\n    }\n\n    /// a(n,m) --> b(m,n) ... optimized for smallish matrices\n    template <typename T>\n    inline void fast_transpose(long n, long m, const T* a, T* MADNESS_RESTRICT b) {\n        // n will always be k or 2k (k=wavelet order) and m will be anywhere\n        // from 2^(NDIM-1) to (2k)^(NDIM-1).\n\n//                  for (long i=0; i<n; ++i)\n//                      for (long j=0; j<m; ++j)\n//                          b[j*n+i] = a[i*m+j];\n//                  return;\n\n        if (n==1 || m==1) {\n            long nm=n*m;\n            for (long i=0; i<nm; ++i) b[i] = a[i];\n            return;\n        }\n\n        long n4 = (n>>2)<<2;\n        long m4 = m<<2;\n        const T* a0 = a;\n        for (long i=0; i<n4; i+=4, a0+=m4) {\n            const T* a1 = a0+m;\n            const T* a2 = a1+m;\n            const T* a3 = a2+m;\n            T* MADNESS_RESTRICT bi = b+i;\n            for (long j=0; j<m; ++j, bi+=n) {\n                T tmp0 = a0[j];\n                T tmp1 = a1[j];\n                T tmp2 = a2[j];\n                T tmp3 = a3[j];\n\n                bi[0] = tmp0;\n                bi[1] = tmp1;\n                bi[2] = tmp2;\n                bi[3] = tmp3;\n            }\n        }\n\n        for (long i=n4; i<n; ++i)\n            for (long j=0; j<m; ++j)\n                b[j*n+i] = a[i*m+j];\n\n    }\n\n    // /// a(i,j) --> b(i,j) for i=0..n-1 and j=0..r-1 noting dimensions are a(n,m) and b(n,r).\n\n    // /// returns b\n    // template <typename T>\n    // inline T* shrink(long n, long m, long r, const T* a, T* MADNESS_RESTRICT b) {\n    //     T* result = b;\n    //     if (r == 0) {\n    //         ;\n    //     }\n    //     else if (r == 1) {\n    //         for (long i=0; i<n; ++i) {\n    //             b[i] = a[i];\n    //         }\n    //     }\n    //     else if (r == 2) {\n    //         for (long i=0; i<n; ++i, a+=m, b+=2) {\n    //             b[0] = a[0];\n    //             b[1] = a[1];\n    //         }\n    //     }\n    //     else if (r == 3) {\n    //         for (long i=0; i<n; ++i, a+=m, b+=3) {\n    //             b[0] = a[0];\n    //             b[1] = a[1];\n    //             b[2] = a[2];\n    //         }\n    //     }\n    //     else if (r == 4) {\n    //         for (long i=0; i<n; ++i, a+=m, b+=4) {\n    //             b[0] = a[0];\n    //             b[1] = a[1];\n    //             b[2] = a[2];\n    //             b[3] = a[3];\n    //         }\n    //     }\n    //     else {\n    //         for (long i=0; i<n; ++i, a+=m, b+=r) {\n    //             for (long j=0; j<r; j++) {\n    //                 b[j] = a[j];\n    //             }\n    //         }\n    //     }\n    //     return result;\n    // }\n\n    /// actual data for 1 dimension and for 1 term and for 1 displacement for a convolution operator\n    /// here we keep the transformation matrices\n\n    /// !!! Note that if Rnormf is zero then ***ALL*** of the tensors are empty\n    template <typename Q>\n    struct ConvolutionData1D {\n\n\n        Tensor<Q> R, T;                 ///< if NS: R=ns, T=T part of ns; if modified NS: T=\\uparrow r^(n-1)\n        Tensor<Q> RU, RVT, TU, TVT;     ///< SVD approximations to R and T\n        Tensor<typename Tensor<Q>::scalar_type> Rs, Ts;     ///< hold relative errors, NOT the singular values..\n\n        // norms for NS form\n        double Rnorm, Tnorm, Rnormf, Tnormf, NSnormf;\n\n        // norms for modified NS form\n        double N_up, N_diff, N_F;               ///< the norms according to Beylkin 2008, Eq. (21) ff\n\n\n        /// ctor for NS form\n        /// make the operator matrices r^n and \\uparrow r^(n-1)\n        /// @param[in]  R   operator matrix of the requested level;     NS: unfilter(r^(n+1)); modified NS: r^n\n        /// @param[in]  T   upsampled operator matrix from level n-1;   NS: r^n; modified NS: filter( r^(n-1) )\n        ConvolutionData1D(const Tensor<Q>& R, const Tensor<Q>& T) : R(R), T(T) {\n            Rnormf = R.normf();\n            // Making the approximations is expensive ... only do it for\n            // significant components\n            if (Rnormf > 1e-20) {\n                Tnormf = T.normf();\n                make_approx(T, TU, Ts, TVT, Tnorm);\n                make_approx(R, RU, Rs, RVT, Rnorm);\n                int k = T.dim(0);\n\n                Tensor<Q> NS = copy(R);\n                for (int i=0; i<k; ++i)\n                    for (int j=0; j<k; ++j)\n                        NS(i,j) = 0.0;\n                NSnormf = NS.normf();\n\n            }\n            else {\n                Rnorm = Tnorm = Rnormf = Tnormf = NSnormf = 0.0;\n                N_F = N_up = N_diff = 0.0;\n            }\n        }\n\n        /// ctor for modified NS form\n        /// make the operator matrices r^n and \\uparrow r^(n-1)\n        /// @param[in]  R   operator matrix of the requested level;     NS: unfilter(r^(n+1)); modified NS: r^n\n        /// @param[in]  T   upsampled operator matrix from level n-1;   NS: r^n; modified NS: filter( r^(n-1) )\n        /// @param[in]  modified    use (un) modified NS form\n        ConvolutionData1D(const Tensor<Q>& R, const Tensor<Q>& T, const bool modified) : R(R), T(T) {\n\n            // note that R can be small, but T still be large\n\n            Rnormf = R.normf();\n            Tnormf = T.normf();\n            // Making the approximations is expensive ... only do it for\n            // significant components\n            if (Rnormf > 1e-20) make_approx(R, RU, Rs, RVT, Rnorm);\n            if (Tnormf > 1e-20) make_approx(T, TU, Ts, TVT, Tnorm);\n\n            // norms for modified NS form: follow Beylkin, 2008, Eq. (21) ff\n            N_F=Rnormf;\n            N_up=Tnormf;\n            N_diff=(R-T).normf();\n        }\n\n\n\n        /// approximate the operator matrices using SVD, and abuse Rs to hold the error instead of\n        /// the singular values (seriously, who named this??)\n        void make_approx(const Tensor<Q>& R,\n                         Tensor<Q>& RU, Tensor<typename Tensor<Q>::scalar_type>& Rs, Tensor<Q>& RVT, double& norm) {\n            int n = R.dim(0);\n            svd(R, RU, Rs, RVT);\n            for (int i=0; i<n; ++i) {\n                for (int j=0; j<n; ++j) {\n                    RVT(i,j) *= Rs[i];\n                }\n            }\n            for (int i=n-1; i>1; --i) { // Form cumulative sum of norms\n                Rs[i-1] += Rs[i];\n            }\n\n            norm = Rs[0];\n            if (Rs[0]>0.0) { // Turn into relative errors\n                double rnorm = 1.0/norm;\n                for (int i=0; i<n; ++i) {\n                    Rs[i] *= rnorm;\n                }\n            }\n        }\n    };\n\n    /// Provides the common functionality/interface of all 1D convolutions\n\n    /// interface for 1 term and for 1 dimension;\n    /// the actual data are kept in ConvolutionData1D\n    /// Derived classes must implement rnlp, issmall, natural_level\n    template <typename Q>\n    class Convolution1D {\n    public:\n        typedef Q opT;  ///< The apply function uses this to infer resultT=opT*inputT\n        int k;          ///< Wavelet order\n        int npt;        ///< Number of quadrature points (is this used?)\n        int maxR;       ///< Number of lattice translations for sum\n        double bloch_k;  ///< k in exp(i k R) Bloch phase factor folded into lattice sum\n        KernelRange range;  ///< if range is nonnull, kernel range limited to to range (in simulation cell units), useful for finite-range convolutions with periodic functions\n        Tensor<double> quad_x;\n        Tensor<double> quad_w;\n        Tensor<double> c;\n        Tensor<double> hgT, hg;\n        Tensor<double> hgT2k;\n\n        mutable SimpleCache<Tensor<Q>, 1> rnlp_cache;\n        mutable SimpleCache<Tensor<Q>, 1> rnlij_cache;\n        mutable SimpleCache<ConvolutionData1D<Q>, 1> ns_cache;\n        mutable SimpleCache<ConvolutionData1D<Q>, 2> mod_ns_cache;\n\n        bool lattice_summed() const { return maxR != 0; }\n        bool range_restricted() const { return range.finite(); }\n\n        virtual ~Convolution1D() {};\n\n        Convolution1D(int k, int npt, int maxR,\n                      double bloch_k = 0.0,\n                      KernelRange rng = {})\n                : k(k)\n                , npt(npt)\n                , maxR(maxR)\n                , bloch_k(bloch_k)\n                , range(rng)\n                , quad_x(npt)\n                , quad_w(npt)\n        {\n            auto success = autoc(k,&c);\n            MADNESS_CHECK(success);\n\n            gauss_legendre(npt,0.0,1.0,quad_x.ptr(),quad_w.ptr());\n            success = two_scale_hg(k,&hg);\n            MADNESS_ASSERT(success);\n            hgT = transpose(hg);\n            success = two_scale_hg(2*k,&hgT2k);\n            MADNESS_ASSERT(success);\n            hgT2k = transpose(hgT2k);\n\n            // Cannot construct the coefficients here since the\n            // derived class is not yet constructed so cannot call\n            // (even indirectly) a virtual method\n        }\n\n        /// Compute the projection of the operator onto the double order polynomials\n        virtual Tensor<Q> rnlp(Level n, Translation lx) const = 0;\n\n        /// @return true if the block of [r^n_l]_ij is expected to be small\n        virtual bool issmall(Level n, Translation lx) const = 0;\n\n        /// @return true if the block of [r^n_l]_ij is expected to be small\n        /// @note unlike issmall(), this handles periodicity and range restriction\n        bool get_issmall(Level n, Translation lx) const {\n          // issmall modufulated by range restriction\n          auto is_small = [this,n](Translation l) {\n            if (!range_restricted())\n              return issmall(n, l);\n            else {\n              // [r^n_l]_ij = superposition of [r^n_l]_p and [r^n_l-1]_p\n              // so rnlij is out of the range only if both rnlp contributions are\n              const auto closest_l = l<=0 ? l : l-1;\n              return rnlp_is_zero(n, closest_l) || issmall(n, l);\n            }\n          };\n\n          // handle lattice summation, if needed\n          if (lattice_summed()) {\n            const Translation twon = Translation(1) << n;\n            for (int R = -maxR; R <= maxR; ++R) {\n              if (!is_small(R * twon + lx))\n                return false;\n            }\n            return true;\n          } else { // !lattice_summed\n            return is_small(lx);\n          }\n        }\n\n        /// @return true if `[r^n_l]` is zero due to range restriction\n        bool rnlp_is_zero(Level n, Translation l) const {\n          bool result = false;\n          if (range_restricted()) {\n            if (n == 0) {\n              // result = l > 0 || l < -1;\n              if (l >= 0)\n                result = Translation(range.iextent_x2()) <= 2*l;\n              else\n                result = Translation(range.iextent_x2()) <= 2*(-l-1);\n            } else { // n > 0\n              if (l >= 0)\n                result = (1 << (n - 1)) * Translation(range.iextent_x2()) <= l;\n              else\n                result = ((1 << (n - 1)) * Translation(range.iextent_x2())) <= (-l-1);\n            }\n          }\n          return result;\n        }\n\n        /// Returns the level for projection\n        virtual Level natural_level() const {return 13;}\n\n        /// Computes the transition matrix elements for the convolution for n,l\n\n        /// Returns the tensor\n        /// \\code\n        ///   r(i,j) = int(K(x-y) phi[n0](x) phi[nl](y), x=0..1, y=0..1)\n        /// \\endcode\n        /// This is computed from the matrix elements over the correlation\n        /// function which in turn are computed from the matrix elements\n        /// over the double order legendre polynomials.\n        /// \\note if `this->range_restricted()==true`, `θ(D/2 - |x-y|) K(x-y)` is used as the kernel\n        const Tensor<Q>& rnlij(Level n, Translation lx, bool do_transpose=false) const {\n            const Tensor<Q>* p=rnlij_cache.getptr(n,lx);\n            if (p) return *p;\n\n            // PROFILE_MEMBER_FUNC(Convolution1D); // Too fine grain for routine profiling\n\n            long twok = 2*k;\n            Tensor<Q> R(2*twok);\n            R(Slice(0,twok-1)) = get_rnlp(n,lx-1);\n            R(Slice(twok,2*twok-1)) = get_rnlp(n,lx);\n\n            R.scale(pow(0.5,0.5*n));\n            R = inner(c,R);\n            if (do_transpose) R = transpose(R);\n            rnlij_cache.set(n,lx,R);\n            return *rnlij_cache.getptr(n,lx);\n        };\n\n\n        /// Returns a pointer to the cached modified make_nonstandard form of the operator\n\n        /// @param[in]  op_key  holds the scale and the source and target translations\n        /// @return     a pointer to the cached modified make_nonstandard form of the operator\n        const ConvolutionData1D<Q>* mod_nonstandard(const Key<2>& op_key) const {\n\n            const Level& n=op_key.level();\n            const Translation& sx=op_key.translation()[0];      // source translation\n            const Translation& tx=op_key.translation()[1];      // target translation\n            const Translation  lx=tx-sx;                        // displacement\n            const Translation  s_off=sx%2;\n            const Translation  t_off=tx%2;\n\n            // we cache translation and source offset\n            const Key<2> cache_key(n, Vector<Translation,2>{lx, s_off} );\n            const ConvolutionData1D<Q>* p = mod_ns_cache.getptr(cache_key);\n            if (p) return p;\n\n            // for paranoid me\n            MADNESS_ASSERT(sx>=0 and tx>=0);\n\n\n            Tensor<Q> R, T, Rm;\n//            if (!get_issmall(n, lx)) {\n//                print(\"no issmall\", lx, source, n);\n\n                const Translation lx_half = tx/2 - sx/2;\n                const Slice s0(0,k-1), s1(k,2*k-1);\n//                print(\"sx, tx\",lx,lx_half,sx, tx,\"off\",s_off,t_off);\n\n                // this is the operator matrix in its actual level\n                R = rnlij(n,lx);\n\n                // this is the upsampled operator matrix\n                Rm = Tensor<Q>(2*k,2*k);\n                if (n>0) Rm(s0,s0)=rnlij(n-1,lx_half);\n                {\n                    // PROFILE_BLOCK(Convolution1D_nstran); // Too fine grain for routine profiling\n                    Rm = transform(Rm,hg);\n                }\n\n                {\n                    // PROFILE_BLOCK(Convolution1D_nscopy); // Too fine grain for routine profiling\n                    T=Tensor<Q>(k,k);\n                    if (t_off==0 and s_off==0) T=copy(Rm(s0,s0));\n                    if (t_off==0 and s_off==1) T=copy(Rm(s0,s1));\n                    if (t_off==1 and s_off==0) T=copy(Rm(s1,s0));\n                    if (t_off==1 and s_off==1) T=copy(Rm(s1,s1));\n//                    if (t_off==0 and s_off==0) T=copy(Rm(s0,s0));\n//                    if (t_off==1 and s_off==0) T=copy(Rm(s0,s1));\n//                    if (t_off==0 and s_off==1) T=copy(Rm(s1,s0));\n//                    if (t_off==1 and s_off==1) T=copy(Rm(s1,s1));\n                }\n\n                {\n                    // PROFILE_BLOCK(Convolution1D_trans); // Too fine grain for routine profiling\n\n                    Tensor<Q> RT(k,k), TT(k,k);\n                    fast_transpose(k,k,R.ptr(), RT.ptr());\n                    fast_transpose(k,k,T.ptr(), TT.ptr());\n                    R = RT;\n                    T = TT;\n                }\n\n//            }\n\n            mod_ns_cache.set(cache_key,ConvolutionData1D<Q>(R,T,true));\n            return mod_ns_cache.getptr(cache_key);\n        }\n\n        /// Returns a pointer to the cached make_nonstandard form of the operator\n        const ConvolutionData1D<Q>* nonstandard(Level n, Translation lx) const {\n            const ConvolutionData1D<Q>* p = ns_cache.getptr(n,lx);\n            if (p) return p;\n\n            // PROFILE_MEMBER_FUNC(Convolution1D); // Too fine grain for routine profiling\n\n            Tensor<Q> R, T;\n            if (!get_issmall(n, lx)) {\n                Translation lx2 = lx*2;\n#if 0 // UNUSED VARIABLES\n                Slice s0(0,k-1), s1(k,2*k-1);\n#endif\n                const Tensor<Q> r0 = rnlij(n+1,lx2);\n                const Tensor<Q> rp = rnlij(n+1,lx2+1);\n                const Tensor<Q> rm = rnlij(n+1,lx2-1);\n\n                R = Tensor<Q>(2*k,2*k);\n\n                // this does not match Eq 18 of the MRAQC appendix .. parity off??\n                // either rnlij dox swap bra/ket or hgT include extra parity phases\n//                 R(s0,s0) = r0;\n//                 R(s1,s1) = r0;\n//                 R(s1,s0) = rp;\n//                 R(s0,s1) = rm;\n\n                {\n                    // PROFILE_BLOCK(Convolution1D_nscopy); // Too fine grain for routine profiling\n                    copy_2d_patch(R.ptr(),           2*k, r0.ptr(), k, k, k);\n                    copy_2d_patch(R.ptr()+2*k*k + k, 2*k, r0.ptr(), k, k, k);\n                    copy_2d_patch(R.ptr()+2*k*k,     2*k, rp.ptr(), k, k, k);\n                    copy_2d_patch(R.ptr()       + k, 2*k, rm.ptr(), k, k, k);\n                }\n\n                //print(\"R \", n, lx, R.normf(), r0.normf(), rp.normf(), rm.normf());\n\n\n                {\n                    // PROFILE_BLOCK(Convolution1D_nstran); // Too fine grain for routine profiling\n                    R = transform(R,hgT);\n                }\n\n                //print(\"RX\", n, lx, R.normf(), r0.normf(), rp.normf(), rm.normf());\n\n                {\n                    // PROFILE_BLOCK(Convolution1D_trans); // Too fine grain for routine profiling\n\n                    Tensor<Q> RT(2*k,2*k);\n                    fast_transpose(2*k, 2*k, R.ptr(), RT.ptr());\n                    R = RT;\n\n                    //print(\"RT\", n, lx, R.normf(), r0.normf(), rp.normf(), rm.normf());\n\n                    //T = copy(R(s0,s0));\n                    T = Tensor<Q>(k,k);\n                    copy_2d_patch(T.ptr(), k, R.ptr(), 2*k, k, k);\n                }\n\n                //print(\"NS\", n, lx, R.normf(), T.normf());\n            }\n\n            ns_cache.set(n,lx,ConvolutionData1D<Q>(R,T));\n\n            return ns_cache.getptr(n,lx);\n        };\n\n        Q phase(double R) const {\n          if constexpr (std::is_arithmetic_v<Q>)\n            return 1;\n          else\n            return exp(Q(0.0,bloch_k*R));\n        }\n\n\n        const Tensor<Q>& get_rnlp(Level n, Translation lx) const {\n            const Tensor<Q>* p=rnlp_cache.getptr(n,lx);\n            if (p) return *p;\n\n            // PROFILE_MEMBER_FUNC(Convolution1D); // Too fine grain for routine profiling\n\n            long twok = 2*k;\n            Tensor<Q> r;\n\n            if (get_issmall(n, lx)) {\n                r = Tensor<Q>(twok);\n            }\n            else if (n < natural_level()) {\n                Tensor<Q>  R(2*twok);\n                R(Slice(0,twok-1)) = get_rnlp(n+1,2*lx);\n                R(Slice(twok,2*twok-1)) = get_rnlp(n+1,2*lx+1);\n\n                R = transform(R, hgT2k);\n                r = copy(R(Slice(0,twok-1)));\n            }\n            else {\n                // PROFILE_BLOCK(Convolution1Drnlp); // Too fine grain for routine profiling\n\n                if (lattice_summed()) {\n                    Translation twon = Translation(1)<<n;\n                    r = Tensor<Q>(2*k);\n                    for (int R=-maxR; R<=maxR; ++R) {\n                        r.gaxpy(1.0, rnlp(n,R*twon+lx), phase(R));\n                    }\n                }\n                else {\n                    r = rnlp(n, lx);\n                }\n            }\n\n            rnlp_cache.set(n, lx, r);\n            //print(\"   SET rnlp\", n, lx, r);\n            return *rnlp_cache.getptr(n,lx);\n        }\n    };\n\n    /// Array of 1D convolutions (one / dimension)\n\n    /// data for 1 term and all dimensions\n    template <typename Q, int NDIM>\n    class ConvolutionND {\n        std::array<std::shared_ptr<Convolution1D<Q> >, NDIM> ops;\n        Q fac;\n\n    public:\n        ConvolutionND() : fac(1.0) {}\n\n        ConvolutionND(const ConvolutionND& other) : fac(other.fac)\n        {\n          ops = other.ops;\n        }\n\n        ConvolutionND(std::shared_ptr<Convolution1D<Q> > op, Q fac=1.0) : fac(fac)\n        {\n            std::fill(ops.begin(), ops.end(), op);\n        }\n\n        void setop(int dim, const std::shared_ptr<Convolution1D<Q> >& op)  {\n            ops[dim] = op;\n        }\n\n        std::shared_ptr<Convolution1D<Q> > getop(int dim) const  {\n            return ops[dim];\n        }\n\n        void setfac(Q value) {\n            fac = value;\n        }\n\n        Q getfac() const {\n            return fac;\n        }\n\n        /// @return whether lattice sum is performed along each axis\n        array_of_bools<NDIM> lattice_summed() const {\n          array_of_bools<NDIM> result(false);\n          for (int d = 0; d != NDIM; ++d) {\n            MADNESS_ASSERT(ops[d]);\n            result[d] = ops[d]->lattice_summed();\n          }\n          return result;\n        }\n    };\n\n    // To test generic convolution by comparing with GaussianConvolution1D\n    template <typename Q>\n    class GaussianGenericFunctor {\n    private:\n        Q coeff;\n        double exponent;\n        int m;\n        Level natlev;\n\n    public:\n        // coeff * exp(-exponent*x^2) * x^m\n        GaussianGenericFunctor(Q coeff, double exponent, int m=0)\n            : coeff(coeff), exponent(exponent), m(m),\n              natlev(Level(0.5*log(exponent)/log(2.0)+1)) {}\n\n        Q operator()(double x) const {\n            Q ee = coeff*exp(-exponent*x*x);\n            for (int mm=0; mm<m; ++mm) ee *= x;\n            return ee;\n        }\n        Level natural_level() const {return natlev;}\n    };\n\n\n    /// Generic 1D convolution using brute force (i.e., slow) adaptive quadrature for rnlp\n\n    /// Calls op(x) with x in *simulation coordinates* to evaluate the function.\n    template <typename Q, typename opT>\n    class GenericConvolution1D : public Convolution1D<Q> {\n    private:\n        opT op;\n        long maxl;    ///< At natural level is l beyond which operator is zero\n    public:\n\n        GenericConvolution1D() {}\n\n        GenericConvolution1D(int k, const opT& op, int maxR, double bloch_k = 0.0)\n            : Convolution1D<Q>(k, 20, maxR, bloch_k), op(op), maxl(LONG_MAX-1) {\n            // PROFILE_MEMBER_FUNC(GenericConvolution1D); // Too fine grain for routine profiling\n\n            // For efficiency carefully compute outwards at the \"natural\" level\n            // until several successive boxes are determined to be zero.  This\n            // then defines the future range of the operator and also serves\n            // to precompute the values used in the rnlp cache.\n\n            Level natl = natural_level();\n            int nzero = 0;\n            for (Translation lx=0; lx<(1L<<natl); ++lx) {\n                const Tensor<Q>& rp = this->get_rnlp(natl, lx);\n                const Tensor<Q>& rm = this->get_rnlp(natl,-lx);\n                if (rp.normf()<1e-12 && rm.normf()<1e-12) ++nzero;\n                if (nzero == 3) {\n                    maxl = lx-2;\n                    break;\n                }\n            }\n        }\n\n        virtual Level natural_level() const final {return op.natural_level();}\n\n        struct Shmoo {\n            typedef Tensor<Q> returnT;\n            Level n;\n            Translation lx;\n            const GenericConvolution1D<Q,opT>& q;\n\n            Shmoo(Level n, Translation lx, const GenericConvolution1D<Q,opT>* q)\n                    : n(n), lx(lx), q(*q) {}\n\n            returnT operator()(double x) const {\n                int twok = q.k*2;\n                double fac = std::pow(0.5,n);\n                double phix[2*MAXK];\n                legendre_scaling_functions(x-lx,twok,phix);\n                Q f = q.op(fac*x)*sqrt(fac);\n                returnT v(twok);\n                for (long p=0; p<twok; ++p) v(p) += f*phix[p];\n                return v;\n            }\n        };\n\n        Tensor<Q> rnlp(Level n, Translation lx) const final {\n            return adq1(lx, lx+1, Shmoo(n, lx, this), 1e-12,\n                        this->npt, this->quad_x.ptr(), this->quad_w.ptr(), 0);\n        }\n\n        bool issmall(Level n, Translation lx) const final {\n            if (lx < 0) lx = 1 - lx;\n            // Always compute contributions to nearest neighbor coupling\n            // ... we are two levels below so 0,1 --> 0,1,2,3 --> 0,...,7\n            if (lx <= 7) return false;\n\n            n = natural_level()-n;\n            if (n >= 0) lx = lx << n;\n            else lx = lx >> n;\n\n            return lx >= maxl;\n        }\n    };\n\n\n    /// 1D convolution with (derivative) Gaussian; coeff and expnt given in *simulation* coordinates [0,1]\n\n    /// Note that the derivative is computed in *simulation* coordinates so\n    /// you must be careful to scale the coefficients correctly.\n    template <typename Q>\n    class GaussianConvolution1D : public Convolution1D<Q> {\n        // Returns range of Gaussian for periodic lattice sum in simulation coords\n        // N.B. for range-restricted kernels lattice summation range may or may not be limited by the kernel range\n        static int maxR(const LatticeRange& lattice_range, double expnt, const KernelRange& rng = {}) {\n          const int maxR_lattice = lattice_range.get_range();\n          if (!maxR_lattice) { return 0; } // Early exit for non-periodic\n          // kernel is 1e-16 past this many simulation cells due to range-restriction\n          const int maxR_rng = rng.finite() ? (rng.iextent_x2(1e-16) + 1)/2 : std::numeric_limits<int>::max();\n          // kernel is 1e-16 past this many simulation cells due to decay of Gaussian kernel\n          const int maxR_G = std::max(1, int(sqrt(16.0 * 2.3 / expnt) + 1));\n          return std::min({maxR_lattice, maxR_rng,maxR_G});\n        }\n    public:\n        const Q coeff;          ///< Coefficient\n        const double expnt;     ///< Exponent\n        const Level natlev;     ///< Level to evaluate\n        const int m;            ///< Order of derivative (0, 1, or 2 only)\n\n        explicit GaussianConvolution1D(int k, Q coeff, double expnt,\n        \t\tint m, const LatticeRange& lattice_range, double bloch_k = 0.0,\n                        KernelRange rng = {})\n            : Convolution1D<Q>(k,k+11,maxR(lattice_range,expnt,rng),bloch_k, rng)\n            , coeff(coeff)\n            , expnt(expnt)\n            , natlev(Level(0.5*log(expnt)/log(2.0)+1))\n            , m(m)\n        {\n            MADNESS_ASSERT(m>=0 && m<=2);\n            // std::cout << \"GC expnt=\" << expnt << \" coeff=\"  << coeff << \" natlev=\" << natlev << \" maxR=\" << maxR(periodic,expnt) << std::endl;\n            // for (Level n=0; n<5; n++) {\n            //     for (Translation l=0; l<(1<<n); l++) {\n            //         std::cout << \"RNLP \" << n << \" \" << l << \" \" << this->get_rnlp(n,l).normf() << std::endl;\n            //     }\n            //     std::cout << std::endl;\n            // }\n        }\n\n        virtual ~GaussianConvolution1D() {}\n\n        virtual Level natural_level() const final {\n            return natlev;\n        }\n\n        /// Compute the projection of the operator onto the double order polynomials\n\n        /// The returned reference is to a cached tensor ... if you want to\n        /// modify it, take a copy first.\n        ///\n        /// Return in \\c v[p] \\c p=0..2*k-1\n        /// \\code\n        /// r(n,l,p) = 2^(-n) * int(K(2^(-n)*(z+l)) * phi(p,z), z=0..1)\n        /// \\endcode\n        /// The kernel is coeff*exp(-expnt*z^2)*z^m (with m>0).  This is equivalent to\n        /// \\code\n        /// r(n,l,p) = 2^(-n*(m+1))*coeff * int( ((d/dz)^m exp(-beta*z^2)) * phi(p,z-l), z=l..l+1)\n        /// \\endcode\n        /// where\n        /// \\code\n        /// beta = alpha * 2^(-2*n)\n        /// \\endcode\n        Tensor<Q> rnlp(Level n, const Translation lx) const final {\n            int twok = 2*this->k;\n            Tensor<Q> v(twok);       // Can optimize this away by passing in\n            //KahanAccumulator<Q> v_accumulator[twok];\n            std::vector<KahanAccumulator<Q>> v_accumulator(twok);\n            constexpr bool use_kahan = false;  // change to true to use Kahan accumulator\n\n            // integration range is [0,1] ...\n            std::pair<double, double> integration_limits{0,1};\n            // ... unless using hard (step-wise) range restriction\n            if (this->range.finite_hard()) {\n              const auto two_to_nm1 = (1ul << n) * 0.5;\n              if (lx < 0) {\n                integration_limits = std::make_pair(\n                    std::min(std::max(-two_to_nm1 * this->range.iextent_x2() - lx, 0.), 1.), 1.);\n              } else {\n                integration_limits = std::make_pair(\n                    0., std::max(std::min(two_to_nm1 * this->range.iextent_x2() - lx, 1.), 0.));\n              }\n              // early return if empty integration range (this indicates that\n              // the range restriction makes the kernel zero everywhere in the box)\n              if (integration_limits.first == integration_limits.second) {\n                MADNESS_ASSERT(this->rnlp_is_zero(n, lx));\n                return v;\n              }\n              else {\n                MADNESS_ASSERT(!this->rnlp_is_zero(n, lx));\n              }\n            }\n            // integration range lower bound, upper bound, length\n            const auto x0 = integration_limits.first;\n            const auto x1 = integration_limits.second;\n            const auto L = x1 - x0;\n\n            /* Apply high-order Gauss Legendre onto subintervals\n\n               coeff*int(exp(-beta(x+l)**2) * z^m * phi[p](x),x=0..1);\n\n               The translations internally considered are all +ve, so\n               significant pieces will be on the left.  Finish after things\n               become insignificant.\n\n               The resulting coefficients are accurate to about 1e-20.\n            */\n\n            // Rescale expnt & coeff onto level n so integration range\n            // is [l,l+1]\n            Q scaledcoeff = coeff*pow(0.5,0.5*n*(2*m+1));\n\n            // Subdivide interval into nbox boxes of length h\n            // ... estimate appropriate size from the exponent.  A\n            // Gaussian with real-part of the exponent beta falls in\n            // magnitude by a factor of 1/e at x=1/sqrt(beta), and by\n            // a factor of e^-49 ~ 5e-22 at x=7/sqrt(beta) (and with\n            // polyn of z^2 it is 1e-20).  So, if we use a box of size\n            // 1/sqrt(beta) we will need at most 7 boxes.  Incorporate\n            // the coefficient into the screening since it may be\n            // large.  We can represent exp(-x^2) over [l,l+1] with a\n            // polynomial of order 21 to a relative\n            // precision of better than machine precision for\n            // l=0,1,2,3 and for l>3 the absolute error is less than\n            // 1e-23.  We want to compute matrix elements with\n            // polynomials of order 2*k-1+m, so the total order is\n            // 2*k+20+m, which can be integrated with a quadrature rule\n            // of npt=k+11+(m+1)/2.  npt is set in the constructor.\n\n            double fourn = std::pow(4.0,double(n));\n            double beta = expnt * pow(0.25,double(n));\n            double h = 1.0/sqrt(beta);  // 2.0*sqrt(0.5/beta);\n            long nbox = long(1.0/h);\n            if (nbox < 1) nbox = 1;\n\n            // corner case: soft range restriction, range boundary within in interval\n            // since the integrand changes rapidly at x=0, 1/2, or 1, need finer\n            // integration\n            // N.B. this should have almost no impact on performance since this\n            // will produce a large number of boxes only when 2^n * sigma << 1\n            if (this->range.finite_soft()) {\n              // range boundary within in interval if 2^{n-1}*range.N() \\in [l,l+1] (l>=0) or [-l,-l+1] (l<0)\n              const auto range_edge_in_interval = [&]() {\n                const auto two_to_nm1 = (1ul << n) * 0.5;\n                const auto range_boundary = two_to_nm1 * this->range.N();\n                if (lx >= 0) {\n                  return range_boundary >= lx && range_boundary <= lx+1;\n                }\n                else { // lx < 0\n                  return range_boundary <= -lx && range_boundary >= -lx-1;\n                }\n              };\n\n              // ensure that box is at least 1/sigma in size\n              if (range_edge_in_interval()) {\n                nbox = std::max(nbox, static_cast<long>(ceil(1./((1ul << n) * this->range.sigma()))));\n              }\n            }\n\n            h = L/nbox;\n\n            // Find argmax such that h*scaledcoeff*exp(-argmax)=1e-22 ... if\n            // beta*xlo*xlo is already greater than argmax we can neglect this\n            // and subsequent boxes.\n\n            // The derivatives add a factor of expnt^m to the size of\n            // the function at long range.\n            double sch = std::abs(scaledcoeff*h);\n            if (m == 1) sch *= expnt;\n            else if (m == 2) sch *= expnt*expnt;\n            double argmax = std::abs(log(1e-22/sch)); // perhaps should be -log(1e-22/sch) ?\n\n            // to screen need to iterate over boxes in the order of decreasing kernel values\n            const bool left_to_right = lx >= 0;\n            // if going left-to-right, start at left, else at right\n            const double xstartedge = left_to_right ? x0+lx : lx + 1;\n\n            // with oscillatory integrands the heuristic for reducing roundoff\n            // is to sum from large to small, i.e. proceed in same direction as the order of boxes\n            // WARNING: the grid points in quad_{x,w} are in order of decreasing x!\n            // hence decrement grid point indices for left_to_right, increment otherwise\n            const long first_pt = left_to_right ? this->npt-1: 0;\n            const long sentinel_pt = left_to_right ? -1 : this->npt;\n            const auto next_pt = [left_to_right](auto i) { return left_to_right ? i-1 : i+1; };\n\n            double xlo = left_to_right ? xstartedge : xstartedge-h;\n            double xhi;\n            for (long box=0; box!=nbox; ++box, xlo = (left_to_right ? xhi : xlo-h)) {\n\n                // can ignore this and rest of boxes if the Gaussian has decayed enough at the side of the box closest to the origin\n                xhi=xlo+h;\n                const auto xabs_min = std::min(std::abs(xhi),std::abs(xlo));\n                if (beta*xabs_min*xabs_min > argmax) break;\n\n                for (long i=first_pt; i!=sentinel_pt; i=next_pt(i)) {\n#ifdef IBMXLC\n                    double phix[80];\n#else\n                    double phix[2*MAXK];\n#endif\n                    double xx = xlo + h*this->quad_x(i);\n                    Q ee = scaledcoeff*exp(-beta*xx*xx)*this->quad_w(i)*h;\n                    if (this->range && this->range.finite()) {\n                      const auto x = xx * pow(0.5,double(n));\n                      ee *= this->range.value(x);\n                    }\n\n                    // Differentiate as necessary\n                    if (m == 1) {\n                        ee *= -2.0*expnt*xx;\n                    }\n                    else if (m == 2) {\n                        ee *= (4.0*xx*xx*expnt*expnt - 2.0*expnt*fourn);\n                    }\n\n                    legendre_scaling_functions(xx-lx,twok,phix);\n                    for (long p=0; p<twok; ++p) {\n                      if constexpr (use_kahan)\n                        v_accumulator[p] += ee * phix[p];\n                      else\n                        v(p) += ee * phix[p];\n                    }\n                }\n            }\n\n            if constexpr (use_kahan) {\n              for (long p = 0; p < twok; ++p)\n                v(p) = static_cast<Q>(v_accumulator[p]);\n            }\n\n            return v;\n        }\n\n        /// @return true if the block of [r^n_l]_ij is expected to be small\n        bool issmall(Level n, Translation lx) const final {\n            // [r^n_l]_ij = superposition of [r^n_l]_p and [r^n_l-1]_ij\n            // lx>0? the nearest box is lx-1 -> the edge closest to the origin is lx - 1\n            // lx<0? the nearest box is lx -> the edge closest to the origin is lx + 1\n            // lx==0? interactions within same box  are never small\n            if (lx == 0)\n              return false;\n            else {\n              const double beta = expnt * pow(0.25,double(n));\n              const double overly_large_beta_r2 = 49.0;      // 49 -> 5e-22     69 -> 1e-30\n              if (lx > 0) {\n                const auto ll = lx - 1;\n                return beta * ll * ll > overly_large_beta_r2;\n              } else {\n                const auto ll = lx + 1;\n                return beta * ll * ll > overly_large_beta_r2;\n              }\n            }\n        };\n    };\n\n\n    template <typename Q>\n    struct GaussianConvolution1DCache {\n        static ConcurrentHashMap<hashT, std::shared_ptr< GaussianConvolution1D<Q> > > map;\n        typedef typename ConcurrentHashMap<hashT, std::shared_ptr< GaussianConvolution1D<Q> > >::iterator iterator;\n        typedef typename ConcurrentHashMap<hashT, std::shared_ptr< GaussianConvolution1D<Q> > >::datumT datumT;\n\n        static std::shared_ptr< GaussianConvolution1D<Q> > get(int k, double expnt, int m, const LatticeRange& lattice_range,\n                                                               double bloch_k = 0.0,\n                                                               const KernelRange& range = {}) {\n            hashT key = hash_value(expnt);\n            hash_combine(key, k);\n            hash_combine(key, m);\n            hash_combine(key, lattice_range.get_range());\n            hash_combine(key, bloch_k);\n            if (range) hash_combine(key, range);\n\n            MADNESS_PRAGMA_CLANG(diagnostic push)\n            MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wundefined-var-template\")\n\n            iterator it = map.find(key);\n            if (it == map.end()) {\n                [[maybe_unused]] auto&& [tmpit, inserted] = map.insert(datumT(key, std::make_shared< GaussianConvolution1D<Q> >(k,\n                                                                                    Q(sqrt(expnt/constants::pi)),\n                                                                                    expnt,\n                                                                                    m,\n                                                                                    lattice_range,\n                                                                                    bloch_k,\n                                                                                    range\n                                                                                    )));\n                MADNESS_ASSERT(inserted);\n                it = map.find(key);\n                //printf(\"conv1d: making  %d %.8e\\n\",k,expnt);\n            }\n            else {\n                //printf(\"conv1d: reusing %d %.8e\\n\",k,expnt);\n            }\n            auto& result = it->second;\n            MADNESS_ASSERT(result->expnt == expnt &&\n                           result->k == k &&\n                           result->m == m &&\n                           result->lattice_summed() == static_cast<bool>(lattice_range) &&\n                           result->range == range &&\n                           result->bloch_k == bloch_k);\n            return result;\n\n            MADNESS_PRAGMA_CLANG(diagnostic pop)\n\n        }\n    };\n\n    // instantiated in mra1.cc\n    template <>\n    ConcurrentHashMap< hashT, std::shared_ptr< GaussianConvolution1D<double> > >\n        GaussianConvolution1DCache<double>::map;\n\n    // instantiated in mra1.cc\n    template <>\n    ConcurrentHashMap< hashT, std::shared_ptr< GaussianConvolution1D<double_complex> > >\n        GaussianConvolution1DCache<double_complex>::map;\n\n}\n\n#endif // MADNESS_MRA_CONVOLUTION1D_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/derivative.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_DERIVATIVE_H__INCLUDED\n#define MADNESS_DERIVATIVE_H__INCLUDED\n\n#include <iostream>\n#include <iomanip>\n#include <fstream>\n#include <madness/world/MADworld.h>\n#include <madness/world/worlddc.h>\n#include <madness/world/print.h>\n#include <madness/misc/misc.h>\n\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/gentensor.h>\n\n#include <madness/mra/key.h>\n#include <madness/mra/funcdefaults.h>\n\n\n/// \\file mra/derivative.h\n/// \\brief Declaration and initialization of tree traversal functions and generic derivative\n/// \\ingroup mra\n\nnamespace madness {\n\n\ttemplate<typename T, std::size_t NDIM>\n\tclass FunctionNode;\n\n    template<typename T, std::size_t NDIM>\n    class Function;\n\n}\n\n\n\nnamespace madness {\n\n\n/// Tri-diagonal operator traversing tree primarily for derivative operator\n\n    /// \\ingroup mra\n    template <typename T, std::size_t NDIM>\n    class DerivativeBase : public WorldObject< DerivativeBase<T, NDIM> > {\n        typedef WorldObject< DerivativeBase<T, NDIM> > woT;\n    protected:\n        World& world;\n        const std::size_t axis      ;  ///< Axis along which the operation is performed\n        const int k         ;  ///< Number of wavelets of the function\n        const BoundaryConditions<NDIM> bc;\n        const std::vector<long> vk; ///< (k,...) used to initialize Tensors\n\n    public:\n        friend class FunctionImpl<T, NDIM>;\n\n        typedef Tensor<T>               tensorT  ;\t///< regular tensors, like rm, etc\n        typedef GenTensor<T>            coeffT   ;\t///< holding the node's coeffs (possibly low rank)\n        typedef Key<NDIM>               keyT     ;\n        typedef std::pair<keyT,coeffT>  argT     ;\n        typedef FunctionImpl<T,NDIM>    implT    ;\n        typedef Function<T,NDIM>        functionT;\n        typedef WorldContainer<Key<NDIM> , FunctionNode<T, NDIM> > dcT;\n        typedef FunctionNode<T,NDIM> nodeT;\n\n\n        DerivativeBase(World& world, std::size_t axis, int k, BoundaryConditions<NDIM> bc)\n            : WorldObject< DerivativeBase<T, NDIM> >(world)\n            , world(world)\n            , axis(axis)\n            , k(k)\n            , bc(bc)\n            , vk(NDIM,k)\n        {\n            // No!  Cannot process incoming messages until the *derived* class is constructed.\n            // this->process_pending();\n        }\n\n        virtual ~DerivativeBase() { }\n\n        void forward_do_diff1(const implT* f, implT* df, const keyT& key,\n                              const argT& left,\n                              const argT& center,\n                              const argT& right)  const {\n\n            const dcT& coeffs = f->get_coeffs();\n            ProcessID owner = coeffs.owner(key);\n\n            if (owner == world.rank()) {\n                if (!left.second.has_data()) {\n                    woT::task(owner, &madness::DerivativeBase<T,NDIM>::do_diff1,\n                            f, df, key, find_neighbor(f, key,-1), center, right,\n                            TaskAttributes::hipri());\n                }\n                else if (!right.second.has_data()) {\n                    woT::task(owner, &madness::DerivativeBase<T,NDIM>::do_diff1,\n                            f, df, key, left, center, find_neighbor(f, key,1),\n                            TaskAttributes::hipri());\n                }\n                // Boundary node\n                else if (left.first.is_invalid() || right.first.is_invalid()) {\n                    woT::task(owner, &madness::DerivativeBase<T,NDIM>::do_diff2b,\n                            f, df, key, left, center, right);\n                }\n                // Interior node\n                else {\n                    woT::task(owner, &madness::DerivativeBase<T,NDIM>::do_diff2i,\n                            f, df, key, left, center, right);\n                }\n            }\n            else {\n                df->task(owner, &madness::FunctionImpl<T,NDIM>::forward_do_diff1,\n                        this, f, key, left, center, right, TaskAttributes::hipri());\n            }\n        }\n\n        void do_diff1(const implT* f, implT* df, const keyT& key,\n                      const argT& left,\n                      const argT& center,\n                      const argT& right) const {\n            MADNESS_ASSERT(axis<NDIM);\n\n//            if (left.second.size()==0 || right.second.size()==0) {\n            if ((!left.second.has_data()) || (!right.second.has_data())) {\n                // One of the neighbors is below us in the tree ... recur down\n                df->get_coeffs().replace(key,nodeT(coeffT(),true));\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    const keyT& child = kit.key();\n                    if ((child.translation()[axis]&1) == 0) {\n                        // leftmost child automatically has right sibling\n                        forward_do_diff1(f, df, child, left, center, center);\n                    }\n                    else {\n                        // rightmost child automatically has left sibling\n                        forward_do_diff1(f, df, child, center, center, right);\n                    }\n                }\n            }\n            else {\n                forward_do_diff1(f, df, key, left, center, right);\n            }\n        }\n\n        virtual void do_diff2b(const implT* f, implT* df, const keyT& key,\n                               const argT& left,\n                               const argT& center,\n                               const argT& right) const = 0;\n\n        virtual void do_diff2i(const implT* f, implT* df, const keyT& key,\n                               const argT& left,\n                               const argT& center,\n                               const argT& right) const = 0;\n\n\n        /// Differentiate w.r.t. given coordinate (x=0, y=1, ...) with optional fence\n\n        /// Returns a new function with the same distribution\n        Function<T,NDIM>\n        operator()(const functionT& f, bool fence=true) const {\n            if (VERIFY_TREE) f.verify_tree();\n            if (fence) f.change_tree_state(reconstructed);\n            MADNESS_CHECK_THROW(f.is_reconstructed(),\"diff: trying to diff a compressed function without fencing\");\n\n            functionT df;\n            df.set_impl(f,false);\n\n            df.get_impl()->diff(this, f.get_impl().get(), fence);\n            return df;\n        }\n\n\n        static bool enforce_bc(int bc_left, int bc_right, Level n, Translation& l) {\n            Translation two2n = 1ul << n;\n            if (l < 0) {\n                if (bc_left == BC_ZERO || bc_left == BC_FREE || bc_left == BC_DIRICHLET || bc_left == BC_ZERONEUMANN || bc_left == BC_NEUMANN) {\n                    return false; // f=0 BC, or no BC, or nonzero f BC, or zero deriv BC, or nonzero deriv BC\n                }\n                else if (bc_left == BC_PERIODIC) {\n                    l += two2n; // Periodic BC\n                    MADNESS_ASSERT(bc_left == bc_right);   //check that both BCs are periodic\n                }\n                else {\n                    MADNESS_EXCEPTION(\"enforce_bc: confused left BC?\",bc_left);\n                }\n            }\n            else if (l >= two2n) {\n                if (bc_right == BC_ZERO || bc_right == BC_FREE || bc_right == BC_DIRICHLET || bc_right == BC_ZERONEUMANN || bc_right == BC_NEUMANN) {\n                    return false; // f=0 BC, or no BC, or nonzero f BC, or zero deriv BC, or nonzero deriv BC\n                }\n                else if (bc_right == BC_PERIODIC) {\n                    l -= two2n; // Periodic BC\n                    MADNESS_ASSERT(bc_left == bc_right);   //check that both BCs are periodic\n                }\n                else {\n                    MADNESS_EXCEPTION(\"enforce_bc: confused BC right?\",bc_right);\n                }\n            }\n            return true;\n        }\n\n        Key<NDIM> neighbor(const keyT& key, int step) const {\n            Vector<Translation,NDIM> l = key.translation();\n            l[axis] += step;\n            if (!enforce_bc(bc(axis,0), bc(axis,1), key.level(), l[axis])) {\n                return keyT::invalid();\n            }\n            else {\n                return keyT(key.level(),l);\n            }\n        }\n\n        Future<argT>\n        find_neighbor(const implT* f, const Key<NDIM>& key, int step) const {\n            keyT neigh = neighbor(key, step);\n            if (neigh.is_invalid()) {\n                return Future<argT>(argT(neigh,coeffT(vk,f->get_tensor_args()))); // Zero bc\n            }\n            else {\n                Future<argT> result;\n\t\tif (f->get_coeffs().is_local(neigh))\n\t\t  f->send(f->get_coeffs().owner(neigh), &implT::sock_it_to_me, neigh, result.remote_ref(world));\n\t\telse\n\t\t  f->task(f->get_coeffs().owner(neigh), &implT::sock_it_to_me, neigh, result.remote_ref(world), TaskAttributes::hipri());\n                return result;\n            }\n        }\n\n\n        template <typename Archive> void serialize(const Archive& ar) const {\n            throw \"NOT IMPLEMENTED\";\n        }\n\n    };  // End of the DerivativeBase class\n\n\n    /// Implements derivatives operators with variety of boundary conditions on simulation domain\n    template <typename T, std::size_t NDIM>\n    class Derivative : public DerivativeBase<T, NDIM> {\n    private:\n        typedef DerivativeBase<T, NDIM> baseT;\n\n    public:\n        typedef Tensor<T>               tensorT  ;\n        typedef GenTensor<T>            coeffT   ;\t///< holding the node's coeffs (possibly low rank)\n        typedef Key<NDIM>               keyT     ;\n        typedef std::pair<keyT,coeffT>  argT     ;\n        typedef FunctionImpl<T,NDIM>    implT    ;\n        typedef Function<T,NDIM>        functionT;\n        typedef WorldContainer< Key<NDIM> , FunctionNode<T, NDIM> > dcT;\n        typedef FunctionNode<T,NDIM> nodeT;\n\n    private:\n        const functionT g1;  ///< Function describing the boundary condition on the right side\n        const functionT g2;  ///< Function describing the boundary condition on the left side\n\n        bool is_second;\n        bool is_third;\n\n        // Tensors for holding the modified coefficients\n        Tensor<double> rm, r0, rp        ; ///< Blocks of the derivative operator\n        Tensor<double> rmt, r0t, rpt     ; ///< Blocks of the derivative operator, transposed\n        Tensor<double> left_rm, left_r0  ; ///< Blocks of the derivative for the left boundary\n        Tensor<double> left_rmt, left_r0t  ; ///< Blocks of the derivative for the left boundary\n        Tensor<double> right_r0, right_rp; ///< Blocks of the derivative for the right boundary\n        Tensor<double> right_r0t, right_rpt; ///< Blocks of the derivative for the right boundary\n        Tensor<double> bv_left, bv_right ; ///< Blocks of the derivative operator for the boundary contribution\n\n\n        // Tensors for the bspline smoothed central difference operator\n        Tensor<double> r0_bsp;\n        Tensor<double> rm_bsp;\n        Tensor<double> rp_bsp;\n        Tensor<double> r0_bsp_t;\n        Tensor<double> rm_bsp_t;\n        Tensor<double> rp_bsp_t;\n\n        void do_diff2b(const implT* f, implT* df, const keyT& key,\n                       const argT& left,\n                       const argT& center,\n                       const argT& right) const {\n            Vector<Translation,NDIM> l = key.translation();\n            double lev   = (double) key.level();\n\n            coeffT d;\n\n            //left boundary\n            if (l[this->axis] == 0) {\n\n                coeffT tensor_right=df->parent_to_child(right.second, right.first, this->neighbor(key,1));\n                coeffT tensor_center=df->parent_to_child(center.second, center.first, key);\n\n                d= transform_dir(tensor_right,left_rmt,this->axis);\n                d+=transform_dir(tensor_center,left_r0t,this->axis);\n            }\n            else {\n\n                coeffT tensor_left=df->parent_to_child(left.second, left.first, this->neighbor(key,-1));\n                coeffT tensor_center=df->parent_to_child(center.second, center.first, key);\n\n                d= transform_dir(tensor_left,right_rpt,this->axis);\n                d+=transform_dir(tensor_center,right_r0t,this->axis);\n            }\n\n            double fac = FunctionDefaults<NDIM>::get_rcell_width()[this->axis]*pow(2.0,lev);\n            if (is_second) fac *= fac;\n            else if (is_third) fac *= fac*fac;\n\n            d.scale(fac);\n            d.reduce_rank(df->get_thresh());\n            df->get_coeffs().replace(key,nodeT(d,false));\n\n\n            // This is the boundary contribution (formally in BoundaryDerivative)\n            int bc_left  = this->bc(this->axis,0);\n            int bc_right = this->bc(this->axis,1);\n\n            Future<argT> found_argT;\n            tensorT bf, bdry_t;\n            //left boundary\n            if (l[this->axis] == 0) {\n                if (bc_left != BC_PERIODIC && bc_left != BC_FREE && bc_left != BC_ZERO && bc_left != BC_ZERONEUMANN) {\n                    bf = copy(bv_left);\n                    found_argT = g1.get_impl()->find_me(key);\n                }\n                else {\n                    return;\n                }\n            }\n            else { //right boundary\n                if (bc_right != BC_PERIODIC && bc_right != BC_FREE && bc_right != BC_ZERO && bc_right != BC_ZERONEUMANN) {\n                    bf = copy(bv_right);\n                    found_argT = g2.get_impl()->find_me(key);\n                }\n                else {\n                    return;\n                }\n            }\n#ifdef HAVE_PARSEC\n            std::cerr << \"FATAL ERROR: PaRSEC does not support recursive task execution but Derivative::do_diff2b requires this. Use a different backend\" << std::endl;\n            abort();\n#endif\n            const auto& found_argT_value = found_argT.get();  // do not recursively execute tasks to avoid making PaRSEC sad\n            tensorT gcoeffs = df->parent_to_child(found_argT_value.second, found_argT_value.first,key).full_tensor_copy();\n\n            //if (this->bc.get_bc().dim(0) == 1) {\n            if (NDIM == 1) {\n                bdry_t = gcoeffs[0]*bf;\n            }\n            else {\n                tensorT slice_aid(this->k);  //vector of zeros\n                slice_aid[0] = 1;\n                tensorT tmp = inner(slice_aid, gcoeffs, 0, this->axis);\n                bdry_t = outer(bf,tmp);\n                if (this->axis) bdry_t = copy(bdry_t.cycledim(this->axis,0,this->axis)); // make it contiguous\n            }\n            bdry_t.scale(FunctionDefaults<NDIM>::get_rcell_width()[this->axis]);\n\n            if (l[this->axis]==0) {\n                if (bc_left == BC_DIRICHLET)\n                    bdry_t.scale( pow(2.0,lev));\n\t\t\t\telse if (bc_left ==BC_NEUMANN)\n\t\t\t\t\tbdry_t.scale(FunctionDefaults<NDIM>::get_cell_width()[this->axis]);\n            }\n            else {\n                if (bc_right == BC_DIRICHLET)\n                    bdry_t.scale( pow(2.0,lev));\n\t\t\t\telse if (bc_right ==BC_NEUMANN)\n\t\t\t\t\tbdry_t.scale(FunctionDefaults<NDIM>::get_cell_width()[this->axis]);\n            }\n\n            bdry_t += d.full_tensor_copy();;\n            df->get_coeffs().replace(key,nodeT(coeffT(bdry_t,df->get_thresh(),df->get_tensor_type()),false));\n        }\n\n        void do_diff2i(const implT* f, implT*df, const keyT& key,\n                       const argT& left,\n                       const argT& center,\n                       const argT& right) const\n        {\n//#if !HAVE_GENTENSOR\n//            coeffT d = madness::inner(rp,\n//                                       df->parent_to_child(left.second, left.first, baseT::neighbor(key,-1)).swapdim(this->axis,0),\n//                                       1, 0);\n//            inner_result(r0,\n//                         df->parent_to_child(center.second, center.first, key).swapdim(this->axis,0),\n//                         1, 0, d);\n//            inner_result(rm,\n//                         df->parent_to_child(right.second, right.first, baseT::neighbor(key,1)).swapdim(this->axis,0),\n//                         1, 0, d);\n//            // flo thinks this is wrong for higher dimensions -- need to cycledim\n//            if (this->axis) d = copy(d.swapdim(this->axis,0)); // make it contiguous\n//            d.scale(FunctionDefaults<NDIM>::get_rcell_width()[this->axis]*pow(2.0,(double) key.level()));\n//            df->get_coeffs().replace(key,nodeT(d,false));\n//\n//#else\n            coeffT tensor_left=df->parent_to_child(left.second, left.first, this->neighbor(key,-1));\n            coeffT tensor_center=df->parent_to_child(center.second, center.first, key);\n            coeffT tensor_right=df->parent_to_child(right.second, right.first, this->neighbor(key,1));\n\n            coeffT d= transform_dir(tensor_left,rpt,this->axis);\n            d+=transform_dir(tensor_center,r0t,this->axis);\n            d+=transform_dir(tensor_right,rmt,this->axis);\n\n            double fac = FunctionDefaults<NDIM>::get_rcell_width()[this->axis]*pow(2.0,(double) key.level());\n            if (is_second) fac *= fac;\n            else if (is_third) fac *= fac*fac;\n\n            d.scale(fac);\n            d.reduce_rank(df->get_thresh());\n            df->get_coeffs().replace(key,nodeT(d,false));\n\n//#endif\n\n        }\n\n        void initCoefficients()  {\n            is_second = false;\n            is_third = false;\n\n            r0 = Tensor<double>(this->k,this->k);\n            rp = Tensor<double>(this->k,this->k);\n            rm = Tensor<double>(this->k,this->k);\n\n            left_rm = Tensor<double>(this->k,this->k);\n            left_r0 = Tensor<double>(this->k,this->k);\n\n            right_r0 = Tensor<double>(this->k,this->k);\n            right_rp = Tensor<double>(this->k,this->k);\n\n            // These are the coefficients for the boundary contribution\n            bv_left  = Tensor<double>(this->k);\n            bv_right = Tensor<double>(this->k);\n\n            int bc_left  = this->bc(this->axis,0);\n            int bc_right = this->bc(this->axis,1);\n\n            double kphase = -1.0;\n            if (this->k%2 == 0) kphase = 1.0;\n            double iphase = 1.0;\n            for (int i=0; i<this->k; ++i) {\n                double jphase = 1.0;\n                for (int j=0; j<this->k; ++j) {\n                    double gammaij = sqrt(double((2*i+1)*(2*j+1)));\n                    double Kij;\n                    if (((i-j)>0) && (((i-j)%2)==1))\n                        Kij = 2.0;\n                    else\n                        Kij = 0.0;\n\n                    r0(i,j) = 0.5*(1.0 - iphase*jphase - 2.0*Kij)*gammaij;\n                    rm(i,j) = 0.5*jphase*gammaij;\n                    rp(i,j) =-0.5*iphase*gammaij;\n\n                    // Constraints on the derivative\n                    if (bc_left == BC_ZERONEUMANN || bc_left == BC_NEUMANN) {\n                        left_rm(i,j) = jphase*gammaij*0.5*(1.0 + iphase*kphase/this->k);\n\n                        double phi_tmpj_left = 0;\n\n                        for (int l=0; l<this->k; ++l) {\n                            double gammalj = sqrt(double((2*l+1)*(2*j+1)));\n                            double Klj;\n\n                            if (((l-j)>0) && (((l-j)%2)==1))  Klj = 2.0;\n                            else   Klj = 0.0;\n\n                            phi_tmpj_left += sqrt(double(2*l+1))*Klj*gammalj;\n                        }\n                        phi_tmpj_left = -jphase*phi_tmpj_left;\n                        left_r0(i,j) = (0.5*(1.0 + iphase*kphase/this->k) - Kij)*gammaij + iphase*sqrt(double(2*i+1))*phi_tmpj_left/pow(this->k,2.);\n                    }\n                    else if (bc_left == BC_ZERO || bc_left == BC_DIRICHLET || bc_left == BC_FREE) {\n                        left_rm(i,j) = rm(i,j);\n\n                        // B.C. with a function\n                        if (bc_left == BC_ZERO || bc_left == BC_DIRICHLET)\n                            left_r0(i,j) = (0.5 - Kij)*gammaij;\n\n                        // No B.C.\n                        else if (bc_left == BC_FREE)\n                            left_r0(i,j) = (0.5 - iphase*jphase - Kij)*gammaij;\n                    }\n\n                    // Constraints on the derivative\n                    if (bc_right == BC_ZERONEUMANN || bc_right == BC_NEUMANN) {\n                        right_rp(i,j) = -0.5*(iphase + kphase / this->k)*gammaij;\n\n                        double phi_tmpj_right = 0;\n                        for (int l=0; l<this->k; ++l) {\n                            double gammalj = sqrt(double((2*l+1)*(2*j+1)));\n                            double Klj;\n                            if (((l-j)>0) && (((l-j)%2)==1))  Klj = 2.0;\n                            else   Klj = 0.0;\n                            phi_tmpj_right += sqrt(double(2*l+1))*Klj*gammalj;\n                        }\n                        right_r0(i,j) = -(0.5*jphase*(iphase+ kphase/this->k) + Kij)*gammaij + sqrt(double(2*i+1))*phi_tmpj_right/pow(this->k,2.);\n                    }\n                    else if (bc_right == BC_ZERO || bc_right == BC_FREE || bc_right == BC_DIRICHLET) {\n                        right_rp(i,j) = rp(i,j);\n\n                        // Zero BC\n                        if (bc_right == BC_ZERO || bc_right == BC_DIRICHLET)\n                            right_r0(i,j) = -(0.5*iphase*jphase + Kij)*gammaij;\n\n                        // No BC\n                        else if (bc_right == BC_FREE)\n                            right_r0(i,j) = (1.0 - 0.5*iphase*jphase - Kij)*gammaij;\n\n                    }\n\n                    jphase = -jphase;\n                }\n                iphase = -iphase;\n            }\n\n            // Coefficients for the boundary contributions\n            iphase = 1.0;\n            for (int i=0; i<this->k; ++i) {\n                iphase = -iphase;\n\n                if (bc_left == BC_DIRICHLET)\n                    bv_left(i) = iphase*sqrt(double(2*i+1));            // vector for left dirichlet BC\n                else if(bc_left == BC_NEUMANN)\n                    bv_left(i) = -iphase*sqrt(double(2*i+1))/pow(this->k,2.);  // vector for left deriv BC\n                else\n                    bv_left(i) = 0.0;\n\n                if (bc_right == BC_DIRICHLET)\n                    bv_right(i) = sqrt(double(2*i+1));                  // vector for right dirichlet BC\n                else if (bc_right == BC_NEUMANN)\n                    bv_right(i) = sqrt(double(2*i+1))/pow(this->k,2.);         // vector for right deriv BC\n                else\n                    bv_right(i) = 0.0;\n            }\n\n            r0t = transpose(r0);\n            rpt = transpose(rp);\n            rmt = transpose(rm);\n\n            right_r0t = transpose(right_r0);\n            right_rpt = transpose(right_rp);\n\n            left_rmt = transpose(left_rm);\n            left_r0t = transpose(left_r0);\n\n            //print(rm.normf(),r0.normf(),rp.normf(),left_rm.normf(),left_r0.normf(),right_r0.normf(),right_rp.normf(),bv_left.normf(),bv_right.normf());\n        }\n\n    public:\n        typedef T opT;\n\n        /// Constructs a derivative operator\n\n        /// @param world The world\n        /// @param axis The direction to differentiate\n        /// @param bc Boundary conditions (default from FunctionDefaults)\n        /// @param g1 Function providing left boundary value (default empty)\n        /// @param g2 Function providing right boundary value (default empty)\n        /// @param k Wavelet order (default from FunctionDefaults)\n        Derivative(World& world,\n                   std::size_t axis,\n                   const BoundaryConditions<NDIM>& bc=FunctionDefaults<NDIM>::get_bc(),\n                   const functionT g1=functionT(),\n                   const functionT g2=functionT(),\n                   int k=FunctionDefaults<NDIM>::get_k())\n            :  DerivativeBase<T, NDIM>(world, axis, k, bc)\n            , g1(g1)\n            , g2(g2)\n        {\n            MADNESS_ASSERT(axis<NDIM);\n            initCoefficients();\n            g1.reconstruct();\n            g2.reconstruct();\n\n            this->process_pending();\n        }\n\n        virtual ~Derivative() { }\n\n        void set_is_first() {is_second = false; is_third = false;}\n        void set_is_second() {is_second = true; is_third=false;}\n        void set_is_third() {is_second = false; is_third = true;}\n\n        void set_bspline1() {\n           int k = FunctionDefaults<NDIM>::get_k();\n           if(k > 18) throw \"Bspline derivatives are only available up to k=18\";\n           std::string filename = get_mra_data_dir() + \"/b-spline-deriv1.txt\";\n           read_from_file(filename, 1);\n        }\n\n        void set_bspline2() {\n           int k = FunctionDefaults<NDIM>::get_k();\n           if(k > 18) throw \"Bspline derivatives are only available up to k=18\";\n           std::string filename = get_mra_data_dir() + \"/b-spline-deriv2.txt\";\n           read_from_file(filename, 2);\n        }\n\n        void set_bspline3() {\n           int k = FunctionDefaults<NDIM>::get_k();\n           if(k > 18) throw \"Bspline derivatives are only available up to k=18\";\n           std::string filename = get_mra_data_dir() + \"/b-spline-deriv3.txt\";\n           read_from_file(filename, 3);\n        }\n\n        void set_ble1() {\n           int k = FunctionDefaults<NDIM>::get_k();\n           if(k > 15) throw \"BLE derivatives are only available up to k=15\";\n           std::string filename = get_mra_data_dir() + \"/ble-first.txt\";\n           read_from_file(filename, 1);\n        }\n\n        void set_ble2() {\n           int k = FunctionDefaults<NDIM>::get_k();\n           if(k > 15) throw \"BLE derivatives are only available up to k=15\";\n           std::string filename = get_mra_data_dir() + \"/ble-second.txt\";\n           read_from_file(filename, 2);\n        }\n\n        void read_from_file(const std::string& filename, unsigned int order = 1) {\n\n            Tensor<double> r0_bsp(this->k,this->k);\n            Tensor<double> rp_bsp(this->k,this->k);\n            Tensor<double> rm_bsp(this->k,this->k);\n\n            std::ifstream f(filename);\n            bool found=false;\n\n            for (int m; f >> m; ) {\n                if (m == this->k) {\n                    for (int i=0; i<m; i++)\n                        for (int j=0; j<m; j++)\n                            MADNESS_CHECK(f >> rp_bsp(i,j));\n                    for (int i=0; i<m; i++)\n                        for (int j=0; j<m; j++)\n                            MADNESS_CHECK(f >> r0_bsp(i,j));\n                    for (int i=0; i<m; i++)\n                        for (int j=0; j<m; j++)\n                            MADNESS_CHECK(f >> rm_bsp(i,j));\n                    found = true;\n                    break;\n                }\n                else {\n                    double junk;\n                    for (int i=0; i<3*m*m; i++)\n                        MADNESS_CHECK(f >> junk);\n                }\n            }\n            MADNESS_CHECK(found);\n            Tensor<double> r0_bsp_t = transpose(r0_bsp);\n            Tensor<double> rp_bsp_t = transpose(rp_bsp);\n            Tensor<double> rm_bsp_t = transpose(rm_bsp);\n\n            r0=r0_bsp; r0t=r0_bsp_t; left_r0=r0_bsp; left_r0t=r0_bsp_t; right_r0=r0_bsp; right_r0t=r0_bsp_t;\n\n            rp=rp_bsp; rpt=rp_bsp_t; right_rp=rp_bsp; right_rpt=rp_bsp_t;\n\n            rm=rm_bsp; rmt=rm_bsp_t; left_rm=rm_bsp; left_rmt=rm_bsp_t;\n\n            // Get scaling factor right for higher order derivatives\n            if (order == 1) {\n               set_is_first();\n            }\n            else if(order == 2) {\n               set_is_second();\n            }\n            else if(order == 3) {\n               set_is_third();\n            }\n        }\n    };\n\n\n    /// Convenience function returning derivative operator with free-space boundary conditions\n    template <typename T, std::size_t NDIM>\n    Derivative<T,NDIM>\n    free_space_derivative(World& world, int axis, int k=FunctionDefaults<NDIM>::get_k()) {\n        return Derivative<T, NDIM>(world, axis, BoundaryConditions<NDIM>(BC_FREE), Function<T,NDIM>(), Function<T,NDIM>(), k);\n    }\n\n\n    /// Conveinence function returning derivative operator with periodic boundary conditions\n    template <typename T, std::size_t NDIM>\n    Derivative<T,NDIM>\n    periodic_derivative(World& world, int axis, int k=FunctionDefaults<NDIM>::get_k()) {\n        return Derivative<T, NDIM>(world, axis, BoundaryConditions<NDIM>(BC_PERIODIC), Function<T,NDIM>(), Function<T,NDIM>(), k);\n    }\n\n    /// Applies derivative operator to function (for syntactic equivalence to integral operator apply)\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM>\n    apply(const Derivative<T,NDIM>& D, const Function<T,NDIM>& f, bool fence=true) {\n        return D(f,fence);\n    }\n\n    /// Convenience function returning vector of derivative operators implementing grad (\\f$ \\nabla \\f$)\n\n    /// This will only work for BC_ZERO, BC_PERIODIC, BC_FREE and\n    /// BC_ZERONEUMANN since we are not passing in any boundary\n    /// functions.\n    template <typename T, std::size_t NDIM>\n    std::vector< std::shared_ptr< Derivative<T,NDIM> > >\n    gradient_operator(World& world,\n                      const BoundaryConditions<NDIM>& bc = FunctionDefaults<NDIM>::get_bc(),\n                      int k = FunctionDefaults<NDIM>::get_k()) {\n        std::vector< std::shared_ptr< Derivative<T,NDIM> > > r(NDIM);\n        for (std::size_t d=0; d<NDIM; ++d) {\n            MADNESS_CHECK(bc(d,0)!=BC_DIRICHLET && bc(d,1)!=BC_DIRICHLET);\n            MADNESS_CHECK(bc(d,0)!=BC_NEUMANN   && bc(d,1)!=BC_NEUMANN);\n            r[d].reset(new Derivative<T,NDIM>(world,d,bc,Function<T,NDIM>(),Function<T,NDIM>(),k));\n        }\n        return r;\n    }\n\n\n    namespace archive {\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveLoadImpl<Archive,const DerivativeBase<T,NDIM>*> {\n            static void load(const Archive& ar, const DerivativeBase<T,NDIM>*& ptr) {\n                WorldObject< DerivativeBase<T,NDIM> >* p = nullptr;\n                ar & p;\n                ptr = static_cast< const DerivativeBase<T,NDIM>* >(p);\n            }\n        };\n\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveStoreImpl<Archive,const DerivativeBase<T,NDIM>*> {\n            static void store(const Archive& ar, const DerivativeBase<T,NDIM>* const & ptr) {\n                ar & ptr->id();\n            }\n        };\n    }\n\n}  // End of the madness namespace\n\n#endif // MADNESS_MRA_DERIVATIVE_H_INCLUDED\n"
  },
  {
    "path": "src/madness/mra/displacements.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_MRA_DISPLACEMENTS_H__INCLUDED\n#define MADNESS_MRA_DISPLACEMENTS_H__INCLUDED\n\n#include <madness/mra/indexit.h>\n#include <madness/mra/funcdefaults.h>\n#include <madness/tensor/tensor.h>\n\n#include <algorithm>\n#include <array>\n#include <functional>\n#include <iterator>\n#include <optional>\n#include <tuple>\n#include <utility>\n#include <vector>\n\nnamespace madness {\n\n    // How should we treat destinations \"extra\" to the [0, 2^n) standard domain?\n    enum class ExtraDomainPolicy {\n        Discard,  // Use case: most computations.\n        Keep,     // Use case: PBC w/o lattice sums. Destinations that arise from a source inside the domain and some displacement but are outside [0, 2^n)\n                  //           are equivalent to a destination inside [0, 2^n) with the same displacement but a source outside the [0, 2^n).\n                  //           That source needs explicit accounting. Keep it. The caller will correct the destination and (if needed) the source.\n                  //           We're only responsible for the displacement.\n        Translate // Use case: PBC w/ lattice sums. As above, *except* the source outside [0, 2^n) is accounted for by some source inside [0, 2^n).\n                  //           The displacement itself needs changing, so that both source and destination are in the standard domain.\n                  //           We're responsible for changing the displacement.\n    };\n\n    /// Holds displacements for applying operators to avoid replicating for all operators\n    template <std::size_t NDIM>\n    class Displacements {\n\n        inline static std::vector< Key<NDIM> > disp = {}; ///< standard displacements to be used with standard kernels (range-unrestricted, no lattice sum)\n        inline static array_of_bools<NDIM> periodic_axes{false};  ///< along which axes lattice summation is performed?\n        inline static std::array<std::vector< Key<NDIM>>, 64 > disp_periodic{};  ///< displacements to be used with lattice-summed kernels\n        inline static Tensor<double> widths{NDIM}; ///< cell width, used to order displacements from least to most real space distance\n\n    public:\n        static int bmax_default() {\n            // Numbers determined by trial and error. The entire idea of bmax is non-adaptive,\n            // and the decision to have bmax be isotropic is only valid for hypercubes.\n            int bmax;\n            if      (NDIM == 1) bmax = 7;\n            else if (NDIM == 2) bmax = 5;\n            else if (NDIM == 3) bmax = 4;\n            else if (NDIM == 4) bmax = 3;\n            else if (NDIM == 5) bmax = 3;\n            else if (NDIM == 6) bmax = 3;\n            else                bmax = 2;\n            return bmax;\n        }\n\n    private:\n        static bool cmp_keys(const Key<NDIM>& a, const Key<NDIM>& b) {\n            const auto a_width = a.real_distsq(widths);\n            const auto b_width = b.real_distsq(widths);\n            if (a_width == 0 and a_width == b_width) return a.distsq() < b.distsq();\n            else return a_width < b_width;\n        }\n\n        static bool cmp_keys_periodic(const Key<NDIM>& a, const Key<NDIM>& b) {\n            const auto a_width = a.real_distsq_bc(periodic_axes, widths);\n            const auto b_width = b.real_distsq_bc(periodic_axes, widths);\n            if (a_width == 0 and a_width == b_width) return a.distsq_bc(periodic_axes) < b.distsq_bc(periodic_axes);\n            else return a_width < b_width;\n        }\n\n        static void make_disp(int bmax) {\n            // Note newer loop structure in make_disp_periodic_sum\n            Vector<Translation,NDIM> d(0);\n\n            int num = 1;\n            for (std::size_t i=0; i<NDIM; ++i) num *= (2*bmax + 1);\n            disp.resize(num,Key<NDIM>(0));\n\n            num = 0;\n            if (NDIM == 1) {\n                for (d[0]=-bmax; d[0]<=bmax; ++d[0])\n                    disp[num++] = Key<NDIM>(0,d);\n            }\n            else if (NDIM == 2) {\n                for (d[0]=-bmax; d[0]<=bmax; ++d[0])\n                    for (d[1]=-bmax; d[1]<=bmax; ++d[1])\n                        disp[num++] = Key<NDIM>(0,d);\n            }\n            else if (NDIM == 3) {\n                for (d[0]=-bmax; d[0]<=bmax; ++d[0])\n                    for (d[1]=-bmax; d[1]<=bmax; ++d[1])\n                        for (d[2]=-bmax; d[2]<=bmax; ++d[2])\n                            disp[num++] = Key<NDIM>(0,d);\n            }\n            else if (NDIM == 4) {\n                for (d[0]=-bmax; d[0]<=bmax; ++d[0])\n                    for (d[1]=-bmax; d[1]<=bmax; ++d[1])\n                        for (d[2]=-bmax; d[2]<=bmax; ++d[2])\n                            for (d[3]=-bmax; d[3]<=bmax; ++d[3])\n                                disp[num++] = Key<NDIM>(0,d);\n            }\n            else if (NDIM == 5) {\n                for (d[0]=-bmax; d[0]<=bmax; ++d[0])\n                    for (d[1]=-bmax; d[1]<=bmax; ++d[1])\n                        for (d[2]=-bmax; d[2]<=bmax; ++d[2])\n                            for (d[3]=-bmax; d[3]<=bmax; ++d[3])\n                                for (d[4]=-bmax; d[4]<=bmax; ++d[4])\n\n                                    disp[num++] = Key<NDIM>(0,d);\n            }\n            else if (NDIM == 6) {\n                for (d[0]=-bmax; d[0]<=bmax; ++d[0])\n                    for (d[1]=-bmax; d[1]<=bmax; ++d[1])\n                        for (d[2]=-bmax; d[2]<=bmax; ++d[2])\n                            for (d[3]=-bmax; d[3]<=bmax; ++d[3])\n                                for (d[4]=-bmax; d[4]<=bmax; ++d[4])\n                                    for (d[5]=-bmax; d[5]<=bmax; ++d[5])\n                                        disp[num++] = Key<NDIM>(0,d);\n            }\n            else {\n                MADNESS_EXCEPTION(\"make_disp: hard dimension loop\",NDIM);\n            }\n\n            std::sort(disp.begin(), disp.end(), cmp_keys);\n        }\n\n        static void make_disp_periodic(int bmax, Level n) {\n            MADNESS_ASSERT(periodic_axes.any());  // else use make_disp\n            Translation twon = Translation(1)<<n;\n\n            if (bmax > (twon-1)) bmax=twon-1;\n\n            // Make permissible 1D translations, periodic and nonperiodic (for mixed BC)\n            std::vector<Translation> bp(4*bmax+1);\n            std::vector<Translation> bnp(2*bmax+1);\n            int ip=0;\n            int inp=0;\n            for (Translation lx=-bmax; lx<=bmax; ++lx) {\n                bp[ip++] = lx;\n                if ((lx < 0) && (lx+twon > bmax)) bp[ip++] = lx + twon;\n                if ((lx > 0) && (lx-twon <-bmax)) bp[ip++] = lx - twon;\n                bnp[inp++] = lx;\n            }\n            MADNESS_ASSERT(ip <= 4*bmax+1);\n            MADNESS_ASSERT(inp <= 2*bmax+1);\n            const int nbp = ip;\n            const int nbnp = inp;\n\n            MADNESS_PRAGMA_CLANG(diagnostic push)\n            MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wundefined-var-template\")\n\n            disp_periodic[n] = std::vector< Key<NDIM> >();\n            Vector<long,NDIM> lim;\n            for(size_t i=0; i!=NDIM; ++i) {\n              lim[i] = periodic_axes[i] ? nbp : nbnp;\n            }\n            for (IndexIterator index(lim); index; ++index) {\n                Vector<Translation,NDIM> d;\n                for (std::size_t i=0; i<NDIM; ++i) {\n                  d[i] = periodic_axes[i] ? bp[index[i]] : bnp[index[i]];\n                }\n                disp_periodic[n].push_back(Key<NDIM>(n,d));\n            }\n\n            std::sort(disp_periodic[n].begin(), disp_periodic[n].end(), cmp_keys_periodic);\n//             print(\"KEYS AT LEVEL\", n);\n//             print(disp_periodic[n]);\n\n            MADNESS_PRAGMA_CLANG(diagnostic pop)\n\n        }\n\n\n    public:\n        /// first time this is called displacements are generated.\n        /// if boundary conditions are not periodic, the periodic displacements\n        /// are generated for all axes. This allows to support application of\n        /// operators with boundary conditions periodic along any axis (including all).\n        /// If need to use periodic boundary conditions\n        /// for some axes only, make sure to set the boundary conditions appropriately\n        /// before the first call to this\n        Displacements() {\n          MADNESS_PRAGMA_CLANG(diagnostic push)\n          MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wundefined-var-template\")\n\n          if (widths.normf() < 1e-8) widths = 1;\n\n          if (disp.empty()) {\n                make_disp(bmax_default());\n          }\n\n          if constexpr (NDIM <= 3) {\n            if (disp_periodic[0].empty()) {  // if not initialized yet\n              if (FunctionDefaults<NDIM>::get_bc().is_periodic().any())\n                reset_periodic_axes(\n                    FunctionDefaults<NDIM>::get_bc().is_periodic());\n              else\n                reset_periodic_axes(array_of_bools<NDIM>{true});\n            }\n          }\n\n          MADNESS_PRAGMA_CLANG(diagnostic pop)\n        }\n\n        const std::vector< Key<NDIM> >& get_disp(Level n,\n                                                 const array_of_bools<NDIM>& kernel_lattice_sum_axes) {\n            MADNESS_PRAGMA_CLANG(diagnostic push)\n            MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wundefined-var-template\")\n\n            if (kernel_lattice_sum_axes.any()) {\n                MADNESS_ASSERT(NDIM <= 3);\n                MADNESS_ASSERT(n < disp_periodic.size());\n                if ((kernel_lattice_sum_axes && periodic_axes) != kernel_lattice_sum_axes) {\n                  std::string msg =\n                      \"Displacements<\" + std::to_string(NDIM) +\n                      \">::get_disp(level, kernel_lattice_sum_axes): kernel_lattice_sum_axes is set for some axes that were not periodic in the FunctionDefault's boundary conditions active at the time when Displacements were initialized; invoke Displacements<NDIM>::reset_periodic_axes(kernel_lattice_sum_axes) to rebuild the periodic displacements\";\n                  MADNESS_EXCEPTION(msg.c_str(), 1);\n                }\n                return disp_periodic[n];\n            }\n            else {\n                return disp;\n            }\n\n            MADNESS_PRAGMA_CLANG(diagnostic pop)\n        }\n\n        /// return the standard displacements appropriate for operators w/o lattice summation\n        const std::vector< Key<NDIM> >& get_disp() {\n          MADNESS_PRAGMA_CLANG(diagnostic push)\n          MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wundefined-var-template\")\n\n          return disp;\n\n          MADNESS_PRAGMA_CLANG(diagnostic pop)\n        }\n\n        /// rebuilds periodic displacements so that they are optimal for the given set of periodic axes\n\n        /// this must be done while no references to prior periodic displacements are outstanding (i.e. no operator application\n        /// tasks in flight)\n        /// \\param new_periodic_axes the new periodic axes\n        static void reset_periodic_axes(const array_of_bools<NDIM>& new_periodic_axes) {\n          MADNESS_PRAGMA_CLANG(diagnostic push)\n          MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wundefined-var-template\")\n\n          MADNESS_ASSERT(new_periodic_axes.any());  // else why call this?\n          if (new_periodic_axes != periodic_axes) {\n\n            periodic_axes = new_periodic_axes;\n            Level nmax = 8 * sizeof(Translation) - 2;\n            for (Level n = 0; n < nmax; ++n)\n              make_disp_periodic(bmax_default(), n);\n          }\n          MADNESS_PRAGMA_CLANG(diagnostic pop)\n        }\n\n        static void set_width(const Tensor<double>& width) {\n          widths = width;\n          if (!disp.empty()) {\n            std::sort(disp.begin(), disp.end(), cmp_keys);\n          }\n          for (size_t n = 0; n < 64; ++n) {\n            if (!disp_periodic[n].empty()) {\n              std::sort(disp_periodic[n].begin(), disp_periodic[n].end(), cmp_keys_periodic);\n            }\n          }\n        }\n    };\n\n    template <std::size_t N, std::size_t M>\n    constexpr std::enable_if_t<N>=M, std::array<std::size_t, N-M>> iota_array(std::array<std::size_t, M> values_to_skip_sorted) {\n      std::array<std::size_t, N - M> result;\n      if constexpr (N != M) {\n        std::size_t nadded = 0;\n        auto value_to_skip_it = values_to_skip_sorted.begin();\n        assert(*value_to_skip_it < N);\n        auto value_to_skip = *value_to_skip_it;\n        for (std::size_t i = 0; i < N; ++i) {\n          if (i < value_to_skip) {\n            result[nadded++] = i;\n          } else if (value_to_skip_it != values_to_skip_sorted.end()) {\n            ++value_to_skip_it;\n            if (value_to_skip_it != values_to_skip_sorted.end()) {\n              value_to_skip = *value_to_skip_it;\n            } else\n              value_to_skip = N;\n          }\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Generates points at the finite-thickness surface of an N-dimensional box [C1-L1,C1+L1]x...x[CN-LN,CN+LN] centered at point {C1,...CN} in Z^N.\n     * For finite thickness T={T1,...,TN} point {x1,...,xN} is at the surface face perpendicular to axis i xi>=Ci-Li-Ti and xi<=Ci-Li+Ti OR xi>=Ci+Li-Ti and xi<=Ci+Li+Ti.\n     * For dimensions with unlimited size the point coordinates are limited to [0,2^n], with n being the level of the box.\n     * N.B. \"points\" are really boxes in the standard MADNESS sense, which we'll call \"primitive boxes\" to disambiguate from box as the product of intervals mentioned above,\n     */\n    template<std::size_t NDIM>\n    class BoxSurfaceDisplacementRange {\n    public:\n      using Point = Key<NDIM>;\n      using PointPattern = Vector<std::optional<Translation>, NDIM>;\n      using Displacement = Key<NDIM>;\n      /// this callable returns whether a given primitive box (or hyperface if only one coordinate is provided) can be filtered out.\n      /// if screening a primitive box, the corresponding displacement should be provided both for further screening and for the displacement to be updated, if displacements are translated to connect two cells in the box.\n      /// the validator should normally be a BoxSurfaceDisplacementFilter object. anything else is probably a hack.\n      using Validator = std::function<bool(Level, const PointPattern&, std::optional<Displacement>&)>;\n\n    private:\n      using BoxRadius = std::array<std::optional<Translation>, NDIM>;  // null radius = unlimited size\n      using SurfaceThickness = std::array<std::optional<Translation>, NDIM>;  // null thickness for dimensions with null radius\n      using Box = std::array<std::pair<Translation, Translation>, NDIM>;\n      using Hollowness = std::array<bool, NDIM>;  // this can be uninitialized, unlike array_of_bools ... hollow = gap between -radius+thickness and +radius-thickness.\n      using Periodicity = array_of_bools<NDIM>;\n\n      Point center_;                          ///< Center point of the box\n      BoxRadius box_radius_;          ///< halved size of the box in each dimension, in half-SimulationCells.\n      SurfaceThickness\n          surface_thickness_;    ///< surface thickness in each dimension, measured in boxes. Real-space surface size is thus n-dependent.\n      Box box_;                  ///< box bounds in each dimension.\n      Hollowness hollowness_;    ///< does box contain non-surface points along each dimension?\n      Periodicity is_lattice_summed_;  ///< which dimensions are lattice summed?\n      Validator validator_;      ///< optional validator function\n      // TODO: Double-check legitimacy of choosing probing displacement arbitrarily. For isotropic kernels, wouldn't you want it on the face where the boundary is closest (in real-space)?\n      //       That depends on both the surface thickness and the side lengths of the simulation cell.\n      Displacement probing_displacement_;  ///< displacement to a nearby point on the surface; it may not be able to pass the filter, but is sufficiently representative of the surface displacements to allow screening with isotropic kernels\n\n      /**\n     * @brief Iterator class for lazy generation of surface points\n     *\n     * This iterator generates surface points on-demand by tracking the current fixed\n     * dimension and positions in each dimension. It implements the InputIterator concept.\n       */\n      class Iterator {\n      public:\n        enum Type {Begin, End};\n      private:\n        const BoxSurfaceDisplacementRange* parent;  ///< Pointer to parent surface.\n        Point point;                                ///< Current point / box. This is always free to leave the simulation cell.\n        mutable std::optional<Displacement> disp;   ///< Memoized displacement from parent->center_ to point, computed by displacement(), reset by advance()\n        size_t fixed_dim;                           ///< Current fixed dimension (i.e. faces perpendicular to this axis are being iterated over)\n        Box unprocessed_bounds;                     ///< The bounds for all *unprocessed* displacements in the finite-thickness surface. Updated as displacements are processed.\n                                                    ///  For the dimensions of the parent box, without thickness or regard for displacement processing, use parent->box_.\n                                                    ///  Tracking `unprocessed_bounds` allows us to avoid double-counting 'edge' boxes that are on multiple hyperfaces.\n                                                    ///  e.g., if radius is [5, 5], center is [0, 0] and thickness is [1, 1], the bounds are [-6, 6] x [-6, 6].\n                                                    ///  We first evaluate the hyperfaces [-6, -4] x [-5, 5] and then [4, 6] x [-5, 5].\n                                                    ///  It remains to evaluate hyperfaces [-5, 5] x [-6, -4] and [-5, 5] x [4, 6], *excluding*\n                                                    ///  the edge points shared with the processed hyperfaces. So, we need to evaluate effective hyperfaces\n                                                    ///  [-3, 3] x [-6, -4] and [-3, 3] x [4, 6]. The unprocessed_bounds are reset to [-3, 3] x [-6, 6].\n        bool done;                                  ///< Flag indicating iteration completion\n\n        // return true if we have another surface layer for the fixed_dim\n        // if we do, translate point onto that next surface layer\n        bool next_surface_layer() {\n          Vector<Translation, NDIM> l = point.translation();\n          if (l[fixed_dim] !=\n              parent->box_[fixed_dim].second +\n                  parent->surface_thickness_[fixed_dim].value_or(0)) {\n            // if exhausted all layers on the \"negative\" side of the fixed dimension and there's a gap to the \"positive\" side,\n            // jump to the positive side. otherwise, just take the next layer.\n            if (parent->hollowness_[fixed_dim] &&\n                l[fixed_dim] ==\n                    parent->box_[fixed_dim].first +\n                        parent->surface_thickness_[fixed_dim].value_or(0)) {\n              l[fixed_dim] =\n                  parent->box_[fixed_dim].second -\n                  parent->surface_thickness_[fixed_dim].value_or(0);\n            } else\n              ++l[fixed_dim];\n            point = Point(point.level(), l);\n            disp.reset();\n            return true;\n          } else\n            return false;\n        };\n\n        /**\n         * @brief Advances the iterator to the next surface point\n         *\n         * This function implements the logic for traversing the box surface by:\n         * (1) Incrementing displacement in non-fixed dimensions\n         * (2) Switching sides in the fixed dimension when needed\n         * (3) Moving to the next fixed dimension when current one is exhausted\n         *\n         * We filter out layers in (2) but not points within a layer in (1).\n         */\n        void advance() {\n          disp.reset();\n\n          auto increment_along_dim = [this](size_t dim) {\n            MADNESS_ASSERT(dim != fixed_dim);\n            Vector<Translation, NDIM> unit_displacement(0); unit_displacement[dim] = 1;\n            point = point.neighbor(unit_displacement);\n          };\n\n          // (1) try all displacements on current NDIM-1 dim layer\n          // loop structure is equivalent to NDIM-1 nested, independent for loops\n          // over the NDIM-1 dimension of the layer, with last dim as innermost loop\n          for (size_t i = NDIM; i > 0; --i) {\n            const size_t cur_dim = i - 1;\n            if (cur_dim == fixed_dim) continue;\n\n            if (point[cur_dim] < unprocessed_bounds[cur_dim].second) {\n              increment_along_dim(cur_dim);\n              return;\n            }\n            reset_along_dim(cur_dim);\n          }\n\n          // (2) move to the next surface layer normal to the fixed dimension\n          // if we can filter out the entire layer, do so.\n          while (next_surface_layer()) {\n            const auto filtered_out = [&,this]() {\n              bool result = false;\n              const auto& validator = this->parent->validator_;\n              if (validator) {\n                PointPattern point_pattern;\n                point_pattern[fixed_dim] = point[fixed_dim];\n                std::optional<Displacement> nulldisp;\n                result = !validator(point.level(), point_pattern, nulldisp);\n              }\n              return result;\n            };\n\n            if (!filtered_out())\n              return;\n          }\n\n          // we finished this fixed dimension, so update unprocessed bounds to exclude the layers of the current fixed dimension\n          // if box along this dimension is not hollow, the new interval would be [0, 0] - we are done!\n          if (parent->hollowness_[fixed_dim]) {\n            unprocessed_bounds[fixed_dim] = {\n                parent->box_[fixed_dim].first +\n                    parent->surface_thickness_[fixed_dim].value_or(0) + 1,\n                parent->box_[fixed_dim].second -\n                    parent->surface_thickness_[fixed_dim].value_or(0) - 1};\n          }\n          else {\n            done = true;\n            return;\n          }\n          // (3) switch to next fixed dimension with finite radius\n          ++fixed_dim;\n          while (!parent->box_radius_[fixed_dim] && fixed_dim < NDIM) {\n            ++fixed_dim;\n          }\n\n          // Exit if we've displaced along all dimensions of finite radius\n          if (fixed_dim >= NDIM) {\n            done = true;\n            return;\n          }\n\n          // reset our search along all non-fixed dimensions\n          // the reset along the fixed_dim returns silently\n          for (size_t i = 0; i < NDIM; ++i) {\n            reset_along_dim(i);\n          }\n        }\n\n        /// Perform advance, repeating if you are at a filtered point\n        void advance_till_valid() {\n          if (parent->validator_) {\n            const auto filtered_out = [&]() -> bool {\n              this->displacement(); // ensure disp is up to date\n              return !parent->validator_(point.level(), point.translation(), disp);\n            };\n\n            // if displacement has value, filter has already been applied to it, just advance it\n            if (!done && disp) this->advance();\n\n            while (!done && filtered_out()) {\n              this->advance();\n            }\n          }\n          else\n            this->advance();\n        }\n\n        // Recall that the surface is a union of hyperfaces, i.e., direct products of intervals.\n        // Reset state on dimension `dim` to initialize for the start of interval `dim` in the the current direct product\n        void reset_along_dim(size_t dim) {\n          const auto is_fixed_dim = dim == fixed_dim;\n          Vector<Translation, NDIM> l = point.translation();\n          Translation l_dim_min;\n          if (!is_fixed_dim) {\n            // This dimension is contiguous boxes on the hyperface.\n            // Initialize to the start.\n            l_dim_min = unprocessed_bounds[dim].first;\n          } else if (!parent->is_lattice_summed_[dim]) {\n            // This dimension consists of two finite-thickness hyperfaces, not lattice summed.\n            // Initialize to the start of the - hyperface. We trust next_surface_layer()\n            // to move to the + hyperface when ready.\n            l_dim_min = parent->box_[dim].first -\n                        parent->surface_thickness_[dim].value_or(0);\n          } else {\n            // This dimension consists of two finite-thickness hyperfaces, lattice summed.\n            // The two hyperfaces are the same interval shifted by parent->surface_radius_[dim]\n            // periods. So by lattice summation, the - hyperface is included. Initialize\n            // to the start of the + hyperface.\n            l_dim_min = parent->box_[dim].second -\n                        parent->surface_thickness_[dim].value_or(0);\n          }\n          if (parent->is_lattice_summed_[dim]) {\n            // By lattice summation, boxes that differ by a SimulationCell are equivalent.\n            // Therefore, we need to sum over equivalence classes and not displacements.\n            const auto period = 1 << parent->center_.level();\n            const Translation last_equiv_class = is_fixed_dim ? parent->box_[dim].second +\n              parent->surface_thickness_[dim].value_or(0) : unprocessed_bounds[dim].second;\n            const Translation first_equiv_class = last_equiv_class - period + 1;\n            l_dim_min = std::max(first_equiv_class, l_dim_min);\n          }\n          l[dim] = l_dim_min;\n\n          point = Point(point.level(), l);\n          disp.reset();\n\n          // if the entire surface layer is filtered out, pick the next one\n          if (dim == fixed_dim) {\n\n            const auto filtered_out = [&,this]() {\n              bool result = false;\n              const auto& validator = this->parent->validator_;\n              if (validator) {\n                PointPattern point_pattern;\n                point_pattern[fixed_dim] = point[fixed_dim];\n                std::optional<Displacement> nulldisp;\n                result = !validator(point.level(), point_pattern, nulldisp);\n              }\n              return result;\n            };\n\n            if (filtered_out()) {\n              bool have_another_surface_layer;\n              while ((have_another_surface_layer = next_surface_layer())) {\n                if (!filtered_out())\n                  break;\n              }\n              MADNESS_ASSERT(have_another_surface_layer);\n            }\n\n          }\n        };\n\n        /**\n         * @return displacement from the center to the current point\n         */\n        const std::optional<Displacement>& displacement() const {\n          if (!disp) {\n            disp = madness::displacement(parent->center_, point);\n          }\n          return disp;\n        }\n\n      public:\n        // Iterator type definitions for STL compatibility\n        using iterator_category = std::input_iterator_tag;\n        using value_type = Point;\n        using difference_type = std::ptrdiff_t;\n        using pointer = const Point*;\n        using reference = const Point&;\n\n        /**\n         * @brief Constructs an iterator\n         *\n         * @param p Pointer to the parent BoxSurfaceDisplacementRange\n         * @param type the type of iterator (Begin or End)\n         */\n        Iterator(const BoxSurfaceDisplacementRange* p, Type type)\n            : parent(p), point(parent->center_.level()), fixed_dim(type == End ? NDIM : 0), done(type == End) {\n          if (type != End) {\n            // skip to first dimensions with limited range\n            while (!parent->box_radius_[fixed_dim] && fixed_dim < NDIM) {\n              ++fixed_dim;\n            }\n\n            for (size_t d = 0; d != NDIM; ++d) {\n              // min/max displacements along this axis ... N.B. take into account surface thickness!\n              unprocessed_bounds[d] = parent->box_radius_[d] ? std::pair{parent->box_[d].first -\n                                parent->surface_thickness_[d].value_or(0),\n                         parent->box_[d].second +\n                             parent->surface_thickness_[d].value_or(0)} : parent->box_[d];\n              reset_along_dim(d);\n            }\n            advance_till_valid();\n          }\n        }\n\n        /**\n         * @brief Dereferences the iterator\n         * @return A const reference to the current displacement\n         */\n        reference operator*() const { return *displacement(); }\n\n        /**\n         * @brief Arrow operator for member access\n         * @return A const pointer to the current displacement\n         */\n        pointer operator->() const { return &(*(*this)); }\n\n        /**\n         * @brief Pre-increment operator\n         * @return Reference to this iterator after advancement\n         */\n        Iterator& operator++() {\n          advance_till_valid();\n          return *this;\n        }\n\n        /**\n         * @brief Post-increment operator\n         * @return Copy of the iterator before advancement\n         */\n        Iterator operator++(int) {\n          Iterator tmp = *this;\n          ++(*this);\n          return tmp;\n        }\n\n        /**\n         * @brief Equality comparison operator\n         * @param a First iterator\n         * @param b Second iterator\n         * @return true if iterators are equivalent\n         */\n        friend bool operator==(const Iterator& a, const Iterator& b) {\n          if (a.done && b.done) return true;\n          if (a.done || b.done) return false;\n          return a.fixed_dim == b.fixed_dim &&\n                 a.point == b.point;\n        }\n\n        /**\n         * @brief Inequality comparison operator\n         * @param a First iterator\n         * @param b Second iterator\n         * @return true if iterators are not equivalent\n         */\n        friend bool operator!=(const Iterator& a, const Iterator& b) {\n          return !(a == b);\n        }\n      };\n\n      friend class Iterator;\n\n    public:\n      /**\n       * @brief Constructs a box with different radii and thicknesses for each dimension\n       *\n       * @param center Center primitive box of the box. All displacements will share the `n` of this arg.\n       * @param box_radius Box radius in each dimension, in half-SimulationCells. Omit for dim `i` to signal that the bound for dim `i` is simply the simulation cell.\n       * @param surface_thickness Surface thickness in each dimension, measured in number of addl. boxes *on each half* of the surface box proper. Omit for dim `i` if and only if omitted in `box_radius`\n       * @param is_lattice_summed whether each dimension is lattice summed; along lattice summed dimensions only one side of the box is iterated over.\n       * @param validator Optional filter function (if returns false, displacement is dropped; default: no filter); it may update the displacement to make it valid as needed (e.g. map displacement to the simulation cell)\n       * @pre `surface_radius[d]>0 && surface_thickness[d]<=surface_radius[d]`\n       *\n       */\n      explicit BoxSurfaceDisplacementRange(const Key<NDIM>& center,\n                                           const std::array<std::optional<std::int64_t>, NDIM>& box_radius,\n                                           const std::array<std::optional<std::int64_t>, NDIM>& surface_thickness,\n                                           const array_of_bools<NDIM>& is_lattice_summed,\n                                           Validator validator = {})\n          : center_(center), box_radius_(box_radius),\n            surface_thickness_(surface_thickness), is_lattice_summed_(is_lattice_summed), validator_(std::move(validator)) {\n        // initialize bounds\n        bool has_finite_dimensions = false;\n        const auto n = center_.level();\n        Vector<Translation, NDIM> probing_displacement_vec(0);\n        for (size_t d=0; d!= NDIM; ++d) {\n          if (box_radius_[d]) {\n            auto r = *box_radius_[d];  // in units of 2^{n-1}\n            // n = 0 is special b/c << -1 is undefined\n            r = (n == 0) ? (r+1)/2 : (r * Translation(1) << (n-1));\n            MADNESS_ASSERT(r > 0);\n            box_[d] = {center_[d] - r, center_[d] + r};\n            if (!has_finite_dimensions) // first finite dimension? probing displacement will be nonzero along it, zero along all others\n              probing_displacement_vec[d] = r;\n            has_finite_dimensions = true;\n          } else {\n            box_[d] = {0, (1 << center_.level()) - 1};\n          }\n        }\n        MADNESS_ASSERT(has_finite_dimensions);\n        probing_displacement_ = Displacement(n, probing_displacement_vec);\n        for (size_t d=0; d!= NDIM; ++d) {\n          // surface thickness should be only given for finite-radius dimensions\n          MADNESS_ASSERT(!(box_radius_[d].has_value() ^ surface_thickness_[d].has_value()));\n          MADNESS_ASSERT(surface_thickness_[d].value_or(0) >= 0);\n          hollowness_[d] = surface_thickness_[d] ? (box_[d].first + surface_thickness_[d].value() < box_[d].second - surface_thickness_[d].value()) : false;\n        }\n      }\n\n      /**\n     * @brief Returns an iterator to the beginning of the surface points\n     * @return Iterator pointing to the first surface point\n       */\n      auto begin() const { return Iterator(this, Iterator::Begin); }\n\n      /**\n     * @brief Returns an iterator to the end of the surface points\n     * @return Iterator indicating the end of iteration\n       */\n      auto end() const { return Iterator(this, Iterator::End); }\n\n      //      /**\n      //     * @brief Returns a view over the surface points\n      //     *\n      //     * This operator allows the class to be used with C++20 ranges.\n      //     *\n      //     * @return A view over the surface points\n      //       */\n      //      auto operator()() const {\n      //        return std::ranges::subrange(begin(), end());\n      //      }\n\n      /* @return the center of the box\n       */\n      const Key<NDIM>& center() const { return center_; }\n\n      /**\n        * @return the radius of the box in each dimension\n       */\n      const std::array<std::optional<int64_t>, NDIM>& box_radius() const { return box_radius_; }\n\n      /**\n        * @return the surface thickness in each dimension\n       */\n      const std::array<std::optional<int64_t>, NDIM>& surface_thickness() const { return surface_thickness_; }\n\n      /**\n       * @return flags indicating whether each dimension is lattice summed\n       */\n      const array_of_bools<NDIM>& is_lattice_summed() const { return is_lattice_summed_; }\n\n      /**\n       * @return 'probing\" displacement to a nearby point *on* the surface; it may not necessarily be in the range of iteration (e.g., it may not be able to pass the filter) but is representative of the surface displacements for the purposes of screening\n       */\n      const Displacement& probing_displacement() const {\n        return probing_displacement_;\n      }\n    };  // BoxSurfaceDisplacementRange\n\n\n    /// This is used to filter out box surface displacements that\n    /// - take us outside of the target domain, or\n    /// - were already utilized as part of the the standard displacements list.\n    /// For dealing with the lattice-summed operators the filter\n    /// can adjusts the displacement to make sure that we end up in\n    /// the simulation cell.\n    template <size_t NDIM>\n    class BoxSurfaceDisplacementValidator {\n    public:\n      using Point = Key<NDIM>;\n      using PointPattern = Vector<std::optional<Translation>, NDIM>;\n      using Displacement = Key<NDIM>;\n      using Periodicity = array_of_bools<NDIM>;\n      using DistanceSquaredFunc = std::function<double(const Displacement&)>;\n\n      /// \\param is_infinite_domain whether the domain along each axis is finite (simulation cell) or infinite (the entire axis); if true for a given axis then any destination coordinate is valid, else only values in [0,2^n) are valid\n      /// \\param is_lattice_summed if true for a given axis, displacement to x and x+2^n are equivalent, hence will be canonicalized to end up in the simulation cell. Periodic axes imply infinite domain, whatever was passed to `is_infinite_domain`.\n      /// \\param range the kernel range for each axis\n      /// \\param default_distance_squared function that converts a displacement to its effective distance squared (effective may be different from the real distance squared due to periodicity)\n      /// \\param max_distsq_reached max effective distance squared reached by standard displacements\n      BoxSurfaceDisplacementValidator(\n          const array_of_bools<NDIM>& is_infinite_domain,\n          const array_of_bools<NDIM>& is_lattice_summed,\n          const std::array<KernelRange, NDIM>& range,\n          DistanceSquaredFunc default_distance_squared,\n          double max_distsq_reached\n          ) :\n              range_(range),\n              default_distance_squared_(default_distance_squared),\n              max_distsq_reached_(max_distsq_reached) {\n        for (size_t i = 0; i < NDIM; i++) {\n          if (is_lattice_summed[i]) {\n            domain_policies_[i] = ExtraDomainPolicy::Translate;\n          } else if (is_infinite_domain[i]) {\n            domain_policies_[i] = ExtraDomainPolicy::Keep;\n          } else {\n            domain_policies_[i] = ExtraDomainPolicy::Discard;\n          }\n        }\n      }\n\n      /// Apply filter to a displacement ending up at a point or a group of points (point pattern)\n\n      /// @param level the tree level\n      /// @param dest the target point (when all elements are nonnull) or point pattern (when only some are).\n      ///        The latter is useful to skip the entire surface layer. The\n      ///        point coordinates are only used to determine whether we end up\n      ///        in or out of the domain.\n      /// @param displacement the optional displacement; if given then will check if it's among\n      ///        the standard displacement and whether it was used as part of\n      ///        the standard displacement set; if it has not been used and the\n      ///        operator is lattice summed, the displacement will be adjusted\n      ///        to end up in the simulation cell. Primary use case for omitting `displacement`\n      ///        is if `dest` is not equivalent to a point.\n      /// @return true if the displacement is to be used\n      bool operator()(\n          const Level level,\n          const PointPattern& dest,\n          std::optional<Displacement>&  displacement\n      ) const {\n        // preliminaries\n        const auto twon = (static_cast<Translation>(1) << level);  // number of boxes along an axis\n        // map_to_range_twon(x) returns for x >= 0 ? x % 2^level : map_to_range_twon(x+2^level)\n        // idiv is generally slow, so instead use bit logic that relies on 2's complement representation of integers\n        const auto map_to_range_twon = [&, mask = ((~(static_cast<std::uint64_t>(0)) << (64-level)) >> (64-level))](std::int64_t x) -> std::int64_t {\n          const std::int64_t x_mapped = x & mask;\n          MADNESS_ASSERT(x_mapped >=0 && x_mapped < twon && (std::abs(x_mapped-x)%twon==0));\n          return x_mapped;\n        };\n\n        const auto out_of_domain = [&](const Translation& t) -> bool {\n          return t < 0 || t >= twon;\n        };\n\n        // check that dest is in the domain\n        const bool dest_is_in_domain = [&]() {\n          for(size_t d=0; d!=NDIM; ++d) {\n            if (domain_policies_[d] == ExtraDomainPolicy::Discard && dest[d].has_value() && out_of_domain(*dest[d])) return false;\n          }\n          return true;\n        }();\n\n        if (dest_is_in_domain) {\n          if (displacement.has_value()) {\n\n            // N.B. avoid duplicates of standard displacements previously included:\n            // A displacement has been possibly considered if along EVERY axis the \"effective\" displacement size\n            // fits within the box explored by the standard displacement.\n            // If so, skip if <= max magnitude of standard displacements encountered\n            // Otherwise this is a new non-standard displacement, consider it\n            bool among_standard_displacements = true;\n            for(size_t d=0; d!=NDIM; ++d) {\n              const auto disp_d = (*displacement)[d];\n              auto bmax_standard = Displacements<NDIM>::bmax_default();\n\n              // the effective displacement length depends on whether lattice summation is performed along it\n              // compare Displacements::make_disp vs Displacements::make_disp_periodic\n              auto disp_d_eff_abs = std::abs(disp_d);\n              if (domain_policies_[d] == ExtraDomainPolicy::Translate) {\n                // for \"periodic\" displacements the effective disp_d is the shortest of {..., disp_d-twon, disp_d, disp_d+twon, ...} ... see make_disp_periodic\n                const std::int64_t disp_d_eff = map_to_range_twon(disp_d);\n                disp_d_eff_abs = std::min(disp_d_eff,std::abs(disp_d_eff-twon));\n\n                // IMPORTANT for lattice-summed axes, if the destination is out of the simulation cell map the displacement back to the cell\n                // same logic as for disp_d: dest[d] -> dest[d] % twon\n                if (dest[d].has_value()) {\n                  const Translation dest_d = dest[d].value();\n                  const auto dest_d_in_cell = map_to_range_twon(dest_d);\n                  MADNESS_ASSERT(!out_of_domain(\n                      dest_d_in_cell));\n                  // adjust displacement[d] so that it produces dest_d_cell, not dest_d\n                  auto t = (*displacement).translation();\n                  t[d] += (dest_d_in_cell - dest_d);\n                  displacement.emplace(displacement->level(), t);\n                }\n\n                // N.B. bmax in make_disp_periodic is clipped in the same way\n                if (Displacements<NDIM>::bmax_default() >= twon) bmax_standard = twon-1;\n              }\n\n              if (disp_d_eff_abs > bmax_standard) {\n                among_standard_displacements = false;\n                // Do not break - this loop needs not only to determine among_standard_displacements but to shift the displacement if domain_is_periodic_\n                // Therefore, looping over all dim is strictly necessary.\n              }\n            }\n            if (among_standard_displacements) {\n              const auto distsq = default_distance_squared_(*displacement);\n              if (distsq > max_distsq_reached_) { // among standard displacements => keep if longer than the longest standard displacement considered\n                return true;\n              } {\n                return false;\n              }\n            }\n            else  // not among standard displacements => keep it\n              return true;\n          }\n          else  // skip the displacement-based filter if not given\n            return true;\n        }\n        else\n          return false;\n      }\n\n    private:\n      std::array<ExtraDomainPolicy, NDIM> domain_policies_;\n      std::array<KernelRange, NDIM> range_;\n      DistanceSquaredFunc default_distance_squared_;\n      double max_distsq_reached_;\n    };\n\n}  // namespace madness\n#endif // MADNESS_MRA_DISPLACEMENTS_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/funcdefaults.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MRA_FUNCDEFAULTS_H__INCLUDED\n#define MADNESS_MRA_FUNCDEFAULTS_H__INCLUDED\n\n\n/// \\file funcdefaults.h\n/// \\brief Provides FunctionDefaults and utilities for coordinate transformation\n/// \\ingroup mrabcext\n\n#include <madness/world/MADworld.h>\n#include <madness/world/vector.h>\n#include <madness/world/worlddc.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/gentensor.h>\n#include <madness/mra/bc.h>\n#include <madness/mra/key.h>\n\n#include <optional>\n\nnamespace madness {\n    template <typename T, std::size_t NDIM> class FunctionImpl;\n\n    /// The maximum wavelet order presently supported\n    static const int MAXK = 30;\n\n    /// The maximum depth of refinement possible\n    static const int MAXLEVEL = 8*sizeof(Translation)-2;\n\n    enum TreeState {\n    \treconstructed,\t\t\t\t///< s coeffs at the leaves only\n\t\tcompressed, \t\t\t\t///< d coeffs in internal nodes, s and d coeffs at the root\n\t\tnonstandard, \t\t\t\t///< s and d coeffs in internal nodes\n    \tnonstandard_with_leaves, \t///< like nonstandard, with s coeffs at the leaves\n        nonstandard_after_apply, \t///< s and d coeffs, state after operator application\n\t\tredundant,\t\t\t\t\t///< s coeffs everywhere\n        redundant_after_merge,\t\t///< s coeffs everywhere, must be summed up to yield the result\n\t\ton_demand,\t\t\t\t\t///< no coeffs anywhere, but a functor providing if necessary\n\t\tunknown\n    };\n\n    template<std::size_t NDIM=1>\n    std::ostream& operator<<(std::ostream& os, const TreeState treestate) {\n        if (treestate==reconstructed) os << \"reconstructed\";\n        else if (treestate==compressed) os << \"compressed\";\n        else if (treestate==nonstandard) os << \"nonstandard\";\n        else if (treestate==nonstandard_with_leaves) os << \"nonstandard_with_leaves\";\n        else if (treestate==nonstandard_after_apply) os << \"nonstandard_after_apply\";\n        else if (treestate==redundant) os << \"redundant\";\n        else if (treestate==redundant_after_merge) os << \"redundant_after_merge\";\n        else if (treestate==on_demand) os << \"on_demand\";\n        else if (treestate==unknown) os << \"unknown\";\n        else {\n            MADNESS_EXCEPTION(\"unknown treestate\",1);\n        }\n        return os;\n    }\n\n    /// FunctionDefaults holds default paramaters as static class members\n\n    /// Declared and initialized in mra.cc and/or funcimpl::initialize.\n    ///\n    /// Currently all functions of the same dimension share the same cell dimensions\n    /// since they are stored inside FunctionDefaults ... if you change the\n    /// cell dimensions *all* functions of that dimension are affected.\n    ///\n    /// N.B.  Ultimately, we may need to make these defaults specific to each\n    /// world, as should be all global state.\n    /// \\ingroup mra\n    template <std::size_t NDIM>\n    class FunctionDefaults {\n        MADNESS_PRAGMA_CLANG(diagnostic push)\n    \tMADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wundefined-var-template\")\n\n    private:\n        static int k;                  ///< Wavelet order\n        static double thresh;          ///< Truncation threshold\n        static int initial_level;      ///< Initial level for fine scale projection\n        static int special_level;      ///< Minimum level for fine scale projection of special boxes\n        static int max_refine_level;   ///< Level at which to stop refinement\n        static int truncate_mode;    ///< Truncation method\n        static bool refine;            ///< Whether to refine new functions\n        static bool autorefine;        ///< Whether to autorefine in multiplication, etc.\n        static bool debug;             ///< Controls output of debug info\n        static bool truncate_on_project; ///< If true initial projection inserts at n-1 not n\n        static bool apply_randomize;   ///< If true use randomization for load balancing in apply integral operator\n        static bool project_randomize; ///< If true use randomization for load balancing in project/refine\n        static std::optional<BoundaryConditions<NDIM>> bc; ///< Default boundary conditions, not initialized by default and must be set explicitly before use\n        static Tensor<double> cell ;   ///< cell[NDIM][2] Simulation cell, cell(0,0)=xlo, cell(0,1)=xhi, ...\n        static Tensor<double> cell_width;///< Width of simulation cell in each dimension\n        static Tensor<double> rcell_width; ///< Reciprocal of width\n        static double cell_volume;      ///< Volume of simulation cell\n        static double cell_min_width;   ///< Size of smallest dimension\n        static TensorType tt;\t\t\t///< structure of the tensor in FunctionNode\n        static std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > > pmap; ///< Default mapping of keys to processes\n        static int pmap_nproc; ///< Number of processes assumed by pmap, -1 indicates uninitialized pmap\n\n        static Tensor<double> make_default_cell() {\n          if (NDIM) {\n            Tensor<double> cell(NDIM, 2);\n            cell(_, 1) = 1.0;\n            return cell;\n          } else\n            return {};\n        }\n\n        static Tensor<double> make_default_cell_width() {\n          if (NDIM) {\n            Tensor<double> cell(NDIM);\n            cell(_) = 1.0;\n            return cell;\n          } else\n            return {};\n        }\n\n        static void recompute_cell_info() {\n            MADNESS_ASSERT(cell.dim(0)==NDIM && cell.dim(1)==2 && cell.ndim()==2);\n            cell_width = cell(_,1)-cell(_,0);\n            cell_volume = cell_width.product();\n            cell_min_width = cell_width.min();\n            rcell_width = copy(cell_width);\n            for (std::size_t i=0; i<NDIM; ++i) rcell_width(i) = 1.0/rcell_width(i);\n        }\n\n    public:\n\n\n\t\t/// Used to set defaults to k=7, thresh=1-5, for a unit cube [0,1].\n\t\t/// @warning does not reset the boundary conditions if they are already set\n\t\tstatic void set_defaults(World& world);\n\n        static void print();\n\n        /// Returns the default wavelet order\n        static int get_k() {\n        \treturn k;\n        }\n\n        /// Sets the default wavelet order\n\n        /// Existing functions are unaffacted.\n        static void set_k(int value) {\n        \tk=value;\n        \tMADNESS_ASSERT(k>0 && k<=MAXK);\n        }\n\n        /// Returns the default threshold\n        static const double& get_thresh() {\n        \treturn thresh;\n        }\n\n        /// Sets the default threshold\n\n        /// Existing functions are unaffected\n        static void set_thresh(double value) {\n        \tthresh=value;\n        }\n\n        /// Returns the default initial projection level\n        static int get_initial_level() {\n        \treturn initial_level;\n        }\n\n        /// Returns the default projection level for special boxes\n        static int get_special_level() {\n        \treturn special_level;\n        }\n\n        /// Sets the default initial projection level\n\n        /// Existing functions are unaffected\n        static void set_initial_level(int value) {\n        \tinitial_level=value;\n        \tMADNESS_ASSERT(value>0 && value<MAXLEVEL);\n        }\n\n        /// Existing functions are unaffected\n        static void set_special_level(int value) {\n        \tspecial_level=value;\n        \tMADNESS_ASSERT(value>=0 && value<MAXLEVEL);\n        \tMADNESS_ASSERT(max_refine_level>=special_level);\n        }\n\n        /// Gets the default maximum adaptive refinement level\n        static int get_max_refine_level() {\n        \treturn max_refine_level;\n        }\n\n        /// Sets the default maximum adaptive refinement level\n\n        /// Existing functions are unaffected\n        static void set_max_refine_level(int value) {\n        \tmax_refine_level=value;\n        \tMADNESS_ASSERT(value>0 && value<MAXLEVEL);\n        \tMADNESS_ASSERT(max_refine_level>=initial_level);\n        \tMADNESS_ASSERT(max_refine_level>=special_level);\n        }\n\n        /// Gets the default truncation mode\n        static int get_truncate_mode() {\n        \treturn truncate_mode;\n        }\n\n        /// Sets the default truncation mode\n\n        /// Existing functions are unaffected\n        static void set_truncate_mode(int value) {\n        \ttruncate_mode=value;\n        \tMADNESS_ASSERT(value>=0 && value<4);\n        }\n\n        /// Gets the default adaptive refinement flag\n        static bool get_refine() {\n        \treturn refine;\n        }\n\n        /// Sets the default adaptive refinement flag\n\n        /// Existing functions are unaffected\n        static void set_refine(bool value) {\n        \trefine=value;\n        }\n\n        /// Gets the default adaptive autorefinement flag\n        static bool get_autorefine() {\n        \treturn autorefine;\n        }\n\n        /// Sets the default adaptive autorefinement flag\n\n        /// Existing functions are unaffected\n        static void set_autorefine(bool value) {\n        \tautorefine=value;\n        }\n\n        /// Gets the default debug flag (is this used anymore?)\n        static bool get_debug() {\n        \treturn debug;\n        }\n\n        /// Sets the default debug flag (is this used anymore?)\n\n        /// Not sure if this does anything useful\n        static void set_debug(bool value) {\n        \tdebug=value;\n        }\n\n        /// Gets the default truncate on project flag\n        static bool get_truncate_on_project() {\n        \treturn truncate_on_project;\n        }\n\n        /// Sets the default truncate on project flag\n\n        /// Existing functions are unaffected\n        static void set_truncate_on_project(bool value) {\n        \ttruncate_on_project=value;\n        }\n\n        /// Gets the random load balancing for integral operators flag\n        static bool get_apply_randomize() {\n        \treturn apply_randomize;\n        }\n\n        /// Sets the random load balancing for integral operators flag\n        static void set_apply_randomize(bool value) {\n        \tapply_randomize=value;\n        }\n\n\n        /// Gets the random load balancing for projection flag\n        static bool get_project_randomize() {\n        \treturn project_randomize;\n        }\n\n        /// Sets the random load balancing for projection flag\n        static void set_project_randomize(bool value) {\n        \tproject_randomize=value;\n        }\n\n        /// Returns the default boundary conditions\n        static const BoundaryConditions<NDIM>& get_bc() {\n          if (!bc.has_value()) {\n            const std::string msg = \"FunctionDefaults<\" + std::to_string(NDIM) + \">::get_bc: must initialize boundary conditions by set_bc or set_defaults or startup\";\n            MADNESS_EXCEPTION(msg.c_str(), 1);\n          }\n          return bc.value();\n        }\n\n        /// Sets the default boundary conditions\n        static void set_bc(const BoundaryConditions<NDIM>& value) {\n        \tbc=value;\n        }\n\n        /// Returns the default tensor type\n        static TensorType get_tensor_type() {\n        \treturn tt;\n        }\n\n        /// Sets the default tensor type\n        static void set_tensor_type(const TensorType& t) {\n#if HAVE_GENTENSOR\n        \ttt=t;\n#else\n        \ttt=TT_FULL;\n#endif\n        }\n\n        /// adapt the special level to resolve the smallest length scale\n        static int set_length_scale(const double lo,const size_t k=get_k()) {\n        \tconst double dk = (double) k;\n        \tdouble Lmax=FunctionDefaults<NDIM>::get_cell_width().max();\n        \tdouble lo_sim=lo/Lmax;  // lo in simulation coordinates;\n        \tconst int special_level=Level(-log2(lo_sim*dk));\n        \treturn special_level;\n        }\n\n        /// Gets the user cell for the simulation\n        static const Tensor<double>& get_cell() {\n        \treturn cell;\n        }\n\n    \t/// clear user cell -- will be reset once a function is loaded from file\n\n    \t/// Existing functions are probably rendered useless\n    \tstatic void clear_cell() {\n\t        cell.clear();\n            cell_width.clear();\n            rcell_width.clear();\n            cell_volume = 0.0;\n            cell_min_width = 0.0;\n        }\n\n        /// Sets the user cell for the simulation\n\n        /// Existing functions are probably rendered useless\n        static void set_cell(const Tensor<double>& value) {\n        \tcell=copy(value);\n        \trecompute_cell_info();\n        }\n\n        /// Sets the user cell to be cubic with each dimension having range \\c [lo,hi]\n\n        /// Existing functions are probably rendered useless\n        static void set_cubic_cell(double lo, double hi) {\n        \tcell(_,0)=lo;\n        \tcell(_,1)=hi;\n        \trecompute_cell_info();\n        }\n\n        /// Returns the width of each user cell dimension\n        static const Tensor<double>& get_cell_width() {\n        \treturn cell_width;\n        }\n\n        /// Returns the reciprocal of the width of each user cell dimension\n        static const Tensor<double>& get_rcell_width() {\n        \treturn rcell_width;\n        }\n\n        /// Returns the minimum width of any user cell dimension\n        static double get_cell_min_width() {\n        \treturn cell_min_width;\n        }\n\n        /// Returns the volume of the user cell\n        static double get_cell_volume() {\n        \treturn cell_volume;\n        }\n\n        /// Returns the default process map that was last initialized via set_default_pmap()\n        static std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& get_pmap() {\n          if (pmap)\n            return pmap;\n          else { // try to initialize to default, if not yet\n            if (initialized()) {\n              set_default_pmap(World::get_default());\n              return pmap;\n            }\n            else\n              return pmap; // null ptr if uninitialized\n          }\n        }\n\n    /// Returns number of the default processes returned by get_pmap()\n    static int get_pmap_nproc() {\n        return pmap_nproc;\n    }\n\n    /// Returns the default process map that can be used with the given world\n    static std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > > get_pmap(World& world) {\n        if (get_pmap_nproc() == world.nproc()) {\n            return get_pmap();\n        }\n        else {\n            return make_default_pmap(world);\n        }\n    }\n\n        /// Sets the default process map (does \\em not redistribute existing functions)\n\n        /// Existing functions are probably rendered useless\n        static void set_pmap(const std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& value) {\n        \tpmap = value;\n        }\n\n        /// Makes a default process map for the given \\p world\n        static std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > > make_default_pmap(World& world);\n\n    \t/// Sets the default process map for the use with WorldObjects in \\p world\n    \t/// @note sets default pmap to `make_default_pmap(world)`\n        static void set_default_pmap(World& world);\n\n        /// Sets the default process map and redistributes all functions using the old map\n        static void redistribute(World& world, const std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& newpmap) {\n        \tpmap->redistribute(world,newpmap);\n        \tpmap = newpmap;\n        }\n\n        MADNESS_PRAGMA_CLANG(diagnostic pop)\n\n    };\n\n    /// Convert user coords (cell[][]) to simulation coords ([0,1]^ndim)\n    template <std::size_t NDIM>\n    static inline void user_to_sim(const Vector<double,NDIM>& xuser, Vector<double,NDIM>& xsim) {\n        for (std::size_t i=0; i<NDIM; ++i)\n            xsim[i] = (xuser[i] - FunctionDefaults<NDIM>::get_cell()(i,0)) * FunctionDefaults<NDIM>::get_rcell_width()[i];\n    }\n\n    /// Returns the box at level n that contains the given point in simulation coordinates\n    /// @param[in] pt point in simulation coordinates\n    /// @param[in] n the level of the box\n    template <typename T, std::size_t NDIM>\n    static inline Key<NDIM> simpt2key(const Vector<T,NDIM>& pt, Level n){\n        Vector<Translation,NDIM> l;\n        double twon = std::pow(2.0, double(n));\n        for (std::size_t i=0; i<NDIM; ++i) {\n            l[i] = Translation(twon*pt[i]);\n        }\n        return Key<NDIM>(n,l);\n    }\n\n    /// Convert simulation coords ([0,1]^ndim) to user coords (FunctionDefaults<NDIM>::get_cell())\n    template <std::size_t NDIM>\n    static void sim_to_user(const Vector<double,NDIM>& xsim, Vector<double,NDIM>& xuser) {\n        for (std::size_t i=0; i<NDIM; ++i)\n            xuser[i] = xsim[i]*FunctionDefaults<NDIM>::get_cell_width()[i] + FunctionDefaults<NDIM>::get_cell()(i,0);\n    }\n\n\n}\n#endif // MADNESS_MRA_FUNCDEFAULTS_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/funcimpl.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MRA_FUNCIMPL_H__INCLUDED\n#define MADNESS_MRA_FUNCIMPL_H__INCLUDED\n\n/// \\file funcimpl.h\n/// \\brief Provides FunctionCommonData, FunctionImpl and FunctionFactory\n\n#include <madness/world/MADworld.h>\n#include <madness/world/print.h>\n#include <madness/misc/misc.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/gentensor.h>\n\n#include <madness/mra/function_common_data.h>\n#include <madness/mra/indexit.h>\n#include <madness/mra/key.h>\n#include <madness/mra/funcdefaults.h>\n#include <madness/mra/function_factory.h>\n#include <madness/mra/displacements.h>\n\n#include <madness/mra/leafop.h>\n\n#include <array>\n#include <iostream>\n#include <type_traits>\n\nnamespace madness {\n    template <typename T, std::size_t NDIM>\n    class DerivativeBase;\n\n    template<typename T, std::size_t NDIM>\n    class FunctionImpl;\n\n    template<typename T, std::size_t NDIM>\n    class FunctionNode;\n\n    template<typename T, std::size_t NDIM>\n    class Function;\n\n    template<typename T, std::size_t NDIM>\n    class FunctionFactory;\n\n    template<typename T, std::size_t NDIM, std::size_t MDIM>\n    class CompositeFunctorInterface;\n\n    template<int D>\n    class LoadBalImpl;\n\n}\n\nnamespace madness {\n\n\n    /// A simple process map\n    template<typename keyT>\n    class SimplePmap : public WorldDCPmapInterface<keyT> {\n    private:\n        const int nproc;\n        const ProcessID me;\n\n    public:\n        SimplePmap(World& world) : nproc(world.nproc()), me(world.rank())\n        { }\n\n        ProcessID owner(const keyT& key) const {\n            if (key.level() == 0)\n                return 0;\n            else\n                return key.hash() % nproc;\n        }\n    };\n\n    /// A pmap that locates children on odd levels with their even level parents\n    template <typename keyT>\n    class LevelPmap : public WorldDCPmapInterface<keyT> {\n    private:\n        const int nproc;\n    public:\n        LevelPmap() : nproc(0) {};\n\n        LevelPmap(World& world) : nproc(world.nproc()) {}\n\n        /// Find the owner of a given key\n        ProcessID owner(const keyT& key) const {\n            Level n = key.level();\n            if (n == 0) return 0;\n            hashT hash;\n            if (n <= 3 || (n&0x1)) hash = key.hash();\n            else hash = key.parent().hash();\n            return hash%nproc;\n        }\n    };\n\n\n    /// FunctionNode holds the coefficients, etc., at each node of the 2^NDIM-tree\n    template<typename T, std::size_t NDIM>\n    class FunctionNode {\n    public:\n    \ttypedef GenTensor<T> coeffT;\n    \ttypedef Tensor<T> tensorT;\n    private:\n        // Should compile OK with these volatile but there should\n        // be no need to set as volatile since the container internally\n        // stores the entire entry as volatile\n\n        coeffT _coeffs; ///< The coefficients, if any\n        double _norm_tree; ///< After norm_tree will contain norm of coefficients summed up tree\n        bool _has_children; ///< True if there are children\n        coeffT buffer; ///< The coefficients, if any\n        double dnorm=-1.0;\t///< norm of the d coefficients, also defined if there are no d coefficients\n        double snorm=-1.0;\t///< norm of the s coefficients\n\n    public:\n        typedef WorldContainer<Key<NDIM> , FunctionNode<T, NDIM> > dcT; ///< Type of container holding the nodes\n        /// Default constructor makes node without coeff or children\n        FunctionNode() :\n            _coeffs(), _norm_tree(1e300), _has_children(false) {\n        }\n\n        /// Constructor from given coefficients with optional children\n\n        /// Note that only a shallow copy of the coeff are taken so\n        /// you should pass in a deep copy if you want the node to\n        /// take ownership.\n        explicit\n        FunctionNode(const coeffT& coeff, bool has_children = false) :\n            _coeffs(coeff), _norm_tree(1e300), _has_children(has_children) {\n        }\n\n        explicit\n        FunctionNode(const coeffT& coeff, double norm_tree, bool has_children) :\n            _coeffs(coeff), _norm_tree(norm_tree), _has_children(has_children) {\n        }\n\n        explicit\n        FunctionNode(const coeffT& coeff, double norm_tree, double snorm, double dnorm, bool has_children) :\n\t  _coeffs(coeff), _norm_tree(norm_tree), _has_children(has_children), dnorm(dnorm), snorm(snorm) {\n        }\n\n        FunctionNode(const FunctionNode<T, NDIM>& other) :\n            _coeffs(other._coeffs), _norm_tree(other._norm_tree), _has_children(other._has_children),\n            dnorm(other.dnorm), snorm(other.snorm) {\n        }\n\n        FunctionNode<T, NDIM>&\n        operator=(const FunctionNode<T, NDIM>& other) {\n            if (this != &other) {\n                coeff() = copy(other.coeff());\n                _norm_tree = other._norm_tree;\n                _has_children = other._has_children;\n                dnorm=other.dnorm;\n                snorm=other.snorm;\n                _norm_tree=other._norm_tree;\n            }\n            return *this;\n        }\n\n        /// Copy with possible type conversion of coefficients, copying all other state\n\n        /// Choose to not overload copy and type conversion operators\n        /// so there are no automatic type conversions.\n        template<typename Q>\n        FunctionNode<Q, NDIM>\n        convert() const {\n            return FunctionNode<Q, NDIM> (madness::convert<Q,T>(coeff()), _norm_tree, snorm, dnorm, _has_children);\n        }\n\n        /// Returns true if there are coefficients in this node\n        bool\n        has_coeff() const {\n            return _coeffs.has_data();\n        }\n\n\n        /// Returns true if this node has children\n        bool\n        has_children() const {\n            return _has_children;\n        }\n\n        /// Returns true if this does not have children\n        bool\n        is_leaf() const {\n            return !_has_children;\n        }\n\n        /// Returns true if this node is invalid (no coeffs and no children)\n        bool\n        is_invalid() const {\n            return !(has_coeff() || has_children());\n        }\n\n        /// Returns a non-const reference to the tensor containing the coeffs\n\n        /// Returns an empty tensor if there are no coefficients.\n        coeffT&\n        coeff() {\n            MADNESS_ASSERT(_coeffs.ndim() == -1 || (_coeffs.dim(0) <= 2\n                                                    * MAXK && _coeffs.dim(0) >= 0));\n            return const_cast<coeffT&>(_coeffs);\n        }\n\n        /// Returns a const reference to the tensor containing the coeffs\n\n        /// Returns an empty tensor if there are no coefficeints.\n        const coeffT&\n        coeff() const {\n            return const_cast<const coeffT&>(_coeffs);\n        }\n\n        /// Returns the number of coefficients in this node\n        size_t size() const {\n            return _coeffs.size();\n        }\n\n    public:\n\n        /// reduces the rank of the coefficients (if applicable)\n        void reduceRank(const double& eps) {\n            _coeffs.reduce_rank(eps);\n        }\n\n        /// Sets \\c has_children attribute to value of \\c flag.\n        void set_has_children(bool flag) {\n            _has_children = flag;\n        }\n\n        /// Sets \\c has_children attribute to true recurring up to ensure connected\n        void set_has_children_recursive(const typename FunctionNode<T,NDIM>::dcT& c,const Key<NDIM>& key) {\n            //madness::print(\"   set_chi_recu: \", key, *this);\n            //PROFILE_MEMBER_FUNC(FunctionNode); // Too fine grain for routine profiling\n            if (!(has_children() || has_coeff() || key.level()==0)) {\n                // If node already knows it has children or it has\n                // coefficients then it must already be connected to\n                // its parent.  If not, the node was probably just\n                // created for this operation and must be connected to\n                // its parent.\n                Key<NDIM> parent = key.parent();\n                // Task on next line used to be TaskAttributes::hipri()) ... but deferring execution of this\n                // makes sense since it is not urgent and lazy connection will likely mean that less forwarding\n                // will happen since the upper level task will have already made the connection.\n                const_cast<dcT&>(c).task(parent, &FunctionNode<T,NDIM>::set_has_children_recursive, c, parent);\n                //const_cast<dcT&>(c).send(parent, &FunctionNode<T,NDIM>::set_has_children_recursive, c, parent);\n                //madness::print(\"   set_chi_recu: forwarding\",key,parent);\n            }\n            _has_children = true;\n        }\n\n        /// Sets \\c has_children attribute to value of \\c !flag\n        void set_is_leaf(bool flag) {\n            _has_children = !flag;\n        }\n\n        /// Takes a \\em shallow copy of the coeff --- same as \\c this->coeff()=coeff\n        void set_coeff(const coeffT& coeffs) {\n            coeff() = coeffs;\n            if ((_coeffs.has_data()) and ((_coeffs.dim(0) < 0) || (_coeffs.dim(0)>2*MAXK))) {\n                print(\"set_coeff: may have a problem\");\n                print(\"set_coeff: coeff.dim[0] =\", coeffs.dim(0), \", 2* MAXK =\", 2*MAXK);\n            }\n            MADNESS_ASSERT(coeffs.dim(0)<=2*MAXK && coeffs.dim(0)>=0);\n        }\n\n        /// Clears the coefficients (has_coeff() will subsequently return false)\n        void clear_coeff() {\n            coeff()=coeffT();\n        }\n\n        /// Scale the coefficients of this node\n        template <typename Q>\n        void scale(Q a) {\n            _coeffs.scale(a);\n        }\n\n        /// Sets the value of norm_tree\n        void set_norm_tree(double norm_tree) {\n            _norm_tree = norm_tree;\n        }\n\n        /// Gets the value of norm_tree\n        double get_norm_tree() const {\n            return _norm_tree;\n        }\n\n        /// return the precomputed norm of the (virtual) d coefficients\n        double get_dnorm() const {\n        \treturn dnorm;\n        }\n\n        /// set the precomputed norm of the (virtual) s coefficients\n        void set_snorm(const double sn) {\n            snorm=sn;\n        }\n\n        /// set the precomputed norm of the (virtual) d coefficients\n        void set_dnorm(const double dn) {\n        \tdnorm=dn;\n        }\n\n        /// get the precomputed norm of the (virtual) s coefficients\n        double get_snorm() const {\n            return snorm;\n        }\n\n        void recompute_snorm_and_dnorm(const FunctionCommonData<T,NDIM>& cdata) {\n            snorm = 0.0;\n            dnorm = 0.0;\n            if (coeff().size() == 0) { ;\n            } else if (coeff().dim(0) == cdata.vk[0]) {\n                snorm = coeff().normf();\n\n            } else if (coeff().is_full_tensor()) {\n                Tensor<T> c = copy(coeff().get_tensor());\n                snorm = c(cdata.s0).normf();\n                c(cdata.s0) = 0.0;\n                dnorm = c.normf();\n\n            } else if (coeff().is_svd_tensor()) {\n                coeffT c= coeff()(cdata.s0);\n                snorm = c.normf();\n                double norm = coeff().normf();\n                dnorm = sqrt(norm * norm - snorm * snorm);\n\n            } else {\n                MADNESS_EXCEPTION(\"cannot use compute_dnorm\", 1);\n            }\n        }\n\n\n        /// General bi-linear operation --- this = this*alpha + other*beta\n\n        /// This/other may not have coefficients.  Has_children will be\n        /// true in the result if either this/other have children.\n        template <typename Q, typename R>\n        void gaxpy_inplace(const T& alpha, const FunctionNode<Q,NDIM>& other, const R& beta) {\n            //PROFILE_MEMBER_FUNC(FuncNode);  // Too fine grain for routine profiling\n            if (other.has_children())\n                _has_children = true;\n            if (has_coeff()) {\n                if (other.has_coeff()) {\n                    coeff().gaxpy(alpha,other.coeff(),beta);\n                }\n                else {\n                    coeff().scale(alpha);\n                }\n            }\n            else if (other.has_coeff()) {\n                coeff() = other.coeff()*beta; //? Is this the correct type conversion?\n            }\n        }\n\n        /// Accumulate inplace and if necessary connect node to parent\n        void accumulate2(const tensorT& t, const typename FunctionNode<T,NDIM>::dcT& c,\n                           const Key<NDIM>& key) {\n\t  // double cpu0=cpu_time();\n            if (has_coeff()) {\n            \tMADNESS_ASSERT(coeff().is_full_tensor());\n                //            \tif (coeff().type==TT_FULL) {\n                coeff() += coeffT(t,-1.0,TT_FULL);\n                //            \t} else {\n                //            \t\ttensorT cc=coeff().full_tensor_copy();;\n                //            \t\tcc += t;\n                //            \t\tcoeff()=coeffT(cc,args);\n                //            \t}\n            }\n            else {\n                // No coeff and no children means the node is newly\n                // created for this operation and therefore we must\n                // tell its parent that it exists.\n            \tcoeff() = coeffT(t,-1.0,TT_FULL);\n                //                coeff() = copy(t);\n                //                coeff() = coeffT(t,args);\n                if ((!_has_children) && key.level()> 0) {\n                    Key<NDIM> parent = key.parent();\n\t\t    if (c.is_local(parent))\n\t\t\tconst_cast<dcT&>(c).send(parent, &FunctionNode<T,NDIM>::set_has_children_recursive, c, parent);\n\t\t    else\n\t\t      const_cast<dcT&>(c).task(parent, &FunctionNode<T,NDIM>::set_has_children_recursive, c, parent);\n                }\n            }\n            //double cpu1=cpu_time();\n        }\n\n\n        /// Accumulate inplace and if necessary connect node to parent\n        void accumulate(const coeffT& t, const typename FunctionNode<T,NDIM>::dcT& c,\n                          const Key<NDIM>& key, const TensorArgs& args) {\n            if (has_coeff()) {\n                coeff().add_SVD(t,args.thresh);\n                if (buffer.rank()<coeff().rank()) {\n                    if (buffer.has_data()) {\n                        buffer.add_SVD(coeff(),args.thresh);\n                    } else {\n                        buffer=copy(coeff());\n                    }\n                    coeff()=coeffT();\n                }\n\n            } else {\n                // No coeff and no children means the node is newly\n                // created for this operation and therefore we must\n                // tell its parent that it exists.\n            \tcoeff() = copy(t);\n                if ((!_has_children) && key.level()> 0) {\n                    Key<NDIM> parent = key.parent();\n\t\t    if (c.is_local(parent)) \n\t\t      const_cast<dcT&>(c).send(parent, &FunctionNode<T,NDIM>::set_has_children_recursive, c, parent);\n\t\t    else\n\t\t      const_cast<dcT&>(c).task(parent, &FunctionNode<T,NDIM>::set_has_children_recursive, c, parent);\n                }\n            }\n        }\n\n        void consolidate_buffer(const TensorArgs& args) {\n            if ((coeff().has_data()) and (buffer.has_data())) {\n                coeff().add_SVD(buffer,args.thresh);\n            } else if (buffer.has_data()) {\n                coeff()=buffer;\n            }\n            buffer=coeffT();\n        }\n\n        T trace_conj(const FunctionNode<T,NDIM>& rhs) const {\n            return this->_coeffs.trace_conj((rhs._coeffs));\n        }\n\n        template <typename Archive>\n        void serialize(Archive& ar) {\n            ar & coeff() & _has_children & _norm_tree & dnorm & snorm;\n        }\n\n        /// like operator<<(ostream&, const FunctionNode<T,NDIM>&) but\n        /// produces a sequence JSON-formatted key-value pairs\n        /// @warning enclose the output in curly braces to make\n        /// a valid JSON object\n        void print_json(std::ostream& s) const {\n            s << \"\\\"has_coeff\\\":\" << this->has_coeff()\n              << \",\\\"has_children\\\":\" << this->has_children() << \",\\\"norm\\\":\";\n            double norm = this->has_coeff() ? this->coeff().normf() : 0.0;\n            if (norm < 1e-12)\n                norm = 0.0;\n            double nt = this->get_norm_tree();\n            if (nt == 1e300)\n                nt = 0.0;\n            s << norm << \",\\\"norm_tree\\\":\" << nt << \",\\\"snorm\\\":\"\n              << this->get_snorm() << \",\\\"dnorm\\\":\" << this->get_dnorm()\n              << \",\\\"rank\\\":\" << this->coeff().rank();\n            if (this->coeff().is_assigned())\n                s << \",\\\"dim\\\":\" << this->coeff().dim(0);\n        }\n\n    };\n\n    template <typename T, std::size_t NDIM>\n    std::ostream& operator<<(std::ostream& s, const FunctionNode<T,NDIM>& node) {\n        s << \"(has_coeff=\" << node.has_coeff() << \", has_children=\" << node.has_children() << \", norm=\";\n        double norm = node.has_coeff() ? node.coeff().normf() : 0.0;\n        if (norm < 1e-12)\n            norm = 0.0;\n        double nt = node.get_norm_tree();\n        if (nt == 1e300) nt = 0.0;\n        s << norm << \", norm_tree, s/dnorm =\" << nt << \", \" << node.get_snorm() << \" \" << node.get_dnorm() << \"), rank=\"<< node.coeff().rank()<<\")\";\n        if (node.coeff().is_assigned()) s << \" dim \" << node.coeff().dim(0) << \" \";\n        return s;\n    }\n\n\n    /// returns true if the result of a hartree_product is a leaf node (compute norm & error)\n    template<typename T, size_t NDIM>\n    struct hartree_leaf_op {\n\n        typedef FunctionImpl<T,NDIM> implT;\n        const FunctionImpl<T,NDIM>* f;\n        long k;\n        bool do_error_leaf_op() const {return false;}\n\n        hartree_leaf_op() = default;\n        hartree_leaf_op(const implT* f, const long& k) : f(f), k(k) {}\n\n        /// no pre-determination\n        bool operator()(const Key<NDIM>& key) const {return false;}\n\n        /// no post-determination\n        bool operator()(const Key<NDIM>& key, const GenTensor<T>& coeff) const {\n            MADNESS_EXCEPTION(\"no post-determination in hartree_leaf_op\",1);\n            return true;\n        }\n\n        /// post-determination: true if f is a leaf and the result is well-represented\n\n        /// @param[in]  key the hi-dimensional key (breaks into keys for f and g)\n        /// @param[in]  fcoeff coefficients of f of its appropriate key in NS form\n        /// @param[in]  gcoeff coefficients of g of its appropriate key in NS form\n        bool operator()(const Key<NDIM>& key, const Tensor<T>& fcoeff, const Tensor<T>& gcoeff) const {\n\n            if (key.level()<2) return false;\n            Slice s = Slice(0,k-1);\n            std::vector<Slice> s0(NDIM/2,s);\n\n            const double tol=f->get_thresh();\n            const double thresh=f->truncate_tol(tol, key)*0.3;      // custom factor to \"ensure\" accuracy\n            // include the wavelets in the norm, makes it much more accurate\n            const double fnorm=fcoeff.normf();\n            const double gnorm=gcoeff.normf();\n\n            // if the final norm is small, perform the hartree product and return\n            const double norm=fnorm*gnorm;  // computing the outer product\n            if (norm < thresh) return true;\n\n            // norm of the scaling function coefficients\n            const double sfnorm=fcoeff(s0).normf();\n            const double sgnorm=gcoeff(s0).normf();\n\n            // get the error of both functions and of the pair function;\n            // need the abs for numerics: sfnorm might be equal fnorm.\n            const double ferror=sqrt(std::abs(fnorm*fnorm-sfnorm*sfnorm));\n            const double gerror=sqrt(std::abs(gnorm*gnorm-sgnorm*sgnorm));\n\n            // if the expected error is small, perform the hartree product and return\n            const double error=fnorm*gerror + ferror*gnorm + ferror*gerror;\n            //            const double error=sqrt(fnorm*fnorm*gnorm*gnorm - sfnorm*sfnorm*sgnorm*sgnorm);\n\n            if (error < thresh) return true;\n            return false;\n        }\n        template <typename Archive> void serialize (Archive& ar) {\n            ar & f & k;\n        }\n    };\n\n    /// returns true if the result of the convolution operator op with some provided\n    /// coefficients will be small\n    template<typename T, size_t NDIM, typename opT>\n    struct op_leaf_op {\n        typedef FunctionImpl<T,NDIM> implT;\n\n        const opT* op;    ///< the convolution operator\n        const implT* f;   ///< the source or result function, needed for truncate_tol\n        bool do_error_leaf_op() const {return true;}\n\n        op_leaf_op() = default;\n        op_leaf_op(const opT* op, const implT* f) : op(op), f(f) {}\n\n        /// pre-determination: we can't know if this will be a leaf node before we got the final coeffs\n        bool operator()(const Key<NDIM>& key) const {return true;}\n\n        /// post-determination: return true if operator and coefficient norms are small\n        bool operator()(const Key<NDIM>& key, const GenTensor<T>& coeff) const {\n            if (key.level()<2) return false;\n            const double cnorm=coeff.normf();\n            return this->operator()(key,cnorm);\n        }\n\n        /// post-determination: return true if operator and coefficient norms are small\n        bool operator()(const Key<NDIM>& key, const double& cnorm) const {\n            if (key.level()<2) return false;\n\n            typedef Key<opT::opdim> opkeyT;\n            const opkeyT source=op->get_source_key(key);\n\n            const double thresh=f->truncate_tol(f->get_thresh(),key);\n            const std::vector<opkeyT>& disp = op->get_disp(key.level());\n            const opkeyT& d = *disp.begin();         // use the zero-displacement for screening\n            const double opnorm = op->norm(key.level(), d, source);\n            const double norm=opnorm*cnorm;\n            return norm<thresh;\n\n        }\n\n        template <typename Archive> void serialize (Archive& ar) {\n            ar & op & f;\n        }\n\n    };\n\n\n    /// returns true if the result of a hartree_product is a leaf node\n    /// criteria are error, norm and its effect on a convolution operator\n    template<typename T, size_t NDIM, size_t LDIM, typename opT>\n    struct hartree_convolute_leaf_op {\n\n        typedef FunctionImpl<T,NDIM> implT;\n        typedef FunctionImpl<T,LDIM> implL;\n\n        const FunctionImpl<T,NDIM>* f;\n        const implL* g;     // for use of its cdata only\n        const opT* op;\n        bool do_error_leaf_op() const {return false;}\n\n        hartree_convolute_leaf_op() = default;\n        hartree_convolute_leaf_op(const implT* f, const implL* g, const opT* op)\n            : f(f), g(g), op(op) {}\n\n        /// no pre-determination\n        bool operator()(const Key<NDIM>& key) const {return true;}\n\n        /// no post-determination\n        bool operator()(const Key<NDIM>& key, const GenTensor<T>& coeff) const {\n            MADNESS_EXCEPTION(\"no post-determination in hartree_convolute_leaf_op\",1);\n            return true;\n        }\n\n        /// post-determination: true if f is a leaf and the result is well-represented\n\n        /// @param[in]  key the hi-dimensional key (breaks into keys for f and g)\n        /// @param[in]  fcoeff coefficients of f of its appropriate key in NS form\n        /// @param[in]  gcoeff coefficients of g of its appropriate key in NS form\n        bool operator()(const Key<NDIM>& key, const Tensor<T>& fcoeff, const Tensor<T>& gcoeff) const {\n            //        bool operator()(const Key<NDIM>& key, const GenTensor<T>& coeff) const {\n\n            if (key.level()<2) return false;\n\n            const double tol=f->get_thresh();\n            const double thresh=f->truncate_tol(tol, key);\n            // include the wavelets in the norm, makes it much more accurate\n            const double fnorm=fcoeff.normf();\n            const double gnorm=gcoeff.normf();\n\n            // norm of the scaling function coefficients\n            const double sfnorm=fcoeff(g->get_cdata().s0).normf();\n            const double sgnorm=gcoeff(g->get_cdata().s0).normf();\n\n            // if the final norm is small, perform the hartree product and return\n            const double norm=fnorm*gnorm;  // computing the outer product\n            if (norm < thresh) return true;\n\n            // get the error of both functions and of the pair function\n            const double ferror=sqrt(fnorm*fnorm-sfnorm*sfnorm);\n            const double gerror=sqrt(gnorm*gnorm-sgnorm*sgnorm);\n\n            // if the expected error is small, perform the hartree product and return\n            const double error=fnorm*gerror + ferror*gnorm + ferror*gerror;\n            if (error < thresh) return true;\n\n            // now check if the norm of this and the norm of the operator are significant\n            const std::vector<Key<NDIM> >& disp = op->get_disp(key.level());\n            const Key<NDIM>& d = *disp.begin();         // use the zero-displacement for screening\n            const double opnorm = op->norm(key.level(), d, key);\n            const double final_norm=opnorm*sfnorm*sgnorm;\n            if (final_norm < thresh) return true;\n\n            return false;\n        }\n        template <typename Archive> void serialize (Archive& ar) {\n            ar & f & op;\n        }\n    };\n\n    template<typename T, size_t NDIM>\n    struct noop {\n    \tvoid operator()(const Key<NDIM>& key, const GenTensor<T>& coeff, const bool& is_leaf) const {}\n        bool operator()(const Key<NDIM>& key, const GenTensor<T>& fcoeff, const GenTensor<T>& gcoeff) const {\n            MADNESS_EXCEPTION(\"in noop::operator()\",1);\n            return true;\n        }\n        template <typename Archive> void serialize (Archive& ar) {}\n\n    };\n\n    /// insert/replaces the coefficients into the function\n    template<typename T, std::size_t NDIM>\n    struct insert_op {\n    \ttypedef FunctionImpl<T,NDIM> implT;\n    \ttypedef Key<NDIM> keyT;\n    \ttypedef GenTensor<T> coeffT;\n    \ttypedef FunctionNode<T,NDIM> nodeT;\n\n    \timplT* impl;\n    \tinsert_op() : impl() {}\n    \tinsert_op(implT* f) : impl(f) {}\n    \tinsert_op(const insert_op& other) : impl(other.impl) {}\n    \tvoid operator()(const keyT& key, const coeffT& coeff, const bool& is_leaf) const {\n    \t\tMADNESS_ASSERT(impl->get_coeffs().is_local(key));\n            impl->get_coeffs().replace(key,nodeT(coeff,not is_leaf));\n    \t}\n        template <typename Archive> void serialize (Archive& ar) {\n            ar & impl;\n        }\n\n    };\n\n    /// inserts/accumulates coefficients into impl's tree\n\n    /// NOTE: will use buffer and will need consolidation after operation ended !!  NOTE !!\n    template<typename T, std::size_t NDIM>\n    struct accumulate_op {\n        typedef GenTensor<T> coeffT;\n        typedef FunctionNode<T,NDIM> nodeT;\n\n        FunctionImpl<T,NDIM>* impl;\n        accumulate_op() = default;\n        accumulate_op(FunctionImpl<T,NDIM>* f) : impl(f) {}\n        accumulate_op(const accumulate_op& other) = default;\n        void operator()(const Key<NDIM>& key, const coeffT& coeff, const bool& is_leaf) const {\n            if (coeff.has_data())\n                impl->get_coeffs().task(key, &nodeT::accumulate, coeff, impl->get_coeffs(), key, impl->get_tensor_args());\n        }\n        template <typename Archive> void serialize (Archive& ar) {\n            ar & impl;\n        }\n\n    };\n\n\ntemplate<size_t NDIM>\n    struct true_op {\n\n    \ttemplate<typename T>\n        bool operator()(const Key<NDIM>& key, const T& t) const {return true;}\n\n    \ttemplate<typename T, typename R>\n        bool operator()(const Key<NDIM>& key, const T& t, const R& r) const {return true;}\n        template <typename Archive> void serialize (Archive& ar) {}\n\n    };\n\n    /// shallow-copy, pared-down version of FunctionNode, for special purpose only\n    template<typename T, std::size_t NDIM>\n    struct ShallowNode {\n        typedef GenTensor<T> coeffT;\n        coeffT _coeffs;\n        bool _has_children;\n        double dnorm=-1.0;\n        ShallowNode() : _coeffs(), _has_children(false) {}\n        ShallowNode(const FunctionNode<T,NDIM>& node)\n            : _coeffs(node.coeff()), _has_children(node.has_children()),\n\t\t\t  dnorm(node.get_dnorm()) {}\n        ShallowNode(const ShallowNode<T,NDIM>& node)\n            : _coeffs(node.coeff()), _has_children(node._has_children),\n\t\t\t  dnorm(node.dnorm) {}\n\n        const coeffT& coeff() const {return _coeffs;}\n        coeffT& coeff() {return _coeffs;}\n        bool has_children() const {return _has_children;}\n        bool is_leaf() const {return not _has_children;}\n        template <typename Archive>\n        void serialize(Archive& ar) {\n            ar & coeff() & _has_children & dnorm;\n        }\n    };\n\n\n    /// a class to track where relevant (parent) coeffs are\n\n    /// E.g. if a 6D function is composed of two 3D functions their coefficients must be tracked.\n    /// We might need coeffs from a box that does not exist, and to avoid searching for\n    /// parents we track which are their required respective boxes.\n    ///  - CoeffTracker will refer either to a requested key, if it exists, or to its\n    ///    outermost parent.\n    ///  - Children must be made in sequential order to be able to track correctly.\n    ///\n    /// Usage: \t1. make the child of a given CoeffTracker.\n    ///\t\t\t   If the parent CoeffTracker refers to a leaf node (flag is_leaf)\n    ///            the child will refer to the same node. Otherwise it will refer\n    ///            to the child node.\n    ///\t\t\t2. retrieve its coefficients (possible communication/ returns a Future).\n    ///            Member variable key always refers to an existing node,\n    ///            so we can fetch it. Once we have the node we can determine\n    ///            if it has children which allows us to make a child (see 1. )\n    template<typename T, size_t NDIM>\n    class CoeffTracker {\n\n    \ttypedef FunctionImpl<T,NDIM> implT;\n    \ttypedef Key<NDIM> keyT;\n    \ttypedef GenTensor<T> coeffT;\n        typedef std::pair<Key<NDIM>,ShallowNode<T,NDIM> > datumT;\n        enum LeafStatus {no, yes, unknown};\n\n        /// the funcimpl that has the coeffs\n    \tconst implT* impl;\n    \t/// the current key, which must exists in impl\n    \tkeyT key_;\n    \t/// flag if key is a leaf node\n    \tLeafStatus is_leaf_;\n    \t/// the coefficients belonging to key\n    \tcoeffT coeff_;\n    \t/// norm of d coefficients corresponding to key\n    \tdouble dnorm_=-1.0;\n\n    public:\n\n    \t/// default ctor\n    \tCoeffTracker() : impl(), key_(0), is_leaf_(unknown), coeff_() {} // Initialize key to avoid warnings of possible unititialied use\n\n    \t/// the initial ctor making the root key\n    \tCoeffTracker(const implT* impl) : impl(impl), key_(0), is_leaf_(no), coeff_() {\n            if (impl) key_=impl->get_cdata().key0;\n    \t}\n\n    \t/// ctor with a pair<keyT,nodeT>\n    \texplicit CoeffTracker(const CoeffTracker& other, const datumT& datum)\n    \t\t: impl(other.impl), key_(other.key_), coeff_(datum.second.coeff()),\n    \t\t\tdnorm_(datum.second.dnorm) {\n            if (datum.second.is_leaf()) is_leaf_=yes;\n            else is_leaf_=no;\n    \t}\n\n    \t/// copy ctor\n    \tCoeffTracker(const CoeffTracker& other) : impl(other.impl), key_(other.key_),\n    \t\t\tis_leaf_(other.is_leaf_), coeff_(other.coeff_), dnorm_(other.dnorm_) {};\n\n    \t/// const reference to impl\n    \tconst implT* get_impl() const {return impl;}\n\n    \t/// const reference to the coeffs\n    \tconst coeffT& coeff() const {return coeff_;}\n\n    \t/// const reference to the key\n    \tconst keyT& key() const {return key_;}\n\n    \t/// return the coefficients belonging to the passed-in key\n\n    \t/// if key equals tracked key just return the coeffs, otherwise\n    \t/// make the child coefficients.\n    \t/// @param[in]\tkey\t\treturn coeffs corresponding to this key\n    \t/// @return \tcoefficients belonging to key\n    \tcoeffT coeff(const keyT& key) const {\n            MADNESS_ASSERT(impl);\n            if (impl->is_compressed() or impl->is_nonstandard() or\n            \t\timpl->is_nonstandard_with_leaves())\n                return impl->parent_to_child_NS(key,key_,coeff_);\n            return impl->parent_to_child(coeff_,key_,key);\n    \t}\n\n    \t/// return the s and dnorm belonging to the passed-in key\n    \tdouble dnorm(const keyT& key) const {\n    \t\tif (key==key_) return dnorm_;\n    \t\tMADNESS_ASSERT(key.is_child_of(key_));\n    \t\treturn 0.0;\n    \t}\n\n    \t/// const reference to is_leaf flag\n    \tconst LeafStatus& is_leaf() const {return is_leaf_;}\n\n    \t/// make a child of this, ignoring the coeffs\n    \tCoeffTracker make_child(const keyT& child) const {\n\n            // fast return\n            if ((not impl) or impl->is_on_demand()) return CoeffTracker(*this);\n\n            // can't make a child without knowing if this is a leaf -- activate first\n            MADNESS_ASSERT((is_leaf_==yes) or (is_leaf_==no));\n\n            CoeffTracker result;\n            if (impl) {\n                result.impl=impl;\n                if (is_leaf_==yes) result.key_=key_;\n                if (is_leaf_==no) {\n                    result.key_=child;\n                    // check if child is direct descendent of this, but root node is special case\n                    if (child.level()>0) MADNESS_ASSERT(result.key().level()==key().level()+1);\n                }\n                result.is_leaf_=unknown;\n            }\n            return result;\n    \t}\n\n    \t/// find the coefficients\n\n    \t/// this involves communication to a remote node\n    \t/// @return\ta Future<CoeffTracker> with the coefficients that key refers to\n    \tFuture<CoeffTracker> activate() const {\n\n            // fast return\n            if (not impl) return Future<CoeffTracker>(CoeffTracker());\n            if (impl->is_on_demand()) return Future<CoeffTracker>(CoeffTracker(impl));\n\n            // this will return a <keyT,nodeT> from a remote node\n            ProcessID p=impl->get_coeffs().owner(key());\n            Future<datumT> datum1=impl->task(p, &implT::find_datum,key_,TaskAttributes::hipri());\n\n            // construct a new CoeffTracker locally\n            return impl->world.taskq.add(*const_cast<CoeffTracker*> (this),\n                                         &CoeffTracker::forward_ctor,*this,datum1);\n    \t}\n\n    private:\n    \t/// taskq-compatible forwarding to the ctor\n    \tCoeffTracker forward_ctor(const CoeffTracker& other, const datumT& datum) const {\n            return CoeffTracker(other,datum);\n    \t}\n\n    public:\n    \t/// serialization\n        template <typename Archive> void serialize(const Archive& ar) {\n            int il=int(is_leaf_);\n            ar & impl & key_ & il & coeff_ & dnorm_;\n            is_leaf_=LeafStatus(il);\n        }\n    };\n\n    template<typename T, std::size_t NDIM>\n    std::ostream&\n    operator<<(std::ostream& s, const CoeffTracker<T,NDIM>& ct) {\n        s << ct.key() << ct.is_leaf() << \" \" << ct.get_impl();\n        return s;\n    }\n\n    /// FunctionImpl holds all Function state to facilitate shallow copy semantics\n\n    /// Since Function assignment and copy constructors are shallow it\n    /// greatly simplifies maintaining consistent state to have all\n    /// (permanent) state encapsulated in a single class.  The state\n    /// is shared between instances using a shared_ptr<FunctionImpl>.\n    ///\n    /// The FunctionImpl inherits all of the functionality of WorldContainer\n    /// (to store the coefficients) and WorldObject<WorldContainer> (used\n    /// for RMI and for its unqiue id).\n    ///\n    /// The class methods are public to avoid painful multiple friend template\n    /// declarations for Function and FunctionImpl ... but this trust should not be\n    /// abused ... NOTHING except FunctionImpl methods should mess with FunctionImplData.\n    /// The LB stuff might have to be an exception.\n    template <typename T, std::size_t NDIM>\n    class FunctionImpl : public WorldObject< FunctionImpl<T,NDIM> > {\n    private:\n        typedef WorldObject< FunctionImpl<T,NDIM> > woT; ///< Base class world object type\n    public:\n        typedef T typeT;\n        typedef FunctionImpl<T,NDIM> implT; ///< Type of this class (implementation)\n        typedef std::shared_ptr< FunctionImpl<T,NDIM> > pimplT; ///< pointer to this class\n        typedef Tensor<T> tensorT; ///< Type of tensor for anything but to hold coeffs\n        typedef Vector<Translation,NDIM> tranT; ///< Type of array holding translation\n        typedef Key<NDIM> keyT; ///< Type of key\n        typedef FunctionNode<T,NDIM> nodeT; ///< Type of node\n        typedef GenTensor<T> coeffT; ///< Type of tensor used to hold coeffs\n        typedef WorldContainer<keyT,nodeT> dcT; ///< Type of container holding the coefficients\n        typedef std::pair<const keyT,nodeT> datumT; ///< Type of entry in container\n        typedef Vector<double,NDIM> coordT; ///< Type of vector holding coordinates\n\n        //template <typename Q, int D> friend class Function;\n        template <typename Q, std::size_t D> friend class FunctionImpl;\n\n        World& world;\n\n        /// getter\n        int get_initial_level()const{return initial_level;}\n        int get_special_level()const{return special_level;}\n        const std::vector<Vector<double,NDIM> >& get_special_points()const{return special_points;}\n\n    private:\n        int k; ///< Wavelet order\n        double thresh; ///< Screening threshold\n        int initial_level; ///< Initial level for refinement\n        int special_level; ///< Minimium level for refinement on special points\n        std::vector<Vector<double,NDIM> > special_points; ///< special points for further refinement (needed for composite functions or multiplication)\n        const Tensor<double> cell;          ///< the size of the root cell in each dimension, unchangeable\n        int max_refine_level; ///< Do not refine below this level\n        int truncate_mode; ///< 0=default=(|d|<thresh), 1=(|d|<thresh/2^n), 2=(|d|<thresh/4^n);\n        bool autorefine; ///< If true, autorefine where appropriate\n        bool truncate_on_project; ///< If true projection inserts at level n-1 not n\n        TensorArgs targs; ///< type of tensor to be used in the FunctionNodes\n\n        const FunctionCommonData<T,NDIM>& cdata;\n\n        std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functor;\n        TreeState tree_state;\n\n        dcT coeffs; ///< The coefficients\n\n        // Disable the default copy constructor\n        FunctionImpl(const FunctionImpl<T,NDIM>& p);\n\n    public:\n        Timer timer_accumulate;\n        Timer timer_change_tensor_type;\n        Timer timer_lr_result;\n        Timer timer_filter;\n        Timer timer_compress_svd;\n        Timer timer_target_driven;\n        AtomicInt small;\n        AtomicInt large;\n\n        /// Initialize function impl from data in factory\n        FunctionImpl(const FunctionFactory<T,NDIM>& factory)\n            : WorldObject<implT>(factory._world)\n            , world(factory._world)\n            , k(factory._k)\n            , thresh(factory._thresh)\n            , initial_level(factory._initial_level)\n            , special_level(factory._special_level)\n            , special_points(factory._special_points)\n            , cell(FunctionDefaults<NDIM>::get_cell())\n            , max_refine_level(factory._max_refine_level)\n            , truncate_mode(factory._truncate_mode)\n            , autorefine(factory._autorefine)\n            , truncate_on_project(factory._truncate_on_project)\n            , targs(factory._thresh,FunctionDefaults<NDIM>::get_tensor_type())\n            , cdata(FunctionCommonData<T,NDIM>::get(k))\n            , functor(factory.get_functor())\n          , tree_state(factory._tree_state)\n            , coeffs(world,factory._pmap,false)\n            //, bc(factory._bc)\n        {\n            // PROFILE_MEMBER_FUNC(FunctionImpl); // No need to profile this\n            // !!! Ensure that all local state is correctly formed\n            // before invoking process_pending for the coeffs and\n            // for this.  Otherwise, there is a race condition.\n            MADNESS_ASSERT(k>0 && k<=MAXK);\n\n            bool empty = (factory._empty or is_on_demand());\n            bool do_refine = factory._refine;\n\n            if (do_refine)\n                initial_level = std::max(0,initial_level - 1);\n\n            if (empty) { // Do not set any coefficients at all\n                // additional functors are only evaluated on-demand\n            } else if (functor) { // Project function and optionally refine\n                insert_zero_down_to_initial_level(cdata.key0);\n                // set the union of the special points of functor and the ones explicitly given to FunctionFactory\n                std::vector<coordT> functor_special_points=functor->special_points();\n                if (!functor_special_points.empty()) special_points.insert(special_points.end(), functor_special_points.begin(), functor_special_points.end());\n                // near special points refine as deeply as requested by the factory AND the functor\n                special_level = std::max(special_level, functor->special_level());\n\n                typename dcT::const_iterator end = coeffs.end();\n                for (typename dcT::const_iterator it=coeffs.begin(); it!=end; ++it) {\n                    if (it->second.is_leaf())\n                        woT::task(coeffs.owner(it->first), &implT::project_refine_op, it->first, do_refine,\n                                  special_points);\n                }\n            }\n            else { // Set as if a zero function\n                initial_level = 1;\n                insert_zero_down_to_initial_level(keyT(0));\n            }\n\n            coeffs.process_pending();\n            this->process_pending();\n            if (factory._fence && (functor || !empty)) world.gop.fence();\n        }\n\n        /// Copy constructor\n\n        /// Allocates a \\em new function in preparation for a deep copy\n        ///\n        /// By default takes pmap from other but can also specify a different pmap.\n        /// Does \\em not copy the coefficients ... creates an empty container.\n        template <typename Q>\n        FunctionImpl(const FunctionImpl<Q,NDIM>& other,\n             const std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& pmap,\n             bool dozero) : FunctionImpl(other.world, other, pmap, dozero) {\n        }\n\n        /// Copy constructor\n\n        /// Allocates a \\em new function in preparation for a deep copy\n        ///\n        /// By default takes pmap from other but can also specify a different pmap.\n        /// Does \\em not copy the coefficients ... creates an empty container.\n        ///\n        /// uses a different world for the new function\n        template <typename Q>\n        FunctionImpl(World& world,\n                    const FunctionImpl<Q,NDIM>& other,\n                     const std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& pmap,\n                     bool dozero)\n                : WorldObject<implT>(world)\n                , world(world)\n                , k(other.k)\n                , thresh(other.thresh)\n                , initial_level(other.initial_level)\n                , special_level(other.special_level)\n                , special_points(other.special_points)\n                , cell(other.cell)\n                , max_refine_level(other.max_refine_level)\n                , truncate_mode(other.truncate_mode)\n                , autorefine(other.autorefine)\n                , truncate_on_project(other.truncate_on_project)\n                , targs(other.targs)\n                , cdata(FunctionCommonData<T,NDIM>::get(k))\n                , functor()\n                , tree_state(other.tree_state)\n                , coeffs(world, pmap ? pmap : other.coeffs.get_pmap())\n        {\n            if (dozero) {\n                initial_level = 1;\n                insert_zero_down_to_initial_level(cdata.key0);\n                //world.gop.fence(); <<<<<<<<<<<<<<<<<<<<<<   needs a fence argument\n            }\n            coeffs.process_pending();\n            this->process_pending();\n        }\n\n        virtual ~FunctionImpl() { }\n\n        const std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& get_pmap() const;\n\n        void replicate(bool fence=true) {\n        \tcoeffs.replicate(fence);\n        }\n\n        void replicate_on_hosts(bool fence=true) {\n            coeffs.replicate_on_hosts(fence);\n        }\n\n        // remove all coeffs that are not local according to pmap\n        void undo_replicate(bool fence=true) {\n            std::list<keyT> keys;\n            for (const auto& [key, node] : coeffs) if (not coeffs.is_local(key)) keys.push_back(key);\n            for (const auto& key : keys) coeffs.erase(key);\n            if (fence) world.gop.fence();\n        }\n\n        void distribute(std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > > newmap) const {\n        \tauto currentmap=coeffs.get_pmap();\n        \tcurrentmap->redistribute(world,newmap);\n        }\n\n        /// Copy coeffs from other into self\n\n        /// this and other might live in different worlds\n        template <typename Q>\n        void copy_coeffs(const FunctionImpl<Q,NDIM>& other, bool fence) {\n            if (world.id()==other.world.id())\n                copy_coeffs_same_world(other,false);\n            else\n                copy_coeffs_different_world(other);\n            if (fence) world.gop.fence();\n        }\n\n        /// Copy coefficients from other funcimpl with possibly different world and on a different node\n        template<typename Q>\n        void copy_coeffs_different_world(const FunctionImpl<Q,NDIM>& other) {\n\n            // copy coeffs from (a subset of) other's world\n\n            // if other's data is distributed, we need to fetch from all ranks\n            if (other.get_coeffs().is_distributed()) {\n                for (ProcessID pid=0; pid<other.world.size(); ++pid) {\n                    copy_remote_coeffs_from_pid<Q>(pid, other);\n                }\n\n            // if other's data is replicated, all coeffs are on the rank that owns key0\n            } else if (other.get_coeffs().is_replicated() or other.get_coeffs().is_host_replicated()) {\n                auto key0=other.cdata.key0;\n                copy_remote_coeffs_from_pid<Q>(other.get_pmap()->owner(key0), other);\n            }\n        }\n\n        /// Copy coefficients from other funcimpl with possibly different world and on a different node\n        /// to this\n        template <typename Q>\n        void copy_remote_coeffs_from_pid(const ProcessID pid, const FunctionImpl<Q,NDIM>& other) {\n            typedef FunctionImpl<Q,NDIM> implQ; ///< Type of this class (implementation)\n            // std::vector<unsigned char> v=other.task(pid, &implQ::serialize_remote_coeffs).get();\n            auto v=other.task(pid, &implQ::serialize_remote_coeffs);\n            world.taskq.add(*this, &implT::insert_serialized_coeffs,v);\n        }\n\n        /// invoked by copy_remote_coeffs_from_pid to serialize *local* coeffs\n        std::vector<unsigned char> serialize_remote_coeffs() {\n            std::vector<unsigned char> v;\n            archive::VectorOutputArchive ar(v);\n            ar & get_coeffs();\n            return v;\n        }\n\n        /// insert coeffs from vector archive into this\n        void insert_serialized_coeffs(std::vector<unsigned char>& v) {\n            archive::VectorInputArchive ar(v);\n            ar & get_coeffs();\n        }\n\n        /// Copy coeffs from other into self\n        template <typename Q>\n        void copy_coeffs_same_world(const FunctionImpl<Q,NDIM>& other, bool fence) {\n            for (const auto& [key, node] : other.coeffs)  {  // iterate over all entries in other\n                coeffs.replace(key,node. template convert<T>());\n            }\n            if (fence)\n                world.gop.fence();\n        }\n\n        /// perform inplace gaxpy: this = alpha*this + beta*other\n        /// @param[in]\talpha\tprefactor for this\n        /// @param[in]\tbeta\tprefactor for other\n        /// @param[in]\tg       the other function, reconstructed\n        /// @return     *this = alpha*this + beta*other, in either reconstructed or redundant_after_merge state\n        template<typename Q, typename R>\n        void gaxpy_inplace_reconstructed(const T& alpha, const FunctionImpl<Q,NDIM>& g, const R& beta, const bool fence) {\n            // merge g's tree into this' tree\n            gaxpy_inplace(alpha,g,beta,fence);\n            tree_state=redundant_after_merge;\n            // this->merge_trees(beta,g,alpha,fence);\n            // tree is now redundant_after_merge\n            // sum down the sum coeffs into the leafs if possible to keep the state most clean\n            if (fence) sum_down(fence);\n        }\n\n        /// merge the trees of this and other, while multiplying them with the alpha or beta, resp\n\n        /// first step in an inplace gaxpy operation for reconstructed functions; assuming the same\n        /// distribution for this and other\n\n        /// on output, *this = alpha* *this + beta * other\n        /// @param[in]\talpha\tprefactor for this\n        /// @param[in]\tbeta\tprefactor for other\n        /// @param[in]\tother\tthe other function, reconstructed\n        template<typename Q, typename R>\n        void merge_trees(const T alpha, const FunctionImpl<Q,NDIM>& other, const R beta, const bool fence=true) {\n            MADNESS_ASSERT(get_pmap() == other.get_pmap());\n            this->set_tree_state(redundant_after_merge);\n            other.flo_unary_op_node_inplace(do_merge_trees<Q,R>(alpha,beta,*this),fence);\n        }\n\n        /// merge the trees of this and other, while multiplying them with the alpha or beta, resp\n\n        /// result and rhs do not have to have the same distribution or live in the same world\n        /// result+=alpha* this\n        /// @param[in]\talpha\tprefactor for this\n        template<typename Q, typename R>\n        void accumulate_trees(FunctionImpl<Q,NDIM>& result, const R alpha, const bool fence=true) const {\n            flo_unary_op_node_inplace(do_accumulate_trees<Q,R>(result,alpha),fence);\n        }\n\n        /// perform: this= alpha*f + beta*g, invoked by result\n\n        /// f and g are reconstructed, so we can save on the compress operation,\n        /// walk down the joint tree, and add leaf coefficients; effectively refines\n        /// to common finest level.\n\n        /// nothing returned, but leaves this's tree reconstructed and as sum of f and g\n        /// @param[in]  alpha   prefactor for f\n        /// @param[in]  f       first addend\n        /// @param[in]  beta    prefactor for g\n        /// @param[in]  g       second addend\n        void gaxpy_oop_reconstructed(const double alpha, const implT& f,\n                                     const double beta, const implT& g, const bool fence);\n\n        /// functor for the gaxpy_inplace method\n        template <typename Q, typename R>\n        struct do_gaxpy_inplace {\n            typedef Range<typename FunctionImpl<Q,NDIM>::dcT::const_iterator> rangeT;\n            FunctionImpl<T,NDIM>* f; ///< prefactor for current function impl\n            T alpha; ///< the current function impl\n            R beta; ///< prefactor for other function impl\n            do_gaxpy_inplace() = default;\n            do_gaxpy_inplace(FunctionImpl<T,NDIM>* f, T alpha, R beta) : f(f), alpha(alpha), beta(beta) {}\n            bool operator()(typename rangeT::iterator& it) const {\n                const keyT& key = it->first;\n                const FunctionNode<Q,NDIM>& other_node = it->second;\n                // Use send to get write accessor and automated construction if missing\n                f->coeffs.send(key, &nodeT:: template gaxpy_inplace<Q,R>, alpha, other_node, beta);\n                return true;\n            }\n            template <typename Archive>\n            void serialize(Archive& ar) {\n                ar & f & alpha & beta;\n            }\n        };\n\n        /// Inplace general bilinear operation\n\n        /// this's world can differ from other's world\n        /// this = alpha * this + beta * other\n        /// @param[in]  alpha   prefactor for the current function impl\n        /// @param[in]  other   the other function impl\n        /// @param[in]  beta    prefactor for other\n        template <typename Q, typename R>\n        void gaxpy_inplace(const T& alpha,const FunctionImpl<Q,NDIM>& other, const R& beta, bool fence) {\n//            MADNESS_ASSERT(get_pmap() == other.get_pmap());\n            if (alpha != T(1.0)) scale_inplace(alpha,false);\n            typedef Range<typename FunctionImpl<Q,NDIM>::dcT::const_iterator> rangeT;\n            typedef do_gaxpy_inplace<Q,R> opT;\n            other.world.taskq. template for_each<rangeT,opT>(rangeT(other.coeffs.begin(), other.coeffs.end()), opT(this, T(1.0), beta));\n            if (fence)\n                other.world.gop.fence();\n        }\n\n        // loads a function impl from persistence\n        // @param[in] ar   the archive where the function impl is stored\n        template <typename Archive>\n        void load(Archive& ar) {\n            // WE RELY ON K BEING STORED FIRST\n            int kk = 0;\n            ar & kk;\n\n            MADNESS_ASSERT(kk==k);\n\n            // note that functor should not be (re)stored\n            ar & thresh & initial_level & max_refine_level & truncate_mode\n                & autorefine & truncate_on_project & tree_state;//nonstandard & compressed ; //& bc;\n\n            ar & coeffs;\n            world.gop.fence();\n        }\n\n        // saves a function impl to persistence\n        // @param[in] ar   the archive where the function impl is to be stored\n        template <typename Archive>\n        void store(Archive& ar) {\n            // WE RELY ON K BEING STORED FIRST\n\n            // note that functor should not be (re)stored\n            ar & k & thresh & initial_level & max_refine_level & truncate_mode\n                & autorefine & truncate_on_project & tree_state;//nonstandard & compressed ; //& bc;\n\n            ar & coeffs;\n            world.gop.fence();\n        }\n\n        /// Returns true if the function is compressed.\n        bool is_compressed() const;\n\n        /// Returns true if the function is compressed.\n        bool is_reconstructed() const;\n\n        /// Returns true if the function is redundant.\n        bool is_redundant() const;\n\n        /// Returns true if the function is redundant_after_merge.\n        bool is_redundant_after_merge() const;\n\n        bool is_nonstandard() const;\n\n        bool is_nonstandard_with_leaves() const;\n\n        bool is_on_demand() const;\n\n        bool has_leaves() const;\n\n        void set_tree_state(const TreeState& state) {\n        \ttree_state=state;\n        }\n\n        TreeState get_tree_state() const {return tree_state;}\n\n        void set_functor(const std::shared_ptr<FunctionFunctorInterface<T,NDIM> > functor1);\n\n        std::shared_ptr<FunctionFunctorInterface<T,NDIM> > get_functor();\n\n        std::shared_ptr<FunctionFunctorInterface<T,NDIM> > get_functor() const;\n\n        void unset_functor();\n\n\n        TensorType get_tensor_type() const;\n\n        TensorArgs get_tensor_args() const;\n        void set_tensor_args(const TensorArgs& t);\n\n        double get_thresh() const;\n\n        /// return the simulation cell\n        const Tensor<double>& get_cell() const { return cell; }\n\n        void set_thresh(double value);\n\n        bool get_autorefine() const;\n\n        void set_autorefine(bool value);\n\n        int get_k() const;\n\n        const dcT& get_coeffs() const;\n\n        dcT& get_coeffs();\n\n        const FunctionCommonData<T,NDIM>& get_cdata() const;\n\n        void accumulate_timer(const double time) const; // !!!!!!!!!!!!  REDUNDANT !!!!!!!!!!!!!!!\n\n        void print_timer() const;\n\n        void reset_timer();\n\n        /// Adds a constant to the function.  Local operation, optional fence\n\n        /// In scaling function basis must add value to first polyn in\n        /// each box with appropriate scaling for level.  In wavelet basis\n        /// need only add at level zero.\n        /// @param[in]  t   the scalar to be added\n        void add_scalar_inplace(T t, bool fence);\n\n        /// Initialize nodes to zero function at initial_level of refinement.\n\n        /// Works for either basis.  No communication.\n        void insert_zero_down_to_initial_level(const keyT& key);\n\n        /// Truncate according to the threshold with optional global fence\n\n        /// If thresh<=0 the default value of this->thresh is used\n        /// @param[in]  tol   the truncation tolerance\n        void truncate(double tol, bool fence);\n\n        /// Returns true if after truncation this node has coefficients\n\n        /// Assumed to be invoked on process owning key.  Possible non-blocking\n        /// communication.\n        /// @param[in]  key   the key of the current function node\n        Future<bool> truncate_spawn(const keyT& key, double tol);\n\n        /// Actually do the truncate operation\n        /// @param[in] key the key to the current function node being evaluated for truncation\n        /// @param[in] tol the tolerance for thresholding\n        /// @param[in] v vector of Future<bool>'s that specify whether the current nodes children have coeffs\n        bool truncate_op(const keyT& key, double tol, const std::vector< Future<bool> >& v);\n\n        /// Evaluate function at quadrature points in the specified box\n\n        /// @param[in] key the key indicating where the quadrature points are located\n        /// @param[in] f the interface to the elementary function\n        /// @param[in] qx quadrature points on a level=0 box\n        /// @param[out] fval values\n        void fcube(const keyT& key, const FunctionFunctorInterface<T,NDIM>& f, const Tensor<double>& qx, tensorT& fval) const;\n\n        /// Evaluate function at quadrature points in the specified box\n\n        /// @param[in] key the key indicating where the quadrature points are located\n        /// @param[in] f the interface to the elementary function\n        /// @param[in] qx quadrature points on a level=0 box\n        /// @param[out] fval values\n        void fcube(const keyT& key,  T (*f)(const coordT&), const Tensor<double>& qx, tensorT& fval) const;\n\n        /// Returns cdata.key0\n        const keyT& key0() const;\n\n        /// Prints the coeffs tree of the current function impl\n        /// @param[in] maxlevel the maximum level of the tree for printing\n        /// @param[out] os the ostream to where the output is sent\n        void print_tree(std::ostream& os = std::cout, Level maxlevel = 10000) const;\n\n        /// Functor for the do_print_tree method\n        void do_print_tree(const keyT& key, std::ostream& os, Level maxlevel) const;\n\n        /// Prints the coeffs tree of the current function impl (using GraphViz)\n        /// @param[in] maxlevel the maximum level of the tree for printing\n        /// @param[out] os the ostream to where the output is sent\n        void print_tree_graphviz(std::ostream& os = std::cout, Level maxlevel = 10000) const;\n\n        /// Functor for the do_print_tree method (using GraphViz)\n        void do_print_tree_graphviz(const keyT& key, std::ostream& os, Level maxlevel) const;\n\n        /// Same as print_tree() but in JSON format\n        /// @param[out] os the ostream to where the output is sent\n        /// @param[in] maxlevel the maximum level of the tree for printing\n        void print_tree_json(std::ostream& os = std::cout, Level maxlevel = 10000) const;\n\n        /// Functor for the do_print_tree_json method\n        void do_print_tree_json(const keyT& key, std::multimap<Level, std::tuple<tranT, std::string>>& data, Level maxlevel) const;\n\n        /// convert a number [0,limit] to a hue color code [blue,red],\n        /// or, if log is set, a number [1.e-10,limit]\n        struct do_convert_to_color {\n            double limit;\n            bool log;\n            static double lower() {return 1.e-10;};\n            do_convert_to_color() = default;\n            do_convert_to_color(const double limit, const bool log) : limit(limit), log(log) {}\n            double operator()(double val) const {\n                double color=0.0;\n\n                if (log) {\n                    double val2=log10(val) - log10(lower());        // will yield >0.0\n                    double upper=log10(limit) -log10(lower());\n                    val2=0.7-(0.7/upper)*val2;\n                    color= std::max(0.0,val2);\n                    color= std::min(0.7,color);\n                } else {\n                    double hue=0.7-(0.7/limit)*(val);\n                    color= std::max(0.0,hue);\n                }\n                return color;\n            }\n        };\n\n\n        /// Print a plane (\"xy\", \"xz\", or \"yz\") containing the point x to file\n\n        /// works for all dimensions; we walk through the tree, and if a leaf node\n        /// inside the sub-cell touches the plane we print it in pstricks format\n        void print_plane(const std::string filename, const int xaxis, const int yaxis, const coordT& el2);\n\n        /// collect the data for a plot of the MRA structure locally on each node\n\n        /// @param[in]\txaxis\tthe x-axis in the plot (can be any axis of the MRA box)\n        /// @param[in]\tyaxis\tthe y-axis in the plot (can be any axis of the MRA box)\n        /// @param[in]\tel2     needs a description\n        /// \\todo Provide a description for el2\n        Tensor<double> print_plane_local(const int xaxis, const int yaxis, const coordT& el2);\n\n        /// Functor for the print_plane method\n        /// @param[in] filename the filename for the output\n        /// @param[in] plotinfo plotting parameters\n        /// @param[in]\txaxis\tthe x-axis in the plot (can be any axis of the MRA box)\n        /// @param[in]\tyaxis\tthe y-axis in the plot (can be any axis of the MRA box)\n        void do_print_plane(const std::string filename, std::vector<Tensor<double> > plotinfo,\n                            const int xaxis, const int yaxis, const coordT el2);\n\n        /// print the grid (the roots of the quadrature of each leaf box)\n        /// of this function in user xyz coordinates\n        /// @param[in] filename the filename for the output\n        void print_grid(const std::string filename) const;\n\n        /// return the keys of the local leaf boxes\n        std::vector<keyT> local_leaf_keys() const;\n\n        /// print the grid in xyz format\n\n        /// the quadrature points and the key information will be written to file,\n        /// @param[in]\tfilename\twhere the quadrature points will be written to\n        /// @param[in]\tkeys\t\tall leaf keys\n        void do_print_grid(const std::string filename, const std::vector<keyT>& keys) const;\n\n        /// read data from a grid\n\n        /// @param[in]\tkeyfile\t\tfile with keys and grid points for each key\n        /// @param[in]\tgridfile \tfile with grid points, w/o key, but with same ordering\n        /// @param[in]\tvnuc_functor\tsubtract the values of this functor if regularization is needed\n        template<size_t FDIM>\n        typename std::enable_if<NDIM==FDIM>::type\n        read_grid(const std::string keyfile, const std::string gridfile,\n                  std::shared_ptr< FunctionFunctorInterface<double,NDIM> > vnuc_functor) {\n\n            std::ifstream kfile(keyfile.c_str());\n            std::ifstream gfile(gridfile.c_str());\n            std::string line;\n\n            long ndata,ndata1;\n            if (not (std::getline(kfile,line))) MADNESS_EXCEPTION(\"failed reading 1st line of key data\",0);\n            if (not (std::istringstream(line) >> ndata)) MADNESS_EXCEPTION(\"failed reading k\",0);\n            if (not (std::getline(gfile,line))) MADNESS_EXCEPTION(\"failed reading 1st line of grid data\",0);\n            if (not (std::istringstream(line) >> ndata1)) MADNESS_EXCEPTION(\"failed reading k\",0);\n            MADNESS_CHECK(ndata==ndata1);\n            if (not (std::getline(kfile,line))) MADNESS_EXCEPTION(\"failed reading 2nd line of key data\",0);\n            if (not (std::getline(gfile,line))) MADNESS_EXCEPTION(\"failed reading 2nd line of grid data\",0);\n\n            // the quadrature points in simulation coordinates of the root node\n            const Tensor<double> qx=cdata.quad_x;\n            const size_t npt = qx.dim(0);\n\n            // the number of coordinates (grid point tuples) per box ({x1},{x2},{x3},..,{xNDIM})\n            long npoints=power<NDIM>(npt);\n            // the number of boxes\n            long nboxes=ndata/npoints;\n            MADNESS_ASSERT(nboxes*npoints==ndata);\n            print(\"reading \",nboxes,\"boxes from file\",gridfile,keyfile);\n\n            // these will be the data\n            Tensor<T> values(cdata.vk,false);\n\n            int ii=0;\n            std::string gline,kline;\n            //            while (1) {\n            while (std::getline(kfile,kline)) {\n\n                double x,y,z,x1,y1,z1,val;\n\n                // get the key\n                long nn;\n                Translation l1,l2,l3;\n                // line looks like: # key:      n      l1   l2   l3\n                kline.erase(0,7);\n                std::stringstream(kline) >>  nn >> l1 >> l2 >> l3;\n                //\t\t\t\tkfile >> s >>  nn >> l1 >> l2 >> l3;\n                const Vector<Translation,3> ll{ l1,l2,l3 };\n                Key<3> key(nn,ll);\n\n                // this is borrowed from fcube\n                const Vector<Translation,3>& l = key.translation();\n                const Level n = key.level();\n                const double h = std::pow(0.5,double(n));\n                coordT c; // will hold the point in user coordinates\n                const Tensor<double>& cell_width = FunctionDefaults<NDIM>::get_cell_width();\n                const Tensor<double>& cell = FunctionDefaults<NDIM>::get_cell();\n\n\n                if (NDIM == 3) {\n                    for (size_t i=0; i<npt; ++i) {\n                        c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                        for (size_t j=0; j<npt; ++j) {\n                            c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                            for (size_t k=0; k<npt; ++k) {\n                                c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                                //\t\t\t\t\t\t\t\tfprintf(pFile,\"%18.12f %18.12f %18.12f\\n\",c[0],c[1],c[2]);\n                                auto& success1 = std::getline(gfile,gline); MADNESS_CHECK(success1);\n                                auto& success2 = std::getline(kfile,kline); MADNESS_CHECK(success2);\n                                std::istringstream(gline) >> x >> y >> z >> val;\n                                std::istringstream(kline) >> x1 >> y1 >> z1;\n                                MADNESS_CHECK(std::fabs(x-c[0])<1.e-4);\n                                MADNESS_CHECK(std::fabs(x1-c[0])<1.e-4);\n                                MADNESS_CHECK(std::fabs(y-c[1])<1.e-4);\n                                MADNESS_CHECK(std::fabs(y1-c[1])<1.e-4);\n                                MADNESS_CHECK(std::fabs(z-c[2])<1.e-4);\n                                MADNESS_CHECK(std::fabs(z1-c[2])<1.e-4);\n\n                                // regularize if a functor is given\n                                if (vnuc_functor) val-=(*vnuc_functor)(c);\n                                values(i,j,k)=val;\n                            }\n                        }\n                    }\n                } else {\n                    MADNESS_EXCEPTION(\"only NDIM=3 in print_grid\",0);\n                }\n\n                // insert the new leaf node\n                const bool has_children=false;\n                coeffT coeff=coeffT(this->values2coeffs(key,values),targs);\n                nodeT node(coeff,has_children);\n                coeffs.replace(key,node);\n                const_cast<dcT&>(coeffs).send(key.parent(), &FunctionNode<T,NDIM>::set_has_children_recursive, coeffs, key.parent());\n                ii++;\n            }\n\n            kfile.close();\n            gfile.close();\n            MADNESS_CHECK(ii==nboxes);\n\n        }\n\n\n        /// read data from a grid\n\n        /// @param[in]\tgridfile\t\tfile with keys and grid points and values for each key\n        /// @param[in]\tvnuc_functor\tsubtract the values of this functor if regularization is needed\n        template<size_t FDIM>\n        typename std::enable_if<NDIM==FDIM>::type\n        read_grid2(const std::string gridfile,\n                   std::shared_ptr< FunctionFunctorInterface<double,NDIM> > vnuc_functor) {\n\n            std::ifstream gfile(gridfile.c_str());\n            std::string line;\n\n            long ndata;\n            if (not (std::getline(gfile,line))) MADNESS_EXCEPTION(\"failed reading 1st line of grid data\",0);\n            if (not (std::istringstream(line) >> ndata)) MADNESS_EXCEPTION(\"failed reading k\",0);\n            if (not (std::getline(gfile,line))) MADNESS_EXCEPTION(\"failed reading 2nd line of grid data\",0);\n\n            // the quadrature points in simulation coordinates of the root node\n            const Tensor<double> qx=cdata.quad_x;\n            const size_t npt = qx.dim(0);\n\n            // the number of coordinates (grid point tuples) per box ({x1},{x2},{x3},..,{xNDIM})\n            long npoints=power<NDIM>(npt);\n            // the number of boxes\n            long nboxes=ndata/npoints;\n            MADNESS_CHECK(nboxes*npoints==ndata);\n            print(\"reading \",nboxes,\"boxes from file\",gridfile);\n\n            // these will be the data\n            Tensor<T> values(cdata.vk,false);\n\n            int ii=0;\n            std::string gline;\n            //            while (1) {\n            while (std::getline(gfile,gline)) {\n\n                double x1,y1,z1,val;\n\n                // get the key\n                long nn;\n                Translation l1,l2,l3;\n                // line looks like: # key:      n      l1   l2   l3\n                gline.erase(0,7);\n                std::stringstream(gline) >>  nn >> l1 >> l2 >> l3;\n                const Vector<Translation,3> ll{ l1,l2,l3 };\n                Key<3> key(nn,ll);\n\n                // this is borrowed from fcube\n                const Vector<Translation,3>& l = key.translation();\n                const Level n = key.level();\n                const double h = std::pow(0.5,double(n));\n                coordT c; // will hold the point in user coordinates\n                const Tensor<double>& cell_width = FunctionDefaults<NDIM>::get_cell_width();\n                const Tensor<double>& cell = FunctionDefaults<NDIM>::get_cell();\n\n\n                if (NDIM == 3) {\n                    for (int i=0; i<npt; ++i) {\n                        c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                        for (int j=0; j<npt; ++j) {\n                            c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                            for (int k=0; k<npt; ++k) {\n                                c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n\n                                auto& success = std::getline(gfile,gline);\n                                MADNESS_CHECK(success);\n                                std::istringstream(gline) >> x1 >> y1 >> z1 >> val;\n                                MADNESS_CHECK(std::fabs(x1-c[0])<1.e-4);\n                                MADNESS_CHECK(std::fabs(y1-c[1])<1.e-4);\n                                MADNESS_CHECK(std::fabs(z1-c[2])<1.e-4);\n\n                                // regularize if a functor is given\n                                if (vnuc_functor) val-=(*vnuc_functor)(c);\n                                values(i,j,k)=val;\n                            }\n                        }\n                    }\n                } else {\n                    MADNESS_EXCEPTION(\"only NDIM=3 in print_grid\",0);\n                }\n\n                // insert the new leaf node\n                const bool has_children=false;\n                coeffT coeff=coeffT(this->values2coeffs(key,values),targs);\n                nodeT node(coeff,has_children);\n                coeffs.replace(key,node);\n                const_cast<dcT&>(coeffs).send(key.parent(),\n                                              &FunctionNode<T,NDIM>::set_has_children_recursive,\n                                              coeffs, key.parent());\n                ii++;\n            }\n\n            gfile.close();\n            MADNESS_CHECK(ii==nboxes);\n\n        }\n\n\n        /// Compute by projection the scaling function coeffs in specified box\n        /// @param[in] key the key to the current function node (box)\n        tensorT project(const keyT& key) const;\n\n        /// Returns the truncation threshold according to truncate_method\n\n        /// here is our handwaving argument:\n        /// this threshold will give each FunctionNode an error of less than tol. The\n        /// total error can then be as high as sqrt(#nodes) * tol. Therefore in order\n        /// to account for higher dimensions: divide tol by about the root of number\n        /// of siblings (2^NDIM) that have a large error when we refine along a deep\n        /// branch of the tree.\n        double truncate_tol(double tol, const keyT& key) const;\n\n        int get_truncate_mode() const { return truncate_mode; };\n\n\n        /// Returns patch referring to coeffs of child in parent box\n        /// @param[in] child the key to the child function node (box)\n        std::vector<Slice> child_patch(const keyT& child) const;\n\n        /// Projection with optional refinement w/ special points\n        /// @param[in] key the key to the current function node (box)\n        /// @param[in] do_refine should we continue refinement?\n        /// @param[in] specialpts vector of special points in the function where we need\n        ///            to refine at a much finer level\n        void project_refine_op(const keyT& key, bool do_refine,\n                               const std::vector<Vector<double,NDIM> >& specialpts);\n\n        /// Compute the Legendre scaling functions for multiplication\n\n        /// Evaluate parent polyn at quadrature points of a child.  The prefactor of\n        /// 2^n/2 is included.  The tensor must be preallocated as phi(k,npt).\n        /// Refer to the implementation notes for more info.\n        /// @todo Robert please verify this comment. I don't understand this method.\n        /// @param[in] np level of the parent function node (box)\n        /// @param[in] nc level of the child function node (box)\n        /// @param[in] lp translation of the parent function node (box)\n        /// @param[in] lc translation of the child function node (box)\n        /// @param[out] phi tensor of the legendre scaling functions\n        void phi_for_mul(Level np, Translation lp, Level nc, Translation lc, Tensor<double>& phi) const;\n\n        /// Directly project parent coeffs to child coeffs\n\n        /// Currently used by diff, but other uses can be anticipated\n\n        /// @todo is this documentation correct?\n        /// @param[in]\tchild\tthe key whose coeffs we are requesting\n        /// @param[in]\tparent\tthe (leaf) key of our function\n        /// @param[in]\ts\tthe (leaf) coeffs belonging to parent\n        /// @return \tcoeffs\n        const coeffT parent_to_child(const coeffT& s, const keyT& parent, const keyT& child) const;\n\n        /// Directly project parent NS coeffs to child NS coeffs\n\n        /// return the NS coefficients if parent and child are the same,\n        /// or construct sum coeffs from the parents and \"add\" zero wavelet coeffs\n        /// @param[in]\tchild\tthe key whose coeffs we are requesting\n        /// @param[in]\tparent\tthe (leaf) key of our function\n        /// @param[in]\tcoeff\tthe (leaf) coeffs belonging to parent\n        /// @return \tcoeffs in NS form\n        coeffT parent_to_child_NS(const keyT& child, const keyT& parent,\n                                  const coeffT& coeff) const;\n\n        /// Return the values when given the coeffs in scaling function basis\n        /// @param[in] key the key of the function node (box)\n        /// @param[in] coeff the tensor of scaling function coefficients for function node (box)\n        /// @return function values for function node (box)\n        template <typename Q>\n        GenTensor<Q> coeffs2values(const keyT& key, const GenTensor<Q>& coeff) const {\n            // PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n            double scale = pow(2.0,0.5*NDIM*key.level())/sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            return transform(coeff,cdata.quad_phit).scale(scale);\n        }\n\n        /// convert S or NS coeffs to values on a 2k grid of the children\n\n        /// equivalent to unfiltering the NS coeffs and then converting all child S-coeffs\n        /// to values in their respective boxes. If only S coeffs are provided d coeffs are\n        /// assumed to be zero. Reverse operation to values2NScoeffs().\n        /// @param[in]\tkey\tthe key of the current S or NS coeffs, level n\n        /// @param[in]\tcoeff coeffs in S or NS form; if S then d coeffs are assumed zero\n        /// @param[in]\ts_only\tsanity check to avoid unintended discard of d coeffs\n        /// @return\t\tfunction values on the quadrature points of the children of child (!)\n        template <typename Q>\n        GenTensor<Q> NScoeffs2values(const keyT& key, const GenTensor<Q>& coeff,\n                                     const bool s_only) const {\n            // PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n\n            // sanity checks\n            MADNESS_ASSERT((coeff.dim(0)==this->get_k()) == s_only);\n            MADNESS_ASSERT((coeff.dim(0)==this->get_k()) or (coeff.dim(0)==2*this->get_k()));\n\n            // this is a block-diagonal matrix with the quadrature points on the diagonal\n            Tensor<double> quad_phit_2k(2*cdata.k,2*cdata.npt);\n            quad_phit_2k(cdata.s[0],cdata.s[0])=cdata.quad_phit;\n            quad_phit_2k(cdata.s[1],cdata.s[1])=cdata.quad_phit;\n\n            // the transformation matrix unfilters (cdata.hg) and transforms to values in one step\n            const Tensor<double> transf = (s_only)\n                ? inner(cdata.hg(Slice(0,k-1),_),quad_phit_2k)\t// S coeffs\n                : inner(cdata.hg,quad_phit_2k);\t\t\t\t\t// NS coeffs\n\n            // increment the level since the coeffs2values part happens on level n+1\n            const double scale = pow(2.0,0.5*NDIM*(key.level()+1))/\n                sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n\n           return transform(coeff,transf).scale(scale);\n        }\n\n        /// Compute the function values for multiplication\n\n        /// Given S or NS coefficients from a parent cell, compute the value of\n        /// the functions at the quadrature points of a child\n        /// currently restricted to special cases\n        /// @param[in]\tchild\tkey of the box in which we compute values\n        /// @param[in]\tparent\tkey of the parent box holding the coeffs\n        ///\t@param[in]\tcoeff\tcoeffs of the parent box\n        /// @param[in]\ts_only\tsanity check to avoid unintended discard of d coeffs\n        /// @return\t\tfunction values on the quadrature points of the children of child (!)\n        template <typename Q>\n        GenTensor<Q> NS_fcube_for_mul(const keyT& child, const keyT& parent,\n                                      const GenTensor<Q>& coeff, const bool s_only) const {\n            // PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n\n            // sanity checks\n            MADNESS_ASSERT((coeff.dim(0)==this->get_k()) == s_only);\n            MADNESS_ASSERT((coeff.dim(0)==this->get_k()) or (coeff.dim(0)==2*this->get_k()));\n\n            // fast return if possible\n            //            if (child.level()==parent.level()) return NScoeffs2values(child,coeff,s_only);\n\n            if (s_only) {\n\n                Tensor<double> quad_phi[NDIM];\n                // tmp tensor\n                Tensor<double> phi1(cdata.k,cdata.npt);\n\n                for (std::size_t d=0; d<NDIM; ++d) {\n\n                    // input is S coeffs (dimension k), output is values on 2*npt grid points\n                    quad_phi[d]=Tensor<double>(cdata.k,2*cdata.npt);\n\n                    // for both children of \"child\" evaluate the Legendre polynomials\n                    // first the left child on level n+1 and translations 2l\n                    phi_for_mul(parent.level(),parent.translation()[d],\n                                child.level()+1, 2*child.translation()[d], phi1);\n                    quad_phi[d](_,Slice(0,k-1))=phi1;\n\n                    // next the right child on level n+1 and translations 2l+1\n                    phi_for_mul(parent.level(),parent.translation()[d],\n                                child.level()+1, 2*child.translation()[d]+1, phi1);\n                    quad_phi[d](_,Slice(k,2*k-1))=phi1;\n                }\n\n                const double scale = 1.0/sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n                return general_transform(coeff,quad_phi).scale(scale);\n            }\n            MADNESS_EXCEPTION(\"you should not be here in NS_fcube_for_mul\",1);\n            return GenTensor<Q>();\n        }\n\n        /// convert function values of the a child generation directly to NS coeffs\n\n        /// equivalent to converting the function values to 2^NDIM S coeffs and then\n        /// filtering them to NS coeffs. Reverse operation to NScoeffs2values().\n        /// @param[in]\tkey\t\tkey of the parent of the generation\n        /// @param[in]\tvalues\ttensor holding function values of the 2^NDIM children of key\n        /// @return\t\tNS coeffs belonging to key\n        template <typename Q>\n        GenTensor<Q> values2NScoeffs(const keyT& key, const GenTensor<Q>& values) const {\n            //PROFILE_MEMBER_FUNC(FunctionImpl);  // Too fine grain for routine profiling\n\n            // sanity checks\n            MADNESS_ASSERT(values.dim(0)==2*this->get_k());\n\n            // this is a block-diagonal matrix with the quadrature points on the diagonal\n            Tensor<double> quad_phit_2k(2*cdata.npt,2*cdata.k);\n            quad_phit_2k(cdata.s[0],cdata.s[0])=cdata.quad_phiw;\n            quad_phit_2k(cdata.s[1],cdata.s[1])=cdata.quad_phiw;\n\n            // the transformation matrix unfilters (cdata.hg) and transforms to values in one step\n            const Tensor<double> transf=inner(quad_phit_2k,cdata.hgT);\n\n            // increment the level since the values2coeffs part happens on level n+1\n            const double scale = pow(0.5,0.5*NDIM*(key.level()+1))\n                *sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n\n            return transform(values,transf).scale(scale);\n        }\n\n        /// Return the scaling function coeffs when given the function values at the quadrature points\n        /// @param[in] key the key of the function node (box)\n        /// @return function values for function node (box)\n        template <typename Q>\n        Tensor<Q> coeffs2values(const keyT& key, const Tensor<Q>& coeff) const {\n            // PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n            double scale = pow(2.0,0.5*NDIM*key.level())/sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            return transform(coeff,cdata.quad_phit).scale(scale);\n        }\n\n        template <typename Q>\n        GenTensor<Q> values2coeffs(const keyT& key, const GenTensor<Q>& values) const {\n            // PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n            double scale = pow(0.5,0.5*NDIM*key.level())*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            return transform(values,cdata.quad_phiw).scale(scale);\n        }\n\n        template <typename Q>\n        Tensor<Q> values2coeffs(const keyT& key, const Tensor<Q>& values) const {\n            // PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n            double scale = pow(0.5,0.5*NDIM*key.level())*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            return transform(values,cdata.quad_phiw).scale(scale);\n        }\n\n        /// Compute the function values for multiplication\n\n        /// Given coefficients from a parent cell, compute the value of\n        /// the functions at the quadrature points of a child\n        /// @param[in] child the key for the child function node (box)\n        /// @param[in] parent the key for the parent function node (box)\n        /// @param[in] coeff the coefficients of scaling function basis of the parent box\n        template <typename Q>\n        Tensor<Q> fcube_for_mul(const keyT& child, const keyT& parent, const Tensor<Q>& coeff) const {\n            // PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n            if (child.level() == parent.level()) {\n                return coeffs2values(parent, coeff);\n            }\n            else if (child.level() < parent.level()) {\n                MADNESS_EXCEPTION(\"FunctionImpl: fcube_for_mul: child-parent relationship bad?\",0);\n            }\n            else {\n                Tensor<double> phi[NDIM];\n                for (std::size_t d=0; d<NDIM; ++d) {\n                    phi[d] = Tensor<double>(cdata.k,cdata.npt);\n                    phi_for_mul(parent.level(),parent.translation()[d],\n                                child.level(), child.translation()[d], phi[d]);\n                }\n                return general_transform(coeff,phi).scale(1.0/sqrt(FunctionDefaults<NDIM>::get_cell_volume()));;\n            }\n        }\n\n\n        /// Compute the function values for multiplication\n\n        /// Given coefficients from a parent cell, compute the value of\n        /// the functions at the quadrature points of a child\n        /// @param[in] child the key for the child function node (box)\n        /// @param[in] parent the key for the parent function node (box)\n        /// @param[in] coeff the coefficients of scaling function basis of the parent box\n        template <typename Q>\n        GenTensor<Q> fcube_for_mul(const keyT& child, const keyT& parent, const GenTensor<Q>& coeff) const {\n            // PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n            if (child.level() == parent.level()) {\n                return coeffs2values(parent, coeff);\n            }\n            else if (child.level() < parent.level()) {\n                MADNESS_EXCEPTION(\"FunctionImpl: fcube_for_mul: child-parent relationship bad?\",0);\n            }\n            else {\n                Tensor<double> phi[NDIM];\n                for (size_t d=0; d<NDIM; d++) {\n                    phi[d] = Tensor<double>(cdata.k,cdata.npt);\n                    phi_for_mul(parent.level(),parent.translation()[d],\n                                child.level(), child.translation()[d], phi[d]);\n                }\n                return general_transform(coeff,phi).scale(1.0/sqrt(FunctionDefaults<NDIM>::get_cell_volume()));\n            }\n        }\n\n\n        /// Functor for the mul method\n        template <typename L, typename R>\n        void do_mul(const keyT& key, const Tensor<L>& left, const std::pair< keyT, Tensor<R> >& arg) {\n            // PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n            const keyT& rkey = arg.first;\n            const Tensor<R>& rcoeff = arg.second;\n            //madness::print(\"do_mul: r\", rkey, rcoeff.size());\n            Tensor<R> rcube = fcube_for_mul(key, rkey, rcoeff);\n            //madness::print(\"do_mul: l\", key, left.size());\n            Tensor<L> lcube = fcube_for_mul(key, key, left);\n\n            Tensor<T> tcube(cdata.vk,false);\n            TERNARY_OPTIMIZED_ITERATOR(T, tcube, L, lcube, R, rcube, *_p0 = *_p1 * *_p2;);\n            double scale = pow(0.5,0.5*NDIM*key.level())*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            tcube = transform(tcube,cdata.quad_phiw).scale(scale);\n            coeffs.replace(key, nodeT(coeffT(tcube,targs),false));\n        }\n\n\n        /// multiply the values of two coefficient tensors using a custom number of grid points\n\n        /// note both coefficient tensors have to refer to the same key!\n        /// @param[in]\tc1\ta tensor holding coefficients\n        /// @param[in]\tc2\tanother tensor holding coeffs\n        /// @param[in]\tnpt\tnumber of grid points (optional, default is cdata.npt)\n        /// @return\t\tcoefficient tensor holding the product of the values of c1 and c2\n        template<typename R>\n        Tensor<TENSOR_RESULT_TYPE(T,R)> mul(const Tensor<T>& c1, const Tensor<R>& c2,\n                                            const int npt, const keyT& key) const {\n            typedef TENSOR_RESULT_TYPE(T,R) resultT;\n\n            const FunctionCommonData<T,NDIM>& cdata2=FunctionCommonData<T,NDIM>::get(npt);\n\n            // construct a tensor with the npt coeffs\n            Tensor<T> c11(cdata2.vk), c22(cdata2.vk);\n            c11(this->cdata.s0)=c1;\n            c22(this->cdata.s0)=c2;\n\n            // it's sufficient to scale once\n            double scale = pow(2.0,0.5*NDIM*key.level())/sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            Tensor<T> c1value=transform(c11,cdata2.quad_phit).scale(scale);\n            Tensor<R> c2value=transform(c22,cdata2.quad_phit);\n            Tensor<resultT> resultvalue(cdata2.vk,false);\n            TERNARY_OPTIMIZED_ITERATOR(resultT, resultvalue, T, c1value, R, c2value, *_p0 = *_p1 * *_p2;);\n\n            Tensor<resultT> result=transform(resultvalue,cdata2.quad_phiw);\n\n            // return a copy of the slice to have the tensor contiguous\n            return copy(result(this->cdata.s0));\n        }\n\n\n        /// Functor for the binary_op method\n        template <typename L, typename R, typename opT>\n\t  void do_binary_op(const keyT& key, const Tensor<L>& left,\n\t\t\t    const std::pair< keyT, Tensor<R> >& arg,\n\t\t\t    const opT& op) {\n            //PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n\t  const keyT& rkey = arg.first;\n\t  const Tensor<R>& rcoeff = arg.second;\n\t  Tensor<R> rcube = fcube_for_mul(key, rkey, rcoeff);\n\t  Tensor<L> lcube = fcube_for_mul(key, key, left);\n\n\t  Tensor<T> tcube(cdata.vk,false);\n\t  op(key, tcube, lcube, rcube);\n\t  double scale = pow(0.5,0.5*NDIM*key.level())*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n\t  tcube = transform(tcube,cdata.quad_phiw).scale(scale);\n\t  coeffs.replace(key, nodeT(coeffT(tcube,targs),false));\n\t}\n\n        /// Invoked by result to perform result += alpha*left+beta*right in wavelet basis\n\n        /// Does not assume that any of result, left, right have the same distribution.\n        /// For most purposes result will start as an empty so actually are implementing\n        /// out of place gaxpy.  If all functions have the same distribution there is\n        /// no communication except for the optional fence.\n        template <typename L, typename R>\n        void gaxpy(T alpha, const FunctionImpl<L,NDIM>& left,\n                   T beta, const FunctionImpl<R,NDIM>& right, bool fence) {\n            // Loop over local nodes in both functions.  Add in left and subtract right.\n            // Not that efficient in terms of memory bandwidth but ensures we do\n            // not miss any nodes.\n            typename FunctionImpl<L,NDIM>::dcT::const_iterator left_end = left.coeffs.end();\n            for (typename FunctionImpl<L,NDIM>::dcT::const_iterator it=left.coeffs.begin();\n                 it!=left_end;\n                 ++it) {\n                const keyT& key = it->first;\n                const typename FunctionImpl<L,NDIM>::nodeT& other_node = it->second;\n                coeffs.send(key, &nodeT:: template gaxpy_inplace<T,L>, 1.0, other_node, alpha);\n            }\n            typename FunctionImpl<R,NDIM>::dcT::const_iterator right_end = right.coeffs.end();\n            for (typename FunctionImpl<R,NDIM>::dcT::const_iterator it=right.coeffs.begin();\n                 it!=right_end;\n                 ++it) {\n                const keyT& key = it->first;\n                const typename FunctionImpl<L,NDIM>::nodeT& other_node = it->second;\n                coeffs.send(key, &nodeT:: template gaxpy_inplace<T,R>, 1.0, other_node, beta);\n            }\n            if (fence)\n                world.gop.fence();\n        }\n\n        /// Unary operation applied inplace to the coefficients WITHOUT refinement, optional fence\n        /// @param[in] op the unary operator for the coefficients\n        template <typename opT>\n        void unary_op_coeff_inplace(const opT& op, bool fence) {\n            typename dcT::iterator end = coeffs.end();\n            for (typename dcT::iterator it=coeffs.begin(); it!=end; ++it) {\n                const keyT& parent = it->first;\n                nodeT& node = it->second;\n                if (node.has_coeff()) {\n                    //                    op(parent, node.coeff());\n                    TensorArgs full(-1.0,TT_FULL);\n                    change_tensor_type(node.coeff(),full);\n                    op(parent, node.coeff().full_tensor());\n                    change_tensor_type(node.coeff(),targs);\n                    //                \top(parent,node);\n                }\n            }\n            if (fence)\n                world.gop.fence();\n        }\n\n        /// Unary operation applied inplace to the coefficients WITHOUT refinement, optional fence\n        /// @param[in] op the unary operator for the coefficients\n        template <typename opT>\n        void unary_op_node_inplace(const opT& op, bool fence) {\n            typename dcT::iterator end = coeffs.end();\n            for (typename dcT::iterator it=coeffs.begin(); it!=end; ++it) {\n                const keyT& parent = it->first;\n                nodeT& node = it->second;\n                op(parent, node);\n            }\n            if (fence)\n                world.gop.fence();\n        }\n\n        /// Integrate over one particle of a two particle function and get a one particle function\n        /// bsp \\int g(1,2) \\delta(2-1) d2 = f(1)\n        /// The overall dimension of g should be even\n\n\t\t/// The operator\n        template<std::size_t LDIM>\n\t\tvoid dirac_convolution_op(const keyT &key, const nodeT &node, FunctionImpl<T,LDIM>* f) const {\n\t\t\t// fast return if the node has children (not a leaf node)\n\t\t\tif(node.has_children()) return;\n\n\t\t\tconst implT* g=this;\n\n\t\t\t// break the 6D key into two 3D keys (may also work for every even dimension)\n\t\t\tKey<LDIM> key1, key2;\n\t\t\tkey.break_apart(key1,key2);\n\n\t\t\t// get the coefficients of the 6D function g\n\t\t\tconst coeffT& g_coeff = node.coeff();\n\n\t\t\t// get the values of the 6D function g\n\t\t\tcoeffT g_values = g->coeffs2values(key,g_coeff);\n\n\t\t\t// Determine rank and k\n\t\t\tconst long rank=g_values.rank();\n\t\t\tconst long maxk=f->get_k();\n\t\t\tMADNESS_ASSERT(maxk==g_coeff.dim(0));\n\n\t\t\t// get tensors for particle 1 and 2 (U and V in SVD)\n\t\t\ttensorT vec1=copy(g_values.get_svdtensor().ref_vector(0).reshape(rank,maxk,maxk,maxk));\n\t\t\ttensorT vec2=g_values.get_svdtensor().ref_vector(1).reshape(rank,maxk,maxk,maxk);\n\t\t\ttensorT result(maxk,maxk,maxk);  // should give zero tensor\n\t\t\t// Multiply the values of each U and V vector\n\t\t\tfor (long i=0; i<rank; ++i) {\n\t\t\t\ttensorT c1=vec1(Slice(i,i),_,_,_); // shallow copy (!)\n\t\t\t\ttensorT c2=vec2(Slice(i,i),_,_,_);\n\t\t\t\tc1.emul(c2); // this changes vec1 because of shallow copy, but not the g function because of the deep copy made above\n\t\t\t\tdouble singular_value_i = g_values.get_svdtensor().weights(i);\n\t\t\t\tresult += (singular_value_i*c1);\n\t\t\t}\n\n\t\t\t// accumulate coefficients (since only diagonal boxes are used the coefficients get just replaced, but accumulate is needed to create the right tree structure\n\t\t\ttensorT f_coeff = f->values2coeffs(key1,result);\n\t\t\tf->coeffs.task(key1, &FunctionNode<T,LDIM>::accumulate2, f_coeff, f->coeffs, key1, TaskAttributes::hipri());\n//             coeffs.task(dest, &nodeT::accumulate2, result, coeffs, dest, TaskAttributes::hipri());\n\n\n\t\t\treturn;\n\t\t}\n\n\n        template<std::size_t LDIM>\n        void do_dirac_convolution(FunctionImpl<T,LDIM>* f, bool fence) const {\n            typename dcT::const_iterator end = this->coeffs.end();\n            for (typename dcT::const_iterator it=this->coeffs.begin(); it!=end; ++it) {\n                // looping through all the leaf(!) coefficients in the NDIM function (\"this\")\n                const keyT& key = it->first;\n                const FunctionNode<T,NDIM>& node = it->second;\n                if (node.is_leaf()) {\n                \t// only process the diagonal boxes\n        \t\t\tKey<LDIM> key1, key2;\n        \t\t\tkey.break_apart(key1,key2);\n        \t\t\tif(key1 == key2){\n                        ProcessID p = coeffs.owner(key);\n                        woT::task(p, &implT:: template dirac_convolution_op<LDIM>, key, node, f);\n        \t\t\t}\n        \t\t}\n            }\n            world.gop.fence(); // fence is necessary if trickle down is used afterwards\n            // trickle down and undo redundand shouldnt change anything if only the diagonal elements are considered above -> check this\n            f->trickle_down(true); // fence must be true otherwise undo_redundant will have trouble\n//            f->undo_redundant(true);\n            f->verify_tree();\n            //if (fence) world.gop.fence(); // unnecessary, fence is activated in undo_redundant\n\n        }\n\n\n        /// Unary operation applied inplace to the coefficients WITHOUT refinement, optional fence\n        /// @param[in] op the unary operator for the coefficients\n        template <typename opT>\n        void flo_unary_op_node_inplace(const opT& op, bool fence) {\n            typedef Range<typename dcT::iterator> rangeT;\n//            typedef do_unary_op_value_inplace<opT> xopT;\n            world.taskq.for_each<rangeT,opT>(rangeT(coeffs.begin(), coeffs.end()), op);\n            if (fence) world.gop.fence();\n        }\n\n        /// Unary operation applied inplace to the coefficients WITHOUT refinement, optional fence\n        /// @param[in] op the unary operator for the coefficients\n        template <typename opT>\n        void flo_unary_op_node_inplace(const opT& op, bool fence) const {\n            typedef Range<typename dcT::const_iterator> rangeT;\n//            typedef do_unary_op_value_inplace<opT> xopT;\n            world.taskq.for_each<rangeT,opT>(rangeT(coeffs.begin(), coeffs.end()), op);\n            if (fence)\n                world.gop.fence();\n        }\n\n        /// truncate tree at a certain level\n        /// @param[in] max_level truncate tree below this level\n        void erase(const Level& max_level);\n\n        /// Returns some asymmetry measure ... no comms\n        double check_symmetry_local() const;\n\n        /// given an NS tree resulting from a convolution, truncate leafs if appropriate\n        struct do_truncate_NS_leafs {\n            typedef Range<typename dcT::iterator> rangeT;\n            const implT* f;     // for calling its member functions\n\n            do_truncate_NS_leafs(const implT* f) : f(f) {}\n\n            bool operator()(typename rangeT::iterator& it) const {\n\n                const keyT& key = it->first;\n                nodeT& node = it->second;\n\n                if (node.is_leaf() and node.coeff().has_data()) {\n                    coeffT d = copy(node.coeff());\n                    d(f->cdata.s0)=0.0;\n                    const double error=d.normf();\n                    const double tol=f->truncate_tol(f->get_thresh(),key);\n                    if (error<tol) node.coeff()=copy(node.coeff()(f->cdata.s0));\n                }\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {}\n\n        };\n\n        /// remove all coefficients of internal nodes\n        struct remove_internal_coeffs {\n            typedef Range<typename dcT::iterator> rangeT;\n\n            /// constructor need impl for cdata\n            remove_internal_coeffs() = default;\n\n            bool operator()(typename rangeT::iterator& it) const {\n\n                nodeT& node = it->second;\n                if (node.has_children()) node.clear_coeff();\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {}\n\n        };\n\n        /// remove all coefficients of leaf nodes\n        struct remove_leaf_coeffs {\n            typedef Range<typename dcT::iterator> rangeT;\n\n            /// constructor need impl for cdata\n            remove_leaf_coeffs() = default;\n\n            bool operator()(typename rangeT::iterator& it) const {\n                nodeT& node = it->second;\n                if (not node.has_children()) node.clear_coeff();\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {}\n\n        };\n\n\n        /// keep only the sum coefficients in each node\n        struct do_keep_sum_coeffs {\n            typedef Range<typename dcT::iterator> rangeT;\n            implT* impl;\n\n            /// constructor need impl for cdata\n            do_keep_sum_coeffs(implT* impl) :impl(impl) {}\n\n            bool operator()(typename rangeT::iterator& it) const {\n\n                nodeT& node = it->second;\n                coeffT s=copy(node.coeff()(impl->cdata.s0));\n                node.coeff()=s;\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {}\n\n        };\n\n\n        /// reduce the rank of the nodes, optional fence\n        struct do_reduce_rank {\n            typedef Range<typename dcT::iterator> rangeT;\n\n            // threshold for rank reduction / SVD truncation\n            TensorArgs args;\n\n            // constructor takes target precision\n            do_reduce_rank() = default;\n            do_reduce_rank(const TensorArgs& targs) : args(targs) {}\n            do_reduce_rank(const double& thresh) {\n                args.thresh=thresh;\n            }\n\n            //\n            bool operator()(typename rangeT::iterator& it) const {\n\n                nodeT& node = it->second;\n                node.reduceRank(args.thresh);\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {}\n        };\n\n\n\n        /// check symmetry wrt particle exchange\n        struct do_check_symmetry_local {\n            typedef Range<typename dcT::const_iterator> rangeT;\n            const implT* f;\n            do_check_symmetry_local() : f(0) {}\n            do_check_symmetry_local(const implT& f) : f(&f) {}\n\n            /// return the norm of the difference of this node and its \"mirror\" node\n            double operator()(typename rangeT::iterator& it) const {\n\n\t      // Temporary fix to GCC whining about out of range access for NDIM!=6\n  \t      if constexpr(NDIM==6) {\n                const keyT& key = it->first;\n                const nodeT& fnode = it->second;\n\n                // skip internal nodes\n                if (fnode.has_children()) return 0.0;\n\n                if (f->world.size()>1) return 0.0;\n\n                // exchange particles\n                std::vector<long> map(NDIM);\n                map[0]=3; map[1]=4; map[2]=5;\n                map[3]=0; map[4]=1; map[5]=2;\n\n                // make mapped key\n                Vector<Translation,NDIM> l;\n                for (std::size_t i=0; i<NDIM; ++i) l[map[i]] = key.translation()[i];\n                const keyT mapkey(key.level(),l);\n\n                double norm=0.0;\n\n\n                // hope it's local\n                if (f->get_coeffs().probe(mapkey)) {\n                    MADNESS_ASSERT(f->get_coeffs().probe(mapkey));\n                    const nodeT& mapnode=f->get_coeffs().find(mapkey).get()->second;\n\n//                    bool have_c1=fnode.coeff().has_data() and fnode.coeff().config().has_data();\n//                    bool have_c2=mapnode.coeff().has_data() and mapnode.coeff().config().has_data();\n                    bool have_c1=fnode.coeff().has_data();\n                    bool have_c2=mapnode.coeff().has_data();\n\n                    if (have_c1 and have_c2) {\n                        tensorT c1=fnode.coeff().full_tensor_copy();\n                        tensorT c2=mapnode.coeff().full_tensor_copy();\n                        c2 = copy(c2.mapdim(map));\n                        norm=(c1-c2).normf();\n                    } else if (have_c1) {\n                        tensorT c1=fnode.coeff().full_tensor_copy();\n                        norm=c1.normf();\n                    } else if (have_c2) {\n                        tensorT c2=mapnode.coeff().full_tensor_copy();\n                        norm=c2.normf();\n                    } else {\n                        norm=0.0;\n                    }\n                } else {\n                    norm=fnode.coeff().normf();\n                }\n                return norm*norm;\n\t      }\n\t      else {\n\t\t      MADNESS_EXCEPTION(\"ONLY FOR DIM 6!\", 1);\n\t      }\n            }\n\n            double operator()(double a, double b) const {\n                return (a+b);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"no serialization of do_check_symmetry yet\",1);\n            }\n\n\n        };\n\n        /// merge the coefficent boxes of this into result's tree\n\n        /// result+= alpha*this\n        /// this and result don't have to have the same distribution or live in the same world\n        /// no comm, and the tree should be in an consistent state by virtue\n        template<typename Q, typename R>\n        struct do_accumulate_trees{\n            typedef Range<typename dcT::const_iterator> rangeT;\n            FunctionImpl<Q,NDIM>* result=0;\n            T alpha=T(1.0);\n            do_accumulate_trees() = default;\n            do_accumulate_trees(FunctionImpl<Q,NDIM>& result, const T alpha)\n                : result(&result), alpha(alpha) {}\n\n            /// return the norm of the difference of this node and its \"mirror\" node\n            bool operator()(typename rangeT::iterator& it) const {\n\n                const keyT& key = it->first;\n                const nodeT& node = it->second;\n                if (node.has_coeff()) result->get_coeffs().task(key, &nodeT::accumulate,\n                    alpha*node.coeff(), result->get_coeffs(), key, result->targs);\n                return true;\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"no serialization of do_accumulate_trees\",1);\n            }\n        };\n\n\n        /// merge the coefficient boxes of this into other's tree\n\n        /// no comm, and the tree should be in an consistent state by virtue\n        /// of FunctionNode::gaxpy_inplace\n        template<typename Q, typename R>\n        struct do_merge_trees {\n            typedef Range<typename dcT::const_iterator> rangeT;\n            FunctionImpl<Q,NDIM>* other;\n            T alpha;\n            R beta;\n            do_merge_trees() : other(0) {}\n            do_merge_trees(const T alpha, const R beta, FunctionImpl<Q,NDIM>& other)\n                : other(&other), alpha(alpha), beta(beta) {}\n\n            /// return the norm of the difference of this node and its \"mirror\" node\n            bool operator()(typename rangeT::iterator& it) const {\n\n                const keyT& key = it->first;\n                const nodeT& fnode = it->second;\n\n                // if other's node exists: add this' coeffs to it\n                // otherwise insert this' node into other's tree\n                typename dcT::accessor acc;\n                if (other->get_coeffs().find(acc,key)) {\n                    nodeT& gnode=acc->second;\n                    gnode.gaxpy_inplace(beta,fnode,alpha);\n                } else {\n                    nodeT gnode=fnode;\n                    gnode.scale(alpha);\n                    other->get_coeffs().replace(key,gnode);\n                }\n                return true;\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"no serialization of do_merge_trees\",1);\n            }\n        };\n\n\n        /// map this on f\n        struct do_mapdim {\n            typedef Range<typename dcT::iterator> rangeT;\n\n            std::vector<long> map;\n            implT* f;\n\n            do_mapdim() : f(0) {};\n            do_mapdim(const std::vector<long> map, implT& f) : map(map), f(&f) {}\n\n            bool operator()(typename rangeT::iterator& it) const {\n\n                const keyT& key = it->first;\n                const nodeT& node = it->second;\n\n                Vector<Translation,NDIM> l;\n                for (std::size_t i=0; i<NDIM; ++i) l[map[i]] = key.translation()[i];\n                tensorT c = node.coeff().reconstruct_tensor();\n                if (c.size()) c = copy(c.mapdim(map));\n                coeffT cc(c,f->get_tensor_args());\n                f->get_coeffs().replace(keyT(key.level(),l), nodeT(cc,node.has_children()));\n\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"no serialization of do_mapdim\",1);\n            }\n\n        };\n\n        /// mirror dimensions of this, write result on f\n        struct do_mirror {\n            typedef Range<typename dcT::iterator> rangeT;\n\n            std::vector<long> mirror;\n            implT* f;\n\n            do_mirror() : f(0) {};\n            do_mirror(const std::vector<long> mirror, implT& f) : mirror(mirror), f(&f) {}\n\n            bool operator()(typename rangeT::iterator& it) const {\n\n                const keyT& key = it->first;\n                const nodeT& node = it->second;\n\n                // mirror translation index: l_new + l_old = l_max\n                Vector<Translation,NDIM> l=key.translation();\n                Translation lmax = (Translation(1)<<key.level()) - 1;\n                for (std::size_t i=0; i<NDIM; ++i) {\n                \tif (mirror[i]==-1) l[i]= lmax - key.translation()[i];\n                }\n\n                // mirror coefficients: multiply all odd-k slices with -1\n                tensorT c = node.coeff().full_tensor_copy();\n            \tif (c.size()) {\n            \t\tstd::vector<Slice> s(___);\n\n                \t// loop over dimensions and over k\n                \tfor (size_t i=0; i<NDIM; ++i) {\n                \t\tstd::size_t kmax=c.dim(i);\n                \t\tif (mirror[i]==-1) {\n                \t\t\tfor (size_t k=1; k<kmax; k+=2) {\n                \t\t\t\ts[i]=Slice(k,k,1);\n                \t\t\t\tc(s)*=(-1.0);\n                \t\t\t}\n                \t\t\ts[i]=_;\n                \t\t}\n                \t}\n                }\n                coeffT cc(c,f->get_tensor_args());\n                f->get_coeffs().replace(keyT(key.level(),l), nodeT(cc,node.has_children()));\n\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"no serialization of do_mirror\",1);\n            }\n\n        };\n\n        /// mirror dimensions of this, write result on f\n        struct do_map_and_mirror {\n            typedef Range<typename dcT::iterator> rangeT;\n\n            std::vector<long> map,mirror;\n            implT* f;\n\n            do_map_and_mirror() = default;\n            do_map_and_mirror(const std::vector<long> map, const std::vector<long> mirror, implT& f)\n            \t\t: map(map), mirror(mirror), f(&f) {}\n\n            bool operator()(typename rangeT::iterator& it) const {\n\n                const keyT& key = it->first;\n                const nodeT& node = it->second;\n\n                tensorT c = node.coeff().full_tensor_copy();\n                Vector<Translation,NDIM> l=key.translation();\n\n                // do the mapping first (if present)\n                if (map.size()>0) {\n                \tVector<Translation,NDIM> l1=l;\n                \tfor (std::size_t i=0; i<NDIM; ++i) l1[map[i]] = l[i];\n                \tstd::swap(l,l1);\n                \tif (c.size()) c = copy(c.mapdim(map));\n                }\n\n                if (mirror.size()>0) {\n\t\t\t\t\t// mirror translation index: l_new + l_old = l_max\n                \tVector<Translation,NDIM> l1=l;\n\t\t\t\t\tTranslation lmax = (Translation(1)<<key.level()) - 1;\n\t\t\t\t\tfor (std::size_t i=0; i<NDIM; ++i) {\n\t\t\t\t\t\tif (mirror[i]==-1) l1[i]= lmax - l[i];\n\t\t\t\t\t}\n                \tstd::swap(l,l1);\n\n                \t// mirror coefficients: multiply all odd-k slices with -1\n\t\t\t\t\tif (c.size()) {\n\t\t\t\t\t\tstd::vector<Slice> s(___);\n\n\t\t\t\t\t\t// loop over dimensions and over k\n\t\t\t\t\t\tfor (size_t i=0; i<NDIM; ++i) {\n\t\t\t\t\t\t\tstd::size_t kmax=c.dim(i);\n\t\t\t\t\t\t\tif (mirror[i]==-1) {\n\t\t\t\t\t\t\t\tfor (size_t k=1; k<kmax; k+=2) {\n\t\t\t\t\t\t\t\t\ts[i]=Slice(k,k,1);\n\t\t\t\t\t\t\t\t\tc(s)*=(-1.0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ts[i]=_;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n                }\n\n                coeffT cc(c,f->get_tensor_args());\n                f->get_coeffs().replace(keyT(key.level(),l), nodeT(cc,node.has_children()));\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"no serialization of do_mirror\",1);\n            }\n\n        };\n\n\n\n        /// \"put\" this on g\n        struct do_average {\n            typedef Range<typename dcT::const_iterator> rangeT;\n\n            implT* g;\n\n            do_average() : g(0) {}\n            do_average(implT& g) : g(&g) {}\n\n            /// iterator it points to this\n            bool operator()(typename rangeT::iterator& it) const {\n\n                const keyT& key = it->first;\n                const nodeT& fnode = it->second;\n\n                // fast return if rhs has no coeff here\n                if (fnode.has_coeff()) {\n\n                    // check if there is a node already existing\n                    typename dcT::accessor acc;\n                    if (g->get_coeffs().find(acc,key)) {\n                        nodeT& gnode=acc->second;\n                        if (gnode.has_coeff()) gnode.coeff()+=fnode.coeff();\n                    } else {\n                        g->get_coeffs().replace(key,fnode);\n                    }\n                }\n\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {}\n        };\n\n        /// change representation of nodes' coeffs to low rank, optional fence\n        struct do_change_tensor_type {\n            typedef Range<typename dcT::iterator> rangeT;\n\n            // threshold for rank reduction / SVD truncation\n            TensorArgs targs;\n            implT* f;\n\n            // constructor takes target precision\n            do_change_tensor_type() = default;\n            // do_change_tensor_type(const TensorArgs& targs) : targs(targs) {}\n            do_change_tensor_type(const TensorArgs& targs, implT& g) : targs(targs), f(&g) {}\n\n            //\n            bool operator()(typename rangeT::iterator& it) const {\n\n            \tdouble cpu0=cpu_time();\n                nodeT& node = it->second;\n                change_tensor_type(node.coeff(),targs);\n            \tdouble cpu1=cpu_time();\n                f->timer_change_tensor_type.accumulate(cpu1-cpu0);\n\n                return true;\n\n            }\n            template <typename Archive> void serialize(const Archive& ar) {}\n        };\n\n        struct do_consolidate_buffer {\n            typedef Range<typename dcT::iterator> rangeT;\n\n            // threshold for rank reduction / SVD truncation\n            TensorArgs targs;\n\n            // constructor takes target precision\n            do_consolidate_buffer() = default;\n            do_consolidate_buffer(const TensorArgs& targs) : targs(targs) {}\n            bool operator()(typename rangeT::iterator& it) const {\n                it->second.consolidate_buffer(targs);\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {}\n        };\n\n\n\n        template <typename opT>\n        struct do_unary_op_value_inplace {\n            typedef Range<typename dcT::iterator> rangeT;\n            implT* impl;\n            opT op;\n            do_unary_op_value_inplace(implT* impl, const opT& op) : impl(impl), op(op) {}\n            bool operator()(typename rangeT::iterator& it) const {\n                const keyT& key = it->first;\n                nodeT& node = it->second;\n                if (node.has_coeff()) {\n                    const TensorArgs full_args(-1.0,TT_FULL);\n                    change_tensor_type(node.coeff(),full_args);\n                    tensorT& t= node.coeff().full_tensor();\n                    //double before = t.normf();\n                    tensorT values = impl->fcube_for_mul(key, key, t);\n                    op(key, values);\n                    double scale = pow(0.5,0.5*NDIM*key.level())*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n                    t = transform(values,impl->cdata.quad_phiw).scale(scale);\n                    node.coeff()=coeffT(t,impl->get_tensor_args());\n                    //double after = t.normf();\n                    //madness::print(\"XOP:\", key, before, after);\n                }\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {}\n        };\n\n        template <typename Q, typename R>\n        /// @todo I don't know what this does other than a trasform\n        void vtransform_doit(const std::shared_ptr< FunctionImpl<R,NDIM> >& right,\n                             const Tensor<Q>& c,\n                             const std::vector< std::shared_ptr< FunctionImpl<T,NDIM> > >& vleft,\n                             double tol) {\n            // To reduce crunch on vectors being transformed each task\n            // does them in a random order\n            std::vector<unsigned int> ind(vleft.size());\n            for (unsigned int i=0; i<vleft.size(); ++i) {\n                ind[i] = i;\n            }\n            for (unsigned int i=0; i<vleft.size(); ++i) {\n                unsigned int j = RandomValue<int>()%vleft.size();\n                std::swap(ind[i],ind[j]);\n            }\n\n            typename FunctionImpl<R,NDIM>::dcT::const_iterator end = right->coeffs.end();\n            for (typename FunctionImpl<R,NDIM>::dcT::const_iterator it=right->coeffs.begin(); it != end; ++it) {\n                if (it->second.has_coeff()) {\n                    const Key<NDIM>& key = it->first;\n                    const GenTensor<R>& r = it->second.coeff();\n                    double norm = r.normf();\n                    double keytol = truncate_tol(tol,key);\n\n                    for (unsigned int j=0; j<vleft.size(); ++j) {\n                        unsigned int i = ind[j]; // Random permutation\n                        if (std::abs(norm*c(i)) > keytol) {\n                            implT* left = vleft[i].get();\n                            typename dcT::accessor acc;\n                            bool newnode = left->coeffs.insert(acc,key);\n                            if (newnode && key.level()>0) {\n                                Key<NDIM> parent = key.parent();\n\t\t\t\tif (left->coeffs.is_local(parent))\n\t\t\t\t  left->coeffs.send(parent, &nodeT::set_has_children_recursive, left->coeffs, parent);\n\t\t\t\telse\n\t\t\t\t  left->coeffs.task(parent, &nodeT::set_has_children_recursive, left->coeffs, parent);\n\n                            }\n                            nodeT& node = acc->second;\n                            if (!node.has_coeff())\n                                node.set_coeff(coeffT(cdata.v2k,targs));\n                            coeffT& t = node.coeff();\n                            t.gaxpy(1.0, r, c(i));\n                        }\n                    }\n                }\n            }\n        }\n\n        /// Refine multiple functions down to the same finest level\n\n        /// @param v the vector of functions we are refining.\n        /// @param key the current node.\n        /// @param c the vector of coefficients passed from above.\n        void refine_to_common_level(const std::vector<FunctionImpl<T,NDIM>*>& v,\n                                    const std::vector<tensorT>& c,\n                                    const keyT key);\n\n        /// Inplace operate on many functions (impl's) with an operator within a certain box\n        /// @param[in] key the key of the current function node (box)\n        /// @param[in] op the operator\n        /// @param[in] v the vector of function impl's on which to be operated\n        template <typename opT>\n        void multiop_values_doit(const keyT& key, const opT& op, const std::vector<implT*>& v) {\n            std::vector<tensorT> c(v.size());\n            for (unsigned int i=0; i<v.size(); i++) {\n                if (v[i]) {\n                    coeffT cc = coeffs2values(key, v[i]->coeffs.find(key).get()->second.coeff());\n                    c[i]=cc.full_tensor();\n                }\n            }\n            tensorT r = op(key, c);\n            coeffs.replace(key, nodeT(coeffT(values2coeffs(key, r),targs),false));\n        }\n\n        /// Inplace operate on many functions (impl's) with an operator within a certain box\n        /// Assumes all functions have been refined down to the same level\n        /// @param[in] op the operator\n        /// @param[in] v the vector of function impl's on which to be operated\n        template <typename opT>\n        void multiop_values(const opT& op, const std::vector<implT*>& v) {\n            // rough check on refinement level (ignore non-initialized functions\n            for (std::size_t i=1; i<v.size(); ++i) {\n                if (v[i] and v[i-1]) {\n                    MADNESS_ASSERT(v[i]->coeffs.size()==v[i-1]->coeffs.size());\n                }\n            }\n            typename dcT::iterator end = v[0]->coeffs.end();\n            for (typename dcT::iterator it=v[0]->coeffs.begin(); it!=end; ++it) {\n                const keyT& key = it->first;\n                if (it->second.has_coeff())\n                    world.taskq.add(*this, &implT:: template multiop_values_doit<opT>, key, op, v);\n                else\n                    coeffs.replace(key, nodeT(coeffT(),true));\n            }\n            world.gop.fence();\n        }\n\n        /// Inplace operate on many functions (impl's) with an operator within a certain box\n\n        /// @param[in] key the key of the current function node (box)\n        /// @param[in] op the operator\n        /// @param[in] vin the vector of function impl's on which to be operated\n        /// @param[out] vout the resulting vector of function impl's\n        template <typename opT>\n        void multi_to_multi_op_values_doit(const keyT& key, const opT& op,\n                const std::vector<implT*>& vin, std::vector<implT*>& vout) {\n            std::vector<tensorT> c(vin.size());\n            for (unsigned int i=0; i<vin.size(); i++) {\n                if (vin[i]) {\n                    coeffT cc = coeffs2values(key, vin[i]->coeffs.find(key).get()->second.coeff());\n                    c[i]=cc.full_tensor();\n                }\n            }\n            std::vector<tensorT> r = op(key, c);\n            MADNESS_ASSERT(r.size()==vout.size());\n            for (std::size_t i=0; i<vout.size(); ++i) {\n                vout[i]->coeffs.replace(key, nodeT(coeffT(values2coeffs(key, r[i]),targs),false));\n            }\n        }\n\n        /// Inplace operate on many functions (impl's) with an operator within a certain box\n\n        /// Assumes all functions have been refined down to the same level\n        /// @param[in] op the operator\n        /// @param[in] vin the vector of function impl's on which to be operated\n        /// @param[out] vout the resulting vector of function impl's\n        template <typename opT>\n        void multi_to_multi_op_values(const opT& op, const std::vector<implT*>& vin,\n                std::vector<implT*>& vout, const bool fence=true) {\n            // rough check on refinement level (ignore non-initialized functions\n            for (std::size_t i=1; i<vin.size(); ++i) {\n                if (vin[i] and vin[i-1]) {\n                    MADNESS_ASSERT(vin[i]->coeffs.size()==vin[i-1]->coeffs.size());\n                }\n            }\n            typename dcT::iterator end = vin[0]->coeffs.end();\n            for (typename dcT::iterator it=vin[0]->coeffs.begin(); it!=end; ++it) {\n                const keyT& key = it->first;\n                if (it->second.has_coeff())\n                    world.taskq.add(*this, &implT:: template multi_to_multi_op_values_doit<opT>,\n                            key, op, vin, vout);\n                else {\n                    // fill result functions with empty box in this key\n                    for (implT* it2 : vout) {\n                        it2->coeffs.replace(key, nodeT(coeffT(),true));\n                    }\n                }\n            }\n            if (fence) world.gop.fence();\n        }\n\n        /// Transforms a vector of functions left[i] = sum[j] right[j]*c[j,i] using sparsity\n        /// @param[in] vright vector of functions (impl's) on which to be transformed\n        /// @param[in] c the tensor (matrix) transformer\n        /// @param[in] vleft vector of of the *newly* transformed functions (impl's)\n        template <typename Q, typename R>\n        void vtransform(const std::vector< std::shared_ptr< FunctionImpl<R,NDIM> > >& vright,\n                        const Tensor<Q>& c,\n                        const std::vector< std::shared_ptr< FunctionImpl<T,NDIM> > >& vleft,\n                        double tol,\n                        bool fence) {\n            for (unsigned int j=0; j<vright.size(); ++j) {\n                world.taskq.add(*this, &implT:: template vtransform_doit<Q,R>, vright[j], copy(c(j,_)), vleft, tol);\n            }\n            if (fence)\n                world.gop.fence();\n        }\n\n        /// Unary operation applied inplace to the values with optional refinement and fence\n        /// @param[in] op the unary operator for the values\n        template <typename opT>\n        void unary_op_value_inplace(const opT& op, bool fence) {\n            typedef Range<typename dcT::iterator> rangeT;\n            typedef do_unary_op_value_inplace<opT> xopT;\n            world.taskq.for_each<rangeT,xopT>(rangeT(coeffs.begin(), coeffs.end()), xopT(this,op));\n            if (fence)\n                world.gop.fence();\n        }\n\n        // Multiplication assuming same distribution and recursive descent\n        /// Both left and right functions are in the scaling function basis\n        /// @param[in] key the key to the current function node (box)\n        /// @param[in] left the function impl associated with the left function\n        /// @param[in] lcin the scaling function coefficients associated with the\n        ///            current box in the left function\n        /// @param[in] vrightin the vector of function impl's associated with\n        ///            the vector of right functions\n        /// @param[in] vrcin the vector scaling function coefficients associated with the\n        ///            current box in the right functions\n        /// @param[out] vresultin the vector of resulting functions (impl's)\n        template <typename L, typename R>\n        void mulXXveca(const keyT& key,\n                       const FunctionImpl<L,NDIM>* left, const Tensor<L>& lcin,\n                       const std::vector<const FunctionImpl<R,NDIM>*> vrightin,\n                       const std::vector< Tensor<R> >& vrcin,\n                       const std::vector<FunctionImpl<T,NDIM>*> vresultin,\n                       double tol) {\n            typedef typename FunctionImpl<L,NDIM>::dcT::const_iterator literT;\n            typedef typename FunctionImpl<R,NDIM>::dcT::const_iterator riterT;\n\n            double lnorm = 1e99;\n            Tensor<L> lc = lcin;\n            if (lc.size() == 0) {\n                literT it = left->coeffs.find(key).get();\n                MADNESS_ASSERT(it != left->coeffs.end());\n                lnorm = it->second.get_norm_tree();\n                if (it->second.has_coeff())\n                    lc = it->second.coeff().full_tensor_copy();\n            }\n\n            // Loop thru RHS functions seeing if anything can be multiplied\n            std::vector<FunctionImpl<T,NDIM>*> vresult;\n            std::vector<const FunctionImpl<R,NDIM>*> vright;\n            std::vector< Tensor<R> > vrc;\n            vresult.reserve(vrightin.size());\n            vright.reserve(vrightin.size());\n            vrc.reserve(vrightin.size());\n\n            for (unsigned int i=0; i<vrightin.size(); ++i) {\n                FunctionImpl<T,NDIM>* result = vresultin[i];\n                const FunctionImpl<R,NDIM>* right = vrightin[i];\n                Tensor<R> rc = vrcin[i];\n                double rnorm;\n                if (rc.size() == 0) {\n                    riterT it = right->coeffs.find(key).get();\n                    MADNESS_ASSERT(it != right->coeffs.end());\n                    rnorm = it->second.get_norm_tree();\n                    if (it->second.has_coeff())\n                        rc = it->second.coeff().full_tensor_copy();\n                }\n                else {\n                    rnorm = rc.normf();\n                }\n\n                if (rc.size() && lc.size()) { // Yipee!\n                    result->task(world.rank(), &implT:: template do_mul<L,R>, key, lc, std::make_pair(key,rc));\n                }\n                else if (tol && lnorm*rnorm < truncate_tol(tol, key)) {\n                    result->coeffs.replace(key, nodeT(coeffT(cdata.vk,targs),false)); // Zero leaf\n                }\n                else {  // Interior node\n                    result->coeffs.replace(key, nodeT(coeffT(),true));\n                    vresult.push_back(result);\n                    vright.push_back(right);\n                    vrc.push_back(rc);\n                }\n            }\n\n            if (vresult.size()) {\n                Tensor<L> lss;\n                if (lc.size()) {\n                    Tensor<L> ld(cdata.v2k);\n                    ld(cdata.s0) = lc(___);\n                    lss = left->unfilter(ld);\n                }\n\n                std::vector< Tensor<R> > vrss(vresult.size());\n                for (unsigned int i=0; i<vresult.size(); ++i) {\n                    if (vrc[i].size()) {\n                        Tensor<R> rd(cdata.v2k);\n                        rd(cdata.s0) = vrc[i](___);\n                        vrss[i] = vright[i]->unfilter(rd);\n                    }\n                }\n\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    const keyT& child = kit.key();\n                    Tensor<L> ll;\n\n                    std::vector<Slice> cp = child_patch(child);\n\n                    if (lc.size())\n                        ll = copy(lss(cp));\n\n                    std::vector< Tensor<R> > vv(vresult.size());\n                    for (unsigned int i=0; i<vresult.size(); ++i) {\n                        if (vrc[i].size())\n                            vv[i] = copy(vrss[i](cp));\n                    }\n\n                    woT::task(coeffs.owner(child), &implT:: template mulXXveca<L,R>, child, left, ll, vright, vv, vresult, tol);\n                }\n            }\n        }\n\n        /// Multiplication using recursive descent and assuming same distribution\n        /// Both left and right functions are in the scaling function basis\n        /// @param[in] key the key to the current function node (box)\n        /// @param[in] left the function impl associated with the left function\n        /// @param[in] lcin the scaling function coefficients associated with the\n        ///            current box in the left function\n        /// @param[in] right the function impl associated with the right function\n        /// @param[in] rcin the scaling function coefficients associated with the\n        ///            current box in the right function\n        template <typename L, typename R>\n        void mulXXa(const keyT& key,\n                    const FunctionImpl<L,NDIM>* left, const Tensor<L>& lcin,\n                    const FunctionImpl<R,NDIM>* right,const Tensor<R>& rcin,\n                    double tol) {\n            typedef typename FunctionImpl<L,NDIM>::dcT::const_iterator literT;\n            typedef typename FunctionImpl<R,NDIM>::dcT::const_iterator riterT;\n\n            double lnorm=1e99, rnorm=1e99;\n\n            Tensor<L> lc = lcin;\n            if (lc.size() == 0) {\n                literT it = left->coeffs.find(key).get();\n                MADNESS_ASSERT(it != left->coeffs.end());\n                lnorm = it->second.get_norm_tree();\n                if (it->second.has_coeff())\n                    lc = it->second.coeff().reconstruct_tensor();\n            }\n\n            Tensor<R> rc = rcin;\n            if (rc.size() == 0) {\n                riterT it = right->coeffs.find(key).get();\n                MADNESS_ASSERT(it != right->coeffs.end());\n                rnorm = it->second.get_norm_tree();\n                if (it->second.has_coeff())\n                    rc = it->second.coeff().reconstruct_tensor();\n            }\n\n            // both nodes are leaf nodes: multiply and return\n            if (rc.size() && lc.size()) { // Yipee!\n                do_mul<L,R>(key, lc, std::make_pair(key,rc));\n                return;\n            }\n\n            if (tol) {\n                if (lc.size())\n                    lnorm = lc.normf(); // Otherwise got from norm tree above\n                if (rc.size())\n                    rnorm = rc.normf();\n                if (lnorm*rnorm < truncate_tol(tol, key)) {\n                    coeffs.replace(key, nodeT(coeffT(cdata.vk,targs),false)); // Zero leaf node\n                    return;\n                }\n            }\n\n            // Recur down\n            coeffs.replace(key, nodeT(coeffT(),true)); // Interior node\n\n            Tensor<L> lss;\n            if (lc.size()) {\n                Tensor<L> ld(cdata.v2k);\n                ld(cdata.s0) = lc(___);\n                lss = left->unfilter(ld);\n            }\n\n            Tensor<R> rss;\n            if (rc.size()) {\n                Tensor<R> rd(cdata.v2k);\n                rd(cdata.s0) = rc(___);\n                rss = right->unfilter(rd);\n            }\n\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                const keyT& child = kit.key();\n                Tensor<L> ll;\n                Tensor<R> rr;\n                if (lc.size())\n                    ll = copy(lss(child_patch(child)));\n                if (rc.size())\n                    rr = copy(rss(child_patch(child)));\n\n                woT::task(coeffs.owner(child), &implT:: template mulXXa<L,R>, child, left, ll, right, rr, tol);\n            }\n        }\n\n\n        // Binary operation on values using recursive descent and assuming same distribution\n        /// Both left and right functions are in the scaling function basis\n        /// @param[in] key the key to the current function node (box)\n        /// @param[in] left the function impl associated with the left function\n        /// @param[in] lcin the scaling function coefficients associated with the\n        ///            current box in the left function\n        /// @param[in] right the function impl associated with the right function\n        /// @param[in] rcin the scaling function coefficients associated with the\n        ///            current box in the right function\n        /// @param[in] op the binary operator\n        template <typename L, typename R, typename opT>\n        void binaryXXa(const keyT& key,\n                       const FunctionImpl<L,NDIM>* left, const Tensor<L>& lcin,\n                       const FunctionImpl<R,NDIM>* right,const Tensor<R>& rcin,\n                       const opT& op) {\n            typedef typename FunctionImpl<L,NDIM>::dcT::const_iterator literT;\n            typedef typename FunctionImpl<R,NDIM>::dcT::const_iterator riterT;\n\n            Tensor<L> lc = lcin;\n            if (lc.size() == 0) {\n                literT it = left->coeffs.find(key).get();\n                MADNESS_ASSERT(it != left->coeffs.end());\n                if (it->second.has_coeff())\n                    lc = it->second.coeff().reconstruct_tensor();\n            }\n\n            Tensor<R> rc = rcin;\n            if (rc.size() == 0) {\n                riterT it = right->coeffs.find(key).get();\n                MADNESS_ASSERT(it != right->coeffs.end());\n                if (it->second.has_coeff())\n                    rc = it->second.coeff().reconstruct_tensor();\n            }\n\n            if (rc.size() && lc.size()) { // Yipee!\n                do_binary_op<L,R>(key, lc, std::make_pair(key,rc), op);\n                return;\n            }\n\n            // Recur down\n            coeffs.replace(key, nodeT(coeffT(),true)); // Interior node\n\n            Tensor<L> lss;\n            if (lc.size()) {\n                Tensor<L> ld(cdata.v2k);\n                ld(cdata.s0) = lc(___);\n                lss = left->unfilter(ld);\n            }\n\n            Tensor<R> rss;\n            if (rc.size()) {\n                Tensor<R> rd(cdata.v2k);\n                rd(cdata.s0) = rc(___);\n                rss = right->unfilter(rd);\n            }\n\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                const keyT& child = kit.key();\n                Tensor<L> ll;\n                Tensor<R> rr;\n                if (lc.size())\n                    ll = copy(lss(child_patch(child)));\n                if (rc.size())\n                    rr = copy(rss(child_patch(child)));\n\n                woT::task(coeffs.owner(child), &implT:: template binaryXXa<L,R,opT>, child, left, ll, right, rr, op);\n            }\n        }\n\n        template <typename Q, typename opT>\n        struct coeff_value_adaptor {\n            typedef typename opT::resultT resultT;\n            const FunctionImpl<Q,NDIM>* impl_func;\n            opT op;\n\n            coeff_value_adaptor() = default;\n            coeff_value_adaptor(const FunctionImpl<Q,NDIM>* impl_func,\n                                const opT& op)\n                : impl_func(impl_func), op(op) {}\n\n            Tensor<resultT> operator()(const Key<NDIM>& key, const Tensor<Q>& t) const {\n                Tensor<Q> invalues = impl_func->coeffs2values(key, t);\n\n                Tensor<resultT> outvalues = op(key, invalues);\n\n                return impl_func->values2coeffs(key, outvalues);\n            }\n\n            template <typename Archive>\n            void serialize(Archive& ar) {\n                ar & impl_func & op;\n            }\n        };\n\n        /// Out of place unary operation on function impl\n        /// The skeleton algorithm should resemble something like\n        ///\n        /// *this = op(*func)\n        ///\n        /// @param[in] key the key of the current function node (box)\n        /// @param[in] func the function impl on which to be operated\n        /// @param[in] op the unary operator\n        template <typename Q, typename opT>\n        void unaryXXa(const keyT& key,\n                      const FunctionImpl<Q,NDIM>* func, const opT& op) {\n\n            //            const Tensor<Q>& fc = func->coeffs.find(key).get()->second.full_tensor_copy();\n            const Tensor<Q> fc = func->coeffs.find(key).get()->second.coeff().reconstruct_tensor();\n\n            if (fc.size() == 0) {\n                // Recur down\n                coeffs.replace(key, nodeT(coeffT(),true)); // Interior node\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    const keyT& child = kit.key();\n                    woT::task(coeffs.owner(child), &implT:: template unaryXXa<Q,opT>, child, func, op);\n                }\n            }\n            else {\n                tensorT t=op(key,fc);\n                coeffs.replace(key, nodeT(coeffT(t,targs),false)); // Leaf node\n            }\n        }\n\n        /// Multiplies two functions (impl's) together. Delegates to the mulXXa() method\n        /// @param[in] left pointer to the left function impl\n        /// @param[in] right pointer to the right function impl\n        /// @param[in] tol numerical tolerance\n        template <typename L, typename R>\n        void mulXX(const FunctionImpl<L,NDIM>* left, const FunctionImpl<R,NDIM>* right, double tol, bool fence) {\n            if (world.rank() == coeffs.owner(cdata.key0))\n                mulXXa(cdata.key0, left, Tensor<L>(), right, Tensor<R>(), tol);\n            if (fence)\n                world.gop.fence();\n\n            //verify_tree();\n        }\n\n        /// Performs binary operation on two functions (impl's). Delegates to the binaryXXa() method\n        /// @param[in] left pointer to the left function impl\n        /// @param[in] right pointer to the right function impl\n        /// @param[in] op the binary operator\n        template <typename L, typename R, typename opT>\n        void binaryXX(const FunctionImpl<L,NDIM>* left, const FunctionImpl<R,NDIM>* right,\n                      const opT& op, bool fence) {\n            if (world.rank() == coeffs.owner(cdata.key0))\n                binaryXXa(cdata.key0, left, Tensor<L>(), right, Tensor<R>(), op);\n            if (fence)\n                world.gop.fence();\n\n            //verify_tree();\n        }\n\n        /// Performs unary operation on function impl. Delegates to the unaryXXa() method\n        /// @param[in] func function impl of the operand\n        /// @param[in] op the unary operator\n        template <typename Q, typename opT>\n        void unaryXX(const FunctionImpl<Q,NDIM>* func, const opT& op, bool fence) {\n            if (world.rank() == coeffs.owner(cdata.key0))\n                unaryXXa(cdata.key0, func, op);\n            if (fence)\n                world.gop.fence();\n\n            //verify_tree();\n        }\n\n        /// Performs unary operation on function impl. Delegates to the unaryXXa() method\n        /// @param[in] func function impl of the operand\n        /// @param[in] op the unary operator\n        template <typename Q, typename opT>\n        void unaryXXvalues(const FunctionImpl<Q,NDIM>* func, const opT& op, bool fence) {\n            if (world.rank() == coeffs.owner(cdata.key0))\n                unaryXXa(cdata.key0, func, coeff_value_adaptor<Q,opT>(func,op));\n            if (fence)\n                world.gop.fence();\n\n            //verify_tree();\n        }\n\n        /// Multiplies a function (impl) with a vector of functions (impl's). Delegates to the\n        /// mulXXveca() method.\n        /// @param[in] left pointer to the left function impl\n        /// @param[in] vright vector of pointers to the right function impl's\n        /// @param[in] tol numerical tolerance\n        /// @param[out] vresult vector of pointers to the resulting function impl's\n        template <typename L, typename R>\n        void mulXXvec(const FunctionImpl<L,NDIM>* left,\n                      const std::vector<const FunctionImpl<R,NDIM>*>& vright,\n                      const std::vector<FunctionImpl<T,NDIM>*>& vresult,\n                      double tol,\n                      bool fence) {\n            std::vector< Tensor<R> > vr(vright.size());\n            if (world.rank() == coeffs.owner(cdata.key0))\n                mulXXveca(cdata.key0, left, Tensor<L>(), vright, vr, vresult, tol);\n            if (fence)\n                world.gop.fence();\n        }\n\n        Future<double> get_norm_tree_recursive(const keyT& key) const;\n\n        mutable long box_leaf[1000];\n        mutable long box_interior[1000];\n\n        // horrifically non-scalable\n        void put_in_box(ProcessID from, long nl, long ni) const;\n\n        /// Prints summary of data distribution\n        void print_info() const;\n\n        /// Verify tree is properly constructed ... global synchronization involved\n\n        /// If an inconsistency is detected, prints a message describing the error and\n        /// then throws a madness exception.\n        ///\n        /// This is a reasonably quick and scalable operation that is\n        /// useful for debugging and paranoia.\n        void verify_tree() const;\n\n        /// check that parents and children are consistent\n\n        /// will not check proper size of coefficients\n        /// global communication\n        bool verify_parents_and_children() const;\n\n        /// check that the tree state and the coeffs are consistent\n\n        /// will not check existence of children and/or parents\n        /// no communication\n        bool verify_tree_state_local() const;\n\n        /// Walk up the tree returning pair(key,node) for first node with coefficients\n\n        /// Three possibilities.\n        ///\n        /// 1) The coeffs are present and returned with the key of the containing node.\n        ///\n        /// 2) The coeffs are further up the tree ... the request is forwarded up.\n        ///\n        /// 3) The coeffs are futher down the tree ... an empty tensor is returned.\n        ///\n        /// !! This routine is crying out for an optimization to\n        /// manage the number of messages being sent ... presently\n        /// each parent is fetched 2^(n*d) times where n is the no. of\n        /// levels between the level of evaluation and the parent.\n        /// Alternatively, reimplement multiply as a downward tree\n        /// walk and just pass the parent down.  Slightly less\n        /// parallelism but much less communication.\n        /// @todo Robert .... help!\n        void sock_it_to_me(const keyT& key,\n                           const RemoteReference< FutureImpl< std::pair<keyT,coeffT> > >& ref) const;\n        /// As above, except\n        /// 3) The coeffs are constructed from the avg of nodes further down the tree\n        /// @todo Robert .... help!\n        void sock_it_to_me_too(const keyT& key,\n                               const RemoteReference< FutureImpl< std::pair<keyT,coeffT> > >& ref) const;\n\n        /// @todo help!\n        void plot_cube_kernel(archive::archive_ptr< Tensor<T> > ptr,\n                              const keyT& key,\n                              const coordT& plotlo, const coordT& plothi, const std::vector<long>& npt,\n                              bool eval_refine) const;\n\n\n        /// Evaluate a cube/slice of points ... plotlo and plothi are already in simulation coordinates\n        /// No communications\n        /// @param[in] plotlo the coordinate of the starting point\n        /// @param[in] plothi the coordinate of the ending point\n        /// @param[in] npt the number of points in each dimension\n        Tensor<T> eval_plot_cube(const coordT& plotlo,\n                                 const coordT& plothi,\n                                 const std::vector<long>& npt,\n                                 const bool eval_refine = false) const;\n\n\n        /// Evaluate function only if point is local returning (true,value); otherwise return (false,0.0)\n\n        /// maxlevel is the maximum depth to search down to --- the max local depth can be\n        /// computed with max_local_depth();\n        std::pair<bool,T> eval_local_only(const Vector<double,NDIM>& xin, Level maxlevel) ;\n\n\n        /// Evaluate the function at a point in \\em simulation coordinates\n\n        /// Only the invoking process will get the result via the\n        /// remote reference to a future.  Active messages may be sent\n        /// to other nodes.\n        void eval(const Vector<double,NDIM>& xin,\n                  const keyT& keyin,\n                  const typename Future<T>::remote_refT& ref);\n\n        /// Get the depth of the tree at a point in \\em simulation coordinates\n\n        /// Only the invoking process will get the result via the\n        /// remote reference to a future.  Active messages may be sent\n        /// to other nodes.\n        ///\n        /// This function is a minimally-modified version of eval()\n        void evaldepthpt(const Vector<double,NDIM>& xin,\n                         const keyT& keyin,\n                         const typename Future<Level>::remote_refT& ref);\n\n        /// Get the rank of leaf box of the tree at a point in \\em simulation coordinates\n\n        /// Only the invoking process will get the result via the\n        /// remote reference to a future.  Active messages may be sent\n        /// to other nodes.\n        ///\n        /// This function is a minimally-modified version of eval()\n        void evalR(const Vector<double,NDIM>& xin,\n                   const keyT& keyin,\n                   const typename Future<long>::remote_refT& ref);\n\n\n        /// Computes norm of low/high-order polyn. coeffs for autorefinement test\n\n        /// t is a k^d tensor.  In order to screen the autorefinement\n        /// during multiplication compute the norms of\n        /// ... lo ... the block of t for all polynomials of order < k/2\n        /// ... hi ... the block of t for all polynomials of order >= k/2\n        ///\n        /// k=5   0,1,2,3,4     --> 0,1,2 ... 3,4\n        /// k=6   0,1,2,3,4,5   --> 0,1,2 ... 3,4,5\n        ///\n        /// k=number of wavelets, so k=5 means max order is 4, so max exactly\n        /// representable squarable polynomial is of order 2.\n        void static tnorm(const tensorT& t, double* lo, double* hi);\n\n        void static tnorm(const GenTensor<T>& t, double* lo, double* hi);\n\n        void static tnorm(const SVDTensor<T>& t, double* lo, double* hi, const int particle);\n\n        // This invoked if node has not been autorefined\n        void do_square_inplace(const keyT& key);\n\n        // This invoked if node has been autorefined\n        void do_square_inplace2(const keyT& parent, const keyT& child, const tensorT& parent_coeff);\n\n        /// Always returns false (for when autorefine is not wanted)\n        bool noautorefine(const keyT& key, const tensorT& t) const;\n\n        /// Returns true if this block of coeffs needs autorefining\n        bool autorefine_square_test(const keyT& key, const nodeT& t) const;\n\n        /// Pointwise squaring of function with optional global fence\n\n        /// If not autorefining, local computation only if not fencing.\n        /// If autorefining, may result in asynchronous communication.\n        void square_inplace(bool fence);\n        void abs_inplace(bool fence);\n        void abs_square_inplace(bool fence);\n\n        /// is this the same as trickle_down() ?\n        void sum_down_spawn(const keyT& key, const coeffT& s);\n\n        /// After 1d push operator must sum coeffs down the tree to restore correct scaling function coefficients\n        void sum_down(bool fence);\n\n        /// perform this multiplication: h(1,2) = f(1,2) * g(1)\n        template<size_t LDIM>\n        struct multiply_op {\n\n            static bool randomize() {return false;}\n            typedef CoeffTracker<T,NDIM> ctT;\n            typedef CoeffTracker<T,LDIM> ctL;\n            typedef multiply_op<LDIM> this_type;\n\n            implT* h;     ///< the result function h(1,2) = f(1,2) * g(1)\n            ctT f;\n            ctL g;\n            int particle;       ///< if g is g(1) or g(2)\n\n            multiply_op() : h(), f(), g(), particle(1) {}\n\n            multiply_op(implT* h1, const ctT& f1, const ctL& g1, const int particle1)\n                : h(h1), f(f1), g(g1), particle(particle1) {};\n\n            /// return true if this will be a leaf node\n\n            /// use generalization of tnorm for a GenTensor\n            bool screen(const coeffT& fcoeff, const coeffT& gcoeff, const keyT& key) const {\n                MADNESS_ASSERT(gcoeff.is_full_tensor());\n                MADNESS_ASSERT(fcoeff.is_svd_tensor());\n                MADNESS_ASSERT(g.get_impl());\n                MADNESS_ASSERT(h);\n\n                double glo=0.0, ghi=0.0, flo=0.0, fhi=0.0;\n                g.get_impl()->tnorm(gcoeff.get_tensor(), &glo, &ghi);\n                g.get_impl()->tnorm(fcoeff.get_svdtensor(),&flo,&fhi,particle);\n\n                double total_hi=glo*fhi + ghi*flo + fhi*ghi;\n                return (total_hi<h->truncate_tol(h->get_thresh(),key));\n\n            }\n\n            /// apply this on a FunctionNode of f and g of Key key\n\n            /// @param[in]  key key for FunctionNode in f and g, (g: broken into particles)\n            /// @return <this node is a leaf, coefficients of this node>\n            std::pair<bool,coeffT> operator()(const Key<NDIM>& key) const {\n\n                //                bool is_leaf=(not fdatum.second.has_children());\n                //                if (not is_leaf) return std::pair<bool,coeffT> (is_leaf,coeffT());\n\n                // break key into particles (these are the child keys, with f/gdatum come the parent keys)\n                Key<LDIM> key1,key2;\n                key.break_apart(key1,key2);\n                const Key<LDIM> gkey= (particle==1) ? key1 : key2;\n\n                // get coefficients of the actual FunctionNode\n                coeffT coeff1=f.get_impl()->parent_to_child(f.coeff(),f.key(),key);\n                coeff1.normalize();\n                const coeffT coeff2=g.get_impl()->parent_to_child(g.coeff(),g.key(),gkey);\n\n                // multiplication is done in TT_2D\n                coeffT coeff1_2D=coeff1.convert(TensorArgs(h->get_thresh(),TT_2D));\n                coeff1_2D.normalize();\n\n                bool is_leaf=screen(coeff1_2D,coeff2,key);\n                if (key.level()<2) is_leaf=false;\n\n                coeffT hcoeff;\n                if (is_leaf) {\n\n                    // convert coefficients to values\n                    coeffT hvalues=f.get_impl()->coeffs2values(key,coeff1_2D);\n                    coeffT gvalues=g.get_impl()->coeffs2values(gkey,coeff2);\n\n                    // perform multiplication\n                    coeffT result_val=h->multiply(hvalues,gvalues,particle-1);\n\n                    hcoeff=h->values2coeffs(key,result_val);\n\n                    // conversion on coeffs, not on values, because it implies truncation!\n                    if (not hcoeff.is_of_tensortype(h->get_tensor_type()))\n                        hcoeff=hcoeff.convert(h->get_tensor_args());\n                }\n\n                return std::pair<bool,coeffT> (is_leaf,hcoeff);\n            }\n\n            this_type make_child(const keyT& child) const {\n\n                // break key into particles\n                Key<LDIM> key1, key2;\n                child.break_apart(key1,key2);\n                const Key<LDIM> gkey= (particle==1) ? key1 : key2;\n\n                return this_type(h,f.make_child(child),g.make_child(gkey),particle);\n            }\n\n            Future<this_type> activate() const {\n            \tFuture<ctT> f1=f.activate();\n            \tFuture<ctL> g1=g.activate();\n                return h->world.taskq.add(detail::wrap_mem_fn(*const_cast<this_type *> (this),\n                                          &this_type::forward_ctor),h,f1,g1,particle);\n            }\n\n            this_type forward_ctor(implT* h1, const ctT& f1, const ctL& g1, const int particle) {\n            \treturn this_type(h1,f1,g1,particle);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                ar & h & f & g & particle;\n            }\n        };\n\n\n        /// add two functions f and g: result=alpha * f  +  beta * g\n        struct add_op {\n\n            typedef CoeffTracker<T,NDIM> ctT;\n            typedef add_op this_type;\n\n            bool randomize() const {return false;}\n\n            /// tracking coeffs of first and second addend\n            ctT f,g;\n            /// prefactor for f, g\n            double alpha, beta;\n\n            add_op() = default;\n            add_op(const ctT& f, const ctT& g, const double alpha, const double beta)\n                : f(f), g(g), alpha(alpha), beta(beta){}\n\n            /// if we are at the bottom of the trees, return the sum of the coeffs\n            std::pair<bool,coeffT> operator()(const keyT& key) const {\n\n                bool is_leaf=(f.is_leaf() and g.is_leaf());\n                if (not is_leaf) return std::pair<bool,coeffT> (is_leaf,coeffT());\n\n                coeffT fcoeff=f.get_impl()->parent_to_child(f.coeff(),f.key(),key);\n                coeffT gcoeff=g.get_impl()->parent_to_child(g.coeff(),g.key(),key);\n                coeffT hcoeff=copy(fcoeff);\n                hcoeff.gaxpy(alpha,gcoeff,beta);\n                hcoeff.reduce_rank(f.get_impl()->get_tensor_args().thresh);\n                return std::pair<bool,coeffT> (is_leaf,hcoeff);\n            }\n\n            this_type make_child(const keyT& child) const {\n                return this_type(f.make_child(child),g.make_child(child),alpha,beta);\n            }\n\n            /// retrieve the coefficients (parent coeffs might be remote)\n            Future<this_type> activate() const {\n            \tFuture<ctT> f1=f.activate();\n            \tFuture<ctT> g1=g.activate();\n                return f.get_impl()->world.taskq.add(detail::wrap_mem_fn(*const_cast<this_type *> (this),\n                                                     &this_type::forward_ctor),f1,g1,alpha,beta);\n            }\n\n            /// taskq-compatible ctor\n            this_type forward_ctor(const ctT& f1, const ctT& g1, const double alpha, const double beta) {\n            \treturn this_type(f1,g1,alpha,beta);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                ar & f & g & alpha & beta;\n            }\n\n        };\n\n        /// multiply f (a pair function of NDIM) with an orbital g (LDIM=NDIM/2)\n\n        /// as in (with h(1,2)=*this) : h(1,2) = g(1) * f(1,2)\n        /// use tnorm as a measure to determine if f (=*this) must be refined\n        /// @param[in]  f           the NDIM function f=f(1,2)\n        /// @param[in]  g           the LDIM function g(1) (or g(2))\n        /// @param[in]  particle    1 or 2, as in g(1) or g(2)\n        template<size_t LDIM>\n        void multiply(const implT* f, const FunctionImpl<T,LDIM>* g, const int particle) {\n\n                CoeffTracker<T,NDIM> ff(f);\n                CoeffTracker<T,LDIM> gg(g);\n\n                typedef multiply_op<LDIM> coeff_opT;\n                coeff_opT coeff_op(this,ff,gg,particle);\n\n                typedef insert_op<T,NDIM> apply_opT;\n                apply_opT apply_op(this);\n\n            keyT key0=f->cdata.key0;\n\t\t\tif (world.rank() == coeffs.owner(key0)) {\n                ProcessID p= coeffs.owner(key0);\n                woT::task(p, &implT:: template forward_traverse<coeff_opT,apply_opT>, coeff_op, apply_op, key0);\n            }\n\n            set_tree_state(reconstructed);\n        }\n\n        /// Hartree product of two LDIM functions to yield a NDIM = 2*LDIM function\n        template<size_t LDIM, typename leaf_opT>\n        struct hartree_op {\n            bool randomize() const {return false;}\n\n            typedef hartree_op<LDIM,leaf_opT> this_type;\n            typedef CoeffTracker<T,LDIM> ctL;\n\n            implT* result; \t    ///< where to construct the pair function\n            ctL p1, p2;\t\t\t///< tracking coeffs of the two lo-dim functions\n            leaf_opT leaf_op;   ///< determine if a given node will be a leaf node\n\n            // ctor\n            hartree_op() : result() {}\n            hartree_op(implT* result, const ctL& p11, const ctL& p22, const leaf_opT& leaf_op)\n                : result(result), p1(p11), p2(p22), leaf_op(leaf_op) {\n                MADNESS_ASSERT(LDIM+LDIM==NDIM);\n            }\n\n            std::pair<bool,coeffT> operator()(const Key<NDIM>& key) const {\n\n                // break key into particles (these are the child keys, with datum1/2 come the parent keys)\n                Key<LDIM> key1,key2;\n                key.break_apart(key1,key2);\n\n                // this returns the appropriate NS coeffs for key1 and key2 resp.\n            \tconst coeffT fcoeff=p1.coeff(key1);\n                const coeffT gcoeff=p2.coeff(key2);\n                bool is_leaf=leaf_op(key,fcoeff.full_tensor(),gcoeff.full_tensor());\n                if (not is_leaf) return std::pair<bool,coeffT> (is_leaf,coeffT());\n\n                // extract the sum coeffs from the NS coeffs\n                const coeffT s1=fcoeff(p1.get_impl()->cdata.s0);\n                const coeffT s2=gcoeff(p2.get_impl()->cdata.s0);\n\n                // new coeffs are simply the hartree/kronecker/outer product --\n                coeffT coeff=outer(s1,s2,result->get_tensor_args());\n                // no post-determination\n                //                is_leaf=leaf_op(key,coeff);\n                return std::pair<bool,coeffT>(is_leaf,coeff);\n            }\n\n            this_type make_child(const keyT& child) const {\n\n                // break key into particles\n                Key<LDIM> key1, key2;\n                child.break_apart(key1,key2);\n\n                return this_type(result,p1.make_child(key1),p2.make_child(key2),leaf_op);\n            }\n\n            Future<this_type> activate() const {\n            \tFuture<ctL> p11=p1.activate();\n            \tFuture<ctL> p22=p2.activate();\n                return result->world.taskq.add(detail::wrap_mem_fn(*const_cast<this_type *> (this),\n                                               &this_type::forward_ctor),result,p11,p22,leaf_op);\n            }\n\n            this_type forward_ctor(implT* result1, const ctL& p11, const ctL& p22, const leaf_opT& leaf_op) {\n            \treturn this_type(result1,p11,p22,leaf_op);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                ar & result & p1 & p2 & leaf_op;\n            }\n        };\n\n        /// traverse a non-existing tree\n\n        /// part II: activate coeff_op, i.e. retrieve all the necessary remote boxes (communication)\n        /// @param[in]\tcoeff_op\toperator making the coefficients that needs activation\n        /// @param[in]\tapply_op\tjust passing thru\n        /// @param[in]\tkey\t\t\tthe key we are working on\n        template<typename coeff_opT, typename apply_opT>\n        void forward_traverse(const coeff_opT& coeff_op, const apply_opT& apply_op, const keyT& key) const {\n            MADNESS_ASSERT(coeffs.is_local(key));\n            Future<coeff_opT> active_coeff=coeff_op.activate();\n            woT::task(world.rank(), &implT:: template traverse_tree<coeff_opT,apply_opT>, active_coeff, apply_op, key);\n        }\n\n\n        /// traverse a non-existing tree\n\n        /// part I: make the coefficients, process them and continue the recursion if necessary\n        /// @param[in]\tcoeff_op\toperator making the coefficients and determining them being leaves\n        /// @param[in]\tapply_op\toperator processing the coefficients\n        /// @param[in]\tkey\t\t\tthe key we are currently working on\n        template<typename coeff_opT, typename apply_opT>\n        void traverse_tree(const coeff_opT& coeff_op, const apply_opT& apply_op, const keyT& key) const {\n            MADNESS_ASSERT(coeffs.is_local(key));\n\n            typedef typename std::pair<bool,coeffT> argT;\n            const argT arg=coeff_op(key);\n            apply_op.operator()(key,arg.second,arg.first);\n\n            const bool has_children=(not arg.first);\n            if (has_children) {\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    const keyT& child=kit.key();\n                    coeff_opT child_op=coeff_op.make_child(child);\n                    // spawn activation where child is local\n                    ProcessID p=coeffs.owner(child);\n\n                    void (implT::*ft)(const coeff_opT&, const apply_opT&, const keyT&) const = &implT::forward_traverse<coeff_opT,apply_opT>;\n\n                    woT::task(p, ft, child_op, apply_op, child);\n                }\n            }\n        }\n\n\n        /// given two functions of LDIM, perform the Hartree/Kronecker/outer product\n\n        /// |Phi(1,2)> = |phi(1)> x |phi(2)>\n        /// @param[in]\tp1\tFunctionImpl of particle 1\n        /// @param[in]\tp2\tFunctionImpl of particle 2\n        /// @param[in]\tleaf_op\toperator determining of a given box will be a leaf\n        template<std::size_t LDIM, typename leaf_opT>\n        void hartree_product(const std::vector<std::shared_ptr<FunctionImpl<T,LDIM>>> p1,\n                             const std::vector<std::shared_ptr<FunctionImpl<T,LDIM>>> p2,\n                             const leaf_opT& leaf_op, bool fence) {\n            MADNESS_CHECK_THROW(p1.size()==p2.size(),\"hartree_product: p1 and p2 must have the same size\");\n            for (auto& p : p1) MADNESS_CHECK(p->is_nonstandard() or p->is_nonstandard_with_leaves());\n            for (auto& p : p2) MADNESS_CHECK(p->is_nonstandard() or p->is_nonstandard_with_leaves());\n\n            const keyT key0=cdata.key0;\n\n            for (std::size_t i=0; i<p1.size(); ++i) {\n                if (world.rank() == this->get_coeffs().owner(key0)) {\n\n                    // prepare the CoeffTracker\n                    CoeffTracker<T,LDIM> iap1(p1[i].get());\n                    CoeffTracker<T,LDIM> iap2(p2[i].get());\n\n                    // the operator making the coefficients\n                    typedef hartree_op<LDIM,leaf_opT> coeff_opT;\n                    coeff_opT coeff_op(this,iap1,iap2,leaf_op);\n\n                    // this operator simply inserts the coeffs into this' tree\n//                typedef insert_op<T,NDIM> apply_opT;\n                    typedef accumulate_op<T,NDIM> apply_opT;\n                    apply_opT apply_op(this);\n\n                    woT::task(world.rank(), &implT:: template forward_traverse<coeff_opT,apply_opT>,\n                              coeff_op, apply_op, cdata.key0);\n\n                }\n            }\n\n            set_tree_state(redundant_after_merge);\n            if (fence) world.gop.fence();\n        }\n\n\n        template <typename opT, typename R>\n        void\n        apply_1d_realspace_push_op(const archive::archive_ptr<const opT>& pop, int axis, const keyT& key, const Tensor<R>& c) {\n            const opT* op = pop.ptr;\n            const Level n = key.level();\n            const double cnorm = c.normf();\n            const double tol = truncate_tol(thresh, key)*0.1; // ??? why this value????\n\n            Vector<Translation,NDIM> lnew(key.translation());\n            const Translation lold = lnew[axis];\n            const Translation maxs = Translation(1)<<n;\n\n            int nsmall = 0; // Counts neglected blocks to terminate s loop\n            for (Translation s=0; s<maxs; ++s) {\n                int maxdir = s ? 1 : -1;\n                for (int direction=-1; direction<=maxdir; direction+=2) {\n                    lnew[axis] = lold + direction*s;\n                    if (lnew[axis] >= 0 && lnew[axis] < maxs) { // NON-ZERO BOUNDARY CONDITIONS IGNORED HERE !!!!!!!!!!!!!!!!!!!!\n                        const Tensor<typename opT::opT>& r = op->rnlij(n, s*direction, true);\n                        double Rnorm = r.normf();\n\n                        if (Rnorm == 0.0) {\n                            return; // Hard zero means finished!\n                        }\n\n                        if (s <= 1  ||  r.normf()*cnorm > tol) { // Always do kernel and neighbor\n                            nsmall = 0;\n                            tensorT result = transform_dir(c,r,axis);\n\n                            if (result.normf() > tol*0.3) {\n                                Key<NDIM> dest(n,lnew);\n                                coeffs.task(dest, &nodeT::accumulate2, result, coeffs, dest, TaskAttributes::hipri());\n                            }\n                        }\n                        else {\n                            ++nsmall;\n                        }\n                    }\n                    else {\n                        ++nsmall;\n                    }\n                }\n                if (nsmall >= 4) {\n                    // If have two negligble blocks in\n                    // succession in each direction interpret\n                    // this as the operator being zero beyond\n                    break;\n                }\n            }\n        }\n\n        template <typename opT, typename R>\n        void\n        apply_1d_realspace_push(const opT& op, const FunctionImpl<R,NDIM>* f, int axis, bool fence) {\n            MADNESS_ASSERT(!f->is_compressed());\n\n            typedef typename FunctionImpl<R,NDIM>::dcT::const_iterator fiterT;\n            typedef FunctionNode<R,NDIM> fnodeT;\n            fiterT end = f->coeffs.end();\n            ProcessID me = world.rank();\n            for (fiterT it=f->coeffs.begin(); it!=end; ++it) {\n                const fnodeT& node = it->second;\n                if (node.has_coeff()) {\n                    const keyT& key = it->first;\n                    const Tensor<R>& c = node.coeff().full_tensor_copy();\n                    woT::task(me, &implT:: template apply_1d_realspace_push_op<opT,R>,\n                              archive::archive_ptr<const opT>(&op), axis, key, c);\n                }\n            }\n            if (fence) world.gop.fence();\n        }\n\n        void forward_do_diff1(const DerivativeBase<T,NDIM>* D,\n                              const implT* f,\n                              const keyT& key,\n                              const std::pair<keyT,coeffT>& left,\n                              const std::pair<keyT,coeffT>& center,\n                              const std::pair<keyT,coeffT>& right);\n\n        void do_diff1(const DerivativeBase<T,NDIM>* D,\n                      const implT* f,\n                      const keyT& key,\n                      const std::pair<keyT,coeffT>& left,\n                      const std::pair<keyT,coeffT>& center,\n                      const std::pair<keyT,coeffT>& right);\n\n        // Called by result function to differentiate f\n        void diff(const DerivativeBase<T,NDIM>* D, const implT* f, bool fence);\n\n        /// Returns key of general neighbor enforcing BC\n\n        /// Out of volume keys are mapped to enforce the BC as follows.\n        ///   * Periodic BC map back into the volume and return the correct key\n        ///   * non-periodic BC - returns invalid() to indicate out of volume\n        keyT neighbor(const keyT& key, const keyT& disp, const array_of_bools<NDIM>& is_periodic) const;\n\n        /// Returns key of general neighbor that resides in-volume\n\n        /// Out of volume keys are mapped to invalid()\n        keyT neighbor_in_volume(const keyT& key, const keyT& disp) const;\n\n        /// find_me. Called by diff_bdry to get coefficients of boundary function\n        Future< std::pair<keyT,coeffT> > find_me(const keyT& key) const;\n\n        /// return the a std::pair<key, node>, which MUST exist\n        std::pair<Key<NDIM>,ShallowNode<T,NDIM> > find_datum(keyT key) const;\n\n        /// multiply the ket with a one-electron potential rr(1,2)= f(1,2)*g(1)\n\n        /// @param[in]\tval_ket\tfunction values of f(1,2)\n        /// @param[in]\tval_pot\tfunction values of g(1)\n        /// @param[in]\tparticle\tif 0 then g(1), if 1 then g(2)\n        /// @return\t\tthe resulting function values\n        coeffT multiply(const coeffT& val_ket, const coeffT& val_pot, int particle) const;\n\n\n        /// given several coefficient tensors, assemble a result tensor\n\n        /// the result looks like: \t(v(1,2) + v(1) + v(2)) |ket(1,2)>\n        /// or \t\t\t\t\t\t(v(1,2) + v(1) + v(2)) |p(1) p(2)>\n        /// i.e. coefficients for the ket and coefficients for the two particles are\n        /// mutually exclusive. All potential terms are optional, just pass in empty coeffs.\n        /// @param[in]\tkey\t\t\tthe key of the FunctionNode to which these coeffs belong\n        /// @param[in]\tcoeff_ket\tcoefficients of the ket\n        /// @param[in]\tvpotential1\tfunction values of the potential for particle 1\n        /// @param[in]\tvpotential2\tfunction values of the potential for particle 2\n        /// @param[in]\tveri\t\tfunction values for the 2-particle potential\n        coeffT assemble_coefficients(const keyT& key, const coeffT& coeff_ket,\n                                     const coeffT& vpotential1, const coeffT& vpotential2,\n                                     const tensorT& veri) const;\n\n\n\n        template<std::size_t LDIM>\n        struct pointwise_multiplier {\n        \tcoeffT val_lhs, coeff_lhs;\n            long oversampling=1;\n        \tdouble error=0.0;\n        \tdouble lo=0.0, hi=0.0, lo1=0.0, hi1=0.0, lo2=0.0, hi2=0.0;\n\n    \t    pointwise_multiplier() = default;\n        \tpointwise_multiplier(const Key<NDIM> key, const coeffT& clhs) : coeff_lhs(clhs) {\n                const auto& fcf=FunctionCommonFunctionality<T,NDIM>(coeff_lhs.dim(0));\n        \t\tval_lhs=fcf.coeffs2values(key,coeff_lhs);\n        \t\terror=0.0;\n        \t\timplT::tnorm(coeff_lhs,&lo,&hi);\n                if (coeff_lhs.is_svd_tensor()) {\n                    FunctionImpl<T,LDIM>::tnorm(coeff_lhs.get_svdtensor(),&lo1,&hi1,1);\n                    FunctionImpl<T,LDIM>::tnorm(coeff_lhs.get_svdtensor(),&lo2,&hi2,2);\n                }\n        \t}\n\n        \t/// multiply values of rhs and lhs, result on rhs, rhs and lhs are of the same dimensions\n        \ttensorT operator()(const Key<NDIM> key, const tensorT& coeff_rhs) {\n\n\t\t\t\tMADNESS_ASSERT(coeff_rhs.dim(0)==coeff_lhs.dim(0));\n                auto fcf=FunctionCommonFunctionality<T,NDIM>(coeff_lhs.dim(0));\n\n\t\t\t\t// the tnorm estimate is not tight enough to be efficient, better use oversampling\n\t\t\t\tbool use_tnorm=false;\n        \t\tif (use_tnorm) {\n\t\t\t\t\tdouble rlo, rhi;\n\t\t\t\t\timplT::tnorm(coeff_rhs,&rlo,&rhi);\n\t\t\t\t\terror = hi*rlo + rhi*lo + rhi*hi;\n\t\t\t\t\ttensorT val_rhs=fcf.coeffs2values(key, coeff_rhs);\n\t\t\t\t\tval_rhs.emul(val_lhs.full_tensor());\n\t\t\t\t\treturn fcf.values2coeffs(key,val_rhs);\n        \t\t} else {\t// use quadrature of order k+1\n\n    \t            auto& cdata=FunctionCommonData<T,NDIM>::get(coeff_rhs.dim(0));\t\t// npt=k+1\n                    auto& cdata_npt=FunctionCommonData<T,NDIM>::get(coeff_rhs.dim(0)+oversampling);\t\t// npt=k+1\n                \tFunctionCommonFunctionality<T,NDIM> fcf_hi_npt(cdata_npt);\n\n    \t            // coeffs2values for rhs: k -> npt=k+1\n\t\t            tensorT coeff1(cdata_npt.vk);\n\t\t            coeff1(cdata.s0)=coeff_rhs;\t\t// s0 is smaller than vk!\n\t\t            tensorT val_rhs_k1=fcf_hi_npt.coeffs2values(key,coeff1);\n\n\t\t            // coeffs2values for lhs: k -> npt=k+1\n\t\t            tensorT coeff_lhs_k1(cdata_npt.vk);\n\t\t            coeff_lhs_k1(cdata.s0)=std::as_const(coeff_lhs).full_tensor();\n\t\t            tensorT val_lhs_k1=fcf_hi_npt.coeffs2values(key,coeff_lhs_k1);\n\n\t\t            // multiply\n\t\t            val_lhs_k1.emul(val_rhs_k1);\n\n                    // values2coeffs: npt = k+1-> k\n\t\t            tensorT result1=fcf_hi_npt.values2coeffs(key,val_lhs_k1);\n\n                    // extract coeffs up to k\n                    tensorT result=copy(result1(cdata.s0));\n                    result1(cdata.s0)=0.0;\n                    error=result1.normf();\n                    return result;\n        \t\t}\n        \t}\n\n        \t/// multiply values of rhs and lhs, result on rhs, rhs and lhs are of differnet dimensions\n        \tcoeffT operator()(const Key<NDIM> key, const tensorT& coeff_rhs, const int particle) {\n                Key<LDIM> key1, key2;\n                key.break_apart(key1,key2);\n                const long k=coeff_rhs.dim(0);\n                auto& cdata=FunctionCommonData<T,NDIM>::get(k);\n                auto& cdata_lowdim=FunctionCommonData<T,LDIM>::get(k);\n            \tFunctionCommonFunctionality<T,LDIM> fcf_lo(cdata_lowdim);\n            \tFunctionCommonFunctionality<T,NDIM> fcf_hi(cdata);\n            \tFunctionCommonFunctionality<T,LDIM> fcf_lo_npt(k+oversampling);\n            \tFunctionCommonFunctionality<T,NDIM> fcf_hi_npt(k+oversampling);\n\n\n            \t// make hi-dim values from lo-dim coeff_rhs on npt grid points\n                tensorT ones=tensorT(fcf_lo_npt.cdata.vk);\n                ones=1.0;\n\n                tensorT coeff_rhs_npt1(fcf_lo_npt.cdata.vk);\n                coeff_rhs_npt1(fcf_lo.cdata.s0)=coeff_rhs;\n                tensorT val_rhs_npt1=fcf_lo_npt.coeffs2values(key1,coeff_rhs_npt1);\n\n                TensorArgs targs(-1.0,TT_2D);\n                coeffT val_rhs;\n                if (particle==1) val_rhs=outer(val_rhs_npt1,ones,targs);\n                if (particle==2) val_rhs=outer(ones,val_rhs_npt1,targs);\n\n            \t// make values from hi-dim coeff_lhs on npt grid points\n\t            coeffT coeff_lhs_k1(fcf_hi_npt.cdata.vk,coeff_lhs.tensor_type());\n\t            coeff_lhs_k1(fcf_hi.cdata.s0)+=coeff_lhs;\n\t            coeffT val_lhs_npt=fcf_hi_npt.coeffs2values(key,coeff_lhs_k1);\n\n\t            // multiply\n\t            val_lhs_npt.emul(val_rhs);\n\n                // values2coeffs: npt = k+1-> k\n\t            coeffT result1=fcf_hi_npt.values2coeffs(key,val_lhs_npt);\n\n                // extract coeffs up to k\n\t            coeffT result=copy(result1(cdata.s0));\n                result1(cdata.s0)=0.0;\n                error=result1.normf();\n                return result;\n        \t}\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                ar & error & lo & lo1 & lo2 & hi & hi1& hi2 & val_lhs & coeff_lhs;\n            }\n\n\n        };\n\n        /// given a ket and the 1- and 2-electron potentials, construct the function V phi\n\n        /// small memory footstep version of Vphi_op: use the NS form to have information\n        /// about parent and children to determine if a box is a leaf. This will require\n        /// compression of the constituent functions, which will lead to more memory usage\n        /// there, but will avoid oversampling of the result function.\n        template<typename opT, size_t LDIM>\n        struct Vphi_op_NS {\n\n            bool randomize() const {return true;}\n\n            typedef Vphi_op_NS<opT,LDIM> this_type;\n            typedef CoeffTracker<T,NDIM> ctT;\n            typedef CoeffTracker<T,LDIM> ctL;\n\n            implT* result;  \t\t///< where to construct Vphi, no need to track parents\n            opT leaf_op;    \t    ///< deciding if a given FunctionNode will be a leaf node\n            ctT iaket;\t\t\t\t///< the ket of a pair function (exclusive with p1, p2)\n            ctL iap1, iap2;\t\t\t///< the particles 1 and 2 (exclusive with ket)\n            ctL iav1, iav2;\t\t\t///< potentials for particles 1 and 2\n            const implT* eri;\t\t///< 2-particle potential, must be on-demand\n\n            bool have_ket() const {return iaket.get_impl();}\n            bool have_v1() const {return iav1.get_impl();}\n            bool have_v2() const {return iav2.get_impl();}\n            bool have_eri() const {return eri;}\n\n            void accumulate_into_result(const Key<NDIM>& key, const coeffT& coeff) const {\n                result->get_coeffs().task(key, &nodeT::accumulate, coeff, result->get_coeffs(), key, result->targs);\n            }\n\n            // ctor\n            Vphi_op_NS() : result(), eri() {}\n            Vphi_op_NS(implT* result, const opT& leaf_op, const ctT& iaket,\n                       const ctL& iap1, const ctL& iap2, const ctL& iav1, const ctL& iav2,\n                       const implT* eri)\n                    : result(result), leaf_op(leaf_op), iaket(iaket), iap1(iap1), iap2(iap2)\n                    , iav1(iav1), iav2(iav2), eri(eri) {\n\n                // 2-particle potential must be on-demand\n                if (eri) MADNESS_ASSERT(eri->is_on_demand());\n            }\n\n            /// make and insert the coefficients into result's tree\n            std::pair<bool,coeffT> operator()(const Key<NDIM>& key) const {\n\n                MADNESS_ASSERT(result->get_coeffs().is_local(key));\n                if(leaf_op.do_pre_screening()){\n                    // this means that we only construct the boxes which are leaf boxes from the other function in the leaf_op\n                    if(leaf_op.pre_screening(key)){\n                        // construct sum_coefficients, insert them and leave\n                        auto [sum_coeff, error]=make_sum_coeffs(key);\n                        accumulate_into_result(key,sum_coeff);\n                        return std::pair<bool,coeffT> (true,coeffT());\n                    }else{\n                        return continue_recursion(std::vector<bool>(1<<NDIM,false),tensorT(),key);\n                    }\n                }\n\n                // this means that the function has to be completely constructed and not mirrored by another function\n\n                // if the initial level is not reached then this must not be a leaf box\n                size_t il = result->get_initial_level();\n                if(FunctionDefaults<NDIM>::get_refine()) il+=1;\n                if(key.level()<int(il)){\n                    return continue_recursion(std::vector<bool>(1<<NDIM,false),tensorT(),key);\n                }\n                // if further refinement is needed (because we are at a special box, special point)\n                // and the special_level is not reached then this must not be a leaf box\n                if(key.level()<result->get_special_level() and leaf_op.special_refinement_needed(key)){\n                    return continue_recursion(std::vector<bool>(1<<NDIM,false),tensorT(),key);\n                }\n\n                auto [sum_coeff,error]=make_sum_coeffs(key);\n\n                // coeffs are leaf (for whatever reason), insert into tree and stop recursion\n                if(leaf_op.post_screening(key,sum_coeff)){\n                    accumulate_into_result(key,sum_coeff);\n                    return std::pair<bool,coeffT> (true,coeffT());\n                }\n\n                // coeffs are accurate, insert into tree and stop recursion\n                if(error<result->truncate_tol(result->get_thresh(),key)){\n                    accumulate_into_result(key,sum_coeff);\n                    return std::pair<bool,coeffT> (true,coeffT());\n                }\n\n                // coeffs are inaccurate, continue recursion\n                std::vector<bool> child_is_leaf(1<<NDIM,false);\n                return continue_recursion(child_is_leaf,tensorT(),key);\n            }\n\n\n            /// loop over all children and either insert their sum coeffs or continue the recursion\n\n            /// @param[in]\tchild_is_leaf\tfor each child: is it a leaf?\n            /// @param[in]\tcoeffs\tcoefficient tensor with 2^N sum coeffs (=unfiltered NS coeffs)\n            /// @param[in]\tkey\t\tthe key for the NS coeffs (=parent key of the children)\n            /// @return\t\tto avoid recursion outside this return: std::pair<is_leaf,coeff> = true,coeffT()\n            std::pair<bool,coeffT> continue_recursion(const std::vector<bool> child_is_leaf,\n                                                      const tensorT& coeffs, const keyT& key) const {\n                std::size_t i=0;\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit, ++i) {\n                    keyT child=kit.key();\n                    bool is_leaf=child_is_leaf[i];\n\n                    if (is_leaf) {\n                        // insert the sum coeffs\n                        insert_op<T,NDIM> iop(result);\n                        iop(child,coeffT(copy(coeffs(result->child_patch(child))),result->get_tensor_args()),is_leaf);\n                    } else {\n                        this_type child_op=this->make_child(child);\n                        noop<T,NDIM> no;\n                        // spawn activation where child is local\n                        ProcessID p=result->get_coeffs().owner(child);\n\n                        void (implT::*ft)(const Vphi_op_NS<opT,LDIM>&, const noop<T,NDIM>&, const keyT&) const = &implT:: template forward_traverse< Vphi_op_NS<opT,LDIM>, noop<T,NDIM> >;\n                        result->task(p, ft, child_op, no, child);\n                    }\n                }\n                // return e sum coeffs; also return always is_leaf=true:\n                // the recursion is continued within this struct, not outside in traverse_tree!\n                return std::pair<bool,coeffT> (true,coeffT());\n            }\n\n            tensorT eri_coeffs(const keyT& key) const {\n                MADNESS_ASSERT(have_eri());\n                PROFILE_BLOCK(eri_coeffs);\n                if (eri->get_functor()->provides_coeff()) {\n                    return eri->get_functor()->coeff(key).full_tensor();\n                } else {\n                    tensorT val_eri(eri->cdata.vk);\n                    eri->fcube(key,*(eri->get_functor()),eri->cdata.quad_x,val_eri);\n                    return eri->values2coeffs(key,val_eri);\n                }\n            }\n\n            /// the error is computed from the d coefficients of the constituent functions\n\n            /// the result is h_n = P_n(f g), computed as h_n \\approx Pn(f_n g_n)\n            /// its error is therefore\n            /// h_n = (f g)_n = ((Pn(f) + Qn(f)) (Pn(g) + Qn(g))\n            ///               = Pn(fn gn) + Qn(fn gn) + Pn(f) Qn(g) + Qn(f) Pn(g) + Qn(f) Pn(g)\n            /// the first term is what we compute, the second term is estimated by tnorm (in another function),\n            /// the third to last terms are estimated in this function by e.g.: Qn(f)Pn(g) < ||Qn(f)|| ||Pn(g)||\n            double compute_error_from_inaccurate_refinement(const keyT& key,\n                                                            const tensorT& ceri) const {\n                double error = 0.0;\n                Key<LDIM> key1, key2;\n                key.break_apart(key1,key2);\n\n                PROFILE_BLOCK(compute_error);\n                double dnorm_ket, snorm_ket;\n                if (have_ket()) {\n                    snorm_ket=iaket.coeff(key).normf();\n                    dnorm_ket=iaket.dnorm(key);\n                } else {\n                    double s1=iap1.coeff(key1).normf();\n                    double s2=iap2.coeff(key2).normf();\n                    double d1=iap1.dnorm(key1);\n                    double d2=iap2.dnorm(key2);\n                    snorm_ket=s1*s2;\n                    dnorm_ket=s1*d2 + s2*d1 + d1*d2;\n                }\n\n                if (have_v1()) {\n                    double snorm=iav1.coeff(key1).normf();\n                    double dnorm=iav1.dnorm(key1);\n                    error+=snorm*dnorm_ket + dnorm*snorm_ket + dnorm*dnorm_ket;\n                }\n                if (have_v2()) {\n                    double snorm=iav2.coeff(key2).normf();\n                    double dnorm=iav2.dnorm(key2);\n                    error+=snorm*dnorm_ket + dnorm*snorm_ket + dnorm*dnorm_ket;\n                }\n                if (have_eri()) {\n                    tensorT s_coeffs=ceri(result->cdata.s0);\n                    double snorm=s_coeffs.normf();\n                    tensorT d=copy(ceri);\n                    d(result->cdata.s0)=0.0;\n                    double dnorm=d.normf();\n                    error+=snorm*dnorm_ket + dnorm*snorm_ket + dnorm*dnorm_ket;\n                }\n\n                bool no_potential=not ((have_v1() or have_v2() or have_eri()));\n                if (no_potential) {\n                    error=dnorm_ket;\n                }\n                return error;\n            }\n\n            /// make the sum coeffs for key\n            std::pair<coeffT,double> make_sum_coeffs(const keyT& key) const {\n                PROFILE_BLOCK(make_sum_coeffs);\n                // break key into particles\n                Key<LDIM> key1, key2;\n                key.break_apart(key1,key2);\n\n        \t\t// bool printme=(int(key.translation()[0])==int(std::pow(key.level(),2)/2)) and\n        \t\t// \t\t(int(key.translation()[1])==int(std::pow(key.level(),2)/2)) and\n\t\t\t// \t\t\t(int(key.translation()[2])==int(std::pow(key.level(),2)/2));\n\n//        \t\tprintme=false;\n\n                // get/make all coefficients\n                const coeffT coeff_ket = (iaket.get_impl()) ? iaket.coeff(key)\n                                                            : outer(iap1.coeff(key1),iap2.coeff(key2),result->get_tensor_args());\n                const coeffT cpot1 = (have_v1()) ? iav1.coeff(key1) : coeffT();\n                const coeffT cpot2 = (have_v2()) ? iav2.coeff(key2) : coeffT();\n                const tensorT ceri = (have_eri()) ? eri_coeffs(key) : tensorT();\n\n                // compute first part of the total error\n                double refine_error=compute_error_from_inaccurate_refinement(key,ceri);\n                double error=refine_error;\n\n        \t\t// prepare the multiplication\n        \t\tpointwise_multiplier<LDIM> pm(key,coeff_ket);\n\n        \t\t// perform the multiplication, compute tnorm part of the total error\n        \t\tcoeffT cresult(result->cdata.vk,result->get_tensor_args());\n        \t\tif (have_v1()) {\n        \t\t\tcresult+=pm(key,cpot1.get_tensor(),1);\n        \t\t\terror+=pm.error;\n            \t}\n        \t\tif (have_v2()) {\n        \t\t\tcresult+=pm(key,cpot2.get_tensor(),2);\n        \t\t\terror+=pm.error;\n        \t\t}\n\n                if (have_eri()) {\n                    tensorT result1=cresult.full_tensor_copy();\n                    result1+=pm(key,copy(ceri(result->cdata.s0)));\n                    cresult=coeffT(result1,result->get_tensor_args());\n                    error+=pm.error;\n                } else {\n                    cresult.reduce_rank(result->get_tensor_args().thresh);\n                }\n                if ((not have_v1()) and (not have_v2()) and (not have_eri())) {\n                    cresult=coeff_ket;\n                }\n\n                return std::make_pair(cresult,error);\n            }\n\n            this_type make_child(const keyT& child) const {\n\n                // break key into particles\n                Key<LDIM> key1, key2;\n                child.break_apart(key1,key2);\n\n                return this_type(result,leaf_op,iaket.make_child(child),\n                                 iap1.make_child(key1),iap2.make_child(key2),\n                                 iav1.make_child(key1),iav2.make_child(key2),eri);\n            }\n\n            Future<this_type> activate() const {\n                Future<ctT> iaket1=iaket.activate();\n                Future<ctL> iap11=iap1.activate();\n                Future<ctL> iap21=iap2.activate();\n                Future<ctL> iav11=iav1.activate();\n                Future<ctL> iav21=iav2.activate();\n                return result->world.taskq.add(detail::wrap_mem_fn(*const_cast<this_type *> (this),\n                                                                   &this_type::forward_ctor),result,leaf_op,\n                                               iaket1,iap11,iap21,iav11,iav21,eri);\n            }\n\n            this_type forward_ctor(implT* result1, const opT& leaf_op, const ctT& iaket1,\n                                   const ctL& iap11, const ctL& iap21, const ctL& iav11, const ctL& iav21,\n                                   const implT* eri1) {\n                return this_type(result1,leaf_op,iaket1,iap11,iap21,iav11,iav21,eri1);\n            }\n\n            /// serialize this (needed for use in recursive_op)\n            template <typename Archive> void serialize(const Archive& ar) {\n                ar & iaket & eri & result & leaf_op & iap1 & iap2 & iav1 & iav2;\n            }\n        };\n\n        /// assemble the function V*phi using V and phi given from the functor\n\n        /// this function must have been constructed using the CompositeFunctorInterface.\n        /// The interface provides one- and two-electron potentials, and the ket, which are\n        /// assembled to give V*phi.\n        /// @param[in]  leaf_op  operator to decide if a given node is a leaf node\n        /// @param[in]  fence   global fence\n        template<typename opT>\n        void make_Vphi(const opT& leaf_op, const bool fence=true) {\n\n            constexpr size_t LDIM=NDIM/2;\n            MADNESS_CHECK_THROW(NDIM==LDIM*2,\"make_Vphi only works for even dimensions\");\n\n\n            // keep the functor available, but remove it from the result\n            // result will return false upon is_on_demand(), which is necessary for the\n            // CoeffTracker to track the parent coeffs correctly for error_leaf_op\n            std::shared_ptr< FunctionFunctorInterface<T,NDIM> > func2(this->get_functor());\n            this->unset_functor();\n\n            CompositeFunctorInterface<T,NDIM,LDIM>* func=\n                    dynamic_cast<CompositeFunctorInterface<T,NDIM,LDIM>* >(&(*func2));\n            MADNESS_ASSERT(func);\n\n            // make sure everything is in place if no fence is requested\n            if (fence) func->make_redundant(true);          // no-op if already redundant\n            MADNESS_CHECK_THROW(func->check_redundant(),\"make_Vphi requires redundant functions\");\n\n            // loop over all functions in the functor (either ket or particles)\n            for (auto& ket : func->impl_ket_vector) {\n                FunctionImpl<T,NDIM>* eri=func->impl_eri.get();\n                FunctionImpl<T,LDIM>* v1=func->impl_m1.get();\n                FunctionImpl<T,LDIM>* v2=func->impl_m2.get();\n                FunctionImpl<T,LDIM>* p1=nullptr;\n                FunctionImpl<T,LDIM>* p2=nullptr;\n                make_Vphi_only(leaf_op,ket.get(),v1,v2,p1,p2,eri,false);\n            }\n\n            for (std::size_t i=0; i<func->impl_p1_vector.size(); ++i) {\n                FunctionImpl<T,NDIM>* ket=nullptr;\n                FunctionImpl<T,NDIM>* eri=func->impl_eri.get();\n                FunctionImpl<T,LDIM>* v1=func->impl_m1.get();\n                FunctionImpl<T,LDIM>* v2=func->impl_m2.get();\n                FunctionImpl<T,LDIM>* p1=func->impl_p1_vector[i].get();\n                FunctionImpl<T,LDIM>* p2=func->impl_p2_vector[i].get();\n                make_Vphi_only(leaf_op,ket,v1,v2,p1,p2,eri,false);\n            }\n\n            // some post-processing:\n            // - FunctionNode::accumulate() uses buffer -> add the buffer contents to the actual coefficients\n            // - the operation constructs sum coefficients on all scales -> sum down to get a well-defined tree-state\n            if (fence) {\n                world.gop.fence();\n                flo_unary_op_node_inplace(do_consolidate_buffer(get_tensor_args()),true);\n                sum_down(true);\n                set_tree_state(reconstructed);\n            }\n\n\n        }\n\n        /// assemble the function V*phi using V and phi given from the functor\n\n        /// this function must have been constructed using the CompositeFunctorInterface.\n        /// The interface provides one- and two-electron potentials, and the ket, which are\n        /// assembled to give V*phi.\n        /// @param[in]  leaf_op  operator to decide if a given node is a leaf node\n        /// @param[in]  fence   global fence\n        template<typename opT, std::size_t LDIM>\n        void make_Vphi_only(const opT& leaf_op, FunctionImpl<T,NDIM>* ket,\n                            FunctionImpl<T,LDIM>* v1, FunctionImpl<T,LDIM>* v2,\n                            FunctionImpl<T,LDIM>* p1, FunctionImpl<T,LDIM>* p2,\n                            FunctionImpl<T,NDIM>* eri,\n                            const bool fence=true) {\n\n            // prepare the CoeffTracker\n            CoeffTracker<T,NDIM> iaket(ket);\n            CoeffTracker<T,LDIM> iap1(p1);\n            CoeffTracker<T,LDIM> iap2(p2);\n            CoeffTracker<T,LDIM> iav1(v1);\n            CoeffTracker<T,LDIM> iav2(v2);\n\n            // the operator making the coefficients\n            typedef Vphi_op_NS<opT,LDIM> coeff_opT;\n            coeff_opT coeff_op(this,leaf_op,iaket,iap1,iap2,iav1,iav2,eri);\n\n            // this operator simply inserts the coeffs into this' tree\n            typedef noop<T,NDIM> apply_opT;\n            apply_opT apply_op;\n\n            if (world.rank() == coeffs.owner(cdata.key0)) {\n                woT::task(world.rank(), &implT:: template forward_traverse<coeff_opT,apply_opT>,\n                          coeff_op, apply_op, cdata.key0);\n            }\n\n            set_tree_state(redundant_after_merge);\n            if (fence) world.gop.fence();\n\n        }\n\n        /// Permute the dimensions of f according to map, result on this\n        void mapdim(const implT& f, const std::vector<long>& map, bool fence);\n\n        /// mirror the dimensions of f according to map, result on this\n        void mirror(const implT& f, const std::vector<long>& mirror, bool fence);\n\n        /// map and mirror the translation index and the coefficients, result on this\n\n        /// first map the dimensions, the mirror!\n        /// this = mirror(map(f))\n        void map_and_mirror(const implT& f, const std::vector<long>& map,\n        \t\tconst std::vector<long>& mirror, bool fence);\n\n        /// take the average of two functions, similar to: this=0.5*(this+rhs)\n\n        /// works in either basis and also in nonstandard form\n        void average(const implT& rhs);\n\n        /// change the tensor type of the coefficients in the FunctionNode\n\n        /// @param[in]  targs   target tensor arguments (threshold and full/low rank)\n        void change_tensor_type1(const TensorArgs& targs, bool fence);\n\n        /// reduce the rank of the coefficients tensors\n\n        /// @param[in]  targs   target tensor arguments (threshold and full/low rank)\n        void reduce_rank(const double thresh, bool fence);\n\n\n        /// remove all nodes with level higher than n\n        void chop_at_level(const int n, const bool fence=true);\n\n            /// compute norm of s and d coefficients for all nodes\n        void compute_snorm_and_dnorm(bool fence=true);\n\n        /// compute the norm of the wavelet coefficients\n        struct do_compute_snorm_and_dnorm {\n            typedef Range<typename dcT::iterator> rangeT;\n\n            const FunctionCommonData<T,NDIM>& cdata;\n            do_compute_snorm_and_dnorm(const FunctionCommonData<T,NDIM>& cdata) :\n                    cdata(cdata) {}\n\n            bool operator()(typename rangeT::iterator& it) const {\n                auto& node=it->second;\n                node.recompute_snorm_and_dnorm(cdata);\n                return true;\n            }\n        };\n\n\n        T eval_cube(Level n, coordT& x, const tensorT& c) const;\n\n        /// Transform sum coefficients at level n to sums+differences at level n-1\n\n        /// Given scaling function coefficients s[n][l][i] and s[n][l+1][i]\n        /// return the scaling function and wavelet coefficients at the\n        /// coarser level.  I.e., decompose Vn using Vn = Vn-1 + Wn-1.\n        /// \\code\n        /// s_i = sum(j) h0_ij*s0_j + h1_ij*s1_j\n        /// d_i = sum(j) g0_ij*s0_j + g1_ij*s1_j\n        //  \\endcode\n        /// Returns a new tensor and has no side effects.  Works for any\n        /// number of dimensions.\n        ///\n        /// No communication involved.\n        tensorT filter(const tensorT& s) const;\n\n        coeffT filter(const coeffT& s) const;\n\n        ///  Transform sums+differences at level n to sum coefficients at level n+1\n\n        ///  Given scaling function and wavelet coefficients (s and d)\n        ///  returns the scaling function coefficients at the next finer\n        ///  level.  I.e., reconstruct Vn using Vn = Vn-1 + Wn-1.\n        ///  \\code\n        ///  s0 = sum(j) h0_ji*s_j + g0_ji*d_j\n        ///  s1 = sum(j) h1_ji*s_j + g1_ji*d_j\n        ///  \\endcode\n        ///  Returns a new tensor and has no side effects\n        ///\n        ///  If (sonly) ... then ss is only the scaling function coeff (and\n        ///  assume the d are zero).  Works for any number of dimensions.\n        ///\n        /// No communication involved.\n        tensorT unfilter(const tensorT& s) const;\n\n        coeffT unfilter(const coeffT& s) const;\n\n        /// downsample the sum coefficients of level n+1 to sum coeffs on level n\n\n        /// specialization of the filter method, will yield only the sum coefficients\n        /// @param[in]  key key of level n\n        /// @param[in]  v   vector of sum coefficients of level n+1\n        /// @return     sum coefficients on level n in full tensor format\n        tensorT downsample(const keyT& key, const std::vector< Future<coeffT > >& v) const;\n\n        /// upsample the sum coefficients of level 1 to sum coeffs on level n+1\n\n        /// specialization of the unfilter method, will transform only the sum coefficients\n        /// @param[in]  key     key of level n+1\n        /// @param[in]  coeff   sum coefficients of level n (does NOT belong to key!!)\n        /// @return     sum     coefficients on level n+1\n        coeffT upsample(const keyT& key, const coeffT& coeff) const;\n\n        /// Projects old function into new basis (only in reconstructed form)\n        void project(const implT& old, bool fence);\n\n        struct true_refine_test {\n            bool operator()(const implT* f, const keyT& key, const nodeT& t) const {\n                return true;\n            }\n            template <typename Archive> void serialize(Archive& ar) {}\n        };\n\n        template <typename opT>\n        void refine_op(const opT& op, const keyT& key) {\n            // Must allow for someone already having autorefined the coeffs\n            // and we get a write accessor just in case they are already executing\n            typename dcT::accessor acc;\n            const auto found = coeffs.find(acc,key);\n            MADNESS_CHECK(found);\n            nodeT& node = acc->second;\n            if (node.has_coeff() && key.level() < max_refine_level && op(this, key, node)) {\n                coeffT d(cdata.v2k,targs);\n                d(cdata.s0) += copy(node.coeff());\n                d = unfilter(d);\n                node.clear_coeff();\n                node.set_has_children(true);\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    const keyT& child = kit.key();\n                    coeffT ss = copy(d(child_patch(child)));\n                    ss.reduce_rank(targs.thresh);\n                    //                    coeffs.replace(child,nodeT(ss,-1.0,false).node_to_low_rank());\n                    coeffs.replace(child,nodeT(ss,-1.0,false));\n                    // Note value -1.0 for norm tree to indicate result of refinement\n                }\n            }\n        }\n\n        template <typename opT>\n        void refine_spawn(const opT& op, const keyT& key) {\n            nodeT& node = coeffs.find(key).get()->second;\n            if (node.has_children()) {\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit)\n                    woT::task(coeffs.owner(kit.key()), &implT:: template refine_spawn<opT>, op, kit.key(), TaskAttributes::hipri());\n            }\n            else {\n                woT::task(coeffs.owner(key), &implT:: template refine_op<opT>, op, key);\n            }\n        }\n\n        // Refine in real space according to local user-defined criterion\n        template <typename opT>\n        void refine(const opT& op, bool fence) {\n            if (world.rank() == coeffs.owner(cdata.key0))\n                woT::task(coeffs.owner(cdata.key0), &implT:: template refine_spawn<opT>, op, cdata.key0, TaskAttributes::hipri());\n            if (fence)\n                world.gop.fence();\n        }\n\n        bool exists_and_has_children(const keyT& key) const;\n\n        bool exists_and_is_leaf(const keyT& key) const;\n\n\n        void broaden_op(const keyT& key, const std::vector< Future <bool> >& v);\n\n        // For each local node sets value of norm tree, snorm and dnorm to 0.0\n        void zero_norm_tree();\n\n        // Broaden tree\n        void broaden(const array_of_bools<NDIM>& is_periodic, bool fence);\n\n        /// sum all the contributions from all scales after applying an operator in mod-NS form\n        void trickle_down(bool fence);\n\n        /// sum all the contributions from all scales after applying an operator in mod-NS form\n\n        /// cf reconstruct_op\n        void trickle_down_op(const keyT& key, const coeffT& s);\n\n        /// reconstruct this tree -- respects fence\n        void reconstruct(bool fence);\n\n        void change_tree_state(const TreeState finalstate, bool fence=true);\n\n        // Invoked on node where key is local\n        //        void reconstruct_op(const keyT& key, const tensorT& s);\n        void reconstruct_op(const keyT& key, const coeffT& s, const bool accumulate_NS=true);\n\n        /// compress the wave function\n\n        /// after application there will be sum coefficients at the root level,\n        /// and difference coefficients at all other levels; furthermore:\n        /// @param[in] nonstandard\tkeep sum coeffs at all other levels, except leaves\n        /// @param[in] keepleaves\tkeep sum coeffs (but no diff coeffs) at leaves\n        /// @param[in] redundant    keep only sum coeffs at all levels, discard difference coeffs\n//        void compress(bool nonstandard, bool keepleaves, bool redundant, bool fence);\n        void compress(const TreeState newstate, bool fence);\n\n        /// Invoked on node where key is local\n        Future<std::pair<coeffT,double> > compress_spawn(const keyT& key, bool nonstandard, bool keepleaves,\n        \t\tbool redundant1);\n\n        private:\n        /// convert this to redundant, i.e. have sum coefficients on all levels\n        void make_redundant(const bool fence);\n        public:\n\n        /// convert this from redundant to standard reconstructed form\n        void undo_redundant(const bool fence);\n\n        void remove_internal_coefficients(const bool fence);\n        void remove_leaf_coefficients(const bool fence);\n\n\n        /// compute for each FunctionNode the norm of the function inside that node\n        void norm_tree(bool fence);\n\n        double norm_tree_op(const keyT& key, const std::vector< Future<double> >& v);\n\n        Future<double> norm_tree_spawn(const keyT& key);\n\n        /// truncate using a tree in reconstructed form\n\n        /// must be invoked where key is local\n        Future<coeffT> truncate_reconstructed_spawn(const keyT& key, const double tol);\n\n        /// given the sum coefficients of all children, truncate or not\n\n        /// @return     new sum coefficients (empty if internal, not empty, if new leaf); might delete its children\n        coeffT truncate_reconstructed_op(const keyT& key, const std::vector< Future<coeffT > >& v, const double tol);\n\n        /// calculate the wavelet coefficients using the sum coefficients of all child nodes\n\n        /// also compute the norm tree for all nodes\n        /// @param[in] key \tthis's key\n        /// @param[in] v \tsum coefficients of the child nodes\n        /// @param[in] nonstandard  keep the sum coefficients with the wavelet coefficients\n        /// @param[in] redundant    keep only the sum coefficients, discard the wavelet coefficients\n        /// @return \t\tthe sum coefficients\n        std::pair<coeffT,double> compress_op(const keyT& key, const std::vector< Future<std::pair<coeffT,double>> >& v, bool nonstandard);\n\n\n        /// similar to compress_op, but insert only the sum coefficients in the tree\n\n        /// also compute the norm tree for all nodes\n        /// @param[in] key  this's key\n        /// @param[in] v    sum coefficients of the child nodes\n        /// @return         the sum coefficients\n        std::pair<coeffT,double> make_redundant_op(const keyT& key,const std::vector< Future<std::pair<coeffT,double> > >& v);\n\n        /// Changes non-standard compressed form to standard compressed form\n        void standard(bool fence);\n\n        /// Changes non-standard compressed form to standard compressed form\n        struct do_standard {\n            typedef Range<typename dcT::iterator> rangeT;\n\n            // threshold for rank reduction / SVD truncation\n            implT* impl;\n\n            // constructor takes target precision\n            do_standard() = default;\n            do_standard(implT* impl) : impl(impl) {}\n\n            //\n            bool operator()(typename rangeT::iterator& it) const {\n\n                const keyT& key = it->first;\n                nodeT& node = it->second;\n                if (key.level()> 0 && node.has_coeff()) {\n                    if (node.has_children()) {\n                        // Zero out scaling coeffs\n                    \tMADNESS_ASSERT(node.coeff().dim(0)==2*impl->get_k());\n                        node.coeff()(impl->cdata.s0)=0.0;\n                        node.reduceRank(impl->targs.thresh);\n                    } else {\n                        // Deleting both scaling and wavelet coeffs\n                        node.clear_coeff();\n                    }\n                }\n                return true;\n            }\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"no serialization of do_standard\",1);\n            }\n        };\n\n\n        /// laziness\n        template<size_t OPDIM>\n        struct do_op_args {\n            Key<OPDIM> key,d;\n            keyT dest;\n            double tol, fac, cnorm;\n\n            do_op_args() = default;\n            do_op_args(const Key<OPDIM>& key, const Key<OPDIM>& d, const keyT& dest, double tol, double fac, double cnorm)\n                : key(key), d(d), dest(dest), tol(tol), fac(fac), cnorm(cnorm) {}\n            template <class Archive>\n            void serialize(Archive& ar) {\n                ar & archive::wrap_opaque(this,1);\n            }\n        };\n\n        /// for fine-grain parallelism: call the apply method of an operator in a separate task\n\n        /// @param[in]  op      the operator working on our function\n        /// @param[in]  c       full rank tensor holding the NS coefficients\n        /// @param[in]  args    laziness holding norm of the coefficients, displacement, destination, ..\n        template <typename opT, typename R, size_t OPDIM>\n        void do_apply_kernel(const opT* op, const Tensor<R>& c, const do_op_args<OPDIM>& args) {\n\n            tensorT result = op->apply(args.key, args.d, c, args.tol/args.fac/args.cnorm);\n\n            // Screen here to reduce communication cost of negligible data\n            // and also to ensure we don't needlessly widen the tree when\n            // applying the operator\n            if (result.normf()> 0.3*args.tol/args.fac) {\n                coeffs.task(args.dest, &nodeT::accumulate2, result, coeffs, args.dest, TaskAttributes::hipri());\n                //woT::task(world.rank(),&implT::accumulate_timer,time,TaskAttributes::hipri());\n                // UGLY BUT ADDED THE OPTIMIZATION BACK IN HERE EXPLICITLY/\n                if (args.dest == world.rank()) {\n                    coeffs.send(args.dest, &nodeT::accumulate, result, coeffs, args.dest);\n                }\n                else {\n                    coeffs.task(args.dest, &nodeT::accumulate, result, coeffs, args.dest, TaskAttributes::hipri());\n                }\n            }\n        }\n\n        /// same as do_apply_kernel, but use full rank tensors as input and low rank tensors as output\n\n        /// @param[in]  op      the operator working on our function\n        /// @param[in]  c       full rank tensor holding the NS coefficients\n        /// @param[in]  args    laziness holding norm of the coefficients, displacement, destination, ..\n        /// @param[in]  apply_targs TensorArgs with tightened threshold for accumulation\n        /// @return     nothing, but accumulate the result tensor into the destination node\n        template <typename opT, typename R, size_t OPDIM>\n        double do_apply_kernel2(const opT* op, const Tensor<R>& c, const do_op_args<OPDIM>& args,\n                                const TensorArgs& apply_targs) {\n\n            tensorT result_full = op->apply(args.key, args.d, c, args.tol/args.fac/args.cnorm);\n            const double norm=result_full.normf();\n\n            // Screen here to reduce communication cost of negligible data\n            // and also to ensure we don't needlessly widen the tree when\n            // applying the operator\n            // OPTIMIZATION NEEDED HERE ... CHANGING THIS TO TASK NOT SEND REMOVED\n            // BUILTIN OPTIMIZATION TO SHORTCIRCUIT MSG IF DATA IS LOCAL\n            if (norm > 0.3*args.tol/args.fac) {\n\n                small++;\n                //double cpu0=cpu_time();\n                coeffT result=coeffT(result_full,apply_targs);\n                MADNESS_ASSERT(result.is_full_tensor() or result.is_svd_tensor());\n                //double cpu1=cpu_time();\n                //timer_lr_result.accumulate(cpu1-cpu0);\n\n                coeffs.task(args.dest, &nodeT::accumulate, result, coeffs, args.dest, apply_targs,\n                                                TaskAttributes::hipri());\n\n                //woT::task(world.rank(),&implT::accumulate_timer,time,TaskAttributes::hipri());\n            }\n            return norm;\n        }\n\n\n\n        /// same as do_apply_kernel2, but use low rank tensors as input and low rank tensors as output\n\n        /// @param[in]  op      the operator working on our function\n        /// @param[in]  coeff   full rank tensor holding the NS coefficients\n        /// @param[in]  args    laziness holding norm of the coefficients, displacement, destination, ..\n        /// @param[in]  apply_targs TensorArgs with tightened threshold for accumulation\n        /// @return     nothing, but accumulate the result tensor into the destination node\n        template <typename opT, typename R, size_t OPDIM>\n        double do_apply_kernel3(const opT* op, const GenTensor<R>& coeff, const do_op_args<OPDIM>& args,\n                                const TensorArgs& apply_targs) {\n\n            coeffT result;\n            if (2*OPDIM==NDIM) result= op->apply2_lowdim(args.key, args.d, coeff,\n                    args.tol/args.fac/args.cnorm, args.tol/args.fac);\n            if (OPDIM==NDIM) result = op->apply2(args.key, args.d, coeff,\n                    args.tol/args.fac/args.cnorm, args.tol/args.fac);\n\n            const double result_norm=result.svd_normf();\n\n            if (result_norm> 0.3*args.tol/args.fac) {\n                small++;\n\n                double cpu0=cpu_time();\n                if (not result.is_of_tensortype(targs.tt)) result=result.convert(targs);\n                double cpu1=cpu_time();\n                timer_lr_result.accumulate(cpu1-cpu0);\n\n                // accumulate also expects result in SVD form\n                coeffs.task(args.dest, &nodeT::accumulate, result, coeffs, args.dest, apply_targs,\n                                                TaskAttributes::hipri());\n//                woT::task(world.rank(),&implT::accumulate_timer,time,TaskAttributes::hipri());\n\n            }\n            return result_norm;\n\n        }\n\n        // volume of n-dimensional sphere of radius R\n        double vol_nsphere(int n, double R) {\n            return std::pow(madness::constants::pi,n*0.5)*std::pow(R,n)/std::tgamma(1+0.5*n);\n        }\n        \n\n        /// apply an operator on the coeffs c (at node key)\n\n        /// the result is accumulated inplace to this's tree at various FunctionNodes\n        /// @param[in] op\tthe operator to act on the source function\n        /// @param[in] key\tkey of the source FunctionNode of f which is processed\n        /// @param[in] c\tcoeffs of the FunctionNode of f which is processed\n        template <typename opT, typename R>\n        void do_apply(const opT* op, const keyT& key, const Tensor<R>& c) {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n\n          // working assumption here WAS that the operator is\n          // isotropic and monotonically decreasing with distance\n          // ... however, now we are using derivative Gaussian\n          // expansions (and also non-cubic boxes) isotropic is\n          // violated. While not strictly monotonically decreasing,\n          // the derivative gaussian is still such that once it\n          // becomes negligible we are in the asymptotic region.\n\n          typedef typename opT::keyT opkeyT;\n          constexpr auto opdim = opT::opdim;\n          const opkeyT source = op->get_source_key(key);\n\n          // Tuning here is based on observation that with\n          // sufficiently high-order wavelet relative to the\n          // precision, that only nearest neighbor boxes contribute,\n          // whereas for low-order wavelets more neighbors will\n          // contribute.  Sufficiently high is picked as\n          // k>=2-log10(eps) which is our empirical rule for\n          // efficiency/accuracy and code instrumentation has\n          // previously indicated that (in 3D) just unit\n          // displacements are invoked.  The error decays as R^-(k+1),\n          // and the number of boxes increases as R^d.\n          //\n          // Fac is the expected number of contributions to a given\n          // box, so the error permitted per contribution will be\n          // tol/fac\n\n          // radius of shell (nearest neighbor is diameter of 3 boxes, so radius=1.5)\n          double radius = 1.5 + 0.33 * std::max(0.0, 2 - std::log10(thresh) -\n                                                         k); // 0.33 was 0.5\n          //double radius = 2.5;\n          double fac = vol_nsphere(NDIM, radius);\n          // previously fac=10.0 selected empirically constrained by qmprop\n\n          double cnorm = c.normf();\n\n          // BC handling:\n          // - if operator is lattice-summed then treat this as nonperiodic (i.e. tell neighbor() to stay in simulation cell)\n          // - if operator is NOT lattice-summed then obey BC (i.e. tell neighbor() to go outside the simulation cell along periodic dimensions)\n          // - BUT user can force operator to treat its arguments as non-periodic (`op.set_domain_periodicity({true,true,true})`) so ... which dimensions of this function are treated as periodic by op?\n          const array_of_bools<NDIM> func_is_treated_by_op_as_periodic =\n              (op->particle() == 1)\n                  ? array_of_bools<NDIM>{false}.or_front(\n                        op->func_domain_is_periodic())\n                  : array_of_bools<NDIM>{false}.or_back(\n                        op->func_domain_is_periodic());\n\n          const auto default_real_distance_squared = [&](const auto &displacement)\n              -> double {\n            return displacement.real_distsq_bc(op->lattice_summed(), FunctionDefaults<NDIM>::get_cell_width());\n          };\n          const auto default_lattice_distance_squared = [&](const auto &displacement)\n              -> std::uint64_t {\n            return displacement.distsq_bc(op->lattice_summed());\n          };\n          const auto default_skip_predicate = [&](const auto &displacement)\n              -> bool {\n            return false;\n          };\n          const auto for_each = [&](const auto &displacements,\n                                    const auto &real_distance_squared,\n                                    const auto &lattice_distance_squared,\n                                    const auto &skip_predicate) -> std::optional<double> {\n\n            // used to screen estimated and actual contributions\n            //const double tol = truncate_tol(thresh, key);\n            //const double tol = 0.1*truncate_tol(thresh, key);\n            const double tol = truncate_tol(thresh, key);\n\n            // assume isotropic decaying kernel, screen in shell-wise fashion by\n            // monitoring the decay of magnitude of contribution norms with the\n            // distance ... as soon as we find a shell of displacements at least\n            // one of each in simulation domain (see neighbor()) and\n            // all in-domain shells produce negligible contributions, stop.\n            // a displacement is negligible if ||op|| * ||c|| > tol / fac\n            // where fac takes into account\n            int nvalid = 1; // Counts #valid at each distance\n            int nused = 1;  // Counts #used at each distance\n            std::optional<double> real_last_distsq;\n            std::optional<std::uint64_t> lattice_last_distsq;\n\n            // displacements to the kernel range boundary are typically same magnitude (modulo variation)\n            // estimate the norm of the resulting contributions and skip all if one is too small\n            if constexpr (std::is_same_v<std::decay_t<decltype(displacements)>,BoxSurfaceDisplacementRange<opdim>>) {\n              const auto &probing_displacement =\n                  displacements.probing_displacement();\n              const double opnorm =\n                  op->norm(key.level(), probing_displacement, source);\n              if (cnorm * opnorm <= tol / fac) {\n                return {};\n              }\n            }\n\n            for (const auto& displacement: displacements) {\n              if (skip_predicate(displacement)) continue;\n\n              keyT d;\n              Key<NDIM - opdim> nullkey(key.level());\n              MADNESS_ASSERT(op->particle() == 1 || op->particle() == 2);\n              if (op->particle() == 1)\n                d = displacement.merge_with(nullkey);\n              else\n                d = nullkey.merge_with(displacement);\n\n              // Screen out shells. We assume shells are grouped into shells so that the operator decays with shell index.\n              // Shells are indexed by least distance from box to the central box.\n              // Cells touching so much as a corner of the central box are further grouped by their lattice distance.\n              // N.B. lattice-summed decaying kernel is periodic (i.e. does decay w.r.t. r), so loop over shells of displacements sorted by distances modulated by periodicity (Key::distsq_bc)\n              const auto real_distsq = real_distance_squared(displacement);\n              const std::uint64_t lattice_distsq = real_distsq ? 0 : lattice_distance_squared(displacement);\n              if (!real_last_distsq.has_value() ||\n                  !nearlyEqual(real_distsq, *real_last_distsq) || (nearlyEqual(*real_last_distsq, 0) && lattice_distsq != *lattice_last_distsq)) { // Moved to next shell of neighbors\n                if (nvalid > 0 && nused == 0 && (real_distsq > 0 || lattice_distsq > 1)) {\n                  // Have at least done the input box and all first\n                  // nearest neighbors, and none of the last set\n                  // of neighbors made significant contributions.  Thus,\n                  // assuming monotonic decrease, we are done.\n                  break;\n                }\n                nused = 0;\n                nvalid = 0;\n                real_last_distsq = real_distsq;\n                // After real_last_distsq > 0, we stop caring about keeping lattice_last_distsq up-to-date.\n                lattice_last_distsq = real_distsq ? std::optional<std::uint64_t>{} : lattice_distsq;\n              }\n\n              keyT dest = neighbor(key, d, func_is_treated_by_op_as_periodic);\n              if (dest.is_valid()) {\n                nvalid++;\n                const double opnorm = op->norm(key.level(), displacement, source);\n\n                if (cnorm * opnorm > tol / fac) {\n                  tensorT result =\n                      op->apply(source, displacement, c, tol / fac / cnorm);\n                  if (result.normf() > 0.3 * tol / fac) {\n                    if (coeffs.is_local(dest))\n                      coeffs.send(dest, &nodeT::accumulate2, result, coeffs,\n                                  dest);\n                    else\n                      coeffs.task(dest, &nodeT::accumulate2, result, coeffs,\n                                  dest);\n                    nused++;\n                  }\n                }\n              }\n            }\n\n            return real_last_distsq;\n          };\n\n          // process \"standard\" displacements, screening assumes monotonic decay of the kernel\n          // list of displacements sorted in order of increasing distance\n          // N.B. if op is lattice-summed use periodic displacements, else use\n          // non-periodic even if op treats any modes of this as periodic\n          const std::vector<opkeyT> &disp = op->get_disp(key.level());\n          const auto max_distsq_reached = for_each(disp, default_real_distance_squared, default_lattice_distance_squared, default_skip_predicate);\n\n          // for range-restricted kernels displacements to the boundary of the kernel range also need to be included\n          // N.B. hard range restriction will result in slow decay of operator matrix elements for the displacements\n          // to the range boundary, should use soft restriction or sacrifice precision\n          if (op->range_restricted() && key.level() >= 1) {\n\n            std::array<std::optional<std::int64_t>, opdim> box_radius;\n            std::array<std::optional<std::int64_t>, opdim> surface_thickness;\n            auto &range = op->get_range();\n            for (int d = 0; d != opdim; ++d) {\n              if (range[d]) {\n                box_radius[d] = range[d].N();\n                surface_thickness[d] = range[d].finite_soft() ? 1 : 0;\n              }\n            }\n\n            typename BoxSurfaceDisplacementRange<opdim>::Validator validator;\n            // skip surface displacements that take us outside of the domain and/or were included in regular displacements\n            // N.B. for lattice-summed axes the \"filter\" also maps the displacement back into the simulation cell\n            if (max_distsq_reached)\n              validator = BoxSurfaceDisplacementValidator<opdim>(/* is_infinite_domain= */ op->func_domain_is_periodic(), /* is_lattice_summed= */ op->lattice_summed(), range, default_real_distance_squared, *max_distsq_reached);\n\n            // this range iterates over the entire surface layer(s), and provides a probing displacement that can be used to screen out the entire box\n            auto opkey = op->particle() == 1 ? key.template extract_front<opdim>() : key.template extract_front<opdim>();\n            BoxSurfaceDisplacementRange<opdim>\n                range_boundary_face_displacements(opkey, box_radius,\n                                                  surface_thickness,\n                                                  op->lattice_summed(),\n                                                  validator);\n            for_each(\n                range_boundary_face_displacements,\n                // surface displacements are not screened, all are included\n                [](const auto &displacement) -> double { return 0; },\n                [](const auto &displacement) -> std::uint64_t { return 0; },\n                default_skip_predicate);\n          }\n        }\n\n\n        /// apply an operator on f to return this\n        template <typename opT, typename R>\n        void apply(opT& op, const FunctionImpl<R,NDIM>& f, bool fence) {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n            MADNESS_ASSERT(!op.modified());\n            for (const auto& [key, node]: f.coeffs) {\n                if (node.has_coeff()) {\n                    if (node.coeff().dim(0) != k /* i.e. not a leaf */ || op.doleaves) {\n                        ProcessID p = FunctionDefaults<NDIM>::get_apply_randomize() ? world.random_proc() : coeffs.owner(key);\n//                        woT::task(p, &implT:: template do_apply<opT,R>, &op, key, node.coeff()); //.full_tensor_copy() ????? why copy ????\n                        woT::task(p, &implT:: template do_apply<opT,R>, &op, key, node.coeff().reconstruct_tensor());\n                    }\n                }\n            }\n            if (fence)\n                world.gop.fence();\n\n            set_tree_state(nonstandard_after_apply);\n//            this->compressed=true;\n//            this->nonstandard=true;\n//            this->redundant=false;\n\n        }\n\n\n\n        /// apply an operator on the coeffs c (at node key)\n\n        /// invoked by result; the result is accumulated inplace to this's tree at various FunctionNodes\n        /// @param[in] op     the operator to act on the source function\n        /// @param[in] key    key of the source FunctionNode of f which is processed (see \"source\")\n        /// @param[in] coeff  coeffs of FunctionNode being processed\n        /// @param[in] do_kernel\ttrue: do the 0-disp only; false: do everything but the kernel\n        /// @return\t   max norm, and will modify or include new nodes in this' tree\n        template <typename opT, typename R>\n        double do_apply_directed_screening(const opT* op, const keyT& key, const coeffT& coeff,\n                                           const bool& do_kernel) {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n            // insert timer here\n            typedef typename opT::keyT opkeyT;\n\n            // screening: contains all displacement keys that had small result norms\n            std::list<opkeyT> blacklist;\n\n            constexpr auto opdim=opT::opdim;\n            Key<NDIM-opdim> nullkey(key.level());\n\n            // source is that part of key that corresponds to those dimensions being processed\n            const opkeyT source=op->get_source_key(key);\n\n            const double tol = truncate_tol(thresh, key);\n\n            // fac is the root of the number of contributing neighbors (1st shell)\n            double fac=std::pow(3,NDIM*0.5);\n            double cnorm = coeff.normf();\n\n            // for accumulation: keep slightly tighter TensorArgs\n            TensorArgs apply_targs(targs);\n            apply_targs.thresh=tol/fac*0.03;\n\n            double maxnorm=0.0;\n\n            // for the kernel it may be more efficient to do the convolution in full rank\n            tensorT coeff_full;\n            // for partial application (exchange operator) it's more efficient to\n            // do SVD tensors instead of tensortrains, because addition in apply\n            // can be done in full form for the specific particle\n            coeffT coeff_SVD=coeff.convert(TensorArgs(-1.0,TT_2D));\n#ifdef HAVE_GENTENSOR\n            coeff_SVD.get_svdtensor().orthonormalize(tol*GenTensor<T>::fac_reduce());\n#endif\n\n            // list of displacements sorted in order of increasing distance\n            // N.B. if op is lattice-summed gives periodic displacements, else uses\n            // non-periodic even if op treats any modes of this as periodic\n            const std::vector<opkeyT>& disp = Displacements<opdim>().get_disp(key.level(), op->lattice_summed());\n\n            for (const auto& d: disp) {\n                const int shell=d.distsq_bc(op->lattice_summed());\n                if (do_kernel and (shell>0)) break;\n                if ((not do_kernel) and (shell==0)) continue;\n\n                keyT disp1;\n                if (op->particle()==1) disp1=d.merge_with(nullkey);\n                else if (op->particle()==2) disp1=nullkey.merge_with(d);\n                else {\n                    MADNESS_EXCEPTION(\"confused particle in operator??\",1);\n                }\n\n                keyT dest = neighbor_in_volume(key, disp1);\n\n                if (not dest.is_valid()) continue;\n\n                // directed screening\n                // working assumption here is that the operator is isotropic and\n                // monotonically decreasing with distance\n                bool screened=false;\n                typename std::list<opkeyT>::const_iterator it2;\n                for (it2=blacklist.begin(); it2!=blacklist.end(); it2++) {\n                    if (d.is_farther_out_than(*it2)) {\n                        screened=true;\n                        break;\n                    }\n                }\n                if (not screened) {\n\n                    double opnorm = op->norm(key.level(), d, source);\n                    double norm=0.0;\n\n                    if (cnorm*opnorm> tol/fac) {\n\n                        double cost_ratio=op->estimate_costs(source, d, coeff_SVD, tol/fac/cnorm, tol/fac);\n                        //                        cost_ratio=1.5;     // force low rank\n                        //                        cost_ratio=0.5;     // force full rank\n\n                        if (cost_ratio>0.0) {\n\n                            do_op_args<opdim> args(source, d, dest, tol, fac, cnorm);\n                            norm=0.0;\n                            if (cost_ratio<1.0) {\n                                if (not coeff_full.has_data()) coeff_full=coeff.full_tensor_copy();\n                                norm=do_apply_kernel2(op, coeff_full,args,apply_targs);\n                            } else {\n                                if (2*opdim==NDIM) {    // apply operator on one particle only\n                                    norm=do_apply_kernel3(op,coeff_SVD,args,apply_targs);\n                                } else {\n                                    norm=do_apply_kernel3(op,coeff,args,apply_targs);\n                                }\n                            }\n                            maxnorm=std::max(norm,maxnorm);\n                        }\n\n                    } else if (shell >= 12) {\n                        break; // Assumes monotonic decay beyond nearest neighbor\n                    }\n                    if (norm<0.3*tol/fac) blacklist.push_back(d);\n                }\n            }\n            return maxnorm;\n        }\n\n\n        /// similar to apply, but for low rank coeffs\n        template <typename opT, typename R>\n        void apply_source_driven(opT& op, const FunctionImpl<R,NDIM>& f, bool fence) {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n\n            MADNESS_ASSERT(not op.modified());\n            // looping through all the coefficients of the source f\n            typename dcT::const_iterator end = f.get_coeffs().end();\n            for (typename dcT::const_iterator it=f.get_coeffs().begin(); it!=end; ++it) {\n\n                const keyT& key = it->first;\n                const coeffT& coeff = it->second.coeff();\n\n                if (coeff.has_data() and (coeff.rank()!=0)) {\n                    ProcessID p = FunctionDefaults<NDIM>::get_apply_randomize() ? world.random_proc() : coeffs.owner(key);\n                    woT::task(p, &implT:: template do_apply_directed_screening<opT,R>, &op, key, coeff, true);\n                    woT::task(p, &implT:: template do_apply_directed_screening<opT,R>, &op, key, coeff, false);\n                }\n            }\n            if (fence) world.gop.fence();\n            set_tree_state(TreeState::nonstandard_after_apply);\n        }\n\n        /// after apply we need to do some cleanup;\n\n        /// forces fence\n        double finalize_apply();\n\n        /// after summing up we need to do some cleanup;\n\n        /// forces fence\n        void finalize_sum();\n\n        /// traverse a non-existing tree, make its coeffs and apply an operator\n\n        /// invoked by result\n        /// here we use the fact that the hi-dim NS coefficients on all scales are exactly\n        /// the outer product of the underlying low-dim functions (also in NS form),\n        /// so we don't need to construct the full hi-dim tree and then turn it into NS form.\n        /// @param[in]\tapply_op the operator acting on the NS tree\n        /// @param[in]\tfimpl    the funcimpl of the function of particle 1\n        /// @param[in]\tgimpl    the funcimpl of the function of particle 2\n        template<typename opT, std::size_t LDIM>\n        void recursive_apply(opT& apply_op, const FunctionImpl<T,LDIM>* fimpl,\n                             const FunctionImpl<T,LDIM>* gimpl, const bool fence) {\n\n            //print(\"IN RECUR2\");\n            const keyT& key0=cdata.key0;\n\n            if (world.rank() == coeffs.owner(key0)) {\n\n                CoeffTracker<T,LDIM> ff(fimpl);\n                CoeffTracker<T,LDIM> gg(gimpl);\n\n                typedef recursive_apply_op<opT,LDIM> coeff_opT;\n                coeff_opT coeff_op(this,ff,gg,&apply_op);\n\n                typedef noop<T,NDIM> apply_opT;\n                apply_opT apply_op;\n\n                ProcessID p= coeffs.owner(key0);\n                woT::task(p, &implT:: template forward_traverse<coeff_opT,apply_opT>, coeff_op, apply_op, key0);\n\n            }\n            if (fence) world.gop.fence();\n            set_tree_state(TreeState::nonstandard_after_apply);\n        }\n\n        /// recursive part of recursive_apply\n        template<typename opT, std::size_t LDIM>\n        struct recursive_apply_op {\n            bool randomize() const {return true;}\n\n            typedef recursive_apply_op<opT,LDIM> this_type;\n\n            implT* result;\n            CoeffTracker<T,LDIM> iaf;\n            CoeffTracker<T,LDIM> iag;\n            opT* apply_op;\n\n            // ctor\n            recursive_apply_op() = default;\n            recursive_apply_op(implT* result,\n                               const CoeffTracker<T,LDIM>& iaf, const CoeffTracker<T,LDIM>& iag,\n                               const opT* apply_op) : result(result), iaf(iaf), iag(iag), apply_op(apply_op)\n            {\n                MADNESS_ASSERT(LDIM+LDIM==NDIM);\n            }\n            recursive_apply_op(const recursive_apply_op& other) : result(other.result), iaf(other.iaf),\n                                                                  iag(other.iag), apply_op(other.apply_op) {}\n\n\n            /// make the NS-coefficients and send off the application of the operator\n\n            /// @return\t\ta Future<bool,coeffT>(is_leaf,coeffT())\n            std::pair<bool,coeffT> operator()(const Key<NDIM>& key) const {\n\n                //            \tWorld& world=result->world;\n                // break key into particles (these are the child keys, with datum1/2 come the parent keys)\n                Key<LDIM> key1,key2;\n                key.break_apart(key1,key2);\n\n                // the lo-dim functions should be in full tensor form\n                const tensorT fcoeff=iaf.coeff(key1).full_tensor();\n                const tensorT gcoeff=iag.coeff(key2).full_tensor();\n\n                // would this be a leaf node? If so, then its sum coeffs have already been\n                // processed by the parent node's wavelet coeffs. Therefore we won't\n                // process it any more.\n                hartree_leaf_op<T,NDIM> leaf_op(result,result->get_k());\n                bool is_leaf=leaf_op(key,fcoeff,gcoeff);\n\n                if (not is_leaf) {\n                    // new coeffs are simply the hartree/kronecker/outer product --\n                    const std::vector<Slice>& s0=iaf.get_impl()->cdata.s0;\n                    const coeffT coeff = (apply_op->modified())\n                        ? outer(copy(fcoeff(s0)),copy(gcoeff(s0)),result->targs)\n                        : outer(fcoeff,gcoeff,result->targs);\n\n                    // now send off the application\n                    tensorT coeff_full;\n                    ProcessID p=result->world.rank();\n                    double norm0=result->do_apply_directed_screening<opT,T>(apply_op, key, coeff, true);\n\n                    result->task(p,&implT:: template do_apply_directed_screening<opT,T>,\n                                 apply_op,key,coeff,false);\n\n                    return finalize(norm0,key,coeff);\n\n                } else {\n                    return std::pair<bool,coeffT> (is_leaf,coeffT());\n                }\n            }\n\n            /// sole purpose is to wait for the kernel norm, wrap it and send it back to caller\n            std::pair<bool,coeffT> finalize(const double kernel_norm, const keyT& key,\n                                            const coeffT& coeff) const {\n            \tconst double thresh=result->get_thresh()*0.1;\n            \tbool is_leaf=(kernel_norm<result->truncate_tol(thresh,key));\n            \tif (key.level()<2) is_leaf=false;\n            \treturn std::pair<bool,coeffT> (is_leaf,coeff);\n            }\n\n\n            this_type make_child(const keyT& child) const {\n\n                // break key into particles\n                Key<LDIM> key1, key2;\n                child.break_apart(key1,key2);\n\n                return this_type(result,iaf.make_child(key1),iag.make_child(key2),apply_op);\n            }\n\n            Future<this_type> activate() const {\n            \tFuture<CoeffTracker<T,LDIM> > f1=iaf.activate();\n            \tFuture<CoeffTracker<T,LDIM> > g1=iag.activate();\n                return result->world.taskq.add(detail::wrap_mem_fn(*const_cast<this_type *> (this),\n                                               &this_type::forward_ctor),result,f1,g1,apply_op);\n            }\n\n            this_type forward_ctor(implT* r, const CoeffTracker<T,LDIM>& f1, const CoeffTracker<T,LDIM>& g1,\n                                   const opT* apply_op1) {\n            \treturn this_type(r,f1,g1,apply_op1);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                ar & result & iaf & iag & apply_op;\n            }\n        };\n\n        /// traverse an existing tree and apply an operator\n\n        /// invoked by result\n        /// @param[in]\tapply_op the operator acting on the NS tree\n        /// @param[in]\tfimpl    the funcimpl of the source function\n        /// @param[in]\trimpl    a dummy function for recursive_op to insert data\n        template<typename opT>\n        void recursive_apply(opT& apply_op, const implT* fimpl, implT* rimpl, const bool fence) {\n\n            print(\"IN RECUR1\");\n\n            const keyT& key0=cdata.key0;\n\n            if (world.rank() == coeffs.owner(key0)) {\n\n                typedef recursive_apply_op2<opT> coeff_opT;\n                coeff_opT coeff_op(this,fimpl,&apply_op);\n\n                typedef noop<T,NDIM> apply_opT;\n                apply_opT apply_op;\n\n                woT::task(world.rank(), &implT:: template forward_traverse<coeff_opT,apply_opT>,\n                          coeff_op, apply_op, cdata.key0);\n\n            }\n            if (fence) world.gop.fence();\n            set_tree_state(TreeState::nonstandard_after_apply);\n        }\n\n        /// recursive part of recursive_apply\n        template<typename opT>\n        struct recursive_apply_op2 {\n            bool randomize() const {return true;}\n\n            typedef recursive_apply_op2<opT> this_type;\n            typedef CoeffTracker<T,NDIM> ctT;\n            typedef std::pair<bool,coeffT> argT;\n\n            mutable implT* result;\n            ctT iaf;\t\t\t/// need this for randomization\n            const opT* apply_op;\n\n            // ctor\n            recursive_apply_op2() = default;\n            recursive_apply_op2(implT* result, const ctT& iaf, const opT* apply_op)\n            \t: result(result), iaf(iaf), apply_op(apply_op) {}\n\n            recursive_apply_op2(const recursive_apply_op2& other) : result(other.result),\n                                                                    iaf(other.iaf), apply_op(other.apply_op) {}\n\n\n            /// send off the application of the operator\n\n            /// the first (core) neighbor (ie. the box itself) is processed\n            /// immediately, all other ones are shoved into the taskq\n            /// @return\t\ta pair<bool,coeffT>(is_leaf,coeffT())\n            argT operator()(const Key<NDIM>& key) const {\n\n            \tconst coeffT& coeff=iaf.coeff();\n\n                if (coeff.has_data()) {\n\n                    // now send off the application for all neighbor boxes\n                    ProcessID p=result->world.rank();\n                    result->task(p,&implT:: template do_apply_directed_screening<opT,T>,\n                                 apply_op, key, coeff, false);\n\n                    // process the core box\n                    double norm0=result->do_apply_directed_screening<opT,T>(apply_op,key,coeff,true);\n\n                    if (iaf.is_leaf()) return argT(true,coeff);\n                    return finalize(norm0,key,coeff,result);\n\n                } else {\n                    const bool is_leaf=true;\n                    return argT(is_leaf,coeffT());\n                }\n            }\n\n            /// sole purpose is to wait for the kernel norm, wrap it and send it back to caller\n            argT finalize(const double kernel_norm, const keyT& key,\n                          const coeffT& coeff, const implT* r) const {\n            \tconst double thresh=r->get_thresh()*0.1;\n            \tbool is_leaf=(kernel_norm<r->truncate_tol(thresh,key));\n            \tif (key.level()<2) is_leaf=false;\n            \treturn argT(is_leaf,coeff);\n            }\n\n\n            this_type make_child(const keyT& child) const {\n                return this_type(result,iaf.make_child(child),apply_op);\n            }\n\n            /// retrieve the coefficients (parent coeffs might be remote)\n            Future<this_type> activate() const {\n            \tFuture<ctT> f1=iaf.activate();\n\n//                Future<ctL> g1=g.activate();\n//                return h->world.taskq.add(detail::wrap_mem_fn(*const_cast<this_type *> (this),\n//                                          &this_type::forward_ctor),h,f1,g1,particle);\n\n                return result->world.taskq.add(detail::wrap_mem_fn(*const_cast<this_type *> (this),\n                                               &this_type::forward_ctor),result,f1,apply_op);\n            }\n\n            /// taskq-compatible ctor\n            this_type forward_ctor(implT* result1, const ctT& iaf1, const opT* apply_op1) {\n            \treturn this_type(result1,iaf1,apply_op1);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                ar & result & iaf & apply_op;\n            }\n        };\n\n        /// Returns the square of the error norm in the box labeled by key\n\n        /// Assumed to be invoked locally but it would be easy to eliminate\n        /// this assumption\n        template <typename opT>\n        double err_box(const keyT& key, const nodeT& node, const opT& func,\n                       int npt, const Tensor<double>& qx, const Tensor<double>& quad_phit,\n                       const Tensor<double>& quad_phiw) const {\n\n            std::vector<long> vq(NDIM);\n            for (std::size_t i=0; i<NDIM; ++i)\n                vq[i] = npt;\n            tensorT fval(vq,false), work(vq,false), result(vq,false);\n\n            // Compute the \"exact\" function in this volume at npt points\n            // where npt is usually this->npt+1.\n            fcube(key, func, qx, fval);\n\n            // Transform into the scaling function basis of order npt\n            double scale = pow(0.5,0.5*NDIM*key.level())*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            fval = fast_transform(fval,quad_phiw,result,work).scale(scale);\n\n            // Subtract to get the error ... the original coeffs are in the order k\n            // basis but we just computed the coeffs in the order npt(=k+1) basis\n            // so we can either use slices or an iterator macro.\n            const tensorT coeff = node.coeff().full_tensor();\n            ITERATOR(coeff,fval(IND)-=coeff(IND););\n            // flo note: we do want to keep a full tensor here!\n\n            // Compute the norm of what remains\n            double err = fval.normf();\n            return err*err;\n        }\n\n        template <typename opT>\n        class do_err_box {\n            const implT* impl;\n            const opT* func;\n            int npt;\n            Tensor<double> qx;\n            Tensor<double> quad_phit;\n            Tensor<double> quad_phiw;\n        public:\n            do_err_box() = default;\n\n            do_err_box(const implT* impl, const opT* func, int npt, const Tensor<double>& qx,\n                       const Tensor<double>& quad_phit, const Tensor<double>& quad_phiw)\n                : impl(impl), func(func), npt(npt), qx(qx), quad_phit(quad_phit), quad_phiw(quad_phiw) {}\n\n            do_err_box(const do_err_box& e)\n                : impl(e.impl), func(e.func), npt(e.npt), qx(e.qx), quad_phit(e.quad_phit), quad_phiw(e.quad_phiw) {}\n\n            double operator()(typename dcT::const_iterator& it) const {\n                const keyT& key = it->first;\n                const nodeT& node = it->second;\n                if (node.has_coeff())\n                    return impl->err_box(key, node, *func, npt, qx, quad_phit, quad_phiw);\n                else\n                    return 0.0;\n            }\n\n            double operator()(double a, double b) const {\n                return a+b;\n            }\n\n            template <typename Archive>\n            void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"not yet\", 1);\n            }\n        };\n\n        /// Returns the sum of squares of errors from local info ... no comms\n        template <typename opT>\n        double errsq_local(const opT& func) const {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n            // Make quadrature rule of higher order\n            const int npt = cdata.npt + 1;\n            Tensor<double> qx, qw, quad_phi, quad_phiw, quad_phit;\n            FunctionCommonData<T,NDIM>::_init_quadrature(k+1, npt, qx, qw, quad_phi, quad_phiw, quad_phit);\n\n            typedef Range<typename dcT::const_iterator> rangeT;\n            rangeT range(coeffs.begin(), coeffs.end());\n            return world.taskq.reduce< double,rangeT,do_err_box<opT> >(range,\n                                                                       do_err_box<opT>(this, &func, npt, qx, quad_phit, quad_phiw));\n        }\n\n        /// Returns \\c int(f(x),x) in local volume\n        T trace_local() const;\n\n        struct do_norm2sq_local {\n            double operator()(typename dcT::const_iterator& it) const {\n                const nodeT& node = it->second;\n                if (node.has_coeff()) {\n                    double norm = node.coeff().normf();\n                    return norm*norm;\n                }\n                else {\n                    return 0.0;\n                }\n            }\n\n            double operator()(double a, double b) const {\n                return (a+b);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"NOT IMPLEMENTED\", 1);\n            }\n        };\n\n\n        /// Returns the square of the local norm ... no comms\n        double norm2sq_local() const;\n\n        /// compute the inner product of this range with other\n        template<typename R>\n        struct do_inner_local {\n            const FunctionImpl<R,NDIM>* other;\n            bool leaves_only;\n            typedef TENSOR_RESULT_TYPE(T,R) resultT;\n\n            do_inner_local(const FunctionImpl<R,NDIM>* other, const bool leaves_only)\n            \t: other(other), leaves_only(leaves_only) {}\n            resultT operator()(typename dcT::const_iterator& it) const {\n\n            \tTENSOR_RESULT_TYPE(T,R) sum=0.0;\n            \tconst keyT& key=it->first;\n                const nodeT& fnode = it->second;\n                if (fnode.has_coeff()) {\n                    if (other->coeffs.probe(it->first)) {\n                        const FunctionNode<R,NDIM>& gnode = other->coeffs.find(key).get()->second;\n                        if (gnode.has_coeff()) {\n                            if (gnode.coeff().dim(0) != fnode.coeff().dim(0)) {\n                                madness::print(\"INNER\", it->first, gnode.coeff().dim(0),fnode.coeff().dim(0));\n                                MADNESS_EXCEPTION(\"functions have different k or compress/reconstruct error\", 0);\n                            }\n                            if (leaves_only) {\n                                if (gnode.is_leaf() or fnode.is_leaf()) {\n                                    sum += fnode.coeff().trace_conj(gnode.coeff());\n                                }\n                            } else {\n                                sum += fnode.coeff().trace_conj(gnode.coeff());\n                            }\n                        }\n                    }\n                }\n                return sum;\n            }\n\n            resultT operator()(resultT a, resultT b) const {\n                return (a+b);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"NOT IMPLEMENTED\", 1);\n            }\n        };\n\n        /// Returns the inner product ASSUMING same distribution\n\n        /// handles compressed and redundant form\n        template <typename R>\n        TENSOR_RESULT_TYPE(T,R) inner_local(const FunctionImpl<R,NDIM>& g) const {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n            typedef Range<typename dcT::const_iterator> rangeT;\n            typedef TENSOR_RESULT_TYPE(T,R) resultT;\n\n            // make sure the states of the trees are consistent\n            MADNESS_ASSERT(this->is_redundant()==g.is_redundant());\n            bool leaves_only=(this->is_redundant());\n            return world.taskq.reduce<resultT,rangeT,do_inner_local<R> >\n                (rangeT(coeffs.begin(),coeffs.end()),do_inner_local<R>(&g, leaves_only));\n        }\n\n\n        /// compute the inner product of this range with other\n        template<typename R>\n        struct do_inner_local_on_demand {\n            const FunctionImpl<T,NDIM>* bra;\n            const FunctionImpl<R,NDIM>* ket;\n            bool leaves_only=true;\n            typedef TENSOR_RESULT_TYPE(T,R) resultT;\n\n            do_inner_local_on_demand(const FunctionImpl<T,NDIM>* bra, const FunctionImpl<R,NDIM>* ket,\n                                     const bool leaves_only=true)\n                    : bra(bra), ket(ket), leaves_only(leaves_only) {}\n            resultT operator()(typename dcT::const_iterator& it) const {\n\n                constexpr std::size_t LDIM=std::max(NDIM/2,std::size_t(1));\n\n                const keyT& key=it->first;\n                const nodeT& fnode = it->second;\n                if (not fnode.has_coeff()) return resultT(0.0); // probably internal nodes\n\n                // assuming all boxes (esp the low-dim ones) are local, i.e. the functions are replicated\n                auto find_valid_parent = [](auto& key, auto& impl, auto&& find_valid_parent) {\n                    MADNESS_CHECK(impl->get_coeffs().owner(key)==impl->world.rank()); // make sure everything is local!\n                    if (impl->get_coeffs().probe(key)) return key;\n                    auto parentkey=key.parent();\n                    return find_valid_parent(parentkey, impl, find_valid_parent);\n                };\n\n                // returns coefficients, empty if no functor present\n                auto get_coeff = [&find_valid_parent](const auto& key, const auto& v_impl) {\n                    if ((v_impl.size()>0) and v_impl.front().get()) {\n                        auto impl=v_impl.front();\n\n//                    bool have_impl=impl.get();\n//                    if (have_impl) {\n                        auto parentkey = find_valid_parent(key, impl, find_valid_parent);\n                        MADNESS_CHECK(impl->get_coeffs().probe(parentkey));\n                        typename decltype(impl->coeffs)::accessor acc;\n                        impl->get_coeffs().find(acc,parentkey);\n                        auto parentcoeff=acc->second.coeff();\n                        auto coeff=impl->parent_to_child(parentcoeff, parentkey, key);\n                        return coeff;\n                    } else {\n                        // get type of vector elements\n                        typedef typename std::decay_t<decltype(v_impl)>::value_type::element_type::typeT S;\n//                        typedef typename std::decay_t<decltype(v_impl)>::value_type S;\n                        return GenTensor<S>();\n//                        return GenTensor<typename std::decay_t<decltype(*impl)>::typeT>();\n                    }\n                };\n\n                auto make_vector = [](auto& arg) {\n                    return std::vector<std::decay_t<decltype(arg)>>(1,arg);\n                };\n\n\n                Key<LDIM> key1,key2;\n                key.break_apart(key1,key2);\n\n                auto func=dynamic_cast<CompositeFunctorInterface<R,NDIM,LDIM>* >(ket->functor.get());\n                MADNESS_ASSERT(func);\n\n                MADNESS_CHECK_THROW(func->impl_ket_vector.size()==0 or func->impl_ket_vector.size()==1,\n                                    \"only one ket function supported in inner_on_demand\");\n                MADNESS_CHECK_THROW(func->impl_p1_vector.size()==0 or func->impl_p1_vector.size()==1,\n                                    \"only one p1 function supported in inner_on_demand\");\n                MADNESS_CHECK_THROW(func->impl_p2_vector.size()==0 or func->impl_p2_vector.size()==1,\n                                    \"only one p2 function supported in inner_on_demand\");\n                auto coeff_bra=fnode.coeff();\n                auto coeff_ket=get_coeff(key,func->impl_ket_vector);\n                auto coeff_v1=get_coeff(key1,make_vector(func->impl_m1));\n                auto coeff_v2=get_coeff(key2,make_vector(func->impl_m2));\n                auto coeff_p1=get_coeff(key1,func->impl_p1_vector);\n                auto coeff_p2=get_coeff(key2,func->impl_p2_vector);\n\n                // construct |ket(1,2)> or |p(1)p(2)> or |p(1)p(2) ket(1,2)>\n                double error=0.0;\n                if (coeff_ket.has_data() and coeff_p1.has_data()) {\n                    pointwise_multiplier<LDIM> pm(key,coeff_ket);\n                    coeff_ket=pm(key,outer(coeff_p1,coeff_p2,TensorArgs(TT_FULL,-1.0)).full_tensor());\n                    error+=pm.error;\n                } else if (coeff_ket.has_data() or coeff_p1.has_data()) {\n                    coeff_ket = (coeff_ket.has_data()) ? coeff_ket : outer(coeff_p1,coeff_p2);\n                } else { // not ket and no p1p2\n                    MADNESS_EXCEPTION(\"confused ket/p1p2 in do_inner_local_on_demand\",1);\n                }\n\n                // construct (v(1) + v(2)) |ket(1,2)>\n                coeffT v1v2ket;\n                if (coeff_v1.has_data()) {\n                    pointwise_multiplier<LDIM> pm(key,coeff_ket);\n                    v1v2ket = pm(key,coeff_v1.full_tensor(), 1);\n                    error+=pm.error;\n                    v1v2ket+= pm(key,coeff_v2.full_tensor(), 2);\n                    error+=pm.error;\n                } else {\n                    v1v2ket = coeff_ket;\n                }\n\n                resultT result;\n                if (func->impl_eri) {         // project bra*ket onto eri, avoid multiplication with eri\n                    MADNESS_CHECK(func->impl_eri->get_functor()->provides_coeff());\n                    coeffT coeff_eri=func->impl_eri->get_functor()->coeff(key).full_tensor();\n                    pointwise_multiplier<LDIM> pm(key,v1v2ket);\n                    tensorT braket=pm(key,coeff_bra.full_tensor_copy().conj());\n                    error+=pm.error;\n                    if (error>1.e-3) print(\"error in key\",key,error);\n                    result=coeff_eri.full_tensor().trace(braket);\n\n                } else {                            // no eri, project ket onto bra\n                    result=coeff_bra.full_tensor_copy().trace_conj(v1v2ket.full_tensor_copy());\n                }\n                return result;\n            }\n\n            resultT operator()(resultT a, resultT b) const {\n                return (a+b);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"NOT IMPLEMENTED\", 1);\n            }\n        };\n\n        /// Returns the inner product of this with function g constructed on-the-fly\n\n        /// the leaf boxes of this' MRA tree defines the inner product\n        template <typename R>\n        TENSOR_RESULT_TYPE(T,R) inner_local_on_demand(const FunctionImpl<R,NDIM>& gimpl) const {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n            MADNESS_CHECK(this->is_reconstructed());\n\n            typedef Range<typename dcT::const_iterator> rangeT;\n            rangeT range(coeffs.begin(), coeffs.end());\n            return world.taskq.reduce<T, rangeT, do_inner_local_on_demand<T>>(range,\n                               do_inner_local_on_demand<R>(this, &gimpl));\n        }\n\n        /// compute the inner product of this range with other\n        template<typename R>\n        struct do_dot_local {\n            const FunctionImpl<R,NDIM>* other;\n            bool leaves_only;\n            typedef TENSOR_RESULT_TYPE(T,R) resultT;\n\n            do_dot_local(const FunctionImpl<R,NDIM>* other, const bool leaves_only)\n            \t: other(other), leaves_only(leaves_only) {}\n            resultT operator()(typename dcT::const_iterator& it) const {\n\n            \tTENSOR_RESULT_TYPE(T,R) sum=0.0;\n            \tconst keyT& key=it->first;\n                const nodeT& fnode = it->second;\n                if (fnode.has_coeff()) {\n                    if (other->coeffs.probe(it->first)) {\n                        const FunctionNode<R,NDIM>& gnode = other->coeffs.find(key).get()->second;\n                        if (gnode.has_coeff()) {\n                            if (gnode.coeff().dim(0) != fnode.coeff().dim(0)) {\n                                madness::print(\"DOT\", it->first, gnode.coeff().dim(0),fnode.coeff().dim(0));\n                                MADNESS_EXCEPTION(\"functions have different k or compress/reconstruct error\", 0);\n                            }\n                            if (leaves_only) {\n                                if (gnode.is_leaf() or fnode.is_leaf()) {\n                                    sum += fnode.coeff().full_tensor().trace(gnode.coeff().full_tensor());\n                                }\n                            } else {\n                                sum += fnode.coeff().full_tensor().trace(gnode.coeff().full_tensor());\n                            }\n                        }\n                    }\n                }\n                return sum;\n            }\n\n            resultT operator()(resultT a, resultT b) const {\n                return (a+b);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"NOT IMPLEMENTED\", 1);\n            }\n        };\n\n        /// Returns the dot product ASSUMING same distribution\n\n        /// handles compressed and redundant form\n        template <typename R>\n        TENSOR_RESULT_TYPE(T,R) dot_local(const FunctionImpl<R,NDIM>& g) const {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n            typedef Range<typename dcT::const_iterator> rangeT;\n            typedef TENSOR_RESULT_TYPE(T,R) resultT;\n\n            // make sure the states of the trees are consistent\n            MADNESS_ASSERT(this->is_redundant()==g.is_redundant());\n            bool leaves_only=(this->is_redundant());\n            return world.taskq.reduce<resultT,rangeT,do_dot_local<R> >\n                (rangeT(coeffs.begin(),coeffs.end()),do_dot_local<R>(&g, leaves_only));\n        }\n\n        /// Type of the entry in the map returned by make_key_vec_map\n        typedef std::vector< std::pair<int,const coeffT*> > mapvecT;\n\n        /// Type of the map returned by make_key_vec_map\n        typedef ConcurrentHashMap< keyT, mapvecT > mapT;\n\n        /// Adds keys to union of local keys with specified index\n        void add_keys_to_map(mapT* map, int index) const {\n            typename dcT::const_iterator end = coeffs.end();\n            for (typename dcT::const_iterator it=coeffs.begin(); it!=end; ++it) {\n                typename mapT::accessor acc;\n                const keyT& key = it->first;\n                const FunctionNode<T,NDIM>& node = it->second;\n                if (node.has_coeff()) {\n                    [[maybe_unused]] auto inserted = map->insert(acc,key);\n                    acc->second.push_back(std::make_pair(index,&(node.coeff())));\n                }\n            }\n        }\n\n        /// Returns map of union of local keys to vector of indexes of functions containing that key\n\n        /// Local concurrency and synchronization only; no communication\n        static\n        mapT\n        make_key_vec_map(const std::vector<const FunctionImpl<T,NDIM>*>& v) {\n            mapT map(100000);\n            // This loop must be parallelized\n            for (unsigned int i=0; i<v.size(); i++) {\n                //v[i]->add_keys_to_map(&map,i);\n                v[i]->world.taskq.add(*(v[i]), &FunctionImpl<T,NDIM>::add_keys_to_map, &map, int(i));\n            }\n            if (v.size()) v[0]->world.taskq.fence();\n            return map;\n        }\n\n#if 0\n// Original\n        template <typename R>\n        static void do_inner_localX(const typename mapT::iterator lstart,\n                                    const typename mapT::iterator lend,\n                                    typename FunctionImpl<R,NDIM>::mapT* rmap_ptr,\n                                    const bool sym,\n                                    Tensor< TENSOR_RESULT_TYPE(T,R) >* result_ptr,\n                                    Mutex* mutex) {\n            Tensor< TENSOR_RESULT_TYPE(T,R) >& result = *result_ptr;\n            Tensor< TENSOR_RESULT_TYPE(T,R) > r(result.dim(0),result.dim(1));\n            for (typename mapT::iterator lit=lstart; lit!=lend; ++lit) {\n                const keyT& key = lit->first;\n                typename FunctionImpl<R,NDIM>::mapT::iterator rit=rmap_ptr->find(key);\n                if (rit != rmap_ptr->end()) {\n                    const mapvecT& leftv = lit->second;\n                    const typename FunctionImpl<R,NDIM>::mapvecT& rightv =rit->second;\n                    const int nleft = leftv.size();\n                    const int nright= rightv.size();\n\n                    for (int iv=0; iv<nleft; iv++) {\n                        const int i = leftv[iv].first;\n                        const GenTensor<T>* iptr = leftv[iv].second;\n\n                        for (int jv=0; jv<nright; jv++) {\n                            const int j = rightv[jv].first;\n                            const GenTensor<R>* jptr = rightv[jv].second;\n\n                            if (!sym || (sym && i<=j))\n                                r(i,j) += iptr->trace_conj(*jptr);\n                        }\n                    }\n                }\n            }\n            mutex->lock();\n            result += r;\n            mutex->unlock();\n        }\n#else\n       template <typename R>\n       static void do_inner_localX(const typename mapT::iterator lstart,\n                                   const typename mapT::iterator lend,\n                                   typename FunctionImpl<R,NDIM>::mapT* rmap_ptr,\n                                   const bool sym,\n                                   Tensor< TENSOR_RESULT_TYPE(T,R) >* result_ptr,\n                                   Mutex* mutex) {\n           Tensor< TENSOR_RESULT_TYPE(T,R) >& result = *result_ptr;\n           //Tensor< TENSOR_RESULT_TYPE(T,R) > r(result.dim(0),result.dim(1));\n           for (typename mapT::iterator lit=lstart; lit!=lend; ++lit) {\n               const keyT& key = lit->first;\n               typename FunctionImpl<R,NDIM>::mapT::iterator rit=rmap_ptr->find(key);\n               if (rit != rmap_ptr->end()) {\n                   const mapvecT& leftv = lit->second;\n                   const typename FunctionImpl<R,NDIM>::mapvecT& rightv =rit->second;\n                   const size_t nleft = leftv.size();\n                   const size_t nright= rightv.size();\n\n                   unsigned int size = leftv[0].second->size();\n                   Tensor<T> Left(nleft, size);\n                   Tensor<R> Right(nright, size);\n                   Tensor< TENSOR_RESULT_TYPE(T,R)> r(nleft, nright);\n                   for(unsigned int iv = 0; iv < nleft; ++iv) Left(iv,_) = (*(leftv[iv].second)).full_tensor();\n                   for(unsigned int jv = 0; jv < nright; ++jv) Right(jv,_) = (*(rightv[jv].second)).full_tensor();\n                   // call mxmT from mxm.h in tensor\n                   if(TensorTypeData<T>::iscomplex) Left = Left.conj();  // Should handle complex case and leave real case alone\n                   mxmT(nleft, nright, size, r.ptr(), Left.ptr(), Right.ptr());\n                   mutex->lock();\n                   for(unsigned int iv = 0; iv < nleft; ++iv) {\n                       const int i = leftv[iv].first;\n                       for(unsigned int jv = 0; jv < nright; ++jv) {\n                         const int j = rightv[jv].first;\n                         if (!sym || (sym && i<=j)) result(i,j) += r(iv,jv);\n                       }\n                   }\n                   mutex->unlock();\n               }\n           }\n       }\n#endif\n\n#if 0\n// Original\n        template <typename R, typename = std::enable_if_t<std::is_floating_point_v<R>>>\n        static void do_dot_localX(const typename mapT::iterator lstart,\n                                  const typename mapT::iterator lend,\n                                  typename FunctionImpl<R, NDIM>::mapT* rmap_ptr,\n                                  const bool sym,\n                                  Tensor<TENSOR_RESULT_TYPE(T, R)>* result_ptr,\n                                  Mutex* mutex) {\n            if (TensorTypeData<T>::iscomplex) MADNESS_EXCEPTION(\"no complex trace in LowRankTensor, sorry\", 1);\n            Tensor<TENSOR_RESULT_TYPE(T, R)>& result = *result_ptr;\n            Tensor<TENSOR_RESULT_TYPE(T, R)> r(result.dim(0), result.dim(1));\n            for (typename mapT::iterator lit = lstart; lit != lend; ++lit) {\n                const keyT& key = lit->first;\n                typename FunctionImpl<R, NDIM>::mapT::iterator rit = rmap_ptr->find(key);\n                if (rit != rmap_ptr->end()) {\n                    const mapvecT& leftv = lit->second;\n                    const typename FunctionImpl<R, NDIM>::mapvecT& rightv = rit->second;\n                    const int nleft = leftv.size();\n                    const int nright = rightv.size();\n\n                    for (int iv = 0; iv < nleft; iv++) {\n                        const int i = leftv[iv].first;\n                        const GenTensor<T>* iptr = leftv[iv].second;\n\n                        for (int jv = 0; jv < nright; jv++) {\n                            const int j = rightv[jv].first;\n                            const GenTensor<R>* jptr = rightv[jv].second;\n\n                            if (!sym || (sym && i <= j))\n                                r(i, j) += iptr->trace_conj(*jptr);\n                        }\n                    }\n                }\n            }\n            mutex->lock();\n            result += r;\n            mutex->unlock();\n        }\n#else\n       template <typename R>\n       static void do_dot_localX(const typename mapT::iterator lstart,\n                                 const typename mapT::iterator lend,\n                                 typename FunctionImpl<R, NDIM>::mapT* rmap_ptr,\n                                 const bool sym,\n                                 Tensor<TENSOR_RESULT_TYPE(T, R)>* result_ptr,\n                                 Mutex* mutex) {\n           Tensor<TENSOR_RESULT_TYPE(T, R)>& result = *result_ptr;\n           // Tensor<TENSOR_RESULT_TYPE(T, R)> r(result.dim(0), result.dim(1));\n           for (typename mapT::iterator lit = lstart; lit != lend; ++lit) {\n               const keyT& key = lit->first;\n               typename FunctionImpl<R, NDIM>::mapT::iterator rit = rmap_ptr->find(key);\n               if (rit != rmap_ptr->end()) {\n                   const mapvecT& leftv = lit->second;\n                   const typename FunctionImpl<R, NDIM>::mapvecT& rightv = rit->second;\n                   const size_t nleft = leftv.size();\n                   const size_t nright= rightv.size();\n\n                   unsigned int size = leftv[0].second->size();\n                   Tensor<T> Left(nleft, size);\n                   Tensor<R> Right(nright, size);\n                   Tensor< TENSOR_RESULT_TYPE(T, R)> r(nleft, nright);\n                   for(unsigned int iv = 0; iv < nleft; ++iv) Left(iv, _) = (*(leftv[iv].second)).full_tensor();\n                   for(unsigned int jv = 0; jv < nright; ++jv) Right(jv, _) = (*(rightv[jv].second)).full_tensor();\n                   // call mxmT from mxm.h in tensor\n                   mxmT(nleft, nright, size, r.ptr(), Left.ptr(), Right.ptr());\n                   mutex->lock();\n                   for(unsigned int iv = 0; iv < nleft; ++iv) {\n                       const int i = leftv[iv].first;\n                       for(unsigned int jv = 0; jv < nright; ++jv) {\n                         const int j = rightv[jv].first;\n                         if (!sym || (sym && i <= j)) result(i, j) += r(iv, jv);\n                       }\n                   }\n                   mutex->unlock();\n               }\n           }\n       }\n#endif\n\n        template <typename Real>\n        static std::enable_if_t<std::is_floating_point_v<Real>, Real> conj(const Real x) {\n            return x;\n        }\n\n        template <typename Real>\n        static std::complex<Real> conj(const std::complex<Real>& x) {\n            return std::conj(x);\n        }\n\n        template <typename R>\n        static Tensor< TENSOR_RESULT_TYPE(T,R) >\n        inner_local(const std::vector<const FunctionImpl<T,NDIM>*>& left,\n                    const std::vector<const FunctionImpl<R,NDIM>*>& right,\n                    bool sym) {\n\n            // This is basically a sparse matrix^T * matrix product\n            // Rij = sum(k) Aki * Bkj\n            // where i and j index functions and k index the wavelet coeffs\n            // eventually the goal is this structure (don't have jtile yet)\n            //\n            // do in parallel tiles of k (tensors of coeffs)\n            //    do tiles of j\n            //       do i\n            //          do j in jtile\n            //             do k in ktile\n            //                Rij += Aki*Bkj\n\n            mapT lmap = make_key_vec_map(left);\n            typename FunctionImpl<R,NDIM>::mapT rmap;\n            auto* rmap_ptr = (typename FunctionImpl<R,NDIM>::mapT*)(&lmap);\n            if ((std::vector<const FunctionImpl<R,NDIM>*>*)(&left) != &right) {\n                rmap = FunctionImpl<R,NDIM>::make_key_vec_map(right);\n                rmap_ptr = &rmap;\n            }\n\n            size_t chunk = (lmap.size()-1)/(3*4*5)+1;\n\n            Tensor< TENSOR_RESULT_TYPE(T,R) > r(left.size(), right.size());\n            Mutex mutex;\n\n            typename mapT::iterator lstart=lmap.begin();\n            while (lstart != lmap.end()) {\n                typename mapT::iterator lend = lstart;\n                advance(lend,chunk);\n                left[0]->world.taskq.add(&FunctionImpl<T,NDIM>::do_inner_localX<R>, lstart, lend, rmap_ptr, sym, &r, &mutex);\n                lstart = lend;\n            }\n            left[0]->world.taskq.fence();\n\n            if (sym) {\n                for (long i=0; i<r.dim(0); i++) {\n                    for (long j=0; j<i; j++) {\n                        TENSOR_RESULT_TYPE(T,R) sum = r(i,j)+conj(r(j,i));\n                        r(i,j) = sum;\n                        r(j,i) = conj(sum);\n                    }\n                }\n            }\n            return r;\n        }\n\n        template <typename R>\n        static Tensor<TENSOR_RESULT_TYPE(T, R)>\n        dot_local(const std::vector<const FunctionImpl<T, NDIM>*>& left,\n                  const std::vector<const FunctionImpl<R, NDIM>*>& right,\n                  bool sym) {\n\n            // This is basically a sparse matrix * matrix product\n            // Rij = sum(k) Aik * Bkj\n            // where i and j index functions and k index the wavelet coeffs\n            // eventually the goal is this structure (don't have jtile yet)\n            //\n            // do in parallel tiles of k (tensors of coeffs)\n            //    do tiles of j\n            //       do i\n            //          do j in jtile\n            //             do k in ktile\n            //                Rij += Aik*Bkj\n\n            mapT lmap = make_key_vec_map(left);\n            typename FunctionImpl<R, NDIM>::mapT rmap;\n            auto* rmap_ptr = (typename FunctionImpl<R, NDIM>::mapT*)(&lmap);\n            if ((std::vector<const FunctionImpl<R, NDIM>*>*)(&left) != &right) {\n                rmap = FunctionImpl<R, NDIM>::make_key_vec_map(right);\n                rmap_ptr = &rmap;\n            }\n\n            size_t chunk = (lmap.size() - 1) / (3 * 4 * 5) + 1;\n\n            Tensor<TENSOR_RESULT_TYPE(T, R)> r(left.size(), right.size());\n            Mutex mutex;\n\n            typename mapT::iterator lstart=lmap.begin();\n            while (lstart != lmap.end()) {\n                typename mapT::iterator lend = lstart;\n                advance(lend, chunk);\n                left[0]->world.taskq.add(&FunctionImpl<T, NDIM>::do_dot_localX<R>, lstart, lend, rmap_ptr, sym, &r, &mutex);\n                lstart = lend;\n            }\n            left[0]->world.taskq.fence();\n\n            // sym is for hermiticity\n            if (sym) {\n                for (long i = 0; i < r.dim(0); i++) {\n                    for (long j = 0; j < i; j++) {\n                        TENSOR_RESULT_TYPE(T, R) sum = r(i, j) + conj(r(j, i));\n                        r(i, j) = sum;\n                        r(j, i) = conj(sum);\n                    }\n                }\n            }\n            return r;\n        }\n\n        template <typename R>\n        void print_type_in_compilation_error(R&&)\n        {\n            static_assert(!std::is_same<R, int>::value &&\n                          std::is_same<R, int>::value,\n                          \"Compilation failed because you wanted to know the type; see below:\");\n        }\n\n        /// invoked by result\n\n        /// contract 2 functions f(x,z) = \\int g(x,y) * h(y,z) dy\n        /// @tparam CDIM: the dimension of the contraction variable (y)\n        /// @tparam NDIM: the dimension of the result (x,z)\n        /// @tparam LDIM: the dimension of g(x,y)\n        /// @tparam KDIM: the dimension of h(y,z)\n        template<typename Q, std::size_t LDIM, typename R, std::size_t KDIM,\n                std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>\n        void partial_inner(const FunctionImpl<Q, LDIM>& g, const FunctionImpl<R, KDIM>& h,\n                           const std::array<int, CDIM> v1, const std::array<int, CDIM> v2) {\n\n            typedef std::multimap<Key<NDIM>, std::list<Key<CDIM>>> contractionmapT;\n            //double wall_get_lists=0.0;\n            //double wall_recur=0.0;\n            //double wall_contract=0.0;\n            std::size_t nmax=FunctionDefaults<CDIM>::get_max_refine_level();\n            const double thresh=FunctionDefaults<NDIM>::get_thresh();\n\n            // auto print_map = [](const auto& map) {\n                // for (const auto& kv : map) print(kv.first,\"--\",kv.second);\n            // };\n            // logical constness, not bitwise constness\n            FunctionImpl<Q,LDIM>& g_nc=const_cast<FunctionImpl<Q,LDIM>&>(g);\n            FunctionImpl<R,KDIM>& h_nc=const_cast<FunctionImpl<R,KDIM>&>(h);\n\n            std::list<contractionmapT> all_contraction_maps;\n            for (std::size_t n=0; n<nmax; ++n) {\n\n                // list of nodes with d coefficients (and their parents)\n\t      //double wall0 = wall_time();\n                auto [g_ijlist, g_jlist] = g.get_contraction_node_lists(n, v1);\n                auto [h_ijlist, h_jlist] = h.get_contraction_node_lists(n, v2);\n                if ((g_ijlist.size() == 0) and (h_ijlist.size() == 0)) break;\n                //double wall1 = wall_time();\n                //wall_get_lists += (wall1 - wall0);\n                //wall0 = wall1;\n//                print(\"g_jlist\");\n//                for (const auto& kv : g_jlist) print(kv.first,kv.second);\n//                print(\"h_jlist\");\n//                for (const auto& kv : h_jlist) print(kv.first,kv.second);\n\n                // next lines will insert s nodes into g and h -> possible race condition!\n                bool this_first = true;  // are the remaining indices of g before those of g: f(x,z) = g(x,y) h(y,z)\n                // CDIM, NDIM, KDIM\n                contractionmapT contraction_map = g_nc.recur_down_for_contraction_map(\n                        g_nc.key0(), g_nc.get_coeffs().find(g_nc.key0()).get()->second, v1, v2,\n                        h_ijlist, h_jlist, this_first, thresh);\n\n                this_first = false;\n                // CDIM, NDIM, LDIM\n                auto hnode0=h_nc.get_coeffs().find(h_nc.key0()).get()->second;\n                contractionmapT contraction_map1 = h_nc.recur_down_for_contraction_map(\n                        h_nc.key0(), hnode0, v2, v1,\n                        g_ijlist, g_jlist, this_first, thresh);\n\n                // will contain duplicate entries\n                contraction_map.merge(contraction_map1);\n                // turn multimap into a map of list\n                auto it = contraction_map.begin();\n                while (it != contraction_map.end()) {\n                    auto it_end = contraction_map.upper_bound(it->first);\n                    auto it2 = it;\n                    it2++;\n                    while (it2 != it_end) {\n                        it->second.splice(it->second.end(), it2->second);\n                        it2 = contraction_map.erase(it2);\n                    }\n                    it = it_end;\n                }\n//                print(\"thresh               \",thresh);\n//                print(\"contraction list size\",contraction_map.size());\n\n                // remove all double entries\n                for (auto& elem: contraction_map) {\n                    elem.second.sort();\n                    elem.second.unique();\n                }\n                //wall1 = wall_time();\n                //wall_recur += (wall1 - wall0);\n//                if (n==2) {\n//                    print(\"contraction map for n=\", n);\n//                    print_map(contraction_map);\n//                }\n                all_contraction_maps.push_back(contraction_map);\n\n                long mapsize=contraction_map.size();\n                if (mapsize==0) break;\n            }\n\n\n            // finally do the contraction\n            for (const auto& contraction_map : all_contraction_maps) {\n                for (const auto& key_list : contraction_map) {\n                    const Key<NDIM>& key=key_list.first;\n                    const std::list<Key<CDIM>>& list=key_list.second;\n                    woT::task(coeffs.owner(key), &implT:: template partial_inner_contract<Q,LDIM,R,KDIM>,\n                              &g,&h,v1,v2,key,list);\n                }\n            }\n        }\n\n        /// for contraction two functions f(x,z) = \\int g(x,y) h(y,z) dy\n\n        /// find all nodes with d coefficients and return a list of complete keys and of\n        /// keys holding only the y dimension, also the maximum norm of all d for the j dimension\n        /// @param[in]  n   the scale\n        /// @param[in]  v   array holding the indices of the integration variable\n        /// @return     ijlist: list of all nodes with d coeffs; jlist: j-part of ij list only\n        template<std::size_t CDIM>\n        std::tuple<std::set<Key<NDIM>>, std::map<Key<CDIM>,double>>\n        get_contraction_node_lists(const std::size_t n, const std::array<int, CDIM>& v) const {\n\n            const auto& cdata=get_cdata();\n            auto has_d_coeffs = [&cdata](const coeffT& coeff) {\n                if (coeff.has_no_data()) return false;\n                return (coeff.dim(0)==2*cdata.k);\n            };\n\n            // keys to be contracted in g\n            std::set<Key<NDIM>> ij_list;           // full key\n            std::map<Key<CDIM>,double> j_list;      // only that dimension that will be contracted\n\n            for (auto it=get_coeffs().begin(); it!=get_coeffs().end(); ++it) {\n                const Key<NDIM>& key=it->first;\n                const FunctionNode<T,NDIM>& node=it->second;\n                if ((key.level()==int(n)) and (has_d_coeffs(node.coeff()))) {\n                    ij_list.insert(key);\n                    Vector<Translation,CDIM> j_trans;\n                    for (std::size_t i=0; i<CDIM; ++i) j_trans[i]=key.translation()[v[i]];\n                    Key<CDIM> jkey(n,j_trans);\n                    const double max_d_norm=j_list[jkey];\n                    j_list.insert_or_assign(jkey,std::max(max_d_norm,node.get_dnorm()));\n                    Key<CDIM> parent_jkey=jkey.parent();\n                    while (j_list.count(parent_jkey)==0) {\n                        j_list.insert({parent_jkey,1.0});\n                        parent_jkey=parent_jkey.parent();\n                    }\n                }\n            }\n            return std::make_tuple(ij_list,j_list);\n        }\n\n        /// make a map of all nodes that will contribute to a partial inner product\n\n        /// given the list of d coefficient-holding nodes of the other function:\n        /// recur down h if snorm * dnorm > tol and key n−jx ∈ other−ij-list. Make s\n        /// coefficients if necessary. Make list of nodes n − ijk as map(n-ik, list(j)).\n        ///\n        /// !! WILL ADD NEW S NODES TO THIS TREE THAT MUST BE REMOVED TO AVOID INCONSISTENT TREE STRUCTURE !!\n        ///\n        /// @param[in]  key     for recursion\n        /// @param[in]  node    corresponds to key\n        /// @param[in]  v_this  this' dimension that are contracted\n        /// @param[in]  v_other other's dimension that are contracted\n        /// @param[in]  ij_other_list  list of nodes of the other function that will be contracted (and their parents)\n        /// @param[in]  j_other_list  list of column nodes of the other function that will be contracted (and their parents)\n        /// @param[in]  max_d_norm  max d coeff norm of the nodes in j_list\n        /// @param[in]  this_first  are the remaining coeffs of this functions first or last in the result function\n        /// @param[in]  thresh  threshold for including nodes in the contraction: snorm*dnorm > thresh\n        /// @tparam     CDIM    dimension to be contracted\n        /// @tparam     ODIM    dimensions of the other function\n        /// @tparam     FDIM    dimensions of the final function\n        template<std::size_t CDIM, std::size_t ODIM, std::size_t FDIM=NDIM+ODIM-2*CDIM>\n        std::multimap<Key<FDIM>, std::list<Key<CDIM>>> recur_down_for_contraction_map(\n                const keyT& key, const nodeT& node,\n                const std::array<int,CDIM>& v_this,\n                const std::array<int,CDIM>& v_other,\n                const std::set<Key<ODIM>>& ij_other_list,\n                const std::map<Key<CDIM>,double>& j_other_list,\n                bool this_first, const double thresh) {\n\n            std::multimap<Key<FDIM>, std::list<Key<CDIM>>> contraction_map;\n\n            // fast return if the other function has no d coeffs\n            if (j_other_list.empty()) return contraction_map;\n\n            // continue recursion if this node may be contracted with the j column\n            // extract relevant node translations from this node\n            const auto j_this_key=key.extract_key(v_this);\n\n//            print(\"\\nkey, j_this_key\", key, j_this_key);\n            const double max_d_norm=j_other_list.find(j_this_key)->second;\n            const bool sd_norm_product_large = node.get_snorm() * max_d_norm > truncate_tol(thresh,key);\n//            print(\"sd_product_norm\",node.get_snorm() * max_d_norm, thresh);\n\n            // end recursion if we have reached the final scale n\n            // with which nodes from other will this node be contracted?\n            bool final_scale=key.level()==ij_other_list.begin()->level();\n            if (final_scale and sd_norm_product_large) {\n                for (auto& other_key : ij_other_list) {\n                    const auto j_other_key=other_key.extract_key(v_other);\n                    if (j_this_key != j_other_key) continue;\n                    auto i_key=key.extract_complement_key(v_this);\n                    auto k_key=other_key.extract_complement_key(v_other);\n//                    print(\"key, ij_other_key\",key,other_key);\n//                    print(\"i, k, j key\",i_key, k_key, j_this_key);\n                    Key<FDIM> ik_key=(this_first) ? i_key.merge_with(k_key) : k_key.merge_with(i_key);\n//                    print(\"ik_key\",ik_key);\n//                    MADNESS_CHECK(contraction_map.count(ik_key)==0);\n                    contraction_map.insert(std::make_pair(ik_key,std::list<Key<CDIM>>{j_this_key}));\n                }\n                return contraction_map;\n            }\n\n            bool continue_recursion = (j_other_list.count(j_this_key)==1);\n            if (not continue_recursion) return contraction_map;\n\n\n            // continue recursion if norms are large\n            continue_recursion = (node.has_children() or sd_norm_product_large);\n\n            if (continue_recursion) {\n                // in case we need to compute children's coefficients: unfilter only once\n                bool compute_child_s_coeffs=true;\n                coeffT d = node.coeff();\n//                print(\"continuing recursion from key\",key);\n\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    keyT child=kit.key();\n                    typename dcT::accessor acc;\n\n                    // make child's s coeffs if it doesn't exist or if is has no s coeffs\n                    bool childnode_exists=get_coeffs().find(acc,child);\n                    bool need_s_coeffs= childnode_exists ? (acc->second.get_snorm()<=0.0) : true;\n\n                    coeffT child_s_coeffs;\n                    if (need_s_coeffs) {\n                        if (compute_child_s_coeffs) {\n                            if (d.dim(0)==cdata.vk[0]) {        // s coeffs only in this node\n                                coeffT d1(cdata.v2k,get_tensor_args());\n                                d1(cdata.s0)+=d;\n                                d=d1;\n                            }\n                            d = unfilter(d);\n                            compute_child_s_coeffs=false;\n                        }\n                        child_s_coeffs=copy(d(child_patch(child)));\n                        child_s_coeffs.reduce_rank(thresh);\n                    }\n\n                    if (not childnode_exists) {\n                        get_coeffs().replace(child,nodeT(child_s_coeffs,false));\n                        get_coeffs().find(acc,child);\n                    } else if (childnode_exists and need_s_coeffs) {\n                        acc->second.coeff()=child_s_coeffs;\n                    }\n                    bool exists= get_coeffs().find(acc,child);\n                    MADNESS_CHECK(exists);\n                    nodeT& childnode = acc->second;\n                    if (need_s_coeffs) childnode.recompute_snorm_and_dnorm(get_cdata());\n//                    print(\"recurring down to\",child);\n                    contraction_map.merge(recur_down_for_contraction_map(child,childnode, v_this, v_other,\n                                                                         ij_other_list, j_other_list, this_first, thresh));\n//                    print(\"contraction_map.size()\",contraction_map.size());\n                }\n\n            }\n\n            return contraction_map;\n        }\n\n\n        /// tensor contraction part of partial_inner\n\n        /// @param[in]  g   rhs of the inner product\n        /// @param[in]  h   lhs of the inner product\n        /// @param[in]  v1  dimensions of g to be contracted\n        /// @param[in]  v2  dimensions of h to be contracted\n        /// @param[in]  key key of result's (this) FunctionNode\n        /// @param[in]  j_key_list list of contraction index-j keys contributing to this' node\n        template<typename Q, std::size_t LDIM, typename R, std::size_t KDIM,\n                std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>\n        void partial_inner_contract(const FunctionImpl<Q, LDIM>* g, const FunctionImpl<R, KDIM>* h,\n                               const std::array<int, CDIM> v1, const std::array<int, CDIM> v2,\n                               const Key<NDIM>& key, const std::list<Key<CDIM>>& j_key_list) {\n\n            Key<LDIM - CDIM> i_key;\n            Key<KDIM - CDIM> k_key;\n            key.break_apart(i_key, k_key);\n\n            coeffT result_coeff(get_cdata().v2k, get_tensor_type());\n            for (const auto& j_key: j_key_list) {\n\n                auto v_complement = [](const auto& v, const auto& vc) {\n                    constexpr std::size_t VDIM = std::tuple_size<std::decay_t<decltype(v)>>::value;\n                    constexpr std::size_t VCDIM = std::tuple_size<std::decay_t<decltype(vc)>>::value;\n                    std::array<int, VCDIM> result;\n                    for (std::size_t i = 0; i < VCDIM; i++) result[i] = (v.back() + i + 1) % (VDIM + VCDIM);\n                    return result;\n                };\n                auto make_ij_key = [&v_complement](const auto i_key, const auto j_key, const auto& v) {\n                    constexpr std::size_t IDIM = std::decay_t<decltype(i_key)>::static_size;\n                    constexpr std::size_t JDIM = std::decay_t<decltype(j_key)>::static_size;\n                    static_assert(JDIM == std::tuple_size<std::decay_t<decltype(v)>>::value);\n\n                    Vector<Translation, IDIM + JDIM> l;\n                    for (std::size_t i = 0; i < v.size(); ++i) l[v[i]] = j_key.translation()[i];\n                    std::array<int, IDIM> vc1;\n                    auto vc = v_complement(v, vc1);\n                    for (std::size_t i = 0; i < vc.size(); ++i) l[vc[i]] = i_key.translation()[i];\n\n                    return Key<IDIM + JDIM>(i_key.level(), l);\n                };\n\n                Key<LDIM> ij_key = make_ij_key(i_key, j_key, v1);\n                Key<KDIM> jk_key = make_ij_key(k_key, j_key, v2);\n\n                MADNESS_CHECK(g->get_coeffs().probe(ij_key));\n                MADNESS_CHECK(h->get_coeffs().probe(jk_key));\n                const coeffT& gcoeff = g->get_coeffs().find(ij_key).get()->second.coeff();\n                const coeffT& hcoeff = h->get_coeffs().find(jk_key).get()->second.coeff();\n                coeffT gcoeff1, hcoeff1;\n                if (gcoeff.dim(0) == g->get_cdata().k) {\n                    gcoeff1 = coeffT(g->get_cdata().v2k, g->get_tensor_args());\n                    gcoeff1(g->get_cdata().s0) += gcoeff;\n                } else {\n                    gcoeff1 = gcoeff;\n                }\n                if (hcoeff.dim(0) == g->get_cdata().k) {\n                    hcoeff1 = coeffT(h->get_cdata().v2k, h->get_tensor_args());\n                    hcoeff1(h->get_cdata().s0) += hcoeff;\n                } else {\n                    hcoeff1 = hcoeff;\n                }\n\n                // offset: 0 for full tensor, 1 for svd representation with rand being the first dimension (r,d1,d2,d3) -> (r,d1*d2*d3)\n                auto fuse = [](Tensor<T> tensor, const std::array<int, CDIM>& v, int offset) {\n                    for (std::size_t i = 0; i < CDIM - 1; ++i) {\n                        MADNESS_CHECK((v[i] + 1) == v[i + 1]); // make sure v is contiguous and ascending\n                        tensor = tensor.fusedim(v[0]+offset);\n                    }\n                    return tensor;\n                };\n\n                // use case: partial_projection of 2-electron functions in svd representation  f(1) = \\int g(2) h(1,2) d2\n                // c_i = \\sum_j a_j b_ij = \\sum_jr a_j b_rj b'_rj\n                //                       = \\sum_jr ( a_j b_rj) b'_rj )\n                auto contract2 = [](const auto& svdcoeff, const auto& tensor, const int particle) {\n#if HAVE_GENTENSOR\n                    const int spectator_particle=(particle+1)%2;\n                    Tensor<Q> gtensor = svdcoeff.get_svdtensor().make_vector_with_weights(particle);\n                    gtensor=gtensor.reshape(svdcoeff.rank(),gtensor.size()/svdcoeff.rank());\n                    MADNESS_CHECK(gtensor.ndim()==2);\n                    Tensor<Q> gtensor_other = svdcoeff.get_svdtensor().ref_vector(spectator_particle);\n                    Tensor<T> tmp1=inner(gtensor,tensor.flat(),1,0);          // tmp1(r) = sum_j a'_(r,j) b(j)\n                    MADNESS_CHECK(tmp1.ndim()==1);\n                    Tensor<T> tmp2=inner(gtensor_other,tmp1,0,0);          // tmp2(i) = sum_r a_(r,i) tmp1(r)\n                    return tmp2;\n#else\n                    MADNESS_EXCEPTION(\"no partial_inner using svd without GenTensor\",1);\n                    return Tensor<T>();\n#endif\n                };\n\n                if (gcoeff.is_full_tensor() and hcoeff.is_full_tensor() and result_coeff.is_full_tensor()) {\n                    // merge multiple contraction dimensions into one\n                    int offset = 0;\n                    Tensor<Q> gtensor = fuse(gcoeff1.full_tensor(), v1, offset);\n                    Tensor<R> htensor = fuse(hcoeff1.full_tensor(), v2, offset);\n                    result_coeff.full_tensor() += inner(gtensor, htensor, v1[0], v2[0]);\n                    if (key.level() > 0) {\n                        gtensor = copy(gcoeff1.full_tensor()(g->get_cdata().s0));\n                        htensor = copy(hcoeff1.full_tensor()(h->get_cdata().s0));\n                        gtensor = fuse(gtensor, v1, offset);\n                        htensor = fuse(htensor, v2, offset);\n                        result_coeff.full_tensor()(get_cdata().s0) -= inner(gtensor, htensor, v1[0], v2[0]);\n                    }\n                }\n\n\n                // use case: 2-electron functions in svd representation  f(1,3) = \\int g(1,2) h(2,3) d2\n                // c_ik = \\sum_j a_ij b_jk = \\sum_jrr' a_ri a'_rj b_r'j b_r'k\n                //                         = \\sum_jrr' ( a_ri (a'_rj b_r'j) )  b_r'k\n                //                         = \\sum_jrr' c_r'i  b_r'k\n                else if (gcoeff.is_svd_tensor() and hcoeff.is_svd_tensor() and result_coeff.is_svd_tensor()) {\n                    MADNESS_CHECK(v1[0]==0 or v1[CDIM-1]==LDIM-1);\n                    MADNESS_CHECK(v2[0]==0 or v2[CDIM-1]==KDIM-1);\n                    int gparticle=  v1[0]==0 ? 0 : 1;       // which particle to integrate over\n                    int hparticle=  v2[0]==0 ? 0 : 1;       // which particle to integrate over\n                    // merge multiple contraction dimensions into one\n                    Tensor<Q> gtensor = gcoeff1.get_svdtensor().flat_vector_with_weights(gparticle);\n                    Tensor<Q> gtensor_other = gcoeff1.get_svdtensor().flat_vector((gparticle+1)%2);\n                    Tensor<R> htensor = hcoeff1.get_svdtensor().flat_vector_with_weights(hparticle);\n                    Tensor<R> htensor_other = hcoeff1.get_svdtensor().flat_vector((hparticle+1)%2);\n                    Tensor<T> tmp1=inner(gtensor,htensor,1,1);      // tmp1(r,r') = sum_j b(r,j) a(r',j)\n                    Tensor<T> tmp2=inner(tmp1,gtensor_other,0,0);   // tmp2(r',i) = sum_r tmp1(r,r') a(r,i)\n                    Tensor< typename Tensor<T>::scalar_type > w(tmp2.dim(0));\n                    MADNESS_CHECK(tmp2.dim(0)==htensor_other.dim(0));\n                    w=1.0;\n                    coeffT result_tmp(get_cdata().v2k, get_tensor_type());\n                    result_tmp.get_svdtensor().set_vectors_and_weights(w,tmp2,htensor_other);\n                    if (key.level() > 0) {\n                        GenTensor<Q> gcoeff2 = copy(gcoeff1(g->get_cdata().s0));\n                        GenTensor<R> hcoeff2 = copy(hcoeff1(h->get_cdata().s0));\n                        Tensor<Q> gtensor = gcoeff2.get_svdtensor().flat_vector_with_weights(gparticle);\n                        Tensor<Q> gtensor_other = gcoeff2.get_svdtensor().flat_vector((gparticle+1)%2);\n                        Tensor<R> htensor = hcoeff2.get_svdtensor().flat_vector_with_weights(hparticle);\n                        Tensor<R> htensor_other = hcoeff2.get_svdtensor().flat_vector((hparticle+1)%2);\n                        Tensor<T> tmp1=inner(gtensor,htensor,1,1);      // tmp1(r,r') = sum_j b(r,j) a(r',j)\n                        Tensor<T> tmp2=inner(tmp1,gtensor_other,0,0);   // tmp2(r',i) = sum_r tmp1(r,r') a(r,i)\n                        Tensor< typename Tensor<T>::scalar_type > w(tmp2.dim(0));\n                        MADNESS_CHECK(tmp2.dim(0)==htensor_other.dim(0));\n                        w=1.0;\n                        coeffT result_coeff1(get_cdata().vk, get_tensor_type());\n                        result_coeff1.get_svdtensor().set_vectors_and_weights(w,tmp2,htensor_other);\n                        result_tmp(get_cdata().s0)-=result_coeff1;\n                    }\n                    result_coeff+=result_tmp;\n                }\n\n                // use case: partial_projection of 2-electron functions in svd representation  f(1) = \\int g(2) h(1,2) d2\n                // c_i = \\sum_j a_j b_ij = \\sum_jr a_j b_rj b'_rj\n                //                       = \\sum_jr ( a_j b_rj) b'_rj )\n                else if (gcoeff.is_full_tensor() and hcoeff.is_svd_tensor() and result_coeff.is_full_tensor()) {\n                    MADNESS_CHECK(v1[0]==0 and v1[CDIM-1]==LDIM-1);\n                    MADNESS_CHECK(v2[0]==0 or v2[CDIM-1]==KDIM-1);\n                    MADNESS_CHECK(LDIM==CDIM);\n                    int hparticle=  v2[0]==0 ? 0 : 1;       // which particle to integrate over\n\n                    Tensor<T> r=contract2(hcoeff1,gcoeff1.full_tensor(),hparticle);\n                    if (key.level()>0) r(get_cdata().s0)-=contract2(copy(hcoeff1(h->get_cdata().s0)),copy(gcoeff.full_tensor()(g->get_cdata().s0)),hparticle);\n                    result_coeff.full_tensor()+=r;\n                }\n                // use case: partial_projection of 2-electron functions in svd representation  f(1) = \\int g(1,2) h(2) d2\n                // c_i = \\sum_j a_ij b_j = \\sum_jr a_ri a'_rj b_j\n                //                       = \\sum_jr ( a_ri (a'_rj b_j) )\n                else if (gcoeff.is_svd_tensor() and hcoeff.is_full_tensor() and result_coeff.is_full_tensor()) {\n                    MADNESS_CHECK(v1[0]==0 or v1[CDIM-1]==LDIM-1);\n                    MADNESS_CHECK(v2[0]==0 and v2[CDIM-1]==KDIM-1);\n                    MADNESS_CHECK(KDIM==CDIM);\n                    int gparticle=  v1[0]==0 ? 0 : 1;       // which particle to integrate over\n\n                    Tensor<T> r=contract2(gcoeff1,hcoeff1.full_tensor(),gparticle);\n                    if (key.level()>0) r(get_cdata().s0)-=contract2(copy(gcoeff1(g->get_cdata().s0)),copy(hcoeff.full_tensor()(h->get_cdata().s0)),gparticle);\n                    result_coeff.full_tensor()+=r;\n\n                } else {\n                    MADNESS_EXCEPTION(\"unknown case in partial_inner_contract\",1);\n                }\n            }\n\n            MADNESS_CHECK(result_coeff.is_assigned());\n            result_coeff.reduce_rank(get_thresh());\n\n            if (coeffs.is_local(key))\n                coeffs.send(key, &nodeT::accumulate, result_coeff, coeffs, key, get_tensor_args());\n            else\n                coeffs.task(key, &nodeT::accumulate, result_coeff, coeffs, key, get_tensor_args(), TaskAttributes::hipri());\n        }\n\n        /// Return the inner product with an external function on a specified function node.\n\n        /// @param[in] key Key of the function node to compute the inner product on. (the domain of integration)\n        /// @param[in] c Tensor of coefficients for the function at the function node given by key\n        /// @param[in] f Reference to FunctionFunctorInterface. This is the externally provided function\n        /// @return Returns the inner product over the domain of a single function node, no guarantee of accuracy.\n        T inner_ext_node(keyT key, tensorT c, const std::shared_ptr< FunctionFunctorInterface<T,NDIM> > f) const {\n            tensorT fvals = tensorT(this->cdata.vk);\n            // Compute the value of the external function at the quadrature points.\n            fcube(key, *(f), cdata.quad_x, fvals);\n            // Convert quadrature point values to scaling coefficients.\n            tensorT fc = tensorT(values2coeffs(key, fvals));\n            // Return the inner product of the two functions' scaling coefficients.\n            return c.trace_conj(fc);\n        }\n\n        /// Call inner_ext_node recursively until convergence.\n        /// @param[in] key Key of the function node on which to compute inner product (the domain of integration)\n        /// @param[in] c coeffs for the function at the node given by key\n        /// @param[in] f Reference to FunctionFunctorInterface. This is the externally provided function\n        /// @param[in] leaf_refine boolean switch to turn on/off refinement past leaf nodes\n        /// @param[in] old_inner the inner product on the parent function node\n        /// @return Returns the inner product over the domain of a single function, checks for convergence.\n        T inner_ext_recursive(keyT key, tensorT c, const std::shared_ptr< FunctionFunctorInterface<T,NDIM> > f, const bool leaf_refine, T old_inner=T(0)) const {\n            int i = 0;\n            tensorT c_child, inner_child;\n            T new_inner, result = 0.0;\n\n            c_child = tensorT(cdata.v2k); // tensor of child coeffs\n            inner_child = Tensor<double>(pow(2, NDIM)); // child inner products\n\n            // If old_inner is default value, assume this is the first call\n            // and compute inner product on this node.\n            if (old_inner == T(0)) {\n                old_inner = inner_ext_node(key, c, f);\n            }\n\n            if (coeffs.find(key).get()->second.has_children()) {\n                // Since the key has children and we know the func is redundant,\n                // Iterate over all children of this compute node, computing\n                // the inner product on each child node. new_inner will store\n                // the sum of these, yielding a more accurate inner product.\n                for (KeyChildIterator<NDIM> it(key); it; ++it, ++i) {\n                    const keyT& child = it.key();\n                    tensorT cc = coeffs.find(child).get()->second.coeff().full_tensor_copy();\n                    inner_child(i) = inner_ext_node(child, cc, f);\n                }\n                new_inner = inner_child.sum();\n            } else if (leaf_refine) {\n                // We need the scaling coefficients of the numerical function\n                // at each of the children nodes. We can't use project because\n                // there is no guarantee that the numerical function will have\n                // a functor.  Instead, since we know we are at or below the\n                // leaf nodes, the wavelet coefficients are zero (to within the\n                // truncate tolerance). Thus, we can use unfilter() to\n                // get the scaling coefficients at the next level.\n                tensorT d = tensorT(cdata.v2k);\n                d = T(0);\n                d(cdata.s0) = copy(c);\n                c_child = unfilter(d);\n\n                // Iterate over all children of this compute node, computing\n                // the inner product on each child node. new_inner will store\n                // the sum of these, yielding a more accurate inner product.\n                for (KeyChildIterator<NDIM> it(key); it; ++it, ++i) {\n                    const keyT& child = it.key();\n                    tensorT cc = tensorT(c_child(child_patch(child)));\n                    inner_child(i) = inner_ext_node(child, cc, f);\n                }\n                new_inner = inner_child.sum();\n            } else {\n                // If we get to here, we are at the leaf nodes and the user has\n                // specified that they do not want refinement past leaf nodes.\n                new_inner = old_inner;\n            }\n\n            // Check for convergence. If converged...yay, we're done. If not,\n            // call inner_ext_node_recursive on each child node and accumulate\n            // the inner product in result.\n            // if (std::abs(new_inner - old_inner) <= truncate_tol(thresh, key)) {\n            if (std::abs(new_inner - old_inner) <= thresh) {\n                result = new_inner;\n            } else {\n                i = 0;\n                for (KeyChildIterator<NDIM> it(key); it; ++it, ++i) {\n                    const keyT& child = it.key();\n                    tensorT cc = tensorT(c_child(child_patch(child)));\n                    result += inner_ext_recursive(child, cc, f, leaf_refine, inner_child(i));\n                }\n            }\n\n            return result;\n        }\n\n        struct do_inner_ext_local_ffi {\n            const std::shared_ptr< FunctionFunctorInterface<T, NDIM> > fref;\n            const implT * impl;\n            const bool leaf_refine;\n            const bool do_leaves;   ///< start with leaf nodes instead of initial_level\n\n            do_inner_ext_local_ffi(const std::shared_ptr< FunctionFunctorInterface<T,NDIM> > f,\n                    const implT * impl, const bool leaf_refine, const bool do_leaves)\n                    : fref(f), impl(impl), leaf_refine(leaf_refine), do_leaves(do_leaves) {};\n\n            T operator()(typename dcT::const_iterator& it) const {\n                if (do_leaves and it->second.is_leaf()) {\n                    tensorT cc = it->second.coeff().full_tensor();\n                    return impl->inner_adaptive_recursive(it->first, cc, fref, leaf_refine, T(0));\n                } else if ((not do_leaves) and (it->first.level() == impl->initial_level)) {\n                    tensorT cc = it->second.coeff().full_tensor();\n                    return impl->inner_ext_recursive(it->first, cc, fref, leaf_refine, T(0));\n                } else {\n                    return 0.0;\n                }\n            }\n\n            T operator()(T a, T b) const {\n                return (a + b);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                MADNESS_EXCEPTION(\"NOT IMPLEMENTED\", 1);\n            }\n        };\n\n        /// Return the local part of inner product with external function ... no communication.\n        /// @param[in] f Reference to FunctionFunctorInterface. This is the externally provided function\n        /// @param[in] leaf_refine boolean switch to turn on/off refinement past leaf nodes\n        /// @return Returns local part of the inner product, i.e. over the domain of all function nodes on this compute node.\n        T inner_ext_local(const std::shared_ptr< FunctionFunctorInterface<T,NDIM> > f, const bool leaf_refine) const {\n            typedef Range<typename dcT::const_iterator> rangeT;\n\n            return world.taskq.reduce<T, rangeT, do_inner_ext_local_ffi>(rangeT(coeffs.begin(),coeffs.end()),\n                    do_inner_ext_local_ffi(f, this, leaf_refine, false));\n        }\n\n        /// Return the local part of inner product with external function ... no communication.\n        /// @param[in] f Reference to FunctionFunctorInterface. This is the externally provided function\n        /// @param[in] leaf_refine boolean switch to turn on/off refinement past leaf nodes\n        /// @return Returns local part of the inner product, i.e. over the domain of all function nodes on this compute node.\n        T inner_adaptive_local(const std::shared_ptr< FunctionFunctorInterface<T,NDIM> > f, const bool leaf_refine) const {\n            typedef Range<typename dcT::const_iterator> rangeT;\n\n            return world.taskq.reduce<T, rangeT, do_inner_ext_local_ffi>(rangeT(coeffs.begin(),coeffs.end()),\n                    do_inner_ext_local_ffi(f, this, leaf_refine, true));\n        }\n\n        /// Call inner_ext_node recursively until convergence.\n        /// @param[in] key Key of the function node on which to compute inner product (the domain of integration)\n        /// @param[in] c coeffs for the function at the node given by key\n        /// @param[in] f Reference to FunctionFunctorInterface. This is the externally provided function\n        /// @param[in] leaf_refine boolean switch to turn on/off refinement past leaf nodes\n        /// @param[in] old_inner the inner product on the parent function node\n        /// @return Returns the inner product over the domain of a single function, checks for convergence.\n        T inner_adaptive_recursive(keyT key, const tensorT& c,\n                const std::shared_ptr< FunctionFunctorInterface<T,NDIM> > f,\n                const bool leaf_refine, T old_inner=T(0)) const {\n\n            // the inner product in the current node\n            old_inner = inner_ext_node(key, c, f);\n            T result=0.0;\n\n            // the inner product in the child nodes\n\n            // compute the sum coefficients of the MRA function\n            tensorT d = tensorT(cdata.v2k);\n            d = T(0);\n            d(cdata.s0) = copy(c);\n            tensorT c_child = unfilter(d);\n\n            // compute the inner product in the child nodes\n            T new_inner=0.0; // child inner products\n            for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                const keyT& child = it.key();\n                tensorT cc = tensorT(c_child(child_patch(child)));\n                new_inner+= inner_ext_node(child, cc, f);\n            }\n\n            // continue recursion if needed\n            const double tol=truncate_tol(thresh,key);\n            if (leaf_refine and (std::abs(new_inner - old_inner) > tol)) {\n                for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                    const keyT& child = it.key();\n                    tensorT cc = tensorT(c_child(child_patch(child)));\n                    result += inner_adaptive_recursive(child, cc, f, leaf_refine, T(0));\n                }\n            } else {\n                result = new_inner;\n            }\n            return result;\n\n        }\n\n\n        /// Return the gaxpy product with an external function on a specified\n        /// function node.\n        /// @param[in] key Key of the function node on which to compute gaxpy\n        /// @param[in] lc Tensor of coefficients for the function at the\n        ///            function node given by key\n        /// @param[in] f Pointer to function of type T that takes coordT\n        ///            arguments. This is the externally provided function and\n        ///            the right argument of gaxpy.\n        /// @param[in] alpha prefactor of c Tensor for gaxpy\n        /// @param[in] beta prefactor of fcoeffs for gaxpy\n        /// @return Returns coefficient tensor of the gaxpy product at specified\n        ///         key, no guarantee of accuracy.\n        template <typename L>\n        tensorT gaxpy_ext_node(keyT key, Tensor<L> lc, T (*f)(const coordT&), T alpha, T beta) const {\n            // Compute the value of external function at the quadrature points.\n            tensorT fvals = madness::fcube(key, f, cdata.quad_x);\n            // Convert quadrature point values to scaling coefficients.\n            tensorT fcoeffs = values2coeffs(key, fvals);\n            // Return the inner product of the two functions' scaling coeffs.\n            tensorT c2 = copy(lc);\n            c2.gaxpy(alpha, fcoeffs, beta);\n            return c2;\n        }\n\n        /// Return out of place gaxpy using recursive descent.\n        /// @param[in] key Key of the function node on which to compute gaxpy\n        /// @param[in] left FunctionImpl, left argument of gaxpy\n        /// @param[in] lcin coefficients of left at this node\n        /// @param[in] c coefficients of gaxpy product at this node\n        /// @param[in] f pointer to function of type T that takes coordT\n        ///            arguments. This is the externally provided function and\n        ///            the right argument of gaxpy.\n        /// @param[in] alpha prefactor of left argument for gaxpy\n        /// @param[in] beta prefactor of right argument for gaxpy\n        /// @param[in] tol convergence tolerance...when the norm of the gaxpy's\n        ///            difference coefficients is less than tol, we are done.\n        template <typename L>\n        void gaxpy_ext_recursive(const keyT& key, const FunctionImpl<L,NDIM>* left,\n                                 Tensor<L> lcin, tensorT c, T (*f)(const coordT&),\n                                 T alpha, T beta, double tol, bool below_leaf) {\n            typedef typename FunctionImpl<L,NDIM>::dcT::const_iterator literT;\n\n            // If we haven't yet reached the leaf level, check whether the\n            // current key is a leaf node of left. If so, set below_leaf to true\n            // and continue. If not, make this a parent, recur down, return.\n            if (not below_leaf) {\n                bool left_leaf = left->coeffs.find(key).get()->second.is_leaf();\n                if (left_leaf) {\n                    below_leaf = true;\n                } else {\n                    this->coeffs.replace(key, nodeT(coeffT(), true));\n                    for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                        const keyT& child = it.key();\n                        woT::task(left->coeffs.owner(child), &implT:: template gaxpy_ext_recursive<L>,\n                                  child, left, Tensor<L>(), tensorT(), f, alpha, beta, tol, below_leaf);\n                    }\n                    return;\n                }\n            }\n\n            // Compute left's coefficients if not provided\n            Tensor<L> lc = lcin;\n            if (lc.size() == 0) {\n                literT it = left->coeffs.find(key).get();\n                MADNESS_ASSERT(it != left->coeffs.end());\n                if (it->second.has_coeff())\n                    lc = it->second.coeff().reconstruct_tensor();\n            }\n\n            // Compute this node's coefficients if not provided in function call\n            if (c.size() == 0) {\n                c = gaxpy_ext_node(key, lc, f, alpha, beta);\n            }\n\n            // We need the scaling coefficients of the numerical function at\n            // each of the children nodes. We can't use project because there\n            // is no guarantee that the numerical function will have a functor.\n            // Instead, since we know we are at or below the leaf nodes, the\n            // wavelet coefficients are zero (to within the truncate tolerance).\n            // Thus, we can use unfilter() to get the scaling coefficients at\n            // the next level.\n            Tensor<L> lc_child = Tensor<L>(cdata.v2k); // left's child coeffs\n            Tensor<L> ld = Tensor<L>(cdata.v2k);\n            ld = L(0);\n            ld(cdata.s0) = copy(lc);\n            lc_child = unfilter(ld);\n\n            // Iterate over children of this node,\n            // storing the gaxpy coeffs in c_child\n            tensorT c_child = tensorT(cdata.v2k); // tensor of child coeffs\n            for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                const keyT& child = it.key();\n                tensorT lcoeff = tensorT(lc_child(child_patch(child)));\n                c_child(child_patch(child)) = gaxpy_ext_node(child, lcoeff, f, alpha, beta);\n            }\n\n            // Compute the difference coefficients to test for convergence.\n            tensorT d = tensorT(cdata.v2k);\n            d = filter(c_child);\n            // Filter returns both s and d coefficients, so set scaling\n            // coefficient part of d to 0 so that we take only the\n            // norm of the difference coefficients.\n            d(cdata.s0) = T(0);\n            double dnorm = d.normf();\n\n            // Small d.normf means we've reached a good level of resolution\n            // Store the coefficients and return.\n            if (dnorm <= truncate_tol(tol,key)) {\n                this->coeffs.replace(key, nodeT(coeffT(c,targs), false));\n            } else {\n                // Otherwise, make this a parent node and recur down\n                this->coeffs.replace(key, nodeT(coeffT(), true)); // Interior node\n\n                for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                    const keyT& child = it.key();\n                    tensorT child_coeff = tensorT(c_child(child_patch(child)));\n                    tensorT left_coeff = tensorT(lc_child(child_patch(child)));\n                    woT::task(left->coeffs.owner(child), &implT:: template gaxpy_ext_recursive<L>,\n                              child, left, left_coeff, child_coeff, f, alpha, beta, tol, below_leaf);\n                }\n            }\n        }\n\n        template <typename L>\n        void gaxpy_ext(const FunctionImpl<L,NDIM>* left, T (*f)(const coordT&), T alpha, T beta, double tol, bool fence) {\n            if (world.rank() == coeffs.owner(cdata.key0))\n                gaxpy_ext_recursive<L> (cdata.key0, left, Tensor<L>(), tensorT(), f, alpha, beta, tol, false);\n            if (fence)\n                world.gop.fence();\n        }\n\n        /// project the low-dim function g on the hi-dim function f: result(x) = <this(x,y) | g(y)>\n\n        /// invoked by the hi-dim function, a function of NDIM+LDIM\n\n        /// Upon return, result matches this, with contributions on all scales\n        /// @param[in]  result  lo-dim function of NDIM-LDIM \\todo Should this be param[out]?\n        /// @param[in]  gimpl  \tlo-dim function of LDIM\n        /// @param[in]  dim over which dimensions to be integrated: 0..LDIM or LDIM..LDIM+NDIM-1\n        template<size_t LDIM>\n        void project_out(FunctionImpl<T,NDIM-LDIM>* result, const FunctionImpl<T,LDIM>* gimpl,\n                         const int dim, const bool fence) {\n\n            const keyT& key0=cdata.key0;\n\n            if (world.rank() == coeffs.owner(key0)) {\n\n                // coeff_op will accumulate the result\n                typedef project_out_op<LDIM> coeff_opT;\n                coeff_opT coeff_op(this,result,CoeffTracker<T,LDIM>(gimpl),dim);\n\n                // don't do anything on this -- coeff_op will accumulate into result\n                typedef noop<T,NDIM> apply_opT;\n                apply_opT apply_op;\n\n                woT::task(world.rank(), &implT:: template forward_traverse<coeff_opT,apply_opT>,\n                          coeff_op, apply_op, cdata.key0);\n\n            }\n            if (fence) world.gop.fence();\n\n        }\n\n\n        /// project the low-dim function g on the hi-dim function f: result(x) = <f(x,y) | g(y)>\n        template<size_t LDIM>\n        struct project_out_op {\n            bool randomize() const {return false;}\n\n            typedef project_out_op<LDIM> this_type;\n            typedef CoeffTracker<T,LDIM> ctL;\n            typedef FunctionImpl<T,NDIM-LDIM> implL1;\n            typedef std::pair<bool,coeffT> argT;\n\n            const implT* fimpl;\t\t///< the hi dim function f\n            mutable implL1* result;\t///< the low dim result function\n            ctL iag;\t\t\t\t///< the low dim function g\n            int dim;\t\t\t\t///< 0: project 0..LDIM-1, 1: project LDIM..NDIM-1\n\n            // ctor\n            project_out_op() = default;\n            project_out_op(const implT* fimpl, implL1* result, const ctL& iag, const int dim)\n                : fimpl(fimpl), result(result), iag(iag), dim(dim) {}\n            project_out_op(const project_out_op& other)\n                : fimpl(other.fimpl), result(other.result), iag(other.iag), dim(other.dim) {}\n\n\n            /// do the actual contraction\n            Future<argT> operator()(const Key<NDIM>& key) const {\n\n            \tKey<LDIM> key1,key2,dest;\n            \tkey.break_apart(key1,key2);\n\n            \t// make the right coefficients\n                coeffT gcoeff;\n                if (dim==0) {\n                    gcoeff=iag.get_impl()->parent_to_child(iag.coeff(),iag.key(),key1);\n                    dest=key2;\n                }\n                if (dim==1) {\n                    gcoeff=iag.get_impl()->parent_to_child(iag.coeff(),iag.key(),key2);\n                    dest=key1;\n                }\n\n                MADNESS_ASSERT(fimpl->get_coeffs().probe(key));\t\t// must be local!\n                const nodeT& fnode=fimpl->get_coeffs().find(key).get()->second;\n                const coeffT& fcoeff=fnode.coeff();\n\n                // fast return if possible\n                if (fcoeff.has_no_data() or gcoeff.has_no_data())\n                    return Future<argT> (argT(fnode.is_leaf(),coeffT()));;\n\n                MADNESS_CHECK(gcoeff.is_full_tensor());\n                tensorT final(result->cdata.vk);\n                const int k=fcoeff.dim(0);\n                const int k_ldim=std::pow(k,LDIM);\n                std::vector<long> shape(LDIM, k);\n\n                if (fcoeff.is_full_tensor()) {\n                    //  result_i = \\sum_j g_j f_ji\n                    const tensorT gtensor = gcoeff.full_tensor().reshape(k_ldim);\n                    const tensorT ftensor = fcoeff.full_tensor().reshape(k_ldim,k_ldim);\n                    final=inner(gtensor,ftensor,0,dim).reshape(shape);\n\n                } else if (fcoeff.is_svd_tensor()) {\n                    if (fcoeff.rank()>0) {\n\n                        //  result_i = \\sum_jr g_j a_rj w_r b_ri\n                        const int otherdim = (dim + 1) % 2;\n                        const tensorT gtensor = gcoeff.full_tensor().flat();\n                        const tensorT atensor = fcoeff.get_svdtensor().flat_vector(dim);  // a_rj\n                        const tensorT btensor = fcoeff.get_svdtensor().flat_vector(otherdim);\n                        const tensorT gatensor = inner(gtensor, atensor, 0, 1);              // ga_r\n                        tensorT weights = copy(fcoeff.get_svdtensor().weights_);\n                        weights.emul(gatensor); // ga_r * w_r\n                        // sum over all ranks of b, include new weights:\n                        // result_i = \\sum_r ga_r * w_r * b_ri\n                        for (int r = 0; r < fcoeff.rank(); ++r) final += weights(r) * btensor(r, _);\n                        final = final.reshape(shape);\n                    }\n\n                } else {\n                    MADNESS_EXCEPTION(\"unsupported tensor type in project_out_op\",1);\n                }\n\n                // accumulate the result\n                result->coeffs.task(dest, &FunctionNode<T,LDIM>::accumulate2, final, result->coeffs, dest, TaskAttributes::hipri());\n\n                return Future<argT> (argT(fnode.is_leaf(),coeffT()));\n            }\n\n            this_type make_child(const keyT& child) const {\n            \tKey<LDIM> key1,key2;\n            \tchild.break_apart(key1,key2);\n            \tconst Key<LDIM> gkey = (dim==0) ? key1 : key2;\n\n                return this_type(fimpl,result,iag.make_child(gkey),dim);\n            }\n\n            /// retrieve the coefficients (parent coeffs might be remote)\n            Future<this_type> activate() const {\n            \tFuture<ctL> g1=iag.activate();\n                return result->world.taskq.add(detail::wrap_mem_fn(*const_cast<this_type *> (this),\n                                               &this_type::forward_ctor),fimpl,result,g1,dim);\n            }\n\n            /// taskq-compatible ctor\n            this_type forward_ctor(const implT* fimpl1, implL1* result1, const ctL& iag1, const int dim1) {\n            \treturn this_type(fimpl1,result1,iag1,dim1);\n            }\n\n            template <typename Archive> void serialize(const Archive& ar) {\n                ar & result & iag & fimpl & dim;\n            }\n\n        };\n\n\n        /// project the low-dim function g on the hi-dim function f: this(x) = <f(x,y) | g(y)>\n\n        /// invoked by result, a function of NDIM\n\n        /// @param[in]  f   hi-dim function of LDIM+NDIM\n        /// @param[in]  g   lo-dim function of LDIM\n        /// @param[in]  dim over which dimensions to be integrated: 0..LDIM or LDIM..LDIM+NDIM-1\n        template<size_t LDIM>\n        void project_out2(const FunctionImpl<T,LDIM+NDIM>* f, const FunctionImpl<T,LDIM>* g, const int dim) {\n\n            typedef std::pair< keyT,coeffT > pairT;\n            typedef typename FunctionImpl<T,NDIM+LDIM>::dcT::const_iterator fiterator;\n\n            // loop over all nodes of hi-dim f, compute the inner products with all\n            // appropriate nodes of g, and accumulate in result\n            fiterator end = f->get_coeffs().end();\n            for (fiterator it=f->get_coeffs().begin(); it!=end; ++it) {\n                const Key<LDIM+NDIM> key=it->first;\n                const FunctionNode<T,LDIM+NDIM> fnode=it->second;\n                const coeffT& fcoeff=fnode.coeff();\n\n                if (fnode.is_leaf() and fcoeff.has_data()) {\n\n                    // break key into particle: over key1 will be summed, over key2 will be\n                    // accumulated, or vice versa, depending on dim\n                    if (dim==0) {\n                        Key<NDIM> key1;\n                        Key<LDIM> key2;\n                        key.break_apart(key1,key2);\n\n                        Future<pairT> result;\n                        //                        sock_it_to_me(key1, result.remote_ref(world));\n                        g->task(coeffs.owner(key1), &implT::sock_it_to_me, key1, result.remote_ref(world), TaskAttributes::hipri());\n                        woT::task(world.rank(),&implT:: template do_project_out<LDIM>,fcoeff,result,key1,key2,dim);\n\n                    } else if (dim==1) {\n                        Key<LDIM> key1;\n                        Key<NDIM> key2;\n                        key.break_apart(key1,key2);\n\n                        Future<pairT> result;\n                        //                        sock_it_to_me(key2, result.remote_ref(world));\n                        g->task(coeffs.owner(key2), &implT::sock_it_to_me, key2, result.remote_ref(world), TaskAttributes::hipri());\n                        woT::task(world.rank(),&implT:: template do_project_out<LDIM>,fcoeff,result,key2,key1,dim);\n\n                    } else {\n                        MADNESS_EXCEPTION(\"confused dim in project_out\",1);\n                    }\n                }\n            }\n            set_tree_state(redundant);\n//            this->compressed=false;\n//            this->nonstandard=false;\n//            this->redundant=true;\n        }\n\n\n        /// compute the inner product of two nodes of only some dimensions and accumulate on result\n\n        /// invoked by result\n        /// @param[in]  fcoeff  coefficients of high dimension LDIM+NDIM\n        /// @param[in]  gpair   key and coeffs of low dimension LDIM (possibly a parent node)\n        /// @param[in]  gkey    key of actual low dim node (possibly the same as gpair.first, iff gnode exists)\n        /// @param[in]  dest    destination node for the result\n        /// @param[in]  dim     which dimensions should be contracted: 0..LDIM-1 or LDIM..NDIM+LDIM-1\n        template<size_t LDIM>\n        void do_project_out(const coeffT& fcoeff, const std::pair<keyT,coeffT> gpair, const keyT& gkey,\n                            const Key<NDIM>& dest, const int dim) const {\n\n            const coeffT gcoeff=parent_to_child(gpair.second,gpair.first,gkey);\n\n            // fast return if possible\n            if (fcoeff.has_no_data() or gcoeff.has_no_data()) return;\n\n            // let's specialize for the time being on SVD tensors for f and full tensors of half dim for g\n            MADNESS_ASSERT(gcoeff.tensor_type()==TT_FULL);\n            MADNESS_ASSERT(fcoeff.tensor_type()==TT_2D);\n            const tensorT gtensor=gcoeff.full_tensor();\n            tensorT result(cdata.vk);\n\n            const int otherdim=(dim+1)%2;\n            const int k=fcoeff.dim(0);\n            std::vector<Slice> s(fcoeff.config().dim_per_vector()+1,_);\n\n            // do the actual contraction\n            for (int r=0; r<fcoeff.rank(); ++r) {\n                s[0]=Slice(r,r);\n                const tensorT contracted_tensor=fcoeff.config().ref_vector(dim)(s).reshape(k,k,k);\n                const tensorT other_tensor=fcoeff.config().ref_vector(otherdim)(s).reshape(k,k,k);\n                const double ovlp= gtensor.trace_conj(contracted_tensor);\n                const double fac=ovlp * fcoeff.config().weights(r);\n                result+=fac*other_tensor;\n            }\n\n            // accumulate the result\n            coeffs.task(dest, &nodeT::accumulate2, result, coeffs, dest, TaskAttributes::hipri());\n        }\n\n\n\n\n        /// Returns the maximum local depth of the tree ... no communications.\n        std::size_t max_local_depth() const;\n\n\n        /// Returns the maximum depth of the tree ... collective ... global sum/broadcast\n        std::size_t max_depth() const;\n\n        /// Returns the max number of nodes on a processor\n        std::size_t max_nodes() const;\n\n        /// Returns the min number of nodes on a processor\n        std::size_t min_nodes() const;\n\n        /// Returns the size of the tree structure of the function ... collective global sum\n        std::size_t tree_size() const;\n\n        /// Returns the number of coefficients in the function for each rank\n        std::size_t size_local() const;\n\n        /// Returns the number of coefficients in the function ... collective global sum\n        std::size_t size() const;\n\n        /// Returns the number of coefficients in the function for this MPI rank\n        std::size_t nCoeff_local() const;\n\n        /// Returns the number of coefficients in the function ... collective global sum\n        std::size_t nCoeff() const;\n\n        /// Returns the number of coefficients in the function ... collective global sum\n        std::size_t real_size() const;\n\n        /// print tree size and size\n        void print_size(const std::string name) const;\n\n        /// print the number of configurations per node\n        void print_stats() const;\n\n        /// In-place scale by a constant\n        void scale_inplace(const T q, bool fence);\n\n        /// Out-of-place scale by a constant\n        template <typename Q, typename F>\n        void scale_oop(const Q q, const FunctionImpl<F,NDIM>& f, bool fence) {\n            typedef typename FunctionImpl<F,NDIM>::nodeT fnodeT;\n            typedef typename FunctionImpl<F,NDIM>::dcT fdcT;\n            typename fdcT::const_iterator end = f.coeffs.end();\n            for (typename fdcT::const_iterator it=f.coeffs.begin(); it!=end; ++it) {\n                const keyT& key = it->first;\n                const fnodeT& node = it->second;\n\n                if (node.has_coeff()) {\n                    coeffs.replace(key,nodeT(node.coeff()*q,node.has_children()));\n                }\n                else {\n                    coeffs.replace(key,nodeT(coeffT(),node.has_children()));\n                }\n            }\n            if (fence)\n                world.gop.fence();\n        }\n\n        /// Hash a pointer to \\c FunctionImpl\n\n        /// \\param[in] impl pointer to a FunctionImpl\n        /// \\return The hash.\n        inline friend hashT hash_value(const FunctionImpl<T,NDIM>* pimpl) {\n            hashT seed = hash_value(pimpl->id().get_world_id());\n            detail::combine_hash(seed, hash_value(pimpl->id().get_obj_id()));\n            return seed;\n        }\n\n        /// Hash a shared_ptr to \\c FunctionImpl\n\n        /// \\param[in] impl pointer to a FunctionImpl\n        /// \\return The hash.\n        inline friend hashT hash_value(const std::shared_ptr<FunctionImpl<T,NDIM>> impl) {\n            return hash_value(impl.get());\n        }\n    };\n\n    namespace archive {\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveLoadImpl<Archive,const FunctionImpl<T,NDIM>*> {\n            static void load(const Archive& ar, const FunctionImpl<T,NDIM>*& ptr) {\n                bool exists=false;\n                ar & exists;\n                if (exists) {\n                    uniqueidT id;\n                    ar & id;\n                    World* world = World::world_from_id(id.get_world_id());\n                    MADNESS_ASSERT(world);\n                    auto ptr_opt = world->ptr_from_id< WorldObject< FunctionImpl<T,NDIM> > >(id);\n                    if (!ptr_opt)\n                      MADNESS_EXCEPTION(\"FunctionImpl: remote operation attempting to use a locally uninitialized object\",0);\n                    ptr = static_cast< const FunctionImpl<T,NDIM>*>(*ptr_opt);\n                    if (!ptr)\n                        MADNESS_EXCEPTION(\"FunctionImpl: remote operation attempting to use an unregistered object\",0);\n                } else {\n                    ptr=nullptr;\n                }\n            }\n        };\n\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveStoreImpl<Archive,const FunctionImpl<T,NDIM>*> {\n            static void store(const Archive& ar, const FunctionImpl<T,NDIM>*const& ptr) {\n                bool exists=(ptr) ? true : false;\n                ar & exists;\n                if (exists) ar & ptr->id();\n            }\n        };\n\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveLoadImpl<Archive, FunctionImpl<T,NDIM>*> {\n            static void load(const Archive& ar, FunctionImpl<T,NDIM>*& ptr) {\n                bool exists=false;\n                ar & exists;\n                if (exists) {\n                    uniqueidT id;\n                    ar & id;\n                    World* world = World::world_from_id(id.get_world_id());\n                    MADNESS_ASSERT(world);\n                    auto ptr_opt = world->ptr_from_id< WorldObject< FunctionImpl<T,NDIM> > >(id);\n                    if (!ptr_opt)\n                        MADNESS_EXCEPTION(\"FunctionImpl: remote operation attempting to use a locally uninitialized object\",0);\n                    ptr = static_cast< FunctionImpl<T,NDIM>*>(*ptr_opt);\n                    if (!ptr) {\n                        auto ids=world->get_object_ids();\n                        print(world->get_world_ids());\n                        MADNESS_EXCEPTION(\"FunctionImpl: remote operation attempting to use an unregistered object\",0);\n                    }\n                } else {\n                    ptr=nullptr;\n                }\n            }\n        };\n\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveStoreImpl<Archive, FunctionImpl<T,NDIM>*> {\n            static void store(const Archive& ar, FunctionImpl<T,NDIM>*const& ptr) {\n                bool exists=(ptr) ? true : false;\n                ar & exists;\n                if (exists) ar & ptr->id();\n                //                ar & ptr->id();\n            }\n        };\n\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveLoadImpl<Archive, std::shared_ptr<const FunctionImpl<T,NDIM> > > {\n            static void load(const Archive& ar, std::shared_ptr<const FunctionImpl<T,NDIM> >& ptr) {\n                const FunctionImpl<T,NDIM>* f = nullptr;\n                ArchiveLoadImpl<Archive, const FunctionImpl<T,NDIM>*>::load(ar, f);\n                ptr.reset(f, [] (const FunctionImpl<T,NDIM> *p_) -> void {});\n            }\n        };\n\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveStoreImpl<Archive, std::shared_ptr<const FunctionImpl<T,NDIM> > > {\n            static void store(const Archive& ar, const std::shared_ptr<const FunctionImpl<T,NDIM> >& ptr) {\n                ArchiveStoreImpl<Archive, const FunctionImpl<T,NDIM>*>::store(ar, ptr.get());\n            }\n        };\n\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveLoadImpl<Archive, std::shared_ptr<FunctionImpl<T,NDIM> > > {\n            static void load(const Archive& ar, std::shared_ptr<FunctionImpl<T,NDIM> >& ptr) {\n                FunctionImpl<T,NDIM>* f = nullptr;\n                ArchiveLoadImpl<Archive, FunctionImpl<T,NDIM>*>::load(ar, f);\n                ptr.reset(f, [] (FunctionImpl<T,NDIM> *p_) -> void {});\n            }\n        };\n\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveStoreImpl<Archive, std::shared_ptr<FunctionImpl<T,NDIM> > > {\n            static void store(const Archive& ar, const std::shared_ptr<FunctionImpl<T,NDIM> >& ptr) {\n                ArchiveStoreImpl<Archive, FunctionImpl<T,NDIM>*>::store(ar, ptr.get());\n            }\n        };\n    }\n\n}\n\n#endif // MADNESS_MRA_FUNCIMPL_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/funcplot.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MRA_FUNCPLOT_H__INCLUDED\n#define MADNESS_MRA_FUNCPLOT_H__INCLUDED\n\n#include <madness/constants.h>\n#include \"QCCalculationParametersBase.h\"\n/*!\n\n  \\file mra/funcplot.h\n  \\brief Defines/implements plotting interface for functions\n  \\ingroup funcplot\n\n  @{\n */\n\nnamespace madness {\n\n    struct PlotParameters : public QCCalculationParametersBase {\n        PlotParameters(World& world, const commandlineparser parser=commandlineparser(), const std::string tag=\"plot\") : PlotParameters() {\n            read_input_and_commandline_options(world,parser,tag);\n        }\n\n        PlotParameters() : QCCalculationParametersBase() {\n\n            // initialize with: key, value, comment (optional), allowed values (optional)\n            initialize<double>(\"zoom\",2,\"zoom into the simulation cell\");\n            initialize<long>(\"npoints\",151,\"number of plot points per dimension\");\n            initialize<std::vector<double>>(\"origin\",{},\"origin of the plot\");\n            initialize<std::vector<std::string>>(\"plane\",{\"x1\",\"x2\"},\"plot plane: x1, x2, .., x6\");\n        }\n        std::string get_tag() const override {\n            return std::string(\"plot\");\n        }\n\n\n        PlotParameters& set_zoom(const double z) {\n            set_user_defined_value(\"zoom\",z);\n            return *this;\n        }\n        PlotParameters& set_npoints(const long n) {\n            set_user_defined_value(\"npoints\",n);\n            return *this;\n        }\n        PlotParameters& set_plane(const std::vector<std::string> plane) {\n            set_user_defined_value(\"plane\",plane);\n            return *this;\n        }\n        PlotParameters& set_origin(const std::vector<double> origin) {\n            set_user_defined_value(\"origin\",origin);\n            return *this;\n        }\n\n\n        double zoom() const {return get<double>(\"zoom\");}\n        long npoints() const {return get<long>(\"npoints\");}\n\n        template<std::size_t NDIM>\n        Vector<double,NDIM> origin() const {\n            auto origin_vec=get<std::vector<double>>(\"origin\");\n            // fill in zeros if the default origin has fewer dimensions than the actual origin\n            int missing=NDIM-origin_vec.size();\n            for (auto i=0; i<missing; ++i) origin_vec.push_back(0.0);\n            Vector<double,NDIM> o(origin_vec);\n            return o;\n        }\n\n        std::vector<std::string> plane() const {return get<std::vector<std::string>>(\"plane\");}\n\n\n    };\n    /// Writes an OpenDX format file with a cube/slice of points on a uniform grid\n\n    /// Collective operation but only process 0 writes the file.  By convention OpenDX\n    /// files end in \".dx\" but this choice is up to the user.  The binary format is\n    /// more compact and vastly faster to both write and load but is not as portable.\n    ///\n    /// Now follow some brief tips about how to look at files inside OpenDX.\n    ///\n    /// To view a 1D function \\c file-selector-->import-->plot-->image.\n    ///\n    /// To view a 2D function as a colored plane \\c file-selector-->import-->autocolor-->image.\n    ///\n    /// To view a 2D function as a 3D surface \\c file-selector-->import-->rubbersheet-->image.\n    ///\n    /// To view a 3D function as an isosurface \\c file-selector-->import-->isosurface-->image.\n    ///\n    /// To select the real/imaginary/absolute value of a complex number insert a compute\n    /// element after the import.\n    template <typename T, std::size_t NDIM>\n    void plotdx(const Function<T,NDIM>& f,\n                const char* filename,\n                const Tensor<double>& cell = FunctionDefaults<NDIM>::get_cell(),\n                const std::vector<long>& npt = std::vector<long>(NDIM,201L),\n                bool binary=true);\n\n\n    /// Writes the header information of a VTK file for plotting in an external\n    /// post-processing package (such as Paraview)\n    //\n    /// @param world World communicator\n    /// @param filename String containing the filename to export to\n    /// @param plotlo Vector of double values indicating the minimum coordinate to plot to in each dimension\n    /// @param plothi Vector of double values indicating the maximum coordinate to plot to in each dimension\n    /// @param npt Vector of long integers indicating the number of points to plot in each dimension\n    /// @param binary (optional) Boolean indicating whether to print in binary\n\n    /// The VTK routines are also designed for SERIAL data, parallel coming...\n    ///\n    /// This header is templated by the dimension of the data.\n    ///\n    /// To plot with the plotvtk_* routines:\n    ///    plotvtk_begin(...)\n    ///    plotvtk_data(...)\n    ///    plotvtk_data(...) ...\n    ///    plotvtk_end(...)\n    ///\n    /// NOTE: Paraview expects the structured mesh points in a particular\n    /// order, which is why the LowDimIndexIterator is used...\n    template<std::size_t NDIM>\n    void plotvtk_begin(World &world, const char *filename,\n        const Vector<double, NDIM> &plotlo, const Vector<double, NDIM> &plothi,\n        const Vector<long, NDIM> &npt, bool binary = false) {\n\n        PROFILE_FUNC;\n        MADNESS_ASSERT(NDIM>=1 && NDIM<=3); // how do we plot data in more than 3-D?\n\n        Tensor<double> cell(NDIM, 2);\n        std::size_t i;\n        for(i = 0; i < NDIM; ++i) {\n            cell(i, 0) = plotlo[i];\n            cell(i, 1) = plothi[i];\n        }\n\n        FILE *f=0;\n        if(world.rank() == 0) {\n            f = fopen(filename, \"w\");\n            if(!f)\n                MADNESS_EXCEPTION(\"plotvtk: failed to open the plot file\", 0);\n\n            fprintf(f, \"<VTKFile type=\\\"StructuredGrid\\\" version=\\\"0.1\\\"\" \\\n                \" byte_order=\\\"LittleEndian\\\" compressor=\\\"\" \\\n                \"vtkZLibDataCompressor\\\">\\n\");\n            fprintf(f, \"  <StructuredGrid WholeExtent=\\\"\");\n            for(i = 0; i < NDIM; ++i)\n                fprintf(f, \"0 %ld \", npt[i]-1);\n            for(; i < 3; ++i)\n                fprintf(f, \"0 0 \");\n            fprintf(f, \"\\\">\\n\");\n            fprintf(f, \"    <Piece Extent=\\\"\");\n            for(i = 0; i < NDIM; ++i)\n                fprintf(f, \"0 %ld \", npt[i]-1);\n            for(; i < 3; ++i)\n                fprintf(f, \"0 0 \");\n            fprintf(f, \"\\\">\\n\");\n            fprintf(f, \"      <Points>\\n\");\n            fprintf(f, \"        <DataArray NumberOfComponents=\\\"3\\\" \" \\\n                \"type=\\\"Float32\\\" format=\\\"ascii\\\">\\n\");\n\n            Vector<double, NDIM> space;\n            for(i = 0; i < NDIM; ++i) {\n                if(npt[i] == 1)\n                    space[i] = 0.0;\n                else\n                    space[i] = (cell(i, 1) - cell(i, 0)) / (npt[i] - 1);\n            }\n\n            // go through the grid\n            for(LowDimIndexIterator it(npt); it; ++it) {\n                for(i = 0; i < NDIM; ++i)\n                    fprintf(f, \"%f \", plotlo[i] + it[i]*space[i]);\n                for(; i < 3; ++i)\n                    fprintf(f, \"0.0 \");\n                fprintf(f, \"\\n\");\n            }\n\n            fprintf(f, \"        </DataArray>\\n\");\n            fprintf(f, \"      </Points>\\n\");\n            fprintf(f, \"      <PointData>\\n\");\n            fclose(f);\n        }\n        world.gop.fence();\n    }\n\n    /// Generic VTK data writer. Specific type instances of this function are defined for\n    /// both real and complex valued functions.\n    //\n    /// @param function Function (real or complex) that we wish to export the data of\n    /// @param fieldname A string containing the name we wish to refer to this field as in the exported data\n    /// @param world World communicator\n    /// @param filename String containing the filename to export to\n    /// @param plotlo Vector of double values indicating the minimum coordinate to plot to in each dimension\n    /// @param plothi Vector of double values indicating the maximum coordinate to plot to in each dimension\n    /// @param npt Vector of long integers indicating the number of points to plot in each dimension\n    /// @param binary (optional) Boolean indicating whether to print in binary\n\n    /// This templated function won't do anything except print a warning\n    /// message.  Specialized versions of this function should be used.\n    template<typename T, std::size_t NDIM>\n    void plotvtk_data(const T &function, const char *fieldname, World &world,\n        const char *filename, const Vector<double, NDIM> &plotlo,\n        const Vector<double, NDIM> &plothi, const Vector<long, NDIM> &npt,\n        bool binary = false) {\n\n        MADNESS_EXCEPTION(\"plotvtk only supports madness::functions\", 0);\n    }\n\n    /// VTK data writer for real-valued (not complex) madness::functions.\n\n    /// Set plot_refine=true to get a plot of the refinement levels of\n    /// the given function.\n    template<typename T, std::size_t NDIM>\n    void plotvtk_data(const Function<T, NDIM> &function, const char *fieldname,\n        World &world, const char *filename, const Vector<double, NDIM> &plotlo,\n        const Vector<double, NDIM> &plothi, const Vector<long, NDIM> &npt,\n        bool binary = false, bool plot_refine = false) {\n\n        PROFILE_FUNC;\n        MADNESS_ASSERT(NDIM>=1 && NDIM<=3); // no plotting high-D functions, yet...\n\n        Tensor<double> cell(NDIM, 2);\n        std::size_t i;\n        for(i = 0; i < NDIM; ++i) {\n            cell(i, 0) = plotlo[i];\n            cell(i, 1) = plothi[i];\n        }\n        std::vector<long> numpt(NDIM);\n        for(i = 0; i < NDIM; ++i)\n            numpt[i] = npt[i];\n\n        world.gop.barrier();\n\n        function.verify();\n        FILE *f = 0;\n        if(world.rank() == 0) {\n            f = fopen(filename, \"a\");\n            if(!f)\n                MADNESS_EXCEPTION(\"plotvtk: failed to open the plot file\", 0);\n\n            fprintf(f, \"        <DataArray Name=\\\"%s\\\" format=\\\"ascii\\\" \" \\\n                \"type=\\\"Float32\\\" NumberOfComponents=\\\"1\\\">\\n\", fieldname);\n        }\n\n        world.gop.fence();\n        Tensor<T> tmpr = function.eval_cube(cell, numpt, plot_refine);\n        world.gop.fence();\n\n        if(world.rank() == 0) {\n            for(LowDimIndexIterator it(numpt); it; ++it) {\n                fprintf(f, \"%.6e\\n\", tmpr(*it));\n            }\n            fprintf(f, \"        </DataArray>\\n\");\n            fclose(f);\n        }\n        world.gop.fence();\n    }\n\n    /// VTK data writer for complex-valued madness::functions.\n\n    /// The complex-value is written as two reals (a vector from VTK's\n    /// perspective.  The first (X) component is the real part and the second\n    /// (Y) component is the imaginary part.\n    /// Set plot_refine=true to get a plot of the refinement levels of\n    /// the given function.\n    template<typename T, std::size_t NDIM>\n    void plotvtk_data(const Function<std::complex<T>, NDIM> &function,\n        const char *fieldname, World &world, const char *filename,\n        const Vector<double, NDIM> &plotlo, const Vector<double, NDIM> &plothi,\n        const Vector<long, NDIM> &npt, bool binary = false,\n        bool plot_refine = false) {\n\n        // this is the same as plotvtk_data for real functions, except the\n        // real and imaginary parts are printed on the same line (needed\n        // to change NumberOfComponents in the XML tag)\n\n        PROFILE_FUNC;\n        MADNESS_ASSERT(NDIM>=1 && NDIM<=3); // no plotting high-D functions, yet...\n\n        Tensor<double> cell(NDIM, 2);\n        std::size_t i;\n        for(i = 0; i < NDIM; ++i) {\n            cell(i, 0) = plotlo[i];\n            cell(i, 1) = plothi[i];\n        }\n        std::vector<long> numpt(NDIM);\n        for(i = 0; i < NDIM; ++i)\n            numpt[i] = npt[i];\n\n        world.gop.barrier();\n\n        function.verify();\n        FILE *f = 0;\n        if(world.rank() == 0) {\n            f = fopen(filename, \"a\");\n            if(!f)\n                MADNESS_EXCEPTION(\"plotvtk: failed to open the plot file\", 0);\n\n            fprintf(f, \"        <DataArray Name=\\\"%s\\\" format=\\\"ascii\\\" \" \\\n                \"type=\\\"Float32\\\" NumberOfComponents=\\\"2\\\">\\n\", fieldname);\n        }\n\n        world.gop.fence();\n        Tensor<std::complex<T> > tmpr = function.eval_cube(cell, numpt,\n                                                           plot_refine);\n        world.gop.fence();\n\n        if(world.rank() == 0) {\n            for(LowDimIndexIterator it(numpt); it; ++it) {\n                fprintf(f, \"%.6e %.6e\\n\", real(tmpr(*it)), imag(tmpr(*it)));\n            }\n            fprintf(f, \"        </DataArray>\\n\");\n            fclose(f);\n        }\n        world.gop.fence();\n    }\n\n    /// Writes the footer information of a VTK file for plotting in an external\n    /// post-processing package (such as Paraview)\n    //\n    /// @param world World communicator\n    /// @param filename Name of VTK file\n    /// @param binary (Optional) Boolean indicating whether to print in binary\n    template<std::size_t NDIM>\n    void plotvtk_end(World &world, const char *filename, bool binary = false) {\n        PROFILE_FUNC;\n        MADNESS_ASSERT(NDIM>=1 && NDIM<=3);\n\n        FILE *f = 0;\n        if(world.rank() == 0) {\n            f = fopen(filename, \"a\");\n            if(!f)\n                MADNESS_EXCEPTION(\"plotvtk: failed to open the plot file\", 0);\n\n            fprintf(f, \"      </PointData>\\n\");\n            fprintf(f, \"      <CellData>\\n\");\n            fprintf(f, \"      </CellData>\\n\");\n            fprintf(f, \"    </Piece>\\n\");\n            fprintf(f, \"  </StructuredGrid>\\n\");\n            fprintf(f, \"</VTKFile>\\n\");\n            fclose(f);\n        }\n        world.gop.fence();\n    }\n\n    namespace detail {\n        inline unsigned short htons_x(unsigned short a) {\n            return (a>>8) | (a<<8);\n        }\n    }\n\n    /// Writes a Povray DF3 format file with a cube of points on a uniform grid\n\n    /// Collective operation but only process 0 writes the file.  By convention Povray\n    /// files end in \".df3\" but this choice is up to the user.  The dynamic range of\n    /// function values is mapped onto [0,1] and values stored in 16-bit fixed precision.\n    template <typename T>\n    static void plotpovray(const Function<T,3>& function,\n                           const char* filename,\n                           const Tensor<double>& cell = FunctionDefaults<3>::get_cell(),\n                           const std::vector<long>& npt = std::vector<long>(3,201L))\n    {\n        using detail::htons_x;\n\n        MADNESS_ASSERT(npt.size() == 3);\n        unsigned short dims[3] = {htons_x(npt[0]),htons_x(npt[1]),htons_x(npt[2])};\n\n        World& world = const_cast< Function<T,3>& >(function).world();\n        FILE *f=0;\n        if (world.rank() == 0) {\n            f = fopen(filename, \"w\");\n            if (!f) MADNESS_EXCEPTION(\"plotdx: failed to open the plot file\", 0);\n            fwrite((void*) dims, sizeof(short), 3, f);\n        }\n        Tensor<T> r = function.eval_cube(cell, npt);\n        if (world.rank() == 0) {\n            double rmax = r.max();\n            double rmin = r.min();\n            double rrange = rmax + rmin;\n            double rmean = rrange*0.5;\n            double fac = 65535.0/rrange;\n\n            printf(\"plot_povray: %s: min=%.2e(0.0) mean=%.2e(0.5) max=%.2e(1.0) range=%.2e\\n\",\n                   filename,rmin,rmean,rmax,rrange);\n\n            std::vector<unsigned short> d(npt[0]);\n            for (unsigned int i2=0; i2<npt[2]; ++i2) {\n                for (unsigned int i1=0; i1<npt[1]; ++i1) {\n                    for (unsigned int i0=0; i0<npt[0]; ++i0) {\n                        d[i0] = (unsigned short)(htons_x((unsigned short)(fac*(r(i0,i1,i2) - rmin))));\n                        //printf(\"%d\\n\",htons_x(d[i0]));\n                    }\n                    fwrite((void*) &d[0], sizeof(short), npt[0], f);\n                }\n            }\n\n            fclose(f);\n        }\n    }\n\n    static inline void plot_line_print_value(FILE* f, double_complex v) {\n        fprintf(f, \"    %.14e %.14e   \", real(v), imag(v));\n    }\n\n    static inline void plot_line_print_value(FILE* f, double v) {\n        fprintf(f, \" %.14e\", v);\n    }\n\n\n    /// Generates ASCII file tabulating f(r) at npoints along line r=lo,...,hi\n\n    /// The ordinate is distance from lo\n    template <typename opT, std::size_t NDIM>\n    void plot_line(World& world, const char* filename, int npt, const Vector<double,NDIM>& lo,\n            const Vector<double,NDIM>& hi, const opT& op) {\n        typedef Vector<double,NDIM> coordT;\n        coordT h = (hi - lo)*(1.0/(npt-1));\n\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) sum += h[i]*h[i];\n        sum = sqrt(sum);\n\n        if (world.rank() == 0) {\n            FILE* file = fopen(filename,\"w\");\n        if(!file)\n          MADNESS_EXCEPTION(\"plot_line: failed to open the plot file\", 0);\n            for (int i=0; i<npt; ++i) {\n                coordT r = lo + h*double(i);\n                fprintf(file, \"%.14e \", i*sum);\n                plot_line_print_value(file, op(r));\n                fprintf(file,\"\\n\");\n            }\n            fclose(file);\n        }\n        world.gop.fence();\n    }\n\n\n    /// Generates ASCII file tabulating f(r) at npoints along line r=lo,...,hi\n\n    /// The ordinate is distance from lo\n    template <typename T, std::size_t NDIM>\n    void plot_line(const char* filename, int npt, const Vector<double,NDIM>& lo, const Vector<double,NDIM>& hi,\n                   const Function<T,NDIM>& f) {\n        typedef Vector<double,NDIM> coordT;\n        coordT h = (hi - lo)*(1.0/(npt-1));\n\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) sum += h[i]*h[i];\n        sum = sqrt(sum);\n\n        World& world = f.world();\n        f.reconstruct();\n        if (world.rank() == 0) {\n            FILE* file = fopen(filename,\"w\");\n\t    if(!file)\n\t      MADNESS_EXCEPTION(\"plot_line: failed to open the plot file\", 0);\n            for (int i=0; i<npt; ++i) {\n                coordT r = lo + h*double(i);\n                fprintf(file, \"%.14e \", i*sum);\n                plot_line_print_value(file, f.eval(r));\n                fprintf(file,\"\\n\");\n            }\n            fclose(file);\n        }\n        world.gop.fence();\n    }\n\n    /// Generates ASCII file tabulating f(r) and g(r) at npoints along line r=lo,...,hi\n\n    /// The ordinate is distance from lo\n    template <typename T, typename U, std::size_t NDIM>\n    void plot_line(const char* filename, int npt, const Vector<double,NDIM>& lo, const Vector<double,NDIM>& hi,\n                   const Function<T,NDIM>& f, const Function<U,NDIM>& g) {\n        typedef Vector<double,NDIM> coordT;\n        coordT h = (hi - lo)*(1.0/(npt-1));\n\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) sum += h[i]*h[i];\n        sum = sqrt(sum);\n\n        World& world = f.world();\n        f.reconstruct();\n        g.reconstruct();\n        if (world.rank() == 0) {\n            FILE* file = fopen(filename,\"w\");\n\t    if(!file)\n\t      MADNESS_EXCEPTION(\"plot_line: failed to open the plot file\", 0);\n            for (int i=0; i<npt; ++i) {\n                coordT r = lo + h*double(i);\n                fprintf(file, \"%.14e \", i*sum);\n                plot_line_print_value(file, f.eval(r));\n                plot_line_print_value(file, g.eval(r));\n                fprintf(file,\"\\n\");\n            }\n            fclose(file);\n        }\n        world.gop.fence();\n    }\n\n\n    /// Generates ASCII file tabulating f(r), g(r), and a(r) at npoints along line r=lo,...,hi\n\n    /// The ordinate is distance from lo\n    template <typename T, typename U, typename V, std::size_t NDIM>\n    void plot_line(const char* filename, int npt, const Vector<double,NDIM>& lo, const Vector<double,NDIM>& hi,\n                   const Function<T,NDIM>& f, const Function<U,NDIM>& g, const Function<V,NDIM>& a) {\n        typedef Vector<double,NDIM> coordT;\n        coordT h = (hi - lo)*(1.0/(npt-1));\n\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) sum += h[i]*h[i];\n        sum = sqrt(sum);\n\n        World& world = f.world();\n        f.reconstruct();\n        g.reconstruct();\n        a.reconstruct();\n        if (world.rank() == 0) {\n            FILE* file = fopen(filename,\"w\");\n\t    if(!file)\n\t      MADNESS_EXCEPTION(\"plot_line: failed to open the plot file\", 0);\n            for (int i=0; i<npt; ++i) {\n                coordT r = lo + h*double(i);\n                fprintf(file, \"%.14e \", i*sum);\n                plot_line_print_value(file, f.eval(r));\n                plot_line_print_value(file, g.eval(r));\n                plot_line_print_value(file, a.eval(r));\n                fprintf(file,\"\\n\");\n            }\n            fclose(file);\n        }\n        world.gop.fence();\n    }\n\n    /// Generates ASCII file tabulating f(r), g(r), a(r), b(r) at npoints along line r=lo,...,hi\n\n    /// The ordinate is distance from lo\n    template <typename T, typename U, typename V, typename W, std::size_t NDIM>\n    void plot_line(const char* filename, int npt, const Vector<double,NDIM>& lo, const Vector<double,NDIM>& hi,\n                   const Function<T,NDIM>& f, const Function<U,NDIM>& g, const Function<V,NDIM>& a, const Function<W,NDIM>& b) {\n        typedef Vector<double,NDIM> coordT;\n        coordT h = (hi - lo)*(1.0/(npt-1));\n\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) sum += h[i]*h[i];\n        sum = sqrt(sum);\n\n        World& world = f.world();\n        f.reconstruct();\n        g.reconstruct();\n        a.reconstruct();\n        b.reconstruct();\n        if (world.rank() == 0) {\n            FILE* file = fopen(filename,\"w\");\n            for (int i=0; i<npt; ++i) {\n                coordT r = lo + h*double(i);\n                fprintf(file, \"%.14e \", i*sum);\n                plot_line_print_value(file, f.eval(r));\n                plot_line_print_value(file, g.eval(r));\n                plot_line_print_value(file, a.eval(r));\n                plot_line_print_value(file, b.eval(r));\n                fprintf(file,\"\\n\");\n            }\n            fclose(file);\n        }\n        world.gop.fence();\n    }\n    /// The ordinate is distance from lo\n    template <typename T, std::size_t NDIM>\n    void plot_line(const char* filename, int npt, const Vector<double,NDIM>& lo, const Vector<double,NDIM>& hi,\n                   const std::vector<Function<T,NDIM>>& vf) {\n        typedef Vector<double,NDIM> coordT;\n        coordT h = (hi - lo)*(1.0/(npt-1));\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) sum += h[i]*h[i];\n        sum = sqrt(sum);\n        World& world = vf[0].world();// get world from first function\n        // reconstruct each function in vf\n        std::for_each(vf.begin(), vf.end(), [](const Function<T,NDIM>& f){f.reconstruct();});\n        if (world.rank() == 0) {\n            FILE* file = fopen(filename,\"w\");\n            if(!file)\n            MADNESS_EXCEPTION(\"plot_line: failed to open the plot file\", 0);\n            for (int i=0; i<npt; ++i) {\n                coordT r = lo + h*double(i);\n                fprintf(file, \"%.14e \", i*sum);\n                std::for_each(vf.begin(), vf.end(), [&](const Function<T,NDIM>& f){ plot_line_print_value(file, f.eval(r));});\n                fprintf(file,\"\\n\");\n            }\n            fclose(file);\n        }\n        world.gop.fence();\n    }\n\n    template<size_t NDIM>\n    void plot_plane(World& world, const Function<double,NDIM>& function,\n            const std::string name) {\n        typedef std::vector<Function<double,NDIM> > vecfuncT;\n        plot_plane(world,vecfuncT(1,function),name);\n    }\n\n    template<size_t NDIM>\n    void plot_plane(World& world, const Function<double,NDIM>& function1,\n            const Function<double,NDIM>& function2,\n            const std::string name) {\n        typedef std::vector<Function<double,NDIM> > vecfuncT;\n        vecfuncT vf(2);\n        vf[0]=function1;\n        vf[1]=function2;\n        plot_plane(world,vf,name);\n    }\n\n    template<size_t NDIM>\n    void plot_plane(World& world, const Function<double,NDIM>& function1,\n            const Function<double,NDIM>& function2,const Function<double,NDIM>& function3,\n            const std::string name) {\n        typedef std::vector<Function<double,NDIM> > vecfuncT;\n        vecfuncT vf(3);\n        vf[0]=function1;\n        vf[1]=function2;\n        vf[2]=function3;\n        plot_plane(world,vf,name);\n    }\n\n\n    /// plot a 2-d slice of a given function and the according MRA structure\n    /// FIXME: doesn't work for more than 1 rank\n\n    /// the plotting parameters are taken from the input file \"input\" and its\n    /// data group \"plot\", e.g. plotting the xy plane around (0,0,0.7):\n    /// plot\n    ///   plane x1 x2\n    ///   zoom 2.0\n    ///   npoints 100\n    ///   origin 0.0 0.0 0.7\n    /// end\n    /// @param[in]\tworld\tthe world\n    /// @param[in]\tvfunction\tthe function to plot\n    /// @param[in]\tname\t\tthe output name\n    template<size_t NDIM>\n    void plot_plane(World& world, const std::vector<Function<double,NDIM> >& vfunction,\n    \t\tconst std::string name, const std::string inputfile=\"input\") {\n\n\t\tif (world.size()>1) return;\n        // determine the ploting plane\n    \tstd::string c1=\"x1\", c2=\"x2\";\n\n    \t// zoom factor\n    \tdouble zoom=1.0;\n\n    \t// output type: mathematica or gnuplot\n    \tstd::string output_type=\"gnuplot\";\n\n    \t// number of points in each direction\n        int npoints=200;\n\n        // the coordinates to be plotted\n        Vector<double,NDIM> coord(0.0);\n        Vector<double,NDIM> origin(0.0);\n\n        try {\n            std::ifstream f(inputfile);\n            position_stream_to_word(f, \"plot\",'#',true,true);\n            std::string s;\n            while (f >> s) {\n                if (s == \"end\") {\n                    break;\n                } else if (s == \"plane\") {\n                    f >> c1 >> c2;\n                } else if (s == \"zoom\") {\n                    f >> zoom;\n                } else if (s == \"output\") {\n                    f >> output_type;\n                } else if (s == \"points\") {\n                    f >> npoints;\n                } else if (s == \"origin\") {\n                    for (std::size_t i=0; i<NDIM; ++i) f >> origin[i];\n                }\n            }\n        } catch (...) {\n            print(\"can't locate plot in file=\"+inputfile+\" -- using default values\");\n        }\n    \tdouble scale=1.0/zoom;\n    \tcoord=origin;\n\n        // convert human to mad form\n        size_t cc1=0, cc2=1;\n        if (c1==\"x1\") cc1=0;\n        if (c1==\"x2\") cc1=1;\n        if (c1==\"x3\") cc1=2;\n        if (c1==\"x4\") cc1=3;\n        if (c1==\"x5\") cc1=4;\n        if (c1==\"x6\") cc1=5;\n        if (c2==\"x1\") cc2=0;\n        if (c2==\"x2\") cc2=1;\n        if (c2==\"x3\") cc2=2;\n        if (c2==\"x4\") cc2=3;\n        if (c2==\"x5\") cc2=4;\n        if (c2==\"x6\") cc2=5;\n\n        MADNESS_ASSERT(cc1<NDIM);\n        MADNESS_ASSERT(cc2<NDIM);\n        // output file name for the gnuplot data\n        std::string filename=\"plane_\"+c1+c2+\"_\"+name;\n        // assume a cubic cell\n        double lo=-FunctionDefaults<NDIM>::get_cell_width()[0]*0.5;\n        lo=lo*scale;\n\n        const double stepsize=FunctionDefaults<NDIM>::get_cell_width()[0]*scale/npoints;\n\n        if(world.rank() == 0) {\n\n        \t// plot 3d plot\n        \tFILE *f =  0;\n        \tf=fopen(filename.c_str(), \"w\");\n        \tif(!f) MADNESS_EXCEPTION(\"plot_along: failed to open the plot file\", 0);\n\n        \tfor (int i0=0; i0<npoints; i0++) {\n        \t\tfor (int i1=0; i1<npoints; i1++) {\n        \t\t\t// plot plane\n        \t\t\tcoord[cc1]=lo+origin[cc1]+i0*stepsize;\n        \t\t\tcoord[cc2]=lo+origin[cc2]+i1*stepsize;\n\n        \t\t\t// other electron\n//        \t\t\tfprintf(f,\"%12.6f %12.6f %12.20f\\n\",coord[cc1],coord[cc2],\n//        \t\t\t\t\tfunction(coord));\n                    fprintf(f,\"%12.6f %12.6f\",coord[cc1],coord[cc2]);\n                    for (std::size_t ivec=0; ivec<vfunction.size(); ++ivec)\n                        fprintf(f,\"  %12.20f\",vfunction[ivec](coord));\n                    fprintf(f,\"\\n\");\n\n        \t\t}\n        \t\t// additional blank line between blocks for gnuplot\n        \t\tif (output_type==\"gnuplot\") fprintf(f,\"\\n\");\n        \t}\n        \tfclose(f);\n\n        }\n\n//        // plot mra structure\n//    \tfilename=\"mra_structure_\"+c1+c2+\"_\"+name;\n//    \tfunction.get_impl()->print_plane(filename.c_str(),cc1,cc2,coord);\n    }\n\n\n/// plot a 2-d slice of a given function and the according MRA structure\n\n/// the plotting parameters are taken from the input file \"input\" and its\n/// data group \"plot\", e.g. plotting the xy plane around (0,0,0.7):\n/// plot\n///   plane x1 x2\n///   zoom 2.0\n///   npoints 100\n///   origin 0.0 0.0 0.7\n/// end\n/// @param[in]\tworld\tthe world\n/// @param[in]\tvfunction\tthe function to plot\n/// @param[in]\tname\t\tthe output name\ntemplate<size_t NDIM>\nvoid plot_plane(World& world, const std::vector<Function<double,NDIM> >& vfunction,\n                const std::string name, const PlotParameters param) {\n\n    if (world.size()>1) return;\n\n    auto plane=param.plane();\n    std::string c1=plane[0];\n    std::string c2=plane[1];\n    auto npoints=param.npoints();\n    auto origin=param.origin<NDIM>();\n    auto coord=param.origin<NDIM>();\n    double scale=1.0/param.zoom();\n    std::string output_type=\"gnuplot\";\n\n    auto plane2dim = [](std::string c) {\n        if (c==\"x1\") return 0;\n        else if (c==\"x2\") return 1;\n        else if (c==\"x3\") return 2;\n        else if (c==\"x4\") return 3;\n        else if (c==\"x5\") return 4;\n        else if (c==\"x6\") return 5;\n        else return -1;\n    };\n\n    // convert human to mad form\n    std::size_t cc1=plane2dim(c1);\n    std::size_t cc2=plane2dim(c2);\n\n    MADNESS_ASSERT(cc1<NDIM);\n    MADNESS_ASSERT(cc2<NDIM);\n\n    // output file name for the gnuplot data\n    std::string filename=\"plane_\"+c1+c2+\"_\"+name;\n    // assume a cubic cell\n    double lo=-FunctionDefaults<NDIM>::get_cell_width()[0]*0.5;\n    lo=lo*scale;\n\n    const double stepsize=FunctionDefaults<NDIM>::get_cell_width()[0]*scale/npoints;\n\n    if(world.rank() == 0) {\n\n        // plot 3d plot\n        FILE *f =  0;\n        f=fopen(filename.c_str(), \"w\");\n        if(!f) MADNESS_EXCEPTION(\"plot_along: failed to open the plot file\", 0);\n\n        for (int i0=0; i0<npoints; i0++) {\n            for (int i1=0; i1<npoints; i1++) {\n                // plot plane\n                coord[cc1]=lo+origin[cc1]+i0*stepsize;\n                coord[cc2]=lo+origin[cc2]+i1*stepsize;\n\n                fprintf(f,\"%12.6f %12.6f\",coord[cc1],coord[cc2]);\n                for (std::size_t ivec=0; ivec<vfunction.size(); ++ivec)\n                    fprintf(f,\"  %12.20f\",vfunction[ivec](coord));\n                fprintf(f,\"\\n\");\n\n            }\n            // additional blank line between blocks for gnuplot\n            if (output_type==\"gnuplot\") fprintf(f,\"\\n\");\n        }\n        fclose(f);\n\n    }\n}\n\n\n    template<size_t NDIM, typename opT>\n    void plot_plane(World& world, const opT& op, const std::string name, const PlotParameters param) {\n\n         if (world.size()>1) return;\n\n        auto plane=param.plane();\n        std::string c1=plane[0];\n        std::string c2=plane[1];\n        auto npoints=param.npoints();\n        auto origin=param. template origin<NDIM>();\n        auto coord=param. template origin<NDIM>();\n        double scale=1.0/param.zoom();\n        std::string output_type=\"gnuplot\";\n\n        auto plane2dim = [](std::string c) {\n            if (c==\"x1\") return 0;\n            else if (c==\"x2\") return 1;\n            else if (c==\"x3\") return 2;\n            else if (c==\"x4\") return 3;\n            else if (c==\"x5\") return 4;\n            else if (c==\"x6\") return 5;\n            else return -1;\n        };\n\n        // convert human to mad form\n        std::size_t cc1=plane2dim(c1);\n        std::size_t cc2=plane2dim(c2);\n\n        MADNESS_ASSERT(cc1<NDIM);\n        MADNESS_ASSERT(cc2<NDIM);\n\n         // output file name for the gnuplot data\n         std::string filename=\"plane_\"+c1+c2+\"_\"+name;\n         // assume a cubic cell\n         double lo=-FunctionDefaults<NDIM>::get_cell_width()[0]*0.5;\n         lo=lo*scale;\n\n         const double stepsize=FunctionDefaults<NDIM>::get_cell_width()[0]*scale/npoints;\n\n         if(world.rank() == 0) {\n\n             // plot 3d plot\n             FILE *f =  0;\n             f=fopen(filename.c_str(), \"w\");\n             if(!f) MADNESS_EXCEPTION(\"plot_along: failed to open the plot file\", 0);\n\n             for (int i0=0; i0<npoints; i0++) {\n                 for (int i1=0; i1<npoints; i1++) {\n                     // plot plane\n                     coord[cc1]=lo+origin[cc1]+i0*stepsize;\n                     coord[cc2]=lo+origin[cc2]+i1*stepsize;\n\n                     // other electron\n //                  fprintf(f,\"%12.6f %12.6f %12.20f\\n\",coord[cc1],coord[cc2],\n //                          function(coord));\n                     fprintf(f,\"%12.6f %12.6f\",coord[cc1],coord[cc2]);\n                     fprintf(f,\"  %12.20f\\n\",op(coord));\n\n                 }\n                 // additional blank line between blocks for gnuplot\n                 if (output_type==\"gnuplot\") fprintf(f,\"\\n\");\n             }\n             fclose(f);\n\n         }\n     }\n\n\n\n    template<size_t NDIM>\n    typename std::enable_if<NDIM==3,void>::type\n    plot_cubefile(World& world, const Function<double,NDIM>& f, std::string filename,\n            std::vector<std::string> molecular_info=std::vector<std::string>(), int npoints=100, double zoom=1.0,\n            const Vector<double,NDIM> origin=Vector<double,NDIM>(0.0)) {\n\n        // dummy atom in the center\n        if (molecular_info.size()==0)\n        \tmolecular_info=std::vector<std::string>(1,\"0 0 0.0 0.0 0.0\\n\");\n\n        // the coordinates to be plotted\n        // Vector<double,NDIM> origin(0.0);\n\n        // number of points in each direction\n        std::vector<int> npt(3,npoints);\n\n        Tensor<double> cell=copy(FunctionDefaults<3>::get_cell());\n        cell.scale(1.0/zoom);\n        double xlen=cell(0,1)-cell(0,0);\n        double ylen=cell(1,1)-cell(1,0);\n        double zlen=cell(2,1)-cell(2,0);\n\n        // plot file\n        FILE *file =  0;\n        file=fopen(filename.c_str(), \"w\");\n        if(!file) MADNESS_EXCEPTION(\"plot_along: failed to open the plot file\", 0);\n\n\n        // print header\n        fprintf(file,\"cube file from MADNESS\\n\");\n        fprintf(file,\"comment line\\n\");\n\n        // print the number of atoms if a calculation was provided\n        fprintf(file,\"%d %12.8f %12.8f %12.8f \\n\",int(molecular_info.size()),\n                cell(0,0),cell(1,0),cell(2,0));\n\n        // grid spacing for each dimension such that the cell edges are plotted\n        const auto xdelta = xlen/(npt[0]-1);\n        const auto ydelta = ylen/(npt[1]-1);\n        const auto zdelta = zlen/(npt[2]-1);\n\n        // print the cell constants\n        fprintf(file,\"%d %12.6f %12.6f %12.6f\\n\",npt[0],xdelta,0.0,0.0);\n        fprintf(file,\"%d %12.6f %12.6f %12.6f\\n\",npt[1],0.0,ydelta,0.0);\n        fprintf(file,\"%d %12.6f %12.6f %12.6f\\n\",npt[2],0.0,0.0,zdelta);\n\n        // print the molecule\n        for (const std::string& s : molecular_info) fprintf(file,\"%s\",s.c_str());\n\n\n         Tensor<double> grid(npt[0], npt[1], npt[2]);\n         long count_per_line = 0;\n         for (int i = 0; i < npt[0]; ++i) {\n             for (int j = 0; j < npt[1]; ++j) {\n                 for (int k = 0; k < npt[2]; ++k) {\n                     double x = cell(0, 0) + origin[0] + xdelta * i;\n                     double y = cell(1, 0) + origin[1] + ydelta * j;\n                     double z = cell(2, 0) + origin[2] + zdelta * k;\n                     // the original format has up to 6 entries per line: https://paulbourke.net/dataformats/cube/\n                     // stick with this, even though many codes can read an arbitrary number of entries per line\n                     if (count_per_line < 6) {\n                        fprintf(file, \"%12.5e \", f(x, y, z));\n                        count_per_line++;\n                     } else {\n                        fprintf(file, \"%12.5e\\n\", f(x, y, z));\n                        count_per_line = 0;\n                     }\n                 }\n             }\n         }\n         fprintf(file, \"\\n\");\n         fclose(file);\n     }\n\n     template<typename T, size_t NDIM>\n     void\n     print_tree_jsonfile(World& world, const Function<T,NDIM>& f, std::string filename) {\n\n         Tensor<double> cell = copy(FunctionDefaults<NDIM>::get_cell());\n         std::ofstream os(filename.c_str());\n\n         os << \"{\";\n         os << \"\\\"cell\\\":[\";\n         for (int xyz = 0; xyz != NDIM; ++xyz) {\n             os << \"[\" << cell(xyz, 0) << \",\" << cell(xyz, 1) << \"]\";\n             if (xyz != NDIM-1)\n                 os << \",\";\n         }\n         os << \"],\";\n\n         os << \"\\\"tree\\\":{\";\n         f.print_tree_json(os);\n         os << \"}}\";\n     }\n\n    /// convenience to get plot_plane and plot_cubefile\n    template<size_t NDIM>\n    void plot(const std::vector<Function<double,NDIM> >& vf, const std::string& name, const std::vector<std::string>& header){\n    \tif(vf.empty()) return;\n    \tWorld& world=vf.front().world();\n    \tfor(size_t i=0;i<vf.size();++i){\n    \t\tconst std::string namei=name+\"_\"+std::to_string(i);\n//    \t\tvf[i].print_size(\"plot:\"+namei);\n    \t\tplot_plane<NDIM>(world,vf[i],namei);\n//    \t\tplot_cubefile<NDIM>(world,vf[i],namei+\".cube\",header);\n    \t}\n    }\n\n    template<typename T>\n    static std::string stringify(T arg) {\n    \tstd::ostringstream o;\n    \tif (!(o << arg))\n    \t\tMADNESS_EXCEPTION(\"stringify<T> failed\",1);\n    \treturn o.str();\n    }\n\n\n    typedef Vector<double,3> coord_3d;\n    typedef Vector<double,6> coord_6d;\n\n    // plot along this trajectory\n    template<size_t NDIM>\n    struct trajectory {\n\n        typedef Vector<double,NDIM> coordT;\n\n    \tdouble lo;\n    \tdouble hi;\n    \tdouble radius;\n    \tlong npt;\n    \tcoordT start, end;\n    \tcoord_3d el2;\n    \tcoordT (*curve)(const coordT& lo, const coordT& hi, double radius, coord_3d el2, long npt, long ipt);\n\n    \t/// some tools for plotting MRA ranks of low order tensors\n\n    \t// return a hue number [0,0.7] according to the rank in relation to maxrank,\n    \tstatic double hueCode(const int rank) {\n    \t\t\tconst double maxrank=40.0;\n    \t\t\tdouble hue=0.7-(0.7/maxrank)*(rank);\n    \t\t\treturn std::max(0.0,hue);\n    \t}\n\n\n        // print a dot of hue color at (x,y) in file f\n        static void print_psdot(FILE *f, double x, double y, double color) {\n        \tfprintf(f,\"\\\\newhsbcolor{mycolor}{%8.4f 1.0 0.7}\\n\",color);\n            fprintf(f,\"\\\\psdot[linecolor=mycolor](%12.8f,%12.8f)\\n\",x,y);\n        }\n\n\n        static coord_3d circle2(double lo, double hi, double radius, coord_3d el2, long npt, long ipt) {\n        \tdouble stepsize=constants::pi * 2.0 / npt;\n        \tdouble phi=ipt*stepsize;\n\n        \t// in the xz plane\n        \tcoord_3d coord(0.0);\n        \tcoord[0]=radius * sin(phi);\n        \tcoord[1]=radius * cos(phi);\n        \treturn coord;\n\n        }\n\n        static coord_6d circle_6d(const coord_6d& lo, const coord_6d& hi, double radius, coord_3d el2, long npt, long ipt) {\n        \tdouble stepsize=constants::pi * 2.0 / npt;\n\n        \t// start at phi=1.0\n        \tdouble phi=1.0+constants::pi+ipt*stepsize;\n\n        \t// in the xz plane\n        \tcoord_6d coord(0.0);\n        \tcoord[0]=radius * sin(phi);\n        \tcoord[1]=radius * cos(phi);\n        \tcoord[2]=0.0;\n        \tcoord[3]=el2[0];\n        \tcoord[4]=el2[1];\n        \tcoord[5]=el2[2];\n\n        \treturn coord;\n\n        }\n\n\n    //\ttypedef Vector<double,NDIM> (trajectory::circle_6d)(double lo, double hi, double radius, long npt, long ipt) const;\n\n    \ttrajectory() {}\n//    \t// ctor for a straight line thru the origin\n//    \ttrajectory(double lo, double hi, long npt) : lo(lo), hi(hi), npt(npt), curve(line) {\n//    \t}\n\n    \t// ctor for circle\n    \ttrajectory(double radius, long npt) : radius(radius), npt(npt), curve(this->circle2) {\n    \t}\n\n    \t// ctor for circle with electron 2 fixed at coord_3d\n    \ttrajectory(double radius, coord_3d el2, long npt) : radius(radius), npt(npt), el2(el2), curve(this->circle_6d) {\n    \t}\n\n\n        static Vector<double, NDIM> line_internal(const coordT& lo, const coordT& hi, double radius, coord_3d el2, long npt, long ipt) {\n            const coordT step=(hi-lo)*(1.0/npt);\n            coordT coord=lo+step*ipt;\n            return coord;\n        }\n\n\n        /// constructor for a line\n//        static trajectory line(const Vector<double,NDIM>& lo, const Vector<double,NDIM>& hi, const long npt) {\n        static trajectory line2(const coordT start, const coordT end, const long npt) {\n            trajectory<NDIM> traj;\n            traj.start=start;\n            traj.end=end;\n            traj.npt=npt;\n            traj.curve=(trajectory::line_internal);\n            return traj;\n        }\n\n        /// EZ ctor for a line a direction xyz={0,1,2,..,NDIM-1} thru the origin\n        static trajectory line_xyz(const int xyz, const long npt) {\n            double L=FunctionDefaults<NDIM>::get_cell_width()[0];\n            coordT lo(0.0), hi(0.0);\n            lo[xyz]=-L/2;\n            hi[xyz]=L/2;\n            return trajectory<NDIM>::line2(lo,hi,npt);\n        }\n\n        Vector<double,NDIM> operator()(int ipt) {\n            return curve(start,end,radius,el2,npt,ipt);\n        }\n\n    };\n\n\n\n    // plot along a line\n    template<size_t NDIM>\n    void plot_along(World& world, trajectory<NDIM> traj, const Function<double,NDIM>& function, std::string filename) {\n    \t FILE *f=0;\n    \t const int npt=traj.npt;\n\n    \t const bool psdot=false;\n\n    \t if(world.rank() == 0) {\n    \t\t f = fopen(filename.c_str(), \"w\");\n    \t\t if(!f) MADNESS_EXCEPTION(\"plot_along: failed to open the plot file\", 0);\n\n    \t\t if (psdot) {\n\n                 fprintf(f,\"\\\\psset{xunit=0.1cm}\\n\");\n                 fprintf(f,\"\\\\psset{yunit=10cm}\\n\");\n                 fprintf(f,\"\\\\begin{pspicture}(0,-0.3)(100,1.0)\\n\");\n                 fprintf(f,\"\\\\pslinewidth=0.05pt\\n\");\n    \t\t }\n\n    \t\t // walk along the line\n    \t\t for (int ipt=0; ipt<npt; ipt++) {\n    \t\t\t Vector<double,NDIM> coord=traj(ipt);\n    \t\t\t if (psdot) {\n    \t\t\t     long rank=function.evalR(coord);\n    \t\t\t     trajectory<NDIM>::print_psdot(f,ipt,function(coord),trajectory<NDIM>::hueCode(rank));\n    \t\t\t } else {\n    \t\t\t     fprintf(f,\"%4i %12.6f\\n\",ipt, function(coord));\n    \t\t\t }\n    \t\t }\n\n\n             if (psdot) fprintf(f,\"\\\\end{pspicture}\\n\");\n\n    \t\t fclose(f);\n    \t }\n    \t world.gop.fence();\n    \t ;\n    }\n\n\n    // plot along a line\n    template<size_t NDIM>\n    void plot_along(World& world, trajectory<NDIM> traj, double (*ff)(const Vector<double,NDIM>&), std::string filename) {\n    \t FILE *f=0;\n    \t const int npt=traj.npt;\n\n    \t const bool psdot=false;\n\n    \t if(world.rank() == 0) {\n    \t\t f = fopen(filename.c_str(), \"w\");\n    \t\t if(!f) MADNESS_EXCEPTION(\"plotvtk: failed to open the plot file\", 0);\n\n    \t\t if (psdot) {\n                 fprintf(f,\"\\\\psset{xunit=0.05cm}\\n\");\n                 fprintf(f,\"\\\\psset{yunit=100cm}\\n\");\n                 fprintf(f,\"\\\\begin{pspicture}(0,0.25)(100,0.3)\\n\");\n                 fprintf(f,\"\\\\pslinewidth=0.005pt\\n\");\n    \t\t }\n\n\n    \t\t // walk along the line\n    \t\t for (int ipt=0; ipt<npt; ipt++) {\n\n    \t\t     Vector<double,NDIM> coord=traj(ipt);\n//    \t\t     fprintf(f,\"%12.6f %12.6f %12.6f %12.6f %12.6f %12.6f %12.6f\\n\",coord[0],coord[1],coord[2],coord[3],coord[4],coord[5], ff(coord));\n    \t\t\t if (psdot) {\n                     // no hue code here\n    \t\t\t     //           long rank=ff.evalR(coord);\n                     trajectory<NDIM>::print_psdot(f,ipt,ff(coord),trajectory<NDIM>::hueCode(0));\n    \t\t\t } else {\n    \t\t\t     fprintf(f,\"%4i %12.6f\\n\",ipt, ff(coord));\n    \t\t\t }\n\n\n    \t\t }\n             if (psdot) fprintf(f,\"\\\\end{pspicture}\\n\");\n\n    \t\t fclose(f);\n    \t }\n    \t world.gop.fence();\n    \t ;\n    }\n\n\n\n}\n\n/* @} */\n#endif // MADNESS_MRA_FUNCPLOT_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/function_common_data.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include <madness/mra/funcdefaults.h>\n\n#ifndef FUNCTIONCOMMONDATA_H_\n#define FUNCTIONCOMMONDATA_H_\n\nnamespace madness {\n    /// FunctionCommonData holds all Function data common for given k\n\n    /// Since Function assignment and copy constructors are shallow it\n    /// greatly simplifies maintaining consistent state to have all\n    /// (permanent) state encapsulated in a single class.  The state\n    /// is shared between instances using a shared_ptr.  Also,\n    /// separating shared from instance specific state accelerates the\n    /// constructor, which is important for massive parallelism, and\n    /// permitting inexpensive use of temporaries.  The default copy\n    /// constructor and assignment operator are used but are probably\n    /// never invoked.\n    template<typename T, std::size_t NDIM>\n    class FunctionCommonData {\n    private:\n        static const FunctionCommonData<T, NDIM>* data[MAXK];\n\n        /// Private.  Initialize the twoscale coefficients\n        void\n        _init_twoscale();\n\n        /// Private.  Do first use initialization via get.\n        FunctionCommonData(int k) {\n            this->k = k;\n            npt = k;\n            for (int i = 0; i < 4; ++i)\n                s[i] = Slice(i * k, (i + 1) * k - 1);\n            s0 = std::vector<Slice>(NDIM);\n            sh = std::vector<Slice>(NDIM);\n            vk = std::vector<long>(NDIM);\n            vq = std::vector<long>(NDIM);\n            v2k = std::vector<long>(NDIM);\n            for (std::size_t i = 0; i < NDIM; ++i) {\n                s0[i] = s[0];\n                sh[i] = Slice(0, (k - 1) / 2);\n                vk[i] = k;\n                vq[i] = npt;\n                v2k[i] = 2 * k;\n            }\n            key0 = Key<NDIM> (0, Vector<Translation, NDIM> (0));\n\n            _init_twoscale();\n            _init_quadrature(k, npt, quad_x, quad_w, quad_phi, quad_phiw,\n                             quad_phit);\n        }\n\n    public:\n        typedef Tensor<T> tensorT; ///< Type of tensor used to hold coeff\n\n        int k; ///< order of the wavelet\n        int npt; ///< no. of quadrature points\n        Slice s[4]; ///< s[0]=Slice(0,k-1), s[1]=Slice(k,2*k-1), etc.\n        std::vector<Slice> s0; ///< s[0] in each dimension to get scaling coeff\n        std::vector<Slice> sh; ///< Slice(0,(k-1)/2) in each dimension for autorefine test\n        std::vector<long> vk; ///< (k,...) used to initialize Tensors\n        std::vector<long> v2k; ///< (2k,...) used to initialize Tensors\n        std::vector<long> vq; ///< (npt,...) used to initialize Tensors\n\n        Key<NDIM> key0; ///< Key for root node\n\n        Tensor<double> quad_x; ///< quadrature points\n        Tensor<double> quad_w; ///< quadrature weights\n        Tensor<double> quad_phi; ///< quad_phi(i,j) = at x[i] value of phi[j]\n        Tensor<double> quad_phit; ///< transpose of quad_phi\n        Tensor<double> quad_phiw; ///< quad_phiw(i,j) = at x[i] value of w[i]*phi[j]\n\n        Tensor<double> h0, h1, g0, g1;      ///< The separate blocks of twoscale coefficients\n        Tensor<double> h0T, h1T, g0T, g1T;  ///< The separate blocks of twoscale coefficients\n        Tensor<double> hg, hgT; ///< The full twoscale coeff (2k,2k) and transpose\n        Tensor<double> hgsonly; ///< hg[0:k,:]\n\n        static const FunctionCommonData<T, NDIM>&\n        get(int k) {\n            MADNESS_ASSERT(k > 0 && k <= MAXK);\n\n            MADNESS_PRAGMA_CLANG(diagnostic push)\n            MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wundefined-var-template\")\n\n            if (!data[k-1]) data[k-1] = new FunctionCommonData<T,NDIM>(k);\n            return *(data[k-1]);\n\n            MADNESS_PRAGMA_CLANG(diagnostic pop)\n        }\n\n        /// Initialize the quadrature information\n\n        /// Made public with all arguments thru interface for reuse in FunctionImpl::err_box\n        static void\n        _init_quadrature(int k, int npt, Tensor<double>& quad_x, Tensor<\n                         double>& quad_w, Tensor<double>& quad_phi,\n                         Tensor<double>& quad_phiw, Tensor<double>& quad_phit);\n    };\n\n\n    /// collect common functionality does not need to be member function of funcimpl\n    template<typename T, std::size_t NDIM>\n    class FunctionCommonFunctionality {\n    public:\n\n    \tconst FunctionCommonData<T,NDIM>& cdata;\n    \tFunctionCommonFunctionality(const FunctionCommonData<T,NDIM>& cdata) : cdata(cdata) {}\n    \tFunctionCommonFunctionality(const long k) : cdata(FunctionCommonData<T,NDIM>::get(k)) {}\n\n        GenTensor<T> coeffs2values(const Key<NDIM>& key, const GenTensor<T>& coeff) const {\n            double scale = pow(2.0,0.5*NDIM*key.level())/sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            return transform(coeff,cdata.quad_phit).scale(scale);\n        }\n\n        Tensor<T> coeffs2values(const Key<NDIM>& key, const Tensor<T>& coeff) const {\n            double scale = pow(2.0,0.5*NDIM*key.level())/sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            return transform(coeff,cdata.quad_phit).scale(scale);\n        }\n\n        /// Return the scaling function coeffs when given the function values at the quadrature points\n        /// @param[in] key the key of the function node (box)\n        /// @return function values for function node (box)\n        Tensor<T> values2coeffs(const Key<NDIM>& key, const Tensor<T>& values) const {\n            double scale = pow(0.5,0.5*NDIM*key.level())*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            return transform(values,cdata.quad_phiw).scale(scale);\n        }\n\n        GenTensor<T> values2coeffs(const Key<NDIM>& key, const GenTensor<T>& values) const {\n            double scale = pow(0.5,0.5*NDIM*key.level())*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            return transform(values,cdata.quad_phiw).scale(scale);\n        }\n\n    };\n\n\n\n    class Timer {\n\n        typedef ConcurrentHashMap<int,double> map;\n        typedef ConcurrentHashMap<int,double>::accessor accessor;\n\n        map data;\n        static const int itotal=-10;\n\n    public:\n        /// start timer\n        Timer() {\n        }\n\n        /// accumulate timer\n        void accumulate(const double time) const {\n\n            accessor acc;\n            map& map2=const_cast<map&>(data);\n            bool found=map2.find(acc, -10);\n            if (found) {\n                acc->second+=time;\n            } else {\n                [[maybe_unused]] auto&& [it, inserted] = map2.insert(std::pair<int,double>(-10,time));\n            }\n\n\n            int ilog=0;\n            if (time<0.1) ilog=-1;\n            else if (time<1.0) ilog=0;\n            else if (time<10.0) ilog=1;\n            else if (time<100.0) ilog=2;\n            else ilog=3;\n\n            found=map2.find(acc, ilog);\n            if (found) {\n                acc->second+=1.0;\n            } else {\n              [[maybe_unused]] auto&& [it, inserted] = map2.insert(std::pair<int,long>(ilog,1));\n            }\n        }\n\n        void reset() const {\n            map& map2=const_cast<map&>(data);\n            map2.clear();\n        }\n\n        /// print timer\n        void print(std::string line=\"\") const {\n\n            madness::print(\"timing of \",line);\n            typedef ConcurrentHashMap<int,double>::const_accessor accessor;\n            accessor acc;\n            bool found=data.find(acc, -10);\n            if (found) madness::print(\"  time spent in total \", acc->second);\n\n            found=data.find(acc, -1);\n            if (found) madness::print(\"  # tasks in <0.1s    \", acc->second);\n            found=data.find(acc, 0);\n            if (found) madness::print(\"  # tasks in <1s      \", acc->second);\n            found=data.find(acc, 1);\n            if (found) madness::print(\"  # tasks in <10s     \", acc->second);\n            found=data.find(acc, 2);\n            if (found) madness::print(\"  # tasks in <100s    \", acc->second);\n            found=data.find(acc, 3);\n            if (found) madness::print(\"  # tasks in <1000s   \", acc->second);\n\n        }\n    };\n\n\n\n}\n\n\n#endif /* FUNCTIONCOMMONDATA_H_ */\n"
  },
  {
    "path": "src/madness/mra/function_factory.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n */\n\n/// \\file function_factory.h\n/// Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces\n\n/// We provide an abstract base class FunctionFunctorInterface, of which we derive\n/// (as of now) the following classes:\n///  - ElementaryInterface (formerly FunctorInterfaceWrapper) to wrap elementary functions\n///  - ElectronRepulsionInterface to provide 1/r12, which is not elementarily accessible\n///  - CompositeFunctionInterface to provide on-demand coefficients of pair functions\n///\n/// Each of these Interfaces can be used in a FunctionFactory to set up a Function\n\n\n#ifndef MADNESS_MRA_FUNCTION_FACTORY_H__INCLUDED\n#define MADNESS_MRA_FUNCTION_FACTORY_H__INCLUDED\n\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/gentensor.h>\n#include <madness/mra/key.h>\n#include <madness/mra/function_interface.h>\n#include <madness/mra/operatorinfo.h>\n\n\nnamespace madness {\n\n// needed for the CompositeFactory\ntemplate<typename T, std::size_t NDIM>\nclass FunctionImpl;\n\ntemplate<typename T, std::size_t NDIM>\nclass Function;\n\ntemplate<typename T, std::size_t NDIM>\nTensor<T> fcube(const Key<NDIM>&, T (*f)(const Vector<double, NDIM>&), const Tensor<double>&);\n\ntemplate<typename T, std::size_t NDIM>\nTensor<T> fcube(const Key<NDIM>& key, const FunctionFunctorInterface<T, NDIM>& f, const Tensor<double>& qx);\n\n\n/// FunctionFactory implements the named-parameter idiom for Function\n\n/// C++ does not provide named arguments (as does, e.g., Python).\n/// This class provides something very close.  Create functions as follows\n/// \\code\n/// double myfunc(const double x[]);\n/// Function<double,3> f = FunctionFactory<double,3>(world).f(myfunc).k(11).thresh(1e-9).debug()\n/// \\endcode\n/// where the methods of function factory, which specify the non-default\n/// arguments eventually passed to the \\c Function constructor, can be\n/// used in any order.\n///\n/// Need to add a general functor for initial projection with a standard interface.\ntemplate<typename T, std::size_t NDIM>\nclass FunctionFactory {\n    friend class FunctionImpl<T, NDIM>;\n\n    typedef Vector<double, NDIM> coordT; ///< Type of vector holding coordinates\nprotected:\n    World& _world;\n    int _k;\n    double _thresh;\n    int _initial_level = FunctionDefaults<NDIM>::get_initial_level();\n    int _special_level = FunctionDefaults<NDIM>::get_special_level();\n    std::vector<Vector<double, NDIM> > _special_points;\n    int _max_refine_level;\n    int _truncate_mode;\n    bool _refine;\n    bool _empty;\n    bool _autorefine;\n    bool _truncate_on_project;\n    bool _fence;\n//    bool _is_on_demand;\n//    bool _compressed;\n    TreeState _tree_state;\n    //Tensor<int> _bc;\n    std::shared_ptr<WorldDCPmapInterface<Key<NDIM> > > _pmap;\n\nprivate:\n    // need to keep this private, access only via get_functor();\n    // reason is that the functor must only be constructed when the actual\n    // FuncImpl is constructed, otherwise we might depend on the ordering\n    // of the chaining (specifically, if the functor is constructed before\n    // of after the threshold is changed)\n    std::shared_ptr<FunctionFunctorInterface<T, NDIM> > _functor;\n\npublic:\n\n    FunctionFactory(World& world) :\n            _world(world),\n            _k(FunctionDefaults<NDIM>::get_k()),\n            _thresh(FunctionDefaults<NDIM>::get_thresh()),\n            _initial_level(FunctionDefaults<NDIM>::get_initial_level()),\n            _special_level(FunctionDefaults<NDIM>::get_special_level()),\n            _special_points(std::vector<Vector<double, NDIM> >()),\n            _max_refine_level(FunctionDefaults<NDIM>::get_max_refine_level()),\n            _truncate_mode(FunctionDefaults<NDIM>::get_truncate_mode()),\n            _refine(FunctionDefaults<NDIM>::get_refine()),\n            _empty(false),\n            _autorefine(FunctionDefaults<NDIM>::get_autorefine()),\n            _truncate_on_project(FunctionDefaults<NDIM>::get_truncate_on_project()),\n            _fence(true), // _bc(FunctionDefaults<NDIM>::get_bc()),\n            _tree_state(reconstructed),\n            _pmap(FunctionDefaults<NDIM>::get_pmap()), _functor() {\n    }\n\n    virtual ~FunctionFactory() {};\n\n    FunctionFactory&\n    functor(const std::shared_ptr<FunctionFunctorInterface<T, NDIM> >& f) {\n        _functor = f;\n        return self();\n    }\n\n    /// pass in a functor that is derived from FunctionFunctorInterface\n\n    /// similar to the first version of functor, but easy-to-use\n    /// FunctionFunctorInterface must be a public base of opT\n    template<typename opT>\n    typename std::enable_if<std::is_base_of<FunctionFunctorInterface<T, NDIM>, opT>::value,\n            FunctionFactory&>::type functor(const opT& op) {\n        _functor = std::shared_ptr<FunctionFunctorInterface<T, NDIM> >(new opT(op));\n        return self();\n    }\n\n    /// pass in a functor that is *not* derived from FunctionFunctorInterface\n\n    /// similar to the first version of functor, but easy-to-use\n    template<typename opT>\n    typename std::enable_if<not std::is_base_of<FunctionFunctorInterface<T, NDIM>, opT>::value,\n            FunctionFactory&>::type functor(const opT& op) {\n        _functor = std::shared_ptr<FunctionInterface<T, NDIM, opT> >\n                (new FunctionInterface<T, NDIM, opT>(op));\n        return self();\n    }\n\n    FunctionFactory& compressed(bool value = true) {\n        _tree_state = value ? TreeState::compressed : reconstructed;\n        return self();\n    }\n\n    FunctionFactory& treestate(const TreeState state) {\n        MADNESS_CHECK_THROW(((state==reconstructed) or (state==TreeState::compressed)),\n                            \"treestate must be either reconstructed or compressed in FunctionFactory\");\n        _tree_state = state;\n        return self();\n    }\n\n    FunctionFactory&\n    no_functor() {\n        _functor.reset();\n        return self();\n    }\n\n    FunctionFactory&\n    f(T (*f)(const coordT&)) {\n        functor(std::shared_ptr<FunctionFunctorInterface<T, NDIM> >(\n                new ElementaryInterface<T, NDIM>(f)));\n        return self();\n    }\n\n    virtual FunctionFactory& k(int k) {\n        _k = k;\n        return self();\n    }\n\n    virtual FunctionFactory& thresh(double thresh) {\n        _thresh = thresh;\n        return self();\n    }\n\n    FunctionFactory&\n    initial_level(int initial_level) {\n        _initial_level = initial_level;\n        return self();\n    }\n\n    FunctionFactory&\n    special_level(int special_level) {\n        _special_level = special_level;\n        return self();\n    }\n\n    FunctionFactory&\n    special_points(const std::vector<Vector<double, NDIM> >& special_points) {\n        _special_points = special_points;\n        return self();\n    }\n\n    FunctionFactory&\n    max_refine_level(int max_refine_level) {\n        _max_refine_level = max_refine_level;\n        return self();\n    }\n\n    FunctionFactory&\n    truncate_mode(int truncate_mode) {\n        _truncate_mode = truncate_mode;\n        return self();\n    }\n\n    FunctionFactory&\n    refine(bool refine = true) {\n        _refine = refine;\n        return self();\n    }\n\n    FunctionFactory&\n    norefine(bool norefine = true) {\n        _refine = !norefine;\n        return self();\n    }\n\n    FunctionFactory&\n    empty() {\n        _empty = true;\n        return self();\n    }\n\n    FunctionFactory&\n    autorefine() {\n        _autorefine = true;\n        return self();\n    }\n\n    FunctionFactory&\n    noautorefine() {\n        _autorefine = false;\n        return self();\n    }\n\n    FunctionFactory&\n    truncate_on_project() {\n        _truncate_on_project = true;\n        return self();\n    }\n\n    FunctionFactory&\n    notruncate_on_project() {\n        _truncate_on_project = false;\n        return self();\n    }\n\n    FunctionFactory&\n    fence(bool fence = true) {\n        _fence = fence;\n        return self();\n    }\n\n    FunctionFactory&\n    nofence() {\n        _fence = false;\n        return self();\n    }\n\n    virtual FunctionFactory&\n    is_on_demand() {\n        _tree_state = on_demand;\n        return self();\n    }\n\n    FunctionFactory&\n    pmap(const std::shared_ptr<WorldDCPmapInterface<Key<NDIM> > >& pmap) {\n        _pmap = pmap;\n        return self();\n    }\n\n    int get_k() const { return _k; };\n\n    double get_thresh() const { return _thresh; };\n\n    World& get_world() const { return _world; };\n\n    /// return the functor; override this if the functor needs deferred construction\n    virtual std::shared_ptr<FunctionFunctorInterface<T, NDIM> > get_functor() const {\n        return _functor;\n    }\n\n    /// implement this in all derived classes for correct chaining\n    FunctionFactory& self() { return *this; }\n\n};\n\n\n/// Factory for facile setup of a CompositeFunctorInterface and its FuncImpl\n\n/// for the concept of a Factory see base class FunctionFactory\n/// here we need to provide two different dimensions, since the main purpose\n/// of this is to set up a pair function (6D), consisting of orbitals (3D),\n/// and also one- and two-electron potentials\n///\n/// This Factory constructs a FuncImpl, and also the functor to it.\n///\n/// NOTE: pass in only copies of functions, since use in here will corrupt the\n/// tree structure and functions will not pass the VERIFY test after this.\ntemplate<typename T, std::size_t NDIM, std::size_t MDIM>\nclass CompositeFactory : public FunctionFactory<T, NDIM> {\npublic:\n    typedef std::shared_ptr<FunctionImpl<T, MDIM>> implT_ptr_lodim;\n    typedef std::shared_ptr<FunctionImpl<T, NDIM>> implT_ptr_hidim;\n//      std::vector<implT_ptr_lodim> _particle1;\n//      std::vector<implT_ptr_lodim> _particle2;\n    std::vector<implT_ptr_hidim> _ket;\n//    std::shared_ptr<FunctionImpl<T, NDIM> > _ket;            ///< supposedly a 6D pair function ket\n    std::shared_ptr<FunctionImpl<T, NDIM> > _g12;            ///< supposedly a interaction potential\n    std::shared_ptr<FunctionImpl<T, MDIM> > _v1;             ///< supposedly a potential for particle 1\n    std::shared_ptr<FunctionImpl<T, MDIM> > _v2;             ///< supposedly a potential for particle 2\n    std::vector<std::shared_ptr<FunctionImpl<T, MDIM> >> _particle1;      ///< supposedly particle 1\n    std::vector<std::shared_ptr<FunctionImpl<T, MDIM> >> _particle2;      ///< supposedly particle 2\n\nprivate:\n    std::shared_ptr<CompositeFunctorInterface<T, NDIM, MDIM> > _func;\n\n    friend class CompositeFunctorInterface<T, NDIM, MDIM>;\n\npublic:\n\n    CompositeFactory(World& world)\n            : FunctionFactory<T, NDIM>(world), _ket(), _g12(), _v1(), _v2(), _particle1(), _particle2(), _func() {\n        this->_tree_state = on_demand;\n    }\n\n    /// provide directly the NDIM (6D) pair function ket\n    CompositeFactory&\n    ket(const Function<T, NDIM>& f) {\n        _ket.push_back(f.get_impl());\n        return self();\n    }\n\n    CompositeFactory&\n    ket(const std::vector<Function<T, NDIM>>& vf) {\n        for (auto f: vf) _ket.push_back(f.get_impl());\n        return self();\n    }\n\n    /// g12 is the interaction potential (6D)\n    CompositeFactory&\n    g12(const Function<T, NDIM>& f) {\n        _g12 = f.get_impl();\n        return self();\n    }\n\n    /// a one-particle potential, acting on particle 1\n    CompositeFactory&\n    V_for_particle1(const Function<T, MDIM>& f) {\n        _v1 = f.get_impl();\n        return self();\n    }\n\n    /// a one-particle potential, acting on particle 2\n    CompositeFactory&\n    V_for_particle2(const Function<T, MDIM>& f) {\n        _v2 = f.get_impl();\n        return self();\n    }\n\n    /// provide particle 1, used with particle 2 to set up a pair function by\n    /// direct product\n    CompositeFactory&\n    particle1(const Function<T, MDIM>& f) {\n        _particle1.push_back(f.get_impl());\n        return self();\n    }\n\n    /// provide particle 1, used with particle 2 to set up a pair function by\n    /// direct product\n    CompositeFactory&\n    particle1(const std::vector<Function<T, MDIM>>& vf) {\n        for (auto f: vf) _particle1.push_back(f.get_impl());\n        return self();\n    }\n\n    /// provide particle 2, used with particle 1 to set up a pair function by\n    /// direct product\n    CompositeFactory&\n    particle2(const Function<T, MDIM>& f) {\n        _particle2.push_back(f.get_impl());\n        return self();\n    }\n\n    /// provide particle 2, used with particle 1 to set up a pair function by\n    /// direct product\n    CompositeFactory&\n    particle2(const std::vector<Function<T, MDIM>>& vf) {\n        for (auto f: vf) _particle2.push_back(f.get_impl());\n        return self();\n    }\n\n    // access to the functor *only* via this\n    std::shared_ptr<FunctionFunctorInterface<T, NDIM> > get_functor() const {\n\n        // return if we already have a valid functor\n        if (this->_func) return this->_func;\n\n        // construction of the functor is const in spirit, but non-const in sad reality..\n        // this Factory not only constructs the Function, but also the functor, so\n        // pass *this to the interface\n        const_cast< std::shared_ptr<CompositeFunctorInterface<T, NDIM, MDIM> >& >(this->_func) =\n                std::shared_ptr<CompositeFunctorInterface<T, NDIM, MDIM> >(\n                        new CompositeFunctorInterface<double, NDIM, MDIM>(\n                                this->_world, _ket, _g12, _v1, _v2, _particle1, _particle2\n                        ));\n\n        return this->_func;\n    }\n\n    CompositeFactory& self() { return *this; }\n};\n\n/// factory for generating TwoElectronInterfaces\ntemplate<typename T=double, std::size_t NDIM=6>\nclass TwoElectronFactory : public FunctionFactory<T, NDIM> {\n\nprotected:\n    typedef std::shared_ptr<FunctionFunctorInterface<T, NDIM> > InterfacePtr;\n\npublic:\n    TwoElectronFactory(World& world)\n            : FunctionFactory<T, NDIM>(world),  interface_(), bc_(FunctionDefaults<NDIM>::get_bc()) {\n        this->_tree_state = on_demand;\n        info.mu=-1.0;\n        info.type=OT_G12;\n        constexpr std::size_t LDIM=NDIM/2;\n        static_assert(NDIM==2*LDIM, \"NDIM must be even\");\n        info.thresh=FunctionDefaults<LDIM>::get_thresh();\n        this->_thresh = (FunctionDefaults<LDIM>::get_thresh());\n        this->_k = (FunctionDefaults<LDIM>::get_k());\n\n    }\n\n    /// the smallest length scale to be represented (aka lo)\n    TwoElectronFactory& dcut(double dcut) {\n        info.lo = dcut;\n        return self();\n    }\n\n    /// the requested precision\n    TwoElectronFactory& thresh(double thresh) {\n        this->_thresh=thresh;\n        info.thresh = thresh;\n        return self();\n    }\n\n    /// the exponent of a slater function\n    TwoElectronFactory& gamma(double g) {\n        info.mu = g;\n        return self();\n    }\n\n    /// return the operator  (1 - exp(-gamma x) / (2 gamma)\n    TwoElectronFactory& f12() {\n        info.type=OT_F12;\n        return self();\n    }\n\n    /// return the operator  (1 - exp(-gamma x) / (2 gamma)\n    TwoElectronFactory& slater() {\n        info.type=OT_SLATER;\n        return self();\n    }\n\n    /// return the BSH operator\n    TwoElectronFactory& BSH() {\n        info.type=OT_BSH;\n        return self();\n    }\n\n    /// return the BSH operator\n    TwoElectronFactory& set_info(const OperatorInfo info1) {\n        info=info1;\n        return self();\n    }\n\n    // access to the functor *only* via this\n    InterfacePtr get_functor() const {\n\n        // return if we already have a valid interface\n        if (this->interface_) return this->interface_;\n\n        const_cast<InterfacePtr& >(this->interface_) =\n                InterfacePtr(new GeneralTwoElectronInterface<T,NDIM>(info));\n\n//        // construction of the functor is const in spirit, but non-const in sad reality..\n//        if (info.type==OT_G12) {\n//            const_cast<InterfacePtr& >(this->interface_) =\n//                    InterfacePtr(new ElectronRepulsionInterface(info.lo, _thresh, bc_, _k));\n//        } else if (info.type == OT_F12) {\n//            const_cast<InterfacePtr& >(this->interface_) =\n//                    InterfacePtr(new SlaterF12Interface(info.mu, info.lo, _thresh, bc_, _k));\n//        } else if (info.type == OT_SLATER) {\n//            const_cast<InterfacePtr& >(this->interface_) =\n//                    InterfacePtr(new SlaterFunctionInterface(info.mu,info.lo, _thresh, bc_, _k));\n//        } else if (info.type==OT_BSH) {\n//            const_cast<InterfacePtr& >(this->interface_) =\n//                    InterfacePtr(new BSHFunctionInterface(info.mu, info.lo, _thresh, bc_, _k));\n//        } else {\n//            MADNESS_EXCEPTION(\"unimplemented integral kernel\", 1);\n//        }\n        return this->interface_;\n    }\n\n    TwoElectronFactory& self() { return *this; }\n\nprotected:\n\n//    enum operatortype {\n//        coulomb_, slater_, f12_, bsh_\n//    };\n\n    OperatorInfo info;\n//    operatortype type_;\n\n    /// the interface providing the actual coefficients\n    InterfacePtr interface_;\n\n//    double dcut_;           ///< cutoff radius for 1/r12, aka regularization\n\n//    double gamma_;\n\n    BoundaryConditions<NDIM> bc_;\n\n};\n\n#if 0\nclass ERIFactory : public TwoElectronFactory<ERIFactory> {\npublic:\n  ERIFactory(World& world) : TwoElectronFactory<ERIFactory>(world) {}\n\n  // access to the functor *only* via this\n  InterfacePtr get_functor() const {\n\n    // return if we already have a valid interface\n    if (this->interface_) return this->interface_;\n\n    // construction of the functor is const in spirit, but non-const in sad reality..\n    const_cast<InterfacePtr& >(this->interface_)=\n    InterfacePtr(new ElectronRepulsionInterface(\n        dcut_,thresh_,bc_,k_));\n    return this->interface_;\n  }\n\n  ERIFactory& self() {return *this;}\n\n};\n\n/// a function like f(x) = 1 - exp(-mu x)\nclass SlaterFunctionFactory : public TwoElectronFactory<SlaterFunctionFacto> {\npublic:\n  SlaterFunctionFactory(World& world)\n: TwoElectronFactory(world), gamma_(-1.0), f12_(false) {}\n\n  /// set the exponent of the Slater function\n  SlaterFunctionFactory& gamma(double gamma) {\n    this->gamma_ = gamma;\n    return self();\n  }\n\n  /// do special f12 function\n  SlaterFunctionFactory& f12() {\n    this->f12_=true;\n    return self();\n  }\n\n  // access to the functor *only* via this\n  InterfacePtr get_functor() const {\n\n    // return if we already have a valid interface\n    if (this->interface_) return this->interface_;\n\n    // make sure gamma is set\n    MADNESS_ASSERT(gamma_>0);\n\n    // construction of the functor is const in spirit, but non-const in sad reality..\n    if (f12_) {\n    const_cast<InterfacePtr& >(this->interface_)=\n        InterfacePtr(new SlaterF12Interface(\n        gamma_,dcut_,this->_thresh,bc_,this->_k));\n    } else {\n    const_cast<InterfacePtr& >(this->interface_)=\n        InterfacePtr(new SlaterFunctionInterface(\n        gamma_,dcut_,this->_thresh,bc_,this->_k));\n    }\n    return this->interface_;\n  }\n\n  SlaterFunctionFactory& self() {return *this;}\n\nprivate:\n\n  double gamma_;          ///< the exponent of the Slater function f(x)=exp(-gamma x)\n  bool f12_;                      ///< use 1-exp(-gamma x)  instead of exp(-gamma x)\n};\n\n/// Factory to set up an ElectronRepulsion Function\ntemplate<typename T, std::size_t NDIM>\nclass ERIFactory : public FunctionFactory<T, NDIM> {\n\nprivate:\n  std::shared_ptr<ElectronRepulsionInterface> _eri;\n\npublic:\n\n  /// cutoff radius for 1/r12, aka regularization\n  double _dcut;\n  BoundaryConditions<NDIM> _bc;\n\npublic:\n  ERIFactory(World& world)\n: FunctionFactory<T,NDIM>(world)\n  , _eri()\n  , _dcut(FunctionDefaults<NDIM>::get_thresh())\n  , _bc(FunctionDefaults<NDIM>::get_bc())\n  {\n    this->_is_on_demand=true;\n    MADNESS_ASSERT(NDIM==6);\n  }\n\n  ERIFactory&\n  thresh(double thresh) {\n    this->_thresh = thresh;\n    return *this;\n  }\n\n  ERIFactory&\n  dcut(double dcut) {\n    this->_dcut = dcut;\n    return *this;\n  }\n\n  // access to the functor *only* via this\n  std::shared_ptr<FunctionFunctorInterface<T, NDIM> > get_functor() const {\n\n    // return if we already have a valid eri\n    if (this->_eri) return this->_eri;\n\n    //                  if (this->_world.rank()==0) print(\"set dcut in ERIFactory to \", _dcut);\n\n    // construction of the functor is const in spirit, but non-const in sad reality..\n    const_cast< std::shared_ptr<ElectronRepulsionInterface>& >(this->_eri)=\n    std::shared_ptr<ElectronRepulsionInterface>(\n        new ElectronRepulsionInterface(_dcut,this->_thresh,\n                       _bc,this->_k));\n\n    return this->_eri;\n  }\n\n};\n#endif\n\n\n/// Does not work\n//    /// Factory to set up an ElectronRepulsion Function\n//    template<typename T, std::size_t NDIM>\n//    class FGFactory : public FunctionFactory<T, NDIM> {\n//\n//    private:\n//        std::shared_ptr<FGInterface> _fg;\n//\n//    public:\n//\n//        /// cutoff radius for 1/r12, aka regularization\n//        double _dcut;\n//        double _gamma;\n//        BoundaryConditions<NDIM> _bc;\n//\n//    public:\n//        FGFactory(World& world, double gamma)\n//            : FunctionFactory<T,NDIM>(world)\n//            , _fg()\n//            , _dcut(FunctionDefaults<NDIM>::get_thresh())\n//            , _gamma(gamma)\n//            , _bc(FunctionDefaults<NDIM>::get_bc())\n//        {\n//            this->_is_on_demand=true;\n//            MADNESS_ASSERT(NDIM==6);\n//        }\n//\n//        FGFactory&\n//        thresh(double thresh) {\n//            this->_thresh = thresh;\n//            return *this;\n//        }\n//\n//        FGFactory&\n//        dcut(double dcut) {\n//            this->_dcut = dcut;\n//            return *this;\n//        }\n//\n//        // access to the functor *only* via this\n//        std::shared_ptr<FunctionFunctorInterface<T, NDIM> > get_functor() const {\n//\n//            // return if we already have a valid eri\n//            if (this->_fg) return this->_fg;\n//\n//            //                  if (this->_world.rank()==0) print(\"set dcut in ERIFactory to \", _dcut);\n//\n//            // construction of the functor is const in spirit, but non-const in sad reality..\n//            const_cast< std::shared_ptr<FGInterface>& >(this->_fg)=\n//                std::shared_ptr<FGInterface>(\n//                                             new FGInterface(this->_world,_dcut,this->_thresh,\n//                                                             _gamma,_bc,this->_k));\n//\n//            return this->_fg;\n//        }\n//\n//    };\n\n}\n\n#endif // MADNESS_MRA_FUNCTION_FACTORY_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/function_interface.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id: function_factory_and_interface.h 3422 2014-03-24 09:16:15Z 3ru6ruWu $\n*/\n\n\n#ifndef MADNESS_MRA_FUNCTION_INTERFACE_H__INCLUDED\n#define MADNESS_MRA_FUNCTION_INTERFACE_H__INCLUDED\n\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/gentensor.h>\n#include <madness/mra/key.h>\n\n// needed for the TwoElectronInterface\n#include <madness/mra/operatorinfo.h>\n#include <madness/mra/gfit.h>\n#include <madness/mra/convolution1d.h>\n#include <madness/mra/function_common_data.h>\n\nnamespace madness {\n\n\t// forward declaration needed for CompositeFunctorInterface\n\ttemplate<typename T, std::size_t NDIM>\n\tclass FunctionImpl;\n\n    template<typename T, std::size_t NDIM>\n    class Function;\n\n    template<typename T, std::size_t NDIM>\n    Tensor<T> fcube(const Key<NDIM>&, T (*f)(const Vector<double,NDIM>&), const Tensor<double>&);\n\n//    template <typename T, std::size_t NDIM>\n//    const std::vector<Function<T,NDIM>>& change_tree_state(const std::vector<Function<T,NDIM>>& v,\n//    const TreeState finalstate,\n//    const bool fence);\n\n\n\t/// Abstract base class interface required for functors used as input to Functions\n\ttemplate<typename T, std::size_t NDIM>\n\tclass FunctionFunctorInterface {\n\tpublic:\n\n\t    typedef GenTensor<T> coeffT;\n\t    typedef Key<NDIM> keyT;\n\t    typedef T value_type;\n\n\t    Level special_level_;\n\n\t    FunctionFunctorInterface() : special_level_(6) {}\n\n\t    /// adapt the special level to resolve the smallest length scale\n\t    void set_length_scale(double lo) {\n\t        double Lmax=FunctionDefaults<NDIM>::get_cell_width().max();\n\t        double lo_sim=lo/Lmax;  // lo in simulation coordinates;\n\t        special_level_=Level(-log2(lo_sim));\n\t    }\n\n\t    /// Can we screen this function based on the bounding box information?\n\t    virtual bool screened(const Vector<double,NDIM>& c1, const Vector<double,NDIM>& c2) const {\n\t        return false;\n\t    }\n\n\t    /// Does the interface support a vectorized operator()?\n\t    virtual bool supports_vectorized() const {return false;}\n\nMADNESS_PRAGMA_GCC(diagnostic push)\nMADNESS_PRAGMA_GCC(diagnostic ignored \"-Woverloaded-virtual\")\nMADNESS_PRAGMA_CLANG(diagnostic push)\nMADNESS_PRAGMA_CLANG(diagnostic ignored \"-Woverloaded-virtual\")\n\n\t    virtual void operator()(const Vector<double*,1>& xvals, T* fvals, int npts) const {\n\t        MADNESS_EXCEPTION(\"FunctionFunctorInterface: This function should not be called!\", 0);\n\t    }\n\n\t    virtual void operator()(const Vector<double*,2>& xvals, T* fvals, int npts) const {\n\t        MADNESS_EXCEPTION(\"FunctionFunctorInterface: This function should not be called!\", 0);\n\t    }\n\n\t    virtual void operator()(const Vector<double*,3>& xvals, T* fvals, int npts) const {\n\t        MADNESS_EXCEPTION(\"FunctionFunctorInterface: This function should not be called!\", 0);\n\t    }\n\n\t    virtual void operator()(const Vector<double*,4>& xvals, T* fvals, int npts) const {\n\t        MADNESS_EXCEPTION(\"FunctionFunctorInterface: This function should not be called!\", 0);\n\t    }\n\n\t    virtual void operator()(const Vector<double*,5>& xvals, T* fvals, int npts) const {\n\t        MADNESS_EXCEPTION(\"FunctionFunctorInterface: This function should not be called!\", 0);\n\t    }\n\n\t    virtual void operator()(const Vector<double*,6>& xvals, T* fvals, int npts) const {\n\t        MADNESS_EXCEPTION(\"FunctionFunctorInterface: This function should not be called!\", 0);\n\t    }\nMADNESS_PRAGMA_CLANG(diagnostic pop)\nMADNESS_PRAGMA_GCC(diagnostic pop)\n\n\t    /// You should implement this to return \\c f(x)\n\t    virtual T operator()(const Vector<double, NDIM>& x) const = 0;\n\n\t    /// Override this to return list of special points to be refined more deeply\n\t    virtual std::vector< Vector<double,NDIM> > special_points() const {\n\t        return std::vector< Vector<double,NDIM> >();\n\t    }\n\n\t    /// Override this to change the minimum level of refinement at special points (default is 6)\n\t    virtual Level special_level() const {return special_level_;}\n\n\t    virtual ~FunctionFunctorInterface() {}\n\n\t    virtual coeffT coeff(const keyT&) const {\n\t        MADNESS_EXCEPTION(\"implement coeff for FunctionFunctorInterface\",0);\n\t        return coeffT();\n\t    }\n\n\t    virtual coeffT values(const keyT& key, const Tensor<double>& tensor) const {\n\t        MADNESS_EXCEPTION(\"implement values for FunctionFunctorInterface\",0);\n\t        return coeffT();\n\t    }\n\n\t    /// does this functor directly provide sum coefficients? or only function values?\n\t    virtual bool provides_coeff() const {\n\t        return false;\n\t    }\n\n\t};\n\n\n\n\t///forward declaration\n\ttemplate <typename T, std::size_t NDIM>\n\t//    void FunctionImpl<T,NDIM>::fcube(const keyT& key, const FunctionFunctorInterface<T,NDIM>& f, const Tensor<double>& qx, tensorT& fval) const {\n\tvoid fcube(const Key<NDIM>& key, const FunctionFunctorInterface<T,NDIM>& f, const Tensor<double>& qx, Tensor<T>& fval);\n\n\t/// CompositeFunctorInterface implements a wrapper of holding several functions and functors\n\n\t/// Use this to \"connect\" several functions and/or functors and to return their coefficients\n\t/// e.g. connect f1 and f2 with an addition, you can request the coefficients of any node\n\t/// and they will be computed on the fly and returned. Mainly useful to connect a functor\n\t/// with a function, if the functor is too large to be represented in MRA (e.g. 1/r12)\n\t///\n\t/// as of now, the operation connecting the functions/functors is simply addition.\n\t/// need to implement expression templates, if I only knew what that was...\n\ttemplate<typename T, std::size_t NDIM, std::size_t MDIM>\n\tclass CompositeFunctorInterface : public FunctionFunctorInterface<T,NDIM> {\n\n\t\ttypedef Vector<double, NDIM> coordT; ///< Type of vector holding coordinates\n\t\ttypedef FunctionImpl<T,NDIM> implT;\n\t\ttypedef FunctionImpl<T,MDIM> implL;\n\t\ttypedef std::shared_ptr<implT> pimplT;\n\t\ttypedef std::shared_ptr<implL> pimplL;\n\n\t\tWorld& world;\n\n\tpublic:\n\t\t/// various MRA functions of NDIM dimensionality\n\t\tstd::vector<std::shared_ptr<implT>> impl_ket_vector;\t///< supposedly the pair function\n\t\tstd::shared_ptr<implT> impl_eri;\t///< supposedly 1/r12\n\n\t\t/// various MRA functions of MDIM dimensionality (e.g. 3, if NDIM==6)\n\t\tstd::shared_ptr<implL> impl_m1;\t///< supposedly 1/r1\n\t\tstd::shared_ptr<implL> impl_m2;\t///< supposedly 1/r2\n\t\tstd::vector<std::shared_ptr<implL>> impl_p1_vector;\t///< supposedly orbital 1\n\t\tstd::vector<std::shared_ptr<implL>> impl_p2_vector;\t///< supposedly orbital 2\n\n\tpublic:\n\n\t\t/// constructor takes its Factory\n\t\tCompositeFunctorInterface(World& world, std::vector<pimplT> ket, pimplT g12,\n\t\t\t\tpimplL v1, pimplL v2, std::vector<pimplL> p1, std::vector<pimplL> p2)\n\t\t\t: world(world), impl_ket_vector(ket), impl_eri(g12)\n\t\t\t, impl_m1(v1), impl_m2(v2), impl_p1_vector(p1), impl_p2_vector(p2)\n\t\t{\n\n\t\t\t// some consistency checks\n\t\t\t// either a pair ket is provided, or two particles (tba)\n            MADNESS_CHECK_THROW(impl_p1_vector.size()==impl_p2_vector.size(), \"CompositeFunctorInterface: p1 and p2 must have the same size\");\n\t\t\tMADNESS_CHECK_THROW(impl_ket_vector.size()>0 or (impl_p1_vector.size()>0),\"CompositeFunctorInterface: either ket or p1 must be provided\");\n\n\t\t}\n\n        /// replicate low-dimensional functions over all ranks of this world\n        void replicate_low_dim_functions(const bool fence) {\n            if (impl_m1 and (not impl_m1->is_on_demand())) impl_m1->replicate(false);\n            if (impl_m2 and (not impl_m2->is_on_demand())) impl_m2->replicate(false);\n\n            for (auto& p1 : impl_p1_vector) if (p1 and (not p1->is_on_demand())) p1->replicate(false);\n            for (auto& p2 : impl_p2_vector) if (p2 and (not p2->is_on_demand())) p2->replicate(false);\n            if (fence) world.gop.fence();\n        }\n\n\t\tvoid make_redundant(const bool fence) {\n\t\t\t// prepare base functions that make this function\n            for (auto& k : impl_ket_vector) if (k and (not k->is_on_demand())) k->change_tree_state(redundant,false);\n\t\t\tif (impl_eri) {\n\t\t\t\tif (not impl_eri->is_on_demand()) impl_eri->change_tree_state(redundant,false);\n\t\t\t}\n\t\t\tif (impl_m1 and (not impl_m1->is_on_demand())) impl_m1->change_tree_state(redundant,false);\n\t\t\tif (impl_m2 and (not impl_m2->is_on_demand())) impl_m2->change_tree_state(redundant,false);\n\n            change_tree_state(impl2function(impl_p1_vector),redundant,false);\n            change_tree_state(impl2function(impl_p2_vector),redundant,false);\n//            for (auto& k : impl_p1_vector) if (k and (not k->is_on_demand())) k->change_tree_state(redundant,false);\n//            for (auto& k : impl_p2_vector) if (k and (not k->is_on_demand())) k->change_tree_state(redundant,false);\n//\t\t\tif (impl_p1 and (not impl_p1->is_on_demand())) impl_p1->change_tree_state(redundant,false);\n//\t\t\tif (impl_p2 and (not impl_p2->is_on_demand())) impl_p2->change_tree_state(redundant,false);\n\t\t\tif (fence) world.gop.fence();\n\t\t}\n\n\t\t/// return true if all constituent functions are in redundant tree state\n\t\tbool check_redundant() const {\n            for (auto& k : impl_ket_vector) if (k and (not k->is_redundant())) return false;\n//\t\t\tif (impl_ket and (not impl_ket->is_redundant())) return false;\n\t\t\tif (impl_eri) MADNESS_ASSERT(impl_eri->is_on_demand());\n\t\t\tif (impl_m1 and (not impl_m1->is_redundant())) return false;\n\t\t\tif (impl_m2 and (not impl_m2->is_redundant())) return false;\n            for (auto& k : impl_p1_vector) if (k and (not k->is_redundant())) return false;\n            for (auto& k : impl_p2_vector) if (k and (not k->is_redundant())) return false;\n//            if (impl_p1 and (not impl_p1->is_redundant())) return false;\n//\t\t\tif (impl_p2 and (not impl_p2->is_redundant())) return false;\n\t\t\treturn true;\n\t\t}\n\n\t\t/// return value at point x; fairly inefficient\n\t\tT operator()(const coordT& x) const {\n\t\t\tprint(\"there is no operator()(coordT&) in CompositeFunctorInterface, for good reason\");\n\t\t\tMADNESS_ASSERT(0);\n\t\t\treturn T(0);\n\t\t};\n\n\t\tbool provides_coeff() const {\n\t\t\treturn false;\n\t\t}\n\n\t};\n\n\n\t/// ElementaryInterface (formerly FunctorInterfaceWrapper) interfaces a c-function\n\n\t/// hard-code your favorite function and interface it with this; Does only\n\t/// provide function values, no MRA coefficients. Care must be taken if the\n\t/// function we refer to is a singular function, and a on-demand function\n\t/// at the same time, since direct computation of coefficients via mraimpl::project\n\t/// might suffer from inaccurate quadrature.\n\ttemplate<typename T, std::size_t NDIM>\n\tclass ElementaryInterface : public FunctionFunctorInterface<T,NDIM> {\n\n\tpublic:\n\t\ttypedef Vector<double, NDIM> coordT; ///< Type of vector holding coordinates\n        typedef GenTensor<T> coeffT;\n\n\t\tT (*f)(const coordT&);\n\n\t\tElementaryInterface(T (*f)(const coordT&)) : f(f) {}\n\n\t\tT operator()(const coordT& x) const {return f(x);}\n\n\t\tcoeffT values(const Key<NDIM>& key, const Tensor<double>& quad_x) const {\n\t        typedef Tensor<T> tensorT;\n            tensorT fval=madness::fcube(key,f,quad_x);\n            return coeffT(fval,FunctionDefaults<NDIM>::get_thresh(),TT_FULL);\n\t\t}\n\t};\n\n    /// FunctorInterface interfaces a class or struct with an operator()()\n    template<typename T, std::size_t NDIM, typename opT>\n    class FunctorInterface : public FunctionFunctorInterface<T,NDIM> {\n\n    public:\n        typedef Vector<double, NDIM> coordT; ///< Type of vector holding coordinates\n        typedef GenTensor<T> coeffT;\n\n        opT op;\n\n        FunctorInterface(const opT& op) : op(op) {}\n\n        T operator()(const coordT& x) const {return op(x);}\n    };\n\n\t/// FunctionInterface implements a wrapper around any class with the operator()()\n\ttemplate<typename T, size_t NDIM, typename opT>\n\tclass FunctionInterface : public FunctionFunctorInterface<T,NDIM> {\n\n\t    typedef GenTensor<T> coeffT;\n        typedef Vector<double, NDIM> coordT; ///< Type of vector holding coordinates\n\n        const opT op;\n\n    public:\n        FunctionInterface(const opT& op) : op(op) {}\n\n        T operator()(const coordT& coord) const {return op(coord);}\n\n        bool provides_coeff() const {return false;}\n\n\t};\n\n\t/// base class to compute the wavelet coefficients for an isotropic 2e-operator\n\n\t/// all classes that derive from this base class use the Gaussian fitting\n\t/// procedure that has been developed for the BSH operator. We simply\n\t/// reuse the wavelet coefficients that we get from there to avoid\n\t/// evaluating the functions themselves, since the quadrature of singular\n\t/// functions is imprecise and slow.\n\ttemplate<typename T, std::size_t NDIM>\n    class TwoElectronInterface : public FunctionFunctorInterface<T,NDIM> {\n    protected:\n        static constexpr std::size_t LDIM=NDIM/2;\n\tpublic:\n\n\t\ttypedef GenTensor<T> coeffT;\n\n\t\t/// constructor: cf the Coulomb kernel\n\n\t\t/// @param[in]\tlo\t\tthe smallest length scale to be resolved\n\t\t/// @param[in]\teps\t\tthe accuracy threshold\n\t\tTwoElectronInterface(double lo, double eps,\n\t\t\t\tconst BoundaryConditions<NDIM>& bc=FunctionDefaults<NDIM>::get_bc(),\n\t\t\t\tint kk=FunctionDefaults<NDIM>::get_k())\n\t\t\t\t:rank(), k(kk), lo(lo), hi(1.0) {\n\n\t\t\t// Presently we must have periodic or non-periodic in all dimensions.\n\t\t\tfor (std::size_t d=1; d<NDIM; ++d) {MADNESS_ASSERT(bc(d,0)==bc(0,0));}\n\n\t\t\tconst Tensor<double>& width = FunctionDefaults<NDIM>::get_cell_width();\n\t\t\thi = width.normf(); // Diagonal width of cell\n\t\t\tif (bc(0,0) == BC_PERIODIC) hi *= 100; // Extend range for periodic summation\n\n\t\t}\n\n\t\tbool provides_coeff() const {\n\t\t\treturn true;\n\t\t}\n\n\t\t/// return the coefficients of the function in 6D (x1,y1,z1, x2,y2,z2)\n\t\tcoeffT coeff(const Key<NDIM>& key) const {\n\t\t\tTensor<double> c=make_coeff(key);\n            return coeffT(map_coeff(c),FunctionDefaults<NDIM>::get_thresh(),TT_FULL);\n\t\t}\n\n\t\tT operator()(const Vector<double, NDIM>& x) const {\n\t\t\tprint(\"there is no operator()(coordT&) in TwoElectronInterface, for good reason\");\n\t\t\tMADNESS_ASSERT(0);\n\t\t\treturn T(0);\n\t\t}\n\n\tprotected:\n\n\t\t/// make the coefficients from the 1d convolution\n\t\tTensor<double> make_coeff(const Key<NDIM>& key) const {\n\t\t\tconst Level n=key.level();\n\t\t\tconst Vector<Translation,NDIM> l=key.translation();\n\n\t\t\t// get the displacements for all 3 dimensions: x12, y12, z12\n            Translation l0, l1, l2;\n\t\t\tif (NDIM==2) {\n                l0=l[0]-l[1];\n            } else if (NDIM==4) {\n                l0=(l[0]-l[2]);\n                l1=(l[1]-l[3]);\n            } else if (NDIM==6) {\n                l0=(l[0]-l[3]);\n                l1=(l[1]-l[4]);\n                l2=(l[2]-l[5]);\n            } else {\n                MADNESS_EXCEPTION(\"TwoElectronInterface: NDIM must be 2, 4, or 6\",1);\n            }\n\n\t\t\tTensor<double> scr1(rank,k*k), scr2(rank,k*k,k*k), scr3(rank,k*k);\n\n\t\t\t// lump all the terms together\n\t\t\tfor (long mu=0; mu<rank; mu++) {\n                Tensor<double> r0, r1, r2;\n\t\t\t\tif (NDIM>=2) r0=(ops[mu].getop(0)->rnlij(n,l0)).reshape(k*k);\n\t\t\t\tif (NDIM>=4) r1=(ops[mu].getop(1)->rnlij(n,l1)).reshape(k*k);\n\t\t\t\tif (NDIM>=6) r2=(ops[mu].getop(2)->rnlij(n,l2)).reshape(k*k);\n\n\t\t\t\t// include weights in first vector\n\t\t\t\tscr1(mu,Slice(_))=r0*ops[mu].getfac();\n\n                if (NDIM==2) {\n                    ;\n                } else if (NDIM==4) {\n                    scr3(mu,Slice(_))=r1;\n                } else if (NDIM==6) {\n                    // merge second and third vector to scr(r,k1,k2)\n                    scr2(mu,Slice(_),Slice(_))=outer(r1,r2);\n                } else {\n                    MADNESS_EXCEPTION(\"TwoElectronInterface: NDIM must be 2, 4, or 6\",1);\n                }\n\t\t\t}\n\n            if (NDIM==2) {\n                // perform sum over the rank\n                Tensor<double> result(scr1.dim(1));\n                for (long mu=0; mu<rank; ++mu) result(_)+= scr1(mu,_);\n                return result;\n            }\n            else if (NDIM==4) return inner(scr1,scr3,0,0);\n            else if (NDIM==6) return inner(scr1,scr2,0,0);\n            else {\n                MADNESS_EXCEPTION(\"TwoElectronInterface: NDIM must be 2, 4, or 6\",1);\n                return Tensor<double>();\n            }\n\t\t}\n\n\t\t/// the dimensions are a bit confused (x1,x2, y1,y2, z1,z2) -> (x1,y1,z1, x2,y2,z2)\n\t\tTensor<double> map_coeff(const Tensor<double>& c) const {\n\t\t\tstd::vector<long> map(NDIM);\n            if (NDIM==2) {\n                map[0]=0;\tmap[1]=1;\n                return copy(c.reshape(k,k));\n            } else if (NDIM==4) {\n                map[0]=0;\tmap[1]=2;\n                map[2]=1;\tmap[3]=3;\n                return copy(c.reshape(k,k,k,k).mapdim(map));\n            } else if (NDIM==6) {\n                map[0]=0;\tmap[1]=3;\tmap[2]=1;\n                map[3]=4;\tmap[4]=2;\tmap[5]=5;\n                return copy(c.reshape(k,k,k,k,k,k).mapdim(map));\n            }\n            return Tensor<double>();\n\t\t}\n\n\t\t/// initialize the Gaussian fit; uses the virtual function fit() to fit\n\t\tvoid initialize(const double eps) {\n\t\t\tGFit<double,LDIM> fit=this->fit(eps);\n\t\t\tTensor<double> coeff=fit.coeffs();\n\t\t\tTensor<double> expnt=fit.exponents();\n\n\t\t\t// set some parameters\n\t\t\trank=coeff.dim(0);\n\t\t\tops.resize(rank);\n\t\t\tconst Tensor<double>& width = FunctionDefaults<LDIM>::get_cell_width();\n\n\t\t\t// construct all the terms\n\t\t\tfor (int mu=0; mu<rank; ++mu) {\n\t\t\t\t//                double c = std::pow(sqrt(expnt(mu)/pi),static_cast<int>(NDIM)); // Normalization coeff\n\t\t\t\tdouble c = std::pow(sqrt(expnt(mu)/constants::pi),LDIM); // Normalization coeff\n\n\t\t\t\t// We cache the normalized operator so the factor is the value we must multiply\n\t\t\t\t// by to recover the coeff we want.\n\t\t\t\tops[mu].setfac(coeff(mu)/c);\n\n\t\t\t\t// only 3 dimensions here!\n\t\t\t\tfor (std::size_t d=0; d<LDIM; ++d) {\n\t\t\t\t\tops[mu].setop(d,GaussianConvolution1DCache<double>::get(k, expnt(mu)*width[d]*width[d], 0, LatticeRange(false)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/// derived classes must implement this -- cf GFit.h\n\t\tvirtual GFit<double,LDIM> fit(const double eps) const = 0;\n\n\t\t/// storing the coefficients\n\t\tmutable std::vector< ConvolutionND<double,NDIM> > ops;\n\n\t\t/// the number of terms in the Gaussian quadrature\n\t\tint rank;\n\n\t\t/// the wavelet order\n\t\tint k;\n\n\t\t/// the smallest length scale that needs to be represented\n\t\tdouble lo;\n\n\t\t/// the largest length scale that needs to be represented\n\t\tdouble hi;\n\n\t};\n\n\n    /// a function like f(x)=1/x\n    template<typename T, std::size_t NDIM>\n    class GeneralTwoElectronInterface : public TwoElectronInterface<T,NDIM> {\n    public:\n\n        /// constructor: cf the Coulomb kernel\n\n        /// @param[in]\tlo\t\tthe smallest length scale to be resolved\n        /// @param[in]\teps\t\tthe accuracy threshold\n        GeneralTwoElectronInterface(OperatorInfo info,\n                                   const BoundaryConditions<NDIM>& bc=FunctionDefaults<NDIM>::get_bc(),\n                                   int kk=FunctionDefaults<NDIM>::get_k())\n                : TwoElectronInterface<T,NDIM>(info.lo,info.thresh,bc,kk), info(info) {\n\n            if (info.hi<0) {\n                double hi=FunctionDefaults<LDIM>::get_cell_width().normf();\n                if (bc(0,0) == BC_PERIODIC) hi *= 100; // Extend range for periodic summation\n                this->info.hi=hi;\n            }\n            this->initialize(info.thresh);\n        }\n\n    private:\n        OperatorInfo info;\n        static constexpr std::size_t LDIM=NDIM/2;\n\n        GFit<double,LDIM> fit(const double eps) const {\n            return GFit<double,LDIM>(info);\n        }\n    };\n\n\t/// a function like f(x)=1/x\n\ttemplate<typename T, std::size_t NDIM>\n\tclass ElectronRepulsionInterface : public TwoElectronInterface<double,NDIM> {\n\n\tpublic:\n\n\t\t/// constructor: cf the Coulomb kernel\n\n\t\t/// @param[in]\tlo\t\tthe smallest length scale to be resolved\n\t\t/// @param[in]\teps\t\tthe accuracy threshold\n\t\tElectronRepulsionInterface(double lo,double eps,\n\t\t\t\tconst BoundaryConditions<NDIM>& bc=FunctionDefaults<NDIM>::get_bc(),\n\t\t\t\tint kk=FunctionDefaults<NDIM>::get_k())\n\t\t  : TwoElectronInterface<double,NDIM>(lo,eps,bc,kk) {\n\n\t\t\tthis->initialize(eps);\n\t\t}\n\n\tprivate:\n        static constexpr std::size_t LDIM=NDIM/2;\n\n\t\tGFit<double,LDIM> fit(const double eps) const {\n\t\t\treturn GFit<double,LDIM>::CoulombFit(this->lo,this->hi,eps,false);\n\t\t}\n\t};\n\n\t/// a function like f(x) = exp(-mu x)/x\n\tclass BSHFunctionInterface : public TwoElectronInterface<double,6> {\n\tpublic:\n\n\t\t/// constructor: cf the Coulomb kernel\n\n      /// @param[in]\tmu\t\tthe exponent of the BSH/inverse Laplacian\n\t\t/// @param[in]\tlo\t\tthe smallest length scale to be resolved\n\t\t/// @param[in]\teps\t\tthe accuracy threshold\n\t\tBSHFunctionInterface(double mu, double lo, double eps,\n\t\t\t\tconst BoundaryConditions<6>& bc=FunctionDefaults<6>::get_bc(),\n\t\t\t\tint kk=FunctionDefaults<6>::get_k())\n\t\t  : TwoElectronInterface<double,6>(lo,eps,bc,kk), mu(mu) {\n\n\t\t\tinitialize(eps);\n\t\t}\n\n\tprivate:\n\n\t\tdouble mu;\n\n\t\tGFit<double,3> fit(const double eps) const {\n\t\t\treturn GFit<double,3>::BSHFit(mu,lo,hi,eps,false);\n\t\t}\n\t};\n\n\t/// a function like f(x)=exp(-mu x)\n\tclass SlaterFunctionInterface : public TwoElectronInterface<double,6> {\n\tpublic:\n\n\t\t/// constructor: cf the Coulomb kernel\n\n\t\t/// @param[in]\tmu\t\tthe exponent of the Slater function\n\t\t/// @param[in]\tlo\t\tthe smallest length scale to be resolved\n\t\t/// @param[in]\teps\t\tthe accuracy threshold\n\t\tSlaterFunctionInterface(double mu, double lo, double eps,\n\t\t\t\tconst BoundaryConditions<6>& bc=FunctionDefaults<6>::get_bc(),\n\t\t\t\tint kk=FunctionDefaults<6>::get_k())\n\t\t  : TwoElectronInterface<double,6>(lo,eps,bc,kk), mu(mu) {\n\t\t\tinitialize(eps);\n\t\t}\n\n\tprivate:\n\n\t\tdouble mu;\n\n\t\tGFit<double,3> fit(const double eps) const {\n\t\t\treturn GFit<double,3>::SlaterFit(mu,lo,hi,eps,false);\n\t\t}\n\t};\n\n\t/// a function like f(x) = (1 - exp(-mu x))/(2 gamma)\n\tclass SlaterF12Interface : public TwoElectronInterface<double,6> {\n\tpublic:\n\n\t\t/// constructor: cf the Coulomb kernel\n\n\t\t/// @param[in]\tmu\t\tthe exponent of the Slater function\n\t\t/// @param[in]\tlo\t\tthe smallest length scale to be resolved\n\t\t/// @param[in]\teps\t\tthe accuracy threshold\n\t\tSlaterF12Interface(double mu, double lo, double eps,\n\t\t\t\tconst BoundaryConditions<6>& bc=FunctionDefaults<6>::get_bc(),\n\t\t\t\tint kk=FunctionDefaults<6>::get_k())\n\t\t  : TwoElectronInterface<double,6>(lo,eps,bc,kk), mu(mu) {\n\n\t\t\tinitialize(eps);\n\t\t}\n\n//\t\t/// overload the function of the base class\n//\t\tcoeffT coeff(const Key<6>& key) const {\n//\n//\t\t\tTensor<double> c=make_coeff(key);\n//\n//\t\t\t// subtract 1 from the (0,0,..,0) element of the tensor,\n//\t\t\t// which is the 0th order polynomial coefficient\n//        \tdouble one_coeff1=1.0*sqrt(FunctionDefaults<6>::get_cell_volume())\n//        \t\t\t*pow(0.5,0.5*6*key.level());\n//            std::vector<long> v0(6,0L);\n//            c(v0)-=one_coeff1;\n//\n//\t\t\tc.scale(-0.5/mu);\n//            return coeffT(map_coeff(c),FunctionDefaults<6>::get_thresh(),TT_FULL);\n//\t\t}\n\n\tprivate:\n\n\t\tdouble mu;\n\n\t\tGFit<double,3> fit(const double eps) const {\n\t\t\treturn GFit<double,3>::F12Fit(mu,lo,hi,eps,false);\n\t\t}\n\t};\n\n// Not right\n//\t/// a function like f(x) = (1 - exp(-mu x))/x\n//\tclass FGInterface : public TwoElectronInterface<double,6> {\n//\tpublic:\n//\n//\t\t/// constructor: cf the Coulomb kernel\n//\n//\t\t/// @param[in]\tmu\t\tthe exponent of the Slater function\n//\t\t/// @param[in]\tlo\t\tthe smallest length scale to be resolved\n//\t\t/// @param[in]\teps\t\tthe accuracy threshold\n//\t\tFGInterface(double mu, double lo, double eps,\n//\t\t\t\tconst BoundaryConditions<6>& bc=FunctionDefaults<6>::get_bc(),\n//\t\t\t\tint kk=FunctionDefaults<6>::get_k())\n//\t\t  : TwoElectronInterface<double,6>(lo,eps,bc,kk), mu(mu) {\n//\n//\t\t\tinitialize(eps);\n//\t\t}\n//\n//\tprivate:\n//\n//\t\tdouble mu;\n//\n//\t\tGFit<double,3> fit(const double eps) const {\n//\t\t\treturn GFit<double,3>::SlaterFit(mu,lo,hi,eps,false);\n//\t\t}\n//\t};\n\n\n#if 0\n\n\t/// ElectronRepulsionInterface implements the electron repulsion term 1/r12\n\n\t/// this is essentially just a wrapper around ElectronRepulsion\n\ttemplate<typename T, std::size_t NDIM>\n\tclass ElectronRepulsionInterface : public FunctionFunctorInterface<T,NDIM> {\n\n\t\ttypedef GenTensor<T> coeffT;\n\t\ttypedef Vector<double, NDIM> coordT; ///< Type of vector holding coordinates\n\n\t\t/// the class computing the coefficients\n\t\tElectronRepulsion eri;\n\n\tpublic:\n\n\t\t/// constructor takes the same parameters as the Coulomb operator\n\t\t/// which it uses to compute the coefficients\n\t\tElectronRepulsionInterface(World& world,double lo,double eps,\n                const BoundaryConditions<NDIM>& bc=FunctionDefaults<NDIM>::get_bc(),\n                int k=FunctionDefaults<NDIM>::get_k())\n\t\t\t: eri(ElectronRepulsion(eps,eps,bc,k)) {\n\t\t}\n\n\n\t\t/// return value at point x; fairly inefficient\n\t\tT operator()(const coordT& x) const {\n\t\t\tprint(\"there is no operator()(coordT&) in ElectronRepulsionInterface, for good reason\");\n\t\t\tMADNESS_ASSERT(0);\n\t\t\treturn T(0);\n\t\t};\n\n\n\t\t/// return sum coefficients for imagined node at key\n\t\tcoeffT coeff(const Key<NDIM>& key) const {\n            return coeffT(this->eri.coeff(key),FunctionDefaults<NDIM>::get_thresh(),\n                    TT_FULL);\n\t\t}\n\n\t};\n\n\t/// FGIntegralInterface implements the two-electron integral (1-exp(-gamma*r12))/r12\n\n\t/// this is essentially just a wrapper around ElectronRepulsion\n\t/// The integral expressed as:   1/r12 - exp(-gamma*r12)/r12\n\t/// which can be expressed with an eri and a bsh\n\ttemplate<typename T, std::size_t NDIM>\n\tclass FGIntegralInterface : public FunctionFunctorInterface<T,NDIM> {\n\n\t\ttypedef GenTensor<T> coeffT;\n\t\ttypedef Vector<double, NDIM> coordT; ///< Type of vector holding coordinates\n\n\t\t/// the class computing the coefficients\n\t\tElectronRepulsion eri;\n\t\tBSHFunction bsh;\n\n\tpublic:\n\n\t\t/// constructor takes the same parameters as the Coulomb operator\n\t\t/// which it uses to compute the coefficients\n\t\tFGIntegralInterface(World& world, double lo, double eps, double gamma,\n                const BoundaryConditions<NDIM>& bc=FunctionDefaults<NDIM>::get_bc(),\n                int k=FunctionDefaults<NDIM>::get_k())\n\t\t\t: eri(ElectronRepulsion(eps,eps,0.0,bc,k))\n\t\t\t, bsh(BSHFunction(eps,eps,gamma,bc,k)) {\n\t\t}\n\n\t\tbool provides_coeff() const {\n\t\t\treturn true;\n\t\t}\n\n\t\t/// return value at point x; fairly inefficient\n\t\tT operator()(const coordT& x) const {\n\t\t\tprint(\"there is no operator()(coordT&) in FGIntegralInterface, for good reason\");\n\t\t\tMADNESS_ASSERT(0);\n\t\t\treturn T(0);\n\t\t};\n\n\t\t/// return sum coefficients for imagined node at key\n\t\tcoeffT coeff(const Key<NDIM>& key) const {\n\t        typedef Tensor<T> tensorT;\n\t\t\ttensorT e_b=eri.coeff(key)-bsh.coeff(key);\n            return coeffT(e_b,FunctionDefaults<NDIM>::get_thresh(),TT_FULL);\n\t\t}\n\n\t};\n\n#endif\n\n}\n\n#endif // MADNESS_MRA_FUNCTION_INTERFACE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/functypedefs.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_MRA_FUNCTYPEDEFS_H__INCLUDED\n#define MADNESS_MRA_FUNCTYPEDEFS_H__INCLUDED\n\n/// \\file mra/functypedefs.h\n/// \\brief Provides typedefs to hide use of templates and to increase interoperability\n\n#include <memory>\n#include <vector>\n\nnamespace madness {\n\n    // forward declarations\n    template <typename T> class Tensor;\n    template <typename T, std::size_t NDIM> class Vector;\n    template <typename T, std::size_t NDIM> class Function;\n    template <typename T, std::size_t NDIM> class FunctionImpl;\n    template <std::size_t NDIM> class FunctionDefaults;\n    template <typename T, std::size_t NDIM> class FunctionFactory;\n    template <typename T, std::size_t NDIM> class FunctionFunctorInterface;\n    template <typename T, std::size_t NDIM> class SeparatedConvolution;\n    template <typename T, std::size_t NDIM> class Derivative;\n\n    typedef Tensor<double> real_tensor;\n    typedef Tensor<double_complex> complex_tensor;\n\n    typedef Tensor<double> tensor_real;\n    typedef Tensor<double_complex> tensor_complex;\n\n    typedef Vector<double,1> coord_1d;\n    typedef Vector<double,2> coord_2d;\n    typedef Vector<double,3> coord_3d;\n    typedef Vector<double,4> coord_4d;\n    typedef Vector<double,5> coord_5d;\n    typedef Vector<double,6> coord_6d;\n\n    typedef std::vector<double> vector_real;\n    typedef std::vector< std::complex<double> > vector_complex;\n\n    typedef std::vector< Vector<double,1> > vector_coord_1d;\n    typedef std::vector< Vector<double,2> > vector_coord_2d;\n    typedef std::vector< Vector<double,3> > vector_coord_3d;\n    typedef std::vector< Vector<double,4> > vector_coord_4d;\n    typedef std::vector< Vector<double,5> > vector_coord_5d;\n    typedef std::vector< Vector<double,6> > vector_coord_6d;\n\n    typedef Function<double,1> real_function_1d;\n    typedef Function<double,2> real_function_2d;\n    typedef Function<double,3> real_function_3d;\n    typedef Function<double,4> real_function_4d;\n    typedef Function<double,5> real_function_5d;\n    typedef Function<double,6> real_function_6d;\n\n    typedef Function<double_complex,1> complex_function_1d;\n    typedef Function<double_complex,2> complex_function_2d;\n    typedef Function<double_complex,3> complex_function_3d;\n    typedef Function<double_complex,4> complex_function_4d;\n    typedef Function<double_complex,5> complex_function_5d;\n    typedef Function<double_complex,6> complex_function_6d;\n\n    typedef std::vector<real_function_1d> vector_real_function_1d;\n    typedef std::vector<real_function_2d> vector_real_function_2d;\n    typedef std::vector<real_function_3d> vector_real_function_3d;\n    typedef std::vector<real_function_4d> vector_real_function_4d;\n    typedef std::vector<real_function_5d> vector_real_function_5d;\n    typedef std::vector<real_function_6d> vector_real_function_6d;\n\n    typedef std::vector<complex_function_1d> vector_complex_function_1d;\n    typedef std::vector<complex_function_2d> vector_complex_function_2d;\n    typedef std::vector<complex_function_3d> vector_complex_function_3d;\n    typedef std::vector<complex_function_4d> vector_complex_function_4d;\n    typedef std::vector<complex_function_5d> vector_complex_function_5d;\n    typedef std::vector<complex_function_6d> vector_complex_function_6d;\n\n    typedef FunctionFactory<double,1> real_factory_1d;\n    typedef FunctionFactory<double,2> real_factory_2d;\n    typedef FunctionFactory<double,3> real_factory_3d;\n    typedef FunctionFactory<double,4> real_factory_4d;\n    typedef FunctionFactory<double,5> real_factory_5d;\n    typedef FunctionFactory<double,6> real_factory_6d;\n\n    typedef FunctionFactory<double_complex,1> complex_factory_1d;\n    typedef FunctionFactory<double_complex,2> complex_factory_2d;\n    typedef FunctionFactory<double_complex,3> complex_factory_3d;\n    typedef FunctionFactory<double_complex,4> complex_factory_4d;\n    typedef FunctionFactory<double_complex,5> complex_factory_5d;\n    typedef FunctionFactory<double_complex,6> complex_factory_6d;\n\n    typedef std::shared_ptr< FunctionFunctorInterface<double,1> > real_functor_1d;\n    typedef std::shared_ptr< FunctionFunctorInterface<double,2> > real_functor_2d;\n    typedef std::shared_ptr< FunctionFunctorInterface<double,3> > real_functor_3d;\n    typedef std::shared_ptr< FunctionFunctorInterface<double,4> > real_functor_4d;\n    typedef std::shared_ptr< FunctionFunctorInterface<double,5> > real_functor_5d;\n    typedef std::shared_ptr< FunctionFunctorInterface<double,6> > real_functor_6d;\n\n    typedef std::shared_ptr< FunctionFunctorInterface<double_complex,1> > complex_functor_1d;\n    typedef std::shared_ptr< FunctionFunctorInterface<double_complex,2> > complex_functor_2d;\n    typedef std::shared_ptr< FunctionFunctorInterface<double_complex,3> > complex_functor_3d;\n    typedef std::shared_ptr< FunctionFunctorInterface<double_complex,4> > complex_functor_4d;\n    typedef std::shared_ptr< FunctionFunctorInterface<double_complex,5> > complex_functor_5d;\n    typedef std::shared_ptr< FunctionFunctorInterface<double_complex,6> > complex_functor_6d;\n\n    typedef SeparatedConvolution<double,1> real_convolution_1d;\n    typedef SeparatedConvolution<double,2> real_convolution_2d;\n    typedef SeparatedConvolution<double,3> real_convolution_3d;\n    typedef SeparatedConvolution<double,4> real_convolution_4d;\n    typedef SeparatedConvolution<double,5> real_convolution_5d;\n    typedef SeparatedConvolution<double,6> real_convolution_6d;\n\n    typedef SeparatedConvolution<double_complex,1> complex_convolution_1d;\n    typedef SeparatedConvolution<double_complex,2> complex_convolution_2d;\n    typedef SeparatedConvolution<double_complex,3> complex_convolution_3d;\n    typedef SeparatedConvolution<double_complex,4> complex_convolution_4d;\n    typedef SeparatedConvolution<double_complex,5> complex_convolution_5d;\n    typedef SeparatedConvolution<double_complex,6> complex_convolution_6d;\n\n    typedef std::shared_ptr<real_convolution_1d> real_convolution_1d_ptr;\n    typedef std::shared_ptr<real_convolution_2d> real_convolution_2d_ptr;\n    typedef std::shared_ptr<real_convolution_3d> real_convolution_3d_ptr;\n    typedef std::shared_ptr<real_convolution_4d> real_convolution_4d_ptr;\n    typedef std::shared_ptr<real_convolution_5d> real_convolution_5d_ptr;\n    typedef std::shared_ptr<real_convolution_6d> real_convolution_6d_ptr;\n\n    typedef std::shared_ptr<complex_convolution_1d> complex_convolution_1d_ptr;\n    typedef std::shared_ptr<complex_convolution_2d> complex_convolution_2d_ptr;\n    typedef std::shared_ptr<complex_convolution_3d> complex_convolution_3d_ptr;\n    typedef std::shared_ptr<complex_convolution_4d> complex_convolution_4d_ptr;\n    typedef std::shared_ptr<complex_convolution_5d> complex_convolution_5d_ptr;\n    typedef std::shared_ptr<complex_convolution_6d> complex_convolution_6d_ptr;\n\n    typedef std::shared_ptr< WorldDCPmapInterface< Key<1> > > pmap_1d;\n    typedef std::shared_ptr< WorldDCPmapInterface< Key<2> > > pmap_2d;\n    typedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmap_3d;\n    typedef std::shared_ptr< WorldDCPmapInterface< Key<4> > > pmap_4d;\n    typedef std::shared_ptr< WorldDCPmapInterface< Key<5> > > pmap_5d;\n    typedef std::shared_ptr< WorldDCPmapInterface< Key<6> > > pmap_6d;\n\n    typedef FunctionImpl<double,1> real_funcimpl_1d;\n    typedef FunctionImpl<double,2> real_funcimpl_2d;\n    typedef FunctionImpl<double,3> real_funcimpl_3d;\n    typedef FunctionImpl<double,4> real_funcimpl_4d;\n    typedef FunctionImpl<double,5> real_funcimpl_5d;\n    typedef FunctionImpl<double,6> real_funcimpl_6d;\n\n    typedef FunctionImpl<double_complex,1> complex_funcimpl_1d;\n    typedef FunctionImpl<double_complex,2> complex_funcimpl_2d;\n    typedef FunctionImpl<double_complex,3> complex_funcimpl_3d;\n    typedef FunctionImpl<double_complex,4> complex_funcimpl_4d;\n    typedef FunctionImpl<double_complex,5> complex_funcimpl_5d;\n    typedef FunctionImpl<double_complex,6> complex_funcimpl_6d;\n\n    typedef Derivative<double,1> real_derivative_1d;\n    typedef Derivative<double,2> real_derivative_2d;\n    typedef Derivative<double,3> real_derivative_3d;\n    typedef Derivative<double,4> real_derivative_4d;\n    typedef Derivative<double,5> real_derivative_5d;\n    typedef Derivative<double,6> real_derivative_6d;\n\n    typedef Derivative<double_complex,1> complex_derivative_1d;\n    typedef Derivative<double_complex,2> complex_derivative_2d;\n    typedef Derivative<double_complex,3> complex_derivative_3d;\n    typedef Derivative<double_complex,4> complex_derivative_4d;\n    typedef Derivative<double_complex,5> complex_derivative_5d;\n    typedef Derivative<double_complex,6> complex_derivative_6d;\n\n    typedef FunctionDefaults<1> function_defaults_1d;\n    typedef FunctionDefaults<2> function_defaults_2d;\n    typedef FunctionDefaults<3> function_defaults_3d;\n    typedef FunctionDefaults<4> function_defaults_4d;\n    typedef FunctionDefaults<5> function_defaults_5d;\n    typedef FunctionDefaults<6> function_defaults_6d;\n}\n\n#endif  // MADNESS_MRA_MRA_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/gaussleg",
    "content": "0\n1\n0 5.00000000000000000e-01 1.00000000000000000e+00 \n2\n0 7.88675134594812866e-01 5.00000000000000000e-01 \n1 2.11324865405187107e-01 5.00000000000000000e-01 \n3\n0 8.87298334620741702e-01 2.77777777777777790e-01 \n1 5.00000000000000000e-01 4.44444444444444420e-01 \n2 1.12701665379258312e-01 2.77777777777777790e-01 \n4\n0 9.30568155797026231e-01 1.73927422568726925e-01 \n1 6.69990521792428129e-01 3.26072577431273047e-01 \n2 3.30009478207571871e-01 3.26072577431273047e-01 \n3 6.94318442029737137e-02 1.73927422568726925e-01 \n5\n0 9.53089922969332037e-01 1.18463442528094542e-01 \n1 7.69234655052841498e-01 2.39314335249683235e-01 \n2 5.00000000000000000e-01 2.84444444444444444e-01 \n3 2.30765344947158446e-01 2.39314335249683235e-01 \n4 4.69100770306680043e-02 1.18463442528094542e-01 \n6\n0 9.66234757101576025e-01 8.56622461895851783e-02 \n1 8.30604693233132241e-01 1.80380786524069303e-01 \n2 6.19309593041598494e-01 2.33956967286345519e-01 \n3 3.80690406958401562e-01 2.33956967286345519e-01 \n4 1.69395306766867731e-01 1.80380786524069303e-01 \n5 3.37652428984239888e-02 8.56622461895851783e-02 \n7\n0 9.74553956171379299e-01 6.47424830844348514e-02 \n1 8.70765592799697230e-01 1.39852695744638322e-01 \n2 7.02922575688698537e-01 1.90915025252559462e-01 \n3 5.00000000000000000e-01 2.08979591836734702e-01 \n4 2.97077424311301408e-01 1.90915025252559462e-01 \n5 1.29234407200302770e-01 1.39852695744638322e-01 \n6 2.54460438286207360e-02 6.47424830844348514e-02 \n8\n0 9.80144928248768088e-01 5.06142681451881293e-02 \n1 8.98333238706813364e-01 1.11190517226687241e-01 \n2 7.62766204958164495e-01 1.56853322938943635e-01 \n3 5.91717321247824946e-01 1.81341891689180995e-01 \n4 4.08282678752175110e-01 1.81341891689180995e-01 \n5 2.37233795041835505e-01 1.56853322938943635e-01 \n6 1.01666761293186636e-01 1.11190517226687241e-01 \n7 1.98550717512318842e-02 5.06142681451881293e-02 \n9\n0 9.84080119753813043e-01 4.06371941807872061e-02 \n1 9.18015553663317885e-01 9.03240803474286980e-02 \n2 8.06685716350295179e-01 1.30305348201467719e-01 \n3 6.62126711701904513e-01 1.56173538520001431e-01 \n4 5.00000000000000000e-01 1.65119677500629891e-01 \n5 3.37873288298095542e-01 1.56173538520001431e-01 \n6 1.93314283649704793e-01 1.30305348201467719e-01 \n7 8.19844463366821014e-02 9.03240803474286980e-02 \n8 1.59198802461869536e-02 4.06371941807872061e-02 \n10\n0 9.86953264258585872e-01 3.33356721543440690e-02 \n1 9.32531683344492213e-01 7.47256745752902934e-02 \n2 8.39704784149512218e-01 1.09543181257991021e-01 \n3 7.16697697064623607e-01 1.34633359654998175e-01 \n4 5.74437169490815580e-01 1.47762112357376435e-01 \n5 4.25562830509184420e-01 1.47762112357376435e-01 \n6 2.83302302935376393e-01 1.34633359654998175e-01 \n7 1.60295215850487782e-01 1.09543181257991021e-01 \n8 6.74683166555077457e-02 7.47256745752902934e-02 \n9 1.30467357414141404e-02 3.33356721543440690e-02 \n11\n0 9.89114329073028431e-01 2.78342835580868316e-02 \n1 9.43531299884047603e-01 6.27901847324523060e-02 \n2 8.65076002787024678e-01 9.31451054638671172e-02 \n3 7.59548064603405848e-01 1.16596882295995241e-01 \n4 6.34771577976172452e-01 1.31402272255123326e-01 \n5 5.00000000000000000e-01 1.36462543388950308e-01 \n6 3.65228422023827493e-01 1.31402272255123326e-01 \n7 2.40451935396594096e-01 1.16596882295995241e-01 \n8 1.34923997212975350e-01 9.31451054638671172e-02 \n9 5.64687001159523486e-02 6.27901847324523060e-02 \n10 1.08856709269715031e-02 2.78342835580868316e-02 \n12\n0 9.90780317123359566e-01 2.35876681932559139e-02 \n1 9.52058628185237454e-01 5.34696629976592133e-02 \n2 8.84951337097152346e-01 8.00391642716731105e-02 \n3 7.93658977143308686e-01 1.01583713361532962e-01 \n4 6.83915749499090064e-01 1.16746268269177403e-01 \n5 5.62616704255734401e-01 1.24573522906701387e-01 \n6 4.37383295744265543e-01 1.24573522906701387e-01 \n7 3.16084250500909880e-01 1.16746268269177403e-01 \n8 2.06341022856691286e-01 1.01583713361532962e-01 \n9 1.15048662902847654e-01 8.00391642716731105e-02 \n10 4.79413718147625734e-02 5.34696629976592133e-02 \n11 9.21968287664037475e-03 2.35876681932559139e-02 \n13\n0 9.92091527359294068e-01 2.02420023826579386e-02 \n1 9.58799199611488961e-01 4.60607499188642258e-02 \n2 9.00789045366654939e-01 6.94367551098936248e-02 \n3 8.21174669720170058e-01 8.90729903809728690e-02 \n4 7.24246375518223462e-01 1.03908023768444255e-01 \n5 6.15229157977567387e-01 1.13141590131448616e-01 \n6 5.00000000000000000e-01 1.16275776615436949e-01 \n7 3.84770842022432613e-01 1.13141590131448616e-01 \n8 2.75753624481776594e-01 1.03908023768444255e-01 \n9 1.78825330279829886e-01 8.90729903809728690e-02 \n10 9.92109546333450470e-02 6.94367551098936248e-02 \n11 4.12008003885110177e-02 4.60607499188642258e-02 \n12 7.90847264070592554e-03 2.02420023826579386e-02 \n14\n0 9.93141904348406213e-01 1.75597301658759301e-02 \n1 9.64217441831786704e-01 4.00790435798801040e-02 \n2 9.13600657534882510e-01 6.07592853439515926e-02 \n3 8.43646452405842684e-01 7.86015835790967732e-02 \n4 7.57624318179077050e-01 9.27691987389689110e-02 \n5 6.59556184463944928e-01 1.02599231860647802e-01 \n6 5.54027474353671834e-01 1.07631926731578897e-01 \n7 4.45972525646328166e-01 1.07631926731578897e-01 \n8 3.40443815536055128e-01 1.02599231860647802e-01 \n9 2.42375681820922950e-01 9.27691987389689110e-02 \n10 1.56353547594157261e-01 7.86015835790967732e-02 \n11 8.63993424651175040e-02 6.07592853439515926e-02 \n12 3.57825581682132410e-02 4.00790435798801040e-02 \n13 6.85809565159383079e-03 1.75597301658759301e-02 \n15\n0 9.93996259010242689e-01 1.53766209980586346e-02 \n1 9.68636696200352976e-01 3.51830237440540622e-02 \n2 9.24103291705213659e-01 5.35796102335859697e-02 \n3 8.62208865680085035e-01 6.97853389630771620e-02 \n4 7.85486086304269415e-01 8.31346029084969601e-02 \n5 6.97075673538781637e-01 9.30805000077811057e-02 \n6 6.00597046998717299e-01 9.92157426635557893e-02 \n7 5.00000000000000000e-01 1.01289120962780643e-01 \n8 3.99402953001282757e-01 9.92157426635557893e-02 \n9 3.02924326461218307e-01 9.30805000077811057e-02 \n10 2.14513913695730585e-01 8.31346029084969601e-02 \n11 1.37791134319914965e-01 6.97853389630771620e-02 \n12 7.58967082947863969e-02 5.35796102335859697e-02 \n13 3.13633037996470451e-02 3.51830237440540622e-02 \n14 6.00374098975728528e-03 1.53766209980586346e-02 \n16\n0 9.94700467495824969e-01 1.35762297058770465e-02 \n1 9.72287511536616300e-01 3.11267619693239468e-02 \n2 9.32815601193915822e-01 4.75792558412463928e-02 \n3 8.77702204177501555e-01 6.23144856277669384e-02 \n4 8.08938122201321885e-01 7.47979944082883680e-02 \n5 7.29008388828613629e-01 8.45782596975012679e-02 \n6 6.40801775389629458e-01 9.13017075224617919e-02 \n7 5.47506254918818769e-01 9.47253052275342511e-02 \n8 4.52493745081181287e-01 9.47253052275342511e-02 \n9 3.59198224610370542e-01 9.13017075224617919e-02 \n10 2.70991611171386315e-01 8.45782596975012679e-02 \n11 1.91061877798678115e-01 7.47979944082883680e-02 \n12 1.22297795822498487e-01 6.23144856277669384e-02 \n13 6.71843988060841224e-02 4.75792558412463928e-02 \n14 2.77124884633837103e-02 3.11267619693239468e-02 \n15 5.29953250417503335e-03 1.35762297058770465e-02 \n17\n0 9.95287737657208682e-01 1.20741514342739657e-02 \n1 9.75337760884383842e-01 2.77297646869936014e-02 \n2 9.40119576863492901e-01 4.25180741585895888e-02 \n3 8.90757001948400684e-01 5.59419235967019840e-02 \n4 8.28835579608345419e-01 6.75681842342627376e-02 \n5 7.56345268543238469e-01 7.70228805384051418e-02 \n6 6.75615881726938206e-01 8.40020510782250179e-02 \n7 5.89242090747923886e-01 8.82813526834963225e-02 \n8 5.00000000000000000e-01 8.97232351781032667e-02 \n9 4.10757909252076059e-01 8.82813526834963225e-02 \n10 3.24384118273061850e-01 8.40020510782250179e-02 \n11 2.43654731456761503e-01 7.70228805384051418e-02 \n12 1.71164420391654609e-01 6.75681842342627376e-02 \n13 1.09242998051599288e-01 5.59419235967019840e-02 \n14 5.98804231365070508e-02 4.25180741585895888e-02 \n15 2.46622391156161198e-02 2.77297646869936014e-02 \n16 4.71226234279133183e-03 1.20741514342739657e-02 \n18\n0 9.95782584210465505e-01 1.08080067632416559e-02 \n1 9.77911974785698912e-01 2.48572744474848985e-02 \n2 9.46301233248777907e-01 3.82128651274445258e-02 \n3 9.01852479486261571e-01 5.04710220531435841e-02 \n4 8.45843521530176612e-01 6.12776033557392297e-02 \n5 7.79885415536973770e-01 7.03214573353253269e-02 \n6 7.05875580731421315e-01 7.73423375631326210e-02 \n7 6.25943112845752769e-01 8.21382418729163649e-02 \n8 5.42387506520867646e-01 8.45711914815718002e-02 \n9 4.57612493479132354e-01 8.45711914815718002e-02 \n10 3.74056887154247231e-01 8.21382418729163649e-02 \n11 2.94124419268578685e-01 7.73423375631326210e-02 \n12 2.20114584463026230e-01 7.03214573353253269e-02 \n13 1.54156478469823388e-01 6.12776033557392297e-02 \n14 9.81475205137384427e-02 5.04710220531435841e-02 \n15 5.36987667512221281e-02 3.82128651274445258e-02 \n16 2.20880252143011227e-02 2.48572744474848985e-02 \n17 4.21741578953452670e-03 1.08080067632416559e-02 \n19\n0 9.96203421921792232e-01 9.73089411486323906e-03 \n1 9.80104076067415009e-01 2.24071133828497998e-02 \n2 9.51577951807409006e-01 3.45222713688206131e-02 \n3 9.11357328268571409e-01 4.57450108112249995e-02 \n4 8.60483088667614693e-01 5.57833227736669948e-02 \n5 8.00272652330840550e-01 6.43769812696681071e-02 \n6 7.32285370687980497e-01 7.13033510868033016e-02 \n7 6.58282049981814943e-01 7.63830210329298348e-02 \n8 5.80179322820112642e-01 7.94844216969771700e-02 \n9 5.00000000000000000e-01 8.05272249243918492e-02 \n10 4.19820677179887303e-01 7.94844216969771700e-02 \n11 3.41717950018185057e-01 7.63830210329298348e-02 \n12 2.67714629312019503e-01 7.13033510868033016e-02 \n13 1.99727347669159477e-01 6.43769812696681071e-02 \n14 1.39516911332385307e-01 5.57833227736669948e-02 \n15 8.86426717314285906e-02 4.57450108112249995e-02 \n16 4.84220481925910495e-02 3.45222713688206131e-02 \n17 1.98959239325849843e-02 2.24071133828497998e-02 \n18 3.79657807820779842e-03 9.73089411486323906e-03 \n20\n0 9.96564299592547442e-01 8.80700356957605894e-03 \n1 9.81985963638956849e-01 2.03007149001934693e-02 \n2 9.56117214125662973e-01 3.13360241670545339e-02 \n3 9.19558485911109447e-01 4.16383707883523774e-02 \n4 8.73165953230075398e-01 5.09650599086202138e-02 \n5 8.18026840363257568e-01 5.90972659807592060e-02 \n6 7.55433500975413508e-01 6.58443192245883185e-02 \n7 6.86853044357709774e-01 7.10480546591910206e-02 \n8 6.13892925570822534e-01 7.45864932363018707e-02 \n9 5.38263260566748669e-01 7.63766935653629186e-02 \n10 4.61736739433251331e-01 7.63766935653629186e-02 \n11 3.86107074429177466e-01 7.45864932363018707e-02 \n12 3.13146955642290226e-01 7.10480546591910206e-02 \n13 2.44566499024586437e-01 6.58443192245883185e-02 \n14 1.81973159636742488e-01 5.90972659807592060e-02 \n15 1.26834046769924602e-01 5.09650599086202138e-02 \n16 8.04415140888905811e-02 4.16383707883523774e-02 \n17 4.38827858743370477e-02 3.13360241670545339e-02 \n18 1.80140363610431058e-02 2.03007149001934693e-02 \n19 3.43570040745253772e-03 8.80700356957605894e-03 \n21\n0 9.96876085310194782e-01 8.00861412888716727e-03 \n1 9.83613419283153156e-01 1.84768948854262469e-02 \n2 9.60049667075200452e-01 2.85672127134286025e-02 \n3 9.26681682291658593e-01 3.80500568141896520e-02 \n4 8.84219981737838889e-01 4.67222117280169311e-02 \n5 8.33569402098706114e-01 5.43986495835741893e-02 \n6 7.75809417943609914e-01 6.09157080268642667e-02 \n7 7.12171060103719444e-01 6.61344693166687342e-02 \n8 6.44010658401200531e-01 6.99436973955365748e-02 \n9 5.72780927080447588e-01 7.22622019949850231e-02 \n10 5.00000000000000000e-01 7.30405668248452072e-02 \n11 4.27219072919552467e-01 7.22622019949850231e-02 \n12 3.55989341598799469e-01 6.99436973955365748e-02 \n13 2.87828939896280611e-01 6.61344693166687342e-02 \n14 2.24190582056390086e-01 6.09157080268642667e-02 \n15 1.66430597901293831e-01 5.43986495835741893e-02 \n16 1.15780018262161041e-01 4.67222117280169311e-02 \n17 7.33183177083413518e-02 3.80500568141896520e-02 \n18 3.99503329247995823e-02 2.85672127134286025e-02 \n19 1.63865807168468540e-02 1.84768948854262469e-02 \n20 3.12391468980525002e-03 8.00861412888716727e-03 \n22\n0 9.97147292741199620e-01 7.31399764913609994e-03 \n1 9.85030248917714402e-01 1.68874507924070758e-02 \n2 9.63478386093586936e-01 2.61466675763416430e-02 \n3 9.32906288860150035e-01 3.48982342122602443e-02 \n4 8.93908402989604056e-01 4.29708031085338643e-02 \n5 8.47243631593341373e-01 5.02070722214404824e-02 \n6 7.93820201753455801e-01 5.64661480402696078e-02 \n7 7.34677918993378531e-01 6.16261884052562089e-02 \n8 6.70967910446042093e-01 6.55867523935311780e-02 \n9 6.03930213344110678e-01 6.82707491730075861e-02 \n10 5.34869636659861092e-01 6.96259364278159903e-02 \n11 4.65130363340138908e-01 6.96259364278159903e-02 \n12 3.96069786655889378e-01 6.82707491730075861e-02 \n13 3.29032089553957907e-01 6.55867523935311780e-02 \n14 2.65322081006621469e-01 6.16261884052562089e-02 \n15 2.06179798246544199e-01 5.64661480402696078e-02 \n16 1.52756368406658599e-01 5.02070722214404824e-02 \n17 1.06091597010395916e-01 4.29708031085338643e-02 \n18 6.70937111398499375e-02 3.48982342122602443e-02 \n19 3.65216139064130016e-02 2.61466675763416430e-02 \n20 1.49697510822856365e-02 1.68874507924070758e-02 \n21 2.85270725880035388e-03 7.31399764913609994e-03 \n23\n0 9.97384667498776079e-01 6.70592974357088565e-03 \n1 9.86271235609057606e-01 1.54940029284897224e-02 \n2 9.66485543413008075e-01 2.40188358655423345e-02 \n3 9.38376179135220867e-01 3.21162107042629250e-02 \n4 9.02444200809419894e-01 3.96407058883594746e-02 \n5 8.59330681565975141e-01 4.64578830300175771e-02 \n6 8.09804937881823061e-01 5.24460457322707060e-02 \n7 7.54750738923003706e-01 5.74983201112056821e-02 \n8 6.95150519015145463e-01 6.15245421533647668e-02 \n9 6.32067840485172505e-01 6.44528610940410807e-02 \n10 5.66628412149233096e-01 6.62310197023483066e-02 \n11 5.00000000000000000e-01 6.68272860930530926e-02 \n12 4.33371587850766959e-01 6.62310197023483066e-02 \n13 3.67932159514827550e-01 6.44528610940410807e-02 \n14 3.04849480984854593e-01 6.15245421533647668e-02 \n15 2.45249261076996239e-01 5.74983201112056821e-02 \n16 1.90195062118176911e-01 5.24460457322707060e-02 \n17 1.40669318434024915e-01 4.64578830300175771e-02 \n18 9.75557991905800503e-02 3.96407058883594746e-02 \n19 6.16238208647791677e-02 3.21162107042629250e-02 \n20 3.35144565869919461e-02 2.40188358655423345e-02 \n21 1.37287643909423836e-02 1.54940029284897224e-02 \n22 2.61533250122393838e-03 6.70592974357088565e-03 \n24\n0 9.97593609998510655e-01 6.17061489999360009e-03 \n1 9.87364277985654737e-01 1.42656943144668317e-02 \n2 9.69137276001366343e-01 2.21387194087099039e-02 \n3 9.43207763502200480e-01 2.96492924577183917e-02 \n4 9.10000992986951474e-01 3.66732407055401499e-02 \n5 8.70062095789277179e-01 4.30950807659766372e-02 \n6 8.24046825968487773e-01 4.88093260520569422e-02 \n7 7.72710735694419726e-01 5.37221350579828172e-02 \n8 7.16896753813022536e-01 5.77528340268627996e-02 \n9 6.57521339848081698e-01 6.08352364639016957e-02 \n10 5.95559433736808197e-01 6.29187281734141513e-02 \n11 5.32028446431302759e-01 6.39690976733760797e-02 \n12 4.67971553568697185e-01 6.39690976733760797e-02 \n13 4.04440566263191859e-01 6.29187281734141513e-02 \n14 3.42478660151918302e-01 6.08352364639016957e-02 \n15 2.83103246186977409e-01 5.77528340268627996e-02 \n16 2.27289264305580219e-01 5.37221350579828172e-02 \n17 1.75953174031512227e-01 4.88093260520569422e-02 \n18 1.29937904210722821e-01 4.30950807659766372e-02 \n19 8.99990070130485403e-02 3.66732407055401499e-02 \n20 5.67922364977994851e-02 2.96492924577183917e-02 \n21 3.08627239986336219e-02 2.21387194087099039e-02 \n22 1.26357220143452510e-02 1.42656943144668317e-02 \n23 2.40639000148931996e-03 6.17061489999360009e-03 \n25\n0 9.97778484895249007e-01 5.69689925051314414e-03 \n1 9.88331960729758707e-01 1.31774933075160684e-02 \n2 9.71487285614487162e-01 2.04695783506531545e-02 \n3 9.47495998939137718e-01 2.74523479879175969e-02 \n4 9.16721314380417041e-01 3.40191669061784552e-02 \n5 8.79629631518678790e-01 4.00703501675005111e-02 \n6 8.36783184236734146e-01 4.55141309914818271e-02 \n7 7.88831465120611419e-01 5.02679745335253211e-02 \n8 7.36501365722857515e-01 5.42598122371318256e-02 \n9 6.80586152904693931e-01 5.74291295728558207e-02 \n10 6.21933441860494263e-01 5.97278817678923851e-02 \n11 5.61432346305355212e-01 6.11212214951550176e-02 \n12 5.00000000000000000e-01 6.15880268633577227e-02 \n13 4.38567653694644788e-01 6.11212214951550176e-02 \n14 3.78066558139505793e-01 5.97278817678923851e-02 \n15 3.19413847095306069e-01 5.74291295728558207e-02 \n16 2.63498634277142540e-01 5.42598122371318256e-02 \n17 2.11168534879388525e-01 5.02679745335253211e-02 \n18 1.63216815763265827e-01 4.55141309914818271e-02 \n19 1.20370368481321183e-01 4.00703501675005111e-02 \n20 8.32786856195830011e-02 3.40191669061784552e-02 \n21 5.25040010608623167e-02 2.74523479879175969e-02 \n22 2.85127143855128315e-02 2.04695783506531545e-02 \n23 1.16680392702412442e-02 1.31774933075160684e-02 \n24 2.22151510475095083e-03 5.69689925051314414e-03 \n26\n0 9.97942850572808515e-01 5.27568630867150321e-03 \n1 9.89192722978235461e-01 1.22089255463159550e-02 \n2 9.73579533330857116e-01 1.89811916471813828e-02 \n3 9.51318930992153478e-01 2.54879126485739044e-02 \n4 9.22722971394248970e-01 3.16370231647874200e-02 \n5 8.88192974410339398e-01 3.73420748828298746e-02 \n6 8.48213630209978642e-01 4.25229471567426173e-02 \n7 8.03346146508808978e-01 4.71069001779570729e-02 \n8 7.54220357412252795e-01 5.10295805472127106e-02 \n9 7.01525877561743116e-01 5.42359202642882926e-02 \n10 6.46002419742978451e-01 5.66809082731598302e-02 \n11 5.88429410178445078e-01 5.83302217426482916e-02 \n12 5.29615046714656645e-01 5.91607076396311396e-02 \n13 4.70384953285343410e-01 5.91607076396311396e-02 \n14 4.11570589821554922e-01 5.83302217426482916e-02 \n15 3.53997580257021549e-01 5.66809082731598302e-02 \n16 2.98474122438256828e-01 5.42359202642882926e-02 \n17 2.45779642587747149e-01 5.10295805472127106e-02 \n18 1.96653853491190966e-01 4.71069001779570729e-02 \n19 1.51786369790021358e-01 4.25229471567426173e-02 \n20 1.11807025589660575e-01 3.73420748828298746e-02 \n21 7.72770286057509886e-02 3.16370231647874200e-02 \n22 4.86810690078464600e-02 2.54879126485739044e-02 \n23 2.64204666691428766e-02 1.89811916471813828e-02 \n24 1.08072770217645039e-02 1.22089255463159550e-02 \n25 2.05714942719153549e-03 5.27568630867150321e-03 \n27\n0 9.98089631444494252e-01 4.89949802564718009e-03 \n1 9.89961737980750600e-01 1.13431157980903117e-02 \n2 9.75450278907352475e-01 1.76485268787098561e-02 \n3 9.54741160338745565e-01 2.37247062603075307e-02 \n4 9.28103954009147247e-01 2.94917684299167981e-02 \n5 8.95885819535254146e-01 3.48744118831227981e-02 \n6 8.58506736869711795e-01 3.98024338865288832e-02 \n7 8.16453985973247587e-01 4.42115792718784720e-02 \n8 7.70275782289728483e-01 4.80443636850142533e-02 \n9 7.20574125875013460e-01 5.12508189088728972e-02 \n10 6.67996951819254448e-01 5.37891428942665895e-02 \n11 6.13229682719768410e-01 5.56262441784225944e-02 \n12 5.56986292804764971e-01 5.67381730544825741e-02 \n13 5.00000000000000000e-01 5.71104336894784903e-02 \n14 4.43013707195235029e-01 5.67381730544825741e-02 \n15 3.86770317280231590e-01 5.56262441784225944e-02 \n16 3.32003048180745552e-01 5.37891428942665895e-02 \n17 2.79425874124986540e-01 5.12508189088728972e-02 \n18 2.29724217710271544e-01 4.80443636850142533e-02 \n19 1.83546014026752413e-01 4.42115792718784720e-02 \n20 1.41493263130288149e-01 3.98024338865288832e-02 \n21 1.04114180464745881e-01 3.48744118831227981e-02 \n22 7.18960459908527527e-02 2.94917684299167981e-02 \n23 4.52588396612544491e-02 2.37247062603075307e-02 \n24 2.45497210926474974e-02 1.76485268787098561e-02 \n25 1.00382620192493877e-02 1.13431157980903117e-02 \n26 1.91036855550571648e-03 4.89949802564718009e-03 \n28\n0 9.98221248786977267e-01 4.56214129654725856e-03 \n1 9.90651582685436405e-01 1.05660562963856303e-02 \n2 9.77129640314469139e-01 1.64507138911521890e-02 \n3 9.57816513196066088e-01 2.21364673795021137e-02 \n4 9.32946261287197487e-01 2.75536728378583742e-02 \n5 9.02820685458589622e-01 3.26364619834998010e-02 \n6 8.67805439006815837e-01 3.73231071172843917e-02 \n7 8.28325547019432507e-01 4.15567086144506062e-02 \n8 7.84860235905700865e-01 4.52858721965164190e-02 \n9 7.37937112477559110e-01 4.84653289989649544e-02 \n10 6.88125758044539348e-01 5.10564837890303824e-02 \n11 6.36030813817589080e-01 5.30278829614232103e-02 \n12 5.82284641066690423e-01 5.43555961291470671e-02 \n13 5.27539644942017105e-01 5.50235065082375976e-02 \n14 4.72460355057982839e-01 5.50235065082375976e-02 \n15 4.17715358933309633e-01 5.43555961291470671e-02 \n16 3.63969186182410975e-01 5.30278829614232103e-02 \n17 3.11874241955460652e-01 5.10564837890303824e-02 \n18 2.62062887522440890e-01 4.84653289989649544e-02 \n19 2.15139764094299135e-01 4.52858721965164190e-02 \n20 1.71674452980567521e-01 4.15567086144506062e-02 \n21 1.32194560993184107e-01 3.73231071172843917e-02 \n22 9.71793145414104192e-02 3.26364619834998010e-02 \n23 6.70537387128024714e-02 2.75536728378583742e-02 \n24 4.21834868039339603e-02 2.21364673795021137e-02 \n25 2.28703596855309027e-02 1.64507138911521890e-02 \n26 9.34841731456362290e-03 1.05660562963856303e-02 \n27 1.77875121302277506e-03 4.56214129654725856e-03 \n29\n0 9.98339721130298230e-01 4.25845193937320499e-03 \n1 9.91272752630706577e-01 9.86604252806135354e-03 \n2 9.78642797889043847e-01 1.53702461010468104e-02 \n3 9.60590116476529365e-01 2.07010312593414181e-02 \n4 9.37318902460051340e-01 2.57974134512489600e-02 \n5 9.09092743807626169e-01 3.06015453285395679e-02 \n6 8.76231425867238567e-01 3.50589666275256395e-02 \n7 8.39107268801343231e-01 3.91191635678818928e-02 \n8 7.98140898569113855e-01 4.27361286830862663e-02 \n9 7.53796477562113765e-01 4.58688785696293802e-02 \n10 7.06576444087004374e-01 4.84819170472043023e-02 \n11 6.57015818933819995e-01 5.05456368799574798e-02 \n12 6.05676143083000551e-01 5.20366550388646903e-02 \n13 5.53139115066339615e-01 5.29380775486604713e-02 \n14 5.00000000000000000e-01 5.32396908591571197e-02 \n15 4.46860884933660385e-01 5.29380775486604713e-02 \n16 3.94323856916999449e-01 5.20366550388646903e-02 \n17 3.42984181066180005e-01 5.05456368799574798e-02 \n18 2.93423555912995682e-01 4.84819170472043023e-02 \n19 2.46203522437886180e-01 4.58688785696293802e-02 \n20 2.01859101430886090e-01 4.27361286830862663e-02 \n21 1.60892731198656741e-01 3.91191635678818928e-02 \n22 1.23768574132761433e-01 3.50589666275256395e-02 \n23 9.09072561923737754e-02 3.06015453285395679e-02 \n24 6.26810975399486048e-02 2.57974134512489600e-02 \n25 3.94098835234706069e-02 2.07010312593414181e-02 \n26 2.13572021109561354e-02 1.53702461010468104e-02 \n27 8.72724736929341230e-03 9.86604252806135354e-03 \n28 1.66027886970170698e-03 4.25845193937320499e-03 \n30\n0 9.98446742037324753e-01 3.98409624808330250e-03 \n1 9.91834061639873643e-01 9.23323415554547916e-03 \n2 9.80010932484153718e-01 1.43923539416616845e-02 \n3 9.63100023714637210e-01 1.93995962848135250e-02 \n4 9.41280267896026368e-01 2.42013364152970263e-02 \n5 9.14782881191384178e-01 2.87465781088095326e-02 \n6 8.83888716052413148e-01 3.29871149410902453e-02 \n7 8.48925247396657867e-01 3.68779873688526022e-02 \n8 8.10263091494621390e-01 4.03779476147101066e-02 \n9 7.68312074071009987e-01 4.34498936005414879e-02 \n10 7.23516884769044522e-01 4.60612611188930612e-02 \n11 6.76352362765439086e-01 4.81843685873221267e-02 \n12 6.27318463083944899e-01 4.97967102933976336e-02 \n13 5.76934956804291743e-01 5.08811948742027495e-02 \n14 5.25735921277658891e-01 5.14263264467794204e-02 \n15 4.74264078722341165e-01 5.14263264467794204e-02 \n16 4.23065043195708201e-01 5.08811948742027495e-02 \n17 3.72681536916055101e-01 4.97967102933976336e-02 \n18 3.23647637234560914e-01 4.81843685873221267e-02 \n19 2.76483115230955423e-01 4.60612611188930612e-02 \n20 2.31687925928990041e-01 4.34498936005414879e-02 \n21 1.89736908505378554e-01 4.03779476147101066e-02 \n22 1.51074752603342105e-01 3.68779873688526022e-02 \n23 1.16111283947586907e-01 3.29871149410902453e-02 \n24 8.52171188086157938e-02 2.87465781088095326e-02 \n25 5.87197321039736597e-02 2.42013364152970263e-02 \n26 3.68999762853628385e-02 1.93995962848135250e-02 \n27 1.99890675158462434e-02 1.43923539416616845e-02 \n28 8.16593836012639504e-03 9.23323415554547916e-03 \n29 1.55325796267522984e-03 3.98409624808330250e-03 \n31\n0 9.98543740909738520e-01 3.73541578962438775e-03 \n1 9.92342954832576174e-01 8.65931039515529036e-03 \n2 9.81251962546474843e-01 1.35045095924897114e-02 \n3 9.65378498948324060e-01 1.82161369561927335e-02 \n4 9.44880014974135540e-01 2.27468537636005518e-02 \n5 9.19960160073133637e-01 2.70515412124584277e-02 \n6 8.90866574208312501e-01 3.10873932805142139e-02 \n7 8.57888392293426616e-01 3.48142916177051828e-02 \n8 8.21353361462130227e-01 3.81951932993883081e-02 \n9 7.81624580703574656e-01 4.11964958807946313e-02 \n10 7.39096891022451241e-01 4.37883703042389397e-02 \n11 6.94192950804116471e-01 4.59450569468207379e-02 \n12 6.47359034990850790e-01 4.76451214561597544e-02 \n13 5.99060599667785354e-01 4.88716676931643598e-02 \n14 5.49777656076170795e-01 4.96125056133361539e-02 \n15 5.00000000000000000e-01 4.98602723967132289e-02 \n16 4.50222343923829260e-01 4.96125056133361539e-02 \n17 4.00939400332214702e-01 4.88716676931643598e-02 \n18 3.52640965009149210e-01 4.76451214561597544e-02 \n19 3.05807049195883529e-01 4.59450569468207379e-02 \n20 2.60903108977548759e-01 4.37883703042389397e-02 \n21 2.18375419296425372e-01 4.11964958807946313e-02 \n22 1.78646638537869829e-01 3.81951932993883081e-02 \n23 1.42111607706573356e-01 3.48142916177051828e-02 \n24 1.09133425791687527e-01 3.10873932805142139e-02 \n25 8.00398399268663352e-02 2.70515412124584277e-02 \n26 5.51199850258644805e-02 2.27468537636005518e-02 \n27 3.46215010516759195e-02 1.82161369561927335e-02 \n28 1.87480374535251675e-02 1.35045095924897114e-02 \n29 7.65704516742375836e-03 8.65931039515529036e-03 \n30 1.45625909026146291e-03 3.73541578962438775e-03 \n32\n0 9.98631930924740785e-01 3.50930500473504818e-03 \n1 9.92805755772634191e-01 8.13719736545283519e-03 \n2 9.82381127793753195e-01 1.26960326546310294e-02 \n3 9.67453037968869833e-01 1.71369314565107157e-02 \n4 9.48160577883026101e-01 2.14179490111133415e-02 \n5 9.24683806866284930e-01 2.54990296311880874e-02 \n6 8.97241897983971137e-01 2.93420467392677721e-02 \n7 8.66091059370144856e-01 3.29111113881809247e-02 \n8 8.31522133465107616e-01 3.61728970544242523e-02 \n9 7.93857878620381152e-01 3.90969478935351555e-02 \n10 7.53449954466114735e-01 4.16559621134733743e-02 \n11 7.10675638065317639e-01 4.38260465022019055e-02 \n12 6.65934301141063778e-01 4.55869393478819385e-02 \n13 6.19643681126068491e-01 4.69221995404022832e-02 \n14 5.72235980791398258e-01 4.78193600396374305e-02 \n15 5.24153832843869183e-01 4.82700442573638991e-02 \n16 4.75846167156130817e-01 4.82700442573638991e-02 \n17 4.27764019208601742e-01 4.78193600396374305e-02 \n18 3.80356318873931454e-01 4.69221995404022832e-02 \n19 3.34065698858936166e-01 4.55869393478819385e-02 \n20 2.89324361934682306e-01 4.38260465022019055e-02 \n21 2.46550045533885293e-01 4.16559621134733743e-02 \n22 2.06142121379618848e-01 3.90969478935351555e-02 \n23 1.68477866534892384e-01 3.61728970544242523e-02 \n24 1.33908940629855144e-01 3.29111113881809247e-02 \n25 1.02758102016028793e-01 2.93420467392677721e-02 \n26 7.53161931337150148e-02 2.54990296311880874e-02 \n27 5.18394221169739405e-02 2.14179490111133415e-02 \n28 3.25469620311301527e-02 1.71369314565107157e-02 \n29 1.76188722062467842e-02 1.26960326546310294e-02 \n30 7.19424422736583257e-03 8.13719736545283519e-03 \n31 1.36806907525921810e-03 3.50930500473504818e-03 \n33\n0 9.98712347123227540e-01 3.30311392379368900e-03 \n1 9.93227863115321297e-01 7.66085075646733785e-03 \n2 9.83411454844996369e-01 1.19577740508747393e-02 \n3 9.69347186305584141e-01 1.61501793161644772e-02 \n4 9.51158383871716806e-01 2.02007706658347969e-02 \n5 9.29004826338251988e-01 2.40738714093558480e-02 \n6 9.03081178137083329e-01 2.77354233158317795e-02 \n7 8.73615248224781094e-01 3.11532412651587404e-02 \n8 8.40865979984871448e-01 3.42972864093283591e-02 \n9 8.05121172918189520e-01 3.71399274219770745e-02 \n10 7.66694952393173867e-01 3.96561823974433680e-02 \n11 7.25925008636225333e-01 4.18239380335193520e-02 \n12 6.83169628874036650e-01 4.36241438094221654e-02 \n13 6.38804548576248465e-01 4.50409793303192876e-02 \n14 5.93219649413995742e-01 4.60619933216584246e-02 \n15 5.46815532927366732e-01 4.66782130327980591e-02 \n16 5.00000000000000000e-01 4.68842230801049947e-02 \n17 4.53184467072633324e-01 4.66782130327980591e-02 \n18 4.06780350586004202e-01 4.60619933216584246e-02 \n19 3.61195451423751479e-01 4.50409793303192876e-02 \n20 3.16830371125963350e-01 4.36241438094221654e-02 \n21 2.74074991363774667e-01 4.18239380335193520e-02 \n22 2.33305047606826188e-01 3.96561823974433680e-02 \n23 1.94878827081810480e-01 3.71399274219770745e-02 \n24 1.59134020015128608e-01 3.42972864093283591e-02 \n25 1.26384751775218906e-01 3.11532412651587404e-02 \n26 9.69188218629166987e-02 2.77354233158317795e-02 \n27 7.09951736617479706e-02 2.40738714093558480e-02 \n28 4.88416161282832079e-02 2.02007706658347969e-02 \n29 3.06528136944158244e-02 1.61501793161644772e-02 \n30 1.65885451550036173e-02 1.19577740508747393e-02 \n31 6.77213688467875625e-03 7.66085075646733785e-03 \n32 1.28765287677239126e-03 3.30311392379368900e-03 \n34\n0 9.98785876895420976e-01 3.11457027795434237e-03 \n1 9.93613908203154761e-01 7.22508137429751784e-03 \n2 9.84354131266672150e-01 1.12818609927474844e-02 \n3 9.71081198702553494e-01 1.52456903192230656e-02 \n4 9.53904838859162219e-01 1.90832968981937585e-02 \n5 9.32967319167282261e-01 2.27628057616766355e-02 \n6 9.08442113950466812e-01 2.62537072863390543e-02 \n7 8.80532438314936439e-01 2.95270679137622470e-02 \n8 8.49469556608131393e-01 3.25557607770382076e-02 \n9 8.15510863540264253e-01 3.53146879071278633e-02 \n10 7.78937750334873336e-01 3.77809873300159679e-02 \n11 7.40053272595163514e-01 3.99342221698859232e-02 \n12 6.99179638879322995e-01 4.17565498499228305e-02 \n13 6.56655540669731641e-01 4.32328698735178762e-02 \n14 6.12833345808224683e-01 4.43509489178469316e-02 \n15 5.68076178629591477e-01 4.51015221853203613e-02 \n16 5.22754910976551246e-01 4.54783701651299346e-02 \n17 4.77245089023448754e-01 4.54783701651299346e-02 \n18 4.31923821370408523e-01 4.51015221853203613e-02 \n19 3.87166654191775261e-01 4.43509489178469316e-02 \n20 3.43344459330268359e-01 4.32328698735178762e-02 \n21 3.00820361120677005e-01 4.17565498499228305e-02 \n22 2.59946727404836486e-01 3.99342221698859232e-02 \n23 2.21062249665126664e-01 3.77809873300159679e-02 \n24 1.84489136459735720e-01 3.53146879071278633e-02 \n25 1.50530443391868551e-01 3.25557607770382076e-02 \n26 1.19467561685063492e-01 2.95270679137622470e-02 \n27 9.15578860495331603e-02 2.62537072863390543e-02 \n28 6.70326808327177670e-02 2.27628057616766355e-02 \n29 4.60951611408377676e-02 1.90832968981937585e-02 \n30 2.89188012974464538e-02 1.52456903192230656e-02 \n31 1.56458687333278605e-02 1.12818609927474844e-02 \n32 6.38609179684525730e-03 7.22508137429751784e-03 \n33 1.21412310457904042e-03 3.11457027795434237e-03 \n35\n0 9.98853284549800158e-01 2.94171671022154264e-03 \n1 9.93967882221925780e-01 6.82541417418074635e-03 \n2 9.85218808019614922e-01 1.06614899557417910e-02 \n3 9.72672574103913612e-01 1.44146300544471268e-02 \n4 9.56427130679658788e-01 1.80550579317316912e-02 \n5 9.36609562512611182e-01 2.15542111630851081e-02 \n6 9.13374949546112758e-01 2.48846852006767635e-02 \n7 8.86905126143456290e-01 2.80204081061850643e-02 \n8 8.57407250778314367e-01 3.09368359830400931e-02 \n9 8.25112182332945143e-01 3.36111426345434491e-02 \n10 7.90272672374882301e-01 3.60223973862800334e-02 \n11 7.53161386620744278e-01 3.81517285777210266e-02 \n12 7.14068770758907068e-01 3.99824711211621345e-02 \n13 6.73300777215406931e-01 4.15002968644282919e-02 \n14 6.31176470604647988e-01 4.26933266960495619e-02 \n15 5.88025530582994782e-01 4.35522234985917661e-02 \n16 5.44185671637829604e-01 4.40702652151377314e-02 \n17 5.00000000000000000e-01 4.42433974535521440e-02 \n18 4.55814328362170396e-01 4.40702652151377314e-02 \n19 4.11974469417005218e-01 4.35522234985917661e-02 \n20 3.68823529395351957e-01 4.26933266960495619e-02 \n21 3.26699222784593013e-01 4.15002968644282919e-02 \n22 2.85931229241092877e-01 3.99824711211621345e-02 \n23 2.46838613379255695e-01 3.81517285777210266e-02 \n24 2.09727327625117754e-01 3.60223973862800334e-02 \n25 1.74887817667054801e-01 3.36111426345434491e-02 \n26 1.42592749221685605e-01 3.09368359830400931e-02 \n27 1.13094873856543723e-01 2.80204081061850643e-02 \n28 8.66250504538872979e-02 2.48846852006767635e-02 \n29 6.33904374873888316e-02 2.15542111630851081e-02 \n30 4.35728693203411913e-02 1.80550579317316912e-02 \n31 2.73274258960863360e-02 1.44146300544471268e-02 \n32 1.47811919803850830e-02 1.06614899557417910e-02 \n33 6.03211777807425090e-03 6.82541417418074635e-03 \n34 1.14671545019985133e-03 2.94171671022154264e-03 \n36\n0 9.98915231242042956e-01 2.78285983212252274e-03 \n1 9.94293239451106148e-01 6.45797364203278684e-03 \n2 9.86013845524848942e-01 1.00907576488677361e-02 \n3 9.74136492199753734e-01 1.36493107492843893e-02 \n4 9.58748887257829585e-01 1.71069053851536160e-02 \n5 9.39964900445198537e-01 2.04378754618224460e-02 \n6 9.17923583496237594e-01 2.36175417451329889e-02 \n7 8.92788115066103227e-01 2.66223569888799604e-02 \n8 8.64744585796778265e-01 2.94300721226624096e-02 \n9 8.34000618292760509e-01 3.20198986775077424e-02 \n10 8.00783829067990283e-01 3.43726619178682247e-02 \n11 7.65340142963122583e-01 3.64709425028265297e-02 \n12 7.27931972216710133e-01 3.82992053229353341e-02 \n13 6.88836273559844559e-01 3.98439144560358005e-02 \n14 6.48342497672014129e-01 4.10936333521698532e-02 \n15 6.06750446158432766e-01 4.20391094898309656e-02 \n16 5.64368051904692414e-01 4.26733428696693118e-02 \n17 5.21509099236854290e-01 4.29916378351973757e-02 \n18 4.78490900763145710e-01 4.29916378351973757e-02 \n19 4.35631948095307586e-01 4.26733428696693118e-02 \n20 3.93249553841567234e-01 4.20391094898309656e-02 \n21 3.51657502327985871e-01 4.10936333521698532e-02 \n22 3.11163726440155386e-01 3.98439144560358005e-02 \n23 2.72068027783289867e-01 3.82992053229353341e-02 \n24 2.34659857036877417e-01 3.64709425028265297e-02 \n25 1.99216170932009717e-01 3.43726619178682247e-02 \n26 1.65999381707239463e-01 3.20198986775077424e-02 \n27 1.35255414203221708e-01 2.94300721226624096e-02 \n28 1.07211884933896745e-01 2.66223569888799604e-02 \n29 8.20764165037623505e-02 2.36175417451329889e-02 \n30 6.00350995548014355e-02 2.04378754618224460e-02 \n31 4.12511127421704704e-02 1.71069053851536160e-02 \n32 2.58635078002462278e-02 1.36493107492843893e-02 \n33 1.39861544751510251e-02 1.00907576488677361e-02 \n34 5.70676054889388083e-03 6.45797364203278684e-03 \n35 1.08476875795708192e-03 2.78285983212252274e-03 \n37\n0 9.98972291238956811e-01 2.63652863974896947e-03 \n1 9.94592981607159587e-01 6.11939005015377843e-03 \n2 9.86746515028242843e-01 9.56452224454198280e-03 \n3 9.75486171631047450e-01 1.29430184952794673e-02 \n4 9.60890718706231883e-01 1.62308199237607420e-02 \n5 9.43062481077743042e-01 1.94048012509672706e-02 \n6 9.22126493670277991e-01 2.24426823312185823e-02 \n7 8.98229600254951133e-01 2.53231488274123021e-02 \n8 8.71539416990982585e-01 2.80259939991374593e-02 \n9 8.42243154565479712e-01 3.05322582616129948e-02 \n10 8.10546304204462276e-01 3.28243614363756264e-02 \n11 7.76671195930790925e-01 3.48862257778501730e-02 \n12 7.40855438901602770e-01 3.67033886242440835e-02 \n13 7.03350254659163010e-01 3.82631037852646169e-02 \n14 6.64418714941853450e-01 3.95544309187646909e-02 \n15 6.24333896395682819e-01 4.05683122542325122e-02 \n16 5.83376965119925983e-01 4.12976361182186280e-02 \n17 5.41835204477384980e-01 4.17372868129313943e-02 \n18 5.00000000000000000e-01 4.18841804965694522e-02 \n19 4.58164795522615020e-01 4.17372868129313943e-02 \n20 4.16623034880074017e-01 4.12976361182186280e-02 \n21 3.75666103604317125e-01 4.05683122542325122e-02 \n22 3.35581285058146495e-01 3.95544309187646909e-02 \n23 2.96649745340836934e-01 3.82631037852646169e-02 \n24 2.59144561098397230e-01 3.67033886242440835e-02 \n25 2.23328804069209103e-01 3.48862257778501730e-02 \n26 1.89453695795537752e-01 3.28243614363756264e-02 \n27 1.57756845434520315e-01 3.05322582616129948e-02 \n28 1.28460583009017359e-01 2.80259939991374593e-02 \n29 1.01770399745048853e-01 2.53231488274123021e-02 \n30 7.78735063297220087e-02 2.24426823312185823e-02 \n31 5.69375189222569578e-02 1.94048012509672706e-02 \n32 3.91092812937681306e-02 1.62308199237607420e-02 \n33 2.45138283689525886e-02 1.29430184952794673e-02 \n34 1.32534849717571273e-02 9.56452224454198280e-03 \n35 5.40701839284040645e-03 6.11939005015377843e-03 \n36 1.02770876104317553e-03 2.63652863974896947e-03 \n38\n0 9.99024965267843790e-01 2.50144037481967287e-03 \n1 9.94869727133192772e-01 5.80672235823433656e-03 \n2 9.87423164295076705e-01 9.07828885480661818e-03 \n3 9.76733165466764808e-01 1.22898698691161871e-02 \n4 9.62870666024292166e-01 1.54197502725875266e-02 \n5 9.45927869502316110e-01 1.84470407970123706e-02 \n6 9.26017510966181123e-01 2.13515792523372161e-02 \n7 9.03272083802658443e-01 2.41140309303793411e-02 \n8 8.77842951876985356e-01 2.67160099551661603e-02 \n9 8.49899340189592123e-01 2.91401995734986013e-02 \n10 8.19627207914840894e-01 3.13704666960665235e-02 \n11 7.87228010523903565e-01 3.33919689895702046e-02 \n12 7.52917358963965500e-01 3.51912535334494778e-02 \n13 7.16923584716188222e-01 3.67563462923717263e-02 \n14 6.79486220239717498e-01 3.80768317742231979e-02 \n15 6.40854404895082608e-01 3.91439223291054766e-02 \n16 6.01285226946058349e-01 3.99505166217639096e-02 \n17 5.61042012668933721e-01 4.04912468852985513e-02 \n18 5.20392573952289106e-01 4.07625146401928914e-02 \n19 4.79607426047710894e-01 4.07625146401928914e-02 \n20 4.38957987331066279e-01 4.04912468852985513e-02 \n21 3.98714773053941651e-01 3.99505166217639096e-02 \n22 3.59145595104917392e-01 3.91439223291054766e-02 \n23 3.20513779760282502e-01 3.80768317742231979e-02 \n24 2.83076415283811778e-01 3.67563462923717263e-02 \n25 2.47082641036034445e-01 3.51912535334494778e-02 \n26 2.12771989476096463e-01 3.33919689895702046e-02 \n27 1.80372792085159134e-01 3.13704666960665235e-02 \n28 1.50100659810407822e-01 2.91401995734986013e-02 \n29 1.22157048123014658e-01 2.67160099551661603e-02 \n30 9.67279161973415846e-02 2.41140309303793411e-02 \n31 7.39824890338189045e-02 2.13515792523372161e-02 \n32 5.40721304976838901e-02 1.84470407970123706e-02 \n33 3.71293339757077998e-02 1.54197502725875266e-02 \n34 2.32668345332352026e-02 1.22898698691161871e-02 \n35 1.25768357049232463e-02 9.07828885480661818e-03 \n36 5.13027286680721364e-03 5.80672235823433656e-03 \n37 9.75034732156190116e-04 2.50144037481967287e-03 \n39\n0 9.99073691533216457e-01 2.37647234581755051e-03 \n1 9.95125768427343016e-01 5.51739446958229678e-03 \n2 9.88049354666735491e-01 8.62811454686245906e-03 \n3 9.77887606162326173e-01 1.16846924160890816e-02 \n4 9.64704574243369084e-01 1.46674779919516891e-02 \n5 9.48583559646496433e-01 1.75575557490656661e-02 \n6 9.29626468999953048e-01 2.03366384239669212e-02 \n7 9.07953148715071601e-01 2.29871505544583174e-02 \n8 8.83700621465531744e-01 2.54923326460647012e-02 \n9 8.57022217947267295e-01 2.78363451704581495e-02 \n10 8.28086606716005424e-01 3.00043680442980756e-02 \n11 7.97076727478639002e-01 3.19826940693411915e-02 \n12 7.64188634330218775e-01 3.37588154831156353e-02 \n13 7.29630256154568002e-01 3.53215029853043774e-02 \n14 6.93620081985780734e-01 3.66608767071343114e-02 \n15 6.56385779624092947e-01 3.77684686614180309e-02 \n16 6.18162756230917876e-01 3.86372762723410090e-02 \n17 5.79192669998918941e-01 3.92618066436855873e-02 \n18 5.39721902304377776e-01 3.96381112841842354e-02 \n19 5.00000000000000000e-01 3.97638110697214262e-02 \n20 4.60278097695622279e-01 3.96381112841842354e-02 \n21 4.20807330001081115e-01 3.92618066436855873e-02 \n22 3.81837243769082124e-01 3.86372762723410090e-02 \n23 3.43614220375907053e-01 3.77684686614180309e-02 \n24 3.06379918014219266e-01 3.66608767071343114e-02 \n25 2.70369743845431998e-01 3.53215029853043774e-02 \n26 2.35811365669781253e-01 3.37588154831156353e-02 \n27 2.02923272521360998e-01 3.19826940693411915e-02 \n28 1.71913393283994548e-01 3.00043680442980756e-02 \n29 1.42977782052732649e-01 2.78363451704581495e-02 \n30 1.16299378534468256e-01 2.54923326460647012e-02 \n31 9.20468512849284409e-02 2.29871505544583174e-02 \n32 7.03735310000469239e-02 2.03366384239669212e-02 \n33 5.14164403535035536e-02 1.75575557490656661e-02 \n34 3.52954257566308882e-02 1.46674779919516891e-02 \n35 2.21123938376738619e-02 1.16846924160890816e-02 \n36 1.19506453332644726e-02 8.62811454686245906e-03 \n37 4.87423157265700832e-03 5.51739446958229678e-03 \n38 9.26308466783546964e-04 2.37647234581755051e-03 \n40\n0 9.99118854855279626e-01 2.26063854926659546e-03 \n1 9.95363119349728542e-01 5.24914226557640640e-03 \n2 9.88629974991887095e-01 8.21052919095394476e-03 \n3 9.78958409606895841e-01 1.11229245970834792e-02 \n4 9.66406404139338315e-01 1.39685034900116998e-02 \n5 9.51049403484437117e-01 1.67300976412739222e-02 \n6 9.32979751606129781e-01 1.93910839872360082e-02 \n7 9.12306115416655850e-01 2.19354540928366343e-02 \n8 8.89152825713259709e-01 2.43479038175361158e-02 \n9 8.63659127594963549e-01 2.66139234919684116e-02 \n10 8.35978342307089783e-01 2.87198845496957761e-02 \n11 8.06276944833990150e-01 3.06531212464644688e-02 \n12 7.74733562547564092e-01 3.24020067283005211e-02 \n13 7.41537900843089348e-01 3.39560229076169492e-02 \n14 7.06889602185802435e-01 3.53058236956433902e-02 \n15 6.70997045412879189e-01 3.64432911979020308e-02 \n16 6.34076092503626843e-01 3.73615845289841306e-02 \n17 5.96348790350685554e-01 3.80551809503131208e-02 \n18 5.58042035337627640e-01 3.85199090821239792e-02 \n19 5.19386208753025436e-01 3.87529739892124026e-02 \n20 4.80613791246974564e-01 3.87529739892124026e-02 \n21 4.41957964662372416e-01 3.85199090821239792e-02 \n22 4.03651209649314446e-01 3.80551809503131208e-02 \n23 3.65923907496373157e-01 3.73615845289841306e-02 \n24 3.29002954587120755e-01 3.64432911979020308e-02 \n25 2.93110397814197510e-01 3.53058236956433902e-02 \n26 2.58462099156910652e-01 3.39560229076169492e-02 \n27 2.25266437452435908e-01 3.24020067283005211e-02 \n28 1.93723055166009878e-01 3.06531212464644688e-02 \n29 1.64021657692910217e-01 2.87198845496957761e-02 \n30 1.36340872405036451e-01 2.66139234919684116e-02 \n31 1.10847174286740305e-01 2.43479038175361158e-02 \n32 8.76938845833441644e-02 2.19354540928366343e-02 \n33 6.70202483938702465e-02 1.93910839872360082e-02 \n34 4.89505965155628484e-02 1.67300976412739222e-02 \n35 3.35935958606617333e-02 1.39685034900116998e-02 \n36 2.10415903931041731e-02 1.11229245970834792e-02 \n37 1.13700250081128686e-02 8.21052919095394476e-03 \n38 4.63688065027149671e-03 5.24914226557640640e-03 \n39 8.81145144720399788e-04 2.26063854926659546e-03 \n41\n0 9.99160794287385690e-01 2.15307017908244374e-03 \n1 9.95583554849508112e-01 4.99996938695297308e-03 \n2 9.89169336780541641e-01 7.82246920390929426e-03 \n3 9.79953445865173078e-01 1.06005316843897773e-02 \n4 9.67988493748926926e-01 1.33179496035552222e-02 \n5 9.53342972379050524e-01 1.59591058658496397e-02 \n6 9.36100755846220656e-01 1.85088583517539935e-02 \n7 9.16360600200680664e-01 2.09525975979548452e-02 \n8 8.94235572523704669e-01 2.32763241845071710e-02 \n9 8.69852401534963127e-01 2.54667271473087466e-02 \n10 8.43350751017475586e-01 2.75112596212893704e-02 \n11 8.14882419536098190e-01 2.93982104749359735e-02 \n12 7.84610470805107929e-01 3.11167712904831598e-02 \n13 7.52708299599702979e-01 3.26570982267637075e-02 \n14 7.19358638525703586e-01 3.40103683804383813e-02 \n15 6.84752511320240731e-01 3.51688303104087455e-02 \n16 6.49088138670912418e-01 3.61258484305115382e-02 \n17 6.12569802816711362e-01 3.68759410136117322e-02 \n18 5.75406677431996028e-01 3.74148115881107746e-02 \n19 5.37811629494581500e-01 3.77393735463579100e-02 \n20 5.00000000000000000e-01 3.78477678236491880e-02 \n21 4.62188370505418500e-01 3.77393735463579100e-02 \n22 4.24593322568003917e-01 3.74148115881107746e-02 \n23 3.87430197183288638e-01 3.68759410136117322e-02 \n24 3.50911861329087582e-01 3.61258484305115382e-02 \n25 3.15247488679759269e-01 3.51688303104087455e-02 \n26 2.80641361474296469e-01 3.40103683804383813e-02 \n27 2.47291700400296993e-01 3.26570982267637075e-02 \n28 2.15389529194892071e-01 3.11167712904831598e-02 \n29 1.85117580463901837e-01 2.93982104749359735e-02 \n30 1.56649248982524358e-01 2.75112596212893704e-02 \n31 1.30147598465036901e-01 2.54667271473087466e-02 \n32 1.05764427476295317e-01 2.32763241845071710e-02 \n33 8.36393997993193361e-02 2.09525975979548452e-02 \n34 6.38992441537792888e-02 1.85088583517539935e-02 \n35 4.66570276209494136e-02 1.59591058658496397e-02 \n36 3.20115062510730880e-02 1.33179496035552222e-02 \n37 2.00465541348268869e-02 1.06005316843897773e-02 \n38 1.08306632194583082e-02 7.82246920390929426e-03 \n39 4.41644515049184616e-03 4.99996938695297308e-03 \n40 8.39205712614279203e-04 2.15307017908244374e-03 \n42\n0 9.99199809495031177e-01 2.05299930232454237e-03 \n1 9.95788644170430448e-01 4.76811015087425134e-03 \n2 9.89671254031874059e-01 7.46122184867874672e-03 \n3 9.80879682669102193e-01 1.01139347845263221e-02 \n4 9.69461778677494057e-01 1.27114797630565237e-02 \n5 9.55479862452063733e-01 1.52396203498017333e-02 \n6 9.39010284906086401e-01 1.76845355487960550e-02 \n7 9.20142991630908402e-01 2.00328675903461290e-02 \n8 8.98981026627743707e-01 2.22717888859829405e-02 \n9 8.75639967844740186e-01 2.43890703964016221e-02 \n10 8.50247295278085624e-01 2.63731478495870357e-02 \n11 8.22941694434623949e-01 2.82131846790091914e-02 \n12 7.93872298742554605e-01 2.98991311137933279e-02 \n13 7.63197874965596101e-01 3.14217790225012894e-02 \n14 7.31085956035210982e-01 3.27728121824544874e-02 \n15 6.97711926021487461e-01 3.39448516882609741e-02 \n16 6.63258062232705781e-01 3.49314962462970793e-02 \n17 6.27912539671439562e-01 3.57273571325854924e-02 \n18 5.91868403282427291e-01 3.63280876219020527e-02 \n19 5.55322513604259882e-01 3.67304067267337636e-02 \n20 5.18474471582675900e-01 3.69321171160864395e-02 \n21 4.81525528417324100e-01 3.69321171160864395e-02 \n22 4.44677486395740063e-01 3.67304067267337636e-02 \n23 4.08131596717572709e-01 3.63280876219020527e-02 \n24 3.72087460328560438e-01 3.57273571325854924e-02 \n25 3.36741937767294219e-01 3.49314962462970793e-02 \n26 3.02288073978512484e-01 3.39448516882609741e-02 \n27 2.68914043964789018e-01 3.27728121824544874e-02 \n28 2.36802125034403843e-01 3.14217790225012894e-02 \n29 2.06127701257445339e-01 2.98991311137933279e-02 \n30 1.77058305565376078e-01 2.82131846790091914e-02 \n31 1.49752704721914404e-01 2.63731478495870357e-02 \n32 1.24360032155259759e-01 2.43890703964016221e-02 \n33 1.01018973372256293e-01 2.22717888859829405e-02 \n34 7.98570083690915422e-02 2.00328675903461290e-02 \n35 6.09897150939136268e-02 1.76845355487960550e-02 \n36 4.45201375479362740e-02 1.52396203498017333e-02 \n37 3.05382213225059117e-02 1.27114797630565237e-02 \n38 1.91203173308977549e-02 1.01139347845263221e-02 \n39 1.03287459681259026e-02 7.46122184867874672e-03 \n40 4.21135582956953976e-03 4.76811015087425134e-03 \n41 8.00190504968792469e-04 2.05299930232454237e-03 \n43\n0 9.99236166121253877e-01 1.95974512692206372e-03 \n1 9.95979778796622028e-01 4.55199831870070192e-03 \n2 9.90139110490127705e-01 7.12437821578824296e-03 \n3 9.81743306507040003e-01 9.65995071184195045e-03 \n4 9.70835978423818968e-01 1.21452283069194075e-02 \n5 9.57473953603069416e-01 1.45672066307492472e-02 \n6 9.41726882609308369e-01 1.69132460434301447e-02 \n7 9.23676858104657494e-01 1.91711110970663283e-02 \n8 9.03417982068469350e-01 2.13290285989910407e-02 \n9 8.81055873597477612e-01 2.33757473771732879e-02 \n10 8.56707117634478488e-01 2.53005963921950766e-02 \n11 8.30498656875749086e-01 2.70935401594408938e-02 \n12 8.02567129819800495e-01 2.87452309784552579e-02 \n13 7.73058158330042322e-01 3.02470576249956463e-02 \n14 7.42125588392867352e-01 3.15911902246980569e-02 \n15 7.09930688014634659e-01 3.27706210631613995e-02 \n16 6.76641306432151923e-01 3.37792011146825846e-02 \n17 6.42430999016456838e-01 3.46116720968283401e-02 \n18 6.07478122430259115e-01 3.52636938825425170e-02 \n19 5.71964904755356662e-01 3.57318671262570678e-02 \n20 5.36076495437293077e-01 3.60137509857109891e-02 \n21 5.00000000000000000e-01 3.61078758468994926e-02 \n22 4.63923504562706868e-01 3.60137509857109891e-02 \n23 4.28035095244643338e-01 3.57318671262570678e-02 \n24 3.92521877569740885e-01 3.52636938825425170e-02 \n25 3.57569000983543162e-01 3.46116720968283401e-02 \n26 3.23358693567848077e-01 3.37792011146825846e-02 \n27 2.90069311985365397e-01 3.27706210631613995e-02 \n28 2.57874411607132648e-01 3.15911902246980569e-02 \n29 2.26941841669957650e-01 3.02470576249956463e-02 \n30 1.97432870180199532e-01 2.87452309784552579e-02 \n31 1.69501343124250942e-01 2.70935401594408938e-02 \n32 1.43292882365521485e-01 2.53005963921950766e-02 \n33 1.18944126402522443e-01 2.33757473771732879e-02 \n34 9.65820179315306782e-02 2.13290285989910407e-02 \n35 7.63231418953424778e-02 1.91711110970663283e-02 \n36 5.82731173906915687e-02 1.69132460434301447e-02 \n37 4.25260463969306321e-02 1.45672066307492472e-02 \n38 2.91640215761810699e-02 1.21452283069194075e-02 \n39 1.82566934929600036e-02 9.65995071184195045e-03 \n40 9.86088950987233474e-03 7.12437821578824296e-03 \n41 4.02022120337792652e-03 4.55199831870070192e-03 \n42 7.63833878746143237e-04 1.95974512692206372e-03 \n44\n0 9.99270100318387144e-01 1.87270240155638880e-03 \n1 9.96158196069257929e-01 4.35024068376242169e-03 \n2 9.90575916538956935e-01 6.80979337778999261e-03 \n3 9.82549825211246564e-01 9.23574086840737475e-03 \n4 9.72119754559097049e-01 1.16157409510096055e-02 \n5 9.59337629992087937e-01 1.39378914106405051e-02 \n6 9.44267119143021638e-01 1.61906114060349111e-02 \n7 9.26983297502355197e-01 1.83626739069044365e-02 \n8 9.07572269822567446e-01 2.04432561551731104e-02 \n9 8.86130739624377939e-01 2.24219920409850157e-02 \n10 8.62765526830358453e-01 2.42890232241760179e-02 \n11 8.37593035333061176e-01 2.60350480458522299e-02 \n12 8.10738672951787920e-01 2.76513677818640280e-02 \n13 7.82336226592735384e-01 2.91299299387977467e-02 \n14 7.52527195694101092e-01 3.04633683507809852e-02 \n15 7.21460087262705718e-01 3.16450398666019289e-02 \n16 6.89289676007353580e-01 3.26690574395907193e-02 \n17 6.56176233251392960e-01 3.35303194531468285e-02 \n18 6.22284728464100656e-01 3.42245351346833274e-02 \n19 5.87784007387758378e-01 3.47482459307862923e-02 \n20 5.52845950854326640e-01 3.50988427367791081e-02 \n21 5.17644618482067664e-01 3.52745788946770347e-02 \n22 4.82355381517932336e-01 3.52745788946770347e-02 \n23 4.47154049145673360e-01 3.50988427367791081e-02 \n24 4.12215992612241622e-01 3.47482459307862923e-02 \n25 3.77715271535899344e-01 3.42245351346833274e-02 \n26 3.43823766748607096e-01 3.35303194531468285e-02 \n27 3.10710323992646420e-01 3.26690574395907193e-02 \n28 2.78539912737294282e-01 3.16450398666019289e-02 \n29 2.47472804305898852e-01 3.04633683507809852e-02 \n30 2.17663773407264616e-01 2.91299299387977467e-02 \n31 1.89261327048212080e-01 2.76513677818640280e-02 \n32 1.62406964666938824e-01 2.60350480458522299e-02 \n33 1.37234473169641491e-01 2.42890232241760179e-02 \n34 1.13869260375622047e-01 2.24219920409850157e-02 \n35 9.24277301774324989e-02 2.04432561551731104e-02 \n36 7.30167024976448031e-02 1.83626739069044365e-02 \n37 5.57328808569783965e-02 1.61906114060349111e-02 \n38 4.06623700079121117e-02 1.39378914106405051e-02 \n39 2.78802454409029510e-02 1.16157409510096055e-02 \n40 1.74501747887534295e-02 9.23574086840737475e-03 \n41 9.42408346104301603e-03 6.80979337778999261e-03 \n42 3.84180393074209578e-03 4.35024068376242169e-03 \n43 7.29899681612887550e-04 1.87270240155638880e-03 \n45\n0 9.99301822590968336e-01 1.79133157764177942e-03 \n1 9.96324999223601848e-01 4.16159464810912042e-03 \n2 9.90984357517270320e-01 6.51555249579139229e-03 \n3 9.83304155198447272e-01 8.83876762896879456e-03 \n4 9.73320845497814502e-01 1.11199237752893660e-02 \n5 9.61081968359500216e-01 1.33481069837888319e-02 \n6 9.46645835876620878e-01 1.55126874672577332e-02 \n7 9.30081237980332154e-01 1.76033461008045095e-02 \n8 9.11467110251043211e-01 1.96101183646512252e-02 \n9 8.90892156296953175e-01 2.15234403545824862e-02 \n10 8.68454424472745123e-01 2.33341938591866832e-02 \n11 8.44260840385600231e-01 2.50337496189760138e-02 \n12 8.18426697226611655e-01 2.66140083656344756e-02 \n13 7.91075106284676588e-01 2.80674393798932380e-02 \n14 7.62336410231458039e-01 2.93871163594208694e-02 \n15 7.32347561959817539e-01 3.05667504155332607e-02 \n16 7.01251471929270953e-01 3.16007200369099669e-02 \n17 6.69196327125301083e-01 3.24840978753617171e-02 \n18 6.36334884876188722e-01 3.32126742249212667e-02 \n19 6.02823744891631819e-01 3.37829770818037708e-02 \n20 5.68822602991626569e-01 3.41922886893348404e-02 \n21 5.34493490081572098e-01 3.44386584888306604e-02 \n22 5.00000000000000000e-01 3.45209124146160090e-02 \n23 4.65506509918427902e-01 3.44386584888306604e-02 \n24 4.31177397008373486e-01 3.41922886893348404e-02 \n25 3.97176255108368126e-01 3.37829770818037708e-02 \n26 3.63665115123811222e-01 3.32126742249212667e-02 \n27 3.30803672874698917e-01 3.24840978753617171e-02 \n28 2.98748528070729047e-01 3.16007200369099669e-02 \n29 2.67652438040182461e-01 3.05667504155332607e-02 \n30 2.37663589768541961e-01 2.93871163594208694e-02 \n31 2.08924893715323412e-01 2.80674393798932380e-02 \n32 1.81573302773388318e-01 2.66140083656344756e-02 \n33 1.55739159614399741e-01 2.50337496189760138e-02 \n34 1.31545575527254821e-01 2.33341938591866832e-02 \n35 1.09107843703046853e-01 2.15234403545824862e-02 \n36 8.85328897489568306e-02 1.96101183646512252e-02 \n37 6.99187620196678877e-02 1.76033461008045095e-02 \n38 5.33541641233791289e-02 1.55126874672577332e-02 \n39 3.89180316404998047e-02 1.33481069837888319e-02 \n40 2.66791545021854704e-02 1.11199237752893660e-02 \n41 1.66958448015526971e-02 8.83876762896879456e-03 \n42 9.01564248272971637e-03 6.51555249579139229e-03 \n43 3.67500077639812926e-03 4.16159464810912042e-03 \n44 6.98177409031680942e-04 1.79133157764177942e-03 \n46\n0 9.99331521066908923e-01 1.71515043405352416e-03 \n1 9.96481174453087148e-01 3.98494911486231129e-03 \n2 9.91366834902083438e-01 6.23994188549434163e-03 \n3 9.84010695926995971e-01 8.46675700391811940e-03 \n4 9.74446181723044869e-01 1.06549993770682500e-02 \n5 9.62716899403377013e-01 1.27946431985650061e-02 \n6 9.48876355766970936e-01 1.48759147761013781e-02 \n7 9.32987697433429020e-01 1.68893139995534500e-02 \n8 9.15123418533033028e-01 1.88256526786930341e-02 \n9 8.95365028537637109e-01 2.06760950548393642e-02 \n10 8.73802679807832994e-01 2.24321976386590641e-02 \n11 8.50534756010202786e-01 2.40859475508561002e-02 \n12 8.25667423100998832e-01 2.56297990035715094e-02 \n13 7.99314144856357545e-01 2.70567076929283772e-02 \n14 7.71595165130901317e-01 2.83601629219956165e-02 \n15 7.42636959194082347e-01 2.95342172977731583e-02 \n16 7.12571656641414197e-01 3.05735138623252391e-02 \n17 6.81536438510497833e-01 3.14733105321972559e-02 \n18 6.49672911350934967e-01 3.22295017335695322e-02 \n19 6.17126461103134849e-01 3.28386371338906038e-02 \n20 5.84045589733551807e-01 3.32979373842274412e-02 \n21 5.50581237652792099e-01 3.36053068003390881e-02 \n22 5.16886095008026070e-01 3.37593429245182305e-02 \n23 4.83113904991973986e-01 3.37593429245182305e-02 \n24 4.49418762347207901e-01 3.36053068003390881e-02 \n25 4.15954410266448249e-01 3.32979373842274412e-02 \n26 3.82873538896865095e-01 3.28386371338906038e-02 \n27 3.50327088649064977e-01 3.22295017335695322e-02 \n28 3.18463561489502167e-01 3.14733105321972559e-02 \n29 2.87428343358585803e-01 3.05735138623252391e-02 \n30 2.57363040805917653e-01 2.95342172977731583e-02 \n31 2.28404834869098683e-01 2.83601629219956165e-02 \n32 2.00685855143642428e-01 2.70567076929283772e-02 \n33 1.74332576899001140e-01 2.56297990035715094e-02 \n34 1.49465243989797159e-01 2.40859475508561002e-02 \n35 1.26197320192166978e-01 2.24321976386590641e-02 \n36 1.04634971462362877e-01 2.06760950548393642e-02 \n37 8.48765814669669716e-02 1.88256526786930341e-02 \n38 6.70123025665709665e-02 1.68893139995534500e-02 \n39 5.11236442330290156e-02 1.48759147761013781e-02 \n40 3.72831005966230214e-02 1.27946431985650061e-02 \n41 2.55538182769551037e-02 1.06549993770682500e-02 \n42 1.59893040730040292e-02 8.46675700391811940e-03 \n43 8.63316509791656889e-03 6.23994188549434163e-03 \n44 3.51882554691281772e-03 3.98494911486231129e-03 \n45 6.68478933091009426e-04 1.71515043405352416e-03 \n47\n0 9.99359364292106034e-01 1.64372692126400744e-03 \n1 9.96627605493884294e-01 3.81930814792441663e-03 \n2 9.91725501535811849e-01 5.98142423215616056e-03 \n3 9.84673393663282215e-01 8.11766657321652887e-03 \n4 9.75501984628854180e-01 1.02184690738342139e-02 \n5 9.64251346506180274e-01 1.22746058298294092e-02 \n6 9.50970664719262615e-01 1.42770753503216937e-02 \n7 9.35718007898448167e-01 1.62171177575923774e-02 \n8 9.18560069949951097e-01 1.80862482920874749e-02 \n9 8.99571877083870985e-01 1.98762930612655028e-02 \n10 8.78836459222719357e-01 2.15794243242397703e-02 \n11 8.56444486704532104e-01 2.31881945432529553e-02 \n12 8.32493873695166364e-01 2.46955688736805838e-02 \n13 8.07089349978186821e-01 2.60949558900285712e-02 \n14 7.80342002967332138e-01 2.73802363907651135e-02 \n15 7.52368791931788961e-01 2.85457901466157696e-02 \n16 7.23292036552427797e-01 2.95865204711694384e-02 \n17 6.93238882042333526e-01 3.04978765043698238e-02 \n18 6.62340743168867929e-01 3.12758731104608306e-02 \n19 6.30732729607487275e-01 3.19171083028585156e-02 \n20 5.98553055139555923e-01 3.24187781194728644e-02 \n21 5.65942433277257462e-01 3.27786888832748702e-02 \n22 5.33043461958177867e-01 3.29952667944052383e-02 \n23 5.00000000000000000e-01 3.30675648118277377e-02 \n24 4.66956538041822133e-01 3.29952667944052383e-02 \n25 4.34057566722742538e-01 3.27786888832748702e-02 \n26 4.01446944860444077e-01 3.24187781194728644e-02 \n27 3.69267270392512725e-01 3.19171083028585156e-02 \n28 3.37659256831132071e-01 3.12758731104608306e-02 \n29 3.06761117957666418e-01 3.04978765043698238e-02 \n30 2.76707963447572147e-01 2.95865204711694384e-02 \n31 2.47631208068211039e-01 2.85457901466157696e-02 \n32 2.19657997032667890e-01 2.73802363907651135e-02 \n33 1.92910650021813179e-01 2.60949558900285712e-02 \n34 1.67506126304833636e-01 2.46955688736805838e-02 \n35 1.43555513295467840e-01 2.31881945432529553e-02 \n36 1.21163540777280684e-01 2.15794243242397703e-02 \n37 1.00428122916129028e-01 1.98762930612655028e-02 \n38 8.14399300500489448e-02 1.80862482920874749e-02 \n39 6.42819921015518464e-02 1.62171177575923774e-02 \n40 4.90293352807373226e-02 1.42770753503216937e-02 \n41 3.57486534938196779e-02 1.22746058298294092e-02 \n42 2.44980153711457788e-02 1.02184690738342139e-02 \n43 1.53266063367177505e-02 8.11766657321652887e-03 \n44 8.27449846418814618e-03 5.98142423215616056e-03 \n45 3.37239450611568270e-03 3.81930814792441663e-03 \n46 6.40635707893945361e-04 1.64372692126400744e-03 \n48\n0 9.99385503626213034e-01 1.57667302615291925e-03 \n1 9.96765086133175382e-01 3.66377695063813125e-03 \n2 9.92062291861413481e-01 5.73861728961726995e-03 \n3 9.85295796273123581e-01 7.78965786147192436e-03 \n4 9.76493851580215400e-01 9.80808022867776449e-03 \n5 9.65693345353277222e-01 1.17853804196621885e-02 \n6 9.52939568357784816e-01 1.37132548541784739e-02 \n7 9.38286010137123982e-01 1.55836139163990448e-02 \n8 9.21794130812196744e-01 1.73886112823852176e-02 \n9 9.03533102014721257e-01 1.91206755329153544e-02 \n10 8.83579516257870123e-01 2.07725414717323739e-02 \n11 8.62017065461907261e-01 2.23372804283471400e-02 \n12 8.38936189816331890e-01 2.38083292462452356e-02 \n13 8.14433698388256744e-01 2.51795177769272363e-02 \n14 7.88612363041986342e-01 2.64450947425968336e-02 \n15 7.61580487361116498e-01 2.75997518499920824e-02 \n16 7.33451452375479152e-01 2.86386460502016070e-02 \n17 7.04343240995358388e-01 2.95574198491978177e-02 \n18 6.74377943146080350e-01 3.03522195829469404e-02 \n19 6.43681243677727832e-01 3.10197115799463324e-02 \n20 6.12381895197344539e-01 3.15570961431270100e-02 \n21 5.80611178034445841e-01 3.19621192923240927e-02 \n22 5.48502349604731321e-01 3.22330822179750440e-02 \n23 5.16190085481434635e-01 3.23688484063419588e-02 \n24 4.83809914518565309e-01 3.23688484063419588e-02 \n25 4.51497650395268624e-01 3.22330822179750440e-02 \n26 4.19388821965554159e-01 3.19621192923240927e-02 \n27 3.87618104802655461e-01 3.15570961431270100e-02 \n28 3.56318756322272223e-01 3.10197115799463324e-02 \n29 3.25622056853919650e-01 3.03522195829469404e-02 \n30 2.95656759004641612e-01 2.95574198491978177e-02 \n31 2.66548547624520793e-01 2.86386460502016070e-02 \n32 2.38419512638883474e-01 2.75997518499920824e-02 \n33 2.11387636958013658e-01 2.64450947425968336e-02 \n34 1.85566301611743201e-01 2.51795177769272363e-02 \n35 1.61063810183668055e-01 2.38083292462452356e-02 \n36 1.37982934538092683e-01 2.23372804283471400e-02 \n37 1.16420483742129835e-01 2.07725414717323739e-02 \n38 9.64668979852786879e-02 1.91206755329153544e-02 \n39 7.82058691878032286e-02 1.73886112823852176e-02 \n40 6.17139898628760591e-02 1.55836139163990448e-02 \n41 4.70604316422151628e-02 1.37132548541784739e-02 \n42 3.43066546467228339e-02 1.17853804196621885e-02 \n43 2.35061484197845692e-02 9.80808022867776449e-03 \n44 1.47042037268763741e-02 7.78965786147192436e-03 \n45 7.93770813858657096e-03 5.73861728961726995e-03 \n46 3.23491386682462105e-03 3.66377695063813125e-03 \n47 6.14496373786940710e-04 1.57667302615291925e-03 \n49\n0 9.99410075303317713e-01 1.51363949446145247e-03 \n1 9.96894330972083909e-01 3.51754979504322572e-03 \n2 9.92378947957106461e-01 5.51027551579679007e-03 \n3 9.85881100450777703e-01 7.48107246781232541e-03 \n4 9.77426829337068592e-01 9.42179792654472895e-03 \n5 9.67050147377905067e-01 1.13246007937233377e-02 \n6 9.54792827914036635e-01 1.31818094635330080e-02 \n7 9.40704222786504451e-01 1.49859423102919123e-02 \n8 9.24841059922082875e-01 1.67297333958110889e-02 \n9 9.07267213679927687e-01 1.84061604815003443e-02 \n10 8.88053447172723276e-01 2.00084728831865094e-02 \n11 8.67277127118701308e-01 2.15302184906297975e-02 \n12 8.45021912212566062e-01 2.29652696777979254e-02 \n13 8.21377416209618794e-01 2.43078479439141210e-02 \n14 7.96438847054450338e-01 2.55525471650722945e-02 \n15 7.70306623495862985e-01 2.66943553541294856e-02 \n16 7.43085970726246048e-01 2.77286748374017955e-02 \n17 7.14886496670788296e-01 2.86513407650937357e-02 \n18 6.85821750631142479e-01 2.94586378800136342e-02 \n19 6.56008766059874349e-01 3.01473154765760087e-02 \n20 6.25567589306288641e-01 3.07146004895964692e-02 \n21 5.94620796230906801e-01 3.11582086600286322e-02 \n22 5.63292998634836062e-01 3.14763537325978490e-02 \n23 5.31710342491343413e-01 3.16677546482458730e-02 \n24 5.00000000000000000e-01 3.17316407023953001e-02 \n25 4.68289657508656587e-01 3.16677546482458730e-02 \n26 4.36707001365163994e-01 3.14763537325978490e-02 \n27 4.05379203769093199e-01 3.11582086600286322e-02 \n28 3.74432410693711359e-01 3.07146004895964692e-02 \n29 3.43991233940125596e-01 3.01473154765760087e-02 \n30 3.14178249368857576e-01 2.94586378800136342e-02 \n31 2.85113503329211759e-01 2.86513407650937357e-02 \n32 2.56914029273753952e-01 2.77286748374017955e-02 \n33 2.29693376504136959e-01 2.66943553541294856e-02 \n34 2.03561152945549634e-01 2.55525471650722945e-02 \n35 1.78622583790381151e-01 2.43078479439141210e-02 \n36 1.54978087787433938e-01 2.29652696777979254e-02 \n37 1.32722872881298637e-01 2.15302184906297975e-02 \n38 1.11946552827276682e-01 2.00084728831865094e-02 \n39 9.27327863200722857e-02 1.84061604815003443e-02 \n40 7.51589400779171524e-02 1.67297333958110889e-02 \n41 5.92957772134955416e-02 1.49859423102919123e-02 \n42 4.52071720859633583e-02 1.31818094635330080e-02 \n43 3.29498526220949259e-02 1.13246007937233377e-02 \n44 2.25731706629313834e-02 9.42179792654472895e-03 \n45 1.41188995492223107e-02 7.48107246781232541e-03 \n46 7.62105204289349747e-03 5.51027551579679007e-03 \n47 3.10566902791610446e-03 3.51754979504322572e-03 \n48 5.89924696682310283e-04 1.51363949446145247e-03 \n50\n0 9.99433202210035510e-01 1.45431127657757054e-03 \n1 9.97015984716045356e-01 3.37989959787270058e-03 \n2 9.92677042024002976e-01 5.29527419182548430e-03 \n3 9.86432192553346021e-01 7.19041138074278698e-03 \n4 9.78305477621403963e-01 9.05778035674469420e-03 \n5 9.68328309472438975e-01 1.08901215850623970e-02 \n6 9.56539278327895981e-01 1.26803367850061958e-02 \n7 9.42983989761806529e-01 1.44214967902675986e-02 \n8 9.27714884714972987e-01 1.61068641117890071e-02 \n9 9.10791035429667994e-01 1.77299178075730757e-02 \n10 8.92277916450199604e-01 1.92843783062938388e-02 \n11 8.72247151113034302e-01 2.07642315450738482e-02 \n12 8.50776234353411098e-01 2.21637521694016369e-02 \n13 8.27948232842719678e-01 2.34775256519742168e-02 \n14 8.03851463592475168e-01 2.47004692247331584e-02 \n15 7.78579152257324991e-01 2.58278515347905684e-02 \n16 7.52229072453732051e-01 2.68553109444981224e-02 \n17 7.24903167487019440e-01 2.77788724031062598e-02 \n18 6.96707155948782519e-01 2.85949628238641902e-02 \n19 6.67750122709718674e-01 2.93004249066112221e-02 \n20 6.38144096889766033e-01 2.98925293521327268e-02 \n21 6.08003618438020865e-01 3.03689854208851091e-02 \n22 5.77445294999072933e-01 3.07279497951583325e-02 \n23 5.46587350780043058e-01 3.09680337103416213e-02 \n24 5.15549169163594390e-01 3.10883083276736298e-02 \n25 4.84450830836405555e-01 3.10883083276736298e-02 \n26 4.53412649219956942e-01 3.09680337103416213e-02 \n27 4.22554705000927067e-01 3.07279497951583325e-02 \n28 3.91996381561979135e-01 3.03689854208851091e-02 \n29 3.61855903110234023e-01 2.98925293521327268e-02 \n30 3.32249877290281326e-01 2.93004249066112221e-02 \n31 3.03292844051217425e-01 2.85949628238641902e-02 \n32 2.75096832512980616e-01 2.77788724031062598e-02 \n33 2.47770927546267894e-01 2.68553109444981224e-02 \n34 2.21420847742674981e-01 2.58278515347905684e-02 \n35 1.96148536407524887e-01 2.47004692247331584e-02 \n36 1.72051767157280322e-01 2.34775256519742168e-02 \n37 1.49223765646588874e-01 2.21637521694016369e-02 \n38 1.27752848886965725e-01 2.07642315450738482e-02 \n39 1.07722083549800368e-01 1.92843783062938388e-02 \n40 8.92089645703320194e-02 1.77299178075730757e-02 \n41 7.22851152850269574e-02 1.61068641117890071e-02 \n42 5.70160102381934777e-02 1.44214967902675986e-02 \n43 4.34607216721040537e-02 1.26803367850061958e-02 \n44 3.16716905275610319e-02 1.08901215850623970e-02 \n45 2.16945223785960269e-02 9.05778035674469420e-03 \n46 1.35678074466539633e-02 7.19041138074278698e-03 \n47 7.32295797599705894e-03 5.29527419182548430e-03 \n48 2.98401528395464367e-03 3.37989959787270058e-03 \n49 5.66797789964474871e-04 1.45431127657757054e-03 \n51\n0 9.99454995424451709e-01 1.39840358554494770e-03 \n1 9.97130630218376224e-01 3.25016889162630003e-03 \n2 9.92957995867951526e-01 5.09259564891086525e-03 \n3 9.86951684009661934e-01 6.91631700323891083e-03 \n4 9.79133924306954118e-01 8.71435736170052613e-03 \n5 9.69533772001481164e-01 1.04799942008516056e-02 \n6 9.58186931154890065e-01 1.22066502868907172e-02 \n7 9.45135609014763678e-01 1.38878992970812385e-02 \n8 9.30428355591146117e-01 1.55174856450800043e-02 \n9 9.14119881911532373e-01 1.70893466020941680e-02 \n10 8.96270856049690590e-01 1.85976344616301456e-02 \n11 8.76947677242687740e-01 2.00367381427482283e-02 \n12 8.56222228788518280e-01 2.14013039989400418e-02 \n13 8.34171610587685075e-01 2.26862557038250354e-02 \n14 8.10877852300361690e-01 2.38868131203115522e-02 \n15 7.86427608175651938e-01 2.49985100750287036e-02 \n16 7.60911834683092869e-01 2.60172109683485427e-02 \n17 7.34425452143020463e-01 2.69391261565227816e-02 \n18 7.07066991613151896e-01 2.77608260478693462e-02 \n19 6.78938228344204697e-01 2.84792538601293319e-02 \n20 6.50143803167665957e-01 2.90917369912960695e-02 \n21 6.20790833223899385e-01 2.95959969614807729e-02 \n22 5.90988513478538757e-01 2.99901578887516243e-02 \n23 5.60847710509444375e-01 3.02727534673688965e-02 \n24 5.30480550075289381e-01 3.04427324224281724e-02 \n25 5.00000000000000000e-01 3.04994624206029394e-02 \n26 4.69519449924710619e-01 3.04427324224281724e-02 \n27 4.39152289490555625e-01 3.02727534673688965e-02 \n28 4.09011486521461243e-01 2.99901578887516243e-02 \n29 3.79209166776100615e-01 2.95959969614807729e-02 \n30 3.49856196832334043e-01 2.90917369912960695e-02 \n31 3.21061771655795247e-01 2.84792538601293319e-02 \n32 2.92933008386848048e-01 2.77608260478693462e-02 \n33 2.65574547856979482e-01 2.69391261565227816e-02 \n34 2.39088165316907075e-01 2.60172109683485427e-02 \n35 2.13572391824348090e-01 2.49985100750287036e-02 \n36 1.89122147699638365e-01 2.38868131203115522e-02 \n37 1.65828389412314953e-01 2.26862557038250354e-02 \n38 1.43777771211481664e-01 2.14013039989400418e-02 \n39 1.23052322757312232e-01 2.00367381427482283e-02 \n40 1.03729143950309396e-01 1.85976344616301456e-02 \n41 8.58801180884675858e-02 1.70893466020941680e-02 \n42 6.95716444088538138e-02 1.55174856450800043e-02 \n43 5.48643909852363498e-02 1.38878992970812385e-02 \n44 4.18130688451098867e-02 1.22066502868907172e-02 \n45 3.04662279985188078e-02 1.04799942008516056e-02 \n46 2.08660756930459032e-02 8.71435736170052613e-03 \n47 1.30483159903380663e-02 6.91631700323891083e-03 \n48 7.04200413204850162e-03 5.09259564891086525e-03 \n49 2.86936978162371289e-03 3.25016889162630003e-03 \n50 5.45004575548252370e-04 1.39840358554494770e-03 \n52\n0 9.99475555551975092e-01 1.34565847502355566e-03 \n1 9.97238795464608030e-01 3.12776198148663823e-03 \n2 9.93223097825774892e-01 4.90131728973137570e-03 \n3 9.87441942110872217e-01 6.65755749117048073e-03 \n4 9.79915913466543276e-01 8.39001169815036842e-03 \n5 9.70671926820679487e-01 1.00924457539903964e-02 \n6 9.59743064458212225e-01 1.17587567769922314e-02 \n7 9.47168445267247638e-01 1.33829768732520067e-02 \n8 9.32993081423033832e-01 1.49592905735719730e-02 \n9 9.17267716163367219e-01 1.64820545448594001e-02 \n10 9.00048641715234132e-01 1.79458174175486165e-02 \n11 8.81397497596872470e-01 1.93453391552119887e-02 \n12 8.61381049874991644e-01 2.06756097502801342e-02 \n13 8.40070952113583846e-01 2.19318671295002030e-02 \n14 8.17543488847622957e-01 2.31096141863923951e-02 \n15 7.93879302489789551e-01 2.42046348720374484e-02 \n16 7.69163104642913709e-01 2.52130092831711894e-02 \n17 7.43483372849047974e-01 2.61311276919534950e-02 \n18 7.16932033859380868e-01 2.69557034663786312e-02 \n19 6.89604134558046811e-01 2.76837848346513267e-02 \n20 6.61597501717403946e-01 2.83127654511842984e-02 \n21 6.33012391802500907e-01 2.88403937262634129e-02 \n22 6.03951132078183073e-01 2.92647808859069353e-02 \n23 5.74517754303474626e-01 2.95844077330214839e-02 \n24 5.44817622324450301e-01 2.97981300856240798e-02 \n25 5.14957054898669386e-01 2.99051828726459301e-02 \n26 4.85042945101330614e-01 2.99051828726459301e-02 \n27 4.55182377675549699e-01 2.97981300856240798e-02 \n28 4.25482245696525430e-01 2.95844077330214839e-02 \n29 3.96048867921816983e-01 2.92647808859069353e-02 \n30 3.66987608197499093e-01 2.88403937262634129e-02 \n31 3.38402498282596109e-01 2.83127654511842984e-02 \n32 3.10395865441953189e-01 2.76837848346513267e-02 \n33 2.83067966140619187e-01 2.69557034663786312e-02 \n34 2.56516627150951970e-01 2.61311276919534950e-02 \n35 2.30836895357086291e-01 2.52130092831711894e-02 \n36 2.06120697510210449e-01 2.42046348720374484e-02 \n37 1.82456511152377043e-01 2.31096141863923951e-02 \n38 1.59929047886416154e-01 2.19318671295002030e-02 \n39 1.38618950125008411e-01 2.06756097502801342e-02 \n40 1.18602502403127516e-01 1.93453391552119887e-02 \n41 9.99513582847658399e-02 1.79458174175486165e-02 \n42 8.27322838366327251e-02 1.64820545448594001e-02 \n43 6.70069185769662096e-02 1.49592905735719730e-02 \n44 5.28315547327523408e-02 1.33829768732520067e-02 \n45 4.02569355417877334e-02 1.17587567769922314e-02 \n46 2.93280731793204713e-02 1.00924457539903964e-02 \n47 2.00840865334567242e-02 8.39001169815036842e-03 \n48 1.25580578891277481e-02 6.65755749117048073e-03 \n49 6.77690217422507925e-03 4.90131728973137570e-03 \n50 2.76120453539198526e-03 3.12776198148663823e-03 \n51 5.24444448024860913e-04 1.34565847502355566e-03 \n53\n0 9.99494973888164107e-01 1.29584186028351592e-03 \n1 9.97340959654003489e-01 3.01213811347433684e-03 \n2 9.93473517511685777e-01 4.72060114247017243e-03 \n3 9.87905116857492271e-01 6.41301307212018955e-03 \n4 9.80654847311568156e-01 8.08336262834373140e-03 \n5 9.71747676732220955e-01 9.72586055381844707e-03 \n6 9.61214301521406078e-01 1.13348365285351037e-02 \n7 9.49091028937713244e-01 1.29047412553787589e-02 \n8 9.35419648779120649e-01 1.44301618089118684e-02 \n9 9.20247288272900699e-01 1.59058392295096628e-02 \n10 9.03626249208447696e-01 1.73266862917671183e-02 \n11 8.85613827462766179e-01 1.86878049017414581e-02 \n12 8.66272115403755150e-01 1.99845029217701892e-02 \n13 8.45667787800683302e-01 2.12123103172600080e-02 \n14 8.23871871958255064e-01 2.23669945518364041e-02 \n15 8.00959502856884664e-01 2.34445751703751572e-02 \n16 7.77009664138533895e-01 2.44413375163495712e-02 \n17 7.52104915828566756e-01 2.53538455346463583e-02 \n18 7.26331109730922853e-01 2.61789536149363601e-02 \n19 6.99777093476976475e-01 2.69138174343655154e-02 \n20 6.72534404247861151e-01 2.75559037619667983e-02 \n21 6.44696953225813107e-01 2.81029991908698547e-02 \n22 6.16360701862136318e-01 2.85532177681335972e-02 \n23 5.87623331077662847e-01 2.89050074958565988e-02 \n24 5.58583904535977616e-01 2.91571556811280053e-02 \n25 5.29342527150129749e-01 2.93087931163601295e-02 \n26 5.00000000000000000e-01 2.93593970755821818e-02 \n27 4.70657472849870251e-01 2.93087931163601295e-02 \n28 4.41416095464022440e-01 2.91571556811280053e-02 \n29 4.12376668922337097e-01 2.89050074958565988e-02 \n30 3.83639298137863682e-01 2.85532177681335972e-02 \n31 3.55303046774186893e-01 2.81029991908698547e-02 \n32 3.27465595752138849e-01 2.75559037619667983e-02 \n33 3.00222906523023525e-01 2.69138174343655154e-02 \n34 2.73668890269077092e-01 2.61789536149363601e-02 \n35 2.47895084171433272e-01 2.53538455346463583e-02 \n36 2.22990335861466049e-01 2.44413375163495712e-02 \n37 1.99040497143115336e-01 2.34445751703751572e-02 \n38 1.76128128041744964e-01 2.23669945518364041e-02 \n39 1.54332212199316643e-01 2.12123103172600080e-02 \n40 1.33727884596244878e-01 1.99845029217701892e-02 \n41 1.14386172537233849e-01 1.86878049017414581e-02 \n42 9.63737507915522623e-02 1.73266862917671183e-02 \n43 7.97527117270993152e-02 1.59058392295096628e-02 \n44 6.45803512208793229e-02 1.44301618089118684e-02 \n45 5.09089710622866870e-02 1.29047412553787589e-02 \n46 3.87856984785939357e-02 1.13348365285351037e-02 \n47 2.82523232677790587e-02 9.72586055381844707e-03 \n48 1.93451526884318332e-02 8.08336262834373140e-03 \n49 1.20948831425077095e-02 6.41301307212018955e-03 \n50 6.52648248831423899e-03 4.72060114247017243e-03 \n51 2.65904034599646075e-03 3.01213811347433684e-03 \n52 5.05026111835886471e-04 1.29584186028351592e-03 \n54\n0 9.99513333433670437e-01 1.24874091788079299e-03 \n1 9.97437558509169486e-01 2.90280550761999254e-03 \n2 9.93710318698671768e-01 4.54968472775469854e-03 \n3 9.88343164428951648e-01 6.18166406442382209e-03 \n4 9.81353822892961802e-01 7.79315151796206550e-03 \n5 9.72765487582497923e-01 9.37876381073468948e-03 \n6 9.62606679933325715e-01 1.09332257114265422e-02 \n7 9.50911143142350812e-01 1.24513707336043871e-02 \n8 9.37717727032784443e-01 1.39281546552979356e-02 \n9 9.23070257985386444e-01 1.53586712489353384e-02 \n10 9.07017392956783963e-01 1.67381682321863234e-02 \n11 8.89612457673127022e-01 1.80620629201917772e-02 \n12 8.70913269404592127e-01 1.93259573910512586e-02 \n13 8.50981944859586448e-01 2.05256530683224879e-02 \n14 8.29884693815991614e-01 2.16571646547985067e-02 \n15 8.07691599165563656e-01 2.27167333641383577e-02 \n16 7.84476384097604673e-01 2.37008394032224949e-02 \n17 7.60316167192966574e-01 2.46062136622644430e-02 \n18 7.35291206240691109e-01 2.54298485730940702e-02 \n19 7.09484631627602225e-01 2.61690080991493733e-02 \n20 6.82982170186095638e-01 2.68212368237768055e-02 \n21 6.55871860417234109e-01 2.73843681065289932e-02 \n22 6.28243760034998600e-01 2.78565312802949924e-02 \n23 6.00189646803106824e-01 2.82361578653129823e-02 \n24 5.71802713658128070e-01 2.85219867793972993e-02 \n25 5.43177259131624068e-01 2.87130685270560564e-02 \n26 5.14408374099670884e-01 2.88087683535735127e-02 \n27 4.85591625900329116e-01 2.88087683535735127e-02 \n28 4.56822740868375876e-01 2.87130685270560564e-02 \n29 4.28197286341871930e-01 2.85219867793972993e-02 \n30 3.99810353196893231e-01 2.82361578653129823e-02 \n31 3.71756239965001345e-01 2.78565312802949924e-02 \n32 3.44128139582765891e-01 2.73843681065289932e-02 \n33 3.17017829813904417e-01 2.68212368237768055e-02 \n34 2.90515368372397720e-01 2.61690080991493733e-02 \n35 2.64708793759308836e-01 2.54298485730940702e-02 \n36 2.39683832807033453e-01 2.46062136622644430e-02 \n37 2.15523615902395271e-01 2.37008394032224949e-02 \n38 1.92308400834436316e-01 2.27167333641383577e-02 \n39 1.70115306184008441e-01 2.16571646547985067e-02 \n40 1.49018055140413552e-01 2.05256530683224879e-02 \n41 1.29086730595407845e-01 1.93259573910512586e-02 \n42 1.10387542326872992e-01 1.80620629201917772e-02 \n43 9.29826070432160784e-02 1.67381682321863234e-02 \n44 7.69297420146135280e-02 1.53586712489353384e-02 \n45 6.22822729672155295e-02 1.39281546552979356e-02 \n46 4.90888568576492088e-02 1.24513707336043871e-02 \n47 3.73933200666742571e-02 1.09332257114265422e-02 \n48 2.72345124175020735e-02 9.37876381073468948e-03 \n49 1.86461771070382080e-02 7.79315151796206550e-03 \n50 1.16568355710483813e-02 6.18166406442382209e-03 \n51 6.28968130132822115e-03 4.54968472775469854e-03 \n52 2.56244149083055756e-03 2.90280550761999254e-03 \n53 4.86666566329508048e-04 1.24874091788079299e-03 \n55\n0 9.99530709782409321e-01 1.20416180998989442e-03 \n1 9.97528988923705895e-01 2.79931613328038374e-03 \n2 9.93934470599444619e-01 4.38787305352926395e-03 \n3 9.88757867751994590e-01 5.96258035992430595e-03 \n4 9.82015664296567614e-01 7.51822916675589422e-03 \n5 9.73729434020605411e-01 9.04980726036453201e-03 \n6 9.63925712360395814e-01 1.05524008340082270e-02 \n7 9.52635900371999966e-01 1.20211940048628105e-02 \n8 9.39896161209947789e-01 1.34514807281981355e-02 \n9 9.25747303308577241e-01 1.48386788825805201e-02 \n10 9.10234649279660468e-01 1.61783446130929140e-02 \n11 8.93407890563811202e-01 1.74661864367949421e-02 \n12 8.75320928174010970e-01 1.86980789339827730e-02 \n13 8.56031699993318851e-01 1.98700759371685902e-02 \n14 8.35601995159913180e-01 2.09784231588593800e-02 \n15 8.14097256124964086e-01 2.20195702108032937e-02 \n16 7.91586369013016045e-01 2.29901819731419196e-02 \n17 7.68141442954171638e-01 2.38871492756003480e-02 \n18 7.43837579093737045e-01 2.47075988557758711e-02 \n19 7.18752630018587246e-01 2.54489025622469875e-02 \n20 6.92966950370489720e-01 2.61086857728160433e-02 \n21 6.66563139445011887e-01 2.66848350008027368e-02 \n22 6.39625776600403317e-01 2.71755046649555521e-02 \n23 6.12241150323922789e-01 2.75791230012543444e-02 \n24 5.84496981823436568e-01 2.78943970976420416e-02 \n25 5.56482144029664672e-01 2.81203170355421826e-02 \n26 5.28286376909168354e-01 2.82561591248860003e-02 \n27 5.00000000000000000e-01 2.83014882222802112e-02 \n28 4.71713623090831591e-01 2.82561591248860003e-02 \n29 4.43517855970335384e-01 2.81203170355421826e-02 \n30 4.15503018176563377e-01 2.78943970976420416e-02 \n31 3.87758849676077266e-01 2.75791230012543444e-02 \n32 3.60374223399596738e-01 2.71755046649555521e-02 \n33 3.33436860554988057e-01 2.66848350008027368e-02 \n34 3.07033049629510280e-01 2.61086857728160433e-02 \n35 2.81247369981412698e-01 2.54489025622469875e-02 \n36 2.56162420906262955e-01 2.47075988557758711e-02 \n37 2.31858557045828362e-01 2.38871492756003480e-02 \n38 2.08413630986983955e-01 2.29901819731419196e-02 \n39 1.85902743875035914e-01 2.20195702108032937e-02 \n40 1.64398004840086792e-01 2.09784231588593800e-02 \n41 1.43968300006681094e-01 1.98700759371685902e-02 \n42 1.24679071825989043e-01 1.86980789339827730e-02 \n43 1.06592109436188812e-01 1.74661864367949421e-02 \n44 8.97653507203395457e-02 1.61783446130929140e-02 \n45 7.42526966914227593e-02 1.48386788825805201e-02 \n46 6.01038387900522456e-02 1.34514807281981355e-02 \n47 4.73640996279999851e-02 1.20211940048628105e-02 \n48 3.60742876396041509e-02 1.05524008340082270e-02 \n49 2.62705659793946306e-02 9.04980726036453201e-03 \n50 1.79843357034323997e-02 7.51822916675589422e-03 \n51 1.12421322480053959e-02 5.96258035992430595e-03 \n52 6.06552940055540054e-03 4.38787305352926395e-03 \n53 2.47101107629406260e-03 2.79931613328038374e-03 \n54 4.69290217590729263e-04 1.20416180998989442e-03 \n56\n0 9.99547171900732834e-01 1.16192768788660780e-03 \n1 9.97615613040534921e-01 2.70126112300766909e-03 \n2 9.94146857770080716e-01 4.23453158165394347e-03 \n3 9.89150854570128191e-01 5.75491217019169152e-03 \n4 9.82642950952745120e-01 7.25754463901073614e-03 \n5 9.74643239780981330e-01 8.73775645570047318e-03 \n6 9.65176440123748147e-01 1.01909649412012856e-02 \n7 9.54271810210327698e-01 1.16126757812826577e-02 \n8 9.41963054163913793e-01 1.29984935291959751e-02 \n9 9.28288216881374306e-01 1.43441342369113704e-02 \n10 9.13289566071440850e-01 1.56454383736552224e-02 \n11 8.97013461446933280e-01 1.68983835578058808e-02 \n12 8.79510211352564464e-01 1.80990969361575944e-02 \n13 8.60833917225094059e-01 1.92438671296238303e-02 \n14 8.41042306347235202e-01 2.03291556923722583e-02 \n15 8.20196553403503392e-01 2.13516080423335440e-02 \n16 7.98361091385331623e-01 2.23080638263461403e-02 \n17 7.75603412427767314e-01 2.31955666865009472e-02 \n18 7.51993859192190861e-01 2.40113733968001300e-02 \n19 7.27605407439229745e-01 2.47529623415237883e-02 \n20 7.02513440463545580e-01 2.54180413088992418e-02 \n21 6.76795516087477234e-01 2.60045545758707010e-02 \n22 6.50531126933610371e-01 2.65106892620053831e-02 \n23 6.23801454717168635e-01 2.69348809328572442e-02 \n24 5.96689119317637573e-01 2.72758184354447118e-02 \n25 5.69277923405188124e-01 2.75324479508812121e-02 \n26 5.41652593411217742e-01 2.77039762516225613e-02 \n27 5.13898517643637698e-01 2.77898731532571983e-02 \n28 4.86101482356362302e-01 2.77898731532571983e-02 \n29 4.58347406588782313e-01 2.77039762516225613e-02 \n30 4.30722076594811876e-01 2.75324479508812121e-02 \n31 4.03310880682362372e-01 2.72758184354447118e-02 \n32 3.76198545282831365e-01 2.69348809328572442e-02 \n33 3.49468873066389685e-01 2.65106892620053831e-02 \n34 3.23204483912522766e-01 2.60045545758707010e-02 \n35 2.97486559536454365e-01 2.54180413088992418e-02 \n36 2.72394592560770199e-01 2.47529623415237883e-02 \n37 2.48006140807809139e-01 2.40113733968001300e-02 \n38 2.24396587572232686e-01 2.31955666865009472e-02 \n39 2.01638908614668350e-01 2.23080638263461403e-02 \n40 1.79803446596496552e-01 2.13516080423335440e-02 \n41 1.58957693652764770e-01 2.03291556923722583e-02 \n42 1.39166082774905969e-01 1.92438671296238303e-02 \n43 1.20489788647435550e-01 1.80990969361575944e-02 \n44 1.02986538553066748e-01 1.68983835578058808e-02 \n45 8.67104339285591774e-02 1.56454383736552224e-02 \n46 7.17117831186256799e-02 1.43441342369113704e-02 \n47 5.80369458360862275e-02 1.29984935291959751e-02 \n48 4.57281897896722536e-02 1.16126757812826577e-02 \n49 3.48235598762518528e-02 1.01909649412012856e-02 \n50 2.53567602190186807e-02 8.73775645570047318e-03 \n51 1.73570490472549077e-02 7.25754463901073614e-03 \n52 1.08491454298718076e-02 5.75491217019169152e-03 \n53 5.85314222991924465e-03 4.23453158165394347e-03 \n54 2.38438695946512633e-03 2.70126112300766909e-03 \n55 4.52828099267207798e-04 1.16192768788660780e-03 \n57\n0 9.99562782812631445e-01 1.12187693612533150e-03 \n1 9.97697761839215103e-01 2.60826673735938984e-03 \n2 9.94348288825111060e-01 4.08908003391061665e-03 \n3 9.89523613354734377e-01 5.55788186616799473e-03 \n4 9.83238042585943273e-01 7.01013539537677800e-03 \n5 9.75510313223938330e-01 8.44147951172077513e-03 \n6 9.66363480533550812e-01 9.84763534974426001e-03 \n7 9.55824839260695613e-01 1.12244039453882182e-02 \n8 9.43925839441110637e-01 1.25676754954590613e-02 \n9 9.30701991631023517e-01 1.38734407010900965e-02 \n10 9.16192760575219589e-01 1.51378024213469995e-02 \n11 9.00441447273609086e-01 1.63569871831857824e-02 \n12 8.83495059679725081e-01 1.75273563911563096e-02 \n13 8.65404172372261637e-01 1.86454171622086572e-02 \n14 8.46222775599758892e-01 1.97078327377400581e-02 \n15 8.26008114140488470e-01 2.07114324354005543e-02 \n16 8.04820516454357704e-01 2.16532211081075995e-02 \n17 7.82723214634618358e-01 2.25303880806905776e-02 \n18 7.59782155695593819e-01 2.33403155368207514e-02 \n19 7.36065804758987863e-01 2.40805863308438742e-02 \n20 7.11644940725781994e-01 2.47489912010098387e-02 \n21 6.86592445043297195e-01 2.53435353624637053e-02 \n22 6.60983084197689363e-01 2.58624444602589126e-02 \n23 6.34893286580919369e-01 2.63041698645887154e-02 \n24 6.08400914398061987e-01 2.66673932924095802e-02 \n25 5.81585031295632104e-01 2.69510307416492879e-02 \n26 5.54525666404393935e-01 2.71542357262493199e-02 \n27 5.27303575500823407e-01 2.72764018023809417e-02 \n28 5.00000000000000000e-01 2.73171643782920137e-02 \n29 4.72696424499176593e-01 2.72764018023809417e-02 \n30 4.45474333595606120e-01 2.71542357262493199e-02 \n31 4.18414968704367896e-01 2.69510307416492879e-02 \n32 3.91599085601937957e-01 2.66673932924095802e-02 \n33 3.65106713419080631e-01 2.63041698645887154e-02 \n34 3.39016915802310692e-01 2.58624444602589126e-02 \n35 3.13407554956702750e-01 2.53435353624637053e-02 \n36 2.88355059274218006e-01 2.47489912010098387e-02 \n37 2.63934195241012137e-01 2.40805863308438742e-02 \n38 2.40217844304406181e-01 2.33403155368207514e-02 \n39 2.17276785365381614e-01 2.25303880806905776e-02 \n40 1.95179483545642324e-01 2.16532211081075995e-02 \n41 1.73991885859511558e-01 2.07114324354005543e-02 \n42 1.53777224400241136e-01 1.97078327377400581e-02 \n43 1.34595827627738335e-01 1.86454171622086572e-02 \n44 1.16504940320274905e-01 1.75273563911563096e-02 \n45 9.95585527263908726e-02 1.63569871831857824e-02 \n46 8.38072394247804386e-02 1.51378024213469995e-02 \n47 6.92980083689765242e-02 1.38734407010900965e-02 \n48 5.60741605588893355e-02 1.25676754954590613e-02 \n49 4.41751607393043935e-02 1.12244039453882182e-02 \n50 3.36365194664491537e-02 9.84763534974426001e-03 \n51 2.44896867760616282e-02 8.44147951172077513e-03 \n52 1.67619574140566614e-02 7.01013539537677800e-03 \n53 1.04763866452656437e-02 5.55788186616799473e-03 \n54 5.65171117488897506e-03 4.08908003391061665e-03 \n55 2.30223816078484449e-03 2.60826673735938984e-03 \n56 4.37217187368574701e-04 1.12187693612533150e-03 \n58\n0 9.99577600203693351e-01 1.08386162481372505e-03 \n1 9.97775738298645409e-01 2.51999080632512142e-03 \n2 9.94539504124221319e-01 3.95098692499933762e-03 \n3 9.89877507347175167e-01 5.37077676643938663e-03 \n4 9.83803101251462087e-01 6.77511855649440622e-03 \n5 9.76333778759434501e-01 8.15993711748548220e-03 \n6 9.67491068794129605e-01 9.52123273094670347e-03 \n7 9.57300464282176300e-01 1.08550780700731181e-02 \n8 9.45791346011015110e-01 1.21576263624819762e-02 \n9 9.32996897037403738e-01 1.34251215909909349e-02 \n10 9.18954006669686629e-01 1.46539090220802453e-02 \n11 9.03703163956544042e-01 1.58404456269046617e-02 \n12 8.87288340874826331e-01 1.69813102467080042e-02 \n13 8.69756865510021182e-01 1.80732134335436362e-02 \n14 8.51159285576954083e-01 1.91130069229292175e-02 \n15 8.31549222666062571e-01 2.00976927049338998e-02 \n16 8.10983217631539577e-01 2.10244316647910622e-02 \n17 7.89520567565112463e-01 2.18905517668201259e-02 \n18 7.67223154824423825e-01 2.26935557574099028e-02 \n19 7.44155268608359233e-01 2.34311283645131721e-02 \n20 7.20383419593419783e-01 2.41011429727088743e-02 \n21 6.95976148165376562e-01 2.47016677544811963e-02 \n22 6.71003826798997616e-01 2.52309712399765643e-02 \n23 6.45538457155554579e-01 2.56875273091428623e-02 \n24 6.19653462483076733e-01 2.60700195918349108e-02 \n25 5.93423475917880694e-01 2.63773452631854179e-02 \n26 5.66924125297733394e-01 2.66086182232895055e-02 \n27 5.40231815107071411e-01 2.67631716520291274e-02 \n28 5.13423506182971168e-01 2.68405599316674237e-02 \n29 4.86576493817028832e-01 2.68405599316674237e-02 \n30 4.59768184892928644e-01 2.67631716520291274e-02 \n31 4.33075874702266550e-01 2.66086182232895055e-02 \n32 4.06576524082119306e-01 2.63773452631854179e-02 \n33 3.80346537516923267e-01 2.60700195918349108e-02 \n34 3.54461542844445421e-01 2.56875273091428623e-02 \n35 3.28996173201002384e-01 2.52309712399765643e-02 \n36 3.04023851834623438e-01 2.47016677544811963e-02 \n37 2.79616580406580217e-01 2.41011429727088743e-02 \n38 2.55844731391640767e-01 2.34311283645131721e-02 \n39 2.32776845175576202e-01 2.26935557574099028e-02 \n40 2.10479432434887481e-01 2.18905517668201259e-02 \n41 1.89016782368460451e-01 2.10244316647910622e-02 \n42 1.68450777333937374e-01 2.00976927049338998e-02 \n43 1.48840714423045944e-01 1.91130069229292175e-02 \n44 1.30243134489978873e-01 1.80732134335436362e-02 \n45 1.12711659125173627e-01 1.69813102467080042e-02 \n46 9.62968360434559301e-02 1.58404456269046617e-02 \n47 8.10459933303133429e-02 1.46539090220802453e-02 \n48 6.70031029625962615e-02 1.34251215909909349e-02 \n49 5.42086539889849103e-02 1.21576263624819762e-02 \n50 4.26995357178237278e-02 1.08550780700731181e-02 \n51 3.25089312058703256e-02 9.52123273094670347e-03 \n52 2.36662212405654541e-02 8.15993711748548220e-03 \n53 1.61968987485379551e-02 6.77511855649440622e-03 \n54 1.01224926528248448e-02 5.37077676643938663e-03 \n55 5.46049587577868145e-03 3.95098692499933762e-03 \n56 2.22426170135454860e-03 2.51999080632512142e-03 \n57 4.22399796306696749e-04 1.08386162481372505e-03 \n59\n0 9.99591676954647346e-01 1.04774614227061175e-03 \n1 9.97849820191622938e-01 2.43611958413264247e-03 \n2 9.94721182566865481e-01 3.81976472674378734e-03 \n3 9.90213786978357824e-01 5.19294275049793103e-03 \n4 9.84340110840890792e-01 6.55168315317259525e-03 \n5 9.77116504688475551e-01 7.89217365654073383e-03 \n6 9.68563095176726896e-01 9.21067137680501441e-03 \n7 9.58703719394077614e-01 1.05034991442185931e-02 \n8 9.47565855871736029e-01 1.17670526968566818e-02 \n9 9.35180547146441166e-01 1.29978098656492493e-02 \n10 9.21582312908436063e-01 1.41923401002673998e-02 \n11 9.06809053644105800e-01 1.53473139180558410e-02 \n12 8.90901944931180467e-01 1.64595121355226373e-02 \n13 8.73905322639320081e-01 1.75258348182000534e-02 \n14 8.55866559338598898e-01 1.85433099094354618e-02 \n15 8.36835932252468551e-01 1.95091015080800061e-02 \n16 8.16866483119425002e-01 2.04205177693433521e-02 \n17 7.96013870352015096e-01 2.12750184055338180e-02 \n18 7.74336213904198156e-01 2.20702217651486884e-02 \n19 7.51893933278859006e-01 2.28039114702548833e-02 \n20 7.28749579126633296e-01 2.34740425934810079e-02 \n21 7.04967658905209515e-01 2.40787473573032193e-02 \n22 6.80614457084897428e-01 2.46163403396809921e-02 \n23 6.55757850401506803e-01 2.50853231714984505e-02 \n24 6.30467118671405813e-01 2.54843887126969572e-02 \n25 6.04812751696018225e-01 2.58124246954457397e-02 \n26 5.78866252793929004e-01 2.60685168241876972e-02 \n27 5.52699939508172089e-01 2.62519513239143701e-02 \n28 5.26386742044155032e-01 2.63622169295639648e-02 \n29 5.00000000000000000e-01 2.63990063109952114e-02 \n30 4.73613257955844968e-01 2.63622169295639648e-02 \n31 4.47300060491827911e-01 2.62519513239143701e-02 \n32 4.21133747206070996e-01 2.60685168241876972e-02 \n33 3.95187248303981720e-01 2.58124246954457397e-02 \n34 3.69532881328594132e-01 2.54843887126969572e-02 \n35 3.44242149598493141e-01 2.50853231714984505e-02 \n36 3.19385542915102572e-01 2.46163403396809921e-02 \n37 2.95032341094790540e-01 2.40787473573032193e-02 \n38 2.71250420873366649e-01 2.34740425934810079e-02 \n39 2.48106066721140994e-01 2.28039114702548833e-02 \n40 2.25663786095801816e-01 2.20702217651486884e-02 \n41 2.03986129647984932e-01 2.12750184055338180e-02 \n42 1.83133516880574942e-01 2.04205177693433521e-02 \n43 1.63164067747531394e-01 1.95091015080800061e-02 \n44 1.44133440661401130e-01 1.85433099094354618e-02 \n45 1.26094677360679891e-01 1.75258348182000534e-02 \n46 1.09098055068819547e-01 1.64595121355226373e-02 \n47 9.31909463558942136e-02 1.53473139180558410e-02 \n48 7.84176870915638952e-02 1.41923401002673998e-02 \n49 6.48194528535588621e-02 1.29978098656492493e-02 \n50 5.24341441282639570e-02 1.17670526968566818e-02 \n51 4.12962806059223586e-02 1.05034991442185931e-02 \n52 3.14369048232730694e-02 9.21067137680501441e-03 \n53 2.28834953115244731e-02 7.89217365654073383e-03 \n54 1.56598891591092360e-02 6.55168315317259525e-03 \n55 9.78621302164215529e-03 5.19294275049793103e-03 \n56 5.27881743313453420e-03 3.81976472674378734e-03 \n57 2.15017980837701756e-03 2.43611958413264247e-03 \n58 4.08323045352658139e-04 1.04774614227061175e-03 \n60\n0 9.99605061613717982e-01 1.01340598443687923e-03 \n1 9.97920262559419124e-01 2.35636496347678415e-03 \n2 9.94893947611110829e-01 3.69496558167272792e-03 \n3 9.90533600876299047e-01 5.02377859114399184e-03 \n4 9.84850894382526376e-01 6.33908323840797969e-03 \n5 9.77861127919998019e-01 7.63730929839239944e-03 \n6 9.69583138058211613e-01 8.91495050710386025e-03 \n7 9.60039238088813751e-01 1.01685603647286432e-02 \n8 9.49255155405022921e-01 1.13947584719989101e-02 \n9 9.37259961323449131e-01 1.25902388107606237e-02 \n10 9.24085992392964850e-01 1.37517783749623954e-02 \n11 9.09768763081072906e-01 1.48762457503944720e-02 \n12 8.94346869966131996e-01 1.59606095096481646e-02 \n13 8.77861887653292872e-01 1.70019463624732116e-02 \n14 8.60358256677865141e-01 1.79974490255422510e-02 \n15 8.41883163690677727e-01 1.89444337846217219e-02 \n16 8.22486414244738562e-01 1.98403477261904007e-02 \n17 8.02220298524255138e-01 2.06827756177923767e-02 \n18 7.81139450376972300e-01 2.14694464179678197e-02 \n19 7.59300700029284847e-01 2.21982393978935565e-02 \n20 7.36762920880853489e-01 2.28671898580572429e-02 \n21 7.13586870791539152e-01 2.34744944244561007e-02 \n22 6.89835028288398933e-01 2.40185159099855911e-02 \n23 6.65571424134224099e-01 2.44977877278784173e-02 \n24 6.40861468711630855e-01 2.49110178452750901e-02 \n25 6.15771775688014666e-01 2.52570922662546868e-02 \n26 5.90369982436712681e-01 2.55350780349278134e-02 \n27 5.64724567698472457e-01 2.57442257504904674e-02 \n28 5.38904666974768243e-01 2.58839715874550937e-02 \n29 5.12979886150623843e-01 2.59539388156103182e-02 \n30 4.87020113849376102e-01 2.59539388156103182e-02 \n31 4.61095333025231702e-01 2.58839715874550937e-02 \n32 4.35275432301527487e-01 2.57442257504904674e-02 \n33 4.09630017563287319e-01 2.55350780349278134e-02 \n34 3.84228224311985334e-01 2.52570922662546868e-02 \n35 3.59138531288369145e-01 2.49110178452750901e-02 \n36 3.34428575865775901e-01 2.44977877278784173e-02 \n37 3.10164971711601012e-01 2.40185159099855911e-02 \n38 2.86413129208460793e-01 2.34744944244561007e-02 \n39 2.63237079119146455e-01 2.28671898580572429e-02 \n40 2.40699299970715125e-01 2.21982393978935565e-02 \n41 2.18860549623027728e-01 2.14694464179678197e-02 \n42 1.97779701475744807e-01 2.06827756177923767e-02 \n43 1.77513585755261466e-01 1.98403477261904007e-02 \n44 1.58116836309322273e-01 1.89444337846217219e-02 \n45 1.39641743322134804e-01 1.79974490255422510e-02 \n46 1.22138112346707156e-01 1.70019463624732116e-02 \n47 1.05653130033867976e-01 1.59606095096481646e-02 \n48 9.02312369189271213e-02 1.48762457503944720e-02 \n49 7.59140076070351777e-02 1.37517783749623954e-02 \n50 6.27400386765508411e-02 1.25902388107606237e-02 \n51 5.07448445949770302e-02 1.13947584719989101e-02 \n52 3.99607619111862211e-02 1.01685603647286432e-02 \n53 3.04168619417883764e-02 8.91495050710386025e-03 \n54 2.21388720800019465e-02 7.63730929839239944e-03 \n55 1.51491056174736325e-02 6.33908323840797969e-03 \n56 9.46639912370090750e-03 5.02377859114399184e-03 \n57 5.10605238888914119e-03 3.69496558167272792e-03 \n58 2.07973744058091324e-03 2.35636496347678415e-03 \n59 3.94938386281988986e-04 1.01340598443687923e-03 \n61\n0 9.99617798815681691e-01 9.80726680835141426e-04 \n1 9.97987299907560077e-01 2.28046200300620859e-03 \n2 9.95058372616258513e-01 3.57617749587454481e-03 \n3 9.90838005642018516e-01 4.86273091517806701e-03 \n4 9.85337129416591462e-01 6.13663175390605220e-03 \n5 9.78570075956492036e-01 7.39453294246895758e-03 \n6 9.70554493340680557e-01 8.63314649380687166e-03 \n7 9.61311290691477582e-01 9.84923887305058990e-03 \n8 9.50864581237000572e-01 1.10396365741595223e-02 \n9 9.39241618607440487e-01 1.22012335937721015e-02 \n10 9.26472725423831744e-01 1.33309992620754443e-02 \n11 9.12591214054329969e-01 1.44259860440917008e-02 \n12 8.97633299641179772e-01 1.54833371841986978e-02 \n13 8.81638005586156126e-01 1.65002941379537062e-02 \n14 8.64647061724732602e-01 1.74742037582666758e-02 \n15 8.46704795447245528e-01 1.84025252115774078e-02 \n16 8.27858016047535394e-01 1.92828366035040846e-02 \n17 8.08155892598960812e-01 2.01128412954991245e-02 \n18 7.87649825675415305e-01 2.08903738954442468e-02 \n19 7.66393313251462649e-01 2.16134059062480476e-02 \n20 7.44441811131126063e-01 2.22800510175417445e-02 \n21 7.21852588269265794e-01 2.28885700265729804e-02 \n22 6.98684577362878256e-01 2.34373753754045337e-02 \n23 6.74998221102033447e-01 2.39250352925478027e-02 \n24 6.50855314481515346e-01 2.43502775282057639e-02 \n25 6.26318843584526719e-01 2.47119926733677941e-02 \n26 6.01452821259029213e-01 2.50092370540891257e-02 \n27 5.76322120115407621e-01 2.52412351933987006e-02 \n28 5.50992303281137019e-01 2.54073818344091699e-02 \n29 5.25529453353987153e-01 2.55072435193486324e-02 \n30 5.00000000000000000e-01 2.55405597203931106e-02 \n31 4.74470546646012847e-01 2.55072435193486324e-02 \n32 4.49007696718862981e-01 2.54073818344091699e-02 \n33 4.23677879884592323e-01 2.52412351933987006e-02 \n34 3.98547178740970731e-01 2.50092370540891257e-02 \n35 3.73681156415473226e-01 2.47119926733677941e-02 \n36 3.49144685518484654e-01 2.43502775282057639e-02 \n37 3.25001778897966553e-01 2.39250352925478027e-02 \n38 3.01315422637121688e-01 2.34373753754045337e-02 \n39 2.78147411730734206e-01 2.28885700265729804e-02 \n40 2.55558188868873937e-01 2.22800510175417445e-02 \n41 2.33606686748537351e-01 2.16134059062480476e-02 \n42 2.12350174324584695e-01 2.08903738954442468e-02 \n43 1.91844107401039132e-01 2.01128412954991245e-02 \n44 1.72141983952464550e-01 1.92828366035040846e-02 \n45 1.53295204552754416e-01 1.84025252115774078e-02 \n46 1.35352938275267454e-01 1.74742037582666758e-02 \n47 1.18361994413843902e-01 1.65002941379537062e-02 \n48 1.02366700358820173e-01 1.54833371841986978e-02 \n49 8.74087859456700311e-02 1.44259860440917008e-02 \n50 7.35272745761682833e-02 1.33309992620754443e-02 \n51 6.07583813925594851e-02 1.22012335937721015e-02 \n52 4.91354187629994138e-02 1.10396365741595223e-02 \n53 3.86887093085223691e-02 9.84923887305058990e-03 \n54 2.94455066593194252e-02 8.63314649380687166e-03 \n55 2.14299240435079537e-02 7.39453294246895758e-03 \n56 1.46628705834085452e-02 6.13663175390605220e-03 \n57 9.16199435798146014e-03 4.86273091517806701e-03 \n58 4.94162738374147488e-03 3.57617749587454481e-03 \n59 2.01270009243988265e-03 2.28046200300620859e-03 \n60 3.82201184318264138e-04 9.80726680835141426e-04 \n62\n0 9.99629929654388460e-01 9.49602839756845244e-04 \n1 9.98051148158133561e-01 2.20816672846545258e-03 \n2 9.95214985594645163e-01 3.46302095091548029e-03 \n3 9.91127974548618340e-01 4.70928971421019377e-03 \n4 9.85800361685825854e-01 5.94369505850525070e-03 \n5 9.79245586486963582e-01 7.16309591190325903e-03 \n6 9.71480200696164253e-01 8.36440589508865781e-03 \n7 9.62523817818101923e-01 9.54458832928659941e-03 \n8 9.52399061260546742e-01 1.07006611388349836e-02 \n9 9.41131506415948671e-01 1.18297036043413968e-02 \n10 9.28749615756035429e-01 1.29288634770123485e-02 \n11 9.15284666802002378e-01 1.39953640816573195e-02 \n12 9.00770673051988213e-01 1.50265112869949341e-02 \n13 8.85244298027709653e-01 1.60197002908123373e-02 \n14 8.68744762641578405e-01 1.69724221897052732e-02 \n15 8.51313746111148517e-01 1.78822703113840700e-02 \n16 8.32995280667739757e-01 1.87469462911400153e-02 \n17 8.13835640323442577e-01 1.95642658759815416e-02 \n18 7.93883223976543650e-01 2.03321644412087221e-02 \n19 7.73188433150125531e-01 2.10487022051925494e-02 \n20 7.51803544672377977e-01 2.17120691290237089e-02 \n21 7.29782578620056688e-01 2.23205894885622064e-02 \n22 7.07181161858563057e-01 2.28727261072850900e-02 \n23 6.84056387523282239e-01 2.33670842392077610e-02 \n24 6.60466670797096977e-01 2.38024150920506175e-02 \n25 6.36471601348363114e-01 2.41776189817388375e-02 \n26 6.12131792802082741e-01 2.44917481102589173e-02 \n27 5.87508729624507842e-01 2.47440089598496456e-02 \n28 5.62664611807948356e-01 2.49337642974761971e-02 \n29 5.37662197748117188e-01 2.50605347845216445e-02 \n30 5.12564645710910316e-01 2.51240001876281392e-02 \n31 4.87435354289089684e-01 2.51240001876281392e-02 \n32 4.62337802251882812e-01 2.50605347845216445e-02 \n33 4.37335388192051588e-01 2.49337642974761971e-02 \n34 4.12491270375492158e-01 2.47440089598496456e-02 \n35 3.87868207197917259e-01 2.44917481102589173e-02 \n36 3.63528398651636830e-01 2.41776189817388375e-02 \n37 3.39533329202903023e-01 2.38024150920506175e-02 \n38 3.15943612476717761e-01 2.33670842392077610e-02 \n39 2.92818838141436999e-01 2.28727261072850900e-02 \n40 2.70217421379943312e-01 2.23205894885622064e-02 \n41 2.48196455327622023e-01 2.17120691290237089e-02 \n42 2.26811566849874441e-01 2.10487022051925494e-02 \n43 2.06116776023456322e-01 2.03321644412087221e-02 \n44 1.86164359676557423e-01 1.95642658759815416e-02 \n45 1.67004719332260271e-01 1.87469462911400153e-02 \n46 1.48686253888851483e-01 1.78822703113840700e-02 \n47 1.31255237358421623e-01 1.69724221897052732e-02 \n48 1.14755701972290347e-01 1.60197002908123373e-02 \n49 9.92293269480118145e-02 1.50265112869949341e-02 \n50 8.47153331979975666e-02 1.39953640816573195e-02 \n51 7.12503842439645430e-02 1.29288634770123485e-02 \n52 5.88684935840513152e-02 1.18297036043413968e-02 \n53 4.76009387394532649e-02 1.07006611388349836e-02 \n54 3.74761821818981253e-02 9.54458832928659941e-03 \n55 2.85197993038357467e-02 8.36440589508865781e-03 \n56 2.07544135130364529e-02 7.16309591190325903e-03 \n57 1.41996383141740970e-02 5.94369505850525070e-03 \n58 8.87202545138167549e-03 4.70928971421019377e-03 \n59 4.78501440535482412e-03 3.46302095091548029e-03 \n60 1.94885184186643348e-03 2.20816672846545258e-03 \n61 3.70070345611485136e-04 9.49602839756845244e-04 \n63\n0 9.99641492014561872e-01 9.19937297788542101e-04 \n1 9.98112006388985007e-01 2.13925417343188099e-03 \n2 9.95364273446094683e-01 3.35514588298006788e-03 \n3 9.91404405296863578e-01 4.56298433816332803e-03 \n4 9.86242017348785027e-01 5.75968803844002092e-03 \n5 9.79889724879470903e-01 6.94230630805780548e-03 \n6 9.72363067020504901e-01 8.10793920516916962e-03 \n7 9.63680460310921583e-01 9.25373223008063572e-03 \n8 9.53863151389265806e-01 1.03768806290195446e-02 \n9 9.42935164253926761e-01 1.14746355024449662e-02 \n10 9.30923241182061822e-01 1.25443102766724934e-02 \n11 9.17856777159751447e-01 1.35832871795489672e-02 \n12 9.03767747886728312e-01 1.45890236041402634e-02 \n13 8.88690631495186123e-01 1.55590583111099093e-02 \n14 8.72662324158923752e-01 1.64910174418896709e-02 \n15 8.55722049792422945e-01 1.73826203226779379e-02 \n16 8.37911264057493055e-01 1.82316850427286445e-02 \n17 8.19273552910682712e-01 1.90361337921747774e-02 \n18 7.99854525938812566e-01 1.97939979457720482e-02 \n19 7.79701704743142487e-01 2.05034228798331997e-02 \n20 7.58864406645016643e-01 2.11626725104079108e-02 \n21 7.37393623997402159e-01 2.17701335415137961e-02 \n22 7.15341899397555769e-01 2.23243194129706980e-02 \n23 6.92763197106123885e-01 2.28238739381463052e-02 \n24 6.69712770987292205e-01 2.32675746226918487e-02 \n25 6.46247029293125719e-01 2.36543356561344578e-02 \n26 6.22423396622976632e-01 2.39832105689975657e-02 \n27 5.98300173395753365e-01 2.42533945489419242e-02 \n28 5.73936393178935966e-01 2.44642264102559945e-02 \n29 5.49391678223472679e-01 2.46151902118737810e-02 \n30 5.24726093558079754e-01 2.47059165199590910e-02 \n31 5.00000000000000000e-01 2.47361833119655108e-02 \n32 4.75273906441920191e-01 2.47059165199590910e-02 \n33 4.50608321776527376e-01 2.46151902118737810e-02 \n34 4.26063606821064034e-01 2.44642264102559945e-02 \n35 4.01699826604246635e-01 2.42533945489419242e-02 \n36 3.77576603377023312e-01 2.39832105689975657e-02 \n37 3.53752970706874281e-01 2.36543356561344578e-02 \n38 3.30287229012707795e-01 2.32675746226918487e-02 \n39 3.07236802893876060e-01 2.28238739381463052e-02 \n40 2.84658100602444175e-01 2.23243194129706980e-02 \n41 2.62606376002597786e-01 2.17701335415137961e-02 \n42 2.41135593354983385e-01 2.11626725104079108e-02 \n43 2.20298295256857485e-01 2.05034228798331997e-02 \n44 2.00145474061187378e-01 1.97939979457720482e-02 \n45 1.80726447089317316e-01 1.90361337921747774e-02 \n46 1.62088735942506945e-01 1.82316850427286445e-02 \n47 1.44277950207577083e-01 1.73826203226779379e-02 \n48 1.27337675841076303e-01 1.64910174418896709e-02 \n49 1.11309368504813835e-01 1.55590583111099093e-02 \n50 9.62322521132716185e-02 1.45890236041402634e-02 \n51 8.21432228402485809e-02 1.35832871795489672e-02 \n52 6.90767588179381359e-02 1.25443102766724934e-02 \n53 5.70648357460732877e-02 1.14746355024449662e-02 \n54 4.61368486107342213e-02 1.03768806290195446e-02 \n55 3.63195396890783964e-02 9.25373223008063572e-03 \n56 2.76369329794950991e-02 8.10793920516916962e-03 \n57 2.01102751205290350e-02 6.94230630805780548e-03 \n58 1.37579826512149884e-02 5.75968803844002092e-03 \n59 8.59559470313638226e-03 4.56298433816332803e-03 \n60 4.63572655390526688e-03 3.35514588298006788e-03 \n61 1.88799361101494581e-03 2.13925417343188099e-03 \n62 3.58507985438109790e-04 9.19937297788542101e-04 \n64\n0 9.99652520867886030e-01 8.91640360848216509e-04 \n1 9.98170058385977610e-01 2.07351663028123396e-03 \n2 9.95506685738372199e-01 3.25222898448918139e-03 \n3 9.91668126942312989e-01 4.42337991318197347e-03 \n4 9.86663413894955488e-01 5.58406973006556409e-03 \n5 9.80504399826026884e-01 6.73152394835932130e-03 \n6 9.73205687429201438e-01 7.86301523801235906e-03 \n7 9.64784586065969840e-01 8.97585788784867160e-03 \n8 9.55261068539251412e-01 1.00674115767651045e-02 \n9 9.44657722997557014e-01 1.11350869041916267e-02 \n10 9.32999699077046385e-01 1.21763512843554370e-02 \n11 9.20314648126290158e-01 1.31887348575273292e-02 \n12 9.06632657561398769e-01 1.41698363071297417e-02 \n13 8.91986179471670693e-01 1.51173285362012390e-02 \n14 8.76409953630265970e-01 1.60289641774257752e-02 \n15 8.59940925085805441e-01 1.69025809185708031e-02 \n16 8.42618156527116580e-01 1.77361066284411929e-02 \n17 8.24482735627328656e-01 1.85275642701200234e-02 \n18 8.05577677586196583e-01 1.92750765893078130e-02 \n19 7.85947823101317056e-01 1.99768705663601713e-02 \n20 7.65639732009947283e-01 2.06312816213117638e-02 \n21 7.44701572853526450e-01 2.12367575618267954e-02 \n22 7.23183008626732016e-01 2.17918622646617252e-02 \n23 7.01135078981995785e-01 2.22952790818782831e-02 \n24 6.78610079168834091e-01 2.27458139637090710e-02 \n25 6.55661435995105513e-01 2.31423982906572082e-02 \n26 6.32343581104383712e-01 2.34840914081050067e-02 \n27 6.08711821870003500e-01 2.37700828574151542e-02 \n28 5.84822210211996429e-01 2.39996942982291551e-02 \n29 5.60731409648060231e-01 2.41723811174014772e-02 \n30 5.36496560893899521e-01 2.42877337207517141e-02 \n31 5.12175146331712239e-01 2.43454785045698618e-02 \n32 4.87824853668287761e-01 2.43454785045698618e-02 \n33 4.63503439106100479e-01 2.42877337207517141e-02 \n34 4.39268590351939714e-01 2.41723811174014772e-02 \n35 4.15177789788003571e-01 2.39996942982291551e-02 \n36 3.91288178129996445e-01 2.37700828574151542e-02 \n37 3.67656418895616288e-01 2.34840914081050067e-02 \n38 3.44338564004894543e-01 2.31423982906572082e-02 \n39 3.21389920831165965e-01 2.27458139637090710e-02 \n40 2.98864921018004215e-01 2.22952790818782831e-02 \n41 2.76816991373267929e-01 2.17918622646617252e-02 \n42 2.55298427146473494e-01 2.12367575618267954e-02 \n43 2.34360267990052717e-01 2.06312816213117638e-02 \n44 2.14052176898682972e-01 1.99768705663601713e-02 \n45 1.94422322413803361e-01 1.92750765893078130e-02 \n46 1.75517264372671317e-01 1.85275642701200234e-02 \n47 1.57381843472883365e-01 1.77361066284411929e-02 \n48 1.40059074914194587e-01 1.69025809185708031e-02 \n49 1.23590046369734058e-01 1.60289641774257752e-02 \n50 1.08013820528329293e-01 1.51173285362012390e-02 \n51 9.33673424386012168e-02 1.41698363071297417e-02 \n52 7.96853518737098143e-02 1.31887348575273292e-02 \n53 6.70003009229535873e-02 1.21763512843554370e-02 \n54 5.53422770024429439e-02 1.11350869041916267e-02 \n55 4.47389314607485947e-02 1.00674115767651045e-02 \n56 3.52154139340302152e-02 8.97585788784867160e-03 \n57 2.67943125707985931e-02 7.86301523801235906e-03 \n58 1.94956001739731398e-02 6.73152394835932130e-03 \n59 1.33365861050445175e-02 5.58406973006556409e-03 \n60 8.33187305768702188e-03 4.42337991318197347e-03 \n61 4.49331426162783917e-03 3.25222898448918139e-03 \n62 1.82994161402236038e-03 2.07351663028123396e-03 \n63 3.47479132113930294e-04 8.91640360848216509e-04 \n"
  },
  {
    "path": "src/madness/mra/gfit.h",
    "content": "/*\n This file is part of MADNESS.\n\n Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n For more information please contact:\n\n Robert J. Harrison\n Oak Ridge National Laboratory\n One Bethel Valley Road\n P.O. Box 2008, MS-6367\n\n email: harrisonrj@ornl.gov\n tel:   865-241-3937\n fax:   865-572-0680\n\n\n $Id: key.h 2907 2012-06-14 10:15:05Z 3ru6ruWu $\n */\n\n#ifndef MADNESS_MRA_GFIT_H__INCLUDED\n#define MADNESS_MRA_GFIT_H__INCLUDED\n\n/// \\file gfit.h\n/// \\brief fit isotropic functions to a set of Gaussians with controlled precision\n\n//#include <iostream>\n\n#include <cmath>\n#include \"../constants.h\"\n#include \"../tensor/basetensor.h\"\n#include \"../tensor/slice.h\"\n#include \"../tensor/tensor.h\"\n#include \"../tensor/tensor_lapack.h\"\n#include \"../world/madness_exception.h\"\n#include \"../world/print.h\"\n#include <madness/mra/operatorinfo.h>\n\n\nnamespace madness {\n\ntemplate<typename T, std::size_t NDIM>\nclass GFit {\n\npublic:\n\n\t/// default ctor does nothing\n\tGFit() = default;\n\n    GFit(OperatorInfo info) {\n        double mu = info.mu;\n        double lo = info.lo;\n        double hi = info.hi;\n        MADNESS_CHECK_THROW(hi>0,\"hi must be positive in gfit: U need to set it manually in operator.h\");\n        double eps = info.thresh;\n        bool debug=info.debug;\n        OpType type = info.type;\n\n\n        if (type==OT_G12) {*this=CoulombFit(lo,hi,eps,debug);\n        } else if (type==OT_SLATER) {*this=SlaterFit(mu,lo,hi,eps,debug);\n        } else if (type==OT_GAUSS)  {*this=GaussFit(mu,lo,hi,eps,debug);\n        } else if (type==OT_F12)    {*this=F12Fit(mu,lo,hi,eps,debug);\n        } else if (type==OT_FG12)   {*this=FGFit(mu,lo,hi,eps,debug);\n        } else if (type==OT_F212)   {*this=F12sqFit(mu,lo,hi,eps,debug);\n        } else if (type==OT_F2G12)  {*this=F2GFit(mu,lo,hi,eps,debug);\n        } else if (type==OT_BSH)    {*this=BSHFit(mu,lo,hi,eps,debug);\n        } else {\n            print(\"Operator type not implemented: \",type);\n            MADNESS_EXCEPTION(\"Operator type not implemented: \",1);\n        }\n\n    }\n\n    /// copy constructor\n    GFit(const GFit& other) = default;\n\n    /// assignment operator\n    GFit& operator=(const GFit& other) {\n        coeffs_ = other.coeffs_;\n        exponents_ = other.exponents_;\n        return *this;\n    }\n\n\t/// return a fit for the Coulomb function\n\n    ///  f(r) = 1/r\n\tstatic GFit CoulombFit(double lo, double hi, double eps, bool prnt=false) {\n\t\tGFit fit=BSHFit(0.0,lo,hi,eps/(4.0*constants::pi),prnt);\n\t\tfit.coeffs_.scale(4.0*constants::pi);   // BSHFit scales by 1/(4 pi), undo here\n\t\treturn fit;\n\t}\n\n\t/// return a fit for the bound-state Helmholtz function\n\n\t/// the BSH function is defined by\n\t///  f(r) = 1/ (4 pi) exp(-\\mu r)/r\n\t/// @param[in]\tmu\tthe exponent of the BSH\n\t/// @param[in]\tlo\tthe smallest length scale that needs to be precisely represented\n\t/// @param[in]\thi\tthe largest length scale that needs to be precisely represented\n\t/// @param[in]\teps\tthe precision threshold\n\t/// @parma[in]\tprnt\tprint level\n\tstatic GFit BSHFit(double mu, double lo, double hi, double eps, bool prnt=false) {\n\t\tGFit fit;\n        bool fix_interval=false;\n\t\tif (NDIM==3) bsh_fit(mu,lo,hi,eps,fit.coeffs_,fit.exponents_,prnt,fix_interval);\n\t\telse bsh_fit_ndim(NDIM,mu,lo,hi,eps,fit.coeffs_,fit.exponents_,prnt);\n\n        if (prnt) {\n            print(\"bsh fit\");\n            auto exact = [&mu](const double r) -> double { return 1.0/(4.0 * constants::pi) * exp(-mu * r)/r; };\n            fit.print_accuracy(exact, lo, hi);\n        }\n\t\treturn fit;\n\t}\n\n\t/// return a fit for the Slater function\n\n\t/// the Slater function is defined by\n\t///  f(r) = exp(-\\gamma r)\n\t/// @param[in]\tgamma\tthe exponent of the Slater function\n\t/// @param[in]\tlo\tthe smallest length scale that needs to be precisely represented\n\t/// @param[in]\thi\tthe largest length scale that needs to be precisely represented\n\t/// @param[in]\teps\tthe precision threshold\n\t/// @parma[in]\tprnt\tprint level\n\tstatic GFit SlaterFit(double gamma, double lo, double hi, double eps, bool prnt=false) {\n\t\tGFit fit;\n\t\tslater_fit(gamma,lo,hi,eps,fit.coeffs_,fit.exponents_,false);\n        if (prnt) {\n            print(\"Slater fit\");\n            auto exact = [&gamma](const double r) -> double { return exp(-gamma * r); };\n            fit.print_accuracy(exact, lo, hi);\n        }\n\t\treturn fit;\n\t}\n\n    /// return a (trivial) fit for a single Gauss function\n\n    /// the Gauss function is defined by\n    ///  f(r) = exp(-\\gamma r^2)\n    /// @param[in]\tgamma\tthe exponent of the Gauss function\n    /// @param[in]\tlo\tthe smallest length scale that needs to be precisely represented\n    /// @param[in]\thi\tthe largest length scale that needs to be precisely represented\n    /// @param[in]\teps\tthe precision threshold\n    /// @parma[in]\tprnt\tprint level\n    static GFit GaussFit(double gamma, double lo, double hi, double eps, bool prnt=false) {\n        GFit fit;\n        fit.coeffs_=Tensor<T>(1);\n        fit.exponents_=Tensor<double>(1);\n        fit.coeffs_=1.0;\n        fit.exponents_=gamma;\n        if (prnt) {\n            print(\"Gauss fit\");\n            auto exact = [&gamma](const double r) -> double { return exp(-gamma * r*r); };\n            fit.print_accuracy(exact, lo, hi);\n        }\n        return fit;\n    }\n\n    /// return a fit for the F12 correlation factor\n\n    /// the Slater function is defined by\n    ///  f(r) = 1/(2 gamma) * (1 - exp(-\\gamma r))\n    /// @param[in]\tgamma\tthe exponent of the Slater function\n    /// @param[in]\tlo\tthe smallest length scale that needs to be precisely represented\n    /// @param[in]\thi\tthe largest length scale that needs to be precisely represented\n    /// @param[in]\teps\tthe precision threshold\n    /// @parma[in]\tprnt\tprint level\n    static GFit F12Fit(double gamma, double lo, double hi, double eps, bool prnt=false) {\n        GFit fit;\n        f12_fit(gamma,lo*0.1,hi,eps*0.01,fit.coeffs_,fit.exponents_,false);\n        fit.coeffs_*=(0.5/gamma);\n        if (prnt) {\n            print(\"f12 fit\");\n            auto exact=[&gamma](const double r) -> double {return 0.5/gamma*(1.0-exp(-gamma*r));};\n            fit.print_accuracy(exact,lo,hi);\n        }\n        return fit;\n    }\n\n    /// return a fit for the F12^2 correlation factor\n\n    /// the Slater function square is defined by\n    ///  f(r) = [ 1/(2 gamma) * (1 - exp(-\\gamma r)) ] ^2\n    /// @param[in]\tgamma\tthe exponent of the Slater function\n    /// @param[in]\tlo\tthe smallest length scale that needs to be precisely represented\n    /// @param[in]\thi\tthe largest length scale that needs to be precisely represented\n    /// @param[in]\teps\tthe precision threshold\n    /// @parma[in]\tprnt\tprint level\n    static GFit F12sqFit(double gamma, double lo, double hi, double eps, bool prnt=false) {\n        GFit fit;\n        f12sq_fit(gamma,lo*0.1,hi,eps*0.01,fit.coeffs_,fit.exponents_,false);\n        fit.coeffs_*=(0.25/(gamma*gamma));\n        if (prnt) {\n            print(\"f12sq fit\");\n            auto exact=[&gamma](const double r) -> double {return std::pow(0.5/gamma*(1.0-exp(-gamma*r)),2.0);};\n            fit.print_accuracy(exact,lo,hi);\n        }\n        return fit;\n    }\n\n\n    /// return a fit for the FG function\n\n    /// fg = 1/(2 mu) * (1 - exp(-gamma r12))  / r12\n    ///    = 1/(2 mu) *( 1/r12 - exp(-gamma r12)/r12)\n    ///    = 1/(2 mu) * (coulomb - bsh)\n    /// @param[in]\tgamma\tthe exponent of the Slater function\n    /// @param[in]\tlo\tthe smallest length scale that needs to be precisely represented\n    /// @param[in]\thi\tthe largest length scale that needs to be precisely represented\n    /// @param[in]\teps\tthe precision threshold\n    /// @parma[in]\tprnt\tprint level\n    static GFit FGFit(double gamma, double lo, double hi, double eps, bool prnt=false) {\n        GFit bshfit,coulombfit;\n        eps*=0.1;\n        lo*=0.1;\n//        bool restrict_interval=false;\n        bool fix_interval=true;\n        bsh_fit(gamma,lo,hi,eps,bshfit.coeffs_,bshfit.exponents_,false,fix_interval);\n        bsh_fit(0.0,lo,hi,eps,coulombfit.coeffs_,coulombfit.exponents_,false,fix_interval);\n        // check the exponents are identical\n        auto diffexponents=(coulombfit.exponents() - bshfit.exponents());\n        MADNESS_CHECK(diffexponents.normf()/coulombfit.exponents().size()<1.e-12);\n        auto diffcoefficients=(coulombfit.coeffs() - bshfit.coeffs());\n        GFit fgfit;\n        fgfit.exponents_=bshfit.exponents_;\n        fgfit.coeffs_=4.0*constants::pi*0.5/gamma*diffcoefficients;\n        GFit<double,3>::prune_small_coefficients(eps,lo,hi,fgfit.coeffs_,fgfit.exponents_);\n\n        if (prnt) {\n            print(\"fg fit\");\n            auto exact=[&gamma](const double r) -> double {return 0.5/gamma*(1.0-exp(-gamma*r))/r;};\n            fgfit.print_accuracy(exact,lo,hi);\n        }\n        return fgfit;\n    }\n\n    /// return a fit for the F2G function\n\n    /// f2g = (1/(2 mu) * (1 - exp(-gamma r12)))^2  / r12\n    ///    = 1/(4 mu^2) * [ 1/r12 - 2 exp(-gamma r12)/r12) + exp(-2 gamma r12)/r12 ]\n    /// @param[in]\tgamma\tthe exponent of the Slater function\n    /// @param[in]\tlo\tthe smallest length scale that needs to be precisely represented\n    /// @param[in]\thi\tthe largest length scale that needs to be precisely represented\n    /// @param[in]\teps\tthe precision threshold\n    /// @parma[in]\tprnt\tprint level\n    static GFit F2GFit(double gamma, double lo, double hi, double eps, bool prnt=false) {\n        GFit bshfit,coulombfit,bsh2fit;\n        eps*=0.1;\n        lo*=0.1;\n//        bool restrict_interval=false;\n        bool fix_interval=true;\n        bsh_fit(gamma,lo,hi,eps,bshfit.coeffs_,bshfit.exponents_,false,fix_interval);\n        bsh_fit(2.0*gamma,lo,hi,eps,bsh2fit.coeffs_,bsh2fit.exponents_,false,fix_interval);\n        bsh_fit(0.0,lo,hi,eps,coulombfit.coeffs_,coulombfit.exponents_,false,fix_interval);\n\n        // check the exponents are identical\n        auto diffexponents=(coulombfit.exponents() - bshfit.exponents());\n        MADNESS_CHECK(diffexponents.normf()/coulombfit.exponents().size()<1.e-12);\n        auto diffexponents1=(coulombfit.exponents() - bsh2fit.exponents());\n        MADNESS_CHECK(diffexponents1.normf()/coulombfit.exponents().size()<1.e-12);\n\n        auto coefficients=(coulombfit.coeffs() - 2.0* bshfit.coeffs() + bsh2fit.coeffs());\n        GFit f2gfit;\n        f2gfit.exponents_=bshfit.exponents_;\n        // additional factor 4 pi due to implementation of bsh_fit\n        double fourpi=4.0*constants::pi;\n        double fourmu2=4.0*gamma*gamma;\n        f2gfit.coeffs_=fourpi/fourmu2*coefficients;\n        GFit<double,3>::prune_small_coefficients(eps,lo,hi,f2gfit.coeffs_,f2gfit.exponents_);\n\n        if (prnt) {\n            print(\"fg fit\");\n            auto exact=[&gamma](const double r) -> double {\n                return 0.25/(gamma*gamma)*(1.0-2.0*exp(-gamma*r)+exp(-2.0*gamma*r))/r;\n            };\n            f2gfit.print_accuracy(exact,lo,hi);\n        }\n        return f2gfit;\n    }\n\n\n\t/// return a fit for a general isotropic function\n\n\t/// note that the error is controlled over a uniform grid, the boundaries\n\t/// will be poorly represented in general. Following Beylkin 2005\n\tstatic GFit GeneralFit() {\n\t\tMADNESS_EXCEPTION(\"General GFit still to be implemented\",1);\n\t\treturn GFit();\n\t}\n\n\t/// return the coefficients of the fit\n\tTensor<T> coeffs() const {return coeffs_;}\n\n\t/// return the exponents of the fit\n\tTensor<T> exponents() const {return exponents_;}\n\n    void static prune_small_coefficients(const double eps, const double lo, const double hi,\n                                  Tensor<double>& coeff, Tensor<double>& expnt) {\n        double mid = lo + (hi-lo)*0.5;\n        long npt=coeff.size();\n        long i;\n        for (i=npt-1; i>0; --i) {\n            double cnew = coeff[i]*exp(-(expnt[i]-expnt[i-1])*mid*mid);\n            double errlo = coeff[i]*exp(-expnt[i]*lo*lo) -\n                           cnew*exp(-expnt[i-1]*lo*lo);\n            double errhi = coeff[i]*exp(-expnt[i]*hi*hi) -\n                           cnew*exp(-expnt[i-1]*hi*hi);\n            if (std::max(std::abs(errlo),std::abs(errhi)) > 0.03*eps) break;\n            npt--;\n            coeff[i-1] = coeff[i-1] + cnew;\n        }\n        coeff = coeff(Slice(0,npt-1));\n        expnt = expnt(Slice(0,npt-1));\n    }\n\n    void truncate_periodic_expansion(Tensor<double>& c, Tensor<double>& e,\n\t\t\tdouble L, bool discardG0) const {\n\t\tdouble tcut = 0.25/L/L;\n\n\t\tif (discardG0) {\n\t\t\t// Relies on expnts being in decreasing order\n\t\t\tfor (int i=0; i<e.dim(0); ++i) {\n\t\t\t\tif (e(i) < tcut) {\n\t\t\t\t\tc = c(Slice(0,i));\n\t\t\t\t\te = e(Slice(0,i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n//\t\t\t// Relies on expnts being in decreasing order\n//\t\t\tint icut = -1;\n//\t\t\tfor (int i=0; i<e.dim(0); ++i) {\n//\t\t\t\tif (e(i) < tcut) {\n//\t\t\t\t\ticut = i;\n//\t\t\t\t\tbreak;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tif (icut > 0) {\n//\t\t\t\tfor (int i=icut+1; i<e.dim(0); ++i) {\n//\t\t\t\t\tc(icut) += c(i);\n//\t\t\t\t}\n//\t\t\t\tc = c(Slice(0,icut));\n//\t\t\t\te = e(Slice(0,icut));\n//\t\t\t}\n\t\t}\n\t}\n\nprivate:\n\n\t/// ctor taking an isotropic function\n\n\t/// the function will be represented with a uniform error on a uniform grid\n\t/// @param[in]\tf\ta 1d-function that implements T operator()\n\ttemplate<typename funcT>\n\tGFit(const funcT& f) {\n\n\t}\n\n    /// print coefficients and exponents, and values and errors\n\n    /// @param[in]  op  the exact function, e.g. 1/r, exp(-mu r), etc\n    /// @param[in]  lo  lower bound for the range r\n    /// @param[in]  hi  higher bound for the range r\n    template<typename opT>\n    void print_accuracy(opT op, const double lo, const double hi) const {\n\n        std::cout << \"weights and roots\" << std::endl;\n        for (int i=0; i<coeffs_.size(); ++i)\n            std::cout << i << \" \" << coeffs_[i] << \" \" << exponents_[i] << std::endl;\n\n        long npt = 300;\n        std::cout << \"       x         value   abserr   relerr\" << std::endl;\n        std::cout << \"  ------------  ------- -------- -------- \" << std::endl;\n        double step = exp(log(hi/lo)/(npt+1));\n        for (int i=0; i<=npt; ++i) {\n            double r = lo*(pow(step,i+0.5));\n//            double exact = exp(-mu*r)/r/4.0/constants::pi;\n            double exact = op(r);\n            double test = 0.0;\n            for (int j=0; j<coeffs_.dim(0); ++j)\n                test += coeffs_[j]*exp(-r*r*exponents_[j]);\n            double err = 0.0;\n            if (exact) err = (exact-test)/exact;\n            printf(\"  %.6e %8.1e %8.1e %8.1e\\n\",r, exact, exact-test, err);\n        }\n    }\n\n\t/// the coefficients of the expansion f(x) = \\sum_m coeffs[m] exp(-exponents[m] * x^2)\n\tTensor<T> coeffs_;\n\n\t/// the exponents of the expansion f(x) = \\sum_m coeffs[m] exp(-exponents[m] * x^2)\n\tTensor<T> exponents_;\n\n\t/// fit the function exp(-mu r)/r\n\n\t/// formulas taken from\n\t/// G. Beylkin and L. Monzon, On approximation of functions by exponential sums,\n\t/// Appl Comput Harmon A, vol. 19, no. 1, pp. 17-48, Jul. 2005.\n\t/// and\n\t/// R. J. Harrison, G. I. Fann, T. Yanai, and G. Beylkin,\n\t/// Multiresolution Quantum Chemistry in Multiwavelet Bases,\n\t/// Lecture Notes in Computer Science, vol. 2660, p. 103, 2003.\n\tstatic void bsh_fit(double mu, double lo, double hi, double eps,\n\t\t\tTensor<double>& pcoeff, Tensor<double>& pexpnt, bool prnt, bool fix_interval) {\n\n        if (mu < 0.0) throw \"cannot handle negative mu in bsh_fit\";\n//        bool restrict_interval=(mu>0) and use_mu_for_restricting_interval;\n\n\n\t\tif ((mu > 0) and (not fix_interval)) {\n//        if (restrict_interval) {\n\t\t\t// Restrict hi according to the exponential decay\n\t\t\tdouble r = -log(4*constants::pi*0.01*eps);\n\t\t\tr = -log(r * 4*constants::pi*0.01*eps);\n\t\t\tif (hi > r) hi = r;\n\t\t}\n\n\t\tdouble TT;\n\t\tdouble slo, shi;\n\n\t\tif (eps >= 1e-2) TT = 5;\n\t\telse if (eps >= 1e-4) TT = 10;\n\t\telse if (eps >= 1e-6) TT = 14;\n\t\telse if (eps >= 1e-8) TT = 18;\n\t\telse if (eps >= 1e-10) TT = 22;\n\t\telse if (eps >= 1e-12) TT = 26;\n\t\telse TT = 30;\n\n        if ((mu > 0) and (not fix_interval)) {\n//\t\tif (restrict_interval) {\n\t\t\tslo = -0.5*log(4.0*TT/(mu*mu));\n\t\t}\n\t\telse {\n\t\t\tslo = log(eps/hi) - 1.0;\n\t\t}\n\t\tshi = 0.5*log(TT/(lo*lo));\n                if (shi <= slo) throw \"bsh_fit: logic error in slo,shi\";\n\n\t\t// Resolution required for quadrature over s\n\t\tdouble h = 1.0/(0.2-.50*log10(eps)); // was 0.5 was 0.47\n\n\t\t// Truncate the number of binary digits in h's mantissa\n\t\t// so that rounding does not occur when performing\n\t\t// manipulations to determine the quadrature points and\n\t\t// to limit the number of distinct values in case of\n\t\t// multiple precisions being used at the same time.\n\t\th = floor(64.0*h)/64.0;\n\n\n\t\t// Round shi/lo up/down to an integral multiple of quadrature points\n\t\tshi = ceil(shi/h)*h;\n\t\tslo = floor(slo/h)*h;\n\n\t\tlong npt = long((shi-slo)/h+0.5);\n\n\t\t//if (prnt)\n                //std::cout << \"mu \" << mu << \" slo \" << slo << \" shi \" << shi << \" npt \" << npt << \" h \" << h << \" \" << eps << std::endl;\n\n\t\tTensor<double> coeff(npt), expnt(npt);\n\n\t\tfor (int i=0; i<npt; ++i) {\n\t\t\tdouble s = slo + h*(npt-i);\t// i+1\n\t\t\tcoeff[i] = h*2.0/sqrt(constants::pi)*exp(-mu*mu*exp(-2.0*s)/4.0)*exp(s);\n\t\t\tcoeff[i] = coeff[i]/(4.0*constants::pi);\n\t\t\texpnt[i] = exp(2.0*s);\n\t\t}\n\n#if ONE_TERM\n\t\tnpt=1;\n\t\tdouble s=1.0;\n\t\tcoeff[0]=1.0;\n\t\texpnt[0] = exp(2.0*s);\n\t\tcoeff=coeff(Slice(0,0));\n\t\texpnt=expnt(Slice(0,0));\n\t\tprint(\"only one term in gfit\",s,coeff[0],expnt[0]);\n\n\n#endif\n\n\t\t// Prune large exponents from the fit ... never necessary due to construction\n\n\t\t// Prune small exponents from Coulomb fit.  Evaluate a gaussian at\n\t\t// the range midpoint, and replace it there with the next most\n\t\t// diffuse gaussian.  Then examine the resulting error at the two\n\t\t// end points ... if this error is less than the desired\n\t\t// precision, can discard the diffuse gaussian.\n\n        if ((mu == 0.0) and (not fix_interval)) {\n//\t\tif (restrict_interval) {\n            GFit<double,3>::prune_small_coefficients(eps,lo,hi,coeff,expnt);\n\t\t}\n\n\t\t// Modify the coeffs of the largest exponents to satisfy the moment conditions\n\t\t//\n\t\t// SETTING NMOM>1 TURNS OUT TO BE A BAD IDEA (AS CURRENTLY IMPLEMENTED)\n\t\t// [It is accurate and efficient for a one-shot application but it seems to\n\t\t//  introduce fine-scale noise that amplifies during iterative solution of\n\t\t//  the SCF and DFT equations ... the symptom is negative coeffs in the fit]\n\t\t//\n\t\t// SET NMOM=0 or 1 (1 recommended) unless you are doing a one-shot application\n\t\t//\n\t\t// Determine the effective range of the four largest exponents and compute\n\t\t// moments of the exact and remainder of the fit.  Then adjust the coeffs\n\t\t// to reproduce the exact moments in that volume.\n\t\t//\n\t\t// If nmom!=4 we assume that we will eliminate n=-1 which is stored first\n\t\t// in the moment list\n\t\t//\n\t\t// <r^i|gj> cj = <r^i|exact-remainder>\n\t\tconst long nmom = 0;\n\t\tif (nmom > 0) {\n\t\t\tTensor<double> q(4), qg(4);\n\t\t\tdouble range = sqrt(-log(1e-6)/expnt[nmom-1]);\n\t\t\tif (prnt) print(\"exponent(nmom-1)\",expnt[nmom-1],\"has range\", range);\n\n\t\t\tbsh_spherical_moments(mu, range, q);\n\t\t\tTensor<double> M(nmom,nmom);\n\t\t\tfor (int i=nmom; i<npt; ++i) {\n\t\t\t\tTensor<double> qt(4);\n\t\t\t\tgaussian_spherical_moments(expnt[i], range, qt);\n\t\t\t\tqg += qt*coeff[i];\n\t\t\t}\n\t\t\tif (nmom != 4) {\n\t\t\t\tq = q(Slice(1,nmom));\n\t\t\t\tqg = qg(Slice(1,nmom));\n\t\t\t}\n\t\t\tif (prnt) {\n\t\t\t\tprint(\"moments\", q);\n\t\t\t\tprint(\"moments\", qg);\n\t\t\t}\n\t\t\tq = q - qg;\n\t\t\tfor (int j=0; j<nmom; ++j) {\n\t\t\t\tTensor<double> qt(4);\n\t\t\t\tgaussian_spherical_moments(expnt[j], range, qt);\n\t\t\t\tif (nmom != 4) qt = qt(Slice(1,nmom));\n\t\t\t\tfor (int i=0; i<nmom; ++i) {\n\t\t\t\t\tM(i,j) = qt[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tTensor<double> ncoeff;\n\t\t\tgesv(M, q, ncoeff);\n\t\t\tif (prnt) {\n\t\t\t\tprint(\"M\\n\",M);\n\t\t\t\tprint(\"old coeffs\", coeff(Slice(0,nmom-1)));\n\t\t\t\tprint(\"new coeffs\", ncoeff);\n\t\t\t}\n\n\t\t\tcoeff(Slice(0,nmom-1)) = ncoeff;\n\t\t}\n\n\t\tpcoeff = coeff;\n\t\tpexpnt = expnt;\n\t}\n\n\t/// fit a Slater function using a sum of Gaussians\n\n\t/// formula inspired by the BSH fit, with the roles of r and mu exchanged\n\t/// see also Eq. (A3) in\n\t/// S. Ten-no, Initiation of explicitly correlated Slater-type geminal theory,\n\t/// Chem. Phys. Lett., vol. 398, no. 1, pp. 56-61, 2004.\n\tstatic void slater_fit(double gamma, double lo, double hi, double eps,\n\t\t\tTensor<double>& pcoeff, Tensor<double>& pexpnt, bool prnt) {\n\n        MADNESS_CHECK(gamma >0.0);\n\t\t// empirical number TT for the upper integration limit\n\t\tdouble TT;\n\t\tif (eps >= 1e-2) TT = 5;\n\t\telse if (eps >= 1e-4) TT = 10;\n\t\telse if (eps >= 1e-6) TT = 14;\n\t\telse if (eps >= 1e-8) TT = 18;\n\t\telse if (eps >= 1e-10) TT = 22;\n\t\telse if (eps >= 1e-12) TT = 26;\n\t\telse TT = 30;\n\n\t\t// integration limits for quadrature over s: slo and shi\n        // slo and shi must not depend on gamma!!!\n\t\tdouble slo=0.5 * log(eps) - 1.0;\n\t\tdouble shi=log(TT/(lo*lo))*0.5;\n\n\t\t// Resolution required for quadrature over s\n\t\tdouble h = 1.0/(0.2-.5*log10(eps)); // was 0.5 was 0.47\n\n\t\t// Truncate the number of binary digits in h's mantissa\n\t\t// so that rounding does not occur when performing\n\t\t// manipulations to determine the quadrature points and\n\t\t// to limit the number of distinct values in case of\n\t\t// multiple precisions being used at the same time.\n\t\th = floor(64.0*h)/64.0;\n\n\t\t// Round shi/lo up/down to an integral multiple of quadrature points\n\t\tshi = ceil(shi/h)*h;\n\t\tslo = floor(slo/h)*h;\n\n\t\tlong npt = long((shi-slo)/h+0.5);\n\n\t\tTensor<double> coeff(npt), expnt(npt);\n\n\t\tfor (int i=0; i<npt; ++i) {\n\t\t\tconst double s = slo + h*(npt-i);\t// i+1\n\t\t\tcoeff[i] = h*exp(-gamma*gamma*exp(2.0*s) + s);\n\t\t\tcoeff[i]*=2.0*gamma/sqrt(constants::pi);\n\t\t\texpnt[i] = 0.25*exp(-2.0*s);\n\t\t}\n\n\t\tif (prnt) {\n\t\t\tstd::cout << \"weights and roots for a Slater function with gamma=\" << gamma << std::endl;\n\t\t\tfor (int i=0; i<npt; ++i)\n\t\t\t\tstd::cout << i << \" \" << coeff[i] << \" \" << expnt[i] << std::endl;\n\n\t\t\tlong npt = 300;\n\t\t\t//double hi = 1.0;\n\t\t\t//if (mu) hi = min(1.0,30.0/mu);\n\t\t\tstd::cout << \"       x         value   abserr   relerr\" << std::endl;\n\t\t\tstd::cout << \"  ------------  ------- -------- -------- \" << std::endl;\n\t\t\tdouble step = exp(log(hi/lo)/(npt+1));\n\t\t\tfor (int i=0; i<=npt; ++i) {\n\t\t\t\tdouble r = lo*(pow(step,i+0.5));\n\t\t\t\tdouble exact = exp(-gamma*r);\n\t\t\t\tdouble test = 0.0;\n\t\t\t\tfor (int j=0; j<coeff.dim(0); ++j)\n\t\t\t\t\ttest += coeff[j]*exp(-r*r*expnt[j]);\n\t\t\t\tdouble err = 0.0;\n\t\t\t\tif (exact) err = (exact-test)/exact;\n\t\t\t\tprintf(\"  %.6e %8.1e %8.1e %8.1e\\n\",r, exact, exact-test, err);\n\t\t\t}\n\t\t}\n\t\tpcoeff = coeff;\n\t\tpexpnt = expnt;\n\t}\n\n\n    /// fit a correlation factor (1- exp(-mu r))\n\n    /// use the Slater fit with an additional term: 1*exp(-0 r^2)\n    static void f12_fit(double gamma, double lo, double hi, double eps,\n                           Tensor<double>& pcoeff, Tensor<double>& pexpnt, bool prnt) {\n        Tensor<double> coeff,expnt;\n        slater_fit(gamma, lo, hi, eps, coeff, expnt, prnt);\n\n        pcoeff=Tensor<double>(coeff.size()+1);\n        pcoeff(Slice(1,-1,1))=-coeff(_);\n        pexpnt=Tensor<double>(expnt.size()+1);\n        pexpnt(Slice(1,-1,1))=expnt(_);\n\n        pcoeff(0l)=1.0;\n        pexpnt(0l)=1.e-10;\n    }\n\n\n    /// fit a correlation factor f12^2 = (1- exp(-mu r))^2 = 1 - 2 exp(-mu r) + exp(-2 mu r)\n\n    /// no factor 1/(2 mu) or square of it included!\n    /// use the Slater fit with an additional term: 1*exp(-0 r^2)\n    static void f12sq_fit(double gamma, double lo, double hi, double eps,\n                        Tensor<double>& pcoeff, Tensor<double>& pexpnt, bool prnt) {\n        Tensor<double> coeff1,expnt1, coeff2, expnt2;\n        slater_fit(gamma, lo, hi, eps, coeff1, expnt1, prnt);\n        slater_fit(2.0*gamma, lo, hi, eps, coeff2, expnt2, prnt);\n\n        // check exponents are the same\n        MADNESS_CHECK((expnt1-expnt2).normf()/expnt1.size()<1.e-12);\n\n        // add exponential terms\n        auto coeff=coeff2-2.0*coeff1;\n        pcoeff=Tensor<double>(coeff1.size()+1);\n        pcoeff(Slice(1,-1,1))=coeff(_);\n        pexpnt=Tensor<double>(expnt1.size()+1);\n        pexpnt(Slice(1,-1,1))=expnt1(_);\n\n        // add constant term\n        pcoeff(0l)=1.0;\n        pexpnt(0l)=1.e-10;\n    }\n\n\n    void static bsh_fit_ndim(int ndim, double mu, double lo, double hi, double eps,\n\t\t\tTensor<double>& pcoeff, Tensor<double>& pexpnt, bool prnt) {\n\n\t\tif (mu > 0) {\n\t\t\t// Restrict hi according to the exponential decay\n\t\t\tdouble r = -log(4*constants::pi*0.01*eps);\n\t\t\tr = -log(r * 4*constants::pi*0.01*eps);\n\t\t\tif (hi > r) hi = r;\n\t\t}\n\n\n\t\t// Determine range of quadrature by estimating when\n\t\t// kernel drops to exp(-100)\n\n\t\tdouble slo, shi;\n\t\tif (mu > 0) {\n\t\t\tslo = -0.5*log(4.0*100.0/(mu*mu));\n\t\t\tslo = -0.5*log(4.0*(slo*ndim - 2.0*slo + 100.0)/(mu*mu));\n\t\t}\n\t\telse {\n\t\t\tslo = log(eps/hi) - 1.0;\n\t\t}\n\t\tshi = 0.5*log(100.0/(lo*lo));\n\n\t\t// Resolution required for quadrature over s\n\t\tdouble h = 1.0/(0.2-.50*log10(eps)); // was 0.5 was 0.47\n\n\t\t// Truncate the number of binary digits in h's mantissa\n\t\t// so that rounding does not occur when performing\n\t\t// manipulations to determine the quadrature points and\n\t\t// to limit the number of distinct values in case of\n\t\t// multiple precisions being used at the same time.\n\t\th = floor(64.0*h)/64.0;\n\n\n\t\t// Round shi/lo up/down to an integral multiple of quadrature points\n\t\tshi = ceil(shi/h)*h;\n\t\tslo = floor(slo/h)*h;\n\n\t\tlong npt = long((shi-slo)/h+0.5);\n\n\t\tif (prnt)\n\t\t\tstd::cout << \"bsh: mu \" << mu << \" lo \" << lo << \" hi \" << hi\n\t\t\t<< \" eps \" << eps << \" slo \" << slo << \" shi \" << shi\n\t\t\t<< \" npt \" << npt << \" h \" << h << std::endl;\n\n\n\t\t// Compute expansion pruning small coeffs and large exponents\n\t\tTensor<double> coeff(npt), expnt(npt);\n\t\tint nnpt=0;\n\t\tfor (int i=0; i<npt; ++i) {\n\t\t\tdouble s = slo + h*(npt-i);\t// i+1\n\t\t\tdouble c = exp(-0.25*mu*mu*exp(-2.0*s)+(ndim-2)*s)*0.5/pow(constants::pi,0.5*ndim);\n\t\t\tdouble p = exp(2.0*s);\n\t\t\tc = c*h;\n\t\t\tif (c*exp(-p*lo*lo) > eps) {\n\t\t\t\tcoeff(nnpt) = c;\n\t\t\t\texpnt(nnpt) = p;\n\t\t\t\t++nnpt;\n\t\t\t}\n\t\t}\n\t\tnpt = nnpt;\n#if ONE_TERM\n\t\tnpt=1;\n\t\tdouble s=1.0;\n\t\tcoeff[0]=1.0;\n\t\texpnt[0] = exp(2.0*s);\n\t\tcoeff=coeff(Slice(0,0));\n\t\texpnt=expnt(Slice(0,0));\n\t\tprint(\"only one term in gfit\",s,coeff[0],expnt[0]);\n\n#endif\n\n\n\t\t// Prune small exponents from Coulomb fit.  Evaluate a gaussian at\n\t\t// the range midpoint, and replace it there with the next most\n\t\t// diffuse gaussian.  Then examine the resulting error at the two\n\t\t// end points ... if this error is less than the desired\n\t\t// precision, can discard the diffuse gaussian.\n\n\t\tif (mu == 0.0) {\n\t\t\tdouble mid = lo + (hi-lo)*0.5;\n\t\t\tlong i;\n\t\t\tfor (i=npt-1; i>0; --i) {\n\t\t\t\tdouble cnew = coeff[i]*exp(-(expnt[i]-expnt[i-1])*mid*mid);\n\t\t\t\tdouble errlo = coeff[i]*exp(-expnt[i]*lo*lo) -\n\t\t\t\t\t\tcnew*exp(-expnt[i-1]*lo*lo);\n\t\t\t\tdouble errhi = coeff[i]*exp(-expnt[i]*hi*hi) -\n\t\t\t\t\t\tcnew*exp(-expnt[i-1]*hi*hi);\n\t\t\t\tif (std::max(std::abs(errlo),std::abs(errhi)) > 0.03*eps) break;\n\t\t\t\tnpt--;\n\t\t\t\tcoeff[i-1] = coeff[i-1] + cnew;\n\t\t\t}\n\t\t}\n\n\t\t// Shrink array to correct size\n\t\tcoeff = coeff(Slice(0,npt-1));\n\t\texpnt = expnt(Slice(0,npt-1));\n\n\n\t\tif (prnt) {\n\t\t\tfor (int i=0; i<npt; ++i)\n\t\t\t\tstd::cout << i << \" \" << coeff[i] << \" \" << expnt[i] << std::endl;\n\n\t\t\tlong npt = 300;\n\t\t\tstd::cout << \"       x         value\" << std::endl;\n\t\t\tstd::cout << \"  ------------  ---------------------\" << std::endl;\n\t\t\tdouble step = exp(log(hi/lo)/(npt+1));\n\t\t\tfor (int i=0; i<=npt; ++i) {\n\t\t\t\tdouble r = lo*(pow(step,i+0.5));\n\t\t\t\tdouble test = 0.0;\n\t\t\t\tfor (int j=0; j<coeff.dim(0); ++j)\n\t\t\t\t\ttest += coeff[j]*exp(-r*r*expnt[j]);\n\t\t\t\tprintf(\"  %.6e %20.10e\\n\",r, test);\n\t\t\t}\n\t\t}\n\n\t\tpcoeff = coeff;\n\t\tpexpnt = expnt;\n\t}\n\n\t// Returns in q[0..4] int(r^2(n+1)*exp(-alpha*r^2),r=0..R) n=-1,0,1,2\n\tstatic void gaussian_spherical_moments(double alpha, double R, Tensor<double>& q) {\n\t\tq[0] = -(-0.1e1 + exp(-alpha * R*R)) / alpha / 0.2e1;\n\t\tq[1] = (-0.2e1 * R * pow(alpha, 0.3e1 / 0.2e1) + sqrt(constants::pi)\n\t\t\t\t* erf(R * sqrt(alpha)) * alpha * exp(alpha * R*R))\n\t\t\t\t* pow(alpha, -0.5e1 / 0.2e1) * exp(-alpha * R*R) / 0.4e1;\n\t\tq[2] = -(-0.1e1 + exp(-alpha * R*R) + exp(-alpha * R*R) * alpha * R*R)\n\t\t\t\t* pow(alpha, -0.2e1) / 0.2e1;\n\t\tq[3] = -(-0.3e1 * sqrt(constants::pi) * erf(R * sqrt(alpha)) * pow(alpha, 0.2e1)\n\t\t\t\t* exp(alpha * R*R) + 0.6e1 * R * pow(alpha, 0.5e1 / 0.2e1)\n\t\t\t\t+ 0.4e1 * pow(R, 0.3e1) * pow(alpha, 0.7e1 / 0.2e1))\n\t\t\t\t* pow(alpha, -0.9e1 / 0.2e1) * exp(-alpha * R*R) / 0.8e1;\n\t}\n\n\t// Returns in q[0..4] int(r^2(n+1)*exp(-mu*r)/(4*constants::pi*r),r=0..R) n=-1,0,1,2\n\tstatic void bsh_spherical_moments(double mu, double R, Tensor<double>& q) {\n\t\tif (mu == 0.0) {\n\t\t\tq[0] = R / constants::pi  / 0.4e1;\n\t\t\tq[1] = pow(R, 0.2e1) / constants::pi / 0.8e1;\n\t\t\tq[2] = pow(R, 0.3e1) / constants::pi / 0.12e2;\n\t\t\tq[3] = pow(R, 0.4e1) / constants::pi / 0.16e2;\n\t\t}\n\t\telse  {\n\t\t\tq[0] = (exp(mu * R) - 0.1e1) / mu * exp(-mu * R) / constants::pi / 0.4e1;\n\t\t\tq[1] = -(-exp(mu * R) + 0.1e1 + mu * R) * pow(mu, -0.2e1) / constants::pi\n\t\t\t\t\t* exp(-mu * R) / 0.4e1;\n\t\t\tq[2] = -(-0.2e1 * exp(mu * R) + 0.2e1 + 0.2e1 * mu * R + R*R *\n\t\t\t\t\tpow(mu, 0.2e1))*pow(mu, -0.3e1) / constants::pi * exp(-mu * R) / 0.4e1;\n\t\t\tq[3] = -(-0.6e1 * exp(mu * R) + 0.6e1 + 0.6e1 * mu * R + 0.3e1 * R*R\n\t\t\t\t\t* pow(mu, 0.2e1) + pow(R, 0.3e1) * pow(mu, 0.3e1))\n\t\t\t\t\t* pow(mu, -0.4e1) / constants::pi * exp(-mu * R) / 0.4e1;\n\t\t}\n\t}\n\n};\n\n\n}\n\n#endif // MADNESS_MRA_GFIT_H__INCLUDED\n\n"
  },
  {
    "path": "src/madness/mra/graveyard",
    "content": "//         /// Returns vector of keys of all local nodes where predicate is true\n//         template <typename predicateT>\n//         std::vector<keyT> keys (const predicateT& predicate) {\n//             std::vector<keyT> v;\n//             v.reserve(this->size());\n//             for (typename implT::iterator it = this->begin(); it != this->end(); ++it) {\n//                 if (predicate(*it)) v.push_back(it->first);\n//             }\n//             return v;\n//         };\n\n//         /// Returns vector of keys of all local nodes\n//         std::vector<keyT> keys () {\n//             return keys(true_predicate<datumT>());\n//         };\n\n\n//         /// Returns vector of keys of local leaf nodes\n//         std::vector<keyT> leaf_nodes () {\n//             return keys(is_leaf_predicate());\n//         };\n\n\n//         /// Returns vector of keys of all local nodes with coeff\n//         std::vector<keyT> coeff_nodes () {\n//             return keys(has_coeff_predicate());\n//         };\n\n\n        struct true_predicate {\n            bool operator()(const datumT& d) const {\n                return true;\n            };\n        };\n        \n\n        struct is_leaf_predicate {\n            bool operator()(const datumT& d) const {\n                return d.second.is_leaf();\n            };\n        };\n\n        struct is_not_leaf_predicate {\n            bool operator()(const datumT& d) const {\n                return !d.second.is_leaf();\n            };\n        };\n\n        struct  has_coeff_predicate {\n            bool operator()(const datumT& d) const {\n                return d.second.has_coeff();\n            };\n        };\n\n        struct  has_no_coeff_predicate {\n            bool operator()(const datumT& d) const {\n                return !d.second.has_coeff();\n            };\n        };\n\n\n\n//         void insert_weird_tree(const keyT& key) {\n// //       for (Level i = 0; i < key.level(); i++) cout << \"  \";\n// //       print(key);\n//          Level Nmax = 1;\n//          if (is_local(key)) {\n//              bool has_children = ((key.level() < Nmax) || ((key.level() < 2*Nmax)&&\n//                      (key.translation()[0] == key.translation()[NDIM-1])));\n//              FunctionNode<T,NDIM> node(tensorT(0), has_children);\n//              this->insert(key,node);\n//              if (has_children) {\n//                     for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n//                      insert_weird_tree(kit.key());\n//                     }\n//              }\n//          }\n//          else if (key.level() < Nmax) {\n//              for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n//                  insert_weird_tree(kit.key());\n//              }\n//          }\n//         };\n\n\n        /// Optimized filter (inplace, contiguous, no err checking)\n\n        /// Transforms coefficients in s returning result also in s.\n        /// Uses work2 from common data to eliminate temporary creation and\n        /// to increase cache locality.\n        ///\n        /// No communication involved.\n//         inline void filter_inplace(tensorT& s) {\n//             transform_inplace(s, cdata.hgT, cdata.work2);\n//         };\n\n\n        /// Optimized unfilter (see info about filter_inplace)\n\n        /// No communication involved.\n//         inline void unfilter_inplace(tensorT& s) {\n//             transform_inplace(s, cdata.hg, cdata.work2);\n//         };\n#include <madness/mra/loadbal.h>\n\nusing namespace std;\n\nnamespace madness {\n\n    typedef int Cost;\n    typedef double CompCost;\n\n    template <typename T, int D>\n    vector<typename DClass<D>::TreeCoords> LoadBalImpl<T,D>::findBestPartition() {\n        vector<typename DClass<D>::TreeCoords> klist;\n        if (this->f.impl->world.mpi.rank() != 0) {\n            print(\"findBestPartition: leave it to the expert\");\n            this->f.impl->world.gop.fence();\n            print(\"about to do broadcast\");\n            unsigned int ksize;\n            this->f.impl->world.gop.template broadcast<unsigned int>(ksize);\n            for (unsigned int i = 0; i < ksize; i++) {\n                typename DClass<D>::TreeCoords t;\n                this->f.impl->world.gop.template broadcast<typename DClass<D>::TreeCoords>(t);\n                klist.push_back(t);\n            }\n            print(\"done with broadcast\");\n            return klist;\n        }\n        unsigned int npieces = this->f.impl->world.nproc();\n        bool notdone = true;\n        int count = 0;\n        vector<vector<typename DClass<D>::TreeCoords> > listoflist;\n        vector<typename DClass<D>::TreeCoords> emptylist;\n        vector<Cost> costlist;\n\n        listoflist.push_back(emptylist);\n        costlist.push_back(0);\n        Cost totalCost = 0;\n\n<<<<<<< .mine\n        madness::print(\"findBestPartition: about to fixCost\");\n=======\n//madness::print(\"findBestPartition: about to fixCost\");\n>>>>>>> .r223\n\n<<<<<<< .mine\n        typename DClass<D>::KeyD root(0);\n        this->skeltree->template fixCost(root);\n        madness::print(\"findBestPartition: about to depthFirstPartition\");\n        //    this->skeltree->print(root);\n        totalCost = this->skeltree->template depthFirstPartition(root, &listoflist[count], npieces,\n                    totalCost, &costlist[count]);\n        //madness::print(\"findBestPartition: after depthFirstPartition\");\n        int size = listoflist[count].size();\n        cout << \"Partitioned tree \" << count << \":\" << endl;\n        for (int i = 0; i < size; i++)\n            listoflist[count][i].print();\n        cout << \"Max cost for this tree = \" << costlist[count] << endl;\n        cout << endl;\n        if (listoflist[count].size() < npieces)\n            notdone = false;\n        count++;\n=======\n    typename DClass<D>::KeyD root(0);\n    this->skeltree->fixCost(root);\n//madness::print(\"findBestPartition: about to depthFirstPartition\");\n//    this->skeltree->print(root);\n    totalCost = this->skeltree->depthFirstPartition(root, &listoflist[count], npieces, \n\ttotalCost, &costlist[count]);\n//madness::print(\"findBestPartition: after depthFirstPartition\");\n    int size = listoflist[count].size();\n    cout << \"Partitioned tree \" << count << \":\" << endl;\n    for (int i = 0; i < size; i++)\n\tlistoflist[count][i].print();\n    cout << \"Max cost for this tree = \" << costlist[count] << endl;\n    cout << endl;\n    if (listoflist[count].size() < npieces)\n\tnotdone = false;\n    count++;\n>>>>>>> .r223\n\n<<<<<<< .mine\n        while (notdone) {\n            //\tthis->skeltree.fixCost<D>(root);\n            this->skeltree->template fixCost(root);\n            //\tthis->skeltree.rollup<D>(root);\n            this->skeltree->template rollup(root);\n            listoflist.push_back(emptylist);\n            costlist.push_back(0);\n            this->skeltree->template depthFirstPartition(root, &listoflist[count], npieces, totalCost, &costlist[count]);\n            int size = listoflist[count].size();\n            cout << \"Partitioned tree \" << count << \":\" << endl;\n            for (int i = 0; i < size; i++)\n                listoflist[count][i].print();\n            cout << \"Max cost for this tree = \" << costlist[count] << endl;\n            cout << endl;\n=======\n    while (notdone) {\n\tthis->skeltree->fixCost(root); \n\tthis->skeltree->rollup(root);\n\tlistoflist.push_back(emptylist);\n\tcostlist.push_back(0);\n\tthis->skeltree->depthFirstPartition(root, &listoflist[count], npieces, totalCost, &costlist[count]);\n\tint size = listoflist[count].size();\n\tcout << \"Partitioned tree \" << count << \":\" << endl;\n\tfor (int i = 0; i < size; i++)\n\t    listoflist[count][i].print();\n\tcout << \"Max cost for this tree = \" << costlist[count] << endl;\n\tcout << endl;\n\t\n    \ttypename DClass<D>::treeT::iterator it = this->skeltree->find(root);\n    \tif (it == this->skeltree->end()) return klist;\n    \ttypename DClass<D>::NodeD node = it->second;\n\tif (!(node.has_children()) || (listoflist[count].size() < npieces)) {\n\t    notdone = false;\n\t}\n\tif (listoflist[count].size() < npieces) {\n\t    listoflist.erase(listoflist.begin()+count);\n\t    break;\n\t}\n\tcount++;\n    }\n    unsigned int shortestList = 0, SL_index, LB_index;\n    Cost loadBalCost = 0;\n    vector<unsigned int> len;\n    for (int i = 0; i < count; i++) {\n\tlen.push_back(listoflist[i].size());\n\tif ((len[i] < shortestList) || (shortestList == 0)) {\n\t    shortestList = len[i];\n\t    SL_index = i;\n\t}\n\telse if ((len[i] == shortestList) && (costlist[i] < costlist[SL_index])) {\n\t// all things being equal, prefer better balance\n\t    shortestList = len[i];\n\t    SL_index = i;\n\t}\n\tif ((costlist[i] < loadBalCost) || (loadBalCost == 0)) {\n\t    loadBalCost = costlist[i];\n\t    LB_index = i;\n\t}\n\telse if ((costlist[i] == loadBalCost) && (len[i] < listoflist[LB_index].size())) {\n\t// all things being equal, prefer fewer cuts\n\t    loadBalCost = costlist[i];\n\t    LB_index = i;\n\t}\n    }\n>>>>>>> .r223\n\n            //    \ttypename DClass<D>::treeT::iterator it = this->skeltree.find(root);\n            typename DClass<D>::treeT::iterator it = this->skeltree->find(root);\n            //    \tif (it == this->skeltree.end()) return klist;\n            if (it == this->skeltree->end()) return klist;\n            typename DClass<D>::NodeD node = it->second;\n            if (!(node.has_children()) || (listoflist[count].size() < npieces)) {\n                notdone = false;\n            }\n            if (listoflist[count].size() < npieces) {\n                listoflist.erase(listoflist.begin()+count);\n                break;\n            }\n            count++;\n        }\n        unsigned int shortestList = 0, SL_index, LB_index;\n        Cost loadBalCost = 0;\n        vector<unsigned int> len;\n        for (int i = 0; i < count; i++) {\n            len.push_back(listoflist[i].size());\n            if ((len[i] < shortestList) || (shortestList == 0)) {\n                shortestList = len[i];\n                SL_index = i;\n            } else if ((len[i] == shortestList) && (costlist[i] < costlist[SL_index])) {\n                // all things being equal, prefer better balance\n                shortestList = len[i];\n                SL_index = i;\n            }\n            if ((costlist[i] < loadBalCost) || (loadBalCost == 0)) {\n                loadBalCost = costlist[i];\n                LB_index = i;\n            } else if ((costlist[i] == loadBalCost) && (len[i] < listoflist[LB_index].size())) {\n                // all things being equal, prefer fewer cuts\n                loadBalCost = costlist[i];\n                LB_index = i;\n            }\n        }\n\n        cout << \"The load balance with the fewest broken links has cost \" << costlist[SL_index] <<\n        \", and \" << shortestList-1 << \" broken links\" << endl;\n        for (unsigned int i = 0; i < shortestList; i++) {\n            listoflist[SL_index][i].print();\n        }\n        cout << endl;\n        cout << \"The load balance with the best balance has cost \" << loadBalCost << \", and \" <<\n        listoflist[LB_index].size()-1 << \" broken links\" << endl;\n        for (unsigned int i = 0; i < listoflist[LB_index].size(); i++) {\n            listoflist[LB_index][i].print();\n        }\n        cout << endl;\n\n        CompCost ccleast = 0;\n        int cc_index;\n        for (int i = 0; i < count; i++) {\n            CompCost cctmp = computeCompCost(costlist[i], len[i]-1);\n            if ((i==0) || (cctmp < ccleast)) {\n                ccleast = cctmp;\n                cc_index = i;\n            }\n        }\n        cout << \"The load balance with the best overall computational cost has cost \" <<\n        costlist[cc_index] << \" and \" << len[cc_index]-1 << \" broken links\" << endl;\n        for (unsigned int i = 0; i < len[cc_index]; i++) {\n            listoflist[cc_index][i].print();\n        }\n        for (unsigned int i = 0; i < len[cc_index]; i++) {\n            klist.push_back(listoflist[cc_index][i]);\n        }\n\n        print(\"findBestPartition: about to do fence\");\n        this->f.impl->world.gop.fence();\n        print(\"about to do broadcast\");\n        unsigned int ksize = klist.size();\n        this->f.impl->world.gop.template broadcast<unsigned int>(ksize);\n        for (unsigned int i=0; i < ksize; i++) {\n            this->f.impl->world.gop.template broadcast<typename DClass<D>::TreeCoords>(klist[i]);\n        }\n        print(\"done with broadcast\");\n\n        return klist;\n    }\n\n<<<<<<< .mine\n=======\ntemplate <int D, typename Pmap>\nCost LBTree<D,Pmap>::fixCost(typename DClass<D>::KeyDConst& key) {\n//    madness::print(\"fixCost: key =\", key, \" is about to be looked for\");\n    typename DClass<D>::treeT::iterator it = this->find(key);\n//    madness::print(\"fixCost: key =\", key, \" was found (looked for),\", (it == this->end()));\n    if (it == this->end()) return 0;\n//    madness::print(\"fixCost: tree it was found (exists)\");\n>>>>>>> .r223\n\n<<<<<<< .mine\n    template <int D>\n    Cost LBTree<D>::fixCost(typename DClass<D>::KeyDConst& key) {\n        madness::print(\"fixCost: key =\", key, \" is about to be looked for\");\n        typename DClass<D>::treeT::iterator it = this->find(key);\n        madness::print(\"fixCost: key =\", key, \" was found (looked for),\", (it == this->end()));\n        if (it == this->end()) return 0;\n        madness::print(\"fixCost: tree it was found (exists)\");\n\n        typename DClass<D>::NodeD node = it->second;\n        madness::print(\"fixCost: got node\");\n        NodeData d = node.get_data();\n        madness::print(\"fixCost: got data from node\");\n        d.subcost = d.cost;\n        madness::print(\"fixCost: assigned node cost to subcost\");\n        if (node.has_children()) {\n            madness::print(\"fixCost: node has children\");\n            for (KeyChildIterator<D> kit(key); kit; ++kit) {\n                d.subcost += this->template fixCost(kit.key());\n            }\n        }\n        node.set_data(d);\n        madness::print(\"fixCost: about to insert key =\", key, \",\", node.get_data());\n        this->insert(key,node);\n        madness::print(\"fixCost: inserted node\");\n        return d.subcost;\n=======\n    typename DClass<D>::NodeD node = it->second;\n//    madness::print(\"fixCost: got node\");\n    NodeData d = node.get_data();\n//    madness::print(\"fixCost: got data from node\");\n    d.subcost = d.cost;\n//    madness::print(\"fixCost: assigned node cost to subcost\");\n    if (node.has_children())\n    {\n//\tmadness::print(\"fixCost: node has children\");\n\tfor (KeyChildIterator<D> kit(key); kit; ++kit) {\n\t    d.subcost += this->fixCost(kit.key());\n\t}\n>>>>>>> .r223\n    }\n<<<<<<< .mine\n=======\n    node.set_data(d);\n//madness::print(\"fixCost: about to insert key =\", key, \",\", node.get_data());\n    this->insert(key,node);\n//madness::print(\"fixCost: inserted node\");\n    return d.subcost;\n}\n>>>>>>> .r223\n\n\n    template <int D>\n    Cost LBTree<D>::depthFirstPartition(typename DClass<D>::KeyDConst& key,\n            vector<typename DClass<D>::TreeCoords>* klist, unsigned int npieces,\n            Cost totalcost, Cost *maxcost) {\n//madness::print(\"depthFirstPartition: at very beginning\");\n<<<<<<< .mine\n        if (totalcost == 0) {\n            totalcost = this->template computeCost(key);\n        }\n        madness::print(\"depthFirstPartition: totalcost =\", totalcost);\n=======\n    if (totalcost == 0) {\n\ttotalcost = this->computeCost(key);\n    }\n//madness::print(\"depthFirstPartition: totalcost =\", totalcost);\n>>>>>>> .r223\n\n        Cost costLeft = totalcost;\n        int partsLeft = npieces;\n        *maxcost = 0;\n        Cost partitionSize = 0;\n    double facter = 1.1;\n\n<<<<<<< .mine\n        for (int i = npieces-1; i >= 0; i--) {\n            cout << endl << \"Beginning partition number \" << i << endl;\n            vector<typename DClass<D>::KeyD> tmplist;\n            Cost tpart = computePartitionSize(costLeft, partsLeft);\n            if (tpart > partitionSize) {\n                partitionSize = tpart;\n            }\n            madness::print(\"depthFirstPartition: partitionSize =\", partitionSize);\n            Cost usedUp = 0;\n            bool atleaf = false;\n            usedUp = this->template makePartition(key, &tmplist, partitionSize, (i==0), usedUp, &atleaf);\n            if (*maxcost < usedUp) *maxcost = usedUp;\n            costLeft -= usedUp;\n            partsLeft--;\n            for (unsigned int j = 0; j < tmplist.size(); j++) {\n                klist->push_back(typename DClass<D>::TreeCoords(typename DClass<D>::KeyD(tmplist[j]), i));\n            }\n        }\n        return totalcost;\n=======\n    for (int i = npieces-1; i >= 0; i--) {\n\tcout << endl << \"Beginning partition number \" << i << endl;\n\tvector<typename DClass<D>::KeyD> tmplist;\n\tCost tpart = computePartitionSize(costLeft, partsLeft);\n\tif ((tpart > partitionSize) || (tpart*facter < partitionSize)) {\n\t    partitionSize = tpart;\n\t}\n//madness::print(\"depthFirstPartition: partitionSize =\", partitionSize);\n\tCost usedUp = 0;\n\tbool atleaf = false;\n\tusedUp = this->makePartition(key, &tmplist, partitionSize, (i==0), usedUp, &atleaf);\n\tif (*maxcost < usedUp) *maxcost = usedUp;\n\tcostLeft -= usedUp;\n\tpartsLeft--;\n\tfor (unsigned int j = 0; j < tmplist.size(); j++) {\n\t    klist->push_back(typename DClass<D>::TreeCoords(typename DClass<D>::KeyD(tmplist[j]), i)); \n\t}\n>>>>>>> .r223\n    }\n\n    template <int D>\n    void LBTree<D>::rollup(typename DClass<D>::KeyDConst& key) {\n//    madness::print(\"rollup: at beginning\");\n        typename DClass<D>::treeT::iterator it = this->find(key);\n        if (it == this->end()) return;\n\n//    madness::print(\"rollup: about to get node associated with key\",key);\n        typename DClass<D>::NodeD node = it->second;\n        if (!node.has_children()) {\n//\tmadness::print(\"rollup: this node has no children; returning\");\n            return; // no rolling to be done here.\n        }\n//    madness::print(\"rollup: this node has children\");\n        bool hasleafchild = false;\n        for (KeyChildIterator<D> kit(key); kit; ++kit) {\n            typename DClass<D>::treeT::iterator itc = this->find(kit.key());\n            if (itc != this->end()) {\n//\t    madness::print(\"rollup: found child\", kit.key());\n                typename DClass<D>::NodeD c = itc->second;\n                if (!c.has_children()) {\n//\t\tmadness::print(\"rollup: child is leaf\");\n                    hasleafchild = true;\n                    break;\n                } else {\n//\t\tmadness::print(\"rollup: child\", kit.key(), \"has children\");\n                }\n            }\n        }\n        if (hasleafchild) {\n//\tmadness::print(\"rollup: about to meld with key\",key);\n<<<<<<< .mine\n            this->template meld(key);\n        }\n        for (KeyChildIterator<D> kit(key); kit; ++kit) {\n            typename DClass<D>::treeT::iterator itc = this->find(kit.key());\n            if (itc != this->end()) {\n=======\n\tthis->meld(key);\n    }\n    for (KeyChildIterator<D> kit(key); kit; ++kit) {\n\ttypename DClass<D>::treeT::iterator itc = this->find(kit.key());\n\tif (itc != this->end()) {\n>>>>>>> .r223\n//\t    madness::print(\"rollup: found child\", kit.key());\n                typename DClass<D>::NodeD c = itc->second;\n                if (c.has_children()) {\n//\t\tmadness::print(\"rollup: child\", kit.key(), \"has children\");\n<<<<<<< .mine\n                    this->template rollup(kit.key());\n                }\n            }\n        }\n        it = this->find(key);\n        node = it->second;\n        NodeData d = node.get_data();\n        if (d.istaken) {\n            d.istaken = false;\n            node.set_data(d);\n            this->insert(key,node);\n        }\n=======\n\t\tthis->rollup(kit.key());\n\t    }\n\t}\n>>>>>>> .r223\n    }\n\n    template <int D>\n    void LBTree<D>::meld(typename DClass<D>::KeyDConst& key) {\n//    madness::print(\"meld: at beginning, finding key\", key);\n        Cost cheapest = 0;\n        typename DClass<D>::treeT::iterator it = this->find(key);\n        if (it == this->end()) return;\n\n        vector<unsigned int> mylist;\n\n        typename DClass<D>::NodeD node = it->second;\n        unsigned int i = 0;\n//    madness::print(\"meld: about to iterate over children of key\", key);\n        for (KeyChildIterator<D> kit(key); kit; ++kit) {\n//    \tmadness::print(\"    meld: iterating over child\", i);\n            if (node.has_child(i)) {\n                typename DClass<D>::treeT::iterator itc = this->find(kit.key());\n                if (itc == this->end()) return;\n                typename DClass<D>::NodeD c = itc->second;\n                if (!c.has_children()) {\n//\t\tmadness::print(\"    meld: child\",i,\"has no children\");\n                    Cost cost = c.get_data().cost;\n                    if ((cost < cheapest) || (cheapest == 0)) {\n                        cheapest = cost;\n                        mylist.clear();\n                        mylist.push_back(i);\n                    } else if (cost == cheapest) {\n                        mylist.push_back(i);\n                    }\n                }\n            }\n            i++;\n        }\n\n        if (cheapest == 0) {\n//\tmadness::print(\"meld: this node has no leaf children\");\n            NodeData d = node.get_data();\n            d.istaken = false;\n            node.set_data(d);\n            this->insert(key,node);\n            return;\n        }\n\n        NodeData d = node.get_data();\n\n        i = 0;\n        int j = 0, mlsize = mylist.size();\n        for (KeyChildIterator<D> kit(key); kit; ++kit) {\n            if (mylist[j] == i) {\n//\t    madness::print(\"meld: found a match, mylist[\",j,\"] =\",i);\n                this->erase(kit.key());\n                node.set_child(mylist[j], false);\n                d.cost += cheapest;\n                j++;\n            }\n            i++;\n            if (j == mlsize) break;\n        }\n        d.istaken = false;\n        node.set_data(d);\n        this->insert(key,node);\n//    madness::print(\"meld: inserted node back into tree; goodbye!\");\n    }\n\n\n    template <int D>\n    Cost LBTree<D>::computeCost(typename DClass<D>::KeyDConst& key) {\n        Cost cost = 0;\n        typename DClass<D>::treeT::iterator it = this->find(key);\n        if (it == this->end()) return cost;\n\n<<<<<<< .mine\n        typename DClass<D>::NodeD node = it->second;\n        for (KeyChildIterator<D> kit(key); kit; ++kit) {\n            cost += this->template computeCost(kit.key());\n        }\n        NodeData d = node.get_data();\n        cost += d.cost;\n\n        d.subcost = cost;\n        node.set_data(d);\n        this->insert(key,node);\n        return cost;\n=======\n    typename DClass<D>::NodeD node = it->second;\n    for (KeyChildIterator<D> kit(key); kit; ++kit) {\n\tcost += this->computeCost(kit.key());\n>>>>>>> .r223\n    }\n\n\n    template <int D>\n    Cost LBTree<D>::makePartition(typename DClass<D>::KeyDConst& key,\n                                       vector<typename DClass<D>::KeyD>* klist, Cost partitionSize, bool lastPartition,\n                                       Cost usedUp, bool *atleaf) {\n//    madness::print(\"at beginning of makePartition: atleaf =\", *atleaf);\n        double fudgeFactor = 0.1;\n        Cost maxAddl = (Cost) (fudgeFactor*partitionSize);\n\n        typename DClass<D>::treeT::iterator it = this->find(key);\n        if (it == this->end()) {\n            return usedUp;\n        }\n\n        typename DClass<D>::NodeD node = it->second;\n        NodeData d = node.get_data();\n\n        it = this->end();\n\n<<<<<<< .mine\n        madness::print(\"makePartition: data for key\", key, \":\", d);\n        madness::print(\"makePartition: partitionSize =\", partitionSize, \", lastPartition =\", lastPartition, \", usedUp =\", usedUp);\n=======\n//    madness::print(\"makePartition: data for key\", key, \":\", d);\n//    madness::print(\"makePartition: partitionSize =\", partitionSize, \", lastPartition =\", lastPartition, \", usedUp =\", usedUp);\n>>>>>>> .r223\n\n<<<<<<< .mine\n        if (d.istaken) {\n            madness::print(\"makePartition: this key is taken\");\n            return usedUp;\n        }\n=======\n    if (d.istaken) {\n//\tmadness::print(\"makePartition: this key is taken\"); \n\treturn usedUp;\n    }\n>>>>>>> .r223\n\n<<<<<<< .mine\n        madness::print(\"makePartition: back to key\", key);\n=======\n//    madness::print(\"makePartition: back to key\", key);\n>>>>>>> .r223\n\n<<<<<<< .mine\n        // if either we're at the last partition, the partition is currently empty\n        // and this is a single item, or there is still room in the partition and\n        // adding this to it won't go above the fudge factor,\n        // then add this piece to the partition.\n        if ((lastPartition) || ((usedUp == 0) && (!node.has_children())) ||\n                ((usedUp < partitionSize) && (d.subcost+usedUp <= partitionSize+maxAddl))) {\n            // add to partition\n            madness::print(\"makePartition: adding to partition\", key);\n            klist->push_back(typename DClass<D>::KeyD(key));\n            d.istaken = true;\n            usedUp += d.subcost;\n            // REMOVE COST FROM FOREPARENTS (implement this)\n            this->template removeCost(key.parent(), d.subcost);\n            node.set_data(d);\n            this->insert(key,node);\n        } else if (usedUp < partitionSize) {\n            // try this node's children (if any)\n            if (node.has_children()) {\n                int i = 0;\n                for (KeyChildIterator<D> kit(key); kit; ++kit) {\n                    if (node.has_child(i)) {\n                        madness::print(\"makePartition:\", key, \"recursively calling\", kit.key());\n                        usedUp = this->template makePartition(kit.key(), klist, partitionSize, lastPartition,\n                                                              usedUp, atleaf);\n                        if ((*atleaf) || (usedUp >= partitionSize)) {\n                            break;\n                        }\n                    }\n                    i++;\n                }\n            } else {\n                madness::print(\"makePartition: about to set atleaf = true\");\n                *atleaf = true;\n            }\n        }\n        return usedUp;\n=======\n    // if either we're at the last partition, the partition is currently empty\n    // and this is a single item, or there is still room in the partition and\n    // adding this to it won't go above the fudge factor,\n    // then add this piece to the partition.\n    if ((lastPartition) || ((usedUp == 0) && (!node.has_children())) || \n\t((usedUp < partitionSize) && (d.subcost+usedUp <= partitionSize+maxAddl))) {\n\t// add to partition\n//\tmadness::print(\"makePartition: adding to partition\", key);\n\tklist->push_back(typename DClass<D>::KeyD(key));\n\td.istaken = true;\n\tusedUp += d.subcost;\n\t// REMOVE COST FROM FOREPARENTS (implement this)\n\tthis->removeCost(key.parent(), d.subcost);\n\tnode.set_data(d);\n\tthis->insert(key,node);\n>>>>>>> .r223\n    }\n<<<<<<< .mine\n=======\n    else if (usedUp < partitionSize) {\n\t// try this node's children (if any) \n\tif (node.has_children()) {\n\t    int i = 0;\n\t    for (KeyChildIterator<D> kit(key); kit; ++kit) {\n\t\tif (node.has_child(i)) {\n//\t\t    madness::print(\"makePartition:\", key, \"recursively calling\", kit.key());\n\t\t    usedUp = this->makePartition(kit.key(), klist, partitionSize, lastPartition,\n\t\t\tusedUp, atleaf);\n\t\t    if ((*atleaf) || (usedUp >= partitionSize)) {\n\t\t\tbreak;\n\t\t    }\n\t\t}\n\t\ti++;\n\t    }\n\t}\n\telse {\n//\t    madness::print(\"makePartition: about to set atleaf = true\");\n\t    *atleaf = true;\n\t}\n    }\n    return usedUp;\n}\n>>>>>>> .r223\n\n<<<<<<< .mine\n    template <int D>\n    void LBTree<D>::removeCost(typename DClass<D>::KeyDConst& key, Cost c) {\n        madness::print(\"removeCost: key\", key, \"owner =\", owner(key));\n        this->get_mypmap().print();\n        if (((int) key.level()) < 0) return;\n        typename DClass<D>::treeT::iterator it = this->find(key);\n        madness::print(\"removeCost: found key\");\n        if (it == this->end()) return;\n        typename DClass<D>::NodeD node = it->second;\n        NodeData d = node.get_data();\n        madness::print(\"removeCost: got data\");\n        d.subcost -= c;\n        if (key.level() > 0) {\n            this->template removeCost(key.parent(), c);\n        }\n        madness::print(\"removeCost: before setting, data =\", d);\n        node.set_data(d);\n        madness::print(\"removeCost: after setting, data =\", node.get_data());\n        this->insert(key,node);\n        madness::print(\"removeCost: after inserting, data = \", node.get_data());\n=======\ntemplate <int D, typename Pmap>\nvoid LBTree<D,Pmap>::removeCost(typename DClass<D>::KeyDConst& key, Cost c) {\n//madness::print(\"removeCost: key\", key, \"owner =\", owner(key));\n//this->get_procmap().print();\n    if (((int) key.level()) < 0) return;\n    typename DClass<D>::treeT::iterator it = this->find(key);\n//madness::print(\"removeCost: found key\");\n    if (it == this->end()) return;\n    typename DClass<D>::NodeD node = it->second;\n    NodeData d = node.get_data();\n//madness::print(\"removeCost: got data\");\n    d.subcost -= c;\n    if (key.level() > 0) {\n    \tthis->removeCost(key.parent(), c);\n>>>>>>> .r223\n    }\n<<<<<<< .mine\n=======\n//madness::print(\"removeCost: before setting, data =\", d);\n    node.set_data(d);\n//madness::print(\"removeCost: after setting, data =\", node.get_data());\n    this->insert(key,node);\n//madness::print(\"removeCost: after inserting, data = \", node.get_data());\n}\n>>>>>>> .r223\n\n\n    Cost computePartitionSize(Cost cost, unsigned int parts) {\n        return (Cost) ceil(((double) cost)/((double) parts));\n    }\n\n\n    CompCost computeCompCost(Cost c, int n) {\n        CompCost compcost;\n        CompCost cfactor = 0.1, nfactor = 1.0;\n        compcost = cfactor*c + nfactor*n;\n        return compcost;\n    }\n\n\n    template <typename T, int D>\n    void migrate_data(SharedPtr<FunctionImpl<T,D> > tfrom, SharedPtr<FunctionImpl<T,D> > tto,\n                      typename DClass<D>::KeyD key) {\n        typename FunctionImpl<T,D>::iterator it = tfrom->find(key);\n        if (it == tfrom->end()) return;\n\n        FunctionNode<T,D> node = it->second;\n\n        if (node.has_children()) {\n            for (KeyChildIterator<D> kit(key); kit; ++kit) {\n                migrate_data<T,D>(tfrom, tto, kit.key());\n            }\n        }\n        tto->insert(key, node);\n    }\n\n\n<<<<<<< .mine\n    template <typename T, int D>\n    void migrate(SharedPtr<FunctionImpl<T,D> > tfrom, SharedPtr<FunctionImpl<T,D> > tto) {\n        typename DClass<D>::KeyD root(0);\n        print(\"migrate: at beginning\");\n        migrate_data<T,D>(tfrom, tto, root);\n        print(\"migrate: at end\");\n    }\n=======\ntemplate <typename T, int D, typename Pmap>\nvoid migrate(SharedPtr<FunctionImpl<T,D,Pmap> > tfrom, SharedPtr<FunctionImpl<T,D,Pmap> > tto) {\n    typename DClass<D>::KeyD root(0);\n//print(\"migrate: at beginning\");\n    migrate_data<T,D,Pmap>(tfrom, tto, root);\n//print(\"migrate: at end\");\n}\n>>>>>>> .r223\n\n<<<<<<< .mine\n    // Explicit instantiations for D=1:6\n    template void migrate<double,3,MyPmap<3> >(SharedPtr<FunctionImpl<double,3,MyPmap<3> > > tfrom,\n            SharedPtr<FunctionImpl<double,3,MyPmap<3> > > tto);\n=======\n// Explicit instantiations for D=1:6\n>>>>>>> .r223\n\n<<<<<<< .mine\n    template void migrate_data<double,3>(SharedPtr<FunctionImpl<double,3,MyPmap<3> > > tfrom,\n                                         SharedPtr<FunctionImpl<double,3,MyPmap<3> > > tto, DClass<3>::KeyD key);\n=======\n>>>>>>> .r223\n\n<<<<<<< .mine\n\n// Who knows why these aren't cooperating, so commented out for now\n    /*\n    template void migrate_data<double,1>(SharedPtr<FunctionImpl<double,1,MyPmap<1> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,1,MyPmap<1> > > tto, DClass<1>::KeyD key);\n    template void migrate_data<double,2>(SharedPtr<FunctionImpl<double,2,MyPmap<2> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,2,MyPmap<2> > > tto, DClass<2>::KeyD key);\n    template void migrate_data<double,3>(SharedPtr<FunctionImpl<double,3,MyPmap<3> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,3,MyPmap<3> > > tto, DClass<3>::KeyD key);\n    template void migrate_data<double,4>(SharedPtr<FunctionImpl<double,4,MyPmap<4> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,4,MyPmap<4> > > tto, DClass<4>::KeyD key);\n    template void migrate_data<double,5>(SharedPtr<FunctionImpl<double,5,MyPmap<5> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,5,MyPmap<5> > > tto, DClass<5>::KeyD key);\n    template void migrate_data<double,6>(SharedPtr<FunctionImpl<double,6,MyPmap<6> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,6,MyPmap<6> > > tto, DClass<6>::KeyD key);\n     \n    template void migrate_data<std::complex<double>,1>(SharedPtr<FunctionImpl<std::complex<double>,1,MyPmap<1> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,1,MyPmap<1> > > tto, DClass<1>::KeyD key);\n    template void migrate_data<std::complex<double>,2>(SharedPtr<FunctionImpl<std::complex<double>,2,MyPmap<2> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,2,MyPmap<2> > > tto, DClass<2>::KeyD key);\n    template void migrate_data<std::complex<double>,3>(SharedPtr<FunctionImpl<std::complex<double>,3,MyPmap<3> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,3,MyPmap<3> > > tto, DClass<3>::KeyD key);\n    template void migrate_data<std::complex<double>,4>(SharedPtr<FunctionImpl<std::complex<double>,4,MyPmap<4> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,4,MyPmap<4> > > tto, DClass<4>::KeyD key);\n    template void migrate_data<std::complex<double>,5>(SharedPtr<FunctionImpl<std::complex<double>,5,MyPmap<5> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,5,MyPmap<5> > > tto, DClass<5>::KeyD key);\n    template void migrate_data<std::complex<double>,6>(SharedPtr<FunctionImpl<std::complex<double>,6,MyPmap<6> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,6,MyPmap<6> > > tto, DClass<6>::KeyD key);\n     \n    template void migrate<double,1,MyPmap<1> >(SharedPtr<FunctionImpl<double,1,MyPmap<1> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,1,MyPmap<1> > > tto);\n    template void migrate<double,2,MyPmap<2> >(SharedPtr<FunctionImpl<double,2,MyPmap<2> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,2,MyPmap<2> > > tto);\n    template void migrate<double,3,MyPmap<3> >(SharedPtr<FunctionImpl<double,3,MyPmap<3> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,3,MyPmap<3> > > tto);\n    template void migrate<double,4,MyPmap<4> >(SharedPtr<FunctionImpl<double,4,MyPmap<4> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,4,MyPmap<4> > > tto);\n    template void migrate<double,5,MyPmap<5> >(SharedPtr<FunctionImpl<double,5,MyPmap<5> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,5,MyPmap<5> > > tto);\n    template void migrate<double,6,MyPmap<6> >(SharedPtr<FunctionImpl<double,6,MyPmap<6> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,6,MyPmap<6> > > tto);\n     \n    template void migrate<std::complex<double>,1,MyPmap<1> >(SharedPtr<FunctionImpl<std::complex<double>,1,MyPmap<1> > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,1,MyPmap<1> > > tto);\n    template void migrate<std::complex<double>,2,MyPmap<2> >(SharedPtr<FunctionImpl<std::complex<double>,2,MyPmap<2> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,2,MyPmap<2> > > tto);\n    template void migrate<std::complex<double>,3,MyPmap<3> >(SharedPtr<FunctionImpl<std::complex<double>,3,MyPmap<3> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,3,MyPmap<3> > > tto);\n    template void migrate<std::complex<double>,4,MyPmap<4> >(SharedPtr<FunctionImpl<std::complex<double>,4,MyPmap<4> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,4,MyPmap<4> > > tto);\n    template void migrate<std::complex<double>,5,MyPmap<5> >(SharedPtr<FunctionImpl<std::complex<double>,5,MyPmap<5> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,5,MyPmap<5> > > tto);\n    template void migrate<std::complex<double>,6,MyPmap<6> >(SharedPtr<FunctionImpl<std::complex<double>,6,MyPmap<6> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,6,MyPmap<6> > > tto);\n    */\n=======\ntemplate void migrate_data<double,1>(SharedPtr<FunctionImpl<double,1,MyProcmap<1> > > tfrom, \n\tSharedPtr<FunctionImpl<double,1,MyProcmap<1> > > tto, DClass<1>::KeyD key);\ntemplate void migrate_data<double,2>(SharedPtr<FunctionImpl<double,2,MyProcmap<2> > > tfrom, \n\tSharedPtr<FunctionImpl<double,2,MyProcmap<2> > > tto, DClass<2>::KeyD key);\ntemplate void migrate_data<double,3>(SharedPtr<FunctionImpl<double,3,MyProcmap<3> > > tfrom, \n\tSharedPtr<FunctionImpl<double,3,MyProcmap<3> > > tto, DClass<3>::KeyD key);\ntemplate void migrate_data<double,4>(SharedPtr<FunctionImpl<double,4,MyProcmap<4> > > tfrom, \n\tSharedPtr<FunctionImpl<double,4,MyProcmap<4> > > tto, DClass<4>::KeyD key);\ntemplate void migrate_data<double,5>(SharedPtr<FunctionImpl<double,5,MyProcmap<5> > > tfrom, \n\tSharedPtr<FunctionImpl<double,5,MyProcmap<5> > > tto, DClass<5>::KeyD key);\ntemplate void migrate_data<double,6>(SharedPtr<FunctionImpl<double,6,MyProcmap<6> > > tfrom, \n\tSharedPtr<FunctionImpl<double,6,MyProcmap<6> > > tto, DClass<6>::KeyD key);\n>>>>>>> .r223\n\n    template class LoadBalImpl<double,1,MyPmap<1> >;\n    template class LoadBalImpl<double,2,MyPmap<2> >;\n    template class LoadBalImpl<double,3,MyPmap<3> >;\n    template class LoadBalImpl<double,4,MyPmap<4> >;\n    template class LoadBalImpl<double,5,MyPmap<5> >;\n    template class LoadBalImpl<double,6,MyPmap<6> >;\n\n    template class LoadBalImpl<std::complex<double>,1,MyPmap<1> >;\n    template class LoadBalImpl<std::complex<double>,2,MyPmap<2> >;\n    template class LoadBalImpl<std::complex<double>,3,MyPmap<3> >;\n    template class LoadBalImpl<std::complex<double>,4,MyPmap<4> >;\n    template class LoadBalImpl<std::complex<double>,5,MyPmap<5> >;\n    template class LoadBalImpl<std::complex<double>,6,MyPmap<6> >;\n\n<<<<<<< .mine\n    template class LBTree<1,MyPmap<1> >;\n    template class LBTree<2,MyPmap<2> >;\n    template class LBTree<3,MyPmap<3> >;\n    template class LBTree<4,MyPmap<4> >;\n    template class LBTree<5,MyPmap<5> >;\n    template class LBTree<6,MyPmap<6> >;\n=======\n// Who knows why this isn't cooperating, so commented out for now\n/*\ntemplate void migrate<std::complex<double>,1,MyProcmap<1> >(SharedPtr<FunctionImpl<std::complex<double>,1,MyProcmap<1> > tfrom, \n\tSharedPtr<FunctionImpl<std::complex<double>,1,MyProcmap<1> > > tto);\n*/\ntemplate void migrate<std::complex<double>,2,MyProcmap<2> >(SharedPtr<FunctionImpl<std::complex<double>,2,MyProcmap<2> > > tfrom, \n\tSharedPtr<FunctionImpl<std::complex<double>,2,MyProcmap<2> > > tto);\ntemplate void migrate<std::complex<double>,3,MyProcmap<3> >(SharedPtr<FunctionImpl<std::complex<double>,3,MyProcmap<3> > > tfrom, \n\tSharedPtr<FunctionImpl<std::complex<double>,3,MyProcmap<3> > > tto);\ntemplate void migrate<std::complex<double>,4,MyProcmap<4> >(SharedPtr<FunctionImpl<std::complex<double>,4,MyProcmap<4> > > tfrom, \n\tSharedPtr<FunctionImpl<std::complex<double>,4,MyProcmap<4> > > tto);\ntemplate void migrate<std::complex<double>,5,MyProcmap<5> >(SharedPtr<FunctionImpl<std::complex<double>,5,MyProcmap<5> > > tfrom, \n\tSharedPtr<FunctionImpl<std::complex<double>,5,MyProcmap<5> > > tto);\ntemplate void migrate<std::complex<double>,6,MyProcmap<6> >(SharedPtr<FunctionImpl<std::complex<double>,6,MyProcmap<6> > > tfrom, \n\tSharedPtr<FunctionImpl<std::complex<double>,6,MyProcmap<6> > > tto);\n\n\ntemplate class LoadBalImpl<double,1,MyProcmap<1> >;\ntemplate class LoadBalImpl<double,2,MyProcmap<2> >;\ntemplate class LoadBalImpl<double,3,MyProcmap<3> >;\ntemplate class LoadBalImpl<double,4,MyProcmap<4> >;\ntemplate class LoadBalImpl<double,5,MyProcmap<5> >;\ntemplate class LoadBalImpl<double,6,MyProcmap<6> >;\n\ntemplate class LoadBalImpl<std::complex<double>,1,MyProcmap<1> >;\ntemplate class LoadBalImpl<std::complex<double>,2,MyProcmap<2> >;\ntemplate class LoadBalImpl<std::complex<double>,3,MyProcmap<3> >;\ntemplate class LoadBalImpl<std::complex<double>,4,MyProcmap<4> >;\ntemplate class LoadBalImpl<std::complex<double>,5,MyProcmap<5> >;\ntemplate class LoadBalImpl<std::complex<double>,6,MyProcmap<6> >;\n\ntemplate class LBTree<1,MyProcmap<1> >;\ntemplate class LBTree<2,MyProcmap<2> >;\ntemplate class LBTree<3,MyProcmap<3> >;\ntemplate class LBTree<4,MyProcmap<4> >;\ntemplate class LBTree<5,MyProcmap<5> >;\ntemplate class LBTree<6,MyProcmap<6> >;\n>>>>>>> .r223\n}\n#ifndef LOADBAL_H\n#define LOADBAL_H\n\n#include <madness/world/MADworld.h>\n#include <madness/mra/key.h>\n#include <madness/mra/mra.h>\nusing namespace std;\n\nnamespace madness {\n\n    typedef int Cost;\n    typedef double CompCost;\n\n    inline int nearest_power(int me, int d) {\n        int k = 0;\n        while (me != 0) {\n            if (me%d == 0) {\n                k++;\n                me/=d;\n            } else {\n                break;\n            }\n        }\n        return k;\n    };\n\n    template <typename Data, int D> class LBNode;\n    template <int D> struct TreeCoords;\n    template <int D> struct Tree;\n    template <int D> class MyPmap;\n    template <int D> class LBTree;\n    class NodeData;\n\n    template <int D>\n    struct DClass {\n        typedef Key<D> KeyD;\n        typedef const Key<D> KeyDConst;\n        typedef TreeCoords<D> TreeCoords;\n        typedef Tree<D> Tree;\n        typedef LBNode<NodeData,D> NodeD;\n        typedef const LBNode<NodeData,D> NodeDConst;\n        typedef MyPmap<D> MyPmap;\n        typedef LBTree<D> treeT;\n    };\n\n    template <typename T, int D>\n    void migrate(SharedPtr<FunctionImpl<T,D> > tfrom, SharedPtr<FunctionImpl<T,D> > tto);\n\n<<<<<<< .mine\n    template <typename T, int D>\n    void migrate_data(SharedPtr<FunctionImpl<T,D> > tfrom, SharedPtr<FunctionImpl<T,D> > tto,\n                      typename DClass<D>::KeyD key);\n=======\ntemplate <int D>\nstruct DClass {\n    typedef Key<D> KeyD;\n    typedef const Key<D> KeyDConst;\n    typedef TreeCoords<D> TreeCoords;\n    typedef Tree<D> Tree;\n    typedef LBNode<NodeData,D> NodeD;\n    typedef const LBNode<NodeData,D> NodeDConst;\n    typedef MyProcmap<D> MyProcMap;\n    typedef LBTree<D,MyProcMap> treeT;\n};\n>>>>>>> .r223\n\n    template <typename Data, int D>\n    class LBNode {\n    private:\n        Data data;\n        std::vector<bool> c;\n\n        void allchildren(bool status=false) {\n            c.clear();\n            c.assign(dim, status);\n        };\n\n    public:\n        static int dim;\n\n        LBNode() {\n            data = Data();\n            allchildren();\n        };\n\n        LBNode(Data d, bool children=false) : data(d) {\n            allchildren(children);\n        };\n\n        bool has_children() const {\n            for (int i = 0; i < dim; i++)\n                if (c[i]) return true;\n            return false;\n        };\n\n        bool has_child(unsigned int i) const {\n            return c[i];\n        };\n\n        bool has_child(int i) const {\n            return c[i];\n        };\n\n        void set_child(int i, bool setto = true) {\n            c[i] = setto;\n        };\n\n        void set_data(Data d) {\n            data = d;\n        };\n\n        Data get_data() const {\n            return data;\n        };\n\n        vector<bool> get_c() const {\n            return c;\n        };\n\n        template <typename Archive>\n        void serialize(const Archive& ar) {\n            ar & data & c;\n        }\n    };\n\n\n    template <typename Data, int D>\n    std::ostream& operator<<(std::ostream& s, const LBNode<Data, D>& node) {\n        s << \"data = \" << node.get_data() << \", c = \" << node.get_c();\n        return s;\n    };\n\n    template <int D>\n    std::ostream& operator<<(std::ostream& s, typename DClass<D>::NodeDConst& node) {\n        s << \"data = \" << node.get_data() << \", c = \" << node.get_c();\n        return s;\n    };\n\n\n    template <typename Data, int D>\n    int LBNode<Data,D>::dim = power<D>();\n\n\n    class NodeData {\n        friend std::ostream& operator<<(std::ostream& s, const NodeData& nd);\n    public:\n        int cost;\n        int subcost;\n        bool istaken;\n        NodeData(int c = 1, int s = 1, bool i = false) : cost(c), subcost(s), istaken(i) {};\n        template <typename Archive>\n        void serialize(const Archive& ar) {\n            ar & cost & subcost & istaken;\n        };\n        void print() {\n            cout << \"cost = \" << cost << \", subcost = \" << subcost << \", istaken = \" << istaken << endl;\n        };\n    };\n\n\n    inline std::ostream& operator<<(std::ostream& s, const NodeData& nd) {\n        s << \"cost \" << nd.cost << \", subcost \" << nd.subcost << \", istaken \" << nd.istaken;\n        return s;\n    };\n\n\n\n    template <int D>\n    struct TreeCoords {\n        Key<D> key;\n        ProcessID owner;\n\n        TreeCoords(const Key<D> k, ProcessID o) : key(Key<D>(k)), owner(o) {};\n        TreeCoords(const TreeCoords& t) : key(Key<D>(t.key)), owner(t.owner) {};\n        TreeCoords() : key(Key<D>()), owner(-1) {};\n        void print() const {\n            madness::print(key, \"   owner =\", owner);\n        };\n\n        bool operator< (const TreeCoords t) const {\n            return (this->key < t.key);\n        };\n    };\n\n\n\n    template <int D>\n    struct Tree {\n        TreeCoords<D> data;\n        vector<SharedPtr<Tree> > children;\n        Tree* parent;\n\n        Tree() {};\n        Tree(TreeCoords<D> d) : data(d), parent(0) {};\n        Tree(TreeCoords<D> d, Tree* p) : data(d), parent(p) {};\n\n        Tree(const Tree<D>& tree) : data(tree.data), parent(0) {};\n        Tree(const Tree<D>& tree, Tree* p) : data(tree.data), parent(p) {};\n\n        Tree<D>& operator=(const Tree<D>& other) {\n            if (this != &other) {\n                this->data = other.data;\n                this->parent = other.parent;\n                this->children = other.children;\n            }\n            return *this;\n        };\n\n        void insertChild(TreeCoords<D> d) {\n            Tree* c = new Tree(d, this);\n            children.insert(children.begin(),SharedPtr<Tree<D> > (c));\n        };\n\n        void insertChild(const Tree<D>& tree) {\n            Tree* c = new Tree(tree, this);\n            children.insert(children.begin(),SharedPtr<Tree<D> > (c));\n        };\n\n        void print() {\n            data.print();\n            int csize = children.size();\n            for (int j = 0; j < csize; j++) {\n                children[j]->print();\n            }\n        };\n\n        bool isForeparentOf(Key<D> key) const {\n            return (this->data.key.is_parent_of(key));\n        };\n\n        void findOwner(const Key<D> key, ProcessID *ow) const {\n//madness::print(\"findOwner: at node\", this->data.key);\n            if (this->isForeparentOf(key)) {\n//madness::print(\"findOwner: node\", this->data.key, \"is foreparent of\", key, \"so owner =\", this->data.owner);\n                *ow = this->data.owner;\n                if (this->data.key.level() < key.level()) {\n                    int csize = children.size();\n                    for (int j = 0; j < csize; j++) {\n//madness::print(\"findOwner: recursively call on \", this->children[j]->data.key);\n                        children[j]->findOwner(key, ow);\n                    }\n                }\n            }\n        };\n\n        bool fill(TreeCoords<D> node) {\n            bool success = false;\n            if (this->isForeparentOf(node.key)) {\n                int csize = children.size();\n                for (int i = 0; i < csize; i++) {\n                    if (children[i]->isForeparentOf(node.key)) {\n                        success = children[i]->fill(node);\n                    }\n                }\n                if (!success) {\n                    this->insertChild(node);\n                    success = true;\n                }\n            }\n            return success;\n        }\n    };\n\n\n\n    template <int D>\n    class MyPmap : public WorldDCPmapInterface< Key<D> > {\n    private:\n        bool static_map;\n        const ProcessID staticmap_owner;\n        Tree<D>* treeMap;\n        typedef Key<D> KeyD;\n\n        void buildTreeMap(vector<TreeCoords<D> > v) {\n            sort(v.begin(), v.end());\n            int vlen = v.size();\n\n            if (vlen == 0) throw \"empty map!!!\";\n\n<<<<<<< .mine\n            treeMap = new Tree<D>(v[vlen-1]);\n            for (int j = vlen-2; j >= 0; j--) {\n                treeMap->fill(v[j]);\n            }\n        };\n=======\n    ProcessID getOwner(const KeyD& key) const {\n\tProcessID owner;\n\ttreeMap->findOwner(key, &owner);\n\treturn owner;\n    };\n>>>>>>> .r223\n\n\n    public:\n        MyPmap() : staticmap(false), staticmap_owner(0) {};\n\n        MyPmap(World& world) : staticmap(false), staticmap_owner(0) {\n            int NP = world.nproc();\n            int twotoD = power<D>();\n            const int level = nearest_power(NP, twotoD);\n            int NPin = (int) pow((double)twotoD,level);\n            vector<TreeCoords<D> > v;\n\n<<<<<<< .mine\n            for (Translation i=0; i < (Translation)NPin; i++) {\n                KeyD key(level,i);\n                if ((i%twotoD) == 0) {\n                    key = key.parent(nearest_power(NPin-i, twotoD));\n                }\n                v.push_back(TreeCoords<D>(key,i));\n            }\n            buildTreeMap(v);\n            madness::print(\"MyPmap constructor\");\n            treeMap->print();\n        };\n=======\n\ttreeMap = new Tree<D>(v[vlen-1]);\n\tfor (int j = vlen-2; j >= 0; j--) {\n\t    treeMap->fill(v[j]);\n\t}\n    };\n\t\n>>>>>>> .r223\n\n        MyPmap(World& world, ProcessID owner) : staticmap(true), owner(owner) {};\n\n        MyPmap(World& world, vector<TreeCoords<D> > v) : staticmap(false), owner(1) { // owner????????????????\n            buildTreeMap(v);\n            madness::print(\"\");\n            treeMap->print();\n        };\n\n        MyPmap(const MyPmap<D>& other) : staticmap(other.staticmap), owner(other.owner), treeMap(other.treeMap) {};\n\n        MyPmap<D>& operator=(const MyPmap<D>& other) {\n            if (this != &other) {\n                staticmap = other.staticmap;\n                owner = other.owner;\n                treeMap = other.treeMap;\n            }\n            return *this;\n        };\n\n        void print() {\n            treeMap->print();\n        };\n\n        ProcessID Owner(const KeyD& key) const {\n            if (staticmap)\n                return staticmap_owner;\n            else {\n                ProcessID owner;\n                treeMap->findOwner(key, &owner);\n                return owner;\n            }\n        };\n    };\n\n    template <int D>\n    class LBTree : public WorldContainer<typename DClass<D>::KeyD,typename DClass<D>::NodeD> {\n        // No new variables necessary\n    public:\n<<<<<<< .mine\n        typedef WorldContainer<typename DClass<D>::KeyD,typename DClass<D>::NodeD> dcT;\n        LBTree() {};\n        LBTree(World& world, const SharedPtr< WorldDCPmapInterface<DClass<D>::KeyD> >& pmap) : dcT(world,pmap) {\n            madness::print(\"LBTree(world, pmap) constructor\");\n            this->get_mypmap()->print();\n            madness::print(\"LBTree(world, pmap) constructor (goodbye)\");\n        };\n        template <typename T>\n        inline void init_tree(SharedPtr< FunctionImpl<T,D> > f, typename DClass<D>::KeyDConst key) {\n            // find Node associated with key\n            typename FunctionImpl<T,D>::dcT::iterator it = f->coeffs.find(key);\n            if (it == f->coeffs.end()) return;\n            // convert Node to LBNode\n            NodeData nd;\n            if (!(it->second.has_children())) {\n                typename DClass<D>::NodeD lbnode(nd,false);\n                // insert into \"this\"\n                this->insert(key, lbnode);\n            } else {\n                typename DClass<D>::NodeD lbnode(nd,true);\n                // insert into \"this\"\n                this->insert(key, lbnode);\n                // then, call for each child\n                for (KeyChildIterator<D> kit(key); kit; ++kit) {\n                    this->init_tree<T>(f, kit.key());\n                }\n            }\n        };\n=======\n\ttypedef WorldContainer<typename DClass<D>::KeyD,typename DClass<D>::NodeD, Pmap> dcT;\n\n\tLBTree() {};\n\tLBTree(World& world, const Pmap& pmap) : dcT(world,pmap) {\n\t    this->get_procmap().print();\n\t};\n\n\ttemplate <typename T>\n\tinline void init_tree(SharedPtr<FunctionImpl<T,D,Pmap> > f, typename DClass<D>::KeyDConst key) {\n\t    // find Node associated with key\n\t    typename FunctionImpl<T,D,Pmap>::iterator it = f->find(key);\n\t    if (it == f->end()) return;\n\t    // convert Node to LBNode\n\t    NodeData nd;\n\t    if (!(it->second.has_children())) {\n\t\ttypename DClass<D>::NodeD lbnode(nd,false);\n\t        // insert into \"this\"\n\t\tthis->insert(key, lbnode);\n\t    }\n\t    else {\n\t\ttypename DClass<D>::NodeD lbnode(nd,true);\n\t        // insert into \"this\"\n\t\tthis->insert(key, lbnode);\n\t\t// then, call for each child\n\t\tfor (KeyChildIterator<D> kit(key); kit; ++kit) {\n\t\t    this->init_tree<T>(f, kit.key());\n\t\t}\n\t    }\n\t};\n>>>>>>> .r223\n\n        // Methods:\n        void print(typename DClass<D>::KeyDConst& key) {\n            typename DClass<D>::treeT::iterator it = this->find(key);\n            if (it == this->end()) return;\n            for (Level i = 0; i < key.level(); i++) cout << \"  \";\n            madness::print(key, it->second);\n            for (KeyChildIterator<D> kit(key); kit; ++kit) {\n                print(kit.key());\n            }\n        };\n\n        Cost fixCost(typename DClass<D>::KeyDConst& key);\n\n        Cost depthFirstPartition(typename DClass<D>::KeyDConst& key,\n                                 vector<typename DClass<D>::TreeCoords>* klist, unsigned int npieces,\n                                 Cost totalcost = 0, Cost *maxcost = 0);\n\n        void rollup(typename DClass<D>::KeyDConst& key);\n\n        void meld(typename DClass<D>::KeyDConst& key);\n\n        Cost makePartition(typename DClass<D>::KeyDConst& key,\n                           vector<typename DClass<D>::KeyD>* klist, Cost partitionSize,\n                           bool lastPartition, Cost usedUp, bool *atleaf);\n\n        void removeCost(typename DClass<D>::KeyDConst& key, Cost c);\n\n        Cost computeCost(typename DClass<D>::KeyDConst& key);\n\n        // inherited methods\n        typename WorldContainer<typename DClass<D>::KeyD,typename DClass<D>::NodeD>::iterator \n        end() {\n            return WorldContainer<typename DClass<D>::KeyD, typename DClass<D>::NodeD>::end();\n        };\n\n        typename WorldContainer<typename DClass<D>::KeyD,typename DClass<D>::NodeD>::iterator\n        find(typename DClass<D>::KeyDConst& key) {\n            return WorldContainer<typename DClass<D>::KeyD, typename DClass<D>::NodeD>::find(key);\n        };\n\n//         const SharedPtr<WorldDCPmapInterface< DClass<D>::KeyD >& get_pmap() {\n//             return WorldContainer<typename DClass<D>::KeyD, typename DClass<D>::NodeD>::get_pmap();\n//         };\n\n        MyPmap<D>& get_mypmap() {\n            return *static_cast< MyPmap<D>* >(get_pmap().get());\n        };\n\n    };\n\n    template <typename T, int D, typename Pmap=MyPmap<D> >\n    class LoadBalImpl {\n    private:\n        Function<T,D,Pmap> f;\n        SharedPtr<typename DClass<D>::treeT> skeltree;\n\n<<<<<<< .mine\n        void construct_skel(SharedPtr<FunctionImpl<T,D,Pmap> > f) {\n            skeltree = SharedPtr<typename DClass<D>::treeT>(new typename DClass<D>::treeT(f->world,\n                       f->coeffs.get_mypmap()));\n            typename DClass<D>::KeyD root(0);\n            madness::print(\"about to initialize tree\");\n            if (f->world.mpi.rank() == 0) {\n                skeltree->template init_tree<T>(f,root);\n            }\n            madness::print(\"just initialized tree\");\n        };\n=======\n\tvoid construct_skel(SharedPtr<FunctionImpl<T,D,Pmap> > f) {\n\t    skeltree = SharedPtr<typename DClass<D>::treeT>(new typename DClass<D>::treeT(f->world,\n\t\tf->get_procmap()));\n\t    typename DClass<D>::KeyD root(0);\n\t    if (f->world.mpi.rank() == 0) {\n\t    \tskeltree->template init_tree<T>(f,root);\n\t    }\n\t};\n>>>>>>> .r223\n\n    public:\n<<<<<<< .mine\n        //Constructors\n        LoadBalImpl() {};\n=======\n\t//Constructors\n\tLoadBalImpl() {};\n\tLoadBalImpl(Function<T,D,Pmap> f) : f(f) {\n\t    construct_skel(f.impl);\n\t};\n\t~LoadBalImpl() {};\n>>>>>>> .r223\n\n        LoadBalImpl(Function<T,D> f) : f(f) {\n            madness::print(\"LoadBalImpl (Function) constructor: f.impl\", &f.impl);\n            construct_skel(f.impl);\n        };\n\n        ~LoadBalImpl() {};\n\n<<<<<<< .mine\n        //Methods\n        inline void loadBalance() {\n            partition(findBestPartition());\n        };\n=======\n\tvoid partition(vector<typename DClass<D>::TreeCoords> v) {\n\t    // implement partition: copy to new FunctionImpl and replace within f\n\t    Pmap pmap(f.impl->world, v);\n\t    SharedPtr<FunctionImpl<T,D,Pmap> > newimpl(new FunctionImpl<T,D,Pmap>(*(f.impl.get()),pmap));\n\t    if (f.impl->world.mpi.rank() == 0) {\n\t    \tmadness::migrate<T,D,Pmap>(f.impl, newimpl);\n\t\tKey<D> root(0);\n\t\tnewimpl->print(root);\n\t    }\n\t    f.impl->world.gop.fence();\n\t    f.impl = newimpl;\n\t};\n>>>>>>> .r223\n\n        vector<typename DClass<D>::TreeCoords> findBestPartition();\n\n        void partition(vector<typename DClass<D>::TreeCoords> v) {\n            // implement partition: copy to new FunctionImpl and replace within f\n            madness::print(\"partition: at beginning\");\n            Pmap pmap(f.impl->world, v);\n            SharedPtr<FunctionImpl<T,D,Pmap> > newimpl(new FunctionImpl<T,D>(*(f.impl.get()),pmap)); // ???????????????????????????????????\n            if (f.impl->world.mpi.rank() == 0) {\n                madness::migrate<T,D,Pmap>(f.impl, newimpl);\n            }\n            madness::print(\"partition: at fence\");\n            f.impl->world.gop.fence();\n            madness::print(\"partition: after fence\");\n            f.impl = newimpl;\n        };\n\n    };\n\n    CompCost computeCompCost(Cost c, int n);\n\n    Cost computePartitionSize(Cost cost, unsigned int parts);\n\n}\n\n#endif\n\n\n    /// Simple distributed map for the tree\n    template <int NDIM>\n    class FunctionSimplePmap<NDIM> : public WorldDCPmapInterface< Key<NDIM> > {\n    private:\n        World* world;\n        Level n;\n\n    public:\n        FunctionSimplePmap() : world(0), n(2) {};\n\n        FunctionSimplePmap(\n\n\n\n\n\n\n// Who knows why these aren't cooperating, so commented out for now\n    /*\n    template void migrate_data<double,1>(SharedPtr<FunctionImpl<double,1> > tfrom, \n    \tSharedPtr<FunctionImpl<double,1> > tto, DClass<1>::KeyD key);\n    template void migrate_data<double,2>(SharedPtr<FunctionImpl<double,2> > tfrom, \n    \tSharedPtr<FunctionImpl<double,2> > tto, DClass<2>::KeyD key);\n    template void migrate_data<double,3>(SharedPtr<FunctionImpl<double,3> > tfrom, \n    \tSharedPtr<FunctionImpl<double,3> > tto, DClass<3>::KeyD key);\n    template void migrate_data<double,4>(SharedPtr<FunctionImpl<double,4> > tfrom, \n    \tSharedPtr<FunctionImpl<double,4> > tto, DClass<4>::KeyD key);\n    template void migrate_data<double,5>(SharedPtr<FunctionImpl<double,5> > tfrom, \n    \tSharedPtr<FunctionImpl<double,5> > tto, DClass<5>::KeyD key);\n    template void migrate_data<double,6>(SharedPtr<FunctionImpl<double,6> > tfrom, \n    \tSharedPtr<FunctionImpl<double,6> > tto, DClass<6>::KeyD key);\n     \n    template void migrate_data<std::complex<double>,1>(SharedPtr<FunctionImpl<std::complex<double>,1,MyPmap<1> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,1,MyPmap<1> > > tto, DClass<1>::KeyD key);\n    template void migrate_data<std::complex<double>,2>(SharedPtr<FunctionImpl<std::complex<double>,2,MyPmap<2> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,2,MyPmap<2> > > tto, DClass<2>::KeyD key);\n    template void migrate_data<std::complex<double>,3>(SharedPtr<FunctionImpl<std::complex<double>,3,MyPmap<3> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,3,MyPmap<3> > > tto, DClass<3>::KeyD key);\n    template void migrate_data<std::complex<double>,4>(SharedPtr<FunctionImpl<std::complex<double>,4,MyPmap<4> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,4,MyPmap<4> > > tto, DClass<4>::KeyD key);\n    template void migrate_data<std::complex<double>,5>(SharedPtr<FunctionImpl<std::complex<double>,5,MyPmap<5> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,5,MyPmap<5> > > tto, DClass<5>::KeyD key);\n    template void migrate_data<std::complex<double>,6>(SharedPtr<FunctionImpl<std::complex<double>,6,MyPmap<6> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,6,MyPmap<6> > > tto, DClass<6>::KeyD key);\n     \n    template void migrate<double,1,MyPmap<1> >(SharedPtr<FunctionImpl<double,1,MyPmap<1> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,1,MyPmap<1> > > tto);\n    template void migrate<double,2,MyPmap<2> >(SharedPtr<FunctionImpl<double,2,MyPmap<2> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,2,MyPmap<2> > > tto);\n    template void migrate<double,3,MyPmap<3> >(SharedPtr<FunctionImpl<double,3,MyPmap<3> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,3,MyPmap<3> > > tto);\n    template void migrate<double,4,MyPmap<4> >(SharedPtr<FunctionImpl<double,4,MyPmap<4> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,4,MyPmap<4> > > tto);\n    template void migrate<double,5,MyPmap<5> >(SharedPtr<FunctionImpl<double,5,MyPmap<5> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,5,MyPmap<5> > > tto);\n    template void migrate<double,6,MyPmap<6> >(SharedPtr<FunctionImpl<double,6,MyPmap<6> > > tfrom, \n    \tSharedPtr<FunctionImpl<double,6,MyPmap<6> > > tto);\n     \n    template void migrate<std::complex<double>,1,MyPmap<1> >(SharedPtr<FunctionImpl<std::complex<double>,1,MyPmap<1> > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,1,MyPmap<1> > > tto);\n    template void migrate<std::complex<double>,2,MyPmap<2> >(SharedPtr<FunctionImpl<std::complex<double>,2,MyPmap<2> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,2,MyPmap<2> > > tto);\n    template void migrate<std::complex<double>,3,MyPmap<3> >(SharedPtr<FunctionImpl<std::complex<double>,3,MyPmap<3> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,3,MyPmap<3> > > tto);\n    template void migrate<std::complex<double>,4,MyPmap<4> >(SharedPtr<FunctionImpl<std::complex<double>,4,MyPmap<4> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,4,MyPmap<4> > > tto);\n    template void migrate<std::complex<double>,5,MyPmap<5> >(SharedPtr<FunctionImpl<std::complex<double>,5,MyPmap<5> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,5,MyPmap<5> > > tto);\n    template void migrate<std::complex<double>,6,MyPmap<6> >(SharedPtr<FunctionImpl<std::complex<double>,6,MyPmap<6> > > tfrom, \n    \tSharedPtr<FunctionImpl<std::complex<double>,6,MyPmap<6> > > tto);\n    */\n\n\n\n\n\n\ntemplate <typename T, int NDIM> \nstruct TestOp : WorldObject< TestOp<T,NDIM> > {\n    typedef T resultT;\n    typedef TestOp<T,NDIM> opT;\n    const int k;\n    std::vector<long> v2k;\n\n    TestOp(World& world, int k) : WorldObject<opT>(world), k(k), v2k(NDIM) {\n        this->process_pending();\n        for (int i=0; i<NDIM; i++) v2k[i] = 2*k;\n    };\n    \n\n    double norm(const Key<NDIM>& key, const Displacement<NDIM>& d) const {\n        if (d.distsq > 2) return 0.0;\n        else return 1.0;\n    }\n    \n    Tensor<T> apply(const Key<NDIM>& key, const Displacement<NDIM>& d, const Tensor<T>& c) const {\n        print(\"applying \", key, d);\n        return Tensor<resultT>(v2k);\n    }\n};\n\n\n\n    \nnamespace madness {\n    namespace archive {\n        template <class Archive, class T, int NDIM>\n        struct ArchiveLoadImpl<Archive,const TestOp<T,NDIM>*> {\n            static inline void load(const Archive& ar, const TestOp<T,NDIM>*& ptr) {\n                WorldObject< TestOp<T,NDIM> >* p;\n                ar & p;\n                ptr = static_cast< const TestOp<T,NDIM>* >(p);\n            }\n        };\n        \n        template <class Archive, class T, int NDIM>\n        struct ArchiveStoreImpl<Archive,const TestOp<T,NDIM>*> {\n            static inline void store(const Archive& ar, const TestOp<T,NDIM>*const& ptr) {\n                ar & static_cast< const WorldObject< TestOp<T,NDIM> >* > (ptr);\n            }\n        };\n    }\n}\n\n\n\n    /// Holds info about displacement to neighbor for application of operators\n    template <int NDIM>\n    struct Displacement {\n        Vector<Translation,NDIM> d;\n        uint64_t distsq;\n        Displacement() {};\n        Displacement(const Vector<int, NDIM>& d) : d(d), distsq(0) {\n            for (int i=0; i<NDIM; i++) distsq += d[i]*d[i];\n        }\n\n        bool operator<(const Displacement<NDIM>& other) const {\n            return distsq < other.distsq;\n        }\n\n        Translation operator[](int i) const {return d[i];}\n\n        template <typename Archive>\n        void serialize(Archive& ar) {\n            ar & d & distsq;\n        }\n    };\n\n    template <int NDIM>\n    std::ostream& operator<<(std::ostream& s, const Displacement<NDIM>& disp) {\n        s << disp.d;\n        return s;\n    }\n\n\n\n    /// Simplified interface around hash_map to cache stuff\n\n    /// Since insertions into STL containers have the nasty habit of\n    /// invalidating iterators we actually store shared pointers\n    template <typename Q>\n    class SimpleCache {\n    private:\n        typedef HASH_MAP_NAMESPACE::hash_map< unsigned long, SharedPtr<Q> > mapT;\n        typedef std::pair< unsigned long, SharedPtr<Q> > pairT;\n        mapT cache;\n        \n        // Turns (n,lx) into key\n        inline unsigned long key(Level n, long lx) const {\n            return (n<<25) | (lx+16777216);\n        }\n        \n        // Turns (n,displacement) into key\n        template <int NDIM>\n        inline unsigned long key(Level n, const Key<NDIM>& d) const {\n            MADNESS_ASSERT((6+NDIM*4) <= sizeof(unsigned long)*8);\n            unsigned long k = n<<2;\n            for (int i=0; i<NDIM; i++) k = (k<<4) | (d.translation()[i]+7);\n            return k;\n        }\n        \n    public:\n        SimpleCache() : cache() {};\n        \n        SimpleCache(const SimpleCache& c) : cache(c.cache) {};\n        SimpleCache& operator=(const SimpleCache& c) {\n            if (this != &c) {\n                cache.clear();\n                cache = c.cache;\n            }\n            return *this;\n        }\n        \n        /// If (n,index) is present return pointer to cached value, otherwise return NULL\n        template <typename indexT>\n        inline const Q* getptr(Level n,  const indexT& index) const {\n            typename mapT::const_iterator test = cache.find(key(n,index));\n            if (test == cache.end()) return 0;\n            return test->second.get();\n        }\n        \n\n        /// Set value associated with (n,index)\n        template <typename indexT>\n        inline void set(Level n, const indexT& index, const Q& val) {\n            cache.insert(pairT(key(n,index),SharedPtr<Q>(new Q(val))));\n        }\n    };\n\n\n\n\n\n# You must define additional rules to link your test programs\ntest: $(TEST1OBJ) $(THISLIBDEPEND) \n\t$(LTLINK) $(LD) $(LDFLAGS) -o $@ $^ $(SYSLIBS) $(LTLINKBINOPTS)\n\ntestqm: $(TEST2OBJ) $(THISLIBDEPEND) \n\t$(LTLINK) $(LD) $(LDFLAGS) -o $@ $^ $(SYSLIBS) $(LTLINKBINOPTS)\n\njjtests: jjtests.o $(THISLIBDEPEND) \n\t$(LTLINK) $(LD) $(LDFLAGS) -o $@ $^ $(SYSLIBS) $(LTLINKBINOPTS)\n\njjtests.o:\tsdc.h\n\ntestsuite: $(TEST3OBJ) $(THISLIBDEPEND) \n\t$(LTLINK) $(LD) $(LDFLAGS) -o $@ $^ $(SYSLIBS) $(LTLINKBINOPTS)\n\ntests-hqi: $(TEST4OBJ) $(THISLIBDEPEND) \n\t$(LTLINK) $(LD) $(LDFLAGS) -o $@ $^ $(SYSLIBS) $(LTLINKBINOPTS)\n\ntestperiodic: $(TEST5OBJ) $(THISLIBDEPEND)\n\t$(LTLINK) $(LD) $(LDFLAGS) -o $@ $^ $(SYSLIBS) $(LTLINKBINOPTS)\n\ngfit: $(TEST6OBJ) $(THISLIBDEPEND)\n\t$(LTLINK) $(LD) $(LDFLAGS) -o $@ $^ $(SYSLIBS) $(LTLINKBINOPTS)\n\ntestbsh: $(TEST6OBJ) $(THISLIBDEPEND)\n\t$(LTLINK) $(LD) $(LDFLAGS) -o $@ $^ $(SYSLIBS) $(LTLINKBINOPTS)\n\nrunvalg2:\n\tmpiexec -np 3 $(VALGRIND) $(VALGOPTS) ./tests-hqi -rio \n\n\n\n\n    template <typename T, int NDIM>\n    Void FunctionImpl<T,NDIM>::ensure_exists(const keyT& key) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        if (!coeffs.probe(key)) {\n            keyT parent = key.parent();\n            // If the node does not exist this implies that it will\n            // be a leaf ... make it here so that we only send one\n            // request up the tree to make it.\n            coeffs.insert(key,nodeT(tensorT(),false));\n            //madness::print(\"ensure_exists: sending recur up from\", key, \"to\", parent);\n            send(coeffs.owner(parent), &implT::recur_down_with_fill, key, parent);            \n        }\n        return None;\n    }\n\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::widen(bool fence, int ndiff) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        double tol = std::min(1e3*thresh, sqrt(thresh));\n        for(typename dcT::iterator it=coeffs.begin(); it!=coeffs.end(); ++it) {\n            const keyT& key = it->first;\n            const nodeT& node = it->second;\n            if (node.is_leaf() && node.coeff().normf()>tol) {\n                for (int axis=0; axis<NDIM; axis++) {\n                    for (int step=-1; step<=1; step+=2) {\n                        keyT neigh = neighbor(key, axis, step);\n                        if (neigh.is_valid()) {\n                            if (ndiff > 0) neigh = neigh.parent(ndiff);\n                            send(coeffs.owner(neigh), &implT::ensure_exists, neigh);\n                        }\n                    }\n                }\n            }\n        }\n        if (fence) world.gop.fence();\n    }\n\n\n        // Widens the support of the tree in preparation for integral operator\n        void widen(bool fence, int ndiff);\n\n\n        void widen(bool fence = true, int ndiff = 1) {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            if (is_compressed()) reconstruct();\n            impl->widen(fence, ndiff);\n            if (fence && VERIFY_TREE) verify_tree();\n        }\n\n\n\n\n        template <typename testT>\n        void conditional_refine_doit(const testT& test, const keyT& key) {\n          nodeT& node = coeffs[key];\n          if (node.has_coeff() && test(key, node.coeff())) {\n            tensorT s(cdata.v2k);\n            s(cdata.s0) = node.coeff();\n            s = unfilter(s);\n            node.clear_coeff();\n            node.set_has_children(true);\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n               const keyT& child = kit.key();\n               task(coeffs.owner(child), &implT:: template conditional_refine_insert_doit<testT>,\n                    test, child, copy(s(child_patch(child))));\n            }\n          }\n        }\n\n        template <typename testT>\n        void conditional_refine(const testT& test, bool fence) {\n          MADNESS_ASSERT(!compressed);\n          for(typename dcT::iterator it=coeffs.begin(); it!=coeffs.end(); ++it) {\n            const keyT& key = it->first;\n            conditional_refine_doit(test, key);\n          }\n          if (fence) world.gop.fence();\n        }\n\n\n\n        template <typename testT>\n        void conditional_refine(const testT& test, bool fence=true) {\n          if (is_compressed()) reconstruct();\n          impl->conditional_refine(test, fence);\n        }\n\n\n\n\n        template <typename opT, typename R>\n        Void do_apply_acc(const opT* op, const FunctionImpl<R,NDIM>* f, const keyT& key, const Tensor<T>& t) {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n            if (!coeffs.probe(key)) coeffs.replace(key, nodeT());\n            nodeT& node = coeffs[key];\n\n            // Accumulate into the box\n            if (node.has_coeff()) {\n                node.coeff().gaxpy(1.0,t,1.0);\n            }\n            else {\n                node.set_coeff(copy(t));\n                // No existing coeff and no children means the node is newly created for\n                // this operation and we must tell its parent that it exists.\n                if ((!node.has_children()) && (key.level() > 0)) {\n                    Key<NDIM> parent = key.parent();\n                    coeffs.send(parent, &FunctionNode<T,NDIM>::set_has_children_recursive, coeffs, parent);\n                }\n\n                if (op->dowiden1) {\n                    typename FunctionImpl<R,NDIM>::dcT::const_iterator it = f->coeffs.find(key);\n                    if ((it==f->coeffs.end() || it->second.is_invalid()) &&\n                        (t.normf() > truncate_tol(thresh,key))) {\n                        // We just made the first contribution to box that did not\n                        // exist in the source.  Make the source box with any\n                        // missing parents and apply the operator to each of them.\n                        recur_down_with_apply(op, f, key.parent(), key, Tensor<R>());\n                    }\n                }\n\n            }\n            return None;\n        }\n\n\n\n        // This routine MUST be executed in an AM handler for atomicity\n        template <typename opT, typename R>\n        Void recur_down_with_apply(const opT* op,\n                                   const FunctionImpl<R,NDIM>* cf,\n                                   const keyT& key,\n                                   const keyT& target,\n                                   const Tensor<R>& r) {\n\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n            // We send the coeffs down in this routine so we have effectively\n            // atomic insert+apply to eliminate a race condition leading to\n            // double application of the operator.\n\n            FunctionImpl<R,NDIM>* f = const_cast<FunctionImpl<R,NDIM>*>(cf);\n\n            // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<  race condition??????\n\n            if (!f->coeffs.probe(key)) {\n                //madness::print(\"not there\", key);\n                f->coeffs.replace(key,FunctionNode<R,NDIM>());\n            }\n            FunctionNode<R,NDIM>& node = f->coeffs[key];\n\n            if (r.size) {\n                // If r has data then it will be the coefficients for this node.\n                // If we don't already have coeffs courtesy of someone else then\n                // insert them and apply the operator.\n                if (!node.has_coeff()) {\n                    MADNESS_ASSERT(r.iscontiguous());\n                    node.set_coeff(r);\n                    //madness::print(\"EXTENDED APPLY\", key, node.coeff().normf());\n                    task(world.rank(), &implT:: template do_apply<opT,R>, op, cf, key, node.coeff());\n                    if (key.level() == target.level()) return None; // Mission accomplished!\n                    if (!target.is_child_of(key)) return None; // This is a sibling of the correct path\n                }\n            }\n\n            // If r does not have data or we are not yet at our target then we\n            // must look at the node to see what to do\n\n            // - If key==target\n            //   The coeffs should already have been made (and the operator applied)\n            //   while someone else was making another node.\n            //\n            // - Otherwise\n            // a) Node does not exist ... forward up.  Accessing the node in the manner\n            //    above would have made an invalid node ... so this is captured by b)\n            // b) Node exists but is invalid ... forward up (this means that someone else\n            //    is already trying to make this node ... better would be to attach\n            //    a callback so that when the coeffs are set this task is initiated).\n            // c) Node exists and has children ... forward down\n            // d) Node exists and has no children  ... recur down\n\n            Tensor<R> empty;\n\n            if (node.has_coeff()) { // d ... recur down if appropriate\n                if (key.level() < target.level() && target.is_child_of(key)) {\n                    const Tensor<R>& r = node.coeff();\n                    Tensor<R> s;\n                    if (r.dim[0] == k) {\n                        Tensor<R> d(cdata.v2k);\n                        d(cdata.s0) = node.coeff()(cdata.s0);\n                        s = unfilter(d);\n                    }\n                    else if (r.dim[0] == 2*k) {\n                        s = unfilter(node.coeff());\n                    }\n                    else {\n                        MADNESS_EXCEPTION(\"Uh?\",r.dim[0]);\n                    }\n\n                    node.set_has_children(true);\n                    for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                        const keyT& child = kit.key();\n                        Tensor<R> ss = copy(s(child_patch(child)));\n                        //madness::print(\"EXTENDED DOWN-2\", key, \"to\", child, ss.normf());\n                        task(coeffs.owner(child), &implT:: template recur_down_with_apply<opT,R>,\n                             op, cf, child, target, ss);\n                    }\n                }\n            }\n            else { // a and b ... forward up\n                keyT parent = key.parent();\n                //madness::print(\"EXTENDED UP\", key, \"to\", parent);\n                task(coeffs.owner(parent), &implT:: template recur_down_with_apply<opT,R>, op, cf, parent, target, empty);\n            }\n\n            return None;\n        }\n\n\n\n\n\n\n\n        /// Apply one of the separated terms, accumulating into the result\n\n        /// !!! Keep this routine exactly consistent with muopxvT so that\n        /// munorm converges correctly\n        template <typename T>\n        void muopxv(Level n,\n                    const ConvolutionData1D<Q>* const ops[NDIM],\n                    const Tensor<T>& f, const Tensor<T>& f0,\n                    Tensor<TENSOR_RESULT_TYPE(T,Q)>& result,\n                    const double tol,\n                    const double musign) const {\n            PROFILE_MEMBER_FUNC(SeparatedConvolution);\n\n            double Rnorm = 1.0;\n            for (int d=0; d<NDIM; d++) Rnorm *= ops[d]->Rnorm;\n            if (Rnorm == 0.0) return;\n\n            // Temporaries can be optimized away\n            Tensor<TENSOR_RESULT_TYPE(T,Q)> tmp = inner(f,ops[0]->R,0,0);\n            for (int d=1; d<NDIM; d++) {\n                tmp = inner(tmp,ops[d]->R,0,0);\n            }\n            result.gaxpy(1.0,tmp,musign);\n\n            if (n > 0) {\n                tmp = inner(f0,ops[0]->T,0,0);\n                for (int d=1; d<NDIM; d++) {\n                    tmp = inner(tmp,ops[d]->T,0,0);\n                }\n                result(s0).gaxpy(1.0,tmp,-musign);\n            }\n        }\n\n        /// Apply transpose of one of the separated terms, accumulating into the result\n\n        /// This is only used when computing the actual 2-norm by the power method\n        /// !!! Keep this routine exactly consistent with muopxv so that\n        /// munorm converges correctly\n        template <typename T>\n        void muopxvT(Level n,\n                     const ConvolutionData1D<Q>* ops[],\n                     const Tensor<T>& f, const Tensor<T>& f0,\n                     Tensor<TENSOR_RESULT_TYPE(T,Q)>& result,\n                     const double tol,\n                     const double musign) const {\n            PROFILE_MEMBER_FUNC(SeparatedConvolution);\n\n            double Rnorm = 1.0;\n            for (int d=0; d<NDIM; d++) Rnorm *= ops[d]->Rnorm;\n            if (Rnorm == 0.0) return;\n\n            // Temporaries can be optimized away\n            Tensor<TENSOR_RESULT_TYPE(T,Q)> tmp = inner(f,ops[0]->R,0,1);\n            for (int d=1; d<NDIM; d++) {\n                tmp = inner(tmp,ops[d]->R,0,1);\n            }\n            result.gaxpy(1.0,tmp,musign);\n\n            if (n > 0) {\n                tmp = inner(f0,ops[0]->T,0,1); // Slice+copy can be optimized away\n                for (int d=1; d<NDIM; d++) {\n                    tmp = inner(tmp,ops[d]->T,0,1);\n                }\n                result(s0).gaxpy(1.0,tmp,-musign);\n            }\n        }\n\n\n        /// Computes the 2-norm of one of the separated terms\n        double munorm(Level n, const ConvolutionData1D<Q>* ops[]) const {\n            PROFILE_MEMBER_FUNC(SeparatedConvolution);\n            Tensor<Q> f(v2k), f0, ff(v2k);\n\n            double tol = 1e-20;\n\n            f.fillrandom();\n            f.scale(1.0/f.normf());\n            double evalp = 1.0, eval, ratio=99.0;\n            for (int iter=0; iter<100; iter++) {\n                ff.fill(0.0);\n                f0 = copy(f(s0));\n                muopxv(n,ops,f,f0,ff,tol,1.0);\n                f.fill(0.0);\n                f0 = copy(ff(s0));\n                muopxvT(n,ops,ff,f0,f,tol,1.0);\n\n                eval = f.normf();\n                if (eval == 0.0) break;\n                f.scale(1.0/eval);\n                eval = sqrt(eval);\n                ratio = eval/evalp;\n                //std::printf(\"munorm: %d %10.2e %10.2e %10.2e \\n\", iter, eval, evalp, ratio);\n                if (iter>0 && ratio<1.2 && ratio>0.9999) break; // 1.2 was 1.02;  >0.9999 was >=1.0\n                if (iter>10 && eval<tol) break;\n                evalp = eval;\n                if (iter == 99) throw \"munorm failed\";\n            }\n            return eval*ratio;\n        }\n\n\n\n\n\n\n        /// Invoked by result to compute the pointwise product result=left*right\n\n        /// This version requires all three functions have the same distribution.\n        /// Should be straightforward to do an efficient version that does not\n        /// require this but I have not thought about that yet.\n        ///\n        /// Possible non-blocking communication and optional fence.\n        template <typename L, typename R>\n        void mul(const FunctionImpl<L,NDIM>& left, const FunctionImpl<R,NDIM>& right, bool fence) {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n            typedef std::pair< keyT,Tensor<R> > rpairT;\n            typedef std::pair< keyT,Tensor<L> > lpairT;\n            MADNESS_ASSERT(coeffs.get_pmap() == left.coeffs.get_pmap() && \\\n                           coeffs.get_pmap() == right.coeffs.get_pmap());\n            // The three possibilities for the relative position of\n            // the left and right coefficients in the tree are:\n            //\n            // 1.  left==right\n            // 2.  left>right\n            // 3.  left<right\n            //\n            // First loop thru local coeff in left.  Handle right at the same level or above.\n\t    for (typename FunctionImpl<L,NDIM>::dcT::const_iterator it=left.coeffs.begin();\n                it != left.coeffs.end();\n                ++it) {\n                const keyT& key = it->first;\n                const FunctionNode<L,NDIM>& left_node = it->second;\n\n                if (left_node.has_coeff()) {\n                    if (right.coeffs.probe(key)) {\n                        const FunctionNode<R,NDIM>& right_node = right.coeffs.find(key).get()->second;\n                        if (right_node.has_coeff()) {\n                            task(world.rank(), &implT:: template do_mul<L,R>, key, left_node.coeff(),\n                                 rpairT(key,right_node.coeff()));  // Case 1.\n                        }\n                    }\n                    else { // If right node does not exist then it must be further up the tree\n                        const keyT parent = key.parent();\n                        Future<rpairT> arg;\n                        right.task(coeffs.owner(parent), &FunctionImpl<R,NDIM>::sock_it_to_me,\n                                   parent, arg.remote_ref(world), TaskAttributes::hipri());\n                        task(world.rank(), &implT:: template do_mul<L,R>, key, left_node.coeff(), arg); // Case 2.\n                    }\n                }\n                else if (!coeffs.probe(key)) {\n                    // Interior node\n                    coeffs.replace(key,nodeT(tensorT(),true));\n                }\n\n            }\n\n            // Now loop thru local coeff in right and do case 3.\n\t    for (typename FunctionImpl<R,NDIM>::dcT::const_iterator it=right.coeffs.begin();\n                it != right.coeffs.end();\n                ++it) {\n                const keyT& key = it->first;\n                const FunctionNode<R,NDIM>& right_node = it->second;\n                if (right_node.has_coeff()) {\n                    if (!left.coeffs.probe(key)) {\n                        Future<lpairT> arg;\n                        const keyT& parent = key.parent();\n                        left.task(coeffs.owner(parent), &FunctionImpl<L,NDIM>::sock_it_to_me,\n                                  parent, arg.remote_ref(world), TaskAttributes::hipri());\n                        task(world.rank(), &implT:: template do_mul<R,L>, key, right_node.coeff(), arg); // Case 3.\n                    }\n                }\n                else if (!coeffs.probe(key)) {\n                    // Interior node\n                    coeffs.replace(key,nodeT(tensorT(),true));\n                }\n\n            }\n            if (fence) world.gop.fence();\n        }\n\n\n\n        template <typename L, typename R>\n        Void do_mul_sparse2(const keyT& key,\n                            const std::pair< keyT,Tensor<L> >& larg,\n                            const std::pair< keyT,Tensor<R> >& rarg,\n                            const FunctionImpl<R,NDIM>* right) {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n\n            if (rarg.second.size > 0) {\n                if (larg.first == key) {\n                    //madness::print(\"L*R\",key,larg.first,larg.second.size,rarg.first,rarg.second.size);\n                    do_mul(key, larg.second, rarg);\n                }\n                else {\n                    //madness::print(\"R*L\",key,larg.first,larg.second.size,rarg.first,rarg.second.size);\n                    do_mul(key, rarg.second, larg);\n                }\n            }\n            else {\n                coeffs.replace(key, nodeT(tensorT(), true));  // Insert interior node\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    typedef std::pair< keyT,Tensor<R> > rpairT;\n                    Future<rpairT> rarg;\n                    right->task(coeffs.owner(kit.key()), &FunctionImpl<R,NDIM>::sock_it_to_me,\n                                kit.key(), rarg.remote_ref(world), TaskAttributes::hipri());\n\n\n                    task(world.rank(), &implT:: template do_mul_sparse2<L,R>,\n                         kit.key(),larg, rarg, right);\n                }\n            }\n            return None;\n        }\n\n        template <typename L, typename R>\n        Void do_mul_sparse(const Tensor<L>& left_coeff, const FunctionImpl<R,NDIM>* right, double tol,\n                           const keyT& key, double right_norm) {\n            PROFILE_MEMBER_FUNC(FunctionImpl);\n            if (left_coeff.normf()*right_norm > truncate_tol(tol,key)) {\n                typedef std::pair< keyT,Tensor<R> > rpairT;\n                typedef std::pair< keyT,Tensor<L> > lpairT;\n                Future<rpairT> rarg;\n                right->task(coeffs.owner(key), &FunctionImpl<R,NDIM>::sock_it_to_me,\n                            key, rarg.remote_ref(world), TaskAttributes::hipri());\n                task(world.rank(), &implT:: template do_mul_sparse2<L,R>,\n                     key ,lpairT(key,left_coeff), rarg, right);\n            }\n            else {\n                coeffs.replace(key, nodeT(tensorT(cdata.vk), false));  // Result is zero\n            }\n            return None;\n        }\n\n        template <typename L, typename R>\n        void mul_sparse(const FunctionImpl<L,NDIM>& left, const FunctionImpl<R,NDIM>& right, double tol, bool fence) {\n            // Loop thru leaf nodes in left\n\t    for (typename FunctionImpl<L,NDIM>::dcT::const_iterator it=left.coeffs.begin();\n                it != left.coeffs.end();\n                ++it) {\n                const keyT& key = it->first;\n                const FunctionNode<L,NDIM>& left_node = it->second;\n\n                if (left_node.is_leaf()) {\n                    Future<double> rarg = right.task(right.coeffs.owner(key), &implT::get_norm_tree_recursive, key, TaskAttributes::hipri());\n                    task(world.rank(), &implT:: template do_mul_sparse<L,R>, left_node.coeff(), &right, tol, key, rarg);\n                }\n                else {\n                    coeffs.replace(key, nodeT(tensorT(), true));  // Insert interior node\n                }\n            }\n            if (fence) world.gop.fence();\n        }\n\n\n\n\n\n                    // reorder subspace in order of decreasing residual norm\n                    for (int i=0; i<=m; i++) {\n                        for (int j=0; j<i; j++) {\n                            if (rnorms[i] > rnorms[j]) {\n                                swap(rvec[i],rvec[j]);\n                                swap(fvec[i],fvec[j]);\n                                swap(rnorms[i],rnorms[j]);\n\n                                tensorT tmp;\n                                tmp = copy(Q(i,_)); Q(i,_) = Q(j,_); Q(j,_) = tmp;\n                                tmp = copy(Q(_,i)); Q(_,i) = Q(_,j); Q(_,j) = tmp;\n                            }\n                        }\n                    }\n                    print(\"reordered rnorms\", rnorms);\n                    \n                    \n\n\n\n\n                            \n//                             tensorT result(cdata.vk);\n//                             if (axis == 2) {\n//                                 for (int p=0; p<k; p++) {\n//                                     for (int q=0; q<k; q++) {\n//                                         for (int r=0; r<k; r++) {\n//                                             for (int s=0; s<k; s++) {\n//                                                 result(p,q,r) += R(r,s)*c(p,q,s);\n//                                             }\n//                                         }\n//                                     }\n//                                 }\n//                             }\n//                             else if (axis == 1) {\n//                                 for (int p=0; p<k; p++) {\n//                                     for (int q=0; q<k; q++) {\n//                                         for (int r=0; r<k; r++) {\n//                                             for (int s=0; s<k; s++) {\n//                                                 result(p,r,q) += R(r,s)*c(p,s,q);\n//                                             }\n//                                         }\n//                                     }\n//                                 }\n//                             }\n//                             else if (axis == 0) {\n//                                 for (int p=0; p<k; p++) {\n//                                     for (int q=0; q<k; q++) {\n//                                         for (int r=0; r<k; r++) {\n//                                             for (int s=0; s<k; s++) {\n//                                                 result(r,p,q) += R(r,s)*c(s,p,q);\n//                                             }\n//                                         }\n//                                     }\n//                                 }\n//                             }\n\n//                             if ((result - Result).normf() > 1e-10) {\n//                                 print(\"BAD\", key, axis, (result - Result).normf());\n//                             }\n\n\n\n\n\n    /// 1D Gaussian convolution summed over periodic translations\n\n    /// r_periodic(n,l) = sum(R=-maxR,+maxR)[r_nonperiodic(n,l+R*2^n)]\n    template <typename Q>\n    class PeriodicGaussianConvolution1D : public Convolution1D<Q> {\n    public:\n\n        const int k;\n        const int maxR;\n        GaussianConvolution1D<Q> g;\n\n        PeriodicGaussianConvolution1D(int k, int maxR, Q coeff, double expnt, double sign=1.0)\n                : Convolution1D<Q>(k,k,1.0), k(k), maxR(maxR), g(k,coeff,expnt,sign) {}\n\n        virtual ~PeriodicGaussianConvolution1D() {}\n\n        Level natural_level() const {\n            return g.natural_level();\n        }\n\n        Tensor<Q> rnlp(Level n, Translation lx) const {\n            Translation twon = Translation(1)<<n;\n            Tensor<Q> r(2*k);\n            for (int R=-maxR; R<=maxR; R++) {\n                r.gaxpy(1.0, g.get_rnlp(n,R*twon+lx), 1.0);\n            }\n            return r;\n        }\n\n        bool issmall(Level n, Translation lx) const {\n            Translation twon = Translation(1)<<n;\n            for (int R=-maxR; R<=maxR; R++) {\n                if (!g.issmall(n, R*twon+lx)) return false;\n            }\n            return true;\n        }\n    };\n/*\n  This file is part of MADNESS.\n\n  Copyright (C) <2007> <Oak Ridge National Laboratory>\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/world/worldhashmap.h>\n\n\nextern \"C\" double round(double x);\n\n\n/// \\file mra.cc\n/// \\file Declaration and initialization of static data, some implementation, some instantiation\n\nnamespace madness {\n\n    // Definition and initialization of FunctionDefaults static members\n    // It cannot be an instance of FunctionFactory since we want to\n    // set the defaults independent of the data type.\n\n    template <typename T, int NDIM>\n    void FunctionCommonData<T,NDIM>::_make_dc_periodic() {\n        // See ABGV for details\n        r0 = Tensor<double>(k,k);\n        rp = Tensor<double>(k,k);\n        rm = Tensor<double>(k,k);\n\n        double iphase = 1.0;\n        for (int i=0; i<k; i++) {\n            double jphase = 1.0;\n            for (int j=0; j<k; j++) {\n                double gammaij = sqrt(double((2*i+1)*(2*j+1)));\n                double Kij;\n                if (((i-j)>0) && (((i-j)%2)==1))\n                    Kij = 2.0;\n                else\n                    Kij = 0.0;\n\n                r0(i,j) = 0.5*(1.0 - iphase*jphase - 2.0*Kij)*gammaij;\n                rm(i,j) = 0.5*jphase*gammaij;\n                rp(i,j) =-0.5*iphase*gammaij;\n                jphase = -jphase;\n            }\n            iphase = -iphase;\n        }\n\n        // Make the rank-1 forms of rm and rp\n        rm_left = Tensor<double>(k);\n        rm_right = Tensor<double>(k);\n        rp_left = Tensor<double>(k);\n        rp_right = Tensor<double>(k);\n\n        iphase = 1.0;\n        for (int i=0; i<k; i++) {\n            double gamma = sqrt(0.5*(2*i+1));\n            rm_left(i)  = rp_right(i) = gamma;\n            rm_right(i) = rp_left(i)  = gamma*iphase;\n            iphase *= -1.0;\n        }\n        rp_left.scale(-1.0);\n\n//         Tensor<double> rm_test = outer(rm_left,rm_right);\n//         Tensor<double> rp_test = outer(rp_left,rp_right);\n    }\n\n    template <typename T, int NDIM>\n    void FunctionCommonData<T,NDIM>::_init_twoscale() {\n        if (! two_scale_hg(k, &hg)) throw \"failed to get twoscale coefficients\";\n        hgT = transpose(hg);\n        hgsonly = copy(hg(Slice(0,k-1),_));\n    }\n\n    template <typename T, int NDIM>\n    void FunctionCommonData<T,NDIM>::_init_quadrature\n    (int k, int npt, Tensor<double>& quad_x, Tensor<double>& quad_w,\n     Tensor<double>& quad_phi, Tensor<double>& quad_phiw, Tensor<double>& quad_phit) {\n        quad_x = Tensor<double>(npt);\n        quad_w = Tensor<double>(npt);\n        quad_phi = Tensor<double>(npt,k);\n        quad_phiw = Tensor<double>(npt,k);\n\n        gauss_legendre(npt,0.0,1.0,quad_x.ptr(),quad_w.ptr());\n        for (int mu=0; mu<npt; mu++) {\n            double phi[200];\n            legendre_scaling_functions(quad_x(mu),k,phi);\n            for (int j=0; j<k; j++) {\n                quad_phi(mu,j) = phi[j];\n                quad_phiw(mu,j) = quad_w(mu)*phi[j];\n            }\n        }\n        quad_phit = transpose(quad_phi);\n    }\n\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::verify_tree() const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        world.gop.fence();  // Make sure nothing is going on\n\n        // Verify consistency of compression status, existence and size of coefficients,\n        // and has_children() flag.\n        for(typename dcT::const_iterator it=coeffs.begin(); it!=coeffs.end(); ++it) {\n            const keyT& key = it->first;\n            const nodeT& node = it->second;\n            bool bad;\n\n            if (is_compressed()) {\n                if (node.has_children()) {\n                    bad = node.coeff().dim[0] != 2*cdata.k;\n                }\n                else {\n                    bad = node.coeff().size != 0;\n                }\n            }\n            else {\n                if (node.has_children()) {\n                    bad = node.coeff().size != 0;\n                }\n                else {\n                    bad = node.coeff().dim[0] != cdata.k;\n                }\n            }\n\n            if (bad) {\n                print(world.rank(), \"FunctionImpl: verify: INCONSISTENT TREE NODE, key =\", key, \", node =\", node,\n                      \", dim[0] =\",node.coeff().dim[0],\", compressed =\",is_compressed());\n                std::cout.flush();\n                MADNESS_EXCEPTION(\"FunctionImpl: verify: INCONSISTENT TREE NODE\", 0);\n            }\n        }\n\n        // Ensure that parents and children exist appropriately\n        for(typename dcT::const_iterator it=coeffs.begin(); it!=coeffs.end(); ++it) {\n            const keyT& key = it->first;\n            const nodeT& node = it->second;\n\n            if (key.level() > 0) {\n                const keyT parent = key.parent();\n                typename dcT::const_iterator pit = coeffs.find(parent).get();\n                if (pit == coeffs.end()) {\n                    print(world.rank(), \"FunctionImpl: verify: MISSING PARENT\",key,parent);\n                    std::cout.flush();\n                    MADNESS_EXCEPTION(\"FunctionImpl: verify: MISSING PARENT\", 0);\n                }\n                const nodeT& pnode = pit->second;\n                if (!pnode.has_children()) {\n                    print(world.rank(), \"FunctionImpl: verify: PARENT THINKS IT HAS NO CHILDREN\",key,parent);\n                    std::cout.flush();\n                    MADNESS_EXCEPTION(\"FunctionImpl: verify: PARENT THINKS IT HAS NO CHILDREN\", 0);\n                }\n            }\n\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                typename dcT::const_iterator cit = coeffs.find(kit.key()).get();\n                if (cit == coeffs.end()) {\n                    if (node.has_children()) {\n                        print(world.rank(), \"FunctionImpl: verify: MISSING CHILD\",key,kit.key());\n                        std::cout.flush();\n                        MADNESS_EXCEPTION(\"FunctionImpl: verify: MISSING CHILD\", 0);\n                    }\n                }\n                else {\n                    if (! node.has_children()) {\n                        print(world.rank(), \"FunctionImpl: verify: UNEXPECTED CHILD\",key,kit.key());\n                        std::cout.flush();\n                        MADNESS_EXCEPTION(\"FunctionImpl: verify: UNEXPECTED CHILD\", 0);\n                    }\n                }\n            }\n        }\n\n        world.gop.fence();\n    }\n\n    template <typename T, int NDIM>\n    T FunctionImpl<T,NDIM>::eval_cube(Level n, coordT x, const tensorT c) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        const int k = cdata.k;\n        double px[NDIM][k];\n        T sum = T(0.0);\n\n        for (int i=0; i<NDIM; i++) legendre_scaling_functions(x[i],k,px[i]);\n\n        if (NDIM == 1) {\n            for (int p=0; p<k; p++)\n                sum += c(p)*px[0][p];\n        }\n        else if (NDIM == 2) {\n            for (int p=0; p<k; p++)\n                for (int q=0; q<k; q++)\n                    sum += c(p,q)*px[0][p]*px[1][q];\n        }\n        else if (NDIM == 3) {\n            for (int p=0; p<k; p++)\n                for (int q=0; q<k; q++)\n                    for (int r=0; r<k; r++)\n                        sum += c(p,q,r)*px[0][p]*px[1][q]*px[2][r];\n        }\n        else if (NDIM == 4) {\n            for (int p=0; p<k; p++)\n                for (int q=0; q<k; q++)\n                    for (int r=0; r<k; r++)\n                        for (int s=0; s<k; s++)\n                            sum += c(p,q,r,s)*px[0][p]*px[1][q]*px[2][r]*px[3][s];\n        }\n        else if (NDIM == 5) {\n            for (int p=0; p<k; p++)\n                for (int q=0; q<k; q++)\n                    for (int r=0; r<k; r++)\n                        for (int s=0; s<k; s++)\n                            for (int t=0; t<k; t++)\n                                sum += c(p,q,r,s,t)*px[0][p]*px[1][q]*px[2][r]*px[3][s]*px[4][t];\n        }\n        else if (NDIM == 6) {\n            for (int p=0; p<k; p++)\n                for (int q=0; q<k; q++)\n                    for (int r=0; r<k; r++)\n                        for (int s=0; s<k; s++)\n                            for (int t=0; t<k; t++)\n                                for (int u=0; u<k; u++)\n                                    sum += c(p,q,r,s,t,u)*px[0][p]*px[1][q]*px[2][r]*px[3][s]*px[4][t]*px[5][u];\n        }\n        else {\n            MADNESS_EXCEPTION(\"FunctionImpl:eval_cube:NDIM?\",NDIM);\n        }\n        return sum*pow(2.0,0.5*NDIM*n)/sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n    }\n\n    template <typename T, int NDIM>\n    Void FunctionImpl<T,NDIM>::reconstruct_op(const keyT& key, const tensorT& s) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        // Note that after application of an integral operator not all\n        // siblings may be present so it is necessary to check existence\n        // and if absent insert an empty leaf node.\n        //\n        // If summing the result of an integral operator (i.e., from\n        // non-standard form) there will be significant scaling function\n        // coefficients at all levels and possibly difference coefficients\n        // in leaves, hence the tree may refine as a result.\n        typename dcT::iterator it = coeffs.find(key).get();\n        if (it == coeffs.end()) {\n            coeffs.replace(key,nodeT(tensorT(),false));\n            it = coeffs.find(key).get();\n        }\n        nodeT& node = it->second;\n\n        // The integral operator will correctly connect interior nodes\n        // to children but may leave interior nodes without coefficients\n        // ... but they still need to sum down so just give them zeros\n        if (node.has_children() && !node.has_coeff()) {\n            node.set_coeff(tensorT(cdata.v2k));\n        }\n\n        if (node.has_children() || node.has_coeff()) { // Must allow for inconsistent state from transform, etc.\n            tensorT d = node.coeff();\n            if (d.size == 0) d = tensorT(cdata.v2k);\n            if (key.level() > 0) d(cdata.s0) += s; // -- note accumulate for NS summation\n            d = unfilter(d);\n            node.clear_coeff();\n            node.set_has_children(true);\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                const keyT& child = kit.key();\n                tensorT ss = copy(d(child_patch(child)));\n                PROFILE_BLOCK(recon_send);\n                task(coeffs.owner(child), &implT::reconstruct_op, child, ss);\n            }\n        }\n        else {\n            if (key.level()) node.set_coeff(copy(s));\n            else node.set_coeff(s);\n        }\n        return None;\n    }\n\n\n    template <typename T, int NDIM, typename FF>\n    //~ void FunctionImpl<T,NDIM>::fcube(const keyT& key, const FunctionFunctorInterface<T,NDIM>& f, const Tensor<double>& qx, tensorT& fval) const {\n    void FunctionImpl<T,NDIM>::fcube(const keyT& key, const FF& f, const Tensor<double>& qx, tensorT& fval) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        const Vector<Translation,NDIM>& l = key.translation();\n        const Level n = key.level();\n        const double h = std::pow(0.5,double(n));\n        coordT c; // will hold the point in user coordinates\n        const int npt = qx.dim[0];\n\n        const Tensor<double>& cell_width = FunctionDefaults<NDIM>::get_cell_width();\n        const Tensor<double>& cell = FunctionDefaults<NDIM>::get_cell();\n\n        if (NDIM == 1) {\n            for (int i=0; i<npt; i++) {\n                c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                fval(i) = f(c);\n            }\n        }\n        else if (NDIM == 2) {\n            for (int i=0; i<npt; i++) {\n                c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                for (int j=0; j<npt; j++) {\n                    c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                    fval(i,j) = f(c);\n                }\n            }\n        }\n        else if (NDIM == 3) {\n            for (int i=0; i<npt; i++) {\n                c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                for (int j=0; j<npt; j++) {\n                    c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                    for (int k=0; k<npt; k++) {\n                        c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                        fval(i,j,k) = f(c);\n                    }\n                }\n            }\n        }\n        else if (NDIM == 4) {\n            for (int i=0; i<npt; i++) {\n                c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                for (int j=0; j<npt; j++) {\n                    c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                    for (int k=0; k<npt; k++) {\n                        c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                        for (int m=0; m<npt; m++) {\n                            c[3] = cell(3,0) + h*cell_width[3]*(l[3] + qx(m)); // xx\n                            fval(i,j,k,m) = f(c);\n                        }\n                    }\n                }\n            }\n        }\n        else if (NDIM == 5) {\n            for (int i=0; i<npt; i++) {\n                c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                for (int j=0; j<npt; j++) {\n                    c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                    for (int k=0; k<npt; k++) {\n                        c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                        for (int m=0; m<npt; m++) {\n                            c[3] = cell(3,0) + h*cell_width[3]*(l[3] + qx(m)); // xx\n                            for (int n=0; n<npt; n++) {\n                                c[4] = cell(4,0) + h*cell_width[4]*(l[4] + qx(n)); // yy\n                                fval(i,j,k,m,n) = f(c);\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        else if (NDIM == 6) {\n            for (int i=0; i<npt; i++) {\n                c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                for (int j=0; j<npt; j++) {\n                    c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                    for (int k=0; k<npt; k++) {\n                        c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                        for (int m=0; m<npt; m++) {\n                            c[3] = cell(3,0) + h*cell_width[3]*(l[3] + qx(m)); // xx\n                            for (int n=0; n<npt; n++) {\n                                c[4] = cell(4,0) + h*cell_width[4]*(l[4] + qx(n)); // yy\n                                for (int p=0; p<npt; p++) {\n                                    c[5] = cell(5,0) + h*cell_width[5]*(l[5] + qx(p)); // zz\n                                    fval(i,j,k,m,n,p) = f(c);\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        else {\n            MADNESS_EXCEPTION(\"FunctionImpl: fcube: confused about NDIM?\",NDIM);\n        }\n    }\n\n    template <typename T, int NDIM>\n    Void FunctionImpl<T,NDIM>::project_refine_op(const keyT& key, bool do_refine) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        if (do_refine) {\n            // Make in r child scaling function coeffs at level n+1\n            tensorT r(cdata.v2k);\n            for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                const keyT& child = it.key();\n                r(child_patch(child)) = project(child);\n            }\n            // Filter then test difference coeffs at level n\n            tensorT d = filter(r);\n            tensorT s0;\n            if (truncate_on_project) s0 = copy(d(cdata.s0));\n            d(cdata.s0) = T(0);\n\n            if (d.normf()<truncate_tol(thresh,key.level()) || key.level()>=max_refine_level) {\n                if (key.level()>=max_refine_level) print(\"MAX REFINE LEVEL\",key);\n                if (truncate_on_project) {\n                    coeffs.replace(key,nodeT(s0,false));\n                }\n                else {\n                    coeffs.replace(key,nodeT(tensorT(),true)); // Insert empty node for parent\n                    for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                        const keyT& child = it.key();\n                        coeffs.replace(child,nodeT(copy(r(child_patch(child))),false));\n                    }\n                }\n            }\n            else {\n                coeffs.replace(key,nodeT(tensorT(),true)); // Insert empty node for parent\n                for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                    const keyT& child = it.key();\n                    ProcessID p;\n                    if (FunctionDefaults<NDIM>::get_project_randomize()) {\n                        p = world.random_proc();\n                    }\n                    else {\n                        p = coeffs.owner(child);\n                    }\n                    PROFILE_BLOCK(proj_refine_send);\n                    task(p, &implT::project_refine_op, child, do_refine); // ugh\n                }\n            }\n        }\n        else {\n            coeffs.replace(key,nodeT(project(key),false));\n        }\n        return None;\n    }\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::add_scalar_inplace(T t, bool fence) {\n        std::vector<long> v0(NDIM,0L);\n        if (is_compressed()) {\n            if (world.rank() == coeffs.owner(cdata.key0)) {\n                typename dcT::iterator it = coeffs.find(cdata.key0).get();\n                MADNESS_ASSERT(it != coeffs.end());\n                nodeT& node = it->second;\n                MADNESS_ASSERT(node.has_coeff());\n                node.coeff()(v0) += t*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n            }\n        }\n        else {\n            for(typename dcT::iterator it=coeffs.begin(); it!=coeffs.end(); ++it) {\n                Level n = it->first.level();\n                nodeT& node = it->second;\n                if (node.has_coeff()) {\n                    node.coeff()(v0) += t*sqrt(FunctionDefaults<NDIM>::get_cell_volume()*pow(0.5,double(NDIM*n)));\n                }\n            }\n        }\n        if (fence) world.gop.fence();\n    }\n    \n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::insert_zero_down_to_initial_level(const keyT& key) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        if (compressed) initial_level = std::max(initial_level,1); // Otherwise zero function is confused\n        if (coeffs.is_local(key)) {\n            if (compressed) {\n                if (key.level() == initial_level) {\n                    coeffs.replace(key, nodeT(tensorT(), false));\n                }\n                else {\n                    coeffs.replace(key, nodeT(tensorT(cdata.v2k), true));\n                }\n            }\n            else {\n                if (key.level()<initial_level) {\n                    coeffs.replace(key, nodeT(tensorT(), true));\n                }\n                else {\n                    coeffs.replace(key, nodeT(tensorT(cdata.vk), false));\n                }\n            }\n        }\n        if (key.level() < initial_level) {\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                insert_zero_down_to_initial_level(kit.key());\n            }\n        }\n\n    }\n\n\n    template <typename T, int NDIM>\n    Future<bool> FunctionImpl<T,NDIM>::truncate_spawn(const keyT& key, double tol) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        typename dcT::iterator it = coeffs.find(key).get();\n        if (it == coeffs.end()) {\n            // In a standard tree all children would exist but some ops (transform) \n            // can leave the tree in a messy state.  Just make the missing node as an\n            // empty leaf.\n            coeffs.replace(key,nodeT());\n            it = coeffs.find(key).get();\n        }\n        nodeT& node = it->second;\n        if (node.has_children()) {\n            std::vector< Future<bool> > v = future_vector_factory<bool>(1<<NDIM);\n            int i=0;\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n                v[i] = task(coeffs.owner(kit.key()), &implT::truncate_spawn, kit.key(), tol, TaskAttributes::generator());\n            }\n            return task(world.rank(),&implT::truncate_op, key, tol, v);\n        }\n        else {\n            // In compressed form leaves should not have coeffs ... however the\n            // transform op could leave the tree with leaves that do have coeffs\n            // in which case we want something sensible to happen\n            //MADNESS_ASSERT(!node.has_coeff());\n            if (node.has_coeff() && key.level()>1) {\n                double dnorm = node.coeff().normf();\n                if (dnorm < truncate_tol(tol,key)) {\n                    node.clear_coeff();\n                }\n            }\n            return Future<bool>(node.has_coeff());\n        }\n    }\n\n\n    template <typename T, int NDIM>\n    bool FunctionImpl<T,NDIM>::truncate_op(const keyT& key, double tol, const std::vector< Future<bool> >& v) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        // If any child has coefficients, a parent cannot truncate\n        for (int i=0; i<(1<<NDIM); i++) if (v[i].get()) return true;\n        nodeT& node = coeffs.find(key).get()->second;\n\n        // Interior nodes should always have coeffs but transform might\n        // leave empty interior nodes ... hence just force no coeffs to \n        // be zero coeff unless it is a leaf.\n        if (node.has_children() && !node.has_coeff()) node.set_coeff(tensorT(cdata.v2k));\n\n        if (key.level() > 1) { // >1 rather >0 otherwise reconstruct might get confused\n            double dnorm = node.coeff().normf();\n            if (dnorm < truncate_tol(tol,key)) {\n                node.clear_coeff();\n                if (node.has_children()) {\n                    node.set_has_children(false);\n                    for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                        coeffs.erase(kit.key());\n                    }\n                }\n            }\n        }\n        return node.has_coeff();\n    }\n\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::print_tree(Level maxlevel) const {\n        if (world.rank() == 0) do_print_tree(cdata.key0, maxlevel);\n        world.gop.fence();\n        if (world.rank() == 0) std::cout.flush();\n        world.gop.fence();\n    }\n\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::do_print_tree(const keyT& key, Level maxlevel) const {\n        typename dcT::const_iterator it = coeffs.find(key).get();\n        if (it == coeffs.end()) {\n            MADNESS_EXCEPTION(\"FunctionImpl: do_print_tree: null node pointer\",0);\n        }\n        const nodeT& node = it->second;\n        for (int i=0; i<key.level(); i++) std::cout << \"  \";\n        std::cout << key << \"  \" << node << \" --> \" << coeffs.owner(key) << \"\\n\";\n\tfor (int i=0; i<key.level(); i++) std::cout << \"  \";\n\tstd::cout << node.coeff() << \"\\n\";\n        if (key.level() < maxlevel  &&  node.has_children()) {\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                do_print_tree(kit.key(),maxlevel);\n            }\n        }\n    }\n\n    template <typename T, int NDIM>\n    Tensor<T> FunctionImpl<T,NDIM>::project(const keyT& key) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        MADNESS_ASSERT(cdata.npt == cdata.k); // only necessary due to use of fast transform\n        tensorT fval(cdata.vq,false); // this will be the returned result\n        tensorT work(cdata.vk,false); // initially evaluate the function in here\n        tensorT workq(cdata.vq,false); // initially evaluate the function in here\n\n        if (functor) {\n            fcube(key,*functor,cdata.quad_x,work);\n        }\n        else {\n            MADNESS_EXCEPTION(\"FunctionImpl: project: confusion about function?\",0);\n        }\n\n        work.scale(sqrt(FunctionDefaults<NDIM>::get_cell_volume()*pow(0.5,double(NDIM*key.level()))));\n        //return transform(work,cdata.quad_phiw);\n        return fast_transform(work,cdata.quad_phiw,fval,workq);\n    }\n\n    template <typename T, int NDIM>\n    Future<double> FunctionImpl<T,NDIM>::get_norm_tree_recursive(const keyT& key) const {\n        if (coeffs.probe(key)) {\n            return Future<double>(coeffs.find(key).get()->second.get_norm_tree());\n        }\n        MADNESS_ASSERT(key.level());\n        keyT parent = key.parent();\n        return task(coeffs.owner(parent), &implT::get_norm_tree_recursive, parent, TaskAttributes::hipri());\n    }\n\n\n    template <typename T, int NDIM>\n    Void FunctionImpl<T,NDIM>::sock_it_to_me(const keyT& key,\n                                             const RemoteReference< FutureImpl< std::pair<keyT,tensorT> > >& ref) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        if (coeffs.probe(key)) {\n            const nodeT& node = coeffs.find(key).get()->second;\n            Future< std::pair<keyT,tensorT> > result(ref);\n            if (node.has_coeff()) {\n                //madness::print(\"sock found it with coeff\",key);\n                result.set(std::pair<keyT,tensorT>(key,node.coeff()));\n            }\n            else {\n                //madness::print(\"sock found it without coeff\",key);\n                result.set(std::pair<keyT,tensorT>(key,tensorT()));\n            }\n        }\n        else {\n            keyT parent = key.parent();\n            //madness::print(\"sock forwarding to parent\",key,parent);\n            PROFILE_BLOCK(sitome_send);\n            task(coeffs.owner(parent), &FunctionImpl<T,NDIM>::sock_it_to_me, parent, ref, TaskAttributes::hipri());\n        }\n        return None;\n    }\n\n    template <typename T, int NDIM>\n    Void FunctionImpl<T,NDIM>::eval(const Vector<double,NDIM>& xin,\n                                    const keyT& keyin,\n                                    const typename Future<T>::remote_refT& ref) {\n\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        // This is ugly.  We must figure out a clean way to use\n        // owner computes rule from the container.\n        Vector<double,NDIM> x = xin;\n        keyT key = keyin;\n        Vector<Translation,NDIM> l = key.translation();\n        ProcessID me = world.rank();\n        while (1) {\n            ProcessID owner = coeffs.owner(key);\n            if (owner != me) {\n                PROFILE_BLOCK(eval_send);\n                task(owner, &implT::eval, x, key, ref, TaskAttributes::hipri());\n                return None;\n            }\n            else {\n                typename dcT::futureT fut = coeffs.find(key);\n                typename dcT::iterator it = fut.get();\n                nodeT& node = it->second;\n                if (node.has_coeff()) {\n                    Future<T>(ref).set(eval_cube(key.level(), x, node.coeff()));\n                    return None;\n                }\n                else {\n                    for (int i=0; i<NDIM; i++) {\n                        double xi = x[i]*2.0;\n                        int li = int(xi);\n                        if (li == 2) li = 1;\n                        x[i] = xi - li;\n                        l[i] = 2*l[i] + li;\n                    }\n                    key = keyT(key.level()+1,l);\n                }\n            }\n        }\n        //MADNESS_EXCEPTION(\"should not be here\",0);\n    }\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::tnorm(const tensorT& t, double* lo, double* hi) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        // Chosen approach looks stupid but it is more accurate\n        // than the simple approach of summing everything and\n        // subtracting off the low-order stuff to get the high\n        // order (assuming the high-order stuff is small relative\n        // to the low-order)\n        tensorT work = copy(t);\n        tensorT tlo = work(cdata.sh);\n        *lo = tlo.normf();\n        tlo.fill(0.0);\n        *hi = work.normf();\n    }\n\n    namespace detail {\n        template <typename A, typename B>\n        struct noop {\n            void operator()(const A& a, const B& b) const {};\n\n            template <typename Archive> void serialize(Archive& ar) {}\n        };\n\n        template <typename T, int NDIM>\n        struct scaleinplace {\n            T q;\n            scaleinplace() {}\n            scaleinplace(T q) : q(q) {}\n            void operator()(const Key<NDIM>& key, Tensor<T>& t) const {t.scale(q);}\n            template <typename Archive> void serialize(Archive& ar) {ar & q;}\n        };\n\n        template <typename T, int NDIM>\n        struct squareinplace {\n            void operator()(const Key<NDIM>& key, Tensor<T>& t) const {t.emul(t);}\n            template <typename Archive> void serialize(Archive& ar) {}\n        };\n        \n        template <typename T, int NDIM>\n        struct absinplace {\n            void operator()(const Key<NDIM>& key, Tensor<T>& t) const {abs(t);}\n            template <typename Archive> void serialize(Archive& ar) {}\n        };\n     }\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::scale_inplace(const T q, bool fence)\n    {\n        unary_op_coeff_inplace(detail::scaleinplace<T,NDIM>(q), fence);\n    }\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::square_inplace(bool fence) {\n        //unary_op_value_inplace(&implT::autorefine_square_test, detail::squareinplace<T,NDIM>(), fence);\n        unary_op_value_inplace(detail::squareinplace<T,NDIM>(), fence);\n    }\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::phi_for_mul(Level np, Translation lp, Level nc, Translation lc, Tensor<double>& phi) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        double p[200];\n        double scale = pow(2.0,double(np-nc));\n        for (int mu=0; mu<cdata.npt; mu++) {\n            double xmu = scale*(cdata.quad_x(mu)+lc) - lp;\n            MADNESS_ASSERT(xmu>-1e-15 && xmu<(1+1e-15));\n            legendre_scaling_functions(xmu,cdata.k,p);\n            for (int i=0; i<k; i++) phi(i,mu) = p[i];\n        }\n        phi.scale(pow(2.0,0.5*np));\n    }\n\n    template <typename T, int NDIM>\n    const Tensor<T> FunctionImpl<T,NDIM>::parent_to_child(const tensorT& s, const keyT& parent, const keyT& child) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        // An invalid parent/child means that they are out of the box\n        // and it is the responsibility of the caller to worry about that\n        // ... most likely the coefficients (s) are zero to reflect\n        // zero B.C. so returning s makes handling this easy.\n        if (parent == child || parent.is_invalid() || child.is_invalid()) return s;\n\n        tensorT result = fcube_for_mul<T>(child, parent, s);\n        result.scale(sqrt(FunctionDefaults<NDIM>::get_cell_volume()*pow(0.5,double(NDIM*child.level()))));\n        result = transform(result,cdata.quad_phiw);\n\n        return result;\n    }\n\n\n    template <typename T, int NDIM>\n    T FunctionImpl<T,NDIM>::trace_local() const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        std::vector<long> v0(NDIM,0);\n        T sum = 0.0;\n        if (compressed) {\n            if (world.rank() == coeffs.owner(cdata.key0)) {\n                typename dcT::const_iterator it = coeffs.find(cdata.key0).get();\n                if (it != coeffs.end()) {\n                    const nodeT& node = it->second;\n                    if (node.has_coeff()) sum = node.coeff()(v0);\n                }\n            }\n        }\n        else {\n            for(typename dcT::const_iterator it=coeffs.begin(); it!=coeffs.end(); ++it) {\n                const keyT& key = it->first;\n                const nodeT& node = it->second;\n                if (node.has_coeff()) sum += node.coeff()(v0)*pow(0.5,NDIM*key.level()*0.5);\n            }\n        }\n        return sum*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n    }\n\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::diff(const implT& f, int axis, bool fence) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        typedef std::pair<keyT,tensorT> argT;\n        for(typename dcT::const_iterator it=f.coeffs.begin(); it!=f.coeffs.end(); ++it) {\n            const keyT& key = it->first;\n            const nodeT& node = it->second;\n            if (node.has_coeff()) {\n                Future<argT> left = f.find_neighbor(key,axis,-1);\n                argT center(key,node.coeff());\n                Future<argT> right  = f.find_neighbor(key,axis, 1);\n                task(world.rank(), &implT::do_diff1, &f, axis, key, left, center, right);\n            }\n            else {\n                // Internal empty node can be safely inserted\n                coeffs.replace(key,nodeT(tensorT(),true));\n            }\n        }\n        if (fence) world.gop.fence();\n    }\n\n    static bool enforce_bc(int bc_left, int bc_right, Level n, Translation& l) {\n        Translation two2n = 1ul << n;\n        if (l < 0) {\n            if (bc_left == 0) {\n                return false; // Zero BC\n            }\n            else if (bc_left == 1) {\n                l += two2n; // Periodic BC\n            }\n            else {\n                MADNESS_EXCEPTION(\"enforce_bc: confused left BC?\",bc_left);\n            }\n        }\n        else if (l >= two2n) {\n            if (bc_right == 0) {\n                return false; // Zero BC\n            }\n            else if (bc_right == 1) {\n                l -= two2n; // Periodic BC\n            }\n            else {\n                MADNESS_EXCEPTION(\"enforce_bc: confused BC right?\",bc_left);\n            }\n        }\n        return true;\n    }\n\n\n    template <typename T, int NDIM>\n    Key<NDIM> FunctionImpl<T,NDIM>::neighbor(const keyT& key, int axis, int step) const {\n        Vector<Translation,NDIM> l = key.translation();\n\n        l[axis] += step;\n\n        if (!enforce_bc(bc(axis,0), bc(axis,1), key.level(), l[axis])) {\n            return keyT::invalid();\n        }\n        else {\n            return keyT(key.level(),l);\n        }\n    }\n\n    template <typename T, int NDIM>\n    Key<NDIM> FunctionImpl<T,NDIM>::neighbor(const keyT& key, const Key<NDIM>& disp) const {\n        Vector<Translation,NDIM> l = key.translation();\n\n        for (int axis=0; axis<NDIM; axis++) {\n            l[axis] += disp.translation()[axis];\n\n            if (!enforce_bc(bc(axis,0), bc(axis,1), key.level(), l[axis])) {\n                return keyT::invalid();\n            }\n        }\n        return keyT(key.level(),l);\n    }\n\n    template <typename T, int NDIM>\n    Future< std::pair< Key<NDIM>,Tensor<T> > >\n    FunctionImpl<T,NDIM>::find_neighbor(const Key<NDIM>& key, int axis, int step) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        typedef std::pair< Key<NDIM>,Tensor<T> > argT;\n        keyT neigh = neighbor(key, axis, step);\n        if (neigh.is_invalid()) {\n            return Future<argT>(argT(neigh,tensorT(cdata.vk))); // Zero bc\n        }\n        else {\n            Future<argT> result;\n            PROFILE_BLOCK(find_neigh_send);\n            task(coeffs.owner(neigh), &implT::sock_it_to_me, neigh, result.remote_ref(world), TaskAttributes::hipri());\n            return result;\n        }\n    }\n\n    template <typename T, int NDIM>\n    Void FunctionImpl<T,NDIM>::forward_do_diff1(const implT* f, int axis, const keyT& key,\n                                                const std::pair<keyT,tensorT>& left,\n                                                const std::pair<keyT,tensorT>& center,\n                                                const std::pair<keyT,tensorT>& right) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        ProcessID owner = coeffs.owner(key);\n        if (owner == world.rank()) {\n            if (left.second.size == 0) {\n                task(owner, &implT::do_diff1, f, axis, key, f->find_neighbor(key,axis,-1), center, right, TaskAttributes::hipri());\n            }\n            else if (right.second.size == 0) {\n                task(owner, &implT::do_diff1, f, axis, key, left, center, f->find_neighbor(key,axis,1), TaskAttributes::hipri());\n            }\n            else {\n                task(owner, &implT::do_diff2, f, axis, key, left, center, right);\n            }\n        }\n        else {\n            task(owner, &implT::forward_do_diff1, f, axis, key, left, center, right, TaskAttributes::hipri());\n        }\n        return None;\n    }\n\n    template <typename T, int NDIM>\n    Void FunctionImpl<T,NDIM>::do_diff1(const implT* f, int axis, const keyT& key,\n                                        const std::pair<keyT,tensorT>& left,\n                                        const std::pair<keyT,tensorT>& center,\n                                        const std::pair<keyT,tensorT>& right) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        typedef std::pair<keyT,tensorT> argT;\n\n        MADNESS_ASSERT(axis>=0 && axis<NDIM);\n\n        if (left.second.size==0 || right.second.size==0) {\n            // One of the neighbors is below us in the tree ... recur down\n            coeffs.replace(key,nodeT(tensorT(),true));\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                const keyT& child = kit.key();\n                if ((child.translation()[axis]&1) == 0) {\n                    // leftmost child automatically has right sibling\n                    forward_do_diff1(f, axis, child, left, center, center);\n                }\n                else {\n                    // rightmost child automatically has left sibling\n                    forward_do_diff1(f, axis, child, center, center, right);\n                }\n            }\n        }\n        else {\n            forward_do_diff1(f, axis, key, left, center, right);\n        }\n        return None;\n    }\n\n    template <typename T, int NDIM>\n    Void FunctionImpl<T,NDIM>::do_diff2(const implT* f, int axis, const keyT& key,\n                                        const std::pair<keyT,tensorT>& left,\n                                        const std::pair<keyT,tensorT>& center,\n                                        const std::pair<keyT,tensorT>& right) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        typedef std::pair<keyT,tensorT> argT;\n\n        tensorT d = madness::inner(cdata.rp,\n                                   parent_to_child(left.second, left.first, neighbor(key,axis,-1)).swapdim(axis,0),\n                                   1, 0);\n        inner_result(cdata.r0,\n                     parent_to_child(center.second, center.first, key).swapdim(axis,0),\n                     1, 0, d);\n        inner_result(cdata.rm,\n                     parent_to_child(right.second, right.first, neighbor(key,axis,1)).swapdim(axis,0),\n                     1, 0, d);\n        if (axis) d = copy(d.swapdim(axis,0)); // make it contiguous\n        d.scale(FunctionDefaults<NDIM>::get_rcell_width()[axis]*pow(2.0,(double) key.level()));\n        coeffs.replace(key,nodeT(d,false));\n        return None;\n    }\n\n    template <typename T, int NDIM>\n    void FunctionImpl<T,NDIM>::mapdim(const implT& f, const std::vector<long>& map, bool fence) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        for(typename dcT::const_iterator it=f.coeffs.begin(); it!=f.coeffs.end(); ++it) {\n            const keyT& key = it->first;\n            const nodeT& node = it->second;\n\n            Vector<Translation,NDIM> l;\n            for (int i=0; i<NDIM; i++) l[map[i]] = key.translation()[i];\n            tensorT c = node.coeff();\n            if (c.size) c = copy(c.mapdim(map));\n\n            coeffs.replace(keyT(key.level(),l), nodeT(c,node.has_children()));\n        }\n        if (fence) world.gop.fence();\n    }\n\n    template <typename T, int NDIM>\n    Future< Tensor<T> > FunctionImpl<T,NDIM>::compress_spawn(const Key<NDIM>& key, bool nonstandard, bool keepleaves) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        MADNESS_ASSERT(coeffs.probe(key));\n        nodeT& node = coeffs.find(key).get()->second;\n        if (node.has_children()) {\n            std::vector< Future<tensorT> > v = future_vector_factory<tensorT>(1<<NDIM);\n            int i=0;\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n                PROFILE_BLOCK(compress_send);\n                v[i] = task(coeffs.owner(kit.key()), &implT::compress_spawn, kit.key(), nonstandard, keepleaves, TaskAttributes::hipri());\n            }\n            return task(world.rank(),&implT::compress_op, key, v, nonstandard);\n        }\n        else {\n            Future<tensorT> result(node.coeff());\n            if (!keepleaves) node.clear_coeff();\n            return result;\n        }\n    }\n\n    template <typename T, int NDIM>\n    Tensor<T> FunctionImpl<T,NDIM>::eval_plot_cube(const coordT& plotlo,\n                                                   const coordT& plothi,\n                                                   const std::vector<long>& npt) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        Tensor<T> r(NDIM, &npt[0]);\n        //         r(___) = 99.0;\n        MADNESS_ASSERT(!compressed);\n\n        coordT h; // Increment between points in each dimension\n        for (int i=0; i<NDIM; i++) {\n            if (npt[i] > 1) {\n                h[i] = (plothi[i]-plotlo[i])/(npt[i]-1);\n            }\n            else {\n                MADNESS_ASSERT(plotlo[i] == plothi[i]);\n                h[i] = 0.0;\n            }\n        }\n        //print(\"plot info\", plotlo, plothi, npt, h);\n\n        // Loop thru local boxes ... THIS NEEDS MULTITHREADING !!!\n        for(typename dcT::const_iterator it=coeffs.begin(); it!=coeffs.end(); ++it) {\n            const keyT& key = it->first;\n            const nodeT& node = it->second;\n            if (node.has_coeff()) {\n                //print(\"Looking at\", key);\n                // Determine the points, if any, of the plot grid that\n                // are contained within this box\n                coordT boxlo, boxhi;\n                Vector<int,NDIM> boxnpt;\n                double fac = pow(0.5,double(key.level()));\n                int npttotal = 1;\n                for (int d=0; d<NDIM; d++) {\n                    // Coords of box\n                    boxlo[d] = fac*key.translation()[d];\n                    boxhi[d] = boxlo[d]+fac;\n\n                    if (boxlo[d] > plothi[d] || boxhi[d] < plotlo[d]) {\n                        // Discard boxes out of the plot range\n                        npttotal = boxnpt[d] = 0;\n                        //print(\"OO range?\");\n                        break;\n                    }\n                    else if (npt[d] == 1) {\n                        // This dimension is only a single point\n                        boxlo[d] = boxhi[d] = plotlo[d];\n                        boxnpt[d] = 1;\n                    }\n                    else {\n                        // Restrict to plot range\n//                         boxlo[d] = std::max(boxlo[d],plotlo[d]);\n//                         boxhi[d] = std::min(boxhi[d],plothi[d]);\n\n                        // Round lo up to next plot point; round hi down\n                        double xlo = long((boxlo[d]-plotlo[d])/h[d])*h[d] + plotlo[d];\n                        if (xlo < boxlo[d]) xlo += h[d];\n                        boxlo[d] =  xlo;\n                        double xhi = long((boxhi[d]-plotlo[d])/h[d])*h[d] + plotlo[d];\n                        if (xhi > boxhi[d]) xhi -= h[d];\n                        // MADNESS_ASSERT(xhi >= xlo);  // nope\n                        boxhi[d] = xhi;\n                        boxnpt[d] = long(round((boxhi[d] - boxlo[d])/h[d])) + 1;\n                    }\n                    npttotal *= boxnpt[d];\n                }\n                //print(\"    box\", boxlo, boxhi, boxnpt, npttotal);\n                if (npttotal > 0) {\n                    const tensorT& coeff = node.coeff();\n                    const Level n = key.level();\n                    const Vector<Translation,NDIM>& l = key.translation();\n                    const double twon = pow(2.0,double(n));\n                    long ind[NDIM];\n                    coordT x;\n                    for (IndexIterator it(boxnpt); it; ++it) {\n                        for (int d=0; d<NDIM; d++) {\n                            double xd = boxlo[d] + it[d]*h[d]; // Sim. coords of point\n                            x[d] = twon*xd - l[d]; // Offset within box\n                            MADNESS_ASSERT(x[d]>=0.0 && x[d] <=1.0);  // sanity\n                            if (npt[d] > 1) {\n                                ind[d] = long(round((xd-plotlo[d])/h[d])); // Index of plot point\n                            }\n                            else {\n                                ind[d] = 0;\n                            }\n                            MADNESS_ASSERT(ind[d]>=0 && ind[d]<npt[d]); // sanity\n                        }\n                        r(ind) = eval_cube(n, x, coeff);\n                        //print(\"computing\", n, x, ind, r(ind));\n                    }\n                }\n            }\n        }\n\n        //        ITERATOR(r, if (r(IND) == 99.0) {print(\"BAD\", IND); error(\"bad\",0);});\n\n        return r;\n    }\n\n    static void dxprintvalue(FILE* f, const double t) {\n        fprintf(f,\"%.6e\\n\",t);\n    }\n\n    static void dxprintvalue(FILE* f, const double_complex& t) {\n        fprintf(f,\"%.6e %.6e\\n\", t.real(), t.imag());\n    }\n\n    template <typename T, int NDIM>\n    void plotdx(const Function<T,NDIM>& function,\n                const char* filename,\n                const Tensor<double>& cell,\n                const std::vector<long>& npt,\n                bool binary) {\n        PROFILE_FUNC;\n        MADNESS_ASSERT(NDIM<=6);\n        const char* element[6] = {\"lines\",\"quads\",\"cubes\",\"cubes4D\",\"cubes5D\",\"cubes6D\"};\n\n        function.verify();\n        World& world = const_cast< Function<T,NDIM>& >(function).world();\n        FILE *f=0;\n        if (world.rank() == 0) {\n            f = fopen(filename, \"w\");\n            if (!f) MADNESS_EXCEPTION(\"plotdx: failed to open the plot file\", 0);\n\n            fprintf(f,\"object 1 class gridpositions counts \");\n            for (int d=0; d<NDIM; d++) fprintf(f,\" %ld\",npt[d]);\n            fprintf(f,\"\\n\");\n\n            fprintf(f,\"origin \");\n            for (int d=0; d<NDIM; d++) fprintf(f, \" %.6e\", cell(d,0));\n            fprintf(f,\"\\n\");\n\n            for (int d=0; d<NDIM; d++) {\n                fprintf(f,\"delta \");\n                for (int c=0; c<d; c++) fprintf(f, \" 0\");\n                double h = 0.0;\n                if (npt[d]>1) h = (cell(d,1)-cell(d,0))/(npt[d]-1);\n                fprintf(f,\" %.6e\", h);\n                for (int c=d+1; c<NDIM; c++) fprintf(f, \" 0\");\n                fprintf(f,\"\\n\");\n            }\n            fprintf(f,\"\\n\");\n\n            fprintf(f,\"object 2 class gridconnections counts \");\n            for (int d=0; d<NDIM; d++) fprintf(f,\" %ld\",npt[d]);\n            fprintf(f,\"\\n\");\n            fprintf(f, \"attribute \\\"element type\\\" string \\\"%s\\\"\\n\", element[NDIM-1]);\n            fprintf(f, \"attribute \\\"ref\\\" string \\\"positions\\\"\\n\");\n            fprintf(f,\"\\n\");\n\n            int npoint = 1;\n            for (int d=0; d<NDIM; d++) npoint *= npt[d];\n            const char* iscomplex = \"\";\n            if (TensorTypeData<T>::iscomplex) iscomplex = \"category complex\";\n            const char* isbinary = \"\";\n            if (binary) isbinary = \"binary\";\n            fprintf(f,\"object 3 class array type double %s rank 0 items %d %s data follows\\n\",\n                    iscomplex, npoint, isbinary);\n        }\n\n        world.gop.fence();\n        Tensor<T> r = function.eval_cube(cell, npt);\n\n        if (world.rank() == 0) {\n            if (binary) {\n                // This assumes that the values are double precision\n                fflush(f);\n                fwrite((void *) r.ptr(), sizeof(T), r.size, f);\n                fflush(f);\n            }\n            else {\n                for (IndexIterator it(npt); it; ++it) {\n                    //fprintf(f,\"%.6e\\n\",r(*it));\n                    dxprintvalue(f,r(*it));\n                }\n            }\n            fprintf(f,\"\\n\");\n\n            fprintf(f,\"object \\\"%s\\\" class field\\n\",filename);\n            fprintf(f,\"component \\\"positions\\\" value 1\\n\");\n            fprintf(f,\"component \\\"connections\\\" value 2\\n\");\n            fprintf(f,\"component \\\"data\\\" value 3\\n\");\n            fprintf(f,\"\\nend\\n\");\n            fclose(f);\n        }\n        world.gop.fence();\n    }\n\n    template <int NDIM>\n    void FunctionDefaults<NDIM>::set_defaults (World& world) {\n            k = 7;\n            thresh = 1e-5;\n            initial_level = 2;\n            max_refine_level = 30;\n            truncate_mode = 0;\n            refine = true;\n            autorefine = true;\n            debug = false;\n            truncate_on_project = false;\n            apply_randomize = false;\n            project_randomize = false;\n            bc = Tensor<int>(NDIM,2);\n            cell = Tensor<double>(NDIM,2);\n            cell(_,1) = 1.0;\n            recompute_cell_info();\n\n            //pmap = SharedPtr< WorldDCPmapInterface< Key<NDIM> > >(new WorldDCDefaultPmap< Key<NDIM> >(world));\n            pmap = SharedPtr< WorldDCPmapInterface< Key<NDIM> > >(new MyPmap<NDIM>(world));\n            //pmap = SharedPtr< WorldDCPmapInterface< Key<NDIM> > >(new SimpleMap< Key<NDIM> >(world));\n        }\n\n\n    //\n    // Below here we instantiate templates defined in this file\n    //\n\n\n    template <typename T, int NDIM>\n    FunctionCommonData<T,NDIM> FunctionCommonData<T,NDIM>::data[MAXK+1];\n\n    template <int NDIM> int FunctionDefaults<NDIM>::k;\n    template <int NDIM> double FunctionDefaults<NDIM>::thresh;\n    template <int NDIM> int FunctionDefaults<NDIM>::initial_level;\n    template <int NDIM> int FunctionDefaults<NDIM>::max_refine_level;\n    template <int NDIM> int FunctionDefaults<NDIM>::truncate_mode;\n    template <int NDIM> bool FunctionDefaults<NDIM>::refine;\n    template <int NDIM> bool FunctionDefaults<NDIM>::autorefine;\n    template <int NDIM> bool FunctionDefaults<NDIM>::debug;\n    template <int NDIM> bool FunctionDefaults<NDIM>::truncate_on_project;\n    template <int NDIM> bool FunctionDefaults<NDIM>::apply_randomize;\n    template <int NDIM> bool FunctionDefaults<NDIM>::project_randomize;\n    template <int NDIM> Tensor<int> FunctionDefaults<NDIM>::bc;\n    template <int NDIM> Tensor<double> FunctionDefaults<NDIM>::cell;\n    template <int NDIM> Tensor<double> FunctionDefaults<NDIM>::cell_width;\n    template <int NDIM> Tensor<double> FunctionDefaults<NDIM>::rcell_width;\n    template <int NDIM> double FunctionDefaults<NDIM>::cell_volume;\n    template <int NDIM> double FunctionDefaults<NDIM>::cell_min_width;\n    template <int NDIM> SharedPtr< WorldDCPmapInterface< Key<NDIM> > > FunctionDefaults<NDIM>::pmap;\n\n    template <int NDIM> std::vector< Key<NDIM> > Displacements<NDIM>::disp;\n    template <int NDIM> std::vector< Key<NDIM> > Displacements<NDIM>::disp_periodicsum[64];\n\n#ifdef FUNCTION_INSTANTIATE_1\n    template class FunctionDefaults<1>;\n    template class Function<double, 1>;\n    template class Function<std::complex<double>, 1>;\n    template class FunctionImpl<double, 1>;\n    template class FunctionImpl<std::complex<double>, 1>;\n    template class FunctionCommonData<double, 1>;\n    template class FunctionCommonData<double_complex, 1>;\n    template class Displacements<1>;\n\n    template void plotdx<double,1>(const Function<double,1>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,1>(const Function<double_complex,1>&, const char*, const Tensor<double>&,\n                                           const std::vector<long>&, bool binary);\n#endif\n\n#ifdef FUNCTION_INSTANTIATE_2\n    template class FunctionDefaults<2>;\n    template class Function<double, 2>;\n    template class Function<std::complex<double>, 2>;\n    template class FunctionImpl<double, 2>;\n    template class FunctionImpl<std::complex<double>, 2>;\n    template class FunctionCommonData<double, 2>;\n    template class FunctionCommonData<double_complex, 2>;\n    template class Displacements<2>;\n\n    template void plotdx<double,2>(const Function<double,2>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,2>(const Function<double_complex,2>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n#endif\n\n#ifdef FUNCTION_INSTANTIATE_3\n    template class FunctionDefaults<3>;\n    template class Function<double, 3>;\n    template class Function<std::complex<double>, 3>;\n    template class FunctionImpl<double, 3>;\n    template class FunctionImpl<std::complex<double>, 3>;\n    template class FunctionCommonData<double, 3>;\n    template class FunctionCommonData<double_complex, 3>;\n    template class Displacements<3>;\n\n    template void plotdx<double,3>(const Function<double,3>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,3>(const Function<double_complex,3>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n#endif\n\n#ifdef FUNCTION_INSTANTIATE_4\n    template class FunctionDefaults<4>;\n    template class Function<double, 4>;\n    template class Function<std::complex<double>, 4>;\n    template class FunctionImpl<double, 4>;\n    template class FunctionImpl<std::complex<double>, 4>;\n    template class FunctionCommonData<double, 4>;\n    template class FunctionCommonData<double_complex, 4>;\n    template class Displacements<4>;\n\n    template void plotdx<double,4>(const Function<double,4>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,4>(const Function<double_complex,4>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n#endif\n\n#ifdef FUNCTION_INSTANTIATE_5\n    template class FunctionDefaults<5>;\n    template class Function<double, 5>;\n    template class Function<std::complex<double>, 5>;\n    template class FunctionImpl<double, 5>;\n    template class FunctionImpl<std::complex<double>, 5>;\n    template class FunctionCommonData<double, 5>;\n    template class FunctionCommonData<double_complex, 5>;\n    template class Displacements<5>;\n\n    template void plotdx<double,5>(const Function<double,5>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,5>(const Function<double_complex,5>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n#endif\n\n#ifdef FUNCTION_INSTANTIATE_6\n    template class FunctionDefaults<6>;\n    template class Function<double, 6>;\n    template class Function<std::complex<double>, 6>;\n    template class FunctionImpl<double, 6>;\n    template class FunctionImpl<std::complex<double>, 6>;\n    template class FunctionCommonData<double, 6>;\n    template class FunctionCommonData<double_complex, 6>;\n    template class Displacements<6>;\n\n    template void plotdx<double,6>(const Function<double,6>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,6>(const Function<double_complex,6>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n#endif\n\n    template <>\n    ConcurrentHashMap< double, SharedPtr< GaussianConvolution1D<double> > >  GaussianConvolution1DCache<double>::map = ConcurrentHashMap< double, SharedPtr< GaussianConvolution1D<double> > >();\n\n    template <>\n    ConcurrentHashMap< double, SharedPtr< GaussianConvolution1D<double_complex> > > GaussianConvolution1DCache<double_complex>::map = ConcurrentHashMap< double, SharedPtr< GaussianConvolution1D<double_complex> > >();\n}\n\n/// Quietly used as a global lock when looking for bugs with multiple threads\nmadness::Mutex THELOCK;\n\n"
  },
  {
    "path": "src/madness/mra/indexit.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_MRA_INDEXIT_H__INCLUDED\n#define MADNESS_MRA_INDEXIT_H__INCLUDED\n\n/// \\file indexit.h\n/// \\brief Provides IndexIterator\n\n#include <vector>\n#include <madness/world/print.h>\n\nnamespace madness {\n\n    /// Facilitates iteration through a multidimensional index space.\n    /// Since there are multiple ways for navigating index space (column- vs.\n    /// row-major, etc.), this class should be abstract, with an abstract ++\n    /// operator.  The original IndexIterator assumed the highest dimension\n    /// (NDIM-1) would be iterated quickest (this index changes each time ++\n    /// is called), however, sometimes a different order is desired.\n    ///\n    /// For legacy purposes, operator++ is thus NOT abstract, but has the\n    /// implementation of the HighDimIndexIterator defined below.  Eventually,\n    /// the IndexIterator::operator++ should be deprecated, and such\n    /// instances of IndexIterator replaced with HighDimIndexIterator.\n    class IndexIterator {\n    private:\n        /// Bury the default constructor\n        IndexIterator() {}\n\n    protected:\n        std::vector<long> n; ///< User specified upper limits for each dimension\n        std::vector<long> i; ///< Current index\n        bool finished;\n\n    public:\n        /// Iterates dimension d from 0 to limits[d]-1 inclusive\n        template<typename V>\n        IndexIterator(const V& limits) :\n                n(limits.size()), i(limits.size(), 0l), finished(false) {\n            for (unsigned int d = 0; d < n.size(); ++d)\n                n[d] = limits[d];\n        }\n\n        /// Iterates dimension d from 0 to limits[d]-1 inclusive\n        IndexIterator(int ndim, const long limits[]) :\n                n(ndim), i(ndim, 0l), finished(false) {\n            for (unsigned int d = 0; d < n.size(); ++d)\n                n[d] = limits[d];\n        }\n\n        /// Iterates all dimensions from 0 to top-1 inclusive\n        IndexIterator(int ndim, long top) :\n                n(ndim,top), i(ndim, 0l), finished(false) {\n        }\n\n        virtual ~IndexIterator() {}\n\n        IndexIterator&\n        reset() {\n            for (unsigned int d = 0; d < n.size(); ++d)\n                i[d] = 0;\n            finished = false;\n            return *this;\n        }\n\n        long\n        operator[](int d) const {\n            MADNESS_ASSERT(!finished);\n            return i[d];\n        }\n\n        const std::vector<long>&\n        operator*() const {\n            MADNESS_ASSERT(!finished);\n            return i;\n        }\n\n        operator bool() const {\n            return !finished;\n        }\n\n        /// this function should be abstracted and deprecated\n        virtual IndexIterator&\n        operator++() {\n            for (int d = n.size() - 1; d >= 0; --d) {\n                ++(i[d]);\n                if (i[d] < n[d])\n                    return *this;\n                else\n                    i[d] = 0;\n            }\n            finished = true;\n            return *this;\n        }\n\n        /// this function should also be deprecated\n        static void\n        test() {\n            Vector<int, 4> n(3);\n            for (IndexIterator it(n); it; ++it) {\n                print(*it);\n            }\n        }\n    };\n\n    /// The inherited IndexIterator for iterating over the high dimensions\n    /// quickly and the low dimensions slowly (all elements of dimension 0\n    /// at index i will be visited before any element of index i+1 in dim. 0).\n    ///\n    /// This is equivalent to the original implementation of IndexIterator.\n    class HighDimIndexIterator : public IndexIterator {\n    private:\n        /// Bury the default constructor\n        HighDimIndexIterator() : IndexIterator(0, 0l) {}\n\n    public:\n        /// Iterates dimension d from 0 to limts[d]-1 inclusive\n        template<typename V>\n        HighDimIndexIterator(const V& limits) : IndexIterator(limits) {}\n\n        /// Iterates dimension d from 0 to limts[d]-1 inclusive\n        HighDimIndexIterator(int ndim, const long limits[]) :\n                IndexIterator(ndim, limits) {}\n\n        /// Iterates all dimensions from 0 to top-1 inclusive\n        HighDimIndexIterator(int ndim, long top) : IndexIterator(ndim, top) {}\n\n        virtual ~HighDimIndexIterator() {}\n\n        /// increment the highest dimension first and check for overflows\n        /// up through dimension 0\n        virtual IndexIterator&\n        operator++() {\n            for (int d = n.size() - 1; d >= 0; --d) {\n                ++(i[d]);\n                if (i[d] < n[d])\n                    return *this;\n                else\n                    i[d] = 0;\n            }\n            finished = true;\n            return *this;\n        }\n    };\n\n    /// The inherited IndexIterator for iterating over the low dimensions\n    /// quickly and the high dimensions slowly (all elements of dimension\n    /// ndim-1 at index i will be visited before any element of index i+1 in\n    /// dim. ndim-1).\n    class LowDimIndexIterator : public IndexIterator {\n    private:\n        /// Bury the default constructor\n        LowDimIndexIterator() : IndexIterator(0, 0l) {}\n\n    public:\n        /// Iterates dimension d from 0 to limts[d]-1 inclusive\n        template<typename V>\n        LowDimIndexIterator(const V& limits) : IndexIterator(limits) {}\n\n        /// Iterates dimension d from 0 to limts[d]-1 inclusive\n        LowDimIndexIterator(int ndim, const long limits[]) :\n                IndexIterator(ndim, limits) {}\n\n        /// Iterates all dimensions from 0 to top-1 inclusive\n        LowDimIndexIterator(int ndim, long top) : IndexIterator(ndim, top) {}\n\n        virtual ~LowDimIndexIterator() {}\n\n        /// increment the lowest dimension first and check for overflows\n        /// up through dimension 0\n        virtual IndexIterator&\n        operator++() {\n            int ndim = n.size();\n            for (int d = 0; d < ndim; ++d) {\n                ++(i[d]);\n                if (i[d] < n[d])\n                    return *this;\n                else\n                    i[d] = 0;\n            }\n            finished = true;\n            return *this;\n        }\n    };\n\n    /// The inherited IndexIterator for iterating over the dimensions in a\n    /// specified order.\n    ///\n    /// NOTE: if iterating quickly over the high dimensions and slowly over\n    /// the low dimensions (in dimensional order), use HighDimIndexIterator.\n    ///\n    /// NOTE: if iterating quickly over the low dimensions and slowly over\n    /// the high dimensions (in dimensional order), use LowDimIndexIterator.\n    class NonstandardIndexIterator : public IndexIterator {\n    private:\n        /// Bury the default constructor\n        NonstandardIndexIterator() : IndexIterator(0, 0l) {}\n\n    protected:\n        /// the array storing the dimensional order for iteration\n        /// dim[0] is the quickest dimension over which to iterate\n        /// dim[ndim-1] is the slowest dimension\n        std::vector<int> dim;\n\n    public:\n        /// Iterates dimension d from 0 to limts[d]-1 inclusive\n        ///\n        /// order[0] is the dimension to be iterated over quickest\n        /// ...\n        /// order[d-1] is the dimension to be iterated over slowest\n        template<typename V, typename D>\n        NonstandardIndexIterator(const V& limits, const D& order) :\n                IndexIterator(limits), dim(order.size()) {\n            int i, j, ndim = order.size();\n\n            MADNESS_ASSERT(limits.size() == ndim);\n            for(i = 0; i < ndim; ++i) {\n                MADNESS_ASSERT(order[i] >= 0 && order[i] < ndim);\n\n                // make sure we haven't seen this dimension before\n                for(j = 0; j < i; ++j)\n                    MADNESS_ASSERT(order[i] != order[j]);\n\n                dim[i] = order[i];\n            }\n        }\n\n        /// Iterates dimension d from 0 to limts[d]-1 inclusive\n        ///\n        /// order[0] is the dimension to be iterated over quickest\n        /// ...\n        /// order[d-1] is the dimension to be iterated over slowest\n        NonstandardIndexIterator(int ndim, const long limits[],\n                const int order[]) : IndexIterator(ndim, limits) {\n            int i, j;\n\n            for(i = 0; i < ndim; ++i) {\n                MADNESS_ASSERT(order[i] >= 0 && order[i] < ndim);\n\n                // make sure we haven't seen this dimension before\n                for(j = 0; j < i; ++j)\n                    MADNESS_ASSERT(order[i] != order[j]);\n\n                dim[i] = order[i];\n            }\n        }\n\n        /// Iterates all dimensions from 0 to top-1 inclusive\n        ///\n        /// order[0] is the dimension to be iterated over quickest\n        /// ...\n        /// order[d-1] is the dimension to be iterated over slowest\n        template<typename D>\n        NonstandardIndexIterator(int ndim, long top, const D &order) :\n                IndexIterator(ndim, top), dim(order.size()) {\n            int i, j;\n\n            MADNESS_ASSERT(order.size() == ndim);\n            for(i = 0; i < ndim; ++i) {\n                MADNESS_ASSERT(order[i] >= 0 && order[i] < ndim);\n\n                // make sure we haven't seen this dimension before\n                for(j = 0; j < i; ++j)\n                    MADNESS_ASSERT(order[i] != order[j]);\n\n                dim[i] = order[i];\n            }\n        }\n\n        /// Iterates all dimensions from 0 to top-1 inclusive\n        ///\n        /// order[0] is the dimension to be iterated over quickest\n        /// ...\n        /// order[d-1] is the dimension to be iterated over slowest\n        NonstandardIndexIterator(int ndim, long top, const int order[]) :\n                IndexIterator(ndim, top), dim(ndim) {\n            int i, j;\n\n            for(i = 0; i < ndim; ++i) {\n                MADNESS_ASSERT(order[i] >= 0 && order[i] < ndim);\n\n                // make sure we haven't seen this dimension before\n                for(j = 0; j < i; ++j)\n                    MADNESS_ASSERT(order[i] != order[j]);\n\n                dim[i] = order[i];\n            }\n        }\n\n        virtual ~NonstandardIndexIterator() {}\n\n        /// increment the dimensions in the order detailed in dim\n        virtual IndexIterator&\n        operator++() {\n            int ndim = n.size();\n            for (int d = 0; d < ndim; ++d) {\n                ++(i[dim[d]]);\n                if (i[dim[d]] < n[dim[d]])\n                    return *this;\n                else\n                    i[dim[d]] = 0;\n            }\n            finished = true;\n            return *this;\n        }\n    };\n}\n\n#endif // MADNESS_MRA_INDEXIT_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/kernelrange.h",
    "content": "//\n// Created by Eduard Valeyev on 1/3/25.\n//\n\n#ifndef MADNESS_MRA_KERNELRANGE_H__INCLUDED\n#define MADNESS_MRA_KERNELRANGE_H__INCLUDED\n\n#include <madness/world/madness_exception.h>\n#include <madness/world/worldhash.h>\n\n#include <cmath>\n#include <optional>\n\nnamespace madness {\n\n/// Denotes lattice summation over range [-N, N]; N=0 is equivalent to including the simulation cell only\nclass LatticeRange {\n  /// lattice sum over [-N, N]; total # of cells = 2N + 1\n  int N = 0;\npublic:\n  /// constructs [0,0]\n  LatticeRange() = default;\n  /// constructs [-n,n]\n  explicit LatticeRange(int n) {\n    set_range(n);\n  }\n  /// @param lattice_sum if true, constructs [-∞,∞], else constructs [0,0]\n  explicit LatticeRange(bool lattice_sum) {\n    if (lattice_sum) set_infinite();\n  }\n\n  /// @param n the lattice summation range in each direction\n  /// @return reference to this\n  LatticeRange& set_range(int n) {\n    MADNESS_ASSERT(n >= 0);\n    this->N = n;\n    return *this;\n  }\n\n  /// @return the lattice summation range in each direction\n  [[nodiscard]] int get_range() const { return N; }\n\n  /// sets this to [-∞,∞]\n  /// @return reference to this\n  LatticeRange& set_infinite() {\n    N = std::numeric_limits<int>::max();\n    return *this;\n  }\n\n  /// @return true if this is [-∞,∞]\n  [[nodiscard]] bool infinite() const {return N == std::numeric_limits<int>::max();}\n\n  /// @return true if N > 0\n  explicit operator bool() const { return static_cast<bool>(N); }\n};\n\n/// To limit the range of kernel K(x-y) it is multiplied (in user coordinates) by a restrictor function\n/// \\f$ r(N/2 - |x-y|) \\f$, where \\f$ r(x) \\f$ is identity for unrestricted kernel or one of the choices\n/// encoded by KernelRange::Type\nclass KernelRange {\npublic:\n\n  /// types of range restrictor functions\n  enum Type {\n    /// Heavyside (step) function: \\f$ r(x) \\equiv \\theta(x)\\f$\n    Hard,\n    /// erf approximation to Heavyside function: \\f$ r(x) \\equiv \\theta_\\sigma(x) \\equiv (1 + \\erf(x/\\sigma))/2 \\f$;\n    /// in the limit $\\sigma\\to 0$  this becomes the Heaviside function.\n    SoftErf\n  };\n\n  /// restrictor function\n  struct Restrictor {\n    //Restrictor() = default;\n    //Restrictor(Type type) : type_(type) { MADNESS_ASSERT(type == Hard); }\n      Restrictor(Type type = Hard, double sigma=1.0) : type_(type) { // Avoid uninitialized warning on sigma if type is Hard \n      MADNESS_ASSERT(sigma >= 0);\n      // if (sigma == 0)\n      //   MADNESS_ASSERT(type == Hard);\n      // else {\n      //   MADNESS_ASSERT(type != Hard);\n        this->sigma_w_inverse_ = {sigma, 1./sigma};\n      // }\n    }\n\n    Type type() const { return type_; }\n    double sigma() const {\n      MADNESS_ASSERT(sigma_w_inverse_);\n      return sigma_w_inverse_->first;\n    }\n    double sigma_inverse() const {\n      MADNESS_ASSERT(sigma_w_inverse_);\n      return sigma_w_inverse_->second;\n    }\n\n    /// @return value of restrictor function r(x) at x\n    double value(double x) const {\n      auto f = [](double x, double ooσ) {\n        return (1 + std::erf(x * ooσ)) * 0.5;\n      };\n\n      switch (type_) {\n      case Hard:\n        // use regularized step function to ensure that value at x=0 is 1/2\n        return f(x, 1e8);\n      case SoftErf:\n        return f(x, this->sigma_inverse());\n      default:\n        MADNESS_EXCEPTION(\"KernelRange: unknown restrictor type\",1);\n      }\n    }\n\n    /// @return true if \\p r1 and \\p r2 are equal\n    friend bool operator==(const Restrictor& r1, const Restrictor& r2) {\n      return r1.type_ == r2.type_ && (r1.type_ == KernelRange::Type::Hard ||\n                                      (r1.type_ != KernelRange::Type::Hard &&\n                                       r1.sigma() == r2.sigma()));\n    }\n\n    hashT hash() const {\n      hashT result = hash_value((int)type_);\n      if (sigma())\n        hash_combine(result, sigma());\n      return result;\n    }\n\n  private:\n    Type type_ = Hard;\n    std::optional<std::pair<double,double>> sigma_w_inverse_;\n  };\n\n  /// constructs a null (i.e., infinite) kernel range\n  /// @post `this->infinite()==true`\n  KernelRange() = default;\n  /// constructs a finite soft (`sigma > 0`) or hard (`sigma==0`) kernel range\n  /// @param sigma regularization parameter (lengthscale in simulation [0,1] coordinate units) controls the softness of the range restrictor\n  /// @pre `sigma>=0`\n  /// @post `this->soft()==true`\n  KernelRange(unsigned int N, double sigma) {\n    MADNESS_ASSERT(sigma >= 0);\n    if (sigma == 0)\n      data.emplace(N, Restrictor{Hard});\n    else\n      data.emplace(N, Restrictor{SoftErf, sigma});\n  }\n  /// constructs a finite (hard) kernel range\n  /// @post `this->hard()==true`\n  KernelRange(unsigned int N) { data.emplace(N, Restrictor{}); }\n\n  unsigned int N() const { return data.value().N; }\n  Type type() const { return restrictor().type(); }\n  double sigma() const { return restrictor().sigma(); }\n\n  /// @return true if range is limited\n  bool finite() const { return data.has_value(); }\n  /// @return true if range is limited using a hard window function (Heaviside)\n  bool finite_hard() const { return finite() && type() == Hard; }\n  /// @return true if range is limited using a soft window function (sigmoid)\n  bool finite_soft() const { return finite() && type() != Hard; }\n  /// @return true if range is unlimited\n  bool infinite() const { return !finite(); }\n\n  /// @return true if range is limited\n  explicit operator bool() const { return finite(); }\n\n  /// @return true if \\p r1 and \\p r2 are equal\n  friend bool operator==(const KernelRange& r1, const KernelRange& r2) {\n    if (r1.finite() != r2.finite())\n      return false;\n    if (r1.finite())\n      return r1.N() == r2.N() && r1.restrictor() == r2.restrictor();\n    return true;\n  }\n\n  /// @return value of restrictor function at N/2 - abs(r)\n  double value(double r) const {\n    if (infinite())\n      return 1.;\n    else {\n      auto x = N() * 0.5 - std::abs(r);\n      return restrictor().value(x);\n    }\n  }\n\n  hashT hash() const {\n    hashT result = 0;\n    if (!infinite()) {\n      result = hash_value(N());\n      hash_combine(result, restrictor());\n    }\n    return result;\n  }\n\n  static constexpr double extent_default_epsilon = std::numeric_limits<double>::epsilon();\n\n  /// @return max value of `|x-y|` (rounded up, in units of 1/2)\n  /// for which `r(N/2 - |x-y|)` is greater than @p epsilon\n  int iextent_x2(double epsilon = extent_default_epsilon) const {\n    MADNESS_ASSERT(epsilon > 0);\n    if (infinite())\n      return std::numeric_limits<int>::max();\n    else {\n      return data.value().iextent_x2(epsilon);\n    }\n  }\n\nprivate:\n\n  struct Data {\n    unsigned int N;\n    Restrictor restrictor;\n    int iextent_x2_default;  // memoized extent(int_extent_default_epsilon)\n\n    Data(unsigned int n, Restrictor r) : N(n), restrictor(r), iextent_x2_default(compute_iextent_x2(N,restrictor, extent_default_epsilon)) {}\n\n    /// @return max value of `|x-y|` (rounded up, in units of 1/2)\n    /// for which `r(N/2 - |x-y|)` is greater than @p epsilon\n    int iextent_x2(double epsilon) const {\n      if (epsilon == extent_default_epsilon)\n        return iextent_x2_default;\n      else\n        return compute_iextent_x2(N, restrictor, epsilon);\n    }\n\n    /// @return max value of `|x-y|` (rounded up, in units of 1/2)\n    /// for which `r(N/2 - |x-y|)` is greater than @p epsilon\n    static int compute_iextent_x2(int N, const Restrictor& restrictor, double epsilon) {\n      MADNESS_ASSERT(epsilon > 0);\n      switch (restrictor.type()) {\n      case Hard:\n        return N;\n      case SoftErf: {\n        constexpr bool use_newton_solver = false;\n        if (use_newton_solver) {\n          auto f01 = [&, ooσ = 1. / restrictor.sigma(),\n                      oosqrtpiσ =\n                          1. / (sqrt(M_PI) * restrictor.sigma())](double x) {\n            const auto arg = (0.5 * N - x) * ooσ;\n            const auto fx = (1 + std::erf(arg)) * 0.5;\n            const auto dfx = -std::exp(-arg * arg) * oosqrtpiσ;\n            return std::make_pair(fx, dfx);\n          };\n          auto iter = 0;\n          const auto max_iter = 50;\n          auto x = 0.5;\n          auto dx = 1.;\n          double fx = 1.;\n          // step-restricted newton iteration\n          while ((std::abs(dx) > 0.01 || std::abs(fx) > epsilon) &&\n                 iter < max_iter) {\n            double dfx;\n            std::tie(fx, dfx) = f01(x);\n            dx = -(fx - epsilon) / dfx;\n            auto restricted_step = [](const double step,\n                                      const double maxabs_step) {\n              auto sign = [](const auto x) { return x >= 0 ? 1. : -1.; };\n              return std::abs(step) > maxabs_step ? sign(step) * maxabs_step\n                                                  : step;\n            };\n            x += restricted_step(dx, 0.2);\n            ++iter;\n          }\n          return static_cast<int>(ceil(x * 2.));\n        } else {\n          // keep increasing x until f(x) falls below epsilon\n          int x = N;\n          auto value = [&](const double r) {\n            auto x = N * 0.5 - std::abs(r);\n            return restrictor.value(x);\n          };\n          double fx = value(x * 0.5);\n          while (fx >= epsilon) {\n            ++x;\n            fx = value(x * 0.5);\n          }\n          return x;\n        }\n      }\n      default:\n        MADNESS_EXCEPTION(\"KernelRange:: unknown restrictor type\",1);\n      }\n    }\n\n  };  // Data\n\n  std::optional<Data> data;\n  const Restrictor &restrictor() const { return data.value().restrictor; }\n};\n\n}  // madness\n\n#endif // MADNESS_MRA_KERNELRANGE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/key.h",
    "content": "/*\n This file is part of MADNESS.\n\n Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n For more information please contact:\n\n Robert J. Harrison\n Oak Ridge National Laboratory\n One Bethel Valley Road\n P.O. Box 2008, MS-6367\n\n email: harrisonrj@ornl.gov\n tel:   865-241-3937\n fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MRA_KEY_H__INCLUDED\n#define MADNESS_MRA_KEY_H__INCLUDED\n\n/// \\file key.h\n/// \\brief Multidimension Key for MRA tree and associated iterators\n\n#include <madness/mra/bc.h>\n#include <madness/mra/power.h>\n#include <madness/tensor/tensor.h>\n#include <madness/world/vector.h>\n#include <madness/world/binary_fstream_archive.h>\n#include <madness/world/worldhash.h>\n\n#include <algorithm>\n#include <climits>  // CHAR_BIT\n#include <cstdint>\n\nnamespace madness {\n\n    //     // this has problems when nproc is a large-ish power of 2 such as 256\n    //     // and leads to bad data distribution.\n    //     static inline unsigned int sdbm(int n, const unsigned char* c, unsigned int sum=0) {\n    //         for (int i=0; i<n; ++i) sum = c[i] + (sum << 6) + (sum << 16) - sum;\n    //         return sum;\n    //     }\n\n    typedef int64_t Translation;\n    typedef int Level;\n\n    template<std::size_t NDIM>\n    class KeyChildIterator;\n\n    /// Key is the index for a node of the 2^NDIM-tree\n\n    /// See KeyChildIterator for facile generation of children,\n    /// and foreach_child(parent,op) for facile application of operators\n    /// to child keys.\n    template<std::size_t NDIM>\n    class Key {\n    public:\n//        static const typename Vector<Translation,NDIM>::size_type static_size = Vector<Translation,NDIM>::static_size;\n        static const std::size_t static_size = NDIM;\n\n    private:\n        friend class KeyChildIterator<NDIM> ;\n        Level n;\n        Vector<Translation, NDIM> l;\n        hashT hashval;\n\n\n    public:\n\n        /// Default constructor makes an \\em uninitialized key\n        Key() {}\n\n        /// Constructor with given n, l\n        Key(Level n, const Vector<Translation, NDIM>& l) : n(n), l(l) \n\t{\n            MADNESS_ASSERT(n >= 0 && size_t(n) < sizeof(Translation)*CHAR_BIT);\n            rehash();\n        }\n\n        /// Constructor with given n and l=0\n        Key(int n) : n(n), l(0) \n        {\n            MADNESS_ASSERT(n >= 0 && size_t(n) < sizeof(Translation)*CHAR_BIT);\n            rehash();\n        }\n\n        // /// easy constructor ... UGH !!!!!!!!!!!!!!!!!!!!!!\n        // Key(const int n, const int l0, const int l1, const int l2) : n(n) {\n        //     MADNESS_ASSERT(NDIM==3);\n        //     l=Vector<Translation, NDIM>(0);\n        //     l[0]=l0; l[1]=l1; l[2]=l2;\n        //     rehash();\n        // }\n\n        /// Returns an invalid key\n        static Key<NDIM>  invalid() {\n          Key<NDIM> result;\n          result.n = -1;\n          result.l = 0;\n          result.rehash();\n          return result;\n        }\n\n        /// Checks if a key is invalid\n        bool is_invalid() const {\n            return n == -1;\n        }\n\n        /// Checks if a key is valid\n        bool is_valid() const {\n            return n != -1;\n        }\n\n        /// Equality test\n        bool  operator==(const Key& other) const {\n            if (hashval != other.hashval) return false;\n\t    if (n != other.n) return false;\n\t    for (unsigned int i=0; i<NDIM; i++)\n\t      if (l[i] != other.l[i]) return false;\n\t    return true; // everything is equal\n        }\n\n        bool operator!=(const Key& other) const {\n            return !(*this == other);\n        }\n\n        /// Comparison operator less than to enable storage in STL map\n        bool operator<(const Key& other) const {\n\t    if (hashval < other.hashval) return true;\n\t    if (hashval > other.hashval) return false;\n\n\t    if (n < other.n) return true;\n\t    if (n > other.n) return false;\n\t    \n\t    for (unsigned int i=0; i<NDIM; i++) {\n\t      if (l[i] < other.l[i]) return true;\n\t      if (l[i] > other.l[i]) return false;\n\t    }\n\n\t    return false; // everything is equal\n        }\n\n        inline hashT\n        hash() const {\n            return hashval;\n        }\n\n        // template<typename Archive>\n        // inline void\n        // serialize(Archive& ar) {\n        //     ar & archive::wrap((unsigned char*) this, sizeof(*this));\n        // }\n\n        Level\n        level() const {\n            return n;\n        }\n\n        const Vector<Translation, NDIM>&\n        translation() const {\n            return l;\n        }\n\n        /// const accessor to elements of this->translation()\n        const Translation& operator[](std::size_t d) const {\n          return l[d];\n        }\n\n        uint64_t\n        distsq() const {\n            uint64_t dist = 0;\n            for (std::size_t d = 0; d < NDIM; ++d) {\n                dist += l[d] * l[d];\n            }\n            return dist;\n        }\n\n        // The distance of a displacement in real space.\n        double real_distsq(const madness::Tensor<double>& widths) const {\n            double dist = 0;\n            for (std::size_t d = 0; d < NDIM; ++d) {\n                // Subtract 1 to account for the least distance between points in the boxes.\n                const auto least_displacement_distance = std::max(std::abs(l[d]) - 1, static_cast<Translation>(0));\n                const auto real_width = widths(d) * least_displacement_distance;\n                dist += real_width * real_width;\n            }\n            return dist;\n        }\n\n        /// like distsq() but accounts for periodicity\n        uint64_t distsq_bc(const array_of_bools<NDIM>& is_periodic) const {\n          const Translation twonm1 = (Translation(1) << level()) >> 1;\n\n          uint64_t dsq = 0;\n          for (std::size_t d = 0; d < NDIM; ++d) {\n            Translation la = translation()[d];\n            if (is_periodic[d]) {\n              if (la > twonm1) {\n                la -= twonm1 * 2;\n                MADNESS_ASSERT(la <= twonm1);\n              }\n              if (la < -twonm1) {\n                la += twonm1 * 2;\n                MADNESS_ASSERT(la >= -twonm1);\n              }\n            }\n            dsq += la * la;\n          }\n\n          return dsq;\n        }\n\n        /// like real_distsq() but accounts for periodicity\n        double real_distsq_bc(const array_of_bools<NDIM>& is_periodic, const Tensor<double>& widths) const {\n          const Translation twonm1 = (Translation(1) << level()) >> 1;\n\n          double dsq = 0;\n          for (std::size_t d = 0; d < NDIM; ++d) {\n            Translation la = translation()[d];\n            if (is_periodic[d]) {\n              if (la > twonm1) {\n                la -= twonm1 * 2;\n                MADNESS_ASSERT(la <= twonm1);\n              }\n              if (la < -twonm1) {\n                la += twonm1 * 2;\n                MADNESS_ASSERT(la >= -twonm1);\n              }\n            }\n            // Subtract 1 to account for the least distance between points in the boxes.\n            const auto least_displacement_distance = std::max(std::abs(la) - 1, static_cast<Translation>(0));\n            const auto real_width = widths(d) * least_displacement_distance;\n            dsq += real_width * real_width;\n          }\n\n          return dsq;\n        }\n\n        /// like \"periodic\" distsq() but only selects the prescribed axes\n        template <std::size_t NDIM2>\n        std::enable_if_t<NDIM >= NDIM2, uint64_t>\n        distsq_bc(const array_of_bools<NDIM>& is_periodic, const std::array<std::size_t, NDIM2>& axes) const {\n          const Translation twonm1 = (Translation(1) << level()) >> 1;\n\n          uint64_t dsq = 0;\n          for (std::size_t a = 0; a < NDIM2; ++a) {\n            const auto d = axes[a];\n            MADNESS_ASSERT(d < NDIM);\n            Translation la = translation()[d];\n            if (is_periodic[d]) {\n              if (la > twonm1) {\n                la -= twonm1 * 2;\n                MADNESS_ASSERT(la <= twonm1);\n              }\n              if (la < -twonm1) {\n                la += twonm1 * 2;\n                MADNESS_ASSERT(la >= -twonm1);\n              }\n            }\n            dsq += la * la;\n          }\n\n          return dsq;\n        }\n\n        /// Returns the key of the parent\n\n        /// Default is the immediate parent (generation=1).  To get\n        /// the grandparent use generation=2, and similarly for\n        /// great-grandparents.\n        ///\n        /// !! If there is no such parent it quietly returns the\n        /// closest match (which may be self if this is the top of the\n        /// tree).\n        Key\n        parent(int generation = 1) const {\n            Vector<Translation, NDIM> pl;\n            if (generation > n)\n                generation = n;\n            for (std::size_t i = 0; i < NDIM; ++i)\n                pl[i] = l[i] >> generation;\n            return Key(n - generation, pl);\n        }\n\n\n        bool\n        is_child_of(const Key& key) const {\n            if (this->n < key.n) {\n                return false; // I can't be child of something lower on the tree\n            }\n            else if (this->n == key.n) {\n                return (*this == key); // I am child of myself\n            }\n            else {\n                Level dn = this->n - key.n;\n                Key mama = this->parent(dn);\n                return (mama == key);\n            }\n        }\n\n\n        bool\n        is_parent_of(const Key& key) const {\n            return (key.is_child_of(*this));\n        }\n\n        /// Assuming keys are at the same level, returns true if displaced by no more than 1 in any direction\n\n        /// Assumes key and this are at the same level\n        bool\n        is_neighbor_of(const Key& key, const array_of_bools<NDIM>& bperiodic) const {\n          Translation dist = 0;\n          Translation TWON1 = (Translation(1)<<n) - 1;\n        \tfor (std::size_t i=0; i<NDIM; ++i)\n        \t{\n        \t  Translation ll = std::abs(l[i] - key.l[i]);\n        \t  if (bperiodic[i] && ll==TWON1) ll=1;\n        \t  dist = std::max(dist, ll);\n        \t}\n        \treturn (dist <= 1);\n        }\n\n        /// True iff this box is a neighbor of a point in simulation coordinates\n\n        /// Geometrically: this box's closure overlaps the closed box of\n        /// half-width 1 (one box-width at this level) centered on `simpt`.\n        /// Equivalently, the Chebyshev distance from this box to `simpt`\n        /// (measured in box-widths) is at most 1.\n        ///\n        /// This is the point-argument analogue of the key-vs-key overload\n        /// `is_neighbor_of(Key, bperiodic)`; both express \"within one\n        /// box-width\" adjacency. It supersedes the legacy idiom\n        /// `simpt2key(simpt, n).is_neighbor_of(*this, ...)`, which was\n        /// asymmetric for points lying on box boundaries because\n        /// `simpt2key` truncates to a single key. The new test reports\n        /// face-, edge-, and corner-coincident points as contained in\n        /// *every* box that shares the face/edge/corner — and therefore\n        /// every neighbor of those boxes is correctly flagged too.\n        ///\n        /// @param[in] simpt point in simulation coordinates\n        ///                  (in [0,1]^NDIM, modulo 1 in periodic dimensions)\n        /// @param[in] bperiodic per-dimension periodic-boundary flags\n        template <typename T>\n        bool\n        is_neighbor_of(const Vector<T, NDIM>& simpt,\n                       const array_of_bools<NDIM>& bperiodic) const {\n            const double twon = std::ldexp(1.0, n);  // 2^n\n            const double period = twon;              // sim domain has unit length\n            // round-off in d = twon*simpt - l is ~ period * eps; pad by a few\n            // ULPs so points within machine noise of an edge deterministically\n            // count as on it.\n            const double tol = 8.0 * period * std::numeric_limits<double>::epsilon();\n            for (std::size_t i = 0; i < NDIM; ++i) {\n                // signed distance from this box's lower edge, in box-widths\n                double d = twon * static_cast<double>(simpt[i]) - static_cast<double>(l[i]);\n                if (bperiodic[i]) {\n                    // fold to the nearest periodic image: d ∈ [-period/2, period/2)\n                    d -= period * std::floor((d + 0.5 * period) / period);\n                }\n                if (d < -1.0 - tol || d > 2.0 + tol)\n                    return false;\n            }\n            return true;\n        }\n\n        /// given a displacement, generate a neighbor key; ignore boundary conditions and disp's level\n\n        /// @param[in]  disp    the displacement\n        /// @return     a new key\n        Key neighbor(const Key<NDIM>& disp) const {\n            Vector<Translation,NDIM> l = this->translation()+disp.translation();\n            return Key(this->level(),l);\n        }\n\n        /// given a displacement, generate a neighbor key; ignore boundary conditions and disp's level\n\n        /// @param[in]  disp    the displacement\n        /// @return     a new key\n        Key neighbor(const Vector<Translation,NDIM>& disp) const {\n          Vector<Translation,NDIM> l = this->translation()+disp;\n          return Key(this->level(),l);\n        }\n\n\n        /// check if this MultiIndex contains point x, disregarding these two dimensions\n        bool thisKeyContains(const Vector<double,NDIM>& x, const unsigned int& dim0,\n        \t\tconst unsigned int& dim1) const {\n\n        \t// it's sufficient if one single dimension is out\n        \tbool contains=true;\n        \tconst double twotoN = std::pow(2.0,double(n));\n        \tMADNESS_ASSERT(dim0<NDIM and dim1<NDIM);\n\n        \tfor (unsigned int i=0; i<NDIM; i++ ) {\n\n        \t\t// check bounds\n        \t\tMADNESS_ASSERT((x[i]>=0.0) and (x[i]<=1.0));\n\n        \t\t// leave these two dimensions out\n        \t\tif ((i==dim0) or (i==dim1)) continue;\n\n        \t\tconst int ll=int (x[i]*twotoN);\n        \t\tif (not (l[i]==ll)) contains=false;\n        \t}\n        \treturn contains;\n        }\n\n        /// break key into two low-dimensional keys\n        template<std::size_t LDIM, std::size_t KDIM>\n        void break_apart(Key<LDIM>& key1, Key<KDIM>& key2) const {\n\n            // if LDIM==NDIM the 2nd key will be constructed empty\n            // static_assert((LDIM+KDIM==NDIM) or (LDIM==NDIM));\n            Vector<Translation, LDIM> l1;\n            Vector<Translation, KDIM> l2;\n            if constexpr((LDIM+KDIM==NDIM) or (LDIM==NDIM)) {\n                for (size_t i=0; i<LDIM; ++i) {\n                    l1[i]=l[i];\n                }\n                for (size_t i=LDIM; i<NDIM; ++i) {\n                    l2[i-LDIM]=l[i];\n                }\n\n                key1=Key<LDIM>(n,l1);\n                key2=Key<KDIM>(n,l2);\n            } else {\n                MADNESS_EXCEPTION(\"Key::break_apart: LDIM+KDIM must equal NDIM or LDIM==NDIM\",1);\n            }\n        }\n\n        /// extract a new key consisting of first VDIM dimensions of this\n        template<std::size_t VDIM>\n        Key<VDIM> extract_front() const {\n          static_assert(VDIM <= NDIM, \"VDIM must be less than or equal to NDIM\");\n          Vector<Translation, VDIM> t;\n          for (size_t i = 0; i < VDIM; ++i) t[i] = this->translation()[i];\n          return Key<VDIM>(this->level(),t);\n        }\n\n        /// extract a new key consisting of last VDIM dimensions of this\n        template<std::size_t VDIM>\n        Key<VDIM> extract_back() const {\n          static_assert(VDIM <= NDIM, \"VDIM must be less than or equal to NDIM\");\n          Vector<Translation, VDIM> t;\n          for (size_t i = 0; i < VDIM; ++i) t[i] = this->translation()[NDIM-VDIM+i];\n          return Key<VDIM>(this->level(),t);\n        }\n\n        /// extract a new key with the Translations indicated in the v array\n        template<std::size_t VDIM>\n        Key<VDIM> extract_key(const std::array<int,VDIM>& v) const {\n            Vector<Translation, VDIM> t;\n            for (size_t i = 0; i < VDIM; ++i) t[i] = this->translation()[v[i]];\n            return Key<VDIM>(this->level(),t);\n        };\n\n        /// extract a new key with the Translations complementary to the ones indicated in the v array\n        template<std::size_t VDIM>\n        Key<NDIM-VDIM> extract_complement_key(const std::array<int,VDIM>& v) const {\n\n            // return the complement of v, e.g. v={0,1}, v_complement={2,3,4} if NDIM==5\n            // v must be contiguous and ascending (i.e. 1,2,3 or 2,3,4)\n            auto v_complement = [](const std::array<int, VDIM>& v) {\n                std::array<int, NDIM - VDIM> result;\n                for (std::size_t i = 0; i < NDIM - VDIM; i++) result[i] = (v.back() + i + 1) % NDIM;\n                return result;\n            };\n            return extract_key(v_complement(v));\n        };\n\n        /// merge with other key (ie concatenate), use level of rhs, not of this\n        template<std::size_t LDIM>\n        Key<NDIM+LDIM> merge_with(const Key<LDIM>& rhs) const {\n            Vector<Translation,NDIM+LDIM> t;\n            for (size_t i=0; i<NDIM; ++i) t[i]     =this->l[i];\n            for (size_t i=0; i<LDIM; ++i) t[NDIM+i]=rhs.translation()[i];\n            return Key<NDIM+LDIM>(rhs.level(),t);\n        }\n\n        /// return if the other key is pointing in the same direction and is farther out\n\n        /// unlike in distsq() the direction is taken into account, and other must be\n        /// longer than this in each dimension\n        /// @param[in]\tother \ta key\n        /// @return\t\tif other is farther out\n        bool is_farther_out_than(const Key<NDIM>& other) const {\n        \tfor (size_t i=0; i<NDIM; ++i) {\n        \t\tif ((other.translation()[i]>0) and (other.translation()[i]>l[i])) return false;\n        \t\tif ((other.translation()[i]<0) and (other.translation()[i]<l[i])) return false;\n        \t}\n        \treturn true;\n        }\n\n\n        /// Recomputes hashval ... presently only done when reading from external storage\n        void\n        rehash() {\n            //hashval = sdbm(sizeof(n)+sizeof(l), (unsigned char*)(&n));\n            // default hash is still best\n\n\t  hashval = hash_value(l);\n\t  hash_combine(hashval, n);\n        }\n    };\n\n    template<std::size_t NDIM>\n    std::ostream&\n    operator<<(std::ostream& s, const Key<NDIM>& key) {\n        s << \"(\" << key.level() << \",\" << key.translation() << \")\";\n        return s;\n    }\n\n    /// given a source and a target, return the displacement in translation\n\n    /// @param[in]  source  the source key\n    /// @param[in]  target  the target key\n    /// @return     disp    such that target = source + disp\n    template<size_t NDIM>\n    Key<NDIM> displacement(const Key<NDIM>& source, const Key<NDIM>& target) {\n        MADNESS_ASSERT(source.level()==target.level());\n        const Vector<Translation,NDIM> l = target.translation()-source.translation();\n        return Key<NDIM>(source.level(),l);\n    }\n\n\n\n    /// Iterates in lexical order thru all children of a key\n\n    /// Example usage:\n    /// \\code\n    ///    for (KeyChildIterator<NDIM> it(key); it; ++it) print(it.key());\n    /// \\endcode\n    template<std::size_t NDIM>\n    class KeyChildIterator {\n        Key<NDIM> parent;\n        Key<NDIM> child;\n        Vector<Translation, NDIM> p;\n        bool finished;\n\n    public:\n        KeyChildIterator() :\n                p(0), finished(true) {\n        }\n\n        KeyChildIterator(const Key<NDIM>& parent) :\n                parent(parent), child(parent.n + 1, parent.l * 2), p(0),\n                finished(false) {\n        }\n\n        /// Pre-increment of an iterator (i.e., ++it)\n        KeyChildIterator&\n        operator++() {\n            if (finished)\n                return *this;\n            std::size_t i;\n            for (i = 0; i < NDIM; ++i) {\n                if (p[i] == 0) {\n                    ++(p[i]);\n                    ++(child.l[i]);\n                    for (std::size_t j = 0; j < i; ++j) {\n                        --(p[j]);\n                        --(child.l[j]);\n                    }\n                    break;\n                }\n            }\n            finished = (i == NDIM);\n            child.rehash();\n            return *this;\n        }\n\n        /// True if iterator is not at end\n        operator bool() const {\n            return !finished;\n        }\n\n        template<typename Archive>\n        inline void\n        serialize(Archive& ar) {\n            ar & archive::wrap((unsigned char*) this, sizeof(*this));\n        }\n\n        /// Returns the key of the child\n        inline const Key<NDIM>&\n        key() const {\n            return child;\n        }\n    };\n\n    /// Applies op(key) to each child key of parent\n    template<std::size_t NDIM, typename opT>\n    inline void\n    foreach_child(const Key<NDIM>& parent, opT& op) {\n        for (KeyChildIterator<NDIM>\n                it(parent); it; ++it)\n            op(it.key());\n    }\n\n    /// Applies member function of obj to each child key of parent\n    template<std::size_t NDIM, typename objT>\n    inline void\n    foreach_child(const Key<NDIM>& parent, objT* obj, void\n                  (objT::*memfun)(const Key<NDIM>&)) {\n        for (KeyChildIterator<NDIM>\n                it(parent); it; ++it)\n            (obj ->* memfun)(it.key());\n    }\n\n    namespace archive {\n\n        // For efficiency serialize opaque so is just one memcpy, but\n        // when reading from external storage rehash() so that we\n        // can read data even if hash algorithm/function has changed.\n\n        template <class Archive, std::size_t NDIM>\n        struct ArchiveLoadImpl< Archive, Key<NDIM> > {\n            static void load(const Archive& ar, Key<NDIM>& t) {\n                ar & archive::wrap((unsigned char*) &t, sizeof(t));\n            }\n        };\n\n        template <std::size_t NDIM>\n        struct ArchiveLoadImpl< BinaryFstreamInputArchive, Key<NDIM> > {\n            static void load(const BinaryFstreamInputArchive& ar, Key<NDIM>& t) {\n                ar & archive::wrap((unsigned char*) &t, sizeof(t));\n                t.rehash(); // <<<<<<<<<< This is the point\n            }\n        };\n\n        template <class Archive, std::size_t NDIM>\n        struct ArchiveStoreImpl< Archive, Key<NDIM> > {\n            static void store(const Archive& ar, const Key<NDIM>& t) {\n                ar & archive::wrap((unsigned char*) &t, sizeof(t));\n            }\n        };\n    }\n\n}\n\n#endif // MADNESS_MRA_KEY_H__INCLUDED\n\n"
  },
  {
    "path": "src/madness/mra/lbdeux.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_MRA_IBDEUX_H__INCLUDED\n#define MADNESS_MRA_IBDEUX_H__INCLUDED\n\n#include <madness/madness_config.h>\n#include <map>\n#include <queue>\n#include <madness/world/atomicint.h>\n#include <madness/world/worlddc.h>\n\n#include <madness/mra/key.h>\n#include <madness/mra/funcdefaults.h>\n\n/// \\file mra/lbdeux.h\n/// \\brief Implements (2nd generation) static load/data balancing for functions\n/// \\ingroup function\n\nnamespace madness {\n\n\ttemplate<typename T, std::size_t NDIM>\n\tclass FunctionNode;\n\n\ttemplate<typename T, std::size_t NDIM>\n\tclass Function;\n\n    template <std::size_t NDIM>\n    class LBDeuxPmap : public WorldDCPmapInterface< Key<NDIM> > {\n        typedef Key<NDIM> keyT;\n        typedef std::pair<keyT,ProcessID> pairT;\n        typedef std::map<keyT,ProcessID> mapT;\n        mapT map;\n        typedef typename mapT::const_iterator iteratorT;\n\n    public:\n        LBDeuxPmap(const std::vector<pairT>& v) {\n            for (unsigned int i=0; i<v.size(); ++i) {\n                map.insert(v[i]);\n            }\n        }\n\n        // If level 0 is not entered as a node this will\n        // be an infinite loop.\n        ProcessID owner(const keyT& key) const {\n            while (key.level() >= 0) {\n                iteratorT it = map.find(key);\n                if (it == map.end()) {\n                    return owner(key.parent());\n                }\n                else {\n                    return it->second;\n                }\n            }\n            madness::print(\"Mon Dieux!\", key);\n            throw \"LBDeuxPmap: lookup failed\";\n        }\n\n        void print() const {\n            madness::print(\"LBDeuxPmap\");\n        }\n    };\n\n\n\n    template <std::size_t NDIM>\n    class LBNodeDeux {\n        static const int nchild = (1<<NDIM);\n        typedef Key<NDIM> keyT;\n        typedef LBNodeDeux<NDIM> nodeT;\n        typedef WorldContainer<keyT,nodeT> treeT;\n        \n        double child_cost[nchild]; // Removed volatile since all parallel updates will be under mutex from active message and no unprotected reads\n        double my_cost;\n        double total_cost;\n        bool gotkids;\n        \n        AtomicInt nsummed;\n\n        /// Computes index of child key in this node using last bit of translations\n        int index(const keyT& key) {\n            int ind = 0;\n            for (std::size_t d=0; d<NDIM; ++d) ind += ((key.translation()[d])&0x1) << d;\n            return ind;\n        }\n\n    public:\n        LBNodeDeux()\n                : my_cost(0.0), total_cost(0.0), gotkids(false) {\n            nsummed = 0;\n            for (int i=0; i<nchild; ++i)\n                child_cost[i] = 0.0;\n        }\n\n        LBNodeDeux(const LBNodeDeux<NDIM>& other) :\n            my_cost(other.my_cost), total_cost(other.total_cost), gotkids(other.gotkids)\n        {\n            nsummed = other.nsummed;\n            for (int i=0; i<nchild; ++i)\n                child_cost[i] = other.child_cost[i];\n        }\n\n        LBNodeDeux<NDIM>& operator=(const LBNodeDeux<NDIM>& other) {\n            for (int i=0; i<nchild; ++i)\n                child_cost[i] = other.child_cost[i];\n            my_cost = other.my_cost;\n            total_cost = other.total_cost;\n            gotkids = other.gotkids;\n            nsummed = other.nsummed;\n\n            return *this;\n        }\n\n        bool has_children() const {\n            return gotkids;\n        }\n\n        double get_total_cost() const {\n            return total_cost;\n        }\n\n        /// Accumulates cost into this node\n        void add(double cost, bool got_kids) {\n            total_cost = (my_cost += cost);\n            gotkids = gotkids || got_kids;\n        }\n\n        /// Accumulates cost up the tree from children\n        void sum(const treeT& tree, const keyT& child, double value) {\n            child_cost[index(child)] = value;\n            ++nsummed;\n            if (nsummed == nchild) {\n                for (int i=0; i<nchild; ++i) total_cost += child_cost[i];\n                if (child.level() > 1) {\n                    keyT key = child.parent();\n                    keyT parent = key.parent();\n                    const_cast<treeT&>(tree).task(parent, &nodeT::sum, tree, key, double(total_cost));\n                }\n            }\n        }\n\n\n        /// Logically deletes this node by setting cost to -1\n\n        /// Cannot actually erase this node from the container since the send() handler\n        /// is holding an accessor to it.\n        void deleter(const treeT& tree, const keyT& key) {\n            total_cost = my_cost = -1.0;\n            if (has_children()) {\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    const keyT child = kit.key();\n                    const_cast<treeT&>(tree).task(child, &nodeT::deleter, tree, child);\n                }\n            }\n        }\n\n        /// Descends tree deleting all except internal nodes and sub-tree parents\n        void partition(const treeT& tree, const keyT& key, double avg) {\n            if (has_children()) {\n                // Sort children in descending cost order\n                keyT keys[nchild];\n                double vals[nchild];\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    const keyT child = kit.key();\n                    int ind = index(child);\n                    keys[ind] = child;\n                    vals[ind] = child_cost[ind];\n                }\n                for (int i=0; i<nchild; ++i) {\n                    for (int j=i+1; j<nchild; ++j) {\n                        if (vals[i] < vals[j]) {\n                            std::swap(vals[i],vals[j]);\n                            std::swap(keys[i],keys[j]);\n                        }\n                    }\n                }\n\n                // Split off subtrees in decreasing cost order\n                for (int i=0; i<nchild; ++i) {\n                    if (total_cost <= avg) {\n                        const_cast<treeT&>(tree).task(keys[i], &nodeT::deleter, tree, keys[i]);\n                    }\n                    else {\n                        total_cost -= vals[i];\n                        const_cast<treeT&>(tree).task(keys[i], &nodeT::partition, tree, keys[i], avg);\n                    }\n                }\n            }\n        }\n\n        template <typename Archive>\n        void serialize(Archive& ar) {\n            ar & archive::wrap_opaque(this,1);\n        }\n    };\n\n\n    template <std::size_t NDIM>\n    class LoadBalanceDeux {\n        typedef Key<NDIM> keyT;\n        typedef LBNodeDeux<NDIM> nodeT;\n        typedef WorldContainer<keyT,nodeT> treeT;\n        typedef typename treeT::iterator iteratorT;\n        typedef typename treeT::const_iterator const_iteratorT;\n        World& world;\n        treeT tree;\n\n\n        template <typename T, typename costT>\n        struct add_op {\n            LoadBalanceDeux* lb;\n            const costT& costfn;\n            add_op(LoadBalanceDeux* lb, const costT& costfn) : lb(lb), costfn(costfn) {}\n            void operator()(const keyT& key, const FunctionNode<T,NDIM>& node) const {\n \t        if (lb->tree.is_local(key))\n\t\t    lb->tree.send(key, &nodeT::add, costfn(key,node), node.has_children());\n\t\telse\n\t\t    lb->tree.task(key, &nodeT::add, costfn(key,node), node.has_children());\n            }\n        };\n\n        /// Sums costs up the tree returning to everyone the total cost\n        double sum() {\n            world.gop.fence();\n            const_iteratorT end = tree.end();\n            for (const_iteratorT it=tree.begin(); it!=end; ++it) {\n                const keyT& key = it->first;\n                const nodeT& node = it->second;\n                if (!node.has_children() && key.level() > 0) {\n                    tree.task(key.parent(), &nodeT::sum, tree, key, node.get_total_cost());\n                }\n            }\n            world.gop.fence();\n            double total;\n            keyT key0(0);\n            if (world.rank() == tree.owner(key0)) {\n                total = tree.find(key0).get()->second.get_total_cost();\n            }\n            world.gop.broadcast(total, tree.owner(key0));\n            world.gop.fence();\n\n            return total;\n        }\n\n        /// Used to sort results into descending order\n        static bool compare(const std::pair<keyT,double>& a, const std::pair<keyT,double>& b) {\n            return a.second < b.second;\n        }\n\n\n    public:\n        LoadBalanceDeux(World& world)\n                : world(world)\n                , tree(world, FunctionDefaults<NDIM>::get_pmap()) {\n            world.gop.fence();\n        };\n\n        /// Accumulates cost from a function\n        template <typename T, typename costT>\n        void add_tree(const Function<T,NDIM>& f, const costT& costfn, bool fence=false) {\n            const_cast<Function<T,NDIM>&>(f).unaryop_node(add_op<T,costT>(this,costfn), fence);\n        }\n\n        /// Printing for the curious\n        void print_tree(const keyT& key = keyT(0)) {\n            Future<iteratorT> futit = tree.find(key);\n            iteratorT it = futit.get();\n            if (it != tree.end()) {\n                for (int i=0; i<key.level(); ++i) std::cout << \"  \";\n                print(key, it->second.get_total_cost());\n\n                if (it->second.has_children()) {\n                    for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                        print_tree(kit.key());\n                    }\n                }\n            }\n        }\n\n        struct CostPerProc {\n            double cost;\n            int proc;\n            CostPerProc() : cost(0.0), proc(0) {}\n            CostPerProc(double cost, int proc) : cost(cost), proc(proc) {}\n            bool operator<(const CostPerProc& other) const {\n                return cost > other.cost;  // Want ascending order\n            }\n        };\n\n        /// Actually does the partitioning of the tree\n        std::shared_ptr< WorldDCPmapInterface<keyT> > load_balance(double fac = 1.0, bool printstuff=false) {\n            world.gop.fence();\n            // Compute full tree of costs\n            double avg = sum()/(world.size()*fac);\n            //if (world.rank() == 0) print_tree();\n            world.gop.fence();\n\n            // Create partitioning\n            keyT key0(0);\n            if (world.rank() == tree.owner(key0)) {\n                tree.send(key0, &nodeT::partition, tree, key0, avg*1.1);\n            }\n            world.gop.fence();\n\n            // Collect entire vector onto node0\n            std::vector< std::pair<keyT,double> > results;\n            const_iteratorT end = tree.end();\n            for (const_iteratorT it=tree.begin(); it!=end; ++it) {\n                if (it->second.get_total_cost() >= 0) {\n                    results.push_back(std::make_pair(it->first,it->second.get_total_cost()));\n                }\n            }\n            results = world.gop.concat0(results, 128*1024*1024);\n            world.gop.fence();\n\n            std::vector< std::pair<keyT,ProcessID> > map;\n\n            if (world.rank() == 0) {\n\n                std::sort(results.begin(), results.end(), compare);\n                if (printstuff) {\n                    print(\"THESE ARE THE INITIAL SUBTREES\");\n                    for (unsigned int i=0; i<results.size(); ++i) print(i,results[i]);\n                }\n\n                // Now use bin packing to cram the results together\n                map.reserve(results.size());\n\n                // Shove the first nproc entries directly into the queue\n                unsigned int nproc = world.size();\n                std::priority_queue<CostPerProc> costs;\n                for (unsigned int p=0; p<nproc && !results.empty(); ++p) {\n                    const std::pair<keyT,double>& f = results.back();\n                    costs.push(CostPerProc(f.second,p));\n                    map.push_back(std::make_pair(f.first,p));\n                    results.pop_back();\n                }\n\n                // Process the remainder using the sorting maintained by the priority queue\n                while (!results.empty()) {\n                    const std::pair<keyT,double>& f = results.back();\n                    CostPerProc top = costs.top();\n                    costs.pop();\n                    top.cost += f.second;\n                    costs.push(top);\n                    map.push_back(std::make_pair(f.first,top.proc));\n                    results.pop_back();\n                }\n                if (printstuff) {\n                    print(\"THIS IS THE MAP\");\n                    print(map);\n                    print(\"THESE ARE THE COSTS PER PROCESSOR\");\n                    while (!costs.empty()) {\n                        print(costs.top().proc,costs.top().cost);\n                        costs.pop();\n                    }\n                }\n            }\n\n            world.gop.fence();\n            world.gop.broadcast_serializable(map, 0);\n            world.gop.fence();\n\n            // Return the Procmap\n\n            return std::shared_ptr< WorldDCPmapInterface<keyT> >(new LBDeuxPmap<NDIM>(map));\n        }\n    };\n}\n\n\n#endif // MADNESS_MRA_IBDEUX_H__INCLUDED\n\n"
  },
  {
    "path": "src/madness/mra/leafop.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/*\n* Leafop.h\n *\n *  Created on: Apr 12, 2016\n *      Author: kottmanj\n *\n *     Definition of Operators which operate on leaf boxes\n *     includes special operators for cuspy funtions (f12 applications) which enforce deeper refinement on the \"diagonal\" boxes (coordinate r1 == coordinate r2)\n *\n */\n\n#ifndef SRC_MADNESS_MRA_LEAFOP_H_\n#define SRC_MADNESS_MRA_LEAFOP_H_\n\nnamespace madness {\n\n// forward declarations\ntemplate<std::size_t NDIM>\nclass Key;\n\ntemplate<typename T>\nclass GenTensor;\n\ntemplate<typename T, std::size_t NDIM>\nclass SeparatedConvolution;\n\n/// helper structure for the Leaf_op\n/// The class has an operator which decides if a given key belongs to a special box (needs further refinement up to a special level)\n/// this is the default class which always gives back false\ntemplate<typename T, std::size_t NDIM>\nstruct Specialbox_op {\npublic:\n    Specialbox_op() {}\n\n    virtual ~Specialbox_op() {}\n\n    virtual std::string name() const { return \"default special box which only checks for the special points\"; }\n\n    /// the operator which deceides if the given box is special\n    /// @param[in] the key of the current box\n    /// @param[in] the function which will be constructed (if it is needed)\n    /// @param[out] bool which states if the box is special or not\n    virtual bool operator()(const Key<NDIM>& key, const FunctionImpl<T, NDIM> *const f = NULL) const { return false; }\n\n    // check if on of the special points is in the current box (or at low refinement level in a neighbouring box)\n    /// @param[in] the key of the box\n    /// @param[in] the function which will be constructed (if it is needed)\n    bool\n    check_special_points(const Key<NDIM>& key, const FunctionImpl<T, NDIM> *const f) const {\n        const std::vector<Vector<double, NDIM> >& special_points = f->get_special_points();\n        if (special_points.empty()) return false;\n        // level 0 and 1 has only boundary boxes\n        if (key.level() > 1 and box_is_at_boundary(key)) return false;\n        // check for all special points if they are neighbours of the current box\n        BoundaryConditions<NDIM> bc = FunctionDefaults<NDIM>::get_bc();\n        const auto bperiodic = bc.is_periodic();\n        for (size_t i = 0; i < special_points.size(); ++i) {\n            Vector<double, NDIM> simpt;\n            user_to_sim(special_points[i], simpt);\n            if (key.is_neighbor_of(simpt, bperiodic)) return true;\n            else return false;\n        }\n        return false;\n    }\n\n\n    template<typename Archive>\n    void\n    serialize(Archive& ar) {}\n\n    /// Determine if a given box is at the boundary of the simulation box\n    /// @param[in] the key of the current box\n    /// Since boxes of level 0 and 1 are always at the boundary this case should be avoided\n    /// if the boundary conditions are periodic then all boxes are boundary boxes\n    virtual bool box_is_at_boundary(const Key<NDIM>& key) const {\n        // l runs from l=0 to l=2^n-1 for every dimension\n        // if one l is = 2^n or 0 we are at the boundary\n        // note that boxes of level 0 and 1 are always boundary boxes\n        for (size_t i = 0; i < NDIM; i++) {\n            if (key.translation()[i] == 0 or key.translation()[i] == pow(2, key.level()) - 1) {\n                if (FunctionDefaults<NDIM>::get_bc()(i, 0) != BC_PERIODIC)return true;\n            }\n        }\n        return false;\n    }\n\n    // if you want to use milder refinement conditions for special boxes with increasing refinement level\n    // Cuspybox_op needs this\n    size_t get_half_of_special_level(const size_t& sl = FunctionDefaults<NDIM>::get_special_level()) const {\n        size_t ll = sl;\n        if (sl % 2 == 0) ll = sl / 2;\n        else ll = (sl + 1) / 2;\n        return ll;\n    }\n\n};\n\n/// the high_dimensional key is broken appart into two lower dimensional keys, if they are neighbours of each other then refinement\n/// up to the special_level is enforced\n/// For general class description see the base class Specialbox_op\ntemplate<typename T, std::size_t NDIM>\nstruct ElectronCuspyBox_op : public Specialbox_op<T, NDIM> {\npublic:\n    ElectronCuspyBox_op() {}\n\n    ~ElectronCuspyBox_op() {}\n\n    template<typename Archive>\n    void serialize(Archive& ar) {}\n\n    std::string name() const { return \"Cuspybox_op\"; }\n\n    /// Operator which decides if the key belongs to a special box\n    /// The key is broken apart in two lower dimensional keys (for electron cusps this is 6D -> 2x3D)\n    /// if the keys are neighbours then refinement up to the special level is enforced (means the 6D box is close to the cusp or contains it)\n    /// if the refinement level is already beyond half of the special_level then refinement is only enforded if the broken keys are the same (6D box contains cusp)\n    bool operator()(const Key<NDIM>& key, const FunctionImpl<T, NDIM> *const f) const {\n        // do not treat boundary boxes beyond level 2 as special (level 1 and 0 consist only of boundary boxes)\n        if (not(key.level() < 2)) {\n            if (this->box_is_at_boundary(key)) return false;\n        }\n\n        // Cuspybox_op only valid for even dimensions, if uneven dims are needed just make a new class with NDIM+1/2 and NDIM-LDIM\n        if constexpr (NDIM % 2 == 0) {\n          BoundaryConditions<NDIM> bc = FunctionDefaults<NDIM>::get_bc();\n          const auto bperiodic = bc.template is_periodic<NDIM / 2>();\n          Key<NDIM / 2> key1;\n          Key<NDIM / 2> key2;\n          key.break_apart(key1, key2);\n          int ll = this->get_half_of_special_level();\n          if (ll < f->get_initial_level())\n            ll = f->get_initial_level();\n          if (key.level() > ll) {\n            if (key1 == key2)\n              return true;\n            else\n              return false;\n          } else {\n            if (key1.is_neighbor_of(key2, bperiodic))\n              return true;\n            else\n              return false;\n          }\n        }\n        MADNESS_EXCEPTION(\"We should not end up here (check further of cuspy box)\", 1);\n        return false;\n    }\n\n};\n\n/// This works similar to the Cuspybox_op: The key is broken apart (2N-dimensional -> 2x N-Dimensional)\n/// then it is checked if one of the lower dimensional keys contains a lower dimensional special points (which will be the nuclear-coordinates)\ntemplate<typename T, std::size_t NDIM>\nstruct NuclearCuspyBox_op : public Specialbox_op<T, NDIM> {\npublic:\n    NuclearCuspyBox_op() : particle(-1) {\n        // failsafe\n        if (NDIM % 2 != 0) MADNESS_EXCEPTION(\"NuclearCuspyBox works only for even dimensions\", 1);\n    }\n\n    NuclearCuspyBox_op(const size_t p) : particle(p) {\n        // failsafe\n        if (NDIM % 2 != 0) MADNESS_EXCEPTION(\"NuclearCuspyBox works only for even dimensions\", 1);\n        MADNESS_ASSERT(particle == 1 or particle == 2 or particle == 0);\n    }\n\n    ~NuclearCuspyBox_op() {}\n\n    // particle==0: check both particles\n    // particle==1 or particle==2: check only particle1 or 2\n    int particle;\n\n    template<typename Archive>\n    void serialize(Archive& ar) { ar & particle; }\n\n    std::string name() const { return \"Cuspybox_op for nuclear cusps\"; }\n\n    /// Operator which decides if the key belongs to a special box\n    /// The key is broken appart in two lower dimensional keys (6D -> 2x3D)\n    /// The special points should be given in a format which can also be broken appart\n    /// so: 6D special_points = (3D-special-points, 3D-special-points)\n    /// if the refinement level is already beyond half of the special_level then refinement is only enforded if the broken keys are the same (6D box contains cusp)\n    bool operator()(const Key<NDIM>& key, const FunctionImpl<T, NDIM> *const f) const {\n        if (not(key.level() < 2)) {\n            if (this->box_is_at_boundary(key)) return false;\n        }\n        MADNESS_ASSERT(particle == 1 or particle == 2 or particle == 0);\n        if (f == NULL) MADNESS_EXCEPTION(\"NuclearCuspyBox: Pointer to function is NULL\", 1);\n        const std::vector<Vector<double, NDIM> >& special_points = f->get_special_points();\n        if (special_points.empty()) MADNESS_EXCEPTION(\n                \"Demanded NuclearCuspyBox but the special points of the function are empty\", 1);\n\n        // break the special points into 3D points\n        std::vector<Vector<double, NDIM / 2> > lowdim_sp;\n        for (size_t i = 0; i < special_points.size(); i++) {\n            Vector<double, NDIM / 2> lowdim_tmp;\n            for (size_t j = 0; j < NDIM / 2; j++) {\n                lowdim_tmp[j] = special_points[i][j];\n                // check if the formatting is correct\n                if (special_points[i][j] != special_points[i][NDIM / 2 + j]) MADNESS_EXCEPTION(\n                        \"NuclearCuspyBox: Wrong format of special_point: \", 1);\n            }\n            lowdim_sp.push_back(lowdim_tmp);\n        }\n\n        // now break the key appart and check if one if the results is in the neighbourhood of a special point\n        BoundaryConditions<NDIM / 2> bc = FunctionDefaults<NDIM / 2>::get_bc();\n        const auto bperiodic = bc.is_periodic();\n        Key<NDIM / 2> key1;\n        Key<NDIM / 2> key2;\n\n        key.break_apart(key1, key2);\n        for (size_t i = 0; i < lowdim_sp.size(); ++i) {\n            Vector<double, NDIM / 2> simpt;\n            user_to_sim(lowdim_sp[i], simpt);\n            const bool hit1 = key1.is_neighbor_of(simpt, bperiodic);\n            const bool hit2 = key2.is_neighbor_of(simpt, bperiodic);\n            if (particle == 1 and hit1) return true;\n            else if (particle == 2 and hit2) return true;\n            else if (particle == 0 and (hit1 or hit2)) return true;\n            else return false;\n        }\n        return false;\n    }\n\n\n};\n\ntemplate<typename T, std::size_t NDIM, typename opT, typename specialboxT>\nclass Leaf_op {\npublic:\n    /// the function which the operators use (in most cases this function is also the function that will be constructed)\n    const FunctionImpl<T, NDIM> *f;\n    /// the operator which is used for screening (null pointer means no screening)\n    const opT *op;\n    /// special box structure: has an operator which decides if a given key belongs to a special box\n    /// the base class Specialbox_op<T,NDIM> just gives back false for every key\n    /// the derived class Cuspybox_op<T,NDIM> is used for potentials containing cusps at coalescence points of electrons\n    specialboxT specialbox;\n\n    /// pre or post screening (see if this is the general_leaf_op or the leaf_op_other)\n    virtual bool\n    do_pre_screening() const {\n        return false;\n    }\n\n    Leaf_op()\n            : f(NULL), op(NULL), specialbox(specialboxT()) {\n    }\n\n    Leaf_op(const FunctionImpl<T, NDIM> *const tmp)\n            : f(tmp), op(NULL), specialbox(specialboxT()) {\n    }\n\n    Leaf_op(const FunctionImpl<T, NDIM> *const tmp, specialboxT& sb)\n            : f(tmp), op(NULL), specialbox(sb) {\n    }\n\n    Leaf_op(const FunctionImpl<T, NDIM> *const tmp, const opT *const ope, specialboxT& sb)\n            : f(tmp), op(ope), specialbox(sb) {\n    }\n\n    Leaf_op(const Leaf_op& other) : f(other.f), op(other.op), specialbox(other.specialbox) {}\n\n    virtual\n    ~Leaf_op() {\n    }\n\n    virtual std::string\n    name() const {\n        return \"general_leaf_op\";\n    }\n\n    /// make sanity check\n    virtual void\n    sanity() const {\n        if (f == NULL) MADNESS_EXCEPTION((\"Error in \" + name() + \" pointer to function is NULL\").c_str(), 1);\n    }\n\npublic:\n    /// pre-determination\n    /// the decision if the current box  will be a leaf box is made from information of another function\n    /// this is needed for on demand function\n    /// not that the on-demand function that is being constructed is not the function in this class\n    virtual bool\n    pre_screening(const Key<NDIM>& key) const {\n        MADNESS_EXCEPTION(\"pre-screening was called for leaf_op != leaf_op_other\", 1);\n        return false;\n    }\n\n    /// post-determination\n    /// determination if the box will be a leaf box after the coefficients are made\n    /// the function that is being constructed is the function in this class\n    /// the function will use the opartor op in order to screen, if op is a NULL pointer the result is always: false\n    /// @param[in] key: the key to the current box\n    /// @param[in] coeff: Coefficients of the current box\n    virtual bool\n    post_screening(const Key<NDIM>& key, const GenTensor<T>& coeff) const {\n        if (op == NULL) return false;\n        if (key.level() < this->f->get_initial_level()) return false;\n        sanity();\n        const double cnorm = coeff.normf();\n        // const auto bperiodic = bc.is_periodic();\n\n        typedef Key<opT::opdim> opkeyT;\n        const opkeyT source = op->get_source_key(key);\n\n        const double thresh = (this->f->truncate_tol(this->f->get_thresh(), key));\n        const std::vector<opkeyT>& disp = op->get_disp(key.level());\n        const opkeyT& d = *disp.begin();         // use the zero-displacement for screening\n        const double opnorm = op->norm(key.level(), d, source);\n        const double norm = opnorm * cnorm;\n\n        return norm < thresh;\n    }\n\n    /// determines if a node is well represented compared to the parents\n    /// @param[in]  key the FunctionNode which we want to determine if it's a leaf node\n    /// @param[in]  coeff   the coeffs of key\n    /// @param[in]  parent  the coeffs of key's parent node\n    /// @return is the FunctionNode of key a leaf node?\n    bool\n    compare_to_parent(const Key<NDIM>& key, const GenTensor<T>& coeff, const GenTensor<T>& parent) const {\n        if (key.level() < this->f->get_initial_level()) return false;\n        //this->sanity();\n        if (parent.has_no_data()) return false;\n        if (key.level() < this->f->get_initial_level()) return false;\n        GenTensor<T> upsampled = this->f->upsample(key, parent);\n        upsampled.scale(-1.0);\n        upsampled += coeff;\n        const double dnorm = upsampled.normf();\n        const bool is_leaf = (dnorm < this->f->truncate_tol(this->f->get_thresh(), key.level()));\n        return is_leaf;\n    }\n\n    /// check if the box is a special box\n    /// first check: Is one of the special points defined in the function f in the current box or a neighbour box\n    /// second check: Is the box special according to the specialbox operator (see class description of Specialbox_op)\n    /// @param[in] the key of the box\n    bool\n    special_refinement_needed(const Key<NDIM>& key) const {\n        if (key.level() > f->get_special_level()) return false;\n        else if (specialbox.check_special_points(key, f)) return true;\n        else if (specialbox(key, f)) return true;\n        else return false;\n    }\n\n    template<typename Archive>\n    void\n    serialize(Archive& ar) {\n        ar & this->f & this->specialbox;\n    }\n\n};\n\n/// leaf_op for construction of an on-demand function\n/// the function in the class is the function which defines the structure of the on-demand function\n/// means: The tree of the function which is to construct will mirror the tree-structure of the function in this class (function variable defined in base-class)\ntemplate<typename T, std::size_t NDIM>\nclass Leaf_op_other : public Leaf_op<T, NDIM, SeparatedConvolution<double, NDIM>, Specialbox_op<T, NDIM> > {\n    std::string\n    name() const {\n        return \"leaf_op_other\";\n    }\n    /// we only need the pre-determination based on the already constructed function f\n    /// if f at box(key) is a leaf then return true\npublic:\n    bool\n    do_pre_screening() const {\n        return true;\n    }\n\n    Leaf_op_other() : Leaf_op<T, NDIM, SeparatedConvolution<double, NDIM>, Specialbox_op<T, NDIM> >() {\n    }\n\n    Leaf_op_other(const FunctionImpl<T, NDIM> *const f_) {\n        this->f = f_;\n    }\n\n    Leaf_op_other(const Leaf_op_other& other)\n            : Leaf_op<T, NDIM, SeparatedConvolution<double, NDIM>, Specialbox_op<T, NDIM> >(other.f) {}\n\n    bool\n    pre_screening(const Key<NDIM>& key) const {\n        MADNESS_ASSERT(this->f->get_coeffs().is_local(key));\n        return (not this->f->get_coeffs().find(key).get()->second.has_children());\n    }\n\n    void sanity() const {\n        if (this->f == 0) MADNESS_EXCEPTION(\"Leaf_op_other: f is NULL pointer\", 1);\n        if (this->op != 0) MADNESS_EXCEPTION(\"Leaf_op_other: Screening operator was set\", 1);\n    }\n\n    /// this should never be called for this leaf_op since the function in this class as already constructed\n    bool\n    post_screening(const Key<NDIM>& key, const GenTensor<T>& G) const {\n        MADNESS_EXCEPTION(\"post-determination was called for leaf_op_other\", 1);\n        return false;\n    }\n\n    /// this should never be called for this leaf_op since the function in this class as already constructed\n    bool\n    compare_to_parent(const Key<NDIM>& key, const GenTensor<T>& a, const GenTensor<T>& b) const {\n        MADNESS_EXCEPTION(\"compare-to-parent was called for leaf_op_other\", 1);\n        return false;\n    }\n\n    /// this should never be called for this leaf_op since the function in this class as already constructed\n    bool\n    special_refinement_needed(const Key<NDIM>& key) const {\n        MADNESS_EXCEPTION(\"special_refinement_needed was called for leaf_op_other\", 1);\n        return false;\n    }\n\n    template<typename Archive>\n    void\n    serialize(Archive& ar) {\n        ar & this->f;\n    }\n\n};\n\n} /* namespace madness */\n\n#endif /* SRC_MADNESS_MRA_LEAFOP_H_ */\n"
  },
  {
    "path": "src/madness/mra/legendre.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <iostream>\nusing std::cout;\nusing std::endl;\n\n#include <cmath>\n#include <madness/mra/legendre.h>\n#include <madness/tensor/tensor.h>\n\n/// \\file legendre.cc\n/// \\brief Legendre quadrature, polynomials and scaling functions.\n\n// static void pn(int n, double x, double *p) {\n// // old slow but simple recursion for polynomials\n//   p[0] = 1;\n//   if (n == 0) return;\n//   p[1] = x;\n//   for (int i=0; i<n; ++i) {\n//     p[i+1] = i*(x*p[i] - p[i-1])/(i+1) + x*p[i];\n//   }\n// }\n\n\nnamespace madness {\n\n\n    static double nn1[100]; // nn1[n] = n/(n+1)\n    static double phi_norms[100];\n\n    /// Call this single threaded to initialize static data (used read only by multiple threads)\n    void initialize_legendre_stuff() {\n        long n;\n        for (n=0; n<100; ++n) nn1[n] = n/((double)(n+1));\n        for (n=0; n<100; ++n) phi_norms[n] = sqrt(2.0*n+1.0);\n    }\n\n    /// Evaluate the Legendre polynomials up to the given order at x in [-1,1].\n\n    /// p should be an array of order+1 elements.\n    void legendre_polynomials(double x, long order, double *p) {\n\n        long n;\n\n        p[0] = 1.0;\n        if (order == 0) return;\n\n        p[1] = x;\n        for (n=1; n<order; ++n)\n            p[n+1] = (x*p[n] - p[n-1])*nn1[n] + x*p[n];\n    }\n\n    /// Evaluate the first k Legendre scaling functions.\n\n    /// p should be an array of k elements.\n    void legendre_scaling_functions(double x, long k, double *p) {\n        legendre_polynomials(2.*x-1,k-1,p);\n        long n;\n        for (n=0; n<k; ++n) {\n            p[n] = p[n]*phi_norms[n];\n        }\n    }\n\n    static bool data_is_read = false;\n    static const int max_npt = 64;\n\n    static const char *filename = \"gaussleg\";   // Is overridden by\n    // These are the points and weights on [-1,1]\n    static Tensor<double> points[max_npt+1];\n    static Tensor<double> weights[max_npt+1];\n\n    /// read_data loads the precomputed Gauss-Legendre data\n    static bool read_data() {\n        if (data_is_read) return true;\n        FILE *f = fopen(filename,\"r\");\n        if (!f) {\n            cout << \"legendre: read_data: could not find file \" << filename << endl;\n            return false;\n        }\n        for (int npt=0; npt<=max_npt; ++npt) {\n            points[npt] = Tensor<double>(npt);\n            weights[npt] = Tensor<double>(npt);\n\n            int nnpt;\n            if (fscanf(f,\"%d\",&nnpt) != 1) {\n                cout << \"legendre: read_data: failed reading \" << npt << endl;\n                fclose(f);\n                return false;\n            }\n            if (nnpt != npt) {\n                cout << \"legendre: read_data: npt did not match \" << npt << endl;\n                fclose(f);\n                return false;\n            }\n            for (int i=0; i<npt; ++i) {\n                int ii;\n                if (fscanf(f,\"%d %lf %lf\",&ii,&points[npt][i],&weights[npt][i]) != 3) {\n                    cout << \"legendre: read_data: failed reading data \" << npt << \" \" << i << endl;\n                    fclose(f);\n                    return false;\n                }\n            }\n        }\n        fclose(f);\n        data_is_read = true;\n        return true;\n    }\n\n    /// Collective routine to pre-load and cache the quadrature points and weights\n\n    /// Only process rank 0 will access the file.\n    void load_quadrature(World& world, const char* dir) {\n        if (data_is_read) return;\n        if (world.rank() == 0) {\n            char buf[32768];\n            buf[0] = 0;\n            strcat(buf,dir);\n            strcat(buf,\"/\");\n            strcat(buf,filename);\n            filename = strdup(buf);\n            if (!read_data()) throw \"load_quadrature: failed reading quadrature coefficients\";\n        }\n        else {\n            for (int npt=0; npt<=max_npt; ++npt) {\n                points[npt] = Tensor<double>(npt);\n                weights[npt] = Tensor<double>(npt);\n            }\n        }\n        for (int npt=1; npt<=max_npt; ++npt) {\n            world.gop.broadcast(points[npt].ptr(), npt, 0);\n            if (world.rank() == 99999999) world.gop.fence(); // Work aroung g++ 4.2.* bug on x86-64\n            world.gop.broadcast(weights[npt].ptr(), npt, 0);\n            if (world.rank() == 99999999) world.gop.fence(); // Work aroung g++ 4.2.* bug on x86-64\n        }\n        data_is_read = true;\n    }\n\n    /// Compute the Gauss-Legendre quadrature points and weights\n\n    /// Return in x and w, which should be arrays of n elements, the\n    /// points and weights for the n-point Gauss Legendre quadrature rule\n    /// in [xlo,xhi].\n    ///\n    /// !!!! This routine delivers accurate points, but some weights are accurate\n    /// only to about 1e-13 for higher order rules.  Need a more intelligent way\n    /// to compute them.  See internal comments for more info.\n    bool gauss_legendre_numeric(int n, double xlo, double xhi, double *x, double *w) {\n\n        throw \"gauss_legendre_numeric: why are we in here?\";\n\n#if 0\n        double midpoint = (xhi + xlo)*0.5;\n        double scale    = (xhi - xlo)*0.5;\n        double acc = 1e-16;\n        double p[100];\n\n        double pi = atan(1.0)*4.0;\n\n        // References made to the equation numbers in Davis & Rabinowitz 2nd ed.\n        for (int k=0; k<n; ++k) {\n            // Initial guess for the root using 2.7.3.3b\n            // x = (1.0 - 1.0/(8*n*n) + 1.0/(8*n*n*n))*cos(((4*k+3.0)/(4*n+2))*pi)\n            double r = (1.0 - 1.0/(8.0*n*n) + 1.0/(8.0*n*n*n))*cos(((4*k+3.0)/(4*n+2))*pi);\n            // Refine the initial guess using a 3rd-order Newton correction 2.7.3.9\n            for (int iter=0; iter<3; ++iter) {\n                legendre_polynomials(r,n,p);\n                double p0 = p[n];\t\t// Value\n                double p1 = n*(p[n-1] - r*p[n])/(1.0-r*r); // First derivative ... 2.7.3.5\n                double p2 = (2*r*p1 - n*(n+1)*p0)/(1-r*r); // Second derivative\n                double delta = - (p0/p1)*(1 + (p0*p2)/(2*p1*p1));\n                r += delta;\n                if (std::abs(delta) < acc) break;\n                if (iter >= 2) return false;\n            }\n            legendre_polynomials(r,n,p);\n\n            // This expression seems to have some cancellation of\n            // significant digits for higher n.  Probably in the\n            // 1-r*r for r close to 1 ... (1-r)*(1+r) gives us just\n            // one more bit.  There are other expressions ...\n            w[k] = 2.0*(1.0-r)*(1.0+r)/(n*n*p[n-1]*p[n-1]);\n            x[k] = r;\n        }\n\n        for (int i=0; i<n; ++i) {\n            x[i] = x[i]*scale + midpoint;\n            w[i] = w[i]*scale;\n        }\n#endif\n\n        return true;\n    }\n\n    /// Return precomputed (most accurate) or if not available computed\n    /// (not quite as accurate) points and weights for Gauss Legendre\n    /// quadrature rule on the specified interval.\n    bool gauss_legendre(int n, double xlo, double xhi, double *x, double *w) {\n        if (!read_data())\n            return false;\n\n        if (n < 1)\n            return false;\n\n        if (n > max_npt)\n            return gauss_legendre_numeric(n, xlo, xhi, x, w);\n\n        // Cached are the points and weights for the interval [0,1]\n\n        // int(f(x),x=xlo..xhi) = int(f(x(z)),z=0..1)*(xhi-xlo)\n        // z = (x-xlo)/(xhi-xlo)  ->  x = xlo + z*(xhi-xlo)\n\n        double range = xhi - xlo;\n        for (int i=0; i<n; ++i) {\n            x[i] = xlo + points[n][i] * range;\n            w[i] = weights[n][i] * range;\n        }\n\n        return true;\n    }\n\n    static double testf(int n, double x) {\n        /// test function for gauss_legendre_test\n        double sum = 0.0;\n        double xn = 1.0;\n        for (int i=0; i<=(2*n-1); ++i) {\n            sum += xn;\n            xn *= x;\n        }\n        return sum;\n    }\n\n    bool gauss_legendre_test(bool print) {\n        /// Check error in numerical integ(x+x^2+...+x^(2n-1),x=0..1)\n        /// using n-pt rule.\n\n        const int maxnpt = 64;\n        double x[maxnpt], w[maxnpt];\n\n        for (int npt=1; npt<maxnpt; ++npt) {\n            double sum = 0.0;\n            gauss_legendre(npt,0,1,x,w);\n            for (int i=0; i<npt; ++i) sum += testf(npt, x[i])*w[i];\n            for (int i=0; i<=(2*npt-1); ++i) sum -= 1.0/(i+1);\n            bool err = (std::abs(sum/npt) > 1.3e-14);\n            if (err || print)\n                cout << \"gauss_leg_test: \" << npt << \" \" << sum << \" \" << sum/npt << endl;\n            if (err) return false;\n        }\n\n        return true;\n    }\n\n    // int main() {\n    //   if (gauss_legendre_test())\n    //     cout << \" gauss_legendre seems OK\\n\";\n    //   else\n    //     cout << \" gauss_legendre failed !\\n\";\n    //   return 0;\n    // }\n\n}\n"
  },
  {
    "path": "src/madness/mra/legendre.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#ifndef MADNESS_MRA_LEGENDRE_H__INCLUDED\n#define MADNESS_MRA_LEGENDRE_H__INCLUDED\n\n#include <madness/madness_config.h>\n#include <madness/world/MADworld.h>\n\nnamespace madness {\n    extern void load_quadrature(World& world, const char* dir);\n    extern void legendre_polynomials(double x, long order, double *p);\n    extern void legendre_scaling_functions(double x, long k, double *p);\n    extern void initialize_legendre_stuff();\n\n    extern bool gauss_legendre(int n, double xlo, double xhi, double *x, double *w);\n    extern bool gauss_legendre_numeric(int n, double xlo, double xhi, double *x, double *w);\n    extern bool gauss_legendre_test(bool print=false);\n}\n\n#endif // MADNESS_MRA_LEGENDRE_H__INCLUDED\n\n"
  },
  {
    "path": "src/madness/mra/macrotaskpartitioner.h",
    "content": "//\n// Created by Florian Bischoff on 12/10/20.\n//\n\n#ifndef MADNESS_MACROTASKPARTITIONER_H\n#define MADNESS_MACROTASKPARTITIONER_H\n\n#include<vector>\n#include<list>\n#include<string>\n#include<iomanip>\n#include<sstream>\n#include<madness/world/madness_exception.h>\n\n\nnamespace madness {\ntemplate<typename ... Ts>\nconstexpr auto decay_types(std::tuple<Ts...> const &)\n-> std::tuple<std::remove_cv_t<std::remove_reference_t<Ts>>...>;\n\ntemplate<typename T>\nusing decay_tuple = decltype(decay_types(std::declval<T>()));\n\ntemplate<typename Q> struct is_vector : std::false_type { };\ntemplate<typename Q> struct is_vector<std::vector<Q>> : std::true_type { };\n\n/// given a tuple return the index of the first argument that is a vector of Function<T,NDIM>\ntemplate<typename tupleT, std::size_t I>\nconstexpr std::size_t get_index_of_first_vector_argument() {\n\n    typedef decay_tuple <tupleT> argtupleT;   // removes const, &, etc\n\n    if constexpr(I >= std::tuple_size_v<tupleT>) {\n        // Last case, if nothing is left to iterate, then exit the function\n//        MADNESS_EXCEPTION(\"there is no madness function vector argument in the list, cannot partition the tasks\", 1);\n        return I;\n    } else {\n        using typeT = typename std::tuple_element<I, argtupleT>::type;// use decay types for determining a vector\n        if constexpr (is_vector<typeT>::value) {\n            return I;\n        } else {\n            // Going for next element.\n            return get_index_of_first_vector_argument<tupleT,I+1>();\n        }\n    }\n}\n\n/// given a tuple return the index of the second argument that is a vector of Function<T,NDIM>\ntemplate<typename tupleT, std::size_t I>\nconstexpr std::size_t get_index_of_second_vector_argument() {\n    constexpr std::size_t index0=get_index_of_first_vector_argument<tupleT,0>();\n    return get_index_of_first_vector_argument<tupleT,index0+1>();\n}\n\nclass Batch_1D {\n    friend class MacroTaskPartitioner;\n\npublic:\n    long begin=0, end=-1; ///< first and first past last index [begin,end)\n\n    Batch_1D() {}\n    Batch_1D(const Slice& s) : begin(s.start), end(s.end) {\n        MADNESS_CHECK(s.step==1);\n    }\n    Batch_1D(const long& begin, const long& end) : begin(begin), end(end) {}\n\n    bool operator==(const Batch_1D& other) const {\n        return (end==other.end && begin==other.begin);\n    }\n\n    long size() const {\n        return end - begin;\n    }\n\n    bool is_full_size() const {\n        return (begin==0 and end==-1);\n    }\n\n    /// select the relevant vector elements from the argument tuple\n    template<typename tupleT, std::size_t appearance>\n    tupleT copy_batch(const tupleT& arg) const {\n\n        constexpr std::size_t index = (appearance==0) ?  get_index_of_first_vector_argument<tupleT,0>() :\n                                      get_index_of_second_vector_argument<tupleT,0>();\n        if constexpr (index>=std::tuple_size<tupleT>::value) {\n            MADNESS_CHECK(is_full_size());  // better: not set by user..\n            return arg;\n        } else {\n            auto v = std::get<index>(arg);\n            auto v_batch=copy_batch(v);\n            tupleT batched_arg = arg;\n            std::get<index>(batched_arg) = v_batch;\n            return batched_arg;\n        }\n    }\n\n    /// given vector v, copy vector elements of v_batch into vector\n    template<typename vecT>\n    vecT insert_batch(vecT v, const vecT& v_batch) const {\n      //MADNESS_CHECK(v_batch.size()==size_t(this->size()) or this->is_full_size());\n        std::copy(v_batch.begin(), v_batch.end(), v.begin()+begin);\n        return v;\n    }\n\n    /// given vector v, return those vector elements inside this batch\n    template<typename vecT>\n    vecT copy_batch(const vecT v) const {\n        vecT result_batch;\n        long end1 = (end > 0) ? end : v.end() - v.begin();\n        std::copy(v.begin() + begin, v.begin() + end1, std::back_inserter(result_batch));\n        return result_batch;\n    }\n\n    friend std::ostream& operator<<(std::ostream& os, const Batch_1D& batch) {\n        std::stringstream ss;\n        if (batch.is_full_size()) ss << \"[  ----  )\";\n        else ss << \"[\" << std::setw(3) << batch.begin << \", \" << std::setw(3) << batch.end << \")\";\n        os << ss.str();\n        return os;\n    }\n};\n\n/// a batch consists of a 2D-input batch and a 1D-output batch: K-batch <- (I-batch, J-batch)\nclass Batch {\npublic:\n    friend class MacroTaskPartitioner;\n    std::vector<Batch_1D> input;\n    Batch_1D result;\n\n    Batch() {}\n    Batch(const Batch& other) {\n        *this=other;\n    }\n    Batch& operator=(const Batch& other) {\n        if (this==&other) return *this;\n        result=other.result;\n        input=other.input;\n        return *this;\n    }\n\n    Batch(Batch_1D input1,  Batch_1D result) : input{input1}, result(result) {}\n    Batch(Batch_1D input1, Batch_1D input2, Batch_1D result)\n            : input{input1,input2}, result(result) {}\n\n    std::size_t size_of_input() const {\n        std::size_t result=1;\n        for (auto i: input) result*=i.size();\n        return  result;\n    }\n\n    /// select the relevant vector elements from the argument tuple\n    template<typename tupleT>\n    tupleT copy_input_batch(const tupleT& arg) const {\n        if (input.size()==0) return arg;\n        tupleT arg1=input[0].template copy_batch<tupleT,0>(arg);\n        if (input.size()>1) arg1=input[1].template copy_batch<tupleT,1>(arg1);\n        MADNESS_CHECK(input.size()<=2);\n        return arg1;\n    }\n\n    /// copy v_batch into the result vector\n    template<typename vecT>\n    vecT insert_result_batch(vecT v, const vecT& v_batch) const {\n        return result.insert_batch(v,v_batch);\n    }\n\n    /// pretty print this batch\n    friend std::ostream& operator<<(std::ostream& os, const Batch& batch) {\n        std::stringstream ss;\n        ss << batch.result<< \" <-- \";\n        if (batch.input.size()>0)  ss << batch.input[0];\n        if (batch.input.size()>1) ss << \", \" << batch.input[1];\n        os << ss.str();\n        return os;\n    }\n};\n\n/// partition one (two) vectors into 1D (2D) batches.\n\n/// derive from this class and override the \\it{do_partitioning} method if you want to implement\n/// your custom partitioner\nclass MacroTaskPartitioner {\n    friend class Batch;\n\npublic:\n    typedef std::list<std::pair<Batch,double>> partitionT;\n    std::size_t min_batch_size=5;           ///< minimum batch size\n    std::size_t max_batch_size = 10;        ///< maximum batch size (for memory management)\n    std::size_t nsubworld=1;                ///< number of worlds (try to have enough batches for all worlds)\n    std::string policy = \"guided\";          ///< how to partition the batches\n    std::size_t dimension = 1;              ///< partition one or two vectors\n\n    MacroTaskPartitioner() {}\n\n    virtual ~MacroTaskPartitioner() {}\n\n    MacroTaskPartitioner& set_nsubworld(const long& n) {\n        nsubworld=n;\n        return *this;\n    }\n    MacroTaskPartitioner& set_policy(const std::string& n) {\n        policy=n;\n        return *this;\n    }\n    MacroTaskPartitioner& set_dimension(const std::size_t& n) {\n        dimension=n;\n        return *this;\n    }\n    MacroTaskPartitioner& set_min_batch_size(const long& n) {\n        min_batch_size=n;\n        return *this;\n    }\n    MacroTaskPartitioner& set_max_batch_size(const long& n) {\n        max_batch_size=n;\n        return *this;\n    }\n\n    /// this will be called by MacroTask, it will *always* partition first (and possibly second) vector of arguments\n    template<typename tupleT>\n    partitionT partition_tasks(const tupleT& argtuple) const {\n\n        constexpr std::size_t I1 = get_index_of_first_vector_argument<tupleT, 0>();\n        constexpr std::size_t I2 = get_index_of_second_vector_argument<tupleT, 1>();\n        std::size_t vsize1=1,vsize2=1;\n        if constexpr (I2 < std::tuple_size_v<tupleT>) {     // found at least 2 vectors of madness functions\n            constexpr std::size_t I2 = get_index_of_second_vector_argument<tupleT, 0>();\n            vsize2 = std::get<I2>(argtuple).size();\n        }\n        if constexpr (I1 < std::tuple_size_v<tupleT>) { // found at least 1 vector\n            constexpr std::size_t I1 = get_index_of_first_vector_argument<tupleT, 0>();\n            vsize1 = std::get<I1>(argtuple).size();\n        } else {\n            std::string msg=\"confused partitioning dimension: \"+std::to_string(dimension) +\" typeid \" + typeid(tupleT).name();\n            MADNESS_EXCEPTION(msg.c_str(),1);\n        }\n\n        return do_partitioning(vsize1,vsize2,policy);\n    }\n\n    /// override this if you want your own partitioning\n    virtual partitionT do_partitioning(const std::size_t& vsize1, const std::size_t& vsize2,\n                                               const std::string policy) const {\n        if (dimension == 1) {\n            return do_1d_partition(vsize1, policy);\n        } else if (dimension == 2) {\n            return do_2d_partition(vsize1, vsize2, policy);\n        }\n        return partitionT();\n    }\n\n    partitionT do_1d_partition(const std::size_t vsize, const std::string policy) const {\n        partitionT result;\n        if (policy == \"guided\") {\n            long begin = 0;\n            long end = 0;\n            while (end < long(vsize)) {\n                end += std::min(max_batch_size, std::max(min_batch_size, ((vsize - end) / nsubworld)));\n                end = std::min(end, long(vsize));\n                Batch batch(Batch_1D(begin, end),Batch_1D(begin,end));\n                double priority=MacroTaskPartitioner::compute_priority(batch);\n                result.push_back(std::make_pair(batch,priority));\n                begin = end;\n            }\n        } else {\n            std::string msg = \"unknown partitioning policy: \" + policy;\n            MADNESS_EXCEPTION(msg.c_str(), 1);\n        }\n        return result;\n    }\n\n    /// outer product of 2 1d-partitionings -- result batches correspond to first input batches\n\n    /// [begin1,end1)   <-- [begin1,end1) [begin2,end2)\n    partitionT do_2d_partition(const std::size_t vsize, const std::size_t v2size, const std::string policy) const {\n        partitionT partition1=do_1d_partition(vsize,policy);\n        partitionT partition2=do_1d_partition(v2size,policy);\n        partitionT result;\n        for (auto p1 : partition1) {\n            for (auto p2 : partition2) {\n                Batch batch(p1.first.input[0],p2.first.input[0],p1.first.result);\n                double priority=compute_priority(batch);\n                result.push_back(std::make_pair(batch,priority));\n            }\n        }\n        return result;\n    }\n\n    virtual double compute_priority(const Batch& batch) const {\n        return batch.size_of_input();\n    }\n\n};\n\n}\n\n#endif //MADNESS_MACROTASKPARTITIONER_H\n"
  },
  {
    "path": "src/madness/mra/macrotaskq.h",
    "content": "/**\n \\file macrotaskq.h\n \\brief Declares the \\c macrotaskq and MacroTaskBase classes\n \\ingroup mra\n\n A MacroTaskq executes tasks on World objects, e.g. differentiation of a function or other\n arithmetic. Complex algorithms can be implemented.\n\n The universe world is split into subworlds, each of them executing macrotasks of the task queue.\n This improves locality and speedups for large number of compute nodes, by reducing communications\n within worlds.\n\n The user defines a macrotask (an example is found in test_vectormacrotask.cc), the tasks are\n lightweight and carry only bookkeeping information, actual input and output are stored in a\n cloud (see cloud.h)\n\n The user-defined macrotask is derived from MacroTaskIntermediate and must implement the run()\n method. A heterogeneous task queue is possible.\n\n The result of a macrotask is an object that lives in the universe and that is accessible from all\n subworlds. The result is accumulated in the universe and must therefore be a WorldObject. Currently we\n have implemented\n  - Function<T,NDIM>\n  - std::vector<Function<T,NDIM>> (a vector of Function<T,NDIM>)\n  - ScalarResultImpl<T> (a scalar value)\n  - std::vector<std::shared_ptr<ScalarResultImpl<T>>> (a vector of scalar values), shared_ptr for technical reasons\n\n  - std::tuple<std::vector<XXX>, std::vector<YYY>> (a tuple of n vectors of WorldObjects: XXX, YYY, .. = {Function, ScalarResultImpl, ...})\n\n\n TODO: priority q\n TODO: task submission from inside task (serialize task instead of replicate)\n TODO: update documentation\n TODO: consider serializing task member variables\n\n*/\n\n\n\n#ifndef SRC_MADNESS_MRA_MACROTASKQ_H_\n#define SRC_MADNESS_MRA_MACROTASKQ_H_\n\n#include <madness/world/cloud.h>\n#include <madness/world/world.h>\n#include <madness/mra/macrotaskpartitioner.h>\n#include <madness/mra/memory_measurement.h>\n\nnamespace madness {\n\n/// helper class for returning the result of a task, which is not a madness Function, but a simple scalar\n\n/// the result value is accumulated via gaxpy in universe rank=0, after completion of the taskq the final\n/// value can be obtained via get(), which includes a broadcast of the final value to all processes\ntemplate<typename T>\nclass ScalarResultImpl : public WorldObject<ScalarResultImpl<T>> {\npublic:\n    typedef T value_type;\n    ScalarResultImpl(World &world) : WorldObject<ScalarResultImpl<T>>(world) {\n        this->process_pending();\n    }\n\n    /// Disable the default copy constructor\n    ScalarResultImpl(const ScalarResultImpl& other) = delete;\n    // ScalarResultImpl<T>(ScalarResultImpl<T>&& ) = default;\n\n    /// disable assignment operator\n    ScalarResultImpl<T>& operator=(const ScalarResultImpl<T>& other) = delete;\n\n    ~ScalarResultImpl() {\n    }\n\n    /// simple assignment of the scalar value\n    ScalarResultImpl<T>& operator=(const T& x) {\n        value = x;\n        return *this;\n    }\n\n    ScalarResultImpl<T>& operator+= (const T& x) {\n        gaxpy(1.0, x, 1.0,true);\n        return *this;\n    }\n\n    /// accumulate, optional fence\n    void gaxpy(const double a, const T& right, double b, const bool fence=true) {\n        if (this->get_world().rank()==0) {\n            value =a*value + b * right;\n        }\n        else this->send(0, &ScalarResultImpl<T>::gaxpy, a, right, b, fence);\n    }\n\n    template<typename Archive>\n    void serialize(Archive &ar) {\n        ar & value;\n    }\n\n    /// after completion of the taskq get the final value\n    T get() {\n        this->get_world().gop.broadcast_serializable(*this, 0);\n        return value;\n    }\n\n    /// get the local value of this rank, which might differ for different ranks\n    /// for the final value use get()\n    T get_local() const {\n        return value;\n    }\n\nprivate:\n    /// the scalar value\n    T value=T();\n};\n\ntemplate<typename T=double>\nclass ScalarResult {\npublic:\n\ttypedef ScalarResultImpl<T> implT;\n\tstd::shared_ptr<implT> impl;\n\n\tScalarResult() = default;\n\tScalarResult(World &world) : impl(new implT(world)) {}\n\tScalarResult(const std::shared_ptr<implT>& impl) : impl(impl) {}\n\tScalarResult& operator=(const T& x) {\n\t\t*(this->impl) = x;\n\t\treturn *this;\n\t}\n\n\tstd::shared_ptr<implT> get_impl() const {\n\t\treturn impl;\n\t}\n\n\tvoid set_impl(const std::shared_ptr<implT>& newimpl) {\n\t\timpl=newimpl;\n\t}\n\n\tuniqueidT id() const {\n\t\treturn impl->id();\n\t}\n\n    /// accumulate, optional fence\n    void gaxpy(const double a, const T& right, double b, const bool fence=true) {\n        impl->gaxpy(a,right,b,fence);\n    }\n\n    template<typename Archive>\n    void serialize(Archive &ar) {\n        ar & impl;\n    }\n\n    /// after completion of the taskq get the final value\n    T get() {\n    \treturn impl->get();\n    }\n\n    /// after completion of the taskq get the final value\n    T get_local() const {\n    \treturn impl->get_local();\n    }\n\n};\n\n/// helper function to create a vector of ScalarResultImpl, circumventing problems with the constructors\ntemplate<typename T>\nstd::vector<ScalarResult<T>> scalar_result_vector(World& world, std::size_t n)  {\n    std::vector<ScalarResult<T>> v;\n    for (std::size_t i=0; i<n; ++i) v.emplace_back(ScalarResult<T>(world));\n    return v;\n}\n\n\n// type traits to check if a template parameter is a WorldContainer\ntemplate<typename>\nstruct is_scalar_result_ptr : std::false_type {};\n\ntemplate <typename T>\nstruct is_scalar_result_ptr<std::shared_ptr<madness::ScalarResultImpl<T>>> : std::true_type {};\n\ntemplate<typename>\nstruct is_scalar_result_ptr_vector : std::false_type {\n};\n\ntemplate<typename T>\nstruct is_scalar_result_ptr_vector<std::vector<std::shared_ptr<typename madness::ScalarResultImpl<T>>>> : std::true_type {\n};\n\n// type traits to check if a template parameter is a WorldContainer\ntemplate<typename>\nstruct is_scalar_result : std::false_type {};\n\ntemplate <typename T>\nstruct is_scalar_result<madness::ScalarResult<T>> : std::true_type {};\n\ntemplate<typename>\nstruct is_scalar_result_impl : std::false_type {};\n\ntemplate <typename T>\nstruct is_scalar_result<madness::ScalarResultImpl<T>> : std::true_type {};\n\ntemplate<typename>\nstruct is_scalar_result_vector : std::false_type {\n};\n\ntemplate<typename T>\nstruct is_scalar_result_vector<std::vector<typename madness::ScalarResult<T>>> : std::true_type {\n};\n\n/// check if type is a valid task result: it must be a WorldObject and must implement gaxpy\ntemplate <typename T>\ninline constexpr bool is_valid_task_result_v =\n\t                  is_madness_function<T>::value\t\t\t\t// Function<T,NDIM>\n\t\t\t\t\t  || is_madness_function_vector<T>::value\t// std::vector<Function<T,NDIM>>\n\t\t\t\t\t  || is_scalar_result<T>::value\t\t    // ScalarResultImpl<T>\n\t\t\t\t\t  || is_scalar_result_vector<T>::value  // std::vector<std::shared_ptr<ScalarResultImpl<T>>>\n\t\t\t\t\t  || is_scalar_result_ptr<T>::value\t\t    // ScalarResultImpl<T>\n\t\t\t\t\t  || is_scalar_result_ptr_vector<T>::value; // std::vector<std::shared_ptr<ScalarResultImpl<T>>>\n\n\ntemplate<typename> struct is_tuple : std::false_type { };\ntemplate<typename ...T> struct is_tuple<std::tuple<T...>> : std::true_type { };\n\n/// given a tuple check recursively if all elements are valid task results\ntemplate<typename tupleT, std::size_t I>\nconstexpr bool check_tuple_is_valid_task_result() {\n\n\ttypedef decay_tuple <tupleT> argtupleT;   // removes const, &, etc\n\n\tif constexpr(I >= std::tuple_size_v<tupleT>) {\n\t\t// Last case, if nothing is left to iterate, then exit the function\n\t\treturn true;\n\t} else {\n\t\tusing typeT = typename std::tuple_element<I, argtupleT>::type;// use decay types for determining a vector\n\t\tif constexpr (not is_valid_task_result_v<typeT>) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Going for next element.\n\t\t\treturn check_tuple_is_valid_task_result<tupleT,I+1>();\n\t\t}\n\t}\n}\n\n\n\n/// the result type of a macrotask must implement gaxpy\ntemplate<typename T>\nvoid gaxpy(const double a, ScalarResult<T>& left, const double b, const T& right, const bool fence=true) {\n    left.gaxpy(a, right, b, fence);\n}\n\ntemplate <class Archive, typename T>\nstruct madness::archive::ArchiveStoreImpl<Archive, std::shared_ptr<ScalarResultImpl<T>>> {\n    static void store(const Archive& ar, const std::shared_ptr<ScalarResultImpl<T>>& ptr) {\n        bool exists=(ptr) ? true : false;\n        ar & exists;\n        if (exists) ar & ptr->id();\n    }\n};\n\n\ntemplate <class Archive, typename T>\nstruct madness::archive::ArchiveLoadImpl<Archive, std::shared_ptr<ScalarResultImpl<T>>> {\n    static void load(const Archive& ar, std::shared_ptr<ScalarResultImpl<T>>& ptr) {\n        bool exists=false;\n        ar & exists;\n        if (exists) {\n            uniqueidT id;\n            ar & id;\n            World* world = World::world_from_id(id.get_world_id());\n            MADNESS_ASSERT(world);\n            auto ptr_opt = (world->ptr_from_id<  ScalarResultImpl<T> >(id));\n            if (!ptr_opt)\n            MADNESS_EXCEPTION(\"ScalarResultImpl: remote operation attempting to use a locally uninitialized object\",0);\n            ptr.reset(ptr_opt.value(), [] (ScalarResultImpl<T> *p_) -> void {}); // disable destruction\n            if (!ptr)\n            MADNESS_EXCEPTION(\"ScalarResultImpl<T> operation attempting to use an unregistered object\",0);\n        } else {\n            ptr=nullptr;\n        }\n    }\n};\n\nstruct MacroTaskInfo {\n\tenum StoragePolicy {\n\t\tStoreFunction,            ///< store a madness function in the cloud  -- can have a large memory impact\n\t\tStorePointerToFunction,   ///< store the pointer to the function in the cloud, the actual function lives in the universe and\n\t\t///< its coefficients can be copied to the subworlds (e.g. by macrotaskq) when needed.\n\t\t///< The task itself is responsible for handling data movement\n\t\tStoreFunctionViaPointer   ///< store a pointer to the function in the cloud, but macrotaskq will move the\n\t\t///< coefficients to the subworlds when the task is started. This is the default policy.\n\t};\n\n\tfriend std::ostream& operator<<(std::ostream& os, const StoragePolicy sp) {\n\t\tif (sp==StoreFunction) os << \"StoreFunction\";\n\t\tif (sp==StorePointerToFunction) os << \"StorePointerToFunction\";\n\t\tif (sp==StoreFunctionViaPointer) os << \"StoreFunctionViaPointer\";\n\t\treturn os;\n\t}\n\n\t/// given the MacroTask's storage policy return the corresponding Cloud storage policy\n\tstatic Cloud::StoragePolicy to_cloud_storage_policy(MacroTaskInfo::StoragePolicy policy) {\n\t\tswitch (policy) {\n\t\tcase MacroTaskInfo::StoreFunction: return Cloud::StoreFunction;\n\t\tcase MacroTaskInfo::StorePointerToFunction: return Cloud::StoreFunctionPointer;\n\t\tcase MacroTaskInfo::StoreFunctionViaPointer: return Cloud::StoreFunctionPointer;\n\t\tdefault: MADNESS_EXCEPTION(\"unknown storage policy\",0);\n\t\t}\n\t}\n\n\t/// return some preset policies\n\t/// - \"default\": StoreFunctionViaPointer, cloud rank-replicated, initial functions node-replicated\n\t/// - \"small_memory\": StoreFunctionViaPointer, cloud rank-replicated, initial functions distributed\n\t/// - \"large_memory\": StoreFunction, cloud rank-replicated, initial functions distributed\n\t/// the user can also set the policies manually\n\t/// note: the policies are checked for consistency when the MacroTaskQ is created\n\tstatic MacroTaskInfo preset(const std::string name) {\n\t\tMacroTaskInfo info;\n\t\tif (name==\"default\") {\n\t\t\tinfo.storage_policy=MacroTaskInfo::StoreFunction;\n\t\t\tinfo.cloud_distribution_policy=DistributionType::RankReplicated;\n\t\t\tinfo.ptr_target_distribution_policy=DistributionType::Distributed;\n\t\t} else if (name==\"node_replicated_target\") {\n\t\t\tinfo.storage_policy=MacroTaskInfo::StoreFunctionViaPointer;\n\t\t\tinfo.cloud_distribution_policy=DistributionType::RankReplicated;\n\t\t\tinfo.ptr_target_distribution_policy=DistributionType::NodeReplicated;\n\t\t} else if (name==\"small_memory\") {\n\t\t\tinfo.storage_policy=MacroTaskInfo::StoreFunctionViaPointer;\n\t\t\tinfo.cloud_distribution_policy=DistributionType::RankReplicated;\n\t\t\tinfo.ptr_target_distribution_policy=DistributionType::Distributed;\n\t\t} else if (name==\"large_memory\") {\n\t\t\tinfo.storage_policy=MacroTaskInfo::StoreFunction;\n\t\t\tinfo.cloud_distribution_policy=DistributionType::RankReplicated;\n\t\t\tinfo.ptr_target_distribution_policy=DistributionType::Distributed;\n\t\t} else {\n\t\t\tstd::string msg=\"MacroTaskQFactory::preset: unknown preset \"+name;\n\t\t\tMADNESS_EXCEPTION(msg.c_str(),0);\n\t\t}\n\t\treturn info;\n\t}\n\n\tstatic std::vector<std::string> get_all_preset_names() {\n\t\treturn {\"default\",\"node_replicated_target\",\"small_memory\",\"large_memory\"};\n\t}\n\n\t/// helper function to return all presets\n\tstatic std::vector<MacroTaskInfo> get_all_presets() {\n\t\tstd::vector<MacroTaskInfo> result;\n\t\tfor (const auto& name : get_all_preset_names()) {\n\t\t\tresult.push_back(preset(name));\n\t\t}\n\t\treturn result;\n\t}\n\n\t/// make sure the policies are consistent\n\tbool check_consistency() const {\n\t\tbool store_pointer_in_cloud = (storage_policy==MacroTaskInfo::StorePointerToFunction\n\t\t\tor storage_policy==MacroTaskInfo::StoreFunctionViaPointer);\n\t\tbool good=true;\n\n\t\tif (storage_policy==MacroTaskInfo::StoreFunction) {\n\t\t\t// if functions are stored in the cloud, the initial functions should be distributed\n\t\t\tgood=ptr_target_distribution_policy==DistributionType::Distributed;\n\n\t\t} else if (store_pointer_in_cloud) {\n\t\t\t// if pointers are stored in the cloud, the initial functions can be distributed or replicated,\n\t\t\t// the cloud should be rank-replicated\n\t\t\tgood=(cloud_distribution_policy==DistributionType::RankReplicated);\n\n\t\t}\n\t\tif (not good) std::cout << *this ;\n\n\t\treturn good;\n\t}\n\n\t/// set policy from a vector of strings, assuming the order is storage policy, cloud distribution policy, ptr target distribution policy\n\tvoid from_vector_of_strings(const std::vector<std::string>& vec) {\n\t\tif (vec.size()!=3) {\n\t\t\tstd::string msg=\"expected 3 policies, got \"+std::to_string(vec.size());\n\t\t\tMADNESS_EXCEPTION(msg.c_str(),0);\n\t\t}\n\t\tauto remove_quotes = [](const std::string& s) {\n\t\t\tstd::string result=s;\n\t\t\tif (s.size()>=2 and s.front()=='\"' and s.back()=='\"') {\n\t\t\t\tresult=s.substr(1,s.size()-2);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tstd::string sstorage=remove_quotes(vec[0]);\n\t\tif (sstorage==\"storefunction\") storage_policy=MacroTaskInfo::StoreFunction;\n\t\telse if (sstorage==\"storepointertofunction\") storage_policy=MacroTaskInfo::StorePointerToFunction;\n\t\telse if (sstorage==\"storefunctionviapointer\") storage_policy=MacroTaskInfo::StoreFunctionViaPointer;\n\t\telse {\n\t\t\tstd::string msg=\"unknown storage policy: \"+sstorage;\n\t\t\tprint(\"msg\",msg);\n\t\t\tMADNESS_CHECK_THROW(0, \"Oh no1\");\n\t\t}\n\n\t\tstd::string scloud=remove_quotes(vec[1]);\n\t\tif (scloud==\"rankreplicated\") cloud_distribution_policy=DistributionType::RankReplicated;\n\t\telse if (scloud==\"nodereplicated\") cloud_distribution_policy=DistributionType::NodeReplicated;\n\t\telse if (scloud==\"distributed\") cloud_distribution_policy=DistributionType::Distributed;\n\t\telse {\n\t\t\tstd::string msg=\"unknown cloud distribution policy: \"+scloud;\n\t\t\tprint(\"msg\",msg);\n\t\t\tMADNESS_CHECK_THROW(0, \"Oh no2\");\n\t\t}\n\n\t\tstd::string sptrtarget=remove_quotes(vec[2]);\n\t\tif (sptrtarget==\"rankreplicated\") ptr_target_distribution_policy=DistributionType::RankReplicated;\n\t\telse if (sptrtarget==\"nodereplicated\") ptr_target_distribution_policy=DistributionType::NodeReplicated;\n\t\telse if (sptrtarget==\"distributed\") ptr_target_distribution_policy=DistributionType::Distributed;\n\t\telse {\n\t\t\tstd::string msg=\"unknown ptr target distribution policy: \"+sptrtarget;\n\t\t\tprint(\"msg\",msg);\n\t\t\tMADNESS_CHECK_THROW(0, \"Oh no3\");\n\t\t}\n\t\tprint(\"set macrotaskinfo to\");\n\t\tprint(*this);\n\n\t}\n\n\tStoragePolicy storage_policy=StoreFunctionViaPointer;\n\tDistributionType cloud_distribution_policy=DistributionType::RankReplicated;\n\tDistributionType ptr_target_distribution_policy=DistributionType::NodeReplicated;\n\n\tfriend std::ostream& operator<<(std::ostream& os, const MacroTaskInfo policy) {\n\t\tos << \"StoragePolicy:                  \" << policy.storage_policy << std::endl;\n\t\tos << \"cloud_storage_policy:           \" << to_cloud_storage_policy(policy.storage_policy) << std::endl;\n\t\tos << \"cloud_distribution_policy:      \" << policy.cloud_distribution_policy << std::endl;\n\t\tos << \"ptr_target_distribution_policy: \" << policy.ptr_target_distribution_policy << std::endl;\n\t\treturn os;\n\t}\n\n\tfriend std::string to_string(const MacroTaskInfo::StoragePolicy sp) {\n\t\tstd::ostringstream os;\n\t\tos << sp;\n\t\treturn os.str();\n\t}\n\n\tstatic StoragePolicy policy_to_string(const std::string policy) {\n\t\tstd::string policy_lc=commandlineparser::tolower(policy);\n\t\tif (policy==\"function\") return MacroTaskInfo::StoreFunction;\n\t\tif (policy==\"pointer\") return MacroTaskInfo::StorePointerToFunction;\n\t\tif (policy==\"functionviapointer\") return MacroTaskInfo::StoreFunctionViaPointer;\n\t\tstd::string msg=\"unknown policy: \"+policy;\n\t\tMADNESS_EXCEPTION(msg.c_str(),1);\n\t\treturn MacroTaskInfo::StorePointerToFunction;\n\t}\n\n\tnlohmann::json to_json() const {\n\t\tnlohmann::json j;\n\t\tj[\"storage_policy\"]=to_string(storage_policy);\n\t\tj[\"cloud_distribution_policy\"]=to_string(cloud_distribution_policy);\n\t\tj[\"ptr_target_distribution_policy\"]=to_string(ptr_target_distribution_policy);\n\t\treturn j;\n\t}\n\n\n};\n\ntemplate<typename T=double>\nstd::ostream& operator<<(std::ostream& os, const typename MacroTaskInfo::StoragePolicy sp) {\n\tif (sp==MacroTaskInfo::StoreFunction) os << \"Function\";\n\tif (sp==MacroTaskInfo::StorePointerToFunction) os << \"PointerToFunction\";\n\tif (sp==MacroTaskInfo::StoreFunctionViaPointer) os << \"FunctionViaPointer\";\n\treturn os;\n}\n\n/// base class\nclass MacroTaskBase {\npublic:\n\n\ttypedef std::vector<std::shared_ptr<MacroTaskBase> > taskqT;\n\n\tMacroTaskBase() {}\n\tvirtual ~MacroTaskBase() {};\n\n\tdouble priority=1.0;\n\tenum Status {Running, Waiting, Complete, Unknown} stat=Unknown;\n\n\tvoid set_complete() {stat=Complete;}\n\tvoid set_running() {stat=Running;}\n\tvoid set_waiting() {stat=Waiting;}\n\n\tbool is_complete() const {return stat==Complete;}\n\tbool is_running() const {return stat==Running;}\n\tbool is_waiting() const {return stat==Waiting;}\n\n\tvirtual void run(World& world, Cloud& cloud, taskqT& taskq, const long element,\n\t\tconst bool debug, const MacroTaskInfo policy) = 0;\n\tvirtual void cleanup() = 0;\t\t// clear static data (presumably persistent input data)\n\n    virtual void print_me(std::string s=\"\") const {\n        printf(\"this is task with priority %4.1f\\n\",priority);\n    }\n    virtual void print_me_as_table(std::string s=\"\") const {\n        print(\"nothing to print\");\n    }\n    std::string print_priority_and_status_to_string() const {\n        std::stringstream ss;\n        ss << std::setw(5) << this->get_priority() << \"  \" <<this->stat;\n        return ss.str();\n    }\n\n    double get_priority() const {return priority;}\n    void set_priority(const double p) {priority=p;}\n\n    friend std::ostream& operator<<(std::ostream& os, const MacroTaskBase::Status s) {\n    \tif (s==MacroTaskBase::Status::Running) os << \"Running\";\n    \tif (s==MacroTaskBase::Status::Waiting) os << \"Waiting\";\n    \tif (s==MacroTaskBase::Status::Complete) os << \"Complete\";\n    \tif (s==MacroTaskBase::Status::Unknown) os << \"Unknown\";\n    \treturn os;\n    }\n};\n\n\ntemplate<typename macrotaskT>\nclass MacroTaskIntermediate : public MacroTaskBase {\n\npublic:\n\n\tMacroTaskIntermediate() {}\n\n\t~MacroTaskIntermediate() {}\n\n\tvoid cleanup() {};\n};\n\n\n\t/// Factory for the MacroTaskQ\n\tclass MacroTaskQFactory {\n\tpublic:\n\t\tlong printlevel=0;\n\t\tWorld& world;\n\t\tlong nworld=1;\n\n\t\tMacroTaskInfo policy=MacroTaskInfo::preset(\"default\");\n\n\t\tMacroTaskQFactory(World& universe) : world(universe), nworld(universe.size()) {}\n\n\t\tMacroTaskQFactory& set_nworld(const long n) {\n\t\t\tnworld = n;\n\t\t\treturn *this;\n\t\t}\n\n\t\tMacroTaskQFactory& set_printlevel(const long p) {\n\t\t\tprintlevel = p;\n\t\t\treturn *this;\n\t\t}\n\n\t\tMacroTaskQFactory& preset(const std::string name) {\n\t\t\treturn *this;\n\t\t}\n\n\t\tMacroTaskQFactory& set_policy(const MacroTaskInfo p) {\n\t\t\tpolicy = p;\n\t\t\treturn *this;\n\t\t}\n\n\t\tMacroTaskQFactory& set_storage_policy(const MacroTaskInfo::StoragePolicy sp) {\n\t\t\tpolicy.storage_policy = sp;\n\t\t\treturn *this;\n\t\t}\n\n\t\tMacroTaskQFactory& set_cloud_distribution_policy(const DistributionType dp) {\n\t\t\tpolicy.cloud_distribution_policy = dp;\n\t\t\treturn *this;\n\t\t}\n\n\t\tMacroTaskQFactory& set_ptr_target_distribution_policy(const DistributionType dp) {\n\t\t\tpolicy.ptr_target_distribution_policy = dp;\n\t\t\treturn *this;\n\t\t}\n\n\t};\n\n\n\nclass MacroTaskQ : public WorldObject< MacroTaskQ> {\n\n    World& universe;\n    std::shared_ptr<World> subworld_ptr;\n\tMacroTaskBase::taskqT taskq;\n\tstd::mutex taskq_mutex;\n\tlong printlevel=0;\n\tlong nsubworld=1;\n\tnlohmann::json cloud_statistics;\t///< save cloud statistics after run_all()\n\tnlohmann::json taskq_statistics;\t///< save taskq statistics after run_all()\n\n\tconst MacroTaskInfo policy;\t\t\t///< storage and distribution policy\n\n\t/// set the process map for the subworld\n    std::shared_ptr< WorldDCPmapInterface< Key<1> > > pmap1;\n    std::shared_ptr< WorldDCPmapInterface< Key<2> > > pmap2;\n    std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmap3;\n    std::shared_ptr< WorldDCPmapInterface< Key<4> > > pmap4;\n    std::shared_ptr< WorldDCPmapInterface< Key<5> > > pmap5;\n    std::shared_ptr< WorldDCPmapInterface< Key<6> > > pmap6;\n\n\tbool printdebug() const {return printlevel>=10;}\n\tbool printprogress() const {return (printlevel>=4) and (not (printdebug()));}\n    bool printtimings() const {return universe.rank()==0 and printlevel>=3;}\n\tbool printtimings_detail() const {return universe.rank()==0 and printlevel>=5;}\n\npublic:\n\n\tmadness::Cloud cloud;\n\tWorld& get_subworld() {return *subworld_ptr;}\n\tlong get_nsubworld() const {return nsubworld;}\n\tvoid set_printlevel(const long p) {printlevel=p;}\n\n\tMacroTaskInfo get_policy() const {\n\t\treturn policy;\n\t}\n\n\tnlohmann::json get_cloud_statistics() const {\n\t\treturn cloud_statistics;\n\t}\n\n\tnlohmann::json get_taskq_statistics() const {\n\t\treturn taskq_statistics;\n\t}\n\n    /// create an empty taskq and initialize the subworlds\n\texplicit MacroTaskQ(const MacroTaskQFactory factory)\n\t  : WorldObject<MacroTaskQ>(factory.world)\n\t  , universe(factory.world)\n\t  , taskq()\n\t  , printlevel(factory.printlevel)\n\t  , nsubworld(factory.nworld)\n\t  , policy(factory.policy)\n\t  , cloud(factory.world)\n    {\n\t\tsubworld_ptr=create_worlds(universe,nsubworld);\n\t\tMADNESS_CHECK_THROW(policy.check_consistency(),\"MacroTaskQ: inconsistent storage policy\");\n\t\tcloud.set_replication_policy(policy.cloud_distribution_policy);\n\t\tcloud.set_storing_policy(MacroTaskInfo::to_cloud_storage_policy(policy.storage_policy));\n\n\t\tif (printdebug()) print(policy);\n\t\tthis->process_pending();\n\t}\n\n\t~MacroTaskQ() {}\n\n\t/// for each process create a world using a communicator shared with other processes by round-robin\n\t/// copy-paste from test_world.cc\n\tstatic std::shared_ptr<World> create_worlds(World& universe, const std::size_t nsubworld) {\n\n\t\tint color = universe.rank() % nsubworld;\n\t\tSafeMPI::Intracomm comm = universe.mpi.comm().Split(color, universe.rank() / nsubworld);\n\n\t\tstd::shared_ptr<World> all_worlds;\n\t\tall_worlds.reset(new World(comm));\n\n\t\tuniverse.gop.fence();\n\t\treturn all_worlds;\n\t}\n\n\t/// run all tasks\n\tvoid run_all() {\n\n\t\tif (printdebug()) print_taskq();\n\t\tif (printtimings_detail()) {\n\t\t\tif (universe.rank()==0) {\n\t\t\t\tprint(\"number of tasks in taskq\",taskq.size());\n\t\t\t\tprint(\"redirecting output to files task.#####\");\n\t\t\t}\n\t\t}\n\t\ttaskq_statistics[\"number_tasks\"]=taskq.size();\n\n\t\t// replicate the cloud (not necessarily the target if pointers are stored)\n\t\tauto replication_policy = cloud.get_replication_policy();\n\t\tif (replication_policy!=DistributionType::Distributed) {\n\t\t\tdouble cpu0=cpu_time();\n\t\t\tif (replication_policy==DistributionType::RankReplicated) cloud.replicate();\n\t\t\tif (replication_policy==DistributionType::NodeReplicated) cloud.replicate_per_node(); // replicate to all hosts\n\t\t\tuniverse.gop.fence();\n\t\t\tdouble cpu1=cpu_time();\n\t\t\tif (printtimings_detail()) print(\"cloud replication wall time\",cpu1-cpu0);\n\t\t}\n\n\t\t// replicate the targets (not the cloud) if needed\n\t\t{\n\t\t\tdouble cpu0=cpu_time();\n\t\t\tconst bool need_replication_of_target=(policy.ptr_target_distribution_policy!=DistributionType::Distributed)\n\t\t\t\t\tand (policy.storage_policy!=MacroTaskInfo::StoreFunction);\n\t\t\tCloud::cloudtimer timer(universe,cloud.target_replication_time);\n\n\n\t\t\tif (need_replication_of_target) {\n\t\t\t\tauto dt=policy.ptr_target_distribution_policy;\n\t\t\t\tfor (auto wo : cloud.world_object_base_list) {\n\t\t\t\t\tloop_types<Cloud::DistributeFunctor, double, float, double_complex, float_complex>(std::tuple<DistributionType>(dt),wo);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if (need_replication_of_target) cloud.distribute_targets(policy.ptr_target_distribution_policy);\n\t\t\tdouble cpu1=cpu_time();\n\t\t\tif (printtimings_detail()) print(\"target replication wall time to \",policy.ptr_target_distribution_policy,cpu1-cpu0);\n\t\t}\n\n        if (printdebug()) cloud.print_size(universe);\n\t\tcloud_statistics=cloud.get_statistics(universe);\t// get stats before clearing the cloud\n        universe.gop.fence();\n        universe.gop.set_forbid_fence(true); // make sure there are no hidden universe fences\n        pmap1=FunctionDefaults<1>::get_pmap();\n        pmap2=FunctionDefaults<2>::get_pmap();\n        pmap3=FunctionDefaults<3>::get_pmap();\n        pmap4=FunctionDefaults<4>::get_pmap();\n        pmap5=FunctionDefaults<5>::get_pmap();\n        pmap6=FunctionDefaults<6>::get_pmap();\n        set_pmap(get_subworld());\n\n        double cpu00=cpu_time();\n\n\t\tWorld& subworld=get_subworld();\n//\t\tif (printdebug()) print(\"I am subworld\",subworld.id());\n\t\tdouble tasktime=0.0;\n\t\tif (printprogress() and universe.rank()==0) std::cout << \"progress in percent: \" << std::flush;\n\t\twhile (true) {\n\t\t\tlong element=get_scheduled_task_number(subworld);\n\t\t\tdouble cpu0=cpu_time();\n\t\t\tif (element<0) break;\n\t\t\tstd::shared_ptr<MacroTaskBase> task=taskq[element];\n\t\t\tif (printdebug()) print(\"starting task no\",element, \"in subworld\",subworld.id(),\"at time\",wall_time());\n\n\t\t\ttask->run(subworld,cloud, taskq, element, printdebug(), policy);\n\n\t\t\tdouble cpu1=cpu_time();\n\t\t\tset_complete(element);\n\t\t\ttasktime+=(cpu1-cpu0);\n\t\t\tif (printdebug()) printf(\"completed task %3ld after %6.1fs at time %6.1fs\\n\",element,cpu1-cpu0,wall_time());\n\n\t\t\t// print progress\n\t\t\tconst std::size_t ntask=taskq.size();\n\t\t\t// return percentile of ntask for element\n\t\t\tauto in_percentile = [&ntask](const long element) {\n\t\t\t\treturn std::floor(element/(0.1*(ntask+1)));\n\t\t\t};\n\t\t\tauto is_first_in_percentile = [&](const long element) {\n\t\t\t\treturn (in_percentile(element)!=in_percentile(element-1));\n\t\t\t};\n\t\t\tif (printprogress() and is_first_in_percentile(element)) {\n\t\t\t\tstd::cout << int(in_percentile(element)*10) << \" \" << std::flush;\n\t\t\t}\n\t\t}\n        universe.gop.set_forbid_fence(false);\n\t\tuniverse.gop.fence();\n\t\tuniverse.gop.sum(tasktime);\n\t\tif (printprogress() and universe.rank()==0) std::cout << std::endl;\n\t\tcloud_statistics.update(cloud.gather_timings(universe));\t// get stats before clearing the cloud\n        double cpu11=cpu_time();\n        if (printlevel>=4) {\n        \tif (universe.rank()==0) {\n        \t\tCloud::print_timings(cloud_statistics);\n        \t\tCloud::print_memory_statistics(cloud_statistics);\n        \t\tprint(\"all tasks complete\");\n        \t}\n        \tMemoryMeasurer::measure_and_print(universe);\n        }\n        if (printtimings_detail()) {\n            printf(\"completed taskqueue after    %4.1fs at time %4.1fs\\n\", cpu11 - cpu00, wall_time());\n            printf(\" total cpu time / per world  %4.1fs %4.1fs\\n\", tasktime, tasktime / universe.size());\n        }\n\t\ttaskq_statistics[\"elapsed_time\"]=cpu11-cpu00;\n\t\ttaskq_statistics[\"cpu_time_per_world\"]=tasktime/universe.size();\n\t\ttaskq_statistics[\"total_cpu_time\"]=tasktime;\n\n\t\t// cleanup task-persistent input data\n\t\tfor (auto& task : taskq) task->cleanup();\n\t\tcloud.clear_cache(subworld);\n\t\tsubworld.gop.fence();\n        subworld.gop.fence();\n        universe.gop.fence();\n        FunctionDefaults<1>::set_pmap(pmap1);\n        FunctionDefaults<2>::set_pmap(pmap2);\n        FunctionDefaults<3>::set_pmap(pmap3);\n        FunctionDefaults<4>::set_pmap(pmap4);\n        FunctionDefaults<5>::set_pmap(pmap5);\n        FunctionDefaults<6>::set_pmap(pmap6);\n        universe.gop.fence();\n\t\t// restore targets to their original state\n\t\tif (policy.ptr_target_distribution_policy!=Distributed) cloud.distribute_targets();\n\t\tuniverse.gop.fence();\n\t\tsubworld.gop.fence();\n\t\tcloud.clear();\n\t\tuniverse.gop.fence();\n\t\tsubworld.gop.fence();\n\t\tuniverse.gop.fence();\n\t}\n\n\tvoid add_tasks(MacroTaskBase::taskqT& vtask) {\n        for (const auto& t : vtask) {\n            if (universe.rank()==0) t->set_waiting();\n            add_replicated_task(t);\n        }\n\t}\n\n    void print_taskq() const {\n        universe.gop.fence();\n        if (universe.rank()==0) {\n            print(\"\\ntaskq on universe rank\",universe.rank());\n            print(\"total number of tasks: \",taskq.size());\n            print(\" task                                   batch                 priority  status\");\n            for (const auto& t : taskq) t->print_me_as_table();\n        }\n        universe.gop.fence();\n    }\n\nprivate:\n\tvoid add_replicated_task(const std::shared_ptr<MacroTaskBase>& task) {\n\t\ttaskq.push_back(task);\n\t}\n\n\t/// scheduler is located on universe.rank==0\n\tlong get_scheduled_task_number(World& subworld) {\n\t\tlong number=0;\n\t\tif (subworld.rank()==0) {\n\t\t  Future<long> r = this->send(ProcessID(0), &MacroTaskQ::get_scheduled_task_number_local);\n\t\t  number=r.get();\n\t\t}\n\t\tsubworld.gop.broadcast_serializable(number, 0);\n\t\tsubworld.gop.fence();\n\t\treturn number;\n\n\t}\n\n\tlong get_scheduled_task_number_local() {\n\t\tMADNESS_ASSERT(universe.rank()==0);\n\t\tstd::lock_guard<std::mutex> lock(taskq_mutex);\n\n\t\tauto is_Waiting = [](const std::shared_ptr<MacroTaskBase>& mtb_ptr) {return mtb_ptr->is_waiting();};\n\t\tauto it=std::find_if(taskq.begin(),taskq.end(),is_Waiting);\n\t\tif (it!=taskq.end()) {\n\t\t\tit->get()->set_running();\n\t\t\tlong element=it-taskq.begin();\n\t\t\treturn element;\n\t\t}\n//\t\tprint(\"could not find task to schedule\");\n\t\treturn -1;\n\t}\n\n\t/// scheduler is located on rank==0\n\tvoid set_complete(const long task_number) const {\n\t\tthis->task(ProcessID(0), &MacroTaskQ::set_complete_local, task_number);\n\t}\n\n\t/// scheduler is located on rank==0\n\tvoid set_complete_local(const long task_number) const {\n\t\tMADNESS_ASSERT(universe.rank()==0);\n\t\ttaskq[task_number]->set_complete();\n\t}\n\npublic:\n\tvoid static set_pmap(World& world) {\n        FunctionDefaults<1>::set_default_pmap(world);\n        FunctionDefaults<2>::set_default_pmap(world);\n        FunctionDefaults<3>::set_default_pmap(world);\n        FunctionDefaults<4>::set_default_pmap(world);\n        FunctionDefaults<5>::set_default_pmap(world);\n        FunctionDefaults<6>::set_default_pmap(world);\n\t}\nprivate:\n\tstd::size_t size() const {\n\t\treturn taskq.size();\n\t}\n\n};\n\n\ntemplate<typename taskT>\nclass MacroTask {\n    using partitionT = MacroTaskPartitioner::partitionT;\n\n    template<typename Q>\n    struct is_vector : std::false_type {\n    };\n    template<typename Q>\n    struct is_vector<std::vector<Q>> : std::true_type {\n    };\n\n    typedef typename taskT::resultT resultT;\n    typedef typename taskT::argtupleT argtupleT;\n    typedef Cloud::recordlistT recordlistT;\n\n    taskT task;\n    bool debug=false;\n\tbool immediate_execution=false;\n\tWorld &world;\n\tstd::shared_ptr<MacroTaskQ> taskq_ptr;\n\npublic:\n\n    /// constructor takes the task, but no arguments to the task\n    explicit MacroTask(World &world, taskT &task)\n            : MacroTask(world,task, std::make_shared<MacroTaskQ>(MacroTaskQFactory(world))) {\n    \timmediate_execution=true;\n    }\n\n\t/// constructor takes task and a taskq factory for customization, immediate execution\n\texplicit MacroTask(World &world, taskT& task, const MacroTaskQFactory factory)\n        : MacroTask(world,task, std::shared_ptr<MacroTaskQ>(new MacroTaskQ(factory))) {\n    \timmediate_execution=true;\n    }\n\n\t/// constructor takes the task, and a taskq, execution is not immediate\n\texplicit MacroTask(World &world, taskT &task, std::shared_ptr<MacroTaskQ> taskq_ptr)\n\t\t\t: task(task), world(world), taskq_ptr(taskq_ptr) {\n\n    \t// someone might pass in a taskq nullptr\n    \timmediate_execution=false;\t// will be reset by the forwarding constructors\n    \tif (this->taskq_ptr==0) {\n    \t\tthis->taskq_ptr=std::make_shared<MacroTaskQ>(MacroTaskQFactory(world));\n    \t\timmediate_execution=true;\n    \t}\n\n    \tif (debug) this->taskq_ptr->set_printlevel(20);\n    \t// set the cloud policies\n    \tauto cloud_storage_policy = MacroTaskInfo::to_cloud_storage_policy(this->taskq_ptr->get_policy().storage_policy);\n    \tthis->taskq_ptr->cloud.set_storing_policy(cloud_storage_policy);\n    \tthis->taskq_ptr->cloud.set_replication_policy(this->taskq_ptr->get_policy().cloud_distribution_policy);\n\n    }\n\n    MacroTask& set_debug(const bool value) {\n        debug=value;\n    \treturn *this;\n    }\n\n\tstd::shared_ptr<MacroTaskQ> get_taskq() const {\n    \treturn taskq_ptr;\n    }\n\n\n    /// this mimicks the original call to the task functor, called from the universe\n\n    /// store all input to the cloud, create output Function<T,NDIM> in the universe,\n    /// create the batched task and shove it into the taskq. Possibly execute the taskq.\n    template<typename ... Ts>\n    resultT operator()(const Ts &... args) {\n\n        auto argtuple = std::tie(args...);\n        static_assert(std::is_same<decltype(argtuple), argtupleT>::value, \"type or number of arguments incorrect\");\n\n        // partition the argument vector into batches\n        auto partitioner=task.partitioner;\n        if (not partitioner) partitioner.reset(new MacroTaskPartitioner);\n        partitioner->set_nsubworld(world.size());\n        partitionT partition = partitioner->partition_tasks(argtuple);\n\n    \tif (debug and world.rank()==0) print(taskq_ptr->get_policy());\n\n        recordlistT inputrecords = taskq_ptr->cloud.store(world, argtuple);\n        resultT result = task.allocator(world, argtuple);\n        auto outputrecords =prepare_output_records(taskq_ptr->cloud, result);\n\n        // create tasks and add them to the taskq\n        MacroTaskBase::taskqT vtask;\n        for (const auto& batch_prio : partition) {\n            vtask.push_back(\n                    std::shared_ptr<MacroTaskBase>(new MacroTaskInternal(task, batch_prio, inputrecords, outputrecords)));\n        }\n        taskq_ptr->add_tasks(vtask);\n        if (immediate_execution) taskq_ptr->run_all();\n\n        return result;\n    }\nprivate:\n\n\n    /// store *pointers* to the result WorldObject in the cloud and return the recordlist\n    recordlistT prepare_output_records(Cloud &cloud, resultT& result) {\n    \tif constexpr (is_tuple<resultT>::value) {\n    \t\tstatic_assert(check_tuple_is_valid_task_result<resultT,0>(),\n    \t\t\t\t\t\t\"tuple has invalid result type in prepare_output_records\");\n    \t} else {\n    \t\tstatic_assert(is_valid_task_result_v<resultT>, \"unknown result type in prepare_output_records\");\n    \t}\n\n    \tif (debug) print(\"storing pointers to output in cloud\");\n    \t// store an element of the tuple only\n    \tauto store_output_records = [&](const auto& result) {\n    \t\trecordlistT outputrecords;\n    \t\ttypedef std::decay_t<decltype(result)> argT;\n    \t\tif constexpr (is_madness_function<argT>::value) {\n    \t\t\toutputrecords += cloud.store(world, result.get_impl().get()); // store pointer to FunctionImpl\n    \t\t} else if constexpr (is_madness_function_vector<argT>::value) {\n    \t\t\toutputrecords += cloud.store(world, get_impl(result));\n    \t\t} else if constexpr (is_scalar_result<argT>::value) {\n    \t\t\toutputrecords += cloud.store(world, result.get_impl());               // store pointer to ScalarResultImpl\n    \t\t} else if constexpr (is_vector<argT>::value) {\n    \t\t\tif (is_scalar_result<typename argT::value_type>::value) {\n    \t\t\t\t// argT = std::vector<ScalarResult<T>>\n    \t\t\t\tstd::vector<std::shared_ptr<typename argT::value_type::implT>> v;\n    \t\t\t\tfor (const auto& ptr : result) v.push_back(ptr.get_impl());\n    \t\t\t\toutputrecords+=cloud.store(world,v);\n    \t\t\t} else {\n    \t\t\t\tMADNESS_EXCEPTION(\"\\n\\n  unknown vector result type in prepare_input \", 1);\n    \t\t\t}\n    \t\t} else {\n    \t\t\tMADNESS_EXCEPTION(\"should not be here\",1);\n    \t\t}\n    \t\treturn outputrecords;\n    \t};\n\n    \trecordlistT outputrecords;\n        if constexpr (is_tuple<resultT>::value) {\n            // loop over tuple elements -- args is the individual tuple element\n            std::apply([&](auto &&... args) {\n\t\t\t\t(( outputrecords+=store_output_records(args) ), ...);\n\t\t\t}, result);\n        } else {\n        \toutputrecords=store_output_records(result);\n        }\n        return outputrecords;\n    }\n\n\n    class MacroTaskInternal : public MacroTaskIntermediate<MacroTask> {\n\n        typedef decay_tuple<typename taskT::argtupleT> argtupleT;   // removes const, &, etc\n        typedef typename taskT::resultT resultT;\n        recordlistT inputrecords;\n        recordlistT outputrecords;\n    public:\n        taskT task;\n    \tstd::string get_name() const {\n    \t\tif (task.name==\"unknown_task\") return typeid(task).name();\n    \t\treturn task.name;\n    \t}\n\n        MacroTaskInternal(const taskT &task, const std::pair<Batch,double> &batch_prio,\n                          const recordlistT &inputrecords, const recordlistT &outputrecords)\n  \t  : inputrecords(inputrecords), outputrecords(outputrecords), task(task) {\n    \t\tif constexpr (is_tuple<resultT>::value) {\n    \t\t\tstatic_assert(check_tuple_is_valid_task_result<resultT,0>(),\n    \t\t\t\t\t\t\t\"tuple has invalid result type in prepare_output_records\");\n    \t\t} else {\n    \t\t\tstatic_assert(is_valid_task_result_v<resultT>, \"unknown result type in prepare_output_records\");\n    \t\t}\n            this->task.batch=batch_prio.first;\n            this->priority=batch_prio.second;\n        }\n\n\n        void print_me(std::string s=\"\") const override {\n            print(\"this is task\",get_name(),\"with batch\", task.batch,\"priority\",this->get_priority());\n        }\n\n        void print_me_as_table(std::string s=\"\") const override {\n            std::stringstream ss;\n            std::string name=get_name();\n            std::size_t namesize=std::min(std::size_t(28),name.size());\n            name += std::string(28-namesize,' ');\n\n            std::stringstream ssbatch;\n            ssbatch << task.batch;\n            std::string strbatch=ssbatch.str();\n            int nspaces=std::max(int(0),35-int(ssbatch.str().size()));\n            strbatch+=std::string(nspaces,' ');\n\n            ss  << name\n                << std::setw(10) << strbatch\n                << this->print_priority_and_status_to_string();\n            print(ss.str());\n        }\n\n    \t/// accumulate the result of the task into the final result living in the universe\n    \ttemplate<typename resultT1, std::size_t I=0>\n    \ttypename std::enable_if<is_tuple<resultT1>::value, void>::type\n    \taccumulate_into_final_result(World &subworld, resultT1 &final_result, const resultT1 &tmp_result, const argtupleT& argtuple) {\n        \tif constexpr(I < std::tuple_size_v<resultT1>) {\n        \t\tusing elementT = typename std::tuple_element<I, resultT>::type;// use decay types for determining a vector\n        \t\tauto element_final=std::get<I>(final_result);\n        \t\tauto element_tmp=std::get<I>(tmp_result);\n        \t\taccumulate_into_final_result<elementT>(subworld, element_final, element_tmp, argtuple);\n        \t\taccumulate_into_final_result<resultT1,I+1>(subworld, final_result, tmp_result, argtuple);\n        \t}\n        }\n\n    \t/// accumulate the result of the task into the final result living in the universe\n    \ttemplate<typename resultT1>\n    \ttypename std::enable_if<not is_tuple<resultT1>::value, void>::type\n    \taccumulate_into_final_result(World &subworld, resultT1 &result, const resultT1 &result_tmp, const argtupleT& argtuple) {\n        \t\tif constexpr (is_madness_function<resultT1>::value) {\n        \t\t\t// gaxpy can be done in reconstructed or compressed mode\n\t\t\t\t\tTreeState operating_state=result_tmp.get_impl()->get_tensor_type()==TT_FULL ? compressed : reconstructed;\n        \t\t\tresult_tmp.change_tree_state(operating_state);\n        \t\t\tgaxpy(1.0,result,1.0, result_tmp);\n        \t\t} else if constexpr(is_madness_function_vector<resultT1>::value) {\n\t\t\t\t\tTreeState operating_state=result_tmp[0].get_impl()->get_tensor_type()==TT_FULL ? compressed : reconstructed;\n        \t\t\tchange_tree_state(result_tmp,operating_state);\n        \t\t\t// compress(subworld, result_tmp);\n        \t\t\t// resultT1 tmp1=task.allocator(subworld,argtuple);\n        \t\t\t// tmp1=task.batch.template insert_result_batch(tmp1,result_tmp);\n        \t\t\tgaxpy(1.0,result,1.0,result_tmp,false);\n        \t\t\t// was using operator+=, but this requires a fence, which is not allowed here..\n        \t\t\t// result += tmp1;\n        \t\t} else if constexpr (is_scalar_result<resultT1>::value) {\n        \t\t\tgaxpy(1.0, result, 1.0, result_tmp.get_local(), false);\n        \t\t} else if constexpr (is_scalar_result_vector<resultT1>::value) {\n        \t\t\t// resultT1 tmp1=task.allocator(subworld,argtuple);\n        \t\t\t// tmp1=task.batch.template insert_result_batch(tmp1,result_tmp);\n        \t\t\tstd::size_t sz=result.size();\n        \t\t\tfor (size_t i=0; i<sz; ++i) {\n        \t\t\t\tgaxpy(1.0, result[i], 1.0, result_tmp[i].get_local(), false);\n        \t\t\t}\n        \t\t}\n\n        }\n\n    \t/// called by the MacroTaskQ when the task is scheduled\n        void run(World &subworld, Cloud &cloud, MacroTaskBase::taskqT &taskq, const long element, const bool debug,\n        \tconst MacroTaskInfo policy) override {\n        \tio_redirect io(element,get_name()+\"_task\",debug);\n            const argtupleT argtuple = cloud.load<argtupleT>(subworld, inputrecords);\n            argtupleT batched_argtuple = task.batch.copy_input_batch(argtuple);\n\n    \t\tstd::string msg=\"\";\n\t\t\t// maybe move this block to the cloud?\n    \t\tif (policy.storage_policy==MacroTaskInfo::StoreFunctionViaPointer) {\n    \t\t\tdouble cpu0=wall_time();\n    \t\t\tCloud::cloudtimer timer(subworld,cloud.copy_time);\n    \t\t\t// the functions loaded from the cloud are pointers to the universe functions,\n    \t\t\t// retrieve the function coefficients from the universe\n    \t\t\t// aka: turn the current shallow copy into a deep copy\n    \t\t\tif (debug) print(\"loading function coefficients from universe for task\",get_name());\n\n    \t\t\t// loop over the tuple -- copy the functions from the universe to the subworld\n    \t\t\tauto copi = [&](auto& arg) {\n    \t\t\t\ttypedef std::decay_t<decltype(arg)> argT;\n    \t\t\t\tif constexpr (is_madness_function<argT>::value) {\n    \t\t\t\t\targ=copy(subworld, arg);\n    \t\t\t\t} else if constexpr (is_madness_function_vector<argT>::value) {\n    \t\t\t\t\tfor (auto& f : arg) f=copy(subworld,f);\n    \t\t\t\t}\n    \t\t\t};\n\n    \t\t\tunary_tuple_loop(batched_argtuple,copi);\n    \t\t\tdouble cpu1=wall_time();\n    \t\t\tif (debug) {\n    \t\t\t\tio_redirect_cout io2;\n    \t\t\t\tprint(\"copied coefficients for task\",get_name(),\"in\",cpu1-cpu0,\"seconds\");\n    \t\t\t}\n    \t\t}\n\n    \t\ttry {\n\t\t\t    print(\"starting task no\",element, \", '\",get_name(),\"', in subworld\",subworld.id(),\"at time\",wall_time());\n        \t    double cpu0=cpu_time();\n    \t\t\ttask.subworld_ptr=&subworld;\t// give the task access to the subworld\n        \t\tresultT result_batch = std::apply(task, batched_argtuple);\t\t// lives in the subworld, is a batch of the full vector (if applicable)\n        \t    double cpu1=cpu_time();\n\t\t\t    constexpr std::size_t bufsize=256;\n\t\t\t    char buffer[bufsize];\n\t\t    \tstd::snprintf(buffer,bufsize,\"completed task %3ld after %6.1fs at time %6.1fs\\n\",element,cpu1-cpu0,wall_time());\n        \t\tprint(std::string(buffer));\n\n        \t\t// move the result from the batch to the final result, all still in subworld\n        \t\tauto insert_batch = [&](auto& element1, auto& element2) {\n            \t\ttypedef std::decay_t<decltype(element1)> decay_type;;\n        \t\t\tif constexpr (is_vector<decay_type>::value) {\n        \t\t\t\telement1=task.batch.insert_result_batch(element1,element2);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstd::swap(element1,element2);\n\t\t\t\t\t}\n        \t\t};\n        \t\tresultT result_subworld=task.allocator(subworld,argtuple);\n        \t\tif constexpr (is_tuple<resultT>::value) {\n        \t\t\tbinary_tuple_loop(result_subworld, result_batch, insert_batch);\n\t\t\t\t} else {\n\t\t\t\t\tinsert_batch(result_subworld,result_batch);\n\t\t\t\t}\n\n        \t\t// accumulate the subworld-local results into the final, universe result\n        \t\tresultT result_universe=get_output(subworld, cloud);       // lives in the universe\n\n        \t\taccumulate_into_final_result<resultT>(subworld, result_universe, result_subworld, argtuple);\n\n        \t} catch (std::exception& e) {\n        \t\tprint(\"failing task no\",element,\"in subworld\",subworld.id(),\"at time\",wall_time());\n        \t\tprint(e.what());\n        \t\tprint_me_as_table();\n        \t\tprint(\"\\n\\n\");\n        \t\tMADNESS_EXCEPTION(\"failing task\",1);\n        \t}\n\n        };\n\n    \t// this is called after all tasks have been executed and the taskq has ended\n    \tvoid cleanup() override {\n    \t}\n\n    \ttemplate<typename T, std::size_t NDIM>\n    \tstatic Function<T,NDIM> pointer2WorldObject(const std::shared_ptr<FunctionImpl<T,NDIM>> impl) {\n    \t\tFunction<T,NDIM> result;\n    \t\tresult.set_impl(impl);\n    \t\treturn result;\n    \t}\n\n    \ttemplate<typename T, std::size_t NDIM>\n    \tstatic std::vector<Function<T,NDIM>> pointer2WorldObject(const std::vector<std::shared_ptr<FunctionImpl<T,NDIM>>> v_impl) {\n    \t\tstd::vector<Function<T,NDIM>> vresult;\n    \t\tvresult.resize(v_impl.size());\n    \t\tset_impl(vresult,v_impl);\n    \t\treturn vresult;\n    \t}\n\n    \ttemplate<typename T>\n    \tstatic ScalarResult<T> pointer2WorldObject(const std::shared_ptr<ScalarResultImpl<T>> sr_impl) {\n    \t\treturn ScalarResult(sr_impl);\n    \t}\n\n    \ttemplate<typename T>\n    \tstatic std::vector<ScalarResult<T>> pointer2WorldObject(const std::vector<std::shared_ptr<ScalarResultImpl<T>>> v_sr_impl) {\n    \t\tstd::vector<ScalarResult<T>> vresult(v_sr_impl.size());\n    \t\tfor (size_t i=0; i<v_sr_impl.size(); ++i) {\n    \t\t\tvresult[i].set_impl(v_sr_impl[i]);\n\t\t\t}\n    \t\treturn vresult;\n    \t}\n\n        /// return the WorldObjects or the result functions living in the universe\n\n\t\t/// read the pointers to the universe WorldObjects from the cloud,\n\t\t/// convert them to actual WorldObjects and return them\n        resultT get_output(World &subworld, Cloud &cloud) const {\n            resultT result;\n\n\t\t\t// save outputrecords, because they will be consumed by the cloud\n            auto outputrecords1 = this->outputrecords;\n\n            // turn an element of the tuple of pointers into an element of the tuple of WorldObjects\n            auto doit = [&](auto& element) {\n\t            typedef std::decay_t<decltype(element)> elementT;\n\n\t            // load the elements from the cloud -- they contain pointers to WorldObjects\n\t            if constexpr (is_madness_function_vector<elementT>::value) {\n\t\t            typedef typename elementT::value_type::implT implT;\n\t\t            auto ptr_element = cloud.consuming_load<std::vector<std::shared_ptr<implT>>>(\n\t\t\t            subworld, outputrecords1);\n\t\t            element = pointer2WorldObject(ptr_element);\n\t            }\n\t            else if constexpr (is_madness_function<elementT>::value) {\n\t\t            typedef typename elementT::implT implT;\n\t\t            auto ptr_element = cloud.consuming_load<std::shared_ptr<implT>>(subworld, outputrecords1);\n\t\t            element = pointer2WorldObject(ptr_element);\n\t            }\n\t            else if constexpr (is_scalar_result_vector<elementT>::value) {\t// std::vector<ScalarResult<T>>\n\t            \ttypedef typename elementT::value_type ScalarResultT;\n\t            \ttypedef typename ScalarResultT::implT implT;\n\t            \ttypedef std::vector<std::shared_ptr<implT>> vptrT;\n\t\t            auto ptr_element = cloud.consuming_load<vptrT>(subworld, outputrecords1);\n\t\t            element = pointer2WorldObject(ptr_element);\n\t            }\n\t            else if constexpr (is_scalar_result<elementT>::value) {\n\t            \t// elementT is a ScalarResultImpl<T>\n\t            \t// in cloud we store a std::shared_ptr<ScalarResultImpl<T>>\n\t\t            auto ptr_element = cloud.consuming_load<std::shared_ptr<typename elementT::implT>>(subworld, outputrecords1);\n\t\t            element = pointer2WorldObject(ptr_element);\n\t            }\n\t            else {\n\t\t            MADNESS_EXCEPTION(\"confused about the type of the result\", 1);\n\t            }\n            };\n            if constexpr (is_tuple<resultT>::value) {\n\t            static_assert(check_tuple_is_valid_task_result<resultT, 0>(),\n\t                          \"invalid tuple task result -- must be vectors of functions\");\n\t            static_assert(is_tuple<resultT>::value, \"is a tuple\");\n\n\t            // loop over all tuple elements\n\t            //  1. load the pointers to the WorldObjects living in the universe\n\t            //  2. create WorldObjects from the pointers and copy them into the tuple of type resultT\n\n            \t// turn the tuple of pointers into a tuple of WorldObjects\n            \tunary_tuple_loop(result,doit);\n\n\n            } else {\n            \tdoit(result);\n\n            }\n            return result;\n        }\n\n    };\n\n};\n\nclass MacroTaskOperationBase {\npublic:\n    Batch batch;\n\tWorld* subworld_ptr=0;\n\tstd::string name=\"unknown_task\";\n    std::shared_ptr<MacroTaskPartitioner> partitioner=0;\n    MacroTaskOperationBase() : batch(Batch(_, _, _)), partitioner(new MacroTaskPartitioner) {}\n};\n\n\n} /* namespace madness */\n\n#endif /* SRC_MADNESS_MRA_MACROTASKQ_H_ */\n"
  },
  {
    "path": "src/madness/mra/memory_measurement.h",
    "content": "//\n// Created by Florian Bischoff on 2/16/25.\n//\n\n#ifndef MEMORY_MEASUREMENT_H\n#define MEMORY_MEASUREMENT_H\n\n\n#include<madness/world/ranks_and_hosts.h>\n#include<madness/mra/mra.h>\n\nnamespace madness {\n    /// measure the memory usage of all FunctionImpl objects of all worlds\n\n    /// Assuming FunctionImpl are the largest objects in a calculation\n    /// data is kept as key-value pairs in a map: key=world_id,rank,hostname,NDIM, value=#functions,memory_GB\n    class MemoryMeasurer {\n    public:\n        /// forward declaration\n        struct MemKey;\n        struct MemInfo;\n\n        /// measure the memory usage of all objects of all worlds\n        static std::map<MemKey,MemInfo> measure_and_print(World& world) {\n            MemoryMeasurer mm;\n            world.gop.fence();\n            mm.search_all_worlds();\n            world.gop.fence();\n            mm.print_memory_map(world); // will reduce memory_map to rank0 of universe\n            world.gop.fence();\n            // mm.clear_map();\n            return mm.world_memory_map;     // on rank0 only!\n        }\n\n    private:\n        /// get the hostname of this machine, rank-local\n        static std::string get_hostname() {\n            char buffer[256];\n            gethostname(buffer, 256);\n            return std::string(buffer);\n        }\n\n    public:\n        struct MemKey {\n            unsigned long world_id=1;\n            unsigned long rank=0;\n            std::string hostname=\"localhost\";\n            std::size_t DIM=0;\n            MemKey() = default;\n            explicit MemKey(World& world) : world_id(world.id()), rank(world.rank()) {\n                hostname=MemoryMeasurer::get_hostname();\n            }\n\n            template<typename T, std::size_t NDIM>\n            explicit MemKey(const FunctionImpl<T,NDIM>& fimpl) : MemKey(fimpl.world) {\n                DIM=NDIM;\n            }\n            MemKey(const MemKey& other) = default;\n\n            template<typename Archive>\n            void serialize(Archive& ar) const {\n                ar & world_id & rank & hostname & DIM;\n            }\n        };\n        friend bool operator<(const MemKey& lhs, const MemKey& other) {\n            if (lhs.hostname!=other.hostname) return lhs.hostname<other.hostname;\n            if (lhs.world_id!=other.world_id) return lhs.world_id<other.world_id;\n            if (lhs.rank!=other.rank) return lhs.rank<other.rank;\n            return lhs.DIM<other.DIM;\n        }\n\n        struct MemInfo {\n            MemInfo() =default;\n            MemInfo(const MemInfo& other) =default;\n            long num_functions=0;\n            double memory_GB=0.0;\n            template <typename Archive>\n            void serialize(Archive& ar) const {\n                ar & num_functions & memory_GB;\n            }\n        };\n\n        typedef std::map<MemKey,MemInfo> MemInfoMapT;\n\n\n    private:\n        template<typename T, std::size_t NDIM>\n        const FunctionImpl<T,NDIM>* cast_to_funcimpl_ptr(const uniqueidT obj_id) {\n            World& world=*World::world_from_id(obj_id.get_world_id());\n            auto ptr_opt = world.ptr_from_id< WorldObject< FunctionImpl<T,NDIM> > >(obj_id);\n            if (!ptr_opt)\n                MADNESS_EXCEPTION(\"FunctionImpl: remote operation attempting to use a locally uninitialized object\",0);\n            return (dynamic_cast< const FunctionImpl<T,NDIM>*>(*ptr_opt));\n        }\n\n        /// keeps track of the memory usage of all objects of one or many worlds **on this rank**\n        MemInfoMapT world_memory_map;\n        bool debug=false;\n\n        template<typename T, std::size_t NDIM>\n        void add_memory_to_map(const FunctionImpl<T,NDIM>& f) {\n            const double toGB=double(sizeof(T))/(1024*1024*1024); // convert to GB\n            auto sz=f.nCoeff_local();\n            if (debug) print(\"funcimpl<T,\",NDIM,\"> id\",f.id(), \"rank\",f.world.rank(),\"size in GB\",sz*toGB);\n\n            // accumulate the sizes into the world_memory_map\n            world_memory_map[MemKey(f)].num_functions++;\n            world_memory_map[MemKey(f)].memory_GB+=sz*toGB;\n        }\n\n    public:\n\n        /// add all FunctionImpl<T,NDIM> objects of the given world to the memory map\n        /// the memory map is a rank-local object\n        void search_world(World& world) {\n\n            auto all_objects=world.get_object_ids();\n            if (debug and (world.rank()==0)) print(\"objects in this world \",all_objects);\n\n            for (const auto& obj : all_objects) {\n                if (auto funcimpl=cast_to_funcimpl_ptr<double,1>(obj)) add_memory_to_map(*funcimpl);\n                if (auto funcimpl=cast_to_funcimpl_ptr<double,2>(obj)) add_memory_to_map(*funcimpl);\n                if (auto funcimpl=cast_to_funcimpl_ptr<double,3>(obj)) add_memory_to_map(*funcimpl);\n                if (auto funcimpl=cast_to_funcimpl_ptr<double,4>(obj)) add_memory_to_map(*funcimpl);\n                if (auto funcimpl=cast_to_funcimpl_ptr<double,5>(obj)) add_memory_to_map(*funcimpl);\n                if (auto funcimpl=cast_to_funcimpl_ptr<double,6>(obj)) add_memory_to_map(*funcimpl);\n            }\n        }\n\n        /// add all FunctionImpl<T,NDIM> objects **of all worlds** to the memory map\n        /// the memory map is a rank-local object\n        void search_all_worlds() {\n            auto all_worlds=World::get_world_ids(); // all worlds but the default world\n            all_worlds.push_back(World::get_default().id());  // add the default world\n            if (debug) print(\"searching worlds\",all_worlds);\n            for (auto world_id : all_worlds) {\n                if (debug) print(\"searching world\",world_id);\n                World* thisworld=World::world_from_id(world_id);\n                if (World::exists(thisworld)) search_world(*thisworld);\n            }\n        }\n\n        /// reset the memory map\n        void clear_map() {\n            world_memory_map.clear();\n        }\n\n        /// gather all information of the map on rank 0 of the universe\n        void reduce_map(World& universe) {\n            // turn map into vector\n            std::vector<std::pair<MemKey,MemInfo>> memory_vec(world_memory_map.begin(),world_memory_map.end());\n            // gather all data on rank 0\n            memory_vec=universe.gop.concat0(memory_vec);\n            // turn back into map\n            clear_map();\n            for (const auto& [memkey,memval] : memory_vec) {\n                world_memory_map[memkey]=memval;\n            }\n        }\n\n\n        /// given the hostname, return number of ranks and total rss on that node\n        static std::map<std::string,std::pair<int,double>> host_to_nrank_and_rss_map(World& universe) {\n            auto accumulate_left =[](std::pair<int,double>& a, const std::pair<int,double>& b) {\n                a.first++;\n                a.second+=b.second;\n            };\n            auto rank_to_host=rank_to_host_and_rss_map(universe);\n            std::map<std::string,std::pair<int,double>> host_to_rank;\n            for (const auto& [rank,hostname_and_rss] : rank_to_host) {\n                accumulate_left(host_to_rank[hostname_and_rss.first],std::pair<int,double>(rank,hostname_and_rss.second));\n            }\n            return host_to_rank;\n        }\n\n\n        /// accumulate the memory usage of all objects of all worlds for this rank per host\n\n        /// integrate out world and dim from MemKey, result lives on rank 0 only\n        std::vector<std::pair<std::pair<std::string,long>,double>> memory_per_host_and_rank(World& world) const {\n\n            std::map<std::pair<std::string,long>,double> memory_per_host;\n            for (const auto& [memkey,memval] : world_memory_map) {\n                memory_per_host[{memkey.hostname,memkey.rank}]+=memval.memory_GB;\n            }\n\n            // turn map into vector and sort\n            std::vector<std::pair<std::pair<std::string,long>,double>> memory_per_host_vec(memory_per_host.begin(),memory_per_host.end());\n            std::sort(memory_per_host_vec.begin(),memory_per_host_vec.end(),[](const auto& a, const auto& b){return a.first<b.first;});\n\n            return memory_per_host_vec;\n        }\n\n        /// accumulate the memory usage of all objects of all worlds over all ranks per host\n\n        /// integrate out world, dim and rank, only hostname is left\n        std::vector<std::pair<std::string,double>> memory_per_host_all_ranks(\n            const std::vector<std::pair<std::pair<std::string,long>,double>>& mem_per_host_and_rank) const {\n            std::map<std::string,double> mem_per_host;\n            for (auto& [hostname_and_rank,memory] : mem_per_host_and_rank) {\n                auto hostname=hostname_and_rank.first;\n                mem_per_host[hostname]+=memory;\n            }\n            // turn map into vector\n            std::vector<std::pair<std::string,double>> mem_per_host_vec(mem_per_host.begin(),mem_per_host.end());\n            return mem_per_host_vec;\n        }\n\n        /// return the total memory usage over all hosts\n        static double total_memory(const MemInfoMapT& memmap) {\n            double total_memory=0.0;\n            for (const auto& [memkey,memval] : memmap) {\n                total_memory+=memval.memory_GB;\n            }\n            return total_memory;\n        }\n\n        /// return the maximum memory usage over all hosts\n        static double max_memory(const MemInfoMapT& memmap) {\n            double max_memory=0.0;\n            for (const auto& [memkey,memval] : memmap) {\n                if (memval.memory_GB>max_memory) max_memory=memval.memory_GB;\n            }\n            return max_memory;\n        }\n\n        /// return the minimum memory usage over all hosts\n        static double min_memory(const MemInfoMapT& memmap) {\n            double min_memory=std::numeric_limits<double>::max();\n            for (const auto& [memkey,memval] : memmap) {\n                if (memval.memory_GB<min_memory) min_memory=memval.memory_GB;\n            }\n            return min_memory;\n        }\n\n        /// @param[in] msg a message to print before the memory map\n        /// @param[in] world used only for clean printing\n        void print_memory_map(World& world, std::string msg=\"\") {\n            reduce_map(world);\n            world.gop.fence();\n            if (world.rank()==0) {\n                print(\"final memory map:\",msg);\n                print(\"hostname                      world rank  DIM  #funcs  memory_GB\");\n            }\n            constexpr std::size_t bufsize=256;\n            char line[bufsize];\n\n            // print all information\n            world.gop.fence();\n            // turn into vector\n            std::vector<std::pair<MemKey,MemInfo>> memory_vec(world_memory_map.begin(),world_memory_map.end());\n            std::sort(memory_vec.begin(),memory_vec.end(),[](const std::pair<MemKey,MemInfo>& a, const std::pair<MemKey,MemInfo>& b){return a.first<b.first;});\n            for (const auto& [memkey,memval] : memory_vec) {\n                snprintf(line, bufsize, \"%20s %12lu %5lu %5lu %5lu    %e\", memkey.hostname.c_str(), memkey.world_id, memkey.rank, memkey.DIM, memval.num_functions, memval.memory_GB);\n                print(std::string(line));\n            }\n            snprintf(line, bufsize, \"%20s                                   %e\", \"all hosts\", total_memory(world_memory_map));\n            world.gop.fence();\n            \n\n            // print memory on each host\n            auto mem_per_host_and_rank=memory_per_host_and_rank(world);\n            auto host_to_nrank_and_rss=host_to_nrank_and_rss_map(world);\n            if (world.rank()==0) {\n                print(\"memory per host\");\n                auto info=memory_per_host_all_ranks(mem_per_host_and_rank);\n                print(\"hostname                      memory_GB     nrank(universe)  rss_GB/host\");\n                // print(\"hostname                      memory_GB\");\n                for (const auto& [hostname,memory] : info) {\n                    snprintf(line, bufsize, \"%20s          %e       %d           %e\", hostname.c_str(), memory,\n                    host_to_nrank_and_rss[hostname].first, host_to_nrank_and_rss[hostname].second);\n                    print(std::string(line));\n                }\n            }\n            if (world.rank()==0) {\n                auto info=memory_per_host_all_ranks(mem_per_host_and_rank);\n                double total_mem=total_memory(world_memory_map);\n                double total_rss=0.0;\n                for (auto& [hostname,memory] : info) {\n                    total_rss+=host_to_nrank_and_rss[hostname].second;\n                }\n                std::string word=\"all hosts\";\n                snprintf(line, bufsize, \"%20s          %e       %d           %e\",\n                    word.c_str(), total_mem, world.size(), total_rss);\n                print(std::string(line));\n            }\n\n        }\n\n    };\n}\n\n#endif //MEMORY_MEASUREMENT_H\n"
  },
  {
    "path": "src/madness/mra/minmax/Makefile",
    "content": "INCLUDES = -I/home/rjh/install/include -I.\nLIBS = -L/home/rjh/install/lib -lqd -lm\nCXXOPT = -g -O3 -march=native\n# -Wall -Wno-strict-aliasing -Wno-deprecated  -ffast-math -std=c++0x \n#CXXOPT = -mavx -g -O3 -Wall -Wno-strict-aliasing -Wno-deprecated  -ffast-math -std=c++0x -march=native\n#CXXOPT = -g -Wall -Wno-deprecated -ansi -O0\n\n#-ffast-math ... this breaks qd_real\n\nCXXFLAGS = $(INCLUDES) $(CXXOPT)\nCXX = g++\n\ny_signed:\ty_signed.o\n\t$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)\n\ny_varx:\ty_varx.o\n\t$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)\n\nex1:\tex1.o\n\t$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)\n\nyacobi:\tyacobi.o\n\t$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)\n\ny:\ty.o\n\t$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)\n\nyx:\tyx.o\n\t$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)\n\n"
  },
  {
    "path": "src/madness/mra/minmax/y.cc",
    "content": "#include <iostream>\n#include <cmath>\n#include <algorithm>\n#include <vector>\n#include <cassert>\n#include <cstdio>\n#include <qd/qd_real.h>\n#include <ls.h>\n\nusing namespace std;\n\n// template <typename FLOAT>\n// FLOAT myexp(const FLOAT& x) {\n//     FLOAT r = exp(x);\n//     if (isnan(r)) r = numeric_limits<FLOAT>::safe_max();\n//     return r;\n//     // static const FLOAT xmax = log();\n//     // static const FLOAT xmin = -xmax;\n//     // if (x <= xmin) return 0;\n//     // else if (x >= xmax) return numeric_limits<FLOAT>::safe_max();\n//     // else return exp(x);\n// }\n\ntemplate <typename FLOAT>\nclass matrix {\n    std::vector<FLOAT> v;\n    int n, m;\npublic:\n    matrix() : v(), n(0), m(0) {}\n\n    matrix(int n, int m, const FLOAT& value=0) : v(n*m), n(n), m(m) \n    {\n        for (int i=0; i<n*m; i++) v[i] = value;\n    }\n\n    FLOAT& operator()(int i, int j) {\n        return v[i*m + j];\n    }\n\n    const FLOAT& operator()(int i, int j) const {\n        return v[i*m + j];\n    }\n\n    int get_n() const {return n;}\n\n    int get_m() const {return m;}\n};\n\ntemplate <typename t>\nstd::ostream& operator<<(std::ostream& s, const matrix<t>& c) {\n    int n = c.get_n();\n    int m = c.get_m();\n\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<m; j++) {\n            s << c(i,j) << \" \";\n        }\n        if (i != (n-1)) s << endl;\n    }\n\n    return s;\n}\n\n/// easy printing of vectors\ntemplate <typename t>\nstd::ostream& operator<<(std::ostream& s, const std::vector<t>& c) {\n    s << \"[\";\n    typename std::vector<t>::const_iterator it = c.begin();\n    while (it != c.end()) {\n        s << *it;\n        ++it;\n        if (it != c.end()) s << \", \";\n    };\n    s << \"]\";\n    return s;\n}\n\n\ntemplate <typename t>\nt convert(const char* c) {\n    return c;\n}\n\ntemplate <>\ndouble convert<double>(const char* c) {\n    return atof(c);\n}\n\ntemplate<>\nfloat convert<float>(const char* c) {\n    return atof(c);\n}\n\n\ntemplate <typename FLOAT>\nvoid jacobi(int n, matrix<FLOAT>& a, vector<FLOAT>& e, matrix<FLOAT>& v) {\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    static const FLOAT half = convert<FLOAT>(\"0.5\");\n    static const FLOAT one = convert<FLOAT>(\"1.0\");\n    static const FLOAT two = convert<FLOAT>(\"2.0\");\n    static const FLOAT rsqrt2 = one/sqrt(two);\n\n    e = vector<FLOAT>(n,zero);\n    v = matrix<FLOAT>(n,n);\n    \n    const FLOAT tolmin = 2.0*numeric_limits<FLOAT>::epsilon();\n    //cout << \"tolmin \" << tolmin << endl;\n    FLOAT tol = convert<FLOAT>(\"1e-2\");\n\n    const FLOAT tolscale = convert<FLOAT>(\"0.1\");\n    const FLOAT quart = convert<FLOAT>(\"0.25\");\n\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<n; j++) {\n            v(i,j) = zero;\n        }\n        v(i,i) = one;\n    }\n\n    FLOAT maxd = zero ;\n    for (int i=0; i<n; i++) {\n        maxd = max(fabs(a(i,i)),maxd) ;\n    }\n    //cout << \"maxd \" << maxd << endl;\n\n    int nrot;\n    int nrotsum = 0;\n    //cout << \"iter, tol, maxdaij, nrot\" << endl;\n\n    for (int iter=0; iter<50; iter++) {\n        FLOAT maxdaij = zero;\n        nrot = 0;\n        for (int i=0; i<n; i++)  { \n            for (int j=i+1; j<n; j++) {\n                FLOAT aii = a(i,i);\n                FLOAT ajj = a(j,j);\n                FLOAT aij = a(i,j);\n                FLOAT daij = fabs(aij);\n                maxdaij = max(maxdaij,daij/maxd);\n                //cout << \"testing \" << daij << \" \" << tol*maxd << endl;\n                if (daij > tol*maxd) { // screen small elements \n                    FLOAT s = ajj - aii;\n                    FLOAT ds = fabs(s);\n                    if (daij > (tolmin*ds)) { // check for sufficient precision\n                        FLOAT c;\n                        nrot++;\n                        if (tolmin*daij > ds) {\n                            c = s = rsqrt2;\n                        } \n                        else { \n                            FLOAT t = aij/s;\n                            FLOAT u = quart/sqrt(quart+t*t);\n                            c = sqrt(half+u);\n                            s = two*t*u/c;\n                        }\n                        for (int k=0; k<=i; k++) {\n                            FLOAT t = a(k,i);\n                            FLOAT u = a(k,j);\n                            a(k,i) = c*t - s*u;\n                            a(k,j) = s*t + c*u;\n                        }\n\n                        for (int k=i+1; k<j; k++) {\n                            FLOAT t = a(i,k);\n                            FLOAT u = a(k,j) ;\n                            a(i,k) = c*t - s*u ;\n                            a(k,j) = s*t + c*u;\n                        }\n                        a(j,j) = s*aij + c*ajj;\n                        a(i,i) = c*a(i,i) - s*(c*aij - s*ajj);\n                          \n                        for (int k=j; k<n; k++) {\n                            FLOAT t = a(i,k);\n                            FLOAT u = a(j,k);\n                            a(i,k) = c*t - s*u ;\n                            a(j,k) = s*t + c*u ;\n                        }\n                        for (int k=0; k<n; k++) {\n                            FLOAT t = v(i,k) ;\n                            FLOAT u = v(j,k) ;\n                            v(i,k) = c*t - s*u ;\n                            v(j,k) = s*t + c*u ;\n                        }\n                        a(j,i) = a(i,j) = zero ;\n                        maxd = max(max(maxd,fabs(a(i,i))),fabs(a(j,j)));\n                    }\n                }\n            }\n        }\n\n        //cout << iter << \" \" <<  tol << \" \" <<  maxdaij << \" \" <<  nrot << endl;\n\n        nrotsum += nrot;\n        if (nrot == 0 && tol <= tolmin) break;\n\n        tol = min(min(tol,maxdaij*tolscale),maxdaij*maxdaij);\n        tol = max(tol,tolmin);\n    }\n    if (nrot != 0) { \n        cout << \"jacobi iteration did not converge in 50 passes\" << endl;\n    }\n\n    // sort and copy evals\n\n    for (int i=0; i<n; i++) {\n        e[i] = a(i,i);\n        for (int j=0; j<i; j++) {\n            if (e[j] > e[i]) {\n                 swap(e[j],e[i]);\n                 for (int k=0; k<n; k++) {\n                     swap(v(j,k),v(i,k));\n                 }\n            }\n        }\n    }\n\n}\n\n// solves ax=b for symmetric a discarding eigen values less than tol\ntemplate <typename FLOAT>\nvoid LSQ(int n, const matrix<FLOAT>& a, const vector<FLOAT>& b, vector<FLOAT>& x, const FLOAT& tol) {\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    matrix<FLOAT> acopy(a);\n    matrix<FLOAT> v;\n    vector<FLOAT> s;\n\n    jacobi(n, acopy, s, v);\n\n    x = vector<FLOAT>(n,zero);\n\n    //for (int i=0; i<n; i++) cout << \"s \" << i << \" \" << s[i] << endl;\n\n    for (int k=0; k<n; k++) {\n        if (fabs(s[k]) >= tol) {\n            FLOAT sum = zero;\n            for (int j=0; j<n; j++) {\n                sum += v(k,j) * b[j];\n            }\n            sum /= s[k];\n            for (int i=0; i<n; i++) {\n                x[i] += v(k,i) * sum;\n            }\n        }\n        else {\n            cout << \"lsq discarding singular value \" << s[k] << endl;\n        }\n    }\n}\n\n// template <typename FLOAT>\n// void mxm(int n, const FLOAT* a, const FLOAT* b, FLOAT* c) {\n//     for (int i=0; i<n; i++) {\n//         for (int j=0; j<n; j++) {\n//             FLOAT sum = 0.0;\n//             for (int k=0; k<n; k++) {\n//                 sum += a[ind(i,k)] * b[ind(k,j)];\n//             }\n//             c[ind(i,j)] = sum;\n//         }\n//     }\n// }\n\n//#define RECIPX\n#ifdef RECIPX\n// evaluate the target function\ntemplate <typename FLOAT>\nFLOAT target(const FLOAT& x) {\n    return 1/x;\n}\n\n// evaluate the target function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid target(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = 1/x;\n    d1f = -f*f;\n    d2f = -2*f*d1f;\n}\n\n// evaluate the weight function\ntemplate <typename FLOAT>\nFLOAT weight(const FLOAT& x) {\n    return x;\n}\n\n// evaluate the weight function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid weight(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = x;\n    d1f = 1.0;\n    d2f = 0.0;\n}\n#else\n// evaluate the target function\ntemplate <typename FLOAT>\nFLOAT target(const FLOAT& x) {\n    return 1/sqrt(x);\n}\n\n// evaluate the target function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid target(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = 1/sqrt(x);\n    d1f = -0.5*f/x;\n    d2f = -1.5*d1f/x;\n}\n\n// evaluate the weight function\ntemplate <typename FLOAT>\nFLOAT weight(const FLOAT& x) {\n    return sqrt(x);\n}\n\n// evaluate the weight function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid weight(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = sqrt(x);\n    d1f = 0.5*f/x;\n    d2f = -0.5*d1f/x;\n}\n\n#endif\n\n\n// evaluate the function fitted to exponentials\ntemplate <typename FLOAT>\nFLOAT fit(const FLOAT& x, const vector<FLOAT>& p) {\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = p.size()/2;\n    FLOAT sum = zero;\n    for (int i=0; i<n; i++) {\n        sum += exp(p[i] - x*p[i+n]);\n    }\n    return sum;\n}\n\n// evaluate the function and first/second derivatives fitted to exponentials\ntemplate <typename FLOAT>\nvoid fit(const FLOAT& x, const vector<FLOAT>& p, FLOAT& f, FLOAT& g, FLOAT& h) {\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = p.size()/2;\n    f = zero;\n    g = zero;\n    h = zero;\n    for (int i=0; i<n; i++) {\n        FLOAT term = exp(p[i] - x*p[i+n]);\n        f += term;\n        g -= p[i+n]*term;\n        h += p[i+n]*p[i+n]*term;\n    }\n}\n\n\ntemplate <typename FLOAT>\nvoid plot(int npt, const FLOAT& a, const FLOAT& b, const vector<FLOAT>& p) \n{\n    FLOAT h = pow(b/a,FLOAT(1)/(npt-1));\n    FLOAT x = a;\n    for (int i=0; i<npt; i++) {\n        cout << x << \" \" <<  (fit(x,p) - target(x))*weight(x) << endl;\n        x *= h;\n    }\n}\n\n\n// basis function mu is g[mu](x) = exp(p[mu] - x*p[mu+n])\n// \n// non-zero first derivatives\n// dg[mu]/dp[mu] = g[mu]\n// dg[mu]/dp[mu+n] = -x*g[mu]\n//\n// non-zero second derivatives \n// d2g[mu]/dp[mu]dp[mu] = g[mu]\n// d2g[mu]/dp[mu]dp[mu+n] = -x*g[mu]\n// d2g[mu]/dp[mu+n]dp[mu+n] = x^2*g[mu]\n//\n// g(i,mu) = g[mu](x[i])\n// eps[i] = sum(mu, g(i,mu)) - f(x[i])\n//\n// d0 = sum(i=0..npt-2, (eps[i]+eps[i+1])^2)\n// d1_mu = dd0/dp[mu] = 2 sum(i, eps[i] * \n// \n// x[2*n+1]\n// p[2*n]\n// d1[2*n]\n// d2[2*n,2*n]\ntemplate <typename FLOAT>\nvoid makedata(const vector<FLOAT>& x, const vector<FLOAT>& f, const vector<FLOAT>& p, \n              FLOAT& d0, vector<FLOAT>& d1, matrix<FLOAT>& d2, bool d0only=false) \n{\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    const int n = p.size()/2; // number of exponentials\n    const int npt = x.size();    // number of values x\n    //assert((unsigned) npt == x.size());\n\n    \n    // make basis functions and error values at grid points\n    matrix<FLOAT> g(npt,n);\n    vector<FLOAT> eps(npt);\n    vector<FLOAT> w(npt);\n    for (int i=0; i<npt; i++) {\n        FLOAT sum = zero;\n        for (int mu=0; mu<n; mu++) {\n            g(i,mu) = exp(p[mu] - x[i]*p[mu+n]); // note constraint of positive coeffs\n            sum += g(i,mu);\n        }\n        w[i] = weight(x[i]);\n        eps[i] = (sum - f[i])*w[i];\n    }\n\n    d0 = zero;\n    for (int i=0; i<npt-1; i++) \n        d0 += (eps[i]+eps[i+1])*(eps[i]+eps[i+1]);\n\n    if (d0only) return;\n\n    // make derivatives of eps\n    matrix<FLOAT> deps1(npt, 2*n, zero);  // d/dp[mu] \n    matrix<FLOAT> deps2a(npt, n, zero); // d2/dp[mu]^2\n    matrix<FLOAT> deps2b(npt, n, zero); // d2/dp[mu]dp[mu+n]\n    matrix<FLOAT> deps2c(npt, n, zero); // d2/dp[mu+n]dp[mu+n]\n    for (int i=0; i<npt; i++) {\n        for (int mu=0; mu<n; mu++) {\n            deps1(i,mu) = g(i,mu)*w[i];\n            deps1(i,mu+n) = -x[i]*g(i,mu)*w[i];\n            deps2a(i,mu) = g(i,mu)*w[i];\n            deps2b(i,mu) = -x[i]*g(i,mu)*w[i];\n            deps2c(i,mu) = x[i]*x[i]*g(i,mu)*w[i];\n        }\n    }\n\n    // assemble derivatives of the target function now\n    // just using the chain rule\n    d1 = vector<FLOAT>(2*n,zero);\n    d2 = matrix<FLOAT>(2*n,2*n,zero);\n\n    for (int i=0; i<(npt-1); i++) {\n        for (int mu=0; mu<2*n; mu++) {\n            d1[mu] += 2 * (eps[i]+eps[i+1]) * (deps1(i,mu) + deps1(i+1,mu));\n            for (int nu=0; nu<2*n; nu++) {\n                d2(mu,nu) += 2 * (deps1(i,mu)+deps1(i+1,mu)) * (deps1(i,nu) + deps1(i+1,nu));\n            }\n        }\n    }\n    \n    for (int i=0; i<(npt-1); i++) {\n        for (int mu=0; mu<n; mu++) {\n            d2(mu,mu) += 2 * (eps[i]+eps[i+1]) * (deps2a(i,mu) + deps2a(i+1,mu));\n            \n            d2(mu+n,mu) += 2 * (eps[i]+eps[i+1]) * (deps2b(i,mu) + deps2b(i+1,mu));\n            d2(mu,mu+n) += 2 * (eps[i]+eps[i+1]) * (deps2b(i,mu) + deps2b(i+1,mu));\n            \n            d2(mu+n,mu+n) += 2 * (eps[i]+eps[i+1]) * (deps2c(i,mu) + deps2c(i+1,mu));\n        }\n    }\n}\n\ntemplate <typename FLOAT> \nclass Func {\n    const vector<FLOAT>& x;\n    const vector<FLOAT>& f;\n    const vector<FLOAT>& p;\n    const vector<FLOAT>& dp;\n    mutable vector<FLOAT> pnew;\n\npublic:\n    Func(const vector<FLOAT>& x, const vector<FLOAT>&f, const vector<FLOAT>& p, const vector<FLOAT>& dp) \n        : x(x), f(f), p(p), dp(dp), pnew(dp.size())\n    {}\n\n    FLOAT operator()(const FLOAT& s) const {\n        for (unsigned int i=0; i<p.size(); i++) {\n            pnew[i] = p[i] - s*dp[i];\n        }\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n        makedata(x, f, pnew, d0, d1, d2, true);\n\n        if (isnan(d0)) d0 = numeric_limits<FLOAT>::safe_max();\n\n        return d0;\n    }\n};\n\ntemplate <typename FLOAT> \nvector<FLOAT> opt(const vector<FLOAT>& x, const vector<FLOAT>& f, const vector<FLOAT>& w, const vector<FLOAT>& guess, int maxiter)\n{\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    static const FLOAT one = convert<FLOAT>(\"1.0\");\n    static const FLOAT half = convert<FLOAT>(\"0.5\");\n    vector<FLOAT> p = guess;\n    const int n = p.size();\n\n    const int nprint = 100;\n    \n    for (int iter=0; iter<maxiter; iter++) {\n        const bool print = (iter%nprint) == 0;\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n\n        makedata(x, f, p, d0, d1, d2, false);\n        \n        if (print) {\n            cout << \"\\n\\niteration \" << iter << \" \" << d0 << endl << endl;\n            //cout << \" p \" << p << endl;\n            //cout << \" d \" << d1 << endl << endl;\n        }\n\n\n        bool alternating = true;\n        FLOAT errprev = 0;\n        FLOAT convtol = 0;\n        for (unsigned int i=0; i<x.size(); i++) {\n            FLOAT err = (fit(x[i],p)-f[i])*w[i];\n            if (i>0 && err*errprev>0) alternating=false;\n            errprev = err;\n            convtol += err*err;\n            if (print) cout << \" err \" << i << \" \" << x[i] << \" \" << err << endl;\n        }\n        convtol *= 1e-5 / n;\n        if (print) cout << iter << \" \" << d0 << \" \" << alternating << endl;\n\n        if (iter > 10 && d0 < convtol && alternating) {\n            cout << \"\\nconverged \" << iter << \" \" << d0 << \" \" << convtol << endl << endl;\n            break;\n        }\n        \n        matrix<FLOAT> v;\n        vector<FLOAT> e;\n        jacobi(n, d2, e, v);\n\n        //if (print) {cout << \"eigenvalues \" << e << endl;}\n\n        vector<FLOAT> dp(n,zero);\n        FLOAT tol;\n\n        //if ((iter%10) == 0) tol = e[n/3];\n        //else if ((iter%3) == 1) tol = e[2*n/3];\n        //else \n            tol = 1000.0*numeric_limits<FLOAT>::epsilon();\n        \n        for (int k=0; k<n; k++) {\n            if (e[k] < -tol) {\n                //cout << \" making negative eigenvalue positive \" << k << \" \" << e[k] << endl;\n                e[k] = one/min(one,-e[k]);\n            }\n            else if (e[k] < tol) {\n                //cout << \" small eigenvalue \" << k << \" \" << e[k] << endl;\n                e[k] = one/tol;\n            }\n            else {\n                e[k] = one/e[k];\n            }\n\n            FLOAT sum = zero;\n            for (int j=0; j<n; j++) {\n                sum += v(k,j) * d1[j];\n            }\n            //if (print) {cout << \" dmode : \" << k << \" \" << sum << endl;}\n            sum *= e[k];\n            for (int i=0; i<n; i++) {\n                dp[i] += v(k,i) * sum;\n            }\n        }\n\n        //cout << \"\\ndp \" << dp << endl << endl;\n\n        FLOAT pnorm=zero, dpnorm=zero;\n        for (int i=0; i<n; i++) {\n            pnorm += p[i]*p[i];\n            dpnorm += dp[i]*dp[i];\n        }\n        pnorm = sqrt(pnorm);\n        dpnorm = sqrt(dpnorm);\n\n        vector<FLOAT> pnew(n);\n        FLOAT s = min(one, 0.05*pnorm/dpnorm);\n        FLOAT d0new;\n        \n        // exponents must be positive\n        for (int i=n/2; i<n; i++) {\n            if (p[i] - s*dp[i] < 0) s = min(s,p[i]/(5*dp[i]));\n        }\n        \n        Func<FLOAT> func(x, f, p, dp);\n\n        do  {\n            \n            d0new = func(s);\n            //cout << \"        s \" << s << \"  d0 old \" << d0 << \"  d0 new \" << d0new << endl;\n\n            if (d0new < d0 && !isnan(d0new)) break;\n            else s *= half;\n        } while (s > 1e-20);\n\n        FLOAT ax=0, bx=s, cx, fa=d0, fb=d0new, fc, snew;\n        mnbrak(&ax, &bx, &cx, &fa, &fb, &fc, func);\n        d0new = brent(ax, bx, cx, func, FLOAT(1e-6), &s);\n\n        for (int i=0; i<n; i++) {\n            pnew[i] = p[i] - s*dp[i];\n        }\n\n\n        p = pnew;\n        if (print) cout << \"      s \" << s << \"  d0 old \" << d0 << \"  d0 new \" << d0new << endl;\n    }\n    return p;\n}\n\n\ntemplate <typename FLOAT>\nvector<FLOAT> updatex(const vector<FLOAT>& x, const vector<FLOAT>& p) \n{\n    static const FLOAT one = 1;\n\n    const FLOAT a = x[0];\n    const FLOAT b = x[x.size()-1];\n    const int npt = 30*x.size();\n    const FLOAT h = pow(b/a, one/npt);\n    cout << \"update x: h = \" << h << endl;\n\n    // bracket min/max then use newton\n    //  f(x-h) f(x) f(x+h)\n    //        >    >       decreasing to right\n    //        <    >       maximum\n    //        >    <       minimum\n    //        <    <       increasing to right\n    \n    vector<FLOAT> xnew;\n    xnew.push_back(a);\n    FLOAT f2m = fit(a,p)   - target(a);\n    FLOAT f1m = fit(a*h,p) - target(a*h);\n    FLOAT xx = a*h*h;\n    while (xx < b) {\n        FLOAT f0m = (fit(xx,p) - target(xx))*weight(xx);\n\n        if ( (f2m<f1m && f1m>f0m) || (f2m>f1m && f1m<f0m) ) {\n            FLOAT f, df1, df2, t, dt1, dt2, w, dw1, dw2, g, dg1, dg2;\n            FLOAT yy = xx;\n            // Three iterations of Newton to converge\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE A: \" << yy << \" \" <<g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE B: \" << yy << \" \" <<g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE C: \" <<  yy << \" \" << g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n\n            xnew.push_back(yy);\n        }\n\n        xx *= h;\n        f2m = f1m;\n        f1m = f0m;\n    }\n    xnew.push_back(b);\n\n    if (xnew.size() != p.size()+1) {\n        cout << x << endl;\n        cout << xnew << endl;\n        throw \"darn it\";\n    }\n\n    return xnew;\n}\n\ntemplate <typename FLOAT>\nvoid test() {\n    const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = 5;\n    matrix<FLOAT> a(n,n), acopy(n,n);\n    vector<FLOAT> x(n), xcopy(n), b(n);\n    \n    cout.precision(numeric_limits<FLOAT>::digits10);\n\n    for (int i=0; i<n; i++) {\n        xcopy[i] = sqrt(FLOAT(i+2));\n        for (int j=0; j<=i; j++) {\n            a(i,j) = a(j,i) = FLOAT(1 + i*j)/FLOAT(i*i + j*j + i*j + 1);\n        }\n    }\n\n    for (int i=0; i<n; i++) {\n        FLOAT sum = 0.0;\n        for (int j=0; j<n; j++) {\n            acopy(i,j) = a(i,j);\n            sum += a(i,j)*xcopy[j];\n        }\n        b[i] = sum;\n    }\n    \n    matrix<FLOAT> u;\n    vector<FLOAT> e;\n    jacobi(n, a, e, u);\n    \n    FLOAT err = zero;\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<n; j++) {\n            FLOAT sum = zero;\n            for (int k=0; k<n; k++) {\n                sum += u(k,i) * e[k] * u(k,j);\n            }\n            err += fabs(sum - acopy(i,j));\n        }\n    }\n    \n    cout << \"    error in recontructed matrix \" << err << endl;\n    \n    // for (int i=0; i<n; i++) {\n    //     cout << \"eigenvalue \" << i << \" \" << e[i] << endl;\n    //     for (int j=0; j<n; j++) {\n    //         cout << \"    \" << u[i*n+j] << endl;\n    //     }\n    // }\n\n    const FLOAT tol = 100.0*numeric_limits<FLOAT>::epsilon();\n    LSQ(n, acopy, b, x, tol);\n    \n    err = zero;\n    for (int i=0; i<n; i++) err += fabs(x[i] - xcopy[i]);\n    cout << \"    error in linear solution \" << err << endl;\n\n    // \n    {\n        static const FLOAT one = 1;\n        static const FLOAT pi = 4*atan(FLOAT(1));\n        cout << pi << endl;\n        const FLOAT a = 1e-14;\n        const FLOAT b = 1e0;\n        const int nfunc = 20;\n        const int nx = 2*nfunc + 1;\n        vector<FLOAT> x(nx), p(2*nfunc), f(nx), w(nx);\n        if (nx < 4) throw \"nx must be >= 4\";\n#ifdef RECIPX\n        FLOAT rx = pow(b/a,one/(nx - 1 - 2));\n        FLOAT xxx;\n        x[0] = a;\n        x[1] = a*pow(rx,one/3);\n        x[2] = xxx = a*rx;\n        for (int i=2; i<nx-2; i++) {\n            x[i] = xxx;\n            xxx *= rx;\n        }\n        x[nx-1] = b;\n        x[nx-2] = b/pow(rx,one/3);\n        x[nx-3] = b/rx;\n#else\n        FLOAT rx = pow(b/a,one/(nx - 1));\n        FLOAT xxx;\n        xxx = x[0] = a;\n        for (int i=1; i<nx-1; i++) {\n            xxx *= rx;\n            x[i] = xxx;\n        }\n        x[nx-1] = b;\n#endif\n\n        // cheby points\n        // for (int i=1; i<=nx; i++) {\n        //     x[i-1] = exp(0.5*(log(a)+log(b)) + 0.5*(log(a)-log(b))*cos((2*i-1)*pi/(2*nx)));\n        // }\n        //x[0] = a;\n        //x[nx-1] = b;\n\n        for (int i=0; i<nx; i++) {\n            f[i] = target(x[i]);\n            w[i] = weight(x[i]);\n        }\n\n        FLOAT tmax = 2.3/(x[1]-x[0]);\n        FLOAT tmin = 0.11/(b-a);\n        FLOAT dt = pow(tmax/tmin,one/(nfunc-1));\n        \n        for (int mu=0; mu<nfunc; mu++) {\n#ifdef RECIPX\n            p[mu] = log(tmin*dt);\n#else\n            p[mu] = log(tmin*dt)*0.5;\n#endif            \n            p[mu+nfunc] = tmin;\n            tmin *= dt;\n        }\n\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n        makedata(x, f, p, d0, d1, d2, false);\n\n        cout << \"x\" << endl;\n        cout << x << endl << endl;\n        cout << \"f\" << endl;\n        cout << f << endl << endl;\n        cout << \"p\" << endl;\n        cout << p << endl << endl;\n        // cout << \"d0\" << endl;\n        // cout << d0 << endl << endl;\n        // cout << \"d1\" << endl;\n        // cout << d1 << endl << endl;\n        // cout << \"d2\" << endl;\n        // cout << d2 << endl << endl;\n        \n        // FLOAT h(0.01);//sqrt(numeric_limits<FLOAT>::epsilon()));\n        // FLOAT plus, minus, pp, mp, pm, mm;\n\n        // cout << \"numerical d1\\n\";\n        // for (int mu=0; mu<2*nfunc; mu++) {\n        //     p[mu] += h;\n        //     makedata(x, f, p, plus, d1, d2, true);\n        //     p[mu] -= h+h;\n        //     makedata(x, f, p, minus, d1, d2, true);\n        //     p[mu] += h;\n        //     //cout << plus << \" \" << minus << endl;\n        //     cout << (plus-minus)/(2*h) << \" \";\n        // }\n        // cout << endl << endl;\n\n        // cout << \"numerical d2\\n\";\n        // for (int mu=0; mu<2*nfunc; mu++) {\n        //     for (int nu=0; nu<2*nfunc; nu++) {\n        //         if (mu == nu) {\n        //             p[mu] += h;\n        //             makedata(x, f, p, plus, d1, d2, true);\n        //             p[mu] -= h+h;\n        //             makedata(x, f, p, minus, d1, d2, true);\n        //             p[mu] += h;\n        //             cout << (plus+minus-2*d0)/(h*h) << \" \";\n        //         }\n        //         else {\n        //             p[mu] += h; p[nu] += h;\n        //             makedata(x, f, p, pp, d1, d2, true);\n        //             p[mu] -= h+h;\n        //             makedata(x, f, p, mp, d1, d2, true);\n        //             p[mu] += h+h;\n        //             p[nu] -= h+h;\n        //             makedata(x, f, p, pm, d1, d2, true);\n        //             p[mu] -= h+h;\n        //             makedata(x, f, p, mm, d1, d2, true);\n        //             p[nu] += h;\n        //             p[mu] += h;\n        //             cout << (pp + mm - mp - pm)/(4*h*h) << \" \";\n        //         }\n        //     }\n        //     cout << endl;\n        // }\n        // cout << endl;\n\n        for (int iter=0; iter<10; iter++) {\n            p = opt(x, f, w, p, 2000000);\n            cout << \"Converged parameters\" << endl;\n            for (int mu=0; mu<nfunc; mu++) {\n                cout << mu << \" \" << p[mu] << \" \" << p[mu+nfunc] << endl;\n            }\n            cout << endl;\n            plot(1001, a, b, p);\n            cout << endl;\n            x = updatex(x, p);\n            cout << \"Updated x \" << x << endl;\n            for (int i=0; i<nx; i++) {\n                f[i] = target(x[i]);\n                w[i] = weight(x[i]);\n            }\n        }\n    }\n}\n\nint main() {\n    //std::cout << \"FLOAT \" << endl;\n    //test<float>();\n    //std::cout << \"DOUBLE \" << endl;\n    //test<double>();\n    std::cout << \"DoubleDOUBLE \" << endl;\n    test<dd_real>();\n    //std::cout << \"QuadDOUBLE \" << endl;\n    //test<qd_real>();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/mra/minmax/y1.cc",
    "content": "#include <iostream>\n#include <cmath>\n#include <algorithm>\n#include <vector>\n#include <cassert>\n#include <cstdio>\n#include <qd/qd_real.h>\n#include <ls.h>\n\nusing namespace std;\n\n// template <typename FLOAT>\n// FLOAT myexp(const FLOAT& x) {\n//     FLOAT r = exp(x);\n//     if (isnan(r)) r = numeric_limits<FLOAT>::safe_max();\n//     return r;\n//     // static const FLOAT xmax = log();\n//     // static const FLOAT xmin = -xmax;\n//     // if (x <= xmin) return 0;\n//     // else if (x >= xmax) return numeric_limits<FLOAT>::safe_max();\n//     // else return exp(x);\n// }\n\ntemplate <typename FLOAT>\nclass matrix {\n    std::vector<FLOAT> v;\n    int n, m;\npublic:\n    matrix() : v(), n(0), m(0) {}\n\n    matrix(int n, int m, const FLOAT& value=0) : v(n*m), n(n), m(m) \n    {\n        for (int i=0; i<n*m; i++) v[i] = value;\n    }\n\n    FLOAT& operator()(int i, int j) {\n        return v[i*m + j];\n    }\n\n    const FLOAT& operator()(int i, int j) const {\n        return v[i*m + j];\n    }\n\n    int get_n() const {return n;}\n\n    int get_m() const {return m;}\n};\n\ntemplate <typename t>\nstd::ostream& operator<<(std::ostream& s, const matrix<t>& c) {\n    int n = c.get_n();\n    int m = c.get_m();\n\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<m; j++) {\n            s << c(i,j) << \" \";\n        }\n        if (i != (n-1)) s << endl;\n    }\n\n    return s;\n}\n\n/// easy printing of vectors\ntemplate <typename t>\nstd::ostream& operator<<(std::ostream& s, const std::vector<t>& c) {\n    s << \"[\";\n    typename std::vector<t>::const_iterator it = c.begin();\n    while (it != c.end()) {\n        s << *it;\n        ++it;\n        if (it != c.end()) s << \", \";\n    };\n    s << \"]\";\n    return s;\n}\n\ntemplate <typename FLOAT>\nFLOAT b(int j, FLOAT z) {\n    if (j == 0) return 0;\n    else if (j&1) return z;\n    else return 1;\n}\n\ntemplate <typename FLOAT>\nFLOAT a(int j, FLOAT z) {\n    static const FLOAT v = 1;\n    if (j==1) return exp(-z);\n    else if (j&1) return j/2;\n    else return v+(j-1)/2;\n}\n\n\ntemplate <typename FLOAT>\nFLOAT cfrac(FLOAT z) {\n    static const FLOAT eps = 2.0*numeric_limits<FLOAT>::epsilon();\n    static const FLOAT tiny = eps*eps;\n    static const FLOAT one = 1;\n    FLOAT f = b(0,z);\n    if (f == 0) f = tiny;\n\n    FLOAT cjm1 = f;\n    FLOAT djm1 = 0;\n    \n    for (int j=1; j<100000; j++) {\n        FLOAT aj = a(j,z), bj = b(j,z);\n        FLOAT dj = bj + aj * djm1;\n        if (dj == 0) dj = tiny;\n        dj = one/dj;\n\n        FLOAT cj = bj + aj/cjm1;\n        if (cj == 0) cj = tiny;\n\n        FLOAT delta = cj * dj;\n        f *= delta;\n\n        //cout << \"iter \" << j << \" \" << f << endl;\n        if (fabs(delta-one) < eps) return f;\n\n        cjm1 = cj;\n        djm1 = dj;\n    }\n    throw \"too many iterations\";\n}\n\ntemplate <typename FLOAT>\nFLOAT series(FLOAT z) {\n    static const FLOAT eps = 2.0*numeric_limits<FLOAT>::epsilon();\n    static const FLOAT euler = 0.57721566490153286060651209008240243104215933593992359880576723488;\n    FLOAT sum = -euler - log(z) + z;\n    FLOAT term = z;\n    int n=1;\n    while (1) {\n        n++;\n        term *= -z/n;\n        FLOAT r = term/n;\n        sum += r;\n        //cout << n << \" \" << sum << endl;\n        if (fabs(r) < sum*eps) return sum;\n    }\n}\n\ntemplate <typename FLOAT>\nFLOAT e1(FLOAT z) {\n    static const FLOAT two = 2;\n    static const FLOAT zero = 0;\n    if (z>two) return cfrac(z);\n    else if (z>zero) return series(z);\n    else throw \"e1(z) must have z>0\";\n}\n\n\n\ntemplate <typename t>\nt convert(const char* c) {\n    return c;\n}\n\ntemplate <>\ndouble convert<double>(const char* c) {\n    return atof(c);\n}\n\ntemplate<>\nfloat convert<float>(const char* c) {\n    return atof(c);\n}\n\n\ntemplate <typename FLOAT>\nvoid jacobi(int n, matrix<FLOAT>& a, vector<FLOAT>& e, matrix<FLOAT>& v) {\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    static const FLOAT half = convert<FLOAT>(\"0.5\");\n    static const FLOAT one = convert<FLOAT>(\"1.0\");\n    static const FLOAT two = convert<FLOAT>(\"2.0\");\n    static const FLOAT rsqrt2 = one/sqrt(two);\n\n    e = vector<FLOAT>(n,zero);\n    v = matrix<FLOAT>(n,n);\n    \n    const FLOAT tolmin = 2.0*numeric_limits<FLOAT>::epsilon();\n    //cout << \"tolmin \" << tolmin << endl;\n    FLOAT tol = convert<FLOAT>(\"1e-2\");\n\n    const FLOAT tolscale = convert<FLOAT>(\"0.1\");\n    const FLOAT quart = convert<FLOAT>(\"0.25\");\n\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<n; j++) {\n            v(i,j) = zero;\n        }\n        v(i,i) = one;\n    }\n\n    FLOAT maxd = zero ;\n    for (int i=0; i<n; i++) {\n        maxd = max(fabs(a(i,i)),maxd) ;\n    }\n    //cout << \"maxd \" << maxd << endl;\n\n    int nrot;\n    int nrotsum = 0;\n    //cout << \"iter, tol, maxdaij, nrot\" << endl;\n\n    for (int iter=0; iter<50; iter++) {\n        FLOAT maxdaij = zero;\n        nrot = 0;\n        for (int i=0; i<n; i++)  { \n            for (int j=i+1; j<n; j++) {\n                FLOAT aii = a(i,i);\n                FLOAT ajj = a(j,j);\n                FLOAT aij = a(i,j);\n                FLOAT daij = fabs(aij);\n                maxdaij = max(maxdaij,daij/maxd);\n                //cout << \"testing \" << daij << \" \" << tol*maxd << endl;\n                if (daij > tol*maxd) { // screen small elements \n                    FLOAT s = ajj - aii;\n                    FLOAT ds = fabs(s);\n                    if (daij > (tolmin*ds)) { // check for sufficient precision\n                        FLOAT c;\n                        nrot++;\n                        if (tolmin*daij > ds) {\n                            c = s = rsqrt2;\n                        } \n                        else { \n                            FLOAT t = aij/s;\n                            FLOAT u = quart/sqrt(quart+t*t);\n                            c = sqrt(half+u);\n                            s = two*t*u/c;\n                        }\n                        for (int k=0; k<=i; k++) {\n                            FLOAT t = a(k,i);\n                            FLOAT u = a(k,j);\n                            a(k,i) = c*t - s*u;\n                            a(k,j) = s*t + c*u;\n                        }\n\n                        for (int k=i+1; k<j; k++) {\n                            FLOAT t = a(i,k);\n                            FLOAT u = a(k,j) ;\n                            a(i,k) = c*t - s*u ;\n                            a(k,j) = s*t + c*u;\n                        }\n                        a(j,j) = s*aij + c*ajj;\n                        a(i,i) = c*a(i,i) - s*(c*aij - s*ajj);\n                          \n                        for (int k=j; k<n; k++) {\n                            FLOAT t = a(i,k);\n                            FLOAT u = a(j,k);\n                            a(i,k) = c*t - s*u ;\n                            a(j,k) = s*t + c*u ;\n                        }\n                        for (int k=0; k<n; k++) {\n                            FLOAT t = v(i,k) ;\n                            FLOAT u = v(j,k) ;\n                            v(i,k) = c*t - s*u ;\n                            v(j,k) = s*t + c*u ;\n                        }\n                        a(j,i) = a(i,j) = zero ;\n                        maxd = max(max(maxd,fabs(a(i,i))),fabs(a(j,j)));\n                    }\n                }\n            }\n        }\n\n        //cout << iter << \" \" <<  tol << \" \" <<  maxdaij << \" \" <<  nrot << endl;\n\n        nrotsum += nrot;\n        if (nrot == 0 && tol <= tolmin) break;\n\n        tol = min(min(tol,maxdaij*tolscale),maxdaij*maxdaij);\n        tol = max(tol,tolmin);\n    }\n    if (nrot != 0) { \n        cout << \"jacobi iteration did not converge in 50 passes\" << endl;\n    }\n\n    // sort and copy evals\n\n    for (int i=0; i<n; i++) {\n        e[i] = a(i,i);\n        for (int j=0; j<i; j++) {\n            if (e[j] > e[i]) {\n                 swap(e[j],e[i]);\n                 for (int k=0; k<n; k++) {\n                     swap(v(j,k),v(i,k));\n                 }\n            }\n        }\n    }\n\n}\n\n// solves ax=b for symmetric a discarding eigen values less than tol\ntemplate <typename FLOAT>\nvoid LSQ(int n, const matrix<FLOAT>& a, const vector<FLOAT>& b, vector<FLOAT>& x, const FLOAT& tol) {\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    matrix<FLOAT> acopy(a);\n    matrix<FLOAT> v;\n    vector<FLOAT> s;\n\n    jacobi(n, acopy, s, v);\n\n    x = vector<FLOAT>(n,zero);\n\n    //for (int i=0; i<n; i++) cout << \"s \" << i << \" \" << s[i] << endl;\n\n    for (int k=0; k<n; k++) {\n        if (fabs(s[k]) >= tol) {\n            FLOAT sum = zero;\n            for (int j=0; j<n; j++) {\n                sum += v(k,j) * b[j];\n            }\n            sum /= s[k];\n            for (int i=0; i<n; i++) {\n                x[i] += v(k,i) * sum;\n            }\n        }\n        else {\n            cout << \"lsq discarding singular value \" << s[k] << endl;\n        }\n    }\n}\n\n// template <typename FLOAT>\n// void mxm(int n, const FLOAT* a, const FLOAT* b, FLOAT* c) {\n//     for (int i=0; i<n; i++) {\n//         for (int j=0; j<n; j++) {\n//             FLOAT sum = 0.0;\n//             for (int k=0; k<n; k++) {\n//                 sum += a[ind(i,k)] * b[ind(k,j)];\n//             }\n//             c[ind(i,j)] = sum;\n//         }\n//     }\n// }\n\n//#define RECIPX\n#ifdef RECIPX\n// evaluate the target function\ntemplate <typename FLOAT>\nFLOAT target(const FLOAT& x) {\n    return 1/x;\n}\n\n// evaluate the target function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid target(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = 1/x;\n    d1f = -f*f;\n    d2f = -2*f*d1f;\n}\n\n// evaluate the weight function\ntemplate <typename FLOAT>\nFLOAT weight(const FLOAT& x) {\n    return x;\n}\n\n// evaluate the weight function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid weight(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = x;\n    d1f = 1.0;\n    d2f = 0.0;\n}\n#else\n// evaluate the target function\ntemplate <typename FLOAT>\nFLOAT target(const FLOAT& x) {\n    return 1/sqrt(x);\n}\n\n// evaluate the target function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid target(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = 1/sqrt(x);\n    d1f = -0.5*f/x;\n    d2f = -1.5*d1f/x;\n}\n\n// evaluate the weight function\ntemplate <typename FLOAT>\nFLOAT weight(const FLOAT& x) {\n    return sqrt(x);\n}\n\n// evaluate the weight function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid weight(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = sqrt(x);\n    d1f = 0.5*f/x;\n    d2f = -0.5*d1f/x;\n}\n\n#endif\n\n\n// evaluate the function fitted to exponentials\ntemplate <typename FLOAT>\nFLOAT fit(const FLOAT& x, const vector<FLOAT>& p) {\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = p.size()/2;\n    FLOAT sum = zero;\n    for (int i=0; i<n; i++) {\n        sum += exp(p[i] - x*p[i+n]);\n    }\n    return sum;\n}\n\n// evaluate the function and first/second derivatives fitted to exponentials\ntemplate <typename FLOAT>\nvoid fit(const FLOAT& x, const vector<FLOAT>& p, FLOAT& f, FLOAT& g, FLOAT& h) {\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = p.size()/2;\n    f = zero;\n    g = zero;\n    h = zero;\n    for (int i=0; i<n; i++) {\n        FLOAT term = exp(p[i] - x*p[i+n]);\n        f += term;\n        g -= p[i+n]*term;\n        h += p[i+n]*p[i+n]*term;\n    }\n}\n\n\ntemplate <typename FLOAT>\nvoid plot(int npt, const FLOAT& a, const FLOAT& b, const vector<FLOAT>& p) \n{\n    FLOAT h = pow(b/a,FLOAT(1)/(npt-1));\n    FLOAT x = a;\n    for (int i=0; i<npt; i++) {\n        cout << x << \" \" <<  (fit(x,p) - target(x))*weight(x) << endl;\n        x *= h;\n    }\n}\n\n\n// basis function mu is g[mu](x) = exp(p[mu] - x*p[mu+n])\n// \n// non-zero first derivatives\n// dg[mu]/dp[mu] = g[mu]\n// dg[mu]/dp[mu+n] = -x*g[mu]\n//\n// non-zero second derivatives \n// d2g[mu]/dp[mu]dp[mu] = g[mu]\n// d2g[mu]/dp[mu]dp[mu+n] = -x*g[mu]\n// d2g[mu]/dp[mu+n]dp[mu+n] = x^2*g[mu]\n//\n// g(i,mu) = g[mu](x[i])\n// eps[i] = sum(mu, g(i,mu)) - f(x[i])\n//\n// d0 = sum(i=0..npt-2, (eps[i]+eps[i+1])^2)\n// d1_mu = dd0/dp[mu] = 2 sum(i, eps[i] * \n// \n// x[2*n+1]\n// p[2*n]\n// d1[2*n]\n// d2[2*n,2*n]\ntemplate <typename FLOAT>\nvoid makedata(const vector<FLOAT>& x, const vector<FLOAT>& f, const vector<FLOAT>& p, \n              FLOAT& d0, vector<FLOAT>& d1, matrix<FLOAT>& d2, bool d0only=false) \n{\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    const int n = p.size()/2; // number of exponentials\n    const int npt = x.size();    // number of values x\n    //assert((unsigned) npt == x.size());\n\n    \n    // make basis functions and error values at grid points\n    matrix<FLOAT> g(npt,n);\n    vector<FLOAT> eps(npt);\n    vector<FLOAT> w(npt);\n    for (int i=0; i<npt; i++) {\n        FLOAT sum = zero;\n        for (int mu=0; mu<n; mu++) {\n            g(i,mu) = exp(p[mu] - x[i]*p[mu+n]); // note constraint of positive coeffs\n            sum += g(i,mu);\n        }\n        w[i] = weight(x[i]);\n        eps[i] = (sum - f[i])*w[i];\n    }\n\n    d0 = zero;\n    for (int i=0; i<npt-1; i++) \n        d0 += (eps[i]+eps[i+1])*(eps[i]+eps[i+1]);\n\n    if (d0only) return;\n\n    // make derivatives of eps\n    matrix<FLOAT> deps1(npt, 2*n, zero);  // d/dp[mu] \n    matrix<FLOAT> deps2a(npt, n, zero); // d2/dp[mu]^2\n    matrix<FLOAT> deps2b(npt, n, zero); // d2/dp[mu]dp[mu+n]\n    matrix<FLOAT> deps2c(npt, n, zero); // d2/dp[mu+n]dp[mu+n]\n    for (int i=0; i<npt; i++) {\n        for (int mu=0; mu<n; mu++) {\n            deps1(i,mu) = g(i,mu)*w[i];\n            deps1(i,mu+n) = -x[i]*g(i,mu)*w[i];\n            deps2a(i,mu) = g(i,mu)*w[i];\n            deps2b(i,mu) = -x[i]*g(i,mu)*w[i];\n            deps2c(i,mu) = x[i]*x[i]*g(i,mu)*w[i];\n        }\n    }\n\n    // assemble derivatives of the target function now\n    // just using the chain rule\n    d1 = vector<FLOAT>(2*n,zero);\n    d2 = matrix<FLOAT>(2*n,2*n,zero);\n\n    for (int i=0; i<(npt-1); i++) {\n        for (int mu=0; mu<2*n; mu++) {\n            d1[mu] += 2 * (eps[i]+eps[i+1]) * (deps1(i,mu) + deps1(i+1,mu));\n            for (int nu=0; nu<2*n; nu++) {\n                d2(mu,nu) += 2 * (deps1(i,mu)+deps1(i+1,mu)) * (deps1(i,nu) + deps1(i+1,nu));\n            }\n        }\n    }\n    \n    for (int i=0; i<(npt-1); i++) {\n        for (int mu=0; mu<n; mu++) {\n            d2(mu,mu) += 2 * (eps[i]+eps[i+1]) * (deps2a(i,mu) + deps2a(i+1,mu));\n            \n            d2(mu+n,mu) += 2 * (eps[i]+eps[i+1]) * (deps2b(i,mu) + deps2b(i+1,mu));\n            d2(mu,mu+n) += 2 * (eps[i]+eps[i+1]) * (deps2b(i,mu) + deps2b(i+1,mu));\n            \n            d2(mu+n,mu+n) += 2 * (eps[i]+eps[i+1]) * (deps2c(i,mu) + deps2c(i+1,mu));\n        }\n    }\n}\n\ntemplate <typename FLOAT> \nclass Func {\n    const vector<FLOAT>& x;\n    const vector<FLOAT>& f;\n    const vector<FLOAT>& p;\n    const vector<FLOAT>& dp;\n    mutable vector<FLOAT> pnew;\n\npublic:\n    Func(const vector<FLOAT>& x, const vector<FLOAT>&f, const vector<FLOAT>& p, const vector<FLOAT>& dp) \n        : x(x), f(f), p(p), dp(dp), pnew(dp.size())\n    {}\n\n    FLOAT operator()(const FLOAT& s) const {\n        for (unsigned int i=0; i<p.size(); i++) {\n            pnew[i] = p[i] - s*dp[i];\n        }\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n        makedata(x, f, pnew, d0, d1, d2, true);\n\n        if (isnan(d0)) d0 = numeric_limits<FLOAT>::safe_max();\n\n        return d0;\n    }\n};\n\ntemplate <typename FLOAT> \nvector<FLOAT> opt(const vector<FLOAT>& x, const vector<FLOAT>& f, const vector<FLOAT>& w, const vector<FLOAT>& guess, int maxiter)\n{\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    static const FLOAT one = convert<FLOAT>(\"1.0\");\n    static const FLOAT half = convert<FLOAT>(\"0.5\");\n    vector<FLOAT> p = guess;\n    const int n = p.size();\n\n    const int nprint = 100;\n    \n    for (int iter=0; iter<maxiter; iter++) {\n        const bool print = (iter%nprint) == 0;\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n\n        makedata(x, f, p, d0, d1, d2, false);\n        \n        if (print) {\n            cout << \"\\n\\niteration \" << iter << \" \" << d0 << endl << endl;\n            //cout << \" p \" << p << endl;\n            //cout << \" d \" << d1 << endl << endl;\n        }\n\n\n        bool alternating = true;\n        FLOAT errprev = 0;\n        FLOAT convtol = 0;\n        for (unsigned int i=0; i<x.size(); i++) {\n            FLOAT err = (fit(x[i],p)-f[i])*w[i];\n            if (i>0 && err*errprev>0) alternating=false;\n            errprev = err;\n            convtol += err*err;\n            if (print) cout << \" err \" << i << \" \" << x[i] << \" \" << err << endl;\n        }\n        convtol *= 1e-5 / n;\n        if (print) cout << iter << \" \" << d0 << \" \" << alternating << endl;\n\n        if (iter > 10 && d0 < convtol && alternating) {\n            cout << \"\\nconverged \" << iter << \" \" << d0 << \" \" << convtol << endl << endl;\n            break;\n        }\n        \n        matrix<FLOAT> v;\n        vector<FLOAT> e;\n        jacobi(n, d2, e, v);\n\n        //if (print) {cout << \"eigenvalues \" << e << endl;}\n\n        vector<FLOAT> dp(n,zero);\n        FLOAT tol;\n\n        //if ((iter%10) == 0) tol = e[n/3];\n        //else if ((iter%3) == 1) tol = e[2*n/3];\n        //else \n            tol = 1000.0*numeric_limits<FLOAT>::epsilon();\n        \n        for (int k=0; k<n; k++) {\n            if (e[k] < -tol) {\n                //cout << \" making negative eigenvalue positive \" << k << \" \" << e[k] << endl;\n                e[k] = one/min(one,-e[k]);\n            }\n            else if (e[k] < tol) {\n                //cout << \" small eigenvalue \" << k << \" \" << e[k] << endl;\n                e[k] = one/tol;\n            }\n            else {\n                e[k] = one/e[k];\n            }\n\n            FLOAT sum = zero;\n            for (int j=0; j<n; j++) {\n                sum += v(k,j) * d1[j];\n            }\n            //if (print) {cout << \" dmode : \" << k << \" \" << sum << endl;}\n            sum *= e[k];\n            for (int i=0; i<n; i++) {\n                dp[i] += v(k,i) * sum;\n            }\n        }\n\n        //cout << \"\\ndp \" << dp << endl << endl;\n\n        FLOAT pnorm=zero, dpnorm=zero;\n        for (int i=0; i<n; i++) {\n            pnorm += p[i]*p[i];\n            dpnorm += dp[i]*dp[i];\n        }\n        pnorm = sqrt(pnorm);\n        dpnorm = sqrt(dpnorm);\n\n        vector<FLOAT> pnew(n);\n        FLOAT s = min(one, 0.05*pnorm/dpnorm);\n        FLOAT d0new;\n        \n        // exponents must be positive\n        for (int i=n/2; i<n; i++) {\n            if (p[i] - s*dp[i] < 0) s = min(s,p[i]/(5*dp[i]));\n        }\n        \n        Func<FLOAT> func(x, f, p, dp);\n\n        do  {\n            \n            d0new = func(s);\n            //cout << \"        s \" << s << \"  d0 old \" << d0 << \"  d0 new \" << d0new << endl;\n\n            if (d0new < d0 && !isnan(d0new)) break;\n            else s *= half;\n        } while (s > 1e-20);\n\n        FLOAT ax=0, bx=s, cx, fa=d0, fb=d0new, fc, snew;\n        mnbrak(&ax, &bx, &cx, &fa, &fb, &fc, func);\n        d0new = brent(ax, bx, cx, func, FLOAT(1e-6), &s);\n\n        for (int i=0; i<n; i++) {\n            pnew[i] = p[i] - s*dp[i];\n        }\n\n\n        p = pnew;\n        if (print) cout << \"      s \" << s << \"  d0 old \" << d0 << \"  d0 new \" << d0new << endl;\n    }\n    return p;\n}\n\n\ntemplate <typename FLOAT>\nvector<FLOAT> updatex(const vector<FLOAT>& x, const vector<FLOAT>& p) \n{\n    static const FLOAT one = 1;\n\n    const FLOAT a = x[0];\n    const FLOAT b = x[x.size()-1];\n    const int npt = 30*x.size();\n    const FLOAT h = pow(b/a, one/npt);\n    cout << \"update x: h = \" << h << endl;\n\n    // bracket min/max then use newton\n    //  f(x-h) f(x) f(x+h)\n    //        >    >       decreasing to right\n    //        <    >       maximum\n    //        >    <       minimum\n    //        <    <       increasing to right\n    \n    vector<FLOAT> xnew;\n    xnew.push_back(a);\n    FLOAT f2m = fit(a,p)   - target(a);\n    FLOAT f1m = fit(a*h,p) - target(a*h);\n    FLOAT xx = a*h*h;\n    while (xx < b) {\n        FLOAT f0m = (fit(xx,p) - target(xx))*weight(xx);\n\n        if ( (f2m<f1m && f1m>f0m) || (f2m>f1m && f1m<f0m) ) {\n            FLOAT f, df1, df2, t, dt1, dt2, w, dw1, dw2, g, dg1, dg2;\n            FLOAT yy = xx;\n            // Three iterations of Newton to converge\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE A: \" << yy << \" \" <<g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE B: \" << yy << \" \" <<g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE C: \" <<  yy << \" \" << g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n\n            xnew.push_back(yy);\n        }\n\n        xx *= h;\n        f2m = f1m;\n        f1m = f0m;\n    }\n    xnew.push_back(b);\n\n    if (xnew.size() != p.size()+1) {\n        cout << x << endl;\n        cout << xnew << endl;\n        throw \"darn it\";\n    }\n\n    return xnew;\n}\n\ntemplate <typename FLOAT>\nvoid test() {\n    const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = 5;\n    matrix<FLOAT> a(n,n), acopy(n,n);\n    vector<FLOAT> x(n), xcopy(n), b(n);\n    \n    cout.precision(numeric_limits<FLOAT>::digits10);\n\n    for (int i=0; i<n; i++) {\n        xcopy[i] = sqrt(FLOAT(i+2));\n        for (int j=0; j<=i; j++) {\n            a(i,j) = a(j,i) = FLOAT(1 + i*j)/FLOAT(i*i + j*j + i*j + 1);\n        }\n    }\n\n    for (int i=0; i<n; i++) {\n        FLOAT sum = 0.0;\n        for (int j=0; j<n; j++) {\n            acopy(i,j) = a(i,j);\n            sum += a(i,j)*xcopy[j];\n        }\n        b[i] = sum;\n    }\n    \n    matrix<FLOAT> u;\n    vector<FLOAT> e;\n    jacobi(n, a, e, u);\n    \n    FLOAT err = zero;\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<n; j++) {\n            FLOAT sum = zero;\n            for (int k=0; k<n; k++) {\n                sum += u(k,i) * e[k] * u(k,j);\n            }\n            err += fabs(sum - acopy(i,j));\n        }\n    }\n    \n    cout << \"    error in recontructed matrix \" << err << endl;\n    \n    // for (int i=0; i<n; i++) {\n    //     cout << \"eigenvalue \" << i << \" \" << e[i] << endl;\n    //     for (int j=0; j<n; j++) {\n    //         cout << \"    \" << u[i*n+j] << endl;\n    //     }\n    // }\n\n    const FLOAT tol = 100.0*numeric_limits<FLOAT>::epsilon();\n    LSQ(n, acopy, b, x, tol);\n    \n    err = zero;\n    for (int i=0; i<n; i++) err += fabs(x[i] - xcopy[i]);\n    cout << \"    error in linear solution \" << err << endl;\n\n    // \n    {\n        static const FLOAT one = 1;\n        static const FLOAT pi = 4*atan(FLOAT(1));\n        cout << pi << endl;\n        const FLOAT a = 1e-14;\n        const FLOAT b = 1e0;\n        const int nfunc = 20;\n        const int nx = 2*nfunc + 1;\n        vector<FLOAT> x(nx), p(2*nfunc), f(nx), w(nx);\n        if (nx < 4) throw \"nx must be >= 4\";\n#ifdef RECIPX\n        FLOAT rx = pow(b/a,one/(nx - 1 - 2));\n        FLOAT xxx;\n        x[0] = a;\n        x[1] = a*pow(rx,one/3);\n        x[2] = xxx = a*rx;\n        for (int i=2; i<nx-2; i++) {\n            x[i] = xxx;\n            xxx *= rx;\n        }\n        x[nx-1] = b;\n        x[nx-2] = b/pow(rx,one/3);\n        x[nx-3] = b/rx;\n#else\n        FLOAT rx = pow(b/a,one/(nx - 1));\n        FLOAT xxx;\n        xxx = x[0] = a;\n        for (int i=1; i<nx-1; i++) {\n            xxx *= rx;\n            x[i] = xxx;\n        }\n        x[nx-1] = b;\n#endif\n\n        // cheby points\n        // for (int i=1; i<=nx; i++) {\n        //     x[i-1] = exp(0.5*(log(a)+log(b)) + 0.5*(log(a)-log(b))*cos((2*i-1)*pi/(2*nx)));\n        // }\n        //x[0] = a;\n        //x[nx-1] = b;\n\n        for (int i=0; i<nx; i++) {\n            f[i] = target(x[i]);\n            w[i] = weight(x[i]);\n        }\n\n        FLOAT tmax = 2.3/(x[1]-x[0]);\n        FLOAT tmin = 0.11/(b-a);\n        FLOAT dt = pow(tmax/tmin,one/(nfunc-1));\n        \n        for (int mu=0; mu<nfunc; mu++) {\n#ifdef RECIPX\n            p[mu] = log(tmin*dt);\n#else\n            p[mu] = log(tmin*dt)*0.5;\n#endif            \n            p[mu+nfunc] = tmin;\n            tmin *= dt;\n        }\n\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n        makedata(x, f, p, d0, d1, d2, false);\n\n        cout << \"x\" << endl;\n        cout << x << endl << endl;\n        cout << \"f\" << endl;\n        cout << f << endl << endl;\n        cout << \"p\" << endl;\n        cout << p << endl << endl;\n        // cout << \"d0\" << endl;\n        // cout << d0 << endl << endl;\n        // cout << \"d1\" << endl;\n        // cout << d1 << endl << endl;\n        // cout << \"d2\" << endl;\n        // cout << d2 << endl << endl;\n        \n        // FLOAT h(0.01);//sqrt(numeric_limits<FLOAT>::epsilon()));\n        // FLOAT plus, minus, pp, mp, pm, mm;\n\n        // cout << \"numerical d1\\n\";\n        // for (int mu=0; mu<2*nfunc; mu++) {\n        //     p[mu] += h;\n        //     makedata(x, f, p, plus, d1, d2, true);\n        //     p[mu] -= h+h;\n        //     makedata(x, f, p, minus, d1, d2, true);\n        //     p[mu] += h;\n        //     //cout << plus << \" \" << minus << endl;\n        //     cout << (plus-minus)/(2*h) << \" \";\n        // }\n        // cout << endl << endl;\n\n        // cout << \"numerical d2\\n\";\n        // for (int mu=0; mu<2*nfunc; mu++) {\n        //     for (int nu=0; nu<2*nfunc; nu++) {\n        //         if (mu == nu) {\n        //             p[mu] += h;\n        //             makedata(x, f, p, plus, d1, d2, true);\n        //             p[mu] -= h+h;\n        //             makedata(x, f, p, minus, d1, d2, true);\n        //             p[mu] += h;\n        //             cout << (plus+minus-2*d0)/(h*h) << \" \";\n        //         }\n        //         else {\n        //             p[mu] += h; p[nu] += h;\n        //             makedata(x, f, p, pp, d1, d2, true);\n        //             p[mu] -= h+h;\n        //             makedata(x, f, p, mp, d1, d2, true);\n        //             p[mu] += h+h;\n        //             p[nu] -= h+h;\n        //             makedata(x, f, p, pm, d1, d2, true);\n        //             p[mu] -= h+h;\n        //             makedata(x, f, p, mm, d1, d2, true);\n        //             p[nu] += h;\n        //             p[mu] += h;\n        //             cout << (pp + mm - mp - pm)/(4*h*h) << \" \";\n        //         }\n        //     }\n        //     cout << endl;\n        // }\n        // cout << endl;\n\n        for (int iter=0; iter<10; iter++) {\n            p = opt(x, f, w, p, 2000000);\n            cout << \"Converged parameters\" << endl;\n            for (int mu=0; mu<nfunc; mu++) {\n                cout << mu << \" \" << p[mu] << \" \" << p[mu+nfunc] << endl;\n            }\n            cout << endl;\n            plot(1001, a, b, p);\n            cout << endl;\n            x = updatex(x, p);\n            cout << \"Updated x \" << x << endl;\n            for (int i=0; i<nx; i++) {\n                f[i] = target(x[i]);\n                w[i] = weight(x[i]);\n            }\n        }\n    }\n}\n\nint main() {\n    //std::cout << \"FLOAT \" << endl;\n    //test<float>();\n    //std::cout << \"DOUBLE \" << endl;\n    //test<double>();\n    std::cout << \"DoubleDOUBLE \" << endl;\n    test<dd_real>();\n    //std::cout << \"QuadDOUBLE \" << endl;\n    //test<qd_real>();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/mra/minmax/y_signed.cc",
    "content": "#include <iostream>\n#include <cmath>\n#include <algorithm>\n#include <vector>\n#include <cassert>\n#include <cstdio>\n#include <qd/qd_real.h>\n#include <ls.h>\n#include <stdlib.h>\n\nusing namespace std;\n\n// template <typename FLOAT>\n// FLOAT myexp(const FLOAT& x) {\n//     FLOAT r = exp(x);\n//     if (isnan(r)) r = numeric_limits<FLOAT>::safe_max();\n//     return r;\n//     // static const FLOAT xmax = log();\n//     // static const FLOAT xmin = -xmax;\n//     // if (x <= xmin) return 0;\n//     // else if (x >= xmax) return numeric_limits<FLOAT>::safe_max();\n//     // else return exp(x);\n// }\n\ntemplate <typename FLOAT>\nclass matrix {\n    std::vector<FLOAT> v;\n    int n, m;\npublic:\n    matrix() : v(), n(0), m(0) {}\n\n    matrix(int n, int m, const FLOAT& value=0) : v(n*m), n(n), m(m) \n    {\n        for (int i=0; i<n*m; i++) v[i] = value;\n    }\n\n    FLOAT& operator()(int i, int j) {\n        return v[i*m + j];\n    }\n\n    const FLOAT& operator()(int i, int j) const {\n        return v[i*m + j];\n    }\n\n    int get_n() const {return n;}\n\n    int get_m() const {return m;}\n};\n\ntemplate <typename t>\nstd::ostream& operator<<(std::ostream& s, const matrix<t>& c) {\n    int n = c.get_n();\n    int m = c.get_m();\n\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<m; j++) {\n            s << c(i,j) << \" \";\n        }\n        if (i != (n-1)) s << endl;\n    }\n\n    return s;\n}\n\n/// easy printing of vectors\ntemplate <typename t>\nstd::ostream& operator<<(std::ostream& s, const std::vector<t>& c) {\n    s << \"[\";\n    typename std::vector<t>::const_iterator it = c.begin();\n    while (it != c.end()) {\n        s << *it;\n        ++it;\n        if (it != c.end()) s << \", \";\n    };\n    s << \"]\";\n    return s;\n}\n\n\ntemplate <typename t>\nt convert(const char* c) {\n    return c;\n}\n\ntemplate <>\ndouble convert<double>(const char* c) {\n    return atof(c);\n}\n\ntemplate<>\nfloat convert<float>(const char* c) {\n    return atof(c);\n}\n\n\ntemplate <typename FLOAT>\nvoid jacobi(int n, matrix<FLOAT>& a, vector<FLOAT>& e, matrix<FLOAT>& v) {\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    static const FLOAT half = convert<FLOAT>(\"0.5\");\n    static const FLOAT one = convert<FLOAT>(\"1.0\");\n    static const FLOAT two = convert<FLOAT>(\"2.0\");\n    static const FLOAT rsqrt2 = one/sqrt(two);\n\n    e = vector<FLOAT>(n,zero);\n    v = matrix<FLOAT>(n,n);\n    \n    const FLOAT tolmin = 2.0*numeric_limits<FLOAT>::epsilon();\n    //cout << \"tolmin \" << tolmin << endl;\n    FLOAT tol = convert<FLOAT>(\"1e-2\");\n\n    const FLOAT tolscale = convert<FLOAT>(\"0.1\");\n    const FLOAT quart = convert<FLOAT>(\"0.25\");\n\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<n; j++) {\n            v(i,j) = zero;\n        }\n        v(i,i) = one;\n    }\n\n    FLOAT maxd = zero ;\n    for (int i=0; i<n; i++) {\n        maxd = max(fabs(a(i,i)),maxd) ;\n    }\n    //cout << \"maxd \" << maxd << endl;\n\n    int nrot;\n    int nrotsum = 0;\n    //cout << \"iter, tol, maxdaij, nrot\" << endl;\n\n    for (int iter=0; iter<50; iter++) {\n        FLOAT maxdaij = zero;\n        nrot = 0;\n        for (int i=0; i<n; i++)  { \n            for (int j=i+1; j<n; j++) {\n                FLOAT aii = a(i,i);\n                FLOAT ajj = a(j,j);\n                FLOAT aij = a(i,j);\n                FLOAT daij = fabs(aij);\n                maxdaij = max(maxdaij,daij/maxd);\n                //cout << \"testing \" << daij << \" \" << tol*maxd << endl;\n                if (daij > tol*maxd) { // screen small elements \n                    FLOAT s = ajj - aii;\n                    FLOAT ds = fabs(s);\n                    if (daij > (tolmin*ds)) { // check for sufficient precision\n                        FLOAT c;\n                        nrot++;\n                        if (tolmin*daij > ds) {\n                            c = s = rsqrt2;\n                        } \n                        else { \n                            FLOAT t = aij/s;\n                            FLOAT u = quart/sqrt(quart+t*t);\n                            c = sqrt(half+u);\n                            s = two*t*u/c;\n                        }\n                        for (int k=0; k<=i; k++) {\n                            FLOAT t = a(k,i);\n                            FLOAT u = a(k,j);\n                            a(k,i) = c*t - s*u;\n                            a(k,j) = s*t + c*u;\n                        }\n\n                        for (int k=i+1; k<j; k++) {\n                            FLOAT t = a(i,k);\n                            FLOAT u = a(k,j) ;\n                            a(i,k) = c*t - s*u ;\n                            a(k,j) = s*t + c*u;\n                        }\n                        a(j,j) = s*aij + c*ajj;\n                        a(i,i) = c*a(i,i) - s*(c*aij - s*ajj);\n                          \n                        for (int k=j; k<n; k++) {\n                            FLOAT t = a(i,k);\n                            FLOAT u = a(j,k);\n                            a(i,k) = c*t - s*u ;\n                            a(j,k) = s*t + c*u ;\n                        }\n                        for (int k=0; k<n; k++) {\n                            FLOAT t = v(i,k) ;\n                            FLOAT u = v(j,k) ;\n                            v(i,k) = c*t - s*u ;\n                            v(j,k) = s*t + c*u ;\n                        }\n                        a(j,i) = a(i,j) = zero ;\n                        maxd = max(max(maxd,fabs(a(i,i))),fabs(a(j,j)));\n                    }\n                }\n            }\n        }\n\n        //cout << iter << \" \" <<  tol << \" \" <<  maxdaij << \" \" <<  nrot << endl;\n\n        nrotsum += nrot;\n        if (nrot == 0 && tol <= tolmin) break;\n\n        tol = min(min(tol,maxdaij*tolscale),maxdaij*maxdaij);\n        tol = max(tol,tolmin);\n    }\n    if (nrot != 0) { \n        cout << \"jacobi iteration did not converge in 50 passes\" << endl;\n    }\n\n    // sort and copy evals\n\n    for (int i=0; i<n; i++) {\n        e[i] = a(i,i);\n        for (int j=0; j<i; j++) {\n            if (e[j] > e[i]) {\n                 swap(e[j],e[i]);\n                 for (int k=0; k<n; k++) {\n                     swap(v(j,k),v(i,k));\n                 }\n            }\n        }\n    }\n\n}\n\n// solves ax=b for symmetric a discarding eigen values less than tol\ntemplate <typename FLOAT>\nvoid LSQ(int n, const matrix<FLOAT>& a, const vector<FLOAT>& b, vector<FLOAT>& x, const FLOAT& tol) {\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    matrix<FLOAT> acopy(a);\n    matrix<FLOAT> v;\n    vector<FLOAT> s;\n\n    jacobi(n, acopy, s, v);\n\n    x = vector<FLOAT>(n,zero);\n\n    //for (int i=0; i<n; i++) cout << \"s \" << i << \" \" << s[i] << endl;\n\n    for (int k=0; k<n; k++) {\n        if (fabs(s[k]) >= tol) {\n            FLOAT sum = zero;\n            for (int j=0; j<n; j++) {\n                sum += v(k,j) * b[j];\n            }\n            sum /= s[k];\n            for (int i=0; i<n; i++) {\n                x[i] += v(k,i) * sum;\n            }\n        }\n        else {\n            cout << \"lsq discarding singular value \" << s[k] << endl;\n        }\n    }\n}\n\n// template <typename FLOAT>\n// void mxm(int n, const FLOAT* a, const FLOAT* b, FLOAT* c) {\n//     for (int i=0; i<n; i++) {\n//         for (int j=0; j<n; j++) {\n//             FLOAT sum = 0.0;\n//             for (int k=0; k<n; k++) {\n//                 sum += a[ind(i,k)] * b[ind(k,j)];\n//             }\n//             c[ind(i,j)] = sum;\n//         }\n//     }\n// }\n\n//#define RECIPX\n#ifdef RECIPX\n// evaluate the target function\ntemplate <typename FLOAT>\nFLOAT target(const FLOAT& x) {\n    return 1/x;\n}\n\n// evaluate the target function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid target(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = 1/x;\n    d1f = -f*f;\n    d2f = -2*f*d1f;\n}\n\n// evaluate the weight function\ntemplate <typename FLOAT>\nFLOAT weight(const FLOAT& x) {\n    return x;\n}\n\n// evaluate the weight function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid weight(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = x;\n    d1f = 1.0;\n    d2f = 0.0;\n}\n#else\n// evaluate the target function\ntemplate <typename FLOAT>\nFLOAT target(const FLOAT& x) {\n    return 1/sqrt(x);\n}\n\n// evaluate the target function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid target(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = 1/sqrt(x);\n    d1f = -0.5*f/x;\n    d2f = -1.5*d1f/x;\n}\n\n// evaluate the weight function\ntemplate <typename FLOAT>\nFLOAT weight(const FLOAT& x) {\n    return sqrt(x);\n}\n\n// evaluate the weight function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid weight(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    static const FLOAT half = convert<FLOAT>(\"0.5\");\n    f = sqrt(x);\n    d1f = half*f/x;\n    d2f = -half*d1f/x;\n}\n\n#endif\n\n\n// evaluate the function fitted to exponentials\ntemplate <typename FLOAT>\nFLOAT fit(const FLOAT& x, const vector<FLOAT>& p) {\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = p.size()/2;\n    FLOAT sum = zero;\n    for (int i=0; i<n; i++) {\n        sum += p[i] * exp(- x*p[i+n]*p[i+n]);\n    }\n    return sum;\n}\n\n// evaluate the function and first/second derivatives fitted to exponentials\ntemplate <typename FLOAT>\nvoid fit(const FLOAT& x, const vector<FLOAT>& p, FLOAT& f, FLOAT& g, FLOAT& h) {\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = p.size()/2;\n    f = zero;\n    g = zero;\n    h = zero;\n    for (int i=0; i<n; i++) {\n        FLOAT term = p[i] * exp( - x*p[i+n]*p[i+n]);\n        f += term;\n        g -= p[i+n]*p[i+n]*term;\n        h += p[i+n]*p[i+n]*p[i+n]*p[i+n]*term;\n    }\n}\n\n\ntemplate <typename FLOAT>\nvoid plot(int npt, const FLOAT& a, const FLOAT& b, const vector<FLOAT>& p) \n{\n    FLOAT h = pow(b/a,FLOAT(1)/(npt-1));\n    FLOAT x = a;\n    for (int i=0; i<npt; i++) {\n        cout << x << \" \" <<  (fit(x,p) - target(x))*weight(x) << endl;\n        x *= h;\n    }\n}\n\n\n// basis function mu is b[mu](x) = p[mu] * g[mu](x)\n// coeff is p[mu] \n// exponent is p[mu+n]**2\n// g[mu](x) = exp(- x*p[mu+n]*p[mu+n])\n// \n// non-zero first derivatives w.r.t. parameters\n// db[mu]/dp[mu] = g[mu](x)\n// db[mu]/dp[mu+n] = -2*x*p[mu]*p[mu+n]*g[mu]\n//\n// non-zero second derivatives  w.r.t. parameters\n// d2b[mu]/dp[mu]dp[mu] = 0\n// d2b[mu]/dp[mu]dp[mu+n] = -2*x*p[mu+n]*g[mu]\n// d2b[mu]/dp[mu+n]dp[mu+n] = -2*x*p[mu]*g[mu]*(1 - 2*p[mu+n]*p[mu+n]*x)\n//\n// g(i,mu) = g[mu](x[i])\n// eps[i] = sum(mu, p[mu]*g(i,mu)) - f(x[i])\n//\n// d0 = sum(i=0..npt-2, (eps[i]+eps[i+1])^2)\n// d1_mu = dd0/dp[mu] = 2 sum(i, eps[i] * ?????????\n// \n// x[2*n+1]\n// p[2*n]\n// d1[2*n]\n// d2[2*n,2*n]\ntemplate <typename FLOAT>\nvoid makedata(const vector<FLOAT>& x, const vector<FLOAT>& f, const vector<FLOAT>& p, \n              FLOAT& d0, vector<FLOAT>& d1, matrix<FLOAT>& d2, bool d0only=false) \n{\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    static const FLOAT one = convert<FLOAT>(\"1.0\");\n    static const FLOAT two = convert<FLOAT>(\"2.0\");\n    const int n = p.size()/2; // number of exponentials\n    const int npt = x.size();    // number of values x\n    //assert((unsigned) npt == x.size());\n\n    \n    // make basis functions and error values at grid points\n    matrix<FLOAT> g(npt,n);\n    vector<FLOAT> eps(npt);\n    vector<FLOAT> w(npt);\n    for (int i=0; i<npt; i++) {\n        FLOAT sum = zero;\n        for (int mu=0; mu<n; mu++) {\n            g(i,mu) = exp(- x[i]*p[mu+n]*p[mu+n]);\n            sum += p[mu] * g(i,mu);\n        }\n        w[i] = weight(x[i]);\n        eps[i] = (sum - f[i])*w[i];\n    }\n\n    d0 = zero;\n    for (int i=0; i<npt-1; i++) \n        d0 += (eps[i]+eps[i+1])*(eps[i]+eps[i+1]);\n\n    if (d0only) return;\n\n    // make derivatives of eps\n    matrix<FLOAT> deps1(npt, 2*n, zero);  // d/dp[mu] \n    // matrix<FLOAT> deps2a(npt, n, zero); // d2/dp[mu]^2 = zero\n    matrix<FLOAT> deps2b(npt, n, zero); // d2/dp[mu]dp[mu+n]\n    matrix<FLOAT> deps2c(npt, n, zero); // d2/dp[mu+n]dp[mu+n]\n    for (int i=0; i<npt; i++) {\n        for (int mu=0; mu<n; mu++) {\n            deps1(i,mu) = g(i,mu)*w[i];\n            deps1(i,mu+n) = -two*x[i]*p[mu]*p[mu+n]*g(i,mu)*w[i];\n            deps2b(i,mu) = -two*x[i]*p[mu+n]*g(i,mu)*w[i];\n            deps2c(i,mu) = -two*x[i]*p[mu]*g(i,mu)*w[i]*(one - two*x[i]*p[mu+n]*p[mu+n]);\n        }\n    }\n\n    // assemble derivatives of the target function now\n    // just using the chain rule\n    d1 = vector<FLOAT>(2*n,zero);\n    d2 = matrix<FLOAT>(2*n,2*n,zero);\n\n    for (int i=0; i<(npt-1); i++) {\n        for (int mu=0; mu<2*n; mu++) {\n            d1[mu] += 2 * (eps[i]+eps[i+1]) * (deps1(i,mu) + deps1(i+1,mu));\n            for (int nu=0; nu<2*n; nu++) {\n                d2(mu,nu) += 2 * (deps1(i,mu)+deps1(i+1,mu)) * (deps1(i,nu) + deps1(i+1,nu));\n            }\n        }\n    }\n    \n    for (int i=0; i<(npt-1); i++) {\n        for (int mu=0; mu<n; mu++) {\n            d2(mu,mu) += zero;//2 * (eps[i]+eps[i+1]) * (deps2a(i,mu) + deps2a(i+1,mu));\n            \n            d2(mu+n,mu) += 2 * (eps[i]+eps[i+1]) * (deps2b(i,mu) + deps2b(i+1,mu));\n            d2(mu,mu+n) += 2 * (eps[i]+eps[i+1]) * (deps2b(i,mu) + deps2b(i+1,mu));\n            \n            d2(mu+n,mu+n) += 2 * (eps[i]+eps[i+1]) * (deps2c(i,mu) + deps2c(i+1,mu));\n        }\n    }\n}\n\ntemplate <typename FLOAT> \nclass Func {\n    const vector<FLOAT>& x;\n    const vector<FLOAT>& f;\n    const vector<FLOAT>& p;\n    const vector<FLOAT>& dp;\n    mutable vector<FLOAT> pnew;\n\npublic:\n    Func(const vector<FLOAT>& x, const vector<FLOAT>&f, const vector<FLOAT>& p, const vector<FLOAT>& dp) \n        : x(x), f(f), p(p), dp(dp), pnew(dp.size())\n    {}\n\n    FLOAT operator()(const FLOAT& s) const {\n        for (unsigned int i=0; i<p.size(); i++) {\n            pnew[i] = p[i] - s*dp[i];\n        }\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n        makedata(x, f, pnew, d0, d1, d2, true);\n\n        if (isnan(d0)) d0 = numeric_limits<FLOAT>::safe_max();\n\n        return d0;\n    }\n};\n\ntemplate <typename FLOAT> \nvector<FLOAT> opt(const vector<FLOAT>& x, const vector<FLOAT>& f, const vector<FLOAT>& w, const vector<FLOAT>& guess, int maxiter, bool conly=false)\n{\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    static const FLOAT one = convert<FLOAT>(\"1.0\");\n    static const FLOAT half = convert<FLOAT>(\"0.5\");\n    vector<FLOAT> p = guess;\n    const int n = p.size();\n\n    const int nprint = 100;\n\n    const int nstuck = 100;\n    FLOAT prev = one;\n\n    for (int iter=0; iter<maxiter; iter++) {\n        const bool print = (iter%nprint) == 0;\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n\n        makedata(x, f, p, d0, d1, d2, false);\n        \n        if (print) {\n            cout << \"\\n\\niteration \" << iter << \" \" << d0 << endl << endl;\n            //cout << \" p \" << p << endl;\n            //cout << \" d \" << d1 << endl << endl;\n        }\n\n\n        bool alternating = true;\n        FLOAT errprev = 0;\n        FLOAT convtol = 0;\n        for (unsigned int i=0; i<x.size(); i++) {\n            FLOAT err = (fit(x[i],p)-f[i])*w[i];\n            if (i>0 && err*errprev>0) alternating=false;\n            errprev = err;\n            convtol += err*err;\n            if (print) cout << \" err \" << i << \" \" << x[i] << \" \" << err << endl;\n        }\n        convtol *= 1e-5 / n;\n        if (print) cout << iter << \" \" << d0 << \" \" << alternating << endl;\n\n        if (iter > 10 && d0 < convtol && alternating) {\n            cout << \"\\nconverged \" << iter << \" \" << d0 << \" \" << convtol << endl << endl;\n            break;\n        }\n        \n        matrix<FLOAT> v;\n        vector<FLOAT> e;\n        jacobi(n, d2, e, v);\n\n        //if (print) {cout << \"eigenvalues \" << e << endl;}\n\n        vector<FLOAT> dp(n,zero);\n        FLOAT tol;\n\n        //if ((iter%10) == 0) tol = e[n/3];\n        //else if ((iter%3) == 1) tol = e[2*n/3];\n        //else \n            tol = 1000.0*numeric_limits<FLOAT>::epsilon();\n        \n        for (int k=0; k<n; k++) {\n            if (e[k] < -tol) {\n                //cout << \" making negative eigenvalue positive \" << k << \" \" << e[k] << endl;\n                e[k] = one/min(one,-e[k]);\n            }\n            else if (e[k] < tol) {\n                //cout << \" small eigenvalue \" << k << \" \" << e[k] << endl;\n                e[k] = one/tol;\n            }\n            else {\n                e[k] = one/e[k];\n            }\n\n            FLOAT sum = zero;\n            for (int j=0; j<n; j++) {\n                sum += v(k,j) * d1[j];\n            }\n            //if (print) {cout << \" dmode : \" << k << \" \" << sum << endl;}\n            sum *= e[k];\n            for (int i=0; i<n; i++) {\n                dp[i] += v(k,i) * sum;\n            }\n\n            if (conly) {\n                for (int i=n/2; i<n; i++) dp[i] = zero;\n            }\n        }\n\n        //cout << \"\\ndp \" << dp << endl << endl;\n\n        FLOAT pnorm=zero, dpnorm=zero;\n        for (int i=0; i<n; i++) {\n            pnorm += p[i]*p[i];\n            dpnorm += dp[i]*dp[i];\n        }\n        pnorm = sqrt(pnorm);\n        dpnorm = sqrt(dpnorm);\n\n        vector<FLOAT> pnew(n);\n        FLOAT s = min(one, 0.05*pnorm/dpnorm);\n        FLOAT d0new;\n        \n        // // exponents must be positive\n        // for (int i=n/2; i<n; i++) {\n        //     if (p[i] < zero) cout << \"NEGATIVE EXPONENT!\\n\";\n        //     if (p[i] - s*dp[i] < 0) s = 0.5 * p[i] / dp[i];\n        // }\n        // FLOAT maxs = s;\n        \n        Func<FLOAT> func(x, f, p, dp);\n\n        do  {\n            \n            d0new = func(s);\n            //cout << \"        s \" << s << \"  d0 old \" << d0 << \"  d0 new \" << d0new << endl;\n\n            if (d0new < d0 && !isnan(d0new)) break;\n            else s *= half;\n        } while (s > 1e-20);\n\n        FLOAT ax=0, bx=s, cx, fa=d0, fb=d0new, fc, snew;\n        mnbrak(&ax, &bx, &cx, &fa, &fb, &fc, func);\n        d0new = brent(ax, bx, cx, func, FLOAT(1e-6), &s);\n\n        // if (s > maxs) s = maxs;\n\n        for (int i=0; i<n; i++) {\n            pnew[i] = p[i] - s*dp[i];\n        }\n\n        p = pnew;\n        if (print) cout << \"      s \" << s << \"  d0 old \" << d0 << \"  d0 new \" << d0new << endl;\n\n        if ((iter%nstuck) == 0 && iter) {\n            if (fabs(prev - d0new) < 1e-10*prev) {\n                cout << \"STUCK \" << endl;\n                for (int i=n/2; i<n; i++) {\n                    cout << i << \" \" << p[i] << \" \";\n                    p[i] = p[i] * (one + FLOAT(0.125)*(FLOAT(drand48()) - half));\n                    cout << p[i] << endl;\n                }\n            }\n            prev = d0new;\n        }\n\n        cout << \"parameters\\n\" << p << endl;\n    }\n    return p;\n}\n\n\ntemplate <typename FLOAT>\nvector<FLOAT> updatex(const vector<FLOAT>& x, const vector<FLOAT>& p) \n{\n    static const FLOAT one = 1;\n\n    const FLOAT a = x[0];\n    const FLOAT b = x[x.size()-1];\n    const int npt = 30*x.size();\n    const FLOAT h = pow(b/a, one/npt);\n    cout << \"update x: h = \" << h << endl;\n\n    // bracket min/max then use newton\n    //  f(x-h) f(x) f(x+h)\n    //        >    >       decreasing to right\n    //        <    >       maximum\n    //        >    <       minimum\n    //        <    <       increasing to right\n    \n    vector<FLOAT> xnew;\n    xnew.push_back(a);\n    FLOAT f2m = fit(a,p)   - target(a);\n    FLOAT f1m = fit(a*h,p) - target(a*h);\n    FLOAT xx = a*h*h;\n    while (xx < b) {\n        FLOAT f0m = (fit(xx,p) - target(xx))*weight(xx);\n\n        if ( (f2m<f1m && f1m>f0m) || (f2m>f1m && f1m<f0m) ) {\n            FLOAT f, df1, df2, t, dt1, dt2, w, dw1, dw2, g, dg1, dg2;\n            FLOAT yy = xx;\n            // Three iterations of Newton to converge\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE A: \" << yy << \" \" <<g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE B: \" << yy << \" \" <<g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE C: \" <<  yy << \" \" << g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n\n            xnew.push_back(yy);\n        }\n\n        xx *= h;\n        f2m = f1m;\n        f1m = f0m;\n    }\n    xnew.push_back(b);\n\n    if (xnew.size() != p.size()+1) {\n        cout << x << endl;\n        cout << xnew << endl;\n        throw \"darn it\";\n    }\n\n    return xnew;\n}\n\ntemplate <typename FLOAT>\nvoid test() {\n    const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = 4;\n    matrix<FLOAT> a(n,n), acopy(n,n);\n    vector<FLOAT> x(n), xcopy(n), b(n);\n    \n    cout.precision(numeric_limits<FLOAT>::digits10);\n\n    for (int i=0; i<n; i++) {\n        xcopy[i] = sqrt(FLOAT(i+2));\n        for (int j=0; j<=i; j++) {\n            a(i,j) = a(j,i) = FLOAT(1 + i*j)/FLOAT(i*i + j*j + i*j + 1);\n        }\n    }\n\n    for (int i=0; i<n; i++) {\n        FLOAT sum = 0.0;\n        for (int j=0; j<n; j++) {\n            acopy(i,j) = a(i,j);\n            sum += a(i,j)*xcopy[j];\n        }\n        b[i] = sum;\n    }\n    \n    matrix<FLOAT> u;\n    vector<FLOAT> e;\n    jacobi(n, a, e, u);\n    \n    FLOAT err = zero;\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<n; j++) {\n            FLOAT sum = zero;\n            for (int k=0; k<n; k++) {\n                sum += u(k,i) * e[k] * u(k,j);\n            }\n            err += fabs(sum - acopy(i,j));\n        }\n    }\n    \n    cout << \"    error in recontructed matrix \" << err << endl;\n    \n    // for (int i=0; i<n; i++) {\n    //     cout << \"eigenvalue \" << i << \" \" << e[i] << endl;\n    //     for (int j=0; j<n; j++) {\n    //         cout << \"    \" << u[i*n+j] << endl;\n    //     }\n    // }\n\n    const FLOAT tol = 100.0*numeric_limits<FLOAT>::epsilon();\n    LSQ(n, acopy, b, x, tol);\n    \n    err = zero;\n    for (int i=0; i<n; i++) err += fabs(x[i] - xcopy[i]);\n    cout << \"    error in linear solution \" << err << endl;\n\n    // \n    {\n        static const FLOAT one = 1;\n        static const FLOAT pi = 4*atan(FLOAT(1));\n        cout << pi << endl;\n        const FLOAT a = 1e-1;\n        const FLOAT b = 1e0;\n        const int nfunc = 4;\n        const int nx = 2*nfunc + 1;\n        vector<FLOAT> x(nx), p(2*nfunc), f(nx), w(nx);\n        if (nx < 4) throw \"nx must be >= 4\";\n#ifdef RECIPX\n        FLOAT rx = pow(b/a,one/(nx - 1 - 2));\n        FLOAT xxx;\n        x[0] = a;\n        x[1] = a*pow(rx,one/3);\n        x[2] = xxx = a*rx;\n        for (int i=2; i<nx-2; i++) {\n            x[i] = xxx;\n            xxx *= rx;\n        }\n        x[nx-1] = b;\n        x[nx-2] = b/pow(rx,one/3);\n        x[nx-3] = b/rx;\n#else\n        FLOAT rx = pow(b/a,one/(nx - 1));\n        FLOAT xxx;\n        xxx = x[0] = a;\n        for (int i=1; i<nx-1; i++) {\n            xxx *= rx;\n            x[i] = xxx;\n        }\n        x[nx-1] = b;\n#endif\n\n        // cheby points\n        for (int i=1; i<=nx; i++) {\n            x[i-1] = exp(0.5*(log(a)+log(b)) + 0.5*(log(a)-log(b))*cos((2*i-1)*pi/(2*nx)));\n        }\n        x[0] = a;\n        x[nx-1] = b;\n\n        for (int i=0; i<nx; i++) {\n            f[i] = target(x[i]);\n            w[i] = weight(x[i]);\n        }\n\n        FLOAT tmax = 2.3/(x[1]-x[0]);\n        FLOAT tmin = 0.11/(b-a);\n        FLOAT dt = pow(tmax/tmin,one/(nfunc-1));\n        \n        for (int mu=0; mu<nfunc; mu++) {\n#ifdef RECIPX\n            p[mu] = tmin*dt;\n#else\n            p[mu] = sqrt(tmin*dt);\n#endif            \n            p[mu+nfunc] = sqrt(tmin);\n            tmin *= dt;\n        }\n\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n        makedata(x, f, p, d0, d1, d2, false);\n\n        cout << \"x\" << endl;\n        cout << x << endl << endl;\n        cout << \"f\" << endl;\n        cout << f << endl << endl;\n        cout << \"p\" << endl;\n        cout << p << endl << endl;\n        // cout << \"d0\" << endl;\n        // cout << d0 << endl << endl;\n        // cout << \"d1\" << endl;\n        // cout << d1 << endl << endl;\n        // cout << \"d2\" << endl;\n        // cout << d2 << endl << endl;\n        \n         FLOAT h(0.01);//sqrt(numeric_limits<FLOAT>::epsilon()));\n         FLOAT plus, minus, pp, mp, pm, mm;\n\n         makedata(x, f, p, plus, d1, d2, true);\n         cout << \"analytic d1\" << endl << d1 << endl;\n         cout << \"analytic d2\" << endl << d2 << endl;\n         cout << \"numerical d1\\n\";\n         for (int mu=0; mu<2*nfunc; mu++) {\n             p[mu] += h;\n             makedata(x, f, p, plus, d1, d2, true);\n             p[mu] -= h+h;\n             makedata(x, f, p, minus, d1, d2, true);\n             p[mu] += h;\n             //cout << plus << \" \" << minus << endl;\n             cout << (plus-minus)/(2*h) << \" \";\n         }\n         cout << endl << endl;\n\n         cout << \"numerical d2\\n\";\n         for (int mu=0; mu<2*nfunc; mu++) {\n             for (int nu=0; nu<2*nfunc; nu++) {\n                 if (mu == nu) {\n                     p[mu] += h;\n                     makedata(x, f, p, plus, d1, d2, true);\n                     p[mu] -= h+h;\n                     makedata(x, f, p, minus, d1, d2, true);\n                     p[mu] += h;\n                     cout << (plus+minus-2*d0)/(h*h) << \" \";\n                 }\n                 else {\n                     p[mu] += h; p[nu] += h;\n                     makedata(x, f, p, pp, d1, d2, true);\n                     p[mu] -= h+h;\n                     makedata(x, f, p, mp, d1, d2, true);\n                     p[mu] += h+h;\n                     p[nu] -= h+h;\n                     makedata(x, f, p, pm, d1, d2, true);\n                     p[mu] -= h+h;\n                     makedata(x, f, p, mm, d1, d2, true);\n                     p[nu] += h;\n                     p[mu] += h;\n                     cout << (pp + mm - mp - pm)/(4*h*h) << \" \";\n                 }\n             }\n             cout << endl;\n         }\n         cout << endl;\n         //throw \"done\";\n\n        //p = opt(x, f, w, p, 2000, true);\n\n\n        for (int iter=0; iter<10; iter++) {\n            p = opt(x, f, w, p, 2000000);\n            cout << \"Converged parameters\" << endl;\n            for (int mu=0; mu<nfunc; mu++) {\n                cout << mu << \" \" << p[mu] << \" \" << p[mu+nfunc] << endl;\n            }\n            cout << endl;\n            plot(1001, a, b, p);\n            cout << endl;\n            x = updatex(x, p);\n            cout << \"Updated x \" << x << endl;\n            for (int i=0; i<nx; i++) {\n                f[i] = target(x[i]);\n                w[i] = weight(x[i]);\n            }\n        }\n    }\n}\n\nint main() {\n    //std::cout << \"FLOAT \" << endl;\n    //test<float>();\n    //std::cout << \"DOUBLE \" << endl;\n    //test<double>();\n    std::cout << \"DoubleDOUBLE \" << endl;\n    test<dd_real>();\n    //test<double>();\n    //std::cout << \"QuadDOUBLE \" << endl;\n    //test<qd_real>();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/mra/minmax/y_varx.cc",
    "content": "#include <iostream>\n#include <cmath>\n#include <algorithm>\n#include <vector>\n#include <cassert>\n#include <cstdio>\n#include <qd/qd_real.h>\n#include <ls.h>\n\nusing namespace std;\n\n// template <typename FLOAT>\n// FLOAT myexp(const FLOAT& x) {\n//     FLOAT r = exp(x);\n//     if (isnan(r)) r = numeric_limits<FLOAT>::safe_max();\n//     return r;\n//     // static const FLOAT xmax = log();\n//     // static const FLOAT xmin = -xmax;\n//     // if (x <= xmin) return 0;\n//     // else if (x >= xmax) return numeric_limits<FLOAT>::safe_max();\n//     // else return exp(x);\n// }\n\ntemplate <typename FLOAT>\nclass matrix {\n    std::vector<FLOAT> v;\n    int n, m;\npublic:\n    matrix() : v(), n(0), m(0) {}\n\n    matrix(int n, int m, const FLOAT& value=0) : v(n*m), n(n), m(m) \n    {\n        for (int i=0; i<n*m; i++) v[i] = value;\n    }\n\n    FLOAT& operator()(int i, int j) {\n        return v[i*m + j];\n    }\n\n    const FLOAT& operator()(int i, int j) const {\n        return v[i*m + j];\n    }\n\n    int get_n() const {return n;}\n\n    int get_m() const {return m;}\n};\n\ntemplate <typename t>\nstd::ostream& operator<<(std::ostream& s, const matrix<t>& c) {\n    int n = c.get_n();\n    int m = c.get_m();\n\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<m; j++) {\n            s << c(i,j) << \" \";\n        }\n        if (i != (n-1)) s << endl;\n    }\n\n    return s;\n}\n\n/// easy printing of vectors\ntemplate <typename t>\nstd::ostream& operator<<(std::ostream& s, const std::vector<t>& c) {\n    s << \"[\";\n    typename std::vector<t>::const_iterator it = c.begin();\n    while (it != c.end()) {\n        s << *it;\n        ++it;\n        if (it != c.end()) s << \", \";\n    };\n    s << \"]\";\n    return s;\n}\n\n\ntemplate <typename t>\nt convert(const char* c) {\n    return c;\n}\n\ntemplate <>\ndouble convert<double>(const char* c) {\n    return atof(c);\n}\n\ntemplate<>\nfloat convert<float>(const char* c) {\n    return atof(c);\n}\n\n\ntemplate <typename FLOAT>\nvoid jacobi(int n, matrix<FLOAT>& a, vector<FLOAT>& e, matrix<FLOAT>& v) {\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    static const FLOAT half = convert<FLOAT>(\"0.5\");\n    static const FLOAT one = convert<FLOAT>(\"1.0\");\n    static const FLOAT two = convert<FLOAT>(\"2.0\");\n    static const FLOAT rsqrt2 = one/sqrt(two);\n\n    e = vector<FLOAT>(n,zero);\n    v = matrix<FLOAT>(n,n);\n    \n    const FLOAT tolmin = 2.0*numeric_limits<FLOAT>::epsilon();\n    //cout << \"tolmin \" << tolmin << endl;\n    FLOAT tol = convert<FLOAT>(\"1e-2\");\n\n    static const FLOAT tolscale = convert<FLOAT>(\"0.1\");\n    static const FLOAT quart = convert<FLOAT>(\"0.25\");\n\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<n; j++) {\n            v(i,j) = zero;\n        }\n        v(i,i) = one;\n    }\n\n    FLOAT maxd = zero ;\n    for (int i=0; i<n; i++) {\n        maxd = max(fabs(a(i,i)),maxd) ;\n    }\n    //cout << \"maxd \" << maxd << endl;\n\n    int nrot;\n    int nrotsum = 0;\n    //cout << \"iter, tol, maxdaij, nrot\" << endl;\n\n    for (int iter=0; iter<50; iter++) {\n        FLOAT maxdaij = zero;\n        nrot = 0;\n        for (int i=0; i<n; i++)  { \n            for (int j=i+1; j<n; j++) {\n                FLOAT aii = a(i,i);\n                FLOAT ajj = a(j,j);\n                FLOAT aij = a(i,j);\n                FLOAT daij = fabs(aij);\n                maxdaij = max(maxdaij,daij/maxd);\n                //cout << \"testing \" << daij << \" \" << tol*maxd << endl;\n                if (daij > tol*maxd) { // screen small elements \n                    FLOAT s = ajj - aii;\n                    FLOAT ds = fabs(s);\n                    if (daij > (tolmin*ds)) { // check for sufficient precision\n                        FLOAT c;\n                        nrot++;\n                        if (tolmin*daij > ds) {\n                            c = s = rsqrt2;\n                        } \n                        else { \n                            FLOAT t = aij/s;\n                            FLOAT u = quart/sqrt(quart+t*t);\n                            c = sqrt(half+u);\n                            s = two*t*u/c;\n                        }\n                        for (int k=0; k<=i; k++) {\n                            FLOAT t = a(k,i);\n                            FLOAT u = a(k,j);\n                            a(k,i) = c*t - s*u;\n                            a(k,j) = s*t + c*u;\n                        }\n\n                        for (int k=i+1; k<j; k++) {\n                            FLOAT t = a(i,k);\n                            FLOAT u = a(k,j) ;\n                            a(i,k) = c*t - s*u ;\n                            a(k,j) = s*t + c*u;\n                        }\n                        a(j,j) = s*aij + c*ajj;\n                        a(i,i) = c*a(i,i) - s*(c*aij - s*ajj);\n                          \n                        for (int k=j; k<n; k++) {\n                            FLOAT t = a(i,k);\n                            FLOAT u = a(j,k);\n                            a(i,k) = c*t - s*u ;\n                            a(j,k) = s*t + c*u ;\n                        }\n                        for (int k=0; k<n; k++) {\n                            FLOAT t = v(i,k) ;\n                            FLOAT u = v(j,k) ;\n                            v(i,k) = c*t - s*u ;\n                            v(j,k) = s*t + c*u ;\n                        }\n                        a(j,i) = a(i,j) = zero ;\n                        maxd = max(max(maxd,fabs(a(i,i))),fabs(a(j,j)));\n                    }\n                }\n            }\n        }\n\n        //cout << iter << \" \" <<  tol << \" \" <<  maxdaij << \" \" <<  nrot << endl;\n\n        nrotsum += nrot;\n        if (nrot == 0 && tol <= tolmin) break;\n\n        tol = min(min(tol,maxdaij*tolscale),maxdaij*maxdaij);\n        tol = max(tol,tolmin);\n    }\n    if (nrot != 0) { \n        cout << \"jacobi iteration did not converge in 50 passes\" << endl;\n    }\n\n    // sort and copy evals\n\n    for (int i=0; i<n; i++) {\n        e[i] = a(i,i);\n        for (int j=0; j<i; j++) {\n            if (e[j] > e[i]) {\n                 swap(e[j],e[i]);\n                 for (int k=0; k<n; k++) {\n                     swap(v(j,k),v(i,k));\n                 }\n            }\n        }\n    }\n\n}\n\n// solves ax=b for symmetric a discarding eigen values less than tol\ntemplate <typename FLOAT>\nvoid LSQ(int n, const matrix<FLOAT>& a, const vector<FLOAT>& b, vector<FLOAT>& x, const FLOAT& tol) {\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    matrix<FLOAT> acopy(a);\n    matrix<FLOAT> v;\n    vector<FLOAT> s;\n\n    jacobi(n, acopy, s, v);\n\n    x = vector<FLOAT>(n,zero);\n\n    //for (int i=0; i<n; i++) cout << \"s \" << i << \" \" << s[i] << endl;\n\n    for (int k=0; k<n; k++) {\n        if (fabs(s[k]) >= tol) {\n            FLOAT sum = zero;\n            for (int j=0; j<n; j++) {\n                sum += v(k,j) * b[j];\n            }\n            sum /= s[k];\n            for (int i=0; i<n; i++) {\n                x[i] += v(k,i) * sum;\n            }\n        }\n        else {\n            cout << \"lsq discarding singular value \" << s[k] << endl;\n        }\n    }\n}\n\n// template <typename FLOAT>\n// void mxm(int n, const FLOAT* a, const FLOAT* b, FLOAT* c) {\n//     for (int i=0; i<n; i++) {\n//         for (int j=0; j<n; j++) {\n//             FLOAT sum = 0.0;\n//             for (int k=0; k<n; k++) {\n//                 sum += a[ind(i,k)] * b[ind(k,j)];\n//             }\n//             c[ind(i,j)] = sum;\n//         }\n//     }\n// }\n\n//#define RECIPX\n#ifdef RECIPX\n// evaluate the target function\ntemplate <typename FLOAT>\nFLOAT target(const FLOAT& x) {\n    return 1/x;\n}\n\n// evaluate the target function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid target(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = 1/x;\n    d1f = -f*f;\n    d2f = -2*f*d1f;\n}\n\n// evaluate the weight function\ntemplate <typename FLOAT>\nFLOAT weight(const FLOAT& x) {\n    return x;\n}\n\n// evaluate the weight function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid weight(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = x;\n    d1f = 1.0;\n    d2f = 0.0;\n}\n#else\n// evaluate the target function\ntemplate <typename FLOAT>\nFLOAT target(const FLOAT& x) {\n    return 1/sqrt(x);\n}\n\n// evaluate the target function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid target(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = 1/sqrt(x);\n    d1f = -0.5*f/x;\n    d2f = -1.5*d1f/x;\n}\n\n// evaluate the weight function\ntemplate <typename FLOAT>\nFLOAT weight(const FLOAT& x) {\n    return sqrt(x);\n}\n\n// evaluate the weight function and its first & second derivativse\ntemplate <typename FLOAT>\nvoid weight(const FLOAT& x, FLOAT& f, FLOAT& d1f, FLOAT& d2f) {\n    f = sqrt(x);\n    d1f = 0.5*f/x;\n    d2f = -0.5*d1f/x;\n}\n\n#endif\n\n\n// evaluate the function fitted to exponentials\ntemplate <typename FLOAT>\nFLOAT fit(const FLOAT& x, const vector<FLOAT>& p) {\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = p.size()/2;\n    FLOAT sum = zero;\n    for (int i=0; i<n; i++) {\n        sum += exp(p[i] - x*p[i+n]);\n    }\n    return sum;\n}\n\n// evaluate the function and first/second derivatives fitted to exponentials\ntemplate <typename FLOAT>\nvoid fit(const FLOAT& x, const vector<FLOAT>& p, FLOAT& f, FLOAT& g, FLOAT& h) {\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = p.size()/2;\n    f = zero;\n    g = zero;\n    h = zero;\n    for (int i=0; i<n; i++) {\n        FLOAT term = exp(p[i] - x*p[i+n]);\n        f += term;\n        g -= p[i+n]*term;\n        h += p[i+n]*p[i+n]*term;\n    }\n}\n\n\ntemplate <typename FLOAT>\nvoid plot(int npt, const FLOAT& a, const FLOAT& b, const vector<FLOAT>& p) \n{\n    FLOAT h = pow(b/a,FLOAT(1)/(npt-1));\n    FLOAT x = a;\n    for (int i=0; i<npt; i++) {\n        cout << x << \" \" <<  (fit(x,p) - target(x))*weight(x) << endl;\n        x *= h;\n    }\n}\n\n\n// basis function mu is g[mu](x) = exp(p[mu] - x*p[mu+n])\n// \n// non-zero first derivatives\n// dg[mu]/dp[mu] = g[mu]\n// dg[mu]/dp[mu+n] = -x*g[mu]\n//\n// non-zero second derivatives \n// d2g[mu]/dp[mu]dp[mu] = g[mu]\n// d2g[mu]/dp[mu]dp[mu+n] = -x*g[mu]\n// d2g[mu]/dp[mu+n]dp[mu+n] = x^2*g[mu]\n//\n// g(i,mu) = g[mu](x[i])\n// eps[i] = sum(mu, g(i,mu)) - f(x[i])\n//\n// d0 = sum(i=0..npt-2, (eps[i]+eps[i+1])^2)\n// d1_mu = dd0/dp[mu] = 2 sum(i, eps[i] * \n// \n// x[2*n+1]\n// p[2*n]\n// d1[2*n]\n// d2[2*n,2*n]\ntemplate <typename FLOAT>\nvoid makedata(const vector<FLOAT>& x, const vector<FLOAT>& f, const vector<FLOAT>& p, \n              FLOAT& d0, vector<FLOAT>& d1, matrix<FLOAT>& d2, bool d0only=false) \n{\n    static const FLOAT zero = convert<FLOAT>(\"0.0\");\n    const int n = p.size()/2; // number of exponentials\n    const int npt = x.size();    // number of values x\n    //assert((unsigned) npt == x.size());\n\n    \n    // make basis functions and error values at grid points\n    matrix<FLOAT> g(npt,n);\n    vector<FLOAT> eps(npt);\n    vector<FLOAT> w(npt);\n    for (int i=0; i<npt; i++) {\n        FLOAT sum = zero;\n        for (int mu=0; mu<n; mu++) {\n            g(i,mu) = exp(p[mu] - x[i]*p[mu+n]); // note constraint of positive coeffs\n            sum += g(i,mu);\n        }\n        w[i] = weight(x[i]);\n        eps[i] = (sum - f[i])*w[i];\n    }\n\n    d0 = zero;\n    for (int i=0; i<npt-1; i++) \n        d0 += (eps[i]+eps[i+1])*(eps[i]+eps[i+1]);\n\n    if (d0only) return;\n\n    // make derivatives of eps\n    matrix<FLOAT> deps1(npt, 2*n, zero);  // d/dp[mu] \n    matrix<FLOAT> deps2a(npt, n, zero); // d2/dp[mu]^2\n    matrix<FLOAT> deps2b(npt, n, zero); // d2/dp[mu]dp[mu+n]\n    matrix<FLOAT> deps2c(npt, n, zero); // d2/dp[mu+n]dp[mu+n]\n    for (int i=0; i<npt; i++) {\n        for (int mu=0; mu<n; mu++) {\n            deps1(i,mu) = g(i,mu)*w[i];\n            deps1(i,mu+n) = -x[i]*g(i,mu)*w[i];\n            deps2a(i,mu) = g(i,mu)*w[i];\n            deps2b(i,mu) = -x[i]*g(i,mu)*w[i];\n            deps2c(i,mu) = x[i]*x[i]*g(i,mu)*w[i];\n        }\n    }\n\n    // assemble derivatives of the target function now\n    // just using the chain rule\n    d1 = vector<FLOAT>(2*n,zero);\n    d2 = matrix<FLOAT>(2*n,2*n,zero);\n\n    for (int i=0; i<(npt-1); i++) {\n        for (int mu=0; mu<2*n; mu++) {\n            d1[mu] += 2 * (eps[i]+eps[i+1]) * (deps1(i,mu) + deps1(i+1,mu));\n            for (int nu=0; nu<2*n; nu++) {\n                d2(mu,nu) += 2 * (deps1(i,mu)+deps1(i+1,mu)) * (deps1(i,nu) + deps1(i+1,nu));\n            }\n        }\n    }\n    \n    for (int i=0; i<(npt-1); i++) {\n        for (int mu=0; mu<n; mu++) {\n            d2(mu,mu) += 2 * (eps[i]+eps[i+1]) * (deps2a(i,mu) + deps2a(i+1,mu));\n            \n            d2(mu+n,mu) += 2 * (eps[i]+eps[i+1]) * (deps2b(i,mu) + deps2b(i+1,mu));\n            d2(mu,mu+n) += 2 * (eps[i]+eps[i+1]) * (deps2b(i,mu) + deps2b(i+1,mu));\n            \n            d2(mu+n,mu+n) += 2 * (eps[i]+eps[i+1]) * (deps2c(i,mu) + deps2c(i+1,mu));\n        }\n    }\n}\n\ntemplate <typename FLOAT> \nclass Func {\n    const vector<FLOAT>& x;\n    const vector<FLOAT>& f;\n    const vector<FLOAT>& p;\n    const vector<FLOAT>& dp;\n    mutable vector<FLOAT> pnew;\n\npublic:\n    Func(const vector<FLOAT>& x, const vector<FLOAT>&f, const vector<FLOAT>& p, const vector<FLOAT>& dp) \n        : x(x), f(f), p(p), dp(dp), pnew(dp.size())\n    {}\n\n    FLOAT operator()(const FLOAT& s) const {\n        for (unsigned int i=0; i<p.size(); i++) {\n            pnew[i] = p[i] - s*dp[i];\n        }\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n        makedata(x, f, pnew, d0, d1, d2, true);\n\n        if (isnan(d0)) d0 = numeric_limits<FLOAT>::safe_max();\n\n        return d0;\n    }\n};\n\ntemplate <typename FLOAT> \nvector<FLOAT> opt(const vector<FLOAT>& x, const vector<FLOAT>& f, const vector<FLOAT>& w, const vector<FLOAT>& guess, int maxiter)\n{\n    static const FLOAT zero= convert<FLOAT>(\"0.0\");\n    static const FLOAT one = convert<FLOAT>(\"1.0\");\n    static const FLOAT half = convert<FLOAT>(\"0.5\");\n    vector<FLOAT> p = guess;\n    const int n = p.size();\n\n    const int nprint = 100;\n    \n    for (int iter=0; iter<maxiter; iter++) {\n        const bool print = (iter%nprint) == 0;\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n\n        makedata(x, f, p, d0, d1, d2, false);\n        \n        if (print) {\n            cout << \"\\n\\niteration \" << iter << \" \" << d0 << endl << endl;\n            //cout << \" p \" << p << endl;\n            //cout << \" d \" << d1 << endl << endl;\n        }\n\n\n        bool alternating = true;\n        FLOAT errprev = 0;\n        FLOAT convtol = 0;\n        for (unsigned int i=0; i<x.size(); i++) {\n            FLOAT err = (fit(x[i],p)-f[i])*w[i];\n            if (i>0 && err*errprev>0) alternating=false;\n            errprev = err;\n            convtol += err*err;\n            if (print) cout << \" err \" << i << \" \" << x[i] << \" \" << err << endl;\n        }\n        convtol *= 1e-5 / n;\n        if (print) cout << iter << \" \" << d0 << \" \" << alternating << endl;\n\n        if (iter > 10 && d0 < convtol && alternating) {\n            cout << \"\\nconverged \" << iter << \" \" << d0 << \" \" << convtol << endl << endl;\n            break;\n        }\n        \n        matrix<FLOAT> v;\n        vector<FLOAT> e;\n        jacobi(n, d2, e, v);\n\n        //if (print) {cout << \"eigenvalues \" << e << endl;}\n\n        vector<FLOAT> dp(n,zero);\n        FLOAT tol;\n\n        //if ((iter%10) == 0) tol = e[n/3];\n        //else if ((iter%3) == 1) tol = e[2*n/3];\n        //else \n            tol = 1000.0*numeric_limits<FLOAT>::epsilon();\n        \n        for (int k=0; k<n; k++) {\n            if (e[k] < -tol) {\n                //cout << \" making negative eigenvalue positive \" << k << \" \" << e[k] << endl;\n                e[k] = one/min(one,-e[k]);\n            }\n            else if (e[k] < tol) {\n                //cout << \" small eigenvalue \" << k << \" \" << e[k] << endl;\n                e[k] = one/tol;\n            }\n            else {\n                e[k] = one/e[k];\n            }\n\n            FLOAT sum = zero;\n            for (int j=0; j<n; j++) {\n                sum += v(k,j) * d1[j];\n            }\n            //if (print) {cout << \" dmode : \" << k << \" \" << sum << endl;}\n            sum *= e[k];\n            for (int i=0; i<n; i++) {\n                dp[i] += v(k,i) * sum;\n            }\n        }\n\n        //cout << \"\\ndp \" << dp << endl << endl;\n\n        FLOAT pnorm=zero, dpnorm=zero;\n        for (int i=0; i<n; i++) {\n            pnorm += p[i]*p[i];\n            dpnorm += dp[i]*dp[i];\n        }\n        pnorm = sqrt(pnorm);\n        dpnorm = sqrt(dpnorm);\n\n        vector<FLOAT> pnew(n);\n        FLOAT s = min(one, 0.05*pnorm/dpnorm);\n        FLOAT d0new;\n        \n        // exponents must be positive\n        for (int i=n/2; i<n; i++) {\n            if (p[i] - s*dp[i] < 0) s = min(s,p[i]/(5*dp[i]));\n        }\n        \n        Func<FLOAT> func(x, f, p, dp);\n\n        do  {\n            \n            d0new = func(s);\n            //cout << \"        s \" << s << \"  d0 old \" << d0 << \"  d0 new \" << d0new << endl;\n\n            if (d0new < d0 && !isnan(d0new)) break;\n            else s *= half;\n        } while (s > 1e-20);\n\n        FLOAT ax=0, bx=s, cx, fa=d0, fb=d0new, fc, snew;\n        mnbrak(&ax, &bx, &cx, &fa, &fb, &fc, func);\n        d0new = brent(ax, bx, cx, func, FLOAT(1e-6), &s);\n\n        for (int i=0; i<n; i++) {\n            pnew[i] = p[i] - s*dp[i];\n        }\n\n\n        p = pnew;\n        if (print) cout << \"      s \" << s << \"  d0 old \" << d0 << \"  d0 new \" << d0new << endl;\n    }\n    return p;\n}\n\n\ntemplate <typename FLOAT>\nvector<FLOAT> updatex(const vector<FLOAT>& x, const vector<FLOAT>& p) \n{\n    static const FLOAT one = 1;\n\n    const FLOAT a = x[0];\n    const FLOAT b = x[x.size()-1];\n    const int npt = 30*x.size();\n    const FLOAT h = pow(b/a, one/npt);\n    cout << \"update x: h = \" << h << endl;\n\n    // bracket min/max then use newton\n    //  f(x-h) f(x) f(x+h)\n    //        >    >       decreasing to right\n    //        <    >       maximum\n    //        >    <       minimum\n    //        <    <       increasing to right\n    \n    vector<FLOAT> xnew;\n    xnew.push_back(a);\n    FLOAT f2m = fit(a,p)   - target(a);\n    FLOAT f1m = fit(a*h,p) - target(a*h);\n    FLOAT xx = a*h*h;\n    while (xx < b) {\n        FLOAT f0m = (fit(xx,p) - target(xx))*weight(xx);\n\n        if ( (f2m<f1m && f1m>f0m) || (f2m>f1m && f1m<f0m) ) {\n            FLOAT f, df1, df2, t, dt1, dt2, w, dw1, dw2, g, dg1, dg2;\n            FLOAT yy = xx;\n            // Three iterations of Newton to converge\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE A: \" << yy << \" \" <<g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE B: \" << yy << \" \" <<g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n            fit(yy, p, f, df1, df2);\n            target(yy, t, dt1, dt2);\n            weight(yy, w, dw1, dw2);\n            g = (f - t)*w;\n            dg1 = (df1 - dt1)*w + (f-t)*dw1;\n            dg2 = (df2 - dt2)*w + (f-t)*dw2 + 2*(df1 - dt1)*dw1;\n\n            //cout << \"UPDATE C: \" <<  yy << \" \" << g << \" \" << dg1 << \" \" << dg2 << \" \" << dg1/dg2 << endl;\n\n            yy -= dg1/dg2;\n\n\n            xnew.push_back(yy);\n        }\n\n        xx *= h;\n        f2m = f1m;\n        f1m = f0m;\n    }\n    xnew.push_back(b);\n\n    if (xnew.size() != p.size()+1) {\n        cout << x << endl;\n        cout << xnew << endl;\n        throw \"darn it\";\n    }\n\n    //cout << \"number of new points \" << xnew.size() << \" maximum is \" << p.size()+1 << endl;\n\n    return xnew;\n}\n\ntemplate <typename FLOAT>\nvoid test() {\n    const FLOAT zero= convert<FLOAT>(\"0.0\");\n    int n = 2;\n    matrix<FLOAT> a(n,n), acopy(n,n);\n    vector<FLOAT> x(n), xcopy(n), b(n);\n    \n    cout.precision(numeric_limits<FLOAT>::digits10);\n\n    for (int i=0; i<n; i++) {\n        xcopy[i] = sqrt(FLOAT(i+2));\n        for (int j=0; j<=i; j++) {\n            a(i,j) = a(j,i) = FLOAT(1 + i*j)/FLOAT(i*i + j*j + i*j + 1);\n        }\n    }\n\n    for (int i=0; i<n; i++) {\n        FLOAT sum = 0.0;\n        for (int j=0; j<n; j++) {\n            acopy(i,j) = a(i,j);\n            sum += a(i,j)*xcopy[j];\n        }\n        b[i] = sum;\n    }\n    \n    matrix<FLOAT> u;\n    vector<FLOAT> e;\n    jacobi(n, a, e, u);\n    \n    FLOAT err = zero;\n    for (int i=0; i<n; i++) {\n        for (int j=0; j<n; j++) {\n            FLOAT sum = zero;\n            for (int k=0; k<n; k++) {\n                sum += u(k,i) * e[k] * u(k,j);\n            }\n            err += fabs(sum - acopy(i,j));\n        }\n    }\n    \n    cout << \"    error in recontructed matrix \" << err << endl;\n    \n    // for (int i=0; i<n; i++) {\n    //     cout << \"eigenvalue \" << i << \" \" << e[i] << endl;\n    //     for (int j=0; j<n; j++) {\n    //         cout << \"    \" << u[i*n+j] << endl;\n    //     }\n    // }\n\n    const FLOAT tol = 100.0*numeric_limits<FLOAT>::epsilon();\n    LSQ(n, acopy, b, x, tol);\n    \n    err = zero;\n    for (int i=0; i<n; i++) err += fabs(x[i] - xcopy[i]);\n    cout << \"    error in linear solution \" << err << endl;\n\n    // \n    {\n        static const FLOAT one = 1;\n        static const FLOAT pi = 4*atan(FLOAT(1));\n        cout << pi << endl;\n        const FLOAT a = 1e-1;\n        const FLOAT b = 1e0;\n        const int nfunc = 20;\n        const int nx = 2*nfunc + 1;\n        vector<FLOAT> x(nx), p(2*nfunc), f(nx), w(nx);\n        if (nx < 4) throw \"nx must be >= 4\";\n#ifdef RECIPX\n        FLOAT rx = pow(b/a,one/(nx - 1 - 2));\n        FLOAT xxx;\n        x[0] = a;\n        x[1] = a*pow(rx,one/3);\n        x[2] = xxx = a*rx;\n        for (int i=2; i<nx-2; i++) {\n            x[i] = xxx;\n            xxx *= rx;\n        }\n        x[nx-1] = b;\n        x[nx-2] = b/pow(rx,one/3);\n        x[nx-3] = b/rx;\n#else\n        FLOAT rx = pow(b/a,one/(nx - 1));\n        FLOAT xxx;\n        xxx = x[0] = a;\n        for (int i=1; i<nx-1; i++) {\n            xxx *= rx;\n            x[i] = xxx;\n        }\n        x[nx-1] = b;\n#endif\n\n        // cheby points\n        // for (int i=1; i<=nx; i++) {\n        //     x[i-1] = exp(0.5*(log(a)+log(b)) + 0.5*(log(a)-log(b))*cos((2*i-1)*pi/(2*nx)));\n        // }\n        //x[0] = a;\n        //x[nx-1] = b;\n\n        for (int i=0; i<nx; i++) {\n            f[i] = target(x[i]);\n            w[i] = weight(x[i]);\n        }\n\n        FLOAT tmax = 2.3/(x[1]-x[0]);\n        FLOAT tmin = 0.11/(b-a);\n        FLOAT dt = pow(tmax/tmin,one/(nfunc-1));\n        \n        for (int mu=0; mu<nfunc; mu++) {\n#ifdef RECIPX\n            p[mu] = log(tmin*dt);\n#else\n            p[mu] = log(tmin*dt)*0.5;\n#endif            \n            p[mu+nfunc] = tmin;\n            tmin *= dt;\n        }\n\n        FLOAT d0;\n        vector<FLOAT> d1;\n        matrix<FLOAT> d2;\n        makedata(x, f, p, d0, d1, d2, false);\n\n        cout << \"x\" << endl;\n        cout << x << endl << endl;\n        cout << \"f\" << endl;\n        cout << f << endl << endl;\n        cout << \"p\" << endl;\n        cout << p << endl << endl;\n        // cout << \"d0\" << endl;\n        // cout << d0 << endl << endl;\n        // cout << \"d1\" << endl;\n        // cout << d1 << endl << endl;\n        // cout << \"d2\" << endl;\n        // cout << d2 << endl << endl;\n        \n        // FLOAT h(0.01);//sqrt(numeric_limits<FLOAT>::epsilon()));\n        // FLOAT plus, minus, pp, mp, pm, mm;\n\n        // cout << \"numerical d1\\n\";\n        // for (int mu=0; mu<2*nfunc; mu++) {\n        //     p[mu] += h;\n        //     makedata(x, f, p, plus, d1, d2, true);\n        //     p[mu] -= h+h;\n        //     makedata(x, f, p, minus, d1, d2, true);\n        //     p[mu] += h;\n        //     //cout << plus << \" \" << minus << endl;\n        //     cout << (plus-minus)/(2*h) << \" \";\n        // }\n        // cout << endl << endl;\n\n        // cout << \"numerical d2\\n\";\n        // for (int mu=0; mu<2*nfunc; mu++) {\n        //     for (int nu=0; nu<2*nfunc; nu++) {\n        //         if (mu == nu) {\n        //             p[mu] += h;\n        //             makedata(x, f, p, plus, d1, d2, true);\n        //             p[mu] -= h+h;\n        //             makedata(x, f, p, minus, d1, d2, true);\n        //             p[mu] += h;\n        //             cout << (plus+minus-2*d0)/(h*h) << \" \";\n        //         }\n        //         else {\n        //             p[mu] += h; p[nu] += h;\n        //             makedata(x, f, p, pp, d1, d2, true);\n        //             p[mu] -= h+h;\n        //             makedata(x, f, p, mp, d1, d2, true);\n        //             p[mu] += h+h;\n        //             p[nu] -= h+h;\n        //             makedata(x, f, p, pm, d1, d2, true);\n        //             p[mu] -= h+h;\n        //             makedata(x, f, p, mm, d1, d2, true);\n        //             p[nu] += h;\n        //             p[mu] += h;\n        //             cout << (pp + mm - mp - pm)/(4*h*h) << \" \"; \n        //         }\n        //     }\n        //     cout << endl;\n        // }\n        // cout << endl;\n\n        p = opt(x, f, w, p, 400);\n        exit(0);\n\n        for (int iter=0; iter<10; iter++) {\n            p = opt(x, f, w, p, 200000);\n            cout << \"Converged parameters\" << endl;\n            for (int mu=0; mu<nfunc; mu++) {\n                cout << mu << \" \" << p[mu] << \" \" << p[mu+nfunc] << endl;\n            }\n            cout << endl;\n            plot(1001, a, b, p);\n            cout << endl;\n            x = updatex(x, p);\n            cout << \"Updated x \" << x << endl;\n            for (unsigned int i=0; i<x.size(); i++) {\n                f[i] = target(x[i]);\n                w[i] = weight(x[i]);\n            }\n        }\n    }\n}\n\nint main() {\n    //std::cout << \"FLOAT \" << endl;\n    //test<float>();\n    //std::cout << \"DOUBLE \" << endl;\n    //test<double>();\n    //std::cout << \"DoubleDOUBLE \" << endl;\n    test<dd_real>();\n    //std::cout << \"QuadDOUBLE \" << endl;\n    //test<qd_real>();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/mra/mra.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MRA_MRA_H__INCLUDED\n#define MADNESS_MRA_MRA_H__INCLUDED\n\n/*!\n  \\file mra/mra.h\n  \\brief Main include file for MADNESS and defines \\c Function interface\n\n  \\addtogroup mra\n\n*/\n\n\n#include <madness/world/MADworld.h>\n#include <madness/misc/misc.h>\n#include <madness/tensor/tensor.h>\n\n#define FUNCTION_INSTANTIATE_1\n#define FUNCTION_INSTANTIATE_2\n#define FUNCTION_INSTANTIATE_3\n#if !defined(HAVE_IBMBGP) || !defined(HAVE_IBMBGQ)\n#define FUNCTION_INSTANTIATE_4\n#define FUNCTION_INSTANTIATE_5\n#define FUNCTION_INSTANTIATE_6\n#endif\n\nstatic const bool VERIFY_TREE = false; //true\n\n\nnamespace madness {\n    /// @brief initialize the internal state of the MADmra library\n    ///\n    /// Reads in (and broadcasts across \\p world) the twoscale and autocorrelation coefficients,\n    /// Gauss-Legendre quadrature roots/weights, function defaults and operator displacement lists.\n    /// \\warning By default this generates operator displacement lists (see Displacements) for up to 6-d free\n    ///          and 3-d periodic boundary conditions. For optimal support for mixed boundary conditions\n    ///          (periodic along some axes only) assign the desired boundary conditions\n    ///          as default (e.g. `FunctionDefaults<3>::set_bc(BoundaryConditions<3>({BC_FREE, BC_FREE, BC_FREE, BC_FREE, BC_PERIODIC, BC_PERIODIC})`)\n    ///          prior to calling this. This will make operator application with such boundary conditions\n    ///          as efficient as possible, but will not allow the use of operators with\n    ///          other boundary conditions that include periodic axes until Displacements::reset_periodic_axes is invoked.\n    ///          By default efficiency is sacrificed for generality.\n    /// \\param world broadcast data across this World\n    /// \\param argc command-line parameter count\n    /// \\param argv command-line parameters array\n    /// \\param doprint if true, will log status to std::cout on rank 0 [default=false]\n    /// \\param make_stdcout_nice_to_reals if true, will configure std::cout to print reals prettily, according to the MADNESS convention [default=true]\n    void startup(World& world, int argc, char** argv, bool doprint=false, bool make_stdcout_nice_to_reals = true);\n    std::string get_mra_data_dir();\n}\n\n#include <madness/mra/key.h>\n#include <madness/mra/twoscale.h>\n#include <madness/mra/legendre.h>\n#include <madness/mra/indexit.h>\n#include <madness/world/parallel_archive.h>\n#include <madness/world/worlddc.h>\n#include <madness/mra/funcdefaults.h>\n#include <madness/mra/function_factory.h>\n#include <madness/mra/lbdeux.h>\n#include <madness/mra/funcimpl.h>\n\n// some forward declarations\nnamespace madness {\n\n    template<typename T, std::size_t NDIM>\n    class FunctionImpl;\n\n    template<typename T, std::size_t NDIM>\n    class Function;\n\n    template<typename T, std::size_t NDIM>\n    class FunctionNode;\n\n    template<typename T, std::size_t NDIM>\n    class FunctionFactory;\n\n    template<typename T, std::size_t NDIM>\n    class FunctionFunctorInterface;\n\n    template<typename T, std::size_t NDIM>\n    struct leaf_op;\n\n    template<typename T, std::size_t NDIM>\n    struct mul_leaf_op;\n\n    template<typename T, std::size_t NDIM>\n    struct hartree_leaf_op;\n\n    template<typename T, std::size_t NDIM, std::size_t LDIM, typename opT>\n    struct hartree_convolute_leaf_op;\n\n    template<typename T, std::size_t NDIM, typename opT>\n    struct op_leaf_op;\n\n    template<typename T, std::size_t NDIM>\n    struct error_leaf_op;\n\n}\n\n\nnamespace madness {\n\n    /// \\ingroup mra\n    /// \\addtogroup function\n\n    /// A multiresolution adaptive numerical function\n    template <typename T, std::size_t NDIM>\n    class Function : public archive::ParallelSerializableObject {\n        // We make all of the content of Function and FunctionImpl\n        // public with the intent of avoiding the cumbersome forward\n        // and friend declarations.  However, this open access should\n        // not be abused.\n\n    private:\n        std::shared_ptr< FunctionImpl<T,NDIM> > impl;\n\n    public:\n        bool impl_initialized()const{\n        \tif(impl==NULL) return false;\n        \telse return true;\n        }\n        typedef FunctionImpl<T,NDIM> implT;\n        typedef FunctionNode<T,NDIM> nodeT;\n        typedef FunctionFactory<T,NDIM> factoryT;\n        typedef Vector<double,NDIM> coordT; ///< Type of vector holding coordinates\n        typedef T typeT;\n        static constexpr std::size_t dimT=NDIM;\n\n\n        /// Asserts that the function is initialized\n        inline void verify() const {\n            MADNESS_ASSERT(impl);\n        }\n\n        /// Returns true if the function is initialized\n        bool is_initialized() const {\n            return impl.get();\n        }\n\n        /// Default constructor makes uninitialized function.  No communication.\n\n        /// An uninitialized function can only be assigned to.  Any other operation will throw.\n        Function() : impl() {}\n\n\n        /// Constructor from FunctionFactory provides named parameter idiom.  Possible non-blocking communication.\n        Function(const factoryT& factory)\n                : impl(new FunctionImpl<T,NDIM>(factory)) {\n            PROFILE_MEMBER_FUNC(Function);\n        }\n\n\n        /// Copy constructor is \\em shallow.  No communication, works in either basis.\n        Function(const Function<T,NDIM>& f)\n                : impl(f.impl) {\n        }\n\n\n        /// Assignment is \\em shallow.  No communication, works in either basis.\n        Function<T,NDIM>& operator=(const Function<T,NDIM>& f) {\n            PROFILE_MEMBER_FUNC(Function);\n            if (this != &f) impl = f.impl;\n            return *this;\n        }\n\n        /// Destruction of any underlying implementation is deferred to next global fence.\n        ~Function() {}\n\n        /// implements swap algorithm\n        template <typename R, std::size_t MDIM>\n        friend void swap(Function<R,MDIM>& f1, Function<R,MDIM>& f2);\n\n\n        /// Evaluates the function at a point in user coordinates.  Possible non-blocking comm.\n\n        /// Only the invoking process will receive the result via the future\n        /// though other processes may be involved in the evaluation.\n        ///\n        /// Throws if function is not initialized.\n        Future<T> eval(const coordT& xuser) const {\n            PROFILE_MEMBER_FUNC(Function);\n            const double eps=1e-15;\n            verify();\n            MADNESS_ASSERT(is_reconstructed());\n            coordT xsim;\n            user_to_sim(xuser,xsim);\n            // If on the boundary, move the point just inside the\n            // volume so that the evaluation logic does not fail\n            for (std::size_t d=0; d<NDIM; ++d) {\n                if (xsim[d] < -eps) {\n                    MADNESS_EXCEPTION(\"eval: coordinate lower-bound error in dimension\", d);\n                }\n                else if (xsim[d] < eps) {\n                    xsim[d] = eps;\n                }\n\n                if (xsim[d] > 1.0+eps) {\n                    MADNESS_EXCEPTION(\"eval: coordinate upper-bound error in dimension\", d);\n                }\n                else if (xsim[d] > 1.0-eps) {\n                    xsim[d] = 1.0-eps;\n                }\n            }\n\n            Future<T> result;\n            impl->eval(xsim, impl->key0(), result.remote_ref(impl->world));\n            return result;\n        }\n\n        /// Evaluate function only if point is local returning (true,value); otherwise return (false,0.0)\n\n        /// maxlevel is the maximum depth to search down to --- the max local depth can be\n        /// computed with max_local_depth();\n        std::pair<bool,T> eval_local_only(const Vector<double,NDIM>& xuser, Level maxlevel) const {\n            const double eps=1e-15;\n            verify();\n            MADNESS_ASSERT(is_reconstructed());\n            coordT xsim;\n            user_to_sim(xuser,xsim);\n            // If on the boundary, move the point just inside the\n            // volume so that the evaluation logic does not fail\n            for (std::size_t d=0; d<NDIM; ++d) {\n                if (xsim[d] < -eps) {\n                    MADNESS_EXCEPTION(\"eval: coordinate lower-bound error in dimension\", d);\n                }\n                else if (xsim[d] < eps) {\n                    xsim[d] = eps;\n                }\n\n                if (xsim[d] > 1.0+eps) {\n                    MADNESS_EXCEPTION(\"eval: coordinate upper-bound error in dimension\", d);\n                }\n                else if (xsim[d] > 1.0-eps) {\n                    xsim[d] = 1.0-eps;\n                }\n            }\n            return impl->eval_local_only(xsim,maxlevel);\n        }\n\n        /// Only the invoking process will receive the result via the future\n        /// though other processes may be involved in the evaluation.\n        ///\n        /// Throws if function is not initialized.\n        ///\n        /// This function is a minimally-modified version of eval()\n        Future<Level> evaldepthpt(const coordT& xuser) const {\n            PROFILE_MEMBER_FUNC(Function);\n            const double eps=1e-15;\n            verify();\n            MADNESS_ASSERT(is_reconstructed());\n            coordT xsim;\n            user_to_sim(xuser,xsim);\n            // If on the boundary, move the point just inside the\n            // volume so that the evaluation logic does not fail\n            for (std::size_t d=0; d<NDIM; ++d) {\n                if (xsim[d] < -eps) {\n                    MADNESS_EXCEPTION(\"eval: coordinate lower-bound error in dimension\", d);\n                }\n                else if (xsim[d] < eps) {\n                    xsim[d] = eps;\n                }\n\n                if (xsim[d] > 1.0+eps) {\n                    MADNESS_EXCEPTION(\"eval: coordinate upper-bound error in dimension\", d);\n                }\n                else if (xsim[d] > 1.0-eps) {\n                    xsim[d] = 1.0-eps;\n                }\n            }\n\n            Future<Level> result;\n            impl->evaldepthpt(xsim, impl->key0(), result.remote_ref(impl->world));\n            return result;\n        }\n\n\n        /// Evaluates the function rank at a point in user coordinates.  Possible non-blocking comm.\n\n        /// Only the invoking process will receive the result via the future\n        /// though other processes may be involved in the evaluation.\n        ///\n        /// Throws if function is not initialized.\n        Future<long> evalR(const coordT& xuser) const {\n            PROFILE_MEMBER_FUNC(Function);\n            const double eps=1e-15;\n            verify();\n            MADNESS_ASSERT(is_reconstructed());\n            coordT xsim;\n            user_to_sim(xuser,xsim);\n            // If on the boundary, move the point just inside the\n            // volume so that the evaluation logic does not fail\n            for (std::size_t d=0; d<NDIM; ++d) {\n                if (xsim[d] < -eps) {\n                    MADNESS_EXCEPTION(\"eval: coordinate lower-bound error in dimension\", d);\n                }\n                else if (xsim[d] < eps) {\n                    xsim[d] = eps;\n                }\n\n                if (xsim[d] > 1.0+eps) {\n                    MADNESS_EXCEPTION(\"eval: coordinate upper-bound error in dimension\", d);\n                }\n                else if (xsim[d] > 1.0-eps) {\n                    xsim[d] = 1.0-eps;\n                }\n            }\n\n            Future<long> result;\n            impl->evalR(xsim, impl->key0(), result.remote_ref(impl->world));\n            return result;\n        }\n\n        /// Evaluates a cube/slice of points (probably for plotting) ... collective but no fence necessary\n\n        /// All processes receive the entire result (which is a rather severe limit\n        /// on the size of the cube that is possible).\n\n        /// Set eval_refine=true to return the refinment levels of\n        /// the given function.\n\n        /// @param[in] cell A Tensor describe the cube where the function to be evaluated in\n        /// @param[in] npt How many points to evaluate in each dimension\n        /// @param[in] eval_refine Wether to return the refinment levels of the given function\n        Tensor<T> eval_cube(const Tensor<double>& cell,\n                            const std::vector<long>& npt,\n                            bool eval_refine = false) const {\n            MADNESS_ASSERT(static_cast<std::size_t>(cell.dim(0))>=NDIM && cell.dim(1)==2 && npt.size()>=NDIM);\n            PROFILE_MEMBER_FUNC(Function);\n            const double eps=1e-14;\n            verify();\n            reconstruct();\n            coordT simlo, simhi;\n            for (std::size_t d=0; d<NDIM; ++d) {\n                simlo[d] = cell(d,0);\n                simhi[d] = cell(d,1);\n            }\n            user_to_sim(simlo, simlo);\n            user_to_sim(simhi, simhi);\n\n            // Move the bounding box infintesimally inside dyadic\n            // points so that the evaluation logic does not fail\n            for (std::size_t d=0; d<NDIM; ++d) {\n                MADNESS_ASSERT(simhi[d] >= simlo[d]);\n                MADNESS_ASSERT(simlo[d] >= 0.0);\n                MADNESS_ASSERT(simhi[d] <= 1.0);\n\n                double delta = eps*(simhi[d]-simlo[d]);\n                simlo[d] += delta;\n                simhi[d] -= 2*delta;  // deliberate asymmetry\n            }\n            return impl->eval_plot_cube(simlo, simhi, npt, eval_refine);\n        }\n\n\n        /// Evaluates the function at a point in user coordinates.  Collective operation.\n\n        /// Throws if function is not initialized.\n        ///\n        /// This function calls eval, blocks until the result is\n        /// available and then broadcasts the result to everyone.\n        /// Therefore, if you are evaluating many points in parallel\n        /// it is \\em vastly less efficient than calling eval\n        /// directly, saving the futures, and then forcing all of the\n        /// results.\n        T operator()(const coordT& xuser) const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            if (!is_reconstructed()) reconstruct();\n            T result;\n            if (impl->world.rank() == 0) result = eval(xuser).get();\n            impl->world.gop.broadcast(result);\n            //impl->world.gop.fence();\n            return result;\n        }\n\n        /// Evaluates the function at a point in user coordinates.  Collective operation.\n\n        /// See \"operator()(const coordT& xuser)\" for more info\n        T operator()(double x, double y=0, double z=0, double xx=0, double yy=0, double zz=0) const {\n            coordT r;\n            r[0] = x;\n            if (NDIM>=2) r[1] = y;\n            if (NDIM>=3) r[2] = z;\n            if (NDIM>=4) r[3] = xx;\n            if (NDIM>=5) r[4] = yy;\n            if (NDIM>=6) r[5] = zz;\n            return (*this)(r);\n        }\n\n        /// Throws if function is not initialized.\n        ///\n        /// This function mimics operator() by going through the\n        /// tree looking for the depth of the tree at the point.\n        /// It blocks until the result is\n        /// available and then broadcasts the result to everyone.\n        /// Therefore, if you are evaluating many points in parallel\n        /// it is \\em vastly less efficient than calling evaldepthpt\n        /// directly, saving the futures, and then forcing all of the\n        /// results.\n        Level depthpt(const coordT& xuser) const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            if (!is_reconstructed()) reconstruct();\n            Level result;\n            if (impl->world.rank() == 0) result = evaldepthpt(xuser).get();\n            impl->world.gop.broadcast(result);\n            //impl->world.gop.fence();\n            return result;\n        }\n\n        /// Returns an estimate of the difference ||this-func||^2 from local data\n\n        /// No communication is performed.  If the function is not\n        /// reconstructed, it throws an exception.  To get the global\n        /// value either do a global sum of the local values or call\n        /// errsq\n        /// @param[in] func Templated interface to the a user specified function\n        template <typename funcT>\n        double errsq_local(const funcT& func) const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            if (!is_reconstructed()) MADNESS_EXCEPTION(\"Function:errsq_local:not reconstructed\",0);\n            return impl->errsq_local(func);\n        }\n\n\n        /// Returns an estimate of the difference ||this-func|| ... global sum performed\n\n        /// If the function is compressed, it is reconstructed first.  For efficient use\n        /// especially with many functions, reconstruct them all first, and use errsq_local\n        /// instead so you can perform a global sum on all at the same time.\n        /// @param[in] func Templated interface to the a user specified function\n        template <typename funcT>\n        double err(const funcT& func) const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            if (VERIFY_TREE) verify_tree();\n            if (!is_reconstructed()) reconstruct();\n            if (VERIFY_TREE) verify_tree();\n            double local = impl->errsq_local(func);\n            impl->world.gop.sum(local);\n            impl->world.gop.fence();\n            return sqrt(local);\n        }\n\n        /// Verifies the tree data structure ... global sync implied\n        void verify_tree() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (impl) impl->verify_tree();\n        }\n\n\n        /// Returns true if compressed, false otherwise.  No communication.\n\n        /// If the function is not initialized, returns false.\n        bool is_compressed() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (impl)\n                return impl->is_compressed();\n            else\n                return false;\n        }\n\n        /// Returns true if reconstructed, false otherwise.  No communication.\n\n        /// If the function is not initialized, returns false.\n        bool is_reconstructed() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (impl)\n                return impl->is_reconstructed();\n            else\n                return false;\n        }\n\n        /// Returns true if nonstandard-compressed, false otherwise.  No communication.\n\n        /// If the function is not initialized, returns false.\n        bool is_nonstandard() const {\n            PROFILE_MEMBER_FUNC(Function);\n            return impl ? impl->is_nonstandard() : false;\n        }\n\n        /// Returns true if redundant, false otherwise.  No communication.\n\n        /// If the function is not initialized, returns false.\n        bool is_redundant() const {\n            PROFILE_MEMBER_FUNC(Function);\n            return impl ? impl->is_redundant() : false;\n        }\n\n        /// Returns true if redundant_after_merge, false otherwise.  No communication.\n\n        /// If the function is not initialized, returns false.\n        bool is_redundant_after_merge() const {\n            PROFILE_MEMBER_FUNC(Function);\n            return impl ? impl->is_redundant_after_merge() : false;\n        }\n\n        /// Returns the number of nodes in the function tree ... collective global sum\n        std::size_t tree_size() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return 0;\n            return impl->tree_size();\n        }\n\n        /// print some info about this\n        void print_size(const std::string name) const {\n            if (!impl) {\n                print(\"function\",name,\"not assigned yet\");\n            } else {\n                impl->print_size(name);\n            }\n        }\n\n        /// Returns the maximum depth of the function tree ... collective global sum\n        std::size_t max_depth() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return 0;\n            return impl->max_depth();\n        }\n\n\n        /// Returns the maximum local depth of the function tree ... no communications\n        std::size_t max_local_depth() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return 0;\n            return impl->max_local_depth();\n        }\n\n\n        /// Returns the max number of nodes on a processor\n        std::size_t max_nodes() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return 0;\n            return impl->max_nodes();\n        }\n\n        /// Returns the min number of nodes on a processor\n        std::size_t min_nodes() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return 0;\n            return impl->min_nodes();\n        }\n\n\n        /// Returns the number of coefficients in the function ... collective global sum\n        std::size_t size() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return 0;\n            return impl->size();\n        }\n\n        /// Return the number of coefficients in the function on this processor\n        std::size_t size_local() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return 0;\n            return impl->size_local();\n        }\n\n\n        /// Returns value of autorefine flag.  No communication.\n        bool autorefine() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return true;\n            return impl->get_autorefine();\n        }\n\n\n        /// Sets the value of the autorefine flag.  Optional global fence.\n\n        /// A fence is required to ensure consistent global state.\n        void set_autorefine(bool value, bool fence = true) {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            impl->set_autorefine(value);\n            if (fence) impl->world.gop.fence();\n        }\n\n\n        /// Returns value of truncation threshold.  No communication.\n        double thresh() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return 0.0;\n            return impl->get_thresh();\n        }\n\n\n        /// Sets the value of the truncation threshold.  Optional global fence.\n\n        /// A fence is required to ensure consistent global state.\n        void set_thresh(double value, bool fence = true) {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            impl->set_thresh(value);\n            if (fence) impl->world.gop.fence();\n        }\n\n\n        /// Returns the number of multiwavelets (k).  No communication.\n        int k() const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            return impl->get_k();\n        }\n\n\n        /// Truncate the function with optional fence.  Compresses with fence if not compressed.\n\n        /// If the truncation threshold is less than or equal to zero the default value\n        /// specified when the function was created is used.\n        /// If the function is not initialized, it just returns.\n        ///\n        /// Returns this for chaining.\n\t\t/// @param[in] tol Tolerance for truncating the coefficients. Default 0.0 means use the implementation's member value \\c thresh instead.\n\t\t/// @param[in] fence Do fence\n        Function<T,NDIM>& truncate(double tol = 0.0, bool fence = true) {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return *this;\n            verify();\n//            if (!is_compressed()) compress();\n            impl->truncate(tol,fence);\n            if (VERIFY_TREE) verify_tree();\n            return *this;\n        }\n\n\n        /// Returns a shared-pointer to the implementation\n        const std::shared_ptr< FunctionImpl<T,NDIM> >& get_impl() const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            return impl;\n        }\n\n        /// Replace current FunctionImpl with provided new one\n        void set_impl(const std::shared_ptr< FunctionImpl<T,NDIM> >& impl) {\n            PROFILE_MEMBER_FUNC(Function);\n            this->impl = impl;\n        }\n\n\n        /// Replace the current functor with the provided new one\n\n        /// presumably the new functor will be a CompositeFunctor, which will\n        /// change the behavior of the function: multiply the functor with the function\n        void set_functor(const std::shared_ptr<FunctionFunctorInterface<T, NDIM> > functor) {\n        \tthis->impl->set_functor(functor);\n        \tprint(\"set functor in mra.h\");\n        }\n\n        bool is_on_demand() const {return this->impl->is_on_demand();}\n\n        /// Replace current FunctionImpl with a new one using the same parameters & map as f\n\n        /// If zero is true the function is initialized to zero, otherwise it is empty\n        template <typename R>\n        void set_impl(const Function<R,NDIM>& f, bool zero = true) {\n            impl = std::shared_ptr<implT>(new implT(*f.get_impl(), f.get_pmap(), zero));\n\t    if (zero) world().gop.fence();\n        }\n\n        /// Returns the world\n        World& world() const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            return  impl->world;\n        }\n\n\n        /// Returns a shared pointer to the process map\n        const std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& get_pmap() const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            return impl->get_pmap();\n        }\n\n        /// replicate this function according to type\n        ///\n        /// ** note that global operations will return unexpected results **\n        /// Be sure you know what you are doing!\n        void replicate(const DistributionType type, bool fence=true) const {\n            verify();\n            if (type==DistributionType::RankReplicated) impl->replicate(fence);\n            else if (type==DistributionType::NodeReplicated) impl->replicate_on_hosts(fence);\n            else MADNESS_EXCEPTION(\"Function::replicate: unknown DistributionType\",type);\n        }\n\n        /// replicate this function, generating a unique pmap\n\n        /// ** note that global operations will return unexpected results **\n        /// Be sure you know what you are doing!\n        void replicate(bool fence=true) const {\n            verify();\n            impl->replicate(fence);\n        }\n\n        /// replicate this function, one copy per host\n\n        /// map will refer the to first rank on each host to avoid inter-node communication\n        /// ** note that global operations will return unexpected results **\n        /// Be sure you know what you are doing!\n        void replicate_on_hosts(bool fence=true) const {\n            verify();\n            impl->replicate_on_hosts(fence);\n        }\n\n\n        /// distribute this function according to newmap\n        void distribute(std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > > newmap) const {\n            verify();\n            impl->distribute(newmap);\n        }\n\n\n        /// Returns the square of the norm of the local function ... no communication\n\n        /// Works in either basis\n        double norm2sq_local() const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            MADNESS_CHECK_THROW(is_compressed() or is_reconstructed(),\n                \"function must be compressed or reconstructed for norm2sq_local\");\n            return impl->norm2sq_local();\n        }\n\n\n        /// Returns the 2-norm of the function ... global sum ... works in either basis\n\n        /// See comments for err() w.r.t. applying to many functions.\n        double norm2() const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            if (VERIFY_TREE) verify_tree();\n            double local = impl->norm2sq_local();\n\n            impl->world.gop.sum(local);\n            impl->world.gop.fence();\n            return sqrt(local);\n        }\n\n\n        /// Initializes information about the function norm at all length scales\n        void norm_tree(bool fence = true) const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            if (VERIFY_TREE) verify_tree();\n            if (!is_reconstructed()) reconstruct();\n            const_cast<Function<T,NDIM>*>(this)->impl->norm_tree(fence);\n        }\n\n\n        /// Compresses the function, transforming into wavelet basis.  Possible non-blocking comm.\n\n        /// By default fence=true meaning that this operation completes before returning,\n        /// otherwise if fence=false it returns without fencing and the user must invoke\n        /// world.gop.fence() to assure global completion before using the function\n        /// for other purposes.\n        ///\n        /// Noop if already compressed or if not initialized.\n        ///\n        /// Since reconstruction/compression do not discard information we define them\n        /// as const ... \"logical constness\" not \"bitwise constness\".\n        const Function<T,NDIM>& compress(bool fence = true) const {\n            return change_tree_state(compressed,fence);\n        }\n\n\n        /// Compresses the function retaining scaling function coeffs.  Possible non-blocking comm.\n\n        /// By default fence=true meaning that this operation completes before returning,\n        /// otherwise if fence=false it returns without fencing and the user must invoke\n        /// world.gop.fence() to assure global completion before using the function\n        /// for other purposes.\n        ///\n        /// Noop if already compressed or if not initialized.\n        void make_nonstandard(bool keepleaves, bool fence=true) const {\n            TreeState newstate=TreeState::nonstandard;\n            if (keepleaves) newstate=nonstandard_with_leaves;\n            change_tree_state(newstate,fence);\n        }\n\n        /// Converts the function standard compressed form.  Possible non-blocking comm.\n\n        /// By default fence=true meaning that this operation completes before returning,\n        /// otherwise if fence=false it returns without fencing and the user must invoke\n        /// world.gop.fence() to assure global completion before using the function\n        /// for other purposes.\n        ///\n        /// Must be already compressed.\n        void standard(bool fence = true) {\n            change_tree_state(compressed,fence);\n        }\n\n        /// Converts the function to redundant form, i.e. sum coefficients on all levels\n\n        /// By default fence=true meaning that this operation completes before returning,\n        /// otherwise if fence=false it returns without fencing and the user must invoke\n        /// world.gop.fence() to assure global completion before using the function\n        /// for other purposes.\n        ///\n        /// Must be already compressed.\n        void make_redundant(bool fence = true) {\n            change_tree_state(redundant, fence);\n        }\n\n        /// Reconstructs the function, transforming into scaling function basis.  Possible non-blocking comm.\n\n        /// By default fence=true meaning that this operation completes before returning,\n        /// otherwise if fence=false it returns without fencing and the user must invoke\n        /// world.gop.fence() to assure global completion before using the function\n        /// for other purposes.\n        ///\n        /// Noop if already reconstructed or if not initialized.\n        ///\n        /// Since reconstruction/compression do not discard information we define them\n        /// as const ... \"logical constness\" not \"bitwise constness\".\n        const Function<T,NDIM>& reconstruct(bool fence = true) const {\n            return change_tree_state(reconstructed, fence);\n        }\n\n        /// changes tree state to given state\n\n        /// Since reconstruction/compression do not discard information we define them\n        /// as const ... \"logical constness\" not \"bitwise constness\".\n        /// @param[in]  finalstate  The final state of the tree\n        /// @param[in]  fence       Fence after the operation (might not be respected!!!)\n        const Function<T,NDIM>& change_tree_state(const TreeState finalstate, bool fence = true) const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (not impl) return *this;\n            TreeState current_state = impl->get_tree_state();\n            if (finalstate == current_state) return *this;\n            MADNESS_CHECK_THROW(current_state != TreeState::unknown, \"unknown tree state\");\n\n            impl->change_tree_state(finalstate, fence);\n            if (fence && VERIFY_TREE) verify_tree();\n            return *this;\n        }\n\n        /// Sums scaling coeffs down tree restoring state with coeffs only at leaves.  Optional fence.  Possible non-blocking comm.\n        void sum_down(bool fence = true) const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            MADNESS_CHECK_THROW(impl->get_tree_state()==redundant_after_merge, \"sum_down requires a redundant_after_merge state\");\n            const_cast<Function<T,NDIM>*>(this)->impl->sum_down(fence);\n            const_cast<Function<T,NDIM>*>(this)->impl->set_tree_state(reconstructed);\n\n            if (fence && VERIFY_TREE) verify_tree(); // Must be after in case nonstandard\n        }\n\n\n        /// Inplace autorefines the function.  Optional fence. Possible non-blocking comm.\n        template <typename opT>\n        void refine_general(const opT& op, bool fence = true) const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            if (!is_reconstructed()) reconstruct();\n            impl->refine(op, fence);\n        }\n\n\n        struct autorefine_square_op {\n            bool operator()(implT* impl, const Key<NDIM>& key, const nodeT& t) const {\n                return impl->autorefine_square_test(key, t);\n            }\n\n            template <typename Archive> void serialize (Archive& ar) {}\n        };\n\n        /// Inplace autorefines the function using same test as for squaring.\n\n        /// return this for chaining\n        const Function<T,NDIM>& refine(bool fence = true) const {\n            refine_general(autorefine_square_op(), fence);\n            return *this;\n        }\n\n        /// Inplace broadens support in scaling function basis\n        void broaden(const BoundaryConditions<NDIM>& bc=FunctionDefaults<NDIM>::get_bc(),\n                     bool fence = true) const {\n            verify();\n            reconstruct();\n            impl->broaden(bc.is_periodic(), fence);\n        }\n\n\n        /// Clears the function as if constructed uninitialized.  Optional fence.\n\n        /// Any underlying data will not be freed until the next global fence.\n        void clear(bool fence = true) {\n            PROFILE_MEMBER_FUNC(Function);\n            if (impl) {\n                World& world = impl->world;\n                impl.reset();\n                if (fence) world.gop.fence();\n            }\n        }\n\n        /// Process 0 prints a summary of all nodes in the tree (collective)\n        void print_tree(std::ostream& os = std::cout) const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (impl) impl->print_tree(os);\n        }\n\n        /// same as print_tree() but produces JSON-formatted string\n        /// @warning enclose the result in braces to make it a valid JSON object\n        void print_tree_json(std::ostream& os = std::cout) const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (impl) impl->print_tree_json(os);\n        }\n\n        /// Process 0 prints a graphviz-formatted output of all nodes in the tree (collective)\n        void print_tree_graphviz(std::ostream& os = std::cout) const {\n            PROFILE_MEMBER_FUNC(Function);\n            os << \"digraph G {\" << std::endl;\n            if (impl) impl->print_tree_graphviz(os);\n            os << \"}\" << std::endl;\n        }\n\n        /// Print a summary of the load balancing info\n\n        /// This is serial and VERY expensive\n        void print_info() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (impl) impl->print_info();\n        }\n\n        struct SimpleUnaryOpWrapper {\n            T (*f)(T);\n            SimpleUnaryOpWrapper(T (*f)(T)) : f(f) {}\n            void operator()(const Key<NDIM>& key, Tensor<T>& t) const {\n                UNARY_OPTIMIZED_ITERATOR(T, t, *_p0 = f(*_p0));\n            }\n            template <typename Archive> void serialize(Archive& ar) {}\n        };\n\n        /// Inplace unary operation on function values\n        void unaryop(T (*f)(T)) {\n            // Must fence here due to temporary object on stack\n            // stopping us returning before complete\n            this->unaryop(SimpleUnaryOpWrapper(f));\n        }\n\n\n        /// Inplace unary operation on function values\n        template <typename opT>\n        void unaryop(const opT& op, bool fence=true) {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            reconstruct();\n            impl->unary_op_value_inplace(op, fence);\n        }\n\n\n        /// Unary operation applied inplace to the coefficients\n        template <typename opT>\n        void unaryop_coeff(const opT& op,\n                           bool fence = true) {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            impl->unary_op_coeff_inplace(op, fence);\n        }\n\n\n        /// Unary operation applied inplace to the nodes\n        template <typename opT>\n        void unaryop_node(const opT& op,\n                          bool fence = true) {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            impl->unary_op_node_inplace(op, fence);\n        }\n\n\n\n\n        static void doconj(const Key<NDIM>, Tensor<T>& t) {\n            PROFILE_MEMBER_FUNC(Function);\n            t.conj();\n        }\n\n        /// Inplace complex conjugate.  No communication except for optional fence.\n\n        /// Returns this for chaining.  Works in either basis.\n        Function<T,NDIM> conj(bool fence = true) {\n            PROFILE_MEMBER_FUNC(Function);\n            unaryop_coeff(&Function<T,NDIM>::doconj, fence);\n            return *this;\n        }\n\n\n        /// Inplace, scale the function by a constant.  No communication except for optional fence.\n\n        /// Works in either basis.  Returns reference to this for chaining.\n        template <typename Q>\n        Function<T,NDIM>& scale(const Q q, bool fence=true) {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            if (VERIFY_TREE) verify_tree();\n            impl->scale_inplace(q,fence);\n            return *this;\n        }\n\n\n        /// Inplace add scalar.  No communication except for optional fence.\n        Function<T,NDIM>& add_scalar(T t, bool fence=true) {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            if (VERIFY_TREE) verify_tree();\n            impl->add_scalar_inplace(t,fence);\n            return *this;\n        }\n\n\n        /// Inplace, general bi-linear operation in wavelet basis.  No communication except for optional fence.\n\n        /// If the functions are not in the wavelet basis an exception is thrown since this routine\n        /// is intended to be fast and unexpected compression is assumed to be a performance bug.\n        ///\n        /// Returns this for chaining, can be in states compressed of redundant_after_merge.\n        ///\n        /// this and other may have different distributions and may even live in different worlds\n        ///\n        /// this <-- this*alpha + other*beta\n        template <typename Q, typename R>\n        Function<T,NDIM>& gaxpy(const T& alpha,\n                                const Function<Q,NDIM>& other, const R& beta, bool fence=true) {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            other.verify();\n\n            // operation is done either in compressed or reconstructed state\n            TreeState operating_state=this->get_impl()->get_tensor_type()==TT_FULL ? compressed : reconstructed;\n\n            TreeState thisstate=impl->get_tree_state();\n            TreeState otherstate=other.get_impl()->get_tree_state();\n\n            if (operating_state==compressed) {\n                MADNESS_CHECK_THROW(thisstate==compressed, \"gaxpy: this must be compressed\");\n                MADNESS_CHECK_THROW(otherstate==compressed, \"gaxpy: other must be compressed\");\n                impl->gaxpy_inplace(alpha, *other.get_impl(), beta, fence);\n\n            } else if (operating_state==reconstructed) {\n                // this works both in reconstructed and redundant_after_merge states\n                MADNESS_CHECK_THROW(thisstate==reconstructed or thisstate==redundant_after_merge,\n                    \"gaxpy: this must be reconstructed or redundant_after_merge\");\n                MADNESS_CHECK_THROW(otherstate==reconstructed or otherstate==redundant_after_merge,\n                    \"gaxpy: other must be reconstructed or redundant_after_merge\");\n\n                impl->gaxpy_inplace_reconstructed(alpha,*other.get_impl(),beta,fence);\n            } else {\n                MADNESS_EXCEPTION(\"unknown tree state\",1);\n            }\n            return *this;\n        }\n\n\n        /// Inplace addition of functions in the wavelet basis\n\n        /// Using operator notation forces a global fence after every operation.\n        /// Functions don't need to be compressed, it's the caller's responsibility\n        /// to choose an appropriate state with performance, usually compressed for 3d,\n        /// reconstructed for 6d)\n        template <typename Q>\n        Function<T,NDIM>& operator+=(const Function<Q,NDIM>& other) {\n            PROFILE_MEMBER_FUNC(Function);\n\n            // do this in reconstructed or compressed form\n            TreeState operating_state=get_impl()->get_tensor_type()==TT_FULL ? compressed : reconstructed;\n            this->change_tree_state(operating_state);\n            other.change_tree_state(operating_state);\n\n            MADNESS_ASSERT(impl->get_tree_state() == other.get_impl()->get_tree_state());\n            if (VERIFY_TREE) verify_tree();\n            if (VERIFY_TREE) other.verify_tree();\n            return gaxpy(T(1.0), other, Q(1.0), true);\n        }\n\n\n        /// Inplace subtraction of functions in the wavelet basis\n\n        /// Using operator notation forces a global fence after every operation\n        template <typename Q>\n        Function<T,NDIM>& operator-=(const Function<Q,NDIM>& other) {\n            PROFILE_MEMBER_FUNC(Function);\n            if (NDIM<=3) {\n                compress();\n                other.compress();\n            } else {\n                reconstruct();\n                other.reconstruct();\n            }\n            MADNESS_ASSERT(impl->get_tree_state() == other.get_impl()->get_tree_state());\n            if (VERIFY_TREE) verify_tree();\n            if (VERIFY_TREE) other.verify_tree();\n            return gaxpy(T(1.0), other, Q(-1.0), true);\n        }\n\n\n        /// Inplace scaling by a constant\n\n        /// Using operator notation forces a global fence after every operation\n        template <typename Q>\n        typename IsSupported<TensorTypeData<Q>, Function<T,NDIM> >::type &\n        operator*=(const Q q) {\n            PROFILE_MEMBER_FUNC(Function);\n            scale(q,true);\n            return *this;\n        }\n\n\n        /// Inplace squaring of function ... global comm only if not reconstructed\n\n        /// Returns *this for chaining.\n        Function<T,NDIM>& square(bool fence = true) {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!is_reconstructed()) reconstruct();\n            if (VERIFY_TREE) verify_tree();\n            impl->square_inplace(fence);\n            return *this;\n        }\n\n        /// Returns *this for chaining.\n        Function<T,NDIM>& abs(bool fence = true) {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!is_reconstructed()) reconstruct();\n            if (VERIFY_TREE) verify_tree();\n            impl->abs_inplace(fence);\n            return *this;\n        }\n\n        /// Returns *this for chaining.\n        Function<T,NDIM>& abs_square(bool fence = true) {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!is_reconstructed()) reconstruct();\n            if (VERIFY_TREE) verify_tree();\n            impl->abs_square_inplace(fence);\n            return *this;\n        }\n\n        /// Returns local contribution to \\c int(f(x),x) ... no communication\n\n        /// In the wavelet basis this is just the coefficient of the first scaling\n        /// function which is a constant.  In the scaling function basis we\n        /// must add up contributions from each box.\n        T trace_local() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return 0.0;\n            if (VERIFY_TREE) verify_tree();\n            return impl->trace_local();\n        }\n\n\n        /// Returns global value of \\c int(f(x),x) ... global comm required\n        T trace() const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!impl) return 0.0;\n            T sum = impl->trace_local();\n            impl->world.gop.sum(sum);\n            impl->world.gop.fence();\n            return sum;\n        }\n\n\n        /// Returns local part of inner product ... throws if both not compressed\n        template <typename R>\n        TENSOR_RESULT_TYPE(T,R) inner_local(const Function<R,NDIM>& g) const {\n            PROFILE_MEMBER_FUNC(Function);\n            bool compressed=is_compressed() and g.is_compressed();\n            bool redundant=is_redundant() and g.is_redundant();\n            MADNESS_CHECK_THROW(compressed or redundant,\"functions must be compressed or redundant in inner\");\n            if (VERIFY_TREE) verify_tree();\n            if (VERIFY_TREE) g.verify_tree();\n            return impl->inner_local(*(g.get_impl()));\n        }\n\n        /// Returns local part of dot product ... throws if both not compressed\n        template <typename R>\n        TENSOR_RESULT_TYPE(T,R) dot_local(const Function<R,NDIM>& g) const {\n            PROFILE_MEMBER_FUNC(Function);\n            MADNESS_ASSERT(is_compressed());\n            MADNESS_ASSERT(g.is_compressed());\n            if (VERIFY_TREE) verify_tree();\n            if (VERIFY_TREE) g.verify_tree();\n            return impl->dot_local(*(g.get_impl()));\n        }\n\n\n        /// With this being an on-demand function, fill the MRA tree according to different criteria\n\n        /// @param[in]  g   the function after which the MRA structure is modeled (any basis works)\n        template<typename R>\n        Function<T,NDIM>& fill_tree(const Function<R,NDIM>& g, bool fence=true) {\n          MADNESS_ASSERT(g.is_initialized());\n          MADNESS_ASSERT(is_on_demand());\n\n          // clear what we have\n          impl->get_coeffs().clear();\n\n          //leaf_op<T,NDIM> gnode_is_leaf(g.get_impl().get());\n          Leaf_op_other<T,NDIM> gnode_is_leaf(g.get_impl().get());\n          impl->make_Vphi(gnode_is_leaf,fence);\n          return *this;\n\n        }\n\n        /// With this being an on-demand function, fill the MRA tree according to different criteria\n\n        /// @param[in]  op  the convolution operator for screening\n        template<typename opT>\n        Function<T,NDIM>& fill_tree(const opT& op, bool fence=true) {\n          MADNESS_ASSERT(is_on_demand());\n          // clear what we have\n          impl->get_coeffs().clear();\n          Specialbox_op<T,NDIM> sbox;\n          Leaf_op<T,NDIM,opT,Specialbox_op<T,NDIM> > leaf_op(this->get_impl().get(),&op,sbox);\n          impl ->make_Vphi(leaf_op,fence);\n          return *this;\n        }\n\n        /// With this being an on-demand function, fill the MRA tree according to different criteria\n        Function<T,NDIM>& fill_tree(bool fence=true) {\n          MADNESS_ASSERT(is_on_demand());\n          // clear what we have\n          impl->get_coeffs().clear();\n          Leaf_op<T,NDIM,SeparatedConvolution<double,NDIM>,Specialbox_op<T,NDIM> > leaf_op(this->get_impl().get());\n          impl->make_Vphi(leaf_op,fence);\n          return *this;\n        }\n\n        /// Special refinement on 6D boxes where the electrons come close (meet)\n        /// @param[in]  op  the convolution operator for screening\n        template<typename opT>\n        Function<T,NDIM>& fill_cuspy_tree(const opT& op,const bool fence=true){\n          MADNESS_ASSERT(is_on_demand());\n          // clear what we have\n          impl->get_coeffs().clear();\n          ElectronCuspyBox_op<T,NDIM> sbox;\n\n          Leaf_op<T,NDIM,opT,ElectronCuspyBox_op<T,NDIM> > leaf_op(this->get_impl().get(),&op,sbox);\n          impl ->make_Vphi(leaf_op,fence);\n\n          return *this;\n        }\n\n        /// Special refinement on 6D boxes where the electrons come close (meet)\n        Function<T,NDIM>& fill_cuspy_tree(const bool fence=true){\n          MADNESS_ASSERT(is_on_demand());\n          // clear what we have\n          impl->get_coeffs().clear();\n          ElectronCuspyBox_op<T,NDIM> sbox;\n\n          Leaf_op<T,NDIM,SeparatedConvolution<double,NDIM>,ElectronCuspyBox_op<T,NDIM> > leaf_op(this->get_impl().get(),sbox);\n          impl ->make_Vphi(leaf_op,fence);\n\n          return *this;\n        }\n\n        /// Special refinement on 6D boxes for the nuclear potentials (regularized with cusp, non-regularized with singularity)\n        /// @param[in]  op  the convolution operator for screening\n        template<typename opT>\n        Function<T,NDIM>& fill_nuclear_cuspy_tree(const opT& op,const size_t particle,const bool fence=true){\n          MADNESS_ASSERT(is_on_demand());\n          // clear what we have\n          impl->get_coeffs().clear();\n          NuclearCuspyBox_op<T,NDIM> sbox(particle);\n\n          Leaf_op<T,NDIM,opT,NuclearCuspyBox_op<T,NDIM> > leaf_op(this->get_impl().get(),&op,sbox);\n          impl ->make_Vphi(leaf_op,fence);\n\n          return *this;\n        }\n\n        /// Special refinement on 6D boxes for the nuclear potentials (regularized with cusp, non-regularized with singularity)\n        Function<T,NDIM>& fill_nuclear_cuspy_tree(const size_t particle,const bool fence=true){\n          MADNESS_ASSERT(is_on_demand());\n          // clear what we have\n          impl->get_coeffs().clear();\n          NuclearCuspyBox_op<T,NDIM> sbox(particle);\n\n          Leaf_op<T,NDIM,SeparatedConvolution<double,NDIM>,NuclearCuspyBox_op<T,NDIM> > leaf_op(this->get_impl().get(),sbox);\n          impl ->make_Vphi(leaf_op,fence);\n\n          return *this;\n        }\n\n        /// perform the hartree product of f*g, invoked by result\n        template<size_t LDIM, size_t KDIM, typename opT>\n        void do_hartree_product(const std::vector<std::shared_ptr<FunctionImpl<T,LDIM>>> left,\n                                const std::vector<std::shared_ptr<FunctionImpl<T,KDIM>>> right,\n                                const opT* op) {\n\n            // get the right leaf operator\n            hartree_convolute_leaf_op<T,KDIM+LDIM,LDIM,opT> leaf_op(impl.get(),left,op);\n            impl->hartree_product(left,right,leaf_op,true);\n            impl->finalize_sum();\n//            this->truncate();\n\n        }\n\n        /// perform the hartree product of f*g, invoked by result\n        template<size_t LDIM, size_t KDIM>\n        void do_hartree_product(const std::vector<std::shared_ptr<FunctionImpl<T,LDIM>>> left,\n                                const std::vector<std::shared_ptr<FunctionImpl<T,KDIM>>> right) {\n\n//            hartree_leaf_op<T,KDIM+LDIM> leaf_op(impl.get(),cdata.s0);\n            hartree_leaf_op<T,KDIM+LDIM> leaf_op(impl.get(),k());\n            impl->hartree_product(left,right,leaf_op,true);\n            impl->finalize_sum();\n//            this->truncate();\n\n        }\n\n        /// Returns the inner product\n\n        /// Not efficient for computing multiple inner products\n        /// @param[in]  g   Function, optionally on-demand\n        template <typename R>\n        TENSOR_RESULT_TYPE(T,R) inner(const Function<R,NDIM>& g) const {\n            PROFILE_MEMBER_FUNC(Function);\n\n            // fast return if possible\n            if (not this->is_initialized()) return 0.0;\n            if (not g.is_initialized()) return 0.0;\n\n            // if this and g are the same, use norm2()\n            if constexpr (std::is_same_v<T,R>) {\n              if (this->get_impl() == g.get_impl()) {\n                TreeState state = this->get_impl()->get_tree_state();\n                if (not(state == reconstructed or state == compressed))\n                  change_tree_state(reconstructed);\n                double norm = this->norm2();\n                return norm * norm;\n              }\n            }\n\n            // do it case-by-case\n            if constexpr (std::is_same_v<R,T>) {\n              if (this->is_on_demand())\n                return g.inner_on_demand(*this);\n              if (g.is_on_demand())\n                return this->inner_on_demand(g);\n            }\n\n            if (VERIFY_TREE) verify_tree();\n            if (VERIFY_TREE) g.verify_tree();\n\n            // compute in compressed form if compression is fast, otherwise in redundant form\n            TreeState operating_state=get_impl()->get_tensor_type()==TT_FULL ? compressed : redundant;\n\n            change_tree_state(operating_state,false);\n            g.change_tree_state(operating_state,false);\n            impl->world.gop.fence();\n\n            TENSOR_RESULT_TYPE(T,R) local = impl->inner_local(*g.get_impl());\n            impl->world.gop.sum(local);\n            impl->world.gop.fence();\n\n            // restore state -- no need for this\n            // change_tree_state(state,false);\n            // g.change_tree_state(gstate,false);\n            // impl->world.gop.fence();\n\n            return local;\n        }\n\n        /// Return the local part of inner product with external function ... no communication.\n        /// If you are going to be doing a bunch of inner_ext calls, set\n        /// keep_redundant to true and then manually undo_redundant when you\n        /// are finished.\n        /// @param[in] f Pointer to function of type T that take coordT arguments. This is the externally provided function\n        /// @param[in] leaf_refine boolean switch to turn on/off refinement past leaf nodes\n        /// @param[in] keep_redundant boolean switch to turn on/off undo_redundant\n        /// @return Returns local part of the inner product, i.e. over the domain of all function nodes on this compute node.\n        T inner_ext_local(const std::shared_ptr< FunctionFunctorInterface<T,NDIM> > f, const bool leaf_refine=true, const bool keep_redundant=false) const {\n            PROFILE_MEMBER_FUNC(Function);\n            change_tree_state(redundant);\n            T local = impl->inner_ext_local(f, leaf_refine);\n            if (not keep_redundant) change_tree_state(reconstructed);\n            return local;\n        }\n\n        /// Return the inner product with external function ... requires communication.\n        /// If you are going to be doing a bunch of inner_ext calls, set\n        /// keep_redundant to true and then manually undo_redundant when you\n        /// are finished.\n        /// @param[in] f Reference to FunctionFunctorInterface. This is the externally provided function\n        /// @param[in] leaf_refine boolean switch to turn on/off refinement past leaf nodes\n        /// @param[in] keep_redundant boolean switch to turn on/off undo_redundant\n        /// @return Returns the inner product\n        T inner_ext(const std::shared_ptr< FunctionFunctorInterface<T,NDIM> > f, const bool leaf_refine=true, const bool keep_redundant=false) const {\n            PROFILE_MEMBER_FUNC(Function);\n            change_tree_state(redundant);\n            T local = impl->inner_ext_local(f, leaf_refine);\n            impl->world.gop.sum(local);\n            impl->world.gop.fence();\n            if (not keep_redundant) change_tree_state(reconstructed);\n            return local;\n        }\n\n        /// Return the inner product with external function ... requires communication.\n        /// If you are going to be doing a bunch of inner_ext calls, set\n        /// keep_redundant to true and then manually undo_redundant when you\n        /// are finished.\n        /// @param[in] f Reference to FunctionFunctorInterface. This is the externally provided function\n        /// @param[in] leaf_refine boolean switch to turn on/off refinement past leaf nodes\n        /// @return Returns the inner product\n        T inner_adaptive(const std::shared_ptr< FunctionFunctorInterface<T,NDIM> > f,\n                const bool leaf_refine=true) const {\n            PROFILE_MEMBER_FUNC(Function);\n            reconstruct();\n            T local = impl->inner_adaptive_local(f, leaf_refine);\n            impl->world.gop.sum(local);\n            impl->world.gop.fence();\n            return local;\n        }\n\n        /// Return the local part of gaxpy with external function, this*alpha + f*beta ... no communication.\n        /// @param[in] alpha prefactor for this Function\n        /// @param[in] f Pointer to function of type T that take coordT arguments. This is the externally provided function\n        /// @param[in] beta prefactor for f\n        template <typename L>\n        void gaxpy_ext(const Function<L,NDIM>& left, T (*f)(const coordT&), T alpha, T beta, double tol, bool fence=true) const {\n            PROFILE_MEMBER_FUNC(Function);\n            if (!left.is_reconstructed()) left.reconstruct();\n            impl->gaxpy_ext(left.get_impl().get(), f, alpha, beta, tol, fence);\n        }\n\n        /// Returns the inner product for one on-demand function\n\n        /// It does work, but it might not give you the precision you expect.\n        /// The assumption is that the function g returns proper sum\n        /// coefficients on the MRA tree of this. This might not be the case if\n        /// g is constructed with an implicit multiplication, e.g.\n        ///  result = <this|g>,   with g = 1/r12 | gg>\n        /// @param[in]  g\ton-demand function\n        template<typename R>\n        TENSOR_RESULT_TYPE(T, R) inner_on_demand(const Function<R, NDIM>& g) const {\n            MADNESS_ASSERT(g.is_on_demand() and (not this->is_on_demand()));\n\n            constexpr std::size_t LDIM=std::max(NDIM/2,std::size_t(1));\n            auto func=dynamic_cast<CompositeFunctorInterface<T,NDIM,LDIM>* >(g.get_impl()->get_functor().get());\n            MADNESS_ASSERT(func);\n            func->make_redundant(true);\n            func->replicate_low_dim_functions(true);\n            this->reconstruct();        // if this == &g we don't need g to be redundant\n\n            if (VERIFY_TREE) verify_tree();\n\n            TENSOR_RESULT_TYPE(T, R) local = impl->inner_local_on_demand(*g.get_impl());\n            impl->world.gop.sum(local);\n            impl->world.gop.fence();\n\n            return local;\n        }\n\n        /// project this on the low-dim function g: h(x) = <f(x,y) | g(y)>\n\n        /// @param[in]  g   low-dim function\n        /// @param[in]  dim over which dimensions to be integrated: 0..LDIM-1 or LDIM..NDIM-1\n        /// @return     new function of dimension NDIM-LDIM\n        template <typename R, size_t LDIM>\n        Function<TENSOR_RESULT_TYPE(T,R),NDIM-LDIM> project_out(const Function<R,LDIM>& g, const int dim) const {\n            if (NDIM<=LDIM) MADNESS_EXCEPTION(\"confused dimensions in project_out?\",1);\n            MADNESS_CHECK_THROW(dim==0 or dim==1,\"dim must be 0 or 1 in project_out\");\n            verify();\n            typedef TENSOR_RESULT_TYPE(T,R) resultT;\n            static const size_t KDIM=NDIM-LDIM;\n\n            FunctionFactory<resultT,KDIM> factory=FunctionFactory<resultT,KDIM>(world())\n                    .k(g.k()).thresh(g.thresh());\n            Function<resultT,KDIM> result=factory;      // no empty() here!\n\n            change_tree_state(reconstructed,false);\n            g.change_tree_state(redundant,false);\n            world().gop.fence();\n            this->get_impl()->project_out(result.get_impl().get(),g.get_impl().get(),dim,true);\n//            result.get_impl()->project_out2(this->get_impl().get(),gimpl,dim);\n            result.world().gop.fence();\n            g.change_tree_state(reconstructed,false);\n            result.get_impl()->trickle_down(false);\n            result.get_impl()->set_tree_state(reconstructed);\n            result.world().gop.fence();\n            return result;\n        }\n\n        Function<T,NDIM/2> dirac_convolution(const bool fence=true) const {\n            constexpr std::size_t LDIM=NDIM/2;\n            MADNESS_CHECK_THROW(NDIM==2*LDIM,\"NDIM must be even\");\n//        \t// this will be the result function\n        \tFunctionFactory<T,LDIM> factory=FunctionFactory<T,LDIM>(world()).k(this->k());\n        \tFunction<T,LDIM> f = factory;\n        \tif(!is_reconstructed()) this->reconstruct();\n        \tthis->get_impl()->do_dirac_convolution(f.get_impl().get(),fence);\n        \treturn f;\n        }\n\n        /// Replaces this function with one loaded from an archive using the default processor map\n\n        /// Archive can be sequential or parallel.\n        ///\n        /// The & operator for serializing will only work with parallel archives.\n        template <typename Archive>\n        void load(World& world, Archive& ar) {\n            PROFILE_MEMBER_FUNC(Function);\n            // Type checking since we are probably circumventing the archive's own type checking\n            long magic = 0l, id = 0l, ndim = 0l, k = 0l;\n            Tensor<double> cell;\n            ar & magic & id & ndim & k & cell;\n            MADNESS_ASSERT(magic == 7776769); // Mellow Mushroom Pizza tel.# in Knoxville (+1 for cell in header)\n            MADNESS_ASSERT(id == TensorTypeData<T>::id);\n            MADNESS_ASSERT(ndim == NDIM);\n\n            // if simulation cell is set it must match the cell from function on file.\n            // if simulation cell is not set set it to the one found on file\n            //  -- for the latter the only use case seems a python script for plotting\n            if (FunctionDefaults<NDIM>::get_cell().size()>0) {\n                if ((cell-FunctionDefaults<NDIM>::get_cell()).normf()>1.e-14) {\n                    std::ostringstream oss;\n                    oss << \"simulation cells inconsistent: stored cell differs from FunctionDefaults cell.\\n\"\n                        << \"Call FunctionDefaults<\" << NDIM << \">::clear_cell() before reloading \"\n                        << \"(this will render all existing functions useless!)\";\n                    MADNESS_EXCEPTION(oss.str().c_str(), 1);\n                }\n            } else {    // no cell set in the defaults: use the one from file\n                FunctionDefaults<NDIM>::set_cell(cell);\n            }\n\n            impl.reset(new implT(FunctionFactory<T,NDIM>(world).k(k).empty()));\n            impl->load(ar);\n        }\n\n\n        /// Stores the function to an archive\n\n        /// Archive can be sequential or parallel.\n        ///\n        /// The & operator for serializing will only work with parallel archives.\n        template <typename Archive>\n        void store(Archive& ar) const {\n            PROFILE_MEMBER_FUNC(Function);\n            verify();\n            // For type checking, etc.\n            ar & long(7776769) & long(TensorTypeData<T>::id) & long(NDIM) & long(k()) & impl->get_cell();\n\n            impl->store(ar);\n        }\n\n        /// change the tensor type of the coefficients in the FunctionNode\n\n        /// @param[in]  targs   target tensor arguments (threshold and full/low rank)\n        void change_tensor_type(const TensorArgs& targs, bool fence=true) {\n            if (not impl) return;\n            impl->change_tensor_type1(targs,fence);\n        }\n\n\n        /// This is replaced with left*right ...  private\n        template <typename Q, typename opT>\n        Function<typename opT::resultT,NDIM>& unary_op_coeffs(const Function<Q,NDIM>& func,\n                const opT& op, bool fence) {\n            PROFILE_MEMBER_FUNC(Function);\n            func.verify();\n            MADNESS_ASSERT(func.is_reconstructed());\n            if (VERIFY_TREE) func.verify_tree();\n            impl.reset(new implT(*func.get_impl(), func.get_pmap(), false));\n            impl->unaryXX(func.get_impl().get(), op, fence);\n            return *this;\n        }\n\n        /// Returns vector of FunctionImpl pointers corresponding to vector of functions\n        template <typename Q, std::size_t D>\n        static std::vector< std::shared_ptr< FunctionImpl<Q,D> > > vimpl(const std::vector< Function<Q,D> >& v) {\n            PROFILE_MEMBER_FUNC(Function);\n            std::vector< std::shared_ptr< FunctionImpl<Q,D> > > r(v.size());\n            for (unsigned int i=0; i<v.size(); ++i) r[i] = v[i].get_impl();\n            return r;\n        }\n\n        /// This is replaced with op(vector of functions) ... private\n        template <typename opT>\n        Function<T,NDIM>& multiop_values(const opT& op, const std::vector< Function<T,NDIM> >& vf) {\n            std::vector<implT*> v(vf.size(),NULL);\n            for (unsigned int i=0; i<v.size(); ++i) {\n                if (vf[i].is_initialized()) v[i] = vf[i].get_impl().get();\n            }\n            impl->multiop_values(op, v);\n            world().gop.fence();\n            if (VERIFY_TREE) verify_tree();\n\n            return *this;\n        }\n\n        /// apply op on the input vector yielding an output vector of functions\n\n        /// (*this) is just a dummy Function to be able to call internal methods in FuncImpl\n        /// @param[in]  op   the operator working on vin\n        /// @param[in]  vin  vector of input Functions\n        /// @param[out] vout vector of output Functions vout = op(vin)\n        template <typename opT>\n        void multi_to_multi_op_values(const opT& op,\n                const std::vector< Function<T,NDIM> >& vin,\n                std::vector< Function<T,NDIM> >& vout,\n                const bool fence=true) {\n            std::vector<implT*> vimplin(vin.size(),NULL);\n            for (unsigned int i=0; i<vin.size(); ++i) {\n                if (vin[i].is_initialized()) vimplin[i] = vin[i].get_impl().get();\n            }\n            std::vector<implT*> vimplout(vout.size(),NULL);\n            for (unsigned int i=0; i<vout.size(); ++i) {\n                if (vout[i].is_initialized()) vimplout[i] = vout[i].get_impl().get();\n            }\n\n            impl->multi_to_multi_op_values(op, vimplin, vimplout, fence);\n            if (VERIFY_TREE) verify_tree();\n\n        }\n\n\n        /// Multiplication of function * vector of functions using recursive algorithm of mulxx\n        template <typename L, typename R>\n        void vmulXX(const Function<L,NDIM>& left,\n                    const std::vector< Function<R,NDIM> >& right,\n                    std::vector< Function<T,NDIM> >& result,\n                    double tol,\n                    bool fence) {\n            PROFILE_MEMBER_FUNC(Function);\n\n            std::vector<FunctionImpl<T,NDIM>*> vresult(right.size());\n            std::vector<const FunctionImpl<R,NDIM>*> vright(right.size());\n            for (unsigned int i=0; i<right.size(); ++i) {\n                result[i].set_impl(left,false);\n                vresult[i] = result[i].impl.get();\n                vright[i] = right[i].get_impl().get();\n            }\n\n            left.world().gop.fence(); // Is this still essential?  Yes.\n            vresult[0]->mulXXvec(left.get_impl().get(), vright, vresult, tol, fence);\n        }\n\n        /// Same as \\c operator* but with optional fence and no automatic reconstruction\n\n        /// f or g are on-demand functions\n        template<typename L, typename R>\n        void mul_on_demand(const Function<L,NDIM>& f, const Function<R,NDIM>& g, bool fence=true) {\n            const FunctionImpl<L,NDIM>* fimpl=f.get_impl().get();\n            const FunctionImpl<R,NDIM>* gimpl=g.get_impl().get();\n            if (fimpl->is_on_demand() and gimpl->is_on_demand()) {\n                MADNESS_EXCEPTION(\"can't multiply two on-demand functions\",1);\n            }\n\n            if (fimpl->is_on_demand()) {\n                leaf_op<R,NDIM> leaf_op1(gimpl);\n                impl->multiply(leaf_op1,gimpl,fimpl,fence);\n            } else {\n                leaf_op<L,NDIM> leaf_op1(fimpl);\n                impl->multiply(leaf_op1,fimpl,gimpl,fence);\n            }\n        }\n\n        /// sparse transformation of a vector of functions ... private\n        template <typename R, typename Q>\n        void vtransform(const std::vector< Function<R,NDIM> >& v,\n                        const Tensor<Q>& c,\n                        std::vector< Function<T,NDIM> >& vresult,\n                        double tol,\n                        bool fence=true) {\n            PROFILE_MEMBER_FUNC(Function);\n            vresult[0].impl->vtransform(vimpl(v), c, vimpl(vresult), tol, fence);\n        }\n\n        /// This is replaced with alpha*left + beta*right ...  private\n        template <typename L, typename R>\n        Function<T,NDIM>& gaxpy_oop(T alpha, const Function<L,NDIM>& left,\n                                    T beta,  const Function<R,NDIM>& right, bool fence) {\n            PROFILE_MEMBER_FUNC(Function);\n            left.verify();\n            right.verify();\n            MADNESS_ASSERT(left.is_compressed() && right.is_compressed());\n            if (VERIFY_TREE) left.verify_tree();\n            if (VERIFY_TREE) right.verify_tree();\n            impl.reset(new implT(*left.get_impl(), left.get_pmap(), false));\n            impl->gaxpy(alpha,*left.get_impl(),beta,*right.get_impl(),fence);\n            return *this;\n        }\n\n        /// This is replaced with mapdim(f) ...  private\n        Function<T,NDIM>& mapdim(const Function<T,NDIM>& f, const std::vector<long>& map, bool fence) {\n            PROFILE_MEMBER_FUNC(Function);\n            f.verify();\n            if (VERIFY_TREE) f.verify_tree();\n            for (std::size_t i=0; i<NDIM; ++i) MADNESS_ASSERT(map[i]>=0 && static_cast<std::size_t>(map[i])<NDIM);\n            impl.reset(new implT(*f.impl, f.get_pmap(), false));\n            impl->mapdim(*f.impl,map,fence);\n            return *this;\n        }\n\n        /// This is replaced with mirror(f) ...  private\n\n        /// similar to mapdim, but maps from x to -x, y to -y, and so on\n        /// Example: mirror a 3d function on the xy plane: mirror={1,1,-1}\n        /// @param[in]\tmirror\tarray of -1 and 1, corresponding to mirror or not\n        Function<T,NDIM>& mirror(const Function<T,NDIM>& f, const std::vector<long>& mirrormap, bool fence) {\n            PROFILE_MEMBER_FUNC(Function);\n            f.verify();\n            if (VERIFY_TREE) f.verify_tree();\n            for (std::size_t i=0; i<NDIM; ++i) MADNESS_ASSERT((mirrormap[i]==1) or (mirrormap[i]==-1));\n            impl.reset(new implT(*f.impl, f.get_pmap(), false));\n            impl->mirror(*f.impl,mirrormap,fence);\n            return *this;\n        }\n\n        /// This is replaced with mirror(map(f)) ...  private\n\n        /// first map then mirror!\n        /// mirror is similar to mapdim, but maps from x to -x, y to -y, and so on\n        /// Example: mirror a 3d function on the xy plane: mirror={1,1,-1}\n        /// Example: c4 rotation of a 3d function around the z axis:\n        /// \tx->y, y->-x, z->z: map(1,0,2); mirror(-1,1,1)\n        /// @param[in]\tmap\t\tarray holding dimensions\n        /// @param[in]\tmirror\tarray of -1 and 1, corresponding to mirror or not\n        Function<T,NDIM>& map_and_mirror(const Function<T,NDIM>& f,\n        \t\tconst std::vector<long>& map, const std::vector<long>& mirror,\n\t\t\t\tbool fence) {\n            PROFILE_MEMBER_FUNC(Function);\n            f.verify();\n            if (VERIFY_TREE) f.verify_tree();\n            for (std::size_t i=0; i<mirror.size(); ++i) MADNESS_ASSERT((mirror[i]==1) or (mirror[i]==-1));\n            for (std::size_t i=0; i<map.size(); ++i) MADNESS_ASSERT(map[i]>=0 && static_cast<std::size_t>(map[i])<NDIM);\n\n            impl.reset(new implT(*f.impl, f.get_pmap(), false));\n            impl->map_and_mirror(*f.impl,map,mirror,fence);\n            return *this;\n        }\n\n\n        /// check symmetry of a function by computing the 2nd derivative\n        double check_symmetry() const {\n\n            change_tree_state(redundant);\n            if (VERIFY_TREE) verify_tree();\n            double local = impl->check_symmetry_local();\n            impl->world.gop.sum(local);\n            impl->world.gop.fence();\n            double asy=sqrt(local);\n            if (this->world().rank()==0) print(\"asymmetry wrt particle\",asy);\n            change_tree_state(reconstructed);\n            return asy;\n        }\n\n        /// reduce the rank of the coefficient tensors\n        Function<T,NDIM>& reduce_rank(const double thresh=0.0, const bool fence=true) {\n            verify();\n            double thresh1= (thresh==0.0) ? impl->get_tensor_args().thresh : thresh;\n            impl->reduce_rank(thresh1,fence);\n            return *this;\n        }\n\n        /// remove all nodes with level higher than n\n        Function<T,NDIM>& chop_at_level(const int n, const bool fence=true) {\n            verify();\n            change_tree_state(redundant);\n            impl->chop_at_level(n,true);\n            change_tree_state(reconstructed);\n            return *this;\n        }\n    };\n\n//    template <typename T, typename opT, std::size_t NDIM>\n    template <typename T, typename opT, std::size_t NDIM>\n    Function<T,NDIM> multiop_values(const opT& op, const std::vector< Function<T,NDIM> >& vf) {\n        Function<T,NDIM> r;\n        r.set_impl(vf[0], false);\n        r.multiop_values(op, vf);\n        return r;\n    }\n\n    /// Returns new function equal to alpha*f(x) with optional fence\n    template <typename Q, typename T, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(Q,T),NDIM>\n    mul(const Q alpha, const Function<T,NDIM>& f, bool fence=true) {\n        PROFILE_FUNC;\n        f.verify();\n        if (VERIFY_TREE) f.verify_tree();\n        Function<TENSOR_RESULT_TYPE(Q,T),NDIM> result;\n        result.set_impl(f, false);\n        result.get_impl()->scale_oop(alpha,*f.get_impl(),fence);\n        return result;\n    }\n\n\n    /// Returns new function equal to f(x)*alpha with optional fence\n    template <typename Q, typename T, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(Q,T),NDIM>\n    mul(const Function<T,NDIM>& f, const Q alpha, bool fence=true) {\n        PROFILE_FUNC;\n        return mul(alpha,f,fence);\n    }\n\n\n    /// Returns new function equal to f(x)*alpha\n\n    /// Using operator notation forces a global fence after each operation\n    template <typename Q, typename T, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(Q,T),NDIM>\n    operator*(const Function<T,NDIM>& f, const Q alpha) {\n        return mul(alpha, f, true);\n    }\n\n    /// Returns new function equal to alpha*f(x)\n\n    /// Using operator notation forces a global fence after each operation\n    template <typename Q, typename T, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(Q,T),NDIM>\n    operator*(const Q alpha, const Function<T,NDIM>& f) {\n        return mul(alpha, f, true);\n    }\n\n    /// Sparse multiplication --- left and right must be reconstructed and if tol!=0 have tree of norms already created\n    template <typename L, typename R,std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(L,R),NDIM>\n    mul_sparse(const Function<L,NDIM>& left, const Function<R,NDIM>& right, double tol, bool fence=true) {\n        PROFILE_FUNC;\n        left.verify();\n        right.verify();\n        MADNESS_ASSERT(left.is_reconstructed() and right.is_reconstructed());\n        if (VERIFY_TREE) left.verify_tree();\n        if (VERIFY_TREE) right.verify_tree();\n\n        Function<TENSOR_RESULT_TYPE(L,R),NDIM> result;\n        result.set_impl(left, false);\n        result.get_impl()->mulXX(left.get_impl().get(), right.get_impl().get(), tol, fence);\n        return result;\n    }\n\n    /// Same as \\c operator* but with optional fence and no automatic reconstruction\n    template <typename L, typename R,std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(L,R),NDIM>\n    mul(const Function<L,NDIM>& left, const Function<R,NDIM>& right, bool fence=true) {\n        return mul_sparse(left,right,0.0,fence);\n    }\n\n    /// Generate new function = op(left,right) where op acts on the function values\n    template <typename L, typename R, typename opT, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(L,R),NDIM>\n    binary_op(const Function<L,NDIM>& left, const Function<R,NDIM>& right, const opT& op, bool fence=true) {\n        PROFILE_FUNC;\n        if (!left.is_reconstructed()) left.reconstruct();\n        if (!right.is_reconstructed()) right.reconstruct();\n\n        Function<TENSOR_RESULT_TYPE(L,R),NDIM> result;\n        result.set_impl(left, false);\n        result.get_impl()->binaryXX(left.get_impl().get(), right.get_impl().get(), op, fence);\n        return result;\n    }\n\n    /// Out of place application of unary operation to function values with optional fence\n    template <typename Q, typename opT, std::size_t NDIM>\n    Function<typename opT::resultT, NDIM>\n    unary_op(const Function<Q,NDIM>& func, const opT& op, bool fence=true) {\n        if (!func.is_reconstructed()) func.reconstruct();\n        Function<typename opT::resultT, NDIM> result;\n        if (VERIFY_TREE) func.verify_tree();\n        result.set_impl(func, false);\n        result.get_impl()->unaryXXvalues(func.get_impl().get(), op, fence);\n        return result;\n    }\n\n\n    /// Out of place application of unary operation to scaling function coefficients with optional fence\n    template <typename Q, typename opT, std::size_t NDIM>\n    Function<typename opT::resultT, NDIM>\n    unary_op_coeffs(const Function<Q,NDIM>& func, const opT& op, bool fence=true) {\n        if (!func.is_reconstructed()) func.reconstruct();\n        Function<typename opT::resultT, NDIM> result;\n        return result.unary_op_coeffs(func,op,fence);\n    }\n\n    /// Use the vmra/mul(...) interface instead\n\n    /// This so that we don't have to have friend functions in a different header.\n    ///\n    /// If using sparsity (tol != 0) you must have created the tree of norms\n    /// already for both left and right.\n    template <typename L, typename R, std::size_t D>\n    std::vector< Function<TENSOR_RESULT_TYPE(L,R),D> >\n    vmulXX(const Function<L,D>& left, const std::vector< Function<R,D> >& vright, double tol, bool fence=true) {\n        if (vright.size() == 0) return std::vector< Function<TENSOR_RESULT_TYPE(L,R),D> >();\n        std::vector< Function<TENSOR_RESULT_TYPE(L,R),D> > vresult(vright.size());\n        vresult[0].vmulXX(left, vright, vresult, tol, fence);\n        return vresult;\n    }\n\n    /// Multiplies two functions with the new result being of type TensorResultType<L,R>\n\n    /// Using operator notation forces a global fence after each operation but also\n    /// enables us to automatically reconstruct the input functions as required.\n    template <typename L, typename R, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(L,R), NDIM>\n    operator*(const Function<L,NDIM>& left, const Function<R,NDIM>& right) {\n        if (!left.is_reconstructed())  left.reconstruct();\n        if (!right.is_reconstructed()) right.reconstruct();\n        MADNESS_ASSERT(not (left.is_on_demand() or right.is_on_demand()));\n        return mul(left,right,true);\n    }\n\n    /// Performs a Hartree/outer product on the two given low-dimensional function vectors\n\n    /// @return   result(x,y) = \\sum_i f_i(x) g_i(y)\n    template<typename T, std::size_t KDIM, std::size_t LDIM>\n    Function<T,KDIM+LDIM>\n    hartree_product(const std::vector<Function<T,KDIM>>& left, const std::vector<Function<T,LDIM>>& right) {\n\n        MADNESS_CHECK_THROW(left.size()==right.size(), \"hartree_product: left and right must have same size\");\n        if (left.size()==0) return Function<T,KDIM+LDIM>();\n\n        const double thresh=FunctionDefaults<KDIM+LDIM>::get_thresh();\n\n        FunctionFactory<T,KDIM+LDIM> factory=FunctionFactory<T,KDIM+LDIM>(left.front().world())\n                .k(left.front().k()).thresh(thresh);\n        Function<T,KDIM+LDIM> result=factory.empty();\n\n        // some prep work\n        change_tree_state(left,nonstandard_with_leaves);\n        change_tree_state(right,nonstandard_with_leaves);\n        std::vector<std::shared_ptr<FunctionImpl<T,KDIM>>> vleft=get_impl(left);\n        std::vector<std::shared_ptr<FunctionImpl<T,LDIM>>> vright=get_impl(right);\n\n        result.do_hartree_product(vleft,vright);\n\n        return result;\n\n    }\n\n    /// Performs a Hartree product on the two given low-dimensional functions\n    template<typename T, std::size_t KDIM, std::size_t LDIM>\n    Function<T,KDIM+LDIM>\n    hartree_product(const Function<T,KDIM>& left2, const Function<T,LDIM>& right2) {\n        typedef std::vector<Function<T,KDIM>> vector;\n        return hartree_product(vector({left2}),vector({right2}));\n    }\n\n    /// Performs a Hartree product on the two given low-dimensional functions\n    template<typename T, std::size_t KDIM, std::size_t LDIM, typename opT>\n    Function<T,KDIM+LDIM>\n    hartree_product(const Function<T,KDIM>& left2, const Function<T,LDIM>& right2,\n            const opT& op) {\n\n        // we need both sum and difference coeffs for error estimation\n    \tFunction<T,KDIM>& left = const_cast< Function<T,KDIM>& >(left2);\n    \tFunction<T,LDIM>& right = const_cast< Function<T,LDIM>& >(right2);\n\n    \tconst double thresh=FunctionDefaults<KDIM+LDIM>::get_thresh();\n\n    \tFunctionFactory<T,KDIM+LDIM> factory=FunctionFactory<T,KDIM+LDIM>(left.world())\n    \t\t\t.k(left.k()).thresh(thresh);\n        Function<T,KDIM+LDIM> result=factory.empty();\n\n    \tif (result.world().rank()==0) {\n            print(\"incomplete FunctionFactory in Function::hartree_product\");\n            print(\"thresh: \", thresh);\n        }\n        bool same=(left2.get_impl()==right2.get_impl());\n\n        // some prep work\n        left.make_nonstandard(true, true);\n        right.make_nonstandard(true, true);\n\n        std::vector<std::shared_ptr<FunctionImpl<T,KDIM>>> vleft;\n        std::vector<std::shared_ptr<FunctionImpl<T,LDIM>>> vright;\n        vleft.push_back(left.get_impl());\n        vright.push_back(right.get_impl());\n        result.do_hartree_product(vleft,right,&op);\n\n        left.standard(false);\n        if (not same) right.standard(false);\n        left2.world().gop.fence();\n\n        return result;\n    }\n\n    /// adds beta*right only left:  alpha*left + beta*right optional fence and no automatic compression\n\n    /// left and right might live in different worlds, the accumulation is non-blocking\n    template <typename L, typename R,std::size_t NDIM>\n    void\n    gaxpy(TENSOR_RESULT_TYPE(L,R) alpha, Function<L,NDIM>& left,\n              TENSOR_RESULT_TYPE(L,R) beta,  const Function<R,NDIM>& right, bool fence=true) {\n        PROFILE_FUNC;\n        Function<TENSOR_RESULT_TYPE(L,R),NDIM> result;\n        left.gaxpy(alpha, right, beta, fence);\n    }\n\n    /// Returns new function alpha*left + beta*right optional fence and no automatic compression\n    template <typename L, typename R,std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(L,R),NDIM>\n    gaxpy_oop(TENSOR_RESULT_TYPE(L,R) alpha, const Function<L,NDIM>& left,\n              TENSOR_RESULT_TYPE(L,R) beta,  const Function<R,NDIM>& right, bool fence=true) {\n        PROFILE_FUNC;\n        Function<TENSOR_RESULT_TYPE(L,R),NDIM> result;\n        return result.gaxpy_oop(alpha, left, beta, right, fence);\n    }\n\n    /// Same as \\c operator+ but with optional fence and no automatic compression\n    template <typename L, typename R,std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(L,R),NDIM>\n    add(const Function<L,NDIM>& left, const Function<R,NDIM>& right, bool fence=true) {\n        return gaxpy_oop(TENSOR_RESULT_TYPE(L,R)(1.0), left,\n                         TENSOR_RESULT_TYPE(L,R)(1.0), right, fence);\n    }\n\n\n    /// Returns new function alpha*left + beta*right optional fence, having both addends reconstructed\n    template<typename T, std::size_t NDIM>\n    Function<T,NDIM> gaxpy_oop_reconstructed(const double alpha, const Function<T,NDIM>& left,\n            const double beta, const Function<T,NDIM>& right, const bool fence=true) {\n        Function<T,NDIM> result;\n        result.set_impl(right,false);\n\n        MADNESS_ASSERT(left.is_reconstructed());\n        MADNESS_ASSERT(right.is_reconstructed());\n        result.get_impl()->gaxpy_oop_reconstructed(alpha,*left.get_impl(),beta,*right.get_impl(),fence);\n        return result;\n\n    }\n\n    /// Adds two functions with the new result being of type TensorResultType<L,R>\n\n    /// Using operator notation forces a global fence after each operation\n    template <typename L, typename R, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(L,R), NDIM>\n    operator+(const Function<L,NDIM>& left, const Function<R,NDIM>& right) {\n        if (VERIFY_TREE) left.verify_tree();\n        if (VERIFY_TREE) right.verify_tree();\n\n        // no compression for high-dimensional functions\n        if (NDIM==6) {\n            left.reconstruct();\n            right.reconstruct();\n            return gaxpy_oop_reconstructed(1.0,left,1.0,right,true);\n        } else {\n            if (!left.is_compressed())  left.compress();\n            if (!right.is_compressed()) right.compress();\n            return add(left,right,true);\n        }\n    }\n\n    /// Same as \\c operator- but with optional fence and no automatic compression\n    template <typename L, typename R,std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(L,R),NDIM>\n    sub(const Function<L,NDIM>& left, const Function<R,NDIM>& right, bool fence=true) {\n        return gaxpy_oop(TENSOR_RESULT_TYPE(L,R)(1.0), left,\n                         TENSOR_RESULT_TYPE(L,R)(-1.0), right, fence);\n    }\n\n\n    /// Subtracts two functions with the new result being of type TensorResultType<L,R>\n\n    /// Using operator notation forces a global fence after each operation\n    template <typename L, typename R, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(L,R), NDIM>\n    operator-(const Function<L,NDIM>& left, const Function<R,NDIM>& right) {\n        PROFILE_FUNC;\n        // no compression for high-dimensional functions\n        if (NDIM==6) {\n            left.reconstruct();\n            right.reconstruct();\n            return gaxpy_oop_reconstructed(1.0,left,-1.0,right,true);\n        } else {\n            if (!left.is_compressed())  left.compress();\n            if (!right.is_compressed()) right.compress();\n            return sub(left,right,true);\n        }\n    }\n\n    /// Create a new copy of the function with different distribution and optional fence\n\n    /// Works in either basis.  Different distributions imply\n    /// asynchronous communication and the optional fence is\n    /// collective.\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM> copy(const Function<T,NDIM>& f,\n                          const std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& pmap,\n                          bool fence = true) {\n        PROFILE_FUNC;\n        f.verify();\n        Function<T,NDIM> result;\n        typedef FunctionImpl<T,NDIM> implT;\n        result.set_impl(std::shared_ptr<implT>(new implT(*f.get_impl(), pmap, false)));\n        result.get_impl()->copy_coeffs(*f.get_impl(), fence);\n        if (VERIFY_TREE) result.verify_tree();\n        return result;\n    }\n\n    /// Create a new copy of the function with the same distribution and optional fence\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM> copy(const Function<T,NDIM>& f, bool fence = true) {\n        PROFILE_FUNC;\n        return copy(f, f.get_pmap(), fence);\n    }\n\n    /// Create a new copy of function f living in world (might differ from f.world)\n\n    /// uses the default processor map of world\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM> copy(World& world, const Function<T,NDIM>& f, bool fence = true) {\n        PROFILE_FUNC;\n        typedef FunctionImpl<T,NDIM> implT;\n        auto pmap = FunctionDefaults<NDIM>::get_pmap(world);\n\n        // create a new function with pmap distribution, same parameters as f, but no coeffs\n        Function<T,NDIM> result;\n        result.set_impl(std::make_shared<implT>(world,*f.get_impl(), pmap, false));\n        // copy f's coefficients to result\n        result.get_impl()->copy_coeffs(*f.get_impl(), fence);\n        return result;\n    }\n\n    /// Type conversion implies a deep copy.  No communication except for optional fence.\n\n    /// Works in either basis but any loss of precision may result in different errors\n    /// in applied in a different basis.\n    ///\n    /// The new function is formed with the options from the default constructor.\n    ///\n    /// There is no automatic type conversion since this is generally a rather dangerous\n    /// thing and because there would be no way to make the fence optional.\n    template <typename T, typename Q, std::size_t NDIM>\n    Function<Q,NDIM> convert(const Function<T,NDIM>& f, bool fence = true) {\n        PROFILE_FUNC;\n        f.verify();\n        Function<Q,NDIM> result;\n        result.set_impl(f, false);\n        result.get_impl()->copy_coeffs(*f.get_impl(), fence);\n        return result;\n    }\n\n\n    /// Return the complex conjugate of the input function with the same distribution and optional fence\n\n    /// !!! The fence is actually not optional in the current implementation !!!\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM> conj(const Function<T,NDIM>& f, bool fence = true) {\n        PROFILE_FUNC;\n        Function<T,NDIM> result = copy(f,true);\n        return result.conj(fence);\n    }\n\n    /// Apply operator on a hartree product of two low-dimensional functions\n\n    /// Supposed to be something like result= G( f(1)*f(2))\n    /// the hartree product is never constructed explicitly, but its coeffs are\n    /// constructed on the fly and processed immediately.\n    /// @param[in]\top\tthe operator\n    /// @param[in]\tf1\tfunction of particle 1\n    /// @param[in]\tf2\tfunction of particle 2\n    /// @param[in]\tfence if we shall fence\n    /// @return\t\ta function of dimension NDIM=LDIM+LDIM\n    template <typename opT, typename T, std::size_t LDIM>\n    Function<TENSOR_RESULT_TYPE(typename opT::opT,T), LDIM+LDIM>\n    apply(const opT& op, const std::vector<Function<T,LDIM>>& f1, const std::vector<Function<T,LDIM>>& f2, bool fence=true) {\n\n        World& world=f1.front().world();\n\n        typedef TENSOR_RESULT_TYPE(T,typename opT::opT) resultT;\n        typedef std::vector<Function<T,LDIM>> vecfuncL;\n\n    \tvecfuncL& ff1 = const_cast< vecfuncL& >(f1);\n    \tvecfuncL& ff2 = const_cast< vecfuncL& >(f2);\n\n    \tbool same=(ff1[0].get_impl()==ff2[0].get_impl());\n\n        reconstruct(world,f1,false);\n        reconstruct(world,f2,false);\n        world.gop.fence();\n        // keep the leaves! They are assumed to be there later\n        // even for modified op we need NS form for the hartree_leaf_op\n        for (auto& f : f1) f.make_nonstandard(true,false);\n        for (auto& f : f2) f.make_nonstandard(true,false);\n        world.gop.fence();\n\n\n        FunctionFactory<T,LDIM+LDIM> factory=FunctionFactory<resultT,LDIM+LDIM>(world)\n                .k(f1.front().k()).thresh(FunctionDefaults<LDIM+LDIM>::get_thresh());\n    \tFunction<resultT,LDIM+LDIM> result=factory.empty().fence();\n\n    \tresult.get_impl()->reset_timer();\n    \top.reset_timer();\n\n\t\t// will fence here\n        for (size_t i=0; i<f1.size(); ++i)\n            result.get_impl()->recursive_apply(op, f1[i].get_impl().get(),f2[i].get_impl().get(),false);\n        world.gop.fence();\n\n        if (op.print_timings) {\n            result.get_impl()->print_timer();\n            op.print_timer();\n        }\n\n\t\tresult.get_impl()->finalize_apply();\t// need fence before reconstruct\n\n        if (op.modified()) {\n            result.get_impl()->trickle_down(true);\n        } else {\n    \t\tresult.get_impl()->reconstruct(true);\n        }\n    \tstandard(world,ff1,false);\n    \tif (not same) standard(world,ff2,false);\n\n\t\treturn result;\n    }\n\n\n    /// Apply operator ONLY in non-standard form - required other steps missing !!\n    template <typename opT, typename R, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM>\n    apply_only(const opT& op, const Function<R,NDIM>& f, bool fence=true) {\n        Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> result;\n\n        constexpr std::size_t OPDIM=opT::opdim;\n        constexpr bool low_dim=(OPDIM*2==NDIM);     // apply on some dimensions only\n\n        // specialized version for 3D\n        if (NDIM <= 3 and (not low_dim)) {\n            result.set_impl(f, false);\n            result.get_impl()->apply(op, *f.get_impl(), fence);\n\n        } else {        // general version for higher dimension\n\t  //bool print_timings=false;\n            Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> r1;\n\n            result.set_impl(f, false);\n            r1.set_impl(f, false);\n\n            result.get_impl()->reset_timer();\n            op.reset_timer();\n\n            result.get_impl()->apply_source_driven(op, *f.get_impl(), fence);\n\n            // recursive_apply is about 20% faster than apply_source_driven\n            //result.get_impl()->recursive_apply(op, f.get_impl().get(),\n            //        r1.get_impl().get(),true);          // will fence here\n\n        }\n\n        return result;\n    }\n\n    /// Apply operator in non-standard form\n\n    /// Returns a new function with the same distribution\n    ///\n    /// !!! For the moment does NOT respect fence option ... always fences\n    /// if the operator acts on one particle only the result will be sorted as\n    /// g.particle=1:     g(f) = \\int g(x,x') f(x',y) dx' = result(x,y)\n    /// g.particle=2:     g(f) = \\int g(y,y') f(x,y') dy' = result(x,y)\n    /// for the second case it will notably *not* be as it is implemented in the partial inner product!\n    /// g.particle=2                          g(f) = result(x,y)\n    ///                 inner(g(y,y'),f(x,y'),1,1) = result(y,x)\n    /// also note the confusion with the counting of the particles/integration variables\n    template <typename opT, typename R, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM>\n    apply(const opT& op, const Function<R,NDIM>& f, bool fence=true) {\n\n    \ttypedef TENSOR_RESULT_TYPE(typename opT::opT,R) resultT;\n    \tFunction<R,NDIM>& ff = const_cast< Function<R,NDIM>& >(f);\n    \tFunction<resultT, NDIM> result;\n\n\t\tMADNESS_ASSERT(not f.is_on_demand());\n\t\tbool print_timings=op.print_timings;\n\n    \tif (VERIFY_TREE) ff.verify_tree();\n    \tff.reconstruct();\n        if (print_timings) ff.print_size(\"ff in apply after reconstruct\");\n\n    \tif (op.modified()) {\n\n            ff.change_tree_state(redundant);\n//    \t    ff.get_impl()->make_redundant(true);\n            result = apply_only(op, ff, fence);\n            ff.get_impl()->undo_redundant(false);\n            result.get_impl()->trickle_down(true);\n\n    \t} else {\n\n    \t\t// saves the standard() step, which is very expensive in 6D\n//    \t\tFunction<R,NDIM> fff=copy(ff);\n    \t\tFunction<R,NDIM> fff=(ff);\n            fff.make_nonstandard(op.doleaves, true);\n            if (print_timings) fff.print_size(\"ff in apply after make_nonstandard\");\n            if ((print_timings) and (f.world().rank()==0)) {\n                fff.get_impl()->timer_filter.print(\"filter\");\n                fff.get_impl()->timer_compress_svd.print(\"compress_svd\");\n            }\n            result = apply_only(op, fff, fence);\n            result.get_impl()->set_tree_state(nonstandard_after_apply);\n        \tff.world().gop.fence();\n            if (print_timings) result.print_size(\"result after apply_only\");\n\n        \t// svd-tensors need some post-processing\n        \tif (result.get_impl()->get_tensor_type()==TT_2D) {\n            \tdouble elapsed=result.get_impl()->finalize_apply();\n                if (print_timings) printf(\"time in finalize_apply        %8.2f\\n\",elapsed);\n\t\t\t}\n\t\t\tif (print_timings) {\n\t\t\t\tresult.get_impl()->print_timer();\n\t\t\t\top.print_timer();\n\t\t\t}\n\n            result.get_impl()->reconstruct(true);\n\n//            fff.clear();\n            if (op.destructive()) {\n            \tff.world().gop.fence();\n            \tff.clear();\n            } else {\n            \t// ff.standard();\n            \tff.reconstruct();\n            }\n\n    \t}\n        if (print_timings) result.print_size(\"result after reconstruction\");\n        return result;\n    }\n\n\n    template <typename opT, typename R, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM>\n    apply_1d_realspace_push(const opT& op, const Function<R,NDIM>& f, int axis, bool fence=true) {\n        PROFILE_FUNC;\n        Function<R,NDIM>& ff = const_cast< Function<R,NDIM>& >(f);\n        if (VERIFY_TREE) ff.verify_tree();\n        ff.reconstruct();\n\n        Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> result;\n\n        result.set_impl(ff, false);\n        result.get_impl()->apply_1d_realspace_push(op, ff.get_impl().get(), axis, fence);\n        result.get_impl()->set_tree_state(redundant_after_merge);\n        return result;\n    }\n\n\n    /// Generate a new function by reordering dimensions ... optional fence\n\n    /// You provide an array of dimension NDIM that maps old to new dimensions\n    /// according to\n    /// \\code\n    ///    newdim = mapdim[olddim]\n    /// \\endcode\n    /// Works in either scaling function or wavelet basis.\n    ///\n    /// Would be easy to modify this to also change the procmap here\n    /// if desired but presently it uses the same procmap as f.\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM>\n    mapdim(const Function<T,NDIM>& f, const std::vector<long>& map, bool fence=true) {\n        PROFILE_FUNC;\n        Function<T,NDIM> result;\n        return result.mapdim(f,map,fence);\n    }\n\n    /// Generate a new function by mirroring within the dimensions .. optional fence\n\n    /// similar to mapdim\n    /// @param[in]\tmirror\tarray with -1 and 1, corresponding to mirror this dimension or not\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM>\n    mirror(const Function<T,NDIM>& f, const std::vector<long>& mirrormap, bool fence=true) {\n        PROFILE_FUNC;\n        Function<T,NDIM> result;\n        return result.mirror(f,mirrormap,fence);\n    }\n\n    /// This is replaced with mirror(map(f)), optional fence\n\n    /// first map then mirror!\n    /// mirror is similar to mapdim, but maps from x to -x, y to -y, and so on\n    /// Example: mirror a 3d function on the xy plane: mirror={1,1,-1}\n    /// Example: c4 rotation of a 3d function around the z axis:\n    /// \tx->y, y->-x, z->z: map(1,0,2); mirror(-1,1,1)\n    /// @param[in]\tmap\t\tarray holding dimensions\n    /// @param[in]\tmirror\tarray of -1 and 1, corresponding to mirror or not\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM>\n    map_and_mirror(const Function<T,NDIM>& f, const std::vector<long>& map,\n    \t\tconst std::vector<long>& mirror, bool fence=true) {\n        PROFILE_FUNC;\n        Function<T,NDIM> result;\n        return result.map_and_mirror(f,map,mirror,fence);\n    }\n\n\n    /// swap particles 1 and 2\n\n    /// param[in]\tf\ta function of 2 particles f(1,2)\n    /// return\tthe input function with particles swapped g(1,2) = f(2,1)\n    template <typename T, std::size_t NDIM>\n    typename std::enable_if_t<NDIM%2==0, Function<T,NDIM>>\n    swap_particles(const Function<T,NDIM> & f){\n      // this could be done more efficiently for SVD, but it works decently\n      std::vector<long> map(NDIM);\n      constexpr std::size_t LDIM=NDIM/2;\n      static_assert(LDIM*2==NDIM);\n      for (std::size_t d=0; d<LDIM; ++d) {\n          map[d]=d+LDIM;\n          map[d+LDIM]=d;\n      }\n//      map[0]=3;\n//      map[1]=4;\n//      map[2]=5;     // 2 -> 1\n//      map[3]=0;\n//      map[4]=1;\n//      map[5]=2;     // 1 -> 2\n      return mapdim(f,map);\n    }\n\n    /// symmetrize a function\n\n    /// @param[in]  symmetry possibilities are:\n    ///                 (anti-) symmetric particle permutation (\"sy_particle\", \"antisy_particle\")\n    ///                 symmetric mirror plane (\"xy\", \"xz\", \"yz\")\n    /// @return     a new function symmetrized according to the input parameter\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM>\n    symmetrize(const Function<T,NDIM>& f, const std::string symmetry, bool fence=true) {\n        Function<T,NDIM> result;\n\n        MADNESS_ASSERT(NDIM==6);            // works only for pair functions\n        std::vector<long> map(NDIM);\n\n        // symmetric particle permutation\n        if (symmetry==\"sy_particle\") {\n            map[0]=3; map[1]=4; map[2]=5;\n            map[3]=0; map[4]=1; map[5]=2;\n        } else if (symmetry==\"cx\") {\n            map[0]=0; map[1]=2; map[2]=1;\n            map[3]=3; map[4]=5; map[5]=4;\n\n        } else if (symmetry==\"cy\") {\n            map[0]=2; map[1]=1; map[2]=0;\n            map[3]=5; map[4]=4; map[5]=3;\n\n        } else if (symmetry==\"cz\") {\n            map[0]=1; map[1]=0; map[2]=2;\n            map[3]=4; map[4]=3; map[5]=5;\n\n        } else {\n            if (f.world().rank()==0) {\n                print(\"unknown parameter in symmetrize:\",symmetry);\n            }\n            MADNESS_EXCEPTION(\"unknown parameter in symmetrize\",1);\n        }\n\n        result.mapdim(f,map,true);  // need to fence here\n        result.get_impl()->average(*f.get_impl());\n\n        return result;\n    }\n\n\n\n    /// multiply a high-dimensional function with a low-dimensional function\n\n    /// @param[in]  f   NDIM function of 2 particles: f=f(1,2)\n    /// @param[in]  g   LDIM function of 1 particle: g=g(1) or g=g(2)\n    /// @param[in]  particle    if g=g(1) or g=g(2)\n    /// @return     h(1,2) = f(1,2) * g(p)\n    template<typename T, std::size_t NDIM, std::size_t LDIM>\n    Function<T,NDIM> multiply(const Function<T,NDIM> f, const Function<T,LDIM> g, const int particle, const bool fence=true) {\n\n        static_assert(LDIM+LDIM==NDIM);\n        MADNESS_ASSERT(particle==1 or particle==2);\n\n        Function<T,NDIM> result;\n        result.set_impl(f, false);\n\n//        Function<T,NDIM>& ff = const_cast< Function<T,NDIM>& >(f);\n//        Function<T,LDIM>& gg = const_cast< Function<T,LDIM>& >(g);\n\n        f.change_tree_state(redundant,false);\n        g.change_tree_state(redundant);\n\t\tFunctionImpl<T,NDIM>* fimpl=f.get_impl().get();\n\t\tFunctionImpl<T,LDIM>* gimpl=g.get_impl().get();\n\n        result.get_impl()->multiply(fimpl,gimpl,particle);\n        result.world().gop.fence();\n\n        f.change_tree_state(reconstructed,false);\n        g.change_tree_state(reconstructed);\n        return result;\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM>\n    project(const Function<T,NDIM>& other,\n            int k=FunctionDefaults<NDIM>::get_k(),\n            double thresh=FunctionDefaults<NDIM>::get_thresh(),\n            bool fence=true)\n    {\n        PROFILE_FUNC;\n        Function<T,NDIM> result = FunctionFactory<T,NDIM>(other.world()).k(k).thresh(thresh).empty();\n        other.reconstruct();\n        result.get_impl()->project(*other.get_impl(),fence);\n        return result;\n    }\n\n\n    /// Computes the scalar/inner product between two functions\n\n    /// In Maple this would be \\c int(conjugate(f(x))*g(x),x=-infinity..infinity)\n    template <typename T, typename R, std::size_t NDIM>\n    TENSOR_RESULT_TYPE(T,R) inner(const Function<T,NDIM>& f, const Function<R,NDIM>& g) {\n        PROFILE_FUNC;\n        return f.inner(g);\n    }\n\n\n    /// Computes the partial scalar/inner product between two functions, returns a low-dim function\n\n    /// syntax similar to the inner product in tensor.h\n    /// e.g result=inner<3>(f,g),{0},{1}) : r(x,y) = int f(x1,x) g(y,x1) dx1\n    /// @param[in]  task    0: everything, 1; prepare only (fence), 2: work only (no fence), 3: finalize only (fence)\n    template<std::size_t NDIM, typename T, std::size_t LDIM, typename R, std::size_t KDIM,\n            std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>\n    std::vector<Function<TENSOR_RESULT_TYPE(T, R), NDIM>>\n    innerXX(const Function<T, LDIM>& f, const std::vector<Function<R, KDIM>>& vg, const std::array<int, CDIM> v1,\n           const std::array<int, CDIM> v2, int task=0) {\n        bool prepare = ((task==0) or (task==1));\n        bool work = ((task==0) or (task==2));\n        bool finish = ((task==0) or (task==3));\n\n        static_assert((KDIM + LDIM - NDIM) % 2 == 0, \"faulty dimensions in inner (partial version)\");\n        static_assert(KDIM + LDIM - 2 * CDIM == NDIM, \"faulty dimensions in inner (partial version)\");\n\n        // contraction indices must be contiguous and either in the beginning or at the end\n        for (size_t i=0; i<CDIM-1; ++i) MADNESS_CHECK((v1[i]+1)==v1[i+1]);\n        MADNESS_CHECK((v1[0]==0) or (v1[CDIM-1]==LDIM-1));\n\n        for (size_t i=0; i<CDIM-1; ++i) MADNESS_CHECK((v2[i]+1)==v2[i+1]);\n        MADNESS_CHECK((v2[0]==0) or (v2[CDIM-1]==KDIM-1));\n\n        MADNESS_CHECK(f.is_initialized());\n        MADNESS_CHECK(vg[0].is_initialized());\n        MADNESS_CHECK(f.world().id() == vg[0].world().id());\n        // this needs to be run in a single world, so that all coefficients are local.\n        // Use macrotasks if run on multiple processes.\n        World& world=f.world();\n        MADNESS_CHECK(world.size() == 1);\n\n        if (prepare) {\n            f.change_tree_state(nonstandard);\n            change_tree_state(vg,nonstandard);\n            world.gop.fence();\n            f.get_impl()->compute_snorm_and_dnorm(false);\n            for (auto& g : vg) g.get_impl()->compute_snorm_and_dnorm(false);\n            world.gop.fence();\n        }\n\n        typedef TENSOR_RESULT_TYPE(T, R) resultT;\n        std::vector<Function<resultT,NDIM>> result(vg.size());\n        if (work) {\n            world.gop.set_forbid_fence(true);\n            for (size_t i=0; i<vg.size(); ++i)  {\n                result[i]=FunctionFactory<resultT,NDIM>(world)\n                        .k(f.k()).thresh(f.thresh()).empty().nofence();\n                result[i].get_impl()->partial_inner(*f.get_impl(),*(vg[i]).get_impl(),v1,v2);\n                result[i].get_impl()->set_tree_state(nonstandard_after_apply);\n            }\n            world.gop.set_forbid_fence(false);\n        }\n\n        if (finish) {\n\n            world.gop.fence();\n//            result.get_impl()->reconstruct(true);\n\n            change_tree_state(result,reconstructed);\n//            result.reconstruct();\n            // restore initial state of g and h\n            auto erase_list = [] (const auto& funcimpl) {\n                typedef typename std::decay_t<decltype(funcimpl)>::keyT keyTT;\n                std::list<keyTT> to_be_erased;\n                for (auto it=funcimpl.get_coeffs().begin(); it!=funcimpl.get_coeffs().end(); ++it) {\n                    const auto& key=it->first;\n                    const auto& node=it->second;\n                    if (not node.has_children()) to_be_erased.push_back(key);\n                }\n                return to_be_erased;\n            };\n\n            FunctionImpl<T,LDIM>& f_nc=const_cast<FunctionImpl<T,LDIM>&>(*f.get_impl());\n            for (auto& key : erase_list(f_nc)) f_nc.get_coeffs().erase(key);\n            for (auto& g : vg) {\n                FunctionImpl<R,KDIM>& g_nc=const_cast<FunctionImpl<R,KDIM>&>(*g.get_impl());\n                for (auto& key : erase_list(g_nc)) g_nc.get_coeffs().erase(key);\n            }\n            world.gop.fence();\n            change_tree_state(vg,reconstructed);\n            f_nc.reconstruct(false);\n            world.gop.fence();\n\n        }\n\n        return result;\n    }\n\n\n    /// Computes the partial scalar/inner product between two functions, returns a low-dim function\n\n    /// syntax similar to the inner product in tensor.h\n    /// e.g result=inner<3>(f,g),{0},{1}) : r(x,y) = int f(x1,x) g(y,x1) dx1\n    /// @param[in]  task    0: everything, 1; prepare only (fence), 2: work only (no fence), 3: finalize only (fence)\n    template<std::size_t NDIM, typename T, std::size_t LDIM, typename R, std::size_t KDIM,\n            std::size_t CDIM = (KDIM + LDIM - NDIM) / 2>\n    Function<TENSOR_RESULT_TYPE(T, R), NDIM>\n    innerXX(const Function<T, LDIM>& f, const Function<R, KDIM>& g, const std::array<int, CDIM> v1,\n            const std::array<int, CDIM> v2, int task=0) {\n        return innerXX<NDIM,T,LDIM,R,KDIM>(f,std::vector<Function<R,KDIM>>({g}),v1,v2,task)[0];\n    }\n\n    /// Computes the partial scalar/inner product between two functions, returns a low-dim function\n\n    /// syntax similar to the inner product in tensor.h\n    /// e.g result=inner<3>(f,g),{0},{1}) : r(x,y) = int f(x1,x) g(y,x1) dx1\n    template <typename T, std::size_t LDIM, typename R, std::size_t KDIM>\n    Function<TENSOR_RESULT_TYPE(T,R),KDIM+LDIM-2>\n    inner(const Function<T,LDIM>& f, const Function<R,KDIM>& g, const std::tuple<int> v1, const std::tuple<int> v2) {\n        return innerXX<KDIM+LDIM-2>(f,g,\n                     std::array<int,1>({std::get<0>(v1)}),\n                     std::array<int,1>({std::get<0>(v2)}));\n    }\n\n    /// Computes the partial scalar/inner product between two functions, returns a low-dim function\n\n    /// syntax similar to the inner product in tensor.h\n    /// e.g result=inner<3>(f,g),{0,1},{1,2}) : r(y) = int f(x1,x2) g(y,x1,x2) dx1 dx2\n    template <typename T, std::size_t LDIM, typename R, std::size_t KDIM>\n    Function<TENSOR_RESULT_TYPE(T,R),KDIM+LDIM-4>\n    inner(const Function<T,LDIM>& f, const Function<R,KDIM>& g, const std::tuple<int,int> v1, const std::tuple<int,int> v2) {\n        return innerXX<KDIM+LDIM-4>(f,g,\n                                  std::array<int,2>({std::get<0>(v1),std::get<1>(v1)}),\n                                  std::array<int,2>({std::get<0>(v2),std::get<1>(v2)}));\n    }\n\n    /// Computes the partial scalar/inner product between two functions, returns a low-dim function\n\n    /// syntax similar to the inner product in tensor.h\n    /// e.g result=inner<3>(f,g),{1},{2}) : r(x,y,z) = int f(x,x1) g(y,z,x1) dx1\n    template <typename T, std::size_t LDIM, typename R, std::size_t KDIM>\n    Function<TENSOR_RESULT_TYPE(T,R),KDIM+LDIM-6>\n    inner(const Function<T,LDIM>& f, const Function<R,KDIM>& g, const std::tuple<int,int,int> v1, const std::tuple<int,int,int> v2) {\n        return innerXX<KDIM+LDIM-6>(f,g,\n                                  std::array<int,3>({std::get<0>(v1),std::get<1>(v1),std::get<2>(v1)}),\n                                  std::array<int,3>({std::get<0>(v2),std::get<1>(v2),std::get<2>(v2)}));\n    }\n\n\n\n    /// Computes the scalar/inner product between an MRA function and an external functor\n\n    /// Currently this defaults to inner_adaptive, which might be more expensive\n    /// than inner_ext since it loops over all leaf nodes. If you feel inner_ext\n    /// is more efficient you need to call it directly\n    /// @param[in]  f   MRA function\n    /// @param[in]  g   functor\n    /// @result     inner(f,g)\n    template <typename T, typename opT, std::size_t NDIM>\n    TENSOR_RESULT_TYPE(T,typename opT::value_type) inner(const Function<T,NDIM>& f, const opT& g) {\n        PROFILE_FUNC;\n        std::shared_ptr< FunctionFunctorInterface<double,3> > func(new opT(g));\n        return f.inner_adaptive(func);\n    }\n\n    /// Computes the scalar/inner product between an MRA function and an external functor\n\n    /// Currently this defaults to inner_adaptive, which might be more expensive\n    /// than inner_ext since it loops over all leaf nodes. If you feel inner_ext\n    /// is more efficient you need to call it directly\n    /// @param[in]  g   functor\n    /// @param[in]  f   MRA function\n    /// @result     inner(f,g)\n    template <typename T, typename opT, std::size_t NDIM>\n    TENSOR_RESULT_TYPE(T,typename opT::value_type) inner(const opT& g, const Function<T,NDIM>& f) {\n        return inner(f,g);\n    }\n\n    template <typename T, typename R, std::size_t NDIM>\n    typename IsSupported<TensorTypeData<R>, Function<TENSOR_RESULT_TYPE(T,R),NDIM> >::type\n    operator+(const Function<T,NDIM>& f, R r) {\n        return (f*R(1.0)).add_scalar(r);\n    }\n\n    template <typename T, typename R, std::size_t NDIM>\n    typename IsSupported<TensorTypeData<R>, Function<TENSOR_RESULT_TYPE(T,R),NDIM> >::type\n    operator+(R r, const Function<T,NDIM>& f) {\n        return (f*R(1.0)).add_scalar(r);\n    }\n\n    template <typename T, typename R, std::size_t NDIM>\n    typename IsSupported<TensorTypeData<R>, Function<TENSOR_RESULT_TYPE(T,R),NDIM> >::type\n    operator-(const Function<T,NDIM>& f, R r) {\n        return (f*R(1.0)).add_scalar(-r);\n    }\n\n    template <typename T, typename R, std::size_t NDIM>\n    typename IsSupported<TensorTypeData<R>, Function<TENSOR_RESULT_TYPE(T,R),NDIM> >::type\n    operator-(R r, const Function<T,NDIM>& f) {\n        return (f*R(-1.0)).add_scalar(r);\n    }\n\n    namespace detail {\n        template <std::size_t NDIM>\n        struct realop {\n            typedef double resultT;\n            Tensor<double> operator()(const Key<NDIM>& key, const Tensor<double_complex>& t) const {\n                return real(t);\n            }\n\n            template <typename Archive> void serialize (Archive& ar) {}\n        };\n\n        template <std::size_t NDIM>\n        struct imagop {\n            typedef double resultT;\n            Tensor<double> operator()(const Key<NDIM>& key, const Tensor<double_complex>& t) const {\n                return imag(t);\n            }\n\n            template <typename Archive> void serialize (Archive& ar) {}\n        };\n\n        template <std::size_t NDIM>\n        struct abssqop {\n            typedef double resultT;\n            Tensor<double> operator()(const Key<NDIM>& key, const Tensor<double_complex>& t) const {\n                Tensor<double> r = abs(t);\n                return r.emul(r);\n            }\n\n            template <typename Archive> void serialize (Archive& ar) {}\n        };\n\n        template <std::size_t NDIM>\n        struct absop {\n            typedef double resultT;\n            Tensor<double> operator()(const Key<NDIM>& key, const Tensor<double_complex>& t) const {\n                Tensor<double> r = abs(t);\n                return r;\n            }\n\n            template <typename Archive> void serialize (Archive& ar) {}\n        };\n\n    }\n\n    /// Returns a new function that is the real part of the input\n    template <std::size_t NDIM>\n    Function<double,NDIM> real(const Function<double_complex,NDIM>& z, bool fence=true) {\n        return unary_op_coeffs(z, detail::realop<NDIM>(), fence);\n    }\n\n    /// Returns a new function that is the real part of the input\n    template <std::size_t NDIM>\n    Function<double,NDIM> real(const Function<double,NDIM>& z, bool fence=true) {\n    \treturn copy(z);\n    }\n\n    /// Returns a new function that is the imaginary part of the input\n    template <std::size_t NDIM>\n    Function<double,NDIM> imag(const Function<double_complex,NDIM>& z, bool fence=true) {\n        return unary_op_coeffs(z, detail::imagop<NDIM>(), fence);\n    }\n\n\n    /// Create a new function that is the square of f - global comm only if not reconstructed\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM> square(const Function<T,NDIM>& f, bool fence=true) {\n        PROFILE_FUNC;\n        Function<T,NDIM> result = copy(f,true);  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n        return result.square(true); //fence);  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n    }\n\n    /// Create a new function that is the abs of f - global comm only if not reconstructed\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM> abs(const Function<T,NDIM>& f, bool fence=true) {\n        PROFILE_FUNC;\n        Function<T,NDIM> result = copy(f,true);  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n        return result.abs(true); //fence);  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n    }\n\n    /// Create a new function that is the abs_square of f - global comm only if not reconstructed\n    template <typename T, std::size_t NDIM>\n    typename std::enable_if<!TensorTypeData<T>::iscomplex, Function<T,NDIM> >::type\n    abs_square(const Function<T,NDIM>& f, bool fence=true) {\n        PROFILE_FUNC;\n        Function<T,NDIM> result = copy(f,true);  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n        return result.abs_square(true); //fence);  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n    }\n\n    /// Create a new function that is the abs_square of f - global comm only if not reconstructed\n    template <typename T, std::size_t NDIM>\n    typename std::enable_if<TensorTypeData<T>::iscomplex, Function<typename Tensor<T>::scalar_type,NDIM> >::type\n   \tabs_square(const Function<T,NDIM>& f, bool fence=true) {\n        return unary_op(f, detail::abssqop<NDIM>(), fence);\n    }\n\n    /// Returns a new function that is the square of the absolute value of the input\n    template <std::size_t NDIM>\n    Function<double,NDIM> abssq(const Function<double_complex,NDIM>& z, bool fence=true) {\n        return unary_op(z, detail::abssqop<NDIM>(), fence);\n    }\n\n    /// Returns a new function that is the absolute value of the input\n    template <std::size_t NDIM>\n    Function<double,NDIM> abs(const Function<double_complex,NDIM>& z, bool fence=true) {\n        return unary_op(z, detail::absop<NDIM>(), fence);\n    }\n\n    /// get tree state of a function\n\n    /// there is a corresponding function in vmra.h\n    /// @param[in]  f   function\n    /// @return TreeState::unknown if the function is not initialized\n    template <typename T, std::size_t NDIM>\n    TreeState get_tree_state(const Function<T,NDIM>& f) {\n        if (f.is_initialized()) return f.get_impl()->get_tree_state();\n        return TreeState::unknown;\n    }\n\n    /// change tree state of a function\n\n    /// there is a corresponding function in vmra.h\n    /// return this for chaining\n    /// @param[in]  f   function\n    /// @param[in]  finalstate  the new state\n    /// @return this in the requested state\n    template <typename T, std::size_t NDIM>\n    const Function<T,NDIM>& change_tree_state(const Function<T,NDIM>& f,\n            const TreeState finalstate, bool fence=true) {\n        return f.change_tree_state(finalstate,fence);\n    }\n\n    template <typename R, std::size_t MDIM>\n    void swap(Function<R,MDIM>& f1, Function<R,MDIM>& f2) {\n        f1.impl.swap(f2.impl);\n    }\n\n}\n\n#include <madness/mra/funcplot.h>\n\nnamespace madness {\n    namespace archive {\n        template <class archiveT, class T, std::size_t NDIM>\n        struct ArchiveLoadImpl< ParallelInputArchive<archiveT>, Function<T,NDIM> > {\n            static inline void load(const ParallelInputArchive<archiveT>& ar, Function<T,NDIM>& f) {\n                f.load(*ar.get_world(), ar);\n            }\n        };\n\n        template <class archiveT, class T, std::size_t NDIM>\n        struct ArchiveStoreImpl< ParallelOutputArchive<archiveT>, Function<T,NDIM> > {\n            static inline void store(const ParallelOutputArchive<archiveT>& ar, const Function<T,NDIM>& f) {\n                f.store(ar);\n            }\n        };\n    }\n\n    template <class T, std::size_t NDIM>\n    void save(const Function<T,NDIM>& f, const std::string name) {\n        archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar2(f.world(), name.c_str(), 1);\n        ar2 & f;\n    }\n\n    template <class T, std::size_t NDIM>\n    void load(Function<T,NDIM>& f, const std::string name) {\n        archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar2(f.world(), name.c_str(), 1);\n        ar2 & f;\n    }\n\n}\n\nnamespace madness {\n    // type traits to check if a template parameter is a Function\n    template<typename>\n    struct is_madness_function : std::false_type {};\n\n    template<typename T, std::size_t NDIM>\n    struct is_madness_function<madness::Function<T, NDIM>> : std::true_type {};\n\n}\n\n\n/* @} */\n\n#include <madness/mra/derivative.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/functypedefs.h>\n#include <madness/mra/vmra.h>\n// #include <madness/mra/mraimpl.h> !!!!!!!!!!!!! NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  !!!!!!!!!!!!!!!!!!\n\n#endif // MADNESS_MRA_MRA_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/mra1.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/mra/mra.h>\n#define MPRAIMPLX\n#include <madness/mra/mraimpl.h>\n#include <madness/world/world_object.h>\n#include <madness/world/worldmutex.h>\n#include <madness/world/worlddc.h>\n#include <madness/mra/macrotaskq.h>\n#include <list>\n\nnamespace madness {\n\n    template <>\n    ConcurrentHashMap< hashT, std::shared_ptr< GaussianConvolution1D<double> > >\n    GaussianConvolution1DCache<double>::map = {};\n\n    template <>\n    ConcurrentHashMap< hashT, std::shared_ptr< GaussianConvolution1D<double_complex> > >\n    GaussianConvolution1DCache<double_complex>::map = {};\n\n#ifdef FUNCTION_INSTANTIATE_1\n\n    template void fcube<double,1>(const Key<1>&, const FunctionFunctorInterface<double,1>&, const Tensor<double>&, Tensor<double>&);\n    template Tensor<double> fcube<double, 1>(Key<1> const&, double (*)(Vector<double, 1> const&), Tensor<double> const&);\n    template void fcube<std::complex<double>,1>(const Key<1>&, const FunctionFunctorInterface<std::complex<double>,1>&, const Tensor<double>&, Tensor<std::complex<double> >&);\n    template Tensor<std::complex<double> > fcube<std::complex<double>, 1>(Key<1> const&, std::complex<double> (*)(Vector<double, 1> const&), Tensor<double> const&);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<FunctionImpl<double,1> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<double,1> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::FunctionImpl<std::complex<double>, 1> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<std::complex<double>, 1> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<1>, FunctionNode<double, 1>, Hash<Key<1> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<1>, FunctionNode<double, 1>, Hash<Key<1> > > >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<1>, FunctionNode<std::complex<double>, 1>, Hash<Key<1> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<1>, FunctionNode<std::complex<double>, 1>, Hash<Key<1> > > >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<double,1> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<double,1> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<std::complex<double>,1> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<std::complex<double>,1> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<SeparatedConvolution<double,1> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<SeparatedConvolution<double,1> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<SeparatedConvolution<std::complex<double>,1> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<SeparatedConvolution<std::complex<double>,1> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<1>, LBNodeDeux<1>, Hash<Key<1> > > >::pending = std::list<detail::PendingMsg>();\n    template <>  Spinlock WorldObject<WorldContainerImpl<Key<1>, LBNodeDeux<1>, Hash<Key<1> > > >::pending_mutex(0);\n\n    template void plotdx<double,1>(const Function<double,1>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,1>(const Function<double_complex,1>&, const char*, const Tensor<double>&,\n                                           const std::vector<long>&, bool binary);\n\n    // These implicit instantiations must be below the explicit ones above in order not to offend LLVM\n    template class WorldObject<FunctionImpl<double,1> >;\n    template class WorldObject<FunctionImpl<std::complex<double>,1> >;\n    template class FunctionDefaults<1>;\n    template class Function<double, 1>;\n    template class Function<std::complex<double>, 1>;\n    template class FunctionImpl<double, 1>;\n    template class FunctionImpl<std::complex<double>, 1>;\n    template class FunctionCommonData<double, 1>;\n    template class FunctionCommonData<double_complex, 1>;\n    template class Displacements<1>;\n    template class DerivativeBase<double,1>;\n    template class DerivativeBase<double_complex,1>;\n#endif\n\n}\n\n/// Quietly used as a global lock when looking for bugs with multiple threads\nmadness::Mutex THELOCK;\n\n"
  },
  {
    "path": "src/madness/mra/mra2.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/mra/mra.h>\n#define MPRAIMPLX\n#include <madness/mra/mraimpl.h>\n#include <madness/world/world_object.h>\n#include <madness/world/worldmutex.h>\n#include <list>\n\n#ifdef FUNCTION_INSTANTIATE_2\nnamespace madness {\n\n    template void plotdx<double,2>(const Function<double,2>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,2>(const Function<double_complex,2>&, const char*, const Tensor<double>&,\n                                           const std::vector<long>&, bool binary);\n\n    template void fcube<double,2>(const Key<2>&, const FunctionFunctorInterface<double,2>&, const Tensor<double>&, Tensor<double>&);\n    template Tensor<double> fcube<double, 2>(Key<2> const&, double (*)(Vector<double, 2> const&), Tensor<double> const&);\n    template void fcube<std::complex<double>,2>(const Key<2>&, const FunctionFunctorInterface<std::complex<double>,2>&, const Tensor<double>&, Tensor<std::complex<double> >&);\n    template Tensor<std::complex<double> > fcube<std::complex<double>, 2>(Key<2> const&, std::complex<double> (*)(Vector<double, 2> const&), Tensor<double> const&);\n \n    template <> volatile std::list<detail::PendingMsg> WorldObject<FunctionImpl<double,2> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<double,2> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::FunctionImpl<std::complex<double>, 2> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<std::complex<double>, 2> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<2>, FunctionNode<double, 2>, Hash<Key<2> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<2>, FunctionNode<double, 2>, Hash<Key<2> > > >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<2>, FunctionNode<std::complex<double>, 2>, Hash<Key<2> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<2>, FunctionNode<std::complex<double>, 2>, Hash<Key<2> > > >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<double,2> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<double,2> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<std::complex<double>,2> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<std::complex<double>,2> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::SeparatedConvolution<double,2> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock madness::WorldObject<madness::SeparatedConvolution<double,2> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::SeparatedConvolution<std::complex<double>,2> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock madness::WorldObject<madness::SeparatedConvolution<std::complex<double>,2> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<2>, LBNodeDeux<2>, Hash<Key<2> > > >::pending = std::list<detail::PendingMsg>();\n    template <>  Spinlock WorldObject<WorldContainerImpl<Key<2>, LBNodeDeux<2>, Hash<Key<2> > > >::pending_mutex(0);\n\n    // These implicit instantiations must be below the explicit ones above in order not to offend LLVM\n    template class FunctionDefaults<2>;\n    template class Function<double, 2>;\n    template class Function<std::complex<double>, 2>;\n    template class FunctionImpl<double, 2>;\n    template class FunctionImpl<std::complex<double>, 2>;\n    template class FunctionCommonData<double, 2>;\n    template class FunctionCommonData<double_complex, 2>;\n    template class Displacements<2>;\n    template class DerivativeBase<double,2>;\n    template class DerivativeBase<double_complex,2>;\n\n}\n#endif\n"
  },
  {
    "path": "src/madness/mra/mra3.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/mra/mra.h>\n#define MPRAIMPLX\n#include <madness/mra/mraimpl.h>\n#include <madness/world/world_object.h>\n#include <madness/world/worldmutex.h>\n#include <list>\n\n#ifdef FUNCTION_INSTANTIATE_3\n\nnamespace madness {\n\n    template void plotdx<double,3>(const Function<double,3>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,3>(const Function<double_complex,3>&, const char*, const Tensor<double>&,\n                                           const std::vector<long>&, bool binary);\n\n    template void fcube<double,3>(const Key<3>&, const FunctionFunctorInterface<double,3>&, const Tensor<double>&, Tensor<double>&);\n    template Tensor<double> fcube<double, 3>(Key<3> const&, double (*)(Vector<double, 3> const&), Tensor<double> const&);\n    template void fcube<std::complex<double>,3>(const Key<3>&, const FunctionFunctorInterface<std::complex<double>,3>&, const Tensor<double>&, Tensor<std::complex<double> >&);\n    template Tensor<std::complex<double> > fcube<std::complex<double>, 3>(Key<3> const&, std::complex<double> (*)(Vector<double, 3> const&), Tensor<double> const&);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<FunctionImpl<double,3> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<double,3> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::FunctionImpl<std::complex<double>, 3> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<std::complex<double>, 3> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<3>, FunctionNode<double, 3>, Hash<Key<3> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<3>, FunctionNode<double, 3>, Hash<Key<3> > > >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<3>, FunctionNode<std::complex<double>, 3>, Hash<Key<3> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<3>, FunctionNode<std::complex<double>, 3>, Hash<Key<3> > > >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<double,3> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<double,3> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<std::complex<double>,3> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<std::complex<double>,3> >::pending_mutex(0);\n\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::SeparatedConvolution<double,3> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock madness::WorldObject<madness::SeparatedConvolution<double,3> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::SeparatedConvolution<std::complex<double>,3> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock madness::WorldObject<madness::SeparatedConvolution<std::complex<double>,3> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<3>, LBNodeDeux<3>, Hash<Key<3> > > >::pending = std::list<detail::PendingMsg>();\n    template <>  Spinlock WorldObject<WorldContainerImpl<Key<3>, LBNodeDeux<3>, Hash<Key<3> > > >::pending_mutex(0);\n\n    // These implicit instantiations must be below the explicit ones above in order not to offend LLVM\n    template class FunctionDefaults<3>;\n    template class Function<double, 3>;\n    template class Function<std::complex<double>, 3>;\n    template class FunctionImpl<double, 3>;\n    template class FunctionImpl<std::complex<double>, 3>;\n    template class FunctionCommonData<double, 3>;\n    template class FunctionCommonData<double_complex, 3>;\n    template class Displacements<3>;\n    template class DerivativeBase<double,3>;\n    template class DerivativeBase<double_complex,3>;\n\n}\n\n#endif\n\n"
  },
  {
    "path": "src/madness/mra/mra4.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/mra/mra.h>\n#define MPRAIMPLX\n#include <madness/mra/mraimpl.h>\n#include <madness/world/world_object.h>\n#include <madness/world/worldmutex.h>\n#include <list>\n\n\n#ifdef FUNCTION_INSTANTIATE_4\n\nnamespace madness {\n\n    template void plotdx<double,4>(const Function<double,4>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,4>(const Function<double_complex,4>&, const char*, const Tensor<double>&,\n                                           const std::vector<long>&, bool binary);\n\n    template void fcube<double,4>(const Key<4>&, const FunctionFunctorInterface<double,4>&, const Tensor<double>&, Tensor<double>&);\n    template Tensor<double> fcube<double, 4>(Key<4> const&, double (*)(Vector<double, 4> const&), Tensor<double> const&);\n    template void fcube<std::complex<double>,4>(const Key<4>&, const FunctionFunctorInterface<std::complex<double>,4>&, const Tensor<double>&, Tensor<std::complex<double> >&);\n    template Tensor<std::complex<double> > fcube<std::complex<double>, 4>(Key<4> const&, std::complex<double> (*)(Vector<double, 4> const&), Tensor<double> const&);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<FunctionImpl<double,4> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<double,4> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::FunctionImpl<std::complex<double>, 4> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<std::complex<double>, 4> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<4>, FunctionNode<double, 4>, Hash<Key<4> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<4>, FunctionNode<double, 4>, Hash<Key<4> > > >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<4>, FunctionNode<std::complex<double>, 4>, Hash<Key<4> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<4>, FunctionNode<std::complex<double>, 4>, Hash<Key<4> > > >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<double,4> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<double,4> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<std::complex<double>,4> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<std::complex<double>,4> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::SeparatedConvolution<double,4> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock madness::WorldObject<madness::SeparatedConvolution<double,4> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::SeparatedConvolution<std::complex<double>,4> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock madness::WorldObject<madness::SeparatedConvolution<std::complex<double>,4> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<4>, LBNodeDeux<4>, Hash<Key<4> > > >::pending = std::list<detail::PendingMsg>();\n    template <>  Spinlock WorldObject<WorldContainerImpl<Key<4>, LBNodeDeux<4>, Hash<Key<4> > > >::pending_mutex(0);\n\n    // These implicit instantiations must be below the explicit ones above in order not to offend LLVM\n    template class FunctionDefaults<4>;\n    template class Function<double, 4>;\n    template class Function<std::complex<double>, 4>;\n    template class FunctionImpl<double, 4>;\n    template class FunctionImpl<std::complex<double>, 4>;\n    template class FunctionCommonData<double, 4>;\n    template class FunctionCommonData<double_complex, 4>;\n    template class Displacements<4>;\n    template class DerivativeBase<double,4>;\n    template class DerivativeBase<double_complex,4>;\n\n}\n#endif\n\n"
  },
  {
    "path": "src/madness/mra/mra5.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/mra/mra.h>\n#define MPRAIMPLX\n#include <madness/mra/mraimpl.h>\n#include <madness/world/world_object.h>\n#include <madness/world/worldmutex.h>\n#include <list>\n\n#ifdef FUNCTION_INSTANTIATE_5\nnamespace madness {\n\n    template void plotdx<double,5>(const Function<double,5>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,5>(const Function<double_complex,5>&, const char*, const Tensor<double>&,\n                                           const std::vector<long>&, bool binary);\n\n    template void fcube<double,5>(const Key<5>&, const FunctionFunctorInterface<double,5>&, const Tensor<double>&, Tensor<double>&);\n    template Tensor<double> fcube<double, 5>(Key<5> const&, double (*)(Vector<double, 5> const&), Tensor<double> const&);\n    template void fcube<std::complex<double>,5>(const Key<5>&, const FunctionFunctorInterface<std::complex<double>,5>&, const Tensor<double>&, Tensor<std::complex<double> >&);\n    template Tensor<std::complex<double> > fcube<std::complex<double>, 5>(Key<5> const&, std::complex<double> (*)(Vector<double, 5> const&), Tensor<double> const&);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<FunctionImpl<double,5> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<double,5> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::FunctionImpl<std::complex<double>, 5> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<std::complex<double>, 5> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<5>, FunctionNode<double, 5>, Hash<Key<5> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<5>, FunctionNode<double, 5>, Hash<Key<5> > > >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<5>, FunctionNode<std::complex<double>, 5>, Hash<Key<5> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<5>, FunctionNode<std::complex<double>, 5>, Hash<Key<5> > > >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<double,5> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<double,5> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<std::complex<double>,5> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<std::complex<double>,5> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::SeparatedConvolution<double,5> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock madness::WorldObject<madness::SeparatedConvolution<double,5> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::SeparatedConvolution<std::complex<double>,5> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock madness::WorldObject<madness::SeparatedConvolution<std::complex<double>,5> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<5>, LBNodeDeux<5>, Hash<Key<5> > > >::pending = std::list<detail::PendingMsg>();\n    template <>  Spinlock WorldObject<WorldContainerImpl<Key<5>, LBNodeDeux<5>, Hash<Key<5> > > >::pending_mutex(0);\n\n    // These implicit instantiations must be below the explicit ones above in order not to offend LLVM\n    template class FunctionDefaults<5>;\n    template class Function<double, 5>;\n    template class Function<std::complex<double>, 5>;\n    template class FunctionImpl<double, 5>;\n    template class FunctionImpl<std::complex<double>, 5>;\n    template class FunctionCommonData<double, 5>;\n    template class FunctionCommonData<double_complex, 5>;\n    template class Displacements<5>;\n    template class DerivativeBase<double,5>;\n    template class DerivativeBase<double_complex,5>;\n\n}\n#endif\n"
  },
  {
    "path": "src/madness/mra/mra6.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/mra/mra.h>\n#define MPRAIMPLX\n#include <madness/mra/mraimpl.h>\n#include <madness/world/world_object.h>\n#include <madness/world/worldmutex.h>\n#include <list>\n\n#ifdef FUNCTION_INSTANTIATE_6\nnamespace madness {\n\n    template void plotdx<double,6>(const Function<double,6>&, const char*, const Tensor<double>&,\n                                   const std::vector<long>&, bool binary);\n    template void plotdx<double_complex,6>(const Function<double_complex,6>&, const char*, const Tensor<double>&,\n                                           const std::vector<long>&, bool binary);\n\n    template void fcube<double,6>(const Key<6>&, const FunctionFunctorInterface<double,6>&, const Tensor<double>&, Tensor<double>&);\n    template Tensor<double> fcube<double, 6>(Key<6> const&, double (*)(Vector<double, 6> const&), Tensor<double> const&);\n    template void fcube<std::complex<double>,6>(const Key<6>&, const FunctionFunctorInterface<std::complex<double>,6>&, const Tensor<double>&, Tensor<std::complex<double> >&);\n    template Tensor<std::complex<double> > fcube<std::complex<double>, 6>(Key<6> const&, std::complex<double> (*)(Vector<double, 6> const&), Tensor<double> const&);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<FunctionImpl<double,6> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<double,6> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::FunctionImpl<std::complex<double>, 6> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<FunctionImpl<std::complex<double>, 6> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<6>, FunctionNode<double, 6>, Hash<Key<6> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<6>, FunctionNode<double, 6>, Hash<Key<6> > > >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<6>, FunctionNode<std::complex<double>, 6>, Hash<Key<6> > > >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<WorldContainerImpl<Key<6>, FunctionNode<std::complex<double>, 6>, Hash<Key<6> > > >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<double,6> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<double,6> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<DerivativeBase<std::complex<double>,6> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock WorldObject<DerivativeBase<std::complex<double>,6> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::SeparatedConvolution<double,6> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock madness::WorldObject<madness::SeparatedConvolution<double,6> >::pending_mutex(0);\n    template <> volatile std::list<detail::PendingMsg> WorldObject<madness::SeparatedConvolution<std::complex<double>,6> >::pending = std::list<detail::PendingMsg>();\n    template <> Spinlock madness::WorldObject<madness::SeparatedConvolution<std::complex<double>,6> >::pending_mutex(0);\n\n    template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<Key<6>, LBNodeDeux<6>, Hash<Key<6> > > >::pending = std::list<detail::PendingMsg>();\n    template <>  Spinlock WorldObject<WorldContainerImpl<Key<6>, LBNodeDeux<6>, Hash<Key<6> > > >::pending_mutex(0);\n\n    // These implicit instantiations must be below the explicit ones above in order not to offend LLVM\n    template class FunctionDefaults<6>;\n    template class Function<double, 6>;\n    template class Function<std::complex<double>, 6>;\n    template class FunctionImpl<double, 6>;\n    template class FunctionImpl<std::complex<double>, 6>;\n    template class FunctionCommonData<double, 6>;\n    template class FunctionCommonData<double_complex, 6>;\n    template class Displacements<6>;\n    template class DerivativeBase<double,6>;\n    template class DerivativeBase<double_complex,6>;\n\n}\n#endif\n"
  },
  {
    "path": "src/madness/mra/mraimpl.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MRA_MRAIMPL_H__INCLUDED\n#define MADNESS_MRA_MRAIMPL_H__INCLUDED\n\n#ifndef MPRAIMPLX\n#error \"mraimpl.h should ONLY be included in one of the mraX.cc files (x=1..6)\"\n#endif\n\n#include <madness/madness_config.h>\n#include <memory>\n#include <math.h>\n#include <cmath>\n#include <madness/world/world_object.h>\n#include <madness/world/worlddc.h>\n#include <madness/world/worldhashmap.h>\n#include <madness/mra/function_common_data.h>\n\n#include <madness/mra/funcimpl.h>\n#include <madness/mra/displacements.h>\n\nnamespace std {\n    template <typename T>\n    bool isnan(const std::complex<T>& v) {\n        MADNESS_PRAGMA_CLANG(diagnostic push)\n        MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wtautological-constant-compare\")\n        return ::std::isnan(v.real()) || ::std::isnan(v.imag());\n        MADNESS_PRAGMA_CLANG(diagnostic pop)\n    }\n}\n\n/// \\file mra/mraimpl.h\n/// \\brief Declaration and initialization of static data, some implementation, some instantiation\n\nnamespace madness {\n    // Definition and initialization of FunctionDefaults static members\n    // It cannot be an instance of FunctionFactory since we want to\n    // set the defaults independent of the data type.\n\n    template <typename T, std::size_t NDIM>\n    void FunctionCommonData<T,NDIM>::_init_twoscale() {\n        if (! two_scale_hg(k, &hg)) throw \"failed to get twoscale coefficients\";\n        hgT = copy(transpose(hg));\n\n        Slice sk(0,k-1), sk2(k,-1);\n        hgsonly = copy(hg(Slice(0,k-1),_));\n\n        h0 = copy(hg(sk,sk));\n        h1 = copy(hg(sk,sk2));\n        g0 = copy(hg(sk2,sk));\n        g1 = copy(hg(sk2,sk2));\n\n        h0T = copy(transpose(hg(sk,sk)));\n        h1T = copy(transpose(hg(sk,sk2)));\n        g0T = copy(transpose(hg(sk2,sk)));\n        g1T = copy(transpose(hg(sk2,sk2)));\n\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionCommonData<T,NDIM>::_init_quadrature\n    (int k, int npt, Tensor<double>& quad_x, Tensor<double>& quad_w,\n     Tensor<double>& quad_phi, Tensor<double>& quad_phiw, Tensor<double>& quad_phit) {\n        quad_x = Tensor<double>(npt); // point\n        quad_w = Tensor<double>(npt); // wheight\n        quad_phi = Tensor<double>(npt,k);\n        quad_phiw = Tensor<double>(npt,k);\n\n        gauss_legendre(npt,0.0,1.0,quad_x.ptr(),quad_w.ptr());\n        for (int mu=0; mu<npt; ++mu) {\n            double phi[200];\n            legendre_scaling_functions(quad_x(mu),k,phi);\n            for (int j=0; j<k; ++j) {\n                quad_phi(mu,j) = phi[j];\n                quad_phiw(mu,j) = quad_w(mu)*phi[j];\n            }\n        }\n        quad_phit = transpose(quad_phi);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::verify_tree() const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        world.gop.fence();  // Make sure nothing is going on\n        MADNESS_CHECK_THROW(verify_tree_state_local(),\"inconsistent coefficients in tree node\");\n        MADNESS_CHECK_THROW(verify_parents_and_children(),\"missing parents or children\");\n    }\n\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::verify_parents_and_children() const {\n\n        // Ensure that parents and children exist appropriately\n        for (const auto& [key, node] : coeffs) {\n\n            if (key.level() > 0) {\n                const keyT parent = key.parent();\n                typename dcT::const_iterator pit = coeffs.find(parent).get();\n                if (pit == coeffs.end()) {\n                    print(world.rank(), \"FunctionImpl: verify: MISSING PARENT\",key,parent);\n                    std::cout.flush();\n                    return false;\n                    MADNESS_EXCEPTION(\"FunctionImpl: verify: MISSING PARENT\", 0);\n                }\n                const nodeT& pnode = pit->second;\n                if (!pnode.has_children()) {\n                    print(world.rank(), \"FunctionImpl: verify: PARENT THINKS IT HAS NO CHILDREN\",key,parent);\n                    return false;\n                    std::cout.flush();\n                    MADNESS_EXCEPTION(\"FunctionImpl: verify: PARENT THINKS IT HAS NO CHILDREN\", 0);\n                }\n            }\n\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                typename dcT::const_iterator cit = coeffs.find(kit.key()).get();\n                if (cit == coeffs.end()) {\n                    if (node.has_children()) {\n                        print(world.rank(), \"FunctionImpl: verify: MISSING CHILD\",key,kit.key());\n                        return false;\n                        std::cout.flush();\n                        MADNESS_EXCEPTION(\"FunctionImpl: verify: MISSING CHILD\", 0);\n                    }\n                }\n                else {\n                    if (! node.has_children()) {\n                        print(world.rank(), \"FunctionImpl: verify: UNEXPECTED CHILD\",key,kit.key());\n                        return false;\n                        std::cout.flush();\n                        MADNESS_EXCEPTION(\"FunctionImpl: verify: UNEXPECTED CHILD\", 0);\n                    }\n                }\n            }\n        }\n        world.gop.fence();\n        return true;\n    }\n\n\n\n    template<typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::verify_tree_state_local() const {\n\n        const TreeState state=get_tree_state();\n        const int k=get_k();\n\n        auto check_internal_coeff_size = [&state, &k](const coeffT& c) {\n            if (state==compressed or state==nonstandard or state==nonstandard_with_leaves)\n                return c.dim(0)==2*k;\n            if (state==redundant) return c.dim(0)==k;\n            if (state==reconstructed) return (not c.is_assigned());         // must not be assigned at all\n            if (state==redundant_after_merge or state==nonstandard_after_apply) return true;\n            MADNESS_EXCEPTION(\"unknown state\",1);\n        };\n        auto check_leaf_coeff_size = [&state, &k](const coeffT& c) {\n        // citation from compress_spawn\n        //  if (not keepleaves) node.clear_coeff();\n            if (state==reconstructed or state==redundant or state==redundant_after_merge or state==nonstandard_with_leaves)\n                return c.dim(0)==k;\n            if (state==compressed or state==nonstandard) return (not c.is_assigned());         // must not be assigned at all\n            if (state==nonstandard_after_apply) return true;\n            MADNESS_EXCEPTION(\"unknown state\",1);\n        };\n\n        bool good=true;\n        for (const auto& [key, node] : coeffs) {\n            const auto& c=node.coeff();\n            const bool is_internal=node.has_children();\n            const bool is_leaf=not node.has_children();\n            if (is_internal) good=good and check_internal_coeff_size(c);\n            if (is_leaf) good=good and check_leaf_coeff_size(c);\n            if (not good) {\n                print(\"incorrect size of coefficients for key\",key,\"state\",state,c.dim(0));;\n            }\n        }\n        return good;\n    }\n\n    template <typename T, std::size_t NDIM>\n    const std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > >& FunctionImpl<T,NDIM>::get_pmap() const {\n        return coeffs.get_pmap();\n    }\n\n\n    /// perform: this= alpha*f + beta*g, invoked by result\n\n    /// f and g are reconstructed, so we can save on the compress operation,\n    /// walk down the joint tree, and add leaf coefficients; effectively refines\n    /// to common finest level.\n    /// @param[in]  alpha   prefactor for f\n    /// @param[in]  f       first addend\n    /// @param[in]  beta    prefactor for g\n    /// @param[in]  g       second addend\n    /// @return     nothing, but leaves this's tree reconstructed and as sum of f and g\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::gaxpy_oop_reconstructed(const double alpha, const implT& f,\n                                                       const double beta, const implT& g, const bool fence) {\n\n        MADNESS_CHECK_THROW(f.is_reconstructed(), \"gaxpy_oop_reconstructed: f is not reconstructed\");\n        MADNESS_CHECK_THROW(g.is_reconstructed(), \"gaxpy_oop_reconstructed: g is not reconstructed\");\n\n        ProcessID owner = coeffs.owner(cdata.key0);\n        if (world.rank() == owner) {\n\n            CoeffTracker<T,NDIM> ff(&f);\n            CoeffTracker<T,NDIM> gg(&g);\n\n            typedef add_op coeff_opT;\n            coeff_opT coeff_op(ff,gg,alpha,beta);\n            typedef insert_op<T,NDIM> apply_opT;\n            apply_opT apply_op(this);\n\n            woT::task(world.rank(), &implT:: template forward_traverse<coeff_opT,apply_opT>,\n                      coeff_op, apply_op, cdata.key0);\n\n        }\n        set_tree_state(reconstructed);\n        if (fence) world.gop.fence();\n    }\n\n    /// Returns true if the function is compressed.\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::is_compressed() const {\n        return (tree_state==compressed);\n    }\n\n    /// Returns true if the function is reconstructed.\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::is_reconstructed() const {\n        return (tree_state==reconstructed);\n    }\n\n    /// Returns true if the function is redundant.\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::is_redundant() const {\n        return (tree_state==redundant);\n    }\n\n    /// Returns true if the function is redundant_after_merge.\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::is_redundant_after_merge() const {\n        return (tree_state==redundant_after_merge);\n    }\n\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::is_nonstandard() const {\n    \treturn (tree_state==nonstandard);\n    }\n\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::is_nonstandard_with_leaves() const {\n    \treturn (tree_state==nonstandard_with_leaves);\n    }\n\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::is_on_demand() const {\n    \treturn tree_state==on_demand;\n    }\n\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::has_leaves() const {\n    \treturn (tree_state==nonstandard_with_leaves);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::set_functor(const std::shared_ptr<FunctionFunctorInterface<T,NDIM> > functor1) {\n        set_tree_state(on_demand);\n//    \tthis->on_demand=true;\n        functor=functor1;\n    }\n\n    template <typename T, std::size_t NDIM>\n    std::shared_ptr<FunctionFunctorInterface<T,NDIM> > FunctionImpl<T,NDIM>::get_functor() {\n        MADNESS_ASSERT(this->functor);\n        return functor;\n    }\n\n    template <typename T, std::size_t NDIM>\n    std::shared_ptr<FunctionFunctorInterface<T,NDIM> > FunctionImpl<T,NDIM>::get_functor() const {\n        MADNESS_ASSERT(this->functor);\n        return functor;\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::unset_functor() {\n//        this->on_demand=false;\n        set_tree_state(unknown);\n        functor.reset();\n    }\n\n    template <typename T, std::size_t NDIM>\n    TensorType FunctionImpl<T,NDIM>::get_tensor_type() const {return targs.tt;}\n\n    template <typename T, std::size_t NDIM>\n    TensorArgs FunctionImpl<T,NDIM>::get_tensor_args() const {return targs;}\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::set_tensor_args(const TensorArgs& t) {targs=t;}\n\n    template <typename T, std::size_t NDIM>\n    double FunctionImpl<T,NDIM>::get_thresh() const {return thresh;}\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::set_thresh(double value) {thresh = value;}\n\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::get_autorefine() const {return autorefine;}\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::set_autorefine(bool value) {autorefine = value;}\n\n    template <typename T, std::size_t NDIM>\n    int FunctionImpl<T,NDIM>::get_k() const {return k;}\n\n    template <typename T, std::size_t NDIM>\n    const typename FunctionImpl<T,NDIM>::dcT& FunctionImpl<T,NDIM>::get_coeffs() const {return coeffs;}\n\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::dcT& FunctionImpl<T,NDIM>::get_coeffs() {return coeffs;}\n\n    template <typename T, std::size_t NDIM>\n    const FunctionCommonData<T,NDIM>& FunctionImpl<T,NDIM>::get_cdata() const {return cdata;}\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::accumulate_timer(const double time) const {\n        timer_accumulate.accumulate(time);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::print_timer() const {\n        if (world.rank()==0) {\n            timer_accumulate.print(\"accumulate\");\n            timer_target_driven.print(\"target_driven\");\n            timer_lr_result.print(\"result2low_rank\");\n        }\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::reset_timer() {\n        if (world.rank()==0) {\n            timer_accumulate.reset();\n            timer_target_driven.reset();\n            timer_lr_result.reset();\n        }\n    }\n\n    /// Truncate according to the threshold with optional global fence\n\n    /// If thresh<=0 the default value of this->thresh is used\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::truncate(double tol, bool fence) {\n        // Cannot put tol into object since it would make a race condition\n        if (tol <= 0.0)\n            tol = thresh;\n        if (world.rank() == coeffs.owner(cdata.key0)) {\n            if (is_compressed()) {\n                truncate_spawn(cdata.key0,tol);\n            } else {\n                truncate_reconstructed_spawn(cdata.key0,tol);\n            }\n        }\n        if (fence)\n            world.gop.fence();\n    }\n\n    template <typename T, std::size_t NDIM>\n    const typename FunctionImpl<T,NDIM>::keyT& FunctionImpl<T,NDIM>::key0() const {\n        return cdata.key0;\n    }\n\n    /// Print a plane (\"xy\", \"xz\", or \"yz\") containing the point x to file\n\n    /// works for all dimensions; we walk through the tree, and if a leaf node\n    /// inside the sub-cell touches the plane we print it in pstricks format\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::print_plane(const std::string filename, const int xaxis, const int yaxis, const coordT& el2) {\n\n        // get the local information\n        Tensor<double> localinfo=print_plane_local(xaxis,yaxis,el2);\n\n        // lump all the local information together, and gather on node0\n        std::vector<Tensor<double> > localinfo_vec(1,localinfo);\n        std::vector<Tensor<double> > printinfo=world.gop.concat0(localinfo_vec);\n        world.gop.fence();\n\n        // do the actual print\n        if (world.rank()==0) do_print_plane(filename,printinfo,xaxis,yaxis,el2);\n    }\n\n    /// collect the data for a plot of the MRA structure locally on each node\n\n    /// @param[in]\txaxis\tthe x-axis in the plot (can be any axis of the MRA box)\n    /// @param[in]\tyaxis\tthe y-axis in the plot (can be any axis of the MRA box)\n    /// @param[in]\tel2\n    template <typename T, std::size_t NDIM>\n    Tensor<double> FunctionImpl<T,NDIM>::print_plane_local(const int xaxis, const int yaxis, const coordT& el2) {\n        coordT x_sim;\n        user_to_sim<NDIM>(el2,x_sim);\n        x_sim[0]+=1.e-10;\n\n        // dimensions are: (# boxes)(hue, x lo left, y lo left, x hi right, y hi right)\n        Tensor<double> plotinfo(coeffs.size(),5);\n        long counter=0;\n\n        // loop over local boxes, if the fit, add the info to the output tensor\n        typename dcT::const_iterator end = coeffs.end();\n        for (typename dcT::const_iterator it=coeffs.begin(); it!=end; ++it) {\n            const keyT& key = it->first;\n            const nodeT& node = it->second;\n\n            // thisKeyContains ignores dim0 and dim1\n            if (key.thisKeyContains(x_sim,xaxis,yaxis) and node.is_leaf() and (node.has_coeff())) {\n\n                Level n=key.level();\n                Vector<Translation,NDIM> l=key.translation();\n                // get the diametral edges of the node in the plotting plane\n                double scale=std::pow(0.5,double(n));\n                double xloleft = scale*l[xaxis];\n                double yloleft = scale*l[yaxis];\n                double xhiright = scale*(l[xaxis]+1);\n                double yhiright = scale*(l[yaxis]+1);\n\n                // convert back to user coordinates\n                Vector<double,4> user;\n                user[0]=xloleft*FunctionDefaults<NDIM>::get_cell_width()[xaxis] + FunctionDefaults<NDIM>::get_cell()(xaxis,0);\n                user[2]=xhiright*FunctionDefaults<NDIM>::get_cell_width()[xaxis] + FunctionDefaults<NDIM>::get_cell()(xaxis,0);\n                user[1]=yloleft*FunctionDefaults<NDIM>::get_cell_width()[yaxis] + FunctionDefaults<NDIM>::get_cell()(yaxis,0);\n                user[3]=yhiright*FunctionDefaults<NDIM>::get_cell_width()[yaxis] + FunctionDefaults<NDIM>::get_cell()(yaxis,0);\n\n\n                //                    if ((xloleft<-5.0) or (yloleft<-5.0) or (xhiright>5.0) or (yhiright>5.0)) continue;\n                if ((user[0]<-5.0) or (user[1]<-5.0) or (user[2]>5.0) or (user[3]>5.0)) continue;\n\n                // do rank or do error\n                double color=0.0;\n                if (1) {\n\n                    const double maxrank=40;\n                    do_convert_to_color hue(maxrank,false);\n                    color=hue(node.coeff().rank());\n                } else {\n\n                    // Make quadrature rule of higher order\n                    const int npt = cdata.npt + 1;\n                    Tensor<double> qx, qw, quad_phi, quad_phiw, quad_phit;\n                    FunctionCommonData<T,NDIM>::_init_quadrature(k+1, npt, qx, qw, quad_phi, quad_phiw, quad_phit);\n                    do_err_box< FunctionFunctorInterface<T,NDIM> > op(this, this->get_functor().get(), npt, qx, quad_phit, quad_phiw);\n\n                    do_convert_to_color hue(1000.0,true);\n                    double error=op(it);\n                    error=sqrt(error);//*pow(2,key.level()*6);\n                    color=hue(error);\n                }\n\n                plotinfo(counter,0)=color;\n                plotinfo(counter,1)=user[0];\n                plotinfo(counter,2)=user[1];\n                plotinfo(counter,3)=user[2];\n                plotinfo(counter,4)=user[3];\n                ++counter;\n            }\n        }\n\n        // shrink the info\n        if (counter==0) plotinfo=Tensor<double>();\n        else plotinfo=plotinfo(Slice(0,counter-1),Slice(_));\n        return plotinfo;\n    }\n\n    /// print the MRA structure\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::do_print_plane(const std::string filename, std::vector<Tensor<double> > plotinfo,\n                                              const int xaxis, const int yaxis, const coordT el2) {\n\n        // invoke only on master node\n        MADNESS_ASSERT(world.rank()==0);\n\n        // prepare file\n        FILE * pFile;\n        pFile = fopen(filename.c_str(), \"w\");\n        Tensor<double> cell=FunctionDefaults<NDIM>::get_cell();\n\n\n        fprintf(pFile,\"\\\\psset{unit=1cm}\\n\");\n        fprintf(pFile,\"\\\\begin{pspicture}(%4.2f,%4.2f)(%4.2f,%4.2f)\\n\",\n                //            \t\tcell(xaxis,0),cell(xaxis,1),cell(yaxis,0),cell(yaxis,1));\n                -5.0,-5.0,5.0,5.0);\n        fprintf(pFile,\"\\\\pslinewidth=0.1pt\\n\");\n\n        for (std::vector<Tensor<double> >::const_iterator it=plotinfo.begin(); it!=plotinfo.end(); ++it) {\n\n            Tensor<double> localinfo=*it;\n            if (localinfo.has_data()) {\n\n                for (long i=0; i<localinfo.dim(0); ++i) {\n\n                    fprintf(pFile,\"\\\\newhsbcolor{mycolor}{%8.4f 1.0 0.7}\\n\",localinfo(i,0));\n                    fprintf(pFile,\"\\\\psframe[\"//linewidth=0.5pt,\"\n                            \"fillstyle=solid,\"\n                            \"fillcolor=mycolor]\"\n                            \"(%12.8f,%12.8f)(%12.8f,%12.8f)\\n\",\n                            localinfo(i,1),localinfo(i,2),localinfo(i,3),localinfo(i,4));\n                }\n            }\n        }\n\n\n        fprintf(pFile,\"\\\\end{pspicture}\\n\");\n        fclose(pFile);\n    }\n\n    /// print the grid (the roots of the quadrature of each leaf box)\n    /// of this function in user xyz coordinates\n    template <typename T, std::size_t NDIM>\n    void  FunctionImpl<T,NDIM>::print_grid(const std::string filename) const {\n\n        // get the local information\n        std::vector<keyT> local_keys=local_leaf_keys();\n\n        // lump all the local information together, and gather on node0\n        std::vector<keyT> all_keys=world.gop.concat0(local_keys);\n        world.gop.fence();\n\n        // do the actual print\n        if (world.rank()==0) do_print_grid(filename,all_keys);\n\n    }\n\n    /// return the keys of the local leaf boxes\n    template <typename T, std::size_t NDIM>\n    std::vector<typename FunctionImpl<T,NDIM>::keyT>  FunctionImpl<T,NDIM>::local_leaf_keys() const {\n\n        // coeffs.size is maximum number of keys (includes internal keys)\n        std::vector<keyT> keys(coeffs.size());\n\n        // loop over local boxes, if they are leaf boxes add their quadrature roots\n        // to the output tensor\n        int i=0;\n        typename dcT::const_iterator end = coeffs.end();\n        for (typename dcT::const_iterator it=coeffs.begin(); it!=end; ++it) {\n            const keyT& key = it->first;\n            const nodeT& node = it->second;\n            if (node.is_leaf()) keys[i++]=key;\n        }\n\n        // shrink the vector to number of leaf keys\n        keys.resize(i);\n        return keys;\n    }\n\n    /// print the grid in xyz format\n\n    /// the quadrature points and the key information will be written to file,\n    /// @param[in]\tfilename\twhere the quadrature points will be written to\n    /// @param[in]\tkeys\t\tall leaf keys\n    template <typename T, std::size_t NDIM>\n    void  FunctionImpl<T,NDIM>::do_print_grid(const std::string filename, const std::vector<keyT>& keys) const {\n        // invoke only on master node\n        MADNESS_ASSERT(world.rank()==0);\n\n        // the quadrature points in simulation coordinates of the root node\n        const Tensor<double> qx=cdata.quad_x;\n        const size_t npt = qx.dim(0);\n\n        // the number of coordinates (grid point tuples) per box ({x1},{x2},{x3},..,{xNDIM})\n        long npoints=power<NDIM>(npt);\n        // the number of boxes\n        long nboxes=keys.size();\n\n        // prepare file\n        FILE * pFile;\n        pFile = fopen(filename.c_str(), \"w\");\n\n        fprintf(pFile,\"%ld\\n\",npoints*nboxes);\n        fprintf(pFile,\"%ld points per box and %ld boxes \\n\",npoints,nboxes);\n\n        // loop over all leaf boxes\n        typename std::vector<keyT>::const_iterator key_it=keys.begin();\n        for (key_it=keys.begin(); key_it!=keys.end(); ++key_it) {\n\n            const keyT& key=*key_it;\n            fprintf(pFile,\"# key: %8d\",key.level());\n            for (size_t d=0; d<NDIM; d++) fprintf(pFile,\"%8d\",int(key.translation()[d]));\n            fprintf(pFile,\"\\n\");\n\n            // this is borrowed from fcube\n            const Vector<Translation,NDIM>& l = key.translation();\n            const Level n = key.level();\n            const double h = std::pow(0.5,double(n));\n            coordT c; // will hold the point in user coordinates\n\n            const Tensor<double>& cell_width = FunctionDefaults<NDIM>::get_cell_width();\n            const Tensor<double>& cell = FunctionDefaults<NDIM>::get_cell();\n\n            if (NDIM == 3) {\n                for (size_t i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (size_t j=0; j<npt; ++j) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        for (size_t k=0; k<npt; ++k) {\n                            c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                            // grid weights\n                            //\t\t\t\t\t            double scale = pow(0.5,0.5*NDIM*key.level())*\n                            //\t\t\t\t\t            \t\tsqrt(FunctionDefaults<NDIM>::get_cell_volume());\n                            //\t\t\t\t\t            double w=cdata.quad_phiw[i]*cdata.quad_phiw[j]*cdata.quad_phiw[k];\n\n                            fprintf(pFile,\"%18.12f %18.12f %18.12f\\n\",c[0],c[1],c[2]);\n                            //\t\t\t\t\t\t\t\tfprintf(pFile,\"%18.12e %18.12e %18.12e %18.12e\\n\",c[0],c[1],c[2],w*scale);\n                        }\n                    }\n                }\n            } else {\n                MADNESS_EXCEPTION(\"only NDIM=3 in print_grid\",0);\n            }\n        }\n        fclose(pFile);\n    }\n\n\n    /// Returns the truncation threshold according to truncate_method\n    template <typename T, std::size_t NDIM>\n    double FunctionImpl<T,NDIM>::truncate_tol(double tol, const keyT& key) const {\n\n        // RJH ... introduced max level here to avoid runaway\n        // refinement due to truncation threshold going down to\n        // intrinsic numerical error\n        const int MAXLEVEL1 = 20; // 0.5**20 ~= 1e-6\n        const int MAXLEVEL2 = 10; // 0.25**10 ~= 1e-6\n\n        if (truncate_mode == 0) {\n            return tol;\n        }\n        else if (truncate_mode == 1) {\n            double L = FunctionDefaults<NDIM>::get_cell_min_width();\n            return tol*std::min(1.0,pow(0.5,double(std::min(key.level(),MAXLEVEL1)))*L);\n        }\n        else if (truncate_mode == 2) {\n            double L = FunctionDefaults<NDIM>::get_cell_min_width();\n            return tol*std::min(1.0,pow(0.25,double(std::min(key.level(),MAXLEVEL2)))*L*L);\n        }\n        else if (truncate_mode == 3) {\n            // similar to truncate mode 1, but with an additional factor to\n            // account for an increased number of boxes in higher dimensions\n\n            // here is our handwaving argument: this threshold will give each\n            // FunctionNode an error of less than tol. The total error can\n            // then be as high as sqrt(#nodes) * tol. Therefore in order to\n            // account for higher dimensions: divide tol by about the root of\n            // number of siblings (2^NDIM) that have a large error when we\n            // refine along a deep branch of the tree. FAB\n            //\n            // Nope ... it can easily be as high as #nodes * tol.  The real\n            // fix for this is an end-to-end error analysis of the larger\n            // application and if desired to include this factor into the\n            // threshold selected by the application. RJH\n            const static double fac=1.0/std::pow(2,NDIM*0.5);\n            tol*=fac;\n\n            double L = FunctionDefaults<NDIM>::get_cell_min_width();\n            return tol*std::min(1.0,pow(0.5,double(std::min(key.level(),MAXLEVEL1)))*L);\n\n        } else {\n            MADNESS_EXCEPTION(\"truncate_mode invalid\",truncate_mode);\n        }\n    }\n\n    /// Returns patch referring to coeffs of child in parent box\n    template <typename T, std::size_t NDIM>\n    std::vector<Slice> FunctionImpl<T,NDIM>::child_patch(const keyT& child) const {\n        std::vector<Slice> s(NDIM);\n        const Vector<Translation,NDIM>& l = child.translation();\n        for (std::size_t i=0; i<NDIM; ++i)\n            s[i] = cdata.s[l[i]&1]; // Lowest bit of translation\n        return s;\n    }\n\n    /// Directly project parent NS coeffs to child NS coeffs\n\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::coeffT FunctionImpl<T,NDIM>::parent_to_child_NS(\n            const keyT& child, const keyT& parent, const coeffT& coeff) const {\n\n        const implT* f=this;\n        //        \tMADNESS_ASSERT(coeff.tensor_type()==TT_FULL);\n        coeffT result(f->cdata.v2k,coeff.tensor_type());\n\n        // if the node for child is existent in f, and it is an internal node, we\n        // automatically have the NS form; if it is a leaf node, we only have the\n        // sum coeffs, so we take zero difference coeffs\n        if (child==parent) {\n            if (coeff.dim(0)==2*f->get_k()) result=coeff;\t\t// internal node\n            else if (coeff.dim(0)==f->get_k()) {\t\t\t// leaf node\n                result(f->cdata.s0)+=coeff;\n            } else {\n                MADNESS_EXCEPTION(\"confused k in parent_to_child_NS\",1);\n            }\n        } else if (child.level()>parent.level()) {\n\n            // parent and coeff should refer to a leaf node with sum coeffs only\n            // b/c tree should be compressed with leaves kept.\n            MADNESS_ASSERT(coeff.dim(0)==f->get_k());\n            const coeffT scoeff=f->parent_to_child(coeff,parent,child);\n            result(f->cdata.s0)+=scoeff;\n        } else {\n            MADNESS_EXCEPTION(\"confused keys in parent_to_child_NS\",1);\n        }\n        return result;\n    }\n\n    /// truncate tree at a certain level\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::erase(const Level& max_level) {\n        this->make_redundant(true);\n\n        typename dcT::iterator end = coeffs.end();\n        for (typename dcT::iterator it= coeffs.begin(); it!=end; ++it) {\n            keyT key=it->first;\n            nodeT& node=it->second;\n            if (key.level()>max_level) coeffs.erase(key);\n            if (key.level()==max_level) node.set_has_children(false);\n        }\n        this->undo_redundant(true);\n    }\n\n\n    /// Returns some asymmetry measure ... no comms\n    template <typename T, std::size_t NDIM>\n    double FunctionImpl<T,NDIM>::check_symmetry_local() const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        typedef Range<typename dcT::const_iterator> rangeT;\n        return world.taskq.reduce<double,rangeT,do_check_symmetry_local>(rangeT(coeffs.begin(),coeffs.end()),\n                                                                         do_check_symmetry_local(*this));\n    }\n\n\n    /// Refine multiple functions down to the same finest level\n\n    /// @param[v] is the vector of functions we are refining.\n    /// @param[key] is the current node.\n    /// @param[c] is the vector of coefficients passed from above.\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::refine_to_common_level(const std::vector<FunctionImpl<T,NDIM>*>& v,\n                                                      const std::vector<tensorT>& c,\n                                                      const keyT key) {\n        if (key == cdata.key0 && coeffs.owner(key)!=world.rank()) return;\n\n        // First insert coefficients from above ... also get write accessors here\n        std::unique_ptr<typename dcT::accessor[]> acc(new typename dcT::accessor[v.size()]);\n        for (unsigned int i=0; i<c.size(); i++) {\n            MADNESS_ASSERT(v[i]->coeffs.get_pmap() == coeffs.get_pmap());\n            MADNESS_ASSERT(v[i]->coeffs.owner(key) == world.rank());\n            bool exists = ! v[i]->coeffs.insert(acc[i],key);\n            if (c[i].size()) {\n                MADNESS_CHECK(!exists);\n                acc[i]->second = nodeT(coeffT(c[i],targs),false);\n            }\n            else {\n                MADNESS_ASSERT(exists);\n            }\n        }\n\n        // If everyone has coefficients we are done\n        bool done = true;\n        for (unsigned int i=0; i<v.size(); i++) {\n            done &= acc[i]->second.has_coeff();\n        }\n\n        if (!done) {\n            // Those functions with coefficients need to be refined down\n            std::vector<tensorT> d(v.size());\n            for (unsigned int i=0; i<v.size(); i++) {\n                if (acc[i]->second.has_coeff()) {\n                    tensorT s(cdata.v2k);\n                    //                        s(cdata.s0) = acc[i]->second.coeff()(___);\n                    s(cdata.s0) = acc[i]->second.coeff().full_tensor();\n                    acc[i]->second.clear_coeff();\n                    d[i] = unfilter(s);\n                    acc[i]->second.set_has_children(true);\n                }\n            }\n\n            // Loop thru children and pass down\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                const keyT& child = kit.key();\n                std::vector<Slice> cp = child_patch(child);\n                std::vector<tensorT> childc(v.size());\n                for (unsigned int i=0; i<v.size(); i++) {\n                    if (d[i].size()) childc[i] = copy(d[i](cp));\n                }\n                woT::task(coeffs.owner(child), &implT::refine_to_common_level, v, childc, child);\n            }\n        }\n    }\n\n    // horrifically non-scalable\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::put_in_box(ProcessID from, long nl, long ni) const {\n        if (world.size()> 1000)\n            throw \"NO!\";\n        box_leaf[from] = nl;\n        box_interior[from] = ni;\n    }\n\n    /// Prints summary of data distribution\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::print_info() const {\n        if (world.size() >= 1000)\n            return;\n        for (int i=0; i<world.size(); ++i)\n            box_leaf[i] = box_interior[i] == 0;\n        world.gop.fence();\n        long nleaf=0, ninterior=0;\n        typename dcT::const_iterator end = coeffs.end();\n        for (typename dcT::const_iterator it=coeffs.begin(); it!=end; ++it) {\n            const nodeT& node = it->second;\n            if (node.is_leaf())\n                ++nleaf;\n            else\n                ++ninterior;\n        }\n        this->send(0, &implT::put_in_box, world.rank(), nleaf, ninterior);\n        world.gop.fence();\n        if (world.rank() == 0) {\n            for (int i=0; i<world.size(); ++i) {\n                printf(\"load: %5d %8ld %8ld\\n\", i, box_leaf[i], box_interior[i]);\n            }\n        }\n        world.gop.fence();\n    }\n\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::noautorefine(const keyT& key, const tensorT& t) const {\n        return false;\n    }\n\n    /// Returns true if this block of coeffs needs autorefining\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::autorefine_square_test(const keyT& key, const nodeT& t) const {\n        double lo, hi;\n        tnorm(t.coeff().full_tensor(), &lo, &hi);\n        double test = 2*lo*hi + hi*hi;\n        //print(\"autoreftest\",key,thresh,truncate_tol(thresh, key),lo,hi,test);\n        return test> truncate_tol(thresh, key);\n    }\n\n\n    /// is this the same as trickle_down() ?\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::sum_down_spawn(const keyT& key, const coeffT& s) {\n        typename dcT::accessor acc;\n        coeffs.insert(acc,key);\n        nodeT& node = acc->second;\n        coeffT& c = node.coeff();\n\n        //print(key,\"received\",s.normf(),c.normf(),node.has_children());\n\n        if (s.size() > 0) {\n            if (c.size() > 0)\n                c.gaxpy(1.0,s,1.0);\n            else\n                c = s;\n        }\n\n        if (node.has_children()) {\n            coeffT d;\n            if (c.has_data()) {\n                d = coeffT(cdata.v2k,targs);\n                d(cdata.s0) += c;\n                d = unfilter(d);\n                node.clear_coeff();\n            }\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                coeffT ss;\n                const keyT& child = kit.key();\n                if (d.size() > 0) ss = copy(d(child_patch(child)));\n                //print(key,\"sending\",ss.normf(),\"to\",child);\n                woT::task(coeffs.owner(child), &implT::sum_down_spawn, child, ss);\n            }\n        }\n        else {\n            // Missing coeffs assumed to be zero\n            if (c.size() <= 0) c = coeffT(cdata.vk,targs);\n        }\n    }\n\n    /// After 1d push operator must sum coeffs down the tree to restore correct scaling function coefficients\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::sum_down(bool fence) {\n        tree_state=reconstructed;\n        if (world.rank() == coeffs.owner(cdata.key0)) sum_down_spawn(cdata.key0, coeffT());\n        if (fence) world.gop.fence();\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::forward_do_diff1(const DerivativeBase<T,NDIM>* D,\n                                                const implT* f,\n                                                const keyT& key,\n                                                const std::pair<keyT,coeffT>& left,\n                                                const std::pair<keyT,coeffT>& center,\n                                                const std::pair<keyT,coeffT>& right) {\n        D->forward_do_diff1(f,this,key,left,center,right);\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::do_diff1(const DerivativeBase<T,NDIM>* D,\n                                        const implT* f,\n                                        const keyT& key,\n                                        const std::pair<keyT,coeffT>& left,\n                                        const std::pair<keyT,coeffT>& center,\n                                        const std::pair<keyT,coeffT>& right) {\n        D->do_diff1(f,this,key,left,center,right);\n    }\n\n\n    // Called by result function to differentiate f\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::diff(const DerivativeBase<T,NDIM>* D, const implT* f, bool fence) {\n        typedef std::pair<keyT,coeffT> argT;\n        for (const auto& [key, node]: f->coeffs) {\n            if (node.has_coeff()) {\n                Future<argT> left  = D->find_neighbor(f, key,-1);\n                argT center(key,node.coeff());\n                Future<argT> right = D->find_neighbor(f, key, 1);\n                world.taskq.add(*this, &implT::do_diff1, D, f, key, left, center, right, TaskAttributes::hipri());\n            }\n            else {\n                coeffs.replace(key,nodeT(coeffT(),true)); // Empty internal node\n            }\n        }\n        if (fence) world.gop.fence();\n    }\n\n\n    /// return the a std::pair<key, node>, which MUST exist\n    template <typename T, std::size_t NDIM>\n    std::pair<Key<NDIM>,ShallowNode<T,NDIM> > FunctionImpl<T,NDIM>::find_datum(keyT key) const {\n        MADNESS_ASSERT(coeffs.probe(key));\n        ShallowNode<T,NDIM> snode(coeffs.find(key).get()->second);\n        return std::pair<Key<NDIM>,ShallowNode<T,NDIM> >(key,snode);\n    }\n\n    /// multiply the ket with a one-electron potential rr(1,2)= f(1,2)*g(1)\n\n    /// @param[in]\tval_ket\tfunction values of f(1,2)\n    /// @param[in]\tval_pot\tfunction values of g(1)\n    /// @param[in]\tparticle\tif 0 then g(1), if 1 then g(2)\n    /// @return\t\tthe resulting function values\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::coeffT FunctionImpl<T,NDIM>::multiply(const coeffT& val_ket,\n            const coeffT& val_pot, int particle) const {\n\n        MADNESS_ASSERT(particle==0 or particle==1);\n        MADNESS_ASSERT(val_pot.is_full_tensor());\n        MADNESS_ASSERT(val_ket.is_svd_tensor());\n\n        std::vector<long> vkhalf=std::vector<long>(NDIM/2,cdata.vk[0]);\n        tensorT ones=tensorT(vkhalf);\n        ones=1.0;\n\n        TensorArgs targs(-1.0,val_ket.tensor_type());\n        coeffT pot12;\n        if (particle==0) pot12=outer(val_pot.full_tensor(),ones,targs);\n        else if (particle==1) pot12=outer(ones,val_pot.full_tensor(),targs);\n\n        coeffT result=copy(val_ket);\n        result.emul(pot12);\n\n        return result;\n    }\n\n\n    /// given several coefficient tensors, assemble a result tensor\n\n    /// the result looks like: \t(v(1,2) + v(1) + v(2)) |ket(1,2)>\n    /// or \t\t\t\t\t\t(v(1,2) + v(1) + v(2)) |p(1) p(2)>\n    /// i.e. coefficients for the ket and coefficients for the two particles are\n    /// mutually exclusive. All potential terms are optional, just pass in empty coeffs.\n    /// @param[in]\tkey\t\t\tthe key of the FunctionNode to which these coeffs belong\n    /// @param[in]\tcket\t\tcoefficients of the ket\n    /// @param[in]\tvpotential1\tfunction values of the potential for particle 1\n    /// @param[in]\tvpotential2\tfunction values of the potential for particle 2\n    /// @param[in]\tveri\t\tfunction values for the 2-particle potential\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::coeffT FunctionImpl<T,NDIM>::assemble_coefficients(\n            const keyT& key, const coeffT& coeff_ket, const coeffT& vpotential1,\n            const coeffT& vpotential2, const tensorT& veri) const {\n\n        // take a shortcut if we are already done\n        bool ket_only=(not (vpotential1.has_data() or vpotential2.has_data() or veri.has_data()));\n        if (ket_only) return coeff_ket;\n\n        // switch to values instead of coefficients\n        coeffT val_ket=coeffs2values(key,coeff_ket);\n\n        // the result tensor\n        coeffT val_result=coeffT(val_ket.ndim(),val_ket.dims(),this->get_tensor_args().tt);\n        coeffT coeff_result;\n\n        // potential for particles 1 and 2, must be done in TT_2D\n        if (vpotential1.has_data() or vpotential2.has_data()) {\n            val_ket=val_ket.convert(TensorArgs(-1.0,TT_2D));\n        }\n        if (vpotential1.has_data()) val_result+=multiply(val_ket,vpotential1,0);\n        if (vpotential2.has_data()) val_result+=multiply(val_ket,vpotential2,1);\n\n        // values for eri: this must be done in full rank...\n        if (veri.has_data()) {\n            tensorT val_ket2=val_ket.full_tensor_copy().emul(veri);\n            if (val_result.has_data()) val_ket2+=val_result.full_tensor();\n            // values2coeffs expensive (30%), coeffT() (relatively) cheap (8%)\n            coeff_result=coeffT(values2coeffs(key,val_ket2),this->get_tensor_args());\n\n        } else {\n\n            // convert back to original tensor type\n            val_ket=val_ket.convert(get_tensor_args());\n            MADNESS_ASSERT(val_result.has_data());\n            coeff_result=values2coeffs(key,val_result);\n            coeff_result.reduce_rank(this->get_tensor_args().thresh);\n        }\n\n        return coeff_result;\n\n    }\n\n    /// Permute the dimensions of f according to map, result on this\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::mapdim(const implT& f, const std::vector<long>& map, bool fence) {\n\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        const_cast<implT*>(&f)->flo_unary_op_node_inplace(do_mapdim(map,*this),fence);\n\n    }\n\n    /// mirror the dimensions of f according to mirror, result on this\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::mirror(const implT& f, const std::vector<long>& mirrormap, bool fence) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        const_cast<implT*>(&f)->flo_unary_op_node_inplace(do_mirror(mirrormap,*this),fence);\n    }\n\n    /// map and mirror the translation index and the coefficients, result on this\n\n    /// first map the dimensions, the mirror!\n    /// this = mirror(map(f))\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::map_and_mirror(const implT& f, const std::vector<long>& map,\n    \t\tconst std::vector<long>& mirror, bool fence) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        const_cast<implT*>(&f)->flo_unary_op_node_inplace(do_map_and_mirror(map,mirror,*this),fence);\n    }\n\n\n\n    /// take the average of two functions, similar to: this=0.5*(this+rhs)\n\n    /// works in either basis and also in nonstandard form\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::average(const implT& rhs) {\n\n        rhs.flo_unary_op_node_inplace(do_average(*this),true);\n        this->scale_inplace(0.5,true);\n        flo_unary_op_node_inplace(do_reduce_rank(targs),true);\n    }\n\n    /// change the tensor type of the coefficients in the FunctionNode\n\n    /// @param[in]  targs   target tensor arguments (threshold and full/low rank)\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::change_tensor_type1(const TensorArgs& targs, bool fence) {\n        flo_unary_op_node_inplace(do_change_tensor_type(targs,*this),fence);\n    }\n\n    /// reduce the rank of the coefficients tensors\n\n    /// @param[in]  targs   target tensor arguments (threshold and full/low rank)\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::reduce_rank(const double thresh, bool fence) {\n        flo_unary_op_node_inplace(do_reduce_rank(thresh),fence);\n    }\n\n    /// reduce the rank of the coefficients tensors\n\n    /// @param[in]  targs   target tensor arguments (threshold and full/low rank)\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::chop_at_level(const int n, bool fence) {\n        std::list<keyT> to_be_erased;\n        for (auto it=coeffs.begin(); it!=coeffs.end(); ++it) {\n            const keyT& key=it->first;\n            nodeT& node=it->second;\n            if (key.level()==n) node.set_is_leaf(true);\n            if (key.level()>n) to_be_erased.push_back(key);\n        }\n        for (auto& key : to_be_erased) coeffs.erase(key);\n    }\n\n\n/// compute norm of s and d coefficients for all nodes\n\n    /// @param[in]  targs   target tensor arguments (threshold and full/low rank)\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::compute_snorm_and_dnorm(bool fence) {\n        //const auto& data=FunctionCommonData<T,NDIM>::get(get_k());\n        flo_unary_op_node_inplace(\n                do_compute_snorm_and_dnorm(cdata),fence);\n    }\n\n\n/// Transform sum coefficients at level n to sums+differences at level n-1\n\n/// Given scaling function coefficients s[n][l][i] and s[n][l+1][i]\n/// return the scaling function and wavelet coefficients at the\n/// coarser level.  I.e., decompose Vn using Vn = Vn-1 + Wn-1.\n    /// \\code\n    /// s_i = sum(j) h0_ij*s0_j + h1_ij*s1_j\n    /// d_i = sum(j) g0_ij*s0_j + g1_ij*s1_j\n    //  \\endcode\n    /// Returns a new tensor and has no side effects.  Works for any\n    /// number of dimensions.\n    ///\n    /// No communication involved.\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::tensorT FunctionImpl<T,NDIM>::filter(const tensorT& s) const {\n        tensorT r(cdata.v2k,false);\n        tensorT w(cdata.v2k,false);\n        return fast_transform(s,cdata.hgT,r,w);\n        //return transform(s,cdata.hgT);\n    }\n\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::coeffT FunctionImpl<T,NDIM>::filter(const coeffT& s) const {\n        coeffT result=transform(s,cdata.hgT);\n        return result;\n    }\n\n    ///  Transform sums+differences at level n to sum coefficients at level n+1\n\n    ///  Given scaling function and wavelet coefficients (s and d)\n    ///  returns the scaling function coefficients at the next finer\n    ///  level.  I.e., reconstruct Vn using Vn = Vn-1 + Wn-1.\n    ///  \\code\n    ///  s0 = sum(j) h0_ji*s_j + g0_ji*d_j\n    ///  s1 = sum(j) h1_ji*s_j + g1_ji*d_j\n    ///  \\endcode\n    ///  Returns a new tensor and has no side effects\n    ///\n    ///  If (sonly) ... then ss is only the scaling function coeff (and\n    ///  assume the d are zero).  Works for any number of dimensions.\n    ///\n    /// No communication involved.\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::tensorT FunctionImpl<T,NDIM>::unfilter(const tensorT& s) const {\n        tensorT r(cdata.v2k,false);\n        tensorT w(cdata.v2k,false);\n        return fast_transform(s,cdata.hg,r,w);\n        //return transform(s, cdata.hg);\n    }\n\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::coeffT FunctionImpl<T,NDIM>::unfilter(const coeffT& s) const {\n        return transform(s,cdata.hg);\n    }\n\n    /// downsample the sum coefficients of level n+1 to sum coeffs on level n\n\n    /// specialization of the filter method, will yield only the sum coefficients\n    /// @param[in]  key key of level n\n    /// @param[in]  v   vector of sum coefficients of level n+1\n    /// @param[in]  args    TensorArguments for possible low rank approximations\n    /// @return     sum coefficients on level n in full tensor format\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::tensorT FunctionImpl<T,NDIM>::downsample(const keyT& key, const std::vector< Future<coeffT > >& v) const {\n\n        tensorT result(cdata.vk);\n\n        // the twoscale coefficients: for downsampling use h0/h1; see Alpert Eq (3.34a)\n        const tensorT h[2] = {cdata.h0T, cdata.h1T};\n        tensorT matrices[NDIM];\n\n        // loop over all child nodes, transform and accumulate\n        long i=0;\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n\n            // get the appropriate twoscale coefficients for each dimension\n            for (size_t ii=0; ii<NDIM; ++ii) matrices[ii]=h[kit.key().translation()[ii]%2];\n\n            // transform and accumulate on the result\n            result+=general_transform(v[i].get(),matrices).full_tensor();\n\n        }\n        return result;\n    }\n\n    /// upsample the sum coefficients of level 1 to sum coeffs on level n+1\n\n    /// specialization of the unfilter method, will transform only the sum coefficients\n    /// @param[in]  key     key of level n+1\n    /// @param[in]  coeff   sum coefficients of level n (does NOT belong to key!!)\n    /// @param[in]  args    TensorArguments for possible low rank approximations\n    /// @return     sum     coefficients on level n+1\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::coeffT FunctionImpl<T,NDIM>::upsample(const keyT& key, const coeffT& coeff) const {\n\n        // the twoscale coefficients: for upsampling use h0/h1; see Alpert Eq (3.35a/b)\n        // note there are no difference coefficients; if you want that use unfilter\n        const tensorT h[2] = {cdata.h0, cdata.h1};\n        tensorT matrices[NDIM];\n\n        // get the appropriate twoscale coefficients for each dimension\n        for (size_t ii=0; ii<NDIM; ++ii) matrices[ii]=h[key.translation()[ii]%2];\n\n        // transform and accumulate on the result\n        const coeffT result=general_transform(coeff,matrices);\n        return result;\n    }\n\n\n    /// Projects old function into new basis (only in reconstructed form)\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::project(const implT& old, bool fence) {\n        long kmin = std::min(cdata.k,old.cdata.k);\n        std::vector<Slice> s(NDIM,Slice(0,kmin-1));\n        typename dcT::const_iterator end = old.coeffs.end();\n        for (typename dcT::const_iterator it=old.coeffs.begin(); it!=end; ++it) {\n            const keyT& key = it->first;\n            const nodeT& node = it->second;\n            if (node.has_coeff()) {\n                coeffT c(cdata.vk,targs);\n                c(s) += node.coeff()(s);\n                coeffs.replace(key,nodeT(c,false));\n            }\n            else {\n                coeffs.replace(key,nodeT(coeffT(),true));\n            }\n        }\n        if (fence)\n            world.gop.fence();\n    }\n\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::exists_and_has_children(const keyT& key) const {\n        return coeffs.probe(key) && coeffs.find(key).get()->second.has_children();\n    }\n\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::exists_and_is_leaf(const keyT& key) const {\n        return coeffs.probe(key) && (not coeffs.find(key).get()->second.has_children());\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::broaden_op(const keyT& key, const std::vector< Future <bool> >& v) {\n        for (unsigned int i=0; i<v.size(); ++i) {\n            if (v[i]) {\n                refine_op(true_refine_test(), key);\n                break;\n            }\n        }\n    }\n\n    // For each local node sets value of norm tree, snorm and dnorm to 0.0\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::zero_norm_tree() {\n        typename dcT::iterator end = coeffs.end();\n        for (typename dcT::iterator it=coeffs.begin(); it!=end; ++it) {\n            it->second.set_norm_tree(0.0);\n            it->second.set_snorm(0.0);\n            it->second.set_dnorm(0.0);\n        }\n    }\n\n    // Broaden tree\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::broaden(const array_of_bools<NDIM>& is_periodic, bool fence) {\n        typename dcT::iterator end = coeffs.end();\n        for (typename dcT::iterator it=coeffs.begin(); it!=end; ++it) {\n            const keyT& key = it->first;\n            typename dcT::accessor acc;\n            const auto found = coeffs.find(acc,key);\n            MADNESS_CHECK(found);\n            nodeT& node = acc->second;\n            if (node.has_coeff() &&\n                node.get_norm_tree() != -1.0 &&\n                node.coeff().normf() >= truncate_tol(thresh,key)) {\n\n                node.set_norm_tree(-1.0); // Indicates already broadened or result of broadening/refining\n\n                //int ndir = std::pow(3,NDIM);\n                int ndir = static_cast<int>(std::pow(static_cast<double>(3), static_cast<int>(NDIM)));\n                std::vector< Future <bool> > v = future_vector_factory<bool>(ndir);\n                keyT neigh;\n                int i=0;\n                for (HighDimIndexIterator it(NDIM,3); it; ++it) {\n                    Vector<Translation,NDIM> l(*it);\n                    for (std::size_t d=0; d<NDIM; ++d) {\n                        const int odd = key.translation()[d] & 0x1L; // 1 if odd, 0 if even\n                        l[d] -= 1; // (0,1,2) --> (-1,0,1)\n                        if (l[d] == -1)\n                            l[d] = -1-odd;\n                        else if (l[d] ==  1)\n                            l[d] = 2 - odd;\n                    }\n                    keyT neigh = neighbor(key, keyT(key.level(),l), is_periodic);\n\n                    if (neigh.is_valid()) {\n                        v[i++] = this->task(coeffs.owner(neigh), &implT::exists_and_has_children, neigh);\n                    }\n                    else {\n                        v[i++].set(false);\n                    }\n                }\n                woT::task(world.rank(), &implT::broaden_op, key, v);\n            }\n        }\n        // Reset value of norm tree so that can repeat broadening\n        if (fence) {\n            world.gop.fence();\n            zero_norm_tree();\n            world.gop.fence();\n        }\n    }\n\n    /// sum all the contributions from all scales after applying an operator in mod-NS form\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::trickle_down(bool fence) {\n        set_tree_state(reconstructed);\n        if (world.rank() == coeffs.owner(cdata.key0))\n            woT::task(world.rank(), &implT::trickle_down_op, cdata.key0,coeffT());\n        if (fence) world.gop.fence();\n    }\n\n    /// sum all the contributions from all scales after applying an operator in mod-NS form\n\n    /// cf reconstruct_op\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::trickle_down_op(const keyT& key, const coeffT& s) {\n        // Note that after application of an integral operator not all\n        // siblings may be present so it is necessary to check existence\n        // and if absent insert an empty leaf node.\n        //\n        // If summing the result of an integral operator (i.e., from\n        // non-standard form) there will be significant scaling function\n        // coefficients at all levels and possibly difference coefficients\n        // in leaves, hence the tree may refine as a result.\n        typename dcT::iterator it = coeffs.find(key).get();\n        if (it == coeffs.end()) {\n            coeffs.replace(key,nodeT(coeffT(),false));\n            it = coeffs.find(key).get();\n        }\n        nodeT& node = it->second;\n\n        // The integral operator will correctly connect interior nodes\n        // to children but may leave interior nodes without coefficients\n        // ... but they still need to sum down so just give them zeros\n        if (node.coeff().has_no_data()) node.coeff()=coeffT(cdata.vk,targs);\n\n        //            if (node.has_children() || node.has_coeff()) { // Must allow for inconsistent state from transform, etc.\n        if (node.has_children()) { // Must allow for inconsistent state from transform, etc.\n            coeffT d = node.coeff();\n            if (key.level() > 0) d += s; // -- note accumulate for NS summation\n            node.clear_coeff();\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                const keyT& child = kit.key();\n                coeffT ss= upsample(child,d);\n                ss.reduce_rank(thresh);\n                PROFILE_BLOCK(recon_send);\n                woT::task(coeffs.owner(child), &implT::trickle_down_op, child, ss);\n            }\n        }\n        else {\n            node.coeff()+=s;\n            node.coeff().reduce_rank(thresh);\n        }\n    }\n\n    /// change the tree state of this function, might or might not respect fence!\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::change_tree_state(const TreeState finalstate, bool fence) {\n\n        TreeState current_state=get_tree_state();\n        if (current_state==finalstate) return;\n\n        // try direct conversion if possible, otherwise change to reconstructed state,\n        // and then convert to final state\n\n        // try direct conversion\n        if (finalstate==reconstructed) {        // this MUST cover all cases\n            if (current_state==compressed) reconstruct(fence);\n            else if (current_state==nonstandard) reconstruct(fence);\n            else if (current_state==nonstandard_after_apply) reconstruct(fence);\n            else if (current_state==nonstandard_with_leaves) {\n                remove_internal_coefficients(fence);\n                set_tree_state(reconstructed);\n            }\n            else if (current_state==redundant) {\n                remove_internal_coefficients(fence);\n                set_tree_state(reconstructed);\n            }\n            else if (current_state==redundant_after_merge) {\n                sum_down(fence);\n                set_tree_state(reconstructed);\n            }\n            else if (current_state==redundant_after_merge) sum_down(fence);\n            else MADNESS_EXCEPTION(\"unknown/unsupported current tree state\",1);\n            set_tree_state(reconstructed);\n        } else if (finalstate==compressed) {        // cases that are not covered will be done in two steps\n            if (current_state==reconstructed) compress(compressed,fence);\n            if (current_state==nonstandard) standard(fence);\n            if (current_state==nonstandard_with_leaves) standard(fence);\n        } else if (finalstate==nonstandard) {        // cases that are not covered will be done in two steps\n            if (current_state==reconstructed) compress(nonstandard,fence);\n            if (current_state==nonstandard_with_leaves) {\n                remove_leaf_coefficients(fence);\n                set_tree_state(nonstandard);\n            }\n        } else if (finalstate==nonstandard_with_leaves) {        // cases that are not covered will be done in two steps\n            if (current_state==reconstructed) compress(nonstandard_with_leaves,fence);\n        } else if (finalstate==redundant) {        // cases that are not covered will be done in two steps\n            if (current_state==reconstructed) make_redundant(fence);\n        } else {\n            MADNESS_EXCEPTION(\"unknown/unsupported final tree state\",1);\n        }\n        if (fence && VERIFY_TREE) verify_tree(); // Must be after in case nonstandard\n\n        // direct conversion worked, we're good\n        if (finalstate==get_tree_state()) return;\n\n\n        // go through reconstructed state -- requires fence!\n        change_tree_state(reconstructed,true);\n        print(\"could not respect  no-fence  parameter in change_tree_state\");\n        change_tree_state(finalstate,fence);\n\n    }\n\n\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::reconstruct(bool fence) {\n\n        if (is_reconstructed()) return;\n\n        if (is_redundant() or is_nonstandard_with_leaves()) {\n            set_tree_state(reconstructed);\n    \t\tthis->remove_internal_coefficients(fence);\n    \t} else if (is_compressed() or tree_state==nonstandard_after_apply) {\n            // Must set true here so that successive calls without fence do the right thing\n            set_tree_state(reconstructed);\n            if (world.rank() == coeffs.owner(cdata.key0))\n                woT::task(world.rank(), &implT::reconstruct_op, cdata.key0,coeffT(), true);\n        } else if (is_nonstandard()) {\n            // Must set true here so that successive calls without fence do the right thing\n            set_tree_state(reconstructed);\n            if (world.rank() == coeffs.owner(cdata.key0))\n                woT::task(world.rank(), &implT::reconstruct_op, cdata.key0,coeffT(), false);\n    \t} else {\n            MADNESS_EXCEPTION(\"cannot reconstruct this tree\",1);\n        }\n        if (fence) world.gop.fence();\n\n    }\n\n    /// compress the wave function\n\n    /// after application there will be sum coefficients at the root level,\n    /// and difference coefficients at all other levels; furthermore:\n    /// @param[in] nonstandard\tkeep sum coeffs at all other levels, except leaves\n    /// @param[in] keepleaves\tkeep sum coeffs (but no diff coeffs) at leaves\n    /// @param[in] redundant    keep only sum coeffs at all levels, discard difference coeffs\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::compress(const TreeState newstate, bool fence) {\n        MADNESS_CHECK_THROW(is_reconstructed(),\"impl::compress wants a reconstructe tree\");\n        // Must set true here so that successive calls without fence do the right thing\n        set_tree_state(newstate);\n        bool keepleaves1=(tree_state==nonstandard_with_leaves) or (tree_state==redundant);\n        bool nonstandard1=(tree_state==nonstandard) or (tree_state==nonstandard_with_leaves);\n        bool redundant1=(tree_state==redundant);\n\n        if (world.rank() == coeffs.owner(cdata.key0)) {\n\n            compress_spawn(cdata.key0, nonstandard1, keepleaves1, redundant1);\n        }\n        if (fence)\n            world.gop.fence();\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::remove_internal_coefficients(const bool fence) {\n        flo_unary_op_node_inplace(remove_internal_coeffs(),fence);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::remove_leaf_coefficients(const bool fence) {\n        flo_unary_op_node_inplace(remove_leaf_coeffs(),fence);\n    }\n\n    /// convert this to redundant, i.e. have sum coefficients on all levels\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::make_redundant(const bool fence) {\n\n        // fast return if possible\n        if (is_redundant()) return;\n        MADNESS_CHECK_THROW(is_reconstructed(),\"impl::make_redundant() wants a reconstructed tree\");\n        compress(redundant,fence);\n    }\n\n    /// convert this from redundant to standard reconstructed form\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::undo_redundant(const bool fence) {\n        MADNESS_CHECK_THROW(is_redundant(),\"impl::undo_redundant() wants a redundant tree\");\n        set_tree_state(reconstructed);\n        flo_unary_op_node_inplace(remove_internal_coeffs(),fence);\n    }\n\n\n    /// compute for each FunctionNode the norm of the function inside that node\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::norm_tree(bool fence) {\n        if (world.rank() == coeffs.owner(cdata.key0))\n            norm_tree_spawn(cdata.key0);\n        if (fence)\n            world.gop.fence();\n    }\n\n    template <typename T, std::size_t NDIM>\n    double FunctionImpl<T,NDIM>::norm_tree_op(const keyT& key, const std::vector< Future<double> >& v) {\n        //PROFILE_MEMBER_FUNC(FunctionImpl);\n        double sum = 0.0;\n        int i=0;\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n            double value = v[i].get();\n            sum += value*value;\n        }\n        sum = sqrt(sum);\n        coeffs.task(key, &nodeT::set_norm_tree, sum); // why a task? because send is deprecated to keep comm thread free\n        //if (key.level() == 0) std::cout << \"NORM_TREE_TOP \" << sum << \"\\n\";\n        return sum;\n    }\n\n    template <typename T, std::size_t NDIM>\n    Future<double> FunctionImpl<T,NDIM>::norm_tree_spawn(const keyT& key) {\n        nodeT& node = coeffs.find(key).get()->second;\n        if (node.has_children()) {\n            std::vector< Future<double> > v = future_vector_factory<double>(1<<NDIM);\n            int i=0;\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n                v[i] = woT::task(coeffs.owner(kit.key()), &implT::norm_tree_spawn, kit.key());\n            }\n            return woT::task(world.rank(),&implT::norm_tree_op, key, v);\n        }\n        else {\n            //                return Future<double>(node.coeff().normf());\n            const double norm=node.coeff().normf();\n            // invoked locally anyways\n            node.set_norm_tree(norm);\n            return Future<double>(norm);\n        }\n    }\n\n    /// truncate using a tree in reconstructed form\n\n    /// must be invoked where key is local\n    template <typename T, std::size_t NDIM>\n    Future<typename FunctionImpl<T,NDIM>::coeffT> FunctionImpl<T,NDIM>::truncate_reconstructed_spawn(const keyT& key, const double tol) {\n        MADNESS_ASSERT(coeffs.probe(key));\n        nodeT& node = coeffs.find(key).get()->second;\n\n        // if this is a leaf node just return the sum coefficients\n        if (not node.has_children()) return Future<coeffT>(node.coeff());\n\n        // if this is an internal node, wait for all the children's sum coefficients\n        // and use them to determine if the children can be removed\n        std::vector<Future<coeffT> > v = future_vector_factory<coeffT>(1<<NDIM);\n        int i=0;\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n            v[i] = woT::task(coeffs.owner(kit.key()), &implT::truncate_reconstructed_spawn, kit.key(),tol,TaskAttributes::hipri());\n        }\n\n        // will return (possibly empty) sum coefficients\n        return woT::task(world.rank(),&implT::truncate_reconstructed_op,key,v,tol,TaskAttributes::hipri());\n\n    }\n\n    /// given the sum coefficients of all children, truncate or not\n\n    /// @return     new sum coefficients (empty if internal, not empty, if new leaf); might delete its children\n    template <typename T, std::size_t NDIM>\n    typename FunctionImpl<T,NDIM>::coeffT FunctionImpl<T,NDIM>::truncate_reconstructed_op(const keyT& key, const std::vector< Future<coeffT > >& v, const double tol) {\n\n        MADNESS_ASSERT(coeffs.probe(key));\n\n        // the sum coefficients might be empty, which means they come from an internal node\n        // and we must not truncate; so just return empty coeffs again\n        for (size_t i=0; i<v.size(); ++i) if (v[i].get().has_no_data()) return coeffT();\n\n        // do not truncate below level 1\n        if (key.level()<2) return coeffT();\n\n        // compute the wavelet coefficients from the child nodes\n        typename dcT::accessor acc;\n        const auto found = coeffs.find(acc, key);\n        MADNESS_CHECK(found);\n        int i=0;\n        tensorT d(cdata.v2k);\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n            //                d(child_patch(kit.key())) += v[i].get();\n            d(child_patch(kit.key())) += v[i].get().full_tensor();\n        }\n\n        d = filter(d);\n        tensorT s=copy(d(cdata.s0));\n        d(cdata.s0) = 0.0;\n        const double error=d.normf();\n\n        nodeT& node = coeffs.find(key).get()->second;\n\n        if (error < truncate_tol(tol,key)) {\n            node.set_has_children(false);\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                coeffs.erase(kit.key());\n            }\n            // \"replace\" children with new sum coefficients\n            coeffT ss=coeffT(s,targs);\n            acc->second.set_coeff(ss);\n            return ss;\n        } else {\n            return coeffT();\n        }\n    }\n\n    /// calculate the wavelet coefficients using the sum coefficients of all child nodes\n\n    /// @param[in] key \tthis's key\n    /// @param[in] v \tsum coefficients of the child nodes\n    /// @param[in] nonstandard  keep the sum coefficients with the wavelet coefficients\n    /// @param[in] redundant    keep only the sum coefficients, discard the wavelet coefficients\n    /// @return \t\tthe sum coefficients\n    template <typename T, std::size_t NDIM>\n    std::pair<typename FunctionImpl<T,NDIM>::coeffT,double> FunctionImpl<T,NDIM>::compress_op(const keyT& key,\n    \t\tconst std::vector< Future<std::pair<coeffT,double> > >& v, bool nonstandard1) {\n        //PROFILE_MEMBER_FUNC(FunctionImpl);\n\n        double cpu0=cpu_time();\n        // Copy child scaling coeffs into contiguous block\n        tensorT d(cdata.v2k);\n        //            coeffT d(cdata.v2k,targs);\n        int i=0;\n        double norm_tree2=0.0;\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n            //                d(child_patch(kit.key())) += v[i].get();\n            d(child_patch(kit.key())) += v[i].get().first.full_tensor();\n            norm_tree2+=v[i].get().second*v[i].get().second;\n        }\n\n        d = filter(d);\n        double cpu1=cpu_time();\n        timer_filter.accumulate(cpu1-cpu0);\n        cpu0=cpu1;\n\n        typename dcT::accessor acc;\n        const auto found = coeffs.find(acc, key);\n        MADNESS_CHECK(found);\n        MADNESS_CHECK_THROW(!acc->second.has_coeff(),\"compress_op: existing coeffs where there should be none\");\n\n        // tighter thresh for internal nodes\n        TensorArgs targs2=targs;\n        targs2.thresh*=0.1;\n\n        // need the deep copy for contiguity\n        coeffT ss=coeffT(copy(d(cdata.s0)));\n        double snorm=ss.normf();\n\n        if (key.level()> 0 && !nonstandard1) d(cdata.s0) = 0.0;\n\n        coeffT dd=coeffT(d,targs2);\n        double dnorm=dd.normf();\n        double norm_tree=sqrt(norm_tree2);\n\n        acc->second.set_snorm(snorm);\n        acc->second.set_dnorm(dnorm);\n        acc->second.set_norm_tree(norm_tree);\n\n        acc->second.set_coeff(dd);\n        cpu1=cpu_time();\n        timer_compress_svd.accumulate(cpu1-cpu0);\n\n        // return sum coefficients\n        return std::make_pair(ss,snorm);\n    }\n\n    /// similar to compress_op, but insert only the sum coefficients in the tree\n\n    /// also sets snorm, dnorm and norm_tree for all nodes\n    /// @param[in] key  this's key\n    /// @param[in] v    sum coefficients of the child nodes\n    /// @return         the sum coefficients\n    template <typename T, std::size_t NDIM>\n    std::pair<typename FunctionImpl<T,NDIM>::coeffT,double>\n            FunctionImpl<T,NDIM>::make_redundant_op(const keyT& key, const std::vector< Future<std::pair<coeffT,double> > >& v) {\n\n        tensorT d(cdata.v2k);\n        int i=0;\n        double norm_tree2=0.0;\n        for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n            d(child_patch(kit.key())) += v[i].get().first.full_tensor();\n            norm_tree2+=v[i].get().second*v[i].get().second;\n        }\n        d = filter(d);\n        double norm_tree=sqrt(norm_tree2);\n\n        // tighter thresh for internal nodes\n        TensorArgs targs2=targs;\n        targs2.thresh*=0.1;\n\n        // need the deep copy for contiguity\n        coeffT s=coeffT(copy(d(cdata.s0)),targs2);\n        d(cdata.s0)=0.0;\n        double dnorm=d.normf();\n        double snorm=s.normf();\n\n        typename dcT::accessor acc;\n        const auto found = coeffs.find(acc, key);\n        MADNESS_CHECK(found);\n\n        acc->second.set_coeff(s);\n        acc->second.set_dnorm(dnorm);\n        acc->second.set_snorm(snorm);\n        acc->second.set_norm_tree(norm_tree);\n\n        // return sum coefficients\n        return std::make_pair(s,norm_tree);\n    }\n\n    /// Changes non-standard compressed form to standard compressed form\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::standard(bool fence) {\n\n        if (is_compressed()) return;\n        set_tree_state(compressed);\n        flo_unary_op_node_inplace(do_standard(this),fence);\n//        make_nonstandard = false;\n    }\n\n\n    /// after apply we need to do some cleanup;\n\n    /// forces fence\n    template <typename T, std::size_t NDIM>\n    double FunctionImpl<T,NDIM>::finalize_apply() {\n        bool print_timings=false;\n        bool printme=(world.rank()==0 and print_timings);\n        TensorArgs tight_args(targs);\n        tight_args.thresh*=0.01;\n        double begin=wall_time();\n        double begin1=wall_time();\n        flo_unary_op_node_inplace(do_consolidate_buffer(tight_args),true);\n        double end1=wall_time();\n        if (printme) printf(\"time in consolidate_buffer    %8.4f\\n\",end1-begin1);\n\n\n        // reduce the rank of the final nodes, leave full tensors unchanged\n        //            flo_unary_op_node_inplace(do_reduce_rank(tight_args.thresh),true);\n        begin1=wall_time();\n        flo_unary_op_node_inplace(do_reduce_rank(targs),true);\n        end1=wall_time();\n        if (printme) printf(\"time in do_reduce_rank        %8.4f\\n\",end1-begin1);\n\n        // change TT_FULL to low rank\n        begin1=wall_time();\n        flo_unary_op_node_inplace(do_change_tensor_type(targs,*this),true);\n        end1=wall_time();\n        if (printme) printf(\"time in do_change_tensor_type %8.4f\\n\",end1-begin1);\n\n        // truncate leaf nodes to avoid excessive tree refinement\n        begin1=wall_time();\n        flo_unary_op_node_inplace(do_truncate_NS_leafs(this),true);\n        end1=wall_time();\n        if (printme) printf(\"time in do_truncate_NS_leafs  %8.4f\\n\",end1-begin1);\n\n        double end=wall_time();\n        double elapsed=end-begin;\n        set_tree_state(nonstandard_after_apply);\n        world.gop.fence();\n        return elapsed;\n    }\n\n\n    /// after summing up we need to do some cleanup;\n\n    /// forces fence\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::finalize_sum() {\n        world.gop.fence();\n        flo_unary_op_node_inplace(do_consolidate_buffer(get_tensor_args()), true);\n        sum_down(true);\n        set_tree_state(reconstructed);\n    }\n\n    /// Returns the square of the local norm ... no comms\n    template <typename T, std::size_t NDIM>\n    double FunctionImpl<T,NDIM>::norm2sq_local() const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        typedef Range<typename dcT::const_iterator> rangeT;\n        return world.taskq.reduce<double,rangeT,do_norm2sq_local>(rangeT(coeffs.begin(),coeffs.end()),\n                                                                  do_norm2sq_local());\n    }\n\n\n\n\n    /// Returns the maximum local depth of the tree ... no communications.\n    template <typename T, std::size_t NDIM>\n    std::size_t FunctionImpl<T,NDIM>::max_local_depth() const {\n        std::size_t maxdepth = 0;\n        typename dcT::const_iterator end = coeffs.end();\n        for (typename dcT::const_iterator it=coeffs.begin(); it!=end; ++it) {\n            std::size_t N = (std::size_t) it->first.level();\n            if (N> maxdepth)\n                maxdepth = N;\n        }\n        return maxdepth;\n    }\n\n\n    /// Returns the maximum depth of the tree ... collective ... global sum/broadcast\n    template <typename T, std::size_t NDIM>\n    std::size_t FunctionImpl<T,NDIM>::max_depth() const {\n        std::size_t maxdepth  = max_local_depth();\n        world.gop.max(maxdepth);\n        return maxdepth;\n    }\n\n    /// Returns the max number of nodes on a processor\n    template <typename T, std::size_t NDIM>\n    std::size_t FunctionImpl<T,NDIM>::max_nodes() const {\n        std::size_t maxsize = 0;\n        maxsize = coeffs.size();\n        world.gop.max(maxsize);\n        return maxsize;\n    }\n\n    /// Returns the min number of nodes on a processor\n    template <typename T, std::size_t NDIM>\n    std::size_t FunctionImpl<T,NDIM>::min_nodes() const {\n        std::size_t minsize = 0;\n        minsize = coeffs.size();\n        world.gop.min(minsize);\n        return minsize;\n    }\n\n    /// Returns the size of the tree structure of the function ... collective global sum\n    template <typename T, std::size_t NDIM>\n    std::size_t FunctionImpl<T,NDIM>::tree_size() const {\n        std::size_t sum = 0;\n        sum = coeffs.size();\n        world.gop.sum(sum);\n        return sum;\n    }\n\n    /// Returns the number of coefficients in the function for each rank\n    template <typename T, std::size_t NDIM>\n    std::size_t FunctionImpl<T,NDIM>::size_local() const {\n        std::size_t sum = 0;\n        for (const auto& [key,node] : coeffs) {\n            if (node.has_coeff()) sum+=node.size();\n        }\n        return sum;\n    }\n\n    /// Returns the number of coefficients in the function ... collective global sum\n    template <typename T, std::size_t NDIM>\n    std::size_t FunctionImpl<T,NDIM>::size() const {\n        std::size_t sum = size_local();\n        world.gop.sum(sum);\n        return sum;\n    }\n\n    /// Returns the number of coefficients in the function ... collective global sum\n    template <typename T, std::size_t NDIM>\n    std::size_t FunctionImpl<T,NDIM>::real_size() const {\n        std::size_t sum = coeffs.size() * (sizeof(keyT) + sizeof(nodeT));\n        typename dcT::const_iterator end = coeffs.end();\n        for (typename dcT::const_iterator it=coeffs.begin(); it!=end; ++it) {\n            const nodeT& node = it->second;\n            if (node.has_coeff()) sum+=node.coeff().real_size();\n        }\n        world.gop.sum(sum);\n        return sum;\n    }\n\n    /// Returns the number of coefficients in the function on this MPI rank\n    template <typename T, std::size_t NDIM>\n    std::size_t FunctionImpl<T,NDIM>::nCoeff_local() const {\n        std::size_t sum =0;\n        for (auto& [key,node] : coeffs) {\n            if (node.has_coeff()) sum+=node.coeff().nCoeff();\n        }\n        return sum;\n    }\n\n    /// Returns the number of coefficients in the function ... collective global sum\n    template <typename T, std::size_t NDIM>\n    std::size_t FunctionImpl<T,NDIM>::nCoeff() const {\n        std::size_t sum = nCoeff_local();\n        world.gop.sum(sum);\n        return sum;\n    }\n\n\n    /// print tree size and size\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::print_size(const std::string name) const {\n        const size_t tsize=this->tree_size();\n//        const size_t size=this->size();\n        const size_t ncoeff=this->nCoeff();\n        const double wall=wall_time();\n        const double d=sizeof(T);\n        const double fac=1024*1024*1024;\n\n        double norm=0.0;\n        {\n            double local = norm2sq_local();\n            this->world.gop.sum(local);\n            this->world.gop.fence();\n            norm=sqrt(local);\n        }\n\n        if (this->world.rank()==0) {\n\n            constexpr std::size_t bufsize=128;\n            char buf[bufsize];\n            snprintf(buf, bufsize, \"%40s at time %.1fs: norm/tree/#coeff/size: %7.5f %zu, %6.3f m, %6.3f GByte\",\n                   (name.c_str()), wall, norm, tsize,double(ncoeff)*1.e-6,double(ncoeff)/fac*d);\n            print(std::string(buf));\n        }\n    }\n\n    /// print the number of configurations per node\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::print_stats() const {\n        if (this->targs.tt==TT_FULL) return;\n        int dim=NDIM/2;\n        int k0=k;\n        if (is_compressed()) k0=2*k;\n        Tensor<long> n(int(std::pow(double(k0),double(dim))+1));\n        long n_full=0;\n        long n_large=0;\n\n        if (world.rank()==0) print(\"n.size(),k0,dim\",n.size(),k0,dim);\n        typename dcT::const_iterator end = coeffs.end();\n        for (typename dcT::const_iterator it=coeffs.begin(); it!=end; ++it) {\n            const nodeT& node = it->second;\n            if (node.has_coeff()) {\n                if (node.coeff().rank()>long(n.size())) {\n                    ++n_large;\n                } else if (node.coeff().rank()==-1) {\n                    ++n_full;\n                } else if (node.coeff().rank()<0) {\n                    print(\"small rank\",node.coeff().rank());\n                } else {\n                    n[node.coeff().rank()]++;\n                }\n            }\n        }\n\n        world.gop.sum(n.ptr(), n.size());\n\n        if (world.rank()==0) {\n            print(\"configurations     number of nodes\");\n            print(\"        full rank    \",n_full);\n            for (unsigned int i=0; i<n.size(); i++) {\n                print(\"           \",i,\"    \",n[i]);\n            }\n            print(\"       large rank    \",n_large);\n\n            // repeat for logarithmic scale: <3, <10, <30, <100, ..\n            Tensor<long> nlog(6);\n            nlog=0;\n            for (unsigned int i=0; i<std::min(3l,n.size()); i++) nlog[0]+=n[i];\n            for (unsigned int i=3; i<std::min(10l,n.size()); i++) nlog[1]+=n[i];\n            for (unsigned int i=10; i<std::min(30l,n.size()); i++) nlog[2]+=n[i];\n            for (unsigned int i=30; i<std::min(100l,n.size()); i++) nlog[3]+=n[i];\n            for (unsigned int i=100; i<std::min(300l,n.size()); i++) nlog[4]+=n[i];\n            for (unsigned int i=300; i<std::min(1000l,n.size()); i++) nlog[5]+=n[i];\n\n            std::vector<std::string> slog={\"3\",\"10\",\"30\",\"100\",\"300\",\"1000\"};\n            for (unsigned int i=0; i<nlog.size(); i++) {\n                print(\"          < \",slog[i],\"    \",nlog[i]);\n            }\n            print(\"       large rank    \",n_large);\n\n        }\n    }\n\n    template <typename T, std::size_t NDIM>\n    T FunctionImpl<T,NDIM>::eval_cube(Level n, coordT& x, const tensorT& c) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        const int k = cdata.k;\n        double px[NDIM][MAXK];\n        T sum = T(0.0);\n\n        for (std::size_t i=0; i<NDIM; ++i) legendre_scaling_functions(x[i],k,px[i]);\n\n        if (NDIM == 1) {\n            for (int p=0; p<k; ++p)\n                sum += c(p)*px[0][p];\n        }\n        else if (NDIM == 2) {\n            for (int p=0; p<k; ++p)\n                for (int q=0; q<k; ++q)\n                    sum += c(p,q)*px[0][p]*px[1][q];\n        }\n        else if (NDIM == 3) {\n            for (int p=0; p<k; ++p)\n                for (int q=0; q<k; ++q)\n                    for (int r=0; r<k; ++r)\n                        sum += c(p,q,r)*px[0][p]*px[1][q]*px[2][r];\n        }\n        else if (NDIM == 4) {\n            for (int p=0; p<k; ++p)\n                for (int q=0; q<k; ++q)\n                    for (int r=0; r<k; ++r)\n                        for (int s=0; s<k; ++s)\n                            sum += c(p,q,r,s)*px[0][p]*px[1][q]*px[2][r]*px[3][s];\n        }\n        else if (NDIM == 5) {\n            for (int p=0; p<k; ++p)\n                for (int q=0; q<k; ++q)\n                    for (int r=0; r<k; ++r)\n                        for (int s=0; s<k; ++s)\n                            for (int t=0; t<k; ++t)\n                                sum += c(p,q,r,s,t)*px[0][p]*px[1][q]*px[2][r]*px[3][s]*px[4][t];\n        }\n        else if (NDIM == 6) {\n            for (int p=0; p<k; ++p)\n                for (int q=0; q<k; ++q)\n                    for (int r=0; r<k; ++r)\n                        for (int s=0; s<k; ++s)\n                            for (int t=0; t<k; ++t)\n                                for (int u=0; u<k; ++u)\n                                    sum += c(p,q,r,s,t,u)*px[0][p]*px[1][q]*px[2][r]*px[3][s]*px[4][t]*px[5][u];\n        }\n        else {\n            MADNESS_EXCEPTION(\"FunctionImpl:eval_cube:NDIM?\",NDIM);\n        }\n        return sum*pow(2.0,0.5*NDIM*n)/sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::reconstruct_op(const keyT& key, const coeffT& s, const bool accumulate_NS) {\n        //PROFILE_MEMBER_FUNC(FunctionImpl);\n        // Note that after application of an integral operator not all\n        // siblings may be present so it is necessary to check existence\n        // and if absent insert an empty leaf node.\n        //\n        // If summing the result of an integral operator (i.e., from\n        // non-standard form) there will be significant scaling function\n        // coefficients at all levels and possibly difference coefficients\n        // in leaves, hence the tree may refine as a result.\n        typename dcT::iterator it = coeffs.find(key).get();\n        if (it == coeffs.end()) {\n            coeffs.replace(key,nodeT(coeffT(),false));\n            it = coeffs.find(key).get();\n        }\n        nodeT& node = it->second;\n\n        // The integral operator will correctly connect interior nodes\n        // to children but may leave interior nodes without coefficients\n        // ... but they still need to sum down so just give them zeros\n        if (node.has_children() && !node.has_coeff()) {\n            node.set_coeff(coeffT(cdata.v2k,targs));\n        }\n\n        if (node.has_children() || node.has_coeff()) { // Must allow for inconsistent state from transform, etc.\n            coeffT d = node.coeff();\n            if (!d.has_data()) d = coeffT(cdata.v2k,targs);\n            if (accumulate_NS and (key.level() > 0)) d(cdata.s0) += s; // -- note accumulate for NS summation\n            if (d.dim(0)==2*get_k()) {              // d might be pre-truncated if it's a leaf\n                d = unfilter(d);\n                node.clear_coeff();\n                node.set_has_children(true);\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    const keyT& child = kit.key();\n                    coeffT ss = copy(d(child_patch(child)));\n                    ss.reduce_rank(thresh);\n                    //PROFILE_BLOCK(recon_send); // Too fine grain for routine profiling\n                    woT::task(coeffs.owner(child), &implT::reconstruct_op, child, ss, accumulate_NS);\n                }\n            } else {\n                MADNESS_ASSERT(node.is_leaf());\n                //                node.coeff()+=s;\n                node.coeff().reduce_rank(targs.thresh);\n            }\n        }\n        else {\n            coeffT ss=s;\n            if (s.has_no_data()) ss=coeffT(cdata.vk,targs);\n            if (key.level()) node.set_coeff(copy(ss));\n            else node.set_coeff(ss);\n        }\n    }\n\n    template <typename T, std::size_t NDIM>\n    Tensor<T> fcube(const Key<NDIM>& key, T (*f)(const Vector<double,NDIM>&), const Tensor<double>& qx) {\n        //      fcube(key,typename FunctionFactory<T,NDIM>::FunctorInterfaceWrapper(f) , qx, fval);\n        std::vector<long> npt(NDIM,qx.dim(0));\n        Tensor<T> fval(npt);\n        fcube(key,ElementaryInterface<T,NDIM>(f) , qx, fval);\n        return fval;\n    }\n\n    template <typename T, std::size_t NDIM>\n    Tensor<T> fcube(const Key<NDIM>& key, const FunctionFunctorInterface<T,NDIM>& f, const Tensor<double>& qx) {\n        //      fcube(key,typename FunctionFactory<T,NDIM>::FunctorInterfaceWrapper(f) , qx, fval);\n        std::vector<long> npt(NDIM,qx.dim(0));\n        Tensor<T> fval(npt);\n        fcube(key, f, qx, fval);\n        return fval;\n    }\n\n    template <typename T, std::size_t NDIM>\n    //    void FunctionImpl<T,NDIM>::fcube(const keyT& key, const FunctionFunctorInterface<T,NDIM>& f, const Tensor<double>& qx, tensorT& fval) const {\n    void fcube(const Key<NDIM>& key, const FunctionFunctorInterface<T,NDIM>& f, const Tensor<double>& qx, Tensor<T>& fval) {\n        //~ template <typename T, std::size_t NDIM> template< typename FF>\n        //~ void FunctionImpl<T,NDIM>::fcube(const keyT& key, const FF& f, const Tensor<double>& qx, tensorT& fval) const {\n        typedef Vector<double,NDIM> coordT;\n        //PROFILE_MEMBER_FUNC(FunctionImpl);\n        const Vector<Translation,NDIM>& l = key.translation();\n        const Level n = key.level();\n        const double h = std::pow(0.5,double(n));\n        coordT c; // will hold the point in user coordinates\n        const int npt = qx.dim(0);\n\n        const Tensor<double>& cell_width = FunctionDefaults<NDIM>::get_cell_width();\n        const Tensor<double>& cell = FunctionDefaults<NDIM>::get_cell();\n\n        // Do pre-screening of the FunctionFunctorInterface, f, before calculating f(r) at quadrature points\n        coordT c1, c2;\n        for (std::size_t i = 0; i < NDIM; i++) {\n          c1[i] = cell(i,0) + h*cell_width[i]*(l[i] + qx((long)0));\n          c2[i] = cell(i,0) + h*cell_width[i]*(l[i] + qx(npt-1));\n        }\n        if (f.screened(c1, c2)) {\n            fval(___) = 0.0;\n            return;\n        }\n\n        Tensor<double> vqx;\n        bool vectorized = f.supports_vectorized();\n        if (vectorized) {\n            T* fvptr = fval.ptr();\n            if (NDIM == 1) {\n                double* x1 = new double[npt];\n                int idx = 0;\n                for (int i=0; i<npt; ++i, ++idx) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    x1[idx] = c[0];\n                }\n                Vector<double*,1> xvals {x1};\n                f(xvals, fvptr, npt);\n                delete [] x1;\n            }\n            else if (NDIM == 2) {\n                double* x1 = new double[npt*npt];\n                double* x2 = new double[npt*npt];\n                int idx = 0;\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (int j=0; j<npt; ++j, ++idx) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        x1[idx] = c[0];\n                        x2[idx] = c[1];\n                    }\n                }\n                Vector<double*,2> xvals {x1, x2};\n                f(xvals, fvptr, npt*npt);\n                delete [] x1;\n                delete [] x2;\n            }\n            else if (NDIM == 3) {\n                double* x1 = new double[npt*npt*npt];\n                double* x2 = new double[npt*npt*npt];\n                double* x3 = new double[npt*npt*npt];\n                int idx = 0;\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (int j=0; j<npt; ++j) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        for (int k=0; k<npt; ++k, ++idx) {\n                            c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                            x1[idx] = c[0];\n                            x2[idx] = c[1];\n                            x3[idx] = c[2];\n                        }\n                    }\n                }\n                Vector<double*,3> xvals {x1, x2, x3};\n                f(xvals, fvptr, npt*npt*npt);\n                delete [] x1;\n                delete [] x2;\n                delete [] x3;\n            }\n            else if (NDIM == 4) {\n                double* x1 = new double[npt*npt*npt*npt];\n                double* x2 = new double[npt*npt*npt*npt];\n                double* x3 = new double[npt*npt*npt*npt];\n                double* x4 = new double[npt*npt*npt*npt];\n                int idx = 0;\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (int j=0; j<npt; ++j) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        for (int k=0; k<npt; ++k) {\n                            c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                            for (int m=0; m<npt; ++m, ++idx) {\n                                c[3] = cell(3,0) + h*cell_width[3]*(l[3] + qx(m)); // xx\n                                x1[idx] = c[0];\n                                x2[idx] = c[1];\n                                x3[idx] = c[2];\n                                x4[idx] = c[3];\n                            }\n                        }\n                    }\n                }\n                Vector<double*,4> xvals {x1, x2, x3, x4};\n                f(xvals, fvptr, npt*npt*npt*npt);\n                delete [] x1;\n                delete [] x2;\n                delete [] x3;\n                delete [] x4;\n            }\n            else if (NDIM == 5) {\n                double* x1 = new double[npt*npt*npt*npt*npt];\n                double* x2 = new double[npt*npt*npt*npt*npt];\n                double* x3 = new double[npt*npt*npt*npt*npt];\n                double* x4 = new double[npt*npt*npt*npt*npt];\n                double* x5 = new double[npt*npt*npt*npt*npt];\n                int idx = 0;\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (int j=0; j<npt; ++j) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        for (int k=0; k<npt; ++k) {\n                            c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                            for (int m=0; m<npt; ++m) {\n                                c[3] = cell(3,0) + h*cell_width[3]*(l[3] + qx(m)); // xx\n                                for (int n=0; n<npt; ++n, ++idx) {\n                                    c[4] = cell(4,0) + h*cell_width[4]*(l[4] + qx(n)); // yy\n                                    x1[idx] = c[0];\n                                    x2[idx] = c[1];\n                                    x3[idx] = c[2];\n                                    x4[idx] = c[3];\n                                    x5[idx] = c[4];\n                                }\n                            }\n                        }\n                    }\n                }\n                Vector<double*,5> xvals {x1, x2, x3, x4, x5};\n                f(xvals, fvptr, npt*npt*npt*npt*npt);\n                delete [] x1;\n                delete [] x2;\n                delete [] x3;\n                delete [] x4;\n                delete [] x5;\n            }\n            else if (NDIM == 6) {\n                double* x1 = new double[npt*npt*npt*npt*npt*npt];\n                double* x2 = new double[npt*npt*npt*npt*npt*npt];\n                double* x3 = new double[npt*npt*npt*npt*npt*npt];\n                double* x4 = new double[npt*npt*npt*npt*npt*npt];\n                double* x5 = new double[npt*npt*npt*npt*npt*npt];\n                double* x6 = new double[npt*npt*npt*npt*npt*npt];\n                int idx = 0;\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (int j=0; j<npt; ++j) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        for (int k=0; k<npt; ++k) {\n                            c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                            for (int m=0; m<npt; ++m) {\n                                c[3] = cell(3,0) + h*cell_width[3]*(l[3] + qx(m)); // xx\n                                for (int n=0; n<npt; ++n) {\n                                    c[4] = cell(4,0) + h*cell_width[4]*(l[4] + qx(n)); // yy\n                                    for (int p=0; p<npt; ++p, ++idx) {\n                                        c[5] = cell(5,0) + h*cell_width[5]*(l[5] + qx(p)); // zz\n                                        x1[idx] = c[0];\n                                        x2[idx] = c[1];\n                                        x3[idx] = c[2];\n                                        x4[idx] = c[3];\n                                        x5[idx] = c[4];\n                                        x6[idx] = c[5];\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                Vector<double*,6> xvals {x1, x2, x3, x4, x5, x6};\n                f(xvals, fvptr, npt*npt*npt*npt*npt*npt);\n                delete [] x1;\n                delete [] x2;\n                delete [] x3;\n                delete [] x4;\n                delete [] x5;\n                delete [] x6;\n            }\n            else {\n                MADNESS_EXCEPTION(\"FunctionImpl: fcube: confused about NDIM?\",NDIM);\n            }\n        }\n        else {\n            MADNESS_PRAGMA_CLANG(diagnostic push)\n            MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wtautological-constant-compare\")\n            auto isnan = [](T v) { return std::isnan(v); };\n            MADNESS_PRAGMA_CLANG(diagnostic pop)\n            if (NDIM == 1) {\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    fval(i) = f(c);\n                    MADNESS_ASSERT(!isnan(fval(i)));\n                }\n            }\n            else if (NDIM == 2) {\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (int j=0; j<npt; ++j) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        fval(i,j) = f(c);\n                        MADNESS_ASSERT(!isnan(fval(i,j)));\n                    }\n                }\n            }\n            else if (NDIM == 3) {\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (int j=0; j<npt; ++j) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        for (int k=0; k<npt; ++k) {\n                            c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                            fval(i,j,k) = f(c);\n                            MADNESS_ASSERT(!isnan(fval(i,j,k)));\n                        }\n                    }\n                }\n            }\n            else if (NDIM == 4) {\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (int j=0; j<npt; ++j) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        for (int k=0; k<npt; ++k) {\n                            c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                            for (int m=0; m<npt; ++m) {\n                                c[3] = cell(3,0) + h*cell_width[3]*(l[3] + qx(m)); // xx\n                                fval(i,j,k,m) = f(c);\n                                MADNESS_ASSERT(!isnan(fval(i,j,k,m)));\n                            }\n                        }\n                    }\n                }\n            }\n            else if (NDIM == 5) {\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (int j=0; j<npt; ++j) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        for (int k=0; k<npt; ++k) {\n                            c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                            for (int m=0; m<npt; ++m) {\n                                c[3] = cell(3,0) + h*cell_width[3]*(l[3] + qx(m)); // xx\n                                for (int n=0; n<npt; ++n) {\n                                    c[4] = cell(4,0) + h*cell_width[4]*(l[4] + qx(n)); // yy\n                                    fval(i,j,k,m,n) = f(c);\n                                    MADNESS_ASSERT(!isnan(fval(i,j,k,m,n)));\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n            else if (NDIM == 6) {\n                for (int i=0; i<npt; ++i) {\n                    c[0] = cell(0,0) + h*cell_width[0]*(l[0] + qx(i)); // x\n                    for (int j=0; j<npt; ++j) {\n                        c[1] = cell(1,0) + h*cell_width[1]*(l[1] + qx(j)); // y\n                        for (int k=0; k<npt; ++k) {\n                            c[2] = cell(2,0) + h*cell_width[2]*(l[2] + qx(k)); // z\n                            for (int m=0; m<npt; ++m) {\n                                c[3] = cell(3,0) + h*cell_width[3]*(l[3] + qx(m)); // xx\n                                for (int n=0; n<npt; ++n) {\n                                    c[4] = cell(4,0) + h*cell_width[4]*(l[4] + qx(n)); // yy\n                                    for (int p=0; p<npt; ++p) {\n                                        c[5] = cell(5,0) + h*cell_width[5]*(l[5] + qx(p)); // zz\n                                        fval(i,j,k,m,n,p) = f(c);\n                                        MADNESS_ASSERT(!isnan(fval(i,j,k,m,n,p)));\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n            else {\n                MADNESS_EXCEPTION(\"FunctionImpl: fcube: confused about NDIM?\",NDIM);\n            }\n        }\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::fcube(const keyT& key, T (*f)(const coordT&), const Tensor<double>& qx, tensorT& fval) const {\n        //      fcube(key,typename FunctionFactory<T,NDIM>::FunctorInterfaceWrapper(f) , qx, fval);\n        madness::fcube(key,ElementaryInterface<T,NDIM>(f) , qx, fval);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::fcube(const keyT& key, const FunctionFunctorInterface<T,NDIM>& f, const Tensor<double>& qx, tensorT& fval) const {\n        madness::fcube(key,f,qx,fval);\n    }\n\n\n    /// project the functor into this functionimpl, and \"return\" a tree in reconstructed,\n    /// rank-reduced form.\n\n    /// @param[in]  key current FunctionNode\n    /// @param[in]  do_refine\n    /// @param[in]  specialpts  in case these are very spiky functions -- don't undersample\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::project_refine_op(const keyT& key,\n                                                 bool do_refine,\n                                                 const std::vector<Vector<double,NDIM> >& specialpts) {\n        //PROFILE_MEMBER_FUNC(FunctionImpl);\n        if (do_refine && key.level() < max_refine_level) {\n\n            // Restrict special points to this box\n            std::vector<Vector<double,NDIM> > newspecialpts;\n            if (key.level() < special_level && specialpts.size() > 0) {\n                BoundaryConditions<NDIM> bc = FunctionDefaults<NDIM>::get_bc();\n                const auto bperiodic = bc.is_periodic();\n                for (unsigned int i = 0; i < specialpts.size(); ++i) {\n                    coordT simpt;\n                    user_to_sim(specialpts[i], simpt);\n                    Key<NDIM> specialkey = simpt2key(simpt, key.level());\n                    if (specialkey.is_neighbor_of(key,bperiodic)) {\n                        newspecialpts.push_back(specialpts[i]);\n                    }\n                    if (key.is_neighbor_of(simpt, bperiodic)) {\n                        newspecialpts.push_back(specialpts[i]);\n                    }\n                }\n            }\n\n            // If refining compute scaling function coefficients and\n            // norm of difference coefficients\n            tensorT r, s0;\n            double dnorm = 0.0;\n            //////////////////////////if (newspecialpts.size() == 0)\n            {\n                // Make in r child scaling function coeffs at level n+1\n                r = tensorT(cdata.v2k);\n                for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                    const keyT& child = it.key();\n                    r(child_patch(child)) = project(child);\n                }\n                // Filter then test difference coeffs at level n\n                tensorT d = filter(r);\n                if (truncate_on_project) s0 = copy(d(cdata.s0));\n                d(cdata.s0) = T(0);\n                dnorm = d.normf();\n            }\n\n            // If have special points always refine.  If don't have special points\n            // refine if difference norm is big\n            if (newspecialpts.size() > 0 || dnorm >=truncate_tol(thresh,key.level())) {\n                coeffs.replace(key,nodeT(coeffT(),true)); // Insert empty node for parent\n                for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                    const keyT& child = it.key();\n                    ProcessID p;\n                    if (FunctionDefaults<NDIM>::get_project_randomize()) {\n                        p = world.random_proc();\n                    }\n                    else {\n                        p = coeffs.owner(child);\n                    }\n                    //PROFILE_BLOCK(proj_refine_send); // Too fine grain for routine profiling\n                    woT::task(p, &implT::project_refine_op, child, do_refine, newspecialpts);\n                }\n            }\n            else {\n                if (truncate_on_project) {\n                    coeffT s(s0,thresh,FunctionDefaults<NDIM>::get_tensor_type());\n                    coeffs.replace(key,nodeT(s,false));\n                }\n                else {\n                    coeffs.replace(key,nodeT(coeffT(),true)); // Insert empty node for parent\n                    for (KeyChildIterator<NDIM> it(key); it; ++it) {\n                        const keyT& child = it.key();\n                        coeffT s(r(child_patch(child)),thresh,FunctionDefaults<NDIM>::get_tensor_type());\n                        coeffs.replace(child,nodeT(s,false));\n                    }\n                }\n            }\n        }\n        else {\n            coeffs.replace(key,nodeT(coeffT(project(key),targs),false));\n        }\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::add_scalar_inplace(T t, bool fence) {\n        std::vector<long> v0(NDIM,0L);\n        std::vector<long> v1(NDIM,1L);\n        std::vector<Slice> s(NDIM,Slice(0,0));\n        const TensorArgs full_args(-1.0,TT_FULL);\n        if (is_compressed()) {\n            if (world.rank() == coeffs.owner(cdata.key0)) {\n                typename dcT::iterator it = coeffs.find(cdata.key0).get();\n                MADNESS_ASSERT(it != coeffs.end());\n                nodeT& node = it->second;\n                MADNESS_ASSERT(node.has_coeff());\n                //                node.node_to_full_rank();\n                //                node.full_tensor_reference()(v0) += t*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n                //                node.node_to_low_rank();\n                change_tensor_type(node.coeff(),full_args);\n                node.coeff().full_tensor()(v0) += t*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n                change_tensor_type(node.coeff(),targs);\n            }\n        }\n        else {\n            for (typename dcT::iterator it=coeffs.begin(); it!=coeffs.end(); ++it) {\n                Level n = it->first.level();\n                nodeT& node = it->second;\n                if (node.has_coeff()) {\n                    // this looks funny, but is necessary for GenTensor, since you can't access a\n                    // single matrix element. Therefore make a (1^NDIM) tensor, convert to GenTensor, then\n                    // add to the original one by adding a slice.\n                    tensorT ttt(v1);\n                    ttt=t*sqrt(FunctionDefaults<NDIM>::get_cell_volume()*pow(0.5,double(NDIM*n)));\n                    coeffT tt(ttt,get_tensor_args());\n                    node.coeff()(s) += tt;\n                    // this was the original line:\n                    // node.coeff().full_tensor()(v0) += t*sqrt(FunctionDefaults<NDIM>::get_cell_volume()*pow(0.5,double(NDIM*n)));\n\n                }\n            }\n        }\n        if (fence) world.gop.fence();\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::insert_zero_down_to_initial_level(const keyT& key) {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        if (is_compressed()) initial_level = std::max(initial_level,1); // Otherwise zero function is confused\n        if (coeffs.is_local(key)) {\n            if (is_compressed()) {\n                if (key.level() == initial_level) {\n                    coeffs.replace(key, nodeT(coeffT(), false));\n                }\n                else {\n                    coeffs.replace(key, nodeT(coeffT(cdata.v2k,targs), true));\n                }\n            }\n            else {\n                if (key.level()<initial_level) {\n                    coeffs.replace(key, nodeT(coeffT(), true));\n                }\n                else {\n                    coeffs.replace(key, nodeT(coeffT(cdata.vk,targs), false));\n                }\n            }\n        }\n        if (key.level() < initial_level) {\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                insert_zero_down_to_initial_level(kit.key());\n            }\n        }\n\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    Future<bool> FunctionImpl<T,NDIM>::truncate_spawn(const keyT& key, double tol) {\n        //PROFILE_MEMBER_FUNC(FunctionImpl);\n        typename dcT::iterator it = coeffs.find(key).get();\n        if (it == coeffs.end()) {\n            // In a standard tree all children would exist but some ops (transform)\n            // can leave the tree in a messy state.  Just make the missing node as an\n            // empty leaf.\n            coeffs.replace(key,nodeT());\n            it = coeffs.find(key).get();\n        }\n        nodeT& node = it->second;\n        if (node.has_children()) {\n            std::vector< Future<bool> > v = future_vector_factory<bool>(1<<NDIM);\n            int i=0;\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n                v[i] = woT::task(coeffs.owner(kit.key()), &implT::truncate_spawn, kit.key(), tol, TaskAttributes::generator());\n            }\n            return woT::task(world.rank(),&implT::truncate_op, key, tol, v);\n        }\n        else {\n            // In compressed form leaves should not have coeffs ... however the\n            // transform op could leave the tree with leaves that do have coeffs\n            // in which case we want something sensible to happen\n            //MADNESS_ASSERT(!node.has_coeff());\n            if (node.has_coeff() && key.level()>1) {\n                double dnorm = node.coeff().normf();\n                if (dnorm < truncate_tol(tol,key)) {\n                    node.clear_coeff();\n                }\n            }\n            return Future<bool>(node.has_coeff());\n        }\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    bool FunctionImpl<T,NDIM>::truncate_op(const keyT& key, double tol, const std::vector< Future<bool> >& v) {\n        //PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n        // If any child has coefficients, a parent cannot truncate\n        for (int i=0; i<(1<<NDIM); ++i) if (v[i].get()) return true;\n        nodeT& node = coeffs.find(key).get()->second;\n\n        // Interior nodes should always have coeffs but transform might\n        // leave empty interior nodes ... hence just force no coeffs to\n        // be zero coeff unless it is a leaf.\n        if (node.has_children() && !node.has_coeff()) node.set_coeff(coeffT(cdata.v2k,targs));\n\n        if (key.level() > 1) { // >1 rather >0 otherwise reconstruct might get confused\n            double dnorm = node.coeff().normf();\n            if (dnorm < truncate_tol(tol,key)) {\n                node.clear_coeff();\n                if (node.has_children()) {\n                    node.set_has_children(false);\n                    for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                        coeffs.erase(kit.key());\n                    }\n                }\n            }\n        }\n        return node.has_coeff();\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::print_tree(std::ostream& os, Level maxlevel) const {\n        if (world.rank() == 0) do_print_tree(cdata.key0, os, maxlevel);\n        world.gop.fence();\n        if (world.rank() == 0) os.flush();\n        world.gop.fence();\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::do_print_tree(const keyT& key, std::ostream& os, Level maxlevel) const {\n        typename dcT::const_iterator it = coeffs.find(key).get();\n        if (it == coeffs.end()) {\n            //MADNESS_EXCEPTION(\"FunctionImpl: do_print_tree: null node pointer\",0);\n            for (int i=0; i<key.level(); ++i) os << \"  \";\n            os << key << \"  missing --> \" << coeffs.owner(key) << \"\\n\";\n        }\n        else {\n            const nodeT& node = it->second;\n            for (int i=0; i<key.level(); ++i) os << \"  \";\n            os << key << \"  \" << node << \" --> \" << coeffs.owner(key) << \"\\n\";\n            if (key.level() < maxlevel  &&  node.has_children()) {\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    do_print_tree(kit.key(),os,maxlevel);\n                }\n            }\n        }\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::print_tree_json(std::ostream& os, Level maxlevel) const {\n        std::multimap<Level, std::tuple<tranT, std::string>> data;\n        if (world.rank() == 0) do_print_tree_json(cdata.key0, data, maxlevel);\n        world.gop.fence();\n        if (world.rank() == 0) {\n            for (Level level = 0; level != maxlevel; ++level) {\n                if (data.count(level) == 0)\n                    break;\n                else {\n                    if (level > 0)\n                        os << \",\";\n                    os << \"\\\"\" << level << \"\\\":{\";\n                    os << \"\\\"level\\\": \" << level << \",\";\n                    os << \"\\\"nodes\\\":{\";\n                    auto range = data.equal_range(level);\n                    for (auto it = range.first; it != range.second; ++it) {\n                        os << \"\\\"\" << std::get<0>(it->second) << \"\\\":\"\n                           << std::get<1>(it->second);\n                        if (std::next(it) != range.second)\n                            os << \",\";\n                    }\n                    os << \"}}\";\n                }\n            }\n            os.flush();\n        }\n        world.gop.fence();\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::do_print_tree_json(const keyT& key, std::multimap<Level, std::tuple<tranT, std::string>>& data, Level maxlevel) const {\n        typename dcT::const_iterator it = coeffs.find(key).get();\n        if (it == coeffs.end()) {\n            MADNESS_EXCEPTION(\"FunctionImpl: do_print_tree_json: null node pointer\",0);\n        }\n        else {\n            const nodeT& node = it->second;\n            std::ostringstream oss;\n            oss << \"{\";\n            node.print_json(oss);\n            oss << \",\\\"owner\\\": \" << coeffs.owner(key) << \"}\";\n            auto node_json_str = oss.str();\n            data.insert(std::make_pair(key.level(), std::make_tuple(key.translation(), node_json_str)));\n            if (key.level() < maxlevel  &&  node.has_children()) {\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    do_print_tree_json(kit.key(),data, maxlevel);\n                }\n            }\n        }\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::print_tree_graphviz(std::ostream& os, Level maxlevel) const {\n        // aggregate data by level, thus collect data first, then dump\n        if (world.rank() == 0) do_print_tree_graphviz(cdata.key0, os, maxlevel);\n        world.gop.fence();\n        if (world.rank() == 0) os.flush();\n        world.gop.fence();\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::do_print_tree_graphviz(const keyT& key, std::ostream& os, Level maxlevel) const {\n\n        struct uniqhash {\n            static int64_t value(const keyT& key) {\n                int64_t result = 0;\n                for (int64_t j = 0; j <= key.level()-1; ++j) {\n                    result += (1 << j*NDIM);\n                }\n                result += key.translation()[0];\n                return result;\n            }\n        };\n\n        typename dcT::const_iterator it = coeffs.find(key).get();\n        if (it != coeffs.end()) {\n            const nodeT& node = it->second;\n            if (key.level() < maxlevel  &&  node.has_children()) {\n                for (KeyChildIterator<NDIM> kit(key); kit; ++kit) {\n                    os << uniqhash::value(key) << \" -> \" << uniqhash::value(kit.key()) << \"\\n\";\n                    do_print_tree_graphviz(kit.key(),os,maxlevel);\n                }\n            }\n        }\n    }\n\n    template <typename T, std::size_t NDIM>\n    Tensor<T> FunctionImpl<T,NDIM>::project(const keyT& key) const {\n        //PROFILE_MEMBER_FUNC(FunctionImpl);\n\n        if (not functor) MADNESS_EXCEPTION(\"FunctionImpl: project: confusion about function?\",0);\n\n        // if functor provides coeffs directly, awesome; otherwise use compute by yourself\n        if (functor->provides_coeff()) return functor->coeff(key).full_tensor_copy();\n\n        MADNESS_ASSERT(cdata.npt == cdata.k); // only necessary due to use of fast transform\n        tensorT fval(cdata.vq,false); // this will be the returned result\n        tensorT work(cdata.vk,false); // initially evaluate the function in here\n        tensorT workq(cdata.vq,false); // initially evaluate the function in here\n\n        // compute the values of the functor at the quadrature points and scale appropriately\n        madness::fcube(key,*functor,cdata.quad_x,work);\n        work.scale(sqrt(FunctionDefaults<NDIM>::get_cell_volume()*pow(0.5,double(NDIM*key.level()))));\n        //return transform(work,cdata.quad_phiw);\n        return fast_transform(work,cdata.quad_phiw,fval,workq);\n    }\n\n    template <typename T, std::size_t NDIM>\n    Future<double> FunctionImpl<T,NDIM>::get_norm_tree_recursive(const keyT& key) const {\n        if (coeffs.probe(key)) {\n            return Future<double>(coeffs.find(key).get()->second.get_norm_tree());\n        }\n        MADNESS_ASSERT(key.level());\n        keyT parent = key.parent();\n        return woT::task(coeffs.owner(parent), &implT::get_norm_tree_recursive, parent, TaskAttributes::hipri());\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::sock_it_to_me(const keyT& key,\n                                             const RemoteReference< FutureImpl< std::pair<keyT,coeffT> > >& ref) const {\n        //PROFILE_MEMBER_FUNC(FunctionImpl);\n        if (coeffs.probe(key)) {\n            const nodeT& node = coeffs.find(key).get()->second;\n            Future< std::pair<keyT,coeffT> > result(ref);\n            if (node.has_coeff()) {\n                //madness::print(\"sock found it with coeff\",key);\n                result.set(std::pair<keyT,coeffT>(key,node.coeff()));\n            }\n            else {\n                //madness::print(\"sock found it without coeff\",key);\n                result.set(std::pair<keyT,coeffT>(key,coeffT()));\n            }\n        }\n        else {\n            keyT parent = key.parent();\n            //madness::print(\"sock forwarding to parent\",key,parent);\n            //PROFILE_BLOCK(sitome_send); // Too fine grain for routine profiling\n\t    if (coeffs.is_local(parent)) \n\t      woT::send(coeffs.owner(parent), &FunctionImpl<T,NDIM>::sock_it_to_me, parent, ref);\n\t    else\n\t      woT::task(coeffs.owner(parent), &FunctionImpl<T,NDIM>::sock_it_to_me, parent, ref, TaskAttributes::hipri());\n        }\n    }\n\n    // like sock_it_to_me, but it replaces empty node with averaged coeffs from further down the tree\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::sock_it_to_me_too(const keyT& key,\n                                                 const RemoteReference< FutureImpl< std::pair<keyT,coeffT> > >& ref) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        if (coeffs.probe(key)) {\n            const nodeT& node = coeffs.find(key).get()->second;\n            Future< std::pair<keyT,coeffT> > result(ref);\n            if (node.has_coeff()) {\n                result.set(std::pair<keyT,coeffT>(key,node.coeff()));\n            }\n            else {\n                result.set(std::pair<keyT,coeffT>(key,nodeT(coeffT(project(key),targs),false).coeff()));\n            }\n        }\n        else {\n            keyT parent = key.parent();\n            //PROFILE_BLOCK(sitome2_send); // Too fine grain for routine profiling\n            woT::task(coeffs.owner(parent), &FunctionImpl<T,NDIM>::sock_it_to_me_too, parent, ref, TaskAttributes::hipri());\n        }\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::eval(const Vector<double,NDIM>& xin,\n                                    const keyT& keyin,\n                                    const typename Future<T>::remote_refT& ref) {\n\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        // This is ugly.  We must figure out a clean way to use\n        // owner computes rule from the container.\n        Vector<double,NDIM> x = xin;\n        keyT key = keyin;\n        Vector<Translation,NDIM> l = key.translation();\n        ProcessID me = world.rank();\n        while (1) {\n            ProcessID owner = coeffs.owner(key);\n            if (owner != me) {\n                //PROFILE_BLOCK(eval_send); // Too fine grain for routine profiling\n                woT::task(owner, &implT::eval, x, key, ref, TaskAttributes::hipri());\n                return;\n            }\n            else {\n                typename dcT::futureT fut = coeffs.find(key);\n                typename dcT::iterator it = fut.get();\n                nodeT& node = it->second;\n                if (node.has_coeff()) {\n                    Future<T>(ref).set(eval_cube(key.level(), x, node.coeff().full_tensor()));\n                    return;\n                }\n                else {\n                    for (std::size_t i=0; i<NDIM; ++i) {\n                        double xi = x[i]*2.0;\n                        int li = int(xi);\n                        if (li == 2) li = 1;\n                        x[i] = xi - li;\n                        l[i] = 2*l[i] + li;\n                    }\n                    key = keyT(key.level()+1,l);\n                }\n            }\n        }\n        //MADNESS_EXCEPTION(\"should not be here\",0);\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    std::pair<bool,T>\n    FunctionImpl<T,NDIM>::eval_local_only(const Vector<double,NDIM>& xin, Level maxlevel) {\n        Vector<double,NDIM> x = xin;\n        keyT key(0);\n        Vector<Translation,NDIM> l = key.translation();\n        const ProcessID me = world.rank();\n        while (key.level() <= maxlevel) {\n            if (coeffs.owner(key) == me) {\n                typename dcT::futureT fut = coeffs.find(key);\n                typename dcT::iterator it = fut.get();\n                if (it != coeffs.end()) {\n                    nodeT& node = it->second;\n                    if (node.has_coeff()) {\n                        return std::pair<bool,T>(true,eval_cube(key.level(), x, node.coeff().full_tensor()));\n                    }\n                }\n            }\n            for (std::size_t i=0; i<NDIM; ++i) {\n                double xi = x[i]*2.0;\n                int li = int(xi);\n                if (li == 2) li = 1;\n                x[i] = xi - li;\n                l[i] = 2*l[i] + li;\n            }\n            key = keyT(key.level()+1,l);\n        }\n        return std::pair<bool,T>(false,0.0);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::evaldepthpt(const Vector<double,NDIM>& xin,\n                                           const keyT& keyin,\n                                           const typename Future<Level>::remote_refT& ref) {\n\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        // This is ugly.  We must figure out a clean way to use\n        // owner computes rule from the container.\n        Vector<double,NDIM> x = xin;\n        keyT key = keyin;\n        Vector<Translation,NDIM> l = key.translation();\n        ProcessID me = world.rank();\n        while (1) {\n            ProcessID owner = coeffs.owner(key);\n            if (owner != me) {\n                //PROFILE_BLOCK(eval_send); // Too fine grain for routine profiling\n                woT::task(owner, &implT::evaldepthpt, x, key, ref, TaskAttributes::hipri());\n                return;\n            }\n            else {\n                typename dcT::futureT fut = coeffs.find(key);\n                typename dcT::iterator it = fut.get();\n                nodeT& node = it->second;\n                if (node.has_coeff()) {\n                    Future<Level>(ref).set(key.level());\n                    return;\n                }\n                else {\n                    for (std::size_t i=0; i<NDIM; ++i) {\n                        double xi = x[i]*2.0;\n                        int li = int(xi);\n                        if (li == 2) li = 1;\n                        x[i] = xi - li;\n                        l[i] = 2*l[i] + li;\n                    }\n                    key = keyT(key.level()+1,l);\n                }\n            }\n        }\n        //MADNESS_EXCEPTION(\"should not be here\",0);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::evalR(const Vector<double,NDIM>& xin,\n                                     const keyT& keyin,\n                                     const typename Future<long>::remote_refT& ref) {\n\n    \tPROFILE_MEMBER_FUNC(FunctionImpl);\n    \t// This is ugly.  We must figure out a clean way to use\n    \t// owner computes rule from the container.\n    \tVector<double,NDIM> x = xin;\n    \tkeyT key = keyin;\n    \tVector<Translation,NDIM> l = key.translation();\n    \tProcessID me = world.rank();\n    \twhile (1) {\n            ProcessID owner = coeffs.owner(key);\n            if (owner != me) {\n                //PROFILE_BLOCK(eval_send); // Too fine grain for routine profiling\n                woT::task(owner, &implT::evalR, x, key, ref, TaskAttributes::hipri());\n                return;\n            }\n            else {\n                typename dcT::futureT fut = coeffs.find(key);\n                typename dcT::iterator it = fut.get();\n                nodeT& node = it->second;\n                if (node.has_coeff()) {\n                    Future<long>(ref).set(node.coeff().rank());\n                    return;\n                }\n                else {\n                    for (std::size_t i=0; i<NDIM; ++i) {\n                        double xi = x[i]*2.0;\n                        int li = int(xi);\n                        if (li == 2) li = 1;\n                        x[i] = xi - li;\n                        l[i] = 2*l[i] + li;\n                    }\n                    key = keyT(key.level()+1,l);\n                }\n            }\n    \t}\n    \t//MADNESS_EXCEPTION(\"should not be here\",0);\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::tnorm(const tensorT& t, double* lo, double* hi) {\n        //PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n        auto& cdata=FunctionCommonData<T,NDIM>::get(t.dim(0));\n        tensorT work = copy(t);\n        tensorT tlo = work(cdata.sh);\n        *lo = tlo.normf();\n        tlo.fill(0.0);\n        *hi = work.normf();\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::tnorm(const GenTensor<T>& t, double* lo, double* hi) {\n        auto& cdata=FunctionCommonData<T,NDIM>::get(t.dim(0));\n\t\tcoeffT shalf=t(cdata.sh);\n\t\t*lo=shalf.normf();\n\t\tcoeffT sfull=copy(t);\n\t\tsfull(cdata.sh)-=shalf;\n\t\t*hi=sfull.normf();\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::tnorm(const SVDTensor<T>& t, double* lo, double* hi,\n    \t\tconst int particle) {\n    \t*lo=0.0;\n    \t*hi=0.0;\n        auto& cdata=FunctionCommonData<T,NDIM>::get(t.dim(0));\n    \tif (t.rank()==0) return;\n    \tconst tensorT vec=t.flat_vector(particle-1);\n    \tfor (long i=0; i<t.rank(); ++i) {\n    \t\tdouble lo1,hi1;\n    \t\ttensorT c=vec(Slice(i,i),_).reshape(cdata.vk);\n    \t\ttnorm(c, &lo1, &hi1);        // note we use g instead of h, since g is 3D\n    \t\t*lo+=lo1*t.weights(i);\n    \t\t*hi+=hi1*t.weights(i);\n\t\t}\n    }\n\n\n    namespace detail {\n        template <typename A, typename B>\n        struct noop {\n            void operator()(const A& a, const B& b) const {};\n\n            template <typename Archive> void serialize(Archive& ar) {}\n        };\n\n        template <typename T, std::size_t NDIM>\n        struct scaleinplace {\n            T q;\n            scaleinplace() {}\n\t    // G++ 4.1.2 ICEs on BGP ... scaleinplace(T q) : q(q) {}\n            scaleinplace(T q) {this->q = q;}\n            void operator()(const Key<NDIM>& key, Tensor<T>& t) const {\n                t.scale(q);\n            }\n            void operator()(const Key<NDIM>& key, FunctionNode<T,NDIM>& node) const {\n                node.coeff().scale(q);\n            }\n            template <typename Archive> void serialize(Archive& ar) {\n                ar & q;\n            }\n        };\n\n        template <typename T, std::size_t NDIM>\n        struct squareinplace {\n            void operator()(const Key<NDIM>& key, Tensor<T>& t) const {\n                t.emul(t);\n            }\n            template <typename Archive> void serialize(Archive& ar) {}\n        };\n\n        template <typename T, std::size_t NDIM>\n        struct absinplace {\n            void operator()(const Key<NDIM>& key, Tensor<T>& t) const {t=abs(t);}\n            template <typename Archive> void serialize(Archive& ar) {}\n        };\n\n        template <typename T, std::size_t NDIM>\n        struct abssquareinplace {\n            void operator()(const Key<NDIM>& key, Tensor<T>& t) const {abs(t.emul(t));}\n            template <typename Archive> void serialize(Archive& ar) {}\n        };\n\n    }\n\ntemplate <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::scale_inplace(const T q, bool fence) {\n        //        unary_op_coeff_inplace(detail::scaleinplace<T,NDIM>(q), fence);\n        unary_op_node_inplace(detail::scaleinplace<T,NDIM>(q), fence);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::square_inplace(bool fence) {\n        //unary_op_value_inplace(&implT::autorefine_square_test, detail::squareinplace<T,NDIM>(), fence);\n        unary_op_value_inplace(detail::squareinplace<T,NDIM>(), fence);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::abs_inplace(bool fence) {\n        unary_op_value_inplace(detail::absinplace<T,NDIM>(), fence);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::abs_square_inplace(bool fence) {\n        unary_op_value_inplace(detail::abssquareinplace<T,NDIM>(), fence);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::phi_for_mul(Level np, Translation lp, Level nc, Translation lc, Tensor<double>& phi) const {\n        //PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n        double p[200];\n        double scale = pow(2.0,double(np-nc));\n        for (int mu=0; mu<cdata.npt; ++mu) {\n            double xmu = scale*(cdata.quad_x(mu)+lc) - lp;\n            MADNESS_ASSERT(xmu>-1e-15 && xmu<(1+1e-15));\n            legendre_scaling_functions(xmu,cdata.k,p);\n            for (int i=0; i<k; ++i) phi(i,mu) = p[i];\n        }\n        phi.scale(pow(2.0,0.5*np));\n    }\n\n    template <typename T, std::size_t NDIM>\n\n    const GenTensor<T> FunctionImpl<T,NDIM>::parent_to_child(const coeffT& s, const keyT& parent, const keyT& child) const {\n        //PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n        // An invalid parent/child means that they are out of the box\n        // and it is the responsibility of the caller to worry about that\n        // ... most likely the coefficients (s) are zero to reflect\n        // zero B.C. so returning s makes handling this easy.\n        if (parent == child || parent.is_invalid() || child.is_invalid()) return s;\n\n        coeffT result = fcube_for_mul<T>(child, parent, s);\n        result.scale(sqrt(FunctionDefaults<NDIM>::get_cell_volume()*pow(0.5,double(NDIM*child.level()))));\n        result = transform(result,cdata.quad_phiw);\n\n        return result;\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    T FunctionImpl<T,NDIM>::trace_local() const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        std::vector<long> v0(NDIM,0);\n        T sum = 0.0;\n        if (is_compressed()) {\n            if (world.rank() == coeffs.owner(cdata.key0)) {\n                typename dcT::const_iterator it = coeffs.find(cdata.key0).get();\n                if (it != coeffs.end()) {\n                    const nodeT& node = it->second;\n                    if (node.has_coeff()) sum = node.coeff().full_tensor()(v0);\n                }\n            }\n        }\n        else {\n            for (typename dcT::const_iterator it=coeffs.begin(); it!=coeffs.end(); ++it) {\n                const keyT& key = it->first;\n                const nodeT& node = it->second;\n                if (node.has_coeff()) sum += node.coeff().full_tensor()(v0)*pow(0.5,NDIM*key.level()*0.5);\n            }\n        }\n        return sum*sqrt(FunctionDefaults<NDIM>::get_cell_volume());\n    }\n\n\n    // Return whether l is in the interval [0, 2n).\n    // If is_periodic, then this is checked modulo 2n. The function always\n    // returns true, but l is *modified* to be in the interval.\n    static inline bool enforce_bc(bool is_periodic, Level n, Translation& l) {\n      const Translation two2n = 1ul << n;\n      if (l < 0) {\n        if (is_periodic) {\n          do {\n            l += two2n; // Periodic BC\n          } while (l < 0);\n        } else\n          return false; // Zero BC\n      } else if (l >= two2n) {\n        if (is_periodic) {\n          do {\n            l -= two2n; // Periodic BC\n          } while (l >= two2n);\n        } else\n          return false; // Zero BC\n      }\n      return true;\n    }\n\n    static inline bool enforce_in_volume(Level n, const Translation& l) {\n      Translation two2n = 1ul << n;\n      return l >= 0 && l < two2n;\n    }\n\n    // Return the key corresponding to `key` + `disp`.\n    // If is_periodic, then translations in the key are taken modulo the box\n    // dimensions. Otherwise, displacements outside the box are invalid.\n    template <typename T, std::size_t NDIM>\n    Key<NDIM> FunctionImpl<T,NDIM>::neighbor(const keyT& key, const Key<NDIM>& disp, const array_of_bools<NDIM>& is_periodic) const {\n        Vector<Translation,NDIM> l = key.translation();\n\n        for (std::size_t axis=0; axis<NDIM; ++axis) {\n            l[axis] += disp.translation()[axis];\n\n            //if (!enforce_bc(bc(axis,0), bc(axis,1), key.level(), l[axis])) {\n            if (!enforce_bc(is_periodic[axis], key.level(), l[axis])) {\n                return keyT::invalid();\n            }\n        }\n        return keyT(key.level(),l);\n    }\n\n    template <typename T, std::size_t NDIM>\n    Key<NDIM> FunctionImpl<T,NDIM>::neighbor_in_volume(const keyT& key, const Key<NDIM>& disp) const {\n      Vector<Translation, NDIM> l = key.translation();\n\n      for (std::size_t axis = 0; axis < NDIM; ++axis) {\n        l[axis] += disp.translation()[axis];\n\n        if (!enforce_in_volume(key.level(), l[axis])) {\n          return keyT::invalid();\n        }\n      }\n      return keyT(key.level(), l);\n    }\n\n    template <typename T, std::size_t NDIM>\n    Future< std::pair< Key<NDIM>, GenTensor<T> > >\n    FunctionImpl<T,NDIM>::find_me(const Key<NDIM>& key) const {\n        //PROFILE_MEMBER_FUNC(FunctionImpl); // Too fine grain for routine profiling\n        typedef std::pair< Key<NDIM>,coeffT > argT;\n        Future<argT> result;\n        //PROFILE_BLOCK(find_me_send); // Too fine grain for routine profiling\n        woT::task(coeffs.owner(key), &implT::sock_it_to_me_too, key, result.remote_ref(world), TaskAttributes::hipri());\n        return result;\n    }\n\n\n    /// will insert\n    /// @return s coefficient and norm_tree for key\n    template <typename T, std::size_t NDIM>\n    Future< std::pair<GenTensor<T>,double> > FunctionImpl<T,NDIM>::compress_spawn(const Key<NDIM>& key,\n\t\t\t\tbool nonstandard1, bool keepleaves, bool redundant1) {\n        if (!coeffs.probe(key)) print(\"missing node\",key);\n        MADNESS_ASSERT(coeffs.probe(key));\n\n        // get fetches remote data (here actually local)\n        nodeT& node = coeffs.find(key).get()->second;\n\n        // internal node -> continue recursion\n        if (node.has_children()) {\n            std::vector< Future<std::pair<coeffT,double> > > v = future_vector_factory<std::pair<coeffT,double> >(1<<NDIM);\n            int i=0;\n            for (KeyChildIterator<NDIM> kit(key); kit; ++kit,++i) {\n                //PROFILE_BLOCK(compress_send); // Too fine grain for routine profiling\n                // readily available\n                v[i] = woT::task(coeffs.owner(kit.key()), &implT::compress_spawn, kit.key(),\n                                 nonstandard1, keepleaves, redundant1, TaskAttributes::hipri());\n            }\n            if (redundant1) return woT::task(world.rank(),&implT::make_redundant_op, key, v);\n            return woT::task(world.rank(),&implT::compress_op, key, v, nonstandard1);\n        }\n\n        // leaf node -> remove coefficients here and pass them back to parent for filtering\n        // insert snorm, dnorm=0.0, normtree (=snorm)\n        else {\n            // special case: tree has only root node: keep sum coeffs and make zero diff coeffs\n            if (key.level()==0) {\n                if (redundant1) {\n                    // with only the root node existing redundant and reconstructed are the same\n                    coeffT result(node.coeff());\n                    double snorm=node.coeff().normf();\n                    node.set_dnorm(0.0);\n                    node.set_snorm(snorm);\n                    node.set_norm_tree(snorm);\n                    return Future< std::pair<GenTensor<T>,double> >(std::make_pair(result,snorm));\n                } else {\n                    // compress\n                    coeffT result(node.coeff());\n                    coeffT sdcoeff(cdata.v2k,this->get_tensor_type());\n                    sdcoeff(cdata.s0)+=node.coeff();\n                    node.coeff()=sdcoeff;\n                    double snorm=node.coeff().normf();\n                    node.set_dnorm(0.0);\n                    node.set_snorm(snorm);\n                    node.set_norm_tree(snorm);\n                    return Future< std::pair<GenTensor<T>,double> >(std::make_pair(result,node.coeff().normf()));\n                }\n\n            } else { // this is a leaf node\n                Future<coeffT > result(node.coeff());\n                if (not keepleaves) node.clear_coeff();\n\n                auto snorm=(keepleaves) ? node.coeff().normf() : 0.0;\n                node.set_norm_tree(snorm);\n                node.set_snorm(snorm);\n                node.set_dnorm(0.0);\n\n                return Future< std::pair<GenTensor<T>,double> >(std::make_pair(result,snorm));\n            }\n        }\n    }\n\n    template <typename T, std::size_t NDIM>\n    void FunctionImpl<T,NDIM>::plot_cube_kernel(archive::archive_ptr< Tensor<T> > ptr,\n                                                const keyT& key,\n                                                const coordT& plotlo, const coordT& plothi, const std::vector<long>& npt,\n                                                bool eval_refine) const {\n\n        Tensor<T>& r = *ptr;\n\n        coordT h; // Increment between points in each dimension\n        for (std::size_t i=0; i<NDIM; ++i) {\n            if (npt[i] > 1) {\n                h[i] = (plothi[i]-plotlo[i])/(npt[i]-1);\n            }\n            else {\n                MADNESS_ASSERT(plotlo[i] == plothi[i]);\n                h[i] = 0.0;\n            }\n        }\n\n        const Level n = key.level();\n        const Vector<Translation,NDIM>& l = key.translation();\n        const double twon = pow(2.0,double(n));\n        const tensorT& coeff = coeffs.find(key).get()->second.coeff().full_tensor(); // Ugh!\n        long ind[NDIM];\n        coordT x;\n\n        coordT boxlo, boxhi;\n        Vector<int,NDIM> boxnpt;\n        double fac = pow(0.5,double(key.level()));\n        int npttotal = 1;\n        for (std::size_t d=0; d<NDIM; ++d) {\n            // Coords of box\n            boxlo[d] = fac*key.translation()[d];\n            boxhi[d] = boxlo[d]+fac;\n\n            if (boxlo[d] > plothi[d] || boxhi[d] < plotlo[d]) {\n                // Discard boxes out of the plot range\n                npttotal = boxnpt[d] = 0;\n                //print(\"OO range?\");\n                break;\n            }\n            else if (npt[d] == 1) {\n                // This dimension is only a single point\n                boxlo[d] = boxhi[d] = plotlo[d];\n                boxnpt[d] = 1;\n            }\n            else {\n                // Restrict to plot range\n                boxlo[d] = std::max(boxlo[d],plotlo[d]);\n                boxhi[d] = std::min(boxhi[d],plothi[d]);\n\n                // Round lo up to next plot point; round hi down\n                double xlo = long((boxlo[d]-plotlo[d])/h[d])*h[d] + plotlo[d];\n                if (xlo < boxlo[d]) xlo += h[d];\n                boxlo[d] =  xlo;\n                double xhi = long((boxhi[d]-plotlo[d])/h[d])*h[d] + plotlo[d];\n                if (xhi > boxhi[d]) xhi -= h[d];\n                // MADNESS_ASSERT(xhi >= xlo);  // nope\n                boxhi[d] = xhi;\n                boxnpt[d] = long(round((boxhi[d] - boxlo[d])/h[d])) + 1;\n            }\n            npttotal *= boxnpt[d];\n        }\n        //print(\"    box\", boxlo, boxhi, boxnpt, npttotal);\n        if (npttotal > 0) {\n            for (IndexIterator it(boxnpt); it; ++it) {\n                for (std::size_t d=0; d<NDIM; ++d) {\n                    double xd = boxlo[d] + it[d]*h[d]; // Sim. coords of point\n                    x[d] = twon*xd - l[d]; // Offset within box\n                    MADNESS_ASSERT(x[d]>=0.0 && x[d] <=1.0);  // sanity\n                    if (npt[d] > 1) {\n                        ind[d] = long(round((xd-plotlo[d])/h[d])); // Index of plot point\n                    }\n                    else {\n                        ind[d] = 0;\n                    }\n                    MADNESS_ASSERT(ind[d]>=0 && ind[d]<npt[d]); // sanity\n                }\n                if (eval_refine) {\n                    r(ind) = n;\n                }\n                else {\n                    T tmp = eval_cube(n, x, coeff);\n                    r(ind) = tmp;\n                    //print(\"    eval\", ind, tmp, r(ind));\n                }\n            }\n        }\n    }\n\n    /// Set plot_refine=true to get a plot of the refinment levels of\n    /// the given function (defaulted to false in prototype).\n    template <typename T, std::size_t NDIM>\n    Tensor<T> FunctionImpl<T,NDIM>::eval_plot_cube(const coordT& plotlo,\n                                                   const coordT& plothi,\n                                                   const std::vector<long>& npt,\n                                                   const bool eval_refine) const {\n        PROFILE_MEMBER_FUNC(FunctionImpl);\n        Tensor<T> r(NDIM, &npt[0]);\n        //r(___) = 99.0;\n        MADNESS_ASSERT(is_reconstructed());\n\n        for (typename dcT::const_iterator it=coeffs.begin(); it!=coeffs.end(); ++it) {\n            const keyT& key = it->first;\n            const nodeT& node = it->second;\n            if (node.has_coeff()) {\n                woT::task(world.rank(), &implT::plot_cube_kernel,\n                          archive::archive_ptr< Tensor<T> >(&r), key, plotlo, plothi, npt, eval_refine);\n            }\n        }\n\n        //        ITERATOR(r, if (r(IND) == 99.0) {print(\"BAD\", IND); error(\"bad\",0);});\n\n        world.taskq.fence();\n        world.gop.sum(r.ptr(), r.size());\n        world.gop.fence();\n\n        return r;\n    }\n\n    static inline void dxprintvalue(FILE* f, const double t) {\n        fprintf(f,\"%.6e\\n\",t);\n    }\n\n    static inline void dxprintvalue(FILE* f, const double_complex& t) {\n        fprintf(f,\"%.6e %.6e\\n\", t.real(), t.imag());\n    }\n\n    template <typename T, std::size_t NDIM>\n    void plotdx(const Function<T,NDIM>& function,\n                const char* filename,\n                const Tensor<double>& cell,\n                const std::vector<long>& npt,\n                bool binary) {\n        PROFILE_FUNC;\n        MADNESS_ASSERT(NDIM<=6);\n        const char* element[6] = {\"lines\",\"quads\",\"cubes\",\"cubes4D\",\"cubes5D\",\"cubes6D\"};\n\n        function.verify();\n        World& world = const_cast< Function<T,NDIM>& >(function).world();\n        FILE *f=0;\n        if (world.rank() == 0) {\n            f = fopen(filename, \"w\");\n            if (!f) MADNESS_EXCEPTION(\"plotdx: failed to open the plot file\", 0);\n\n            fprintf(f,\"object 1 class gridpositions counts \");\n            for (std::size_t d=0; d<NDIM; ++d) fprintf(f,\" %ld\",npt[d]);\n            fprintf(f,\"\\n\");\n\n            fprintf(f,\"origin \");\n            for (std::size_t d=0; d<NDIM; ++d) fprintf(f, \" %.6e\", cell(d,0));\n            fprintf(f,\"\\n\");\n\n            for (std::size_t d=0; d<NDIM; ++d) {\n                fprintf(f,\"delta \");\n                for (std::size_t c=0; c<d; ++c) fprintf(f, \" 0\");\n                double h = 0.0;\n                if (npt[d]>1) h = (cell(d,1)-cell(d,0))/(npt[d]-1);\n                fprintf(f,\" %.6e\", h);\n                for (std::size_t c=d+1; c<NDIM; ++c) fprintf(f, \" 0\");\n                fprintf(f,\"\\n\");\n            }\n            fprintf(f,\"\\n\");\n\n            fprintf(f,\"object 2 class gridconnections counts \");\n            for (std::size_t d=0; d<NDIM; ++d) fprintf(f,\" %ld\",npt[d]);\n            fprintf(f,\"\\n\");\n            fprintf(f, \"attribute \\\"element type\\\" string \\\"%s\\\"\\n\", element[NDIM-1]);\n            fprintf(f, \"attribute \\\"ref\\\" string \\\"positions\\\"\\n\");\n            fprintf(f,\"\\n\");\n\n            int npoint = 1;\n            for (std::size_t d=0; d<NDIM; ++d) npoint *= npt[d];\n            const char* iscomplex = \"\";\n            if (TensorTypeData<T>::iscomplex) iscomplex = \"category complex\";\n            const char* isbinary = \"\";\n            if (binary) isbinary = \"binary\";\n            fprintf(f,\"object 3 class array type double %s rank 0 items %d %s data follows\\n\",\n                    iscomplex, npoint, isbinary);\n        }\n\n        world.gop.fence();\n        Tensor<T> r = function.eval_cube(cell, npt);\n\n        if (world.rank() == 0) {\n            if (binary) {\n                // This assumes that the values are double precision\n                fflush(f);\n                fwrite((void *) r.ptr(), sizeof(T), r.size(), f);\n                fflush(f);\n            }\n            else {\n                for (IndexIterator it(npt); it; ++it) {\n                    //fprintf(f,\"%.6e\\n\",r(*it));\n                    dxprintvalue(f,r(*it));\n                }\n            }\n            fprintf(f,\"\\n\");\n\n            fprintf(f,\"object \\\"%s\\\" class field\\n\",filename);\n            fprintf(f,\"component \\\"positions\\\" value 1\\n\");\n            fprintf(f,\"component \\\"connections\\\" value 2\\n\");\n            fprintf(f,\"component \\\"data\\\" value 3\\n\");\n            fprintf(f,\"\\nend\\n\");\n            fclose(f);\n        }\n        world.gop.fence();\n    }\n\n    template <std::size_t NDIM>\n    void FunctionDefaults<NDIM>::set_defaults(World& world) {\n        k = 6;\n        thresh = 1e-4;\n        initial_level = 2;\n        special_level = 3;\n        max_refine_level = 30;\n        truncate_mode = 0;\n        refine = true;\n        autorefine = true;\n        debug = false;\n        truncate_on_project = true;\n        apply_randomize = false;\n        project_randomize = false;\n        if (!bc.has_value()) bc = BoundaryConditions<NDIM>(BC_FREE);\n        tt = TT_FULL;\n        cell = make_default_cell();\n        recompute_cell_info();\n        set_default_pmap(world);\n    }\n\n    template <std::size_t NDIM>\n    std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > > FunctionDefaults<NDIM>::make_default_pmap(World& world) {\n        // return std::make_shared<WorldDCDefaultPmap< Key<NDIM> >>(world);\n        return std::make_shared<LevelPmap< Key<NDIM> >>(world);\n        // return std::make_shared<SimplePmap< Key<NDIM> >>(world);\n    }\n\n    template <std::size_t NDIM>\n    void FunctionDefaults<NDIM>::set_default_pmap(World& world) {\n        pmap = make_default_pmap(world);\n        pmap_nproc = world.nproc();\n    }\n\n\n    template <std::size_t NDIM>\n    void FunctionDefaults<NDIM>::print(){\n    \t\tstd::cout << \"Function Defaults:\" << std::endl;\n    \t\tstd::cout << \"                      Dimension \" <<  \": \" <<  NDIM << std::endl;\n    \t\tstd::cout << \"                               k\" <<  \": \" << k << std::endl;\n    \t\tstd::cout << \"                          thresh\" <<  \": \" << thresh << std::endl;\n    \t\tstd::cout << \"                   initial_level\" <<  \": \" << initial_level << std::endl;\n    \t\tstd::cout << \"                   special_level\" <<  \": \" << special_level << std::endl;\n    \t\tstd::cout << \"                max_refine_level\" <<  \": \" << max_refine_level << std::endl;\n    \t\tstd::cout << \"                   truncate_mode\" <<  \": \" << truncate_mode << std::endl;\n    \t\tstd::cout << \"                          refine\" <<  \": \" << refine << std::endl;\n    \t\tstd::cout << \"                      autorefine\" <<  \": \" << autorefine << std::endl;\n    \t\tstd::cout << \"                           debug\" <<  \": \" << debug << std::endl;\n    \t\tstd::cout << \"             truncate_on_project\" <<  \": \" << truncate_on_project << std::endl;\n    \t\tstd::cout << \"                 apply_randomize\" <<  \": \" << apply_randomize << std::endl;\n    \t\tstd::cout << \"               project_randomize\" <<  \": \" << project_randomize << std::endl;\n    \t\tstd::cout << \"                              bc\" <<  \": \" << get_bc() << std::endl;\n    \t\tstd::cout << \"                              tt\" <<  \": \" << tt << std::endl;\n    \t\tstd::cout << \"                            cell\" <<  \": \" << cell << std::endl;\n    }\n\n    template <typename T, std::size_t NDIM>\n    const FunctionCommonData<T,NDIM>* FunctionCommonData<T,NDIM>::data[MAXK] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};\n\n    // default values match those in FunctionDefaults::set_defaults(world)\n    template <std::size_t NDIM> int FunctionDefaults<NDIM>::k = 6;\n    template <std::size_t NDIM> double FunctionDefaults<NDIM>::thresh = 1e-4;\n    template <std::size_t NDIM> int FunctionDefaults<NDIM>::initial_level = 2;\n    template <std::size_t NDIM> int FunctionDefaults<NDIM>::special_level = 3;\n    template <std::size_t NDIM> int FunctionDefaults<NDIM>::max_refine_level = 30;\n    template <std::size_t NDIM> int FunctionDefaults<NDIM>::truncate_mode = 0;\n    template <std::size_t NDIM> bool FunctionDefaults<NDIM>::refine = true;\n    template <std::size_t NDIM> bool FunctionDefaults<NDIM>::autorefine = true;\n    template <std::size_t NDIM> bool FunctionDefaults<NDIM>::debug = false;\n    template <std::size_t NDIM> bool FunctionDefaults<NDIM>::truncate_on_project = true;\n    template <std::size_t NDIM> bool FunctionDefaults<NDIM>::apply_randomize = false;\n    template <std::size_t NDIM> bool FunctionDefaults<NDIM>::project_randomize = false;\n    template <std::size_t NDIM> std::optional<BoundaryConditions<NDIM>> FunctionDefaults<NDIM>::bc;\n    template <std::size_t NDIM> TensorType FunctionDefaults<NDIM>::tt = TT_FULL;\n    template <std::size_t NDIM> Tensor<double> FunctionDefaults<NDIM>::cell = FunctionDefaults<NDIM>::make_default_cell();\n    template <std::size_t NDIM> Tensor<double> FunctionDefaults<NDIM>::cell_width = FunctionDefaults<NDIM>::make_default_cell_width();\n    template <std::size_t NDIM> Tensor<double> FunctionDefaults<NDIM>::rcell_width = FunctionDefaults<NDIM>::make_default_cell_width();\n    template <std::size_t NDIM> double FunctionDefaults<NDIM>::cell_volume = 1.;\n    template <std::size_t NDIM> double FunctionDefaults<NDIM>::cell_min_width = 1.;\n    template <std::size_t NDIM> std::shared_ptr< WorldDCPmapInterface< Key<NDIM> > > FunctionDefaults<NDIM>::pmap;\n    template <std::size_t NDIM> int FunctionDefaults<NDIM>::pmap_nproc{-1};\n\n}\n\n#endif // MADNESS_MRA_MRAIMPL_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/mraplot.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id: test.cc 257 2007-06-25 19:09:38Z HartmanBaker $\n*/\n\n/// \\file mraplot.cc\n/// \\brief Function plotting utility\n\n#include <madness/mra/mra.h>\n#include <unistd.h>\n#include <cstdio>\n#include <madness/constants.h>\n#include <madness/misc/phandler.h>\n\nusing namespace madness;\n\ntemplate <typename T, std::size_t NDIM>\nstruct lbcost {\n    double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n        return 1.0;\n    }\n};\n\nstd::string help = \"\\n\\\n      Input is read from standard input.\\n\\\n\\n\\\n      Keywords may appear in any order until the plot keyword is  \\n\\\n      detected, at which point the plot is generated.  Input processing  \\n\\\n      then resumes with previous input values being remembered. \\n\\\n \\n\\\n      Thus, multiple plots may be generated by one input file. \\n\\\n      If only one plot is being generated, the plot keyword may \\n\\\n      be omitted (plot is triggered by hitting EOF). \\n\\\n \\n\\\n      REQUIRED KEYWORDS \\n\\\n      .   input <string filename> // Input file name ... no default for this! \\n\\\n \\n\\\n      OPTIONAL KEYWORDS \\n\\\n      .   output <string filename> // Default is 'plot' \\n\\\n      .   ndim <int ndim>   // No. of dimensions ... default is 3 \\n\\\n      .   cell <double lo> <double hi> [...] // Compute cell volume ... default is [0,1]^ndim \\n\\\n      .   ascii             // Text output for volume data [default is binary] \\n\\\n      .   text              // Text output for volume data [default is binary] \\n\\\n      .   dx                // Specifies DX format for volume data [default is dx] \\n\\\n      .   vtk <str function_name> // Specifies VTK format for volume data [default is dx], giving the function name function_name \\n\\\n      .   real              // Sets data type to real, default is real \\n\\\n      .   complex           // Sets data type to complex, default is real \\n\\\n      .   line              // Sets plot type to line, default is volume \\n\\\n      .   volume            // Sets plot type to volume, default is volume \\n\\\n      .   plot_cell <double lo> <double hi> [...] // Plot range in each dimension, default is compute cell \\n\\\n      .   npt               // No. of points in each dimension (default is 101) \\n\\\n      .   formula           // Also plot analytic expression \\n\\\n      .   exit              // exits the program gracefully \\n\\\n      .   quit              // exits the program gracefully \\n\\\n \\n\\\n      EXAMPLE \\n\\\n      .   For a real function in parallel archive 'psi_step22' it  \\n\\\n      .   makes a volume plot over the whole domain and then a line \\n\\\n      .   plot along the z axis between [-10,10] \\n\\\n      .   \\n\\\n      .   cell -100 100 -100 100 -100 100 \\n\\\n      .   input psi_step22 \\n\\\n      .   output psi22.dx \\n\\\n      .   plot \\n\\\n      . \\n\\\n      .   vtk my_function \\n\\\n      .   output psi22.vts \\n\\\n      .   plot \\n\\\n      . \\n\\\n      . \\n\\\n      .   dx \\n\\\n      .   plot_cell 0 0 0 0 -10 10 \\n\\\n      .   output psi22.dat \\n\\\n      .   line \\n\\\n      .   plot \\n\\\n \\n\\\n      DEBUG TIPS\\n\\\n      !! If the parallel archive holding the function was generated \\n\\\n      !! with multiple writers you presently must run mraplot in parallel \\n\\\n      !! with at least as many MPI processes. \\n\\\n      \\n\\\n      input data-00000.00000 may produce the following error\\n\\\n      MadnessException : msg=BinaryFstreamInputArchive: ... function=open \\n\\\n      input data-00000 fixes the problem\\n\\\n      \";\n\nclass Plotter {\n\npublic:\n\n    World& world;\n    Tensor<double> cell;        // Computational cell\n    Tensor<double> plot_cell;   // Plotting volume\n    std::string data_type;           // presently only double or complex\n    std::string plot_type;           // line or volume\n    std::string input_filename;      // filename for function on disk\n    std::string output_filename;     // output file name for plot data\n    std::string output_format;       // output format for volume data (presently only dx)\n    std::string formula;             // analytic function to plot\n    std::string function_name;       // function name for VTK output\n    std::vector<long> npt;           // no. points in each dimension\n    int ndim;                   // no. of dimensions\n    bool binary;                // output format for plot data\n    bool finished;              // true if finishing\n\n    template <typename Archive>\n    void serialize(Archive& ar) {\n        ar & cell & plot_cell & data_type & plot_type\n            & input_filename & output_filename & output_format & function_name\n            & npt & ndim & binary & finished;\n    }\n\n    Plotter(World& world)\n        : world(world)\n        , cell()\n        , plot_cell()\n        , data_type(\"double\")\n        , plot_type(\"volume\")\n        , input_filename()\n        , output_filename(\"plot\")\n        , output_format(\"dx\")\n        , formula(\"\")\n        , function_name(\"function\")\n        , ndim(3)\n        , binary(true)\n        , finished(true)\n    {}\n\n    std::string read_to_end_of_line(std::istream& input) {\n        std::string buf;\n        while (1) {\n            char c = input.get();\n            if (c == '\\n') break;\n            buf.append(1, c);\n        }\n        return buf;\n    }\n\n    std::vector<long> read_npt(std::istream& input) {\n        std::istringstream s(read_to_end_of_line(input));\n        std::vector<long> npt;\n        int i;\n        while (s >> i) {\n            npt.push_back(i);\n        }\n        return npt;\n    }\n\n    // Read pairs of floating point values and return appropriately sized tensor\n    Tensor<double> read_cell(std::istream& input) {\n        std::istringstream s(read_to_end_of_line(input));\n        double v[65];\n        int n = 0;\n        while (s >> v[n]) {\n            ++n;\n            MADNESS_ASSERT(n < 65);\n        }\n        // There should be an even number\n        int ndim = n/2;\n        MADNESS_ASSERT(n==ndim*2 && ndim>=1);\n        Tensor<double> cell(ndim,2);\n        for (int i=0; i<ndim; ++i) {\n            cell(i,0) = v[2*i  ];\n            cell(i,1) = v[2*i+1];\n        }\n        return cell;\n    }\n\n    void read(std::istream& input) {\n        finished = true;\n        std::string token;\n        while (input >> token) {\n            finished = false;\n\n            if (token == \"ndim\") {\n                input >> ndim;\n            }\n            else if (token == \"ascii\") {\n                binary = false;\n            }\n            else if (token == \"text\") {\n                binary = false;\n            }\n            else if (token == \"dx\") {\n                output_format = \"dx\";\n            }\n            else if (token == \"vtk\") {\n                output_format = \"vtk\";\n\n                // get the name of the function\n                if(!(input >> function_name))\n                    MADNESS_EXCEPTION(\"VTK format requires a function name\", 0);\n            }\n            else if (token == \"input\") {\n                input >> input_filename;\n            }\n            else if (token == \"real\") {\n                data_type = \"real\";\n            }\n            else if (token == \"complex\") {\n                data_type = \"complex\";\n            }\n            else if (token == \"line\") {\n                plot_type = \"line\";\n            }\n            else if (token == \"volume\") {\n                plot_type = \"volume\";\n            }\n            else if (token == \"cell\") {\n                cell = read_cell(input);\n            }\n            else if (token == \"plot_cell\") {\n                plot_cell = read_cell(input);\n            }\n            else if (token == \"npt\") {\n                npt = read_npt(input);\n            }\n            else if (token == \"plot\") {\n                break;\n            }\n            else if (token == \"input\") {\n                input >> input_filename;\n            }\n            else if (token == \"output\") {\n                input >> output_filename;\n            }\n            else if (token == \"formula\") {\n                input >> formula;\n            }\n            else if (token == \"quit\" || token == \"exit\") {\n                finished = true;\n                break;\n            }\n            else {\n                print(\"unknown keyword =\", token);\n                MADNESS_EXCEPTION(\"unknown plotter keyword\", 0);\n            }\n        }\n\n        if (finished) return;\n\n        // Implement runtime defaults\n        if (cell.size() <= 0) {\n            MADNESS_ASSERT(ndim>0 && ndim<=6);\n            cell = Tensor<double>(ndim,2);\n            for (int i=0; i<ndim; ++i) cell(i,1) = 1.0;\n        }\n        if (plot_cell.size() <= 0) plot_cell = copy(cell);\n        while (int(npt.size()) < ndim) npt.push_back(101);\n\n        // Warm and fuzzy\n        std::string ff[2] = {\"text\",\"binary\"};\n        print(plot_type,\"plot of\", data_type, \"function in\", ndim,\"dimensions from file\", input_filename, \"to\", ff[binary], \"file\", output_filename);\n        print(\"  compute cell\");\n        print(cell);\n        print(\"  plot cell\");\n        print(plot_cell);\n        print(\"  number of points\");\n        print(npt);\n        print(\"\");\n\n        // Sanity check\n        MADNESS_ASSERT(ndim>0 && ndim<=6);\n        MADNESS_ASSERT(cell.dim(0)==ndim && cell.dim(1)==2);\n        MADNESS_ASSERT(plot_cell.dim(0)==ndim && plot_cell.dim(1)==2);\n    }\n\n    template <typename T, std::size_t NDIM>\n    void dolineplot(const Function<T,NDIM>& f) {\n        Vector<double,NDIM> lo, hi;\n        for (std::size_t i=0; i<NDIM; ++i) {\n            lo[i] = plot_cell(i,0);\n            hi[i] = plot_cell(i,1);\n        }\n\n        plot_line(output_filename.c_str(), npt[0], lo, hi, f);\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void dovolumeplot(const Function<T,NDIM>& f) {\n        if(output_format == \"dx\") {\n            plotdx(f, output_filename.c_str(), plot_cell, npt, binary);\n        }\n        else if(output_format == \"vtk\") {\n            Vector<double, NDIM> plotlo, plothi;\n            Vector<long, NDIM> numpt;\n            for(std::size_t i = 0; i < NDIM; ++i) {\n                plotlo[i] = plot_cell(i, 0);\n                plothi[i] = plot_cell(i, 1);\n                numpt[i] = npt[i];\n            }\n\n            plotvtk_begin(world, output_filename.c_str(), plotlo, plothi,\n                numpt, binary);\n            plotvtk_data(f, function_name.c_str(), world,\n                output_filename.c_str(), plotlo, plothi, numpt, binary);\n            plotvtk_end<NDIM>(world, output_filename.c_str(), binary);\n        }\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void dolineplot(const Function<T,NDIM>& f, const Function<T,NDIM>& g) {\n        Vector<double,NDIM> lo, hi;\n        for (std::size_t i=0; i<NDIM; ++i) {\n            lo[i] = plot_cell(i,0);\n            hi[i] = plot_cell(i,1);\n        }\n\n        plot_line(output_filename.c_str(), npt[0], lo, hi, f, g);\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void dovolumeplot(const Function<T,NDIM>& f, const Function<T,NDIM>& g) {\n        if(output_format == \"dx\") {\n          MADNESS_EXCEPTION(\"plot type not supported with user functions!\",0);\n        }\n        else if(output_format == \"vtk\") {\n            Vector<double, NDIM> plotlo, plothi;\n            Vector<long, NDIM> numpt;\n            for(std::size_t i = 0; i < NDIM; ++i) {\n                plotlo[i] = plot_cell(i, 0);\n                plothi[i] = plot_cell(i, 1);\n                numpt[i] = npt[i];\n            }\n\n            plotvtk_begin(world, output_filename.c_str(), plotlo, plothi,\n                numpt, binary);\n            plotvtk_data(f, function_name.c_str(), world,\n                output_filename.c_str(), plotlo, plothi, numpt, binary);\n            plotvtk_data(g, function_name.c_str(), world,\n                output_filename.c_str(), plotlo, plothi, numpt, binary);\n            plotvtk_end<NDIM>(world, output_filename.c_str(), binary);\n        }\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    void doplot1() {\n\n        // Set up environment for this dimension\n        FunctionDefaults<NDIM>::set_cell(cell);\n\n        // Load the function\n        Function<T,NDIM> f;\n        archive::ParallelInputArchive<madness::archive::BinaryFstreamInputArchive> ar(world, input_filename.c_str());\n        ar & f;\n\n        // Load the user's function\n        if (formula != \"\") {\n         typedef FunctionFactory<T,NDIM> factoryT;\n         typedef std::shared_ptr< FunctionFunctorInterface<T, NDIM> > functorT;\n         Function<T,NDIM> pFunc = factoryT(world).functor(functorT(\n                        new ParserHandler<T,NDIM>(\"exp(-abs(r))\")));\n\n          if      (plot_type == \"volume\")    dovolumeplot<T,NDIM>(f,pFunc);\n          else if (plot_type == \"line\")      dolineplot<T,NDIM>(f,pFunc);\n          else    MADNESS_EXCEPTION(\"unknown plot type\",0);\n        } // end if formula present\n        else {\n          if      (plot_type == \"volume\")    dovolumeplot<T,NDIM>(f);\n          else if (plot_type == \"line\")      dolineplot<T,NDIM>(f);\n          else    MADNESS_EXCEPTION(\"unknown plot type\",0);\n        }\n    }\n\n\n    template <typename T>\n    void doplot() {\n        // Redirect to right dimension\n        if      (ndim == 1) doplot1<T,1>();\n        else if (ndim == 2) doplot1<T,2>();\n        else if (ndim == 3) doplot1<T,3>();\n#ifdef FUNCTION_INSTANTIATE_4\n        else if (ndim == 4) doplot1<T,4>();\n#endif\n//         else if (ndim == 5) doplot1<T,5>();\n//         else if (ndim == 6) doplot1<T,6>();\n        else                MADNESS_EXCEPTION(\"invalid ndim\", ndim);\n    }\n\n    void plot() {\n        // Redirect to right data type\n        if (data_type == \"double\") {\n            doplot<double>();\n        }\n        else if (data_type == \"complex\") {\n            doplot< std::complex<double> >();\n        }\n        else {\n            MADNESS_EXCEPTION(\"uknown data type\",0);\n        }\n    }\n};\n\nint main(int argc, char**argv) {\n    initialize(argc, argv);\n\n    try {\n        World world(SafeMPI::COMM_WORLD);\n        bool done = false;\n        if (world.rank() == 0) {\n            for (int i=0; i<argc; ++i) {\n                if (!strcmp(argv[i],\"--help\")) {\n                    print(help);\n                    done = true;\n                }\n            }\n        }\n        world.gop.broadcast(done);\n        if (!done) {\n            startup(world,argc,argv);\n            if (world.rank() == 0) print(\" \");\n\n            Plotter plotter(world);\n            while (1) {\n                if (world.rank() == 0) {\n                    plotter.read(std::cin);\n                }\n                world.gop.broadcast_serializable(plotter, 0);\n                if (plotter.finished) break;\n                plotter.plot();\n            }\n        }\n\n        world.gop.fence();\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (const char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    finalize();\n    return 0;\n}\n\n"
  },
  {
    "path": "src/madness/mra/mw.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2025 Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#ifndef MADNESS_MRA_MW_H__INCLUDED\n#define MADNESS_MRA_MW_H__INCLUDED\n\n#include <madness/madness_config.h>\n#include <madness/mra/functypedefs.h>\n#include <madness/mra/function_interface.h>\n#include <madness/mra/legendre.h>\n\n#include <array>\n#include <functional>\n#include <vector>\n\nnamespace madness {\n\n/// this FunctionFunctorInterface evaluates Legendre scaling functions\ntemplate <std::size_t NDIM, typename Enabler = void>\nstruct ScalingFunctionFunctor;\n\n// 1-d scaling function in {n,l} box on [-L,L]\ntemplate <>\nstruct ScalingFunctionFunctor<1> : public FunctionFunctorInterface<double, 1> {\n  double L = -1;\n  Level n = -1;\n  Translation l;\n  Translation twon;\n  int k = -1;\n  double one_over_twon;\n  double sqrt_twon;\n  double one_over_twoL;\n  double one_over_sqrttwoL;\n\n  ScalingFunctionFunctor() = default;\n\n  ScalingFunctionFunctor(double L, Level n, Translation l, int k)\n      : L(L), n(n), l(l), twon(1 << n), k(k), one_over_twon(1. / twon),\n        sqrt_twon(sqrt(twon)), one_over_twoL(0.5/L), one_over_sqrttwoL(sqrt(one_over_twoL)) {\n    MADNESS_ASSERT(L>0);\n    MADNESS_ASSERT(n>=0);\n    MADNESS_ASSERT(l >= 0 && l < twon);\n    MADNESS_ASSERT(k>=0);\n  }\n  double operator()(const coord_1d &r) const final {\n    const auto x = (r[0] + L)/(2 * L);\n    double values[50];\n    if (x < l * one_over_twon || x > (l + 1) * one_over_twon)\n      return 0.;\n    else {\n      MADNESS_ASSERT(static_cast<size_t>(k) < sizeof(values) / sizeof(double));\n      legendre_scaling_functions(twon * x - l, k+1, values);\n    }\n    return values[k] * sqrt_twon * one_over_sqrttwoL;\n  }\n\n  virtual Level special_level() const final {\n    return n;\n  }\n\n  virtual std::vector< Vector<double,1> > special_points() const final {\n    return std::vector< Vector<double,1> >(1, Vector<double,1>{-L + 2*L*std::max(l+0.5,0.) * one_over_twon});\n  }\n};\n\ntemplate <std::size_t NDIM>\nstruct ScalingFunctionFunctor<NDIM, std::enable_if_t<std::greater{}(NDIM,1)>> : public FunctionFunctorInterface<double, NDIM> {\n  std::array<double, NDIM> L;\n  Key<NDIM> key;\n  std::array<int, NDIM> k;\n  std::array<ScalingFunctionFunctor<1>, NDIM> sf1;\n\n  ScalingFunctionFunctor(const std::array<double, NDIM>& L, const Key<NDIM>& key, const std::array<int, NDIM>& k)\n      : L(L), key(key), k(k) {\n    for (int d = 0; d != NDIM; ++d)\n      sf1[d] = ScalingFunctionFunctor<1>(L[d], key.level(), key[d], k.at(d));\n  }\n  double operator()(const Vector<double, NDIM> &r) const final {\n    double result = 1.0;\n    size_t d = 0;\n    while (result != 0. && d < NDIM) {\n      result *= sf1[d]({r[d]});\n      ++d;\n    }\n    return result;\n  }\n\n  virtual Level special_level() const final {\n    return key.level();\n  }\n\n  virtual std::vector< Vector<double,NDIM> > special_points() const final {\n    Vector<double, NDIM> r;\n    for (int d = 0; d != NDIM; ++d) {\n      r[d] = sf1[d].special_points().at(0)[0];\n    }\n    return std::vector<Vector<double, NDIM>>(1, r);\n  }\n};\n\n}\n\n#endif // MADNESS_MRA_MW_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/mypmap.h",
    "content": "// #include <madness/world/MADworld.h>\n// #include <madness/misc/misc.h>\n// #include <madness/tensor/tensor.h>\n// #include <madness/misc/ran.h>\n// #include <madness/mra/key.h>\n// #include <madness/mra/funcimpl.h>\n\n\nThis is not presently in use but is left here since it is actually useful.  It provides a process map that can use a cost function for partitioning subtrees.  Originally written by Rebecca Hartman-Baker.\n\nnamespace madness {\n    /// Procmap implemented using Tree of TreeCoords\n\n    template <int D>\n    class MyPmap : public WorldDCPmapInterface< Key<D> > {\n    private:\n        unsigned int map_type; // 0 = simple map, 1 = gaussian distributed map, 2 = treecoords list\n        const int nproc;\n        const int n;\n        std::shared_ptr< ProcMapImpl<D> > tree_map; // for map_type 2\n        Tensor<ProcessID> simple_key_map; // map of keys at level n, for map_type 1\n        typedef Key<D> KeyD;\n\n        /// private method that builds the Tree underlying the procmap\n        void build_tree_map(std::vector< TreeCoords<D> > v) {\n            tree_map = std::shared_ptr< ProcMapImpl<D> > (new ProcMapImpl<D>(v));\n        }\n\n        ProcessID simple_hash(const KeyD& key) const {\n\t    if (key.level() == 0) return 0;\n            KeyD parent = (key.level() > n) ? key.parent(key.level()-n) : key;\n            return (parent.hash()%nproc);\n        }\n        ProcessID not_so_simple_hash(const KeyD& key) const {\n            KeyD parent = (key.level() > n) ? key.parent(key.level()-n) : key;\n            return simple_key_map((const long *) &(parent.translation()[0]));\n        }\n\n        void prepare_not_so_simple_map(World& world) {\n\t    std::vector<long> vdim(D);\n            for (int i=0; i<D; ++i) vdim[i] = 1L<<n;\n            simple_key_map = Tensor<ProcessID>(vdim);\n\n            std::list< std::pair<KeyD,double> > costmap;\n            Vector<Translation,D> l;\n            long cent = (1L<<n) / 2;\n            for (TensorIterator<ProcessID> iter=simple_key_map.unary_iterator(0,false,false); iter._p0; ++iter) {\n                double dist = 0.01;\n                for (int i=0; i<D; ++i) {\n                    l[i] = iter.ind[i];\n                    dist += (l[i] - cent)*(l[i] - cent);\n                }\n                double cost = 1.0/dist; // actually dist squared\n                cost *= (1.0 + 0.001*RandomValue<double>()); // To shuffle (nearly) equal values\n                costmap.push_back(std::pair<KeyD,double>(KeyD(n,l),cost));\n            }\n            costmap.sort(costmapcmp);\n//            if (world.rank() == 0) {\n//                for (typename std::list< std::pair<KeyD,double> >::iterator it=costmap.begin(); it!=costmap.end(); ++it) {\n//                    madness::print(\"costmap\", it->first, it->second);\n//                }\n//            }\n            ProcessID p = 0;\n            for (typename std::list< std::pair<KeyD,double> >::iterator it=costmap.begin(); it!=costmap.end(); ++it) {\n                const long *l = (const long *) &(it->first.translation()[0]);\n                simple_key_map(l)  = p;\n                ++p;\n                if (p == world.size()) p = 0;\n            }\n//            if (world.rank() == 0) {\n//                madness::print(\"SIMPLE MAP\", D,\"\\n\", simple_key_map);\n//            }\n        }\n\n    public:\n        MyPmap() : map_type(2) {};\n\n        static bool costmapcmp(const std::pair<KeyD,double>& a, const std::pair<KeyD,double>& b) {\n            return a.second > b.second;\n        }\n        MyPmap(World& world)\n                : map_type(1)\n                , nproc(world.nproc())\n                , n(int((std::log((double)world.size())/std::log(2.0)+3)/D) + 2) { // 16*nproc = 2^(nD)\n            // We set n to have about 16 tasks per processor and we try to\n            // give each process a mix of large, medium, and small\n            // tasks.  Currently estimate cost as inversely\n            // proportional to distance from center but we could\n            // enable the user to provide a function.\n\n            //if (world.rank() == 0) madness::print(\"DIM\",D,\"N IN MAP IS\",n);\n            prepare_not_so_simple_map(world);\n        }\n\n        MyPmap(World& world, unsigned int map_type, int n=100)\n                : map_type(map_type)\n                , nproc(world.nproc())\n                , n(n) {\n            if (map_type==1) {\n                n =int((std::log((double)world.size())/std::log(2.0)+3)/D) + 2; // 16*nproc = 2^(nD)\n                prepare_not_so_simple_map(world);\n            }\n        }\n\n        MyPmap(World& world, std::vector<TreeCoords<D> > v) : map_type(2), nproc(world.nproc()), n(0) {\n            build_tree_map(v);\n        }\n\n        MyPmap(const MyPmap<D>& other) : map_type(other.map_type), nproc(other.nproc), n(other.n), tree_map(other.tree_map) {};\n\n        MyPmap<D>& operator=(const MyPmap<D>& other) {\n            if (this != &other) {\n                map_type = other.map_type;\n\t\tsimple_key_map = other.simple_key_map; // shallow copy\n                nproc = other.nproc;\n                n = other.n;\n                tree_map = other.tree_map;\n            }\n            return *this;\n        }\n\n        void print() const {\n            if (map_type == 2) {\n                tree_map->print();\n            } else if (map_type == 1) {\n\t        madness::print(\"MyPmap: gaussian distributed map with n =\", n);\n\t    } else {\n                madness::print(\"MyPmap: simple map with n =\", n);\n            }\n        }\n\n        /// Find the owner of a given key\n        ProcessID owner(const KeyD& key) const {\n\t    if (map_type == 0) {\n                return simple_hash(key);\n\t    } else if (map_type == 1) {\n\t        return not_so_simple_hash(key);\n            } else {\n                return tree_map->find_owner(key);\n            }\n        }\n    };\n}\n"
  },
  {
    "path": "src/madness/mra/nonlinsol.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#ifndef MADNESS_EXAMPLES_NONLINSOL_H__INCLUDED\n#define MADNESS_EXAMPLES_NONLINSOL_H__INCLUDED\n\n/*!\n  \\file nonlinsol.h\n  \\brief Implementation of Krylov-subspace nonlinear equation solver\n  \\defgroup nonlinearsolve Simple Krylov-subspace nonlinear equation solver \n  \\ingroup mra\n\n  This class implements the solver described in \n  \\verbatim\n   R. J. Harrison, Krylov subspace accelerated inexact newton method for linear\n   and nonlinear equations, J. Comput. Chem. 25 (2004), no. 3, 328-334.\n  \\endverbatim\n */\n\n#include <madness/mra/mra.h>\n#include <madness/tensor/solvers.h>\n\nnamespace madness {\n\n\n\t/// check for subspace linear dependency\n\n\t/// @param[in]     Q\tthe input matrix for KAIN\n\t/// @param[in,out] c\tthe coefficients for constructing the new solution\n    /// @param[in]     rcondtol rcond less than this will cause the subspace to be shrunk due to linear dependence\n    /// @param[in]     cabsmax  maximum element of c greater than this will cause the subspace to be shrunk due to linear dependence\n\ttemplate<typename C>\n\tvoid check_linear_dependence(const Tensor<C>& Q, Tensor<C>& c, const double rcondtol, const double cabsmax,\n\t\t\tbool do_print=true) {\n\t\tdouble rcond = 1e-12;\n\t\tint m = c.dim(0);\n\n\t\twhile(1){\n\t\t\tc = KAIN(Q, rcond);\n\t\t\t//if (world.rank() == 0) print(\"kain c:\", c);\n//\t\t\tif(std::abs(c[m - 1]) < 3.0){\n\t\t\tif (c.absmax()<cabsmax) {\n\t\t\t\tbreak;\n\t\t\t} else  if(rcond < rcondtol){\n\t\t\t\tif (do_print) print(\"Increasing subspace singular value threshold \", c[m - 1], rcond);\n\t\t\t\trcond *= 100;\n\t\t\t} else {\n\t\t\t\tif (do_print) print(\"Forcing full step due to subspace malfunction\");\n\t\t\t\tc = 0.0;\n\t\t\t\tc[m - 1] = 1.0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/// A simple Krylov-subspace nonlinear equation solver\n\n    /// \\ingroup nonlinearsolve\n\ttemplate<size_t NDIM>\n\tclass NonlinearSolverND {\n\t\tunsigned int maxsub; ///< Maximum size of subspace dimension\n\n\t\tstd::vector<Function<double,NDIM> > ulist, rlist;\n\t\treal_tensor Q;\n\n\tpublic:\n\t\tvoid set_maxsub(const unsigned int &new_maxsub){\n\t\t\tmaxsub = new_maxsub;\n\t\t}\n\t\tunsigned int get_maxsub()const{\n\t\t\tconst unsigned int tmp = maxsub;\n\t\t\treturn tmp;\n\t\t}\n\t\tbool do_print;\n\n\t\tNonlinearSolverND(unsigned int maxsub = 10) : maxsub(maxsub), do_print(false) {}\n\n\t\t/// Computes next trial solution vector\n\n\t\t/// You are responsible for performing step restriction or line search\n\t\t/// (not necessary for linear problems).\n\t\t///\n\t\t/// @param u Current solution vector\n\t\t/// @param r Corresponding residual\n\t\t/// @return Next trial solution vector\n\t\t/// @param[in]          rcondtol rcond less than this will cause the subspace to be shrunk due to linear dependence\n\t\t/// @param[in]          cabsmax  maximum element of c greater than this will cause the subspace to be shrunk due to linear dependence\n\t\tFunction<double,NDIM> update(const Function<double,NDIM>& u, const Function<double,NDIM>& r,\n\t\t\t\tconst double rcondtol=1e-8, const double cabsmax=1000.0) {\n\t\t\tif (maxsub==1) return u-r;\n\t\t\tint iter = ulist.size();\n\t\t\tulist.push_back(u);\n\t\t\trlist.push_back(r);\n\n\t\t\t// Solve subspace equations\n\t\t\treal_tensor Qnew(iter+1,iter+1);\n\t\t\tif (iter>0) Qnew(Slice(0,-2),Slice(0,-2)) = Q;\n\t\t\tfor (int i=0; i<=iter; i++) {\n\t\t\t\tQnew(i,iter) = inner(ulist[i],rlist[iter]);\n\t\t\t\tQnew(iter,i) = inner(ulist[iter],rlist[i]);\n\t\t\t}\n\t\t\t// ulist and rlist are now either compressed or redundant -- change back to compressed or reconstructed0\n\t\t\tTreeState operating_state = u.get_impl()->get_tensor_type()==TT_FULL ? compressed : reconstructed;\n\t\t\tchange_tree_state(ulist,operating_state,true);\n\t\t\tchange_tree_state(rlist,operating_state,true);\n\n\t\t\tQ = Qnew;\n\t\t\treal_tensor c = KAIN(Q);\n\t\t\tcheck_linear_dependence(Q,c,rcondtol,cabsmax);\n\t\t\tif (do_print) print(\"subspace solution\",c);\n\n\t\t\t// Form new solution in u, gaxpy in done in reconstructed or compressed state\n\t\t\tFunction<double,NDIM> unew = FunctionFactory<double,NDIM>(u.world()).treestate(operating_state);\n\t\t\t// if (ulist[0].is_compressed()) unew.compress();\n\t\t\tfor (int i=0; i<=iter; i++) {\n\t\t\t\tunew.gaxpy(1.0,ulist[i], c[i]);\n\t\t\t\tunew.gaxpy(1.0,rlist[i],-c[i]);\n\t\t\t}\n\t\t\tunew.truncate();\n\n\t\t\tif (ulist.size() == maxsub) {\n\t\t\t\tulist.erase(ulist.begin());\n\t\t\t\trlist.erase(rlist.begin());\n\t\t\t\tQ = copy(Q(Slice(1,-1),Slice(1,-1)));\n\t\t\t}\n\t\t\treturn unew;\n\t\t}\n\t};\n\n\t// backwards compatibility\n\ttypedef NonlinearSolverND<3> NonlinearSolver;\n\n\n\ttemplate <class T>\n\tstruct default_allocator {\n        T operator()() {return T();}\n    };\n\n\n    // The default constructor for functions does not initialize\n    // them to any value, but the solver needs functions initialized\n    // to zero for which we also need the world object.\n    template<typename T, std::size_t NDIM>\n    struct vector_function_allocator {\n        World& world;\n        const int n=-1;\n\n        /// @param[in]\tworld\tthe world\n        /// @param[in]\tnn\t\tthe number of functions in a given vector\n        vector_function_allocator(World& world, const int nn) : world(world), n(nn) {}\n\n        /// allocate a vector of n empty functions\n        std::vector<Function<T, NDIM> > operator()() {\n            return zero_functions<T, NDIM>(world, n);\n        }\n    };\n\n\n\n    /// Generalized version of NonlinearSolver not limited to a single madness function\n\n    /// \\ingroup nonlinearsolve \n    ///\n    /// This solves the equation \\f$r(u) = 0\\f$ where u and r are both\n    /// of type \\c T and inner products between two items of type \\c T\n    /// produce a number of type \\c C (defaulting to double).  The type \\c T\n    /// must support storage in an STL vector, scaling by a constant\n    /// of type \\c C, inplace addition (+=), subtraction, allocation with\n    /// value zero, and inner products computed with the interface \\c\n    /// inner(a,b).  Have a look in examples/testsolver.cc for a\n    /// simple but complete example, and in examples/h2dynamic.cc for a \n    /// more complex example.\n    ///\n    /// I've not yet tested with anything except \\c C=double and I think\n    /// that the KAIN routine will need extending for anything else.\n    template <class T, class C = double, class Alloc = default_allocator<T> >\n    class XNonlinearSolver {\n        unsigned int maxsub; ///< Maximum size of subspace dimension\n        Alloc alloc;\n        std::vector<T> ulist, rlist, plist; ///< Subspace information\n        Tensor<C> Q;\n        Tensor<C> c;\t\t///< coefficients for linear combination\n    public:\n        bool do_print;\n\n\tXNonlinearSolver(const Alloc& alloc = Alloc(),bool print=false)\n            : maxsub(10)\n            , alloc(alloc)\n    \t\t, do_print(print)\n        {}\n\n\tXNonlinearSolver(const XNonlinearSolver& other)\n            : maxsub(other.maxsub)\n            , alloc(other.alloc)\n\t\t\t, do_print(other.do_print)\n        {}\n\n\n\tstd::vector<T>& get_ulist() {return ulist;}\n\tstd::vector<T>& get_rlist() {return rlist;}\n\tstd::vector<T>& get_plist() {return plist;}\n\n\tvoid set_maxsub(int maxsub) {this->maxsub = maxsub;}\n\tTensor<C> get_c() const {return c;}\n\n\tvoid clear_subspace() {\n\t\tulist.clear();\n\t\trlist.clear();\n\t\tplist.clear();\n\t\tQ=Tensor<C>();\n\t}\n\n\t/// Computes next trial solution vector\n\n\t/// You are responsible for performing step restriction or line search\n\t/// (not necessary for linear problems).\n\t///\n\t/// @param u Current solution vector\n\t/// @param r Corresponding residual\n\t/// @return Next trial solution vector\n    /// @param[in]          rcondtol rcond less than this will cause the subspace to be shrunk due to linear dependence\n    /// @param[in]          cabsmax  maximum element of c greater than this will cause the subspace to be shrunk due to li\n\tT update(const T& u, const T& r, const double rcondtol=1e-8, const double cabsmax=1000.0) {\n\t\tif (maxsub==1) return u-r;\n\t\tint iter = ulist.size();\n\t\tulist.push_back(u);\n\t\trlist.push_back(r);\n\n\t\t// Solve subspace equations\n\t\tTensor<C> Qnew(iter+1,iter+1);\n\t\tif (iter>0) Qnew(Slice(0,-2),Slice(0,-2)) = Q;\n\t\tfor (int i=0; i<=iter; i++) {\n\t\t\tQnew(i,iter) = inner(ulist[i],rlist[iter]);\n\t\t\tQnew(iter,i) = inner(ulist[iter],rlist[i]);\n\t\t}\n\t\tQ = Qnew;\n\t\tc = KAIN(Q);\n\n\t\tcheck_linear_dependence(Q,c,rcondtol,cabsmax,do_print);\n\t\tif (do_print) print(\"subspace solution\",c);\n\n\t\t// Form new solution in u\n\t\tT unew = alloc();\n\t\tfor (int i=0; i<=iter; i++) {\n\t\t\tunew += (ulist[i] - rlist[i])*c[i];\n\t\t}\n\n\t\tif (ulist.size() == maxsub) {\n\t\t\tulist.erase(ulist.begin());\n\t\t\trlist.erase(rlist.begin());\n\t\t\tQ = copy(Q(Slice(1,-1),Slice(1,-1)));\n\t\t}\n\t\treturn unew;\n\t}\n\n    /// Computes next trial solution vector\n\n    /// this version of update avoids using the residual by computing it on the fly\n    /// note the distinction between u_preliminary (input) and u_kain (output)\n    /// residual[i] = u_kain[i] - u_preliminary[i+1]\n    /// ulist[i] = u_kain[i]\n    /// plist[i] = u_preliminary[i]\n    /// @param[in] u_preliminary: new solution before KAIN\n    /// @param[out] u_kain: new solution after KAIN\n    T update(const T& u_preliminary, const double rcondtol=1e-8, const double cabsmax=1000.0) {\n\t\tif (maxsub==1) return u_preliminary;\n\n\t\t// check if T is a madness function or madness function vector, then we need to know the tree state\n\t\tconstexpr bool do_tree_states = is_madness_function<T>::value || is_madness_function_vector<T>::value;\n\n\t\t// works for both Function and FunctionVector\n\t\tauto get_operating_state = [](const T& v) {\n\t\t\tTreeState state=unknown;\n\t\t\tif constexpr (is_madness_function<T>::value) {\n\t\t\t\tstate=v.get_impl()->get_tensor_type()==TT_FULL ? compressed : reconstructed;\n\t\t\t} else if constexpr (is_madness_function_vector<T>::value) {\n\t\t\t\tstate=v[0].get_impl()->get_tensor_type()==TT_FULL ? compressed : reconstructed;\n\t\t\t}\n\t\t\treturn state;\n\t\t};\n\n\t\t// do we work in compressed or reconstructed form?\n\t\tTreeState operating_state = get_operating_state(u_preliminary);\n\n\t\tint iter = ulist.size()-1;\n\t\tMADNESS_CHECK_THROW(iter>=0,\"ulist must have size==1 at least -- forgot to initialize?\");\n\t\tplist.push_back(u_preliminary);\n\t\tMADNESS_CHECK_THROW(ulist.size()+1==plist.size(),\"ulist and plist have incorrect size -- forgot to initialize?\");\n\n\n\t\t// Solve subspace equations\n\t\t// Q_ij = < u_kain[i] | r[j] > = < u_kain[i] | u_kain[j] - u_preliminary[j+1] >\n\t\tTensor<C> Qnew(iter+1,iter+1);\n\t\tif (iter>0) Qnew(Slice(0,-2),Slice(0,-2)) = Q;\n\t\tfor (int i=0; i<=iter; i++) {\n\t\t\tQnew(i,iter) = inner(ulist[i],ulist[iter]) - inner(ulist[i],plist[iter+1]);\n\t\t\tQnew(iter,i) = inner(ulist[iter],ulist[i]) - inner(ulist[iter],plist[i+1]);\n\t\t}\n\t\t// ulist and rlist are now either compressed or redundant -- change back to compressed or reconstructed0\n\t\tif constexpr (do_tree_states) {\n\t\t\tfor (auto& u : ulist) change_tree_state(u,operating_state,true);\n\t\t\tfor (auto& p : plist) change_tree_state(p,operating_state,true);\n\t\t}\n\n\t\tQ = Qnew;\n\t\tc = KAIN(Q);\n\n\t\tcheck_linear_dependence(Q,c,rcondtol,cabsmax,do_print);\n\t\tif (do_print) print(\"subspace solution\",c);\n\n\t\t// Form new solution in u\n\t\tT unew = alloc();\n\t\tfor (int i=0; i<=iter; i++) {\n//\t\t\tunew += (ulist[i] - rlist[i])*c[i];\n\t\t\tunew += (plist[i+1])*c[i];\n\t\t}\n\t\tif constexpr (is_madness_function<T>::value) unew.reconstruct();\n\t\tif constexpr (is_madness_function_vector<T>::value) reconstruct(unew);\n\t\tulist.push_back(unew);\n\n\t\tif (ulist.size() == maxsub) {\n\t\t\tulist.erase(ulist.begin());\n\t\t\tif (not rlist.empty()) rlist.erase(rlist.begin());\n\t\t\tif (not plist.empty()) plist.erase(plist.begin());\n\t\t\tQ = copy(Q(Slice(1,-1),Slice(1,-1)));\n\t\t}\n\t\treturn unew;\n\t}\n\n    void initialize(const T& u_initial) {\n\t\tclear_subspace();\n\t\tulist.push_back(u_initial); // initial guess\n\t\tplist.push_back(alloc());\t// empty function\n\t}\n\n    };\n\n\n    template<typename T, std::size_t NDIM>\n    static inline XNonlinearSolver<std::vector<Function<T,NDIM>>,T,vector_function_allocator<T,NDIM>>\n    nonlinear_vector_solver(World& world, const long nvec) {\n        auto alloc=vector_function_allocator<T,NDIM>(world,nvec);\n        return XNonlinearSolver<std::vector<Function<T,NDIM>>,T,vector_function_allocator<T,NDIM>>(alloc);\n    };\n\n\n    typedef XNonlinearSolver<std::vector<Function<double,3>>,double,vector_function_allocator<double,3>> NonlinearVectorSolver_3d;\n    typedef XNonlinearSolver<std::vector<Function<double,6>>,double,vector_function_allocator<double,6>> NonlinearVectorSolver_6d;\n\n\n}\n#endif\n"
  },
  {
    "path": "src/madness/mra/operator.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_MRA_OPERATOR_H__INCLUDED\n#define MADNESS_MRA_OPERATOR_H__INCLUDED\n\n/// \\file mra/operator.h\n/// \\brief Implements most functionality of separated operators\n\n/// \\ingroup function\n\n#include <type_traits>\n#include <limits.h>\n#include <madness/mra/adquad.h>\n#include <madness/tensor/aligned.h>\n#include <madness/tensor/tensor_lapack.h>\n#include <madness/constants.h>\n\n#include <madness/mra/simplecache.h>\n#include <madness/mra/convolution1d.h>\n#include <madness/mra/displacements.h>\n#include <madness/mra/function_common_data.h>\n#include <madness/mra/gfit.h>\n#include <madness/mra/operatorinfo.h>\n\nnamespace madness {\n\n    template<typename T, std::size_t NDIM>\n    class Function;\n\n    template<typename T, std::size_t NDIM>\n    class SeparatedConvolution;\n\n    template<typename T, std::size_t NDIM>\n    class CCPairFunction;\n\n    template <typename T, typename R, std::size_t NDIM, std::size_t KDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n    apply(const SeparatedConvolution<T,KDIM>& op, const std::vector< Function<R,NDIM> > f);\n\n    template<typename T, std::size_t NDIM>\n    std::vector<CCPairFunction<T,NDIM>> apply(const SeparatedConvolution<T,NDIM>& op, const std::vector<CCPairFunction<T,NDIM>>& argument);\n\n    template<typename T, std::size_t NDIM>\n    std::vector<CCPairFunction<T,NDIM>> apply(const SeparatedConvolution<T,NDIM/2>& op, const std::vector<CCPairFunction<T,NDIM>>& argument);\n\n    template<typename T, std::size_t NDIM>\n    CCPairFunction<T,NDIM> apply(const SeparatedConvolution<T,NDIM>& op, const CCPairFunction<T,NDIM>& argument);\n\n    template<typename T, std::size_t NDIM>\n    CCPairFunction<T,NDIM> apply(const SeparatedConvolution<T,NDIM/2>& op, const CCPairFunction<T,NDIM>& argument);\n\n    /// SeparatedConvolutionInternal keeps data for 1 term and all dimensions and 1 displacement\n    /// Why is this here?? Why don't you just use ConvolutionND in SeparatedConvolutionData??\n    template <typename Q, std::size_t NDIM>\n    struct SeparatedConvolutionInternal {\n        double norm;\n        const ConvolutionData1D<Q>* ops[NDIM];\n    };\n\n    /// SeparatedConvolutionData keeps data for all terms, all dimensions\n\n    /// this struct is used to cache the data that are generated by\n    template <typename Q, std::size_t NDIM>\n    struct SeparatedConvolutionData {\n        std::vector< SeparatedConvolutionInternal<Q,NDIM> > muops;\n        double norm;\n\n        SeparatedConvolutionData(int rank) : muops(rank), norm(0.0) {}\n        SeparatedConvolutionData(const SeparatedConvolutionData<Q,NDIM>& q) {\n            muops = q.muops;\n            norm = q.norm;\n        }\n    };\n\n\n    /// Convolutions in separated form (including Gaussian)\n\n    /* this stuff is very confusing, poorly commented, and extremely poorly named!\n\n    I think it works like this:\n    We try to apply transition matrices to the compressed form of function coefficients.\n    Most of the code is about caching these transition matrices. They are cached (key of the map is the displacement)\n    in the SimpleCache \"data\", which is of type SeparatedConvolutionData, which keeps the matrices\n    for all separated terms and dimensions. These SeparatedConvolutionData are constructed using\n    ConvolutionND \"ops\", which is constructed at the construction of the SeparatedConvolution.\n\n                        SeparatedConvolution (all terms, all dim, all displacements)\n\n                    construction                                            storage\n\n                                                                    SimpleCache<SeparatedConvolutionData>\n                                                                        (all terms, all dim) / (all disp)\n             vector<ConvolutionND>\n             (1 term, all dim) / (all terms)\n                                                                    vector<SeparatedConvolutionInternal>\n                                                                        (1 term, all dim) / (all terms)\n\n\n                                                                    vector<ConvolutionData1D>\n                                                                        (1 term, 1 dim) / (all dim)\n\n    ConvolutionND and SeparatedConvolutionInternal both point to the same data in ConvolutionData1D.\n    Why we need SeparatedConvolutionInternal in the first place I have no idea. ConvolutionND has the global\n    factor, and SeparatedConvolutionInternal has a norm.\n\n\n    */\n\n    template <typename Q, std::size_t NDIM>\n    class SeparatedConvolution : public WorldObject< SeparatedConvolution<Q,NDIM> > {\n    public:\n\n        typedef Q opT;  ///< The apply function uses this to infer resultT=opT*inputT\n\n        OperatorInfo info;\n\n        bool doleaves;  ///< If should be applied to leaf coefficients ... false by default\n\n      private:\n        array_of_bools<NDIM>\n            lattice_summed_;    ///< If lattice_summed_[d] is true, sum over lattice translations along axis d\n                                ///< N.B. the resulting kernel can be non-zero at both ends of the simulation cell along that axis\n        array_of_bools<NDIM> func_domain_is_periodic_{false};    ///< If domain_is_periodic_[d]==false and lattice_summed_[d]==false,\n                                                            ///< ignore periodicity of BC when applying this to function\n        std::array<KernelRange, NDIM> range;  ///< kernel range is along axis d is limited by range[d] if it's nonnull\n\n      public:\n        bool modified_=false;     ///< use modified NS form\n        int particle_=1;        ///< must only be 1 or 2\n        bool destructive_=false;\t///< destroy the argument or restore it (expensive for 6d functions)\n        bool print_timings=false;\n\n        typedef Key<NDIM> keyT;\n        const static size_t opdim=NDIM;\n        Timer timer_full;\n        Timer timer_low_transf;\n        Timer timer_low_accumulate;\n        Timer timer_stats_accumulate;\n\n    private:\n\n\n        mutable std::vector< ConvolutionND<Q,NDIM> > ops;   ///< ConvolutionND keeps data for 1 term, all dimensions, 1 displacement\n        const int k;\n        const FunctionCommonData<Q,NDIM>& cdata;\n        int rank;\n        const std::vector<long> vk;\n        const std::vector<long> v2k;\n        const std::vector<Slice> s0;\n\n        // SeparatedConvolutionData keeps data for all terms and all dimensions and 1 displacement\n        mutable SimpleCache< SeparatedConvolutionData<Q,NDIM>, NDIM > data; ///< cache for all terms, dims and displacements\n        mutable SimpleCache< SeparatedConvolutionData<Q,NDIM>, 2*NDIM > mod_data; ///< cache for all terms, dims and displacements\n\n    public:\n\n        bool& modified() {return modified_;}\n        const bool& modified() const {return modified_;}\n\n        int& particle() {return particle_;}\n        const int& particle() const {return particle_;}\n        SeparatedConvolution<Q,NDIM>& set_particle(const int p) {\n            if (p!=1 and p!=2) throw std::runtime_error(\"particle must be 1 or 2\");\n            particle_=p;\n            return *this;\n        }\n\n        bool& destructive() {return destructive_;}\n        const bool& destructive() const {return destructive_;}\n\n        const double& gamma() const {return info.mu;}\n        const double& mu() const {return info.mu;}\n        int get_rank() const { return rank; }\n        int get_k() const { return k; }\n        const std::vector<ConvolutionND<Q,NDIM>>& get_ops() const { return ops; }\n        const std::array<KernelRange, NDIM>& get_range() const { return range; }\n        bool range_restricted() const { return std::any_of(range.begin(), range.end(), [](const auto& v) { return v.finite(); }); }\n\n    private:\n\n        /// laziness for calling lists: which terms to apply\n        struct ApplyTerms {\n            ApplyTerms() : r_term(false), t_term(false) {}\n            bool r_term;\n            bool t_term;\n            bool any_terms() const {return r_term or t_term;}\n        };\n\n        /// too lazy for extended calling lists\n        struct Transformation {\n            long r;             // Effective rank of transformation\n            const Q* U;         // Ptr to matrix\n            const Q* VT;\n        };\n\n        static inline std::pair<Tensor<double>,Tensor<double>>\n        make_coeff_for_operator(World& world, OperatorInfo& info,\n                                const std::array<LatticeRange, NDIM>& lattice_ranges) {\n\n          const Tensor<double> &cell_width =\n              FunctionDefaults<NDIM>::get_cell_width();\n          double hi = cell_width.normf(); // Diagonal width of cell\n          // Extend kernel range for lattice summation\n          // N.B. if have periodic boundaries, extend range just in case will be using periodic domain\n          bool lattice_summed_any = std::any_of(\n              lattice_ranges.begin(), lattice_ranges.end(), [](const LatticeRange& b){ return static_cast<bool>(b); });\n          bool infinite_summed_any = false;\n          for (size_t i = 0; i < NDIM; i++) {\n            if (lattice_ranges[i].infinite() && info.range[i].infinite()) {\n              infinite_summed_any = true;\n              break;\n            }\n          }\n          if (lattice_summed_any || FunctionDefaults<NDIM>::get_bc().is_periodic_any()) {\n            hi *= 100;\n          }\n\n          info.hi = hi;\n          GFit<double, NDIM> fit(info);\n\n          Tensor<double> coeff = fit.coeffs();\n          Tensor<double> expnt = fit.exponents();\n\n          if (info.truncate_lowexp_gaussians.value_or(infinite_summed_any)) {\n            // convolution with Gaussians of exponents <= 0.25/(L^2) contribute only a constant shift\n            // the largest spacing along lattice summed axes thus controls the smallest Gaussian exponent that NEEDS to be included\n            double max_lattice_spacing = 0;\n            for(int d=0; d!=NDIM; ++d) {\n              if (lattice_ranges[d])\n                max_lattice_spacing =\n                    std::max(max_lattice_spacing, cell_width(d));\n            }\n            // WARNING: discardG0 = true ignores the coefficients of truncated\n            //          terms\n            fit.truncate_periodic_expansion(coeff, expnt, max_lattice_spacing,\n                                            /* discardG0 = */ true);\n            info.truncate_lowexp_gaussians = true;\n          }\n\n          return std::make_pair(coeff, expnt);\n        }\n\n//        /// return the right block of the upsampled operator (modified NS only)\n//\n//        /// unlike the operator matrices on the natural level the upsampled operator\n//        /// matrices are not Toeplitz, so we need more information than just the displacement\n//        ///.@param[in]  source  the source key\n//        /// @param[in]  disp    the displacement\n//        /// @param[in]  upop    the unfiltered operator matrix from scale n-1\n//        /// @return     (k,k) patch of the upop(2k,2k) matrix\n//        static Tensor<Q> operator_patch(const Translation& source, const Translation& disp, const Tensor<Q>& upop) {\n//\n//            // which of the 4 upsampled matrices do we need?\n//            Translation sx=source%2;              // source offset\n//            Translation tx=(source+disp)%2;       // target offset\n//\n//            Tensor<Q> rij(k,k);\n//            // those two are equivalent:\n///*\n//            if (sx==0 and tx==0) copy_2d_patch(rij.ptr(),             k, upop.ptr(), 2*k, k, k);\n//            if (sx==1 and tx==0) copy_2d_patch(rij.ptr() + k,         k, upop.ptr(), 2*k, k, k);\n//            if (sx==0 and tx==1) copy_2d_patch(rij.ptr() + 2*k*k,     k, upop.ptr(), 2*k, k, k);\n//            if (sx==1 and tx==1) copy_2d_patch(rij.ptr() + 2*k*k + k, k, upop.ptr(), 2*k, k, k);\n//*/\n//            Slice s0(0,k-1), s1(k,2*k-1);\n//            if (sx==0 and tx==0) rij=Rm(s0,s0);\n//            if (sx==1 and tx==0) rij=Rm(s1,s0);\n//            if (sx==0 and tx==1) rij=Rm(s0,s1);\n//            if (sx==1 and tx==1) rij=Rm(s1,s1);\n//\n//            return rij;\n//        }\n\n\n\n        /// accumulate into result\n        template <typename T, typename R>\n        void apply_transformation(long dimk,\n                                  const Transformation trans[NDIM],\n                                  const Tensor<T>& f,\n                                  Tensor<R>& work1,\n                                  Tensor<R>& work2,\n                                  const Q mufac,\n                                  Tensor<R>& result) const {\n\n            //PROFILE_MEMBER_FUNC(SeparatedConvolution); // Too fine grain for routine profiling\n            long size = 1;\n            for (std::size_t i=0; i<NDIM; ++i) size *= dimk;\n            long dimi = size/dimk;\n\n            R* MADNESS_RESTRICT w1=work1.ptr();\n            R* MADNESS_RESTRICT w2=work2.ptr();\n\n#ifdef HAVE_IBMBGQ\n            mTxmq_padding(dimi, trans[0].r, dimk, dimk, w1, f.ptr(), trans[0].U);\n#else\n            mTxmq(dimi, trans[0].r, dimk, w1, f.ptr(), trans[0].U, dimk);\n#endif\n\n            size = trans[0].r * size / dimk;\n            dimi = size/dimk;\n            for (std::size_t d=1; d<NDIM; ++d) {\n#ifdef HAVE_IBMBGQ\n                mTxmq_padding(dimi, trans[d].r, dimk, dimk, w2, w1, trans[d].U);\n#else\n                mTxmq(dimi, trans[d].r, dimk, w2, w1, trans[d].U, dimk);\n#endif\n                size = trans[d].r * size / dimk;\n                dimi = size/dimk;\n                std::swap(w1,w2);\n            }\n\n            // If all blocks are full rank we can skip the transposes\n            bool doit = false;\n            for (std::size_t d=0; d<NDIM; ++d) doit = doit || trans[d].VT;\n\n            if (doit) {\n                for (std::size_t d=0; d<NDIM; ++d) {\n                    if (trans[d].VT) {\n                        dimi = size/trans[d].r;\n#ifdef HAVE_IBMBGQ\n                        mTxmq_padding(dimi, dimk, trans[d].r, dimk, w2, w1, trans[d].VT);\n#else\n                        mTxmq(dimi, dimk, trans[d].r, w2, w1, trans[d].VT);\n#endif\n                        size = dimk*size/trans[d].r;\n                    }\n                    else {\n                        fast_transpose(dimk, dimi, w1, w2);\n                    }\n                    std::swap(w1,w2);\n                }\n            }\n            // Assuming here that result is contiguous and aligned\n            aligned_axpy(size, result.ptr(), w1, mufac);\n        }\n\n\n        /// accumulate into result\n        template <typename T, typename R>\n        void apply_transformation3(const Tensor<T> trans2[NDIM],\n                                  const Tensor<T>& f,\n                                  const Q mufac,\n                                  Tensor<R>& result) const {\n\n            //PROFILE_MEMBER_FUNC(SeparatedConvolution); // Too fine grain for routine profiling\n\n            Tensor<R> result2=general_transform(f,trans2);\n            result2.scale(mufac);\n            result+=result2;\n\n        }\n\n\n\n        /// don't accumulate, since we want to do this at apply()\n        template <typename T, typename R>\n        void apply_transformation2(Level n, long dimk,  double tol,\n                                  const Tensor<T> trans2[NDIM],\n                                  const GenTensor<T>& f,\n                                  GenTensor<R>& work1,\n                                  GenTensor<R>& work2,\n                                  const Q mufac,\n                                  GenTensor<R>& result) const {\n\n            //PROFILE_MEMBER_FUNC(SeparatedConvolution); // Too fine grain for routine profiling\n\n#if 1\n            result=general_transform(f,trans2);\n            result.scale(mufac);\n\n#else\n\n            long size = 1;\n            for (std::size_t i=0; i<NDIM; ++i) size *= dimk;\n            long dimi = size/dimk;\n\n            R* MADNESS_RESTRICT w1=work1.ptr();\n            R* MADNESS_RESTRICT w2=work2.ptr();\n\n            mTxmq(dimi, trans[0].r, dimk, w1, f.ptr(), trans[0].U, dimk);\n            size = trans[0].r * size / dimk;\n            dimi = size/dimk;\n            for (std::size_t d=1; d<NDIM; ++d) {\n                mTxmq(dimi, trans[d].r, dimk, w2, w1, trans[d].U, dimk);\n                size = trans[d].r * size / dimk;\n                dimi = size/dimk;\n                std::swap(w1,w2);\n            }\n\n            // If all blocks are full rank we can skip the transposes\n            bool doit = false;\n            for (std::size_t d=0; d<NDIM; ++d) doit = doit || trans[d].VT;\n\n            if (doit) {\n                for (std::size_t d=0; d<NDIM; ++d) {\n                    if (trans[d].VT) {\n                        dimi = size/trans[d].r;\n                        mTxmq(dimi, dimk, trans[d].r, w2, w1, trans[d].VT);\n                        size = dimk*size/trans[d].r;\n                    }\n                    else {\n                        fast_transpose(dimk, dimi, w1, w2);\n                    }\n                    std::swap(w1,w2);\n                }\n            }\n            // Assuming here that result is contiguous and aligned\n            aligned_axpy(size, result.ptr(), w1, mufac);\n            //    long one = 1;\n            //daxpy_(&size, &mufac, w1, &one, result.ptr(), &one);\n#endif\n        }\n\n\n        /// Apply one of the separated terms, accumulating into the result\n        template <typename T>\n        void muopxv_fast(ApplyTerms at,\n                         const ConvolutionData1D<Q>* const ops_1d[NDIM],\n                         const Tensor<T>& f, const Tensor<T>& f0,\n                         Tensor<TENSOR_RESULT_TYPE(T,Q)>& result,\n                         Tensor<TENSOR_RESULT_TYPE(T,Q)>& result0,\n                         const double tol,\n                         const Q mufac,\n                         Tensor<TENSOR_RESULT_TYPE(T,Q)>& work1,\n                         Tensor<TENSOR_RESULT_TYPE(T,Q)>& work2) const {\n\n            //PROFILE_MEMBER_FUNC(SeparatedConvolution); // Too fine grain for routine profiling\n            Transformation trans[NDIM];\n            Tensor<T> trans2[NDIM];\n\n            double Rnorm = 1.0;\n            for (std::size_t d=0; d<NDIM; ++d) Rnorm *= ops_1d[d]->Rnorm;\n\n            if (at.r_term and (Rnorm > 1.e-20)) {\n\n                const auto tol_Rs = tol/(Rnorm*NDIM);  // Errors are relative within here\n\n                // Determine rank of SVD to use or if to use the full matrix\n                long twok = 2*k;\n                if (modified()) twok=k;\n\n                long break_even;\n                if (NDIM==1) break_even = long(0.5*twok);\n                else if (NDIM==2) break_even = long(0.6*twok);\n                else if (NDIM==3) break_even=long(0.65*twok);\n                else break_even=long(0.7*twok);\n                bool rank_is_zero = false;\n                for (std::size_t d=0; d<NDIM; ++d) {\n                    long r;\n                    for (r=0; r<twok; ++r) {\n                        if (ops_1d[d]->Rs[r] < tol_Rs) break;\n                    }\n                    if (r >= break_even) {\n                        trans[d].r = twok;\n                        trans[d].U = ops_1d[d]->R.ptr();\n                        trans[d].VT = 0;\n                    }\n                    else {\n\n#ifdef USE_GENTENSOR\n                        r = std::max(2L,r+(r&1L)); // (needed for 6D == when GENTENSOR is on) NOLONGER NEED TO FORCE OPERATOR RANK TO BE EVEN\n#endif\n                        if (r == 0) {\n                            rank_is_zero = true;\n                            break;\n                        }\n                        trans[d].r = r;\n                        trans[d].U = ops_1d[d]->RU.ptr();\n                        trans[d].VT = ops_1d[d]->RVT.ptr();\n                    }\n                    trans2[d]=ops_1d[d]->R;\n                }\n\n                if (!rank_is_zero)\n                    apply_transformation(twok, trans, f, work1, work2, mufac, result);\n\n                //            apply_transformation2(n, twok, tol, trans2, f, work1, work2, mufac, result);\n//                apply_transformation3(trans2, f, mufac, result);\n            }\n\n            double Tnorm = 1.0;\n            for (std::size_t d=0; d<NDIM; ++d) Tnorm *= ops_1d[d]->Tnorm;\n\n            if (at.t_term and (Tnorm>0.0)) {\n                const auto tol_Ts = tol/(Tnorm*NDIM);  // Errors are relative within here\n\n                long break_even;\n                if (NDIM==1) break_even = long(0.5*k);\n                else if (NDIM==2) break_even = long(0.6*k);\n                else if (NDIM==3) break_even=long(0.65*k);\n                else break_even=long(0.7*k);\n                bool rank_is_zero = false;\n                for (std::size_t d=0; d<NDIM; ++d) {\n                    long r;\n                    for (r=0; r<k; ++r) {\n                        if (ops_1d[d]->Ts[r] < tol_Ts) break;\n                    }\n                    if (r >= break_even) {\n                        trans[d].r = k;\n                        trans[d].U = ops_1d[d]->T.ptr();\n                        trans[d].VT = 0;\n                    }\n                    else {\n\n#ifdef USE_GENTENSOR\n                        r = std::max(2L,r+(r&1L)); // (needed for 6D == GENTENSOR is USED) NOLONGER NEED TO FORCE OPERATOR RANK TO BE EVEN\n#endif\n                        if (r == 0) {\n                            rank_is_zero = true;\n                            break;\n                        }\n                        trans[d].r = r;\n                        trans[d].U = ops_1d[d]->TU.ptr();\n                        trans[d].VT = ops_1d[d]->TVT.ptr();\n                    }\n                    trans2[d]=ops_1d[d]->T;\n                }\n                if (!rank_is_zero)\n                    apply_transformation(k, trans, f0, work1, work2, -mufac, result0);\n//                apply_transformation2(n, k, tol, trans2, f0, work1, work2, -mufac, result0);\n//                apply_transformation3(trans2, f0, -mufac, result0);\n            }\n        }\n\n\n        /// Apply one of the separated terms, accumulating into the result\n        template <typename T>\n        void muopxv_fast2(Level n,\n                         const ConvolutionData1D<Q>* const ops_1d[NDIM],\n                         const GenTensor<T>& f, const GenTensor<T>& f0,\n                         GenTensor<TENSOR_RESULT_TYPE(T,Q)>& result,\n                         GenTensor<TENSOR_RESULT_TYPE(T,Q)>& result0,\n                         double tol,\n                         const Q mufac,\n                         GenTensor<TENSOR_RESULT_TYPE(T,Q)>& work1,\n                         GenTensor<TENSOR_RESULT_TYPE(T,Q)>& work2) const {\n\n            PROFILE_MEMBER_FUNC(SeparatedConvolution);\n//            Transformation trans[NDIM];\n            Tensor<T> trans2[NDIM];\n//            MADNESS_EXCEPTION(\"no muopxv_fast2\",1);\n\n            double Rnorm = 1.0;\n            for (std::size_t d=0; d<NDIM; ++d) Rnorm *= ops_1d[d]->Rnorm;\n            if (Rnorm == 0.0) return;\n\n            if (Rnorm > 1.e-20) {\n\n\t\t\t\ttol = tol/(Rnorm*NDIM);  // Errors are relative within here\n\n\t\t\t\t// Determine rank of SVD to use or if to use the full matrix\n\t\t\t\tlong twok = 2*k;\n\t\t\t\tif (modified()) twok=k;\n//\t\t\t\tlong break_even;\n//\t\t\t\tif (NDIM==1) break_even = long(0.5*twok);\n//\t\t\t\telse if (NDIM==2) break_even = long(0.6*twok);\n//\t\t\t\telse if (NDIM==3) break_even=long(0.65*twok);\n//\t\t\t\telse break_even=long(0.7*twok);\n\t\t\t\tfor (std::size_t d=0; d<NDIM; ++d) {\n\t\t\t\t\t// long r;\n\t\t\t\t\t// for (r=0; r<twok; ++r) {\n\t\t\t\t\t// \tif (ops_1d[d]->Rs[r] < tol) break;\n\t\t\t\t\t// }\n//\t\t\t\t\tif (r >= break_even) {\n//\t\t\t\t\t\ttrans[d].r = twok;\n//\t\t\t\t\t\ttrans[d].U = ops_1d[d]->R.ptr();\n//\t\t\t\t\t\ttrans[d].VT = 0;\n//\t\t\t\t\t}\n//\t\t\t\t\telse {\n//\t\t\t\t\t\t//r += std::max(2L,r&1L); // NOLONGER NEED TO FORCE OPERATOR RANK TO BE EVEN\n//\t\t\t\t\t\ttrans[d].r = r; \n//\t\t\t\t\t\ttrans[d].U = ops_1d[d]->RU.ptr();\n//\t\t\t\t\t\ttrans[d].VT = ops_1d[d]->RVT.ptr();\n//\t\t\t\t\t}\n\t\t\t\t\ttrans2[d]=ops_1d[d]->R;\n\t\t\t\t}\n\t\t\t\tapply_transformation2(n, twok, tol, trans2, f, work1, work2, mufac, result);\n            }\n\n            double Tnorm = 1.0;\n            for (std::size_t d=0; d<NDIM; ++d) Tnorm *= ops_1d[d]->Tnorm;\n\n            if (n > 0 and (Tnorm>1.e-20)) {\n//\t\t\t\tlong break_even;\n//\n//                if (NDIM==1) break_even = long(0.5*k);\n//                else if (NDIM==2) break_even = long(0.6*k);\n//                else if (NDIM==3) break_even=long(0.65*k);\n//                else break_even=long(0.7*k);\n                for (std::size_t d=0; d<NDIM; ++d) {\n                    // long r;\n                    // for (r=0; r<k; ++r) {\n                    //     if (ops_1d[d]->Ts[r] < tol) break;\n                    // }\n//                    if (r >= break_even) {\n//                        trans[d].r = k;\n//                        trans[d].U = ops_1d[d]->T.ptr();\n//                        trans[d].VT = 0;\n//                    }\n//                    else {\n//                        //r += std::max(2L,r&1L); // NOLONGER NEED TO FORCE OPERATOR RANK TO BE EVEN\n//                        trans[d].r = r; \n//                        trans[d].U = ops_1d[d]->TU.ptr();\n//                        trans[d].VT = ops_1d[d]->TVT.ptr();\n//                    }\n                    trans2[d]=ops_1d[d]->T;\n                }\n                apply_transformation2(n, k, tol, trans2, f0, work1, work2, -mufac, result0);\n            }\n        }\n\n\n        /// Computes the Frobenius norm of one of the separated terms ... WITHOUT FACTOR INCLUDED\n        /// compute for 1 term, all dim, 1 disp, essentially for SeparatedConvolutionInternal\n        double munorm2(Level n, const ConvolutionData1D<Q>* ops[]) const {\n            if (modified()) return munorm2_modified(n,ops);\n            return munorm2_ns(n,ops);\n        }\n\n        /// Computes the Frobenius norm of one of the separated terms for the NS form\n        ///       ... WITHOUT FACTOR INCLUDED\n        /// compute for 1 term, all dim, 1 disp, essentially for SeparatedConvolutionInternal\n        double munorm2_ns(Level n, const ConvolutionData1D<Q>* ops[]) const {\n            //PROFILE_MEMBER_FUNC(SeparatedConvolution);\n            \n            double prodR=1.0, prodT=1.0;\n            for (std::size_t d=0; d<NDIM; ++d) {\n                prodR *= ops[d]->Rnormf;\n                prodT *= ops[d]->Tnormf;\n\n            }\n//            if (n) prodR = sqrt(std::max(prodR*prodR - prodT*prodT,0.0));\n\n            // this kicks in if the line above has no numerically significant digits.\n//            if (prodR < 1e-8*prodT) {\n                double prod=1.0, sum=0.0;\n                for (std::size_t d=0; d<NDIM; ++d) {\n                    double a = ops[d]->NSnormf;\n                    double b = ops[d]->Tnormf;\n                    double aa = std::min(a,b);\n                    double bb = std::max(a,b);\n                    prod *= bb;\n                    if (bb > 0.0) sum +=(aa/bb);\n                }\n                if (n) prod *= sum;\n                prodR = prod;\n//            }\n\n            return prodR;\n        }\n\n\n        /// Computes the operator norm of one of the separated terms of the modified NS form\n        ///    ... WITHOUT FACTOR INCLUDED\n        /// compute for 1 term, all dim, 1 disp, essentially for SeparatedConvolutionInternal\n        double munorm2_modified(Level n, const ConvolutionData1D<Q>* ops_1d[]) const {\n            PROFILE_MEMBER_FUNC(SeparatedConvolution);\n\n            // follows Eq. (21) ff of Beylkin 2008 (Beylkin Appl. Comput. Harmon. Anal. 24, pp 354)\n\n            // we have all combinations of difference, upsampled, F terms (d, u, f),\n            // with the constraint that d is in each term exactly once. In the mixed terms (udf)\n            // we just get all possible combinations, in the pure terms (dff, duu) we have\n            // to multiply each term (dff, fdf, ffd) with (NDIM-1)!, to get the right number.\n\n            double dff = 0.0;\n            double duu = 0.0;\n            double udf = 0.0;\n\n            // loop over d shifting over the dimensions dxx, xdx, xxd,\n            for (size_t d=0; d<NDIM; ++d) {\n                double dff_tmp = ops_1d[d]->N_diff;\n                double duu_tmp = ops_1d[d]->N_diff;\n                double udf_tmp = ops_1d[d]->N_diff;\n\n\n                for (size_t dd=0; dd<NDIM; ++dd) {\n                    if (dd!=d) {\n                        dff_tmp *= ops_1d[dd]->N_F;\n                        duu_tmp *= ops_1d[dd]->N_up;\n\n                        udf_tmp *= ops_1d[dd]->N_F;\n                        for (size_t ddd=0; ddd<NDIM; ++ddd) {\n                            if (ddd!=dd) udf += udf_tmp * ops_1d[ddd]->N_up;\n                        }\n                    }\n                }\n\n                dff+=dff_tmp;\n                duu+=duu_tmp;\n            }\n\n            // finalize with the factorial\n            double factorial=1.0;\n            for (int i=1; i<static_cast<int>(NDIM)-1; ++i) factorial*=double(i);\n            dff*=factorial;\n            duu*=factorial;\n\n            // Eq. (23) of Beylkin 2008, for one separated term WITHOUT the factor\n            double norm=(dff + udf + duu) /(factorial * double(NDIM));\n\n//            // double check\n//            if (NDIM==3) {\n//                Tensor<Q> R_full=outer(ops_1d[0]->R,outer(ops_1d[1]->R,ops_1d[2]->R));\n//                Tensor<Q> T_full=outer(ops_1d[0]->T,outer(ops_1d[1]->T,ops_1d[2]->T));\n//                double n2=(R_full-T_full).normf();\n////                print(\"norm estimate, norm\",norm, n2, norm<n2);\n//                norm=n2;\n//            }\n\n            return norm;\n            \n        }\n\n\n        /// get the transformation matrices for 1 term and all dimensions and one displacement\n\n        /// use ConvolutionND, which uses ConvolutionData1D to collect the transformation matrices\n        const SeparatedConvolutionInternal<Q,NDIM> getmuop(int mu, Level n, const Key<NDIM>& disp) const {\n            //PROFILE_MEMBER_FUNC(SeparatedConvolution); // Too fine grain for routine profiling\n            SeparatedConvolutionInternal<Q,NDIM> op;\n            for (std::size_t d=0; d<NDIM; ++d) {\n                op.ops[d] = ops[mu].getop(d)->nonstandard(n, disp.translation()[d]);\n            }\n            op.norm = munorm2(n, op.ops)*std::abs(ops[mu].getfac());\n\n//             double newnorm = munorm2(n, op.ops);\n//             // This rescaling empirically based upon BSH separated expansion\n//             // ... needs more testing.  OK also for TDSE.\n//             // All is good except for some 000 blocks which are up to sqrt(k^d) off.\n//             for (int d=0; d<NDIM; ++d)  {\n//                 if (disp[d] == 0) newnorm *= 0.5;\n//                 else if (std::abs(disp[d]) == 1) newnorm *= 0.8;\n//             }\n//            double oldnorm = munorm(n, op.ops);\n//             if (oldnorm > 1e-13 && (newnorm < 0.5*oldnorm || newnorm > 2.0*oldnorm) )\n//                 print(\"munorm\", n, disp, mu, newnorm, oldnorm, newnorm/oldnorm);\n\n            return op;\n        }\n\n\n\n        /// get the transformation matrices for 1 term and all dimensions and one displacement\n\n        /// use ConvolutionND, which uses ConvolutionData1D to collect the transformation matrices\n        const SeparatedConvolutionInternal<Q,NDIM>\n        getmuop_modified(int mu, Level n, const Key<NDIM>& disp, const Key<NDIM>& source) const {\n            //PROFILE_MEMBER_FUNC(SeparatedConvolution); // Too fine grain for routine profiling\n\n\n            // SeparatedConvolutionInternal keeps data for 1 term and all dimensions\n            SeparatedConvolutionInternal<Q,NDIM> op;\n\n            // in the modified NS form we need not only the displacement, but also the source Translation\n            // for correctly constructing the operator, b/c the operator is not Toeplitz\n\n            // op.ops is of type ConvolutionData1D (1 term, 1 dim, 1 disp)\n            // ops[mu] is of type ConvolutionND (1 term, all dim, 1 disp)\n            for (std::size_t d=0; d<NDIM; ++d) {\n                Translation sx=source.translation()[d];                          // source translation\n                Translation tx=source.translation()[d]+disp.translation()[d];    // target translation\n\n                Key<2> op_key(n,Vector<Translation,2>{sx,tx});\n                op.ops[d] = ops[mu].getop(d)->mod_nonstandard(op_key);\n            }\n\n            // works for both modified and not modified NS form\n            op.norm = munorm2(n, op.ops)*std::abs(ops[mu].getfac());\n//            op.norm=1.0;\n            return op;\n        }\n\n        /// get the data for all terms and all dimensions for one displacement\n        const SeparatedConvolutionData<Q,NDIM>* getop(Level n, const Key<NDIM>& d, const Key<NDIM>& source) const {\n\n            // in the NS form the operator depends only on the displacement\n            if (not modified()) return getop_ns(n,d);\n            return getop_modified(n, d, source);\n        }\n\n\n        /// get the data for all terms and all dimensions for one displacement\n\n        /// uses SeparatedConvolutionInternal (ConvolutionND, ConvolutionData1D) to construct\n        /// the transformation matrices.\n        /// @param[in]  d   displacement\n        /// @return pointer to cached operator\n        const SeparatedConvolutionData<Q,NDIM>* getop_ns(Level n, const Key<NDIM>& d) const {\n            //PROFILE_MEMBER_FUNC(SeparatedConvolution); // Too fine grain for routine profiling\n            const SeparatedConvolutionData<Q,NDIM>* p = data.getptr(n,d);\n            if (p) return p;\n\n            // get the data for each term\n            SeparatedConvolutionData<Q,NDIM> op(rank);\n            for (int mu=0; mu<rank; ++mu) {\n                // op.muops is of type SeparatedConvolutionInternal (1 term, all dim, 1 disp)\n                // getmuop uses ConvolutionND\n                op.muops[mu] = getmuop(mu, n, d);\n            }\n\n            double norm = 0.0;\n            for (int mu=0; mu<rank; ++mu) {\n                const double munorm = op.muops[mu].norm;\n                norm += munorm*munorm;\n            }\n\t    //print(\"getop\", n, d, norm);\n            op.norm = sqrt(norm);\n            data.set(n, d, op);\n            return data.getptr(n,d);\n        }\n\n\n\n        /// get the data for all terms and all dimensions for one displacement (modified NS form)\n\n        /// remember that the operator in the modified NS form is not Toeplitz, so we need\n        /// information about the displacement and the source key\n        /// @param[in]  n       level (=scale) (actually redundant, since included in source)\n        /// @param[in]  disp    displacement key\n        /// @param[in]  source  source key\n        /// @return pointer to cached operator\n        const SeparatedConvolutionData<Q,NDIM>* getop_modified(Level n, const Key<NDIM>& disp, const Key<NDIM>& source) const {\n            //PROFILE_MEMBER_FUNC(SeparatedConvolution); // Too fine grain for routine profiling\n\n            // in the modified NS form the upsampled part of the operator depends on the modulus of the source\n            Vector<Translation,NDIM> t=source.translation();\n            for (size_t i=0; i<NDIM; ++i) t[i]=t[i]%2;\n            Key<2*NDIM> key=disp.merge_with(Key<NDIM>(source.level(),t));\n\n            const SeparatedConvolutionData<Q,NDIM>* p = mod_data.getptr(n,key);\n            if (p) return p;\n\n            // get the data for each term\n            // op.muops is of type SeparatedConvolutionInternal (1 term, all dim, 1 disp)\n            // getmuop uses ConvolutionND\n            SeparatedConvolutionData<Q,NDIM> op(rank);\n            for (int mu=0; mu<rank; ++mu) op.muops[mu] = getmuop_modified(mu, n, disp, source);\n\n            double norm = 0.0;\n            for (int mu=0; mu<rank; ++mu) {\n                const double munorm = op.muops[mu].norm;\n                norm += munorm*munorm;\n            }\n\n            op.norm = sqrt(norm);\n            mod_data.set(n, key, op);\n            return mod_data.getptr(n,key);\n        }\n\n\n        void check_cubic() {\n            // !!! NB ... cell volume obtained from global defaults\n            const Tensor<double>& cell_width = FunctionDefaults<NDIM>::get_cell_width();\n            // Check that the cell is cubic since currently is assumed\n            for (std::size_t d=1; d<NDIM; ++d) {\n                MADNESS_CHECK(fabs(cell_width(d)-cell_width(0L)) < 1e-14*cell_width(0L));\n            }\n        }\n\n\n        /// upsample some of the dimensions of coeff to its child indicated by key\n\n        /// @param[in]  coeff   the coeffs of dim 2*NDIM that will be upsampled\n        /// @param[in]  key     the key indicating the child -- only some dimensions will be \"reproductive\"\n        /// @param[in]  particle    if 0: upsample dimensions 0-2\n        ///                         if 1: upsample dimensions 3-5\n        /// @return     a partially upsampled coefficient tensor\n        template<typename T, size_t FDIM>\n        GenTensor<T> partial_upsample(const Key<FDIM>& key, const GenTensor<T>& coeff, const int particle) const {\n\n            if (coeff.rank()==0) return GenTensor<T>();\n            MADNESS_ASSERT(coeff.dim(0)==k);\n            if (NDIM==coeff.ndim()) {\n                MADNESS_ASSERT(particle==1);    // other particle, leave this particle unchanged\n                return coeff;\n            }\n\n            MADNESS_ASSERT(coeff.ndim()==FDIM);\n            MADNESS_ASSERT(particle==0 or (2*NDIM==FDIM));\n\n            // the twoscale coefficients: for upsampling use h0/h1; see Alpert Eq (3.35a/b)\n            // handle the spectator dimensions with the identity matrix\n            const Tensor<T> h[2] = {cdata.h0, cdata.h1};\n            Tensor<T> identity(k,k);\n            for (int i=0; i<k; ++i) identity(i,i)=1.0;\n            Tensor<T> matrices[2*NDIM];\n\n            // get the appropriate twoscale coefficients for each dimension\n            if (particle==0) {\n                for (size_t ii=0; ii<NDIM; ++ii) matrices[ii]=h[key.translation()[ii]%2];\n                for (size_t ii=0; ii<NDIM; ++ii) matrices[ii+NDIM]=identity;\n            } else if (particle==1) {\n                for (size_t ii=0; ii<NDIM; ++ii) matrices[ii]=identity;\n                for (size_t ii=0; ii<NDIM; ++ii) matrices[ii+NDIM]=h[key.translation()[ii+NDIM]%2];\n            } else {\n                MADNESS_EXCEPTION(\"unknown particle\",1);\n            }\n\n            // transform and accumulate on the result\n            const GenTensor<T> result=general_transform(coeff,matrices);\n            return result;\n        }\n\n\n        /// upsample the sum coefficients of level 1 to sum coeffs on level n+1\n\n        /// specialization of the unfilter method, will transform only the sum coefficients\n        /// @param[in]  key     key of level n+1\n        /// @param[in]  coeff   sum coefficients of level n (does NOT belong to key!!)\n        /// @return     sum     coefficients on level n+1\n        template<typename T, size_t FDIM>\n        GenTensor<T> upsample(const Key<FDIM>& key, const GenTensor<T>& coeff) const {\n\n            // the twoscale coefficients: for upsampling use h0/h1; see Alpert Eq (3.35a/b)\n            // note there are no difference coefficients; if you want that use unfilter\n            const Tensor<T> h[2] = {cdata.h0, cdata.h1};\n            Tensor<T> matrices[FDIM];\n\n            // get the appropriate twoscale coefficients for each dimension\n            for (size_t ii=0; ii<FDIM; ++ii) matrices[ii]=h[key.translation()[ii]%2];\n\n            // transform and accumulate on the result\n            const GenTensor<T> result=general_transform(coeff,matrices);\n            return result;\n        }\n\n        /// initializes range using range of ops[0]\n        /// @pre `ops[i].range == ops[0].range`\n        void init_range() {\n          if (!ops.empty()) {\n            for (int d = 0; d != NDIM; ++d) {\n              for(const auto & op: ops) {\n                MADNESS_ASSERT(op.getop(d)->range == ops[0].getop(d)->range);\n              }\n              range[d] = ops[0].getop(d)->range;\n            }\n          }\n        }\n\n        /// initializes lattice_sum using `ops[0].lattice_summed()`\n        /// @pre `ops[i].lattice_summed() == ops[0].lattice_summed()`\n        void init_lattice_summed() {\n          if (!ops.empty()) {\n            for (int d = 0; d != NDIM; ++d) {\n              for (const auto &op : ops) {\n                MADNESS_ASSERT(op.lattice_summed() ==\n                               ops[0].lattice_summed());\n              }\n              lattice_summed_ = ops[0].lattice_summed();\n            }\n          }\n        }\n\n    public:\n\n        // For separated convolutions with same operator in each direction (isotropic)\n        SeparatedConvolution(World& world,\n                             const std::vector< std::shared_ptr< Convolution1D<Q> > >& argops,\n                             long k = FunctionDefaults<NDIM>::get_k(),\n                             bool doleaves = false)\n                : WorldObject< SeparatedConvolution<Q,NDIM> >(world)\n                , info()\n                , doleaves(doleaves)\n                , lattice_summed_(false)  // this will be overridden by init_lattice_summed below\n                , modified_(false)\n                , particle_(1)\n                , destructive_(false)\n                , k(k)\n                , cdata(FunctionCommonData<Q,NDIM>::get(k))\n                , rank(argops.size())\n                , vk(NDIM,k)\n                , v2k(NDIM,2*k)\n                , s0(std::max<std::size_t>(2,NDIM),Slice(0,k-1))\n        {\n\n            for (unsigned int mu=0; mu < argops.size(); ++mu) {\n              this->ops.push_back(ConvolutionND<Q,NDIM>(argops[mu]));\n            }\n            init_range();\n            init_lattice_summed();\n\n            this->process_pending();\n        }\n\n        // For general convolutions\n        SeparatedConvolution(World& world,\n                             const std::vector< ConvolutionND<Q,NDIM> >& argops,\n                             long k = FunctionDefaults<NDIM>::get_k(),\n                             bool doleaves = false)\n                : WorldObject< SeparatedConvolution<Q,NDIM> >(world)\n                , info()\n                , doleaves(doleaves)\n                , lattice_summed_(false)  // this will be overridden by init_lattice_summed below\n                , modified_(false)\n                , particle_(1)\n                , destructive_(false)\n                , ops(argops)\n                , k(k)\n                , cdata(FunctionCommonData<Q,NDIM>::get(k))\n                , rank(argops.size())\n                , vk(NDIM,k)\n                , v2k(NDIM,2*k)\n                , s0(std::max<std::size_t>(2,NDIM),Slice(0,k-1))\n        {\n            init_range();\n            init_lattice_summed();\n            this->process_pending();\n        }\n\n        /// Constructor for Gaussian Convolutions\n        /// WARNING! bloch_k should only ever be nonzero if `Q` is a complex type.\n        SeparatedConvolution(World& world, const OperatorInfo info1,\n                             const std::array<LatticeRange, NDIM>& lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),\n                             int k=FunctionDefaults<NDIM>::get_k(),\n                             bool doleaves = false,\n                             const Vector<double, NDIM>& bloch_k = Vector<double, NDIM>(0.0))\n               : SeparatedConvolution(world,Tensor<double>(0l),Tensor<double>(0l),info1.lo,info1.thresh,lattice_ranges,k,doleaves,info1.mu) {\n            info.type=info1.type;\n            info.truncate_lowexp_gaussians = info1.truncate_lowexp_gaussians;\n            info.range = info1.range;\n            auto [coeff, expnt] = make_coeff_for_operator(world, info, lattice_ranges);\n            rank=coeff.dim(0);\n            range = info.template range_as_array<NDIM>();\n            ops.resize(rank);\n            initialize(coeff,expnt,lattice_ranges,range,bloch_k);\n            init_lattice_summed();\n        }\n\n        /// Constructor for Gaussian Convolutions (mostly for backward compatability)\n        SeparatedConvolution(World& world,\n                             const Tensor<Q>& coeff, const Tensor<double>& expnt,\n                             double lo, double thresh,\n                             const std::array<LatticeRange, NDIM>& lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),\n                             int k=FunctionDefaults<NDIM>::get_k(),\n                             bool doleaves = false,\n                             double mu=0.0)\n                : WorldObject< SeparatedConvolution<Q,NDIM> >(world)\n                , info(mu,lo,thresh,OT_UNDEFINED)\n                , doleaves(doleaves)\n                ,\n              lattice_summed_(false) // will be updated by init_lattice_summed\n                , ops(coeff.dim(0))\n                , k(k)\n                , cdata(FunctionCommonData<Q,NDIM>::get(k))\n                , rank(coeff.dim(0))\n                , vk(NDIM,k)\n                , v2k(NDIM,2*k)\n                , s0(std::max<std::size_t>(2,NDIM),Slice(0,k-1)) {\n            initialize(coeff,expnt,lattice_ranges);\n            init_range();\n            init_lattice_summed();\n        }\n\n        void initialize(const Tensor<Q>& coeff, const Tensor<double>& expnt, std::array<LatticeRange, NDIM> lattice_range, std::array<KernelRange, NDIM> range = {}, const Vector<double, NDIM>& bloch_k = Vector<double, NDIM>(0.0)) {\n            const Tensor<double>& width = FunctionDefaults<NDIM>::get_cell_width();\n            const double pi = constants::pi;\n\n            for (int mu=0; mu<rank; ++mu) {\n                Q c = std::pow(sqrt(expnt(mu)/pi),static_cast<int>(NDIM)); // Normalization coeff\n\n                // We cache the normalized operator so the factor is the value we must multiply\n                // by to recover the coeff we want.\n                ops[mu].setfac(coeff(mu)/c);\n\n                for (std::size_t d=0; d<NDIM; ++d) {\n                  ops[mu].setop(d,GaussianConvolution1DCache<Q>::get(k, expnt(mu)*width[d]*width[d], 0,\n                                       lattice_range[d], bloch_k[d], range[d]));\n                }\n            }\n        }\n\n        virtual ~SeparatedConvolution() { }\n\n        void print_timer() const {\n        \tif (this->get_world().rank()==0) {\n                timer_full.print(\"op full tensor       \");\n                timer_low_transf.print(\"op low rank transform\");\n                timer_low_accumulate.print(\"op low rank addition \");\n        \t}\n        }\n\n        void reset_timer() const {\n        \tif (this->get_world().rank()==0) {\n                timer_full.reset();\n                timer_low_transf.reset();\n                timer_low_accumulate.reset();\n        \t}\n        }\n\n        const std::vector< Key<NDIM> >& get_disp(Level n) const {\n            return Displacements<NDIM>().get_disp(n, lattice_summed());\n        }\n\n        /// @return flag for each axis indicating whether lattice summation is performed in that direction\n        const array_of_bools<NDIM>& lattice_summed() const { return lattice_summed_; }\n        /// @return flag for each axis indicating whether functions that this op acts on are periodic on the box in that direction (false by default)\n        ///         it is normally preferred to lattice sum, obtaining an equivalent problem with a lattice-summed operator on a non-periodic function\n        const array_of_bools<NDIM>& func_domain_is_periodic() const { return func_domain_is_periodic_; }\n        /// changes domain periodicity\n        /// \\param domain_is_periodic\n        void set_domain_periodicity(const array_of_bools<NDIM>& domain_is_periodic) { func_domain_is_periodic_ = domain_is_periodic;}\n\n        /// return the operator norm for all terms, all dimensions and 1 displacement\n        double norm(Level n, const Key<NDIM>& d, const Key<NDIM>& source_key) const {\n            // SeparatedConvolutionData keeps data for all terms and all dimensions and 1 displacement\n//            return 1.0;\n            return getop(n, d, source_key)->norm;\n        }\n\n        /// return that part of a hi-dim key that serves as the base for displacements of this operator\n\n        /// if the function and the operator have the same dimension return key\n        /// if the function has a higher dimension than the operator (e.g. in the exchange operator)\n        /// return only that part of key that corresponds to the particle this operator works on\n        /// @param[in]\tkey\thi-dim key\n        /// @return\t\ta lo-dim part of key; typically first or second half\n        template<size_t FDIM>\n        typename std::enable_if<FDIM!=NDIM, Key<NDIM> >::type\n        get_source_key(const Key<FDIM> key) const {\n            Key<NDIM> source;\n            Key<FDIM-NDIM> dummykey;\n            if (particle()==1) key.break_apart(source,dummykey);\n            if (particle()==2) key.break_apart(dummykey,source);\n        \treturn source;\n        }\n\n        /// return that part of a hi-dim key that serves as the base for displacements of this operator\n\n        /// if the function and the operator have the same dimension return key\n        /// if the function has a higher dimension than the operator (e.g. in the exchange operator)\n        /// return only that part of key that corresponds to the particle this operator works on\n        /// @param[in]\tkey\thi-dim key\n        /// @return\t\ta lo-dim part of key; typically first or second half\n        template<size_t FDIM>\n        typename std::enable_if<FDIM==NDIM, Key<NDIM> >::type\n        get_source_key(const Key<FDIM> key) const {\n        \treturn key;\n        }\n\n        /// apply this operator on a function f\n\n        /// the operator does not need to have the same dimension as the function, e,g,\n        /// the Poisson kernel for the exchange operator acts only on 1 electron of a\n        /// given (pair) function.\n        /// @param[in]  f   a function of same or different dimension as this operator\n        /// @return     the result function of the same dimensionality as the input function f\n        template <typename T, size_t FDIM>\n        Function<TENSOR_RESULT_TYPE(T,Q),FDIM> operator()(const Function<T,FDIM>& f) const {\n            return madness::apply(*this, f);\n        }\n\n        /// apply this on a vector of functions\n        template <typename T, size_t FDIM>\n        std::vector<Function<TENSOR_RESULT_TYPE(T,Q),FDIM>> operator()(const std::vector<Function<T,FDIM>>& f) const {\n            return madness::apply(*this, f);\n        }\n\n        /// apply this operator on a separable function f(1,2) = f(1) f(2)\n\n        /// @param[in]  f1   a function of dim LDIM\n        /// @param[in]  f2   a function of dim LDIM\n        /// @return     the result function of dim NDIM=2*LDIM: g(1,2) = G(1,1',2,2') f(1',2')\n        template <typename T, size_t LDIM>\n        Function<TENSOR_RESULT_TYPE(T,Q),LDIM+LDIM>\n        operator()(const Function<T,LDIM>& f1, const Function<Q,LDIM>& f2) const {\n            return madness::apply(*this, std::vector<Function<Q,LDIM>>({f1}),\n                                  std::vector<Function<Q,LDIM>>({f2}));\n        }\n\n        /// apply this operator on a sum of separable functions f(1,2) = \\sum_i f_i(1) f_i(2)\n\n        /// @param[in]  f1   a function of dim LDIM\n        /// @param[in]  f2   a function of dim LDIM\n        /// @return     the result function of dim NDIM=2*LDIM: g(1,2) = G(1,1',2,2') f(1',2')\n        template <typename T, size_t LDIM>\n        Function<TENSOR_RESULT_TYPE(T,Q),LDIM+LDIM>\n        operator()(const std::vector<Function<T,LDIM>>& f1, const std::vector<Function<Q,LDIM>>& f2) const {\n            return madness::apply(*this, f1, f2);\n        }\n\n        /// apply this onto another suitable argument, returning the same type\n\n        /// argT must implement argT::apply(const SeparatedConvolution& op, const argT& arg)\n        template<typename argT>\n        argT operator()(const argT& argument) const {\n            return madness::apply(*this,argument);\n        }\n\n\n        /// apply this operator on coefficients in full rank form\n\n        /// @param[in]  coeff   source coeffs in full rank\n        /// @param[in]  source  the source key\n        /// @param[in]  shift   the displacement, where the source coeffs come from\n        /// @param[in]  tol     thresh/#neigh*cnorm\n        /// @return     a tensor of full rank with the result op(coeff)\n        template <typename T>\n        Tensor<TENSOR_RESULT_TYPE(T,Q)> apply(const Key<NDIM>& source,\n                                              const Key<NDIM>& shift,\n                                              const Tensor<T>& coeff,\n                                              double tol) const {\n            //PROFILE_MEMBER_FUNC(SeparatedConvolution); // Too fine grain for routine profiling\n            MADNESS_ASSERT(coeff.ndim()==NDIM);\n\n            double cpu0=cpu_time();\n\n            typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n            const Tensor<T>* input = &coeff;\n            Tensor<T> dummy;\n\n            if (not modified()) {\n                if (coeff.dim(0) == k) {\n                    // This processes leaf nodes with only scaling\n                    // coefficients ... FuncImpl::apply by default does not\n                    // apply the operator to these since for smoothing operators\n                    // it is not necessary.  It is necessary for operators such\n                    // as differentiation and time evolution and will also occur\n                    // if the application of the operator widens the tree.\n                    dummy = Tensor<T>(v2k);\n                    dummy(s0) = coeff;\n                    input = &dummy;\n                }\n                else {\n                    MADNESS_ASSERT(coeff.dim(0)==2*k);\n                }\n            }\n\n            tol = 0.01*tol/rank; // Error is per separated term\n            ApplyTerms at;\n            at.r_term=true;\n            at.t_term=(source.level()>0);\n\n            /// SeparatedConvolutionData keeps data for all terms and all dimensions and 1 displacement\n            const SeparatedConvolutionData<Q,NDIM>* op = getop(source.level(), shift, source);\n\n            //print(\"sepop\",source,shift,op->norm,tol);\n\n            Tensor<resultT> r(v2k), r0(vk);\n            Tensor<resultT> work1(v2k,false), work2(v2k,false);\n\n            if (modified()) {\n                   r=Tensor<resultT>(vk);\n                   work1=Tensor<resultT>(vk,false);\n                   work2=Tensor<resultT>(vk,false);\n            }\n\n            const Tensor<T> f0 = copy(coeff(s0));\n            for (int mu=0; mu<rank; ++mu) {\n                // SeparatedConvolutionInternal keeps data for 1 term and all dimensions and 1 displacement\n                const SeparatedConvolutionInternal<Q,NDIM>& muop =  op->muops[mu];\n                if (muop.norm > tol) {\n                    // ops is of ConvolutionND, returns data for 1 term and all dimensions\n                    Q fac = ops[mu].getfac();\n                    muopxv_fast(at, muop.ops, *input, f0, r, r0, tol/std::abs(fac), fac,\n                                work1, work2);\n                }\n            }\n\n            r(s0).gaxpy(1.0,r0,1.0);\n            double cpu1=cpu_time();\n            timer_full.accumulate(cpu1-cpu0);\n\n            return r;\n        }\n\n\n        /// apply this operator on only 1 particle of the coefficients in low rank form\n\n        /// note the unfortunate mess with NDIM: here NDIM is the operator dimension, and FDIM is the\n        /// function's dimension, whereas in the function we have OPDIM for the operator and NDIM for\n        /// the function\n        /// @tparam T   the dimension of the function this operator is applied on. \\todo MGR: Make sure info on T is correct. Was previously labeled FDIM.\n        /// @param[in]  coeff   source coeffs in SVD (=optimal!) form, in high dimensionality (FDIM)\n        /// @param[in]  source  the source key in low dimensionality (NDIM)\n        /// @param[in]  shift   the displacement in low dimensionality (NDIM)\n        /// @param[in]  tol     thresh/(#neigh*cnorm)\n        /// @param[in]  tol2    thresh/#neigh\n        /// @return     coeff result\n        template<typename T>\n        GenTensor<TENSOR_RESULT_TYPE(T,Q)> apply2_lowdim(const Key<NDIM>& source,\n                const Key<NDIM>& shift, const GenTensor<T>& coeff, double tol, double tol2) const {\n\n            typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n\n            // prepare access to the singular vectors\n            const SVDTensor<T>& svdcoeff=coeff.get_svdtensor();\n//            std::vector<Slice> s(coeff.config().dim_per_vector()+1,_);\n            std::vector<Slice> s(svdcoeff.dim_per_vector(particle()-1)+1,_);\n            // can't use predefined slices and vectors -- they have the wrong dimension\n            const std::vector<Slice> s00(coeff.ndim(),Slice(0,k-1));\n\n            // some checks\n            MADNESS_ASSERT(coeff.is_svd_tensor());           // for now\n            MADNESS_ASSERT(not modified());\n            MADNESS_ASSERT(not doleaves);\n            MADNESS_ASSERT(coeff.dim(0)==2*k);\n            MADNESS_ASSERT(2*NDIM==coeff.ndim());\n\n            double cpu0=cpu_time();\n            const SeparatedConvolutionData<Q,NDIM>* op = getop(source.level(), shift, source);\n\n            // some workspace\n            Tensor<resultT> work1(v2k,false), work2(v2k,false);\n\n            // sliced input and final result\n            const GenTensor<T> f0 = copy(coeff(s00));\n            GenTensor<resultT> final=copy(coeff);\n            GenTensor<resultT> final0=copy(f0);\n\n            tol = tol/rank*0.01; // Error is per separated term\n            tol2= tol2/rank;\n\n            // the operator norm is missing the identity working on the other particle\n            // use as (muop.norm*exchange_norm < tol)\n            // for some reason the screening is not working at all..\n//            double exchange_norm=std::pow(2.0*k,1.5);\n\n            for (int r=0; r<coeff.rank(); ++r) {\n\n                // get the appropriate singular vector (left or right depends on particle)\n                // and apply the full tensor muopxv_fast on it, term by term\n                s[0]=Slice(r,r);\n                const Tensor<T> chunk=svdcoeff.ref_vector(particle()-1)(s).reshape(v2k);\n                const Tensor<T> chunk0=f0.get_svdtensor().ref_vector(particle()-1)(s).reshape(vk);\n//                const double weight=std::abs(coeff.config().weights(r));\n\n                // accumulate all terms of the operator for a specific term of the function\n                Tensor<resultT> result(v2k), result0(vk);\n\n                ApplyTerms at;\n                at.r_term=true;\n                at.t_term=source.level()>0;\n\n                // this loop will return on result and result0 the terms [(P+Q) G (P+Q)]_1,\n                // and [P G P]_1, respectively\n                for (int mu=0; mu<rank; ++mu) {\n                    const SeparatedConvolutionInternal<Q,NDIM>& muop =  op->muops[mu];\n                    Q fac = ops[mu].getfac();\n                    muopxv_fast(at, muop.ops, chunk, chunk0, result, result0,\n                            tol/std::abs(fac), fac, work1, work2);\n                }\n\n                // reinsert the transformed terms into result, leaving the other particle unchanged\n                MADNESS_ASSERT(final.get_svdtensor().has_structure());\n                final.get_svdtensor().ref_vector(particle()-1)(s)=result;\n\n                if (source.level()>0) {\n                    final0.get_svdtensor().ref_vector(particle()-1)(s)=result0;\n                } else {\n                    final0.get_svdtensor().ref_vector(0)(s)=0.0;\n                    final0.get_svdtensor().ref_vector(1)(s)=0.0;\n                }\n\n            }\n            double cpu1=cpu_time();\n            timer_low_transf.accumulate(cpu1-cpu0);\n\n            double cpu00=cpu_time();\n\n            final.reduce_rank(tol2*0.5);\n            final0.reduce_rank(tol2*0.5);\n            final(s00)+=final0;\n            final.reduce_rank(tol2);\n\n            double cpu11=cpu_time();\n            timer_low_accumulate.accumulate(cpu11-cpu00);\n            return final;\n        }\n\n        /// apply this operator on coefficients in low rank form\n\n        /// @param[in]\tcoeff\tsource coeffs in SVD (=optimal!) form\n        /// @param[in]\ttol\t\tthresh/#neigh*cnorm\n        /// @param[in]\ttol2\tthresh/#neigh\n        template <typename T>\n        GenTensor<TENSOR_RESULT_TYPE(T,Q)> apply2(const Key<NDIM>& source,\n                                              const Key<NDIM>& shift,\n                                              const GenTensor<T>& coeff,\n                                              double tol, double tol2) const {\n            PROFILE_MEMBER_FUNC(SeparatedConvolution);\n            typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n\n            MADNESS_ASSERT(coeff.ndim()==NDIM);\n            MADNESS_ASSERT(coeff.is_svd_tensor());\t// we use the rank below\n//            MADNESS_EXCEPTION(\"no apply2\",1);\n            const TensorType tt=TT_2D;\n\n            const GenTensor<T>* input = &coeff;\n            GenTensor<T> dummy;\n\n            if (not modified()) {\n                if (coeff.dim(0) == k) {\n                    // This processes leaf nodes with only scaling\n                    // coefficients ... FuncImpl::apply by default does not\n                    // apply the operator to these since for smoothing operators\n                    // it is not necessary.  It is necessary for operators such\n                    // as differentiation and time evolution and will also occur\n                    // if the application of the operator widens the tree.\n                    dummy = GenTensor<T>(v2k,TT_2D);\n                    dummy(s0) += coeff;\n                    input = &dummy;\n                }\n                else {\n                    MADNESS_ASSERT(coeff.dim(0)==2*k);\n                }\n            }\n\n            tol = tol/rank; // Error is per separated term\n            tol2= tol2/rank;\n\n            const SeparatedConvolutionData<Q,NDIM>* op = getop(source.level(), shift, source);\n\n            GenTensor<resultT> r, r0, result, result0;\n            GenTensor<resultT> work1(v2k,tt), work2(v2k,tt);\n\n            if (modified()) {\n                r=GenTensor<resultT>(vk,tt);\n                work1=GenTensor<resultT>(vk,tt);\n                work2=GenTensor<resultT>(vk,tt);\n            }\n\n            // collect the results of the individual operator terms\n            std::list<GenTensor<T> > r_list;\n            std::list<GenTensor<T> > r0_list;\n\n//            const GenTensor<T> f0 = copy(coeff(s0));\n            const GenTensor<T> f0 = copy((*input)(s0));\n            for (int mu=0; mu<rank; ++mu) {\n                const SeparatedConvolutionInternal<Q,NDIM>& muop =  op->muops[mu];\n                //print(\"muop\",source, shift, mu, muop.norm);\n\n                // delta(g)  <  delta(T) * || f ||\n                if (muop.norm > tol) {\n\n                    // get maximum rank of coeff to contribute:\n                    //  delta(g)  <  eps  <  || T || * delta(f)\n                    //  delta(coeff) * || T || < tol2\n                \tconst int r_max=SRConf<T>::max_sigma(tol2/muop.norm,coeff.rank(),coeff.get_svdtensor().weights_);\n                    //                \tprint(\"r_max\",coeff.config().weights(r_max));\n\n                \t// note that max_sigma is inclusive!\n                    if (r_max>=0) {\n                        const GenTensor<resultT> chunk=SVDTensor<resultT>(input->get_svdtensor().get_configs(0,r_max));\n                        const GenTensor<resultT> chunk0=SVDTensor<resultT>(f0.get_svdtensor().get_configs(0,r_max));\n\n                        double cpu0=cpu_time();\n\n                        Q fac = ops[mu].getfac();\n                        muopxv_fast2(source.level(), muop.ops, chunk, chunk0, r, r0,\n                                tol/std::abs(fac), fac,\twork1, work2);\n                        double cpu1=cpu_time();\n                        timer_low_transf.accumulate(cpu1-cpu0);\n\n                        r_list.push_back(r);\n                        r0_list.push_back(r0);\n                    }\n                }\n            }\n\n            // finally accumulate all the resultant terms into one tensor\n            double cpu0=cpu_time();\n\n            result0=reduce(r0_list,tol2*rank);\n            if (r_list.size()>0) r_list.front()(s0)+=result0;\n            result=reduce(r_list,tol2*rank);\n//            result.reduce_rank(tol2*rank);\n\n            double cpu1=cpu_time();\n            timer_low_accumulate.accumulate(cpu1-cpu0);\n            timer_stats_accumulate.accumulate(result.rank());\n            return result;\n        }\n\n        /// estimate the ratio of cost of full rank versus low rank\n\n        /// @param[in]  source  source key\n        /// @param[in]  shift   displacement\n        /// @param[in]  tol     thresh/#neigh/cnorm\n        /// @param[in]  tol2    thresh/#neigh\n        /// @return cost_ratio  r=-1:   no terms left\n        ///                     0<r<1:  better to do full rank\n        ///                     1<r:    better to do low rank\n        template<typename T>\n        double estimate_costs(const Key<NDIM>& source,\n                const Key<NDIM>& shift,\n                const GenTensor<T>& coeff,\n                double tol, double tol2) const {\n\n            if (coeff.is_full_tensor()) return 0.5;\n            if (2*NDIM==coeff.ndim()) return 1.5;\n            MADNESS_ASSERT(NDIM==coeff.ndim());\n            MADNESS_ASSERT(coeff.is_svd_tensor());\n\n            const SeparatedConvolutionData<Q,NDIM>* op = getop(source.level(), shift, source);\n\n            tol = tol/rank; // Error is per separated term\n            tol2= tol2/rank;\n\n            const double full_operator_cost=pow(coeff.dim(0),NDIM+1);\n            const double low_operator_cost=pow(coeff.dim(0),NDIM/2+1);\n            const double low_reduction_cost=pow(coeff.dim(0),NDIM/2);\n\n            double full_cost=0.0;\n            double low_cost=0.0;\n\n            long initial_rank=0;\n            long final_rank=sqrt(coeff.size())*0.05;\t// size=ncol*nrow; final rank is 5% of max rank\n\n            for (int mu=0; mu<rank; ++mu) {\n                const SeparatedConvolutionInternal<Q,NDIM>& muop =  op->muops[mu];\n\n                // delta(g)  <  delta(T) * || f ||\n                if (muop.norm > tol) {\n                \t// note that max_sigma is inclusive: it returns a slice w(Slice(0,i))\n                    long nterms=SRConf<T>::max_sigma(tol2/muop.norm,coeff.rank(),coeff.get_svdtensor().weights_)+1;\n\n                    // take only the first overlap computation of rank reduction into account\n//                    low_cost+=nterms*low_operator_cost + 2.0*nterms*nterms*low_reduction_cost;\n                    initial_rank+=nterms;\n\n                    full_cost+=full_operator_cost;\n                }\n            }\n            low_cost=initial_rank*low_operator_cost + initial_rank*final_rank*low_reduction_cost;\n\n            // include random empirical factor of 2\n            double ratio=-1.0;\n            if (low_cost>0.0) ratio=full_cost/low_cost;\n//            print(\"nterms, full, low, full/low\", full_cost, low_cost,shift.distsq(), ratio);\n            return ratio;\n\n        }\n\n        /// construct the tensortrain representation of the operator\n\n        /// @param[in]  source  source coefficient box\n        /// @param[in]  shift   displacement\n        /// @param[in]  tol     threshold for the TT truncation\n        /// @param[in]  do_R    compute the R term of the operator (2k^d)\n        /// @param[in]  do_T    compute the T term of the operator (k^d), including factor -1\n        /// Both do_R and do_T may be used simultaneously, then the final\n        /// operator will have dimensions (2k^d)\n        TensorTrain<double> make_tt_representation(const Key<NDIM>& source,\n                const Key<NDIM>& shift, double tol, bool do_R, bool do_T) const {\n\n            if (not (do_R or do_T)) {\n                print(\"no operator requested in make_tt_representation??\");\n                MADNESS_EXCEPTION(\"you're sure you know what you're doing?\",1);\n            }\n\n\n            const SeparatedConvolutionData<Q,NDIM>* op = getop(source.level(), shift, source);\n\n            // check for significant ranks since the R/T matrices' construction\n            // might have been omitted. Tnorm is always smaller than Rnorm\n            long lo=0,hi=rank;\n            for (int mu=0; mu<rank; ++mu) {\n                double Rnorm=1.0;\n                for (std::size_t d=0; d<NDIM; ++d) Rnorm *= op->muops[mu].ops[d]->Rnorm;\n                if (Rnorm>1.e-20) hi=mu;\n                if ((Rnorm<1.e-20) and (mu<hi)) lo=mu;\n            }\n            hi++;lo++;\n\n            // think about dimensions\n            long rank_eff=(hi-lo);    // R or T matrices\n            long step=1;\n            if (do_R and do_T) {        // R and T matrices\n                rank_eff*=2;\n                step*=2;\n            }\n\n            long k2k=k;             // T matrices\n            if (do_R) k2k=2*k;      // R matrices\n\n\n            // construct empty TT cores and fill them with the significant R/T matrices\n            std::vector<Tensor<double> > cores(NDIM,Tensor<double>(rank_eff,k2k,k2k,rank_eff));\n            cores[0]=Tensor<double>(k2k,k2k,rank_eff);\n            cores[NDIM-1]=Tensor<double>(rank_eff,k2k,k2k);\n\n\n            for (int mu=lo, r=0; mu<hi; ++mu, ++r) {\n                const SeparatedConvolutionInternal<Q,NDIM>& muop =  op->muops[mu];\n                const Q fac = ops[mu].getfac();\n                const Slice sr0(step*r,  step*r,  0);\n                const Slice sr1(step*r+step-1,step*r+step-1,0);\n                const Slice s00(0,k-1,1);\n\n                if (do_R) {\n                    cores[0](_,  _  ,sr0)=muop.ops[0]->R;\n                    for (std::size_t idim=1; idim<NDIM-1; ++idim) {\n                          cores[idim](sr0,_  ,_  ,sr0)=muop.ops[idim]->R;\n                    }\n                    cores[NDIM-1](sr0,_  ,_  )=muop.ops[NDIM-1]->R*fac;\n                }\n\n                if (do_T) {\n                    cores[0](s00,s00,sr1)=muop.ops[0]->T;\n                    for (std::size_t idim=1; idim<NDIM-1; ++idim) {\n                        cores[idim](sr1,s00,s00,sr1)=muop.ops[idim]->T;\n                    }\n                    cores[NDIM-1](sr1,s00,s00)=muop.ops[NDIM-1]->T*(-fac);\n                }\n            }\n\n            // construct TT representation\n            TensorTrain<double> tt(cores);\n\n            // need to reshape for the TT truncation\n            tt.make_tensor();\n            tt.truncate(tol*GenTensor<double>::fac_reduce());\n            tt.make_operator();\n\n            return tt;\n        }\n\n\n        static bool can_combine(const SeparatedConvolution<Q,NDIM>& left, const SeparatedConvolution<Q,NDIM>& right) {\n            return (combine_OT(left,right).type!=OT_UNDEFINED);\n        }\n\n        /// return operator type and other info of the combined operator (e.g. fg = f(1,2)* g(1,2)\n        static OperatorInfo combine_OT(const SeparatedConvolution<Q,NDIM>& left, const SeparatedConvolution<Q,NDIM>& right) {\n            OperatorInfo info=left.info;\n            if ((left.info.type==OT_F12) and (right.info.type==OT_G12)) {\n                info.type=OT_FG12;\n            } else if ((left.info.type==OT_GAUSS) and (right.info.type==OT_GAUSS)) {\n                info=right.info;\n                info.type=OT_GAUSS;\n                info.mu=2.0*right.info.mu;\n            } else if ((left.info.type==OT_SLATER) and (right.info.type==OT_SLATER)) {\n                info=right.info;\n                info.type=OT_SLATER;\n                info.mu=2.0*right.info.mu;\n            } else if ((left.info.type==OT_G12) and (right.info.type==OT_F12)) {\n                info=right.info;\n                info.type=OT_FG12;\n            } else if ((left.info.type==OT_G12) and (right.info.type==OT_F212)) {\n                info=right.info;\n                info.type=OT_F2G12;\n            } else if (((left.info.type==OT_F212) and (right.info.type==OT_G12)) or\n                ((left.info.type==OT_F12) and (right.info.type==OT_FG12)) or\n                ((left.info.type==OT_FG12) and (right.info.type==OT_F12))) {\n                info=right.info;\n                info.type=OT_F2G12;\n                if (right.info.type!=OT_G12) MADNESS_CHECK(right.info.mu == left.info.mu);\n            } else if ((left.info.type==OT_F12) and (right.info.type==OT_F12)) {\n                info.type=OT_F212;\n                // keep the original gamma\n                // (f12)^2 = (1- slater12)^2  = 1/(4 gamma) (1 - 2 exp(-gamma) + exp(-2 gamma))\n                MADNESS_CHECK(right.info.mu == left.info.mu);\n            } else {\n                MADNESS_EXCEPTION(\"unknown combination of SeparatedConvolutions: feel free to extend in operator.h\",1);\n            }\n            return info;\n        }\n\n\n        /// combine 2 convolution operators to one\n        /// There's some information loss with this constructor - not recommended\n        static SeparatedConvolution<Q,NDIM> combine(const SeparatedConvolution<Q,NDIM>& left,\n                                                    const SeparatedConvolution<Q,NDIM>& right) {\n            MADNESS_CHECK(can_combine(left,right));\n            MADNESS_CHECK(left.get_world().id()==right.get_world().id());\n            MADNESS_CHECK(left.lattice_summed() == right.lattice_summed());\n            std::array<LatticeRange, NDIM> lattice_summed;\n            for (std::size_t i = 0; i < NDIM; ++i) {\n              if (left.lattice_summed()[i]) lattice_summed[i].set_infinite();\n            }\n\n            auto info=combine_OT(left,right);\n            return SeparatedConvolution<Q,NDIM>(left.get_world(),info,lattice_summed,left.k);\n        }\n\n        /// combine 2 convolution operators to one\n        friend SeparatedConvolution<Q,NDIM> combine(const std::shared_ptr<SeparatedConvolution<Q,NDIM>> left,\n                                                    const std::shared_ptr<SeparatedConvolution<Q,NDIM>> right) {\n            SeparatedConvolution<Q,NDIM> result;\n            if (left and right) {\n                return combine(*left, *right);\n            } else if (left) {\n                return *left;\n            } else if (right) {\n                return *right;\n            } else {\n                MADNESS_EXCEPTION(\"can't combine empty SeparatedConvolutions\",1);\n            }\n            return result;\n        }\n    };\n\n\n\n    /// Factory function generating separated kernel for convolution with 1/r in 3D.\n    /// N.B. bloch_k species how the function's phase changes as the **operator** translates,\n    /// which (by translational invariance) is the additive inverse of how the function's\n    /// phase changes as the **cell** shifts\n    static\n    inline\n    SeparatedConvolution<double_complex,3> PeriodicHFExchangeOperator(World& world,\n                                                   Vector<double,3> bloch_k,\n                                                   double lo,\n                                                   double eps,\n                                                   const std::array<KernelRange, 3>& kernel_ranges = std::array<KernelRange, 3>(),\n                                                   const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                                                   int k=FunctionDefaults<3>::get_k()) {\n      return SeparatedConvolution<double_complex, 3>(world, OperatorInfo(0.0, lo, eps, OT_G12, std::nullopt, kernel_ranges),\n                                                     lattice_ranges, k, false, bloch_k);\n    }\n\n    /// Factory function generating separated kernel for convolution with 1/r in 3D.\n    /// N.B. bloch_k species how the function's phase changes as the **operator** translates,\n    /// which (by translational invariance) is the additive inverse of how the function's\n    /// phase changes as the **cell** shifts\n    static\n    inline\n    SeparatedConvolution<double_complex,3>* PeriodicHFExchangeOperatorPtr(World& world,\n                                                   Vector<double,3> bloch_k,\n                                                   double lo,\n                                                   double eps,\n                                                   const std::array<KernelRange, 3>& kernel_ranges = std::array<KernelRange, 3>(),\n                                                   const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                                                   int k=FunctionDefaults<3>::get_k()) {\n      return new SeparatedConvolution<double_complex, 3>(world, OperatorInfo(0.0, lo, eps, OT_G12, std::nullopt, kernel_ranges),\n                                                         lattice_ranges, k, false, bloch_k);\n    }\n\n    /// Factory function generating separated kernel for convolution with 1/r in 3D.\n    static\n    inline\n    SeparatedConvolution<double,3> CoulombOperator(World& world,\n                                                   double lo,\n                                                   double eps,\n                                                   const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n\t\t\t\t\t\t   int k=FunctionDefaults<3>::get_k())\n    {\n        return SeparatedConvolution<double,3>(world,OperatorInfo(0.0,lo,eps,OT_G12),lattice_ranges,k);\n    }\n\n\n    /// Factory function generating separated kernel for convolution with 1/r in 3D.\n    static\n    inline\n    SeparatedConvolution<double,3>* CoulombOperatorPtr(World& world,\n                                                       double lo,\n                                                       double eps,\n                                                       const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                                                       int k=FunctionDefaults<3>::get_k())\n    {\n        return new SeparatedConvolution<double,3>(world,OperatorInfo(0.0,lo,eps,OT_G12),lattice_ranges,k);\n    }\n\n\n    /// Factory function generating separated kernel for convolution with BSH kernel in general NDIM\n    template <std::size_t NDIM>\n    static inline\n    SeparatedConvolution<double,NDIM>\n    BSHOperator(World& world, double mu, double lo, double eps,\n    const std::array<LatticeRange, NDIM>& lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),\n                int k=FunctionDefaults<NDIM>::get_k()) {\n    \tif (eps>1.e-4) {\n    \t\tif (world.rank()==0) print(\"the accuracy in BSHOperator is too small, tighten the threshold\",eps);\n    \t\tMADNESS_EXCEPTION(\"0\",1);\n    \t}\n        return SeparatedConvolution<double,NDIM>(world,OperatorInfo(mu,lo,eps,OT_BSH),lattice_ranges,k);\n    }\n\n    /// Factory function generating separated kernel for convolution with BSH kernel in general NDIM\n    template <std::size_t NDIM>\n    static inline\n    SeparatedConvolution<double,NDIM>*\n    BSHOperatorPtr(World& world, double mu, double lo, double eps,\n      const std::array<LatticeRange, NDIM>& lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),\n                   int k=FunctionDefaults<NDIM>::get_k()) {\n        if (eps>1.e-4) {\n            if (world.rank()==0) print(\"the accuracy in BSHOperator is too small, tighten the threshold\",eps);\n            MADNESS_EXCEPTION(\"0\",1);\n        }\n        return new SeparatedConvolution<double,NDIM>(world,OperatorInfo(mu,lo,eps,OT_BSH),lattice_ranges,k);\n    }\n\n\n    /// Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D\n    static inline SeparatedConvolution<double,3>\n    BSHOperator3D(World& world, double mu, double lo, double eps,\n                  const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                  int k=FunctionDefaults<3>::get_k()) {\n        return SeparatedConvolution<double,3>(world,OperatorInfo(mu,lo,eps,OT_BSH),lattice_ranges,k);\n    }\n\n    /// Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D\n    static\n    inline\n    SeparatedConvolution<double_complex,3> PeriodicBSHOperator3D(World& world,\n                                                         Vector<double,3> bloch_k,\n                                                         double mu,\n                                                         double lo,\n                                                         double eps,\n                                                         const std::array<KernelRange, 3>& kernel_ranges = std::array<KernelRange, 3>(),\n                                                         const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                                                         int k=FunctionDefaults<3>::get_k())\n\n    {\n      return SeparatedConvolution<double_complex, 3>(world, OperatorInfo(mu, lo, eps, OT_BSH, std::nullopt, kernel_ranges),\n                                                     lattice_ranges, k, false, bloch_k);\n    }\n\n    /// Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D\n    static inline\n    SeparatedConvolution<double_complex,3>* PeriodicBSHOperatorPtr3D(World& world,\n                                                         Vector<double,3> bloch_k,\n                                                         double mu,\n                                                         double lo,\n                                                         double eps,\n                                                         const std::array<KernelRange, 3>& kernel_ranges = std::array<KernelRange, 3>(),\n                                                         const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                                                         int k=FunctionDefaults<3>::get_k())\n\n    {\n      return new SeparatedConvolution<double_complex, 3>(world, OperatorInfo(mu, lo, eps, OT_BSH, std::nullopt, kernel_ranges),\n                                                     lattice_ranges, k, false, bloch_k);\n    }\n\n\n    static inline SeparatedConvolution<double,3>\n    SlaterF12Operator(World& world, double mu, double lo, double eps,\n                      const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                      int k=FunctionDefaults<3>::get_k()) {\n        return SeparatedConvolution<double,3>(world,OperatorInfo(mu,lo,eps,OT_F12),lattice_ranges,k);\n    }\n\n    static inline SeparatedConvolution<double,3> SlaterF12sqOperator(World& world,\n                                                                   double mu, double lo, double eps,\n                                                                   const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                                                                   int k=FunctionDefaults<3>::get_k()) {\n        return SeparatedConvolution<double,3>(world,OperatorInfo(mu,lo,eps,OT_F212),lattice_ranges,k);\n    }\n\n    static inline SeparatedConvolution<double,3>* SlaterF12sqOperatorPtr(World& world,\n                                                                       double mu, double lo, double eps,\n                                                                       const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                                                                       int k=FunctionDefaults<3>::get_k()) {\n        return new SeparatedConvolution<double,3>(world,OperatorInfo(mu,lo,eps,OT_F212),lattice_ranges,k);\n    }\n\n    /// Factory function generating separated kernel for convolution with exp(-mu*r) in 3D\n    template<std::size_t NDIM=3>\n    static inline SeparatedConvolution<double,NDIM> SlaterOperator(World& world,\n    \t\tdouble mu, double lo, double eps,\n    \t\tconst std::array<LatticeRange, NDIM>& lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),\n    \t\tint k=FunctionDefaults<NDIM>::get_k()) {\n        return SeparatedConvolution<double,NDIM>(world,OperatorInfo(mu,lo,eps,OT_SLATER),lattice_ranges,k);\n    }\n\n    /// Factory function generating separated kernel for convolution with exp(-mu*r*r)\n\n    /// lo and eps are not used here\n    template<std::size_t NDIM>\n    static inline SeparatedConvolution<double,NDIM> GaussOperator(World& world,\n                                                                double mu, double lo=0.0, double eps=0.0,\n                                                                const std::array<LatticeRange, NDIM>& lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),\n                                                                int k=FunctionDefaults<NDIM>::get_k()) {\n        return SeparatedConvolution<double,NDIM>(world,OperatorInfo(mu,lo,eps,OT_GAUSS),lattice_ranges,k);\n    }\n\n    /// Factory function generating separated kernel for convolution with exp(-mu*r*r) in 3D\n\n    /// lo and eps are not used here\n    template<std::size_t NDIM>\n    static inline SeparatedConvolution<double, NDIM>* GaussOperatorPtr(World& world,\n                                                                     double mu, double lo=0.0, double eps=0.0,\n                                                                     const std::array<LatticeRange, NDIM>& lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),\n                                                                     int k = FunctionDefaults<NDIM>::get_k()) {\n        return new SeparatedConvolution<double,NDIM>(world,OperatorInfo(mu,lo,eps,OT_GAUSS),lattice_ranges,k);\n    }\n\n\n    /// Factory function generating separated kernel for convolution with exp(-mu*r) in 3D\n    /// Note that the 1/(2mu) factor of SlaterF12Operator is not included, this is just the exponential function\n    template<std::size_t NDIM>\n    static inline SeparatedConvolution<double, NDIM>* SlaterOperatorPtr_ND(World& world,\n                                                                     double mu, double lo, double eps,\n                                                                     const std::array<LatticeRange, NDIM>& lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),\n                                                                     int k = FunctionDefaults<NDIM>::get_k()) {\n        return new SeparatedConvolution<double,NDIM>(world,OperatorInfo(mu,lo,eps,OT_SLATER),lattice_ranges,k);\n    }\n\n    /// Factory function generating separated kernel for convolution with exp(-mu*r) in 3D\n    /// Note that the 1/(2mu) factor of SlaterF12Operator is not included, this is just the exponential function\n    static inline SeparatedConvolution<double, 3>* SlaterOperatorPtr(World& world,\n                                                                 double mu, double lo, double eps,\n                                                                 const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                                                                 int k = FunctionDefaults<3>::get_k()) {\n        return new SeparatedConvolution<double,3>(world,OperatorInfo(mu,lo,eps,OT_SLATER),lattice_ranges,k);\n    }\n\n    /// Factory function generating separated kernel for convolution with (1 - exp(-mu*r))/(2 mu) in 3D\n\n    /// includes the factor 1/(2 mu)\n    static inline SeparatedConvolution<double,3>* SlaterF12OperatorPtr(World& world,\n    \t\tdouble mu, double lo, double eps,\n    \t\tconst std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n    \t\tint k=FunctionDefaults<3>::get_k()) {\n        return new SeparatedConvolution<double,3>(world,OperatorInfo(mu,lo,eps,OT_F12),lattice_ranges,k);\n    }\n\n\n    /// Factory function generating separated kernel for convolution with 1/(2 mu)*(1 - exp(-mu*r))/r in 3D\n\n    /// fg = (1 - exp(-gamma r12))  / r12 = 1/r12 - exp(-gamma r12)/r12 = coulomb - bsh\n    /// includes the factor 1/(2 mu)\n    static inline SeparatedConvolution<double,3>\n    FGOperator(World& world, double mu, double lo, double eps,\n    const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n               int k=FunctionDefaults<3>::get_k()) {\n        return SeparatedConvolution<double,3>(world,OperatorInfo(mu,lo,eps,OT_FG12),lattice_ranges,k);\n    }\n\n    /// Factory function generating separated kernel for convolution with 1/(2 mu)*(1 - exp(-mu*r))/r in 3D\n\n    /// fg = (1 - exp(-gamma r12))  / r12 = 1/r12 - exp(-gamma r12)/r12 = coulomb - bsh\n    /// includes the factor 1/(2 mu)\n    static inline SeparatedConvolution<double,3>*\n    FGOperatorPtr(World& world, double mu, double lo, double eps,\n    const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                  int k=FunctionDefaults<3>::get_k()) {\n        return new SeparatedConvolution<double,3>(world,OperatorInfo(mu,lo,eps,OT_FG12),lattice_ranges,k);\n    }\n\n    /// Factory function generating separated kernel for convolution with (1/(2 mu)*(1 - exp(-mu*r)))^2/r in 3D\n\n    /// f2g = (1/(2 gamma) (1 - exp(-gamma r12)))^2  / r12\n    ///     = 1/(4 gamma) * [ 1/r12 - 2 exp(-gamma r12)/r12 + exp(-2 gamma r12)/r12 ]\n    /// includes the factor 1/(2 mu)^2\n    static inline SeparatedConvolution<double,3>*\n    F2GOperatorPtr(World& world, double mu, double lo, double eps,\n    const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                   int k=FunctionDefaults<3>::get_k()) {\n        return new SeparatedConvolution<double,3>(world,OperatorInfo(mu,lo,eps,OT_F2G12),lattice_ranges,k);\n    }\n\n    /// Factory function generating separated kernel for convolution with (1/(2 mu)*(1 - exp(-mu*r)))^2/r in 3D\n\n    /// f2g = (1/(2 gamma) (1 - exp(-gamma r12)))^2  / r12\n    ///     = 1/(4 gamma) * [ 1/r12 - 2 exp(-gamma r12)/r12 + exp(-2 gamma r12)/r12 ]\n    /// includes the factor 1/(2 mu)^2\n    static inline SeparatedConvolution<double,3>\n    F2GOperator(World& world, double mu, double lo, double eps,\n    const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                int k=FunctionDefaults<3>::get_k()) {\n        return SeparatedConvolution<double,3>(world,OperatorInfo(mu,lo,eps,OT_F2G12),lattice_ranges,k);\n    }\n\n\n    /// Factory function generating separated kernel for convolution a normalized\n    /// Gaussian (aka a widened delta function)\n    static inline SeparatedConvolution<double,3> SmoothingOperator3D(World& world,\n            double eps,\n            const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n            int k=FunctionDefaults<3>::get_k()) {\n\n        double exponent = 1.0/(2.0*eps);\n        Tensor<double> coeffs(1), exponents(1);\n        exponents(0L) =  exponent;\n        coeffs(0L)=pow(exponent/M_PI,0.5*3.0);  // norm of the gaussian\n        return SeparatedConvolution<double,3>(world, coeffs, exponents, 1.e-8, eps, lattice_ranges, k);\n    }\n\n    /// Factory function generating separated kernel for convolution a normalized\n    /// Gaussian (aka a widened delta function)\n    template<std::size_t NDIM>\n    static inline SeparatedConvolution<double,NDIM> SmoothingOperator(World& world,\n            double eps,\n            const std::array<LatticeRange, NDIM>& lattice_ranges = FunctionDefaults<NDIM>::get_bc().lattice_range(),\n            int k=FunctionDefaults<NDIM>::get_k()) {\n\n        double exponent = 1.0/(2.0*eps);\n        Tensor<double> coeffs(1), exponents(1);\n        exponents(0L) =  exponent;\n        coeffs(0L)=pow(exponent/M_PI,0.5*NDIM);  // norm of the gaussian\n        return SeparatedConvolution<double,NDIM>(world, coeffs, exponents, 1.e-8, eps, lattice_ranges, k);\n    }\n\n    /// Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D\n    static\n    inline\n    SeparatedConvolution<double,3>* BSHOperatorPtr3D(World& world,\n                                                     double mu,\n                                                     double lo,\n                                                     double eps,\n                                                     const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                                                     int k=FunctionDefaults<3>::get_k()) {\n      const Tensor<double> &cell_width = FunctionDefaults<3>::get_cell_width();\n      double hi = cell_width.normf(); // Diagonal width of cell\n      // Extend kernel range for lattice summation\n      // N.B. if have periodic boundaries, extend range just in case will be using periodic domain\n      const auto lattice_summed_any = std::any_of(lattice_ranges.begin(), lattice_ranges.end(), [](const auto& b) { return static_cast<bool>(b);});\n      const auto infinite_any = std::any_of(lattice_ranges.begin(), lattice_ranges.end(), [](const auto& b) { return b.infinite();});\n      if (lattice_summed_any) {\n        hi *= 100;\n      }\n\n      GFit<double, 3> fit = GFit<double, 3>::BSHFit(mu, lo, hi, eps, false);\n      Tensor<double> coeff = fit.coeffs();\n      Tensor<double> expnt = fit.exponents();\n\n      if (infinite_any) {\n        // convolution with Gaussians of exponents <= 0.25/(L^2) contribute only a constant shift\n        // the largest spacing along lattice summed axes thus controls the smallest Gaussian exponent that NEEDS to be included\n        double max_lattice_spacing = 0;\n        for(int d=0; d!=3; ++d) {\n          if (lattice_ranges[d])\n            max_lattice_spacing =\n                std::max(max_lattice_spacing, cell_width(d));\n        }\n        // WARNING: discardG0 = true ignores the coefficients of truncated\n        //          terms\n        fit.truncate_periodic_expansion(coeff, expnt, max_lattice_spacing,\n                                        /* discardG0 = */ false);\n      }\n      return new SeparatedConvolution<double, 3>(world, coeff, expnt, lo, eps,\n                                                 lattice_ranges, k);\n    }\n\n\n    /// Factory function generating operator for convolution with grad(1/r) in 3D\n\n    /// Returns a 3-vector containing the convolution operator for the\n    /// x, y, and z components of grad(1/r)\n    static\n    inline\n    std::vector< std::shared_ptr< SeparatedConvolution<double,3> > >\n    GradCoulombOperator(World& world,\n                        double lo,\n                        double eps,\n                        const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                        int k=FunctionDefaults<3>::get_k()) {\n      typedef SeparatedConvolution<double, 3> real_convolution_3d;\n      typedef std::shared_ptr<real_convolution_3d> real_convolution_3d_ptr;\n      const double pi = constants::pi;\n      const Tensor<double> width = FunctionDefaults<3>::get_cell_width();\n      double hi = width.normf(); // Diagonal width of cell\n      // Extend kernel range for lattice summation\n      const auto lattice_sum_any = std::any_of(lattice_ranges.begin(), lattice_ranges.end(), [](const LatticeRange& b){ return static_cast<bool>(b); });\n      if (lattice_sum_any) {\n        hi *= 100;\n      }\n\n      GFit<double, 3> fit = GFit<double, 3>::CoulombFit(lo, hi, eps, false);\n      Tensor<double> coeff = fit.coeffs();\n      Tensor<double> expnt = fit.exponents();\n\n      if (lattice_sum_any) {\n        fit.truncate_periodic_expansion(coeff, expnt, width.max(), true);\n      }\n\n      int rank = coeff.dim(0);\n\n      std::vector<real_convolution_3d_ptr> gradG(3);\n\n      for (int dir = 0; dir < 3; dir++) {\n        std::vector<ConvolutionND<double, 3>> ops(rank);\n        for (int mu = 0; mu < rank; mu++) {\n          // We cache the normalized operator so the factor is the value we must multiply by to recover the coeff we want.\n          double c = std::pow(sqrt(expnt(mu) / pi), 3); // Normalization coeff\n          ops[mu].setfac(coeff(mu) / c / width[dir]);\n\n          for (int d = 0; d < 3; d++) {\n            if (d != dir)\n              ops[mu].setop(d, GaussianConvolution1DCache<double>::get(\n                                   k, expnt(mu) * width[d] * width[d], 0,\n                                   lattice_ranges[d]));\n          }\n          ops[mu].setop(dir, GaussianConvolution1DCache<double>::get(\n                                 k, expnt(mu) * width[dir] * width[dir], 1,\n                                 lattice_ranges[dir]));\n        }\n        gradG[dir] = real_convolution_3d_ptr(\n            new SeparatedConvolution<double, 3>(world, ops));\n      }\n\n      return gradG;\n    }\n\n    /// Factory function generating operator for convolution with grad(bsh) in 3D\n\n    /// Returns a 3-vector containing the convolution operator for the\n    /// x, y, and z components of grad(bsh)\n    static\n    inline\n    std::vector< std::shared_ptr< SeparatedConvolution<double,3> > >\n    GradBSHOperator(World& world,\n                        double mu,\n                        double lo,\n                        double eps,\n                        const std::array<LatticeRange, 3>& lattice_ranges = FunctionDefaults<3>::get_bc().lattice_range(),\n                        int k=FunctionDefaults<3>::get_k()) {\n      typedef SeparatedConvolution<double, 3> real_convolution_3d;\n      typedef std::shared_ptr<real_convolution_3d> real_convolution_3d_ptr;\n      const double pi = constants::pi;\n      const Tensor<double> width = FunctionDefaults<3>::get_cell_width();\n      double hi = width.normf(); // Diagonal width of cell\n      // Extend kernel range for lattice summation\n      bool lattice_sum_any = std::any_of(lattice_ranges.begin(), lattice_ranges.end(), [](const LatticeRange& b){ return b.get_range(); });\n      if (lattice_sum_any) {\n        hi *= 100;\n      }\n\n      GFit<double, 3> fit = GFit<double, 3>::BSHFit(mu, lo, hi, eps, false);\n      Tensor<double> coeff = fit.coeffs();\n      Tensor<double> expnt = fit.exponents();\n\n      if (lattice_sum_any) {\n        fit.truncate_periodic_expansion(coeff, expnt, width.max(), true);\n      }\n\n      int rank = coeff.dim(0);\n\n      std::vector<real_convolution_3d_ptr> gradG(3);\n\n      for (int dir = 0; dir < 3; dir++) {\n        std::vector<ConvolutionND<double, 3>> ops(rank);\n        for (int mu = 0; mu < rank; mu++) {\n          // We cache the normalized operator so the factor is the value we must multiply by to recover the coeff we want.\n          double c = std::pow(sqrt(expnt(mu) / pi), 3); // Normalization coeff\n          ops[mu].setfac(coeff(mu) / c / width[dir]);\n\n          for (int d = 0; d < 3; d++) {\n            if (d != dir)\n              ops[mu].setop(d, GaussianConvolution1DCache<double>::get(\n                                   k, expnt(mu) * width[d] * width[d], 0,\n                                   lattice_ranges[d]));\n          }\n          ops[mu].setop(dir, GaussianConvolution1DCache<double>::get(\n                                 k, expnt(mu) * width[dir] * width[dir], 1,\n                                 lattice_ranges[dir]));\n        }\n        gradG[dir] = real_convolution_3d_ptr(\n            new SeparatedConvolution<double, 3>(world, ops));\n      }\n\n      return gradG;\n    }\n\n\n\n    namespace archive {\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveLoadImpl<Archive,const SeparatedConvolution<T,NDIM>*> {\n            static inline void load(const Archive& ar, const SeparatedConvolution<T,NDIM>*& ptr) {\n                WorldObject< SeparatedConvolution<T,NDIM> >* p = nullptr;\n                ar & p;\n                ptr = static_cast< const SeparatedConvolution<T,NDIM>* >(p);\n            }\n        };\n\n        template <class Archive, class T, std::size_t NDIM>\n        struct ArchiveStoreImpl<Archive,const SeparatedConvolution<T,NDIM>*> {\n            static inline void store(const Archive& ar, const SeparatedConvolution<T,NDIM>*const& ptr) {\n                ar & static_cast< const WorldObject< SeparatedConvolution<T,NDIM> >* >(ptr);\n            }\n        };\n    }\n\n}\n\n\n\n\n#endif // MADNESS_MRA_OPERATOR_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/operatorinfo.h",
    "content": "//\n// Created by Florian Bischoff on 11/2/23.\n//\n\n#ifndef MADNESS_OPERATORINFO_H\n#define MADNESS_OPERATORINFO_H\n\nnamespace madness {\n\n/// operator types\nenum OpType {\n    OT_UNDEFINED,\n    OT_ONE,         /// indicates the identity\n    OT_G12,         /// 1/r\n    OT_SLATER,      /// exp(-r)\n    OT_GAUSS,       /// exp(-r2)\n    OT_F12,         /// 1-exp(-r)\n    OT_FG12,        /// (1-exp(-r))/r\n    OT_F212,        /// (1-exp(-r))^2\n    OT_F2G12,       /// (1-exp(-r))^2/r = 1/r + exp(-2r)/r - 2 exp(-r)/r\n    OT_BSH,         /// exp(-r)/r\n    OT_SIZE         /// for ending loops\n};\n\n/// operator type to string\ntemplate<std::size_t N=1>   // dummy template argument to avoid ambiguity with the other operator<<\nstd::ostream& operator<<(std::ostream& os, const OpType type) {\n    auto name = [](OpType type) {\n        switch (type) {\n            case OpType::OT_UNDEFINED:\n                return \"undefined\";\n            case OpType::OT_ONE:\n                return \"identity\";\n            case OpType::OT_G12:\n                return \"g12\";\n            case OpType::OT_SLATER:\n                return \"slater\";\n            case OpType::OT_GAUSS:\n                return \"gauss\";\n            case OpType::OT_F12:\n                return \"f12\";\n            case OpType::OT_FG12:\n                return \"fg12\";\n            case OpType::OT_F212:\n                return \"f12^2\";\n            case OpType::OT_F2G12:\n                return \"f12^2g\";\n            case OpType::OT_BSH:\n                return \"bsh\";\n            default:\n                return \"undefined\";\n        }\n    };\n    os << name(type);\n    return os;\n}\n\nstruct OperatorInfo {\n    OperatorInfo() = default;\n    OperatorInfo(double mu, double lo, double thresh, OpType type, std::optional<bool> truncate = {}, std::vector<KernelRange> range = std::vector<KernelRange>(6)) : mu(mu), lo(lo), thresh(thresh), type(type), range(std::move(range)), truncate_lowexp_gaussians(truncate) { }\n    template <std::size_t NDIM>\n    OperatorInfo(double mu, double lo, double thresh, OpType type, std::optional<bool> truncate, const std::array<KernelRange, NDIM>& range) : mu(mu), lo(lo), thresh(thresh), type(type), range(range.begin(), range.end()), truncate_lowexp_gaussians(truncate) { }\n    double mu=0.0;     ///< some introspection\n    double lo=1.e-5;\n    double thresh=1.e-4;\n    OpType type=OT_UNDEFINED;    ///< introspection\n    double hi=-1.0;\n    std::vector<KernelRange> range = std::vector<KernelRange>(6);\n    bool debug=false;\n    std::optional<bool> truncate_lowexp_gaussians;  // if given, overrides the default for whether to truncate low-exponent gaussians\n\n    template <std::size_t NDIM>\n    std::array<KernelRange, NDIM> range_as_array() const {\n      std::array<KernelRange, NDIM> result;\n      MADNESS_ASSERT(range.size() >= NDIM);\n      std::copy(range.begin(), range.begin()+NDIM, result.begin());\n      return result;\n    }\n};\n\n\n\n}\n#endif //MADNESS_OPERATORINFO_H\n"
  },
  {
    "path": "src/madness/mra/power.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#ifndef MADNESS_MRA_POWER_H__INCLUDED\n#define MADNESS_MRA_POWER_H__INCLUDED\n\n\nnamespace madness {\n\n    template <int D>\n    inline int power(int base = 2) {\n        return (int) std::pow((double) base, (int) D);\n    }\n\n    template <>\n    inline int power<0>(int base) {\n        return 1;\n    }\n\n    template <>\n    inline int power<1>(int base) {\n        return base;\n    }\n\n    template <>\n    inline int power<2>(int base) {\n        return (int)(base*base);\n    }\n\n    template <>\n    inline int power<3>(int base) {\n        return (int)(base*base*base);\n    }\n\n    template <>\n    inline int power<4>(int base) {\n        return power<2>(power<2>(base));\n    }\n\n    template <>\n    inline int power<5>(int base) {\n        return (power<2>(base)*power<3>(base));\n    }\n\n    template <>\n    inline int power<6>(int base) {\n        return power<2>(power<3>(base));\n    }\n\n    template <>\n    inline int power<7>(int base) {\n        return (power<4>(base)*power<3>(base));\n    }\n\n    template <>\n    inline int power<8>(int base) {\n        return (power<2>(power<4>(base)));\n    }\n\n    template <>\n    inline int power<9>(int base) {\n        return (power<3>(power<3>(base)));\n    }\n\n    template <>\n    inline int power<10>(int base) {\n        return (power<2>(power<5>(base)));\n    }\n\n    template <>\n    inline int power<12>(int base) {\n        return (power<3>(power<4>(base)));\n    }\n\n\n    // Florian: following code from the internet (stackoverflow)\n    namespace detail {\n\t\ttemplate<class T, int N>\n\t\tstruct helper {\n\t\t\tstatic T pow(const T x){\n\t\t\t\treturn helper<T, N-1>::pow(x) * x;\n\t\t\t}\n\t\t};\n\n\t\ttemplate<class T>\n\t\tstruct helper<T, 1> {\n\t\t\tstatic T pow(const T x){\n\t\t\t\treturn x;\n\t\t\t}\n\t\t};\n\n\t\ttemplate<class T>\n\t\tstruct helper<T, 0> {\n\t\t\tstatic T pow(const T x){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t};\n    }\n\n    template<int N, class T>\n    T power(T const x) {\n    \treturn detail::helper<T, N>::pow(x);\n    }\n\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/mra/qmprop.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/adquad.h>\n#include <madness/misc/cfft.h>\n#include <madness/misc/interpolation_1d.h>\n#include <cmath>\n#include <complex>\n#include <madness/constants.h>\n#include <iostream>\n#include <vector>\n#include <algorithm>\n\n/// \\file qmprop.cc\n/// \\brief Implements BandlimitedPropagator and qm_free_particle_propagator\n\n\nnamespace madness {\n    /// Class to evaluate the filtered Schrodinger free-particle propagator in real space\n\n    /// Follows the corresponding Maple worksheet and the implementation notes.\n    class BandlimitedPropagator {\n    private:\n        double width;\n        double xmax;\n        CubicInterpolationTable<double_complex> fit;\n\n        double_complex g0_filtered(double k, double c, double t) {\n            double r = k/c;\n            if (fabs(r) > 4.0) return 0.0;\n            double_complex arg(0.0, -k*k*t*0.5);\n            return exp(arg)/(1.0 + pow(r,30.0));\n        }\n\n    public:\n        typedef double_complex returnT;\n\n        BandlimitedPropagator(double c, double t, double width) : width(width) {\n            // 4.0 is range of window in Fourier space, 32x for\n            // oversampling in real space for accurate cubic\n            // interpolation.  \n\n            // Extra factor of 4 from accurate tdse1d testing\n\n            const double kmax = 32.0*4.0*c * 4;\n            const double fac = kmax/constants::pi;\n            \n            // NEW\n            double hk = 0.0625;\n            const double dN = 2.0*kmax/hk;\n            const int N = std::pow(2.0,double(std::ceil(std::log(dN)/std::log(2.0))));\n            hk = 2.0*kmax/N;\n\n            // ORIGINAL\n            // const double fac = kmax/constants::pi;\n            // const double c2 = std::pow(2.0,double(std::ceil(std::log(c)/std::log(2.0))));\n            // const int N = 131072 * std::max(2*c2,1.0);\n            // const double hk = 2.0*kmax/N;\n\n            const double hx = constants::pi/kmax;\n\n            //print(\"c\", c,\"t\", t, \"width\", width, \"kmax\", kmax, \"hk\", hk, \"N\", N, \"hx\", hx);\n            \n            std::vector<double_complex> s(N);\n\n            for (int i=0; i<N/2; ++i) {\n                double k = i*hk;\n                s[i] = g0_filtered(k, c, t)*fac;\n                if (i) s[N-i] = g0_filtered(-k, c, t)*fac;\n            }\n\n            CFFT::Inverse(&s[0], N);\n\n            // for (int i=0; i<N; i++) {\n            //     print(i, real(s[i]), imag(s[i]));\n            // }\n            // throw \"done\";\n            \n            MADNESS_ASSERT(abs(s[N/2]) <1e-14);\n            int n;\n            for (n=N/2; n>=0 && std::abs(s[n])<1e-14; --n);\n            ++n;\n\n            s.resize(n);\n\n            xmax = (n-1)*hx;\n            fit = CubicInterpolationTable<double_complex>(0.0, xmax, n, s);\n        }\n\n        Level natural_level() const {return 13;}\n\n        std::complex<double> operator()(double x) const {\n            x = fabs(x)*width;\n            if (x >= xmax) return 0.0;\n            else return fit(x)*width;\n        }\n\n        static void test() {\n            std::complex<double> maple(1.138514411208581,-0.986104972271240);\n            BandlimitedPropagator bp(31.4, 0.07, 1.0);\n            if (std::abs(bp(0.1)-maple) > 1e-11) {\n                std::cout.precision(14);\n                std::cout << bp(0.1) << \" \" << maple << \" \" << bp(0.1)-maple << std::endl;\n                throw \"BandlimitedPropagator: failed test\";\n            }\n            return;\n        }\n\n        static void plot() {\n            test();\n            std::cout.precision(12);\n            for (int j=0; j<=4; j++) {\n                double width = 100.0;\n                double c = 10.0;\n                double tcrit  = 2.0*3.14159/(c*c);\n                double t = tcrit * (1<<j);\n                BandlimitedPropagator bp(c, t, width);\n\n                print(\"QM: c\", c, \"tcrit\", tcrit, \"*\", (1<<j));\n                for (int i=0; i<10001; ++i) {\n                    double x = i/10000.0; // SIMULATION coords so don't need width\n                    double_complex value = bp(x);\n                    print(x*width,value.real(),value.imag());\n                }\n            }\n\n        }\n    };\n\n    void bandlimited_propagator_plot(){BandlimitedPropagator::plot();}\n\n\n    Convolution1D<double_complex>*\n    qm_1d_free_particle_propagator(int k, double bandlimit, double timestep, double width) {\n        return new GenericConvolution1D<double_complex,BandlimitedPropagator>(k,BandlimitedPropagator(bandlimit,timestep,width),0);\n    }\n\n    template <std::size_t NDIM>\n    SeparatedConvolution<double_complex,NDIM>\n    qm_free_particle_propagator(World& world, int k, double bandlimit, double timestep) {\n        double width = FunctionDefaults<NDIM>::get_cell_min_width(); // Assuming cubic so all dim equal\n        std::vector< std::shared_ptr< Convolution1D<double_complex> > > q(1);\n        q[0].reset(qm_1d_free_particle_propagator(k, bandlimit, timestep, width));\n        return SeparatedConvolution<double_complex,NDIM>(world, q, k, true);\n    }\n\n    template <std::size_t NDIM>\n    SeparatedConvolution<double_complex,NDIM>*\n    qm_free_particle_propagatorPtr(World& world, int k, double bandlimit, double timestep) {\n        double width = FunctionDefaults<NDIM>::get_cell_min_width(); // Assuming cubic so all dim equal\n        std::vector< std::shared_ptr< Convolution1D<double_complex> > > q(1);\n        q[0].reset(qm_1d_free_particle_propagator(k, bandlimit, timestep, width));\n        return new SeparatedConvolution<double_complex,NDIM>(world, q, k, true);\n    }\n\n#ifdef FUNCTION_INSTANTIATE_1\n    template SeparatedConvolution<double_complex,1> qm_free_particle_propagator(World& world, int k, double bandlimit, double timestep);\n    template SeparatedConvolution<double_complex,1>* qm_free_particle_propagatorPtr(World& world, int k, double bandlimit, double timestep);\n#endif\n\n#ifdef FUNCTION_INSTANTIATE_2\n    template SeparatedConvolution<double_complex,2> qm_free_particle_propagator(World& world, int k, double bandlimit, double timestep);\n#endif\n\n#ifdef FUNCTION_INSTANTIATE_3\n    template SeparatedConvolution<double_complex,3> qm_free_particle_propagator(World& world, int k, double bandlimit, double timestep);\n#endif\n\n#ifdef FUNCTION_INSTANTIATE_4\n    template SeparatedConvolution<double_complex,4> qm_free_particle_propagator(World& world, int k, double bandlimit, double timestep);\n#endif\n\n#ifdef FUNCTION_INSTANTIATE_5\n    template SeparatedConvolution<double_complex,5> qm_free_particle_propagator(World& world, int k, double bandlimit, double timestep);\n#endif\n\n#ifdef FUNCTION_INSTANTIATE_6\n    template SeparatedConvolution<double_complex,6> qm_free_particle_propagator(World& world, int k, double bandlimit, double timestep);\n#endif\n}\n"
  },
  {
    "path": "src/madness/mra/qmprop.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_MRA_QMPROP_H__INCLUDED\n#define MADNESS_MRA_QMPROP_H__INCLUDED\n\n/// \\file qmprop.h\n/// \\brief Prototypes for qm propagator\n\nnamespace madness {\n    Convolution1D<double_complex>*\n    qm_1d_free_particle_propagator(int k, double bandlimit, double timestep, double width);\n\n    template <std::size_t NDIM>\n    SeparatedConvolution<double_complex,NDIM>\n    qm_free_particle_propagator(World& world, int k, double bandlimit, double timestep);\n\n    template <std::size_t NDIM>\n    SeparatedConvolution<double_complex,NDIM>*\n    qm_free_particle_propagatorPtr(World& world, int k, double bandlimit, double timestep);\n\n    void bandlimited_propagator_plot();\n\n}\n\n\n#endif\n"
  },
  {
    "path": "src/madness/mra/sdf_domainmask.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id: sdf_shape.h 1792 2010-01-26 12:58:18Z rjharrison $\n*/\n\n/*!\n  \\file mra/sdf_domainmask.h\n  \\brief Defines abstract interfaces and concrete classes signed distance\n         functions and domain masks.\n\n  Interfaces for a signed distance function (sdf) and a domain mask are\n  made.  The original conception of these interfaces was for doing\n  shapes and interior boundary conditions in MADNESS; however, the\n  interfaces were abstracted for other applications.\n\n  The domain mask builds on a sdf such that \\f$0 <=  \\mbox{mask(sdf)} <= 1\\f$\n  for smooth switching between domains.  That said, a mask needs a sdf.\n\n  A general-purpose functor is given that combines a sdf and mask\n  to produce MADNESS functions for various entities including\n      - The domain mask (trace is the volume)\n      - The gradient of mask (related to the surface)\n      - The surface (trace is the surface area)\n      - The normal derivative of the surface\n\n  \\ingroup mrabcint\n*/\n\n#ifndef MADNESS_MRA_SDF_DOMAINMASK_H__INCLUDED\n#define MADNESS_MRA_SDF_DOMAINMASK_H__INCLUDED\n\n#include <madness/mra/mra.h>\n\nnamespace madness {\n\n    /** \\brief The interface for a signed distance function (sdf).\n\n        A class implementing this interface will need to provide the sdf\n        given a point in coordinate space, and also the gradient of the\n        sdf at this point.\n\n        \\c NDIM is the dimensionality of the coordinate space.\n\n        \\ingroup mrabcint */\n    template <std::size_t NDIM>\n    class SignedDFInterface {\n    public:\n        /** \\brief Returns the signed distance from the surface,\n               - Positive is ``inside''\n               - Negative is ``outside''\n\n            \\param[in] x The coordinate\n            \\return The signed distance */\n        virtual double sdf(const Vector<double,NDIM>& x) const = 0;\n\n        /** \\brief Returns the gradient of the signed distance from the\n                   surface (i.e., \\c dsdf(x)/dx[i] )\n\n            \\param[in] x The coordinate\n            \\return The gradient */\n        virtual Vector<double,NDIM> grad_sdf(const Vector<double,NDIM>& x)\n            const = 0;\n\n        virtual ~SignedDFInterface() {}\n    };\n\n    /** \\brief The interface for masking functions defined by signed distance\n               functions.\n\n        This interface was initially conceived for using shapes in MADNESS\n        to specify internal boundary conditions.  The signed distance function\n        defines the shape, and this mask allows calculations of volumes,\n        surfaces, etc.\n\n        \\ingroup mrabcint */\n    class DomainMaskInterface {\n    public:\n        /** \\brief Returns the characteristic mask function\n                - 1 in interior\n                - 0 in exterior\n                - 1/2 on boundary\n\n            \\param[in] d The signed distance from the surface\n            \\return The mask or characteristic function */\n        virtual double mask(double d) const = 0;\n\n        /** \\brief Returns the derivative of the characteristic mask function\n                   with respect to the distance (from the surface)\n\n            \\param[in] d The signed normal distance from the surface\n            \\return Derivative of the characteristic mask function */\n        virtual double dmask(double d) const = 0;\n\n        /** \\brief Returns the value of the normalized surface layer function\n\n            Normalized means the volume integral of this function should\n            converge to the surface area in the limit of a either an infinitely\n            thin surface or zero curvature.  The function thus acts as a\n            ``delta function'' located at the boundary.\n\n            \\param[in] d The signed normal distance from the surface\n            \\return Normalized surface layer function */\n        virtual double surface(double d) const = 0;\n\n        /** \\brief Returns the derivative of the normalized surface layer\n                   function\n\n            \\param[in] d The signed normal distance from the surface\n            \\return Derivative of the normalized surface layer function */\n        virtual double dsurface(double d) const = 0;\n\n        virtual ~DomainMaskInterface() {}\n    };\n\n    /** \\brief Framework for combining a signed distance function (sdf)\n               with a domain mask to produce MADNESS functions.\n\n        This interface provides functor functionality to produce MADNESS\n        functions for\n           - the domain mask (given the sdf)\n           - the derivative of the domain mask\n           - the surface (given the sdf)\n           - the normal derivative of the surface layer\n\n        The functor defaults to the domain mask; however, member functions\n        can toggle between the other options.\n\n        \\ingroup mrabcint */\n    template <std::size_t NDIM>\n    class DomainMaskSDFFunctor : public FunctionFunctorInterface<double,NDIM> {\n\n    private:\n        /// \\brief Bury the default constructor\n        DomainMaskSDFFunctor() {}\n\n    private: // protected may be better if this becomes highly inherited\n        /// The domain mask to use\n        std::shared_ptr<DomainMaskInterface> mask;\n\n        /// The signed distance function\n        std::shared_ptr<SignedDFInterface<NDIM> > sdf;\n\n        int mswitch; ///< Which masking function to use (mask, surface, etc.)\n\n    public:\n        // switch values\n        static const int MASK; ///< Use the \\c mask() function in \\c mask\n        static const int MASK_COMPLEMENT; ///< Get the complement of \\c mask()\n        static const int DMASK; ///< Use the \\c dmask() function in \\c mask\n        static const int SURFACE; ///< Use the \\c surface() function in \\c mask\n        static const int DSURFACE; ///< Use the \\c dsurface() function in \\c mask\n\n        /** \\brief Constructor for mask/sdf functor\n\n            \\param mask Pointer to the domain mask\n            \\param sdf Pointer to the signed distance function */\n        DomainMaskSDFFunctor(std::shared_ptr<DomainMaskInterface> mask,\n                std::shared_ptr<SignedDFInterface<NDIM> > sdf)\n            : mask(mask), sdf(sdf), mswitch(MASK)\n        {}\n\n        /** \\brief Constructor for mask/sdf function specifying the desired\n                   function (mask, surface, etc.)\n\n            \\param mask Pointer to the domain mask\n            \\param sdf Pointer to the signed distance function\n            \\param[in] _mswitch Which function to use (MASK, DMASK, SURFACE,\n                       DSURFACE, or MASK_COMPLEMENT) */\n        DomainMaskSDFFunctor(std::shared_ptr<DomainMaskInterface> mask,\n                std::shared_ptr<SignedDFInterface<NDIM> > sdf, int _mswitch)\n            : mask(mask), sdf(sdf), mswitch(MASK) {\n            if(_mswitch == MASK || _mswitch == DMASK || _mswitch == SURFACE ||\n               _mswitch == DSURFACE || _mswitch == MASK_COMPLEMENT) {\n                mswitch = _mswitch;\n            }\n            else {\n                error(\"Unrecognized function option in DomainMaskSDFFunctor\" \\\n                      \"::DomainMaskSDFFunctor()\");\n            }\n        }\n\n        /** \\brief Uses the functor interface to make a MADNESS function\n\n            \\param x Point to compute value\n            \\return Value of the desired function */\n        double operator()(const Vector<double,NDIM>& x) const {\n            if(mswitch == DomainMaskSDFFunctor<NDIM>::MASK)\n                return mask->mask(sdf->sdf(x));\n            else if(mswitch == DomainMaskSDFFunctor<NDIM>::MASK_COMPLEMENT)\n                return 1.0 - mask->mask(sdf->sdf(x));\n            else if(mswitch == DomainMaskSDFFunctor<NDIM>::DMASK)\n                return mask->dmask(sdf->sdf(x));\n            else if(mswitch == DomainMaskSDFFunctor<NDIM>::SURFACE)\n                return mask->surface(sdf->sdf(x));\n            else if(mswitch == DomainMaskSDFFunctor<NDIM>::DSURFACE)\n                return mask->dsurface(sdf->sdf(x));\n            else {\n                error(\"Unknown function from DomainMaskInterface in \" \\\n                      \"DomainMaskSDFFunctor::operator()\");\n                return 0.0;\n            }\n        }\n\n        /** \\brief Toggles which function from DomainMaskInterface to use when\n                   making the MADNESS function.\n\n            \\param _mswitch The function to use (should be MASK, DMASK,\n                   SURFACE, DSURFACE, or MASK_COMPLEMENT) */\n        void setMaskFunction(int _mswitch) {\n            if(_mswitch == MASK || _mswitch == DMASK || _mswitch == SURFACE ||\n               _mswitch == DSURFACE || _mswitch == MASK_COMPLEMENT) {\n                mswitch = _mswitch;\n            }\n            else {\n                error(\"Unrecognized function option in DomainMaskSDFFunctor\" \\\n                      \"::setMaskFunction()\");\n            }\n        }\n\n        virtual ~DomainMaskSDFFunctor() {}\n    };\n\n    template<std::size_t NDIM>\n    const int DomainMaskSDFFunctor<NDIM>::MASK = 1;\n\n    template<std::size_t NDIM>\n    const int DomainMaskSDFFunctor<NDIM>::MASK_COMPLEMENT = 2;\n\n    template<std::size_t NDIM>\n    const int DomainMaskSDFFunctor<NDIM>::DMASK = 3;\n\n    template<std::size_t NDIM>\n    const int DomainMaskSDFFunctor<NDIM>::SURFACE = 4;\n\n    template<std::size_t NDIM>\n    const int DomainMaskSDFFunctor<NDIM>::DSURFACE = 5;\n\n    /** \\brief Provides the Li-Lowengrub-Ratz-Voight (LLRV) domain mask\n               characteristic functions.\n\n        \\ingroup mrabcint\n\n        See X. Li, J. Lowengrub, A. R&auml;tz, and A. Voight, ``Solving PDEs in\n        Complex Geometries: A Diffuse Domain Approach,'' Commun. Math. Sci., 7,\n        p81-107, 2009.\n\n        Given a signed distance, this class implements in the domain mask\n        and surface functions from the above reference.  For the domain mask,\n\n        \\f[ \\varphi(d) = \\frac{1}{2}\\left( 1 - \\tanh\\left(\n                         \\frac{3d}{\\varepsilon} \\right) \\right) \\f]\n\n        where \\f$d\\f$ is the signed distance.  The normalized surface function\n        is\n\n        \\f[ B(\\varphi) = \\frac{36}{\\varepsilon} \\varphi^2 (1-\\varphi)^2. \\f]\n\n        The constant \\f$36/\\varepsilon\\f$ is chosen to fulfill\n\n        \\f[ \\int_{-\\infty}^\\infty B(s) \\, ds = 1 \\f]\n\n        This class assumes the domain mask is uniformly 0 or 1 outside\n        signed distances \\f$ |8 \\epsilon| \\f$ since the switching function\n        becomes 0/1 to machine precision at these levels.  Specifically,\n        for this function the parameter \\f$ \\epsilon \\f$ is an effective\n        measure of the full width of the surface layer since\n\n        \\f[ \\int_{-\\epsilon/2}^{\\epsilon/2} B(s) \\, ds \\doteq 0.987 \\f]\n\n        and\n\n        \\f[ \\int_{-\\epsilon}^{\\epsilon} B(s) \\, ds \\doteq 0.999963 \\f] */\n    class LLRVDomainMask : public DomainMaskInterface {\n    private:\n        LLRVDomainMask() : epsilon(0.0) {} ///< Forbidden\n\n    protected:\n        const double epsilon; ///< The width of the transition region\n\n    public:\n        /** \\brief Constructor for the domain mask\n\n            \\param[in] epsilon The effective width of the surface */\n        LLRVDomainMask(double epsilon)\n            : epsilon(epsilon)\n        {}\n\n        /** \\brief Value of characteristic function at normal distance d from\n                   the surface\n\n            \\param[in] d The signed distance.  Negative is ``inside,''\n                         positive is ``outside.''\n            \\return The domain mask */\n        double mask(double d) const {\n            if (d > 8.0*epsilon) {\n                return 0.0; // we're safely outside\n            }\n            else if (d < -8.0*epsilon) {\n                return 1.0; // inside\n            }\n            else {\n                return 0.5 * (1.0 - tanh(3.0 * d / epsilon));\n            }\n        }\n\n        /** \\brief Derivative of characteristic function with respect to the\n                   normal distance\n\n            \\param[in] d The signed distance\n            \\return The derivative */\n        double dmask(double d) const {\n            if (fabs(d) > 8.0*epsilon) {\n                return 0.0; // we're safely outside or inside\n            }\n            else {\n                double tanh3d = tanh(3.0*d/epsilon);\n                return 1.5*(tanh3d*tanh3d - 1.0) / epsilon;\n            }\n        }\n\n        /** \\brief Value of surface function at distance d normal to surface\n\n            \\param[in] d The signed distance\n            \\return The value of the surface function */\n        double surface(double d) const {\n            double phi = mask(d);\n            double phic = 1.0 - phi;\n            return 36.0*phi*phi*phic*phic/epsilon;\n        }\n\n        /** \\brief Value of d(surface)/ddistance\n\n            \\param[in] d The signed distance\n            \\return The derivative of the surface function */\n        double dsurface(double d) const {\n            double phi = mask(d);\n            double dphi = dmask(d);\n            return 72.0*phi*(1.0-phi)*dphi*(1.0 - 2.0*phi)/epsilon;\n        }\n\n        virtual ~LLRVDomainMask() {}\n    };\n\n    /** \\brief Use a Gaussian for the surface function and the corresponding erf\n               for the domain mask. */\n    class GaussianDomainMask : public DomainMaskInterface {\n    private:\n        GaussianDomainMask() : epsilon(0.0) {} ///< Forbidden\n\n    protected:\n        const double epsilon; ///< The width of the transition region\n\n    public:\n        /** \\brief Constructor for the domain mask\n\n            \\param[in] epsilon The effective width of the surface */\n        GaussianDomainMask(double epsilon)\n            : epsilon(epsilon)\n        {}\n\n        /** \\brief Value of characteristic function at normal distance d from\n                   the surface\n\n            \\param[in] d The signed distance.  Negative is ``inside,''\n                         positive is ``outside.''\n            \\return The domain mask */\n        double mask(double d) const {\n            if (d > 8.0*epsilon) {\n                return 0.0; // we're safely outside\n            }\n            else if (d < -8.0*epsilon) {\n                return 1.0; // inside\n            }\n            else {\n                return (1.0 - erf(d / (sqrt(2.0) * epsilon))) * 0.5;\n            }\n        }\n\n        /** \\brief Derivative of characteristic function with respect to the\n                   normal distance\n\n            \\param[in] d The signed distance\n            \\return The derivative */\n        double dmask(double d) const {\n            if (fabs(d) > 8.0*epsilon) {\n                return 0.0; // we're safely outside or inside\n            }\n            else {\n                return -exp(-d*d*0.5/(epsilon*epsilon)) / (sqrt(2.0*constants::pi)\n                    * epsilon);\n            }\n        }\n\n        /** \\brief Value of surface function at distance d normal to surface\n\n            \\param[in] d The signed distance\n            \\return The value of the surface function */\n        double surface(double d) const {\n            return exp(-d*d*0.5/(epsilon*epsilon)) / (sqrt(2.0*constants::pi)\n                * epsilon);\n        }\n\n        /** \\brief Value of d(surface)/ddistance\n\n            \\param[in] d The signed distance\n            \\return The derivative of the surface function */\n        double dsurface(double d) const {\n            return -exp(-d*d*0.5/(epsilon*epsilon)) * d / (sqrt(2.0*constants::pi)\n                * epsilon*epsilon*epsilon);\n        }\n\n        virtual ~GaussianDomainMask() {}\n    };\n\n} // end of madness namespace\n\n#endif // MADNESS_MRA_SDF_DOMAINMASK_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/sdf_shape_2D.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n\n/**\n  \\file mra/sdf_shape_2D.h\n  \\brief Implements the SignedDFInterface for common 2-D geometric objects.\n  \\ingroup mrabcint\n\n  This file provides signed distance functions for common 2-D geometric objects:\n  - Circle\n  - Rectangle\n  \n  \\note The signed distance functions should be the shortest distance between\n  a point and \\b any point on the surface.  This is hard to calculate in many\n  cases, so we use contours here.  The surface layer may not be equally thick\n  around all points on the surface.  Some shapes have the exact shortest\n  distances, which will be noted on a class-by-class basis.  Serious usage\n  of the contour-based signed distance functions is not recommended.\n*/  \n  \n#ifndef MADNESS_MRA_SDF_SHAPE_2D_H__INCLUDED\n#define MADNESS_MRA_SDF_SHAPE_2D_H__INCLUDED\n\n#include <madness/mra/sdf_domainmask.h>\n\nnamespace madness {\n\n    /// \\brief A circle (2 dimensions)\n    class SDFCircle : public SignedDFInterface<2> {\n    protected:\n        const double radius; ///< Radius of circle\n        const coord_2d center; ///< Center of circle\n\n    public:\n        /** \\brief SDF for a sphere\n\n            \\param radius The radius of the sphere\n            \\param center The center of the sphere */\n        SDFCircle(const double radius, const coord_2d &center) \n            : radius(radius)\n            , center(center) \n        {}\n\n        /** \\brief Computes the normal distance\n\n            This SDF is exact, and easy to show.\n\n            \\param pt Point at which to compute the distance from the surface\n            \\return The signed distance from the surface */\n        double sdf(const coord_2d& pt) const {\n            double temp, r;\n            int i;\n            \n            r = 0.0;\n            for(i = 0; i < 2; ++i) {\n                temp = pt[i] - center[i];\n                r += temp * temp;\n            }\n            \n            return sqrt(r) - radius;\n        }\n\n        /** \\brief Computes the gradient of the SDF.\n\n            \\param pt Point at which to compute the gradient\n            \\return the gradient */\n        coord_2d grad_sdf(const coord_2d& pt) const {\n            double x = pt[0] - center[0];\n            double y = pt[1] - center[1];\n            double r = sqrt(x*x + y*y);\n            coord_2d g;\n            if(r < 1.0e-6) {\n                g[0] = g[1] = 0.0;\n            }\n            else {\n                g[0] = x/r;\n                g[1] = y/r;\n            }\n            return g;\n        }\n    };\n\n    /** \\brief A rectangle (2 dimensions)\n\n        This SDF naively uses contours, and should be improved for serious\n        usage.\n\n        \\note LIMIT -- the 2 primary axes must be x and y */\n    class SDFRectangle : public SignedDFInterface<2> {\n    protected:\n        const coord_2d lengths;  ///< Half the length of each side\n        const coord_2d center; ///< the center\n\n    public:\n        /** \\brief Constructor for rectangle\n\n            \\param length The lengths of the rectangle\n            \\param center The center of the rectangle */\n        SDFRectangle(const coord_2d& length, const coord_2d& center) \n            : lengths(length*0.5), center(center) \n        {}\n\n        /** \\brief Computes the normal distance\n\n            \\param pt Point at which to compute the distance from the surface\n            \\return The signed distance from the surface */\n        double sdf(const coord_2d& pt) const {\n            double diff, max;\n            \n            max = fabs(pt[0] - center[0]) - lengths[0];\n            diff = fabs(pt[1] - center[1]) - lengths[1];\n            if(diff > max)\n                max = diff;\n            \n            return max;\n        }\n\n        /** Computes the gradient of the SDF.\n\n            \\param pt Point at which to compute the gradient\n            \\return the gradient */\n        coord_2d grad_sdf(const coord_2d& pt) const {\n            MADNESS_EXCEPTION(\"gradient method is not yet implemented for this shape\",0);\n        }\n    };\n\n} // end of madness namespace\n\n#endif // MADNESS_MRA_SDF_SHAPE_2D_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/sdf_shape_3D.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n\n/**\n  \\file mra/sdf_shape_3D.h\n  \\brief Implements the SignedDFInterface for common 3-D geometric objects.\n  \\ingroup mrabcint\n\n  This file provides signed distance functions for common 3-D geometric objects:\n  - Plane\n  - Sphere\n  - Cone\n  - Paraboloid\n  - Box\n  - Cube\n  - Ellipsoid\n  - Cylinder\n  \n  \\note The signed distance functions should be the shortest distance between\n  a point and \\b any point on the surface.  This is hard to calculate in many\n  cases, so we use contours here.  The surface layer may not be equally thick\n  around all points on the surface.  Some surfaces (plane, sphere, paraboloid)\n  use the exact signed distance functions.  All others use the contours, which\n  may be extremely problematic and cause excessive refinement.  The sdf\n  function of the sphere class outlines how to calculate the exact signed\n  distance functions, if needed.\n*/  \n  \n#ifndef MADNESS_MRA_SDF_SHAPE_3D_H__INCLUDED\n#define MADNESS_MRA_SDF_SHAPE_3D_H__INCLUDED\n\n#include <madness/mra/sdf_domainmask.h>\n\nnamespace madness {\n\n    /// \\brief A plane surface (3 dimensions)\n    class SDFPlane : public SignedDFInterface<3> {\n    protected:\n        const coord_3d normal; ///< The normal vector pointing OUTSIDE the surface\n        const coord_3d point; ///< A point in the plane\n\n    public:\n        \n        /** \\brief SDF for a plane transecting the entire simulation volume\n\n            \\param normal The outward normal definining the plane\n            \\param point A point in the plane */\n        SDFPlane(const coord_3d& normal, const coord_3d& point)\n            : normal(normal*(1.0/sqrt(normal[0]*normal[0] + normal[1]*normal[1] + normal[2]*normal[2])))\n            , point(point) \n        {}\n\n        /** \\brief Computes the normal distance\n\n            This SDF is exact, and easy to show.\n\n            \\param pt Point at which to compute the distance from the surface\n            \\return The signed distance from the surface */\n        double sdf(const coord_3d& pt) const {\n            return (pt[0]-point[0])*normal[0] + (pt[1]-point[1])*normal[1] + (pt[2]-point[2])*normal[2];\n        }\n\n        /** \\brief Computes the gradient of the SDF.\n\n            \\param pt Point at which to compute the gradient\n            \\return the gradient */\n        coord_3d grad_sdf(const coord_3d& pt) const {\n            MADNESS_EXCEPTION(\"gradient method is not yet implemented for this shape\",0);\n        }\n    };\n\n    /// \\brief A spherical surface (3 dimensions)\n    class SDFSphere : public SignedDFInterface<3> {\n    protected:\n        const double radius; ///< Radius of sphere\n        const coord_3d center; ///< Center of sphere\n\n    public:\n        /** \\brief SDF for a sphere\n\n            \\param radius The radius of the sphere\n            \\param center The center of the sphere */\n        SDFSphere(const double radius, const coord_3d &center) \n            : radius(radius)\n            , center(center) \n        {}\n\n        /** \\brief Computes the normal distance\n\n            This SDF is exact, and easy to show.\n\n            \\param pt Point at which to compute the distance from the surface\n            \\return The signed distance from the surface */\n        double sdf(const coord_3d& pt) const {\n            double temp, r;\n            int i;\n            \n            r = 0.0;\n            for(i = 0; i < 3; ++i) {\n                temp = pt[i] - center[i];\n                r += temp * temp;\n            }\n            \n            return sqrt(r) - radius;\n        }\n\n        /** \\brief Computes the gradient of the SDF.\n\n            \\param pt Point at which to compute the gradient\n            \\return the gradient */\n        coord_3d grad_sdf(const coord_3d& pt) const {\n            double x = pt[0] - center[0];\n            double y = pt[1] - center[1];\n            double z = pt[2] - center[2];\n            double r = sqrt(x*x + y*y + z*z);\n            coord_3d g;\n            g[0] = x/r;\n            g[1] = y/r;\n            g[2] = z/r;\n            return g;\n        }\n    };\n\n    /** \\brief A cone (3 dimensions)\n\n        The cone is defined by \n\n        \\f[ \\sqrt{x^2 + y^2} - c * z = 0 \\f]\n\n        where \\f$ z \\f$ is along the cone's axis. */\n    class SDFCone : public SignedDFInterface<3> {\n    protected:\n        const coord_3d apex; ///< The apex\n        const double c; ///< The radius\n        const coord_3d dir; ///< The direction of the axis, from the apex INSIDE\n\n    public:\n        /** \\brief Constructor for cone\n\n            \\param c Parameter \\f$ c \\f$ in the definition of the cone\n            \\param apex Apex of cone\n            \\param direc Oriented axis of the cone */\n        SDFCone(const double c, const coord_3d &apex, const coord_3d &direc) \n            : apex(apex)\n            , c(c)\n            , dir(direc*(1.0/sqrt(direc[0]*direc[0] + direc[1]*direc[1] + direc[2]*direc[2])))\n        {}\n\n        /** \\brief Computes the normal distance\n\n            This SDF naively uses contours, and should be improved before\n            serious usage.\n\n            \\param pt Point at which to compute the distance from the surface\n            \\return The signed distance from the surface */\n        double sdf(const coord_3d& pt) const {\n            coord_3d diff;\n            unsigned int i;\n            double dotp;\n            \n            for(i = 0; i < 3; ++i)\n                diff[i] = pt[i] - apex[i];\n            \n            dotp = diff[0]*dir[0] + diff[1]*dir[1] + diff[2]*dir[2];\n            \n            for(i = 0; i < 3; ++i)\n                diff[i] -= dotp * dir[i];\n            \n            return sqrt(diff[0]*diff[0] + diff[1]*diff[1] + diff[2]*diff[2])\n                - c * dotp;\n        }\n\n        /** \\brief Computes the gradient of the SDF.\n\n            \\param pt Point at which to compute the gradient\n            \\return the gradient */\n        coord_3d grad_sdf(const coord_3d& pt) const {\n            MADNESS_EXCEPTION(\"gradient method is not yet implemented for this shape\",0);\n        }\n    };\n\n    /** \\brief A paraboloid (3 dimensions)\n\n        The surface is defined by \n\n        \\f[ x^2 + y^2 - c * z == 0 \\f]\n\n        where \\f$ z \\f$ is along the paraboloid's axis. */\n    class SDFParaboloid : public SignedDFInterface<3> {\n    protected:\n        const coord_3d apex; ///< The apex\n        const double c; ///< Curvature/radius of the surface\n        const coord_3d dir;///< The direction of the axis, from the apex INSIDE\n        const long double zero; ///< Numerical zero for root-finding in sdf\n        const long double rootzero; ///< Numerical zero for the roots\n\n    public:\n        /** \\brief Constructor for paraboloid\n\n            \\param c Parameter \\f$ c \\f$ in the definition of the paraboloid\n            \\param apex Apex of paraboloid\n            \\param direc Oriented axis of the paraboloid */\n        SDFParaboloid(const double c, const coord_3d &apex, const coord_3d &direc) \n            : apex(apex)\n            , c(c)\n            , dir(direc*(1.0/sqrt(direc[0]*direc[0] + direc[1]*direc[1] + direc[2]*direc[2])))\n            , zero(1.0e-10L)\n            , rootzero(1.0e-14L)\n        {}\n\n        /** \\brief Computes the normal distance.\n\n            This SDF is exact.\n\n            Given a point, pt=(x, y, z), the goal is to find another point,\n            pt0=(x0, y0, z0), on the surface that minimizes |pt - pt0|^2.  The\n            root of this minimized square distance (and a sign) is the sdf.\n\n            For simplicity (here), I will assume that the paraboloid's axis\n            is along the positive z-axis and that the origin is the apex.\n            Note that the code does NOT make these assumptions.\n\n            Thus, we want to minimize\n               (x-x0)^2 + (y-y0)^2 + (z-z0)^2\n            subject to\n               x0^2 + y0^2 - c z0 == 0.\n\n            Using Lagrange multipliers, the system of equations is\n            -2(x-x0) == L 2 x0\n            -2(y-y0) == L 2 y0\n            -2(z-z0) == L (-c)\n            x0^2 + y0^2 - c z0 == 0.\n\n            After some algebra, we get a cubic equation for L,\n            (x^2 + y^2 - c z) + (2c z + c^2/2) L - c (z + c) L^2\n               + c^2/2 L^3 == 0\n\n            This can be solved analytically in Mathematica, producing a long,\n            messy equation.  This equation has some stability issues (large\n            cancellations in some areas) and is not implemented below.\n            Instead we use an iterative root finder to locate the roots of the\n            cubic.  The simple bisection method is used, perhaps someone will\n            improve the code someday).\n\n            Once we have the correct Lagrange multiplier,\n            |pt - pt0|^2 = c L^2 (z - L c/2 + c/4).\n            The square root of this quantity (with the appropriate sign for\n            inside/outside) gives the sdf.\n            \n            \\param pt Point at which to compute the distance from the surface\n            \\return The signed distance from the surface */\n        double sdf(const coord_3d& pt) const {\n            // work in extended precision since this calculation can have\n            // large cancellations\n            Vector<long double, 3> diff;\n            unsigned int i, n;\n            long double dotp, d;\n            long double dist, temp[2], upper;\n\t    //double lambda;\n            std::vector<long double> roots;\n\n            // silence warnings ... doesn't work\n            //lambda = 0.0;\n            dist = 0.0;\n\n            // avoid lots of casting\n            long double c = (long double)this->c;\n\n            for(i = 0; i < 3; ++i)\n                diff[i] = pt[i] - apex[i];\n\n            dotp = diff[0]*dir[0] + diff[1]*dir[1] + diff[2]*dir[2];\n            \n            for(i = 0; i < 3; ++i)\n                diff[i] -= dotp * dir[i];\n\n            d = diff[0]*diff[0] + diff[1]*diff[1] + diff[2]*diff[2]\n                - c * dotp;\n            //printf(\"   %.16Le %.16Le %.16Le\\n\", c, d, dotp);\n\n            // get the real roots (Lagrange multipliers) and find the one\n            // that minimizes the distance.\n            // note that real roots must be no bigger than (4dotp+c)/(2c)\n            // from the analytical form\n            roots = get_roots(c, d, dotp);\n            upper = (4.0L*dotp + c) * 0.5L / c;\n            n = 0;\n            for(std::vector<long double>::iterator iter = roots.begin();\n                iter != roots.end(); ++iter) {\n\n                temp[0] = *iter;\n\n                // are we in range?\n                if(temp[0] <= upper) {\n\n                    // calculate the distance\n                    temp[1] = c*(dotp - temp[0]*c*0.5L + c*0.25L);\n                    if(temp[1] < 0.0L) {\n                        // temp[1] is analytically non-negative\n                        // if we're here, it's noise\n                        temp[1] = 0.0L;\n                    }\n                    else {\n                        temp[1] = std::abs(temp[0])*sqrt(temp[1]);\n                    }\n\n                    if(n == 0) {\n\t\t      //lambda = temp[0];\n                        dist = temp[1];\n                    }\n                    else {\n                        if(temp[1] < dist) {\n\t\t\t  //lambda = temp[0];\n                            dist = temp[1];\n                        }\n                    }\n                    ++n;\n                }\n            }\n            //printf(\"   L = %.16Le D = %.16Le\\n\", lambda, dist);\n\n            MADNESS_ASSERT(n > 0); // we should have at least one real root...\n\n            if(d > 0.0L)\n                return (double)dist;\n            else\n                return (double)(-dist);\n        }\n\n        /** \\brief Computes the gradient of the SDF.\n\n            \\param pt Point at which to compute the gradient\n            \\return the gradient */\n        coord_3d grad_sdf(const coord_3d& pt) const {\n            MADNESS_EXCEPTION(\"gradient method is not yet implemented for this shape\",0);\n        }\n\n        protected:\n        /** \\brief Finds real root(s) of the cubic polynomial in the sdf\n                   function.\n\n            The cubic equation can successfully solve the cubic analytically,\n            but evaluating the expression can be numerically irksome.\n            Analytical results show that at most one root appears in each of\n            the domains\n            - (-Infinity, (2z+2c-|c-2z|)/(3c))\n            - ((2z+2c-|c-2z|)/(3c), (2z+2c+|c-2z|)/(3c))\n            - ((2z+2c-|c-2z|)/(3c), Infinity).\n\n            Furthermore, the cubic is always increasing in the first and\n            third domains, and always decreasing in the second.\n\n            Since the cubic is easy to evaluate, we use simple bisections\n            to find the roots...  this can probably be improved.\n\n            Cubic equation of interest:\n            d + c(2z+c/2)*L - c(c+z)L^2 + c^2/2L^3 == 0\n\n            \\param[in] c Parameter c for the paraboloid.\n            \\param[in] d The d parameter: x^2+y^2-cz = d\n            \\param[in] z The distance from the apex along the paraboloid's\n                         axis (called dotp in sdf)\n            \\return The root(s)\n        */\n        std::vector<long double> get_roots(const long double c,\n                             const long double d, const long double z) const {\n\n            long double lower, upper, bound;\n            std::vector<long double> roots(0);\n            long double derivroot1, derivroot2, temp;\n            bool hasregion2, keepgoing, foundroot;\n\n            // calculate the region boundaries\n            lower = 2.0L*(c+z);\n            upper = std::abs(c - 2.0L*z);\n            hasregion2 = (upper >= 1.0e-10L);\n\n            derivroot1 = (lower - upper) / (3.0L*c);\n            derivroot2 = (lower + upper) / (3.0L*c);\n\n            // first region -------------------------------------------------\n            foundroot = false;\n            upper = derivroot1;\n\n            // if cubic(upper) < 0.0, there's no root in this region\n            bound = eval_cubic(upper, c, d, z);\n            if(std::abs(bound) < zero) {\n                // this is the root!\n                roots.push_back(upper);\n                hasregion2 = false;\n            }\n            if(bound > 0.0L) {\n                // there's a root in region 1: find it!\n\n                // need to find a lower bound\n                temp = -1.0;\n                do {\n                    lower = upper + temp;\n                    bound = eval_cubic(lower, c, d, z);\n                    if(std::abs(bound) < zero) {\n                        // found the root!\n                        roots.push_back(lower);\n                        foundroot = true;\n                        break;\n                    }\n\n                    keepgoing = (bound > 0.0L);\n                    // if we didn't cross the root, we have a better upperbound\n                    if(keepgoing)\n                        upper = lower;\n                } while(keepgoing);\n\n                // with a lower and upper bound, find the root!\n                if(!foundroot) {\n                    temp = find_root(lower, upper, c, d, z, true);\n                    roots.push_back(temp);\n                }\n            }\n            else {\n                // no root in region 1; hence no root in region 2\n                hasregion2 = false;\n            }\n\n            // second region ------------------------------------------------\n            if(hasregion2) {\n                lower = derivroot1;\n                upper = derivroot2;\n                // the lower range has to be positive the upper range has to be\n                // negative\n                if(lower > 0.0L && upper < 0.0L) {\n                    temp = find_root(lower, upper, c, d, z, false);\n                    roots.push_back(temp);\n                }\n            }\n\n            // third region -------------------------------------------------\n            foundroot = false;\n            lower = derivroot2;\n\n            // if cubic(upper) > 0.0, there's no root in this region\n            bound = eval_cubic(lower, c, d, z);\n            if(std::abs(bound) < zero) {\n                // this is the root!\n                roots.push_back(lower);\n            }\n            if(bound < 0.0L) {\n                // there's a root in region 3: find it!\n\n                // need to find an upper bound\n                temp = 1.0;\n                do {\n                    upper = lower + temp;\n                    bound = eval_cubic(upper, c, d, z);\n                    if(std::abs(bound) < zero) {\n                        // found the root!\n                        roots.push_back(upper);\n                        foundroot = true;\n                        break;\n                    }\n\n                    keepgoing = (bound < 0.0L);\n                    // if we didn't cross the root, we have a better lowerbound\n                    if(keepgoing)\n                        lower = upper;\n                } while(keepgoing);\n\n                // with a lower and upper bound, find the root!\n                if(!foundroot) {\n                    temp = find_root(lower, upper, c, d, z, true);\n                    roots.push_back(temp);\n                }\n            }\n\n            return roots;\n        }\n\n        /** Finds a root in the specified range for the cubic equation.\n\n            This uses a simple bisection method... perhaps someone will\n            improve it one day...\n\n            \\param[in] lower The bottom of the range\n            \\param[in] upper The top of the range\n            \\param[in] c Parameter c for the paraboloid.\n            \\param[in] d The d parameter: x^2+y^2-cz = d\n            \\param[in] z The distance from the apex along the paraboloid's\n                         axis (called dotp in sdf)\n            \\param[in] dir True if the function is increasing in the domain,\n                           false for decreasing\n            \\return the root.\n        */\n        long double find_root(long double lower, long double upper,\n                              const long double c, const long double d,\n                              const long double z, bool dir) const {\n\n            long double value, middle;\n            do {\n                middle = 0.5L*(upper + lower);\n                value = eval_cubic(middle, c, d, z);\n\n                if(std::abs(value) < zero)\n                    return middle;\n\n                if(value < 0.0L) {\n                    if(dir)\n                        lower = middle;\n                    else\n                        upper = middle;\n                }\n                else {\n                    if(dir)\n                        upper = middle;\n                    else\n                        lower = middle;\n                }\n            } while(std::abs(upper-lower) > rootzero);\n\n            return middle;\n        }\n\n        /** \\brief Evaluates the cubic equation for the Lagrangian multipliers\n\n            Cubic equation of interest:\n            d + c(2z+c/2)*L - c(c+z)L^2 + c^2/2L^3 == 0\n\n            \\param[in] x Value at which to evaluate.\n            \\param[in] c Parameter c for the paraboloid.\n            \\param[in] d The d parameter: x^2+y^2-cz = d\n            \\param[in] z The distance from the apex along the paraboloid's\n                         axis (called dotp in sdf)\n            \\return the value\n        */\n        long double eval_cubic(const long double x, const long double c,\n                               const long double d, const long double z)\n                    const {\n            return ((c*0.5L*x - (c + z))*x + (2.0L*z + c*0.5L))*c*x + d;\n        }\n\n        /** \\brief Evaluates the derivative of the cubic equation for the\n                   Lagrangian multipliers\n\n            Cubic equation of interest:\n            d + c(2z+c/2)*L - c(c+z)L^2 + c^2/2L^3 == 0\n\n            Derivative:\n            c(2z+c/2) - 2c(c+z)L + 3c^2/2 L^2\n\n            \\param[in] x Value at which to evaluate.\n            \\param[in] c Parameter c for the paraboloid.\n            \\param[in] d The d parameter: x^2+y^2-cz = d\n            \\param[in] z The distance from the apex along the paraboloid's\n                         axis (called dotp in sdf)\n            \\return the value\n        */\n        long double eval_cubic_deriv(const long double x, const long double c,\n                               const long double d, const long double z)\n                    const {\n            return c*((1.5L*c*x - 2.0L*(c+z))*x + 2.0L*z + 0.5L*c);\n        }\n    };\n\n    /** \\brief A box (3 dimensions)\n\n        \\note LIMIT -- the 3 primary axes must be x, y, and z */\n    class SDFBox : public SignedDFInterface<3> {\n    protected:\n        const coord_3d lengths;  ///< Half the length of each side of the box\n        const coord_3d center; ///< the center of the box\n\n    public:\n        /** \\brief Constructor for box\n\n            \\param length The lengths of the box\n            \\param center The center of the box */\n        SDFBox(const coord_3d& length, const coord_3d& center) \n            : lengths(length*0.5), center(center) \n        {}\n\n        /** \\brief Computes the normal distance\n\n            This SDF naively uses contours, and should be improved before\n            serious usage.  If far from the corners, the SDF is easy (similar\n            to a plane), and is essentially what's implemented.\n\n            \\param pt Point at which to compute the distance from the surface\n            \\return The signed distance from the surface */\n        double sdf(const coord_3d& pt) const {\n            double diff, max;\n            int i;\n            \n            max = fabs(pt[0] - center[0]) - lengths[0];\n            for(i = 1; i < 3; ++i) {\n                diff = fabs(pt[i] - center[i]) - lengths[i];\n                if(diff > max)\n                    max = diff;\n            }\n            \n            return max;\n        }\n\n        /** Computes the gradient of the SDF.\n\n            \\param pt Point at which to compute the gradient\n            \\return the gradient */\n        coord_3d grad_sdf(const coord_3d& pt) const {\n            MADNESS_EXCEPTION(\"gradient method is not yet implemented for this shape\",0);\n        }\n    };\n\n    /** \\brief A cube (3 dimensions)\n\n        \\note LIMIT -- the 3 primary axes must be x, y, and z */\n    class SDFCube : public SDFBox {\n    public:\n        /** \\brief Constructor for box\n\n            \\param length The length of each side of the cube\n            \\param center The center of the cube */\n        SDFCube(const double length, const coord_3d& center) \n            : SDFBox(coord_3d(length), center)\n        {}\n    };\n\n    /** \\brief An ellipsoid (3 dimensions)\n    \n        \\note LIMIT -- the 3 primary axes must be x, y, and z */\n    class SDFEllipsoid : public SignedDFInterface<3> {\n    protected:\n        coord_3d radii; ///< the directional radii\n        coord_3d center; ///< the center\n        \n    public:\n        /** \\brief Constructor for ellipsoid\n\n            \\param radii The directional radii of the ellipsoid\n            \\param center The center of the ellipsoid */\n        SDFEllipsoid(const coord_3d& radii, const coord_3d& center) \n            : radii(radii)\n            , center(center) \n        {}\n        \n        /** \\brief Computes the normal distance\n\n            This SDF naively uses contours, and should be improved before\n            serious usage.\n\n            \\param pt Point at which to compute the distance from the surface\n            \\return The signed distance from the surface */\n        double sdf(const coord_3d& pt) const {\n            double quot, sum;\n            int i;\n            \n            sum = 0.0;\n            for(i = 0; i < 3; ++i) {\n                quot = (pt[i] - center[i]) / radii[i];\n                sum += quot * quot;\n            }\n            \n            return sum - 1.0;\n        }\n\n        /** Computes the gradient of the SDF.\n\n            \\param pt Point at which to compute the gradient\n            \\return the gradient */\n        coord_3d grad_sdf(const coord_3d& pt) const {\n            MADNESS_EXCEPTION(\"gradient method is not yet implemented for this shape\",0);\n        }\n    };\n    \n    /// \\brief A cylinder (3 dimensions)\n    class SDFCylinder : public SignedDFInterface<3> {\n    protected:\n        double radius; ///< the radius of the cylinder\n        double a; ///< half the length of the cylinder\n        coord_3d center; ///< the central axial point of the cylinder (distance a from both ends)\n        coord_3d axis; ///< the axial direction of the cylinder\n\n    public:\n        /** \\brief Constructor for cylinder\n\n            \\param radius The radius of the cylinder\n            \\param length The length of the cylinder\n            \\param axpt The central axial point of the cylinder (equidistant\n                        from both ends)\n            \\param axis The axial direction of the cylinder */\n        SDFCylinder(const double radius, const double length, const coord_3d& axpt, const coord_3d& axis) \n            : radius(radius)\n            , a(length / 2.0)\n            , center(axpt)\n            , axis(axis*(1.0/sqrt(axis[0]*axis[0] + axis[1]*axis[1] + axis[2]*axis[2]))) \n        {}\n        \n        /** \\brief Computes the normal distance\n\n            This SDF naively uses contours, and should be improved before\n            serious usage.\n\n            \\param pt Point at which to compute the distance from the surface\n            \\return The signed distance from the surface */\n        double sdf(const coord_3d& pt) const {\n            double dist;\n            coord_3d rel, radial;\n            int i;\n            \n            // axial distance\n            dist = 0.0;\n            for(i = 0; i < 3; ++i) {\n                rel[i] = pt[i] - center[i];\n                dist += rel[i] * axis[i];\n            }\n            \n            // get the radial component\n            for(i = 0; i < 3; ++i)\n                radial[i] = rel[i] - dist * axis[i];\n            \n            return std::max(fabs(dist) - a, sqrt(radial[0]*radial[0] + radial[1]*radial[1]\n                                                 + radial[2]*radial[2]) - radius);\n        }\n\n        /** Computes the gradient of the SDF.\n\n            \\param pt Point at which to compute the gradient\n            \\return the gradient */\n        coord_3d grad_sdf(const coord_3d& pt) const {\n            MADNESS_EXCEPTION(\"gradient method is not yet implemented for this shape\",0);\n        }\n    };\n\n} // end of madness namespace\n\n#endif // MADNESS_MRA_SDF_SHAPE_3D_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/simplecache.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_MRA_SIMPLECACHE_H__INCLUDED\n#define MADNESS_MRA_SIMPLECACHE_H__INCLUDED\n\n#include <madness/mra/key.h>\n#include <madness/world/worldhashmap.h>\n\nnamespace madness {\n    /// Simplified interface around hash_map to cache stuff for 1D\n\n    /// This is a write once cache --- subsequent writes of elements\n    /// have no effect (so that pointers/references to cached data\n    /// cannot be invalidated)\n    template <typename Q, std::size_t NDIM>\n    class SimpleCache {\n    private:\n        typedef ConcurrentHashMap< Key<NDIM>, Q > mapT;\n        typedef std::pair<Key<NDIM>, Q> pairT;\n        mapT cache;\n\n    public:\n        SimpleCache() : cache() {};\n\n        SimpleCache(const SimpleCache& c) : cache(c.cache) {};\n\n        SimpleCache& operator=(const SimpleCache& c) {\n            if (this != &c) {\n                cache.clear();\n                cache = c.cache;\n            }\n            return *this;\n        }\n\n        /// If key is present return pointer to cached value, otherwise return NULL\n        inline const Q* getptr(const Key<NDIM>& key) const {\n            typename mapT::const_iterator test = cache.find(key);\n            if (test == cache.end()) return 0;\n            return &(test->second);\n        }\n\n\n        /// If key=(n,l) is present return pointer to cached value, otherwise return NULL\n\n        /// This for the convenience (backward compatibility) of 1D routines\n        inline const Q* getptr(Level n, Translation l) const {\n            Key<NDIM> key(n,Vector<Translation,NDIM>(l));\n            return getptr(key);\n        }\n\n\n        /// If key=(n,l) is present return pointer to cached value, otherwise return NULL\n\n        /// This for the convenience (backward compatibility) of 1D routines\n        inline const Q* getptr(Level n, const Key<NDIM>& disp) const {\n            Key<NDIM> key(n,disp.translation());\n            return getptr(key);\n        }\n\n\n        /// Set value associated with key ... gives ownership of a new copy to the container\n        inline void set(const Key<NDIM>& key, const Q& val) {\n            [[maybe_unused]] auto&& [it, inserted] = cache.insert(pairT(key,val));\n        }\n\n        inline void set(Level n, Translation l, const Q& val) {\n            Key<NDIM> key(n,Vector<Translation,NDIM>(l));\n            set(key, val);\n        }\n\n        inline void set(Level n, const Key<NDIM>& disp, const Q& val) {\n            Key<NDIM> key(n,disp.translation());\n            set(key, val);\n        }\n    };\n}\n#endif // MADNESS_MRA_SIMPLECACHE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/startup.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n/// \\file mra/startup.cc\n\n#include <madness/mra/mra.h>\n#include <madness/tensor/tensor.h>\n#include <madness/world/timers.h>\n//#include <madness/mra/mraimpl.h> !!!!!!!!!!!!!!!!  NOOOOOOOOOOOOOOOOOOOOOOOOOO !!!!!!!!!!!!!!!!!!!!!!!\n#include <iomanip>\n#include <cstdlib>\n\nnamespace madness {\n\n\n  // Quick check on the performance of both BLAS and fastest/slowest processor\n  static void time_transform(World& world, int& mflopslo, int& mflopshi) {\n    const long N=20, NLOOP=100;\n    Tensor<double> s(N,N,N), r(N,N,N), w(N,N,N), c(N,N);\n    s=1.0; r=1.0; c=1.0;\n    for (long loop=0; loop<10; loop++) fast_transform(s, c, r, w);\n    double used = cpu_time();\n    for (long loop=0; loop<NLOOP; loop++) fast_transform(s, c, r, w);\n    used = cpu_time()-used;\n    mflopslo = mflopshi = int(1e-6*2.0*3.0*N*N*N*N*double(NLOOP)/used);\n    world.gop.max(mflopshi);\n    world.gop.min(mflopslo);\n  }\n\n\n\n    void startup(World& world, int argc, char** argv, bool doprint, bool make_stdcout_nice_to_reals) {\n        const char* data_dir = MRA_DATA_DIR;\n\n        // Process command line arguments\n        for (int arg=1; arg<argc; ++arg) {\n            if (strcmp(argv[arg],\"-dx\")==0)\n                xterm_debug(argv[0], 0);\n            else if (strcmp(argv[arg],\"-lf\")==0)\n                redirectio(world);\n            else if (strcmp(argv[arg],\"-dn\") ==0 &&\n                     std::atoi(argv[arg+1])==world.rank())\n                xterm_debug(\"world\",0);\n//             else if (strcmp(argv[arg],\"-dam\")==0)\n//                 world.am.set_debug(true);\n//             else if (strcmp(argv[arg],\"-dmpi\")==0)\n//                 world.mpi.set_debug(true);\n            else if (strcmp(argv[arg],\"-rio\")==0)\n                redirectio(world);\n        }\n\n        // Process environment variables\n        if (getenv(\"MRA_DATA_DIR\")) data_dir = getenv(\"MRA_DATA_DIR\");\n\n        // Need to add an RC file ...\n\n        world.gop.fence();\n\n\tinit_tensor_lapack();\n\n        // if allowed: configure std::cout to be useful for printing reals\n        if (make_stdcout_nice_to_reals) {\n          std::cout << std::boolalpha; // Pretty printing of booleans\n          std::cout << std::scientific;\n          std::cout << std::showpoint;\n          // std::cout << std::showpos;\n          std::cout << std::setprecision(6);\n        }\n\n#ifdef FUNCTION_INSTANTIATE_1\n        FunctionDefaults<1>::set_defaults(world);\n        Displacements<1> d1;\n#endif\n#ifdef FUNCTION_INSTANTIATE_2\n        FunctionDefaults<2>::set_defaults(world);\n        Displacements<2> d2;\n#endif\n#ifdef FUNCTION_INSTANTIATE_3\n        FunctionDefaults<3>::set_defaults(world);\n        Displacements<3> d3;\n#endif\n#ifdef FUNCTION_INSTANTIATE_4\n        FunctionDefaults<4>::set_defaults(world);\n        Displacements<4> d4;\n#endif\n#ifdef FUNCTION_INSTANTIATE_5\n        FunctionDefaults<5>::set_defaults(world);\n        Displacements<5> d5;\n#endif\n#ifdef FUNCTION_INSTANTIATE_6\n        FunctionDefaults<6>::set_defaults(world);\n        Displacements<6> d6;\n#endif\n\n        //if (world.rank() == 0) print(\"loading coeffs, etc.\");\n\n        load_coeffs(world, data_dir);\n\n        //if (world.rank() == 0) print(\"loading quadrature, etc.\");\n\n        load_quadrature(world, data_dir);\n\n        // This to init static data while single threaded\n        initialize_legendre_stuff();\n\n        //if (world.rank() == 0) print(\"testing coeffs, etc.\");\n        MADNESS_CHECK(gauss_legendre_test());\n        MADNESS_CHECK(test_two_scale_coefficients());\n\n\tint mflopslo, mflopshi;\n\ttime_transform(world, mflopslo, mflopshi);\n\n        // print the configuration options\n        if (doprint && world.rank() == 0) {\n            print(\"\");\n            print(\"--------------------------------------------\");\n            print(\"   MADNESS\",MADNESS_PACKAGE_VERSION, \"multiresolution suite\");\n            print(\"--------------------------------------------\");\n            print(\"\");\n            print(\"   number of processors ...\", world.size());\n            print(\"    processor frequency ...\", cpu_frequency());\n            print(\"     hostname of rank 0 ...\", get_hostname());\n            print(\"            host system ...\", HOST_SYSTEM);\n            print(\"          configured by ...\", MADNESS_CONFIGURATION_USER);\n            print(\"          configured on ...\", MADNESS_CONFIGURATION_HOST);\n            print(\"          configured at ...\", MADNESS_CONFIGURATION_DATE);\n            print(\"                    CXX ...\", MADNESS_CONFIGURATION_CXX);\n            print(\"               CXXFLAGS ...\", MADNESS_CONFIGURATION_CXXFLAGS);\n#ifdef OPTERON_TUNE\n            print(\"             tuning for ...\", \"opteron\");\n#elif defined(CORE_DUO_TUNE)\n            print(\"             tuning for ...\", \"core duo\");\n#else\n            print(\"             tuning for ...\", \"default\");\n#endif\n#ifdef BOUNDS_CHECKING\n            print(\" tensor bounds checking ...\", \"enabled\");\n#endif\n#ifdef TENSOR_INSTANCE_COUNT\n            print(\"  tensor instance count ...\", \"enabled\");\n#endif\n#ifdef STUBOUTMPI\n\t    print(\"                    MPI ...\", \"stubbed out\");\n#elif MADNESS_MPI_THREAD_LEVEL == MPI_THREAD_SERIALIZED\n\t    print(\"                    MPI ...\", \"serialized\");\n#else\n\t    print(\"                    MPI ...\", \"multiple\");\n#endif\n#if HAVE_INTEL_TBB\n            print(\" multi-threaded runtime ...\", \"Intel TBB\");\n#elif defined(HAVE_PARSEC)\n            print(\" multi-threaded runtime ...\", \"PaRSEC\");\n#else\n            print(\" multi-threaded runtime ...\", \"MADNESS ThreadPool\");\n#endif\n#if HAVE_INTEL_MKL\n            print(\"                   BLAS ...\", \"Intel MKL\",  mflopslo, mflopshi, \"MFLOP/s\");\n#elif defined(HAVE_FAST_BLAS)\n            print(\"                   BLAS ...\", \"Fast BLAS not MKL\",  mflopslo, mflopshi, \"MFLOP/s\");\n#else\n            print(\"                   BLAS ...\", \"Slow reference\",  mflopslo, mflopshi, \"MFLOP/s\");\n#endif\n#ifdef HAVE_MTXMQ\n            print(\"                   BLAS ...\", \"Have MTXMQ\");\n#endif\n            print(\"               compiled ...\",__TIME__,\" on \",__DATE__);\n\n            //         print(\" \");\n            //         IndexIterator::test();\n        }\n\n\n        world.gop.fence();\n    }\n\n\n    std::string get_mra_data_dir() {\n        const char* data_dir = MRA_DATA_DIR; // as defined at configure time\n        if (getenv(\"MRA_DATA_DIR\")) data_dir = getenv(\"MRA_DATA_DIR\"); // override by environment variable\n        return std::string(data_dir);\n    };\n\n}\n"
  },
  {
    "path": "src/madness/mra/test6.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file test6.cc\n/// \\brief test various functionality for 6d functions\n\n#include <madness/mra/mra.h>\n#include <madness/world/test_utilities.h>\n\nusing namespace madness;\n\nstd::string ok(const bool b) {if (b) return \"ok   \"; return \"fail \";};\n\nint check_small(const double val, const double eps, const std::string message) {\n\tbool is_small=(fabs(val)<eps);\n\tprint(ok(is_small),val,message);\n\treturn (is_small) ? 0 : 1;\n}\n\nint check(bool b, const std::string message) {\n\tprint(ok(b),message);\n\treturn (b) ? 0 : 1;\n}\n\nbool is_small(const double& val, const double& eps) {\n\treturn (val<eps);\n}\n\n\nbool is_large(const double& val, const double& eps) {\n\treturn (val>eps);\n}\n\ntemplate<size_t NDIM>\nvoid load_function(World& world, Function<double,NDIM>& pair, const std::string name) {\n    if (world.rank()==0)  print(\"loading function \", name);\n\n    archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, name.c_str());\n    ar & pair;\n\n    FunctionDefaults<3>::set_k(pair.k());\n    FunctionDefaults<6>::set_k(pair.k());\n\n    FunctionDefaults<3>::set_thresh(pair.thresh());\n    FunctionDefaults<6>::set_thresh(pair.thresh());\n\n    std::string line=\"loaded function \"+name;\n    pair.print_size(line);\n\n}\n\ntemplate<size_t NDIM>\nvoid save_function(World& world, Function<double,NDIM>& pair, const std::string name) {\n    if (world.rank()==0)  print(\"saving function \", name);\n\n    archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, name.c_str());\n    ar & pair;\n\n    std::string line=\"saved function \"+name;\n    pair.print_size(line);\n\n}\n\n\nstatic double one_3d(const coord_3d& r) {\n\treturn 1.0;\n}\n\nstatic double zero_3d(const coord_3d& r) {\n\treturn 0.0;\n}\n\nstatic double one_6d(const coord_6d& r) {\n\treturn 1.0;\n}\n\nstatic double gauss_3d(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    const double r2= sqrt(x*x + y*y + z*z);\n    const double norm=0.712705695388313;\n    return norm*exp(-r2);\n}\n\nstatic double tightgauss_3d(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    const double r2= sqrt(x*x + y*y + z*z);\n    const double norm=0.712705695388313;\n    return norm*exp(-2.0*r2);\n}\n\nstatic double gauss_plus_one_3d(const coord_3d& r) {\n    return gauss_3d(r)+one_3d(r);\n}\nstatic double gauss_plus_tight_3d(const coord_3d& r) {\n    return gauss_3d(r)+tightgauss_3d(r);\n}\n\n\n// static double gauss_6d(const coord_6d& r) {\n//     coord_3d r1, r2;\n//     r1[0]=r[0],    r1[1]=r[1],    r1[2]=r[2];\n//     r2[0]=r[3],    r2[1]=r[4],    r2[2]=r[5];\n//     return gauss_3d(r1)*gauss_3d(r2);\n// }\n//\n//\n// static double r2r(const coord_6d& r) {\n//     coord_3d r1, r2;\n//     r1[0]=r[0],    r1[1]=r[1],    r1[2]=r[2];\n//     r2[0]=r[3],    r2[1]=r[4],    r2[2]=r[5];\n//     double g1=gauss_3d(r1);\n//     return g1*g1*gauss_3d(r2);\n// }\n\n//static double add_test(const coord_6d& r) {\n//    coord_3d r1, r2;\n//    r1[0]=r[0],    r1[1]=r[1],    r1[2]=r[2];\n//    r2[0]=r[3],    r2[1]=r[4],    r2[2]=r[5];\n//    double g1=gauss_3d(r1);\n//    double g2=gauss_3d(r2);\n//\n//    return g1*g2 + g1*g1*g2;\n//}\n\nstatic double V(const Vector<double,3>& r) {\n  return -1.0/sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]+1e-12);\n}\n\n/// test f(1,2) = g(1) h(2)\ntemplate<typename T, std::size_t NDIM>\nint test_hartree_product(World& world, const long& k, const double thresh) {\n    test_output t1(std::string(\"testing hartree_product for dimension \"+std::to_string(NDIM)));\n//    t1.set_cout_to_terminal();\n    constexpr std::size_t LDIM=NDIM/2;\n    static_assert(LDIM*2==NDIM);\n    double loose=1.1*std::pow(2.0,1.5*LDIM);\n    print(\"loosening factor\",loose);\n    FunctionDefaults<NDIM>::set_tensor_type(TT_2D);\n    FunctionDefaults<LDIM>::set_tensor_type(TT_FULL);\n\n    {\n        Function<T,LDIM> phi=FunctionFactory<T,LDIM>(world).f([](const Vector<double,LDIM>& r) {return exp(-inner(r,r));});\n        auto reference=[](const Vector<double,NDIM>& r) {return exp(-inner(r,r));};\n\n        Function<T,NDIM> ij=hartree_product(phi,phi);\n        double err1=ij.err(reference);\n        ij.truncate();\n        double err2=ij.err(reference);\n        print(\"err1, err2\",err1,err2);\n        t1.checkpoint(is_small(err2,thresh*loose),\"hartree_product(gauss,gauss) error:\");\n    }\n\n    {\n        Function<T,LDIM> phi=FunctionFactory<T,LDIM>(world).f([](const Vector<double,LDIM>& r) {return exp(-sqrt(inner(r,r)+1.e-1));});\n        Function<T,NDIM> ij=hartree_product(phi,phi);\n        auto reference=[](const Vector<double,NDIM>& r) {\n            double r1=0.0, r2=0.0;\n           \tfor (std::size_t i=0; i<LDIM; ++i) {\n                 r1+=r[i]*r[i];\n                 r2+=r[i+LDIM]*r[i+LDIM];\n            }\n            return exp(-sqrt(r1+1.e-1)-sqrt(r2+1.e-1));\n        };\n        double err=ij.err(reference);\n        print(\"err\",err);\n        t1.checkpoint(is_small(err,thresh*loose*3.0),\"hartree_product(slater,slater) error:\");\n    }\n\n\tprint(\"all done\\n\");\n    return t1.end();\n}\n\n/// test f(1,2)*g(1)\ntemplate<typename T, std::size_t NDIM>\nint test_multiply(World& world, const long& k, double thresh) {\n\tconstexpr std::size_t LDIM=NDIM/2;\n\tFunctionDefaults<NDIM>::set_tensor_type(TT_2D);\n\tFunctionDefaults<LDIM>::set_tensor_type(TT_FULL);\n\tthresh*=50;\n\n    test_output t1(std::string(\"testing multiply f(1,2)*g(1) for dimension \"+std::to_string(NDIM)));\n    t1.set_cout_to_terminal();\n\n\t/// Slater factor\n    Function<T,NDIM> f12=FunctionFactory<T,NDIM>(world).is_on_demand().f([](const Vector<double,NDIM>& r) {\n        Vector<double,LDIM> r1, r2;\n        for (std::size_t i=0; i<LDIM; ++i) {\n            r1[i]=r[i];\n            r2[i]=r[i+LDIM];\n        }\n        return exp(- (r1-r2).normf());\n    });\n\n\n    const Function<T,LDIM> phi=FunctionFactory<T,LDIM>(world).f([](const Vector<double,LDIM>& r){return exp(-r.normf());});\n    const Function<T,LDIM> phisq=phi*phi;\n\n    Function<T,NDIM> fii=CompositeFactory<T,NDIM,LDIM>(world)\n    \t    \t.particle1(copy(phi))\n    \t    \t.particle2(copy(phi))\n    \t    \t.g12(f12);\n    Function<T,NDIM> fi2i=CompositeFactory<T,NDIM,LDIM>(world)\n    \t    \t.particle1(copy(phisq))\n    \t    \t.particle2(copy(phi))\n    \t    \t.g12(f12);\n\n    Function<T,NDIM> fii2=CompositeFactory<T,NDIM,LDIM>(world)\n                .particle1(copy(phi))\n                .particle2(copy(phisq))\n                .g12(f12);\n\n\n    fii.fill_tree();\n    fi2i.fill_tree();\n    fii2.fill_tree();\n\n    fii.print_size(\"f12 |phi phi>\");\n    fi2i.print_size(\"f12 |phi^2 phi>\");\n    fii2.print_size(\"f12 |phi phi^2>\");\n\n\n \tfor (int particle=1; particle<3; ++particle) {\n \t\tFunction<T,NDIM> iij1=multiply(copy(fii),phi,particle);\n \t\tstd::string sp=std::to_string(particle);\n     \tiij1.print_size(\"multiply\");\n     \tiij1.truncate().reduce_rank();\n     \tiij1.print_size(\"multiply truncated\");\n     \tdouble err=(fi2i-iij1).norm2();\n \t\tt1.checkpoint(err,thresh,\"multiply f(1,2)*g(\"+sp+\"1) error:\");\n \t}\n\n \tfor (int particle=1; particle<3; ++particle) {\n \t\tstd::string sp=std::to_string(particle);\n \t\tFunction<T,NDIM> iij3;\n \t\tif (particle==1) iij3=CompositeFactory<T,NDIM,LDIM>(world)\n \t\t\t\t\t.ket(copy(fii)).V_for_particle1(copy(phi));\n \t\tif (particle==2) iij3=CompositeFactory<T,NDIM,LDIM>(world)\n \t\t\t\t\t.ket(copy(fii)).V_for_particle2(copy(phi));\n\n     \tiij3.fill_tree();\n     \tiij3.print_size(\"CompositeFactory\");\n     \tiij3.truncate();\n     \tiij3.print_size(\"CompositeFactory truncated\");\n \t\tdouble err=(fi2i-iij3).norm2();\n\n \t\tt1.checkpoint(err,thresh,\"CompositeFactory (1,2)*g(\"+sp+\") error:\");\n \t}\n\n\treturn t1.end();\n}\n\n/// test f(1,2) + g(1,2) for both f and g reconstructed\nint test_add(World& world, const long& k, const double thresh) {\n\n    print(\"entering add\");\n    int nerror=0;\n\n    // simple test for 3d functions and different adding schemes\n    real_function_3d one3=real_factory_3d(world).f(one_3d);\n    real_function_3d gauss3=real_factory_3d(world).f(gauss_3d);\n    real_function_3d gauss_plus_one3=real_factory_3d(world).f(gauss_plus_one_3d);\n\n    {\n    \treal_function_3d r1=one3+gauss3;\n    \tdouble error1=r1.err(gauss_plus_one_3d);\n    \tnerror+=check_small(error1,thresh,\"operator+\");\n    }\n    {\n    \treal_function_3d r1=one3+gauss3;\t// this has been checked before\n    \treal_function_3d r2=r1-gauss_plus_one3;\n    \tdouble error2=r2.err(zero_3d);\n    \tnerror+=check_small(error2,thresh,\"operator-\");\n    }\n    {\n    \tone3.compress(); gauss3.compress();\n    \treal_function_3d r3=gaxpy_oop(1.0,one3,1.0,gauss3);\n    \tnerror+=check(r3.is_compressed(),\"is compressed\");\n    \tdouble error3=r3.err(gauss_plus_one_3d);\n    \tnerror+=check_small(error3,thresh,\"gaxpy_oop add\");\n    }\n    {\n    \tone3.reconstruct(); gauss3.reconstruct();\n    \treal_function_3d r4=gaxpy_oop_reconstructed(1.0,one3,1.0,gauss3);\n    \tnerror+=check(!r4.is_compressed(),\"is reconstructed\");\n    \tdouble error4=r4.err(gauss_plus_one_3d);\n    \tnerror+=check_small(error4,thresh,\"gaxpy_oop_reconstructed\");\n    }\n    {\n    \treal_function_3d r=copy(one3);\n    \tr.compress(); gauss3.compress();\n    \tr+=gauss3;\n    \tnerror+=check(r.is_compressed(),\"is reconstructed\");\n    \tdouble error1=r.err(gauss_plus_one_3d);\n    \tnerror+=check_small(error1,thresh,\"operator+=, compressed\");\n    }\n    {\n    \treal_function_3d r=copy(one3);\n    \tr.reconstruct(); gauss3.reconstruct();\n    \tr+=gauss3;\n    \tnerror+=check(r.is_compressed(),\"is reconstructed\");\n    \tdouble error1=r.err(gauss_plus_one_3d);\n    \tnerror+=check_small(error1,thresh,\"operator+=, reconstructed\");\n    }\n    {\n    \tone3.reconstruct(); gauss3.reconstruct();\n    \treal_function_3d r=gaxpy_oop_reconstructed(1.0,one3,-1.0,gauss3);\n    \tnerror+=check(!r.is_compressed(),\"is reconstructed\");\n    \treal_function_3d r2=one3-gauss3;\n    \tdouble error=(r-r2).norm2();\n    \tnerror+=check_small(error,thresh,\"gaxpy_oop_reconstructed subtract\");\n    }\n    {\n    \treal_function_3d r=copy(gauss3);\n    \tr.reconstruct(); gauss3.reconstruct();\n    \tr.add_scalar(1.0);\n    \tnerror+=check(!r.is_compressed(),\"is reconstructed\");\n    \tdouble error1=r.err(gauss_plus_one_3d);\n    \tnerror+=check_small(error1,thresh,\"add_scalar\");\n    }\n\n\n    // 6d tests; mainly consistency checks since err() function is very expensive in 6d\n    real_function_6d f=hartree_product(gauss3,gauss3);\n    real_function_6d one6=real_factory_6d(world).f(one_6d);\n\n    {\n    \treal_function_6d r=copy(f);\n    \tr.add_scalar(1.0);\n    \treal_function_6d r2=one6+f;\n    \tdouble error=(r2-r).norm2();\n    \tnerror+=check_small(error,thresh,\"6d add_scalar/operator+/-\");\n    }\n    {\n        real_function_3d tightgauss3=real_factory_3d(world).f(tightgauss_3d);\n        real_function_3d gauss_plus_tight3=real_factory_3d(world).f(gauss_plus_tight_3d);\n\n    \treal_function_6d r=hartree_product(gauss_plus_tight3,gauss_plus_tight3);\n    \treal_function_6d r1=hartree_product(gauss3,gauss3);\n    \treal_function_6d r2=hartree_product(gauss3,tightgauss3);\n    \treal_function_6d r22=hartree_product(tightgauss3,gauss3);\n    \tr22+=r2;\n    \tr22.scale(0.5);\n    \treal_function_6d r3=hartree_product(tightgauss3,tightgauss3);\n    \treal_function_6d r4=gaxpy_oop_reconstructed(1.0,r,-2.0,r22)-r1-r3;\n    \tdouble error=r4.norm2();\n    \tnerror+=check_small(error,1.5*thresh,\"6d gaxpy_oop_reconstructed/operator+=/operator- note loosened threshold\");\n    }\n\n    print(\"all done\\n\");\n    return nerror;\n}\n\n\n/// test f(1,2) + g(1,2) for both f and g reconstructed\nint test_exchange(World& world, const long& k, const double thresh) {\n\n    print(\"entering exchange f(1,2)*g(1)\");\n    int nerror=0;\n    bool good;\n\n    double norm;\n    real_function_3d phi=real_factory_3d(world).f(gauss_3d);\n\n\n    real_convolution_3d poisson = CoulombOperator(world,0.0001,thresh);\n\n    real_function_3d rho = 2.0*phi*phi;\n    real_function_3d coulombpot=poisson(rho);\n\n\n    real_function_6d f=2.0*hartree_product(phi,phi);\n    real_function_6d f2=multiply(f,phi,1);\n    f2.print_size(\"f2 after apply\");\n    norm=f2.norm2();\n    if (world.rank()==0) print(\"f2 norm\",norm);\n    real_function_6d x=poisson(f2);\n\n    x.print_size(\"x after apply\");\n    norm=x.norm2();\n    if (world.rank()==0) print(\"x norm\",norm);\n    x=multiply(x,phi,1);\n    x.print_size(\"x after multiply\");\n    norm=x.norm2();\n    if (world.rank()==0) print(\"x norm\",norm);\n\n\n    real_function_6d tmp=0.5*multiply(f,coulombpot,1);\n    tmp.print_size(\"tmp after multiply\");\n    norm=tmp.norm2();\n    if (world.rank()==0) print(\"tmp norm\",norm);\n\n    real_function_6d diff=tmp-x;\n    diff.print_size(\"diff\");\n    norm=diff.norm2();\n    if (world.rank()==0) print(\"diff norm\",norm);\n    good=is_small(norm,thresh);\n    print(ok(good), \"exchange error:\",norm);\n    if (not good) nerror++;\n\n    // do only orbital\n    real_function_3d tmp2=phi*coulombpot;\n    tmp2.print_size(\"J phi after multiply\");\n    norm=tmp2.norm2()*phi.norm2();\n    if (world.rank()==0) print(\"J phi norm\",norm);\n\n\n\n    print(\"all done\\n\");\n    return nerror;\n}\n\n/// test inner product using redundant wave functions\nint test_inner(World& world, const long& k, const double thresh) {\n\n    print(\"entering inner\");\n    int nerror=0;\n    bool good;\n\n    double norm;\n    real_function_3d phi=real_factory_3d(world).f(gauss_3d);\n    real_function_3d phi2=phi*phi;\n\n    real_function_6d f1=hartree_product(phi,phi);\n    real_function_6d f2=hartree_product(phi,phi2);\n\n    double a1=inner(f1,f2);\n    double a2=inner(phi,phi) * inner(phi,phi2);\n    norm=a1-a2;\n\n    if (world.rank()==0) print(\"diff norm\",norm);\n    good=is_small(norm,thresh);\n    print(ok(good), \"inner error:\",norm);\n    if (not good) nerror++;\n\n    print(\"all done\\n\");\n    return nerror;\n}\n\n\n/// test 6D convolution\nint test_convolution(World& world, const long& k, const double thresh) {\n\n    print(\"entering convolution\");\n    int nerror=0;\n    bool good;\n\n    double eps=-0.5;\n\n    // solve the 3D H-atom\n    real_function_3d phi=real_factory_3d(world).f(gauss_3d);\n    const real_function_3d v=real_factory_3d(world).f(V);\n\treal_function_3d vphi=v*phi;\n\n    v.print_size(\"v\");\n//    real_convolution_3d poisson = CoulombOperator(world,0.0001,thresh);\n    real_convolution_3d green = BSHOperator<3>(world, sqrt(-2.0*eps), 1.e-8, 1.e-6);\n\n    for (int i=0; i<10; ++i) {\n\n    \tvphi=v*phi;\n    \tdouble PE=inner(vphi,phi);\n    \tprint(\"<phi | V | phi>: \",PE);\n\n    \treal_derivative_3d Dx = free_space_derivative<double,3>(world,0);\n    \tFunction<double,3> du = Dx(phi);\n    \tdouble KE = 3*0.5*(du.inner(du));\n    \tprint(\"<phi | T | phi>: \",KE);\n    \tprint(\"<phi | H | phi>: \",KE + PE);\n\n\n    \tphi=green(-2.0*vphi).truncate();\n    \tdouble norm=phi.norm2();\n    \tphi.scale(1.0/norm);\n    \tprint(\"phi.norm2()\",norm);\n    }\n\n    vphi=v*phi;\n    double PE=inner(vphi,phi);\n   \tprint(\"<phi | V | phi>: \",PE);\n\n    // solve the H-atom in 6D\n    real_convolution_6d green6 = BSHOperator<6>(world, sqrt(-2.0*(eps+eps)), 1.e-8, 1.e-6);\n\n\treal_function_6d result1=-2.0*green6(copy(vphi),copy(phi)).truncate().reduce_rank();\n\tresult1=result1-2.0*green6(copy(phi),copy(vphi)).truncate().reduce_rank();\n\tworld.gop.fence();\n\n\tdouble a=result1.norm2();\n\tif (world.rank()==0) print(\"<GVphi | GVphi> \",a);\n\n\treal_function_6d diff=result1-hartree_product(phi,phi);\n\tdouble norm=diff.norm2();\n\n    if (world.rank()==0) print(\"diff norm\",norm);\n    good=is_small(norm,thresh);\n    print(ok(good), \"inner error:\",norm);\n    if (not good) nerror++;\n\n    print(\"all done\\n\");\n    return nerror;\n}\n\n\nint test_replicate(World& world, const long& k, const double thresh) {\n    real_function_3d phi=real_factory_3d(world).f(gauss_3d);\n    auto map=phi.get_pmap();\n    map->print_data_sizes(world,\"before replication\");\n    phi.replicate();\n    phi.get_pmap()->print_data_sizes(world,\"replicated\");\n    map->print_data_sizes(world,\"after replication\");\n    phi.distribute(map);\n    map->print_data_sizes(world,\"after distribution\");\n    return 0;\n}\n\n\nint test(World& world, const long& k, const double thresh) {\n\n    print(\"entering test\");\n    int nerror=0;\n\n    typedef Key<6> keyT;\n\n    real_function_3d phi=real_factory_3d(world).f(gauss_3d);\n\n    real_function_6d ij=hartree_product(phi,phi);\n//    real_function_3d ij=phi;\n    ij.compress();\n\n    // get the root NS coeffs\n    keyT key0=ij.get_impl()->get_cdata().key0;\n    GenTensor<double> NScoeff=(ij.get_impl()->get_coeffs().find(key0)).get()->second.coeff();\n\n    {\n\t\t// convert NS coeffs to values directly\n\t\tGenTensor<double> val1=ij.get_impl()->NScoeffs2values(key0,NScoeff,false);\n\n\t\t// convert NS coeffs to S coeffs, and then to values\n\t\tTensor<double> Scoeff=ij.get_impl()->unfilter(NScoeff).full_tensor_copy();\n\t\tTensor<double> val2(ij.get_impl()->get_cdata().v2k);\n\n\t\tfor (KeyChildIterator<6> kit(key0); kit; ++kit) {\n\t\t\tconst keyT& child = kit.key();\n\t\t\tstd::vector<Slice> cp = ij.get_impl()->child_patch(child);\n\t\t\tTensor<double> child_s_coeff=Scoeff(cp);\n\t\t\tval2(cp)=ij.get_impl()->coeffs2values(child,child_s_coeff);\n\t\t}\n\n\t\tTensor<double> diff=val2-val1.full_tensor_copy();\n\t\tdouble error=diff.normf();\n\t\tprint(\"error in NScoeff2values\",error);\n    }\n\n    {\n\t\t// convert S coeffs to values directly\n\t\tconst std::vector<Slice>& s0=ij.get_impl()->get_cdata().s0;\n\t\tGenTensor<double> val1=ij.get_impl()->NScoeffs2values(key0,GenTensor<double>(NScoeff(s0)),true);\n\n\t\t// convert NS coeffs to S coeffs, and then to values\n\t\tTensor<double> Scoeff(ij.get_impl()->get_cdata().v2k);\n\t\tScoeff(s0)=(NScoeff.full_tensor_copy()(s0));\n\t\tScoeff=ij.get_impl()->unfilter(Scoeff);\n\t\tTensor<double> val2(ij.get_impl()->get_cdata().v2k);\n\n\t\tfor (KeyChildIterator<6> kit(key0); kit; ++kit) {\n\t\t\tconst keyT& child = kit.key();\n\t\t\tstd::vector<Slice> cp = ij.get_impl()->child_patch(child);\n\t\t\tTensor<double> child_s_coeff=Scoeff(cp);\n\t\t\tval2(cp)=ij.get_impl()->coeffs2values(child,child_s_coeff);\n\t\t}\n\n\t\tTensor<double> diff=val2-val1.full_tensor_copy();\n\t\tdouble error=diff.normf();\n\t\tprint(\"error in Scoeff2values\",error);\n    }\n\n    {\n\t\t// convert S coeffs to values directly\n\t\tconst std::vector<Slice>& s0=ij.get_impl()->get_cdata().s0;\n\t\tGenTensor<double> val1=ij.get_impl()->NS_fcube_for_mul(key0,key0,GenTensor<double>(NScoeff(s0)),true);\n\n\t\t// convert NS coeffs to S coeffs, and then to values\n\t\tTensor<double> Scoeff(ij.get_impl()->get_cdata().v2k);\n\t\tScoeff(s0)=(NScoeff.full_tensor_copy()(s0));\n\t\tScoeff=ij.get_impl()->unfilter(Scoeff);\n\t\tTensor<double> val2(ij.get_impl()->get_cdata().v2k);\n\n\t\tfor (KeyChildIterator<6> kit(key0); kit; ++kit) {\n\t\t\tconst keyT& child = kit.key();\n\t\t\tstd::vector<Slice> cp = ij.get_impl()->child_patch(child);\n\t\t\tTensor<double> child_s_coeff=Scoeff(cp);\n\t\t\tval2(cp)=ij.get_impl()->coeffs2values(child,child_s_coeff);\n\t\t}\n\n\t\tTensor<double> diff=val2-val1.full_tensor_copy();\n\t\tdouble error=diff.normf();\n\t\tprint(\"error in NS_fcube_for_mul\",error);\n    }\n\n    {\n\t\t// convert NS coeffs to values directly\n\t\tGenTensor<double> val1=ij.get_impl()->NScoeffs2values(key0,NScoeff,false);\n\t\tGenTensor<double> coeff1=ij.get_impl()->values2NScoeffs(key0,val1);\n\t\tGenTensor<double> val2=ij.get_impl()->NScoeffs2values(key0,coeff1,false);\n\n\t\tTensor<double> diff=val2.full_tensor_copy()-val1.full_tensor_copy();\n\t\tdouble error=diff.normf();\n\t\tprint(\"error in values2NScoeffs(NScoeff2values)\",error);\n    }\n\n    print(\"all done\\n\");\n    return nerror;\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_vector_composite(World& world, const long& k, const double thresh) {\n\tconstexpr std::size_t LDIM=NDIM/2;\n\tMADNESS_CHECK(NDIM==2*LDIM);\n\n\tFunctionDefaults<NDIM>::set_tensor_type(TT_2D);\n\n\ttest_output t1(\"test_vector_composite for dimension \"+std::to_string(NDIM));\n//\tt1.set_cout_to_terminal();\n\n\tFunction<T,LDIM> l1_func=FunctionFactory<T,LDIM>(world).f([](const Vector<double,LDIM>& r) {return exp(-inner(r,r));});\n\tFunction<T,LDIM> l2_func=FunctionFactory<T,LDIM>(world).f([](const Vector<double,LDIM>& r) {return exp(-2.0*inner(r,r));});\n\tFunction<T,NDIM> h1_func=FunctionFactory<T,NDIM>(world).f([](const Vector<double,NDIM>& r) {return exp(-inner(r,r));});\n\tFunction<T,NDIM> h2_func=FunctionFactory<T,NDIM>(world).f([](const Vector<double,NDIM>& r) {return exp(-2.0*inner(r,r));});\n\tFunction<T,NDIM> h12_func=FunctionFactory<T,NDIM>(world).f([](const Vector<double,NDIM>& r) {return exp(-inner(r,r)) + exp(-2.0*inner(r,r));});\n    Function<T,NDIM> h1_eri_func=FunctionFactory<T,NDIM>(world).f([](const Vector<double,NDIM>& r) {\n        Vector<double,LDIM> r1, r2;\n        for (std::size_t i=0; i<LDIM; ++i) {\n             r1[i]=r[i];\n             r2[i]=r[i+LDIM];\n        }\n        return exp(-inner(r1,r1) - inner(r2,r2)- (r1-r2).normf());\n    }).thresh(thresh*0.01); // high accuracy for the reference number\n\n    Function<T,NDIM> eri=FunctionFactory<T,NDIM>(world).is_on_demand().f([](const Vector<double,NDIM>& r) {\n        Vector<double,LDIM> r1, r2;\n        for (std::size_t i=0; i<LDIM; ++i) {\n            r1[i]=r[i];\n            r2[i]=r[i+LDIM];\n        }\n        return exp(- (r1-r2).normf());\n    });\n\n    // the analytical norm of a 1D Gauss functions with f(x) = exp(-alpha x^2) : ||f(x)||_2= (pi/(2 alpha))^1/4\n    double nh_analytical=std::pow(M_PI/2.0,0.25*NDIM);\n    double nl=l1_func.norm2();\n    double nh=h1_func.norm2();\n    print(\"l1/h1_func.norm2(),n_analytical\",nl,nh,nh_analytical);\n\t/// test construction with a single pair of functions\n\t{\n\t\tFunction<T,NDIM> h1_1=CompositeFactory<T,NDIM,LDIM>(world) .ket(h1_func);\n\t\tFunction<T,NDIM> h1_2=CompositeFactory<T,NDIM,LDIM>(world).particle1(l1_func).particle2(l1_func);\n\t\th1_1.fill_tree();\n\t\th1_2.fill_tree();\n\t\tdouble n1=h1_1.norm2();\n\t\tdouble n2=h1_2.norm2();\n        print(\"n1, n2, nh\", n1, n2, nh);\n\t\tt1.checkpoint(std::abs(n1-nh)<thresh,\"construction with a single pair -- direct\");\n\t\tt1.checkpoint(std::abs(n2-nh)<thresh,\"construction with a single pair -- direct\");\n\t\tt1.checkpoint(std::abs(n1-n2)<thresh,\"construction with a single pair -- consistent\");\n\t}\n\n    /// test construction with a single pair of functions and eri\n    {\n        Function<T,NDIM> h1_1=CompositeFactory<T,NDIM,LDIM>(world).ket(h1_func).g12(eri);\n        Function<T,NDIM> h1_2=CompositeFactory<T,NDIM,LDIM>(world).g12(eri).particle1(l1_func).particle2(l1_func);\n        h1_1.fill_cuspy_tree();\n        h1_2.fill_cuspy_tree();\n        double n1=h1_1.norm2();\n        double n2=h1_2.norm2();\n        double n3=h1_eri_func.norm2();\n        print(\"n1, n2, nh\", n1, n2, n3);\n        t1.checkpoint(std::abs(n1-n3)<thresh*30,\"construction with a single pair and eri -- direct REDUCED ACC\");\n        t1.checkpoint(std::abs(n2-n3)<thresh*30,\"construction with a single pair and eri -- direct REDUCED ACC\");\n        t1.checkpoint(std::abs(n1-n2)<thresh*30,\"construction with a single pair and eri -- consistent REDUCED ACC\");\n    }\n\n\t/// test construction with a vector of functions:\n\t{\n\t\tFunction<T,NDIM> h1_1=CompositeFactory<T,NDIM,LDIM>(world).ket(h12_func);   // reference\n\t\tFunction<T,NDIM> h1_2=CompositeFactory<T,NDIM,LDIM>(world).particle1({l1_func,l2_func}).particle2({l1_func,l2_func});\n\t\tFunction<T,NDIM> h1_3=CompositeFactory<T,NDIM,LDIM>(world).ket({h1_func,h2_func});\n\t\th1_1.fill_tree();\n\t\th1_2.fill_tree();\n\t\th1_3.fill_tree();\n\t\tdouble n1=h1_1.norm2();\n\t\tdouble n2=(h1_2).norm2();\n\t\tdouble n3=(h1_3).norm2();\n\t\th1_2+=h1_3;\n\t\tdouble n12=(h1_2).norm2();\n\t\tprint(\"n1, n2, n3, n12\", n1, n2, n3, n12);\n\t\tt1.checkpoint(std::abs(n1-n2)<thresh,\"construction with a vector of functions -- particles\");\n        t1.checkpoint(std::abs(n1-n3)<thresh,\"construction with a vector of functions -- ket\");\n        t1.checkpoint(std::abs(n2-n3)<thresh,\"construction with a vector of functions -- consistent\");\n\t}\n\n    Function<T,NDIM> h1_1=CompositeFactory<T,NDIM,LDIM>(world) .ket(copy(h1_func));\n\n\n\n\n\treturn t1.end();\n}\n\n\nint main(int argc, char**argv) {\n\n//    initialize(argc,argv);\n//    World world(SafeMPI::COMM_WORLD);\n    World& world= initialize(argc,argv);\n    srand(time(nullptr));\n    startup(world,argc,argv);\n\n    // the parameters\n    long k=7;\n    double thresh=1.e-5;\n    double L=40;\n    TensorType tt=TT_2D;\n\n    // override the default parameters\n    for(int i = 1; i < argc; i++) {\n        const std::string arg=argv[i];\n\n        // break parameters into key and val\n        size_t pos=arg.find(\"=\");\n        std::string key=arg.substr(0,pos);\n        std::string val=arg.substr(pos+1);\n\n        if (key==\"size\") L=atof(val.c_str());               // usage: size=10\n        if (key==\"k\") k=atoi(val.c_str());                  // usage: k=5\n        if (key==\"thresh\") thresh=atof(val.c_str());        // usage: thresh=1.e-3\n        if (key==\"TT\") {\n            if (val==\"TT_2D\") tt=TT_2D;\n            else if (val==\"TT_FULL\") tt=TT_FULL;\n            else if (val==\"TT_TENSORTRAIN\") tt=TT_TENSORTRAIN;\n            else {\n                print(\"arg\",arg, \"key\",key,\"val\",val);\n                MADNESS_EXCEPTION(\"confused tensor type\",0);\n            }\n\n        }\n    }\n\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<2>::set_thresh(thresh);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<4>::set_thresh(thresh);\n    FunctionDefaults<1>::set_truncate_mode(1);\n    FunctionDefaults<2>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<4>::set_truncate_mode(1);\n\n    FunctionDefaults<1>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<2>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<4>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<5>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<6>::set_cubic_cell(-L/2,L/2);\n\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<6>::set_thresh(thresh);\n    FunctionDefaults<6>::set_k(k);\n    FunctionDefaults<6>::set_cubic_cell(-L/2,L/2);\n    FunctionDefaults<6>::set_tensor_type(tt);\n\n    print(\"entering testsuite for 6-dimensional functions\\n\");\n    print(\"k            \",k);\n    print(\"thresh       \",thresh);\n    print(\"boxsize      \",L);\n    print(\"tensor type: \", FunctionDefaults<6>::get_tensor_type());\n    print(\"\");\n\n\n    int error=0;\n\n\terror+=test_vector_composite<double,2>(world,k,thresh);\n//    test(world,k,thresh);\n    error+=test_hartree_product<double,2>(world,k,thresh);\n    error+=test_hartree_product<double,4>(world,k,thresh);\n    error+=test_convolution(world,k,thresh);\n    error+=test_multiply<double,4>(world,k,thresh);\n    error+=test_add(world,k,thresh);\n    error+=test_exchange(world,k,thresh);\n    error+=test_inner(world,k,thresh);\n    error+=test_replicate(world,k,thresh);\n\n    print(ok(error==0),error,\"finished test suite\\n\");\n    world.gop.fence();\n    finalize();\n\n    return error;\n}\n\n\n"
  },
  {
    "path": "src/madness/mra/test_QCCalculationParametersBase.cc",
    "content": "/*\n * test_QCCalculationParametersBase.cc\n *\n *  Created on: 27 Jun 2019\n *      Author: fbischoff\n */\n\n\n\n#include\"QCCalculationParametersBase.h\"\n#include\"parallel_archive.h\"\n\nusing namespace madness;\n\nclass Parameters : public QCCalculationParametersBase {\npublic:\n\tParameters() : QCCalculationParametersBase() {\n\n\t\t// initialize with: key, value, comment (optional), allowed values (optional)\n\t\tinitialize<double>(\"econv\",1.e-5,\"recommended values: 1.e-4 < econv < 1.e-8\");\n\t\tinitialize<double>(\"dconv\",3.e-4,\"recommended values: 1.e-4 < econv < 1.e-8\");\n\t\tinitialize<int>(\"maxiter\",15);\n\t\tinitialize<bool>(\"localize\",true);\n\t\tinitialize<std::string>(\"local\",\"BOYS\",\"localization method\",{\"boys\",\"pm\",\"canon\"});\n\t\tinitialize<std::vector<double> >(\"proto\",std::vector<double>{1,2});\n\t\tinitialize<std::pair<std::string,double> >(\"ncf\",{\"slater\",2.0});\n\t}\n\n\tstd::string get_tag() const override {\n\t\treturn std::string(\"test\");\n\t}\n\n\n\tvoid read_and_set_derived_values(World& world, const commandlineparser& parser, std::string tag) {\n\t\tread_input_and_commandline_options(world,parser,tag);\n\t\tset_derived_value(\"dconv\",sqrt(get<double>(\"econv\"))*0.1);\n\t}\n\n\t// convenience getters\n\tdouble econv() const {return get<double>(\"econv\");}\n\tdouble dconv() const {return get<double>(\"dconv\");}\n\tbool localize() const {return get<bool>(\"localize\");}\n\tstd::string local() const {return get<std::string>(\"local\");}\n\tstd::pair<std::string,double> ncf() const {return get<std::pair<std::string,double> >(\"ncf\");}\n\tint maxiter() const {return get<int>(\"maxiter\");}\n\n\n};\n\ntemplate<typename T>\nvoid test_same(const T& t1, const T& t2) {\n\tif (t1!=t2) {\n\t\tprint(\"t1, t2\", t1,t2);\n\t\tusing madness::operators::operator<<;\n\t\tstd::cout << \"++\"<< t1 << \"++\"<< std::endl;\n\t\tstd::cout << \"++\" << t2 << \"++\" <<std::endl;\n\n\t\tthrow std::runtime_error(\"failure in test\");;\n\t}\n}\n\nstruct inputfile {\n\tstd::string fname;\n\tinputfile(const std::string filename, const std::string lines) {\n\t\tfname=filename;\n\t\tstd::ofstream myfile;\n\t\tmyfile.open (fname);\n\t\tmyfile << lines << std::endl;\n\t\tmyfile.close();\n\t}\n\n\t~inputfile() {\n\t\tremove(fname.c_str());\n\t}\n};\n\nbool test_serialize(World& world) {\n\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf slater 1.2\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n\tparam.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\tparam.print(\"defined parameters\",\"foot\\n\\n\");\n\n\tconst std::string name = \"test.dat\";\n\tmadness::archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> oar(world, name.c_str(), 1);\n\toar & param;\n\toar.close();\n\n\tParameters param1;\n\tparam1.print(\"default parameters\",\"foot\\n\\n\");\n\n\tmadness::archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> iar(world, name.c_str(), 1);\n\tiar & param1;\n\tiar.close();\n\n\tparam1.print(\"serialized parameters\",\"foot\\n\\n\");\n\n\ttest_same(param.econv(),param1.econv());\n\ttest_same(param.dconv(),param1.dconv());\n\ttest_same(param.maxiter(),param1.maxiter());\n\ttest_same(param.ncf(),param1.ncf());\n\n\treturn true;\n}\n\nbool test_type_conversion1(World& world) {\n\tprint(\"entering test_type_conversion1\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf slater 1.2\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n    param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\ttest_same(param.ncf(),std::pair<std::string,double>(\"slater\",1.2));\n\treturn true;\n}\n\n\nbool test_type_conversion2(World& world) {\n\tprint(\"entering test_type_conversion2\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf (slater,1.2)\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n    param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\ttest_same(param.ncf(),std::pair<std::string,double>(\"slater\",1.2));\n\treturn true;\n}\n\n\nbool test_type_conversion3(World& world) {\n\tprint(\"entering test_type_conversion3\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.d-4   \n\t\t\tdconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf slater 1.2\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\ttry {\n\t\tParameters param;\n        commandlineparser parser;\n        parser.set_keyval(\"input\",\"input1\");\n        param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\t} catch (std::runtime_error& err) {\n\t\tstd::string errmsg=std::string(err.what()).substr(0,30);\n\t\ttest_same(errmsg,std::string(\"found an error for key >> econ\"));\n\t}\n\treturn true;\n}\n\nbool test_type_conversion4(World& world) {\n\tprint(\"entering test_type_conversion4\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf slater 1.2 \n\t\t\tlocalize tru\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\ttry {\n\t\tParameters param;\n        commandlineparser parser;\n        parser.set_keyval(\"input\",\"input1\");\n        param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\t} catch (std::runtime_error& err) {\n\t\tstd::string errmsg=std::string(err.what()).substr(0,30);\n\t\ttest_same(errmsg,std::string(\"found an error for key >> loca\"));\n\t}\n\treturn true;\n}\n\n\nbool test_type_conversion5(World& world) {\n\tprint(\"entering test_type_conversion5\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf (slater,1.2)\n\t\t\tlocalize true\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n    param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\ttest_same(param.localize(),true);\n\treturn true;\n}\n\nbool test_type_conversion6(World& world) {\n\tprint(\"entering test_type_conversion6\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf (slater,1.2)\n\t\t\tlocalize 1\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n    param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\ttest_same(param.localize(),true);\n\treturn true;\n}\n\n\nbool test_type_conversion7(World& world) {\n\tprint(\"entering test_type_conversion7\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf (slater,1.2)\n\t\t\tlocalize 0\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n    param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\ttest_same(param.localize(),false);\n\treturn true;\n}\n\nbool test_type_conversion8(World& world) {\n\tprint(\"entering test_type_conversion8\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf (slater,1.2)\n\t\t\tlocalize no\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n    param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\ttest_same(param.localize(),false);\n\treturn true;\n}\n\ntemplate<typename T>\nbool test_trailing_characters(World& world) {\n\tprint(\"entering test_trailing_characters\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4a   \n\t\t\tdconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf slater 1.2\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\ttry {\n\t\tParameters param;\n        commandlineparser parser;\n        parser.set_keyval(\"input\",\"input1\");\n        param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\t} catch (std::runtime_error& err) {\n\t\tstd::string errmsg=std::string(err.what()).substr(0,30);\n\t\ttest_same(errmsg,std::string(\"found an error for key >> econ\"));\n\t}\n\treturn true;\n}\n\nbool test_capitalization(World& world) {\n\tprint(\"entering test_capitalization\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n \t\t\t# econv 1.e-3\n\t\t\tmaxiter 12# asd \n\t\t\tncf (slater,1.2)\n\t\t\tlocalize no\n\t\t\tLocAl CanON\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n    param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\ttest_same(param.local(),std::string(\"canon\"));\n\treturn true;\n}\n\nbool test_not_allowed(World& world) {\n\tprint(\"entering test_not_allowed\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n \t\t\t# econv 1.e-3\n\t\t\tmaxiter 12# asd \n\t\t\tncf (slater,1.2)\n\t\t\tlocalize no\n\t\t\tLocAl canoni\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tbool found_exception=true;\n\ttry {\n\t\tParameters param;\n        commandlineparser parser;\n        parser.set_keyval(\"input\",\"input1\");\n        param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\t\tfound_exception=false;\n    } catch (std::invalid_argument& err) {\n        std::string errmsg=std::string(err.what()).substr(0,30);\n        test_same(errmsg,std::string(\"\\ntrying to assign a value that\"));\n\t} catch (std::runtime_error& err) {\n\t\tstd::string errmsg=std::string(err.what()).substr(0,30);\n\t\ttest_same(errmsg,std::string(\"found an error for key >> loca\"));\n\t}\n\tif (not found_exception) throw std::runtime_error(\"expected exception\");\n\treturn true;\n}\n\n\nbool test_comment_lines(World& world) {\n\tprint(\"entering test_commentlines\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n \t\t\t# econv 1.e-3\n\t\t\tmaxiter 12# asd \n\t\t\tncf (slater,1.2)\n\t\t\tlocalize no\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n    param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\ttest_same(param.econv(),1.e-4);\n\treturn true;\n}\nbool test_empty_lines(World& world) {\n\tprint(\"entering test_empty_lines\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\tdconv 1.e-4\n \t\t\t\t\n\t\t\tmaxiter 12# asd \n\t\t\tncf (slater,1.2)\n\t\t\tlocalize no\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n    param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\ttest_same(param.econv(),1.e-4);\n\ttest_same(param.dconv(),1.e-4);\n\treturn true;\n}\n\n\n\nbool test_derived(World& world) {\n\tprint(\"entering test_derived\");\n\tstd::string inputlines=R\"input(mp3 \n\t\t\teconv 1.e-4   \n\t\t\t#dconv 1.e-4\n\t\t\tmaxiter 12# asd \n\t\t\tncf (slater,1.2)\n\t\t\tlocalize no\n\t\t\tend)input\";\n\tinputfile ifile(\"input1\",inputlines);\n\n\tParameters param;\n    commandlineparser parser;\n    parser.set_keyval(\"input\",\"input1\");\n    param.read_and_set_derived_values(world,parser,\"mp3\");\n\n\n\ttest_same(param.econv(),1.e-4);\n\ttest_same(param.dconv(),sqrt(param.econv())*0.1);\n\treturn true;\n}\n\n\n\n\nint main(int argc, char** argv) {\n\tinitialize(argc, argv);\n\tWorld world(SafeMPI::COMM_WORLD);\n//\tstartup(world,argc,argv);\n\tstd::cout.precision(6);\n\n\tint success=0;\n\ttry {\n\t\ttest_serialize(world);\n\t\ttest_type_conversion1(world);\n\t\ttest_type_conversion2(world);\n\t\ttest_type_conversion3(world);\n\t\ttest_type_conversion5(world);\n\t\ttest_type_conversion6(world);\n\t\ttest_type_conversion7(world);\n\t\ttest_type_conversion8(world);\n\t\ttest_capitalization(world);\n\t\ttest_not_allowed(world);\n\t\ttest_comment_lines(world);\n\t\ttest_empty_lines(world);\n\t\ttest_derived(world);\n\n\n\t} catch (std::exception& e) {\n\t\tprint(\"\\n\\tan error occurred .. \");\n\t\tprint(e.what());\n\t\tsuccess=1;\n\t} catch (...) {\n\t\tprint(\"\\n\\tan unknown error occurred .. \");\n\t\tsuccess=1;\n\t}\n\n\n\tif(world.rank() == 0) printf(\"\\nfinished at time %.1fs\\n\\n\", wall_time());\n\tworld.gop.fence();\n\tfinalize();\n\n\treturn success;\n}\n"
  },
  {
    "path": "src/madness/mra/test_cloud.cc",
    "content": "/*\n * test_cloud.cc\n *\n *  Created on: Aug 28, 2020\n *      Author: fbischoff\n */\n\n#include<madness/mra/mra.h>\n#include<madness/world/cloud.h>\n#include<madness/mra/macrotaskq.h>\n#include<madness/world/test_utilities.h>\n#include<madness/world/ranks_and_hosts.h>\n\n#include <memory>\n\n#include \"memory_measurement.h\"\n\nusing namespace madness;\n\ntemplate <typename T, typename... Ts>\nvoid print0(const World& world, const T& t, const Ts&... ts) {\n    if (world.rank() == 0) {\n        using madness::operators::operator<<;\n        ScopedMutex<Mutex> safe(detail::printmutex);\n        std::cout << t;\n        print_helper(std::cout, ts...) << ENDL;\n    }\n}\n\nstruct gaussian {\n    double a;\n\n    gaussian() : a() {};\n\n    gaussian(double aa) : a(aa) {}\n\n    double operator()(const coord_4d& r) const {\n        double x = r[0], y = r[1], z = r[2], aa = r[3];\n        return exp(-a * (x * x + y * y + z * z * aa * aa)); //*abs(sin(abs(2.0*x))) *cos(y);\n    }\n\n    double operator()(const coord_3d& r) const {\n        double x = r[0], y = r[1], z = r[2];\n        return exp(-a * (x * x + y * y + z * z)); //*abs(sin(abs(2.0*x))) *cos(y);\n    }\n};\n\n\n/// this class stores different member variables in different records of the cloud\nclass custom_serialize_tester {\npublic:\n    int i;\n    double d;\n\n    custom_serialize_tester() : i(0), d(0.0) {}\n\n    bool operator==(const custom_serialize_tester& other) const {\n        return i == other.i && d == other.d;\n    }\n\n    /// customized function to store this to the cloud\n\n    /// functions and constant_part can be very large and we want to split them and store them in differenc records\n    Recordlist<Cloud::keyT> cloud_store(World& world, Cloud& cloud) const {\n        // save bookkeeping stuff in a vector\n        std::vector<unsigned char> v;\n        archive::VectorOutputArchive arout(v);\n        arout & i;\n\n        Recordlist<Cloud::keyT> records;\n        records += cloud.store(world, v);\n        records += cloud.store(world, d);\n        return records;\n    }\n\n    void cloud_load(World& world, const Cloud& cloud, Recordlist<Cloud::keyT>& recordlist) {\n        std::vector<unsigned char> v = cloud.forward_load<std::vector<unsigned char>>(world, recordlist);\n        archive::VectorInputArchive arin(v);\n        arin & i;\n        d = cloud.forward_load<double>(world, recordlist);\n    }\n};\n\ntemplate <typename T>\ndouble norm(const T i1) { return fabs(i1); }\n\ntemplate <typename T, std::size_t NDIM>\ndouble norm(const Function<T, NDIM>& f1) { return (f1).norm2(); }\n\ntemplate <typename T>\ndouble norm(const Tensor<T>& t) { return t.normf(); }\n\ntemplate <typename T, std::size_t NDIM>\ndouble norm(const std::vector<Function<T, NDIM>>& f1) { return norm2(f1.front().world(), f1); }\n\ntemplate <typename T>\ndouble norm(const std::vector<T>& v) {\n    double result = 0.0;\n    for (const auto& e : v) result += double(e);\n    return result;\n}\n\n/// a simple example for how to use the cloud for inter-world communication\n\n/// Notes:\n/// - during the subworld section no universe-wide fence must be invoked, including the\n///   creation of universe WorldObjects -- they must be constructed before\n/// - Certain operation can be performed between objects living in different world (e.g. Function::operator+=)\n///    -- store/lood pointers to these universe-wide world objects\n/// - when the subworld is destroyed all subworld objects must have been destroyed\n/// - subworld objects will be destroyed only at subworld fences\nint simple_example(World& universe) {\n    test_output test_simple(\"simple test\");\n    // test_simple.set_cout_to_terminal();\n\n    // this function lives in the universe\n    real_function_3d f_universe = real_factory_3d(universe).functor(gaussian(1.0));\n    double norm_universe = f_universe.norm2();\n\n    // create the cloud\n    {\n        Cloud cloud(universe);\n        cloud.set_storing_policy(Cloud::StoreFunction); // important\n\n        // store f_universal into the cloud, the return value holds the record to find the function again.\n        auto recordlist = cloud.store(universe, f_universe);\n\n        // begin subworld section\n        auto subworld_ptr = MacroTaskQ::create_worlds(universe, universe.size());\n        World& subworld = *subworld_ptr;\n\n        // from now on there must be no universe-wide fences!\n        //\n        // scopes are important because of deferred destruction:\n        // when the subworld is destroyed all objects living in it must\n        // have been destroyed before\n        {\n            // reset process map to subworlds\n            MacroTaskQ::set_pmap(subworld);\n\n            // load f into the worlds by passing in the recordlist\n            real_function_3d f_subworld = real_factory_3d(subworld);\n            if (universe.rank() == 0) {\n                f_subworld = cloud.load<real_function_3d>(subworld, recordlist); // has a subworld fence, that's ok\n            }\n\n            double norm = f_subworld.norm2();\n            // this will print 0 often and the actual norm once\n            print(\"norm of f in subworld\", subworld.id(), \":\", norm);\n\n            // check if the function is the same\n            if (universe.rank()==0) test_simple.checkpoint(norm, norm_universe, 1.e-10, \"norms\");\n            else test_simple.checkpoint(norm, 0.0, 1.e-10, \"norms on other ranks\");\n\n            // end subworld section\n            cloud.clear_cache(subworld); // includes subworld fence\n        } // f_subworld goes out of scope here\n        subworld.gop.fence(); // f_subworld is destroyed here\n        universe.gop.fence();\n        MacroTaskQ::set_pmap(universe);\n    } // subworld is destroyed here\n    return test_simple.end();\n}\n\n\n/// given a function in the universe, this function will copy it to a subworld\nint test_copy_function_from_other_world(World& universe) {\n    test_output t1(\"testing copy of function from other world\", universe.rank() == 0);\n    // t1.set_cout_to_terminal();\n\n    // create a function in the universe\n    real_function_3d f_universe = real_factory_3d(universe).functor(gaussian(1.0));\n    double norm_universe = f_universe.norm2();\n    if (universe.rank() == 0) print(\"norm_universe\", universe.id(), \":\", norm_universe);\n    print(\"number of coeffs of f_universe on rank\", universe.rank(), f_universe.get_impl()->get_coeffs().size());\n    universe.gop.fence();\n    print0(universe, \"\");\n    universe.gop.fence();\n\n    // create empty function in subworld\n    {\n        auto subworld_ptr = MacroTaskQ::create_worlds(universe, universe.size());\n        World& subworld = *subworld_ptr;\n        {\n            print(\"universe.size, universe.rank(), subworld.id\", universe.size(), universe.rank(), subworld.id());\n            double norm_subworld = -1.0;\n            MacroTaskQ::set_pmap(subworld);\n\n            // loop and if-statement for clearer output\n            for (ProcessID rank = 0; rank < universe.size(); rank++) {\n                if (universe.rank() == rank) {\n                    print(\"\\nworking on rank/subworld\", rank, subworld.id());\n                    real_function_3d f_subworld = copy(subworld, f_universe); // copy the function to the subworld\n                    norm_subworld = f_subworld.norm2();\n                    t1.checkpoint(f_universe.world().id() != f_subworld.world().id(),\n                                  \"f_universe and f_subworld live in different worlds\");\n                    t1.checkpoint(norm_universe, norm_subworld, 1.e-10, \"norms\");\n                }\n                universe.gop.fence();\n            }\n            print(\"norm_subworld, diff\", subworld.id(), \":\", norm_subworld, norm_subworld - norm_universe);\n            universe.gop.fence();\n        } // subworld objects are formally destroyed here, but destructor is deferred\n        subworld.gop.fence(); // f_subworld is destroyed here\n    }\n    MacroTaskQ::set_pmap(universe);\n\n    // check if the function is the same\n    return t1.end();\n}\n\nint test_copy_function_from_other_world_through_cloud(World& universe) {\n    universe.gop.fence();\n    test_output t1(\"testing copy of function from other world thru cloud\", universe.rank() == 0);\n    // t1.set_cout_to_terminal();\n\n    // create a function in the universe\n    real_function_3d f_universe = real_factory_3d(universe).functor(gaussian(1.0));\n    double norm_universe = f_universe.norm2();\n    print0(universe, \"norm_universe\", universe.id(), \":\", norm_universe);\n    f_universe.get_impl()->print_size(\"f_universe\");\n\n    // store the universe function or its pointer to the cloud\n    for (auto policy : {Cloud::StoreFunctionPointer, Cloud::StoreFunction}) {\n        Cloud cloud(universe);\n        cloud.set_storing_policy(policy);\n\n        // test storing into the cloud\n        auto recordlist = cloud.store(universe, f_universe);\n        print0(universe, \"the cloud size should be at 10e-8, as it is only a pointer to the function impl\");\n        auto stats=cloud.gather_memory_statistics(universe);\n        auto nrecords=stats[\"container_size_global\"].template get<std::size_t>();\n        auto global_memsize=stats[\"memory_global_GB\"].template get<double>();\n        double byte2gbyte=1.0/(1024*1024*1024);\n\n        print(\"nrecord, Gbytes in cloud\", nrecords, global_memsize);\n        t1.checkpoint(nrecords == 1, \"cloud: nrecord==1\");\n        if (policy == Cloud::StoreFunctionPointer)\n            t1.checkpoint(global_memsize < 1.e2*byte2gbyte, \"cloud size is small, only a pointer to the function impl\");\n        else\n            t1.checkpoint(global_memsize > 1.e4*byte2gbyte, \"cloud size is large, full function impl stored\");\n\n\n        // test loading from the cloud into subworlds\n        {\n            auto subworld_ptr = MacroTaskQ::create_worlds(universe, universe.size());\n            World& subworld = *subworld_ptr;\n            MacroTaskQ::set_pmap(subworld);\n            {\n                // loop and if-statement for clearer output\n                for (ProcessID rank = 0; rank < universe.size(); rank++) {\n                    if (universe.rank() == rank) {\n                        print(\"hello from rank/subworld\", rank, subworld.id());\n                        real_function_3d f_subworld = cloud.load<real_function_3d>(subworld, recordlist);\n                        double norm_subworld = f_subworld.norm2();\n                        t1.checkpoint(norm_subworld, norm_universe, 1.e-10, \"norms\");\n                        bool same_id = f_universe.get_impl()->id() == f_subworld.get_impl()->id();\n                        if (policy == Cloud::StoreFunctionPointer)\n                            t1.checkpoint(same_id, \"f_universe.id ==  f_subworld.id for StoreFunctionPointer\");\n                        else\n                            t1.checkpoint(!same_id, \"f_universe.id != f_subworld.id for StoreFunction\");\n                    }\n                }\n            }\n            cloud.clear_cache(subworld);\n            subworld.gop.fence(); // f_subworld is destroyed here\n        } // subworld is destroyed here\n        universe.gop.fence();\n    }\n\n    universe.gop.fence();\n\n    auto map = rank_to_host_and_rss_map(universe);\n    for (auto& [rank, pair] : map) {\n        print(\"rank\", rank, \"hostname\", pair.first, \"rss\", pair.second);\n    }\n    MacroTaskQ::set_pmap(universe);\n\n    return t1.end();\n}\n\n\n/// test replication of a function and/or cloud over nodes and ranks\nint test_replication_policy(World& universe) {\n    test_output t1(\"testing node replication of function and cloud\", universe.rank() == 0);\n    t1.set_cout_to_terminal();\n\n    // some bookkeeping information: the number of hosts\n    auto ranks_per_host1 = ranks_per_host(universe);\n    std::vector<int> primary_ranks = primary_ranks_per_host(universe, ranks_per_host1);\n    universe.gop.broadcast_serializable(primary_ranks, 0);\n    int nhost = primary_ranks.size();\n    print(\"number of hosts\", nhost);\n\n    // create a function in the universe\n    real_function_3d f_universe = real_factory_3d(universe).functor(gaussian(1.0));\n    double norm_universe = f_universe.norm2();\n    if (universe.rank() == 0) print(\"norm_universe\", universe.id(), \":\", norm_universe);\n    print(\"number of coeffs of f_universe on rank\", universe.rank(), f_universe.get_impl()->get_coeffs().size());\n    universe.gop.fence();\n\n    // go through all combinations of storing and replication policies\n    for (auto storing_policy : {MacroTaskInfo::StorePointerToFunction, MacroTaskInfo::StoreFunction}) {\n        for (auto cloud_replication_policy : {\n                 DistributionType::NodeReplicated, DistributionType::Distributed, DistributionType::RankReplicated\n             }) {\n            for (auto target_replication_policy : {\n                     DistributionType::NodeReplicated, DistributionType::Distributed, DistributionType::RankReplicated\n                 }) {\n                universe.gop.fence();\n\n                // some output\n                MacroTaskInfo info;\n                info.storage_policy = storing_policy;\n                info.cloud_distribution_policy = cloud_replication_policy;\n                info.ptr_target_distribution_policy = target_replication_policy;\n                if (universe.rank() == 0) print(info);\n\n                auto f = copy(f_universe);\n                MADNESS_CHECK_THROW(f.get_impl()->get_coeffs().is_distributed(), \"function must be distributed\");\n                // now replicate f according to target_replication_policy\n                if (target_replication_policy == DistributionType::NodeReplicated) {\n                    f.replicate_on_hosts();\n                }\n                else if (target_replication_policy == DistributionType::RankReplicated) {\n                    f.replicate();\n                }\n\n                auto dist_type = validate_distribution_type(f.get_impl()->get_coeffs());\n                std::stringstream msg;\n                msg << \"correct distribution of f:\" << dist_type;\n                t1.checkpoint(dist_type == target_replication_policy, msg.str());\n\n                Cloud cloud(universe);\n                cloud.set_storing_policy(MacroTaskInfo::to_cloud_storage_policy(storing_policy));\n\n                // store the universe function or its pointer to the cloud\n                auto recordlist = cloud.store(universe, f);\n                cloud.set_replication_policy(cloud_replication_policy);\n                cloud.replicate_according_to_policy();\n                bool cloud_ok=cloud.validate_replication_policy();\n                t1.checkpoint(cloud_ok, \"cloud distribution is correct\");\n\n                // auto [nrecords,global_memsize,min_memsize,max_memsize,max_record_size] = cloud.get_size(universe);\n                auto stats=cloud.gather_memory_statistics(universe);\n                auto nrecords=stats[\"container_size_global\"].template get<std::size_t>();\n                auto global_memsize=stats[\"memory_global_GB\"].template get<double>();\n                int fac=1;\n                if (cloud_replication_policy==DistributionType::NodeReplicated) fac=nhost;\n                if (cloud_replication_policy==DistributionType::RankReplicated) fac=universe.size();\n                print(\"nrecord, Gbytes in cloud\", nrecords, global_memsize);\n                double byte2gbyte=1.0/(1024*1024*1024);\n                t1.checkpoint(nrecords == static_cast<size_t>(fac), \"cloud: nrecord==n_replica\");\n                if (storing_policy == MacroTaskInfo::StorePointerToFunction)\n                    t1.checkpoint(global_memsize < 1.e2*byte2gbyte, \"cloud size is small\");\n                else\n                    t1.checkpoint(global_memsize > 1.e4*byte2gbyte, \"cloud size is large\");\n\n                {\n                    // create subworlds\n                    auto subworld_ptr = MacroTaskQ::create_worlds(universe, universe.size());\n                    World& subworld = *subworld_ptr;\n                    // print host and rank\n                    print(\"universe.rank(), subworld.id, hostname\", universe.rank(), subworld.id(), get_hostname());\n                    // universe.gop.set_forbid_fence(true);\n\n                    MacroTaskQ::set_pmap(subworld);\n                    {\n                        real_function_3d f_subworld = cloud.load<real_function_3d>(subworld, recordlist);\n                        // implicit subworld fence\n\n                        if (storing_policy == MacroTaskInfo::StorePointerToFunction) {\n                            t1.checkpoint(f.get_impl()->id() == f_subworld.get_impl()->id(),\n                                          \"f_universe and f_subworld share the same function impl\");\n                        }\n                        else {\n                            t1.checkpoint(f.get_impl()->id() != f_subworld.get_impl()->id(),\n                                          \"f_universe and f_subworld have different function impls\");\n                        }\n\n                        // if the f is replicated, the norm will be sqrt(nnode) or sqrt(nrank) larger\n                        double fac = 1.0;\n                        if (target_replication_policy == DistributionType::NodeReplicated) fac = sqrt(double(nhost));\n                        if (target_replication_policy == DistributionType::RankReplicated) fac = sqrt(\n                            double(universe.size()));\n                        // however, we don't care how the function is distributed, if it is stored in the cloud as a full function\n                        if (storing_policy == MacroTaskInfo::StoreFunction) fac = 1.0;\n\n                        double norm_subworld = f_subworld.norm2(); // possible universe or subworld fence\n                        print(\"norm_subworld, diff\", get_hostname(), \": \", subworld.id(), \":\", norm_subworld,\n                              norm_subworld - norm_universe);\n                        t1.checkpoint(norm_universe * fac, norm_subworld, 1.e-10, \"norms -- artifactual\");\n\n                        // copy f from universe to subworld, now norms should match\n                        auto f_local = copy(subworld, f_subworld); // subworld fence\n                        norm_subworld = f_local.norm2(); // subworld fence\n                        print(\"norm_subworld, diff\", get_hostname(), \": \", subworld.id(), \":\", norm_subworld,\n                              norm_subworld - norm_universe);\n                        t1.checkpoint(norm_universe, norm_subworld, 1.e-10, \"norms -- correct\");\n\n\n                        subworld.gop.fence();\n                    } // subworld objects are formally destroyed here, but destructor is deferred\n                    subworld.gop.fence(); // f_subworld is destroyed here\n                    MacroTaskQ::set_pmap(universe);\n                    universe.gop.fence();\n                    cloud.clear_cache(subworld); // call this while subworld still exists\n                }\n            }\n        }\n    }\n\n    return t1.end();\n}\n\n/// test the cloud with message larger than chunk size set in cloud.replicate()\nint chunk_example(World& universe) {\n    test_output bla(\"testing replication with chunking\", universe.rank() == 0);\n\n    int test_size = 100;\n    std::vector<int> testvec(test_size);\n    for (int i = 0; i < test_size; i++) testvec[i]=i;\n    int sum=0;\n\n    {\n        Cloud cloud(universe);\n        auto recordlist = cloud.store(universe, testvec);\n        cloud.replicate(50);\n\n        auto cloud_vector = cloud.load<std::vector<int>>(universe, recordlist);\n        for (size_t i = 0; i < testvec.size(); i++) {\n            sum += std::abs(testvec[i] - cloud_vector[i]);\n        }\n        cloud.clear_cache(universe);\n    }\n    return bla.end((sum == 0));\n}\n\n\ntemplate <typename T>\nusing is_world_constructible = std::is_constructible<T, World&>;\n\n\n/// test storing and loading a custom WorldObject, used e.g. for the scalar output of a macrotask\nint test_custom_worldobject(World& universe, World& subworld, Cloud& cloud) {\n    test_output t1(\"testing custom worldobject\");\n    // t1.set_cout_to_terminal();\n    cloud.set_debug(false);\n    auto o1 = std::make_shared<ScalarResultImpl<double>>(universe);\n    auto o5 = std::make_shared<ScalarResultImpl<double>>(universe);\n    *o1 = 1.2;\n    // if (universe.rank() == 0) gaxpy(1.0,*o1,2.0,2.8);\n    if (universe.rank() == 0) o1->gaxpy(1.0, 2.0, 2.8);\n\n    auto adrecords = cloud.store(universe, o1);\n    MacroTaskQ::set_pmap(subworld);\n    print(\"world constructible\", is_world_constructible<ScalarResultImpl<double>>::value);\n\n    cloud.set_force_load_from_cache(false);\n    auto o2 = cloud.load<std::shared_ptr<ScalarResultImpl<double>>>(subworld, adrecords);\n    cloud.set_force_load_from_cache(true);\n    auto o3 = cloud.load<std::shared_ptr<ScalarResultImpl<double>>>(subworld, adrecords);\n    double d1 = o1->get_local();\n    double d2 = o2->get_local();\n    double d3 = o3->get_local();\n    std::cout << \"pointer  \" << o1->id() << \" \" << o2->id() << \" \" << o3->id() << \" other: \" << o5->id() << std::endl;\n    std::cout << \"numerics (plain)\" << d1 << \" \" << d2 << \" \" << d3 << std::endl;\n    std::cout << \"numerics (get)  \" << o1->get() << \" \" << o2->get() << \" \" << o3->get() << std::endl;\n    double error = d1 - d2;\n    cloud.set_force_load_from_cache(false);\n    return t1.end(error < 1.e-10);\n}\n\nint test_custom_serialization(World& universe) {\n    test_output t1(\"testing custom serialization\");\n    Cloud cloud(universe);\n    t1.set_cout_to_terminal();\n    cloud.set_debug(true);\n    custom_serialize_tester cst;\n    cst.i = 1;\n    cst.d = 2.0;\n    static_assert(Cloud::has_cloud_serialize<custom_serialize_tester>::value,\n                  \"custom_serialize_tester must have a cloud_serialize method\");\n    {\n        auto records = cloud.store(universe, cst);\n        auto cst2 = cloud.load<custom_serialize_tester>(universe, records);\n        t1.checkpoint(cst == cst2, \"custom serialization\");\n    }\n\n    // test being part of a tuple\n    typedef std::tuple<int, double, custom_serialize_tester> tupleT;\n    tupleT tuple1 = std::make_tuple(1, 2.0, cst);\n    cloud.clear();\n    universe.gop.fence();\n    {\n        auto records = cloud.store(universe, tuple1);\n        universe.gop.fence();\n        auto tuple2 = cloud.load<tupleT>(universe, records);\n\n        t1.checkpoint(tuple1 == tuple2, \"custom serialization with tuple\");\n        universe.gop.fence();\n    }\n\n    return t1.end();\n}\n\nint test_pointer_to_funcimpl(World& universe, World& subworld) {\n    test_output test_ptr(\"testing cloud/shared_ptr<Function> numerics in universe\");\n    Cloud cloud(universe);\n    // test pointer to FunctionImpl\n    typedef std::shared_ptr<Function<double, 3>::implT> impl_ptrT;\n    Function<double, 3> ff = real_factory_3d(universe).functor(gaussian(1.5));\n    impl_ptrT p1 = ff.get_impl();\n    auto precords = cloud.store(universe, p1);\n\n    {\n        test_output test_ptr(\"testing cloud/shared_ptr<Function> in world \" + std::to_string(subworld.id()));\n        MacroTaskQ::set_pmap(subworld);\n\n        auto p3 = cloud.load<impl_ptrT>(subworld, precords);\n        auto p4 = cloud.load<impl_ptrT>(subworld, precords);\n        auto p5 = cloud.load<impl_ptrT>(subworld, precords);\n        test_ptr.logger << \"p1/p2/p3/p4\" << \" \" << p1.get() << \" \" << p3.get() << \" \" << p4.get() << \" \" << p5.get()\n            << std::endl;\n        test_ptr.end(p1 == p3 && p1 == p4 && p1 == p5\n            && p1->get_world().id() == p3->get_world().id()\n            && p1->get_world().id() == p4->get_world().id()\n            && p1->get_world().id() == p5->get_world().id());\n        Function<double, 3> fff;\n        fff.set_impl(p3);\n        Function<double, 3> ffsub = real_factory_3d(subworld).functor(gaussian(1.5));\n        fff -= ffsub * (1.0 / universe.size());\n        MacroTaskQ::set_pmap(universe);\n        cloud.clear_cache(subworld);\n    }\n    subworld.gop.fence();\n    universe.gop.fence();\n    double ffnorm = ff.norm2();\n    universe.gop.fence();\n    test_ptr.checkpoint((ffnorm < 1.e-10), \"numerics of pointer to FunctionImpl\");\n    return test_ptr.end();\n}\n\n// test storing a tuple\nint test_tuple(World& universe, World& subworld, const real_function_3d& f1, const real_function_3d& f2) {\n    test_output test_tuple(\"testing tuple\");\n    Cloud cloud(universe);\n    cloud.set_debug(false);\n\n    typedef std::shared_ptr<Function<double, 3>::implT> impl_ptrT;\n    typedef std::tuple<double, int, Function<double, 3>, impl_ptrT> tupleT;\n    tupleT t1{1.0, 2, f1, f2.get_impl()};\n    std::vector<double> norm1{1.0, 2.0, f1.norm2()};\n    auto turecords = cloud.store(universe, t1);\n    {\n        MacroTaskQ::set_pmap(subworld);\n\n        cloud.set_force_load_from_cache(false);\n        auto t2 = cloud.load<tupleT>(subworld, turecords);\n        cloud.set_force_load_from_cache(true);\n        auto t3 = cloud.load<tupleT>(subworld, turecords);\n        std::vector<double> norm2{1.0, 2.0, std::get<2>(t2).norm2()};\n        test_tuple.logger << \"error double, int, Function \" << norm1[0] - norm2[0] << \"  \"\n            << norm1[1] - norm2[1] << \" \" << norm1[2] - norm2[2];\n        std::vector<double> norm3{1.0, 2.0, std::get<2>(t3).norm2()};\n        test_tuple.logger << \"error double, int, Function \" << norm1[0] - norm3[0] << \" \"\n            << norm1[1] - norm3[1] << \" \" << norm1[2] - norm3[2];\n        double error = std::max({\n            norm1[0] - norm2[0], norm1[1] - norm2[1], norm1[2] - norm2[2], norm1[0] - norm3[0],\n            norm1[1] - norm3[1], norm1[2] - norm3[2]\n        });\n        double error1 = std::min(\n            {\n                norm1[0] - norm2[0], norm1[1] - norm2[1], norm1[2] - norm2[2], norm1[0] - norm3[0],\n                norm1[1] - norm3[1], norm1[2] - norm3[2]\n            });\n\n        test_tuple.checkpoint(error < 1.e-10 && error1 > -1.e-10, \"tuple error\");\n        test_tuple.checkpoint(error < 1.e-10 && error1 > -1.e-10, \"tuple error1\");\n        cloud.set_force_load_from_cache(false);\n        cloud.clear_cache(subworld);\n    }\n    return test_tuple.end();\n}\n\nint test_twice(World& universe, World& subworld, const std::vector<double>& vd) {\n    test_output test_twice(\"testing twice\");\n    Cloud cloud(universe);\n    {\n        cloud.clear_timings();\n        cloud.store(universe, vd);\n        auto recordlist = cloud.store(universe, vd);\n        auto vd1 = cloud.load<std::vector<double>>(universe, recordlist);\n        vd1 = cloud.load<std::vector<double>>(universe, recordlist);\n        auto stats=cloud.gather_timings(universe);\n        auto cache_reads=stats[\"cache_reads\"].template get<std::size_t>();\n        auto cache_stores=stats[\"cache_stores\"].template get<std::size_t>();\n\n        // storing a vector of size 2 will have 3 records: size and data\n        test_twice.checkpoint(cache_reads==vd.size()+1,\"cache reads (global sum)\");\n        test_twice.checkpoint(cache_stores==vd.size()+1,\"cache stores (global sum)\");\n\n        cloud.print_timings(universe);\n        cloud.clear_cache(subworld);\n\n    }\n    return test_twice.end();\n}\n\nint main(int argc, char** argv) {\n    madness::World& universe = madness::initialize(argc, argv);\n    startup(universe, argc, argv);\n    FunctionDefaults<3>::set_thresh(1.e-8);\n\n    int success = 0;\n    success += chunk_example(universe);\n    success += simple_example(universe);\n    success += test_copy_function_from_other_world(universe);\n    success += test_copy_function_from_other_world_through_cloud(universe);\n    success += test_replication_policy(universe);\n\n    if (1) {\n        Cloud cloud(universe);\n        //        cloud.set_debug(true);\n\n        auto subworld_ptr = MacroTaskQ::create_worlds(universe, universe.size());\n        World& subworld = *subworld_ptr;\n\n        // test storing custom WorldObject\n        success += test_custom_worldobject(universe, subworld, cloud);\n        success += test_custom_serialization(universe);\n\n        if (universe.rank() == 0) print(\"entering test_cloud\");\n        print(\"my world: universe_rank, subworld_id\", universe.rank(), subworld.id());\n\n        auto dotest = [&](auto& arg) {\n            test_output test_p(\"testing cloud/shared_ptr<Function> in world \"\n                + std::to_string(subworld.id()) + \" \" + typeid(std::get<0>(arg)).name());\n            MacroTaskQ::set_pmap(subworld);\n\n            typedef std::remove_reference_t<decltype(std::get<0>(arg))> argT;\n            auto records = std::get<1>(arg);\n            double universe_norm = std::get<2>(arg);\n\n            // the first time we load from the cloud's distributed container\n            auto copy_of_arg = cloud.load<argT>(subworld, records);\n            double n = norm(copy_of_arg);\n            double error = n - universe_norm;\n            test_p.logger << \"error(container)\" << error << std::endl;\n            if (error > 1.e-10) success++;\n\n            // the second time we load from the cloud's world-local cache\n            cloud.set_force_load_from_cache(true);\n            auto cached_copy_of_arg = cloud.load<argT>(subworld, records);\n            double n_cached = norm(cached_copy_of_arg);\n            double error_cached = n_cached - universe_norm;\n            test_p.logger << \"error(cache)    \" << error_cached << std::endl;\n            success += test_p.end(error_cached < 1.e-10 && error < 1.e-10);\n            cloud.set_force_load_from_cache(false);\n            subworld.gop.fence();\n        };\n        auto tester = [&](auto&&... args) { (dotest(args), ...); };\n\n        // test some standard objects\n        real_function_3d f1 = real_factory_3d(universe).functor(gaussian(1.0));\n        real_function_3d f2 = real_factory_3d(universe).functor(gaussian(2.0));\n        real_function_3d f3 = real_factory_3d(universe).functor(gaussian(3.0));\n        int i = 3;\n        long l = 4l;\n        Tensor<double> t(3, 3);\n        t.fillrandom();\n        std::vector<real_function_3d> vf{f2, f3};\n        std::vector<double> vd{2.0, 3.0};\n\n\n        auto ipair = std::make_tuple(i, cloud.store(universe, i), norm(i));\n        auto lpair = std::make_tuple(l, cloud.store(universe, l), norm(l));\n        auto fpair = std::make_tuple(f1, cloud.store(universe, f1), norm(f1));\n        auto vpair = std::make_tuple(vf, cloud.store(universe, vf), norm(vf));\n        auto tpair = std::make_tuple(t, cloud.store(universe, t), norm(t));\n        auto vdpair = std::make_tuple(vd, cloud.store(universe, vd), norm(vd));\n\n        tester(ipair, lpair, fpair, vpair, tpair, vdpair);\n        universe.gop.fence();\n\n        MacroTaskQ::set_pmap(universe);\n        universe.gop.fence();\n        universe.gop.fence();\n\n        success+=test_pointer_to_funcimpl(universe,subworld);\n        success+=test_tuple(universe, subworld, f1, f2);\n        success+=test_twice(universe,subworld,vd);\n\n        cloud.clear_cache(subworld);\n        subworld.gop.fence();\n\n    }\n    universe.gop.fence();\n    madness::finalize();\n\n    return success;\n}\n\ntemplate <>\nvolatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<\n    long, std::vector<unsigned char>, madness::Hash<long>>>::pending = std::list<detail::PendingMsg>();\ntemplate <>\nSpinlock WorldObject<WorldContainerImpl<long, std::vector<unsigned char>, madness::Hash<long>>>::pending_mutex(\n    0);\n"
  },
  {
    "path": "src/madness/mra/test_keybox.cc",
    "content": "/// \\file test_keybox.cc\n/// \\brief Tests for Key::is_neighbor_of(simpt, bperiodic) — the geometric\n///        replacement for the legacy\n///        `simpt2key(simpt, n).is_neighbor_of(*this, bperiodic)` idiom.\n\n#include <madness/mra/mra.h>\n#include <madness/mra/funcdefaults.h>\n#include <madness/mra/key.h>\n#include <madness/world/test_utilities.h>\n\nusing namespace madness;\n\nnamespace {\n\ntemplate <std::size_t NDIM>\nKey<NDIM> make_key(Level n, std::initializer_list<Translation> ls) {\n    Vector<Translation, NDIM> v;\n    std::size_t i = 0;\n    for (auto x : ls) { v[i++] = x; }\n    return Key<NDIM>(n, v);\n}\n\n// 1D basic adjacency: at level 2 the 4 boxes are\n// l=0:[0,.25] l=1:[.25,.5] l=2:[.5,.75] l=3:[.75,1].\n// is_neighbor_of(simpt) is true on this box and the two boxes adjacent to\n// the box(es) containing simpt.\nint test_1d_basic(World& world) {\n    test_output t(\"Key<1>::is_neighbor_of(simpt) — 1D\");\n\n    array_of_bools<1> nonper{false};\n\n    auto key0 = make_key<1>(2, {0});\n    auto key1 = make_key<1>(2, {1});\n    auto key2 = make_key<1>(2, {2});\n    auto key3 = make_key<1>(2, {3});\n\n    // simpt at sim=0.30 (interior of l=1)\n    Vector<double,1> p_interior{0.30};\n    t.checkpoint( key0.is_neighbor_of(p_interior, nonper),\n                  \"interior pt: l=0 is neighbor of containing l=1\");\n    t.checkpoint( key1.is_neighbor_of(p_interior, nonper),\n                  \"interior pt: l=1 contains pt\");\n    t.checkpoint( key2.is_neighbor_of(p_interior, nonper),\n                  \"interior pt: l=2 is neighbor of containing l=1\");\n    t.checkpoint(!key3.is_neighbor_of(p_interior, nonper),\n                  \"interior pt: l=3 is NOT neighbor of containing l=1\");\n\n    // simpt at sim=0.5 lies on wall between l=1 and l=2; both adjacent boxes\n    // and their neighbors should be flagged.\n    Vector<double,1> p_wall{0.5};\n    t.checkpoint( key0.is_neighbor_of(p_wall, nonper),\n                  \"wall pt: l=0 (neighbor of l=1) flagged\");\n    t.checkpoint( key1.is_neighbor_of(p_wall, nonper),\n                  \"wall pt: l=1 (contains pt) flagged\");\n    t.checkpoint( key2.is_neighbor_of(p_wall, nonper),\n                  \"wall pt: l=2 (contains pt) flagged\");\n    t.checkpoint( key3.is_neighbor_of(p_wall, nonper),\n                  \"wall pt: l=3 (neighbor of l=2) flagged\");\n\n    return t.end();\n}\n\n// Symmetry across a wall: the set of flagged boxes should be the same for\n// simpt = 0.5, 0.5 + ε, and 0.5 − ε. The legacy code (simpt2key + is_neighbor_of)\n// flips which box `specialkey` lands in and shifts the 3-box window.\nint test_symmetry_at_boundary(World& world) {\n    test_output t(\"Key::is_neighbor_of(simpt) — boundary symmetry\");\n\n    array_of_bools<1> nonper{false};\n    constexpr double eps = 1e-15;\n    constexpr Level n = 4;\n    const Translation NB = Translation(1) << n;  // 16 boxes\n\n    for (Translation li = 0; li < NB; ++li) {\n        auto key = make_key<1>(n, {li});\n        bool hit_below = key.is_neighbor_of(Vector<double,1>{0.5 - eps}, nonper);\n        bool hit_above = key.is_neighbor_of(Vector<double,1>{0.5 + eps}, nonper);\n        bool hit_exact = key.is_neighbor_of(Vector<double,1>{0.5}, nonper);\n        // wall sits between l=7 and l=8; expected neighborhood is {6,7,8,9}\n        bool expected = (li >= 6 && li <= 9);\n        t.checkpoint(hit_exact == expected,\n                     \"exact wall point: l=\" + std::to_string(li));\n        t.checkpoint(hit_below == expected,\n                     \"wall - eps: l=\" + std::to_string(li));\n        t.checkpoint(hit_above == expected,\n                     \"wall + eps: l=\" + std::to_string(li));\n    }\n    return t.end();\n}\n\n// 3D corner-of-cell: point at sim coord (0.5, 0.5, 0.5) touches 8 boxes at\n// every level n>=1. The 1-box-width neighborhood of those 8 contains 4^3=64\n// boxes: {l[i] ∈ {MID-2, MID-1, MID, MID+1}}.\nint test_3d_corner(World& world) {\n    test_output t(\"Key<3>::is_neighbor_of(simpt) — 3D corner\");\n\n    array_of_bools<3> nonper{false, false, false};\n    constexpr Level n = 3;\n    const Translation MID = Translation(1) << (n - 1);  // = 4\n    const Vector<double,3> origin{0.5, 0.5, 0.5};\n\n    int hits = 0;\n    const Translation NB = Translation(1) << n;\n    for (Translation i = 0; i < NB; ++i)\n      for (Translation j = 0; j < NB; ++j)\n        for (Translation k = 0; k < NB; ++k) {\n            auto key = make_key<3>(n, {i, j, k});\n            if (key.is_neighbor_of(origin, nonper)) ++hits;\n        }\n    t.checkpoint(hits == 64,\n                 \"64 boxes within one box-width of the corner (4^NDIM)\");\n\n    // explicit symmetry across the corner\n    auto key_lo = make_key<3>(n, {MID - 2, MID - 2, MID - 2});\n    auto key_hi = make_key<3>(n, {MID + 1, MID + 1, MID + 1});\n    t.checkpoint(key_lo.is_neighbor_of(origin, nonper) ==\n                 key_hi.is_neighbor_of(origin, nonper),\n                 \"neighborhood is symmetric across the corner\");\n\n    return t.end();\n}\n\n// Periodic seam: point at sim coord 0.0 (== 1.0 mod 1) — boxes at both ends\n// of the domain should be flagged when bperiodic[i] is true.\nint test_periodic_seam(World& world) {\n    test_output t(\"Key<1>::is_neighbor_of(simpt) — periodic seam\");\n\n    array_of_bools<1> per{true};\n    constexpr Level n = 3;  // 8 boxes\n    auto key_lo = make_key<1>(n, {0});  // [0/8, 1/8]\n    auto key_hi = make_key<1>(n, {7});  // [7/8, 8/8] — wraps to 0/8\n\n    t.checkpoint( key_lo.is_neighbor_of(Vector<double,1>{0.0}, per),\n                  \"sim=0 contained in low box (periodic)\");\n    t.checkpoint( key_hi.is_neighbor_of(Vector<double,1>{0.0}, per),\n                  \"sim=0 wraps into high box (periodic)\");\n    t.checkpoint( key_lo.is_neighbor_of(Vector<double,1>{1.0}, per),\n                  \"sim=1 wraps into low box (periodic)\");\n    t.checkpoint( key_hi.is_neighbor_of(Vector<double,1>{1.0}, per),\n                  \"sim=1 contained in high box (periodic)\");\n\n    // Non-periodic: no wrap; sim=1 is contained only in (and adjacent to) high boxes\n    array_of_bools<1> nonper{false};\n    auto key_mid = make_key<1>(n, {3});  // [3/8, 4/8] — far from sim=1\n    t.checkpoint(!key_mid.is_neighbor_of(Vector<double,1>{1.0}, nonper),\n                  \"sim=1 does NOT reach interior box (non-periodic)\");\n    t.checkpoint( key_hi.is_neighbor_of(Vector<double,1>{1.0}, nonper),\n                  \"sim=1 hits high box (non-periodic)\");\n\n    return t.end();\n}\n\n// Match interior behavior of the legacy code: for points strictly inside a\n// box, key.is_neighbor_of(simpt) and the legacy\n// simpt2key(simpt).is_neighbor_of(key) idiom must agree.\nint test_legacy_interior_equivalence(World& world) {\n    test_output t(\"Key::is_neighbor_of(simpt) ≡ legacy on interior\");\n\n    array_of_bools<2> nonper{false, false};\n    constexpr Level n = 4;\n    std::vector<Vector<double,2>> pts = {\n        {0.123, 0.456},\n        {0.781, 0.219},\n        {0.9999, 0.0001}};\n\n    const Translation NB = Translation(1) << n;\n    for (auto& pt : pts) {\n        Vector<double,2> simpt = pt;\n        Key<2> specialkey = simpt2key(simpt, n);\n        for (Translation i = 0; i < NB; ++i)\n          for (Translation j = 0; j < NB; ++j) {\n              auto key = make_key<2>(n, {i, j});\n              bool legacy = specialkey.is_neighbor_of(key, nonper);\n              bool now = key.is_neighbor_of(simpt, nonper);\n              t.checkpoint(legacy == now,\n                           \"legacy ≡ is_neighbor_of(simpt) at interior pt\");\n          }\n    }\n    return t.end();\n}\n\n}  // namespace\n\nint main(int argc, char** argv) {\n    World& world = madness::initialize(argc, argv);\n    startup(world, argc, argv);\n\n    int errors = 0;\n    errors += test_1d_basic(world);\n    errors += test_symmetry_at_boundary(world);\n    errors += test_3d_corner(world);\n    errors += test_periodic_seam(world);\n    errors += test_legacy_interior_equivalence(world);\n\n    world.gop.fence();\n    madness::finalize();\n    return errors;\n}\n"
  },
  {
    "path": "src/madness/mra/test_macrotaskpartitioner.cc",
    "content": "//\n// Created by Florian Bischoff on 5/17/21.\n//\n\n#include<madness/mra/mra.h>\n#include<madness/mra/macrotaskpartitioner.h>\n#include<madness/world/test_utilities.h>\n\nusing namespace madness;\n\nint test_batch_1D(World& world) {\n    Batch_1D b;\n    Batch_1D b1(0,-1);\n    Batch_1D b2(2,8);\n    Batch_1D b3(2,5);\n\n    MADNESS_CHECK(b.is_full_size());\n    MADNESS_CHECK(b1.is_full_size());\n    MADNESS_CHECK(not b2.is_full_size());\n    MADNESS_CHECK(b2.size()==6);\n\n    vector_real_function_1d vf= zero_functions<double,1>(world,10);\n    vector_real_function_1d vf3= zero_functions<double,1>(world,3);\n    auto tuple=std::make_tuple(vf,3.0,vf);\n\n    auto tuple1=b2.copy_batch<decltype(tuple),0>(tuple);\n    MADNESS_CHECK(std::get<0>(tuple1).size()==6);\n    auto tuple3=b3.copy_batch<decltype(tuple),1>(tuple);\n    MADNESS_CHECK(std::get<2>(tuple3).size()==3);\n    MADNESS_CHECK(std::get<2>(tuple3)[0].get_impl() == std::get<2>(tuple)[2].get_impl());\n\n    vf=b3.insert_batch(vf,vf3);\n    MADNESS_CHECK(vf[2].get_impl()==vf3[0].get_impl());\n    MADNESS_CHECK(vf[3].get_impl()==vf3[1].get_impl());\n\n    print(\"b \",b);\n    print(\"b3\",b3);\n    return 0;\n}\n\nint test_batch(World& world) {\n\n    Batch batch0;\n\n    Batch_1D input1(0,1), input2(3,8), result(1,4 );\n    Batch batch1(input1, input2, result);\n    Batch batch2(input1, result);\n\n    print(\"batch0\",batch0);\n    print(\"batch1\",batch1);\n    print(\"batch2\",batch2);\n\n\n    vector_real_function_1d vf= zero_functions<double,1>(world,10);\n    vector_real_function_1d vf3= zero_functions<double,1>(world,3);\n\n    {\n        auto tuple2=std::make_tuple(vf,3.0,vf);\n        auto tuple2_parts = batch1.copy_input_batch(tuple2);\n        auto result2_parts = batch1.insert_result_batch(vf, vf3);\n        MADNESS_CHECK(std::get<0>(tuple2_parts).size() == 1);\n        MADNESS_CHECK(result2_parts.size() == 10);\n        MADNESS_CHECK(result2_parts[0].get_impl() == vf[0].get_impl());\n        MADNESS_CHECK(result2_parts[1].get_impl() == vf3[0].get_impl());\n        MADNESS_CHECK(result2_parts[2].get_impl() == vf3[1].get_impl());\n        MADNESS_CHECK(result2_parts[3].get_impl() == vf3[2].get_impl());\n        MADNESS_CHECK(result2_parts[4].get_impl() == vf[4].get_impl());\n    }\n\n    {\n        auto tuple2=std::make_tuple(vf,3.0);\n        auto tuple2_parts = batch2.copy_input_batch(tuple2);\n        auto result2_parts = batch2.insert_result_batch(vf, vf3);\n        MADNESS_CHECK(std::get<0>(tuple2_parts).size() == 1);\n        MADNESS_CHECK(result2_parts.size() == 10);\n        MADNESS_CHECK(result2_parts[0].get_impl() == vf[0].get_impl());\n        MADNESS_CHECK(result2_parts[1].get_impl() == vf3[0].get_impl());\n        MADNESS_CHECK(result2_parts[2].get_impl() == vf3[1].get_impl());\n        MADNESS_CHECK(result2_parts[3].get_impl() == vf3[2].get_impl());\n        MADNESS_CHECK(result2_parts[4].get_impl() == vf[4].get_impl());\n    }\n\n    return 0;\n}\n\nint test_partitioner(World& world) {\n\n    using partitionT  = MacroTaskPartitioner::partitionT;\n\n    vector_real_function_1d vf= zero_functions<double,1>(world,40);\n    auto tuple2=std::make_tuple(vf,3.0);\n    auto tuple3=std::make_tuple(vf,3.0,vf);\n\n    MacroTaskPartitioner mtp;\n\n    {\n        print(\"\\n1D partitioning\");\n        partitionT partition = mtp.partition_tasks(tuple3);\n        for (auto p : partition) print(p);\n    }\n\n    {\n        mtp.set_nsubworld(2);\n        print(\"\\n1D partitioning, nsubworld=2\");\n        partitionT partition = mtp.partition_tasks(tuple3);\n        for (auto p : partition) print(p);\n    }\n\n    {\n        mtp.set_nsubworld(2);\n        mtp.set_dimension(2);\n        print(\"\\n2D partitioning, nsubworld=2\");\n        partitionT partition = mtp.partition_tasks(tuple3);\n        for (auto p : partition) print(p);\n    }\n\n    {\n        mtp.set_nsubworld(2);\n        mtp.set_dimension(1);\n        print(\"\\n2D partitioning, nsubworld=2\");\n        partitionT partition = mtp.partition_tasks(tuple2);\n        for (auto p : partition) print(p);\n    }\n\n    return 0;\n}\n\nint main(int argc, char **argv) {\n\n    madness::World &universe = madness::initialize(argc, argv);\n    startup(universe, argc, argv);\n    int success=0;\n\n    success+=test_batch_1D(universe);\n    success+=test_batch(universe);\n    success+=test_partitioner(universe);\n//    success+=test_partitioner(universe);\n//    success+=test_partitioner(universe);\n\n\n    universe.gop.fence();\n    madness::finalize();\n    return success;\n}\n\n\n\n"
  },
  {
    "path": "src/madness/mra/test_memory_measurement.cc",
    "content": "//\n// Created by Florian Bischoff on 1/9/25.\n//\n\n#include<madness/mra/memory_measurement.h>\n#include<madness/world/test_utilities.h>\n#include<madness/mra/mra.h>\n\nusing namespace madness;\n\n/// for each process create a world using a communicator shared with other processes by round-robin\n/// copy-paste from test_world.cc\nstatic std::shared_ptr<World> create_worlds(World& universe, const std::size_t nsubworld) {\n\n    int color = universe.rank() % nsubworld;\n    SafeMPI::Intracomm comm = universe.mpi.comm().Split(color, universe.rank() / nsubworld);\n\n    std::shared_ptr<World> all_worlds;\n    all_worlds.reset(new World(comm));\n\n    universe.gop.fence();\n    return all_worlds;\n}\n\ntemplate<std::size_t NDIM>\nint test_size(World& world) {\n\n    test_output t1(\"test_size\",world.rank()==0);\n    // t1.set_cout_to_terminal();\n    // create a slater function, slightly offset to create an uneven distribution\n    auto slater=[](const Vector<double,2*NDIM>& r){return exp(-(r-0.1).normf());};\n    Function<double,2*NDIM> f2=FunctionFactory<double,2*NDIM>(world).functor(slater);\n\n    if (world.rank()==0) print_header2(\"1 function in the universe\");\n    // mmap exists only on rank 0 of the universe\n    auto mmap=MemoryMeasurer::measure_and_print(world);\n\n    // check that we have one entry per rank\n    if (world.rank()==0) t1.checkpoint(mmap.size()==world.size(),\"memory map has one entry per rank\");\n\n    // check total memory size\n    double total_mem_size=MemoryMeasurer::total_memory(mmap);\n    const double d=sizeof(double);\n    const double fac=1024*1024*1024;\n    double f2size=f2.size()/fac*d;\n    if (world.rank()==0) t1.checkpoint(f2size,total_mem_size,1.e-6,\n        \"total memory size == size(f2)\");\n\n    if (world.rank()==0) {\n        print(\"universe\");\n        for (const auto& [key,val] : mmap) {\n            print(\" world_id\",key.world_id,\" rank\",key.rank,\" hostname\",key.hostname,\n                \" DIM\",key.DIM,\" #funcs\",val.num_functions,\" memory_GB\",val.memory_GB);\n        }\n    }\n\n    // create functions in all worlds\n    {\n        if (world.rank()==0) print_header2(\"1 function per subworld\");\n        std::shared_ptr<World> subworld=create_worlds(world,world.size());\n\n        {\n            // Function<double,2*NDIM> g2_universe=FunctionFactory<double,2*NDIM>(world).functor(slater);\n            FunctionDefaults<2*NDIM>::set_default_pmap(*subworld);\n            Function<double,2*NDIM> g2=FunctionFactory<double,2*NDIM>(*subworld).functor(slater);\n            auto mmap=MemoryMeasurer::measure_and_print(world);\n            FunctionDefaults<2*NDIM>::set_default_pmap(world);\n\n            // mem size should be twice as large now\n            double total_mem_size=MemoryMeasurer::total_memory(mmap);\n            if (world.rank()==0) t1.checkpoint(total_mem_size,\n                f2size*(world.size()+1),1.e-6,\n                \"total memory size = (nworld+1) size(f2)\");\n        }\n        subworld->gop.fence();\n    }\n\n\n    return t1.end();\n}\n\n/// test functions to get a map of ranks to hosts\n/// and to get the lowest rank on each host\nint test_host_rank_map(World& world) {\n    test_output t1(\"testing host-rank map\");\n    t1.set_cout_to_terminal();\n    // print a list: hostname, rank, lowest rank\n    if (world.rank()==0) print_header2(\"ranks per host\");\n    auto ranks_per_host1=ranks_per_host(world);\n    auto rank=world.rank();\n    auto rank_host_map=rank_to_host_and_rss_map(world);\n    world.gop.broadcast_serializable(rank_host_map,0);\n    // ordered printing\n    for (int r=0; r<world.size(); r++, world.gop.fence()) {\n        if (world.rank()==r) print(\"rank\",rank,\"hostname\",rank_host_map[rank].first);\n    }\n\n    world.gop.fence();\n    // print unique ranks per host\n    if (world.rank()==0) {\n        print(\"unique ranks per host (the lowest rank on each host):\");\n        auto primary_ranks=primary_ranks_per_host(world,ranks_per_host1);\n        for (const auto& r : primary_ranks) print(\"rank\",r);\n    }\n    // ordered printing\n    for (int r=0; r<world.size(); r++, world.gop.fence()) {\n        if (world.rank()==r) print(\"lowest rank on host of rank\",rank,\n            lowest_rank_on_host_of_rank(ranks_per_host1,rank));\n    }\n    world.gop.fence();\n    return t1.end();\n}\n\n\n/// replicate a function on all nodes (not ranks)\n/// check that all keys are on the expected rank\n/// check that the norm of a specific key is the same as in the distributed function\nint test_node_replicated_function(World& world) {\n    test_output t1(\"testing node-replicated function\",world.rank()==0);\n    t1.set_cout_to_terminal(world.rank()==0);\n\n    // some information for the user\n    if (world.rank()==0) print(\"world.size()\",world.size());\n\n    // which ranks are on which host\n    auto rank_host_map=rank_to_host_and_rss_map(world);\n    world.gop.broadcast_serializable(rank_host_map,0);\n    // ordered printing\n    for (int r=0; r<world.size(); r++, world.gop.fence()) {\n        if (world.rank()==r) print(\"rank\",r,\"hostname\",rank_host_map[r].first);\n    }\n\n    // a 2d Gaussian -- reasonably small\n    real_function_2d f=real_factory_2d(world).f([](const coord_2d& r){return exp(-r.normf());});\n\n    // print out the tree size of the distributed function, global sum over all ranks\n    std::size_t sz_distributed=f.tree_size();\n    if (world.rank()==0) print(\"tree size of the distributed function\",sz_distributed);\n\n    // compute the norm of a specific key\n    Key<2> key(4, {8,9});\n    double n=f.get_impl()->get_coeffs().find(key).get()->second.coeff().normf();\n\n    // check if all keys of functimpl are on a given rank\n    auto check_keys_are_on_rank=[&](const FunctionImpl<double,2>* fimpl, const ProcessID rank) {\n        for (const auto& [key,node] : fimpl->get_coeffs()) {\n            int owner=fimpl->get_coeffs().owner(key);\n            if (owner!=rank) {\n                print(\"key\",key,\"owner\",owner,\"expected owner\",rank);\n                return false;\n            }\n        }\n        return true;\n    };\n\n    // replicate f on all ranks\n    {\n        auto f1=copy(f);\n        f1.replicate();\n        std::size_t sz_replicated=f1.tree_size();\n\n        // ordered printing\n        for (int r=0; r<world.size(); r++, world.gop.fence()) {\n            if (world.rank()==r) {\n                t1.checkpoint(sz_replicated==sz_distributed*world.size(),\"rank \"+std::to_string(world.rank())+\n                \": tree size rank replicated = size distributed * nproc = \"+std::to_string(sz_replicated));\n            }\n        }\n\n        world.gop.fence();\n        // check that all keys are on the expected rank, ie. the local rank\n        for (int r=0; r<world.size(); r++, world.gop.fence()) {\n            if (world.rank()==r) {\n                print(\"rank \",r,\"hostname\",rank_host_map[r].first);\n                // f1.get_impl()->do_print_tree(f1.get_impl()->get_cdata().key0,std::cout,4);\n                t1.checkpoint(check_keys_are_on_rank(f1.get_impl().get(),r),\"all keys on rank \"+std::to_string(r));\n            }\n            world.gop.fence();\n        }\n    }\n\n    auto ranks_per_host1=ranks_per_host(world);\n    auto primary_ranks=primary_ranks_per_host(world,ranks_per_host1);\n\n    // replicate f on all hosts, i.e. the lowest rank on each host only\n    {\n        auto f1=copy(f);\n        f1.replicate_on_hosts();\n        // f1.replicate_on_nodes();\n        std::size_t sz_replicated=f1.tree_size();\n\n        int nhost=ranks_per_host1.size();\n        if (world.rank()==0) {\n            t1.checkpoint(int(sz_replicated),int(sz_distributed) * nhost,\n                \"tree size host replicated = size distributed * nhost = \"\n                        +std::to_string(sz_replicated));\n        }\n\n        if (world.rank()==0) {\n            print(\"unique ranks per host (the lowest rank on each host):\");\n            for (const auto& r : primary_ranks) print(\"rank\",r);\n            print(\"tree size\",sz_replicated);\n        }\n        world.gop.fence();\n\n        t1.set_do_print(true);  // print on all ranks for debugging\n\n        // check that all keys are on the expected rank, ie. the corresponding primary rank\n        long myowner = lowest_rank_on_host_of_rank(ranks_per_host1, world.rank());\n        for (int r=0; r<world.size(); r++, world.gop.fence()) {\n            if (world.rank()==r) {\n                print(\"rank \",r,\"hostname\",rank_host_map[r].first);\n                // f1.get_impl()->do_print_tree(f1.get_impl()->get_cdata().key0,std::cout,4);\n                t1.checkpoint(check_keys_are_on_rank(f1.get_impl().get(),myowner),\"all keys on rank \"+std::to_string(myowner));\n            }\n            world.gop.fence();\n        }\n\n        // compute the norm of a specific key, should be the same as in the distributed function\n        double n1=f1.get_impl()->get_coeffs().find(key).get()->second.coeff().normf();\n        t1.checkpoint(n,n1,1.e-12,\"norm of key is the same as in the distributed function\");\n        t1.checkpoint(sz_replicated==sz_distributed*primary_ranks.size(),\"tree size replicated on nodes = size distributed * n_nodes = \"\n            +std::to_string(sz_replicated));\n\n    }\n\n    world.gop.fence();\n    t1.set_do_print(world.rank()==0);\n    return t1.end();\n}\n\n/// test creating 2 distinct MPI groups and communicators\n/// then create a world on each communicator and do some work there\nint test_mpi_group(World& world) {\n    test_output t1(\"testing MPI groups\",world.rank()==0);\n    t1.set_cout_to_terminal();\n\n    /// print in rank-order\n    auto oprint = [&](World& world, auto &&... args) {\n        world.gop.fence();\n        for (int r=0; r<world.size(); ++r) {\n            if (r==world.rank()) {\n                std::cout << \"rank \" << world.rank() << \": \";\n                print(std::forward<decltype(args)>(args)...);\n            }\n            world.gop.fence();\n        }\n    };\n\n\n    // find unique ranks per host\n    auto ranks_per_host1=ranks_per_host(world);\n    std::vector<int> primary_ranks=primary_ranks_per_host(world,ranks_per_host1);\n    world.gop.broadcast_serializable(primary_ranks,0);\n    world.gop.fence();\n    oprint(world,\"primary_ranks: \", primary_ranks);\n    // get a list of all other ranks that are not unique\n    std::vector<int> secondary_ranks;\n    for (int r=0; r<world.size(); ++r) {\n        if (std::find(primary_ranks.begin(),primary_ranks.end(),r)==primary_ranks.end())\n            secondary_ranks.push_back(r);\n    }\n    oprint(world,\"secondary_ranks: \", secondary_ranks);\n    t1.checkpoint(secondary_ranks.size()+primary_ranks.size() == static_cast<size_t>(world.size()),\"total number of ranks\");\n\n\n    long myowner = lowest_rank_on_host_of_rank(ranks_per_host1, world.rank());\n    // check if this rank is in the unique list\n    bool i_am_in_unique_list=world.rank()==myowner;\n    oprint(world,\" myowner \",myowner,\" i_am_in_unique_list \",i_am_in_unique_list);\n    // check that myowner is in the list of unique ranks\n    t1.checkpoint(std::find(primary_ranks.begin(),primary_ranks.end(),myowner)!=primary_ranks.end(),\n        \"myowner is in the list of unique ranks\");\n\n    // step 2-1: create a world with only the unique ranks and replicate there (see test_world.cc)\n    const int color= i_am_in_unique_list ? 1 : 0;\n    if (color) {\n        SafeMPI::Group g_unique = world.mpi.comm().Get_group().Incl(int(primary_ranks.size()), &primary_ranks[0]);\n        SafeMPI::Intracomm comm_unique = world.mpi.comm().Create(g_unique);\n        print(world.rank(),\"in unique list\");\n        {\n            World world_unique(comm_unique);\n            world_unique.gop.fence();\n            // get the hostname of all ranks in this unique world\n            std::string hostname=madness::get_hostname();\n            auto hostnames=world_unique.gop.concat0(std::vector<std::string>(1,hostname));\n            if (world_unique.rank()==0) {\n                print(\"hostnames of unique ranks:\");\n                for (const auto& h : hostnames) print(\"hostname\",h);\n            }\n            world_unique.gop.fence();\n\n            // check if there are duplicates in hostnames\n            std::set<std::string> hostnames_set(hostnames.begin(),hostnames.end());\n            t1.checkpoint(hostnames_set.size()==hostnames.size(),\"all hostnames in unique world are different\");\n\n\n        }\n    } else {\n        // need this to avoid deadlock in MPI_Comm_create (why??)\n        print(world.rank(),\"not in unique list\");\n        SafeMPI::Group g_nonunique = world.mpi.comm().Get_group().Incl(secondary_ranks.size(), &secondary_ranks[0]);\n        SafeMPI::Intracomm comm_nonunique = world.mpi.comm().Create(g_nonunique);\n    }\n    world.gop.fence();\n    return t1.end();\n}\n\nint main(int argc, char** argv) {\n    madness::World& world=madness::initialize(argc, argv);\n\n    world.gop.fence();\n    startup(world,argc,argv,true);\n    const int k=7;\n    const double thresh=1.e-5;\n    const double L=24.0;\n    FunctionDefaults<1>::set_cubic_cell(-L,L);\n    FunctionDefaults<2>::set_cubic_cell(-L,L);\n    FunctionDefaults<3>::set_cubic_cell(-L,L);\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<2>::set_thresh(thresh);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<2>::set_k(k);\n    FunctionDefaults<3>::set_k(k);\n    int result=0;\n\n    result+=test_size<2>(world);\n    result+=test_host_rank_map(world);\n    result+=test_mpi_group(world);\n    result+=test_node_replicated_function(world);\n\n\n    if (world.rank()==0) print(\"result\",result);\n    madness::finalize();\n    return result;\n\n}\n"
  },
  {
    "path": "src/madness/mra/test_mra6.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/// \\file tensor/test.cc\n/// \\brief New test code for Tensor class using Google unit test\n\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/gentensor.h>\n#include <madness/world/print.h>\n\n\n#ifdef MADNESS_HAS_GOOGLE_TEST\n\n// The test code deliberately uses only the dumb ITERATOR macros\n// in order to test the optimized iterators used by the implementation.\n\nusing namespace madness;\nusing madness::_;\nusing madness::___;\nusing madness::_reverse;\n\n#include <iostream>\n#include <gtest/gtest.h>\n#include <tr1/tuple>\n\nnamespace {\n\n    template <typename T>\n    class GenTensorTest : public ::testing::Test {\n    public:\n        GenTensorTest() {}\n\n        virtual ~GenTensorTest() {}\n\n        virtual void SetUp() {}\n\n        virtual void TearDown() {}\n    };\n\n    double eps=1.e-4;\n\n    /// will yield different ranks (null: 0, index: 2, random: full)\n    enum TensorFill {null, index, random};\n\n    /// prepare a full rank tensor according to target rank\n    template<typename T>\n    Tensor<T> prep_tensor(const std::vector<long>& dim, const TensorFill& f) {\n    \tTensor<T> t0=Tensor<double>(dim);\n\t\tif (f==index) t0.fillindex();\n\t\tif (f==random) t0.fillrandom();\n\t\tif (f!=null) {\n\t\t\tt0+=1;\n\t\t\tt0.scale(1.0/t0.normf());\n\t\t}\n\t\treturn t0;\n    }\n\n\n    class UnaryGenTest : public ::testing::TestWithParam<std::tr1::tuple<\n    \t\t::madness::TensorType, long, double, TensorFill> > {\n    public:\n    \tstd::vector<long> dim;\n        TensorType tt;\n        double eps;\n\n        TensorFill fill0;\n\n        Tensor<double> t0;\n\n\t\tGenTensor<double> g0;\n\n\t\tUnaryGenTest() {\n\t\t\tmadness::Random::Random(100);\n            int alldim= (madness::RandomValue<long>()&0x5) + 3;\n\n            tt=std::tr1::get<0>(this->GetParam());\n            long ndim=std::tr1::get<1>(this->GetParam());\n            eps=std::tr1::get<2>(this->GetParam());\n\n            fill0=std::tr1::get<3>(this->GetParam());\n            dim=std::vector<long>(ndim,alldim);\n\n    \t\t// fill the full tensors t0 and t1 with numbers that will yield certain ranks\n    \t\tt0=prep_tensor<double>(dim,fill0);\n\n    \t\tg0=GenTensor<double>(t0,TensorArgs(eps,tt));\n    \t}\n    };\n\n    class BinaryGenTest : public ::testing::TestWithParam<std::tr1::tuple<\n    \t\t::madness::TensorType, long, double, TensorFill, TensorFill> > {\n    public:\n    \tstd::vector<long> dim;\n        TensorType tt;\n        double eps;\n\n        TensorFill fill0;\n        TensorFill fill1;\n\n        Tensor<double> t0;\n\t\tTensor<double> t1;\n\n\t\tGenTensor<double> g0;\n\t\tGenTensor<double> g1;\n\n\n        BinaryGenTest() {\n            int alldim= (madness::RandomValue<long>()&0x5) + 3;\n\n            tt=std::tr1::get<0>(this->GetParam());\n            long ndim=std::tr1::get<1>(this->GetParam());\n            eps=std::tr1::get<2>(this->GetParam());\n\n            fill0=std::tr1::get<3>(this->GetParam());\n            fill1=std::tr1::get<4>(this->GetParam());\n            dim=std::vector<long>(ndim,alldim);\n\n    \t\t// fill the full tensors t0 and t1 with numbers that will yield certain ranks\n    \t\tt0=prep_tensor<double>(dim,fill0);\n    \t\tt1=prep_tensor<double>(dim,fill1);\n\n    \t\tg0=GenTensor<double>(t0,TensorArgs(eps,tt));\n    \t\tg1=GenTensor<double>(t1,TensorArgs(eps,tt));\n\n\n    \t}\n    };\n\n    INSTANTIATE_TEST_CASE_P(UnaryGenTest,UnaryGenTest,\n    \t\t\t\t::testing::Combine(::testing::Values(::madness::TT_FULL, ::madness::TT_2D),\n    \t\t\t\t\t\t\t\t   ::testing::Values(2,4,6),\n    \t\t\t\t\t\t\t\t   ::testing::Values(1.e-3, 1.e-4, 1.e-5),\n     \t\t\t\t\t\t\t\t   ::testing::Values(null,index,random)\n    ));\n\n    INSTANTIATE_TEST_CASE_P(BinaryGenTest,BinaryGenTest,\n    \t\t\t\t::testing::Combine(::testing::Values(::madness::TT_FULL, ::madness::TT_2D),\n    \t\t\t\t\t\t\t\t   ::testing::Values(2l,4l),\n    \t\t\t\t\t\t\t\t   ::testing::Values(1.e-3, 1.e-4, 1.e-5),\n     \t\t\t\t\t\t\t\t   ::testing::Values(null,index,random),\n      \t\t\t\t\t\t\t\t   ::testing::Values(null,index,random)\n    ));\n\n    TEST_P(UnaryGenTest, Norms_etc) {\n    \ttry {\n\n    \t\t// should not change contents of the GenTensor\n    \t\tg0.normalize();\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t// Frobenius norm\n    \t\tASSERT_LT(g0.normf()-t0.normf(),eps);\n    \t\tASSERT_LT(g0.svd_normf()-t0.normf(),eps);\n\n    \t\t// svd_normf computes the norm of the weights only\n    \t\tg0.scale(1.1);\n    \t\tASSERT_LT(g0.svd_normf()-1.1*(t0.normf()),eps);\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    }\n\n    TEST_P(BinaryGenTest, Addition) {\n    \tfor (int ipass=0; ipass<10; ++ipass) {\n    \ttry {\n    \t\t// check for addition\n    \t\tt0+=t1;\n    \t\tg0+=g1;\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t// check for subtraction\n    \t\tt0-=t1;\n    \t\tg0-=g1;\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t// check for inplace stuff\n    \t\tt0.gaxpy(-0.7, t1, 0.1);\n    \t\tg0.gaxpy(-0.7, g1, 0.1);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t/*\n    \t\t *  this is somewhat special, but nevertheless important to test\n    \t\t *\n    \t\t *  also: note the fac_reduce which is important for accuracy.\n    \t\t *  Many subsequent operations will deteriorate the error.\n    \t\t */\n    \t\tg0=GenTensor<double>(t0,TensorArgs(eps,tt));\n    \t\tg1=GenTensor<double>(t1,TensorArgs(eps,tt));\n\n    \t\tg0.config().orthonormalize(eps*GenTensor<double>::fac_reduce());\t// this line break it!\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\tg1.config().orthonormalize(eps*GenTensor<double>::fac_reduce());\n    \t\tASSERT_LT((g1.full_tensor_copy()-t1).normf(),eps);\n\n    \t\tt0+=t1;\n    \t\tg0.add_SVD(g1,eps);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    \t}\n    }\n\n    TEST_P(BinaryGenTest, ScalarMultiplication) {\n    \ttry {\n    \t\t// check for multiplication\n    \t\tTensor<double> t1=.337*t0;\n    \t\tGenTensor<double> g1=0.3370*g0;\n    \t\tASSERT_LT((g1.full_tensor_copy()-t1).normf(),eps);\n\n    \t\t// check for scaling\n    \t\tt0.scale(4.84);\n    \t\tg0.scale(4.84);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    }\n\n    // test for inner and outer product\n    TEST_P(BinaryGenTest, InnerOuter) {\n    \ttry {\n    \t\t// check for overlap\n    \t\tdouble inner_t=t0.trace(t1);\n    \t\tdouble inner_g=g0.trace_conj(g1);\n    \t\tASSERT_LT(inner_t-inner_g,eps);\n\n\t\t\t// check for outer product\n    \t\tif ((t0.ndim()+t1.ndim()<=TENSOR_MAXDIM) and (tt==TT_FULL)) {\n    \t\t\tTensor<double> t2=outer(t0,t1);\n    \t\t\tGenTensor<double> g2=outer(g0,g1);\n    \t\t\tASSERT_LT((g2.full_tensor_copy()-t2).normf(),eps);\n    \t\t}\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    }\n\n    // checks for transform, general_transform, transform_dir\n    TEST_P(UnaryGenTest, Transform) {\n    \ttry {\n\n    \t\t// this is the transform tensor\n    \t\tTensor<double> c(dim[0],dim[0]);\n    \t\tTensor<double> cc[TENSOR_MAXDIM];\n    \t\tfor (unsigned int idim=0; idim<dim.size(); idim++) {\n    \t\t\tcc[idim]=Tensor<double>(dim[0],dim[0]);\n    \t\t\tcc[idim].fillrandom();\n    \t\t}\n\n    \t\tc.fillindex();\n    \t\tc.scale(1.0/c.normf());\n\n    \t\t// check for transform\n    \t\tTensor<double> t1=transform(t0,c);\n    \t\tGenTensor<double> g1=transform(g0,c);\n\t\t\tASSERT_LT((g1.full_tensor_copy()-t1).normf(),eps);\n\n    \t\t// check for general transform\n    \t\tt1=general_transform(t0,cc);\n    \t\tg1=general_transform(g0,cc);\n\t\t\tASSERT_LT((g1.full_tensor_copy()-t1).normf(),eps);\n\n    \t\t// check for transform in one direction\n\t\t\tfor (int idim=0; idim<dim.size(); ++idim) {\n\t\t\t\tt1=transform_dir(t0,c,idim);\n\t\t\t\tg1=transform_dir(g0,c,idim);\n\t\t\t\tASSERT_LT((g1.full_tensor_copy()-t1).normf(),eps);\n\t\t\t}\n\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    }\n\n    // checks for rank reduction, relies on Addition working properly\n    TEST_P(BinaryGenTest, RankReduction) {\n    \ttry {\n    \t\t// check for addition\n    \t\tt0+=t1;\n    \t\tg0+=g1;\n    \t\tg0.reduce_rank(eps);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t// check for subtraction\n    \t\tt0-=t1;\n    \t\tg0-=g1;\n    \t\tg0.reduce_rank(eps);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t// check for inplace stuff\n    \t\tt0.gaxpy(-0.7, t1, 0.1);\n    \t\tg0.gaxpy(-0.7, g1, 0.1);\n    \t\tg0.reduce_rank(eps);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    }\n\n    // checks for addition with slices\n    TEST_P(BinaryGenTest, SliceAddition) {\n        Tensor<double> t0_save=copy(t0);\n\t\tTensor<double> t1_save=copy(t1);\n\n\t\tGenTensor<double> g0_save=copy(g0);\n\t\tGenTensor<double> g1_save=copy(g1);\n\n\t\t// need multiple passes to to random number generation\n    \tfor (int ipass=0; ipass<10; ++ipass) {\n\t\t\ttry {\n\n\t\t\t\t// reset for each pass\n\t\t\t\tt0=copy(t0_save);\n\t\t\t\tt1=copy(t1_save);\n\t\t\t\tg0=copy(g0_save);\n\t\t\t\tg1=copy(g1_save);\n\n\t\t\t\tlong mindim= std::min(dim.front(), dim.back());\n\n\t\t\t\tlong lo=(madness::RandomValue<long>() % 2);\n\t\t\t\tlong hi=(madness::RandomValue<long>() % mindim-1);\n\t\t\t\tif (hi<lo) hi=lo;\n\t\t\t\tstd::vector<Slice> s(dim.size(),Slice(lo,hi));\n\n\t\t\t\t// check for addition g0(s)+=g1(s)\n\t\t\t\tt0(s)+=t1(s);\n\t\t\t\tg0(s)+=g1(s);\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t\t// special setup: shrink one of the tensors\n\t\t\t\tt1=copy(t1(s));\n\t\t\t\tg1=copy(g1(s));\n\n\t\t\t\t// check for addition g0(s)+=g1\n\t\t\t\tt0(s)+=t1;\n\t\t\t\tg0(s)+=g1;\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t\t// check for subtraction g0(s)-=g1\n\t\t\t\tt0(s)-=t1;\n\t\t\t\tg0(s)-=g1;\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t\t// check for addition g0+=g1(s)\n\t\t\t\tt1+=t0(s);\n\t\t\t\tg1+=g0(s);\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t\t// check for subtraction g0-=g1(s)\n\t\t\t\tt1-=t0(s);\n\t\t\t\tg1-=g0(s);\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t\t// check for zeroing slices, aka subtraction of that slice\n\t\t\t\tt0(s)=0.0;\n\t\t\t\tg0(s)=0.0;\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t} catch (const madness::TensorException& e) {\n\t\t\t\tif (dim.size() != 0) std::cout << e;\n\t\t\t\tEXPECT_EQ(dim.size(),0);\n\t\t\t} catch(...) {\n\t\t\t\tstd::cout << \"Caught unknown exception\" << std::endl;\n\t\t\t\tEXPECT_EQ(1,0);\n\t\t\t}\n    \t}\n    }\n\n    // let's keep construction as a typed test so that at least compiling will always work\n    typedef ::testing::Types<float, double, float_complex, double_complex> GenTensorTestTypes;\n    TYPED_TEST_CASE(GenTensorTest, GenTensorTestTypes);\n\n    TYPED_TEST(GenTensorTest, Construction) {\n        for (int ndim=0; ndim<=TENSOR_MAXDIM; ndim+=2) {\t// even number of dimensions only\n            try {\n                std::vector<long> dim(ndim);\n                for (int pass=0; pass<10; ++pass) {\n                    long nelem = 1;\n                    int alldim= (madness::RandomValue<long>()&0x5) + 1;\n                    for (int i=0; i<ndim; ++i) {\n                        dim[i] = alldim;\n                        nelem *= dim[i];\n                    }\n\n                    // this is the full rank reference tensor\n                    madness::Tensor<TypeParam> fullrank(dim);\n                    fullrank.fillindex();\n                    fullrank+=1.0;\n                    fullrank.scale(1.0/fullrank.normf());\n\n                    // Use ASSERT not EXPECT otherwise we get a huge volume of output\n                    // from failing tests.  Also, subsequent tests usually rely on\n                    // success of previous ones.\n\n                    // verify default constructor\n                    madness::GenTensor<TypeParam> empty;\n                    ASSERT_EQ(empty.size(),0);\n                    ASSERT_EQ(empty.rank(),0);\n                    ASSERT_EQ(empty.ndim(),-1);\n                    ASSERT_TRUE(empty.has_no_data());\n\n                    // verify various \"empty\" constructors a given dimension but no tensor;\n                    // Will result in the construction of an empty SRConf, which means that\n                    // the gentensor \"has data\", which is a matrix of zeros, and rank is 0\n                    {\n                    \t// TT_FULL always returns rank -1, irrespective of the content\n\t\t\t\t\t\tGenTensor<TypeParam> d2(dim, TT_FULL);\n\t\t\t\t\t\tASSERT_TRUE(d2.has_data());\n\t\t\t\t\t\tASSERT_EQ(d2.rank(),-1);\n\n\t\t\t\t\t\tGenTensor<TypeParam> d3(dim, TensorArgs(eps,TT_FULL));\n\t\t\t\t\t\tASSERT_TRUE(d3.has_data());\n\t\t\t\t\t\tASSERT_EQ(d3.rank(),-1);\n\n\t\t\t\t\t\tGenTensor<TypeParam> d4(TT_FULL, alldim, ndim);\n\t\t\t\t\t\tASSERT_TRUE(d4.has_data());\n\t\t\t\t\t\tASSERT_EQ(d4.rank(),-1);\n                    } {\n\t\t\t\t\t\tGenTensor<TypeParam> d2(dim, TT_2D);\n\t\t\t\t\t\tASSERT_TRUE(d2.has_data());\n\t\t\t\t\t\tASSERT_EQ(d2.rank(),0);\n\n\t\t\t\t\t\tGenTensor<TypeParam> d3(dim, TensorArgs(eps,TT_2D));\n\t\t\t\t\t\tASSERT_TRUE(d3.has_data());\n\t\t\t\t\t\tASSERT_EQ(d3.rank(),0);\n\n\t\t\t\t\t\tGenTensor<TypeParam> d4(TT_2D, alldim, ndim);\n\t\t\t\t\t\tASSERT_TRUE(d4.has_data());\n\t\t\t\t\t\tASSERT_EQ(d4.rank(),0);\n                    }\n\n                    // verify various constructors with actual data\n                    // test relies on the correct reconstruction to a full rank tensor\n                    {\n\t\t\t\t\t\t// full rank -> TT_FULL\n\t\t\t\t\t\tmadness::GenTensor<TypeParam> d1(fullrank,TensorArgs(eps,TT_FULL));\n\t\t\t\t\t\tASSERT_EQ(d1.rank(),-1);\n\t\t\t\t\t\tASSERT_NE(fullrank.ptr(),d1.config().vector_[0].ptr()); // Was it shallow?\n\t\t\t\t\t\tASSERT_LT((fullrank-d1.full_tensor_copy()).normf(),eps);\n\n\t\t\t\t\t\t// full rank -> TT_2D\n\t\t\t\t\t\tmadness::GenTensor<TypeParam> d_svd(fullrank,TensorArgs(eps,TT_2D));\n\t\t\t\t\t\tASSERT_LT((fullrank-d_svd.full_tensor_copy()).normf(),eps);\n\n\t\t\t\t\t\t// TT_2D -> TT_2D\n\t\t\t\t\t\tmadness::GenTensor<TypeParam> d_svd2(d_svd);\n\t\t\t\t\t\tASSERT_EQ(d_svd.config().vector_[0].ptr(),d_svd2.config().vector_[0].ptr()); // shallow?\n\t\t\t\t\t\tASSERT_LT((d_svd2.full_tensor_copy()-d_svd.full_tensor_copy()).normf(),eps);\n\n                    }\n\n                    // verify assigment operator\n                    {\n                    \tmadness::GenTensor<TypeParam> d0(fullrank,TensorArgs(eps,TT_2D));\n\n                    \tmadness::GenTensor<TypeParam> d1(fullrank,TensorArgs(eps,TT_2D));\n                    \td1=d0;\n\t\t\t\t\t\tASSERT_LT((d0.full_tensor_copy()-d1.full_tensor_copy()).normf(),eps);\n\t\t\t\t\t\tASSERT_EQ(d0.config().vector_[0].ptr(),d1.config().vector_[0].ptr()); // shallow?\n\n                    \tmadness::GenTensor<TypeParam> t0(fullrank,TensorArgs(eps,TT_FULL));\n                    \tmadness::GenTensor<TypeParam> t1(fullrank,TensorArgs(eps,TT_FULL));\n\t\t\t\t\t\tt1=t0;\n\t\t\t\t\t\tASSERT_LT((t0.full_tensor_copy()-t1.full_tensor_copy()).normf(),eps);\n\t\t\t\t\t\tASSERT_EQ(t0.config().vector_[0].ptr(),t1.config().vector_[0].ptr()); // shallow?\n\n                    }\n\n                    // verify copy construction and deep copy\n                    {\n                    \tmadness::GenTensor<TypeParam> d0(fullrank,TensorArgs(eps,TT_2D));\n\n                    \tmadness::GenTensor<TypeParam> d1=d0;\n\t\t\t\t\t\tASSERT_LT((d0.full_tensor_copy()-d1.full_tensor_copy()).normf(),eps);\n\t\t\t\t\t\tASSERT_EQ(d0.config().vector_[0].ptr(),d1.config().vector_[0].ptr()); // shallow?\n\n                    \td1=copy(d0);\n\t\t\t\t\t\tASSERT_LT((d0.full_tensor_copy()-d1.full_tensor_copy()).normf(),eps);\n\t\t\t\t\t\tASSERT_NE(d0.config().vector_[0].ptr(),d1.config().vector_[0].ptr()); // deep?\n\n                    }\n                }\n            }\n            catch (const madness::TensorException& e) {\n                if (ndim != 0) std::cout << e;\n                EXPECT_EQ(ndim,0);\n            }\n            catch(...) {\n                std::cout << \"Caught unknown exception\" << std::endl;\n                EXPECT_EQ(1,0);\n            }\n        }\n    }\n\n\n\n    /// test slices of GenTensors\n    TYPED_TEST(GenTensorTest, SlicingConstruction) {\n        for (int ndim=0; ndim<=TENSOR_MAXDIM; ndim+=2) {\t// even number of dimensions only\n            try {\n                std::vector<long> dim(ndim,5);\n\n\t\t\t\t// this is the full rank reference tensor\n\t\t\t\tmadness::Tensor<TypeParam> fullrank(dim);\n\t\t\t\tfullrank.fillindex();\n\t\t\t\tfullrank+=1.0;\n\t\t\t\tfullrank.scale(1.0/fullrank.normf());\n\n\t\t\t\tstd::vector<Slice> s(ndim,Slice(0,3));\n\n\t\t\t\t// Use ASSERT not EXPECT otherwise we get a huge volume of output\n\t\t\t\t// from failing tests.  Also, subsequent tests usually rely on\n\t\t\t\t// success of previous ones.\n\n\t\t\t\t// g0=g1(s)\n\t\t\t\tTensor<TypeParam> t0=copy(fullrank);\n\t\t\t\tTensor<TypeParam> t1=t0(s);\n\t\t\t\tGenTensor<TypeParam> g0_svd(t0,TensorArgs(eps,TT_2D));\n\t\t\t\tGenTensor<TypeParam> g1_svd=g0_svd(s);\n\t\t\t\tGenTensor<TypeParam> g0_full(t0,TensorArgs(eps,TT_FULL));\n\t\t\t\tGenTensor<TypeParam> g1_full=g0_full(s);\n\n\t\t\t\t// check for shallowness -- should be deep(!)\n\t\t\t\tASSERT_NE(g0_svd.config().vector_[0].ptr(),g1_svd.config().vector_[0].ptr());\n\t\t\t\tASSERT_NE(g0_full.config().vector_[0].ptr(),g1_full.config().vector_[0].ptr());\n\n\t\t\t\t// check for numerical correctness\n\t\t\t\tASSERT_LT((g1_svd.full_tensor_copy()-t1).normf(),eps);\n\t\t\t\tASSERT_LT((g1_full.full_tensor_copy()-t1).normf(),eps);\n\n                }\n            catch (const madness::TensorException& e) {\n                if (ndim != 0) std::cout << e;\n                EXPECT_EQ(ndim,0);\n            }\n            catch(...) {\n                std::cout << \"Caught unknown exception\" << std::endl;\n                EXPECT_EQ(1,0);\n            }\n        }\n    }\n\n}\n\nint main(int argc, char** argv) {\n\tmadness::default_random_generator.setstate(3149);\n\n    ::testing::InitGoogleTest(&argc, argv);\n    return RUN_ALL_TESTS();\n}\n\n#else\n\n#include <iostream>\nint main() {\n    std::cout << \"U need to build with Google test to enable the tensor test code\\n\";\n    return 0;\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/mra/test_sepop.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#include <madness/mra/mra.h>\n\nusing std::cout;\nusing std::endl;\nusing std::max;\n\nnamespace madness {\n    using std::abs;\n\n    bool test_rnlp(const bool log_errors) {\n        long i, n, l;\n        Tensor<double> r;\n        double maxerr = 0.0;\n        const double pi = 3.14159265358979323846264338328;\n        double exact, err=0.0;\n        const double err_tolerance = 1e-13;\n        {\n            if (log_errors && err >= err_tolerance) cout << \"Testing accuracy of rnlp against results from Maple\" << endl;\n            double a = 1e-4;\n            GaussianConvolution1D<double> g(8,sqrt(a/pi),a,0,LatticeRange(false));\n            n = 0;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.64057956799766339e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -3.19741057080945913e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.81799864246383464e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.64170777792480805e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.06615886053515213e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.82194856723151343e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.64170777792480805e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.06615886053515213e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.82194856723151343e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.64057956799766339e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 3.19741057080945913e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.81799864246383464e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.63832382494524470e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 5.32546574080415871e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.81010590087371315e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.41047267328181405e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.22018791972360980e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.41047377521394878e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -4.06729836170390096e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.41047377521394878e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.06729836170390096e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.41047267328181405e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.22018791972360980e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.41047046942012737e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.03364123692283645e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52618488461890419e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52618489537996637e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52618489537996637e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52618488461890419e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52618486309677983e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546224281108936e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546224291617701e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546224291617701e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546224281108936e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546224260091135e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556073330313e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556073340579e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556073340579e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556073330313e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556073309815e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183355599e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183355769e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183355769e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183355599e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183355430e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n        }\n        {\n            double a = 1e-2;\n            GaussianConvolution1D<double> g(8,sqrt(a/pi),a,0,LatticeRange(false));\n            n = 0;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.51198365960967815e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -3.07636514759748877e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.39004237222238520e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 3.05711391835261338e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.62314580091424487e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.06031221284974586e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.77004995102873103e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 1.09765925398799329e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.62314580091424487e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.06031221284974586e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.77004995102873103e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -1.09765925398799329e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.51198365960967815e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 3.07636514759748877e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.39004237222238520e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -3.05711391835261338e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.29620851243244872e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.79304691694024367e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.69661200992196493e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -4.36848047760689648e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.41034540671661907e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.22000442699401760e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.20320972136612724e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.41045559353827048e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -4.06721097934550646e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.20550942666829470e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.41045559353827048e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.06721097934550646e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.20550942666829470e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.41034540671661907e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.22000442699401760e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.20320972136612724e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.41012505889650305e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.03281124249789191e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.19861192757157094e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52618364171646210e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -4.65465182972746039e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52618471782244636e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.55155139906883680e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52618471782244636e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.55155139906883680e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52618364171646210e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.65465182972746039e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52618148950547801e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 7.75774515795399146e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546223067336716e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546224118221681e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546224118221681e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546223067336716e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546220965566786e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556072144996e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556073171247e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556073171247e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556072144996e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556070092493e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183344046e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183354075e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183354075e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183344046e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183323988e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n        }\n        {\n            double a = 1e0;\n            GaussianConvolution1D<double> g(8,sqrt(a/pi),a,0,LatticeRange(false));\n            n = 0;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 7.63107360346189367e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.39326380508023582e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -3.96841677858563145e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 8.75661865077648466e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 8.82410737907618627e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -1.30949951473492010e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 4.21350396474857447e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -6.17983307932157278e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 4.43199670152667480e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 3.35647464179302069e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -3.57967506112678285e-11;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -1.36118274898628887e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 4.21350396474857447e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 6.17983307932157278e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 4.43199670152667480e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -3.35647464179302069e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -3.57967506112678285e-11;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 1.36118274898628887e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 7.63107360346189367e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.39326380508023582e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -3.96841677858563145e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -8.75661865077648466e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 8.82410737907618627e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 1.30949951473492010e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.32782224202434003e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -3.68552701680425695e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 4.13775061144892418e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 1.60042507022451686e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.96088571198545215e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 1.41367897661257123e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.39768454157893490e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.20177712692920616e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -3.94868219678417840e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 7.31566593570543275e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.40863955444774147e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -4.05848287082555859e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.17520807696470182e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 2.51168860115838423e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.40863955444774147e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.05848287082555859e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.17520807696470182e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -2.51168860115838423e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.39768454157893490e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.20177712692920616e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -3.94868219678417840e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -7.32150795271814975e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.37602944516084069e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.95125817624941723e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -3.51139113424138104e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -1.15110485207894889e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52605935399162088e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -4.65437839301828836e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52616696215172984e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.55153837798979186e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52616696215172984e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.55153837798979186e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52605935399162088e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.65437839301828836e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52584414752294961e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 7.75650823576525769e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546101690129993e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.77560940279273474e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546206778619640e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -5.91869918524889379e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546206778619640e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 5.91869918524889379e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81546101690129993e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.77560940279273474e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81545891513188171e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.95934782871507479e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386555953612550e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556056238053e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386556056238053e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386555953612550e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386555748361586e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390182186538e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183188666e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390183188666e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390182186538e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390180182065e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n        }\n        {\n            double a = 1e2;\n            GaussianConvolution1D<double> g(8,sqrt(a/pi),a,0,LatticeRange(false));\n            n = 0;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.00000000000000000e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 6.10756752342258014e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.93454443422216120e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -6.74867032786444360e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.24739852592635793e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 1.43294933024935476e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.00000000000000000e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -6.10756752342258014e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.93454443422216120e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 6.74867032786444360e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.24739852592635793e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -1.43294933024935476e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.99318492136080461e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.08696368094917623e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 2.60447168323340892e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -9.04034504985510627e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -2.14998633928712021e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 5.58835531816329497e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.24648176437683600e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -3.27908149234218621e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.67276950422990212e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 1.64624909472826329e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 6.70688497777513430e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -9.05569878193988709e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.24648176437683600e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 3.27908149234218621e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.67276950422990212e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -1.64624909472826329e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 6.70688497777513430e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 9.05569878193988709e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.99318492136080461e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.08696368094917623e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 2.60447168323340892e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 9.04034504985510627e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -2.14998633928712021e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -5.58835531816329497e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.38179858827323476e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.04763936483394230e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -8.32772220224538394e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -1.89437614141419528e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 2.88769508210870525e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 2.21803339122174113e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.51365573776570017e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -4.62710590578847031e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -6.11623077961541036e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52439220749447890e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.55023685987324124e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -6.24931708968097842e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.52439220749447890e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.55023685987324124e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -6.24931708968097842e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.51365573776570017e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.62710590578847031e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -6.11623077961541036e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.49228081923241285e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 7.63366360227468385e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -5.85369846273186721e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81533964065561448e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.77556865689395017e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81544472821516045e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -5.91867978227500295e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81544472821516045e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 5.91867978227500295e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81533964065561448e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.77556865689395017e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81512946929470659e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.95916350513851956e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386544100369154e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -6.77341329040006257e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386554362917535e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.25780460536204789e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386554362917535e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.25780460536204789e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386544100369154e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 6.77341329040006257e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386523575273816e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.12890203983799996e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390066432148e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390166652414e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390166652414e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966390066432148e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966389865991790e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n        }\n        {\n            double a = 1e4;\n            GaussianConvolution1D<double> g(8,sqrt(a/pi),a,0,LatticeRange(false));\n            n = 0;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.00000000000000000e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.23528272214066237e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 1.41178217654244809e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 1.26724337383508057e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 9.24808666820860048e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 5.16058662037806704e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.00000000000000000e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.23528272214066237e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 1.41178217654244809e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -1.26724337383508057e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 9.24808666820860048e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -5.16058662037806704e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.93406055705484376e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.39497184635340733e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 4.08935561473207502e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 2.66300430413872028e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.33508873895376489e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 5.08640731141814058e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.00000000000000000e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.34688631911635626e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -3.48488099568184218e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 2.62343309407099060e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.42392358397174803e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -5.74390741499019122e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.00000000000000000e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.34688631911635626e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -3.48488099568184218e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -2.62343309407099060e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.42392358397174803e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 5.74390741499019122e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.93406055705484376e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -4.39497184635340733e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 4.08935561473207502e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -2.66300430413872028e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.33508873895567407e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -5.08640731150656195e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.49146408254436480e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.50647102869495280e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 2.64278820712894470e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 3.15088994971621284e-11;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -3.70274884997262088e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 2.02622223000723244e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.35475425674241334e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.42579697710634181e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.61160183056987646e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 4.87550411609523399e-11;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 2.47120513789010578e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -1.86594916521298455e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.35475425674241334e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.42579697710634181e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.61160183056987646e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -4.87550411609523399e-11;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 2.47120513789010578e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 1.86594916521298455e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.49146408254436480e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.50647102869495280e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 2.64278820712894470e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -3.15088994971621284e-11;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -3.70274884997262088e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -2.02622223000727306e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.37408108427214515e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.09038475936154631e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 3.68884880267772498e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 3.66150600926587787e-11;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 3.77722151485774017e-16;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -1.03592207658699442e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.80321162122826961e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.77149821469458344e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -9.25065232468101948e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81371108109231360e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -5.91673982825609260e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -9.32840028258958169e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.81371108109231360e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 5.91673982825609260e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -9.32840028258958169e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.80321162122826961e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.77149821469458344e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -9.25065232468101948e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.78225020949705004e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.94078061354701635e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -9.09598921287351880e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20385358779692841e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -6.77335257389880792e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386385030982762e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.25780171409048271e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20386385030982762e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.25780171409048271e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20385358779692841e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 6.77335257389880792e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20383306291449504e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.12887457303027408e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966378490998915e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.58385225835037511e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966388513019073e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -8.61284112227903377e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966388513019073e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 8.61284112227903377e-20;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966378490998915e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.58385225835037511e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966358446959223e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.30642016947285981e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n        }\n        {\n            double a = 1e6;\n            GaussianConvolution1D<double> g(8,sqrt(a/pi),a,0,LatticeRange(false));\n            n = 0;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.00000000000000000e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.31393925175791226e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 1.76043401220533680e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 2.07091850787566534e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 2.28733404941548857e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 2.42623389685600399e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 9;\n            exact = -2.07091850787566534e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 2.28733404941548857e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -2.42623389685600399e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 9;\n            exact = -3.50842272140536116e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.68215019539905630e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -1.77563550367174916e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.64684064677916715e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.77372027143066234e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 2.48546774012851273e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 6.34469829004409155e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 8.20364207845620860e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 5.02838600880059851e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 7.99999973531593511e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.28136988133445895e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.97337646440325010e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 2.42595127151247827e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -1.01342125713415232e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 1.19548791588270655e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 7.99999973531593511e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.28136988133445895e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.97337646440325010e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -2.42595127151247827e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -1.01342125713415232e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -1.19548791588270655e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.64684064677916715e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -4.77372027143066234e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 2.48546774012851273e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -6.34469829004409155e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 8.20364207845620860e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -5.02838600880059851e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 7.68112666770073726e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.40335952063720378e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.16852188536233089e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 2.27739586876326983e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -9.64560459462787522e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.64340268954690671e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -5.72613518237629813e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -8.32996156019435581e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 1.22452367554029254e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 3.28001683556767755e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 8.64340268954690671e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 5.72613518237629813e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -8.32996156019435581e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -1.22452367554029254e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 3.28001683556767755e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 7.68112666770073726e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.40335952063720378e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.16852188536233089e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -2.27739586876326983e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -9.64560459462787522e-18;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 6.06603017048240378e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.52348873733158482e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 4.50962719862293780e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -9.54505770868048384e-13;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -3.34357728315444496e-17;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20266863365880416e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -6.76728333900617373e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.38645113252605220e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20369453020092898e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.25751260692224813e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.39098307532258949e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20369453020092898e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.25751260692224813e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.39098307532258949e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20266863365880416e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 6.76728333900617373e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.38645113252605220e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.20061827312391323e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.12613077452750488e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.37740622815052894e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50965220949072187e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.58384321086449390e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966223149730427e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -8.61283681394682842e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50966223149730427e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 8.61283681394682842e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50965220949072187e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.58384321086449390e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50963216553224777e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.30637924047538213e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n        }\n        {\n            double a = 1e8;\n            GaussianConvolution1D<double> g(8,sqrt(a/pi),a,0,LatticeRange(false));\n            n = 0;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.00000000000000000e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.32198023075050020e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 1.79850757146013485e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 2.16840442140282663e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 2.47807154022197462e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 2.74638507267385013e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 0;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 9;\n            exact = -2.16840442140282663e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 2.47807154022197462e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -2.74638507267385013e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 12;\n            exact = 8.66639007453691868e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -8.91729870909936828e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 9;\n            exact = -6.97748517721321448e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.97852113142792607e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 2.44271302079553987e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.77621741053728029e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.80561296694321666e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 2.14965049420876670e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 2.87273668988151739e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -5.78715292978526717e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 3.75446225456850381e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.19822378257343587e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.59910355189205866e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 1.88940266256636957e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -6.48224605439561008e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 8.95940657127647480e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -2.01590163575141197e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.19822378257343587e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.59910355189205866e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 1.88940266256636957e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 6.48224605439561008e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 8.95940657127647480e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 2.01590163575141197e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.77621741053728029e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.80561296694321666e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 2.14965049420876670e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -2.87273668988151739e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -5.78715292978526717e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -3.75446225456850381e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.60267034903721741e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.56247390565564865e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 1.00204874077533328e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -1.68527185127306691e-11;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.32633156186227036e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -4.97857828210297353e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.08775684768582366e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -6.18391032576240027e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -9.17718829164970323e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 7.27641771748153090e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.45035821991845720e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.18688012530858096e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.22880079087442982e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.33180134100535050e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 2.89311654858050329e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 3.32835978333160121e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.18688012530858096e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.22880079087442982e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.33180134100535050e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -2.89311654858050329e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 3.32835978333160121e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.08775684768582366e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 6.18391032576240027e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -9.17718829164970323e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -7.27641771748153090e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 1.45035821991845720e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.90278525861057943e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 8.78775137729619093e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.52594114788140973e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -8.24285673816764725e-14;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -1.10123909261290486e-19;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50849480740676434e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.58293860288335944e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.07063600559659463e-16;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50949687272003708e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -8.61240599236203343e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.07327540364256062e-16;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50949687272003708e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 8.61240599236203343e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.07327540364256062e-16;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50849480740676434e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.58293860288335944e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.07063600559659463e-16;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.50649122351290821e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 4.30228801910451485e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.06536152937712491e-16;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n        }\n        {\n            double a = 1e10;\n            GaussianConvolution1D<double> g(8,sqrt(a/pi),a,0,LatticeRange(false));\n            n = 0;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.00000000000000000e-01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.32278609519677226e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 1.80234849054933588e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 2.17834302709225502e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = 2.49780041123299235e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 2.78011463893526400e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 4;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 12;\n            exact = 9.85994473913733493e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -1.08963047031019240e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 8;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 12;\n            exact = 3.17378652019804868e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -3.10371707224047384e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 12;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 9;\n            exact = -3.55193478516153949e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -8.76624415465518325e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 4.45211896310375366e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.95753699701407591e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 1.01817522582965636e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.26716664222736262e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 9.05830429656977076e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -4.09146442457520497e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 2.46678858892003107e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.24040427814888830e+02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -6.51252735045721654e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 7.18690903438790468e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -4.13584998317234614e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -1.74068139575386427e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 5.03038032706968060e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 1.24040427814888830e+02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 6.51252735045721654e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 7.18690903438790468e-02;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 4.13584998317234614e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -1.74068139575386427e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -5.03038032706968060e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 3.95753699701407591e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.01817522582965636e+00;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -4.26716664222736262e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -9.05830429656977076e-06;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -4.09146442457520497e-08;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = -2.46678858892003107e-10;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 16;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 2.03517586076878889e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -1.49274934514448811e-03;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = 9.66085723513747846e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -9.25718189118173804e-07;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 12;\n            exact = -1.51883153358735018e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 15;\n            exact = 2.59891477668870922e-12;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.39414070815156137e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -2.49387003254647314e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.78376303140302747e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 1.87233252628364406e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=-1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.49300601109782676e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = -8.56943996085143253e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.03858147916271143e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = 6.67700051743989307e-16;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=0;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.49300601109782676e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 8.56943996085143253e-05;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -2.03858147916271143e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -6.67700051743989307e-16;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=1;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.39414070815156137e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 2.49387003254647314e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.78376303140302747e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -1.87233252628364406e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            n = 20;\n            l=2;\n            r = g.rnlp(n,l);\n            i = 0;\n            exact = 5.20171632178656012e+01;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 3;\n            exact = 3.90952885279176158e-04;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 6;\n            exact = -1.31483311173371317e-09;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n            i = 9;\n            exact = -2.71474799023069306e-15;\n            err = abs(r(i)-exact);\n            if (log_errors && err >= err_tolerance) cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << exact << \" \" << r(i) << \" \" << err << endl;\n            maxerr = max(maxerr,err);\n        }\n        if (log_errors && maxerr >= err_tolerance) cout << \"MAXERR \" << maxerr << endl;\n        return (maxerr < err_tolerance);\n    }\n\n    bool test_rnlp_rangelimited(const bool log_errors) {\n      double maxerr = 0.0;\n      const double pi = 3.14159265358979323846264338328;\n      double err;\n      const auto err_tolerance = 1e-13;\n      {\n        const int alog10s[] = {-4, -2, 0, 2, 4, 6, 8, 10};\n        const int ps[] = {0, 3};\n        const int ns[] = {0, 1, 2};\n        const int ls[] = {-2, -1, 0, 1, 2};\n        /// these do not include 2^{n/2} factor baked into the GaussianConvolution1D (via the multiscale adjustment of the normalization constant?)\n        const double exact_tr_values\n            [sizeof(alog10s) / sizeof(int)][sizeof(ns) / sizeof(int)]\n            [sizeof(ls) / sizeof(int)][sizeof(ps) / sizeof(int)] = {\n                {{{0, 0},\n                  {0.002820924410015775, -0.000932925282557223},\n                  {0.002820924410015775, 0.000932925282557223},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.002820924410015775, -3.331885264499784e-14},\n                  {0.002820924410015775, 3.331885264499784e-14},\n                  {0, 0},\n                  {0, 0}},\n                 {{0.001410453389628289, -3.123609897563486e-15},\n                  {0.001410471020387486, -1.041224991186846e-15},\n                  {0.001410471020387486, 1.041224991186846e-15},\n                  {0.001410453389628289, 3.123609897563486e-15},\n                  {0, 0}}},\n                {{{0, 0},\n                  {0.02818598889850831, -0.00931386887557233},\n                  {0.02818598889850831, 0.00931386887557233},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.02818598889850831, -3.327307292171618e-9},\n                  {0.02818598889850831, 3.327307292171618e-9},\n                  {0, 0},\n                  {0, 0}},\n                 {{0.0140841872463443, -3.116101632173124e-10},\n                  {0.01410180165216401, -1.040867135941334e-10},\n                  {0.01410180165216401, 1.040867135941334e-10},\n                  {0.0140841872463443, 3.116101632173124e-10},\n                  {0, 0}}},\n                {{{0, 0},\n                  {0.2602499389065233, -0.07865853072930514},\n                  {0.2602499389065233, 0.07865853072930514},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.2602499389065233, -0.0002901773850574695},\n                  {0.2602499389065233, 0.0002901773850574695},\n                  {0, 0},\n                  {0, 0}},\n                 {{0.1220867438224048, -0.00002440297110419346},\n                  {0.1381631950841185, -0.00001005737075613944},\n                  {0.1381631950841185, 0.00001005737075613944},\n                  {0.1220867438224048, 0.00002440297110419346},\n                  {0, 0}}},\n                {{{0, 0},\n                  {0.4999999999992313, 0.6107567523421995},\n                  {0.4999999999992313, -0.6107567523421995},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.4999999999992313, 0.205938225992832},\n                  {0.4999999999992313, -0.205938225992832},\n                  {0, 0},\n                  {0, 0}},\n                 {{0.0002034760079537496, 0.0002159002695817145},\n                  {0.4997965239912775, -0.03888049185695126},\n                  {0.4997965239912775, 0.03888049185695126},\n                  {0.0002034760079537496, -0.0002159002695817145},\n                  {0, 0}}},\n                {{{0, 0},\n                  {0.5, 1.235282722140662},\n                  {0.5, -1.235282722140662},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.5, 1.151568853395805},\n                  {0.5, -1.151568853395805},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.5, 0.995420060567129},\n                  {0.5, -0.995420060567129},\n                  {0, 0},\n                  {0, 0}}},\n                {{{0, 0},\n                  {0.5, 1.313939251757912},\n                  {0.5, -1.313939251757912},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.5, 1.305042444690875},\n                  {0.5, -1.305042444690875},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.5, 1.287367262429561},\n                  {0.5, -1.287367262429561},\n                  {0, 0},\n                  {0, 0}}},\n                {{{0, 0},\n                  {0.5, 1.3219802307505},\n                  {0.5, -1.3219802307505},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.5, 1.32108520274184},\n                  {0.5, -1.32108520274184},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.5, 1.319296336685672},\n                  {0.5, -1.319296336685672},\n                  {0, 0},\n                  {0, 0}}},\n                {{{0, 0},\n                  {0.5, 1.322786095196772},\n                  {0.5, -1.322786095196772},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.5, 1.322696538829787},\n                  {0.5, -1.322696538829787},\n                  {0, 0},\n                  {0, 0}},\n                 {{0, 0},\n                  {0.5, 1.322517438001069},\n                  {0.5, -1.322517438001069},\n                  {0, 0},\n                  {0, 0}}}};\n        auto ia = 0;\n        for (auto alog10 : alog10s) {\n          const auto a = pow(10., alog10);\n          GaussianConvolution1D<double> tg(8, sqrt(a / pi), a, 0, LatticeRange(false), 0., 1);\n          GaussianConvolution1D<double> g(8, sqrt(a / pi), a, 0, LatticeRange(false), 0.);\n\n          auto in = 0;\n          for (auto n : ns) {\n\n            auto il = 0;\n            for (auto l : ls) {\n\n              const auto tr = tg.rnlp(n, l);\n\n              auto ip = 0;\n              for (auto p : ps) {\n                const auto exact_tr = std::pow(M_SQRT2,n) * exact_tr_values[ia][in][il][ip];\n                err = abs(tr(p) - exact_tr);\n                if (log_errors && err >= err_tolerance) {\n                  cout << a << \" \" << n << \" \" << l << \" \" << p << \" \"\n                       << exact_tr << \" \" << tr(p) << \" \" << err << endl;\n                }\n                maxerr = max(maxerr, err);\n                ip++;\n              }\n              il++;\n            }\n            in++;\n          }\n          ia++;\n        }\n      }\n\n      // used to debug teleportation of localized features by convolution with a range-restricted diffuse Gaussian\n      {\n        const auto a = 25.0 / 1e4;\n        const auto D = 1;\n        constexpr auto k = 12;\n        GaussianConvolution1D<double> tg(\n            k, sqrt(a / pi), a, /* deriv = */ 0, /* lattice summed? */ LatticeRange(false),\n            /* bloch_k = */ 0., /* range limit */ D);\n        /// these DO include 2^{n/2} factor baked into the GaussianConvolution1D\n        const double tr_n3_lm2_ref_values[] = {\n            0.00997108991466797,    -5.6218715341845e-7,\n            -2.901709297758225e-8,  1.437414614442511e-12,\n            3.619000218340197e-14,  -1.777148026452294e-18,\n            -2.968866965556583e-20, 1.454774552821945e-24,\n            1.819361807560809e-26,  -8.908943630022914e-31,\n            -8.904130313885388e-33, 4.359314760546287e-37,\n            3.628225526648159e-39,  -1.776376861434198e-43,\n            -1.266550069956928e-45, 6.201902983180989e-50,\n            3.867349272284154e-52,  -1.894106535937003e-56,\n            -1.049430809657563e-58, 5.141019722364054e-63,\n            2.562520298760319e-65,  -1.255675692191342e-69,\n            -5.687706793080674e-72, 2.787847142181617e-76};\n        const double tr_n3_lm1_ref_values[] = {\n            0.00996875322952306,    -7.868775694621369e-7,\n            -2.899668773230684e-8,  2.011594453588302e-12,\n            3.614757606884666e-14,  -2.48664671993462e-18,\n            -2.963993125961155e-20, 2.03525242134997e-24,\n            1.815520741127832e-26,  -1.246180299315029e-30,\n            -8.88114860985864e-33,  6.096842429869235e-37,\n            3.617155631750486e-39,  -2.484013262137746e-43,\n            -1.262090146813519e-45, 8.671132398148329e-50,\n            3.851911522328339e-52,  -2.647812848764523e-56,\n            -1.044747670296641e-58, 7.185618781023059e-63,\n            2.54987805031985e-65,   -1.754786954730941e-69,\n            -5.656966298869452e-72, 3.895362344717459e-76};\n        const double tr_n13_lm2_ref_values[] = {\n            0.0003114790639460418,   -2.743021618339117e-11,\n            -8.637934769658107e-16,  6.686827163034893e-23,\n            1.026629503987052e-27,   -7.882272859669349e-35,\n            -8.025729884359262e-40,  6.151958322234168e-47,\n            4.686850900693793e-52,   -3.59197840269335e-59,\n            -2.185855443449533e-64,  1.675774326590269e-71,\n            8.487732378424081e-77,   -6.510617629789437e-84,\n            -2.823493860778681e-89,  2.167214039954234e-96,\n            8.215699973862636e-102,  -6.310604622557256e-109,\n            -2.124473331458731e-114, 1.633072800351473e-121,\n            4.943456247568555e-127,  -3.802974776867646e-134,\n            -1.045601252966431e-139, 8.050161126156522e-147};\n        const double tr_n13_lm1_ref_values[] = {\n            0.0003114789689133966,   -2.743690709582832e-11,\n            -8.637926856733351e-16,  6.688456885603481e-23,\n            1.026627935243573e-27,   -7.884192333026792e-35,\n            -8.025712700784462e-40,  6.153455180312436e-47,\n            4.686837987972983e-52,   -3.592851649787638e-59,\n            -2.185848076768991e-64,  1.676181383124003e-71,\n            8.487698544157172e-77,   -6.512197774002181e-84,\n            -2.82348086314473e-89,   2.167739586577192e-96,\n            8.215657075119375e-102,  -6.312133648645367e-109,\n            -2.124460922901935e-114, 1.633468151968415e-121,\n            4.943424307773975e-127,  -3.803894665045557e-134,\n            -1.045593847673679e-139, 8.052106707316445e-147};\n        for (auto n : {3, 13}) {\n            for (auto l :\n                 {(1 << (n - 1)) - 2, (1 << (n - 1)) - 1, (1 << (n - 1))}) {\n              const auto tr = tg.rnlp(n, l);\n                //              std::cout << \"trnlp(n=\" << n << \", l=\" << l << \"):\\n\";\n              for (auto p = 0; p != tr.dim(0); ++p) {\n                //                std::cout << \"tr(\" << p << \") = \" << std::scientific\n                //                          << std::setprecision(15) << tr(p) << \"\\n\";\n                const double* exact_values = nullptr;\n                if (n == 3) {\n                  if (l == (1 << (n - 1)) - 2)\n                    exact_values = tr_n3_lm2_ref_values;\n                  else if (l == (1 << (n - 1)) - 1)\n                    exact_values = tr_n3_lm1_ref_values;\n                }\n                else if (n == 13) {\n                  if (l == (1 << (n - 1)) - 2)\n                    exact_values = tr_n13_lm2_ref_values;\n                  else if (l == (1 << (n - 1)) - 1)\n                    exact_values = tr_n13_lm1_ref_values;\n                }\n                const auto exact_tr = exact_values ? exact_values[p] : 0.0;\n                err = abs(tr(p) - exact_tr);\n                if (log_errors && err >= err_tolerance) {\n                  cout << a << \" \" << n << \" \" << l << \" \" << p << \" \"\n                       << exact_tr << \" \" << tr(p) << \" \" << err << endl;\n                }\n                maxerr = max(maxerr, err);\n              }\n            }\n        }\n      }\n\n      return (maxerr < err_tolerance);\n    }\n\n    bool test_rnlp_rangelimited_erf(const bool log_errors) {\n      double maxerr = 0.0;\n      const double pi = 3.14159265358979323846264338328;\n      double err;\n      const auto err_tolerance = 3.3e-13; /* I suspect the reference values are not any more precise than this */\n      {\n        const int alog10s[] = {-4, 0, 4};\n        const int ps[] = {0, 3, 7};\n        const int ns[] = {0, 1, 2};\n        const int ls[] = {-2, -1, 0, 1, 2};\n        const int σlog10s[] = {-2, -1, 0};\n        /// these do not include 2^{n/2} factor baked into the GaussianConvolution1D (via the multiscale adjustment of the normalization constant?)\n        const double exact_tr_values\n            [sizeof(alog10s) / sizeof(int)][sizeof(σlog10s) / sizeof(int)]\n            [sizeof(ns) / sizeof(int)][sizeof(ls) / sizeof(int)]\n            [sizeof(ps) / sizeof(int)] = {{{{{0,0,0},{0.002820924395911391,-0.0009318063413062203,\n                                                         -0.0004243830414805509},{0.002820924395911391,0.0009318063413062203,\n                                              0.00042438304148055957},{0,0,0},{0,0,0}},\n                                            {{0.00001591508932156427,0.00003779555818054598,0.000036617002143814076},\n                                             {0.002805009306589827,0.0000377955890572059,0.00003661702159918728},\n                                             {0.002805009306589827,-0.00003779558905720578,-0.00003661702159918547},\n                                             {0.00001591508932156427,-0.00003779555818054597,-0.00003661700214380724},\n                                             {0,0,0}},{{0.0013945382862023397,0.000033807197824626645,\n                                              0.000020477638782848537},{0.0014104710203874877,-1.0411890544416563e-15,\n                                              -1.6957271727974724e-17},{0.0014104710203874877,1.041264904692606e-15,\n                                              -1.6967441166862152e-17},{0.0013945382862023397,-0.00003380719782462656,\n                                              -0.000020477638782846738},{0.000015915089321564267,-0.00003380717268513069,\n                                              -0.000020477638054641078}}},{{{4.178170993418692e-17,\n                                              9.855895855395598e-17,9.459945406185167e-17},\n                                             {0.0028209229995781386,-0.000826572761246539,-0.00024345581006846996},\n                                             {0.0028209229995781386,0.0008265727612465391,0.0002434558100684785},\n                                             {4.178170993418692e-17,-9.855895855395597e-17,-9.45994540618344e-17},\n                                             {0,0,0}},{{0.00015915020600155503,0.00011931312084461618,\n                                              -6.289260984209179e-6},{0.0026617727935765835,0.00011931293482868884,\n                                              -6.289332344783605e-6},{0.0026617727935765835,-0.0001193129348286887,\n                                              6.289332344784805e-6},{0.00015915020600155503,-0.00011931312084461618,\n                                              6.289260984216599e-6},{4.1781731504516154e-17,-8.767838933949522e-17,\n                                              -5.4754345758947715e-17}},{{0.0012513220167850525,\n                                              0.000020183026420882527,1.5444010562782382e-7},\n                                             {0.0014104507767915308,2.2571114123512386e-8,1.332154115046817e-9},\n                                             {0.0014104507767915308,-2.2571114123453666e-8,-1.332154110762501e-9},\n                                             {0.0012513220167850525,-0.000020183026420882463,-1.5444010562660777e-7},\n                                             {0.0001591299634856514,-0.000020183640686752766,-1.5443132799552644e-7}}},\n                                           {{{0.0005387571200970742,6.406585944812713e-6,3.00861499978693e-9},\n                                             {0.0028208791553762202,-0.000018476538773579174,-5.150075146259928e-9},\n                                             {0.0028208791553762202,0.000018476538773579303,5.1500751548823895e-9},\n                                             {0.0005387571200970742,-6.4065859448126955e-6,-3.0086149956949922e-9},\n                                             {0.000024110182048810063,-2.7521271452166193e-6,7.186304650539819e-10}},\n                                            {{0.0010283165458855514,-1.0119950509696495e-6,-1.3119534020791191e-11},\n                                             {0.0017925626094906692,-1.0122164982684448e-6,-1.3126711167049264e-11},\n                                             {0.0017925626094906692,1.012216498268539e-6,1.3126674287158598e-11},\n                                             {0.0010283165458855514,1.0119950509696984e-6,1.3119511421621816e-11},\n                                             {0.00042135005068331396,-7.7356481427139e-8,-1.4861211009784566e-11}},\n                                            {{0.0008036740477723163,-7.435135138641168e-8,-7.727319706994729e-14},\n                                             {0.0009888885617183529,-4.877000030532881e-8,-1.76940419171849e-14},\n                                             {0.0009888885617183529,4.8770000305373456e-8,1.7673093494330113e-14},\n                                             {0.0008036740477723163,7.435135138643921e-8,7.725576168166772e-14},\n                                             {0.000606764986163338,7.434375817569097e-8,7.724179426320363e-14}}}},\n                                          {{{{0,0,0},{0.26023895481078885,-0.07857138858370427,\n                                                         -0.03322010711931271},{0.26023895481078885,0.07857138858370429,\n                                              0.03322010711931377},{0,0,0},{0,0,0}},\n                                            {{0.0012339872371034185,0.0029315174860420064,0.0028442154352782863},\n                                             {0.2590049675736854,0.0026654120913752544,0.0028593564280339307},\n                                             {0.2590049675736854,-0.0026654120913752444,-0.002859356428033791},\n                                             {0.0012339872371034183,-0.0029315174860420055,-0.002844215435277754},\n                                             {0,0,0}},{{0.1208417724895668,0.0026183278995025785,\n                                              0.0015951365688988814},{0.13816319508411862,-0.000010057370756136057,\n                                              -2.553462005667635e-11},{0.13816319508411862,0.000010057370756143887,\n                                              2.5531308515578387e-11},{0.1208417724895668,-0.002618327899502572,\n                                              -0.0015951365688987138},{0.001233987237103418,-0.002623150195491068,\n                                              -0.0015945687961760704}}},{{{1.5083891790033054e-15,\n                                              3.565692611787655e-15,3.449480227249289e-15},\n                                             {0.2591582795849656,-0.07040459977553397,-0.019165813275565966},\n                                             {0.2591582795849656,0.07040459977553398,0.019165813275567017},\n                                             {1.5083891790033054e-15,-3.565692611787655e-15,-3.449480227248656e-15},\n                                             {0,0,0}},{{0.011828532546311768,0.009373979519692642,\n                                              -0.0004654553738560623},{0.24732974703865382,0.008944386407754032,\n                                              -0.0005229143887150141},{0.24732974703865382,-0.00894438640775402,\n                                              0.0005229143887151022},{0.011828532546311768,-0.009373979519692642,\n                                              0.00046545537385663395},{1.5083905197015853e-15,-3.1790544183974636e-15,\n                                              -2.017435862297216e-15}},{{0.1091684687049073,0.001316879321155076,\n                                              0.000015609438479641545},{0.13816127833374653,-7.934123402749891e-6,\n                                              1.2136172114235441e-7},{0.13816127833374653,7.934123402755763e-6,\n                                              -1.2136172073900235e-7},{0.1091684687049073,-0.0013168793211550702,\n                                              -0.000015609438479517983},{0.01182740800819827,-0.001818558870972423,\n                                              -8.588759174373388e-6}}},{{{0.01095315211141335,\n                                              0.0017592303634754408,-1.773472055278654e-6},\n                                             {0.22808502180327883,-0.006607516600575764,-2.3092403293847193e-6},\n                                             {0.22808502180327883,0.006607516600575772,2.3092403302455585e-6},\n                                             {0.01095315211141335,-0.0017592303634754406,1.7734720554923817e-6},\n                                             {0.00002199254764344912,-0.000011981723363715384,-7.815515267869049e-8}},\n                                            {{0.06130217827291403,-0.00009508077383050712,2.495651154633274e-8},\n                                             {0.1667828435303648,-0.00059386372114806,-4.0952904983310634e-8},\n                                             {0.1667828435303648,0.0005938637211480676,4.095290262082e-8},\n                                             {0.06130217827291403,0.00009508077383050979,-2.4956511278195987e-8},\n                                             {0.010220196785229523,-0.00017809647929935645,2.966496945184784e-9}},\n                                            {{0.06982777471182787,-0.000036495266669874715,-1.2148723556440645e-10},\n                                             {0.09695506881853691,-0.000032925481535526365,-1.4600710290998759e-10},\n                                             {0.09695506881853691,0.000032925481535530153,1.4600499331341376e-10},\n                                             {0.06982777471182787,0.00003649526666987838,1.2148561889888637e-10},\n                                             {0.04135189809576318,0.000017218932338011736,-5.061041038431077e-11}}}},\n                                          {{{{0,0,0},{0.5000000000000006,1.2352827221406644,\n                                                         1.3934393915350205},{0.5000000000000006,-1.235282722140664,\n                                              -1.3934393915347183},{0,0,0},{0,0,0}},\n                                            {{0,0,0},{0.5000000000000006,1.1515688533958064,0.971495788445294},\n                                             {0.5000000000000006,-1.1515688533958062,-0.971495788445133},{0,0,0},\n                                             {0,0,0}},{{0,0,0},\n                                             {0.5000000000000006,0.9954200605671301,0.406093458003402},\n                                             {0.5000000000000006,-0.9954200605671301,-0.40609345800337426},{0,0,0},\n                                             {0,0,0}}},{{{0,0,0},\n                                             {0.49999999999924527,1.2352827221388498,1.393439391533205},\n                                             {0.49999999999924527,-1.2352827221388496,-1.3934393915329026},{0,0,0},\n                                             {0,0,0}},{{0,0,0},\n                                             {0.49999999999924527,1.1515688533941655,0.9714957884442748},\n                                             {0.49999999999924527,-1.1515688533941653,-0.9714957884441134},{0,0,0},\n                                             {0,0,0}},{{0,0,0},\n                                             {0.49999999999924527,0.995420060565806,0.40609345800330227},\n                                             {0.49999999999924527,-0.9954200605658062,-0.4060934580032746},{0,0,0},\n                                             {0,0,0}}},{{{0,0,0},\n                                             {0.3788799981204239,0.9361706288484614,1.0565968861847341},\n                                             {0.3788799981204239,-0.9361706288484609,-1.0565968861845048},{0,0,0},\n                                             {0,0,0}},{{0,0,0},\n                                             {0.3788799981204239,0.8728487850758117,0.7372872173052638},\n                                             {0.3788799981204239,-0.8728487850758114,-0.7372872173051412},{0,0,0},\n                                             {0,0,0}},{{0,0,0},\n                                             {0.3788799981204239,0.7547241841524247,0.30911695286978946},\n                                             {0.3788799981204239,-0.7547241841524247,-0.30911695286976826},{0,0,0},\n                                             {0,0,0}}}}};\n        auto ia = 0;\n        for (auto alog10 : alog10s) {\n          const auto a = pow(10., alog10);\n          auto iσ = 0;\n          for (auto σlog10 : σlog10s) {\n            const auto σ = pow(10., σlog10);\n            GaussianConvolution1D<double> tg(8, sqrt(a / pi), a, 0, LatticeRange(false), 0.,\n                                             KernelRange(1, σ));\n            GaussianConvolution1D<double> g(8, sqrt(a / pi), a, 0, LatticeRange(false), 0.);\n\n            auto in = 0;\n            for (auto n : ns) {\n\n              auto il = 0;\n              for (auto l : ls) {\n\n                const auto tr = tg.rnlp(n, l);\n\n                auto ip = 0;\n                for (auto p : ps) {\n                  const auto exact_tr = std::pow(M_SQRT2, n) *\n                                        exact_tr_values[ia][iσ][in][il][ip];\n                  err = abs(tr(p) - exact_tr);\n                  if (log_errors && err >= err_tolerance) {\n                    cout << a << \" \" << σ << \" \" << n << \" \" << l << \" \" << p\n                         << \" \" << exact_tr << \" \" << tr(p) << \" \" << err\n                         << endl;\n                  }\n                  maxerr = max(maxerr, err);\n                  ip++;\n                }\n                il++;\n              }\n              in++;\n            }\n            iσ++;\n          }\n          ia++;\n        }\n      }\n\n      return (maxerr < err_tolerance);\n    }\n\nMADNESS_PRAGMA_GCC(diagnostic push)\nMADNESS_PRAGMA_GCC(diagnostic ignored \"-Wmaybe-uninitialized\")\nMADNESS_PRAGMA_CLANG(diagnostic push)\nMADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wmaybe-uninitialized\")\n    bool test_rnlij_rangelimited(const bool log_errors) {\n      double maxerr = 0.0;\n      const double pi = 3.14159265358979323846264338328;\n      double err;\n      const auto err_tolerance = 1e-13;\n      {\n        const int alog10s[] = {0, 2};\n        const int ns[] = {0, 1, 2};\n        const int ls[] = {-4, -3, -2, -1, 0, 1, 2, 3, 4};\n        const int kmax = 3;\n        const int D = 1;\n\n        const double exact_tr_values\n            [sizeof(alog10s) / sizeof(int)][sizeof(ns) / sizeof(int)]\n            [sizeof(ls) / sizeof(int)][kmax + 1][kmax + 1] = {\n                {{{{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0.06239914704001694, -0.07295744403619789,\n                    0.0369357677412754, -0.001904406234260277},\n                   {0.07295744403619789, -0.08048503031516791,\n                    0.03190461853341899, 0.00910210942647432},\n                   {0.0369357677412754, -0.03190461853341899,\n                    -0.003852872191759357, 0.02302140423433085},\n                   {0.001904406234260277, 0.00910210942647432,\n                    -0.02302140423433085, 0.01862442139435793}},\n                  {{0.3957015837330126, 0, -0.07387153548255079, 0},\n                   {0, 0.1760059389991514, 0, -0.03139833227690751},\n                   {-0.07387153548255079, 0, 0.03137919753706641, 0},\n                   {0, -0.03139833227690751, 0, -0.02788296971843104}},\n                  {{0.06239914704001694, 0.07295744403619789,\n                    0.0369357677412754, 0.001904406234260277},\n                   {-0.07295744403619789, -0.08048503031516791,\n                    -0.03190461853341899, 0.00910210942647432},\n                   {0.0369357677412754, 0.03190461853341899,\n                    -0.003852872191759357, -0.02302140423433085},\n                   {-0.001904406234260277, 0.00910210942647432,\n                    0.02302140423433085, 0.01862442139435793}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},\n                 {{{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0.1247982940800339, -0.07567279010025063,\n                    0.002406686110882992, 0.0003586857987265181},\n                   {0.07567279010025063, -0.007347125872983151,\n                    -0.02977841036946986, 0.001329880617009164},\n                   {0.002406686110882992, 0.02977841036946986,\n                    -0.002836223356072624, -0.01871527459360532},\n                   {-0.0003586857987265181, 0.001329880617009164,\n                    0.01871527459360532, -0.001259489520761049}},\n                  {{0.2709032896529788, 0, -0.004813372221765983, 0},\n                   {0, 0.01091766074249585, 0, -0.000174713124627314},\n                   {-0.004813372221765983, 0, 0.0002690098419760488, 0},\n                   {0, -0.000174713124627314, 0, 4.764945643053651e-6}},\n                  {{0.1247982940800339, 0.07567279010025063,\n                    0.002406686110882992, -0.0003586857987265181},\n                   {-0.07567279010025063, -0.007347125872983151,\n                    0.02977841036946986, 0.001329880617009164},\n                   {0.002406686110882992, -0.02977841036946986,\n                    -0.002836223356072624, 0.01871527459360532},\n                   {0.0003586857987265181, 0.001329880617009164,\n                    -0.01871527459360532, -0.001259489520761049}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},\n                 {{{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0.05914480661826465, -0.0352961498075315,\n                    0.0008511266384317965, 0.00003456132305199318},\n                   {0.0352961498075315, -0.002370553564141238,\n                    -0.01432084200059843, 0.000309382263802944},\n                   {0.0008511266384317965, 0.01432084200059843,\n                    -0.0006699147777973966, -0.00930029157727551},\n                   {-0.00003456132305199318, 0.000309382263802944,\n                    0.00930029157727551, -0.000307372220005017}},\n                  {{0.1313069749235385, -0.004668508830198368,\n                    -0.0005298213407802086, 0.00001813531878048097},\n                   {0.004668508830198368, 0.001188374184419877,\n                    -0.00006241841553979117, -4.178039760209366e-6},\n                   {-0.0005298213407802086, 0.00006241841553979117,\n                    6.392819570634216e-6, -4.072217041620477e-7},\n                   {-0.00001813531878048097, -4.178039760209366e-6,\n                    4.072217041620477e-7, 2.417479793162679e-8}},\n                  {{0.1395963147294403, 0, -0.0006426105953031759, 0},\n                   {0, 0.001442060388883122, 0, -5.867533905635802e-6},\n                   {-0.0006426105953031759, 0, 8.980617332941763e-6, 0},\n                   {0, -5.867533905635802e-6, 0, 4.00121333360345e-8}},\n                  {{0.1313069749235385, 0.004668508830198368,\n                    -0.0005298213407802086, -0.00001813531878048097},\n                   {-0.004668508830198368, 0.001188374184419877,\n                    0.00006241841553979117, -4.178039760209366e-6},\n                   {-0.0005298213407802086, -0.00006241841553979117,\n                    6.392819570634216e-6, 4.072217041620477e-7},\n                   {0.00001813531878048097, -4.178039760209366e-6,\n                    -4.072217041620477e-7, 2.417479793162679e-8}},\n                  {{0.05914480661826465, 0.0352961498075315,\n                    0.0008511266384317965, -0.00003456132305199318},\n                   {-0.0352961498075315, -0.002370553564141238,\n                    0.01432084200059843, 0.000309382263802944},\n                   {0.0008511266384317965, -0.01432084200059843,\n                    -0.0006699147777973966, 0.00930029157727551},\n                   {0.00003456132305199318, 0.000309382263802944,\n                    -0.00930029157727551, -0.000307372220005017}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}},\n                {{{{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0.02820947917699604, -0.04453012417103717,\n                    0.04756936948027392, -0.04191644513315848},\n                   {0.04453012417103717, -0.07019262711553054,\n                    0.0747499664442194, -0.06550833223839031},\n                   {0.04756936948027392, -0.0747499664442194,\n                    0.07906098685098572, -0.06845248583481641},\n                   {0.04191644513315848, -0.06550833223839031,\n                    0.06845248583481641, -0.05798132187123867}},\n                  {{0.94358104164447, 0, -0.0951387389605478, 0},\n                   {0, 0.8318715041031744, 0, -0.1593889860964341},\n                   {-0.0951387389605478, 0, 0.723479401312235, 0},\n                   {0, -0.1593889860964341, 0, 0.6203974508809246}},\n                  {{0.02820947917699604, 0.04453012417103717,\n                    0.04756936948027392, 0.04191644513315848},\n                   {-0.04453012417103717, -0.07019262711553054,\n                    -0.0747499664442194, -0.06550833223839031},\n                   {0.04756936948027392, 0.0747499664442194,\n                    0.07906098685098572, 0.06845248583481641},\n                   {-0.04191644513315848, -0.06550833223839031,\n                    -0.06845248583481641, -0.05798132187123867}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},\n                 {{{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0.05641895835399209, -0.08039999430492184,\n                    0.06916711686405792, -0.04229641365344437},\n                   {0.08039999430492184, -0.113770391733522, 0.0962281120412795,\n                    -0.05670779950056223},\n                   {0.06916711686405792, -0.0962281120412795,\n                    0.07801595248299861, -0.04157611664901071},\n                   {0.04229641365344437, -0.05670779950056223,\n                    0.04157611664901071, -0.01629194504123798}},\n                  {{0.8871620832904784, 0, -0.1383342337281158, 0},\n                   {0, 0.6705132832080146, 0, -0.179622550701738},\n                   {-0.1383342337281158, 0, 0.4787790951354259, 0},\n                   {0, -0.179622550701738, 0, 0.3222142289420809}},\n                  {{0.05641895835399209, 0.08039999430492184,\n                    0.06916711686405792, 0.04229641365344437},\n                   {-0.08039999430492184, -0.113770391733522,\n                    -0.0962281120412795, -0.05670779950056223},\n                   {0.06916711686405792, 0.0962281120412795,\n                    0.07801595248299861, 0.04157611664901071},\n                   {-0.04229641365344437, -0.05670779950056223,\n                    -0.04157611664901071, -0.01629194504123798}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},\n                 {{{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0.00001435241351443475, -0.00002152375883897738,\n                    0.00002083312096219267, -0.00001600260181591134},\n                   {0.00002152375883897738, -0.00003224468529552152,\n                    0.00003114338849154711, -0.00002384226488442202},\n                   {0.00002083312096219267, -0.00003114338849154711,\n                    0.00002994801558399589, -0.00002276961064552485},\n                   {0.00001600260181591134, -0.00002384226488442202,\n                    0.00002276961064552485, -0.00001712431182868865}},\n                  {{0.1128092118809553, -0.1261656431623922,\n                    0.06465783383904638, -0.0142939514887932},\n                   {0.1261656431623922, -0.1347065150820696,\n                    0.05982467094752078, -0.00541888437694819},\n                   {0.06465783383904638, -0.05982467094752078,\n                    0.01342028920843553, 0.01068448196651819},\n                   {0.0142939514887932, -0.00541888437694819,\n                    -0.01068448196651819, 0.01161773908828892}},\n                  {{0.7743528714095231, 0, -0.1293573339200171, 0},\n                   {0, 0.3950780610746883, 0, -0.08836768614958088},\n                   {-0.1293573339200171, 0, 0.1636764991511842, 0},\n                   {0, -0.08836768614958088, 0, 0.05606202228640211}},\n                  {{0.1128092118809553, 0.1261656431623922, 0.06465783383904638,\n                    0.0142939514887932},\n                   {-0.1261656431623922, -0.1347065150820696,\n                    -0.05982467094752078, -0.00541888437694819},\n                   {0.06465783383904638, 0.05982467094752078,\n                    0.01342028920843553, -0.01068448196651819},\n                   {-0.0142939514887932, -0.00541888437694819,\n                    0.01068448196651819, 0.01161773908828892}},\n                  {{0.00001435241351443475, 0.00002152375883897738,\n                    0.00002083312096219267, 0.00001600260181591134},\n                   {-0.00002152375883897738, -0.00003224468529552152,\n                    -0.00003114338849154711, -0.00002384226488442202},\n                   {0.00002083312096219267, 0.00003114338849154711,\n                    0.00002994801558399589, 0.00002276961064552485},\n                   {-0.00001600260181591134, -0.00002384226488442202,\n                    -0.00002276961064552485, -0.00001712431182868865}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},\n                  {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}}};\n\n        auto ia = 0;\n        for (auto alog10 : alog10s) {\n          const auto a = pow(10., alog10);\n          GaussianConvolution1D<double> tg(8, sqrt(a / pi), a, 0, LatticeRange(false), 0., D);\n\n          auto in = 0;\n          for (auto n : ns) {\n\n            auto il = 0;\n            for (auto l : ls) {\n\n              const auto tr = tg.rnlij(n, l);\n\n              for (int ii = 0; ii != kmax; ++ii) {\n                for (int ij = 0; ij != kmax; ++ij) {\n                  const auto exact_tr = exact_tr_values[ia][in][il][ii][ij];\n                  err = abs(tr(ii, ij) - exact_tr);\n                  if (log_errors && err >= err_tolerance) {\n                    cout << a << \" \" << n << \" \" << l << \" \" << ii << \" \" << ij\n                         << \" \" << exact_tr << \" \" << tr(ii, ij) << \" \" << err\n                         << endl;\n                  }\n                  maxerr = max(maxerr, err);\n                }\n              }\n              il++;\n            }\n            in++;\n          }\n          ia++;\n        }\n      }\n\n      // used to debug teleportation of localized features by convolution with a range-restricted diffuse Gaussian\n      {\n        const auto a = 25.0 / 1e4;\n        const auto D = 1;\n        constexpr auto k = 7;\n        GaussianConvolution1D<double> tg(\n            k, sqrt(a / pi), a, /* deriv = */ 0, /* lattice summed? */ LatticeRange(false),\n            /* bloch_k = */ 0., /* range limit */ D);\n        const double tr_n13_l_ref_values[][k] = {{1.720694374332704e-6,9.9344341073827e-7,3.913492949110081e-14,\n                                                   -8.065857269152156e-19,-4.655117952410868e-26,5.699943000644617e-31,\n                                                   3.642203639753081e-38},{-9.9344341073827e-7,-1.0501216918922e-13,\n                                                   4.442813318585533e-7,1.145893121103013e-14,-1.760113549929938e-19,\n                                                   -8.104507472622729e-27,8.255868930785952e-32},\n                                                  {3.913492949110081e-14,-4.442813318585533e-7,-2.500543793214843e-14,\n                                                   2.908504047265132e-7,5.591385902277326e-15,-6.851232700999452e-20,\n                                                   -2.624848474543445e-27},{8.065857269152156e-19,1.145893121103013e-14,\n                                                   -2.908504047265132e-7,-1.166920436817794e-14,2.167870920837084e-7,\n                                                   3.324573141551754e-15,-3.389492848693518e-20},\n                                                  {-4.655117952410868e-26,1.760113549929938e-19,5.591385902277326e-15,\n                                                   -2.167870920837084e-7,-6.819664890476553e-15,1.729362738800068e-7,\n                                                   2.206673847545969e-15},{-5.699943000644617e-31,-8.104507472622729e-27,\n                                                   6.851232700999452e-20,3.324573141551754e-15,-1.729362738800068e-7,\n                                                   -4.488155526206657e-15,1.438916775835208e-7},\n                                                  {3.642203639753081e-38,-8.255868930785952e-32,-2.624848474543445e-27,\n                                                   3.389492848693518e-20,2.206673847545969e-15,-1.438916775835208e-7,\n                                                   -3.182510282217673e-15}};\n        const auto n = 13;\n        for(auto l : {1 << (n - 1)}) {\n          const auto tr = tg.rnlij(n, l);\n          for (auto i = 0; i != k; ++i) {\n            for (auto j = 0; j != k; ++j) {\n              const double (*exact_values)[k] = nullptr;\n              if (n == 13) {\n                if (l == (1 << (n - 1)))\n                  exact_values = tr_n13_l_ref_values;\n              }\n              const auto exact_tr = exact_values ? exact_values[i][j] : 0.0;\n              err = abs(tr(i,j) - exact_tr);\n              if (log_errors && err >= err_tolerance) {\n                cout << a << \" \" << n << \" \" << l << \" \" << i << \" \" << j\n                     << \" \" << exact_tr << \" \" << tr(i, j) << \" \" << err\n                     << endl;\n              }\n              maxerr = max(maxerr, err);\n            }\n          }\n        }\n\n      }\n\n      return (maxerr < err_tolerance);\n  }\n\nMADNESS_PRAGMA_CLANG(diagnostic pop)\nMADNESS_PRAGMA_GCC(diagnostic pop)\n\n}  // namespace madness\n"
  },
  {
    "path": "src/madness/mra/test_tree_state.cc",
    "content": "//\n// Created by Florian Bischoff on 9/28/23.\n//\n\n#include<madness.h>\n#include<test_utilities.h>\n\n\nusing namespace madness;\n\n\nint test_conversion(World& world) {\n    real_function_2d f=real_factory_2d(world).functor([](const coord_2d& r) {return exp(-r.normf());});\n    real_function_2d f1=real_factory_2d(world).functor([](const coord_2d& r) {return exp(-inner(r,r));});\n    real_function_2d f2=real_factory_2d(world).functor([](const coord_2d& r) {return inner(r,r)*exp(-2.0*r.normf());});\n\n    real_function_2d f3=copy(f2);\n    f3.get_impl()->gaxpy_inplace_reconstructed(1.0,*f1.get_impl(),1.0,false);\n    real_function_2d f3ref=real_factory_2d(world).functor([](const coord_2d& r) {return inner(r,r)*exp(-2.0*r.normf()) + exp(-inner(r,r));});\n    double f3norm=f3ref.norm2();\n    MADNESS_CHECK_THROW(f3.get_impl()->verify_tree_state_local(),\"tree state get_tree_state(is invalid\");\n    MADNESS_CHECK_THROW(get_tree_state(f3)==redundant_after_merge,\"tree state is invalid\");\n\n    f.print_size(\"f\");\n    f.reconstruct();\n    double fnorm=f.norm2();\n    // double f1norm=f1.norm2();\n    std::vector<real_function_2d> vf={f1,f2,f1};\n    std::vector<double> vfnorm=norm2s(world,vf);\n    real_function_2d ref;\n    double norm=fnorm;\n\n    std::vector<TreeState> states={reconstructed,\t\t\t\t///< s coeffs at the leaves only\n                                   compressed, \t\t\t\t///< d coeffs in internal nodes, s and d coeffs at the root\n                                   nonstandard, \t\t\t\t///< s and d coeffs in internal nodes\n                                   nonstandard_with_leaves, \t///< like nonstandard, with s coeffs at the leaves\n                                   redundant};//,\t\t\t\t\t///< s coeffs everywhere\n    std::vector<TreeState> additional_states={redundant_after_merge};\n\n    long k=FunctionDefaults<2>::get_k();\n\n\n\n    // check on node coeffs size and return the norm\n    auto check_nodes_have_coeffs = [](const real_function_2d& arg, const long k, const bool do_leaf) {\n        bool correct_k=true;\n        double norm=0.0;\n        for (const auto& datum : arg.get_impl()->get_coeffs()) {\n            const auto& node=datum.second;\n            if (do_leaf == node.is_leaf()) {\n                if (k>0) correct_k = correct_k and (node.has_coeff() and node.coeff().dim(0)==k);\n                if (node.has_coeff()) norm+=std::pow(node.coeff().normf(),2);\n            }\n        }\n        return std::make_pair(correct_k, sqrt(norm));\n    };\n\n    auto check_is_reconstructed = [&](const real_function_2d& arg) {\n        auto [correct_k_leaf, norm_leaf]=check_nodes_have_coeffs(arg,k,true);\n        auto [correct_k_interior, norm_interior]=check_nodes_have_coeffs(arg,0,false);\n        bool correct_norm=(std::abs(norm_leaf-norm)<1.e-10) and (std::abs(norm_interior)<1.e-10);\n        return correct_k_interior and correct_k_leaf and correct_norm and (arg.tree_size()==ref.tree_size());\n    };\n\n    auto check_is_compressed = [&](const real_function_2d& arg) {\n        auto [correct_k_leaf, norm_leaf]=check_nodes_have_coeffs(arg,0,true);\n        auto [correct_k_interior, norm_interior]=check_nodes_have_coeffs(arg,2*k,false);\n        bool correct_norm=(std::abs(norm_leaf)<1.e-10) and (std::abs(norm_interior-norm)<1.e-10);\n        return correct_k_interior and correct_k_leaf and correct_norm and (arg.tree_size()==ref.tree_size());\n    };\n\n    auto check_is_nonstandard = [&](const real_function_2d& arg) {\n        auto [correct_k_leaf, norm_leaf]=check_nodes_have_coeffs(arg,0,true);\n        auto [correct_k_interior, norm_interior]=check_nodes_have_coeffs(arg,2*k,false);\n        bool correct_norm=norm_leaf<1.e-12;\n        return correct_k_interior and correct_k_leaf and correct_norm and (arg.tree_size()==ref.tree_size());\n    };\n\n    auto check_is_nonstandard_with_leaves = [&](const real_function_2d& arg) {\n        auto [correct_k_leaf, norm_leaf]=check_nodes_have_coeffs(arg,k,true);\n        auto [correct_k_interior, norm_interior]=check_nodes_have_coeffs(arg,2*k,false);\n        bool correct_norm=(std::abs(norm_leaf-norm)<1.e-10);\n        return correct_k_interior and correct_k_leaf and correct_norm and (arg.tree_size()==ref.tree_size());\n    };\n\n    auto check_is_redundant = [&](const real_function_2d& arg) {\n        auto [correct_k_leaf, norm_leaf]=check_nodes_have_coeffs(arg,k,true);\n        auto [correct_k_interior, norm_interior]=check_nodes_have_coeffs(arg,k,false);\n        bool correct_norm=(std::abs(norm_leaf-norm)<1.e-10);\n        return correct_k_interior and correct_k_leaf and correct_norm and (arg.tree_size()==ref.tree_size());\n    };\n\n    auto check_tree_state = [&](const real_function_2d& arg, const TreeState state) {\n        MADNESS_CHECK_THROW(arg.get_impl()->verify_tree_state_local(),\"tree state is invalid\");\n        if (state==reconstructed) return check_is_reconstructed(arg);\n        if (state==compressed) return check_is_compressed(arg);\n        if (state==nonstandard) return check_is_nonstandard(arg);\n        if (state==nonstandard_with_leaves) return check_is_nonstandard_with_leaves(arg);\n        if (state==redundant) return check_is_redundant(arg);\n        print(\"unknown state\");\n        return false;\n    };\n\n    auto vector_check_tree_state = [&](const std::vector<real_function_2d>& arg, const TreeState state) {\n        for (size_t i=0; i<arg.size(); ++i) {\n            ref=vf[i];\n            norm=vfnorm[i];\n            auto a=arg[i];\n            bool ok=check_tree_state(a,state);\n            if (not ok) return false;\n        }\n        return true;\n    };\n\n    print(\"f is reconstructed      \", check_is_reconstructed(f));\n    print(\"f is compressed         \", check_is_compressed(f));\n    print(\"f is nonstandard        \", check_is_nonstandard(f));\n    print(\"f is nonstandard_leaves \", check_is_nonstandard_with_leaves(f));\n    print(\"f is redundant          \", check_is_redundant(f));\n\n    test_output t(\"testing tree state conversion\");\n    t.set_cout_to_terminal();\n\n    // convert from all redundant_after_merge state to reconstructed\n    for (const auto& ff : {f3}) {\n        ref=f3ref;\n        norm=f3norm;\n        auto fcopy=copy(ff);\n        std::stringstream ss_initial;\n        ss_initial << get_tree_state(fcopy);\n        fcopy=change_tree_state(fcopy,reconstructed);\n        world.gop.fence();\n        bool success=check_tree_state(fcopy,reconstructed);\n        t.checkpoint(success,\"conversion to reconstructed from \"+ss_initial.str());\n    }\n    norm=fnorm;\n\n\n\n    ref=f;\n    // convert to all states from reconstructed\n    for (auto state : states) {\n        auto fcopy=copy(f);\n        fcopy.change_tree_state(state);\n        bool success=check_tree_state(fcopy,state);\n        std::stringstream ss_initial;\n        ss_initial << state;\n        t.checkpoint(success,\"conversion from reconstructed to \"+ss_initial.str());\n        print(\"f is\",state, check_tree_state(fcopy,state));\n    }\n\n    for (auto initial_state : states) {\n        auto fcopy=copy(f);\n        fcopy.change_tree_state(initial_state);\n        bool success=check_tree_state(fcopy,initial_state);\n        std::stringstream ss_initial;\n        ss_initial << initial_state;\n        t.checkpoint(success,\"initial conversion from reconstructed to \"+ss_initial.str());\n        for (auto final_state : states) {\n            auto ffcopy=copy(fcopy);\n            MADNESS_CHECK(ffcopy.get_impl()->get_tree_state()==initial_state);\n            ffcopy.change_tree_state(final_state);\n            success=check_tree_state(ffcopy,final_state);\n            std::stringstream ss_final;\n            ss_final << final_state;\n            t.checkpoint(success,\"conversion from \"+ss_initial.str()+\" to \"+ss_final.str());\n        }\n    }\n\n\n    print_header2(\"testing vector tree state conversion\");\n    // repeat for vectors of functions\n\n\n\n    // convert to all states from reconstructed\n    for (auto state : states) {\n        auto fcopy=copy(world,vf);\n        fcopy=change_tree_state(fcopy,state,false);\n        world.gop.fence();\n        bool success=vector_check_tree_state(fcopy,state);\n        std::stringstream ss_initial;\n        ss_initial << state;\n        t.checkpoint(success,\"conversion from reconstructed to \"+ss_initial.str());\n        print(\"f is\",state, vector_check_tree_state(fcopy,state));\n    }\n\n    for (auto initial_state : states) {\n        auto fcopy=copy(world,vf);\n        change_tree_state(fcopy,initial_state);\n        bool success=vector_check_tree_state(fcopy,initial_state);\n        std::stringstream ss_initial;\n        ss_initial << initial_state;\n        t.checkpoint(success,\"initial conversion from reconstructed to \"+ss_initial.str());\n        for (auto final_state : states) {\n            auto ffcopy=copy(world,fcopy);\n//            MADNESS_CHECK(ffcopy.get_impl()->get_tree_state()==initial_state);\n            change_tree_state(ffcopy,final_state,false);\n            world.gop.fence();\n            success=vector_check_tree_state(ffcopy,final_state);\n            std::stringstream ss_final;\n            ss_final << final_state;\n            t.checkpoint(success,\"conversion from \"+ss_initial.str()+\" to \"+ss_final.str());\n        }\n    }\n\n\n\n    return t.end();\n\n\n}\n\n\nint main(int argc, char **argv) {\n    madness::World& world = madness::initialize(argc, argv);\n    startup(world, argc, argv);\n    FunctionDefaults<2>::set_thresh(1.e-6);\n    FunctionDefaults<2>::set_k(6);\n    FunctionDefaults<2>::set_cubic_cell(-20,20);\n\n    int success = 0;\n\n    success+=test_conversion(world);\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/mra/test_vectormacrotask.cc",
    "content": "/**\n \\file test_vectormacrotask.cc\n \\brief Tests the \\c MacroTaskQ and MacroTask classes\n \\ingroup mra\n\n For more information also see macrotask.h\n\n The user defines a macrotask (an example is found in test_vectormacrotask.cc), the tasks are\n lightweight and carry only bookkeeping information, actual input and output are stored in a\n cloud (see cloud.h)\n\n The user-defined MacroTask is derived from MacroTaskOperationBase and must implement the call operator\n method. A heterogeneous task queue is possible.\n\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/world/cloud.h>\n#include <madness/mra/macrotaskq.h>\n#include <madness/world/world.h>\n#include <madness/world/timing_utilities.h>\n#include <madness/mra/macrotaskpartitioner.h>\n\n#include \"test_utilities.h\"\n\n\nusing namespace madness;\nusing namespace archive;\n\nstruct slater {\n    double a=1.0;\n\n    slater(double aa) : a(aa) {}\n\n    template<std::size_t NDIM>\n    double operator()(const Vector<double,NDIM> &r) const {\n        double x = inner(r,r);\n        return exp(-a *sqrt(x));\n    }\n};\n\nstruct gaussian {\n    double a;\n\n    gaussian() : a() {};\n\n    gaussian(double aa) : a(aa) {}\n\n    template<std::size_t NDIM>\n    double operator()(const Vector<double,NDIM> &r) const {\n        double r2 = inner(r,r);\n        return exp(-a * r2);//*abs(sin(abs(2.0*x))) *cos(y);\n    }\n};\n\n\n\ntemplate<typename T, std::size_t NDIM>\nclass MicroTask : public MacroTaskOperationBase {\npublic:\n    // you need to define the exact argument(s) of operator() as tuple\n    typedef std::tuple<const Function<T,NDIM> &, const double &,\n            const std::vector<Function<T,NDIM>> &> argtupleT;\n\n    // you need to define the result type\n    // resultT must implement gaxpy(alpha, result, beta, contribution)\n    // with resultT result, contribution;\n    using resultT = std::vector<Function<T,NDIM>>;\n\n    // you need to define an empty constructor for the result\n    resultT allocator(World &world, const argtupleT &argtuple) const {\n        std::size_t n = std::get<2>(argtuple).size();\n        resultT result = zero_functions_auto_tree_state<T,NDIM>(world, n);\n        return result;\n    }\n\n    resultT operator()(const Function<T,NDIM> &f1, const double &arg2,\n                       const std::vector<Function<T,NDIM>> &f2) const {\n        World& world=f1.world();\n        if (world.rank()==0) print(\"in MicroTask\");\n        SeparatedConvolution<double,NDIM> op=BSHOperator<NDIM>(world,0,1.e-4,1.e-5);\n        return arg2 * f1 * apply(world,op,f2);\n    }\n};\n\n\nclass MicroTask1 : public MacroTaskOperationBase{\npublic:\n    // you need to define the result type\n    // resultT must implement gaxpy(alpha, result, beta, contribution)\n    // with resultT result, contribution;\n    typedef real_function_3d resultT;\n\n    // you need to define the exact argument(s) of operator() as tuple\n    typedef std::tuple<const real_function_3d &, const double &,\n            const std::vector<real_function_3d> &> argtupleT;\n\n    resultT allocator(World &world, const argtupleT &argtuple) const {\n        resultT result = real_factory_3d(world).compressed();\n        return result;\n    }\n\n    resultT operator()(const real_function_3d &f1, const double &arg2,\n                       const std::vector<real_function_3d> &f2) const {\n        auto result = arg2 * f1 * inner(f2, f2);\n        return result;\n    }\n};\n\nclass MicroTask2 : public MacroTaskOperationBase{\npublic:\n    // you need to define the result type\n    // resultT must implement gaxpy(alpha, result, beta, contribution)\n    // with resultT result, contribution;\n    typedef std::vector<real_function_3d> resultT;\n\n    // you need to define the exact argument(s) of operator() as tuple\n    typedef std::tuple<const std::vector<real_function_3d> &, const double &,\n            const std::vector<real_function_3d> &> argtupleT;\n\n    resultT allocator(World &world, const argtupleT &argtuple) const {\n        std::size_t n = std::get<2>(argtuple).size();\n        resultT result = zero_functions_compressed<double, 3>(world, n);\n        return result;\n    }\n\n    resultT operator()(const std::vector<real_function_3d>& f1, const double &arg2,\n                       const std::vector<real_function_3d>& f2) const {\n        // World &world = f1[0].world();\n        // // won't work because of nested loop over f1\n        // if (batch.input[0]==batch.input[1]) {\n        //     return arg2 * f1 * inner(f1,f2);\n        // }\n\n        // // won't work because result batches are the same as f1 batches\n        // return arg2*f2*inner(f1,f1);\n\n        // will work\n        return arg2*f1*inner(f2,f2);\n\n    }\n};\n\nclass VectorOfScalarTask : public MacroTaskOperationBase{\npublic:\n    // you need to define the result type\n    // resultT must implement gaxpy(alpha, result, beta, contribution)\n    // with resultT result, contribution;\n    typedef std::vector<ScalarResult<double>> resultT;\n\n    // you need to define the exact argument(s) of operator() as tuple\n    typedef std::tuple<const std::vector<real_function_3d> &, const double &,\n            const std::vector<real_function_3d> &> argtupleT;\n\n    resultT allocator(World &world, const argtupleT &argtuple) const {\n        std::size_t n = std::get<0>(argtuple).size();\n        return scalar_result_vector<double>(world,n);\n    }\n\n    resultT operator()(const std::vector<real_function_3d>& f1, const double &arg2,\n                       const std::vector<real_function_3d>& f2) const {\n        World &world = f1[0].world();\n        auto result=scalar_result_vector<double>(world,f1.size());\n        for (std::size_t i=0; i<f1.size(); ++i) result[i]=double(i+batch.input[0].begin);\n\n        return result;\n    }\n};\n\nclass ScalarTask : public MacroTaskOperationBase{\npublic:\n    // you need to define the result type\n    // resultT must implement gaxpy(alpha, result, beta, contribution)\n    // with resultT result, contribution;\n    // typedef std::shared_ptr<ScalarResultImpl<double>> resultT;\n    typedef ScalarResult<double> resultT;\n\n    // you need to define the exact argument(s) of operator() as tuple\n    typedef std::tuple<const std::vector<real_function_3d> &> argtupleT;\n\n    resultT allocator(World &world, const argtupleT &argtuple) const {\n        return resultT(world);\n    }\n\n    resultT operator()(const std::vector<real_function_3d>& f1) const {\n        World &world = f1[0].world();\n        resultT result(world);\n        result=double(f1.size());\n        return result;\n    }\n};\n\nclass TupleTask : public MacroTaskOperationBase{\npublic:\n    // you need to define the result type\n    // resultT must implement gaxpy(alpha, result, beta, contribution)\n    // with resultT result, contribution;\n    typedef std::tuple<vector_real_function_3d,vector_real_function_3d> resultT;\n\n    // you need to define the exact argument(s) of operator() as tuple\n    typedef std::tuple<const std::vector<real_function_3d> &> argtupleT;\n\n    resultT allocator(World &world, const argtupleT &argtuple) const {\n        std::size_t n=std::get<0>(argtuple).size();\n        auto v1=zero_functions_compressed<double,3>(world,n);\n        auto v2=zero_functions_compressed<double,3>(world,n);\n        return std::make_tuple(v1,v2);\n    }\n\n    resultT operator()(const std::vector<real_function_3d>& f1) const {\n        World &world = f1[0].world();\n        auto result1=copy(world,f1);\n        auto result2=f1+f1;\n        auto result=std::make_tuple(result1,result2);\n        return result;\n    }\n};\n\n/// this task won't do anything, is mostly to check if the combinations compile\ntemplate<typename elementT, typename elementR>\nclass MixedTupleTask : public MacroTaskOperationBase{\npublic:\n    // you need to define the result type\n    // resultT must implement gaxpy(alpha, result, beta, contribution)\n    // with resultT result, contribution;\n    typedef std::tuple<elementT,elementR> resultT;\n\n    // you need to define the exact argument(s) of operator() as tuple\n    typedef std::tuple<const std::vector<real_function_3d> &> argtupleT;\n\n    // some allocators\n    template<typename T>\n    typename std::enable_if<std::is_same<T, Function<double,3>>::value, T>::type\n    allocator(World& world, std::size_t n) const {\n        return Function<double,3>(world);\n    }\n\n    template<typename T>\n    typename std::enable_if<std::is_same<T, std::vector<real_function_3d>>::value, T>::type\n    allocator(World& world, std::size_t n) const {\n        return zero_functions_compressed<double,3>(world,n);\n    }\n\n    template<typename T>\n    typename std::enable_if<std::is_same<T, std::vector<ScalarResult<double>>>::value, T>::type\n    allocator(World& world, std::size_t n) const {\n        return scalar_result_vector<double>(world,n);\n    }\n\n    template<typename T>\n    typename std::enable_if<std::is_same<T, ScalarResult<double>>::value, T>::type\n    allocator(World& world, std::size_t n) const {\n        return ScalarResult<double>(world);\n    }\n\n    resultT allocator(World &world, const argtupleT &argtuple) const {\n        std::size_t n=std::get<0>(argtuple).size();\n        auto v1=allocator<elementT>(world,n);\n        auto v2=allocator<elementR>(world,n);\n        return std::make_tuple(v1,v2);\n    }\n\n    resultT operator()(const std::vector<real_function_3d>& f1) const {\n        World &world = f1[0].world();\n        std::size_t n=f1.size();\n        auto v1=allocator<elementT>(world,n);\n        auto v2=allocator<elementR>(world,n);\n        return std::make_tuple(v1,v2);\n    }\n};\n\n\n\ntemplate<typename T, std::size_t NDIM>\nint check_vector(World& universe, const std::vector<Function<T,NDIM>> &ref,\n                    const std::vector<Function<T,NDIM>> &test,\n                    const std::string msg) {\n    double norm_ref = norm2(universe, ref);\n    double norm_test = norm2(universe, test);\n    double error = norm2(universe, ref - test);\n    bool success = error/norm_ref < 1.e-10;\n    if (universe.rank() == 0) {\n        print(\"norm ref, test, diff\", norm_ref, norm_test, error);\n        if (success) print(\"test\", msg, \" \\033[32m\", \"passed \", \"\\033[0m\");\n        else print(\"test\", msg, \" \\033[31m\", \"failed \\033[0m \");\n    }\n    return (success) ? 0 : 1;\n};\n\n\nint check(World& universe, const double &ref, const double &test, const std::string msg) {\n    double error = (ref - test);\n    bool success = error/ref < 1.e-10;\n    if (universe.rank() == 0) {\n                print(\"norm ref, test, diff\", ref, test, error);\n        if (success) print(\"test\", msg, \" \\033[32m\", \"passed \", \"\\033[0m\");\n        else print(\"test\", msg, \" \\033[31m\", \"failed \\033[0m \");\n    }\n    return (success) ? 0 : 1;\n}\n\nint check(World& universe, const real_function_3d &ref, const real_function_3d &test, const std::string msg) {\n    double norm_ref = ref.norm2();\n    double norm_test = test.norm2();\n    double error = (ref - test).norm2();\n    bool success = error/norm_ref < 1.e-10;\n    if (universe.rank() == 0) {\n                print(\"norm ref, test, diff\", norm_ref, norm_test, error);\n        if (success) print(\"test\", msg, \" \\033[32m\", \"passed \", \"\\033[0m\");\n        else print(\"test\", msg, \" \\033[31m\", \"failed \\033[0m \");\n    }\n    return (success) ? 0 : 1;\n};\n\ntemplate<typename T, std::size_t NDIM>\nint test_immediate(World& universe, const std::vector<Function<T,NDIM>>& v3,\n                   const std::vector<Function<T,NDIM>>& ref) {\n    test_output t1(\"testing immediate execution\",universe.rank()==0);\n    // t1.set_cout_to_terminal();\n    for (std::string preset : MacroTaskInfo::get_all_preset_names()) {\n        MicroTask<T,NDIM> t;\n        MacroTask task_immediate(universe, t, MacroTaskQFactory(universe).preset(preset));\n        task_immediate.set_debug(true);\n        std::vector<Function<T,NDIM>> v = task_immediate(v3[0], 2.0, v3);\n        double error=norm2(universe, v-ref);\n        std::stringstream ss;\n        ss << \"immediate execution -- storage policy \" << preset;\n        t1.checkpoint(error,1.e-10,ss.str());\n    }\n    return t1.end();\n}\n\nint test_deferred(World& universe, const std::vector<real_function_3d>& v3,\n                   const std::vector<real_function_3d>& ref) {\n    test_output t1(\"testing deferred execution\",universe.rank()==0);\n    t1.set_cout_to_terminal();\n    for (const auto& policy_name : MacroTaskInfo::get_all_preset_names()) {\n        auto policy=MacroTaskInfo::preset(policy_name);\n        print(policy);\n        auto taskq = std::make_shared<MacroTaskQ>(MacroTaskQFactory(universe).set_policy(policy));\n        taskq->set_printlevel(20);\n        MicroTask<double,3> t;\n        MacroTask task(universe, t, taskq);\n        task.set_debug(true);\n        std::vector<real_function_3d> f2a = task(v3[0], 2.0, v3);\n        taskq->print_taskq();\n        // auto [global_size,global_memsize,min_memsize,max_memsize,max_record_size]=taskq->cloud.get_size(universe);\n        nlohmann::json stats=taskq->cloud.gather_memory_statistics(universe);\n        double global_memsize=stats[\"memory_global_GB\"].template get<double>();\n        double byte2gbyte=1.0/(1024*1024*1024);\n\n\n        if (policy.storage_policy==MacroTaskInfo::StoreFunction) {\n            t1.checkpoint(global_memsize>1.e3*byte2gbyte,\"cloud global memory size > 1 kB\");\n        } else if (policy.storage_policy==MacroTaskInfo::StoreFunctionViaPointer) {\n            t1.checkpoint(global_memsize<1.e3*byte2gbyte,\"cloud global memory size < 1 kB\");\n        }\n        taskq->run_all();\n        taskq->cloud.print_timings(taskq->cloud.gather_timings(universe));\n        taskq->cloud.clear_timings();\n        double error=norm2(universe, f2a-ref);\n        std::stringstream ss;\n        ss << \"deferred execution -- storage policy \" << policy_name;\n        t1.checkpoint(error,1.e-9,ss.str());\n    }\n    return t1.end();\n}\n\nint test_twice(World& universe, const std::vector<real_function_3d>& v3,\n                  const std::vector<real_function_3d>& ref) {\n    if (universe.rank() == 0) print(\"\\nstarting Microtask twice (check caching)\\n\");\n    MacroTaskInfo largemem=MacroTaskInfo::preset(\"large_memory\");\n    auto taskq = std::shared_ptr<MacroTaskQ>(new MacroTaskQ(MacroTaskQFactory(universe).set_policy(largemem)));\n    taskq->set_printlevel(3);\n    MicroTask<double,3> t;\n    MacroTask task(universe, t, taskq);\n    std::vector<real_function_3d> f2a1 = task(v3[0], 2.0, v3);\n    std::vector<real_function_3d> f2a2 = task(v3[0], 2.0, v3);\n    taskq->print_taskq();\n    taskq->run_all();\n    taskq->cloud.print_timings(taskq->cloud.gather_timings(universe));\n    int success=0;\n    success += check_vector(universe, ref, f2a1, \"taske twice a\");\n    success += check_vector(universe, ref, f2a2, \"taske twice b\");\n    return success;\n}\n\nint test_task1(World& universe, const std::vector<real_function_3d>& v3) {\n    if (universe.rank()==0) print(\"\\nstarting Microtask1\\n\");\n    MicroTask1 t1;\n    real_function_3d ref_t1 = t1(v3[0], 2.0, v3);\n    MacroTask task1(universe, t1);\n    task1.set_debug(true);\n    real_function_3d ref_t2 = task1(v3[0], 2.0, v3);\n    int success = check(universe,ref_t1, ref_t2, \"task1 immediate\");\n    return success;\n}\n\n/// each task accumulates into the same result\nint test_scalar_task(World& universe, const std::vector<real_function_3d>& v3) {\n    if (universe.rank()==0) print(\"\\nstarting ScalarTask\\n\");\n    ScalarTask t1;\n    ScalarResult<double> result = t1(v3);\n    double ref_t1=result.get();\n    print(\"result reference\",ref_t1);\n\n    MacroTask task1(universe, t1);\n    auto result2= task1(v3);\n    double result_t1=result2.get();\n    print(\"result macro\",result_t1);\n\n    int success = check(universe,ref_t1, result_t1, \"ScalarTask\");\n    return success;\n}\n\n\nint test_vector_of_scalar_task(World& universe, const std::vector<real_function_3d>& v3) {\n    if (universe.rank()==0) print(\"\\nstarting VectorOfScalarTask\\n\");\n    VectorOfScalarTask t1;\n    std::vector<ScalarResult<double>> result = t1(v3, 2.0, v3);\n\n    MacroTask task1(universe, t1);\n    auto result2= task1(v3, 2.0, v3);\n\n    double error=1.e-15;\n    for (std::size_t i=0; i<result.size(); ++i) error+=fabs(result[i].get()-result2[i].get());\n    int success = check(universe,1.e-15, error, \"vector of scalar task\");\n    return success;\n}\n\n/// each task accumulates into the same result\nint test_tuple_of_vectors(World& universe, const std::vector<real_function_3d>& v3) {\n    if (universe.rank()==0) print(\"\\nstarting TupleOfVectorsTask\\n\");\n    TupleTask t1;\n    auto [ref1,ref2]=t1(v3);\n    double n1=norm2(universe,ref1);\n    double n2=norm2(universe,ref2);\n    print(\"result reference\",n1,n2);\n\n\n    MacroTask task1(universe, t1);\n    auto [res1,res2] = task1(v3);\n    double m1=norm2(universe,res1);\n    double m2=norm2(universe,res2);\n    print(\"result macro\",m1,m2);\n\n    int success = check(universe,n1,m1, \"task1 immediate\");\n    return success;\n}\n\n\n// this will only test compilation\nint test_mixed_tuple(World& universe, const std::vector<real_function_3d>& v3) {\n    if (universe.rank()==0) print(\"\\nstarting MixedTupleTask\\n\");\n\n    typedef real_function_3d type1;\n    typedef std::vector<real_function_3d> type2;\n    typedef ScalarResult<double> type3;\n    typedef std::vector<ScalarResult<double>> type4;\n    MixedTupleTask<type1,type1> t11;\n    MixedTupleTask<type1,type2> t12;\n    MixedTupleTask<type1,type3> t13;\n    MixedTupleTask<type1,type4> t14;\n    MixedTupleTask<type2,type1> t21;\n    MixedTupleTask<type2,type2> t22;\n    MixedTupleTask<type2,type3> t23;\n    MixedTupleTask<type2,type4> t24;\n    MixedTupleTask<type3,type1> t31;\n    MixedTupleTask<type3,type2> t32;\n    MixedTupleTask<type3,type3> t33;\n    MixedTupleTask<type3,type4> t34;\n    MixedTupleTask<type4,type1> t41;\n    MixedTupleTask<type4,type2> t42;\n    MixedTupleTask<type4,type3> t43;\n    MixedTupleTask<type4,type4> t44;\n    auto result11=t11(v3);\n    auto result12=t12(v3);\n    auto result13=t13(v3);\n    auto result14=t14(v3);\n    auto result21=t21(v3);\n    auto result22=t22(v3);\n    auto result23=t23(v3);\n    auto result24=t24(v3);\n    auto result31=t31(v3);\n    auto result32=t32(v3);\n    auto result33=t33(v3);\n    auto result34=t34(v3);\n    auto result41=t41(v3);\n    auto result42=t42(v3);\n    auto result43=t43(v3);\n    auto result44=t44(v3);\n    return 0;\n}\n\nint test_2d_partitioning(World& universe, const std::vector<real_function_3d>& v3) {\n    if (universe.rank() == 0) print(\"\\nstarting 2d partitioning\");\n    auto policy=MacroTaskInfo::preset(\"large_memory\");\n    auto taskq = std::shared_ptr<MacroTaskQ>(new MacroTaskQ(MacroTaskQFactory(universe).set_policy(policy)));\n    taskq->set_printlevel(3);\n    MicroTask2 t;\n    auto ref=t(v3,2.0,v3);\n    t.partitioner->set_dimension(2);\n    MacroTask task(universe, t, taskq);\n    std::vector<real_function_3d> f2a = task(v3, 2.0, v3);\n    taskq->print_taskq();\n    taskq->run_all();\n    taskq->cloud.print_timings(taskq->cloud.gather_timings(universe));\n    taskq->cloud.clear_timings();\n    int success=check_vector(universe,ref,f2a,\"test 2d partitioning\");\n    return success;\n}\n\nint main(int argc, char **argv) {\n    madness::World &universe = madness::initialize(argc, argv);\n    startup(universe, argc, argv, true);\n    FunctionDefaults<3>::set_thresh(1.e-5);\n    FunctionDefaults<3>::set_k(9);\n    FunctionDefaults<3>::set_cubic_cell(-20,20);\n\n    int success = 0;\n\n    universe.gop.fence();\n    int nworld = universe.size();\n    if (universe.rank() == 0) print(\"creating nworld\", nworld, universe.id());\n\n    {\n        // execution in a taskq, result will be complete only after the taskq is finished\n        real_function_3d f1 = real_factory_3d(universe).functor(slater(1.0));\n        real_function_3d i2 = real_factory_3d(universe).functor(slater(2.0));\n        real_function_3d i3 = real_factory_3d(universe).functor(slater(2.0));\n        std::vector<real_function_3d> v3;\n        for (int i=0; i<20; ++i) v3.push_back(real_factory_3d(universe).functor(slater(sqrt(double(i)))));\n\n        // test a low-rank vector\n        FunctionDefaults<2>::set_tensor_type(TT_2D);\n        std::vector<real_function_2d> v2;\n        for (int i=0; i<20; ++i) v2.push_back(real_factory_2d(universe).functor(slater(sqrt(double(i)))));\n\n        timer timer1(universe);\n        MicroTask<double,3> t;\n        std::vector<real_function_3d> ref3 = t(v3[0], 2.0, v3);\n        timer1.tag(\"direct execution\");\n\n        MicroTask<double,2> t2;\n        std::vector<real_function_2d> ref2 = t2(v2[0], 2.0, v2);\n        timer1.tag(\"direct execution low-rank\");\n\n        // success+=test_immediate<double,3>(universe,v3,ref3);\n        // timer1.tag(\"immediate taskq execution\");\n\n        success+=test_immediate<double,2>(universe,v2,ref2);\n        timer1.tag(\"immediate taskq execution with low-rank tensors\");\n\n        success+=test_scalar_task(universe,v3);\n        timer1.tag(\"scalar task execution\");\n\n        success+=test_vector_of_scalar_task(universe,v3);\n        timer1.tag(\"vector of scalar task execution\");\n\n        success+=test_tuple_of_vectors(universe,v3);\n        timer1.tag(\"vector of tuples task execution\");\n\n        success+=test_mixed_tuple(universe,v3);\n        timer1.tag(\"mixed tuple task execution\");\n\n        success+=test_deferred(universe,v3,ref3);\n        timer1.tag(\"deferred taskq execution\");\n\n        success+=test_twice(universe,v3,ref3);\n        timer1.tag(\"executing a task twice\");\n\n        success+=test_task1(universe,v3);\n        timer1.tag(\"task1 immediate execution\");\n\n        success+=test_2d_partitioning(universe,v3);\n        timer1.tag(\"2D partitioning\");\n\n        if (universe.rank() == 0) {\n            if (success==0) print(\"\\n --> all tests \\033[32m\", \"passed \", \"\\033[0m\\n\");\n            else print(\"\\n --> all tests \\033[31m\", \"failed \\033[0m \\n\");\n        }\n    }\n\n    madness::finalize();\n    return success;\n}\n\ntemplate<> volatile std::list<detail::PendingMsg> WorldObject<MacroTaskQ>::pending = std::list<detail::PendingMsg>();\ntemplate<> Spinlock WorldObject<MacroTaskQ>::pending_mutex(0);\n\n//template <> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<long, MacroTask, madness::Hash<long> > >::pending = std::list<detail::PendingMsg>();\n//template <> Spinlock WorldObject<WorldContainerImpl<long, MacroTask, madness::Hash<long> > >::pending_mutex(0);\n\ntemplate<> volatile std::list<detail::PendingMsg> WorldObject<WorldContainerImpl<long, std::vector<unsigned char>, madness::Hash<long> > >::pending = std::list<detail::PendingMsg>();\ntemplate<> Spinlock WorldObject<WorldContainerImpl<long, std::vector<unsigned char>, madness::Hash<long> > >::pending_mutex(\n        0);\n"
  },
  {
    "path": "src/madness/mra/testbc.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file testbsh.cc\n/// \\brief test the bsh operator\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/tensor/solvers.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n\ntypedef std::shared_ptr< WorldDCPmapInterface< Key<3> > > pmapT;\ntypedef Vector<double,3> coordT;\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\ntypedef Function<double,3> functionT;\ntypedef std::vector<functionT> vecfuncT;\ntypedef std::pair<vecfuncT,vecfuncT> pairvecfuncT;\ntypedef std::vector<pairvecfuncT> subspaceT;\ntypedef Tensor<double> tensorT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef SeparatedConvolution<double,3> operatorT;\ntypedef std::shared_ptr<operatorT> poperatorT;\n\n// The delta fn approx is (1/sqrt(2*pi*s^2))*exp(-x^2 / (2*s^2))\n\nclass Sphere : public FunctionFunctorInterface<double,3> {\npublic:\n    const coordT center;\n    const double radius;\n    const double sigma;\n    const double expnt;\n    const double norm;\n\n    Sphere(const coordT& center, double radius, double sigma)\n        : center(center)\n        , radius(radius)\n        , sigma(sigma)\n        , expnt(0.5/(sigma*sigma))\n        , norm(1.0/(sigma*sqrt(2.0*constants::pi)))\n    {}\n\n    double operator()(const coordT& x) const {\n        double xx = (x[0]-center[0]);\n        double yy = (x[1]-center[1]);\n        double zz = (x[2]-center[2]);\n        double r = sqrt(xx*xx + yy*yy + zz*zz);\n        double dist = r - radius; // Normal distance from boundary\n        double arg = dist*dist*expnt; // Argument to exponential\n        if (arg > 35.0)\n            return 0.0;\n        else\n            return norm*exp(-arg);\n    }\n};\n\n\nclass DSphere : public FunctionFunctorInterface<double,3> {\npublic:\n    const coordT center;\n    const double radius;\n    const double sigma;\n    const double expnt;\n    const double norm;\n\n    DSphere(const coordT& center, double radius, double sigma)\n        : center(center)\n        , radius(radius)\n        , sigma(sigma)\n        , expnt(0.5/(sigma*sigma))\n        , norm(1.0/(sigma*sqrt(2.0*constants::pi)))\n    {}\n\n    double operator()(const coordT& x) const {\n        double xx = (x[0]-center[0]);\n        double yy = (x[1]-center[1]);\n        double zz = (x[2]-center[2]);\n        double r = sqrt(xx*xx + yy*yy + zz*zz);\n        double dist = r - radius; // Normal distance from boundary\n        double arg = dist*dist*expnt; // Argument to exponential\n        if (arg > 35.0)\n            return 0.0;\n        else\n            return -2.0*dist*expnt*norm*exp(-arg);\n    }\n};\n\n\nint main(int argc, char**argv) {\n    initialize(argc,argv);\n    World world(SafeMPI::COMM_WORLD);\n    try {\n        startup(world,argc,argv);\n        std::cout.precision(6);\n\n        // MADNESS simulation parameters\n        const int k = 6;\n        const double thresh = 1e-5;\n        const double L = 4.0;\n\n        // Boundary width\n        double sigma = 0.1;\n\n        // Plotting info\n        int npt = 3001;\n        coordT lo(0.0), hi(0.0);\n        lo[0] = -L;\n        hi[0] =  L;\n\n        FunctionDefaults<3>::set_cubic_cell(-L,L);\n        FunctionDefaults<3>::set_k(k);\n        FunctionDefaults<3>::set_thresh(thresh);\n        FunctionDefaults<3>::set_initial_level(3);\n        FunctionDefaults<3>::set_refine(true);\n        FunctionDefaults<3>::set_autorefine(false);\n        FunctionDefaults<3>::set_truncate_mode(1);\n        FunctionDefaults<3>::set_truncate_on_project(true);\n\n        // Inner and outer shells\n        functionT spha = factoryT(world).functor(functorT(new Sphere(coordT(0.0), 1.0, sigma)));\n        functionT sphb = factoryT(world).functor(functorT(new Sphere(coordT(0.0), 3.0, sigma)));\n\n        //functionT dspha = factoryT(world).functor(functorT(new DSphere(coordT(0.0), 1.0, sigma)));\n        //functionT dsphb = factoryT(world).functor(functorT(new DSphere(coordT(0.0), 3.0, sigma)));\n\n        print(\"inner shell norm\", spha.norm2());\n        print(\"outer shell norm\", sphb.norm2());\n\n        functionT phi = 3.0*spha + sphb;      // Delta function at the boundary\n        functionT u0 = -3.0*spha + sphb;      // The desired boundary conditions * phi\n        //functionT du0= -1.0*dspha + dsphb;  // The desired boundary conditions * phi\n        //dspha.clear(); dsphb.clear();\n        spha.clear(); sphb.clear();\n\n        phi.truncate(thresh*0.1);\n        u0.truncate(thresh*0.1);\n        //du0.truncate(thresh*0.1);\n\n        plot_line(\"phi.dat\", npt, lo, hi, phi);\n        plot_line(\"u0.dat\", npt, lo, hi, u0);\n\n        operatorT op = CoulombOperator(world, sigma*0.1, thresh);\n        // Starting values\n        double mu = 0.25;\n        functionT f = u0; //\n        //du0.clear();\n        //        functionT lambda = f;  // lambda is actually lambdaphi\n\n        functionT u; // This will be current solution\n        functionT c; // This will be the value of the constraint\n\n        for (int muiter=0; muiter<5; ++muiter) {\n            //            for (int lamiter=0; lamiter<20; ++lamiter) {\n                vecfuncT rvec;\n                vecfuncT fvec;\n                std::vector<double> rnorms;\n                tensorT Q;\n                for (int m=0; m<20; ++m) {\n                    f.truncate();\n                    fvec.push_back(f);\n                    u = op(fvec[m]);\n                    u.scale(0.25/constants::pi);\n                    u.truncate(); // Current soln\n\n                    c = u*phi - u0; // Constraint violation\n                    double cnorm = c.norm2();\n\n                    //                    rvec.push_back(fvec[m] - lambda + (phi*c)*(1.0/mu)); // Residual AugLag\n                    rvec.push_back(fvec[m] + phi*c*(1.0/mu)); // Residual QuadPen\n                    rvec.back().truncate();\n                    double rnorm = rvec[m].norm2();\n                    rnorms.push_back(rnorm);\n\n                    // Update subspace matrix\n                    tensorT Qnew(m+1,m+1);\n                    if (m>0) {\n                        Qnew(Slice(0,m-1),Slice(0,m-1)) = Q;\n                    }\n                    Q = Qnew;\n                    for (int i=0; i<=m; ++i) {\n                        Q(i,m) = fvec[i].inner(rvec[m]);\n                        if (m != i) Q(m,i) = fvec[m].inner(rvec[i]);\n                    }\n//                     print(\"Subspace matrix\");\n//                     print(Q);\n\n                    tensorT coeff = KAIN(Q);\n\n//                     print(\"Subspace solution\");\n//                     print(coeff);\n\n                    f = coeff[0]*(fvec[0]-rvec[0]);\n                    for (int i=1; i<=m; ++i) {\n                        f.gaxpy(1.0,fvec[i]-rvec[i],coeff[i]);\n                    }\n\n                    // Step restriction\n                    double snorm = (f - fvec[m]).norm2();\n                    double fnorm = fvec[m].norm2();\n\n                    if (snorm > fnorm*0.3) {\n                        double damp = fnorm*0.3/snorm;\n                        print(\"    damping\", damp);\n                        f.gaxpy(damp, fvec[m], 1.0-damp);\n                    }\n                    f.truncate();\n\n                    print(\"    iteration\", m, \"mu\", mu, \"fnorm\", fnorm, \"snorm\", snorm, \"rnorm\", rnorm, \"cnorm\", cnorm);\n\n                    if (snorm < 0.1*cnorm) {\n                        // Current solution will be in f\n                        break;\n                    }\n                }\n\n                const std::size_t bufsize=256;\n                char fname[bufsize];\n                int lamiter = 0;\n                snprintf(fname, bufsize, \"c-%2.2d-%2.2d.dat\", lamiter, muiter);\n                plot_line(fname, npt, lo, hi, c);\n                snprintf(fname, bufsize, \"u-%2.2d-%2.2d.dat\", lamiter, muiter);\n                plot_line(fname, npt, lo, hi, u);\n                snprintf(fname, bufsize, \"f-%2.2d-%2.2d.dat\", lamiter, muiter);\n                plot_line(fname, npt, lo, hi, f);\n//                 sprintf(fname, \"l-%2.2d-%2.2d.dat\", lamiter, muiter);\n//                 plot_line(fname, npt, lo, hi, lambda);\n\n//                 double damp = 1.0;\n//                 functionT lambdanew = lambda - phi* c * (damp/mu);\n\n//                 print(\"\\nupdating lambda\", lamiter, (lambdanew-lambda).norm2());\n//                 lambda = lambdanew;\n//                 lambda.truncate();\n//             }\n            mu *= 0.5;\n//             lambda = f + phi * c * (1.0/mu);\n            print(\"\\nupdating mu\", muiter, mu);\n        }\n\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n//    catch (const char* s) {\n//        print(s);\n//        error(\"caught a c-string exception\");\n//    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    world.gop.fence();\n    finalize();\n\n    return 0;\n}\n\n"
  },
  {
    "path": "src/madness/mra/testbsh.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file testbsh.cc\n/// \\brief test the bsh operator\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n\nbool smalltest = false;\n\ntemplate <typename T, std::size_t NDIM>\nclass Gaussian : public FunctionFunctorInterface<T,NDIM> {\npublic:\n    typedef Vector<double,NDIM> coordT;\n    const coordT center;\n    const double exponent;\n    const T coefficient;\n\n    Gaussian(const coordT& center, double exponent, T coefficient)\n            : center(center), exponent(exponent), coefficient(coefficient) {};\n\n    T operator()(const coordT& x) const {\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        return coefficient*exp(-exponent*sum);\n    };\n};\n\n\ndouble aa;\n\ndouble q(double r) {\n    double val;\n    if (r < 0.1e-4)\n        val = (0.2e1 * exp(0.1e1 / aa / 0.4e1) * exp(-0.1e1 / aa / 0.4e1) * sqrt(aa) / sqrt(constants::pi) + exp(0.1e1 / aa / 0.4e1) * erf(0.1e1 / sqrt(aa) / 0.2e1) - exp(0.1e1 / aa / 0.4e1) + (0.2e1 / 0.3e1 * exp(0.1e1 / aa / 0.4e1) * exp(-0.1e1 / aa / 0.4e1) * (0.1e1 / 0.2e1 - aa) * sqrt(aa) / sqrt(constants::pi) + exp(0.1e1 / aa / 0.4e1) * erf(0.1e1 / sqrt(aa) / 0.2e1) / 0.6e1 - exp(0.1e1 / aa / 0.4e1) / 0.6e1) * r * r);\n    else\n        val = ((-exp((0.1e1 + 0.4e1 * aa * r) / aa / 0.4e1) + exp(-(-0.1e1 + 0.4e1 * aa * r) / aa / 0.4e1) + exp((0.1e1 + 0.4e1 * aa * r) / aa / 0.4e1) * erf((0.2e1 * aa * r + 0.1e1) / sqrt(aa) / 0.2e1) + exp(-(-0.1e1 + 0.4e1 * aa * r) / aa / 0.4e1) * erf((-0.1e1 + 0.2e1 * aa * r) / sqrt(aa) / 0.2e1)) / r / 0.2e1);\n\n    return val / (4.0*constants::pi);\n}\n\n\n/// the result of the convolution\nstruct Qfunc : public FunctionFunctorInterface<double,3> {\n    double operator()(const Vector<double,3>& x) const {\n        double r = sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);\n        return q(r);\n    }\n};\n\ntemplate <typename T>\nint test_bsh(World& world) {\n    double mu = 1.0;\n    std::vector<long> npt(3,201l);\n    typedef Vector<double,3> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,3> > functorT;\n\n    int success=0;\n    if (world.rank() == 0)\n        print(\"Test BSH operation, type =\",\n              archive::get_type_name<T>(),\", ndim =\",3);\n\n    FunctionDefaults<3>::set_cubic_cell(-100,100);\n    FunctionDefaults<3>::set_thresh(1e-6);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_autorefine(true);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_truncate_on_project(true);\n\n    int kmin=8, kmax=8;\n    if (!smalltest) {kmin=4; kmax=12;}\n\n    for (int k=kmin; k<=kmax; k++) {\n        print(\"\\n Testing with k\", k);\n        FunctionDefaults<3>::set_k(k);\n\n        FunctionDefaults<3>::set_initial_level(6);\n        if (k >= 6) FunctionDefaults<3>::set_initial_level(5);\n\n        const coordT origin(0.0);\n        const double expnt = 100.0;\n        aa = expnt;\n        const double coeff = pow(expnt/constants::pi,1.5);\n        \n        // the input function to be convolved\n        Function<T,3> f = FunctionFactory<T,3>(world).functor(functorT(new Gaussian<T,3>(origin, expnt, coeff)));\n        f.truncate();\n        \n        double norm = f.trace();\n        double ferr = f.err(Gaussian<T,3>(origin, expnt, coeff));\n        if (world.rank() == 0) print(\"norm and error of the initial function\", norm, ferr);\n        \n        SeparatedConvolution<T,3> op = BSHOperator<3>(world, mu, 1e-4, 1e-8);\n        std::cout.precision(8);\n\n        // apply the convolution operator on the input function f\n        Function<T,3> ff = copy(f);\n        if (world.rank() == 0) print(\"applying - 1\");\n        double start = cpu_time();\n        Function<T,3> opf = op(ff);\n        if (world.rank() == 0) print(\"done in time\",cpu_time()-start);\n        ff.clear();\n        opf.verify_tree();\n        double opferr = opf.err(Qfunc());\n        if (world.rank() == 0) print(\"err in opf\", opferr);\n        if (world.rank() == 0) print(\"err in f\", ferr);\n        \n        // here we are testing bsh, not the initial projection\n        //if ((opferr>ferr) and (opferr>FunctionDefaults<3>::get_thresh())) success++;\n        if (opferr>2*ferr) success++;\n\n        // //opf.truncate();\n        // Function<T,3> opinvopf = opf*(mu*mu);\n        // for (int axis=0; axis<3; ++axis) {\n        //     opinvopf.gaxpy(1.0,diff(diff(opf,axis),axis).compress(),-1.0);\n        // }\n        // print(\"norm of (-del^2+mu^2)*G*f\", opinvopf.norm2());\n        // Function<T,3> error = (f-opinvopf);\n        // print(\"error\",error.norm2());\n\n        // opf.clear();\n        // opinvopf.clear();\n        \n        // Function<T,3> g = (mu*mu)*f;\n        // for (int axis=0; axis<3; ++axis) {\n        //     //g = g - diff(diff(f,axis),axis);\n        // }\n        // g = op(g);\n        // double derror=(g-f).norm2();\n        // print(\"norm of G*(-del^2+mu^2)*f\",g.norm2());\n        // print(\"error\",derror);\n        // if (derror> FunctionDefaults<3>::get_thresh()) success++;\n        \n    }\n        \n    world.gop.fence();\n    return success;\n}\n\n\nint main(int argc, char**argv) {\n    initialize(argc,argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    int success=0;\n    try {\n        startup(world,argc,argv);\n\n        if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n        for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n        std::cout << \"small test : \" << smalltest << std::endl;\n\n        success=test_bsh<double>(world);\n\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n//    catch (const char* s) {\n//        print(s);\n//        error(\"caught a c-string exception\");\n//    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    world.gop.fence();\n    finalize();\n\n    return success;\n}\n\n"
  },
  {
    "path": "src/madness/mra/testdiff1D.cc",
    "content": "/// \\file testdiff1D.cc\n/// \\brief testing for diff() in 1D\n\n#include <madness/mra/mra.h>\n\nusing namespace madness;\n\ntypedef Vector<double,1> coordT;\ntypedef Function<double,1> functionT;\ntypedef FunctionFactory<double,1> factoryT;\ntypedef Tensor<double> tensorT;\n\nstatic const int k = 9 ; // Wavelet order (usually precision + 2)\nstatic const double thresh = 1.e-7 ; // Precision\nstatic const int init_lev = 2;\nstatic const int test_axis = 0;\nstatic const double Length = 4.;\n\nint compare(World& world, functionT test, functionT exact, const char *str)\n{\n   double error = (exact - test).norm2() ;\n   int success;\n\n   if (error < thresh) {\n       success=0;\n   }\n   else {\n       success=1;\n   }\n   /* There should be a reduction over success here... */\n   if (world.rank() == 0) {\n       std::cerr << \"Error in \" << str << \": \" << error ;\n       std::cerr << ((success==0) ? \" PASSED \" : \" FAILED \") << std::endl ;\n   }\n   return success;\n}\n\n\n// Testing the derivatives of a function 1+x\n// for a variety of boundary conditions\nstatic double u_exact(const coordT &pt) {\n  double x = pt[0];\n  return (1.0+x) ;\n}\n\nstatic double du_exact(const coordT &pt) {\n  return (1.0) ;\n}\n\nstatic double left_dirichlet(const coordT &pt) {\n  return (1.0) ;\n}\nstatic double right_dirichlet(const coordT &pt) {\n  double x = Length;\n  return (1.0+x) ;\n}\nstatic double left_neumann  (const coordT &pt) {\n  return (1.0) ;\n}\nstatic double right_neumann  (const coordT &pt) {\n  return (1.0) ;\n}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    int success=0;\n\n        std::cout.precision(6);\n\n       // Function defaults\n        FunctionDefaults<1>::set_k(k);\n        FunctionDefaults<1>::set_thresh(thresh);\n        FunctionDefaults<1>::set_refine(true );\n        FunctionDefaults<1>::set_autorefine(true );\n        FunctionDefaults<1>::set_initial_level(init_lev);\n        FunctionDefaults<1>::set_cubic_cell( 0. , Length);\n\n        BoundaryConditions<1> bc;\n\n        functionT  u      = factoryT(world).f( u_exact );\n        functionT due     = factoryT(world).f(du_exact );\n\n        functionT  left_d = factoryT(world).f( left_dirichlet) ;\n        functionT right_d = factoryT(world).f(right_dirichlet) ;\n        functionT  left_n = factoryT(world).f( left_neumann  ) ;\n        functionT right_n = factoryT(world).f(right_neumann  ) ;\n\n        // Right B.C.: Dirichlet\n        // Left  B.C.: Free\n        bc(0,0) = BC_DIRICHLET ;\n        bc(0,1) = BC_FREE ;\n\n        Derivative<double,1> dx1(world, test_axis, bc, left_d, right_d, k) ;\n        functionT du1 = dx1(u) ;\n        success+=compare(world, du1, due, \"du1\") ;\n\n        // Right B.C.: Free\n        // Left  B.C.: Dirichlet\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_DIRICHLET ;\n\n        Derivative<double,1> dx2(world, test_axis, bc, left_d, right_d, k) ;\n        functionT du2 = dx2(u) ;\n        success+=compare(world, du2, due, \"du2\") ;\n\n        // Right B.C.: Neumann\n        // Left  B.C.: Free\n        bc(0,0) = BC_NEUMANN ;\n        bc(0,1) = BC_FREE ;\n\n        Derivative<double,1> dx3(world, test_axis, bc, left_n, right_n, k) ;\n        functionT du3 = dx3(u) ;\n        success+=compare(world, du3, due, \"du3\") ;\n\n        // Right B.C.: Free\n        // Left  B.C.: Neumann\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_NEUMANN ;\n\n        Derivative<double,1> dx4(world, test_axis, bc, left_n, right_n, k) ;\n        functionT du4 = dx4(u) ;\n        success+=compare(world, du4, due, \"du4\") ;\n\n         world.gop.fence();\n\n    finalize();\n\n    return success;\n}\n\n\n\n"
  },
  {
    "path": "src/madness/mra/testdiff1Db.cc",
    "content": "/// \\file testdiff1Db.cc\n/// \\brief testing for diff() in 1D\n\n#include <madness/mra/mra.h>\n// #include <madness/mra/mraimpl.h> !!!!!!!!!!!!!! NOOOOOOOOOOOOOOOOOO  !!!!!!!!!!!!!!!!!\n\nusing namespace madness;\n\ntypedef Vector<double,1> coordT;\ntypedef Function<double,1> functionT;\ntypedef FunctionFactory<double,1> factoryT;\ntypedef Tensor<double> tensorT;\n\nstatic const int k = 9 ; // Wavelet order (usually precision + 2)\nstatic const double thresh = 1.e-7 ; // Precision\nstatic const int init_lev = 4;\nstatic const int test_axis = 0;\n\nint compare(World& world, functionT test, functionT exact, const char *str)\n{\n\tint success=0;\n   double error = (exact - test).norm2() ;\n\n   if (world.rank() == 0) {\n       std::cerr << \"Error in \" << str << \": \" << error ;\n\n       if (error < thresh) {\n           std::cerr << \" PASSED \" << std::endl ;\n       }\n       else {\n           std::cerr << \" FAILED \" << std::endl ;\n           success=1;\n       }\n   }\n   return success;\n}\n\ndouble sech(double val)\n{\n  double tmp = exp(val) ;\n  return(2. / (tmp + 1. / tmp) ) ;\n\n}\n\n\n// Testing the derivatives of a function 1+x\n// for a variety of boundary conditions\nstatic double u_exact(const coordT &pt) {\n  double x = pt[0] ;\n  return (cos(x)*(1. + tanh(4*x)) ) ;\n}\n\nstatic double du_exact(const coordT &pt) {\n  double x = pt[0] ;\n  return (4.*cos(x)*sech(4.*x)*sech(4.*x) - sin(x)*(1.+tanh(4.*x))) ;\n}\n\nstatic double left_dirichlet(const coordT &pt) {\n  return (1.0) ;\n}\nstatic double right_dirichlet(const coordT &pt) {\n  return (cos(1.0)*(1.+tanh(4.0))) ;\n}\nstatic double left_neumann  (const coordT &pt) {\n  return (4.0) ;\n}\nstatic double right_neumann  (const coordT &pt) {\n  return (4.*cos(1.)*sech(4.)*sech(4.0) - sin(1.)*(1.+tanh(4.))) ;\n}\n\n\nint main(int argc, char** argv) {\n\n    initialize(argc, argv);\n//    const int required = MADNESS_MPI_THREAD_LEVEL;\n//    SafeMPI::Init_thread(argc, argv, required);\n\tWorld world(SafeMPI::COMM_WORLD);\n        startup(world,argc,argv);\n\n        int success=0;\n        std::cout.precision(6);\n\n       // Function defaults\n        FunctionDefaults<1>::set_k(k);\n        FunctionDefaults<1>::set_thresh(thresh);\n        FunctionDefaults<1>::set_refine(true );\n        FunctionDefaults<1>::set_autorefine(true );\n        FunctionDefaults<1>::set_initial_level(init_lev);\n        FunctionDefaults<1>::set_cubic_cell( 0. , 1.);\n\n        BoundaryConditions<1> bc;\n\n        functionT  u      = factoryT(world).f( u_exact );\n        functionT due     = factoryT(world).f(du_exact );\n\n        functionT  left_d = factoryT(world).f( left_dirichlet) ;\n        functionT right_d = factoryT(world).f(right_dirichlet) ;\n        functionT  left_n = factoryT(world).f( left_neumann  ) ;\n        functionT right_n = factoryT(world).f(right_neumann  ) ;\n\n        // Right B.C.: Dirichlet\n        // Left  B.C.: Free\n        bc(0,0) = BC_DIRICHLET ;\n        bc(0,1) = BC_FREE ;\n\n        Derivative<double,1> dx1(world, test_axis, bc, left_d, right_d, k) ;\n        functionT du1 = dx1(u) ;\n        success+=compare(world, du1, due, \"du1\") ;\n\n        // Right B.C.: Free\n        // Left  B.C.: Dirichlet\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_DIRICHLET ;\n\n        Derivative<double,1> dx2(world, test_axis, bc, left_d, right_d, k) ;\n        functionT du2 = dx2(u) ;\n        success+=compare(world, du2, due, \"du2\") ;\n\n        // Right B.C.: Neumann\n        // Left  B.C.: Free\n        bc(0,0) = BC_NEUMANN ;\n        bc(0,1) = BC_FREE ;\n\n        Derivative<double,1> dx3(world, test_axis, bc, left_n, right_n, k) ;\n        functionT du3 = dx3(u) ;\n        success+=compare(world, du3, due, \"du3\") ;\n\n        // Right B.C.: Free\n        // Left  B.C.: Neumann\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_NEUMANN ;\n\n        Derivative<double,1> dx4(world, test_axis, bc, left_n, right_n, k) ;\n        functionT du4 = dx4(u) ;\n        success+=compare(world, du4, due, \"du4\") ;\n\n         world.gop.fence();\n\n    finalize();\n\n    return success;\n}\n\n\n\n"
  },
  {
    "path": "src/madness/mra/testdiff2D.cc",
    "content": "/// \\file testdiff2D.cc\n/// \\brief testing for diff() in 2D\n\n#include <madness/mra/mra.h>\n//#include <madness/mra/mraimpl.h> !!!!!!!!!!!!!! NOOOOOOOOOOOOOOOOOOOOOOOOO  !!!!!!!!!!!!!\n#include <string>\n\nusing namespace madness;\n\ntypedef Vector<double,2> coordT;\ntypedef Function<double,2> functionT;\ntypedef FunctionFactory<double,2> factoryT;\ntypedef Tensor<double> tensorT;\n\nstatic const int k = 9 ; // Wavelet order (usually precision + 2)\nstatic const double thresh = 1.e-7 ; // Precision\nstatic const int init_lev = 2;\nstatic int test_axis = 0;\nstatic const double Length = 2.;\n\nint compare(World& world, functionT test, functionT exact, const char *str)\n{\n\tint success=0;\n   double error = (exact - test).norm2() ;\n\n   if (world.rank() == 0) {\n       std::cerr << \"Error in \" << str << \": \" << error ;\n\n       if (error < thresh) {\n           std::cerr << \" PASSED \" << std::endl ;\n       }\n       else {\n           std::cerr << \" FAILED \" << std::endl ;\n           success=1;\n       }\n   }\n   return success;\n}\n\n\n// Testing the derivatives of a function 1+x\n// for a variety of boundary conditions\nstatic double u_exact(const coordT &pt) {\n  return (1.0+pt[0]*pt[1]) ;\n}\n\nstatic double dudx_exact(const coordT &pt) {\n  return (pt[1]) ;\n}\n\nstatic double dudy_exact(const coordT &pt) {\n  return (pt[0]) ;\n}\n\nstatic double xleft_dirichlet(const coordT &pt) {\n  return (1.) ;\n}\nstatic double xright_dirichlet(const coordT &pt) {\n  double x = Length, y=pt[1];\n  return (1.0+x*y) ;\n}\nstatic double xleft_neumann  (const coordT &pt) {\n  return (pt[1]) ;\n}\nstatic double xright_neumann  (const coordT &pt) {\n  return (pt[1]) ;\n}\n\nstatic double yleft_dirichlet(const coordT &pt) {\n  return (1.) ;\n}\nstatic double yright_dirichlet(const coordT &pt) {\n  double x=pt[0], y = Length;\n  return (1.0+x*y) ;\n}\nstatic double yleft_neumann  (const coordT &pt) {\n  return (pt[0]) ;\n}\nstatic double yright_neumann  (const coordT &pt) {\n  return (pt[0]) ;\n}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n\tWorld world(SafeMPI::COMM_WORLD);\n        startup(world,argc,argv);\n\n        int success=0;\n        std::cout.precision(6);\n\n       // Function defaults\n        FunctionDefaults<2>::set_k(k);\n        FunctionDefaults<2>::set_thresh(thresh);\n        FunctionDefaults<2>::set_refine(true );\n        FunctionDefaults<2>::set_autorefine(true );\n        FunctionDefaults<2>::set_initial_level(init_lev);\n        FunctionDefaults<2>::set_cubic_cell( 0. , Length);\n\n        BoundaryConditions<2> bc;\n\n        functionT  u      = factoryT(world).f(   u_exact );\n        functionT dudxe   = factoryT(world).f(dudx_exact );\n        functionT dudye   = factoryT(world).f(dudy_exact );\n\n        functionT  xleft_d = factoryT(world).f( xleft_dirichlet) ;\n        functionT xright_d = factoryT(world).f(xright_dirichlet) ;\n        functionT  xleft_n = factoryT(world).f( xleft_neumann  ) ;\n        functionT xright_n = factoryT(world).f(xright_neumann  ) ;\n\n        functionT  yleft_d = factoryT(world).f( yleft_dirichlet) ;\n        functionT yright_d = factoryT(world).f(yright_dirichlet) ;\n        functionT  yleft_n = factoryT(world).f( yleft_neumann  ) ;\n        functionT yright_n = factoryT(world).f(yright_neumann  ) ;\n\n        // Derivative in the x-direction\n        test_axis = 0;\n\n        // X Right B.C.: Dirichlet\n        // X Left  B.C.: Free\n        bc(0,0) = BC_DIRICHLET ;\n        bc(0,1) = BC_FREE ;\n        bc(1,0) = BC_FREE ;\n        bc(1,1) = BC_FREE ;\n        // bc = bc ;\n\n/*\n//Create a derived class FreeSpaceDerivative, PeriodicDerivative\n        FreeSpaceDerivative<double,2> dx1(world, k, test_axis) ; // Free Space\n        FreeSpaceDerivative<double,2> dx1(world, k, test_axis, 2) ; // Free Space\n        PeriodicDerivative<double,2> dx1(world, k, test_axis, 1) ; // Periodic\n*/\n        Derivative<double,2> dx1(world, test_axis, bc, xleft_d, xright_d, k) ;\n        functionT dudx1 = dx1(u) ;\n        success+=compare(world, dudx1, dudxe, \"dudx1\") ;\n\n        // X Right B.C.: Free\n        // X Left  B.C.: Dirichlet\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_DIRICHLET ;\n        // bc = bc ;\n\n        Derivative<double,2> dx2(world, test_axis, bc, xleft_d, xright_d, k) ;\n        functionT dudx2 = dx2(u) ;\n        success+=compare(world, dudx2, dudxe, \"dudx2\") ;\n\n        // X Right B.C.: Neumann\n        // X Left  B.C.: Free\n        bc(0,0) = BC_NEUMANN ;\n        bc(0,1) = BC_FREE ;\n        // bc = bc ;\n\n        Derivative<double,2> dx3(world, test_axis, bc, xleft_n, xright_n, k) ;\n        functionT dudx3 = dx3(u) ;\n        success+=compare(world, dudx3, dudxe, \"dudx3\") ;\n\n        // X Right B.C.: Free\n        // X Left  B.C.: Neumann\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_NEUMANN ;\n        // bc = bc ;\n\n        Derivative<double,2> dx4(world, test_axis, bc, xleft_n, xright_n, k) ;\n        functionT dudx4 = dx4(u) ;\n        success+=compare(world, dudx4, dudxe, \"dudx4\") ;\n\n\n        // Derivative in the y-direction\n        test_axis = 1;\n\n        // Y Right B.C.: Dirichlet\n        // Y Left  B.C.: Free\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_FREE ;\n        bc(1,0) = BC_DIRICHLET ;\n        bc(1,1) = BC_FREE ;\n        // bc = bc ;\n\n        Derivative<double,2> dy1(world, test_axis, bc, yleft_d, yright_d, k) ;\n        functionT dudy1 = dy1(u) ;\n        success+=compare(world, dudy1, dudye, \"dudy1\") ;\n\n        // Y Right B.C.: Free\n        // Y Left  B.C.: Dirichlet\n        bc(1,0) = BC_FREE ;\n        bc(1,1) = BC_DIRICHLET ;\n        // bc = bc ;\n\n        Derivative<double,2> dy2(world, test_axis, bc, yleft_d, yright_d, k) ;\n        functionT dudy2 = dy2(u) ;\n        success+=compare(world, dudy2, dudye, \"dudy2\") ;\n\n        // Y Right B.C.: Neumann\n        // Y Left  B.C.: Free\n        bc(1,0) = BC_NEUMANN ;\n        bc(1,1) = BC_FREE ;\n        // bc = bc ;\n\n        Derivative<double,2> dy3(world, test_axis, bc, yleft_n, yright_n, k) ;\n        functionT dudy3 = dy3(u) ;\n        success+=compare(world, dudy3, dudye, \"dudy3\") ;\n\n        // Y Right B.C.: Free\n        // Y Left  B.C.: Neumann\n        bc(1,0) = BC_FREE ;\n        bc(1,1) = BC_NEUMANN ;\n        // bc = bc ;\n\n        Derivative<double,2> dy4(world, test_axis, bc, yleft_n, yright_n, k) ;\n        functionT dudy4 = dy4(u) ;\n        success+=compare(world, dudy4, dudye, \"dudy4\") ;\n\n         world.gop.fence();\n\n    finalize();\n\n    return success;\n}\n\n\n\n"
  },
  {
    "path": "src/madness/mra/testdiff3D.cc",
    "content": "/// \\file testdiff3D.cc\n/// \\brief testing for diff() in 3D\n\n#include <madness/mra/mra.h>\n//#include <madness/mra/mraimpl.h> !!!!!!!!!! NOOOOOOOOOOOOOOOOOOOO !!!!!!!!!!!!!!!!!!\n#include <string>\n\nusing namespace madness;\n\ntypedef Vector<double,3> coordT;\ntypedef Function<double,3> functionT;\ntypedef FunctionFactory<double,3> factoryT;\ntypedef Tensor<double> tensorT;\n\nstatic const int k = 9 ; // Wavelet order (usually precision + 2)\nstatic const double thresh = 1.e-7 ; // Precision\nstatic const int init_lev = 2;\nstatic int test_axis = 0;\nstatic const double Length = 4.0;\n\nint compare(World& world, functionT test, functionT exact, const char *str)\n{\n\tint success=0;\n   double error = (exact - test).norm2() ;\n\n   if (world.rank() == 0) {\n       std::cerr << \"Error in \" << str << \": \" << error ;\n\n       if (error < thresh) {\n           std::cerr << \" PASSED \" << std::endl ;\n       }\n       else {\n           std::cerr << \" FAILED \" << std::endl ;\n           success=1;\n       }\n   }\n   return success;\n}\n\n\n\n// Testing the derivatives of a function 1+x\n// for a variety of boundary conditions\nstatic double u_exact(const coordT &pt) {\n  return (1.0+pt[0]*pt[1]*pt[2]) ;\n}\n\nstatic double dudx_exact(const coordT &pt) {\n  return (pt[1]*pt[2]) ;\n}\n\nstatic double dudy_exact(const coordT &pt) {\n  return (pt[0]*pt[2]) ;\n}\n\nstatic double dudz_exact(const coordT &pt) {\n  return (pt[0]*pt[1]) ;\n}\n\nstatic double xleft_dirichlet(const coordT &pt) {\n  return (1.) ;\n}\nstatic double xright_dirichlet(const coordT &pt) {\n  double x = Length, y = pt[1], z=pt[2];\n  return (1.+x*y*z) ;\n}\nstatic double xleft_neumann  (const coordT &pt) {\n  return (pt[1]*pt[2]) ;\n}\nstatic double xright_neumann  (const coordT &pt) {\n  return (pt[1]*pt[2]) ;\n}\n\nstatic double yleft_dirichlet(const coordT &pt) {\n  return (1.) ;\n}\nstatic double yright_dirichlet(const coordT &pt) {\n  double x = pt[0], y = Length, z=pt[2];\n  return (1.+x*y*z) ;\n}\nstatic double yleft_neumann  (const coordT &pt) {\n  return (pt[0]*pt[2]) ;\n}\nstatic double yright_neumann  (const coordT &pt) {\n  return (pt[0]*pt[2]) ;\n}\n\nstatic double zleft_dirichlet(const coordT &pt) {\n  return (1.) ;\n}\nstatic double zright_dirichlet(const coordT &pt) {\n  double x = pt[0], y = pt[1], z = Length;\n  return (1.+x*y*z) ;\n}\nstatic double zleft_neumann  (const coordT &pt) {\n  return (pt[0]*pt[1]) ;\n}\nstatic double zright_neumann  (const coordT &pt) {\n  return (pt[0]*pt[1]) ;\n}\n\n\nint main(int argc, char** argv) {\n\n    initialize(argc, argv);\n\tWorld world(SafeMPI::COMM_WORLD);\n        startup(world,argc,argv);\n\n        int success=0;\n        std::cout.precision(12);\n\n       // Function defaults\n        FunctionDefaults<3>::set_k(k);\n        FunctionDefaults<3>::set_thresh(thresh);\n        FunctionDefaults<3>::set_refine(true );\n        FunctionDefaults<3>::set_autorefine(true );\n        FunctionDefaults<3>::set_initial_level(init_lev);\n        FunctionDefaults<3>::set_cubic_cell( 0. , Length );\n\n        BoundaryConditions<3> bc;\n\n        functionT  u      = factoryT(world).f(   u_exact );\n        functionT dudxe   = factoryT(world).f(dudx_exact );\n        functionT dudye   = factoryT(world).f(dudy_exact );\n        functionT dudze   = factoryT(world).f(dudz_exact );\n\n        functionT  xleft_d = factoryT(world).f( xleft_dirichlet) ;\n        functionT xright_d = factoryT(world).f(xright_dirichlet) ;\n        functionT  xleft_n = factoryT(world).f( xleft_neumann  ) ;\n        functionT xright_n = factoryT(world).f(xright_neumann  ) ;\n\n        functionT  yleft_d = factoryT(world).f( yleft_dirichlet) ;\n        functionT yright_d = factoryT(world).f(yright_dirichlet) ;\n        functionT  yleft_n = factoryT(world).f( yleft_neumann  ) ;\n        functionT yright_n = factoryT(world).f(yright_neumann  ) ;\n\n        functionT  zleft_d = factoryT(world).f( zleft_dirichlet) ;\n        functionT zright_d = factoryT(world).f(zright_dirichlet) ;\n        functionT  zleft_n = factoryT(world).f( zleft_neumann  ) ;\n        functionT zright_n = factoryT(world).f(zright_neumann  ) ;\n\n        print(\"Unorm\", u.norm2());\n\n        // Derivative in the x-direction\n        test_axis = 0;\n\n        // X Right B.C.: Dirichlet\n        // X Left  B.C.: Free\n        bc(0,0) = BC_DIRICHLET ;\n        bc(0,1) = BC_FREE ;\n        bc(1,0) = BC_FREE ;\n        bc(1,1) = BC_FREE ;\n        bc(2,0) = BC_FREE ;\n        bc(2,1) = BC_FREE ;\n\n        Derivative<double,3> dx1(world, test_axis, bc, xleft_d, xright_d, k) ;\n        functionT dudx1 = dx1(u) ;\n        success+=compare(world, dudx1, dudxe, \"dudx1\") ;\n        print(\"D1Unorm\", dudx1.norm2());\n\n\n        // X Right B.C.: Free\n        // X Left  B.C.: Dirichlet\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_DIRICHLET ;\n\n        Derivative<double,3> dx2(world, test_axis, bc, xleft_d, xright_d, k) ;\n        functionT dudx2 = dx2(u) ;\n        success+=compare(world, dudx2, dudxe, \"dudx2\") ;\n\n        // X Right B.C.: Neumann\n        // X Left  B.C.: Free\n        bc(0,0) = BC_NEUMANN ;\n        bc(0,1) = BC_FREE ;\n\n        Derivative<double,3> dx3(world, test_axis, bc, xleft_n, xright_n, k) ;\n        functionT dudx3 = dx3(u) ;\n        success+=compare(world, dudx3, dudxe, \"dudx3\") ;\n\n        // X Right B.C.: Free\n        // X Left  B.C.: Neumann\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_NEUMANN ;\n\n        Derivative<double,3> dx4(world, test_axis, bc, xleft_n, xright_n, k) ;\n        functionT dudx4 = dx4(u) ;\n        success+=compare(world, dudx4, dudxe, \"dudx4\") ;\n\n\n        // Derivative in the y-direction\n        test_axis = 1;\n\n        // Y Right B.C.: Dirichlet\n        // Y Left  B.C.: Free\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_FREE ;\n        bc(1,0) = BC_DIRICHLET ;\n        bc(1,1) = BC_FREE ;\n        bc(2,0) = BC_FREE ;\n        bc(2,1) = BC_FREE ;\n\n        Derivative<double,3> dy1(world, test_axis, bc, yleft_d, yright_d, k) ;\n        functionT dudy1 = dy1(u) ;\n        success+=compare(world, dudy1, dudye, \"dudy1\") ;\n\n        // Y Right B.C.: Free\n        // Y Left  B.C.: Dirichlet\n        bc(1,0) = BC_FREE ;\n        bc(1,1) = BC_DIRICHLET ;\n\n        Derivative<double,3> dy2(world, test_axis, bc, yleft_d, yright_d, k) ;\n        functionT dudy2 = dy2(u) ;\n        success+=compare(world, dudy2, dudye, \"dudy2\") ;\n\n        // Y Right B.C.: Neumann\n        // Y Left  B.C.: Free\n        bc(1,0) = BC_NEUMANN ;\n        bc(1,1) = BC_FREE ;\n\n        Derivative<double,3> dy3(world, test_axis, bc, yleft_n, yright_n, k) ;\n        functionT dudy3 = dy3(u) ;\n        success+=compare(world, dudy3, dudye, \"dudy3\") ;\n\n        // Y Right B.C.: Free\n        // Y Left  B.C.: Neumann\n        bc(1,0) = BC_FREE ;\n        bc(1,1) = BC_NEUMANN ;\n\n        Derivative<double,3> dy4(world, test_axis, bc, yleft_n, yright_n, k) ;\n        functionT dudy4 = dy4(u) ;\n        success+=compare(world, dudy4, dudye, \"dudy4\") ;\n\n\n        // Derivative in the z-direction\n        test_axis = 2;\n\n        // Z Right B.C.: Dirichlet\n        // Z Left  B.C.: Free\n        bc(0,0) = BC_FREE ;\n        bc(0,1) = BC_FREE ;\n        bc(1,0) = BC_FREE ;\n        bc(1,1) = BC_FREE ;\n        bc(2,0) = BC_DIRICHLET ;\n        bc(2,1) = BC_FREE ;\n\n        Derivative<double,3> dz1(world, test_axis, bc, zleft_d, zright_d, k) ;\n        functionT dudz1 = dz1(u) ;\n        success+=compare(world, dudz1, dudze, \"dudz1\") ;\n\n        // Z Right B.C.: Free\n        // Z Left  B.C.: Dirichlet\n        bc(2,0) = BC_FREE ;\n        bc(2,1) = BC_DIRICHLET ;\n\n        Derivative<double,3> dz2(world, test_axis, bc, zleft_d, zright_d, k) ;\n        functionT dudz2 = dz2(u) ;\n        success+=compare(world, dudz2, dudze, \"dudz2\") ;\n\n        // Z Right B.C.: Neumann\n        // Z Left  B.C.: Free\n        bc(2,0) = BC_NEUMANN ;\n        bc(2,1) = BC_FREE ;\n\n        Derivative<double,3> dz3(world, test_axis, bc, zleft_n, zright_n, k) ;\n        functionT dudz3 = dz3(u) ;\n        success+=compare(world, dudz3, dudze, \"dudz3\") ;\n\n        // Z Right B.C.: Free\n        // Z Left  B.C.: Neumann\n        bc(2,0) = BC_FREE ;\n        bc(2,1) = BC_NEUMANN ;\n\n        Derivative<double,3> dz4(world, test_axis, bc, zleft_n, zright_n, k) ;\n        functionT dudz4 = dz4(u) ;\n        success+=compare(world, dudz4, dudze, \"dudz4\") ;\n\n         world.gop.fence();\n\n    finalize();\n\n    return success;\n}\n\n\n\n"
  },
  {
    "path": "src/madness/mra/testgaxpyext.cc",
    "content": "\n#include <madness/mra/mra.h>\n\nusing namespace madness;\n\nbool smalltest = false;\n\ndouble ttt, sss;\n#define START_TIMER world.gop.fence(); ttt=wall_time(); sss=cpu_time()\n#define END_TIMER(msg) ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf(\"timer: %-20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt)\n\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\n\nstatic const double R = 1.4;    // bond length\nstatic const double L = 5.0*R;  // box size\nstatic const long k = 8;        // wavelet order\nstatic const double thresh = 1e-6; // precision\n\nstatic double alpha_func(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return ((x*x + y*y + z*z) * sin(x*x + y*y + z*z));\n};\n\nstatic double beta_func(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    const double x0=-1.0, y0=-1.0, z0=-1.0;\n    const double a=1.0;\n    return (a * exp(- (x-x0)*(x-x0) - (y-y0)*(y-y0) - (z-z0)*(z-z0)));\n};\n\n/* static double gamma_func(const coord_3d& r) { */\n/*    const double x=r[0], y=r[1], z=r[2]; */\n/*    const double x0=2.0, y0=2.0, z0=2.0; */\n/*    const double a=0.5, sig2=0.0625; */\n/*    return (a * exp(- sig2*(x-x0)*(x-x0) - sig2*(y-y0)*(y-y0) - sig2*(z-z0)*(z-z0))); */\n/* }; */\n\n/* static double alpha_p_beta_func(const coord_3d& r) { */\n/*     const double x=r[0], y=r[1], z=r[2]; */\n/*     const double x0=-1.0, y0=-1.0, z0=-1.0; */\n/*     const double a=1.0; */\n/*     return ((x*x + y*y + z*z) * sin(x*x + y*y + z*z) + a * exp(- (x-x0)*(x-x0) - (y-y0)*(y-y0) - (z-z0)*(z-z0))); */\n/* } */\n\n/* static double beta_p_gamma_func(const coord_3d& r) { */\n/*     const double x=r[0], y=r[1], z=r[2]; */\n/*     const double x0=-1.0, y0=-1.0, z0=-1.0; */\n/*     const double x1=2.0, y1=2.0, z1=2.0; */\n/*     const double a=1.0, b=0.5, sig2=0.0625; */\n/*     return (a * exp(- (x-x0)*(x-x0) - (y-y0)*(y-y0) - (z-z0)*(z-z0)) */\n/*           + b * exp(- sig2*(x-x1)*(x-x1) - sig2*(y-y1)*(y-y1) - sig2*(z-z1)*(z-z1))); */\n/* } */\n\nbool is_like(double a, double b, double tol) {\n    return (std::abs((a - b)/a) <= tol);\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    int success = 0;\n\n    startup(world,argc,argv);\n\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n    \n    std::cout.precision(6);\n\n    if (!smalltest) {\n        \n        FunctionDefaults<3>::set_defaults(world);\n        \n        FunctionDefaults<3>::set_k(k);\n        FunctionDefaults<3>::set_thresh(thresh);\n        FunctionDefaults<3>::set_refine(true);\n        FunctionDefaults<3>::set_initial_level(5);\n        FunctionDefaults<3>::set_truncate_mode(1);\n        FunctionDefaults<3>::set_truncate_on_project(true);\n        FunctionDefaults<3>::set_cubic_cell(-L/2, L/2);\n        \n        real_function_3d alpha1 = real_factory_3d(world).f(alpha_func);\n        /* real_function_3d bpc = real_factory_3d(world).f(beta_p_gamma_func); */\n        \n        if (world.rank() == 0) {\n            print(\"***************************************************************************\");\n            print(\"alpha is a highly oscillatory function (x^2 sin(x^2)).\");\n            print(\"beta is a pretty boring Gaussian.\");\n            print(\"For the first two timers, the cost of computing alpha in\");\n            print(\"the numerical basis is not included.\\n\");\n        }\n        \n        START_TIMER;\n        real_function_3d beta = real_factory_3d(world).f(beta_func);\n        real_function_3d apb1 = real_factory_3d(world);\n        apb1 = alpha1 + beta;\n        END_TIMER(\"1. alpha + beta\");\n        \n        START_TIMER;\n        real_function_3d apb_ext1 = real_factory_3d(world);\n        apb_ext1.gaxpy_ext<double>(alpha1, beta_func, 1.0, 1.0, 1e-06, true);\n        END_TIMER(\"2. alpha + beta_func\");\n        \n        if (world.rank() == 0) {\n            print(\"***************************************************************************\");\n            print(\"alpha is a highly oscillatory function (x^2 sin(x^2)).\");\n            print(\"beta is a pretty boring Gaussian.\");\n            print(\"For the next two timers, the cost of computing beta in\");\n            print(\"the numerical basis is not included.\\n\");\n        }\n        \n        START_TIMER;\n        real_function_3d alpha2 = real_factory_3d(world).f(alpha_func);\n        real_function_3d apb2 = real_factory_3d(world);\n        apb2 = alpha2 + beta;\n        END_TIMER(\"3. beta + alpha\");\n        \n        START_TIMER;\n        real_function_3d apb_ext2 = real_factory_3d(world);\n        apb_ext2.gaxpy_ext<double>(beta, alpha_func, 1.0, 1.0, 1e-06, true);\n        END_TIMER(\"4. beta + alpha_func\");\n        \n        double norm_apb1 = apb1.norm2();\n        double norm_apb2 = apb2.norm2();\n        double norm_apbext1 = apb_ext1.norm2();\n        double norm_apbext2 = apb_ext2.norm2();\n        \n        if (world.rank() == 0) {\n            print(\"***************************************************************************\");\n            print(\"Test for correctness by comparing the 2-norms.\");\n            printf(\"(1) norm of apb =     %20.16f\\n\", norm_apb1);\n            printf(\"(2) norm of apb_ext = %20.16f\\n\", norm_apbext1);\n            printf(\"(3) norm of apb =     %20.16f\\n\", norm_apb2);\n            printf(\"(4) norm of apb_ext = %20.16f\\n\", norm_apbext2);\n        }\n        \n        /* START_TIMER; */\n        /* real_function_3d gamma = real_factory_3d(world).f(gamma_func); */\n        /* real_function_3d bpc = real_factory_3d(world); */\n        /* bpc = alpha1 + beta; */\n        /* END_TIMER(\"1. bpc = beta + gamma\"); */\n        \n        /* START_TIMER; */\n        /* real_function_3d apb_ext1 = real_factory_3d(world); */\n        /* apb_ext1.gaxpy_ext<double>(alpha, beta_func, 1.0, 1.0, 1e-06, true); */\n        /* END_TIMER(\"2. apb_ext = alpha + beta_func\"); */\n        \n        /* START_TIMER; */\n        /* real_function_3d apb_ext2 = real_factory_3d(world); */\n        /* apb_ext2.gaxpy_ext<double>(beta, alpha_func, 1.0, 1.0, 1e-06, true); */\n        /* END_TIMER(\"3. apb_ext = alpha_func + beta\"); */\n        \n        if (not is_like(norm_apb1, norm_apbext1, thresh)) ++success;\n        if (not is_like(norm_apb2, norm_apbext2, thresh)) ++success;\n    }\n    world.gop.fence();\n\n    finalize();\n    return success;\n}\n"
  },
  {
    "path": "src/madness/mra/testgconv.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file mra/testgconv.cc\n/// \\brief Test convolution with Gaussian * polyn\n\n#include <madness/mra/mra.h>\n#include <madness/mra/mw.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n\n// WARNING even legacy tests prior to range-restricted op additions would not pass with k=8! Need k=10.\nstatic const int k = 10;\nstatic const double thresh = 1e-6;\nstatic constexpr double L = 50;\nstatic constexpr double Lx = L;\nstatic constexpr double Ly = L;\nstatic constexpr double Lz = L;\nconst auto npts = 10001;\n\nconstexpr std::size_t NDIM = 1;\nstatic_assert(NDIM >= 1 && NDIM <= 3);\nusing coord_t = Vector<double,NDIM>;\nusing dim_t = Vector<double,NDIM>;\nconstexpr coord_t one(1.0);  // {1,1,1...}\nconstexpr auto make_rx = [](double x) -> coord_t {\n  static_assert(NDIM >= 1 && NDIM <= 3);\n  if constexpr (NDIM==1)\n    return {x};\n  else if constexpr (NDIM==2)\n    return {x, 0.0};\n  else\n    return {x, 0.0, 0.0};\n};\nconstexpr coord_t onex = make_rx(1.);  // {1,1,1...}\nusing real_factory_t = FunctionFactory<double, NDIM>;\nusing real_function_t = Function<double, NDIM>;\nusing real_convolution_t = SeparatedConvolution<double, NDIM>;\n\n/// \\brief Return the size of the simulation cell in user coordinates\nconstexpr dim_t cell_extent() {\n  static_assert(NDIM >= 1 && NDIM <= 3);\n  if constexpr (NDIM == 1)\n    return {2*Lx};\n  else if constexpr (NDIM == 2) {\n    return {2*Lx, 2*Ly};\n  }\n  else { // NDIM == 3\n    return {2*Lx, 2*Ly, 2*Lz};\n  }\n}\n\ndouble cell_volume() {\n  const auto size = cell_extent();\n  return std::accumulate(\n      size.begin(), size.end(), 1.,\n      [](const auto &acc, const auto &v) { return acc * v; });\n}\n\n// normalized identity function = 1/volume\ndouble unit(const coord_t& r) {\n  const double fac = 1/cell_volume();\n  return fac;\n}\n\n// normalized identity function in the right half of the box = 1/L along first dimension\nconstexpr double rhunit(const coord_t& r) {\n  return r[0] < 0 ? 0 : 1/(2 * cell_volume());\n}\n\n// 0th scaling function = in box {13,4177}\nconstexpr double s_13_4177_0(const coord_t& r) {\n  const auto n = 13;\n  const auto ootwonm1 = 1. / (1 << (n - 1));\n  const auto δ = ootwonm1 * L;\n  const auto l = 4177;\n  const auto xmin = -L + l * δ;\n  const auto xmax = xmin + δ;\n  return r[0] <= xmin || r[0] > xmax ? 0 : pow(2.0,n/2.)/sqrt(2.0*L);\n}\n\n// exp(-|r|^2) / (sqrt(pi))^d = normalized unit gaussian at the origin\ndouble g(const coord_t& r) {\n    static const double fac = std::pow(constants::inv_sqrt_pi, coord_t::static_size);\n    return exp(-inner(r,r)) * fac;\n}\n\n// exp(-|r-1|^2) / sqrt(pi) = normalized unit gaussian at 1\ndouble g1(const coord_t& r) {\n  static const double fac = std::pow(constants::inv_sqrt_pi, coord_t::static_size);\n  return exp(-inner(r-onex,r-onex)) * fac;\n}\n\n// exp(-(|r|/(2L))^2) / (2L sqrt(pi)) = diffuse gaussian at origin, normalized over infinity\ndouble gd(const coord_t& r) {\n  static const double fac = std::pow(constants::inv_sqrt_pi, coord_t::static_size) / cell_volume();\n  const auto rt = r/cell_extent();\n  return exp(-inner(rt,rt)) * fac;\n}\n\n// exp(-(|r-1|/L)^2) / (L sqrt(pi)) = diffuse gaussian at 1, normalized over infinity\ndouble gd1(const coord_t& r) {\n  static const double fac = std::pow(constants::inv_sqrt_pi, coord_t::static_size) / cell_volume();\n  const auto rt = (r-onex)/cell_extent();\n  return exp(-inner(rt,rt)) * fac;\n}\n\n// exp(-alpha * |r|^2) * sqrt(alpha/pi)^d = tight gaussian at origin, normalized over infinity\ndouble gt(const coord_t& r) {\n  const auto alpha = 1e4;\n  static const double fac = std::pow(sqrt(alpha) * constants::inv_sqrt_pi, coord_t::static_size);\n  return exp(-alpha * inner(r,r)) * fac;\n}\n\n// exp(-alpha * |r-1|^2) * sqrt(alpha/pi)^d = tight gaussian at 1, normalized over infinity\ndouble gt1(const coord_t& r) {\n  const auto alpha = 1e4;\n  static const double fac = std::pow(sqrt(alpha) * constants::inv_sqrt_pi, coord_t::static_size);\n  const auto rt = r-onex;\n  return exp(-alpha * inner(rt,rt)) * fac;\n}\n\n// g' = exp(-r^2) / sqrt(pi) = derivative of a normalized gaussian\ndouble gprime(const coord_1d& r) {\n    static const double fac = 1.0/sqrt(constants::pi);\n    return -2.* r[0] * exp(-r[0]*r[0]) * fac;\n}\n\n// conv g()\ndouble convg(const coord_t& r) {\n    static const double fac = pow(1.0/sqrt(2.0*constants::pi), NDIM);\n    return exp(-0.5*inner(r,r)) * fac;\n}\n\n// conv g1()\ndouble convg1(const coord_1d& r) {\n  static const double fac = 1.0/sqrt(2.0*constants::pi);\n  return exp(-(r[0]-1)*(r[0]-1)*0.5) * fac;\n}\n\n// sqrt(8)*x*exp(-x^2)\ndouble h(const coord_1d& r) {\n    static const double fac = sqrt(8.0);\n    return exp(-r[0]*r[0]) * fac * r[0];\n}\n\n// g() conv h() == h() conv g()\ndouble gconvh(const coord_1d& r) {\n    return exp(-0.5*r[0]*r[0]) * r[0];\n}\n\n// D(conv) (g())\ndouble conv_prime_g(const coord_1d& r) {\n    static const double fac = 1.0/sqrt(2.0*constants::pi);\n    return -exp(-0.5*r[0]*r[0]) * r[0] *fac;\n}\n\n\n// 1d Gaussian on [-L,L] centered at R, with exponent a, normalized over real axis: sqrt(a/pi) exp(-a (x-R)^2)\nstruct G : public FunctionFunctorInterface<double, 1> {\n  double a, R;\n  G(double a, double R) : a(a), R(R) {\n  }\n  double operator()(const coord_1d& r) const {\n    const auto x = r[0];\n    const auto result = sqrt(a / constants::pi) * exp(-a * pow(R - x, 2));\n    return result;\n  }\n};\n\n// convolution of 1-d Gaussian kernel sqrt(a/pi) exp(-a (x-y)^2) with 1d Gaussian on [-L,L] centered at R sqrt(b/pi) exp(-b (x-R)^2)\n// in Wolfram: Integrate[ Exp[-a (x - y)^2] Sqrt[a/Pi] Exp[-b (y - R)^2]  Sqrt[b/Pi], {y, -L, L}]\nstruct GConvGNP : public FunctionFunctorInterface<double, 1> {\n    double a, b, R, L;\n    GConvGNP(double a, double b, double R, double L) : a(a), b(b), R(R), L(L) {\n    }\n    double operator()(const coord_1d& r) const {\n      const auto x = r[0];\n      const auto result =\n          (sqrt(a) * sqrt(b) * exp(-a * b * pow(R - x, 2) / (a + b)) *\n           (erf(((a + b) * L - b * R - a * x) / sqrt(a + b)) -\n            erf((-(b * (L + R)) - a * (L + x)) / sqrt(a + b)))) /\n          (2. * sqrt(a + b) * sqrt(constants::pi));\n      return result;\n    }\n};\n\n// convolution of 1-d Gaussian kernel sqrt(a/pi) exp(-a (x-y)^2) restricted to |x-y|<=L\n// with 1d Gaussian on [-L,L] centered at R sqrt(b/pi) exp(-b (x-R)^2)\n// in Wolfram: Integrate[ Exp[-a (x - y)^2] Sqrt[a/Pi] Exp[-b (y - R)^2]  Sqrt[b/Pi], {y, Max[x - L, -L], Max[Min[x + L, L], Max[x - L, -L]]}]\nstruct GConvGRNP : public FunctionFunctorInterface<double, 1> {\n  double a, b, R, L;\n  GConvGRNP(double a, double b, double R, double L) : a(a), b(b), R(R), L(L) {\n  }\n  double operator()(const coord_1d& r) const {\n    const auto x = r[0];\n    using std::max;\n    using std::min;\n    const auto result =\n        (sqrt(a) * sqrt(b) * exp(-a * b * pow(R - x, 2) / (a + b)) *\n         (erf((-(b*R) - a*x + (a + b)* max(max(-L,-L + x), min(L,L + x)))/sqrt(a + b))\n          -erf((-(b*R) - a*x + (a + b)*max(-L,-L + x))/sqrt(a + b)))) /\n        (2. * sqrt(a + b) * sqrt(constants::pi));\n    return result;\n  }\n};\n\n// periodic version of GConvGRNP\nstruct GConvGRP : public FunctionFunctorInterface<double, 1> {\n  GConvGRNP rnp;\n  coord_1d period;\n  GConvGRP(double a, double b, double R, double L)\n      : rnp(a, b, R, L), period{2 * L} {}\n  double operator()(const coord_1d &r) const {\n    return rnp(r) + rnp(r - period) + rnp(r + period);\n  }\n};\n\nint test_gconv(World& world) {\n    constexpr coord_t origin(0.0), lo = make_rx(-L), hi = make_rx(L);\n    double width = 2.0*L;\n    int success=0;\n\n    if (world.rank() == 0) print(\"Test gconv operation\");\n\n    real_function_t f = real_factory_t(world).f(g);\n    double error=f.trace()-1.0;\n    print(\"error in integral(g) \", error);\n    if (abs(error)>FunctionDefaults<NDIM>::get_thresh()) success++;\n    print(\"success 0 \", success);\n\n    real_function_t f1 = real_factory_t(world).f(g1);\n    error=f1.trace()-1.0;\n    print(\"error in integral(g1) \", error);\n    if (abs(error)>FunctionDefaults<NDIM>::get_thresh()) success++;\n    print(\"success 0 \", success);\n\n    // convolve with a normalized Gaussian kernel\n    std::vector< std::shared_ptr< Convolution1D<double> > > ops(1);\n    ops[0].reset(new GaussianConvolution1D<double>(k, width/sqrt(constants::pi),\n            width*width, 0, LatticeRange(false)));\n    real_convolution_t op(world, ops);\n\n    real_function_t opf = op(f);\n    error=opf.trace()-1.0;\n    print(\"error in integral(op(g)) \", error);\n    if (abs(error)>FunctionDefaults<NDIM>::get_thresh()) success++;\n    print(\"success 1 \", success);\n\n    real_function_t opf1 = op(f1);\n    error=opf1.trace()-1.0;\n    print(\"error in integral(op(g1)) \", error);\n    if (abs(error)>FunctionDefaults<NDIM>::get_thresh()) success++;\n    print(\"success 1b \", success);\n\n    real_function_t exact = real_factory_t(world).f(convg);\n    print(\"norm2(g conv g - exact)\", (opf - exact).norm2());\n    error = (opf - exact).norm2();\n    if (abs(error) > FunctionDefaults<NDIM>::get_thresh())\n      success++;\n    print(\"success 2 \", success);\n\n    if constexpr (NDIM == 1) {\n\n      real_function_1d exact1 = real_factory_1d(world).f(convg1);\n      print(\"norm2(g1 conv g1 - exact)\", (opf1 - exact1).norm2());\n      error = (opf1 - exact1).norm2();\n      if (abs(error) > FunctionDefaults<NDIM>::get_thresh())\n        success++;\n      print(\"success 2b \", success);\n\n      real_function_1d q = real_factory_1d(world).f(h);\n      error = q.trace();\n      print(\"error in integral(h) \", error);\n      if (abs(error) > FunctionDefaults<NDIM>::get_thresh())\n        success++;\n      print(\"success 3 \", success);\n\n      error = q.norm2() - sqrt(sqrt(2.0 * constants::pi));\n      print(\"error in norm2(h)\", error);\n      if (abs(error) > FunctionDefaults<NDIM>::get_thresh())\n        success++;\n      print(\"success 4 \", success);\n\n      real_function_1d opq = op(q);\n      exact = real_factory_1d(world).f(gconvh);\n      error = (opq - exact).norm2();\n      print(\"norm2(g conv h - exact)\", error);\n      if (abs(error) > FunctionDefaults<NDIM>::get_thresh())\n        success++;\n      print(\"success 5 \", success);\n\n      // test the convolution with a derivative Gaussian:\n      // result(y) = \\int g'(x-y) f(x) = \\int g(x-y) f'(x)\n      // where we use\n      // f(x)      = exp(-x^2) / sqrt(pi)\n      // f'(x)     = -2 x exp(-x^2) / sqrt(pi)\n      // result(y) = -y exp(-y/2) / sqrt(2 pi)\n\n      // the derivative Gaussian convolution kernel:\n      // note the scaling of the coeffs because the derivative operator brings\n      // down the scaling factor of the exponent\n      ops[0].reset(new GaussianConvolution1D<double>(\n          k, 1.0 / sqrt(constants::pi), width * width, 1, LatticeRange(false)));\n\n      real_convolution_1d oph(world, ops);\n\n      // this is the result hardwired\n      const real_function_1d convpg = real_factory_1d(world).f(conv_prime_g);\n\n      // apply the derivative Gaussian on f\n      opq = oph(f);\n\n      // apply the Gaussian on the derivative of f\n      const real_function_1d fp = real_factory_1d(world).f(gprime);\n      real_function_1d opfp = op(fp);\n\n      // the error\n      const double error1 = (opq - convpg).norm2();\n      const double error2 = (opfp - convpg).norm2();\n      print(\"norm2(conv' g - exact)\", error1);\n      print(\"norm2(conv g' - exact)\", error2);\n      if (abs(error1) > FunctionDefaults<NDIM>::get_thresh())\n        success++;\n      print(\"success 6a \", success);\n      if (abs(error2) > FunctionDefaults<NDIM>::get_thresh())\n        success++;\n      print(\"success 6b \", success);\n\n      plot_line(\"opf.dat\", npts, lo, hi, q, opq, convpg);\n    }\n\n    ///////////////////////////////////////////////////\n    // test convolution with range restricted Gaussians\n    ///////////////////////////////////////////////////\n\n    // validate BoxSurfaceDisplacementRange by making sure\n    // - it does not produce duplicate displacements\n    {\n      constexpr auto ND = 2;\n      const int n = 4;\n      Key<ND> key(n, Vector<Translation, ND>(1<<(n-1)));\n\n      std::size_t disp_count = 0;\n      const auto process_surface_displacements =\n          [&]() {\n            std::array<std::optional<std::int64_t>, ND> box_radius;\n            std::array<std::optional<std::int64_t>, ND> surface_thickness;\n            for (int d = 0; d != ND; ++d) {\n              box_radius[d] = 1;\n              surface_thickness[d] = 1;\n            }\n            BoxSurfaceDisplacementRange<ND> range_boundary_face_displacements(\n                key, box_radius, surface_thickness, array_of_bools<ND>{false},\n                [&](const auto level, const auto &dest, const auto &displacement) -> bool {\n                  // skip displacements not in domain\n                  const auto twon = (1 << level);\n                  for (auto d = 0; d != ND; ++d) {\n                    if (dest[d].has_value()) {\n                      if (dest[d] < 0 ||\n                          dest[d] >= twon)\n                        return false;\n                    }\n                  }\n                  return true;\n                });\n            std::vector<Key<ND>> disps;\n            for (auto &&disp : range_boundary_face_displacements) {\n//              std::cout << \"disp = \" << disp << \" dest = \" << key.neighbor(disp)\n//                        << std::endl;\n              disps.push_back(disp);\n              ++disp_count;\n            }\n            std::sort(disps.begin(), disps.end());\n            auto it = std::unique(disps.begin(), disps.end());\n\n            if (it != disps.end()) {\n              std::cout << \"Duplicates found!!\" << std::endl;\n              success++;\n            }\n          };\n      process_surface_displacements();\n    }\n\n    // now test the convolutions\n    if constexpr (NDIM == 1) {\n\n      int nerrors = 0;\n\n      // gaussian exponents in *user* coordinates\n      const std::vector<double> gaussian_exponents = {1 / (width * width), 1., 1e4, 1e8};\n      std::vector<std::pair<real_function_t, real_function_t>> gaussians_01;\n      for (const auto gaussian_exponent : gaussian_exponents) {\n        auto factory = real_factory_t(world);\n        auto make_gaussian = [&](const auto O) {\n          real_function_1d result =\n              factory.special_points(std::vector<coord_t>{coord_t(O)}).initial_level(15)\n                  .functor(G(gaussian_exponent, O));\n          result.truncate();\n          return result;\n        };\n        gaussians_01.emplace_back(make_gaussian(0), make_gaussian(1));\n      }\n\n      const std::vector<double> kernel_exponents = {1/(width*width), 1., 25., 1e4};\n\n      // some tests do not pass with default tolerances\n      using α_β_O_opstr_t = std::tuple<double, double, std::size_t,std::string>;\n      const std::map<α_β_O_opstr_t,double> custom_thresholds =\n          {\n              {std::tuple{kernel_exponents[1], gaussian_exponents[2], 0, \"RNP\"}, 2e-4},\n              {std::tuple{kernel_exponents[3], gaussian_exponents[0], 0, \"NP\"}, 2e-4},\n              {std::tuple{kernel_exponents[3], gaussian_exponents[0], 1, \"NP\"}, 2e-4},\n              {std::tuple{kernel_exponents[3], gaussian_exponents[0], 0, \"RNP\"}, 2e-4},\n              {std::tuple{kernel_exponents[3], gaussian_exponents[0], 1, \"RNP\"}, 2e-4}\n          };\n\n      // kernel exponents in *simulation* coordinates\n      for (const auto kernel_exponent : kernel_exponents) {\n        for (const auto sigma : {0}) {\n          KernelRange range(1, sigma / (2 * L));\n\n          // nonperiodic range-unlimited kernel\n          ops[0].reset(new GaussianConvolution1D<double>(\n              k, sqrt(kernel_exponent / constants::pi), kernel_exponent,\n              /* deriv */ 0,\n              /* lattice summed? */ LatticeRange(false),\n              /* bloch_k */ 0.)); // range unrestricted\n          real_convolution_t opnp(world, ops);\n\n          // nonperiodic range-restricted kernel\n          ops[0].reset(new GaussianConvolution1D<double>(\n              k, sqrt(kernel_exponent / constants::pi), kernel_exponent,\n              /* deriv */ 0,\n              /* lattice summed? */ LatticeRange(false), /* bloch_k */ 0.,\n              range)); // range restricted\n          real_convolution_t oprnp(world, ops);\n          oprnp.set_domain_periodicity(array_of_bools<NDIM>{false});\n          // periodic range-restricted kernel implemented by expicit lattice sum\n          real_convolution_t oprp2(world, ops);\n          oprp2.set_domain_periodicity(array_of_bools<NDIM>{true});\n\n          // periodic range-restricted kernel\n          ops[0].reset(new GaussianConvolution1D<double>(\n              k, sqrt(kernel_exponent / constants::pi), kernel_exponent,\n              /* deriv */ 0,\n              /* lattice summed? */ LatticeRange(true), /* bloch_k */ 0.,\n              range)); // range restricted\n          real_convolution_t oprp(world, ops);\n          FunctionDefaults<NDIM>::set_bc(BC_PERIODIC);\n\n          // print out norms vs displacement length\n          //      std::cout << \"RNP norms\\n\";\n          //      for (int n = 0; n <= 10; ++n) {\n          //        for (int l = 0; l <= ((1 << n) + 5); ++l) {\n          //          std::cout << \"n=\" << n << \" l=\" << l << \" ||op_{n,l}||=\"\n          //                    << oprnp.norm(n, Key<NDIM>(n, Vector<Translation, NDIM>(l)),\n          //                                  Key<NDIM>(n, Vector<Translation, NDIM>(0)))\n          //                    << \"\\n\";\n          //        }\n          //      }\n          //      std::cout << std::endl;\n\n          for (size_t ig = 0; ig != gaussians_01.size(); ++ig) {\n            const auto &[g, g1] = gaussians_01[ig];\n            const auto gaussian_exponent = gaussian_exponents[ig];\n\n            auto check = [&](const auto &op, const auto &f,\n                             const std::size_t R) {\n              const auto rr = op.range_restricted();\n              const auto lattice_summed = op.lattice_summed().any();\n              const auto periodic = lattice_summed || op.func_domain_is_periodic().any();\n              if (!rr)\n                MADNESS_ASSERT(!periodic);\n              const std::string opstr = !rr ? \"NP\" : (periodic ? (lattice_summed ? \"RP\" : \"RP2\") : \"RNP\");\n              const auto V = op(f);\n              real_function_t V_exact;\n              auto factory = real_factory_t(world).special_points(\n                  std::vector<coord_t>{coord_t(R)});\n              if (!rr) {\n                V_exact = factory.functor(GConvGNP(kernel_exponent / (width * width), gaussian_exponent, R, L));\n              } else {\n                if (!periodic) {\n                  V_exact = factory.functor(GConvGRNP(kernel_exponent / (width * width), gaussian_exponent, R, L));\n                } else {\n                  V_exact = factory.functor(GConvGRP(kernel_exponent / (width * width), gaussian_exponent, R, L));\n                }\n              }\n              V_exact.truncate();\n\n              const auto error2 = (V - V_exact).norm2();\n              std::cout << opstr << \"[α=\" << (kernel_exponent/(width*width));\n              if (op.range_restricted())\n                std::cout << \", σ=\" << sigma;\n              std::cout << \"](|x-y|) * g[\" << gaussian_exponent << \"](x\";\n              if (R > 0)\n                std::cout << \"-\" << R;\n              std::cout << \"): ||mra-exact|| = \" << std::scientific << error2;\n              const auto default_error2_tol = thresh * 1e2;\n              // look for overriden tolerances\n              auto it = custom_thresholds.find(std::tuple{kernel_exponent, gaussian_exponent, R, opstr});\n              const auto error2_tol = (it != custom_thresholds.end()) ? it->second : default_error2_tol;\n              if (error2 > error2_tol) {\n                ++nerrors;\n                std::cout << \" (FAIL)\";\n              }\n              std::cout << std::endl;\n\n              // optional plotting\n              if constexpr (false) {\n                const std::string ndstr =\n                    (std::string(\"-\") + std::to_string(NDIM) + \"d\");\n                const std::string Rstr = \"-R=\" + std::to_string(R);\n                const std::string ostr = \"-\" + opstr;\n                const std::string sigmastr =\n                    sigma > 0 ? (std::string(\"-σ=\") + std::to_string(sigma)) : \"\";\n                const std::string suffix = ndstr + ostr + Rstr + sigmastr;\n\n                auto to_string = [](const double &x) {\n                  if (double(int64_t(x)) == x) {\n                    return std::to_string((int64_t)x);\n                  }\n                  else {\n                    char buf[100];\n                    if (x >= 1) {\n                      snprintf(buf, 100, \"%f\", x);\n                    }\n                    else {\n                      const auto width = (int)(-floor(log10(x)));\n                      std::string fmt = \"%.\" + std::to_string(width) + \"f\";\n                      snprintf(buf, 100, fmt.c_str(), x);\n                    }\n                    return std::string(buf);\n                  }\n                };\n                plot_line((std::string(\"gconv-\") + to_string(kernel_exponent) +\n                           \"-g-\" + to_string(gaussian_exponent*width*width) + suffix + \".dat\")\n                              .c_str(),\n                          npts, lo, hi, V, V_exact);\n              }\n            };\n\n            auto check_rp_vs_rp2 = [&](const auto &oprp, const auto &oprp2, const auto &f,\n                                       const std::size_t R) {\n              const auto V = oprp(f);\n              const auto V2 = oprp2(f);\n\n              const auto error2 = (V - V2).norm2();\n              std::cout << \"op[α=\" << (kernel_exponent / (width * width));\n              if (op.range_restricted())\n                std::cout << \", σ=\" << sigma;\n              std::cout << \"](|x-y|) * g[\" << gaussian_exponent << \"](x\";\n              if (R > 0)\n                std::cout << \"-\" << R;\n              std::cout << \"): ||RP-RP2|| = \" << std::scientific << error2;\n              const auto default_error2_tol = thresh * 1e2;\n              const auto error2_tol = default_error2_tol;\n              if (error2 > error2_tol) {\n                ++nerrors;\n                std::cout << \" (FAIL)\";\n              }\n              std::cout << std::endl;\n            };\n\n            check(opnp, g, 0);\n            check(opnp, g1, 1);\n            check(oprnp, g, 0);\n            check(oprnp, g1, 1);\n            check(oprp, g, 0);\n            check(oprp, g1, 1);\n            check(oprp2, g, 0);\n            check(oprp2, g1, 1);\n\n            check_rp_vs_rp2(oprp, oprp2, g, 0);\n            check_rp_vs_rp2(oprp, oprp2, g1, 1);\n\n          }\n\n          // linearity test\n          {\n            std::vector<std::reference_wrapper<const real_convolution_1d>> ops{\n                opnp, oprnp, oprp, oprp2};\n            const std::vector<std::string> op_labels = {\"NP\", \"RNP\", \"RP\", \"RP2\"};\n            for(size_t iop=0; iop!=ops.size(); ++iop) {\n              const auto &op = ops[iop].get();\n              const auto &opstr = op_labels[iop];\n              // evaluate op(f1+ f2 + ...) - op(f1) - op(f2) - ...\n              real_function_1d error_0, fsum_0;\n              real_function_1d error_1, fsum_1;\n              for (size_t i = 0; i != gaussians_01.size(); ++i) {\n                const auto &[g, g1] = gaussians_01[i];\n                if (i == 0) {\n                  fsum_0 = copy(g);\n                  fsum_1 = copy(g1);\n                  error_0 = -1 * op(g);\n                  error_1 = -1 * op(g1);\n                } else {\n                  fsum_0 += g;\n                  fsum_1 += g1;\n                  error_0 -= op(g);\n                  error_1 -= op(g1);\n                }\n              }\n              error_0 += op(fsum_0);\n              error_1 += op(fsum_1);\n\n              const auto error_tol = thresh * 3e2;\n              const auto error_0_norm2 = error_0.norm2();\n              std::cout << opstr\n                        << \" linearity test 0: ||op(f1 + f2 + ...) - op(f1) - op(f2) - ...|| = \"\n                        << error_0_norm2;\n              if (error_0_norm2 > error_tol) {\n                ++nerrors;\n                std::cout << \" (FAIL)\";\n              }\n              std::cout << std::endl;\n              const auto error_1_norm2 = error_1.norm2();\n              std::cout << opstr\n                        << \" linearity test 1: ||op(f1 + f2 + ...) - op(f1) - op(f2) - ...|| = \"\n                        << error_1_norm2;\n              if (error_1_norm2 > error_tol) {\n                ++nerrors;\n                std::cout << \" (FAIL)\";\n              }\n              std::cout << std::endl;\n            }\n          }\n\n        }\n      }\n\n      success += nerrors;\n    }\n\n    world.gop.fence();\n    return success;\n}\n\n\nint main(int argc, char**argv) {\n    auto&& world = initialize(argc,argv);\n\n    int success=0;\n    try {\n        startup(world,argc,argv);\n\n        FunctionDefaults<NDIM>::set_cubic_cell(-L,L);\n        FunctionDefaults<NDIM>::set_k(k);\n        FunctionDefaults<NDIM>::set_thresh(thresh);\n        FunctionDefaults<NDIM>::set_refine(true);\n        FunctionDefaults<NDIM>::set_initial_level(5);\n        FunctionDefaults<NDIM>::set_truncate_mode(1);\n        if (world.rank()==0) {\n        \tprint(\" threshold  \", thresh);\n        \tprint(\" polynomial \", k,\"\\n\");\n        }\n\n        FunctionDefaults<2>::set_cubic_cell(-L,L);\n        FunctionDefaults<2>::set_k(k);\n        FunctionDefaults<2>::set_thresh(thresh);\n        FunctionDefaults<2>::set_refine(true);\n        FunctionDefaults<2>::set_initial_level(5);\n        FunctionDefaults<2>::set_truncate_mode(1);\n\n        success+=test_gconv(world);\n\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n//    catch (const char* s) {\n//        print(s);\n//        error(\"caught a c-string exception\");\n//    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    world.gop.fence();\n    finalize();\n\n    return success;\n}\n\n"
  },
  {
    "path": "src/madness/mra/testinnerext.cc",
    "content": "\n\n#include <madness/mra/mra.h>\n#include <array>\nusing namespace madness;\n\nbool smalltest = true;\n\ndouble ttt, sss;\n#define START_TIMER world.gop.fence(); ttt=wall_time(); sss=cpu_time()\n#define END_TIMER(msg) ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf(\"timer: %-20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt)\n\ntypedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\n\nstatic const double R = 1.4;    // bond length\nstatic const double L = 5.0*R; // box size\nstatic const long k = 6;        // wavelet order\nstatic const double thresh = 1e-6; // precision\n\nstatic double alpha_func(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return ((x*x + y*y + z*z) * sin(x*x + y*y + z*z));\n};\n\nstatic double beta_func(const coord_3d& r) {\n    const double x=r[0], y=r[1], z=r[2];\n    return (exp(- x*x - y*y - z*z));\n};\n\nclass alpha_functor : public FunctionFunctorInterface<double,3> {\nprivate:\n    double coeff;\npublic:\n    alpha_functor(double coeff=1.0) : coeff(coeff) {}\n\n    virtual double operator()(const coord_3d& r) const {\n        const double x=r[0], y=r[1], z=r[2];\n        return (coeff * (x*x + y*y + z*z) * sin(x*x + y*y + z*z));\n    }\n};\n\nclass beta_functor : public FunctionFunctorInterface<double,3> {\nprivate:\n    double coeff;\npublic:\n    beta_functor(double coeff=1.0) : coeff(coeff) {}\n\n    virtual double operator()(const coord_3d& r) const {\n        return (coeff * exp(- r[0]*r[0] - r[1]*r[1] - r[2]*r[2]));\n    }\n};\n\nstruct gauss_1d {\n    gauss_1d(double s) : s(s) {}\n    double s=1.0;\n    double operator()(const double x) const {return 1.0/(s * std::pow(constants::pi,0.25))* exp(-0.5*x*x/(s*s));}\n};\ntemplate<typename T, std::size_t NDIM>\nstruct gauss {\n    std::array<double,NDIM> e;\n    gauss(const std::array<double,NDIM> exponent) : e(exponent) {};\n\n    T operator()(const Vector<double,NDIM>& coord) const {\n        double result=1.0;\n        for (std::size_t i=0; i<NDIM; ++i) result*=gauss_1d(e[i])(coord[i]);\n        return result;\n    }\n};\n\nbool is_like(double a, double b, double tol) {\n    return (std::abs((a - b)/a) <= tol);\n}\nbool test(std::string msg, double a, double b, double tol=thresh) {\n    int len=msg.size();\n    std::string padding(40-len,' ');\n    bool ok=(std::abs((a - b)/a) <= tol);\n    print(msg+padding,a,b,std::abs((a-b)/a),ok);\n    return ok;\n}\nbool test_loose1(std::string msg, double a, double b, double tol=thresh) {\n    return test(msg,a,b,tol*10.0);\n}\n\n\nint test_tight_diffuse(World& world) {\n    FunctionDefaults<4>::set_thresh(1.e-5);\n    double a=1.e2;\n    double b=1.e-2;\n    for (int i=0; i<4; ++i) {\n        a=std::pow(10.0,double(i));\n        b=std::pow(0.1,double(i));\n        print(\"a,b\",a,b);\n\n        real_function_2d aa=real_factory_2d(world).functor([&](const coord_2d& r){return exp(-a*inner(r,r));});\n        real_function_2d bb=real_factory_2d(world).functor([&](const coord_2d& r){return exp(-b*inner(r,r));});\n        real_function_4d cc=real_factory_4d(world).functor([&](const coord_4d& r){return exp(-b*inner(r,r));});\n        real_function_4d dd=CompositeFactory<double,4,2>(world).particle1(aa).particle2(copy(aa));\n        aa.print_size(\"exp(-1000 r^2\");\n        bb.print_size(\"exp(-0.001 r^2\");\n        double result=inner(cc,dd);\n        double refresult=std::pow(constants::pi/(a+b),2.0);\n        print(\"result,refresult,error\",result,refresult,result-refresult);\n        MADNESS_CHECK(test(\" inner(exp(-a r^2 , exp(-b r^2))  \", result,refresult));\n    }\n\n\n\n\n    return 0;\n\n\n}\n\nint test_partial_inner(World& world) {\n    bool do_low_rank=false;\n#if HAVE_GENTENSOR\n    do_low_rank=true;\n#endif\n    print(\"\\ntesting partial inner; low rank: \",do_low_rank,\"\\n\");\n\n    real_function_1d one_1d=real_factory_1d(world).functor([](const coord_1d& r){return 1.0;});\n    real_function_2d one_2d=real_factory_2d(world).functor([](const coord_2d& r){return 1.0;});\n    real_function_1d g1=real_factory_1d(world).functor(gauss<double,1>({1.0}));\n    real_function_1d g2=real_factory_1d(world).functor(gauss<double,1>({2.0}));\n    real_function_1d g3=real_factory_1d(world).functor(gauss<double,1>({3.0}));\n//    real_function_1d g3=real_factory_1d(world).functor([](const Vector<double,1>& r) {return exp(r[0])*cos(r[0]);} );\n    real_function_1d g4=real_factory_1d(world).functor(gauss<double,1>({4.0}));\n\n    real_function_2d f2=real_factory_2d(world).functor(gauss<double,2>({1.0,2.0}));\n    if (do_low_rank) FunctionDefaults<2>::set_tensor_type(TT_2D);\n    real_function_2d f2_svd=real_factory_2d(world).functor(gauss<double,2>({1.0,2.0}));\n    FunctionDefaults<2>::set_tensor_type(TT_FULL);\n    real_function_2d f2_swap=real_factory_2d(world).functor(gauss<double,2>({2.0,1.0}));\n    real_function_2d f2_tight=real_factory_2d(world).functor(gauss<double,2>({3.0,4.0}));\n    real_function_3d f3=real_factory_3d(world).functor(gauss<double,3>({1.0,2.0,3.0}));\n//    real_function_3d f3=real_factory_3d(world).functor([](const Vector<double,3>& r) {return gauss<double,2>({1.0,2.0})({r[0],r[1]}) * exp(r[2])*cos(r[2]);});\n\n    double g11=inner(g1,g1);\n    double g12=inner(g1,g2);\n    double g13=inner(g1,g3);\n    double g14=inner(g1,g4);\n    double g22=inner(g2,g2);\n    double g23=inner(g2,g3);\n    double g24=inner(g2,g4);\n    double g33=inner(g3,g3);\n    // double g34=inner(g3,g4);\n    // double g44=inner(g4,g4);\n\n    {   // test unevenly refined functions\n        real_function_2d f12=real_factory_2d(world)\n                .functor([](const coord_2d& r) {\n                    return exp(-abs(r[0]-r[1]));\n                });\n\n        print(\"done with projection\");\n        real_function_2d r = inner(f2, f12, {0}, {0});\n    }\n    {\n        real_function_2d r = inner(f2, f2, {0}, {1});\n        double n=inner(f2,r);\n//        MADNESS_CHECK(test(\" int f2(1,2)*f2(2,1) d1 (full)\", n,g12*g12*g12));\n        test(\" int f2(1,2)*f2(2,1) d1 (full)\", n,g12*g12*g12);\n\n\n        FunctionDefaults<2>::set_tensor_type(TT_2D);\n        real_function_2d r_svd = inner(f2_svd, f2_svd, {0}, {1});\n        FunctionDefaults<2>::set_tensor_type(TT_FULL);\n        // double n_svd=inner(f2_svd,r_svd);\n        MADNESS_CHECK(test(\" int f2(1,2)*f2(2,1) d1 (svd)\", n,g12*g12*g12));\n    }\n    {\n        real_function_1d r=inner(f2_svd,g1,{0},{0});\n        double n=inner(g1,r);\n        MADNESS_CHECK(test(\" int f2(1,2)*g1(1) d1  \", n,g11*g12));\n    }\n    if (do_low_rank) {\n        FunctionDefaults<6>::set_thresh(1.e-4);\n        FunctionDefaults<6>::set_tensor_type(TT_2D);\n//        real_function_6d f6=real_factory_6d(world).functor(gauss<double,6>({1.0,2.0,3.0,1.0,2.0,3.0}));\n        real_function_6d f6=hartree_product(f3,f3);\n        double cpu0=cpu_time();\n        double p1 = inner(f6.project_out(f3, 1), f3);\n        double cpu1=cpu_time();\n        double p2 = inner(inner(f6,f3, {0,1,2},{0,1,2}), f3);\n        double cpu2=cpu_time();\n        MADNESS_CHECK(test_loose1(\"project_out 1 \", p1, g11*g22*g33*g11*g22*g33));\n        MADNESS_CHECK(test_loose1(\"project_out 2 \", p2, g11*g22*g33*g11*g22*g33));\n        print(\"timings project_out, partial_inner\",cpu1-cpu0, cpu2-cpu1);\n    }\n    {\n        real_function_1d r=inner(f2_svd,g1,{1},{0});\n        double n=inner(g3,r);\n        MADNESS_CHECK(test(\" int f2(1,2)*g1(2) d2  \", n,g12*g13));\n    }\n    {\n        real_function_1d r=inner(g1,f2_svd,{0},{1});\n        double n=inner(g3,r);\n        MADNESS_CHECK(test(\" int g1(2)*f2(1,2) d2  \", n,g12*g13));\n    }\n    {\n        real_function_1d r=inner(g1,f2_svd,{0},{0});\n        double n=inner(g3,r);\n        MADNESS_CHECK(test(\" int g1(1)*f2(1,2) d1 (svd) \", n,g11*g23));\n    }\n    {\n        real_function_1d r=inner(g1,f2,{0},{0});\n        double n=inner(g3,r);\n        MADNESS_CHECK(test(\" int g1(1)*f2(1,2) d1 (full) \", n,g11*g23));\n    }\n\n    {\n\n        double c1=inner(inner(f2,g2,{0},{0}),g3);\n        MADNESS_CHECK(test(\" int f(1,2)*g2(1) d1 \", c1, g12 * g23));\n\n        double c2=inner(inner(f2,g2,{1},{0}),g3);\n        MADNESS_CHECK(test(\"result 1 - 2\", c2, g22 * g13));\n\n        double c3=inner(inner(g1,f2,{0},{0}),g3);\n        MADNESS_CHECK(test(\"result 1 - 3\", c3, g11 * g23));\n\n        double c4=inner(inner(g1,f2,{0},{1}),g3);\n        MADNESS_CHECK(test(\"result 1 - 4\", c4, g12 * g13));\n    }\n    {\n        double c1 = inner(inner(f2, f2, {0}, {0}), f2_tight);\n        MADNESS_CHECK(test(\" f2 f2 0 0\", c1, g11 * g23 * g24));\n\n        double c2 = inner(inner(f2, f2, {0}, {1}), f2_tight);\n        MADNESS_CHECK(test(\" f2 f2 0 1\", c2, g12 * g23 * g14));\n\n        double c3 = inner(inner(f2, f2, {1}, {0}), f2_tight);\n        MADNESS_CHECK(test(\" f2 f2 1 0 \", c3, g12 * g13 * g24));\n\n        double c4 = inner(inner(f2, f2, {1}, {1}), f2_tight);\n        MADNESS_CHECK(test(\" f2 f2 1 1\", c4, g22 * g13 * g14));\n    }\n\n    {\n        double c2 = inner(inner(f3, f2, {0}, {0}), f3);\n        MADNESS_CHECK(test(\" f3 f2 0 0\", c2, g11 * g12 * g23 * g23));\n\n        double c3 = inner(inner(f3, f2, {0}, {1}), f3);\n        MADNESS_CHECK(test(\" f3 f2 0 1\", c3, g12 * g12 * g13 * g23));\n\n        double c4 = inner(inner(f3, f2, {2}, {0}), f3);\n        MADNESS_CHECK(test(\" f3 f2 2 0\", c4, g11 * g22 * g13 * g23));\n\n        double c5 = inner(inner(f3, f2, {2}, {1}), f3);\n        MADNESS_CHECK(test(\" f3 f2 2 1\", c5, g11 * g22 * g13 * g23));\n\n        double c6 = inner(inner(f2, f3, {1}, {2}), f3);\n        MADNESS_CHECK(test(\" f2 f3 1 2\", c6, g11 * g12 * g23 * g23));\n\n    }\n    {\n        double c1=inner(inner(f2,f3,{0,1},{0,1}),g3);\n        MADNESS_CHECK(test(\" f2 f3 {01} {01}\", c1, g11 * g22 * g33));\n\n        double c2=inner(inner(f3,f2,{0,1},{0,1}),g3);\n        MADNESS_CHECK(test(\" f3 f2 {01} {01}\", c2, g11 * g22 * g33));\n\n        double c3=inner(inner(f3,f2,{1,2},{0,1}),g3);\n        MADNESS_CHECK(test(\" f3 f1 {12} {01}\", c3, g13 * g12 * g23));\n\n    }\n\n    return 0;\n}\n\ntemplate<std::size_t NDIM>\nvoid initialize(World& world) {\n    FunctionDefaults<NDIM>::set_defaults(world);\n    FunctionDefaults<NDIM>::set_k(k);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(5);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n    FunctionDefaults<NDIM>::set_cubic_cell(-L/2, L/2);\n}\nint main(int argc, char** argv) {\n    World& world=initialize(argc, argv,false);\n//    World world(SafeMPI::COMM_WORLD);\n\n    int success = 0;\n\n    startup(world,argc,argv,true);\n    std::cout.precision(6);\n\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n\n    initialize<1>(world);\n    initialize<2>(world);\n    initialize<3>(world);\n    initialize<4>(world);\n    initialize<5>(world);\n    initialize<6>(world);\n\n    test_partial_inner(world);\n    test_tight_diffuse(world);\n\n    if (!smalltest) {\n        real_function_3d alpha1 = real_factory_3d(world).f(alpha_func);\n        real_functor_3d alpha1_ffi = real_functor_3d(new alpha_functor());\n        \n        if (world.rank() == 0) {\n            print(\"***************************************************************************\");\n            print(\"alpha is a highly oscillatory function (x^2 sin(x^2)).\");\n            print(\"beta is a pretty boring Gaussian.\");\n            print(\"For the first two timers, the cost of computing alpha in\");\n            print(\"the numerical basis is not included. We see that since beta\");\n            print(\"is a simple Gaussian, it is cheaper to use the inner() method.\\n\");\n        }\n        \n        START_TIMER;\n        real_function_3d beta = real_factory_3d(world).f(beta_func);\n        double ab = alpha1.inner(beta);\n        END_TIMER(\"1. < a | b >)\");\n        \n        START_TIMER;\n        real_functor_3d beta_ffi = real_functor_3d(new beta_functor());\n        double ab_ffi = alpha1.inner_ext(beta_ffi);\n        END_TIMER(\"3. < a | b_ffi >\");\n        \n        if (world.rank() == 0) {\n            print(\"\\n***************************************************************************\");\n            print(\"For the next two timers, the cost of computing beta in\");\n            print(\"the numerical basis is not included. We see that since alpha\");\n            print(\"is complicated, it is cheaper to use the inner_ext() method.\\n\");\n        }\n        \n        START_TIMER;\n        real_function_3d alpha = real_factory_3d(world).f(alpha_func);\n        double ba = beta.inner(alpha);\n        END_TIMER(\"4. < b | a >\");\n        \n        START_TIMER;\n        real_functor_3d alpha_ffi = real_functor_3d(new alpha_functor());\n        double ba_ffi = beta.inner_ext(alpha_ffi);\n        END_TIMER(\"6. < b | a_ffi >\");\n        \n        double aa = alpha.inner(alpha);\n        double bb = beta.inner(beta);\n        \n        double aa_ffi = alpha.inner_ext(alpha_ffi);\n        double bb_ffi = beta.inner_ext(beta_ffi);\n        \n        if (world.rank() == 0) {\n            print(\"\\nTest for correctness\");\n            print(\"***************************************************************************\");\n            printf(\"<a|a> (using inner() with Function) =                      %7.10f\\n\", aa);\n            printf(\"<a|a> (using inner_ext() with FunctionFunctor Interface) = %7.10f\\n\", aa_ffi);\n            print(\"***************************************************************************\");\n            printf(\"<b|b> (using inner() with Function) =                      %7.10f\\n\", bb);\n            printf(\"<b|b> (using inner_ext() with FunctionFunctor Interface) = %7.10f\\n\", bb_ffi);\n            print(\"***************************************************************************\");\n            printf(\"<a|b> (using inner() with Function) =                      %7.10f\\n\", ab);\n            printf(\"<a|b> (using inner_ext() with FunctionFunctor Interface) = %7.10f\\n\", ab_ffi);\n            printf(\"<b|a> (using inner() with Function) =                      %7.10f\\n\", ba);\n            printf(\"<b|a> (using inner_ext() with FunctionFunctor Interface) = %7.10f\\n\", ba_ffi);\n            print(\"***************************************************************************\");\n        }\n        \n        real_function_3d alphabeta = real_factory_3d(world);\n        alphabeta = alpha + beta;\n        double aba = alphabeta.inner(alpha);\n        double aba_ffi = alphabeta.inner_ext(alpha_ffi);\n        \n        if (world.rank() == 0) {\n            print(\"\\nCheck that inner_ext works for Function that lacks a functor\");\n            print(\"***************************************************************************\");\n            printf(\"<a+b|a> (using inner() with Function) =                      %7.10f\\n\", aba);\n            printf(\"<a+b|a> (using inner_ext() with FunctionFunctor Interface) = %7.10f\\n\", aba_ffi);\n            print(\"***************************************************************************\");\n        }\n        \n        if (not is_like(aa, aa_ffi, thresh)) ++success;\n        if (not is_like(bb, bb_ffi, thresh)) ++success;\n        if (not is_like(ab, ab_ffi, thresh)) ++success;\n        if (not is_like(ab, ba_ffi, thresh)) ++success;\n    }\n\n    world.gop.fence();\n\n    finalize();\n    return success;\n}\n"
  },
  {
    "path": "src/madness/mra/testopdir.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file testopdir.cc\n/// \\brief test different operators in different directions\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/funcplot.h>\n#include <madness/constants.h>\n#include <madness/world/test_utilities.h>\n\nusing namespace madness;\n\nbool smalltest = false;\n\ntemplate <typename T, std::size_t NDIM>\nclass Gaussian : public FunctionFunctorInterface<T,NDIM> {\npublic:\n    typedef Vector<double,NDIM> coordT;\n    const coordT center;\n    const double exponent;\n    const T coefficient;\n\n    Gaussian(const coordT& center, double exponent, T coefficient)\n            : center(center), exponent(exponent), coefficient(coefficient) {};\n\n    T operator()(const coordT& x) const {\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        return coefficient*exp(-exponent*sum);\n    };\n};\n\n// The result of convolving a normalized Gaussian of expnt centered\n// at the origin with a product of normalized Gaussians with\n// different exponents in directions x, y, z.  The order of\n// the derivative of the kernel in direction d is m[d]\nclass OpFExact : public FunctionFunctorInterface<double,3> {\n    double expnts[3], fac;\n    int m[3];\n\npublic:\n    OpFExact(double expnt, const double (&expnts)[3], const int (&m)[3]) {\n        this->fac = 1.0;\n        for (int d=0; d<3; d++) {\n            this->m[d] = m[d];\n            this->expnts[d] = expnt*expnts[d]/(expnt+expnts[d]);\n\n            if (m[d] == 0)\n                fac *= this->expnts[d]/constants::pi;\n            else if (m[d] == 1)\n                fac *= std::pow(this->expnts[d],3.0)/constants::pi;\n            else if (m[d] == 2)\n                fac *= std::pow(this->expnts[d],5.0)/constants::pi;\n\n        }\n        this->fac = sqrt(fac);\n    }\n\n    double operator()(const coord_3d& r) const {\n        double e = fac*exp(-(expnts[0]*r[0]*r[0] + expnts[1]*r[1]*r[1] + expnts[2]*r[2]*r[2]));\n        for (int d=0; d<3; d++) {\n            if (m[d] == 1)\n                e *= -2.0*r[d];\n            else if (m[d] == 2)\n                e *=4.0*r[d]*r[d] - 2.0/expnts[d];\n        }\n        return e;\n    }\n};\n\nclass Charge : public FunctionFunctorInterface<double,3> {\npublic:\n    double operator()(const coord_3d& r) const {\n        static const double fac = std::pow(constants::pi,-1.5);\n        const double rsq = r[0]*r[0] + r[1]*r[1] + r[2]*r[2];\n        return fac*exp(-rsq);\n    }\n};\n\nclass DPot : public FunctionFunctorInterface<double,3> {\n    const int dir;\npublic:\n    DPot(int dir) : dir(dir) {}\n\n    double operator()(const coord_3d& r) const {\n        const double rsq = r[0]*r[0] + r[1]*r[1] + r[2]*r[2];\n        const double R = sqrt(rsq);\n        double dudr;\n\n        if (R>7.0) {\n            dudr = -1.0/rsq;\n        }\n        else if (R<0.01) {\n            dudr = (-.75225277806367504925+(.45135166683820502956+(-.16119702387078751056+0.41791821003537502737e-1*rsq)*rsq)*rsq)*R;\n        }\n        else {\n            dudr = 2*exp(-rsq)/(sqrt(constants::pi)*R) - erf(R)/rsq;\n        }\n\n        return dudr * r[dir] / R; // might need taylor expansion around r=0\n    }\n};\n\n\nint test_opdir(World& world) {\n    int success=0;\n\tconst coord_3d origin(0.0);\n    const double expnt=1.0, coeff=pow(expnt/constants::pi,1.5); // normalized gaussian with unit exponent\n    const double expnts[3] = {5.0,6.0,7.0};\n\n    if (world.rank() == 0)\n        print(\"Test different operations in different dirs\");\n\n    real_tensor cell(3,2);\n    cell(0,0)=-20; cell(0,1)=20; // Deliberately have different width and range in each dimension\n    cell(1,0)=-20; cell(1,1)=30;\n    cell(2,0)=-40; cell(2,1)=40;\n    //FunctionDefaults<3>::set_cubic_cell(-20,20);\n    FunctionDefaults<3>::set_cell(cell);\n\tDisplacements<3>::set_width(FunctionDefaults<3>::get_cell_width());\n    FunctionDefaults<3>::set_k(8);\n    FunctionDefaults<3>::set_thresh(1e-6);\n    //FunctionDefaults<3>::set_k(10);\n    //FunctionDefaults<3>::set_thresh(1e-8);\n    FunctionDefaults<3>::set_initial_level(3);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_autorefine(true);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_truncate_on_project(true);\n\n    real_function_3d f = real_factory_3d(world).functor(real_functor_3d(new Gaussian<double,3>(origin, expnt, coeff)));\n    f.truncate();\n\n    double norm = f.trace();\n    double ferr = f.err(Gaussian<double,3>(origin, expnt, coeff));\n    if (world.rank() == 0) print(\"norm of initial function\", norm, ferr);\n\n    const real_tensor width = FunctionDefaults<3>::get_cell_width();\n    const int k = FunctionDefaults<3>::get_k();\n\n    // These from previous computation with k=8 thresh=1e-6\n    // (error is consistently reduced as compute with higher accuracy)\n    const double errs[] = {5.8e-06, 5.2e-06, 2.1e-05, 5.0e-06, 8.1e-06, 2.0e-05,\n                           1.2e-05, 3.1e-05, 4.5e-05, 1.2e-05, 2.8e-05, 5.7e-05,\n                           1.0e-05, 4.2e-05, 5.0e-05, 3.2e-05, 6.0e-05, 5.4e-05,\n                           2.3e-05, 1.3e-04, 1.2e-04, 3.1e-05, 1.5e-04, 1.1e-04,\n                           1.5e-04, 2.0e-04, 2.5e-04 };\n\n    const char* msg[] = {\"FAIL <<<<<<<<<<<<<\",\"PASS\"};\n    int inderr = 0;\n\n    int mhi=1;\n    if (!smalltest) mhi=2;\n    for (int mx=0; mx<=mhi; mx++) {\n        for (int my=0; my<=mhi; my++) {\n            for (int mz=0; mz<=mhi; mz++) {\n                if (smalltest && mx+my+mz>1) break;\n                \n                const int m[3] = {mx,my,mz};\n                std::vector< ConvolutionND<double,3> > ops(1);\n                for (int d=0; d<3; d++) {\n                    double e = expnts[d]*width[d]*width[d];              // Exponent in sim coords\n                    double c = sqrt(expnts[d]/constants::pi)*width[d];   // Coeff of user-coords normalized gaussian scaled to sim coords\n                    c *= pow(width[d],-m[d]);\n                    ops[0].setop(d, std::shared_ptr< Convolution1D<double> >(\n                              new GaussianConvolution1D<double>(k, c, e, m[d], LatticeRange(false), 0.0)));\n                }\n\n                real_convolution_3d op(world, ops);\n                op.doleaves=true;\n\n                real_function_3d opf = op(f);\n                //double oval=opf(origin), ovalexact=OpFExact(expnt,expnts,m)(origin);\n                //if (world.rank() == 0) print(\"opf at origin\", oval, ovalexact);\n                double opfnorm = opf.norm2();\n                double opferr = opf.err(OpFExact(expnt,expnts,m));\n                const real_function_3d exact = real_factory_3d(world)\n                \t\t.functor(real_functor_3d(new OpFExact(expnt,expnts,m)));\n                double exactnorm=exact.norm2();\n\n\n\t\t\t\tbool correct=opferr < 1.1 * errs[inderr++];\n\t\t\t\tif (world.rank() == 0)\n\t\t\t\t\tprint(\"m =\", m, \", norm =\", opfnorm, \", norm exact =\",\n\t\t\t\t\t\t\texactnorm, \", err =\", opferr, msg[correct]);\n\t\t\t\tif (not correct) success++;\n\n                // This stuff useful for diagnosing problems\n                // for (int i=-10; i<=10; i++) {\n                //     coord_3d r(i*0.1);\n                //     double num = opf(r);\n                //     double anl = OpFExact(expnt,expnts,m)(r);\n                //     double rat = anl/num;\n                //     double err = anl-num;\n                //     print(\"     r =\", r, \", numeric =\", num, \", analytic =\", anl, \", anl-num =\", err, \", anl/num =\", rat);\n                // }\n            }\n        }\n    }\n\n    world.gop.fence();\n    return success;\n}\n\n\nint testgradG(World& world) {\n    // The potential due to a normalized gaussian with exponent 1.0 is\n    //\n    // u(r) = erf(r)/r\n    //\n    // du/dx = du/dr * dr/dx\n    //\n    // du/dr = 2*exp(-r^2)/(sqrt(Pi)*r)-erf(r)/r^2\n    //\n    // dr/dx = x/r\n\n\tint success=0;\n    real_tensor cell(3,2);\n    cell(0,0)=-20; cell(0,1)=20; // Deliberately have different width and range in each dimension\n    cell(1,0)=-20; cell(1,1)=30;\n    cell(2,0)=-40; cell(2,1)=40;\n\n    // This will give a uniform box\n    //cell(_,0)=-200;\n    //cell(_,1)= 200;\n\n    //FunctionDefaults<3>::set_cubic_cell(-20,20);\n\n    const int k = 10;\n    const double thresh = 1e-8;\n\n    FunctionDefaults<3>::set_cell(cell);\n\tDisplacements<3>::set_width(FunctionDefaults<3>::get_cell_width());\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_initial_level(3);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_autorefine(true);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_truncate_on_project(false);\n\n    std::vector<real_convolution_3d_ptr> g = GradCoulombOperator(world, 1e-3, thresh);\n\n    real_function_3d q = real_factory_3d(world).functor(real_functor_3d(new Charge()));\n    //q.truncate();\n    double chargeerr = q.trace()-1.0;\n    if (world.rank() == 0) print(\"err in Q\",chargeerr);\n\n    for (int d=0; d<3; d++) {\n        real_function_3d dq = (*g[d])(q);\n        double err = dq.err(DPot(d));\n        if (world.rank() == 0) {\n            if (err < 1.1e-05) print(d,err,\"PASS\");\n            else {\n            \tprint(d,err,\"FAIL\");\n            \tsuccess++;\n            }\n        }\n    }\n    return success;\n}\n\n\n\n/// test the various operators following op_type\ntemplate<std::size_t NDIM>\nint test_combined_operators(World& world) {\n    FunctionDefaults<NDIM>::set_cubic_cell(-20,20);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(1.e-5);\n\n    test_output t(\"testing combined operators\");\n//        t.set_cout_to_terminal();\n\n    // parameters for the convolutions\n    double mu=1.0;\n    double lo=1.e-6;\n    double thresh=FunctionDefaults<NDIM>::get_thresh();\n\n    // we assume these three are actually working and correct\n    auto slater=SeparatedConvolution<double,NDIM>(world,OperatorInfo(mu,lo,thresh,OT_SLATER));\n    auto slater2=SeparatedConvolution<double,NDIM>(world,OperatorInfo(2.0*mu,lo,thresh,OT_SLATER));\n    auto bsh=SeparatedConvolution<double,NDIM>(world,OperatorInfo(mu,lo,thresh,OT_BSH));\n    auto bsh2=SeparatedConvolution<double,NDIM>(world,OperatorInfo(2.0*mu,lo,thresh,OT_BSH));\n    auto coulomb=SeparatedConvolution<double,NDIM>(world,OperatorInfo(mu,lo,thresh,OT_G12));\n\n    for (int itype=int(OT_ONE); itype<int(OT_SIZE); ++itype) {\n        OpType type=OpType(itype);\n        if (type==OT_ONE) continue;\n        if (type==OT_G12) continue;\n        if (type==OT_BSH) continue;\n        if (type==OT_GAUSS) continue;\n        if (type==OT_SLATER) continue;\n\n        std::stringstream ss;\n        ss << type;\n        std::string type_str=ss.str();\n\n        // test construction\n        double mu=1.0;\n        double lo=1.e-6;\n        double thresh=FunctionDefaults<NDIM>::get_thresh();\n        OperatorInfo info(mu,lo,thresh,type);\n        SeparatedConvolution<double,NDIM> op(world,info);\n\n        // argument is a Gaussian function exp(-r^2) in any dimension\n        Function<double,NDIM> arg=FunctionFactory<double,NDIM>(world)\n                .functor([](const Vector<double,NDIM>& r){return exp(-inner(r,r));});\n\n        // test application\n        Function<double,NDIM> result=op(arg);\n        Function<double,NDIM> ref;\n        print(\"result norm\",result.norm2());\n        double fourpi=4.0*constants::pi;\n\n        // numerical checks\n        if (type==OT_F12) { // (1 - Slater)/(2 mu)\n            ref=0.5*(arg.trace() - slater(arg));\n        } else if (type==OT_F212) { // ((1 - Slater)/(2 mu) )^2  = 1/(4 mu^2) (1 - 2 Slater + Slater2 )\n            ref=0.25*(arg.trace() - 2*slater(arg) + slater2(arg));\n        } else if (type==OT_F2G12) { // ((1 - Slater)/(2 mu))^2 1/g  = 1/(4 mu^2) (g12 - 2 bsh + bsh2 )\n            ref=0.25*(coulomb(arg)- 2*fourpi*bsh(arg) + fourpi*bsh2(arg));\n        } else if (type==OT_FG12) {  // (1 - Slater)/(2 mu) 1/g  = 1/(2 mu) (g12 - bsh )\n            ref=0.5*(coulomb(arg)- fourpi*bsh(arg));\n        }\n        double error=(ref-result).norm2()/ref.norm2();\n        print(\"refnorm\",ref.norm2());\n        print(\"diff norm  \",(ref-result).norm2());\n\n        t.checkpoint(error,thresh,type_str);\n    }\n\n    return t.end();\n\n}\n\n\nint main(int argc, char**argv) {\n    World& world=initialize(argc,argv);\n    int success=0;\n\n    try {\n        startup(world,argc,argv);\n\n        if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n        for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n        std::cout << \"small test : \" << smalltest << std::endl;\n\n        success+=test_opdir(world);\n        success+=test_combined_operators<3>(world);\n        if (!smalltest) success+=testgradG(world);\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n//    catch (const char* s) {\n//        print(s);\n//        error(\"caught a c-string exception\");\n//    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    world.gop.fence();\n    finalize();\n\n    return success;\n}\n\n"
  },
  {
    "path": "src/madness/mra/testpdiff.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n\n#include <madness/mra/mra.h>\n#include <madness/constants.h>\n\n\nusing namespace std;\nusing namespace madness;\n\nstatic const std::size_t NDIM=3;\nstatic const double L=2.0; // Simulate in [0,L]^NDIM\n\ntypedef Vector<double,NDIM> coordT;\ntypedef Function<double,NDIM> functionT;\ntypedef FunctionFactory<double,NDIM> factoryT;\n\ndouble func(const coordT& r) {\n    // Test is product of cos(2*Pi*(d+1)/L + 0.2)\n    double result = 1.0;\n    for (std::size_t d=0; d<NDIM; ++d) {\n        double fac = 2.0*constants::pi/L;\n        result *= cos(fac*r[d] + 0.2);\n    }\n    return result;\n}\n\nstd::size_t axis; // Axis we are diffing\n\ndouble dfunc(const coordT& r) {\n    // Test is product of cos(2*Pi*(d+1)/L + 0.2)\n    double result = 1.0;\n    for (std::size_t d=0; d<NDIM; ++d) {\n        double fac = 2.0*constants::pi/L;\n        if (d == axis) {\n            result *= -fac*sin(fac*r[d] + 0.2);\n        }\n        else {\n            result *= cos(fac*r[d] + 0.2);\n        }\n    }\n    return result;\n}\n\nstruct FunctorInterfaceWrapper : public FunctionFunctorInterface<double,NDIM> {\n    double (*f)(const coordT&);\n\n    FunctorInterfaceWrapper(double (*f)(const coordT&)) : f(f) {}\n\n    double operator()(const coordT& x) const {return f(x);}\n};\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    startup(world,argc,argv);\n    FunctionDefaults<NDIM>::set_cubic_cell(0.0,L);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(1e-6);\n\n    Tensor<int> bc_periodic(NDIM,2);\n    bc_periodic.fill(1);\n\n    BoundaryConditions<NDIM> bc(BC_PERIODIC);\n\n    functionT f = factoryT(world).f(func);\n\n    int success=0;\n\n    for (axis=0; axis<NDIM; ++axis) {\n        Derivative<double,NDIM> dx(world, axis, bc);\n        functionT df = dx(f) ;\n        double err = df.err(FunctorInterfaceWrapper(dfunc));\n        if (world.rank() == 0) print(axis,\"error\",err);\n\n        if (err>4e-5) success++;\n    }\n\n    finalize();\n    return success;\n}\n"
  },
  {
    "path": "src/madness/mra/testper.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file testper.cc\n/// \\brief test the periodic convolution operator\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n\ntypedef Vector<double,1> coordT;\n\ndouble constant(const coordT& x) {\n    return 1.0;\n}\n\ndouble q(double x, double a) {\n    return 0.5*(erf(sqrt(a)*x)-erf(-sqrt(a)+sqrt(a)*x));\n}\n\nint test_per(World& world) {\n    int k = 10;\n    double thresh = 1e-10;\n\n    FunctionDefaults<1>::set_cubic_cell(0.0,1.0);\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<1>::set_truncate_mode(0);\n    FunctionDefaults<1>::set_truncate_on_project(false);\n\n    Tensor<double> coeff(1L), expnt(1L);\n    expnt[0] = 10000.0;\n    coeff[0] = sqrt(expnt[0]/constants::pi);\n    print(coeff,expnt);\n    double lo=1.e-6; thresh=1.e-4;  // dummy values\n    SeparatedConvolution<double,1> op(world, coeff, expnt, lo, thresh);\n\n    Function<double,1> f = FunctionFactory<double,1>(world).f(constant).initial_level(3).norefine();\n\n    Function<double,1> opf = apply(op,f);\n\n    f.reconstruct();\n\n    int success=0;\n    for (int i=0; i<101; ++i) {\n        double x = i*0.01;\n        double error=opf(x)-q(x,expnt[0]);\n        printf(\"%.2f %.8f %.8f %10.2e\\n\", x, f(x), opf(x), error);\n        // FIXME: is this a sensible criterion??\n        if ((x>0.2) and (x<0.8) and (error>thresh)) success++;\n    }\n    return success;\n}\n\n\nint main(int argc, char**argv) {\n\n    World& world=initialize(argc, argv);\n\n    int success=0;\n    try {\n        startup(world,argc,argv);\n\n        success=test_per(world);\n\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n//    catch (const char* s) {\n//        print(s);\n//        error(\"caught a c-string exception\");\n//    }\n    catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    world.gop.fence();\n    SafeMPI::Finalize();\n\n    return success;\n}\n\n"
  },
  {
    "path": "src/madness/mra/testperiodic.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/// \\file testperiodic.cc\n/// \\brief test periodic convolutiosn\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n\ntypedef Vector<double,3> coordT;\n\nconst char* status[2] = {\"FAIL !!!!!\",\"PASS\"};\n\nconst double L = 3.0;  // [-L,L]\nconst int nwave = 2;\n\ndouble source(const coordT& r) {\n    return cos(nwave*constants::pi*r[0]/L)*cos(nwave*constants::pi*r[1]/L)*cos(nwave*constants::pi*r[2]/L);\n}\n\ndouble source1(const coord_1d& r) {\n    return cos(nwave*constants::pi*r[0]/L);\n}\n\ndouble u(const double x, const double expnt) {\n    double fac = nwave*constants::pi/(2.0*L);\n    return exp(-fac*fac/expnt) * cos(nwave*constants::pi*x/L);\n}\n\n// reciprocal lattice vectors (just the integers)\nint G0 = 1;\nint G1 = 2;\nint G2 = 2;\n// k-point in lattice coordinates\ndouble k0 = 1.0;\ndouble k1 = 1.0;\ndouble k2 = 0.0;\ndouble mu;\n\n// BSH equation\n// [-\\nabla^2 + mu^2] * lhs = rhs\ndouble_complex pw_lhs(const coord_3d& r)\n{\n  double_complex I_TWO_PI_DIV_L = double_complex(0.0,2.0*constants::pi/L);\n  double val = (G0+k0)*r[0]+(G1+k1)*r[1]+(G2+k2)*r[2];\n  return exp(I_TWO_PI_DIV_L*val);\n}\n\ndouble_complex pw_rhs(const coord_3d& r)\n{\n  double TWO_PI = 2.0*constants::pi;\n  double_complex I_TWO_PI_DIV_L = double_complex(0.0,TWO_PI/L);\n  double TWO_PI_DIV_L2 = TWO_PI*TWO_PI/L/L;\n  double coeff = TWO_PI_DIV_L2*(G0+k0)*(G0+k0) + TWO_PI_DIV_L2*(G1+k1)*(G1+k1)\n                 + TWO_PI_DIV_L2*(G2+k2)*(G2+k2) + mu*mu;\n  double val = (G0+k0)*r[0]+(G1+k1)*r[1]+(G2+k2)*r[2];\n  return coeff*exp(I_TWO_PI_DIV_L*val);\n}\n\n\n\n// The electrostatic potential due to cos(n*pi*x/L)*(ditto z)*(ditto y)\n// is ((4*L*L)/(3*n*n*pi))*cos(n*pi*x/L)\ndouble potential(const coordT& r) {\n    //const double fac = 1.0/(3*nwave*nwave*constants::pi);\n    double fac = 4*L*L/(3*nwave*nwave*constants::pi);\n    return source(r)*fac;\n}\n\nint test_periodic(World& world) {\n    int failed = 0;\n\n    // the convolution of cos(n*pi*x/L) with sqrt(a/pi)*exp(-a*x^2)\n    // is exp(-n^2*pi^2/(4*a*L^2)) * cos(n*pi*x/L)\n\n    const long k = 14;\n    const double thresh = 1e-12;\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_cubic_cell(-L,L);\n    FunctionDefaults<3>::set_thresh(thresh);\n    //FunctionDefaults<3>::set_initial_level(3);\n\n    Function<double,3> f = FunctionFactory<double,3>(world).f(source);\n    //f.truncate();\n\n    std::vector< std::shared_ptr< Convolution1D<double> > > ops(1);\n\n    std::cout.precision(10);\n    double width = 2*L;\n    for (int i=-4; i<=20; ++i) {\n        double expnt = pow(2.0,double(i));\n        double expnt_sim = expnt*width*width;\n        double coeff = sqrt(expnt/constants::pi);\n        double coeff_sim = coeff*width;\n        ops[0].reset(new GaussianConvolution1D<double>(k, coeff_sim, expnt_sim, 0, LatticeRange(true)));\n\n        SeparatedConvolution<double,3> op(world, ops);\n\n        Function<double,3> opf = op(f);\n\n        coordT r0(0);\n        coordT r1(L-0.1);\n\n        opf.reconstruct();\n        f.reconstruct();\n\n        double exact0 = u(r0[0],expnt); exact0 = exact0*exact0*exact0;\n        double exact1 = u(r1[0],expnt); exact1 = exact1*exact1*exact1;\n        double err0 = fabs(opf(r0)-exact0);\n        double err1 = fabs(opf(r1)-exact1);\n\n        print(\"exponent\", expnt, err0, err1, status[err0<1e-10 && err1<1e-10]);\n\tfailed += !(err0<1e-10 && err1<1e-10);\n\n        // print(i, expnt, r0, f(r0), source(r0), opf(r0), exact0, );\n        // print(i, expnt, r1, f(r1), source(r1), opf(r1), exact1, opf(r1)-exact1);\n        // char fname[256];\n        // sprintf(fname,\"plot-%d.dat\",i+1);\n        // coordT lo(0.0); lo[0]=-L;\n        // coordT hi(0.0); hi[0]= L;\n        // plot_line(fname, 1001, lo, hi, f, opf);\n    }\n\n    world.gop.fence();\n    return failed;\n}\n\n\nint test_periodic1(World& world) {\n\n    // the convolution of cos(n*pi*x/L) with sqrt(a/pi)*exp(-a*x^2)\n    // is exp(-n^2*pi^2/(4*a*L^2)) * cos(n*pi*x/L)\n\n    int failed = 0;\n\n    const long k = 14;\n    const double thresh = 1e-12;\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<1>::set_cubic_cell(-L,L);\n    FunctionDefaults<1>::set_thresh(thresh);\n    //FunctionDefaults<1>::set_initial_level(2);\n\n    Function<double,1> f = FunctionFactory<double,1>(world).f(source1); //.norefine();\n    //f.truncate();\n\n    std::vector< std::shared_ptr< Convolution1D<double> > > ops(1);\n\n    std::cout.precision(10);\n    double width = 2*L;\n    for (int i=-4; i<=20; ++i) {\n        double expnt = pow(2.0,double(i));\n        double expnt_sim = expnt*width*width;\n        double coeff = sqrt(expnt/constants::pi);\n        double coeff_sim = coeff*width;\n        ops[0].reset(new GaussianConvolution1D<double>(k, coeff_sim, expnt_sim, 0, LatticeRange(true)));\n\n        SeparatedConvolution<double,1> op(world, ops);\n\n        Function<double,1> opf = op(f);\n\n        coord_1d r0(0);\n        coord_1d r1(L-0.1);\n\n        opf.reconstruct();\n        f.reconstruct();\n\n        double exact0 = u(r0[0],expnt);\n        double exact1 = u(r1[0],expnt);\n        double err0 = fabs(opf(r0)-exact0);\n        double err1 = fabs(opf(r1)-exact1);\n\n        print(\"exponent\", expnt, err0, err1, status[err0<6e-10 && err1<6e-10]);\n\tfailed += !(err0<6e-10 && err1<6e-1);\n\n        // print(i, expnt, r0, f(r0), source1(r0), opf(r0), exact0, opf(r0)-exact0);\n        // print(i, expnt, r1, f(r1), source1(r1), opf(r1), exact1, opf(r1)-exact1);\n        // char fname[256];\n        // sprintf(fname,\"plot-%d.dat\",i+1);\n        // coord_1d lo(0.0); lo[0]=-L;\n        // coord_1d hi(0.0); hi[0]= L;\n        // plot_line(fname, 1001, lo, hi, f, opf);\n    }\n\n    world.gop.fence();\n    return failed;\n}\n\nint test_periodic2(World& world) {\n    int failed = 0;\n    const long k = 10;\n    const double thresh = 1e-8;\n    const double tol = 3e-7;\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_cubic_cell(-L,L);\n    FunctionDefaults<3>::set_thresh(thresh);\n\n    Function<double,3> f = FunctionFactory<double,3>(world).f(source);\n    f.truncate();\n\n    SeparatedConvolution<double,3> op = CoulombOperator(world, 1e-6, thresh);\n    std::cout.precision(10);\n\n    Function<double,3> opf = op(f);\n    opf.reconstruct();\n\n    //print(\"i,value,exact,relerr\");\n    for (int i=0; i<101; ++i) {\n        coordT r = coordT(-L + i*2*L/100.0);\n        double value = opf(r);\n        double exact = potential(r);\n        double relerr = fabs((value-exact)/exact);\n        print(i,value,exact,relerr,status[relerr<tol]);\n      if (relerr>tol) failed++;\n    }\n\n    world.gop.fence();\n    return failed;\n}\n\nint test_periodic_bsh(World& world)\n{\n    int failed=0;\n    const long k = 10;\n    const double thresh = 1e-8;\n    double tol = 3.5e-7;\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_cubic_cell(0,L);\n    FunctionDefaults<3>::set_thresh(thresh);\n\n    ::mu = 15.3;\n\n    Function<double_complex,3> f = FunctionFactory<double_complex,3>(world).f(pw_rhs);\n    f.truncate();\n\n  //  Vector<double,3> args {0.0,0.0,0.0};\n    SeparatedConvolution<double,3> op = BSHOperator3D(world, mu, 1e-6, thresh);\n    std::cout.precision(10);\n\n    Function<double_complex,3> opf = madness::apply(op,f);\n    opf.reconstruct();\n\n    print(\"i,value,exact,relerr\");\n    for (int i=0; i<101; ++i) {\n\tcoordT r = coordT(i*L/100.0);\n\tdouble_complex value = opf(r);\n\tdouble_complex exact = pw_lhs(r);\n\tdouble relerr = std::abs((value-exact)/exact);\n\tprint(i,value,exact,relerr,status[relerr<tol]);\n\tif (relerr>tol) failed++;\n    }\n\n    world.gop.fence();\n    return failed;\n}\n\n\n\nint main(int argc, char**argv) {\n    initialize(argc, argv);\n    int failed=0;\n    {\n      World world(SafeMPI::COMM_WORLD);\n      startup(world,argc,argv);\n      \n      FunctionDefaults<1>::set_bc(BC_PERIODIC);\n      FunctionDefaults<3>::set_bc(BC_PERIODIC);\n      \n      try {\n\t\n        print(\"1D gaussians\");\n        failed += test_periodic1(world);\n        print(\"\\n3D gaussians\");\n        failed += test_periodic(world);\n        print(\"\\n3D coulomb\");\n        failed += test_periodic2(world);\n\tprint(\"\\n3D bsh\");\n\tfailed += test_periodic_bsh(world);\n\t\n      }\n      catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n      }\n      catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n      }\n      catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n      }\n      catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n      }\n//      catch (const char* s) {\n//        print(s);\n//        error(\"caught a c-string exception\");\n//      }\n      catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n      }\n      catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n      }\n      catch (...) {\n        error(\"caught unhandled exception\");\n      }\n      \n      if (world.rank() == 0) {\n\tif (failed) print(\"FAILED!!\", failed);\n\telse print(\"SUCCESS\");\n      }\n\n      world.gop.fence();\n      \n    }\n    finalize();\n\n    return failed;\n}\n"
  },
  {
    "path": "src/madness/mra/testproj.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file testproj.cc\n/// \\brief test box size dependence of projection etc.\n\n#include <madness/mra/mra.h>\n#include <madness/constants.h>\n#include <vector>\n\nusing namespace madness;\n\nbool smalltest = true;\n\ntemplate <typename T, std::size_t NDIM>\nclass Gaussian : public FunctionFunctorInterface<T,NDIM> {\npublic:\n    typedef Vector<double,NDIM> coordT;\n    const coordT center;\n    const double exponent;\n    const T coefficient;\n\n    Gaussian(const coordT& center, double exponent, T coefficient)\n            : center(center), exponent(exponent), coefficient(coefficient) {}\n\n    T operator()(const coordT& x) const {\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        return coefficient*exp(-exponent*sum);\n    }\n\n    std::vector<coordT> special_points() const {\n    \treturn std::vector<coordT>(1,center);\n    }\n};\n\n\n\ntemplate <typename T, std::size_t NDIM>\nint test_proj(World& world) {\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functorT;\n\n    FunctionDefaults<NDIM>::set_k(6);\n    FunctionDefaults<NDIM>::set_thresh(1e-8);\n    FunctionDefaults<NDIM>::set_initial_level(5);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_autorefine(true);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n    FunctionDefaults<NDIM>::set_truncate_on_project(false);\n    int success=0;\n\n    const double expnt = 100.0;\n    const double coeff = pow(expnt/constants::pi,1.5);\n    double x = 1.0/11.0; // A non-dyadic point\n    //double x = 0.0;\n    const coordT origin(x);\n\n    int ilo=2, ihi=2;\n    if (!smalltest) {ilo=0; ihi=7;}\n    for (int i=ilo; i<=ihi; i+=1) {\n        double L = pow(2.0,double(i));\n        FunctionDefaults<NDIM>::set_cubic_cell(-L,L);\n        print(\"I think the cell volume is\", FunctionDefaults<NDIM>::get_cell_volume());\n\n        functorT gaussfunctor(new Gaussian<T,NDIM>(origin, expnt, coeff));\n        Gaussian<T,NDIM> gauss(origin, expnt, coeff);\n        Function<T,NDIM> f = FunctionFactory<T,NDIM>(world).functor(gaussfunctor);\n        f.truncate();\n        f.reconstruct();\n        print(\"L\",L,f.trace(),f.norm2(),f.size()/6/6/6,f.max_depth());\n        double err=f.err(gauss);\n        if (world.rank()==0) print(\"error in \",NDIM, \"dimensions \", err);\n        if (err>1.2*FunctionDefaults<3>::get_thresh()) success++;\n\n        //f.print_tree();\n\n    }\n    return success;\n}\n\n\nint main(int argc, char**argv) {\n    initialize(argc,argv);\n    World world(SafeMPI::COMM_WORLD);\n    int success=0;\n\n    try {\n        startup(world,argc,argv);\n        if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n        for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n        std::cout << \"small test : \" << smalltest << std::endl;\n\n        std::cout.precision(8);\n\n        success+=test_proj<double,1>(world);\n        success+=test_proj<double,2>(world);\n        if (!smalltest) success+=test_proj<double,3>(world);\n\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n//    catch (const char* s) {\n//        print(s);\n//        error(\"caught a c-string exception\");\n//    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    world.gop.fence();\n    finalize();\n\n    return success;\n}\n\n"
  },
  {
    "path": "src/madness/mra/testqm.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id: test.cc 257 2007-06-25 19:09:38Z HartmanBaker $\n*/\n\n/// \\file testsuite.cc\n/// \\brief The QA/test suite for Function\n\n#include <madness/mra/mra.h>\n#include <unistd.h>\n#include <cstdio>\n#include <madness/constants.h>\n#include <madness/mra/qmprop.h>\n\nusing namespace madness;\n\ntypedef Convolution1D<double_complex> complex_operatorT;\n\ndouble_complex psi0(const coord_1d& r) {\n    return double_complex(exp(-r[0]*r[0]*0.5),0.0);\n}\n\n\ndouble mask(const coord_1d& r) {\n    return 1.0/(1.0 + std::pow(r[0]*0.05,30.0));\n}\n\ndouble_complex V(const coord_1d& r) {\n    double v0 = 0.5*r[0]*r[0];\n    double m = mask(r);\n    return v0*m + (1.0-m)*255.0;\n}\n\ndouble_complex dVsq(const coord_1d& r) {\n    return double_complex(r[0]*r[0],0.0);\n}\n\ndouble energy(World& world, const complex_function_1d& v, const complex_function_1d& psi) {\n    complex_derivative_1d D(world, 0);\n    complex_function_1d du = D(psi);\n    double_complex ke = 0.5*du.inner(du);\n    double_complex pe = psi.inner(v*psi);\n\n    print(\"  ke\", real(ke), \"pe\", real(pe), \"total\", real(ke+pe), \"norm\", psi.norm2());\n\n    return real(ke+pe);\n}\n\ncomplex_function_1d chin_chen(const complex_function_1d& expV,\n                    const complex_function_1d& expVtilde,\n                    const complex_operatorT* G,\n                    const complex_function_1d& psi0) {\n\n    // psi(t) = exp(-i*V*t/6) exp(-i*T*t/2) exp(-i*2*Vtilde*t/3) exp(-i*T*t/2) exp(-i*V*t/6)\n\n    complex_function_1d psi1;\n\n    psi1 = expV*psi0;\n    psi1.reconstruct();\n    psi1.broaden();\n    psi1.broaden();\n    psi1 = apply_1d_realspace_push(*G, psi1, 0);\n    psi1.sum_down();\n    psi1 = expVtilde*psi1;\n    psi1 = apply_1d_realspace_push(*G, psi1, 0);\n    psi1.sum_down();\n    psi1 = expV*psi1;\n    psi1.truncate();\n\n    return psi1;\n}\n\ncomplex_function_1d trotter(const complex_function_1d& expV,\n                  const complex_operatorT* G,\n                  const complex_function_1d& psi0) {\n    //    psi(t) = exp(-i*T*t/2) exp(-i*V*t) exp(-i*T*t/2) psi(0)\n\n    psi0.reconstruct();\n    psi0.broaden();\n    psi0.broaden();\n    complex_function_1d psi1 = apply_1d_realspace_push(*G, psi0, 0);\n    psi1.sum_down();\n    psi1 = expV*psi1;\n    psi1 = apply_1d_realspace_push(*G, psi1, 0);\n    psi1.sum_down();\n    psi1.truncate();\n\n    return psi1;\n}\n\ntemplate<typename T, std::size_t NDIM>\nstruct unaryexp {\n    void operator()(const Key<NDIM>& key, Tensor<T>& t) const {\n        UNARY_OPTIMIZED_ITERATOR(T, t, *_p0 = exp(*_p0););\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\n\n/// Returns exp(-I*t*V) with truncation\ncomplex_function_1d make_exp(double t, const complex_function_1d& v) {\n    v.reconstruct();\n    complex_function_1d expV = double_complex(0.0,-t)*v;\n    expV.unaryop(unaryexp<double_complex,1>());\n    expV.truncate();\n    return expV;\n}\n\n\nvoid test_trotter(World& world) {\n\n    const double L = 30.0;\n    const int k = 16;\n    const double thresh = 1e-12;\n    FunctionDefaults<1>::set_cubic_cell(-L,L);\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<1>::set_thresh(thresh);\n\n    std::cout.precision(8);\n\n    complex_function_1d psi = complex_factory_1d(world).f(psi0);\n    psi.scale(1.0/psi.norm2());\n    complex_function_1d psi0 = copy(psi);\n\n    complex_function_1d v = complex_factory_1d(world).f(V);\n\n    energy(world,v,psi);\n\n    double c = 10.0*sqrt(0.5) * 1.86;\n    //double c = 10.0*sqrt(0.5) * 1.86 * 2.0;\n    double tcrit = 2*constants::pi/(c*c);\n\n    double tstep = tcrit * 0.125;\n\n    print(\"The time step is\", tstep, \"\\n\");\n\n    complex_operatorT* G0 = qm_1d_free_particle_propagator(k, c, tstep, 2*L);\n\n    complex_function_1d expV = make_exp(tstep,v);\n\n    for (int step=0; step<40; ++step) {\n        double time = step * tstep;\n        double_complex phase = psi0.inner(psi);\n        double radius = abs(phase);\n        double theta = arg(phase);\n        double theta_exact = -time*0.5;\n        while (theta_exact > constants::pi) theta_exact -= 2.0*constants::pi;\n\n        print(\"step\", step, \"time\", time, \"radius\", radius, \"arg\", theta, \"exact\", theta_exact, \"phase err\", theta_exact-theta);\n        energy(world, v, psi);\n\n        psi = trotter(expV, G0, psi);\n    }\n\n}\n\nvoid test_chin_chen(World& world) {\n\n    const double L = 20.0;\n    const int k = 16;\n    const double thresh = 1e-12;\n    double c = 10.0*sqrt(0.5) * 1.86;\n    double tcrit = 2*constants::pi/(c*c);\n    double tstep = tcrit;\n    print(\"The time step is\", tstep, \"\\n\");\n\n    FunctionDefaults<1>::set_cubic_cell(-L,L);\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<1>::set_thresh(thresh);\n\n    std::cout.precision(8);\n\n    complex_function_1d psi = complex_factory_1d(world).f(psi0);\n    psi.scale(1.0/psi.norm2());\n    complex_function_1d psi0 = copy(psi);\n\n    complex_function_1d v = complex_factory_1d(world).f(V);\n    complex_function_1d dvsq = complex_factory_1d(world).f(dVsq);\n\n    complex_function_1d vtilde = v - dvsq*(tstep*tstep/48.0);\n\n    complex_operatorT* G0 = qm_1d_free_particle_propagator(k, c, tstep, 1400.0);\n    //G.doleaves = true;\n    complex_function_1d expV = make_exp(tstep/6.0, v);\n    complex_function_1d expVtilde = make_exp(2.0*tstep/3.0, vtilde);\n\n    for (int step=0; step<100; ++step) {\n        double time = step * tstep;\n        double_complex phase = psi0.inner(psi);\n        double radius = abs(phase);\n        double theta = arg(phase);\n        double theta_exact = -time*0.5;\n        while (theta_exact > constants::pi) theta_exact -= 2.0*constants::pi;\n        while (theta_exact < -constants::pi) theta_exact += 2.0*constants::pi;\n\n        print(\"step\", step, \"time\", time, \"radius\", radius, \"arg\", theta, \"exact\", theta_exact, \"phase err\", theta_exact-theta);\n        energy(world, v, psi);\n\n        psi = chin_chen(expV, expVtilde, G0, psi);\n    }\n\n}\n\nint main(int argc, char**argv) {\n    const int required = MADNESS_MPI_THREAD_LEVEL;\n    SafeMPI::Init_thread(argc, argv, required);\n    World world(SafeMPI::COMM_WORLD);\n    try {\n        startup(world,argc,argv);\n\n        bandlimited_propagator_plot();\n        //test_trotter(world);\n        //test_chin_chen(world);\n\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (const char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n//    catch (char* s) {\n//        print(s);\n//        error(\"caught a c-string exception\");\n//    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    SafeMPI::Finalize();\n\n    return 0;\n}\n\n"
  },
  {
    "path": "src/madness/mra/testsolver.cc",
    "content": "#include <iostream>\n#include <madness/mra/nonlinsol.h>\n#include <cmath>\n#include<madness/world/test_utilities.h>\n\nusing namespace madness;\n\n/// simple class for testing the solver\nclass F {\n    double x;\n\npublic:\n\n    F(double x) : x(x) {}\n\n    F() : x(99) {}      // Default constructor necessary for storage in vector\n\n    F(const F& a) : x(a.x) {} // Copy constructor necessary\n\n    F operator=(const F& f) { // Assignment required for storage in vector\n        if (this != &f) {\n            x = f.x;\n        }\n        return *this;\n    }\n\n    F operator-(const F& b) const { // Operator- necessary\n        return F(x-b.x);\n    }\n\n    F& operator+=(const F& b) { // Operator+= necessary\n        x += b.x;\n        return *this;\n    }\n\n    F operator*(double a) const { // Scale by a constant necessary\n        return F(x*a);\n    }\n\n    double get() const {return x;}\n};\n\n// This interface is necessary to compute inner products\ndouble inner(const F& a, const F& b) {\n    return a.get()*b.get();\n}\n\n// If the default constructor does not make a zero value need an\n// allocator.  It can be a function or a class.\nF allocator() {\n    return F(0.0);\n}\n\n// The test code solves r(x) = exp(-x) - x = 0\nF residual(const F& f) {\n    double x = f.get();\n    return F(std::exp(-x)-x);\n}\n\nF exact_solution() {\n    return F(0.5671432904097839);\n}\n\n\n// The default constructor for functions does not initialize\n// them to any value, but the solver needs functions initialized\n// to zero for which we also need the world object.\ntemplate<typename T, std::size_t NDIM>\nstruct function_allocator {\n    World& world;\n    const int n=-1;\n\n    /// @param[in]\tworld\tthe world\n    function_allocator(World& world) : world(world) {}\n\n    /// allocate a vector of n empty functions\n    Function<T, NDIM> operator()() {\n        auto f=FunctionFactory<T,NDIM>(world);\n        return f;\n    }\n};\n\nint test_simple(World& world) {\n    test_output t1(\"testing test_simple with class F\");\n    {\n        double cpu0=cpu_time();\n        XNonlinearSolver<F,double,F(*)()> solver(allocator);\n        F x = 0.5;\n        for (int iter=0; iter<8; iter++) {\n            std::cout << iter << \" \" << x.get() << std::endl;\n            x = solver.update(x, residual(x));\n        }\n        double cpu1=cpu_time();\n        double error=fabs(x.get()-exact_solution().get());\n        t1.checkpoint(error,1.e-6,\"error after 8 iterations using residual\",cpu1-cpu0);\n    }\n    {\n        double cpu0=cpu_time();\n        XNonlinearSolver<F,double,F(*)()> solver(allocator);\n        F x = 0.5;\n        solver.initialize(F(0.5));\n        for (int iter=0; iter<8; iter++) {\n            std::cout << iter << \" \" << x.get() << std::endl;\n            auto xpreliminary=x-residual(x);    // looks stupid, but it is what it is here\n            x = solver.update(xpreliminary);\n        }\n        double cpu1=cpu_time();\n        double error=fabs(x.get()-exact_solution().get());\n        t1.checkpoint(error,1.e-6,\"error after 8 iterations using update\",cpu1-cpu0);\n    }\n\n\n    return t1.end();\n}\n\n\ntemplate<typename T, std::size_t NDIM>\nFunction<T,NDIM> compute_update(World& world, const Function<T,NDIM>& f) {\n    auto op=BSHOperator<NDIM>(world,-1.0,1.e-4,FunctionDefaults<NDIM>::get_thresh());\n    auto pot_functor=[](const Vector<double,NDIM>& r) {\n        return inner(r,r)-5.0;\n    };\n    Function<T,NDIM> V=FunctionFactory<T,NDIM>(world).f(pot_functor);\n    return op(-2.0*V*f);\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_with_function(World& world) {\n    test_output t1(\"test with function\");\n    Function<T,NDIM> guess=FunctionFactory<T,NDIM>(world).f([](const Vector<double,NDIM>& r){return exp(-inner(r,r));});\n    double n=guess.norm2();\n    guess.scale(1.0/n);\n    {\n        double cpu0=cpu_time();\n        auto f=copy(guess);\n        double error1=1.0;\n        for (int i=0; i<10; ++i) {\n            auto fnew=compute_update(world,f);\n            double n2=fnew.norm2();\n            fnew.scale(1.0/n2);\n            error1=(f-fnew).norm2();\n            print(\"error in iteration\",i,error1);\n            f=fnew;\n        }\n        double cpu1=cpu_time();\n        t1.checkpoint(error1,1.e-6,\"without kain \",cpu1-cpu0);\n    }\n    {\n        double cpu0=cpu_time();\n        auto alloc=function_allocator<T,NDIM>(world);\n        XNonlinearSolver<Function<T,NDIM>,double,function_allocator<T,NDIM>> solver(alloc);\n\n        auto f=copy(guess);\n        double error1=1.0;\n        for (int i=0; i<10; ++i) {\n            auto up=compute_update(world,f);\n            double n2=up.norm2();\n            up.scale(1.0/n2);\n            auto residual = f-up;\n            auto fnew=solver.update(f,residual);\n            error1=(f-fnew).norm2();\n            print(\"error in iteration\",i,error1);\n            f=fnew;\n        }\n        double cpu1=cpu_time();\n        t1.checkpoint(error1,1.e-7,\"with KAIN/residual\",cpu1-cpu0);\n    }\n    {\n        double cpu0=cpu_time();\n        auto alloc=function_allocator<T,NDIM>(world);\n        XNonlinearSolver<Function<T,NDIM>,double,function_allocator<T,NDIM>> solver(alloc);\n        guess.reconstruct();\n        solver.initialize(guess);\n\n        auto f=copy(guess);\n        double error1=1.0;\n        for (int i=0; i<10; ++i) {\n            auto fnew=compute_update(world,f);\n            fnew.reconstruct();\n            double n2=fnew.norm2();\n            fnew.scale(1.0/n2);\n            fnew=solver.update(fnew);\n            error1=(f-fnew).norm2();\n            print(\"error in iteration\",i,error1);\n            f=fnew;\n        }\n        double cpu1=cpu_time();\n        t1.checkpoint(error1,1.e-7,\"with KAIN/update\",cpu1-cpu0);\n    }\n\n\n    return t1.end();\n}\n\n\n/// test solver with a vector of functions\n\n/// keep it simple: both functions converge to the same state, no orthogonalization needed\ntemplate<typename T, std::size_t NDIM>\nint test_with_function_vector(World& world) {\n    test_output t1(\"test with function vector with dim \"+std::to_string(NDIM));\n    t1.set_cout_to_terminal();\n    Function<T,NDIM> guess1=FunctionFactory<T,NDIM>(world).f([](const Vector<double,NDIM>& r){return exp(-inner(r,r));});\n    Function<T,NDIM> guess2=FunctionFactory<T,NDIM>(world).f([](const Vector<double,NDIM>& r){return exp(-2.0*inner(r,r));});\n    std::vector<Function<T,NDIM>> guess({guess1,guess2});\n    normalize(world,guess);\n    reconstruct(guess);\n    {\n        double cpu0=cpu_time();\n        auto solver=nonlinear_vector_solver<T,NDIM>(world,2);\n        // solver.do_print=true;\n\n        auto f=copy(guess);\n        double error1=1.0;\n        for (int i=0; i<10; ++i) {\n            auto f1=compute_update(world,f[0]);\n            auto f2=compute_update(world,f[1]);\n            auto fnew=std::vector<Function<T,NDIM>>({f1,f2});\n            reconstruct(fnew);\n            normalize(world,fnew);\n            auto residual=f-fnew;\n            error1=norm2(world,residual);\n            print(\"error in iteration\",i,error1);\n            f=solver.update(f,residual);\n        }\n        double cpu1=cpu_time();\n        t1.checkpoint(error1,5.e-6,\"with KAIN/residual\",cpu1-cpu0);\n    }\n    {\n        double cpu0=cpu_time();\n        auto solver=nonlinear_vector_solver<T,NDIM>(world,2);\n        auto f=copy(guess);\n        solver.initialize(guess);\n        // solver.do_print=true;\n\n        double error1=1.0;\n        for (int i=0; i<10; ++i) {\n            auto f1=compute_update(world,f[0]);\n            auto f2=compute_update(world,f[1]);\n            auto fnew=std::vector<Function<T,NDIM>>({f1,f2});\n            reconstruct(fnew);\n            normalize(world,fnew);\n            error1=norm2(world,f-fnew);\n            print(\"error in iteration\",i,error1);\n            f=solver.update(fnew);\n        }\n        double cpu1=cpu_time();\n        t1.checkpoint(error1,5.e-6,\"with KAIN/update\",cpu1-cpu0);\n    }\n\n\n    return t1.end();\n}\n\nint main(int argc, char** argv) {\n\n    // This line should compile but won't work because the\n    // default constructor F() sets x=99 not zero\n    //XNonlinearSolver<F,double> solver;\n\n    World& world=initialize(argc,argv);\n    world.gop.fence();\n    startup(world,argc,argv);\n    FunctionDefaults<1>::set_cubic_cell(-2.0,2.0);\n    FunctionDefaults<1>::set_thresh(1.e-6);\n    FunctionDefaults<1>::set_k(9);\n    FunctionDefaults<2>::set_cubic_cell(-2.0,2.0);\n    FunctionDefaults<2>::set_thresh(1.e-7);\n    FunctionDefaults<2>::set_k(9);\n    FunctionDefaults<2>::set_tensor_type(TT_2D);\n\n\n\n\n    std::cout << std::setprecision(10);\n    int ierr=0;\n\n    ierr+=test_simple(world);\n    ierr+=test_with_function<double,1>(world);\n    ierr+=test_with_function_vector<double,1>(world);\n    ierr+=test_with_function_vector<double,2>(world);\n\n\n\n    madness::finalize();\n    return ierr;\n}\n\n"
  },
  {
    "path": "src/madness/mra/testsuite.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id: test.cc 257 2007-06-25 19:09:38Z HartmanBaker $\n*/\n\n/// \\file testsuite.cc\n/// \\brief The QA/test suite for Function\n\n#define NO_GENTENSOR\n#include <madness/mra/mra.h>\n#include <unistd.h>\n#include <cstdio>\n#include <madness/constants.h>\n#include <madness/mra/qmprop.h>\n\n#include <madness/misc/ran.h>\n\nbool smalltest = false;\n\nconst double PI = 3.1415926535897932384;\n\nusing namespace madness;\n\ntemplate <typename T, std::size_t NDIM>\nstruct lbcost {\n    double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n        return 1.0;\n    }\n};\n\ntemplate <typename T>\nT complexify(T c) {\n    return c;\n}\n\ntemplate <> double_complex complexify<double_complex>(double_complex c) {\n    return c*double_complex(0.5,-sqrt(3.0)*0.5);\n}\n\ntemplate <> float_complex complexify<float_complex>(float_complex c) {\n    return c*float_complex(0.5,-sqrt(3.0)*0.5);\n}\n\n\ntemplate <typename T, std::size_t NDIM>\nclass Gaussian : public FunctionFunctorInterface<T,NDIM> {\npublic:\n    typedef Vector<double,NDIM> coordT;\n    const coordT center;\n    const double exponent;\n    const T coefficient;\n\n    Gaussian(const coordT& center, double exponent, T coefficient)\n            : center(center), exponent(exponent), coefficient(complexify(coefficient)) {};\n\n    T operator()(const coordT& x) const {\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        return coefficient*exp(-exponent*sum);\n    };\n};\n\ntemplate <typename T, std::size_t NDIM>\nclass DerivativeGaussian : public FunctionFunctorInterface<T,NDIM> {\npublic:\n    typedef Vector<double,NDIM> coordT;\n    const coordT center;\n    const double exponent;\n    const T coefficient;\n    const int axis;\n\n    DerivativeGaussian(const coordT& center, double exponent, T coefficient, int axis)\n            : center(center), exponent(exponent), coefficient(complexify(coefficient)), axis(axis) {};\n\n    DerivativeGaussian(const Gaussian<T,NDIM>& g, int axis)\n            : center(g.center), exponent(g.exponent), coefficient(g.coefficient), axis(axis) {};\n\n    T operator()(const coordT& x) const {\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        return -2.0*exponent*(x[axis]-center[axis])*coefficient*exp(-exponent*sum);\n    };\n};\n\n\ntemplate <typename T, typename L, typename R>\ninline T product(L l, R r) {\n    return T(l*r);\n}\n\ntemplate <typename T, typename L, typename R>\ninline T sum(L l, R r) {\n    return T(l+r);\n}\n\n\n/// Makes a square-normalized Gaussian with random origin and exponent\ntemplate <typename T, std::size_t NDIM>\nGaussian<T,NDIM>*\nRandomGaussian(const Tensor<double> cell, double expntmax=1e5) {\n    typedef Vector<double,NDIM> coordT;\n    coordT origin;\n    for (std::size_t i=0; i<NDIM; ++i) {\n        origin[i] = RandomValue<double>()*(cell(i,1)-cell(i,0)) + cell(i,0);\n    }\n    double lo = log(0.1);\n    double hi = log(expntmax);\n    double expnt = exp(RandomValue<double>()*(hi-lo) + lo);\n    T coeff = pow(2.0*expnt/PI,0.25*NDIM);\n    //print(\"RandomGaussian: origin\", origin, \"expnt\", expnt, \"coeff\", coeff);\n    return new Gaussian<T,NDIM>(origin,expnt,coeff);\n}\n\n/// Returns a new functor combining two functors via operation op(left,right)\ntemplate <typename resultT, typename L, typename R, typename opT, std::size_t NDIM>\nclass BinaryOp : public FunctionFunctorInterface<resultT,NDIM> {\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<L,NDIM> > functorL;\n    typedef std::shared_ptr< FunctionFunctorInterface<R,NDIM> > functorR;\n\n    functorL left;\n    functorR right;\n    opT op;\n\npublic:\n    BinaryOp(const functorL& left, const functorR& right, opT& op)\n            : left(left), right(right), op(op) {};\n\n    resultT operator()(const coordT& x) const {\n        return op((*left)(x),(*right)(x));\n    };\n};\n\n#define CHECK(value, threshold, message)        \\\n        do { \\\n             if (world.rank() == 0) { \\\n                 bool status = std::abs(value) < threshold;             \\\n                const char* msgs[2] = {\"FAILED\",\"OK\"};                  \\\n                std::printf(\"%20.20s :%5d :%30.30s : %10.2e  < %10.2e : %s\\n\", (__FUNCTION__),(__LINE__),(message),(std::abs(value)),(threshold), (msgs[int(status)])); \\\n                if (!status) ok = false; \\\n             } \\\n        } while (0)\n\ndouble ttt, sss;\n#define START_TIMER world.gop.fence(); ttt=wall_time(); sss=cpu_time()\n#define END_TIMER(msg) ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt)\n\n\ntemplate <typename T, std::size_t NDIM>\nint test_basic(World& world) {\n    bool ok = true;\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functorT;\n\n    if (world.rank() == 0)\n        print(\"Test compression of a normalized gaussian at origin, type =\",\n              archive::get_type_name<T>(),\", ndim =\",NDIM);\n\n    Tensor<double> cell(NDIM,2);\n    for (std::size_t i=0; i<NDIM; ++i) {\n        cell(i,0) = -11.0-2*i;  // Deliberately asymmetric bounding box\n        cell(i,1) =  10.0+i;\n    }\n    const double thresh=1.e-5;\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(7);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(2);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n    const coordT origin(0.0);\n    coordT point;\n    const double expnt = 1.0;\n    const double coeff = pow(2.0/PI,0.25*NDIM);\n\n    functorT functor(new Gaussian<T,NDIM>(origin, expnt, coeff));\n\n    for (std::size_t i=0; i<NDIM; ++i) point[i] = 0.1*i;\n\n    Function<T,NDIM> f = FunctionFactory<T,NDIM>(world).functor(functor);\n\n    double norm = f.norm2();\n    double err = f.err(*functor);\n    T val = f(point);\n    CHECK(std::abs(norm-1.0), 3.0e-10, \"norm\");\n    CHECK(err, 3*thresh, \"err\");\n    CHECK(val-(*functor)(point), thresh, \"error at a point\");\n\n    f.compress();\n    double new_norm = f.norm2();\n    CHECK(new_norm-norm, 1e-14, \"new_norm\");\n\n    f.reconstruct();\n    new_norm = f.norm2();\n    double new_err = f.err(*functor);\n    CHECK(new_norm-norm, 1e-14, \"new_norm\");\n    CHECK(new_err-err, 1e-14, \"new_err\");\n\n    f.compress();\n    new_norm = f.norm2();\n    CHECK(new_norm-norm, 1e-14, \"new_norm\");\n\n    f.truncate();\n    new_norm = f.norm2();\n    new_err = f.err(*functor);\n    CHECK(new_norm-norm, 1e-9, \"new_norm\");\n    CHECK(new_err, 3e-5, \"new_err\");\n\n    world.gop.fence();\n    if (world.rank() == 0) print(\"projection, compression, reconstruction, truncation OK\",ok,\"\\n\\n\");\n    if (not ok) return 1;\n    return 0;\n}\n\n\n/// test the convergence of the MRA representation with respect to k and n\ntemplate <typename T, std::size_t NDIM>\nint test_conv(World& world) {\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functorT;\n\n    bool ok=true;\n    if (world.rank() == 0) {\n        print(\"Test convergence - log(err)/(n*k) should be roughly const, a least for each value of k\");\n        print(\"                 - type =\", archive::get_type_name<T>(),\", ndim =\",NDIM,\"\\n\");\n    }\n    const coordT origin(0.0);\n    const double expnt = 1.0;\n    const double coeff = pow(2.0/PI,0.25*NDIM);\n    functorT functor(new Gaussian<T,NDIM>(origin, expnt, coeff));\n\n    FunctionDefaults<NDIM>::set_cubic_cell(-10,10);\n\n    int kmax=10, kstep=2;\n    if (!smalltest) {kmax=30; kstep=1;}\n    for (int k=2; k<=kmax; k+=kstep) {\n        if (world.rank() == 0) printf(\"k=%d\\n\", k);\n        int ntop = 5;\n        if (NDIM > 2 && k>5) ntop = 4;\n        for (int n=1; n<=ntop; ++n) {\n        \t// combine .initial_level(n).norefine() to have a projection\n        \t// exactly on level n\n            Function<T,NDIM> f = FunctionFactory<T,NDIM>(world).functor(functor).norefine().initial_level(n).k(k);\n            double err2 = f.err(*functor);\n            std::size_t size = f.size();\n            const double logerr= std::abs(log(err2)/n/k);\n            if (world.rank() == 0)\n                printf(\"   n=%d err=%.2e #coeff=%.2e log(err)/(n*k)=%.2e\\n\",\n                       n, err2, double(size), logerr);\n            if (logerr>1.0) ok=false;\n        }\n    }\n\n    world.gop.fence();\n    if (world.rank() == 0) print(\"test conv OK\\n\\n\");\n    if (ok) return 0;\n    return 1;\n}\n\ntemplate <typename T, std::size_t NDIM>\nstruct myunaryop {\n    typedef T resultT;\n    Tensor<T> operator()(const Key<NDIM>& key, const Tensor<T>& t) const {\n        return -t;\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\ntemplate <typename T, std::size_t NDIM>\nstruct myunaryop_square {\n    typedef T resultT;\n    Tensor<T> operator()(const Key<NDIM>& key, const Tensor<T>& t) const {\n        Tensor<T> result = copy(t);\n        T* r = result.ptr();\n        for (int i = 0; i < result.size(); ++i) {\n            r[i] = r[i]*r[i];\n        }\n        return result;\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\ntemplate <typename T, int NDIM>\nstruct test_multiop {\n    Tensor<T> operator()(const Key<NDIM>& key, const std::vector< Tensor<T> >& c) const {\n        Tensor<T> r = copy(c[0]).emul(c[0]);\n        for (unsigned int i=1; i<c.size(); ++i) r += copy(c[i]).emul(c[i]);\n        return r;\n    }\n    template <typename Archive>\n    void serialize(Archive& ar) {}\n};\n\ntemplate <typename T, std::size_t NDIM>\nint test_math(World& world) {\n    bool ok = true;\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functorT;\n\n    if (world.rank() == 0) {\n        print(\"Test basic math operations - type =\", archive::get_type_name<T>(),\", ndim =\",NDIM,\"\\n\");\n    }\n\n    const double thresh=1.e-9;\n    FunctionDefaults<NDIM>::set_k(9);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_autorefine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_cubic_cell(-10,10);\n\n    const coordT origin(0.0);\n    const double expnt = 1.0;\n    const double coeff = pow(2.0/PI,0.25*NDIM);\n    functorT functor(new Gaussian<T,NDIM>(origin, expnt, coeff));\n    T(*p)(T,T) = &product<T,T,T>;\n    functorT functsq(new BinaryOp<T,T,T,T(*)(T,T),NDIM>(functor,functor,p));\n    //functorT functsq(new Gaussian<T,NDIM>(origin, 2.0*expnt, coeff*coeff)); // only correct if real\n\n    // First make sure out of place squaring works\n    Function<T,NDIM> f = FunctionFactory<T,NDIM>(world).functor(functor);\n\n    // Out-of-place squaring without autoref\n    f.set_autorefine(false);\n    world.gop.fence();\n\n    double err = f.err(*functor);\n    CHECK(err, 3.0*thresh, \"err in f before squaring\");\n    Function<T,NDIM> fsq = square(f);\n    double new_err = f.err(*functor);\n    CHECK(new_err-err,1e-14*err,\"err in f after squaring\");\n    double errsq = fsq.err(*functsq);\n    CHECK(errsq, 22.0*thresh, \"err in fsq\");\n\n    // Test same with autorefine\n    fsq = unary_op(f, myunaryop<T,NDIM>());\n    errsq = (f + fsq).norm2();\n    CHECK(errsq, 1e-10, \"err in unaryp_op negate\");\n    fsq.clear();\n    f.reconstruct();\n\n    // Test same with autorefine\n    fsq = unary_op(f, myunaryop_square<T,NDIM>());\n    errsq = (fsq - square(f)).norm2();\n    CHECK(errsq, 1e-10, \"err in unaryp_op square\");\n    fsq.clear();\n    f.reconstruct();\n\n//     // Test same with autorefine\n//     f.set_autorefine(true); world.gop.fence();\n//     fsq = square(f);\n//     errsq = fsq.err(*functsq);\n//     CHECK(errsq, 1e-10, \"err in fsq with autoref\");\n\n//     // Repeat after agressive truncating to see if autorefine really works\n//     f.set_autorefine(false); world.gop.fence();\n//     f.truncate(1e-5);\n//     f.verify_tree();\n//     err = f.err(*functor);\n//     CHECK(err, 1e-5, \"error in f after truncating\");\n\n//     fsq = square(f);\n//     errsq = fsq.err(*functsq);\n//     CHECK(errsq, 1e-5, \"error in fsq after truncating\");\n\n//     f.set_autorefine(true); world.gop.fence();\n//     fsq = square(f);\n//     errsq = fsq.err(*functsq);\n//     CHECK(errsq, 1e-5, \"error in fsq truncate+autoref\");\n\n//     // Finally inplace squaring\n//     f.square();\n//     double new_errsq = f.err(*functsq);\n//     CHECK(new_errsq - errsq, 1e-14*errsq, \"err in fsq trunc+auto+inplace\");\n\n    fsq.clear();\n\n    // Test adding a constant in scaling function and wavelet bases\n    T val = f(origin);\n    f.reconstruct();\n    f.add_scalar(3.0);\n    T val2 = f(origin);\n\n    f.compress();\n    f.add_scalar(5.0);\n    f.reconstruct();\n    val2 = f(origin);\n    CHECK(val2-(val+8.0),1e-12,\"add scalar in place compressed\");\n\n    // Test in-place scaling by a constant in scaling function and wavelet bases\n    f.reconstruct();\n    f.scale(3.0);\n    val2 = f(origin);\n    CHECK(val2-3.0*(val+8.0),1e-12,\"in-place scaling reconstructed\");\n\n    f.compress();\n    f.scale(4.0);\n    f.reconstruct();\n    val2 = f(origin);\n    CHECK(val2-12.0*(val+8.0),1e-12,\"in-place scaling compressed\");\n\n    // Same but using operator notation\n    f.reconstruct();\n    f *= 7.0;\n    val2 = f(origin);\n    CHECK(val2-7.0*12.0*(val+8.0),1e-11,\"in-place scaling (op) recon\");\n\n    f.compress();\n    f *= 7.0;\n    f.reconstruct();\n    val2 = f(origin);\n    CHECK(val2-7.0*7.0*12.0*(val+8.0),1e-10,\"in-place scaling (op) comp\");\n\n    // Test squaring a function by multiplication\n    f = Function<T,NDIM>(FunctionFactory<T,NDIM>(world).functor(functor));\n    fsq = f*f;\n    errsq = fsq.err(*functsq);\n    CHECK(errsq, 3e-8, \"err in fsq by multiplication\");\n\n    // Test norm tree operation\n    f.reconstruct();\n    f.norm_tree();\n    double nnn = f.norm2();\n    if (world.rank() == 0) print(\"nnn\", nnn);\n\n    // Test composing operations using general expression(s)\n    f.compress();\n    err = f.err(*functor);\n    f.compress();\n    Function<T,NDIM> f6 = f*3.0 + 4.0*f - f;\n    new_err = f.err(*functor);\n    CHECK(new_err-err,1e-14,\"general op unchanged input\");\n    new_err = (f6 - f.scale(6.0)).norm2();\n    CHECK(new_err,1e-13,\"general op output\");\n\n    if (world.rank() == 0) print(\"\\nTest multiplying random functions\");\n    default_random_generator.setstate(314159);  // Ensure all processes have the same sequence (for exponents)\n\n    FunctionDefaults<NDIM>::set_autorefine(false);\n\n    int nfunc = 10; // was 100 but reduce for Travis\n    if (NDIM >= 3) nfunc = 5; // was 20 but reduce for travis\n    for (int i=0; i<nfunc; ++i) {\n        functorT f1(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),100.0));\n        functorT f2(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),100.0));\n        T(*p)(T,T) = &product<T,T,T>;\n        functorT f3(new BinaryOp<T,T,T,T(*)(T,T),NDIM>(f1,f2,p));\n        Function<T,NDIM> a = FunctionFactory<T,NDIM>(world).functor(f1);\n        a.verify_tree();\n        Function<T,NDIM> b = FunctionFactory<T,NDIM>(world).functor(f2);\n        b.verify_tree();\n        //print(\"NORMS\", a.norm2(), b.norm2());\n        //std::cout.flush();\n        Function<T,NDIM> c = a*b;\n        double err1 = a.err(*f1);\n        double err2 = b.err(*f2);\n        double err3 = c.err(*f3);\n        if (world.rank() == 0) print(\"  test \",i);\n        CHECK(err1,1e-8,\"err1\");\n        CHECK(err2,1e-8,\"err2\");\n        CHECK(err3,1e-8,\"err3\");\n\n//         double bnorm = b.norm2();\n//         if (world.rank() == 0) print(\"bnorm\", bnorm);\n//         b.norm_tree();\n//         print(\"++++++++++++++++++++++++++++\");\n//         Function<T,NDIM> cs = mul_sparse(a,b,1e-4);\n//         print(\"----------------------------\");\n//         cs.verify_tree();\n//         if (world.rank() == 0) print(\"cs - c\", (cs-c).norm2());\n\n    }\n\n    if (world.rank() == 0) print(\"\\nTest multiplying a vector of random functions\");\n    {\n        functorT f1(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),1000.0));\n        Function<T,NDIM> left = FunctionFactory<T,NDIM>(world).functor(f1);\n\n        const int nvfunc = 5;\n        std::vector< Function<T,NDIM> > vin(nvfunc);\n        std::vector<functorT> funcres(nvfunc);\n        for (int i=0; i<nvfunc; ++i) {\n            functorT f2(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),1000.0));\n            T(*p)(T,T) = &product<T,T,T>;\n            funcres[i] = functorT(new BinaryOp<T,T,T,T(*)(T,T),NDIM>(f1,f2,p));\n            vin[i] = FunctionFactory<T,NDIM>(world).functor(f2);\n        }\n        std::vector< Function<T,NDIM> > vres = mul(world, left, vin);\n        for (int i=0; i<nvfunc; ++i) {\n            double err = vres[i].err(*funcres[i]);\n            CHECK(err, 1e-8, \"err\");\n            vres[i].verify_tree();\n        }\n\n        if (world.rank() == 0) print(\"\\nTest refining down to a common level\");\n//        vin[0].refine_to_common_level(vin);\n        refine_to_common_level(world,vin);\n        if (world.rank() == 0) print(\"\\nTest multioperation\");\n        Function<T,NDIM> mop = multiop_values<T,test_multiop<T,NDIM>,NDIM> (test_multiop<T,NDIM>(), vin);\n        compress(world, vin);\n        Function<T,NDIM> r(world);\n        for (unsigned int i=0; i<vin.size(); i++) r += vin[i]*vin[i];\n        double moperr = (r - mop).norm2();\n        if (world.rank() == 0) print(\"\\nTest DONE multi\", moperr);\n    }\n\n    if (world.rank() == 0) print(\"\\nTest adding random functions out of place\");\n    for (int i=0; i<10; ++i) {\n        functorT f1(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),100.0));\n        functorT f2(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),100.0));\n        T(*p)(T,T) = &sum<T,T,T>;\n        functorT f3(new BinaryOp<T,T,T,T(*)(T,T),NDIM>(f1,f2,p));\n        Function<T,NDIM> a = FunctionFactory<T,NDIM>(world).functor(f1);\n        Function<T,NDIM> b = FunctionFactory<T,NDIM>(world).functor(f2);\n        Function<T,NDIM> c = a+b;\n        a.verify_tree();\n        b.verify_tree();\n        c.verify_tree();\n        double err1 = a.err(*f1);\n        double err2 = b.err(*f2);\n        double err3 = c.err(*f3);\n        if (world.rank() == 0) print(\"  test \",i);\n        CHECK(err1,1e-8,\"err1\");\n        CHECK(err2,1e-8,\"err2\");\n        CHECK(err3,1e-8,\"err3\");\n    }\n\n    if (world.rank() == 0) print(\"\\nTest adding random functions in place\");\n    for (int i=0; i<5; ++i) { // was 10 but reduce for travis\n        functorT f1(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),100.0));\n        functorT f2(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),100.0));\n        T(*p)(T,T) = &sum<T,T,T>;\n        functorT f3(new BinaryOp<T,T,T,T(*)(T,T),NDIM>(f1,f2,p));\n        Function<T,NDIM> a = FunctionFactory<T,NDIM>(world).functor(f1);\n        Function<T,NDIM> b = FunctionFactory<T,NDIM>(world).functor(f2);\n        a.verify_tree();\n        b.verify_tree();\n        a += b;\n        double err1 = a.err(*f3);\n        double err2 = b.err(*f2);\n        if (world.rank() == 0) print(\"  test \",i);\n        CHECK(err1,1e-8,\"err1\");\n        CHECK(err2,1e-8,\"err2\");\n    }\n\n    if (world.rank() == 0) print(ok);\n\n    world.gop.fence();\n    if (not ok) return 1;\n    return 0;\n}\n\n\ntemplate <typename T, std::size_t NDIM>\nint test_diff(World& world) {\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functorT;\n    bool ok=true;\n\n    if (world.rank() == 0) {\n        print(\"\\nTest differentiation - type =\", archive::get_type_name<T>(),\", ndim =\",NDIM);\n        print(\"note that differentiation does not preserve the accuracy\");\n        print(\"in this particular case the threshold in loosened by a factor of 40\\n\");\n    }\n    const double thresh=1.e-10;\n\n    const coordT origin(0.0);\n    //for (int i=0; i<NDIM; ++i) origin[i] = i/31.4;\n    const double expnt = 1.0;\n    const double coeff = pow(2.0/PI,0.25*NDIM);\n    functorT functor(new Gaussian<T,NDIM>(origin, expnt, coeff));\n\n    FunctionDefaults<NDIM>::set_k(10);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(2);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n    FunctionDefaults<NDIM>::set_cubic_cell(-10,10);\n\n    START_TIMER;\n    Function<T,NDIM> f = FunctionFactory<T,NDIM>(world).functor(functor);\n    END_TIMER(\"project\");\n\n    //f.print_info();  <--------- This is not scalable and might crash the XT\n\n    START_TIMER;\n    f.compress();\n    END_TIMER(\"compress\");\n\n    START_TIMER;\n    f.truncate();\n    END_TIMER(\"truncate\");\n\n    START_TIMER;\n    f.reconstruct();\n    END_TIMER(\"reconstruct\");\n\n\n    for (std::size_t axis=0; axis<NDIM; ++axis) {\n        if (world.rank() == 0) print(\"doing axis\", axis);\n        Derivative<T,NDIM> D(world, axis);\n\n        DerivativeGaussian<T,NDIM> df(origin,expnt,coeff,axis);\n\n        START_TIMER;\n        Function<T,NDIM> dfdx = D(f);\n        END_TIMER(\"diff\");\n\n//         coordT p(0.0);\n//         if (world.rank() == 0) {\n//             for (int i=0; i<=40; ++i) {\n//                 p[axis] = (i-20.0)*0.1;\n//                 print(\"     x, analytic, err\",p[axis],df(p), dfdx(p)-df(p));\n//             }\n//         }\n//         world.gop.fence();\n\n        START_TIMER;\n        double err = dfdx.err(df);\n        END_TIMER(\"err\");\n        CHECK(err, 110*thresh, \"err in test_diff\");\n\n        if (world.rank() == 0) print(\"    error\", err);\n    }\n    world.gop.fence();\n    if (not ok) return 1;\n    return 0;\n}\n\n\n\nnamespace madness {\n    extern bool test_rnlp(bool log_errors);\n    extern bool test_rnlp_rangelimited(bool log_errors);\n    extern bool test_rnlp_rangelimited_erf(bool log_errors);\n    extern bool test_rnlij_rangelimited(bool log_errors);\n}\n\ntemplate <typename T, std::size_t NDIM>\nint test_op(World& world) {\n\n    if (world.rank() == 0) {\n        print(\"\\nTest separated operators - type =\", archive::get_type_name<T>(),\", ndim =\",NDIM,\"\\n\");\n    }\n\n    bool ok=true;\n    ok=test_rnlp(true);\n    if (world.rank()==0) {\n    \tif (ok) print(\"test_rnlp              OK\");\n    \telse print(   \"test_rnlp              FAIL\");\n    }\n    ok=test_rnlp_rangelimited(true);\n    if (world.rank()==0) {\n      if (ok) print(\"test_rnlp_rangelimited   OK\");\n      else print(\"test_rnlp_rangelimited   FAIL\");\n    }\n    ok=test_rnlp_rangelimited_erf(true);\n    if (world.rank()==0) {\n      if (ok) print(\"test_rnlp_rangelimited_erf   OK\");\n      else print(\"test_rnlp_rangelimited_erf   FAIL\");\n    }\n    ok=test_rnlij_rangelimited(true);\n    if (world.rank()==0) {\n      if (ok) print(\"test_rnlij_rangelimited   OK\");\n      else print(\"test_rnlij_rangelimited   FAIL\");\n    }\n\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functorT;\n\n    const double thresh=1.e-9;\n    const coordT origin(0.5);\n    const double expnt = 1.0*100;\n    const double coeff = pow(2.0*expnt/PI,0.25*NDIM);\n    functorT functor(new Gaussian<T,NDIM>(origin, expnt, coeff));\n\n    FunctionDefaults<NDIM>::set_k(10);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(2);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n    FunctionDefaults<NDIM>::set_cubic_cell(-10,10);\n\n    START_TIMER;\n    Function<T,NDIM> f = FunctionFactory<T,NDIM>(world).functor(functor);\n    END_TIMER(\"project\");\n\n    //f.print_info();  <--------- This is not scalable and might crash the XT\n\n\n    f.reconstruct();\n    double n2 = f.norm2();\n    double e2 = f.err(*functor);\n    if (world.rank() == 0) {\n        print(\"         f norm is\", n2);\n        print(\"     f total error\", e2);\n    }\n\n//     f.reconstruct();\n//     Function<T,NDIM> fff = copy(f);\n//     for (int i=0; i<10; ++i) {\n//         fff.compress().reconstruct();\n//     }\n//     f.compress();\n//     double ecr = (fff-f).norm2();\n//     if (world.rank() == 0) print(\"error after 10 compress-reconstruct\",ecr);\n\n//     fff.reconstruct();\n//     for (int i=0; i<10; ++i) {\n//         fff.make_nonstandard(false,true);\n//         fff.standard();\n//         fff.reconstruct();\n//     }\n//     fff.compress();\n//     ecr = (fff-f).norm2();\n//     if (world.rank() == 0) print(\"error after 10 non-standard compress-reconstruct\",ecr);\n\n\n    // Convolution exp(-a*x^2) with exp(-b*x^2) is\n    // exp(-x^2*a*b/(a+b))* (Pi/(a+b))^(NDIM/2)\n\n    Tensor<double> coeffs(1), exponents(1);\n    exponents(0L) = 10.0;\n    coeffs(0L) = pow(exponents(0L)/PI, 0.5*NDIM);\n    double lo=1.e-6, thresh1=1.e-4;\n    SeparatedConvolution<T,NDIM> op(world, coeffs, exponents, lo, thresh1);\n    START_TIMER;\n    Function<T,NDIM> r = madness::apply(op,f);\n    END_TIMER(\"apply\");\n    r.verify_tree();\n    f.verify_tree();\n\n    double newexpnt = expnt*exponents(0L)/(expnt+exponents(0L));\n    double newcoeff = pow(PI/(expnt+exponents(0L)),0.5*NDIM)*coeff*coeffs(0L);\n    functorT fexact(new Gaussian<T,NDIM>(origin, newexpnt, newcoeff));\n\n    T ro = r(origin);\n    T eo = (*fexact)(origin);\n    double rn = r.norm2();\n    double re = r.err(*fexact);\n    if (world.rank() == 0) {\n        print(\" numeric at origin\", ro);\n        print(\"analytic at origin\", eo);\n        print(\"      op*f norm is\", rn);\n        print(\"  op*f total error\", re);\n    }\n    CHECK(re, 30*thresh, \"err in test_op\");\n\n//     for (int i=0; i<=100; ++i) {\n//         coordT c(-10.0+20.0*i/100.0);\n//         print(\"           \",i,c[0],r(c),r(c)-(*fexact)(c));\n//     }\n    if (ok) return 0;\n    return 1;\n}\n\n/// Computes the electrostatic potential due to a Gaussian charge distribution\nclass GaussianPotential : public FunctionFunctorInterface<double,3> {\npublic:\n    typedef Vector<double,3> coordT;\n    const coordT center;\n    const double exponent;\n    const double coefficient;\n\n    GaussianPotential(const coordT& center, double expnt, double coefficient)\n            : center(center)\n            , exponent(sqrt(expnt))\n            , coefficient(coefficient*pow(PI/exponent,1.5)*pow(expnt,-0.75)) {}\n\n    double operator()(const coordT& x) const {\n        double sum = 00;\n        for (int i=0; i<3; ++i) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        double r = sqrt(sum);\n        if (r<1.e-4) {\t// correct thru order r^3\n        \tconst double sqrtpi=sqrt(constants::pi);\n        \tconst double a=exponent;\n        \treturn coefficient*(2.0*a/sqrtpi - 2.0*a*a*a*r*r/(3.0*sqrtpi));\n        } else {\n        \treturn coefficient*erf(exponent*r)/r;\n        }\n    }\n};\n\nint test_coulomb(World& world) {\n    typedef Vector<double,3> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<double,3> > functorT;\n    bool ok=true;\n    if (world.rank() == 0) {\n        print(\"\\nTest Coulomb operator - type =\", archive::get_type_name<double>(),\", ndim = 3 (only)\\n\");\n    }\n\n    // Normalized Gaussian exponent a produces potential erf(sqrt(a)*r)/r\n    const coordT origin(0.5);\n    const double expnt = 100.0;\n    const double coeff = pow(1.0/PI*expnt,0.5*3);\n    functorT functor(new Gaussian<double,3>(origin, expnt, coeff));\n\n\n    int k = 10;\n    double thresh = 1e-7;\n\n    FunctionDefaults<3>::set_k(k);\n    FunctionDefaults<3>::set_thresh(thresh);\n    FunctionDefaults<3>::set_refine(true);\n    FunctionDefaults<3>::set_initial_level(2);\n    FunctionDefaults<3>::set_truncate_mode(1);\n    FunctionDefaults<3>::set_cubic_cell(-10,10);\n\n    START_TIMER;\n    Function<double,3> f = FunctionFactory<double,3>(world).functor(functor).thresh(thresh).initial_level(4);\n    END_TIMER(\"project\");\n\n    //f.print_info();  <--------- This is not scalable and might crash the XT\n\n    f.reconstruct();\n    double norm = f.norm2(), err = f.err(*functor);\n    if (world.rank() == 0) {\n        print(\"         f norm is\", norm);\n        print(\"     f total error\", err);\n        //print(\" truncating\");\n    }\n    CHECK(err, thresh, \"test_coulomb 1\");\n\n//     START_TIMER;\n//     f.truncate();\n//     END_TIMER(\"truncate\");\n//     START_TIMER;\n//     f.reconstruct();\n//     END_TIMER(\"reconstruct\");\n//     norm = f.norm2();\n//     err = f.err(*functor);\n//     if (world.rank() == 0) {\n//         print(\"         f norm is\", norm);\n//         print(\"     f total error\", err);\n//     }\n\n    f.reconstruct();\n    START_TIMER;\n    f.make_nonstandard(false, true);\n    END_TIMER(\"make_nonstandard\");\n\n    if (world.rank() == 0) {\n        print(\"\\nbefore operator\");\n        //world.am.print_stats();\n        print(\"\");\n    }\n    f.set_thresh(thresh);\n    SeparatedConvolution<double,3> op = CoulombOperator(world, 1e-5, thresh);\n\n    FunctionDefaults<3>::set_apply_randomize(true);\n\n    START_TIMER;\n    Function<double,3> r = apply_only(op,f) ;\n    END_TIMER(\"apply\");\n\n\n    START_TIMER;\n    r.reconstruct();\n    END_TIMER(\"reconstruct result\");\n    r.verify_tree();\n\n    functorT fexact(new GaussianPotential(origin, expnt, coeff));\n\n    double numeric=r(origin);\n    double analytic=(*fexact)(origin);\n    double rnorm = r.norm2();\n    double rerr = r.err(*fexact);\n    if (world.rank() == 0) {\n        print(\" numeric at origin\", numeric);\n        print(\"analytic at origin\", analytic);\n        print(\"      op*f norm is\", rnorm);\n        print(\"  op*f total error\", rerr);\n//         for (int i=0; i<=100; ++i) {\n//             coordT c(i*0.01);\n//             print(\"           \",i,r(c),(*fexact)(c));\n//         }\n    }\n    CHECK(rerr, 10.0*thresh, \"err in test_coulomb\");\n\n    if (ok) return 0;\n    return 1;\n}\n\nclass QMtest : public FunctionFunctorInterface<double_complex,1> {\npublic:\n    typedef Vector<double,1> coordT;\n    const double a;\n    const double v;\n    const double t;\n\n    double_complex operator()(const coordT& coords) const {\n        const double x = coords[0];\n        double_complex denom(1.0,2.0*a*t);\n        const double_complex arg(a*x*x,0.5*v*v*t-x*v);\n        return pow(2.0*a/PI,0.25)*sqrt(1.0/denom)*exp(-arg/denom);\n    }\n\n    QMtest(double a, double v, double t)\n            : a(a), v(v), t(t) {}\n};\n\n    struct refop {\n        bool operator()(FunctionImpl<double_complex,1>* impl, const Key<1>& key, const Tensor<double_complex>& t) const {\n            double tol = impl->truncate_tol(impl->get_thresh(), key);\n            double lo, hi;\n            impl->tnorm(t, &lo, &hi);\n            return hi > tol;;\n        }\n        template <typename Archive> void serialize(Archive& ar) {}\n    };\n\n\nint test_qm(World& world) {\n    /*\n\n      This is the exact kernel of the free-particle propagator\n\n      g(x,t) = exp(I*x^2/(2*t))/sqrt((2*Pi*I)*t)\n\n      This is a square normalized Gaussian (in 1D) with velocity v.\n\n      f(x,a,v) = (2*a/Pi)^(1/4)*exp(-a*x^2+I*x*v)\n\n      This is f(x,a,v) evolved to time t\n\n      f(x,a,v,t) = (2*a/Pi)^(1/4)*sqrt(1/(1+(2*I)*a*t))*exp(-(a*x^2-I*x*v+I*v^2*t*1/2)/(1+(2*I)*a*t))\n\n      The fourier transform of f(x,a,v) decays as exp(-k^2/(4*a))\n      and is neglible when k > v + 10*sqrt(a)\n\n      Picking a=v=1 gives an effective bandlimit of c=11.  If we wish this\n      to be accurately propagated for a long time we must request a filtered\n      bandlimit of c = 11*1.8 = 20.\n\n      The center of the packet is at <x> = v*t.\n\n      The width of the packet as measured by sigma^2 = <x^2 - <x>^2> = (1/4)*(1+4*a^2*t^2)/a.\n\n      So the wave packet is actually spreading faster than it is moving (for our choice\n      of parameters).\n\n      The initial support of the Gaussian is about [-5,5] and after 100 units of\n      time it has spread to about [-400,600] so for safety we use a range [-600,800].\n\n      The critical time step is 2*pi/c^2= 0.0157 and we shall attempt to propagate at\n      10x this which is 0.157.\n\n      The final wave packet is horrible, oscillating thru all space due to the\n      complex phase ... this could be reduced with a contact (?) transformation but\n      since the point here is test MADNESS to some extent it is better to make things hard.\n\n    */\n\n//     QMtest f(1,1,0.1);\n\n//     for (int i=0; i<10; ++i) {\n//         double x = i*0.1;\n//         print(x,f(x));\n//     }\n\n    typedef std::shared_ptr< FunctionFunctorInterface<double_complex,1> > functorT;\n    //typedef Vector<double,1> coordT;\n    typedef Function<double_complex,1> functionT;\n    typedef FunctionFactory<double_complex,1> factoryT;\n\n    bool ok=true;\n    //int k = 16;\n    //double thresh = 1e-12;\n\n    int k = 16;\n    double thresh = 1e-13;\n    FunctionDefaults<1>::set_k(k);\n    FunctionDefaults<1>::set_thresh(thresh);\n    FunctionDefaults<1>::set_refine(true);\n    FunctionDefaults<1>::set_initial_level(8);\n    FunctionDefaults<1>::set_cubic_cell(-600,800);\n    FunctionDefaults<1>::set_truncate_mode(1);\n    double width = FunctionDefaults<1>::get_cell_width()(0L);\n\n    double a = 1.0;\n    double v = 1.0;\n    double ctarget = v + 10.0*sqrt(a);\n    double c = 1.86*ctarget; //1.86*ctarget;\n    double tcrit = 2*PI/(c*c);\n    double tstep = 2*tcrit;\n\n    int nstep = int(100.0/tstep);\n    tstep = 100.0/nstep; // so we finish exactly at 100.0\n\n    // For the purpose of testing there is no need to propagate 100 time units.\n    // Just 100 steps.\n    nstep = 100;\n\n    if (world.rank() == 0) {\n        print(\"\\n Testing evolution of a quantum wave packet in\",1,\"dimensions\");\n        print(\"expnt\",a,\"velocity\",v,\"bandw\",ctarget,\"effbandw\",c);\n        print(\"tcrit\",tcrit,\"tstep\",tstep,\"nstep\",nstep,\"width\",width);\n    }\n\n    functorT f(new QMtest(a,v,0.0));\n    //SeparatedConvolution<double_complex,1> G = qm_free_particle_propagator<1>(world, k, c, tstep);\n    //G.doleaves = true;\n\n    functionT psi = factoryT(world).functor(f).initial_level(12);\n    psi.truncate();\n\n    if (world.rank() == 0) {\n        print(\"  step    time      norm      error\");\n        print(\" ------  ------- ---------- ----------\");\n    }\n\n\n    Convolution1D<double_complex>* q1d = qm_1d_free_particle_propagator(k, c, tstep, 1400.0);\n\n    for (int i=0; i<nstep; ++i) {\n        world.gop.fence();\n\n        psi.reconstruct();\n        //psi.refine_general(refop());\n        psi.broaden();\n        psi.broaden();\n        psi.broaden();\n        psi.broaden();\n        psi.broaden();\n\n        world.gop.fence();\n        double norm = psi.norm2();\n        double err = psi.err(QMtest(a,v,tstep*i));\n        if (world.rank() == 0)\n            printf(\"%6d  %7.3f  %10.8f  %9.1e\\n\",i, i*tstep, norm, err);\n\n        //         print(\"psi\");\n        //         psi.print_tree();\n//        CHECK(err, 5.e-8, \"err in test_qm 1\"); // actually 1.2e-9 should be fine\n        CHECK(err, 8.e-8, \"err in test_qm 1\"); // 5e-8 sometimes fails for step 91\n\n        functionT pp = apply_1d_realspace_push(*q1d, psi, 0);\n\n        //         print(\"pp before sum down\");\n        //         pp.print_tree();\n\n        pp.sum_down();\n\n        //         print(\"pp after sum down\");\n        //         pp.print_tree();\n\n        //psi.truncate(thresh);\n        //psi = apply(G,psi);\n        //psi.reconstruct();\n\n        //         print(\"new psi\");\n        //         psi.print_tree();\n\n        //double pperr = (pp - psi).norm2();\n        //print(\"ERROR\", pperr, pp.norm2());\n\n//         if (pperr > 1e-4) {\n//             for (int i=0; i<1001; ++i) {\n//                 double x = (i-500)*0.01;\n//                 print(x, pp(x), psi(x));\n//             }\n//             exit(0);\n//         }\n\n        psi = pp;\n\n        world.gop.fence();\n\n        psi.truncate();\n    }\n\n    // Test program does not need to plot!\n//     psi.reconstruct();\n\n//     ofstream plot;\n\n//     if (world.rank() == 0) plot.open(\"plot.dat\",ios::trunc);\n//     int npt = 10001;\n//     double lo = FunctionDefaults<1>::get_cell()(0,0);\n//     double hi = FunctionDefaults<1>::get_cell()(0,1);\n//     double h = (hi-lo)/(npt-1);\n//     for (int i=0; i<npt; ++i) {\n//         double x = lo + i*h;\n//         double_complex numeric = psi(x);\n//         double_complex exact = QMtest(a,v,tstep*nstep)(x);\n//         if (world.rank() == 0) plot << x << \" \" << numeric.real() << \" \" << numeric.imag() << \" \" << std::abs(numeric) << \" \" << std::abs(numeric-exact) << endl;\n//     }\n//     if (world.rank() == 0) plot.close();\n\n    if (ok) return 0;\n    return 1;\n}\n\n\n/// this essentially tests the infinity norm\ntemplate <typename T, std::size_t NDIM>\nint test_plot(World& world) {\n    bool ok = true;\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functorT;\n    if (world.rank() == 0) {\n        print(\"\\nTest plot cube - type =\", archive::get_type_name<T>(),\", ndim =\",NDIM,\"\\n\");\n    }\n    const double L = 4.0;\n    const double thresh=1.e-7;\n    FunctionDefaults<NDIM>::set_cubic_cell(-L,L);\n    FunctionDefaults<NDIM>::set_k(7);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(2);\n\n    const coordT origin(0.6666666);\n    const double expnt = 1.0;\n    const double coeff = pow(2.0/PI,0.25*NDIM);\n\n    functorT functor(new Gaussian<T,NDIM>(origin, expnt, coeff));\n    Function<T,NDIM> f = FunctionFactory<T,NDIM>(world).functor(functor);\n\n    std::vector<long> npt;\n    if (NDIM>3) npt=std::vector<long>(NDIM,21);\n    else npt=std::vector<long>(NDIM,101);\n    //vector<long> npt(NDIM,21); // recommend this if testing in dimension > 3\n//    std::vector<long> npt(NDIM,101);\n    world.gop.fence();\n    Tensor<T> r = f.eval_cube(FunctionDefaults<NDIM>::get_cell(), npt);\n    world.gop.fence();\n    std::size_t maxlevel = f.max_local_depth();\n    if (world.rank() == 0) {\n        const double h = (2.0*L - 12e-13)/(npt[0]-1.0);\n        for (int i=0; i<npt[0]; ++i) {\n            double x = -L + i*h + 2e-13;\n\n            T fnum  = f.eval(coordT(x)).get();\n\n            // this checks if the numerical representation is consistent\n            std::pair<bool,T> fnum2 = f.eval_local_only(coordT(x),maxlevel);\n            if (world.size() == 1 && !fnum2.first) print(\"eval_local_only: non-local but nproc=1!\");\n            if (fnum2.first) CHECK(fnum-fnum2.second,1e-12,\"eval_local_only\");\n\n            // this checks if numerical and analytical values agree\n            T fplot = r(std::vector<long>(NDIM,i));\n            CHECK(fplot-fnum,2.0*thresh,\"plot-eval\");\n\n            if (world.rank() == 0 && std::abs(fplot-fnum) > 2.0*thresh) {\n                print(\"bad\", i, coordT(x), fplot, fnum, (*functor)(coordT(x)));\n            }\n        }\n    }\n    world.gop.fence();\n\n    r = Tensor<T>();\n    plotdx(f, \"testplot\", FunctionDefaults<NDIM>::get_cell(), npt);\n\n    plot_line(\"testline1\", 101, coordT(-L), coordT(L), f);\n    plot_line(\"testline2\", 101, coordT(-L), coordT(L), f, f*f);\n    plot_line(\"testline3\", 101, coordT(-L), coordT(L), f, f*f, 2.0*f);\n\n    if (world.rank() == 0) print(\"evaluation of cube/slice for plotting OK\", ok);\n    if (ok) return 0;\n    return 1;\n}\n\ntemplate <typename T, std::size_t NDIM>\nint test_io(World& world) {\n    if (world.rank() == 0) {\n        print(\"\\nTest IO - type =\", archive::get_type_name<T>(),\", ndim =\",NDIM,\"\\n\");\n    }\n    bool ok=true;\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functorT;\n\n    FunctionDefaults<NDIM>::set_k(5);\n    FunctionDefaults<NDIM>::set_thresh(1e-10); // We want lots of boxes\n    FunctionDefaults<NDIM>::set_truncate_mode(0);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_cubic_cell(-10,10);\n\n    const coordT origin(0.0);\n    const double expnt = 10.0;\n    const double coeff = pow(2.0/PI,0.25*NDIM);\n    functorT functor(new Gaussian<T,NDIM>(origin, expnt, coeff));\n    Function<T,NDIM> f = FunctionFactory<T,NDIM>(world).functor(functor);\n\n    int nio = (world.size()-1)/20 + 1;\n    archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> out(world, \"mary\", nio);\n    out & f;\n    out.close();\n\n    Function<T,NDIM> g;\n\n    archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> in(world, \"mary\", nio);\n    in & g;\n    in.close();\n    in.remove();\n\n    double err = (g-f).norm2();\n\n    if (world.rank() == 0) print(\"err = \", err);\n    CHECK(err,1e-12,\"test_io\");\n\n    //    MADNESS_CHECK(err == 0.0);\n\n    if (world.rank() == 0) print(\"test_io OK\");\n    world.gop.fence();\n    if (ok) return 0;\n    return 1;\n}\n\ntemplate <typename T, std::size_t NDIM>\nint test_apply_push_1d(World& world) {\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functorT;\n\n    bool ok=true;\n    if (world.rank() == 0)\n        print(\"Test push1d, type =\",archive::get_type_name<T>(),\", ndim =\",NDIM);\n\n    Tensor<double> cell(NDIM,2);\n    const double L = 10.0;\n    FunctionDefaults<NDIM>::set_cubic_cell(-L,L);\n    FunctionDefaults<NDIM>::set_k(6);\n    FunctionDefaults<NDIM>::set_thresh(1e-6);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(2);\n\n    const coordT origin(0.0);\n    const double expnt = 1.0;\n    const double coeff = pow(1.0/PI,0.5*NDIM);\n\n    functorT functor(new Gaussian<T,NDIM>(origin, expnt, coeff));\n\n    Function<T,NDIM> f = FunctionFactory<T,NDIM>(world).functor(functor);\n\n//     f.compress();\n//     f.truncate();\n//     f.reconstruct();\n\n    double trace = f.trace();\n    if (world.rank() == 0)\n        print(\"Trace of f\", trace);\n\n    coordT lo(-L), hi(L);\n    plot_line(\"fplot.dat\", 201, lo, hi, f);\n\n    GaussianConvolution1D<double> op(6, coeff*2.0*L, expnt*L*L*4.0, 0, LatticeRange(false));\n    Function<T,NDIM> opf = apply_1d_realspace_push(op, f, 0);\n\n    opf.sum_down();\n    trace = opf.trace();\n    if (world.rank() == 0)\n        print(\"Trace of opf\", trace);\n    plot_line(\"opfplot.dat\", 201, lo, hi, opf);\n\n    if (world.rank() == 0) print(\"result\", opf.eval(origin).get());\n    world.gop.fence();\n    if (ok) return 0;\n    return 1;\n}\n\n\n#define TO_STRING(s) TO_STRING2(s)\n#define TO_STRING2(s) #s\n\nint main(int argc, char**argv) {\n\tWorld& world=initialize(argc, argv);\n\n    // number of failed tests\n    int nfail=0;\n\n    try {\n        if (world.rank() == 0) {\n            print(\"\");\n            print(\"--------------------------------------------\");\n            print(\"   MADNESS\",MADNESS_PACKAGE_VERSION, \"multiresolution testsuite\");\n            print(\"--------------------------------------------\");\n            print(\"\");\n            print(\"   number of processors ...\", world.size());\n            print(\"    processor frequency ...\", cpu_frequency());\n            print(\"            host system ...\", HOST_SYSTEM);\n            print(\"          configured by ...\", MADNESS_CONFIGURATION_USER);\n            print(\"          configured on ...\", MADNESS_CONFIGURATION_HOST);\n            print(\"          configured at ...\", MADNESS_CONFIGURATION_DATE);\n            print(\"                    CXX ...\", MADNESS_CONFIGURATION_CXX);\n            print(\"               CXXFLAGS ...\", MADNESS_CONFIGURATION_CXXFLAGS);\n#ifdef OPTERON_TUNE\n            print(\"             tuning for ...\", \"opteron\");\n#elif defined(CORE_DUO_TUNE)\n            print(\"             tuning for ...\", \"core duo\");\n#else\n            print(\"             tuning for ...\", \"default\");\n#endif\n#ifdef BOUNDS_CHECKING\n            print(\" tensor bounds checking ...\", \"enabled\");\n#endif\n#ifdef TENSOR_INSTANCE_COUNT\n            print(\"  tensor instance count ...\", \"enabled\");\n#endif\n            //         print(\" \");\n            //         IndexIterator::test();\n        }\n\n        startup(world,argc,argv);\n        if (world.rank() == 0) print(\"Initial tensor instance count\", BaseTensor::get_instance_count());\n\n        if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n        for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n        std::cout << \"small test : \" << smalltest << std::endl;\n        \n        PROFILE_BLOCK(testsuite);\n\n        std::cout.precision(8);\n\n\n        nfail+=test_basic<double,1>(world);\n        nfail+=test_conv<double,1>(world);\n        nfail+=test_math<double,1>(world);\n        nfail+=test_diff<double,1>(world);\n        nfail+=test_op<double,1>(world);\n        nfail+=test_plot<double,1>(world);\n        nfail+=test_apply_push_1d<double,1>(world);\n        nfail+=test_io<double,1>(world);\n\n        // stupid location for this test\n        GenericConvolution1D<double,GaussianGenericFunctor<double> > gen(10,GaussianGenericFunctor<double>(100.0,100.0),0);\n        GaussianConvolution1D<double> gau(10, 100.0, 100.0, 0, LatticeRange(false));\n        Tensor<double> gg = gen.rnlp(4,0);\n        Tensor<double> hh = gau.rnlp(4,0);\n        MADNESS_CHECK((gg-hh).normf() < 1e-13);\n        if (world.rank() == 0) print(\" generic and gaussian operator kernels agree\\n\");\n\n        // disabling to allow tests pass\n        // TODO fix this test, sometimes error will increase by several orders of magnitude during propagation\n        //nfail+=test_qm(world);\n\n        nfail+=test_basic<double_complex,1>(world);\n        nfail+=test_conv<double_complex,1>(world);\n        nfail+=test_math<double_complex,1>(world);\n        nfail+=test_diff<double_complex,1>(world);\n        nfail+=test_op<double_complex,1>(world);\n        nfail+=test_plot<double_complex,1>(world);\n        nfail+=test_io<double_complex,1>(world);\n\n        //TaskInterface::debug = true;\n        nfail+=test_basic<double,2>(world);\n        nfail+=test_conv<double,2>(world);\n        nfail+=test_math<double,2>(world);\n        nfail+=test_diff<double,2>(world);\n        nfail+=test_op<double,2>(world);\n        nfail+=test_plot<double,2>(world);\n        nfail+=test_io<double,2>(world);\n\n        if (!smalltest) {\n            nfail+=test_basic<double,3>(world);\n            nfail+=test_conv<double,3>(world);\n            nfail+=test_math<double,3>(world);\n            nfail+=test_diff<double,3>(world);\n            nfail+=test_op<double,3>(world);\n            nfail+=test_coulomb(world);\n            nfail+=test_plot<double,3>(world);\n            nfail+=test_io<double,3>(world);\n            \n            test_plot<double,4>(world); // slow unless reduce npt in test_plot // comment out to speed up travis\n        }\n\n        if (world.rank() == 0) print(\"entering final fence\");\n        world.gop.fence();\n        if (world.rank() == 0) {\n            print(\"done with final fence\");\n            print(\" \");\n            print(\"Final tensor instance count\", BaseTensor::get_instance_count());\n        }\n\n        print_stats(world);\n\n        if (world.rank()==0) {\n        \tprint(\"testsuite passed: \", (nfail==0),\"\\n\");\n        }\n\n    }\n    catch (const SafeMPI::Exception& e) {\n        //        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n//    catch (const char* s) {\n//        print(s);\n//        error(\"caught a c-string exception\");\n//    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n    finalize();\n    return nfail;\n}\n\n"
  },
  {
    "path": "src/madness/mra/testunaryop.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file testunaryop.cc\n/// \\brief test a unary op\n\ns#include <madness/mra/mra.h>\n#include <madness/constants.h>\n\nusing namespace madness;\n\ntemplate <typename T, std::size_t NDIM>\nclass Gaussian : public FunctionFunctorInterface<T,NDIM> {\npublic:\n    typedef Vector<double,NDIM> coordT;\n    const coordT center;\n    const double exponent;\n    const T coefficient;\n\n    Gaussian(const coordT& center, double exponent, T coefficient)\n            : center(center), exponent(exponent), coefficient(coefficient) {};\n\n    T operator()(const coordT& x) const {\n        double sum = 0.0;\n        for (int i=0; i<NDIM; ++i) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        return coefficient*exp(-exponent*sum);\n    };\n};\n\ntemplate <typename T, std::size_t NDIM>\nvoid squareit(const Key<NDIM>& key, Tensor<T>& t) {\n    print(\"squareit\", key,t);\n    UNARY_OPTIMIZED_ITERATOR(T, t, *_p0 *= *_p0);\n}\n\ntemplate <typename T, std::size_t NDIM>\nvoid test_unaryop(World& world) {\n    typedef Vector<double,NDIM> coordT;\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > functorT;\n\n    if (world.rank() == 0)\n        print(\"Test unary operation (pointwise function-of-a-function), type =\",\n              archive::get_type_name<T>(),\", ndim =\",NDIM);\n\n    FunctionDefaults<NDIM>::set_cubic_cell(-10,10);\n    FunctionDefaults<NDIM>::set_k(7);\n    FunctionDefaults<NDIM>::set_thresh(1e-5);\n    FunctionDefaults<NDIM>::set_autorefine(false);\n\n    const coordT origin(0.0);\n    const double expnt = 1.0;\n    const double coeff = 1.0;// pow(2.0/constants::pi,0.25*NDIM);\n\n    Function<T,NDIM> f = FunctionFactory<T,NDIM>(world).functor(functorT(new Gaussian<T,NDIM>(origin, expnt, coeff)));\n    double norm = f.norm2();\n    print(\"norm of initial function\", norm);\n\n    Function<T,NDIM> g = copy(f);\n    g.unaryop(&squareit<T,NDIM>);\n    double gnorm = g.norm2();\n    print(\"norm of the squared function\", gnorm);\n\n    double err = (f*f - g).norm2();\n    print(\"norm of the error\", err);\n\n    err = g.err(Gaussian<T,NDIM>(origin, expnt*2.0, coeff*coeff));\n    print(\"norm of the error\", err);\n\n    world.gop.fence();\n\n}\n\nint main(int argc, char**argv) {\n    const int required = MADNESS_MPI_THREAD_LEVEL;\n    SafeMPI::Init_thread(argc, argv, required);\n    World world(SafeMPI::COMM_WORLD);\n\n    try {\n        startup(world,argc,argv);\n\n        test_unaryop<double,1>(world);\n\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (const char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n    catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    world.gop.fence();\n    SafeMPI::Finalize();\n\n    return 0;\n}\n\n"
  },
  {
    "path": "src/madness/mra/testvmra.cc",
    "content": "#define NO_GENTENSOR\n#include <madness/mra/mra.h>\n#include <madness/mra/vmra.h>\n#include <madness/misc/ran.h>\n#include <madness/world/test_utilities.h>\n\nconst double PI = 3.1415926535897932384;\n\nusing namespace madness;\n\ndouble ttt, sss;\n#define START_TIMER world.gop.fence(); ttt=wall_time(); sss=cpu_time()\n#define END_TIMER(msg) ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, sss, ttt)\n\ntemplate <typename T>\nT complexify(T c) {\n    return c;\n}\n\ntemplate <> double_complex complexify<double_complex>(double_complex c) {\n    return double_complex(c.real(),c.real()*c.real());\n}\n\ntemplate <> float_complex complexify<float_complex>(float_complex c) {\n    return c*float_complex(c.real(),c.real()*c.real());\n}\n\n/// struct to test the multi_to_multi_op_values\ntemplate<std::size_t NDIM>\nstruct many_to_many_op {\n\n    many_to_many_op() : result_size(2) {}\n\n    std::size_t result_size;\n    std::size_t get_result_size() const {return result_size;}\n\n    std::vector<madness::Tensor<double> > operator()(const madness::Key<NDIM> & key,\n            const std::vector< madness::Tensor<double> >& t) const {\n        std::vector<madness::Tensor<double> > result(result_size);\n        result[0]=2.0*t[0];\n        result[1]=t[1]+t[2];\n        return result;\n    }\n};\n\n\ntemplate <typename T, std::size_t NDIM>\nclass Gaussian : public FunctionFunctorInterface<T,NDIM> {\npublic:\n    typedef Vector<double,NDIM> coordT;\n    const coordT center;\n    const double exponent;\n    const T coefficient;\n\n    Gaussian(const coordT& center, double exponent, T coefficient)\n            : center(center), exponent(exponent), coefficient(complexify(coefficient)) {};\n\n    T operator()(const coordT& x) const {\n        double sum = 0.0;\n        for (std::size_t i=0; i<NDIM; ++i) {\n            double xx = center[i]-x[i];\n            sum += xx*xx;\n        };\n        return coefficient*exp(-exponent*sum);\n    };\n};\n\n/// Makes a square-normalized Gaussian with random origin and exponent\ntemplate <typename T, std::size_t NDIM>\nGaussian<T,NDIM>*\nRandomGaussian(const Tensor<double> cell, double expntmax=1e5) {\n    typedef Vector<double,NDIM> coordT;\n    coordT origin;\n    for (std::size_t i=0; i<NDIM; ++i) {\n        origin[i] = RandomValue<double>()*(cell(i,1)-cell(i,0)) + cell(i,0);\n    }\n    double lo = log(0.01);\n    double hi = log(expntmax);\n    double expnt = exp(RandomValue<double>()*(hi-lo) + lo);\n    T coeff = pow(2.0*expnt/PI,0.25*NDIM);\n    //print(\"RandomGaussian: origin\", origin, \"expnt\", expnt, \"coeff\", coeff);\n    return new Gaussian<T,NDIM>(origin,expnt,coeff);\n}\n\n\ntemplate <typename T, std::size_t NDIM>\nvoid test_add(World& world) {\n\n    const double thresh=1.e-7;\n    Tensor<double> cell(NDIM,2);\n    for (std::size_t i=0; i<NDIM; ++i) {\n        cell(i,0) = -11.0-2*i;  // Deliberately asymmetric bounding box\n        cell(i,1) =  10.0+i;\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n    std::size_t nvec=5;\n    std::vector<Function<T,NDIM> > add1(nvec), add2(nvec), sum(nvec), diff(nvec);\n\n    for (size_t i=0; i<nvec; ++i) {\n        add1[i]=FunctionFactory<T,NDIM>(world).functor([&i] (const Vector<double,3>& r) {return exp(-inner(r,r));});\n        // add2[i]=FunctionFactory<T,NDIM>(world).functor([] (const Vector<double,3>& r) {return 2.0*exp(-inner(r,r));});\n        // sum[i]=FunctionFactory<T,NDIM>(world).functor([] (const Vector<double,3>& r) {return 3.0*exp(-inner(r,r));});\n        // diff[i]=FunctionFactory<T,NDIM>(world).functor([] (const Vector<double,3>& r) {return -1.0*exp(-inner(r,r));});\n    }\n    add2=2.0*add1;\n    sum=3.0*add1;\n    diff=-1.0*add1;\n\n    std::vector<Function<T,NDIM> > r1=add1+add2;\n    std::vector<Function<T,NDIM> > r3=add1+add2[0];\n    std::vector<Function<T,NDIM> > r5=add1[0]+add2;\n\n    std::vector<Function<T,NDIM> > r2=add1-add2;\n    std::vector<Function<T,NDIM> > r4=add1-add2[0];\n    std::vector<Function<T,NDIM> > r6=add1[0]-add2;\n\n    double error1=0.0,error2=0.0,error3=0.0,error4=0.0,error5=0.0,error6=0.0;\n    for (size_t i=0; i<nvec; ++i) {\n    \terror1+=(r1[i]-sum[i]).norm2();\n    \terror3+=(r3[i]-sum[i]).norm2();\n    \terror5+=(r5[i]-sum[i]).norm2();\n\n    \terror2+=(r2[i]-diff[i]).norm2();\n    \terror4+=(r4[i]-diff[i]).norm2();\n    \terror6+=(r6[i]-diff[i]).norm2();\n    }\n    print(\"errors in add\", error1,error3,error5,error2,error4,error6);\n    MADNESS_CHECK(error1 < FunctionDefaults<NDIM>::get_thresh());\n    MADNESS_CHECK(error3 < FunctionDefaults<NDIM>::get_thresh());\n    MADNESS_CHECK(error5 < FunctionDefaults<NDIM>::get_thresh());\n    MADNESS_CHECK(error2 < FunctionDefaults<NDIM>::get_thresh());\n    MADNESS_CHECK(error4 < FunctionDefaults<NDIM>::get_thresh());\n    MADNESS_CHECK(error6 < FunctionDefaults<NDIM>::get_thresh());\n}\n\n\n\ntemplate <typename T, typename R, int NDIM, bool sym>\nvoid test_inner(World& world) {\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > ffunctorT;\n    typedef std::shared_ptr< FunctionFunctorInterface<R,NDIM> > gfunctorT;\n\n    const double thresh=1.e-7;\n    Tensor<double> cell(NDIM,2);\n    for (std::size_t i=0; i<NDIM; ++i) {\n        cell(i,0) = -11.0-2*i;  // Deliberately asymmetric bounding box\n        cell(i,1) =  10.0+i;\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n    const int nleft=95, nright=sym ? nleft : 94;\n\n    if (world.rank() == 0) \n        print(\"testing matrix_inner<\",archive::get_type_name<T>(),\",\",archive::get_type_name<R>(),\">\",\"sym =\",sym);\n\n    START_TIMER;\n    std::vector< Function<T,NDIM> > left(nleft);\n    for (int i=0; i<nleft; ++i) {\n        ffunctorT f(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),0.5));\n        left[i] = FunctionFactory<T,NDIM>(world).functor(f);\n    }\n    std::vector< Function<R,NDIM> > right(nright);\n    std::vector< Function<R,NDIM> >* pright = &right;\n    if (sym) {\n        pright = (std::vector< Function<R,NDIM> >*)(&left);\n    }\n    else {\n        for (int i=0; i<nright; ++i) {\n            gfunctorT f(RandomGaussian<R,NDIM>(FunctionDefaults<NDIM>::get_cell(),0.5));\n            right[i] = FunctionFactory<R,NDIM>(world).functor(f);\n        }\n    }\n    END_TIMER(\"project\");\n\n    START_TIMER;\n    compress(world,left);\n    compress(world,right);\n    END_TIMER(\"compress\");\n    \n    START_TIMER;\n    Tensor<TENSOR_RESULT_TYPE(T,R)> rnew = matrix_inner(world,left,*pright,sym);\n    END_TIMER(\"new\");\n    START_TIMER;\n    Tensor<TENSOR_RESULT_TYPE(T,R)> rold = matrix_inner_old(world,left,*pright,sym);\n    END_TIMER(\"old\");\n\n    if (world.rank() == 0) \n        print(\"error norm\",(rold-rnew).normf(),\"\\n\");\n\n    // With sym = true, the error is larger on the order of 2.0e-6\n    auto check_thresh = (sym) ? 50 * thresh : thresh;\n    MADNESS_CHECK((rold - rnew).normf() < check_thresh);\n}\n\ntemplate <typename T, typename R, int NDIM, bool sym>\nvoid test_dot(World& world) {\n    typedef std::shared_ptr<FunctionFunctorInterface<T, NDIM>> ffunctorT;\n    typedef std::shared_ptr<FunctionFunctorInterface<R, NDIM>> gfunctorT;\n\n    const double thresh = 1.e-7;\n    Tensor<double> cell(NDIM, 2);\n    for (std::size_t i = 0; i < NDIM; ++i) {\n        cell(i, 0) = -11.0 - 2 * i;  // Deliberately asymmetric bounding box\n        cell(i, 1) =  10.0 + i;\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n    const int nleft = 95, nright = sym ? nleft : 94;\n\n    if (world.rank() == 0)\n        print(\"testing matrix_dot<\", archive::get_type_name<T>(), \",\", archive::get_type_name<R>(), \">\", \"sym =\", sym);\n\n    START_TIMER;\n    std::vector< Function<T,NDIM> > left(nleft);\n    for (int i = 0; i < nleft; ++i) {\n        ffunctorT f(RandomGaussian<T, NDIM>(FunctionDefaults<NDIM>::get_cell(), 0.5));\n        left[i] = FunctionFactory<T, NDIM>(world).functor(f);\n    }\n    std::vector< Function<R,NDIM> > right(nright);\n    std::vector< Function<R,NDIM> >* pright = &right;\n    if (sym) {\n        pright = (std::vector< Function<R,NDIM> >*)(&left);\n    }\n    else {\n        for (int i = 0; i < nright; ++i) {\n            gfunctorT f(RandomGaussian<R,NDIM>(FunctionDefaults<NDIM>::get_cell(), 0.5));\n            right[i] = FunctionFactory<R,NDIM>(world).functor(f);\n        }\n    }\n    END_TIMER(\"project\");\n\n    START_TIMER;\n    compress(world, left);\n    compress(world, right);\n    END_TIMER(\"compress\");\n\n    START_TIMER;\n    Tensor<TENSOR_RESULT_TYPE(T, R)> rnew = matrix_dot(world, left, *pright, sym);\n    END_TIMER(\"new\");\n    START_TIMER;\n    // Tests should pass using either matrix_dot_old or matrix_inner with conj\n    // Tensor<TENSOR_RESULT_TYPE(T, R)> rold = matrix_inner(world,\n    //                                                      conj(world, left),\n    //                                                      *pright, sym);\n    Tensor<TENSOR_RESULT_TYPE(T,R)> rold = matrix_dot_old(world,left,*pright,sym);\n    END_TIMER(\"old\");\n\n    if (world.rank() == 0) \n        print(\"error norm\", (rold - rnew).normf(), \"\\n\");\n\n    // With sym = true, the error is larger on the order of 2.0e-6\n    auto check_thresh = (sym) ? 50 * thresh : thresh;\n    MADNESS_CHECK((rold - rnew).normf() < check_thresh);\n}\n\ntemplate<typename T, std::size_t NDIM>\nint test_transform(World& world) {\n    test_output to(\"testing transform\");\n    to.set_cout_to_terminal();\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > ffunctorT;\n\n\n    const double thresh=1.e-7;\n    Tensor<double> cell(NDIM,2);\n    for (std::size_t i=0; i<NDIM; ++i) {\n        cell(i,0) = -11.0-2*i;  // Deliberately asymmetric bounding box\n        cell(i,1) =  10.0+i;\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n\n    const int nleft=RandomValue<int>()%10;\n    const int nright=RandomValue<int>()%10;\n    print(\"nleft, nright\",nleft,nright);\n\n    START_TIMER;\n    std::vector< Function<T,NDIM> > left(nleft);\n    for (int i=0; i<nleft; ++i) {\n        ffunctorT f(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),0.5));\n        left[i] = FunctionFactory<T,NDIM>(world).functor(f);\n    }\n    END_TIMER(\"project\");\n    to.checkpoint(true,\"initial projection\");\n\n    Tensor<T> c(nleft,nright);\n    auto result1=transform(world,left,c);\n    to.checkpoint(true,\"reference transform\");\n\n    change_tree_state(left,reconstructed);\n    auto result2=transform_reconstructed(world,left,c,false);\n    world.gop.fence();\n    for (auto& r : result2) MADNESS_CHECK(r.get_impl()->get_tree_state()==redundant_after_merge);\n    change_tree_state(result2,reconstructed);\n    double err1=norm2(world, result1-result2);\n    to.checkpoint(err1,thresh,\"reference transform\");\n\n    change_tree_state(left,compressed);\n    auto result3=transform_reconstructed(world,left,c);\n    double err2=norm2(world, result1-result3);\n    to.checkpoint(err2,thresh,\"reference transform\");\n\n\n    return to.end();\n}\n\n\n\n\n\ntemplate <typename T, typename R, int NDIM>\nvoid test_cross(World& world) {\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > ffunctorT;\n    typedef std::shared_ptr< FunctionFunctorInterface<R,NDIM> > gfunctorT;\n\n    const double thresh=1.e-7;\n    Tensor<double> cell(NDIM,2);\n    for (std::size_t i=0; i<NDIM; ++i) {\n        cell(i,0) = -11.0-2*i;  // Deliberately asymmetric bounding box\n        cell(i,1) =  10.0+i;\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n    const int nleft=3, nright=3;\n\n    if (world.rank() == 0)\n        print(\"testing  cross product<\",archive::get_type_name<T>(),\",\",archive::get_type_name<R>(),\">\");\n\n    START_TIMER;\n    std::vector< Function<T,NDIM> > left(nleft);\n    for (int i=0; i<nleft; ++i) {\n        ffunctorT f(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),0.5));\n        left[i] = FunctionFactory<T,NDIM>(world).functor(f);\n    }\n    std::vector< Function<R,NDIM> > right(nright);\n    for (int i=0; i<nright; ++i) {\n    \tgfunctorT f(RandomGaussian<R,NDIM>(FunctionDefaults<NDIM>::get_cell(),0.5));\n    \tright[i] = FunctionFactory<R,NDIM>(world).functor(f);\n    }\n    END_TIMER(\"project\");\n\n    START_TIMER;\n    compress(world,left);\n    compress(world,right);\n    END_TIMER(\"compress\");\n\n    // cross product is anti-commuting\n    std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> > result1=cross(left,right)+cross(right,left);\n    double err1=norm2(world,result1);\n    if (world.rank() == 0) print(\"error norm1\",err1,\"\\n\");\n    MADNESS_CHECK(err1 < FunctionDefaults<NDIM>::get_thresh());\n\n    // cross product with self vanishes\n    std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> > result2=cross(left,left);\n    double err2=norm2(world,result2);\n    if (world.rank() == 0) print(\"error norm2\",err2,\"\\n\");\n    MADNESS_CHECK(err2 < FunctionDefaults<NDIM>::get_thresh());\n\n    // cross product with self vanishes\n    std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> > result3=cross(left,right);\n    Function<TENSOR_RESULT_TYPE(T,R), NDIM> reference0=left[1]*right[2] - left[2]*right[1];\n\n    double err3=(reference0-result3[0]).norm2();\n    if (world.rank() == 0) print(\"error norm3\",err3,\"\\n\");\n    MADNESS_CHECK(err3 < FunctionDefaults<NDIM>::get_thresh());\n\n    double err4=(result3[0]).norm2();\n    if (world.rank() == 0) print(\"norm of i-component\", err4, \" (should not be zero)\\n\");\n\n}\n\n\ntemplate <typename T, int NDIM>\nvoid test_rot(World& world) {\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > ffunctorT;\n\n    const double thresh=1.e-7;\n    Tensor<double> cell(NDIM,2);\n    for (std::size_t i=0; i<NDIM; ++i) {\n        cell(i,0) = -11.0-2*i;  // Deliberately asymmetric bounding box\n        cell(i,1) =  10.0+i;\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n    const int nleft=3;\n\n    if (world.rank() == 0)\n        print(\"testing rot operator<\",archive::get_type_name<T>(),\",\",archive::get_type_name<T>(),\">\");\n\n    START_TIMER;\n    std::vector< Function<T,NDIM> > left(nleft);\n    for (int i=0; i<nleft; ++i) {\n        ffunctorT f(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),0.5));\n        left[i] = FunctionFactory<T,NDIM>(world).functor(f);\n    }\n    END_TIMER(\"project\");\n\n    START_TIMER;\n    compress(world,left);\n    END_TIMER(\"compress\");\n\n    // rot grad v vanishes\n    std::vector<Function<T,NDIM> > result1=rot(grad(left[0]));\n    double err1=norm2(world,result1);\n    if (world.rank() == 0) print(\"error norm1\",err1,\"\\n\");\n\n    // div rot v vanishes\n    Function<T,NDIM> result2=div(rot(left));\n    double err2=result2.norm2();\n    if (world.rank() == 0) print(\"error norm2\",err2,\"\\n\");\n\n\n}\n\ntemplate<typename T, int NDIM>\nvoid test_matrix_mul_sparse(World &world) {\n    typedef std::shared_ptr<FunctionFunctorInterface<T, NDIM> > ffunctorT;\n\n    if (world.rank()==0) print(\"entering test_mul_sparse\");\n    const double thresh = 1.e-7;\n    Tensor<double> cell(NDIM, 2);\n    for (std::size_t i = 0; i < NDIM; ++i) {\n        cell(i, 0) = -11.0 - 2 * i;  // Deliberately asymmetric bounding box\n        cell(i, 1) = 10.0 + i;\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n    START_TIMER;\n    const long nrow = 3;\n    const long ncolumn = 4;\n    std::vector<Function<T, NDIM> > row(nrow);\n    for (long i = 0; i < nrow; ++i) {\n        ffunctorT f(RandomGaussian<T, NDIM>(FunctionDefaults<NDIM>::get_cell(), 0.5));\n        row[i] = FunctionFactory<T, NDIM>(world).functor(f);\n    }\n    std::vector<Function<T, NDIM> > column(ncolumn);\n    for (long i = 0; i < ncolumn; ++i) {\n        ffunctorT f(RandomGaussian<T, NDIM>(FunctionDefaults<NDIM>::get_cell(), 0.5));\n        column[i] = FunctionFactory<T, NDIM>(world).functor(f);\n    }\n    END_TIMER(\"project\");\n\n    START_TIMER;\n    auto result = matrix_mul_sparse<T, T, NDIM>(world, row, column, 0.0);\n    END_TIMER(\"matrix_mul_sparse\");\n\n\n\n    MADNESS_CHECK(result.size()==nrow);\n    for (long i = 0; i < nrow; ++i) {\n        MADNESS_CHECK(result[i].size()==ncolumn);\n        for (long j = 0; j < ncolumn; ++j) {\n            Function<T, NDIM> tmp = row[i] * column[j];\n            double err=(tmp-result[i][j]).norm2();\n            MADNESS_CHECK(err<1.e-10);\n        }\n    }\n\n    if (world.rank()==0) print(\"leaving test_mul_sparse\");\n}\n\ntemplate <typename T, int NDIM>\nvoid test_orthonormalize_symmetric(World& world) {\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > ffunctorT;\n\n    const double thresh=1.e-7;\n    Tensor<double> cell(NDIM,2);\n    for (std::size_t i=0; i<NDIM; ++i) {\n        cell(i,0) = -11.0-2*i;  // Deliberately asymmetric bounding box\n        cell(i,1) =  10.0+i;\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n    const int n=10;\n\n    if (world.rank() == 0) \n        print(\"testing orthonormalize_symmetric<\",archive::get_type_name<T>(),\">\");\n\n    START_TIMER;\n    std::vector< Function<T,NDIM> > vfunc(n);\n    for (int i=0; i<n; ++i) {\n        ffunctorT f(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),0.5));\n        vfunc[i] = FunctionFactory<T,NDIM>(world).functor(f);\n    }\n    END_TIMER(\"project\");\n\n    START_TIMER;\n    compress(world,vfunc);\n    END_TIMER(\"compress\");\n    \n    START_TIMER;\n    std::vector< Function<T,NDIM> > vfunc_new = orthonormalize_symmetric(vfunc, 1e-6);\n    END_TIMER(\"orthonormalize_symmetric\");\n\n    START_TIMER;\n    Tensor<T> test = matrix_inner(world, vfunc_new, vfunc_new, /* sym */ true);\n    END_TIMER(\"ovlp of vfunc_new\");\n\n    START_TIMER;\n    Tensor<T> identity(n, n);\n    for (int i=0; i<n; ++i) identity(i,i)=1.0;\n    END_TIMER(\"form identity matrix\");\n\n    if (world.rank() == 0) \n        print(\"error norm\",(identity-test).normf(),\"\\n\");\n\n    MADNESS_CHECK((identity-test).normf() < thresh);\n}\n\ntemplate <typename T, int NDIM>\nvoid test_orthonormalize_canonical(World& world) {\n    typedef std::shared_ptr< FunctionFunctorInterface<T,NDIM> > ffunctorT;\n\n    const double thresh=1.e-7;\n    Tensor<double> cell(NDIM,2);\n    for (std::size_t i=0; i<NDIM; ++i) {\n        cell(i,0) = -11.0-2*i;  // Deliberately asymmetric bounding box\n        cell(i,1) =  10.0+i;\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n    const int n=10;\n\n    if (world.rank() == 0) \n        print(\"testing orthonormalize_canonical<\",archive::get_type_name<T>(),\">\");\n\n    START_TIMER;\n    std::vector< Function<T,NDIM> > vfunc(n);\n    for (int i=0; i<n; ++i) {\n        ffunctorT f(RandomGaussian<T,NDIM>(FunctionDefaults<NDIM>::get_cell(),0.5));\n        vfunc[i] = FunctionFactory<T,NDIM>(world).functor(f);\n    }\n    END_TIMER(\"project\");\n\n    START_TIMER;\n    compress(world,vfunc);\n    END_TIMER(\"compress\");\n    \n    START_TIMER;\n    std::vector< Function<T,NDIM> > vfunc_new = orthonormalize_canonical(vfunc, 1e-6);\n    const int rank = vfunc_new.size();\n    END_TIMER(\"orthonormalize_canonical\");\n\n    START_TIMER;\n    Tensor<T> test = matrix_inner(world, vfunc_new, vfunc_new, /* sym */ true);\n    END_TIMER(\"ovlp of vfunc_new\");\n\n    START_TIMER;\n    Tensor<T> identity(rank, rank);\n    for (int i=0; i<rank; ++i) identity(i,i)=1.0;\n    END_TIMER(\"form identity matrix\");\n\n    if (world.rank() == 0) \n        print(\"error norm\",(identity-test).normf(),\"\\n\");\n\n    MADNESS_CHECK((identity-test).normf() < thresh);\n}\n\n\ntemplate <std::size_t NDIM>\nvoid test_multi_to_multi_op(World& world) {\n\n    typedef Function<double,NDIM> functionT;\n    typedef std::vector<Function<double,NDIM> > vecfuncT;\n    typedef std::shared_ptr< FunctionFunctorInterface<double,NDIM> > ffunctorT;\n\n    const double thresh=1.e-7;\n    Tensor<double> cell(NDIM,2);\n    for (std::size_t i=0; i<NDIM; ++i) {\n        cell(i,0) = -11.0-2*i;  // Deliberately asymmetric bounding box\n        cell(i,1) =  10.0+i;\n    }\n    FunctionDefaults<NDIM>::set_cell(cell);\n    FunctionDefaults<NDIM>::set_k(8);\n    FunctionDefaults<NDIM>::set_thresh(thresh);\n    FunctionDefaults<NDIM>::set_refine(true);\n    FunctionDefaults<NDIM>::set_initial_level(3);\n    FunctionDefaults<NDIM>::set_truncate_mode(1);\n\n\n    many_to_many_op<NDIM> op;\n    vecfuncT vin(3);\n\n    for (functionT& in : vin) {\n        ffunctorT f(RandomGaussian<double,NDIM>(FunctionDefaults<NDIM>::get_cell(),0.5));\n        in=FunctionFactory<double,NDIM>(world).functor(f);\n    }\n    refine_to_common_level(world,vin);\n\n    vecfuncT vout=multi_to_multi_op_values(op, vin);\n\n    std::vector<functionT> result(2);\n    result[0]=2.0*vin[0]-vout[0];\n    result[1]=vout[1]-vin[1]-vin[2];\n\n    double norm_in=norm2(world,vin);\n    double norm_out=norm2(world,vout);\n    double error=norm2(world,result);\n    if (world.rank()==0) print(\"error in multi_to_multi \",error,norm_in,norm_out);\n    MADNESS_CHECK(error < FunctionDefaults<NDIM>::get_thresh());\n\n}\n\nint main(int argc, char**argv) {\n    World& world=initialize(argc, argv);\n\n    bool smalltest = false;\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n    // if (smalltest) return 0;\n    madness::default_random_generator.setstate(int(cpu_time()*1000)%4149);\n\n\n    try {\n        startup(world,argc,argv);\n\n        test_add<double,3>(world);\n        test_add<std::complex<double>,3 >(world);\n\n        test_inner<double,double,1,false>(world);\n        test_inner<double,double,1,true>(world);\n        test_dot<double, double, 1, false>(world);\n        test_dot<double, double, 1, true>(world);\n\n        test_cross<double,double,2>(world);\n        test_cross<std::complex<double>,double,2>(world);\n        test_cross<std::complex<double>,std::complex<double>,2>(world);\n\n        test_transform<double,2>(world);\n        test_transform<double,2>(world);\n        test_transform<double,2>(world);\n        test_transform<double,2>(world);\n\n        test_rot<double,3>(world);\n        test_rot<std::complex<double>,3>(world);\n\n        test_matrix_mul_sparse<double,2>(world);\n        test_matrix_mul_sparse<double,3>(world);\n\n        test_orthonormalize_symmetric<double,1>(world);\n        test_orthonormalize_canonical<double,1>(world);\n        if (!smalltest) {\n            test_orthonormalize_symmetric<double,3>(world);\n            test_orthonormalize_canonical<double,3>(world);\n        }\n\n        test_multi_to_multi_op<1>(world);\n        test_multi_to_multi_op<2>(world);\n        if (!smalltest) test_multi_to_multi_op<3>(world);\n#if !HAVE_GENTENSOR\n        test_inner<double,std::complex<double>,1,false>(world);\n        if (!smalltest) {\n            test_inner<std::complex<double>,double,1,false>(world);\n            test_inner<std::complex<double>,std::complex<double>,1,false>(world);\n            test_inner<std::complex<double>,std::complex<double>,1,true>(world);\n        }\n        test_dot<double, std::complex<double>, 1, false>(world);\n        if (!smalltest) {\n            test_dot<std::complex<double>, double, 1, false>(world);\n            test_dot<std::complex<double>, std::complex<double>, 1, false>(world);\n            test_dot<std::complex<double>, std::complex<double>, 1, true>(world);\n        }\n        test_orthonormalize_symmetric<std::complex<double>,1>(world);\n        test_orthonormalize_canonical<std::complex<double>,1>(world);\n        if (!smalltest) {\n            test_orthonormalize_symmetric<std::complex<double>,3>(world);\n            test_orthonormalize_canonical<std::complex<double>,3>(world);\n        }\n#endif\n    }\n    catch (const SafeMPI::Exception& e) {\n        //        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n    finalize();\n\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/mra/tools/MRAMeshOrbitalPlot3D.wl",
    "content": "(* ::Package:: *)\n\nBeginPackage[\"MRAMeshOrbitalPlot3D`\"]\n\n\n(* ::Text:: *)\n(*{*)\n(* {Description: MRAMeshOrbitalPlot3D[fp,opts] returns a plot of the orbital stored via madness::plot_cubefile and madness::print_tree_jsonfile in files fp . cube and fp . tree . json, respectively . MRAMeshOrbitalPlot3D accepts all options recognized by Graphics3D and ListContourPlot3D functions, as well as the following additional options:, \\[SpanFromLeft], \\[SpanFromLeft]},*)\n(* {Option, Default, Description},*)\n(* {Zoom, 1, can be used to produce a plot in a zoomed-in section of the simulation cell . This does not need to match the zoom value given to plot_cubefile (that only affects the resolution/extent of the Gaussian Cube mesh)},*)\n(* {MRAMeshCuboidDirectives, {EdgeForm[Thick]}, Specifies how the Cuboid objects comprising the MRA mesh are drawn . All Graphics3D directives that are applicable to Cuboid (except Opacity) can be specified . },*)\n(* {MaxLevel, Infinity, Controls the highest refinement level of displayed mesh elements .},*)\n(* {MinLevel, 0, Controls the lowest refinement level of displayed mesh elements .}*)\n(*}*)\n\n\nMRAMeshOrbitalPlot3D::usage=\"MRAMeshOrbitalPlot3D[fp,opts] returns a plot of the orbital stored via madness::plot_cubefile and madness::print_json_treefile in files fp.cube and fp.tree.json, respectively. MRAMeshOrbitalPlot3D accepts all options recognized by Graphics3D and ListContourPlot3D functions, as well as the following additional options: Zoom, MRAMeshCuboidDirectives, MinLevel, and MaxLevel.\"\n\n\nBegin[\"`Private`\"]\n\n\nReadTree[fileName_] :=\n    Module[{jsonData, cellData, treeData, boxCoords, nodesData},\n        jsonData = Import[fileName];\n        cellData = \"cell\" /. jsonData;\n        treeData = \"tree\" /. jsonData;\n        boxCoords = {};\n        Do[\n            nodesData = \"nodes\" /. (ToString[n] /. treeData);\n            Do[AppendTo[boxCoords, Prepend[Interpreter[\"Integer\"] /@ \n                StringSplit[Part[nodesData[[i]], 1], {\"[\", \"]\", \",\"}], n]], {i, Length[\n                nodesData]}];\n            ,\n            {n, 0, Length[treeData] - 1}\n        ];\n        Return[{cellData, boxCoords}]\n    ];\n\nBoxToXYZCoords[cell_, box_] :=\n    Module[{S},\n        S = Table[cell[[xyz, 2]] - cell[[xyz, 1]], {xyz, 3}];\n        Return[{{cell[[1, 1]] + S[[1]] box[[2]] / (2 ^ box[[1]]), cell\n            [[2, 1]] + S[[2]] box[[3]] / (2 ^ box[[1]]), cell[[3, 1]] + S[[3]] box\n            [[4]] / (2 ^ box[[1]])}, {cell[[1, 1]] + S[[1]] (box[[2]] + 1) / (2 ^\n             box[[1]]), cell[[2, 1]] + S[[2]] (box[[3]] + 1) / (2 ^ box[[1]]), cell\n            [[3, 1]] + S[[3]] (box[[4]] + 1) / (2 ^ box[[1]])}}]\n    ];\n\nBoxToGraphics[cell_, box_, nmax_, omax_(* opacity value of the smallest\n     boxes *), shadeexp_(* opacity of box at level n-1 is this times smaller\n     than than of box at level n *),cuboidDirectives_List] :=\n    Module[{},\n        Return[Join[(*N.B. MUST BE FIRST to apply to Cuboid*)cuboidDirectives,{Opacity[omax / shadeexp ^ (nmax - box[[1]])], Cuboid \n            @@ BoxToXYZCoords[cell, box],EdgeForm[Thick]}]]\n    ];\n\n(*\nMaxLevel,MinLevel: show boxes with resolution level [nmin,nmax]\nZoom: limit PlotRange to cell/Zoom\n*)\n\nProtect[MaxLevel,MinLevel,Zoom,MRAMeshCuboidDirectives];\nOptions[MRAMeshOrbitalPlot3D] = {MaxLevel -> Infinity, MinLevel -> 0, Zoom\n     -> 1,MRAMeshCuboidDirectives->{EdgeForm[Thick]}};\n\n(* plots orbital and its mesh superimposed *)\n\nMRAMeshOrbitalPlot3D[filePrefix_, opt : OptionsPattern[{MRAMeshOrbitalPlot3D,\n     Graphics3D, ListContourPlot3D, Show}]] :=\n    Module[\n        {simulationCell, boxTreeCoords, bohr2angstrom, selectedBoxes,\n             boxGraphics, meshPlot, orbitalPlot, nmax, nmin, zoom, omax, shadeexp,\n             actualNMax,cuboidDirectives, plotRange}\n        ,\n        (* process options *)\n        nmax = OptionValue[MaxLevel];\n        nmin = OptionValue[MinLevel];\n        zoom = OptionValue[Zoom];\n        cuboidDirectives=OptionValue[MRAMeshCuboidDirectives];\n        \n        (* these are hardwired since they are not needed for most users\n             *)\n        omax = 0;(* opacity value of the smallest boxes *)\n        shadeexp = 1.9;(* opacity of box at level n-1 is this times smaller\n             than than of box at level n *)\n             \n        {simulationCell, boxTreeCoords} = ReadTree[filePrefix <> \".tree.json\"\n            ]; (* the deduced hardwired value used by Wolfram when importing Gaussian\n             Cube file *) bohr2angstrom = 0.529177249;\n        simulationCell *= bohr2angstrom;\n        (* override default PlotRange *)\n        plotRange =\n            If[OptionValue[PlotRange] === All,\n                simulationCell / zoom\n                ,\n                OptionValue[PlotRange]\n            ];\n        selectedBoxes = Select[boxTreeCoords, #[[1]] <= nmax && #[[1]]\n             >= nmin&];\n        actualNMax = MaximalBy[selectedBoxes, #[[1]]&][[1, 1]];\n        boxGraphics = Map[BoxToGraphics[simulationCell, #, actualNMax,\n             omax, shadeexp, cuboidDirectives]&, selectedBoxes];\n        meshPlot = Graphics3D[boxGraphics, Boxed -> False, Evaluate @\n             FilterRules[{opt}, Options[Graphics3D]]];\n        orbitalPlot = Import[filePrefix <> \".cube\", \"Graphics3D\", Boxed\n             -> False, Evaluate @ FilterRules[{opt}, Options[ListContourPlot3D]]]\n            ;\n        Return[Show[{orbitalPlot, meshPlot}, Evaluate @ FilterRules[{\n            opt, PlotRange -> plotRange}, Options[Graphics3D]]]];\n    ];\n\n\n\nEnd[]\n\n\nEndPackage[]\n"
  },
  {
    "path": "src/madness/mra/tools/README.md",
    "content": "# Contents\n\nThis directory contains various utilities:\n\n- autocorr.mw ... a Maple worksheet to generate the autocorrelation coefficients\n- dump2.py with dependencies ... a Python program to generate the two-scale coefficients. Run with `python dump2.py`\n- quadrature.py can be easily modified to generate the full-precision Gauss-Legendre coeffs\n- MRAMeshOrbitalPlot3D.wl ... a Wolfram language (\"Mathematica\", for the old school) package for plotting orbitals stored in the Gaussian Cube format (see `madness::plot_cubefile`) along with the mesh stored a JSON format (see `madness::print_tree_jsonfile`).\n\n## `MRAMeshOrbitalPlot3D.wl`\n\n- if you have [WolframScript](https://www.wolfram.com/wolframscript/) installed (it is bundled with Mathematica by default on Windows/Linux; on a Mac need to [download/install manually](https://www.wolfram.com/wolframscript/) to plot from command-line or shell script. See a quick example in `h2-no1.wsl`; to try out execute `./h2-no1.wsl > h2-no1.pdf` \n- more elaborate plotting is best done from a Mathematica notebook. Here's a brief example:\n```Wolfram\n<< \"/path/to/madness/source/dir/src/madness/mra/tools/MRAMeshOrbitalPlot3D.wl\"\n\n(* this assumes that data.cube (produced by madness::plot_cubefile) and data.tree.json (produced by madness::print_tree_jsonfile) exist in /path/to/data\nMRAMeshOrbitalPlot3D[\"/path/to/data\"]\n```\nYou can even pull the module and data remotely, e.g.:\n```Wolfram\n<< \"https://raw.githubusercontent.com/m-a-d-n-e-s-s/madness/evaleev/feature/wolfram-orbital-plotting/src/madness/mra/tools/MRAMeshOrbitalPlot3D.wl\"\n\nMRAMeshOrbitalPlot3D[\"https://raw.githubusercontent.com/m-a-d-n-e-s-s/madness/evaleev/feature/wolfram-orbital-plotting/src/madness/mra/tools/h2-no1\"]\n```\n\n### \nThe only function `MRAMeshOrbitalPlot3D.wl` provides is `MRAMeshOrbitalPlot3D`.  `MRAMeshOrbitalPlot3D[fp,opts]` returns a plot of the orbital stored via `madness::plot_cubefile` and `madness::print_json_treefile` in files `fp.cube` and `fp.tree.json`, respectively. `MRAMeshOrbitalPlot3D` accepts all options recognized by [`Graphics3D`](https://reference.wolfram.com/language/ref/Graphics3D.html]) and [`ListContourPlot3D`](https://reference.wolfram.com/language/ref/ListContourPlot3D.html) functions, as well as the following additional options:\n\n| Option                      | Default             | Description                                                                                                                                                                                                                                                                                                                                             |\n|-----------------------------|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `Zoom`                      | `1`                 | Can be used to produce a plot in a zoomed-in section of the simulation cell. This does not need to match the zoom value given to plot_cubefile (that only affects the resolution/extent of the Gaussian Cube mesh)                                                                                                                                      |\n| `MRAMeshCuboidDirectives`   | `{EdgeForm[Thick]}` | Specifies how the Cuboid objects comprising the MRA mesh are drawn. All [`Graphics3D`](https://reference.wolfram.com/language/ref/Graphics3D.html) directives that are applicable to [`Cuboid`](https://reference.wolfram.com/language/ref/Cuboid.html) (except [`Opacity`](https://reference.wolfram.com/language/ref/Opacity.html)) can be specified. |\n| `MaxLevel`                  | `Infinity`          | Controls the highest refinement level of displayed mesh elements.                                                                                                                                                                                                                                                                                       |\n| `MinLevel`                  | `0`                 | Controls the lowest refinement level of displayed mesh elements.                                                                                                                                                                                                                                                                                        |\n\n\n"
  },
  {
    "path": "src/madness/mra/tools/autocorr.mw",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<Worksheet><Version major=\"6\" minor=\"0\"/><View-Properties><Zoom percentage=\"100\"/></View-Properties><Styles><Layout alignment=\"left\" linebreak=\"space\" name=\"Warning\"/><Layout alignment=\"left\" linespacing=\"0.5\" name=\"_pstyle12\"/><Layout name=\"Normal\"/><Layout alignment=\"centred\" linespacing=\"0.5\" name=\"Maple Output\"/><Font background=\"[0,0,0]\" family=\"Monospaced\" foreground=\"[0,0,255]\" name=\"Warning\" readonly=\"true\" size=\"10\"/><Font background=\"[0,0,0]\" family=\"Times New Roman\" foreground=\"[0,0,255]\" name=\"2D Output\" underline=\"false\"/><Font background=\"[0,0,0]\" bold=\"true\" executable=\"true\" family=\"Monospaced\" foreground=\"[255,0,0]\" name=\"Maple Input\"/></Styles><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">restart;</Text-field></Input></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">Phi := (i,j,z) -&gt; piecewise(\r\nz&lt;=0,int(phi(i,x)*phi(j,x-z),x=0..z+1), \r\nz&gt;0, int(phi(i,x)*phi(j,x-z),x=z..1));</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+SSRQaGlHNiJmKjYlSSJpR0YlSSJqR0YlSSJ6R0YlRiU2JEkpb3BlcmF0b3JHRiVJJmFycm93R0YlRiUtSSpwaWVjZXdpc2VHSSpwcm90ZWN0ZWRHRjA2JjE5JiIiIS1JJGludEdGJTYkKiYtSSRwaGlHRiU2JDkkSSJ4R0YlIiIiLUY6NiQ5JSwmRj1GPkYzISIiRj4vRj07RjQsJkYzRj5GPkY+MkY0RjMtRjY2JEY4L0Y9O0YzRj5GJUYlRiU=</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">phi := (i,x) -&gt; piecewise(x&lt;0,0,x&lt;1,sqrt(2*i+1) * P(i,2*x-1),x&gt;1,0);</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+SSRwaGlHNiJmKjYkSSJpR0YlSSJ4R0YlRiU2JEkpb3BlcmF0b3JHRiVJJmFycm93R0YlRiUtSSpwaWVjZXdpc2VHSSpwcm90ZWN0ZWRHRi82KDI5JSIiIUYzMkYyIiIiKiYtSSVzcXJ0R0YlNiMsJjkkIiIjRjVGNUY1LUkiUEdGJTYkRjssJkYyRjwhIiJGNUY1MkY1RjJGM0YlRiVGJQ==</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">phi := (i,x) -&gt; sqrt(2*i+1) * P(i,2*x-1);</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+SSRwaGlHNiJmKjYkSSJpR0YlSSJ4R0YlRiU2JEkpb3BlcmF0b3JHRiVJJmFycm93R0YlRiUqJi1JJXNxcnRHRiU2IywmOSQiIiMiIiJGNEY0LUkiUEdGJTYkRjIsJjklRjMhIiJGNEY0RiVGJUYl</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">with(orthopoly):</Text-field></Input></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">cplus := (i,j,p) -&gt; simplify(int(int(phi(i,x)*phi(j,x-y),x=y..1)*phi(p,y),y=0..1));</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+SSZjcGx1c0c2ImYqNiVJImlHRiVJImpHRiVJInBHRiVGJTYkSSlvcGVyYXRvckdGJUkmYXJyb3dHRiVGJS1JKXNpbXBsaWZ5R0YlNiMtSSRpbnRHRiU2JComLUYyNiQqJi1JJHBoaUdGJTYkOSRJInhHRiUiIiItRjk2JDklLCZGPEY9SSJ5R0YlISIiRj0vRjw7RkJGPUY9LUY5NiQ5JkZCRj0vRkI7IiIhRj1GJUYlRiU=</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">cminus := (i,j,p) -&gt; simplify(int(int(phi(i,x)*phi(j,x-y),x=0..y+1)*phi(p,y+1),y=-1..0));</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+SSdjbWludXNHNiJmKjYlSSJpR0YlSSJqR0YlSSJwR0YlRiU2JEkpb3BlcmF0b3JHRiVJJmFycm93R0YlRiUtSSlzaW1wbGlmeUdGJTYjLUkkaW50R0YlNiQqJi1GMjYkKiYtSSRwaGlHRiU2JDkkSSJ4R0YlIiIiLUY5NiQ5JSwmRjxGPUkieUdGJSEiIkY9L0Y8OyIiISwmRkJGPUY9Rj1GPS1GOTYkOSZGR0Y9L0ZCO0ZDRkZGJUYlRiU=</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\"/></Input></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">cminus(1,1,1);</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMsJCokIiIkIyIiIiIiIyNGJyIiJg==</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">Digits := 30;</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+SSdEaWdpdHNHNiIiI0k=</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\"># Note that \r\n#          cplus(i,j,p) = <Font opaque=\"false\">(-1)**(i+j+p) * cminus(i,j,p)</Font>\r\n#          cplus(i,j,p) = (-1)**(i+j)   * cplus(j,i,p)</Text-field></Input></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">fd := fopen(\"autocorr_plus.txt\",WRITE);</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+SSNmZEc2IiIiIQ==</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">for i from 0 to 34 do\r\n   print(\"doing \",i);\r\n   for j from 0 to i do\r\n       for p from 0 to (i+j+1) do\r\n          c := eval(cplus(i,j,p));\r\n          if (c &lt;&gt; 0) then\r\n             fprintf(fd,\"%d %d %d %.17e\\n\",i,j,p,evalf(c));\r\n             fflush(fd); \r\n          fi;\r\n       od;\r\n   od;\r\nod;</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiIh</Equation></Text-field><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiIi</Equation></Text-field><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiIj</Equation></Text-field><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiIk</Equation></Text-field><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiIl</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiIm</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiIn</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiIo</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiIp</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiIq</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM1</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM2</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM3</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM4</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM5</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM6</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM7</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM8</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM9</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM+</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiM/</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiNA</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiNB</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiNC</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiND</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiNE</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiNF</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiNG</Equation></Text-field></Output><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiRRJ2RvaW5nfjYiIiNH</Equation></Text-field></Output><Output><Text-field layout=\"Warning\" style=\"Warning\">Warning,  computation interrupted</Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">close(fd);</Text-field></Input></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">phi(1,x);</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMqJi0lJXNxcnRHNiMiIiQiIiIsJiUieEciIiMhIiJGKEYo</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">with(orthopoly):</Text-field></Input></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">int(phi(1,x)*phi(0,x),x=0..1);</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMiIiE=</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">phi(2,x);</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMqJi0lJXNxcnRHNiMiIiYiIiIsJiokKSwmJSJ4RyIiIyEiIkYoRi5GKCMiIiRGLiNGL0YuRihGKA==</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">phi(0,x);</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMiIiI=</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">phi(0,0.2);</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMiIiI=</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">evalf(phi(1,0.2));</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMkISsmW0kjUjUhIio=</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">evalf(phi(2,0.2));</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMkIis3PkZXKikhIzY=</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">evalf(phi(3,0.2));</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMkIis/WnFDJiohIzU=</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">evalf(phi(4,0.2));</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMkISsrKytDNyEiKg==</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">evalf(phi(5,0.2));</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMkIit6Z1xpXSEjNQ==</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">a := 10.0;</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+JSJhRyQiJSs1ISIi</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">int(exp(-a*x*x)*x^21,x=0..1);</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiMkIjUrKysrKysrUzk9ISNO</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">Digits := 20;</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+JSdEaWdpdHNHIiM/</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">int(exp(-b*x*x)*(x-l),x=l..l+1);</Text-field></Input><Output><Text-field layout=\"_pstyle12\" style=\"2D Output\"><Equation style=\"2D Output\">NiMsJComLCoqJi0lJGV4cEc2IywkKiYpLCYlImxHIiIiRi9GLyIiI0YvJSJiR0YvISIiRi8tJSVzcXJ0RzYjRjFGL0YyKi5GJ0YvRi5GLy1GNDYjJSNQaUdGLy0lJGVyZkc2IywmKiZGM0YvRi5GL0YvKiRGM0YvRi9GL0YxRi8tRig2I0YrRi9GMiomLUYoNiMsJComRjFGLylGLkYwRi9GMkYvRjNGL0YvKi5GQ0YvRi5GL0Y3Ri8tRjs2I0Y+Ri8tRig2I0ZGRi9GMUYvRi9GLyokKUYxIyIiJEYwRi9GMiNGL0Yw</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">int(exp(-a*x*x)*(x-0)^21,x=0..1);</Text-field></Input><Output><Text-field layout=\"_pstyle12\" style=\"2D Output\"><Equation style=\"2D Output\">NiMkIltzTXpwTUBNaCEpPmEieSMpMzFEdiEpNCMpKjQxWlQoPmJxVyZvJ29bWV8oKltBZCFcWF5TVyEpKnlkJHoqKioqKioqKioqKioqKioqKioqKioqKipSOT0hJFYi</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">a := 100.0;</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+JSJhRyQiJSs1ISIi</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\">Digits := 128;</Text-field></Input><Output><Text-field layout=\"Maple Output\" style=\"2D Output\"><Equation style=\"2D Output\">NiM+JSdEaWdpdHNHIiRHIg==</Equation></Text-field></Output></Group><Group><Input><Text-field layout=\"Normal\" prompt=\"&gt; \" style=\"Maple Input\"/></Input></Group><Text-field/><Text-field/></Worksheet>"
  },
  {
    "path": "src/madness/mra/tools/dump2.py",
    "content": "import sys\nfrom array import array\n\n__kmax = 60\n__asciifile = \"coeffs\"\n__checksum = (1.57015282218922890,1.48602374574943450)\n\ndef matrix(n,m): \n    a = range(n) \n    for i in range(n): \n        a[i] = array('d',[0.0]*m) \n    return a \n\ndef writemat(k,file,a):\n    for i in range(k):\n        for j in range(k):\n            if a[i][j] == 0.0:\n                file.write(\"0.0\\n\")\n            else:\n                file.write(\"%.17e\\n\" % a[i][j])\n\ndef readmat(k,file):\n    a = matrix(k,k)\n    for i in range(k):\n        for j in range(k):\n            a[i][j] = float(file.readline())\n\n    return a\n\ndef writeascii(kmax,filename):\n    file = open(filename,'w')\n    for k in range(1,kmax+1):\n        h0,h1,g0,g1 = twoscalecoeffs(k)\n        writemat(k,file,h0)\n        writemat(k,file,g0)\n\ndef readascii(kmax,filename):\n    global __cache\n    __cache = {}\n    file = open(filename,'r')\n    for k in range(1,kmax+1):\n        h0 = readmat(k,file)\n        g0 = readmat(k,file)\n        h1 = matrix(k,k)\n        g1 = matrix(k,k)\n        for i in range(k):\n            for j in range(k):\n                hphase = (-1)**(i+j)\n                gphase = (-1)**(i+j+k)\n                h1[i][j] = h0[i][j]*hphase\n                g1[i][j] = g0[i][j]*gphase\n\n        __cache[k] = h0,h1,g0,g1\n\n    sum0, sum1 = checksum(kmax)\n    if abs(__checksum[0]-sum0) > 1e-16 or \\\n       abs(__checksum[1]-sum1) > 1e-16:\n        print \"%.17e %.17e\" % __checksum\n        print \"%.17e %.17e\" % (sum0, sum1)\n        raise ValueError,\"two-scale checksum?\"\n    \ndef checksum(kmax):\n    sum0 = sum1 = 0.0\n    for k in range(1,kmax+1):\n        h0,h1,g0,g1 = __cache[k]\n        for i in range(k):\n            for j in range(k):\n                ij = float(j+k)/(i+k)\n                sum0 = sum0 + ij*(abs(h0[i][j]) + abs(h1[i][j]) +\n                                  abs(g0[i][j]) + abs(g1[i][j]))\n                sum1 = sum1 + ij*(h0[i][j] + h1[i][j] +\n                                  g0[i][j] + g1[i][j])\n                while sum0 > 2.0: sum0 = sum0 * 0.25\n                while abs(sum1) > 2.0: sum1 = sum1 * 0.25\n\n    return (sum0, sum1)\n\nif __name__ == \"__main__\":\n    from twoscalecoeffs import twoscalecoeffs\n    writeascii(__kmax,__asciifile)\n    readascii(__kmax,__asciifile)\n"
  },
  {
    "path": "src/madness/mra/tools/h2-no1.tree.json",
    "content": "{\"cell\":[[-32,32],[-32,32],[-32,32]],\"tree\":{\"0\":{\"level\": 0,\"nodes\":{\"[0,0,0]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":1,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0}}},\"1\":{\"level\": 1,\"nodes\":{\"[0,0,0]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[1,0,0]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[0,1,0]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[1,1,0]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[0,0,1]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[1,0,1]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[0,1,1]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[1,1,1]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0}}},\"2\":{\"level\": 2,\"nodes\":{\"[0,0,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":2.0088e-07,\"norm_tree\":2.0088e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,0,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.32339e-08,\"norm_tree\":1.32339e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,1,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.32339e-08,\"norm_tree\":1.32339e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,1,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.60615e-08,\"norm_tree\":6.60615e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,0,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.39544e-09,\"norm_tree\":6.39544e-09,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,0,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.38003e-08,\"norm_tree\":3.38003e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,1,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.38003e-08,\"norm_tree\":3.38003e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,1,1]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[2,0,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.32339e-08,\"norm_tree\":1.32339e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,0,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":2.00879e-07,\"norm_tree\":2.00879e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,1,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.60573e-08,\"norm_tree\":6.60573e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,1,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.28953e-08,\"norm_tree\":1.28953e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,0,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.38003e-08,\"norm_tree\":3.38003e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,0,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.3954e-09,\"norm_tree\":6.3954e-09,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,1,1]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[3,1,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.37929e-08,\"norm_tree\":3.37929e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,2,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.32339e-08,\"norm_tree\":1.32339e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,2,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.60573e-08,\"norm_tree\":6.60573e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,3,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":2.00879e-07,\"norm_tree\":2.00879e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,3,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.28953e-08,\"norm_tree\":1.28953e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,2,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.38003e-08,\"norm_tree\":3.38003e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,2,1]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[0,3,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.3954e-09,\"norm_tree\":6.3954e-09,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,3,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.37929e-08,\"norm_tree\":3.37929e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,2,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.6053e-08,\"norm_tree\":6.6053e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,2,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.28958e-08,\"norm_tree\":1.28958e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,3,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.28958e-08,\"norm_tree\":1.28958e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,3,0]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.98559e-07,\"norm_tree\":1.98559e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,2,1]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[3,2,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.37907e-08,\"norm_tree\":3.37907e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,3,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.37907e-08,\"norm_tree\":3.37907e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,3,1]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.28111e-09,\"norm_tree\":6.28111e-09,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,0,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.39544e-09,\"norm_tree\":6.39544e-09,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,0,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.38003e-08,\"norm_tree\":3.38003e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,1,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.38003e-08,\"norm_tree\":3.38003e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,1,2]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[0,0,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":2.0088e-07,\"norm_tree\":2.0088e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,0,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.32339e-08,\"norm_tree\":1.32339e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,1,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.32339e-08,\"norm_tree\":1.32339e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,1,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.60615e-08,\"norm_tree\":6.60615e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,0,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.38003e-08,\"norm_tree\":3.38003e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,0,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.3954e-09,\"norm_tree\":6.3954e-09,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,1,2]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[3,1,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.37929e-08,\"norm_tree\":3.37929e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,0,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.32339e-08,\"norm_tree\":1.32339e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,0,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":2.00879e-07,\"norm_tree\":2.00879e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,1,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.60573e-08,\"norm_tree\":6.60573e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,1,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.28953e-08,\"norm_tree\":1.28953e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,2,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.38003e-08,\"norm_tree\":3.38003e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,2,2]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[0,3,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.3954e-09,\"norm_tree\":6.3954e-09,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,3,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.37929e-08,\"norm_tree\":3.37929e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,2,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.32339e-08,\"norm_tree\":1.32339e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,2,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.60573e-08,\"norm_tree\":6.60573e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[0,3,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":2.00879e-07,\"norm_tree\":2.00879e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[1,3,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.28953e-08,\"norm_tree\":1.28953e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,2,2]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[3,2,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.37907e-08,\"norm_tree\":3.37907e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,3,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.37907e-08,\"norm_tree\":3.37907e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,3,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.28111e-09,\"norm_tree\":6.28111e-09,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,2,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.6053e-08,\"norm_tree\":6.6053e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,2,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.28958e-08,\"norm_tree\":1.28958e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,3,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.28958e-08,\"norm_tree\":1.28958e-08,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,3,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.98559e-07,\"norm_tree\":1.98559e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0}}},\"3\":{\"level\": 3,\"nodes\":{\"[2,2,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.93333e-07,\"norm_tree\":1.93333e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,2,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.74994e-07,\"norm_tree\":1.74994e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,3,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.74994e-07,\"norm_tree\":1.74994e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,3,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.65214e-05,\"norm_tree\":3.65214e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,2,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.24295e-06,\"norm_tree\":1.24295e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,2,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37993e-06,\"norm_tree\":6.37993e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,3,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37993e-06,\"norm_tree\":6.37993e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,3,3]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[4,2,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.74985e-07,\"norm_tree\":1.74985e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,2,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.93281e-07,\"norm_tree\":1.93281e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,3,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.65212e-05,\"norm_tree\":3.65212e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,3,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.61148e-07,\"norm_tree\":1.61148e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,2,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37993e-06,\"norm_tree\":6.37993e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,2,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.24295e-06,\"norm_tree\":1.24295e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,3,3]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[5,3,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37943e-06,\"norm_tree\":6.37943e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,4,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.74985e-07,\"norm_tree\":1.74985e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,4,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.65212e-05,\"norm_tree\":3.65212e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,5,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.93281e-07,\"norm_tree\":1.93281e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,5,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.61148e-07,\"norm_tree\":1.61148e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,4,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37993e-06,\"norm_tree\":6.37993e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,4,3]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[2,5,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.24295e-06,\"norm_tree\":1.24295e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,5,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37943e-06,\"norm_tree\":6.37943e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,4,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.6521e-05,\"norm_tree\":3.6521e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,4,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.61104e-07,\"norm_tree\":1.61104e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,5,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.61104e-07,\"norm_tree\":1.61104e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,5,2]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.91122e-07,\"norm_tree\":1.91122e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,4,3]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[5,4,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.3794e-06,\"norm_tree\":6.3794e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,5,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.3794e-06,\"norm_tree\":6.3794e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,5,3]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.23315e-06,\"norm_tree\":1.23315e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,2,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.24295e-06,\"norm_tree\":1.24295e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,2,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37993e-06,\"norm_tree\":6.37993e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,3,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37993e-06,\"norm_tree\":6.37993e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,3,4]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[2,2,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.93333e-07,\"norm_tree\":1.93333e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,2,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.74994e-07,\"norm_tree\":1.74994e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,3,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.74994e-07,\"norm_tree\":1.74994e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,3,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.65214e-05,\"norm_tree\":3.65214e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,2,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37993e-06,\"norm_tree\":6.37993e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,2,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.24295e-06,\"norm_tree\":1.24295e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,3,4]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[5,3,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37943e-06,\"norm_tree\":6.37943e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,2,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.74985e-07,\"norm_tree\":1.74985e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,2,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.93281e-07,\"norm_tree\":1.93281e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,3,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.65212e-05,\"norm_tree\":3.65212e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,3,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.61148e-07,\"norm_tree\":1.61148e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,4,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37993e-06,\"norm_tree\":6.37993e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,4,4]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[2,5,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.24295e-06,\"norm_tree\":1.24295e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,5,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.37943e-06,\"norm_tree\":6.37943e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,4,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.74985e-07,\"norm_tree\":1.74985e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,4,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.65212e-05,\"norm_tree\":3.65212e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[2,5,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.93281e-07,\"norm_tree\":1.93281e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[3,5,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.61148e-07,\"norm_tree\":1.61148e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,4,4]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353553,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[5,4,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.3794e-06,\"norm_tree\":6.3794e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,5,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":6.3794e-06,\"norm_tree\":6.3794e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,5,4]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.23315e-06,\"norm_tree\":1.23315e-06,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,4,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.6521e-05,\"norm_tree\":3.6521e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,4,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.61104e-07,\"norm_tree\":1.61104e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[4,5,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.61104e-07,\"norm_tree\":1.61104e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[5,5,5]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":1.91122e-07,\"norm_tree\":1.91122e-07,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0}}},\"4\":{\"level\": 4,\"nodes\":{\"[6,6,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.0711e-05,\"norm_tree\":3.0711e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,6,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,7,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,7,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00782402,\"norm_tree\":0.00782402,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,6,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000100879,\"norm_tree\":0.000100879,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,6,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,7,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,7,7]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353457,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[8,6,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,6,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.07109e-05,\"norm_tree\":3.07109e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,7,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00782402,\"norm_tree\":0.00782402,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,7,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,6,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,6,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000100879,\"norm_tree\":0.000100879,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,7,7]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353457,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[9,7,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,8,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,8,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00782402,\"norm_tree\":0.00782402,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,9,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.07109e-05,\"norm_tree\":3.07109e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,9,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,8,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,8,7]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353457,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[6,9,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000100879,\"norm_tree\":0.000100879,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,9,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,8,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00782402,\"norm_tree\":0.00782402,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,8,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,9,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,9,6]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.07109e-05,\"norm_tree\":3.07109e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,8,7]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353457,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[9,8,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,9,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,9,7]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000100879,\"norm_tree\":0.000100879,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,6,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000100879,\"norm_tree\":0.000100879,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,6,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,7,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,7,8]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353457,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[6,6,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.0711e-05,\"norm_tree\":3.0711e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,6,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,7,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,7,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00782402,\"norm_tree\":0.00782402,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,6,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,6,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000100879,\"norm_tree\":0.000100879,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,7,8]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353457,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[9,7,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,6,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,6,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.07109e-05,\"norm_tree\":3.07109e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,7,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00782402,\"norm_tree\":0.00782402,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,7,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,8,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,8,8]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353457,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[6,9,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000100879,\"norm_tree\":0.000100879,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,9,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,8,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,8,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00782402,\"norm_tree\":0.00782402,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[6,9,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.07109e-05,\"norm_tree\":3.07109e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[7,9,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,8,8]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.353457,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[9,8,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,9,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00186072,\"norm_tree\":0.00186072,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,9,8]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000100879,\"norm_tree\":0.000100879,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,8,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00782402,\"norm_tree\":0.00782402,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,8,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[8,9,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.000342545,\"norm_tree\":0.000342545,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[9,9,9]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":3.07109e-05,\"norm_tree\":3.07109e-05,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0}}},\"5\":{\"level\": 5,\"nodes\":{\"[14,14,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00414779,\"norm_tree\":0.00414779,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,14,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,15,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,15,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0947242,\"norm_tree\":0.0947242,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,14,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00550777,\"norm_tree\":0.00550777,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,14,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,15,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,15,15]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.33736,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[16,14,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,14,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00414779,\"norm_tree\":0.00414779,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,15,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0947242,\"norm_tree\":0.0947242,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,15,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,14,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,14,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00550777,\"norm_tree\":0.00550777,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,15,15]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.33736,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[17,15,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,16,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,16,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0947242,\"norm_tree\":0.0947242,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,17,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00414779,\"norm_tree\":0.00414779,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,17,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,16,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,16,15]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.33736,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[14,17,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00550777,\"norm_tree\":0.00550777,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,17,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,16,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0947242,\"norm_tree\":0.0947242,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,16,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,17,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,17,14]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00414779,\"norm_tree\":0.00414779,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,16,15]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.33736,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[17,16,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,17,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,17,15]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00550777,\"norm_tree\":0.00550777,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,14,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00550777,\"norm_tree\":0.00550777,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,14,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,15,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,15,16]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.33736,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[14,14,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00414779,\"norm_tree\":0.00414779,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,14,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,15,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,15,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0947242,\"norm_tree\":0.0947242,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,14,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,14,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00550777,\"norm_tree\":0.00550777,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,15,16]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.33736,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[17,15,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,14,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,14,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00414779,\"norm_tree\":0.00414779,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,15,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0947242,\"norm_tree\":0.0947242,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,15,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,16,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,16,16]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.33736,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[14,17,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00550777,\"norm_tree\":0.00550777,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,17,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,16,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,16,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0947242,\"norm_tree\":0.0947242,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[14,17,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00414779,\"norm_tree\":0.00414779,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[15,17,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,16,16]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.33736,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[17,16,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,17,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0280011,\"norm_tree\":0.0280011,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,17,16]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00550777,\"norm_tree\":0.00550777,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,16,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0947242,\"norm_tree\":0.0947242,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,16,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[16,17,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0162979,\"norm_tree\":0.0162979,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[17,17,17]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.00414779,\"norm_tree\":0.00414779,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0}}},\"6\":{\"level\": 6,\"nodes\":{\"[30,30,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0376302,\"norm_tree\":0.0376302,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,30,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,31,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,31,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.207513,\"norm_tree\":0.207513,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,30,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0271496,\"norm_tree\":0.0271496,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,30,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,31,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,31,31]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.219039,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[32,30,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,30,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0376302,\"norm_tree\":0.0376302,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,31,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.207513,\"norm_tree\":0.207513,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,31,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,30,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,30,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0271496,\"norm_tree\":0.0271496,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,31,31]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.219039,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[33,31,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,32,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,32,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.207513,\"norm_tree\":0.207513,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,33,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0376302,\"norm_tree\":0.0376302,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,33,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,32,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,32,31]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.219039,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[30,33,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0271496,\"norm_tree\":0.0271496,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,33,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,32,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.207513,\"norm_tree\":0.207513,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,32,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,33,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,33,30]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0376302,\"norm_tree\":0.0376302,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,32,31]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.219039,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[33,32,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,33,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,33,31]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0271496,\"norm_tree\":0.0271496,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,30,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0271496,\"norm_tree\":0.0271496,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,30,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,31,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,31,32]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.219039,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[30,30,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0376302,\"norm_tree\":0.0376302,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,30,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,31,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,31,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.207513,\"norm_tree\":0.207513,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,30,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,30,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0271496,\"norm_tree\":0.0271496,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,31,32]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.219039,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[33,31,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,30,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,30,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0376302,\"norm_tree\":0.0376302,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,31,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.207513,\"norm_tree\":0.207513,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,31,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,32,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,32,32]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.219039,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[30,33,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0271496,\"norm_tree\":0.0271496,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,33,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,32,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,32,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.207513,\"norm_tree\":0.207513,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[30,33,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0376302,\"norm_tree\":0.0376302,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[31,33,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,32,32]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.219039,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[33,32,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,33,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0639508,\"norm_tree\":0.0639508,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,33,32]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0271496,\"norm_tree\":0.0271496,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,32,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.207513,\"norm_tree\":0.207513,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,32,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[32,33,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0788667,\"norm_tree\":0.0788667,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[33,33,33]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0376302,\"norm_tree\":0.0376302,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0}}},\"7\":{\"level\": 7,\"nodes\":{\"[62,62,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0577802,\"norm_tree\":0.0577802,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,62,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,63,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,63,62]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.144069,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[62,62,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0282935,\"norm_tree\":0.0282935,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,62,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,63,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,63,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0717746,\"norm_tree\":0.0717746,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,62,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,62,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0577802,\"norm_tree\":0.0577802,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,63,62]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.144069,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[65,63,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,62,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,62,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0282935,\"norm_tree\":0.0282935,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,63,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0717746,\"norm_tree\":0.0717746,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,63,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,64,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,64,62]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.144069,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[62,65,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0577802,\"norm_tree\":0.0577802,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,65,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,64,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,64,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0717746,\"norm_tree\":0.0717746,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,65,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0282935,\"norm_tree\":0.0282935,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,65,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,64,62]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.144069,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[65,64,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,65,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,65,62]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0577802,\"norm_tree\":0.0577802,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,64,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0717746,\"norm_tree\":0.0717746,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,64,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,65,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,65,63]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0282935,\"norm_tree\":0.0282935,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,62,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0282935,\"norm_tree\":0.0282935,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,62,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,63,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,63,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0717746,\"norm_tree\":0.0717746,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,62,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0577802,\"norm_tree\":0.0577802,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,62,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,63,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,63,65]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.144069,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[64,62,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,62,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0282935,\"norm_tree\":0.0282935,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,63,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0717746,\"norm_tree\":0.0717746,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,63,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,62,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,62,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0577802,\"norm_tree\":0.0577802,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,63,65]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.144069,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[65,63,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,64,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,64,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0717746,\"norm_tree\":0.0717746,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,65,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0282935,\"norm_tree\":0.0282935,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,65,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[62,64,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,64,65]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.144069,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[62,65,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0577802,\"norm_tree\":0.0577802,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[63,65,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,64,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0717746,\"norm_tree\":0.0717746,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,64,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,65,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0422974,\"norm_tree\":0.0422974,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,65,64]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0282935,\"norm_tree\":0.0282935,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,64,65]\":{\"has_coeff\":0,\"has_children\":1,\"norm\":0,\"norm_tree\":0.144069,\"snorm\":-1,\"dnorm\":-1,\"rank\":-1,\"owner\": 0},\"[65,64,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[64,65,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0847153,\"norm_tree\":0.0847153,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[65,65,65]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0577802,\"norm_tree\":0.0577802,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0}}},\"8\":{\"level\": 8,\"nodes\":{\"[126,126,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0437374,\"norm_tree\":0.0437374,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,126,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,127,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,127,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.062839,\"norm_tree\":0.062839,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,126,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0398487,\"norm_tree\":0.0398487,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,126,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,127,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,127,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0600915,\"norm_tree\":0.0600915,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,126,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,126,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0437374,\"norm_tree\":0.0437374,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,127,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.062839,\"norm_tree\":0.062839,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,127,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,126,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,126,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0398487,\"norm_tree\":0.0398487,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,127,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0600915,\"norm_tree\":0.0600915,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,127,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,128,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,128,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.062839,\"norm_tree\":0.062839,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,129,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0437374,\"norm_tree\":0.0437374,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,129,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,128,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,128,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0600915,\"norm_tree\":0.0600915,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,129,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0398487,\"norm_tree\":0.0398487,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,129,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,128,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.062839,\"norm_tree\":0.062839,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,128,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,129,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,129,124]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0437374,\"norm_tree\":0.0437374,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,128,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0600915,\"norm_tree\":0.0600915,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,128,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,129,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,129,125]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0398487,\"norm_tree\":0.0398487,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,126,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0398487,\"norm_tree\":0.0398487,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,126,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,127,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,127,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0600915,\"norm_tree\":0.0600915,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,126,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0437374,\"norm_tree\":0.0437374,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,126,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,127,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,127,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.062839,\"norm_tree\":0.062839,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,126,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,126,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0398487,\"norm_tree\":0.0398487,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,127,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0600915,\"norm_tree\":0.0600915,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,127,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,126,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,126,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0437374,\"norm_tree\":0.0437374,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,127,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.062839,\"norm_tree\":0.062839,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,127,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,128,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,128,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0600915,\"norm_tree\":0.0600915,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,129,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0398487,\"norm_tree\":0.0398487,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,129,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,128,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,128,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.062839,\"norm_tree\":0.062839,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[126,129,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0437374,\"norm_tree\":0.0437374,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[127,129,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,128,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0600915,\"norm_tree\":0.0600915,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,128,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,129,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.047275,\"norm_tree\":0.047275,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,129,130]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0398487,\"norm_tree\":0.0398487,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,128,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.062839,\"norm_tree\":0.062839,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,128,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[128,129,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0511145,\"norm_tree\":0.0511145,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0},\"[129,129,131]\":{\"has_coeff\":1,\"has_children\":0,\"norm\":0.0437374,\"norm_tree\":0.0437374,\"snorm\":-1,\"dnorm\":0,\"rank\":-1,\"dim\":6,\"owner\": 0}}}}}"
  },
  {
    "path": "src/madness/mra/tools/h2-no1.wsl",
    "content": "#!/usr/bin/env wolframscript -format PDF\n\n<< \"./MRAMeshOrbitalPlot3D.wl\"\n\nChicagoMaroon = RGBColor[134/256, 31/256, 65/256];\nBurntOrange = RGBColor[232/256, 119/256, 34/256];\nPrint[MRAMeshOrbitalPlot3D[\"./h2-no1\", Zoom -> 2, Contours -> {-0.1, 0.1}, \n ContourStyle -> {{Opacity[0.5], BurntOrange}, {Opacity[0.5], \n    ChicagoMaroon}}, Axes -> True]];\n\n\n"
  },
  {
    "path": "src/madness/mra/tools/longfloat.py",
    "content": "from math import *\nfrom types import *\nimport re\n\n# Outstanding issues \n#   Convergence criteria for series expansion of functions\n#   How to round correctly?\n#   Also, rounding while printing\n#   Faster truncation\n#   Use of interp routines for function evaluation\n\nclass interptable:\n    def __init__(self, func, lo, hi, n, precomputed=None):\n        '''\n        Tablulate the function over n intervals or n+1 points\n        in [lo,hi] inclusive of the end points.\n\n        This is now hardwired to longfloat, but the changes\n        to move it back to generality are obvious.\n        '''\n        if precomputed:\n            (lo, hi, n, h, h2, scale, func, x, f, nbits) = precomputed\n        else:\n            lo = longfloat(lo)\n            hi = longfloat(hi)\n            h = (hi - lo)/(n+1)\n            h2 = h*0.5\n            scale = 1.0/h\n            x = [0]*(n+1)\n            f = [0]*(n+1)\n            for i in range(n+1):\n                x[i] = lo + i*h\n                f[i] = func(x[i])\n            nbits = longfloat.nbits\n        self.lo = lo\n        self.hi = hi\n        self.n = n\n        self.h = h\n        self.h2 = h2\n        self.scale = scale\n        self.func = func\n        self.x = x\n        self.f = f\n        self.nbits = nbits\n\n    def map(self,x):\n        '''\n        If x is within the range of the interpolation table return\n        k - the index of the nearest node x[k]\n        d - the difference x-x[k]\n\n        If x is out of range raise a value exception.\n        '''\n        if self.lo <= x <= self.hi:\n            k = int((x-self.lo)*self.scale)\n            d = x - self.x[k]\n            if d > self.h2:\n                k = k + 1\n                d = x - self.x[k]\n            return (k,d)\n        else:\n            raise ValueError, ('when interpolating %s' % self.func)\n\n    def __repr__(self):\n        '''\n        This so that tables may be precomputed for fast startup.\n        '''\n        return 'interptable(None,None,None,None,precomputed=' + \\\n              repr((self.lo,self.hi,self.n,self.h,self.h2,self.scale,\n                    str(self.func),self.x,self.f,self.nbits)) + ')'\n\nclass interpolators:\n    def __init__(self):\n        # Exp tabulated on [-1/2,1/2]\n        half = longfloat((-1,1))\n        # 20 .12\n        # 40 .12\n        #100 .10\n        #400 .088\n        ###self.texp = interptable(lambda (x):x.exp(), -half, half, 40)\n        #print self.texp\n\n        # Sin and Cos on [0,pi/2] (1.571 is slightly bigger than pi/2)\n        zero = longfloat(0)\n        pi2  = longfloat(1.571)\n        ###self.tsin = interptable(lambda (x):x.sin(), zero, pi2, 30)\n        ###self.tcos = interptable(lambda (x):x.cos(), zero, pi2, 30)\n\n        # log(x) with x in [1/sqrt(2), sqrt(2)]\n        # 1.415 > sqrt(2)    0.707 < 1/sqrt(2)\n        n = 100\n        self.tlog = interptable(lambda (x):x.log(),\n                                longfloat(0.707), longfloat(1.415), n)\n        self.tlog.rx = [0]*(n+1)\n        for k in range(n+1):\n            self.tlog.rx[k] = self.tlog.x[k].reciprocal()\n\n    def exp(self,x):\n        '''\n        For arguments in the range [0,1/2] exp(x) is O(1) so it\n        suffices to ensure that the remainder is < eps\n        '''\n        (k, d) = self.texp.map(x)\n        #print k , d\n        fk = self.texp.f[k]\n        result = fk\n        term = fk\n        eps = x.eps()\n        for i in range(1,50):\n            term = term * d / i\n            result = result + term\n            if abs(term) < eps:\n                #print ' exp terminating at ', i\n                return result\n        raise ArithmeticError, \"interp exp did not converge\"\n\n    def sin(self,x):\n        '''\n        For arguments in the range [0,pi/2] sin(x) is O(min(x,1)).\n        So, unless x is a hard zero, use relative error.\n        '''\n        if not x:\n            return longfloat(0)\n        (k, d) = self.tsin.map(x)\n        sink = self.tsin.f[k]\n        cosk = self.tcos.f[k]\n        result = sink\n        term = d\n        eps = x.eps()\n        if x < 1:\n            eps = eps*x\n        for i in range(1,50,4):\n            result = result + cosk*term\n            term = term*d/(i+1)\n            result = result - sink*term\n            term = term*d/(i+2)\n            result = result - cosk*term\n            term = term*d/(i+3)\n            result = result + sink*term\n            term = term*d/(i+4)\n            if abs(term) < eps:\n                #print ' sin terminating at ', i+3\n                return result\n        raise ArithmeticError, \"interp sin did not converge\"\n        \n    def cos(self,x):\n        '''\n        Like sin, use relative error.\n        '''\n        if not x:\n            return longfloat(1)\n        (k, d) = self.tcos.map(x)\n        sink = self.tsin.f[k]\n        cosk = self.tcos.f[k]\n        result = cosk\n        term = d\n        eps = x.eps()\n        if x < 1:\n            eps = eps*x\n        for i in range(1,50,4):\n            result = result - sink*term\n            term = term*d/(i+1)\n            result = result - cosk*term\n            term = term*d/(i+2)\n            result = result + sink*term\n            term = term*d/(i+3)\n            result = result + cosk*term\n            term = term*d/(i+4)\n            if abs(term) < eps:\n                #print ' cos terminating at ', i+3\n                return result\n        raise ArithmeticError, \"interp sin did not converge\"\n\n    def log(self, x):\n        '''\n        log(x+d) = log(x) - sum(i=1..inf) (-d/x)^i/i\n\n        For x in the range [1/root(2),root(2)] log(x) is about\n        O(x-1) ... so use relative error to this for convergence.\n\n        log(x) = 2*(p + p^3/3 + p^5/5 + ...) where p = (x-1)/(x+1)\n\n        log(xk+d) = log(xk)+log(1+d/xk)\n\n        '''\n        if x == 1:\n            return longfloat(0)\n        (k, d) = self.tlog.map(x)\n        dx = d*self.tlog.rx[k]\n#        print k, float(d), float(self.tlog.x[k]), float(dx)\n        p = dx/(dx+longfloat(2))\n#        print ' p', float(p)\n        p2 = p*p\n        eps = x.eps() * abs(self.tlog.f[k])\n#        print ' eps ', float(eps)\n        term = longfloat(1)\n        result = longfloat(0)\n        for i in range(1,501,2):\n            result = result + term/longfloat(i)\n            term = term*p2\n            if abs(term) < eps:\n                break\n        if i >= 498:\n            raise ArithmeticError, \"interp log did not converge\"\n        return (2*p*result + self.tlog.f[k])\n        \n##         dx = d/x\n##         result = self.tlog.f[k]\n##         term = dx\n##         eps = x.eps() * abs(x-1) # relative error\n##         for i in range(1,50):\n##             result = result + term/i\n##             term = term * dx\n##             if abs(term) < eps:\n##                 #print ' log terminating at ', i\n##                 return result\n##         raise ArithmeticError, \"interp log did not converge\"\n\n    def sindsin(self, x):\n        return (self.sin(x), self.cos(x))\n\n    def cosdcos(self, x):\n        return (self.cos(x), -self.sin(x))\n\n    def expdexp(self, x):\n        return (self.exp(x), self.exp(x))\n\n    def logdlog(self, x):\n        return (self.log(x), 1/x)\n\n    def invert(self, y, gdg, x):\n        '''\n        solve for x in y = g(x) ... i.e., invert g assuming that\n        we can compute both g and its derivative.\n\n        x inputs an initial guess for x which had better be in the\n        quadratically convergent region.\n        '''\n        # delta = (g(x) - y)/g'(x)\n        eps = x.eps()\n        while 1:\n            (g,dg) = gdg(x)\n            print ' g dg ', g, dg\n            delta = (g - y)/dg\n            print ' delta ', x, delta\n            x = x - delta\n            if abs(delta) < eps:\n                break\n        return x\n\nclass longfloat:\n    '''\n    Represents a floating point number to arbitrary precision\n    by storing the mantissa as a long integer and the exponent\n    as an integer.\n\n    value = 2**exponent * mantissa\n\n    The class member nbits is used to control the number of bits\n    of precision retained by operations.  It defaults to 208 which\n    is four times that of the standard double precision (52 bits).\n    It may be modified as follows\n    \n    longfloat.nbits = newvalue\n    \n    and the modified value will be adopted by all new instances.\n    \n    The class defines the standard methods to support\n    -  conversion to/from integers, floats, longs, strings, 2-tuple\n    -  addition, subtraction, multiplication, negation, division\n    -  comparison and non-zero test\n    -  printing and representation as a string (__repr__)\n\n    and also defines methods to compute the following\n    \n    -  reciprocal, reciprocal square root and square root\n\n    After each operation the result is truncated with rounding to\n    the required finite precision.  Internally, some operations\n    will be performed to a higher precision.\n\n    The method eps() returns the smallest number such that 1+eps > 1.\n\n    Some rather limited testing suggests that the errors are\n    -  the last bit in the basic operations +*- due to rounding\n    -  the last two bits in divide and square root\n    -  the last two or three bits in log/exp/sin/cos\n    -  the last four or five bits in asin\n    -  the last five to eight bits in acos\n    '''\n\n    nbits   = 208\n    debug   = 0\n\n    __name__ = 'longfloat'\n\n    __small_int_recip = [(0,0)]*501  # Cache 1/n  for 0<n<=500 ... entry is (1/n,nbits)\n   \n    def __init__(self, value, nbits=None):\n        # Constructor allows override of class default for nbits\n        if nbits != None:\n            self.nbits = nbits\n        if self.nbits <= 0:\n            raise ValueError, \"longfloat.nbits must be > 0\"\n            \n        # Initialization from ints and longfloat done here, others done\n        # thru coerce\n        t = type(value)\n        if isinstance(value,longfloat):\n            self.exponent = value.exponent\n            self.mantissa = value.mantissa\n        elif t == IntType or t == LongType:\n            self.exponent = 0\n            self.mantissa = long(value)\n        else:\n            (junk, a) = self.__coerce__(value)\n            self.exponent = a.exponent\n            self.mantissa = a.mantissa\n\n    def __power2(self, exponent):\n        ' return 2.0**exponent '\n        if exponent < 0:\n            fac = 0.5\n        else:\n            fac = 2.0\n        \n        scale = 1.0\n        for i in range(abs(exponent)):\n            scale = scale * fac\n        return scale\n    \n    def __coerce__(self, other):\n        ' coerce strings, ints, longs, floats and longfloats into longfloat'\n        if isinstance(other,longfloat):\n            return (self, other)\n\n        t = type(other)\n        if self.debug: print ' longfloat: coercing ', t, other\n\n        value = longfloat(0)\n        if (t == IntType) or (t == LongType):\n            value.exponent = 0\n            value.mantissa = long(other)\n        elif t == StringType:\n            # The exact representation from __repr__() is a tuple of \n            # two integers (exponent, mantissa).\n            # Alternatively match a floating point number\n            # Match two signed integers from a 2-tuple, e.g., (1,2L)\n            pat = r'\\([ ]*([+-]?\\d+)[lL]?[ ]*,[ ]*([+-]?\\d+)[lL]?[ ]*\\)'\n            m = re.search(pat,other)\n            if m:\n                (e,m) = m.groups()\n                value.exponent = int(e)\n                value.mantissa = long(m)\n            else:\n                patf = r'\\A\\s*([+-]?\\d+){1,1}(\\.\\d*)?([eE][+-]?\\d+)?'\n                m = re.search(patf,other)\n                mantissa = ''\n                if m:\n                    mantissa = ''\n                    e10 = 0\n                    (before,after,expnt) = m.groups()\n                    print ' before, after, expnt ', before, after, expnt\n                    if before:\n                        mantissa = mantissa + before\n                    if after:\n                        after = after[1:]        # Get rid of leading .\n                        e10 = -len(after)\n                        mantissa = mantissa + after\n                    if expnt:\n                        e10 = e10 + int(expnt[1:])\n                    print ' mantissa ', mantissa, ' e10 ', e10\n                    if e10:\n                        longfloat.nbits = longfloat.nbits + 31\n                        log10  = self.__log10()\n                        log2   = self.__log2()\n                        log210 = log10/log2\n                        e2 = e10 * log210        # Base two exponent\n                        r2 = e2 - int(e2)        # Fractional part\n                        print ' r2 ', float(r2)\n                        e2 = int(e2)             # Integer part\n                        r2 = (r2 * log2).exp()   # 2^r2\n                        print ' 2^r2 ', float(r2)\n                        print ' r2* ', float(r2 - r2.log()/log2)\n                        value.exponent = e2\n                        value.mantissa = long(mantissa)\n                        value = value * r2\n                        longfloat.nbits = longfloat.nbits - 31\n                        value.truncate()\n                    else:\n                        value.exponent = 0\n                        value.mantissa = m\n                else:\n                    raise (\"longfloat: fromstr: '%s' is neithr a tuple (exponent,mantissa) nor a floating point number\" % other)\n        elif (t == TupleType) and (len(other) == 2):\n            value.exponent = int(other[0])\n            value.mantissa = long(other[1])\n        elif t == FloatType:\n            # A double has a 52 bit mantissa and we need to preserve\n            # all of those bits ... but storing too many is inefficient.\n            # Must also watch out for very small numbers that will\n            # overflow when reciprocated\n\n            # This routine is paranoid and always checks that an exact\n            # representation of the input was generated.\n\n            if other == 0.0:\n                exponent = 0\n                mantissa = 0L\n            else:\n                exponent = int(log(abs(other))/log(2.0))\n                exponent = exponent - 53\n                extra = 0\n                while exponent < -990:\n                    other = other * 2.0\n                    exponent = exponent + 1\n                    extra = extra + 1\n                mantissa = long(other*self.__power2(-exponent))\n                exponent = exponent - extra\n                while extra > 0:\n                    other = other * 0.5\n                    extra = extra - 1\n\n                # Eliminate trailing zeros in the mantissa for\n                # values that are actually exactly representable\n                while (mantissa & 1L) == 0:\n                    mantissa = mantissa >> 1\n                    exponent = exponent + 1\n                \n            test = float(mantissa)*self.__power2(exponent)\n            if (test - other) != 0.0:\n                print ' exponent ', exponent\n                print ' mantissa ', mantissa\n                print ' input      %24.17e' % other\n                print ' test       %24.17e' % test\n                print ' err        %24.17e' % (test-other)\n                raise TypeError, \"failed to convert double to longfloat\"\n                \n            value.mantissa = mantissa\n            value.exponent = exponent\n        else:\n            print ' unknown TYPE IS ', t\n            raise TypeError, 'conversion to longfloat failed'\n\n        return (self,value)\n\n    # def __shift(value, shift):\n    #     vabs = abs(value)\n    #     vsgn = 1\n    #     if value < 0: vsgn = -1\n\n    #     if shift < 0:\n    #         value = value >> abs(shift)\n    #     else:\n    #         value = value << shift\n\n    #     return value\n\n    def __float__(self):\n        # If the mantissa is too long then the standard conversion\n        # of long to float does not work.  Ugh.\n\n        e = self.exponent\n        m = self.mantissa\n        while abs(m) > 1e17:\n            m = m >> 1\n            e = e + 1\n        return (float(m)*self.__power2(e))  # THIS CAN FAIL .. FIX IT!!!!\n\n    def __int__(self):\n        return int(long(self))\n\n    def __long__(self):\n        e = self.exponent\n        m = self.mantissa\n        if e > 0:\n            m = m << e\n        else:\n            m = m >> abs(e)\n        return m\n    \n    def __repr__(self):\n        ' exact string representation is a tuple (exponent,mantissa) '\n        return \"longfloat((\" + repr(self.exponent) + \",\" + repr(self.mantissa) + \"))\"\n\n    def __str__(self):\n        ' human readable but inexact string representation is decimal float'\n        if not self:\n            return '0'\n            \n        # Need to get the exponent into base 10 and scale the\n        # mantissa by its fractional part.\n        # 2^e * m = 10^(e/log2(10)) * m = 10^e10 * (10^r10 * m)\n        # base 10 exponent is e10+r10 (integer part + remainder)\n\n        nbits   = self.nbits\n        ndigits = int((self.nbits-1)*0.30103) + 1\n        longfloat.nbits = longfloat.nbits + 31 # Should be log2(|e+nbm|)?\n\n        x = longfloat(self)\n        e = x.exponent\n        m = x.mantissa\n        nbm = x.__nbits_in_mantissa()\n        if nbm < nbits:\n            e = e - (nbits - nbm)\n            m = m << (nbits - nbm)\n            x.exponent = e\n            x.mantissa = m\n\n        log10  = self.__log10()\n        log2   = self.__log2()\n        log210 = log10/log2\n\n        # Split exponent into fractional and integer parts\n        e10  = e / log210\n        r10 = e10 - int(e10)\n        e10 = int(e10)\n        tenr10 = (r10*log10).exp()\n        \n        # Generate 10^r10 * m truncated to the appropriate no. of bits\n        tmp = longfloat(x)\n        tmp.exponent = 0\n        tmp = tmp*tenr10\n        #print \"tmp\", repr(tmp)\n\n        # Shift the mantissa to zero the remaining exponent\n        etmp = tmp.exponent\n        mtmp = tmp.mantissa\n        m10 = tmp.mantissa\n\n        #print \"m10.a\", m10\n        if etmp > 0:\n            m10 = m10 << etmp\n        elif etmp < 0:\n            # Cannot just shift ... must round correctly.\n            # Examine the last bit discarded\n            etmp = abs(etmp)\n            mabs = abs(m10)\n            msgn = 1\n            if m10<0: msgn = -1\n            \n            mabs = mabs >> (etmp-1)\n            if (mabs & 1):\n                mabs = mabs + 2\n            mabs = mabs >> 1\n            m10 = msgn * mabs\n        #print \"m10.b\", m10\n            \n        # Now we have e10 and m10\n        # Count the no. of decimal figures in m10 so that we can\n        # have one significant figure before the decimal point\n        strm = str(abs(m10))\n        n10 = len(strm) - 2\n        e10 = e10 + n10 + 1 ############ RJH 2/10/23\n\n        # Finally can generate the result\n        signm = '+'\n        if m10 < 0: signm = '-'\n        signe = '+'\n        if e10 < 0: signe = '-'\n\n        lead = strm[0]\n        strm = strm[1:]\n        if strm[-1] == 'L':\n            strm = strm[:-1]\n        while len(strm) and (strm[-1] == '0'):\n            strm = strm[:-1]\n        if strm == '':\n            strm = '0'\n        \n        longfloat.nbits = longfloat.nbits - 31\n\n        return signm + lead + '.' + strm + 'e' + signe + str(abs(e10))\n        \n\n    def __mul__(self,other):\n        value = longfloat(0)\n        value.mantissa = self.mantissa*other.mantissa\n        value.exponent = self.exponent+other.exponent\n        value.truncate()\n        return value\n\n    def __rmul__(self,other):\n        return self*other\n\n    def __common_exponent(self,other):\n        '''\n        Return the mantissas scaled to a common exponent\n        '''\n        eself = self.exponent\n        mself = self.mantissa\n        eother = other.exponent\n        mother = other.mantissa\n\n        if eother < eself:\n            exponent = eother\n            mself = mself << (eself-eother)\n        else:\n            exponent = eself\n            mother = mother << (eother-eself)\n        return (exponent, mself, mother)\n\n    def __add__(self,other):\n        (exponent, mself, mother) = self.__common_exponent(other)\n        value = longfloat(0)\n        value.exponent = exponent\n        value.mantissa = mself + mother\n        value.truncate()\n        return value\n            \n    def __radd__(self,other):\n        return self+other\n\n    def __sub__(self,other):\n        return self+(-other)\n\n    def __rsub__(self,other):\n        return other+(-self)\n\n    def __neg__(self):\n        value = longfloat(0)\n        value.exponent =  self.exponent\n        value.mantissa = -self.mantissa\n        return value\n\n    def __abs__(self):\n        value = longfloat(0)\n        value.exponent =  self.exponent\n        value.mantissa = abs(self.mantissa)\n        return value\n        \n    def __pos__(self):\n        return self\n\n    def __nonzero__(self):\n        return (self.mantissa != 0L)\n\n    def __cmp__(self, other):\n        (exponent, mself, mother) = self.__common_exponent(other)\n        if mself < mother:\n            return -1\n        elif mself == mother:\n            return 0\n        else:\n            return 1\n\n    def __pow__(self,power):\n        if power == 0:\n            return longfloat(1)\n        elif power == 1:\n            return longfloat(self)\n        elif power == 2:\n            return self*self\n        elif power == 3:\n            return self*self*self\n        elif power == 4:\n            x2 = self*self\n            return x2*x2\n\n        if power < 0 and self == 0:\n            raise ValueError, \"longfloat: pow: negative power of zero\"\n\n        x = longfloat(self)\n        phase = 1\n        if power.exponent == 0:\n            # Integer power ... can handle negative arguments\n            if x < 0:\n                if (power % 2):\n                    phase = -1\n                x = -x\n            # Repeated squaring for integer powers\n            m = int(power.mantissa)\n            if m < 0:\n                x = x.reciprocal()\n                m = -m\n            xk = x                  # x^(2^k)\n            result = 1.0\n            while m:\n                if (m&1):\n                    result = result * xk\n                xk = xk*xk\n                m = m >> 1\n            if phase < 0:\n                result = -result\n            return result\n        \n        if x < 0:\n            raise ValueError, \"longfloat: pow: negative number to a non-integer power\"\n\n        logx = x.log()\n        result = (power*logx).exp()\n        if phase < 0:\n            result = -result\n\n        return result\n\n    def __rpow__(self,power):\n        return power.__pow__(self)\n\n    def rsqrt(self):\n        '''\n        Compute the reciprocal squareroot using Newton-Raphson iteration.\n        '''\n        if self <= 0.0:\n            raise ValueError, 'reciprocal squareroot of non-positive value'\n\n        nbits = self.nbits\n\n        # Generate the initial guess using the standard float operation\n        # but we need to make sure it is representable.\n        nbm = self.__nbits_in_mantissa()\n        e = self.exponent\n        if ((e+nbm)%2):\n            nbm = nbm + 1\n        self.exponent = -nbm\n        s = longfloat(1.0/sqrt(float(self)))\n        self.exponent = e\n        s.exponent = s.exponent - ((e + nbm)>>1)\n\n        threehalf = longfloat(3)\n        threehalf.exponent = threehalf.exponent - 1\n        xhalf = longfloat(self)\n        xhalf.exponent = xhalf.exponent - 1\n        nbitsgot = 51\n        while nbitsgot < nbits:\n            #snew = half*s*(three - s*s*self)\n            snew = s*(threehalf - s*s*xhalf)\n            s = snew\n            nbitsgot = nbitsgot*2-1 # Quad. conv. with rounding loss\n\n        return s\n\n    def sqrt(self):\n        if self.mantissa == 0L:\n            return longfloat(0)\n        else:\n            return self*self.rsqrt()\n\n    def reciprocal(self):\n        '''\n        Compute the reciprocal using Newton-Raphson iteration.\n        '''\n        if not self:\n            raise ValueError, 'reciprocal of zero value'\n\n        if not self.exponent:\n            # We have an integer.  The reciprocals of small integers\n            # are precomputed and cached for efficiency\n            r = self.__small_integer_reciprocal()\n            if r:\n                return r\n        \n        nbits = self.nbits\n\n        # Generate the initial guess using the standard float operation\n        # but we need to make sure it is representable.\n        nbm = self.__nbits_in_mantissa()\n        e = self.exponent\n        self.exponent = -nbm\n        r = longfloat(1.0/float(self))\n        self.exponent = e\n        r.exponent = r.exponent - (e + nbm)\n        \n        two = longfloat(2)\n        nbitsgot = 51\n        while nbitsgot < nbits:\n            rnew = r*(two - r*self)\n            r = rnew\n            nbitsgot = nbitsgot*2 - 1 # Quad. conv. with rounding loss\n\n        return r\n\n    def __small_integer_reciprocal(self):\n        ''' Maintain a cache of the reciprocals of small integers '''\n        \n        m = self.mantissa\n        absm = abs(m)\n        if absm > 500:\n            return None\n        absm = int(absm)\n        \n        (val,nbits) = longfloat.__small_int_recip[absm]\n        if nbits < longfloat.nbits:\n            val = 0\n            \n        if not val:\n            #print ' computing small int ', absm\n            # Not in cache. Set expnt = -1 to stop reciprocal calling\n            # here in infinite loop.\n            val = longfloat((-1,absm)).reciprocal()\n            val.exponent = val.exponent - 1\n            longfloat.__small_int_recip[absm] = (val,longfloat.nbits)\n        \n        # Finally, return a copy of the cached object\n        val = longfloat(val).truncate()\n        if m < 0:\n            return -val\n        else:\n            return val\n        \n    def __log10(self):\n        # Cache the value of log10 in the class but we\n        # need to keep track of the precision used to compute it.\n        try:\n            if longfloat.__log10nbits >= self.nbits:\n                return longfloat(longfloat.__log10value)\n        except AttributeError: \n            pass\n\n        longfloat.__log10value = longfloat(10).log()\n        longfloat.__log10nbits = self.nbits\n        return longfloat(longfloat.__log10value)\n\n    def __log2(self):\n        # Cache the value of log2 in the class but we\n        # need to keep track of the precision used to compute it.\n        try:\n            if longfloat.__log2nbits >= self.nbits:\n                return longfloat(longfloat.__log2value)\n        except AttributeError: \n            pass\n        \n        longfloat.nbits = longfloat.nbits + 8\n\n        test = longfloat((-self.nbits-4,1))\n        x = longfloat(2)\n        p = (x-1)/(x+1)\n        p2 = p*p\n        term = longfloat(1)\n        result = longfloat(0)\n        i = 1\n        while 1:\n            result = result + term/i\n            term = term*p2\n            i = i + 2\n            if abs(term) < test:\n                break\n        log2 = longfloat.__log2value = 2*p*result\n        longfloat.__log2nbits = self.nbits\n\n        longfloat.nbits = longfloat.nbits - 8\n\n        return longfloat(log2)\n\n    def log(self):\n        '''\n        Return the natural log of self. self is not modified.\n\n        Use log(x) = log(x * 2^-k * 2^k) = k*log(2) + log(x*2^-k)\n        to scale x into (1/2) <= x <= 1.\n\n        Then for the scaled variable use\n\n        log(x) = 2*(p + p^3/3 + p^5/5 + ...) where p = (x-1)/(x+1)\n        '''\n\n        # CANNOT CALL PRINT OF LONGFLOAT FROM THIS ROUTINE SINCE PRINT\n        # CALLS THIS !!!!!\n        \n        if self <= 0:\n            raise ValueError, \"longfloat: taking log of non-positive value\"\n\n        longfloat.nbits = longfloat.nbits + 8\n\n        e = self.exponent\n        m = self.mantissa\n\n        # Initially scale the argument into [0.5,1], then into\n        # [1/sqrt(2), sqrt(2)] which gives the smallest range for p.\n        k = self.__nbits_in_mantissa()\n        power = e + k\n\n        x = longfloat((-k,m))\n        x707 = longfloat(181)\n        x707.exponent = -8    # 181/256 = 0.707\n        if abs(x) < x707:\n            x.exponent = x.exponent + 1\n            power = power - 1\n            \n        p = (x-1)/(x+1)\n       \n        # Apply the standard power-series\n        test = longfloat((-self.nbits-4,1))*abs(x-1)\n        term = longfloat(1)\n        p2 = p*p\n        result = longfloat(0)\n        for i in range(1,501,2):\n            result = result + term/i\n            term = term*p2\n            if abs(term) < test:\n                break\n        if i >= 498:\n            raise ArithmeticError, \"longfloat log did not converge\"\n\n        result = 2*p*result\n\n        longfloat.nbits = longfloat.nbits - 8\n\n        result = power*self.__log2() + result\n        result.truncate()\n        return result\n\n    def exp(self):\n        '''\n        Return exp(self).  self is not modified.\n        '''\n        # CANNOT CALL PRINT OF LONGFLOAT FROM THIS ROUTINE SINCE PRINT\n        # CALLS THIS !!!!!\n\n        if not self:\n            return longfloat(1)\n        \n        longfloat.nbits = longfloat.nbits + 8\n\n        e = self.exponent\n        m = self.mantissa\n\n        # Scale the argument so that it is less than 1/2 (try 1/4)\n        k = self.__nbits_in_mantissa()\n        k = k + 1                       # to get 1/4 rather than 1/2\n        power = e + k\n        if power < 0:\n            power = 0\n\n        x = longfloat(0)\n        x.exponent = e - power\n        x.mantissa = m\n            \n        # Apply the standard power-series\n        test = longfloat((-self.nbits-4,1))*abs(x)\n        term = longfloat(1)\n        result = longfloat(0)\n        for i in range(1,500):\n            result = result + term\n            term = term * x / i\n            if abs(term) < test:\n                break\n        if i >= 499:\n            raise ArithmeticError, \"longfloat exp did not converge\"\n        \n        while power > 0:\n            result = result * result\n            power = power - 1\n\n        longfloat.nbits = longfloat.nbits - 8\n        result.truncate()\n\n        return result\n\n    def pi(self):\n        '''\n        Compute pi with the quadratically convergent Borwein algorithm\n        which has monotonically decreasing error pin-pi < 10^-2^(n+1)\n        '''\n        try:\n            if longfloat.__pinbits >= self.nbits:\n                p = longfloat(longfloat.__pi)\n                p.truncate()\n                return p\n        except AttributeError: \n            pass\n            \n        longfloat.nbits = longfloat.nbits + 8\n        \n        half = longfloat(0.5)\n        x = longfloat(2).sqrt()         # x0\n        mypi = 2 + x                      # pi0\n        y = x.sqrt()                    # y1\n        rsqrtx = x.rsqrt()\n        sqrtx  = x*rsqrtx\n        x = half*(sqrtx + rsqrtx)    # x1\n\n        test = longfloat((-self.nbits/2-1,1))\n        for iter in range(30):\n            ryn1 = (y+1).reciprocal()\n            mypi_new = mypi*(x+1)*ryn1\n            err = mypi - mypi_new\n            mypi = mypi_new\n            if err < test:\n                break\n            rsqrtx = x.rsqrt()\n            sqrtx  = x*rsqrtx\n            y = (y*sqrtx + rsqrtx)*ryn1\n            x = half*(sqrtx + rsqrtx)    # x1\n        if iter >= 29:\n            raise ArithmeticError, 'longfloat pi did not converge'\n\n        mypi.nbits = longfloat.nbits = longfloat.nbits - 8\n        mypi.truncate()\n\n        longfloat.__pi = mypi\n        longfloat.__pinbits = mypi.nbits\n\n        return longfloat(mypi)\n\n    def __sin(self):\n        ''' Compute sine of argument already scaled to [0,pi/4] '''\n\n        x  = self\n        x2 = x*x\n        \n        # Apply the standard power-series\n        test = longfloat((-self.nbits-4,1))\n        term = longfloat(x)\n        result = longfloat(0)\n        i = 1\n        for i in range(1,301,2):\n            result = result + term\n            term = -term * x2 / (i+1) / (i+2) # Recips of small ints are fast\n            if abs(term) < test:\n                break\n        if i >= 299:\n            raise ArithmeticError, \"longfloat sin did not converge\"\n            \n        return result\n\n    def __cos(self):\n        ''' Compute cosine of argument already scaled to [0,pi/4] '''\n\n        x  = self\n        x2 = x*x\n        \n        # Apply the standard power-series\n        test = longfloat((-self.nbits-4,1))\n        term = longfloat(1)\n        result = longfloat(0)\n        for i in range(0,300,2):\n            result = result + term\n            term = -term * x2 / (i+1) / (i+2)  # Recips of small ints are fast\n            if abs(term) < test:\n                break\n        if i >= 298:\n            raise ArithmeticError, \"longfloat cos did not converge\"\n            \n        return result\n\n    def sin(self):\n        longfloat.nbits = longfloat.nbits + 8\n        x = longfloat(self)\n        # Shift argument into [0,2pi]\n        pi    = self.pi()\n        twopi = pi+pi\n        pi2   = pi*0.5\n        pi4   = pi*0.25\n        n     = int(x/twopi)\n        x     = x - n*twopi\n\n        # Shift argument into [0,pi/2] using\n        # sin(x) = sin(pi-x)=-sin(pi+x)=-sin(2pi-x)\n        phase = 1\n        if x > pi:\n            phase = -1\n            x = x - pi\n        if x > pi2:\n            x = pi - x\n\n        # Shift into [0,pi/4] using\n        # sin(x+pi/4) = (sin(x) + cos(x)) / sqrt(2)\n\n        if x >= pi4:\n            x = x - pi4\n            result = phase * (x.__sin() + x.__cos()) * longfloat(2).rsqrt()\n        else:\n            result = phase * x.__sin()\n\n        longfloat.nbits = longfloat.nbits - 8\n\n        result.truncate()\n        return result\n\n    def cos(self):\n        longfloat.nbits = longfloat.nbits + 8\n        x = longfloat(self)\n        # Shift argument into [0,2pi]\n        pi    = self.pi()\n        twopi = pi+pi\n        pi2   = pi*0.5\n        pi4   = pi*0.25\n        n     = int(x/twopi)\n        x     = x - n*twopi\n\n        # Shift argument into [0,pi/2] using\n        # cos(x) = -cos(pi-x) = -cos(pi+x)= cos(2pi-x)\n        phase = 1\n        if x > pi:\n            x = x - pi\n        if x > pi2:\n            phase = -1\n            x = pi - x\n\n        # Shift into [0,pi/4] using\n        # cos(x+pi/4) = (cos(x) - sin(x)) / sqrt(2)\n\n        if x >= pi4:\n            x = x - pi4\n            result = phase * (x.__cos() - x.__sin()) * longfloat(2).rsqrt()\n            ##cosx = x.__cos()\n            ##sinx = ((1+cosx).sqrt())*((1-cosx).sqrt())\n            ##result = phase * (cosx - sinx) * longfloat(2).rsqrt()\n        else:\n            result = phase * x.__cos()\n\n        longfloat.nbits = longfloat.nbits - 8\n        result.truncate()\n        return result\n\n    def acos(self):\n        '''\n        pi/2 - asin(x) -1 < x < 1\n        '''\n        pi  = self.pi()\n        pi2 = 0.5*pi\n\n        # Must first shift the argument into a range where the subtraction\n        # pi/2 - asin(x) does not lose precision\n\n        x = longfloat(self)\n        xold = longfloat(x)\n        # Restrict to 0 <= x <= 1 with\n        # acos(x) = pi - acos(-x)\n        extra = 0\n        phase = 1\n        if x < 0:\n            extra = pi\n            phase = -1\n            x = -x\n\n        xx = x\n        # Restrict to 0 <= x <= 1/sqrt(2) with\n        # acos(x) = pi/4  + acos(-x + sqrt(1-x^2))\n        extra2 = 0\n        rroot2 = longfloat(2).rsqrt()\n        if x > rroot2:\n            extra2 = 0.25*pi\n            #x = (x - ((1+x).sqrt())*((1-x).sqrt()))*rroot2\n            x = (x - (1-x*x).sqrt())*rroot2\n\n        asinx = x.asin()\n        #print ' asin arg ', float(x), float(asinx) - asin(float(x))\n        acosx = pi2 - asinx\n        #print ' acos arg ', float(x), float(acosx) - acos(float(x))\n        if extra2:\n            acosx = acosx - extra2\n            #print ' acos xx ', float(xx), float(acosx) - acos(float(xx))\n        \n        acosx = extra + phase*acosx\n        #print ' final ', float(xold), float(acosx) - acos(float(xold))\n\n        return acosx\n\n    def asin(self):\n        '''\n        asin(x) = sum(n) (-1)^n C(-1/2,n) x^(2n+1)/(2n+1)\n        %       = x + (1/2)*x^3/3 + (1*3/2*4)*x^5/5 + (1*3*5/2*4*6)*x^7/7 ...\n\n        asin(x) = -asin(-x)\n        '''\n        longfloat.nbits = longfloat.nbits + 8\n\n        x = longfloat(self)\n        one = longfloat(1)\n        if (x < -one) or (x > one):\n            longfloat.nbits = longfloat.nbits - 8\n            raise ValueError, 'longfloat asin argument not in [-1,1]'\n\n        input_phase = 1\n        if x < 0:\n            input_phase = -1\n            x = -x\n\n        pi  = self.pi()\n        pi2 = pi*0.5\n        if x == one:\n            longfloat.nbits = longfloat.nbits - 8\n            return input_phase*pi2\n\n        # Shift the argument into [0,1/sqrt(2)] using\n        # asin(x) = pi/2 - asin(sqrt(1-x^2))  0<=x<=1\n        # asin(x) =-pi/2 + asin(sqrt(1-x^2)) -1<=x<=0\n        # We need y = sqrt(1-x^2) accurate enough so that asin(y)\n        # is accurate compared to pi/2.\n\n        extra = 0\n        phase = 1\n        if x > longfloat(2).rsqrt():\n            extra = pi2\n            phase = -1\n            #x = ((1+x).sqrt())*((1-x).sqrt())\n            x = (1-x*x).sqrt()\n\n        # Shift the argument into [0,1/2] using\n        # asin(x) = pi/6 + asin(x*sqrt(3)/2 - sqrt(1-x^2)/2)\n\n        didpi6 = 0\n        half = longfloat((-1,1))\n        if x > half:\n            didpi6 = 1\n            #x = (x*longfloat(3).sqrt() - ((1+x).sqrt())*((1-x).sqrt())) * half\n            x = (x*longfloat(3).sqrt() - (1-x*x).sqrt()) * half\n            #print ' shifting x to ', x, half\n                 \n        # asin(x) = sum(n) (-1)^n C(-1/2,n) x^(2n+1)/(2n+1)\n        # %       = x + (1/2)*x^3/3 + (1*3/2*4)*x^5/5 + (1*3*5/2*4*6)*x^7/7 ...\n\n        x2 = x*x\n        term = x\n        result = longfloat(0)\n        test = longfloat((-self.nbits,1))\n\n        # 0 <= x2 <= 0.25 so we get at least 2 bits per iteration\n        maxi = self.nbits + 16\n        for i in range(0,maxi,2):\n            result = result + term / (i+1)\n            term = term*x2*(i+1) / (i+2)\n            if abs(term) < test:\n                break\n        if i >= (maxi-2):\n            raise ArithmeticError, \"longfloat asin did not converge\"\n\n        if didpi6:\n            result = result + pi/6\n            \n        if phase < 0:\n            result = -result\n        result = extra + result\n\n        longfloat.nbits = longfloat.nbits - 8\n        result.truncate()\n        if input_phase < 0:\n            result = -result\n        \n        return result\n\n    def atan(x):\n        '''\n        atan(x) = sum(n) (-1)^n x^(2n+1) / (2n+1)\n        %       = x - x^3/3 + x^5/5 - x^7/7      |x| < 1\n\n        atan(x) = - atan(-x) for all x\n\n        atan(x) = pi/2 - atan(1/x) for x >= 0\n\n        atan(x) = pi/2 - acos(x/sqrt(x^2+1)) for all x\n\n        atan(x) = asin(x/sqrt(x^2+1)) for all x\n\n        atan(x) = acot(-x) - pi/2 = pi/2 - acot(x) for all x\n\n        atan(x) + atan(y) = atan((x+y)/(1-x*y))      \n        '''\n\n    def atan2(self,x,y):\n        '''\n        atan(y/x) with apropriate phase\n        '''\n\n    def eps(self):\n        '''\n        Returns eps the smallest number such that 1+eps > 1.\n        '''\n        eps = longfloat((-longfloat.nbits,1))\n\n        #print ' eps   ', repr(eps)\n        #print ' eps   ', eps\n        #print ' 1+eps ', 1+eps\n        #print ' 1+eps/2', 1+longfloat((-longfloat.nbits-1,1))\n        #print ' 1+eps/4', 1+longfloat((-longfloat.nbits-2,1))\n\n        return eps\n        \n    def __nbits_in_mantissa(self):\n        ''' Return the no. of bits in the mantissa '''\n        \n        absm = abs(self.mantissa)\n        if absm == 0:\n            return 0\n\n        # Find bounds\n        klo = khi = 2*self.nbits+2\n        if (absm >> khi):\n            khi = khi + 1\n            while (absm >> khi):\n                klo = khi\n                khi = khi << 1\n        else:\n            klo = klo - 2\n            while not (absm >> klo):\n                khi = klo\n                klo = klo >> 1\n            \n        # Binary search\n        delta = (khi - klo) >> 1\n        while delta > 0:\n            k = klo + delta\n            if (absm >> k):\n                klo = k\n            else:\n                khi = k\n            delta = (khi - klo) >> 1\n        return klo\n        \n    def truncate(self):\n        '''\n        Truncates self to the required number of significant binary digits.\n        '''\n        nchopped = self.__nbits_in_mantissa() - longfloat.nbits\n        if self.mantissa == 0:\n            self.exponent = 0\n\n        if self.mantissa != 0 and nchopped > 0:\n            signm = 1\n            if self.mantissa<0: signm = -1\n            absm = abs(self.mantissa)\n            round = (absm >> (nchopped-1)) & 1L\n            \n            absm = absm >> nchopped\n            if round:\n                absm = absm + 1\n                    \n            self.mantissa = signm * absm\n            self.exponent = self.exponent + nchopped\n \n    # def other_truncate(self, nbits=None):\n    #     '''\n    #     Truncates self to the required number of significant binary digits.\n    #     '''\n    #     if nbits == None:\n    #         nbits = self.nbits\n        \n    #     eold = e = self.exponent\n    #     m = self.mantissa\n\n    #     k = nbits  # Multiplications typically double the no. of bits\n    #     test  = (1L << nbits)-1  # The biggest permisible mantissa\n\n    #     flag = (abs(m) > test)\n    #     while flag:\n    #         mk = m >> k\n    #         flag2 = (abs(mk) > test)\n    #         if (k == 1) or flag2:\n    #             m = mk\n    #             flag = flag2\n    #             e = e + k\n    #             if k > 1:\n    #                 k = k >> 1\n    #         else:\n    #             k = k >> 1\n\n    #     if self.debug:\n    #         print 'longfloat: truncate: nbits lost =', e - eold\n    #     if m == 0L: e = 0\n\n    #     # Comment out the next five lines to stop rounding\n    #     if (e-eold):\n    #         if (self.mantissa >> (e-eold-1)) & 1:\n    #             if m > 0:\n    #                 m = m + 1\n    #             else:\n    #                 m = m - 1\n\n    #     self.exponent = e\n    #     self.mantissa = m\n\n    def __div__(self, other):\n        return self*other.reciprocal()\n\n    def __rdiv__(self,other):\n        return other*self.reciprocal()\n        \n\ndef __mp_do_test(test_nbits,ntest=10,ntime=10):\n    from random import random, seed\n    from sys import exit\n    from time import clock\n\n    #seed((3*test_nbits-1)%256,(5*test_nbits-2)%256,(7*test_nbits-3)%256)\n    seed(777*test_nbits)\n\n    savenbits = longfloat.nbits\n    longfloat.nbits = test_nbits\n    print '\\n\\n Testing extended precision routines with nbits =', \\\n          longfloat.nbits\n    print ' '\n    \n    def nbits(eps):\n        return int(-log(abs(eps))/log(2.0))\n\n    fac = longfloat(1)/longfloat(3)\n    \n    # Test reciprocal\n    nbits_worst = longfloat.nbits\n    n = ntest\n    print ' n =',n\n    maxx = 0\n    minx = minabsx = 1e300\n    while n > 0:\n        x = longfloat((random()-0.5)*10.0)\n        x = x*x*x*x*x # To fill out the number of bits\n        if x:\n            maxx = max(x,maxx)\n            minx = min(x,minx)\n            minabsx = min(abs(x),minabsx)\n            eps = abs(float(x/x - 1.0))\n            if eps:\n                nbits_worst = min(nbits_worst, nbits(eps))\n        n = n - 1\n    print (' maxx=%+9.1e minx=%+9.1e minabsx=%+9.1e ' % (maxx, minx, minabsx))\n    print ' Reciprocal:  eps = (x(1/x)-1)       :  worst nbits = ', nbits_worst\n\n    x = longfloat(33)\n    start = clock()\n    n = ntime\n    while n > 0:\n        x.reciprocal()\n        n = n - 1\n    used = (clock() - start)/ntime\n    print ' Time per call ', used\n    print ' '\n    \n    # Test sqrt\n    nbits_worst = longfloat.nbits\n    n = ntest\n    print ' n =',n\n    maxx = 0\n    minx = minabsx = 1e300\n    while n > 0:\n        x = longfloat(random()*10.0)\n        x = x*x*x*x*x # To fill out the number of bits\n        if x:\n            maxx = max(x,maxx)\n            minx = min(x,minx)\n            minabsx = min(abs(x),minabsx)\n            y = x.sqrt()\n            # If there is a relative error eps in y=sqrt(x) then\n            # eps = (y*y - x)/(2x)\n            eps = 0.5*abs(float((y*y - x))/float(x))\n            if eps:\n                nbits_worst = min(nbits_worst, nbits(eps))\n        n = n - 1\n    print (' maxx=%+9.1e minx=%+9.1e minabsx=%+9.1e ' % (maxx, minx, minabsx))\n    print ' Square root: eps = (sqrt(x)^2-x)/2x :  worst nbits = ', nbits_worst\n    x = longfloat(33)\n    start = clock()\n    n = ntime\n    while n > 0:\n        x.rsqrt()\n        n = n - 1\n    used = (clock() - start)/ntime\n    print ' Time per call ', used\n    print ' '\n    \n    # Test log(exp)\n    nbits_worst = longfloat.nbits\n    n = ntest\n    print ' n =',n\n    maxx = 0\n    minx = minabsx = 1e300\n    while n > 0:\n        x = longfloat((random()-0.5)*10.0)\n        x = x*x*x*x*x # To fill out the number of bits\n        if x:\n            maxx = max(x,maxx)\n            minx = min(x,minx)\n            minabsx = min(abs(x),minabsx)\n            y = x.exp()\n            eps = abs(float((y.log() - x))/float(x))\n            if eps:\n                # If there is a relative error eps1 in log(x)\n                # and eps2 in exp(x), then the relative error in\n                # -- exp(log(x)) is eps2 + eps1*|logx|\n                # -- log(exp(x)) is eps1 + eps2/|x|\n                absx = abs(float(x))\n                eps = eps /(1.0 + 1.0/absx)\n                nbits_worst = min(nbits_worst, nbits(eps))\n        n = n - 1\n    print (' maxx=%+9.1e minx=%+9.1e minabsx=%+9.1e ' % (maxx, minx, minabsx))\n    print ' log & exp :  eps = (log(exp(x))-x)/x:  worst nbits = ', nbits_worst\n    x = longfloat(33)\n    scale = longfloat(77)\n    start = clock()\n    n = ntime\n    while n > 0:\n        x.log()\n        n = n - 1\n        x = x * scale\n    used = (clock() - start)/ntime\n    print ' Time per call for log ', used\n    x = longfloat(3)\n    start = clock()\n    n = ntime\n    while n > 0:\n        x.exp()\n        n = n - 1\n    used = (clock() - start)/ntime\n    print ' Time per call for exp ', used\n    print ' '\n\n    # Test exp(log)\n    nbits_worst = longfloat.nbits\n    n = ntest\n    print ' n =',n\n    maxx = 0\n    minx = minabsx = 1e300\n    while n > 0:\n        x = longfloat(random()*10.0)\n        x = x*x*x*x*x # To fill out the number of bits\n        if x:\n            maxx = max(x,maxx)\n            minx = min(x,minx)\n            minabsx = min(abs(x),minabsx)\n            y = x.log()\n            eps = abs(float((y.exp() - x))/float(x))\n            if eps:\n                abslogx = abs(float(y))\n                # If there is a relative error eps1 in log(x)\n                # and eps2 in exp(x), then the relative error in\n                # -- exp(log(x)) is eps2 + eps1*|logx|\n                # -- log(exp(x)) is eps1 + eps2/|x|\n                eps = eps / (1.0 + abslogx)\n                nbits_worst = min(nbits_worst, nbits(eps))\n        n = n - 1\n    print (' maxx=%+9.1e minx=%+9.1e minabsx=%+9.1e ' % (maxx, minx, minabsx))\n    print ' log & exp :  eps = (exp(log(x))-x)/x:  worst nbits = ', nbits_worst\n    print ' '\n\n    # Test sine and asin\n    # Note that asin(sin(x)) is inherently unstable so test just sin(asin(x))\n    nbits_worst = longfloat.nbits\n    n = ntest\n    print ' n =',n\n    maxx = 0\n    minx = minabsx = 1e300\n    xworst = 0.0\n    while n > 0:\n        x = longfloat((random()-0.5))*2.0  # x in [-1,1]\n        if x:\n            maxx = max(x,maxx)\n            minx = min(x,minx)\n            minabsx = min(abs(x),minabsx)\n            eps = float(x.asin().sin() - x)/float(x)\n            if eps:\n                nbb = nbits(eps)\n                if nbb < nbits_worst:\n                    xworst = x\n                    nbits_worst = nbb\n                #nbits_worst = min(nbits_worst, nbits(eps))\n                #print float(x), nbits(eps)\n        n = n - 1\n    print (' maxx=%+9.1e minx=%+9.1e minabsx=%+9.1e ' % (maxx, minx, minabsx))\n    print ' sin       : eps = (sin(asin(x))-x)/x:  worst nbits = ', nbits_worst\n    print ' xworst ', xworst\n    x = longfloat(2.7)\n    start = clock()\n    n = ntime\n    while n > 0:\n        x.sin()\n        n = n - 1\n    used = (clock() - start)/ntime\n    print ' Time per call for sin  ', used\n    x = longfloat(0.33333)\n    start = clock()\n    n = ntime\n    while n > 0:\n        x.asin()\n        n = n - 1\n    used = (clock() - start)/ntime\n    print ' Time per call for asin ', used\n\n    \n    # Test cosine and acos\n    nbits_worst = longfloat.nbits\n    n = ntest\n    print ' n =',n\n    maxx = 0\n    minx = minabsx = 1e300\n    xworst = 0.0\n    while n > 0:\n        x = longfloat((random()-0.5))*2.0  # x in [-1,1]\n        if x:\n            maxx = max(x,maxx)\n            minx = min(x,minx)\n            minabsx = min(abs(x),minabsx)\n            eps = float(x.acos().cos() - x)/float(x)\n            if eps:\n                nbb = nbits(eps)\n                if nbb < nbits_worst:\n                    xworst = x\n                    nbits_worst = nbb\n        n = n - 1\n    print (' maxx=%+9.1e minx=%+9.1e minabsx=%+9.1e ' % (maxx, minx, minabsx))\n    print ' cos       : eps = (cos(acos(x))-x)/x:  worst nbits = ', nbits_worst\n    print ' xworst ', xworst\n    x = longfloat(2.7)\n    start = clock()\n    n = ntime\n    while n > 0:\n        x.cos()\n        n = n - 1\n    used = (clock() - start)/ntime\n    print ' Time per call for cos  ', used\n    x = longfloat(0.33333)\n    start = clock()\n    n = ntime\n    while n > 0:\n        x.acos()\n        n = n - 1\n    used = (clock() - start)/ntime\n    print ' Time per call for acos ', used\n\n    \n\n    # Test e and pi\n    maplee  = '2.718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427427466391932003059921817413596629043572900334295260595630738132328627943490763233829880753195251019011573834187930702154089149934884167509244761460668082264800168477411853742345442437107539077744992069551702761838606261331384583000752044933826560297606737113200709328709127443747047230696977209310141692836819025515108657463772111252389784425056953696770785449969967946864454905987931636889230098793127736178215424999229576351482208269895193668033182528869398496465105820939239829488793320362509443117301238197068416140397019837679320683282376464804295311802328782509819455815301756717361332069811250996181881593041690351598888519345807273866738589422879228499892086805825749279610484198444363463244968487560233624827041978623209002160990235304369941849146314093431738143640546253152096183690888707016768396424378140592714563549061303107208510383750510115747704171898610687396965521267154688957035035'\n    maplepi = '3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609433057270365759591953092186117381932611793105118548074462379962749567351885752724891227938183011949129833673362440656643086021394946395224737190702179860943702770539217176293176752384674818467669405132000568127145263560827785771342757789609173637178721468440901224953430146549585371050792279689258923542019956112129021960864034418159813629774771309960518707211349999998372978049951059731732816096318595024459455346908302642522308253344685035261931188171010003137838752886587533208381420617177669147303598253490428755468731159562863882353787593751957781857780532171226806613001927876611195909216420199'\n    ndigit = int(longfloat.nbits/(log(10)/log(2)))\n    ndigit = min(1001,ndigit+2)\n    \n    print (' The error in e and pi should be in the last d.p. (about %9.1e)' %\n           (3.0*(0.5**longfloat.nbits)))\n    print '    Computed e   ', longfloat(1).exp()\n    print '       Maple e    ', maplee[:ndigit]\n    print '    Computed pi  ', longfloat(1).pi()\n    print '       Maple pi   ', maplepi[:ndigit]\n    print ' ' \n    print ' nbits at end ', longfloat.nbits\n    print ' '\n    \n    longfloat.nbits = savenbits\n    print ' restored longfloat.nbits ', savenbits\n\nif __name__ == \"__main__\":\n    print ' HI'\n    __mp_do_test(104,ntest=3,ntime=3)\n    __mp_do_test(208,ntest=3,ntime=3)\n    __mp_do_test(500)\n    #__mp_do_test(1000)\n    \n    from time import clock\n    I = interpolators()\n    print ' EXP '\n    vv = I.exp(longfloat(0.25))\n    start = clock()\n    for i in range(10):\n        vv = I.exp(longfloat(0.25))\n    used = (clock() - start)/10\n    print ' NEW ', used\n    start = clock()\n    for i in range(10):\n        vv = longfloat(0.25).exp()\n    used = (clock() - start)/10\n    print ' OLD ', used\n    print ' SIN '\n    print I.sin(0.25,1e-16)\n    print sin(0.25)\n    print ' COS '\n    print I.cos(0.25,1e-16)\n    print cos(0.25)\n    print ' LOG '\n    print I.log(longfloat(0.9))\n    print longfloat(0.9).log()\n    q = longfloat(0.72)\n    I.log(q)\n    start = clock()\n    for i in range(10):\n        vv = I.log(q)\n    used = (clock() - start)/10\n    print ' NEW ', used\n    start = clock()\n    for i in range(10):\n        vv = q.log()\n    used = (clock() - start)/10\n    print ' OLD ', used\n    import profile\n    profile.run('for i in range(100): q.reciprocal()')\n    print ' ASIN by inversion'\n    print I.invert(0.25,I.sindsin,0.3,1e-16)\n    print asin(0.25)\n    print ' ACOS by inversion'\n    print I.invert(0.25,I.cosdcos,1.1,1e-16)\n    print acos(0.25)\n    print ' EXP=ALOG by inversion'\n    print I.invert(0.25,I.logdlog,1.0,1e-16)\n    print exp(0.25)\n    print ' LOG=AEXP by inversion'\n    print I.invert(1.35,I.expdexp,0.2,1e-16)\n    print log(1.35)\nelse:\n    #print ' reimported mp'\n    pass\n\n## def sqrt(x):\n##     return longfloat(x).sqrt()\n\n## def sin(x):\n##     return longfloat(x).sin()\n\n## def cos(x):\n##     return longfloat(x).cos()\n\n## def asin(x):\n##     return longfloat(x).asin()\n\n## def acos(x):\n##     return longfloat(x).acos()\n\n## def exp(x):\n##     return longfloat(x).exp()\n\n## def log(x):\n##     return longfloat(x).log()\n\n"
  },
  {
    "path": "src/madness/mra/tools/mathutil.py",
    "content": "\n# The stuff in this file is now obsolete and is\n# here to keep the old twoscalecoeff code working.\n\n# Don't write new code using this stuff.\n\n\nfrom array import * \nfrom math import sqrt \n\ndef vector(n):\n    return array('d',[0.0]*n)\n\ndef zerovector(n): \n    return vector(n)\n\ndef zeromatrix(n,m): \n    a = range(n) \n    for i in range(n): \n        a[i] = zerovector(m) \n    return a \n\ndef copyvector(x):\n    n = len(x)\n    a = vector(n)\n    for i in range(n): \n        a[i] = x[i] \n    return a \n\ndef copymatrix(x): \n    n = len(x) \n    m = len(x[0]) \n    a = zeromatrix(n,m) \n    for i in range(n): \n        for j in range(m): \n            a[i][j] = x[i][j] \n    return a \n\ndef transpose(x): \n    n = len(x) \n    m = len(x[0]) \n    a = zeromatrix(m,n) \n    for i in range(n): \n        for j in range(m): \n            a[j][i] = x[i][j] \n    return a \n\ndef dot(a,b): \n    sum = 0\n    for i in range(len(a)): \n        sum = sum + a[i]*b[i] \n    return sum \n\ndef vector_norm(x):\n    '''\n    A translation of the BLAS routine dnrm2\n    '''\n    n = len(x)\n    if n < 1:\n        return 0.0\n    elif n == 1:\n        return abs(x[0])\n    else:\n        scale = 0.0\n        ssq = 1.0\n        for i in range(n):\n            if x[i] != 0.0:\n                absxi = abs(x[i])\n                if scale < absxi:\n                    ssq = 1.0 + ssq*(scale/absxi)**2\n                    scale = absxi\n                else:\n                    ssq = ssq + (absxi/scale)**2\n        return scale*sqrt(ssq)\n\ndef mxm(a,b): \n    n = len(a) \n    k = len(a[0]) \n    kk= len(b) \n    m = len(b[0]) \n    if kk != k: \n        raise \"matrices do not conform for multiplication\" \n    c = zeromatrix(n,m) \n    for i in range(n): \n        for j in range(m): \n            sum = 0.0 \n            for l in range(k): \n                sum = sum + a[i][l]*b[l][j] \n            c[i][j] = sum \n    return c\n\nsparse_mtxm_nflop = 0.0\ndef sparse_mtxm(a,b):\n    global sparse_mtxm_nflop\n    '''\n    C = AT * B using sparsity in both.  Currently assumes full storage.\n    '''\n    k = len(a) \n    kk= len(b) \n    n = len(a[0]) \n    m = len(b[0]) \n    if kk != k: \n        raise \"matrices do not conform for multiplication\" \n    ct = zeromatrix(m,n)  # This is the transpose of the result\n    nflop = 0.0\n    for l in range(k):\n        al = a[l]\n        bl = b[l]\n        list = [] # List of non-zero a[l][i] for given l\n        for i in range(n):\n            if al[i]: list.append(i)\n        numl = float(len(list))\n        for j in range(m):\n            blj = bl[j]\n            if blj:\n                ctj = ct[j]\n                nflop = nflop + numl\n                for i in list:\n                    ctj[i] = ctj[i] + al[i]*blj\n    sparse_mtxm_nflop = sparse_mtxm_nflop + nflop\n    return transpose(ct)\n\ndef mxv(a,b): \n    n = len(a) \n    k = len(a[0]) \n    kk = len(b) \n    if k != kk: \n        raise \"matrix and vector do not conform for multiplication\" \n    c = zerovector(n) \n    for i in range(n): \n        c[i] = dot(a[i],b) \n    return c \n\ndef printvector(a): \n    n = len(a)\n    for i in range(n): \n        print (\"%+15.8e \"%float(a[i])),\n        if ((i+1)%5) == 0 and i != (n-1):\n            print \" \"\n    print \" \" \n\ndef printmatrix(a): \n    n = len(a)\n    m = len(a[0])\n    for jlo in range(0,m,5):\n        print \"    \",\n        for j in range(jlo,min(jlo+5,m)):\n            print (\"     %5i       \" % j),\n        print \" \"\n        for i in range(n):\n            print (\"%4i  \" % i),\n            for j in range(jlo,min(jlo+5,m)):\n                print (\"%+15.8e \" % float(a[i][j])),\n            print \" \"\n\ndef numderiv(func,x,step,eps): \n    ''' \n    Use central differences to compute the gradient and diagonal \n    elements of the Hessian. \n    func(x) = function to be differentiated \n    x[] = point at which to differentiate \n    step[] = remembers finite difference step between \n    .        successive calls.  Set to zero on first call \n    .        or set close to appropriate value \n    eps = expected precision in func \n    \n    Some care is taken to adjust the step so that the gradient and \n    Hessian diagonal are estimated with about 4 digits of precision \n    but some noise is unavaoidable due either to the noise in the \n    function or cubic/higher terms in the Taylor expansion. \n    ''' \n    \n    n = len(x) \n    g = zerovector(n) \n    h = zerovector(n) \n    f0 = func(x) \n    for i in range(n): \n        if step[i] == 0.0: \n            step[i] = max(abs(x[i])*0.01,0.0001) \n        xi = x[i] \n        while 1: \n            x[i] = xi + step[i] \n            f1 = func(x)\n            measure = 1e4*eps*max(abs(f0),eps)\n            if abs(f1-f0) < measure:\n                #print ' Increasing step ',i,step[i],abs(f1-f0) \n                step[i] = step[i]*2.0 \n            elif abs(f1-f0) > 10.0*measure:\n                #print ' Decreasing step ',i,step[i],abs(f1-f0) \n                step[i] = step[i]/3.0 \n            else: \n                break \n        x[i] = xi - step[i] \n        fm1 = func(x) \n        x[i] = xi \n        g[i] = (f1 - fm1)/(2*step[i]) \n        h[i] = (f1 + fm1 - 2.0*f0)/(step[i]*step[i]) \n\n    return (f0,g,h) \n\n\n\ndef quadfit(alpha0, f0, alpha1, f1, alpha2, f2): \n    ''' \n    Given 3 points compute the gradient and hessian at point 0 \n    using a quadratic fit. \n    ''' \n    delta1 = alpha1 - alpha0 \n    delta2 = alpha2 - alpha0 \n    d1 = (f1 - f0)/delta1 \n    d2 = (f2 - f0)/delta2 \n    h0 = 2.0*(d1 - d2)/(delta1-delta2) \n    g0 = d1 - 0.5*h0*delta1 \n\n    test1 = f0 + g0*delta1 + 0.5*h0*delta1*delta1 \n    test2 = f0 + g0*delta2 + 0.5*h0*delta2*delta2 \n    return (f0, g0, h0) \n\ndef takestep(x0, s, alpha): \n    x = zerovector(len(x0)) \n    for j in range(len(x)): \n        x[j] = x0[j] + s[j]*alpha \n    return x \n\ndef quadratic_step(trust, g0, h0, prnt=1): \n    if h0 > 0: \n        delta2 = -g0/h0 \n        if abs(delta2) > trust:\n            if prnt:\n                print \"                    Step restriction: %f %f \" % (delta2, trust) \n            delta2 = abs(trust*delta2)/delta2 \n    else:\n        if prnt:\n            print \"                    Negative curvature \" \n        delta2 = -abs(trust*g0)/g0 \n    return delta2 \n\n\n\ndef linesearch(func, x0, s, lsgrad, eps, prnt=1): \n    # Assume here that some halfway OK preconditioning \n    # is being used so we expect a step around unity. \n    # Nevertheless, must exercise some caution. \n\n    # First step in small increments until we've either \n    # bracketed the minimum or gone downhil with enough \n    # energy difference to start fitting\n\n    if prnt:\n        print \" Line search: step   alpha     grad     hess        value\" \n        print \"              ---- --------- -------- --------  ----------------\" \n\n    trust = 0.2 \n    alpha0 = 0.0 \n    f0 = func(x0)\n    if prnt:\n        print \"                   %9.2e %8.1e          %16.8e\" % \\\n              (alpha0, lsgrad, f0) \n\n    if lsgrad < 0: \n        alpha1 = alpha0 + trust \n    else: \n        alpha1 = alpha0 - trust \n    f1 = func(takestep(x0,s,alpha1))\n    if prnt:\n        print \"                   %9.2e                   %16.8e\" % \\\n              (alpha1, f1) \n\n    snorm = vector_norm(s)\n    \n    while f1 > f0: \n        if trust*snorm < sqrt(eps):\n            if prnt:\n                print \" system is too badly conditioned for initial step\" \n            return (alpha0,f0)          # Cannot seem to find my way \n        trust = trust * 0.5 \n        if lsgrad < 0: \n            alpha1 = alpha0 + trust \n        else: \n            alpha1 = alpha0 - trust \n        f1 = func(takestep(x0,s,alpha1))\n        if prnt:\n            print \"                   %9.2e                   %16.8e\" % \\\n                  (alpha1, f1) \n        \n    g0 = lsgrad \n    h0 = (f1-f0-alpha1*g0)/alpha1**2 \n    if f1 < f0: \n        g0 = g0 + h0*(alpha1 - alpha0) \n        alpha0, alpha1, f0, f1 = alpha1, alpha0, f1, f0 \n    \n    alpha2 = alpha0 + quadratic_step(trust,g0,h0,prnt) \n\n    nbackstep =0 \n\n    for iter in range(1,10): \n        f2 = func(takestep(x0,s,alpha2)) \n        #print ' alphas ', alpha0, alpha1, alpha2 \n        #print ' fs     ', f0, f1, f2 \n        \n        if iter == 1: \n            f2prev = f2 \n            \n        # Check for convergence or insufficient precision to proceed further \n        if (abs(f0-f1)<(10*eps)) and (abs(f1-f2)<(10*eps)):\n            if prnt:\n                print \"                  \", \n                print \" Insufficient precision ... terminating LS\" \n            break \n        \n        if (f2-f2prev) > 0: \n            # New point is higher than previous worst \n            if  nbackstep < 3: \n                nbackstep = nbackstep + 1\n                if prnt:\n                    print \"                  \", \n                    print \" Back stepping due to uphill step\" \n                trust = max(0.01,0.2*abs(alpha2 - alpha0))  # Reduce trust radius \n                alpha2 = alpha0 + 0.2*(alpha2 - alpha0) \n                continue \n        elif (f2-f0) < 0: \n            trust = min(4.0,trust*2.0)  # Seem to have narrowed the search \n\n        nbackstep = 0 \n\n        f2prev = f2 \n\n        # Order in increasing energy \n        if f1 < f0: \n            alpha0, alpha1, f0, f1 = alpha1, alpha0, f1, f0 \n        if f2 < f0: \n            alpha0, alpha2, f0, f2 = alpha2, alpha0, f2, f0 \n        if f2 < f1: \n            alpha1, alpha2, f1, f2 = alpha2, alpha1, f2, f1 \n\n        (f0, g0, h0) = quadfit(alpha0, f0, alpha1, f1, alpha2, f2)\n        if prnt:\n            print \"              %4i %9.2e %8.1e %8.1e %16.8e\" % \\\n                  (iter, alpha0, g0, h0, f0) \n\n        if (h0>0.0) and (abs(g0) < 0.03*abs(lsgrad)):\n            if prnt:\n                print \"                  \", \n                print \" gradient reduced 30-fold ... terminating LS\" \n            break \n        \n        # Determine the next step \n        delta = quadratic_step(trust,g0,h0,prnt) \n        alpha2 = alpha0 + delta \n        df = g0*delta + 0.5*h0*delta*delta \n        if abs(df) < 10.0*eps:\n            if prnt:\n                print \"                  \", \n                print \" projected energy reduction < 10*eps ... terminating LS\" \n            break \n\n    return (alpha0, f0) \n\ndef jacobi(a): \n    ''' \n    Diagonalize a real symmetric matrix using the variable threshold \n    cyclic Jacobi method.   The input matrix is unmodified.\n    \n    (v,e) = jacobi(a) \n    \n    Input: a[n][m] is a real symmetric matrix \n\n    Returns: (v,e) where v is the list of eigenvectors and e is an \n    vector of the corresponding eigenvalues in ascending order. \n    v[k] is a vector containing the kth eigenvector.  These satisfy \n\n    A*Vt = Vt*e \n\n    or \n\n    V*A = e*V \n\n    or \n    \n    sum(j)(a[i][j]v[k][j]) = e[k]*v[k][i] \n    ''' \n    a = copymatrix(a) \n    n = len(a) \n    m = len(a[0]) \n    if n != m: \n        raise 'Matrix must be square' \n    for i in range(n): \n        for j in range(m): \n            if a[i][j] != a[j][i]: \n                raise ' Matrix must be symmetric' \n\n    tolmin = 5.0e-16 \n    tol = 1e-2 \n\n    v = zeromatrix(n,n) \n    for i in range(n): \n        v[i][i] = 1.0 \n\n    maxd = 0.0 \n    for i in range(n): \n        maxd = max(abs(a[i][i]),maxd) \n\n    nrotsum = 0\n    for iter in range(50):\n        maxdaij = 0.0\n        nrot = 0 \n        for i in range(n): \n            for j in range(i+1,n):  # j>i\n                aii = a[i][i] \n                ajj = a[j][j]\n                aij = a[i][j]\n                daij = abs(aij)\n                maxdaij = max(maxdaij,daij/maxd)\n                if daij > tol*maxd: # Screen small elements \n                    s = ajj - aii \n                    ds = abs(s) \n                    if daij > (tolmin*ds): # Check for sufficient precision\n                        nrot = nrot + 1 \n                        if (tolmin*daij) > ds: \n                            c = s = 1/sqrt(2.) \n                        else: \n                            t = aij/s \n                            u = 0.25/sqrt(0.25+t*t) \n                            c = sqrt(0.5+u) \n                            s = 2.*t*u/c \n\n                        for k in range(i+1): \n                            t = a[k][i] \n                            u = a[k][j] \n                            a[k][i] = c*t - s*u \n                            a[k][j] = s*t + c*u\n                            \n                        ai = a[i]\n                        aj = a[j]\n                        for k in range(i+1,j): \n                            t = ai[k] \n                            u = a[k][j] \n                            ai[k] = c*t - s*u \n                            a[k][j] = s*t + c*u\n\n                        a[j][j] = s*aij + c*ajj\n                        a[i][i] = c*a[i][i] - s*(c*aij - s*ajj)\n\n                        for k in range(j,n): \n                            t = ai[k] \n                            u = aj[k] \n                            ai[k] = c*t - s*u \n                            aj[k] = s*t + c*u\n \n                        vi = v[i]\n                        vj = v[j]\n                        for k in range(n): \n                            t = vi[k] \n                            u = vj[k] \n                            vi[k] = c*t - s*u \n                            vj[k] = s*t + c*u \n\n                        a[j][i] = a[i][j] = 0.0 \n                        maxd = max(maxd,abs(a[i][i]),abs(a[j][j]))\n        #print iter, tol, maxdaij, nrot, '!'\n        nrotsum = nrotsum + nrot\n        if nrot == 0 and tol <= tolmin: \n            break\n        tol = min(tol,maxdaij*1e-1,maxdaij**2)\n        tol = max(tol,tolmin)\n\n    #print \"nrotsum\", nrotsum\n    if nrot != 0: \n        raise \"Jacobi iteration did not converge in 50 passes\"\n\n    # Sort eigenvectors and values into increasing order \n    e = zerovector(n) \n    for i in range(n): \n        e[i] = a[i][i] \n        for j in range(i): \n            if e[j] > e[i]: \n                (e[i],e[j]) = (e[j],e[i]) \n                (v[i],v[j]) = (v[j],v[i]) \n\n    return (v,e) \n\ndef hessian_update_bfgs(hp, dx, g, gp): \n    ''' \n    Apply the BFGS update to the approximate Hessian h[][]. \n\n    hp[][] = Hessian matrix from previous iteration \n    dx[]  = Step from previous iteration \n    .       (dx[] = x[] - xp[] where xp[] is the previous point) \n    g[]   = gradient at current point \n    gp[]  = gradient at previous point \n\n    Returns the updated hessian \n    ''' \n\n    n = len(hp) \n    hdx  = mxv(hp,dx) \n    dg = zerovector(n) \n    for i in range(n): \n        dg[i] = g[i] - gp[i] \n    \n    dxhdx = dot(dx,hdx) \n    dxdx  = dot(dx,dx) \n    dxdg  = dot(dx,dg) \n    dgdg  = dot(dg,dg) \n    h = copymatrix(hp) \n\n    if (dxdx > 0.0) and (dgdg > 0.0) and (abs(dxdg/sqrt(dxdx*dgdg)) > 1.e-8): \n        for i in range(n): \n            for j in range(n): \n                h[i][j] = h[i][j] + dg[i]*dg[j]/dxdg - hdx[i]*hdx[j]/dxhdx \n    else: \n        print ' BFGS not updating dxdg (%e), dgdg (%e), dxhdx (%f), dxdx(%e)' % (dxdg, dgdg, dxhdx, dxdx) \n\n    return h \n\ndef quasinr(func, guess, tol, eps, printvar=None, prnt=1): \n    ''' \n    Unconstrained minimization of a function of n variables \n    without analytic derivatives using quasi-Newtwon with BFGS update \n    and numerical gradients. \n    \n    func(x) is a function that takes an array of n values and \n    returns the function value \n    \n    guess[] is a vector of n values for the initial guess \n    \n    tol is the convergence criterion for the maximum value \n    of the gradient \n    \n    eps is the expected precision in the function value \n    \n    printvar(x) is an optional user function to print the values of \n    parameters each macro iteration \n    ''' \n    \n    n = len(guess) \n    x = copyvector(guess) \n    s = zerovector(n) \n    g = zerovector(n) \n    gp = zerovector(n) \n    step = zerovector(n) \n    hessian = zeromatrix(n,n) \n\n    alpha = 0.0 \n\n    for iter in range(50*n): \n        (value,g,h) = numderiv(func, x, step, eps) \n        gnrm = vector_norm(g)\n        \n        if prnt:\n            print ' ' \n            print ' iter    gnrm         value ' \n            print ' ---- --------- ----------------' \n            print \"%4i %9.2e %16.8e\" % (iter,gnrm,value) \n\n        if (prnt and printvar): \n            printvar(x) \n\n        if gnrm < tol: \n            if prnt: print ' Converged!' \n            break \n\n        if iter == 0: \n            for i in range(n): \n                hessian[i][i] = max(abs(h[i]),1e-4) \n        else: \n            hessian = hessian_update_bfgs(hessian, s, g, gp) \n\n        (v,e) = jacobi(hessian) \n        emax = max(map(abs,e)) \n        emin = emax*eps*100.0   # Control noise in small eigenvalues\n        if prnt:\n            print '\\n Eigenvalues of the Hessian:' \n            printvector(e) \n\n        # Transform to spectral form, take step, transform back \n        gs = mxv(v,g) \n        for i in range(n): \n            if e[i] < emin:\n                if prnt:\n                    print ' Mode %d: small/neg eigenvalue (%f).' % (i, e[i]) \n                s[i] = -gs[i]/emin \n            else: \n                s[i] = -gs[i]/e[i] \n        s = mxv(transpose(v),s) \n\n        # Apply overall step restriction ... better LS obviates this \n        scale = 1.0 \n        for i in range(n): \n            trust = abs(x[i])\n            if trust == 0.0: trust = 0.1 # ????\n            if abs(s[i]) > trust:\n                if prnt:\n                    print ' restricting ', i, trust, abs(x[i]), \\\n                          abs(x[i]/sqrt(abs(hessian[i][i]))), s[i] \n                scale = min(scale,trust/abs(s[i])) \n\n        if scale != 1.0: \n            for i in range(n): \n                s[i] = s[i]*scale \n        \n        (alpha,value) = linesearch(func, x, s, dot(s,g), eps, prnt) \n\n        if alpha == 0.0:\n            if prnt:\n                print ' Insufficient precision to proceed further' \n            break \n\n        for i in range(n): \n            s[i] = s[i]*alpha \n            x[i] = x[i] + s[i] \n            gp[i]= g[i] \n    return (gnrm,x) \n\n\ndef cgminold(func, dfunc, guess, tol): \n    ''' \n    Simple conjugate gradient assuming analtyic derivatives. \n    ''' \n    n = len(guess) \n    x = copyvector(guess) \n    s = zerovector(n) \n    g = zerovector(n) \n    gp= zerovector(n) \n    value = func(x) \n\n    for iter in range(10*n): \n        g = dfunc(x) \n        gmax = max(map(abs,g)) \n        \n        print ' ' \n        print ' iter    gmax         value ' \n        print ' ---- --------- ----------------' \n        print \"%4i %9.2e %16.8f\" % (iter,gmax,value) \n        \n        if gmax < tol: \n            print ' Converged!' \n            break \n        \n        if (iter == 0) or ((iter%20) == 0): \n            beta = 0.0 \n        else: \n            beta = (dot(g,g) - dot(g,gp))/(dot(s,g)-dot(s,gp)) \n\n        for i in range(n): \n            s[i] = -g[i] + beta*s[i] \n\n        (alpha,value) = linesearch(func, x, s, dot(s,g), 1e-12) \n\n        for i in range(n): \n            s[i] = s[i]*alpha \n            x[i] = x[i] + s[i] \n            gp[i]= g[i] \n\n    return (value,x) \n\n\n\ndef cgmin(func, dfunc, guess, tol, precond=None, reset=None): \n    ''' \n    Conjugate gradient with optional preconditioning and \n    use of analytic gradients. \n    ''' \n    n = len(guess) \n    x = copyvector(guess) \n    s = zerovector(n) \n    g = zerovector(n) \n    gp= zerovector(n) \n    value = func(x) \n\n    if not reset: \n        reset = n \n    reset = min(reset,n) \n\n    for iter in range(10*n): \n        g = dfunc(x) \n        gmax = max(map(abs,g)) \n        \n        print ' ' \n        print ' iter    gmax         value ' \n        print ' ---- --------- ----------------' \n        print \"%4i %9.2e %16.8f\" % (iter,gmax,value) \n\n        if gmax < tol: \n            print ' Converged!' \n            break \n        \n        if precond: \n            precondg = precond(x,g) \n        else: \n            precondg = g \n        \n        if (iter % reset) == 0: \n            beta = 0.0 \n        else: \n            beta = (dot(precondg,g) - dot(precondg,gp))/(dot(s,g)-dot(s,gp)) \n\n        for i in range(n): \n            s[i] = -precondg[i] + beta*s[i] \n\n        (alpha,value) = linesearch(func, x, s, dot(s,g), \n                                   max(1e-16,abs(value)*1e-12)) \n\n        for i in range(n): \n            s[i] = s[i]*alpha \n            x[i] = x[i] + s[i] \n            gp[i]= g[i] \n        \n    return (value,x) \n\ndef cgmin2(func, guess, tol, eps, printvar=None,reset=None): \n    ''' \n    Unconstrained minimization of a function of n variables \n    without analytic derivatives using conjugate gradient with \n    diagonal preconditioning. \n    \n    func(x) is a function that takes a vector of n values and \n    returns the function value \n    \n    guess[] is a vector of n values for the initial guess \n    \n    tol is the convergence criterion for the maximum value \n    of the gradient \n    \n    eps is the expected precision in the function value \n    \n    printvar(x) is an optional user function to print the values of \n    parameters each iteration \n    \n    reset is the number of iterations between forced resets of the \n    conjugacy.  In principle this could be n but noise in the \n    numerical gradients makes a smaller number a better choice. \n    ''' \n    \n    n = len(guess) \n    x = copyvector(guess) \n    s = zerovector(n) \n    g = zerovector(n) \n    gp = zerovector(n) \n    step = zerovector(n) \n    precondg = zerovector(n) \n\n    alpha = 0.0 \n\n    if not reset: \n        reset = n \n    reset = min(reset,n) \n\n    for iter in range(50*n): \n        (value,g,hh) = numderiv(func, x, step, eps) \n        gmax = max(map(abs,g)) \n        \n        print ' ' \n        print ' iter    gmax         value ' \n        print ' ---- --------- ----------------' \n        print \"%4i %9.2e %16.8f\" % (iter,gmax,value) \n\n        if (printvar): \n            printvar(x) \n\n        if gmax < tol: \n            print ' Converged!' \n            break \n\n        if (iter % reset) == 0: \n            # On the first iteration or if not applying conjugacy \n            # we can recompute the diagonal preconditioner \n            h = copyvector(hh) \n            for i in range(n): \n                h[i] = max(abs(h[i]),1e-6) \n        \n        # Preconditioning with the diagonal of the Hessian \n        for i in range(n): \n            precondg[i] = g[i] / h[i] \n            \n        # Should be able to reset every n steps but noisy gradients \n        # means that we don't have enough info. \n        if (iter % reset) == 0: \n            if iter != 0: \n                print\" Resetting conjugacy\" \n            beta = 0.0 \n        else: \n            beta = (dot(precondg,g) - dot(precondg,gp))/(dot(s,g)-dot(s,gp)) \n\n        for i in range(n): \n            s[i] = -precondg[i] + beta*s[i] \n\n        (alpha,value) = linesearch(func, x, s, dot(s,g), eps) \n\n        if alpha == 0.0: \n            # LS failed, probably due to lack of precision. \n            if beta != 0.0: \n                print \"LS failed - trying preconditioned steepest descent direction\" \n                for i in range(n): \n                    s[i] = -g[i] \n                (alpha,value) = linesearch(func, x, s, dot(s,g), eps) \n            if alpha == 0.0: \n                print \" Insufficient precision to proceed further\" \n                break \n\n        for i in range(n): \n            s[i] = s[i]*alpha \n            x[i] = x[i] + s[i] \n            gp[i]= g[i] \n    return (value,x) \n    \ndef choleski(A):\n    '''\n    Returns the Choleski factorization of a square positive definite\n    symmetric matrix.  Lij i<=j and A=L.Lt\n    Raises an exception if A is not symmetric or is singular.\n    '''\n    n = len(A)\n    m = len(A[0])\n    if n != m:\n        raise ValueError,\"choleski factorization requires square matrix\"\n    for i in range(n):\n        for j in range(n):\n            aij = A[i][j]\n            aji = A[j][i]\n            if abs(aij - aji) > (1e-15*max(abs(aij),abs(aji))):\n                raise ValueError,\"choleski factorization requires symmetric matrix\"\n    L = zeromatrix(n,n)\n    for k in range(n):\n        sum = 0.0\n        for m in range(k):\n            sum = sum + L[k][m]*L[k][m]\n        if A[k][k] <= sum:\n            raise ValueError, \"choleski factorization requires positive definite matrix\"\n        L[k][k] = sqrt(A[k][k]-sum)\n        for i in range(k+1,n):\n            sum = 0.0\n            for m in range(k):\n                sum = sum + L[i][m]*L[k][m]\n            L[k][i] = L[i][k] = (A[i][k] - sum)/L[k][k]\n    return L\n\ndef forward_elimination(L,b):\n    '''\n    In solving LUx=b, the first step is the forward elimination, y=L^-1.b\n    '''\n    n = len(L)\n    y = zerovector(n)\n    y[n-1] = b[n-1]/L[n-1][n-1]\n    for i in range(n):\n        sum = 0.0\n        for j in range(i):\n            sum = sum + L[i][j]*y[j]\n        y[i] = (b[i] - sum)/L[i][i]\n    return y\n\ndef backward_substitution(U,y):\n    '''\n    In solving LUx=b, the second step is the backward substitution, x=U^-1y\n    '''\n    n = len(U)\n    x = zerovector(n)\n    x[n-1] = y[n-1]/U[n-1][n-1]\n    for i in range(n-2,-1,-1):\n        sum = 0.0\n        for j in range(i+1,n):\n            sum = sum + U[i][j]*x[j]\n        x[i] = (y[i] - sum)/U[i][i]\n    return x\n\ndef choleski_solve(A,b):\n    '''\n    Solve Ax=b using Choleski factorization of A.\n    '''\n    L = choleski(A)\n    y = forward_elimination(L,b)\n    return backward_substitution(L,y)\n\ndef davidson(A,thresh=1e-6,maxsub=10,guess=None):\n    '''\n    Return the lowest eigenvalue and corresponding vector of A\n    '''\n    n = len(A)\n    \n    if guess:\n        x = [copyvector(guess)]\n        scale = 1.0/sqrt(vector_norm(x[0]))\n        for i in range(n):\n            x[0][i] = x[0][i]*scale\n    else:\n        x = [zerovector(n)]\n        imin = 0\n        for i in range(1,n):\n            if A[i] < A[imin]:\n                imin = i\n        x[0][imin] = 1.0\n\n    maxsub = min(maxsub,n)\n    Ax = []\n    nsub = 1\n    for iter in range(10*n):\n        Ax.append(mxv(A, x[nsub-1]))\n        xAx = mxm(x,transpose(Ax))\n        for j in range(nsub-1):\n            for k in range(j+1,nsub):\n                xAx[k][j] = xAx[j][k]\n        #print 'Reduced matrix'\n        #printmatrix(xAx)\n        (v,e) = jacobi(xAx)\n        #print 'Reduced evecs'\n        #printmatrix(v)\n        #print 'Reduced evals'\n        #printvector(e)\n\n        z = zerovector(n)\n        bestx = zerovector(n)\n        err = 0.0\n        for i in range(n):\n            Axi = 0.0\n            xi  = 0.0\n            for j in range(nsub):\n                xi = xi + v[0][j]* x[j][i]\n                Axi=Axi + v[0][j]*Ax[j][i]\n            denom = (A[i][i] - e[0])\n            if (denom < 0.01):\n                denom = 0.01\n            step = -(Axi - e[0]*xi)/denom\n            #print i, step, Axi, e[0], xi, denom\n            err = err + step*step\n            z[i] = xi + step\n            bestx[i] = xi\n        scale = 1.0/sqrt(vector_norm(bestx))\n        for i in range(n):\n            bestx[i] = bestx[i]*scale\n        print \"%5d %5d %20.10f %9.1e\" % (iter, nsub, e[0], sqrt(err))\n        if sqrt(err) < thresh:\n            return (bestx,e[0])\n        \n        for loop in range(2):        \n            for j in range(nsub):\n                zj = dot(z,x[j])\n                for i in range(n):\n                    z[i] = z[i] - zj*x[j][i]\n        scale = 1.0/vector_norm(z)\n        for i in range(n):\n            z[i] = z[i]*scale\n        if nsub < maxsub:\n            x.append(z)\n            nsub = nsub + 1\n        else:\n            nsub = 1\n            x = [bestx]\n            Ax = []\n    raise \"davidson did not converge\"\n\nif __name__ == '__main__':\n\n    def precond(g): \n        # Used to test optional preconditioner for cgmin(). \n        precondg = copyvector(g) \n        for i in range(len(g)): \n            precondg[i] = precondg[i]/(i+2.0) \n        return precondg \n\n    def df(x): \n        d = zerovector(len(x)) \n        for i in range(len(x)): \n            d[i] = x[i]*(i+1) \n            for j in range(len(x)): \n                d[i] = d[i] + x[j] \n        return d \n\n    def f(x): \n        sum = 0.0 \n        for i in range(len(x)): \n            for j in range(len(x)): \n                sum = sum + 0.5*x[i]*x[j] \n        for i in range(len(x)): \n            sum = sum + 0.5*x[i]*x[i]*(i+1) \n        return sum\n\n    import random\n\n    print '\\n\\n   TESTING DAVIDSON DIAGONALIZATION'\n    n = 8\n    a = zeromatrix(n,n)\n    for i in range(n):\n        for j in range(i,n):\n            a[j][i] = a[i][j] = random.random()-0.5\n        a[i][i] = a[i][i]*n\n\n    (v,e) = jacobi(a)\n    print ' Eval from jacobi', e[0]\n    davidson(a)\n    sys.exit()\n    \n    print '\\n\\n   TESTING SPARSE MATRIX PRODUCT'\n    n = 13\n    m = 17\n    k = 11\n    a = zeromatrix(k,n)\n    b = zeromatrix(k,m)\n    for i in range(k):\n        for j in range(n):\n            value = random.random()\n            if (value < 0.25): a[i][j] = value\n        for j in range(m):\n            value = random.random()\n            if (value < 0.25): b[i][j] = value\n    cc= mxm(transpose(a),b)\n    c = sparse_mtxm(a,b)\n    err = 0.0\n    for i in range(n):\n        for j in range(m):\n            err = err + abs(c[i][j]-cc[i][j])\n    print \"sparse flops:\", sparse_mtxm_nflop, \"dense flops:\", n*m*k\n    if (err < 1e-14):\n        print \"  OK\"\n    else:\n        print \" FAILED\"\n    import sys\n    sys.exit()\n\n    print '\\n\\n   TESTING JACOBI EIGENSOLVER\\n\\n' \n    n = 5\n    a = zeromatrix(n,n)\n    for i in range(n): \n        for j in range(i,n): \n            a[j][i] = a[i][j] = (i*j+1.)/(i+j+1.) \n\n    (v,e)= jacobi(a) \n\n    print ' eigenvalues' \n    printvector(e) \n    #print ' v ' \n    #printmatrix(v) \n    ev = mxm(v,a) \n    for i in range(n):\n        norm = dot(v[i],v[i])\n        if abs(norm-1.0) > 1e-14:\n            print ' Error in eigenvector norm', i, norm\n        etest = dot(v[i],ev[i])\n        if abs(etest-e[i]) > 1e-14*max(abs(e[0]),abs(e[-1])):\n            print ' Error in eigenvalue ', i, e[i], etest\n        err = 0.0\n        for j in range(n): \n            err = max(err,abs(ev[i][j] - e[i]*v[i][j])) \n        err = err/(n*max(1.0,abs(e[i]))) \n        if err > 1e-12: \n            print ' Error in eigenvector ', i, err\n            \n    sys.exit()\n\n    print '\\n\\n   TESTING QUASI-NR SOLVER \\n\\n' \n    quasinr(f, [1.,0.5,0.3,-0.4], 1e-4, 1e-10) \n\n    print '\\n\\n   TESTING GC WITH NUM. GRAD. AND DIAG. PRECOND.\\n\\n' \n    cgmin2(f, [1.,0.5,0.3,-0.4], 1e-4, 1e-10, reset=20) \n\n    print '\\n\\n   TESTING GC WITH ANAL. GRAD. AND WITHOUT OPTIONAL PRECOND.\\n\\n' \n    cgmin(f, df, [1.,0.5,0.3,-0.4], 1e-4) \n\n    print '\\n\\n   TESTING GC WITH ANAL. GRAD. AND WITH OPTIONAL PRECOND.\\n\\n' \n    cgmin(f, df, [1.,0.5,0.3,-0.4], 1e-4, precond=precond) \n\n    print '\\n\\n   TESTING GC WITH ANAL. GRAD. AND NO PRECOND.\\n\\n' \n    cgminold(f, df, [1.,0.5,0.3,-0.4], 1e-4) \n\n    print '\\n\\n    TESTING THE CHOLESKI FACTORIZATION\\n\\n'\n    n = 25\n    A = zeromatrix(n,n)\n    b = zerovector(n)\n    for i in range(n):\n        A[i][i] = 10.*(i+1)     # Construct A to be positive definite\n        b[i] = 1.0/(i+1.0)\n        for j in range(i+1,n):\n            A[j][i] = A[i][j] = (i+j)/(2.0+n)\n    x = choleski_solve(A,b)\n    Ax = mxv(A,x)\n    err = 0.0\n    for i in range(n):\n        err = err + abs(Ax[i] - b[i])\n    print ' Cholesky linear equation solution error is ', err\n"
  },
  {
    "path": "src/madness/mra/tools/quadrature.py",
    "content": "from math import *\nfrom longfloat import longfloat\n\nclass Quadrature:\n    def __init__(self, order, region=[-1.,1.], rule='GaussLegendre',\n                 uselongfloat=0):\n        self.uselongfloat = uselongfloat\n\n        if uselongfloat:\n            longfloat.nbits += 30\n            region = [longfloat(region[0]),longfloat(region[1])]\n            \n        self.order = order\n        self.region = region\n        self.midpoint = (region[1]+region[0])/2.\n        self.scale = (region[1]-region[0])/2.\n        self.rule = rule\n\n        if rule == 'GaussLegendre':\n            x,w = self.__grule()\n            for i in range(self.order):\n                x[i] = x[i]*self.scale + self.midpoint\n                w[i] = w[i]*self.scale\n        elif rule == 'GaussHermite':\n            raise \"sorry this is not tested\"\n            x,w = self.__hrule()\n        elif rule == 'GaussLaguerre':\n            raise \"sorry this is not tested\"\n            x,w = self.__lrule()\n        else:\n            raise \"unknown rule\",rule\n\n        self.x = x   \n        self.w = w\n        if uselongfloat:\n            longfloat.nbits -= 30\n\t    for i in range(self.order):\n                self.x[i].truncate()\n                self.w[i].truncate()\n\n    def __pn(self, n,x):\n        '''\n        Evaluate the Legendre polynomials up to the given order(n)\n        at x in [-1,1]\n        '''\n        p = range(n+1)\n        p[0] = 1\n        if n == 0:\n            return p\n        p[1] = x\n        for i in range(1,n):\n            p[i+1] = i*(x*p[i] - p[i-1])/(i+1) + x*p[i]\n        return p\n\n    def __hn(self, n, x):\n        '''\n        Evaluate the renormalized Hermite polynomials Hn(x).\n\n        Regular Hn\n        p[0] = 1\n        p[1] = 2*x\n        p[i+1] = 2*x*p[i] - 2*i*p[i-1]\n\n        Renormalized\n        p[0] = 1/pi**(1/4)\n        p[1] = sqrt(2)*x*p[0]\n        p[i+1] = x*sqrt(2/(i+1))*p[i] - sqrt(j/(j+1))*p[j-1]\n        \n        '''\n        p = range(n+1)\n        p[0] = 1.0\n        if self.uselongfloat:\n            x = longfloat(x)\n            p[0] = longfloat(1)\n        if n == 0:\n            return p\n        p[1] = 2*x\n        for i in range(1,n):\n            p[i+1] = 2*x*p[i] - 2*i*p[i-1]\n        return p\n\n    def __ln(self, n, x):\n        '''\n        Laguerre polyn\n        '''\n        p = range(n+1)\n        p[0] = 1.0\n        if self.uselongfloat:\n            x = longfloat(x)\n            p[0] = longfloat(1)\n        if n == 0:\n            return p\n        p[1] = 1-x\n        for i in range(1,n):\n            p[i+1] = ((2*i+1-x)*p[i]-i*p[i-1])/(i+1)\n        return p\n        \n\n    def __grule(self):\n        ''' Return the Gauss Legendre quadrature weights. '''\n\n        n = self.order\n\n        nbits = 52\n        if self.uselongfloat:\n            nbits = longfloat.nbits\n        acc = 0.5**(nbits/3 + 10)\n        if self.uselongfloat:\n            acc = longfloat(acc)\n\n        # References made to the equation numbers in Davis & Rabinowitz 2nd ed.\n        roots   = range(n)\n        weights = range(n)\n        for k in range(n):\n            # Initial guess for the root using 2.7.3.3b\n            #x = (1.0 - 1.0/(8*n*n) + 1.0/(8*n*n*n))*cos(((4*k+3.0)/(4*n+2))*pi)\n            x = (1.0 - 1.0/(8.0*n*n) + 1.0/(8.0*n*n*n))*cos(((4*k+3.0)/(4*n+2))*pi)\n            if self.uselongfloat:\n                x = longfloat(x)\n            # Refine the initial guess using a 3rd-order Newton correction 2.7.3.9\n            # Running this six times will ensure enough precision even if we're\n            # requesting over 1500 significant decimal figures.\n            for iter in range(7):\n                p = self.__pn(n,x)\n                p0 = p[n]                         # Value\n                p1 = n*(p[n-1] - x*p[n])/(1-x*x)  # First derivative ... 2.7.3.5\n                p2 = (2*x*p1 - n*(n+1)*p0)/(1-x*x)# Second derivative\n                delta = - (p0/p1)*(1 + (p0*p2)/(2*p1*p1))\n                x = x + delta\n                if abs(delta) < acc:\n                    break\n            if iter >= 6:\n                raise \"netwon iteration for root failed\"\n\n            # Compute the weight using 2.7.3.8\n            p = self.__pn(n,x)\n            w = 2*(1-x*x)/(n*n*p[n-1]*p[n-1])\n\n            roots[k] = x\n            weights[k] = w\n\n        nhalf = (n-1)/2+1\n        if (n%2) == 1 and n>1:\n            roots[nhalf-1] = 0\n        for i in range(nhalf):\n            j = n - i - 1\n            roots[j] = 0.5 * (roots[j] - roots[i])\n            roots[i] = -roots[j]\n            weights[i] = weights[j] = 0.5 * (weights[j] + weights[i])\n            #print i,j,str(roots[i]+roots[j]),str(weights[i]-weights[j])\n\n        return (roots,weights)\n\n    def __factorial(self,n):\n        f = 1.0\n        if self.uselongfloat:\n            f = longfloat(1.0)\n        for i in range(1,n+1):\n            f = f*i\n        return f\n\n    def __hrule(self):\n        '''\n\n        Gauss-Hermite rule on [0,inf]\n\n        '''\n        n = self.order\n\n        nbits = 52\n        rootpi = sqrt(pi)\n        two = 2.0\n        zero = 0.0\n        if self.uselongfloat:\n            two = longfloat(2)\n            zero = longfloat(0)\n            rootpi = longfloat(1).pi().sqrt()\n            nbits = longfloat.nbits\n        acc = 0.5**(nbits/3 + 10)\n        if self.uselongfloat:\n            acc = longfloat(acc)\n\n        # Find the points which are the zeros of Hn\n        # dH[n]/dx = 2*n*H[n-1]\n\n        npt = (n-1)/2+1\n        roots = range(npt)\n        weights = range(npt)\n        nfound = 0\n        if n%2:\n            p = self.__hn(n+1,0.0)\n            roots[0] = zero\n            weights[0] = two**(n+1)*self.__factorial(n)*rootpi/p[n+1]**2\n            # !!!! Since just doing [0,inf] need to halve this\n            weights[0] = weights[0]/two\n            nfound = nfound + 1\n\n        guess = 0.01\n        if self.uselongfloat:\n            guess = longfloat(guess)\n        while nfound != npt:\n\n            # Stupid linear search forward for sign change\n            x = guess\n            p = self.__hn(n,x)\n            hh = p[n]\n            while 1:\n                x = x + 0.05\n                p = self.__hn(n,x)\n                if hh*p[n] < 0.0:\n                    break\n                \n            # Cubic newton\n            for iter in range(7):\n                p = self.__hn(n,x)\n                p0 = p[n]               # Value\n                p1 = 2*n*p[n-1]         # First derivative\n                p2 = 4*n*(n-1)*p[n-2]   # Second derivative\n                delta = - (p0/p1)*(1 + (p0*p2)/(2*p1*p1))\n                #print \"newton\", x, delta\n                x = x + delta\n                if abs(delta) < acc:\n                    break\n            if iter >= 6:\n                raise \"Hermite netwon iteration for root failed\"\n\n            new = 1\n            for i in range(nfound):\n                if abs(x-roots[i]) < 1e-3:\n                    new = 0\n                    break\n            if not new:\n                guess = guess + 0.1\n                if guess > 100.0:\n                    raise \"Hermite root finder is lost\"\n                continue\n\n            #print \"found root\", x\n            roots[nfound] = x\n            p = self.__hn(n+1,x)\n            weights[nfound] = two**(n+1)*self.__factorial(n)*rootpi/p[n+1]**2\n            nfound = nfound + 1\n\n            guess = x + 0.05\n\n        return roots, weights\n\n    def __lrule(self):\n        '''\n\n        Gauss-Laguerre rule on [0,inf]\n\n        '''\n        n = self.order\n\n        nbits = 52\n        zero = 0.0\n        if self.uselongfloat:\n            zero = longfloat(0)\n            nbits = longfloat.nbits\n        acc = 0.5**(nbits/3 + 10)\n        if self.uselongfloat:\n            acc = longfloat(acc)\n\n        # Find the points which are the zeros of Ln\n        # dL[n]/dx   =  n*(L[n] - L[n-1])/x\n\n        roots = range(n)\n        weights = range(n)\n        nfound = 0\n        guess = 0.0001\n        step = 0.0001\n        if self.uselongfloat:\n            guess = longfloat(guess)\n        while nfound != n:\n            # Stupid linear search forward for sign change\n            x = guess\n            p = self.__ln(n,x)\n            hh = p[n]\n            if nfound > 1:\n                step = 0.1*(roots[nfound-1]-roots[nfound-2])\n            print \"step\", step\n            niter = 1000\n            while niter:\n                niter = niter - 1\n                xp = x\n                x = x + step\n                p = self.__ln(n,x)\n                if hh*p[n] < 0.0:\n                    break\n            x = (x + xp)/2.0\n            if niter == 0:\n                print nfound, x\n                raise \"Gauss Laguerre lost a root?\"\n\n            print \"linear search found\", x, hh, p[n]\n                \n            # Cubic newton\n            for iter in range(7):\n                p = self.__ln(n,x)\n                p0 = p[n]               # Value\n                p1 = n*(p[n] - p[n-1])/x # First derivative\n                pp1 = (n-1)*(p[n-1] - p[n-2])/x\n                p2 = n*(p1 - pp1)/x - p1/x    # Second derivative\n                delta = - (p0/p1)*(1 + (p0*p2)/(2*p1*p1))\n                x = x + delta\n                if abs(delta) < acc:\n                    break\n            if iter >= 6:\n                raise \"Laguerre netwon iteration for root failed\"\n            print \"found\",x\n\n            new = 1\n            for i in range(nfound):\n                if abs(x-roots[i]) < 1e-3:\n                    new = 0\n                    break\n            if not new:\n                guess = guess + step\n                if guess > 150.0:\n                    raise \"Laguerre root finder is lost\"\n                continue\n\n            p = self.__ln(n+1,x)\n            roots[nfound] = x\n            weights[nfound] = x/((n+1)*p[n+1])**2\n                \n            nfound = nfound + 1\n\n            guess = x + 0.05\n\n        return roots, weights\n\n    def integrate(self, function=None, values=None):\n        n = len(self.x)\n        if function:\n            values = range(n)\n            for i in range(n):\n                values[i] = function(self.x[i])\n        sum = 0.0\n        for i in range(n):\n            sum = sum + self.w[i]*values[i]\n        return sum\n\n    def points(self):\n        return self.x\n\n    def weights(self):\n        return self.w\n\ndef QuadratureTest(uselongfloat=0):\n    ''' Test the Gauss-Legendre quadrature on [0.5,1] '''\n    maxmaxerr = 0.0\n    for order in range(1,121):\n        q = Quadrature(order,[0.5,1.0],uselongfloat=uselongfloat)\n        maxerr = 0.0\n        for power in range(2*order):\n            fstr = 'def __qtestf(x): return x**%d' % power\n            exec(fstr)\n            value = q.integrate(__qtestf)\n            del(__qtestf)\n            if uselongfloat:\n                test = (longfloat(1) - longfloat((-power-1,1)))/(power+1.0)\n            else:\n                test = (1.0 - 0.5**(power+1))/(power+1.0)\n            maxerr = max(maxerr,abs(float(value-test)))\n        print \"order %d:  integrates powers up to %d with maxerr=%e\" % \\\n              (order, 2*order-1, maxerr)\n        maxmaxerr = max(maxmaxerr,maxerr)\n    print (' Maximum error from all orders %9.1e' % float(maxmaxerr))\n\ndef QuadratureTest2(uselongfloat=0):\n    ''' Test the Gauss-Hermite quadrature on [-inf..inf] '''\n    maxmaxerr = 0.0\n    rootpi = sqrt(pi)\n    two = 2.0\n    if uselongfloat:\n        two = longfloat(2)\n        rootpi = two.pi().sqrt()\n\n    for order in range(2,121):\n        q = Quadrature(order,rule=\"GaussHermite\",\n                       uselongfloat=uselongfloat)\n        maxerr = 0.0\n        for power in range(0,2*order,2):\n            fstr = 'def __qtestf(x): return x**%d' % power\n            exec(fstr)\n            value = q.integrate(__qtestf)\n            del(__qtestf)\n            test = 0.5*rootpi*0.5**(power/2)\n            for i in range(power-1,0,-2):\n                test = test * i\n            maxerr = max(maxerr,abs(float(value-test)/test))\n        print \"order %d:  integrates powers up to %d with maxerr=%e\" % \\\n              (order, 2*order-2, maxerr)\n        maxmaxerr = max(maxmaxerr,maxerr)\n    print (' Maximum error from all orders %9.1e' % float(maxmaxerr))\n\n\nif __name__ == '__main__':\n    longfloat.nbits = 220 # sufficient for quad-double representation\n    #print(longfloat.nbits)\n    #npt = 7\n    #q = Quadrature(7,(-1.0,1.0),rule='GaussLegendre',uselongfloat=1)\n    #pts = q.points()\n    #wts = q.weights()\n    #for i in range(npt):\n    #    print i, str(pts[i]), str(wts[i])\n    ##print q.points()\n    ##print q.weights()\n    ##stop\n\n    #print ' \\n\\n Testing quadrature with default floats \\n'\n    #QuadratureTest()\n\n    #print ' \\n\\n Testing quadrature with long floats \\n'\n    #QuadratureTest(uselongfloat=1)\n    #stop\n    \n    #QuadratureTest2()\n\n    #QuadratureTest2(uselongfloat=1)\n\n    for npt in range(121):\n        print \"%3d\"%npt\n        q = Quadrature(npt,(-1,1),rule='GaussLegendre',uselongfloat=1)\n        pts = q.points()\n        wts = q.weights()\n        sumw = 0\n        for i in range(npt):\n            sumw += wts[i]\n            #print(repr(pts[i]))\n            print \"%4d %72s %72s\" % (i, str(pts[i]), str(wts[i]))\n        #print \"sumw\", str(sumw)\n"
  },
  {
    "path": "src/madness/mra/tools/twoscalecoeffs.py",
    "content": "import math\nimport mathutil\nfrom array import *\nfrom mathutil import printvector, printmatrix, dot\nfrom longfloat import longfloat\nfrom quadrature import Quadrature, QuadratureTest\n\n# Compute the two-scale coefficients for Aplert's multi-wavelets\n# This has been separated from the other code since we need extended\n# precision to do this.\n#\n# Import this file using\n#\n# from twoscalecoeffs import twoscalecoeffs\n#\n# otherwise you'll end up with a bunch of multiple precision stuff that\n# you really don't want\n\n# Redefine a vector to be a list rather than an array of doubles\n# so that we can use extended precision\n\ndef vector(n):\n    return range(n)\n\ndef zerovector(n):\n    v = vector(n)\n    for i in range(n):\n        v[i] = longfloat(0)\n    return v\n\ndef zeromatrix(n,m): \n    a = range(n) \n    for i in range(n): \n        a[i] = zerovector(m) \n    return a \n\ndef pn(x,order):\n    '''\n    Evaluate the Legendre polynomials up to the given order at x\n    defined on [-1,1].\n    '''\n    p = range(order+1)\n    p[0] = 1\n    if order == 0:\n        return p\n    p[1] = x\n    for n in range(1,order):\n        p[n+1] = n*(x*p[n] - p[n-1])/(n+1) + x*p[n]\n    return p\n\nphi_norms = []                          # Cache sqrt(2*n+1)\ndef phi(x,k):\n    '''\n    Evaluate the shifted normalized Legendre polynomials up to the\n    given order at x defined on [0,1].\n\n    These are also our scaling functions, phi_i(x) , i=0..k-1\n\n    In addition to forming an orthonormal basis on [0,1] we have\n    phi_j(1/2-x) = (-1)^j phi_j(1/2+x)\n\n    (the wavelets are similar with phase (-1)^(j+k)).\n    '''\n    global phi_norms\n\n    if len(phi_norms) == 0:\n        for n in range(max(k,100)):\n            phi_norms.append(math.sqrt(2*n+1))\n    order = k-1\n    p = pn(2.*x-1,order)\n    for n in range(k):\n        p[n] = p[n]*phi_norms[n]  # sqrt(2*n+1)\n    return p\n\ndef psi(x,k,g0,g1):\n    '''\n    For debug and demo purposes evaluate the multi-wavelets at x in [0,1]\n    given the two-scale coefficients.\n    '''\n    if x < 0.5:\n        p = phi(2.0*x,k)\n        g = g0\n    else:\n        p = phi(2.0*x-1.0,k)\n        g = g1\n\n    root2 = math.sqrt(2.0)\n    value = mathutil.zerovector(k)\n    for i in range(k):\n        for j in range(k):\n            value[i] = value[i] + root2*g[i][j]*p[j]\n\n    return value\n\n\ndef pnlong(x,order):\n    '''\n    USE LONGFLOATS\n    \n    Evaluate the Legendre polynomials up to the given order at x\n    defined on [-1,1].\n    '''\n    p = range(order+1)\n    p[0] = longfloat(1)\n    x = longfloat(x)\n    if order == 0:\n        return p\n    p[1] = x\n    for n in range(1,order):\n        p[n+1] = n*(x*p[n] - p[n-1])/(n+1) + x*p[n]\n    return p\n\nphi_norms_long = []                          # Cache sqrt(2*n+1)\ndef philong(x,k):\n    '''\n    USE LONGFLOATS\n    \n    Evaluate the shifted normalized Legendre polynomials up to the\n    given order at x defined on [0,1].\n\n    These are also our scaling functions, phi_i(x) , i=0..k-1\n\n    In addition to forming an orthonormal basis on [0,1] we have\n    phi_j(1/2-x) = (-1)^j phi_j(1/2+x)\n\n    (the wavelets are similar with phase (-1)^(j+k)).\n    '''\n    global phi_norms_long\n\n    if len(phi_norms_long) == 0:\n        for n in range(max(k+1,61)):\n            phi_norms_long.append(longfloat(2*n+1).sqrt())\n    if k > 60:\n        raise \"phi_norms_long too small\"\n    \n    order = k-1\n    p = pnlong(2*x-1,order)\n    for n in range(k):\n        p[n] = p[n]*phi_norms_long[n]  # sqrt(2*n+1)\n    return p\n\ndef h0h1(k):\n    '''\n    USE LONGFLOATS\n    \n    Compute the h0 & h1 two-scale coefficients\n\n    h0_ij = sqrt(2)*int(phi_i(x)*phi_j(2x),x=0..1/2)\n    h1_ij = sqrt(2)*int(phi_i(x)*phi_j(2x-1),x=1/2..1)\n\n    but\n    \n    h1_ij = (-1)^(i+j) h0_ij from symmetry property of the phi\n\n    The h0/h1 are useful because\n\n    phi_i(x) = sqrt(2)*sum(j) h0_ij*phi_j(2x) + h1_ij*phi_j(2x-1)\n\n    and\n    \n    phi_i(2x)   = (1/sqrt(2))*sum(j) h0_ji*phi_j(x) + g0_ji*psi(x)\n    phi_i(2x-1) = (1/sqrt(2))*sum(j) h1_ji*phi_j(x) + g1_ji*psi(x)\n    '''\n    q = Quadrature(k,[longfloat(0),longfloat((-1,1))],uselongfloat=1)\n    x = q.points()\n    w = q.weights()\n    npt = len(x)\n    twox = range(npt)\n    for i in range(npt):\n        twox[i] = x[i] + x[i]\n\n    h0 = zeromatrix(k,k)\n    h1 = zeromatrix(k,k)\n    \n    root2 = longfloat(2).sqrt()\n    for t in range(npt):\n        p = philong(x[t],k)\n        p2= philong(twox[t],k)\n        for i in range(k):\n            faci = p[i]*w[t]*root2\n            for j in range(k):\n                h0[i][j] = h0[i][j] + faci*p2[j]\n\n    for i in range(k):\n        for j in range(k):\n            h1[i][j] = ((-1)**(i+j))*h0[i][j]\n\n    return (h0, h1)\n\ndef orthonormalize_wavelets(g0,g1,k):\n    '''\n    USE LONGFLOATS\n    \n    Orthonormalize in reverse order\n    '''\n    for i in range(k-1,-1,-1):\n        for attempt in range(1):   # was 2\n            # Orthog to previous functions\n            for m in range(k-1,i,-1):\n                dotim = dot(g0[i]+g1[i],g0[m]+g1[m])\n                for j in range(k):\n                    g0[i][j] = g0[i][j] - dotim*g0[m][j]\n                    g1[i][j] = g1[i][j] - dotim*g1[m][j]\n            norm = dot(g0[i]+g1[i],g0[i]+g1[i])\n            rnorm = norm.rsqrt()\n            for j in range(k):\n                g0[i][j] = g0[i][j]*rnorm\n                g1[i][j] = g1[i][j]*rnorm\n\ndef half_moments(maxm,k):\n    '''\n    USE LONGFLOATS\n    \n    Compute the moments of the scaling functions computed\n    over half over the interval.\n\n    hmom1[p][j] = int(x^p * phi_j(2*x), x=0..1/2)\n    hmom2[p][j] = int((x+0.5)^p * phi_j(2*x), x=0..1/2)\n\n    hmom2 is made from hmom1 using the binomial expansion\n    (x+a)^p = a^0*x^p + p*a^1*x^p-1 + p*(p-1)*a^2*x^p-2 / 2 + ... + a^p*x^0\n\n    From Alpert, Beylkin, Gines and Vozovoi\n\n    int(x^p phi_j(x),x=0..1) = sqrt(2*j+1)*(p!)^2 / ((p-j)!(p+j+1)!) p>=j\n\n    Get an extra factor of (1/2)^(m+1) from the change of scale.\n\n    For completeness also record here that\n    \n    int((x-1)^p phi_j(x),x=0..1) = (-1)^(j+p) *\n    .                          sqrt(2*j+1)*(p!)^2 / ((p-j)!(p+j+1)!)\n\n    Moments with p < j are zero due to orthogonality.\n    '''\n\n    hmom1 = zeromatrix(maxm+1,k)\n    hmom2 = zeromatrix(maxm+1,k)\n\n    factorial = range(maxm+1+k)\n    pfac = longfloat(1)\n    for p in range(maxm+1+k):\n        factorial[p] = pfac\n        pfac = pfac * (p+1)\n\n    half = longfloat((-1,1))\n    for p in range(maxm+1):\n        pfac2 = factorial[p]*factorial[p]\n        scale = longfloat(half)**(p+1)\n        for j in range(k):\n            if p < j:\n                hmom1[p][j] = longfloat(0)\n            else:\n                hmom1[p][j] = scale*(longfloat(2*j+1).sqrt())*pfac2 / \\\n                             (factorial[p-j]*factorial[p+j+1])\n\n    for p in range(maxm+1):\n        for i in range(k):\n            fac = longfloat(1)\n            for q in range(p+1):\n                hmom2[p][i] = hmom2[p][i] + fac*(half**(p-q))*hmom1[q][i]\n                fac = fac * (p-q) / (q+1)\n    return (hmom1, hmom2)\n    \n\ndef g0g1(k):\n    '''\n    USE LONGFLOATS\n    \n    Compute the g0 & g1 two-scale coefficients which define the\n    multi-wavelet in terms of the scaling functions at the finer\n    level.\n\n    psi_i(x) = sqrt(2)*sum(j) g0_ij*phi_j(2x) + g1_ij*phi_j(2x-1)\n\n    Projection with sqrt(2)*phi_j(2x) and sqrt(2)*phi_j(2x-1), which\n    are the normalized scaling functions on the finer level, yields \n\n    g0_ij = sqrt(2)*int(psi_i(x)*phi_j(2x),x=0..1/2)\n    g1_ij = sqrt(2)*int(psi_i(x)*phi_j(2x-1),x=1/2..1)\n\n\n    With the original Alpert conditions we have\n    \n    g1_ij = (-1)^(i+j+k) g0_ij from symmetry properties of the psi\n\n    but you only get this if you impose the condition of additional\n    vanishing moments.\n\n    The projection of the additional moments is very numerically\n    unstable and forces the use of higher precision for k >= 6.\n    '''\n\n    g0 = zeromatrix(k,k)\n    g1 = zeromatrix(k,k)\n\n    # Initialize the basis\n    rroot2 = longfloat(2).rsqrt()\n    for i in range(0,k):\n        g0[i][i] =  rroot2\n        g1[i][i] = -rroot2\n\n    (h0, h1) = h0h1(k)\n\n    # Project out the moments == orthog to the scaling functions.\n    # Need to use the two-scale relation for the scaling functions.\n    for i in range(k):\n        for attempt in range(1): # was 2\n            for m in range(k):\n                dotim = dot(g0[i],h0[m])+dot(g1[i],h1[m])\n                for j in range(k):\n                    g0[i][j] = g0[i][j] - dotim*h0[m][j]\n                    g1[i][j] = g1[i][j] - dotim*h1[m][j]\n\n    # Orthog to x^k, x^k+1, ... , x^2k-2\n    first = 0\n    root2 = longfloat(2).sqrt()\n    (hmom1,hmom2) = half_moments(2*k-2,k)\n\n    test = longfloat(1).eps().sqrt()\n    for power in range(k,2*k-1):\n        # Transform to the wavelet basis\n        overlap = zerovector(k)\n        for i in range(k):\n            for j in range(k):\n                overlap[i] = overlap[i] + root2*\\\n                  (g0[i][j]*hmom1[power][j] + g1[i][j]*hmom2[power][j])\n\n        # Put first function with non-zero overlap in front of the list\n        for i in range(first,k):\n            if abs(overlap[i]) > test:       # Is there a better test?\n                (g0[first],g0[i]) = (g0[i],g0[first])\n                (g1[first],g1[i]) = (g1[i],g1[first])\n                (overlap[first],overlap[i]) = (overlap[i],overlap[first])\n                break\n\n        # Project out the first component as necessary.\n        if abs(overlap[first]) > test:       # Is there a better test?\n            for i in range(first+1,k):\n                scale = overlap[i]/overlap[first]\n                for j in range(k):\n                    g0[i][j] = g0[i][j] - scale*g0[first][j]\n                    g1[i][j] = g1[i][j] - scale*g1[first][j]\n\n        first = first + 1\n        \n    orthonormalize_wavelets(g0,g1,k)\n        \n    return (g0, g1)\n\ndef fromfile(k):\n    '''\n    See if the two-scale coeffs have already been computed and stored on disk.\n    Return the data are successfully read from disk, otherwise None.\n    '''\n    fname = '/tmp/two-scale-coeffs.' + str(k)\n    try:\n        f = open(fname,'rb')\n        data = array('d',[])\n        data.fromfile(f,4*k*k)\n        h0 = mathutil.zeromatrix(k,k)\n        h1 = mathutil.zeromatrix(k,k)\n        g0 = mathutil.zeromatrix(k,k)\n        g1 = mathutil.zeromatrix(k,k)\n        pt = 0\n        for i in range(k):\n            for j in range(k):\n                h0[i][j] = data[pt]\n                h1[i][j] = data[pt+1]\n                g0[i][j] = data[pt+2]\n                g1[i][j] = data[pt+3]\n                pt = pt + 4\n        #print ' Read two-scale coefficients from file',fname\n        return (h0,h1,g0,g1)\n    except IOError, EOFError:\n        return None\n\ndef tofile(h0,h1,g0,g1):\n    '''\n    Write the two-scale coeffs to disk.\n    '''\n    k = len(h0)\n    fname = '/tmp/two-scale-coeffs.' + str(k)\n    f = open(fname,'w+b')\n    data = array('d',[0]*(4*k*k))\n    pt = 0\n    for i in range(k):\n        for j in range(k):\n            data[pt  ] = h0[i][j]\n            data[pt+1] = h1[i][j]\n            data[pt+2] = g0[i][j]\n            data[pt+3] = g1[i][j]\n            pt = pt + 4\n    data.tofile(f)\n    f.close()\n    #print ' Wrote two-scale coefficients to file',fname\n\n\ndef twoscalecoeffs(k,usecached=1):\n    '''\n    Return the two-scale coefficients for Alperts basis of given order\n\n    coarser <= finer\n    phi_i(x) = sqrt(2)*sum(j) h0_ij*phi_j(2x) + h1_ij*phi_j(2x-1)\n    ditto for psi_i(x) with g instead of h\n\n    s_n,i,l = sum(j) h0_ij*s_n+1,j,2l + h1_ij*s_n+1,j,2l+1\n    ditto for d with g instead of h\n\n    finer <= coarser\n    phi_i(2x)   = (1/sqrt(2))*sum(j) h0_ji*phi_j(x) + g0_ji*psi(x)\n    phi_i(2x-1) = (1/sqrt(2))*sum(j) h1_ji*phi_j(x) + g1_ji*psi(x)\n\n    s_n+1,i,2l   = sum(j) h0_ji*sn,j,l + g0_ji*d_n,j,l\n    s_n+1,i,2l+1 = sum(j) h1_ji*sn,j,l + g1_ji*d_n,j,l\n\n    '''\n    global phi_norms_long\n\n    if usecached:\n        cached = fromfile(k)\n        if cached:\n            return cached\n\n    nbitssave = longfloat.nbits\n    if k < 11:\n        longfloat.nbits = 156\n    elif k < 19:\n        longfloat.nbits = 208\n    elif k < 24:\n        longfloat.nbits = 260\n    elif k < 29:\n        longfloat.nbits = 320\n    elif k < 33:\n        longfloat.nbits = 360\n    elif k < 37:\n        longfloat.nbits = 400\n    elif k < 42:\n        longfloat.nbits = 440\n    elif k < 46:\n        longfloat.nbits = 480\n    elif k < 49:\n        longfloat.nbits = 520\n    else:\n        longfloat.nbits = 800\n\n    longfloat.nbits = 800\n    print ' Generating two-scale coeffcients for k=%d using %d-bit floating point numbers' \\\n          % (k, longfloat.nbits)\n    \n    # Force recomputation of the cached sqrt(2*j+1) values \n    phi_norms_long = []\n    \n    # Compute the coeffcicients to high precision using longfloats\n    (h0l,h1l) = h0h1(k)\n    (g0l,g1l) = g0g1(k)\n\n    # Copy them into arrays of floats\n    h0 = mathutil.zeromatrix(k,k)\n    g0 = mathutil.zeromatrix(k,k)\n    h1 = mathutil.zeromatrix(k,k)\n    g1 = mathutil.zeromatrix(k,k)\n\n    gerr = 0.0\n    herr = 0.0\n    for i in range(k):\n        for j in range(k):\n            hphase = (-1)**(i+j)\n            gphase = (-1)**(i+j+k)\n            h0[i][j] = float(h0l[i][j])\n            h1[i][j] = h0[i][j]*hphase\n            g0[i][j] = float(g0l[i][j])\n            g1[i][j] = g0[i][j]*gphase\n            if abs(h0[i][j]) < 4e-16: h0[i][j] = 0.0\n            if abs(h1[i][j]) < 4e-16: h1[i][j] = 0.0\n            if abs(g0[i][j]) < 4e-16: g0[i][j] = 0.0\n            if abs(g1[i][j]) < 4e-16: g1[i][j] = 0.0\n            testerr = float(abs(g0l[i][j]-gphase*g1l[i][j]))\n            if g0[i][j] != 0.0: testerr = testerr/abs(g0[i][j])\n            gerr = max(gerr,testerr)\n            testerr = float(abs(h0l[i][j]-hphase*h1l[i][j]))\n            if h0[i][j] != 0.0: testerr = testerr/abs(h0[i][j])\n            herr = max(herr,testerr)\n            \n    print ' maximum symmetry error in h ', float(herr)\n    print ' maximum symmetry error in g ', float(gerr)\n\n    longfloat.nbits = nbitssave\n    \n    if max(float(herr),float(gerr)) > 4e-16:\n        raise \"twoscalecoeffs have inadequate precision\"\n\n    tofile(h0,h1,g0,g1)\n\n    return (h0,h1,g0,g1)\n\nif __name__ == \"__main__\":\n\n    (h0,h1,g0,g1) = twoscalecoeffs(4)\n    print h0\n    print h1\n    print g0\n    print g1\n    atop\n\n\n    print '\\n\\n Beginning new run \\n'\n\n    #QuadratureTest(uselongfloat=1)\n\n    for k in range(1,31):\n        print '\\n\\n Testing multiwavelets k =', k, '\\n'\n\n        (h0,h1,g0,g1) = twoscalecoeffs(k)\n        # Demonstrate that the scaling functions are ortho-normal\n        i = 0\n        j = 0\n        def f(x):\n            global k, i, j\n            p = phi(x,k)\n            return p[i]*p[j]\n        q = Quadrature(k,[0,1.0])\n        err = 0.0\n        for i in range(k):\n            for j in range(i+1):\n                overlap = q.integrate(f)\n                if i == j: overlap = overlap - 1\n                err = max(err,abs(overlap))\n        print ' Maximum errror in the overlap of scaling functions', err\n\n        # Demonstrate that the wavelets are ortho-normal\n        i = 0\n        j = 0\n        def f(x):\n            global k, i, j, g0, g1\n            p = psi(x,k,g0,g1)\n            return p[i]*p[j]\n\n        q1 = Quadrature(k,[0,0.5])\n        q2 = Quadrature(k,[0.5,1.0])\n        err = 0.0\n        for i in range(k):\n            for j in range(i+1):\n                overlap = q1.integrate(f) + q2.integrate(f)\n                if i == j: overlap = overlap - 1\n                err = max(err,abs(overlap))\n        print ' Maximum errror in the overlap of wavelets', err\n\n        # Demonstrate that the wavelets are normal to scaling functions\n        i = 0\n        j = 0\n        def f(x):\n            global k, i, j, g0, g1\n            p = psi(x,k,g0,g1)\n            q = phi(x,k)\n            return p[i]*q[j]\n\n        q1 = Quadrature(k,[0,0.5])\n        q2 = Quadrature(k,[0.5,1.0])\n        err = 0.0\n        for i in range(k):\n            for j in range(k):\n                overlap = q1.integrate(f) + q2.integrate(f)\n                err = max(err,abs(overlap))\n        print ' Maximum errror in the overlap of wavelets with scaling functions', err\n\n        if k <= 4:\n            print '     h0 '\n            printmatrix(h0)\n            print '     g0 '\n            printmatrix(g0)\n        \n"
  },
  {
    "path": "src/madness/mra/twoscale.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <iostream>\nusing std::cout;\nusing std::endl;\nusing std::ios;\n\n#include <cstdio>\n#include <cstdlib>\n\n#include <cmath>\nusing std::abs;\n\n#include <madness/mra/twoscale.h>\n#include <madness/tensor/tensor.h>\n#include <madness/misc/misc.h>\n\n/// \\file twoscale.cc\n/// \\brief Routines to provide twoscale & correlation coeffs for Legendre basis\n\nnamespace madness {\n\n    static const int kmax = 60;\n    static const char *twoscale_filename = \"coeffs\";  // Will be overridden by load_coeffs\n    static const char *autocorr_filename = \"autocorr\";  // Will be overriden by load_coeff\n\n\n    static class twoscale_cache_class {\n        /// This caches the two-scale coefficients\n    public:\n        Tensor<double> h0;\n        Tensor<double> h1;\n        Tensor<double> g0;\n        Tensor<double> g1;\n    }\n    cache[kmax+1];\n\n    static bool loaded = 0;\n\n\n    static Tensor<double> readmat(int k, FILE* file) {\n        Tensor<double> a(k,k);\n        for (int i=0; i<k; ++i) {\n            for (int j=0; j<k; ++j) {\n                double c;\n                if (fscanf(file,\"%lf\",&c) != 1) {\n                    cout << \"readmat: twoscale missing coeff?\\n\";\n                    throw \"readmat\";\n                }\n                a(i,j) = c;\n            }\n        }\n        return a;\n    }\n\n    static inline double phase(long i) {\n        return (i&1) ? -1.0 : 1.0;\n    }\n\n    static bool read_twoscale(int kmax) {\n        unsigned long correct = 6931979l;\n        unsigned long computed = checksum_file(twoscale_filename);\n        MADNESS_CHECK(correct == computed);\n        FILE* file = fopen(twoscale_filename,\"r\");\n        if (!file) {\n            cout << \"twoscale: failed opening file with twoscale coefficients\\n\";\n            return false;\n        }\n        for (int k=1; k<kmax+1; ++k) {\n            Tensor <double> h0, g0;\n            try {\n                h0 = readmat(k,file);\n                g0 = readmat(k,file);\n            }\n            catch (char *e) {\n                fclose(file);\n                return false;\n            }\n\n            Tensor<double> h1(k,k);\n            Tensor<double> g1(k,k);\n\n            for (int i=0; i<k; ++i) {\n                for (int j=0; j<k; ++j) {\n                    h1(i,j) = h0(i,j)*phase(i+j);\n                    g1(i,j) = g0(i,j)*phase(i+j+k);\n                }\n            }\n\n            cache[k].h0 = h0;\n            cache[k].h1 = h1;\n            cache[k].g0 = g0;\n            cache[k].g1 = g1;\n        }\n        fclose(file);\n\n        loaded = true;\n        return true;\n    }\n\n\n    /// Return the two scale coefficients in the Legendre basis\n\n    /// Returns true on success, false on failure (and prints error message)\n    bool two_scale_coefficients(int k,\n                                Tensor<double>* h0, Tensor<double>* h1,\n                                Tensor<double>* g0, Tensor<double>* g1) {\n        if (!loaded) {\n            if (!read_twoscale(kmax)) return false;\n        }\n\n        if (k < 1 || k > kmax) return false;\n\n        *h0 = copy(cache[k].h0);\n        *h1 = copy(cache[k].h1);\n        *g0 = copy(cache[k].g0);\n        *g1 = copy(cache[k].g1);\n\n        return true;\n    }\n\n    bool two_scale_hg(int k, Tensor<double>* hg) {\n        Tensor<double> h0(k,k), h1(k,k), g0(k,k), g1(k,k);\n\n        if (!two_scale_coefficients(k, &h0, &h1, &g0, &g1)) return false;\n\n        *hg = Tensor<double>(2*k,2*k);\n\n        Slice sk(0,k-1), sk2(k,-1);\n        (*hg) = Tensor<double>(2*k,2*k);\n        (*hg)(sk,sk)   = h0;\n        (*hg)(sk,sk2)  = h1;\n        (*hg)(sk2,sk)  = g0;\n        (*hg)(sk2,sk2) = g1;\n\n        return true;\n    }\n\n    bool test_two_scale_coefficients() {\n        /// Test the two scale coefficients for orthogonality\n        for (int k=1; k<kmax; ++k) {\n            Tensor<double> hg;\n            if (!two_scale_hg(k,&hg)) return false;\n            Tensor<double> ident(2*k,2*k);\n            for (int i=0; i<2*k; ++i) ident(i,i) = 1.0;\n\n            double err0 = (inner(hg,hg,0,0)-ident).absmax();\n            if (err0 > 9e-16) {\n                std::cout << \"twoscale failed 0: \" << k << \" \" << err0 << std::endl;\n                std::cout << (inner(hg,hg,0,0)-ident);\n                return false;\n            }\n\n            double err1 = (inner(hg,hg,1,1)-ident).absmax();\n            if (err1 > 9e-16) {\n                std::cout << \"twoscale failed 1: \" << k << \" \" << err1 << std::endl;\n                std::cout << (inner(hg,hg,1,1)-ident);\n                return false;\n            }\n        }\n        return true;\n    }\n\n\n    // BELOW HERE THE AUTOCORRELATION ROUTINES\n\n    static const int kmax_autoc = 30;\n    static int kread = -1;  // value of k for data read from disk into _cread\n    static Tensor<double> _cread;\n\n    static int kcur = -1; // current value of k in for data in _c\n    static Tensor<double> _c;\n\n    static bool read_data(int k);\n\n    /// Return the autocorrelation coefficients for scaling functions of given order\n\n    /// Returned is a view of the cached data ... do not modify.\n    ///\n    /// The autocorrelation functions are defined as\n    /// \\code\n    ///    Phi_ij(z) = int(0,z+1) phi_i(x) phi_j(x-z)  z<=0\n    ///    Phi_ij(z) = int(z,1) phi_i(x) phi_j(x-z)    z>=0\n    /// \\endcode\n    /// and are expanded in the double order Legendre scaling functions on either\n    /// side of the origin\n    /// \\code\n    ///    Phi_ij(z) = sum(p) [phi_p(z+1)*cminus_ijp + phi_p(z)*cplus_ijp]\n    ///\n    ///    cplus_ijp  = int(-1,0) Phi_ij(z) phi_p(z+1)\n    ///    cminus_ijp = int(0,1)  Phi_ij(z) phi_p(z)\n    /// \\endcode\n    ///\n    /// The expansion coefficients \\c cminus and \\c cplus have been precomputed\n    /// with Maple to a precision of about 1e-30.  Only \\c cplus is stored and we use\n    /// \\code\n    ///    cplus(i,j,p) = (-1)**(i+j+p) * cminus(i,j,p)\n    ///    cplus(i,j,p) = (-1)**(i+j)   * cplus(j,i,p)\n    /// \\endcode\n    ///\n    /// The returned tensor concatenates cminus and cplus.\n    ///\n    /// Return true on success, false on failure (which also prints error\n    /// message to stdout).\n    bool autoc(int k, Tensor<double>* c) {\n        if (k < 1 || k > kread) { // was kmax_autoc\n            cout << \"autoc: invalid k \" << k << endl;\n            return false;\n        }\n\n        // The data is cached in _c ... reread (now from _cread) for each new value of k\n        if (kcur != k) {\n            _c = Tensor<double>(k,k,4*k);\n            _c(Slice(0,k-1),Slice(0,k-1),Slice(0,2*k-1)) = _cread(Slice(0,k-1),Slice(0,k-1),Slice(0,2*k-1));\n            _c(Slice(0,k-1),Slice(0,k-1),Slice(2*k,4*k-1)) = _cread(Slice(0,k-1),Slice(0,k-1),Slice(2*kread,2*kread+2*k-1));\n            kcur = k;\n        }\n\n        *c = _c;\n        return true;\n    }\n\n    /// Return +1 if i is even, -1 if i is odd ... perverse no if-test form\n    static inline int parity(int i) {\n        return 1 - ((i&1)<<1);\n    }\n\n    bool test_autoc() {\n        unsigned long correct = 9056188; // 0x638a9b;\n        unsigned long computed = checksum_file(autocorr_filename);\n        if (correct != computed)\n            cout << \"test_autoc: file checksum invalid: correct=\"\n                 << correct << \" computed=\" << computed << endl;\n\n        return (correct == computed);\n    }\n\n    static bool read_data(int k) {\n        if (!test_autoc()) return false;\n        kread = -1;\n        FILE *file = fopen(autocorr_filename,\"r\");\n        if (!file) {\n            cout << \"autoc: failed opening file with autocorrelation coefficients\" << endl;\n            return false;\n        }\n\n        _cread = Tensor<double>(k,k,4*k);\n\n        long twok = 2*k;\n        while (1) {\n            long i, j, p;\n            double val;\n            if (fscanf(file,\"%ld %ld %ld %lf\",&i,&j,&p,&val) != 4) {\n                cout<<\"autoc: failed reading file \" << endl;\n                fclose(file);\n                return false;\n            }\n            if (i >= k) break;\n            double ij = parity(i+j);\n            double ijp= parity(i+j+p);\n\n            _cread(i,j,p)      = val*ijp;\t// c-\n            _cread(j,i,p)      = val*ij*ijp;\n            _cread(i,j,p+twok) = val;\t// c+\n            _cread(j,i,p+twok) = val*ij;\n        }\n\n        fclose(file);\n        kread = k;\n        return true;\n    }\n\n    /// Collective routine to load and cache twoscale & autocorrelation coefficients\n\n    /// Only process rank 0 will access the files.\n    void load_coeffs(World& world, const char* dir) {\n        if (!loaded) {\n            int ktop = kmax_autoc;   // Plausible maximum value\n            if (world.rank() == 0) {\n                char buf[32768];\n                buf[0] = 0;\n                strcat(buf,dir);\n                strcat(buf,\"/\");\n                strcat(buf,twoscale_filename);\n                twoscale_filename = strdup(buf);\n\n                buf[0] = 0;\n                strcat(buf,dir);\n                strcat(buf,\"/\");\n                strcat(buf,autocorr_filename);\n                autocorr_filename = strdup(buf);\n\n                if (!read_twoscale(kmax))\n                    throw \"load_coeffs: failed reading twoscale coeffs\";\n\n                if (!read_data(ktop))\n                    throw \"load_coeffs: failed reading coeffs\";\n            }\n            else {\n                for (int k=1; k<=kmax; ++k) {\n                    cache[k].h0 = Tensor<double>(k,k);\n                    cache[k].h1 = Tensor<double>(k,k);\n                    cache[k].g0 = Tensor<double>(k,k);\n                    cache[k].g1 = Tensor<double>(k,k);\n                }\n                _cread = Tensor<double>(ktop,ktop,4*ktop);\n                kread = ktop;\n            }\n\n            for (int k=1; k<=kmax; ++k) {\n                world.gop.broadcast(cache[k].h0.ptr(), k*k, 0);\n                world.gop.broadcast(cache[k].h1.ptr(), k*k, 0);\n                world.gop.broadcast(cache[k].g0.ptr(), k*k, 0);\n                world.gop.broadcast(cache[k].g1.ptr(), k*k, 0);\n            }\n\n            world.gop.broadcast(_cread.ptr(), ktop*ktop*4*ktop, 0);\n\n            loaded = true;\n        }\n    }\n\n}\n\n\n\n"
  },
  {
    "path": "src/madness/mra/twoscale.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#ifndef MADNESS_MRA_TWOSCALE_H__INCLUDED\n#define MADNESS_MRA_TWOSCALE_H__INCLUDED\n\n#include <madness/madness_config.h>\n#include <madness/tensor/tensor.h>\n#include <madness/world/MADworld.h>\n\nnamespace madness {\n    extern void load_coeffs(World& world, const char* dir);\n    extern bool two_scale_coefficients(int k,\n                                           Tensor<double>* h0, Tensor<double>* h1,\n                                           Tensor<double>* g0, Tensor<double>* g1);\n    extern bool two_scale_hg(int k, Tensor<double>* hg);\n    extern bool test_two_scale_coefficients();\n\n    extern bool autoc(int k, Tensor<double>* c);\n    extern bool test_autoc();\n}\n\n#endif // MADNESS_MRA_TWOSCALE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/vmra.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_MRA_VMRA_H__INCLUDED\n#define MADNESS_MRA_VMRA_H__INCLUDED\n\n/*!\n\t\\file vmra.h\n\t\\brief Defines operations on vectors of Functions\n\t\\ingroup mra\n\n\tThis file defines a number of operations on vectors of functions.\n\tAssume v is a vector of NDIM-D functions of a certain type.\n\n\n\tOperations on array of functions\n\n\t*) copying: deep copying of vectors of functions to vector of functions\n\t\\code\n\tvector2 = copy(world, vector1,fence);\n\t\\endcode\n\n\t*) compress: convert multiwavelet representation to legendre representation\n\t\\code\n\tcompress(world, vector, fence);\n\t\\endcode\n\n\t*) reconstruct: convert representation to multiwavelets\n\t\\code\n\treconstruct(world, vector, fence);\n\t\\endcode\n\n\t*) make_nonstandard: convert to non-standard form\n\t\\code\n\tmake_nonstandard(world, v, fence);\n\t\\endcode\n\n\t*) standard: convert to standard form\n\t\\code\n\tstandard(world, v, fence);\n\t\\endcode\n\n\t*) truncate: truncating vectors of functions to desired precision\n\t\\code\n\ttruncate(world, v, tolerance, fence);\n\t\\endcode\n\n\n\t*) zero function: create a vector of zero functions of length n\n\t\\code\n\tv=zero(world, n);\n\t\\endcode\n\n\t*) transform: transform a representation from one basis to another\n\t\\code\n\ttransform(world, vector, tensor, tolerance, fence )\n\t\\endcode\n\n\tSetting thresh-hold for precision\n\n\t*) set_thresh: setting a finite thresh-hold for a vector of functions\n\t\\code\n\tvoid set_thresh(World& world, std::vector< Function<T,NDIM> >& v, double thresh, bool fence=true);\n\t\\endcode\n\n\tArithmetic Operations on arrays of functions\n\n\t*) conjugation: conjugate a vector of complex functions\n\n\t*) add\n\t*) sub\n\t*) mul\n\t   - mul_sparse\n\t*) square\n\t*) gaxpy\n\t*) apply\n\n\tNorms, inner-products, blas-1 like operations on vectors of functions\n\n\t*) inner\n\t*) matrix_inner\n\t*) norm_tree\n\t*) normalize\n\t*) norm2\n\t    - norm2s\n\t*) scale(world, v, alpha);\n\n\n\n\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/mra/derivative.h>\n#include <madness/tensor/distributed_matrix.h>\n#include <cstdio>\n\nnamespace madness {\n\n\n    /// get tree state of a vector of functions\n\n    /// @return TreeState::unknown if the vector is empty or if the functions have different tree states\n    template <typename T, std::size_t NDIM>\n    TreeState get_tree_state(const std::vector<Function<T,NDIM>>& v) {\n        if (v.size()==0) return TreeState::unknown;\n        // return unknown if any function is not initialized\n        if (std::any_of(v.begin(), v.end(), [](const Function<T,NDIM>& f) {return not f.is_initialized();})) {\n            return TreeState::unknown;\n        }\n        TreeState state=v[0].get_impl()->get_tree_state();\n        for (const auto& f : v) {\n            if (f.get_impl()->get_tree_state()!=state) state=TreeState::unknown;\n        }\n        return state;\n    }\n\n    /// Compress a vector of functions\n    template <typename T, std::size_t NDIM>\n    void compress(World& world,\n                  const std::vector< Function<T,NDIM> >& v,\n                  bool fence=true) {\n        PROFILE_BLOCK(Vcompress);\n        change_tree_state(v, TreeState::compressed, fence);\n    }\n\n\n    /// reconstruct a vector of functions\n\n    /// implies fence\n    /// return v for chaining\n    template <typename T, std::size_t NDIM>\n    const std::vector< Function<T,NDIM> >& reconstruct(const std::vector< Function<T,NDIM> >& v) {\n        return change_tree_state(v, TreeState::reconstructed, true);\n    }\n\n    /// compress a vector of functions\n\n    /// implies fence\n    /// return v for chaining\n    template <typename T, std::size_t NDIM>\n    const std::vector< Function<T,NDIM> >& compress(const std::vector< Function<T,NDIM> >& v) {\n        return change_tree_state(v, TreeState::compressed, true);\n    }\n\n    /// Reconstruct a vector of functions\n    template <typename T, std::size_t NDIM>\n    void reconstruct(World& world,\n                     const std::vector< Function<T,NDIM> >& v,\n                     bool fence=true) {\n        PROFILE_BLOCK(Vreconstruct);\n        change_tree_state(v, TreeState::reconstructed, fence);\n    }\n\n    /// change tree_state of a vector of functions to redundant\n    template <typename T, std::size_t NDIM>\n    void make_redundant(World& world,\n                  const std::vector< Function<T,NDIM> >& v,\n                  bool fence=true) {\n\n        PROFILE_BLOCK(Vcompress);\n        change_tree_state(v, TreeState::redundant, fence);\n    }\n\n    /// refine the functions according to the autorefine criteria\n    template <typename T, std::size_t NDIM>\n    void refine(World& world, const std::vector<Function<T,NDIM> >& vf,\n            bool fence=true) {\n        for (const auto& f : vf) f.refine(false);\n        if (fence) world.gop.fence();\n    }\n\n    /// refine all functions to a common (finest) level\n\n    /// if functions are not initialized (impl==NULL) they are ignored\n    template <typename T, std::size_t NDIM>\n    void refine_to_common_level(World& world, std::vector<Function<T,NDIM> >& vf,\n            bool fence=true) {\n\n        reconstruct(world,vf);\n        Key<NDIM> key0(0, Vector<Translation, NDIM> (0));\n        std::vector<FunctionImpl<T,NDIM>*> v_ptr;\n\n        // push initialized function pointers into the vector v_ptr\n        for (unsigned int i=0; i<vf.size(); ++i) {\n            if (vf[i].is_initialized()) v_ptr.push_back(vf[i].get_impl().get());\n        }\n\n        // sort and remove duplicates to not confuse the refining function\n        std::sort(v_ptr.begin(),v_ptr.end());\n        typename std::vector<FunctionImpl<T, NDIM>*>::iterator it;\n        it = std::unique(v_ptr.begin(), v_ptr.end());\n        v_ptr.resize( std::distance(v_ptr.begin(),it) );\n\n        std::vector< Tensor<T> > c(v_ptr.size());\n        v_ptr[0]->refine_to_common_level(v_ptr, c, key0);\n        if (fence) v_ptr[0]->world.gop.fence();\n        if (VERIFY_TREE)\n            for (unsigned int i=0; i<vf.size(); i++) vf[i].verify_tree();\n    }\n\n    /// Generates non-standard form of a vector of functions\n    template <typename T, std::size_t NDIM>\n    void make_nonstandard(World& world,\n                          std::vector< Function<T,NDIM> >& v,\n                          bool fence= true) {\n        PROFILE_BLOCK(Vnonstandard);\n        change_tree_state(v, TreeState::nonstandard, fence);\n    }\n\n\n    /// Generates standard form of a vector of functions\n    template <typename T, std::size_t NDIM>\n    void standard(World& world,\n                  std::vector< Function<T,NDIM> >& v,\n                  bool fence=true) {\n        PROFILE_BLOCK(Vstandard);\n        change_tree_state(v, TreeState::compressed, fence);\n    }\n\n\n    /// change tree state of the functions\n\n    /// might not respect fence\n    /// @return v   for chaining\n    template <typename T, std::size_t NDIM>\n    const std::vector<Function<T,NDIM>>& change_tree_state(const std::vector<Function<T,NDIM>>& v,\n                                                     const TreeState finalstate,\n                                                     const bool fence=true) {\n        // fast return\n        if (v.size()==0) return v;\n        if (get_tree_state(v)==finalstate) return v;\n\n        // find initialized function with world\n        Function<T,NDIM> dummy;\n        for (const auto& f : v)\n            if (f.is_initialized()) {\n                dummy=f;\n                break;\n            }\n        if (not dummy.is_initialized()) return v;\n        World& world=dummy.world();\n\n\n        // if a tree state cannot directly be changed to finalstate, we need to go via intermediate\n        auto change_initial_to_intermediate =[](const std::vector<Function<T,NDIM>>& v,\n                                                  const TreeState initialstate,\n                                                  const TreeState intermediatestate) {\n            int must_fence=0;\n            for (auto& f : v) {\n                if (f.is_initialized() and f.get_impl()->get_tree_state()==initialstate) {\n                    f.change_tree_state(intermediatestate,false);\n                    must_fence=1;\n                }\n            }\n            return must_fence;\n        };\n\n        int do_fence=0;\n        if (finalstate==compressed) {\n            do_fence+=change_initial_to_intermediate(v,redundant,TreeState::reconstructed);\n        }\n        if (finalstate==nonstandard) {\n            do_fence+=change_initial_to_intermediate(v,compressed,TreeState::reconstructed);\n            do_fence+=change_initial_to_intermediate(v,redundant,TreeState::reconstructed);\n        }\n        if (finalstate==nonstandard_with_leaves) {\n            do_fence+=change_initial_to_intermediate(v,compressed,TreeState::reconstructed);\n            do_fence+=change_initial_to_intermediate(v,nonstandard,TreeState::reconstructed);\n            do_fence+=change_initial_to_intermediate(v,redundant,TreeState::reconstructed);\n        }\n        if (finalstate==redundant) {\n            do_fence+=change_initial_to_intermediate(v,compressed,TreeState::reconstructed);\n            do_fence+=change_initial_to_intermediate(v,nonstandard,TreeState::reconstructed);\n            do_fence+=change_initial_to_intermediate(v,nonstandard_with_leaves,TreeState::reconstructed);\n        }\n        if (do_fence>0) world.gop.fence();\n\n        for (unsigned int i=0; i<v.size(); ++i) v[i].change_tree_state(finalstate,fence);\n        if (fence) world.gop.fence();\n\n        return v;\n    }\n\n    /// ensure v has the requested tree state, change the tree state of v if necessary and no fence is given\n    template<typename T, std::size_t NDIM>\n    bool ensure_tree_state_respecting_fence(const std::vector<Function<T,NDIM>>& v,\n        const TreeState state, bool fence) {\n        // fast return\n        if (get_tree_state(v)==state) return true;;\n\n        // if there is a fence we can simply change the tree state, might be a no-op\n        if (fence) change_tree_state(v,state,true);\n\n        // check success, throw if not\n        bool ok=get_tree_state(v)==state;\n        if (not ok) {\n            print(\"ensure_tree_state_respecting_fence failed\");\n            throw std::runtime_error(\"ensure_tree_state_respecting_fence failed\");\n        }\n        return ok;\n    }\n\n    /// Truncates a vector of functions\n    template <typename T, std::size_t NDIM>\n    void truncate(World& world,\n                  std::vector< Function<T,NDIM> >& v,\n                  double tol=0.0,\n                  bool fence=true) {\n        PROFILE_BLOCK(Vtruncate);\n\n        // truncate in compressed form only for low-dimensional functions\n        // compression is very expensive if low-rank tensor approximations are used\n        if (NDIM<4) compress(world, v);\n\n        for (auto& vv: v) {\n            vv.truncate(tol, false);\n        }\n\n        if (fence) world.gop.fence();\n    }\n\n    /// Truncates a vector of functions\n\n    /// @return the truncated vector for chaining\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> > truncate(std::vector< Function<T,NDIM> > v,\n                  double tol=0.0, bool fence=true) {\n        if (v.size()>0) truncate(v[0].world(),v,tol,fence);\n        return v;\n    }\n\n    /// reduces the tensor rank of the coefficient tensor (if applicable)\n\n    /// @return the vector for chaining\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> > reduce_rank(std::vector< Function<T,NDIM> > v,\n                  double thresh=0.0, bool fence=true) {\n    \tif (v.size()==0) return v;\n    \tfor (auto& vv : v) vv.reduce_rank(thresh,false);\n    \tif (fence) v[0].world().gop.fence();\n\t\treturn v;\n    }\n\n\n    /// Applies a derivative operator to a vector of functions\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> >\n    apply(World& world,\n          const Derivative<T,NDIM>& D,\n          const std::vector< Function<T,NDIM> >& v,\n          bool fence=true)\n    {\n        reconstruct(world, v);\n        std::vector< Function<T,NDIM> > df(v.size());\n        for (unsigned int i=0; i<v.size(); ++i) {\n            df[i] = D(v[i],false);\n        }\n        if (fence) world.gop.fence();\n        return df;\n    }\n\n    /// Generates a vector of zero functions with a given tree state\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> >\n    zero_functions_tree_state(World& world, int n, const TreeState state, bool fence=true) {\n        std::vector< Function<T,NDIM> > r(n);\n        for (int i=0; i<n; ++i) {\n            if (state==compressed)\n                r[i] = Function<T,NDIM>(FunctionFactory<T,NDIM>(world).fence(false).compressed(true).initial_level(1));\n            else if (state==reconstructed)\n                r[i] = Function<T,NDIM>(FunctionFactory<T,NDIM>(world).fence(false));\n            else {\n                print(\"zero_functions_tree_state: unknown tree state\");\n                throw std::runtime_error(\"zero_functions_tree_state: unknown tree state\");\n            }\n        }\n\n\t    if (n && fence) world.gop.fence();\n        return r;\n\n    }\n\n    /// Generates a vector of zero functions (reconstructed)\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> >\n    zero_functions(World& world, int n, bool fence=true) {\n        return zero_functions_tree_state<T,NDIM>(world,n,reconstructed,fence);\n    }\n\n    /// Generates a vector of zero functions (compressed)\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> >\n    zero_functions_compressed(World& world, int n, bool fence=true) {\n        return zero_functions_tree_state<T,NDIM>(world,n,compressed,fence);\n    }\n\n    /// Generates a vector of zero functions, either compressed or reconstructed, depending on tensor type\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> >\n    zero_functions_auto_tree_state(World& world, int n, bool fence=true) {\n        TreeState state=FunctionDefaults<NDIM>::get_tensor_type()==TT_FULL ? compressed : reconstructed;\n        return zero_functions_tree_state<T,NDIM>(world,n,state,fence);\n    }\n\n\n\n    /// orthonormalize the vectors\n    template<typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM>> orthonormalize(const std::vector<Function<T,NDIM> >& vf_in) {\n        if (vf_in.size()==0) return std::vector<Function<T,NDIM>>();\n        World& world=vf_in.front().world();\n        auto vf=copy(world,vf_in);\n        normalize(world,vf);\n        if (vf.size()==1) return copy(world,vf_in);\n        double maxq;\n        double trantol=0.0;\n        auto Q2=[](const Tensor<T>& s) {\n            Tensor<T> Q = -0.5*s;\n            for (int i=0; i<s.dim(0); ++i) Q(i,i) += 1.5;\n            return Q;\n        };\n\n        do {\n            Tensor<T> Q = Q2(matrix_inner(world, vf, vf));\n            maxq=0.0;\n            for (int i=0; i<Q.dim(0); ++i)\n                for (int j=0; j<i; ++j)\n                    maxq = std::max(maxq,std::abs(Q(i,j)));\n\n            vf = transform(world, vf, Q, trantol, true);\n            truncate(world, vf);\n\n        } while (maxq>0.01);\n        normalize(world,vf);\n        return vf;\n    }\n\n\n    /// symmetric orthonormalization (see e.g. Szabo/Ostlund)\n\n    /// @param[in] the vector to orthonormalize\n    /// @param[in] overlap matrix\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > orthonormalize_symmetric(\n    \t\tconst std::vector<Function<T,NDIM> >& v,\n\t\t\tconst Tensor<T>& ovlp,\n\t\t\tdouble lindep = 1e-12) {\n    \tif(v.empty()) return v;\n\n        World& world = v.front().world();\n        const size_t n = v.size();\n\n    \tTensor<T> U;\n    \tTensor< typename Tensor<T>::scalar_type > s;\n    \tsyev(ovlp, U, s);\n        lindep *= s(s.size() - 1);  // eigenvalues are in ascending order\n\n    \t// transform s to s^{-1/2} in-place\n        int rank = 0, nlindep = 0;\n    \tfor(size_t i = 0; i < n; ++i) {\n            const auto s_i = s(i);\n            s(i) = 1.0 / sqrt(s_i);\n            (s_i > lindep) ? rank++ : nlindep++;\n        }\n        MADNESS_ASSERT(size_t(nlindep + rank) == n);\n\n        // warn of linearly dependent vectors and values\n        if (nlindep > 0) {\n            if (world.rank() == 0)\n                print(\"WARNING: linear dependencies detected in \", nlindep,\n                      \" functions, rank = \", rank);\n        }\n\n    \t// save Ut before U gets modified with s^{-1/2}\n    \tconst Tensor<T> Ut = conj_transpose(U);\n\n    \tfor(size_t i = 0; i < n; ++i){\n    \t\tfor(size_t j = 0; j < n; ++j){\n    \t\t\tU(i, j) = U(i, j) * s(j);\n    \t\t}\n    \t}\n\n    \tTensor<T> X = inner(U, Ut, 1, 0);\n\n    \treturn transform(world, v, X);\n    }\n\n    /// convenience routine for symmetric orthonormalization (see e.g. Szabo/Ostlund)\n    /// overlap matrix is calculated\n    /// @param[in] the vector to orthonormalize\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > orthonormalize_symmetric(const std::vector<Function<T,NDIM> >& v,\n    \t\tdouble lindep = 1e-12){\n    \tif(v.empty()) return v;\n\n    \tTensor<T> ovlp = matrix_inner(v.front().world(), v, v, /* sym= */ true);\n\n    \treturn orthonormalize_symmetric(v, ovlp, lindep);\n    }\n\n    /// canonical orthonormalization (see e.g. Szabo/Ostlund)\n    /// @param[in] the vector to orthonormalize\n    /// @param[in] overlap matrix\n    /// @param[in]\tlindep\tlinear dependency threshold relative to largest eigenvalue\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > orthonormalize_canonical(\n    \t\tconst std::vector<Function<T,NDIM> >& v,\n\t\t\tconst Tensor<T>& ovlp,\n\t\t\tdouble lindep = 1e-12) {\n    \tif(v.empty()) return v;\n\n        World& world = v.front().world();\n        const size_t n = v.size();\n\n    \tTensor<T> U;\n    \tTensor< typename Tensor<T>::scalar_type > s;\n    \tsyev(ovlp, U, s);\n    \tlindep *= s(s.size() - 1);  // eigenvalues are in ascending order\n\n    \t// transform s to s^{-1/2} in-place\n    \tint rank = 0, nlindep = 0;\n    \tfor(size_t i = 0; i < n; ++i) {\n            const auto s_i = s(i);\n    \t\tif (s_i > lindep) {\n    \t\t\ts(i) = 1.0 / sqrt(s_i);\n        \t\trank++;\n    \t\t} else {\n    \t\t\tnlindep++;\n    \t\t}\n    \t}\n    \tMADNESS_ASSERT(size_t(nlindep + rank) == n);\n\n        // remove linearly dependent vectors and values\n        if (nlindep > 0) {\n            if (world.rank() == 0)\n                print(\"Linear dependencies detected: removed \", nlindep,\n                      \" functions, rank = \", rank);\n            U = U(_, Slice(nlindep, -1));\n            s = s(Slice(nlindep, -1));\n        }\n\n        // modify U in-place, U is now transformation matrix (U * s^{-1/2})\n    \tfor(size_t i = 0; i < n; ++i){\n    \t\tfor(size_t j = 0; j < rank; ++j){\n    \t\t\tU(i, j) = U(i, j) * s(j);\n    \t\t}\n    \t}\n\n    \treturn transform(world, v, U);\n    }\n\n    /// convenience routine for canonical routine for symmetric orthonormalization (see e.g. Szabo/Ostlund)\n    /// overlap matrix is calculated\n    /// @param[in] the vector to orthonormalize\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > orthonormalize_canonical(const std::vector<Function<T,NDIM> >& v,\n    \t\tdouble lindep = 1e-12){\n    \tif(v.empty()) return v;\n\n    \tTensor<T> ovlp = matrix_inner(v.front().world(), v, v, /* sym= */ true);\n\n    \treturn orthonormalize_canonical(v, ovlp, lindep);\n    }\n\n    /// cholesky orthonormalization without pivoting\n    /// @param[in] the vector to orthonormalize\n    /// @param[in] overlap matrix, destroyed on return!\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > orthonormalize_cd(\n    \t\tconst std::vector<Function<T,NDIM> >& v,\n\t\t\tTensor<T>& ovlp) {\n\n    \tif (v.empty()) return v;\n\n    \tcholesky(ovlp); // destroys ovlp and gives back Upper ∆ Matrix from CD\n\n    \tTensor<T> L = transpose(ovlp);\n    \tTensor<T> Linv = inverse(L);\n    \tTensor<T> U = transpose(Linv);\n\n    \tWorld& world=v.front().world();\n    \treturn transform(world, v, U);\n\n    }\n\n    /// convenience routine for cholesky orthonormalization without pivoting\n    /// @param[in] the vector to orthonormalize\n    /// @param[in] overlap matrix\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > orthonormalize_cd(const std::vector<Function<T,NDIM> >& v){\n    \tif(v.empty()) return v;\n\n    \tWorld& world=v.front().world();\n    \tTensor<T> ovlp = matrix_inner(world, v, v, /* sym= */ true);\n\n    \treturn orthonormalize_cd(v,ovlp);\n    }\n\n    /// @param[in] the vector to orthonormalize\n    /// @param[in] overlap matrix, will be destroyed on return!\n    /// @param[in] tolerance for numerical rank reduction\n    /// @param[out] pivoting vector, no allocation on input needed\n    /// @param[out] rank\n    /// @return orthonormalized vector (may or may not be truncated)\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > orthonormalize_rrcd(\n    \t\tconst std::vector<Function<T,NDIM> >& v,\n\t\t\tTensor<T>& ovlp,\n\t\t\tconst double tol,\n\t\t\tTensor<integer>& piv,\n\t\t\tint& rank) {\n\n    \tif (v.empty()) {\n    \t\treturn v;\n    \t}\n\n    \trr_cholesky(ovlp,tol,piv,rank); // destroys ovlp and gives back Upper ∆ Matrix from CCD\n\n    \t// rearrange and truncate the functions according to the pivoting of the rr_cholesky\n    \tstd::vector<Function<T,NDIM> > pv(rank);\n    \tfor(integer i=0;i<rank;++i){\n    \t\tpv[i]=v[piv[i]];\n    \t}\n    \tovlp=ovlp(Slice(0,rank-1),Slice(0,rank-1));\n\n    \tTensor<T> L = transpose(ovlp);\n    \tTensor<T> Linv = inverse(L);\n    \tTensor<T> U = transpose(Linv);\n\n    \tWorld& world=v.front().world();\n    \treturn transform(world, pv, U);\n    }\n\n    /// convenience routine for orthonormalize_cholesky: orthonormalize_cholesky without information on pivoting and rank\n    /// @param[in] the vector to orthonormalize\n    /// @param[in] overlap matrix\n    /// @param[in] tolerance for numerical rank reduction\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > orthonormalize_rrcd(const std::vector<Function<T,NDIM> >& v, Tensor<T> ovlp , const double tol) {\n    \tTensor<integer> piv;\n    \tint rank;\n    \treturn orthonormalize_rrcd(v,ovlp,tol,piv,rank);\n    }\n\n    /// convenience routine for orthonormalize_cholesky: computes the overlap matrix and then calls orthonormalize_cholesky\n    /// @param[in] the vector to orthonormalize\n    /// @param[in] tolerance for numerical rank reduction\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > orthonormalize_rrcd(const std::vector<Function<T,NDIM> >& v, const double tol) {\n    \tif (v.empty()) {\n    \t\treturn v;\n    \t}\n    \t// compute overlap\n    \tWorld& world=v.front().world();\n    \tTensor<T> ovlp = matrix_inner(world, v, v, /* sym= */ true);\n    \treturn orthonormalize_rrcd(v,ovlp,tol);\n    }\n\n    /// combine two vectors\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > append(const std::vector<Function<T,NDIM> > & lhs, const std::vector<Function<T,NDIM> > & rhs){\n    \tstd::vector<Function<T,NDIM> >  v=lhs;\n    \tfor (std::size_t i = 0; i < rhs.size(); ++i) v.push_back(rhs[i]);\n    \treturn v;\n    }\n\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > flatten(const std::vector< std::vector<Function<T,NDIM> > >& vv){\n    \tstd::vector<Function<T,NDIM> >result;\n    \tfor(const auto& x:vv) result=append(result,x);\n    \treturn result;\n    }\n\n    template<typename T, std::size_t NDIM>\n    std::vector<std::shared_ptr<FunctionImpl<T,NDIM>>> get_impl(const std::vector<Function<T,NDIM>>& v) {\n        std::vector<std::shared_ptr<FunctionImpl<T,NDIM>>> result;\n        for (auto& f : v) result.push_back(f.get_impl());\n        return result;\n    }\n\n    template<typename T, std::size_t NDIM>\n    void set_impl(std::vector<Function<T,NDIM>>& v, const std::vector<std::shared_ptr<FunctionImpl<T,NDIM>>> vimpl) {\n        MADNESS_CHECK(vimpl.size()==v.size());\n        for (std::size_t i=0; i<vimpl.size(); ++i) v[i].set_impl(vimpl[i]);\n    }\n\n    template<typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM>> impl2function(const std::vector<std::shared_ptr<FunctionImpl<T,NDIM>>> vimpl) {\n        std::vector<Function<T,NDIM>> v(vimpl.size());\n        for (std::size_t i=0; i<vimpl.size(); ++i) v[i].set_impl(vimpl[i]);\n        return v;\n    }\n\n\n    /// Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i]\n\n    /// Uses sparsity in the transformation matrix --- set small elements to\n    /// zero to take advantage of this.\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> >\n    transform(World& world,\n              const std::vector< Function<T,NDIM> >& v,\n              const Tensor<R>& c,\n              bool fence=true) {\n\n        PROFILE_BLOCK(Vtransformsp);\n        typedef TENSOR_RESULT_TYPE(T,R) resultT;\n        int n = v.size();  // n is the old dimension\n        int m = c.dim(1);  // m is the new dimension\n        MADNESS_CHECK(n==c.dim(0));\n\n        std::vector< Function<resultT,NDIM> > vc = zero_functions_compressed<resultT,NDIM>(world, m);\n        compress(world, v);\n\n        for (int i=0; i<m; ++i) {\n            for (int j=0; j<n; ++j) {\n                if (c(j,i) != R(0.0)) vc[i].gaxpy(resultT(1.0),v[j],resultT(c(j,i)),false);\n            }\n        }\n\n        if (fence) world.gop.fence();\n        return vc;\n    }\n\n    /// Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i]\n\n    /// all trees are in reconstructed state, final trees have to be summed down if no fence is present\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> >\n    transform_reconstructed(World& world,\n              const std::vector< Function<T,NDIM> >& v,\n              const Tensor<R>& c,\n              bool fence=true) {\n\n        PROFILE_BLOCK(Vtransformsp);\n        typedef TENSOR_RESULT_TYPE(T,R) resultT;\n        int n = v.size();  // n is the old dimension\n        int m = c.dim(1);  // m is the new dimension\n        MADNESS_CHECK(n==c.dim(0));\n\n        // if we fence set the right tree state here, otherwise it has to be correct from the start.\n        if (fence) change_tree_state(v,reconstructed);\n        for (const auto& vv : v) MADNESS_CHECK_THROW(\n            vv.get_impl()->get_tree_state()==reconstructed,\"trees have to be reconstructed in transform_reconstructed\");\n\n        std::vector< Function<resultT,NDIM> > result = zero_functions<resultT,NDIM>(world, m);\n\n        for (int i=0; i<m; ++i) {\n            result[i].get_impl()->set_tree_state(redundant_after_merge);\n            for (int j=0; j<n; ++j) {\n                if (c(j,i) != R(0.0)) v[j].get_impl()->accumulate_trees(*(result[i].get_impl()),resultT(c(j,i)),true);\n            }\n        }\n\n        // if we fence we can as well finish the job here. Otherwise no harm done, as the tree state is well-defined.\n        if (fence) {\n            world.gop.fence();\n            // for (auto& r : vc) r.sum_down(false);\n            for (auto& r : result) r.get_impl()->finalize_sum();\n            world.gop.fence();\n        }\n        return result;\n    }\n\n    /// this version of transform uses Function::vtransform and screens\n    /// using both elements of `c` and `v`\n    template <typename L, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(L,R),NDIM> >\n    transform(World& world,  const std::vector< Function<L,NDIM> >& v,\n            const Tensor<R>& c, double tol, bool fence=true) {\n        PROFILE_BLOCK(Vtransform);\n        MADNESS_ASSERT(v.size() == (unsigned int)(c.dim(0)));\n\n        std::vector< Function<TENSOR_RESULT_TYPE(L,R),NDIM> > vresult\n            = zero_functions_compressed<TENSOR_RESULT_TYPE(L,R),NDIM>(world, c.dim(1));\n\n        compress(world, v, true);\n        vresult[0].vtransform(v, c, vresult, tol, fence);\n        return vresult;\n    }\n\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> >\n    transform(World& world,\n              const std::vector< Function<T,NDIM> >& v,\n              const DistributedMatrix<R>& c,\n              bool fence=true) {\n        PROFILE_FUNC;\n\n        typedef TENSOR_RESULT_TYPE(T,R) resultT;\n        long n = v.size();    // n is the old dimension\n        long m = c.rowdim();  // m is the new dimension\n        MADNESS_ASSERT(n==c.coldim());\n\n        // new(i) = sum(j) old(j) c(j,i)\n\n        Tensor<T> tmp(n,m);\n        c.copy_to_replicated(tmp); // for debugging\n        tmp = transpose(tmp);\n\n        std::vector< Function<resultT,NDIM> > vc = zero_functions_compressed<resultT,NDIM>(world, m);\n        compress(world, v);\n\n        for (int i=0; i<m; ++i) {\n            for (int j=0; j<n; ++j) {\n                if (tmp(j,i) != R(0.0)) vc[i].gaxpy(1.0,v[j],tmp(j,i),false);\n            }\n        }\n\n        if (fence) world.gop.fence();\n        return vc;\n    }\n\n\n    /// Scales inplace a vector of functions by distinct values\n    template <typename T, typename Q, std::size_t NDIM>\n    void scale(World& world,\n               std::vector< Function<T,NDIM> >& v,\n               const std::vector<Q>& factors,\n               bool fence=true) {\n        PROFILE_BLOCK(Vscale);\n        for (unsigned int i=0; i<v.size(); ++i) v[i].scale(factors[i],false);\n        if (fence) world.gop.fence();\n    }\n\n    /// Scales inplace a vector of functions by the same\n    template <typename T, typename Q, std::size_t NDIM>\n    void scale(World& world,\n               std::vector< Function<T,NDIM> >& v,\n\t       const Q factor,\n               bool fence=true) {\n        PROFILE_BLOCK(Vscale);\n        for (unsigned int i=0; i<v.size(); ++i) v[i].scale(factor,false);\n        if (fence) world.gop.fence();\n    }\n\n    /// Computes the 2-norms of a vector of functions\n    template <typename T, std::size_t NDIM>\n    std::vector<double> norm2s(World& world,\n                              const std::vector< Function<T,NDIM> >& v) {\n        PROFILE_BLOCK(Vnorm2);\n        std::vector<double> norms(v.size());\n        if (not (get_tree_state(v)==compressed or get_tree_state(v)==reconstructed)) reconstruct(world,v);\n        for (unsigned int i=0; i<v.size(); ++i) norms[i] = v[i].norm2sq_local();\n        world.gop.sum(&norms[0], norms.size());\n        for (unsigned int i=0; i<v.size(); ++i) norms[i] = sqrt(norms[i]);\n        world.gop.fence();\n        return norms;\n    }\n    /// Computes the 2-norms of a vector of functions\n    template <typename T, std::size_t NDIM>\n    Tensor<double> norm2s_T(World& world, const std::vector<Function<T, NDIM>>& v) {\n        PROFILE_BLOCK(Vnorm2);\n        Tensor<double> norms(v.size());\n        if (not (get_tree_state(v)==compressed or get_tree_state(v)==reconstructed)) reconstruct(world,v);\n        for (unsigned int i = 0; i < v.size(); ++i) norms[i] = v[i].norm2sq_local();\n        world.gop.sum(&norms[0], norms.size());\n        for (unsigned int i = 0; i < v.size(); ++i) norms[i] = sqrt(norms[i]);\n        world.gop.fence();\n        return norms;\n    }\n\n    /// Computes the 2-norm of a vector of functions\n    template <typename T, std::size_t NDIM>\n    double norm2(World& world,const std::vector< Function<T,NDIM> >& v) {\n        PROFILE_BLOCK(Vnorm2);\n        if (v.size()==0) return 0.0;\n        if (not (get_tree_state(v)==compressed or get_tree_state(v)==reconstructed)) reconstruct(world,v);\n        std::vector<double> norms(v.size());\n        for (unsigned int i=0; i<v.size(); ++i) norms[i] = v[i].norm2sq_local();\n        world.gop.sum(&norms[0], norms.size());\n        for (unsigned int i=1; i<v.size(); ++i) norms[0] += norms[i];\n        world.gop.fence();\n        return sqrt(norms[0]);\n    }\n\n    inline double conj(double x) {\n        return x;\n    }\n\n    inline double conj(float x) {\n        return x;\n    }\n\n// !!! FIXME: this task is broken because FunctionImpl::inner_local forces a\n// future on return from WorldTaskQueue::reduce, which will causes a deadlock if\n// run inside a task. This behavior must be changed before this task can be used\n// again.\n//\n//    template <typename T, typename R, std::size_t NDIM>\n//    struct MatrixInnerTask : public TaskInterface {\n//        Tensor<TENSOR_RESULT_TYPE(T,R)> result; // Must be a copy\n//        const Function<T,NDIM>& f;\n//        const std::vector< Function<R,NDIM> >& g;\n//        long jtop;\n//\n//        MatrixInnerTask(const Tensor<TENSOR_RESULT_TYPE(T,R)>& result,\n//                        const Function<T,NDIM>& f,\n//                        const std::vector< Function<R,NDIM> >& g,\n//                        long jtop)\n//                : result(result), f(f), g(g), jtop(jtop) {}\n//\n//        void run(World& world) {\n//            for (long j=0; j<jtop; ++j) {\n//                result(j) = f.inner_local(g[j]);\n//            }\n//        }\n//\n//    private:\n//        /// Get the task id\n//\n//        /// \\param id The id to set for this task\n//        virtual void get_id(std::pair<void*,unsigned short>& id) const {\n//            PoolTaskInterface::make_id(id, *this);\n//        }\n//    }; // struct MatrixInnerTask\n\n\n\n    template <typename T, std::size_t NDIM>\n    DistributedMatrix<T> matrix_inner(const DistributedMatrixDistribution& d,\n                                      const std::vector< Function<T,NDIM> >& f,\n                                      const std::vector< Function<T,NDIM> >& g,\n                                      bool sym=false)\n    {\n        PROFILE_FUNC;\n        DistributedMatrix<T> A(d);\n        const int64_t n = A.coldim();\n        const int64_t m = A.rowdim();\n        MADNESS_ASSERT(int64_t(f.size()) == n && int64_t(g.size()) == m);\n\n        // Assume we can always create an ichunk*jchunk matrix locally\n        const int ichunk = 1000;\n        const int jchunk = 1000; // 1000*1000*8 = 8 MBytes\n        for (int64_t ilo=0; ilo<n; ilo+=ichunk) {\n            int64_t ihi = std::min(ilo + ichunk, n);\n            std::vector< Function<T,NDIM> > ivec(f.begin()+ilo, f.begin()+ihi);\n            for (int64_t jlo=0; jlo<m; jlo+=jchunk) {\n                int64_t jhi = std::min(jlo + jchunk, m);\n                std::vector< Function<T,NDIM> > jvec(g.begin()+jlo, g.begin()+jhi);\n\n                Tensor<T> P = matrix_inner(A.get_world(), ivec, jvec);\n                A.copy_from_replicated_patch(ilo, ihi - 1, jlo, jhi - 1, P);\n            }\n        }\n        return A;\n    }\n\n    /// Computes the matrix inner product of two function vectors - q(i,j) = inner(f[i],g[j])\n\n    /// For complex types symmetric is interpreted as Hermitian.\n\n    /// The current parallel loop is non-optimal but functional.\n    template <typename T, typename R, std::size_t NDIM>\n    Tensor< TENSOR_RESULT_TYPE(T,R) > matrix_inner(World& world,\n                                                   const std::vector< Function<T,NDIM> >& f,\n                                                   const std::vector< Function<R,NDIM> >& g,\n                                                   bool sym=false)\n    {\n        world.gop.fence();\n        auto tensor_type = [](const std::vector<Function<T,NDIM>>& v) {\n            return v.front().get_impl()->get_tensor_type();\n        };\n        TreeState operating_state=tensor_type(f)==TT_FULL ? compressed : redundant;\n        ensure_tree_state_respecting_fence(f,operating_state,true);\n        ensure_tree_state_respecting_fence(g,operating_state,true);\n\n        std::vector<const FunctionImpl<T,NDIM>*> left(f.size());\n        std::vector<const FunctionImpl<R,NDIM>*> right(g.size());\n        for (unsigned int i=0; i<f.size(); i++) left[i] = f[i].get_impl().get();\n        for (unsigned int i=0; i<g.size(); i++) right[i]= g[i].get_impl().get();\n\n        Tensor< TENSOR_RESULT_TYPE(T,R) > r= FunctionImpl<T,NDIM>::inner_local(left, right, sym);\n\n        world.gop.fence();\n        world.gop.sum(r.ptr(),f.size()*g.size());\n\n        return r;\n    }\n\n    /// Computes the matrix inner product of two function vectors - q(i,j) = inner(f[i],g[j])\n\n    /// For complex types symmetric is interpreted as Hermitian.\n    ///\n    /// The current parallel loop is non-optimal but functional.\n    template <typename T, typename R, std::size_t NDIM>\n    Tensor< TENSOR_RESULT_TYPE(T,R) > matrix_inner_old(World& world,\n            const std::vector< Function<T,NDIM> >& f,\n            const std::vector< Function<R,NDIM> >& g,\n            bool sym=false) {\n        PROFILE_BLOCK(Vmatrix_inner);\n        long n=f.size(), m=g.size();\n        Tensor< TENSOR_RESULT_TYPE(T,R) > r(n,m);\n        if (sym) MADNESS_ASSERT(n==m);\n\n        world.gop.fence();\n        compress(world, f);\n        if ((void*)(&f) != (void*)(&g)) compress(world, g);\n\n        for (long i=0; i<n; ++i) {\n            long jtop = m;\n            if (sym) jtop = i+1;\n            for (long j=0; j<jtop; ++j) {\n                r(i,j) = f[i].inner_local(g[j]);\n                if (sym) r(j,i) = conj(r(i,j));\n            }\n         }\n\n//        for (long i=n-1; i>=0; --i) {\n//            long jtop = m;\n//            if (sym) jtop = i+1;\n//            world.taskq.add(new MatrixInnerTask<T,R,NDIM>(r(i,_), f[i], g, jtop));\n//        }\n        world.gop.fence();\n        world.gop.sum(r.ptr(),n*m);\n\n//        if (sym) {\n//            for (int i=0; i<n; ++i) {\n//                for (int j=0; j<i; ++j) {\n//                    r(j,i) = conj(r(i,j));\n//                }\n//            }\n//        }\n        return r;\n    }\n\n    /// Computes the element-wise inner product of two function vectors - q(i) = inner(f[i],g[i])\n\n    /// works in reconstructed or compressed state, state is chosen based on TensorType\n    template <typename T, typename R, std::size_t NDIM>\n    Tensor< TENSOR_RESULT_TYPE(T,R) > inner(World& world,\n                                            const std::vector< Function<T,NDIM> >& f,\n                                            const std::vector< Function<R,NDIM> >& g) {\n        PROFILE_BLOCK(Vinnervv);\n        long n=f.size(), m=g.size();\n        MADNESS_CHECK(n==m);\n        Tensor< TENSOR_RESULT_TYPE(T,R) > r(n);\n\n        auto tensor_type = [](const std::vector<Function<T,NDIM>>& v) {\n            return v.front().get_impl()->get_tensor_type();\n        };\n        TreeState operating_state=tensor_type(f)==TT_FULL ? compressed : redundant;\n        ensure_tree_state_respecting_fence(f,operating_state,true);\n        ensure_tree_state_respecting_fence(g,operating_state,true);\n\n        for (long i=0; i<n; ++i) r(i) = f[i].inner_local(g[i]);\n\n        world.taskq.fence();\n        world.gop.sum(r.ptr(),n);\n        world.gop.fence();\n        return r;\n    }\n\n\n    /// Computes the inner product of a function with a function vector - q(i) = inner(f,g[i])\n\n    /// works in reconstructed or compressed state, state is chosen based on TensorType\n    template <typename T, typename R, std::size_t NDIM>\n    Tensor< TENSOR_RESULT_TYPE(T,R) > inner(World& world,\n                                            const Function<T,NDIM>& f,\n                                            const std::vector< Function<R,NDIM> >& g) {\n        PROFILE_BLOCK(Vinner);\n        long n=g.size();\n        Tensor< TENSOR_RESULT_TYPE(T,R) > r(n);\n\n        auto tensor_type = [](const std::vector<Function<T,NDIM>>& v) {\n            return v.front().get_impl()->get_tensor_type();\n        };\n        TreeState operating_state=tensor_type(g)==TT_FULL ? compressed : redundant;\n        f.change_tree_state(operating_state,false);\n        ensure_tree_state_respecting_fence(g,operating_state,true);\n        world.gop.fence();\n\n        for (long i=0; i<n; ++i) {\n            r(i) = f.inner_local(g[i]);\n        }\n\n        world.taskq.fence();\n        world.gop.sum(r.ptr(),n);\n        world.gop.fence();\n        return r;\n    }\n\n    /// inner function with right signature for the nonlinear solver\n    /// this is needed for the KAIN solvers and other functions\n    template <typename T, typename R, std::size_t NDIM>\n    TENSOR_RESULT_TYPE(T,R) inner( const std::vector< Function<T,NDIM> >& f,\n\t                                            const std::vector< Function<R,NDIM> >& g){\n      MADNESS_ASSERT(f.size()==g.size());\n      if(f.empty()) return 0.0;\n      else return inner(f[0].world(),f,g).sum();\n    }\n\n\n    /// Multiplies a function against a vector of functions --- q[i] = a * v[i]\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n    mul(World& world,\n        const Function<T,NDIM>& a,\n        const std::vector< Function<R,NDIM> >& v,\n        bool fence=true) {\n        PROFILE_BLOCK(Vmul);\n        a.reconstruct(false);\n        reconstruct(world, v, false);\n        world.gop.fence();\n        return vmulXX(a, v, 0.0, fence);\n    }\n\n    /// Multiplies a function against a vector of functions using sparsity of a and v[i] --- q[i] = a * v[i]\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n    mul_sparse(World& world,\n               const Function<T,NDIM>& a,\n               const std::vector< Function<R,NDIM> >& v,\n               double tol,\n               bool fence=true) {\n        PROFILE_BLOCK(Vmulsp);\n        a.reconstruct(false);\n        reconstruct(world, v, false);\n        world.gop.fence();\n        for (unsigned int i=0; i<v.size(); ++i) {\n            v[i].norm_tree(false);\n        }\n        a.norm_tree();\n        return vmulXX(a, v, tol, fence);\n    }\n\n\n    /// Outer product of a vector of functions with a vector of functions using sparsity\n\n    /// \\tparam T       type parameter for first factor\n    /// \\tparam R       type parameter for second factor\n    /// \\tparam NDIM    dimension of first and second factors\n    /// \\param world    the world\n    /// \\param f        first vector of functions\n    /// \\param g        second vector of functions\n    /// \\param tol      threshold for multiplication\n    /// \\param fence    force fence (will always fence if necessary)\n    /// \\param symm     if true, only compute f(i) * g(j) for j<=i\n    /// \\return         fg(i,j) = f(i) * g(j), as a vector of vectors\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector<std::vector<Function<TENSOR_RESULT_TYPE(T, R), NDIM> > >\n    matrix_mul_sparse(World &world,\n                      const std::vector<Function<R, NDIM> > &f,\n                      const std::vector<Function<R, NDIM> > &g,\n                      double tol,\n                      bool fence = true,\n                      bool symm = false) {\n        PROFILE_BLOCK(Vmulsp);\n        bool same=(&f == &g);\n        reconstruct(world, f, false);\n        if (not same) reconstruct(world, g, false);\n        world.gop.fence();\n        for (auto& ff : f) ff.norm_tree(false);\n        if (not same) for (auto& gg : g) gg.norm_tree(false);\n        world.gop.fence();\n\n        std::vector<std::vector<Function<R,NDIM> > >result(f.size());\n        std::vector<Function<R,NDIM>> g_i;\n        for (int64_t i=f.size()-1; i>=0; --i) {\n          if (!symm)\n            result[i]= vmulXX(f[i], g, tol, false);\n          else {\n            if (g_i.empty()) g_i = g;\n            g_i.resize(i+1);  // this shrinks g_i down to single function for i=0\n            result[i]= vmulXX(f[i], g_i, tol, false);\n          }\n        }\n        if (fence) world.gop.fence();\n        return result;\n    }\n\n    /// Makes the norm tree for all functions in a vector\n    template <typename T, std::size_t NDIM>\n    void norm_tree(World& world,\n                   const std::vector< Function<T,NDIM> >& v,\n                   bool fence=true)\n    {\n        PROFILE_BLOCK(Vnorm_tree);\n        for (unsigned int i=0; i<v.size(); ++i) {\n            v[i].norm_tree(false);\n        }\n        if (fence) world.gop.fence();\n    }\n\n    /// Multiplies two vectors of functions q[i] = a[i] * b[i]\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n    mul(World& world,\n        const std::vector< Function<T,NDIM> >& a,\n        const std::vector< Function<R,NDIM> >& b,\n        bool fence=true) {\n        PROFILE_BLOCK(Vmulvv);\n        reconstruct(world, a, true);\n        reconstruct(world, b, true);\n//        if (&a != &b) reconstruct(world, b, true); // fails if type(a) != type(b)\n\n        std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > q(a.size());\n        for (unsigned int i=0; i<a.size(); ++i) {\n            q[i] = mul(a[i], b[i], false);\n        }\n        if (fence) world.gop.fence();\n        return q;\n    }\n\n\n    /// multiply a high-dimensional function with a low-dimensional function\n\n    /// @param[in]  f   NDIM function of NDIM dimensions\n    /// @param[in]  g   LDIM function of LDIM\n    /// @param[in]  v   dimension indices of f to multiply\n    /// @return     h[i](0,1,2,3) = f(0,1,2,3) * g[i](1,2,3) for v={1,2,3}\n    template<typename T, std::size_t NDIM, std::size_t LDIM>\n    std::vector<Function<T,NDIM> > partial_mul(const Function<T,NDIM> f, const std::vector<Function<T,LDIM> > g,\n                                 const int particle) {\n\n        World& world=f.world();\n        std::vector<Function<T,NDIM> > result(g.size());\n        for (auto& r : result) r.set_impl(f, false);\n\n        FunctionImpl<T,NDIM>* fimpl=f.get_impl().get();\n//        fimpl->make_redundant(false);\n        fimpl->change_tree_state(redundant,false);\n        make_redundant(world,g,false);\n        world.gop.fence();\n\n        for (std::size_t i=0; i<result.size(); ++i) {\n            FunctionImpl<T,LDIM>* gimpl=g[i].get_impl().get();\n            result[i].get_impl()->multiply(fimpl,gimpl,particle);     // stupid naming inconsistency\n        }\n        world.gop.fence();\n\n        fimpl->undo_redundant(false);\n        for (auto& ig : g) ig.get_impl()->undo_redundant(false);\n        world.gop.fence();\n        return result;\n    }\n\n    template<typename T, std::size_t NDIM, std::size_t LDIM>\n    std::vector<Function<T,NDIM> > multiply(const Function<T,NDIM> f, const std::vector<Function<T,LDIM> > g,\n                              const std::tuple<int,int,int> v) {\n        return partial_mul<T,NDIM,LDIM>(f,g,std::array<int,3>({std::get<0>(v),std::get<1>(v),std::get<2>(v)}));\n    }\n\n\n/// Computes the square of a vector of functions --- q[i] = v[i]**2\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> >\n    square(World& world,\n           const std::vector< Function<T,NDIM> >& v,\n           bool fence=true) {\n        return mul<T,T,NDIM>(world, v, v, fence);\n//         std::vector< Function<T,NDIM> > vsq(v.size());\n//         for (unsigned int i=0; i<v.size(); ++i) {\n//             vsq[i] = square(v[i], false);\n//         }\n//         if (fence) world.gop.fence();\n//         return vsq;\n    }\n\n\n    /// Computes the square of a vector of functions --- q[i] = abs(v[i])**2\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<typename Tensor<T>::scalar_type,NDIM> >\n    abssq(World& world,\n           const std::vector< Function<T,NDIM> >& v,\n           bool fence=true) {\n    \ttypedef typename Tensor<T>::scalar_type scalartype;\n    \treconstruct(world,v);\n    \tstd::vector<Function<scalartype,NDIM> > result(v.size());\n    \tfor (size_t i=0; i<v.size(); ++i) result[i]=abs_square(v[i],false);\n    \tif (fence) world.gop.fence();\n        return result;\n    }\n\n\n    /// Sets the threshold in a vector of functions\n    template <typename T, std::size_t NDIM>\n    void set_thresh(World& world, std::vector< Function<T,NDIM> >& v, double thresh, bool fence=true) {\n        for (unsigned int j=0; j<v.size(); ++j) {\n            v[j].set_thresh(thresh,false);\n        }\n        if (fence) world.gop.fence();\n    }\n\n    /// Returns the complex conjugate of the vector of functions\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> >\n    conj(World& world,\n         const std::vector< Function<T,NDIM> >& v,\n         bool fence=true) {\n        PROFILE_BLOCK(Vconj);\n        std::vector< Function<T,NDIM> > r = copy(world, v); // Currently don't have oop conj\n        for (unsigned int i=0; i<v.size(); ++i) {\n            r[i].conj(false);\n        }\n        if (fence) world.gop.fence();\n        return r;\n    }\n\n    /// Returns a deep copy of a vector of functions\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector< Function<R,NDIM> > convert(World& world,\n    \t\tconst std::vector< Function<T,NDIM> >& v, bool fence=true) {\n        PROFILE_BLOCK(Vcopy);\n        std::vector< Function<R,NDIM> > r(v.size());\n        for (unsigned int i=0; i<v.size(); ++i) {\n            r[i] = convert<T,R,NDIM>(v[i], false);\n        }\n        if (fence) world.gop.fence();\n        return r;\n    }\n\n\n    /// Returns a deep copy of a vector of functions\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> >\n    copy(World& world,\n         const std::vector< Function<T,NDIM> >& v,\n         bool fence=true) {\n        PROFILE_BLOCK(Vcopy);\n        std::vector< Function<T,NDIM> > r(v.size());\n        for (unsigned int i=0; i<v.size(); ++i) {\n            r[i] = copy(v[i], false);\n        }\n        if (fence) world.gop.fence();\n        return r;\n    }\n\n\n    /// Returns a deep copy of a vector of functions\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> >\n    copy(const std::vector< Function<T,NDIM> >& v, bool fence=true) {\n        PROFILE_BLOCK(Vcopy);\n        std::vector< Function<T,NDIM> > r(v.size());\n        if (v.size()>0) r=copy(v.front().world(),v,fence);\n        return r;\n    }\n\n    /// Returns a vector of `n` deep copies of a function\n    template <typename T, std::size_t NDIM>\n    std::vector< Function<T,NDIM> >\n    copy_n(World& world,\n         const Function<T,NDIM>& v,\n         const unsigned int n,\n         bool fence=true) {\n        PROFILE_BLOCK(Vcopy1);\n        std::vector< Function<T,NDIM> > r(n);\n        for (unsigned int i=0; i<n; ++i) {\n            r[i] = copy(v, false);\n        }\n        if (fence) world.gop.fence();\n        return r;\n    }\n\n    /// Create a new copy of the function with different distribution and optional\n    /// fence\n\n    /// Works in either basis.  Different distributions imply\n    /// asynchronous communication and the optional fence is\n    /// collective.\n    //\n    /// Returns a deep copy of a vector of functions\n\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T, NDIM>> copy(World& world,\n                                        const std::vector<Function<T, NDIM>>& v,\n                                        const std::shared_ptr<WorldDCPmapInterface<Key<NDIM>>>& pmap,\n                                        bool fence = true) {\n      PROFILE_BLOCK(Vcopy);\n      std::vector<Function<T, NDIM>> r(v.size());\n      for (unsigned int i = 0; i < v.size(); ++i) {\n        r[i] = copy(v[i], pmap, false);\n      }\n      if (fence) world.gop.fence();\n      return r;\n    }\n\n    /// Returns new vector of functions --- q[i] = a[i] + b[i]\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n    add(World& world,\n        const std::vector< Function<T,NDIM> >& a,\n        const std::vector< Function<R,NDIM> >& b,\n        bool fence=true) {\n        PROFILE_BLOCK(Vadd);\n        MADNESS_ASSERT(a.size() == b.size());\n        compress(world, a);\n        compress(world, b);\n\n        std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > r(a.size());\n        for (unsigned int i=0; i<a.size(); ++i) {\n            r[i] = add(a[i], b[i], false);\n        }\n        if (fence) world.gop.fence();\n        return r;\n    }\n\n     /// Returns new vector of functions --- q[i] = a + b[i]\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n    add(World& world,\n        const Function<T,NDIM> & a,\n        const std::vector< Function<R,NDIM> >& b,\n        bool fence=true) {\n        PROFILE_BLOCK(Vadd1);\n        a.compress();\n        compress(world, b);\n\n        std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > r(b.size());\n        for (unsigned int i=0; i<b.size(); ++i) {\n            r[i] = add(a, b[i], false);\n        }\n        if (fence) world.gop.fence();\n        return r;\n    }\n    template <typename T, typename R, std::size_t NDIM>\n    inline std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n    add(World& world,\n        const std::vector< Function<R,NDIM> >& b,\n        const Function<T,NDIM> & a,\n        bool fence=true) {\n        return add(world, a, b, fence);\n    }\n\n    /// Returns new vector of functions --- q[i] = a[i] - b[i]\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n    sub(World& world,\n        const std::vector< Function<T,NDIM> >& a,\n        const std::vector< Function<R,NDIM> >& b,\n        bool fence=true) {\n        PROFILE_BLOCK(Vsub);\n        MADNESS_ASSERT(a.size() == b.size());\n        compress(world, a);\n        compress(world, b);\n\n        std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > r(a.size());\n        for (unsigned int i=0; i<a.size(); ++i) {\n            r[i] = sub(a[i], b[i], false);\n        }\n        if (fence) world.gop.fence();\n        return r;\n    }\n\n    /// Returns new function --- q = sum_i f[i]\n    template <typename T, std::size_t NDIM>\n    Function<T, NDIM> sum(World& world, const std::vector<Function<T,NDIM> >& f,\n        bool fence=true) {\n\n        compress(world, f);\n        Function<T,NDIM> r=FunctionFactory<T,NDIM>(world).compressed();\n\n        for (unsigned int i=0; i<f.size(); ++i) r.gaxpy(1.0,f[i],1.0,false);\n        if (fence) world.gop.fence();\n        return r;\n    }\n\n    template <typename T, std::size_t NDIM>\n    DistributedMatrix<T> matrix_dot(const DistributedMatrixDistribution& d,\n                                      const std::vector<Function<T, NDIM>>& f,\n                                      const std::vector<Function<T, NDIM>>& g,\n                                      bool sym=false)\n    {\n        PROFILE_FUNC;\n        DistributedMatrix<T> A(d);\n        const int64_t n = A.coldim();\n        const int64_t m = A.rowdim();\n        MADNESS_ASSERT(int64_t(f.size()) == n && int64_t(g.size()) == m);\n\n        // Assume we can always create an ichunk*jchunk matrix locally\n        const int ichunk = 1000;\n        const int jchunk = 1000; // 1000*1000*8 = 8 MBytes\n        for (int64_t ilo = 0; ilo < n; ilo += ichunk) {\n            int64_t ihi = std::min(ilo + ichunk, n);\n            std::vector<Function<T, NDIM>> ivec(f.begin() + ilo, f.begin() + ihi);\n            for (int64_t jlo = 0; jlo < m; jlo += jchunk) {\n                int64_t jhi = std::min(jlo + jchunk, m);\n                std::vector<Function<T, NDIM>> jvec(g.begin() + jlo, g.begin() + jhi);\n\n                Tensor<T> P = matrix_dot(A.get_world(), ivec, jvec, sym);\n                A.copy_from_replicated_patch(ilo, ihi - 1, jlo, jhi - 1, P);\n            }\n        }\n        return A;\n    }\n\n    /// Computes the matrix dot product of two function vectors - q(i,j) = dot(f[i],g[j])\n\n    /// For complex types symmetric is interpreted as Hermitian.\n    ///\n    /// The current parallel loop is non-optimal but functional.\n    template <typename T, typename R, std::size_t NDIM>\n    Tensor<TENSOR_RESULT_TYPE(T, R)> matrix_dot(World& world,\n                                                   const std::vector<Function<T, NDIM>>& f,\n                                                   const std::vector<Function<R, NDIM>>& g,\n                                                   bool sym=false)\n    {\n        world.gop.fence();\n        compress(world, f);\n        // if ((void*)(&f) != (void*)(&g)) compress(world, g);\n        compress(world, g);\n\n        std::vector<const FunctionImpl<T, NDIM>*> left(f.size());\n        std::vector<const FunctionImpl<R, NDIM>*> right(g.size());\n        for (unsigned int i = 0; i < f.size(); i++) left[i] = f[i].get_impl().get();\n        for (unsigned int i = 0; i < g.size(); i++) right[i] = g[i].get_impl().get();\n\n        Tensor<TENSOR_RESULT_TYPE(T, R)> r = FunctionImpl<T, NDIM>::dot_local(left, right, sym);\n\n        world.gop.fence();\n        world.gop.sum(r.ptr(), f.size() * g.size());\n\n        return r;\n    }\n\n    /// Computes the matrix dot product of two function vectors - q(i,j) = dot(f[i],g[j])\n\n    /// For complex types symmetric is interpreted as Hermitian.\n    ///\n    /// The current parallel loop is non-optimal but functional.\n    template <typename T, typename R, std::size_t NDIM>\n    Tensor< TENSOR_RESULT_TYPE(T,R) > matrix_dot_old(World& world,\n            const std::vector< Function<T,NDIM> >& f,\n            const std::vector< Function<R,NDIM> >& g,\n            bool sym=false) {\n        PROFILE_BLOCK(Vmatrix_dot);\n        long n=f.size(), m=g.size();\n        Tensor< TENSOR_RESULT_TYPE(T,R) > r(n,m);\n        if (sym) MADNESS_ASSERT(n==m);\n\n        world.gop.fence();\n        compress(world, f);\n        if ((void*)(&f) != (void*)(&g)) compress(world, g);\n\n        for (long i=0; i<n; ++i) {\n            long jtop = m;\n            if (sym) jtop = i+1;\n            for (long j=0; j<jtop; ++j) {\n                if (sym) {\n                    r(j,i) = f[i].dot_local(g[j]);\n                    if (i != j)\n                        r(i,j) = conj(r(j,i));\n                } else\n                    r(i,j) = f[i].dot_local(g[j]);\n            }\n         }\n\n        world.gop.fence();\n        world.gop.sum(r.ptr(),n*m);\n\n        return r;\n    }\n\n    /// Multiplies and sums two vectors of functions r = \\sum_i a[i] * b[i]\n    template <typename T, typename R, std::size_t NDIM>\n    Function<TENSOR_RESULT_TYPE(T,R), NDIM>\n    dot(World& world,\n        const std::vector< Function<T,NDIM> >& a,\n        const std::vector< Function<R,NDIM> >& b,\n        bool fence=true) {\n        MADNESS_CHECK(a.size()==b.size());\n        return sum(world,mul(world,a,b,true),fence);\n    }\n\n\n\n    /// out-of-place gaxpy for two vectors: result[i] = alpha * a[i] + beta * b[i]\n    template <typename T, typename Q, typename R, std::size_t NDIM>\n    std::vector<Function<TENSOR_RESULT_TYPE(Q,TENSOR_RESULT_TYPE(T,R)),NDIM> >\n    gaxpy_oop(Q alpha,\n               const std::vector< Function<T,NDIM> >& a,\n               Q beta,\n               const std::vector< Function<R,NDIM> >& b,\n               bool fence=true) {\n\n        MADNESS_ASSERT(a.size() == b.size());\n        typedef TENSOR_RESULT_TYPE(Q,TENSOR_RESULT_TYPE(T,R)) resultT;\n        if (a.size()==0) return std::vector<Function<resultT,NDIM> >();\n\n        auto tensor_type = [](const std::vector<Function<T,NDIM>>& v) {\n            return v.front().get_impl()->get_tensor_type();\n        };\n\n        // gaxpy can be done either in reconstructed or in compressed state\n        World& world=a[0].world();\n    \tstd::vector<Function<resultT,NDIM> > result(a.size());\n\n        TreeState operating_state=tensor_type(a)==TT_FULL ? compressed : reconstructed;\n        try {\n            ensure_tree_state_respecting_fence(a,operating_state,fence);\n            ensure_tree_state_respecting_fence(b,operating_state,fence);\n        } catch (...) {\n            print(\"could not respect fence in gaxpy\");\n            change_tree_state(a,operating_state,true);\n            change_tree_state(b,operating_state,true);\n        }\n\n        if (operating_state==compressed) {\n            for (unsigned int i=0; i<a.size(); ++i) result[i]=gaxpy_oop(alpha, a[i], beta, b[i], false);\n        } else {\n            for (unsigned int i=0; i<a.size(); ++i) result[i]=gaxpy_oop_reconstructed(alpha, a[i], beta, b[i], false);\n        }\n\n        if (fence) world.gop.fence();\n        return result;\n    }\n\n\n    /// out-of-place gaxpy for a vectors and a function: result[i] = alpha * a[i] + beta * b\n    template <typename T, typename Q, typename R, std::size_t NDIM>\n    std::vector<Function<TENSOR_RESULT_TYPE(Q,TENSOR_RESULT_TYPE(T,R)),NDIM> >\n    gaxpy_oop(Q alpha,\n               const std::vector< Function<T,NDIM> >& a,\n               Q beta,\n               const Function<R,NDIM>& b,\n               bool fence=true) {\n\n        typedef TENSOR_RESULT_TYPE(Q,TENSOR_RESULT_TYPE(T,R)) resultT;\n        if (a.size()==0) return std::vector<Function<resultT,NDIM> >();\n\n        World& world=a[0].world();\n        try {\n            ensure_tree_state_respecting_fence(a,compressed,fence);\n            // ensure_tree_state_respecting_fence({b},compressed,fence);\n            ensure_tree_state_respecting_fence(std::vector<Function<T,NDIM>>({b}),compressed,fence);\n        } catch (...) {\n            print(\"could not respect fence in gaxpy_oop\");\n            compress(world,a);\n        \tb.compress();\n        }\n    \tstd::vector<Function<resultT,NDIM> > result(a.size());\n        for (unsigned int i=0; i<a.size(); ++i) {\n            result[i]=gaxpy_oop(alpha, a[i], beta, b, false);\n        }\n        if (fence) world.gop.fence();\n        return result;\n    }\n\n\n    /// Generalized A*X+Y for vectors of functions ---- a[i] = alpha*a[i] + beta*b[i]\n    template <typename T, typename Q, typename R, std::size_t NDIM>\n\tvoid gaxpy(Q alpha, std::vector<Function<T,NDIM>>& a, Q beta, const std::vector<Function<R,NDIM>>& b, const bool fence) {\n\t    if (a.size() == 0) return;\n    \tWorld& world=a.front().world();\n    \tgaxpy(world,alpha,a,beta,b,fence);\n    }\n\n    /// Generalized A*X+Y for vectors of functions ---- a[i] = alpha*a[i] + beta*b[i]\n    template <typename T, typename Q, typename R, std::size_t NDIM>\n    void gaxpy(World& world,\n               Q alpha,\n               std::vector< Function<T,NDIM> >& a,\n               Q beta,\n               const std::vector< Function<R,NDIM> >& b,\n               bool fence=true) {\n        PROFILE_BLOCK(Vgaxpy);\n        MADNESS_ASSERT(a.size() == b.size());\n        if (a.empty()) return;\n\n        auto tensor_type = [](const std::vector<Function<T,NDIM>>& v) {\n            return v.front().get_impl()->get_tensor_type();\n        };\n\n        // gaxpy can be done either in reconstructed or in compressed state\n        bool do_in_reconstructed_state=tensor_type(a)!=TT_FULL;\n        TreeState operating_state=do_in_reconstructed_state ? reconstructed : compressed;\n\n        if (operating_state==compressed) {\n            // this is strict: both vectors have to be compressed\n            try {\n                ensure_tree_state_respecting_fence(a,operating_state,fence);\n                ensure_tree_state_respecting_fence(b,operating_state,fence);\n            } catch (...) {\n                print(\"could not respect fence in gaxpy\");\n                change_tree_state(a,operating_state,true);\n                change_tree_state(b,operating_state,true);\n            }\n            MADNESS_CHECK_THROW(get_tree_state(a)==get_tree_state(b),\"gaxpy requires same tree state for all functions\");\n            MADNESS_CHECK_THROW(get_tree_state(a)==operating_state,\"gaxpy requires reconstructed/compressed tree state for all functions\");\n        } else {\n            // both vectors can be reconstructed or redundant_after_merge, and they don't have to be the same\n            TreeState astate=get_tree_state(a);\n            TreeState bstate=get_tree_state(b);\n            if (not (astate==reconstructed or astate==redundant_after_merge)) {\n                try {\n                    ensure_tree_state_respecting_fence(a,operating_state,fence);\n                } catch (...) {\n                    print(\"could not respect fence in gaxpy for a\");\n                    change_tree_state(a,reconstructed,true);\n                }\n            }\n            if (not (bstate==reconstructed or bstate==redundant_after_merge)) {\n                try {\n                    ensure_tree_state_respecting_fence(b,operating_state,fence);\n                } catch (...) {\n                    print(\"could not respect fence in gaxpy for b\");\n                    change_tree_state(b,reconstructed,true);\n                }\n            }\n        }\n\n        // finally do the work\n        for (unsigned int i=0; i<a.size(); ++i) {\n            a[i].gaxpy(alpha, b[i], beta, false);\n        }\n        if (fence and (get_tree_state(a)==redundant_after_merge)) {\n            for (unsigned int i=0; i<a.size(); ++i) a[i].get_impl()->finalize_sum();\n        }\n\n        if (fence) world.gop.fence();\n    }\n\n\n    /// Applies a vector of operators to a vector of functions --- q[i] = apply(op[i],f[i])\n    template <typename opT, typename R, std::size_t NDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> >\n    apply(World& world,\n          const std::vector< std::shared_ptr<opT> >& op,\n          const std::vector< Function<R,NDIM> > f) {\n\n        PROFILE_BLOCK(Vapplyv);\n        MADNESS_ASSERT(f.size()==op.size());\n\n        std::vector< Function<R,NDIM> >& ncf = *const_cast< std::vector< Function<R,NDIM> >* >(&f);\n\n//        reconstruct(world, f);\n        make_nonstandard(world, ncf);\n\n        std::vector< Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> > result(f.size());\n        for (unsigned int i=0; i<f.size(); ++i) {\n            result[i] = apply_only(*op[i], f[i], false);\n            result[i].get_impl()->set_tree_state(nonstandard_after_apply);\n        }\n\n        world.gop.fence();\n\n        standard(world, ncf, false);  // restores promise of logical constness\n        reconstruct(result);\n        world.gop.fence();\n\n        return result;\n    }\n\n\n    /// Applies an operator to a vector of functions --- q[i] = apply(op,f[i])\n    template <typename T, typename R, std::size_t NDIM, std::size_t KDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n    apply(const SeparatedConvolution<T,KDIM>& op,\n          const std::vector< Function<R,NDIM> > f) {\n        return apply(op.get_world(),op,f);\n    }\n\n\n    /// Applies an operator to a vector of functions --- q[i] = apply(op,f[i])\n    template <typename T, typename R, std::size_t NDIM, std::size_t KDIM>\n    std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n    apply(World& world,\n          const SeparatedConvolution<T,KDIM>& op,\n          const std::vector< Function<R,NDIM> > f) {\n        PROFILE_BLOCK(Vapply);\n\n        std::vector< Function<R,NDIM> >& ncf = *const_cast< std::vector< Function<R,NDIM> >* >(&f);\n        bool print_timings=(NDIM==6) and (world.rank()==0) and op.print_timings;\n\n        double wall0=wall_time();\n//        reconstruct(world, f);\n        make_nonstandard(world, ncf);\n        double wall1=wall_time();\n        if (print_timings) printf(\"timer: %20.20s %8.2fs\\n\", \"make_nonstandard\", wall1-wall0);\n\n        std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > result(f.size());\n        for (unsigned int i=0; i<f.size(); ++i) {\n            result[i] = apply_only(op, f[i], false);\n        }\n\n        world.gop.fence();\n\n        // restores promise of logical constness\n        if (op.destructive()) {\n            for (auto& ff : ncf) ff.clear(false);\n            world.gop.fence();\n        } else {\n            reconstruct(world,f);\n        }\n\n        // svd-tensor requires some cleanup after apply\n        if (result[0].get_impl()->get_tensor_type()==TT_2D) {\n            for (auto& r : result) r.get_impl()->finalize_apply();\n        }\n\n        if (print_timings) {\n        \tfor (auto& r : result) r.get_impl()->print_timer();\n            op.print_timer();\n        }\n        reconstruct(world, result);\n\n        return result;\n    }\n\n    /// Normalizes a vector of functions --- v[i] = v[i].scale(1.0/v[i].norm2())\n    template <typename T, std::size_t NDIM>\n    void normalize(World& world, std::vector< Function<T,NDIM> >& v, bool fence=true) {\n        PROFILE_BLOCK(Vnormalize);\n        std::vector<double> nn = norm2s(world, v);\n        for (unsigned int i=0; i<v.size(); ++i) v[i].scale(1.0/nn[i],false);\n        if (fence) world.gop.fence();\n    }\n\n    template <typename T, std::size_t NDIM>\n    void print_size(World &world, const std::vector<Function<T,NDIM> > &v, const std::string &msg = \"vectorfunction\" ){\n    \tif(v.empty()){\n    \t\tif(world.rank()==0) std::cout << \"print_size: \" << msg << \" is empty\" << std::endl;\n    \t}else if(v.size()==1){\n    \t\tv.front().print_size(msg);\n    \t}else{\n    \t\tfor(auto x:v){\n    \t\t    // print(\"impl\",x.get_impl().get());\n    \t\t\tx.print_size(msg);\n    \t\t}\n    \t}\n    }\n\n    /// return the size of a vector of functions for each rank\n    template <typename T, std::size_t NDIM>\n    double get_size_local(World& world, const std::vector< Function<T,NDIM> >& v){\n    \tdouble size=0.0;\n    \tfor(auto x:v){\n    \t\tif (x.is_initialized()) size+=x.size_local();\n    \t}\n    \tconst double d=sizeof(T);\n        const double fac=1024*1024*1024;\n    \treturn size/fac*d;\n    }\n\n    /// return the size of a function for each rank\n    template <typename T, std::size_t NDIM>\n    double get_size_local(const Function<T,NDIM>& f){\n    \treturn get_size_local(f.world(),std::vector<Function<T,NDIM> >(1,f));\n    }\n\n\n    // gives back the size in GB\n    template <typename T, std::size_t NDIM>\n    double get_size(World& world, const std::vector< Function<T,NDIM> >& v){\n\n    \tif (v.empty()) return 0.0;\n\n    \tconst double d=sizeof(T);\n        const double fac=1024*1024*1024;\n\n        double size=0.0;\n        for(unsigned int i=0;i<v.size();i++){\n            if (v[i].is_initialized()) size+=v[i].size();\n        }\n\n        return size/fac*d;\n\n    }\n\n    // gives back the size in GB\n    template <typename T, std::size_t NDIM>\n    double get_size(const Function<T,NDIM> & f){\n    \tconst double d=sizeof(T);\n        const double fac=1024*1024*1024;\n        double size=f.size();\n        return size/fac*d;\n    }\n\n    /// apply op on the input vector yielding an output vector of functions\n\n    /// @param[in]  op   the operator working on vin\n    /// @param[in]  vin  vector of input Functions; needs to be refined to common level!\n    /// @return vector of output Functions vout = op(vin)\n    template <typename T, typename opT, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > multi_to_multi_op_values(const opT& op,\n            const std::vector< Function<T,NDIM> >& vin,\n            const bool fence=true) {\n        MADNESS_ASSERT(vin.size()>0);\n        MADNESS_ASSERT(vin[0].is_initialized()); // might be changed\n        World& world=vin[0].world();\n        Function<T,NDIM> dummy;\n        dummy.set_impl(vin[0], false);\n        std::vector<Function<T,NDIM> > vout=zero_functions<T,NDIM>(world, op.get_result_size());\n        for (auto& out : vout) out.set_impl(vin[0],false);\n        dummy.multi_to_multi_op_values(op, vin, vout, fence);\n        return vout;\n    }\n\n\n\n\n    // convenience operators\n\n    /// result[i] = a[i] + b[i]\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > operator+(const std::vector<Function<T,NDIM> >& lhs,\n            const std::vector<Function<T,NDIM>>& rhs) {\n        MADNESS_CHECK(lhs.size() == rhs.size());\n        return gaxpy_oop(1.0,lhs,1.0,rhs);\n    }\n\n    /// result[i] = a[i] - b[i]\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > operator-(const std::vector<Function<T,NDIM> >& lhs,\n            const std::vector<Function<T,NDIM> >& rhs) {\n        MADNESS_CHECK(lhs.size() == rhs.size());\n        return gaxpy_oop(1.0,lhs,-1.0,rhs);\n    }\n\n    /// result[i] = a[i] + b\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > operator+(const std::vector<Function<T,NDIM> >& lhs,\n            const Function<T,NDIM>& rhs) {\n        // MADNESS_CHECK(lhs.size() == rhs.size()); // no!!\n        return gaxpy_oop(1.0,lhs,1.0,rhs);\n    }\n\n    /// result[i] = a[i] - b\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > operator-(const std::vector<Function<T,NDIM> >& lhs,\n            const Function<T,NDIM>& rhs) {\n        // MADNESS_CHECK(lhs.size() == rhs.size());  // no\n        return gaxpy_oop(1.0,lhs,-1.0,rhs);\n    }\n\n    /// result[i] = a + b[i]\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > operator+(const Function<T,NDIM>& lhs,\n            const std::vector<Function<T,NDIM> >& rhs) {\n        // MADNESS_CHECK(lhs.size() == rhs.size());   // no\n        return gaxpy_oop(1.0,rhs,1.0,lhs);\n    }\n\n    /// result[i] = a - b[i]\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > operator-(const Function<T,NDIM>& lhs,\n            const std::vector<Function<T,NDIM> >& rhs) {\n//         MADNESS_CHECK(lhs.size() == rhs.size());  // no\n        return gaxpy_oop(-1.0,rhs,1.0,lhs);\n    }\n\n\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> > operator*(const R fac,\n            const std::vector<Function<T,NDIM> >& rhs) {\n    \tif (rhs.size()>0) {\n\t\t\tstd::vector<Function<T,NDIM> > tmp=copy(rhs[0].world(),rhs);\n\t\t\tscale(tmp[0].world(),tmp,TENSOR_RESULT_TYPE(T,R)(fac));\n\t\t\treturn tmp;\n    \t}\n\t\treturn std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> >();\n    }\n\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > operator*(const std::vector<Function<T,NDIM> >& rhs,\n            const R fac) {\n    \tif (rhs.size()>0) {\n            std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> > tmp=copy(rhs[0].world(),rhs);\n            scale(tmp[0].world(),tmp,TENSOR_RESULT_TYPE(T,R)(fac));\n            return tmp;\n    \t}\n\t\treturn std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> >();\n    }\n\n    /// multiply a vector of functions with a function: r[i] = v[i] * a\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> > operator*(const Function<T,NDIM>& a,\n            const std::vector<Function<R,NDIM> >& v) {\n        if (v.size()>0) return mul(v[0].world(),a,v,true);\n        return std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> >();\n    }\n\n\n    /// multiply a vector of functions with a function: r[i] = a * v[i]\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> > operator*(const std::vector<Function<T,NDIM> >& v,\n            const Function<R,NDIM>& a) {\n        if (v.size()>0) return mul(v[0].world(),a,v,true);\n        return std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> >();\n    }\n\n\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > operator+=(std::vector<Function<T,NDIM> >& lhs, const std::vector<Function<T,NDIM> >& rhs) {\n        MADNESS_CHECK(lhs.size() == rhs.size());\n        if (lhs.size() > 0) gaxpy(lhs.front().world(), 1.0, lhs, 1.0, rhs);\n\treturn lhs;\n    }\n\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > operator-=(std::vector<Function<T,NDIM> >& lhs,\n            const std::vector<Function<T,NDIM> >& rhs) {\n        MADNESS_CHECK(lhs.size() == rhs.size());\n        if (lhs.size() > 0) gaxpy(lhs.front().world(), 1.0, lhs, -1.0, rhs);\n\treturn lhs;\n    }\n\n    /// return the real parts of the vector's function (if complex)\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<typename Tensor<T>::scalar_type,NDIM> >\n    real(const std::vector<Function<T,NDIM> >& v, bool fence=true) {\n    \tstd::vector<Function<typename Tensor<T>::scalar_type,NDIM> > result(v.size());\n    \tfor (std::size_t i=0; i<v.size(); ++i) result[i]=real(v[i],false);\n        if (fence and result.size()>0) result[0].world().gop.fence();\n        return result;\n    }\n\n    /// return the imaginary parts of the vector's function (if complex)\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<typename Tensor<T>::scalar_type,NDIM> >\n    imag(const std::vector<Function<T,NDIM> >& v, bool fence=true) {\n    \tstd::vector<Function<typename Tensor<T>::scalar_type,NDIM> > result(v.size());\n    \tfor (std::size_t i=0; i<v.size(); ++i) result[i]=imag(v[i],false);\n        if (fence and result.size()>0) result[0].world().gop.fence();\n        return result;\n    }\n\n    /// shorthand gradient operator\n\n    /// returns the differentiated function f in all NDIM directions\n    /// @param[in]  f       the function on which the grad operator works on\n    /// @param[in]  refine  refinement before diff'ing makes the result more accurate\n    /// @param[in]  fence   fence after completion; if reconstruction is needed always fence\n    /// @return     the vector \\frac{\\partial}{\\partial x_i} f\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > grad(const Function<T,NDIM>& f,\n            bool refine=false, bool fence=true) {\n\n        World& world=f.world();\n        f.reconstruct();\n        if (refine) f.refine();      // refine to make result more precise\n\n        std::vector< std::shared_ptr< Derivative<T,NDIM> > > grad=\n                gradient_operator<T,NDIM>(world);\n\n        std::vector<Function<T,NDIM> > result(NDIM);\n        for (size_t i=0; i<NDIM; ++i) result[i]=apply(*(grad[i]),f,false);\n        if (fence) world.gop.fence();\n        return result;\n    }\n\n    // BLM first derivative\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > grad_ble_one(const Function<T,NDIM>& f,\n            bool refine=false, bool fence=true) {\n\n        World& world=f.world();\n        f.reconstruct();\n        if (refine) f.refine();      // refine to make result more precise\n\n        std::vector< std::shared_ptr< Derivative<T,NDIM> > > grad=\n                gradient_operator<T,NDIM>(world);\n\n        // Read in new coeff for each operator\n        for (unsigned int i=0; i<NDIM; ++i) (*grad[i]).set_ble1();\n\n        std::vector<Function<T,NDIM> > result(NDIM);\n        for (unsigned int i=0; i<NDIM; ++i) result[i]=apply(*(grad[i]),f,false);\n        if (fence) world.gop.fence();\n        return result;\n    }\n\n    // BLM second derivative\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > grad_ble_two(const Function<T,NDIM>& f,\n            bool refine=false, bool fence=true) {\n\n        World& world=f.world();\n        f.reconstruct();\n        if (refine) f.refine();      // refine to make result more precise\n\n        std::vector< std::shared_ptr< Derivative<T,NDIM> > > grad=\n                gradient_operator<T,NDIM>(world);\n\n        // Read in new coeff for each operator\n        for (unsigned int i=0; i<NDIM; ++i) (*grad[i]).set_ble2();\n\n        std::vector<Function<T,NDIM> > result(NDIM);\n        for (unsigned int i=0; i<NDIM; ++i) result[i]=apply(*(grad[i]),f,false);\n        if (fence) world.gop.fence();\n        return result;\n    }\n\n    // Bspline first derivative\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > grad_bspline_one(const Function<T,NDIM>& f,\n            bool refine=false, bool fence=true) {\n\n        World& world=f.world();\n        f.reconstruct();\n        if (refine) f.refine();      // refine to make result more precise\n\n        std::vector< std::shared_ptr< Derivative<T,NDIM> > > grad=\n                gradient_operator<T,NDIM>(world);\n\n        // Read in new coeff for each operator\n        for (unsigned int i=0; i<NDIM; ++i) (*grad[i]).set_bspline1();\n\n        std::vector<Function<T,NDIM> > result(NDIM);\n        for (unsigned int i=0; i<NDIM; ++i) result[i]=apply(*(grad[i]),f,false);\n        if (fence) world.gop.fence();\n        return result;\n    }\n\n    // Bpsline second derivative\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > grad_bpsline_two(const Function<T,NDIM>& f,\n            bool refine=false, bool fence=true) {\n\n        World& world=f.world();\n        f.reconstruct();\n        if (refine) f.refine();      // refine to make result more precise\n\n        std::vector< std::shared_ptr< Derivative<T,NDIM> > > grad=\n                gradient_operator<T,NDIM>(world);\n\n        // Read in new coeff for each operator\n        for (unsigned int i=0; i<NDIM; ++i) (*grad[i]).set_bspline2();\n\n        std::vector<Function<T,NDIM> > result(NDIM);\n        for (unsigned int i=0; i<NDIM; ++i) result[i]=apply(*(grad[i]),f,false);\n        if (fence) world.gop.fence();\n        return result;\n    }\n\n    // Bspline third derivative\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > grad_bspline_three(const Function<T,NDIM>& f,\n            bool refine=false, bool fence=true) {\n\n        World& world=f.world();\n        f.reconstruct();\n        if (refine) f.refine();      // refine to make result more precise\n\n        std::vector< std::shared_ptr< Derivative<T,NDIM> > > grad=\n                gradient_operator<T,NDIM>(world);\n\n        // Read in new coeff for each operator\n        for (unsigned int i=0; i<NDIM; ++i) (*grad[i]).set_bspline3();\n\n        std::vector<Function<T,NDIM> > result(NDIM);\n        for (unsigned int i=0; i<NDIM; ++i) result[i]=apply(*(grad[i]),f,false);\n        if (fence) world.gop.fence();\n        return result;\n    }\n\n\n\n    /// shorthand div operator\n\n    /// returns the dot product of nabla with a vector f\n    /// @param[in]  f       the vector of functions on which the div operator works on\n    /// @param[in]  refine  refinement before diff'ing makes the result more accurate\n    /// @param[in]  fence   fence after completion; currently always fences\n    /// @return     the vector \\frac{\\partial}{\\partial x_i} f\n    /// TODO: add this to operator fusion\n    template <typename T, std::size_t NDIM>\n    Function<T,NDIM> div(const std::vector<Function<T,NDIM> >& v,\n            bool do_refine=false, bool fence=true) {\n\n        MADNESS_ASSERT(v.size()>0);\n        World& world=v[0].world();\n        reconstruct(world,v);\n        if (do_refine) refine(world,v);      // refine to make result more precise\n\n        std::vector< std::shared_ptr< Derivative<T,NDIM> > > grad=\n                gradient_operator<T,NDIM>(world);\n\n        std::vector<Function<T,NDIM> > result(NDIM);\n        for (size_t i=0; i<NDIM; ++i) result[i]=apply(*(grad[i]),v[i],false);\n        world.gop.fence();\n        return sum(world,result,fence);\n    }\n\n    /// shorthand rot operator\n\n    /// returns the cross product of nabla with a vector f\n    /// @param[in]  f       the vector of functions on which the rot operator works on\n    /// @param[in]  refine  refinement before diff'ing makes the result more accurate\n    /// @param[in]  fence   fence after completion; currently always fences\n    /// @return     the vector \\frac{\\partial}{\\partial x_i} f\n    /// TODO: add this to operator fusion\n    template <typename T, std::size_t NDIM>\n    std::vector<Function<T,NDIM> > rot(const std::vector<Function<T,NDIM> >& v,\n            bool do_refine=false, bool fence=true) {\n\n        MADNESS_ASSERT(v.size()==3);\n        World& world=v[0].world();\n        reconstruct(world,v);\n        if (do_refine) refine(world,v);      // refine to make result more precise\n\n        std::vector< std::shared_ptr< Derivative<T,NDIM> > > grad=\n                gradient_operator<T,NDIM>(world);\n\n        std::vector<Function<T,NDIM> > d(NDIM),dd(NDIM);\n        d[0]=apply(*(grad[1]),v[2],false);\t// Dy z\n        d[1]=apply(*(grad[2]),v[0],false);\t// Dz x\n        d[2]=apply(*(grad[0]),v[1],false);\t// Dx y\n        dd[0]=apply(*(grad[2]),v[1],false);\t// Dz y\n        dd[1]=apply(*(grad[0]),v[2],false);\t// Dx z\n        dd[2]=apply(*(grad[1]),v[0],false);\t// Dy x\n        world.gop.fence();\n\n        compress(world,d,false);\n        compress(world,dd,false);\n        world.gop.fence();\n        d[0].gaxpy(1.0,dd[0],-1.0,false);\n        d[1].gaxpy(1.0,dd[1],-1.0,false);\n        d[2].gaxpy(1.0,dd[2],-1.0,false);\n\n        world.gop.fence();\n        reconstruct(d);\n        return d;\n    }\n\n    /// shorthand cross operator\n\n    /// returns the cross product of vectors f and g\n    /// @param[in]  f       the vector of functions on which the rot operator works on\n    /// @param[in]  g       the vector of functions on which the rot operator works on\n    /// @param[in]  fence   fence after completion; currently always fences\n    /// @return     the vector \\frac{\\partial}{\\partial x_i} f\n    /// TODO: add this to operator fusion\n    template <typename T, typename R, std::size_t NDIM>\n    std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> > cross(const std::vector<Function<T,NDIM> >& f,\n    \t\tconst std::vector<Function<R,NDIM> >& g,\n            bool do_refine=false, bool fence=true) {\n\n        MADNESS_ASSERT(f.size()==3);\n        MADNESS_ASSERT(g.size()==3);\n        World& world=f[0].world();\n        reconstruct(world,f,false);\n        reconstruct(world,g);\n\n        std::vector<Function<TENSOR_RESULT_TYPE(T,R),NDIM> > d(f.size()),dd(f.size());\n\n        d[0]=mul(f[1],g[2],false);\n        d[1]=mul(f[2],g[0],false);\n        d[2]=mul(f[0],g[1],false);\n\n        dd[0]=mul(f[2],g[1],false);\n        dd[1]=mul(f[0],g[2],false);\n        dd[2]=mul(f[1],g[0],false);\n        world.gop.fence();\n\n        compress(world,d,false);\n        compress(world,dd);\n\n        d[0].gaxpy(1.0,dd[0],-1.0,false);\n        d[1].gaxpy(1.0,dd[1],-1.0,false);\n        d[2].gaxpy(1.0,dd[2],-1.0,false);\n\n\n        world.gop.fence();\n        return d;\n    }\n\n    template<typename T, std::size_t NDIM>\n    void load_balance(World& world, std::vector<Function<T,NDIM> >& vf) {\n\n        struct LBCost {\n            LBCost() = default;\n            double operator()(const Key<NDIM>& key, const FunctionNode<T,NDIM>& node) const {\n                return node.coeff().size();\n            }\n        };\n\n        LoadBalanceDeux<6> lb(world);\n        for (const auto& f : vf) lb.add_tree(f, LBCost());\n        FunctionDefaults<6>::redistribute(world, lb.load_balance());\n\n    }\n\n    /// load a vector of functions\n    template<typename T, size_t NDIM>\n    void load_function(World& world, std::vector<Function<T,NDIM> >& f,\n            const std::string name) {\n        if (world.rank()==0) print(\"loading vector of functions\",name);\n        archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(world, name.c_str(), 1);\n        std::size_t fsize=0;\n        ar & fsize;\n        f.resize(fsize);\n        for (std::size_t i=0; i<fsize; ++i) ar & f[i];\n    }\n\n    /// save a vector of functions\n    template<typename T, size_t NDIM>\n    void save_function(const std::vector<Function<T,NDIM> >& f, const std::string name) {\n        if (f.size()>0) {\n            World& world=f.front().world();\n            if (world.rank()==0) print(\"saving vector of functions\",name);\n            archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(world, name.c_str(), 1);\n            std::size_t fsize=f.size();\n            ar & fsize;\n            for (std::size_t i=0; i<fsize; ++i) ar & f[i];\n        }\n    }\n\n\n}\n#endif // MADNESS_MRA_VMRA_H__INCLUDED\n"
  },
  {
    "path": "src/madness/mra/vmra1.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#ifndef MADNESS_MRA_VMRA_H__INCLUDED\n#define MADNESS_MRA_VMRA_H__INCLUDED\n\n/*!\n\t\\file vmra.h\n\t\\brief Defines operations on vectors of Functions\n\t\\ingroup mra\n\n\tThis file defines a number of operations on vectors of functions.\n\tAssume v is a vector of NDIM-D functions of a certain type.\n\n\n\tOperations on array of functions\n\n\t*) copying: deep copying of vectors of functions to vector of functions\n\t\\code\n\tvector2 = copy(world, vector1,fence);\n\t\\endcode\n\n\t*) compress: convert multiwavelet representation to legendre representation\n\t\\code\n\tcompress(world, vector, fence);\n\t\\endcode\n\n\t*) reconstruct: convert representation to multiwavelets\n\t\\code\n\treconstruct(world, vector, fence);\n\t\\endcode\n\n\t*) make_nonstandard: convert to non-standard form\n\t\\code\n\tmake_nonstandard(world, v, fence);\n\t\\endcode\n\n\t*) standard: convert to standard form\n\t\\code\n\tstandard(world, v, fence);\n\t\\endcode\n\n\t*) truncate: truncating vectors of functions to desired precision\n\t\\code\n\ttruncate(world, v, tolerance, fence);\n\t\\endcode\n\n\n\t*) zero function: create a vector of zero functions of length n\n\t\\code\n\tv=zero(world, n);\n\t\\endcode\n\n\t*) transform: transform a representation from one basis to another\n\t\\code\n\ttransform(world, vector, tensor, tolerance, fence )\n\t\\endcode\n\n\tSetting thresh-hold for precision\n\n\t*) set_thresh: setting a finite thresh-hold for a vector of functions\n\t\\code\n\tvoid set_thresh(World& world, std::vector< Function<T,NDIM> >& v, double thresh, bool fence=true);\n\t\\endcode\n\n\tArithmetic Operations on arrays of functions\n\n\t*) conjugation: conjugate a vector of complex functions\n\n\t*) add\n\t*) sub\n\t*) mul\n\t   - mul_sparse\n\t*) square\n\t*) gaxpy\n\t*) apply\n\n\tNorms, inner-products, blas-1 like operations on vectors of functions\n\n\t*) inner\n\t*) matrix_inner\n\t*) norm_tree\n\t*) normalize\n\t*) norm2\n\t    - norm2s\n\t*) scale(world, v, alpha);\n\n\n\n\n*/\n\n#include <madness/mra/mra.h>\n#include <madness/mra/derivative.h>\n#include <cstdio>\n\nnamespace madness {\n\n    /// Compress a vector of functions\n    template <typename T, std::size_t NDIM>\n    void compress(World& world,\n                  const std::vector< Function<T,NDIM> >& v,\n\t\t  unsigned int blk=1,\n                  bool fence=true){\n\n        PROFILE_BLOCK(Vcompress);\n        bool must_fence = false;\n\tunsigned int vvsize = v.size();\n        for (unsigned int i=0; i<vvsize; i+= blk) {\n\t  for (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j) {\n            if (!v[j].is_compressed()) {\n\t      v[j].compress(false);\n\t      must_fence = true;\n            }\n\t  }\n\t  if ( blk!=1 && must_fence && fence) world.gop.fence();\n\t}\n\n        if (fence && must_fence) world.gop.fence();\n    }\n\n\n    /// Reconstruct a vector of functions\n    template <typename T, std::size_t NDIM>\n    void reconstruct(World& world,\n                     const std::vector< Function<T,NDIM> >& v,\n\t\t     unsigned int blk=1,\n                     bool fence=true){ // reconstr\n\tPROFILE_BLOCK(Vreconstruct);\n\tbool must_fence = false;\n\tunsigned int vvsize = v.size();\n\tfor (unsigned int i=0; i<vvsize; i+= blk) {\n\t  for (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j) {\n\t    if (v[j].is_compressed()) {\n\t      v[j].reconstruct(false);\n\t      must_fence = true;\n\t    }\n\t  }\n\t  if ( blk!=1 && must_fence && fence) world.gop.fence();\n\t}\n\n\tif (fence && must_fence) world.gop.fence();\n    } // reconstr\n\n    /// Generates non-standard form of a vector of functions\n    template <typename T, std::size_t NDIM>\n      void nonstandard(World& world,\n\t\t       std::vector< Function<T,NDIM> >& v,\n\t\t       unsigned int blk=1,\n\t\t       bool fence=true) { // nonstand\n        PROFILE_BLOCK(Vnonstandard);\n\tunsigned int vvsize = v.size();\n        reconstruct(world, v, blk);\n\tfor (unsigned int i=0; i<vvsize; i+= blk) {\n\t  for (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j) {\n          v[j].make_nonstandard(false, false);\n\t  }\n\t  if ( blk!=1 && fence) world.gop.fence();\n\t}\n\tif (fence) world.gop.fence();\n    } //nonstand\n\n\n    /// Generates standard form of a vector of functions\n\n    template <typename T, std::size_t NDIM>\n      void standard(World& world,\n\t\t    std::vector< Function<T,NDIM> >& v,\n\t\t    unsigned int blk=1,\n\t\t    bool fence=true){ // standard\n\tPROFILE_BLOCK(Vstandard);\n\tunsigned int vvsize = v.size();\n\tfor (unsigned int i=0; i<vvsize; i+= blk) {\n\t  for (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j) {\n\t    v[j].standard(false);\n\t  }\n\t  if ( blk!=1 && fence) world.gop.fence();\n\t}\n\tif (fence) world.gop.fence();\n    } // standard\n\n\n    /// Truncates a vector of functions\n    template <typename T, std::size_t NDIM>\n    void truncate(World& world,\n                  std::vector< Function<T,NDIM> >& v,\n                  double tol=0.0,\n\t\t  unsigned int blk=1,\n                  bool fence=true){ // truncate\n\tPROFILE_BLOCK(Vtruncate);\n\n\tcompress(world, v, blk);\n\n\tunsigned int vvsize = v.size();\n\tfor (unsigned int i=0; i<vvsize; i+= blk) {\n\t  for (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j) {\n\t    v[j].truncate(tol, false);\n\t  }\n\t  if ( blk!=1 && fence) world.gop.fence();\n\t}\n        if (fence) world.gop.fence();\n    } //truncate\n\n    /// Applies a derivative operator to a vector of functions\n\n    template <typename T, std::size_t NDIM>\n      std::vector< Function<T,NDIM> >\n      apply(World& world,\n\t     const Derivative<T,NDIM>& D,\n\t     const std::vector< Function<T,NDIM> >& v,\n\t     const unsigned int blk=1,\n\t     const bool fence=true)\n      {\n\treconstruct(world, v, blk);\n\tstd::vector< Function<T,NDIM> > df(v.size());\n\n\tunsigned int vvsize = v.size();\n\n\tfor (unsigned int i=0; i<vvsize; i+= blk) {\n\t  for (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j) {\n\t    df[j] = D(v[j],false);\n\t  }\n\t  if (blk!= 1 && fence) world.gop.fence();\n\t}\n\tif (fence) world.gop.fence();\n\n\treturn df;\n      }\n\n    /// Generates a vector of zero functions\n\n    template <typename T, std::size_t NDIM>\n      std::vector< Function<T,NDIM> >\n      zero_functions(World& world, int n) {\n      PROFILE_BLOCK(Vzero_functions);\n      std::vector< Function<T,NDIM> > r(n);\n      for (int i=0; i<n; ++i)\n\tr[i] = Function<T,NDIM>(FunctionFactory<T,NDIM>(world));\n\n      return r;\n    }\n\n\n    /// Transforms a vector of functions according to new[i] = sum[j] old[j]*c[j,i]\n\n    /// Uses sparsity in the transformation matrix --- set small elements to\n    /// zero to take advantage of this.\n\n    template <typename T, typename R, std::size_t NDIM>\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> >\n      transform(World& world,\n\t\tconst std::vector< Function<T,NDIM> >& v,\n\t\tconst Tensor<R>& c,\n\t\tunsigned int blki=1,\n\t\tunsigned int blkj=1,\n\t\tconst bool fence=true){\n\n      PROFILE_BLOCK(Vtransformsp);\n\n      typedef TENSOR_RESULT_TYPE(T,R) resultT;\n\n      unsigned int blk = min(blki, blkj);\n      unsigned int n = v.size();  // n is the old dimension\n      unsigned int m = c.dim(1);  // m is the new dimension\n      MADNESS_ASSERT(n==c.dim(0));\n\n      std::vector< Function<resultT,NDIM> > vc = zero_functions_compressed<resultT,NDIM>(world, m);\n      compress(world, v, blk);\n\n      for (unsigned int i=0; i<m; i+= blki) {\n\tfor (unsigned int ii=i; ii<std::min(m,(i+1)*blki); ii++) {\n\t  for (unsigned int j=0; j<n; j+= blkj) {\n\t    for (unsigned int jj=j; jj<std::min(n, (j+1)*blkj); jj++)\n\t      if (c(jj,ii) != R(0.0)) vc[ii].gaxpy(1.0,v[jj],c(jj,ii),false);\n\t    if (fence && (blkj!=1)) world.gop.fence();\n\t  }\n\t}\n\tif (fence && (blki!=1)) world.gop.fence();  // a bit conservative\n      }\n\n\n      //      for (unsigned int i=0; i<m; ++i) {\n      // for (unsigned int j=0; j<n; ++j) {\n      // if (c(j,i) != R(0.0)) vc[i].gaxpy(1.0,v[j],c(j,i),false);\n      // }\n      // }\n\n      if (fence) world.gop.fence();\n      return vc;\n    }\n\n\n    template <typename L, typename R, std::size_t NDIM>\n      std::vector< Function<TENSOR_RESULT_TYPE(L,R),NDIM> >\n      transform(World& world,\n\t\tconst std::vector< Function<L,NDIM> >& v,\n\t\tconst Tensor<R>& c,\n\t\tconst double tol,\n\t\tconst unsigned int blki=1,\n\t\tconst bool fence)\n      {\n        PROFILE_BLOCK(Vtransform);\n        MADNESS_ASSERT(v.size() == (unsigned int)(c.dim(0)));\n\n        std::vector< Function<TENSOR_RESULT_TYPE(L,R),NDIM> > vresult(c.dim(1));\n\tunsigned int m=c.dim(1);\n\n\tfor (unsigned int i=0; i<m; i+= blki) {\n\t  for (unsigned int ii=i; ii<std::min(m,(i+1)*blki); ii++) {\n\t    vresult[ii] = Function<TENSOR_RESULT_TYPE(L,R),NDIM>(FunctionFactory<TENSOR_RESULT_TYPE(L,R),NDIM>(world));\n\t  }\n\t  if (fence && (blki!=1)) world.gop.fence();  // a bit conservative\n\t}\n\n\n\t//        for (unsigned int i=0; i<c.dim(1); ++i) {\n\t// vresult[i] = Function<TENSOR_RESULT_TYPE(L,R),NDIM>(FunctionFactory<TENSOR_RESULT_TYPE(L,R),NDIM>(world));\n\t// }\n        compress(world, v, blki, false);\n        compress(world, vresult, blki, false);\n        world.gop.fence();\n        vresult[0].vtransform(v, c, vresult, tol, fence);\n        return vresult;\n      }\n\n    /// Scales inplace a vector of functions by distinct values\n\n    template <typename T, typename Q, std::size_t NDIM>\n      void scale(World& world,\n\t\t std::vector< Function<T,NDIM> >& v,\n\t\t const std::vector<Q>& factors,\n\t\t const unsigned int blk=1,\n\t\t const bool fence=true)\n      {\n\tPROFILE_BLOCK(Vscale);\n\n\tunsigned int vvsize = v.size();\n\tfor (unsigned int i=0; i<vvsize; i+= blk) {\n\t  for (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j) {\n\t    v[j].scale(factors[j],false);\n\t  }\n\t  if (fence && blk!=1 ) world.gop.fence();\n\t}\n\tif (fence) world.gop.fence();\n      }\n\n    /// Scales inplace a vector of functions by the same\n\n    template <typename T, typename Q, std::size_t NDIM>\n      void scale(World& world,\n\t\t std::vector< Function<T,NDIM> >& v,\n\t\t  const Q factor,\n\t\t const unsigned int blk=1,\n\t\t const bool fence=true){\n\n\tPROFILE_BLOCK(Vscale); // shouldn't need blocking since it is local\n\n\tunsigned int vvsize = v.size();\n\tfor (unsigned int i=0; i<vvsize; i+= blk) {\n\t  for (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j) {\n\t    v[j].scale(factor,false);\n\t  }\n\t  if (fence && blk!=1 ) world.gop.fence();\n\t}\n\tif (fence) world.gop.fence();\n      }\n\n    /// Computes the 2-norms of a vector of functions\n    template <typename T, std::size_t NDIM>\n      std::vector<double> norm2s(World& world,\n\t\t\t\t const std::vector< Function<T,NDIM> >& v,\n\t\t\t\t const unsigned int blk=1,\n\t\t\t\t const bool fence=true){\n\n      PROFILE_BLOCK(Vnorm2);\n      unsigned int vvsize = v.size();\n      std::vector<double> norms(vvsize);\n\n      for (unsigned int i=0; i<vvsize; i+= blk) {\n\tfor (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j) {\n\t  norms[j] = v[j].norm2sq_local();\n\t}\n\tif (fence && (blk!=1)) world.gop.fence();\n      }\n      if (fence ) world.gop.fence();\n\n      world.gop.sum(&norms[0], norms.size());\n\n      for (unsigned int i=0; i<vvsize; i+= blk) {\n\tfor (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j)\n\t  norms[j] = sqrt(norms[j]);\n\tif (fence && (blk!=1)) world.gop.fence();\n      }\n\n      world.gop.fence();\n      return norms;\n    }\n\n    /// Computes the 2-norm of a vector of functions\n    // should be local; norms[0] contains the result\n\n    template <typename T, std::size_t NDIM>\n      double norm2(World& world,\n\t\t   const std::vector< Function<T,NDIM> >& v)\n      {\n\n\tPROFILE_BLOCK(Vnorm2);\n\n\tstd::vector<double> norms(v.size());\n\n\tfor (unsigned int i=0; i<v.size(); ++i)\n\t  norms[i] = v[i].norm2sq_local();\n\n\tworld.gop.sum(&norms[0], norms.size());\n\n\tfor (unsigned int i=1; i<v.size(); ++i)\n\t  norms[0] += norms[i];\n\n\tworld.gop.fence();\n\treturn sqrt(norms[0]);\n      }\n\n    inline double conj(double x) {\n      return x;\n    }\n\n    inline double conj(float x) {\n      return x;\n    }\n\n\n    template <typename T, typename R, std::size_t NDIM>\n    struct MatrixInnerTask : public TaskInterface {\n        Tensor<TENSOR_RESULT_TYPE(T,R)> result; // Must be a copy\n        const Function<T,NDIM>& f;\n        const std::vector< Function<R,NDIM> >& g;\n        long jtop;\n\n        MatrixInnerTask(const Tensor<TENSOR_RESULT_TYPE(T,R)>& result,\n                const Function<T,NDIM>& f,\n                const std::vector< Function<R,NDIM> >& g,\n                long jtop)\n        : result(result), f(f), g(g), jtop(jtop) {}\n\n        void run(World& world) {\n            for (long j=0; j<jtop; ++j) {\n                result(j) = f.inner_local(g[j]);\n            }\n        }\n\n    private:\n        /// Get the task id\n\n        /// \\param id The id to set for this task\n        virtual void get_id(std::pair<void*,unsigned short>& id) const {\n            PoolTaskInterface::make_id(id, *this);\n        }\n    }; // struct MatrixInnerTask\n\n    /// Computes the matrix inner product of two function vectors - q(i,j) = inner(f[i],g[j])\n\n    /// For complex types symmetric is interpreted as Hermitian.\n    ///\n    /// The current parallel loop is non-optimal but functional.\n\n    template <typename T, typename R, std::size_t NDIM>\n      Tensor< TENSOR_RESULT_TYPE(T,R) > matrix_inner(World& world,\n\t\t\t\t\t\t     const std::vector< Function<T,NDIM> >& f,\n\t\t\t\t\t\t     const std::vector< Function<R,NDIM> >& g,\n\t\t\t\t\t\t     bool sym=false) {\n      PROFILE_BLOCK(Vmatrix_inner);\n      unsigned int n=f.size(), m=g.size();\n      Tensor< TENSOR_RESULT_TYPE(T,R) > r(n,m);\n      if (sym) MADNESS_ASSERT(n==m);\n\n      world.gop.fence();\n      compress(world, f);\n      if (&f != &g) compress(world, g);\n\n      //         for (long i=0; i<n; ++i) {\n      //             long jtop = m;\n      //             if (sym) jtop = i+1;\n      //             for (long j=0; j<jtop; ++j) {\n      //                 r(i,j) = f[i].inner_local(g[j]);\n      //                 if (sym) r(j,i) = conj(r(i,j));\n      //             }\n      //         }\n\n      for (unsigned int i=n-1; i>=0; --i) {\n\tunsigned int jtop = m;\n\tif (sym) jtop = i+1;\n\tworld.taskq.add(new MatrixInnerTask<T,R,NDIM>(r(i,_), f[i], g, jtop));\n      }\n      world.gop.fence();\n      world.gop.sum(r.ptr(),n*m);\n\n      if (sym) {\n\tfor (unsigned int i=0; i<n; ++i) {\n\t  for (unsigned int j=0; j<i; ++j) {\n\t    r(j,i) = conj(r(i,j));\n\t  }\n\t}\n      }\n      return r;\n    }\n\n    /// Computes the element-wise inner product of two function vectors - q(i) = inner(f[i],g[i])\n\n    template <typename T, typename R, std::size_t NDIM>\n      Tensor< TENSOR_RESULT_TYPE(T,R) > inner(World& world,\n\t\t\t\t\t      const std::vector< Function<T,NDIM> >& f,\n\t\t\t\t\t      const std::vector< Function<R,NDIM> >& g) {\n      PROFILE_BLOCK(Vinnervv);\n      long n=f.size(), m=g.size();\n      MADNESS_ASSERT(n==m);\n      Tensor< TENSOR_RESULT_TYPE(T,R) > r(n);\n\n      compress(world, f);\n      compress(world, g);\n\n      for (long i=0; i<n; ++i) {\n\tr(i) = f[i].inner_local(g[i]);\n      }\n\n      world.taskq.fence();\n      world.gop.sum(r.ptr(),n);\n      world.gop.fence();\n      return r;\n    }\n\n\n    /// Computes the inner product of a function with a function vector - q(i) = inner(f,g[i])\n\n    template <typename T, typename R, std::size_t NDIM>\n      Tensor< TENSOR_RESULT_TYPE(T,R) > inner(World& world,\n\t\t\t\t\t      const Function<T,NDIM>& f,\n\t\t\t\t\t      const std::vector< Function<R,NDIM> >& g) {\n      PROFILE_BLOCK(Vinner);\n      long n=g.size();\n      Tensor< TENSOR_RESULT_TYPE(T,R) > r(n);\n\n      f.compress();\n      compress(world, g);\n\n      for (long i=0; i<n; ++i) {\n\tr(i) = f.inner_local(g[i]);\n      }\n\n      world.taskq.fence();\n      world.gop.sum(r.ptr(),n);\n      world.gop.fence();\n      return r;\n    }\n\n\n    /// Multiplies a function against a vector of functions --- q[i] = a * v[i]\n\n    template <typename T, typename R, std::size_t NDIM>\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n      mul(World& world,\n\t  const Function<T,NDIM>& a,\n\t  const std::vector< Function<R,NDIM> >& v,\n\t  const unsigned int blk=1,\n\t  const bool fence=true) {\n\n      PROFILE_BLOCK(Vmul);\n      a.reconstruct(false);\n      reconstruct(world, v, blk, false);\n      world.gop.fence();\n      return vmulXX(a, v, 0.0, fence);\n    }\n\n    /// Multiplies a function against a vector of functions using sparsity of a and v[i] --- q[i] = a * v[i]\n    template <typename T, typename R, std::size_t NDIM>\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n      mul_sparse(World& world,\n\t\t const Function<T,NDIM>& a,\n\t\t const std::vector< Function<R,NDIM> >& v,\n\t\t const double tol,\n\t\t const bool fence=true,\n\t\t const unsigned int blk=1)\n {\n      PROFILE_BLOCK(Vmulsp);\n      a.reconstruct(false);\n      reconstruct(world, v, blk, false);\n      world.gop.fence();\n\n      unsigned int vvsize = v.size();\n      for (unsigned int i=0; i<vvsize; i+= blk) {\n\tfor (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j)\n\t  v[j].norm_tree(false);\n\tif ( fence && (blk == 1)) world.gop.fence();\n      }\n      a.norm_tree();\n      return vmulXX(a, v, tol, fence);\n    }\n\n    /// Makes the norm tree for all functions in a vector\n    template <typename T, std::size_t NDIM>\n      void norm_tree(World& world,\n\t\t     const std::vector< Function<T,NDIM> >& v,\n\t\t     bool fence=true,\n\t\t     unsigned int blk=1){\n        PROFILE_BLOCK(Vnorm_tree);\n\n      unsigned int vvsize = v.size();\n      for (unsigned int i=0; i<vvsize; i+= blk) {\n\tfor (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j)\n\t  v[j].norm_tree(false);\n        if (fence && blk!=1 ) world.gop.fence();\n      }\n      if (fence) world.gop.fence();\n    }\n\n    /// Multiplies two vectors of functions q[i] = a[i] * b[i]\n\n    template <typename T, typename R, std::size_t NDIM>\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n      mul(World& world,\n\t  const std::vector< Function<T,NDIM> >& a,\n\t  const std::vector< Function<R,NDIM> >& b,\n\t  bool fence=true,\n\t  unsigned int blk=1){\n      PROFILE_BLOCK(Vmulvv);\n      reconstruct(world, a, blk, false);\n      if (&a != &b) reconstruct(world, b, blk, false);\n      world.gop.fence();\n\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > q(a.size());\n\n      unsigned int vvsize = a.size();\n      for (unsigned int i=0; i<vvsize; i+= blk) {\n\tfor (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j)\n\t  q[j] = mul(a[j], b[j], false);\n\tif (fence && (blk !=1 )) world.gop.fence();\n      }\n      if (fence) world.gop.fence();\n      return q;\n    }\n\n\n    /// Computes the square of a vector of functions --- q[i] = v[i]**2\n\n    template <typename T, std::size_t NDIM>\n      std::vector< Function<T,NDIM> >\n      square(World& world,\n\t     const std::vector< Function<T,NDIM> >& v,\n\t     bool fence=true) {\n      return mul<T,T,NDIM>(world, v, v, fence);\n      //         std::vector< Function<T,NDIM> > vsq(v.size());\n      //         for (unsigned int i=0; i<v.size(); ++i) {\n      //             vsq[i] = square(v[i], false);\n      //         }\n      //         if (fence) world.gop.fence();\n      //         return vsq;\n    }\n\n    /// Sets the threshold in a vector of functions\n\n    template <typename T, std::size_t NDIM>\n      void set_thresh(World& world,\n\t\t      std::vector< Function<T,NDIM> >& v,\n\t\t      double thresh,\n\t\t      bool fence=true) {\n      for (unsigned int j=0; j<v.size(); ++j) {\n\tv[j].set_thresh(thresh,false);\n      }\n      if (fence) world.gop.fence();\n    }\n\n    /// Returns the complex conjugate of the vector of functions\n\n    template <typename T, std::size_t NDIM>\n      std::vector< Function<T,NDIM> >\n      conj(World& world,\n\t   const std::vector< Function<T,NDIM> >& v,\n\t   bool fence=true){\n      PROFILE_BLOCK(Vconj);\n      std::vector< Function<T,NDIM> > r = copy(world, v); // Currently don't have oop conj\n      for (unsigned int i=0; i<v.size(); ++i) {\n\tr[i].conj(false);\n      }\n      if (fence) world.gop.fence();\n      return r;\n    }\n\n\n    /// Returns a deep copy of a vector of functions\n\n    template <typename T, std::size_t NDIM>\n      std::vector< Function<T,NDIM> >\n      copy(World& world,\n\t   const std::vector< Function<T,NDIM> >& v,\n\t   bool fence=true) {\n      PROFILE_BLOCK(Vcopy);\n      std::vector< Function<T,NDIM> > r(v.size());\n      for (unsigned int i=0; i<v.size(); ++i) {\n\tr[i] = copy(v[i], false);\n      }\n      if (fence) world.gop.fence();\n      return r;\n    }\n\n    /// Returns a vector of deep copies of of a function\n\n    template <typename T, std::size_t NDIM>\n      std::vector< Function<T,NDIM> >\n      copy(World& world,\n\t   const Function<T,NDIM>& v,\n\t   const unsigned int n,\n\t   bool fence=true) {\n      PROFILE_BLOCK(Vcopy1);\n      std::vector< Function<T,NDIM> > r(n);\n      for (unsigned int i=0; i<n; ++i) {\n\tr[i] = copy(v, false);\n      }\n      if (fence) world.gop.fence();\n      return r;\n    }\n\n    /// Returns new vector of functions --- q[i] = a[i] + b[i]\n\n    template <typename T, typename R, std::size_t NDIM>\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n      add(World& world,\n\t  const std::vector< Function<T,NDIM> >& a,\n\t  const std::vector< Function<R,NDIM> >& b,\n\t  bool fence=true,\n\t  unsigned int blk=1) {\n      PROFILE_BLOCK(Vadd);\n      MADNESS_ASSERT(a.size() == b.size());\n      compress(world, a, blk);\n      compress(world, b, blk);\n\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > r(a.size());\n\n      unsigned int vvsize = a.size();\n      for (unsigned int i=0; i<vvsize; i+= blk) {\n\tfor (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j)\n\t  r[j] = add(a[j], b[j], false);\n\tif (fence && (blk !=1 )) world.gop.fence();\n      }\n      if (fence) world.gop.fence();\n\n      return r;\n    }\n\n     /// Returns new vector of functions --- q[i] = a + b[i]\n\n    template <typename T, typename R, std::size_t NDIM>\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n      add(World& world,\n\t  const Function<T,NDIM> & a,\n\t  const std::vector< Function<R,NDIM> >& b,\n\t   bool fence=true,\n\t  unsigned int blk=1) {\n\n      PROFILE_BLOCK(Vadd1);\n      a.compress();\n      compress(world, b, blk);\n\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > r(b.size());\n\n      unsigned int vvsize = b.size();\n      for (unsigned int i=0; i<vvsize; i+= blk) {\n\tfor (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j)\n\t  r[j] = add(a, b[j], false);\n\tif (fence && (blk !=1 )) world.gop.fence();\n      }\n      if (fence) world.gop.fence();\n\n      return r;\n    }\n\n    template <typename T, typename R, std::size_t NDIM>\n      inline std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n      add(World& world,\n\t  const std::vector< Function<R,NDIM> >& b,\n\t  const Function<T,NDIM> & a,\n\t   bool fence=true,\n\t  unsigned int blk=1) {\n      return add(world, a, b, fence, blk);\n    }\n\n    /// Returns new vector of functions --- q[i] = a[i] - b[i]\n\n    template <typename T, typename R, std::size_t NDIM>\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n      sub(World& world,\n\t   const std::vector< Function<T,NDIM> >& a,\n\t   const std::vector< Function<R,NDIM> >& b,\n\t   bool fence=true,\n\t   unsigned int blk=1) {\n      PROFILE_BLOCK(Vsub);\n      MADNESS_ASSERT(a.size() == b.size());\n      compress(world, a, fence, blk);\n      compress(world, b, fence, blk);\n\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R),NDIM> > r(a.size());\n\n      unsigned int vvsize = a.size();\n      for (unsigned int i=0; i<vvsize; i+= blk) {\n\tfor (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j)\n\t  r[j] = sub(a[j], b[j], false);\n\tif (fence && (blk !=1 )) world.gop.fence();\n      }\n      if (fence) world.gop.fence();\n      return r;\n    }\n\n\n    /// Generalized A*X+Y for vectors of functions ---- a[i] = alpha*a[i] + beta*b[i]\n\n    template <typename T, typename Q, typename R, std::size_t NDIM>\n      void gaxpy(World& world,\n\t\t Q alpha,\n\t\t std::vector< Function<T,NDIM> >& a,\n\t\t Q beta,\n\t\t const std::vector< Function<R,NDIM> >& b,\n\t\t unsigned int blk=1,\n\t\t bool fence=true) {\n      PROFILE_BLOCK(Vgaxpy);\n      MADNESS_ASSERT(a.size() == b.size());\n      compress(world, a, fence, blk);\n      compress(world, b, fence, blk);\n\n      unsigned int vvsize = a.size();\n\n      for (unsigned int i=0; i<vvsize; i+= blk) {\n\tfor (unsigned int j=i; j<std::min(vvsize,(i+1)*blk); ++j)\n\t  a[j].gaxpy(alpha, b[j], beta, false);\n\n\tif (fence && (blk !=1 )) world.gop.fence();\n\n      }\n      //      for (unsigned int i=0; i<a.size(); ++i) {\n      // \ta[i].gaxpy(alpha, b[i], beta, false);\n      // }\n      if (fence) world.gop.fence();\n    }\n\n\n    /// Applies a vector of operators to a vector of functions --- q[i] = apply(op[i],f[i])\n\n    template <typename opT, typename R, std::size_t NDIM>\n      std::vector< Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> >\n      apply(World& world,\n\t    const std::vector< std::shared_ptr<opT> >& op,\n\t    const std::vector< Function<R,NDIM> > f,\n\t    const unsigned int blk=1){\n\n      PROFILE_BLOCK(Vapplyv);\n      MADNESS_ASSERT(f.size()==op.size());\n\n      std::vector< Function<R,NDIM> >& ncf = *const_cast< std::vector< Function<R,NDIM> >* >(&f);\n\n      reconstruct(world, f, blk);\n      nonstandard(world, ncf, blk);\n\n      std::vector< Function<TENSOR_RESULT_TYPE(typename opT::opT,R), NDIM> > result(f.size());\n      unsigned int ff = f.size();\n\n      for (unsigned int i=0; i<ff; ++blk) {\n\tfor (unsigned int j=i; j<std::min(ff,(i+1)*blk); ++j)\n\t  result[j] = apply_only(*op[j], f[j], false);\n\tif (blk !=1)\n\t  world.gop.fence();\n      }\n\n      world.gop.fence();\n\n      standard(world, ncf, false);  // restores promise of logical constness\n      world.gop.fence();\n      reconstruct(world, result, blk);\n\n      return result;\n    }\n\n\n    /// Applies an operator to a vector of functions --- q[i] = apply(op,f[i])\n\n    template <typename T, typename R, std::size_t NDIM>\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> >\n      apply(World& world,\n\t    const SeparatedConvolution<T,NDIM>& op,\n\t    const std::vector< Function<R,NDIM> > f,\n\t    const unsigned int blk=1) {\n      PROFILE_BLOCK(Vapply);\n\n      std::vector< Function<R,NDIM> >& ncf = *const_cast< std::vector< Function<R,NDIM> >* >(&f);\n\n      reconstruct(world, f, blk);\n      nonstandard(world, ncf, blk);\n\n      std::vector< Function<TENSOR_RESULT_TYPE(T,R), NDIM> > result(f.size());\n\n      unsigned int ff = f.size();\n      for (unsigned int i=0; i<ff; ++blk) {\n\tfor (unsigned int j=i; j<std::min(ff,(i+1)*blk); ++j)\n\t  result[j] = apply_only(op, f[j], false);\n\tif (blk !=1)\n\t  world.gop.fence();\n      }\n      world.gop.fence();\n\n      standard(world, ncf, blk, false);  // restores promise of logical constness\n      world.gop.fence();\n      reconstruct(world, result, blk);\n\n      return result;\n    }\n\n    /// Normalizes a vector of functions --- v[i] = v[i].scale(1.0/v[i].norm2())\n\n    template <typename T, std::size_t NDIM>\n      void normalize(World& world,\n\t\t     std::vector< Function<T,NDIM> >& v,\n\t\t     bool fence=true){\n\n      PROFILE_BLOCK(Vnormalize);\n      std::vector<double> nn = norm2s(world, v);\n\n      for (unsigned int i=0; i<v.size(); ++i)\n\tv[i].scale(1.0/nn[i],false);\n\n      if (fence) world.gop.fence();\n    }\n\n}\n#endif // MADNESS_MRA_VMRA_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/CMakeLists.txt",
    "content": "# src/madness/tensor\n\n# Add targets for generated header files\nfind_package(Python COMPONENTS Interpreter)\nif(TARGET Python::Interpreter)\n  add_custom_command(\n      OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/tensoriter_spec.h\n             ${CMAKE_CURRENT_SOURCE_DIR}/tensor_spec.h\n      COMMAND ${Python_EXECUTABLE} tempspec.py\n      MAIN_DEPENDENCY tempspec.py\n      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}\n      COMMENT \"Generating tensoriter_spec.h and tensor_spec.h\")\nelseif(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tensoriter_spec.h.h\n    OR NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tensor_spec.h)\n  message(FATAL_ERROR \"Python executable is not available to generate required source files\")\nendif()\n\n# Source lists for MADtensor\nset(MADTENSOR_HEADERS \n    aligned.h mxm.h tensorexcept.h tensoriter_spec.h type_data.h basetensor.h\n    tensor.h tensor_macros.h vector_factory.h slice.h tensoriter.h\n    tensor_spec.h vmath.h systolic.h gentensor.h srconf.h distributed_matrix.h\n    tensortrain.h SVDTensor.h tensor_json.hpp)\nset(MADTENSOR_SOURCES tensor.cc tensoriter.cc basetensor.cc vmath.cc)\n\n# logically these headers should be part of their own library (MADclapack)\n# however CMake right now does not support a mechanism to properly handle header-only libs.\n# so will keep this a part of MADlinalg, add an install rule for these header only\n# and will remember that these files depend on LAPACK\n#\n# Source lists for MADclapack\nset(MADCLAPACK_HEADERS cblas.h cblas_types.h\n        clapack.h clapack_fortran.h\n        lapacke_types.h linalg_wrappers.h ) # this part of MADlinalg is purely independent of MADtensor\n\n# Source lists for MADlinalg\nset(MADLINALG_HEADERS ${MADCLAPACK_HEADERS} tensor_lapack.h solvers.h elem.h jacobi.h)\nset(MADLINALG_SOURCES lapack.cc solvers.cc elem.cc SVDTensor.cc RandomizedMatrixDecomposition.cc linalg_wrappers.cc )\n\nset(MADGENTENSOR_HEADERS gentensor.h srconf.h distributed_matrix.h tensortrain.h SVDTensor.h\n        lowranktensor.h RandomizedMatrixDecomposition.h)\nset(MADGENTENSOR_SOURCES SVDTensor.cc RandomizedMatrixDecomposition.cc)\n\n# Create libraries MADtensor and MADlinalg\nadd_mad_library(tensor MADTENSOR_SOURCES MADTENSOR_HEADERS \"misc\" \"madness/tensor\")\n#add_mad_library(clapack MADLINALG_HEADERS \"\" \"madness/tensor\")\nadd_mad_library(linalg MADLINALG_SOURCES MADLINALG_HEADERS \"tensor\" \"madness/tensor\")\n\nif(ENABLE_GENTENSOR)\n  add_mad_library(gentensor MADGENTENSOR_SOURCES MADGENTENSOR_HEADERS \"linalg\" \"madness/tensor\")\nendif()\n\n  set(l_target MADlinalg)\n  set(t_target MADtensor)\n\n  target_link_libraries(${l_target} PUBLIC ${LAPACK_LIBRARIES}) # logically it's MADclapack that depends on LAPACK\n  target_link_libraries(${t_target} PUBLIC ${LAPACK_LIBRARIES}) # some of the tests depend on MKL/Blas\n  if (LAPACK_INCLUDE_DIRS)\n    target_include_directories(${l_target} PUBLIC ${LAPACK_INCLUDE_DIRS})\n    target_include_directories(${t_target} PUBLIC ${LAPACK_INCLUDE_DIRS})\n  endif (LAPACK_INCLUDE_DIRS)\n  if (LAPACK_COMPILE_OPTIONS)\n    target_compile_options(${l_target} PUBLIC ${LAPACK_COMPILE_OPTIONS})\n    target_compile_options(${t_target} PUBLIC ${LAPACK_COMPILE_OPTIONS})\n  endif (LAPACK_COMPILE_OPTIONS)\n  if (LAPACK_COMPILE_DEFINITIONS)\n    target_compile_definitions(${l_target} PUBLIC ${LAPACK_COMPILE_DEFINITIONS})\n    target_compile_definitions(${t_target} PUBLIC ${LAPACK_COMPILE_DEFINITIONS})\n  endif (LAPACK_COMPILE_DEFINITIONS)\n\n  if (HAVE_IBMBGQ)\n    message(FATAL_ERROR \"IBM BG/Q support ended\")\n  elseif (HAVE_IBMBGP)\n    message(FATAL_ERROR \"IBM BG/P support ended\")\n  endif ()\n\n  if (ELEMENTAL_FOUND AND MADNESS_HAS_ELEMENTAL_EMBEDDED)\n    target_link_libraries(${l_target} PUBLIC ${ELEMENTAL_PACKAGE_NAME})\n  endif ()\n\n# Add unit tests\nif(BUILD_TESTING)\n  \n  # The list of unit test source files\n  set(TENSOR_TEST_SOURCES test_tensor.cc oldtest.cc test_mtxmq.cc\n      jimkernel.cc test_distributed_matrix.cc test_Zmtxmq.cc test_systolic.cc)\n  set(LINALG_TEST_SOURCES test_linalg.cc test_solvers.cc testseprep.cc test_jacobi.cc)\n\n  if(ENABLE_GENTENSOR)\n    list(APPEND LINALG_TEST_SOURCES test_gentensor.cc test_lowranktensor.cc)\n  endif()\n\n  add_unittests(tensor \"${TENSOR_TEST_SOURCES}\" \"MADtensor;MADgtest\" \"unittests;short\")\n  add_unittests(linalg \"${LINALG_TEST_SOURCES}\" \"MADlinalg;MADgtest\" \"unittests;short\")\n  \nendif()\n"
  },
  {
    "path": "src/madness/tensor/RandomizedMatrixDecomposition.cc",
    "content": "\n#include <madness/tensor/RandomizedMatrixDecomposition.h>\n#include <madness/constants.h>\n#include <madness/tensor/tensor_lapack.h>\n\n\nnamespace madness {\n\n\n/// compute the range of the matrix, following Alg 4.2 of Halko, Martinsson, Tropp, 2011\ntemplate<typename T>\nTensor<T> RandomizedMatrixDecomposition<T>::compute_range(const Tensor<T>& tensor,\n\t\tconst double& eps, std::array<long,2> vectordim) {\n\n        //typedef typename Tensor<T>::scalar_type scalar_type;\n\n\t// fast return if possible\n\trange=Tensor<T>(0l,0l);\n\tif (tensor.normf()<eps) return range;\n\n\tconst Tensor<T> matrix=resize_to_matrix(tensor,vectordim);\n\n\tmaxrank=std::min(maxrank,matrix.dim(0));\n\n\tY_former Yformer(matrix);\n\trange=do_compute_range(Yformer,eps);\n\treturn range;\n}\n\ntemplate<typename T>\nTensor<T> RandomizedMatrixDecomposition<T>::do_compute_range(const Y_former& Yformer,\n\t\t\tconst double& eps) const {\n\tTensor<T> Q(0l,0l);\n\n\t// random trial vectors (transpose for efficiency)\n\tTensor<T> omegaT(oversampling,Yformer.n());\n\tomegaT.fillrandom();\n\n\t// compute guess for the range\n\tTensor<T> Y=Yformer(omegaT);\n\n\tstd::vector<scalar_type> columnnorm(Y.dim(0));\n\tfor (long i=0; i<Y.dim(0); ++i) columnnorm[i]=Y(i,_).normf();\n\tscalar_type maxnorm=*std::max_element(columnnorm.begin(),columnnorm.end());\n\n\tbool not_complete=(maxnorm>(eps/10*sqrt(2* madness::constants::pi)));\n\n\tTensor<T> R;\t// R is not needed anymore..\n\tif (not_complete) {\n\t\tqr(Y,R);\n\t\tQ=Y;\n\t} else {\n\t\treturn Q;\n\t}\n\n\twhile (not_complete) {\n\t\tomegaT.fillrandom();\n\t\tY=Y=Yformer(omegaT);\n\t\tTensor<T> Y0=Y-inner(Q,inner(conj(Q),Y,0,0));\n\n\t\t// check residual norm, exit if converged\n\t\tstd::vector<scalar_type> columnnorm0(Y0.dim(0));\n\t\tfor (long i=0; i<Y0.dim(0); ++i) columnnorm0[i]=Y0(i,_).normf();\n\t\tmaxnorm=*std::max_element(columnnorm0.begin(),columnnorm0.end());\n\t\tif (maxnorm<(eps/10*sqrt(2*constants::pi))) break;\n\n\n\t\t// concatenate the ranges\n\t\tTensor<T> Q0(Yformer.m(),Q.dim(1)+Y.dim(1));\n\t\tQ0(_,Slice(0,Q.dim(1)-1))=Q;\n\t\tQ0(_,Slice(Q.dim(1),-1))=Y0;\n\n\t\t// orthonormalize the ranges\n\t\tqr(Q0,R);\n\t\tQ=Q0;\n\n\t\t// looks a lot like full rank..\n\t\tif (Q.dim(1)>Yformer.maxrank()) break;\n\t\tif (Q.dim(1)>maxrank) break;\n\t\tif (Q.dim(1)>Yformer.maxrank()) MADNESS_EXCEPTION(\"faulty QR step in randomized range finder\",1);;\n\n\t}\n\treturn Q;\n}\n\ntemplate<typename T>\nTensor<T> RandomizedMatrixDecomposition<T>::compute_range(const Tensor<T>& columnspace,\n\t\tconst Tensor<T>& rowspace, const double& eps) {\n        //typedef typename Tensor<T>::scalar_type scalar_type;\n\n\t// fast return if possible\n\tTensor<T> Q(0l,0l);\n\tif (columnspace.size()==0) return Q;\n\n\tMADNESS_ASSERT(columnspace.ndim()==2);\n\tMADNESS_ASSERT(rowspace.ndim()==2);\n\tMADNESS_ASSERT(columnspace.dim(0)==rowspace.dim(0));\t// U_ri V_rj\n\n\tconst long r=columnspace.dim(0);\t// current rank\n\tif (r==0) return Q;\n\n\tmaxrank=std::min(maxrank,r);\n\n\tY_former Yformer(columnspace,rowspace);\n\trange=do_compute_range(Yformer,eps);\n\treturn range;\n\n}\n\n\n\n// explicit instantiation\ntemplate class RandomizedMatrixDecomposition<float>;\ntemplate class RandomizedMatrixDecomposition<double>;\ntemplate class RandomizedMatrixDecomposition<float_complex>;\ntemplate class RandomizedMatrixDecomposition<double_complex>;\n\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/tensor/RandomizedMatrixDecomposition.h",
    "content": "\n\n#ifndef SRC_MADNESS_TENSOR_RANDOMIZEDMATRIXDECOMPOSITION_H_\n#define SRC_MADNESS_TENSOR_RANDOMIZEDMATRIXDECOMPOSITION_H_\n\n#include <madness/tensor/tensor.h>\n\nnamespace madness {\n\n\n/// simple factory pattern for the RandomizedMatrixDecomposition\nstruct RMDFactory {\n\tlong maxrank_=LONG_MAX;\n\tlong oversampling_=10;\n\n\tRMDFactory() {}\n\n\tRMDFactory& maxrank(const long mr) {\n\t\tmaxrank_=mr;\n\t\treturn *this;\n\t}\n\tRMDFactory& oversampling(const long os) {\n\t\toversampling_=os;\n\t\treturn *this;\n\t}\n\n};\n\n\ntemplate<typename T>\nclass RandomizedMatrixDecomposition {\n\npublic:\n\ttypedef typename TensorTypeData<T>::scalar_type scalar_type;\n\n\tRandomizedMatrixDecomposition() = default;\n\n\tRandomizedMatrixDecomposition(const RandomizedMatrixDecomposition& other) = default;\n\n\tRandomizedMatrixDecomposition(const RMDFactory& factory)\n\t\t: maxrank(factory.maxrank_), oversampling(factory.oversampling_) {\n\t}\n\n\tRandomizedMatrixDecomposition(const Tensor<T>& matrix, const double thresh) {\n\t\trange=compute_range(matrix,thresh,{0,0});\n\t}\n\n\t/// check if the computed rank is too large\n\tbool exceeds_maxrank() const {return (range.dim(1)>maxrank);}\n\n\tTensor<T> get_range() const {return range;}\n\n\t/// compute the range of the matrix\n\n\t/// follows Halko, Martinsson, Tropp (2011), Alg. 4.2\n\t/// the final range will satisfy for the input tensor A: || A - Q Q^T A || < eps\n\t/// method will change member variables \"range\" and \"maxrank\"\n\t/// @param[in]\t\ttensor\t\tthe input tensor/matrix A (see matrixdim if not a matrix)\n\t/// @param[in]\t\teps\t\t\tthe accuracy of the representation\n\t/// @param[in]\t\tmatrixdim\thow to reshape the tensor if it is not a matrix\n\t/// @return \t\trange\t\tthe range of the input tensor\n\tTensor<T> compute_range(const Tensor<T>& tensor,\n\t\t\tconst double& eps, std::array<long,2> matrixdim={0,0});\n\n\t/// compute the range of the matrix given in decomposed form\n\n\t/// see above;\n\t/// Matrix is given by A(i,j)=columnspace(r,i) * rowspace(r,j)\n\t/// @param[in]\t\tcolumnspace\tcolumnspace of the input tensor/matrix A\n\t/// @param[in]\t\trowspace\trowspace of the input tensor/matrix A\n\t/// @param[in]\t\teps\t\t\tthe accuracy of the representation\n\t/// @return \t\trange\t\tthe range of the input tensor\n\tTensor<T> compute_range(const Tensor<T>& columnspace, const Tensor<T>& rowspace,\n\t\t\tconst double& eps);\n\n\t/// return the error of the range Q\n\n\t/// explicitly compute the error measure || A - Q Q^T A ||\n\tstatic scalar_type check_range(const Tensor<T>& matrix,\n\t\t\tconst Tensor<T>& range) {\n\t\tTensor<T> residual=matrix-inner(range,inner(conj(range),matrix,0,0));\n\t\treturn residual.normf();\n\t}\n\n\t/// helper function\n\tstatic Tensor<T> make_SVD_decaying_matrix(const Tensor<T>& matrix, const int n=1) {\n\t\tTensor<T> U,VT;\n\t\tTensor<typename Tensor<T>::scalar_type> s;\n\t\tsvd(matrix,U,s,VT);\n\t\tfor (long i=0; i<s.size(); ++i) {\n\t\t\ts(i)*=exp(-i/n);\t\t// make singular values decay exponentially\n\t\t\tU(_,i)*=s(i);\n\t\t}\n\t\treturn inner(U,VT);\n\t}\n\n\t/// resize Tensor to a matrix\n\tstatic Tensor<T> resize_to_matrix(const Tensor<T>& matrix, std::array<long,2> vectordim={0,0}) {\n\t\t// SVD works only with matrices (2D)\n\t\tif (vectordim[0]==0) {\n\t\t\tlong dim1=matrix.ndim()/2;\t// integer division\n\t\t\tvectordim[0]=vectordim[1]=1;\n\t\t\tfor (long i=0; i<dim1; ++i) vectordim[0]*=matrix.dim(i);\n\t\t\tfor (long i=dim1; i<matrix.ndim(); ++i) vectordim[1]*=matrix.dim(i);\n\t\t\tMADNESS_ASSERT(vectordim[0]*vectordim[1]==matrix.size());\n\t\t}\n\t\tTensor<T> values_eff=matrix.reshape(vectordim[0],vectordim[1]);\n\t\tMADNESS_ASSERT(values_eff.ndim()==2);\n\t\treturn values_eff;\n\t}\n\n\tvoid set_maxrank(const long max_rank) {\n\t\tmaxrank=max_rank;\n\t}\n\nprivate:\n\n\t/// maximum rank to abort the decomposition\n\tlong maxrank=LONG_MAX;\n\n\t/// oversampling parameter\n\tlong oversampling=10;\n\n\t/// the range that spans the input matrix\n\tTensor<T> range=Tensor<T>(0l,0l);\n\n\t/// functor for forming Y = matrix * randomvector\n\tstruct Y_former {\n\t\tTensor<T> mat1,mat2;\n\t\tstd::string algo=\"matrix\";\n\n\t\tY_former(const Tensor<T>& matrix) : mat1(matrix), algo(\"matrix\") {}\n\t\tY_former(const Tensor<T>& col, const Tensor<T>& row) : mat1(col), mat2(row), algo(\"col_row\") {}\n\n\t\tlong m() const {\n\t\t\tif (algo==\"matrix\") return mat1.dim(0);\n\t\t\tif (algo==\"col_row\") return mat1.dim(1);\n\t\t\tthrow;\n\t\t\treturn 0;\n\t\t}\n\n\t\tlong n() const {\n\t\t\tif (algo==\"matrix\") return mat1.dim(1);\n\t\t\tif (algo==\"col_row\") return mat2.dim(1);\n\t\t\tthrow;\n\t\t\treturn 0;\n\n\t\t}\n\t\tlong maxrank() const {\n\t\t\tif (algo==\"matrix\") return std::min(mat1.dim(0),mat1.dim(1));\n\t\t\tif (algo==\"col_row\") return mat1.dim(0);\n\t\t\tthrow;\n\t\t\treturn 0;\n\t\t}\n\t\t/// form Y with the transposed random trial vector as input\n\t\tTensor<T> operator()(const Tensor<T>& omegaT) const {\n\t\t\tTensor<T> Y;\n\t\t\tif (algo==\"matrix\") {\n\t\t\t\tY=inner(mat1,omegaT,1,1);\n\n\t\t\t} else if (algo==\"col_row\") {\n\t\t\t\t// compute col*row*omega\n\t\t\t\tY=inner(mat1,inner(mat2,omegaT,1,1),0,0);\n\t\t\t}\n\t\t\treturn Y;\n\n\t\t}\n\t};\n\t/// perform the actual computation of the range\n\tTensor<T> do_compute_range(const Y_former& Y, const double& eps) const;\n\n\n\n};\n\n} /* namespace madness */\n\n#endif /* SRC_MADNESS_TENSOR_RANDOMIZEDMATRIXDECOMPOSITION_H_ */\n"
  },
  {
    "path": "src/madness/tensor/SVDTensor.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id: srconf.h 2816 2012-03-23 14:59:52Z 3ru6ruWu $\n */\n\n\n\n#include <madness/tensor/SVDTensor.h>\n#include <madness/constants.h>\n#include <madness/tensor/RandomizedMatrixDecomposition.h>\n\nusing namespace madness;\n\nnamespace madness {\n\nstatic std::string reduction_alg=\"divide_conquer\";\n\ntemplate<typename T>\nvoid SVDTensor<T>::set_reduction_algorithm(const std::string alg) {\n\treduction_alg=alg;\n}\n\ntemplate<typename T>\nstd::string SVDTensor<T>::reduction_algorithm() {\n\n\tif (getenv(\"REDUCTION_ALGORITHM\")){\n\t\tchar* calg = getenv(\"REDUCTION_ALGORITHM\");\n\t\treturn std::string(calg);\n\t}\n\treturn reduction_alg;\n}\n\n/// reduce the rank using SVD\ntemplate<typename T>\nSVDTensor<T> SVDTensor<T>::compute_svd(const Tensor<T>& values,\n\t\tconst double& eps, std::array<long,2> vectordim) {\n\n\tSVDTensor<T> result(values.ndim(),values.dims());\n\n\t// fast return if possible\n\tif (values.normf()<eps) return result;\n\n\tTensor<T> values_eff=RandomizedMatrixDecomposition<T>::resize_to_matrix(values,vectordim);\n\n\t// output from svd\n\tTensor<T> U;\n\tTensor<T> VT;\n\tTensor< typename Tensor<T>::scalar_type > s;\n\n\tsvd(values_eff,U,s,VT);\n\n\t// find the maximal singular value that's supposed to contribute\n\t// singular values are ordered (largest first)\n\tconst double thresh=eps;\n\tlong i=SRConf<T>::max_sigma(thresh,s.dim(0),s);\n\n\t// convert SVD output to our convention\n\tif (i>=0) {\n\t\t// copy to have contiguous and tailored singular vectors\n\t\tresult.set_vectors_and_weights(copy(s(Slice(0,i))), copy(transpose(U(_,Slice(0,i)))),\n\t\t\t\tcopy(VT(Slice(0,i),_)));\n\t}\n\treturn result;\n}\n\n\n/// reduce the rank using SVD\ntemplate<typename T>\nSVDTensor<T> SVDTensor<T>::compute_randomized_svd(const Tensor<T>& tensor,\n\t\tconst double& eps, std::array<long,2> vectordim) {\n\n\t// 1/8 is 0.125, so 0.2 should be good for all tensors other than the full rank ones\n\tlong maxrank=std::max(125.0,floor(0.2*sqrt(tensor.size())));\n\n\tdouble wall0=wall_time();\n\tRandomizedMatrixDecomposition<T> rmd=RMDFactory().maxrank(maxrank);\n\tTensor<T> Q=rmd.compute_range(tensor,eps*0.1,vectordim);\n\tdouble wall1=wall_time();\n\tdouble attempt=wall1-wall0;\n\tSVDTensor<T> result(tensor.ndim(),tensor.dims());\n\tif (rmd.exceeds_maxrank()) {\n\t\t// fallback option\n\t\twall0=wall_time();\n\t\tresult=compute_svd(tensor,eps,vectordim);\n\t\twall1=wall_time();\n\t\tprint(\"fall back into full SVD: rank, maxrank\",Q.dim(1),maxrank, attempt, wall1-wall0);\n\t} else if (Q.size()>0) {\n\t\tresult=compute_svd_from_range(Q,tensor);\n\t\tresult.truncate_svd(eps);\n\n\t} else {\n\t\tMADNESS_ASSERT(Q.size()==0);\n\t}\n\n\t// TODO: fixme\n//\tresult.orthonormalize(eps);\n\treturn result;\n\n}\n\ntemplate<typename T>\nSVDTensor<T> SVDTensor<T>::compute_svd_from_range(const Tensor<T>& Q, const Tensor<T>& tensor) {\n\ttypedef typename Tensor<T>::scalar_type scalar_type;\n\n\tMADNESS_ASSERT(tensor.size()%Q.dim(0) == 0);\n\tstd::array<long,2> vectordim={Q.dim(0),tensor.size()/Q.dim(0)};\n\tconst Tensor<T> matrix=RandomizedMatrixDecomposition<T>::resize_to_matrix(tensor,vectordim);\n\n\tTensor<T> B=inner(conj(Q),matrix,0,0);\n\tTensor<T> U,VT;\n\tTensor<scalar_type> s;\n\tsvd(B,U,s,VT);\n\tU=copy(conj_transpose(inner(Q,U)));\n\tSVDTensor<T> result(tensor.ndim(),tensor.dims());\n\tresult.set_vectors_and_weights(s,U,VT);\n\treturn result;\n}\n\ntemplate<typename T>\nvoid SVDTensor<T>::recompute_from_range(const Tensor<T>& Q) {\n\n\t// check dimensions\n\t// tensor = A = Q * Q(T) A = Q * Q(T) * left(T) * right\n\tMADNESS_ASSERT(Q.dim(0)==this->flat_vector(0).dim(1));\n\n\tconst Tensor<T> U_ri=this->make_left_vector_with_weights();\n\tconst Tensor<T> V_rj=this->flat_vector(1);\n\n\tTensor<T> B=inner(inner(conj(Q),U_ri,0,1),V_rj,1,0);\n\n\tTensor<T> U,VT;\n\ttypedef typename Tensor<T>::scalar_type scalar_type;\n\tTensor<scalar_type> s;\n\tsvd(B,U,s,VT);\n\n\tU=copy(conj_transpose(inner(Q,U)));\n\tthis->set_vectors_and_weights(s,U,VT);\n\n}\n\n\n/// reduce the rank using a divide-and-conquer approach\ntemplate<typename T>\nvoid SVDTensor<T>::divide_and_conquer_reduce(const double& thresh) {\n\n\tif (this->has_no_data() or rank()==0) return;\n\tif (rank()==1) {\n\t\tthis->normalize();\n\t\treturn;\n\t}\n\n\t// divide the SRConf into two\n\tconst long chunksize=8;\n\tif (rank()>chunksize) {\n\t\tSVDTensor<T> chunk1=this->get_configs(0,rank()/2);\n\t\tSVDTensor<T> chunk2=this->get_configs(rank()/2+1,rank()-1);\n\t\tchunk1.divide_and_conquer_reduce(thresh*0.5);\n\t\tchunk2.divide_and_conquer_reduce(thresh*0.5);\n\n\t\t// collect the two SRConfs\n\t\t*this=chunk1;\n\t\tthis->add_SVD(chunk2,thresh);\n\n\t} else {\n\n\t\t// and reduce the rank\n\t\tthis->orthonormalize(thresh);\n\t}\n    MADNESS_ASSERT(this->has_structure());\n}\n\ntemplate<typename T>\nvoid SVDTensor<T>::orthonormalize(const double& thresh) {\n\n\tif (this->has_no_data() or rank()==0) return;\n\tthis->normalize();\n\tif (rank()==1) return;\n\n\tTensor< typename Tensor<T>::scalar_type > weights=this->weights_(Slice(0,rank()-1));\n\n    Tensor<T> v0=this->flat_vector(0);\n    Tensor<T> v1=this->flat_vector(1);\n\tortho3(v0,v1,weights,thresh);\n    std::swap(this->vector_[0],v0);\n    std::swap(this->vector_[1],v1);\n    std::swap(this->weights_,weights);\n\tthis->make_structure();\n}\n\n\ntemplate<typename T>\nvoid SVDTensor<T>::orthonormalize_random(const double& eps) {\n\n\tif (this->has_no_data() or rank()==0) return;\n\tthis->normalize();\n\tif (rank()==1) return;\n\n\tlong maxrank=std::min(this->kVec(0),this->kVec(1));\n\n\tRandomizedMatrixDecomposition<T> rmd=RMDFactory().maxrank(maxrank);\n\tTensor<T> scr=this->make_left_vector_with_weights();\n\tTensor<T> Q=rmd.compute_range(scr,this->flat_vector(1),eps*0.1);\n\n\trecompute_from_range(Q);\n\ttruncate_svd(eps);\n\n\n}\n\ntemplate<typename T>\nvoid SVDTensor<T>::truncate_svd(const double& thresh) {\n\n\t// compute the numerical rank\n\tlong maxrank=SRConf<T>::max_sigma(thresh, rank(), this->weights_);\n\t*this=this->get_configs(0,maxrank);\n}\n\n\n\n\n// explicit instantiation\ntemplate class SVDTensor<float>;\ntemplate class SVDTensor<double>;\ntemplate class SVDTensor<float_complex>;\ntemplate class SVDTensor<double_complex>;\n\n} // namespace madness\n\n"
  },
  {
    "path": "src/madness/tensor/SVDTensor.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id: srconf.h 2816 2012-03-23 14:59:52Z 3ru6ruWu $\n */\n#ifndef SRC_MADNESS_TENSOR_SVDTENSOR_H_\n#define SRC_MADNESS_TENSOR_SVDTENSOR_H_\n\n#include <madness/tensor/srconf.h>\n\nnamespace madness{\n\n\ntemplate<typename T>\nclass SVDTensor : public SRConf<T> {\npublic:\n\tusing SRConf<T>::SRConf;\n\n\tSVDTensor() : SRConf<T>() {}\n\n\tSVDTensor(const Tensor<T>& rhs, const double eps) {\n\t\tif (rhs.has_data()) {\n//\t\t\t*this=compute_svd(rhs,eps);\n\t\t\t*this=compute_randomized_svd(rhs,eps);\n\t\t}\n\t}\n\n\tSVDTensor(const SVDTensor<T>& rhs) = default;\n\n\tSVDTensor(const SRConf<T>& rhs) : SRConf<T>(rhs) {    }\n\n\tSVDTensor(const std::vector<long>& dims) : SRConf<T>(dims.size(),dims.data(),dims.size()/2) {    }\n\n\tSVDTensor(const long ndims, const long* dims) : SRConf<T>(ndims,dims,ndims/2) {    }\n\n\tSVDTensor(const Tensor<double>& weights, const Tensor<T>& vector1,\n\t\t\tconst Tensor<T>& vector2, const long& ndim,\n\t\t\tconst long* dims) : SRConf<T>(weights, vector1, vector2, ndim, dims, ndim/2) {}\n\n\tSVDTensor& operator=(const T& number) {\n\t\tSRConf<T>& base=*this;\n\t\tbase=number;\n\t\treturn *this;\n\t}\n\n\tlong nCoeff() const {\n\t\treturn SRConf<T>::nCoeff();\n\t}\n\n\tlong rank() const {return SRConf<T>::rank();};\n\n\t/// reduce the rank using SVD\n\tstatic SVDTensor compute_svd(const Tensor<T>& tensor,\n\t\t\tconst double& eps, std::array<long,2> vectordim={0,0});\n\n\t/// reduce the rank using SVD\n\tstatic SVDTensor compute_randomized_svd(const Tensor<T>& tensor,\n\t\t\tconst double& eps, std::array<long,2> vectordim={0,0});\n\n\t/// compute an SVD from a given matrix and its range\n\n\t/// following Alg. 5.1 of HMT 2011\n\tstatic SVDTensor compute_svd_from_range(const Tensor<T>& range, const Tensor<T>& matrix);\n\n\t/// compute an SVD from a given matrix and its range\n\n\t/// following Alg. 5.1 of HMT 2011\n\tvoid recompute_from_range(const Tensor<T>& range);\n\n\n\t/// concatenate all arguments into a single SRConf (i.e. adding them all up)\n\tstatic SVDTensor<T> concatenate(const std::list<SVDTensor<T> >& addends) {\n\n\t\tif (addends.size()==0) return SVDTensor<T>();\n\n\t\t// collect all terms in a single SRConf\n\t\tSRConf<T> result(addends.front().ndim(),addends.front().dims(),addends.front().nci_left);\n\n\t\tlong totalrank=0;\n\t\tfor (auto a : addends) totalrank+=a.rank();\n\t\tif (totalrank==0) return result;\n\n\t\tauto dimensions=result.make_vector_dimensions(totalrank);\n\t\ttypedef typename TensorTypeData<T>::float_scalar_type float_scalar_type;\n\n\t\tTensor<float_scalar_type> weights(totalrank);\n\t\tTensor<T> vector0(result.nci_left+1,dimensions[0].data());\n\t\tvector0=vector0.reshape(totalrank,vector0.size()/totalrank);\n\t\tTensor<T> vector1(result.ndim()-result.nci_left+1,dimensions[1].data());\n\t\tvector1=vector1.reshape(totalrank,vector1.size()/totalrank);\n\n\t\tlong start=0;\n\t\tfor (auto a: addends) {\n\t\t\tMADNESS_ASSERT(compatible(result,a));\n\t\t\tlong end=start+a.rank()-1;\n\t\t\tvector0(Slice(start,end),_)=a.flat_vector(0);\n\t\t\tvector1(Slice(start,end),_)=a.flat_vector(1);\n\t\t\tweights(Slice(start,end))=a.weights_;\n\t\t\tstart+=a.rank();\n\t\t}\n\n\t\tresult.set_vectors_and_weights(weights,vector0,vector1);\n\t\treturn SVDTensor(result);\n\n\t}\n\n\tSVDTensor<T>& emul(const SVDTensor<T>& other) {\n\t\tconst SRConf<T>& base=other;\n\t\tSRConf<T>::emul(base);\n\t\treturn *this;\n\t}\n\n\tSVDTensor<T>& gaxpy(T alpha, const SVDTensor<T>& rhs, T beta) {\n\t\tthis->scale(alpha);\n\t\tthis->append(rhs,beta);\n\t\treturn *this;\n\t}\n\n\t// reduce the rank using a divide-and-conquer approach\n\tvoid divide_and_conquer_reduce(const double& thresh);\n\n\tvoid orthonormalize(const double& thresh);\n\n\tvoid orthonormalize_random(const double& thresh);\n\n\tvoid truncate_svd(const double& thresh);\n\n\tstatic std::string reduction_algorithm();\n\tstatic void set_reduction_algorithm(const std::string alg);\n\nprivate:\n\npublic:\n\n\ttemplate <typename R, typename Q>\n\tfriend SVDTensor<TENSOR_RESULT_TYPE(R,Q)> transform(\n\t\t\tconst SVDTensor<R>& t, const Tensor<Q>& c);\n\n\ttemplate <typename R, typename Q>\n\tfriend SVDTensor<TENSOR_RESULT_TYPE(R,Q)> general_transform(\n\t\t\tconst SVDTensor<R>& t, const Tensor<Q> c[]);\n\n\ttemplate <typename R, typename Q>\n\tfriend SVDTensor<TENSOR_RESULT_TYPE(R,Q)> transform_dir(\n\t\t\tconst SVDTensor<R>& t, const Tensor<Q>& c, const int axis);\n\n    template <typename R, typename Q>\n    friend SVDTensor<TENSOR_RESULT_TYPE(R,Q)> outer(\n    \t\tconst SVDTensor<R>& t1, const SVDTensor<Q>& t2);\n\n    friend SVDTensor<T> reduce(std::list<SVDTensor<T> >& addends, double eps) {\n    \tSVDTensor<T>& ref=addends.front();\n    \tif (ref.reduction_algorithm()==\"divide_conquer\") {\n        \tSVDTensor<T> result=SVDTensor<T>::concatenate(addends);\n        \tresult.divide_and_conquer_reduce(eps);\n        \treturn result;\n    \t} else if (ref.reduction_algorithm()==\"full\") {\n    \t\tSVDTensor<T> tmp=SVDTensor<T>::concatenate(addends);\n    \t\tTensor<T> full=tmp.reconstruct();\n    \t\treturn SVDTensor<T>(full,eps);\n    \t} else if (ref.reduction_algorithm()==\"rmd\") {\n    \t\tSVDTensor<T> result=SVDTensor<T>::concatenate(addends);\n    \t\tresult.orthonormalize_random(eps);\n    \t\treturn result;\n    \t} else {\n    \t\tMADNESS_EXCEPTION(\"unknown reduction algorithm in SVDTensor.h\",1);\n    \t\treturn SVDTensor<T>();\n    \t}\n\n    }\n\n    friend SVDTensor<T> copy(const SVDTensor<T>& rhs) {\n    \tconst SRConf<T>& base=rhs;\n    \treturn SVDTensor<T>(copy(base));\n    }\n\n};\n\ntemplate <typename R, typename Q>\nSVDTensor<TENSOR_RESULT_TYPE(R,Q)> transform(\n\t\tconst SVDTensor<R>& t, const Tensor<Q>& c) {\n\treturn SVDTensor<TENSOR_RESULT_TYPE(R,Q)>(t.transform(c));\n}\n\ntemplate <typename R, typename Q>\nSVDTensor<TENSOR_RESULT_TYPE(R,Q)> general_transform(\n\t\tconst SVDTensor<R>& t, const Tensor<Q> c[]) {\n\treturn SVDTensor<TENSOR_RESULT_TYPE(R,Q)>(t.general_transform(c));\n}\n\ntemplate <typename R, typename Q>\nSVDTensor<TENSOR_RESULT_TYPE(R,Q)> transform_dir(\n\t\tconst SVDTensor<R>& t, const Tensor<Q>& c, const int axis) {\n\treturn SVDTensor<TENSOR_RESULT_TYPE(R,Q)>(t.transform_dir(c, axis));\n}\n\n}\n\n\n\n#endif /* SRC_MADNESS_TENSOR_SVDTENSOR_H_ */\n"
  },
  {
    "path": "src/madness/tensor/aligned.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_TENSOR_ALIGNED_H__INCLUDED\n#define MADNESS_TENSOR_ALIGNED_H__INCLUDED\n\n/*!\n  \\file tensor/aligned.h\n  \\brief Provides routines for internal use optimized for aligned data\n\n  This stuff used to be implemented in assembly but it is too much\n  effort keeping that working especially for multiple compilers.\n*/\n\n#include <madness/madness_config.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/cblas.h>\n#include <cstring>\n#include <climits>\n\nnamespace madness {\n\n    template <typename T>\n    static\n    inline\n    void aligned_zero(long n, T* a) {\n#ifdef HAVE_MEMSET\n        // A hand coded SSE2 loop is faster only for data in the L1 cache\n        std::memset((void *) a, 0, n*sizeof(T));\n#else\n        long n4 = (n>>2)<<2;\n        long rem = n-n4;\n        for (long i=0; i<n4; i+=4,a+=4) {\n            a[0] = 0;\n            a[1] = 0;\n            a[2] = 0;\n            a[3] = 0;\n        }\n        for (long i=0; i<rem; ++i) *a++ = 0;\n#endif\n    }\n\n    template <typename T, typename Q>\n    static\n    inline\n    void aligned_axpy(long n, T* MADNESS_RESTRICT a, const T* MADNESS_RESTRICT b, Q s) {\n        long n4 = (n>>2)<<2;\n        long rem = n-n4;\n        for (long i=0; i<n4; i+=4,a+=4,b+=4) {\n            a[0] += s*b[0];\n            a[1] += s*b[1];\n            a[2] += s*b[2];\n            a[3] += s*b[3];\n        }\n        for (long i=0; i<rem; ++i) *a++ += s * *b++;\n    }\n\n    /* Jeff: In the following three template specializations, a long is implicitly\n     *       cast into the MADNESS integer type, which defaults to int64_t but can\n     *       be int32_t, in which case, there could be an overflow for n>INT_MAX.\n     *\n     *       I am choosing to ignore this issue for now. I know all of the workarounds\n     *       but it seems unlikely that they will be necessary because 2^31 is a big number. */\n    template <>\n    //static\n    inline\n    void aligned_axpy(long n, double * MADNESS_RESTRICT a, const double * MADNESS_RESTRICT b, double s) {\n        madness::cblas::axpy((integer)n, s, (double*)b, 1, (double*)a, 1);\n    }\n\n    /* Jeff: I have no idea if casting double_complex to complex_real8 is valid... */\n\n    template <>\n    //static\n    inline\n    void aligned_axpy(long n, double_complex * MADNESS_RESTRICT a, const double_complex * MADNESS_RESTRICT b, double_complex s) {\n        madness::cblas::axpy((integer)n, (complex_real8)s, (complex_real8*)b, 1, (complex_real8*)a, 1);\n    }\n\n    template <>\n    //static\n    inline\n    void aligned_axpy(long n, double_complex * MADNESS_RESTRICT a, const double_complex * MADNESS_RESTRICT b, double s) {\n        complex_real8 cs(s,0.0); // turn real into complex\n        madness::cblas::axpy((integer)n, cs, (complex_real8*)b, 1, (complex_real8*)a, 1);\n    }\n\n    template <typename T, typename Q>\n    static\n    inline\n    void aligned_add(long n, T* MADNESS_RESTRICT a, const Q* MADNESS_RESTRICT b) {\n        long n4 = (n>>2)<<2;\n        long rem = n-n4;\n        for (long i=0; i<n4; i+=4,a+=4,b+=4) {\n            a[0] += b[0];\n            a[1] += b[1];\n            a[2] += b[2];\n            a[3] += b[3];\n        }\n        for (long i=0; i<rem; ++i) *a++ += *b++;\n    }\n\n    template <typename T, typename Q>\n    static\n    inline\n    void aligned_sub(long n, T* MADNESS_RESTRICT a, const Q* MADNESS_RESTRICT b) {\n        long n4 = (n>>2)<<2;\n        long rem = n-n4;\n        for (long i=0; i<n4; i+=4,a+=4,b+=4) {\n            a[0] -= b[0];\n            a[1] -= b[1];\n            a[2] -= b[2];\n            a[3] -= b[3];\n        }\n        for (long i=0; i<rem; ++i) *a++ -= *b++;\n    }\n}\n\n#endif // MADNESS_TENSOR_ALIGNED_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/basetensor.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#include <iostream>\n\n#include <algorithm>\n\n#include \"basetensor.h\"\n\n#include \"tensorexcept.h\"\n\n/// \\file basetensor.cc\n/// \\brief Implements BaseTensor\n\nnamespace madness {\n\n#ifdef TENSOR_INSTANCE_COUNT\n  madness::AtomicInt BaseTensor::instance_count;\n#endif\n\n\n    /// Reshape the size and number of dimensions.\n\n    /// Modifies the current tensor to have the number and size of\n    /// dimensions as described in the \\c vector \\c d .  The total number\n    /// of elements must be the same before and after, and the current\n    /// tensor must be contiguous.\n    void BaseTensor::reshape_inplace(int nd, const long* d) {\n        TENSOR_ASSERT(iscontiguous(),\n                      \"cannot reshape non-contiguous tensor ... consider fuse/splitdim\",\n                      0,this);\n        long newsize=1;\n        for (long i=0; i<nd; ++i) newsize *= d[i];\n        TENSOR_ASSERT(_size == newsize,\"old and new sizes do not match\",_size,this);\n        set_dims_and_size(nd,&(d[0]));\n    }\n\n    /// Reshape the size and number of dimensions.\n\n    /// Modifies the current tensor to have the number and size of\n    /// dimensions as described in the \\c vector \\c d .  The total number\n    /// of elements must be the same before and after, and the current\n    /// tensor must be contiguous.\n    void BaseTensor::reshape_inplace(const std::vector<long>& d) {\n        reshape_inplace(d.size(), &d[0]);\n    }\n\n    /// Reshape the current tensor to be the same size and 1-d. It must be contiguous.\n    void BaseTensor::flat_inplace() {\n        TENSOR_ASSERT(iscontiguous(),\"not contiguous\",0,this);\n        long d[] = {_size};\n        set_dims_and_size(1,d);\n    }\n\n    /// Split dimension i in two ... the product of the new dimensions must match the old.\n    void BaseTensor::splitdim_inplace(long i, long dimi0, long dimi1) {\n        if (i < 0) i += _ndim;\n        TENSOR_ASSERT(i>=0 && i<_ndim, \"invalid dimension\", i, this);\n        TENSOR_ASSERT(dimi0*dimi1 == _dim[i], \"before & after sizes do not match\",\n                      _dim[i], this);\n        TENSOR_ASSERT(_ndim+1 <= TENSOR_MAXDIM, \"resulting tensor has too many dimensions\",\n                      _ndim+1, this);\n        for (long j=_ndim-1; j>i; --j) {\n            _dim[j+1] = _dim[j];\n            _stride[j+1] = _stride[j];\n        }\n        _dim[i+1] = dimi1;\n        _stride[i+1] = _stride[i];\n        _dim[i] = dimi0;\n        _stride[i] *= dimi1;\n        ++_ndim;\n    }\n\n    /// Fuse the contiguous dimensions i and i+1.\n    void BaseTensor::fusedim_inplace(long i) { // fuse i,i+1 --> i\n        if (i < 0) i += _ndim;\n        TENSOR_ASSERT(i>=0 && i<(_ndim-1) && _ndim>1,\"invalid dimension\",i,this);\n        TENSOR_ASSERT(_stride[i] == _dim[i+1]*_stride[i+1],\"dimensions are not contiguous\",\n                      i, this);\n        _dim[i] *= _dim[i+1];\n        _stride[i] = _stride[i+1];\n        for (long j=i+1; j<=_ndim-1; ++j) {\n            _dim[j] = _dim[j+1];\n            _stride[j] = _stride[j+1];\n        }\n        _ndim--;\n        _dim[_ndim] = 1;\t\t// So can iterate over missing dimensions\n        _stride[_ndim] = 0;\n    }\n\n    /// Swap the dimensions i and j.\n    void BaseTensor::swapdim_inplace(long i, long j) {\n        if (i < 0) i += _ndim;\n        if (j < 0) j += _ndim;\n        TENSOR_ASSERT(i>=0 && i<_ndim,\"invalid dimension i\",i,this);\n        TENSOR_ASSERT(j>=0 && j<_ndim,\"invalid dimension j\",j,this);\n        std::swap<long>(_dim[i],_dim[j]);\n        std::swap<long>(_stride[i],_stride[j]);\n    }\n\n    /// Cyclic shift by nshift places of the inclusive range of dimensions [start,....,end]\n    void BaseTensor::cycledim_inplace(long nshift, long start, long end) {\n        long ndshift, dimtmp[TENSOR_MAXDIM], _stridetmp[TENSOR_MAXDIM];\n        if (start < 0) start += _ndim; // Same convention for -ve as in Slice\n        if (end < 0) end += _ndim;\n        TENSOR_ASSERT(start>=0 && start<_ndim,\"invalid start dimension\",start,this);\n        TENSOR_ASSERT(end>=0 && end>=start,\"invalid end dimension\",end,this);\n\n        ndshift = end - start + 1;\n        for (long i=start; i<=end; ++i) {\n            dimtmp[i] = _dim[i];\n            _stridetmp[i] = _stride[i];\n        }\n        for (long i=end; i>=start; --i) {\n            long j = i + nshift;\n            while (j > end) j -= ndshift;\n            while (j < start) j += ndshift;\n            _dim[j] = dimtmp[i];\n            _stride[j] = _stridetmp[i];\n        }\n    }\n\n    /// General permuation of the dimensions\n    void BaseTensor::mapdim_inplace(const std::vector<long>& map) {\n        TENSOR_ASSERT(_ndim == (int) map.size(),\"map[] must include all dimensions\",map.size(),this);\n        long tmpd[TENSOR_MAXDIM], tmps[TENSOR_MAXDIM];\n        for (long i=0; i<_ndim; ++i) {\n            tmpd[map[i]] = _dim[i];\n            tmps[map[i]] = _stride[i];\n        }\n        for (long i=0; i<_ndim; ++i) {\n            _dim[i] = tmpd[i];\n            _stride[i] = tmps[i];\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/basetensor.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#ifndef MADNESS_TENSOR_BASETENSOR_H__INCLUDED\n#define MADNESS_TENSOR_BASETENSOR_H__INCLUDED\n\n/// \\file basetensor.h\n/// \\brief Declares BaseTensor\n\n#include <complex>\n\ntypedef std::complex<float> float_complex;\ntypedef std::complex<double> double_complex;\n\n// These probably have to be included in this order\n#include <madness/tensor/tensor_macros.h>\n#include <madness/tensor/type_data.h>\n#include <madness/tensor/slice.h>\n#include <madness/tensor/vector_factory.h>\n\n#include <madness/madness_config.h>\n#include <madness/tensor/slice.h>\n#include <madness/tensor/tensor_macros.h>\n\n#ifdef TENSOR_INSTANCE_COUNT\n#include <madness/world/atomicint.h>\n#endif\n\nnamespace madness {\n    /*!\n      \\ingroup tensor\n      \\brief The base class for tensors defines generic capabilities.\n\n      The base class manages the size, dimension and\n      stride information, and provides operations to manipulate\n      them.\n\n      It also provides methods for type-safe operation on tensors using\n      just the base class pointers. This interface is primarily useful\n      only to the interface to Python, since Python is largely neutral\n      to (and ignorant of) the type.  These are still being\n      re-implemented after the big clean up.\n\n      Since the base tensor class is virtual, you cannot have an\n      instance of it.  Thus, in addition to methods that return information\n      or perform checks, there are two types of base tensor\n      operations.\n        - Inplace operations change \\c *this , and return \\c void .\n        - Operations that must return a new tensor return a pointer to a tensor\n          allocated with \\c new on the heap.  The caller is responsible for\n          eventually freeing the memory using \\c delete .\n    */\n    class BaseTensor {\n    private:\n#ifdef TENSOR_INSTANCE_COUNT\n        static madness::AtomicInt instance_count; ///< For debug, count total# instances\n#endif\n\n    protected:\n\n        long _size;\t\t\t///< Number of elements in the tensor\n        long _ndim;\t\t\t///< Number of dimensions (-1=invalid; 0=no supported; >0=tensor)\n        long _id; \t\t\t///< Id from TensorTypeData<T> in type_data.h\n        long _dim[TENSOR_MAXDIM];\t///< Size of each dimension\n        long _stride[TENSOR_MAXDIM];     ///< Increment between elements in each dimension\n\n        void set_dims_and_size(long nd, const long d[]) {\n            _ndim = nd;\n            _size = 1;\n            if (_ndim < 0) _size=0;\n            for (long i=_ndim-1; i>=0; --i) {\n                _dim[i] = d[i];\n                _stride[i] = _size;\n                _size *= d[i];\n            }\n            for (long i=std::max(_ndim,0L); i<TENSOR_MAXDIM; ++i) { // So can iterate over missing dimensions\n                _dim[i] = 1;\n                _stride[i] = 0;\n            }\n        }\n\n    public:\n\n        BaseTensor() : _size(0), _ndim(-1) {\n#ifdef TENSOR_INSTANCE_COUNT\n            instance_count++;\n#endif\n        }\n\n        virtual ~BaseTensor() {\n#ifdef TENSOR_INSTANCE_COUNT\n            instance_count--;\n#endif\n        }\n\n        /// Returns the count of all current instances of tensors & slice tensors of all types.\n        static inline int get_instance_count() {\n#ifdef TENSOR_INSTANCE_COUNT\n            return instance_count;\n#else\n            return 0;\n#endif\n        }\n\n        /// Returns the number of elements in the tensor\n        long size() const {return _size;}\n\n        /// Returns the typeid of the tensor (c.f., \\c TensorTypeData<T> )\n        long id() const {return _id;}\n\n        /// Returns the number of dimensions in the tensor\n        long ndim() const {return _ndim;}\n\n        /// Returns the size of dimension \\c i\n        long dim(int i) const {return _dim[i];}\n\n        /// Returns the stride associated with dimension \\c i\n        long stride(int i) const {return _stride[i];}\n\n        /// Returns the array of tensor dimensions\n        const long* dims() const {return _dim;}\n\n        /// Returns the array of tensor strides\n        const long* strides() const {return _stride;}\n\n        /// Returns true if this and *t are the same shape and size\n        bool conforms(const BaseTensor *t) const {\n            if (_ndim != t->_ndim) return false;\n            for (long i=0; i<_ndim; ++i) {\n                if (_dim[i] != t->_dim[i]) return false;\n            }\n            return true;\n        }\n\n        /// Returns true if the tensor refers to contiguous memory locations.\n        bool iscontiguous() const {\n            if (_size <= 0) return true;\n            long sz = 1;\n            for (long i=_ndim-1; i>=0; --i) {\n                if (_stride[i] != sz) return false;\n                sz *= _dim[i];\n            }\n            return true;\n        }\n\n    protected:\n\n        /// Reshapes the tensor inplace\n        void reshape_inplace(const std::vector<long>& d);\n\n        /// Reshapes the tensor inplace\n        void reshape_inplace(int ndimnew, const long* d);\n\n        /// Reshapes the tensor inplace into 1D\n        void flat_inplace();\n\n        /// Splits dimension \\c i\n        void splitdim_inplace(long i, long dimi0, long dimi1);\n\n        /// Fuses dimensions \\c i and \\c i+1\n        void fusedim_inplace(long i);\n\n        /// Swaps the dimensions\n        void swapdim_inplace(long i, long j);\n\n        /// Cyclic shift of dimensions\n        void cycledim_inplace(long shift, long start, long end);\n\n        /// General permutation of dimensions\n        void mapdim_inplace(const std::vector<long>& map);\n    };\n\n}\n\n#endif // MADNESS_TENSOR_BASETENSOR_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/cblas.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#ifndef MADNESS_LINALG_CBLAS_H__INCLUDED\n#define MADNESS_LINALG_CBLAS_H__INCLUDED\n\n/// \\file cblas.h\n/// \\brief Define BLAS like functions\n\n\n#include <madness/fortran_ctypes.h>\n#include <madness/madness_config.h>\n#include <madness/world/madness_exception.h>\n\n// MKL direct macros produce a zillion warning messages about unused variables --- disable this warning just in this header\nMADNESS_PRAGMA_GCC(diagnostic push)\nMADNESS_PRAGMA_GCC(diagnostic ignored \"-Wunused-value\")\nMADNESS_PRAGMA_CLANG(diagnostic push)\nMADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wunused-value\")\n\n#if defined(FORTRAN_LINKAGE_LC) || (defined(HAVE_INTEL_MKL) && defined(MKL_DIRECT_CALL))\n\n#   define F77_SGEMM sgemm\n#   define F77_DGEMM dgemm\n#   define F77_CGEMM cgemm\n#   define F77_ZGEMM zgemm\n#ifdef HAVE_INTEL_MKL\n#   define F77_SCGEMM scgemm\n#   define F77_DZGEMM dzgemm\n#endif\n#   define F77_SGEMV sgemv\n#   define F77_DGEMV dgemv\n#   define F77_CGEMV cgemv\n#   define F77_ZGEMV zgemv\n#   define F77_SSCAL sscal\n#   define F77_DSCAL dscal\n#   define F77_CSCAL cscal\n#   define F77_ZSCAL zscal\n#   define F77_CSSCAL csscal\n#   define F77_ZDSCAL zdscal\n#   define F77_SDOT sdot\n#   define F77_DDOT ddot\n#   define F77_CDOTU cdotu\n#   define F77_ZDOTU zdotu\n#   define F77_SAXPY saxpy\n#   define F77_DAXPY daxpy\n#   define F77_CAXPY caxpy\n#   define F77_ZAXPY zaxpy\n\n#elif defined(FORTRAN_LINKAGE_LCU)\n\n#   define F77_SGEMM sgemm_\n#   define F77_DGEMM dgemm_\n#   define F77_CGEMM cgemm_\n#   define F77_ZGEMM zgemm_\n#ifdef HAVE_INTEL_MKL\n#  define F77_SCGEMM scgemm_\n#  define F77_DZGEMM dzgemm_\n#endif\n#   define F77_SGEMV sgemv_\n#   define F77_DGEMV dgemv_\n#   define F77_CGEMV cgemv_\n#   define F77_ZGEMV zgemv_\n#   define F77_SSCAL sscal_\n#   define F77_DSCAL dscal_\n#   define F77_CSCAL cscal_\n#   define F77_ZSCAL zscal_\n#   define F77_CSSCAL csscal_\n#   define F77_ZDSCAL zdscal_\n#   define F77_SDOT sdot_\n#   define F77_DDOT ddot_\n#   define F77_CDOTU cdotu_\n#   define F77_ZDOTU zdotu_\n#   define F77_SAXPY saxpy_\n#   define F77_DAXPY daxpy_\n#   define F77_CAXPY caxpy_\n#   define F77_ZAXPY zaxpy_\n\n#elif defined(FORTRAN_LINKAGE_LCUU)\n\n#   define F77_SGEMM  sgemm__\n#   define F77_DGEMM  dgemm__\n#   define F77_CGEMM  cgemm__\n#   define F77_ZGEMM  zgemm__\n#ifdef HAVE_INTEL_MKL\n#   define F77_SCGEMM scgemm__\n#   define F77_DZGEMM dzgemm__\n#endif\n#   define F77_SGEMV  sgemv__\n#   define F77_DGEMV  dgemv__\n#   define F77_CGEMV  cgemv__\n#   define F77_ZGEMV  zgemv__\n#   define F77_SSCAL  sscal__\n#   define F77_DSCAL  dscal__\n#   define F77_CSCAL  cscal__\n#   define F77_ZSCAL  zscal__\n#   define F77_CSSCAL csscal__\n#   define F77_ZDSCAL zdscal__\n#   define F77_SDOT   sdot__\n#   define F77_DDOT   ddot__\n#   define F77_CDOTU  cdotu__\n#   define F77_ZDOTU  zdotu__\n#   define F77_SAXPY  saxpy__\n#   define F77_DAXPY  daxpy__\n#   define F77_CAXPY  caxpy__\n#   define F77_ZAXPY  zaxpy__\n\n#elif defined(FORTRAN_LINKAGE_UC)\n\n#   define F77_SGEMM  SGEMM\n#   define F77_DGEMM  DGEMM\n#   define F77_CGEMM  CGEMM\n#   define F77_ZGEMM  ZGEMM\n#ifdef HAVE_INTEL_MKL\n#   define F77_SCGEMM SCGEMM\n#   define F77_DZGEMM DZGEMM\n#endif\n#   define F77_SGEMV  SGEMV\n#   define F77_DGEMV  DGEMV\n#   define F77_CGEMV  CGEMV\n#   define F77_ZGEMV  ZGEMV\n#   define F77_SSCAL  SSCAL\n#   define F77_DSCAL  DSCAL\n#   define F77_CSCAL  CSCAL\n#   define F77_ZSCAL  ZSCAL\n#   define F77_CSSCAL CSSCAL\n#   define F77_ZDSCAL ZDSCAL\n#   define F77_SDOT   SDOTU\n#   define F77_DDOT   DDOTU\n#   define F77_CDOTU  CDOTU\n#   define F77_ZDOTU  ZDOTU\n#   define F77_SAXPY  SAXPY\n#   define F77_DAXPY  DAXPY\n#   define F77_CAXPY  CAXPY\n#   define F77_ZAXPY  ZAXPY\n\n#elif defined(FORTRAN_LINKAGE_UCU)\n\n#   define F77_SGEMM  SGEMM_\n#   define F77_DGEMM  DGEMM_\n#   define F77_CGEMM  CGEMM_\n#   define F77_ZGEMM  ZGEMM_\n#ifdef HAVE_INTEL_MKL\n#   define F77_SCGEMM SCGEMM_\n#   define F77_DZGEMM DZGEMM_\n#endif\n#   define F77_SGEMV  SGEMV_\n#   define F77_DGEMV  DGEMV_\n#   define F77_CGEMV  CGEMV_\n#   define F77_ZGEMV  ZGEMV_\n#   define F77_SSCAL  SSCAL_\n#   define F77_DSCAL  DSCAL_\n#   define F77_CSCAL  CSCAL_\n#   define F77_ZSCAL  ZSCAL_\n#   define F77_CSSCAL CSSCAL_\n#   define F77_ZDSCAL ZDSCAL_\n#   define F77_SDOT   SDOT_\n#   define F77_DDOT   DDOTSUB_\n#   define F77_CDOTU  CDOTU_\n#   define F77_ZDOTU  ZDOTU_\n#   define F77_SAXPY  SAXPY_\n#   define F77_DAXPY  DAXPY_\n#   define F77_CAXPY  CAXPY_\n#   define F77_ZAXPY  ZAXPY_\n\n#else\n// If detected another convention complain loudly.\n#   error \"cblas.h does not support the current Fortran symbol convention -- please, edit and check in the changes.\"\n#endif\n\n// process BLAS parts that are not directly callable in MKL\n#if defined(FORTRAN_LINKAGE_LC)\n#   define F77_SGER sger\n#   define F77_DGER dger\n#   define F77_CGER cger\n#   define F77_ZGER zger\n#elif defined(FORTRAN_LINKAGE_LCU)\n#   define F77_SGER sger_\n#   define F77_DGER dger_\n#   define F77_CGER cger_\n#   define F77_ZGER zger_\n#elif defined(FORTRAN_LINKAGE_LCUU)\n#   define F77_SGER   sger__\n#   define F77_DGER   dger__\n#   define F77_CGER   cger__\n#   define F77_ZGER   zger__\n#elif defined(FORTRAN_LINKAGE_UC)\n#   define F77_SGER   SGER\n#   define F77_DGER   DGER\n#   define F77_CGER   CGER\n#   define F77_ZGER   ZGER\n#elif defined(FORTRAN_LINKAGE_UCU)\n#   define F77_SGER   SGER_\n#   define F77_DGER   DGER_\n#   define F77_CGER   CGER_\n#   define F77_ZGER   ZGER_\n#else\n// If detected another convention complain loudly.\n#   error \"cblas.h does not support the current Fortran symbol convention -- please, edit and check in the changes.\"\n#endif\n\nextern \"C\" {\n\n// BLAS _GER declarations, not directly callable via MKL\nvoid F77_SGER(const integer *, const integer *, const float *, const float *,\n              const integer *, const float *, const integer *, float *,\n              const integer *);\nvoid F77_DGER(const integer *, const integer *, const double *, const double *,\n              const integer *, const double *, const integer *, double *,\n              const integer *);\nvoid F77_CGER(const integer *, const integer *, const complex_real4 *,\n              const complex_real4 *, const integer *, const complex_real4 *,\n              const integer *, complex_real4 *, const integer *);\nvoid F77_ZGER(const integer *, const integer *, const complex_real8 *,\n              const complex_real8 *, const integer *, const complex_real8 *,\n              const integer *, complex_real8 *, const integer *);\n}\n\n#ifndef MKL_DIRECT_CALL\n\nextern \"C\" {\n\n    // BLAS _GEMM declarations\n    void F77_SGEMM(const char*, const char*, const integer*, const integer*,\n            const integer*, const float*, const float*, const integer*,\n            const float*, const integer*, const float*, float*, const integer*);\n    void F77_DGEMM(const char*, const char*, const integer*, const integer*,\n            const integer*, const double*, const double*, const integer*,\n            const double*, const integer*, const double*, double*, const integer*);\n    void F77_CGEMM(const char*, const char*, const integer*, const integer*,\n            const integer*, const complex_real4*, const complex_real4*,\n            const integer*, const complex_real4*, const integer*,\n            const complex_real4*, complex_real4*, const integer*);\n    void F77_ZGEMM(const char*, const char*, const integer*, const integer*,\n            const integer*, const complex_real8*, const complex_real8*,\n            const integer*, const complex_real8*, const integer*,\n            const complex_real8*, complex_real8*, const integer*);\n\n#ifdef HAVE_INTEL_MKL\n    void F77_SCGEMM(const char*, const char*, const integer*, const integer*,\n            const integer*, const complex_real4*, const real4*,\n            const integer*, const complex_real4*, const integer*,\n            const complex_real4*, complex_real4*, const integer*);\n    void F77_DZGEMM(const char*, const char*, const integer*, const integer*,\n            const integer*, const complex_real8*, const real8*,\n            const integer*, const complex_real8*, const integer*,\n            const complex_real8*, complex_real8*, const integer*);\n#endif\n\n    // BLAS _GEMV declarations\n    void F77_SGEMV(const char*, const integer*, const integer*, const float*,\n            const float*, const integer*, const float*, const integer*,\n            const float*, float*, const integer*);\n    void F77_DGEMV(const char*, const integer*, const integer*, const double*,\n            const double*, const integer*, const double*, const integer*,\n            const double*, double*, const integer*);\n    void F77_CGEMV(const char*, const integer*, const integer*, const complex_real4*,\n            const complex_real4*, const integer*, const complex_real4*,\n            const integer*, const complex_real4*, complex_real4*, const integer*);\n    void F77_ZGEMV(const char*, const integer*, const integer*, const complex_real8*,\n            const complex_real8*, const integer*, const complex_real8*,\n            const integer*, const complex_real8*, complex_real8*, const integer*);\n\n    // BLAS _SCAL declarations\n    void F77_SSCAL(const integer*, const float*, float*, const integer*);\n    void F77_DSCAL(const integer*, const double*, double*, const integer*);\n    void F77_CSCAL(const integer*, const complex_real4*, complex_real4*, const integer*);\n    void F77_CSSCAL(const integer*, const float*, complex_real4*, const integer*);\n    void F77_ZSCAL(const integer*, const complex_real8*, complex_real8*, const integer*);\n    void F77_ZDSCAL(const integer*, const double*, complex_real8*, const integer*);\n\n    // BLAS _DOT declarations\n    float F77_SDOT(const integer*, const float*, const integer*, const float*,\n            const integer*);\n    double F77_DDOT(const integer*, const double *, const integer*,\n            const double *, const integer*);\n    void F77_CDOTU(complex_real4*, const integer*, const complex_real4*, const integer*,\n            const complex_real4*, const integer*);\n    void F77_ZDOTU(complex_real8*, const integer*, const complex_real8*, const integer*,\n            const complex_real8*, const integer*);\n    //\n    // BLAS _AXPY declarations (INTEGER n, NUMERICAL alpha, NUMERICAL x, INTEGER incx, NUMERICAL y, INTEGER incy )\n    void F77_SAXPY(const integer*, const float*, const float*, const integer*,\n            float*, const integer*);\n    void F77_DAXPY(const integer*, const double*, const double*, const integer*,\n            double*, const integer*);\n    void F77_CAXPY(const integer*, const complex_real4*, const complex_real4*,\n            const integer*, complex_real4*, const integer*);\n    void F77_ZAXPY(const integer*, const complex_real8*, const complex_real8*,\n            const integer*, complex_real8*, const integer*);\n}\n#else\n\n# include <mkl.h>\n\n#endif // !defined(MKL_DIRECT_CALL)\n\n// some BLAS libraries use custom complex types in their interface, so need to include their definitions here\n#include <madness/tensor/cblas_types.h>\n\nnamespace madness {\nnamespace cblas {\n\n    /// Multiplies a matrix by a vector\n\n    /// \\f[\n    /// \\mathbf{C} \\leftarrow \\alpha \\mathbf{A}^{\\mathrm{OpA}} \\mathbf{B}^{\\mathrm{OpB}} + \\beta \\mathbf{C}\n    /// \\f]\n    /// \\param OpA Operation to be applied to matrix \\f$ \\mathbf{A} \\f$\n    /// \\param OpB Operation to be applied to matrix \\f$ \\mathbf{B} \\f$\n    /// \\param m Rows in matrix \\f$ \\mathbf{C} \\f$\n    /// \\param n Columns in matrix \\f$ \\mathbf{C} \\f$\n    /// \\param k Inner dimension size for matrices \\f$ \\mathbf{A} \\f$ and \\f$ \\mathbf{B} \\f$\n    /// \\param alpha Scaling factor applied to \\f$ \\mathbf{A} \\f$ \\c * \\f$ \\mathbf{B} \\f$\n    /// \\param a Pointer to matrix \\f$ \\mathbf{A} \\f$\n    /// \\param lda The size of the leading-order dimension of matrix \\f$ \\mathbf{A} \\f$\n    /// \\param b Pointer to matrix \\f$ \\mathbf{A} \\f$\n    /// \\param ldb The size of the leading-order dimension of matrix \\f$ \\mathbf{B} \\f$\n    /// \\param beta Scaling factor for matrix \\f$ \\mathbf{C} \\f$\n    /// \\param c Pointer to matrix \\f$ \\mathbf{C} \\f$\n    /// \\param ldc The size of the leading-order dimension of matrix \\f$ \\mathbf{C} \\f$\n    ///@{\n    inline void gemm(const CBLAS_TRANSPOSE OpA, const CBLAS_TRANSPOSE OpB,\n            const integer m, const integer n, const integer k, const float alpha,\n            const float* a, const integer lda, const float* b, const integer ldb,\n            const float beta, float* c, const integer ldc)\n    {\n        MADNESS_ASSERT(OpA != ConjTrans);\n        MADNESS_ASSERT(OpB != ConjTrans);\n        static const char *op[] = { \"n\",\"t\" };\n        F77_SGEMM(op[OpA], op[OpB], &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc);\n    }\n\n    inline void gemm(const CBLAS_TRANSPOSE OpA, const CBLAS_TRANSPOSE OpB,\n            const integer m, const integer n, const integer k, const double alpha,\n            const double* a, const integer lda, const double* b, const integer ldb,\n            const double beta, double* c, const integer ldc) {\n        MADNESS_ASSERT(OpA != ConjTrans);\n        MADNESS_ASSERT(OpB != ConjTrans);\n        static const char *op[] = { \"n\",\"t\" };\n        F77_DGEMM(op[OpA], op[OpB], &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc);\n    }\n\n    inline void gemm(const CBLAS_TRANSPOSE OpA, const CBLAS_TRANSPOSE OpB,\n            const integer m, const integer n, const integer k,\n            const complex_real4 alpha, const complex_real4* a, const integer lda,\n            const complex_real4* b, const integer ldb, const complex_real4 beta,\n            complex_real4* c, const integer ldc) {\n      static const char *op[] = {\"n\", \"t\", \"c\"};\n      F77_CGEMM(op[OpA], op[OpB], &m, &n, &k, cblas::to_cptr(&alpha),\n                cblas::to_cptr(a), &lda, cblas::to_cptr(b), &ldb,\n                cblas::to_cptr(&beta), cblas::to_cptr(c), &ldc);\n    }\n\n    inline void gemm(const CBLAS_TRANSPOSE OpA, const CBLAS_TRANSPOSE OpB,\n            const integer m, const integer n, const integer k,\n            const complex_real8 alpha, const complex_real8* a, const integer lda,\n            const complex_real8* b, const integer ldb, const complex_real8 beta,\n            complex_real8* c, const integer ldc) {\n      static const char *op[] = {\"n\", \"t\", \"c\"};\n      F77_ZGEMM(op[OpA], op[OpB], &m, &n, &k, cblas::to_zptr(&alpha),\n                cblas::to_zptr(a), &lda, cblas::to_zptr(b), &ldb,\n                cblas::to_zptr(&beta), cblas::to_zptr(c), &ldc);\n    }\n\n#ifdef HAVE_INTEL_MKL\n    inline void gemm(const CBLAS_TRANSPOSE OpA, const CBLAS_TRANSPOSE OpB,\n                     const integer m, const integer n, const integer k,\n                     const complex_real4 alpha, const complex_real4* a, const integer lda,\n                     const real4* b, const integer ldb, const complex_real4 beta,\n                     complex_real4* c, const integer ldc) {\n\n        //static const char *op[] = { \"n\",\"t\",\"c\" };\n        //F77_CSGEMM(op[OpA], op[OpB], &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc);\n\n        //Don't have CSGEMM ... only SCGEMM ... so use A*B = (BT * AT)T\n\n      //complex_real4 ctrans[m*n]; // Here assume matrices are small and can be allocated on the stack\n      complex_real4* ctrans = new complex_real4[m*n];\n        static const char *opT[] = { \"t\",\"n\",\"c\" }; // Transpose of op ... conj-transpose not working yet\n        MADNESS_ASSERT(OpA!=ConjTrans && OpB!=ConjTrans);\n        const complex_real4 zero = 0.0;\n        F77_SCGEMM(opT[OpB], opT[OpA], &n, &m, &k, cblas::to_cptr(&alpha),\n                   b, &ldb, cblas::to_cptr(a), &lda,\n                   cblas::to_cptr(&zero), cblas::to_cptr(ctrans), &n);\n\n        // In fortran have CTRANS(N,M) and fortran CTRANS(i,j) maps to C ctrans[j*n+i]\n\n        if (beta == zero) {\n            for (integer i=0; i<n; i++) {\n                for (integer j=0; j<m; j++) {\n                    c[i*ldc+j] = ctrans[j*n+i];\n                }\n            }\n        }\n        else\n            for (integer i=0; i<n; i++) {\n                for (integer j=0; j<m; j++) {\n                    c[i*ldc+j] = beta*c[i*ldc+j] + ctrans[j*n+i];\n                }\n            }\n\tdelete [] ctrans;\n    }\n\n    inline void gemm(const CBLAS_TRANSPOSE OpA, const CBLAS_TRANSPOSE OpB,\n                     const integer m, const integer n, const integer k,\n                     const complex_real4 alpha, const real4* a, const integer lda,\n                     const complex_real4* b, const integer ldb, const complex_real4 beta,\n                     complex_real4* c, const integer ldc) {\n      static const char *op[] = {\"n\", \"t\", \"c\"};\n      F77_SCGEMM(op[OpA], op[OpB], &m, &n, &k, cblas::to_cptr(&alpha),\n                 a, &lda, cblas::to_cptr(b), &ldb,\n                 cblas::to_cptr(&beta), cblas::to_cptr(c), &ldc);\n    }\n\n    inline void gemm(const CBLAS_TRANSPOSE OpA, const CBLAS_TRANSPOSE OpB,\n                     const integer m, const integer n, const integer k,\n                     const complex_real8 alpha, const complex_real8* a, const integer lda,\n                     const real8* b, const integer ldb, const complex_real8 beta,\n                     complex_real8* c, const integer ldc) {\n        \n        //static const char *op[] = { \"n\",\"t\",\"c\" };\n        //F77_ZDGEMM(op[OpA], op[OpB], &m, &n, &k, &alpha, a, &lda, b, &ldb, &beta, c, &ldc);\n        \n        //Don't have ZDGEMM ... only DZGEMM ... so use A*B = (BT * AT)T\n        \n      //complex_real8 ctrans[m*n]; // Here assume matrices are small and can be allocated on the stack\n      complex_real8* ctrans = new complex_real8[m*n];\n        static const char *opT[] = { \"t\",\"n\",\"c\" }; // Transpose of op ... conj-transpose not working yet\n        MADNESS_ASSERT(OpA!=ConjTrans && OpB!=ConjTrans);\n        const complex_real8 zero = 0.0;\n        F77_DZGEMM(opT[OpB], opT[OpA], &n, &m, &k, cblas::to_zptr(&alpha),\n                   b, &ldb, cblas::to_zptr(a), &lda,\n                   cblas::to_zptr(&zero), cblas::to_zptr(ctrans), &n);\n\n        // In fortran have CTRANS(N,M) and fortran CTRANS(i,j) maps to C ctrans[j*n+i]\n        \n        if (beta == zero) {\n            for (integer i=0; i<n; i++) {\n                for (integer j=0; j<m; j++) {\n                    c[i*ldc+j] = ctrans[j*n+i];\n                }\n            }\n        }\n        else \n            for (integer i=0; i<n; i++) {\n                for (integer j=0; j<m; j++) {\n                    c[i*ldc+j] = beta*c[i*ldc+j] + ctrans[j*n+i];\n                }\n            }\n\tdelete [] ctrans;\n    }\n    \n    inline void gemm(const CBLAS_TRANSPOSE OpA, const CBLAS_TRANSPOSE OpB,\n                     const integer m, const integer n, const integer k,\n                     const complex_real8 alpha, const real8* a, const integer lda,\n                     const complex_real8* b, const integer ldb, const complex_real8 beta,\n                     complex_real8* c, const integer ldc) {\n      static const char *op[] = {\"n\", \"t\", \"c\"};\n      F77_DZGEMM(op[OpA], op[OpB], &m, &n, &k, cblas::to_zptr(&alpha), a, &lda,\n                 cblas::to_zptr(b), &ldb, cblas::to_zptr(&beta),\n                 cblas::to_zptr(c), &ldc);\n    }\n\n#endif\n\n\n    ///@}\n\n    /// Multiplies a matrix by a vector\n\n    /// \\f[\n    /// \\mathbf{y} \\leftarrow  \\alpha \\mathbf{A}^{\\mathrm{OpA}} \\mathbf{x} + \\beta \\mathbf{y}\n    /// \\f]\n    /// \\param OpA Operation to be applied to matrix \\f$ \\mathbf{A} \\f$\n    /// \\param m Rows in matrix \\f$ \\mathbf{A} \\f$\n    /// \\param n Columns in matrix \\f$ \\mathbf{A} \\f$\n    /// \\param alpha Scaling factor applied to \\f$ \\mathbf{A} \\f$ \\c * \\f$ \\mathbf{x} \\f$\n    /// \\param A Pointer to matrix \\f$ \\mathbf{A} \\f$\n    /// \\param lda The size of the leading-order dimension of matrix \\f$ \\mathbf{A} \\f$\n    /// \\param x Pointer to vector \\f$ \\mathbf{x} \\f$\n    /// \\param incx Stride of vector \\f$ \\mathbf{x} \\f$\n    /// \\param beta Scaling factor for vector \\f$ \\mathbf{y} \\f$\n    /// \\param y Pointer to vector \\f$ \\mathbf{y} \\f$\n    /// \\param incy Stride of vector \\f$ \\mathbf{y} \\f$\n    ///@{\n    inline void gemv(const CBLAS_TRANSPOSE OpA, const integer m, const integer n,\n       const float alpha, const float *A, const integer lda, const float *x,\n       const integer incx, const float beta, float *y, const integer incy)\n    {\n        MADNESS_ASSERT(OpA != ConjTrans);\n        static const char *op[] = { \"n\",\"t\" };\n        F77_SGEMV(op[OpA], &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy);\n    }\n\n    inline void gemv(const CBLAS_TRANSPOSE OpA, const integer m, const integer n,\n       const double alpha, const double *A, const integer lda, const double *x,\n       const integer incx, const double beta, double *y, const integer incy)\n    {\n        MADNESS_ASSERT(OpA != ConjTrans);\n        static const char *op[] = { \"n\",\"t\" };\n        F77_DGEMV(op[OpA], &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy);\n    }\n\n    inline void gemv(const CBLAS_TRANSPOSE OpA, const integer m, const integer n,\n       const complex_real4 alpha, const complex_real4 *A, const integer lda,\n       const complex_real4 *x, const integer incx, const complex_real4 beta,\n       complex_real4 *y, const integer incy) {\n      static const char *op[] = {\"n\", \"t\", \"c\"};\n      F77_CGEMV(op[OpA], &m, &n, cblas::to_cptr(&alpha), cblas::to_cptr(A),\n                &lda, cblas::to_cptr(x), &incx, cblas::to_cptr(&beta),\n                cblas::to_cptr(y), &incy);\n    }\n\n    inline void gemv(const CBLAS_TRANSPOSE OpA, const integer m, const integer n,\n       const complex_real8 alpha, const complex_real8 *A, const integer lda,\n       const complex_real8 *x, const integer incx, const complex_real8 beta,\n       complex_real8 *y, const integer incy) {\n      static const char *op[] = {\"n\", \"t\", \"c\"};\n      F77_ZGEMV(op[OpA], &m, &n, cblas::to_zptr(&alpha), cblas::to_zptr(A),\n                &lda, cblas::to_zptr(x), &incx, cblas::to_zptr(&beta),\n                cblas::to_zptr(y), &incy);\n    }\n    ///@}\n\n    /// Multiplies vector \\f$ \\mathbf{x} \\f$ by the transform of vector \\f$ \\mathbf{y} \\f$\n\n    /// \\f[\n    /// \\mathbf{A} \\leftarrow  \\alpha \\mathbf{x} \\mathbf{y}^{\\mathrm{T}} + \\mathbf{A}\n    /// \\f]\n    /// \\param m Rows in matrix \\f$ \\mathbf{A} \\f$\n    /// \\param n Columns in matrix \\f$ \\mathbf{A} \\f$\n    /// \\param alpha Scaling factor applied to \\f$ \\mathbf{x} \\mathbf{y}^{\\mathrm{T}} \\f$\n    /// \\param x Pointer to vector \\f$ \\mathbf{x} \\f$\n    /// \\param incx Stride of vector \\f$ \\mathbf{x} \\f$\n    /// \\param y Pointer to vector \\f$ \\mathbf{y} \\f$\n    /// \\param incy Stride of vector \\f$ \\mathbf{y} \\f$\n    /// \\param A Pointer to matrix \\f$ \\mathbf{A} \\f$\n    /// \\param lda The size of the leading-order dimension of matrix \\f$ \\mathbf{A} \\f$\n    ///@{\n    inline void ger(const integer m, const integer n, const float alpha,\n        const float *x, const integer incx, const float *y, const integer incy,\n        float *A, const integer lda)\n    {\n        F77_SGER(&m, &n, &alpha, x, &incx, y, &incy, A, &lda);\n    }\n\n    inline void ger(const integer m, const integer n, const double alpha,\n        const double *x, const integer incx, const double *y, const integer incy,\n        double *A, const integer lda)\n    {\n        F77_DGER(&m, &n, &alpha, x, &incx, y, &incy, A, &lda);\n    }\n\n    inline void ger(const integer m, const integer n, const complex_real4 alpha,\n        const complex_real4 *x, const integer incx, const complex_real4 *y,\n        const integer incy, complex_real4 *A, const integer lda) {\n      F77_CGER(&m, &n, &alpha, x, &incx,\n               y, &incy, A, &lda);\n    }\n\n    inline void ger(const integer m, const integer n, const complex_real8 alpha,\n        const complex_real8 *x, const integer incx, const complex_real8 *y,\n        const integer incy, complex_real8 *A, const integer lda) {\n      F77_ZGER(&m, &n, &alpha, x, &incx,\n               y, &incy, A, &lda);\n    }\n    ///@}\n\n    /// Compute the dot product of vectors \\f$ \\mathbf{x} \\f$ and \\f$ \\mathbf{y} \\f$\n\n    /// \\f[\n    /// u \\leftarrow  \\alpha \\mathbf{x} \\cdot \\mathbf{y}\n    /// \\f]\n    /// \\param n Size of the vectors  \\f$ \\mathbf{x} \\f$ and \\f$ \\mathbf{y} \\f$\n    /// \\param x Pointer to vector \\f$ \\mathbf{x} \\f$\n    /// \\param incx Stride of vector \\f$ \\mathbf{x} \\f$\n    /// \\param y Pointer to vector \\f$ \\mathbf{y} \\f$\n    /// \\param incy Stride of vector \\f$ \\mathbf{y} \\f$\n    /// \\return The dot product of \\c x and \\c y\n    ///@{\n    inline float dot(const integer n, const float* x, const integer incx,\n        const float* y, const integer incy)\n    {\n        return F77_SDOT(&n, x, &incx, y, &incy);\n    }\n\n    inline double dot(const integer n, const double* x, const integer incx,\n        const double* y, const integer incy)\n    {\n        return F77_DDOT(&n, x, &incx, y, &incy);\n    }\n\n    inline complex_real4 dot(const integer n, const complex_real4* x,\n        const integer incx, const complex_real4* y, const integer incy)\n    {\n        complex_real4 result(0.0, 0.0);\n        F77_CDOTU(cblas::to_cptr(&result), &n, cblas::to_cptr(x), &incx, cblas::to_cptr(y), &incy);\n        return result;\n    }\n\n    inline complex_real8 dot(const integer n, const complex_real8* x,\n        const integer incx, const complex_real8* y, const integer incy)\n    {\n        complex_real8 result(0.0, 0.0);\n        F77_ZDOTU(cblas::to_zptr(&result), &n, cblas::to_zptr(x), &incx, cblas::to_zptr(y), &incy);\n        return result;\n    }\n    ///@}\n\n    /// Scale a vector\n\n    /// \\f[\n    /// \\mathbf{x} \\leftarrow \\alpha \\mathbf{x}\n    /// \\f]\n    /// \\param n The size of the vector\n    /// \\param alpha The scaling factor for vector \\f$ \\mathbf{x} \\f$\n    /// \\param x Pointer to vector \\f$ \\mathbf{x} \\f$\n    /// \\param incx Stride for vector \\f$ \\mathbf{x} \\f$\n    ///@{\n    inline void scal(const integer n, const float alpha, float* x, const integer incx) {\n      F77_SSCAL(&n, &alpha, x, &incx);\n    }\n\n    inline void scal(const integer n, const double alpha, double* x, const integer incx) {\n      F77_DSCAL(&n, &alpha, x, &incx);\n    }\n\n    inline void scal(const integer n, const complex_real4 alpha, complex_real4* x, const integer incx) {\n      F77_CSCAL(&n, cblas::to_cptr(&alpha), cblas::to_cptr(x), &incx);\n    }\n\n    inline void scal(const integer n, const complex_real8 alpha, complex_real8* x, const integer incx) {\n      F77_ZSCAL(&n, cblas::to_zptr(&alpha), cblas::to_zptr(x), &incx);\n    }\n\n    inline void scal(const integer n, const float alpha, complex_real4* x, const integer incx) {\n      F77_CSSCAL(&n, &alpha, cblas::to_cptr(x), &incx);\n    }\n\n    inline void scal(const integer n, const double alpha, complex_real8* x, const integer incx) {\n      F77_ZDSCAL(&n, &alpha, cblas::to_zptr(x), &incx);\n    }\n    ///@}\n\n    /// Scale and add a vector to another\n\n    /// \\f[\n    /// \\mathbf{y} \\leftarrow \\alpha \\mathbf{x} + \\mathbf{y}\n    /// \\f]\n    /// \\param n The size of the vector\n    /// \\param alpha The scaling factor for vector \\f$ \\mathbf{x} \\f$\n    /// \\param x Pointer to vector \\f$ \\mathbf{x} \\f$\n    /// \\param incx Stride for vector \\f$ \\mathbf{x} \\f$\n    /// \\param y Pointer to vector \\f$ \\mathbf{y} \\f$\n    /// \\param incy Stride for vector \\f$ \\mathbf{y} \\f$\n    ///@{\n    inline void axpy(const integer n, const float alpha, float* x, const integer incx,\n                     float* y, const integer incy) {\n      F77_SAXPY(&n, &alpha, x, &incx, y, &incy);\n    }\n\n    inline void axpy(const integer n, const double alpha, double* x, const integer incx,\n                     double* y, const integer incy) {\n      F77_DAXPY(&n, &alpha, x, &incx, y, &incy);\n    }\n\n    inline void axpy(const integer n, const complex_real4 alpha, complex_real4* x, const integer incx,\n                     complex_real4* y, const integer incy) {\n      F77_CAXPY(&n, cblas::to_cptr(&alpha), cblas::to_cptr(x), &incx, cblas::to_cptr(y), &incy);\n    }\n\n    inline void axpy(const integer n, const complex_real8 alpha, complex_real8* x, const integer incx,\n                     complex_real8* y, const integer incy) {\n      F77_ZAXPY(&n, cblas::to_zptr(&alpha), cblas::to_zptr(x), &incx, cblas::to_zptr(y), &incy);\n    }\n    ///@}\n\n\n} // namespace cblas\n} // namespace madness\n\nMADNESS_PRAGMA_CLANG(diagnostic pop)\nMADNESS_PRAGMA_GCC(diagnostic pop)\n\n#endif // MADNESS_LINALG_CBLAS_H__INCLUDED\n\n"
  },
  {
    "path": "src/madness/tensor/cblas_types.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2019 Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#ifndef MADNESS_LINALG_CBLAS_TYPES_H__INCLUDED\n#define MADNESS_LINALG_CBLAS_TYPES_H__INCLUDED\n\n/// \\file cblas_types.h\n/// \\brief Define types used by CBLAS API\n\n#include <madness/madness_config.h>\n// some BLAS libraries define their own types for complex data\n#ifndef HAVE_INTEL_MKL\n#ifndef blas_complex_float\n# define blas_complex_float  std::complex<float>\n#else\nstatic_assert(sizeof(std::complex<float>)==sizeof(blas_complex_float), \"sizes of blas_complex_float and std::complex<float> do not match\");\n#endif\n#ifndef blas_complex_double\n# define blas_complex_double std::complex<double>\n#else\nstatic_assert(sizeof(std::complex<double>)==sizeof(blas_complex_double), \"sizes of blas_complex_double and std::complex<double> do not match\");\n#endif\n#else\n// if calling direct need to cast to the MKL complex types\n# ifdef MKL_DIRECT_CALL\n#  include <mkl_types.h>\n#  ifndef blas_complex_float\n#   define blas_complex_float MKL_Complex8\n#  endif\n#  ifndef blas_complex_double\n#   define blas_complex_double MKL_Complex16\n#  endif\n// else can call via F77 prototypes which don't need type conversion\n# else\n#  ifndef blas_complex_float\n#   define blas_complex_float  std::complex<float>\n#  endif\n#  ifndef blas_complex_double\n#   define blas_complex_double std::complex<double>\n#  endif\n# endif\n#endif\n\nnamespace madness {\nnamespace cblas {\n\n    /// Matrix operations for BLAS function calls\n    typedef enum {\n      NoTrans=0,\n      Trans=1,\n      ConjTrans=2\n    }  CBLAS_TRANSPOSE;\n\n    /////////// legalized conversions between C++ and CBLAS types //////////\n    template <typename T>\n    const blas_complex_float*\n    to_cptr(const T* ptr) {\n      static_assert(sizeof(T)==sizeof(blas_complex_float), \"sizes of blas_complex_float and T given to madness::cblas::to_cptr do not match\");\n      return reinterpret_cast<const blas_complex_float*>(ptr);\n    }\n    template <typename T>\n    typename std::enable_if<!std::is_const<T>::value, blas_complex_float*>::type\n    to_cptr(T* ptr) {\n      static_assert(sizeof(T)==sizeof(blas_complex_float), \"sizes of blas_complex_float and T given to madness::cblas::to_cptr do not match\");\n      return reinterpret_cast<blas_complex_float*>(ptr);\n    }\n\n    template <typename T>\n    const blas_complex_double*\n    to_zptr(const T* ptr) {\n      static_assert(sizeof(T)==sizeof(blas_complex_double), \"sizes of blas_complex_double and T given to madness::cblas::to_zptr do not match\");\n      return reinterpret_cast<const blas_complex_double*>(ptr);\n    }\n    template <typename T>\n    typename std::enable_if<!std::is_const<T>::value, blas_complex_double*>::type\n    to_zptr(T* ptr) {\n      static_assert(sizeof(T)==sizeof(blas_complex_double), \"sizes of blas_complex_double and T given to madness::cblas::to_zptr do not match\");\n      return reinterpret_cast<blas_complex_double*>(ptr);\n    }\n\n} // namespace cblas\n} // namespace madness\n\n#endif // MADNESS_LINALG_CBLAS_TYPES_H__INCLUDED\n\n"
  },
  {
    "path": "src/madness/tensor/clapack.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  Copyright (C) 2018 Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov \n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  \n  $Id$\n*/\n\n  \n#ifndef MADNESS_LINALG_CLAPACK_H__INCLUDED\n#define MADNESS_LINALG_CLAPACK_H__INCLUDED\n\n/// \\file clapack.h\n/// \\brief C++ interface to LAPACK, either directly via Fortran API (see clapack_fortran.h) or via LAPACKE (see clapack_lapacke.h)\n\n#ifdef MADNESS_LINALG_USE_LAPACKE\n#  if HAVE_INTEL_MKL\n#    if !__has_include(<mkl_lapacke.h>)\n#      error \"INTEL MKL detected at configure time, and MADNESS_LINALG_USE_LAPACKE defined, but mkl_lapacke.h not found. Provide -I/path/to/mkl/include to the compiler.\"\n#    endif\n#    if !__has_include(<mkl_lapack.h>)\n#      error \"INTEL MKL detected at configure time, and MADNESS_LINALG_USE_LAPACKE defined, but mkl_lapack.h not found. Provide -I/path/to/mkl/include to the compiler.\"\n#    endif\n#    include <mkl_lapacke.h>\n#    include <mkl_lapack.h>\n#  else\n#    if !__has_include(<lapacke.h>)\n#      error \"MADNESS_LINALG_USE_LAPACKE defined, but lapacke.h not found. Provide -I/path/to/lapacke/dot/h to the compiler.\"\n#    endif\n#    include <lapacke.h>\n#  endif\n#  include <madness/tensor/lapacke_types.h>\n#else\n#  include \"clapack_fortran.h\"\n#endif\n\n#endif // MADNESS_LINALG_CLAPACK_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/clapack_fortran.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov \n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  \n  $Id$\n*/\n\n  \n#ifndef MADNESS_LINALG_CLAPACK_FORTRAN_H__INCLUDED\n#define MADNESS_LINALG_CLAPACK_FORTRAN_H__INCLUDED\n\n/// \\file clapack_fortran.h\n/// \\brief Legacy C++ prototypes for Fortran LAPACK with associated typedefs and macos\n\n#include <madness/fortran_ctypes.h>\n\n#ifdef FORTRAN_LINKAGE_LC\n#  define sgesvd_ sgesvd\n#  define dgesvd_ dgesvd\n#  define cgesvd_ cgesvd\n#  define zgesvd_ zgesvd\n\n#  define sgesv_ sgesv\n#  define dgesv_ dgesv\n#  define cgesv_ cgesv\n#  define zgesv_ zgesv\n\n#  define sgelss_ sgelss\n#  define dgelss_ dgelss\n#  define cgelss_ cgelss\n#  define zgelss_ zgelss\n\n#  define sgels_ sgels\n#  define dgels_ dgels\n#  define cgels_ cgels\n#  define zgels_ zgels\n\n#  define ssyev_ ssyev\n#  define dsyev_ dsyev\n#  define cheev_ cheev\n#  define zheev_ zheev\n\n#  define sggev_ sggev\n#  define dggev_ dggev\n#  define cggev_ cggev\n#  define zggev_ zggev\n\n#ifndef MADNESS_HAS_ELEMENTAL\n#  define ssygv_ ssygv\n#  define dsygv_ dsygv\n#  define chegv_ chegv\n#  define zhegv_ zhegv\n#endif\n\n#  define spotrf_ spotrf\n#  define cpotrf_ cpotrf\n#  define dpotrf_ dpotrf\n#  define zpotrf_ zpotrf\n\n#  define sgetrf_ sgetrf\n#  define cgetrf_ cgetrf\n#  define dgetrf_ dgetrf\n#  define zgetrf_ zgetrf\n\n#  define sgetri_ sgetri\n#  define cgetri_ cgetri\n#  define dgetri_ dgetri\n#  define zgetri_ zgetri\n\n#  define strsm_ strsm\n#  define ctrsm_ ctrsm\n#  define dtrsm_ dtrsm\n#  define ztrsm_ ztrsm\n\n#  define dlamch_ dlamch\n#  define slamch_ slamch\n\n#  define sgeev_ sgeev\n#  define cgeev_ cgeev\n#  define dgeev_ dgeev\n#  define zgeev_ zgeev\n\n#else\n  // only lowercase with zero and one underscores are handled -- if detected another convention complain loudly\n#  ifndef FORTRAN_LINKAGE_LCU\n#    error \"clapack.h does not support the current Fortran symbol convention -- please, edit and check in the changes.\"\n#  endif\n#endif\n\n// SUBROUTINE DLAMCH( CMACH, RESULT )\n\n// PURPOSE\n//     DLAMCH determines double precision machine parameters.\n\nextern \"C\"\n    float slamch_(const char* mode, int modelen);\nextern \"C\"\n    double dlamch_(const char* mode, int modelen);\n\n// SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, INFO )\n\n// PURPOSE\n//     DGESVD computes the singular value decomposition (SVD) of a real\n//     M-by-N matrix A, optionally computing the left and/or right singular\n//     vectors.\n\nextern \"C\"\n    void sgesvd_(const char *jobu, const char *jobvt, integer *m, integer *n,\n                 real4 *a, integer *lda, real4 *s, real4 *u, integer *ldu,\n                 real4 *vt, integer *ldvt, real4 *work, integer *lwork,\n                 integer *info, char_len jobulen, char_len jobvtlen);\nextern \"C\"\n    void dgesvd_(const char *jobu, const char *jobvt, integer *m, integer *n,\n                 real8 *a, integer *lda, real8 *s, real8 *u, integer *ldu,\n                 real8 *vt, integer *ldvt, real8 *work, integer *lwork,\n                 integer *info, char_len jobulen, char_len jobvtlen);\nextern \"C\"\n    void cgesvd_(const char *jobu, const char *jobvt, integer *m, integer *n,\n                 complex_real4 *a, integer *lda, real4 *s, complex_real4 *u,\n                 integer *ldu, complex_real4 *vt, integer *ldvt, complex_real4 *work,\n                 integer *lwork, real4 *rwork,\n                 integer *info, char_len jobulen, char_len jobvtlen);\nextern \"C\"\n    void zgesvd_(const char *jobu, const char *jobvt, integer *m, integer *n,\n                 complex_real8 *a, integer *lda, real8 *s, complex_real8 *u,\n                 integer *ldu, complex_real8 *vt, integer *ldvt, complex_real8 *work,\n                 integer *lwork, real8 *rwork,\n                 integer *info, char_len jobulen, char_len jobvtlen);\n\n// SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )\n\n// PURPOSE\n//     DGESV computes the solution to a real system of linear equations\n//        A * X = B,\n//     where A is an N-by-N matrix and X and B are N-by-NRHS matrices.\n\nextern \"C\"\n    void sgesv_(integer* n, integer* nrhs, real4* AT, integer* lda,\n                integer* piv, real4* x, integer* ldx, integer* info);\nextern \"C\"\n    void dgesv_(integer* n, integer* nrhs, real8* AT, integer* lda,\n                integer* piv, real8* x, integer* ldx, integer* info);\nextern \"C\"\n    void cgesv_(integer* n, integer* nrhs, complex_real4* AT, integer* lda,\n                integer* piv, complex_real4* x, integer* ldx, integer* info);\nextern \"C\"\n    void zgesv_(integer* n, integer* nrhs, complex_real8* AT, integer* lda,\n                integer* piv, complex_real8* x, integer* ldx, integer* info);\n\n// SUBROUTINE DGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, INFO )\n\n// PURPOSE\n//     DGELSS computes the minimum norm solution to a real linear least\n//     squares problem:\n//          Minimize 2-norm(| b - A*x |)\n//     using the singular value decomposition (SVD) of A. A is an M-by-N\n//     matrix which may be rank-deficient.\n\nextern \"C\"\n    void sgelss_(integer *m, integer *n, integer *nrhs,\n                 real4 *a, integer *lda, real4 *b, integer *ldb, real4 *sOUT,\n                 real4 *rcondIN, integer *rankOUT, real4 *work,\n                 integer *lwork, integer *infoOUT);\nextern \"C\"\n    void dgelss_(integer *m, integer *n, integer *nrhs,\n                 real8 *a, integer *lda, real8 *b, integer *ldb, real8 *sOUT,\n                 real8 *rcondIN, integer *rankOUT, real8 *work,\n                 integer *lwork, integer *infoOUT);\nextern \"C\"\n    void cgelss_(integer *m, integer *n, integer *nrhs,\n                 complex_real4 *a, integer *lda, complex_real4 *b, integer *ldb,\n                 real4 *sOUT,\n                 real4 *rcondIN, integer *rankOUT, complex_real4 *work,\n                 integer *lwork, real4 *rwork, integer *infoOUT);\nextern \"C\"\n    void zgelss_(integer *m, integer *n, integer *nrhs,\n                 complex_real8 *a, integer *lda, complex_real8 *b, integer *ldb,\n                 real8 *sOUT,\n                 real8 *rcondIN, integer *rankOUT, complex_real8 *work,\n                 integer *lwork, real8 *rwork, integer *infoOUT);\n\n// SUBROUTINE DGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK, INFO )\n\n// PURPOSE\n//     DGELS solves overdetermined or underdetermined real linear systems\n//     involving an M-by-N matrix A, or its transpose, using a QR or LQ\n//     factorization of A.  It is assumed that A has full rank.\n\nextern \"C\"\n    void sgels_(const char *trans, integer *m, integer *n, integer *nrhs,\n            real4 *a, integer *lda, real4 *b, integer *ldb, real4 *work,\n            integer *lwork, integer *infoOUT, char_len translen);\nextern \"C\"\n    void dgels_(const char *trans, integer *m, integer *n, integer *nrhs,\n            real8 *a, integer *lda, real8 *b, integer *ldb, real8 *work,\n            integer *lwork, integer *infoOUT, char_len translen);\nextern \"C\"\n    void cgels_(const char *trans, integer *m, integer *n, integer *nrhs,\n            complex_real4 *a, integer *lda, complex_real4 *b, integer *ldb,\n            complex_real4 *work,\n            integer *lwork, real4 *rwork, integer *infoOUT, char_len translen);\nextern \"C\"\n    void zgels_(const char *trans, integer *m, integer *n, integer *nrhs,\n            complex_real8 *a, integer *lda, complex_real8 *b, integer *ldb,\n            complex_real8 *work,\n            integer *lwork, real8 *rwork, integer *infoOUT, char_len translen);\n\n// SUBROUTINE DGGEV( JOBZ, UPLO, N, A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )\n\n// PURPOSE\n//     DGGEV computes for a pair of N-by-N real nonsymmetric matrices (A,B)\n//     the generalized eigenvalues, and optionally, the left and/or right\n//     generalized eigenvectors.\n\nextern \"C\"\n    void sggev_(const char* jobz, const char* uplo, integer *n,\n                real4* a, integer* lda, real4* b, integer* ldb,\n                real4* alphar, real4* alphai, real4* beta, \n                real4* vl, integer* ldvl, real4* vr, integer* ldvr,\n                real4* work,  integer* lwork, integer* info,\n                char_len jobzlen, char_len uplo_len);\nextern \"C\"\n     void dggev_(const char* jobl, const char* jobr, integer *n,\n\t\t real8 *a, integer *lda, real8 *b, integer *ldb,\n\t\t real8 *w_real, real8 *w_imag, real8 *beta,\n\t\t real8 *vl, integer *ldvl, real8 *vr, integer *ldvr,\n\t\t real8 *work,  integer *lwork, integer *info,\n\t\t char_len jobzlen, char_len uplo_len);\nextern \"C\"\n    void cggev_(const char* jobz, const char* uplo, integer *n,\n                complex_real4* a, integer* lda, complex_real4* b, integer* ldb,\n                complex_real4* alpha, complex_real4* beta, \n                complex_real4* vl, integer* ldvl, complex_real4* vr, integer* ldvr,\n                complex_real4* work,  integer* lwork, real4* rwork, integer* info,\n                char_len jobzlen, char_len uplo_len);\nextern \"C\"\n    void zggev_(const char* jobz, const char* uplo, integer *n,\n                complex_real8* a, integer* lda, complex_real8* b, integer* ldb,\n                complex_real8* alpha, complex_real8* beta, \n                complex_real8* vl, integer* ldvl, complex_real8* vr, integer* ldvr,\n                complex_real8* work,  integer* lwork, real8* rwork, integer* info,\n                char_len jobzlen, char_len uplo_len);\n\n// SUBROUTINE DGEEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )\n\n// PURPOSE\n//     DGEEV computes for an N-by-N real nonsymmetric matrix A, the\n//     eigenvalues and, optionally, the left and/or right eigenvectors.\n\nextern \"C\"\n    void sgeev_(const char* jobz, const char* uplo, integer *n, real4* a, integer* lda,\n                real4* w_real, real4* w_imag, real4* v, integer* ldv, real4* vr, integer* ldvr,\n                real4* work,  integer* lwork, integer* info,\n                char_len jobzlen, char_len uplo_len );\nextern \"C\"\n    void dgeev_(const char* jobz, const char* uplo, integer *n,\n                real8* a, integer* lda, real8* w_real, real8* w_imag, real8* v, integer* ldv,\n                real8* vr, integer* ldvr, real8* work,  integer* lwork, integer* info,\n                char_len jobzlen, char_len uplo_len );\nextern \"C\"\n    void cgeev_(const char* jobz, const char* uplo, integer *n, complex_real4* a, integer* lda,\n                complex_real4* w, complex_real4* vl, integer* ldvl, complex_real4* vr, integer* ldvr,\n                complex_real4* work,  integer* lwork, real4* rwork, integer* info,\n                char_len jobzlen, char_len uplo_len );\nextern \"C\"\n    void zgeev_(const char* jobz, const char* uplo, integer *n, complex_real8* a, integer* lda,\n                complex_real8* w, complex_real8* vl, integer* ldvl, complex_real8* vr, integer* ldvr,\n                complex_real8* work,  integer* lwork, real8* rwork, integer* info,\n                char_len jobzlen, char_len uplo_len );\n\n// SUBROUTINE DSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )\n\n// PURPOSE\n//     DSYEV computes all eigenvalues and, optionally, eigenvectors of a\n//     real symmetric matrix A.\n\nextern \"C\"\n    void ssyev_(const char* jobz, const char* uplo, integer *n,\n                real4 *a, integer *lda, real4 *w,  real4 *work,  integer *lwork,\n                integer *info, char_len jobzlen, char_len uplo_len );\nextern \"C\"\n    void dsyev_(const char* jobz, const char* uplo, integer *n,\n                real8 *a, integer *lda, real8 *w,  real8 *work,  integer *lwork,\n                integer *info, char_len jobzlen, char_len uplo_len );\nextern \"C\"\n    void cheev_(const char* jobz, const char* uplo, integer *n,\n                complex_real4 *a, integer *lda, real4 *w,  complex_real4 *work,\n                integer *lwork, real4 *rwork,\n                integer *info, char_len jobzlen, char_len uplo_len );\nextern \"C\"\n    void zheev_(const char* jobz, const char* uplo, integer *n,\n                complex_real8 *a, integer *lda, real8 *w,  complex_real8 *work,\n                integer *lwork, real8 *rwork,\n                integer *info, char_len jobzlen, char_len uplo_len );\n\n// SUBROUTINE DSYGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, INFO )\n// SUBROUTINE ZHEGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, INFO )\n\n// PURPOSE\n//     DSYGV computes all the eigenvalues, and optionally, the eigenvectors\n//     of a real generalized symmetric-definite eigenproblem, of the form\n//     A*x=(lambda)*B*x,  A*Bx=(lambda)*x,  or B*A*x=(lambda)*x.\n\nextern \"C\"\n    void ssygv_(integer *itype, const char* jobz, const char* uplo, integer *n,\n                real4 *a, integer *lda, real4 *b, integer *ldb,\n                real4 *w,  real4 *work,  integer *lwork,\n                integer *info, char_len jobzlen, char_len uplo_len );\nextern \"C\"\n    void dsygv_(integer *itype, const char* jobz, const char* uplo, integer *n,\n                real8 *a, integer *lda, real8 *b, integer *ldb,\n                real8 *w,  real8 *work,  integer *lwork,\n                integer *info, char_len jobzlen, char_len uplo_len );\nextern \"C\"\n    void chegv_(integer *itype, const char* jobz, const char* uplo, integer *n,\n                complex_real4 *a, integer *lda, complex_real4 *b, integer *ldb,\n                real4 *w,  complex_real4 *work,  integer *lwork, real4 *rwork,\n                integer *info, char_len jobzlen, char_len uplo_len );\nextern \"C\"\n    void zhegv_(integer *itype, const char* jobz, const char* uplo, integer *n,\n                complex_real8 *a, integer *lda, complex_real8 *b, integer *ldb,\n                real8 *w,  complex_real8 *work,  integer *lwork, real8 *rwork,\n                integer *info, char_len jobzlen, char_len uplo_len );\n\n// SUBROUTINE DGEQRF (M, N, A, LDA, TAU, WORK, LWORK, INFO)\n//\n// PURPOSE\n//\t\tDGEQRF computes a QR factorization of a real M-by-N matrix A:\n//\t\tA = Q * R.\n\nextern \"C\"\n\tvoid sgeqrf_(integer *m, integer *n,\n            \t real4 *a, integer *lda, real4 *tau,\n            \t real4 *work, integer *lwork, integer *infoOUT);\n\nextern \"C\"\n\tvoid dgeqrf_(integer *m, integer *n,\n            \t real8 *a, integer *lda, real8 *tau,\n            \t real8 *work, integer *lwork, integer *infoOUT);\n\nextern \"C\"\n\tvoid cgeqrf_(integer *m, integer *n,\n\t\t\t\t complex_real4 *a, integer *lda, complex_real4 *tau,\n\t\t\t\t complex_real4 *work, integer *lwork, integer *infoOUT);\n\nextern \"C\"\n\tvoid zgeqrf_(integer *m, integer *n,\n\t\t\t\t complex_real8 *a, integer *lda, complex_real8 *tau,\n\t\t\t\t complex_real8 *work, integer *lwork, integer *infoOUT);\n\n// SUBROUTINE DGEQP3(M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO );\n\n// PURPOSE\n//\t\tDGEQP3 computes a QR factorization with column pivoting of a\n//\t\tmatrix A:  A*P = Q*R  using Level 3 BLAS.\n\nextern \"C\"\n    void sgeqp3_(integer *m, integer *n,\n                 real4 *a, integer *lda, integer *jpvt, real4 *tau,\n                 real4 *work, integer *lwork, integer *infoOUT);\n\nextern \"C\"\n    void dgeqp3_(integer *m, integer *n,\n            \t real8 *a, integer *lda, integer *jpvt, real8 *tau,\n            \t real8 *work, integer *lwork, integer *infoOUT);\n\nextern \"C\"\n    void cgeqp3_(integer *m, integer *n, complex_real4 *a,\n    \t\t\t integer *lda, integer *jpvt, complex_real4 *tau,\n    \t\t\t complex_real4 *work, integer *lwork, real4 *rwork,\n    \t\t\t integer *infoOUT);\n\nextern \"C\"\n    void zgeqp3_(integer *m, integer *n, complex_real8 *a,\n\t\t\t \t integer *lda, integer *jpvt, complex_real8 *tau,\n\t\t\t \t complex_real8 *work, integer *lwork, real8 *rwork,\n\t\t\t \t integer *infoOUT);\n\n// SUBROUTINE DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )\n// SUBROUTINE ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )\n\n// PURPOSE\n//     DORGQR generates an M-by-N real matrix Q with orthonormal\n//     columns, which is defined as the first N columns of a pro-\n//     duct of K elementary reflectors of order M\n\nextern \"C\"\n    void sorgqr_(integer *m, integer *n, integer *k,\n                 real4 *a, integer *lda, real4 *tau,\n                 real4 *work, integer *lwork, integer *info);\nextern \"C\"\n    void dorgqr_(integer *m, integer *n, integer *k,\n            \t real8 *a, integer *lda, real8 *tau,\n            \t real8 *work, integer *lwork, integer *info);\nextern \"C\"\n    void cungqr_(integer *m, integer *n, integer *k,\n    \t\t\t complex_real4 *a, integer *lda, complex_real4 *tau,\n    \t\t\t complex_real4 *work, integer *lwork, integer *info);\nextern \"C\"\n    void zungqr_(integer *m, integer *n, integer *k,\n    \t\t\t complex_real8 *a, integer *lda, complex_real8 *tau,\n\t\t\t \t complex_real8 *work, integer *lwork, integer *info);\n\n// SUBROUTINE DPOTRF( UPLO, N, A, LDA, INFO )\n\n// PURPOSE\n//     computes the Cholesky factorization of a real symmetric\n//     positive definite matrix A.\n\nextern \"C\"\nvoid spotrf_(const char *uplo, const integer* n, real4 *a, const integer *lda, integer *info, char_len uplo_len);\nextern \"C\"\nvoid dpotrf_(const char *uplo, const integer* n, real8 *a, const integer *lda, integer *info, char_len uplo_len);\nextern \"C\"\nvoid cpotrf_(const char *uplo, const integer* n, complex_real4 *a, const integer *lda, integer *info, char_len uplo_len);\nextern \"C\"\nvoid zpotrf_(const char *uplo, const integer* n, complex_real8 *a, const integer *lda, integer *info, char_len uplo_len);\n\n// SUBROUTINE DPSTRF( UPLO, N, A, LDA, IPIV, RANK, TOL, WORK, INFO )\n\n// PURPOSE\n//     DPSTRF computes the Cholesky factorization with complete\n//     pivoting of a real symmetric positive semidefinite matrix A.\n\nextern \"C\"\nvoid spstrf_(const char *uplo, const integer* n, real4 *a, const integer *lda, integer* ipiv, integer* rank, real4* tol,\n\t\treal4* work, integer *info);\nextern \"C\"\nvoid dpstrf_(const char *uplo, const integer* n, real8 *a, const integer *lda, integer* ipiv, integer* rank, real8* tol,\n\t\treal8* work, integer *info);\nextern \"C\"\nvoid cpstrf_(const char *uplo, const integer* n, complex_real4 *a, const integer *lda, integer* ipiv, integer* rank, real4* tol,\n\t\tcomplex_real4* work, integer *info);\nextern \"C\"\nvoid zpstrf_(const char *uplo, const integer* n, complex_real8 *a, const integer *lda, integer* ipiv, integer* rank, real8* tol,\n\t\tcomplex_real8* work, integer *info);\n\n// SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )\n\n// PURPOSE\n//     DGETRF computes an LU factorization of a general M-by-N matrix A\n//     using partial pivoting with row interchanges.\n\nextern \"C\"\nvoid sgetrf_(const integer* m, const integer* n, real4 *a, const integer *lda,\n        integer* ipiv, integer *info);\nextern \"C\"\nvoid dgetrf_(const integer* m, const integer* n, real8 *a, const integer *lda,\n        integer* ipiv, integer *info);\nextern \"C\"\nvoid cgetrf_(const integer* m, const integer* n, complex_real4 *a, const integer *lda,\n        integer* ipiv, integer *info);\nextern \"C\"\nvoid zgetrf_(const integer* m, const integer* n, complex_real8 *a, const integer *lda,\n        integer* ipiv, integer *info);\n\n// SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )\n\n// PURPOSE\n//     DGETRI computes the inverse of a matrix using the LU factorization\n//     computed by DGETRF.\n\nextern \"C\"\nvoid sgetri_(const integer* n, real4 *a, const integer *lda, const integer* ipiv,\n        real4 *work, const integer *lwork, integer *info);\nextern \"C\"\nvoid dgetri_(const integer* n, real8 *a, const integer *lda, const integer* ipiv,\n        real8 *work, const integer *lwork, integer *info);\nextern \"C\"\nvoid cgetri_(const integer* n, complex_real4 *a, const integer *lda, const integer* ipiv,\n        complex_real4 *work, const integer *lwork, integer *info);\nextern \"C\"\nvoid zgetri_(const integer* n, complex_real8 *a, const integer *lda, const integer* ipiv,\n        complex_real8 *work, const integer *lwork, integer *info);\n\n// SUBROUTINE DTRSM( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB )\n\n// PURPOSE\n//     DTRSM solves one of the matrix equations\n//        op( A )*X = alpha*B,   or   X*op( A ) = alpha*B,\n//     where alpha is a scalar, X and B are m by n matrices, A is a unit, or\n//     non-unit,  upper or lower triangular matrix  and  op( A )  is one  of\n//        op( A ) = A   or   op( A ) = A**T.\n\nextern \"C\"\nvoid strsm_(const char* side, const char* uplo, const char* transa, const char* diag,\n            const integer* m, const integer* n, const real4* alpha,\n            const real4* a, const integer* lda, real4* b, const integer* ldb,\n            char_len sidelen, char_len uplolen, char_len transalen, char_len diaglen);\nextern \"C\"\nvoid dtrsm_(const char* side, const char* uplo, const char* transa, const char* diag,\n            const integer* m, const integer* n, const real8* alpha,\n            const real8* a, const integer* lda, real8* b, const integer* ldb,\n            char_len sidelen, char_len uplolen, char_len transalen, char_len diaglen);\nextern \"C\"\nvoid ctrsm_(const char* side, const char* uplo, const char* transa, const char* diag,\n            const integer* m, const integer* n, const complex_real4* alpha,\n            const complex_real4* a, const integer* lda, complex_real4* b, const integer* ldb,\n            char_len sidelen, char_len uplolen, char_len transalen, char_len diaglen);\nextern \"C\"\nvoid ztrsm_(const char* side, const char* uplo, const char* transa, const char* diag,\n            const integer* m, const integer* n, const complex_real8* alpha,\n            const complex_real8* a, const integer* lda, complex_real8* b, const integer* ldb,\n            char_len sidelen, char_len uplolen, char_len transalen, char_len diaglen);\n\n// SUBROUTINE DTRTRI( UPLO, DIAG, N, A, LDA, INFO )\n\n// PURPOSE\n//     DTRTRI computes the inverse of a real upper or lower triangular\n//     matrix A.\n\nextern \"C\"\nvoid strtri_(const char* uplo, const char* diag, const integer* n, const real4* a,\n            const integer* lda, integer *info);\nextern \"C\"\nvoid dtrtri_(const char* uplo, const char* diag, const integer* n, const real8* a,\n            const integer* lda, integer *info);\nextern \"C\"\nvoid ctrtri_(const char* uplo, const char* diag, const integer* n, const complex_real4* a,\n            const integer* lda, integer *info);\nextern \"C\"\nvoid ztrtri_(const char* uplo, const char* diag, const integer* n, const complex_real8* a,\n            const integer* lda, integer *info);\n\n#endif // MADNESS_LINALG_CLAPACK_FORTRAN_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/distributed_matrix.h",
    "content": "#ifndef MADNESS_DISTRIBUTED_MATRIX_H\n#define MADNESS_DISTRIBUTED_MATRIX_H\n\n/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n// THE STUFF IN THIS FILE IS IN TRANSITION!  THE API AND\n// IMPLEMENTATION WILL BOTH SHIFT RAPIDLY AS WE TRANSITION FROM\n// REPLICATED TO DISTRIBUTED MATRIX ALGORITHMS, AND SUBSEQUENTLY\n// REFINE THE DESIGN AND INTERFACE TO 3RD PARTY PACKAGES.\n\n#include <madness/world/MADworld.h>\n#include <utility>\n#include <madness/tensor/tensor.h>\n\nnamespace madness {\n\n    // If in a fit of misplaced enthusiasm you desire to change\n    // int64_t to either long or std::size_t you should be aware that\n    // some uses below may contain quantities greater than may be\n    // represented in a 32-bit integer and may also be negative.\n    // I.e., a simple global replace will fail, though the existing\n    // test suite may not detect that.  Also, large skinny matrices\n    // could easily need more than 32 bit integers to address.\n\n\n    // Forward declarations for friends\n    class DistributedMatrixDistribution;\n    template <typename T> class DistributedMatrix;\n    \n    static inline DistributedMatrixDistribution column_distributed_matrix_distribution(World& world, int64_t n, int64_t m, int64_t coltile=0);\n    static inline DistributedMatrixDistribution row_distributed_matrix_distribution(World& world, int64_t n, int64_t m, int64_t rowtile=0);\n\n    template <typename T>\n    DistributedMatrix<T> concatenate_rows(const DistributedMatrix<T>& a, const DistributedMatrix<T>& b);\n\n    template <typename T>\n    DistributedMatrix<T> interleave_rows(const DistributedMatrix<T>& a, const DistributedMatrix<T>& b);\n\n    class DistributedMatrixDistribution {\n        friend DistributedMatrixDistribution column_distributed_matrix_distribution(World& world, int64_t n, int64_t m, int64_t coltile);\n        friend DistributedMatrixDistribution row_distributed_matrix_distribution(World& world, int64_t n, int64_t m, int64_t rowtile);\n        template <typename T> friend class DistributedMatrix;\n\n    protected:\n        World* pworld;\n        int64_t P;                ///< No. of processors\n        ProcessID rank;           ///< My processor rank\n        int64_t n;                ///< Column dimension of A(n,m)\n        int64_t m;                ///< Row dimension of A(n,m)\n        int64_t tilen;            ///< Tile size for column\n        int64_t tilem;            ///< Tile size for row\n        int64_t Pcoldim;          ///< Column dimension of processor grid\n        int64_t Prowdim;          ///< Row dimension of processor grid\n        int64_t Pcol;             ///< Column of processor grid for this processor\n        int64_t Prow;             ///< Row of processor grid for this processor\n        int64_t ilo,ihi;          ///< Range of column indices on this processor\n        int64_t jlo,jhi;          ///< Range of row indices on this processor\n        int64_t idim,jdim;        ///< Dimension of data on this processor\n\n\n        /// Constructs distribution and size info for a matrix (for use by factory functions only)\n\n        /// This routine is dumb and just copies the given arguments,\n        /// hence it can easily make an invalid matrix.  The smarts\n        /// are in the factory functions, hence this constructor is\n        /// not for general use.\n        ///\n        /// The matrix is tiled over a grid of processes as specified by the tile sizes.\n        /// @param[in] world The world\n        /// @param[in] n The matrix column dimension \n        /// @param[in] m The matrix row dimension\n        /// @param[in] coltile Tile size for the columns\n        /// @param[in] rowtile Tile size for the rows\n        DistributedMatrixDistribution(World& world, int64_t n, int64_t m, int64_t coltile, int64_t rowtile)\n            : pworld(&world)\n            , P(world.size())\n            , rank(world.rank())\n            , n(n)\n            , m(m)\n            , tilen(coltile)\n            , tilem(rowtile)\n            , Pcoldim((n-1)/tilen+1)\n            , Prowdim((m-1)/tilem+1)\n            , Pcol(rank/Prowdim)\n            , Prow(rank - Pcol*Prowdim)\n            , ilo(Pcol*tilen)\n            , ihi(std::min(ilo+tilen-1,n-1))\n            , jlo(Prow*tilem)\n            , jhi(std::min(jlo+tilem-1,m-1))\n            , idim(std::max(ihi-ilo+1,int64_t(0)))\n            , jdim(std::max(jhi-jlo+1,int64_t(0)))\n        {\n            if (ilo > ihi || jlo > jhi) {\n                ilo = jlo = 0;\n                ihi = jhi = -1;\n            }\n        }\n\n\n    public:\n\n        /// Default constructor makes an invalid distribution\n        DistributedMatrixDistribution() \n            : pworld(0)\n            , P(0)\n            , rank(0)\n            , n(0)\n            , m(0)\n            , tilen(0)\n            , tilem(0)\n            , Pcoldim(0)\n            , Prowdim(0)\n            , Pcol(0)\n            , Prow(0)\n            , ilo(0)\n            , ihi(-1)\n            , jlo(0)\n            , jhi(-1)\n            , idim(0)\n            , jdim(0)\n        {}\n\n\n        /// Resets state to same as default constructor\n        void clear() {\n            pworld = (World*)(0);\n            P = rank = n = m = tilen = tilem = Pcoldim = Prowdim = Pcol = Prow = ilo = ihi = jlo = jhi = idim = jdim = 0;\n        }\n\n        bool operator==(const DistributedMatrixDistribution& d) const {\n            return \n                pworld  == d.pworld &&\n                P       == d.P      &&\n                rank    == d.rank   &&\n                n       == d.n      &&\n                m       == d.m      &&\n                tilen   == d.tilen  &&\n                tilem   == d.tilem  &&\n                Pcoldim == d.Pcoldim &&\n                Prowdim == d.Prowdim &&\n                Pcol    == d.Pcol   &&\n                Prow    == d.Prow   &&\n                ilo     == d.ilo    &&\n                ihi     == d.ihi    &&\n                jlo     == d.jlo    &&\n                jhi     == d.jhi    &&\n                idim    == d.idim   &&\n                jdim    == d.jdim;\n        }\n\n\n        /// Returns the column dimension of the matrix ... i.e., n for A(n,m)\n\n        /// @return Column dimension of the matrix ... i.e., n for A(n,m)\n        int64_t coldim() const {\n            return n;\n        }\n\n        /// Returns the row dimension of the matrix ... i.e., m for A(n,m)\n\n\n        /// @return Row dimension of the matrix ... i.e., m for A(n,m)\n        int64_t rowdim() const {\n            return m;\n        }\n\n\n        /// Returns the column tile size\n\n        /// @return Column tile size\n        int64_t coltile() const {\n            return tilen;\n        }\n\n\n        /// Returns the row tile size\n\n        /// @return Row tile size\n        int64_t rowtile() const {\n            return tilem;\n        }\n\n\n        /// Returns the no. of processors in the column dimension\n\n        /// @return No. of processors in the column dimension\n        int64_t process_coldim() const {return Pcoldim;}\n\n\n        /// Returns the no. of processors in the row dimension\n\n        /// @return No. of processors in the rown dimension\n        int64_t process_rowdim() const {return Prowdim;}\n\n\n        /// Returns the total no. of elements stored on this processor\n\n        /// @return Total no. of elements stored on this processor\n        int64_t local_size() const {return idim*jdim;}\n\n\n        /// Returns the no. of column elements stored on this processor\n\n        /// @return No. of column elements stored on this processor (may be zero)\n        int64_t local_coldim() const {return idim;}\n\n\n        /// Returns the no. of row elements stored on this processor\n\n        /// @return No. of row elements stored on this processor\n        int64_t local_rowdim() const {return jdim;}\n\n        /// Returns the inclusive range of column indices on this processor\n\n        /// If there is no data on this processor it returns ilow=0 and ihigh=-1\n        /// @param[out] ilow First column index on this processor (0 if no data)\n        /// @param[out] ihigh Last column index on this processor (-1 if no data)\n        void local_colrange(int64_t& ilow, int64_t& ihigh) const {\n            ilow = ilo;\n            ihigh = ihi;\n        }\n\n\n        /// Returns the inclusive range of row indices on this processor\n\n        /// If there is no data on this processor it returns jlow=0 and jhigh=-1\n        /// @param[out] jlow First row index on this processor (0 if no data)\n        /// @param[out] jhigh Last row index on this processor (-1 if no data)\n        void local_rowrange(int64_t& jlow, int64_t& jhigh) const {\n            jlow = jlo;\n            jhigh = jhi;\n        }\n\n\n        /// Returns the first column index on this processor (0 if no data present)\n        int64_t local_ilow() const {\n            return ilo;\n        }\n\n        /// Returns the last column index on this processor (-1 if no data present)\n        int64_t local_ihigh() const {\n            return ihi;\n        }\n\n\n        /// Returns the first row index on this processor (0 if no data present)\n        int64_t local_jlow() const  {\n            return jlo;\n        }\n\n\n        /// Returns the last row index on this processor (0 if no data present)\n        int64_t local_jhigh() const  {\n            return jhi;\n        }\n\n\n        /// Returns the inclusive ranges of column and row indicies on processor p\n\n        /// If is no data on processor p it returns ilow=jlow=0 and ihigh=jhigh=-1\n        /// @param[in] p The processor p of interest\n        /// @param[out] ilow The first column index on the processor\n        /// @param[out] ihigh The last column index on the processor (-1 if none)\n        /// @param[out] jlow The first row index on the processor\n        /// @param[out] jhigh The last row index on the processor (-1 if none)\n        void get_range(int p, int64_t& ilow, int64_t& ihigh, int64_t& jlow, int64_t& jhigh) const {\n            int pi = p/Prowdim;\n            int pj = p - pi*Prowdim;\n            if (pi >= process_coldim() || pj >= process_rowdim()) {\n                ilow = jlow = 0;\n                ihigh = jhigh = -1;\n            }\n            else {\n                ilow = pi*tilen;\n                jlow = pj*tilem;\n                ihigh= std::min(ilow+tilen-1,n-1);\n                jhigh= std::min(jlow+tilem-1,m-1);\n            }\n\n            return;\n        }\n\n\n        /// Returns the inclusive range of column indices on processor p\n\n        /// If is no data on processor p it returns ilow=0 and ihigh=-1\n        /// @param[in] p The processor p of interest\n        /// @param[out] ilow The first column index on the processor\n        /// @param[out] ihigh The last column index on the processor (-1 if none)\n        void get_colrange(int p, int64_t& ilow, int64_t& ihigh) const {\n            int64_t jlow, jhigh;\n            get_range(p, ilow, ihigh, jlow, jhigh);\n\n            return;\n        }\n\n\n        /// Returns the inclusive range of row indices on processor p\n\n        /// If is no data on processor p it returns jlow=0 and jhigh=-1\n        /// @param[in] p The processor p of interest\n        /// @param[out] jlow The first row index on the processor\n        /// @param[out] jhigh The last row index on the processor (-1 if none)\n        void get_rowrange(int p, int64_t& jlow, int64_t& jhigh) const {\n            int64_t ilow, ihigh;\n            get_range(p, ilow, ihigh, jlow, jhigh);\n\n            return;\n        }\n\n\n        /// Returns the associated world\n\n        /// @return The world\n        World& get_world() const {return *pworld;}\n\n\n        /// Returns true if the matrix is column distributed (i.e., row dimension not distributed)\n\n        /// @return True if the matrix is column distributed (i.e., row dimension not distributed)\n        bool is_column_distributed() const {return process_rowdim()==1;}\n\n\n        /// Returns true if the matrix is row distributed (i.e., column dimension not distributed)\n\n        /// @return True if the matrix is row distributed (i.e., column dimension not distributed)\n        bool is_row_distributed() const {return process_coldim()==1;}\n\n\n        /// Returns the distribution (aka *this)\n        const DistributedMatrixDistribution& distribution() const {return *this;}\n\n\n        /// Returns the number of the process that owns element (i,j)\n        ProcessID owner(int64_t i, int64_t j) const {\n            int pcol = i/coltile();\n            int prow = j/rowtile();\n            \n            return pcol*process_rowdim() + prow;\n        }\n\n        virtual ~DistributedMatrixDistribution() {}\n    };\n\n\n    /// Manages data associated with a row/column/block distributed array\n\n    /// The class itself provides limited functionality for accessing the\n    /// data and is primarily intended to provide base functionality for\n    /// use by matrix algorithms and other matrix classes.\n    ///\n    /// The constructor is deliberately simple.  Factory functions\n    /// are expected to be the main construction tool.\n    ///\n    /// Assignment and copy are shallow just like for tensor and for the same reasons.  \n    ///\n    /// To get a deep copy use the copy function (again just like for tensors).\n    template <typename T>\n    class DistributedMatrix : public DistributedMatrixDistribution {\n        friend DistributedMatrix<T> interleave_rows<T>(const DistributedMatrix<T>& a, const DistributedMatrix<T>& b);\n        friend DistributedMatrix<T> concatenate_rows<T>(const DistributedMatrix<T>& a, const DistributedMatrix<T>& b);\n\n        Tensor<T> t;            ///< The data\n\n        static T idij(const int64_t i, const int64_t j) {return (i==j) ?  T(1) : T(0);}\n\n    protected:\n\n        /// Constructs a distributed matrix dimension (n,m) with specified tile sizes and initialized to zero\n\n        /// [deprecated ... use factory functions instead]\n        /// \n        /// The matrix is tiled over a grid of processes as specified by the tile sizes.\n        /// @param[in] world The world\n        /// @param[in] n The matrix column dimension \n        /// @param[in] m The matrix row dimension\n        /// @param[in] coltile Tile size for the columns\n        /// @param[in] rowtile Tile size for the rows\n        DistributedMatrix(World& world, int64_t n, int64_t m, int64_t coltile, int64_t rowtile)\n            : DistributedMatrixDistribution(world, n, m, coltile, rowtile)\n        {\n            if (idim>0 && jdim>0) t = Tensor<T>(idim,jdim);\n        }\n\n    public:\n\n        /// Default constructor makes an empty matrix that cannot be used except as a target for assignemnt\n        DistributedMatrix()\n            : DistributedMatrixDistribution()\n            , t()\n        {}\n\n\n        /// Constructs a distributed matrix with given distribution info\n        DistributedMatrix(const DistributedMatrixDistribution& d)\n            : DistributedMatrixDistribution(d)\n        {\n            if (idim>0 && jdim>0) t = Tensor<T>(idim,jdim);\n        }\n\n\n        /// Copy constructor copies dimensions, distribution, and shallow copy of content (unless deepcopy=true)\n        DistributedMatrix(const DistributedMatrix<T>& A, bool deepcopy=false)\n            : DistributedMatrixDistribution(A)\n            , t(deepcopy ? copy(A.t) : A.t) \n        {}\n\n\n        /// Assigment copies dimensions, distribution, and shallow copy of content\n        DistributedMatrix<T>& operator=(const DistributedMatrix<T>& A) {\n            if (this != &A) {\n                DistributedMatrixDistribution::operator=(A);\n                t = A.t;\n            }\n            return *this;\n        }\n\n        virtual ~DistributedMatrix() {}\n\n\n        /// Frees memory and resets state to same as default constructor\n        void clear() {\n            DistributedMatrixDistribution::clear();\n            t.clear();\n        }\n\n\n        /// Fills the matrix with the provided function of the indices\n\n        /// @param[in] f The matrix is filled using \\c a[i,j]=f(i,j)\n        template <typename funcT>\n        void fill(const funcT& f) {\n            for (int64_t i=ilo; i<=ihi; i++) {\n                for (int64_t j=jlo; j<=jhi; j++) {\n                    t(i-ilo,j-jlo) = f(i,j);\n                }\n            }\n        }\n\n\n        /// Fills the matrix with a scalar\n\n        /// @param[in] value The matrix is filled using \\c a[i,j]=value\n        void fill(T value) {\n            t.fill(value);\n        }\n\n\n        void fill_identity() {\n            fill(DistributedMatrix<T>::idij);\n        }\n\n\n        /// Returns reference to the local data \n\n        /// The local data is a tensor dimension \\c (local_coldim,local_rowdim) and if either of the dimensions\n        /// are zero there is no data.  A natural way to loop thru the data that gives you the actual row and column indices is\n        /// \\code\n        /// const Tensor<T>& t = A.data();\n        /// for (int64_t i=A.get_ilow(); i<=A.get_ihigh(); i++) {\n        ///    for (int64_t j=A.get_jlow(); j<=A.get_jhigh(); j++) {\n        ///        the ij'th element is t(i-ilo, j-jlo)\n        ///    }\n        /// }\n        /// \\endcode\n        /// @return Reference to non-constant tensor holding the local data\n        Tensor<T>& data() {return t;}\n\n        /// Returns const reference to data\n\n        /// The local data is a tensor dimension \\c (local_coldim,local_rowdim) and if either of the dimensions\n        /// are zero there is no data.  A natural way to loop thru the data that gives you the actual row and column indices is\n        /// \\code\n        /// const Tensor<T>& t = A.data();\n        /// for (int64_t i=A.get_ilow(); i<=A.get_ihigh(); i++) {\n        ///    for (int64_t j=A.get_jlow(); j<=A.get_jhigh(); j++) {\n        ///        the ij'th element is t(i-ilo, j-jlo)\n        ///    }\n        /// }\n        /// \\endcode\n        /// @return Reference to constant tensor holding the local data\n        const Tensor<T>& data() const {return t;}\n\n\n        /// Copy from the replicated \\c (m,n) matrix into the distributed matrix\n\n        /// @param[in] s The input tensor\n        void copy_from_replicated(const Tensor<T>& s) {\n            if (local_size() > 0) t(___) = s(Slice(ilo,ihi),Slice(jlo,jhi));\n        }\n\n        /// Copy from the distributed \\c (m,n) matrix into the replicated matrix (collective call)\n\n        /// The entire output tensor is zeroed, the local data copied\n        /// into it, and then a global sum performed to replicate the\n        /// data.\n        /// @param[out] s The output tensor (assumed already allocated\n        /// to be at least large enough in both dimensions)\n        void copy_to_replicated(Tensor<T>& s) const {\n            MADNESS_CHECK(s.iscontiguous());\n            s = 0.0;\n            if (local_size() > 0) s(Slice(ilo,ihi),Slice(jlo,jhi)) = t(___);\n            get_world().gop.sum(s.ptr(), s.size());\n        }\n\n        /// Copy from replicated patch (inclusive index range) into the distributed matrix\n\n        /// @param[in] ilow First \\c i index in patch\n        /// @param[in] ihigh Last \\c i index in patch\n        /// @param[in] jlow First \\c j index in patch\n        /// @param[in] jhigh Last \\c j index in patch\n        void copy_from_replicated_patch(int64_t ilow, int64_t ihigh, int64_t jlow, int64_t jhigh, const Tensor<T>& s) {\n            int64_t i0 = std::max(ilo,ilow);\n            int64_t j0 = std::max(jlo,jlow);\n            int64_t i1 = std::min(ihi,ihigh);\n            int64_t j1 = std::min(jhi,jhigh);\n            if (i0<=i1 && j0<=j1) {\n                t(Slice(i0-ilo,i1-ilo),Slice(j0-jlo,j1-jlo)) = s(Slice(i0-ilow,i1-ilow),Slice(j0-jlow,j1-jlow));\n            }\n        }\n\n        /// Copy from distributed matrix into replicated patch (inclusive index range; collective call)\n\n        /// The entire output tensor is zeroed, relevant local data\n        /// copied into it, and then a global sum performed to\n        /// replicate the data.\n        /// @param[in] ilow First \\c i index in patch\n        /// @param[in] ihigh Last \\c i index in patch\n        /// @param[in] jlow First \\c j index in patch\n        /// @param[in] jhigh Last \\c j index in patch\n        void copy_to_replicated_patch(int64_t ilow, int64_t ihigh, int64_t jlow, int64_t jhigh, Tensor<T>& s) const {\n            MADNESS_CHECK(s.iscontiguous());\n            s = 0;\n            int64_t i0 = std::max(ilo,ilow);\n            int64_t j0 = std::max(jlo,jlow);\n            int64_t i1 = std::min(ihi,ihigh);\n            int64_t j1 = std::min(jhi,jhigh);\n            if (i0<=i1 && j0<=j1) {\n                t(Slice(i0-ilo,i1-ilo),Slice(j0-jlo,j1-jlo)) = s(Slice(i0-ilow,i1-ilow),Slice(j0-jlow,j1-jlow));\n            }\n            get_world().gop.sum(s.ptr(), s.size());\n        }\n\n        void extract_columns(int64_t jlow, int64_t jhigh, DistributedMatrix<T>& U) const {\n            int newrowdim = jhigh - jlow + 1;\n            MADNESS_CHECK(jlow >= 0);\n            MADNESS_CHECK(jhigh < rowdim());\n            MADNESS_CHECK(newrowdim == U.rowdim());\n            MADNESS_CHECK(coldim() == U.coldim());\n            MADNESS_CHECK(is_column_distributed());\n            MADNESS_CHECK(U.is_column_distributed());\n            MADNESS_CHECK(coltile() == U.coltile());\n\n            int64_t i0 = ilo;\n            int64_t j0 = std::max(jlo,jlow);\n            int64_t i1 = ihi;\n            int64_t j1 = std::min(jhi,jhigh);\n            if (i0<=i1 && j0<=j1) {\n                U.data()(___) = t(Slice(i0-ilo,i1-ilo),Slice(j0-jlo,j1-jlo));\n            }\n        }\n\n        template <typename R> \n        bool has_same_dimension_and_distribution(const DistributedMatrix<R>& A) {\n            return DistributedMatrixDistribution::operator==(A);\n        }\n\n        /// Inplace addition --- dimensions and distribution must be identical\n\n        /// @param[in] A The matrix to add to the current matrix\n        /// @return A reference to the current matrix\n        DistributedMatrix<T>& operator+=(const DistributedMatrix<T>& A) {\n            MADNESS_CHECK(has_same_dimension_and_distribution(A));\n            t += A.t;\n            return *this;\n        }\n\n\n        /// Out of place addition  --- dimensions and distribution must be identical\n\n        /// @param[in] A The matrix to add to the current matrix\n        /// @return A new matrix with the same dimensions and distribution as the inputs\n        DistributedMatrix<T> operator+(const DistributedMatrix<T>& A) const {\n            MADNESS_CHECK(has_same_dimension_and_distribution(A));\n            return copy(*this)+=A;\n        }\n\n\n        /// Inplace scale by a constant\n\n        /// @param[in] s The scaling factor\n        /// @return A reference to the current matrix\n        DistributedMatrix<T>& operator*=(const T s) {\n            t.scale(s);\n            return *this;\n        }\n\n        /// Sets element (i,j) to v if (i,j) is local, otherwise throws MadnessException\n        void set(int64_t i, int64_t j, const T x) {\n            MADNESS_CHECK(i>=ilo && i<=ihi && j>=jlo && j<=jhi);\n            t(i-ilo,j-jlo) = x;\n        }\n\n        /// Gets element (i,j) if (i,j) is local, otherwise throws MadnessException\n        T get(int64_t i, int64_t j) const {\n            MADNESS_CHECK(i>=ilo && i<=ihi && j>=jlo && j<=jhi);\n            return t(i-ilo,j-jlo);\n        }\n    };\n\n\n    /// Deep copy of content\n\n    /// @param[in] A The matrix to be copied\n    /// @return A new matrix with identical dimensions, distribution and content (deep copy)\n    template <typename T>\n    DistributedMatrix<T> copy(const DistributedMatrix<T>& A) {\n        return DistributedMatrix<T>(A,true);\n    }\n    \n\n    /// Generates distribution for an (n,m) matrix distributed by columns (row dimension is not distributed)\n\n    /// Quietly forces an even column tile size for ease of use in the systolic matrix algorithms\n    /// @param[in] world The world\n    /// @param[in] n The column (first) dimension\n    /// @param[in] m The row (second) dimension\n    /// @param[in] coltile Tile size for columns forced to be even (default is to use all processes)\n    /// @return An object encoding the dimension and distribution information\n    static inline DistributedMatrixDistribution\n    column_distributed_matrix_distribution(World& world, int64_t n, int64_t m, int64_t coltile) { // default coltile=0 above\n        if (world.size()*coltile < n) coltile = (n-1)/world.size() + 1;\n        coltile = std::min(coltile,n);\n        if ((coltile&0x1)) ++coltile; // ??? Was before the previous statement\n\n        return DistributedMatrixDistribution(world, n, m, coltile, m);\n    }\n\n\n    /// Generates an (n,m) matrix distributed by columns (row dimension is not distributed)\n\n    /// Quietly forces an even column tile size for ease of use in the systolic matrix algorithms\n    /// @param[in] world The world\n    /// @param[in] n The column (first) dimension\n    /// @param[in] m The row (second) dimension\n    /// @param[in] coltile Tile size for columns forced to be even (default is to use all processes)\n    /// @return A new zero matrix with the requested dimensions and distribution\n    template <typename T>\n    DistributedMatrix<T> column_distributed_matrix(World& world, int64_t n, int64_t m, int64_t coltile=0) {\n        return DistributedMatrix<T>(column_distributed_matrix_distribution(world, n, m, coltile));\n    }\n\n\n    /// Generates an (n,m) matrix distribution distributed by rows (column dimension is not distributed)\n\n    /// @param[in] world The world\n    /// @param[in] n The column (first) dimension\n    /// @param[in] m The row (second) dimension\n    /// @param[in] rowtile Tile size for row (default is to use all processes)\n    /// @return An object encoding the dimension and distribution information\n    static inline DistributedMatrixDistribution\n    row_distributed_matrix_distribution(World& world, int64_t n, int64_t m, int64_t rowtile) { // default rowtile=0 above\n        if (world.size()*rowtile < m) rowtile = (m-1)/world.size() + 1;\n        rowtile = std::min(rowtile,m);\n\n        return DistributedMatrixDistribution(world, n, m, n, rowtile);\n    }\n\n    /// Generates an (n,m) matrix distributed by rows (column dimension is not distributed)\n\n    /// @param[in] world The world\n    /// @param[in] n The column (first) dimension\n    /// @param[in] m The row (second) dimension\n    /// @param[in] rowtile Tile size for row (default is to use all processes)\n    /// @return A new zero matrix with the requested dimensions and distribution\n    template <typename T>\n    DistributedMatrix<T> row_distributed_matrix(World& world, int64_t n, int64_t m, int64_t rowtile=0) {\n        return DistributedMatrix<T>(row_distributed_matrix_distribution(world, n, m, rowtile));\n    }\n\n\n    /// Generates a distributed matrix with rows of \\c a and \\c b interleaved\n\n    /// I.e., the even rows of the result will be rows of \\c a , and the\n    /// odd rows those of \\c b .\n    ///\n    /// The matrices a and b must have the same dimensions and be\n    /// identically distributed.  The result will have a doubled column\n    /// dimension and column tile size.  The row dimension is unchanged.\n    /// @param[in] a The matrix providing even rows of the result\n    /// @param[in] b The matrix providing odd rows of the result\n    /// @return The result matrix\n    template <typename T>\n    DistributedMatrix<T> interleave_rows(const DistributedMatrix<T>& a, const DistributedMatrix<T>& b) {\n        MADNESS_CHECK(a.rowdim()==b.rowdim() && a.coldim()==b.coldim() && a.coltile()==b.coltile() && a.rowtile()==b.rowtile());\n\n        DistributedMatrix<T> c(a.get_world(), a.coldim()*2, a.rowdim(), a.coltile()*2, a.rowtile());\n        c.data()(Slice(0,-1,2),_) = a.data()(___);\n        c.data()(Slice(1,-1,2),_) = b.data()(___);\n    }\n\n\n    /// Generates a column-distributed matrix with rows of \\c a and \\c b contatenated\n\n    /// I.e., c[i,j] = a[i,j] if j<na or b[i,j-na] if j>=na\n    ///\n    /// The matrices a and b must have the same column size (i.e., the\n    /// same number of rows) and be column distributed with the same\n    /// column tilesze.  The result is also column distributed with\n    /// the same column tilesize as the input matrices.\n    /// @param[in] a The first matrix\n    /// @param[in] b The second matrix\n    /// @return The result matrix\n    template <typename T>\n    DistributedMatrix<T> concatenate_rows(const DistributedMatrix<T>& a, const DistributedMatrix<T>& b) {\n        MADNESS_CHECK(a.coldim()==b.coldim() && a.coltile()==b.coltile() && a.is_column_distributed() && b.is_column_distributed());\n\n        int64_t ma = a.rowdim();\n        int64_t mb = b.rowdim();\n\n        DistributedMatrix<T> c(a.get_world(), a.coldim(), ma+mb, a.coltile(), ma+mb);\n        \n        int64_t ilow, ihigh;\n        a.local_colrange(ilow, ihigh);\n        if (ilow <= ihigh) {\n            c.data()(_,Slice(0,ma-1)) = a.data()(___);\n            c.data()(_,Slice(ma,-1))  = b.data()(___);\n        }\n\n        return c;\n    }\n\n    /// Generates a column-distributed matrix with rows of \\c a, \\c b, \\c c, and \\c d contatenated in order\n\n    /// I.e., c[i,j] = a[i,j] if j in [0,na), b[i,j-na] if j in [na,na+nb), c[i,j-na-nb] if j in [na+nb,na+nb+nc), etc.\n    /// The matrices must have the same column size (i.e., the same\n    /// number of rows) and be column distributed with the same column\n    /// tilesze.  The result is also column distributed with the same\n    /// column tilesize as the input matrices.\n    /// @param[in] a The first matrix\n    /// @param[in] b The second matrix\n    /// @param[in] c The third matrix\n    /// @param[in] d The fourth matrix\n    /// @return The result matrix\n    template <typename T>\n    DistributedMatrix<T> concatenate_rows( const DistributedMatrix<T>& a, const DistributedMatrix<T>& b, const DistributedMatrix<T>& c, const DistributedMatrix<T>& d) {\n        MADNESS_CHECK(a.coldim()==b.coldim() && b.coldim()==c.coldim() && c.coldim()==d.coldim());\n        MADNESS_CHECK(a.coltile()==b.coltile() && b.coltile()==c.coltile() && c.coltile()==d.coltile());\n        MADNESS_CHECK(a.is_column_distributed() && b.is_column_distributed() && c.is_column_distributed() && d.is_column_distributed());\n        \n        int64_t ma = a.rowdim();\n        int64_t mb = b.rowdim();\n        int64_t mc = c.rowdim();\n        int64_t md = d.rowdim();\n        \n        DistributedMatrix<T> result(a.get_world(), a.coldim(), ma+mb+mc+md, a.coltile(), ma+mb+mc+md);\n\n        if(a.local_size() > 0) result.data()( _ , Slice(0,ma-1) ) = a.data()(___);\n        if(b.local_size() > 0) result.data()( _ , Slice(ma, ma+mb-1) ) = b.data()(___);\n        if(c.local_size() > 0) result.data()( _ , Slice(ma+mb, ma+mb+mc-1) ) = c.data()(___);\n        if(d.local_size() > 0) result.data()( _ , Slice(ma+mb+mc, -1) ) = d.data()(___);\n\n        return result;\n    }\n\n\n    /// Generates a row-distributed matrix with rows of \\c a and \\c b contatenated\n\n    /// I.e., c[i,j] = a[i,j] if i<ma or b[i-ma,j] if i>=ma\n    ///\n    /// The matrices a and b must have the same row size (i.e., the\n    /// same number of columns) and be row distributed with the same\n    /// row tilesze.  The result is also row distributed with\n    /// the same row tilesize as the input matrices.\n    /// @param[in] a The first matrix\n    /// @param[in] b The second matrix\n    /// @return The result matrix\n    template <typename T>\n    DistributedMatrix<T> concatenate_columns(const DistributedMatrix<T>& a, const DistributedMatrix<T>& b) {\n        MADNESS_CHECK(a.rowdim()==b.rowdim() && a.rowtile()==b.rowtile() && a.is_row_distributed() && b.is_row_distributed());\n\n        int64_t ma = a.coldim();\n        int64_t mt = ma + b.coldim();\n\n        DistributedMatrix<T> c(a.get_world(), mt, a.rowdim(), b.rowtile(), mt);\n\n        if(a.local_size() > 0) c.data()( Slice(0,ma-1), _ ) = a.data()(___);\n        if(a.local_size() > 0) c.data()( Slice(ma,-1), _ ) = b.data()(___);\n\n        return c;\n    }\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/tensor/dummy_main.c",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007-10 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov \n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  \n  $Id$\n*/\n\n  \nint main() {\n\treturn 0;\n}\n\n"
  },
  {
    "path": "src/madness/tensor/elem.cc",
    "content": "#include <madness/madness_config.h>\n\n#ifdef MADNESS_HAS_ELEMENTAL\n\n#include <madness/tensor/elem.h>\n\nnamespace madness {\n    template\n    void gesvp(World& world, const Tensor<double>& a, const Tensor<double>& b, Tensor<double>& x);\n\n    template\n    void sygvp(World& world, const Tensor<double>& A, const Tensor<double>& B, int itype,\n              Tensor<double>& V, Tensor<double>& e);\n}\n\n#else \n\n/////int this_is_not_used_junk_junk_junk;\n\n#endif //MADNESS_HAS_ELEMENTAL\n"
  },
  {
    "path": "src/madness/tensor/elem.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_TENSOR_ELEM_H__INCLUDED\n#define MADNESS_TENSOR_ELEM_H__INCLUDED\n\n#include <madness/madness_config.h>\n#include <madness/world/MADworld.h>\n\n#ifdef MADNESS_HAS_ELEMENTAL_EMBEDDED\n\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/tensor_lapack.h>\n#include <madness/tensor/distributed_matrix.h>\n#include <madness/world/print.h>\n#include <madness/world/binsorter.h>\n\n#include <ctime>\n#if defined(HAVE_EL_H)\n# include <El.hpp>\nnamespace elem = El;\n#elif defined(HAVE_ELEMENTAL_H)\n# include <elemental.hpp>\n#else\n# error \"MADNESS_HAS_ELEMENTAL set but neither HAVE_EL_H nor HAVE_ELEMENTAL_H set: file an issue at \" MADNESS_PACKAGE_URL\n#endif\n\nnamespace madness {\n\n    namespace detail {\n\n        template <typename T> \n        struct Value {\n            int i;\n            int j;\n            T t;\n            Value(int i, int j, T t) : i(i), j(j), t(t) {}\n            Value(){} // required for use in STL container\n            template <typename Archive>\n            void serialize(const Archive& ar) {\n                ar & i & j & t;\n            }\n        };\n\n        template <typename T>  \n        class MadToElemDistCopy {\n            elem::DistMatrix<T>& d;\n        public:\n            MadToElemDistCopy(elem::DistMatrix<T>& d) : d(d) {}\n\n            void operator()(const Value<T>& v) {\n                d.Set(v.i, v.j, v.t);\n            }\n        };\n\n        template <typename T>  \n        class ElemToMadDistCopy {\n            DistributedMatrix<T>& d;\n        public:\n            ElemToMadDistCopy(DistributedMatrix<T>& d) : d(d) {}\n\n            void operator()(const Value<T>& v) {\n                d.set(v.i, v.j, v.t);\n            }\n        };\n\n    }\n\n\n    /// Backport of more recent Elemental DistMatrix API\n    template <typename T>\n    ProcessID Owner(const elem::DistMatrix<T>& d, int i, int j) {\n        int RowOwner = (i+d.ColAlign()) % d.ColStride(); // is Col/Row Align in later versions ... no ment\n        int ColOwner = (j+d.RowAlign()) % d.RowStride(); \n        return RowOwner+ColOwner*d.ColStride();        \n    }\n\n\n    /// Copy a MADNESS distributed matrix into an Elemental distributed matrix\n\n    /// Should work for any distribution of either\n    template <typename T>\n    void copy_to_elemental(const DistributedMatrix<T>& din, elem::DistMatrix<T>& dout) {\n        BinSorter< detail::Value<T> , detail::MadToElemDistCopy<T> > s(din.get_world(), detail::MadToElemDistCopy<T>(dout));\n\n        int64_t ilo, ihi, jlo, jhi;\n        din.local_colrange(ilo,ihi);\n        din.local_rowrange(jlo,jhi);\n        const Tensor<T>& t = din.data();\n        for (int64_t i=ilo; i<=ihi; i++) {\n            for (int64_t j=jlo; j<=jhi; j++) {\n                ProcessID owner = Owner(dout, i, j);\n                s.insert(owner, detail::Value<T>(i,j,t(i-ilo, j-jlo)));\n            }\n        }\n\n        s.finish();\n    }\n\n    /// Copy a MADNESS distributed matrix from an Elemental distributed matrix\n\n    /// Should work for any distribution of either\n    template <typename T>\n    void copy_from_elemental(const elem::DistMatrix<T>& din, DistributedMatrix<T>& dout) {\n        BinSorter< detail::Value<T> , detail::ElemToMadDistCopy<T> > s(dout.get_world(), detail::ElemToMadDistCopy<T>(dout));\n        \n        const int64_t colShift =    din.ColShift(); // first row we own\n        const int64_t rowShift =    din.RowShift(); // first col we own\n        const int64_t colStride =   din.ColStride();\n        const int64_t rowStride =   din.RowStride();\n        const int64_t localHeight = din.LocalHeight();\n        const int64_t localWidth =  din.LocalWidth();\n        \n        for( int64_t jLocal=0; jLocal<localWidth; ++jLocal ) {\n            for( int64_t iLocal=0; iLocal<localHeight; ++iLocal ) {\n                const int64_t i = colShift + iLocal*colStride;\n                const int64_t j = rowShift + jLocal*rowStride;\n\n                const ProcessID owner = dout.owner(i,j);\n                s.insert(owner, detail::Value<T>(i,j,din.GetLocal(iLocal,jLocal)));\n            }\n        }\n\n        s.finish();\n    }\n\n    /** \\brief  Generalized real-symmetric or complex-Hermitian eigenproblem.\n\n    This function uses the Elemental HermitianGenDefiniteEig routine.\n\n    A should be selfadjoint and B positive definite.\n\n    \\verbatim\n    Specifies the problem type to be solved:\n    = 1:  A*x = (lambda)*B*x\n    = 2:  A*B*x = (lambda)*x (TODO)\n    = 3:  B*A*x = (lambda)*x (TODO)\n    \\endverbatim\n\n    */\n    template <typename T>\n    void sygv(const DistributedMatrix<T>& A, \n               const DistributedMatrix<T>& B, \n               int itype,\n               DistributedMatrix<T>& X, \n               Tensor< typename Tensor<T>::scalar_type >& e) \n    {\n        const int64_t n = A.coldim();\n        const int64_t m = A.rowdim();\n        MADNESS_ASSERT(n==m);\n        MADNESS_ASSERT(n==B.coldim() && m==B.rowdim());\n        \n        const int blocksize = 128;\n        const elem::Grid GG(A.get_world().mpi.comm().Get_mpi_comm() );\n        elem::SetBlocksize(blocksize);\n        \n        elem::DistMatrix<T> EA(n,n,GG);\n        elem::DistMatrix<T> EB(n,n,GG);\n        \n        copy_to_elemental(A,EA);\n        copy_to_elemental(B,EB);\n        \n        elem::HermitianGenDefiniteEigType eigType = elem::AXBX;\n        elem::UpperOrLower uplo = elem::CharToUpperOrLower('U');\n        elem::DistMatrix<T> Xd(n,n,GG);\n        elem::DistMatrix<T,elem::VR,elem::STAR> wd( n, n, GG);\n        \n        // 0.83+ ???\n        elem::HermitianGenDefiniteEig(eigType, uplo, EA, EB, wd, Xd, elem::SortType::ASCENDING);\n        \n        // 0.79-0.82 ?\n        //elem::HermitianGenDefiniteEig(eigType, uplo, EA, EB, wd, Xd);\n        //elem::hermitian_eig::Sort(wd, Xd);\n        \n        A.get_world().mpi.Barrier();\n        \n        X = DistributedMatrix<T>(A.distribution());\n        e = Tensor<typename Tensor<T>::scalar_type>(n);\n        \n        copy_from_elemental(Xd, X);\n        \n        const int  localHeight1 = wd.LocalHeight();\n        const int colShift1 = wd.ColShift(); // first row we own\n        const int colStride1= wd.ColStride();\n        T * buffer = e.ptr();\n        for( int iLocal=0; iLocal<localHeight1; ++iLocal ) {\n            const int jLocal=0;\n            const int i = colShift1 + iLocal*colStride1;\n            //buffer[i]= wd.Get( iLocal, jLocal);\n            buffer[i]= wd.GetLocal( iLocal, jLocal);\n        }\n        \n        A.get_world().gop.sum(e.ptr(),n);\n    }\n\n    /** \\brief  Generalized real-symmetric or complex-Hermitian eigenproblem.\n\n    This function uses the Elemental HermitianGenDefiniteEig routine.\n\n    A should be selfadjoint and B positive definite.\n\n    \\verbatim\n    Specifies the problem type to be solved:\n    = 1:  A*x = (lambda)*B*x\n    = 2:  A*B*x = (lambda)*x (TODO)\n    = 3:  B*A*x = (lambda)*x (TODO)\n    \\endverbatim\n\n    */\n    template <typename T>\n    void sygvp(World& world,\n               const Tensor<T>& a, const Tensor<T>& B, int itype,\n              Tensor<T>& V, Tensor< typename Tensor<T>::scalar_type >& e) {\n        TENSOR_ASSERT(a.ndim() == 2, \"sygv requires a matrix\",a.ndim(),&a);\n        TENSOR_ASSERT(a.dim(0) == a.dim(1), \"sygv requires square matrix\",0,&a);\n        TENSOR_ASSERT(B.ndim() == 2, \"sygv requires a matrix\",B.ndim(),&a);\n        TENSOR_ASSERT(B.dim(0) == B.dim(1), \"sygv requires square matrix\",0,&a);\n        TENSOR_ASSERT(a.iscontiguous(),\"sygvp requires a contiguous matrix (a)\",0,&a);\n        TENSOR_ASSERT(B.iscontiguous(),\"sygvp requires a contiguous matrix (B)\",0,&B);\n\n        world.gop.broadcast(a.ptr(), a.size(), 0);\n        world.gop.broadcast(B.ptr(), B.size(), 0);\n\n        const int n = a.dim(1);\n\n        e = Tensor<typename Tensor<T>::scalar_type>(n);\n        V = Tensor<T>(n,n);\n\n        if (a.dim(0) <= 4) {\n            // Work around bug in elemental/pmrrr/mkl/something for n=2,3\n            sygv(a, B, itype, V, e);\n            return;\n        }\n\n        world.gop.fence(); //<<<<<< Essential to quiesce MADNESS threads/comms\n\n        const int blocksize = 128;\n        try {\n            const elem::Grid GG( world.mpi.comm().Get_mpi_comm() );\n            elem::SetBlocksize(blocksize);\n\n            elem::DistMatrix<T> gd( n, n, GG );\n    \n            const int colShift = gd.ColShift(); // first row we own\n            const int rowShift = gd.RowShift(); // first col we own\n            const int colStride =gd.ColStride();\n            const int rowStride = gd.RowStride();\n            const int localHeight = gd.LocalHeight();\n            const int localWidth = gd.LocalWidth();\n            {\n               const T * buffer = a.ptr();\n               for( int jLocal=0; jLocal<localWidth; ++jLocal )\n               {\n                   for( int iLocal=0; iLocal<localHeight; ++iLocal )\n                       {\n                         const int i = colShift + iLocal*colStride;\n                         const int j = rowShift + jLocal*rowStride;\n                         //gd.Set( iLocal, jLocal, buffer[i+j*n] );\n                         gd.SetLocal( iLocal, jLocal, buffer[i+j*n] );\n                   }\n               }\n            }\n            //gd.Print(\"gs\");\n\n            elem::DistMatrix<T> hd( n, n, GG );\n            {\n               const T * buffer = B.ptr();\n               for( int jLocal=0; jLocal<localWidth; ++jLocal )\n               {\n                   for( int iLocal=0; iLocal<localHeight; ++iLocal )\n                   {\n                         const int i = colShift + iLocal*colStride;\n                         const int j = rowShift + jLocal*rowStride;\n                         //hd.Set( iLocal, jLocal, buffer[i+j*(n)] );\n                         hd.SetLocal( iLocal, jLocal, buffer[i+j*(n)] );\n                   }\n               }\n            }\n           // hd.Print(\"hd\");\n\n            world.mpi.Barrier();\n     \n            elem::HermitianGenDefiniteEigType eigType = elem::AXBX;\n            //const char* uu=\"U\";\n            elem::UpperOrLower uplo = elem::CharToUpperOrLower('U');\n            elem::DistMatrix<T> Xd( n, n, GG );\n            elem::DistMatrix<T,elem::VR,elem::STAR> wd( n, n, GG);\n\n\n            // 0.83+ ???\n            elem::HermitianGenDefiniteEig( eigType, uplo, gd, hd, wd, Xd,elem::SortType::ASCENDING);\n\n            // 0.79-0.82 ?\n            //elem::HermitianGenDefiniteEig( eigType, uplo, gd, hd, wd, Xd);\n            //elem::hermitian_eig::Sort( wd, Xd );\n\n            world.mpi.Barrier();\n            //Xd.Print(\"Xs\");\n     \n     //retrive eigenvalues\n            {\n               const int  localHeight1 = wd.LocalHeight();\n               const int colShift1 = wd.ColShift(); // first row we own\n               const int colStride1 =wd.ColStride();\n               T * buffer = e.ptr();\n               for( int iLocal=0; iLocal<localHeight1; ++iLocal )\n               {\n                   const int jLocal=0;\n                   const int i = colShift1 + iLocal*colStride1;\n                   //buffer[i]= wd.Get( iLocal, jLocal);\n                   buffer[i]= wd.GetLocal( iLocal, jLocal);\n               }\n            }\n            //world.gop.broadcast(e.ptr(),e.size(), 0);\n            world.gop.sum(e.ptr(),n);\n            //if(myrank ==0) cout<< e << endl;\n     //retrive eigenvectors\n            {\n               T * buffer = V.ptr();\n               for( int jLocal=0; jLocal<localWidth; ++jLocal )\n               {\n                  for( int iLocal=0; iLocal<localHeight; ++iLocal )\n                  {\n                     const int i = colShift + iLocal*colStride;\n                     const int j = rowShift + jLocal*rowStride;\n                     //buffer[i+j*n]= Xd.Get( iLocal, jLocal);\n                     buffer[i+j*n]= Xd.GetLocal( iLocal, jLocal);\n                  }\n               }\n            }\n            world.gop.sum(V.ptr(), n*n);\n            V=madness::transpose(V);\n            //world.gop.broadcast(V.ptr(),V.size(), 0);\n            //if(myrank ==0)cout<< V << endl;\n        }\n        catch (TensorException S) {\n            std::cerr << S << std::endl;\n        }\n\n        world.gop.fence(); //<<<<<< Essential to quiesce MADNESS threads/comms\n    }\n\n    /** \\brief  Solve Ax = b for general A using the Elemental. \n    The solution is computed through (partially pivoted) Gaussian elimination.\n\n    A should be a square matrix (float, double, float_complex,\n    double_complex) and b should be either a vector, or a matrix with\n    each vector stored in a column (i.e., b[n,nrhs]).\n\n    It will solve Ax=b as written.\n\n    b can be a vector or a matrix, the only restriction is that satisfies b.rows()==A.rows()\n\n    */\n    template <typename T>\n    void gesvp(World& world, const Tensor<T>& a, const Tensor<T>& b, Tensor<T>& x) {\n\n        TENSOR_ASSERT(a.ndim() == 2, \"gesv requires matrix\",a.ndim(),&a);\n\n        int n = a.dim(0), m = a.dim(1), nrhs = b.dim(1);\n\n        TENSOR_ASSERT(m == n, \"gesv requires square matrix\",0,&a);\n        TENSOR_ASSERT(b.ndim() <= 2, \"gesv require a vector or matrix for the RHS\",b.ndim(),&b);\n        TENSOR_ASSERT(a.dim(0) == b.dim(0), \"gesv matrix and RHS must conform\",b.ndim(),&b);\n        TENSOR_ASSERT(a.iscontiguous(),\"gesvp requires a contiguous matrix (a)\",0,&a);\n        TENSOR_ASSERT(b.iscontiguous(),\"gesvp requires a contiguous matrix (b)\",0,&b);\n        world.gop.broadcast(a.ptr(), a.size(), 0);\n        world.gop.broadcast(b.ptr(), b.size(), 0);\n\n        Tensor<T> AT = transpose(a);\n\n        world.gop.fence(); //<<<<<< Essential to quiesce MADNESS threads/comms\n\n        int blocksize = 128;\n        try {\n            const elem::Grid GG( world.mpi.comm().Get_mpi_comm() );\n            elem::SetBlocksize(blocksize);\n            elem::DistMatrix<T> gd( n, n, GG );\n\n    \n            {\n                 const int colShift = gd.ColShift(); // 1st row local\n                 const int rowShift = gd.RowShift(); // 1st col local\n                 const int colStride =gd.ColStride();\n                 const int rowStride = gd.RowStride();\n                 const int localHeight = gd.LocalHeight();\n                 const int localWidth = gd.LocalWidth();\n                 {\n                    const T * buffer = AT.ptr();\n                    for( int jLocal=0; jLocal<localWidth; ++jLocal )\n                    {\n                        for( int iLocal=0; iLocal<localHeight; ++iLocal )\n                        {\n                              const int i = colShift + iLocal*colStride;\n                              const int j = rowShift + jLocal*rowStride;\n                              //gd.Set( iLocal, jLocal, buffer[i+j*n] );\n                              gd.SetLocal( iLocal, jLocal, buffer[i+j*n] );\n                        }\n                    }\n                }\n            }\n            Tensor<T> bT;\n            if (nrhs == 1) {\n                 x = Tensor<T>(n);\n                 bT = Tensor<T>(n);\n                 bT = copy(b);\n                 x = copy(b); //creating the correct size\n            }\n            else {\n                 x = Tensor<T>(n,nrhs);\n                 bT =  transpose(b);\n            }\n\n           for(int i=0; i< x.size(); ++i) {\n            T * buffer = x.ptr() ;\n            buffer[i] = 0.0;\n            }\n\n           //cout << \"Caught a tensor exception \\n\";\n           //cout << bT <<endl;\n            elem::DistMatrix<T> hd( n, nrhs, GG );\n            {\n                 const int colShift = hd.ColShift(); // 1st row local\n                 const int rowShift = hd.RowShift(); // 1st col local\n                 const int colStride =hd.ColStride();\n                 const int rowStride = hd.RowStride();\n                 const int localHeight = hd.LocalHeight();\n                 const int localWidth = hd.LocalWidth();\n                 {\n                     const T * buffer = bT.ptr();\n                     for( int jLocal=0; jLocal<localWidth; ++jLocal )\n                     {\n                         for( int iLocal=0; iLocal<localHeight; ++iLocal )\n                         {\n                               const int i = colShift + iLocal*colStride;\n                               const int j = rowShift + jLocal*rowStride;\n                               //hd.Set( iLocal, jLocal, buffer[i+j*(n)]);\n                               hd.SetLocal( iLocal, jLocal, buffer[i+j*(n)]);\n        \n                         }\n                     }\n                }\n           }\n            world.mpi.Barrier();\n    \n           elem::GaussianElimination(gd, hd);\n    \n            world.mpi.Barrier();\n           {\n                const int colShift = hd.ColShift(); // 1st row local\n                const int rowShift = hd.RowShift(); // 1st col local\n                const int colStride =hd.ColStride();\n                const int rowStride = hd.RowStride();\n                const int localHeight = hd.LocalHeight();\n                const int localWidth = hd.LocalWidth();\n      \n                T * buffer = x.ptr();\n                for( int jLocal=0; jLocal<localWidth; ++jLocal )\n                {\n                    for( int iLocal=0; iLocal<localHeight; ++iLocal )\n                    {\n                        const int i = colShift + iLocal*colStride;\n                        const int j = rowShift + jLocal*rowStride;\n                        //buffer[j+i*nrhs]= hd.Get( iLocal, jLocal);\n                        buffer[j+i*nrhs]= hd.GetLocal( iLocal, jLocal);\n                    }\n                }\n           }\n           world.gop.sum(x.ptr(), n*nrhs);\n            //world.gop.broadcast(x.ptr(),x.size(), 0);\n            //if(myrank ==0) cout<< x << endl;\n           \n       }\n       catch (TensorException S) {\n           std::cerr << S << std::endl;\n       }\n        world.gop.fence(); //<<<<<< Essential to quiesce MADNESS threads/comms\n    }\n}\n\n#else\n\n#include <madness/tensor/tensor_lapack.h>\n\nnamespace madness {\n    // sequential fall back code\n    template <typename T>\n    void sygvp(World& world,\n               const Tensor<T>& a, const Tensor<T>& B, int itype,\n               Tensor<T>& V, Tensor< typename Tensor<T>::scalar_type >& e) {\n        sygv(a, B, itype, V, e);\n\tworld.gop.broadcast_serializable(V,0);\n\tworld.gop.broadcast_serializable(e,0);\n    }\n    \n    // sequential fall back code\n    template <typename T>\n    void gesvp(World& world, const Tensor<T>& a, const Tensor<T>& b, Tensor<T>& x) {\n        gesv(a, b, x);\n    }\n    // START BRYAN ADDITIONS\n    // sequential fall back code\n    template <typename T>\n    void geevp(World& world, const Tensor<T>& A, Tensor<T>& VR, Tensor<std::complex<T>>& e) {\n      geev(A, VR, e);\n    }\n\n    // sequential fall back code\n    template <typename T>\n    void ggevp(World& world, const Tensor<T>& A, Tensor<T>& B, Tensor<T>& VR,\n               Tensor<std::complex<T>>& e) {\n      ggev(A, B, VR, e);\n    }\n    // END BRYAN ADDITIONS\n}\n\n#endif //MADNESS_HAS_ELEMENTAL_EMBEDDED\n\n#endif // MADNESS_TENSOR_ELEM_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/fred.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <iostream>\n#include <cmath>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/tensor_lapack.h>\n#include <madness/world/print.h>\n\nusing namespace madness;\nusing namespace std;\n\nvoid drot(long n, double* MADNESS_RESTRICT a, double* MADNESS_RESTRICT b, double s, double c) {\n    for (long i=0; i<n; ++i) {\n        double aa = a[i]*c + b[i]*s;\n        double bb = b[i]*c - a[i]*s;\n        a[i] = aa;\n        b[i] = bb;\n    }\n}\n\nint main() {\n    const double pi = 3.14; // No need for precision\n    const double thetamax = pi*0.2;\n\n    const long n = 400;\n    Tensor<double> d(n);\n    d.fillrandom();\n    ITERATOR(d, d(IND) -= 0.5);\n    Tensor<double> dorig = copy(d);\n\n    Tensor<double> U(n,n);\n    for (long i=0; i<n; ++i) U(i,i) = 1.0;\n\n    cout.precision(8);\n\n    const double thresh = 1e-9; // Final convergence test\n    double tol = 0.1;           // Current test\n    long ndone=0;               // Total no. of rotations performed\n\n    for (int iter=0; iter<300; ++iter) {\n        double sum=d.sum();  // Current sum\n        print(\"iter\", iter, sum);\n\n        // Screening not only reduces work (in same manner as it does\n        // for Jacobi diagonalization) it also dramatically increases\n        // the rate of convergence\n        tol *= 0.25;\n        if (tol < thresh) tol = thresh;\n\n        long ndone_iter=0; // No. of rotations done this iteration\n        double screen = tol*sum;\n        for (long i=0; i<n; ++i) {\n            for (long j=0; j<i; ++j) {\n\n                // construct rotation\n                // |inew>  =  cos theta |i>  +  sin theta |j>\n                // |jnew>  =  cos theta |j>  -  sin theta |i>\n                //\n                double numerator = d[j] - d[i];\n                double denominator = d[j] + d[i];\n                double theta;\n\n                if (fabs(denominator) < 1e-2*fabs(numerator)) {\n                    // Need a nearly pi/2 rotation in the direction of increase\n                    // Just take a step hopefully in the right direction.\n                    //print(\"     small\", i, j);\n                    theta = thetamax*0.7;\n                    if (numerator < 0.0) theta = -theta;\n                }\n                else {\n                    theta = atan(numerator/fabs(denominator));\n                }\n\n                if (fabs(theta) > screen) {\n                    if (fabs(theta) > thetamax) {\n                        //print(\"     restricting\", i, j, theta);\n                        if (theta > 0.0) theta = thetamax;\n                        else theta = -thetamax;\n                    }\n                    //print(\"    rotn\", i, j, theta);\n\n                    double c = cos(theta);\n                    double s = sin(theta);\n\n                    double dbefore = d.sum();\n                    double di = d[i]*c + d[j]*s;\n                    double dj = d[j]*c - d[i]*s;\n                    d[i] = di;\n                    d[j] = dj;\n                    double dafter = d.sum();\n                    if (dbefore-dafter > 1e-12*fabs(dbefore))\n                        print(\"BAD BAD\", i, j, dbefore, dafter);\n\n                    // Accumulate the transpose of U for efficient inner loop\n                    //                 for (long k=0; k<n; ++k) {\n                    //                     double uik = U(i,k)*c + U(j,k)*s;\n                    //                     double ujk = U(j,k)*c - U(i,k)*s;\n                    //                     U(i,k) = uik;\n                    //                     U(j,k) = ujk;\n                    //                 }\n\n                    ++ndone_iter;\n                    drot(n, &U(i,0), &U(j,0), s, c);\n                }\n            }\n        }\n        print(ndone_iter);\n        ndone += ndone_iter;\n        if (ndone_iter == 0 && tol==thresh) {\n            print(\"CONVERGED\");\n            break;\n        }\n    }\n\n    U = transpose(U);\n    double err = (inner(dorig,U)-d).normf();\n    print(\"Error \", err);\n    print(\"Ndone \", ndone);\n\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/tensor/genmtxm.py",
    "content": "def doit(transpose):\n    t = \"\"\n    if transpose: t = \"T\"\n    for i in range(2,28,2):\n        if i == 12:\n            print \"#ifdef X86_64\"\n\n        print \"MTXM_ENTRY(%smTxm%d)\" % (t,i)\n\n        jloop = \".%sJLOOP%d\" % (t,i)\n        print \"%s:\" % jloop\n\n        for j in range(0,i/2):\n            print \"ZERO(C%02.2d)\" % j\n\n        kloop = \".%sKLOOP%d\" % (t,i)\n        print \"%s:\" % kloop\n        print \"LOADBKJ\"\n\n        for j in range(0,i/2):\n            print \"ABC(%d,C%02.2d)\" % (j*16,j)\n\n        print (\"INCA\")\n\n        for j in range(0,i/2):\n            print \"ABC2(%d,C%02.2d)\" % (j*16,j)\n\n        print \"INCA\"\n        print \"sub     $2, NK\"\n        print \"jnz     %s\" % kloop\n\n        print \"mov     C, B\"\n        for j in range(0,i/2):\n            if transpose:\n                print \"STORET(C%02.2d)\" % j\n            else:\n                print \"STORE(C%02.2d)\" % j\n\n        if transpose:\n            print \"INCCT\"\n        else:\n            print \"INCC\"\n        print \"NEXTJ\"\n        print \"jnz     %s\" % jloop\n        print \"RETURN\"\n    print \"#endif\"\n\ndoit(0)\ndoit(1)\n"
  },
  {
    "path": "src/madness/tensor/gentensor.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#ifndef GENTENSOR_H_\n#define GENTENSOR_H_\n\n\n/*!\n *\n * \\file GenTensor.h\n * \\brief Provides a tensor with taking advantage of possibly low rank\n *\n ****************************************************************\n * MAIN DIFFERENCES (Tensor t; GenTensor g)\n *  t=t1(s) is shallow\n *  g=g1(s) is deep\n ****************************************************************\n *\n * a GenTensor is a generalized form of a Tensor\n * for now only little functionality shall be implemented; feel free to extend\n * a consequence is that we (usually) can't directly access individual\n * matrix elements\n * note that a GenTensor might have zero rank, but is still a valid\n * tensor, and should therefore return a FullTensor with zeros in it.\n *\n * \\par Slicing in GenTensors:\n *\n * A GenTensor differs from a Tensor in that we can't directly access\n * individual matrix elements, and thus can't directly assign or manipulate slices\n * as lvalues. For rvalues we simply provide a slices of the constituent vectors\n * in SRConf, which is a valid GenTensor by itself\n * \\code\n *  lhs = rhs(s)\n * \\endcode\n *\n * Manipulations of slices of a GenTensor are heavily restricted, but should\n * cover the most important cases:\n * - assignment to zero; done by inplace subtraction of the slice\n *    \\code\n *    GenTensor lrt1(t);\n *    lrt1(s) = 0.0;\n *    \\endcode\n * - in-place addition\n *    \\code\n *    GenTensor lrt1(3,3,3,3), lrt2(t);\n *    lrt1(s) += lrt2;\n *    \\endcode\n *\n * Note that *all* of these operation increase the rank of lhs\n *\n * \\par Addition in GenTensors\n *\n * Addition in a GenTensor is a fairly complicated issue, and there are several\n * algorithms you can use, each with certain pros and cons\n *\n * - append()\n *   plain concatenating of the configurations will increase the rank and will\n *   introduce linear dependencies and redundancies. Also, you might have to\n *   reallocate memory and copy a lot of data around. However, no accuracy is lost\n *   and it is fairly fast. Final rank reduction might be expensive, since you\n *   might have accumulated a huge amount of terms.\n *\n * - low_rank_add_sequential()\n *   only for SVD (2-way decomposition)\n *   take the 2nd vector as a basis of a vector space, project the overlap of the\n *   old and new terms on the lhs basis, perform modified Gram-Schmidt\n *   orthogonalization on the rhs basis and increase the basis if necessary.\n *   This will require the left hand side to be right-orthonormal, and the caller is\n *   responsible for doing that. If a new GenTensor is created and only additions\n *   using this method are performed the tensor will automatically be orthonormal.\n *   Cost depends on the number of terms of the rhs and the lhs\n *\n * - addition of slices\n *   as of now we can add slices only using append()\n *\n * - addition in full rank form\n *   at times it might be sensible to accumulate your result in a full rank tensor,\n *   and after collecting all the contribution you can transform it into a low\n *   rank tensor. This will also maintain \"all\" digits, and cost depends not on\n *   the number of terms on the lhs.\n */\n\n#include <madness/tensor/tensor.h>\n\n\nnamespace madness {\n\n\n/// low rank representations of tensors (see gentensor.h)\nenum TensorType {TT_FULL, TT_2D, TT_TENSORTRAIN};\n\nstatic\ninline\nstd::ostream& operator << (std::ostream& s, const TensorType& tt) {\n\tstd::string str=\"confused tensor type\";\n\tif (tt==TT_FULL) str=\"full rank tensor\";\n\tif (tt==TT_2D) str=\"low rank tensor 2-way\";\n\tif (tt==TT_TENSORTRAIN) str=\"tensor train\";\n//\tif (tt==TT_DYNAMIC) str=\"dynamic\";\n\ts << str.c_str();\n\treturn s;\n}\n\t/// TensorArgs holds the arguments for creating a LowRankTensor\n\tstruct TensorArgs {\n\t\tdouble thresh;\n\t\tTensorType tt;\n\tTensorArgs() : thresh(-1.0), tt(TT_FULL) {}\n\t\tTensorArgs(const double& thresh1, const TensorType& tt1)\n\t\t\t: thresh(thresh1)\n\t\t\t, tt(tt1) {\n\t\t}\n\tTensorArgs(const TensorType& tt1, const double& thresh1)\n\t: thresh(thresh1)\n\t, tt(tt1) {\n\t}\n\n\t\tstatic std::string what_am_i(const TensorType& tt) {\n\t\t\tif (tt==TT_2D) return \"TT_2D\";\n\t\t\tif (tt==TT_FULL) return \"TT_FULL\";\n            if (tt==TT_TENSORTRAIN) return \"TT_TENSORTRAIN\";\n\t\t\treturn \"unknown tensor type\";\n\t\t}\n\t\ttemplate <typename Archive>\n\t\tvoid serialize(const Archive& ar) {\n\t\t    int i=int(tt);\n\t\t    ar & thresh & i;\n\t\t    tt=TensorType(i);\n\t\t}\n\t};\n}\n\n// you can use low-rank tensors only when you use gentensor\n#if HAVE_GENTENSOR\n#include <madness/tensor/lowranktensor.h>\n\n#else\n\n#include <madness/tensor/SVDTensor.h>\n#include <madness/tensor/tensortrain.h>\n\nnamespace madness {\n\n\ttemplate<typename T> class SRConf;\n\n\ttemplate <typename T>\n\tclass GenTensor : public Tensor<T> {\n\n\tpublic:\n\n\t\tGenTensor() : Tensor<T>() {}\n\n\t\tGenTensor(const Tensor<T>& t1) : Tensor<T>(t1) {}\n\t\tGenTensor(const Tensor<T>& t1, const TensorArgs& targs) : Tensor<T>(t1) {}\n\t\tGenTensor(const Tensor<T>& t1, double eps, const TensorType tt) : Tensor<T>(t1) {}\n\t\tGenTensor(const TensorType tt): Tensor<T>() {}\n\t\tGenTensor(std::vector<long> v, const TensorType& tt) : Tensor<T>(v) {}\n\t\tGenTensor(std::vector<long> v, const TensorArgs& targs) : Tensor<T>(v) {}\n\t\tGenTensor(const SRConf<T>& sr1) : Tensor<T>() {MADNESS_EXCEPTION(\"no ctor with SRConf: use HAVE_GENTENSOR\",1);}\n\t\tGenTensor(long nd, const long d[], const TensorType& tt) : Tensor<T>(nd,d){};\n\n        /// Type conversion makes a deep copy\n        template <class Q> operator GenTensor<Q>() const { // type conv => deep copy\n            Tensor<Q> result = Tensor<Q>(this->_ndim,this->_dim,false);\n            BINARY_OPTIMIZED_ITERATOR(Q, result, const T, (*this), *_p0 = (Q)(*_p1));\n            return result;\n        }\n\n        GenTensor convert(const TensorArgs& targs) const {return copy(*this);}\n        Tensor<T> reconstruct_tensor() const {return *this;}\n        const Tensor<T>& full_tensor() const {return *this;}\n        Tensor<T>& full_tensor() {return *this;}\n\n        const Tensor<T>& get_tensor() const {return *this;}\n        Tensor<T>& get_tensor() {return *this;}\n\n\t\tTensor<T> full_tensor_copy() const {return copy(*this);}\n\t\tTensor<T> full_tensor_copy() {return copy(*this);}\n\n        bool is_assigned() const {return this->size()>0;};\n        bool has_data() const {return this->size()>0;};\n        bool has_no_data() const {return not has_data();};\n\t\tlong rank() const {return -1;}\n\t\tdouble svd_normf() const {return this->normf();}\n\t\tsize_t real_size() const {return this->size();}\n\t\tsize_t nCoeff() const {return this->size();}\n\n        void reduce_rank(const double& eps) {return;};\n        void normalize() {return;}\n\n        std::string what_am_i() const {return \"GenTensor, aliased to Tensor\";};\n\t\tTensorType tensor_type() const {return TT_FULL;}\n        constexpr bool is_svd_tensor() const {return false;}\n        constexpr bool is_tensortrain() const {return false;}\n        constexpr bool is_full_tensor() const {return true;}\n        bool is_of_tensortype(const TensorType& tt) const {return (tt==TT_FULL);}\n\n\n        SVDTensor<T>& get_svdtensor() {MADNESS_EXCEPTION(\"no SVDTensor in aliased GenTensor\",1);}\n        SVDTensor<T>& get_tensortrain() {MADNESS_EXCEPTION(\"no SVDTensor in aliased GenTensor\",1);}\n        const SVDTensor<T>& get_svdtensor() const {MADNESS_EXCEPTION(\"no SVDTensor in aliased GenTensor\",1);}\n        const SVDTensor<T>& get_tensortrain() const {MADNESS_EXCEPTION(\"no SVDTensor in aliased GenTensor\",1);}\n\n\n\n\t\tvoid add_SVD(const GenTensor<T>& rhs, const double& eps) {*this+=rhs;}\n\n\t\tSRConf<T> config() const {MADNESS_EXCEPTION(\"no SRConf in complex GenTensor\",1);}\n        SRConf<T> get_configs(const int& start, const int& end) const {MADNESS_EXCEPTION(\"no SRConf in complex GenTensor\",1);}\n\n\t\t/// return the additional safety for rank reduction\n\t\tstatic double fac_reduce() {return -1.0;};\n\n\t};\n\n    template <class T>\n\tGenTensor<T> reduce(std::list<GenTensor<T> >& addends, double eps, bool are_optimal=false) {\n    \ttypedef typename std::list<GenTensor<T> >::iterator iterT;\n    \tGenTensor<T> result=copy(addends.front());\n    \tfor (iterT it=++addends.begin(); it!=addends.end(); ++it) {\n    \t\tresult+=*it;\n    \t}\n\t    return result;\n    }\n\n    /// Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...)\n\n    /// \\ingroup tensor\n    template <class T>\n    GenTensor<T> outer(const GenTensor<T>& left, const GenTensor<T>& right,\n            const TensorArgs final_tensor_args) {\n        return madness::outer(static_cast<Tensor<T> >(left),static_cast<Tensor<T> >(right));\n    }\n\n    /// Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...)\n\n     /// \\ingroup tensor\n     template <class T>\n     GenTensor<T> outer(const Tensor<T>& left, const Tensor<T>& right,\n             const TensorArgs final_tensor_args) {\n         return madness::outer(left,right);\n     }\n\n     template <typename R, typename Q>\n     GenTensor<TENSOR_RESULT_TYPE(R,Q)> general_transform(\n             const GenTensor<R>& t, const Tensor<Q> c[]) {\n    \t const Tensor<R>& tensor=static_cast<const Tensor<R>& >(t);\n         return GenTensor<TENSOR_RESULT_TYPE(R,Q)>(general_transform(tensor,c));\n     }\n\n\n\n     /// change representation to targ.tt\n     template<typename T>\n     void change_tensor_type(GenTensor<T>& t, const TensorArgs& targs) {\n     \tMADNESS_ASSERT(targs.tt==TT_FULL);\n     }\n\n\tnamespace archive {\n\t/// Serialize a tensor\n\ttemplate <class Archive, typename T>\n\tstruct ArchiveStoreImpl< Archive, GenTensor<T> > {\n\t\tstatic void store(const Archive& s, const GenTensor<T>& t) {\n\t\t\tif (t.iscontiguous()) {\n\t\t\t\ts & t.size() & t.id();\n\t\t\t\tif (t.size()) s & t.ndim() & wrap(t.dims(),TENSOR_MAXDIM) & wrap(t.ptr(),t.size());\n\t\t\t}\n\t\t\telse {\n\t\t\t\ts & copy(t);\n\t\t\t}\n\t\t};\n\t};\n\n\n\t/// Deserialize a tensor ... existing tensor is replaced\n\ttemplate <class Archive, typename T>\n\tstruct ArchiveLoadImpl< Archive, GenTensor<T> > {\n\t\tstatic void load(const Archive& s, GenTensor<T>& t) {\n\t\t\tlong sz = 0l, id =0l;\n\t\t\ts & sz & id;\n\t\t\tif (id != t.id()) throw \"type mismatch deserializing a tensor\";\n\t\t\tif (sz) {\n\t\t\t\tlong _ndim=0l, _dim[TENSOR_MAXDIM];\n\t\t\t\ts & _ndim & wrap(_dim,TENSOR_MAXDIM);\n\t\t\t\tt = Tensor<T>(_ndim, _dim, false);\n\t\t\t\tif (sz != t.size()) throw \"size mismatch deserializing a tensor\";\n\t\t\t\ts & wrap(t.ptr(), t.size());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tt = Tensor<T>();\n\t\t\t}\n\t\t};\n\t};\n\n\t}\n\n}   // namespace madness\n\n#endif /* HAVE_GENTENSOR */\n#endif /* GENTENSOR_H_ */\n"
  },
  {
    "path": "src/madness/tensor/gfit.cc",
    "content": "#include <madness/tensor/tensor_lapack.h>\n#include <madness/tensor/solvers.h>\n#include <madness/world/print.h>\n#include <cmath>\n#include <iostream>\n#include <algorithm>\n\nusing namespace madness;\nusing namespace std;\n\ndouble myexp(double x) {\n    if (x>0.0) return 1.0;\n    else return exp(x);\n}\n\nTensor<double> optimize_coeffs(const Tensor<double>& f,\n                               const Tensor<double>& x,\n                               const Tensor<double>& w,\n                               const Tensor<double>& expnt,\n                               const double mu,\n                               const double p,\n                               const bool prnt=0) {\n    const long nx = x.size();\n    const long ng = expnt.size();\n\n    Tensor<double> A(nx+ng,ng), b(nx+ng);\n    for (int i=0; i<nx; i++) {\n        const double sqrtw = sqrt(w[i]);\n        for (int j=0; j<ng; j++) {\n            A(i,j) = myexp(-expnt(j)*x(i)*x(i)) * sqrtw;\n        }\n        b[i] = f[i] * sqrtw;\n    }\n\n    const double smu = sqrt(mu);\n    for (int j=0; j<ng; j++) {\n        double e = expnt(j);\n        if (e<0.0) e = 1e-2;\n        A(j+nx,j) = smu * pow(e, p*0.5);\n    }\n\n    const double rcond = 1e-14;\n    Tensor<double> c, s, sumsq;\n    long rank;\n    gelss(A, b, rcond, c, s, rank, sumsq);\n\n    ////print(\"A\\n\",A);\n\n    // print(\" solution \", c);\n    // print(\"        s \", s);\n    // print(\"     rank \", rank, A.dim(0), A.dim(1));\n    // print(\"    sumsq \", sumsq);\n\n    return c;\n}\n\ndouble reciprocal(double x) {return 1.0/x;}\n\ndouble square(double x) {return x*x;}\n\nTensor<double> geometric_series(long n, double a, double r) {\n    Tensor<double> q(n);\n    for (int i=0; i<n; i++, a*=r) q[i] = a;\n    return q;\n}\n\nTensor<double> arithmetic_series(long n, double a, double h) {\n    Tensor<double> q(n);\n    for (int i=0; i<n; i++, a+=h) q[i] = a;\n    return q;\n}\n\nTensor<double> map_tensor(double (*f)(double), const Tensor<double>& x) {\n    Tensor<double> y = copy(x);\n    y.unaryop(f);\n    return y;\n}\n\ndouble fit(double x, const Tensor<double>& c, const Tensor<double>& expnt) {\n    const int n = expnt.size();\n    double sum = 0.0;\n    for (int i=0; i<n; i++) sum += c[i] * myexp(-expnt[i]*x*x);\n    return sum;\n}\n\ndouble errsq(const Tensor<double> f, \n             const Tensor<double> x, \n             const Tensor<double> w,\n             const Tensor<double> c, \n             const Tensor<double> expnt,\n             const double mu,\n             const double p) {\n    const int n = x.size();\n    double sum = 0.0;\n    for (int i=0; i<n; i++) {\n        double err = f[i] - fit(x[i], c, expnt);\n        sum += w[i]*err*err;\n    }\n\n    for (int j=0; j<expnt.size(); j++) sum += mu*c[j]*c[j]*pow(expnt[j],p);\n\n    return sum;\n}\n\nclass Fred : public OptimizationTargetInterface {\n    const Tensor<double> f, x, w;\n    const double mu;\n    const double p;\n    const double alpha;\n    const long nx;\n\n    /// Makes the matrix of Gaussians g(i,j) = myexp(-expnt[j]*x[i]x[i])\n    Tensor<double> make_g(const Tensor<double>& expnt) {\n        const long ng = expnt.size();\n        Tensor<double> g(nx,ng);\n        for (int i=0; i<nx; i++) {\n            for (int j=0; j<ng; j++) {\n                g(i,j) = myexp(-expnt[j]*x[i]*x[i]);\n            }\n        }\n        return g;\n    }\n\n    double penalty(double expnt) const {\n        if (expnt < 0) return alpha*expnt*expnt;\n        else return 0.0;\n    }\n\n    double dpenalty(double expnt) const {\n        if (expnt < 0) return 2.0*alpha*expnt;\n        else return 0.0;\n    }\n\npublic:\n\n    Fred(const Tensor<double> f, \n         const Tensor<double> x, \n         const Tensor<double> w,\n         const double mu,\n         const double p)\n        : f(f), x(x), w(w), mu(mu), p(p), alpha(1e12), nx(x.size())\n    {}\n\n    bool provides_gradient() const {return true;}\n\n    void value_and_gradient(const Tensor<double>& expnt,\n                            double& value,\n                            Tensor<double>& gradient) \n    {\n        const long ng = expnt.size();\n        Tensor<double> c = optimize_coeffs(f, x, w, expnt, mu, p);\n\n        Tensor<double> g = make_g(expnt);\n\n        gradient = Tensor<double>(ng);\n\n        double errsq = 0.0;\n        for (int i=0; i<nx; i++) {\n            double v = 0.0;\n            for (int j=0; j<ng; j++) {\n                v += g(i,j)*c[j];\n            }\n            double eps = f[i] - v;\n            errsq += w[i]*eps*eps;\n\n            eps *= 2.0* w[i] * x[i]*x[i];\n            for (int j=0; j<ng; j++) {\n                gradient[j] += eps * c[j] * g(i,j);\n            }\n        }\n\n        for (int j=0; j<ng; j++) {\n            double e = expnt(j);\n            if (e<0.0) e = 1e-2;\n\n            errsq += mu*c[j]*c[j]*pow(e,p) + penalty(expnt[j]);\n            gradient[j] += p*mu*c[j]*c[j]*pow(e,p-1.0) + dpenalty(expnt[j]);\n        }\n\n        value = errsq;\n    }\n\n    double value(const Tensor<double>& expnt) {\n        Tensor<double> gradient;\n        double errsq;\n\n        value_and_gradient(expnt, errsq, gradient);\n        return errsq;\n    }\n\n    Tensor<double> gradient(const Tensor<double>& expnt) {\n        double errsq;\n        Tensor<double> g;\n        value_and_gradient(expnt, errsq, g);\n        return g;\n    }\n};\n\nconst double m = 1;\nconst double c = 137.0359895;\nconst double mc2 = m*c*c;\n\ndouble E0(double p) {\n    return sqrt(p*p*c*c + mc2*mc2);\n}\n\ndouble Akernel(double p) {\n    const double e0 = E0(p);\n    const double rsqrt2 = 1.0/sqrt(2.0);\n    return sqrt((e0+mc2)/(2.0*e0)) - rsqrt2;\n}\n\nint main() {\n    // This for fitting 1/x over large dynamic range [xlo,xhi]\n    // const long ng = 32;\n    // const double mu = 1e-14; // penalty term is sum(i) mu * c[i]^2 * expnt[i]^p ... 1e-12 OK\n    // const double p = -0.5;\n    // const double xlo = 1e-6;\n    // const double xhi = 1e0;\n    // const long nx = max(10*long(log10(xhi/xlo)), 10*ng);\n    // const double r = pow(xhi/xlo,1.0/(nx-1));\n    // Tensor<double> x = geometric_series(nx,xlo,r);\n    // Tensor<double> f = map_tensor(reciprocal, x);\n    // Tensor<double> w = map_tensor(square, x);   \n    // const double ahi = -log(0.1)/(xlo*xlo); // 0.1 = myexp(-ahi*xlo^2)\n    // const double alo = -log(0.9)/(xhi*xhi); // 0.9 = myexp(-alo*xhi^2)\n    // const double ra = pow(ahi/alo,1.0/(ng-1));\n    // Tensor<double> expnt = geometric_series(ng,alo,ra);\n\n    // This for fitting A(p) over [0,10c]\n    const long ng = 50;\n    const double mu = 1e-12;\n    const double p = 0.0; // was 0\n\n    const long nx = 2000;\n\n    //const double xlo = 0.0;\n    //const double xhi = 10000.0*c;\n    //const double h = (xhi-xlo)/(nx-1);\n    //Tensor<double> x = arithmetic_series(nx,xlo,h);\n\n    const double xlo = 1e-6;\n    const double xhi = 10000.0*c;\n    const double h = pow(xhi/xlo,1.0/(nx-1));\n    Tensor<double> x = geometric_series(nx,xlo,h);\n    Tensor<double> f = map_tensor(Akernel, x);\n\n    //Tensor<double> w(nx);\n    //w.fill(1.0);\n\n    Tensor<double> w = map_tensor(sqrt,x);\n    w = map_tensor(reciprocal,w);\n\n    const double ahi = 1e-3; //1.0/(mc2); // was mc2**2\n    const double alo = log(2.0)/xhi/xhi; //1e-8; //1e-4*ahi;\n    const double ra = pow(ahi/alo,1.0/(ng-1));\n    Tensor<double> expnt = geometric_series(ng,alo,ra);\n\n    print(\" x \", x);\n    print(\" w \", w);\n    print(\" f \", f);\n    print(\" expnt \", expnt);\n\n    Tensor<double> c = optimize_coeffs(f, x, w, expnt, mu, p);\n    print(\" solution \", c);\n\n    double epssq = errsq(f, x, w, c, expnt, mu, p);\n    print(\" errsq\", epssq,\"\\n\\n\");\n\n    for (int i=0; i<nx; i++) {\n        print(x[i], f[i], fit(x[i],c,expnt), f[i] - fit(x[i],c,expnt), (f[i] - fit(x[i],c,expnt))/f[i]);\n    }\n\n    shared_ptr<Fred> fptr(new Fred(f, x, w, mu, p)); \n    print(\"fred \", fptr->value(expnt));\n    fptr->test_gradient(expnt, 1e-12*epssq, true);\n    //return 0;\n\n    // SteepestDescent sopt(fptr, 1e-12, 1e-20, 1e-20); \n    // sopt.optimize(expnt);\n    // sopt.optimize(expnt);\n    // sopt.optimize(expnt);\n    // sopt.optimize(expnt);\n    // sopt.optimize(expnt);\n\n    QuasiNewton opt(fptr, 20*ng, 1e-15, 1e-24, 1e-24); opt.set_update(\"BFGS\");\n    \n    for (int iter=0; iter<4; iter++) {\n        if (opt.optimize(expnt)) break; \n        opt.reset_hessian();\n        sort(expnt.ptr(),expnt.ptr()+expnt.size());\n        print(\"\\n optimized exponents \", expnt);\n        c = optimize_coeffs(f, x, w, expnt, mu, p);\n        print(\"        coefficients \", c);\n    }\n\n    print(\"COEFF WEIGHTS\");\n    printf(\"   \");\n    for (double pp=-2; pp<3.01; pp += 0.5) printf(\"%.1e \",pp);\n    printf(\"\\n\");\n    for (int i=0; i<c.size(); i++) {\n        printf(\"%2d \", i);\n        for (double pp=-2; pp<3.01; pp += 0.5) {\n            printf(\"%.1e \", c[i]*c[i]*pow(expnt[i],pp));\n        }\n        printf(\"\\n\");\n    }\n    \n    double maxerr = 0.0;\n    for (int i=0; i<nx; i++) {\n        double err = f[i] - fit(x[i],c,expnt);\n        print(x[i], f[i], fit(x[i],c,expnt), err , err/f[i]);\n        maxerr = max(abs(err),maxerr);\n    }\n    print(\"maxerr\", maxerr);\n\n    return 0;\n}\n\n\n    \n    \n"
  },
  {
    "path": "src/madness/tensor/gmres.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n#ifndef MADNESS_LINALG_GMRES_H__INCLUDED\n#define MADNESS_LINALG_GMRES_H__INCLUDED\n\n#include <madness/tensor/tensor.h>\n#include <madness/world/print.h>\n#include <iostream>\n#include <madness/tensor/tensor_lapack.h>\n\n/** \\file gmres.h\n    \\brief Defines a general operator interface and a templated GMRES solver\n    for solving linear equations.\n\n    \\ingroup solvers\n\n    An AbstractVectorSpace class is also defined to guarantee a uniform way\n    for linear algebra routines to access common operations like norm, inner\n    product etc.  Implementations for MADNESS Vectors and Functions are\n    provided in the VectorSpace<floating_point, NDIM> and\n    FunctionSpace<floating_point, NDIM> classes. */\n\nnamespace madness {\n\n    /** \\brief A generic operator: takes in one \\c T and produces another \\c T.\n\n        Override the protected action() function to implement an Operator.\n    */\n    template <typename T>\n    class Operator {\n        protected:\n            /** \\brief The action of the operator\n\n                \\param[in] in The input vector\n                \\param[out] out The action of the operator on the input vector\n            */\n            virtual void action(const T &in, T &out) const = 0;\n\n        public:\n            /** \\brief Public access to the operator's action, returns out for\n                convenience.\n\n                \\param[in] in The input vector\n                \\param[out] out The action of the operator on the input vector\n            */\n            T & applyOp(const T &in, T &out) const {\n                action(in, out);\n                return out;\n            }\n\n\t         virtual ~Operator() {}\n    };\n\n    /** \\brief A generic vector space which provides common operations needed\n               by linear algebra routines (norm, inner product, etc.)\n\n        Most of these routines will presumedly be defined, but the names may\n        not be the same (i.e. madness:Function uses norm2, madness::Tensor\n        uses normf)\n\n        - \\c T is the vector type\n        - \\c real_type the real type used for norms, etc.\n        - \\c scalar_type is the type used for inner products and gaxpy\n          coefficients, etc.\n\n        When implementing a child class, real_type and scalar_type will\n        probably be obtained from TensorTypeData<T> (see the VectorSpace\n        and FunctionSpace classes below). */\n    template <typename T, typename real_type, typename scalar_type>\n    class AbstractVectorSpace {\n        private:\n            /** \\brief Bury the default constructor to prevent its use. */\n            AbstractVectorSpace();\n\n        public:\n            /// \\brief The world\n            World &world;\n\n            /** \\brief Make a vector space.\n\n                The World is needed to limit output, and may be needed\n                for spaces working with MADNESS functions.\n\n                \\param[in] world The world.\n            */\n            AbstractVectorSpace(World &world) : world(world) {}\n\n            virtual ~AbstractVectorSpace() {}\n\n            /// \\brief The norm of a vector\n            virtual real_type norm(const T &) const = 0;\n\n            /** \\brief Scales the vector (in-place) by a constant\n                       \\f[ \\vec{x} \\leftarrow c \\vec{x} \\f]\n\n                \\return The scaled vector */\n            virtual T & scale(T &, const scalar_type &) const = 0;\n\n            /** \\brief Standard bilinear gaxpy\n                       \\f[ \\vec{x} \\leftarrow a \\vec{x} + b \\vec{y} \\f]\n\n                \\return The new vector, \\f$\\vec{x}\\f$ */\n            virtual T & gaxpy(T &x, const scalar_type &a, const T &y,\n                const scalar_type &b) const = 0;\n\n            /// \\brief The inner product between two vectors\n            virtual scalar_type inner(const T &, const T &) const = 0;\n\n            /** \\brief Any special instructions to be executed when a vector\n                       is no longer needed.\n\n                Unless otherwise specified, do nothing. */\n            virtual void destroy(T &) const {}\n    };\n\n    // Real part of a real number\n    // This is necessary to make templating nightmares disappear in\n    // VectorSpace::norm\n    static inline double real(double x) { return x; }\n\n    // Imaginary part of a real number\n    // This is necessary to make templating nightmares disappear in\n    // VectorSpace::norm\n    static inline double imag(double x) { return 0.0; }\n\n    /// \\brief A vector space using MADNESS Vectors\n    template <typename T, int NDIM>\n    class VectorSpace : public AbstractVectorSpace<Vector<T, NDIM>,\n        typename TensorTypeData<T>::float_scalar_type, T> {\n\n        protected:\n            static const bool iscplx = TensorTypeData<T>::iscomplex;\n\n        public:\n            typedef typename TensorTypeData<T>::float_scalar_type real_type;\n            typedef T scalar_type;\n\n            VectorSpace(World &world) : AbstractVectorSpace<\n                Vector<T, NDIM>, real_type, scalar_type>(world) {}\n\n            virtual ~VectorSpace() {}\n\n            virtual real_type norm(const Vector<scalar_type, NDIM> &vec)\n                const {\n\n                real_type ret, mag;\n                int i;\n\n                mag = real(vec[0]);\n                ret = mag*mag;\n                if(iscplx) {\n                    mag = imag(vec[0]);\n                    ret += mag*mag;\n                }\n\n                for(i = 1; i < NDIM; ++i) {\n                    mag = real(vec[i]);\n                    ret += mag*mag;\n                    if(iscplx) {\n                        mag = imag(vec[i]);\n                        ret += mag*mag;\n                    }\n                }\n\n                return sqrt(ret);\n            }\n\n            virtual Vector<scalar_type, NDIM> & scale(\n                Vector<scalar_type, NDIM> &vec, const scalar_type &c) const {\n\n                vec *= c;\n                return vec;\n            }\n\n            virtual Vector<scalar_type, NDIM> & gaxpy(\n                Vector<scalar_type, NDIM> &x, const scalar_type &a,\n                const Vector<scalar_type, NDIM> &y, const scalar_type &b)\n                const {\n\n                for(int i = 0; i < NDIM; ++i)\n                    x[i] = a * x[i] + b * y[i];\n                return x;\n            }\n\n            virtual scalar_type inner(const Vector<scalar_type, NDIM> &l,\n                const Vector<scalar_type, NDIM> &r) const {\n\n                scalar_type ret;\n\n                if(iscplx) {\n                    ret = conj(l[0]) * r[0];\n                    for(int i = 1; i < NDIM; ++i)\n                        ret += conj(l[i]) * r[i];\n                }\n                else {\n                    ret  = l[0] * r[0];\n                    for(int i = 1; i < NDIM; ++i)\n                        ret += l[i] * r[i];\n                }\n\n                return ret;\n            }\n    };\n\n    /// \\brief A vector space using MADNESS Functions\n    template <typename T, int NDIM>\n    class FunctionSpace : public AbstractVectorSpace<Function<T, NDIM>,\n        typename TensorTypeData<T>::float_scalar_type, T> {\n\n        public:\n            typedef typename TensorTypeData<T>::float_scalar_type real_type;\n            typedef T scalar_type;\n\n            FunctionSpace(World &world) : AbstractVectorSpace<\n                Function<T, NDIM>, real_type, scalar_type>(world) {}\n\n            virtual ~FunctionSpace() {}\n\n            virtual real_type norm(const Function<scalar_type, NDIM> &vec)\n                const {\n\n                return vec.norm2();\n            }\n\n            virtual Function<scalar_type, NDIM> & scale(\n                Function<scalar_type, NDIM> &vec, const scalar_type &c) const {\n\n                vec.scale(c);\n                return vec;\n            }\n\n            virtual Function<scalar_type, NDIM> & gaxpy(\n                Function<scalar_type, NDIM> &x, const scalar_type &a,\n                const Function<scalar_type, NDIM> &y, const scalar_type &b)\n                const {\n\n                x.gaxpy(a, y, b);\n                return x;\n            }\n\n            virtual scalar_type inner(const Function<scalar_type, NDIM> &l,\n                const Function<scalar_type, NDIM> &r) const {\n\n                return l.inner(r);\n            }\n\n            virtual void destroy(Function<scalar_type, NDIM> &f) const {\n                f.clear();\n            }\n    };\n\n    /// \\brief A vector space using MADNESS Vectors of MADNESS Functions\n    template <typename T, int VDIM, int FDIM>\n    class VectorOfFunctionsSpace : public AbstractVectorSpace<\n        Vector<Function<T, FDIM>, VDIM>,\n        typename TensorTypeData<T>::float_scalar_type, T> {\n\n        public:\n            typedef typename TensorTypeData<T>::float_scalar_type real_type;\n            typedef T scalar_type;\n\n            VectorOfFunctionsSpace(World &world) : AbstractVectorSpace\n                <Vector<Function<T, FDIM>, VDIM>, real_type, scalar_type>\n                (world) {}\n\n            virtual ~VectorOfFunctionsSpace() {}\n\n            virtual real_type norm(\n                    const Vector<Function<scalar_type, FDIM>, VDIM> &vec)\n                const {\n\n                real_type temp, ret = vec[0].norm2();\n                ret *= ret;\n                for(int i = 1; i < VDIM; ++i) {\n                    temp = vec[i].norm2();\n                    ret += temp*temp;\n                }\n                return sqrt(ret);\n            }\n\n            virtual Vector<Function<scalar_type, FDIM>, VDIM> & scale(\n                    Vector<Function<scalar_type, FDIM>, VDIM> &vec,\n                    const scalar_type &c) const {\n\n                for(int i = 0; i < VDIM; ++i)\n                    vec[i].scale(c);\n                return vec;\n            }\n\n            virtual Vector<Function<scalar_type, FDIM>, VDIM> & gaxpy(\n                    Vector<Function<scalar_type, FDIM>, VDIM> &x,\n                    const scalar_type &a,\n                    const Vector<Function<scalar_type, FDIM>, VDIM> &y,\n                    const scalar_type &b) const {\n\n                for(int i = 0; i < VDIM; ++i)\n                    x[i].gaxpy(a, y[i], b);\n                return x;\n            }\n\n            virtual scalar_type inner(\n                    const Vector<Function<scalar_type, FDIM>, VDIM> &l,\n                    const Vector<Function<scalar_type, FDIM>, VDIM> &r) const {\n\n                scalar_type ret = l[0].inner(r[0]);\n                for(int i = 0; i < VDIM; ++i)\n                    ret += l[i].inner(r[i]);\n                return ret;\n            }\n\n            virtual void destroy(Vector<Function<scalar_type, FDIM>, VDIM> &f)\n                    const {\n                for(int i = 0; i < VDIM; ++i)\n                    f[i].clear();\n            }\n    };\n\n    /** \\brief  A GMRES solver routine for linear systems,\n                \\f$ \\mathbf{A} \\vec{x} = \\vec{b} \\f$.\n\n        Requires the vector space, the operator, A, the inhomogeneity b, an\n        initial guess x, the maximum number of iterations, the convergence\n        threshold for the solution residual, the convergence threshold for\n        the norm of the update vector, and a flag for producing output.\n\n        The vector space object provides a standard way to compute the needed\n        linear algebra operations (norm, inner product, etc.).\n\n        The printed output, if desired, shows iteration number, the residual,\n        the norm of the change in solution vectors from one iteration to the\n        next, and the effective rank of the GMRES matrix at that iteration.\n\n        On output, x has the computed solution, resid_thresh has its residual,\n        update_thresh has the latest updatenorm, and maxiters has the number\n        of iterations needed.\n\n        \\param[in] space The AbstractVectorSpace interface for the type\n        \\param[in] op The Operator \\f$\\mathbf{A}\\f$\n        \\param[in] b The right-hand-side vector \\f$\\vec{b}\\f$\n        \\param[in,out] x Input: The initial guess for \\f$\\vec{x}\\f$.  Output:\n                         The computed solution for \\f$\\vec{x}\\f$.\n        \\param[in,out] maxiters Input: Maximum number of iterations to perform.\n                         Output: Actual iterations performed.\n        \\param[in,out] resid_thresh Input: Convergence threshold for the\n                         residual \\f$||\\mathbf{A} \\vec{x} - \\vec{b}||\\f$.\n                         Output: The residual after the final iteration.\n        \\param[in,out] update_thresh Input: Convergence threshold for the\n                         update vector \\f$|| \\vec{x}_{iter} -\n                         \\vec{x}_{iter-1}||\\f$.  Output: The value after the\n                         final iteration.\n        \\param[in] outp True if output to stdout is desired, false otherwise,\n                        defaults to false if unspecified.\n    */\n    template <typename T, typename real_type, typename scalar_type>\n    void GMRES(const AbstractVectorSpace<T, real_type, scalar_type> &space,\n        const Operator<T> &op, const T &b, T &x, int &maxiters,\n        real_type &resid_thresh, real_type &update_thresh,\n        const bool outp = false) {\n\n        int iter, i;\n        long rank;\n        std::vector<T> V;\n        T r;\n        Tensor<scalar_type> H(maxiters+1, maxiters);\n        Tensor<scalar_type> betae(maxiters+1);\n        Tensor<scalar_type> y, yold;\n        Tensor<real_type> s;\n        Tensor<real_type> sumsq;\n        real_type resid, norm, updatenorm;\n        World &world = space.world;\n\n        // initialize\n        H = 0.0;\n        betae = 0.0;\n\n        // construct the first subspace basis vector\n        iter = 0;\n        op.applyOp(x, r);\n        space.gaxpy(r, -1.0, b, 1.0);\n        betae[0] = resid = space.norm(r);\n        if(outp && world.rank() == 0)\n            printf(\"itr rnk update_norm  resid\\n%.3d N/A N/A          %.6e\\n\",\n                iter, resid);\n        if(resid < resid_thresh) {\n            maxiters = 1;\n            resid_thresh = resid;\n            update_thresh = 0.0;\n            return;\n        }\n        space.scale(r, 1.0 / resid);\n        V.push_back(r);\n        ++iter;\n\n        do {\n            // compute the new vector\n            op.applyOp(V[iter - 1], r);\n\n            // orthogonalize the new vector\n            for(i = 0; i < iter; ++i) {\n                H(i, iter-1) = space.inner(V[i], r);\n                space.gaxpy(r, 1.0, V[i], -H(i, iter-1));\n            }\n            H(iter, iter-1) = norm = space.norm(r);\n\n            // normalize the vector and save it\n            space.scale(r, 1.0 / norm);\n            V.push_back(r);\n\n            // solve Hy == betae for y\n            gelss(H(Slice(0, iter), Slice(0, iter-1)), betae(Slice(0, iter)),\n                1.0e-12, y, s, rank, sumsq);\n\n            // residual from the least-squares fit\n            resid = sumsq[0];\n\n            // compute the update norm,\n            // || x_n - x_{n-1} ||\n            //     = || (x_0 + V_n y_n) - (x_0 + V_{n-1} y_{n-1}) ||\n            //     = || V_n (y_n - y_{n-1}) ||, assuming y_{n-1}[n] = 0\n            //     = || y_n - y_{n-1} ||\n            if(iter == 1)\n                updatenorm = y.normf();\n            else {\n                scalar_type temp = y[0] - yold[0];\n                updatenorm = real(temp)*real(temp) + imag(temp)*imag(temp);\n                for(i = 1; i < iter-1; ++i) {\n                    temp = y[i] - yold[i];\n                    updatenorm += real(temp)*real(temp) +\n                                  imag(temp)*imag(temp);\n                }\n                updatenorm += real(y[iter-1]) * real(y[iter-1]) +\n                              imag(y[iter-1]) * imag(y[iter-1]);\n                updatenorm = sqrt(updatenorm);\n            }\n            yold = copy(y);\n\n            if(norm < 1.0e-10) {\n                // we just got the zero vector -> no more progress\n\n                // if this is the first iteration, compute the residual\n                if(iter == 1) {\n                    space.destroy(r);\n                    space.gaxpy(x, 1.0, V[0], betae[0]);\n                    op.applyOp(x, r);\n                    space.gaxpy(r, -1.0, b, 1.0);\n                    resid_thresh = space.norm(r);\n                    update_thresh = updatenorm;\n                    space.destroy(r);\n                    space.destroy(V[0]);\n\n                    maxiters = 1;\n                    if(outp && world.rank() == 0)\n                        printf(\"%.3d N/A %.6e %.6e ** Zero Vector Encount\" \\\n                            \"ered **\\n\", iter, updatenorm, resid_thresh);\n                    return;\n                }\n\n                if(outp && world.rank() == 0)\n                    printf(\"%.3d %.3ld %.6e %.6e ** Zero Vector Encount\" \\\n                        \"ered **\\n\", iter, rank, updatenorm, resid);\n                break;\n            }\n\n            if(outp && world.rank() == 0) {\n                printf(\"%.3d %.3ld %.6e %.6e\", iter, rank, updatenorm, resid);\n                if(iter != rank)\n                    printf(\" ** Questionable Progress **\");\n                printf(\"\\n\");\n            }\n\n            ++iter;\n        } while(iter <= maxiters && resid > resid_thresh &&\n                updatenorm > update_thresh);\n\n        // build the solution vector and destroy the basis vectors\n        for(i = 0; i < iter; ++i) {\n            space.gaxpy(x, 1.0, V[i], y[i]);\n            space.destroy(V[i]);\n        }\n\n        resid_thresh = resid;\n        update_thresh = updatenorm;\n        maxiters = iter;\n    }\n\n} // end of madness namespace\n\n#endif // MADNESS_LINALG_GMRES_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/jacobi.h",
    "content": "#ifndef MADNESS_JACOBI_H\n#define MADNESS_JACOBI_H\n\n#include <madness/world/madness_exception.h>\n#include <madness/tensor/tensor.h>\n#include <madness/world/print.h>\n\n#include <cmath>\n#include <cstdio>\n#include <algorithm>\n\nnamespace  madness {\nvoid jacobi(Tensor<double>& A, Tensor<double>& V, const std::vector<int>& set) {\n    int n = A.dim(0);\n    MADNESS_CHECK(A.ndim() == 2);\n    MADNESS_CHECK(A.dim(0) == A.dim(1));\n    MADNESS_CHECK(V.ndim() == 2);\n    MADNESS_CHECK(n == V.dim(0) && n == V.dim(1));\n    MADNESS_CHECK(n == long(set.size()));\n\n    int i, j, k, iter, nrot;\n    double tolmin = std::sqrt(n) * 5.0e-16, tol = 0.05;\n    double maxd;\n\n    for (i=0; i<n; i++) {\n        for (j=0; j<n; j++) {\n            A(i,j) = A(j,i) = 0.5*(A(i,j) + A(j,i)); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n            V(i,j) = 0.0;\n        }\n        V(i,i) = 1.0;\n    }\n\n    maxd = 0.;\n    for (i=0; i<n; i++) {\n        double daii = std::fabs(A(i,i));\n        maxd = std::max(maxd,daii);\n    }\n\n#define ROT(A,i,j)                \\\n    { \\\n      double * __restrict__ ai = &A(i,0); \\\n      double * __restrict__ aj = &A(j,0); \\\n      for (k=0; k<n; k++) { \\\n          double t = ai[k]; \\\n          double u = aj[k]; \\\n          ai[k] = c*t - s*u; \\\n          aj[k] = s*t + c*u; \\\n      } \\\n    }\n\n#define ROTT(A,i,j)                \\\n    { \\\n      double * __restrict__ ai = &A(0,i);      \\\n      double * __restrict__ aj = &A(0,j);       \\\n      for (k=0; k<n*n; k+=n) { \\\n          double t = ai[k]; \\\n          double u = aj[k]; \\\n          ai[k] = c*t - s*u; \\\n          aj[k] = s*t + c*u; \\\n      } \\\n    }\n\n    for (iter=0; iter<5000; iter++) {\n        double maxdaij = 0.0;\n        nrot = 0;\n        for (i=0; i<n; i++) {\n            for (j=i+1; j<n; j++) {\n                if (set[i] != set[j]) {\n                    double aii = A(i,i);\n                    double ajj = A(j,j);\n                    double aij = A(i,j);\n                    double daij = std::fabs(aij);\n\n                    maxdaij = std::max(maxdaij,daij/maxd);\n\n                    if (daij > tol*maxd) {\n                        double s = ajj - aii;\n                        double ds = std::fabs(s);\n                        if (daij > (tolmin*ds)) {\n                            double c;\n                            nrot++;\n                            if ((tolmin*daij) > ds) {\n                                c = s = 1.0/std::sqrt(2.);\n                            }\n                            else {\n                                double t = aij/s;\n                                double u = 0.25/std::sqrt(0.25+t*t);\n                                c = std::sqrt(0.5+u);\n                                s = 2.*t*u/c;\n                            }\n\n                            //ROTT(A,i,j);\n                            for (k=0; k<n; k++) {\n                                double t = A(k,i);\n                                double u = A(k,j);\n                                A(k,i) = c*t - s*u;\n                                A(k,j) = s*t + c*u;\n                            }\n\n                            ROT(A,i,j);\n                            // for (k=0; k<n; k++) {\n                            //     double t = A(i,k);\n                            //     double u = A(j,k);\n                            //     A(i,k) = c*t - s*u;\n                            //     A(j,k) = s*t + c*u;\n                            // }\n\n                            ROT(V,i,j);\n                            // for (k=0; k<n; k++) {\n                            //     double t = V(i,k);\n                            //     double u = V(j,k);\n                            //     V(i,k) = c*t - s*u;\n                            //     V(j,k) = s*t + c*u;\n                            // }\n\n                            A(j,i) = A(i,j) = 0.0;\n\n                            maxd = std::max(maxd,std::fabs(A(i,i)));\n                            maxd = std::max(maxd,std::fabs(A(j,j)));\n                        }\n                    }\n                }\n            }\n        }\n        //printf(\"iter=%d nrot=%d err=%e\\n\", iter, nrot, maxdaij);\n        if (nrot == 0 && tol <= tolmin) break;\n        tol = std::min(tol,maxdaij*1e-1);\n        //tol = std::min(tol,maxdaij*maxdaij); // is not quadratic if only block diagonalizing?\n        tol = std::max(tol,tolmin);\n    }\n    if (nrot != 0)\n        printf(\"Jacobi iteration did not converge in 5000 passes\\n\");\n}\n} // namespace madness\n\n#endif //MADNESS_JACOBI_H\n"
  },
  {
    "path": "src/madness/tensor/jimkernel.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include <madness/tensor/tensor.h>\n#include <madness/world/print.h>\n#include <madness/world/timers.h>\n#include <vector>\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n\nusing namespace madness;\nusing namespace std;\n\n// void aligned_add(long n, double* MADNESS_RESTRICT a, const double* MADNESS_RESTRICT b) {\n//     long n4 = (n>>2)<<2;\n//     long rem = n-n4;\n//     for (long i=0; i<n4; i+=4,a+=4,b+=4) {\n//         a[0] += b[0];\n//         a[1] += b[1];\n//         a[2] += b[2];\n//         a[3] += b[3];\n//     }\n//     for (long i=0; i<rem; ++i) *a++ += *b++;\n// }\n\n// void aligned_sub(long n, double* MADNESS_RESTRICT a, const double* MADNESS_RESTRICT b) {\n//     long n4 = (n>>2)<<2;\n//     long rem = n-n4;\n//     for (long i=0; i<n4; i+=4,a+=4,b+=4) {\n//         a[0] -= b[0];\n//         a[1] -= b[1];\n//         a[2] -= b[2];\n//         a[3] -= b[3];\n//     }\n//     for (long i=0; i<rem; ++i) *a++ -= *b++;\n// }\n\nint main(int argc, char** argv) {\n\n    bool smalltest = false;\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n    if (smalltest) return 0;\n\n    const long k=10; // The polynomial rank\n    const long twok = 2*k;\n    const long NBOX=100; // No. of boxes\n    const long RANK=30;   // No. of terms in separated expansion\n\n    Tensor<double> t1(twok,twok,twok); // Workspace\n    Tensor<double> t2(twok,twok,twok);\n    double* tmp1=t1.ptr();\n    double* tmp2=t2.ptr();\n\n    vector< Tensor<double> > Xlist, Ylist, Zlist;\n    vector< Tensor<double> > XlistS, YlistS, ZlistS;\n    for (long m=0; m<RANK*27; ++m) {\n        Xlist.push_back(Tensor<double>(twok,twok));\n        Ylist.push_back(Tensor<double>(twok,twok));\n        Zlist.push_back(Tensor<double>(twok,twok));\n\n        XlistS.push_back(Tensor<double>(k,k));\n        YlistS.push_back(Tensor<double>(k,k));\n        ZlistS.push_back(Tensor<double>(k,k));\n    }\n\n    double start = cpu_time();\n\n    // Significant boxes and their coefficients are normally obtained\n    // by iterating thru entries in a sparse array (hash table)\n    for (long box=0; box<NBOX; ++box) {\n        const Tensor<double> c(twok,twok,twok); // The coefficients for box\n\n        if ((box%10) == 0) print(\"doing box\", box);\n\n        // Each of the neighbors of a cube in 3D including self\n        for (long neighbor=0; neighbor<27; ++neighbor) {\n            Tensor<double> r(twok,twok,twok); // This will hold the result\n            Tensor<double> s(k,k,k);          // This will hold the result\n\n            // Loop thru terms in the expansion of this operator\n            for (long m=0; m<RANK; ++m) {\n                // In practice low-rank approximations are used\n\n                const Tensor<double>& X = Xlist[neighbor*27+m];\n                const Tensor<double>& Y = Ylist[neighbor*27+m];\n                const Tensor<double>& Z = Zlist[neighbor*27+m];\n\n                mTxmq(twok*twok, twok, twok, tmp1, c.ptr(), X.ptr());\n                mTxmq(twok*twok, twok, twok, tmp2, tmp1, Y.ptr());\n                mTxmq(twok*twok, twok, twok, tmp1, tmp2, Z.ptr());\n\n                aligned_add(twok*twok*twok, r.ptr(), tmp1);\n\n                const Tensor<double>& XS = XlistS[neighbor*27+m];\n                const Tensor<double>& YS = YlistS[neighbor*27+m];\n                const Tensor<double>& ZS = ZlistS[neighbor*27+m];\n\n                mTxmq(k*k, k, k, tmp1, c.ptr(), XS.ptr());\n                mTxmq(k*k, k, k, tmp2, tmp1, YS.ptr());\n                mTxmq(k*k, k, k, tmp1, tmp2, ZS.ptr());\n\n                aligned_add(k*k*k, s.ptr(), tmp1);\n            }\n            aligned_sub(k*k*k, r.ptr(), s.ptr());\n\n            // store r into result sparse hash table\n        }\n    }\n    double used = cpu_time() - start;\n    double nflops = NBOX*RANK*3.0*2.0*27.0*(twok*twok*twok*twok + k*k*k*k);\n    double rate = nflops/used;\n    print(\"used \", used,\"s nflop\", nflops, \"rate\", rate);\n\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/tensor/kain.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <iostream>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/tensor_lapack.h>\n#include <madness/world/print.h>\n\nusing namespace madness;\nusing namespace std;\n\n\n\n/// Solves the KAIN equations for coefficients to compute the next vector\n\n/// \\verbatim\n///   Q(i,j) = <xi|fj>\n///   A(i,j) = <xi-xm | fj-fm> = Q(i,j) - Q(m,j) - Q(i,m) + Q(m,m)\n///   b(i,j) =-<xi-xm | fm> = -Q(i,m) + Q(m,m)\n///   A c = b\n///\n///   . Correction to vector m\n///   .   interior = sum(i<m)[ c(i)*(x(i)-x(m)) ] = sum(i<m)[c(i)*x(i)] - x[m]*sum(i<m)[c(i)]\n///   .   exterior = -f(m) - sum(i<m)[ c(i)*(f(i)-f(m)) ] = -f(m) - sum(i<m)[c(i)*f(i)] + f(m)*sum(i<m)[c(i)]\n///   . New vector\n///   .   define C = sum(i<m)(c(i))  (note less than)\n///   .   define c(m) = 1.0 - C\n///   .   xnew = sum(i<=m) [ c(i)*(x(i) - f(i)) ]\n/// \\endverbatim\ntemplate <typename T>\nTensor<T> KAIN(const Tensor<T>& Q) {\n    const int nvec = Q.dim[0];\n    const int m = nvec-1;\n\n    if (nvec == 1) {\n        Tensor<T> c(1);\n        c(0L) = 1.0;\n        return c;\n    }\n\n    Tensor<T> A(m,m);\n    Tensor<T> b(m);\n    for (long i=0; i<m; ++i) {\n        b(i) = Q(m,m) - Q(i,m);\n        for (long j=0; j<m; ++j) {\n            A(i,j) = Q(i,j) - Q(m,j) - Q(i,m) + Q(m,m);\n        }\n    }\n\n//     print(\"Q\");\n//     print(Q);\n//     print(\"A\");\n//     print(A);\n//     print(\"b\");\n//     print(b);\n\n    double rcond = 1e-12;\n    Tensor<T> x;\n    Tensor<double> s;\n    long rank;\n    gelss(A, b, rcond, &x, &s, &rank);\n    print(\"singular values\", s);\n    print(\"rank\", rank);\n    print(\"solution\", x);\n\n    Tensor<T> c(nvec);\n    T sumC = 0.0;\n    for (long i=0; i<m; ++i) sumC += x(i);\n    c(Slice(0,m-1)) = x;\n    print(\"SUMC\", nvec, m, sumC);\n    c(m) = 1.0 - sumC;\n\n    print(\"returned C\", c);\n\n    return c;\n}\n\n\n/// The interface to be provided by\nstruct SolverTargetInterface {\n    virtual bool provides_jacobian() const = 0;\n    virtual Tensor<double> residual(const Tensor<double>& x) = 0;\n    virtual Tensor<double> jacobian(const Tensor<double>& x) {\n        throw \"not implemented\";\n    }\n    virtual void residual_and_jacobian(const Tensor<double>& x,\n                                       Tensor<double>& residual, Tensor<double>& jacobian) {\n        residual = this->residual(x);\n        jacobian = this->jacobian(x);\n    }\n    virtual ~SolverTargetInterface() {};\n};\n\n\n/// The interface to be provided by functions to be optimized\nstruct OptimizationTargetInterface {\n\n    /// Should return true if the gradient is implemented\n    virtual bool provides_gradient() const = 0;\n\n    /// Should return the value of the objective function\n    virtual double value(const Tensor<double>& x) = 0;\n\n    /// Should return the derivative of the function\n    virtual Tensor<double> gradient(const Tensor<double>& x) {\n        throw \"not implemented\";\n    }\n\n    /// Reimplement if more efficient to evaluate both value and gradient in one call\n    virtual void value_and_gradient(const Tensor<double>& x,\n                                    double& value,\n                                    Tensor<double>& gradient) {\n        value = this->value(x);\n        gradient = this->gradient(x);\n    }\n\n\n    /// Numerical test of the derivative ... optionally prints to stdout, returns max abs error\n    double test_gradient(Tensor<double>& x, double value_precision, bool doprint=true) {\n        const double eps = pow(value_precision,0.3333);\n        if (doprint) {\n            printf(\"\\n\");\n            printf(\"Testing gradient eps=%.1e\\n----------------\\n\", eps);\n            printf(\"  i            f-                 f+               ganalytic           gnumeric         err\\n\");\n            printf(\" ----  ------------------  ------------------  ------------------  ------------------  -------\\n\");\n        }\n        Tensor<double> tt = gradient(x);\n        int n = int(tt.dim[0]);\n        double maxerr = 0.0;\n        for (int i=0; i<n; ++i) {\n            x[i] += eps;\n            double fp = value(x);\n            x[i] -= 2.0*eps;\n            double fm = value(x);\n            x[i] += eps;\n\n            double gg = 0.5*(fp-fm)/eps;\n            if (doprint)\n                printf(\"% 5d%20.12e%20.12e%20.12e%20.12e  %.1e\\n\", i, fm, fp, tt(i), gg, abs(tt(i)-gg));\n            maxerr = max(abs(gg-tt(i)),maxerr);\n        }\n        if (doprint) printf(\"\\n\");\n\n        return maxerr;\n    }\n};\n\n\n/// The interface to be provided by solvers\nstruct SolverInterface {\n    virtual bool solve(Tensor<double>& x) = 0;\n    virtual bool converged() const = 0;\n    virtual double residual_norm() const = 0;\n};\n\n/// The interface to be provided by optimizers\nstruct OptimizerInterface {\n    virtual bool optimize(Tensor<double>& x) = 0;\n    virtual bool converged() const = 0;\n    virtual double value() const = 0;\n    virtual double gradient_norm() const = 0;\n};\n\n\n/// Optimization via steepest descent\nclass SteepestDescent : public OptimizerInterface {\n    std::shared_ptr<OptimizationTargetInterface> target;\n    const double tol;\n    const double value_precision;  // Numerical precision of value\n    const double gradient_precision; // Numerical precision of each element of residual\n    double f;\n    double gnorm;\n\npublic:\n    SteepestDescent(const std::shared_ptr<OptimizationTargetInterface>& target,\n                    double tol = 1e-6,\n                    double value_precision = 1e-12,\n                    double gradient_precision = 1e-12)\n        : target(target)\n        , tol(tol)\n        , value_precision(value_precision)\n        , gradient_precision(gradient_precision)\n        , gnorm(tol*1e16)\n    {\n        if (!target->provides_gradient()) throw \"Steepest descent requires the gradient\";\n    }\n\n    bool optimize(Tensor<double>& x) {\n        double step = 10.0;\n        double  fnew;\n        Tensor<double> g;\n        target->value_and_gradient(x,f,g);\n        gnorm = g.normf();\n        for (int i=0; i<100; ++i) {\n            while (1) {\n                Tensor<double> gnew;\n                x.gaxpy(1.0, g, -step);\n                target->value_and_gradient(x,fnew,gnew);\n                if (fnew < f) {\n                    f = fnew;\n                    g = gnew;\n                    break;\n                }\n                x.gaxpy(1.0, g, step);\n                step *= 0.5;\n                print(\"reducing step size\", f, fnew, step);\n            }\n            Tensor<double> g = target->gradient(x);\n            gnorm = g.normf();\n            print(\"iteration\",i,\"value\",f,\"gradient\",gnorm);\n            if (converged()) break;\n        }\n        return converged();\n    }\n\n    bool converged() const {return gnorm < tol;}\n\n    double gradient_norm() const {return gnorm;}\n\n    double value() const {return f;}\n};\n\n\n/// Optimization via quasi-Newton (BFGS or SR1 update)\nclass QuasiNewton : public OptimizerInterface {\nprivate:\n    string update;              // One of BFGS or SR1\n    std::shared_ptr<OptimizationTargetInterface> target;\n    const double tol;\n    const double value_precision;  // Numerical precision of value\n    const double gradient_precision; // Numerical precision of each element of residual\n    double f;\n    double gnorm;\n    Tensor<double> h;\n    int n;\n\n\n    double line_search(double a1, double f0, double dxgrad, const Tensor<double>& x, const Tensor<double>& dx) {\n        double f1, f2p;\n        double hess, a2;\n        const char* lsmode = \"\";\n\n        if (dxgrad*a1 > 0.0) {\n            print(\"    line search gradient +ve \", a1, dxgrad);\n            a1 = -a1;\n        }\n\n        f1 = target->value(x + a1 * dx);\n\n        // Fit to a parabola using f0, g0, f1\n        hess = 2.0*(f1-f0-a1*dxgrad)/(a1*a1);\n        a2 = -dxgrad/hess;\n\n        if (abs(f1-f0) < value_precision) { // Insufficient precision\n            a2 = a1;\n            lsmode = \"fixed\";\n        }\n        else if (hess > 0.0) { // Positive curvature\n            if ((f1 - f0) <= -value_precision) { // Downhill\n                lsmode = \"downhill\";\n                if (abs(a2) > 4.0*abs(a1)) {\n                    lsmode = \"restrict\";\n                    a2 = 4.0*a1;\n                }\n            }\n            else { // Uphill\n                lsmode = \"bracket\";\n            }\n        }\n        else { // Negative curvature\n            if ((f1 - f0) < value_precision) { // Downhill\n                lsmode = \"negative\";\n                a2 = 2e0*a1;\n            }\n            else {\n                lsmode = \"punt\";\n                a2 = a1;\n            }\n        }\n\n        f2p = f0 + dxgrad*a2 + 0.5*hess*a2*a2;\n        printf(\"   line search grad=%.2e hess=%.2e mode=%s newstep=%.3f\\n\", dxgrad, hess, lsmode, a2);\n        printf(\"                      predicted %.12f\\n\", f2p);\n\n        return a2;\n    }\n\n    void hessian_update_sr1(const Tensor<double>& s, const Tensor<double>& y) {\n        Tensor<double> q = y - inner(h,s);\n        double qds = q.trace(s);\n        if (abs(qds) > 1e-8 * s.normf() * q.normf()) {\n            h += outer(q,q).scale(1.0/qds);\n        }\n        else {\n            printf(\"   SR1 not updating\\n\");\n        }\n    }\n\n\n    void hessian_update_bfgs(const Tensor<double>& dx,\n                             const Tensor<double>& dg)\n    {\n        /*\n          Apply the BFGS update to the approximate Hessian h[][].\n\n          h[][] = Hessian matrix from previous iteration\n          dx[]  = Step from previous iteration\n          .       (dx[] = x[] - xp[] where xp[] is the previous point)\n          dg[]  = gradient difference (dg = g - gp)\n        */\n\n        Tensor<double> hdx  = inner(h,dx);\n\n        double dxhdx = dx.trace(hdx);\n        double dxdx  = dx.trace(dx);\n        double dxdg  = dx.trace(dg);\n        double dgdg  = dg.trace(dg);\n\n        if ( (dxdx > 0.0) && (dgdg > 0.0) && (abs(dxdg/sqrt(dxdx*dgdg)) > 1.e-8) ) {\n            for (int i=0; i<n; ++i) {\n                for (int j=0; j<n; ++j) {\n                    h(i,j) += dg[i]*dg[j]/dxdg - hdx[i]*hdx[j]/dxhdx;\n                }\n            }\n        }\n        else {\n            printf(\"   BFGS not updating dxdg (%e), dgdg (%e), dxhdx (%f), dxdx(%e)\\n\" , dxdg, dgdg, dxhdx, dxdx);\n        }\n    }\n\n    Tensor<double> new_search_direction(const Tensor<double>& g) {\n        Tensor<double> dx, s;\n        double tol = gradient_precision;\n        double trust = 1.0; // This applied in spectral basis\n\n        Tensor<double> v, e;\n        syev(h, &v, &e);\n\n        // Transform gradient into spectral basis\n        Tensor<double> gv = inner(g,v);\n\n        // Take step applying restriction\n        for (int i=0; i<n; ++i) {\n            if (e[i] < -tol) {\n                printf(\"   forcing negative eigenvalue to be positive %d %.1e\\n\", i, e[i]);\n                e[i] = -2.0*e[i]; // Enforce positive search direction\n            }\n            else if (e[i] < -tol) {\n                printf(\"   forcing small eigenvalue to be positive %d %.1e\\n\", i, e[i]);\n                e[i] = tol;\n            }\n\n            gv[i] = -gv[i] / e[i];\n            if (abs(gv[i]) > trust) { // Step restriction\n                double gvnew = trust*abs(gv(i))/gv[i];\n                printf(\"   restricting step in spectral direction %d %.1e --> %.1e\\n\", i, gv[i], gvnew);\n                gv[i] = gvnew;\n            }\n        }\n\n        // Transform back from spectral basis\n        return inner(v,gv);\n    }\n\npublic:\n    QuasiNewton(const std::shared_ptr<OptimizationTargetInterface>& target,\n         double tol = 1e-6,\n         double value_precision = 1e-12,\n         double gradient_precision = 1e-12)\n        : update(\"BFGS\")\n        , target(target)\n        , tol(tol)\n        , value_precision(value_precision)\n        , gradient_precision(gradient_precision)\n        , gnorm(tol*1e16)\n        , n(0)\n    {\n        if (!target->provides_gradient()) throw \"QuasiNewton requires the gradient\";\n    }\n\n    void set_update(const string& method) {\n        if (method == \"BFGS\" || method == \"SR1\") update=method;\n        else throw \"QuasiNewton: unknown update mthod\";\n    }\n\n    bool optimize(Tensor<double>& x) {\n        if (n != x.dim[0]) {\n            n = x.dim[0];\n            h = Tensor<double>();\n        }\n\n        target->test_gradient(x, value_precision);\n\n        bool h_is_identity = (h.size == 0);\n        if (h_is_identity) {\n            h = Tensor<double>(n,n);\n            for (int i=0; i<n; ++i) h(i,i) = 1.0;\n        }\n\n        Tensor<double> gp, dx;\n        double fp;\n        for (int iter=0; iter<20; ++iter) {\n            Tensor<double> g;\n            target->value_and_gradient(x, f, g);\n            gnorm = g.normf();\n            printf(\" QuasiNewton iteration %2d value %.12f gradient %.2e\\n\",iter,f,gnorm);\n            if (converged()) break;\n\n            if (iter == 1 && h_is_identity) {\n                // Default initial Hessian is scaled identity but\n                // prefer to reuse any existing approximation.\n                h.scale(g.trace(gp)/gp.trace(dx));\n            }\n\n            if (iter > 0) {\n                if (update == \"BFGS\") hessian_update_bfgs(dx, g-gp);\n                else hessian_update_sr1(dx, g-gp);\n            }\n\n            dx = new_search_direction(g);\n\n            double step = line_search(1.0, f, dx.trace(g), x, dx);\n\n            dx.scale(step);\n            x += dx;\n            gp = g;\n            fp = f;\n\n        }\n        print(\"final hessian\");\n        print(h);\n        return converged();\n    }\n\n    bool converged() const {return gnorm < tol;}\n\n    double value() const {return f;}\n\n    double gradient_norm() const {return gnorm;}\n};\n\n\nstruct Test : public OptimizationTargetInterface {\n    bool provides_gradient() const {return true;}\n\n    double value(const Tensor<double>& x) {\n        return 0.5*3.0*x.sumsq();\n    }\n\n    Tensor<double> gradient(const Tensor<double>& x) {\n        return x*3.0;\n    }\n};\n\n\nstruct Test2 : public OptimizationTargetInterface {\n    bool provides_gradient() const {return true;}\n\n    double value(const Tensor<double>& x) {\n        double v = 1.0;\n        for (int i=0; i<x.dim[0]; ++i) {\n            v *= cos((i+1)*x[i]);\n        }\n        return v;\n    }\n\n    Tensor<double> gradient(const Tensor<double>& x) {\n        double v = value(x);\n        Tensor<double> g(x.dim[0]);\n        for (int i=0; i<x.dim[0]; ++i) {\n            g[i]= -v*(i+1)*sin((i+1)*x[i])/cos((i+1)*x[i]);\n        }\n        return g;\n    }\n};\n\n\n\nTensor<double> op(const Tensor<double>& x) {\n    const long n = x.dim[0];\n    Tensor<double> f(n);\n    for (long i=0; i<n; ++i) {\n        f(i) = (i + 1)*x[i]; // + 0.01*i*x[i]*x[i]*x[i];\n        for (long j=0; j<n; ++j)\n            f(i) += 0.0001*i*j*x[i]*x[i]*x[j]*x[j]/((i+1)*(j+1));\n    }\n    return f;\n}\n\ndouble dot_product(const Tensor<double>& a, const Tensor<double>& b) {\n    return a.trace(b);\n}\n\nint main() {\n\n    Tensor<double> x(5);\n    x.fillrandom();\n    QuasiNewton solver(std::shared_ptr<OptimizationTargetInterface>(new Test2));\n    solver.set_update(\"SR1\");\n    solver.optimize(x);\n    return 0;\n\n\n//     int n= 40;\n//     int maxiter = 100;\n//     int maxnvec = 20;\n//     Tensor<double> f(maxnvec,n), x(maxnvec,n), Q(maxnvec,maxnvec);\n\n//     int m = 0;\n//     x(0,_).fillrandom();\n//     for (int iter=0; iter<maxiter; ++iter) {\n//         print(\"\\nITERATION\", iter, m);\n//         f(m,_) = op(x(m,_));\n//         print(\"x\");\n//         print(x(m,_));\n//         print(f(m,_));\n\n//         for (int j=0; j<=m; ++j) {\n//             Q(j,m) = dot_product(x(j,_),f(m,_));\n//             Q(m,j) = dot_product(x(m,_),f(j,_));\n//         }\n\n//         Tensor<double> c = KAIN(Q(Slice(0,m),Slice(0,m)));\n//         print(\"THIS IS THE C I GOT\");\n//         print(c);\n\n//         {\n//             ++m;\n\n//             Tensor<double> xnew(n);\n//             for (int j=0; j<m; ++j) {\n//                 xnew += c(j)*(x(j,_) - f(j,_));\n//             }\n\n//             double steplen = (xnew-x(m-1,_)).normf();\n//             double xnorm = xnew.normf();\n//             if (steplen > 0.5) {\n//                 double damp = 0.5/steplen;\n//                 if (damp < 0.1) damp = 0.1;\n//                 print(\"restrictING\", steplen, xnorm, damp);\n//                 xnew = damp*xnew + (1.0-damp)*x(m-1,_);\n//             }\n\n//             if (m == maxnvec) {\n//                 for (int i=1; i<m; ++i) {\n//                     f(i-1,_) = f(i,_);\n//                     x(i-1,_) = f(i,_);\n//                 }\n//                 Q(Slice(0,-2),Slice(0,-2)) = copy(Q(Slice(1,-1),Slice(1,-1)));\n\n//                 m--;\n//             }\n//             x(m,_) = xnew;\n//         }\n//     }\n//     return 0;\n\n}\n"
  },
  {
    "path": "src/madness/tensor/lapack.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#include <madness/madness_config.h>\n#include <madness/tensor/tensor.h>\n\n#include <iostream>\nusing std::cout;\nusing std::endl;\n\n#include <algorithm>\nusing std::min;\nusing std::max;\n\n/// \\file lapack.cc\n/// \\brief Partial interface from Tensor to LAPACK\n\n// Leave the test routines in this file ... they will force instantiation\n// of the necessary templates.\n\nusing madness::Tensor;\n\n#include <madness/tensor/tensor_lapack.h>\n#include <madness/tensor/clapack.h>\n#ifdef MADNESS_LINALG_USE_LAPACKE\nusing madness::lapacke::to_cptr;\nusing madness::lapacke::to_zptr;\n#endif\n\ndouble tt1, ss1;\n\n#ifdef STATIC\n#  undef STATIC\n#endif\n\n#if HAVE_UNQUALIFIED_STATIC_DECL\n#  define STATIC static\n#else\n// Cray X1 compiler won't instantiate static function templates (mxm*)\n#  define STATIC\n#endif\n\n/// These oddly-named wrappers enable the generic svd interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void gesvd_(const char *jobu, const char *jobvt, integer *m, integer *n,\n                          real4 *a, integer *lda, real4 *s, real4 *u, integer *ldu,\n                          real4 *vt, integer *ldvt, real4 *work, integer *lwork,\n                          integer *info, char_len jobulen, char_len jobvtlen) {\n    //std::cout << \"n \" << *n << \" m \" << *m << \" lwork \" << *lwork << std::endl;\n    //std::cout << \" sizeof(integer) \" << sizeof(integer) << std::endl;\n#if MADNESS_LINALG_USE_LAPACKE\n    sgesvd_(jobu, jobvt, m, n, a, lda, s, u, ldu,\n            vt, ldvt, work, lwork, info);\n#else\n    sgesvd_(jobu, jobvt, m, n, a, lda, s, u, ldu,\n            vt, ldvt, work, lwork, info, jobulen, jobvtlen);\n#endif\n}\n\nSTATIC inline void gesvd_(const char *jobu, const char *jobvt, integer *m, integer *n,\n                          real8 *a, integer *lda, real8 *s, real8 *u, integer *ldu,\n                          real8 *vt, integer *ldvt, real8 *work, integer *lwork,\n                          integer *info, char_len jobulen, char_len jobvtlen){\n#if MADNESS_LINALG_USE_LAPACKE\n    dgesvd_(jobu, jobvt, m, n, a, lda, s, u, ldu,\n            vt, ldvt, work, lwork, info);\n#else\n    dgesvd_(jobu, jobvt, m, n, a, lda, s, u, ldu,\n            vt, ldvt, work, lwork, info, jobulen, jobvtlen);\n#endif\n}\n\nSTATIC inline void gesvd_(const char *jobu, const char *jobvt, integer *m, integer *n,\n                          complex_real4 *a, integer *lda, real4 *s, complex_real4 *u, integer *ldu,\n                          complex_real4 *vt, integer *ldvt, complex_real4 *work, integer *lwork,\n                          integer *info, char_len jobulen, char_len jobvtlen) {\n  Tensor<float> rwork(5*min(*m,*n));\n#if MADNESS_LINALG_USE_LAPACKE\n    cgesvd_(jobu, jobvt, m, n, to_cptr(a), lda, s, to_cptr(u), ldu,\n            to_cptr(vt), ldvt, to_cptr(work), lwork, rwork.ptr(), info);\n#else\n    cgesvd_(jobu, jobvt, m, n, a, lda, s, u, ldu,\n            vt, ldvt, work, lwork, rwork.ptr(), info, jobulen, jobvtlen);\n#endif\n}\n\nSTATIC inline void gesvd_(const char *jobu, const char *jobvt, integer *m, integer *n,\n                          complex_real8 *a, integer *lda, real8 *s, complex_real8 *u, integer *ldu,\n                          complex_real8 *vt, integer *ldvt, complex_real8 *work, integer *lwork,\n                          integer *info, char_len jobulen, char_len jobvtlen) {\n    Tensor<double> rwork(5*min(*m,*n));\n#if MADNESS_LINALG_USE_LAPACKE\n    zgesvd_(jobu, jobvt, m, n, to_zptr(a), lda, s, to_zptr(u), ldu,\n            to_zptr(vt), ldvt, to_zptr(work), lwork, rwork.ptr(), info);\n#else\n    zgesvd_(jobu, jobvt, m, n, a, lda, s, u, ldu,\n            vt, ldvt, work, lwork, rwork.ptr(), info, jobulen, jobvtlen);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic gesv interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void gesv_(integer* n, integer* nrhs, real4* AT, integer* lda,\n                         integer* piv, real4* x, integer* ldx, integer* info) {\n    sgesv_(n, nrhs, AT, lda, piv, x, ldx, info);\n}\n\nSTATIC inline void gesv_(integer* n, integer* nrhs, real8* AT, integer* lda,\n                         integer* piv, real8* x, integer* ldx, integer* info) {\n    dgesv_(n, nrhs, AT, lda, piv, x, ldx, info);\n}\n\nSTATIC inline void gesv_(integer* n, integer* nrhs, float_complex* AT, integer* lda,\n                         integer* piv, float_complex* x, integer* ldx, integer* info) {\n#if MADNESS_LINALG_USE_LAPACKE\n    cgesv_(n, nrhs, to_cptr(AT), lda, piv, to_cptr(x), ldx, info);\n#else\n    cgesv_(n, nrhs, AT, lda, piv, x, ldx, info);\n#endif\n}\n\nSTATIC inline void gesv_(integer* n, integer* nrhs, double_complex* AT, integer* lda,\n                         integer* piv, double_complex* x, integer* ldx, integer* info) {\n#if MADNESS_LINALG_USE_LAPACKE\n    zgesv_(n, nrhs, to_zptr(AT), lda, piv, to_zptr(x), ldx, info);\n#else\n    zgesv_(n, nrhs, AT, lda, piv, x, ldx, info);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic gelss interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void gelss_(integer *m, integer *n, integer *nrhs,\n                          real4 *a, integer *lda, real4 *b, integer *ldb, real4 *sOUT,\n                          real4 *rcondIN, integer *rankOUT, real4 *work,\n                          integer *lwork, integer *infoOUT) {\n    sgelss_(m, n, nrhs, a, lda, b, ldb, sOUT, rcondIN, rankOUT, work, lwork, infoOUT);\n}\n\nSTATIC inline void gelss_(integer *m, integer *n, integer *nrhs,\n                          real8 *a, integer *lda, real8 *b, integer *ldb, real8 *sOUT,\n                          real8 *rcondIN, integer *rankOUT, real8 *work,\n                          integer *lwork, integer *infoOUT) {\n    dgelss_(m, n, nrhs, a, lda, b, ldb, sOUT, rcondIN, rankOUT, work, lwork, infoOUT);\n}\n\nSTATIC inline void gelss_(integer *m, integer *n, integer *nrhs,\n                          float_complex *a, integer *lda, float_complex *b,\n                          integer *ldb, float *sOUT,\n                          float *rcondIN, integer *rankOUT, float_complex *work,\n                          integer *lwork, integer *infoOUT) {\n    Tensor<float> rwork((5*min(*m,*n)));\n#if MADNESS_LINALG_USE_LAPACKE\n    cgelss_(m, n, nrhs, to_cptr(a), lda, to_cptr(b), ldb, sOUT,\n            rcondIN, rankOUT, to_cptr(work), lwork, rwork.ptr(), infoOUT);\n#else\n    cgelss_(m, n, nrhs, a, lda, b, ldb, sOUT, rcondIN, rankOUT, work,\n            lwork, rwork.ptr(), infoOUT);\n#endif\n}\n\nSTATIC inline void gelss_(integer *m, integer *n, integer *nrhs,\n                          double_complex *a, integer *lda, double_complex *b,\n                          integer *ldb, double *sOUT,\n                          double *rcondIN, integer *rankOUT, double_complex *work,\n                          integer *lwork, integer *infoOUT) {\n    Tensor<double> rwork((5*min(*m,*n)));\n#if MADNESS_LINALG_USE_LAPACKE\n    zgelss_(m, n, nrhs, to_zptr(a), lda, to_zptr(b), ldb, sOUT,\n            rcondIN, rankOUT, to_zptr(work), lwork, rwork.ptr(), infoOUT);\n#else\n    zgelss_(m, n, nrhs, a, lda, b, ldb, sOUT, rcondIN, rankOUT, work,\n            lwork, rwork.ptr(), infoOUT);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic ggev interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void ggev_(const char* jobl, const char* jobr, integer *n,\n                         real4 *a, integer *lda, real4 *b, integer *ldb,\n                         real4 *w_real, real4 *w_imag, real4 *beta,\n                         real4 *vl, integer *ldvl, real4 *vr, integer *ldvr,\n                         real4 *work,  integer *lwork, integer *info,\n                         char_len jobzlen, char_len uplo_len) {\n#if MADNESS_LINALG_USE_LAPACKE\n    sggev_(jobl, jobr, n, a, lda, b, ldb, w_real, w_imag, beta, vl, ldvl, vr, ldvr, work,  lwork, info);\n#else\n    sggev_(jobl, jobr, n, a, lda, b, ldb, w_real, w_imag, beta, vl, ldvl, vr, ldvr, work,  lwork, info,\n           jobzlen, uplo_len);\n#endif\n}\n\nSTATIC inline void ggev_(const char* jobl, const char* jobr, integer *n,\n                         real8 *a, integer *lda, real8 *b, integer *ldb,\n                         real8 *w_real, real8 *w_imag, real8 *beta,\n                         real8 *vl, integer *ldvl, real8 *vr, integer *ldvr,\n                         real8 *work,  integer *lwork, integer *info,\n                         char_len jobzlen, char_len uplo_len) {\n#if MADNESS_LINALG_USE_LAPACKE\n    dggev_(jobl, jobr, n, a, lda, b, ldb, w_real, w_imag, beta, vl, ldvl, vr, ldvr, work,  lwork, info);\n#else\n    dggev_(jobl, jobr, n, a, lda, b, ldb, w_real, w_imag, beta, vl, ldvl, vr, ldvr, work,  lwork, info,\n           jobzlen, uplo_len);\n#endif\n}\n\nSTATIC inline void ggev_(const char* jobl, const char* jobr, integer *n,\n                         complex_real4 *a, integer *lda, complex_real4 *b, integer *ldb,\n                         complex_real4 *w, complex_real4 *w_imag, complex_real4 *beta,\n                         complex_real4 *vl, integer *ldvl, complex_real4 *vr, integer *ldvr,\n                         complex_real4 *work,  integer *lwork, integer *info,\n                         char_len jobzlen, char_len uplo_len) {\n    Tensor<float> rwork(max((integer) 1, (integer) (2* (*n))));\n#if MADNESS_LINALG_USE_LAPACKE\n    cggev_(jobl, jobr, n, reinterpret_cast<lapack_complex_float*>(a), lda,\n           reinterpret_cast<lapack_complex_float*>(b), ldb,\n           reinterpret_cast<lapack_complex_float*>(w),\n           reinterpret_cast<lapack_complex_float*>(beta),\n           reinterpret_cast<lapack_complex_float*>(vl), ldvl,\n           reinterpret_cast<lapack_complex_float*>(vr), ldvr,\n           reinterpret_cast<lapack_complex_float*>(work), lwork, rwork.ptr(), info);\n#else\n    cggev_(jobl, jobr, n, a, lda, b, ldb, w, beta, vl, ldvl, vr, ldvr, work, lwork, rwork.ptr(), info,\n           jobzlen, uplo_len);\n\n#endif\n}\n\nSTATIC inline void ggev_(const char* jobl, const char* jobr, integer *n,\n                         complex_real8 *a, integer *lda, complex_real8 *b, integer *ldb,\n                         complex_real8 *w, complex_real8 *w_imag, complex_real8 *beta,\n                         complex_real8 *vl, integer *ldvl, complex_real8 *vr, integer *ldvr,\n                         complex_real8 *work,  integer *lwork, integer *info,\n                         char_len jobzlen, char_len uplo_len) {\n    Tensor<double> rwork(max((integer) 1, (integer) (2* (*n))));\n#if MADNESS_LINALG_USE_LAPACKE\n    zggev_(jobl, jobr, n, reinterpret_cast<lapack_complex_double*>(a), lda,\n           reinterpret_cast<lapack_complex_double*>(b), ldb,\n           reinterpret_cast<lapack_complex_double*>(w),\n           reinterpret_cast<lapack_complex_double*>(beta),\n           reinterpret_cast<lapack_complex_double*>(vl), ldvl,\n           reinterpret_cast<lapack_complex_double*>(vr), ldvr,\n           reinterpret_cast<lapack_complex_double*>(work), lwork, rwork.ptr(), info);\n#else\n    zggev_(jobl, jobr, n, a, lda, b, ldb, w, beta, vl, ldvl, vr, ldvr, work, lwork, rwork.ptr(), info,\n           jobzlen, uplo_len);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic geev interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void geev_(const char* jobz, const char* uplo, integer *n,\n                         real4 *a, integer *lda, real4 *w_real, real4 *w_imag,\n                         real4 *v, integer *ldv, real4 *vr, integer *ldvr,\n                         real4 *work,  integer *lwork, integer *info,\n                         char_len jobzlen, char_len uplo_len) {\n#if MADNESS_LINALG_USE_LAPACKE\n    sgeev_(jobz, uplo, n, a, lda, w_real, w_imag, v, ldv, vr, ldvr, work,  lwork, info);\n#else\n    sgeev_(jobz, uplo, n, a, lda, w_real, w_imag, v, ldv, vr, ldvr, work,  lwork, info,\n           jobzlen, uplo_len);\n#endif\n}\n\nSTATIC inline void geev_(const char* jobz, const char* uplo, integer *n,\n                         real8 *a, integer *lda, real8 *w_real, real8 *w_imag,\n                         real8 *v, integer *ldv, real8 *vr, integer *ldvr,\n                         real8 *work,  integer *lwork, integer *info,\n                         char_len jobzlen, char_len uplo_len) {\n#if MADNESS_LINALG_USE_LAPACKE\n    dgeev_(jobz, uplo, n, a, lda, w_real, w_imag, v, ldv, vr, ldvr, work,  lwork, info);\n#else\n    dgeev_(jobz, uplo, n, a, lda, w_real, w_imag, v, ldv, vr, ldvr, work,  lwork, info,\n           jobzlen, uplo_len);\n#endif\n}\n\nSTATIC inline void geev_(const char* jobz, const char* uplo, integer *n,\n                         complex_real4 *a, integer *lda, complex_real4 *w, complex_real4 *w_imag,\n                         complex_real4 *v, integer *ldv, complex_real4 *vr, integer *ldvr,\n                         complex_real4 *work,  integer *lwork, integer *info,\n                         char_len jobzlen, char_len uplo_len) {\n    Tensor<float> rwork(max((integer) 1, (integer) (2* (*n))));\n#if MADNESS_LINALG_USE_LAPACKE\n    cgeev_(jobz, uplo, n, reinterpret_cast<lapack_complex_float*>(a), lda,\n           reinterpret_cast<lapack_complex_float*>(w),\n           reinterpret_cast<lapack_complex_float*>(v), ldv,\n           reinterpret_cast<lapack_complex_float*>(vr), ldvr,\n           reinterpret_cast<lapack_complex_float*>(work), lwork, rwork.ptr(), info);\n#else\n    cgeev_(jobz, uplo, n, a, lda, w, v, ldv, vr, ldvr, work, lwork, rwork.ptr(), info,\n           jobzlen, uplo_len);\n#endif\n}\n\n\nSTATIC inline void geev_(const char* jobz, const char* uplo, integer *n,\n                         complex_real8 *a, integer *lda, complex_real8 *w, complex_real8 *w_imag,\n                         complex_real8 *v, integer *ldv, complex_real8 *vr, integer *ldvr,\n                         complex_real8 *work,  integer *lwork, integer *info,\n                         char_len jobzlen, char_len uplo_len) {\n    Tensor<double> rwork(max((integer) 1, (integer) (2* (*n))));\n#if MADNESS_LINALG_USE_LAPACKE\n    zgeev_(jobz, uplo, n, reinterpret_cast<lapack_complex_double*>(a), lda,\n           reinterpret_cast<lapack_complex_double*>(w),\n           reinterpret_cast<lapack_complex_double*>(v), ldv,\n           reinterpret_cast<lapack_complex_double*>(vr), ldvr,\n           reinterpret_cast<lapack_complex_double*>(work), lwork, rwork.ptr(), info);\n#else\n    zgeev_(jobz, uplo, n, a, lda, w, v, ldv, vr, ldvr, work, lwork, rwork.ptr(), info,\n           jobzlen, uplo_len);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic sygv/hegv interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void sygv_(integer *itype, const char* jobz, const char* uplo, integer *n,\n                         real4 *a, integer *lda, real4 *b, integer *ldb,\n                         real4 *w,  real4 *work,  integer *lwork,\n                         integer *info, char_len jobzlen, char_len uplo_len ) {\n#if MADNESS_LINALG_USE_LAPACKE\n    ssygv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, info);\n#else\n    ssygv_(itype, jobz, uplo, n, a, lda, b, ldb, w,  work,  lwork, info,\n           jobzlen,uplo_len);\n#endif\n}\n\nSTATIC inline void sygv_(integer *itype, const char* jobz, const char* uplo, integer *n,\n                         real8 *a, integer *lda, real8 *b, integer *ldb,\n                         real8 *w,  real8 *work,  integer *lwork,\n                         integer *info, char_len jobzlen, char_len uplo_len ) {\n#if MADNESS_LINALG_USE_LAPACKE\n    dsygv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, info);\n#else\n    dsygv_(itype, jobz, uplo, n, a, lda, b, ldb, w,  work,  lwork, info,\n           jobzlen, uplo_len);\n#endif\n}\n\nSTATIC inline void sygv_(integer *itype, const char* jobz, const char* uplo, integer *n,\n                         complex_real4 *a, integer *lda, complex_real4 *b, integer *ldb,\n                         real4 *w,  complex_real4 *work,  integer *lwork,\n                         integer *info, char_len jobzlen, char_len uplo_len ) {\n    Tensor<float> rwork(max((integer) 1, (integer) (3*(*n)-2)));\n#if MADNESS_LINALG_USE_LAPACKE\n    chegv_(itype, jobz, uplo, n, to_cptr(a), lda, to_cptr(b),\n           ldb, w, to_cptr(work), lwork, rwork.ptr(), info);\n#else\n    chegv_(itype, jobz, uplo, n, a, lda, b, ldb, w,  work,  lwork, rwork.ptr(), info,\n           jobzlen, uplo_len);\n#endif\n}\n\nSTATIC inline void sygv_(integer *itype, const char* jobz, const char* uplo, integer *n,\n                         complex_real8 *a, integer *lda, complex_real8 *b, integer *ldb,\n                         real8 *w,  complex_real8 *work,  integer *lwork,\n                         integer *info, char_len jobzlen, char_len uplo_len ) {\n    Tensor<double> rwork(max((integer) 1, (integer) (3*(*n)-2)));\n#if MADNESS_LINALG_USE_LAPACKE\n    zhegv_(itype, jobz, uplo,n, to_zptr(a), lda, to_zptr(b),\n           ldb, w, to_zptr(work), lwork, rwork.ptr(), info);\n#else\n    zhegv_(itype, jobz, uplo, n, a, lda, b, ldb, w,  work,  lwork, rwork.ptr(), info,\n           jobzlen, uplo_len);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic syev/heev interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void syev_(const char* jobz, const char* uplo, integer *n,\n                         real4 *a, integer *lda, real4 *w,  real4 *work,  integer *lwork,\n                         integer *info, char_len jobzlen, char_len uplo_len ) {\n#if MADNESS_LINALG_USE_LAPACKE\n    ssyev_(jobz, uplo, n, a, lda, w, work, lwork, info);\n#else\n    ssyev_(jobz, uplo, n, a, lda, w,  work,  lwork, info, jobzlen, uplo_len);\n#endif\n}\n\nSTATIC inline void syev_(const char* jobz, const char* uplo, integer *n,\n                         real8 *a, integer *lda, real8 *w,  real8 *work,  integer *lwork,\n                         integer *info, char_len jobzlen, char_len uplo_len ) {\n#if MADNESS_LINALG_USE_LAPACKE\n    dsyev_(jobz, uplo, n, a, lda, w, work, lwork, info);\n#else\n    dsyev_(jobz, uplo, n, a, lda, w,  work,  lwork, info, jobzlen, uplo_len);\n#endif\n}\n\nSTATIC inline void syev_(const char* jobz, const char* uplo, integer *n,\n                  complex_real4 *a, integer *lda, real4 *w,\n                  complex_real4 *work,  integer *lwork,\n                  integer *info, char_len jobzlen, char_len uplo_len ) {\n    Tensor<float> rwork(max((integer) 1, (integer) (3* (*n)-2)));\n    //std::cout << *n << \" \" << *lda << \" \" << *lwork <<std::endl;\n#if MADNESS_LINALG_USE_LAPACKE\n    cheev_(jobz, uplo, n, to_cptr(a), lda, w,\n           to_cptr(work), lwork, rwork.ptr(), info);\n#else\n    cheev_(jobz, uplo, n, a, lda, w,  work,  lwork, rwork.ptr(),\n           info, jobzlen, uplo_len);\n#endif\n}\n\nSTATIC inline void syev_(const char* jobz, const char* uplo, integer *n,\n                  complex_real8 *a, integer *lda, real8 *w,\n                  complex_real8 *work,  integer *lwork,\n                  integer *info, char_len jobzlen, char_len uplo_len ) {\n    Tensor<double> rwork(max((integer) 1, (integer) (3* (*n)-2)));\n#if MADNESS_LINALG_USE_LAPACKE\n    zheev_(jobz, uplo, n, to_zptr(a), lda, w,\n           to_zptr(work), lwork, rwork.ptr(), info);\n#else\n    zheev_(jobz, uplo, n, a, lda, w,  work,  lwork, rwork.ptr(),\n           info, jobzlen, uplo_len);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic geqrf interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void geqrf_(integer *m, integer *n,\n                          real4 *a, integer *lda, real4 *tau,\n                          real4 *work, integer *lwork, integer *infoOUT) {\n\tsgeqrf_(m, n, a, lda, tau, work, lwork, infoOUT);\n}\n\nSTATIC inline void geqrf_(integer *m, integer *n,\n                          real8 *a, integer *lda, real8 *tau,\n                          real8 *work, integer *lwork, integer *infoOUT) {\n\tdgeqrf_(m, n, a, lda, tau, work, lwork, infoOUT);\n}\n\nSTATIC inline void geqrf_(integer *m, integer *n,\n                          float_complex *a, integer *lda, float_complex *tau,\n                          float_complex *work, integer *lwork, integer *infoOUT) {\n#if MADNESS_LINALG_USE_LAPACKE\n\tcgeqrf_(m, n, to_cptr(a), lda, to_cptr(tau), to_cptr(work), lwork, infoOUT);\n#else\n\tcgeqrf_(m, n, a, lda, tau, work, lwork, infoOUT);\n#endif\n}\n\nSTATIC inline void geqrf_(integer *m, integer *n,\n                          double_complex *a, integer *lda, double_complex *tau,\n                          double_complex *work, integer *lwork, integer *infoOUT) {\n#if MADNESS_LINALG_USE_LAPACKE\n\tzgeqrf_(m, n, to_zptr(a), lda, to_zptr(tau), to_zptr(work), lwork, infoOUT);\n#else\n\tzgeqrf_(m, n, a, lda, tau, work, lwork, infoOUT);\n#endif\n}\n\nSTATIC inline void geqp3_(integer *m, integer *n,\n                          real4 *a, integer *lda, integer *jpvt, real4 *tau,\n                          real4 *work, integer *lwork, integer *infoOUT){\n    sgeqp3_(m, n, a, lda, jpvt, tau, work, lwork, infoOUT);\n}\n\nSTATIC inline void geqp3_(integer *m, integer *n,\n                          real8 *a, integer *lda, integer *jpvt, real8 *tau,\n                          real8 *work, integer *lwork, integer *infoOUT){\n    dgeqp3_(m, n, a, lda, jpvt, tau, work, lwork, infoOUT);\n}\n\nSTATIC inline void geqp3_(integer *m, integer *n,\n                          complex_real4 *a, integer *lda, integer *jpvt, complex_real4 *tau,\n                          complex_real4 *work, integer *lwork, integer *infoOUT){\n    Tensor<float> rwork((integer) (2* (*n)));\n#if MADNESS_LINALG_USE_LAPACKE\n    cgeqp3_(m, n, to_cptr(a), lda, jpvt, to_cptr(tau), to_cptr(work), lwork, rwork.ptr(), infoOUT);\n#else\n    cgeqp3_(m, n, a, lda, jpvt, tau, work, lwork, rwork.ptr(), infoOUT);\n#endif\n}\n\nSTATIC inline void geqp3_(integer *m, integer *n,\n                          complex_real8 *a, integer *lda, integer *jpvt, complex_real8 *tau,\n                          complex_real8 *work, integer *lwork, integer *infoOUT){\n    Tensor<double> rwork((integer) (2* (*n)));\n#if MADNESS_LINALG_USE_LAPACKE\n    zgeqp3_(m, n, to_zptr(a), lda, jpvt, to_zptr(tau), to_zptr(work), lwork, rwork.ptr(), infoOUT);\n#else\n    zgeqp3_(m, n, a, lda, jpvt, tau, work, lwork, rwork.ptr(), infoOUT);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic orgqr/unggr interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void orgqr_(integer *m, integer *n, integer *k,\n                          real4 *a, integer *lda, real4 *tau,\n                          real4 *work, integer *lwork, integer *info) {\n    sorgqr_(m, n, k, a, m, tau, work, lwork, info);\n}\n\nSTATIC inline void orgqr_(integer *m, integer *n, integer *k,\n                          real8 *a, integer *lda, real8 *tau,\n                          real8 *work, integer *lwork, integer *info) {\n\tdorgqr_(m, n, k, a, m, tau, work, lwork, info);\n}\n\nSTATIC inline void orgqr_(integer *m, integer *n, integer *k,\n                          complex_real4 *a, integer *lda, complex_real4 *tau,\n                          complex_real4 *work, integer *lwork, integer *info) {\n#if MADNESS_LINALG_USE_LAPACKE\n    cungqr_(m, n, k, to_cptr(a), lda,\n            to_cptr(tau),\n            to_cptr(work), lwork, info);\n#else\n\tcungqr_(m, n, k, a, m, tau, work, lwork, info);\n#endif\n}\n\nSTATIC inline void orgqr_(integer *m, integer *n, integer *k,\n                          complex_real8 *a, integer *lda, complex_real8 *tau,\n                          complex_real8 *work, integer *lwork, integer *info) {\n#if MADNESS_LINALG_USE_LAPACKE\n    zungqr_(m,n,k, to_zptr(a), m,\n            to_zptr(tau),\n            to_zptr(work), lwork, info);\n#else\n\tzungqr_(m, n, k, a, m, tau, work, lwork, info);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic cholesky interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void potrf_(const char * UPLO, integer *n,\n                          real4 *a ,integer *lda , integer *info){\n#if MADNESS_LINALG_USE_LAPACKE\n\tspotrf_(UPLO, n, a, lda, info);\n#else\n\tspotrf_(UPLO, n, a, lda, info, 1);\n#endif\n}\n\nSTATIC inline void potrf_(const char * UPLO, integer *n,\n                          real8 *a ,integer *lda , integer *info){\n#if MADNESS_LINALG_USE_LAPACKE\n\tdpotrf_(UPLO, n, a, lda, info);\n#else\n\tdpotrf_(UPLO, n, a, lda, info, 1);\n#endif\n}\n\nSTATIC inline void potrf_(const char * UPLO, integer *n,\n                          complex_real4 *a ,integer *lda , integer *info){\n#if MADNESS_LINALG_USE_LAPACKE\n    cpotrf_(UPLO, n, to_cptr(a), lda, info);\n#else\n\tcpotrf_(UPLO, n, a, lda, info, 1);\n#endif\n}\nSTATIC inline void potrf_(const char * UPLO, integer *n,\n                          complex_real8 *a ,integer *lda , integer *info){\n#if MADNESS_LINALG_USE_LAPACKE\n    zpotrf_(UPLO, n, to_zptr(a), lda, info);\n#else\n\tzpotrf_(UPLO, n, a, lda, info, 1);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic rr_cholesky interface to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void pstrf_(const char * UPLO, integer *n,\n                          real4 *a ,integer* lda, integer *piv, integer* rank,\n                          real4* tol, real4* work , integer *info){\n\tspstrf_(UPLO, n, a, lda, piv, rank, tol, work, info);\n}\n\nSTATIC inline void pstrf_(const char * UPLO, integer *n,\n                          real8 *a ,integer* lda, integer *piv, integer* rank,\n                          real8* tol, real8* work , integer *info){\n\tdpstrf_(UPLO, n, a, lda, piv, rank, tol, work, info);\n}\n\nSTATIC inline void pstrf_(const char * UPLO, integer *n,\n                          complex_real4 *a ,integer* lda, integer *piv, integer* rank,\n                          real4* tol, complex_real4* work , integer *info){\n#if MADNESS_LINALG_USE_LAPACKE\n    cpstrf_(UPLO, n, to_cptr(a), lda, piv, rank, tol, reinterpret_cast<float*>(work), info);\n#else\n\tcpstrf_(UPLO, n, a, lda, piv, rank, tol, work, info);\n#endif\n}\n\nSTATIC inline void pstrf_(const char * UPLO, integer *n,\n                          complex_real8 *a ,integer* lda, integer *piv, integer* rank,\n                          real8* tol, complex_real8* work , integer *info){\n#if MADNESS_LINALG_USE_LAPACKE\n    //zpstrf_(UPLO, n, to_zptr(a), lda, piv, rank, tol, to_cptr(work), info);\n    zpstrf_(UPLO, n, to_zptr(a), lda, piv, rank, tol, reinterpret_cast<double*>(work), info);\n#else\n\tzpstrf_(UPLO, n, a, lda, piv, rank, tol, work, info);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic triangular factor to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void getrf_(integer* m, integer* n, real4 *a, integer *lda,\n                          integer* ipiv, integer *info){\n    sgetrf_(m, n, a, lda, ipiv, info);\n}\n\nSTATIC inline void getrf_(integer* m, integer* n, real8 *a, integer *lda,\n                          integer* ipiv, integer *info){\n    dgetrf_(m, n, a, lda, ipiv, info);\n}\n\nSTATIC inline void getrf_(integer* m, integer* n, complex_real4 *a, integer *lda,\n                          integer* ipiv, integer *info){\n#if MADNESS_LINALG_USE_LAPACKE\n    cgetrf_(m, n, to_cptr(a), lda, ipiv, info);\n#else\n    cgetrf_(m, n, a, lda, ipiv, info);\n#endif\n}\n\nSTATIC inline void getrf_(integer* m, integer* n, complex_real8 *a, integer *lda,\n                          integer* ipiv, integer *info){\n#if MADNESS_LINALG_USE_LAPACKE\n    zgetrf_(m, n, to_zptr(a), lda, ipiv, info);\n#else\n    zgetrf_(m, n, a, lda, ipiv, info);\n#endif\n}\n\n/// These oddly-named wrappers enable the generic triangular inverse to get\n/// the correct LAPACK routine based upon the argument type. Internal\n/// use only.\n\nSTATIC inline void getri_(integer* n, real4 *a, integer *lda, integer* ipiv,\n                          real4 *work, integer *lwork, integer *info){\n    sgetri_(n, a, lda, ipiv, work, lwork, info);\n}\n\nSTATIC inline void getri_(integer* n, real8 *a, integer *lda, integer* ipiv,\n                          real8 *work, integer *lwork, integer *info){\n    dgetri_(n, a, lda, ipiv, work, lwork, info);\n}\n\nSTATIC inline void getri_(integer* n, complex_real4 *a, integer *lda, integer* ipiv,\n                          complex_real4 *work, integer *lwork, integer *info){\n#if MADNESS_LINALG_USE_LAPACKE\n    cgetri_(n, to_cptr(a), lda, ipiv, to_cptr(work), lwork, info);\n#else\n    cgetri_(n, a, lda, ipiv, work, lwork, info);\n#endif\n}\n\nSTATIC inline void getri_(integer* n, complex_real8 *a, integer *lda, integer* ipiv,\n                          complex_real8 *work, integer *lwork, integer *info){\n#if MADNESS_LINALG_USE_LAPACKE\n    zgetri_(n, to_zptr(a), lda, ipiv, to_zptr(work), lwork, info);\n#else\n    zgetri_(n, a, lda, ipiv, work, lwork, info);\n#endif\n}\n\nnamespace madness {\n\n    static void mask_info(integer& info) {\n        if ( (info&0xffffffff) == 0) info = 0;\n    }\n\n    /** \\brief   Compute the singluar value decomposition of an n-by-m matrix using *gesvd.\n\n    Returns via arguments U, s, VT where\n\n    A = U * diag(s) * VT    for A real\n    A = U * diag(s) * VH    for A complex\n\n    or\n\n    UT * A * V = diag(s)   for A real\n    UH * A * V = diag(s)   for A complex\n\n    If A is [m,n] and r=min(m,n) then we have U[m,r], s[r], and VT[r,n]\n\n    On failure, throws TensorException with value set to Lapack's info.\n    */\n    template <typename T>\n    void svd(const Tensor<T>& a, Tensor<T>& U,\n             Tensor< typename Tensor<T>::scalar_type >& s, Tensor<T>& VT) {\n        TENSOR_ASSERT(a.ndim() == 2, \"svd requires matrix\",a.ndim(),&a);\n        integer m = a.dim(0), n = a.dim(1), rmax = min<integer>(m,n);\n        integer lwork = max<integer>(3*min(m,n)+max(m,n),5*min(m,n)-4)*32;\n        integer info;\n        Tensor<T> A(copy(a)), work(lwork);\n\n        s = Tensor< typename Tensor<T>::scalar_type >(rmax);\n        U = Tensor<T>(m,rmax);\n        VT = Tensor<T>(rmax,n);\n        gesvd_(\"S\",\"S\", &n, &m, A.ptr(), &n, s.ptr(),\n                VT.ptr(), &n, U.ptr(), &rmax, work.ptr(), &lwork,\n                &info, (char_len) 1, (char_len) 1);\n\n        //std::cout << \"n \" << n << \" m \" << m << \" lwork \" << lwork << std::endl;\n\t//std::cout << sizeof(long) << \" \" << sizeof(int) << \" \" << sizeof(integer) << std::endl;\n\t//std::cout << sizeof(real4) << \" \" << sizeof(float)  << std::endl;\n        mask_info(info);\n\n        TENSOR_ASSERT(info == 0, \"svd: Lapack failed\", info, &a);\n    }\n\n    /// same as svd, but it optimizes away the tensor construction: a = U * diag(s) * VT\n\n    /// note that S and VT are swapped in the calling list for c/fortran consistency!\n    /// @param[in,out]\ta\ta (m,n) matrix to be svd'ed; upon return will hold VT\n    /// \t\t\t\t\tthe first min(m,n) rows of VT, stored rowwise\n    /// @param[in,out]\tU\tleft singular vectors, stored columnwise\n    /// @param[in,out]\ts\tthe singular values\n    /// @param[in,out]\tVT\tnot referenced\n    /// @param[in,out]\twork work array; optimial length lwork:\n    ///\t\t\t\t\t\tlwork = max<integer>(3*min(m,n)+max(m,n),5*min(m,n)-4)*32;\n    template <typename T>\n    void svd_result(Tensor<T>& a, Tensor<T>& U,\n             Tensor< typename Tensor<T>::scalar_type >& s, Tensor<T>& VT, Tensor<T>& work) {\n        TENSOR_ASSERT(a.ndim() == 2, \"svd requires matrix\",a.ndim(),&a);\n\n        integer m = a.dim(0), n = a.dim(1), rmax = min<integer>(m,n);\n//        integer lwork = max<integer>(3*min(m,n)+max(m,n),5*min(m,n)-4)*32;\n        integer lwork=work.size();\n        integer info;\n\n        // calling list is swapped\n        gesvd_(\"O\", \"S\", &n, &m, a.ptr(), &n, s.ptr(),\n                VT.ptr(), &n, U.ptr(), &rmax, work.ptr(), &lwork,\n                &info, (char_len) 1, (char_len) 1);\n\n        mask_info(info);\n\n        TENSOR_ASSERT(info == 0, \"svd: Lapack failed\", info, &a);\n    }\n\n    /** \\brief  Solve Ax = b for general A using the LAPACK *gesv routines.\n\n    A should be a square matrix (float, double, float_complex,\n    double_complex) and b should be either a vector, or a matrix with\n    each vector stored in a column (i.e., b[n,nrhs]).\n\n    If the LAPACK routine fails, it throws a TensorException with the\n    LAPACK info as the value.  Otherwise, it returns the solution(s).\n    The input A and b are unchanged.  There is no need to worry about\n    Python/C/Fortran ordering issues.  It will solve Ax=b as written.\n    */\n    template <typename T>\n    void gesv(const Tensor<T>& a, const Tensor<T>& b, Tensor<T>& x) {\n        TENSOR_ASSERT(a.ndim() == 2, \"gesv requires matrix\",a.ndim(),&a);\n        integer n = a.dim(0), m = a.dim(1), nrhs = b.dim(1);\n        TENSOR_ASSERT(m == n, \"gesv requires square matrix\",0,&a);\n        TENSOR_ASSERT(b.ndim() <= 2, \"gesv require a vector or matrix for the RHS\",b.ndim(),&b);\n        TENSOR_ASSERT(a.dim(0) == b.dim(0), \"gesv matrix and RHS must conform\",b.ndim(),&b);\n\n        // The input matrix & vectors are destroyed by gesv and we also need Fortran order\n        Tensor<T> AT = transpose(a);\n        if (b.ndim() == 1)\n            x = copy(b);\n        else\n            x = transpose(b);\n\n        Tensor<integer> piv(n);\n        integer info;\n\n        // note overriding of dgesv for other types above\n        gesv_(&n, &nrhs, AT.ptr(), &n, piv.ptr(), x.ptr(), &n, &info);\n        mask_info(info);\n\n        TENSOR_ASSERT((info == 0), \"gesv failed\", info, &a);\n\n        if (b.ndim() == 2) x = transpose(x);\n    }\n\n    /// invert general square matrix A\n    template<typename T>\n    Tensor<T> inverse(const Tensor<T>& a_in) {\n        Tensor<T> a=copy(a_in);\n        TENSOR_ASSERT(a.ndim() == 2, \"inverse requires matrix\",a.ndim(),&a);\n        TENSOR_ASSERT(a.dim(0) == a.dim(1), \"inverse requires square matrix\",a.ndim(),&a);\n        integer n = a.dim(0);;\n\n        Tensor<integer> ipiv(n);\n        integer info;\n\n        // DGETRF computes an LU factorization of a general M-by-N matrix A\n        // using partial pivoting with row interchanges.\n        getrf_(&n,&n,a.ptr(),&n,ipiv.ptr(),&info);\n\n        // DGETRI computes the inverse of a matrix using the LU factorization\n        // computed by DGETRF.\n        integer lwork=(10*n);\n        Tensor<T> work(lwork);\n        getri_(&n,a.ptr(),&n,ipiv.ptr(),work.ptr(),&lwork,&info);\n\n        mask_info(info);\n        TENSOR_ASSERT((info == 0), \"inverse failed\", info, &a);\n        return a;\n    }\n\n    /** \\brief  Solve Ax = b for general A using the LAPACK *gelss routines.\n\n    A should be a matrix (float, double, float_complex,\n    double_complex) and b should be either a vector, or a matrix with\n    each vector stored in a column (i.e., b[n,nrhs]).\n\n    If the LAPACK routine fails, it throws a TensorException with the\n    LAPACK info as the value.  Otherwise, it returns the solution(s).\n    The input A and b are unchanged.  There is no need to worry about\n    Python/C/Fortran ordering issues.  It will solve Ax=b as written.\n\n    This from the LAPACK documentation\n    \\verbatim\n    RCOND   (input) REAL\n    RCOND is used to determine the effective  rank  of A.\n    Singular values S(i) <= RCOND*S(1) are treated\n    as zero.  If RCOND < 0, machine precision is  used\n    instead.\n\n    RANK    (output) INTEGER\n    The  effective rank of A, i.e., the number of singular\n    values which are greater than RCOND*S(1).\n    \\endverbatim\n\n    Finally, the optional vector sumsq will store the sum-of-squares\n    residual in the case of a rectangular matrix (least squares regression).\n    */\n    template <typename T>\n    void gelss(const Tensor<T>& a, const Tensor<T>& b, double rcond,\n               Tensor<T>& x, Tensor< typename Tensor<T>::scalar_type >& s,\n               long& rank, Tensor<typename Tensor<T>::scalar_type>& sumsq) {\n        TENSOR_ASSERT(a.ndim() == 2, \"gelss requires matrix\",a.ndim(),&a);\n        integer m = a.dim(0), n = a.dim(1), nrhs = b.dim(1);\n        TENSOR_ASSERT(b.ndim() <= 2, \"gelss require a vector or matrix for the RHS\",b.ndim(),&b);\n        TENSOR_ASSERT(a.dim(0) == b.dim(0), \"gelss matrix and RHS must conform\",b.ndim(),&b);\n\n        // The input matrix & vectors are destroyed by gelss and we also need Fortran order\n        integer maxmn = max(m, n);\n        Tensor<T> AT = transpose(a);\n        Tensor<T> lapack_inout;\n\n        if (b.ndim() == 1)\n            lapack_inout = copy(b);\n        else {\n            if (m >= n)\n                lapack_inout = transpose(b);\n            else {\n                // dgelss_ uses the same physical array for both b (input) and\n                // x (output).  for a rectangular matrix A with more columns,\n                // b is a smaller array than x, and the data needs to be\n                // manipulated (more than just a transpose) to make it work\n                // with LAPACK\n                lapack_inout = Tensor<T>(nrhs, maxmn);\n                lapack_inout(Slice(0, nrhs-1), Slice(0, m-1)) =\n                    transpose(b);\n            }\n        }\n\n        integer lwork=(3*min(m,n)+max(max(2*min(m,n),maxmn),nrhs))*32;\n        Tensor<T> work(lwork);\n        typedef typename TensorTypeData<T>::scalar_type scalar_type;\n        s = Tensor< scalar_type >(n);\n        integer info;\n        scalar_type rrcond = rcond;\n        integer rrank=0;\n\n        gelss_(&m, &n, &nrhs, AT.ptr(), &m, lapack_inout.ptr(), &maxmn,\n                s.ptr(), &rrcond, &rrank, work.ptr(), &lwork, &info);\n        mask_info(info);\n        TENSOR_ASSERT(info == 0, \"gelss failed\", info, &a);\n\n        rank = rrank;\n\n        if(m > n) {\n            // have a similar problem where the lapack_inout tensor is padded\n            // the padding gives information on the fit\n\n            // get the sum-of-squares for the various fits\n            sumsq = Tensor<scalar_type>(nrhs);\n            if(nrhs == 1) {\n                sumsq[0] = lapack_inout(Slice(n, m-1)).normf();\n            }\n            else {\n                for(integer i = 0; i < nrhs; ++i) {\n                    sumsq[i] =\n                        lapack_inout(Slice(i, i), Slice(n, m-1)).normf();\n                }\n            }\n\n            if(b.ndim() == 1)\n                x = lapack_inout(Slice(0,n-1));\n            else\n                x = transpose(lapack_inout(Slice(0,nrhs-1), Slice(0, n-1)));\n        }\n        else if(b.ndim() == 2)\n            x = transpose(lapack_inout);\n        else\n            x = lapack_inout;\n    }\n\n    /** \\brief   Real-symmetric or complex-Hermitian eigenproblem.\n\n    A is a real symmetric or complex Hermitian matrix.  Return V and e\n    where V is a matrix whose columns are the eigenvectors and e is a\n    vector containing the corresponding eigenvalues.  If the LAPACK\n    routine fails, it raises a TensorException with value=infor.  The\n    input matrix is unchanged.  The eigenvalues are sorted into ascending\n    order.  s/dsyev are used for real symmetric matrices; c/zheev are used\n    for complex Hermitian.\n\n    The results will satisfy A*V(_,i) = V(_,i)*e(i).\n    */\n    template <typename T>\n    void syev(const Tensor<T>& A,\n              Tensor<T>& V, Tensor< typename Tensor<T>::scalar_type >& e) {\n        TENSOR_ASSERT(A.ndim() == 2, \"syev requires a matrix\",A.ndim(),&A);\n        TENSOR_ASSERT(A.dim(0) == A.dim(1), \"syev requires square matrix\",0,&A);\n        integer n = A.dim(0);\n        integer lwork = max(max((integer) 1,(integer) (3*n-1)),(integer) (34*n));\n        integer info;\n        Tensor<T> work(lwork);\n        V = transpose(A);\t\t// For Hermitian case\n        e = Tensor<typename Tensor<T>::scalar_type>(n);\n        syev_(\"V\", \"U\", &n, V.ptr(), &n, e.ptr(), work.ptr(), &lwork, &info,\n               (char_len) 1, (char_len) 1);\n\n        mask_info(info);\n        TENSOR_ASSERT(info == 0, \"(s/d)syev/(c/z)heev failed\", info, &A);\n        V = transpose(V);\n    }\n\n    /** \\brief   Real non-symmetric or complex non-Hermitian eigenproblem.\n\n    A is a real non-symmetric or complex non-Hermitian matrix.  Return V and e\n    where V is a matrix whose columns are the right eigenvectors and e is a\n    vector containing the corresponding eigenvalues.  If the LAPACK\n    routine fails, it raises a TensorException with value=infor.  The\n    input matrix is unchanged.  The eigenvalues are sorted into ascending\n    order.  s/dgeev are used for real non-symmetric matrices; c/zgeev are used\n    for complex non-Hermitian.\n\n    Note on the eigenvectors:\n          If the j-th eigenvalue is real, then j-th eigenvector is VR(:,j),\n          the j-th column of VR.\n          If the j-th and (j+1)-st eigenvalues form a complex\n          conjugate pair, then j-th eigenvector is VR(:,j) + i*VR(:,j+1) and\n          j+1-th eigenvector is VR(:,j) - i*VR(:,j+1).\n\n    The results will satisfy A*V(_,i) = V(_,i)*e(i).\n    */\n    // Might not work if A is complex (type issues on tensor e)\n    template <typename T>\n    void geev(const Tensor<T>& A, Tensor<T>& VR, Tensor<std::complex<T>>& e) {\n        TENSOR_ASSERT(A.ndim() == 2, \"geev requires a matrix\",A.ndim(),&A);\n        TENSOR_ASSERT(A.dim(0) == A.dim(1), \"geev requires square matrix\",0,&A);\n        integer n = A.dim(0);\n        integer lwork = max(max((integer) 1,(integer) (3*n)),(integer) (34*n));\n        integer info;\n        Tensor<T> work(lwork);\n        Tensor<T> A_copy = copy(A);\n        Tensor<T> VL(n,n); // Should not be referenced\n        Tensor<T> e_real(n), e_imag(n);\n        geev_(\"N\", \"V\", &n, A_copy.ptr(), &n, e_real.ptr(), e_imag.ptr(), VL.ptr(), &n,\n               VR.ptr(), &n,  work.ptr(), &lwork, &info, (char_len) 1, (char_len) 1);\n        mask_info(info);\n        TENSOR_ASSERT(info == 0, \"(s/d)geev/(c/z)geev failed\", info, &A);\n\n        // Now put energies back where user expects them to be\n        std::complex<double> my_i(0,1);\n        e = e_real + e_imag * my_i;\n    }\n\n    /** \\brief  Generalized real-symmetric or complex-Hermitian eigenproblem.\n\n    This from the LAPACK documentation\n\n    \\verbatim\n    S/DSYGV computes all the eigenvalues, and optionally, the eigenvectors\n    of a real generalized symmetric-definite eigenproblem, of the form\n    A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.  Here A and B\n    are assumed to be symmetric and B is also positive definite.\n\n    C/ZHEGV computes all the eigenvalues, and optionally, the eigenvectors\n    of a complex generalized Hermitian-definite eigenproblem, of the form\n    A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and B\n    are assumed to be Hermitian and B is also positive definite.\n\n    ITYPE   (input) INTEGER\n    Specifies the problem type to be solved:\n    = 1:  A*x = (lambda)*B*x\n    = 2:  A*B*x = (lambda)*x\n    = 3:  B*A*x = (lambda)*x\n    \\endverbatim\n\n    */\n    template <typename T>\n    void sygv(const Tensor<T>& A, const Tensor<T>& B, int itype,\n              Tensor<T>& V, Tensor< typename Tensor<T>::scalar_type >& e) {\n        TENSOR_ASSERT(A.ndim() == 2, \"sygv requires a matrix\",A.ndim(),&A);\n        TENSOR_ASSERT(A.dim(0) == A.dim(1), \"sygv requires square matrix\",0,&A);\n        TENSOR_ASSERT(B.ndim() == 2, \"sygv requires a matrix\",B.ndim(),&A);\n        TENSOR_ASSERT(B.dim(0) == B.dim(1), \"sygv requires square matrix\",0,&A);\n        integer ity = itype;\n        integer n = A.dim(0);\n        integer lwork = max((integer)1,(integer)(3*n-1))*32;\n        integer info;\n        Tensor<T> work(lwork);\n        Tensor<T> b = transpose(B);\t// For Hermitian case\n        V = transpose(A);\t\t// For Hermitian case\n        e = Tensor<typename Tensor<T>::scalar_type>(n);\n        sygv_(&ity, \"V\", \"U\", &n, V.ptr(), &n, b.ptr(), &n,\n               e.ptr(), work.ptr(), &lwork, &info,\n               (char_len) 1, (char_len) 1);\n        mask_info(info);\n        TENSOR_ASSERT(info == 0, \"sygv/hegv failed\", info, &A);\n        V = transpose(V);\n    }\n\n    /** \\brief  Generalized real-non-symmetric or complex-non-Hermitian eigenproblem.\n\n    This from the LAPACK documentation\n\n    \\verbatim\n    S/DGGEV computes all the eigenvalues, and optionally, the eigenvectors\n    of a real generalized non-symmetric-definite eigenproblem, of the form\n    A*x=(lambda)*B*x.\n\n    C/ZGGEV computes all the eigenvalues, and optionally, the eigenvectors\n    of a complex generalized non-Hermitian-definite eigenproblem, of the form\n    A*x=(lambda)*B*x.\n    \\endverbatim\n\n       Note on the eigenvalues:\n          On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will\n          be the generalized eigenvalues.  If ALPHAI(j) is zero, then\n          the j-th eigenvalue is real; if positive, then the j-th and\n          (j+1)-st eigenvalues are a complex conjugate pair, with\n          ALPHAI(j+1) negative.\n\n          Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)\n          may easily over- or underflow, and BETA(j) may even be zero.\n          Thus, the user should avoid naively computing the ratio\n          alpha/beta.  However, ALPHAR and ALPHAI will be always less\n          than and usually comparable with norm(A) in magnitude, and\n          BETA always less than and usually comparable with norm(B).\n\n      Note on the eigenvectors:\n          The right eigenvectors v(j) are stored one\n          after another in the columns of VR, in the same order as\n          their eigenvalues. If the j-th eigenvalue is real, then\n          v(j) = VR(:,j), the j-th column of VR. If the j-th and\n          (j+1)-th eigenvalues form a complex conjugate pair, then\n          v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1).\n          Each eigenvector is scaled so the largest component has\n          abs(real part)+abs(imag. part)=1.\n\n    */\n    // Might not work if A is complex (type issues on tensor e)\n    template <typename T>\n    void ggev(const Tensor<T>& A, Tensor<T>& B, Tensor<T>& VR,\n              Tensor<std::complex<T>>& e) {\n        TENSOR_ASSERT(A.ndim() == 2, \"ggev requires a matrix\",A.ndim(),&A);\n        TENSOR_ASSERT(A.dim(0) == A.dim(1), \"ggev requires square matrix\",0,&A);\n        TENSOR_ASSERT(B.ndim() == 2, \"ggev requires a matrix\",B.ndim(),&A);\n        TENSOR_ASSERT(B.dim(0) == B.dim(1), \"ggev requires square matrix\",0,&A);\n        integer n = A.dim(0);\n        integer lwork = max(max((integer) 1,(integer) (3*n)),(integer) (34*n));\n        integer info;\n        Tensor<T> work(lwork);\n        Tensor<T> A_copy = copy(A);\n        Tensor<T> VL(n,n); // Should not be referenced\n        Tensor<T> e_real(n), e_imag(n), beta(n);\n        ggev_(\"N\", \"V\", &n,\n                A_copy.ptr(), &n, B.ptr(), &n,\n                e_real.ptr(), e_imag.ptr(), beta.ptr(),\n                VL.ptr(), &n, VR.ptr(), &n,\n                work.ptr(), &lwork, &info,\n                (char_len) 1, (char_len) 1);\n        mask_info(info);\n        TENSOR_ASSERT(info == 0, \"(s/d)ggev/(c/z)ggev failed\", info, &A);\n\n        // Sometimes useful\n        //print(\"e_real:\\n\", e_real);\n        //print(\"e_imag:\\n\", e_imag);\n        //print(\"beta:\\n\", beta);\n\n        // Now put energies back where user expects them to be\n        // Need to be smart with the division, possibly throw\n        // errors if neccessary.\n        std::complex<double> my_i(0,1);\n        for(int i = 0; i < e.dim(0); i++)\n        {\n           MADNESS_ASSERT(beta(i) >=  1e-14); // Do something smarter here?\n           // Two cases:\n           // Case 1: Real value (imaginary == 0)\n           if(e_imag(i) == 0.0)\n              e(i) = e_real(i) / beta(i);\n           // Case 2: Complex value (need to handle the pair)\n           else\n           {\n              e(i) = (e_real(i) + my_i * e_imag(i)) / beta(i);\n              e(i+1) = (e_real(i) - my_i * e_imag(i)) / beta(i);\n              i = i + 1; // Already took care of the paired value as well\n           }\n        }\n        VR = transpose(VR);\n    }\n\n    /** \\brief  Compute the Cholesky factorization.\n\n    Compute the Cholesky factorization of the symmetric positive definite matrix A\n\n    For memory efficiency A is modified inplace.  Its upper\n    triangle will hold the result and the lower trianlge will be\n    zeroed such that input = inner(transpose(output),output).\n\n    */\n    template <typename T>\n    void cholesky(Tensor<T>& A) {\n        integer n = A.dim(0);\n        integer info;\n\n        potrf_(\"L\", &n, A.ptr(), &n, &info);\n\n        mask_info(info);\n        TENSOR_ASSERT(info == 0, \"cholesky: Lapack failed\", info, &A);\n\n        for (int i=0; i<n; ++i)\n            for (int j=0; j<i; ++j)\n                A(i,j) = 0.0;\n    }\n\n    /** \\brief  Compute the rank-revealing Cholesky factorization.\n\n    Compute the rank-revealing Cholesky factorization of the symmetric positive definite matrix A\n\n    For memory efficiency A is modified inplace.  Its upper\n    triangle will hold the result and the lower triangle will be\n    zeroed such that input = inner(transpose(output),output).\n\n    @param[in]\tA\tthe positive-semidefinite matrix to be decomposed\n    @param[in]\ttol\tlinear dependency threshold for discarding columns of A\n    @param[in]\tpiv\tpivot vector, its 1-rank entries are the orthogonal vectors\n    @param[in]\trank\tnumerical rank of A (wrt tol)\n\n    */\n    template <typename T>\n    void rr_cholesky(Tensor<T>& A, typename Tensor<T>::scalar_type tol, Tensor<integer>& piv, int& rank) {\n    \tinteger n = A.dim(0);\n    \tinteger info;\n    \tpiv=Tensor<integer>(n);\n    \tTensor<T> work(2*n);\n\n    \tinteger irank = 0;\n    \tpstrf_(\"L\", &n, A.ptr(), &n, piv.ptr(), &irank, &tol, work.ptr(), &info);\n    \trank = static_cast<int>(irank);\n\n    \t// note:\n    \t// info=0: Cholesky decomposition suceeded with full rank\n    \t// info>0: indicates a rank-deficient A, which is not failure!\n    \t// info<0: faulty input parameter\n    \tmask_info(info);\n    \tTENSOR_ASSERT(info >= 0, \"rr_cholesky: Lapack failed\", info, &A);\n\n    \tfor (int i=0; i<n; ++i)\n    \t\tfor (int j=0; j<i; ++j)\n    \t\t\tA(i,j) = 0.0;\n    \t// turn piv into c numbering\n    \tfor (int i=0; i<n; ++i) piv[i]--;\n    }\n\n\n\n    /** \\brief  Compute the QR factorization.\n\n\tQ is returned in the lapack-specific format\n\n    */\n    template<typename T>\n    void geqp3(Tensor<T>& A, Tensor<T>& tau, Tensor<integer>& jpvt) {\n\n    \tTENSOR_ASSERT(A.ndim() == 2, \"geqp requires a matrix\",A.ndim(),&A);\n\n    \tA=transpose(A);\n    \tinteger m=A.dim(0);\n    \tinteger n=A.dim(1);\n    \tjpvt=Tensor<integer>(n);\n    \ttau=Tensor<T>(std::min(n,m));\n    \tinteger lwork=2*n+(n+1)*64;\n    \tTensor<T> work(lwork);\n    \tgeqp3_result(A,tau,jpvt,work);\n    \tA=transpose(A);\n    }\n\n    template<typename T>\n    void geqp3_result(Tensor<T>& A, Tensor<T>& tau, Tensor<integer>& jpvt,\n    \t\tTensor<T>& work) {\n    \tinteger m=A.dim(0);\n    \tinteger n=A.dim(1);\n    \tinteger lwork=work.size();\n    \tinteger info;\n\n//    \tdgeqp3(M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO);\n    \tstd::cout << jpvt[0] << std::endl;\n    \tgeqp3_(&m, &n, A.ptr(), &m, jpvt.ptr(), tau.ptr(), work.ptr(),\n    \t\t\t&lwork, &info);\n    \tstd::cout << jpvt[0] << std::endl;\n        mask_info(info);\n        TENSOR_ASSERT(info == 0, \"dgeqp3: Lapack failed\", info, &A);\n    }\n\n    /// compute the QR decomposition of the matrix A\n\n    /// @param[in,out]\tA\ton entry the (n,m) matrix to be decomposed\n    ///\t\t\t\t\t\ton exit the Q matrix\n    /// @param[out]\t\tR\tthe (n,n) matrix R (square form)\n    template<typename T>\n    void qr(Tensor<T>& A, Tensor<T>& R) {\n    \tTENSOR_ASSERT(A.ndim() == 2, \"qr requires a matrix\",A.ndim(),&A);\n    \tinteger m=A.dim(0);\n    \tinteger n=A.dim(1);\n    \tTensor<T> tau(std::min(n,m));\n    \tinteger lwork=2*n+(n+1)*64;\n    \tTensor<T> work(lwork);\n\n        integer r_rows=std::min(m,n);\n        integer r_cols=n;\n        R=Tensor<T>(r_rows,r_cols);\n\n        A=transpose(A);\n    \tlq_result(A,R,tau,work,true);\n\n    \tA=transpose(A);\n    }\n\n    /// compute the LQ decomposition of the matrix A = L Q\n\n    /// @param[in,out]\tA\ton entry the (n,m) matrix to be decomposed\n    ///\t\t\t\t\t\ton exit the Q matrix\n    /// @param[out]\t\tR\tthe (n,n) matrix L (square form) \\todo MGR: Check this.\n    template<typename T>\n    void lq(Tensor<T>& A, Tensor<T>& R) {\n    \tTENSOR_ASSERT(A.ndim() == 2, \"lq requires a matrix\",A.ndim(),&A);\n\n    \tinteger m=A.dim(0);\n    \tinteger n=A.dim(1);\n    \tTensor<T> tau(std::min(n,m));\n    \tinteger lwork=2*n+(n+1)*64;\n    \tTensor<T> work(lwork);\n\n        integer r_rows=std::min(m,n);\n        integer r_cols=m;\n        R=Tensor<T>(r_cols,r_rows);\n\n    \tlq_result(A,R,tau,work,false);\n    }\n\n    /// compute the LQ decomposition of the matrix A = L Q\n\n    /// @param[in,out]\tA\ton entry the (n,m) matrix to be decomposed\n    ///\t\t\t\t\t\ton exit the Q matrix\n    /// @param[in,out]\tR\tthe (n,n) matrix L (square form) \\todo MGR: Check this.\n    /// @param[in]      do_qr   do QR instead of LQ\n    template<typename T>\n    void lq_result(Tensor<T>& A, Tensor<T>& R, Tensor<T>& tau, Tensor<T>& work,\n    \t\tbool do_qr) {\n    \tTENSOR_ASSERT(A.ndim() == 2, \"lq requires a matrix\",A.ndim(),&A);\n\n    \tinteger m=A.dim(1);\t\t// -- use transpose(A)\n    \tinteger n=A.dim(0);\n    \tinteger lwork=work.size();\n    \tinteger info;\n\n    \tgeqrf_(&m, &n, A.ptr(), &m, tau.ptr(), work.ptr(),\n    \t\t\t&lwork, &info);\n        mask_info(info);\n        TENSOR_ASSERT(info == 0, \"dgeqrf_: Lapack failed\", info, &A);\n\n    \t// reconstruction of R\t -- use transpose(A)\n        integer r_rows= (m>=n) ? n : m;\n        integer r_cols=n;\n\t\tif (do_qr) {\n//\t\t\tR=Tensor<T>(r_rows,r_cols);\n\t        TENSOR_ASSERT(r_rows==R.dim(0),\"confused dimensions 0\",r_rows,&R);\n\t        TENSOR_ASSERT(r_cols==R.dim(1),\"confused dimensions 1\",r_cols,&R);\n\t\t\tfor (int i=0; i<r_rows; ++i) {\n\t\t\t\tfor (int j=i; j<r_cols; ++j) {\n\t\t\t\t\tR(i,j)=A(j,i);\t// <- transpose(A)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//R=Tensor<T>(r_cols,r_rows);\n            TENSOR_ASSERT(r_rows==R.dim(1),\"confused dimensions 1\",r_rows,&R);\n            TENSOR_ASSERT(r_cols==R.dim(0),\"confused dimensions 0\",r_cols,&R);\n\t\t\tfor (int i=0; i<r_rows; ++i) {\n\t\t\t\tfor (int j=i; j<r_cols; ++j) {\n\t\t\t\t\tR(j,i)=A(j,i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// reconstruction of Q\n    \tinteger k=std::min(m,n);//tau.size(); // size of tau is tau(min(m,n))\n    \tinteger q_rows=m;\n    \tinteger q_cols= (m>=n) ? n : m;\n    \torgqr_(&q_rows, &q_cols, &k, A.ptr(), &q_rows, const_cast<T*>(tau.ptr()),\n    \t\t\twork.ptr(), &lwork, &info);\n    \tA=A(Slice(0,q_cols-1),Slice(0,q_rows-1));\t// -- use transpose(A)\n        mask_info(info);\n        TENSOR_ASSERT(info == 0, \"dorgqr_: Lapack failed\", info, &A);\n\n    }\n\n\n    /// reconstruct the orthogonal matrix Q (e.g. from QR factorization)\n\n    /// @param[in,out]\tA\n    ///    On entry, the i-th column must contain the vector which\n    ///    defines the elementary reflector H(i), for i = 1,2,...,k, as\n    ///    returned by DGEQRF in the first k columns of its array\n    ///    argument A.\n    ///    On exit, the M-by-N matrix Q.\n    /// @param[in]\ttau\n    ///\t   TAU(i) must contain the scalar factor of the elementary\n    ///    reflector H(i), as returned by DGEQRF.\n    template<typename T>\n    void orgqr(Tensor<T>& A, const Tensor<T>& tau) {\n    \tA=transpose(A);\n    \tinteger n=A.dim(0);\n    \tinteger m=A.dim(1);\n    \tinteger k=tau.size();\n    \tinteger lwork=64*n;\n    \tTensor<T> work(lwork);\n    \tinteger info;\n    \torgqr_(&m, &n, &k, A.ptr(), &m, const_cast<T*>(tau.ptr()),\n    \t\t\twork.ptr(), &lwork, &info);\n        mask_info(info);\n    \tA=transpose(A);\n        TENSOR_ASSERT(info == 0, \"xorgqr: Lapack failed\", info, &A);\n    }\n\n\n//     template <typename T>\n//     void triangular_solve(const Tensor<T>& L, Tensor<T>& B, const char* side, const char* transa) {\n//         integer n = L.dim(0);  // ????\n//         integer m = L.dim(1);\n//         double one = 1.0;\n//         integer lda = n; // ???\n//         integer ldb = m; //???\n\n//         dtrsm(side, \"L\", transa, \"N\", m, n, one, L.ptr(), lda, B.ptr, ldb, 1, 1, 1, 1);\n//     }\n\n\n    // This stupidity since current defn of conj_tranpose() only\n    // takes complex types ... was that a sensible design choice?\n    STATIC Tensor<float> my_conj_transpose(Tensor<float> a) {\n        return transpose(a);\n    }\n    STATIC Tensor<double> my_conj_transpose(Tensor<double> a) {\n        return transpose(a);\n    }\n    STATIC Tensor<float_complex> my_conj_transpose(Tensor<float_complex> a) {\n        return conj_transpose(a);\n    }\n    STATIC Tensor<double_complex> my_conj_transpose(Tensor<double_complex> a) {\n        return conj_transpose(a);\n    }\n\n\n\n    /// Example and test code for interface to LAPACK SVD interfae\n    template <typename T>\n    double test_svd(int n, int m) {\n        Tensor<T> a(n,m), U, VT;\n        typedef typename TensorTypeData<T>::scalar_type scalar_type;\n        Tensor<scalar_type> s;\n\n        a.fillrandom();\n        svd(a,U,s,VT);\n\n        long rank = s.dim(0);\n        Tensor<T> b(n,m);\n        for (long i=0; i<n; ++i)\n            for (long j=0; j<m; ++j)\n                for (long k=0; k<rank; ++k)\n                    b(i,j) += U(i,k) * T(s(k)) * VT(k,j);\n\n        b -= a;\n\n        return b.absmax();\n    }\n\n    /// Example and test code for interface to LAPACK SVD interfae\n    template <typename T>\n    double test_inverse(int n) {\n        Tensor<T> A(n,n);\n\n        A.fillrandom();\n        Tensor<T> Ainv=inverse(A);\n        Tensor<T> id1=inner(A,Ainv);\n        Tensor<T> id2=inner(Ainv,A);\n\n        for (int i=0; i<n; ++i) {\n            id1(i,i)-=1.0;\n            id2(i,i)-=1.0;\n        }\n\n        double error1=id1.normf()/id1.size();\n        double error2=id2.normf()/id2.size();\n\n        return error1+error2;\n    }\n\n    template <typename T>\n    double test_gesv(int n, int nrhs) {\n        Tensor<T> a(n,n), b1(n), b(n,nrhs), x1, x;\n\n        a.fillrandom();\n        b1.fillrandom();\n        b.fillrandom();\n\n        gesv(a,b,x);\n        gesv(a,b1,x1);\n\n        double err = 0;\n        err = (inner(a,x)-b).normf() + (inner(a,x1)-b1).normf();\n        return err;\n    }\n    template <typename T>\n    double test_syev(int n) {\n        Tensor<T> a(n,n), V;\n        Tensor< typename Tensor<T>::scalar_type > e;\n        a.fillrandom();\n        //a += madness::my_conj_transpose(a);\n        a += madness::transpose(a);\n        syev(a,V,e);\n        double err = 0.0;\n        for (int i=0; i<n; ++i) {\n            err = max(err,(double) (inner(a,V(_,i)) - V(_,i)*e(i)).normf());\n          //err = max(err,(double) (inner(a,V(_,i)) - V(_,i)*((T) e(i))).normf());\n        }\n        return err;\n    }\n\n    template <typename T>\n    double test_gelss(int n, int nrhs) {\n        Tensor<T> a(n,n), b1(n), b(n,nrhs), x1, x;\n        Tensor< typename Tensor<T>::scalar_type > s, sumsq;\n        long rank;\n\n        a.fillrandom();\n        b1.fillrandom();\n        b.fillrandom();\n\n        gelss(a,b,1e-5,x,s,rank,sumsq);\n        gelss(a,b1,1e-5,x1,s,rank,sumsq);\n\n        return (inner(a,x)-b).normf() + (inner(a,x1)-b1).normf();\n    }\n\n    template <typename T>\n    double test_sygv(int n) {\n        Tensor<T> a(n,n), V, b(n,n);\n        Tensor< typename Tensor<T>::scalar_type > e;\n\n        a.fillrandom();\n        b.fillrandom();\n        a += madness::my_conj_transpose(a);\n        b += madness::my_conj_transpose(b);\n\n        for (int i=0; i<n; ++i) b(i,i) = 2*n;\t// To make pos-def\n        sygv(a,b,1,V,e);\n        double err = 0.0;\n        for (int i=0; i<n; ++i) {\n            err = max(err,(double) (inner(a,V(_,i)) - inner(b,V(_,i))*(T) e(i)).normf());\n        }\n        return err;\n    }\n\n    template <typename T>\n    double test_cholesky(int n) {\n        Tensor<T> a(n,n);\n        a.fillrandom();\n        a += madness::my_conj_transpose(a);\n        for (int i=0; i<n; ++i) a(i,i) += n;\n\n        Tensor<T> aa = copy(a);\n        cholesky(a);\n        Tensor<T> LLT = inner(my_conj_transpose(a),a);\n        return (LLT - aa).normf()/n;\n    }\n\n    template <typename T>\n    double test_rr_cholesky(int n) {\n        Tensor<T> a(n,n);\n        a.fillrandom();\n        a += madness::my_conj_transpose(a);\n        for (int i=0; i<n; ++i) a(i,i) += n;\n\n\n\n\n        Tensor<T> aa = copy(a);\n        Tensor<integer> piv;\n        int rank;\n        rr_cholesky(a,0.0,piv,rank);\n        Tensor<T> LLT = inner(my_conj_transpose(a),a);\n\n        // not the fastest way but easy to read\n\n        // make pivoting matrix\n        Tensor<typename Tensor<T>::scalar_type> P(n,n);\n        for(int i=0;i<n;++i){\n        \tP(piv(i),i)=1.0;\n        }\n\n        // make aap\n        aa=inner(aa,P,1,0);\n        // make Pt(aa)P\n        Tensor<typename Tensor<T>::scalar_type> Pt=transpose(P);\n        aa=inner(Pt,aa);\n\n        return (LLT - aa).normf()/n;\n    }\n\n    template <typename T>\n    double test_qr() {\n\n\t\tTensor<T> R;\n\t\tdouble error=0.0;\n\n\t\t// test QR and LQ with random dimensions\n\t\tfor (int i=0; i<20; ++i) {\n\t\t\tmadness::Random(100);\n\t\t\tint n= (madness::RandomValue<long>() % 4) + 2;\n\t\t\tint m= (madness::RandomValue<long>() % 3) + 3;\n\n\t\t\t{\t// QR\n\t\t\t\tTensor<T> AA(n,m);\n\t\t\t\tAA.fillrandom();\n\t\t\t\tTensor<T> A=copy(AA);\n\t\t\t\tqr(A,R);\n\t\t\t\tTensor<T> A_reconstructed=inner(A,R);\n\t\t\t\tdouble err1=(AA-A_reconstructed).normf();\n\t\t\t\tstd::cout << \"test QR: n, m, error\" << \" \" << n << \" \" << m\n\t\t\t\t\t\t << \" \" << err1 << std::endl;;\n\t\t\t\terror+=err1;\n\t\t\t}\n\n\t\t\t{\t// LQ\n\t\t\t\tTensor<T> AA(n,m);\n\t\t\t\tAA.fillrandom();\n\t\t\t\tTensor<T> A=copy(AA);\n\t\t\t\tlq(A,R);\n\t\t\t\tTensor<T> A_reconstructed=inner(R,A);\n\t\t\t\tdouble err1=(AA-A_reconstructed).normf();\n\t\t\t\tstd::cout << \"test LQ: n, m, error\" << \" \" << n << \" \" << m\n\t\t\t\t\t\t << \" \" << err1 << std::endl;;\n\t\t\t\terror+=err1;\n\t\t\t}\n\t\t}\n\t\treturn error;\n    }\n\n\n    void init_tensor_lapack() {\n\tchar e[] = \"e\";\n#if MADNESS_LINALG_USE_LAPACKE\n    dlamch(e);\n\tslamch(e);\n#else\n\tdlamch_(e,1);\n\tslamch_(e,1);\n#endif\n\n// \tchar modes[] = \"esbpnrmulo\";\n// \tfor (int i=0; i<10; ++i) {\n// \t    cout << \"init_tensor_lapack: dlamch: \" << modes[i] << \" = \" << dlamch_(modes+i,1) << endl;\n// \t}\n    }\n\n\n    /// Test the Tensor-LAPACK interface ... currently always returns true!\n    bool test_tensor_lapack() {\n        try {\n            cout << \"error in float svd \" << test_svd<float>(20,30) << endl;\n            cout << \"error in double svd \" << test_svd<double>(30,20) << endl;\n            cout << \"error in float_complex svd \" << test_svd<float_complex>(23,27) << endl;\n            cout << \"error in double_complex svd \" << test_svd<double_complex>(37,19) << endl;\n            cout << endl;\n\n            cout << \"error in float  gelss \" << test_gelss<float>(20,30) << endl;\n            cout << \"error in double gelss \" << test_gelss<double>(30,20) << endl;\n            cout << \"error in float_complex gelss \" << test_gelss<float_complex>(23,27) << endl;\n            cout << \"error in double_complex gelss \" << test_gelss<double_complex>(37,19) << endl;\n            cout << endl;\n\n            cout << \"error in double syev \" << test_syev<double>(21) << endl;\n            cout << \"error in float syev \" << test_syev<float>(21) << endl;\n            cout << \"error in float_complex syev \" << test_syev<float_complex>(21) << endl;\n            cout << \"error in double_complex syev \" << test_syev<double_complex>(21) << endl;\n            cout << endl;\n\n            cout << \"error in float sygv \" << test_sygv<float>(20) << endl;\n            cout << \"error in double sygv \" << test_sygv<double>(20) << endl;\n            cout << \"error in float_complex sygv \" << test_sygv<float_complex>(23) << endl;\n            cout << \"error in double_complex sygv \" << test_sygv<double_complex>(24) << endl;\n            cout << endl;\n\n            cout << \"error in float gesv \" << test_gesv<float>(20,30) << endl;\n            cout << \"error in double gesv \" << test_gesv<double>(20,30) << endl;\n            cout << \"error in float_complex gesv \" << test_gesv<float_complex>(23,27) << endl;\n            cout << \"error in double_complex gesv \" << test_gesv<double_complex>(37,19) << endl;\n            cout << endl;\n\n            cout << \"error in float cholesky \" << test_cholesky<float>(22) << endl;\n            cout << endl;\n            cout << \"error in double cholesky \" << test_cholesky<double>(22) << endl;\n            cout << endl;\n            cout << \"error in float_complex cholesky \" << test_cholesky<float_complex>(22) << endl;\n            cout << endl;\n            cout << \"error in double_complex cholesky \" << test_cholesky<double_complex>(22) << endl;\n            cout << endl;\n\n            cout << \"error in float rr_cholesky \" << test_rr_cholesky<float>(22) << endl;\n            cout << endl;\n            cout << \"error in double rr_cholesky \" << test_rr_cholesky<double>(22) << endl;\n            cout << endl;\n            cout << \"error in float_complex rr_cholesky \" << test_rr_cholesky<float_complex>(22) << endl;\n            cout << endl;\n            cout << \"error in double_complex rr_cholesky \" << test_rr_cholesky<double_complex>(22) << endl;\n            cout << endl;\n\n            cout << \"error in double QR/LQ \" << test_qr<double>() << endl;\n            cout << \"error in float QR/LQ \" << test_qr<float>() << endl;\n            cout << \"error in float_complex QR/LQ \" << test_qr<float_complex>() << endl;\n            cout << \"error in double_complex QR/LQ \" << test_qr<double_complex>() << endl;\n            cout << endl;\n\n            cout << \"error in double inverse \" << test_inverse<double>(32) << endl;\n            cout << \"error in double inverse \" << test_inverse<double>(47) << endl;\n            cout << \"error in double_complex inverse \" << test_inverse<double_complex>(32) << endl;\n            cout << \"error in double_complex inverse \" << test_inverse<double_complex>(47) << endl;\n            cout << endl;\n        }\n\n        catch (TensorException& e) {\n            cout << \"Caught a tensor exception in test_tensor_lapack\\n\";\n            cout << e;\n            return false;\n        }\n\n        return true;\t\t\t//\n    }\n\n    // int main() {\n    //   test_tensor_lapack();\n    //   return 0;\n    // }\n\n    // GCC 4.4.3 seems to want these explicitly instantiated whereas previous\n    // versions were happy with the instantiations caused by the test code above\n\n    template\n    void svd(const Tensor<float>& a, Tensor<float>& U,\n             Tensor<Tensor<float>::scalar_type >& s, Tensor<float>& VT);\n\n    template\n    void svd(const Tensor<double>& a, Tensor<double>& U,\n             Tensor<Tensor<double>::scalar_type >& s, Tensor<double>& VT);\n\n    template\n    void svd(const Tensor<float_complex>& a, Tensor<float_complex>& U,\n             Tensor<Tensor<float_complex>::scalar_type >& s, Tensor<float_complex>& VT);\n\n    template\n    void svd(const Tensor<double_complex>& a, Tensor<double_complex>& U,\n             Tensor<Tensor<double_complex>::scalar_type >& s, Tensor<double_complex>& VT);\n\n    template\n    void svd_result(Tensor<float>& a, Tensor<float>& U,\n             Tensor<Tensor<float>::scalar_type >& s, Tensor<float>& VT, Tensor<float>& work);\n\n    template\n    void svd_result(Tensor<double>& a, Tensor<double>& U,\n             Tensor<Tensor<double>::scalar_type >& s, Tensor<double>& VT, Tensor<double>& work);\n\n    template\n    void svd_result(Tensor<float_complex>& a, Tensor<float_complex>& U,\n             Tensor<Tensor<float_complex>::scalar_type >& s, Tensor<float_complex>& VT,\n             Tensor<float_complex>& work);\n\n    template\n    void svd_result(Tensor<double_complex>& a, Tensor<double_complex>& U,\n             Tensor<Tensor<double_complex>::scalar_type >& s, Tensor<double_complex>& VT,\n             Tensor<double_complex>& work);\n\n    template\n    void gesv(const Tensor<double>& a, const Tensor<double>& b, Tensor<double>& x);\n\n    template\n    void gesv(const Tensor<double_complex>& a, const Tensor<double_complex>& b, Tensor<double_complex>& x);\n\n    template\n    Tensor<double> inverse(const Tensor<double>& A);\n\n    template\n    Tensor<double_complex> inverse(const Tensor<double_complex>& A);\n\n    template\n    void gelss(const Tensor<double>& a, const Tensor<double>& b, double rcond,\n               Tensor<double>& x, Tensor<Tensor<double>::scalar_type >& s,\n               long &rank, Tensor<Tensor<double>::scalar_type>& sumsq);\n\n    template\n    void gelss(const Tensor<double_complex>& a, const Tensor<double_complex>& b, double rcond,\n               Tensor<double_complex>& x, Tensor<Tensor<double_complex>::scalar_type >& s,\n               long &rank, Tensor<Tensor<double_complex>::scalar_type>& sumsq);\n\n    template\n    void syev(const Tensor<double>& A,\n              Tensor<double>& V, Tensor<Tensor<double>::scalar_type >& e);\n\n    template\n    void syev(const Tensor<double_complex>& A,\n              Tensor<double_complex>& V, Tensor<Tensor<double_complex>::scalar_type >& e);\n\n    template\n    void geev(const Tensor<double>& A, Tensor<double>& V, Tensor<double_complex>& e);\n\n    template\n    void sygv(const Tensor<double>& A, const Tensor<double>& B, int itype,\n              Tensor<double>& V, Tensor<Tensor<double>::scalar_type >& e);\n    template\n    void sygv(const Tensor<double_complex>& A, const Tensor<double_complex>& B, int itype,\n              Tensor<double_complex>& V, Tensor<Tensor<double_complex>::scalar_type >& e);\n\n    template\n    void ggev(const Tensor<double>& A, Tensor<double>& B, Tensor<double>& V, Tensor<double_complex>& e);\n\n    template\n    void cholesky(Tensor<double>& A);\n\n    template\n    void cholesky(Tensor<double_complex>& A);\n\n    template\n    void rr_cholesky(Tensor<double>& A, typename Tensor<double>::scalar_type tol, Tensor<integer>& piv, int& rank);\n\n    template\n    void rr_cholesky(Tensor<double_complex>& A, typename Tensor<double_complex>::scalar_type tol, Tensor<integer>& piv, int& rank);\n\n    template\n    void geqp3(Tensor<double>& A, Tensor<double>& tau, Tensor<integer>& jpvt);\n\n    template\n    void geqp3(Tensor<double_complex>& A, Tensor<double_complex>& tau, Tensor<integer>& jpvt);\n\n    template\n    void qr(Tensor<float>& A, Tensor<float>& R);\n\n    template\n    void qr(Tensor<double>& A, Tensor<double>& R);\n\n    template\n    void qr(Tensor<float_complex>& A, Tensor<float_complex>& R);\n\n    template\n    void qr(Tensor<double_complex>& A, Tensor<double_complex>& R);\n\n    template\n    void lq(Tensor<double>& A, Tensor<double>& L);\n\n    template\n    void lq(Tensor<double_complex>& A, Tensor<double_complex>& L);\n\n    template\n    void lq_result(Tensor<double>& A, Tensor<double>& R, Tensor<double>& tau, Tensor<double>& work,\n            bool do_qr);\n\n    template\n    void lq_result(Tensor<double_complex>& A, Tensor<double_complex>& R, Tensor<double_complex>& tau, Tensor<double_complex>& work,\n            bool do_qr);\n\n    template\n    void orgqr(Tensor<float>& A, const Tensor<float>& tau);\n\n    template\n    void orgqr(Tensor<double>& A, const Tensor<double>& tau);\n\n    template\n    void orgqr(Tensor<complex_real4>& A, const Tensor<complex_real4>& tau);\n\n    template\n    void orgqr(Tensor<double_complex>& A, const Tensor<double_complex>& tau);\n\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/tensor/lapacke_types.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2019 Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#ifndef MADNESS_LINALG_LAPACKE_TYPES_H__INCLUDED\n#define MADNESS_LINALG_LAPACKE_TYPES_H__INCLUDED\n\n/// \\file lapacke_types.h\n/// \\brief Define types used by LAPACKe\n\n\n#include <madness/madness_config.h>\n// some BLAS libraries define their own types for complex data\n#ifndef HAVE_INTEL_MKL\n# include <complex>\n# ifndef lapack_complex_float\n#  define lapack_complex_float  std::complex<float>\n# else\nstatic_assert(sizeof(std::complex<float>)==sizeof(lapack_complex_float), \"sizes of lapack_complex_float and std::complex<float> do not match\");\n# endif\n# ifndef lapack_complex_double\n#  define lapack_complex_double std::complex<double>\n# else\nstatic_assert(sizeof(std::complex<double>)==sizeof(lapack_complex_double), \"sizes of lapack_complex_double and std::complex<double> do not match\");\n# endif\n#else\n// if calling direct need to cast to the MKL complex types\n# ifdef MKL_DIRECT_CALL\n#  include <mkl_types.h>\n#  ifndef lapack_complex_float\n#   define lapack_complex_float MKL_Complex8\n#  endif\n#  ifndef lapack_complex_double\n#   define lapack_complex_double MKL_Complex16\n#  endif\n// else can call via F77 prototypes which don't need type conversion\n# else\n#  include <complex>\n#  ifndef lapack_complex_float\n#   define lapack_complex_float  std::complex<float>\n#  endif\n#  ifndef lapack_complex_double\n#   define lapack_complex_double std::complex<double>\n#  endif\n# endif\n#endif\n\n#include <type_traits>\n\nnamespace madness {\nnamespace lapacke {\n\n    /////////// legalized conversions between C++ and LAPACKe types //////////\n    template <typename T>\n    const lapack_complex_float*\n    to_cptr(const T* ptr) {\n      static_assert(sizeof(T)==sizeof(lapack_complex_float), \"sizes of lapack_complex_float and T given to madness::cblas::to_cptr do not match\");\n      return reinterpret_cast<const lapack_complex_float*>(ptr);\n    }\n    template <typename T>\n    typename std::enable_if<!std::is_const<T>::value, lapack_complex_float*>::type\n    to_cptr(T* ptr) {\n      static_assert(sizeof(T)==sizeof(lapack_complex_float), \"sizes of lapack_complex_float and T given to madness::cblas::to_cptr do not match\");\n      return reinterpret_cast<lapack_complex_float*>(ptr);\n    }\n\n    template <typename T>\n    const lapack_complex_double*\n    to_zptr(const T* ptr) {\n      static_assert(sizeof(T)==sizeof(lapack_complex_double), \"sizes of lapack_complex_double and T given to madness::cblas::to_zptr do not match\");\n      return reinterpret_cast<const lapack_complex_double*>(ptr);\n    }\n    template <typename T>\n    typename std::enable_if<!std::is_const<T>::value, lapack_complex_double*>::type\n    to_zptr(T* ptr) {\n      static_assert(sizeof(T)==sizeof(lapack_complex_double), \"sizes of lapack_complex_double and T given to madness::cblas::to_zptr do not match\");\n      return reinterpret_cast<lapack_complex_double*>(ptr);\n    }\n\n} // namespace lapacke\n} // namespace madness\n\n#endif // MADNESS_LINALG_LAPACKE_TYPES_H__INCLUDED\n\n"
  },
  {
    "path": "src/madness/tensor/linalg_wrappers.cc",
    "content": "#include <vector>\n#include <madness/madness_config.h>\n#include <madness/tensor/linalg_wrappers.h>\n\n#ifdef MADNESS_LINALG_USE_LAPACKE\nusing madness::lapacke::to_cptr;\nusing madness::lapacke::to_zptr;\n#endif\n\n\nnamespace madness {\n\n    template <>\n    void svd( char jobu, char jobvt, integer m, integer n, real4* A, integer lda,\n              real4* S, real4* U, integer ldu, real4* VT, integer ldvt ) { \n    \n    \n        integer lwork = -1;\n        integer info;\n    \n        real4 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        sgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, &lwork_dummy,\n                 &lwork, &info );\n    #else\n        sgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, &lwork_dummy,\n                 &lwork, &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy);\n    \n        std::vector<real4> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        sgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, work.data(),\n                 &lwork, &info );\n    #else\n        sgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, work.data(),\n                 &lwork, &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        LINALG_ASSERT( (info==0), \"SVD Failed\", info);\n    \n    }\n    \n    template <>\n    void svd( char jobu, char jobvt, integer m, integer n, real8* A, integer lda,\n              real8* S, real8* U, integer ldu, real8* VT, integer ldvt ) { \n    \n    \n        integer lwork = -1;\n        integer info;\n    \n        real8 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        dgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, &lwork_dummy,\n                 &lwork, &info );\n    #else\n        dgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, &lwork_dummy,\n                 &lwork, &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy);\n    \n        std::vector<real8> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        dgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, work.data(),\n                 &lwork, &info );\n    #else\n        dgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, work.data(),\n                 &lwork, &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        LINALG_ASSERT( (info==0), \"SVD Failed\", info);\n    }\n    \n    \n    \n    \n    template <>\n    void svd( char jobu, char jobvt, integer m, integer n, complex_real4* A, \n              integer lda, real4* S, complex_real4* U, integer ldu, complex_real4* VT, \n              integer ldvt ) { \n    \n    \n        integer lwork = -1;\n        integer lrwork = 5 * std::min(m,n);\n        integer info;\n    \n        std::vector<real4> rwork( lrwork );\n    \n        complex_real4 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        cgesvd_( &jobu, &jobvt, &m, &n, to_cptr(A), &lda, S, to_cptr(U), &ldu, to_cptr(VT), &ldvt, to_cptr(&lwork_dummy),\n                 &lwork, rwork.data(), &info );\n    #else\n        cgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, &lwork_dummy,\n                 &lwork, rwork.data(), &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy.real());\n    \n        std::vector<complex_real4> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        cgesvd_( &jobu, &jobvt, &m, &n, to_cptr(A), &lda, S, to_cptr(U), &ldu, to_cptr(VT), &ldvt, to_cptr(work.data()),\n                 &lwork, rwork.data(), &info );\n    #else\n        cgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, work.data(),\n                 &lwork, rwork.data(), &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        LINALG_ASSERT( (info==0), \"SVD Failed\", info);\n    }\n    \n    template <>\n    void svd( char jobu, char jobvt, integer m, integer n, complex_real8* A, \n              integer lda, real8* S, complex_real8* U, integer ldu, complex_real8* VT, \n              integer ldvt ) { \n    \n    \n        integer lwork = -1;\n        integer lrwork = 5 * std::min(m,n);\n        integer info;\n    \n        std::vector<real8> rwork( lrwork );\n    \n        complex_real8 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        zgesvd_( &jobu, &jobvt, &m, &n, to_zptr(A), &lda, S, to_zptr(U), &ldu, to_zptr(VT), &ldvt, to_zptr(&lwork_dummy),\n                 &lwork, rwork.data(), &info );\n    #else\n        zgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, &lwork_dummy,\n                 &lwork, rwork.data(), &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy.real());\n    \n        std::vector<complex_real8> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        zgesvd_( &jobu, &jobvt, &m, &n, to_zptr(A), &lda, S, to_zptr(U), &ldu, to_zptr(VT), &ldvt, to_zptr(work.data()),\n                 &lwork, rwork.data(), &info );\n    #else\n        zgesvd_( &jobu, &jobvt, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, work.data(),\n                 &lwork, rwork.data(), &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        LINALG_ASSERT( (info==0), \"SVD Failed\", info);\n    }\n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    template <>\n    void hereig( char jobz, char uplo, integer n, real4* A, integer lda, real4* W ) {\n    \n        integer lwork = -1;\n        integer info;\n    \n        real4 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        ssyev_( &jobz, &uplo, &n, A, &lda, W, &lwork_dummy, &lwork, &info );\n    #else\n        ssyev_( &jobz, &uplo, &n, A, &lda, W, &lwork_dummy, &lwork, &info, \n                sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy);\n    \n        std::vector<real4> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        ssyev_( &jobz, &uplo, &n, A, &lda, W, work.data(), &lwork, &info );\n    #else\n        ssyev_( &jobz, &uplo, &n, A, &lda, W, work.data(), &lwork, &info, \n                sizeof(char), sizeof(char) );\n    #endif\n    \n    \n        LINALG_ASSERT( (info==0), \"EVP Failed\", info);\n    }\n    \n    template <>\n    void hereig( char jobz, char uplo, integer n, real8* A, integer lda, real8* W ) {\n    \n        integer lwork = -1;\n        integer info;\n    \n        real8 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        dsyev_( &jobz, &uplo, &n, A, &lda, W, &lwork_dummy, &lwork, &info );\n    #else\n        dsyev_( &jobz, &uplo, &n, A, &lda, W, &lwork_dummy, &lwork, &info, \n                sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy);\n    \n        std::vector<real8> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        dsyev_( &jobz, &uplo, &n, A, &lda, W, work.data(), &lwork, &info );\n    #else\n        dsyev_( &jobz, &uplo, &n, A, &lda, W, work.data(), &lwork, &info, \n                sizeof(char), sizeof(char) );\n    #endif\n    \n    \n        LINALG_ASSERT( (info==0), \"EVP Failed\", info);\n    }\n    \n    template <>\n    void hereig( char jobz, char uplo, integer n, complex_real4* A, integer lda, \n      real4* W ) {\n    \n        integer lwork = -1;\n        integer lrwork = std::max(integer(1), 3*n-2);\n        integer info;\n    \n        std::vector<real4> rwork( lrwork );\n    \n        complex_real4 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        cheev_( &jobz, &uplo, &n, to_cptr(A), &lda, W, to_cptr(&lwork_dummy), &lwork, rwork.data(), &info );\n    #else\n        cheev_( &jobz, &uplo, &n, A, &lda, W, &lwork_dummy, &lwork, rwork.data(), &info, \n                sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy.real());\n    \n        std::vector<complex_real4> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        cheev_( &jobz, &uplo, &n, to_cptr(A), &lda, W, to_cptr(work.data()), &lwork, rwork.data(), &info );\n    #else\n        cheev_( &jobz, &uplo, &n, A, &lda, W, work.data(), &lwork, rwork.data(), &info, \n                sizeof(char), sizeof(char) );\n    #endif\n    \n    \n        LINALG_ASSERT( (info==0), \"EVP Failed\", info);\n    }\n    \n    template <>\n    void hereig( char jobz, char uplo, integer n, complex_real8* A, integer lda, \n      real8* W ) {\n    \n        integer lwork = -1;\n        integer lrwork = std::max(integer(1), 3*n-2);\n        integer info;\n    \n        std::vector<real8> rwork( lrwork );\n    \n        complex_real8 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        zheev_( &jobz, &uplo, &n, to_zptr(A), &lda, W, to_zptr(&lwork_dummy), &lwork, rwork.data(), &info );\n    #else\n        zheev_( &jobz, &uplo, &n, A, &lda, W, &lwork_dummy, &lwork, rwork.data(), &info, \n                sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy.real());\n    \n        std::vector<complex_real8> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        zheev_( &jobz, &uplo, &n, to_zptr(A), &lda, W, to_zptr(work.data()), &lwork, rwork.data(), &info );\n    #else\n        zheev_( &jobz, &uplo, &n, A, &lda, W, work.data(), &lwork, rwork.data(), &info, \n                sizeof(char), sizeof(char) );\n    #endif\n    \n    \n        LINALG_ASSERT( (info==0), \"EVP Failed\", info);\n    \n    }\n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    template <>\n    void hereig_gen( integer itype, char jobz, char uplo, integer n, real4* A, \n                     integer lda, real4* B, integer ldb, real4* W ) {\n    \n        integer lwork = -1;\n        integer info;\n    \n        real4 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        ssygv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, &lwork_dummy, &lwork, \n                &info );\n    #else\n        ssygv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, &lwork_dummy, &lwork, \n                &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy);\n    \n        std::vector<real4> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        ssygv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, work.data(), &lwork, \n                &info );\n    #else\n        ssygv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, work.data(), &lwork, \n                &info, sizeof(char), sizeof(char) );\n    #endif\n    \n    \n        LINALG_ASSERT( (info==0), \"EVP Failed\", info);\n    }\n    \n    template <>\n    void hereig_gen( integer itype, char jobz, char uplo, integer n, real8* A, \n                     integer lda, real8* B, integer ldb, real8* W ) {\n    \n        integer lwork = -1;\n        integer info;\n    \n        real8 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        dsygv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, &lwork_dummy, &lwork, \n                &info );\n    #else\n        dsygv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, &lwork_dummy, &lwork, \n                &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy);\n    \n        std::vector<real8> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        dsygv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, work.data(), &lwork, \n                &info );\n    #else\n        dsygv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, work.data(), &lwork, \n                &info, sizeof(char), sizeof(char) );\n    #endif\n    \n    \n        LINALG_ASSERT( (info==0), \"EVP Failed\", info);\n    }\n    \n    template <>\n    void hereig_gen( integer itype, char jobz, char uplo, integer n, complex_real4* A, \n                     integer lda, complex_real4* B, integer ldb, real4* W ) {\n    \n        integer lwork = -1;\n        integer lrwork = std::max(integer(1), 3*n-2);\n        integer info;\n    \n        std::vector<real4> rwork( lrwork );\n    \n        complex_real4 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        chegv_( &itype, &jobz, &uplo, &n, to_cptr(A), &lda, to_cptr(B), &ldb, W, to_cptr(&lwork_dummy), &lwork, \n                rwork.data(), &info );\n    #else\n        chegv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, &lwork_dummy, &lwork, \n                rwork.data(), &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy.real());\n    \n        std::vector<complex_real4> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        chegv_( &itype, &jobz, &uplo, &n, to_cptr(A), &lda, to_cptr(B), &ldb, W, to_cptr(work.data()), &lwork, \n                rwork.data(), &info );\n    #else\n        chegv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, work.data(), &lwork, \n                rwork.data(), &info, sizeof(char), sizeof(char) );\n    #endif\n    \n    \n        LINALG_ASSERT( (info==0), \"EVP Failed\", info);\n    }\n    \n    template <>\n    void hereig_gen( integer itype, char jobz, char uplo, integer n, complex_real8* A, \n                     integer lda, complex_real8* B, integer ldb, real8* W ) {\n    \n        integer lwork = -1;\n        integer lrwork = std::max(integer(1), 3*n-2);\n        integer info;\n      \n        std::vector<real8> rwork( lrwork );\n      \n        complex_real8 lwork_dummy;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        zhegv_( &itype, &jobz, &uplo, &n, to_zptr(A), &lda, to_zptr(B), &ldb, W, to_zptr(&lwork_dummy), &lwork, \n                rwork.data(), &info );\n    #else\n        zhegv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, &lwork_dummy, &lwork, \n                rwork.data(), &info, sizeof(char), sizeof(char) );\n    #endif\n    \n        lwork = integer(lwork_dummy.real());\n    \n        std::vector<complex_real8> work( lwork );\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        zhegv_( &itype, &jobz, &uplo, &n, to_zptr(A), &lda, to_zptr(B), &ldb, W, to_zptr(work.data()), &lwork, \n                rwork.data(), &info );\n    #else\n        zhegv_( &itype, &jobz, &uplo, &n, A, &lda, B, &ldb, W, work.data(), &lwork, \n                rwork.data(), &info, sizeof(char), sizeof(char) );\n    #endif\n    \n    \n        LINALG_ASSERT( (info==0), \"EVP Failed\", info);\n    }\n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    template <>\n    void cholesky( char uplo, integer n, real4* A, integer lda ) {\n    \n        integer info;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        spotrf_( &uplo, &n, A, &lda, &info );\n    #else\n        spotrf_( &uplo, &n, A, &lda, &info, sizeof(char) );\n    #endif\n    \n        LINALG_ASSERT( (info==0), \"Cholesky Failed\", info);\n    }\n    \n    template <>\n    void cholesky( char uplo, integer n, real8* A, integer lda ) {\n    \n        integer info;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        dpotrf_( &uplo, &n, A, &lda, &info );\n    #else\n        dpotrf_( &uplo, &n, A, &lda, &info, sizeof(char) );\n    #endif\n    \n        LINALG_ASSERT( (info==0), \"Cholesky Failed\", info);\n    }\n    \n    template <>\n    void cholesky( char uplo, integer n, complex_real4* A, integer lda ) {\n    \n        integer info;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        cpotrf_( &uplo, &n, to_cptr(A), &lda, &info );\n    #else\n        cpotrf_( &uplo, &n, A, &lda, &info, sizeof(char) );\n    #endif\n    \n        LINALG_ASSERT( (info==0), \"Cholesky Failed\", info);\n    }\n    \n    template <>\n    void cholesky( char uplo, integer n, complex_real8* A, integer lda ) {\n    \n        integer info;\n    \n    #if MADNESS_LINALG_USE_LAPACKE\n        zpotrf_( &uplo, &n, to_zptr(A), &lda, &info );\n    #else\n        zpotrf_( &uplo, &n, A, &lda, &info, sizeof(char) );\n    #endif\n    \n        LINALG_ASSERT( (info==0), \"Cholesky Failed\", info);\n    }\n\n\n\n}\n"
  },
  {
    "path": "src/madness/tensor/linalg_wrappers.h",
    "content": "#include <madness/tensor/clapack.h>\n#include <madness/fortran_ctypes.h>\n\n/*!\n  \\file linalg_wrappers.h\n  \\brief Template wrappers for LAPACK routines \n  \\ingroup linalg\n@{\n*/\n\nnamespace madness {\nnamespace detail {\n\n    template <typename T>\n    struct real_type {\n      using type = T;\n    };\n  \n    template <typename T>\n    struct real_type< std::complex<T> > {\n      using type = T;\n    };\n\n}\n\n  \n    /// Compute the SVD via LAPACK\n    template <typename T>\n    void svd( char jobu, char jobvt, integer m, integer n, T* A, integer lda,\n              typename detail::real_type<T>::type* S, T* U, integer ldu,\n              T* VT, integer ldvt ); \n\n    /// Solve the EVP via LAPACK\n    template <typename T>\n    void hereig( char jobz, char uplo, integer n, T* A, integer lda, \n                 typename detail::real_type<T>::type* W );\n\n    /// Solve the Generalized EVP via LAPACK\n    template <typename T>\n    void hereig_gen( integer itype, char jobz, char uplo, integer n, T* A, \n                     integer lda, T* B, integer ldb, \n                     typename detail::real_type<T>::type* W );\n\n    /// Compute the Cholesky Factorization via LAPACK\n    template <typename T>\n    void cholesky( char uplo, integer n, T* A, integer lda );\n\n\n\n\n\n    /// Linear algebra Exception\n    class LinAlgException : public std::exception {\n        const char* msg;\n        const char* assertion;\n        int value;\n        int line;\n        const char *function;\n        const char *filename;\n  \npublic:\n        LinAlgException(const char* s, const char *a, int err, \n                        int lin, const char *func, const char *file)\n                : msg(s)\n                , assertion(a)\n                , value(err)\n                , line(lin)\n                , function(func)\n                , filename(file) { }\n\n        virtual const char* what() const throw() {\n            return msg;\n        }\n\n        virtual ~LinAlgException() throw() {}\n\n    friend std::ostream& operator <<(std::ostream& out, const LinAlgException& e) {\n        out << \"LinAlgException: msg='\";\n        if (e.msg) out << e.msg;\n        out << \"'\\n\";\n        if (e.assertion) out << \"                 failed assertion='\" <<\n            e.assertion << \"'\\n\";\n        out << \"                 value=\" << e.value << \"\\n\";\n        if (e.line) out << \"                 line=\" << e.line << \"\\n\";\n        if (e.function) out << \"                 function='\" <<\n            e.function << \"'\\n\";\n        if (e.filename) out << \"                 filename='\" <<\n            e.filename << \"'\\n\";\n\n        return out;\n    }\n\n    };\n\n\n\n#define LINALG_STRINGIZE(X) #X\n#define LINALG_EXCEPTION_AT(F, L) LINALG_STRINGIZE(F) \"(\" LINALG_STRINGIZE(L) \")\"\n\n#define LINALG_EXCEPTION(msg,value) \\\n    throw ::madness::LinAlgException(\"LINALG EXCEPTION: \" LINALG_EXCEPTION_AT( __FILE__, __LINE__ ) \": \" msg , \\\n    0,value,__LINE__,__FUNCTION__,__FILE__)\n\n#define LINALG_ASSERT(condition,msg,value) \\\ndo {if (!(condition)) \\\n        throw ::madness::LinAlgException(\"LINALG ASSERTION FAILED: \" LINALG_EXCEPTION_AT( __FILE__, __LINE__ ) \": \" msg , \\\n        #condition,value,__LINE__,__FUNCTION__,__FILE__); \\\n   } while (0)\n}\n\n/* @} */\n"
  },
  {
    "path": "src/madness/tensor/lowranktensor.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#ifndef MADNESS_TENSOR_LOWRANKTENSOR_H_\n#define MADNESS_TENSOR_LOWRANKTENSOR_H_\n\n#include <memory>\n#include <vector>\n#include <variant>\n\n#include <madness/world/madness_exception.h>\n#include <madness/world/print.h>\n#include <madness/tensor/slice.h>\n#include <madness/tensor/SVDTensor.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/tensortrain.h>\n#include \"type_data.h\"\n#include <madness/tensor/RandomizedMatrixDecomposition.h>\n\n\nnamespace madness {\n\n\n// forward declaration\ntemplate <class T> class SliceLowRankTensor;\n\n\ntemplate<typename T>\nclass GenTensor {\n\npublic:\n\n\tfriend class SliceLowRankTensor<T>;\n\n    /// C++ typename of the real type associated with a complex type.\n    typedef typename TensorTypeData<T>::scalar_type scalar_type;\n\n    /// C++ typename of the floating point type associated with scalar real type\n    typedef typename TensorTypeData<T>::float_scalar_type float_scalar_type;\n\n    /// empty ctor\n\tGenTensor() = default;\n\n    /// copy ctor, shallow\n\tGenTensor(const GenTensor<T>& other) = default;\n\n\tGenTensor(const long ndim, const long* dims, const TensorType& tt) {\n\t\tif (tt==TT_FULL) tensor=std::shared_ptr<Tensor<T> >(new Tensor<T>(ndim, dims));\n\t\tif (tt==TT_2D) tensor=std::shared_ptr<SVDTensor<T> >(new SVDTensor<T>(ndim, dims));\n\t\tif (tt==TT_TENSORTRAIN) tensor=std::shared_ptr<TensorTrain<T> >(new TensorTrain<T>(ndim, dims));\n    }\n\n    /// ctor with dimensions; constructs tensor filled with zeros\n\tGenTensor(const std::vector<long>& dim, const TensorType& tt) :\n\t\tGenTensor(long(dim.size()),&dim.front(),tt) {\n    }\n\n    /// ctor with dimensions; constructs tensor filled with zeros\n\tGenTensor(const std::vector<long>& dim, const TensorArgs& targs) :\n\t\tGenTensor(dim, targs.tt) {\n    }\n\n    /// ctor with dimensions; all dims have the same value k\n\tGenTensor(const TensorType& tt, const long k, const long ndim) :\n\t\tGenTensor(std::vector<long>(ndim,k), tt) {\n    }\n\n    /// ctor with a regular Tensor and arguments, deep\n\tGenTensor(const Tensor<T>& rhs, const double& thresh, const TensorType& tt) :\n\t\tGenTensor(rhs,TensorArgs(thresh,tt)) {\n    }\n\n    /// ctor with a regular Tensor and arguments, deep\n\tGenTensor(const Tensor<T>& rhs, const TensorArgs& targs) {\n\t\tif (targs.tt==TT_FULL) *this=copy(rhs);\n\t\telse if (targs.tt==TT_2D) {\n\t\t\tif (rhs.size()==0) {\n\t\t\t\ttensor=std::shared_ptr<SVDTensor<T> >(new SVDTensor<T>(rhs,targs.thresh*facReduce()));\n        } else {\n\t\t\t\tTensorTrain<T> tt(rhs,targs.thresh*facReduce());\n\t\t\t\tGenTensor<T> tmp=tt;\n\t\t\t\t*this=tmp.convert(targs);\n\t\t\t}\n//\t\t} else if (targs.tt==TT_DYNAMIC) {\n//\t\t\tif (rhs.size()==0) {\n//\t\t\t\ttensor=std::shared_ptr<SVDTensor<T> >(new SVDTensor<T>(rhs,targs.thresh*facReduce()));\n//\t\t\t} else {\n//\n//\t\t\t\tlong maxrank=std::max(50.0,floor(0.3*sqrt(rhs.size())));\n//\t\t\t\tRandomizedMatrixDecomposition<T> rmd=RMDFactory().maxrank(maxrank);\n//\t\t\t\tTensor<T> Q=rmd.compute_range(rhs,targs.thresh*facReduce()*0.1,{0,0});\n//\t\t\t\tif (Q.size()==0) {\n//\t\t\t\t\t*this=SVDTensor<T>(rhs.ndim(),rhs.dims());\n//\t\t\t\t} else if (not rmd.exceeds_maxrank()) {\n//\t\t\t\t\tSVDTensor<T> result(rhs.ndim(),rhs.dims());\n//\t\t\t\t\tresult=SVDTensor<T>::compute_svd_from_range(Q,rhs);\n//\t\t\t\t\t*this=result;\n//\t\t\t\t} else {\n//\t\t\t\t\t*this=copy(rhs);\n////\t\t\t\t\tTensorTrain<T> tt(rhs,targs.thresh*facReduce());\n////\t\t\t\t\tGenTensor<T> tmp=tt;\n////\t\t\t\t\t*this=tmp.convert(targs);\n//\t\t\t\t}\n////\t\t\t\ttensor=std::shared_ptr<SVDTensor<T> >(new SVDTensor<T>(rhs,targs.thresh*facReduce()));\n//\t\t\t}\n\t\t} else if (targs.tt==TT_TENSORTRAIN) {\n\t\t\ttensor=std::shared_ptr<TensorTrain<T> >(new TensorTrain<T>(rhs,targs.thresh*facReduce()));\n                    } else {\n\t\t\tMADNESS_EXCEPTION(\"unknown tensor type in LowRankTensor constructor\",1);\n        }\n    }\n\n    /// ctor with a regular Tensor, deep\n\tGenTensor(const Tensor<T>& other)  {\n\t\ttensor=std::shared_ptr<Tensor<T> >(new Tensor<T>(copy(other)));\n    }\n\n    /// ctor with a TensorTrain as argument, shallow\n\tGenTensor(const TensorTrain<T>& other) {\n\t\ttensor=std::shared_ptr<TensorTrain<T> >(new TensorTrain<T>(copy(other))) ;\n    }\n\n    /// ctor with a SVDTensor as argument, shallow\n\tGenTensor(const SVDTensor<T>& other) {\n\t\ttensor=std::shared_ptr<SVDTensor<T> >(new SVDTensor<T>(copy(other)));\n    }\n\n    /// ctor with a SliceLowRankTensor as argument, deep\n\tGenTensor(const SliceLowRankTensor<T>& other) {\n        *this=other;\n    }\n\n    /// shallow assignment operator\n\tGenTensor& operator=(const GenTensor<T>& other) {\n\t\tif (this!=&other) tensor=other.tensor;\n\t\treturn *this;\n\t}\n\n\t/// deep assignment operator\n\tGenTensor& operator=(const Tensor<T>& other) {\n\t\ttensor=std::shared_ptr<Tensor<T> >(new Tensor<T>(copy(other)));\n\t\treturn *this;\n        }\n\n\t/// deep assignment operator\n\tGenTensor& operator=(const SVDTensor<T>& other) {\n\t\ttensor=std::shared_ptr<SVDTensor<T> >(new SVDTensor<T>(copy(other)));\n\t\treturn *this;\n\t}\n\n\t/// deep assignment operator\n\tGenTensor& operator=(const TensorTrain<T>& other) {\n\t\ttensor=std::shared_ptr<TensorTrain<T> >(new TensorTrain<T>(copy(other)));\n        return *this;\n    }\n\n    /// deep assignment with slices: g0 = g1(s)\n\tGenTensor& operator=(const SliceLowRankTensor<T>& other) {\n\t\tconst std::array<Slice,TENSOR_MAXDIM>& s=other.thisslice;\n\t\tMADNESS_ASSERT(other.is_assigned());\n\t\tif (other.is_full_tensor())\n\t\t\ttensor=std::shared_ptr<Tensor<T> >(new Tensor<T>(copy(other.get_tensor()(s))));\n\t\telse if (other.is_svd_tensor())\n\t\t\ttensor=std::shared_ptr<SVDTensor<T> >(new SVDTensor<T>(other.get_svdtensor().copy_slice(s)));\n\t\telse if (other.is_tensortrain())\n\t\t\ttensor=std::shared_ptr<TensorTrain<T> >(new TensorTrain<T>(copy(other.get_tensortrain(),s)));\n        else {\n            MADNESS_EXCEPTION(\"you should not be here\",1);\n        }\n        return *this;\n    }\n\n    /// Type conversion makes a deep copy\n\ttemplate <class Q> operator GenTensor<Q>() const { // type conv => deep copy\n\n\t\tGenTensor<Q> result;\n\t\tif (is_full_tensor()) {\n\t\t\tresult=Tensor<Q>(get_tensor());\n\t\t} else if (is_svd_tensor()) {\n            MADNESS_EXCEPTION(\"no type conversion for TT_2D yes=t\",1);\n\t\t} else if (is_tensortrain()) {\n\t\t\tMADNESS_EXCEPTION(\"no type conversion for TT_2D yes=t\",1);\n        }\n        return result;\n    }\n\n\tSVDTensor<T>& get_svdtensor() {\n\t\tMADNESS_ASSERT(is_assigned());\n\t\ttry {\n\t\t\treturn *(std::get<1>(tensor).get());\n\t\t} catch (...) {\n\t\t\tMADNESS_EXCEPTION(\"failure to return SVDTensor from LowRankTensor\",1);\n\t\t}\n\t}\n\n\tconst SVDTensor<T>& get_svdtensor() const {\n\t\tMADNESS_ASSERT(is_assigned());\n\t\ttry {\n\t\t\treturn *(std::get<1>(tensor).get());\n\t\t} catch (...) {\n\t\t\tMADNESS_EXCEPTION(\"failure to return SVDTensor from LowRankTensor\",1);\n\t\t}\n\t}\n\n\tTensor<T>& get_tensor() {\n\t\tMADNESS_ASSERT(is_assigned());\n\t\ttry {\n\t\t\treturn *(std::get<0>(tensor).get());\n\t\t} catch (...) {\n\t\t\tMADNESS_EXCEPTION(\"failure to return Tensor from LowRankTensor\",1);\n\t\t}\n\t}\n\n\tconst Tensor<T>& get_tensor() const {\n\t\tMADNESS_ASSERT(is_assigned());\n\t\ttry {\n\t\t\treturn *(std::get<0>(tensor).get());\n\t\t} catch (...) {\n\t\t\tMADNESS_EXCEPTION(\"failure to return Tensor from LowRankTensor\",1);\n\t\t}\n\t}\n\n\tTensorTrain<T>& get_tensortrain() {\n\t\tMADNESS_ASSERT(is_assigned());\n\t\ttry {\n\t\t\treturn *(std::get<2>(tensor).get());\n\t\t} catch (...) {\n\t\t\tMADNESS_EXCEPTION(\"failure to return TensorTrain from LowRankTensor\",1);\n\t\t}\n\t}\n\n\tconst TensorTrain<T>& get_tensortrain() const {\n\t\tMADNESS_ASSERT(is_assigned());\n\t\ttry {\n\t\t\treturn *(std::get<2>(tensor).get());\n\t\t} catch (...) {\n\t\t\tMADNESS_EXCEPTION(\"failure to return TensorTrain from LowRankTensor\",1);\n\t\t}\n\t}\n\n    /// general slicing, shallow; for temporary use only!\n    SliceLowRankTensor<T> operator()(const std::vector<Slice>& s) {\n        return SliceLowRankTensor<T>(*this,s);\n    }\n\n    /// general slicing, shallow; for temporary use only!\n    const SliceLowRankTensor<T> operator()(const std::vector<Slice>& s) const {\n        return SliceLowRankTensor<T>(*this,s);\n    }\n\n\n    /// deep copy\n\tfriend GenTensor copy(const GenTensor& other) {\n\t\tGenTensor<T> result;\n\t\tif (other.is_assigned()) std::visit([&result](auto& obj) {result=copy(*obj);}, other.tensor);\n        return result;\n    }\n\n    /// return the tensor type\n\tTensorType tensor_type() const {\n\t\tif (index()==0) return TT_FULL;\n\t\tif (index()==1) return TT_2D;\n\t\tif (index()==2) return TT_TENSORTRAIN;\n\t\tMADNESS_EXCEPTION(\"confused tensor types \",1);\n\t}\n\n    constexpr bool is_full_tensor() const {\n        return (index()==0);\n    }\n\n\tconstexpr bool is_svd_tensor() const {\n        return (index()==1);\n\t}\n\n\tconstexpr bool is_tensortrain() const {\n        return (index()==2);\n\t}\n\n\tbool is_of_tensortype(const TensorType& tt) const {\n\t\tif ((index()==0) and (tt==TT_FULL)) return true;\n\t\tif ((index()==1) and (tt==TT_2D)) return true;\n\t\tif ((index()==2) and (tt==TT_TENSORTRAIN)) return true;\n\t\treturn false;\n\t}\n\n\ttemplate<typename Q, typename R>\n\tfriend bool is_same_tensor_type(const GenTensor<R>& rhs, const GenTensor<Q>& lhs);\n\n\tint index() const {\n\t\treturn is_assigned() ? tensor.index() : -1;\n                }\n\n\tGenTensor& convert_inplace(const TensorArgs& targs) {\n\n        // fast return\n        if (not is_assigned()) return *this;\n        if (is_of_tensortype(targs.tt)) return *this;\n//\t\tif (targs.tt==TT_DYNAMIC) if (is_svd_tensor()) return *this;\n\n        // target is full tensor\n        if (targs.tt == TT_FULL) {\n            *this = this->full_tensor_copy();\n        }\n\n        // source is full tensor: construct the corresponding representation\n        else if (is_full_tensor()) {\n            *this = GenTensor<T>(get_tensor(), targs);\n        }\n\n        // TT_TENSORTRAIN TO TT_2D\n        else if ((is_tensortrain()) and (targs.tt == TT_2D)) {\n            Tensor<T> U, VT;\n            Tensor<typename Tensor<T>::scalar_type> s;\n            get_tensortrain().two_mode_representation(U, VT, s);\n            long rank = s.size();\n            if (rank == 0) {\n                *this = SVDTensor<T>(get_tensortrain().ndim(), get_tensortrain().dims(), ndim() / 2);\n                return *this;\n            }\n\n            long n = 1, m = 1;\n            for (int i = 0; i < U.ndim() - 1; ++i) n *= U.dim(i);\n            for (int i = 1; i < VT.ndim(); ++i) m *= VT.dim(i);\n            MADNESS_ASSERT(rank * n == U.size());\n            MADNESS_ASSERT(rank * m == VT.size());\n            U = copy(transpose(U.reshape(n, rank)));   // make it contiguous\n            VT = VT.reshape(rank, m);\n            SVDTensor<T> svdtensor(s, U, VT, ndim(), dims());\n            svdtensor.normalize();\n            *this = svdtensor;\n        }\n        else if ((is_svd_tensor()) and (targs.tt == TT_TENSORTRAIN)) {\n            TensorTrain<T> tt(this->full_tensor_copy(),targs.thresh);\n            *this=tt;\n        } else {\n            print(\"conversion from type \", index(), \"to type\", targs.tt, \"not supported\");\n            MADNESS_EXCEPTION(\"type conversion not supported in LowRankTensor::convert \", 1);\n        }\n        return *this;\n    }\n\n\t/// convert this to a new LowRankTensor of given tensor type\n\tGenTensor convert(const TensorArgs& targs) const {\n\n\t\t// deep copy for same type\n\t\tif (is_of_tensortype(targs.tt)) return copy(*this);\n\n\t\t// new LRT will be newly constructed anyways\n\t\tif (is_full_tensor()) return GenTensor<T>(get_tensor(),targs);\n\n\t\tGenTensor<T> result(*this);\t// shallow\n\t\tresult.convert_inplace(targs);\n        return result;\n    }\n\n    long ndim() const {\n\t\treturn (is_assigned()) ? ptr()->ndim() : -1;\n    }\n\n    /// return the number of entries in dimension i\n    long dim(const int i) const {\n\t\tMADNESS_ASSERT(is_assigned());\n\t\treturn ptr()->dim(i);\n    }\n\n\t/// return the number of entries in dimension i\n\tconst long* dims() const {\n\t\tMADNESS_ASSERT(is_assigned());\n\t\treturn ptr()->dims();\n\t}\n\n    void normalize() {\n\t\tif (is_svd_tensor()) get_svdtensor().normalize();\n    }\n\n    float_scalar_type normf() const {\n\t\tfloat_scalar_type norm;\n\t\tstd::visit([&norm](auto& obj) {norm=obj->normf();}, tensor);\n\t\treturn norm;\n    }\n\n    float_scalar_type svd_normf() const {\n\t\tfloat_scalar_type norm;\n\t\tif (is_svd_tensor()) return get_svdtensor().svd_normf();\n\t\tstd::visit([&norm](auto& obj) {norm=obj->normf();}, tensor);\n\t\treturn norm;\n    }\n\n\n    /// Inplace multiplication by scalar of supported type (legacy name)\n\n    /// @param[in] x Scalar value\n    /// @return %Reference to this tensor\n    template <typename Q>\n\ttypename IsSupported<TensorTypeData<Q>,GenTensor<T>&>::type\n    scale(Q fac) {\n\t\tif (not is_assigned()) return *this;\n\t\tstd::visit([&fac](auto& obj) {obj->scale(T(fac));}, tensor);\n        return *this;\n    }\n\n    Tensor<T> full_tensor_copy() const {\n\t\tif (not is_assigned()) return Tensor<T>();\n\t\telse if (is_full_tensor()) return copy(get_tensor());\n\t\telse if (is_svd_tensor()) return get_svdtensor().reconstruct();\n\t\telse if (is_tensortrain()) return get_tensortrain().reconstruct();\n        else {\n            MADNESS_EXCEPTION(\"you should not be here\",1);\n        }\n        return Tensor<T>();\n    }\n\n\t/// return a view (shallow copy) of the full tensor, if possible,\n\t/// otherwise reconstruct to full tensor and return a deep copy\n    Tensor<T> full_tensor() const {\n\t\tif (is_full_tensor()) return get_tensor();\n\t\treturn full_tensor_copy();\n    }\n\n\t/// return a reference of the full tensor, presumably for in-place modification\n\t/// WARNING: works only if this is indeed a full tensor\n\tTensor<T>& full_tensor() {\n\t\tMADNESS_ASSERT(is_full_tensor());\n\t\treturn get_tensor();\n    }\n\n\n    /// reconstruct this to return a full tensor\n    Tensor<T> reconstruct_tensor() const {\n\n\t\tif (is_full_tensor()) return full_tensor();\n\t\tif (is_svd_tensor() or is_tensortrain()) return full_tensor_copy();\n        return Tensor<T>();\n    }\n\n\n    static double facReduce() {return 1.e-3;}\n    static double fac_reduce() {return 1.e-3;}\n\n    long rank() const {\n\t\tif (is_full_tensor()) return -1;\n\t\telse if (is_svd_tensor()) return get_svdtensor().rank();\n\t\telse if (is_tensortrain()) {\n\t\t\tstd::vector<long> r=get_tensortrain().ranks();\n            return *(std::max_element(r.begin(), r.end()));\n        }\n        return 0l;\n    }\n\n\tbool is_assigned() const {\n\t\treturn ptr() ? true : false;\n\t}\n\n\tbool has_data() const {return size()>0;}\n\n    bool has_no_data() const {return (not has_data());}\n\n    long size() const {\n\t\treturn (is_assigned()) ? ptr()->size() : 0;\n\t}\n\n\tlong nCoeff() const {\n\t\tif (is_full_tensor()) return get_tensor().size();\n\t\telse if (is_svd_tensor()) return get_svdtensor().nCoeff();\n\t\telse if (is_tensortrain()) return get_tensortrain().real_size();\n        else {\n            MADNESS_EXCEPTION(\"you should not be here\",1);\n        }\n        return false;\n    }\n\n    long real_size() const {\n\t\tif (is_full_tensor()) return get_tensor().size();\n\t\telse if (is_svd_tensor()) return get_svdtensor().real_size();\n\t\telse if (is_tensortrain()) return get_tensortrain().real_size();\n        else {\n            MADNESS_EXCEPTION(\"you should not be here\",1);\n        }\n        return false;\n    }\n\n    /// returns the trace of <this|rhs>\n    template<typename Q>\n\tTENSOR_RESULT_TYPE(T,Q) trace_conj(const GenTensor<Q>& rhs) const {\n\n        if (TensorTypeData<T>::iscomplex) MADNESS_EXCEPTION(\"no complex trace in LowRankTensor, sorry\",1);\n        if (TensorTypeData<Q>::iscomplex) MADNESS_EXCEPTION(\"no complex trace in LowRankTensor, sorry\",1);\n\n        typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n        // fast return if possible\n        if ((this->rank()==0) or (rhs.rank()==0)) return resultT(0.0);\n\n\t\tMADNESS_ASSERT(is_same_tensor_type(*this,rhs));\n\n\t\tif (is_full_tensor()) return get_tensor().trace_conj(rhs.get_tensor());\n\t\telse if (is_svd_tensor()) return trace(get_svdtensor(),rhs.get_svdtensor());\n\t\telse if (is_tensortrain()) return get_tensortrain().trace(rhs.get_tensortrain());\n        else {\n            MADNESS_EXCEPTION(\"you should not be here\",1);\n        }\n        return TENSOR_RESULT_TYPE(T,Q)(0);\n    }\n\n    /// multiply with a number\n    template<typename Q>\n\tGenTensor<TENSOR_RESULT_TYPE(T,Q)> operator*(const Q& x) const {\n\t\tGenTensor<TENSOR_RESULT_TYPE(T,Q)> result(copy(*this));\n        result.scale(x);\n        return result;\n    }\n\n\tGenTensor operator+(const GenTensor& other) {\n\t\tGenTensor<T> result=copy(*this);\n\t\tresult.gaxpy(1.0,other,1.0);\n\t\treturn result;\n\t}\n\n\tGenTensor operator+(const SliceLowRankTensor<T>& other) {\n\t\tGenTensor<T> result=copy(*this);\n\t\tstd::array<Slice,TENSOR_MAXDIM> s0;\n\t\ts0.fill(_);\n\t\tresult.gaxpy(1.0,s0,other,1.0,other.thisslice);\n\t\treturn result;\n\t}\n\n\tGenTensor& operator+=(const GenTensor& other) {\n        gaxpy(1.0,other,1.0);\n        return *this;\n    }\n\n\tGenTensor& operator+=(const SliceLowRankTensor<T>& other) {\n\t\tstd::array<Slice,TENSOR_MAXDIM> s0;\n\t\ts0.fill(_);\n\t\tthis->gaxpy(1.0,s0,other,1.0,other.thisslice);\n\t\treturn *this;\n\t}\n\n\tGenTensor operator-(const GenTensor& other) {\n\t\tGenTensor<T> result=copy(*this);\n\t\tresult.gaxpy(1.0,other,-1.0);\n\t\treturn result;\n\t}\n\n\tGenTensor& operator-=(const GenTensor& other) {\n        gaxpy(1.0,other,-1.0);\n        return *this;\n    }\n\n\tGenTensor& operator-=(const SliceLowRankTensor<T>& other) {\n\t\tstd::array<Slice,TENSOR_MAXDIM> s0;\n\t\ts0.fill(_);\n\t\tthis->gaxpy(1.0,s0,other,-1.0,other.thisslice);\n\t\treturn *this;\n\t}\n\n\tGenTensor& gaxpy(const T alpha, const GenTensor& other, const T beta) {\n\n\t\t// deliberately excluding gaxpys for different tensors due to efficiency considerations!\n\t\tMADNESS_ASSERT(is_same_tensor_type(*this,other));\n\t\tMADNESS_ASSERT(is_assigned());\n\t\tif (is_full_tensor()) get_tensor().gaxpy(alpha,other.get_tensor(),beta);\n\t\telse if (is_svd_tensor()) get_svdtensor().gaxpy(alpha,other.get_svdtensor(),beta);\n\t\telse if (is_tensortrain()) get_tensortrain().gaxpy(alpha,other.get_tensortrain(),beta);\n\t\telse {\n\t\t\tMADNESS_EXCEPTION(\"unknown tensor type in LowRankTensor::gaxpy\",1);\n\t\t}\n\t\treturn *this;\n\t}\n\n\tGenTensor& gaxpy(const T alpha, std::array<Slice,TENSOR_MAXDIM> s0,\n\t\t\tconst GenTensor& other, const T beta, std::array<Slice,TENSOR_MAXDIM> s1) {\n\n\t\t// deliberately excluding gaxpys for different tensors due to efficiency considerations!\n\t\tMADNESS_ASSERT(is_same_tensor_type(*this,other));\n\t\tMADNESS_ASSERT(is_assigned());\n\n\t\tif (is_full_tensor()) {\n\t\t\tget_tensor()(s0).gaxpy(alpha,other.get_tensor()(s1),beta);\n\t\t} else if (is_svd_tensor()) {\n\t\t\tget_svdtensor().inplace_add(other.get_svdtensor(),s0,s1,alpha,beta);\n\t\t} else if (is_tensortrain()) {\n\t\t\tMADNESS_ASSERT(alpha==1.0);\n\t\t\tget_tensortrain().gaxpy(s0, other.get_tensortrain(), beta, s1);\n        } else {\n\t\t\tMADNESS_EXCEPTION(\"unknown tensor type in LowRankTensor::gaxpy\",1);\n        }\n        return *this;\n    }\n\n    /// assign a number to this tensor\n\tGenTensor& operator=(const T& number) {\n\t\tstd::visit([&number](auto& obj) {*obj=number;}, tensor);\n        return *this;\n\n    }\n\n\tvoid add_SVD(const GenTensor& other, const double& thresh) {\n\t\tif (is_full_tensor()) get_tensor()+=other.get_tensor();\n\t\telse if (is_svd_tensor()) get_svdtensor().add_SVD(other.get_svdtensor(),thresh*facReduce());\n\t\telse if (is_tensortrain()) get_tensortrain()+=(other.get_tensortrain());\n        else {\n\t\t\tMADNESS_EXCEPTION(\"unknown tensor type in LowRankTensor::add_SVD\",1);\n        }\n    }\n\n    /// Inplace multiply by corresponding elements of argument Tensor\n\tGenTensor<T>& emul(const GenTensor<T>& other) {\n\n\t\t// deliberately excluding emuls for different tensors due to efficiency considerations!\n\t\tMADNESS_ASSERT(is_same_tensor_type(*this,other));\n\n\t\t// binary operation with the visitor pattern\n\t\t//        std::visit([&other](auto& obj) {obj.emul(other.tensor);}, tensor);\n\t\tif (is_full_tensor()) get_tensor().emul(other.get_tensor());\n\t\telse if (is_svd_tensor()) get_svdtensor().emul(other.get_svdtensor());\n\t\telse if (is_tensortrain()) get_tensortrain().emul(other.get_tensortrain());\n\t\telse {\n\t\t\tMADNESS_EXCEPTION(\"unknown tensor type in LowRankTensor::gaxpy\",1);\n        }\n        return *this;\n\n\t}\n\n    void reduce_rank(const double& thresh) {\n\t\tif (is_svd_tensor()) get_svdtensor().divide_and_conquer_reduce(thresh*facReduce());\n\t\tif (is_tensortrain()) get_tensortrain().truncate(thresh*facReduce());\n    }\n\n\npublic:\n\n    /// Transform all dimensions of the tensor t by the matrix c\n\n    /// \\ingroup tensor\n    /// Often used to transform all dimensions from one basis to another\n    /// \\code\n    /// result(i,j,k...) <-- sum(i',j', k',...) t(i',j',k',...) c(i',i) c(j',j) c(k',k) ...\n    /// \\endcode\n    /// The input dimensions of \\c t must all be the same and agree with\n    /// the first dimension of \\c c .  The dimensions of \\c c may differ in\n    /// size.\n\ttemplate <typename R, typename Q>\n\tfriend GenTensor<TENSOR_RESULT_TYPE(R,Q)> transform(\n\t\t\tconst GenTensor<R>& t, const Tensor<Q>& c);\n\n    /// Transform all dimensions of the tensor t by distinct matrices c\n\n    /// \\ingroup tensor\n    /// Similar to transform but each dimension is transformed with a\n    /// distinct matrix.\n    /// \\code\n    /// result(i,j,k...) <-- sum(i',j', k',...) t(i',j',k',...) c[0](i',i) c[1](j',j) c[2](k',k) ...\n    /// \\endcode\n    /// The first dimension of the matrices c must match the corresponding\n\t/// dimension of t.    template <typename R, typename Q>\n\ttemplate <typename R, typename Q>\n\tfriend GenTensor<TENSOR_RESULT_TYPE(R,Q)> general_transform(\n\t\t\tconst GenTensor<R>& t, const Tensor<Q> c[]);\n\n    /// Transforms one dimension of the tensor t by the matrix c, returns new contiguous tensor\n\n    /// \\ingroup tensor\n    /// \\code\n    /// transform_dir(t,c,1) = r(i,j,k,...) = sum(j') t(i,j',k,...) * c(j',j)\n    /// \\endcode\n\t/// @param[in] t Tensor to transform (size of dim to be transformed must match size of first dim of \\c c )\n    /// @param[in] c Matrix used for the transformation\n    /// @param[in] axis Dimension (or axis) to be transformed\n\t/// @result Returns a new, contiguous tensor    template <typename R, typename Q>\n\ttemplate <typename R, typename Q>\n\tfriend GenTensor<TENSOR_RESULT_TYPE(R,Q)> transform_dir(\n\t\t\tconst GenTensor<R>& t, const Tensor<Q>& c, const int axis);\n\n\n\tstd::string what_am_i() const {\n\t\tTensorType tt;\n\t\tif (this->is_full_tensor()) tt=TT_FULL;\n\t\tif (this->is_svd_tensor()) tt=TT_2D;\n\t\tif (this->is_tensortrain()) tt=TT_TENSORTRAIN;\n\t\treturn TensorArgs::what_am_i(tt);\n\t};\n\n\n\t/// might return a NULL pointer!\n\tconst BaseTensor* ptr() const {\n\t\tconst BaseTensor* p;\n\t\tstd::visit([&p](auto& obj) {p=dynamic_cast<const BaseTensor*>(obj.get());}, tensor);\n\t\treturn p;\n        }\n\nprivate:\n\n\t/// holding the implementation of the low rank tensor representations\n\t//\tstd::variant<Tensor<T>, SVDTensor<T>, TensorTrain<T> > tensor;\n\tstd::variant<std::shared_ptr<Tensor<T> >,\n\tstd::shared_ptr<SVDTensor<T> >,\n\tstd::shared_ptr<TensorTrain<T> > > tensor;\n\n};\n\n\n\nnamespace archive {\n/// Serialize a tensor\ntemplate <class Archive, typename T>\nstruct ArchiveStoreImpl< Archive, GenTensor<T> > {\n\n\tfriend class GenTensor<T>;\n\t/// Stores the GenTensor to an archive\n\tstatic void store(const Archive& ar, const GenTensor<T>& t) {\n\t\tint index1=t.index();\n\t\tar & index1;\n\t\tif (index1==0) {\n\t\t\tconst Tensor<T>& tt=t.get_tensor();\n\t\t\tar & tt;\n\t\t} else if (index1==1) {\n\t\t\tconst SVDTensor<T>& tt=t.get_svdtensor();\n\t\t\tar & tt;\n\t\t} else if (index1==2) {\n\t\t\tconst TensorTrain<T>& tt=t.get_tensortrain();\n\t\t\tar & tt;\n\t\t}\n\t};\n};\n\n\n/// Deserialize a tensor ... existing tensor is replaced\ntemplate <class Archive, typename T>\nstruct ArchiveLoadImpl< Archive, GenTensor<T> > {\n\n\tfriend class GenTensor<T>;\n\t/// Replaces this GenTensor with one loaded from an archive\n\tstatic void load(const Archive& ar, GenTensor<T>& tensor) {\n\t\tint index=-2;\n\t\tar & index;\n\t\tif (index==0) {\n\t\t\tTensor<T> tt;\n\t\t\tar & tt;\n\t\t\ttensor=tt;\n\t\t} else if (index==1) {\n\t\t\tSVDTensor<T> tt;\n\t\t\tar & tt;\n\t\t\ttensor=tt;\n\t\t} else if (index==2) {\n\t\t\tTensorTrain<T> tt;\n\t\t\tar & tt;\n\t\t\ttensor=tt;\n\t\t} else if (index==-1) {\t // defined value: empty tensor\n\t\t\t;\n\t\t} else {\n\t\t\tMADNESS_EXCEPTION(\"unknow tensor type\",1);\n\t\t}\n\n\n\t};\n};\n};\n\n/// type conversion implies a deep copy\n\n/// @result Returns a new tensor that is a deep copy of the input\ntemplate <class Q, class T>\nGenTensor<Q> convert(const GenTensor<T>& other) {\n\n\t// simple return\n\tif (std::is_same<Q, T>::value) return copy(other);\n\n\tGenTensor<Q> result;\n\tif (other.is_full_tensor())\n\t\tresult=Tensor<Q>(convert<Q,T>(other.get_tensor()));\n\tif (other.is_svd_tensor())\n        MADNESS_EXCEPTION(\"no type conversion for SVDTensors\",1);\n\tif (other.is_tensortrain())\n        MADNESS_EXCEPTION(\"no type conversion for TensorTrain\",1);\n    return result;\n}\n\n\n/// change representation to targ.tt\ntemplate<typename T>\nvoid change_tensor_type(GenTensor<T>& t, const TensorArgs& targs) {\n\tt.convert_inplace(targs);\n}\n\n/// outer product of two Tensors, yielding a low rank tensor\n\n/// do the outer product of two tensors; distinguish these tensortype cases by\n/// the use of final_tensor_type\n///  - full x full -> full\n///  - full x full -> SVD                           ( default )\n///  - TensorTrain x TensorTrain -> TensorTrain\n/// all other combinations are currently invalid.\ntemplate <class T, class Q>\nGenTensor<TENSOR_RESULT_TYPE(T,Q)> outer(const GenTensor<T>& t1,\n\t\tconst GenTensor<Q>& t2, const TensorArgs final_tensor_args=TensorArgs(-1.0,TT_2D)) {\n\n    typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n\n\n\tMADNESS_ASSERT(is_same_tensor_type(t1,t2));\n\n    if (final_tensor_args.tt==TT_FULL) {\n\t\tMADNESS_ASSERT(t1.is_full_tensor());\n\t\tTensor<resultT> t(outer(t1.get_tensor(),t2.get_tensor()));\n\t\treturn GenTensor<resultT>(t);\n\n    } else if (final_tensor_args.tt==TT_2D) {\n\t\tMADNESS_ASSERT(t1.is_full_tensor());\n\n        // srconf is shallow, do deep copy here\n        const Tensor<T> lhs=t1.full_tensor_copy();\n        const Tensor<Q> rhs=t2.full_tensor_copy();\n\n        const long k=lhs.dim(0);\n\t\tconst long ndim=lhs.ndim()+rhs.ndim();\n        long size=1;\n        for (int i=0; i<lhs.ndim(); ++i) size*=k;\n        MADNESS_ASSERT(size==lhs.size());\n        MADNESS_ASSERT(size==rhs.size());\n        MADNESS_ASSERT(lhs.size()==rhs.size());\n\n        Tensor<double> weights(1);\n        weights=1.0;\n\n\t\tstd::array<long,TENSOR_MAXDIM> dims;\n\t\tfor (int i=0; i<t1.ndim(); ++i) dims[i]=t1.dim(i);\n\t\tfor (int i=0; i<t2.ndim(); ++i) dims[i+t1.ndim()]=t2.dim(i);\n\n\t\tSRConf<resultT> srconf(weights,lhs.reshape(1,lhs.size()),rhs.reshape(1,rhs.size()),ndim,dims.data(),t1.ndim());\n//        srconf.normalize();\n\t\treturn GenTensor<resultT>(SVDTensor<resultT>(srconf));\n\n    } else if (final_tensor_args.tt==TT_TENSORTRAIN) {\n\t\tMADNESS_ASSERT(t1.is_tensortrain());\n\t\tMADNESS_ASSERT(t2.is_tensortrain());\n\t\treturn outer(t1.get_tensortrain(),t2.get_tensortrain());\n    } else {\n        MADNESS_EXCEPTION(\"you should not be here\",1);\n    }\n\treturn GenTensor<TENSOR_RESULT_TYPE(T,Q)>();\n\n            }\n\n\n/// outer product of two Tensors, yielding a low rank tensor\ntemplate <class T, class Q>\nGenTensor<TENSOR_RESULT_TYPE(T,Q)> outer(const Tensor<T>& lhs2,\n\t\tconst Tensor<Q>& rhs2, const TensorArgs final_tensor_args) {\n\n\ttypedef TENSOR_RESULT_TYPE(T,Q) resultT;\n\n\t// prepare lo-dim tensors for the outer product\n\tTensorArgs targs;\n\ttargs.thresh=final_tensor_args.thresh;\n\tif (final_tensor_args.tt==TT_FULL) targs.tt=TT_FULL;\n\telse if (final_tensor_args.tt==TT_2D) targs.tt=TT_FULL;\n\telse if (final_tensor_args.tt==TT_TENSORTRAIN) targs.tt=TT_TENSORTRAIN;\n\telse {\n\t\tMADNESS_EXCEPTION(\"confused tensor args in outer_low_rank\",1);\n                }\n\n\tGenTensor<T> lhs(lhs2,targs);\n\tGenTensor<Q> rhs(rhs2,targs);\n\tGenTensor<resultT> result=outer(lhs,rhs,final_tensor_args);\n\treturn result;\n            }\n\n\n/// The class defines tensor op scalar ... here define scalar op tensor.\ntemplate <typename T, typename Q>\ntypename IsSupported < TensorTypeData<Q>, GenTensor<T> >::type\noperator*(const Q& x, const GenTensor<T>& t) {\n    return t*x;\n}\n\n/// add all the GenTensors of a given list\n\n /// If there are many tensors to add it's beneficial to do a sorted addition and start with\n /// those tensors with low ranks\n /// @param[in]  addends     a list with gentensors of same dimensions; will be destroyed upon return\n /// @param[in]  eps         the accuracy threshold\n /// @param[in]  are_optimal flag if the GenTensors in the list are already in SVD format (if TT_2D)\n /// @return     the sum GenTensor of the input GenTensors\n template<typename T>\nGenTensor<T> reduce(std::list<GenTensor<T> >& addends, double eps, bool are_optimal=false) {\n\n\t// fast return\n\taddends.remove_if([](auto element) {return not element.is_assigned();});\n\taddends.remove_if([](auto element) {return element.rank()==0;});\n\tif (addends.size()==0) return GenTensor<T>();\n\n\n\tif (addends.front().is_svd_tensor()) {\n\t\tstd::list<SVDTensor<T> > addends1;\n\t\tfor (auto a : addends) addends1.push_back(a.get_svdtensor());\n\t\treturn reduce(addends1,eps*GenTensor<T>::facReduce());\n      }\n\t// make error relative\n\teps=eps/addends.size();\n\n\t// if the addends are not in SVD format do that now so that we can call add_svd later\n\tif (not are_optimal) {\n\t\tfor (auto element : addends) element.reduce_rank(eps);\n\t}\n\n\t// remove zero ranks and sort the list according to the gentensor's ranks\n\taddends.remove_if([](auto element) {return element.rank()==0;});\n\tif (addends.size()==0) return GenTensor<T>();\n\taddends.sort([](auto element1, auto element2) {return element1.rank()<element2.rank();});\n\n\t// do the additions\n\tGenTensor<T> result=copy(addends.front());\n\taddends.pop_front();\n\tfor (auto element : addends) result.add_SVD(element,eps);\n\taddends.clear();\n\n      return result;\n}\n\n\n\n\n/// implements a temporary(!) slice of a LowRankTensor\ntemplate<typename T>\nclass SliceLowRankTensor : public GenTensor<T> {\n\t//class SliceLowRankTensor {\npublic:\n\n\tstd::array<Slice,TENSOR_MAXDIM> thisslice;\n\t//    GenTensor<T>* lrt;\n\n    // all ctors are private, only accessible by GenTensor\n\n    /// default ctor\n    SliceLowRankTensor() {}\n\n    /// ctor with a GenTensor; shallow\n\tSliceLowRankTensor(const GenTensor<T>& gt, const std::vector<Slice>& s)\n    \t\t\t\t: GenTensor<T>(const_cast<GenTensor<T>& > (gt)) {\n\t\t//        : Tensor<T>(const_cast<Tensor<T>&>(t)) //!!!!!!!!!!!\n\t\tthisslice.fill(_);\n\t\tfor (int i=0; i<s.size(); ++i) thisslice[i]=s[i];\n\t}\n\n\t/// ctor with a GenTensor; shallow\n\tSliceLowRankTensor(const GenTensor<T>& gt, const std::array<Slice,TENSOR_MAXDIM>& s)\n    \t\t\t\t: GenTensor<T>(&gt), thisslice(s) {}\n\npublic:\n\n    /// assignment as in g(s) = g1;\n\tSliceLowRankTensor<T>& operator=(const GenTensor<T>& rhs) {\n        print(\"You don't want to assign to a SliceLowRankTensor; use operator+= instead\");\n        MADNESS_ASSERT(0);\n        return *this;\n    };\n\n    /// assignment as in g(s) = g1(s);\n    SliceLowRankTensor<T>& operator=(const SliceLowRankTensor<T>& rhs) {\n        print(\"You don't want to assign to a SliceLowRankTensor; use operator+= instead\");\n        MADNESS_ASSERT(0);\n        return *this;\n    };\n\n    /// inplace addition as in g(s)+=g1\n\tSliceLowRankTensor<T>& operator+=(const GenTensor<T>& rhs) {\n\t\tstd::array<Slice,TENSOR_MAXDIM> rhs_slice;\n\t\trhs_slice.fill(_);\n\t\tgaxpy(thisslice,rhs,rhs_slice,1.0);\n        return *this;\n    }\n\n    /// inplace subtraction as in g(s)-=g1\n\tSliceLowRankTensor<T>& operator-=(const GenTensor<T>& rhs) {\n\t\tstd::array<Slice,TENSOR_MAXDIM> rhs_slice;\n\t\trhs_slice.fill(_);\n\t\tgaxpy(thisslice,rhs,rhs_slice,-1.0);\n        return *this;\n    }\n\n    /// inplace addition as in g(s)+=g1(s)\n    SliceLowRankTensor<T>& operator+=(const SliceLowRankTensor<T>& rhs) {\n\t\tgaxpy(thisslice,rhs,rhs.thisslice,1.0);\n\t\treturn *this;\n\t}\n\n\t/// inplace addition as in g(s)-=g1(s)\n\tSliceLowRankTensor<T>& operator-=(const SliceLowRankTensor<T>& rhs) {\n\t\tgaxpy(thisslice,rhs,rhs.thisslice,-1.0);\n\t\treturn *this;\n\t}\n\n\t/// *this = *this(s) + beta * rhs\n\tvoid gaxpy(const std::array<Slice,TENSOR_MAXDIM>& lslice, const GenTensor<T>& rhs,\n\t\t\tconst std::array<Slice,TENSOR_MAXDIM>& rslice, const double& beta) {\n\n        // fast return if possible\n\t\tif (rhs.has_no_data() or rhs.rank()==0) return;\n\n\t\tif (this->has_data()) MADNESS_ASSERT(is_same_tensor_type(*this,rhs));\n\n\t\tif (this->is_full_tensor()) {\n\t\t\tthis->get_tensor()(thisslice).gaxpy(1.0,rhs.get_tensor()(rslice),beta);\n\n\t\t} else if (this->is_svd_tensor()) {\n\t\t\tthis->get_svdtensor().inplace_add(rhs.get_svdtensor(),thisslice,rslice, 1.0, beta);\n\n\t\t} else if (this->is_tensortrain()) {\n\t\t\tthis->get_tensortrain().gaxpy(thisslice,rhs.get_tensortrain(),beta,rslice);\n        }\n\t\treturn ;\n    }\n\n    /// inplace zero-ing as in g(s)=0.0\n    SliceLowRankTensor<T>& operator=(const T& number) {\n        MADNESS_ASSERT(number==T(0.0));\n\n\t\tif (this->is_full_tensor()) {\n\t\t\tthis->get_tensor()(thisslice)=0.0;\n\n\t\t} else if (this->is_svd_tensor()) {\n\t\t\tMADNESS_ASSERT(this->get_svdtensor().has_structure());\n\t\t\tSliceLowRankTensor<T> tmp(*this);\n\t\t\tthis->get_svdtensor().inplace_add(tmp.get_svdtensor(),thisslice,thisslice, 1.0, -1.0);\n\n\t\t} else if (this->is_tensortrain()) {\n\t\t\tthis->get_tensortrain().gaxpy(thisslice,this->get_tensortrain(),-1.0,thisslice);\n\t\t} else {\n\t\t\tMADNESS_EXCEPTION(\"you should not be here\",1);\n        }\n        return *this;\n    }\n\n\tfriend GenTensor<T> copy(const SliceLowRankTensor<T>& other) {\n\t\tGenTensor<T> result;\n\t\tconst std::array<Slice,TENSOR_MAXDIM> s=other.thisslice;\n\t\tif (other.is_full_tensor())\n\t\t\tresult=Tensor<T>(copy(other.get_tensor()(s)));\n\t\telse if (other.is_svd_tensor())\n\t\t\tresult=SVDTensor<T>(other.get_svdtensor().copy_slice(s));\n\t\telse if (other.is_tensortrain())\n\t\t\tresult=TensorTrain<T>(copy(other.get_tensortrain(),s));\n        else {\n\t\t}\n\t\treturn result;\n\t}\n\n\n};\n\n\ntemplate<typename Q, typename R>\nbool is_same_tensor_type(const GenTensor<R>& rhs, const GenTensor<Q>& lhs) {\n\treturn (rhs.tensor.index()==lhs.tensor.index());\n}\n\ntemplate <typename R, typename Q>\nGenTensor<TENSOR_RESULT_TYPE(R,Q)> transform(\n\t\tconst GenTensor<R>& t, const Tensor<Q>& c) {\n\ttypedef TENSOR_RESULT_TYPE(R,Q) resultT;\n\tGenTensor<resultT> result;\n\tstd::visit([&result, &c](auto& obj) {result=transform(*obj,c);}, t.tensor);\n\treturn result;\n        }\n\ntemplate <typename R, typename Q>\nGenTensor<TENSOR_RESULT_TYPE(R,Q)> general_transform(\n\t\tconst GenTensor<R>& t, const Tensor<Q> c[]) {\n\ttypedef TENSOR_RESULT_TYPE(R,Q) resultT;\n\tGenTensor<resultT> result;\n\tstd::visit([&result, &c](auto& obj) {result=general_transform(*obj,c);}, t.tensor);\n\treturn result;\n}\n\ntemplate <typename R, typename Q>\nGenTensor<TENSOR_RESULT_TYPE(R,Q)> transform_dir(\n\t\tconst GenTensor<R>& t, const Tensor<Q>& c, const int axis) {\n\tGenTensor<TENSOR_RESULT_TYPE(R,Q)> result;\n\tstd::visit([&result, &c, &axis](auto& obj) {result=transform_dir(*obj,c,axis);}, t.tensor);\n        return result;\n\n    }\n\n\n\n} // namespace madness\n\n#endif /* MADNESS_TENSOR_LOWRANKTENSOR_H_ */\n"
  },
  {
    "path": "src/madness/tensor/miketest.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#include <iostream>\n#include <cstdio>\n#include <complex>\n#include <cmath>\n#include <cstdlib>\n#include <ctime>\n\n#include \"tensor.h\"\nusing madness::Tensor;\n\n\nint main() {\n\n    int k = 10;\n    int twok = 2*k;\n    double ops = 2*3*twok*twok*twok*twok;\n    long times = 10000;\n    double million = 1e6;\n    double used;\n    double mops;\n    double start;\n\n    Tensor<double> x = Tensor<double>(2*k,2*k,2*k);\n    Tensor<double> r = Tensor<double>(2*k,2*k,2*k);\n    Tensor<double> w = Tensor<double>(2*k,2*k,2*k);\n    Tensor<double> c = Tensor<double>(2*k,2*k);\n\n    start = std::clock();\n    for (long i=0; i<times; ++i) {\n        r = transform(x,c);\n    }\n    used = (double)(std::clock()-start)/(double)CLOCKS_PER_SEC;\n    mops = ((double)times*ops)/(used*million);\n    std::cout << \"TRANSFORM MOPS=\" << mops << \"   \"\n    << used << \"   \"<< times << \"   \"<< ops << \"   \"<< million << std::endl;\n\n\n    start = std::clock();\n    for (long i=0; i<times; ++i) {\n        fast_transform(x,c,r,w);\n    }\n    used = (double)(std::clock()-start)/(double)CLOCKS_PER_SEC;\n    mops = ((double)times*ops)/(used*million);\n    std::cout << \"TRANSFORM MOPS=\" << mops << \"   \"\n    << used << \"   \"<< times << \"   \"<< ops << \"   \"<< million << std::endl;\n\n    start = std::clock();\n    for (long i=0; i<times; ++i) {\n        r = transform3d(x,c);\n    }\n    used = (double)(std::clock()-start)/(double)CLOCKS_PER_SEC;\n    mops = ((double)times*ops)/(used*million);\n    std::cout << \"TRANSFORM MOPS=\" << mops << \"   \"\n    << used << \"   \"<< times << \"   \"<< ops << \"   \"<< million << std::endl;\n\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_bg/Makefile",
    "content": "MY_ROOT=.\nDEBUG=YES\n#HPM_PROFILING=YES\n\nifndef TARGET\n$(error You must set TARGET to BGP or BGQ)\nendif\n\n#############################################\n\nifeq ($(TARGET),BGP)\n\n\n   RM = rm\n   RMFLAGS = -f\n\n   AR = powerpc-bgp-linux-ar\n   ARFLAGS = cru\n   RANLIB = powerpc-bgp-linux-ranlib\n   HAVE_BGPIBM = -DHAVE_IBMBGP\n\n   LIB=-L$(MY_ROOT)\n   INC=-I$(MY_ROOT)\n\n   CC=mpixlc_r\n   CXX=mpixlcxx_r\n   COPT= -g -O5 -qarch=450d -qtune=450 -qthreaded #-qpath=ILbc:/soft/apps/xlC-interim-fix-virtualthunk/exe/\n   CXXFLAGS=$(INC) $(COPT) $(HAVE_BGPIBM)\n   CPP=$(CC) -E\n\n   LD=$(CC)\n   LDFLAGS= -O3 -qarch=450d -qtune=450 -qthreaded\n\n   OBJECTS = bgp_cc.o  bgp_cr.o  bgp_rc.o bgp_rr.o\nendif\n\n\nifeq ($(TARGET),BGQ)\n   RM = rm\n   RMFLAGS = -f\n\n   AR = powerpc64-bgq-linux-ar\n   ARFLAGS = cru\n   RANLIB = powerpc64-bgq-linux-ranlib\n   HAVE_BGQIBM = -DHAVE_IBMBGQ\n\n   LIB=-L$(MY_ROOT)\n   INC=-I$(MY_ROOT) -I/bgsys/drivers/ppcfloor/\n\n   #CC=/home/projects/llvm/bin/bgclang\n   #CXX=/home/projects/llvm/bin/bgclang++\n   #COPT= -O3\n   #LDFLAGS= -O3\n\n   CC=bgxlc_r\n   CXX=bgxlc++_r\n   COPT= -g -O5 -qhot=level=1 -qsimd=auto -qtune=qp -qarch=qp\n   CXXFLAGS=$(INC) $(COPT) $(HAVE_BGQIBM)\n   LDFLAGS= -O3 -qarch=qp -qtune=qp -qthreaded\n   CPP=$(CC) -E\n\n   LD=$(CC)\n\n   OBJECTS = bgq_mtxm.o\nendif\n\nall: libMADMTXM.a\n\nrefresh: realclean all\n\nlibMADMTXM.a: $(OBJECTS)\n\trm -rf libMADMTXM.a\n\t$(AR) $(ARFLAGS) libMADMTXM.a $(OBJECTS)\n\t$(RANLIB) libMADMTXM.a\n\n$%.o: %.cc\n\t$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $(INC) $< -o $@\n\nclean:\n\t$(RM) $(RMFLAGS) *.o\n\nrealclean: clean\n\t$(RM) $(RMFLAGS) *.a\n\n\n\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_bg/README",
    "content": "This directory contains optimized code for BG/P and BG/Q.\nDo not delete!\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_bg/bgp_cc.cc",
    "content": "#include <builtins.h>\n#include <complex>\n\ntypedef std::complex<double> double_complex;\n\n#ifdef HAVE_IBMBGP\nnamespace madness {\n    void bgpmTxmq(long dimi, long dimj, long dimk, double_complex *  c_x,  const double_complex *  a_x,  const double_complex *  b_x) {\n        int i, j, k, ii;\n        double *  c = (double*)c_x;\n         double *  a = (double*)a_x;\n         double *  b = (double*)b_x;\n        __complex__ double _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_2_4, _c_2_5, _c_2_6, _c_2_7, _c_3_0, _c_3_1, _c_3_2, _c_3_3, _c_3_4, _c_3_5, _c_3_6, _c_3_7, _c_4_0, _c_4_1, _c_4_2, _c_4_3, _c_4_4, _c_4_5, _c_4_6, _c_4_7, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7;\n        double _a_0_0, _a_0_1, _a_0_2, _a_0_3, _a_0_4;\n         double _ai_0_0, _ai_0_1, _ai_0_2, _ai_0_3, _ai_0_4;\n        for (i=0; i+5<=dimi ; i+=5) {\n             double*  xb = b;\n            double*  xc = c;\n            for (j=dimj; j>4; j-=4,xc+=4*2,xb+=4*2) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_2_6 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_3_4 = __cmplx(0.0,0.0);\n                _c_3_6 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_4_4 = __cmplx(0.0,0.0);\n                _c_4_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _a_0_1 = *((pa+2));\n                    _ai_0_1 = *((pa+2)+1);\n                    _a_0_2 = *((pa+4));\n                    _ai_0_2 = *((pa+4)+1);\n                    _a_0_3 = *((pa+6));\n                    _ai_0_3 = *((pa+6)+1);\n                    _a_0_4 = *((pa+8));\n                    _ai_0_4 = *((pa+8)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_1_0 = __fxcxnpma(_c_1_0, _b_0_0, _ai_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_2_0 = __fxcxnpma(_c_2_0, _b_0_0, _ai_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_3_0 = __fxcxnpma(_c_3_0, _b_0_0, _ai_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_4_0 = __fxcxnpma(_c_4_0, _b_0_0, _ai_0_4);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_1_2 = __fxcxnpma(_c_1_2, _b_0_2, _ai_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_2_2 = __fxcxnpma(_c_2_2, _b_0_2, _ai_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _b_0_2, _a_0_3);\n                    _c_3_2 = __fxcxnpma(_c_3_2, _b_0_2, _ai_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _b_0_2, _a_0_4);\n                    _c_4_2 = __fxcxnpma(_c_4_2, _b_0_2, _ai_0_4);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_0_4 = __fxcxnpma(_c_0_4, _b_0_4, _ai_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _c_1_4 = __fxcxnpma(_c_1_4, _b_0_4, _ai_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _b_0_4, _a_0_2);\n                    _c_2_4 = __fxcxnpma(_c_2_4, _b_0_4, _ai_0_2);\n                    _c_3_4 = __fxcpmadd(_c_3_4, _b_0_4, _a_0_3);\n                    _c_3_4 = __fxcxnpma(_c_3_4, _b_0_4, _ai_0_3);\n                    _c_4_4 = __fxcpmadd(_c_4_4, _b_0_4, _a_0_4);\n                    _c_4_4 = __fxcxnpma(_c_4_4, _b_0_4, _ai_0_4);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_0_6 = __fxcxnpma(_c_0_6, _b_0_6, _ai_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _c_1_6 = __fxcxnpma(_c_1_6, _b_0_6, _ai_0_1);\n                    _c_2_6 = __fxcpmadd(_c_2_6, _b_0_6, _a_0_2);\n                    _c_2_6 = __fxcxnpma(_c_2_6, _b_0_6, _ai_0_2);\n                    _c_3_6 = __fxcpmadd(_c_3_6, _b_0_6, _a_0_3);\n                    _c_3_6 = __fxcxnpma(_c_3_6, _b_0_6, _ai_0_3);\n                    _c_4_6 = __fxcpmadd(_c_4_6, _b_0_6, _a_0_4);\n                    _c_4_6 = __fxcxnpma(_c_4_6, _b_0_6, _ai_0_4);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+2)*dimj*2+6, _c_2_6);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+3)*dimj*2+4, _c_3_4);\n                __stfpd(xc+(i+3)*dimj*2+6, _c_3_6);\n                __stfpd(xc+(i+4)*dimj*2+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj*2+2, _c_4_2);\n                __stfpd(xc+(i+4)*dimj*2+4, _c_4_4);\n                __stfpd(xc+(i+4)*dimj*2+6, _c_4_6);\n            }\n            if (j>3) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_2_6 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_3_4 = __cmplx(0.0,0.0);\n                _c_3_6 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_4_4 = __cmplx(0.0,0.0);\n                _c_4_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _a_0_1 = *((pa+2));\n                    _ai_0_1 = *((pa+2)+1);\n                    _a_0_2 = *((pa+4));\n                    _ai_0_2 = *((pa+4)+1);\n                    _a_0_3 = *((pa+6));\n                    _ai_0_3 = *((pa+6)+1);\n                    _a_0_4 = *((pa+8));\n                    _ai_0_4 = *((pa+8)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_1_0 = __fxcxnpma(_c_1_0, _b_0_0, _ai_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_2_0 = __fxcxnpma(_c_2_0, _b_0_0, _ai_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_3_0 = __fxcxnpma(_c_3_0, _b_0_0, _ai_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_4_0 = __fxcxnpma(_c_4_0, _b_0_0, _ai_0_4);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_1_2 = __fxcxnpma(_c_1_2, _b_0_2, _ai_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_2_2 = __fxcxnpma(_c_2_2, _b_0_2, _ai_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _b_0_2, _a_0_3);\n                    _c_3_2 = __fxcxnpma(_c_3_2, _b_0_2, _ai_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _b_0_2, _a_0_4);\n                    _c_4_2 = __fxcxnpma(_c_4_2, _b_0_2, _ai_0_4);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_0_4 = __fxcxnpma(_c_0_4, _b_0_4, _ai_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _c_1_4 = __fxcxnpma(_c_1_4, _b_0_4, _ai_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _b_0_4, _a_0_2);\n                    _c_2_4 = __fxcxnpma(_c_2_4, _b_0_4, _ai_0_2);\n                    _c_3_4 = __fxcpmadd(_c_3_4, _b_0_4, _a_0_3);\n                    _c_3_4 = __fxcxnpma(_c_3_4, _b_0_4, _ai_0_3);\n                    _c_4_4 = __fxcpmadd(_c_4_4, _b_0_4, _a_0_4);\n                    _c_4_4 = __fxcxnpma(_c_4_4, _b_0_4, _ai_0_4);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_0_6 = __fxcxnpma(_c_0_6, _b_0_6, _ai_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _c_1_6 = __fxcxnpma(_c_1_6, _b_0_6, _ai_0_1);\n                    _c_2_6 = __fxcpmadd(_c_2_6, _b_0_6, _a_0_2);\n                    _c_2_6 = __fxcxnpma(_c_2_6, _b_0_6, _ai_0_2);\n                    _c_3_6 = __fxcpmadd(_c_3_6, _b_0_6, _a_0_3);\n                    _c_3_6 = __fxcxnpma(_c_3_6, _b_0_6, _ai_0_3);\n                    _c_4_6 = __fxcpmadd(_c_4_6, _b_0_6, _a_0_4);\n                    _c_4_6 = __fxcxnpma(_c_4_6, _b_0_6, _ai_0_4);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+2)*dimj*2+6, _c_2_6);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+3)*dimj*2+4, _c_3_4);\n                __stfpd(xc+(i+3)*dimj*2+6, _c_3_6);\n                __stfpd(xc+(i+4)*dimj*2+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj*2+2, _c_4_2);\n                __stfpd(xc+(i+4)*dimj*2+4, _c_4_4);\n                __stfpd(xc+(i+4)*dimj*2+6, _c_4_6);\n            }\n            else if (j>2) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_3_4 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_4_4 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _a_0_1 = *((pa+2));\n                    _ai_0_1 = *((pa+2)+1);\n                    _a_0_2 = *((pa+4));\n                    _ai_0_2 = *((pa+4)+1);\n                    _a_0_3 = *((pa+6));\n                    _ai_0_3 = *((pa+6)+1);\n                    _a_0_4 = *((pa+8));\n                    _ai_0_4 = *((pa+8)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_1_0 = __fxcxnpma(_c_1_0, _b_0_0, _ai_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_2_0 = __fxcxnpma(_c_2_0, _b_0_0, _ai_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_3_0 = __fxcxnpma(_c_3_0, _b_0_0, _ai_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_4_0 = __fxcxnpma(_c_4_0, _b_0_0, _ai_0_4);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_1_2 = __fxcxnpma(_c_1_2, _b_0_2, _ai_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_2_2 = __fxcxnpma(_c_2_2, _b_0_2, _ai_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _b_0_2, _a_0_3);\n                    _c_3_2 = __fxcxnpma(_c_3_2, _b_0_2, _ai_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _b_0_2, _a_0_4);\n                    _c_4_2 = __fxcxnpma(_c_4_2, _b_0_2, _ai_0_4);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_0_4 = __fxcxnpma(_c_0_4, _b_0_4, _ai_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _c_1_4 = __fxcxnpma(_c_1_4, _b_0_4, _ai_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _b_0_4, _a_0_2);\n                    _c_2_4 = __fxcxnpma(_c_2_4, _b_0_4, _ai_0_2);\n                    _c_3_4 = __fxcpmadd(_c_3_4, _b_0_4, _a_0_3);\n                    _c_3_4 = __fxcxnpma(_c_3_4, _b_0_4, _ai_0_3);\n                    _c_4_4 = __fxcpmadd(_c_4_4, _b_0_4, _a_0_4);\n                    _c_4_4 = __fxcxnpma(_c_4_4, _b_0_4, _ai_0_4);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+3)*dimj*2+4, _c_3_4);\n                __stfpd(xc+(i+4)*dimj*2+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj*2+2, _c_4_2);\n                __stfpd(xc+(i+4)*dimj*2+4, _c_4_4);\n            }\n            else if (j>1) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _a_0_1 = *((pa+2));\n                    _ai_0_1 = *((pa+2)+1);\n                    _a_0_2 = *((pa+4));\n                    _ai_0_2 = *((pa+4)+1);\n                    _a_0_3 = *((pa+6));\n                    _ai_0_3 = *((pa+6)+1);\n                    _a_0_4 = *((pa+8));\n                    _ai_0_4 = *((pa+8)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_1_0 = __fxcxnpma(_c_1_0, _b_0_0, _ai_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_2_0 = __fxcxnpma(_c_2_0, _b_0_0, _ai_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_3_0 = __fxcxnpma(_c_3_0, _b_0_0, _ai_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_4_0 = __fxcxnpma(_c_4_0, _b_0_0, _ai_0_4);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_1_2 = __fxcxnpma(_c_1_2, _b_0_2, _ai_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_2_2 = __fxcxnpma(_c_2_2, _b_0_2, _ai_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _b_0_2, _a_0_3);\n                    _c_3_2 = __fxcxnpma(_c_3_2, _b_0_2, _ai_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _b_0_2, _a_0_4);\n                    _c_4_2 = __fxcxnpma(_c_4_2, _b_0_2, _ai_0_4);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+4)*dimj*2+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj*2+2, _c_4_2);\n            }\n            else {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _a_0_1 = *((pa+2));\n                    _ai_0_1 = *((pa+2)+1);\n                    _a_0_2 = *((pa+4));\n                    _ai_0_2 = *((pa+4)+1);\n                    _a_0_3 = *((pa+6));\n                    _ai_0_3 = *((pa+6)+1);\n                    _a_0_4 = *((pa+8));\n                    _ai_0_4 = *((pa+8)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_1_0 = __fxcxnpma(_c_1_0, _b_0_0, _ai_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_2_0 = __fxcxnpma(_c_2_0, _b_0_0, _ai_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_3_0 = __fxcxnpma(_c_3_0, _b_0_0, _ai_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_4_0 = __fxcxnpma(_c_4_0, _b_0_0, _ai_0_4);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+4)*dimj*2+0, _c_4_0);\n            }\n        }\n        for (; i+3<=dimi ; i+=3) {\n             double*  xb = b;\n            double*  xc = c;\n            for (j=dimj; j>4; j-=4,xc+=4*2,xb+=4*2) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_2_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _a_0_1 = *((pa+2));\n                    _ai_0_1 = *((pa+2)+1);\n                    _a_0_2 = *((pa+4));\n                    _ai_0_2 = *((pa+4)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_1_0 = __fxcxnpma(_c_1_0, _b_0_0, _ai_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_2_0 = __fxcxnpma(_c_2_0, _b_0_0, _ai_0_2);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_1_2 = __fxcxnpma(_c_1_2, _b_0_2, _ai_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_2_2 = __fxcxnpma(_c_2_2, _b_0_2, _ai_0_2);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_0_4 = __fxcxnpma(_c_0_4, _b_0_4, _ai_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _c_1_4 = __fxcxnpma(_c_1_4, _b_0_4, _ai_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _b_0_4, _a_0_2);\n                    _c_2_4 = __fxcxnpma(_c_2_4, _b_0_4, _ai_0_2);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_0_6 = __fxcxnpma(_c_0_6, _b_0_6, _ai_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _c_1_6 = __fxcxnpma(_c_1_6, _b_0_6, _ai_0_1);\n                    _c_2_6 = __fxcpmadd(_c_2_6, _b_0_6, _a_0_2);\n                    _c_2_6 = __fxcxnpma(_c_2_6, _b_0_6, _ai_0_2);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+2)*dimj*2+6, _c_2_6);\n            }\n            if (j>3) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_2_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _a_0_1 = *((pa+2));\n                    _ai_0_1 = *((pa+2)+1);\n                    _a_0_2 = *((pa+4));\n                    _ai_0_2 = *((pa+4)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_1_0 = __fxcxnpma(_c_1_0, _b_0_0, _ai_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_2_0 = __fxcxnpma(_c_2_0, _b_0_0, _ai_0_2);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_1_2 = __fxcxnpma(_c_1_2, _b_0_2, _ai_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_2_2 = __fxcxnpma(_c_2_2, _b_0_2, _ai_0_2);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_0_4 = __fxcxnpma(_c_0_4, _b_0_4, _ai_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _c_1_4 = __fxcxnpma(_c_1_4, _b_0_4, _ai_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _b_0_4, _a_0_2);\n                    _c_2_4 = __fxcxnpma(_c_2_4, _b_0_4, _ai_0_2);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_0_6 = __fxcxnpma(_c_0_6, _b_0_6, _ai_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _c_1_6 = __fxcxnpma(_c_1_6, _b_0_6, _ai_0_1);\n                    _c_2_6 = __fxcpmadd(_c_2_6, _b_0_6, _a_0_2);\n                    _c_2_6 = __fxcxnpma(_c_2_6, _b_0_6, _ai_0_2);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+2)*dimj*2+6, _c_2_6);\n            }\n            else if (j>2) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _a_0_1 = *((pa+2));\n                    _ai_0_1 = *((pa+2)+1);\n                    _a_0_2 = *((pa+4));\n                    _ai_0_2 = *((pa+4)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_1_0 = __fxcxnpma(_c_1_0, _b_0_0, _ai_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_2_0 = __fxcxnpma(_c_2_0, _b_0_0, _ai_0_2);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_1_2 = __fxcxnpma(_c_1_2, _b_0_2, _ai_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_2_2 = __fxcxnpma(_c_2_2, _b_0_2, _ai_0_2);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_0_4 = __fxcxnpma(_c_0_4, _b_0_4, _ai_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _c_1_4 = __fxcxnpma(_c_1_4, _b_0_4, _ai_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _b_0_4, _a_0_2);\n                    _c_2_4 = __fxcxnpma(_c_2_4, _b_0_4, _ai_0_2);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n            }\n            else if (j>1) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _a_0_1 = *((pa+2));\n                    _ai_0_1 = *((pa+2)+1);\n                    _a_0_2 = *((pa+4));\n                    _ai_0_2 = *((pa+4)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_1_0 = __fxcxnpma(_c_1_0, _b_0_0, _ai_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_2_0 = __fxcxnpma(_c_2_0, _b_0_0, _ai_0_2);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_1_2 = __fxcxnpma(_c_1_2, _b_0_2, _ai_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_2_2 = __fxcxnpma(_c_2_2, _b_0_2, _ai_0_2);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n            }\n            else {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _a_0_1 = *((pa+2));\n                    _ai_0_1 = *((pa+2)+1);\n                    _a_0_2 = *((pa+4));\n                    _ai_0_2 = *((pa+4)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_1_0 = __fxcxnpma(_c_1_0, _b_0_0, _ai_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_2_0 = __fxcxnpma(_c_2_0, _b_0_0, _ai_0_2);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n            }\n        }\n        for (; i+1<=dimi ; i+=1) {\n             double*  xb = b;\n            double*  xc = c;\n            for (j=dimj; j>4; j-=4,xc+=4*2,xb+=4*2) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_0_4 = __fxcxnpma(_c_0_4, _b_0_4, _ai_0_0);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_0_6 = __fxcxnpma(_c_0_6, _b_0_6, _ai_0_0);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n            }\n            if (j>3) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_0_4 = __fxcxnpma(_c_0_4, _b_0_4, _ai_0_0);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_0_6 = __fxcxnpma(_c_0_6, _b_0_6, _ai_0_0);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n            }\n            else if (j>2) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_0_4 = __fxcxnpma(_c_0_4, _b_0_4, _ai_0_0);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n            }\n            else if (j>1) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_0_2 = __fxcxnpma(_c_0_2, _b_0_2, _ai_0_0);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n            }\n            else {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                    _a_0_0 = *((pa+0));\n                    _ai_0_0 = *((pa+0)+1);\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_0_0 = __fxcxnpma(_c_0_0, _b_0_0, _ai_0_0);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n            }\n        }\n    }\n}\n#endif\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_bg/bgp_cr.cc",
    "content": "#include <builtins.h>\n#include <complex>\n\ntypedef std::complex<double> double_complex;\n\n#ifdef HAVE_IBMBGP\nnamespace madness {\n    void bgpmTxmq(long dimi, long dimj, long dimk, double_complex *  c_x,  const double_complex *  a_x,  const double  *  b_x) {\n        int i, j, k, ii;\n        double *  c = (double*)c_x;\n         double *  a = (double*)a_x;\n         double *  b = (double*)b_x;\n        __complex__ double _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_2_4, _c_2_5, _c_2_6, _c_2_7, _c_3_0, _c_3_1, _c_3_2, _c_3_3, _c_3_4, _c_3_5, _c_3_6, _c_3_7, _c_4_0, _c_4_1, _c_4_2, _c_4_3, _c_4_4, _c_4_5, _c_4_6, _c_4_7, _c_5_0, _c_5_1, _c_5_2, _c_5_3, _c_5_4, _c_5_5, _c_5_6, _c_5_7, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7;\n        double _a_0_0, _a_0_1, _a_0_2, _a_0_3, _a_0_4, _a_0_5;\n         __complex__ double _az_0_0, _az_0_1, _az_0_2, _az_0_3, _az_0_4, _az_0_5;\n         double _bz_0_0, _bz_0_1, _bz_0_2, _bz_0_3, _bz_0_4, _bz_0_5, _bz_0_6, _bz_0_7;\n        for (i=0; i+6<=dimi ; i+=6) {\n             double*  xb = b;\n            double*  xc = c;\n            for (j=dimj; j>4; j-=4,xc+=4*2,xb+=4) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_2_6 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_3_4 = __cmplx(0.0,0.0);\n                _c_3_6 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_4_4 = __cmplx(0.0,0.0);\n                _c_4_6 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                _c_5_2 = __cmplx(0.0,0.0);\n                _c_5_4 = __cmplx(0.0,0.0);\n                _c_5_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _az_0_2 = __lfpd((pa+4));\n                    _az_0_3 = __lfpd((pa+6));\n                    _az_0_4 = __lfpd((pa+8));\n                    _az_0_5 = __lfpd((pa+10));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _bz_0_0, _az_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _bz_0_0, _az_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _bz_0_0, _az_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _bz_0_0, _az_0_5);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _bz_0_2, _az_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _bz_0_2, _az_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _bz_0_2, _az_0_4);\n                    _c_5_2 = __fxcpmadd(_c_5_2, _bz_0_2, _az_0_5);\n                    _bz_0_4 = *((pb+2));\n                    _c_0_4 = __fxcpmadd(_c_0_4, _bz_0_4, _az_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _bz_0_4, _az_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _bz_0_4, _az_0_2);\n                    _c_3_4 = __fxcpmadd(_c_3_4, _bz_0_4, _az_0_3);\n                    _c_4_4 = __fxcpmadd(_c_4_4, _bz_0_4, _az_0_4);\n                    _c_5_4 = __fxcpmadd(_c_5_4, _bz_0_4, _az_0_5);\n                    _bz_0_6 = *((pb+3));\n                    _c_0_6 = __fxcpmadd(_c_0_6, _bz_0_6, _az_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _bz_0_6, _az_0_1);\n                    _c_2_6 = __fxcpmadd(_c_2_6, _bz_0_6, _az_0_2);\n                    _c_3_6 = __fxcpmadd(_c_3_6, _bz_0_6, _az_0_3);\n                    _c_4_6 = __fxcpmadd(_c_4_6, _bz_0_6, _az_0_4);\n                    _c_5_6 = __fxcpmadd(_c_5_6, _bz_0_6, _az_0_5);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+2)*dimj*2+6, _c_2_6);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+3)*dimj*2+4, _c_3_4);\n                __stfpd(xc+(i+3)*dimj*2+6, _c_3_6);\n                __stfpd(xc+(i+4)*dimj*2+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj*2+2, _c_4_2);\n                __stfpd(xc+(i+4)*dimj*2+4, _c_4_4);\n                __stfpd(xc+(i+4)*dimj*2+6, _c_4_6);\n                __stfpd(xc+(i+5)*dimj*2+0, _c_5_0);\n                __stfpd(xc+(i+5)*dimj*2+2, _c_5_2);\n                __stfpd(xc+(i+5)*dimj*2+4, _c_5_4);\n                __stfpd(xc+(i+5)*dimj*2+6, _c_5_6);\n            }\n            if (j>3) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_2_6 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_3_4 = __cmplx(0.0,0.0);\n                _c_3_6 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_4_4 = __cmplx(0.0,0.0);\n                _c_4_6 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                _c_5_2 = __cmplx(0.0,0.0);\n                _c_5_4 = __cmplx(0.0,0.0);\n                _c_5_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _az_0_2 = __lfpd((pa+4));\n                    _az_0_3 = __lfpd((pa+6));\n                    _az_0_4 = __lfpd((pa+8));\n                    _az_0_5 = __lfpd((pa+10));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _bz_0_0, _az_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _bz_0_0, _az_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _bz_0_0, _az_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _bz_0_0, _az_0_5);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _bz_0_2, _az_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _bz_0_2, _az_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _bz_0_2, _az_0_4);\n                    _c_5_2 = __fxcpmadd(_c_5_2, _bz_0_2, _az_0_5);\n                    _bz_0_4 = *((pb+2));\n                    _c_0_4 = __fxcpmadd(_c_0_4, _bz_0_4, _az_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _bz_0_4, _az_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _bz_0_4, _az_0_2);\n                    _c_3_4 = __fxcpmadd(_c_3_4, _bz_0_4, _az_0_3);\n                    _c_4_4 = __fxcpmadd(_c_4_4, _bz_0_4, _az_0_4);\n                    _c_5_4 = __fxcpmadd(_c_5_4, _bz_0_4, _az_0_5);\n                    _bz_0_6 = *((pb+3));\n                    _c_0_6 = __fxcpmadd(_c_0_6, _bz_0_6, _az_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _bz_0_6, _az_0_1);\n                    _c_2_6 = __fxcpmadd(_c_2_6, _bz_0_6, _az_0_2);\n                    _c_3_6 = __fxcpmadd(_c_3_6, _bz_0_6, _az_0_3);\n                    _c_4_6 = __fxcpmadd(_c_4_6, _bz_0_6, _az_0_4);\n                    _c_5_6 = __fxcpmadd(_c_5_6, _bz_0_6, _az_0_5);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+2)*dimj*2+6, _c_2_6);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+3)*dimj*2+4, _c_3_4);\n                __stfpd(xc+(i+3)*dimj*2+6, _c_3_6);\n                __stfpd(xc+(i+4)*dimj*2+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj*2+2, _c_4_2);\n                __stfpd(xc+(i+4)*dimj*2+4, _c_4_4);\n                __stfpd(xc+(i+4)*dimj*2+6, _c_4_6);\n                __stfpd(xc+(i+5)*dimj*2+0, _c_5_0);\n                __stfpd(xc+(i+5)*dimj*2+2, _c_5_2);\n                __stfpd(xc+(i+5)*dimj*2+4, _c_5_4);\n                __stfpd(xc+(i+5)*dimj*2+6, _c_5_6);\n            }\n            else if (j>2) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_3_4 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_4_4 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                _c_5_2 = __cmplx(0.0,0.0);\n                _c_5_4 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _az_0_2 = __lfpd((pa+4));\n                    _az_0_3 = __lfpd((pa+6));\n                    _az_0_4 = __lfpd((pa+8));\n                    _az_0_5 = __lfpd((pa+10));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _bz_0_0, _az_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _bz_0_0, _az_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _bz_0_0, _az_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _bz_0_0, _az_0_5);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _bz_0_2, _az_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _bz_0_2, _az_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _bz_0_2, _az_0_4);\n                    _c_5_2 = __fxcpmadd(_c_5_2, _bz_0_2, _az_0_5);\n                    _bz_0_4 = *((pb+2));\n                    _c_0_4 = __fxcpmadd(_c_0_4, _bz_0_4, _az_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _bz_0_4, _az_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _bz_0_4, _az_0_2);\n                    _c_3_4 = __fxcpmadd(_c_3_4, _bz_0_4, _az_0_3);\n                    _c_4_4 = __fxcpmadd(_c_4_4, _bz_0_4, _az_0_4);\n                    _c_5_4 = __fxcpmadd(_c_5_4, _bz_0_4, _az_0_5);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+3)*dimj*2+4, _c_3_4);\n                __stfpd(xc+(i+4)*dimj*2+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj*2+2, _c_4_2);\n                __stfpd(xc+(i+4)*dimj*2+4, _c_4_4);\n                __stfpd(xc+(i+5)*dimj*2+0, _c_5_0);\n                __stfpd(xc+(i+5)*dimj*2+2, _c_5_2);\n                __stfpd(xc+(i+5)*dimj*2+4, _c_5_4);\n            }\n            else if (j>1) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                _c_5_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _az_0_2 = __lfpd((pa+4));\n                    _az_0_3 = __lfpd((pa+6));\n                    _az_0_4 = __lfpd((pa+8));\n                    _az_0_5 = __lfpd((pa+10));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _bz_0_0, _az_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _bz_0_0, _az_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _bz_0_0, _az_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _bz_0_0, _az_0_5);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _bz_0_2, _az_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _bz_0_2, _az_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _bz_0_2, _az_0_4);\n                    _c_5_2 = __fxcpmadd(_c_5_2, _bz_0_2, _az_0_5);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+4)*dimj*2+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj*2+2, _c_4_2);\n                __stfpd(xc+(i+5)*dimj*2+0, _c_5_0);\n                __stfpd(xc+(i+5)*dimj*2+2, _c_5_2);\n            }\n            else {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _az_0_2 = __lfpd((pa+4));\n                    _az_0_3 = __lfpd((pa+6));\n                    _az_0_4 = __lfpd((pa+8));\n                    _az_0_5 = __lfpd((pa+10));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _bz_0_0, _az_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _bz_0_0, _az_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _bz_0_0, _az_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _bz_0_0, _az_0_5);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+4)*dimj*2+0, _c_4_0);\n                __stfpd(xc+(i+5)*dimj*2+0, _c_5_0);\n            }\n        }\n        for (; i+4<=dimi ; i+=4) {\n             double*  xb = b;\n            double*  xc = c;\n            for (j=dimj; j>4; j-=4,xc+=4*2,xb+=4) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_2_6 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_3_4 = __cmplx(0.0,0.0);\n                _c_3_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _az_0_2 = __lfpd((pa+4));\n                    _az_0_3 = __lfpd((pa+6));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _bz_0_0, _az_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _bz_0_0, _az_0_3);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _bz_0_2, _az_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _bz_0_2, _az_0_3);\n                    _bz_0_4 = *((pb+2));\n                    _c_0_4 = __fxcpmadd(_c_0_4, _bz_0_4, _az_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _bz_0_4, _az_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _bz_0_4, _az_0_2);\n                    _c_3_4 = __fxcpmadd(_c_3_4, _bz_0_4, _az_0_3);\n                    _bz_0_6 = *((pb+3));\n                    _c_0_6 = __fxcpmadd(_c_0_6, _bz_0_6, _az_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _bz_0_6, _az_0_1);\n                    _c_2_6 = __fxcpmadd(_c_2_6, _bz_0_6, _az_0_2);\n                    _c_3_6 = __fxcpmadd(_c_3_6, _bz_0_6, _az_0_3);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+2)*dimj*2+6, _c_2_6);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+3)*dimj*2+4, _c_3_4);\n                __stfpd(xc+(i+3)*dimj*2+6, _c_3_6);\n            }\n            if (j>3) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_2_6 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_3_4 = __cmplx(0.0,0.0);\n                _c_3_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _az_0_2 = __lfpd((pa+4));\n                    _az_0_3 = __lfpd((pa+6));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _bz_0_0, _az_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _bz_0_0, _az_0_3);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _bz_0_2, _az_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _bz_0_2, _az_0_3);\n                    _bz_0_4 = *((pb+2));\n                    _c_0_4 = __fxcpmadd(_c_0_4, _bz_0_4, _az_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _bz_0_4, _az_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _bz_0_4, _az_0_2);\n                    _c_3_4 = __fxcpmadd(_c_3_4, _bz_0_4, _az_0_3);\n                    _bz_0_6 = *((pb+3));\n                    _c_0_6 = __fxcpmadd(_c_0_6, _bz_0_6, _az_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _bz_0_6, _az_0_1);\n                    _c_2_6 = __fxcpmadd(_c_2_6, _bz_0_6, _az_0_2);\n                    _c_3_6 = __fxcpmadd(_c_3_6, _bz_0_6, _az_0_3);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+2)*dimj*2+6, _c_2_6);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+3)*dimj*2+4, _c_3_4);\n                __stfpd(xc+(i+3)*dimj*2+6, _c_3_6);\n            }\n            else if (j>2) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_2_4 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_3_4 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _az_0_2 = __lfpd((pa+4));\n                    _az_0_3 = __lfpd((pa+6));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _bz_0_0, _az_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _bz_0_0, _az_0_3);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _bz_0_2, _az_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _bz_0_2, _az_0_3);\n                    _bz_0_4 = *((pb+2));\n                    _c_0_4 = __fxcpmadd(_c_0_4, _bz_0_4, _az_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _bz_0_4, _az_0_1);\n                    _c_2_4 = __fxcpmadd(_c_2_4, _bz_0_4, _az_0_2);\n                    _c_3_4 = __fxcpmadd(_c_3_4, _bz_0_4, _az_0_3);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+2)*dimj*2+4, _c_2_4);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n                __stfpd(xc+(i+3)*dimj*2+4, _c_3_4);\n            }\n            else if (j>1) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _az_0_2 = __lfpd((pa+4));\n                    _az_0_3 = __lfpd((pa+6));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _bz_0_0, _az_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _bz_0_0, _az_0_3);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _bz_0_2, _az_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _bz_0_2, _az_0_3);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj*2+2, _c_2_2);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj*2+2, _c_3_2);\n            }\n            else {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _az_0_2 = __lfpd((pa+4));\n                    _az_0_3 = __lfpd((pa+6));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _bz_0_0, _az_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _bz_0_0, _az_0_3);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+2)*dimj*2+0, _c_2_0);\n                __stfpd(xc+(i+3)*dimj*2+0, _c_3_0);\n            }\n        }\n        for (; i+2<=dimi ; i+=2) {\n             double*  xb = b;\n            double*  xc = c;\n            for (j=dimj; j>4; j-=4,xc+=4*2,xb+=4) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _bz_0_4 = *((pb+2));\n                    _c_0_4 = __fxcpmadd(_c_0_4, _bz_0_4, _az_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _bz_0_4, _az_0_1);\n                    _bz_0_6 = *((pb+3));\n                    _c_0_6 = __fxcpmadd(_c_0_6, _bz_0_6, _az_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _bz_0_6, _az_0_1);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+1)*dimj*2+6, _c_1_6);\n            }\n            if (j>3) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _bz_0_4 = *((pb+2));\n                    _c_0_4 = __fxcpmadd(_c_0_4, _bz_0_4, _az_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _bz_0_4, _az_0_1);\n                    _bz_0_6 = *((pb+3));\n                    _c_0_6 = __fxcpmadd(_c_0_6, _bz_0_6, _az_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _bz_0_6, _az_0_1);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(xc+(i+1)*dimj*2+6, _c_1_6);\n            }\n            else if (j>2) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                    _bz_0_4 = *((pb+2));\n                    _c_0_4 = __fxcpmadd(_c_0_4, _bz_0_4, _az_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _bz_0_4, _az_0_1);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(xc+(i+1)*dimj*2+4, _c_1_4);\n            }\n            else if (j>1) {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                    _bz_0_2 = *((pb+1));\n                    _c_0_2 = __fxcpmadd(_c_0_2, _bz_0_2, _az_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _bz_0_2, _az_0_1);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj*2+2, _c_1_2);\n            }\n            else {\n                 double*  pb = xb;\n                 double*  pa = a+i*2;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                    _az_0_0 = __lfpd((pa+0));\n                    _az_0_1 = __lfpd((pa+2));\n                    _bz_0_0 = *((pb+0));\n                    _c_0_0 = __fxcpmadd(_c_0_0, _bz_0_0, _az_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _bz_0_0, _az_0_1);\n                }\n                __stfpd(xc+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(xc+(i+1)*dimj*2+0, _c_1_0);\n            }\n        }\n    }\n}\n#endif\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_bg/bgp_rc.cc",
    "content": "#include <builtins.h>\n#include <complex>\n\ntypedef std::complex<double> double_complex;\n\n#ifdef HAVE_IBMBGP\nnamespace madness {\n    void bgpmTxmq(long dimi, long dimj, long dimk, double_complex *  c_x,  const double  *  a_x, const  double_complex *  b_x) {\n        int i, j, k, ii;\n        double *  c = (double*)c_x;\n         double *  a = (double*)a_x;\n         double *  b = (double*)b_x;\n        __complex__ double _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_0_14, _c_0_15, _c_0_16, _c_0_17, _c_0_18, _c_0_19, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _c_1_14, _c_1_15, _c_1_16, _c_1_17, _c_1_18, _c_1_19, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13, _b_0_14, _b_0_15, _b_0_16, _b_0_17, _b_0_18, _b_0_19;\n        double _a_0_0, _a_0_1;\n        for (j=dimj; j>10; j-=10,c+=10*2,b+=10*2) {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_0_8 = __cmplx(0.0,0.0);\n                _c_0_10 = __cmplx(0.0,0.0);\n                _c_0_12 = __cmplx(0.0,0.0);\n                _c_0_14 = __cmplx(0.0,0.0);\n                _c_0_16 = __cmplx(0.0,0.0);\n                _c_0_18 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_1_8 = __cmplx(0.0,0.0);\n                _c_1_10 = __cmplx(0.0,0.0);\n                _c_1_12 = __cmplx(0.0,0.0);\n                _c_1_14 = __cmplx(0.0,0.0);\n                _c_1_16 = __cmplx(0.0,0.0);\n                _c_1_18 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _b_0_8 = __lfpd(pb+8);\n                    _c_0_8 = __fxcpmadd(_c_0_8, _b_0_8, _a_0_0);\n                    _c_1_8 = __fxcpmadd(_c_1_8, _b_0_8, _a_0_1);\n                    _b_0_10 = __lfpd(pb+10);\n                    _c_0_10 = __fxcpmadd(_c_0_10, _b_0_10, _a_0_0);\n                    _c_1_10 = __fxcpmadd(_c_1_10, _b_0_10, _a_0_1);\n                    _b_0_12 = __lfpd(pb+12);\n                    _c_0_12 = __fxcpmadd(_c_0_12, _b_0_12, _a_0_0);\n                    _c_1_12 = __fxcpmadd(_c_1_12, _b_0_12, _a_0_1);\n                    _b_0_14 = __lfpd(pb+14);\n                    _c_0_14 = __fxcpmadd(_c_0_14, _b_0_14, _a_0_0);\n                    _c_1_14 = __fxcpmadd(_c_1_14, _b_0_14, _a_0_1);\n                    _b_0_16 = __lfpd(pb+16);\n                    _c_0_16 = __fxcpmadd(_c_0_16, _b_0_16, _a_0_0);\n                    _c_1_16 = __fxcpmadd(_c_1_16, _b_0_16, _a_0_1);\n                    _b_0_18 = __lfpd(pb+18);\n                    _c_0_18 = __fxcpmadd(_c_0_18, _b_0_18, _a_0_0);\n                    _c_1_18 = __fxcpmadd(_c_1_18, _b_0_18, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(c+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(c+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(c+(i+0)*dimj*2+8, _c_0_8);\n                __stfpd(c+(i+0)*dimj*2+10, _c_0_10);\n                __stfpd(c+(i+0)*dimj*2+12, _c_0_12);\n                __stfpd(c+(i+0)*dimj*2+14, _c_0_14);\n                __stfpd(c+(i+0)*dimj*2+16, _c_0_16);\n                __stfpd(c+(i+0)*dimj*2+18, _c_0_18);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(c+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(c+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(c+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(c+(i+1)*dimj*2+8, _c_1_8);\n                __stfpd(c+(i+1)*dimj*2+10, _c_1_10);\n                __stfpd(c+(i+1)*dimj*2+12, _c_1_12);\n                __stfpd(c+(i+1)*dimj*2+14, _c_1_14);\n                __stfpd(c+(i+1)*dimj*2+16, _c_1_16);\n                __stfpd(c+(i+1)*dimj*2+18, _c_1_18);\n            }\n        }\n        if (j>9) {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_0_8 = __cmplx(0.0,0.0);\n                _c_0_10 = __cmplx(0.0,0.0);\n                _c_0_12 = __cmplx(0.0,0.0);\n                _c_0_14 = __cmplx(0.0,0.0);\n                _c_0_16 = __cmplx(0.0,0.0);\n                _c_0_18 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_1_8 = __cmplx(0.0,0.0);\n                _c_1_10 = __cmplx(0.0,0.0);\n                _c_1_12 = __cmplx(0.0,0.0);\n                _c_1_14 = __cmplx(0.0,0.0);\n                _c_1_16 = __cmplx(0.0,0.0);\n                _c_1_18 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _b_0_8 = __lfpd(pb+8);\n                    _c_0_8 = __fxcpmadd(_c_0_8, _b_0_8, _a_0_0);\n                    _c_1_8 = __fxcpmadd(_c_1_8, _b_0_8, _a_0_1);\n                    _b_0_10 = __lfpd(pb+10);\n                    _c_0_10 = __fxcpmadd(_c_0_10, _b_0_10, _a_0_0);\n                    _c_1_10 = __fxcpmadd(_c_1_10, _b_0_10, _a_0_1);\n                    _b_0_12 = __lfpd(pb+12);\n                    _c_0_12 = __fxcpmadd(_c_0_12, _b_0_12, _a_0_0);\n                    _c_1_12 = __fxcpmadd(_c_1_12, _b_0_12, _a_0_1);\n                    _b_0_14 = __lfpd(pb+14);\n                    _c_0_14 = __fxcpmadd(_c_0_14, _b_0_14, _a_0_0);\n                    _c_1_14 = __fxcpmadd(_c_1_14, _b_0_14, _a_0_1);\n                    _b_0_16 = __lfpd(pb+16);\n                    _c_0_16 = __fxcpmadd(_c_0_16, _b_0_16, _a_0_0);\n                    _c_1_16 = __fxcpmadd(_c_1_16, _b_0_16, _a_0_1);\n                    _b_0_18 = __lfpd(pb+18);\n                    _c_0_18 = __fxcpmadd(_c_0_18, _b_0_18, _a_0_0);\n                    _c_1_18 = __fxcpmadd(_c_1_18, _b_0_18, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(c+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(c+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(c+(i+0)*dimj*2+8, _c_0_8);\n                __stfpd(c+(i+0)*dimj*2+10, _c_0_10);\n                __stfpd(c+(i+0)*dimj*2+12, _c_0_12);\n                __stfpd(c+(i+0)*dimj*2+14, _c_0_14);\n                __stfpd(c+(i+0)*dimj*2+16, _c_0_16);\n                __stfpd(c+(i+0)*dimj*2+18, _c_0_18);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(c+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(c+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(c+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(c+(i+1)*dimj*2+8, _c_1_8);\n                __stfpd(c+(i+1)*dimj*2+10, _c_1_10);\n                __stfpd(c+(i+1)*dimj*2+12, _c_1_12);\n                __stfpd(c+(i+1)*dimj*2+14, _c_1_14);\n                __stfpd(c+(i+1)*dimj*2+16, _c_1_16);\n                __stfpd(c+(i+1)*dimj*2+18, _c_1_18);\n            }\n        }\n        else if (j>8) {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_0_8 = __cmplx(0.0,0.0);\n                _c_0_10 = __cmplx(0.0,0.0);\n                _c_0_12 = __cmplx(0.0,0.0);\n                _c_0_14 = __cmplx(0.0,0.0);\n                _c_0_16 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_1_8 = __cmplx(0.0,0.0);\n                _c_1_10 = __cmplx(0.0,0.0);\n                _c_1_12 = __cmplx(0.0,0.0);\n                _c_1_14 = __cmplx(0.0,0.0);\n                _c_1_16 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _b_0_8 = __lfpd(pb+8);\n                    _c_0_8 = __fxcpmadd(_c_0_8, _b_0_8, _a_0_0);\n                    _c_1_8 = __fxcpmadd(_c_1_8, _b_0_8, _a_0_1);\n                    _b_0_10 = __lfpd(pb+10);\n                    _c_0_10 = __fxcpmadd(_c_0_10, _b_0_10, _a_0_0);\n                    _c_1_10 = __fxcpmadd(_c_1_10, _b_0_10, _a_0_1);\n                    _b_0_12 = __lfpd(pb+12);\n                    _c_0_12 = __fxcpmadd(_c_0_12, _b_0_12, _a_0_0);\n                    _c_1_12 = __fxcpmadd(_c_1_12, _b_0_12, _a_0_1);\n                    _b_0_14 = __lfpd(pb+14);\n                    _c_0_14 = __fxcpmadd(_c_0_14, _b_0_14, _a_0_0);\n                    _c_1_14 = __fxcpmadd(_c_1_14, _b_0_14, _a_0_1);\n                    _b_0_16 = __lfpd(pb+16);\n                    _c_0_16 = __fxcpmadd(_c_0_16, _b_0_16, _a_0_0);\n                    _c_1_16 = __fxcpmadd(_c_1_16, _b_0_16, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(c+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(c+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(c+(i+0)*dimj*2+8, _c_0_8);\n                __stfpd(c+(i+0)*dimj*2+10, _c_0_10);\n                __stfpd(c+(i+0)*dimj*2+12, _c_0_12);\n                __stfpd(c+(i+0)*dimj*2+14, _c_0_14);\n                __stfpd(c+(i+0)*dimj*2+16, _c_0_16);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(c+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(c+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(c+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(c+(i+1)*dimj*2+8, _c_1_8);\n                __stfpd(c+(i+1)*dimj*2+10, _c_1_10);\n                __stfpd(c+(i+1)*dimj*2+12, _c_1_12);\n                __stfpd(c+(i+1)*dimj*2+14, _c_1_14);\n                __stfpd(c+(i+1)*dimj*2+16, _c_1_16);\n            }\n        }\n        else if (j>7) {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_0_8 = __cmplx(0.0,0.0);\n                _c_0_10 = __cmplx(0.0,0.0);\n                _c_0_12 = __cmplx(0.0,0.0);\n                _c_0_14 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_1_8 = __cmplx(0.0,0.0);\n                _c_1_10 = __cmplx(0.0,0.0);\n                _c_1_12 = __cmplx(0.0,0.0);\n                _c_1_14 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _b_0_8 = __lfpd(pb+8);\n                    _c_0_8 = __fxcpmadd(_c_0_8, _b_0_8, _a_0_0);\n                    _c_1_8 = __fxcpmadd(_c_1_8, _b_0_8, _a_0_1);\n                    _b_0_10 = __lfpd(pb+10);\n                    _c_0_10 = __fxcpmadd(_c_0_10, _b_0_10, _a_0_0);\n                    _c_1_10 = __fxcpmadd(_c_1_10, _b_0_10, _a_0_1);\n                    _b_0_12 = __lfpd(pb+12);\n                    _c_0_12 = __fxcpmadd(_c_0_12, _b_0_12, _a_0_0);\n                    _c_1_12 = __fxcpmadd(_c_1_12, _b_0_12, _a_0_1);\n                    _b_0_14 = __lfpd(pb+14);\n                    _c_0_14 = __fxcpmadd(_c_0_14, _b_0_14, _a_0_0);\n                    _c_1_14 = __fxcpmadd(_c_1_14, _b_0_14, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(c+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(c+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(c+(i+0)*dimj*2+8, _c_0_8);\n                __stfpd(c+(i+0)*dimj*2+10, _c_0_10);\n                __stfpd(c+(i+0)*dimj*2+12, _c_0_12);\n                __stfpd(c+(i+0)*dimj*2+14, _c_0_14);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(c+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(c+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(c+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(c+(i+1)*dimj*2+8, _c_1_8);\n                __stfpd(c+(i+1)*dimj*2+10, _c_1_10);\n                __stfpd(c+(i+1)*dimj*2+12, _c_1_12);\n                __stfpd(c+(i+1)*dimj*2+14, _c_1_14);\n            }\n        }\n        else if (j>6) {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_0_8 = __cmplx(0.0,0.0);\n                _c_0_10 = __cmplx(0.0,0.0);\n                _c_0_12 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_1_8 = __cmplx(0.0,0.0);\n                _c_1_10 = __cmplx(0.0,0.0);\n                _c_1_12 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _b_0_8 = __lfpd(pb+8);\n                    _c_0_8 = __fxcpmadd(_c_0_8, _b_0_8, _a_0_0);\n                    _c_1_8 = __fxcpmadd(_c_1_8, _b_0_8, _a_0_1);\n                    _b_0_10 = __lfpd(pb+10);\n                    _c_0_10 = __fxcpmadd(_c_0_10, _b_0_10, _a_0_0);\n                    _c_1_10 = __fxcpmadd(_c_1_10, _b_0_10, _a_0_1);\n                    _b_0_12 = __lfpd(pb+12);\n                    _c_0_12 = __fxcpmadd(_c_0_12, _b_0_12, _a_0_0);\n                    _c_1_12 = __fxcpmadd(_c_1_12, _b_0_12, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(c+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(c+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(c+(i+0)*dimj*2+8, _c_0_8);\n                __stfpd(c+(i+0)*dimj*2+10, _c_0_10);\n                __stfpd(c+(i+0)*dimj*2+12, _c_0_12);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(c+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(c+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(c+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(c+(i+1)*dimj*2+8, _c_1_8);\n                __stfpd(c+(i+1)*dimj*2+10, _c_1_10);\n                __stfpd(c+(i+1)*dimj*2+12, _c_1_12);\n            }\n        }\n        else if (j>5) {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_0_8 = __cmplx(0.0,0.0);\n                _c_0_10 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_1_8 = __cmplx(0.0,0.0);\n                _c_1_10 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _b_0_8 = __lfpd(pb+8);\n                    _c_0_8 = __fxcpmadd(_c_0_8, _b_0_8, _a_0_0);\n                    _c_1_8 = __fxcpmadd(_c_1_8, _b_0_8, _a_0_1);\n                    _b_0_10 = __lfpd(pb+10);\n                    _c_0_10 = __fxcpmadd(_c_0_10, _b_0_10, _a_0_0);\n                    _c_1_10 = __fxcpmadd(_c_1_10, _b_0_10, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(c+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(c+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(c+(i+0)*dimj*2+8, _c_0_8);\n                __stfpd(c+(i+0)*dimj*2+10, _c_0_10);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(c+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(c+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(c+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(c+(i+1)*dimj*2+8, _c_1_8);\n                __stfpd(c+(i+1)*dimj*2+10, _c_1_10);\n            }\n        }\n        else if (j>4) {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_0_8 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                _c_1_8 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                    _b_0_8 = __lfpd(pb+8);\n                    _c_0_8 = __fxcpmadd(_c_0_8, _b_0_8, _a_0_0);\n                    _c_1_8 = __fxcpmadd(_c_1_8, _b_0_8, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(c+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(c+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(c+(i+0)*dimj*2+8, _c_0_8);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(c+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(c+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(c+(i+1)*dimj*2+6, _c_1_6);\n                __stfpd(c+(i+1)*dimj*2+8, _c_1_8);\n            }\n        }\n        else if (j>3) {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_0_6 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                _c_1_6 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                    _b_0_6 = __lfpd(pb+6);\n                    _c_0_6 = __fxcpmadd(_c_0_6, _b_0_6, _a_0_0);\n                    _c_1_6 = __fxcpmadd(_c_1_6, _b_0_6, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(c+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(c+(i+0)*dimj*2+6, _c_0_6);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(c+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(c+(i+1)*dimj*2+4, _c_1_4);\n                __stfpd(c+(i+1)*dimj*2+6, _c_1_6);\n            }\n        }\n        else if (j>2) {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_0_4 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_1_4 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _b_0_4 = __lfpd(pb+4);\n                    _c_0_4 = __fxcpmadd(_c_0_4, _b_0_4, _a_0_0);\n                    _c_1_4 = __fxcpmadd(_c_1_4, _b_0_4, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(c+(i+0)*dimj*2+4, _c_0_4);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(c+(i+1)*dimj*2+2, _c_1_2);\n                __stfpd(c+(i+1)*dimj*2+4, _c_1_4);\n            }\n        }\n        else if (j>1) {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+0)*dimj*2+2, _c_0_2);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n                __stfpd(c+(i+1)*dimj*2+2, _c_1_2);\n            }\n        }\n        else {\n            for (i=0; i+2<=dimi ; i+=2) {\n                 double*  pb = b;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                }\n                __stfpd(c+(i+0)*dimj*2+0, _c_0_0);\n                __stfpd(c+(i+1)*dimj*2+0, _c_1_0);\n            }\n        }\n    }\n}\n#endif\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_bg/bgp_rr.cc",
    "content": "#include <builtins.h>\n#include <complex>\n\n#ifdef HAVE_IBMBGP\nnamespace madness {\n    void bgpmTxmq(long dimi, long dimj, long dimk, double  *  c_x,  const double  *  a_x,  const double  *  b_x) {\n        int i, j, k, ii;\n        double *  c = (double*)c_x;\n         double *  a = (double*)a_x;\n         double *  b = (double*)b_x;\n        __complex__ double _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_3_0, _c_3_1, _c_3_2, _c_3_3, _c_4_0, _c_4_1, _c_4_2, _c_4_3, _c_5_0, _c_5_1, _c_5_2, _c_5_3, _c_6_0, _c_6_1, _c_6_2, _c_6_3, _c_7_0, _c_7_1, _c_7_2, _c_7_3, _b_0_0, _b_0_1, _b_0_2, _b_0_3;\n        double _a_0_0, _a_0_1, _a_0_2, _a_0_3, _a_0_4, _a_0_5, _a_0_6, _a_0_7;\n        for (i=0; i+8<=dimi ; i+=8) {\n             double*  xb = b;\n            double*  xc = c;\n            for (j=dimj; j>4; j-=4,xc+=4,xb+=4) {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                _c_5_2 = __cmplx(0.0,0.0);\n                _c_6_0 = __cmplx(0.0,0.0);\n                _c_6_2 = __cmplx(0.0,0.0);\n                _c_7_0 = __cmplx(0.0,0.0);\n                _c_7_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _a_0_2 = *((pa+2));\n                    _a_0_3 = *((pa+3));\n                    _a_0_4 = *((pa+4));\n                    _a_0_5 = *((pa+5));\n                    _a_0_6 = *((pa+6));\n                    _a_0_7 = *((pa+7));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _b_0_0, _a_0_5);\n                    _c_6_0 = __fxcpmadd(_c_6_0, _b_0_0, _a_0_6);\n                    _c_7_0 = __fxcpmadd(_c_7_0, _b_0_0, _a_0_7);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _b_0_2, _a_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _b_0_2, _a_0_4);\n                    _c_5_2 = __fxcpmadd(_c_5_2, _b_0_2, _a_0_5);\n                    _c_6_2 = __fxcpmadd(_c_6_2, _b_0_2, _a_0_6);\n                    _c_7_2 = __fxcpmadd(_c_7_2, _b_0_2, _a_0_7);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj+2, _c_1_2);\n                __stfpd(xc+(i+2)*dimj+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj+2, _c_2_2);\n                __stfpd(xc+(i+3)*dimj+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj+2, _c_3_2);\n                __stfpd(xc+(i+4)*dimj+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj+2, _c_4_2);\n                __stfpd(xc+(i+5)*dimj+0, _c_5_0);\n                __stfpd(xc+(i+5)*dimj+2, _c_5_2);\n                __stfpd(xc+(i+6)*dimj+0, _c_6_0);\n                __stfpd(xc+(i+6)*dimj+2, _c_6_2);\n                __stfpd(xc+(i+7)*dimj+0, _c_7_0);\n                __stfpd(xc+(i+7)*dimj+2, _c_7_2);\n            }\n            if (j>2) {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                _c_5_2 = __cmplx(0.0,0.0);\n                _c_6_0 = __cmplx(0.0,0.0);\n                _c_6_2 = __cmplx(0.0,0.0);\n                _c_7_0 = __cmplx(0.0,0.0);\n                _c_7_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _a_0_2 = *((pa+2));\n                    _a_0_3 = *((pa+3));\n                    _a_0_4 = *((pa+4));\n                    _a_0_5 = *((pa+5));\n                    _a_0_6 = *((pa+6));\n                    _a_0_7 = *((pa+7));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _b_0_0, _a_0_5);\n                    _c_6_0 = __fxcpmadd(_c_6_0, _b_0_0, _a_0_6);\n                    _c_7_0 = __fxcpmadd(_c_7_0, _b_0_0, _a_0_7);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _b_0_2, _a_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _b_0_2, _a_0_4);\n                    _c_5_2 = __fxcpmadd(_c_5_2, _b_0_2, _a_0_5);\n                    _c_6_2 = __fxcpmadd(_c_6_2, _b_0_2, _a_0_6);\n                    _c_7_2 = __fxcpmadd(_c_7_2, _b_0_2, _a_0_7);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj+2, _c_1_2);\n                __stfpd(xc+(i+2)*dimj+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj+2, _c_2_2);\n                __stfpd(xc+(i+3)*dimj+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj+2, _c_3_2);\n                __stfpd(xc+(i+4)*dimj+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj+2, _c_4_2);\n                __stfpd(xc+(i+5)*dimj+0, _c_5_0);\n                __stfpd(xc+(i+5)*dimj+2, _c_5_2);\n                __stfpd(xc+(i+6)*dimj+0, _c_6_0);\n                __stfpd(xc+(i+6)*dimj+2, _c_6_2);\n                __stfpd(xc+(i+7)*dimj+0, _c_7_0);\n                __stfpd(xc+(i+7)*dimj+2, _c_7_2);\n            }\n            else {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                _c_6_0 = __cmplx(0.0,0.0);\n                _c_7_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _a_0_2 = *((pa+2));\n                    _a_0_3 = *((pa+3));\n                    _a_0_4 = *((pa+4));\n                    _a_0_5 = *((pa+5));\n                    _a_0_6 = *((pa+6));\n                    _a_0_7 = *((pa+7));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _b_0_0, _a_0_5);\n                    _c_6_0 = __fxcpmadd(_c_6_0, _b_0_0, _a_0_6);\n                    _c_7_0 = __fxcpmadd(_c_7_0, _b_0_0, _a_0_7);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+2)*dimj+0, _c_2_0);\n                __stfpd(xc+(i+3)*dimj+0, _c_3_0);\n                __stfpd(xc+(i+4)*dimj+0, _c_4_0);\n                __stfpd(xc+(i+5)*dimj+0, _c_5_0);\n                __stfpd(xc+(i+6)*dimj+0, _c_6_0);\n                __stfpd(xc+(i+7)*dimj+0, _c_7_0);\n            }\n        }\n        for (; i+6<=dimi ; i+=6) {\n             double*  xb = b;\n            double*  xc = c;\n            for (j=dimj; j>4; j-=4,xc+=4,xb+=4) {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                _c_5_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _a_0_2 = *((pa+2));\n                    _a_0_3 = *((pa+3));\n                    _a_0_4 = *((pa+4));\n                    _a_0_5 = *((pa+5));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _b_0_0, _a_0_5);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _b_0_2, _a_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _b_0_2, _a_0_4);\n                    _c_5_2 = __fxcpmadd(_c_5_2, _b_0_2, _a_0_5);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj+2, _c_1_2);\n                __stfpd(xc+(i+2)*dimj+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj+2, _c_2_2);\n                __stfpd(xc+(i+3)*dimj+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj+2, _c_3_2);\n                __stfpd(xc+(i+4)*dimj+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj+2, _c_4_2);\n                __stfpd(xc+(i+5)*dimj+0, _c_5_0);\n                __stfpd(xc+(i+5)*dimj+2, _c_5_2);\n            }\n            if (j>2) {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_4_2 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                _c_5_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _a_0_2 = *((pa+2));\n                    _a_0_3 = *((pa+3));\n                    _a_0_4 = *((pa+4));\n                    _a_0_5 = *((pa+5));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _b_0_0, _a_0_5);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _b_0_2, _a_0_3);\n                    _c_4_2 = __fxcpmadd(_c_4_2, _b_0_2, _a_0_4);\n                    _c_5_2 = __fxcpmadd(_c_5_2, _b_0_2, _a_0_5);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj+2, _c_1_2);\n                __stfpd(xc+(i+2)*dimj+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj+2, _c_2_2);\n                __stfpd(xc+(i+3)*dimj+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj+2, _c_3_2);\n                __stfpd(xc+(i+4)*dimj+0, _c_4_0);\n                __stfpd(xc+(i+4)*dimj+2, _c_4_2);\n                __stfpd(xc+(i+5)*dimj+0, _c_5_0);\n                __stfpd(xc+(i+5)*dimj+2, _c_5_2);\n            }\n            else {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_4_0 = __cmplx(0.0,0.0);\n                _c_5_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _a_0_2 = *((pa+2));\n                    _a_0_3 = *((pa+3));\n                    _a_0_4 = *((pa+4));\n                    _a_0_5 = *((pa+5));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _c_4_0 = __fxcpmadd(_c_4_0, _b_0_0, _a_0_4);\n                    _c_5_0 = __fxcpmadd(_c_5_0, _b_0_0, _a_0_5);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+2)*dimj+0, _c_2_0);\n                __stfpd(xc+(i+3)*dimj+0, _c_3_0);\n                __stfpd(xc+(i+4)*dimj+0, _c_4_0);\n                __stfpd(xc+(i+5)*dimj+0, _c_5_0);\n            }\n        }\n        for (; i+4<=dimi ; i+=4) {\n             double*  xb = b;\n            double*  xc = c;\n            for (j=dimj; j>4; j-=4,xc+=4,xb+=4) {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _a_0_2 = *((pa+2));\n                    _a_0_3 = *((pa+3));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _b_0_2, _a_0_3);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj+2, _c_1_2);\n                __stfpd(xc+(i+2)*dimj+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj+2, _c_2_2);\n                __stfpd(xc+(i+3)*dimj+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj+2, _c_3_2);\n            }\n            if (j>2) {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_2_2 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                _c_3_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _a_0_2 = *((pa+2));\n                    _a_0_3 = *((pa+3));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                    _c_2_2 = __fxcpmadd(_c_2_2, _b_0_2, _a_0_2);\n                    _c_3_2 = __fxcpmadd(_c_3_2, _b_0_2, _a_0_3);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj+2, _c_1_2);\n                __stfpd(xc+(i+2)*dimj+0, _c_2_0);\n                __stfpd(xc+(i+2)*dimj+2, _c_2_2);\n                __stfpd(xc+(i+3)*dimj+0, _c_3_0);\n                __stfpd(xc+(i+3)*dimj+2, _c_3_2);\n            }\n            else {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_2_0 = __cmplx(0.0,0.0);\n                _c_3_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _a_0_2 = *((pa+2));\n                    _a_0_3 = *((pa+3));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _c_2_0 = __fxcpmadd(_c_2_0, _b_0_0, _a_0_2);\n                    _c_3_0 = __fxcpmadd(_c_3_0, _b_0_0, _a_0_3);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+2)*dimj+0, _c_2_0);\n                __stfpd(xc+(i+3)*dimj+0, _c_3_0);\n            }\n        }\n        for (; i+2<=dimi ; i+=2) {\n             double*  xb = b;\n            double*  xc = c;\n            for (j=dimj; j>4; j-=4,xc+=4,xb+=4) {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj+2, _c_1_2);\n            }\n            if (j>2) {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_0_2 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                _c_1_2 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                    _b_0_2 = __lfpd(pb+2);\n                    _c_0_2 = __fxcpmadd(_c_0_2, _b_0_2, _a_0_0);\n                    _c_1_2 = __fxcpmadd(_c_1_2, _b_0_2, _a_0_1);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+0)*dimj+2, _c_0_2);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n                __stfpd(xc+(i+1)*dimj+2, _c_1_2);\n            }\n            else {\n                 double*  pb = xb;\n                 double*  pa = a+i;\n                _c_0_0 = __cmplx(0.0,0.0);\n                _c_1_0 = __cmplx(0.0,0.0);\n                for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                    _a_0_0 = *((pa+0));\n                    _a_0_1 = *((pa+1));\n                    _b_0_0 = __lfpd(pb+0);\n                    _c_0_0 = __fxcpmadd(_c_0_0, _b_0_0, _a_0_0);\n                    _c_1_0 = __fxcpmadd(_c_1_0, _b_0_0, _a_0_1);\n                }\n                __stfpd(xc+(i+0)*dimj+0, _c_0_0);\n                __stfpd(xc+(i+1)*dimj+0, _c_1_0);\n            }\n        }\n    }\n}\n#endif\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_bg/bgq_mtxm.cc",
    "content": "#include <hwi/include/bqc/A2_inlines.h>\n#include <stdlib.h>\n#include <string.h>\n#include <complex>\n#if !defined(__xlc__) && !defined(__xlC__)\n#include <qpxintrin.h>\n#endif\n\nnamespace madness {\n    void bgq_mtxmq_padded(long dimi, long dimj, long dimk, long extb, __complex__ double *  c_x,  const __complex__ double *  a_x,  const __complex__ double *  b_x) {\n        int i, j, k;\n        double *  c = (double*)c_x;\n        double *  a = (double*)a_x;\n        double *  b = (double*)b_x;\n        long effj = dimj;\n        double * c_buf;\n        double * b_buf;\n        bool free_b = false;\n        /* Setup a buffer for c if needed */\n        double* c_out = c;\n        if (dimj%2) {\n            effj = (dimj | 1) + 1;\n            posix_memalign((void **) &c, 32, dimi*effj*sizeof(double)*2);\n            c_buf = c;\n        }\n        /* Copy b into a buffer if needed */\n        if (extb%2) {\n            long t_extb = (dimj | 1) + 1;\n            free_b = true;\n            posix_memalign((void **) &b_buf, 32, dimk*t_extb*sizeof(double)*2);\n            double* bp = b_buf;\n            for (k=0; k<dimk; k++, bp += t_extb*2, b += extb*2)\n                memcpy(bp, b, sizeof(double)*dimj*2);\n            b = b_buf;\n            extb = t_extb;\n        }\n        vector4double _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_0_14, _c_0_15, _c_0_16, _c_0_17, _c_0_18, _c_0_19, _c_0_20, _c_0_21, _c_0_22, _c_0_23, _c_0_24, _c_0_25, _c_0_26, _c_0_27, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _c_1_14, _c_1_15, _c_1_16, _c_1_17, _c_1_18, _c_1_19, _c_1_20, _c_1_21, _c_1_22, _c_1_23, _c_1_24, _c_1_25, _c_1_26, _c_1_27, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_2_4, _c_2_5, _c_2_6, _c_2_7, _c_2_8, _c_2_9, _c_2_10, _c_2_11, _c_2_12, _c_2_13, _c_2_14, _c_2_15, _c_2_16, _c_2_17, _c_2_18, _c_2_19, _c_2_20, _c_2_21, _c_2_22, _c_2_23, _c_2_24, _c_2_25, _c_2_26, _c_2_27, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13, _b_0_14, _b_0_15, _b_0_16, _b_0_17, _b_0_18, _b_0_19, _b_0_20, _b_0_21, _b_0_22, _b_0_23, _b_0_24, _b_0_25, _b_0_26, _b_0_27;\n        vector4double _a_0_0, _a_0_1, _a_0_2;\n        for (j=effj; j>14; j-=14,c+=14*2,b+=14*2) {\n            for (i=0; i+3<=dimi; i+=3) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_0_20 = vec_splats(0.0);\n                _c_0_24 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_1_16 = vec_splats(0.0);\n                _c_1_20 = vec_splats(0.0);\n                _c_1_24 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                _c_2_16 = vec_splats(0.0);\n                _c_2_20 = vec_splats(0.0);\n                _c_2_24 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _a_0_1 = vec_ld2(0, (pa+2));\n                    _a_0_2 = vec_ld2(0, (pa+4));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _c_1_0 = vec_xmadd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_1_0 = vec_xxnpmadd(_b_0_0, _a_0_1, _c_1_0);\n                    _c_2_0 = vec_xmadd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_2_0 = vec_xxnpmadd(_b_0_0, _a_0_2, _c_2_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _c_1_4 = vec_xmadd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_1_4 = vec_xxnpmadd(_b_0_4, _a_0_1, _c_1_4);\n                    _c_2_4 = vec_xmadd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_2_4 = vec_xxnpmadd(_b_0_4, _a_0_2, _c_2_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _c_1_8 = vec_xmadd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_1_8 = vec_xxnpmadd(_b_0_8, _a_0_1, _c_1_8);\n                    _c_2_8 = vec_xmadd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_2_8 = vec_xxnpmadd(_b_0_8, _a_0_2, _c_2_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_xmadd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_0_12 = vec_xxnpmadd(_b_0_12, _a_0_0, _c_0_12);\n                    _c_1_12 = vec_xmadd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_1_12 = vec_xxnpmadd(_b_0_12, _a_0_1, _c_1_12);\n                    _c_2_12 = vec_xmadd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_2_12 = vec_xxnpmadd(_b_0_12, _a_0_2, _c_2_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_xmadd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_0_16 = vec_xxnpmadd(_b_0_16, _a_0_0, _c_0_16);\n                    _c_1_16 = vec_xmadd(_a_0_1, _b_0_16, _c_1_16);\n                    _c_1_16 = vec_xxnpmadd(_b_0_16, _a_0_1, _c_1_16);\n                    _c_2_16 = vec_xmadd(_a_0_2, _b_0_16, _c_2_16);\n                    _c_2_16 = vec_xxnpmadd(_b_0_16, _a_0_2, _c_2_16);\n                    _b_0_20 = vec_ld(0, pb+20);\n                    _c_0_20 = vec_xmadd(_a_0_0, _b_0_20, _c_0_20);\n                    _c_0_20 = vec_xxnpmadd(_b_0_20, _a_0_0, _c_0_20);\n                    _c_1_20 = vec_xmadd(_a_0_1, _b_0_20, _c_1_20);\n                    _c_1_20 = vec_xxnpmadd(_b_0_20, _a_0_1, _c_1_20);\n                    _c_2_20 = vec_xmadd(_a_0_2, _b_0_20, _c_2_20);\n                    _c_2_20 = vec_xxnpmadd(_b_0_20, _a_0_2, _c_2_20);\n                    _b_0_24 = vec_ld(0, pb+24);\n                    _c_0_24 = vec_xmadd(_a_0_0, _b_0_24, _c_0_24);\n                    _c_0_24 = vec_xxnpmadd(_b_0_24, _a_0_0, _c_0_24);\n                    _c_1_24 = vec_xmadd(_a_0_1, _b_0_24, _c_1_24);\n                    _c_1_24 = vec_xxnpmadd(_b_0_24, _a_0_1, _c_1_24);\n                    _c_2_24 = vec_xmadd(_a_0_2, _b_0_24, _c_2_24);\n                    _c_2_24 = vec_xxnpmadd(_b_0_24, _a_0_2, _c_2_24);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n                vec_st(_c_0_20, 0, c+(i+0)*effj*2+20);\n                vec_st(_c_0_24, 0, c+(i+0)*effj*2+24);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj*2+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj*2+12);\n                vec_st(_c_1_16, 0, c+(i+1)*effj*2+16);\n                vec_st(_c_1_20, 0, c+(i+1)*effj*2+20);\n                vec_st(_c_1_24, 0, c+(i+1)*effj*2+24);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj*2+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj*2+12);\n                vec_st(_c_2_16, 0, c+(i+2)*effj*2+16);\n                vec_st(_c_2_20, 0, c+(i+2)*effj*2+20);\n                vec_st(_c_2_24, 0, c+(i+2)*effj*2+24);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_0_20 = vec_splats(0.0);\n                _c_0_24 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_xmadd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_0_12 = vec_xxnpmadd(_b_0_12, _a_0_0, _c_0_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_xmadd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_0_16 = vec_xxnpmadd(_b_0_16, _a_0_0, _c_0_16);\n                    _b_0_20 = vec_ld(0, pb+20);\n                    _c_0_20 = vec_xmadd(_a_0_0, _b_0_20, _c_0_20);\n                    _c_0_20 = vec_xxnpmadd(_b_0_20, _a_0_0, _c_0_20);\n                    _b_0_24 = vec_ld(0, pb+24);\n                    _c_0_24 = vec_xmadd(_a_0_0, _b_0_24, _c_0_24);\n                    _c_0_24 = vec_xxnpmadd(_b_0_24, _a_0_0, _c_0_24);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n                vec_st(_c_0_20, 0, c+(i+0)*effj*2+20);\n                vec_st(_c_0_24, 0, c+(i+0)*effj*2+24);\n            }\n        }\n        if (j>12) {\n            for (i=0; i+3<=dimi; i+=3) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_0_20 = vec_splats(0.0);\n                _c_0_24 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_1_16 = vec_splats(0.0);\n                _c_1_20 = vec_splats(0.0);\n                _c_1_24 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                _c_2_16 = vec_splats(0.0);\n                _c_2_20 = vec_splats(0.0);\n                _c_2_24 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _a_0_1 = vec_ld2(0, (pa+2));\n                    _a_0_2 = vec_ld2(0, (pa+4));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _c_1_0 = vec_xmadd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_1_0 = vec_xxnpmadd(_b_0_0, _a_0_1, _c_1_0);\n                    _c_2_0 = vec_xmadd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_2_0 = vec_xxnpmadd(_b_0_0, _a_0_2, _c_2_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _c_1_4 = vec_xmadd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_1_4 = vec_xxnpmadd(_b_0_4, _a_0_1, _c_1_4);\n                    _c_2_4 = vec_xmadd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_2_4 = vec_xxnpmadd(_b_0_4, _a_0_2, _c_2_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _c_1_8 = vec_xmadd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_1_8 = vec_xxnpmadd(_b_0_8, _a_0_1, _c_1_8);\n                    _c_2_8 = vec_xmadd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_2_8 = vec_xxnpmadd(_b_0_8, _a_0_2, _c_2_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_xmadd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_0_12 = vec_xxnpmadd(_b_0_12, _a_0_0, _c_0_12);\n                    _c_1_12 = vec_xmadd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_1_12 = vec_xxnpmadd(_b_0_12, _a_0_1, _c_1_12);\n                    _c_2_12 = vec_xmadd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_2_12 = vec_xxnpmadd(_b_0_12, _a_0_2, _c_2_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_xmadd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_0_16 = vec_xxnpmadd(_b_0_16, _a_0_0, _c_0_16);\n                    _c_1_16 = vec_xmadd(_a_0_1, _b_0_16, _c_1_16);\n                    _c_1_16 = vec_xxnpmadd(_b_0_16, _a_0_1, _c_1_16);\n                    _c_2_16 = vec_xmadd(_a_0_2, _b_0_16, _c_2_16);\n                    _c_2_16 = vec_xxnpmadd(_b_0_16, _a_0_2, _c_2_16);\n                    _b_0_20 = vec_ld(0, pb+20);\n                    _c_0_20 = vec_xmadd(_a_0_0, _b_0_20, _c_0_20);\n                    _c_0_20 = vec_xxnpmadd(_b_0_20, _a_0_0, _c_0_20);\n                    _c_1_20 = vec_xmadd(_a_0_1, _b_0_20, _c_1_20);\n                    _c_1_20 = vec_xxnpmadd(_b_0_20, _a_0_1, _c_1_20);\n                    _c_2_20 = vec_xmadd(_a_0_2, _b_0_20, _c_2_20);\n                    _c_2_20 = vec_xxnpmadd(_b_0_20, _a_0_2, _c_2_20);\n                    _b_0_24 = vec_ld(0, pb+24);\n                    _c_0_24 = vec_xmadd(_a_0_0, _b_0_24, _c_0_24);\n                    _c_0_24 = vec_xxnpmadd(_b_0_24, _a_0_0, _c_0_24);\n                    _c_1_24 = vec_xmadd(_a_0_1, _b_0_24, _c_1_24);\n                    _c_1_24 = vec_xxnpmadd(_b_0_24, _a_0_1, _c_1_24);\n                    _c_2_24 = vec_xmadd(_a_0_2, _b_0_24, _c_2_24);\n                    _c_2_24 = vec_xxnpmadd(_b_0_24, _a_0_2, _c_2_24);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n                vec_st(_c_0_20, 0, c+(i+0)*effj*2+20);\n                vec_st(_c_0_24, 0, c+(i+0)*effj*2+24);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj*2+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj*2+12);\n                vec_st(_c_1_16, 0, c+(i+1)*effj*2+16);\n                vec_st(_c_1_20, 0, c+(i+1)*effj*2+20);\n                vec_st(_c_1_24, 0, c+(i+1)*effj*2+24);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj*2+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj*2+12);\n                vec_st(_c_2_16, 0, c+(i+2)*effj*2+16);\n                vec_st(_c_2_20, 0, c+(i+2)*effj*2+20);\n                vec_st(_c_2_24, 0, c+(i+2)*effj*2+24);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_0_20 = vec_splats(0.0);\n                _c_0_24 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_xmadd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_0_12 = vec_xxnpmadd(_b_0_12, _a_0_0, _c_0_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_xmadd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_0_16 = vec_xxnpmadd(_b_0_16, _a_0_0, _c_0_16);\n                    _b_0_20 = vec_ld(0, pb+20);\n                    _c_0_20 = vec_xmadd(_a_0_0, _b_0_20, _c_0_20);\n                    _c_0_20 = vec_xxnpmadd(_b_0_20, _a_0_0, _c_0_20);\n                    _b_0_24 = vec_ld(0, pb+24);\n                    _c_0_24 = vec_xmadd(_a_0_0, _b_0_24, _c_0_24);\n                    _c_0_24 = vec_xxnpmadd(_b_0_24, _a_0_0, _c_0_24);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n                vec_st(_c_0_20, 0, c+(i+0)*effj*2+20);\n                vec_st(_c_0_24, 0, c+(i+0)*effj*2+24);\n            }\n        }\n        else if (j>10) {\n            for (i=0; i+3<=dimi; i+=3) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_0_20 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_1_16 = vec_splats(0.0);\n                _c_1_20 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                _c_2_16 = vec_splats(0.0);\n                _c_2_20 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _a_0_1 = vec_ld2(0, (pa+2));\n                    _a_0_2 = vec_ld2(0, (pa+4));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _c_1_0 = vec_xmadd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_1_0 = vec_xxnpmadd(_b_0_0, _a_0_1, _c_1_0);\n                    _c_2_0 = vec_xmadd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_2_0 = vec_xxnpmadd(_b_0_0, _a_0_2, _c_2_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _c_1_4 = vec_xmadd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_1_4 = vec_xxnpmadd(_b_0_4, _a_0_1, _c_1_4);\n                    _c_2_4 = vec_xmadd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_2_4 = vec_xxnpmadd(_b_0_4, _a_0_2, _c_2_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _c_1_8 = vec_xmadd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_1_8 = vec_xxnpmadd(_b_0_8, _a_0_1, _c_1_8);\n                    _c_2_8 = vec_xmadd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_2_8 = vec_xxnpmadd(_b_0_8, _a_0_2, _c_2_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_xmadd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_0_12 = vec_xxnpmadd(_b_0_12, _a_0_0, _c_0_12);\n                    _c_1_12 = vec_xmadd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_1_12 = vec_xxnpmadd(_b_0_12, _a_0_1, _c_1_12);\n                    _c_2_12 = vec_xmadd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_2_12 = vec_xxnpmadd(_b_0_12, _a_0_2, _c_2_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_xmadd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_0_16 = vec_xxnpmadd(_b_0_16, _a_0_0, _c_0_16);\n                    _c_1_16 = vec_xmadd(_a_0_1, _b_0_16, _c_1_16);\n                    _c_1_16 = vec_xxnpmadd(_b_0_16, _a_0_1, _c_1_16);\n                    _c_2_16 = vec_xmadd(_a_0_2, _b_0_16, _c_2_16);\n                    _c_2_16 = vec_xxnpmadd(_b_0_16, _a_0_2, _c_2_16);\n                    _b_0_20 = vec_ld(0, pb+20);\n                    _c_0_20 = vec_xmadd(_a_0_0, _b_0_20, _c_0_20);\n                    _c_0_20 = vec_xxnpmadd(_b_0_20, _a_0_0, _c_0_20);\n                    _c_1_20 = vec_xmadd(_a_0_1, _b_0_20, _c_1_20);\n                    _c_1_20 = vec_xxnpmadd(_b_0_20, _a_0_1, _c_1_20);\n                    _c_2_20 = vec_xmadd(_a_0_2, _b_0_20, _c_2_20);\n                    _c_2_20 = vec_xxnpmadd(_b_0_20, _a_0_2, _c_2_20);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n                vec_st(_c_0_20, 0, c+(i+0)*effj*2+20);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj*2+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj*2+12);\n                vec_st(_c_1_16, 0, c+(i+1)*effj*2+16);\n                vec_st(_c_1_20, 0, c+(i+1)*effj*2+20);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj*2+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj*2+12);\n                vec_st(_c_2_16, 0, c+(i+2)*effj*2+16);\n                vec_st(_c_2_20, 0, c+(i+2)*effj*2+20);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_0_20 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_xmadd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_0_12 = vec_xxnpmadd(_b_0_12, _a_0_0, _c_0_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_xmadd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_0_16 = vec_xxnpmadd(_b_0_16, _a_0_0, _c_0_16);\n                    _b_0_20 = vec_ld(0, pb+20);\n                    _c_0_20 = vec_xmadd(_a_0_0, _b_0_20, _c_0_20);\n                    _c_0_20 = vec_xxnpmadd(_b_0_20, _a_0_0, _c_0_20);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n                vec_st(_c_0_20, 0, c+(i+0)*effj*2+20);\n            }\n        }\n        else if (j>8) {\n            for (i=0; i+3<=dimi; i+=3) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_1_16 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                _c_2_16 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _a_0_1 = vec_ld2(0, (pa+2));\n                    _a_0_2 = vec_ld2(0, (pa+4));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _c_1_0 = vec_xmadd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_1_0 = vec_xxnpmadd(_b_0_0, _a_0_1, _c_1_0);\n                    _c_2_0 = vec_xmadd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_2_0 = vec_xxnpmadd(_b_0_0, _a_0_2, _c_2_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _c_1_4 = vec_xmadd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_1_4 = vec_xxnpmadd(_b_0_4, _a_0_1, _c_1_4);\n                    _c_2_4 = vec_xmadd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_2_4 = vec_xxnpmadd(_b_0_4, _a_0_2, _c_2_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _c_1_8 = vec_xmadd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_1_8 = vec_xxnpmadd(_b_0_8, _a_0_1, _c_1_8);\n                    _c_2_8 = vec_xmadd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_2_8 = vec_xxnpmadd(_b_0_8, _a_0_2, _c_2_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_xmadd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_0_12 = vec_xxnpmadd(_b_0_12, _a_0_0, _c_0_12);\n                    _c_1_12 = vec_xmadd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_1_12 = vec_xxnpmadd(_b_0_12, _a_0_1, _c_1_12);\n                    _c_2_12 = vec_xmadd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_2_12 = vec_xxnpmadd(_b_0_12, _a_0_2, _c_2_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_xmadd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_0_16 = vec_xxnpmadd(_b_0_16, _a_0_0, _c_0_16);\n                    _c_1_16 = vec_xmadd(_a_0_1, _b_0_16, _c_1_16);\n                    _c_1_16 = vec_xxnpmadd(_b_0_16, _a_0_1, _c_1_16);\n                    _c_2_16 = vec_xmadd(_a_0_2, _b_0_16, _c_2_16);\n                    _c_2_16 = vec_xxnpmadd(_b_0_16, _a_0_2, _c_2_16);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj*2+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj*2+12);\n                vec_st(_c_1_16, 0, c+(i+1)*effj*2+16);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj*2+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj*2+12);\n                vec_st(_c_2_16, 0, c+(i+2)*effj*2+16);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_xmadd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_0_12 = vec_xxnpmadd(_b_0_12, _a_0_0, _c_0_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_xmadd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_0_16 = vec_xxnpmadd(_b_0_16, _a_0_0, _c_0_16);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n            }\n        }\n        else if (j>6) {\n            for (i=0; i+3<=dimi; i+=3) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _a_0_1 = vec_ld2(0, (pa+2));\n                    _a_0_2 = vec_ld2(0, (pa+4));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _c_1_0 = vec_xmadd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_1_0 = vec_xxnpmadd(_b_0_0, _a_0_1, _c_1_0);\n                    _c_2_0 = vec_xmadd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_2_0 = vec_xxnpmadd(_b_0_0, _a_0_2, _c_2_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _c_1_4 = vec_xmadd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_1_4 = vec_xxnpmadd(_b_0_4, _a_0_1, _c_1_4);\n                    _c_2_4 = vec_xmadd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_2_4 = vec_xxnpmadd(_b_0_4, _a_0_2, _c_2_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _c_1_8 = vec_xmadd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_1_8 = vec_xxnpmadd(_b_0_8, _a_0_1, _c_1_8);\n                    _c_2_8 = vec_xmadd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_2_8 = vec_xxnpmadd(_b_0_8, _a_0_2, _c_2_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_xmadd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_0_12 = vec_xxnpmadd(_b_0_12, _a_0_0, _c_0_12);\n                    _c_1_12 = vec_xmadd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_1_12 = vec_xxnpmadd(_b_0_12, _a_0_1, _c_1_12);\n                    _c_2_12 = vec_xmadd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_2_12 = vec_xxnpmadd(_b_0_12, _a_0_2, _c_2_12);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj*2+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj*2+12);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj*2+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj*2+12);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_xmadd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_0_12 = vec_xxnpmadd(_b_0_12, _a_0_0, _c_0_12);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n            }\n        }\n        else if (j>4) {\n            for (i=0; i+3<=dimi; i+=3) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _a_0_1 = vec_ld2(0, (pa+2));\n                    _a_0_2 = vec_ld2(0, (pa+4));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _c_1_0 = vec_xmadd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_1_0 = vec_xxnpmadd(_b_0_0, _a_0_1, _c_1_0);\n                    _c_2_0 = vec_xmadd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_2_0 = vec_xxnpmadd(_b_0_0, _a_0_2, _c_2_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _c_1_4 = vec_xmadd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_1_4 = vec_xxnpmadd(_b_0_4, _a_0_1, _c_1_4);\n                    _c_2_4 = vec_xmadd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_2_4 = vec_xxnpmadd(_b_0_4, _a_0_2, _c_2_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                    _c_1_8 = vec_xmadd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_1_8 = vec_xxnpmadd(_b_0_8, _a_0_1, _c_1_8);\n                    _c_2_8 = vec_xmadd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_2_8 = vec_xxnpmadd(_b_0_8, _a_0_2, _c_2_8);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj*2+8);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj*2+8);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_xmadd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_0_8 = vec_xxnpmadd(_b_0_8, _a_0_0, _c_0_8);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n            }\n        }\n        else if (j>2) {\n            for (i=0; i+3<=dimi; i+=3) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _a_0_1 = vec_ld2(0, (pa+2));\n                    _a_0_2 = vec_ld2(0, (pa+4));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _c_1_0 = vec_xmadd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_1_0 = vec_xxnpmadd(_b_0_0, _a_0_1, _c_1_0);\n                    _c_2_0 = vec_xmadd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_2_0 = vec_xxnpmadd(_b_0_0, _a_0_2, _c_2_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                    _c_1_4 = vec_xmadd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_1_4 = vec_xxnpmadd(_b_0_4, _a_0_1, _c_1_4);\n                    _c_2_4 = vec_xmadd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_2_4 = vec_xxnpmadd(_b_0_4, _a_0_2, _c_2_4);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_xmadd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_0_4 = vec_xxnpmadd(_b_0_4, _a_0_0, _c_0_4);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n            }\n        }\n        else {\n            for (i=0; i+3<=dimi; i+=3) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _a_0_1 = vec_ld2(0, (pa+2));\n                    _a_0_2 = vec_ld2(0, (pa+4));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                    _c_1_0 = vec_xmadd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_1_0 = vec_xxnpmadd(_b_0_0, _a_0_1, _c_1_0);\n                    _c_2_0 = vec_xmadd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_2_0 = vec_xxnpmadd(_b_0_0, _a_0_2, _c_2_0);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi*2) {\n                    _a_0_0 = vec_ld2(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_xmadd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_0_0 = vec_xxnpmadd(_b_0_0, _a_0_0, _c_0_0);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n            }\n        }\n        /* Copy c out if needed */\n        if (dimj%2) {\n            double* ct = c_buf;\n            for (i=0; i<dimi; i++, ct += effj*2, c_out += dimj*2)\n                memcpy(c_out, ct, sizeof(double)*dimj*2);\n            free(c_buf);\n        }\n        /* Free the buffer for b */\n        if (free_b) free(b_buf);\n    }\n    void bgq_mtxmq_padded(long dimi, long dimj, long dimk, long extb, __complex__ double *  c_x,  const __complex__ double *  a_x,  const double  *  b_x) {\n        int i, j, k;\n        double *  c = (double*)c_x;\n        double *  a = (double*)a_x;\n        double *  b = (double*)b_x;\n        long effj = dimj;\n        double * c_buf;\n        double * b_buf;\n        bool free_b = false;\n        /* Setup a buffer for c if needed */\n        double* c_out = c;\n        if (dimj%2) {\n            effj = (dimj | 1) + 1;\n            posix_memalign((void **) &c, 32, dimi*effj*sizeof(double)*2);\n            c_buf = c;\n        }\n        /* Copy b into a buffer if needed */\n        if (extb%4) {\n            long t_extb = (dimj | 3) + 1;\n            free_b = true;\n            posix_memalign((void **) &b_buf, 32, dimk*t_extb*sizeof(double));\n            double* bp = b_buf;\n            for (k=0; k<dimk; k++, bp += t_extb, b += extb)\n                memcpy(bp, b, sizeof(double)*dimj);\n            b = b_buf;\n            extb = t_extb;\n        }\n        vector4double _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_2_4, _c_2_5, _c_2_6, _c_2_7, _c_3_0, _c_3_1, _c_3_2, _c_3_3, _c_3_4, _c_3_5, _c_3_6, _c_3_7, _c_4_0, _c_4_1, _c_4_2, _c_4_3, _c_4_4, _c_4_5, _c_4_6, _c_4_7, _c_5_0, _c_5_1, _c_5_2, _c_5_3, _c_5_4, _c_5_5, _c_5_6, _c_5_7, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7;\n        vector4double _a_0_0, _a_0_1, _a_0_2, _a_0_3, _a_0_4, _a_0_5;\n        vector4double _az_0_0, _az_0_1, _az_0_2, _az_0_3, _az_0_4, _az_0_5;\n        vector4double _bz_0_0, _bz_0_1, _bz_0_2, _bz_0_3, _bz_0_4, _bz_0_5, _bz_0_6, _bz_0_7;\n        vector4double _cr_perm = vec_gpci(0x9);\n        for (i=0; i+6<=dimi; i+=6) {\n            double*  xb = b;\n            double*  xc = c;\n            for (j=effj; j>4; j-=4,xc+=4*2,xb+=4) {\n                double*  pb = xb;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                _c_4_0 = vec_splats(0.0);\n                _c_4_4 = vec_splats(0.0);\n                _c_5_0 = vec_splats(0.0);\n                _c_5_4 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi*2) {\n                    _az_0_0 = vec_ld2(0, (pa+0));\n                    _az_0_1 = vec_ld2(0, (pa+2));\n                    _az_0_2 = vec_ld2(0, (pa+4));\n                    _az_0_3 = vec_ld2(0, (pa+6));\n                    _az_0_4 = vec_ld2(0, (pa+8));\n                    _az_0_5 = vec_ld2(0, (pa+10));\n                    _bz_0_0 = vec_ld2(0, pb+0);\n                    _bz_0_0 = vec_perm(_bz_0_0, _bz_0_0, _cr_perm);\n                    _c_0_0 = vec_madd(_az_0_0, _bz_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_az_0_1, _bz_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_az_0_2, _bz_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_az_0_3, _bz_0_0, _c_3_0);\n                    _c_4_0 = vec_madd(_az_0_4, _bz_0_0, _c_4_0);\n                    _c_5_0 = vec_madd(_az_0_5, _bz_0_0, _c_5_0);\n                    _bz_0_4 = vec_ld2(0, pb+2);\n                    _bz_0_4 = vec_perm(_bz_0_4, _bz_0_4, _cr_perm);\n                    _c_0_4 = vec_madd(_az_0_0, _bz_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_az_0_1, _bz_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_az_0_2, _bz_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_az_0_3, _bz_0_4, _c_3_4);\n                    _c_4_4 = vec_madd(_az_0_4, _bz_0_4, _c_4_4);\n                    _c_5_4 = vec_madd(_az_0_5, _bz_0_4, _c_5_4);\n                }\n                vec_st(_c_0_0, 0, xc+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, xc+(i+0)*effj*2+4);\n                vec_st(_c_1_0, 0, xc+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, xc+(i+1)*effj*2+4);\n                vec_st(_c_2_0, 0, xc+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, xc+(i+2)*effj*2+4);\n                vec_st(_c_3_0, 0, xc+(i+3)*effj*2+0);\n                vec_st(_c_3_4, 0, xc+(i+3)*effj*2+4);\n                vec_st(_c_4_0, 0, xc+(i+4)*effj*2+0);\n                vec_st(_c_4_4, 0, xc+(i+4)*effj*2+4);\n                vec_st(_c_5_0, 0, xc+(i+5)*effj*2+0);\n                vec_st(_c_5_4, 0, xc+(i+5)*effj*2+4);\n            }\n            if (j>2) {\n                double*  pb = xb;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                _c_4_0 = vec_splats(0.0);\n                _c_4_4 = vec_splats(0.0);\n                _c_5_0 = vec_splats(0.0);\n                _c_5_4 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi*2) {\n                    _az_0_0 = vec_ld2(0, (pa+0));\n                    _az_0_1 = vec_ld2(0, (pa+2));\n                    _az_0_2 = vec_ld2(0, (pa+4));\n                    _az_0_3 = vec_ld2(0, (pa+6));\n                    _az_0_4 = vec_ld2(0, (pa+8));\n                    _az_0_5 = vec_ld2(0, (pa+10));\n                    _bz_0_0 = vec_ld2(0, pb+0);\n                    _bz_0_0 = vec_perm(_bz_0_0, _bz_0_0, _cr_perm);\n                    _c_0_0 = vec_madd(_az_0_0, _bz_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_az_0_1, _bz_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_az_0_2, _bz_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_az_0_3, _bz_0_0, _c_3_0);\n                    _c_4_0 = vec_madd(_az_0_4, _bz_0_0, _c_4_0);\n                    _c_5_0 = vec_madd(_az_0_5, _bz_0_0, _c_5_0);\n                    _bz_0_4 = vec_ld2(0, pb+2);\n                    _bz_0_4 = vec_perm(_bz_0_4, _bz_0_4, _cr_perm);\n                    _c_0_4 = vec_madd(_az_0_0, _bz_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_az_0_1, _bz_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_az_0_2, _bz_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_az_0_3, _bz_0_4, _c_3_4);\n                    _c_4_4 = vec_madd(_az_0_4, _bz_0_4, _c_4_4);\n                    _c_5_4 = vec_madd(_az_0_5, _bz_0_4, _c_5_4);\n                }\n                vec_st(_c_0_0, 0, xc+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, xc+(i+0)*effj*2+4);\n                vec_st(_c_1_0, 0, xc+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, xc+(i+1)*effj*2+4);\n                vec_st(_c_2_0, 0, xc+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, xc+(i+2)*effj*2+4);\n                vec_st(_c_3_0, 0, xc+(i+3)*effj*2+0);\n                vec_st(_c_3_4, 0, xc+(i+3)*effj*2+4);\n                vec_st(_c_4_0, 0, xc+(i+4)*effj*2+0);\n                vec_st(_c_4_4, 0, xc+(i+4)*effj*2+4);\n                vec_st(_c_5_0, 0, xc+(i+5)*effj*2+0);\n                vec_st(_c_5_4, 0, xc+(i+5)*effj*2+4);\n            }\n            else {\n                double*  pb = xb;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_4_0 = vec_splats(0.0);\n                _c_5_0 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi*2) {\n                    _az_0_0 = vec_ld2(0, (pa+0));\n                    _az_0_1 = vec_ld2(0, (pa+2));\n                    _az_0_2 = vec_ld2(0, (pa+4));\n                    _az_0_3 = vec_ld2(0, (pa+6));\n                    _az_0_4 = vec_ld2(0, (pa+8));\n                    _az_0_5 = vec_ld2(0, (pa+10));\n                    _bz_0_0 = vec_ld2(0, pb+0);\n                    _bz_0_0 = vec_perm(_bz_0_0, _bz_0_0, _cr_perm);\n                    _c_0_0 = vec_madd(_az_0_0, _bz_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_az_0_1, _bz_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_az_0_2, _bz_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_az_0_3, _bz_0_0, _c_3_0);\n                    _c_4_0 = vec_madd(_az_0_4, _bz_0_0, _c_4_0);\n                    _c_5_0 = vec_madd(_az_0_5, _bz_0_0, _c_5_0);\n                }\n                vec_st(_c_0_0, 0, xc+(i+0)*effj*2+0);\n                vec_st(_c_1_0, 0, xc+(i+1)*effj*2+0);\n                vec_st(_c_2_0, 0, xc+(i+2)*effj*2+0);\n                vec_st(_c_3_0, 0, xc+(i+3)*effj*2+0);\n                vec_st(_c_4_0, 0, xc+(i+4)*effj*2+0);\n                vec_st(_c_5_0, 0, xc+(i+5)*effj*2+0);\n            }\n        }\n        for (; i+1<=dimi; i+=1) {\n            double*  xb = b;\n            double*  xc = c;\n            for (j=effj; j>4; j-=4,xc+=4*2,xb+=4) {\n                double*  pb = xb;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi*2) {\n                    _az_0_0 = vec_ld2(0, (pa+0));\n                    _bz_0_0 = vec_ld2(0, pb+0);\n                    _bz_0_0 = vec_perm(_bz_0_0, _bz_0_0, _cr_perm);\n                    _c_0_0 = vec_madd(_az_0_0, _bz_0_0, _c_0_0);\n                    _bz_0_4 = vec_ld2(0, pb+2);\n                    _bz_0_4 = vec_perm(_bz_0_4, _bz_0_4, _cr_perm);\n                    _c_0_4 = vec_madd(_az_0_0, _bz_0_4, _c_0_4);\n                }\n                vec_st(_c_0_0, 0, xc+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, xc+(i+0)*effj*2+4);\n            }\n            if (j>2) {\n                double*  pb = xb;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi*2) {\n                    _az_0_0 = vec_ld2(0, (pa+0));\n                    _bz_0_0 = vec_ld2(0, pb+0);\n                    _bz_0_0 = vec_perm(_bz_0_0, _bz_0_0, _cr_perm);\n                    _c_0_0 = vec_madd(_az_0_0, _bz_0_0, _c_0_0);\n                    _bz_0_4 = vec_ld2(0, pb+2);\n                    _bz_0_4 = vec_perm(_bz_0_4, _bz_0_4, _cr_perm);\n                    _c_0_4 = vec_madd(_az_0_0, _bz_0_4, _c_0_4);\n                }\n                vec_st(_c_0_0, 0, xc+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, xc+(i+0)*effj*2+4);\n            }\n            else {\n                double*  pb = xb;\n                double*  pa = a+i*2;\n                _c_0_0 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi*2) {\n                    _az_0_0 = vec_ld2(0, (pa+0));\n                    _bz_0_0 = vec_ld2(0, pb+0);\n                    _bz_0_0 = vec_perm(_bz_0_0, _bz_0_0, _cr_perm);\n                    _c_0_0 = vec_madd(_az_0_0, _bz_0_0, _c_0_0);\n                }\n                vec_st(_c_0_0, 0, xc+(i+0)*effj*2+0);\n            }\n        }\n        /* Copy c out if needed */\n        if (dimj%2) {\n            double* ct = c_buf;\n            for (i=0; i<dimi; i++, ct += effj*2, c_out += dimj*2)\n                memcpy(c_out, ct, sizeof(double)*dimj*2);\n            free(c_buf);\n        }\n        /* Free the buffer for b */\n        if (free_b) free(b_buf);\n    }\n    void bgq_mtxmq_padded(long dimi, long dimj, long dimk, long extb, __complex__ double *  c_x,  const double  *  a_x,  const __complex__ double *  b_x) {\n        int i, j, k;\n        double *  c = (double*)c_x;\n        double *  a = (double*)a_x;\n        double *  b = (double*)b_x;\n        long effj = dimj;\n        double * c_buf;\n        double * b_buf;\n        bool free_b = false;\n        /* Setup a buffer for c if needed */\n        double* c_out = c;\n        if (dimj%2) {\n            effj = (dimj | 1) + 1;\n            posix_memalign((void **) &c, 32, dimi*effj*sizeof(double)*2);\n            c_buf = c;\n        }\n        /* Copy b into a buffer if needed */\n        if (extb%2) {\n            long t_extb = (dimj | 1) + 1;\n            free_b = true;\n            posix_memalign((void **) &b_buf, 32, dimk*t_extb*sizeof(double)*2);\n            double* bp = b_buf;\n            for (k=0; k<dimk; k++, bp += t_extb*2, b += extb*2)\n                memcpy(bp, b, sizeof(double)*dimj*2);\n            b = b_buf;\n            extb = t_extb;\n        }\n        vector4double _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_0_14, _c_0_15, _c_0_16, _c_0_17, _c_0_18, _c_0_19, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _c_1_14, _c_1_15, _c_1_16, _c_1_17, _c_1_18, _c_1_19, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_2_4, _c_2_5, _c_2_6, _c_2_7, _c_2_8, _c_2_9, _c_2_10, _c_2_11, _c_2_12, _c_2_13, _c_2_14, _c_2_15, _c_2_16, _c_2_17, _c_2_18, _c_2_19, _c_3_0, _c_3_1, _c_3_2, _c_3_3, _c_3_4, _c_3_5, _c_3_6, _c_3_7, _c_3_8, _c_3_9, _c_3_10, _c_3_11, _c_3_12, _c_3_13, _c_3_14, _c_3_15, _c_3_16, _c_3_17, _c_3_18, _c_3_19, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13, _b_0_14, _b_0_15, _b_0_16, _b_0_17, _b_0_18, _b_0_19;\n        vector4double _a_0_0, _a_0_1, _a_0_2, _a_0_3;\n        for (j=effj; j>10; j-=10,c+=10*2,b+=10*2) {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_1_16 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                _c_2_16 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                _c_3_8 = vec_splats(0.0);\n                _c_3_12 = vec_splats(0.0);\n                _c_3_16 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_a_0_3, _b_0_4, _c_3_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_1_8 = vec_madd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_2_8 = vec_madd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_3_8 = vec_madd(_a_0_3, _b_0_8, _c_3_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_1_12 = vec_madd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_2_12 = vec_madd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_3_12 = vec_madd(_a_0_3, _b_0_12, _c_3_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_madd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_1_16 = vec_madd(_a_0_1, _b_0_16, _c_1_16);\n                    _c_2_16 = vec_madd(_a_0_2, _b_0_16, _c_2_16);\n                    _c_3_16 = vec_madd(_a_0_3, _b_0_16, _c_3_16);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj*2+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj*2+12);\n                vec_st(_c_1_16, 0, c+(i+1)*effj*2+16);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj*2+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj*2+12);\n                vec_st(_c_2_16, 0, c+(i+2)*effj*2+16);\n                vec_st(_c_3_0, 0, c+(i+3)*effj*2+0);\n                vec_st(_c_3_4, 0, c+(i+3)*effj*2+4);\n                vec_st(_c_3_8, 0, c+(i+3)*effj*2+8);\n                vec_st(_c_3_12, 0, c+(i+3)*effj*2+12);\n                vec_st(_c_3_16, 0, c+(i+3)*effj*2+16);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_madd(_a_0_0, _b_0_16, _c_0_16);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n            }\n        }\n        if (j>8) {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_1_16 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                _c_2_16 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                _c_3_8 = vec_splats(0.0);\n                _c_3_12 = vec_splats(0.0);\n                _c_3_16 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_a_0_3, _b_0_4, _c_3_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_1_8 = vec_madd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_2_8 = vec_madd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_3_8 = vec_madd(_a_0_3, _b_0_8, _c_3_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_1_12 = vec_madd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_2_12 = vec_madd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_3_12 = vec_madd(_a_0_3, _b_0_12, _c_3_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_madd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_1_16 = vec_madd(_a_0_1, _b_0_16, _c_1_16);\n                    _c_2_16 = vec_madd(_a_0_2, _b_0_16, _c_2_16);\n                    _c_3_16 = vec_madd(_a_0_3, _b_0_16, _c_3_16);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj*2+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj*2+12);\n                vec_st(_c_1_16, 0, c+(i+1)*effj*2+16);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj*2+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj*2+12);\n                vec_st(_c_2_16, 0, c+(i+2)*effj*2+16);\n                vec_st(_c_3_0, 0, c+(i+3)*effj*2+0);\n                vec_st(_c_3_4, 0, c+(i+3)*effj*2+4);\n                vec_st(_c_3_8, 0, c+(i+3)*effj*2+8);\n                vec_st(_c_3_12, 0, c+(i+3)*effj*2+12);\n                vec_st(_c_3_16, 0, c+(i+3)*effj*2+16);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_madd(_a_0_0, _b_0_16, _c_0_16);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj*2+16);\n            }\n        }\n        else if (j>6) {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                _c_3_8 = vec_splats(0.0);\n                _c_3_12 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_a_0_3, _b_0_4, _c_3_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_1_8 = vec_madd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_2_8 = vec_madd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_3_8 = vec_madd(_a_0_3, _b_0_8, _c_3_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_1_12 = vec_madd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_2_12 = vec_madd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_3_12 = vec_madd(_a_0_3, _b_0_12, _c_3_12);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj*2+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj*2+12);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj*2+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj*2+12);\n                vec_st(_c_3_0, 0, c+(i+3)*effj*2+0);\n                vec_st(_c_3_4, 0, c+(i+3)*effj*2+4);\n                vec_st(_c_3_8, 0, c+(i+3)*effj*2+8);\n                vec_st(_c_3_12, 0, c+(i+3)*effj*2+12);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj*2+12);\n            }\n        }\n        else if (j>4) {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                _c_3_8 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_a_0_3, _b_0_4, _c_3_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_1_8 = vec_madd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_2_8 = vec_madd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_3_8 = vec_madd(_a_0_3, _b_0_8, _c_3_8);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj*2+8);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj*2+8);\n                vec_st(_c_3_0, 0, c+(i+3)*effj*2+0);\n                vec_st(_c_3_4, 0, c+(i+3)*effj*2+4);\n                vec_st(_c_3_8, 0, c+(i+3)*effj*2+8);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj*2+8);\n            }\n        }\n        else if (j>2) {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_a_0_3, _b_0_4, _c_3_4);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj*2+4);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj*2+4);\n                vec_st(_c_3_0, 0, c+(i+3)*effj*2+0);\n                vec_st(_c_3_4, 0, c+(i+3)*effj*2+4);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj*2+4);\n            }\n        }\n        else {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n                vec_st(_c_1_0, 0, c+(i+1)*effj*2+0);\n                vec_st(_c_2_0, 0, c+(i+2)*effj*2+0);\n                vec_st(_c_3_0, 0, c+(i+3)*effj*2+0);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb*2,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj*2+0);\n            }\n        }\n        /* Copy c out if needed */\n        if (dimj%2) {\n            double* ct = c_buf;\n            for (i=0; i<dimi; i++, ct += effj*2, c_out += dimj*2)\n                memcpy(c_out, ct, sizeof(double)*dimj*2);\n            free(c_buf);\n        }\n        /* Free the buffer for b */\n        if (free_b) free(b_buf);\n    }\n    void bgq_mtxmq_padded(long dimi, long dimj, long dimk, long extb, double  *  c_x,  const double  *  a_x,  const double  *  b_x) {\n        int i, j, k;\n        double *  c = (double*)c_x;\n        double *  a = (double*)a_x;\n        double *  b = (double*)b_x;\n        long effj = dimj;\n        double * c_buf;\n        double * b_buf;\n        bool free_b = false;\n        /* Setup a buffer for c if needed */\n        double* c_out = c;\n        if (dimj%4) {\n            effj = (dimj | 3) + 1;\n            posix_memalign((void **) &c, 32, dimi*effj*sizeof(double));\n            c_buf = c;\n        }\n        /* Copy b into a buffer if needed */\n        if (extb%4) {\n            long t_extb = (dimj | 3) + 1;\n            free_b = true;\n            posix_memalign((void **) &b_buf, 32, dimk*t_extb*sizeof(double));\n            double* bp = b_buf;\n            for (k=0; k<dimk; k++, bp += t_extb, b += extb)\n                memcpy(bp, b, sizeof(double)*dimj);\n            b = b_buf;\n            extb = t_extb;\n        }\n        vector4double _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_0_14, _c_0_15, _c_0_16, _c_0_17, _c_0_18, _c_0_19, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _c_1_14, _c_1_15, _c_1_16, _c_1_17, _c_1_18, _c_1_19, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_2_4, _c_2_5, _c_2_6, _c_2_7, _c_2_8, _c_2_9, _c_2_10, _c_2_11, _c_2_12, _c_2_13, _c_2_14, _c_2_15, _c_2_16, _c_2_17, _c_2_18, _c_2_19, _c_3_0, _c_3_1, _c_3_2, _c_3_3, _c_3_4, _c_3_5, _c_3_6, _c_3_7, _c_3_8, _c_3_9, _c_3_10, _c_3_11, _c_3_12, _c_3_13, _c_3_14, _c_3_15, _c_3_16, _c_3_17, _c_3_18, _c_3_19, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13, _b_0_14, _b_0_15, _b_0_16, _b_0_17, _b_0_18, _b_0_19;\n        vector4double _a_0_0, _a_0_1, _a_0_2, _a_0_3;\n        for (j=effj; j>20; j-=20,c+=20,b+=20) {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_1_16 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                _c_2_16 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                _c_3_8 = vec_splats(0.0);\n                _c_3_12 = vec_splats(0.0);\n                _c_3_16 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_a_0_3, _b_0_4, _c_3_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_1_8 = vec_madd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_2_8 = vec_madd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_3_8 = vec_madd(_a_0_3, _b_0_8, _c_3_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_1_12 = vec_madd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_2_12 = vec_madd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_3_12 = vec_madd(_a_0_3, _b_0_12, _c_3_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_madd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_1_16 = vec_madd(_a_0_1, _b_0_16, _c_1_16);\n                    _c_2_16 = vec_madd(_a_0_2, _b_0_16, _c_2_16);\n                    _c_3_16 = vec_madd(_a_0_3, _b_0_16, _c_3_16);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj+16);\n                vec_st(_c_1_0, 0, c+(i+1)*effj+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj+12);\n                vec_st(_c_1_16, 0, c+(i+1)*effj+16);\n                vec_st(_c_2_0, 0, c+(i+2)*effj+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj+12);\n                vec_st(_c_2_16, 0, c+(i+2)*effj+16);\n                vec_st(_c_3_0, 0, c+(i+3)*effj+0);\n                vec_st(_c_3_4, 0, c+(i+3)*effj+4);\n                vec_st(_c_3_8, 0, c+(i+3)*effj+8);\n                vec_st(_c_3_12, 0, c+(i+3)*effj+12);\n                vec_st(_c_3_16, 0, c+(i+3)*effj+16);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_madd(_a_0_0, _b_0_16, _c_0_16);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj+16);\n            }\n        }\n        if (j>16) {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_1_16 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                _c_2_16 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                _c_3_8 = vec_splats(0.0);\n                _c_3_12 = vec_splats(0.0);\n                _c_3_16 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_a_0_3, _b_0_4, _c_3_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_1_8 = vec_madd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_2_8 = vec_madd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_3_8 = vec_madd(_a_0_3, _b_0_8, _c_3_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_1_12 = vec_madd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_2_12 = vec_madd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_3_12 = vec_madd(_a_0_3, _b_0_12, _c_3_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_madd(_a_0_0, _b_0_16, _c_0_16);\n                    _c_1_16 = vec_madd(_a_0_1, _b_0_16, _c_1_16);\n                    _c_2_16 = vec_madd(_a_0_2, _b_0_16, _c_2_16);\n                    _c_3_16 = vec_madd(_a_0_3, _b_0_16, _c_3_16);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj+16);\n                vec_st(_c_1_0, 0, c+(i+1)*effj+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj+12);\n                vec_st(_c_1_16, 0, c+(i+1)*effj+16);\n                vec_st(_c_2_0, 0, c+(i+2)*effj+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj+12);\n                vec_st(_c_2_16, 0, c+(i+2)*effj+16);\n                vec_st(_c_3_0, 0, c+(i+3)*effj+0);\n                vec_st(_c_3_4, 0, c+(i+3)*effj+4);\n                vec_st(_c_3_8, 0, c+(i+3)*effj+8);\n                vec_st(_c_3_12, 0, c+(i+3)*effj+12);\n                vec_st(_c_3_16, 0, c+(i+3)*effj+16);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_0_16 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                    _b_0_16 = vec_ld(0, pb+16);\n                    _c_0_16 = vec_madd(_a_0_0, _b_0_16, _c_0_16);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj+12);\n                vec_st(_c_0_16, 0, c+(i+0)*effj+16);\n            }\n        }\n        else if (j>12) {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_1_12 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_2_12 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                _c_3_8 = vec_splats(0.0);\n                _c_3_12 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_a_0_3, _b_0_4, _c_3_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_1_8 = vec_madd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_2_8 = vec_madd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_3_8 = vec_madd(_a_0_3, _b_0_8, _c_3_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                    _c_1_12 = vec_madd(_a_0_1, _b_0_12, _c_1_12);\n                    _c_2_12 = vec_madd(_a_0_2, _b_0_12, _c_2_12);\n                    _c_3_12 = vec_madd(_a_0_3, _b_0_12, _c_3_12);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj+12);\n                vec_st(_c_1_0, 0, c+(i+1)*effj+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj+8);\n                vec_st(_c_1_12, 0, c+(i+1)*effj+12);\n                vec_st(_c_2_0, 0, c+(i+2)*effj+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj+8);\n                vec_st(_c_2_12, 0, c+(i+2)*effj+12);\n                vec_st(_c_3_0, 0, c+(i+3)*effj+0);\n                vec_st(_c_3_4, 0, c+(i+3)*effj+4);\n                vec_st(_c_3_8, 0, c+(i+3)*effj+8);\n                vec_st(_c_3_12, 0, c+(i+3)*effj+12);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_0_12 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _b_0_12 = vec_ld(0, pb+12);\n                    _c_0_12 = vec_madd(_a_0_0, _b_0_12, _c_0_12);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj+8);\n                vec_st(_c_0_12, 0, c+(i+0)*effj+12);\n            }\n        }\n        else if (j>8) {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_1_8 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_2_8 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                _c_3_8 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_a_0_3, _b_0_4, _c_3_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                    _c_1_8 = vec_madd(_a_0_1, _b_0_8, _c_1_8);\n                    _c_2_8 = vec_madd(_a_0_2, _b_0_8, _c_2_8);\n                    _c_3_8 = vec_madd(_a_0_3, _b_0_8, _c_3_8);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj+8);\n                vec_st(_c_1_0, 0, c+(i+1)*effj+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj+4);\n                vec_st(_c_1_8, 0, c+(i+1)*effj+8);\n                vec_st(_c_2_0, 0, c+(i+2)*effj+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj+4);\n                vec_st(_c_2_8, 0, c+(i+2)*effj+8);\n                vec_st(_c_3_0, 0, c+(i+3)*effj+0);\n                vec_st(_c_3_4, 0, c+(i+3)*effj+4);\n                vec_st(_c_3_8, 0, c+(i+3)*effj+8);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_0_8 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _b_0_8 = vec_ld(0, pb+8);\n                    _c_0_8 = vec_madd(_a_0_0, _b_0_8, _c_0_8);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj+4);\n                vec_st(_c_0_8, 0, c+(i+0)*effj+8);\n            }\n        }\n        else if (j>4) {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_1_4 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_2_4 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                _c_3_4 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                    _c_1_4 = vec_madd(_a_0_1, _b_0_4, _c_1_4);\n                    _c_2_4 = vec_madd(_a_0_2, _b_0_4, _c_2_4);\n                    _c_3_4 = vec_madd(_a_0_3, _b_0_4, _c_3_4);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj+4);\n                vec_st(_c_1_0, 0, c+(i+1)*effj+0);\n                vec_st(_c_1_4, 0, c+(i+1)*effj+4);\n                vec_st(_c_2_0, 0, c+(i+2)*effj+0);\n                vec_st(_c_2_4, 0, c+(i+2)*effj+4);\n                vec_st(_c_3_0, 0, c+(i+3)*effj+0);\n                vec_st(_c_3_4, 0, c+(i+3)*effj+4);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_0_4 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _b_0_4 = vec_ld(0, pb+4);\n                    _c_0_4 = vec_madd(_a_0_0, _b_0_4, _c_0_4);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_0_4, 0, c+(i+0)*effj+4);\n            }\n        }\n        else {\n            for (i=0; i+4<=dimi; i+=4) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                _c_1_0 = vec_splats(0.0);\n                _c_2_0 = vec_splats(0.0);\n                _c_3_0 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _a_0_1 = vec_lds(0, (pa+1));\n                    _a_0_2 = vec_lds(0, (pa+2));\n                    _a_0_3 = vec_lds(0, (pa+3));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                    _c_1_0 = vec_madd(_a_0_1, _b_0_0, _c_1_0);\n                    _c_2_0 = vec_madd(_a_0_2, _b_0_0, _c_2_0);\n                    _c_3_0 = vec_madd(_a_0_3, _b_0_0, _c_3_0);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n                vec_st(_c_1_0, 0, c+(i+1)*effj+0);\n                vec_st(_c_2_0, 0, c+(i+2)*effj+0);\n                vec_st(_c_3_0, 0, c+(i+3)*effj+0);\n            }\n            for (; i+1<=dimi; i+=1) {\n                double*  pb = b;\n                double*  pa = a+i;\n                _c_0_0 = vec_splats(0.0);\n                for (k=0; k<dimk; k+=1,pb+=extb,pa+=dimi) {\n                    _a_0_0 = vec_lds(0, (pa+0));\n                    _b_0_0 = vec_ld(0, pb+0);\n                    _c_0_0 = vec_madd(_a_0_0, _b_0_0, _c_0_0);\n                }\n                vec_st(_c_0_0, 0, c+(i+0)*effj+0);\n            }\n        }\n        /* Copy c out if needed */\n        if (dimj%4) {\n            double* ct = c_buf;\n            for (i=0; i<dimi; i++, ct += effj, c_out += dimj)\n                memcpy(c_out, ct, sizeof(double)*dimj);\n            free(c_buf);\n        }\n        /* Free the buffer for b */\n        if (free_b) free(b_buf);\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/bgp_tuning/Makefile",
    "content": "\n# Blue Gene/P\n#BLAS=/soft/apps/LIBBLAS/libgoto_ppc440FP2-r1.02a.VM.a\n#HPM=/soft/apps/UPC/lib/libhpm.a\n#CXX=mpixlcxx_r\n#CXXFLAGS=-g -O5 -qarch=450d -qtune=450 -qthreaded\n\n# LLVM on a laptop\nBLAS=-lblas\nHPM=\nCXX=clang++\nCXXFLAGS=-g -O3\n\nall: test_mtxmq.x test_Zmtxmq.x\n\ntest_mtxmq.x: test_mtxmq.o mtxmq.o mTxm_tune.o\n\t$(CXX) $(CXXFLAGS) test_mtxmq.o mtxmq.o mTxm_tune.o $(BLAS) $(HPM) -o test_mtxmq.x\n\ntest_Zmtxmq.x: test_Zmtxmq.o mtxmq.o mTxm_tune.o\n\t$(CXX) $(CXXFLAGS) test_Zmtxmq.o mtxmq.o mTxm_tune.o $(BLAS) $(HPM) -o test_Zmtxmq.x\n\n$%.o: %.cc\n\t$(CXX) -c $(CXXFLAGS) $< -o $@\n\nclean:\n\t$(RM) $(RMFLAGS) *.o\n\nrealclean: clean\n\t$(RM) $(RMFLAGS) *.x\n\n\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/bgp_tuning/mTxm_tune.cc",
    "content": "#include <complex>\n\nusing namespace std;\n\ntypedef complex<double> double_complex;\n\nvoid mTxm_tune(long dimi, long dimj, long dimk, double* c, const double* a, const double* b) {\n    int i, j, k;\n    for (k=0; k<dimk; ++k) {\n        for (j=0; j<dimj; ++j) {\n            for (i=0; i<dimi; ++i) {\n                c[i*dimj+j] += a[k*dimi+i]*b[k*dimj+j];\n            }\n        }\n    }\n}\n\nvoid mTxm_tune(long dimi, long dimj, long dimk, double_complex* c, const double_complex* a, const double_complex* b) {\n    int i, j, k;\n    for (k=0; k<dimk; ++k) {\n        for (j=0; j<dimj; ++j) {\n            for (i=0; i<dimi; ++i) {\n                c[i*dimj+j] += a[k*dimi+i]*b[k*dimj+j];\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/bgp_tuning/mtxmq.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include <complex>\n\nusing namespace std;\n\ntypedef complex<double> double_complex;\n\nvoid mTxmq(long dimi, long dimj, long dimk, double* c, const double* a, const double* b) {\n    for (long i=0; i<dimi; ++i,c+=dimj,++a) {\n        for (long j=0; j<dimj; ++j) c[j] = 0.0;\n        const double *ai = a;\n        for (long k=0; k<dimk; ++k,ai+=dimi) {\n            const double aki = *ai;\n            for (long j=0; j<dimj; ++j) {\n                c[j] += aki*b[k*dimj+j];\n            }\n        }\n    }\n}\n\nvoid mTxmq(long dimi, long dimj, long dimk, double_complex* c, const double_complex* a, const double* b) {\n    for (long i=0; i<dimi; ++i,c+=dimj,++a) {\n        for (long j=0; j<dimj; ++j) c[j] = 0.0;\n        const double_complex *ai = a;\n        for (long k=0; k<dimk; ++k,ai+=dimi) {\n            const double_complex aki = *ai;\n            for (long j=0; j<dimj; ++j) {\n                c[j] += aki*b[k*dimj+j];\n            }\n        }\n    }\n}\n\nvoid mTxmq(long dimi, long dimj, long dimk, double_complex* c, const double_complex* a, const double_complex* b) {\n    for (long i=0; i<dimi; ++i,c+=dimj,++a) {\n        for (long j=0; j<dimj; ++j) c[j] = 0.0;\n        const double_complex *ai = a;\n        for (long k=0; k<dimk; ++k,ai+=dimi) {\n            const double_complex aki = *ai;\n            for (long j=0; j<dimj; ++j) {\n                c[j] += aki*b[k*dimj+j];\n            }\n        }\n    }\n}\n\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/bgp_tuning/original_performance_data.145618.output",
    "content": "Starting to test ... \n... OK!\n        (m*m)T*(m*m)   2   2   2     0.06     0.02\n        (m*m)T*(m*m)   4   4   4     0.13     0.11\n        (m*m)T*(m*m)   6   6   6     0.14     0.29\n        (m*m)T*(m*m)   8   8   8     0.17     0.60\n        (m*m)T*(m*m)  10  10  10     0.17     0.81\n        (m*m)T*(m*m)  12  12  12     0.18     1.14\n        (m*m)T*(m*m)  14  14  14     0.18     1.26\n        (m*m)T*(m*m)  16  16  16     0.19     1.61\n        (m*m)T*(m*m)  18  18  18     0.25     1.65\n        (m*m)T*(m*m)  20  20  20     0.29     1.91\n        (m*m)T*(m*m)  22  22  22     0.29     1.90\n        (m*m)T*(m*m)  24  24  24     0.30     2.16\n        (m*m)T*(m*m)  26  26  26     0.32     2.13\n        (m*m)T*(m*m)  28  28  28     0.34     2.32\n        (m*m)T*(m*m)  30  30  30     0.35     2.05\n        (m*m)T*(m*m)  32  32  32     0.35     2.29\n        (m*m)T*(m*m)  34  34  34     0.37     2.24\n        (m*m)T*(m*m)  36  36  36     0.40     2.46\n        (m*m)T*(m*m)  38  38  38     0.36     2.20\n        (m*m)T*(m*m)  40  40  40     0.36     2.39\n        (m*m)T*(m*m)  42  42  42     0.37     2.20\n        (m*m)T*(m*m)  44  44  44     0.40     2.38\n        (m*m)T*(m*m)  46  46  46     0.39     2.30\n        (m*m)T*(m*m)  48  48  48     0.38     2.40\n        (m*m)T*(m*m)  50  50  50     0.40     2.28\n        (m*m)T*(m*m)  52  52  52     0.41     2.38\n        (m*m)T*(m*m)  54  54  54     0.41     2.25\n        (m*m)T*(m*m)  56  56  56     0.39     2.42\n        (m*m)T*(m*m)  58  58  58     0.38     2.21\n      (m*m,m)T*(m*m)   4   2   2     0.07     0.03\n      (m*m,m)T*(m*m)  16   4   4     0.14     0.32\n      (m*m,m)T*(m*m)  36   6   6     0.15     0.73\n      (m*m,m)T*(m*m)  64   8   8     0.17     1.37\n      (m*m,m)T*(m*m) 100  10  10     0.17     1.52\n      (m*m,m)T*(m*m) 144  12  12     0.18     1.65\n      (m*m,m)T*(m*m) 196  14  14     0.16     1.54\n      (m*m,m)T*(m*m) 256  16  16     0.17     1.98\n      (m*m,m)T*(m*m) 324  18  18     0.22     1.85\n      (m*m,m)T*(m*m) 400  20  20     0.26     2.15\n      (m*m,m)T*(m*m) 484  22  22     0.26     1.98\n      (m*m,m)T*(m*m) 576  24  24     0.27     2.29\n      (m*m,m)T*(m*m) 676  26  26     0.28     2.15\n      (m*m,m)T*(m*m) 784  28  28     0.32     2.36\n      (m*m,m)T*(m*m) 900  30  30     0.32     2.28\n         tran(m,m,m)   4   2   2     0.07     0.03\n         tran(m,m,m)  16   4   4     0.14     0.32\n         tran(m,m,m)  36   6   6     0.15     0.73\n         tran(m,m,m)  64   8   8     0.17     1.38\n         tran(m,m,m) 100  10  10     0.17     1.52\n         tran(m,m,m) 144  12  12     0.18     1.67\n         tran(m,m,m) 196  14  14     0.17     1.55\n         tran(m,m,m) 256  16  16     0.17     1.95\n         tran(m,m,m) 324  18  18     0.22     1.85\n         tran(m,m,m) 400  20  20     0.26     2.13\n         tran(m,m,m) 484  22  22     0.26     1.97\n         tran(m,m,m) 576  24  24     0.27     2.28\n         tran(m,m,m) 676  26  26     0.28     2.15\n         tran(m,m,m) 784  28  28     0.32     2.36\n         tran(m,m,m) 900  30  30     0.32     2.27\n  (20*20,20)T*(20,m) 400   2  20     0.10     0.62\n  (20*20,20)T*(20,m) 400   4  20     0.13     1.09\n  (20*20,20)T*(20,m) 400   6  20     0.13     1.21\n  (20*20,20)T*(20,m) 400   8  20     0.15     1.72\n  (20*20,20)T*(20,m) 400  10  20     0.16     1.73\n  (20*20,20)T*(20,m) 400  12  20     0.16     1.90\n  (20*20,20)T*(20,m) 400  14  20     0.17     1.88\n  (20*20,20)T*(20,m) 400  16  20     0.17     2.12\n  (20*20,20)T*(20,m) 400  18  20     0.22     2.06\n  (20*20,20)T*(20,m) 400  20  20     0.26     2.15\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/bgp_tuning/submit",
    "content": "#!/bin/bash\nname=`echo ${1} | sed s/\"\\.x\"//g`\n#echo ${name}\ndirname=${name}_`date +%d%b%Y_%Hh%Mm`\nmkdir ${dirname}\ncp ${name}.x *.cc Makefile ${dirname}/.\ncd ${dirname}\nqsub -t 30 -n 1 -m smp ${name}.x\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/bgp_tuning/test_Zmtxmq.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <cmath>\n#include <complex>\n\ntypedef std::complex<double> double_complex;\n\n#ifdef __bgp__\nextern \"C\" {\n#include \"dcmf.h\"\n}\n#endif\n\n#include \"rdtsc.h\"\n\n#ifdef HPM\n#include <mpi.h>\nextern \"C\" void HPM_Init(void);           // initialize the UPC unit\nextern \"C\" void HPM_Start(char *label);   // start counting in a block marked by the label\nextern \"C\" void HPM_Stop(char *label);    // stop counting in a block marked by the label\nextern \"C\" void HPM_Print(void);          // print counters for all blocks\nextern \"C\" void HPM_Print_Flops(void);\n#endif\n\n#define ZGEMM_FNAME zgemm_\n\nextern \"C\" void ZGEMM_FNAME(const char *transa, const char *transb, const int *m, const int *n, const int *k,\n                            const double_complex *alpha, const double_complex *a, const int *lda,\n                            const double_complex *b, const int *ldb, const double_complex *beta,\n                            double_complex *c, const int *ldc, int la, int lb);\n\nvoid mTxmq(long dimi, long dimj, long dimk, double_complex* c, const double_complex* a, const double_complex* b);\nvoid mTxm_tune(long dimi, long dimj, long dimk, double_complex* c, const double_complex* a, const double_complex* b);\n\nvoid mTxm_zgemm(long ni, long nj, long nk, double_complex* c, const double_complex* a, const double_complex*b ) {\n  int fni=ni;\n  int fnj=nj;\n  int fnk=nk;\n  double_complex one=1.0;\n  ZGEMM_FNAME(\"n\",\"t\",&fnj,&fni,&fnk,&one,b,&fnj,a,&fni,&one,c,&fnj,1,1);\n}\n\ndouble_complex ran()\n{\n  static unsigned long seed = 76521;\n  seed = seed *1812433253 + 12345;\n  return ((double_complex) (seed & 0x7fffffff)) * 4.6566128752458e-10;\n}\n\nvoid ran_fill(int n, double_complex *a) {\n    while (n--) *a++ = ran();\n}\n\nvoid mTxm(long dimi, long dimj, long dimk,\n          double_complex* c, const double_complex* a, const double_complex* b) {\n    int i, j, k;\n    for (k=0; k<dimk; ++k) {\n        for (j=0; j<dimj; ++j) {\n            for (i=0; i<dimi; ++i) {\n                c[i*dimj+j] += a[k*dimi+i]*b[k*dimj+j];\n            }\n        }\n    }\n}\n\nvoid timer(const char* s, long ni, long nj, long nk, double_complex *a, double_complex *b, double_complex *c) {\n  double fastest=0.0, fastest_zgemm=0.0, fastest_tune=0.0;\n\n  double nflop = 2.0*ni*nj*nk;\n  long loop;\n\n#ifdef HPM\n  HPM_Start(\"mTxmq\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxmq(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest) fastest = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq\");\n#endif\n\n#ifdef HPM\n  HPM_Start(\"mTxmq_zgemm\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxm_zgemm(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest_zgemm) fastest_zgemm = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq_zgemm\");\n#endif\n\n#ifdef HPM\n  HPM_Start(\"mTxmq_tune\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxm_tune(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest_tune) fastest_tune = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq_tune\");\n#endif\n\n  printf(\"%20s %3ld %3ld %3ld %8.2f %8.2f %8.2f\\n\",s, ni,nj,nk, fastest, fastest_zgemm, fastest_tune);\n}\n\nvoid trantimer(const char* s, long ni, long nj, long nk, double_complex *a, double_complex *b, double_complex *c) {\n  double fastest=0.0, fastest_zgemm=0.0, fastest_tune=0.0;\n\n  double nflop = 3.0*2.0*ni*nj*nk;\n  long loop;\n\n#ifdef HPM\n  HPM_Start(\"mTxmq\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxmq(ni,nj,nk,c,a,b);\n    mTxmq(ni,nj,nk,a,c,b);\n    mTxmq(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest) fastest = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq\");\n#endif\n\n#ifdef HPM\n  HPM_Start(\"mTxmq_zgemm\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxm_zgemm(ni,nj,nk,c,a,b);\n    mTxm_zgemm(ni,nj,nk,a,c,b);\n    mTxm_zgemm(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest_zgemm) fastest_zgemm = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq_zgemm\");\n#endif\n\n#ifdef HPM\n  HPM_Start(\"mTxmq_tune\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxm_tune(ni,nj,nk,c,a,b);\n    mTxm_tune(ni,nj,nk,a,c,b);\n    mTxm_tune(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest_tune) fastest_tune = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq_tune\");\n#endif\n\n  printf(\"%20s %3ld %3ld %3ld %8.2f %8.2f %8.2f\\n\",s, ni,nj,nk, fastest, fastest_zgemm, fastest_tune);\n}\n\nint main(int argc, char **argv) {\n    const long nimax=30*30;\n    const long njmax=100;\n    const long nkmax=100;\n    long ni, nj, nk, i, m;\n\n    double_complex *a, *b, *c, *d;\n\n#ifdef HPM\n    MPI_Init(&argc, &argv);\n    HPM_Init();\n#endif\n\n    posix_memalign((void **) &a, 16, nkmax*nimax*sizeof(double_complex));\n    posix_memalign((void **) &b, 16, nkmax*njmax*sizeof(double_complex));\n    posix_memalign((void **) &c, 16, nimax*njmax*sizeof(double_complex));\n    posix_memalign((void **) &d, 16, nimax*njmax*sizeof(double_complex));\n\n    ran_fill(nkmax*nimax, a);\n    ran_fill(nkmax*njmax, b);\n\n/*     ni = nj = nk = 2; */\n/*     for (i=0; i<ni*nj; ++i) d[i] = c[i] = 0.0; */\n/*     mTxm (ni,nj,nk,c,a,b); */\n/*     mTxmq(ni,nj,nk,d,a,b); */\n/*     for (i=0; i<ni; ++i) { */\n/*       long j; */\n/*       for (j=0; j<nj; ++j) { */\n/* \tprintf(\"%2ld %2ld %.6f %.6f\\n\", i, j, c[i*nj+j], d[i*nj+j]); */\n/*       } */\n/*     } */\n/*     return 0; */\n\n    printf(\"Starting to test Zmtxmq ... \\n\");\n    for (ni=2; ni<60; ni+=2) {\n        for (nj=2; nj<100; nj+=6) {\n            for (nk=2; nk<100; nk+=6) {\n                for (i=0; i<ni*nj; ++i) d[i] = c[i] = 0.0;\n                mTxm (ni,nj,nk,c,a,b);\n                mTxmq(ni,nj,nk,d,a,b);\n                for (i=0; i<ni*nj; ++i) {\n                    double err = std::abs(d[i]-c[i]);\n                    /* This test is sensitive to the compilation options.\n                       Be sure to have the reference code above compiled\n                       -msse2 -fpmath=sse if using GCC.  Otherwise, to\n                       pass the test you may need to change the threshold\n                       to circa 1e-13.\n                    */\n                    if (err > 1e-15) {\n                        printf(\"test_Zmtxmq: error %ld %ld %ld %e\\n\",ni,nj,nk,err);\n                        exit(1);\n                    }\n                }\n            }\n        }\n    }\n    printf(\"... OK!\\n\");\n\n    for (ni=2; ni<60; ni+=2) timer(\"(m*m)T*(m*m)\", ni,ni,ni,a,b,c);\n    for (m=2; m<=30; m+=2) timer(\"(m*m,m)T*(m*m)\", m*m,m,m,a,b,c);\n    for (m=2; m<=30; m+=2) trantimer(\"tran(m,m,m)\", m*m,m,m,a,b,c);\n    for (m=2; m<=20; m+=2) timer(\"(20*20,20)T*(20,m)\", 20*20,m,20,a,b,c);\n\n#ifdef HPM\n    HPM_Print();\n    HPM_Print_Flops();\n    MPI_Finalize();\n#endif\n\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/bgp_tuning/test_mtxmq.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <cmath>\n#include <madness/tensor/cblas.h>\n\n#ifdef __bgp__\nextern \"C\" {\n#include \"dcmf.h\"\n}\n#endif\n\n#include \"rdtsc.h\"\n\n#ifdef HPM\n#include <mpi.h>\nextern \"C\" void HPM_Init(void);           // initialize the UPC unit\nextern \"C\" void HPM_Start(char *label);   // start counting in a block marked by the label\nextern \"C\" void HPM_Stop(char *label);    // stop counting in a block marked by the label\nextern \"C\" void HPM_Print(void);          // print counters for all blocks\nextern \"C\" void HPM_Print_Flops(void);\n#endif\n\nvoid mTxmq(long dimi, long dimj, long dimk, double* c, const double* a, const double* b);\nvoid mTxm_tune(long dimi, long dimj, long dimk, double* c, const double* a, const double* b);\n\nvoid mTxm_dgemm(long ni, long nj, long nk, double* c, const double* a, const double*b ) {\n  double one=1.0;\n  madness::cblas::gemm(madness::cblas::NoTrans,madness::cblas::Trans,nj,ni,nk,one,b,nj,a,ni,one,c,nj);\n}\n\ndouble ran()\n{\n  static unsigned long seed = 76521;\n  seed = seed *1812433253 + 12345;\n  return ((double) (seed & 0x7fffffff)) * 4.6566128752458e-10;\n}\n\nvoid ran_fill(int n, double *a) {\n    while (n--) *a++ = ran();\n}\n\nvoid mTxm(long dimi, long dimj, long dimk,\n          double* c, const double* a, const double* b) {\n    int i, j, k;\n    for (k=0; k<dimk; ++k) {\n        for (j=0; j<dimj; ++j) {\n            for (i=0; i<dimi; ++i) {\n                c[i*dimj+j] += a[k*dimi+i]*b[k*dimj+j];\n            }\n        }\n    }\n}\n\nvoid timer(const char* s, long ni, long nj, long nk, double *a, double *b, double *c) {\n  double fastest=0.0, fastest_dgemm=0.0, fastest_tune=0.0;\n\n  double nflop = 2.0*ni*nj*nk;\n  long loop;\n\n#ifdef HPM\n  HPM_Start(\"mTxmq\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxmq(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest) fastest = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq\");\n#endif\n\n#ifdef HPM\n  HPM_Start(\"mTxmq_dgemm\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxm_dgemm(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest_dgemm) fastest_dgemm = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq_dgemm\");\n#endif\n\n#ifdef HPM\n  HPM_Start(\"mTxmq_tune\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxm_tune(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest_tune) fastest_tune = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq_tune\");\n#endif\n\n  printf(\"%20s %3ld %3ld %3ld %8.2f %8.2f %8.2f\\n\",s, ni,nj,nk, fastest, fastest_dgemm, fastest_tune);\n}\n\nvoid trantimer(const char* s, long ni, long nj, long nk, double *a, double *b, double *c) {\n  double fastest=0.0, fastest_dgemm=0.0, fastest_tune=0.0;\n\n  double nflop = 3.0*2.0*ni*nj*nk;\n  long loop;\n\n#ifdef HPM\n  HPM_Start(\"mTxmq\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxmq(ni,nj,nk,c,a,b);\n    mTxmq(ni,nj,nk,a,c,b);\n    mTxmq(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest) fastest = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq\");\n#endif\n\n#ifdef HPM\n  HPM_Start(\"mTxmq_dgemm\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxm_dgemm(ni,nj,nk,c,a,b);\n    mTxm_dgemm(ni,nj,nk,a,c,b);\n    mTxm_dgemm(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest_dgemm) fastest_dgemm = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq_dgemm\");\n#endif\n\n#ifdef HPM\n  HPM_Start(\"mTxmq_tune\");\n#endif\n  for (loop=0; loop<30; ++loop) {\n    double rate;\n    long long start = rdtsc();\n    mTxm_tune(ni,nj,nk,c,a,b);\n    mTxm_tune(ni,nj,nk,a,c,b);\n    mTxm_tune(ni,nj,nk,c,a,b);\n    start = rdtsc() - start;\n    rate = nflop/start;\n    if (rate > fastest_tune) fastest_tune = rate;\n  }\n#ifdef HPM\n  HPM_Stop(\"mTxmq_tune\");\n#endif\n\n  printf(\"%20s %3ld %3ld %3ld %8.2f %8.2f %8.2f\\n\",s, ni,nj,nk, fastest, fastest_dgemm, fastest_tune);\n}\n\nint main(int argc, char **argv) {\n    const long nimax=30*30;\n    const long njmax=100;\n    const long nkmax=100;\n    long ni, nj, nk, i, m;\n\n    double *a, *b, *c, *d;\n\n#ifdef HPM\n    MPI_Init(&argc, &argv);\n    HPM_Init();\n#endif\n\n    posix_memalign((void **) &a, 16, nkmax*nimax*sizeof(double));\n    posix_memalign((void **) &b, 16, nkmax*njmax*sizeof(double));\n    posix_memalign((void **) &c, 16, nimax*njmax*sizeof(double));\n    posix_memalign((void **) &d, 16, nimax*njmax*sizeof(double));\n\n    ran_fill(nkmax*nimax, a);\n    ran_fill(nkmax*njmax, b);\n\n/*     ni = nj = nk = 2; */\n/*     for (i=0; i<ni*nj; ++i) d[i] = c[i] = 0.0; */\n/*     mTxm (ni,nj,nk,c,a,b); */\n/*     mTxmq(ni,nj,nk,d,a,b); */\n/*     for (i=0; i<ni; ++i) { */\n/*       long j; */\n/*       for (j=0; j<nj; ++j) { */\n/* \tprintf(\"%2ld %2ld %.6f %.6f\\n\", i, j, c[i*nj+j], d[i*nj+j]); */\n/*       } */\n/*     } */\n/*     return 0; */\n\n    printf(\"Starting to test mtxmq ... \\n\");\n    for (ni=2; ni<60; ni+=2) {\n        for (nj=2; nj<100; nj+=6) {\n            for (nk=2; nk<100; nk+=6) {\n                for (i=0; i<ni*nj; ++i) d[i] = c[i] = 0.0;\n                mTxm (ni,nj,nk,c,a,b);\n                mTxmq(ni,nj,nk,d,a,b);\n                for (i=0; i<ni*nj; ++i) {\n                    double err = std::abs(d[i]-c[i]);\n                    /* This test is sensitive to the compilation options.\n                       Be sure to have the reference code above compiled\n                       -msse2 -fpmath=sse if using GCC.  Otherwise, to\n                       pass the test you may need to change the threshold\n                       to circa 1e-13.\n                    */\n                    if (err > 1e-15) {\n                        printf(\"test_mtxmq: error %ld %ld %ld %e\\n\",ni,nj,nk,err);\n                        exit(1);\n                    }\n                }\n            }\n        }\n    }\n    printf(\"... OK!\\n\");\n\n    for (ni=2; ni<60; ni+=2) timer(\"(m*m)T*(m*m)\", ni,ni,ni,a,b,c);\n    for (m=2; m<=30; m+=2) timer(\"(m*m,m)T*(m*m)\", m*m,m,m,a,b,c);\n    for (m=2; m<=30; m+=2) trantimer(\"tran(m,m,m)\", m*m,m,m,a,b,c);\n    for (m=2; m<=20; m+=2) timer(\"(20*20,20)T*(20,m)\", 20*20,m,20,a,b,c);\n\n#ifdef HPM\n    HPM_Print();\n    HPM_Print_Flops();\n    MPI_Finalize();\n#endif\n\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/mtxm_gen.h",
    "content": "MTXM_ENTRY(mTxm2)\n.JLOOP2:\nZERO(C00)\n.KLOOP2:\nLOADBKJ\nABC(0,C00)\nINCA\nABC2(0,C00)\nINCA\nsub     $2, NK\njnz     .KLOOP2\nmov     C, B\nSTORE(C00)\nINCC\nNEXTJ\njnz     .JLOOP2\nRETURN\nMTXM_ENTRY(mTxm4)\n.JLOOP4:\nZERO(C00)\nZERO(C01)\n.KLOOP4:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nINCA\nsub     $2, NK\njnz     .KLOOP4\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nINCC\nNEXTJ\njnz     .JLOOP4\nRETURN\nMTXM_ENTRY(mTxm6)\n.JLOOP6:\nZERO(C00)\nZERO(C01)\nZERO(C02)\n.KLOOP6:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nINCA\nsub     $2, NK\njnz     .KLOOP6\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nINCC\nNEXTJ\njnz     .JLOOP6\nRETURN\nMTXM_ENTRY(mTxm8)\n.JLOOP8:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\n.KLOOP8:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nINCA\nsub     $2, NK\njnz     .KLOOP8\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nSTORE(C03)\nINCC\nNEXTJ\njnz     .JLOOP8\nRETURN\nMTXM_ENTRY(mTxm10)\n.JLOOP10:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\n.KLOOP10:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nINCA\nsub     $2, NK\njnz     .KLOOP10\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nSTORE(C03)\nSTORE(C04)\nINCC\nNEXTJ\njnz     .JLOOP10\nRETURN\n#ifdef X86_64\nMTXM_ENTRY(mTxm12)\n.JLOOP12:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\n.KLOOP12:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nINCA\nsub     $2, NK\njnz     .KLOOP12\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nSTORE(C03)\nSTORE(C04)\nSTORE(C05)\nINCC\nNEXTJ\njnz     .JLOOP12\nRETURN\nMTXM_ENTRY(mTxm14)\n.JLOOP14:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\n.KLOOP14:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nINCA\nsub     $2, NK\njnz     .KLOOP14\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nSTORE(C03)\nSTORE(C04)\nSTORE(C05)\nSTORE(C06)\nINCC\nNEXTJ\njnz     .JLOOP14\nRETURN\nMTXM_ENTRY(mTxm16)\n.JLOOP16:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\n.KLOOP16:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nINCA\nsub     $2, NK\njnz     .KLOOP16\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nSTORE(C03)\nSTORE(C04)\nSTORE(C05)\nSTORE(C06)\nSTORE(C07)\nINCC\nNEXTJ\njnz     .JLOOP16\nRETURN\nMTXM_ENTRY(mTxm18)\n.JLOOP18:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\nZERO(C08)\n.KLOOP18:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nABC(128,C08)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nABC2(128,C08)\nINCA\nsub     $2, NK\njnz     .KLOOP18\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nSTORE(C03)\nSTORE(C04)\nSTORE(C05)\nSTORE(C06)\nSTORE(C07)\nSTORE(C08)\nINCC\nNEXTJ\njnz     .JLOOP18\nRETURN\nMTXM_ENTRY(mTxm20)\n.JLOOP20:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\nZERO(C08)\nZERO(C09)\n.KLOOP20:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nABC(128,C08)\nABC(144,C09)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nABC2(128,C08)\nABC2(144,C09)\nINCA\nsub     $2, NK\njnz     .KLOOP20\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nSTORE(C03)\nSTORE(C04)\nSTORE(C05)\nSTORE(C06)\nSTORE(C07)\nSTORE(C08)\nSTORE(C09)\nINCC\nNEXTJ\njnz     .JLOOP20\nRETURN\nMTXM_ENTRY(mTxm22)\n.JLOOP22:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\nZERO(C08)\nZERO(C09)\nZERO(C10)\n.KLOOP22:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nABC(128,C08)\nABC(144,C09)\nABC(160,C10)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nABC2(128,C08)\nABC2(144,C09)\nABC2(160,C10)\nINCA\nsub     $2, NK\njnz     .KLOOP22\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nSTORE(C03)\nSTORE(C04)\nSTORE(C05)\nSTORE(C06)\nSTORE(C07)\nSTORE(C08)\nSTORE(C09)\nSTORE(C10)\nINCC\nNEXTJ\njnz     .JLOOP22\nRETURN\nMTXM_ENTRY(mTxm24)\n.JLOOP24:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\nZERO(C08)\nZERO(C09)\nZERO(C10)\nZERO(C11)\n.KLOOP24:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nABC(128,C08)\nABC(144,C09)\nABC(160,C10)\nABC(176,C11)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nABC2(128,C08)\nABC2(144,C09)\nABC2(160,C10)\nABC2(176,C11)\nINCA\nsub     $2, NK\njnz     .KLOOP24\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nSTORE(C03)\nSTORE(C04)\nSTORE(C05)\nSTORE(C06)\nSTORE(C07)\nSTORE(C08)\nSTORE(C09)\nSTORE(C10)\nSTORE(C11)\nINCC\nNEXTJ\njnz     .JLOOP24\nRETURN\nMTXM_ENTRY(mTxm26)\n.JLOOP26:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\nZERO(C08)\nZERO(C09)\nZERO(C10)\nZERO(C11)\nZERO(C12)\n.KLOOP26:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nABC(128,C08)\nABC(144,C09)\nABC(160,C10)\nABC(176,C11)\nABC(192,C12)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nABC2(128,C08)\nABC2(144,C09)\nABC2(160,C10)\nABC2(176,C11)\nABC2(192,C12)\nINCA\nsub     $2, NK\njnz     .KLOOP26\nmov     C, B\nSTORE(C00)\nSTORE(C01)\nSTORE(C02)\nSTORE(C03)\nSTORE(C04)\nSTORE(C05)\nSTORE(C06)\nSTORE(C07)\nSTORE(C08)\nSTORE(C09)\nSTORE(C10)\nSTORE(C11)\nSTORE(C12)\nINCC\nNEXTJ\njnz     .JLOOP26\nRETURN\n#endif\nMTXM_ENTRY(TmTxm2)\n.TJLOOP2:\nZERO(C00)\n.TKLOOP2:\nLOADBKJ\nABC(0,C00)\nINCA\nABC2(0,C00)\nINCA\nsub     $2, NK\njnz     .TKLOOP2\nmov     C, B\nSTORET(C00)\nINCCT\nNEXTJ\njnz     .TJLOOP2\nRETURN\nMTXM_ENTRY(TmTxm4)\n.TJLOOP4:\nZERO(C00)\nZERO(C01)\n.TKLOOP4:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nINCA\nsub     $2, NK\njnz     .TKLOOP4\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nINCCT\nNEXTJ\njnz     .TJLOOP4\nRETURN\nMTXM_ENTRY(TmTxm6)\n.TJLOOP6:\nZERO(C00)\nZERO(C01)\nZERO(C02)\n.TKLOOP6:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nINCA\nsub     $2, NK\njnz     .TKLOOP6\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nINCCT\nNEXTJ\njnz     .TJLOOP6\nRETURN\nMTXM_ENTRY(TmTxm8)\n.TJLOOP8:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\n.TKLOOP8:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nINCA\nsub     $2, NK\njnz     .TKLOOP8\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nSTORET(C03)\nINCCT\nNEXTJ\njnz     .TJLOOP8\nRETURN\nMTXM_ENTRY(TmTxm10)\n.TJLOOP10:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\n.TKLOOP10:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nINCA\nsub     $2, NK\njnz     .TKLOOP10\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nSTORET(C03)\nSTORET(C04)\nINCCT\nNEXTJ\njnz     .TJLOOP10\nRETURN\n#ifdef X86_64\nMTXM_ENTRY(TmTxm12)\n.TJLOOP12:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\n.TKLOOP12:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nINCA\nsub     $2, NK\njnz     .TKLOOP12\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nSTORET(C03)\nSTORET(C04)\nSTORET(C05)\nINCCT\nNEXTJ\njnz     .TJLOOP12\nRETURN\nMTXM_ENTRY(TmTxm14)\n.TJLOOP14:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\n.TKLOOP14:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nINCA\nsub     $2, NK\njnz     .TKLOOP14\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nSTORET(C03)\nSTORET(C04)\nSTORET(C05)\nSTORET(C06)\nINCCT\nNEXTJ\njnz     .TJLOOP14\nRETURN\nMTXM_ENTRY(TmTxm16)\n.TJLOOP16:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\n.TKLOOP16:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nINCA\nsub     $2, NK\njnz     .TKLOOP16\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nSTORET(C03)\nSTORET(C04)\nSTORET(C05)\nSTORET(C06)\nSTORET(C07)\nINCCT\nNEXTJ\njnz     .TJLOOP16\nRETURN\nMTXM_ENTRY(TmTxm18)\n.TJLOOP18:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\nZERO(C08)\n.TKLOOP18:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nABC(128,C08)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nABC2(128,C08)\nINCA\nsub     $2, NK\njnz     .TKLOOP18\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nSTORET(C03)\nSTORET(C04)\nSTORET(C05)\nSTORET(C06)\nSTORET(C07)\nSTORET(C08)\nINCCT\nNEXTJ\njnz     .TJLOOP18\nRETURN\nMTXM_ENTRY(TmTxm20)\n.TJLOOP20:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\nZERO(C08)\nZERO(C09)\n.TKLOOP20:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nABC(128,C08)\nABC(144,C09)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nABC2(128,C08)\nABC2(144,C09)\nINCA\nsub     $2, NK\njnz     .TKLOOP20\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nSTORET(C03)\nSTORET(C04)\nSTORET(C05)\nSTORET(C06)\nSTORET(C07)\nSTORET(C08)\nSTORET(C09)\nINCCT\nNEXTJ\njnz     .TJLOOP20\nRETURN\nMTXM_ENTRY(TmTxm22)\n.TJLOOP22:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\nZERO(C08)\nZERO(C09)\nZERO(C10)\n.TKLOOP22:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nABC(128,C08)\nABC(144,C09)\nABC(160,C10)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nABC2(128,C08)\nABC2(144,C09)\nABC2(160,C10)\nINCA\nsub     $2, NK\njnz     .TKLOOP22\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nSTORET(C03)\nSTORET(C04)\nSTORET(C05)\nSTORET(C06)\nSTORET(C07)\nSTORET(C08)\nSTORET(C09)\nSTORET(C10)\nINCCT\nNEXTJ\njnz     .TJLOOP22\nRETURN\nMTXM_ENTRY(TmTxm24)\n.TJLOOP24:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\nZERO(C08)\nZERO(C09)\nZERO(C10)\nZERO(C11)\n.TKLOOP24:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nABC(128,C08)\nABC(144,C09)\nABC(160,C10)\nABC(176,C11)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nABC2(128,C08)\nABC2(144,C09)\nABC2(160,C10)\nABC2(176,C11)\nINCA\nsub     $2, NK\njnz     .TKLOOP24\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nSTORET(C03)\nSTORET(C04)\nSTORET(C05)\nSTORET(C06)\nSTORET(C07)\nSTORET(C08)\nSTORET(C09)\nSTORET(C10)\nSTORET(C11)\nINCCT\nNEXTJ\njnz     .TJLOOP24\nRETURN\nMTXM_ENTRY(TmTxm26)\n.TJLOOP26:\nZERO(C00)\nZERO(C01)\nZERO(C02)\nZERO(C03)\nZERO(C04)\nZERO(C05)\nZERO(C06)\nZERO(C07)\nZERO(C08)\nZERO(C09)\nZERO(C10)\nZERO(C11)\nZERO(C12)\n.TKLOOP26:\nLOADBKJ\nABC(0,C00)\nABC(16,C01)\nABC(32,C02)\nABC(48,C03)\nABC(64,C04)\nABC(80,C05)\nABC(96,C06)\nABC(112,C07)\nABC(128,C08)\nABC(144,C09)\nABC(160,C10)\nABC(176,C11)\nABC(192,C12)\nINCA\nABC2(0,C00)\nABC2(16,C01)\nABC2(32,C02)\nABC2(48,C03)\nABC2(64,C04)\nABC2(80,C05)\nABC2(96,C06)\nABC2(112,C07)\nABC2(128,C08)\nABC2(144,C09)\nABC2(160,C10)\nABC2(176,C11)\nABC2(192,C12)\nINCA\nsub     $2, NK\njnz     .TKLOOP26\nmov     C, B\nSTORET(C00)\nSTORET(C01)\nSTORET(C02)\nSTORET(C03)\nSTORET(C04)\nSTORET(C05)\nSTORET(C06)\nSTORET(C07)\nSTORET(C08)\nSTORET(C09)\nSTORET(C10)\nSTORET(C11)\nSTORET(C12)\nINCCT\nNEXTJ\njnz     .TJLOOP26\nRETURN\n#endif\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/mtxmq.cc",
    "content": "\n#ifdef XXXXXXXXXXXXXXXXXXXXXXXXXXXNEVERUSED\n\n/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/madness_config.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/mtxmq.h>\n#include <madness/world/worldprofile.h>\n\n#include <complex.h>\n#include <immintrin.h>\n\n// For x86-32/64 have assembly versions for double precision\n// For x86-64 have assembly versions for complex double precision\n\n#if defined(X86_32) || defined(X86_64)\n\n#ifdef X86_64\nextern \"C\" void mTxm26(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm24(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm22(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm20(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm18(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm16(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm14(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm12(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n#endif // X86_64\nextern \"C\" void mTxm10(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm8(long dimi, long dimj, long dimk,\n                      double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm6(long dimi, long dimj, long dimk,\n                      double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm4(long dimi, long dimj, long dimk,\n                      double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm2(long dimi, long dimj, long dimk,\n                      double* c, const double* a, const double* b) ;\n\n\n#ifdef X86_64\nextern \"C\" void TmTxm26(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm24(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm22(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm20(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm18(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm16(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm14(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm12(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n#endif // X86_64\nextern \"C\" void TmTxm10(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm8(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm6(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm4(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm2(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nnamespace madness {\n\n#include <immintrin.h>\n#include <stdio.h>\n\nstatic const int shuffm1=0x0F; // originally -1=0xFFFFFFFF but produced compiler warning about out of range value (upper bits reseved and must be zero).\n\n#ifndef __INTEL_COMPILER\n// __GNUG__\n  // RJH --- Intel compiler defines this but all extant GNU (upto 5.3) do not\nstatic inline void\n_mm256_storeu2_m128d(double *__addr_hi, double *__addr_lo, __m256d __a)\n{\n  __m128d __v128;\n\n  __v128 = _mm256_castpd256_pd128(__a);\n  __builtin_ia32_storeupd(__addr_lo, __v128);\n  __v128 = _mm256_extractf128_pd(__a, 1);\n  __builtin_ia32_storeupd(__addr_hi, __v128);\n}\n#endif\n\n\n//#define FMA(a,b,c) _mm256_fmadd_pd (a, b, c)\n#define FMA(a,b,c) _mm256_add_pd(_mm256_mul_pd(a, b), c)\n\nvoid mTxmq_core(bool is_trans, long dimi, long dimj, long dimk,\n           double * __restrict__ c, const double * __restrict__ a, const double * __restrict__ b, long numi, long numj) {\n\t\n    int i, k;\n    int dimi2 = (numi>>1)<<1;\n    int dimj2 = dimj<<1;\n\tdouble tmp[4];\n\n    __m256d ci0j0, ci0j1, ci0j2, ci0j3, ci0j4, ci0j5;\n    __m256d ci1j0, ci1j1, ci1j2, ci1j3, ci1j4, ci1j5;\n    __m256d aki0, aki1, bkj;\n    __m256i mask = _mm256_set_epi32(0,0,-1,-1,-1,-1,-1,-1);\n    // __m256d tmp; //temporary from aki*bkj\n    \n\tdouble* __restrict__ ci = c;\n\n\t//pointer converter \n#ifndef __INTEL_COMPILER\n// __GNUG__\n\t// produces internal compiler error with all extant compilers (upto 5.3)\n#define conv_addr_trans2normal(i, j) (c + dimi * j + i)\n#else\n       const auto conv_addr_trans2normal = [dimi, c](long i, long j){return c + dimi * j + i;}; // gcc internal compiler error\n#endif\n\n\tswitch (numj) {\n\tcase 24:\n\tcase 23:\n\tcase 22:\n\tcase 21:\n\t\tif      (numj == 24) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 23) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 22) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 21) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\tci0j5 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\tci1j5 = _mm256_setzero_pd();\n\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+16);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+20,mask);\n\t\t\t\tci0j5 = FMA(aki0, bkj, ci0j5);\n\t\t\t\tci1j5 = FMA(aki1, bkj, ci1j5);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, ci0j3);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+16, ci0j4);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+20, mask, ci0j5);\n\t\t\t\t\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj   , ci1j0);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 4, ci1j1);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 8, ci1j2);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+12, ci1j3);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+16, ci1j4);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj+20, mask, ci1j5);\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\t//the variables don't mean aki0 or aki1\n\t\t\t\t//please ignore the meaning of name\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\n\t\t\t\t//store transposed matrix's location c[j*dimi+i]\n\t\t\t\t_mm256_storeu2_m128d(c+2*dimi+i, c+0*dimi+i, aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,7), conv_addr_trans2normal(i,5), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,10), conv_addr_trans2normal(i,8), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,11), conv_addr_trans2normal(i,9), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,14), conv_addr_trans2normal(i,12), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,15), conv_addr_trans2normal(i,13), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j4, ci1j4, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j4, ci1j4, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,18), conv_addr_trans2normal(i,16), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,19), conv_addr_trans2normal(i,17), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j5, ci1j5, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j5, ci1j5, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 24:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,22), conv_addr_trans2normal(i,20), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,23), conv_addr_trans2normal(i,21), aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 23:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,22), conv_addr_trans2normal(i,20), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,21), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 22:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,20), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,21), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 21:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,20), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\tci0j5 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+16);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+20,mask);\n\t\t\t\tci0j5 = FMA(aki0, bkj, ci0j5);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, ci0j3);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+16, ci0j4);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+20, mask, ci0j5);\n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tc[0 *dimi+i] = tmp[0];\n\t\t\t\tc[1 *dimi+i] = tmp[1];\n\t\t\t\tc[2 *dimi+i] = tmp[2];\n\t\t\t\tc[3 *dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j1);\n\t\t\t\tc[4 *dimi+i] = tmp[0];\n\t\t\t\tc[5 *dimi+i] = tmp[1];\n\t\t\t\tc[6 *dimi+i] = tmp[2];\n\t\t\t\tc[7 *dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j2);\n\t\t\t\tc[8 *dimi+i] = tmp[0];\n\t\t\t\tc[9 *dimi+i] = tmp[1];\n\t\t\t\tc[10*dimi+i] = tmp[2];\n\t\t\t\tc[11*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j3);\n\t\t\t\tc[12*dimi+i] = tmp[0];\n\t\t\t\tc[13*dimi+i] = tmp[1];\n\t\t\t\tc[14*dimi+i] = tmp[2];\n\t\t\t\tc[15*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j4);\n\t\t\t\tc[16*dimi+i] = tmp[0];\n\t\t\t\tc[17*dimi+i] = tmp[1];\n\t\t\t\tc[18*dimi+i] = tmp[2];\n\t\t\t\tc[19*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j5);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 24:\n\t\t\t\t\tc[23*dimi+i] = tmp[3];\n\t\t\t\tcase 23:\n\t\t\t\t\tc[22*dimi+i] = tmp[2];\n\t\t\t\tcase 22:\n\t\t\t\t\tc[21*dimi+i] = tmp[1];\n\t\t\t\tcase 21:\n\t\t\t\t\tc[20*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\n\tcase 20:\n\tcase 19:\n\tcase 18:\n\tcase 17:\n\t\tif      (numj == 20) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 19) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 18) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 17) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+16,mask);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, ci0j3);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+16, mask, ci0j4);\n\t\t\t\t\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj   , ci1j0);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 4, ci1j1);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 8, ci1j2);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+12, ci1j3);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj+16, mask, ci1j4);\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,7), conv_addr_trans2normal(i,5), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,10), conv_addr_trans2normal(i,8), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,11), conv_addr_trans2normal(i,9), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,14), conv_addr_trans2normal(i,12), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,15), conv_addr_trans2normal(i,13), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j4, ci1j4, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j4, ci1j4, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 20:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,18), conv_addr_trans2normal(i,16), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,19), conv_addr_trans2normal(i,17), aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 19:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,18), conv_addr_trans2normal(i,16), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,17), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 18:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,16), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,17), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 17:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,16), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+16,mask);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t}\n\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, ci0j3);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+16, mask, ci0j4);\n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tc[0*dimi+i] = tmp[0];\n\t\t\t\tc[1*dimi+i] = tmp[1];\n\t\t\t\tc[2*dimi+i] = tmp[2];\n\t\t\t\tc[3*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j1);\n\t\t\t\tc[4*dimi+i] = tmp[0];\n\t\t\t\tc[5*dimi+i] = tmp[1];\n\t\t\t\tc[6*dimi+i] = tmp[2];\n\t\t\t\tc[7*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j2);\n\t\t\t\tc[8 *dimi+i] = tmp[0];\n\t\t\t\tc[9 *dimi+i] = tmp[1];\n\t\t\t\tc[10*dimi+i] = tmp[2];\n\t\t\t\tc[11*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j3);\n\t\t\t\tc[12*dimi+i] = tmp[0];\n\t\t\t\tc[13*dimi+i] = tmp[1];\n\t\t\t\tc[14*dimi+i] = tmp[2];\n\t\t\t\tc[15*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j4);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 20:\n\t\t\t\t\tc[19*dimi+i] = tmp[3];\n\t\t\t\tcase 19:\n\t\t\t\t\tc[18*dimi+i] = tmp[2];\n\t\t\t\tcase 18:\n\t\t\t\t\tc[17*dimi+i] = tmp[1];\n\t\t\t\tcase 17:\n\t\t\t\t\tc[16*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 16:\n\tcase 15:\n\tcase 14:\n\tcase 13:\n\t\tif      (numj == 16) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 15) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 14) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 13) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+12,mask);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+12, mask, ci0j3); \n\t\t\t   \n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj   , ci1j0);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 4, ci1j1);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 8, ci1j2);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj+12, mask, ci1j3);\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,7), conv_addr_trans2normal(i,5), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,10), conv_addr_trans2normal(i,8), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,11), conv_addr_trans2normal(i,9), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 16:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,14), conv_addr_trans2normal(i,12), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,15), conv_addr_trans2normal(i,13), aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 15:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,14), conv_addr_trans2normal(i,12), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,13), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 14:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,12), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,13), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 13:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,12), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+12,mask);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+12, mask, ci0j3); \n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tc[0*dimi+i] = tmp[0];\n\t\t\t\tc[1*dimi+i] = tmp[1];\n\t\t\t\tc[2*dimi+i] = tmp[2];\n\t\t\t\tc[3*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j1);\n\t\t\t\tc[ 4*dimi+i] = tmp[0];\n\t\t\t\tc[ 5*dimi+i] = tmp[1];\n\t\t\t\tc[ 6*dimi+i] = tmp[2];\n\t\t\t\tc[ 7*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j2);\n\t\t\t\tc[ 8*dimi+i] = tmp[0];\n\t\t\t\tc[ 9*dimi+i] = tmp[1];\n\t\t\t\tc[10*dimi+i] = tmp[2];\n\t\t\t\tc[11*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j3);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 16:\n\t\t\t\t\tc[15*dimi+i] = tmp[3];\n\t\t\t\tcase 15:\n\t\t\t\t\tc[14*dimi+i] = tmp[2];\n\t\t\t\tcase 14:\n\t\t\t\t\tc[13*dimi+i] = tmp[1];\n\t\t\t\tcase 13:\n\t\t\t\t\tc[12*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 12:\n\tcase 11:\n\tcase 10:\n\tcase  9:\n\t\tif      (numj == 12) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 11) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 10) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj ==  9) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+8,mask);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+8, mask, ci0j2); \n\t\t\t\t\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj   , ci1j0);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 4, ci1j1);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj+8, mask, ci1j2); \n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,7), conv_addr_trans2normal(i,5), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 12:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,10), conv_addr_trans2normal(i,8), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,11), conv_addr_trans2normal(i,9), aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 11:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,10), conv_addr_trans2normal(i,8), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,9), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,8), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,9), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  9:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,8), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+8,mask);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+8, mask, ci0j2); \n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tc[0*dimi+i] = tmp[0];\n\t\t\t\tc[1*dimi+i] = tmp[1];\n\t\t\t\tc[2*dimi+i] = tmp[2];\n\t\t\t\tc[3*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j1);\n\t\t\t\tc[4*dimi+i] = tmp[0];\n\t\t\t\tc[5*dimi+i] = tmp[1];\n\t\t\t\tc[6*dimi+i] = tmp[2];\n\t\t\t\tc[7*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j2);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 12:\n\t\t\t\t\tc[11*dimi+i] = tmp[3];\n\t\t\t\tcase 11:\n\t\t\t\t\tc[10*dimi+i] = tmp[2];\n\t\t\t\tcase 10:\n\t\t\t\t\tc[9*dimi+i] = tmp[1];\n\t\t\t\tcase  9:\n\t\t\t\t\tc[8*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 8:\n\tcase 7:\n\tcase 6:\n\tcase 5:\n\t\tif      (numj == 8) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 7) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 6) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 5) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+4,mask);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+4, mask, ci0j1); \n\t\t\t\t\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj   , ci1j0);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj+4, mask, ci1j1); \n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  8:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,7), conv_addr_trans2normal(i,5), aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  7:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,5), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  6:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,4), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,5), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  5:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,4), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+4,mask);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t}\n\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+4, mask, ci0j1); \n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tc[0*dimi+i] = tmp[0];\n\t\t\t\tc[1*dimi+i] = tmp[1];\n\t\t\t\tc[2*dimi+i] = tmp[2];\n\t\t\t\tc[3*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j1);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 8:\n\t\t\t\t\tc[7*dimi+i] = tmp[3];\n\t\t\t\tcase 7:\n\t\t\t\t\tc[6*dimi+i] = tmp[2];\n\t\t\t\tcase 6:\n\t\t\t\t\tc[5*dimi+i] = tmp[1];\n\t\t\t\tcase 5:\n\t\t\t\t\tc[4*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 4:\n\tcase 3:\n\tcase 2:\n\tcase 1:\n\t\tif      (numj == 4) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 3) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 2) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 1) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj, mask);\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj    , mask, ci0j0);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj, mask, ci1j0);\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  4:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  3:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,1), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  2:\n\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,0), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,1), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  1:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,0), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj, mask);\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj    , mask, ci0j0);\n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 4:\n\t\t\t\t\tc[3*dimi+i] = tmp[3];\n\t\t\t\tcase 3:\n\t\t\t\t\tc[2*dimi+i] = tmp[2];\n\t\t\t\tcase 2:\n\t\t\t\t\tc[1*dimi+i] = tmp[1];\n\t\t\t\tcase 1:\n\t\t\t\t\tc[0*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\n\tdefault:\n\t\t/* for (i=0; i<dimi; i++) { */\n\t\t/*     for (k=0; k<dimk; k++) { */\n\t\t/*         double aki = a[k*dimi+i]; */\n\t\t/*         for (j=0; j<numj; j++) { */\n\t\t/*             c[i*dimj+j] += aki*b[k*dimj+j]; */\n\t\t/*         } */\n\t\t/*     } */\n\t\t/* } */\n\t\tprintf(\"HOW DID WE GET HERE?\\n\");\n\t\tbreak;\n\t}\n}\n\nvoid mTxmq_core(bool is_trans, long dimi, long dimj, long dimk,\n           double_complex * __restrict__ c0, const double * __restrict__ a0, const double_complex * __restrict__ b0, long numi, long numj) {\n\t\n    int i, k;\n    int dimi2 = (numi>>1)<<1;\n    int dimj2 = dimj<<1;\n\n    __m256d ci0j0, ci0j1, ci0j2, ci0j3, ci0j4, ci0j5;\n    __m256d ci1j0, ci1j1, ci1j2, ci1j3, ci1j4, ci1j5;\n    __m256d aki0, aki1, bkj;\n    __m256i mask = _mm256_set_epi32(0,0,-1,-1,-1,-1,-1,-1);\n    // __m256d tmp; //temporary from aki*bkj\n    \n    \n\tdouble* a = (double*)a0;\n\tdouble* b = (double*)b0;\n\tdouble* c = (double*)c0;\n\tdouble* __restrict__ ci = (double*)c0;\n\n\t//convert pointer \n\tconst auto conv_addr_trans2normal_comp = [dimi, c](long i, long j){return c + dimi * j + i*2;};\n\n\tswitch (numj) {\n\tcase 24:\n\tcase 23:\n\tcase 22:\n\tcase 21:\n\t\tif      (numj == 24) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 23) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 22) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 21) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\tci0j5 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\tci1j5 = _mm256_setzero_pd();\n\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+16);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+20,mask);\n\t\t\t\tci0j5 = FMA(aki0, bkj, ci0j5);\n\t\t\t\tci1j5 = FMA(aki1, bkj, ci1j5);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 8-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 6-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 12-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 10-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 16-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 14-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j4, ci1j4, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j4, ci1j4, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 20-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 18-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j5, ci1j5, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j5, ci1j5, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  24:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 24-2), aki1);\n\t\t\t\t\tcase  22:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 22-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\tci0j5 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+16);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+20,mask);\n\t\t\t\tci0j5 = FMA(aki0, bkj, ci0j5);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,8-2), conv_addr_trans2normal_comp(i, 6-2), ci0j1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,12-2), conv_addr_trans2normal_comp(i, 10-2), ci0j2);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,16-2), conv_addr_trans2normal_comp(i, 14-2), ci0j3);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,20-2), conv_addr_trans2normal_comp(i, 18-2), ci0j4);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 24:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,24-2), conv_addr_trans2normal_comp(i, 22-2), ci0j5);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 22:\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,22-2), mask, ci0j5);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\n\tcase 20:\n\tcase 19:\n\tcase 18:\n\tcase 17:\n\t\tif      (numj == 20) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 19) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 18) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 17) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+16,mask);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 8-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 6-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 12-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 10-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 16-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 14-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j4, ci1j4, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j4, ci1j4, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  20:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 20-2), aki1);\n\t\t\t\t\tcase  18:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 18-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+16,mask);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t}\n\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,8-2), conv_addr_trans2normal_comp(i, 6-2), ci0j1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,12-2), conv_addr_trans2normal_comp(i, 10-2), ci0j2);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,16-2), conv_addr_trans2normal_comp(i, 14-2), ci0j3);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 20:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,20-2), conv_addr_trans2normal_comp(i, 18-2), ci0j4);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 18:\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,18-2), mask, ci0j4);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 16:\n\tcase 15:\n\tcase 14:\n\tcase 13:\n\t\tif      (numj == 16) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 15) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 14) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 13) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+12,mask);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 8-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 6-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 12-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 10-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  16:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 16-2), aki1);\n\t\t\t\t\tcase  14:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 14-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+12,mask);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,8-2), conv_addr_trans2normal_comp(i, 6-2), ci0j1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,12-2), conv_addr_trans2normal_comp(i, 10-2), ci0j2);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 16:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,16-2), conv_addr_trans2normal_comp(i, 14-2), ci0j3);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 14:\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,14-2), mask, ci0j3);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 12:\n\tcase 11:\n\tcase 10:\n\tcase  9:\n\t\tif      (numj == 12) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 11) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 10) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj ==  9) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+8,mask);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 8-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 6-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  12:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 12-2), aki1);\n\t\t\t\t\tcase  10:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 10-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+8,mask);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,8-2), conv_addr_trans2normal_comp(i, 6-2), ci0j1);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 12:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,12-2), conv_addr_trans2normal_comp(i, 10-2), ci0j2);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,10-2), mask, ci0j2);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 8:\n\tcase 7:\n\tcase 6:\n\tcase 5:\n\t\tif      (numj == 8) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 7) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 6) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 5) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+4,mask);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  8:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 8-2), aki1);\n\t\t\t\t\tcase  6:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 6-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+4,mask);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t}\n\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,8-2), conv_addr_trans2normal_comp(i, 6-2), ci0j1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,6-2), mask, ci0j1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 4:\n\tcase 3:\n\tcase 2:\n\tcase 1:\n\t\tif      (numj == 4) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 3) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 2) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 1) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj, mask);\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  4:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t\tcase  2:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj, mask);\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 4:\n\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,2-2), mask, ci0j0);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\n\tdefault:\n\t\t/* for (i=0; i<dimi; i++) { */\n\t\t/*     for (k=0; k<dimk; k++) { */\n\t\t/*         double aki = a[k*dimi+i]; */\n\t\t/*         for (j=0; j<numj; j++) { */\n\t\t/*             c[i*dimj+j] += aki*b[k*dimj+j]; */\n\t\t/*         } */\n\t\t/*     } */\n\t\t/* } */\n\t\tprintf(\"HOW DID WE GET HERE?\\n\");\n\t\tbreak;\n\t}\n}\n\nvoid mTxmq_core(bool is_trans, long dimi, long dimj, long dimk,\n           double_complex * __restrict__ c0, const double_complex * __restrict__ a0, const double * __restrict__ b0, long numi, long numj) {\n\t//elements are complex number\n\n    int i, k;\n    int dimi2 = (numi>>1)<<1;\n    int dimj2 = dimj<<1;\n\n    __m256d ci0j0, ci0j1, ci0j2, ci0j3, ci0j4, ci0j5;\n    __m256d ci1j0, ci1j1, ci1j2, ci1j3, ci1j4, ci1j5;\n    __m256d aki0, aki1, bkj;\n    __m256i mask = _mm256_set_epi32(0,0,-1,-1,-1,-1,-1,-1);\n    // __m256d tmp; //temporary from aki*bkj\n    \n    \n\tdouble* a = (double*)a0;\n\tdouble* b = (double*)b0;\n\tdouble* c = (double*)c0;\n\tdouble* __restrict__ ci = (double*)c0;\n\n\tswitch (numj) {\n\tcase 24:\n\tcase 23:\n\tcase 22:\n\tcase 21:\n\t\tif      (numj == 24) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 23) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 22) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 21) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\tci0j5 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\tci1j5 = _mm256_setzero_pd();\n\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+16);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+20,mask);\n\t\t\t\tci0j5 = FMA(aki0, bkj, ci0j5);\n\t\t\t\tci1j5 = FMA(aki1, bkj, ci1j5);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+16, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+20, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+24, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+28, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j4, ci1j4, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j4, ci1j4, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+32, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+36, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j5, ci1j5, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j5, ci1j5, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 24:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+40 , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+44 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 23:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+40 , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+44, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 22:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+40 , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 21:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+40, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tbreak;\n\n\tcase 20:\n\tcase 19:\n\tcase 18:\n\tcase 17:\n\t\tif      (numj == 20) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 19) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 18) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 17) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+16,mask);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+16, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+20, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+24, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+28, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j4, ci1j4, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j4, ci1j4, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 20:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+32 , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+36 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 19:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+32 , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+36, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 18:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+32 , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 17:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+32, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tbreak;\n\t\t\n\tcase 16:\n\tcase 15:\n\tcase 14:\n\tcase 13:\n\t\tif      (numj == 16) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 15) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 14) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 13) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+12,mask);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4  , aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+16, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+20, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 16:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+24 , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+28 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 15:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+24 , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+28, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 14:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+24 , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 13:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+24, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tbreak;\n\t\t\n\tcase 12:\n\tcase 11:\n\tcase 10:\n\tcase  9:\n\t\tif      (numj == 12) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 11) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 10) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj ==  9) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+8,mask);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 12:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+16 , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+20 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 11:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+16 , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+20, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+16 , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  9:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+16, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tbreak;\n\t\t\n\tcase 8:\n\tcase 7:\n\tcase 6:\n\tcase 5:\n\t\tif      (numj == 8) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 7) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 6) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 5) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+4,mask);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t}\n\t\t\tif(!is_trans){\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+4 , aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8 , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+12 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8 , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+12, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8 , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+ 8, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\tbreak;\n\t\t\n\tcase 4:\n\tcase 3:\n\tcase 2:\n\tcase 1:\n\t\tif      (numj == 4) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 3) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 2) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 1) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj, mask);\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+4 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+4, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tbreak;\n\n\tdefault:\n\t\t/* for (i=0; i<dimi; i++) { */\n\t\t/*     for (k=0; k<dimk; k++) { */\n\t\t/*         double aki = a[k*dimi+i]; */\n\t\t/*         for (j=0; j<numj; j++) { */\n\t\t/*             c[i*dimj+j] += aki*b[k*dimj+j]; */\n\t\t/*         } */\n\t\t/*     } */\n\t\t/* } */\n\t\tprintf(\"HOW DID WE GET HERE?\\n\");\n\t\tbreak;\n\t}\n}\n\n//Real x Real(AVX)\n    template<>\nvoid mTxmq(long dimi, long dimj, long dimk,\n           double * __restrict__ c, const double * __restrict__ a, const double * __restrict__ b) {\n\n\tint nj = dimj;\n\tint ni = dimi;\n\tdo{\n        int numj = (nj>24) ? 24 : nj;\n        int numi = (ni>24) ? 24 : ni;\n\t\tdouble* __restrict__ ci = c;\n\n\t\tif(dimj % 24 >= 12 || dimi % 24 >= 12){\n\t\t\tif((dimj-1) % 24 >= (dimi-1) % 24 && ((dimj % 4 == 0) || (dimi % 4 != 0))){\n\t\t\t\tmTxmq_core(false, dimi, dimj, dimk, ci, a, b, ni, numj);\n\t\t\t\tc += numj;\n\t\t\t\tb += numj;\n\t\t\t\tnj -= numj;\n\t\t\t}else{\n\t\t\t\tmTxmq_core(true, dimj, dimi, dimk, ci, b, a, nj, numi);\n\t\t\t\tc += dimj*numi;\n\t\t\t\ta += numi;\n\t\t\t\tni -= numi;\n\t\t\t}\n\t\t}else{\n\t\t\tif((numj-1) % 24 >= (numi-1) % 24 && ((numj % 4 == 0) || (numi % 4 != 0))){\n\t\t\t\tmTxmq_core(false, dimi, dimj, dimk, ci, a, b, ni, numj);\n\t\t\t\tc += numj;\n\t\t\t\tb += numj;\n\t\t\t\tnj -= numj;\n\t\t\t}else{\n\t\t\t\tmTxmq_core(true, dimj, dimi, dimk, ci, b, a, nj, numi);\n\t\t\t\tc += dimj*numi;\n\t\t\t\ta += numi;\n\t\t\t\tni -= numi;\n\t\t\t}\n\t\t}\n\t}while(nj && ni);\n}\n\n//Real x Complex(AVX)\n    template<>\nvoid mTxmq(long dimi, long dimj, long dimk,\n           double_complex* __restrict__ c, const double* __restrict__ a, const double_complex* __restrict__ b) {\n\n\tmTxmq(dimi, dimj*2, dimk, (double*)c, a, (double*)b);\n}\n\n//Complex x Real(AVX)\n    template<>\nvoid mTxmq(long dimi, long dimj, long dimk,\n           double_complex* __restrict__ c, const double_complex* __restrict__ a, const double* __restrict__ b) {\n\n\tdimi *= 2;\t//a:complex matrix\n\tint nj = dimj;\n\tint ni = dimi;\n\tdo{\n        int numj = (nj>24) ? 24 : nj;\n        int numi = (ni>24) ? 24 : ni;\n\t\tdouble_complex* __restrict__ ci = c;\n\n\t\t//a,c are double_complex*(not double*)\n\t\tif(dimj % 24 >= 12 || dimi % 24 >= 12){\n\t\t\tif((dimj-1) % 24 >= (dimi-1) % 24 && ((dimj % 4 == 0) || (dimi % 4 != 0))){\n\t\t\t\tmTxmq_core(false, dimi, dimj, dimk, ci, a, b, ni, numj);\n\t\t\t\tc += numj;\n\t\t\t\tb += numj;\n\t\t\t\tnj -= numj;\n\t\t\t}else{\n\t\t\t\tmTxmq_core(true, dimj, dimi, dimk, ci, b, a, nj, numi);\n\t\t\t\tc += dimj*(numi/2);\n\t\t\t\ta += numi/2;\n\t\t\t\tni -= numi;\n\t\t\t}\n\t\t}else{\n\t\t\tif((numj-1) % 24 >= (numi-1) % 24 && ((numj % 4 == 0) || (numi % 4 != 0))){\n\t\t\t\tmTxmq_core(false, dimi, dimj, dimk, ci, a, b, ni, numj);\n\t\t\t\tc += numj;\n\t\t\t\tb += numj;\n\t\t\t\tnj -= numj;\n\t\t\t}else{\n\t\t\t\tmTxmq_core(true, dimj, dimi, dimk, ci, b, a, nj, numi);\n\t\t\t\tc += dimj*(numi/2);\n\t\t\t\ta += numi/2;\n\t\t\t\tni -= numi;\n\t\t\t}\n\n\t\t}\n\n\t}while(nj && ni);\n}\n\n    //template<>\n    void mTxmqdjflkjsalkf(const long dimi, const long dimj, const long dimk,\n               double* MADNESS_RESTRICT c, const double* a, const double* b) {\n        //PROFILE_BLOCK(mTxmq_double_asm);\n        //std::cout << \"IN DOUBLE ASM VERSION \" << dimi << \" \" << dimj << \" \" << dimk << \"\\n\";\n\n\n        if (IS_ODD(dimi) || IS_ODD(dimj) || IS_ODD(dimk) ||\n            IS_UNALIGNED(a) || IS_UNALIGNED(b) || IS_UNALIGNED(c)) {\n            //std::cout << \"slow\\n\";\n            // CALL SLOW CODE\n            for (long i=0; i<dimi; ++i,c+=dimj,++a) {\n                for (long j=0; j<dimj; ++j) c[j] = 0.0;\n                const double *ai = a;\n                for (long k=0; k<dimk; ++k,ai+=dimi) {\n                    double aki = *ai;\n                    for (long j=0; j<dimj; ++j) {\n                        c[j] += aki*b[k*dimj+j];\n                    }\n                }\n            }\n            return;\n        }\n\n        /*\n           Choice is to unroll i or j\n        */\n\n#if   defined(AMD_QUADCORE_TUNE)\n        bool test = dimj>=14 && dimj<=26;\n#elif defined(OPTERON_TUNE)\n        bool test = dimi <= dimj; /* Based on times from X86_64 Opteron ... an old one */\n#elif defined(CORE_DUO_TUNE)\n        bool test = true; /* Based on times from X86_32 Core Duo ... my old laptop */\n#elif (defined(CORE2_TUNE) && defined(X86_32))\n        bool test = false; /* Based on times from Core2 running in 32-bit mode ... a sad thing */\n#elif (defined(CORE2_TUNE) && defined(X86_64))\n        bool test = dimj > 12 || dimi <= dimj; /* Based on times from X86_64 Core2 */\n#else\n        bool test = dimj > 12 || dimi <= dimj; /* Based on times from X86_64 Core2 */\n#endif\n        if (test) {\n            long nj = dimj;\n            do {\n#ifdef X86_64\n                long numj = (nj>26) ? 26 : nj;\n#else\n                long numj = (nj>10) ? 10 : nj;\n#endif\n\n                switch (numj) {\n#ifdef X86_64\n                case 26:\n                    TmTxm26(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 24:\n                    TmTxm24(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 22:\n                    TmTxm22(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 20:\n                    TmTxm20(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 18:\n                    TmTxm18(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 16:\n                    TmTxm16(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 14:\n                    TmTxm14(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 12:\n                    TmTxm12(dimj, dimi, dimk, c, b, a) ;\n                    break;\n#endif // X86_64\n\n                case 10:\n                    TmTxm10(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 8:\n                    TmTxm8(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 6:\n                    TmTxm6(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 4:\n                    TmTxm4(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 2:\n                    TmTxm2(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                default:\n                    throw \"mtxmq_byj: should not be here\";\n\n                }\n                nj -= numj;\n                c += numj;\n                b += numj;\n            } while (nj);\n        }\n        else {\n            long ni = dimi;\n            do {\n#ifdef X86_64\n                long numi = (ni>26) ? 26 : ni;\n#else\n                long numi = (ni>10) ? 10 : ni;\n#endif\n\n                switch (numi) {\n#ifdef X86_64\n                case 26:\n                    mTxm26(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 24:\n                    mTxm24(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 22:\n                    mTxm22(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 20:\n                    mTxm20(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 18:\n                    mTxm18(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 16:\n                    mTxm16(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 14:\n                    mTxm14(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 12:\n                    mTxm12(dimi, dimj, dimk, c, a, b) ;\n                    break;\n#endif // X86_64\n\n                case 10:\n                    mTxm10(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 8:\n                    mTxm8(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 6:\n                    mTxm6(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 4:\n                    mTxm4(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 2:\n                    mTxm2(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                default:\n                    throw \"mtxmq: should not be here!\";\n                }\n                ni -= numi;\n                c += numi*dimj;\n                a += numi;\n            } while (ni);\n\n        }\n    }\n}\n\n#endif // defined(X86_32) || defined(X86_64)\n\n\n/* all preprocessor ifdef-endif pairs are closed */\n\n\n#if defined(X86_64)  && !defined(DISABLE_SSE3)\nnamespace madness {\n    template <>\n    void mTxmq(const long dimi, const long dimj, const long dimk,\n               double_complex* MADNESS_RESTRICT c, const double_complex* a, const double_complex* b) {\n\n        //PROFILE_BLOCK(mTxmq_complex_asm);\n        const long dimi16 = dimi<<4;\n        const long dimj16 = dimj<<4;\n\n#define ZERO(c) \"pxor \" #c \",\" #c \";\\n\"\n\n#ifdef AMD_QUADCORE_TUNE\n#  define ENTRY(loop) \"mov %q0,%%r9;  prefetcht0 (%%r9); mov %q1, %%r10; mov %q4,%%r11;.align 32;\"#loop\": \"\n#  define LOADA   \"movaps (%%r9),%%xmm0; movaps %%xmm0, %%xmm1; shufpd $1,%%xmm1,%%xmm1;  mov %%r10,%%r8; add %q2,%%r9; add %q3,%%r10; prefetcht0 (%%r9);\\n\"\n#  define DOIT(c) \"movddup (%%r8),%%xmm2; mulpd %%xmm0,%%xmm2; addpd %%xmm2,\"#c\"; movddup 8(%%r8),%%xmm2; mulpd %%xmm1,%%xmm2; addsubpd %%xmm2,\"#c\"; \\n\"\n#else\n#  ifndef ON_A_MAC\n#    define ENTRY(loop) \"mov %q0,%%r9; mov %q1, %%r10; mov %q4,%%r11;.align 32;\"#loop\": \"\n#  else\n#    define ENTRY(loop) \"mov %q0,%%r9; mov %q1, %%r10; mov %q4,%%r11;\"#loop\": \"\n#  endif\n#  define LOADA   \"movddup  (%%r9), %%xmm0; mov %%r10,%%r8; movddup 8(%%r9), %%xmm1; add %q2,%%r9; add %q3,%%r10; prefetcht0 (%%r9);\\n\"\n#  define DOIT(c) \"movaps (%%r8),%%xmm2; movaps %%xmm2,%%xmm3; mulpd %%xmm0,%%xmm2; addpd %%xmm2,\"#c\"; shufpd $1,%%xmm3,%%xmm3; mulpd %%xmm1,%%xmm3; addsubpd %%xmm3, \"#c\"; \\n\"\n#endif\n\n// see comment in mtxmq_asm.S about movaps vs. movntps\n#  define STORE(c) \"movaps \" #c \", (%%r8); add $16,%%r8;\\n\"\n\n#define NEXT(loop) \"sub $1,%%r11; jnz \"#loop\";\"\n#define INCB    \"add $16,%%r8;\\n\"\n\n        const long jtile = 12;\n        const double_complex* asave = a;\n        for (long jlo=0; jlo<dimj; jlo+=jtile,c+=jtile,b+=jtile) {\n            long nj = std::min(dimj-jlo,jtile);\n            double_complex* MADNESS_RESTRICT ci = c;\n            a = asave;\n            for (long i=0; i<dimi; ++i,ci+=dimj,++a) {\n                const double_complex *ai = a;\n                const double_complex *bk = b;\n                switch (nj) {\n                case 1:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n\n                                          ENTRY(.KLOOP1)\n                                          LOADA\n                                          DOIT(%%xmm4)\n                                          NEXT(.KLOOP1)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 2:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n\n                                          ENTRY(.KLOOP2)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)\n                                          NEXT(.KLOOP2)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 3:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n\n                                          ENTRY(.KLOOP3)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)\n                                          NEXT(.KLOOP3)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 4:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n\n                                          ENTRY(.KLOOP4)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)\n                                          NEXT(.KLOOP4)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 5:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n\n                                          ENTRY(.KLOOP5)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)\n                                          NEXT(.KLOOP5)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 6:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n\n                                          ENTRY(.KLOOP6)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)\n                                          NEXT(.KLOOP6)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n\n                    break;\n\n                case 7:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n\n                                          ENTRY(.KLOOP7)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10)\n                                          NEXT(.KLOOP7)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 8:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n                                          ZERO(%%xmm11)\n\n                                          ENTRY(.KLOOP8)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10) INCB\n                                          DOIT(%%xmm11)\n                                          NEXT(.KLOOP8)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          STORE(%%xmm11)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 9:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n                                          ZERO(%%xmm11)\n                                          ZERO(%%xmm12)\n\n                                          ENTRY(.KLOOP9)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10) INCB\n                                          DOIT(%%xmm11) INCB\n                                          DOIT(%%xmm12)\n                                          NEXT(.KLOOP9)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          STORE(%%xmm11)\n                                          STORE(%%xmm12)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 10:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n                                          ZERO(%%xmm11)\n                                          ZERO(%%xmm12)\n                                          ZERO(%%xmm13)\n\n                                          ENTRY(.KLOOP10)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10) INCB\n                                          DOIT(%%xmm11) INCB\n                                          DOIT(%%xmm12) INCB\n                                          DOIT(%%xmm13)\n                                          NEXT(.KLOOP10)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          STORE(%%xmm11)\n                                          STORE(%%xmm12)\n                                          STORE(%%xmm13)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 11:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n                                          ZERO(%%xmm11)\n                                          ZERO(%%xmm12)\n                                          ZERO(%%xmm13)\n                                          ZERO(%%xmm14)\n\n                                          ENTRY(.KLOOP11)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10) INCB\n                                          DOIT(%%xmm11) INCB\n                                          DOIT(%%xmm12) INCB\n                                          DOIT(%%xmm13) INCB\n                                          DOIT(%%xmm14)\n                                          NEXT(.KLOOP11)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          STORE(%%xmm11)\n                                          STORE(%%xmm12)\n                                          STORE(%%xmm13)\n                                          STORE(%%xmm14)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 12:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n                                          ZERO(%%xmm11)\n                                          ZERO(%%xmm12)\n                                          ZERO(%%xmm13)\n                                          ZERO(%%xmm14)\n                                          ZERO(%%xmm15)\n\n                                          ENTRY(.KLOOP12)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10) INCB\n                                          DOIT(%%xmm11) INCB\n                                          DOIT(%%xmm12) INCB\n                                          DOIT(%%xmm13) INCB\n                                          DOIT(%%xmm14) INCB\n                                          DOIT(%%xmm15)\n                                          NEXT(.KLOOP12)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          STORE(%%xmm11)\n                                          STORE(%%xmm12)\n                                          STORE(%%xmm13)\n                                          STORE(%%xmm14)\n                                          STORE(%%xmm15)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n                }\n            }\n        }\n    }\n\n// #ifndef __INTEL_COMPILER\n//     template <>\n//     void mTxmq(const long dimi, const long dimj, const long dimk,\n//                double_complex* MADNESS_RESTRICT c, const double_complex* a, const double* b)\n//     {\n//       const long itile = 14;\n//       for (long ilo = 0; ilo < dimi; ilo += itile, a+=itile, c+=itile*dimj)\n//       {\n//         long ni = dimi - ilo;\n//         ni = (ni >= itile) ? itile : ni;\n//         if (ni == 1)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2; add %2,%0;\\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5);\\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         else if (ni == 2)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n//                 \"pxor %%xmm3,%%xmm3;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//                 \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3; add %2,%0;\\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm3, (%5);\\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         else if (ni == 3)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n//                 \"pxor %%xmm3,%%xmm3;\\n\"\n//                 \"pxor %%xmm4,%%xmm4;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//                 \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//                 \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4; add %2,%0;\\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm4, (%5);\\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         else if (ni == 4)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n//                 \"pxor %%xmm3,%%xmm3;\\n\"\n//                 \"pxor %%xmm4,%%xmm4;\\n\"\n//                 \"pxor %%xmm5,%%xmm5;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//                 \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//                 \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//                 \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5; add %2,%0;\\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm5, (%5);\\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         if (ni == 5)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n//                 \"pxor %%xmm3,%%xmm3;\\n\"\n//                 \"pxor %%xmm4,%%xmm4;\\n\"\n//                 \"pxor %%xmm5,%%xmm5;\\n\"\n//                 \"pxor %%xmm6,%%xmm6;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//                 \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//                 \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//                 \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//                 \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6; add %2,%0; \\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm6, (%5);\\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         else if (ni == 6)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n//                 \"pxor %%xmm3,%%xmm3;\\n\"\n//                 \"pxor %%xmm4,%%xmm4;\\n\"\n//                 \"pxor %%xmm5,%%xmm5;\\n\"\n//                 \"pxor %%xmm6,%%xmm6;\\n\"\n//                 \"pxor %%xmm7,%%xmm7;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//                 \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//                 \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//                 \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//                 \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//                 \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7; add %2,%0; \\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm7, (%5); \\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         else if (ni == 7)\n//          {\n//            for (long j = 0; j < dimj; ++j)\n//            {\n//              __asm__ volatile\n//              (\n//                // save registers to be 'clobbered'\n//                \"push %0; push %1; push %4; push %5;\\n \"\n//                // zero out mmx registers\n//                \"pxor %%xmm2,%%xmm2;\\n\"\n//                \"pxor %%xmm3,%%xmm3;\\n\"\n//                \"pxor %%xmm4,%%xmm4;\\n\"\n//                \"pxor %%xmm5,%%xmm5;\\n\"\n//                \"pxor %%xmm6,%%xmm6;\\n\"\n//                \"pxor %%xmm7,%%xmm7;\\n\"\n//                \"pxor %%xmm8,%%xmm8;\\n\"\n\n//               \"0:\\n \"\n//               // load the 'b' part into %1 and update pointer\n//               \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//               // begin i-tile\n//               \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//               \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//               \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//               \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//               \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//               \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//               \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8; add %2,%0; \\n\"\n//               \"sub $1,%4; jnz 0b;\\n\"\n\n//               \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm8, (%5);\\n\"\n\n//               \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//               :\n//               : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//               :\n//              );\n//            }\n//          }\n//        else if (ni == 8)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         else if (ni == 9)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         if (ni == 10)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n//               \"pxor %%xmm11,%%xmm11;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\\n\"\n//              \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm11, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         else if (ni == 11)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n//               \"pxor %%xmm11,%%xmm11;\\n\"\n//               \"pxor %%xmm12,%%xmm12;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\\n\"\n//              \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11;\\n\"\n//              \"movapd 160(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm12; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm11, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm12, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         else if (ni == 12)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n//               \"pxor %%xmm11,%%xmm11;\\n\"\n//               \"pxor %%xmm12,%%xmm12;\\n\"\n//               \"pxor %%xmm13,%%xmm13;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\\n\"\n//              \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11;\\n\"\n//              \"movapd 160(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm12;\\n\"\n//              \"movapd 176(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm13; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm11, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm12, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm13, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         else if (ni == 13)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n//               \"pxor %%xmm11,%%xmm11;\\n\"\n//               \"pxor %%xmm12,%%xmm12;\\n\"\n//               \"pxor %%xmm13,%%xmm13;\\n\"\n//               \"pxor %%xmm14,%%xmm14;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\\n\"\n//              \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11;\\n\"\n//              \"movapd 160(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm12;\\n\"\n//              \"movapd 176(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm13;\\n\"\n//              \"movapd 192(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm14; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm11, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm12, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm13, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm14, (%5);\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         else if (ni == 14)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n//               \"pxor %%xmm11,%%xmm11;\\n\"\n//               \"pxor %%xmm12,%%xmm12;\\n\"\n//               \"pxor %%xmm13,%%xmm13;\\n\"\n//               \"pxor %%xmm14,%%xmm14;\\n\"\n//               \"pxor %%xmm15,%%xmm15;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-loop\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\\n\"\n//              \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11;\\n\"\n//              \"movapd 160(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm12;\\n\"\n//              \"movapd 176(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm13;\\n\"\n//              \"movapd 192(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm14;\\n\"\n//              \"movapd 208(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm15; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm11, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm12, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm13, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm14, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm15, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//       }\n//     }\n// #endif // __INTEL_COMPILER\n}\n#endif // defined(X86_64)  && !defined(DISABLE_SSE3)\n\n\n\n\n\n#endif // XXXXXXXXXXXXXXXXXXXXXXXXXXXNEVERUSED\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/mtxmq.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_TENSOR_MTXMQ_H__INCLUDED\n#define MADNESS_TENSOR_MTXMQ_H__INCLUDED\n\n#include <madness/madness_config.h>\n\n#ifdef HAVE_INTEL_MKL\n#include <madness/tensor/cblas.h>\n#endif\n\ntypedef std::complex<double> double_complex;\n\nnamespace madness {\n\n#ifdef HAVE_INTEL_MKL\n    /// Matrix = Matrix transpose * matrix ... MKL interface version\n    \n    /// Does \\c C=AT*B whereas mTxm does C=C+AT*B.  \n    /// \\code\n    ///    c(i,j) = sum(k) a(k,i)*b(k,j)  <------ does not accumulate into C\n    /// \\endcode\n    ///\n    /// This is the SLOW reference implementation\n    template <typename aT, typename bT, typename cT>\n    void mTxmq(long dimi, long dimj, long dimk,\n               cT* MADNESS_RESTRICT c, const aT* a, const bT* b) {\n        const cT one = 1.0;  // alpha in *gemm\n        const cT zero = 0.0; // beta  in *gemm\n        //std::cout << \"IN MKL version mTxmq \" << tensor_type_names[TensorTypeData<aT>::id] << \" \" << tensor_type_names[TensorTypeData<bT>::id] << \" \" << tensor_type_names[TensorTypeData<cT>::id] << \"\\n\";\n        cblas::gemm(cblas::NoTrans,cblas::Trans,dimj,dimi,dimk,one,b,dimj,a,dimi,zero,c,dimj);\n    }\n\n#elif\n\n    /// Matrix = Matrix transpose * matrix ... slow reference implementation\n    \n    /// This routine does \\c C=AT*B whereas mTxm does C=C+AT*B.\n    /// \\code\n    ///    c(i,j) = sum(k) a(k,i)*b(k,j)  <------ does not accumulate into C\n    /// \\endcode\n    template <typename aT, typename bT, typename cT>\n    void mTxmq(long dimi, long dimj, long dimk,\n               cT* MADNESS_RESTRICT c, const aT* a, const bT* b) {\n        //std::cout << \"IN GENERIC mTxmq \" << tensor_type_names[TensorTypeData<aT>::id] << \" \" << tensor_type_names[TensorTypeData<bT>::id] << \" \" << tensor_type_names[TensorTypeData<cT>::id] << \"\\n\";\n        for (long i=0; i<dimi; ++i,c+=dimj,++a) {\n            for (long j=0; j<dimj; ++j) c[j] = 0.0;\n            const aT *aik_ptr = a;\n            for (long k=0; k<dimk; ++k,aik_ptr+=dimi) {\n                aT aki = *aik_ptr;\n                for (long j=0; j<dimj; ++j) {\n                    c[j] += aki*b[k*dimj+j];\n                }\n            }\n        }\n    }\n\n#endif\n\n    /*\n     * mtxm, but with padded buffers.\n     *\n     * ext_b is the extent of the b array, so shrink() isn't needed.\n     */\n    template <typename aT, typename bT, typename cT>\n    void mTxmq_padding(long dimi, long dimj, long dimk, long ext_b,\n               cT* c, const aT* a, const bT* b) {\n        const int alignment = 4;\n        bool free_b = false;\n        long effj = dimj;\n\n        /* Setup a buffer for c if needed */\n        cT* c_buf = c;\n        if (dimj%alignment) {\n            effj = (dimj | 3) + 1;\n            c_buf = (cT*)malloc(sizeof(cT)*dimi*effj);\n        }\n\n        /* Copy b into a buffer if needed */\n        if (ext_b%alignment) {\n            free_b = true;\n            bT* b_buf = (bT*)malloc(sizeof(bT)*dimk*effj);\n\n            bT* bp = b_buf;\n            for (long k=0; k<dimk; k++, bp += effj, b += ext_b)\n                memcpy(bp, b, sizeof(bT)*dimj);\n\n            b = b_buf;\n            ext_b = effj;\n        }\n\n        cT* c_work = c_buf;\n        /* mTxm */\n        for (long i=0; i<dimi; ++i,c_work+=effj,++a) {\n            for (long j=0; j<dimj; ++j) c_work[j] = 0.0;\n            const aT *aik_ptr = a;\n            for (long k=0; k<dimk; ++k,aik_ptr+=dimi) {\n                aT aki = *aik_ptr;\n                for (long j=0; j<dimj; ++j) {\n                    c_work[j] += aki*b[k*ext_b+j];\n                }\n            }\n        }\n\n        /* Copy c out if needed */\n        if (dimj%alignment) {\n            cT* ct = c_buf;\n            for (long i=0; i<dimi; i++, ct += effj, c += dimj)\n                memcpy(c, ct, sizeof(cT)*dimj);\n\n            free(c_buf);\n        }\n\n        /* Free the buffer for b */\n        if (free_b) free((bT*)b);\n    }\n#ifdef HAVE_IBMBGQ\n    extern void bgq_mtxmq_padded(long ni, long nj, long nk, long ej, \n            double* c, const double* a, const double* b);\n    extern void bgq_mtxmq_padded(long ni, long nj, long nk, long ej, \n            __complex__ double* c, const __complex__ double* a, const __complex__ double* b);\n    extern void bgq_mtxmq_padded(long ni, long nj, long nk, long ej, \n            __complex__ double* c, const double* a, const __complex__ double* b);\n    extern void bgq_mtxmq_padded(long ni, long nj, long nk, long ej, \n            __complex__ double* c, const __complex__ double* a, const double* b);\n\n    template <>\n        inline void mTxmq_padding(long ni, long nj, long nk, long ej, \n                double* c, const double* a, const double* b) {\n            bgq_mtxmq_padded(ni, nj, nk, ej, c, a, b);\n        }\n\n    template <>\n        inline void mTxmq_padding(long ni, long nj, long nk, long ej, \n                __complex__ double* c, const __complex__ double* a, const __complex__ double* b) {\n            bgq_mtxmq_padded(ni, nj, nk, ej, c, a, b);\n        }\n\n    template <>\n        inline void mTxmq_padding(long ni, long nj, long nk, long ej, \n                __complex__ double* c, const double* a, const __complex__ double* b) {\n            bgq_mtxmq_padded(ni, nj, nk, ej, c, a, b);\n        }\n\n    template <>\n        inline void mTxmq_padding(long ni, long nj, long nk, long ej, \n                __complex__ double* c, const __complex__ double* a, const double* b) {\n            bgq_mtxmq_padded(ni, nj, nk, ej, c, a, b);\n        }\n#elif defined(HAVE_IBMBGP)\n    extern void bgpmTxmq(long ni, long nj, long nk, double* MADNESS_RESTRICT c, \n                         const double* a, const double* b);\n    extern void bgpmTxmq(long ni, long nj, long nk, double_complex* MADNESS_RESTRICT c, \n                         const double_complex* a, const double_complex* b);\n \n    template <>\n    inline void mTxmq(long ni, long nj, long nk, double* MADNESS_RESTRICT c, const double* a, const double* b) {\n        bgpmTxmq(ni, nj, nk, c, a, b);\n    }\n\n    template <>\n    inline void mTxmq(long ni, long nj, long nk, double_complex* MADNESS_RESTRICT c, const double_complex* a, const double_complex* b) {\n        bgpmTxmq(ni, nj, nk, c, a, b);\n    }\n\n// #elif defined(X86_64) && !defined(DISABLE_SSE3)\n//     template <>\n//     void mTxmq(long dimi, long dimj, long dimk,\n//                double* MADNESS_RESTRICT c, const double* a, const double* b);\n\n//     template <>\n//     void mTxmq(long dimi, long dimj, long dimk,\n//                double_complex* MADNESS_RESTRICT c, const double_complex* a, const double_complex* b);\n\n// #ifndef __INTEL_COMPILER\n//     template <>\n//     void mTxmq(long dimi, long dimj, long dimk,\n//                double_complex* MADNESS_RESTRICT c, const double_complex* a, const double* b);\n// #endif\n\n// #elif defined(X86_32)\n//     template <>\n//     void mTxmq(long dimi, long dimj, long dimk,\n//                double* MADNESS_RESTRICT c, const double* a, const double* b);\n#endif\n\n}\n\n#endif // MADNESS_TENSOR_MTXMQ_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/mtxmq_asm.S",
    "content": "#include <madness/madness_config.h>\n/*\n        void mTxm<ni>(dimi, long nj, long nk, double* c, const double* a, const double* b)\n\n        double c[ni,nj]\n        double a[nk,dimi]   <-- note dimi here\n        double b[nk,nj]\n        c(i,j) = sum(k) a(k,i) * b(k,j)  i=1..ni, j=1..nj, k=1..nk\n\n        All arrays stored in C order.\n\n        These routines make rigid assumptions in order to obtain high speed\n\n        1) ALL input arrays are aligned on 16-byte boundaries\n\n        2) ni, nj, nk, dimi are all even\n\n        The macros below provide the frame work for the actual routines which are\n        automatically generated by the python program genmtxm.py.\n\n        The stratgy in each routine is simple.\n\n        C[i,j] and C[i+1,j] are stored in a single XMM register.\n\n        for (j=0; j<nj; ++j)\n        .   zero accumulators for c(*,j)\n        .   for (k=0; k<nk; k+=2)\n        .       load bkj = b[k,j] and bkj2=b[k+1,j]\n        .       for (i=0; i<ni; ++ni) <-- fully unrolled\n        .           c[i,j] += a[k,i]*bkj\n        .       for (i=0; i<ni; ++ni) <-- fully unrolled\n        .           c[i,j] += a[k+1,i]*bkj2\n\n\tThere is an analgous set of routines for small j in which i\n\tis moved outside and j is completely unrolled on the inside.\n\tAnother way of looking at this is we compute C = (BT*A)T\n\tthus the only difference is how we increment C.\n\tThe driver code mTxmq() calls whichever it thinks is the fastest.\n\n        The routine mTxmq is used to implement the same operation for larger\n        values of ni with the SAME RESTRICTIONS on all pointers being aligned\n        and all ni,nj,nk even.\n\n        For large matrices use ATLAS, GOTO, MKL, ACML, etc., since they include\n        optmizations for cache, TLB, etc.  The mTxm routines are tweaked for\n        small stuff.\n\n        relevant parts of 64-bit LINUX ABI.\n        - rsp is the stack pointer and must be 16-byte aligned\n        - first 6 integer args passed in registers in this order rdi, rsi, rdx, rcx, r8, r9\n        - first 8 floating point args passed in xmm0-7\n        - all other args pushed on the stack in reverse order followed by return address\n        - xmm*, ST*, r10 and r11 do not need to be saved\n        - all other registers must be saved\n        - redzone in rsp-1 to rsp-128 can be freely used\n\n        relevant parts of 32-bit LINUX ABI.\n        - esp is the stack pointer and must be 16-byte aligned\n        - all args pushed on the stack in reverse order followed by return address\n        - xmm*, ST*, eax, ecx, edx, need not be saved\n        - ebx, esi, edi, ebp must be saved\n*/\n\n        /*\n        Late pentium4 (prescott), Core and beyond, opteron, and late AMD athlon and beyond\n        all have SSE3 in 32-bit.   I think all 64-bit CPUs will have SSE3.  Thus, I have\n        enabled SSE3 by default and am not enthused enuf to examine the cpuid.  On older\n\tP4s this code also only hits one flop/cycle instead of two ... I don't plan\n\tto fix this unless it resurfaces on new cpus.\n\n        If you are using an older CPU and you get an illegal instruction, add -DDISABLE_SSE3\n        to the ASFLAGS.\n        */\n\n#  ifndef DISABLE_SSE3\n#    define HAVE_SSE3\n#  endif\n\n#ifdef X86_64\n\n#  define DIMI8 %rdi\n#  define NJ  %rsi\n#  define NK  %eax\n#  define C   %rcx\n#  define A   %r8\n#  define B   %r9\n\n#  define NJ8 %rdx\n#  define ASAVE %r10\n#  define BSAVE %r11\n\n#  define NKSAVE -8(%rsp)\n\n#  define BKJ %xmm0\n#  define BKJ2 %xmm1\n#  define AKI %xmm2\n#  define C00 %xmm3\n#  define C01 %xmm4\n#  define C02 %xmm5\n#  define C03 %xmm6\n#  define C04 %xmm7\n#  define C05 %xmm8\n#  define C06 %xmm9\n#  define C07 %xmm10\n#  define C08 %xmm11\n#  define C09 %xmm12\n#  define C10 %xmm13\n#  define C11 %xmm14\n#  define C12 %xmm15\n\n#ifdef ON_A_MAC\n#define MTXM_ENTRY(name) \\\n.globl _##name; \\\n_##name: \\\n        mov     %edx,   NK; \\\n        shl     $3,     DIMI8; \\\n        mov     NJ,     NJ8; \\\n        shl     $3,     NJ8; \\\n        mov     A,      ASAVE; \\\n        mov     B,      BSAVE; \\\n        mov     NK,     NKSAVE\n\n#else\n#define MTXM_ENTRY(name) \\\n.globl name; \\\n  .type name,@function ; \\\n  .align 128; \\\nname: \\\n        mov     %edx,   NK; \\\n        shl     $3,     DIMI8; \\\n        mov     NJ,     NJ8; \\\n        shl     $3,     NJ8; \\\n        mov     A,      ASAVE; \\\n        mov     B,      BSAVE; \\\n        mov     NK,     NKSAVE\n#endif\n\n#define RETURN ret\n\n#else\n\n        /*\n        stack\n        +24     B\n        +20     A\n        +16     C\n        +12     NK\n        +8      NJ\n        +4      DIMI\n         0      return address\n        -4      ebp save\n        -8      ebx save\n        -12     esi save\n        -16     edi save\n        */\n\n#  define DIMI8  %edi\n#  define NJ     %esi\n#  define NK     %edx\n#  define C      32(%esp)\n#  define A      %ebx\n#  define B      %ecx\n\n#  define NJ8    %eax\n#  define ASAVE  36(%esp)\n#  define BSAVE  40(%esp)\n#  define NKSAVE 28(%esp)\n\n#  define BKJ %xmm0\n#  define BKJ2 %xmm1\n#  define AKI %xmm2\n#  define C00 %xmm3\n#  define C01 %xmm4\n#  define C02 %xmm5\n#  define C03 %xmm6\n#  define C04 %xmm7\n\n#ifdef ON_A_MAC\n#define NAME(name) _##name\n#else\n#define NAME(name) name\n#endif\n\n/*  .type name,@function ; */\n#define MTXM_ENTRY(name) \\\n.globl NAME(name); \\\nNAME(name): \\\n        pushl   %ebp;            \\\n        mov     %esp,  %ebp;     \\\n        pushl   %ebx            ;\\\n        pushl   %esi            ;\\\n        pushl   %edi            ;\\\n        mov     20(%esp), DIMI8; \\\n        mov     24(%esp), NJ; \\\n        mov     28(%esp), NK; \\\n        mov     36(%esp), A; \\\n        mov     40(%esp), B; \\\n        shl     $3, DIMI8; \\\n        mov     NJ, NJ8; \\\n        shl     $3, NJ8;\n\n#define RETURN  \\\n        popl   %edi             ;\\\n        popl   %esi             ;\\\n        popl   %ebx             ;\\\n        popl   %ebp             ;\\\n        ret\n\n#endif\n\n\n\n#define ZERO(a)  pxor a,a\n\n#ifdef HAVE_SSE3\n#define LOADBKJ              \\\n        movddup (B),    BKJ; \\\n        add      NJ8,    B;  \\\n        movddup (B),    BKJ2;\\\n        add      NJ8,    B\n#else\n#define LOADBKJ              \\\n        movsd    (B),    BKJ; unpcklpd BKJ,BKJ;\\\n        add      NJ8,    B;  \\\n        movsd    (B),    BKJ2; unpcklpd BKJ2,BKJ2;\\\n        add      NJ8,    B\n\n#endif\n\n#define ABC(disp,dest) \\\n        movaps  disp(A),    AKI; \\\n        mulpd   BKJ, AKI; \\\n        addpd   AKI, dest\n\n#define ABC2(disp,dest) \\\n        movaps  disp(A),    AKI; \\\n        mulpd   BKJ2, AKI; \\\n        addpd   AKI, dest\n\n#define INCA   add DIMI8, A\n\n/* For 32-bit C will be in memory so use B as a temporary register */\n#define STORE(reg) \\\n\tmovlpd  reg,  (B); \\\n        add     NJ8,    B; \\\n        movhpd  reg,  (B); \\\n        add     NJ8,    B\n\n/* For main application need result in cache so movntps is counter productive\n   e.g., 2.3GHz Barcelona 7+GF -> 4GF in transform() */\n#define STORET(reg) movaps  reg,  (B); add $16, B\n\n        /* For 32-bit C and BSAVE will be in memory so also use B as\n           a temporary register for incrementing */\n\n#define INCC  mov C, B; add $8, B;    mov B, C;\n\n#define INCCT mov C, B; add DIMI8, B; mov B, C;\n\n#define NEXTJ \\\n        mov     BSAVE, B;   add $8, B;    mov B, BSAVE; \\\n        mov     ASAVE,  A; \\\n        mov     NKSAVE, NK; \\\n        sub     $1,     NJ\n\n#include \"mtxm_gen.h\"\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/mtxmq_avx_rjh.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/madness_config.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/mtxmq.h>\n#include <madness/world/worldprofile.h>\n\n#include <complex.h>\n#include <immintrin.h>\n\n// For x86-32/64 have assembly versions for double precision\n// For x86-64 have assembly versions for complex double precision\n\n#if defined(X86_32) || defined(X86_64)\n\n#ifdef X86_64\nextern \"C\" void mTxm26(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm24(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm22(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm20(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm18(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm16(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm14(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm12(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n#endif // X86_64\nextern \"C\" void mTxm10(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm8(long dimi, long dimj, long dimk,\n                      double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm6(long dimi, long dimj, long dimk,\n                      double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm4(long dimi, long dimj, long dimk,\n                      double* c, const double* a, const double* b) ;\n\nextern \"C\" void mTxm2(long dimi, long dimj, long dimk,\n                      double* c, const double* a, const double* b) ;\n\n\n#ifdef X86_64\nextern \"C\" void TmTxm26(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm24(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm22(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm20(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm18(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm16(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm14(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm12(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n#endif // X86_64\nextern \"C\" void TmTxm10(long dimi, long dimj, long dimk,\n                        double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm8(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm6(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm4(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nextern \"C\" void TmTxm2(long dimi, long dimj, long dimk,\n                       double* c, const double* a, const double* b) ;\n\nnamespace madness {\n\n#include <immintrin.h>\n#include <stdio.h>\n\nstatic const int shuffm1=0x0F; // originally -1=0xFFFFFFFF but produced compiler warning about out of range value (upper bits reseved and must be zero).\n\n#ifndef __INTEL_COMPILER\n// __GNUG__\n  // RJH --- Intel compiler defines this but all extant GNU (upto 5.3) do not\nstatic inline void\n_mm256_storeu2_m128d(double *__addr_hi, double *__addr_lo, __m256d __a)\n{\n  __m128d __v128;\n\n  __v128 = _mm256_castpd256_pd128(__a);\n  __builtin_ia32_storeupd(__addr_lo, __v128);\n  __v128 = _mm256_extractf128_pd(__a, 1);\n  __builtin_ia32_storeupd(__addr_hi, __v128);\n}\n#endif\n\n\n//#define FMA(a,b,c) _mm256_fmadd_pd (a, b, c)\n#define FMA(a,b,c) _mm256_add_pd(_mm256_mul_pd(a, b), c)\n\nvoid mTxmq_core(bool is_trans, long dimi, long dimj, long dimk,\n           double * __restrict__ c, const double * __restrict__ a, const double * __restrict__ b, long numi, long numj) {\n\t\n    int i, k;\n    int dimi2 = (numi>>1)<<1;\n    int dimj2 = dimj<<1;\n\tdouble tmp[4];\n\n    __m256d ci0j0, ci0j1, ci0j2, ci0j3, ci0j4, ci0j5;\n    __m256d ci1j0, ci1j1, ci1j2, ci1j3, ci1j4, ci1j5;\n    __m256d aki0, aki1, bkj;\n    __m256i mask = _mm256_set_epi32(0,0,-1,-1,-1,-1,-1,-1);\n    // __m256d tmp; //temporary from aki*bkj\n    \n\tdouble* __restrict__ ci = c;\n\n\t//pointer converter \n#ifndef __INTEL_COMPILER\n// __GNUG__\n\t// produces internal compiler error with all extant compilers (upto 5.3)\n#define conv_addr_trans2normal(i, j) (c + dimi * j + i)\n#else\n       const auto conv_addr_trans2normal = [dimi, c](long i, long j){return c + dimi * j + i;}; // gcc internal compiler error\n#endif\n\n\tswitch (numj) {\n\tcase 24:\n\tcase 23:\n\tcase 22:\n\tcase 21:\n\t\tif      (numj == 24) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 23) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 22) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 21) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\tci0j5 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\tci1j5 = _mm256_setzero_pd();\n\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+16);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+20,mask);\n\t\t\t\tci0j5 = FMA(aki0, bkj, ci0j5);\n\t\t\t\tci1j5 = FMA(aki1, bkj, ci1j5);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, ci0j3);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+16, ci0j4);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+20, mask, ci0j5);\n\t\t\t\t\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj   , ci1j0);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 4, ci1j1);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 8, ci1j2);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+12, ci1j3);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+16, ci1j4);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj+20, mask, ci1j5);\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\t//the variables don't mean aki0 or aki1\n\t\t\t\t//please ignore the meaning of name\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\n\t\t\t\t//store transposed matrix's location c[j*dimi+i]\n\t\t\t\t_mm256_storeu2_m128d(c+2*dimi+i, c+0*dimi+i, aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,7), conv_addr_trans2normal(i,5), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,10), conv_addr_trans2normal(i,8), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,11), conv_addr_trans2normal(i,9), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,14), conv_addr_trans2normal(i,12), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,15), conv_addr_trans2normal(i,13), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j4, ci1j4, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j4, ci1j4, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,18), conv_addr_trans2normal(i,16), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,19), conv_addr_trans2normal(i,17), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j5, ci1j5, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j5, ci1j5, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 24:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,22), conv_addr_trans2normal(i,20), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,23), conv_addr_trans2normal(i,21), aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 23:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,22), conv_addr_trans2normal(i,20), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,21), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 22:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,20), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,21), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 21:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,20), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\tci0j5 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+16);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+20,mask);\n\t\t\t\tci0j5 = FMA(aki0, bkj, ci0j5);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, ci0j3);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+16, ci0j4);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+20, mask, ci0j5);\n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tc[0 *dimi+i] = tmp[0];\n\t\t\t\tc[1 *dimi+i] = tmp[1];\n\t\t\t\tc[2 *dimi+i] = tmp[2];\n\t\t\t\tc[3 *dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j1);\n\t\t\t\tc[4 *dimi+i] = tmp[0];\n\t\t\t\tc[5 *dimi+i] = tmp[1];\n\t\t\t\tc[6 *dimi+i] = tmp[2];\n\t\t\t\tc[7 *dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j2);\n\t\t\t\tc[8 *dimi+i] = tmp[0];\n\t\t\t\tc[9 *dimi+i] = tmp[1];\n\t\t\t\tc[10*dimi+i] = tmp[2];\n\t\t\t\tc[11*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j3);\n\t\t\t\tc[12*dimi+i] = tmp[0];\n\t\t\t\tc[13*dimi+i] = tmp[1];\n\t\t\t\tc[14*dimi+i] = tmp[2];\n\t\t\t\tc[15*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j4);\n\t\t\t\tc[16*dimi+i] = tmp[0];\n\t\t\t\tc[17*dimi+i] = tmp[1];\n\t\t\t\tc[18*dimi+i] = tmp[2];\n\t\t\t\tc[19*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j5);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 24:\n\t\t\t\t\tc[23*dimi+i] = tmp[3];\n\t\t\t\tcase 23:\n\t\t\t\t\tc[22*dimi+i] = tmp[2];\n\t\t\t\tcase 22:\n\t\t\t\t\tc[21*dimi+i] = tmp[1];\n\t\t\t\tcase 21:\n\t\t\t\t\tc[20*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\n\tcase 20:\n\tcase 19:\n\tcase 18:\n\tcase 17:\n\t\tif      (numj == 20) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 19) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 18) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 17) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+16,mask);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, ci0j3);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+16, mask, ci0j4);\n\t\t\t\t\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj   , ci1j0);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 4, ci1j1);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 8, ci1j2);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+12, ci1j3);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj+16, mask, ci1j4);\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,7), conv_addr_trans2normal(i,5), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,10), conv_addr_trans2normal(i,8), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,11), conv_addr_trans2normal(i,9), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,14), conv_addr_trans2normal(i,12), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,15), conv_addr_trans2normal(i,13), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j4, ci1j4, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j4, ci1j4, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 20:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,18), conv_addr_trans2normal(i,16), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,19), conv_addr_trans2normal(i,17), aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 19:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,18), conv_addr_trans2normal(i,16), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,17), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 18:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,16), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,17), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 17:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,16), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+16,mask);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t}\n\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, ci0j3);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+16, mask, ci0j4);\n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tc[0*dimi+i] = tmp[0];\n\t\t\t\tc[1*dimi+i] = tmp[1];\n\t\t\t\tc[2*dimi+i] = tmp[2];\n\t\t\t\tc[3*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j1);\n\t\t\t\tc[4*dimi+i] = tmp[0];\n\t\t\t\tc[5*dimi+i] = tmp[1];\n\t\t\t\tc[6*dimi+i] = tmp[2];\n\t\t\t\tc[7*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j2);\n\t\t\t\tc[8 *dimi+i] = tmp[0];\n\t\t\t\tc[9 *dimi+i] = tmp[1];\n\t\t\t\tc[10*dimi+i] = tmp[2];\n\t\t\t\tc[11*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j3);\n\t\t\t\tc[12*dimi+i] = tmp[0];\n\t\t\t\tc[13*dimi+i] = tmp[1];\n\t\t\t\tc[14*dimi+i] = tmp[2];\n\t\t\t\tc[15*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j4);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 20:\n\t\t\t\t\tc[19*dimi+i] = tmp[3];\n\t\t\t\tcase 19:\n\t\t\t\t\tc[18*dimi+i] = tmp[2];\n\t\t\t\tcase 18:\n\t\t\t\t\tc[17*dimi+i] = tmp[1];\n\t\t\t\tcase 17:\n\t\t\t\t\tc[16*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 16:\n\tcase 15:\n\tcase 14:\n\tcase 13:\n\t\tif      (numj == 16) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 15) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 14) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 13) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+12,mask);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+12, mask, ci0j3); \n\t\t\t   \n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj   , ci1j0);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 4, ci1j1);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 8, ci1j2);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj+12, mask, ci1j3);\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,7), conv_addr_trans2normal(i,5), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,10), conv_addr_trans2normal(i,8), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,11), conv_addr_trans2normal(i,9), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 16:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,14), conv_addr_trans2normal(i,12), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,15), conv_addr_trans2normal(i,13), aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 15:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,14), conv_addr_trans2normal(i,12), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,13), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 14:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,12), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,13), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 13:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,12), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+12,mask);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, ci0j2);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+12, mask, ci0j3); \n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tc[0*dimi+i] = tmp[0];\n\t\t\t\tc[1*dimi+i] = tmp[1];\n\t\t\t\tc[2*dimi+i] = tmp[2];\n\t\t\t\tc[3*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j1);\n\t\t\t\tc[ 4*dimi+i] = tmp[0];\n\t\t\t\tc[ 5*dimi+i] = tmp[1];\n\t\t\t\tc[ 6*dimi+i] = tmp[2];\n\t\t\t\tc[ 7*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j2);\n\t\t\t\tc[ 8*dimi+i] = tmp[0];\n\t\t\t\tc[ 9*dimi+i] = tmp[1];\n\t\t\t\tc[10*dimi+i] = tmp[2];\n\t\t\t\tc[11*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j3);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 16:\n\t\t\t\t\tc[15*dimi+i] = tmp[3];\n\t\t\t\tcase 15:\n\t\t\t\t\tc[14*dimi+i] = tmp[2];\n\t\t\t\tcase 14:\n\t\t\t\t\tc[13*dimi+i] = tmp[1];\n\t\t\t\tcase 13:\n\t\t\t\t\tc[12*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 12:\n\tcase 11:\n\tcase 10:\n\tcase  9:\n\t\tif      (numj == 12) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 11) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 10) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj ==  9) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+8,mask);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+8, mask, ci0j2); \n\t\t\t\t\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj   , ci1j0);\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj+ 4, ci1j1);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj+8, mask, ci1j2); \n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,7), conv_addr_trans2normal(i,5), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 12:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,10), conv_addr_trans2normal(i,8), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,11), conv_addr_trans2normal(i,9), aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 11:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,10), conv_addr_trans2normal(i,8), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,9), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,8), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,9), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  9:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,8), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+8,mask);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, ci0j1);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+8, mask, ci0j2); \n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tc[0*dimi+i] = tmp[0];\n\t\t\t\tc[1*dimi+i] = tmp[1];\n\t\t\t\tc[2*dimi+i] = tmp[2];\n\t\t\t\tc[3*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j1);\n\t\t\t\tc[4*dimi+i] = tmp[0];\n\t\t\t\tc[5*dimi+i] = tmp[1];\n\t\t\t\tc[6*dimi+i] = tmp[2];\n\t\t\t\tc[7*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j2);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 12:\n\t\t\t\t\tc[11*dimi+i] = tmp[3];\n\t\t\t\tcase 11:\n\t\t\t\t\tc[10*dimi+i] = tmp[2];\n\t\t\t\tcase 10:\n\t\t\t\t\tc[9*dimi+i] = tmp[1];\n\t\t\t\tcase  9:\n\t\t\t\t\tc[8*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 8:\n\tcase 7:\n\tcase 6:\n\tcase 5:\n\t\tif      (numj == 8) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 7) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 6) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 5) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+4,mask);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+4, mask, ci0j1); \n\t\t\t\t\n\t\t\t\t_mm256_storeu_pd(c+(i+1)*dimj   , ci1j0);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj+4, mask, ci1j1); \n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  8:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,7), conv_addr_trans2normal(i,5), aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  7:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,6), conv_addr_trans2normal(i,4), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,5), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  6:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,4), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,5), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  5:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,4), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+4,mask);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t}\n\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , ci0j0);\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj+4, mask, ci0j1); \n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tc[0*dimi+i] = tmp[0];\n\t\t\t\tc[1*dimi+i] = tmp[1];\n\t\t\t\tc[2*dimi+i] = tmp[2];\n\t\t\t\tc[3*dimi+i] = tmp[3];\n\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j1);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 8:\n\t\t\t\t\tc[7*dimi+i] = tmp[3];\n\t\t\t\tcase 7:\n\t\t\t\t\tc[6*dimi+i] = tmp[2];\n\t\t\t\tcase 6:\n\t\t\t\t\tc[5*dimi+i] = tmp[1];\n\t\t\t\tcase 5:\n\t\t\t\t\tc[4*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 4:\n\tcase 3:\n\tcase 2:\n\tcase 1:\n\t\tif      (numj == 4) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 3) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 2) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 1) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj, mask);\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj    , mask, ci0j0);\n\t\t\t\t_mm256_maskstore_pd(c+(i+1)*dimj, mask, ci1j0);\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  4:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,3), conv_addr_trans2normal(i,1), aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  3:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal(i,2), conv_addr_trans2normal(i,0), aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,1), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  2:\n\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,0), mask, aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,1), mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  1:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal(i,0), mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t//reset mask\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj, mask);\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t_mm256_maskstore_pd(c+i*dimj    , mask, ci0j0);\n\t\t\t}else{\n\t\t\t\t_mm256_storeu_pd(tmp, ci0j0);\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 4:\n\t\t\t\t\tc[3*dimi+i] = tmp[3];\n\t\t\t\tcase 3:\n\t\t\t\t\tc[2*dimi+i] = tmp[2];\n\t\t\t\tcase 2:\n\t\t\t\t\tc[1*dimi+i] = tmp[1];\n\t\t\t\tcase 1:\n\t\t\t\t\tc[0*dimi+i] = tmp[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\n\tdefault:\n\t\t/* for (i=0; i<dimi; i++) { */\n\t\t/*     for (k=0; k<dimk; k++) { */\n\t\t/*         double aki = a[k*dimi+i]; */\n\t\t/*         for (j=0; j<numj; j++) { */\n\t\t/*             c[i*dimj+j] += aki*b[k*dimj+j]; */\n\t\t/*         } */\n\t\t/*     } */\n\t\t/* } */\n\t\tprintf(\"HOW DID WE GET HERE?\\n\");\n\t\tbreak;\n\t}\n}\n\nvoid mTxmq_core(bool is_trans, long dimi, long dimj, long dimk,\n           double_complex * __restrict__ c0, const double * __restrict__ a0, const double_complex * __restrict__ b0, long numi, long numj) {\n\t\n    int i, k;\n    int dimi2 = (numi>>1)<<1;\n    int dimj2 = dimj<<1;\n\n    __m256d ci0j0, ci0j1, ci0j2, ci0j3, ci0j4, ci0j5;\n    __m256d ci1j0, ci1j1, ci1j2, ci1j3, ci1j4, ci1j5;\n    __m256d aki0, aki1, bkj;\n    __m256i mask = _mm256_set_epi32(0,0,-1,-1,-1,-1,-1,-1);\n    // __m256d tmp; //temporary from aki*bkj\n    \n    \n\tdouble* a = (double*)a0;\n\tdouble* b = (double*)b0;\n\tdouble* c = (double*)c0;\n\tdouble* __restrict__ ci = (double*)c0;\n\n\t//convert pointer \n\tconst auto conv_addr_trans2normal_comp = [dimi, c](long i, long j){return c + dimi * j + i*2;};\n\n\tswitch (numj) {\n\tcase 24:\n\tcase 23:\n\tcase 22:\n\tcase 21:\n\t\tif      (numj == 24) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 23) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 22) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 21) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\tci0j5 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\tci1j5 = _mm256_setzero_pd();\n\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+16);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+20,mask);\n\t\t\t\tci0j5 = FMA(aki0, bkj, ci0j5);\n\t\t\t\tci1j5 = FMA(aki1, bkj, ci1j5);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 8-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 6-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 12-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 10-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 16-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 14-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j4, ci1j4, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j4, ci1j4, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 20-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 18-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j5, ci1j5, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j5, ci1j5, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  24:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 24-2), aki1);\n\t\t\t\t\tcase  22:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 22-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\tci0j5 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+16);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+20,mask);\n\t\t\t\tci0j5 = FMA(aki0, bkj, ci0j5);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,8-2), conv_addr_trans2normal_comp(i, 6-2), ci0j1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,12-2), conv_addr_trans2normal_comp(i, 10-2), ci0j2);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,16-2), conv_addr_trans2normal_comp(i, 14-2), ci0j3);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,20-2), conv_addr_trans2normal_comp(i, 18-2), ci0j4);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 24:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,24-2), conv_addr_trans2normal_comp(i, 22-2), ci0j5);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 22:\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,22-2), mask, ci0j5);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\n\tcase 20:\n\tcase 19:\n\tcase 18:\n\tcase 17:\n\t\tif      (numj == 20) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 19) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 18) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 17) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+16,mask);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 8-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 6-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 12-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 10-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 16-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 14-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j4, ci1j4, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j4, ci1j4, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  20:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 20-2), aki1);\n\t\t\t\t\tcase  18:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 18-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+16,mask);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t}\n\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,8-2), conv_addr_trans2normal_comp(i, 6-2), ci0j1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,12-2), conv_addr_trans2normal_comp(i, 10-2), ci0j2);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,16-2), conv_addr_trans2normal_comp(i, 14-2), ci0j3);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 20:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,20-2), conv_addr_trans2normal_comp(i, 18-2), ci0j4);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 18:\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,18-2), mask, ci0j4);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 16:\n\tcase 15:\n\tcase 14:\n\tcase 13:\n\t\tif      (numj == 16) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 15) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 14) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 13) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+12,mask);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 8-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 6-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 12-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 10-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j3, ci1j3, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  16:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 16-2), aki1);\n\t\t\t\t\tcase  14:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 14-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+12,mask);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,8-2), conv_addr_trans2normal_comp(i, 6-2), ci0j1);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,12-2), conv_addr_trans2normal_comp(i, 10-2), ci0j2);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 16:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,16-2), conv_addr_trans2normal_comp(i, 14-2), ci0j3);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 14:\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,14-2), mask, ci0j3);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 12:\n\tcase 11:\n\tcase 10:\n\tcase  9:\n\t\tif      (numj == 12) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 11) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 10) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj ==  9) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+8,mask);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 8-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 6-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j2, ci1j2, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  12:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 12-2), aki1);\n\t\t\t\t\tcase  10:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 10-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+8,mask);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,8-2), conv_addr_trans2normal_comp(i, 6-2), ci0j1);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 12:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,12-2), conv_addr_trans2normal_comp(i, 10-2), ci0j2);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,10-2), mask, ci0j2);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 8:\n\tcase 7:\n\tcase 6:\n\tcase 5:\n\t\tif      (numj == 8) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 7) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 6) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 5) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+4,mask);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j1, ci1j1, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  8:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 8-2), aki1);\n\t\t\t\t\tcase  6:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 6-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+numi-1;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+4,mask);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t}\n\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,8-2), conv_addr_trans2normal_comp(i, 6-2), ci0j1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,6-2), mask, ci0j1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreak;\n\t\t\n\tcase 4:\n\tcase 3:\n\tcase 2:\n\tcase 1:\n\t\tif      (numj == 4) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 3) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 2) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 1) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj, mask);\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\t\t\t\t//temporary use aki0, aki1 and mask\n\t\t\t\taki0 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(ci0j0, ci1j0, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase  4:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 4-2), aki1);\n\t\t\t\t\tcase  2:\n\t\t\t\t\t\t_mm256_storeu_pd(conv_addr_trans2normal_comp(i, 2-2), aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (numi&0x1) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj, mask);\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\t//is_trans must be true\n\t\t\t\tprintf(\"(real * complex) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}else{\n\n\t\t\t\tswitch(numj){\n\t\t\t\tcase 4:\n\t\t\t\t\t_mm256_storeu2_m128d(conv_addr_trans2normal_comp(i,4-2), conv_addr_trans2normal_comp(i, 2-2), ci0j0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t_mm256_maskstore_pd(conv_addr_trans2normal_comp(i,2-2), mask, ci0j0);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\n\tdefault:\n\t\t/* for (i=0; i<dimi; i++) { */\n\t\t/*     for (k=0; k<dimk; k++) { */\n\t\t/*         double aki = a[k*dimi+i]; */\n\t\t/*         for (j=0; j<numj; j++) { */\n\t\t/*             c[i*dimj+j] += aki*b[k*dimj+j]; */\n\t\t/*         } */\n\t\t/*     } */\n\t\t/* } */\n\t\tprintf(\"HOW DID WE GET HERE?\\n\");\n\t\tbreak;\n\t}\n}\n\nvoid mTxmq_core(bool is_trans, long dimi, long dimj, long dimk,\n           double_complex * __restrict__ c0, const double_complex * __restrict__ a0, const double * __restrict__ b0, long numi, long numj) {\n\t//elements are complex number\n\n    int i, k;\n    int dimi2 = (numi>>1)<<1;\n    int dimj2 = dimj<<1;\n\n    __m256d ci0j0, ci0j1, ci0j2, ci0j3, ci0j4, ci0j5;\n    __m256d ci1j0, ci1j1, ci1j2, ci1j3, ci1j4, ci1j5;\n    __m256d aki0, aki1, bkj;\n    __m256i mask = _mm256_set_epi32(0,0,-1,-1,-1,-1,-1,-1);\n    // __m256d tmp; //temporary from aki*bkj\n    \n    \n\tdouble* a = (double*)a0;\n\tdouble* b = (double*)b0;\n\tdouble* c = (double*)c0;\n\tdouble* __restrict__ ci = (double*)c0;\n\n\tswitch (numj) {\n\tcase 24:\n\tcase 23:\n\tcase 22:\n\tcase 21:\n\t\tif      (numj == 24) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 23) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 22) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 21) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\tci0j5 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\tci1j5 = _mm256_setzero_pd();\n\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+16);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+20,mask);\n\t\t\t\tci0j5 = FMA(aki0, bkj, ci0j5);\n\t\t\t\tci1j5 = FMA(aki1, bkj, ci1j5);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+16, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+20, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+24, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+28, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j4, ci1j4, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j4, ci1j4, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+32, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+36, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j5, ci1j5, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j5, ci1j5, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 24:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+40 , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+44 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 23:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+40 , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+44, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 22:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+40 , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 21:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+40, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tbreak;\n\n\tcase 20:\n\tcase 19:\n\tcase 18:\n\tcase 17:\n\t\tif      (numj == 20) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 19) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 18) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 17) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\tci0j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\tci1j4 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+12);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+16,mask);\n\t\t\t\tci0j4 = FMA(aki0, bkj, ci0j4);\n\t\t\t\tci1j4 = FMA(aki1, bkj, ci1j4);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+16, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+20, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+24, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+28, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j4, ci1j4, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j4, ci1j4, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 20:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+32 , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+36 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 19:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+32 , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+36, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 18:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+32 , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 17:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+32, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tbreak;\n\t\t\n\tcase 16:\n\tcase 15:\n\tcase 14:\n\tcase 13:\n\t\tif      (numj == 16) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 15) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 14) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 13) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\tci0j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\tci1j3 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 8);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+12,mask);\n\t\t\t\tci0j3 = FMA(aki0, bkj, ci0j3);\n\t\t\t\tci1j3 = FMA(aki1, bkj, ci1j3);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4  , aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+16, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+20, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j3, ci1j3, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j3, ci1j3, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 16:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+24 , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+28 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 15:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+24 , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+28, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 14:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+24 , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 13:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+24, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tbreak;\n\t\t\n\tcase 12:\n\tcase 11:\n\tcase 10:\n\tcase  9:\n\t\tif      (numj == 12) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 11) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 10) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj ==  9) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\tci0j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\tci1j2 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj+ 4);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+8,mask);\n\t\t\t\tci0j2 = FMA(aki0, bkj, ci0j2);\n\t\t\t\tci1j2 = FMA(aki1, bkj, ci1j2);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 4, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8, aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+12, aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j2, ci1j2, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j2, ci1j2, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 12:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+16 , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+20 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 11:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+16 , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+20, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+16 , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase  9:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+16, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tbreak;\n\t\t\n\tcase 8:\n\tcase 7:\n\tcase 6:\n\tcase 5:\n\t\tif      (numj == 8) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 7) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 6) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 5) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci0j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\tci1j1 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_loadu_pd(pbkj   );\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj+4,mask);\n\t\t\t\tci0j1 = FMA(aki0, bkj, ci0j1);\n\t\t\t\tci1j1 = FMA(aki1, bkj, ci1j1);\n\t\t\t}\n\t\t\tif(!is_trans){\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t_mm256_storeu_pd(c+i*dimj+4 , aki1);\n\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j1, ci1j1, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j1, ci1j1, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8 , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+12 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8 , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+12, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+ 8 , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+ 8, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\tbreak;\n\t\t\n\tcase 4:\n\tcase 3:\n\tcase 2:\n\tcase 1:\n\t\tif      (numj == 4) mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 3) mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n\t\telse if (numj == 2) mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n\t\telse if (numj == 1) mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n\n\t\tfor (i=0; i<dimi2; i+=2,ci+=dimj2) {\n\t\t\tconst double* __restrict__ pbkj = b;\n\t\t\tconst double* __restrict__ paki = a+i;\n\t\t\tci0j0 = _mm256_setzero_pd();\n\t\t\tci1j0 = _mm256_setzero_pd();\n\t\t\t\n\t\t\tfor (k=0; k<dimk; k++,pbkj+=dimj,paki+=dimi) {\n\t\t\t\taki0 = _mm256_broadcast_sd(paki);\n\t\t\t\taki1 = _mm256_broadcast_sd(paki+1);\n\t\t\t\t\n\t\t\t\tbkj = _mm256_maskload_pd(pbkj, mask);\n\t\t\t\tci0j0 = FMA(aki0, bkj, ci0j0);\n\t\t\t\tci1j0 = FMA(aki1, bkj, ci1j0);\n\t\t\t}\n\t\t\tif(!is_trans){\n\t\t\t\tbkj = _mm256_shuffle_pd(ci0j0, ci1j0, 0);\n\t\t\t\taki1 = _mm256_shuffle_pd(ci0j0, ci1j0, shuffm1);\n\t\t\t\taki0 = _mm256_permute2f128_pd(bkj, aki1, 0x20);\n\t\t\t\taki1 = _mm256_permute2f128_pd(bkj, aki1, 0x31);\n\t\t\t\tswitch(numj){\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj+4 , aki1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj+4, mask, aki1);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t_mm256_storeu_pd(c+i*dimj   , aki0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tmask = _mm256_set_epi64x(0, 0, -1, -1);\n\t\t\t\t\t\t_mm256_maskstore_pd(c+i*dimj, mask, aki0);\n\t\t\t\t\t\tmask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// is_trans must be true\n\t\t\t\tprintf(\"(complex * real) mtxmq_core:HOW DID WE GET HERE?\\n\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tbreak;\n\n\tdefault:\n\t\t/* for (i=0; i<dimi; i++) { */\n\t\t/*     for (k=0; k<dimk; k++) { */\n\t\t/*         double aki = a[k*dimi+i]; */\n\t\t/*         for (j=0; j<numj; j++) { */\n\t\t/*             c[i*dimj+j] += aki*b[k*dimj+j]; */\n\t\t/*         } */\n\t\t/*     } */\n\t\t/* } */\n\t\tprintf(\"HOW DID WE GET HERE?\\n\");\n\t\tbreak;\n\t}\n}\n\n//Real x Real(AVX)\n    template<>\nvoid mTxmq(long dimi, long dimj, long dimk,\n           double * __restrict__ c, const double * __restrict__ a, const double * __restrict__ b) {\n\n\tint nj = dimj;\n\tint ni = dimi;\n\tdo{\n        int numj = (nj>24) ? 24 : nj;\n        int numi = (ni>24) ? 24 : ni;\n\t\tdouble* __restrict__ ci = c;\n\n\t\tif(dimj % 24 >= 12 || dimi % 24 >= 12){\n\t\t\tif((dimj-1) % 24 >= (dimi-1) % 24 && ((dimj % 4 == 0) || (dimi % 4 != 0))){\n\t\t\t\tmTxmq_core(false, dimi, dimj, dimk, ci, a, b, ni, numj);\n\t\t\t\tc += numj;\n\t\t\t\tb += numj;\n\t\t\t\tnj -= numj;\n\t\t\t}else{\n\t\t\t\tmTxmq_core(true, dimj, dimi, dimk, ci, b, a, nj, numi);\n\t\t\t\tc += dimj*numi;\n\t\t\t\ta += numi;\n\t\t\t\tni -= numi;\n\t\t\t}\n\t\t}else{\n\t\t\tif((numj-1) % 24 >= (numi-1) % 24 && ((numj % 4 == 0) || (numi % 4 != 0))){\n\t\t\t\tmTxmq_core(false, dimi, dimj, dimk, ci, a, b, ni, numj);\n\t\t\t\tc += numj;\n\t\t\t\tb += numj;\n\t\t\t\tnj -= numj;\n\t\t\t}else{\n\t\t\t\tmTxmq_core(true, dimj, dimi, dimk, ci, b, a, nj, numi);\n\t\t\t\tc += dimj*numi;\n\t\t\t\ta += numi;\n\t\t\t\tni -= numi;\n\t\t\t}\n\t\t}\n\t}while(nj && ni);\n}\n\n//Real x Complex(AVX)\n    template<>\nvoid mTxmq(long dimi, long dimj, long dimk,\n           double_complex* __restrict__ c, const double* __restrict__ a, const double_complex* __restrict__ b) {\n\n\tmTxmq(dimi, dimj*2, dimk, (double*)c, a, (double*)b);\n}\n\n//Complex x Real(AVX)\n    template<>\nvoid mTxmq(long dimi, long dimj, long dimk,\n           double_complex* __restrict__ c, const double_complex* __restrict__ a, const double* __restrict__ b) {\n\n\tdimi *= 2;\t//a:complex matrix\n\tint nj = dimj;\n\tint ni = dimi;\n\tdo{\n        int numj = (nj>24) ? 24 : nj;\n        int numi = (ni>24) ? 24 : ni;\n\t\tdouble_complex* __restrict__ ci = c;\n\n\t\t//a,c are double_complex*(not double*)\n\t\tif(dimj % 24 >= 12 || dimi % 24 >= 12){\n\t\t\tif((dimj-1) % 24 >= (dimi-1) % 24 && ((dimj % 4 == 0) || (dimi % 4 != 0))){\n\t\t\t\tmTxmq_core(false, dimi, dimj, dimk, ci, a, b, ni, numj);\n\t\t\t\tc += numj;\n\t\t\t\tb += numj;\n\t\t\t\tnj -= numj;\n\t\t\t}else{\n\t\t\t\tmTxmq_core(true, dimj, dimi, dimk, ci, b, a, nj, numi);\n\t\t\t\tc += dimj*(numi/2);\n\t\t\t\ta += numi/2;\n\t\t\t\tni -= numi;\n\t\t\t}\n\t\t}else{\n\t\t\tif((numj-1) % 24 >= (numi-1) % 24 && ((numj % 4 == 0) || (numi % 4 != 0))){\n\t\t\t\tmTxmq_core(false, dimi, dimj, dimk, ci, a, b, ni, numj);\n\t\t\t\tc += numj;\n\t\t\t\tb += numj;\n\t\t\t\tnj -= numj;\n\t\t\t}else{\n\t\t\t\tmTxmq_core(true, dimj, dimi, dimk, ci, b, a, nj, numi);\n\t\t\t\tc += dimj*(numi/2);\n\t\t\t\ta += numi/2;\n\t\t\t\tni -= numi;\n\t\t\t}\n\n\t\t}\n\n\t}while(nj && ni);\n}\n\n    //template<>\n    void mTxmqdjflkjsalkf(const long dimi, const long dimj, const long dimk,\n               double* MADNESS_RESTRICT c, const double* a, const double* b) {\n        //PROFILE_BLOCK(mTxmq_double_asm);\n        //std::cout << \"IN DOUBLE ASM VERSION \" << dimi << \" \" << dimj << \" \" << dimk << \"\\n\";\n\n\n        if (IS_ODD(dimi) || IS_ODD(dimj) || IS_ODD(dimk) ||\n            IS_UNALIGNED(a) || IS_UNALIGNED(b) || IS_UNALIGNED(c)) {\n            //std::cout << \"slow\\n\";\n            // CALL SLOW CODE\n            for (long i=0; i<dimi; ++i,c+=dimj,++a) {\n                for (long j=0; j<dimj; ++j) c[j] = 0.0;\n                const double *ai = a;\n                for (long k=0; k<dimk; ++k,ai+=dimi) {\n                    double aki = *ai;\n                    for (long j=0; j<dimj; ++j) {\n                        c[j] += aki*b[k*dimj+j];\n                    }\n                }\n            }\n            return;\n        }\n\n        /*\n           Choice is to unroll i or j\n        */\n\n#if   defined(AMD_QUADCORE_TUNE)\n        bool test = dimj>=14 && dimj<=26;\n#elif defined(OPTERON_TUNE)\n        bool test = dimi <= dimj; /* Based on times from X86_64 Opteron ... an old one */\n#elif defined(CORE_DUO_TUNE)\n        bool test = true; /* Based on times from X86_32 Core Duo ... my old laptop */\n#elif (defined(CORE2_TUNE) && defined(X86_32))\n        bool test = false; /* Based on times from Core2 running in 32-bit mode ... a sad thing */\n#elif (defined(CORE2_TUNE) && defined(X86_64))\n        bool test = dimj > 12 || dimi <= dimj; /* Based on times from X86_64 Core2 */\n#else\n        bool test = dimj > 12 || dimi <= dimj; /* Based on times from X86_64 Core2 */\n#endif\n        if (test) {\n            long nj = dimj;\n            do {\n#ifdef X86_64\n                long numj = (nj>26) ? 26 : nj;\n#else\n                long numj = (nj>10) ? 10 : nj;\n#endif\n\n                switch (numj) {\n#ifdef X86_64\n                case 26:\n                    TmTxm26(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 24:\n                    TmTxm24(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 22:\n                    TmTxm22(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 20:\n                    TmTxm20(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 18:\n                    TmTxm18(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 16:\n                    TmTxm16(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 14:\n                    TmTxm14(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 12:\n                    TmTxm12(dimj, dimi, dimk, c, b, a) ;\n                    break;\n#endif // X86_64\n\n                case 10:\n                    TmTxm10(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 8:\n                    TmTxm8(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 6:\n                    TmTxm6(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 4:\n                    TmTxm4(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                case 2:\n                    TmTxm2(dimj, dimi, dimk, c, b, a) ;\n                    break;\n\n                default:\n                    throw \"mtxmq_byj: should not be here\";\n\n                }\n                nj -= numj;\n                c += numj;\n                b += numj;\n            } while (nj);\n        }\n        else {\n            long ni = dimi;\n            do {\n#ifdef X86_64\n                long numi = (ni>26) ? 26 : ni;\n#else\n                long numi = (ni>10) ? 10 : ni;\n#endif\n\n                switch (numi) {\n#ifdef X86_64\n                case 26:\n                    mTxm26(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 24:\n                    mTxm24(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 22:\n                    mTxm22(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 20:\n                    mTxm20(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 18:\n                    mTxm18(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 16:\n                    mTxm16(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 14:\n                    mTxm14(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 12:\n                    mTxm12(dimi, dimj, dimk, c, a, b) ;\n                    break;\n#endif // X86_64\n\n                case 10:\n                    mTxm10(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 8:\n                    mTxm8(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 6:\n                    mTxm6(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 4:\n                    mTxm4(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                case 2:\n                    mTxm2(dimi, dimj, dimk, c, a, b) ;\n                    break;\n\n                default:\n                    throw \"mtxmq: should not be here!\";\n                }\n                ni -= numi;\n                c += numi*dimj;\n                a += numi;\n            } while (ni);\n\n        }\n    }\n}\n\n#endif // defined(X86_32) || defined(X86_64)\n\n\n/* all preprocessor ifdef-endif pairs are closed */\n\n\n#if defined(X86_64)  && !defined(DISABLE_SSE3)\nnamespace madness {\n    template <>\n    void mTxmq(const long dimi, const long dimj, const long dimk,\n               double_complex* MADNESS_RESTRICT c, const double_complex* a, const double_complex* b) {\n\n        //PROFILE_BLOCK(mTxmq_complex_asm);\n        const long dimi16 = dimi<<4;\n        const long dimj16 = dimj<<4;\n\n#define ZERO(c) \"pxor \" #c \",\" #c \";\\n\"\n\n#ifdef AMD_QUADCORE_TUNE\n#  define ENTRY(loop) \"mov %q0,%%r9;  prefetcht0 (%%r9); mov %q1, %%r10; mov %q4,%%r11;.align 32;\"#loop\": \"\n#  define LOADA   \"movaps (%%r9),%%xmm0; movaps %%xmm0, %%xmm1; shufpd $1,%%xmm1,%%xmm1;  mov %%r10,%%r8; add %q2,%%r9; add %q3,%%r10; prefetcht0 (%%r9);\\n\"\n#  define DOIT(c) \"movddup (%%r8),%%xmm2; mulpd %%xmm0,%%xmm2; addpd %%xmm2,\"#c\"; movddup 8(%%r8),%%xmm2; mulpd %%xmm1,%%xmm2; addsubpd %%xmm2,\"#c\"; \\n\"\n#else\n#  ifndef ON_A_MAC\n#    define ENTRY(loop) \"mov %q0,%%r9; mov %q1, %%r10; mov %q4,%%r11;.align 32;\"#loop\": \"\n#  else\n#    define ENTRY(loop) \"mov %q0,%%r9; mov %q1, %%r10; mov %q4,%%r11;\"#loop\": \"\n#  endif\n#  define LOADA   \"movddup  (%%r9), %%xmm0; mov %%r10,%%r8; movddup 8(%%r9), %%xmm1; add %q2,%%r9; add %q3,%%r10; prefetcht0 (%%r9);\\n\"\n#  define DOIT(c) \"movaps (%%r8),%%xmm2; movaps %%xmm2,%%xmm3; mulpd %%xmm0,%%xmm2; addpd %%xmm2,\"#c\"; shufpd $1,%%xmm3,%%xmm3; mulpd %%xmm1,%%xmm3; addsubpd %%xmm3, \"#c\"; \\n\"\n#endif\n\n// see comment in mtxmq_asm.S about movaps vs. movntps\n#  define STORE(c) \"movaps \" #c \", (%%r8); add $16,%%r8;\\n\"\n\n#define NEXT(loop) \"sub $1,%%r11; jnz \"#loop\";\"\n#define INCB    \"add $16,%%r8;\\n\"\n\n        const long jtile = 12;\n        const double_complex* asave = a;\n        for (long jlo=0; jlo<dimj; jlo+=jtile,c+=jtile,b+=jtile) {\n            long nj = std::min(dimj-jlo,jtile);\n            double_complex* MADNESS_RESTRICT ci = c;\n            a = asave;\n            for (long i=0; i<dimi; ++i,ci+=dimj,++a) {\n                const double_complex *ai = a;\n                const double_complex *bk = b;\n                switch (nj) {\n                case 1:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n\n                                          ENTRY(.KLOOP1)\n                                          LOADA\n                                          DOIT(%%xmm4)\n                                          NEXT(.KLOOP1)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 2:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n\n                                          ENTRY(.KLOOP2)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)\n                                          NEXT(.KLOOP2)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 3:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n\n                                          ENTRY(.KLOOP3)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)\n                                          NEXT(.KLOOP3)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 4:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n\n                                          ENTRY(.KLOOP4)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)\n                                          NEXT(.KLOOP4)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 5:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n\n                                          ENTRY(.KLOOP5)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)\n                                          NEXT(.KLOOP5)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 6:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n\n                                          ENTRY(.KLOOP6)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)\n                                          NEXT(.KLOOP6)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n\n                    break;\n\n                case 7:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n\n                                          ENTRY(.KLOOP7)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10)\n                                          NEXT(.KLOOP7)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 8:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n                                          ZERO(%%xmm11)\n\n                                          ENTRY(.KLOOP8)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10) INCB\n                                          DOIT(%%xmm11)\n                                          NEXT(.KLOOP8)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          STORE(%%xmm11)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 9:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n                                          ZERO(%%xmm11)\n                                          ZERO(%%xmm12)\n\n                                          ENTRY(.KLOOP9)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10) INCB\n                                          DOIT(%%xmm11) INCB\n                                          DOIT(%%xmm12)\n                                          NEXT(.KLOOP9)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          STORE(%%xmm11)\n                                          STORE(%%xmm12)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 10:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n                                          ZERO(%%xmm11)\n                                          ZERO(%%xmm12)\n                                          ZERO(%%xmm13)\n\n                                          ENTRY(.KLOOP10)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10) INCB\n                                          DOIT(%%xmm11) INCB\n                                          DOIT(%%xmm12) INCB\n                                          DOIT(%%xmm13)\n                                          NEXT(.KLOOP10)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          STORE(%%xmm11)\n                                          STORE(%%xmm12)\n                                          STORE(%%xmm13)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 11:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n                                          ZERO(%%xmm11)\n                                          ZERO(%%xmm12)\n                                          ZERO(%%xmm13)\n                                          ZERO(%%xmm14)\n\n                                          ENTRY(.KLOOP11)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10) INCB\n                                          DOIT(%%xmm11) INCB\n                                          DOIT(%%xmm12) INCB\n                                          DOIT(%%xmm13) INCB\n                                          DOIT(%%xmm14)\n                                          NEXT(.KLOOP11)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          STORE(%%xmm11)\n                                          STORE(%%xmm12)\n                                          STORE(%%xmm13)\n                                          STORE(%%xmm14)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n\n                case 12:\n                    __asm__ __volatile__ (\n                                          ZERO(%%xmm4)\n                                          ZERO(%%xmm5)\n                                          ZERO(%%xmm6)\n                                          ZERO(%%xmm7)\n                                          ZERO(%%xmm8)\n                                          ZERO(%%xmm9)\n                                          ZERO(%%xmm10)\n                                          ZERO(%%xmm11)\n                                          ZERO(%%xmm12)\n                                          ZERO(%%xmm13)\n                                          ZERO(%%xmm14)\n                                          ZERO(%%xmm15)\n\n                                          ENTRY(.KLOOP12)\n                                          LOADA\n                                          DOIT(%%xmm4)  INCB\n                                          DOIT(%%xmm5)  INCB\n                                          DOIT(%%xmm6)  INCB\n                                          DOIT(%%xmm7)  INCB\n                                          DOIT(%%xmm8)  INCB\n                                          DOIT(%%xmm9)  INCB\n                                          DOIT(%%xmm10) INCB\n                                          DOIT(%%xmm11) INCB\n                                          DOIT(%%xmm12) INCB\n                                          DOIT(%%xmm13) INCB\n                                          DOIT(%%xmm14) INCB\n                                          DOIT(%%xmm15)\n                                          NEXT(.KLOOP12)\n\n                                          \"mov %q5, %%r8;\\n\"\n                                          STORE(%%xmm4)\n                                          STORE(%%xmm5)\n                                          STORE(%%xmm6)\n                                          STORE(%%xmm7)\n                                          STORE(%%xmm8)\n                                          STORE(%%xmm9)\n                                          STORE(%%xmm10)\n                                          STORE(%%xmm11)\n                                          STORE(%%xmm12)\n                                          STORE(%%xmm13)\n                                          STORE(%%xmm14)\n                                          STORE(%%xmm15)\n                                          :\n                                          : \"r\"(ai),\"r\"(bk),\"r\"(dimi16),\"r\"(dimj16),\"r\"(dimk), \"r\"(ci)\n                                          : \"r8\", \"r9\", \"r10\", \"r11\", \"memory\"\n                                          );\n                    break;\n                }\n            }\n        }\n    }\n\n// #ifndef __INTEL_COMPILER\n//     template <>\n//     void mTxmq(const long dimi, const long dimj, const long dimk,\n//                double_complex* MADNESS_RESTRICT c, const double_complex* a, const double* b)\n//     {\n//       const long itile = 14;\n//       for (long ilo = 0; ilo < dimi; ilo += itile, a+=itile, c+=itile*dimj)\n//       {\n//         long ni = dimi - ilo;\n//         ni = (ni >= itile) ? itile : ni;\n//         if (ni == 1)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2; add %2,%0;\\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5);\\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         else if (ni == 2)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n//                 \"pxor %%xmm3,%%xmm3;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//                 \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3; add %2,%0;\\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm3, (%5);\\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         else if (ni == 3)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n//                 \"pxor %%xmm3,%%xmm3;\\n\"\n//                 \"pxor %%xmm4,%%xmm4;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//                 \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//                 \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4; add %2,%0;\\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm4, (%5);\\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         else if (ni == 4)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n//                 \"pxor %%xmm3,%%xmm3;\\n\"\n//                 \"pxor %%xmm4,%%xmm4;\\n\"\n//                 \"pxor %%xmm5,%%xmm5;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//                 \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//                 \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//                 \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5; add %2,%0;\\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm5, (%5);\\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         if (ni == 5)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n//                 \"pxor %%xmm3,%%xmm3;\\n\"\n//                 \"pxor %%xmm4,%%xmm4;\\n\"\n//                 \"pxor %%xmm5,%%xmm5;\\n\"\n//                 \"pxor %%xmm6,%%xmm6;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//                 \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//                 \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//                 \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//                 \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6; add %2,%0; \\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm6, (%5);\\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         else if (ni == 6)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//                 // save registers to be 'clobbered'\n//                 \"push %0; push %1; push %4; push %5;\\n \"\n//                 // zero out mmx registers\n//                 \"pxor %%xmm2,%%xmm2;\\n\"\n//                 \"pxor %%xmm3,%%xmm3;\\n\"\n//                 \"pxor %%xmm4,%%xmm4;\\n\"\n//                 \"pxor %%xmm5,%%xmm5;\\n\"\n//                 \"pxor %%xmm6,%%xmm6;\\n\"\n//                 \"pxor %%xmm7,%%xmm7;\\n\"\n\n//                 \"0:\\n \"\n//                 // load the 'b' part into %1 and update pointer\n//                 \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//                 // begin i-tile\n//                 \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//                 \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//                 \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//                 \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//                 \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//                 \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7; add %2,%0; \\n\"\n//                 \"sub $1,%4; jnz 0b;\\n\"\n\n//                 \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//                 \"movapd   %%xmm7, (%5); \\n\"\n\n//                 \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//                 :\n//                 : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//                 :\n//             );\n//           }\n//         }\n//         else if (ni == 7)\n//          {\n//            for (long j = 0; j < dimj; ++j)\n//            {\n//              __asm__ volatile\n//              (\n//                // save registers to be 'clobbered'\n//                \"push %0; push %1; push %4; push %5;\\n \"\n//                // zero out mmx registers\n//                \"pxor %%xmm2,%%xmm2;\\n\"\n//                \"pxor %%xmm3,%%xmm3;\\n\"\n//                \"pxor %%xmm4,%%xmm4;\\n\"\n//                \"pxor %%xmm5,%%xmm5;\\n\"\n//                \"pxor %%xmm6,%%xmm6;\\n\"\n//                \"pxor %%xmm7,%%xmm7;\\n\"\n//                \"pxor %%xmm8,%%xmm8;\\n\"\n\n//               \"0:\\n \"\n//               // load the 'b' part into %1 and update pointer\n//               \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//               // begin i-tile\n//               \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//               \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//               \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//               \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//               \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//               \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//               \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8; add %2,%0; \\n\"\n//               \"sub $1,%4; jnz 0b;\\n\"\n\n//               \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//               \"movapd   %%xmm8, (%5);\\n\"\n\n//               \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//               :\n//               : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//               :\n//              );\n//            }\n//          }\n//        else if (ni == 8)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         else if (ni == 9)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         if (ni == 10)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n//               \"pxor %%xmm11,%%xmm11;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\\n\"\n//              \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm11, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         else if (ni == 11)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n//               \"pxor %%xmm11,%%xmm11;\\n\"\n//               \"pxor %%xmm12,%%xmm12;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\\n\"\n//              \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11;\\n\"\n//              \"movapd 160(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm12; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm11, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm12, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         else if (ni == 12)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n//               \"pxor %%xmm11,%%xmm11;\\n\"\n//               \"pxor %%xmm12,%%xmm12;\\n\"\n//               \"pxor %%xmm13,%%xmm13;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\\n\"\n//              \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11;\\n\"\n//              \"movapd 160(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm12;\\n\"\n//              \"movapd 176(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm13; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm11, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm12, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm13, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         else if (ni == 13)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n//               \"pxor %%xmm11,%%xmm11;\\n\"\n//               \"pxor %%xmm12,%%xmm12;\\n\"\n//               \"pxor %%xmm13,%%xmm13;\\n\"\n//               \"pxor %%xmm14,%%xmm14;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1 and update pointer\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-tile\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\\n\"\n//              \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11;\\n\"\n//              \"movapd 160(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm12;\\n\"\n//              \"movapd 176(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm13;\\n\"\n//              \"movapd 192(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm14; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm11, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm12, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm13, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm14, (%5);\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//         else if (ni == 14)\n//         {\n//           for (long j = 0; j < dimj; ++j)\n//           {\n//             __asm__ volatile\n//             (\n//               // save registers to be 'clobbered'\n//               \"push %0; push %1; push %4; push %5;\\n \"\n//               // zero out mmx registers\n//               \"pxor %%xmm2,%%xmm2;\\n\"\n//               \"pxor %%xmm3,%%xmm3;\\n\"\n//               \"pxor %%xmm4,%%xmm4;\\n\"\n//               \"pxor %%xmm5,%%xmm5;\\n\"\n//               \"pxor %%xmm6,%%xmm6;\\n\"\n//               \"pxor %%xmm7,%%xmm7;\\n\"\n//               \"pxor %%xmm8,%%xmm8;\\n\"\n//               \"pxor %%xmm9,%%xmm9;\\n\"\n//               \"pxor %%xmm10,%%xmm10;\\n\"\n//               \"pxor %%xmm11,%%xmm11;\\n\"\n//               \"pxor %%xmm12,%%xmm12;\\n\"\n//               \"pxor %%xmm13,%%xmm13;\\n\"\n//               \"pxor %%xmm14,%%xmm14;\\n\"\n//               \"pxor %%xmm15,%%xmm15;\\n\"\n\n//              \"0:\\n \"\n//              // load the 'b' part into %1\n//              \"movddup   (%1), %%xmm0; add %3,%1;\\n\"\n//              // begin i-loop\n//              \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\\n\"\n//              \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\\n\"\n//              \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\\n\"\n//              \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\\n\"\n//              \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\\n\"\n//              \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\\n\"\n//              \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\\n\"\n//              \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\\n\"\n//              \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\\n\"\n//              \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11;\\n\"\n//              \"movapd 160(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm12;\\n\"\n//              \"movapd 176(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm13;\\n\"\n//              \"movapd 192(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm14;\\n\"\n//              \"movapd 208(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm15; add %2,%0;\\n\"\n//              \"sub $1,%4; jnz 0b;\\n\"\n\n//              \"movapd   %%xmm2, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm3, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm4, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm5, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm6, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm7, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm8, (%5); add %6,%5;\\n\"\n//              \"movapd   %%xmm9, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm10, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm11, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm12, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm13, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm14, (%5); add %6,%5;\\n\"\n//              \"movapd  %%xmm15, (%5);\\n\"\n\n//              \"pop %5; pop %4; pop %1; pop %0;\\n\"\n\n//              :\n//              : \"r\"(a), \"r\"(b + j), \"r\"(dimi<<4), \"r\"(dimj<<3), \"r\"(dimk), \"r\"(c + j), \"r\"(dimj<<4)\n//              :\n//             );\n//           }\n//         }\n//       }\n//     }\n// #endif // __INTEL_COMPILER\n}\n#endif // defined(X86_64)  && !defined(DISABLE_SSE3)\n\n\n\n\n\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/README",
    "content": "mtxmq generator\n===============\n\nIntegration of the code in bests into madness may require some changes to the \nnamespace, and on bgp it may be necessary to add another couple lines so that \na .o compiled with xlc can be used by gcc.\n\nRunning\n-------\n\nFor available options run:\n\n    $ python3 main.py -h\n\n\nTesting\n-------\n\nNot that there are any real tests implemented, but:\n\nTo run tests, execute the following command:\n\n    $ python3 -m unittest\n\n\nProfiling\n---------\n\n    $ python3 -m cProfile main.py\n\n\nTODO\n----\n\n*   Remove dumb lambda functions\n*   Is an acceptable reveresed-b fma available on bgq?\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/__main__.py",
    "content": "#!/usr/bin/env python3\n\"\"\"Enable running directory\"\"\"\n\nimport main\n\nif __name__ == '__main__':\n    main.main()\n\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/Makefile",
    "content": "MY_ROOT=.\nDEBUG=YES\n#HPM_PROFILING=YES\n\nifndef TARGET\n$(error You must set TARGET to BGP or BGQ)\nendif\n\n#############################################\n\nifeq ($(TARGET),BGP)\n\n\n   RM = rm\n   RMFLAGS = -f\n\n   AR = powerpc-bgp-linux-ar\n   ARFLAGS = cru\n   RANLIB = powerpc-bgp-linux-ranlib\n   HAVE_BGPIBM = -DHAVE_IBMBGP\n\n   LIB=-L$(MY_ROOT)\n   INC=-I$(MY_ROOT)\n\n   CC=mpixlc_r\n   CXX=mpixlcxx_r\n   COPT= -g -O5 -qarch=450d -qtune=450 -qthreaded #-qpath=ILbc:/soft/apps/xlC-interim-fix-virtualthunk/exe/\n   CXXFLAGS=$(INC) $(COPT) $(HAVE_BGPIBM)\n   CPP=$(CC) -E\n\n   LD=$(CC)\n   LDFLAGS= -O3 -qarch=450d -qtune=450 -qthreaded\n\n   OBJECTS = bgp_cc.o  bgp_cr.o  bgp_rc.o bgp_rr.o\nendif\n\n\nifeq ($(TARGET),BGQ)\n   RM = rm\n   RMFLAGS = -f\n\n   AR = powerpc64-bgq-linux-ar\n   ARFLAGS = cru\n   RANLIB = powerpc64-bgq-linux-ranlib\n   HAVE_BGQIBM = -DHAVE_IBMBGQ\n\n   LIB=-L$(MY_ROOT)\n   INC=-I$(MY_ROOT) -I/bgsys/drivers/ppcfloor/\n\n   #CC=/home/projects/llvm/bin/bgclang\n   #CXX=/home/projects/llvm/bin/bgclang++\n   #COPT= -O3\n   #LDFLAGS= -O3\n\n   CC=bgxlc_r\n   CXX=bgxlc++_r\n   COPT= -g -O5 -qhot=level=1 -qsimd=auto -qtune=qp -qarch=qp\n   CXXFLAGS=$(INC) $(COPT) $(HAVE_BGQIBM)\n   LDFLAGS= -O3 -qarch=qp -qtune=qp -qthreaded\n   CPP=$(CC) -E\n\n   LD=$(CC)\n\n   OBJECTS = bgq_mtxm.o\nendif\n\nall: libMADMTXM.a\n\nrefresh: realclean all\n\nlibMADMTXM.a: $(OBJECTS)\n\trm -rf libMADMTXM.a\n\t$(AR) $(ARFLAGS) libMADMTXM.a $(OBJECTS)\n\t$(RANLIB) libMADMTXM.a\n\n$%.o: %.cc\n\t$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $(INC) $< -o $@\n\nclean:\n\t$(RM) $(RMFLAGS) *.o\n\nrealclean: clean\n\t$(RM) $(RMFLAGS) *.a\n\n\n\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/avx2_cc.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double complex * __restrict__ c_x, const double complex * __restrict__ a_x, const double complex * __restrict__ b_x) {\n    int i, j, k;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    long effj = dimj;\n    __m256d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_0_14, _c_0_15, _c_0_16, _c_0_17, _c_0_18, _c_0_19, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _c_1_14, _c_1_15, _c_1_16, _c_1_17, _c_1_18, _c_1_19, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13, _b_0_14, _b_0_15, _b_0_16, _b_0_17, _b_0_18, _b_0_19;\n    __m256d _a_0_0, _a_0_1;\n     __m256d _br_0_0, _br_0_1, _br_0_2, _br_0_3, _br_0_4, _br_0_5, _br_0_6, _br_0_7, _br_0_8, _br_0_9, _br_0_10, _br_0_11, _br_0_12, _br_0_13, _br_0_14, _br_0_15, _br_0_16, _br_0_17, _br_0_18, _br_0_19;\n     __m256d _ai_0_0, _ai_0_1;\n    \n    __m256i mask;\n    j = effj % 2;\n    switch (j) {\n        case 0:\n            mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n            break;\n        case 1:\n            mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n            break;\n        default:\n            return;\n    }\n    for (i=0; i+2<=dimi; i+=2) {\n        const double* __restrict__ xb = b;\n        double* __restrict__ xc = c;\n        for (j=effj; j>10; j-=10,xc+=10*2,xb+=10*2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            _c_1_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_0,_c_1_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_a_0_1,_b_0_0,_c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_4,_c_0_4);\n                _c_0_4 = _mm256_fmaddsub_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_4,_c_1_4);\n                _c_1_4 = _mm256_fmaddsub_pd(_a_0_1,_b_0_4,_c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_8,_c_0_8);\n                _c_0_8 = _mm256_fmaddsub_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_8,_c_1_8);\n                _c_1_8 = _mm256_fmaddsub_pd(_a_0_1,_b_0_8,_c_1_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _br_0_12 = _mm256_permute_pd(_b_0_12, 5);\n                _c_0_12 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_12,_c_0_12);\n                _c_0_12 = _mm256_fmaddsub_pd(_a_0_0,_b_0_12,_c_0_12);\n                _c_1_12 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_12,_c_1_12);\n                _c_1_12 = _mm256_fmaddsub_pd(_a_0_1,_b_0_12,_c_1_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _br_0_16 = _mm256_permute_pd(_b_0_16, 5);\n                _c_0_16 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_16,_c_0_16);\n                _c_0_16 = _mm256_fmaddsub_pd(_a_0_0,_b_0_16,_c_0_16);\n                _c_1_16 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_16,_c_1_16);\n                _c_1_16 = _mm256_fmaddsub_pd(_a_0_1,_b_0_16,_c_1_16);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+8, _c_0_8);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+12, _c_0_12);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+16, _c_0_16);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+4, _c_1_4);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+8, _c_1_8);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+12, _c_1_12);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+16, _c_1_16);\n        }\n        if (j>8) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            _c_1_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_0,_c_1_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_a_0_1,_b_0_0,_c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_4,_c_0_4);\n                _c_0_4 = _mm256_fmaddsub_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_4,_c_1_4);\n                _c_1_4 = _mm256_fmaddsub_pd(_a_0_1,_b_0_4,_c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_8,_c_0_8);\n                _c_0_8 = _mm256_fmaddsub_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_8,_c_1_8);\n                _c_1_8 = _mm256_fmaddsub_pd(_a_0_1,_b_0_8,_c_1_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _br_0_12 = _mm256_permute_pd(_b_0_12, 5);\n                _c_0_12 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_12,_c_0_12);\n                _c_0_12 = _mm256_fmaddsub_pd(_a_0_0,_b_0_12,_c_0_12);\n                _c_1_12 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_12,_c_1_12);\n                _c_1_12 = _mm256_fmaddsub_pd(_a_0_1,_b_0_12,_c_1_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _br_0_16 = _mm256_permute_pd(_b_0_16, 5);\n                _c_0_16 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_16,_c_0_16);\n                _c_0_16 = _mm256_fmaddsub_pd(_a_0_0,_b_0_16,_c_0_16);\n                _c_1_16 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_16,_c_1_16);\n                _c_1_16 = _mm256_fmaddsub_pd(_a_0_1,_b_0_16,_c_1_16);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+8, _c_0_8);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+12, _c_0_12);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+16, mask, _c_0_16);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+4, _c_1_4);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+8, _c_1_8);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+12, _c_1_12);\n            _mm256_maskstore_pd(xc+(i+1)*effj*2+16, mask, _c_1_16);\n        }\n        else if (j>6) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_0,_c_1_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_a_0_1,_b_0_0,_c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_4,_c_0_4);\n                _c_0_4 = _mm256_fmaddsub_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_4,_c_1_4);\n                _c_1_4 = _mm256_fmaddsub_pd(_a_0_1,_b_0_4,_c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_8,_c_0_8);\n                _c_0_8 = _mm256_fmaddsub_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_8,_c_1_8);\n                _c_1_8 = _mm256_fmaddsub_pd(_a_0_1,_b_0_8,_c_1_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _br_0_12 = _mm256_permute_pd(_b_0_12, 5);\n                _c_0_12 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_12,_c_0_12);\n                _c_0_12 = _mm256_fmaddsub_pd(_a_0_0,_b_0_12,_c_0_12);\n                _c_1_12 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_12,_c_1_12);\n                _c_1_12 = _mm256_fmaddsub_pd(_a_0_1,_b_0_12,_c_1_12);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+8, _c_0_8);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+12, mask, _c_0_12);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+4, _c_1_4);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+8, _c_1_8);\n            _mm256_maskstore_pd(xc+(i+1)*effj*2+12, mask, _c_1_12);\n        }\n        else if (j>4) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_0,_c_1_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_a_0_1,_b_0_0,_c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_4,_c_0_4);\n                _c_0_4 = _mm256_fmaddsub_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_4,_c_1_4);\n                _c_1_4 = _mm256_fmaddsub_pd(_a_0_1,_b_0_4,_c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_8,_c_0_8);\n                _c_0_8 = _mm256_fmaddsub_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_8,_c_1_8);\n                _c_1_8 = _mm256_fmaddsub_pd(_a_0_1,_b_0_8,_c_1_8);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+8, mask, _c_0_8);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+4, _c_1_4);\n            _mm256_maskstore_pd(xc+(i+1)*effj*2+8, mask, _c_1_8);\n        }\n        else if (j>2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_0,_c_1_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_a_0_1,_b_0_0,_c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_4,_c_0_4);\n                _c_0_4 = _mm256_fmaddsub_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_4,_c_1_4);\n                _c_1_4 = _mm256_fmaddsub_pd(_a_0_1,_b_0_4,_c_1_4);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+4, mask, _c_0_4);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+0, _c_1_0);\n            _mm256_maskstore_pd(xc+(i+1)*effj*2+4, mask, _c_1_4);\n        }\n        else {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_ai_0_1,_br_0_0,_c_1_0);\n                _c_1_0 = _mm256_fmaddsub_pd(_a_0_1,_b_0_0,_c_1_0);\n            }\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+0, mask, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+1)*effj*2+0, mask, _c_1_0);\n        }\n    }\n    for (; i+1<=dimi; i+=1) {\n        const double* __restrict__ xb = b;\n        double* __restrict__ xc = c;\n        for (j=effj; j>10; j-=10,xc+=10*2,xb+=10*2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_4,_c_0_4);\n                _c_0_4 = _mm256_fmaddsub_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_8,_c_0_8);\n                _c_0_8 = _mm256_fmaddsub_pd(_a_0_0,_b_0_8,_c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _br_0_12 = _mm256_permute_pd(_b_0_12, 5);\n                _c_0_12 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_12,_c_0_12);\n                _c_0_12 = _mm256_fmaddsub_pd(_a_0_0,_b_0_12,_c_0_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _br_0_16 = _mm256_permute_pd(_b_0_16, 5);\n                _c_0_16 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_16,_c_0_16);\n                _c_0_16 = _mm256_fmaddsub_pd(_a_0_0,_b_0_16,_c_0_16);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+8, _c_0_8);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+12, _c_0_12);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+16, _c_0_16);\n        }\n        if (j>8) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_4,_c_0_4);\n                _c_0_4 = _mm256_fmaddsub_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_8,_c_0_8);\n                _c_0_8 = _mm256_fmaddsub_pd(_a_0_0,_b_0_8,_c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _br_0_12 = _mm256_permute_pd(_b_0_12, 5);\n                _c_0_12 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_12,_c_0_12);\n                _c_0_12 = _mm256_fmaddsub_pd(_a_0_0,_b_0_12,_c_0_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _br_0_16 = _mm256_permute_pd(_b_0_16, 5);\n                _c_0_16 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_16,_c_0_16);\n                _c_0_16 = _mm256_fmaddsub_pd(_a_0_0,_b_0_16,_c_0_16);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+8, _c_0_8);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+12, _c_0_12);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+16, mask, _c_0_16);\n        }\n        else if (j>6) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_4,_c_0_4);\n                _c_0_4 = _mm256_fmaddsub_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_8,_c_0_8);\n                _c_0_8 = _mm256_fmaddsub_pd(_a_0_0,_b_0_8,_c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _br_0_12 = _mm256_permute_pd(_b_0_12, 5);\n                _c_0_12 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_12,_c_0_12);\n                _c_0_12 = _mm256_fmaddsub_pd(_a_0_0,_b_0_12,_c_0_12);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+8, _c_0_8);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+12, mask, _c_0_12);\n        }\n        else if (j>4) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_4,_c_0_4);\n                _c_0_4 = _mm256_fmaddsub_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_8,_c_0_8);\n                _c_0_8 = _mm256_fmaddsub_pd(_a_0_0,_b_0_8,_c_0_8);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+8, mask, _c_0_8);\n        }\n        else if (j>2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_4,_c_0_4);\n                _c_0_4 = _mm256_fmaddsub_pd(_a_0_0,_b_0_4,_c_0_4);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+4, mask, _c_0_4);\n        }\n        else {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_fmaddsub_pd(_ai_0_0,_br_0_0,_c_0_0);\n                _c_0_0 = _mm256_fmaddsub_pd(_a_0_0,_b_0_0,_c_0_0);\n            }\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+0, mask, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/avx2_cr.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double complex * __restrict__ c_x, const double complex * __restrict__ a_x, const double  * __restrict__ b_x) {\n    int i, j, k;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    long effj = dimj;\n    __m256d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_0_14, _c_0_15, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _c_1_14, _c_1_15, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_2_4, _c_2_5, _c_2_6, _c_2_7, _c_2_8, _c_2_9, _c_2_10, _c_2_11, _c_2_12, _c_2_13, _c_2_14, _c_2_15, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13, _b_0_14, _b_0_15;\n    __m256d _a_0_0, _a_0_1, _a_0_2;\n     __m256d _az_0_0, _az_0_1, _az_0_2;\n     __m256d _bz_0_0, _bz_0_1, _bz_0_2, _bz_0_3, _bz_0_4, _bz_0_5, _bz_0_6, _bz_0_7, _bz_0_8, _bz_0_9, _bz_0_10, _bz_0_11, _bz_0_12, _bz_0_13, _bz_0_14, _bz_0_15;\n    \n    __m256i mask;\n    j = effj % 2;\n    switch (j) {\n        case 0:\n            mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n            break;\n        case 1:\n            mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n            break;\n        default:\n            return;\n    }\n    for (j=effj; j>8; j-=8,c+=8*2,b+=8) {\n        for (i=0; i+3<=dimi; i+=3) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_2_8 = _mm256_setzero_pd();\n            _c_2_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _az_0_1 = _mm256_broadcast_pd((const __m128d*)(pa+2));\n                _az_0_2 = _mm256_broadcast_pd((const __m128d*)(pa+4));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_fmadd_pd(_az_0_0,_bz_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_az_0_1,_bz_0_0,_c_1_0);\n                _c_2_0 = _mm256_fmadd_pd(_az_0_2,_bz_0_0,_c_2_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_fmadd_pd(_az_0_0,_bz_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_az_0_1,_bz_0_4,_c_1_4);\n                _c_2_4 = _mm256_fmadd_pd(_az_0_2,_bz_0_4,_c_2_4);\n                _bz_0_8 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+4)),12);\n                _c_0_8 = _mm256_fmadd_pd(_az_0_0,_bz_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmadd_pd(_az_0_1,_bz_0_8,_c_1_8);\n                _c_2_8 = _mm256_fmadd_pd(_az_0_2,_bz_0_8,_c_2_8);\n                _bz_0_12 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+6)),12);\n                _c_0_12 = _mm256_fmadd_pd(_az_0_0,_bz_0_12,_c_0_12);\n                _c_1_12 = _mm256_fmadd_pd(_az_0_1,_bz_0_12,_c_1_12);\n                _c_2_12 = _mm256_fmadd_pd(_az_0_2,_bz_0_12,_c_2_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj*2+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*effj*2+12, _c_0_12);\n            _mm256_storeu_pd(c+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*effj*2+4, _c_1_4);\n            _mm256_storeu_pd(c+(i+1)*effj*2+8, _c_1_8);\n            _mm256_storeu_pd(c+(i+1)*effj*2+12, _c_1_12);\n            _mm256_storeu_pd(c+(i+2)*effj*2+0, _c_2_0);\n            _mm256_storeu_pd(c+(i+2)*effj*2+4, _c_2_4);\n            _mm256_storeu_pd(c+(i+2)*effj*2+8, _c_2_8);\n            _mm256_storeu_pd(c+(i+2)*effj*2+12, _c_2_12);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_fmadd_pd(_az_0_0,_bz_0_0,_c_0_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_fmadd_pd(_az_0_0,_bz_0_4,_c_0_4);\n                _bz_0_8 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+4)),12);\n                _c_0_8 = _mm256_fmadd_pd(_az_0_0,_bz_0_8,_c_0_8);\n                _bz_0_12 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+6)),12);\n                _c_0_12 = _mm256_fmadd_pd(_az_0_0,_bz_0_12,_c_0_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj*2+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*effj*2+12, _c_0_12);\n        }\n    }\n    if (j>6) {\n        for (i=0; i+3<=dimi; i+=3) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_2_8 = _mm256_setzero_pd();\n            _c_2_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _az_0_1 = _mm256_broadcast_pd((const __m128d*)(pa+2));\n                _az_0_2 = _mm256_broadcast_pd((const __m128d*)(pa+4));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_fmadd_pd(_az_0_0,_bz_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_az_0_1,_bz_0_0,_c_1_0);\n                _c_2_0 = _mm256_fmadd_pd(_az_0_2,_bz_0_0,_c_2_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_fmadd_pd(_az_0_0,_bz_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_az_0_1,_bz_0_4,_c_1_4);\n                _c_2_4 = _mm256_fmadd_pd(_az_0_2,_bz_0_4,_c_2_4);\n                _bz_0_8 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+4)),12);\n                _c_0_8 = _mm256_fmadd_pd(_az_0_0,_bz_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmadd_pd(_az_0_1,_bz_0_8,_c_1_8);\n                _c_2_8 = _mm256_fmadd_pd(_az_0_2,_bz_0_8,_c_2_8);\n                _bz_0_12 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+6)),12);\n                _c_0_12 = _mm256_fmadd_pd(_az_0_0,_bz_0_12,_c_0_12);\n                _c_1_12 = _mm256_fmadd_pd(_az_0_1,_bz_0_12,_c_1_12);\n                _c_2_12 = _mm256_fmadd_pd(_az_0_2,_bz_0_12,_c_2_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj*2+8, _c_0_8);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+12, mask, _c_0_12);\n            _mm256_storeu_pd(c+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*effj*2+4, _c_1_4);\n            _mm256_storeu_pd(c+(i+1)*effj*2+8, _c_1_8);\n            _mm256_maskstore_pd(c+(i+1)*effj*2+12, mask, _c_1_12);\n            _mm256_storeu_pd(c+(i+2)*effj*2+0, _c_2_0);\n            _mm256_storeu_pd(c+(i+2)*effj*2+4, _c_2_4);\n            _mm256_storeu_pd(c+(i+2)*effj*2+8, _c_2_8);\n            _mm256_maskstore_pd(c+(i+2)*effj*2+12, mask, _c_2_12);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_fmadd_pd(_az_0_0,_bz_0_0,_c_0_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_fmadd_pd(_az_0_0,_bz_0_4,_c_0_4);\n                _bz_0_8 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+4)),12);\n                _c_0_8 = _mm256_fmadd_pd(_az_0_0,_bz_0_8,_c_0_8);\n                _bz_0_12 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+6)),12);\n                _c_0_12 = _mm256_fmadd_pd(_az_0_0,_bz_0_12,_c_0_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj*2+8, _c_0_8);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+12, mask, _c_0_12);\n        }\n    }\n    else if (j>4) {\n        for (i=0; i+3<=dimi; i+=3) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_2_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _az_0_1 = _mm256_broadcast_pd((const __m128d*)(pa+2));\n                _az_0_2 = _mm256_broadcast_pd((const __m128d*)(pa+4));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_fmadd_pd(_az_0_0,_bz_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_az_0_1,_bz_0_0,_c_1_0);\n                _c_2_0 = _mm256_fmadd_pd(_az_0_2,_bz_0_0,_c_2_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_fmadd_pd(_az_0_0,_bz_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_az_0_1,_bz_0_4,_c_1_4);\n                _c_2_4 = _mm256_fmadd_pd(_az_0_2,_bz_0_4,_c_2_4);\n                _bz_0_8 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+4)),12);\n                _c_0_8 = _mm256_fmadd_pd(_az_0_0,_bz_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmadd_pd(_az_0_1,_bz_0_8,_c_1_8);\n                _c_2_8 = _mm256_fmadd_pd(_az_0_2,_bz_0_8,_c_2_8);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+8, mask, _c_0_8);\n            _mm256_storeu_pd(c+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*effj*2+4, _c_1_4);\n            _mm256_maskstore_pd(c+(i+1)*effj*2+8, mask, _c_1_8);\n            _mm256_storeu_pd(c+(i+2)*effj*2+0, _c_2_0);\n            _mm256_storeu_pd(c+(i+2)*effj*2+4, _c_2_4);\n            _mm256_maskstore_pd(c+(i+2)*effj*2+8, mask, _c_2_8);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_fmadd_pd(_az_0_0,_bz_0_0,_c_0_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_fmadd_pd(_az_0_0,_bz_0_4,_c_0_4);\n                _bz_0_8 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+4)),12);\n                _c_0_8 = _mm256_fmadd_pd(_az_0_0,_bz_0_8,_c_0_8);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+8, mask, _c_0_8);\n        }\n    }\n    else if (j>2) {\n        for (i=0; i+3<=dimi; i+=3) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _az_0_1 = _mm256_broadcast_pd((const __m128d*)(pa+2));\n                _az_0_2 = _mm256_broadcast_pd((const __m128d*)(pa+4));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_fmadd_pd(_az_0_0,_bz_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_az_0_1,_bz_0_0,_c_1_0);\n                _c_2_0 = _mm256_fmadd_pd(_az_0_2,_bz_0_0,_c_2_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_fmadd_pd(_az_0_0,_bz_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_az_0_1,_bz_0_4,_c_1_4);\n                _c_2_4 = _mm256_fmadd_pd(_az_0_2,_bz_0_4,_c_2_4);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+4, mask, _c_0_4);\n            _mm256_storeu_pd(c+(i+1)*effj*2+0, _c_1_0);\n            _mm256_maskstore_pd(c+(i+1)*effj*2+4, mask, _c_1_4);\n            _mm256_storeu_pd(c+(i+2)*effj*2+0, _c_2_0);\n            _mm256_maskstore_pd(c+(i+2)*effj*2+4, mask, _c_2_4);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_fmadd_pd(_az_0_0,_bz_0_0,_c_0_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_fmadd_pd(_az_0_0,_bz_0_4,_c_0_4);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+4, mask, _c_0_4);\n        }\n    }\n    else {\n        for (i=0; i+3<=dimi; i+=3) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _az_0_1 = _mm256_broadcast_pd((const __m128d*)(pa+2));\n                _az_0_2 = _mm256_broadcast_pd((const __m128d*)(pa+4));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_fmadd_pd(_az_0_0,_bz_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_az_0_1,_bz_0_0,_c_1_0);\n                _c_2_0 = _mm256_fmadd_pd(_az_0_2,_bz_0_0,_c_2_0);\n            }\n            _mm256_maskstore_pd(c+(i+0)*effj*2+0, mask, _c_0_0);\n            _mm256_maskstore_pd(c+(i+1)*effj*2+0, mask, _c_1_0);\n            _mm256_maskstore_pd(c+(i+2)*effj*2+0, mask, _c_2_0);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_fmadd_pd(_az_0_0,_bz_0_0,_c_0_0);\n            }\n            _mm256_maskstore_pd(c+(i+0)*effj*2+0, mask, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/avx2_rc.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double complex * __restrict__ c_x, const double  * __restrict__ a_x, const double complex * __restrict__ b_x) {\n    int i, j, k;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    long effj = dimj;\n    __m256d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_0_14, _c_0_15, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _c_1_14, _c_1_15, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_2_4, _c_2_5, _c_2_6, _c_2_7, _c_2_8, _c_2_9, _c_2_10, _c_2_11, _c_2_12, _c_2_13, _c_2_14, _c_2_15, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13, _b_0_14, _b_0_15;\n    __m256d _a_0_0, _a_0_1, _a_0_2;\n    \n    __m256i mask;\n    j = effj % 2;\n    switch (j) {\n        case 0:\n            mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n            break;\n        case 1:\n            mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n            break;\n        default:\n            return;\n    }\n    for (j=effj; j>8; j-=8,c+=8*2,b+=8*2) {\n        for (i=0; i+3<=dimi; i+=3) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_2_8 = _mm256_setzero_pd();\n            _c_2_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _a_0_2 = _mm256_broadcast_sd((pa+2));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n                _c_2_0 = _mm256_fmadd_pd(_a_0_2,_b_0_0,_c_2_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_a_0_1,_b_0_4,_c_1_4);\n                _c_2_4 = _mm256_fmadd_pd(_a_0_2,_b_0_4,_c_2_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmadd_pd(_a_0_1,_b_0_8,_c_1_8);\n                _c_2_8 = _mm256_fmadd_pd(_a_0_2,_b_0_8,_c_2_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_fmadd_pd(_a_0_0,_b_0_12,_c_0_12);\n                _c_1_12 = _mm256_fmadd_pd(_a_0_1,_b_0_12,_c_1_12);\n                _c_2_12 = _mm256_fmadd_pd(_a_0_2,_b_0_12,_c_2_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj*2+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*effj*2+12, _c_0_12);\n            _mm256_storeu_pd(c+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*effj*2+4, _c_1_4);\n            _mm256_storeu_pd(c+(i+1)*effj*2+8, _c_1_8);\n            _mm256_storeu_pd(c+(i+1)*effj*2+12, _c_1_12);\n            _mm256_storeu_pd(c+(i+2)*effj*2+0, _c_2_0);\n            _mm256_storeu_pd(c+(i+2)*effj*2+4, _c_2_4);\n            _mm256_storeu_pd(c+(i+2)*effj*2+8, _c_2_8);\n            _mm256_storeu_pd(c+(i+2)*effj*2+12, _c_2_12);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_fmadd_pd(_a_0_0,_b_0_12,_c_0_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj*2+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*effj*2+12, _c_0_12);\n        }\n    }\n    if (j>6) {\n        for (i=0; i+3<=dimi; i+=3) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_2_8 = _mm256_setzero_pd();\n            _c_2_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _a_0_2 = _mm256_broadcast_sd((pa+2));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n                _c_2_0 = _mm256_fmadd_pd(_a_0_2,_b_0_0,_c_2_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_a_0_1,_b_0_4,_c_1_4);\n                _c_2_4 = _mm256_fmadd_pd(_a_0_2,_b_0_4,_c_2_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmadd_pd(_a_0_1,_b_0_8,_c_1_8);\n                _c_2_8 = _mm256_fmadd_pd(_a_0_2,_b_0_8,_c_2_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_fmadd_pd(_a_0_0,_b_0_12,_c_0_12);\n                _c_1_12 = _mm256_fmadd_pd(_a_0_1,_b_0_12,_c_1_12);\n                _c_2_12 = _mm256_fmadd_pd(_a_0_2,_b_0_12,_c_2_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj*2+8, _c_0_8);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+12, mask, _c_0_12);\n            _mm256_storeu_pd(c+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*effj*2+4, _c_1_4);\n            _mm256_storeu_pd(c+(i+1)*effj*2+8, _c_1_8);\n            _mm256_maskstore_pd(c+(i+1)*effj*2+12, mask, _c_1_12);\n            _mm256_storeu_pd(c+(i+2)*effj*2+0, _c_2_0);\n            _mm256_storeu_pd(c+(i+2)*effj*2+4, _c_2_4);\n            _mm256_storeu_pd(c+(i+2)*effj*2+8, _c_2_8);\n            _mm256_maskstore_pd(c+(i+2)*effj*2+12, mask, _c_2_12);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_fmadd_pd(_a_0_0,_b_0_12,_c_0_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj*2+8, _c_0_8);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+12, mask, _c_0_12);\n        }\n    }\n    else if (j>4) {\n        for (i=0; i+3<=dimi; i+=3) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_2_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _a_0_2 = _mm256_broadcast_sd((pa+2));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n                _c_2_0 = _mm256_fmadd_pd(_a_0_2,_b_0_0,_c_2_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_a_0_1,_b_0_4,_c_1_4);\n                _c_2_4 = _mm256_fmadd_pd(_a_0_2,_b_0_4,_c_2_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmadd_pd(_a_0_1,_b_0_8,_c_1_8);\n                _c_2_8 = _mm256_fmadd_pd(_a_0_2,_b_0_8,_c_2_8);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+8, mask, _c_0_8);\n            _mm256_storeu_pd(c+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*effj*2+4, _c_1_4);\n            _mm256_maskstore_pd(c+(i+1)*effj*2+8, mask, _c_1_8);\n            _mm256_storeu_pd(c+(i+2)*effj*2+0, _c_2_0);\n            _mm256_storeu_pd(c+(i+2)*effj*2+4, _c_2_4);\n            _mm256_maskstore_pd(c+(i+2)*effj*2+8, mask, _c_2_8);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj*2+4, _c_0_4);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+8, mask, _c_0_8);\n        }\n    }\n    else if (j>2) {\n        for (i=0; i+3<=dimi; i+=3) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _a_0_2 = _mm256_broadcast_sd((pa+2));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n                _c_2_0 = _mm256_fmadd_pd(_a_0_2,_b_0_0,_c_2_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_a_0_1,_b_0_4,_c_1_4);\n                _c_2_4 = _mm256_fmadd_pd(_a_0_2,_b_0_4,_c_2_4);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+4, mask, _c_0_4);\n            _mm256_storeu_pd(c+(i+1)*effj*2+0, _c_1_0);\n            _mm256_maskstore_pd(c+(i+1)*effj*2+4, mask, _c_1_4);\n            _mm256_storeu_pd(c+(i+2)*effj*2+0, _c_2_0);\n            _mm256_maskstore_pd(c+(i+2)*effj*2+4, mask, _c_2_4);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj*2+0, _c_0_0);\n            _mm256_maskstore_pd(c+(i+0)*effj*2+4, mask, _c_0_4);\n        }\n    }\n    else {\n        for (i=0; i+3<=dimi; i+=3) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _a_0_2 = _mm256_broadcast_sd((pa+2));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n                _c_2_0 = _mm256_fmadd_pd(_a_0_2,_b_0_0,_c_2_0);\n            }\n            _mm256_maskstore_pd(c+(i+0)*effj*2+0, mask, _c_0_0);\n            _mm256_maskstore_pd(c+(i+1)*effj*2+0, mask, _c_1_0);\n            _mm256_maskstore_pd(c+(i+2)*effj*2+0, mask, _c_2_0);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n            }\n            _mm256_maskstore_pd(c+(i+0)*effj*2+0, mask, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/avx2_rr.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double  * __restrict__ c_x, const double  * __restrict__ a_x, const double  * __restrict__ b_x) {\n    int i, j, k;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    long effj = dimj;\n    __m256d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_0_14, _c_0_15, _c_0_16, _c_0_17, _c_0_18, _c_0_19, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _c_1_14, _c_1_15, _c_1_16, _c_1_17, _c_1_18, _c_1_19, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13, _b_0_14, _b_0_15, _b_0_16, _b_0_17, _b_0_18, _b_0_19;\n    __m256d _a_0_0, _a_0_1;\n    \n    __m256i mask;\n    j = effj % 4;\n    switch (j) {\n        case 0:\n            mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n            break;\n        case 1:\n            mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n            break;\n        case 2:\n            mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n            break;\n        case 3:\n            mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n            break;\n        default:\n            return;\n    }\n    for (j=effj; j>20; j-=20,c+=20,b+=20) {\n        for (i=0; i+2<=dimi; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            _c_1_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_a_0_1,_b_0_4,_c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmadd_pd(_a_0_1,_b_0_8,_c_1_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_fmadd_pd(_a_0_0,_b_0_12,_c_0_12);\n                _c_1_12 = _mm256_fmadd_pd(_a_0_1,_b_0_12,_c_1_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _c_0_16 = _mm256_fmadd_pd(_a_0_0,_b_0_16,_c_0_16);\n                _c_1_16 = _mm256_fmadd_pd(_a_0_1,_b_0_16,_c_1_16);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*effj+12, _c_0_12);\n            _mm256_storeu_pd(c+(i+0)*effj+16, _c_0_16);\n            _mm256_storeu_pd(c+(i+1)*effj+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*effj+4, _c_1_4);\n            _mm256_storeu_pd(c+(i+1)*effj+8, _c_1_8);\n            _mm256_storeu_pd(c+(i+1)*effj+12, _c_1_12);\n            _mm256_storeu_pd(c+(i+1)*effj+16, _c_1_16);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_fmadd_pd(_a_0_0,_b_0_12,_c_0_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _c_0_16 = _mm256_fmadd_pd(_a_0_0,_b_0_16,_c_0_16);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*effj+12, _c_0_12);\n            _mm256_storeu_pd(c+(i+0)*effj+16, _c_0_16);\n        }\n    }\n    if (j>16) {\n        for (i=0; i+2<=dimi; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            _c_1_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_a_0_1,_b_0_4,_c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmadd_pd(_a_0_1,_b_0_8,_c_1_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_fmadd_pd(_a_0_0,_b_0_12,_c_0_12);\n                _c_1_12 = _mm256_fmadd_pd(_a_0_1,_b_0_12,_c_1_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _c_0_16 = _mm256_fmadd_pd(_a_0_0,_b_0_16,_c_0_16);\n                _c_1_16 = _mm256_fmadd_pd(_a_0_1,_b_0_16,_c_1_16);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*effj+12, _c_0_12);\n            _mm256_maskstore_pd(c+(i+0)*effj+16, mask, _c_0_16);\n            _mm256_storeu_pd(c+(i+1)*effj+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*effj+4, _c_1_4);\n            _mm256_storeu_pd(c+(i+1)*effj+8, _c_1_8);\n            _mm256_storeu_pd(c+(i+1)*effj+12, _c_1_12);\n            _mm256_maskstore_pd(c+(i+1)*effj+16, mask, _c_1_16);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_fmadd_pd(_a_0_0,_b_0_12,_c_0_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _c_0_16 = _mm256_fmadd_pd(_a_0_0,_b_0_16,_c_0_16);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*effj+12, _c_0_12);\n            _mm256_maskstore_pd(c+(i+0)*effj+16, mask, _c_0_16);\n        }\n    }\n    else if (j>12) {\n        for (i=0; i+2<=dimi; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_a_0_1,_b_0_4,_c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmadd_pd(_a_0_1,_b_0_8,_c_1_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_fmadd_pd(_a_0_0,_b_0_12,_c_0_12);\n                _c_1_12 = _mm256_fmadd_pd(_a_0_1,_b_0_12,_c_1_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj+8, _c_0_8);\n            _mm256_maskstore_pd(c+(i+0)*effj+12, mask, _c_0_12);\n            _mm256_storeu_pd(c+(i+1)*effj+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*effj+4, _c_1_4);\n            _mm256_storeu_pd(c+(i+1)*effj+8, _c_1_8);\n            _mm256_maskstore_pd(c+(i+1)*effj+12, mask, _c_1_12);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_fmadd_pd(_a_0_0,_b_0_12,_c_0_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*effj+8, _c_0_8);\n            _mm256_maskstore_pd(c+(i+0)*effj+12, mask, _c_0_12);\n        }\n    }\n    else if (j>8) {\n        for (i=0; i+2<=dimi; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_a_0_1,_b_0_4,_c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n                _c_1_8 = _mm256_fmadd_pd(_a_0_1,_b_0_8,_c_1_8);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj+4, _c_0_4);\n            _mm256_maskstore_pd(c+(i+0)*effj+8, mask, _c_0_8);\n            _mm256_storeu_pd(c+(i+1)*effj+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*effj+4, _c_1_4);\n            _mm256_maskstore_pd(c+(i+1)*effj+8, mask, _c_1_8);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_fmadd_pd(_a_0_0,_b_0_8,_c_0_8);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*effj+4, _c_0_4);\n            _mm256_maskstore_pd(c+(i+0)*effj+8, mask, _c_0_8);\n        }\n    }\n    else if (j>4) {\n        for (i=0; i+2<=dimi; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n                _c_1_4 = _mm256_fmadd_pd(_a_0_1,_b_0_4,_c_1_4);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj+0, _c_0_0);\n            _mm256_maskstore_pd(c+(i+0)*effj+4, mask, _c_0_4);\n            _mm256_storeu_pd(c+(i+1)*effj+0, _c_1_0);\n            _mm256_maskstore_pd(c+(i+1)*effj+4, mask, _c_1_4);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_fmadd_pd(_a_0_0,_b_0_4,_c_0_4);\n            }\n            _mm256_storeu_pd(c+(i+0)*effj+0, _c_0_0);\n            _mm256_maskstore_pd(c+(i+0)*effj+4, mask, _c_0_4);\n        }\n    }\n    else {\n        for (i=0; i+2<=dimi; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n                _c_1_0 = _mm256_fmadd_pd(_a_0_1,_b_0_0,_c_1_0);\n            }\n            _mm256_maskstore_pd(c+(i+0)*effj+0, mask, _c_0_0);\n            _mm256_maskstore_pd(c+(i+1)*effj+0, mask, _c_1_0);\n        }\n        for (; i+1<=dimi; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_fmadd_pd(_a_0_0,_b_0_0,_c_0_0);\n            }\n            _mm256_maskstore_pd(c+(i+0)*effj+0, mask, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/avx_cc.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double complex * __restrict__ c_x, const double complex * __restrict__ a_x, const double complex * __restrict__ b_x) {\n    int i, j, k, ii;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    __m256d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_0_14, _c_0_15, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _c_1_14, _c_1_15, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13, _b_0_14, _b_0_15;\n    __m256d _a_0_0, _a_0_1;\n     __m256d _br_0_0, _br_0_1, _br_0_2, _br_0_3, _br_0_4, _br_0_5, _br_0_6, _br_0_7, _br_0_8, _br_0_9, _br_0_10, _br_0_11, _br_0_12, _br_0_13, _br_0_14, _br_0_15;\n     __m256d _ai_0_0, _ai_0_1;\n    \n    __m256i mask;\n    j = dimj % 2;\n    switch (j) {\n        case 0:\n            mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n            break;\n        case 1:\n            mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n            break;\n        default:\n            return;\n    }\n    for (i=0; i+2<=dimi ; i+=2) {\n        const double* __restrict__ xb = b;\n        double* __restrict__ xc = c;\n        for (j=dimj; j>8; j-=8,xc+=8*2,xb+=8*2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm256_addsub_pd(_c_0_0, _mm256_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm256_addsub_pd(_c_1_0, _mm256_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm256_addsub_pd(_c_0_4, _mm256_mul_pd(_ai_0_0, _br_0_4));\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_1_4 = _mm256_addsub_pd(_c_1_4, _mm256_mul_pd(_ai_0_1, _br_0_4));\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm256_addsub_pd(_c_0_8, _mm256_mul_pd(_ai_0_0, _br_0_8));\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _c_1_8 = _mm256_addsub_pd(_c_1_8, _mm256_mul_pd(_ai_0_1, _br_0_8));\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _br_0_12 = _mm256_permute_pd(_b_0_12, 5);\n                _c_0_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_0_12 = _mm256_addsub_pd(_c_0_12, _mm256_mul_pd(_ai_0_0, _br_0_12));\n                _c_1_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n                _c_1_12 = _mm256_addsub_pd(_c_1_12, _mm256_mul_pd(_ai_0_1, _br_0_12));\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+12, _c_0_12);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+8, _c_1_8);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+12, _c_1_12);\n        }\n        if (j>6) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm256_addsub_pd(_c_0_0, _mm256_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm256_addsub_pd(_c_1_0, _mm256_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm256_addsub_pd(_c_0_4, _mm256_mul_pd(_ai_0_0, _br_0_4));\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_1_4 = _mm256_addsub_pd(_c_1_4, _mm256_mul_pd(_ai_0_1, _br_0_4));\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm256_addsub_pd(_c_0_8, _mm256_mul_pd(_ai_0_0, _br_0_8));\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _c_1_8 = _mm256_addsub_pd(_c_1_8, _mm256_mul_pd(_ai_0_1, _br_0_8));\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _br_0_12 = _mm256_permute_pd(_b_0_12, 5);\n                _c_0_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_0_12 = _mm256_addsub_pd(_c_0_12, _mm256_mul_pd(_ai_0_0, _br_0_12));\n                _c_1_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n                _c_1_12 = _mm256_addsub_pd(_c_1_12, _mm256_mul_pd(_ai_0_1, _br_0_12));\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+12, mask, _c_0_12);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+8, _c_1_8);\n            _mm256_maskstore_pd(xc+(i+1)*dimj*2+12, mask, _c_1_12);\n        }\n        else if (j>4) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm256_addsub_pd(_c_0_0, _mm256_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm256_addsub_pd(_c_1_0, _mm256_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm256_addsub_pd(_c_0_4, _mm256_mul_pd(_ai_0_0, _br_0_4));\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_1_4 = _mm256_addsub_pd(_c_1_4, _mm256_mul_pd(_ai_0_1, _br_0_4));\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm256_addsub_pd(_c_0_8, _mm256_mul_pd(_ai_0_0, _br_0_8));\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _c_1_8 = _mm256_addsub_pd(_c_1_8, _mm256_mul_pd(_ai_0_1, _br_0_8));\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+8, mask, _c_0_8);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n            _mm256_maskstore_pd(xc+(i+1)*dimj*2+8, mask, _c_1_8);\n        }\n        else if (j>2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm256_addsub_pd(_c_0_0, _mm256_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm256_addsub_pd(_c_1_0, _mm256_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm256_addsub_pd(_c_0_4, _mm256_mul_pd(_ai_0_0, _br_0_4));\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_1_4 = _mm256_addsub_pd(_c_1_4, _mm256_mul_pd(_ai_0_1, _br_0_4));\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+4, mask, _c_0_4);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm256_maskstore_pd(xc+(i+1)*dimj*2+4, mask, _c_1_4);\n        }\n        else {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _a_0_1 = _mm256_broadcast_sd((pa+2));\n                _ai_0_1 = _mm256_broadcast_sd((pa+2)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm256_addsub_pd(_c_0_0, _mm256_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm256_addsub_pd(_c_1_0, _mm256_mul_pd(_ai_0_1, _br_0_0));\n            }\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+0, mask, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+1)*dimj*2+0, mask, _c_1_0);\n        }\n    }\n    for (; i+1<=dimi ; i+=1) {\n        const double* __restrict__ xb = b;\n        double* __restrict__ xc = c;\n        for (j=dimj; j>8; j-=8,xc+=8*2,xb+=8*2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm256_addsub_pd(_c_0_0, _mm256_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm256_addsub_pd(_c_0_4, _mm256_mul_pd(_ai_0_0, _br_0_4));\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm256_addsub_pd(_c_0_8, _mm256_mul_pd(_ai_0_0, _br_0_8));\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _br_0_12 = _mm256_permute_pd(_b_0_12, 5);\n                _c_0_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_0_12 = _mm256_addsub_pd(_c_0_12, _mm256_mul_pd(_ai_0_0, _br_0_12));\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+12, _c_0_12);\n        }\n        if (j>6) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm256_addsub_pd(_c_0_0, _mm256_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm256_addsub_pd(_c_0_4, _mm256_mul_pd(_ai_0_0, _br_0_4));\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm256_addsub_pd(_c_0_8, _mm256_mul_pd(_ai_0_0, _br_0_8));\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _br_0_12 = _mm256_permute_pd(_b_0_12, 5);\n                _c_0_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_0_12 = _mm256_addsub_pd(_c_0_12, _mm256_mul_pd(_ai_0_0, _br_0_12));\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+12, mask, _c_0_12);\n        }\n        else if (j>4) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm256_addsub_pd(_c_0_0, _mm256_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm256_addsub_pd(_c_0_4, _mm256_mul_pd(_ai_0_0, _br_0_4));\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _br_0_8 = _mm256_permute_pd(_b_0_8, 5);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm256_addsub_pd(_c_0_8, _mm256_mul_pd(_ai_0_0, _br_0_8));\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+8, mask, _c_0_8);\n        }\n        else if (j>2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm256_addsub_pd(_c_0_0, _mm256_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _br_0_4 = _mm256_permute_pd(_b_0_4, 5);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm256_addsub_pd(_c_0_4, _mm256_mul_pd(_ai_0_0, _br_0_4));\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+4, mask, _c_0_4);\n        }\n        else {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _ai_0_0 = _mm256_broadcast_sd((pa+0)+1);\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _br_0_0 = _mm256_permute_pd(_b_0_0, 5);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm256_addsub_pd(_c_0_0, _mm256_mul_pd(_ai_0_0, _br_0_0));\n            }\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+0, mask, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/avx_cr.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double complex * __restrict__ c_x, const double complex * __restrict__ a_x, const double  * __restrict__ b_x) {\n    int i, j, k, ii;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    __m256d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_2_4, _c_2_5, _c_2_6, _c_2_7, _c_2_8, _c_2_9, _c_2_10, _c_2_11, _c_3_0, _c_3_1, _c_3_2, _c_3_3, _c_3_4, _c_3_5, _c_3_6, _c_3_7, _c_3_8, _c_3_9, _c_3_10, _c_3_11, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11;\n    __m256d _a_0_0, _a_0_1, _a_0_2, _a_0_3;\n     __m256d _az_0_0, _az_0_1, _az_0_2, _az_0_3;\n     __m256d _bz_0_0, _bz_0_1, _bz_0_2, _bz_0_3, _bz_0_4, _bz_0_5, _bz_0_6, _bz_0_7, _bz_0_8, _bz_0_9, _bz_0_10, _bz_0_11;\n    \n    __m256i mask;\n    j = dimj % 2;\n    switch (j) {\n        case 0:\n            mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n            break;\n        case 1:\n            mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n            break;\n        default:\n            return;\n    }\n    for (i=0; i+4<=dimi ; i+=4) {\n        const double* __restrict__ xb = b;\n        double* __restrict__ xc = c;\n        for (j=dimj; j>6; j-=6,xc+=6*2,xb+=6) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_2_8 = _mm256_setzero_pd();\n            _c_3_0 = _mm256_setzero_pd();\n            _c_3_4 = _mm256_setzero_pd();\n            _c_3_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _az_0_1 = _mm256_broadcast_pd((const __m128d*)(pa+2));\n                _az_0_2 = _mm256_broadcast_pd((const __m128d*)(pa+4));\n                _az_0_3 = _mm256_broadcast_pd((const __m128d*)(pa+6));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n                _c_2_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_2), _c_2_0);\n                _c_3_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_3), _c_3_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_1), _c_1_4);\n                _c_2_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_2), _c_2_4);\n                _c_3_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_3), _c_3_4);\n                _bz_0_8 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+4)),12);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_bz_0_8, _az_0_0), _c_0_8);\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_bz_0_8, _az_0_1), _c_1_8);\n                _c_2_8 = _mm256_add_pd(_mm256_mul_pd(_bz_0_8, _az_0_2), _c_2_8);\n                _c_3_8 = _mm256_add_pd(_mm256_mul_pd(_bz_0_8, _az_0_3), _c_3_8);\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+8, _c_1_8);\n            _mm256_storeu_pd(xc+(i+2)*dimj*2+0, _c_2_0);\n            _mm256_storeu_pd(xc+(i+2)*dimj*2+4, _c_2_4);\n            _mm256_storeu_pd(xc+(i+2)*dimj*2+8, _c_2_8);\n            _mm256_storeu_pd(xc+(i+3)*dimj*2+0, _c_3_0);\n            _mm256_storeu_pd(xc+(i+3)*dimj*2+4, _c_3_4);\n            _mm256_storeu_pd(xc+(i+3)*dimj*2+8, _c_3_8);\n        }\n        if (j>4) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_2_8 = _mm256_setzero_pd();\n            _c_3_0 = _mm256_setzero_pd();\n            _c_3_4 = _mm256_setzero_pd();\n            _c_3_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _az_0_1 = _mm256_broadcast_pd((const __m128d*)(pa+2));\n                _az_0_2 = _mm256_broadcast_pd((const __m128d*)(pa+4));\n                _az_0_3 = _mm256_broadcast_pd((const __m128d*)(pa+6));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n                _c_2_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_2), _c_2_0);\n                _c_3_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_3), _c_3_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_1), _c_1_4);\n                _c_2_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_2), _c_2_4);\n                _c_3_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_3), _c_3_4);\n                _bz_0_8 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+4)),12);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_bz_0_8, _az_0_0), _c_0_8);\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_bz_0_8, _az_0_1), _c_1_8);\n                _c_2_8 = _mm256_add_pd(_mm256_mul_pd(_bz_0_8, _az_0_2), _c_2_8);\n                _c_3_8 = _mm256_add_pd(_mm256_mul_pd(_bz_0_8, _az_0_3), _c_3_8);\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+8, mask, _c_0_8);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n            _mm256_maskstore_pd(xc+(i+1)*dimj*2+8, mask, _c_1_8);\n            _mm256_storeu_pd(xc+(i+2)*dimj*2+0, _c_2_0);\n            _mm256_storeu_pd(xc+(i+2)*dimj*2+4, _c_2_4);\n            _mm256_maskstore_pd(xc+(i+2)*dimj*2+8, mask, _c_2_8);\n            _mm256_storeu_pd(xc+(i+3)*dimj*2+0, _c_3_0);\n            _mm256_storeu_pd(xc+(i+3)*dimj*2+4, _c_3_4);\n            _mm256_maskstore_pd(xc+(i+3)*dimj*2+8, mask, _c_3_8);\n        }\n        else if (j>2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_3_0 = _mm256_setzero_pd();\n            _c_3_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _az_0_1 = _mm256_broadcast_pd((const __m128d*)(pa+2));\n                _az_0_2 = _mm256_broadcast_pd((const __m128d*)(pa+4));\n                _az_0_3 = _mm256_broadcast_pd((const __m128d*)(pa+6));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n                _c_2_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_2), _c_2_0);\n                _c_3_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_3), _c_3_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_1), _c_1_4);\n                _c_2_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_2), _c_2_4);\n                _c_3_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_3), _c_3_4);\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+4, mask, _c_0_4);\n            _mm256_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm256_maskstore_pd(xc+(i+1)*dimj*2+4, mask, _c_1_4);\n            _mm256_storeu_pd(xc+(i+2)*dimj*2+0, _c_2_0);\n            _mm256_maskstore_pd(xc+(i+2)*dimj*2+4, mask, _c_2_4);\n            _mm256_storeu_pd(xc+(i+3)*dimj*2+0, _c_3_0);\n            _mm256_maskstore_pd(xc+(i+3)*dimj*2+4, mask, _c_3_4);\n        }\n        else {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_3_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _az_0_1 = _mm256_broadcast_pd((const __m128d*)(pa+2));\n                _az_0_2 = _mm256_broadcast_pd((const __m128d*)(pa+4));\n                _az_0_3 = _mm256_broadcast_pd((const __m128d*)(pa+6));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n                _c_2_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_2), _c_2_0);\n                _c_3_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_3), _c_3_0);\n            }\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+0, mask, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+1)*dimj*2+0, mask, _c_1_0);\n            _mm256_maskstore_pd(xc+(i+2)*dimj*2+0, mask, _c_2_0);\n            _mm256_maskstore_pd(xc+(i+3)*dimj*2+0, mask, _c_3_0);\n        }\n    }\n    for (; i+1<=dimi ; i+=1) {\n        const double* __restrict__ xb = b;\n        double* __restrict__ xc = c;\n        for (j=dimj; j>6; j-=6,xc+=6*2,xb+=6) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _bz_0_8 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+4)),12);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_bz_0_8, _az_0_0), _c_0_8);\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n        }\n        if (j>4) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _bz_0_8 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+4)),12);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_bz_0_8, _az_0_0), _c_0_8);\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+8, mask, _c_0_8);\n        }\n        else if (j>2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _bz_0_4 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+2)),12);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n            }\n            _mm256_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+4, mask, _c_0_4);\n        }\n        else {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm256_broadcast_pd((const __m128d*)(pa+0));\n                _bz_0_0 = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*)(pb+0)),12);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n            }\n            _mm256_maskstore_pd(xc+(i+0)*dimj*2+0, mask, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/avx_rc.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double complex * __restrict__ c_x, const double  * __restrict__ a_x, const double complex * __restrict__ b_x) {\n    int i, j, k;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    long effj = dimj;\n    __m256d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_2_0, _c_2_1, _c_2_2, _c_2_3, _c_2_4, _c_2_5, _c_2_6, _c_2_7, _c_2_8, _c_2_9, _c_2_10, _c_2_11, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11;\n    __m256d _a_0_0, _a_0_1, _a_0_2;\n    \n    __m256i mask;\n    j = effj % 2;\n    switch (j) {\n        case 0:\n            mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n            break;\n        case 1:\n            mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n            break;\n        default:\n            return;\n    }\n    for (i=0; i+3<=dimi; i+=3) {\n        const double* __restrict__ xb = b;\n        double* __restrict__ xc = c;\n        for (j=effj; j>6; j-=6,xc+=6*2,xb+=6*2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_2_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _a_0_2 = _mm256_broadcast_sd((pa+2));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_2_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_2), _c_2_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_2_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_2), _c_2_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _c_2_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_2), _c_2_8);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+8, _c_0_8);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+4, _c_1_4);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+8, _c_1_8);\n            _mm256_storeu_pd(xc+(i+2)*effj*2+0, _c_2_0);\n            _mm256_storeu_pd(xc+(i+2)*effj*2+4, _c_2_4);\n            _mm256_storeu_pd(xc+(i+2)*effj*2+8, _c_2_8);\n        }\n        if (j>4) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            _c_2_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _a_0_2 = _mm256_broadcast_sd((pa+2));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_2_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_2), _c_2_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_2_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_2), _c_2_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _c_2_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_2), _c_2_8);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+8, mask, _c_0_8);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+0, _c_1_0);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+4, _c_1_4);\n            _mm256_maskstore_pd(xc+(i+1)*effj*2+8, mask, _c_1_8);\n            _mm256_storeu_pd(xc+(i+2)*effj*2+0, _c_2_0);\n            _mm256_storeu_pd(xc+(i+2)*effj*2+4, _c_2_4);\n            _mm256_maskstore_pd(xc+(i+2)*effj*2+8, mask, _c_2_8);\n        }\n        else if (j>2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            _c_2_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _a_0_2 = _mm256_broadcast_sd((pa+2));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_2_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_2), _c_2_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_2_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_2), _c_2_4);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+4, mask, _c_0_4);\n            _mm256_storeu_pd(xc+(i+1)*effj*2+0, _c_1_0);\n            _mm256_maskstore_pd(xc+(i+1)*effj*2+4, mask, _c_1_4);\n            _mm256_storeu_pd(xc+(i+2)*effj*2+0, _c_2_0);\n            _mm256_maskstore_pd(xc+(i+2)*effj*2+4, mask, _c_2_4);\n        }\n        else {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_2_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _a_0_2 = _mm256_broadcast_sd((pa+2));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_2_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_2), _c_2_0);\n            }\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+0, mask, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+1)*effj*2+0, mask, _c_1_0);\n            _mm256_maskstore_pd(xc+(i+2)*effj*2+0, mask, _c_2_0);\n        }\n    }\n    for (; i+1<=dimi; i+=1) {\n        const double* __restrict__ xb = b;\n        double* __restrict__ xc = c;\n        for (j=effj; j>6; j-=6,xc+=6*2,xb+=6*2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+8, _c_0_8);\n        }\n        if (j>4) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_storeu_pd(xc+(i+0)*effj*2+4, _c_0_4);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+8, mask, _c_0_8);\n        }\n        else if (j>2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n            }\n            _mm256_storeu_pd(xc+(i+0)*effj*2+0, _c_0_0);\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+4, mask, _c_0_4);\n        }\n        else {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=effj*2,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n            }\n            _mm256_maskstore_pd(xc+(i+0)*effj*2+0, mask, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/avx_rr.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double  * __restrict__ c_x, const double  * __restrict__ a_x, const double  * __restrict__ b_x) {\n    int i, j, k, ii;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    __m256d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_0_14, _c_0_15, _c_0_16, _c_0_17, _c_0_18, _c_0_19, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _c_1_14, _c_1_15, _c_1_16, _c_1_17, _c_1_18, _c_1_19, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13, _b_0_14, _b_0_15, _b_0_16, _b_0_17, _b_0_18, _b_0_19;\n    __m256d _a_0_0, _a_0_1;\n    \n    __m256i mask;\n    j = dimj % 4;\n    switch (j) {\n        case 0:\n            mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n            break;\n        case 1:\n            mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n            break;\n        case 2:\n            mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n            break;\n        case 3:\n            mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n            break;\n        default:\n            return;\n    }\n    for (j=dimj; j>20; j-=20,c+=20,b+=20) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            _c_1_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_1_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _c_0_16 = _mm256_add_pd(_mm256_mul_pd(_b_0_16, _a_0_0), _c_0_16);\n                _c_1_16 = _mm256_add_pd(_mm256_mul_pd(_b_0_16, _a_0_1), _c_1_16);\n            }\n            _mm256_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*dimj+12, _c_0_12);\n            _mm256_storeu_pd(c+(i+0)*dimj+16, _c_0_16);\n            _mm256_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*dimj+4, _c_1_4);\n            _mm256_storeu_pd(c+(i+1)*dimj+8, _c_1_8);\n            _mm256_storeu_pd(c+(i+1)*dimj+12, _c_1_12);\n            _mm256_storeu_pd(c+(i+1)*dimj+16, _c_1_16);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _c_0_16 = _mm256_add_pd(_mm256_mul_pd(_b_0_16, _a_0_0), _c_0_16);\n            }\n            _mm256_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*dimj+12, _c_0_12);\n            _mm256_storeu_pd(c+(i+0)*dimj+16, _c_0_16);\n        }\n    }\n    if (j>16) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            _c_1_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_1_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _c_0_16 = _mm256_add_pd(_mm256_mul_pd(_b_0_16, _a_0_0), _c_0_16);\n                _c_1_16 = _mm256_add_pd(_mm256_mul_pd(_b_0_16, _a_0_1), _c_1_16);\n            }\n            _mm256_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*dimj+12, _c_0_12);\n            _mm256_maskstore_pd(c+(i+0)*dimj+16, mask, _c_0_16);\n            _mm256_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*dimj+4, _c_1_4);\n            _mm256_storeu_pd(c+(i+1)*dimj+8, _c_1_8);\n            _mm256_storeu_pd(c+(i+1)*dimj+12, _c_1_12);\n            _mm256_maskstore_pd(c+(i+1)*dimj+16, mask, _c_1_16);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_0_16 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _b_0_16 = _mm256_loadu_pd(pb+16);\n                _c_0_16 = _mm256_add_pd(_mm256_mul_pd(_b_0_16, _a_0_0), _c_0_16);\n            }\n            _mm256_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm256_storeu_pd(c+(i+0)*dimj+12, _c_0_12);\n            _mm256_maskstore_pd(c+(i+0)*dimj+16, mask, _c_0_16);\n        }\n    }\n    else if (j>12) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            _c_1_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_1_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm256_maskstore_pd(c+(i+0)*dimj+12, mask, _c_0_12);\n            _mm256_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*dimj+4, _c_1_4);\n            _mm256_storeu_pd(c+(i+1)*dimj+8, _c_1_8);\n            _mm256_maskstore_pd(c+(i+1)*dimj+12, mask, _c_1_12);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_0_12 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _b_0_12 = _mm256_loadu_pd(pb+12);\n                _c_0_12 = _mm256_add_pd(_mm256_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n            }\n            _mm256_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm256_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm256_maskstore_pd(c+(i+0)*dimj+12, mask, _c_0_12);\n        }\n    }\n    else if (j>8) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            _c_1_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n            }\n            _mm256_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm256_maskstore_pd(c+(i+0)*dimj+8, mask, _c_0_8);\n            _mm256_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm256_storeu_pd(c+(i+1)*dimj+4, _c_1_4);\n            _mm256_maskstore_pd(c+(i+1)*dimj+8, mask, _c_1_8);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_0_8 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_8 = _mm256_loadu_pd(pb+8);\n                _c_0_8 = _mm256_add_pd(_mm256_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n            }\n            _mm256_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm256_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm256_maskstore_pd(c+(i+0)*dimj+8, mask, _c_0_8);\n        }\n    }\n    else if (j>4) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            _c_1_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n            }\n            _mm256_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm256_maskstore_pd(c+(i+0)*dimj+4, mask, _c_0_4);\n            _mm256_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm256_maskstore_pd(c+(i+1)*dimj+4, mask, _c_1_4);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_0_4 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_4 = _mm256_loadu_pd(pb+4);\n                _c_0_4 = _mm256_add_pd(_mm256_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n            }\n            _mm256_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm256_maskstore_pd(c+(i+0)*dimj+4, mask, _c_0_4);\n        }\n    }\n    else {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            _c_1_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _a_0_1 = _mm256_broadcast_sd((pa+1));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n            }\n            _mm256_maskstore_pd(c+(i+0)*dimj+0, mask, _c_0_0);\n            _mm256_maskstore_pd(c+(i+1)*dimj+0, mask, _c_1_0);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm256_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm256_broadcast_sd((pa+0));\n                _b_0_0 = _mm256_loadu_pd(pb+0);\n                _c_0_0 = _mm256_add_pd(_mm256_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n            }\n            _mm256_maskstore_pd(c+(i+0)*dimj+0, mask, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/sse_cc.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double complex * __restrict__ c_x, const double complex * __restrict__ a_x, const double complex * __restrict__ b_x) {\n    int i, j, k, ii;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    __m128d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13;\n    __m128d _a_0_0, _a_0_1;\n     __m128d _br_0_0, _br_0_1, _br_0_2, _br_0_3, _br_0_4, _br_0_5, _br_0_6, _br_0_7, _br_0_8, _br_0_9, _br_0_10, _br_0_11, _br_0_12, _br_0_13;\n     __m128d _ai_0_0, _ai_0_1;\n    for (i=0; i+2<=dimi ; i+=2) {\n        const double* __restrict__ xb = b;\n        double* __restrict__ xc = c;\n        for (j=dimj; j>7; j-=7,xc+=7*2,xb+=7*2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            _c_1_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _a_0_1 = _mm_load1_pd((pa+2));\n                _ai_0_1 = _mm_load1_pd((pa+2)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm_addsub_pd(_c_1_0, _mm_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _c_1_2 = _mm_addsub_pd(_c_1_2, _mm_mul_pd(_ai_0_1, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_1_4 = _mm_addsub_pd(_c_1_4, _mm_mul_pd(_ai_0_1, _br_0_4));\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _br_0_6 = _mm_loadr_pd((pb+6));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_0_6 = _mm_addsub_pd(_c_0_6, _mm_mul_pd(_ai_0_0, _br_0_6));\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _c_1_6 = _mm_addsub_pd(_c_1_6, _mm_mul_pd(_ai_0_1, _br_0_6));\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _br_0_8 = _mm_loadr_pd((pb+8));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm_addsub_pd(_c_0_8, _mm_mul_pd(_ai_0_0, _br_0_8));\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _c_1_8 = _mm_addsub_pd(_c_1_8, _mm_mul_pd(_ai_0_1, _br_0_8));\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _br_0_10 = _mm_loadr_pd((pb+10));\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_0_10 = _mm_addsub_pd(_c_0_10, _mm_mul_pd(_ai_0_0, _br_0_10));\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_1), _c_1_10);\n                _c_1_10 = _mm_addsub_pd(_c_1_10, _mm_mul_pd(_ai_0_1, _br_0_10));\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _br_0_12 = _mm_loadr_pd((pb+12));\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_0_12 = _mm_addsub_pd(_c_0_12, _mm_mul_pd(_ai_0_0, _br_0_12));\n                _c_1_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n                _c_1_12 = _mm_addsub_pd(_c_1_12, _mm_mul_pd(_ai_0_1, _br_0_12));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+12, _c_0_12);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+8, _c_1_8);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+10, _c_1_10);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+12, _c_1_12);\n        }\n        if (j>6) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            _c_1_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _a_0_1 = _mm_load1_pd((pa+2));\n                _ai_0_1 = _mm_load1_pd((pa+2)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm_addsub_pd(_c_1_0, _mm_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _c_1_2 = _mm_addsub_pd(_c_1_2, _mm_mul_pd(_ai_0_1, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_1_4 = _mm_addsub_pd(_c_1_4, _mm_mul_pd(_ai_0_1, _br_0_4));\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _br_0_6 = _mm_loadr_pd((pb+6));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_0_6 = _mm_addsub_pd(_c_0_6, _mm_mul_pd(_ai_0_0, _br_0_6));\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _c_1_6 = _mm_addsub_pd(_c_1_6, _mm_mul_pd(_ai_0_1, _br_0_6));\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _br_0_8 = _mm_loadr_pd((pb+8));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm_addsub_pd(_c_0_8, _mm_mul_pd(_ai_0_0, _br_0_8));\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _c_1_8 = _mm_addsub_pd(_c_1_8, _mm_mul_pd(_ai_0_1, _br_0_8));\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _br_0_10 = _mm_loadr_pd((pb+10));\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_0_10 = _mm_addsub_pd(_c_0_10, _mm_mul_pd(_ai_0_0, _br_0_10));\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_1), _c_1_10);\n                _c_1_10 = _mm_addsub_pd(_c_1_10, _mm_mul_pd(_ai_0_1, _br_0_10));\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _br_0_12 = _mm_loadr_pd((pb+12));\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_0_12 = _mm_addsub_pd(_c_0_12, _mm_mul_pd(_ai_0_0, _br_0_12));\n                _c_1_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n                _c_1_12 = _mm_addsub_pd(_c_1_12, _mm_mul_pd(_ai_0_1, _br_0_12));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+12, _c_0_12);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+8, _c_1_8);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+10, _c_1_10);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+12, _c_1_12);\n        }\n        else if (j>5) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _a_0_1 = _mm_load1_pd((pa+2));\n                _ai_0_1 = _mm_load1_pd((pa+2)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm_addsub_pd(_c_1_0, _mm_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _c_1_2 = _mm_addsub_pd(_c_1_2, _mm_mul_pd(_ai_0_1, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_1_4 = _mm_addsub_pd(_c_1_4, _mm_mul_pd(_ai_0_1, _br_0_4));\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _br_0_6 = _mm_loadr_pd((pb+6));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_0_6 = _mm_addsub_pd(_c_0_6, _mm_mul_pd(_ai_0_0, _br_0_6));\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _c_1_6 = _mm_addsub_pd(_c_1_6, _mm_mul_pd(_ai_0_1, _br_0_6));\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _br_0_8 = _mm_loadr_pd((pb+8));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm_addsub_pd(_c_0_8, _mm_mul_pd(_ai_0_0, _br_0_8));\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _c_1_8 = _mm_addsub_pd(_c_1_8, _mm_mul_pd(_ai_0_1, _br_0_8));\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _br_0_10 = _mm_loadr_pd((pb+10));\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_0_10 = _mm_addsub_pd(_c_0_10, _mm_mul_pd(_ai_0_0, _br_0_10));\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_1), _c_1_10);\n                _c_1_10 = _mm_addsub_pd(_c_1_10, _mm_mul_pd(_ai_0_1, _br_0_10));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+8, _c_1_8);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+10, _c_1_10);\n        }\n        else if (j>4) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _a_0_1 = _mm_load1_pd((pa+2));\n                _ai_0_1 = _mm_load1_pd((pa+2)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm_addsub_pd(_c_1_0, _mm_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _c_1_2 = _mm_addsub_pd(_c_1_2, _mm_mul_pd(_ai_0_1, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_1_4 = _mm_addsub_pd(_c_1_4, _mm_mul_pd(_ai_0_1, _br_0_4));\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _br_0_6 = _mm_loadr_pd((pb+6));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_0_6 = _mm_addsub_pd(_c_0_6, _mm_mul_pd(_ai_0_0, _br_0_6));\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _c_1_6 = _mm_addsub_pd(_c_1_6, _mm_mul_pd(_ai_0_1, _br_0_6));\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _br_0_8 = _mm_loadr_pd((pb+8));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm_addsub_pd(_c_0_8, _mm_mul_pd(_ai_0_0, _br_0_8));\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _c_1_8 = _mm_addsub_pd(_c_1_8, _mm_mul_pd(_ai_0_1, _br_0_8));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+8, _c_1_8);\n        }\n        else if (j>3) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _a_0_1 = _mm_load1_pd((pa+2));\n                _ai_0_1 = _mm_load1_pd((pa+2)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm_addsub_pd(_c_1_0, _mm_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _c_1_2 = _mm_addsub_pd(_c_1_2, _mm_mul_pd(_ai_0_1, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_1_4 = _mm_addsub_pd(_c_1_4, _mm_mul_pd(_ai_0_1, _br_0_4));\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _br_0_6 = _mm_loadr_pd((pb+6));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_0_6 = _mm_addsub_pd(_c_0_6, _mm_mul_pd(_ai_0_0, _br_0_6));\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _c_1_6 = _mm_addsub_pd(_c_1_6, _mm_mul_pd(_ai_0_1, _br_0_6));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+6, _c_1_6);\n        }\n        else if (j>2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _a_0_1 = _mm_load1_pd((pa+2));\n                _ai_0_1 = _mm_load1_pd((pa+2)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm_addsub_pd(_c_1_0, _mm_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _c_1_2 = _mm_addsub_pd(_c_1_2, _mm_mul_pd(_ai_0_1, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _c_1_4 = _mm_addsub_pd(_c_1_4, _mm_mul_pd(_ai_0_1, _br_0_4));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+4, _c_1_4);\n        }\n        else if (j>1) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _a_0_1 = _mm_load1_pd((pa+2));\n                _ai_0_1 = _mm_load1_pd((pa+2)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm_addsub_pd(_c_1_0, _mm_mul_pd(_ai_0_1, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _c_1_2 = _mm_addsub_pd(_c_1_2, _mm_mul_pd(_ai_0_1, _br_0_2));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+2, _c_1_2);\n        }\n        else {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _a_0_1 = _mm_load1_pd((pa+2));\n                _ai_0_1 = _mm_load1_pd((pa+2)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _c_1_0 = _mm_addsub_pd(_c_1_0, _mm_mul_pd(_ai_0_1, _br_0_0));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+1)*dimj*2+0, _c_1_0);\n        }\n    }\n    for (; i+1<=dimi ; i+=1) {\n        const double* __restrict__ xb = b;\n        double* __restrict__ xc = c;\n        for (j=dimj; j>7; j-=7,xc+=7*2,xb+=7*2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _br_0_6 = _mm_loadr_pd((pb+6));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_0_6 = _mm_addsub_pd(_c_0_6, _mm_mul_pd(_ai_0_0, _br_0_6));\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _br_0_8 = _mm_loadr_pd((pb+8));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm_addsub_pd(_c_0_8, _mm_mul_pd(_ai_0_0, _br_0_8));\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _br_0_10 = _mm_loadr_pd((pb+10));\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_0_10 = _mm_addsub_pd(_c_0_10, _mm_mul_pd(_ai_0_0, _br_0_10));\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _br_0_12 = _mm_loadr_pd((pb+12));\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_0_12 = _mm_addsub_pd(_c_0_12, _mm_mul_pd(_ai_0_0, _br_0_12));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+12, _c_0_12);\n        }\n        if (j>6) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _br_0_6 = _mm_loadr_pd((pb+6));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_0_6 = _mm_addsub_pd(_c_0_6, _mm_mul_pd(_ai_0_0, _br_0_6));\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _br_0_8 = _mm_loadr_pd((pb+8));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm_addsub_pd(_c_0_8, _mm_mul_pd(_ai_0_0, _br_0_8));\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _br_0_10 = _mm_loadr_pd((pb+10));\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_0_10 = _mm_addsub_pd(_c_0_10, _mm_mul_pd(_ai_0_0, _br_0_10));\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _br_0_12 = _mm_loadr_pd((pb+12));\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_0_12 = _mm_addsub_pd(_c_0_12, _mm_mul_pd(_ai_0_0, _br_0_12));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+12, _c_0_12);\n        }\n        else if (j>5) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _br_0_6 = _mm_loadr_pd((pb+6));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_0_6 = _mm_addsub_pd(_c_0_6, _mm_mul_pd(_ai_0_0, _br_0_6));\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _br_0_8 = _mm_loadr_pd((pb+8));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm_addsub_pd(_c_0_8, _mm_mul_pd(_ai_0_0, _br_0_8));\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _br_0_10 = _mm_loadr_pd((pb+10));\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_0_10 = _mm_addsub_pd(_c_0_10, _mm_mul_pd(_ai_0_0, _br_0_10));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+10, _c_0_10);\n        }\n        else if (j>4) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _br_0_6 = _mm_loadr_pd((pb+6));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_0_6 = _mm_addsub_pd(_c_0_6, _mm_mul_pd(_ai_0_0, _br_0_6));\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _br_0_8 = _mm_loadr_pd((pb+8));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_0_8 = _mm_addsub_pd(_c_0_8, _mm_mul_pd(_ai_0_0, _br_0_8));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+8, _c_0_8);\n        }\n        else if (j>3) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _br_0_6 = _mm_loadr_pd((pb+6));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_0_6 = _mm_addsub_pd(_c_0_6, _mm_mul_pd(_ai_0_0, _br_0_6));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+6, _c_0_6);\n        }\n        else if (j>2) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _br_0_4 = _mm_loadr_pd((pb+4));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_0_4 = _mm_addsub_pd(_c_0_4, _mm_mul_pd(_ai_0_0, _br_0_4));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+4, _c_0_4);\n        }\n        else if (j>1) {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _br_0_2 = _mm_loadr_pd((pb+2));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_0_2 = _mm_addsub_pd(_c_0_2, _mm_mul_pd(_ai_0_0, _br_0_2));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(xc+(i+0)*dimj*2+2, _c_0_2);\n        }\n        else {\n            const double* __restrict__ pb = xb;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi*2) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _ai_0_0 = _mm_load1_pd((pa+0)+1);\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _br_0_0 = _mm_loadr_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_0_0 = _mm_addsub_pd(_c_0_0, _mm_mul_pd(_ai_0_0, _br_0_0));\n            }\n            _mm_storeu_pd(xc+(i+0)*dimj*2+0, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/sse_cr.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double complex * __restrict__ c_x, const double complex * __restrict__ a_x, const double  * __restrict__ b_x) {\n    int i, j, k, ii;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    __m128d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11;\n    __m128d _a_0_0, _a_0_1;\n     __m128d _az_0_0, _az_0_1;\n     __m128d _bz_0_0, _bz_0_1, _bz_0_2, _bz_0_3, _bz_0_4, _bz_0_5, _bz_0_6, _bz_0_7, _bz_0_8, _bz_0_9, _bz_0_10, _bz_0_11;\n    for (j=dimj; j>6; j-=6,c+=6*2,b+=6) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _az_0_1 = _mm_loadu_pd((pa+2));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_1), _c_1_2);\n                _bz_0_4 = _mm_load1_pd((pb+2));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_1), _c_1_4);\n                _bz_0_6 = _mm_load1_pd((pb+3));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_1), _c_1_6);\n                _bz_0_8 = _mm_load1_pd((pb+4));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_bz_0_8, _az_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_bz_0_8, _az_0_1), _c_1_8);\n                _bz_0_10 = _mm_load1_pd((pb+5));\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_bz_0_10, _az_0_0), _c_0_10);\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_bz_0_10, _az_0_1), _c_1_10);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj*2+8, _c_1_8);\n            _mm_storeu_pd(c+(i+1)*dimj*2+10, _c_1_10);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _bz_0_4 = _mm_load1_pd((pb+2));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _bz_0_6 = _mm_load1_pd((pb+3));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_0), _c_0_6);\n                _bz_0_8 = _mm_load1_pd((pb+4));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_bz_0_8, _az_0_0), _c_0_8);\n                _bz_0_10 = _mm_load1_pd((pb+5));\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_bz_0_10, _az_0_0), _c_0_10);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj*2+10, _c_0_10);\n        }\n    }\n    if (j>5) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _az_0_1 = _mm_loadu_pd((pa+2));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_1), _c_1_2);\n                _bz_0_4 = _mm_load1_pd((pb+2));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_1), _c_1_4);\n                _bz_0_6 = _mm_load1_pd((pb+3));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_1), _c_1_6);\n                _bz_0_8 = _mm_load1_pd((pb+4));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_bz_0_8, _az_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_bz_0_8, _az_0_1), _c_1_8);\n                _bz_0_10 = _mm_load1_pd((pb+5));\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_bz_0_10, _az_0_0), _c_0_10);\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_bz_0_10, _az_0_1), _c_1_10);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj*2+8, _c_1_8);\n            _mm_storeu_pd(c+(i+1)*dimj*2+10, _c_1_10);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _bz_0_4 = _mm_load1_pd((pb+2));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _bz_0_6 = _mm_load1_pd((pb+3));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_0), _c_0_6);\n                _bz_0_8 = _mm_load1_pd((pb+4));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_bz_0_8, _az_0_0), _c_0_8);\n                _bz_0_10 = _mm_load1_pd((pb+5));\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_bz_0_10, _az_0_0), _c_0_10);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj*2+10, _c_0_10);\n        }\n    }\n    else if (j>4) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _az_0_1 = _mm_loadu_pd((pa+2));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_1), _c_1_2);\n                _bz_0_4 = _mm_load1_pd((pb+2));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_1), _c_1_4);\n                _bz_0_6 = _mm_load1_pd((pb+3));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_1), _c_1_6);\n                _bz_0_8 = _mm_load1_pd((pb+4));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_bz_0_8, _az_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_bz_0_8, _az_0_1), _c_1_8);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj*2+8, _c_1_8);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _bz_0_4 = _mm_load1_pd((pb+2));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _bz_0_6 = _mm_load1_pd((pb+3));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_0), _c_0_6);\n                _bz_0_8 = _mm_load1_pd((pb+4));\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_bz_0_8, _az_0_0), _c_0_8);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n        }\n    }\n    else if (j>3) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _az_0_1 = _mm_loadu_pd((pa+2));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_1), _c_1_2);\n                _bz_0_4 = _mm_load1_pd((pb+2));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_1), _c_1_4);\n                _bz_0_6 = _mm_load1_pd((pb+3));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_1), _c_1_6);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+6, _c_1_6);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _bz_0_4 = _mm_load1_pd((pb+2));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _bz_0_6 = _mm_load1_pd((pb+3));\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_bz_0_6, _az_0_0), _c_0_6);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n        }\n    }\n    else if (j>2) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _az_0_1 = _mm_loadu_pd((pa+2));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_1), _c_1_2);\n                _bz_0_4 = _mm_load1_pd((pb+2));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_1), _c_1_4);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _bz_0_4 = _mm_load1_pd((pb+2));\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_bz_0_4, _az_0_0), _c_0_4);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n        }\n    }\n    else if (j>1) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _az_0_1 = _mm_loadu_pd((pa+2));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_1), _c_1_2);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _bz_0_2 = _mm_load1_pd((pb+1));\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_bz_0_2, _az_0_0), _c_0_2);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n        }\n    }\n    else {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _az_0_1 = _mm_loadu_pd((pa+2));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_1), _c_1_0);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i*2;\n            _c_0_0 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi*2) {\n                _az_0_0 = _mm_loadu_pd((pa+0));\n                _bz_0_0 = _mm_load1_pd((pb+0));\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_bz_0_0, _az_0_0), _c_0_0);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/sse_rc.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double complex * __restrict__ c_x, const double  * __restrict__ a_x, const double complex * __restrict__ b_x) {\n    int i, j, k, ii;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    __m128d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13;\n    __m128d _a_0_0, _a_0_1;\n    for (j=dimj; j>7; j-=7,c+=7*2,b+=7*2) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            _c_1_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_1), _c_1_10);\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_1_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(c+(i+0)*dimj*2+12, _c_0_12);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj*2+8, _c_1_8);\n            _mm_storeu_pd(c+(i+1)*dimj*2+10, _c_1_10);\n            _mm_storeu_pd(c+(i+1)*dimj*2+12, _c_1_12);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(c+(i+0)*dimj*2+12, _c_0_12);\n        }\n    }\n    if (j>6) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            _c_1_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_1), _c_1_10);\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_1_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(c+(i+0)*dimj*2+12, _c_0_12);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj*2+8, _c_1_8);\n            _mm_storeu_pd(c+(i+1)*dimj*2+10, _c_1_10);\n            _mm_storeu_pd(c+(i+1)*dimj*2+12, _c_1_12);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(c+(i+0)*dimj*2+12, _c_0_12);\n        }\n    }\n    else if (j>5) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_1), _c_1_10);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj*2+10, _c_0_10);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj*2+8, _c_1_8);\n            _mm_storeu_pd(c+(i+1)*dimj*2+10, _c_1_10);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj*2+10, _c_0_10);\n        }\n    }\n    else if (j>4) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj*2+8, _c_1_8);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj*2+8, _c_0_8);\n        }\n    }\n    else if (j>3) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+6, _c_1_6);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj*2+6, _c_0_6);\n        }\n    }\n    else if (j>2) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+4, _c_1_4);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj*2+4, _c_0_4);\n        }\n    }\n    else if (j>1) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+2, _c_1_2);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj*2+2, _c_0_2);\n        }\n    }\n    else {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n            _mm_storeu_pd(c+(i+1)*dimj*2+0, _c_1_0);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj*2,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj*2+0, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bests/sse_rr.cc",
    "content": "#include <immintrin.h>\n#include <complex.h>\n\nvoid mtxmq(long dimi, long dimj, long dimk, double  * __restrict__ c_x, const double  * __restrict__ a_x, const double  * __restrict__ b_x) {\n    int i, j, k, ii;\n    double * __restrict__ c = (double*)c_x;\n    const double * __restrict__ a = (double*)a_x;\n    const double * __restrict__ b = (double*)b_x;\n    __m128d _c_0_0, _c_0_1, _c_0_2, _c_0_3, _c_0_4, _c_0_5, _c_0_6, _c_0_7, _c_0_8, _c_0_9, _c_0_10, _c_0_11, _c_0_12, _c_0_13, _c_1_0, _c_1_1, _c_1_2, _c_1_3, _c_1_4, _c_1_5, _c_1_6, _c_1_7, _c_1_8, _c_1_9, _c_1_10, _c_1_11, _c_1_12, _c_1_13, _b_0_0, _b_0_1, _b_0_2, _b_0_3, _b_0_4, _b_0_5, _b_0_6, _b_0_7, _b_0_8, _b_0_9, _b_0_10, _b_0_11, _b_0_12, _b_0_13;\n    __m128d _a_0_0, _a_0_1;\n    for (j=dimj; j>14; j-=14,c+=14,b+=14) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            _c_1_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_1), _c_1_10);\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_1_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj+10, _c_0_10);\n            _mm_storeu_pd(c+(i+0)*dimj+12, _c_0_12);\n            _mm_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj+8, _c_1_8);\n            _mm_storeu_pd(c+(i+1)*dimj+10, _c_1_10);\n            _mm_storeu_pd(c+(i+1)*dimj+12, _c_1_12);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj+10, _c_0_10);\n            _mm_storeu_pd(c+(i+0)*dimj+12, _c_0_12);\n        }\n    }\n    if (j>12) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            _c_1_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_1), _c_1_10);\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n                _c_1_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_1), _c_1_12);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj+10, _c_0_10);\n            _mm_storeu_pd(c+(i+0)*dimj+12, _c_0_12);\n            _mm_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj+8, _c_1_8);\n            _mm_storeu_pd(c+(i+1)*dimj+10, _c_1_10);\n            _mm_storeu_pd(c+(i+1)*dimj+12, _c_1_12);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_0_12 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _b_0_12 = _mm_loadu_pd(pb+12);\n                _c_0_12 = _mm_add_pd(_mm_mul_pd(_b_0_12, _a_0_0), _c_0_12);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj+10, _c_0_10);\n            _mm_storeu_pd(c+(i+0)*dimj+12, _c_0_12);\n        }\n    }\n    else if (j>10) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            _c_1_10 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n                _c_1_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_1), _c_1_10);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj+10, _c_0_10);\n            _mm_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj+8, _c_1_8);\n            _mm_storeu_pd(c+(i+1)*dimj+10, _c_1_10);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_0_10 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _b_0_10 = _mm_loadu_pd(pb+10);\n                _c_0_10 = _mm_add_pd(_mm_mul_pd(_b_0_10, _a_0_0), _c_0_10);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm_storeu_pd(c+(i+0)*dimj+10, _c_0_10);\n        }\n    }\n    else if (j>8) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            _c_1_8 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n                _c_1_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_1), _c_1_8);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n            _mm_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj+6, _c_1_6);\n            _mm_storeu_pd(c+(i+1)*dimj+8, _c_1_8);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_0_8 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _b_0_8 = _mm_loadu_pd(pb+8);\n                _c_0_8 = _mm_add_pd(_mm_mul_pd(_b_0_8, _a_0_0), _c_0_8);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj+6, _c_0_6);\n            _mm_storeu_pd(c+(i+0)*dimj+8, _c_0_8);\n        }\n    }\n    else if (j>6) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            _c_1_6 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n                _c_1_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_1), _c_1_6);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj+6, _c_0_6);\n            _mm_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj+4, _c_1_4);\n            _mm_storeu_pd(c+(i+1)*dimj+6, _c_1_6);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_0_6 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _b_0_6 = _mm_loadu_pd(pb+6);\n                _c_0_6 = _mm_add_pd(_mm_mul_pd(_b_0_6, _a_0_0), _c_0_6);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+0)*dimj+6, _c_0_6);\n        }\n    }\n    else if (j>4) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            _c_1_4 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n                _c_1_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_1), _c_1_4);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n            _mm_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj+2, _c_1_2);\n            _mm_storeu_pd(c+(i+1)*dimj+4, _c_1_4);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_0_4 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _b_0_4 = _mm_loadu_pd(pb+4);\n                _c_0_4 = _mm_add_pd(_mm_mul_pd(_b_0_4, _a_0_0), _c_0_4);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+0)*dimj+4, _c_0_4);\n        }\n    }\n    else if (j>2) {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            _c_1_2 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n                _c_1_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_1), _c_1_2);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n            _mm_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n            _mm_storeu_pd(c+(i+1)*dimj+2, _c_1_2);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_0_2 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _b_0_2 = _mm_loadu_pd(pb+2);\n                _c_0_2 = _mm_add_pd(_mm_mul_pd(_b_0_2, _a_0_0), _c_0_2);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+0)*dimj+2, _c_0_2);\n        }\n    }\n    else {\n        for (i=0; i+2<=dimi ; i+=2) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            _c_1_0 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _a_0_1 = _mm_load1_pd((pa+1));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n                _c_1_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_1), _c_1_0);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n            _mm_storeu_pd(c+(i+1)*dimj+0, _c_1_0);\n        }\n        for (; i+1<=dimi ; i+=1) {\n            const double* __restrict__ pb = b;\n            const double* __restrict__ pa = a+i;\n            _c_0_0 = _mm_setzero_pd();\n            for (k=0; k<dimk; k+=1,pb+=dimj,pa+=dimi) {\n                _a_0_0 = _mm_load1_pd((pa+0));\n                _b_0_0 = _mm_loadu_pd(pb+0);\n                _c_0_0 = _mm_add_pd(_mm_mul_pd(_b_0_0, _a_0_0), _c_0_0);\n            }\n            _mm_storeu_pd(c+(i+0)*dimj+0, _c_0_0);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/bgq_results_parse.py",
    "content": "#!/usr/bin/env python3\n\nimport fileinput\n\nclass COLORS:\n    HEADER = '\\033[95m'\n    OKBLUE = '\\033[94m'\n    OKGREEN = '\\033[92m'\n    WARNING = '\\033[93m'\n    FAIL = '\\033[91m'\n    ENDC = '\\033[0m'\n\n    def disable(self):\n        self.HEADER = ''\n        self.OKBLUE = ''\n        self.OKGREEN = ''\n        self.WARNING = ''\n        self.FAIL = ''\n        self.ENDC = ''\n\n# [ (variant, pthreads, (shape, i, j, k), gflops), ]\n\ndef get_data():\n    results = []\n    variants = set()\n    tests = set()\n    pthreads = set()\n    for line in fileinput.input():\n        line = line.strip().replace('[', '').replace('pthreads]:', '').replace('(avg', 'avg').replace(':', '')[:-1].split()[:-6]\n        test = tuple([line[2]] + [int(x) for x in line[3:-1]])\n        gflops = float(line[-1])\n        results.append((line[0], int(line[1]), test, gflops))\n        variants.add(line[0])\n        tests.add(test)\n        pthreads.add(int(line[1]))\n    return (results, sorted(variants), sorted(pthreads), sorted(tests))\n\ndef print_best_per_benchmark(results):\n    best_avg, blas_avg, imp_avg = 0, 0, 0\n    for test in sorted(results):\n        best = max(results[test], key=lambda x: x[1])\n        best_avg += best[1]\n        color = COLORS.OKGREEN\n        print(color + '{:40}'.format(' '.join([str(x) for x in test])) + COLORS.ENDC, '{:40}{:6.2f}'.format(*best))\n    best_avg /= len(results)\n    print('{:40} {:40}{:6.2f}'.format('', 'average', best_avg))\n\ndef print_top_n_variants(results, n=10):\n    variants = {}\n    for test in results:\n        for variant, gflops in results[test]:\n            if variant not in variants:\n                variants[variant] = 0\n            variants[variant] += gflops / len(results)\n\n    topn = sorted(variants, key=lambda x: variants[x], reverse=True)[:n]\n    for x in topn:\n        print('{:40}{:6.2f}'.format(x, variants[x]))\n\n\nif __name__ == '__main__':\n    results, variants, pthreads, tests = get_data()\n    for pc in pthreads:\n        pcfilter = list(filter(lambda x: x[1] == pc, results))\n        for test in tests:\n            tfilter = sorted(filter(lambda x: x[2] == test, pcfilter), key=lambda x: x[3])\n            if tfilter:\n                print(pc, test, tfilter[-1][0], tfilter[-1][3])\n        avgs = {}\n        for variant in variants:\n            vfilter = list(filter(lambda x: x[0] == variant, pcfilter))\n            avg = sum(x[3] for x in vfilter)/len(vfilter)\n            avgs[variant] = avg\n        top = sorted(avgs, key=lambda x: avgs[x])[-5:][::-1]\n        for v in top:\n            print(pc, v, avgs[v])\n\n\n    #print(COLORS.HEADER + \"Best per benchmark:\" + COLORS.ENDC)\n    #print_best_per_benchmark(results)\n    #print(COLORS.HEADER + \"Top 10 Varaints:\" + COLORS.ENDC)\n    #print_top_n_variants(results)\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/codegen/__init__.py",
    "content": ""
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/codegen/bgqdriver.py",
    "content": "# TODO: MPI_Barrier(MPI_COMM_WORLD) around printf's\ndef _header(complex_c, complex_a, complex_b):\n    ret = \"\"\"\n#include <stdio.h>\n#include <hwi/include/bqc/A2_inlines.h>\n#include <math.h>\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n#include <unistd.h>\n#include <pthread.h>\n#include <mpi.h>\n#include <limits.h>\n#include <complex>\n\n#define NAPTIME 3\n#define MAX_POSIX_THREADS 64\n\ntypedef struct _pt_data {\n    int myid;\n    int total_threads;\n    uint64_t _tc;\n    struct _pt_data **args;\n    uint64_t tt;\n} pt_data;\n\nstatic pthread_t thread_pool[MAX_POSIX_THREADS];\npt_data *thread_args[MAX_POSIX_THREADS];\n\nstatic int mpi_size, mpi_rank;\nstatic int num_posix_threads;\npthread_barrier_t barr;\n\nvoid ran_fill(int n, double *a) {\n    while (n--) *a++ = ((double)rand())/RAND_MAX;\n}\n\ninline void start_timer(pt_data *pt) {\n    pt->_tc = GetTimeBase();\n}\n\ninline uint64_t stop_timer(pt_data *pt) {\n    return GetTimeBase() - pt->_tc;\n}\n\nvoid mtxm(long dimi, long dimj, long dimk, long extb,\n\"\"\" + \"double {} * c, const double {} * a, const double {} * b) {{\".format(complex_c, complex_a, complex_b) + \"\"\"\n    int i, j, k;\n    for (k=0; k<dimk; ++k) {\n        for (j=0; j<dimj; ++j) {\n            for (i=0; i<dimi; ++i) {\n                c[i*dimj+j] += a[k*dimi+i]*b[k*extb+j];\n            }\n        }\n    }\n}\n\"\"\"\n    return ret\n\ndef _tester(i, m, trans=False):\n    ret = \"\"\"\n    if (mpi_rank=={i}) {{\n        for (loop=0; loop<30; ++loop) {{\n            rc = pthread_barrier_wait(&barr);\n            if(rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {{\n                printf(\"Could not wait on barrier\\\\n\");\n                exit(-1);\n            }}\n\n            start_timer(pt);\n            {m}(ni,nj,nk,nj,c,a,b);\"\"\"\n    if trans:\n        ret += \"\"\"\n            {m}(ni,nj,nk,nj,a,c,b);\n            {m}(ni,nj,nk,nj,c,a,b);\"\"\"\n    ret += \"\"\"\n            uint64_t tt = stop_timer(pt);\n            pt->tt += tt;\n        }}\n        pt->tt /= 30;\n\n        rc = pthread_barrier_wait(&barr);\n        if(rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {{\n            printf(\"Could not wait on barrier\\\\n\");\n            exit(-1);\n        }}\n\n        if (pt->myid == 0) {{\n            uint64_t maxtt = 0; // longest time\n            uint64_t mintt = ULONG_MAX; // shortest time\n            uint64_t sumtt = 0;\n\n            int i;\n            for (i=0; i<pt->total_threads; i++) {{\n                uint64_t itt;\n                itt = pt->args[i]->tt;\n                maxtt = maxtt > itt ? maxtt : itt;\n                mintt = mintt < itt ? mintt : itt;\n                sumtt += itt;\n            }}\n\n            double avgtt = (double)sumtt/(double)i;\n            printf(\"{m} [%2d pthreads]: %20s %3ld %3ld %3ld %8.2f (avg: %8.2f min: %llu max: %llu)\\\\n\", pt->total_threads, s, ni, nj, nk, nflop/maxtt, avgtt, mintt, maxtt);\n        }}\n\n        rc = pthread_barrier_wait(&barr);\n        if(rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {{\n            printf(\"Could not wait on barrier\\\\n\");\n            exit(-1);\n        }}\n    }}\"\"\"\n    return ret.format(i=i, m=m)\n\ndef _timer(mtxms, complex_c, complex_a, complex_b):\n    ret = \"\"\"void timer(pt_data *pt, const char* s, long ni, long nj, long nk, double {} *a, double {} *b, double {} *c) {{\n    double fastest = 0.0;\n    double nflop = 2.0{}{}*ni*nj*nk*(pt->total_threads);\n    long loop;\n    int rc;\n    pt->tt = 0;\n\"\"\".format(complex_a, complex_b, complex_c, complex_a and \"*2.0\", complex_b and \"*2.0\")\n\n    for i, m in enumerate(mtxms):\n        ret += _tester(i, m)\n\n    ret += \"}\\n\"\n    return ret\n\ndef _transtimer(mtxms, complex_c, complex_a, complex_b):\n    ret = \"\"\"void trantimer(pt_data *pt, const char* s, long ni, long nj, long nk, double {} *a, double {} *b, double {} *c) {{\n    double fastest = 0.0;\n    double nflop = 3.0*2.0{}{}*ni*nj*nk*(pt->total_threads);\n    long loop;\n    int rc;\n    pt->tt = 0;\n\"\"\".format(complex_a, complex_b, complex_c, complex_a and \"*2.0\", complex_b and \"*2.0\")\n\n    for i, m in enumerate(mtxms):\n        ret += _tester(i, m, True)\n\n    ret += \"}\\n\"\n    return ret\n\ndef _main(mtxms, complex_c, complex_a, complex_b):\n    ret = \"\"\"void* entry(void* arg) {{\n    pt_data *pt = (pt_data*)arg;\n\n    const long nimax=30*30;\n    const long njmax=100;\n    const long nkmax=100;\n    long ni, nj, nk, i, m;\n\n    double {ca} *a;\n    double {cb} *b;\n    double {cc} *c;\n    double {cc} *d;\n\n    posix_memalign((void **) &a, 32, nkmax*nimax*sizeof(double {ca}));\n    posix_memalign((void **) &b, 32, nkmax*njmax*sizeof(double {cb}));\n    posix_memalign((void **) &c, 32, nimax*njmax*sizeof(double {cc}));\n    posix_memalign((void **) &d, 32, nimax*njmax*sizeof(double {cc}));\n\n    ran_fill(nkmax*nimax{cax}, (double*)a);\n    ran_fill(nkmax*njmax{cbx}, (double*)b);\n\n    if (pt->total_threads == 1) {{\n        for (ni=2; ni<60; ni+=2) {{\n            for (nj=2; nj<100; nj+=6) {{\n                for (nk=2; nk<100; nk+=6) {{\n                    for (i=0; i<ni*nj; ++i) d[i] = c[i] = 0.0;\n                    mtxm(ni,nj,nk,nj,c,a,b);\n\"\"\"\n    for i, f in enumerate(mtxms):\n        ret += \"                    if (mpi_rank=={}) {}(ni,nj,nk,nj,d,a,b);\\n\".format(i, f)\n    ret += \"\"\"\n                    for (i=0; i<ni*nj; ++i) {{\n                        double err = abs(d[i]-c[i]);\n                        if (err > 1e-{error}) {{\n\"\"\"\n    for i, f in enumerate(mtxms):\n        ret += \"\"\"                            if (mpi_rank=={}) fprintf(stderr, \"{} error %d: %ld %ld %ld %e\\\\n\",mpi_rank,ni,nj,nk,err);\\n\"\"\".format(i, f)\n    ret += \"\"\"\n                        }}\n                    }}\n                }}\n            }}\n        }}\n    }}\n\n    for (ni=2; ni<60; ni+=2) timer(pt, \"(m*m)T*(m*m)\", ni,ni,ni,a,b,c);\n    for ( m=2; m<=30;  m+=2) timer(pt, \"(m*m,m)T*(m*m)\", m*m,m,m,a,b,c);\n\"\"\"\n    if (complex_a and complex_b) or (not complex_a and not complex_b):\n        ret += \"\"\"    for ( m=2; m<=30;  m+=2) trantimer(pt, \"tran(m,m,m)\", m*m,m,m,a,b,c);\\n\"\"\"\n    ret += \"\"\"\n    for ( m=2; m<=20;  m+=2) timer(pt, \"(20*20,20)T*(20,m)\", 20*20,m,20,a,b,c);\n\n    free(a);\n    free(b);\n    free(c);\n    free(d);\n\n    return NULL;\n}}\n\nint main(int argc, char *argv[]) {{\n    int i, rc;\n    int provided;\n\n    MPI_Init_thread(&argc,&argv,MPI_THREAD_MULTIPLE,&provided);\n    assert(provided == MPI_THREAD_MULTIPLE);\n\n    MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);\n    MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);\n\n    srand(argc > 42 ? argc : 1);\n\n    for (num_posix_threads = 1; num_posix_threads <= MAX_POSIX_THREADS; num_posix_threads*=2) {{\n        MPI_Barrier(MPI_COMM_WORLD);\n\n        for (i=0; i<num_posix_threads; i++) {{\n            thread_args[i] = (pt_data*)malloc(sizeof(pt_data));\n            thread_args[i]->myid = i;\n            thread_args[i]->total_threads = num_posix_threads;\n            thread_args[i]->args = thread_args;\n        }}\n\n        if(pthread_barrier_init(&barr, NULL, num_posix_threads)) {{\n            printf(\"Could not create a barrier\\\\n\");\n            return -1;\n        }}\n\n        for (i=0 ; i<num_posix_threads ; i++) {{\n            rc = pthread_create(&thread_pool[i], NULL, entry, thread_args[i]);\n            assert(rc==0);\n        }}\n\n        sleep(NAPTIME);\n\n        for (i=0 ; i<num_posix_threads ; i++) {{\n            rc = pthread_join(thread_pool[i],NULL);\n            assert(rc==0);\n        }}\n\n        MPI_Barrier(MPI_COMM_WORLD);\n\n        for (i=0; i<num_posix_threads; i++) {{\n            free(thread_args[i]);\n        }}\n    }}\n\n    MPI_Barrier(MPI_COMM_WORLD);\n\n    MPI_Finalize();\n\n    return 0;\n}}\"\"\"\n    return ret.format(ca=complex_a, cb=complex_b, cc=complex_c, \n            cax=(complex_a and \"*2\"), cbx=(complex_b and \"*2\"), \n            error=(complex_c and \"12\" or \"14\"))\n\ndef tester_gen_bgq(f, mtxmspecs, mtxm_gen, complex_a, complex_b):\n    r = lambda x: x.replace(\"double complex\", \"__complex__ double\")\n    complex_c = (complex_a or complex_b) and \"complex\" or \"\"\n    complex_a = complex_a and \"complex\" or \"\"\n    complex_b = complex_b and \"complex\" or \"\"\n    print(r(_header(complex_c, complex_a, complex_b)), file=f)\n    for mtxm in mtxmspecs:\n        mtxm_gen(f, *mtxm)\n    mtxms = [x[-1] for x in mtxmspecs]\n    print(r(_timer(mtxms, complex_c, complex_a, complex_b)), file=f)\n    if not (bool(complex_a) ^ bool(complex_b)):\n        print(r(_transtimer(mtxms, complex_c, complex_a, complex_b)), file=f)\n    print(r(_main(mtxms, complex_c, complex_a, complex_b)), file=f)\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/codegen/driver.py",
    "content": "def _tester(i, m, trans=False):\n    ret = \"\"\"\n    if (myid=={i}) {{\n#ifdef HAVE_BGP\n        HPM_Start(\"{m}\");\n#endif\n        for (loop=0; loop<30; ++loop) {{\n            double rate;\n            start_timer();\n            {m}(ni,nj,nk,c,a,b);\"\"\"\n    if trans:\n        ret += \"\"\"\n            {m}(ni,nj,nk,a,c,b);\n            {m}(ni,nj,nk,c,a,b);\"\"\"\n    ret +=\"\"\"\n            unsigned long long tt = stop_timer();\n            rate = nflop/tt;\n            if (rate > fastest) fastest = rate;\n        }}\n\n#ifdef HAVE_BGP\n        HPM_Stop(\"{m}\");\n        MPI_Barrier(MPI_COMM_WORLD);\n#endif\n        printf(\"{m}: %20s %3ld %3ld %3ld %8.2f\\\\n\", s, ni, nj, nk, fastest);\n#ifdef HAVE_BGP\n        MPI_Barrier(MPI_COMM_WORLD);\n#endif\n    }}\n\"\"\"\n    return ret.format(i=i, m=m)\n\n\ndef _timer(mtxms, complex_c, complex_a, complex_b):\n    ret = \"\"\"void timer(const char* s, long ni, long nj, long nk, double {} *a, double {} *b, double {} *c) {{\n    double fastest = 0.0;\n    double nflop = 2.0{}{}*ni*nj*nk;\n    long loop;\n\"\"\".format(complex_a, complex_b, complex_c, complex_a and \"*2.0\", complex_b and \"*2.0\")\n\n    for i, m in enumerate(mtxms):\n        ret += _tester(i, m)\n\n    ret += \"}\\n\"\n    return ret\n\n\ndef _transtimer(mtxms, complex_c, complex_a, complex_b):\n    ret = \"\"\"void trantimer(const char* s, long ni, long nj, long nk, double {} *a, double {} *b, double {} *c) {{\n    double fastest = 0.0;\n    double nflop = 3.0*2.0{}{}*ni*nj*nk;\n    long loop;\n\"\"\".format(complex_a, complex_b, complex_c, complex_a and \"*2.0\", complex_b and \"*2.0\")\n\n    for i, m in enumerate(mtxms):\n        ret += _tester(i, m, True)\n\n    ret += \"}\\n\"\n    return ret\n\n\ndef _header(bg, complex_c, complex_a, complex_b):\n    ret = \"\"\n    if bg:\n        ret += \"#define HAVE_BGP 1\\n\"\n    ret += \"\"\"#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <math.h>\n\n#ifdef HAVE_BGP\n#include <builtins.h>\n#include <complex>\n\n#include \"mpi.h\"\n\nextern \"C\" void HPM_Init(void);           // initialize the UPC unit\nextern \"C\" void HPM_Start(char *label);   // start counting in a block marked by the label\nextern \"C\" void HPM_Stop(char *label);    // stop counting in a block marked by the label\nextern \"C\" void HPM_Print(void);          // print counters for all blocks\nextern \"C\" void HPM_Print_Flops(void);\n\n#else\n\n#include <time.h>\n#include <immintrin.h>\n#include <complex.h>\n\n#endif\n\nint numprocs, myid;\n\ndouble ran()\n{\n    static unsigned long seed = 76521;\n    seed = seed *1812433253 + 12345;\n    return ((double) (seed & 0x7fffffff)) * 4.6566128752458e-10;\n}\n\nvoid ran_fill(int n, double *a) {\n    while (n--) *a++ = ran();\n}\n\nvoid mtxm(long dimi, long dimj, long dimk,\n    \"\"\" + \"double {} * c, const double {} * a, const double {} * b)\".format(complex_c, complex_a, complex_b) + \"\"\" {\n    int i, j, k;\n    for (k=0; k<dimk; ++k) {\n        for (j=0; j<dimj; ++j) {\n            for (i=0; i<dimi; ++i) {\n                c[i*dimj+j] += a[k*dimi+i]*b[k*dimj+j];\n            }\n        }\n    }\n}\n\nunsigned long long _ts;\n\n#if HAVE_BGP \n\nstatic __inline__ unsigned long long rdtsc(void)\n{\n  unsigned long long int result=0;\n  unsigned long int upper, lower,tmp;\n  __asm__ volatile(\n                \"0:            \"\n                \"mftbu   %0    \"\n                \"mftb    %1    \"\n                \"mftbu   %2    \"\n                \"cmpw    %2,%0 \"\n                \"bne     0b    \"\n                : \"=r\"(upper),\"=r\"(lower),\"=r\"(tmp)\n                );\n  result = upper;\n  result = result<<32;\n  result = result|lower;\n\n  return(result);\n}\n\n#else\n\nstatic __inline__ unsigned long long rdtsc(void)\n{\n    unsigned long long int x;\n    __asm__ volatile (\"rdtsc; shlq $32, %%rdx; orq %%rdx, %0\" : \"=a\" (x) : : \"rdx\");\n    return x;\n}\n\n#endif\n\ninline void start_timer() {\n    _ts = rdtsc();\n}\n\ninline unsigned long long stop_timer() {\n    return rdtsc() - _ts;\n}\n\"\"\"\n    return ret\n\ndef _main(mtxms, complex_c, complex_a, complex_b):\n    ret = \"\"\"int main(int argc, char **argv) {\n    const long nimax=30*30;\n    const long njmax=100;\n    const long nkmax=100;\n    long ni, nj, nk, i, m;\n\n    \"\"\" + \"double {} *a;\".format(complex_a) + \"\"\"\n    \"\"\" + \"double {} *b;\".format(complex_b) + \"\"\"\n    \"\"\" + \"double {} *c;\".format(complex_c) + \"\"\"\n    \"\"\" + \"double {} *d;\".format(complex_c) + \"\"\"\n\n#ifdef HAVE_BGP\n    MPI_Init(&argc, &argv);\n\n    MPI_Comm_size(MPI_COMM_WORLD,&numprocs);\n    MPI_Comm_rank(MPI_COMM_WORLD,&myid);\n\n    HPM_Init();\n#else\n    numprocs = 1;\n    myid = 0;\n#endif\n\n    posix_memalign((void **) &a, 16, nkmax*nimax*sizeof(double \"\"\" + complex_a + \"\"\"));\n    posix_memalign((void **) &b, 16, nkmax*njmax*sizeof(double \"\"\" + complex_b + \"\"\"));\n    posix_memalign((void **) &c, 16, nimax*njmax*sizeof(double \"\"\" + complex_c + \"\"\"));\n    posix_memalign((void **) &d, 16, nimax*njmax*sizeof(double \"\"\" + complex_c + \"\"\"));\n\n    ran_fill(nkmax*nimax\"\"\" + (complex_a and \"*2\") + \"\"\", (double*)a);\n    ran_fill(nkmax*njmax\"\"\" + (complex_a and \"*2\") + \"\"\", (double*)b);\n\n    for (ni=2; ni<60; ni+=2) {\n        for (nj=2; nj<100; nj+=6) {\n            for (nk=2; nk<100; nk+=6) {\n                for (i=0; i<ni*nj; ++i) d[i] = c[i] = 0.0;\n                mtxm(ni,nj,nk,c,a,b);\n\"\"\"\n    for i, f in enumerate(mtxms):\n        ret += \"                if (myid == {}) {}(ni,nj,nk,d,a,b);\\n\".format(i, f)\n    ret += \"\"\"\n                for (i=0; i<ni*nj; ++i) {\n                    double err = \"\"\" + (complex_c and \"c\" or \"f\") + \"\"\"abs(d[i]-c[i]);\n                    if (err > 1e-\"\"\" + (complex_c and \"12\" or \"14\") +\"\"\") {\n\"\"\"\n    for i, f in enumerate(mtxms):\n        ret += \"\"\"                        if (myid == {}) fprintf(stderr, \"{} error %d: %ld %ld %ld %e\\\\n\",myid,ni,nj,nk,err);\\n\"\"\".format(i, f)\n    ret += \"\"\"\n                    }\n                }\n            }\n        }\n    }\n#ifdef HAVE_BGP\n    MPI_Barrier(MPI_COMM_WORLD);\n#endif\n\n    for (ni=2; ni<60; ni+=2) timer(\"(m*m)T*(m*m)\", ni,ni,ni,a,b,c);\n    for ( m=2; m<=30;  m+=2) timer(\"(m*m,m)T*(m*m)\", m*m,m,m,a,b,c);\n    \"\"\" + ((not (bool(complex_a) ^ bool(complex_b))) and \"\"\"for ( m=2; m<=30;  m+=2) trantimer(\"tran(m,m,m)\", m*m,m,m,a,b,c);\"\"\" or \"\") + \"\"\"\n    for ( m=2; m<=20;  m+=2) timer(\"(20*20,20)T*(20,m)\", 20*20,m,20,a,b,c);\n\n#ifdef HAVE_BGP\n    HPM_Print();\n    HPM_Print_Flops();\n\n    MPI_Finalize();\n#endif\n\n    return 0;\n}\"\"\"\n    return ret\n\ndef tester_gen(f, mtxmspecs, mtxm_gen, complex_a=False, complex_b=False, bg=True):\n    r = lambda x: x\n    if bg:\n        r = lambda x: x.replace(\"double complex\", \"__complex__ double\").replace(\"cabs\", \"abs\")\n    complex_c = (complex_a or complex_b) and \"complex\" or \"\"\n    complex_a = complex_a and \"complex\" or \"\"\n    complex_b = complex_b and \"complex\" or \"\"\n    print(r(_header(bg, complex_c, complex_a, complex_b)), file=f)\n    for mtxm in mtxmspecs:\n        mtxm_gen(f, *mtxm)\n    mtxms = [x[-1] for x in mtxmspecs]\n    print(r(_timer(mtxms, complex_c, complex_a, complex_b)), file=f)\n    if not (bool(complex_a) ^ bool(complex_b)):\n        print(r(_transtimer(mtxms, complex_c, complex_a, complex_b)), file=f)\n    print(r(_main(mtxms, complex_c, complex_a, complex_b)), file=f)\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/codegen/mtxm.py",
    "content": "\"\"\" Codegen for mtxm\n\nA   I\n  +-------------+\nK | a b ....... |\n  |     ...     |\n  +-------------+\n\nB   J\n  +-------------+\nK | i j k l ... |\n  |     ...     |\n  +-------------+\n\nC   J\n  +-------------+\nI | w x y z ... |\n  |     ...     |\n  +-------------+\n\n# Complex Complex\nw += a i - b j\nx += a j + b i\ny += a k - b l\nz += a l + b k\n\ntemps: _c += _a _b +- _ai _br\n\n\n# Real Complex\nw += a i\nx += a j\ny += a k\nz += a l\n\ntemps: _c += _a _b ; doubled dimj\n\n\n# Complex Real\nw += a i\nx += b i\ny += a j\nz += b j\n\ntemps: _c += _az _bz\n\n\n# Real Real\nw += a i\nx += a j\ny += a k\nz += a l\n\ntemps: _c += _a _b\n\"\"\"\n\nfrom itertools import product\nimport logging\nlogger = logging.getLogger(__name__)\n\nclass MTXMGen:\n    def __init__(self, cxa=False, cxb=False):\n        self.indent = 4\n        self.__in_main_loop = False\n        self._mask = False\n        self._odds = [1]\n        self.have_bgp = False\n        self.have_bgq = False\n        self.have_avx2 = False\n        self.complex_a = cxa\n        self.complex_b = cxb\n        self.complex_dup_cast = ''\n\n    @property\n    def complex_c(self):\n        return self.complex_a or self.complex_b\n\n    @property\n    def complex_complex(self):\n        return self.complex_a and self.complex_b\n\n    @property\n    def real_complex(self):\n        return not self.complex_a and self.complex_b\n\n    @property\n    def complex_real(self):\n        return self.complex_a and not self.complex_b\n\n    @property\n    def real_real(self):\n        return not self.complex_a and not self.complex_b\n\n    def _temp(self, prefix, x, y):\n        return prefix + '_' + str(x) + '_' + str(y)\n\n    def _temps(self, prefix, x, y, size):\n        \"\"\"\n        >>> list(MTXMGen()._temps('_x', 'i', 'j', {'i':2, 'j':3}))\n        ['_x_0_0', '_x_0_1', '_x_0_2', '_x_1_0', '_x_1_1', '_x_1_2']\n        \"\"\"\n        return [self._temp(prefix, i, j) for i, j in product(range(size[x]), range(size[y]))]\n\n    def _post_process(self, lines):\n        return lines\n\n    def _header(self, func_name):\n        f = lambda x: x and \"complex\" or \"\"\n        x2 = lambda x: x and \"*2\" or \"\"\n        if self.have_bgq:\n            ret = [\"void \" + func_name + \"(long dimi, long dimj, long dimk, long extb, double {} * __restrict__ c_x, const double {} * __restrict__ a_x, const double {} * __restrict__ b_x) {{\".format(f(self.complex_c), f(self.complex_a), f(self.complex_b))]\n        else:\n            ret = [\"void \" + func_name + \"(long dimi, long dimj, long dimk, double {} * __restrict__ c_x, const double {} * __restrict__ a_x, const double {} * __restrict__ b_x) {{\".format(f(self.complex_c), f(self.complex_a), f(self.complex_b))]\n        ret.append(\"    int i, j, k;\")\n        ret.append(\"    double * __restrict__ c = (double*)c_x;\")\n        ret.append(\"    const double * __restrict__ a = (double*)a_x;\")\n        ret.append(\"    const double * __restrict__ b = (double*)b_x;\")\n        ret.append(\"    long effj = dimj;\")\n        if self.have_bgq:\n            ret.append(\"    double * c_buf;\")\n            ret.append(\"    double * b_buf;\")\n            ret.append(\"    bool free_b = false;\")\n            ret.append(\"    /* Setup a buffer for c if needed */\")\n            ret.append(\"    double* c_out = c;\")\n            ret.append(\"    if (dimj%{}) {{\".format(self.complex_c and 2 or 4))\n            ret.append(\"        effj = (dimj | {}) + 1;\".format(self.complex_c and 1 or 3))\n            ret.append(\"        posix_memalign((void **) &c, 32, dimi*effj*sizeof(double){});\".format(x2(self.complex_c)))\n            ret.append(\"        c_buf = c;\")\n            ret.append(\"    }\")\n            ret.append(\"    /* Copy b into a buffer if needed */\")\n            ret.append(\"    if (extb%{}) {{\".format(self.complex_b and 2 or 4))\n            ret.append(\"        long t_extb = (dimj | {}) + 1;\".format(self.complex_b and 1 or 3))\n            ret.append(\"        free_b = true;\")\n            ret.append(\"        posix_memalign((void **) &b_buf, 32, dimk*t_extb*sizeof(double){});\".format(x2(self.complex_b)))\n            ret.append(\"        double* bp = b_buf;\")\n            ret.append(\"        for (k=0; k<dimk; k++, bp += t_extb{0}, b += extb{0})\".format(x2(self.complex_b)))\n            ret.append(\"            memcpy(bp, b, sizeof(double)*dimj{});\".format(x2(self.complex_b)))\n            ret.append(\"        b = b_buf;\")\n            ret.append(\"        extb = t_extb;\")\n            ret.append(\"    }\")\n        return ret\n\n    def _footer(self):\n        x2 = lambda x: x and \"*2\" or \"\"\n        ret = []\n        if self.have_bgq:\n            ret.append(\"    /* Copy c out if needed */\")\n            ret.append(\"    if (dimj%{}) {{\".format(self.complex_c and 2 or 4))\n            ret.append(\"        double* ct = c_buf;\")\n            ret.append(\"        for (i=0; i<dimi; i++, ct += effj{0}, c_out += dimj{0})\".format(x2(self.complex_c)))\n            ret.append(\"            memcpy(c_out, ct, sizeof(double)*dimj{});\".format(x2(self.complex_c)))\n            ret.append(\"        free(c_buf);\")\n            ret.append(\"    }\")\n            ret.append(\"    /* Free the buffer for b */\")\n            ret.append(\"    if (free_b) free(b_buf);\")\n        ret.append(\"}\")\n        return ret\n\n    def _temp_dec(self, size):\n        ret = []\n        indent = '    '\n        x = indent + self.vector_type + ' '\n        x += ', '.join(self._temps('_c', 'i', 'j', size) +\n                self._temps('_b', 'k', 'j', size)) + ';'\n        ret.append(x)\n        x = indent + self.splat_type + ' ' + ', '.join(self._temps('_a', 'k', 'i', size)) + ';'\n        ret.append(x)\n        if self.complex_complex:\n            if not self.have_bgp and not self.have_bgq:\n                # BGP does not need seperate reversed registers because a special fma is used\n                x = \"{} {} {};\".format(indent, self.vector_type, ', '.join(self._temps('_br', 'k', 'j', size)))\n                ret.append(x)\n            if not self.have_bgq:\n                # Imaginary component of A\n                x = \"{} {} {};\".format(indent, self.splat_type, ', '.join(self._temps('_ai', 'k', 'i', size)))\n                ret.append(x)\n        elif self.complex_real:\n            # register from A: a b a b\n            x = \"{} {} {};\".format(indent, self.vector_type, ', '.join(self._temps('_az', 'k', 'i', size)))\n            ret.append(x)\n            # register from B: i i j j\n            x = \"{} {} {};\".format(indent, self.splat_type, ', '.join(self._temps('_bz', 'k', 'j', size)))\n            ret.append(x)\n        elif self.real_complex:\n            pass\n        return ret\n\n    def _extra(self):\n        return []\n\n    def _temps_to_load(self, unrolls, z, x, y, tname=None):\n        if not tname:\n            tname = '_'+z\n        ret = []\n        ystep = 1\n        if y == 'j':\n            ystep = self.vector_length\n        for i, j in product(range(unrolls[x]), range(0, unrolls[y], ystep)):\n            ret.append((self._temp(tname, i, j), i, j))\n        return ret\n\n    def _load_a(self, unrolls, indent):\n        spaces = ' ' * (self.indent*indent)\n        ret = []\n        for temp, k, i in self._temps_to_load(unrolls, 'a', 'k', 'i'):\n            addr = '(pa+' + str((self.complex_a and 2 or 1)*i) + ')'\n            if self.complex_real:\n                ret.append(self._load_az(spaces, addr, temp, k, i))\n            elif self.complex_complex and self.have_bgq:\n                ret.append(spaces + temp + \" = vec_ld2(0, {});\".format(addr))\n            else:\n                arg0 = ''\n                if self.have_bgq:\n                    arg0 = '0, '\n                ret.append(spaces + temp + ' = {}({}{});'.format(self.splat_op, arg0, addr))\n                if self.complex_complex:\n                    ret.append(spaces + self._temp('_ai', k, i) + ' = {}({}{}+1);'.format(self.splat_op, arg0, addr))\n        return ret\n\n    def _load_b(self, unrolls, indent):\n        spaces = ' ' * (self.indent*indent)\n        ret = []\n        for temp, k, j in self._temps_to_load(unrolls, 'b', 'k', 'j'):\n            arg0 = \"\"\n            if self.have_bgq:\n                arg0 = \"0, \"\n            addr = '({}pb+{})'.format(arg0, j // (self.complex_real and 2 or 1))\n            if self.complex_real:\n                ret.append(self._load_bz(spaces, addr, temp, k, j))\n            else:\n                ret.append(spaces + temp + ' = ' + self.vector_load + addr + ';')\n                if self.complex_complex and not self.have_bgp and not self.have_bgq:\n                    ret.append(self._load_br(spaces, addr, temp, k, j))\n        return ret\n\n    def _load_c(self, unrolls, indent):\n        spaces = ' ' * (self.indent*indent)\n        ret = []\n        for temp, i, j in self._temps_to_load(unrolls, 'c', 'i', 'j'):\n            ret.append(spaces + temp + ' = ' + self.vector_zero + ';')\n        return ret\n\n    def _load_br(self, spaces, addr, temp, k, j):\n        return spaces + self._temp('_br', k, j) + ' = {}({});'.format(self.complex_reverse_dup, addr)\n\n    def _load_az(self, spaces, addr, temp, k, i):\n        arg0 = ''\n        if self.have_bgq:\n            arg0 = '0, '\n        return spaces + self._temp('_az', k, i) + ' = {}({}{}{});'.format(self.complex_dup, arg0, self.complex_dup_cast, addr)\n\n    def _load_bz(self, spaces, addr, temp, k, j):\n        return spaces + self._temp('_bz', k, j) + ' = {}({});'.format(self.pair_splat, addr)\n\n    def _fma(self, at, bt, ct):\n        raise NotImplementedError()\n\n    def _fmaddsub(self, at, bt, ct):\n        raise NotImplementedError()\n\n    def _maths(self, unrolls, indent=0):\n        spaces = ' ' * (self.indent*indent)\n        ret = []\n        for j, i, k in product(range(0, unrolls['j'], self.vector_length), range(unrolls['i']), range(unrolls['k'])):\n            if self.real_real or self.real_complex:\n                at = self._temp('_a', k, i)\n                bt = self._temp('_b', k, j)\n                ct = self._temp('_c', i, j)\n                ret.append(spaces + self._fma(at, bt, ct))\n            elif self.complex_real:\n                at = self._temp('_az', k, i)\n                bt = self._temp('_bz', k, j)\n                ct = self._temp('_c', i, j)\n                ret.append(spaces + self._fma(at, bt, ct))\n            elif self.complex_complex:\n                if self.have_avx2:\n                    at = self._temp('_ai', k, i)\n                    bt = self._temp('_br', k, j)\n                    ct = self._temp('_c', i, j)\n                    ret.append(spaces + self._fmaddsub(at, bt, ct))\n                    at = self._temp('_a', k, i)\n                    bt = self._temp('_b', k, j)\n                    ret.append(spaces + self._fmaddsub(at, bt, ct))\n                else:\n                    at = self._temp('_a', k, i)\n                    bt = self._temp('_b', k, j)\n                    ct = self._temp('_c', i, j)\n                    ret.append(spaces + self._fma(at, bt, ct))\n                    if not self.have_bgq:\n                        at = self._temp('_ai', k, i)\n                        if not self.have_bgp:\n                            bt = self._temp('_br', k, j)\n                    ret.append(spaces + self._fmaddsub(at, bt, ct))\n        return ret\n\n    def _array(self, z, x, xx, y, yy, cpx):\n        if y == 'j':\n            y = \"effj\"\n        else:\n            y = \"dim\" + y\n\n        return z + '+(' + x + '+' + xx + ')*' + y + (cpx and \"*2\" or \"\") + '+' + yy\n\n    def _store_c(self, unrolls, indent, bc_mod=\"\"):\n        spaces = ' ' * (self.indent*indent)\n        ret = []\n        jstep = self.vector_length\n        for i, j in product(range(unrolls['i']), range(0, unrolls['j'], jstep)):\n            if j + jstep < unrolls['j'] or self.__in_main_loop or not self._mask:\n                arg0 = self._array(bc_mod+'c', 'i', str(i), 'j', str(j), self.complex_c)\n                arg1 = self._temp('_' + 'c', i, j)\n                mid = ', '\n                if self.have_bgq:\n                    arg0, arg1 = arg1, arg0\n                    mid = ', 0, '\n                ret.append(spaces + self.vector_store + '(' + arg0 + mid + arg1 + ');')\n            else:\n                # This is somewhat AVX specific, but no other arch's currently support masking, so ok.\n                ret.append(spaces + '{}('.format(self.mask_store) + self._array(bc_mod+'c', 'i', str(i), 'j', str(j), self.complex_c) + ', mask, ' + self._temp('_' + 'c', i, j) + ');')\n        return ret\n\n    def _loops(self, i, size, bc_mod=\"\"):\n        if i == 'i':\n            start = 'i=0'\n            #FIXME Don't include _odds if i%2==0 and only evens\n            loops = [size[i]]\n            if loops[-1] != 1:\n                loops += self._odds\n            if self.have_bgp:\n                loops = range(size[i], 0, -2)\n            for loop in loops:\n                yield ('for ({0}; i+{1}<=dimi; i+={1}) {{'.format(start, loop), loop)\n                start = ''\n        elif i == 'j':\n            loop = size[i] // (self.complex_c and 2 or 1)\n            self.__in_main_loop = True\n            yield (\"for (j=effj; j>{0}; j-={0},{1}c+={0}{2},{1}b+={0}{3}) {{\".format(loop, bc_mod, self.complex_c and \"*2\" or \"\", self.complex_b and \"*2\" or \"\"), size[i])\n            self.__in_main_loop = False\n            start = ''\n            for loop in range(size[i]-self.vector_length, 0, -self.vector_length):\n                yield (start + \"if (j>{}) {{\".format(loop//(self.complex_c and 2 or 1)), loop+self.vector_length)\n                start = 'else '\n            if size[i] == self.vector_length:\n                yield (\"{\", self.vector_length)\n            else:\n                yield (\"else {\", self.vector_length)\n        elif i == 'k':\n            assert(size[i] == 1)\n            pb_inc  = 'effj'\n            if self.have_bgq:\n                pb_inc = 'extb'\n            yield (\"for (k=0; k<dimk; k+=1,pb+={}{},pa+=dimi{}) {{\".format(pb_inc, self.complex_b and \"*2\" or \"\", self.complex_a and \"*2\" or \"\"), 1)\n\n    def _close_braces(self, indent=0):\n        ret = []\n        for i in range(indent, -1, -1):\n            ret += [' '*(self.indent*i) + '}']\n        return ret\n\n    def _inner_loops(self, perm, sizes, indent=0, unrolls=None, bc_mod=\"\"):\n        indent += 1\n        if not unrolls:\n            unrolls = {x:0 for x in perm}\n        ret = []\n        spaces = ' '*(self.indent*indent)\n\n        if perm == ['k']:\n            ret.append(spaces + \"const double* __restrict__ pb = {}b;\".format(bc_mod))\n            ret.append(spaces + \"const double* __restrict__ pa = a+i{};\".format(self.complex_a and \"*2\" or \"\"))\n            ret += self._load_c(unrolls, indent)\n\n        if perm == ['j', 'k']:\n            bc_mod = \"x\"\n            ret.append(spaces + \"const double* __restrict__ {}b = b;\".format(bc_mod))\n            ret.append(spaces + \"double* __restrict__ {}c = c;\".format(bc_mod))\n\n        for loop, unroll in self._loops(perm[0], sizes, bc_mod):\n            unrolls[perm[0]] = unroll\n            ret.append(spaces + loop)\n            if len(perm) > 1:\n                ret += self._inner_loops(perm[1:], sizes, indent, unrolls, bc_mod)\n            else:\n                ret += self._load_a(unrolls, indent+1)\n                b_loads = self._load_b(unrolls, indent+1)\n                maths = self._maths(unrolls, indent+1)\n                b_take = (self.complex_complex and not self.have_bgp and not self.have_bgq) and 2 or 1\n                m_take = unrolls['i']*(self.complex_complex and 2 or 1)\n                while b_loads:\n                    ret += b_loads[0:b_take]\n                    ret += maths[0:m_take]\n                    b_loads = b_loads[b_take:]\n                    maths = maths[m_take:]\n            ret.append(spaces + '}')\n\n        if perm == ['k']:\n            ret += self._store_c(unrolls, indent, bc_mod)\n\n        return ret\n\n    def gen(self, f, perm, size, func_name='mtxmq'):\n        \"\"\"Output generated code to file f\n\n        Input:\n            perm - an array of 'i', 'j', 'k' in the desired loop order\n            size - { index : int, }\n\n        Output:\n            None\n            Code printed to file f\n        \"\"\"\n\n        if type(perm) is not list:\n            perm = list(perm)\n\n        if perm[-1] != 'k':\n            raise Exception(\"k must be inner loop\")\n\n        lines = []\n\n        # Header\n        lines += self._header(func_name)\n\n        # Temps Declaration\n        lines += self._temp_dec(size)\n\n        # Architecture Specific declarations, e.g. mask prep\n        lines += self._extra()\n\n        # Computation\n        lines += self._inner_loops(perm, size)\n\n        # Footer\n        lines += self._footer()\n\n        lines = self._post_process(lines)\n\n        # Output\n        for line in lines:\n            print(line, file=f)\n\n\nclass MTXMAVX(MTXMGen):\n    def __init__(self, *args):\n        super().__init__(*args)\n        self.vector_length = 4\n\n        self.vector_type = '__m256d'\n        self.vector_load = '_mm256_loadu_pd'\n        self.vector_store = '_mm256_storeu_pd'\n        self.vector_zero = '_mm256_setzero_pd()'\n\n        self._mask = True\n        self.mask_store = '_mm256_maskstore_pd'\n\n        self.splat_type = '__m256d'\n        self.splat_op = '_mm256_broadcast_sd'\n\n        #self.complex_reverse_dup = '_mm256_permute_pd' # (_mm256_loadu_pd(addr), 5), could also use shuffle 5\n        self.complex_dup = '_mm256_broadcast_pd'\n        self.complex_dup_cast = '(const __m128d*)'\n        #self.pair_splat = ''\n\n    def _load_bz(self, spaces, addr, temp, k, j):\n        return spaces + self._temp('_bz', k, j) + ' = _mm256_permute_pd(_mm256_broadcast_pd((const __m128d*){}),12);'.format(addr)\n\n    def _load_br(self, spaces, addr, temp, k, j):\n        return spaces + self._temp('_br', k, j) + ' = _mm256_permute_pd({}, 5);'.format(temp)\n\n    def _fma(self, at, bt, ct):\n        return ct + ' = _mm256_add_pd(_mm256_mul_pd(' + bt + ', ' + at + '), ' + ct + ');'\n\n    def _fmaddsub(self, at, bt, ct):\n        return ct + ' = _mm256_addsub_pd(' + ct + ', _mm256_mul_pd(' + at + ', ' + bt + '));'\n\n    def _extra(self):\n        if self.real_real:\n            return [' ' * self.indent + \"\"\"\n    __m256i mask;\n    j = effj % 4;\n    switch (j) {\n        case 0:\n            mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n            break;\n        case 1:\n            mask = _mm256_set_epi32( 0, 0, 0, 0, 0, 0,-1,-1);\n            break;\n        case 2:\n            mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n            break;\n        case 3:\n            mask = _mm256_set_epi32( 0, 0,-1,-1,-1,-1,-1,-1);\n            break;\n        default:\n            return;\n    }\"\"\"]\n        else:\n            return [' ' * self.indent + \"\"\"\n    __m256i mask;\n    j = effj % 2;\n    switch (j) {\n        case 0:\n            mask = _mm256_set_epi32(-1,-1,-1,-1,-1,-1,-1,-1);\n            break;\n        case 1:\n            mask = _mm256_set_epi32( 0, 0, 0, 0,-1,-1,-1,-1);\n            break;\n        default:\n            return;\n    }\"\"\"]\n\nclass MTXMAVX2(MTXMAVX):\n    def __init__(self, *args):\n        super().__init__(*args)\n        self.have_avx2 = True\n\n    def _fma(self, at, bt, ct):\n        return ct + ' = _mm256_fmadd_pd(' + ','.join([at,bt,ct]) + ');'\n\n    def _fmaddsub(self, at, bt, ct):\n        return ct + ' = _mm256_fmaddsub_pd(' + ','.join([at,bt,ct]) + ');'\n\nclass MTXMSSE(MTXMGen):\n    def __init__(self, *args):\n        super().__init__(*args)\n        self.vector_length = 2\n\n        self.vector_type = '__m128d'\n        self.vector_load = '_mm_loadu_pd'\n        self.vector_store = '_mm_storeu_pd'\n        self.vector_zero = '_mm_setzero_pd()'\n\n        self.splat_type = '__m128d'\n        self.splat_op = '_mm_load1_pd'\n\n        self.complex_reverse_dup = '_mm_loadr_pd' # aligned only!\n        self.complex_dup = '_mm_loadu_pd'\n        self.pair_splat = '_mm_load1_pd'\n\n    def _fma(self, at, bt, ct):\n        return ct + ' = _mm_add_pd(_mm_mul_pd(' + bt + ', ' + at + '), ' + ct + ');'\n\n    def _fmaddsub(self, at, bt, ct):\n        return \"{2} = _mm_addsub_pd({2}, _mm_mul_pd({0}, {1}));\".format(at, bt, ct)\n\n\nclass MTXMBGP(MTXMGen):\n    def __init__(self, *args):\n        super().__init__(*args)\n        self.have_bgp = True\n        self.vector_length = 2\n\n        self.vector_type = '__complex__ double'\n        self.vector_load = '__lfpd'\n        self.vector_store = '__stfpd'\n        self.vector_zero = '__cmplx(0.0,0.0)'\n\n        self.splat_type = 'double'\n        self.splat_op = '*'\n\n        self.complex_reverse_dup = '__lfxd'\n        self.complex_dup = '__lfpd'\n        self.pair_splat = '*'\n\n    def _fma(self, at, bt, ct):\n        return ct + ' = __fxcpmadd(' + ct + ', ' + bt + ', ' + at + ');'\n\n    def _fmaddsub(self, at, bt, ct):\n        return ct + ' = __fxcxnpma(' + ct + ', ' + bt + ', ' + at + ');'\n\n    def _post_process(self, lines):\n        return [x.replace(\"__restrict__\", \"\").replace(\"const\", \"\").replace(\"double complex\", \"__complex__ double\") for x in lines]\n\nclass MTXMBGQ(MTXMGen):\n    def __init__(self, *args):\n        super().__init__(*args)\n        self.have_bgq = True\n        self.vector_length = 4\n\n        self.vector_type = 'vector4double'\n        self.vector_load = 'vec_ld'\n        self.vector_store = 'vec_st'\n        self.vector_zero = '(vector4double)(0.0)'\n\n        self.complex_dup = 'vec_ld2'\n\n        self.splat_type = 'vector4double'\n        self.splat_op = 'vec_lds'\n\n    def _load_bz(self, spaces, addr, temp, k, j):\n        t = self._temp('_bz', k, j)\n        ret = spaces + t + ' = vec_ld2{};\\n'.format(addr)\n        ret += spaces + t + ' = vec_perm({0}, {0}, _cr_perm);'.format(t)\n        return ret\n\n    def _fma(self, at, bt, ct):\n        if self.complex_complex:\n            return ct + ' = vec_xmadd(' + at + ', ' + bt + ', ' + ct + ');'\n        else:\n            return ct + ' = vec_madd(' + at + ', ' + bt + ', ' + ct + ');'\n\n    def _fmaddsub(self, at, bt, ct):\n        return ct + ' = vec_xxnpmadd(' + bt + ', ' + at + ', ' + ct + ');'\n\n    def _post_process(self, lines):\n        return [x.replace(\"__restrict__\", \"\").replace(\"const\", \"\").replace(\"double complex\", \"__complex__ double\") for x in lines]\n\n    def _extra(self):\n        if self.complex_real:\n            return [' ' * self.indent + \"vector4double _cr_perm = vec_gpci(0x9);\"]\n        else:\n            return []\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/main.py",
    "content": "#!/usr/bin/env python3\n\"\"\"Generate vectorized mtxm implementations.\"\"\"\n\nimport logging\nimport argparse\nimport sys\nfrom itertools import permutations, product\n\nfrom codegen.driver import tester_gen\nfrom codegen.bgqdriver import tester_gen_bgq\nfrom codegen.mtxm import *\n\n# TODO: call bgq version of tester gen if needed\n\ndef tester(m, versions):\n    \"\"\"Generate .cc files and Makefile to test correctness and\n    performance of versions\"\"\"\n    n = 1\n    with open(\"Makefile\", 'w') as mf:\n        if m.have_bgp:\n            print(\"\\tHPM=/soft/apps/UPC/lib/libhpm.a\", file=mf)\n            print(\"\\tCXX=tmpixlcxx_r\", file=mf)\n            print(\"\\tCXXFLAGS=-g -O3 -qarch=450d -qtune=450 -qthreaded\", file=mf)\n        elif m.have_bgq:\n            print(\"\\tCXX=/bgsys/drivers/ppcfloor/comm/xl/bin/mpixlcxx_r\", file=mf)\n            print(\"\\tCXXFLAGS=-I/bgsys/drivers/ppcfloor/ -O5 -qhot=level=1 -qsimd=auto -qtune=qp -qarch=qp\", file=mf)\n        else:\n            print(\"\\tCXX=g++\", file=mf)\n            march = \"ssse3\"\n            extra = ''\n            if type(m) == MTXMAVX:\n                march = \"avx\"\n            if type(m) == MTXMAVX2:\n                march = \"avx2\"\n                extra = \"-march=core-avx2\"\n            print(\"\\tCXXFLAGS=-O3 {} -m{} -lrt -lm\".format(extra, march), file=mf)\n        print(\"all:\", file=mf)\n\n        while versions:\n            bunch_size = 1\n            if m.have_bgp:\n                bunch_size = 64\n            elif m.have_bgq:\n                bunch_size = 128\n            cur, versions = versions[:bunch_size], versions[bunch_size:]\n            with open(\"tune_mtxm_{}.cc\".format(n), 'w') as f:\n                if m.have_bgq:\n                    tester_gen_bgq(f, cur, m.gen, m.complex_a, m.complex_b)\n                else:\n                    tester_gen(f, cur, m.gen, m.complex_a, m.complex_b, m.have_bgp)\n            print(\"\\t$(CXX) -c $(CXXFLAGS) tune_mtxm_{0}.cc -o tune_mtxm_{0}.o\".format(n), file=mf)\n            print(\"\\t$(CXX) $(CXXFLAGS) tune_mtxm_{0}.o $(HPM) -o tune_mtxm_{0}.x\".format(n), file=mf)\n            if m.have_bgq:\n                print(\"\\tqsub -A MADNESS_MPQC_esp -t 10 -n {0} --mode c1 --cwd `pwd` -O tune_mtxm_{1} ./tune_mtxm_{1}.x\".format(len(cur), n), file=mf)\n            n += 1\n\ndef main():\n    # Parse Arguments\n    parser = argparse.ArgumentParser(description='What does this program do?')\n    parser.add_argument('-l', '--log', dest='loglevel', default='ERROR',\n            help='log level to output (default: ERROR)')\n    parser.add_argument('--log-file', dest='logfile',\n            help='destination file to write logging output')\n    parser.add_argument('-a', '--complex-a', action='store_true', default=False,\n            help='A (left) matrix is complex', dest='cxa')\n    parser.add_argument('-b', '--complex-b', action='store_true', default=False,\n            help='B (right) matrix is complex', dest='cxb')\n    parser.add_argument('-m', '--arch', default='sse', choices=['sse', 'avx', 'avx2', 'bgp', 'bgq'],\n            help='Target architecture')\n    parser.add_argument('-n', '--name', default='mtxmq',\n            help='Name of function to generate')\n    parser.add_argument('-t', '--test', default=False, action='store_true',\n            help='Generate performance and correctness testing code')\n    args = parser.parse_args()\n\n    try:\n        loglevel = getattr(logging, args.loglevel.upper())\n    except:\n        parser.error(\"Invalid LOGLEVEL\")\n\n    # Configure logging\n    logging.basicConfig(level=loglevel,\n            format=\"%(asctime)s - %(name)s - %(levelname)s - %(message)s\",\n            filename=args.logfile)\n    logger = logging.getLogger(__name__)\n\n    if args.arch == 'sse':\n        M = MTXMSSE\n        bests = {\n                (False, False): (\"jik\", {'i':2, 'j':14, 'k':1}, args.name),\n                (True, False) : (\"jik\", {'i':2, 'j':12, 'k':1}, args.name),\n                (False, True) : (\"jik\", {'i':2, 'j':14, 'k':1}, args.name),\n                (True, True)  : (\"ijk\", {'i':2, 'j':14, 'k':1}, args.name)}\n        versions = [(lo, {'i':i, 'j':j, 'k':1}, '{}_i{}j{}k1'.format(lo, i,j)) for i in range(2,21,2) for j in range(2,21,2) for lo in [\"ijk\", \"jik\"] if i*j <= 60]\n    elif args.arch == 'avx':\n        M = MTXMAVX\n        bests = {\n                (False, False): (\"jik\", {'i':2, 'j':20, 'k':1}, args.name), # jik_i3j12k1 is a bit better, except on 400 20 20 much slower\n                (True, False) : (\"ijk\", {'i':4, 'j':12, 'k':1}, args.name), # ijk_i4j8k1 is better for 400 20 20 but worse on others\n                (False, True) : (\"ijk\", {'i':3, 'j':12, 'k':1}, args.name), # jik_i3j12k1 best on avg across tested sizes, ijk_i4j8k1 best on 400 20 20\n                (True, True)  : (\"ijk\", {'i':2, 'j':16, 'k':1}, args.name)} # jik is better for squares, ijk better for 400 20 20 and similar\n        versions = [(lo, {'i':i, 'j':j, 'k':1}, '{}_i{}j{}k1'.format(lo, i,j)) for i in range(1,10) for j in range(4,21,4) for lo in [\"ijk\", \"jik\"] if i*j <= 60]\n    elif args.arch == 'avx2':\n        M = MTXMAVX2\n        bests = {\n                (False, False): (\"jik\", {'i':2, 'j':20, 'k':1}, args.name),\n                (True, False) : (\"jik\", {'i':3, 'j':16, 'k':1}, args.name),\n                (False, True) : (\"jik\", {'i':3, 'j':16, 'k':1}, args.name),\n                (True, True)  : (\"ijk\", {'i':2, 'j':20, 'k':1}, args.name)}\n        versions = [(lo, {'i':i, 'j':j, 'k':1}, '{}_i{}j{}k1'.format(lo, i,j)) for i in range(1,10) for j in range(4,21,4) for lo in [\"ijk\", \"jik\"] if i*j <= 60]\n    elif args.arch == 'bgp':\n        M = MTXMBGP\n        bests = {\n                (False, False): (\"ijk\", {'i':8, 'j':4, 'k':1}, args.name),\n                (True, False) : (\"ijk\", {'i':6, 'j':8, 'k':1}, args.name),\n                (False, True) : (\"jik\", {'i':2, 'j':20, 'k':1}, args.name), # ijk_i9j4k1 is better for (m*m,m)T*(m*m) 400 20 20 by almost 30%, but generally quite a bit worse\n                (True, True)  : (\"ijk\", {'i':5, 'j':8, 'k':1}, args.name)}\n        versions = [(lo, {'i':i, 'j':j, 'k':1}, '{}_i{}j{}k1'.format(lo, i,j)) for i in range(1,10) for j in range(4,21,4) for lo in [\"ijk\", \"jik\"] if i*j <= 60]\n    elif args.arch == 'bgq':\n        M = MTXMBGQ\n        bests = {\n                (False, False): (\"jik\", {'i':4, 'j':20, 'k':1}, args.name),\n                (True, False) : (\"ijk\", {'i':6, 'j':8, 'k':1}, args.name),\n                (False, True) : (\"jik\", {'i':4, 'j':20, 'k':1}, args.name),\n                (True, True)  : (\"jik\", {'i':3, 'j':28, 'k':1}, args.name)}\n        versions = [(lo, {'i':i, 'j':j, 'k':1}, '{}_i{}j{}k1'.format(lo, i,j)) for i in range(1,14) for j in range(4,29,4) for lo in [\"ijk\", \"jik\"] if i*j <= 90]\n\n    m = M(args.cxa, args.cxb)\n    best = bests[(args.cxa, args.cxb)]\n\n    if args.test:\n        tester(m, versions)\n    else:\n        m.gen(sys.stdout, *best)\n\n\nif __name__ == '__main__':\n    main()\n\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/results_parse.py",
    "content": "#!/usr/bin/env python3\n\nimport fileinput\n\nclass COLORS:\n    HEADER = '\\033[95m'\n    OKBLUE = '\\033[94m'\n    OKGREEN = '\\033[92m'\n    WARNING = '\\033[93m'\n    FAIL = '\\033[91m'\n    ENDC = '\\033[0m'\n\n    def disable(self):\n        self.HEADER = ''\n        self.OKBLUE = ''\n        self.OKGREEN = ''\n        self.WARNING = ''\n        self.FAIL = ''\n        self.ENDC = ''\n\n# { (shape, i, j, k) : [(variant, gflops), ] , }\n\ndef get_data():\n    results = {}\n    for line in fileinput.input():\n        line = line.split()\n        test = tuple([line[1]] + [int(x) for x in line[2:-1]])\n        gflops = float(line[-1])\n        version = line[0][:-1] # Remove semicolon\n        if test not in results:\n            results[test] = []\n        results[test].append((version, gflops))\n    return results\n\ndef print_best_per_benchmark(results):\n    best_avg, blas_avg, imp_avg = 0, 0, 0\n    for test in sorted(results):\n        best = max(results[test], key=lambda x: x[1])\n        best_avg += best[1]\n        color = COLORS.OKGREEN\n        print(color + '{:40}'.format(' '.join([str(x) for x in test])) + COLORS.ENDC, '{:40}{:6.2f}'.format(*best))\n    best_avg /= len(results)\n    print('{:40} {:40}{:6.2f}'.format('', 'average', best_avg))\n\ndef print_top_n_variants(results, n=10):\n    variants = {}\n    for test in results:\n        for variant, gflops in results[test]:\n            if variant not in variants:\n                variants[variant] = 0\n            variants[variant] += gflops / len(results)\n\n    topn = sorted(variants, key=lambda x: variants[x], reverse=True)[:n]\n    for x in topn:\n        print('{:40}{:6.2f}'.format(x, variants[x]))\n\n\nif __name__ == '__main__':\n    results = get_data()\n    print(COLORS.HEADER + \"Best per benchmark:\" + COLORS.ENDC)\n    print_best_per_benchmark(results)\n    print(COLORS.HEADER + \"Top 10 Varaints:\" + COLORS.ENDC)\n    print_top_n_variants(results)\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/tests/__init__.py",
    "content": ""
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/new_mtxmq/tests/testDocStrings.py",
    "content": "import unittest\nimport doctest\nimport sys\nimport os\n\ndef grep(filename, string):\n    \"\"\"\n    Input:\n        A filename to read and a string to search for.\n\n    Output:\n        True if the string appears in the file\n        False otherwise\n    \"\"\"\n    for line in open(filename):\n        if string in line:\n            return True\n    return False\n\ndef load_tests(loader, tests, ignore):\n    \"\"\"\n    Import files with doctests into the unittesting framework.\n    \"\"\"\n    # Find the base of the project \n    base = sys.path[0]\n\n    # Walk all files in this project\n    for dirpath, dirnames, filenames in os.walk(base):\n        for fn in filenames:\n            # Check python files for the doctest prompt\n            if fn[-3:] == \".py\" and grep(os.path.join(dirpath,fn), '>'*3):\n                # remove the project name and .py\n                module = os.path.join(dirpath[len(base):], fn[:-3])\n                # use '.' to make it a string that represents a module\n                module = module.replace(os.sep,'.').strip('.')\n                # add the module as a test\n                tests.addTests(doctest.DocTestSuite(module))\n\n    return tests\n"
  },
  {
    "path": "src/madness/tensor/mtxmq_graveyard/test_scott.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/madness_config.h>\n#ifdef X86_64\n\n#include <madness/world/print.h>\n#include <madness/tensor/tensor.h>\n#include <locale>\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n//#include <xmmintrin.h>\n//#include <pmmintrin.h>\n\n\n#include <madness/tensor/mxm.h>\n\nusing namespace madness;\n\nvoid mtxmGooberSaysHey(long dimi, long dimj, long dimk,\n                       std::complex<double>* MADNESS_RESTRICT c,\n                       const std::complex<double>* a, const double* b)\n{\n  const long itile = 14;\n  for (long j = 0; j < dimj; ++j)\n  {\n    for (long ilo = 0; ilo < dimi; ilo += itile)\n    {\n      long ni = dimi - ilo;\n      ni = (ni >= itile) ? itile : ni;\n      if (ni == 14)\n      {\n        std::complex<double>* cij0  = c + (ilo     )*dimj + j;\n        std::complex<double>* cij1  = c + (ilo +  1)*dimj + j;\n        std::complex<double>* cij2  = c + (ilo +  2)*dimj + j;\n        std::complex<double>* cij3  = c + (ilo +  3)*dimj + j;\n        std::complex<double>* cij4  = c + (ilo +  4)*dimj + j;\n        std::complex<double>* cij5  = c + (ilo +  5)*dimj + j;\n        std::complex<double>* cij6  = c + (ilo +  6)*dimj + j;\n        std::complex<double>* cij7  = c + (ilo +  7)*dimj + j;\n        std::complex<double>* cij8  = c + (ilo +  8)*dimj + j;\n        std::complex<double>* cij9  = c + (ilo +  9)*dimj + j;\n        std::complex<double>* cij10 = c + (ilo + 10)*dimj + j;\n        std::complex<double>* cij11 = c + (ilo + 11)*dimj + j;\n        std::complex<double>* cij12 = c + (ilo + 12)*dimj + j;\n        std::complex<double>* cij13 = c + (ilo + 13)*dimj + j;\n//        *(cij0) = std::complex<double>(0.0,0.0);\n//        *(cij1) = std::complex<double>(0.0,0.0);\n//        *(cij2) = std::complex<double>(0.0,0.0);\n//        *(cij3) = std::complex<double>(0.0,0.0);\n//        *(cij4) = std::complex<double>(0.0,0.0);\n//        *(cij5) = std::complex<double>(0.0,0.0);\n//        *(cij6) = std::complex<double>(0.0,0.0);\n//        *(cij7) = std::complex<double>(0.0,0.0);\n//        *(cij8) = std::complex<double>(0.0,0.0);\n//        *(cij9) = std::complex<double>(0.0,0.0);\n//        *(cij10) = std::complex<double>(0.0,0.0);\n//        *(cij11) = std::complex<double>(0.0,0.0);\n//        *(cij12) = std::complex<double>(0.0,0.0);\n//        *(cij13) = std::complex<double>(0.0,0.0);\n        __asm__ __volatile__ (\n            \"pxor %xmm2,%xmm2;\"\n            \"pxor %xmm3,%xmm3;\"\n            \"pxor %xmm4,%xmm4;\"\n            \"pxor %xmm5,%xmm5;\"\n            \"pxor %xmm6,%xmm6;\"\n            \"pxor %xmm7,%xmm7;\"\n            \"pxor %xmm8,%xmm8;\"\n            \"pxor %xmm9,%xmm9;\"\n            \"pxor %xmm10,%xmm10;\"\n            \"pxor %xmm11,%xmm11;\"\n            \"pxor %xmm12,%xmm12;\"\n            \"pxor %xmm13,%xmm13;\"\n            \"pxor %xmm14,%xmm14;\"\n            \"pxor %xmm15,%xmm15;\"\n        );\n        for (long k = 0; k < dimk; ++k)\n        {\n//          const std::complex<double>* aki0  = a + k*dimi + ilo;\n//          const std::complex<double>* aki1  = a + k*dimi + ilo + 1;\n//          const std::complex<double>* aki2  = a + k*dimi + ilo + 2;\n//          const std::complex<double>* aki3  = a + k*dimi + ilo + 3;\n//          const std::complex<double>* aki4  = a + k*dimi + ilo + 4;\n//          const std::complex<double>* aki5  = a + k*dimi + ilo + 5;\n//          const std::complex<double>* aki6  = a + k*dimi + ilo + 6;\n//          const std::complex<double>* aki7  = a + k*dimi + ilo + 7;\n//          const std::complex<double>* aki8  = a + k*dimi + ilo + 8;\n//          const std::complex<double>* aki9  = a + k*dimi + ilo + 9;\n//          const std::complex<double>* aki10 = a + k*dimi + ilo + 10;\n//          const std::complex<double>* aki11 = a + k*dimi + ilo + 11;\n//          const std::complex<double>* aki12 = a + k*dimi + ilo + 12;\n//          const std::complex<double>* aki13 = a + k*dimi + ilo + 13;\n          const std::complex<double>* aki  = a + k*dimi + ilo;\n          const double* bkj = b + k*dimj + j;\n//          *(cij0) += *(aki0) * *(bkj);\n//          *(cij1) += *(aki1) * *(bkj);\n//          *(cij2) += *(aki2) * *(bkj);\n//          *(cij3) += *(aki3) * *(bkj);\n//          *(cij4) += *(aki4) * *(bkj);\n//          *(cij5) += *(aki5) * *(bkj);\n//          *(cij6) += *(aki6) * *(bkj);\n//          *(cij7) += *(aki7) * *(bkj);\n//          *(cij8) += *(aki8) * *(bkj);\n//          *(cij9) += *(aki9) * *(bkj);\n//          *(cij10) += *(aki10) * *(bkj);\n//          *(cij11) += *(aki11) * *(bkj);\n//          *(cij12) += *(aki12) * *(bkj);\n//          *(cij13) += *(aki13) * *(bkj);\n          __asm__ volatile(\n            \"movddup (%1), %%xmm0;\"\n\n            \"movapd    (%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\"\n            \"movapd  16(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\"\n            \"movapd  32(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\"\n            \"movapd  48(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\"\n            \"movapd  64(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\"\n            \"movapd  80(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\"\n            \"movapd  96(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\"\n            \"movapd 112(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\"\n            \"movapd 128(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\"\n            \"movapd 144(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11;\"\n            \"movapd 160(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm12;\"\n            \"movapd 176(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm13;\"\n            \"movapd 192(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm14;\"\n            \"movapd 208(%0), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm15;\"\n\n          :\n          : \"r\"(aki), \"r\"(bkj)\n          :\n          );\n        }\n        __asm__ __volatile__ (\n            \"movapd   %%xmm2,  (%0);\"\n            \"movapd   %%xmm3,  (%1);\"\n            \"movapd   %%xmm4,  (%2);\"\n            \"movapd   %%xmm5,  (%3);\"\n            \"movapd   %%xmm6,  (%4);\"\n            \"movapd   %%xmm7,  (%5);\"\n            \"movapd   %%xmm8,  (%6);\"\n            \"movapd   %%xmm9,  (%7);\"\n            \"movapd   %%xmm10, (%8);\"\n            \"movapd   %%xmm11, (%9);\"\n            \"movapd   %%xmm12, (%10);\"\n            \"movapd   %%xmm13, (%11);\"\n            \"movapd   %%xmm14, (%12);\"\n            \"movapd   %%xmm15, (%13);\"\n        :\n        : \"r\"(cij0), \"r\"(cij1), \"r\"(cij2), \"r\"(cij3), \"r\"(cij4), \"r\"(cij5), \"r\"(cij6), \"r\"(cij7), \"r\"(cij8), \"r\"(cij9), \"r\"(cij10), \"r\"(cij11), \"r\"(cij12), \"r\"(cij13)\n        :\n        );\n      }\n      else\n      {\n        for (int i = ilo; i < dimi; ++i)\n        {\n          std::complex<double>* cij = c + i*dimj + j;\n          *(cij) = std::complex<double>(0.0,0.0);\n          for (long k = 0; k < dimk; ++k)\n          {\n            const std::complex<double>* aki = a + k*dimi + i;\n            const double* bkj = b + k*dimj + j;\n            *(cij) += *(aki) * *(bkj);\n          }\n        }\n      }\n    }\n  }\n}\n\nvoid mTxmSCOTT(long dimi, long dimj, long dimk,\n           std::complex<double>* MADNESS_RESTRICT c, const std::complex<double>* a, const double* b) {\n\n    const long jtile = 14;\n    for (long i=0; i<dimi; ++i) {\n    \tstd::complex<double>* cij = c + i*dimj;\n    \tfor (long jlo=0; jlo<dimj; jlo+=jtile, cij+=jtile) {\n    \t\tint nj = dimj-jlo;\n    \t\tif (nj > jtile) nj = jtile;\n    \t\tswitch (nj) {\n    \t\tcase 14:\n\t\t\t\t{__asm__ __volatile__ (\n\t\t\t\t\t\t\"pxor %xmm2,%xmm2;\"\n\t\t\t\t\t\t\"pxor %xmm3,%xmm3;\"\n\t\t\t\t\t\t\"pxor %xmm4,%xmm4;\"\n\t\t\t\t\t\t\"pxor %xmm5,%xmm5;\"\n\t\t\t\t\t\t\"pxor %xmm6,%xmm6;\"\n\t\t\t\t\t\t\"pxor %xmm7,%xmm7;\"\n\t\t\t\t\t\t\"pxor %xmm8,%xmm8;\"\n\t\t\t\t\t\t\"pxor %xmm9,%xmm9;\"\n\t\t\t\t\t\t\"pxor %xmm10,%xmm10;\"\n\t\t\t\t\t\t\"pxor %xmm11,%xmm11;\"\n\t\t\t\t\t\t\"pxor %xmm12,%xmm12;\"\n\t\t\t\t\t\t\"pxor %xmm13,%xmm13;\"\n\t\t\t\t\t\t\"pxor %xmm14,%xmm14;\"\n\t\t\t\t\t\t\"pxor %xmm15,%xmm15;\"\n\t\t\t\t);\n\t\t\t\tconst std::complex<double>* aki = a + i;\n\t\t\t\tconst double* bkj = b + jlo;\n\t\t\t\tfor (long k=0; k<dimk; ++k,aki+=dimi,bkj+=dimj) {\n\t\t\t\t\t__asm__ volatile(\n\t\t\t\t\t\t\"movapd (%0), %%xmm0;\"\n\n\t\t\t\t\t\t\"movddup    (%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm2;\"\n\t\t\t\t\t\t\"movddup   8(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm3;\"\n\t\t\t\t\t\t\"movddup  16(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm4;\"\n\t\t\t\t\t\t\"movddup  24(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm5;\"\n\t\t\t\t\t\t\"movddup  32(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm6;\"\n\t\t\t\t\t\t\"movddup  40(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm7;\"\n\t\t\t\t\t\t\"movddup  48(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm8;\"\n\t\t\t\t\t\t\"movddup  56(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm9;\"\n\t\t\t\t\t\t\"movddup  64(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm10;\"\n\t\t\t\t\t\t\"movddup  72(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm11;\"\n\t\t\t\t\t\t\"movddup  80(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm12;\"\n\t\t\t\t\t\t\"movddup  88(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm13;\"\n\t\t\t\t\t\t\"movddup  96(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm14;\"\n\t\t\t\t\t\t\"movddup 104(%1), %%xmm1; mulpd %%xmm0, %%xmm1; addpd %%xmm1,%%xmm15;\"\n\n\t\t\t\t\t:\n\t\t\t\t\t: \"r\"(aki), \"r\"(bkj)\n\t\t\t\t\t:\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t__asm__ __volatile__ (\n\t\t\t\t\t\t\"movapd   %%xmm2,    (%0);\"\n\t\t\t\t\t\t\"movapd   %%xmm3,  16(%0);\"\n\t\t\t\t\t\t\"movapd   %%xmm4,  32(%0);\"\n\t\t\t\t\t\t\"movapd   %%xmm5,  48(%0);\"\n\t\t\t\t\t\t\"movapd   %%xmm6,  64(%0);\"\n\t\t\t\t\t\t\"movapd   %%xmm7,  80(%0);\"\n\t\t\t\t\t\t\"movapd   %%xmm8,  96(%0);\"\n\t\t\t\t\t\t\"movapd   %%xmm9, 112(%0);\"\n\t\t\t\t\t\t\"movapd  %%xmm10, 128(%0);\"\n\t\t\t\t\t\t\"movapd  %%xmm11, 144(%0);\"\n\t\t\t\t\t\t\"movapd  %%xmm12, 160(%0);\"\n\t\t\t\t\t\t\"movapd  %%xmm13, 176(%0);\"\n\t\t\t\t\t\t\"movapd  %%xmm14, 192(%0);\"\n\t\t\t\t\t\t\"movapd  %%xmm15, 208(%0);\"\n\t\t\t\t:\n\t\t\t\t: \"r\"(cij)\n\t\t\t\t:\n\t\t\t\t);}\n\t\t\t\tbreak;\n\n    \t\tdefault:\n    \t\t    for (long j=jlo; j<dimj; ++j) {\n\t\t\t\t\tstd::complex<double> cij(0.0,0.0);\n\t\t\t\t\tfor (long k=0; k<dimk; ++k) {\n\t\t\t\t\t\tcij += a[k*dimi+i]*b[k*dimj+j];\n\t\t\t\t\t}\n\t\t\t\t\tc[i*dimj + j] = cij;\n    \t\t    }\n    \t\t    break;\n    \t\t}\n        }\n    }\n\n\n\n}\n\nint main(int argc, char** argv)\n{\n\tint k = 28;\n\n\tTensor< std::complex<double> > dc(k,k*k);\n\tTensor< std::complex<double> > res(k,k*k), res2(k,k*k);\n\tTensor< double > d(k,k);\n\n\tdc.fillrandom();\n\td.fillrandom();\n\n\tmTxmq(k*k, k, k, res.ptr(), dc.ptr(), d.ptr());\n\tmtxmGooberSaysHey(k*k, k, k, res2.ptr(), dc.ptr(), d.ptr());\n\t//mTxmSCOTT(k*k, k, k, res2.ptr(), dc.ptr(), d.ptr());\n\tprint(\"ERROR IS\", (res-res2).normf());\n\n//\tdouble start = cpu_time();\n//\tfor (int i = 0; i < 10000; ++i)\n//\t{\n//\t\tmTxmSCOTT(k*k, k, k, res.ptr(), dc.ptr(), d.ptr());\n//\t}\n//\tdouble tused = cpu_time() - start;\n//\tprint(\"Cpu time used: \", tused, \"flops/s: \", 2.0*k*k*k*k*1e4 / tused);\n\n\treturn 0;\n}\n\n#else\n#include <iostream>\nint main() {\n    std::cout << \"only on x86_64\" << std::endl;\n    return 0;\n}\n#endif\n"
  },
  {
    "path": "src/madness/tensor/mxm.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n#ifndef MADNESS_TENSOR_MXM_H__INCLUDED\n#define MADNESS_TENSOR_MXM_H__INCLUDED\n\n#include <madness/madness_config.h>\n\n// This just to check if config is actually working\n//#ifndef HAVE_MTXMQ\n//#error \"MTXMQ missing\"\n//#endif\n\n#define HAVE_FAST_BLAS\n#ifdef  HAVE_FAST_BLAS\n//#ifdef HAVE_INTEL_MKL\n#include <madness/tensor/cblas.h>\n#endif\n\n/// \\file tensor/mxm.h\n/// \\brief Internal use only\n\n// This file is ONLY included into tensor.cc ... separated here just\n// to shrink file size.  Don't try to include anywhere else\n\n// Due to both flakey compilers and performance concerns,\n// we use a simple reference implementation of the mxm\n// routines for all except T=double.\n\n\nnamespace madness {\n\n    // Start with reference implementations.  Then provide optimized implementations, falling back to reference if not available on specific platforms\n\n    /// Matrix \\c += Matrix * matrix reference implementation (slow but correct)\n    template <typename T, typename Q, typename S>\n    static inline void mxm_reference(long dimi, long dimj, long dimk,\n                                     T* MADNESS_RESTRICT c, const Q* MADNESS_RESTRICT a,\n                                     const S* MADNESS_RESTRICT b) {\n        /*\n          c(i,j) = c(i,j) + sum(k) a(i,k)*b(k,j)\n          \n          where it is assumed that the last index in each array is has unit\n          stride and the dimensions are as provided.\n        */\n        \n        for (long i=0; i<dimi; ++i) {\n            for (long k=0; k<dimk; ++k) {\n                for (long j=0; j<dimj; ++j) {\n                    c[i*dimj+j] += a[i*dimk+k]*b[k*dimj+j];\n                }\n            }\n        }\n    }\n    \n\n    /// Matrix \\c += Matrix transpose * matrix ... reference implementation (slow but correct)\n    template <typename T, typename Q, typename S>\n    static inline\n    void mTxm_reference(long dimi, long dimj, long dimk,\n                        T* MADNESS_RESTRICT c, const Q* MADNESS_RESTRICT a,\n                        const S* MADNESS_RESTRICT b) {\n        /*\n          c(i,j) = c(i,j) + sum(k) a(k,i)*b(k,j)\n          \n          where it is assumed that the last index in each array is has unit\n          stride and the dimensions are as provided.\n          \n          i loop might be long in anticipated application\n        */\n        \n        for (long k=0; k<dimk; ++k) {\n            for (long j=0; j<dimj; ++j) {\n                for (long i=0; i<dimi; ++i) {\n                    c[i*dimj+j] += a[k*dimi+i]*b[k*dimj+j];\n                }\n            }\n        }\n    }\n\n    /// Matrix \\c += Matrix * matrix transpose ... reference implementation (slow but correct)\n    template <typename T, typename Q, typename S>\n    static inline void mxmT_reference (long dimi, long dimj, long dimk,\n                                       T* MADNESS_RESTRICT c, const Q* MADNESS_RESTRICT a,\n                                       const S* MADNESS_RESTRICT b) {\n        /*\n          c(i,j) = c(i,j) + sum(k) a(i,k)*b(j,k)\n          \n          where it is assumed that the last index in each array is has unit\n          stride and the dimensions are as provided.\n          \n          i loop might be long in anticipated application\n        */\n        \n        for (long i=0; i<dimi; ++i) {\n            for (long j=0; j<dimj; ++j) {\n                T sum = 0;\n                for (long k=0; k<dimk; ++k) {\n                    sum += a[i*dimk+k]*b[j*dimk+k];\n                }\n                c[i*dimj+j] += sum;\n            }\n        }\n    }\n    \n    /// Matrix \\c += Matrix transpose * matrix transpose reference implementation (slow but correct)\n    template <typename T, typename Q, typename S>\n    static inline void mTxmT_reference(long dimi, long dimj, long dimk,\n                                       T* MADNESS_RESTRICT c, const Q* MADNESS_RESTRICT a,\n                                       const S* MADNESS_RESTRICT b) {\n        /*\n          c(i,j) = c(i,j) + sum(k) a(k,i)*b(j,k)\n          \n          where it is assumed that the last index in each array is has unit\n          stride and the dimensions are as provided.\n        */\n        \n        for (long i=0; i<dimi; ++i) {\n            for (long j=0; j<dimj; ++j) {\n                for (long k=0; k<dimk; ++k) {\n                    c[i*dimj+j] += a[k*dimi+i]*b[j*dimk+k];\n                }\n            }\n        }\n    }\n\n    /// Matrix = Matrix transpose * matrix ... slow reference implementation\n    \n    /// This routine does \\c C=AT*B whereas mTxm does C=C+AT*B.\n    /// \\code\n    ///    c(i,j) = sum(k) a(k,i)*b(k,j)  <------ does not accumulate into C\n    /// \\endcode\n    ///\n    /// \\c ldb is the last dimension of b in C storage (the leading dimension\n    /// in fortran storage).  It is here to accomodate multiplying by a matrix\n    /// stored with \\c ldb>dimj which happens in madness when transforming with\n    /// low rank matrices.  A matrix in dense storage has \\c ldb=dimj which is\n    /// the default for backward compatibility.\n    template <typename aT, typename bT, typename cT>\n    void mTxmq_reference(long dimi, long dimj, long dimk,\n                         cT* MADNESS_RESTRICT c, const aT* a, const bT* b, long ldb=-1) {\n        if (ldb == -1) ldb=dimj;\n        MADNESS_ASSERT(ldb>=dimj);\n        //std::cout << \"IN GENERIC mTxmq \" << tensor_type_names[TensorTypeData<aT>::id] << \" \" << tensor_type_names[TensorTypeData<bT>::id] << \" \" << tensor_type_names[TensorTypeData<cT>::id] << \"\\n\";\n        for (long i=0; i<dimi; ++i,c+=dimj,++a) {\n            for (long j=0; j<dimj; ++j) c[j] = 0.0;\n            const aT *aik_ptr = a;\n            for (long k=0; k<dimk; ++k,aik_ptr+=dimi) {\n                aT aki = *aik_ptr;\n                for (long j=0; j<dimj; ++j) {\n                    c[j] += aki*b[k*ldb+j];\n                }\n            }\n        }\n    }\n    \n\n#if defined(HAVE_FAST_BLAS) && !defined(HAVE_INTEL_MKL)\n    // MKL provides support for mixed real/complex operations but most other libraries do not\n    \n    /// Matrix += Matrix * matrix ... BLAS/MKL interface version\n    \n    /// Does \\c C=C+A*B \n    /// \\code\n    ///    c(i,j) = c(i,j) + sum(k) a(i,k)*b(k,j)\n    /// \\endcode\n    template <typename T>\n    void mxm(long dimi, long dimj, long dimk,\n              T* MADNESS_RESTRICT c, const T* a, const T* b) {\n        const T one = 1.0;  // alpha in *gemm\n        cblas::gemm(cblas::NoTrans,cblas::NoTrans,dimj,dimi,dimk,one,b,dimj,a,dimk,one,c,dimj);\n    }\n\n    /// Matrix += Matrix transpose * matrix ... MKL interface version\n    \n    /// Does \\c C=C+AT*B \n    /// \\code\n    ///    c(i,j) = c(i,j) + sum(k) a(k,i)*b(k,j)\n    /// \\endcode\n    template <typename T>\n    void mTxm(long dimi, long dimj, long dimk,\n              T* MADNESS_RESTRICT c, const T* a, const T* b) {\n        const T one = 1.0;  // alpha in *gemm\n        cblas::gemm(cblas::NoTrans,cblas::Trans,dimj,dimi,dimk,one,b,dimj,a,dimi,one,c,dimj);\n    }\n\n    /// Matrix += Matrix * matrix transpose ... MKL interface version\n    \n    /// Does \\c C=C+A*BT\n    /// \\code\n    ///    c(i,j) = c(i,j) + sum(k) a(i,k)*b(j,k)\n    /// \\endcode\n    template <typename T>\n    void mxmT(long dimi, long dimj, long dimk,\n              T* MADNESS_RESTRICT c, const T* a, const T* b) {\n        const T one = 1.0;  // alpha in *gemm\n        cblas::gemm(cblas::Trans,cblas::NoTrans,dimj,dimi,dimk,one,b,dimk,a,dimk,one,c,dimj);\n    }\n    \n    /// Matrix += Matrix transpose * matrix transpose ... MKL interface version\n    \n    /// Does \\c C=C+AT*BT\n    /// \\code\n    ///    c(i,j) = c(i,j) + sum(k) a(k,i)*b(j,k)\n    /// \\endcode\n    template <typename T>\n    void mTxmT(long dimi, long dimj, long dimk,\n               T* MADNESS_RESTRICT c, const T* a, const T* b) {\n        const T one = 1.0;  // alpha in *gemm\n        cblas::gemm(cblas::Trans,cblas::Trans,dimj,dimi,dimk,one,b,dimk,a,dimi,one,c,dimj);\n    }\n\n    /// Matrix = Matrix transpose * matrix ... MKL interface version\n    \n    /// Does \\c C=AT*B whereas mTxm does C=C+AT*B.  \n    /// \\code\n    ///    c(i,j) = sum(k) a(k,i)*b(k,j)  <------ does not accumulate into C\n    /// \\endcode\n    ///\n    /// \\c ldb is the last dimension of b in C storage (the leading dimension\n    /// in fortran storage).  It is here to accomodate multiplying by a matrix\n    /// stored with \\c ldb>dimj which happens in madness when transforming with\n    /// low rank matrices.  A matrix in dense storage has \\c ldb=dimj which is\n    /// the default for backward compatibility.\n    template <typename T>\n    void mTxmq(long dimi, long dimj, long dimk,\n               T* MADNESS_RESTRICT c, const T* a, const T* b, long ldb=-1) {\n        if (ldb == -1) ldb=dimj;\n        MADNESS_ASSERT(ldb>=dimj);\n\n        if (dimi==0 || dimj==0) return; // nothing to do and *GEMM will complain\n        if (dimk==0) {\n            for (long i=0; i<dimi*dimj; i++) c[i] = 0.0;\n        }\n        \n        const T one = 1.0;  // alpha in *gemm\n        const T zero = 0.0; // beta  in *gemm\n        cblas::gemm(cblas::NoTrans,cblas::Trans,dimj,dimi,dimk,one,b,ldb,a,dimi,zero,c,dimj);\n    }  \n\n#ifdef HAVE_MTXMQ\n    template <>\n    void mTxmq(long dimi, long dimj, long dimk, double* MADNESS_RESTRICT c, const double* a, const double* b, long ldb);\n\n    // Bootstrap complex*real from real*real\n    template <typename T>\n    void mTxmq(long dimi, long dimj, long dimk, std::complex<T>* MADNESS_RESTRICT c, const std::complex<T>* a, const T* b, long ldb) {\n      T* Rc = new T[dimi*dimj];\n      T* Ic = new T[dimi*dimj];\n      T* Ra = new T[dimi*dimk];\n      T* Ia = new T[dimi*dimk];\n\n      for (long i=0; i<dimi*dimk; i++) {\n\tRa[i] = a[i].real();\n\tIa[i] = a[i].imag();\n      }\n      mTxmq(dimi,dimj,dimk,Rc,Ra,b,ldb);\n      mTxmq(dimi,dimj,dimk,Ic,Ia,b,ldb);\n      for (long i=0; i<dimi*dimj; i++) c[i] = std::complex<T>(Rc[i],Ic[i]);\n      \n      delete[] Rc;\n      delete[] Ic;\n      delete[] Ra;\n      delete[] Ia;\n    }  \n  \n#endif\n\n#endif\n    \n#ifdef HAVE_INTEL_MKL\n    /// Matrix += Matrix * matrix ... MKL interface version\n    \n    /// Does \\c C=C+A*B \n    /// \\code\n    ///    c(i,j) = c(i,j) + sum(k) a(i,k)*b(k,j)\n    /// \\endcode\n    template <typename aT, typename bT, typename cT>\n    void mxm(long dimi, long dimj, long dimk,\n              cT* MADNESS_RESTRICT c, const aT* a, const bT* b) {\n        const cT one = 1.0;  // alpha in *gemm\n        cblas::gemm(cblas::NoTrans,cblas::NoTrans,dimj,dimi,dimk,one,b,dimj,a,dimk,one,c,dimj);\n    }\n\n    /// Matrix += Matrix transpose * matrix ... MKL interface version\n    \n    /// Does \\c C=C+AT*B \n    /// \\code\n    ///    c(i,j) = c(i,j) + sum(k) a(k,i)*b(k,j)\n    /// \\endcode\n    template <typename aT, typename bT, typename cT>\n    void mTxm(long dimi, long dimj, long dimk,\n              cT* MADNESS_RESTRICT c, const aT* a, const bT* b) {\n        const cT one = 1.0;  // alpha in *gemm\n        cblas::gemm(cblas::NoTrans,cblas::Trans,dimj,dimi,dimk,one,b,dimj,a,dimi,one,c,dimj);\n    }\n\n    /// Matrix += Matrix * matrix transpose ... MKL interface version\n    \n    /// Does \\c C=C+A*BT\n    /// \\code\n    ///    c(i,j) = c(i,j) + sum(k) a(i,k)*b(j,k)\n    /// \\endcode\n    template <typename aT, typename bT, typename cT>\n    void mxmT(long dimi, long dimj, long dimk,\n              cT* MADNESS_RESTRICT c, const aT* a, const bT* b) {\n        const cT one = 1.0;  // alpha in *gemm\n        cblas::gemm(cblas::Trans,cblas::NoTrans,dimj,dimi,dimk,one,b,dimk,a,dimk,one,c,dimj);\n    }\n    \n    /// Matrix += Matrix transpose * matrix transpose ... MKL interface version\n    \n    /// Does \\c C=C+AT*BT\n    /// \\code\n    ///    c(i,j) = c(i,j) + sum(k) a(k,i)*b(j,k)\n    /// \\endcode\n    template <typename aT, typename bT, typename cT>\n    void mTxmT(long dimi, long dimj, long dimk,\n               cT* MADNESS_RESTRICT c, const aT* a, const bT* b) {\n        const cT one = 1.0;  // alpha in *gemm\n        cblas::gemm(cblas::Trans,cblas::Trans,dimj,dimi,dimk,one,b,dimk,a,dimi,one,c,dimj);\n    }\n\n    /// Matrix = Matrix transpose * matrix ... MKL interface version\n    \n    /// Does \\c C=AT*B whereas mTxm does C=C+AT*B.  \n    /// \\code\n    ///    c(i,j) = sum(k) a(k,i)*b(k,j)  <------ does not accumulate into C\n    /// \\endcode\n    ///\n    /// \\c ldb is the last dimension of b in C storage (the leading dimension\n    /// in fortran storage).  It is here to accomodate multiplying by a matrix\n    /// stored with \\c ldb>dimj which happens in madness when transforming with\n    /// low rank matrices.  A matrix in dense storage has \\c ldb=dimj which is\n    /// the default for backward compatibility.\n    template <typename aT, typename bT, typename cT>\n    void mTxmq(long dimi, long dimj, long dimk,\n               cT* MADNESS_RESTRICT c, const aT* a, const bT* b, long ldb=-1) {\n        if (ldb == -1) ldb=dimj;\n        MADNESS_ASSERT(ldb>=dimj);\n\n        if (dimi==0 || dimj==0) return; // nothing to do and *GEMM will complain\n        if (dimk==0) {\n            for (long i=0; i<dimi*dimj; i++) c[i] = 0.0;\n        }\n        \n        const cT one = 1.0;  // alpha in *gemm\n        const cT zero = 0.0; // beta  in *gemm\n        cblas::gemm(cblas::NoTrans,cblas::Trans,dimj,dimi,dimk,one,b,ldb,a,dimi,zero,c,dimj);\n    }\n\n#ifdef HAVE_MTXMQ\ntemplate <>\nvoid mTxmq(long dimi, long dimj, long dimk, double* MADNESS_RESTRICT c, const double* a, const double* b, long ldb);\n#endif\n    \n#else\n\n    // Fall back to reference implementations\n\n    template <typename T, typename Q, typename S>\n    static inline void mxm(long dimi, long dimj, long dimk,\n                           T* MADNESS_RESTRICT c, const Q* MADNESS_RESTRICT a,\n                           const S* MADNESS_RESTRICT b) {\n        mxm_reference(dimi, dimj, dimk, c, a, b);\n    }\n    \n    template <typename T, typename Q, typename S>\n    static inline\n    void mTxm(long dimi, long dimj, long dimk,\n              T* MADNESS_RESTRICT c, const Q* MADNESS_RESTRICT a,\n              const S* MADNESS_RESTRICT b) {\n        mTxm_reference(dimi, dimj, dimk, c, a, b);\n    }\n\n    template <typename T, typename Q, typename S>\n    static inline void mxmT(long dimi, long dimj, long dimk,\n                            T* MADNESS_RESTRICT c, const Q* MADNESS_RESTRICT a,\n                            const S* MADNESS_RESTRICT b) {\n        mxmT_reference(dimi, dimj, dimk, c, a, b);\n    }\n    \n    template <typename T, typename Q, typename S>\n    static inline void mTxmT(long dimi, long dimj, long dimk,\n                             T* MADNESS_RESTRICT c, const Q* MADNESS_RESTRICT a,\n                             const S* MADNESS_RESTRICT b) {\n        mTxmT_reference(dimi, dimj, dimk, c, a, b);\n    }\n\n    template <typename aT, typename bT, typename cT>\n    void mTxmq(long dimi, long dimj, long dimk,\n               cT* MADNESS_RESTRICT c, const aT* a, const bT* b, long ldb=-1) {\n        mTxmq_reference(dimi, dimj, dimk, c, a, b, ldb);\n    }\n\n    // The following are restricted to double only\n    \n    /// Matrix transpose * matrix (hand unrolled version)\n    \n    template <>\n    inline void mTxm(long dimi, long dimj, long dimk,\n                     double* MADNESS_RESTRICT c, const double* MADNESS_RESTRICT a,\n                     const double* MADNESS_RESTRICT b) {\n        /*\n          c(i,j) = c(i,j) + sum(k) a(k,i)*b(k,j)  <--- NOTE ACCUMULATION INTO C\n          \n          where it is assumed that the last index in each array is has unit\n          stride and the dimensions are as provided.\n          \n          i loop might be long in anticipated application\n          \n          4-way unrolled k loop ... empirically fastest on PIII\n          compared to 2/3 way unrolling (though not by much).\n        */\n        \n        long dimk4 = (dimk/4)*4;\n        for (long i=0; i<dimi; ++i,c+=dimj) {\n            const double* ai = a+i;\n            const double* p = b;\n            for (long k=0; k<dimk4; k+=4,ai+=4*dimi,p+=4*dimj) {\n                double ak0i = ai[0   ];\n                double ak1i = ai[dimi];\n                double ak2i = ai[dimi+dimi];\n                double ak3i = ai[dimi+dimi+dimi];\n                const double* bk0 = p;\n                const double* bk1 = p+dimj;\n                const double* bk2 = p+dimj+dimj;\n                const double* bk3 = p+dimj+dimj+dimj;\n                for (long j=0; j<dimj; ++j) {\n                    c[j] += ak0i*bk0[j] + ak1i*bk1[j] + ak2i*bk2[j] + ak3i*bk3[j];\n                }\n            }\n            for (long k=dimk4; k<dimk; ++k) {\n                double aki = a[k*dimi+i];\n                const double* bk = b+k*dimj;\n                for (long j=0; j<dimj; ++j) {\n                    c[j] += aki*bk[j];\n                }\n            }\n        }\n    }\n    \n    \n    \n    /// Matrix * matrix transpose (hand unrolled version)\n    \n    template <>\n    inline void mxmT(long dimi, long dimj, long dimk,\n                     double* MADNESS_RESTRICT c,\n                     const double* MADNESS_RESTRICT a, const double* MADNESS_RESTRICT b) {\n        /*\n          c(i,j) = c(i,j) + sum(k) a(i,k)*b(j,k)\n          \n          where it is assumed that the last index in each array is has unit\n          stride and the dimensions are as provided.\n          \n          j loop might be long in anticipated application\n          \n          Unrolled i loop.  Empirically fastest on PIII compared\n          to unrolling j, or both i&j.\n        */\n        \n        long dimi2 = (dimi/2)*2;\n        for (long i=0; i<dimi2; i+=2) {\n            const double* ai0 = a+i*dimk;\n            const double* ai1 = a+i*dimk+dimk;\n            double* MADNESS_RESTRICT ci0 = c+i*dimj;\n            double* MADNESS_RESTRICT ci1 = c+i*dimj+dimj;\n            for (long j=0; j<dimj; ++j) {\n                double sum0 = 0;\n                double sum1 = 0;\n                const double* bj = b + j*dimk;\n                for (long k=0; k<dimk; ++k) {\n                    sum0 += ai0[k]*bj[k];\n                    sum1 += ai1[k]*bj[k];\n                }\n                ci0[j] += sum0;\n                ci1[j] += sum1;\n            }\n        }\n        for (long i=dimi2; i<dimi; ++i) {\n            const double* ai = a+i*dimk;\n            double* MADNESS_RESTRICT ci = c+i*dimj;\n            for (long j=0; j<dimj; ++j) {\n                double sum = 0;\n                const double* bj = b+j*dimk;\n                for (long k=0; k<dimk; ++k) {\n                    sum += ai[k]*bj[k];\n                }\n                ci[j] += sum;\n            }\n        }\n    }\n    \n    /// Matrix * matrix (hand unrolled version)\n    template <>\n    inline void mxm(long dimi, long dimj, long dimk,\n                    double* MADNESS_RESTRICT c, const double* MADNESS_RESTRICT a, const double* MADNESS_RESTRICT b) {\n        /*\n          c(i,j) = c(i,j) + sum(k) a(i,k)*b(k,j)\n          \n          where it is assumed that the last index in each array is has unit\n          stride and the dimensions are as provided.\n          \n          4-way unrolled k loop ... empirically fastest on PIII\n          compared to 2/3 way unrolling (though not by much).\n        */\n        \n        long dimk4 = (dimk/4)*4;\n        for (long i=0; i<dimi; ++i, c+=dimj,a+=dimk) {\n            const double* p = b;\n            for (long k=0; k<dimk4; k+=4,p+=4*dimj) {\n                double aik0 = a[k  ];\n                double aik1 = a[k+1];\n                double aik2 = a[k+2];\n                double aik3 = a[k+3];\n                const double* bk0 = p;\n                const double* bk1 = bk0+dimj;\n                const double* bk2 = bk1+dimj;\n                const double* bk3 = bk2+dimj;\n                for (long j=0; j<dimj; ++j) {\n                    c[j] += aik0*bk0[j] + aik1*bk1[j] + aik2*bk2[j] + aik3*bk3[j];\n                }\n            }\n            for (long k=dimk4; k<dimk; ++k) {\n                double aik = a[k];\n                for (long j=0; j<dimj; ++j) {\n                    c[j] += aik*b[k*dimj+j];\n                }\n            }\n        }\n    }\n    \n    /// Matrix transpose * matrix transpose (hand tiled and unrolled)\n    template <>\n    inline void mTxmT(long dimi, long dimj, long dimk,\n                      double* MADNESS_RESTRICT csave, const double* MADNESS_RESTRICT asave, const double* MADNESS_RESTRICT b) {\n        /*\n          c(i,j) = c(i,j) + sum(k) a(k,i)*b(j,k)\n          \n          where it is assumed that the last index in each array is has unit\n          stride and the dimensions are as provided.\n          \n          Tiled k, copy row of a into temporary, and unroll j once.\n        */\n        \n        const int ktile=32;\n        double ai[ktile];\n        long dimj2 = (dimj/2)*2;\n        \n        for (long klo=0; klo<dimk; klo+=ktile, asave+=ktile*dimi, b+=ktile) {\n            long khi = klo+ktile;\n            if (khi > dimk) khi = dimk;\n            long nk = khi-klo;\n            \n            const double * MADNESS_RESTRICT a = asave;\n            double * MADNESS_RESTRICT c = csave;\n            for (long i=0; i<dimi; ++i,c+=dimj,++a) {\n                const double* q = a;\n                for (long k=0; k<nk; ++k,q+=dimi) ai[k] = *q;\n                \n                const double* bj0 = b;\n                for (long j=0; j<dimj2; j+=2,bj0+=2*dimk) {\n                    const double* bj1 = bj0+dimk;\n                    double sum0 = 0;\n                    double sum1 = 0;\n                    for (long k=0; k<nk; ++k) {\n                        sum0 += ai[k]*bj0[k];\n                        sum1 += ai[k]*bj1[k];\n                    }\n                    c[j  ] += sum0;\n                    c[j+1] += sum1;\n                }\n                \n                for (long j=dimj2; j<dimj; ++j,bj0+=dimk) {\n                    double sum = 0;\n                    for (long k=0; k<nk; ++k) {\n                        sum += ai[k]*bj0[k];\n                    }\n                    c[j] += sum;\n                }\n            }\n        }\n    }\n\n    /*\n     * mtxm, but with padded buffers.\n     *\n     * ext_b is the extent of the b array, so shrink() isn't needed.\n     */\n    template <typename aT, typename bT, typename cT>\n    void mTxmq_padding(long dimi, long dimj, long dimk, long ext_b,\n               cT* c, const aT* a, const bT* b) {\n        const int alignment = 4;\n        bool free_b = false;\n        long effj = dimj;\n\n        /* Setup a buffer for c if needed */\n        cT* c_buf = c;\n        if (dimj%alignment) {\n            effj = (dimj | 3) + 1;\n            c_buf = (cT*)malloc(sizeof(cT)*dimi*effj);\n        }\n\n        /* Copy b into a buffer if needed */\n        if (ext_b%alignment) {\n            free_b = true;\n            bT* b_buf = (bT*)malloc(sizeof(bT)*dimk*effj);\n\n            bT* bp = b_buf;\n            for (long k=0; k<dimk; k++, bp += effj, b += ext_b)\n                memcpy(bp, b, sizeof(bT)*dimj);\n\n            b = b_buf;\n            ext_b = effj;\n        }\n\n        cT* c_work = c_buf;\n        /* mTxm */\n        for (long i=0; i<dimi; ++i,c_work+=effj,++a) {\n            for (long j=0; j<dimj; ++j) c_work[j] = 0.0;\n            const aT *aik_ptr = a;\n            for (long k=0; k<dimk; ++k,aik_ptr+=dimi) {\n                aT aki = *aik_ptr;\n                for (long j=0; j<dimj; ++j) {\n                    c_work[j] += aki*b[k*ext_b+j];\n                }\n            }\n        }\n\n        /* Copy c out if needed */\n        if (dimj%alignment) {\n            cT* ct = c_buf;\n            for (long i=0; i<dimi; i++, ct += effj, c += dimj)\n                memcpy(c, ct, sizeof(cT)*dimj);\n\n            free(c_buf);\n        }\n\n        /* Free the buffer for b */\n        if (free_b) free((bT*)b);\n    }\n\n#ifdef HAVE_IBMBGQ\n    extern void bgq_mtxmq_padded(long ni, long nj, long nk, long ej, \n            double* c, const double* a, const double* b);\n    extern void bgq_mtxmq_padded(long ni, long nj, long nk, long ej, \n            __complex__ double* c, const __complex__ double* a, const __complex__ double* b);\n    extern void bgq_mtxmq_padded(long ni, long nj, long nk, long ej, \n            __complex__ double* c, const double* a, const __complex__ double* b);\n    extern void bgq_mtxmq_padded(long ni, long nj, long nk, long ej, \n            __complex__ double* c, const __complex__ double* a, const double* b);\n\n    template <>\n        inline void mTxmq_padding(long ni, long nj, long nk, long ej, \n                double* c, const double* a, const double* b) {\n            bgq_mtxmq_padded(ni, nj, nk, ej, c, a, b);\n        }\n\n    template <>\n        inline void mTxmq_padding(long ni, long nj, long nk, long ej, \n                __complex__ double* c, const __complex__ double* a, const __complex__ double* b) {\n            bgq_mtxmq_padded(ni, nj, nk, ej, c, a, b);\n        }\n\n    template <>\n        inline void mTxmq_padding(long ni, long nj, long nk, long ej, \n                __complex__ double* c, const double* a, const __complex__ double* b) {\n            bgq_mtxmq_padded(ni, nj, nk, ej, c, a, b);\n        }\n\n    template <>\n        inline void mTxmq_padding(long ni, long nj, long nk, long ej, \n                __complex__ double* c, const __complex__ double* a, const double* b) {\n            bgq_mtxmq_padded(ni, nj, nk, ej, c, a, b);\n        }\n#elif defined(HAVE_IBMBGP)\n    extern void bgpmTxmq(long ni, long nj, long nk, double* MADNESS_RESTRICT c, \n                         const double* a, const double* b);\n    extern void bgpmTxmq(long ni, long nj, long nk, double_complex* MADNESS_RESTRICT c, \n                         const double_complex* a, const double_complex* b);\n \n    template <>\n    inline void mTxmq(long ni, long nj, long nk, double* MADNESS_RESTRICT c, const double* a, const double* b) {\n        bgpmTxmq(ni, nj, nk, c, a, b);\n    }\n\n    template <>\n    inline void mTxmq(long ni, long nj, long nk, double_complex* MADNESS_RESTRICT c, const double_complex* a, const double_complex* b) {\n        bgpmTxmq(ni, nj, nk, c, a, b);\n    }\n\n// #elif defined(X86_64) && !defined(DISABLE_SSE3)\n//     template <>\n//     void mTxmq(long dimi, long dimj, long dimk,\n//                double* MADNESS_RESTRICT c, const double* a, const double* b);\n\n//     template <>\n//     void mTxmq(long dimi, long dimj, long dimk,\n//                double_complex* MADNESS_RESTRICT c, const double_complex* a, const double_complex* b);\n\n// #ifndef __INTEL_COMPILER\n//     template <>\n//     void mTxmq(long dimi, long dimj, long dimk,\n//                double_complex* MADNESS_RESTRICT c, const double_complex* a, const double* b);\n// #endif\n\n// #elif defined(X86_32)\n//     template <>\n//     void mTxmq(long dimi, long dimj, long dimk,\n//                double* MADNESS_RESTRICT c, const double* a, const double* b);\n#endif // HAVE_IBMBGQ\n\n#endif // HAVE_INTEL_MKL\n    \n}    \n#endif // MADNESS_TENSOR_MXM_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/oldtest.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id: test.cc 1105 2009-03-28 20:58:10Z rjharrison $\n*/\n\n//  !!! This file is deprecated ... contents are being slowly\n//  migrated into test.cc (using Google test environment)\n\n\n#include <madness/tensor/tensor.h>\n\n#include <iostream>\n#include <cstdio>\n#include <complex>\n#include <cmath>\n#include <cstdlib>\n#include <ctime>\n#include <madness/world/print.h>\n\n/// \\file tensor/oldtest.cc\n/// \\brief Test code for Tensor, TensorIterator, SliceTensor, etc.\n\nusing namespace madness;\n\ntypedef std::complex<float> float_complex;\ntypedef std::complex<double> double_complex;\n\nvoid error(const char *msg, int code) {\n    std::cerr << msg << \" \" << code << std::endl;\n    std::exit(1);\n}\n\ntemplate <typename T> double mynorm(T x) {\n    return ((double) x)*x;\n}\n\ntemplate <> double mynorm<float_complex>(float_complex x) {\n    return (double) std::norm(x);\n}\n\ntemplate <> double mynorm<double_complex>(double_complex x) {\n    return (double) std::norm(x);\n}\n\ntemplate <typename T, typename Q>\ninline\nbool\ncheck(const T& t, const Q& q, double tol=1e-7) {\n    double err = std::abs(t - (T)q)/std::max<double>(std::abs(t),1.0);\n    bool ok = (err <= tol);\n    if (!ok) {\n        std::cout.setf(std::ios::scientific);\n        std::cout << \"check failed \" << t << \" \" << q << \" \" << err << \" \" << tol << std::endl;\n    }\n    return ok;\n}\n\n\ntemplate <typename T, typename Q> void Test1() {\n    //\n    // Test basic declarations & type conversions.\n    //\n\n    try {\n\n        Tensor<T> t;\n        std::cout << \"t\\n\";\n        std::cout << t.ndim() << std::endl;\n        std::cout << t.size() << std::endl;\n\n        Tensor<Q> q1(1);\n        std::cout << \"q1\\n\";\n        std::cout << q1.ndim() << std::endl;\n        std::cout << q1.size() << std::endl;\n        std::cout << q1.dim(0) << std::endl;\n        std::cout << q1.stride(0) << std::endl;\n        Tensor<Q> q2(1,2);\n        std::cout << q1.ndim() << std::endl;\n        Tensor<Q> q3(1,2,3);\n        std::cout << q1.ndim() << std::endl;\n        Tensor<Q> q4(1,2,3,4);\n        std::cout << q1.ndim() << std::endl;\n        Tensor<Q> q5(1,2,3,4,5);\n        std::cout << q1.ndim() << std::endl;\n        Tensor<Q> q6(1,2,3,4,5,6);\n        std::cout << q1.ndim() << std::endl;\n\n        long d[] = {4,3,2,1};\n        Tensor<Q> qg(4L,d);\n\n        // should be initialized to zero\n        t = Tensor<T>(q1);\n        std::cout << t;\n        ITERATOR1(t,if (q1(IND1) != 0) error(\"test1: failed\",10));\n        t = Tensor<T>(q2);\n        ITERATOR2(t,if (q2(IND2) != 0) error(\"test1: failed\",20));\n        t = Tensor<T>(q3);\n        ITERATOR3(t,if (q3(IND3) != 0) error(\"test1: failed\",30));\n        t = Tensor<T>(q4);\n        ITERATOR4(t,if (q4(IND4) != 0) error(\"test1: failed\",40));\n        t = Tensor<T>(q5);\n        ITERATOR5(t,if (q5(IND5) != 0) error(\"test1: failed\",50));\n        t = Tensor<T>(q6);\n        ITERATOR6(t,if (q6(IND6) != 0) error(\"test1: failed\",60));\n\n        long count;\n        q1.fillindex();\n        count = 0;\n        ITERATOR1(q1,if (q1(IND1) != count++) error(\"test1: failed\",110));\n        q2.fillindex();\n        count = 0;\n        ITERATOR2(q2,if (q2(IND2) != count++) error(\"test1: failed\",210));\n        q3.fillindex();\n        count = 0;\n        ITERATOR3(q3,if (q3(IND3) != count++) error(\"test1: failed\",310));\n        q4.fillindex();\n        count = 0;\n        ITERATOR4(q4,if (q4(IND4) != count++) error(\"test1: failed\",410));\n        q5.fillindex();\n        count = 0;\n        ITERATOR5(q5,if (q5(IND5) != count++) error(\"test1: failed\",510));\n        q6.fillindex();\n        count = 0;\n        ITERATOR6(q6,if (q6(IND6) != count++) error(\"test1: failed\",610));\n\n        q1.fillrandom();\n        q2.fillrandom();\n        q3.fillrandom();\n        q4.fillrandom();\n        q5.fillrandom();\n        q6.fillrandom();\n        if (q1.id() == TensorTypeData<long>::id) {\n            q1.fillindex();\n            q2.fillindex();\n            q3.fillindex();\n            q4.fillindex();\n            q5.fillindex();\n            q6.fillindex();\n        }\n\n\n        // if T != Q, this is type conversion with deep copy performed\n        // by first converting Q to a new tensor of type T, and then\n        // doing shallow assignment of same type.\n\n        // if T == Q, this is actually a shallow copy ...\n        t = Tensor<T>(q1);\n        ITERATOR1(t,if (!check(t(IND1),q1(IND1))) error(\"test1: failed\",1));\n        t = Tensor<T>(q2);\n        std::cout << \"q2\\n\" << q2 << std::endl;\n        std::cout << \"t\\n\" << t << std::endl;\n        ITERATOR2(t,if (!check(t(IND2),q2(IND2))) error(\"test1: failed\",2));\n        t = Tensor<T>(q3);\n        ITERATOR3(t,if (!check(t(IND3),q3(IND3))) error(\"test1: failed\",3));\n        t = Tensor<T>(q4);\n        ITERATOR4(t,if (!check(t(IND4),q4(IND4))) error(\"test1: failed\",4));\n        t = Tensor<T>(q5);\n        ITERATOR5(t,if (!check(t(IND5),q5(IND5))) error(\"test1: failed\",5));\n        t = Tensor<T>(q6);\n        ITERATOR6(t,if (!check(t(IND6),q6(IND6))) error(\"test1: failed\",6));\n\n    }\n    catch (const TensorException& e) {\n        std::cout << \"This exception is unexpected\\n\";\n        std::cout << e;\n        std::exit(1);\n    }\n\n    std::cout << \"Test1<\" << tensor_type_names[TensorTypeData<T>::id] << \",\" <<\n              tensor_type_names[TensorTypeData<Q>::id] << \"> OK\" << std::endl;\n}\n\n\ntemplate <typename T> void Test3() {\n    // printing\n\n    Tensor<T> t(3,4,5);\n    ITERATOR3(t,t(_i,_j,_k) = _i*10000 + _j*100 + _k);\n\n    std::cout << std::endl << t ;\n\n    std::cout << \"Test3<\" << tensor_type_names[TensorTypeData<T>::id] <<\n              \"> ... verify elements are 10000*i + 100*j + k \\n\";\n}\n\ntemplate <class T> void Test5() {\n    // arithmetic\n    Tensor<T> a(2,7,5,2,11), b(2,7,5,2,11), c(2,7,5,2,11), d(2,7,5,2,11), e, f;\n    a.fillrandom();\n    b.fillrandom();\n    c.fillrandom();\n    d.fillrandom();\n\n    if (a.id() == TensorTypeData<long>::id) {\n        // Random number generates really big numbers that screw up the\n        // testing logic and cause overflow ... replace with index\n        a.fillindex();\n        b.fillindex();\n        c.fillindex();\n        d.fillindex();\n    }\n\n    e = a*0.125;\n    ITERATOR5(e,if (e(IND5) != (T)(a(IND5)*0.125)) error(\"test5: failed\",0));\n\n    f = 0.125*a;\n    ITERATOR5(e,if (f(IND5) != (T)(0.125*a(IND5))) error(\"test5: failed\",1));\n    ITERATOR5(e,if (e(IND5) != f(IND5)) {\n        std::cout << e(IND5) <<\" \" << f(IND5) << std::endl;\n        error(\"test5: failed\",2);\n    }\n             );\n\n    e = a + b;\n    std::cout.setf(std::ios::scientific);\n    ITERATOR5(e,if (!check(e(IND5),(T)(a(IND5)+b(IND5)))) {\n        std::cout << e(IND5) << \" \" << a(IND5)+b(IND5) << \" \" << e(IND5)-(a(IND5)+b(IND5)) << std::endl;\n        error(\"test5: failed\",200);\n    }\n             );\n\n    e = a - b;\n    ITERATOR5(e,if (!check(e(IND5),a(IND5)-b(IND5))) error(\"test5: failed\",3));\n\n    e = b/32.0;\n    ITERATOR5(e,if (!check(e(IND5), b(IND5)/32.0)) error(\"test5: failed\",4));\n\n    e = a*3.14159 + b;\n    ITERATOR5(e,if (std::abs(e(IND5) - (T)(a(IND5)*3.14159 + b(IND5))) > 1e-7) { // 1e-7 for float\n        std::cout << _i << \" \" << _j << \" \" << _k << \" \" << _l << \" \" << _m << \" \" << e(IND5) << \" \" << (a(IND5)*3.14159 + b(IND5));\n        error(\"test5: failed\",5);\n    }\n             );\n\n    if (a.id() == TensorTypeData<long>::id) {\n        // Tensor expression does type conversion to integer for each\n        // intermediate ... elementwise converts only at the end\n        std::printf(\"skipping test6 for long\\n\");\n    }\n    else {\n        e = (a*3.14159 + b/37.0 - 81.0*c + d*99.0)/2.0;\n        ITERATOR5(e,if (std::abs(e(IND5) - (T)((a(IND5)*3.14159 + b(IND5)/37.0 - 81.0*c(IND5) + d(IND5)*99.0)/2.0)) > 1e-12)\n                  error(\"test5: failed\",6));\n    }\n\n    // unary-, inplace operations\n\n    f = -a;\n    ITERATOR5(e,if (f(IND5) != -a(IND5)) error(\"test5: failed\",7));\n\n    f = copy(e);\n    f += a;\n    ITERATOR5(e,if (std::abs(f(IND5) - e(IND5) - a(IND5)) > 1e-12)\n              error(\"test5: failed\",8));\n\n    f = copy(e);\n    f -= a;\n    ITERATOR5(e,if (std::abs(f(IND5) - e(IND5) + a(IND5)) > 1e-12)\n              error(\"test5: failed\",9));\n\n    f = copy(e);\n    f *= (T) 2;\n    ITERATOR5(e,if (std::abs(f(IND5) - ((T) 2)*e(IND5)) > 1e-12)\n              error(\"test5: failed\",10));\n\n    f = copy(e);\n    f *= (T) 2;\n    ITERATOR5(e,if (std::abs(f(IND5) - (T) 2*e(IND5)) > 1e-12)\n              error(\"test5: failed\",11));\n\n    f = copy(e);\n    f.emul(a);\n    ITERATOR5(e,if (std::abs(f(IND5) - e(IND5)*a(IND5)) > 1e-12)\n              error(\"test5: failed\",12));\n\n    f = copy(e);\n    f.gaxpy((T) 3.14159, a, (T) 2.71828);\n    ITERATOR5(e,if (!check(f(IND5),(e(IND5)*((T) 3.14159) + a(IND5)*((T) 2.71828)))) {\n        std::cout << \"F\\n\" << f;\n        std::cout << \"X\\n\" << (e*((T)3.14159)+ a*((T) 2.71828)) << std::endl;\n        error(\"test5: failed\",13);\n    }\n             );\n\n    std::cout << \"Test5<\" << tensor_type_names[TensorTypeData<T>::id] << \"> OK\\n\";\n}\n\ntemplate<class T> \nvoid Test6a(Tensor<T> &f, long ind[])\n{\n  f.fill(0);\n  f(3,2,1,5) = (T) 1;\n  if (f.max() != (T) 1) error(\"test6: failed\",0);\n  if (f.max(ind) != (T) 1) error(\"test6: failed\",1);\n  if (ind[0]!=3 || ind[1]!=2 || ind[2]!=1 || ind[3]!=5)\n    error(\"test6: failed\",2);\n\n  f.fill(1);\n  f(3,2,1,5) = (T) -2;\n\n  if (f.min() != (T) -2) error(\"test6: failed\",6);\n  if (f.min(ind) != (T) -2) error(\"test6: failed\",7);\n  if (ind[0]!=3 || ind[1]!=2 || ind[2]!=1 || ind[3]!=5)\n    error(\"test6: failed\",8);\n}\n\ntemplate<>\nvoid Test6a(Tensor<float_complex> &, long [])\n{\n}\n\ntemplate<>\nvoid Test6a(Tensor<double_complex> &, long [])\n{\n}\n\ntemplate <class T> void Test6() {\n    // sum, min, max, absmin, absmax, normf, trace, and all that\n    // sum already tested above\n\n    Tensor<T> f(9,5,3,8), g(5,9,8,3);\n    long ind[TENSOR_MAXDIM];\n\n    Test6a(f, ind);\n\n    f.fill(0);\n    f(3,2,1,5) = (T) -1;\n    if (long(f.absmax()+0.0001) != 1) error(\"test6: failed\",3);\n    if (long(f.absmax(ind)+0.0001) != 1) error(\"test6: failed\",4);\n    if (ind[0]!=3 || ind[1]!=2 || ind[2]!=1 || ind[3]!=5)\n        error(\"test6: failed\",5);\n\n    f.fill(-12);\n    f(3,2,1,5) = (T) -2;\n    if (long(f.absmin()+1e-5) != 2) error(\"test6: failed\",9);\n    if (long(f.absmin(ind)+1e-5) != 2) error(\"test6: failed\",10);\n    if (ind[0]!=3 || ind[1]!=2 || ind[2]!=1 || ind[3]!=5)\n        error(\"test6: failed\",11);\n\n    f.fillindex();\n    double x = f.normf(), s=0.0;\n    ITERATOR4(f,s+=mynorm(f(IND4)));\n    std::cout << x << \" \" << sqrt(s) << \"\\n\";\n    if (std::abs(std::sqrt(s) - x) > x*1e-6) error(\"test6: failed\",12);\n\n    g = g.fillindex().swapdim(0,1).swapdim(-1,-2);\n    T y = f.trace(g);\n    T z = g.trace(f);\n    std::cout << y << \" \" << z << std::endl;\n    if (std::abs(y-z) > 2e-6*std::abs(y)) error(\"test6: failed\",13);\n    T q = 0;\n    ITERATOR4(f,q+=f(IND4)*g(IND4));\n    if (std::abs(y-q) > 1e-6*std::abs(y)) error(\"test6: failed\",14);\n\n\n//   double_complex sum1=0, sum2=t4.trace(t5), sum3=t5.trace(t4);\n\n//   ITERATOR(t4,sum1+=t4(_i,_j,_k,_l,_m,_n)*t5(_i,_j,_k,_l,_m,_n));\n//   std::printf(\"trace test: %f %f     %f %f    %f %f\\n\",\n// \t      std::real(sum1),std::imag(sum1),\n// \t      std::real(sum2),std::imag(sum2),\n// \t      std::real(sum3),std::imag(sum3));\n\n\n    std::cout << \"Test6<\" << tensor_type_names[TensorTypeData<T>::id] << \"> OK\\n\";\n\n}\n\ntemplate <class T> void Test7() {\n    // inner, outer, transform ...\n    Tensor<T> fred(12,13),dave(14,13);\n\n    fred.fillrandom();\n    dave.fillrandom();\n\n    Tensor<T> george = outer(fred,dave);\n\n    ITERATOR4(george,\n              if (std::abs(george(_i,_j,_k,_l) - fred(_i,_j)*dave(_k,_l)) > 2e-7) {\n                  madness::print(george(_i,_j,_k,_l)- fred(_i,_j)*dave(_k,_l));\n                  error(\"test7: failed\",1);\n                  });\n\n    Tensor<T> mary = inner(fred,dave,-1,-1);\n\n    ITERATOR2(mary,\n              T sum = 0;\n              for (int k=0; k<fred.dim(1); ++k) sum += fred(_i,k)*dave(_j,k);\n              if (std::abs(sum-mary(_i,_j))> std::abs(sum)*1e-6) error(\"test7: failed\",2));\n    dave = dave.swapdim(0,1);\n    mary = inner(fred,dave);\n    ITERATOR2(mary,\n              T sum = 0;\n              for (int k=0; k<fred.dim(1); ++k) sum += fred(_i,k)*dave(k,_j);\n              if (std::abs(sum-mary(_i,_j))> std::abs(sum)*1e-6) error(\"test7: failed\",3));\n\n    Tensor<T> alfred(3,4,5,6),samantha(7,5,8,2);\n    alfred.fillrandom();\n    samantha.fillrandom();\n    Tensor<T> john = inner(alfred,samantha,2,1);\n    ITERATOR6(john,\n              T sum = 0;\n              for (int k=0; k<alfred.dim(2); ++k) sum += alfred(_i,_j,k,_k)*samantha(_l,k,_m,_n);\n              if (std::abs(sum-john(_i,_j,_k,_l,_m,_n))> std::abs(sum)*1e-6) error(\"test7: failed\",4));\n\n\n    alfred   = Tensor<T>(6,5,4,6);\n    samantha = Tensor<T>(6,7,8,6);\n    alfred.fillrandom();\n    samantha.fillrandom();\n\n    john = inner(alfred,samantha,0,0);\n    ITERATOR6(john,\n              T sum = 0;\n              for (int k=0; k<alfred.dim(0); ++k) sum += alfred(k,_i,_j,_k)*samantha(k,_l,_m,_n);\n    if (std::abs(sum-john(_i,_j,_k,_l,_m,_n))> std::abs(sum)*1e-6) {\n        std::cout << sum << \" \" << john(_i,_j,_k,_l,_m,_n) << \" \" << sum - john(_i,_j,_k,_l,_m,_n) << std::endl;\n            error(\"test7: failed\",410);\n        }\n             );\n\n    john = inner(alfred,samantha,0,-1);\n    ITERATOR6(john,\n              T sum = 0;\n              for (int k=0; k<alfred.dim(0); ++k) sum += alfred(k,_i,_j,_k)*samantha(_l,_m,_n,k);\n              if (std::abs(sum-john(_i,_j,_k,_l,_m,_n))> std::abs(sum)*1e-6) error(\"test7: failed\",411));\n\n    john = inner(alfred,samantha,-1,0);\n    ITERATOR6(john,\n              T sum = 0;\n              for (int k=0; k<alfred.dim(0); ++k) sum += alfred(_i,_j,_k,k)*samantha(k,_l,_m,_n);\n              if (std::abs(sum-john(_i,_j,_k,_l,_m,_n))> std::abs(sum)*1e-6) error(\"test7: failed\",412));\n\n    john = inner(alfred,samantha,-1,-1);\n    ITERATOR6(john,\n              T sum = 0;\n              for (int k=0; k<alfred.dim(0); ++k) sum += alfred(_i,_j,_k,k)*samantha(_l,_m,_n,k);\n              if (std::abs(sum-john(_i,_j,_k,_l,_m,_n))> std::abs(sum)*1e-6) error(\"test7: failed\",413));\n\n\n    const long n = 8; // Was 5 but changed to even value to test fast_transform\n    Tensor<T> x(n,n,n,n);\n    Tensor<T> r(n,n,n,n);\n    Tensor<T> c(n,n);\n    x.fillrandom();\n    c.fillrandom();\n    x -= (T) 0.5;\n    c -= (T) 0.5;\n\n    std::cout << c;\n    Tensor<T> q = inner(x,c,0,0);\n    Tensor<T> qq(n,n,n,n);\n    for (int i=0; i<n; ++i) {\n        for (int j=0; j<n; ++j) {\n            for (int k=0; k<n; ++k) {\n                for (int l=0; l<n; ++l) {\n                    T sum = 0;\n                    for (int ii=0; ii<n; ++ii) {\n                        sum += x(ii,j,k,l)*c(ii,i);\n                    }\n                    if (!check(sum,q(j,k,l,i),1e-5)) {\n                        std::cout << sum << \" \" << q(j,k,l,i) << \" \" << sum-q(j,k,l,i) << std::endl;\n                        error(\"test7: failed\",41);\n                    }\n                }\n            }\n        }\n    }\n\n    Tensor<T> y = transform(x,c);\n    r.fill(0);\n    // stupid n^8 loop (rather than n^5 optimal) to ensure correctness\n    for (int i=0; i<n; ++i) {\n        for (int ii=0; ii<n; ++ii) {\n            for (int j=0; j<n; ++j) {\n                for (int jj=0; jj<n; ++jj) {\n                    for (int k=0; k<n; ++k) {\n\n                        for (int kk=0; kk<n; ++kk) {\n                            for (int l=0; l<n; ++l) {\n                                for (int ll=0; ll<n; ++ll) {\n                                    r(i,j,k,l) += x(ii,jj,kk,ll)*c(ii,i)*c(jj,j)*c(kk,k)*c(ll,l);\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    if ((r-y).normf() > 1e-5*r.normf()) error(\"test7: failed\",5);\n\n    r = copy(x);\n    Tensor<T> workspace = copy(x);\n    fast_transform(x,c,r,workspace);\n    if ((r-y).normf() > 1e-6*r.normf()) {\n        std::cout << \"R\\n\";\n        std::cout << r;\n        std::cout << \"Y\\n\";\n        std::cout << y;\n        error(\"test7: failed\",555);\n    }\n\n    x = Tensor<T>(n,n,n,n,n);\t// odd # dimensions\n    x.fillrandom();\n    x -= (T) 0.5;\n    y = transform(x,c);\n    workspace = copy(x);\n    r = copy(x);\n    fast_transform(x,c,r,workspace);\n    if ((r-y).normf() > 1e-6*r.normf()) error(\"test7: failed\",666);\n\n\n    r = Tensor<T>(7,9);\n    x = Tensor<T>(9);\n    y = Tensor<T>(7);\n    r.fillrandom();\n    x.fillrandom();\n\n    double tol = r.normf()*x.normf()*1e-6;\n\n    if ((inner(r,x)-inner(x,r.swapdim(0,1))).normf() > tol)\n        error(\"test7: failed\",6);\n\n    c = inner(r,x);\n    for (int i=0; i<7; ++i) {\n        T sum = 0;\n        for (int j=0; j<9; ++j) sum += r(i,j)*x(j);\n        //std::cout << i << \" -> \" << sum << \" \" << c(i) << std::endl;\n        if (std::abs(sum-c(i)) > tol) error(\"test7: failed\",7);\n    }\n\n\n    long NNN=24;\n    r = Tensor<T>(NNN,NNN,NNN); // result\n    y = Tensor<T>(NNN,NNN,NNN); // workspace\n    x = Tensor<T>(NNN,NNN,NNN); // input\n    c = Tensor<T>(NNN,NNN);\n    x.fillrandom();\n    c.fillrandom();\n    double start = std::clock();\n    const int niter = 200;\n    for (long i=0; i<niter; ++i) {\n        fast_transform(x,c,r,y);\n    }\n    double used = (std::clock()-start)/CLOCKS_PER_SEC;\n    double mops = niter*2*3*1e-6*double(NNN)*double(NNN)*double(NNN)*NNN/used;\n    std::cout << \"TRANSFORM MOPS=\" << mops << \"   \" << used << std::endl;\n\n    std::cout << \"Test7<\" << tensor_type_names[TensorTypeData<T>::id] << \"> OK\\n\";\n}\n\ntemplate <class T> void Test8() {\n    // test complex only operations and type restrictions\n}\n\nint main() {\n\n    std::cout << \"bounds checking enabled = \" << Tensor<double>::bounds_checking()\n              << std::endl;\n\n    Tensor<double> a(2);\n    std::cout << \"made A\\n\";\n    try {\n        std::cout << \"testing access\\n\";\n        std::cout << a(2) << std::endl;\n        if (a.bounds_checking()) error(\"bounds check failed to detect error\",1);\n    }\n    catch (const TensorException& e) {\n        std::cout << \"If bounds checking, this exception was expected\" << std::endl;\n        std::cout << e;\n        if (!a.bounds_checking())\n            error(\"bounds checking was not enabled\",0);\n    }\n    try {\n        std::cout << a(-1) << std::endl;\n        if (a.bounds_checking()) error(\"bounds check failed to detect error\",2);\n    }\n    catch (const TensorException& e) {\n        std::cout << \"If bounds checking, this exception was expected\" << std::endl;\n        std::cout << e;\n        if (!a.bounds_checking())\n            error(\"bounds checking was not enabled\",0);\n    }\n\n    Test1<double,double>();\n    Test1<double,long>();\n    Test1<long,double>();\n    Test1<double,float>();\n    Test1<float,double>();\n    Test1<double_complex,double>();\n    Test1<double_complex,long>();\n    Test1<float_complex,float>();\n    //Test1<double,double_complex>(); // Correctly fails to compile\n\n    std::cout << \"\\n after test1 count=\" <<\n              Tensor<long>().get_instance_count() << std::endl;\n\n    std::cout << std::endl;\n    Test3<double>();\n    Test3<long>();\n    Test3<float>();\n    Test3<float_complex>();\n    Test3<double_complex>();\n    std::cout << std::endl;\n    std::cout << \"\\n after test3 count=\" <<\n              Tensor<long>().get_instance_count() << std::endl;\n\n    std::cout << std::endl;\n\n    Test5<double>();\n    Test5<long>();\n    //Test5<float>();\n    //Test5<float_complex>(); // float * double -> mess\n    std::cout << \"skipping Test5<float/float_complex>\" << std::endl;\n    Test5<double_complex>();\n    std::cout << std::endl;\n    std::cout << \"\\n after test5 count=\" <<\n              Tensor<long>().get_instance_count() << std::endl;\n\n    std::cout << std::endl;\n    Test6<double>();\n    Test6<long>();\n    Test6<float>();\n    Test6<float_complex>();\n    Test6<double_complex>();\n    std::cout << std::endl;\n    std::cout << \"\\n after test6 count=\" <<\n              Tensor<long>().get_instance_count() << std::endl;\n\n    std::cout << std::endl;\n    Test7<double>();\n    Test7<float>();\n    Test7<float_complex>();\n    Test7<double_complex>();\n    std::cout << std::endl;\n\n    std::cout << \"\\n after tests count=\" <<\n              Tensor<long>().get_instance_count() << std::endl;\n\n    Tensor<double_complex> f(1);\n    Tensor<double> g = real(f);\n    // real(g);  // will not link ... since we did not instantiate invalid operations\n\n    std::cout << \"\\n\\n Tensor seems vaguely OK ... fingers crossed\\n\";\n\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/tensor/slice.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n/// \\file slice.h\n/// \\brief Declares and implements Slice\n/// \\ingroup tensor\n\n#ifndef MADNESS_TENSOR_SLICE_H__INCLUDED\n#define MADNESS_TENSOR_SLICE_H__INCLUDED\n\n#include <madness/tensor/vector_factory.h>\n\nnamespace madness {\n\n    /*!\n      \\brief A slice defines a sub-range or patch of a dimension.\n      \\ingroup tensor\n\n      \\par Introduction\n     \n      The slice \\c Slice(start,end,step) defines the subvector\n      \\code\n      [start, start+step, start+2*step, ..., end]\n      \\endcode\n      with indices as if generated from these loops\n      \\code\n      if (step > 0) \n          for (i=start; i<=end; i+=step) i;\n      else if (step < 0) \n          for (i=start; i>=end; i+=step) i;\n      else if (step == 0  && start == end) \n          defines a scalar\n      else \n          runtime error detected when slice is used\n      \\endcode\n      \n      Note that \\c start and \\c end are \\em inclusive, unlike the Python\n      convention of specifying end+1 (note that we \\em cannot do\n      this easily in C/C++ unless we also define a special value\n      to indicate the end of a dimension of unknown size).\n      \n      \\par Special meanings and conventions\n\n      Negative values for \\c start or \\c end (similar to Python)\n      are relative to the end of the (possibly unknown) dimension.\n      E.g.,\n      - \\c end=-1  is equivalent to    \\c end=dim-1\n      - \\c start=-4 is equivalent to \\c start=dim-4\n      -  \\c step=0 and \\c start==end implies dimension will be eliminated\n      when the slice is used to index a tensor\n      -  The default constructor specifies the entire dimension\n      -  If the input length is not an exact multiple of step, end is\n      rounded towards start to recover the behaviour of the\n      \\c <= or \\c >= bounds in the loops specified above.\n      \n      Special slices have been defined as constants\n      - \\c _ (1 underscore) = \\c Slice(0,-1,1) = full slice in current order\n      - \\c ___ (3 underscores) = Array of Slices with value \\c _ so that \\c t(___)\n      will generate an assignable view of the entire tensor \\c t .\n      - _reverse = \\c Slice(-1,0,-1) = full dimension reversed\n\n      \\par Examples\n\n      - \\c Slice() --- full slice in current order\n      - \\c Slice(0,-1,1) --- full slice in current order\n      - \\c Slice(3,3,0) --- eliminate this dimension setting index=3 (step=0)\n      - \\c Slice(3,3,1) --- reduce a dimension to length 1 using index=3 (step=1)\n      - \\c Slice(-1,0,-1) --- reverse a dimension\n      - \\c Slice(0,-1,2) --- use all even numbered elements\n      - \\c Slice(1,-1,2) --- use all odd numbered elements\n    */\n    class Slice {\n        \n    public:\n        long start;\n        long end;\n        long step;\n        \n        inline Slice() : start(0), end(-1), step(1) {};\n        inline Slice(long s, long e, long stp=1) : start(s), end(e), step(stp) {};\n        inline Slice& operator=(const Slice& s) {\n            start=s.start;\n            end=s.end;\n            step=s.step;\n            return *this;\n        };\n        template <typename Archive>\n        void serialize(Archive& ar) {\n        \tar & start & end & step;\n        }\n\n    };\n\n    std::ostream& operator<<(std::ostream& stream, const Slice& s);\n\n    static const Slice _(0,-1,1);\t/// Entire dimension\n    static const std::vector<Slice> ___ = vector_factory(_,_,_,_,_,_); /// Entire tensor\n    static const Slice _reverse(-1,0,-1); /// Reversed dimension\n\n}\n#endif // MADNESS_TENSOR_SLICE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/solvers.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/tensor/solvers.h>\n\nnamespace madness {\n\n\n    double OptimizationTargetInterface::test_gradient(Tensor<double>& x, double value_precision, bool doprint) {\n        const double eps = pow(value_precision,0.3333);\n        if (doprint) {\n            printf(\"\\n\");\n            printf(\"Testing gradient eps=%.1e\\n----------------\\n\", eps);\n            printf(\"  i            f-                 f+               ganalytic           gnumeric         err\\n\");\n            printf(\" ----  ------------------  ------------------  ------------------  ------------------  -------\\n\");\n        }\n        Tensor<double> tt = gradient(x);\n        int n = int(tt.dim(0));\n        double maxerr = 0.0;\n        for (int i=0; i<n; ++i) {\n            x[i] += eps;\n            double fp = value(x);\n            x[i] -= 2.0*eps;\n            double fm = value(x);\n            x[i] += eps;\n\n            double gg = 0.5*(fp-fm)/eps;\n            if (doprint)\n                printf(\"% 5d%20.12e%20.12e%20.12e%20.12e  %.1e\\n\", i, fm, fp, tt(i), gg, std::abs(tt(i)-gg));\n            maxerr = std::max(std::abs(gg-tt(i)),maxerr);\n        }\n        if (doprint) printf(\"\\n\");\n\n        return maxerr;\n    }\n\n\n    SteepestDescent::SteepestDescent(const std::shared_ptr<OptimizationTargetInterface>& tar,\n                                     double tol,\n                                     double value_precision,\n                                     double gradient_precision)\n        : target(tar)\n        , tol(tol)\n        , f(tol*1e16)\n        , gnorm(tol*1e16)\n    {\n        if (!target->provides_gradient()) throw \"Steepest descent requires the gradient\";\n    }\n\n    bool SteepestDescent::optimize(Tensor<double>& x) {\n        double step = 10.0;\n        double  fnew;\n        Tensor<double> g;\n        target->value_and_gradient(x,f,g);\n        gnorm = g.normf();\n        for (int i=0; i<100; ++i) {\n            while (1) {\n                Tensor<double> gnew;\n                x.gaxpy(1.0, g, -step);\n                target->value_and_gradient(x,fnew,gnew);\n                if (fnew < f) {\n                    f = fnew;\n                    g = gnew;\n                    break;\n                }\n                x.gaxpy(1.0, g, step);\n                step *= 0.5;\n                print(\"reducing step size\", f, fnew, step);\n            }\n            Tensor<double> g = target->gradient(x);\n            gnorm = g.normf();\n            print(\"iteration\",i,\"value\",f,\"gradient\",gnorm);\n            if (converged()) break;\n        }\n        return converged();\n    }\n\n    bool SteepestDescent::converged() const {return gnorm < tol;}\n\n    double SteepestDescent::gradient_norm() const {return gnorm;}\n\n    double SteepestDescent::value() const {return f;}\n\n    double QuasiNewton::line_search(double a1, double f0, double dxgrad,\n            const Tensor<double>& x, const Tensor<double>& dx,\n            std::shared_ptr<OptimizationTargetInterface> target1,\n            double value_precision) {\n        double f1, f2p;\n        double hess, a2;\n        const char* lsmode = \"\";\n\n        if (dxgrad*a1 > 0.0) {\n            print(\"    line search gradient +ve \", a1, dxgrad);\n            a1 = -a1;\n        }\n\n        f1 = target1->value(x + a1 * dx);\n\n        // Fit to a parabola using f0, g0, f1\n        hess = 2.0*(f1-f0-a1*dxgrad)/(a1*a1);\n        a2 = -dxgrad/hess;\n\n        if (std::abs(f1-f0) < value_precision) { // Insufficient precision\n            a2 = a1;\n            lsmode = \"fixed\";\n        }\n        else if (hess > 0.0) { // Positive curvature\n            if ((f1 - f0) <= -value_precision) { // Downhill\n                lsmode = \"downhill\";\n                if (std::abs(a2) > 4.0*std::abs(a1)) {\n                    lsmode = \"restrict\";\n                    a2 = 4.0*a1;\n                }\n            }\n            else { // Uphill\n                lsmode = \"bracket\";\n            }\n        }\n        else { // Negative curvature\n            if ((f1 - f0) < value_precision) { // Downhill\n                lsmode = \"negative\";\n                a2 = 2e0*a1;\n            }\n            else {\n                lsmode = \"punt\";\n                a2 = a1;\n            }\n        }\n\n        f2p = f0 + dxgrad*a2 + 0.5*hess*a2*a2;\n        printf(\"   line search grad=%.2e hess=%.2e mode=%s newstep=%.3f\\n\", dxgrad, hess, lsmode, a2);\n        printf(\"                      predicted %.12e\\n\", f2p);\n\n        return a2;\n    }\n\n    void QuasiNewton::hessian_update_sr1(const Tensor<double>& s,\n            const Tensor<double>& y, Tensor<double>& hessian) {\n        Tensor<double> q = y - inner(hessian,s);\n        double qds = q.trace(s);\n        if (std::abs(qds) > 1e-8 * s.normf() * q.normf()) {\n            hessian += outer(q,q).scale(1.0/qds);\n        }\n        else {\n            printf(\"   SR1 not updating\\n\");\n        }\n    }\n\n\n    void QuasiNewton::hessian_update_bfgs(const Tensor<double>& dx,\n                const Tensor<double>& dg, Tensor<double>& hessian) {\n        /*\n          Apply the BFGS update to the approximate Hessian h[][].\n\n          h[][] = Hessian matrix from previous iteration\n          dx[]  = Step from previous iteration\n          .       (dx[] = x[] - xp[] where xp[] is the previous point)\n          dg[]  = gradient difference (dg = g - gp)\n        */\n\n        Tensor<double> hdx  = inner(hessian,dx);\n\n        double dxhdx = dx.trace(hdx);\n        double dxdx  = dx.trace(dx);\n        double dxdg  = dx.trace(dg);\n        double dgdg  = dg.trace(dg);\n\n        const int n=hessian.dim(0);\n        if ( (dxdx > 0.0) && (dgdg > 0.0) && (std::abs(dxdg/std::sqrt(dxdx*dgdg)) > 1.e-8) ) {\n            for (int i=0; i<n; ++i) {\n                for (int j=0; j<n; ++j) {\n                    hessian(i,j) += dg[i]*dg[j]/dxdg - hdx[i]*hdx[j]/dxhdx;\n                }\n            }\n        }\n        else {\n            printf(\"   BFGS not updating dxdg (%e), dgdg (%e), dxhdx (%f), dxdx(%e)\\n\" , dxdg, dgdg, dxhdx, dxdx);\n        }\n    }\n\n    Tensor<double> QuasiNewton::new_search_direction(const Tensor<double>& g) const {\n        Tensor<double> dx, s;\n        double tol = gradient_precision;\n        double trust = 1.0; // This applied in spectral basis\n\n        Tensor<double> v, e;\n        syev(h, v, e);\n\n        // Transform gradient into spectral basis\n        Tensor<double> gv = inner(g,v);\n\n        // Take step applying restriction\n        int nneg=0, nsmall=0, nrestrict=0;\n        for (int i=0; i<n; ++i) {\n            if (e[i] < -tol) {\n                if (printtest) printf(\"   forcing negative eigenvalue to be positive %d %.1e\\n\", i, e[i]);\n                nneg++;\n                //e[i] = -2.0*e[i]; // Enforce positive search direction\n                e[i] = -0.1*e[i]; // Enforce positive search direction\n            }\n            else if (e[i] < tol) {\n                if (printtest) printf(\"   forcing small eigenvalue to be positive %d %.1e\\n\", i, e[i]);\n                nsmall++;\n                e[i] = tol;\n            }\n\n            gv[i] = -gv[i] / e[i];\n            if (std::abs(gv[i]) > trust) { // Step restriction\n                double gvnew = trust*std::abs(gv(i))/gv[i];\n                if (printtest) printf(\"   restricting step in spectral direction %d %.1e --> %.1e\\n\", i, gv[i], gvnew);\n                nrestrict++;\n                gv[i] = gvnew;\n            }\n        }\n        if (nneg || nsmall || nrestrict) printf(\"   nneg=%d nsmall=%d nrestrict=%d\\n\", nneg, nsmall, nrestrict);\n\n        // Transform back from spectral basis\n        return inner(v,gv);\n    }\n\n    QuasiNewton::QuasiNewton(const std::shared_ptr<OptimizationTargetInterface>& tar,\n                             int maxiter,\n                             double tol,\n                             double value_precision,\n                             double gradient_precision)\n        : update(\"BFGS\")\n        , target(tar)\n        , maxiter(maxiter)\n        , tol(tol)\n        , value_precision(value_precision)\n        , gradient_precision(gradient_precision)\n        , f(tol*1e16)\n        , gnorm(tol*1e16)\n        , n(0)\n        , printtest(false)\n    {\n        if (!target->provides_gradient()) throw \"QuasiNewton requires the gradient\";\n    }\n\n    void QuasiNewton::set_update(const std::string& method) {\n        if (method == \"BFGS\" || method == \"SR1\") update=method;\n        else throw \"QuasiNewton: unknown update mthod\";\n    }\n\n    void QuasiNewton::set_test(const bool& test_level) {\n        printtest = test_level;\n    }\n\n    bool QuasiNewton::optimize(Tensor<double>& x) {\n//        int maxiter = 20; // !!!!!!!!! dumb\n        if (n != x.dim(0)) {\n            n = x.dim(0);\n            h = Tensor<double>();\n        }\n\n\n       if(printtest)  target->test_gradient(x, value_precision);\n\n        bool h_is_identity = (h.size() == 0);\n        if (h_is_identity) {\n            h = Tensor<double>(n,n);\n            for (int i=0; i<n; ++i) h(i,i) = 1.0;\n        }\n\n        // the previous gradient\n        Tensor<double> gp;\n        // the displacement\n        Tensor<double> dx;\n\n        for (int iter=0; iter<maxiter; ++iter) {\n            Tensor<double> g;\n            target->value_and_gradient(x, f, g);\n            gnorm = g.normf();\n            printf(\" QuasiNewton iteration %2d value %.12e gradient %.2e\\n\",iter,f,gnorm);\n            if (converged()) break;\n\n            if (iter == 1 && h_is_identity) {\n                // Default initial Hessian is scaled identity but\n                // prefer to reuse any existing approximation.\n                h.scale(g.trace(gp)/gp.trace(dx));\n            }\n\n            if (iter > 0) {\n                if (update == \"BFGS\") hessian_update_bfgs(dx, g-gp,h);\n                else hessian_update_sr1(dx, g-gp,h);\n            }\n\n            dx = new_search_direction(g);\n\n            double step = line_search(1.0, f, dx.trace(g), x, dx, target,\n                    value_precision);\n\n            dx.scale(step);\n            x += dx;\n            gp = g;\n        }\n\n        if (printtest) {\n            print(\"final hessian\");\n            print(h);\n        }\n        return converged();\n    }\n\n        bool QuasiNewton::converged() const {return gnorm < tol;}\n\n        double QuasiNewton::value() const {return f;}\n\n        double QuasiNewton::gradient_norm() const {return gnorm;}\n}\n"
  },
  {
    "path": "src/madness/tensor/solvers.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_LINALG_SOLVERS_H__INCLUDED\n#define MADNESS_LINALG_SOLVERS_H__INCLUDED\n\n#include <madness/tensor/tensor.h>\n#include <madness/world/print.h>\n#include <iostream>\n#include <madness/tensor/tensor_lapack.h>\n\n/*!\n  \\file solvers.h\n  \\brief Defines interfaces for optimization and non-linear equation solvers\n  \\ingroup solvers\n*/\n\nnamespace madness {\n\n    /*!\n      \\brief Solves non-linear equation using KAIN (returns coefficients to compute next vector)\n\n      \\ingroup solvers\n\n      The Krylov-accelerated inexact-Newton method employs directional\n      derivatives to estimate the Jacobian in the subspace and\n      separately computes updates in the subspace and its complement.\n\n      We wish to solve the non-linear equations \\f$ f(x)=0 \\f$ where\n      \\f$ f \\f$ and \\f$ x \\f$ are vectors of the same dimension (e.g.,\n      consider both being MADNESS functions).\n\n      Define the following matrices and vector (with \\f$ i \\f$ and \\f$\n      j \\f$ denoting previous iterations in the Krylov subspace and\n      \\f$ m \\f$ the current iteration):\n      \\f{eqnarray*}{\n      Q_{i j} & = & \\langle x_i \\mid f_j \\rangle \\\\\n      A_{i j} & = & \\langle x_i - x_m \\mid f_j - f_m \\rangle = Q_{i j} - Q_{m j} - Q_{i m} + Q{m m} \\\\\n      b_i & =& -\\langle x_i - x_m \\mid f_m \\rangle = -Q_{i m} + Q_{m m}\n      \\f}\n      The subspace equation is of dimension \\f$ m \\f$ (assuming iterations\n      are indexed from zero) and is given by\n      \\f[\n      A c = b\n      \\f]\n      The interior and exterior updates may be combined into one simple expression\n      as follows. First, define an additional element of the solution vector\n      \\f[\n      c_m = 1 - \\sum_{i<m} c_i\n      \\f]\n      and then the new vector (guess for next iteration) is given by\n      \\f[\n      x_{m+1} = \\sum_{i \\le m}{c_i ( x_i - f_i)}\n      \\f]\n\n      To employ the solver, each iteration\n      -# Compute the additional row and column of the matrix \\f$ Q \\f$\n      that is the inner product between solution vectors (\\f$ x_i \\f$) and residuals\n      (\\f$ f_j \\f$).\n      -# Call this routine to compute the coefficients \\f$ c \\f$ and from these\n      compute the next solution vector\n      -# Employ step restriction or line search as necessary to ensure stable/robust solution.\n\n      @param[in] Q The matrix of inner products between subspace vectors and residuals.\n      @param[in] rcond Threshold for discarding small singular values in the subspace equations.\n      @return Vector for computing next solution vector\n    */\n    template <typename T>\n    Tensor<T> KAIN(const Tensor<T>& Q, double rcond=1e-12) {\n        const int nvec = Q.dim(0);\n        const int m = nvec-1;\n\n        if (nvec == 1) {\n            Tensor<T> c(1);\n            c(0L) = 1.0;\n            return c;\n        }\n\n        Tensor<T> A(m,m);\n        Tensor<T> b(m);\n        for (long i=0; i<m; ++i) {\n            b(i) = Q(m,m) - Q(i,m);\n            for (long j=0; j<m; ++j) {\n                A(i,j) = Q(i,j) - Q(m,j) - Q(i,m) + Q(m,m);\n            }\n        }\n\n    //     print(\"Q\");\n    //     print(Q);\n    //     print(\"A\");\n    //     print(A);\n    //     print(\"b\");\n    //     print(b);\n\n        Tensor<T> x;\n        Tensor<double> s, sumsq;\n        long rank;\n        gelss(A, b, rcond, x, s, rank, sumsq);\n//         print(\"singular values\", s);\n//         print(\"rank\", rank);\n//         print(\"solution\", x);\n\n        Tensor<T> c(nvec);\n        T sumC = 0.0;\n        for (long i=0; i<m; ++i) sumC += x(i);\n        c(Slice(0,m-1)) = x;\n//         print(\"SUMC\", nvec, m, sumC);\n        c(m) = 1.0 - sumC;\n\n//         print(\"returned C\", c);\n\n        return c;\n    }\n\n\n    /// The interface to be provided by targets for non-linear equation solver\n\n    /// \\ingroup solvers\n    struct SolverTargetInterface {\n        /// Should return the resdiual (vector F(x))\n        virtual Tensor<double> residual(const Tensor<double>& x) = 0;\n\n        /// Override this to return \\c true if the Jacobian is implemented\n        virtual bool provides_jacobian() const {return false;}\n\n        /// Some solvers require the jacobian or are faster if an analytic form is available\n\n        /// J(i,j) = partial F[i] over partial x[j] where F(x) is the vector valued residual\n        virtual Tensor<double> jacobian(const Tensor<double>& x) {\n            throw \"not implemented\";\n        }\n\n        /// Implement this if advantageous to compute residual and jacobian simultaneously\n        virtual void residual_and_jacobian(const Tensor<double>& x,\n                                           Tensor<double>& residual, Tensor<double>& jacobian) {\n            residual = this->residual(x);\n            jacobian = this->jacobian(x);\n        }\n\n        virtual ~SolverTargetInterface() {}\n    };\n\n\n    /// The interface to be provided by functions to be optimized\n\n    /// \\ingroup solvers\n    struct OptimizationTargetInterface {\n        /// Should return the value of the objective function\n        virtual double value(const Tensor<double>& x) = 0;\n\n        /// Override this to return true if the derivative is implemented\n        virtual bool provides_gradient() const {return false;}\n\n        /// Should return the derivative of the function\n        virtual Tensor<double> gradient(const Tensor<double>& x) {\n            throw \"not implemented\";\n        }\n\n        /// Reimplement if more efficient to evaluate both value and gradient in one call\n        virtual void value_and_gradient(const Tensor<double>& x,\n                                        double& value,\n                                        Tensor<double>& gradient) {\n            value = this->value(x);\n            gradient = this->gradient(x);\n        }\n\n        /// Numerical test of the derivative ... optionally prints to stdout, returns max abs error\n        double test_gradient(Tensor<double>& x, double value_precision, bool doprint=true);\n\n\tvirtual ~OptimizationTargetInterface(){}\n    };\n\n\n    /// The interface to be provided by optimizers\n\n    /// \\ingroup solvers\n    struct OptimizerInterface {\n        virtual bool optimize(Tensor<double>& x) = 0;\n        virtual bool converged() const = 0;\n        virtual double value() const = 0;\n        virtual double gradient_norm() const = 0;\n\tvirtual ~OptimizerInterface(){}\n    };\n\n\n    /// Unconstrained minimization via steepest descent\n\n    /// \\ingroup solvers\n    class SteepestDescent : public OptimizerInterface {\n        std::shared_ptr<OptimizationTargetInterface> target;\n        const double tol;\n        double f;\n        double gnorm;\n\n    public:\n        SteepestDescent(const std::shared_ptr<OptimizationTargetInterface>& tar,\n                        double tol = 1e-6,\n                        double value_precision = 1e-12,\n                        double gradient_precision = 1e-12);\n\n        bool optimize(Tensor<double>& x);\n\n        bool converged() const;\n\n        double gradient_norm() const;\n\n        double value() const;\n\n        virtual ~SteepestDescent() { }\n    };\n\n\n    /// Optimization via quasi-Newton (BFGS or SR1 update)\n\n    /// \\ingroup solvers\n    /// This is presently not a low memory algorithm ... we really need one!\n    class QuasiNewton : public OptimizerInterface {\n    protected:\n        std::string update;              // One of BFGS or SR1\n        std::shared_ptr<OptimizationTargetInterface> target;\n        const int maxiter;\n        const double tol;\n        const double value_precision;  // Numerical precision of value\n        const double gradient_precision; // Numerical precision of each element of residual\n        double f;\n        double gnorm;\n        Tensor<double> h;\n        int n;\n        bool printtest;\n\n    public:\n\n        /// make this static for other QN classed to have access to it\n        static double line_search(double a1, double f0, double dxgrad,\n                const Tensor<double>& x, const Tensor<double>& dx,\n                std::shared_ptr<OptimizationTargetInterface> target,\n                double value_precision);\n\n        /// make this static for other QN classed to have access to it\n        static void hessian_update_sr1(const Tensor<double>& s, const Tensor<double>& y,\n                Tensor<double>& hessian);\n\n        /// make this static for other QN classed to have access to it\n        static void hessian_update_bfgs(const Tensor<double>& dx,\n                     const Tensor<double>& dg, Tensor<double>& hessian);\n\n        Tensor<double> new_search_direction(const Tensor<double>& g) const;\n\n    public:\n        QuasiNewton(const std::shared_ptr<OptimizationTargetInterface>& tar,\n                    int maxiter = 20,\n                    double tol = 1e-6,\n                    double value_precision = 1e-12,\n                    double gradient_precision = 1e-12);\n\n        /// Choose update method (currently only \"BFGS\" or \"SR1\")\n        void set_update(const std::string& method);\n\n        /// Choose update method (currently only \"BFGS\" or \"SR1\")\n        void set_test(const bool& test_level);\n\n        /// Runs the optimizer\n\n        /// @return True if converged\n        bool optimize(Tensor<double>& x);\n\n        /// After running the optimizer returns true if converged\n\n        /// @return True if converged\n        bool converged() const;\n\n        /// Value of objective function\n\n        /// @return Value of objective function\n        double value() const;\n\n        /// Resets Hessian to default guess\n        void reset_hessian() {h = Tensor<double>();}\n\n        /// Sets Hessian to given matrix\n        void set_hessian(const Tensor<double>& matrix) {h = madness::copy(matrix);}\n\n        /// Value of gradient norm\n\n        /// @return Norm of gradient of objective function\n        double gradient_norm() const;\n\n\tvirtual ~QuasiNewton() {}\n    };\n}\n\n#endif // MADNESS_LINALG_SOLVERS_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/srconf.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n/// \\file SRConf.h\n/// \\brief handles the low-level details of a separated representation tensor\n\n#ifndef SRCONF_H_\n#define SRCONF_H_\n\n//#define BENCH 0\n\n#include <madness/world/print.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/clapack.h>\n#include <madness/tensor/tensor_lapack.h>\n#include <list>\n#include<array>\n\nnamespace madness {\n\n\n\n#ifdef BENCH\n\tstatic double time_[30];\n#endif\n\n\n\ttemplate <class T> class GenTensor;\n    template <class T> class GenTensor;\n    template <class T> class SliceLowRankTensor;\n\n\t/**\n\t * A SRConf handles all the configurations in a Separated Representation.\n\t */\n\n\ttemplate <typename T>\n\tclass SRConf : public BaseTensor {\n\t\tfriend class GenTensor<T>;\n        friend class SliceLowRankTensor<T>;\n\n\t\t/// the scalar type of T\n\t\ttypedef typename Tensor<T>::scalar_type scalar_type;\n\t\ttypedef typename TensorTypeData<T>::float_scalar_type float_scalar_type;\n\tpublic:\n\n#ifdef BENCH\n\t\tstatic double& time(int i) {return time_[i];}\n#endif\n\n\t\ttypedef Tensor<T> tensorT;\n\n\t\t/// check orthonormality at low rank additions\n\t\tstatic const bool check_orthonormality=false;\n\n\t\t/// for each configuration the weight; length should be r\n\t\tTensor< typename Tensor<T>::scalar_type >  weights_;\n\n\t\t/// for each (physical) dimension one Tensor of (logical) dimension (r,k)\n\t\t/// for vectors or (r,kprime,k) for operators\n\t\tstd::array<Tensor<T>,2> vector_;\n\n\t\t/// separation dimensions: A(n,m) -> A(r,n) B(r,m), with n={k1,k2},m={k3,k4,k5..) multi-indices\n\t\tlong nci_left=-1;\n\n\t\t/// Slice containing the actual data in each vector, ignoring \"empty\" configurations;\n\t\t/// will maintain contiguity of the data.\n\t\tstd::vector<Slice> s0,s1;\n\t\t\n\tpublic:\n\n    \t/// return the index of the last singular vector/value to meet the threshold\n\t\t///        (returns -1 if all meet threshold, i.e. || A ||_2 < threshold)\n    \t/// given a matrix A in SVD form, truncate the singular values such that the\n    \t/// accuracy threshold is still met.\n    \t/// @param[in]\tthresh\tthe threshold eps: || A - A(truncated) || < eps\n    \t/// @param[in] \trank\tthe number of singular values in w\n    \t/// @param[in]\tw\t\tthe weights/singular values of A\n    \t/// @return\t\ti\t\tthe index of s_max to contribute: w(Slice(0,i)); i.e. inclusive!\n    \tstatic int max_sigma(const double& thresh, const long& rank, const Tensor<double>& w) {\n\n    \t    if (thresh<0.0) return rank-1;\n    \t\t// find the maximal singular value that's supposed to contribute\n    \t\t// singular values are ordered (largest first)\n    \t\tdouble residual=0.0;\n    \t\tlong i;\n    \t\tfor (i=rank-1; i>=0; i--) {\n    \t\t\tresidual+=w(i)*w(i);\n    \t\t\tif (residual>thresh*thresh) break;\n    \t\t}\n    \t\treturn i;\n    \t}\n\n\t\t/// default ctor\n\t\tSRConf() : nci_left(-1) {};\n\n\t\tSRConf(const long& ndim, const long* dimensions,\n\t\t\t\tconst long nci) : nci_left(nci) {\n    \t\tBaseTensor::set_dims_and_size(ndim,dimensions);\n\t\t\tif (nci_left<0) nci_left=ndim/2;\t// integer division\n\t\t\tmake_structure();\n\t\t}\n\n\t\tSRConf(const long& ndim, const std::array<long,TENSOR_MAXDIM>& dimensions,\n\t\t\t\tconst long nci) : SRConf(ndim,dimensions.data(),nci) {\n\t\t}\n\n\t\t/// copy ctor (tested); shallow copy\n\t\tSRConf(const SRConf& rhs) = default;\n\n\t\t/// ctor with provided weights and effective vectors; shallow copy\n\t\tSRConf(const Tensor<double>& weights, const std::vector<Tensor<T> >& vectors,\n\t\t\t\tconst long& ndim, const long& dims, const long nci)\n\t\t\t: SRConf(ndim,dims,nci) {\n\t\t\tMADNESS_ASSERT(vectors.size()==2);\n\t\t\tset_vectors_and_weights(weights,vectors[0],vectors[1]);\n\t\t\tmake_structure();\n            MADNESS_ASSERT(has_structure());\n\t\t\tMADNESS_ASSERT(check_dimensions());\n\t\t}\n\n\t\t/// explicit ctor with two vectors (aka SVD), shallow\n\t\tSRConf(const Tensor<double>& weights, const tensorT& vector1, const tensorT& vector2,\n\t\t\t\tconst long& ndim, const long* dims, const long nci)\n\t\t\t: SRConf(ndim,dims,nci) {\n\t\t\tset_vectors_and_weights(weights,vector1,vector2);\n\t\t\tmake_structure();\n\t\t\tMADNESS_ASSERT(check_dimensions());\n\t\t}\n\n\t\t/// assignment operator (tested), shallow copy of vectors\n\t\tSRConf& operator=(const SRConf& rhs)  {\n\n\t\t\t// check for self-assignment\n\t\t\tif (&rhs==this) return *this;\n\t\t\tif (rhs.has_no_data()) {\n\t\t\t\tclear();\n\t\t\t\treturn *this;\n\t\t\t}\n\n\t\t\t// these always hold\n\t\t\tnci_left=rhs.nci_left;\n    \t\tBaseTensor::set_dims_and_size(rhs.ndim(),rhs.dims());\n\t\t\ts0=rhs.s0;\n\t\t\ts1=rhs.s1;\n\n\t\t\tif (rhs.rank()==0) {\n\t\t\t\t// construct empty vector\n\t\t\t\tmake_empty_vectors_and_weights(0);\n\t\t\t\tmake_structure();\n\n\t\t\t} else {\n\t\t\t\t// assign vectors; shallow copy\n\t\t\t\tfor (unsigned int i=0; i<rhs.vector_.size(); i++) {\n\t\t\t\t\tvector_[i]=rhs.vector_[i];\n\t\t\t\t}\n\n\t\t\t\t// shallow copy\n\t\t\t\tweights_=(rhs.weights_);\n\n\t\t\t}\n            MADNESS_ASSERT(has_structure());\n\t\t\treturn *this;\n\t\t}\n\n\t\t/// assign a number to this;\n\t\tSRConf& operator=(const T& number) {\n\n\t\t\t// rank will be one\n\t\t\tthis->make_empty_vectors_and_weights(1);\n\t\t\tvector_[0]=number;\n\t\t\tvector_[1]=1.0;\n\t\t\tweights_(0l)=1.0;\n\t\t\tmake_structure();\n\t\t\tnormalize();\n\t\t    return *this;\n\t\t}\n\n\n    \tvoid set_size_and_dim(long ndim, long k) {\n    \t\tstd::array<long,TENSOR_MAXDIM> dims;\n    \t\tdims.fill(k);\n    \t\tBaseTensor::set_dims_and_size(ndim,dims.data());\n    \t}\n\n    \t/// deduce the dimensions of the left and right singular vectors from the tensor dimensions\n    \tstd::array<std::array<long,TENSOR_MAXDIM>, 2> make_vector_dimensions(const long rank) const {\n    \t\tstd::array<std::array<long,TENSOR_MAXDIM>, 2> dimensions;\n\t\t\tfor (int i=0; i<nci_left; ++i) dimensions[0][i+1]=this->dim(i);\n\t\t\tfor (int i=nci_left; i<ndim(); ++i) dimensions[1][i+1-nci_left]=this->dim(i);\n\n\t\t\tdimensions[0][0]=rank;\n\t\t\tdimensions[1][0]=rank;\n\t\t\treturn dimensions;\n    \t}\n\n    \tvoid make_empty_vectors_and_weights(const long rank) {\n    \t\tauto dimensions=make_vector_dimensions(rank);\n    \t\tweights_=Tensor<float_scalar_type>(rank);\n    \t\tvector_[0]=Tensor<T>(nci_left+1,dimensions[0].data());\n    \t\tvector_[1]=Tensor<T>(ndim()-nci_left+1,dimensions[1].data());\n    \t\tmake_structure();\n    \t}\n\n    \tvoid set_vectors_and_weights(const Tensor< typename Tensor<T>::scalar_type >&  weights,\n    \t\t\tconst Tensor<T>& vector1, const Tensor<T>& vector2) {\n    \t\tweights_=weights;\n    \t\tvector_={vector1,vector2};\n    \t\tmake_structure();\n    \t}\n\n    \tvoid clear() {\n    \t\tweights_.clear();\n    \t\tvector_[0].clear();\n    \t\tvector_[1].clear();\n            _size = 0;\n            _ndim = -1;\n    \t}\n\n\t\t/// return some of the terms of the SRConf (start,..,end), inclusively\n\t\t/// shallow copy\n\t\tconst SRConf get_configs(const int& start, const int& end) const {\n\n\t\t\tMADNESS_ASSERT((start>=0) and (end<=rank()));\n\n\t\t\tSlice s(start,end);\n\t\t\ttensorT v0,v1;\n\n\t\t\t// slice vectors\n\t\t\tv0=flat_vector(0)(s,_);\n\t\t\tv1=flat_vector(1)(s,_);\n\n\t\t\tSRConf<T> result(ndim(),dims(),nci_left);\n\t\t\tresult.set_vectors_and_weights(weights_(s),v0,v1);\n            MADNESS_ASSERT(result.has_structure());\n\t\t\treturn result;\n\t\t}\n\n\t\t/// dtor\n\t\t~SRConf() {}\n\n        template <typename Archive>\n        void serialize(Archive& ar) {\n              \tar & weights_ & vector_[0] & vector_[1] & nci_left & _ndim & _size\n\t\t\t\t\t& _id &  archive::wrap(_dim,TENSOR_MAXDIM) & s0 & s1;\n//              \tmake_slices();\n                MADNESS_ASSERT(has_structure());\n        }\n\n\t\t/// does this have any data?\n\t\tbool has_data() const {\n\t\t\treturn (size()!=0);\n\t\t}\n\n\t\t/// does this have any data?\n\t\tbool has_no_data() const {return !has_data();}\n\n\t\t/// return a Slice that corresponds the that part of vector_ that holds coefficients\n\t\tconst std::vector<Slice>& c0(const int idim) const {\n\t\t\tif (idim==0) return s0;\n\t\t\telse if (idim==1) return s1;\n\t\t\telse {\n\t\t\t\tMADNESS_EXCEPTION(\"invalid idim in SRConf::idim\",1);\n\t\t\t}\n\t\t}\n\n\t\t/// append configurations of rhs to this\n\n\t\t/// simplified version of inplace_add for flattened configurations\n\t\t/// *this += fac*rhs\n\t\tvoid append(const SRConf<T>& rhs, const double fac=1.0) {\n\n\t\t\t// fast return if possible\n\t\t\tif (rhs.has_no_data() or rhs.rank()==0) return;\n\t\t\tif (this->has_no_data() or rank()==0) {\n\t\t\t\t*this=copy(rhs);\n\t\t\t\tthis->scale(fac);\n\t\t\t\treturn;\n\t\t\t}\n\n    \t\tauto dimensions=make_vector_dimensions(rank()+rhs.rank());\n\t\t\tTensor<float_scalar_type> weights(rank()+rhs.rank());\n\t\t\tTensor<T> vector0(nci_left+1,dimensions[0].data());\n\t\t\tTensor<T> vector1(ndim()-nci_left+1,dimensions[1].data());\n\n\t\t\t// assign weights\n\t\t\tweights(Slice(0,rank()-1))=weights_(Slice(0,rank()-1));\n\t\t\tweights(Slice(rank(),rank()+rhs.rank()-1))=rhs.weights_(Slice(0,rhs.rank()-1))*fac;\n\n\t\t\tvector0(c0(0))=vector_[0](c0(0));\n\t\t\tvector1(c0(1))=vector_[1](c0(1));\n\n\t\t\tauto s00=s0;\n\t\t\tauto s10=s1;\n\t\t\ts00[0]=Slice(rank(),rank()+rhs.rank()-1);\n\t\t\ts10[0]=Slice(rank(),rank()+rhs.rank()-1);\n\n\t\t\tvector0(s00)=rhs.vector_[0](rhs.c0(0));\n\t\t\tvector1(s10)=rhs.vector_[1](rhs.c0(1));\n\n\t\t\tstd::swap(weights,weights_);\n\t\t\tstd::swap(vector0,vector_[0]);\n\t\t\tstd::swap(vector1,vector_[1]);\n\n\t\t\tmake_slices();\n            MADNESS_ASSERT(has_structure());\n\n\t\t}\n\n\t\tvoid append(const SRConf<T>& rhs, const double_complex fac=1.0) {\n\t\t\tMADNESS_EXCEPTION(\"no complex in SRConf\",1);\n\t\t}\n\n\tpublic:\n\t\t/// add two orthonormal configurations, yielding an optimal SVD decomposition\n\t\tvoid add_SVD(const SRConf<T>& rhs, const double& thresh) {\n#ifdef BENCH\n\t\t\tdouble cpu0=wall_time();\n#endif\n\t\t\tif (rhs.has_no_data() or rhs.rank()==0) return;\n\t\t\tif (has_no_data() or rank()==0) {\n\t\t\t\t*this=rhs;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (check_orthonormality) check_right_orthonormality();\n            if (check_orthonormality) rhs.check_right_orthonormality();\n\n//            Tensor<T> x1=flat_vector(0);\n//            Tensor<T> x2=flat_vector(1);\n            Tensor<T> x1=vector_[0].reshape(rank(),kVec(0));\n            Tensor<T> x2=vector_[1].reshape(rank(),kVec(1));\n            ortho5(x1,x2,weights_,\n\t\t\t\t\trhs.flat_vector(0),rhs.flat_vector(1),rhs.weights_,thresh);\n            std::swap(x1,vector_[0]);\n            std::swap(x2,vector_[1]);\n\n\t\t\tmake_structure();\n\t\t\tmake_slices();\n            MADNESS_ASSERT(has_structure());\n#ifdef BENCH\n\t\t\tdouble cpu1=wall_time();\n\t\t\ttime(25)+=cpu1-cpu0;\n#endif\n\t\t}\n\n\tprotected:\n\t\t/// alpha * this(lhs_s) + beta * rhs(rhs_s)\n\n\t\t/// bounds checking should have been performed by caller\n\t\t/// s denotes where in lhs the new contribution from rhs will be inserted\n\t\tvoid inplace_add(const SRConf<T>& rhs, std::array<Slice,TENSOR_MAXDIM> lhs_s,\n\t\t\t\tstd::array<Slice,TENSOR_MAXDIM> rhs_s, const double alpha, const double beta) {\n\n\t\t\t// cannot scale a slice only...\n\t\t\tMADNESS_ASSERT(alpha==1.0);\n\n\t\t\t// fast return if possible; no fast return for this.rank()==0\n\t\t\t// since we might work with slices!\n\t\t\tif (rhs.has_no_data() or rhs.rank()==0) return;\n\n\t\t\t// prepare the vectors\n\t\t\tSRConf<T> result(ndim(),dims(),nci_left);\n\t\t\tresult.make_empty_vectors_and_weights(rank()+rhs.rank());\n\n\t\t\t// insert lhs into result\n\t\t\tif (rank()>0) {\n\t\t\t\tresult.vector_[0](s0)=vector_[0];\n\t\t\t\tresult.vector_[1](s1)=vector_[1];\n\t\t\t\tresult.weights_(Slice(0,rank()-1))=weights_;\n\t\t\t}\n\t\t\t// insert rhs into result\n\t\t\t{\n\t            auto [sr0,sr1]=rhs.make_slices(rhs_s);\n\t            auto [sl0,sl1]=make_slices(lhs_s);\n\t            sl0[0]=Slice(rank(),result.rank()-1);\n\t            sl1[0]=Slice(rank(),result.rank()-1);\n\t            result.vector_[0](sl0)=rhs.vector_[0](sr0);\n\t            result.vector_[1](sl1)=rhs.vector_[1](sr1);\n\t            result.weights_(Slice(rank(),result.rank()-1))=rhs.weights_*beta;\n\n\t\t\t}\n\t\t\tstd::swap(*this,result);\n            MADNESS_ASSERT(has_structure());\n\t\t}\n\n\t\t/// deep copy of rhs, shrink\n\t\tfriend SRConf<T> copy(const SRConf<T>& rhs) {\n\n\t\t\tif (rhs.has_no_data()) return SRConf<T>();\n\n\t\t\tSRConf<T> result(rhs.ndim(),rhs.dims(),rhs.nci_left);\n\n\t\t\t// if rhs is non-existent simply construct a new SRConf\n\t\t\tif (rhs.has_data() and rhs.rank()>0) {\n\t\t\t\tresult.set_vectors_and_weights(copy(rhs.weights_(Slice(0,rhs.rank()-1))),\n\t\t\t\t\t\tcopy(rhs.vector_[0](rhs.c0(0))),copy(rhs.vector_[1](rhs.c0(1))));\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\npublic:\n        /// return a slice of this (deep copy)\n        SRConf<T> copy_slice(const std::array<Slice,TENSOR_MAXDIM>& s) const {\n\n        \tstd::array<long,TENSOR_MAXDIM> k;\n        \tfor (int i=0; i<s.size(); ++i) {\n        \t\tif (s[i].end==-1) k[i]=dim(i);\n        \t\telse k[i]= s[i].end-s[i].start+1;\n        \t}\n            SRConf<T> result(ndim(),k,nci_left);\n\n            // fast return if possible\n            if (this->has_no_data() or rank()==0) return result;\n\n            auto [s00,s11]=make_slices(s);\n            Tensor<T> vector0=copy(vector_[0](s00));\n            Tensor<T> vector1=copy(vector_[1](s11));\n\n            Tensor<double> weights=copy(this->weights_(Slice(0,rank()-1)));\n            result.set_vectors_and_weights(weights,vector0,vector1);\n\n            return result;\n        }\n\n        /// perform elementwise Hadamard product\n        SRConf<T>& emul(const SRConf<T>& other) {\n            // consistency check\n            MADNESS_ASSERT(compatible(*this,other));\n\n            long finalrank=this->rank()*other.rank();\n\n            SRConf<T> result(ndim(),dims(),nci_left);\t// empty tensor\n\n            if ((this->rank()==0) or (other.rank()==0)) {\n                ;   // pass\n            } else {\n\n            \tresult.make_empty_vectors_and_weights(finalrank);\n                result.weights_=outer(weights_,other.weights_).flat();\n\n                // left vector\n                for (int i=0; i<2; ++i) {\n                    Tensor<T> a1=flat_vector(i);\n                    Tensor<T> b1=other.flat_vector(i);\n                \tTensor<T> r1=result.vector_[i].reshape(finalrank,kVec(i));\n                    Tensor<T> tmp(finalrank,1);\n                    for (int k=0; k<a1.dim(1); ++k) {\n//                    \tr1(_,Slice(k,k))=outer(a1(_,k),b1(_,k)).reshape(finalrank,1);\n                        outer_result(a1(_,k),b1(_,k),tmp);\n                        r1(_,Slice(k,k))=tmp;\n                    }\n                }\n            }\n            result.make_structure();\n            result.normalize();\n\n            *this=result;\n            return *this;\n        }\n\nprotected:\n\t\t/// redo the Slices for getting direct access to the configurations\n\t\tvoid make_slices() {\n\t\t\ts0=std::vector<Slice>(nci_left+1,_);\t\t\t\t// first dim is the rank\n\t\t\ts1=std::vector<Slice>(ndim()-nci_left+1,_);\t\t\t\t// first dim is the rank\n\n\t\t\ts0[0]=Slice(0,rank()-1);\n\t\t\ts1[0]=Slice(0,rank()-1);\n\t\t}\n\n\t\tstd::array<std::vector<Slice>,2> make_slices(const std::array<Slice,TENSOR_MAXDIM>& s) const {\n\t\t\tstd::vector<Slice> s00(nci_left+1,_);\t\t\t\t// first dim is the rank\n\t\t\tstd::vector<Slice> s10(ndim()-nci_left+1,_);\t\t\t\t// first dim is the rank\n\n\t\t\ts00[0]=Slice(0,rank()-1);\n\t\t\ts10[0]=Slice(0,rank()-1);\n\n\t\t\tfor (int idim=0; idim<ndim(); ++idim) {\n\t\t\t\tif (idim<nci_left) s00[idim+1]=s[idim];\n\t\t\t\tif (idim>=nci_left) s10[idim-nci_left+1]=s[idim];\n\t\t\t}\n\n\t\t\tstd::array<std::vector<Slice>,2> result={s00,s10};\n\t\t\treturn result;\n\t\t}\n\n\t\tvoid make_structure(bool force=false) {\n\n\t\t\tauto dimensions=make_vector_dimensions(rank());\n\t\t\tvector_[0]=vector_[0].reshape(nci_left+1,&dimensions[0][0]);\n\t\t\tvector_[1]=vector_[1].reshape(ndim()-nci_left+1,&dimensions[1][0]);\n\n\t\t\tthis->make_slices();\n\n\t\t}\n\n\tpublic:\n\t\t/// return reference to one of the vectors F\n\t\tTensor<T>& ref_vector(const unsigned int& idim) {\n\t\t\treturn vector_[idim];\n\t\t}\n\n\t\t/// return reference to one of the vectors F\n\t\tconst Tensor<T>& ref_vector(const unsigned int& idim) const {\n\t\t\treturn vector_[idim];\n\t\t}\n\n\n\t\tlong kVec(const int idim) const {\n\t\t\treturn vector_[idim].size()/vector_[idim].dim(0);\n\t\t}\n\n\t\t/// return shallow copy of a slice of one of the vectors, flattened to (r,kVec)\n\t\tconst Tensor<T> flat_vector(const unsigned int& idim) const {\n\t\t    MADNESS_ASSERT(rank()>0);\n//\t\t    const Tensor<T> result=vector_[idim](c0(idim)).reshape(rank(),kVec(idim));\n\t\t    const Tensor<T> result=vector_[idim].reshape(rank(),kVec(idim));\n\t\t    return result;\n\t\t}\n\n\t\t/// return shallow copy of a slice of one of the vectors, flattened to (r,kVec)\n\t\tTensor<T> flat_vector(const unsigned int& idim) {\n\t\t    MADNESS_ASSERT(rank()>0);\n//\t\t    Tensor<T> result=vector_[idim](c0(idim)).reshape(rank(),kVec(idim));\n\t\t    Tensor<T> result=vector_[idim].reshape(rank(),kVec(idim));\n\t\t    return result;\n\t\t}\n\n\tprotected:\n//\t\t/// fill this SRConf with 1 flattened random configurations (tested)\n//\t\tvoid fillWithRandom(const long& rank=1) {\n//\n//\n//\t\t\t// assign; note that Slice(0,_) is inclusive\n//\t\t\tweights_=Tensor<double>(rank);\n//\t\t\tweights_=1.0;\n//\n//\t\t\tfor (unsigned int idim=0; idim<this->dim_eff(); idim++) {\n//\t\t\t\tvector_[idim]=Tensor<T>(rank,this->kVec());\n//\t\t\t\tvector_[idim].fillrandom();\n//\t\t\t}\n//\n//\t\t\tthis->normalize();\n//\t\t\tfor (unsigned int idim=0; idim<this->dim_eff(); idim++) {\n//\t\t\t\tvector_[idim].scale(madness::RandomValue<T>()*scalar_type(10.0));\n//\t\t\t}\n//\t\t\tweights_(Slice(0,this->rank()-1)).fillrandom().scale(10.0);\n//\t\t\tmake_slices();\n//            MADNESS_ASSERT(has_structure());\n//\t\t}\n\n\t\t/// normalize the vectors (tested)\n\t\tvoid normalize() {\n\n\t\t\tif (rank()==0) return;\n            MADNESS_ASSERT(has_structure());\n\n\t        // for convenience\n\t        const unsigned int rank=this->rank();\n//\t        std::vector<Slice> s(2,_);\n\n\t        // we calculate the norm sum_i < F^r_i | F^r_i > for each dimension for each r\n\n\t        // loop over all configurations\n\t        for (unsigned int r=0; r<rank; r++) {\n\t        \t// loop over all dimensions\n\t        \tfor (unsigned int idim=0; idim<2; idim++) {\n\t    \t        std::vector<Slice> s(dim_per_vector(idim)+1,_);\n\t\t            s[0]=Slice(r,r);\n\n//\t        \t\tconst double norm=this->ref_vector(idim)(s).normf();\n\t        \t\tconst double norm=this->vector_[idim](s).normf();\n\t        \t\tconst double fac=norm;\n\t        \t\tdouble oofac=1.0/fac;\n\t        \t\tif (fac<1.e-13) oofac=0.0;\n\t        \t\tweights_(r)*=fac;\n\t        \t\tvector_[idim](s).scale(oofac);\n\t        \t}\n\t        }\n            MADNESS_ASSERT(has_structure());\n\t\t}\n\n\t\tbool check_dimensions() const {\n\t\t\tbool correct=true;\n\t\t\tif (vector_[0].dim(0)!=rank()) return false;\n\t\t\tif (vector_[0].ndim()+vector_[1].ndim()!=ndim()+2) return false;\n\t\t\tif (vector_[0].ndim()!=nci_left+1) return false;\n\t\t\tif (vector_[1].ndim()!=ndim()-nci_left+1) return false;\n\n\t\t\treturn correct;\n\t\t}\n\n\t\t/// check if the terms are orthogonal\n\t\tbool check_right_orthonormality() const {\n\n\t\t\t// fast return if possible\n\t\t\tif (rank()==0) return true;\n\n\t\t\tconst tensorT t1=ref_vector(1)(c0(1)).reshape(rank(),kVec(1));\n\t\t\ttensorT S=inner(t1,t1,1,1);\n\t\t\tfor (int i=0; i<S.dim(0); i++) S(i,i)-=1.0;\n\n\t\t\t// error per matrix element\n\t\t\tdouble norm=S.normf();\n\t\t\tdouble small=sqrt(norm*norm/S.size());\n\t\t\treturn (small<1.e-13);\n\t\t}\n\n\t\t/// return if this has only one additional dimension (apart from rank)\n\t\tbool is_flat() const {\n\t\t\treturn (vector_[0].ndim()==2);\n\t\t}\n\n\tpublic:\n\t\t/// return if this has a tensor structure (has not been flattened)\n\t\tbool has_structure() const {\n\t\t\tif (vector_.size()==2) {\n\t\t\t\tauto vector_dimensions=make_vector_dimensions(vector_[0].dim(0));\n\t\t\t\tfor (int i=0; i<vector_[0].ndim(); ++i) {\n\t\t\t\t\tif (vector_dimensions[0][i] != vector_[0].dim(i)) return false;\n\t\t\t\t}\n\t\t\t\tfor (int i=0; i<vector_[1].ndim(); ++i) {\n\t\t\t\t\tif (vector_dimensions[1][i] != vector_[1].dim(i)) return false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\t/// return the logicalrank\n\t\tlong rank() const {return weights_.size();};\n\n\tpublic:\n\t\t/// return the number of physical dimensions\n\t\tint dim_per_vector(int idim) const {\n                    MADNESS_ASSERT(vector_.size()>size_t(idim));\n\t\t\treturn vector_[idim].ndim()-1;\t\t// remove dimension for the rank\n\t\t}\n\n\t\t/// return the weight\n\t\tdouble weights(const unsigned int& i) const {return weights_(i);};\n\n        /// reconstruct this to return a full tensor\n        Tensor<T> reconstruct() const {\n\n            // fast return if possible\n            if (rank()==0) return Tensor<T> (ndim(),dims(),true);\n\n            // include weights in left vector\n            Tensor<T> scr=make_left_vector_with_weights();\n\n\t\t\tTensor<T> result=inner(conj(scr),flat_vector(1),0,0);\n            return result.reshape(ndim(),dims());\n        }\n\n\tprotected:\n\n        Tensor<T> make_left_vector_with_weights() const {\n            return make_vector_with_weights(0);\n        }\n\n    public:\n        Tensor<T> make_vector_with_weights(const int dim) const {\n            Tensor<T> v=copy(vector_[dim].reshape(rank(),vector_[dim].size()/rank()));\n            for (unsigned int r=0; r<rank(); r++) v(r,_)*=weights(r);\n            v=v.reshape(vector_[dim].ndim(),vector_[dim].dims());\n            return v;\n        }\n\n        /// return flat (r,i) view of the tensor with the weights multiplied in\n\n        /// return a(r,i) = vec(dim)(r,i) * w(r)\n        Tensor<T> flat_vector_with_weights(const int dim) const {\n            return make_vector_with_weights(dim).reshape(rank(),vector_[dim].size()/rank());\n        }\n\n\tprotected:\n\t\t/// return the number of coefficients\n\t\tunsigned int nCoeff() const {\n\t\t\treturn vector_[0].size()+vector_[1].size()+weights_.size();\n\t\t};\n\n\t\t/// return the real size of this\n\t\tsize_t real_size() const {\n\t\t\tsize_t n=0;\n\t\t\tfor (size_t i=0; i<vector_.size(); ++i) {\n\t\t\t\tn+=vector_[i].size()*sizeof(T) + sizeof(tensorT);\n\t\t\t}\n\t\t\tn+=weights_.size()*sizeof(double) + sizeof(Tensor<double>);\n\t\t\tn+=sizeof(*this);\n\t\t\tn+=2*s1.size()*sizeof(Slice);\n\t\t\treturn n;\n\t\t}\n\n\n\t\ttemplate<typename Q>\n\t    typename std::enable_if<(TensorTypeData<T>::iscomplex or TensorTypeData<Q>::iscomplex), TENSOR_RESULT_TYPE(T,Q)>::type\n\t\tfriend  trace(const SRConf<T>& rhs, const SRConf<Q>& lhs) {\n\t\t\tMADNESS_EXCEPTION(\"no complex trace in srconf.h\",1);\n\t\t\treturn T(0.0);\n\t\t}\n\n\t\t/// calculate the Frobenius inner product (tested)\n\t\ttemplate<typename Q>\n\t    typename std::enable_if<!(TensorTypeData<T>::iscomplex or TensorTypeData<Q>::iscomplex) , TENSOR_RESULT_TYPE(T,Q)>::type\n\t\tfriend  trace(const SRConf<T>& rhs, const SRConf<Q>& lhs) {\n\n\t\t\t// fast return if either rank is 0\n\t\t\tif ((lhs.has_no_data()) or (rhs.has_no_data())) return 0.0;\n\t\t\tif ((lhs.rank()==0) or (rhs.rank()==0)) return 0.0;\n\n\t\t\t/*\n\t\t\t * the structure of an SRConf is (r,k) or (r,k',k), with\n\t\t\t * r the slowest index; the overlap is therefore simply calculated\n\t\t\t * as the matrix multiplication rhs*lhs^T\n\t\t\t */\n\n\t\t\t// some checks\n\t\t\tMADNESS_ASSERT(rhs.ndim()==lhs.ndim());\n\t\t\tMADNESS_ASSERT(rhs.ndim()>0);\n\n\t\t\ttypedef TENSOR_RESULT_TYPE(T,Q) resultT;\n\n\t\t\tconst unsigned int dim_eff=2;\n\n\t\t\t// get the weight matrix\n\t\t\tTensor<resultT> weightMatrix=outer(lhs.weights_(Slice(0,lhs.rank()-1)),\n\t\t\t\t\trhs.weights_(Slice(0,rhs.rank()-1)));\n\n\t\t\t// calculate the overlap matrices for each dimension at a time\n\t\t\tfor (unsigned int idim=0; idim<dim_eff; idim++) {\n\t\t\t\tconst Tensor<T> lhs2=lhs.flat_vector(idim);\n\t\t\t\tconst Tensor<Q> rhs2=rhs.flat_vector(idim);\n\t\t\t\tTensor<resultT> ovlp(lhs.rank(),rhs.rank());\n\t\t\t\tinner_result(lhs2,rhs2,-1,-1,ovlp);\n\n\t\t\t    // multiply all overlap matrices with the weight matrix\n\t\t\t\tweightMatrix.emul(ovlp);\n\t\t\t}\n\n\t\t\t//\treturn weightMatrix;\n\t\t\tconst TENSOR_RESULT_TYPE(T,Q) overlap=weightMatrix.sum();\n\t\t\treturn overlap;\n\t\t}\n\n\t\t/// calculate the Frobenius norm, if this is in SVD form\n        typename TensorTypeData<T>::float_scalar_type svd_normf() const {\n            if (has_no_data() or rank()==0) return 0.0;\n            return weights_(Slice(0,rank()-1)).normf();\n        }\n\n\t\t/// calculate the Frobenius norm\n\t\ttypename TensorTypeData<T>::float_scalar_type normf() const {\n\n\t\t\t// fast return if possible\n\t\t\tif (has_no_data() or rank()==0) return 0.0;\n\n\t\t\t// some checks\n\t\t\tMADNESS_ASSERT(ndim()>0);\n\t\t\tMADNESS_ASSERT(not TensorTypeData<T>::iscomplex);\n\n\t\t\t// get the weight matrix\n\t\t\tTensor<T> weightMatrix=outer(weights_(Slice(0,rank()-1)),weights_(Slice(0,rank()-1)));\n\n\t\t\t// calculate the overlap matrices for each dimension at a time\n\t\t\tfor (unsigned int idim=0; idim<2; idim++) {\n\t\t\t\tconst Tensor<T> vec=flat_vector(idim);\n\t\t\t\tTensor<T> ovlp(rank(),rank());\n\t\t\t\tinner_result(vec,vec,-1,-1,ovlp);\n\n\t\t\t    // multiply all overlap matrices with the weight matrix\n\t\t\t\tweightMatrix.emul(ovlp);\n\t\t\t}\n\n\t\t\ttypedef typename TensorTypeData<T>::float_scalar_type resultT;\n\t\t\tconst resultT overlap=std::abs(weightMatrix.sum());\n\t\t\treturn sqrt(overlap);\n\t\t}\n\n\tprotected:\n\t\t/// scale this by a number\n\t\tvoid scale(const double& fac) {weights_.scale(fac);};\n\n\t\tvoid scale(const double_complex& fac) {\n\t\t\tMADNESS_EXCEPTION(\"no complex scaling in SRConf\",1);\n\t\t}\n\n\t\t/// check compatibility\n\t\tfriend bool compatible(const SRConf& lhs, const SRConf& rhs) {\n\t\t\treturn (lhs.conforms(&rhs) and (lhs.dim_per_vector(0)==rhs.dim_per_vector(0)));\n\t\t}\n\n\t    /// \\code\n\t\t///     result(i,j,k,...) <-- sum(i',j', k',...) t(i',j',k',...)  c(i',i) c(j',j) c(k',k) ...\n\t\t/// \\endcode\n\t\t///\n\t\t/// The input dimensions of \\c t must all be the same .\n\t\tSRConf<T> transform(const Tensor<T>& c) const {\n\n\t\t\t// fast return if possible\n\t\t\tif (this->has_no_data() or rank()==0) return SRConf<T>(ndim(),dims(),nci_left);\n\n\t\t\t// transpose both singular vectors from U(r,i,j,k) to U(i,j,k,r)\n\t\t\t// and run the contraction as in tensor: U(i,j,k,r) t(i,i') = U(j,k,r,i')\n\t\t\t// and so on, yielding U(r,i',j',k')\n\t\t\tTensor<T> left=copy(vector_[0].cycledim(-1,0,-1));\n\t\t\tTensor<T> right=copy(vector_[1].cycledim(-1,0,-1));\n\n\t        for (long i=0; i<nci_left; ++i) left = inner(left,c,0,0);\n\t        for (long i=nci_left; i<ndim(); ++i) right = inner(right,c,0,0);\n\n\t        SRConf<T> result(ndim(),dims(),this->nci_left);\n\t        result.set_vectors_and_weights(copy(weights_),left,right);\n\n            MADNESS_ASSERT(result.has_structure());\n\t\t\treturn result;\n\t\t}\npublic:\n\t    /// \\code\n\t\t///     result(i,j,k,...) <-- sum(i',j', k',...) t(i',j',k',...)  c(i',i) c(j',j) c(k',k) ...\n\t\t/// \\endcode\n\t\t///\n\t\t/// The input dimensions of \\c t must all be the same .\n\t\ttemplate<typename Q>\n\t\tSRConf<TENSOR_RESULT_TYPE(T,Q) > general_transform(const Tensor<Q> c[]) const {\n\n\t\t\t// fast return if possible\n\t\t\tif (this->has_no_data() or rank()==0) return SRConf<T>(ndim(),dims(),nci_left);\n\n\t\t\t// copying shrinks the vectors to (r,k,k,..)\n\t\t\tMADNESS_ASSERT(this->has_structure());\n\n\t\t\t// transpose both singular vectors from U(r,i,j,k) to U(i,j,k,r)\n\t\t\t// and run the contraction as in tensor: U(i,j,k,r) t(i,i') = U(j,k,r,i')\n\t\t\t// and so on, yielding U(r,i',j',k')\n\t\t\tTensor<T> left=copy(vector_[0].cycledim(-1,0,-1));\n\t\t\tTensor<T> right=copy(vector_[1].cycledim(-1,0,-1));\n\n\t        for (long i=0; i<nci_left; ++i) left = inner(left,c[i],0,0);\n\t        for (long i=nci_left; i<ndim(); ++i) right = inner(right,c[i],0,0);\n\n\t        SRConf<T> result(ndim(),dims(),this->nci_left);\n\t        result.set_vectors_and_weights(copy(weights_),left,right);\n\n            MADNESS_ASSERT(result.has_structure());\n\t\t\treturn result;\n\t\t}\n\n\t\tSRConf<T> transform_dir(const Tensor<T>& c, const int& axis) const {\n\n\t\t\tif (this->has_no_data() or rank()==0) return SRConf<T>(ndim(),dims(),nci_left);\n\n\t\t\t// copying shrinks the vectors to (r,k,k,..)\n\t\t\tSRConf<T> result=copy(*this);\n\n\t\t\t// only a matrix is allowed for c\n\t\t\tMADNESS_ASSERT(c.ndim()==2);\n\n\t\t\t// make sure this is not flattened\n\t\t\tMADNESS_ASSERT(this->has_structure());\n\n\t\t\t// compute idim for accessing the vector_, and the dimension inside vector_\n\t\t\t// the +1 on jdim for the rank\n\t\t\tconst long idim=axis/this->dim_per_vector(0);\n\t\t\tconst long jdim=axis%this->dim_per_vector(0)+1;\n\n\t\t\t// note: no slicing necessary, since we've copied this to result (incl shrinking)\n\t\t\tresult.ref_vector(idim)=madness::transform_dir(this->ref_vector(idim),c,jdim);\n            MADNESS_ASSERT(result.has_structure());\n\n\t\t\treturn result;\n\t\t}\n\n\t};\n\n\t/// sophisticated version of ortho2\n\n\t/// after calling this we will have an optimally rank-reduced representation\n\t/// with the left and right subspaces being bi-orthogonal and normalized;\n\t/// outline of the algorithm:\n\t///  - canonical orthogonalization of the subspaces (screen for small eigenvalues)\n\t///  - SVD of the modified overlap (incorporates the roots of eigenvalues)\n\t/// operation count is O(kr^2 + r^3)\n\t///\n\t/// @param[in,out]\tx normalized left subspace\n\t/// @param[in,out]\ty normalize right subspace\n\t/// @param[in,out]\tweights weights\n\t/// @param[in]\t\tthresh\ttruncation threshold\n\ttemplate<typename T>\n\tvoid ortho3(Tensor<T>& x, Tensor<T>& y, Tensor<typename Tensor<T>::scalar_type>& weights, const double& thresh) {\n\n#ifdef BENCH\n\t\tdouble cpu0=wall_time();\n#endif\n\t\ttypedef Tensor<T> tensorT;\n\t\ttypedef typename Tensor<T>::scalar_type scalar_type;\n\n\t\tconst long rank=x.dim(0);\n\t\tconst double w_max=weights.absmax()*rank;\t\t// max Frobenius norm\n\n\n\t\t// overlap of 1 and 2\n\t\ttensorT S1=inner(x,x,1,1);\n\t\ttensorT S2=inner(y,y,1,1);\t// 0.5 / 2.1\n#ifdef BENCH\n\t\tdouble cpu1=wall_time();\n\t\tSRConf<T>::time(1)+=(cpu1-cpu0);\n#endif\n\n//\t    print(\"norm(S1)\",S1.normf());\n//\t    print(\"norm(S2)\",S2.normf());\n\n\t\t// diagonalize\n\t\ttensorT U1, U2;\n\t\tTensor<scalar_type> e1, e2;\n\t    syev(S1,U1,e1);\n\t    syev(S2,U2,e2);\t\t\t\t\t\t\t\t\t\t// 2.3 / 4.0\n#ifdef BENCH\n\t\tdouble cpu3=wall_time();\n\t\tSRConf<T>::time(3)+=cpu3-cpu1;\n#endif\n\n\t    const scalar_type e1_max=e1.absmax();\n\t    const scalar_type e2_max=e2.absmax();\n\n\t\t// fast return if possible\n\t\tif ((e1_max*w_max<thresh) or (e2_max*w_max<thresh)) {\n\t\t\tx.clear();\n\t\t\ty.clear();\n\t\t\tweights.clear();\n\t\t\treturn;\n\t\t}\n\n\t    // remove small negative eigenvalues\n\t    e1.screen(1.e-13);\n\t    e2.screen(1.e-13);\n\t    Tensor<scalar_type> sqrt_e1(rank), sqrt_e2(rank);\n\n\n\t    // shrink U1, U2\n\t    int lo1=0;\n\t    int lo2=0;\n\t    for (unsigned int r=0; r<rank; r++) {\n\t    \tif (e1(r)*w_max<thresh) lo1=r+1;\n\t    \tif (e2(r)*w_max<thresh) lo2=r+1;\n\t    \tsqrt_e1(r)=sqrt(std::abs(e1(r)));\n\t    \tsqrt_e2(r)=sqrt(std::abs(e2(r)));\n\t    }\n\n\t    U1=U1(Slice(_),Slice(lo1,-1));\n\t    U2=U2(Slice(_),Slice(lo2,-1));\n\t    sqrt_e1=sqrt_e1(Slice(lo1,-1));\n\t    sqrt_e2=sqrt_e2(Slice(lo2,-1));\n\t    unsigned int rank1=rank-lo1;\n\t    unsigned int rank2=rank-lo2;\t\t\t\t\t\t// 0.0 / 0.0\n\n\n\t    MADNESS_ASSERT(sqrt_e1.size()==rank1);\n\t    MADNESS_ASSERT(sqrt_e2.size()==rank2);\n#ifdef BENCH\n\t\tdouble cpu4=wall_time();\n\t\tSRConf<T>::time(4)+=cpu4-cpu3;\n#endif\n\n\n\t    // set up overlap M; include X+\n\t    tensorT M(rank1,rank2);\n\t    for (unsigned int i=0; i<rank1; i++) {\n\t    \tfor (unsigned int j=0; j<rank2; j++) {\n\t    \t\tfor (unsigned int r=0; r<rank; r++) {\n\t\t    \t\tM(i,j)+=U1(r,i)*sqrt_e1(i)*weights(r)*U2(r,j) * sqrt_e2(j);\n//\t\t\t    \t\tM(i,j)+=U1(r,i)*weights(r)*U2(r,j);\n\t    \t\t}\n\t    \t}\n\t    }\n\n\n\t    // include X-\n    \tfor (unsigned int r=0; r<rank1; r++) {\n    \t\tscalar_type fac=1.0/sqrt_e1(r);\n    \t\tfor (unsigned int t=0; t<rank; t++) {\n\t    \t\tU1(t,r)*=fac;\n//\t    \t\tif (sqrt_e1(r)<thresh) throw;\n    \t\t}\n    \t}\n\n\t   \tfor (unsigned int r=0; r<rank2; r++) {\n\t   \t\tscalar_type fac=1.0/sqrt_e2(r);\n    \t\tfor (unsigned int t=0; t<rank; t++) {\n\t    \t\tU2(t,r)*=fac;\n//\t    \t\tif (sqrt_e2(r)<thresh) throw;\n\t    \t}\n\t    }\t\t\t\t\t\t\t\t\t\t\t\t\t// 0.2 / 0.6\n#ifdef BENCH\n\t\tdouble cpu5=wall_time();\n\t\tSRConf<T>::time(5)+=cpu5-cpu4;\n#endif\n\n\t    // decompose M\n\t\ttensorT Up,VTp;\n\t\tTensor<scalar_type> Sp;\n\t\tsvd(M,Up,Sp,VTp);\t\t\t\t\t\t\t\t\t// 1.5 / 3.0\n#ifdef BENCH\n\t\tdouble cpu6=wall_time();\n\t\tSRConf<T>::time(6)+=cpu6-cpu5;\n#endif\n\n\t\t// make transformation matrices\n\t\tUp=inner(Up,U1,0,1);\n\t\tVTp=inner(VTp,U2,1,1);\n\n\n\n//\t\t// find the maximal singular value that's supposed to contribute\n//\t\t// singular values are ordered (largest first)\n//\t\tdouble residual=0.0;\n//\t\tlong i;\n//\t\tfor (i=Sp.dim(0)-1; i>=0; i--) {\n//\t\t\tresidual+=Sp(i)*Sp(i);\n//\t\t\tif (residual>thresh*thresh) break;\n//\t\t}\n\t\tlong i=SRConf<T>::max_sigma(thresh,Sp.dim(0),Sp);\n\n#ifdef BENCH\n\t\tdouble cpu7=wall_time();\n\t\tSRConf<T>::time(7)+=cpu7-cpu6;\n#endif\n\n//\t\ti=std::min(i,long(0));\n\n\t    Up=Up(Slice(0,i),Slice(_));\n\t    VTp=VTp(Slice(0,i),Slice(_));\n\n\n\t\t// convert SVD output to our convention\n\t\tif (i>=0) {\n\n\t\t\t// transform 1 and 2\n\t\t    x=inner(Up,x,1,0);\n\t\t    y=inner(VTp,y,1,0);\t\t\t\t// 0.5 / 2.5\n\t\t    weights=Sp(Slice(0,i));\n\n\t\t} else {\n\t\t\tx.clear();\n\t\t\ty.clear();\n\t\t\tweights.clear();\n\t\t}\n#ifdef BENCH\n\t\tdouble cpu8=wall_time();\n\t\tSRConf<T>::time(8)+=cpu8-cpu7;\n\t\tSRConf<T>::time(0)+=cpu8-cpu0;\n#endif\n\t\treturn;\n\t}\n\n\t/// specialized version of ortho3\n\n\t/// does the same as ortho3, but takes two bi-orthonormal configs as input\n\t/// and saves on the inner product. Result will be written onto the first config\n\t///\n\t/// @param[in,out]\tx1\tleft subspace, will hold the result on exit\n\t/// @param[in,out]\ty1\tright subspace, will hold the result on exit\n\t/// @param[in]\t\tx2\tleft subspace, will be accumulated onto x1\n\t/// @param[in]\t\ty2\tright subspace, will be accumulated onto y1\n\ttemplate<typename T>\n\tvoid ortho5(Tensor<T>& x1, Tensor<T>& y1, Tensor<typename Tensor<T>::scalar_type>& w1,\n\t\t\t\tconst Tensor<T>& x2, const Tensor<T>& y2, const Tensor<typename Tensor<T>::scalar_type>& w2,\n\t\t\t\tconst double& thresh) {\n\n#ifdef BENCH\n\t\tdouble cpu0=wall_time();\n#endif\n\t\ttypedef Tensor<T> tensorT;\n\n\t\tconst long rank1=x1.dim(0);\n\t\tconst long rank2=x2.dim(0);\n\t\tconst long rank=rank1+rank2;\n\n\t\t// for convenience: blocks of the matrices\n\t\tconst Slice s0(0,rank1-1), s1(rank1,rank-1);\n\n\t\tconst double w_max=std::max(w1.absmax(),w2.absmax());\n\t\tconst double norm_max=w_max*rank;\t\t// max Frobenius norm\n\n\t\t// the overlap between 1 and 2;\n\t\t// the overlap of 1 and 1, and 2 and 2 is assumed to be the identity matrix\n\t\ttensorT Sx12=inner(x1,x2,1,1);\n\t\ttensorT Sy12=inner(y1,y2,1,1);\n#ifdef BENCH\n\t\tdouble cpu1=wall_time();\n\t\tSRConf<T>::time(11)+=cpu1-cpu0;\n#endif\n\n\t\ttensorT Sx(rank,rank);\n\t\ttensorT Sy(rank,rank);\n\n\t\t// the identity matrix (half of it)\n\t\tfor (long i=0; i<rank; i++) {\n\t\t\tSx(i,i)=0.5;\n\t\t\tSy(i,i)=0.5;\n\t\t}\n\t\tSx(s0,s1)=Sx12;\n\t\tSy(s0,s1)=Sy12;\n\t\tSx+=transpose(Sx);\n\t\tSy+=transpose(Sy);\n\n\t\t// overlap of 1 and 2\n//\t\ttensorT S1=inner(x,x,1,1);\n//\t\ttensorT S2=inner(y,y,1,1);\t// 0.5 / 2.1\n#ifdef BENCH\n\t\tdouble cpu2=wall_time();\n\t\tSRConf<T>::time(12)+=cpu2-cpu1;\n#endif\n\n\t\t// diagonalize\n\t\ttensorT U1, U2;\n\t\tTensor<typename Tensor<T>::scalar_type> e1, e2;\n\t    syev(Sx,U1,e1);\n\t    syev(Sy,U2,e2);\t\t\t\t\t\t\t\t\t\t// 2.3 / 4.0\n#ifdef BENCH\n\t\tdouble cpu3=wall_time();\n\t\tSRConf<T>::time(13)+=cpu3-cpu2;\n#endif\n\n//\t    print(\"norm(Sx)\",Sx.normf());\n//\t    print(\"norm(Sy)\",Sy.normf());\n\n\t    const double e1_max=e1.absmax();\n\t    const double e2_max=e2.absmax();\n\n\t\t// fast return if possible\n\t\tif ((e1_max*norm_max<thresh) or (e2_max*norm_max<thresh)) {\n\t\t\tx1.clear();\n\t\t\ty1.clear();\n\t\t\tw1.clear();\n\t\t\treturn;\n\t\t}\n\n\t    // remove small negative eigenvalues\n\t    e1.screen(1.e-13);\n\t    e2.screen(1.e-13);\n\t    Tensor<double> sqrt_e1(rank), sqrt_e2(rank);\n\n\n\t    // shrink U1, U2\n\t    int lo1=0;\n\t    int lo2=0;\n\t    for (unsigned int r=0; r<rank; r++) {\n\t    \tif (e1(r)<thresh/norm_max) lo1=r+1;\n\t    \telse sqrt_e1(r)=sqrt(std::abs(e1(r)));\n\t    \tif (e2(r)<thresh/norm_max) lo2=r+1;\n\t    \telse sqrt_e2(r)=sqrt(std::abs(e2(r)));\n\t    }\n\n\t    U1=U1(Slice(_),Slice(lo1,-1));\n\t    U2=U2(Slice(_),Slice(lo2,-1));\n\t    sqrt_e1=sqrt_e1(Slice(lo1,-1));\n\t    sqrt_e2=sqrt_e2(Slice(lo2,-1));\n\t    unsigned int rank_x=rank-lo1;\n\t    unsigned int rank_y=rank-lo2;\t\t\t\t\t\t// 0.0 / 0.0\n\n\n//\t    MADNESS_ASSERT(sqrt_e1.size()==rank_x);\n//\t    MADNESS_ASSERT(sqrt_e2.size()==rank_y);\n\n\t    // set up overlap M; include X+\n\n//\t    for (unsigned int i=0; i<rank_x; ++i) U(i,_)*=sqrt_e1(i);\n//\t    for (unsigned int i=0; i<rank_y; ++i) U(i,_)*=sqrt_e2(i);\n\n\t    tensorT UU1=copy(U1);\n\t    for (unsigned int i=0; i<rank1; ++i) UU1(i,_)*=w1(i);\n\t    for (unsigned int i=rank1; i<rank; ++i) UU1(i,_)*=w2(i-rank1);\n\n\t    tensorT M=inner(UU1,U2,0,0);\n\t    tensorT ee=outer(sqrt_e1,sqrt_e2);\n\t    M.emul(ee);\n\n\t    // include X-\n    \tfor (unsigned int r=0; r<rank_x; r++) {\n    \t\tdouble fac=1.0/sqrt_e1(r);\n    \t\tU1(_,r)*=fac;\n    \t}\n\n\t   \tfor (unsigned int r=0; r<rank_y; r++) {\n    \t\tdouble fac=1.0/sqrt_e2(r);\n    \t\tU2(_,r)*=fac;\n\t    }\t\t\t\t\t\t\t\t\t\t\t\t\t// 0.2 / 0.6\n#ifdef BENCH\n\t\tdouble cpu4=wall_time();\n\t\tSRConf<T>::time(14)+=cpu4-cpu3;\n#endif\n\n\n\t    // decompose M\n\t\ttensorT Up,VTp;\n\t\tTensor<typename Tensor<T>::scalar_type> Sp;\n\t\tsvd(M,Up,Sp,VTp);\t\t\t\t\t\t\t\t\t// 1.5 / 3.0\n#ifdef BENCH\n\t\tdouble cpu5=wall_time();\n\t\tSRConf<T>::time(15)+=cpu5-cpu4;\n#endif\n\n\t\t// make transformation matrices\n\t\tUp=inner(Up,U1,0,1);\n\t\tVTp=inner(VTp,U2,1,1);\n#ifdef BENCH\n\t\tdouble cpu6=wall_time();\n\t\tSRConf<T>::time(16)+=cpu6-cpu5;\n#endif\n\n\t\t// find the maximal singular value that's supposed to contribute\n\t\t// singular values are ordered (largest first)\n\t\tdouble residual=0.0;\n\t\tlong i;\n\t\tfor (i=Sp.dim(0)-1; i>=0; i--) {\n\t\t\tresidual+=Sp(i)*Sp(i);\n\t\t\tif (residual>thresh*thresh) break;\n\t\t}\n\n\t\t// convert SVD output to our convention\n\t\tif (i>=0) {\n\n\t\t\t// make it contiguous\n\t\t    tensorT Up1=transpose(Up(Slice(0,i),s0));\n\t\t    tensorT Up2=transpose(Up(Slice(0,i),s1));\n\t\t    tensorT VTp1=transpose(VTp(Slice(0,i),s0));\n\t\t    tensorT VTp2=transpose(VTp(Slice(0,i),s1));\n\n\t\t\t// transform 1 and 2\n\t\t    x1=inner(Up1,x1,0,0);\n\t\t    inner_result(Up2,x2,0,0,x1);\n\t\t    y1=inner(VTp1,y1,0,0);\n\t\t    inner_result(VTp2,y2,0,0,y1);\n\t\t    w1=Sp(Slice(0,i));\n\n\t\t} else {\n\t\t\tx1.clear();\n\t\t\ty1.clear();\n\t\t\tw1.clear();\n\t\t}\n#ifdef BENCH\n\t\tdouble cpu7=wall_time();\n\t\tSRConf<T>::time(17)+=cpu7-cpu6;\n\t\tSRConf<T>::time(10)+=cpu7-cpu0;\n#endif\n\t\treturn;\n\t}\n\n\ttemplate<typename T>\n\tstatic inline\n\tstd::ostream& operator<<(std::ostream& s, const SRConf<T>& sr) {\n\n\t\ts << \"dim_          \" << sr.ndim() << \"\\n\";;\n\t\ts << \"rank_         \" << sr.rank_ << \"\\n\";;\n\t\ts << \"vector_.size()\" << sr.vector_.size() << \"\\n\";\n\t\ts << \"has_data()    \" << sr.has_data() << \"\\n\";\n\t\ts << \"TensorType    \" << sr.type() << \"\\n\\n\";\n\t\treturn s;\n\t}\n}\n\n#endif /* SRCONF_H_ */\n"
  },
  {
    "path": "src/madness/tensor/systolic.h",
    "content": "#ifndef MADNESS_SYSTOLIC_H\n#define MADNESS_SYSTOLIC_H\n\n/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n#include <utility>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/distributed_matrix.h>\n\n#ifdef HAVE_INTEL_TBB\n# include <tbb/parallel_for.h>\n#endif\n\nnamespace madness {\n\n    /// Base class for parallel algorithms that employ a systolic loop to generate all row pairs in parallel\n    template <typename T>\n    class SystolicMatrixAlgorithm : public TaskInterface {\n    private:\n        DistributedMatrix<T>& A;\n        const int64_t nproc;            ///< No. of processes with rows of the matrix (not size of world)\n        const int64_t coldim;           ///< A(coldim,rowdim)\n        const int64_t rowdim;           ///< A(coldim,rowdim)\n        const int64_t nlocal;           ///< No. of local pairs\n        const ProcessID rank;           ///< Rank of current process\n        const int tag;                  ///< MPI tag to be used for messages\n        std::vector<T*> iptr, jptr;     ///< Indirection for implementing cyclic buffer !! SHOULD BE VOLATILE ?????\n        std::vector<int64_t> map;       ///< Used to keep track of actual row indices\n\n#ifdef HAVE_INTEL_TBB\n        void iteration(const int nthread) {\n\n            // Parallel initialization hook\n            tbb::parallel_for(0, nthread, [=](const int id) {\n                this->start_iteration_hook(TaskThreadEnv(nthread, id));\n            });\n\n            if (nlocal > 0) {\n//                int64_t ilo, ihi;\n//                A.local_colrange(ilo, ihi);\n\n                const int neven = coldim + (coldim&0x1);\n                const int pairlo = rank*A.coltile()/2;\n\n                for (int loop=0; loop<(neven-1); ++loop) {\n\n                    // This loop is parallelized over threads\n                    tbb::parallel_for(0, nthread,\n                        [this,neven,pairlo,nthread,loop](const int id) {\n                            for (int pair=id; pair<nlocal; pair+=nthread) {\n\n                                int rp = neven/2-1-(pair+pairlo);\n                                int iii = (rp+loop)%(neven-1);\n                                int jjj = (2*neven-2-rp+loop)%(neven-1);\n                                if (rp == 0) jjj = neven-1;\n\n                                iii = map[iii];\n                                jjj = map[jjj];\n\n                                if (jptr[pair]) {\n                                    this->kernel(iii, jjj, iptr[pair], jptr[pair]);\n                                }\n                            }\n                        });\n\n                    cycle();\n\n                }\n            }\n\n            // Parallel finalization hook\n            tbb::parallel_for(0, nthread, [=](const int id) {\n                this->end_iteration_hook(TaskThreadEnv(nthread, id));\n            });\n\n        }\n#else\n        void iteration(const TaskThreadEnv& env) {\n\n            env.barrier();\n            start_iteration_hook(env);\n            env.barrier();\n\n            if (nlocal > 0) {\n                int64_t ilo, ihi;\n                A.local_colrange(ilo, ihi);\n\n                int neven = coldim + (coldim&0x1);\n\n                int pairlo = rank*A.coltile()/2;\n\n                int threadid = env.id();\n                int nthread = env.nthread();\n\n                for (int loop=0; loop<(neven-1); ++loop) {\n\n                    // This loop is parallelized over threads\n                    for (int pair=env.id(); pair<nlocal; pair+=nthread) {\n\n                        int rp = neven/2-1-(pair+pairlo);\n                        int iii = (rp+loop)%(neven-1);\n                        int jjj = (2*neven-2-rp+loop)%(neven-1);\n                        if (rp == 0) jjj = neven-1;\n\n                        iii = map[iii];\n                        jjj = map[jjj];\n\n                        if (jptr[pair]) {\n                            kernel(iii, jjj, iptr[pair], jptr[pair]);\n                        }\n                    }\n                    env.barrier();\n\n                    if (threadid == 0) cycle();\n\n                    env.barrier();\n                }\n            }\n\n            end_iteration_hook(env);\n\n            env.barrier();\n        }\n#endif // HAVE_INTEL_TBB\n\n        /// Call this after iterating to restore correct order of rows in original matrix\n\n        /// At the end of each iteration the matrix rows are logically back in\n        /// their correct order.  However, due to indirection to reduce data motion,\n        /// if the local column dimension is not a factor of the number of cycles\n        /// the underlying data may be in a different order.  This restores sanity.\n        ///\n        /// Only one thread should invoke this routine\n        void unshuffle() {\n            if (nlocal <= 0) return;\n            Tensor<T>& t = A.data();\n            Tensor<T> tmp(2L, t.dims(), false);\n            T* tp = tmp.ptr();\n            for (int64_t i=0; i<nlocal; ++i) {\n                memcpy(tp+i*rowdim, iptr[i], rowdim*sizeof(T));\n                if (jptr[i]) {\n                    memcpy(tp+(i+nlocal)*rowdim, jptr[i], rowdim*sizeof(T));\n                }\n                iptr[i] = &t(i,0);\n                jptr[i] = &t(i+nlocal,0);\n            }\n            memcpy(t.ptr(), tmp.ptr(), t.size()*sizeof(T));\n\n            if (rank==(nproc-1) && (coldim&0x1)) jptr[nlocal-1] = 0;\n        }\n\n        /// Cycles data around the loop ... only one thread should invoke this\n        void cycle() {\n            if (coldim <= 2) return; // No cycling necessary\n            if (nlocal <= 0) {       // Nothing local\n                MADNESS_ASSERT(rank >= nproc);\n                return;\n            }\n\n            // Check assumption that tiling put incomplete tile at the end\n            MADNESS_ASSERT(A.local_coldim() == A.coltile()  ||  rank == (nproc-1));\n\n            const ProcessID left = rank-1; //Invalid values are not used\n            const ProcessID right = rank+1;\n\n            /*\n              Consider matrix (10,*) distributed with coltile=4 over\n              three processors.\n\n              .   0 1 2 3      4 5 6 7      8 9\n\n              This is divided up as follows into this initial\n              configuration for the loop\n\n              .            P=0          P=1         P=2\n              .                  msg          msg\n              .   i    -->0-->1  -->   4-->5  -->    8  -->\n              .       ^                                   |  msg\n              .       |                         <---------\n              .   j    <--2<--3  <--   6<--7  <--|   9\n              .                  msg          msg\n\n              The first and last processes in the loop have to wrap ... others\n              just pass left and right.  Note that 9 stays put.\n\n              Note that the algorithm is assuming distribution puts equal\n              amount of data on all nodes except the last.\n\n              The i data is considered as flowing to the right.\n              The j data is considered as flowing to the left.\n\n\n              Hence, we should explore the pairs in this order\n              (n-1 sets of n/2 pairs)\n\n              .          P=0         P=1        P=2\n              .          0  1        4  5       8\n              .          2  3        6  7       9\n\n              .          2  0        1  4       5\n              .          3  6        7  8       9\n\n              .          3  2        0  1       4\n              .          6  7        8  5       9\n\n              .          6  3        2  0       1\n              .          7  8        5  4       9\n\n              .          7  6        3  2       0\n              .          8  5        4  1       9\n\n              .          8  7        6  3       2\n              .          5  4        1  0       9\n\n              .          5  8        7  6       3\n              .          4  1        0  2       9\n\n              .          4  5        8  7       6\n              .          1  0        2  3       9\n\n              .          1  4        5  8       7\n              .          0  2        3  6       9\n            */\n\n            // Copy end elements before they are overwritten\n            T* ilast  = iptr[nlocal-1];\n            T* jfirst = jptr[0];\n\n            // Cycle local pointers\n            for (int64_t i=0; i<nlocal-1; ++i) {\n                iptr[nlocal-i-1] = iptr[nlocal-i-2];\n                jptr[i] = jptr[i+1];\n            }\n\n            World& world = A.get_world();\n\n            if (nproc == 1) {\n                iptr[0] = jfirst;\n                jptr[nlocal-2] = ilast;\n            }\n            else if (rank == 0) {\n                iptr[0] = jfirst;\n                world.mpi.Send(ilast, rowdim, right, tag);\n                jptr[nlocal-1] = ilast;\n                world.mpi.Recv(ilast, rowdim, right, tag);\n            }\n            else if (rank == (nproc-1)) {\n                if (nlocal > 1) {\n                    iptr[0] = jfirst;\n                    jptr[nlocal-2] = ilast;\n                }\n                std::vector<T> buf(rowdim);\n                SafeMPI::Request req = world.mpi.Irecv(&buf[0], rowdim, left, tag);\n                world.mpi.Send(iptr[0], rowdim, left, tag);\n                world.await(req,false);\n                std::memcpy(iptr[0], &buf[0], rowdim*sizeof(T));\n            }\n            else {\n                std::vector<T> buf1(rowdim);\n                std::vector<T> buf2(rowdim);\n                SafeMPI::Request req1 = world.mpi.Irecv(&buf1[0], rowdim, left, tag);\n                SafeMPI::Request req2 = world.mpi.Irecv(&buf2[0], rowdim, right, tag);\n                world.mpi.Send( ilast, rowdim, right, tag);\n                world.mpi.Send(jfirst, rowdim,  left, tag);\n                world.await(req1,false);\n                world.await(req2,false);\n                std::memcpy(ilast, &buf2[0], rowdim*sizeof(T)); //world.mpi.Recv( ilast, rowdim, right, tag);\n                std::memcpy(jfirst, &buf1[0], rowdim*sizeof(T)); //world.mpi.Recv(jfirst, rowdim,  left, tag);\n\n                iptr[0] = jfirst;\n                jptr[nlocal-1] = ilast;\n            }\n        }\n\n        /// Get the task id\n\n        /// \\param id The id to set for this task\n        virtual void get_id(std::pair<void*,unsigned short>& id) const {\n            PoolTaskInterface::make_id(id, *this);\n        }\n\n    public:\n        /// A must be a column distributed matrix with an even column tile >= 2\n\n        /// It is assumed that it is the main thread invoking this.\n        /// @param[in,out] A The matrix on which the algorithm is performed and modified in-place\n        /// @param[in] tag The MPI tag used for communication (obtain from \\c world.mpi.comm().unique_tag() )\n        /// @param[in] nthread The number of local threads to use (default is main thread all threads in the pool)\n        SystolicMatrixAlgorithm(DistributedMatrix<T>& A, int tag, int nthread=ThreadPool::size()+1)\n            : A(A)\n            , nproc(A.process_coldim()*A.process_rowdim())\n            , coldim(A.coldim())\n            , rowdim(A.rowdim())\n            , nlocal((A.local_coldim()+1)/2)\n            , rank(A.get_world().rank())\n            , tag(tag)\n            , iptr(nlocal)\n            , jptr(nlocal)\n            , map(coldim+(coldim&0x1))\n        {\n            TaskInterface::set_nthread(nthread);\n\n            MADNESS_ASSERT(A.is_column_distributed() && (nproc==1 || (A.coltile()&0x1)==0));\n\n            // Initialize vectors of pointers to matrix rows)\n            Tensor<T>& t = A.data();\n\n            //madness::print(nproc, coldim, rowdim, nlocal, rank, tag);\n\n            for (int64_t i=0; i<nlocal; ++i) {\n                iptr[i] = &t(i,0);\n                jptr[i] = &t(i+nlocal,0);\n            }\n\n            // If no. of rows is odd, last process should have an empty last row\n            if (rank==(nproc-1) && (coldim&0x1)) jptr[nlocal-1] = 0;\n\n            // Initialize map from logical index order to actual index order\n\n            int neven = (coldim+1)/2;\n            int ii=0;\n            for (ProcessID p=0; p<nproc; ++p) {\n                int64_t lo, hi;\n                A.get_colrange(p, lo, hi);\n                int p_nlocal = (hi - lo + 2)/2;\n                //print(\"I think process\",p,\"has\",lo,hi,p_nlocal);\n                for (int i=0; i<p_nlocal; ++i) {\n                    map[ii+i] = lo+i;\n                    //map[coldim-ii-nlocal+i] = lo+i+nlocal;\n                    map[ii+i+neven] = lo+i+p_nlocal;\n                }\n                ii += p_nlocal;\n            }\n\n            std::reverse(map.begin(),map.begin()+neven);\n\n            //print(\"MAP\", map);\n        }\n\n        virtual ~SystolicMatrixAlgorithm() {}\n\n        /// Threadsafe routine to apply the operation to rows i and j of the matrix\n\n        /// @param[in] i First row index in the matrix\n        /// @param[in] j Second row index in the matrix\n        /// @param[in] rowi Pointer to row \\c i of the matrix (to be modified by kernel in-place)\n        /// @param[in] rowj Pointer to row \\c j of the matrix (to be modified by kernel in-place)\n        virtual void kernel(int i, int j, T* rowi, T* rowj) = 0;\n\n\n        /// Invoked simultaneously by all threads after each sweep to test for convergence\n\n        /// There is a thread barrier before and after the invocation of this routine\n        /// @param[in] env The madness thread environment in case synchronization between threads is needed during computation of the convergence condition.\n        virtual bool converged(const TaskThreadEnv& env) const = 0;\n\n\n        /// Invoked by all threads at the start of each iteration\n\n        /// There is a thread barrier before and after the invocation of this routine\n        /// @param[in] env The madness thread environment in case synchronization between threads is needed during startup.\n        virtual void start_iteration_hook(const TaskThreadEnv& env) {}\n\n\n        /// Invoked by all threads at the end of each iteration before convergence test\n\n        /// There is a thread barrier before and after the invocation of this routine.\n        /// Note that the \\c converged() method is \\c const whereas this can modify the class.\n        /// @param[in] env The madness thread environment in case synchronization between threads is needed during startup.\n        virtual void end_iteration_hook(const TaskThreadEnv& env) {}\n\n\n#ifdef HAVE_INTEL_TBB\n        /// Invoked by the task queue to run the algorithm with multiple threads\n\n        /// This is a collective call ... all processes in world should submit this task\n        void run(World& world, const TaskThreadEnv& env) {\n            const int nthread = env.nthread();\n            bool done = false;\n            do {\n                iteration(nthread);\n                done = tbb::parallel_reduce(tbb::blocked_range<int>(0,nthread), true,\n                    [=] (const tbb::blocked_range<int>& range, bool init) -> bool {\n                        for(int id = range.begin(); id < range.end(); ++id)\n                            init = init &&\n                                this->converged(TaskThreadEnv(nthread, id));\n                        return init;\n                    },\n                    [] (const bool l, const bool r) { return l && r; });\n\n            } while (!done);\n\n            unshuffle();\n        }\n#else\n        /// Invoked by the task queue to run the algorithm with multiple threads\n\n        /// This is a collective call ... all processes in world should submit this task\n        void run(World& world, const TaskThreadEnv& env) {\n            do {\n                iteration(env);\n            } while (!converged(env));\n\n            if (env.id() == 0) unshuffle();\n\n            env.barrier();\n        }\n#endif // HAVE_INTEL_TBB\n\n        /// Invoked by the user to run the algorithm with one thread mostly for debugging\n\n        /// This is a collective call ... all processes in world should call this routine.\n        void solve_sequential() {\n            run(A.get_world(), TaskThreadEnv(1,0,0));\n        }\n\n        /// Returns length of row\n        int64_t get_rowdim() const {return rowdim;}\n\n\n        /// Returns length of column\n        int64_t get_coldim() const {return coldim;}\n\n        /// Returns a reference to the world\n        World& get_world() const {\n            return A.get_world();\n        }\n\n        /// Returns rank of this process in the world\n        ProcessID get_rank() const {\n            return rank;\n        }\n    };\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/tensor/tempspec.py",
    "content": "\ntypelist = [\"int\",\"long\",\"double\",\"float\",\"double_complex\",\"float_complex\"]\n\ncomplex_typelist = [\"double_complex\",\"float_complex\"]\n\ngemm_typelist = [\"double\",\"float\",\"double_complex\",\"float_complex\"]\n\ntransform_typelist = [[\"double\", \"double\"],\n                      [\"float\", \"float\"],\n                      [\"double_complex\", \"double_complex\"],\n                      [\"float_complex\", \"float_complex\"],\n                      [\"double_complex\", \"double\"],\n                      [\"double\"        ,\"double_complex\"],\n                      [\"float_complex\", \"float\"],\n                      [\"float\"         ,\"float_complex\"]]\n\nf = open(\"tensor_spec.h\",\"w\")\nfor t in typelist:\n    f.write(\"\\n// Instantiations for %s\\n\" % t)\n    f.write(\"template class Tensor<%s>;\\n\" % t)\n    f.write(\"template class SliceTensor<%s>;\\n\" % t)\n    f.write(\"template std::ostream& operator << (std::ostream& s, const Tensor<%s>& t);\\n\" % t)\n    f.write(\"template Tensor<%s> copy(const Tensor<%s>& t);\\n\" % (t,t))\n    f.write(\"template Tensor<%s> outer(const Tensor<%s>& left, const Tensor<%s>& right);\\n\" % (t,t,t))\n    f.write(\"template Tensor< Tensor<%s>::scalar_type > abs(const Tensor<%s>& t);\\n\" % (t,t))\n    f.write(\"template Tensor<%s> transpose(const Tensor<%s>& t);\\n\" % (t,t))\n\nf.write(\"\\n// Instantiations for inner, inner_result and transform \\n\")\nfor t,q in transform_typelist:\n    f.write(\"template void inner_result(const Tensor<%s>& left, const Tensor<%s>& right,\\n\" % (t,q))\n    f.write(\"                           long k0, long k1, Tensor< TensorResultType<%s,%s>::type >& result);\\n\" % (t,q))\n    f.write(\"template Tensor<TensorResultType<%s,%s>::type> inner(const Tensor<%s>& left, const Tensor<%s>& right,\\n\" % (t,q,t,q))\n    f.write(\"                         long k0, long k1);\\n\")\n    f.write(\"template Tensor<TensorResultType<%s,%s>::type> transform(const Tensor<%s>& t, const Tensor<%s>& c);\\n\" % (t,q,t,q))\n    f.write(\"template Tensor<TensorResultType<%s,%s>::type> general_transform(const Tensor<%s>& t, const Tensor<%s> c[]);\\n\" % (t,q,t,q))\n    f.write(\"template Tensor<TensorResultType<%s,%s>::type>& fast_transform(const Tensor<%s>& t, const Tensor<%s>& c, Tensor< TensorResultType<%s,%s>::type >& result, Tensor< TensorResultType<%s,%s>::type >& work);\\n\" % (t,q,t,q,t,q,t,q))\n\n\nf.write(\"\\n// Instantiations only for complex types\\n\")\nfor t in complex_typelist:\n    f.write(\"\\n// Instantiations for %s\" % t)\n    f.write(\"template Tensor< Tensor<%s>::scalar_type > arg(const Tensor<%s>& t);\\n\" % (t,t))\n    f.write(\"template Tensor< Tensor<%s>::scalar_type > real(const Tensor<%s>& t);\\n\" % (t,t))\n    f.write(\"template Tensor< Tensor<%s>::scalar_type > imag(const Tensor<%s>& t);\\n\" % (t,t))\n    f.write(\"template Tensor<%s> conj(const Tensor<%s>& t);\\n\" % (t,t))\n    f.write(\"template Tensor<%s> conj_transpose(const Tensor<%s>& t);\\n\" % (t,t))\n\n#for t in typelist:\n#    for q in typelist:\n#        f.write(\"template TENSOR_RESULT_TYPE(%s,%s) Tensor<%s>::trace_conj(const Tensor<%s>& q);\\n\" % (t,q,t,q))\n\nf.close()\n    \n## f.write(\"\\n\\nPUT THESE AT THE BOTTOM OF mxm.cc\\n\"\n## for t in typelist:\n##     f.write(\"template void mTxm<%s>(long dimi, long dimj, long dimk, %s * c, const %s *a, const %s *b);\" % (t,t,t,t)\n##     f.write(\"template void mxmT<%s>(long dimi, long dimj, long dimk, %s * c, const %s *a, const %s *b);\" % (t,t,t,t)\n##     f.write(\"template void mTxmT<%s>(long dimi, long dimj, long dimk, %s * c, const %s *a, const %s *b);\" % (t,t,t,t)\n##     f.write(\"template void mxm<%s>(long dimi, long dimj, long dimk, %s * c, const %s *a, const %s *b);\" % (t,t,t,t)\n    \n\n##f.write(\"\\n\\nPUT THESE AT THE BOTTOM OF tensoriter.cc\\n\"\nf = open(\"tensoriter_spec.h\",\"w\")\n\na = []\nfor t in typelist:\n    for q in typelist:\n        for r in typelist:\n            a.append(\"template class TensorIterator<%s,%s,%s>;\\n\" % (t,q,r))\na.sort()\n\nprev = a[0]\nf.write(prev)\nfor cur in a[1:]:\n    if cur != prev:\n        f.write(cur)\n        prev = cur\n        \nf.close()\n"
  },
  {
    "path": "src/madness/tensor/tensor.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#define TENSOR_CC\n\n\n\n#ifdef STATIC\n#  undef STATIC\n#endif\n\n#if HAVE_UNQUALIFIED_STATIC_DECL\n#  define STATIC static\n#else\n// Cray X1 compiler won't instantiate static function templates (mxm*)\n#  define STATIC\n#endif\n\n#include <madness/madness_config.h>\n#include <madness/misc/ran.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/mxm.h>\n#include <madness/tensor/aligned.h>\n\n#include <stdlib.h>\n#include <algorithm>\n#include <complex>\n#include <cmath>\n#include <cstring>\n#include <iostream>\n\n\n/// \\file tensor.cc\n/// \\brief Completes the implementation of Tensor and instantiates all specializations for fast compiles.\n/// \\ingroup tensor\n/// @{\n\nnamespace madness {\n\n    template <class T> class Tensor;\n\n    template <class T> class SliceTensor;\n\n    template <class T> class GenTensor;\n\n    template <class T> class SliceGenTensor;\n\n    std::ostream& operator<<(std::ostream& stream, const Slice& s) {\n        stream << \"Slice(\" << s.start << \",\" << s.end << \",\" << s.step << \")\";\n        return stream;\n    }\n\n    template<> float_complex Tensor<float_complex>::min(long* ind) const {\n        TENSOR_EXCEPTION(\"cannot perform min on complex types\",0,this);\n        return 0;\n    }\n    template<> double_complex Tensor<double_complex>::min(long* ind) const {\n        TENSOR_EXCEPTION(\"cannot perform min on complex types\",0,this);\n        return 0;\n    }\n    template<> float_complex Tensor<float_complex>::max(long* ind) const {\n        TENSOR_EXCEPTION(\"cannot perform max on complex types\",0,this);\n        return 0;\n    }\n    template<> double_complex Tensor<double_complex>::max(long* ind) const {\n        TENSOR_EXCEPTION(\"cannot perform max on complex types\",0,this);\n        return 0;\n    }\n\n    //#include \"tensor_spec.h\"\n}\n/// @}\n"
  },
  {
    "path": "src/madness/tensor/tensor.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_TENSOR_TENSOR_H__INCLUDED\n#define MADNESS_TENSOR_TENSOR_H__INCLUDED\n\n#include <madness/madness_config.h>\n#include <madness/misc/ran.h>\n#include <madness/world/posixmem.h>\n\n#include <memory>\n#include <complex>\n#include <vector>\n#include <array>\n#include <cmath>\n#include <cstdlib>\n#include <cstddef>\n\n#include <madness/world/archive.h>\n// #include <madness/world/print.h>\n//\n// typedef std::complex<float> float_complex;\n// typedef std::complex<double> double_complex;\n//\n// // These probably have to be included in this order\n// #include <madness/tensor/tensor_macros.h>\n// #include <madness/tensor/type_data.h>\n// #include <madness/tensor/slice.h>\n// #include <madness/tensor/vector_factory.h>\n#include <madness/tensor/basetensor.h>\n#include <madness/tensor/aligned.h>\n#include <madness/tensor/mxm.h>\n#include <madness/tensor/tensorexcept.h>\n#include <madness/tensor/tensoriter.h>\n\n#ifdef ENABLE_GENTENSOR\n#define HAVE_GENTENSOR 1\n#else\n#define HAVE_GENTENSOR 0\n#endif\n\n\n/*!\n  \\file tensor.h\n  \\brief Defines and implements most of Tensor\n  \\ingroup tensor\n  \\addtogroup tensor\n\n  \\par Introduction\n\n  A tensor is a multi-dimensional array and does not incorporate any concepts\n  of covariance and contravariance.\n\n  When a new tensor is created, the underlying data is also allocated.\n  E.g.,\n  \\code\n  Tensor<double> a(3,4,5)\n  \\endcode\n  creates a new 3-dimensional tensor and allocates a contiguous\n  block of 60 doubles which are initialized to zero.  The dimensions\n  (numbered from the left starting at 0) are in C or row-major\n  order.  Thus, for the tensor \\c a , the stride between successive\n  elements of the right-most dimension is 1.  For the middle\n  dimension it is 5.  For the left-most dimension it is 20.  Thus,\n  the loops\n  \\code\n  for (i=0; i<3; ++i)\n      for (j=0; j<4; ++j)\n          for (k=0; k<5; ++k)\n              a(i,j,k) = ...\n  \\endcode\n  will go sequentially (and thus efficiently) through memory.\n  If the dimensions have been reordered (e.g., with \\c swapdim()\n  or \\c map() ), or if the tensor is actually a slice of another\n  tensor, then the layout in memory may be more complex and\n  may not reflect a contiguous block of memory.\n\n  Multiple tensors may be used to provide multiple identical or\n  distinct views of the same data.  E.g., in the following\n  \\code\n  Tensor<double> a(2,3);  // A new tensor initialized to zero\n  Tensor<double> b = a;\n  \\endcode\n  \\c a and \\c b provide identical views of the same data, thus\n  \\code\n  b(1,2) = 99;\n  cout << a(1,2) << endl;  // Outputs 99\n  cout << b(1,2) << endl;  // Outputs 99\n  \\endcode\n\n  \\par Shallow copy and assignment\n\n  It is important to appreciate that the views and the data are\n  quite independent.  In particular, the default copy constructor\n  and assignment operations only copy the tensor (the view) and not\n  the data --- <em> i.e., the copy constructor and assigment operations\n  only take shallow copies</em>.  This is for both consistency and\n  efficiency.  Thus, assigning one tensor to another generates another\n  view of the same data, replacing any previous view and not moving\n  or copying any of the data.\n  E.g.,\n  \\code\n  Tensor<double> a(2,3);   // A new tensor initialized to zero\n  Tensor<double> c(3,3,3); // Another new tensor\n  Tensor<double> b = a;    // b is a view of the same data as a\n  a = c;                   // a is now a view of c's data\n  b = c                    // b is now also a view of c's data and the\n  // data allocated originally for a is freed\n  \\endcode\n  The above example also illustrates how reference counting is used\n  to keep track of the underlying data.  Once there are no views\n  of the data, it is automatically freed.\n\n  There are only two ways to actually copy the underlying data.  A\n  new, complete, and contiguous copy of a tensor and its data may be\n  generated with the \\c copy() function.  Or, to copy data from one tensor\n  into the data viewed by another tensor, you must use a Slice.\n\n  \\par Indexing\n\n  One dimensional tensors (i.e., vectors) may be indexed using\n  either square brackets (e.g., \\c v[i] ) or round brackets (e.g.,\n  \\c v(i) ).  All higher-dimensional tensors must use only round\n  brackets (e.g., \\c t(i,j,k) ).  This is due to C++'s restriction\n  that the indexing operator (\\c [] ) can only have one argument.\n  The indexing operation should generate efficient code.\n\n  For the sake of efficiency, no bounds checking is performed by\n  default by most single element indexing operations.  Checking can\n  be enabled at compile time by defining \\c -DTENSOR_BOUNDS_CHECKING for\n  application files including \\c tensor.h.  The MADNESS configure script\n  has the option \\c --enable-tensor-bound-checking to define the macro\n  in \\c madness_config.h .  The general indexing\n  operation that takes a \\c std::vector<long> index and all slicing\n  operations always perform bounds checking.  To make indexing with\n  checking a bit easier, a factory function has been provided for\n  vectors ... but note you need to explicitly use longs as the\n  index.\n  \\code\n  Tensor<long> a(7,7,7);\n  a(3,4,5) += 1;                    // OK ... adds 1 to element (3,4,5)\n  a(3,4,9) += 1;                    // BAD ... undetected out-of-bounds access\n  a(vector_factory(3L,4L,9L)) += 1; // OK ... out-bounds access will\n  // be detected at runtime.\n  \\endcode\n\n  \\par Slicing\n\n  Slices generate sub-tensors --- i.e., views of patches of the\n  data.  E.g., to refer to all but the first and last elements in\n  each dimension of a matrix use\n  \\code\n  a(Slice(1,-2),Slice(1,-2))\n  \\endcode\n  Or to view odd elements in each dimension\n  \\code\n  a(Slice(0,-1,2),Slice(0,-1,2))\n  \\endcode\n  A slice or patch of a\n  tensor behaves exactly like a tensor \\em except for assignment.\n  When a slice is assigned to, the data is copied with the\n  requirement that the source and destinations agree in size and\n  shape (i.e., they conform).  Thus, to copy the all of the data\n  from a to b,\n  \\code\n  Tensor<double> a(3,4), b(3,4);\n  a = 1;                              // Set all elements of a to 1\n  b = 2;                              // Set all elements of b to 2\n  a(Slice(0,-1,1),Slice(0,-1,1)) = b; // Copy all data from b to a\n  a(_,_) = b(_,_);                    // Copy all data from b to a\n  a(___) = b(___);                    // Copy all data from b to a\n  a(Slice(1,2),Slice(1,2)) = b;       // Error, do not conform\n  \\endcode\n  Special slice values \\c _ ,\\c  _reverse, and \\c  ___ have\n  been defined to refer to all elements in a dimension, all\n  elements in a dimension but reversed, and all elements in all\n  dimensions, respectively.\n\n  \\par Iteration and algorithms\n\n  See tensor_macros.h for documentation on the easiest mechanisms for iteration over\n  elements of tensors and tips for optimization.  See \\c TensorIterator for\n  the most general form of iteration.\n*/\n\n\n#ifndef HAVE_STD_ABS_LONG\n#ifndef HAVE_STD_LABS\nnamespace std {\n    static long abs(long a) {\n        return a>=0 ? a : -a;\n    }\n}\n#else\nnamespace std {\n    static long abs(long a) {\n        return std::labs(a);\n    }\n}\n#endif\n#endif\n\n\nnamespace madness {\n#define IS_ODD(n) ((n)&0x1)\n#define IS_UNALIGNED(p) (((unsigned long)(p))&0x7)\n\n\n    /// For real types return value, for complex return conjugate\n    template <typename Q, bool iscomplex>\n    struct conditional_conj_struct {\n        static Q op(const Q& coeff) {\n            return coeff;\n        }\n    };\n\n    /// For real types return value, for complex return conjugate\n    template <typename Q>\n    struct conditional_conj_struct<Q,true> {\n        static Q op(const Q& coeff) {\n            return conj(coeff);\n        }\n    };\n\n    /// For real types return value, for complex return conjugate\n    template <typename Q>\n    Q conditional_conj(const Q& coeff) {\n        return conditional_conj_struct<Q,TensorTypeData<Q>::iscomplex>::op(coeff);\n    }\n\n    namespace detail {\n        template <typename T> T mynorm(T t) {\n            return t*t;\n        }\n        template <typename T=int> double mynorm(int t) {\n            return double(t)*double(t);\n        }\n\n        template <typename T> T mynorm(std::complex<T> t) {\n            return std::norm(t);\n        }\n    }\n\n    template <class T> class SliceTensor;\n\n\n\n    //#define TENSOR_USE_SHARED_ALIGNED_ARRAY\n#ifdef TENSOR_USE_SHARED_ALIGNED_ARRAY\n#define TENSOR_SHARED_PTR detail::SharedAlignedArray\n    // this code has been tested and seems to work correctly on all\n    // tests and moldft ... however initial testing indicated a hard\n    // to measure improvement in thread scaling (from 20 to 60 threads\n    // on cn-mem) and no change in the modest thread count (20)\n    // execution time with tbballoc.  hence we are not presently using\n    // it but will test more in the future with different allocators\n    namespace detail {\n        // Minimal ref-counted array with data+counter in one alloc\n        template <typename T> class SharedAlignedArray {\n            T* volatile p;\n            AtomicInt* cnt;\n            void dec() {if (p && ((*cnt)-- == 1)) {free(p); p = 0;}}\n            void inc() {if (p) (*cnt)++;}\n        public:\n            SharedAlignedArray() : p(0), cnt(0) {}\n            T* allocate(std::size_t size, unsigned int alignment) {\n                std::size_t offset = (size*sizeof(T)-1)/sizeof(AtomicInt) + 1; // Where the counter will be\n                std::size_t nbyte = (offset+1)*sizeof(AtomicInt);\n                if (posix_memalign((void **) &p, alignment, nbyte)) throw 1;\n                cnt = (AtomicInt*)(p) + offset;\n                *cnt = 1;\n                return p;\n            }\n            SharedAlignedArray<T>& operator=(const SharedAlignedArray<T>& other) {\n                if (this != &other) {dec(); p = other.p; cnt = other.cnt; inc();}\n                return *this;\n            }\n            void reset() {dec(); p = 0;}\n            ~SharedAlignedArray() {dec();}\n        };\n    }\n#else\n#define TENSOR_SHARED_PTR std::shared_ptr\n#endif\n\n    /// A tensor is a multidimensional array\n\n    /// \\ingroup tensor\n    template <class T> class Tensor : public BaseTensor {\n        template <class U> friend class SliceTensor;\n\n    protected:\n        T* MADNESS_RESTRICT _p;\n        TENSOR_SHARED_PTR <T> _shptr;\n\n        void allocate(long nd, const long d[], bool dozero) {\n            _id = TensorTypeData<T>::id;\n            if (nd < 0) {\n                _p = 0;\n                _shptr.reset();\n                _size = 0;\n                _ndim = -1;\n                return;\n            }\n\n            TENSOR_ASSERT(nd>0 && nd <= TENSOR_MAXDIM,\"invalid ndim in new tensor\", nd, 0);\n            // sanity check ... 2GB in doubles\n            for (int i=0; i<nd; ++i) {\n                TENSOR_ASSERT(d[i]>=0 && d[i]<268435456, \"invalid dimension size in new tensor\",d[i],0);\n            }\n            set_dims_and_size(nd, d);\n            if (_size) {\n                TENSOR_ASSERT(_size>=0 && _size<268435456, \"invalid size in new tensor\",_size,0);\n                try {\n#if HAVE_IBMBGP\n#define TENSOR_ALIGNMENT 16\n#elif HAVE_IBMBGQ\n#define TENSOR_ALIGNMENT 32\n#elif MADNESS_HAVE_AVX2\n/* 32B alignment is best for performance according to\n * http://www.nas.nasa.gov/hecc/support/kb/haswell-processors_492.html */\n#define TENSOR_ALIGNMENT 32\n#elif MADNESS_HAVE_AVX512\n/* One can infer from the AVX2 case that 64B alignment helps with 512b SIMD. */\n#define TENSOR_ALIGNMENT 64\n#else\n// Typical cache line size\n#define TENSOR_ALIGNMENT 64\n#endif\n\n#ifdef TENSOR_USE_SHARED_ALIGNED_ARRAY\n                    _p = _shptr.allocate(_size, TENSOR_ALIGNMENT);\n#elif defined WORLD_GATHER_MEM_STATS\n                    _p = new T[_size];\n                    _shptr = std::shared_ptr<T>(_p);\n#else\n                    if (posix_memalign((void **) &_p, TENSOR_ALIGNMENT, sizeof(T)*_size)) throw 1;\n                    _shptr.reset(_p, &free);\n#endif\n                }\n                catch (...) {\n\t\t  // Ideally use if constexpr here but want headers C++14 for cuda compatibility\nMADNESS_PRAGMA_GCC(diagnostic push)\nMADNESS_PRAGMA_GCC(diagnostic ignored \"-Warray-bounds\")\n                    std::printf(\"new failed nd=%ld type=%ld size=%ld\\n\", nd, id(), _size);\n                    std::printf(\"  %ld %ld %ld %ld %ld %ld\\n\",\n                                d[0], d[1], d[2], d[3], d[4], d[5]);\nMADNESS_PRAGMA_GCC(diagnostic pop)\n                    TENSOR_EXCEPTION(\"new failed\",_size,this);\n                }\n                //std::printf(\"allocated %p [%ld]  %ld\\n\", _p, size, p.use_count());\n                if (dozero) {\n                    //T zero = 0; for (long i=0; i<_size; ++i) _p[i] = zero;\n                    // or\n#ifdef HAVE_MEMSET\n                    memset((void *) _p, 0, _size*sizeof(T));\n#else\n                    aligned_zero(_size, _p);\n#endif\n                }\n            }\n            else {\n                _p = 0;\n                _shptr.reset();\n            }\n        }\n\n        // Free memory and restore default constructor state\n        void deallocate() {\n            _p = 0;\n            _shptr.reset();\n            _size = 0;\n            _ndim = -1;\n        }\n\n    public:\n        /// C++ typename of this tensor.\n        typedef T type;\n\n        /// C++ typename of the real type associated with a complex type.\n        typedef typename TensorTypeData<T>::scalar_type scalar_type;\n\n        /// C++ typename of the floating point type associated with scalar real type\n        typedef typename TensorTypeData<T>::float_scalar_type float_scalar_type;\n\n        /// Default constructor does not allocate any data and sets ndim=-1, size=0, _p=0, and id.\n        Tensor() : _p(0) {\n            _id = TensorTypeData<T>::id;\n        }\n\n        /// Copy constructor is shallow (same as assignment)\n\n        /// \\em Caveat \\em emptor: The shallow copy constructor has many virtues but\n        /// enables you to violate constness with simple code such as\n        /// \\code\n        /// const Tensor<double> a(5);\n        /// Tensor<double> b(a);\n        /// b[1] = 3; // a[1] is now also 3\n        /// \\endcode\n        Tensor(const Tensor<T>& t) {\n            _id = TensorTypeData<T>::id;\n            *this = t;\n        }\n\n        /// Assignment is shallow (same as copy constructor)\n\n        /// \\em Caveat \\em emptor: The shallow assignment has many virtues but\n        /// enables you to violate constness with simple code such as\n        /// \\code\n        /// const Tensor<double> a(5);\n        /// Tensor<double> b;\n        /// b = a;\n        /// b[1] = 3; // a[1] is now also 3\n        /// \\endcode\n        Tensor<T>& operator=(const Tensor<T>& t) {\n            if (this != &t) {\n                _p = t._p;\n                _shptr = t._shptr;\n                _size = t._size;\n                _ndim = t._ndim;\nMADNESS_PRAGMA_GCC(diagnostic push)\nMADNESS_PRAGMA_GCC(diagnostic ignored \"-Wmaybe-uninitialized\")\n                for (int i=0; i<TENSOR_MAXDIM; ++i) {\n                    _dim[i] = t._dim[i];\n                    _stride[i] = t._stride[i];\n                }\nMADNESS_PRAGMA_GCC(diagnostic pop)\n            }\n            return *this;\n        }\n\n\n        /// Type conversion makes a deep copy\n        template <class Q> operator Tensor<Q>() const { // type conv => deep copy\n            Tensor<Q> result = Tensor<Q>(this->_ndim,this->_dim,false);\n            BINARY_OPTIMIZED_ITERATOR(Q, result, const T, (*this), *_p0 = (Q)(*_p1));\n            return result;\n        }\n\n\n        /// Create and zero new 1-d tensor\n\n        /// @param[in] d0 Size of dimension 0\n        explicit Tensor(long d0) : _p(0) {\n            _dim[0] = d0;\n            allocate(1, _dim, true);\n        }\n\n        /// Create and zero new 2-d tensor\n\n        /// @param[in] d0 Size of dimension 0\n        /// @param[in] d1 Size of dimension 1\n        explicit Tensor(long d0, long d1) : _p(0) {\n            _dim[0] = d0; _dim[1] = d1;\n            allocate(2, _dim, true);\n        }\n\n        /// Create and zero new 3-d tensor\n\n        /// @param[in] d0 Size of dimension 0\n        /// @param[in] d1 Size of dimension 1\n        /// @param[in] d2 Size of dimension 2\n        explicit Tensor(long d0, long d1, long d2) : _p(0) {\n            _dim[0] = d0; _dim[1] = d1; _dim[2] = d2;\n            allocate(3, _dim, true);\n        }\n\n        /// Create and zero new 4-d tensor\n\n        /// @param[in] d0 Size of dimension 0\n        /// @param[in] d1 Size of dimension 1\n        /// @param[in] d2 Size of dimension 2\n        /// @param[in] d3 Size of dimension 3\n        explicit Tensor(long d0, long d1, long d2, long d3) : _p(0) {\n            _dim[0] = d0; _dim[1] = d1; _dim[2] = d2; _dim[3] = d3;\n            allocate(4, _dim, true);\n        }\n\n        /// Create and zero new 5-d tensor\n\n        /// @param[in] d0 Size of dimension 0\n        /// @param[in] d1 Size of dimension 1\n        /// @param[in] d2 Size of dimension 2\n        /// @param[in] d3 Size of dimension 3\n        /// @param[in] d4 Size of dimension 4\n        explicit Tensor(long d0, long d1, long d2, long d3, long d4) : _p(0) {\n            _dim[0] = d0; _dim[1] = d1; _dim[2] = d2; _dim[3] = d3; _dim[4] = d4;\n            allocate(5, _dim, true);\n        }\n\n        /// Create and zero new 6-d tensor\n\n        /// @param[in] d0 Size of dimension 0\n        /// @param[in] d1 Size of dimension 1\n        /// @param[in] d2 Size of dimension 2\n        /// @param[in] d3 Size of dimension 3\n        /// @param[in] d4 Size of dimension 4\n        /// @param[in] d5 Size of dimension 5\n        explicit Tensor(long d0, long d1, long d2, long d3, long d4, long d5) {\n            _dim[0] = d0; _dim[1] = d1; _dim[2] = d2; _dim[3] = d3; _dim[4] = d4; _dim[5] = d5;\n            allocate(6, _dim, true);\n        }\n\n        /// Create and optionally zero new n-d tensor. This is the most general constructor.\n\n        /// @param[in] d Vector containing size of each dimension, number of dimensions inferred from vector size.\n        /// @param[in] dozero If true (default) the tensor is initialized to zero\n        explicit Tensor(const std::vector<long>& d, bool dozero=true) : _p(0) {\n            allocate(d.size(), d.size() ? &(d[0]) : 0, dozero);\n        }\n\n        /// Politically incorrect general constructor.\n\n        /// @param[in] nd Number of dimensions\n        /// @param[in] d Size of each dimension\n        /// @param[in] dozero If true (default) the tensor is initialized to zero\n        explicit Tensor(long nd, const long d[], bool dozero=true) : _p(0) {\n            allocate(nd,d,dozero);\n        }\n\n        /// Inplace fill tensor with scalar\n\n        /// @param[in] x Value used to fill tensor via assigment\n        /// @return %Reference to this tensor\n        Tensor<T>& operator=(T x) {\n            UNARY_OPTIMIZED_ITERATOR(T,(*this),*_p0 = x);\n            return *this;\n        }\n\n        /// Inplace fill with a scalar (legacy name)\n\n        /// @param[in] x Value used to fill tensor via assigment\n        /// @return %Reference to this tensor\n        Tensor<T>& fill(T x) {\n            *this = x;\n            return *this;\n        }\n\n        /// Inplace addition of two tensors\n\n        /// @param[in] t Conforming tensor to be added in-place to this tensor\n        /// @return %Reference to this tensor\n        template <typename Q>\n        Tensor<T>& operator+=(const Tensor<Q>& t) {\n            BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, t, *_p0 += *_p1);\n            return *this;\n        }\n\n        /// Inplace subtraction of two tensors\n\n        /// @param[in] t Conforming tensor to be subtracted in-place from this tensor\n        /// @return %Reference to this tensor\n        template <typename Q>\n        Tensor<T>& operator-=(const Tensor<Q>& t) {\n            BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, t, *_p0 -= *_p1);\n            return *this;\n        }\n\n        /// Addition of two tensors to produce a new tensor\n\n        /// @param[in] t Conforming tensor to be added out-of-place to this tensor\n        /// @return New tensor\n        template <typename Q>\n        Tensor< TENSOR_RESULT_TYPE(T,Q) > operator+(const Tensor<Q>& t) const {\n            typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n            Tensor<resultT> result(_ndim,_dim,false);\n            TERNARY_OPTIMIZED_ITERATOR(resultT, result, const T, (*this), const Q, t, *_p0 = *_p1 + *_p2);\n            return result;\n        }\n\n        /// Subtraction of two tensors to produce a new tensor\n\n        /// @param[in] t Conforming tensor to be subtracted out-of-place from this tensor\n        /// @return New tensor\n        template <typename Q>\n        Tensor< TENSOR_RESULT_TYPE(T,Q) > operator-(const Tensor<Q>& t) const {\n            typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n            Tensor<resultT> result(_ndim,_dim,false);\n            TERNARY_OPTIMIZED_ITERATOR(resultT, result, const T, (*this), const Q, t, *_p0 = *_p1 - *_p2);\n            return result;\n        }\n\n        /// Multiplication of tensor by a scalar of a supported type to produce a new tensor\n\n        /// @param[in] x Scalar value\n        /// @return New tensor\n        template <typename Q>\n        typename IsSupported<TensorTypeData<Q>, Tensor<TENSOR_RESULT_TYPE(T,Q)> >::type\n        operator*(const Q& x) const {\n            typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n            Tensor<resultT> result(_ndim,_dim,false);\n            BINARY_OPTIMIZED_ITERATOR(resultT, result, const T, (*this), *_p0 = *_p1 * x);\n            return result;\n        }\n\n        /// Divide tensor by a scalar of a supported type to produce a new tensor\n\n        /// @param[in] x Scalar value\n        /// @return New tensor\n        template <typename Q>\n        typename IsSupported<TensorTypeData<Q>, Tensor<TENSOR_RESULT_TYPE(T,Q)> >::type\n        operator/(const Q& x) const {\n            typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n            Tensor<resultT> result(_ndim,_dim);\n            BINARY_OPTIMIZED_ITERATOR(resultT, result, const T, (*this), *_p0 = *_p1 / x);\n            return result;\n        }\n\n        /// Add a scalar of the same type to all elements of a tensor producing a new tensor\n\n        /// @param[in] x Scalar value\n        /// @return New tensor\n        template <typename Q>\n        typename IsSupported<TensorTypeData<Q>, Tensor<TENSOR_RESULT_TYPE(T,Q)> >::type\n        operator+(const Q& x) const {\n            typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n            Tensor<resultT> result(_ndim,_dim);\n            BINARY_OPTIMIZED_ITERATOR(resultT, result, const T, (*this), *_p0 = *_p1 + x);\n            return result;\n        }\n\n        /// Subtract a scalar of the same type from all elements producing a new tensor\n\n        /// @param[in] x Scalar value\n        /// @return New tensor\n        template <typename Q>\n        typename IsSupported<TensorTypeData<Q>, Tensor<TENSOR_RESULT_TYPE(T,Q)> >::type\n        operator-(const Q& x) const {\n            return (*this) + (-x);\n        }\n\n        /// Unary negation producing a new tensor\n\n        /// @return New tensor\n        Tensor<T> operator-() const {\n            Tensor<T> result = Tensor<T>(_ndim,_dim,false);\n            BINARY_OPTIMIZED_ITERATOR(T, result, const T, (*this), *(_p0) = - (*_p1));\n            return result;\n        }\n\n        /// Inplace multiplication by scalar of supported type\n\n        /// @param[in] x Scalar value\n        /// @return %Reference to this tensor\n        template <typename Q>\n        typename IsSupported<TensorTypeData<Q>,Tensor<T>&>::type\n        operator*=(const Q& x) {\n            UNARY_OPTIMIZED_ITERATOR(T, (*this), *_p0 *= x);\n            return *this;\n        }\n\n        /// Inplace multiplication by scalar of supported type (legacy name)\n\n        /// @param[in] x Scalar value\n        /// @return %Reference to this tensor\n        template <typename Q>\n        typename IsSupported<TensorTypeData<Q>,Tensor<T>&>::type\n        scale(Q x) {\n            return (*this)*=x;\n        }\n\n        /// Inplace increment by scalar of supported type\n\n        /// @param[in] x Scalar value\n        /// @return %Reference to this tensor\n        template <typename Q>\n        typename IsSupported<TensorTypeData<Q>,Tensor<T>&>::type\n        operator+=(const Q& x) {\n            UNARY_OPTIMIZED_ITERATOR(T, (*this), *_p0 += x);\n            return *this;\n        }\n\n        /// Inplace decrement by scalar of supported type\n\n        /// @param[in] x Scalar value\n        /// @return %Reference to this tensor\n        template <typename Q>\n        typename IsSupported<TensorTypeData<Q>,Tensor<T>&>::type\n        operator-=(const Q& x) {\n            UNARY_OPTIMIZED_ITERATOR(T, (*this), *_p0 -= x);\n            return *this;\n        }\n\n\n        /// Inplace complex conjugate\n\n        /// @return %Reference to this tensor\n        Tensor<T>& conj() {\n            UNARY_OPTIMIZED_ITERATOR(T, (*this), *_p0 = conditional_conj(*_p0));\n            return *this;\n        }\n\n        /// Inplace fill with random values ( \\c [0,1] for floats, \\c [0,MAXSIZE] for integers)\n\n        /// @return %Reference to this tensor\n        Tensor<T>& fillrandom() {\n            if (iscontiguous()) {\n                madness::RandomVector<T>(size(), ptr());\n            }\n            else {\n                UNARY_OPTIMIZED_ITERATOR(T,(*this), *_p0 = madness::RandomValue<T>());\n            }\n            return *this;\n        }\n\n        /// Inplace fill with the index of each element\n\n        /// Each element is assigned it's logical index according to this loop structure\n        /// \\code\n        /// Tensor<float> t(5,6,7,...)\n        /// long index=0;\n        /// for (long i=0; i<_dim[0]; ++i)\n        ///    for (long j=0; j<_dim[1]; ++j)\n        ///       for (long k=0; k<_dim[2]; ++k)\n        ///          ...\n        ///          tensor(i,j,k,...) = index++\n        /// \\endcode\n        ///\n        /// @return %Reference to this tensor\n        Tensor<T>& fillindex() {\n            long count = 0;\n            UNARY_UNOPTIMIZED_ITERATOR(T,(*this), *_p0 = count++); // Fusedim would be OK\n            return *this;\n        }\n\n        /// Inplace set elements of \\c *this less than \\c x in absolute magnitude to zero.\n\n        /// @param[in] x Scalar value\n        /// @return %Reference to this tensor\n        Tensor<T>& screen(double x) {\n            T zero = 0;\n            UNARY_OPTIMIZED_ITERATOR(T,(*this), if (std::abs(*_p0)<x) *_p0=zero);\n            return *this;\n        }\n\n\n        /// Return true if bounds checking was enabled at compile time\n\n        /// @return True if bounds checking was enabled at compile time\n        static bool bounds_checking() {\n#ifdef TENSOR_BOUNDS_CHECKING\n            return true;\n#else\n            return false;\n#endif\n        }\n\n        /// 1-d indexing operation using \\c [] \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @return %Reference to element\n        T& operator[](long i) {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"1d bounds check failed dim=0\",i,this);\n#endif\n            return _p[i*_stride[0]];\n        }\n\n        /// 1-d indexing operation using \\c [] \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @return %Reference to element\n        const T& operator[](long i) const {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"1d bounds check failed dim=0\",i,this);\n#endif\n            return _p[i*_stride[0]];\n        }\n\n        /// 1-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @return %Reference to element\n        T& operator()(long i) {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"1d bounds check failed dim=0\",i,this);\n#endif\n            return _p[i*_stride[0]];\n        }\n\n        /// 1-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @return %Reference to element\n        const T& operator()(long i) const {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"1d bounds check failed dim=0\",i,this);\n#endif\n            return _p[i*_stride[0]];\n        }\n\n        /// 2-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @param[in] j index for dimension 1\n        /// @return %Reference to element\n        T& operator()(long i, long j) {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"2d bounds check failed dim=0\",i,this);\n            TENSOR_ASSERT(j>=0 && j<_dim[1],\"2d bounds check failed dim=1\",j,this);\n#endif\n            return _p[i*_stride[0]+j*_stride[1]];\n        }\n\n        /// 2-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @param[in] j index for dimension 1\n        /// @return %Reference to element\n        const T& operator()(long i, long j) const {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"2d bounds check failed dim=0\",i,this);\n            TENSOR_ASSERT(j>=0 && j<_dim[1],\"2d bounds check failed dim=1\",j,this);\n#endif\n            return _p[i*_stride[0]+j*_stride[1]];\n        }\n\n        /// 3-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @param[in] j index for dimension 1\n        /// @param[in] k index for dimension 2\n        /// @return %Reference to element\n        T& operator()(long i, long j, long k) {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"3d bounds check failed dim=0\",i,this);\n            TENSOR_ASSERT(j>=0 && j<_dim[1],\"3d bounds check failed dim=1\",j,this);\n            TENSOR_ASSERT(k>=0 && k<_dim[2],\"3d bounds check failed dim=2\",k,this);\n#endif\n            return _p[i*_stride[0]+j*_stride[1]+k*_stride[2]];\n        }\n\n        /// 3-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @param[in] j index for dimension 1\n        /// @param[in] k index for dimension 2\n        /// @return %Reference to element\n        const T& operator()(long i, long j, long k) const {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"3d bounds check failed dim=0\",i,this);\n            TENSOR_ASSERT(j>=0 && j<_dim[1],\"3d bounds check failed dim=1\",j,this);\n            TENSOR_ASSERT(k>=0 && k<_dim[2],\"3d bounds check failed dim=2\",k,this);\n#endif\n            return _p[i*_stride[0]+j*_stride[1]+k*_stride[2]];\n        }\n\n        /// 4-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @param[in] j index for dimension 1\n        /// @param[in] k index for dimension 2\n        /// @param[in] l index for dimension 3\n        /// @return %Reference to element\n        T& operator()(long i, long j, long k, long l) {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"4d bounds check failed dim=0\",i,this);\n            TENSOR_ASSERT(j>=0 && j<_dim[1],\"4d bounds check failed dim=1\",j,this);\n            TENSOR_ASSERT(k>=0 && k<_dim[2],\"4d bounds check failed dim=2\",k,this);\n            TENSOR_ASSERT(l>=0 && l<_dim[3],\"4d bounds check failed dim=3\",l,this);\n#endif\n            return _p[i*_stride[0]+j*_stride[1]+k*_stride[2]+\n                           l*_stride[3]];\n        }\n\n        /// 4-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @param[in] j index for dimension 1\n        /// @param[in] k index for dimension 2\n        /// @param[in] l index for dimension 3\n        /// @return %Reference to element\n        const T& operator()(long i, long j, long k, long l) const {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"4d bounds check failed dim=0\",i,this);\n            TENSOR_ASSERT(j>=0 && j<_dim[1],\"4d bounds check failed dim=1\",j,this);\n            TENSOR_ASSERT(k>=0 && k<_dim[2],\"4d bounds check failed dim=2\",k,this);\n            TENSOR_ASSERT(l>=0 && l<_dim[3],\"4d bounds check failed dim=3\",l,this);\n#endif\n            return _p[i*_stride[0]+j*_stride[1]+k*_stride[2]+\n                           l*_stride[3]];\n        }\n\n        /// 5-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @param[in] j index for dimension 1\n        /// @param[in] k index for dimension 2\n        /// @param[in] l index for dimension 3\n        /// @param[in] m index for dimension 4\n        /// @return %Reference to element\n        T& operator()(long i, long j, long k, long l, long m) {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"5d bounds check failed dim=0\",i,this);\n            TENSOR_ASSERT(j>=0 && j<_dim[1],\"5d bounds check failed dim=1\",j,this);\n            TENSOR_ASSERT(k>=0 && k<_dim[2],\"5d bounds check failed dim=2\",k,this);\n            TENSOR_ASSERT(l>=0 && l<_dim[3],\"5d bounds check failed dim=3\",l,this);\n            TENSOR_ASSERT(m>=0 && m<_dim[4],\"5d bounds check failed dim=4\",m,this);\n#endif\n            return _p[i*_stride[0]+j*_stride[1]+k*_stride[2]+\n                           l*_stride[3]+m*_stride[4]];\n        }\n\n        /// 5-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @param[in] j index for dimension 1\n        /// @param[in] k index for dimension 2\n        /// @param[in] l index for dimension 3\n        /// @param[in] m index for dimension 4\n        /// @return %Reference to element\n        const T& operator()(long i, long j, long k, long l, long m) const {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"5d bounds check failed dim=0\",i,this);\n            TENSOR_ASSERT(j>=0 && j<_dim[1],\"5d bounds check failed dim=1\",j,this);\n            TENSOR_ASSERT(k>=0 && k<_dim[2],\"5d bounds check failed dim=2\",k,this);\n            TENSOR_ASSERT(l>=0 && l<_dim[3],\"5d bounds check failed dim=3\",l,this);\n            TENSOR_ASSERT(m>=0 && m<_dim[4],\"5d bounds check failed dim=4\",m,this);\n#endif\n            return _p[i*_stride[0]+j*_stride[1]+k*_stride[2]+\n                           l*_stride[3]+m*_stride[4]];\n        }\n\n        /// 6-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @param[in] j index for dimension 1\n        /// @param[in] k index for dimension 2\n        /// @param[in] l index for dimension 3\n        /// @param[in] m index for dimension 4\n        /// @param[in] n index for dimension 5\n        /// @return %Reference to element\n        T& operator()(long i, long j, long k, long l, long m, long n) {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"6d bounds check failed dim=0\",i,this);\n            TENSOR_ASSERT(j>=0 && j<_dim[1],\"6d bounds check failed dim=1\",j,this);\n            TENSOR_ASSERT(k>=0 && k<_dim[2],\"6d bounds check failed dim=2\",k,this);\n            TENSOR_ASSERT(l>=0 && l<_dim[3],\"6d bounds check failed dim=3\",l,this);\n            TENSOR_ASSERT(m>=0 && m<_dim[4],\"6d bounds check failed dim=4\",m,this);\n            TENSOR_ASSERT(n>=0 && n<_dim[5],\"6d bounds check failed dim=5\",n,this);\n#endif\n            return _p[i*_stride[0]+j*_stride[1]+k*_stride[2]+\n                           l*_stride[3]+m*_stride[4]+n*_stride[5]];\n        }\n\n        /// 6-d indexing operation \\em without bounds checking.\n\n        /// @param[in] i index for dimension 0\n        /// @param[in] j index for dimension 1\n        /// @param[in] k index for dimension 2\n        /// @param[in] l index for dimension 3\n        /// @param[in] m index for dimension 4\n        /// @param[in] n index for dimension 5\n        /// @return %Reference to element\n        const T& operator()(long i, long j, long k, long l, long m, long n) const {\n#ifdef TENSOR_BOUNDS_CHECKING\n            TENSOR_ASSERT(i>=0 && i<_dim[0],\"6d bounds check failed dim=0\",i,this);\n            TENSOR_ASSERT(j>=0 && j<_dim[1],\"6d bounds check failed dim=1\",j,this);\n            TENSOR_ASSERT(k>=0 && k<_dim[2],\"6d bounds check failed dim=2\",k,this);\n            TENSOR_ASSERT(l>=0 && l<_dim[3],\"6d bounds check failed dim=3\",l,this);\n            TENSOR_ASSERT(m>=0 && m<_dim[4],\"6d bounds check failed dim=4\",m,this);\n            TENSOR_ASSERT(n>=0 && n<_dim[5],\"6d bounds check failed dim=5\",n,this);\n#endif\n            return _p[i*_stride[0]+j*_stride[1]+k*_stride[2]+\n                           l*_stride[3]+m*_stride[4]+n*_stride[5]];\n        }\n\n        /// Politically incorrect general indexing operation \\em without bounds checking.\n\n        /// @param[in] ind Array containing index for each dimension\n        /// @return %Reference to element\n        T& operator()(const long ind[]) {\n            long offset = 0;\n            for (int d=0; d<_ndim; ++d) {\n                long i = ind[d];\n#ifdef TENSOR_BOUNDS_CHECKING\n                TENSOR_ASSERT(i>=0 && i<_dim[0],\"non-PC general indexing bounds check failed dim=\",d,this);\n#endif\n                offset += i*_stride[d];\n            }\n            return _p[offset];\n        }\n\n        /// Politically incorrect general indexing operation \\em without bounds checking.\n\n        /// @param[in] ind Array containing index for each dimension\n        /// @return %Reference to element\n        const T& operator()(const long ind[]) const {\n            long offset = 0;\n            for (int d=0; d<_ndim; ++d) {\n                long i = ind[d];\n#ifdef TENSOR_BOUNDS_CHECKING\n                TENSOR_ASSERT(i>=0 && i<_dim[0],\"non-PC general indexing bounds check failed dim=\",d,this);\n#endif\n                offset += i*_stride[d];\n            }\n            return _p[offset];\n        }\n\n        /// General indexing operation \\em with bounds checking.\n\n        /// @param[in] ind Vector containing index for each dimension\n        /// @return %Reference to element\n        T& operator()(const std::vector<long> ind) {\n            TENSOR_ASSERT(ind.size()>=(unsigned int) _ndim,\"invalid number of dimensions\",ind.size(),this);\n            long index=0;\n            for (long d=0; d<_ndim; ++d) {\n                TENSOR_ASSERT(ind[d]>=0 && ind[d]<_dim[d],\"out-of-bounds access\",ind[d],this);\n                index += ind[d]*_stride[d];\n            }\n            return _p[index];\n        }\n\n        /// General indexing operation \\em with bounds checking.\n\n        /// @param[in] ind Vector containing index for each dimension\n        /// @return %Reference to element\n        const T& operator()(const std::vector<long> ind) const {\n            TENSOR_ASSERT(ind.size()>=(unsigned int) _ndim,\"invalid number of dimensions\",ind.size(),this);\n            long index=0;\n            for (long d=0; d<_ndim; ++d) {\n                TENSOR_ASSERT(ind[d]>=0 && ind[d]<_dim[d],\"out-of-bounds access\",ind[d],this);\n                index += ind[d]*_stride[d];\n            }\n            return _p[index];\n        }\n\n        /// General slicing operation\n\n        /// @param[in] s Vector containing slice for each dimension\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const std::vector<Slice>& s) {\n            TENSOR_ASSERT(s.size()>=(unsigned)(this->ndim()), \"invalid number of dimensions\",\n                          this->ndim(),this);\n            return SliceTensor<T>(*this,&(s[0]));\n        }\n\n        /// General slicing operation (const)\n\n        /// @param[in] s Vector containing slice for each dimension\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const std::vector<Slice>& s) const {\n            TENSOR_ASSERT(s.size()>=(unsigned)(this->ndim()), \"invalid number of dimensions\",\n                          this->ndim(),this);\n            return SliceTensor<T>(*this,&(s[0]));\n        }\n\n        /// General slicing operation\n\n        /// @param[in] s array containing slice for each dimension\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const std::array<Slice,TENSOR_MAXDIM>& s) {\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// General slicing operation (const)\n\n        /// @param[in] s array containing slice for each dimension\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const std::array<Slice,TENSOR_MAXDIM>& s) const {\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d SliceTensor that views the specified range of the 1d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const Slice& s0) {\n            TENSOR_ASSERT(this->ndim()==1,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[1] = {s0};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d SliceTensor that views the specified range of the 1d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor: \\f$ R(*,*,\\ldots) \\rightarrow I(*,*,\\ldots) \\f$\n        const Tensor<T> operator()(const Slice& s0) const {\n            TENSOR_ASSERT(this->ndim()==1,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[1] = {s0};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d SliceTensor that views the specified range of the 2d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor: \\f$ R(*) \\rightarrow I(i,*) \\f$\n        SliceTensor<T> operator()(long i, const Slice& s1) {\n            TENSOR_ASSERT(this->ndim()==2,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[2] = {Slice(i,i,0),s1};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d SliceTensor that views the specified range of the 2d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(long i, const Slice& s1) const {\n            TENSOR_ASSERT(this->ndim()==2,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[2] = {Slice(i,i,0),s1};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d SliceTensor that views the specified range of the 2d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const Slice& s0, long j) {\n            TENSOR_ASSERT(this->ndim()==2,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[2] = {s0,Slice(j,j,0)};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d constant Tensor that views the specified range of the 2d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const Slice& s0, long j) const {\n            TENSOR_ASSERT(this->ndim()==2,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[2] = {s0,Slice(j,j,0)};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 2d SliceTensor that views the specified range of the 2d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const Slice& s0, const Slice& s1) {\n            TENSOR_ASSERT(this->ndim()==2,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[2] = {s0,s1};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 2d constant Tensor that views the specified range of the 2d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const Slice& s0, const Slice& s1) const {\n            TENSOR_ASSERT(this->ndim()==2,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[2] = {s0,s1};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 3d SliceTensor that views the specified range of the 3d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const Slice& s0, const Slice& s1, const Slice& s2) {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {s0,s1,s2};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 3d constant Tensor that views the specified range of the 3d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const Slice& s0, const Slice& s1, const Slice& s2) const {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {s0,s1,s2};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 2d SliceTensor that views the specified range of the 3d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(long i, const Slice& s1, const Slice& s2) {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {Slice(i,i,0),s1,s2};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 2d constant Tensor that views the specified range of the 3d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(long i, const Slice& s1, const Slice& s2) const {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {Slice(i,i,0),s1,s2};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 2d SliceTensor that views the specified range of the 3d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const Slice& s0, long j, const Slice& s2) {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {s0,Slice(j,j,0),s2};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 2d constant Tensor that views the specified range of the 3d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const Slice& s0, long j, const Slice& s2) const {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {s0,Slice(j,j,0),s2};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 2d SliceTensor that views the specified range of the 3d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const Slice& s0, const Slice& s1, long k) {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {s0,s1,Slice(k,k,0)};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 2d constant Tensor that views the specified range of the 3d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const Slice& s0, const Slice& s1, long k) const {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {s0,s1,Slice(k,k,0)};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d SliceTensor that views the specified range of the 3d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(long i, long j, const Slice& s2) {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {Slice(i,i,0),Slice(j,j,0),s2};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d constant Tensor that views the specified range of the 3d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(long i, long j, const Slice& s2) const {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {Slice(i,i,0),Slice(j,j,0),s2};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d SliceTensor that views the specified range of the 3d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(long i, const Slice& s1, long k) {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {Slice(i,i,0),s1,Slice(k,k,0)};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d constant Tensor that views the specified range of the 3d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(long i, const Slice& s1, long k) const {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {Slice(i,i,0),s1,Slice(k,k,0)};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d SliceTensor that views the specified range of the 3d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const Slice& s0, long j, long k) {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {s0,Slice(j,j,0),Slice(k,k,0)};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1d constant Tensor that views the specified range of the 3d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const Slice& s0, long j, long k) const {\n            TENSOR_ASSERT(this->ndim()==3,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[3] = {s0,Slice(j,j,0),Slice(k,k,0)};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1-4d SliceTensor that views the specified range of the 4d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const Slice& s0, const Slice& s1, const Slice& s2,\n                                  const Slice& s3) {\n            TENSOR_ASSERT(this->ndim()==4,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[4] = {s0,s1,s2,s3};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1-4d constant Tensor that views the specified range of the 4d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const Slice& s0, const Slice& s1, const Slice& s2,\n                                  const Slice& s3) const {\n            TENSOR_ASSERT(this->ndim()==4,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[4] = {s0,s1,s2,s3};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1-5d SliceTensor that views the specified range of the 5d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const Slice& s0, const Slice& s1, const Slice& s2,\n                                  const Slice& s3, const Slice& s4) {\n            TENSOR_ASSERT(this->ndim()==5,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[5] = {s0,s1,s2,s3,s4};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1-5d constant Tensor that views the specified range of the 5d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const Slice& s0, const Slice& s1, const Slice& s2,\n                                  const Slice& s3, const Slice& s4) const {\n            TENSOR_ASSERT(this->ndim()==5,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[5] = {s0,s1,s2,s3,s4};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Return a 1-6d SliceTensor that views the specified range of the 6d Tensor\n\n        /// @return SliceTensor viewing patch of original tensor\n        SliceTensor<T> operator()(const Slice& s0, const Slice& s1, const Slice& s2,\n                                  const Slice& s3, const Slice& s4, const Slice& s5) {\n            TENSOR_ASSERT(this->ndim()==6,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[6] = {s0,s1,s2,s3,s4,s5};\n            return SliceTensor<T>(*this,s);\n        }\n\n\n        /// Return a 1-6d constant Tensor that views the specified range of the 6d Tensor\n\n        /// @return Constant Tensor viewing patch of original tensor\n        const Tensor<T> operator()(const Slice& s0, const Slice& s1, const Slice& s2,\n                                  const Slice& s3, const Slice& s4, const Slice& s5) const {\n            TENSOR_ASSERT(this->ndim()==6,\"invalid number of dimensions\",\n                          this->ndim(),this);\n            Slice s[6] = {s0,s1,s2,s3,s4,s5};\n            return SliceTensor<T>(*this,s);\n        }\n\n        /// Returns new view/tensor reshaping size/number of dimensions to conforming tensor\n\n        /// @param[in] ndimnew Number of dimensions in the result\n        /// @param[in] d Array containing size of each new dimension\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        Tensor<T> reshape(int ndimnew, const long* d) {\n            Tensor<T> result(*this);\n            result.reshape_inplace(ndimnew,d);\n            return result;\n        }\n\n        /// Returns new view/tensor reshaping size/number of dimensions to conforming tensor\n\n        /// @param[in] ndimnew Number of dimensions in the result\n        /// @param[in] d Array containing size of each new dimension\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        const Tensor<T> reshape(int ndimnew, const long* d) const {\n            Tensor<T> result(*const_cast<Tensor<T>*>(this));\n            result.reshape_inplace(ndimnew,d);\n            return result;\n        }\n\n        /// Returns new view/tensor reshaping size/number of dimensions to conforming tensor\n\n        /// @param[in] d Array containing size of each new dimension\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        Tensor<T> reshape(const std::vector<long>& d) {\n\t  return reshape(d.size(), d.size() ? &d[0] : 0);\n        }\n\n        /// Returns new view/tensor reshaping size/number of dimensions to conforming tensor\n\n        /// @param[in] d Array containing size of each new dimension\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        const Tensor<T> reshape(const std::vector<long>& d) const {\n            return reshape(d.size(), d.size() ? &d[0] : 0);\n        }\n\n        /// Returns new view/tensor rehapings to conforming 1-d tensor with given dimension\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        Tensor<T> reshape(long dim0) {\n            long d[1] = {dim0};\n            return reshape(1,d);\n        }\n        /// Returns new view/tensor rehapings to conforming 1-d tensor with given dimension\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        const Tensor<T> reshape(long dim0) const {\n            long d[1] = {dim0};\n            return reshape(1,d);\n        }\n\n        /// Returns new view/tensor rehaping to conforming 2-d tensor with given dimensions\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @param[in] dim1 Size of new dimension 1\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        Tensor<T> reshape(long dim0, long dim1) {\n            long d[2] = {dim0,dim1};\n            return reshape(2,d);\n        }\n\n        /// Returns new view/tensor rehaping to conforming 2-d tensor with given dimensions\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @param[in] dim1 Size of new dimension 1\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        const Tensor<T> reshape(long dim0, long dim1) const {\n            long d[2] = {dim0,dim1};\n            return reshape(2,d);\n        }\n\n        /// Returns new view/tensor rehaping to conforming 3-d tensor with given dimensions\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @param[in] dim1 Size of new dimension 1\n        /// @param[in] dim2 Size of new dimension 2\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        Tensor<T> reshape(long dim0, long dim1, long dim2) {\n            long d[3] = {dim0,dim1,dim2};\n            return reshape(3,d);\n        }\n\n        /// Returns new view/tensor rehaping to conforming 3-d tensor with given dimensions\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @param[in] dim1 Size of new dimension 1\n        /// @param[in] dim2 Size of new dimension 2\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        const Tensor<T> reshape(long dim0, long dim1, long dim2) const {\n            long d[3] = {dim0,dim1,dim2};\n            return reshape(3,d);\n        }\n\n        /// Returns new view/tensor rehaping to conforming 4-d tensor with given dimensions\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @param[in] dim1 Size of new dimension 1\n        /// @param[in] dim2 Size of new dimension 2\n        /// @param[in] dim3 Size of new dimension 3\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        Tensor<T> reshape(long dim0, long dim1, long dim2, long dim3) {\n            long d[4] = {dim0,dim1,dim2,dim3};\n            return reshape(4,d);\n        }\n\n        /// Returns new view/tensor rehaping to conforming 4-d tensor with given dimensions\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @param[in] dim1 Size of new dimension 1\n        /// @param[in] dim2 Size of new dimension 2\n        /// @param[in] dim3 Size of new dimension 3\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        const Tensor<T> reshape(long dim0, long dim1, long dim2, long dim3) const {\n            long d[4] = {dim0,dim1,dim2,dim3};\n            return reshape(4,d);\n        }\n\n        /// Returns new view/tensor rehaping to conforming 5-d tensor with given dimensions\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @param[in] dim1 Size of new dimension 1\n        /// @param[in] dim2 Size of new dimension 2\n        /// @param[in] dim3 Size of new dimension 3\n        /// @param[in] dim4 Size of new dimension 4\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        Tensor<T> reshape(long dim0, long dim1, long dim2, long dim3, long dim4) {\n            long d[5] = {dim0,dim1,dim2,dim3,dim4};\n            return reshape(5,d);\n        }\n\n        /// Returns new view/tensor rehaping to conforming 5-d tensor with given dimensions\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @param[in] dim1 Size of new dimension 1\n        /// @param[in] dim2 Size of new dimension 2\n        /// @param[in] dim3 Size of new dimension 3\n        /// @param[in] dim4 Size of new dimension 4\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        const Tensor<T> reshape(long dim0, long dim1, long dim2, long dim3, long dim4) const {\n            long d[5] = {dim0,dim1,dim2,dim3,dim4};\n            return reshape(5,d);\n        }\n\n        /// Returns new view/tensor rehaping to conforming 6-d tensor with given dimensions\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @param[in] dim1 Size of new dimension 1\n        /// @param[in] dim2 Size of new dimension 2\n        /// @param[in] dim3 Size of new dimension 3\n        /// @param[in] dim4 Size of new dimension 4\n        /// @param[in] dim5 Size of new dimension 5\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        Tensor<T> reshape(long dim0, long dim1, long dim2, long dim3, long dim4, long dim5) {\n            long d[6] = {dim0,dim1,dim2,dim3,dim4,dim5};\n            return reshape(6,d);\n        }\n\n        /// Returns new view/tensor rehaping to conforming 6-d tensor with given dimensions\n\n        /// @param[in] dim0 Size of new dimension 0\n        /// @param[in] dim1 Size of new dimension 1\n        /// @param[in] dim2 Size of new dimension 2\n        /// @param[in] dim3 Size of new dimension 3\n        /// @param[in] dim4 Size of new dimension 4\n        /// @param[in] dim5 Size of new dimension 5\n        /// @return New tensor (viewing same underlying data as the original but with different shape)\n        const Tensor<T> reshape(long dim0, long dim1, long dim2, long dim3, long dim4, long dim5) const {\n            long d[6] = {dim0,dim1,dim2,dim3,dim4,dim5};\n            return reshape(6,d);\n        }\n\n        /// Returns new view/tensor rehshaping to flat (1-d) tensor\n        Tensor<T> flat() {\n            long d[1] = {_size};\n            return reshape(1,d);\n        }\n\n        /// Returns new view/tensor rehshaping to flat (1-d) tensor\n        const Tensor<T> flat() const {\n            long d[1] = {_size};\n            return reshape(1,d);\n        }\n\n        /// Returns new view/tensor splitting dimension \\c i as \\c dimi0*dimi1 to produce conforming d+1 dimension tensor\n\n        /// @return New tensor (viewing same underlying data as the original but with additional dimensions)\n        Tensor<T> splitdim(long i, long dimi0, long dimi1) {\n            Tensor<T> result(*this);\n            result.splitdim_inplace(i, dimi0, dimi1);\n            return result;\n        }\n\n        /// Returns new view/tensor splitting dimension \\c i as \\c dimi0*dimi1 to produce conforming d+1 dimension tensor\n\n        /// @return New tensor (viewing same underlying data as the original but with additional dimensions)\n        const Tensor<T> splitdim(long i, long dimi0, long dimi1) const {\n            Tensor<T> result(*const_cast<Tensor<T>*>(this));\n            result.splitdim_inplace(i, dimi0, dimi1);\n            return result;\n        }\n\n        /// Returns new view/tensor fusing contiguous dimensions \\c i and \\c i+1\n\n        /// @return New tensor (viewing same underlying data as the original but with fewer dimensions)\n        Tensor<T> fusedim(long i) {\n            Tensor<T> result(*this);\n            result.fusedim_inplace(i);\n            return result;\n        }\n\n        /// Returns new view/tensor fusing contiguous dimensions \\c i and \\c i+1\n\n        /// @return New tensor (viewing same underlying data as the original but with fewer dimensions)\n        const Tensor<T> fusedim(long i) const {\n            Tensor<T> result(*const_cast<Tensor<T>*>(this));\n            result.fusedim_inplace(i);\n            return result;\n        }\n\n        /// Returns new view/tensor swaping dimensions \\c i and \\c j\n\n        /// @return New tensor (viewing same underlying data as the original but with reordered dimensions)\n        Tensor<T> swapdim(long idim, long jdim) {\n            Tensor<T> result(*this);\n            result.swapdim_inplace(idim, jdim);\n            return result;\n        }\n\n        /// Returns new view/tensor swaping dimensions \\c i and \\c j\n\n        /// @return New tensor (viewing same underlying data as the original but with reordered dimensions)\n        const Tensor<T> swapdim(long idim, long jdim) const {\n            Tensor<T> result(*const_cast<Tensor<T>*>(this));\n            result.swapdim_inplace(idim, jdim);\n            return result;\n        }\n\n        /// Returns new view/tensor permuting the dimensions\n\n        /// @param[in] map Old dimension i becomes new dimension \\c map[i]\n        /// @return New tensor (viewing same underlying data as the original but with reordered dimensions)\n        Tensor<T> mapdim(const std::vector<long>& map) {\n            Tensor<T> result(*this);\n            result.mapdim_inplace(map);\n            return result;\n        }\n\n        /// Returns new view/tensor permuting the dimensions\n\n        /// @return New tensor (viewing same underlying data as the original but with reordered dimensions)\n        const Tensor<T> mapdim(const std::vector<long>& map) const {\n            Tensor<T> result(*const_cast<Tensor<T>*>(this));\n            result.mapdim_inplace(map);\n            return result;\n        }\n\n\n        /// Returns new view/tensor cycling the sub-dimensions `(start,...,end)` with `shift` steps\n        Tensor<T> cycledim(long nshift, long start, long end) {\n            Tensor<T> result(*this);\n            result.cycledim_inplace(nshift, start, end);\n            return result;\n        }\n\n\n        /// Returns new view/tensor cycling the sub-dimensions `(start,...,end)` with `shift` steps\n        const Tensor<T> cycledim(long nshift, long start, long end) const {\n            Tensor<T> result(*const_cast<Tensor<T>*>(this));\n            result.cycledim_inplace(nshift, start, end);\n            return result;\n        }\n\n\n        /// Test if \\c *this and \\c t conform.\n        template <class Q> bool conforms(const Tensor<Q>& t) const {\n            return BaseTensor::conforms(&t);\n        }\n\n        /// Returns the sum of all elements of the tensor\n        T sum() const {\n            T result = 0;\n            UNARY_OPTIMIZED_ITERATOR(const T,(*this),result += *_p0);\n            return result;\n        }\n\n        /// Returns the sum of the squares of the elements\n        T sumsq() const {\n            T result = 0;\n            UNARY_OPTIMIZED_ITERATOR(const T,(*this),result += (*_p0) * (*_p0));\n            return result;\n        }\n\n        /// Return the product of all elements of the tensor\n        T product() const {\n            T result = 1;\n            UNARY_OPTIMIZED_ITERATOR(const T,(*this),result *= *_p0);\n            return result;\n        }\n\n        /// Return the minimum value (and if ind is non-null, its index) in the Tensor\n        T min(long* ind=0) const {\n            T result = *(this->_p);\n            if (ind) {\n                for (long i=0; i<_ndim; ++i) ind[i]=0;\n                long nd = _ndim-1;\n                UNARY_UNOPTIMIZED_ITERATOR(const T,(*this),\n                                           if (result > *_p0) {\n                                               result = *_p0;\n                                               for (long i=0; i<nd; ++i) ind[i]=iter.ind[i];\n                                               ind[nd] = _j;\n                                           }\n                                           );\n            }\n            else {\n                UNARY_OPTIMIZED_ITERATOR(const T,(*this),result=std::min<T>(result,*_p0));\n            }\n            return result;\n        }\n\n        /// Return the maximum value (and if ind is non-null, its index) in the Tensor\n        T max(long* ind=0) const {\n            T result = *(this->_p);\n            if (ind) {\n                for (long i=0; i<_ndim; ++i) ind[i]=0;\n                long nd = _ndim-1;\n                UNARY_UNOPTIMIZED_ITERATOR(const T,(*this),\n                                           if (result < *_p0) {\n                                               result = *_p0;\n                                               for (long i=0; i<nd; ++i) ind[i]=iter.ind[i];\n                                               ind[nd] = _j;\n                                           }\n                                           );\n            }\n            else {\n                UNARY_OPTIMIZED_ITERATOR(const T,(*this),result=std::max<T>(result,*_p0));\n            }\n            return result;\n        }\n\n        // For complex types, this next group returns the appropriate real type\n        // For real types, the same type as T is returned (type_data.h)\n\n        /// Returns the Frobenius norm of the tensor\n        float_scalar_type normf() const {\n            float_scalar_type result = 0;\n            UNARY_OPTIMIZED_ITERATOR(const T,(*this),result += ::madness::detail::mynorm(*_p0));\n            return (float_scalar_type) std::sqrt(result);\n        }\n\n        /// Return the absolute minimum value (and if ind is non-null, its index) in the Tensor\n        scalar_type absmin(long *ind = 0) const {\n            scalar_type result = std::abs(*(this->_p));\n            if (ind) {\n                for (long i=0; i<_ndim; ++i) ind[i]=0;\n                long nd = _ndim-1;\n                UNARY_UNOPTIMIZED_ITERATOR(const T,(*this),\n                                           scalar_type absval = std::abs(*_p0);\n                                           if (result > absval) {\n                                               result = absval;\n                                               for (long i=0; i<nd; ++i) ind[i]=iter.ind[i];\n                                               ind[nd] = _j;\n                                           }\n                                           );\n            }\n            else {\n                UNARY_OPTIMIZED_ITERATOR(const T,(*this),result=std::min<scalar_type>(result,std::abs(*_p0)));\n            }\n            return result;\n        }\n\n        /// Return the absolute maximum value (and if ind is non-null, its index) in the Tensor\n        scalar_type absmax(long *ind = 0) const {\n            scalar_type result = std::abs(*(this->_p));\n            if (ind) {\n                for (long i=0; i<_ndim; ++i) ind[i]=0;\n                long nd = _ndim-1;\n                UNARY_UNOPTIMIZED_ITERATOR(T,(*this),\n                                           scalar_type absval = std::abs(*_p0);\n                                           if (result < absval) {\n                                               result = absval;\n                                               for (long i=0; i<nd; ++i) ind[i]=iter.ind[i];\n                                               ind[nd] = _j;\n                                           }\n                                           );\n            }\n            else {\n                UNARY_OPTIMIZED_ITERATOR(const T,(*this),result=std::max<scalar_type>(result,std::abs(*_p0)));\n            }\n            return result;\n        }\n\n\n        /// Return the trace of two tensors (no complex conjugate invoked)\n        template <class Q>\n        TENSOR_RESULT_TYPE(T,Q) trace(const Tensor<Q>& t) const {\n            TENSOR_RESULT_TYPE(T,Q) result = 0;\n            BINARY_OPTIMIZED_ITERATOR(const T,(*this),const Q,t,result += (*_p0)*(*_p1));\n            return result;\n        }\n\n        /// Return the trace of two tensors with complex conjugate of the leftmost (i.e., this)\n        template <class Q>\n        TENSOR_RESULT_TYPE(T,Q) trace_conj(const Tensor<Q>& t) const {\n            TENSOR_RESULT_TYPE(T,Q) result = 0;\n            BINARY_OPTIMIZED_ITERATOR(const T,(*this),const Q,t,result += conditional_conj(*_p0)*(*_p1));\n            return result;\n        }\n\n        /// Inplace apply a unary function to each element of the tensor\n        template <typename opT>\n        Tensor<T>& unaryop(opT& op) {\n            UNARY_OPTIMIZED_ITERATOR(T,(*this),*_p0=op(*_p0));\n            return *this;\n        }\n\n        /// Inplace multiply by corresponding elements of argument Tensor\n        Tensor<T>& emul(const Tensor<T>& t) {\n            BINARY_OPTIMIZED_ITERATOR(T,(*this),const T,t,*_p0 *= *_p1);\n            return *this;\n        }\n\n        /// Inplace generalized saxpy ... this = this*alpha + other*beta\n        Tensor<T>& gaxpy(T alpha, const Tensor<T>& other, T beta) {\n            if (alpha == T(1)) {\n                if (beta == T(1)) {\n                    BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, other, (*_p0) += (*_p1));\n                }\n                else if (beta == T(0)) {\n                    // noop\n                }\n                else {\n                    BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, other, (*_p0) += beta * (*_p1));\n                }\n            }\n            else if (alpha == T(0)) {\n                if (beta == T(1)) {\n                    BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, other, (*_p0) = (*_p1));\n                }\n                else if (beta == T(0)) {\n                    *this = T(0);\n                }\n                else {\n                    BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, other, (*_p0) = beta * (*_p1));\n                }\n            } else {\n                if (beta == T(1)) {\n                    BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, other, (*_p0) = alpha * (*_p0) + (*_p1));\n                } else if (beta == T(0)) {\n                    BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, other, (*_p0) = alpha * (*_p0));\n                } else {\n                    BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, other, (*_p0) = alpha * (*_p0) + beta * (*_p1));\n                }\n            }\n            return *this;\n        }\n\n        /// Returns a pointer to the internal data\n        T* ptr() {\n            return _p;\n        }\n\n        /// Returns a pointer to the internal data\n        const T* ptr() const {\n            return _p;\n        }\n\n        /// Returns a pointer to the base class\n        BaseTensor* base() {\n            return static_cast<BaseTensor*>(this);\n        }\n\n        /// Returns a pointer to the base class\n        const BaseTensor* base() const {\n            return static_cast<const BaseTensor*>(this);\n        }\n\n        /// Return iterator over single tensor\n        TensorIterator<T> unary_iterator(long iterlevel=0,\n                                         bool optimize=true,\n                                         bool fusedim=true,\n                                         long jdim=default_jdim) const {\n            return TensorIterator<T>(this,(const Tensor<T>*) 0, (const Tensor<T>*) 0,\n                                     iterlevel, optimize, fusedim, jdim);\n        }\n\n        /// Return iterator over two tensors\n        template <class Q>\n        TensorIterator<T,Q> binary_iterator(const Tensor<Q>& q,\n                                            long iterlevel=0,\n                                            bool optimize=true,\n                                            bool fusedim=true,\n                                            long jdim=default_jdim) const {\n            return TensorIterator<T,Q>(this,&q,(const Tensor<T>*) 0,\n                                       iterlevel, optimize, fusedim, jdim);\n        }\n\n        /// Return iterator over three tensors\n        template <class Q, class R>\n        TensorIterator<T,Q,R> ternary_iterator(const Tensor<Q>& q,\n                                               const Tensor<R>& r,\n                                               long iterlevel=0,\n                                               bool optimize=true,\n                                               bool fusedim=true,\n                                               long jdim=default_jdim) const {\n            return TensorIterator<T,Q,R>(this,&q,&r,\n                                         iterlevel, optimize, fusedim, jdim);\n        }\n\n        /// End point for forward iteration\n        const TensorIterator<T>& end() const {\n            static TensorIterator<T> theend(0,0,0,0,0,0);\n            return theend;\n        }\n\n        virtual ~Tensor() {}\n\n        /// Frees all memory and resests to state of default constructor\n        void clear() {deallocate();}\n\n        bool has_data() const {return size()!=0;};\n\n    };\n\n    template <class T>\n    std::ostream& operator << (std::ostream& out, const Tensor<T>& t);\n\n\n    namespace archive {\n        /// Serialize a tensor\n        template <class Archive, typename T>\n        struct ArchiveStoreImpl< Archive, Tensor<T> > {\n            static void store(const Archive& s, const Tensor<T>& t) {\n                if (t.iscontiguous()) {\n                    s & t.size() & t.id();\n                    if (t.size()) s & t.ndim() & wrap(t.dims(),TENSOR_MAXDIM) & wrap(t.ptr(),t.size());\n                }\n                else {\n                    s & copy(t);\n                }\n            };\n        };\n\n\n        /// Deserialize a tensor ... existing tensor is replaced\n        template <class Archive, typename T>\n        struct ArchiveLoadImpl< Archive, Tensor<T> > {\n            static void load(const Archive& s, Tensor<T>& t) {\n                long sz = 0l, id = 0l;\n                s & sz & id;\n                if (id != t.id()) throw \"type mismatch deserializing a tensor\";\n                if (sz) {\n                    long _ndim = 0l, _dim[TENSOR_MAXDIM];\n                    s & _ndim & wrap(_dim,TENSOR_MAXDIM);\n                    t = Tensor<T>(_ndim, _dim, false);\n                    if (sz != t.size()) throw \"size mismatch deserializing a tensor\";\n                    s & wrap(t.ptr(), t.size());\n                }\n                else {\n                    t = Tensor<T>();\n                }\n            };\n        };\n\n    }\n\n    /// The class defines tensor op scalar ... here define scalar op tensor.\n\n    /// \\ingroup tensor\n    template <typename T, typename Q>\n    typename IsSupported < TensorTypeData<Q>, Tensor<T> >::type\n    operator+(Q x, const Tensor<T>& t) {\n        return t+x;\n    }\n\n    /// The class defines tensor op scalar ... here define scalar op tensor.\n\n    /// \\ingroup tensor\n    template <typename T, typename Q>\n    typename IsSupported < TensorTypeData<Q>, Tensor<T> >::type\n    operator*(const Q& x, const Tensor<T>& t) {\n        return t*x;\n    }\n\n    /// The class defines tensor op scalar ... here define scalar op tensor.\n\n    /// \\ingroup tensor\n    template <typename T, typename Q>\n    typename IsSupported < TensorTypeData<Q>, Tensor<T> >::type\n    operator-(Q x, const Tensor<T>& t) {\n        return (-t)+=x;\n    }\n\n    /// Returns a new contiguous tensor that is a deep copy of the input\n\n    /// \\ingroup tensor\n    /// @result Returns a new contiguous tensor that is a deep copy of the input\n    template <class T> Tensor<T> copy(const Tensor<T>& t) {\n        if (t.size()) {\n            Tensor<T> result = Tensor<T>(t.ndim(),t.dims(),false);\n            BINARY_OPTIMIZED_ITERATOR(T, result, const T, t, *_p0 = *_p1);\n            return result;\n        }\n        else {\n            return Tensor<T>();\n        }\n    }\n\n    /// Returns a new contiguous tensor of type Q that is a deep copy of the input\n\n    /// \\ingroup tensor\n    /// @result Returns a new contiguous tensor that is a deep copy of the input\n    template <class Q, class T>\n    Tensor<Q> convert(const Tensor<T>& t) {\n        if (t.size()) {\n            Tensor<Q> result = Tensor<Q>(t.ndim(),t.dims(),false);\n            BINARY_OPTIMIZED_ITERATOR(Q, result, const T, t, *_p0 = *_p1);\n            return result;\n        }\n        else {\n            return Tensor<Q>();\n        }\n    }\n\n\n    /// Transforms one dimension of the tensor t by the matrix c, returns new contiguous tensor\n\n    /// \\ingroup tensor\n    /// \\code\n    /// transform_dir(t,c,1) = r(i,j,k,...) = sum(j') t(i,j',k,...) * c(j',j)\n    /// \\endcode\n    /// @param[in] t Tensor to transform (size of dimension to be transformed must match size of first dimension of \\c c )\n    /// @param[in] c Matrix used for the transformation\n    /// @param[in] axis Dimension (or axis) to be transformed\n    /// @result Returns a new, contiguous tensor\n    template <class T, class Q>\n    Tensor<TENSOR_RESULT_TYPE(T,Q)> transform_dir(const Tensor<T>& t, const Tensor<Q>& c, int axis) {\n        if (axis == 0) {\n            return inner(c,t,0,axis);\n        }\n        else if (axis == t.ndim()-1) {\n            return inner(t,c,axis,0);\n        }\n        else {\n            return copy(inner(t,c,axis,0).cycledim(1,axis, -1)); // Copy to make contiguous\n        }\n    }\n\n    /// Returns a new deep copy of the transpose of the input tensor\n\n    /// \\ingroup tensor\n    template <class T>\n    Tensor<T> transpose(const Tensor<T>& t) {\n        TENSOR_ASSERT(t.ndim() == 2, \"transpose requires a matrix\", t.ndim(), &t);\n        return copy(t.swapdim(0,1));\n    }\n\n    /// Returns a new deep copy of the complex conjugate transpose of the input tensor\n\n    /// \\ingroup tensor\n    template <class T>\n    Tensor<T> conj_transpose(const Tensor<T>& t) {\n        TENSOR_ASSERT(t.ndim() == 2, \"conj_transpose requires a matrix\", t.ndim(), &t);\n        return conj(t.swapdim(0,1));\n    }\n\n    /// Indexing a non-constant tensor with slices returns a SliceTensor\n\n    /// \\ingroup tensor\n    /// A slice tensor differs from a tensor only in that assignment\n    /// causes the data to be copied rather than entire new copy\n    /// generated.  You will usually not instantiate one except as a\n    /// temporary produced by indexing a tensor with slice and then\n    /// assigning it back to a tensor, or performing some other\n    /// operation and discarding.\n    template <class T> class SliceTensor : public Tensor<T> {\n    private:\n        SliceTensor();\n\n    public:\n\n        // delegating constructor\n        SliceTensor(const Tensor<T>& t, const std::array<Slice,TENSOR_MAXDIM> s)\n            : SliceTensor(t,s.data())  {}\n\n\n        SliceTensor(const Tensor<T>& t, const Slice s[])\n            : Tensor<T>(const_cast<Tensor<T>&>(t)) //!!!!!!!!!!!\n        {\n            // C++ standard says class derived from parameterized base class cannot\n            // directly access the base class elements ... must explicitly reference.\n\n            long nd = 0, size=1;\n            for (long i=0; i<t._ndim; ++i) {\n                long start=s[i].start, end=s[i].end, step=s[i].step;\n                //std::printf(\"%ld input start=%ld end=%ld step=%ld\\n\",\n                //i, start, end, step);\n                if (start < 0) start += this->_dim[i];\n                if (end < 0) end += this->_dim[i];\n                long len = end-start+1;\n                if (step) len /= step;\t// Rounds len towards zero\n\n                // if input length is not exact multiple of step, round end towards start\n                // for the same behaviour of for (i=start; i<=end; i+=step);\n                end = start + (len-1)*step;\n\n                //std::printf(\"%ld munged start=%ld end=%ld step=%ld len=%ld _dim=%ld\\n\",\n                //\t\ti, start, end, step, len, this->_dim[i]);\n\n                TENSOR_ASSERT(start>=0 && start<this->_dim[i],\"slice start invalid\",start,this);\n                TENSOR_ASSERT(end>=0 && end<this->_dim[i],\"slice end invalid\",end,this);\n                TENSOR_ASSERT(len>0,\"slice length must be non-zero\",len,this);\n\n                this->_p += start * t._stride[i];\n\n                if (step) {\n                    size *= len;\n                    this->_dim[nd] = len;\n                    this->_stride[nd] = step * t._stride[i];\n                    ++nd;\n                }\n            }\n            //For Python interface need to be able to return a scalar inside a tensor with nd=0\n            //TENSOR_ASSERT(nd>0,\"slicing produced a scalar, but cannot return one\",nd,this);\n            for (long i=nd; i<TENSOR_MAXDIM; ++i) { // So can iterate over missing dimensions\n                this->_dim[i] = 1;\n                this->_stride[i] = 0;\n            }\n\n            this->_ndim = nd;\n            this->_size = size;\n        }\n\n        SliceTensor<T>& operator=(const SliceTensor<T>& t) {\n            BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, t, *_p0 = (T)(*_p1));\n            return *this;\n        }\n\n        template <class Q>\n        SliceTensor<T>& operator=(const SliceTensor<Q>& t) {\n            BINARY_OPTIMIZED_ITERATOR(T, (*this), const Q, t, *_p0 = (T)(*_p1));\n            return *this;\n        }\n\n        SliceTensor<T>& operator=(const Tensor<T>& t) {\n            BINARY_OPTIMIZED_ITERATOR(T, (*this), const T, t, *_p0 = (T)(*_p1));\n            return *this;\n        }\n\n        template <class Q>\n        SliceTensor<T>& operator=(const Tensor<Q>& t) {\n            BINARY_OPTIMIZED_ITERATOR(T, (*this), const Q, t, *_p0 = (T)(*_p1));\n            return *this;\n        }\n\n        SliceTensor<T>& operator=(const T& t) {\n            UNARY_OPTIMIZED_ITERATOR(T, (*this), *_p0 = t);\n            return *this;\n        }\n\n        virtual ~SliceTensor() {};\t\t// Tensor<T> destructor does enough\n    };\n\n\n    // Specializations for complex types\n    template<> float_complex Tensor<float_complex>::min(long* ind) const ;\n    template<> double_complex Tensor<double_complex>::min(long* ind) const ;\n    template<> float_complex Tensor<float_complex>::max(long* ind) const ;\n    template<> double_complex Tensor<double_complex>::max(long* ind) const ;\n\n    // Stream stuff\n\n    /// Print (for human consumption) a tensor to the stream\n\n    /// \\ingroup tensor\n    template <class T>\n    std::ostream& operator << (std::ostream& s, const Tensor<T>& t) {\n        if (t.size() == 0) {\n            s << \"[empty tensor]\\n\";\n            return s;\n        }\n\n        long maxdim = 0;\n        long index_width = 0;\n        for (int i = 0; i<(t.ndim()-1); ++i) {\n            if (maxdim < t.dim(i)) maxdim = t.dim(i);\n        }\n        if (maxdim < 10)\n            index_width = 1;\n        else if (maxdim < 100)\n            index_width = 2;\n        else if (maxdim < 1000)\n            index_width = 3;\n        else if (maxdim < 10000)\n            index_width = 4;\n        else\n            index_width = 6;\n\n        std::ios::fmtflags oldflags = s.setf(std::ios::scientific);\n        long oldprec = s.precision();\n        long oldwidth = s.width();\n\n        // C++ formatted IO is worse than Fortran !!\n        for (TensorIterator<T> iter=t.unary_iterator(1,false,false); iter!=t.end(); ++iter) {\n            const T* p = iter._p0;\n            long inc = iter._s0;\n            long dimj = iter.dimj;\n            s.unsetf(std::ios::scientific);\n            s << '[';\n            for (long i=0; i<iter.ndim; ++i) {\n                s.width(index_width);\n                s << iter.ind[i];\n                //if (i != iter.ndim)\n                s << \",\";\n            }\n            s << \"*]\";\n//flo            s.setf(std::ios::scientific);\n            s.setf(std::ios::fixed);\n            for (long j=0; j<dimj; ++j, p+=inc) {\n//flo                s.precision(4);\n                s << \" \";\n                s.precision(8);\n                s.width(12);\n                s << *p;\n            }\n            s.unsetf(std::ios::scientific);\n            s << std::endl;\n        }\n        s.setf(oldflags,std::ios::floatfield);\n        s.precision(oldprec);\n        s.width(oldwidth);\n\n        return s;\n    }\n\n\n    /// Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...)\n\n    /// \\ingroup tensor\n    template <class T>\n    Tensor<T> outer(const Tensor<T>& left, const Tensor<T>& right) {\n        long nd = left.ndim() + right.ndim();\n        TENSOR_ASSERT(nd <= TENSOR_MAXDIM, \"too many dimensions in result\",\n                      nd, 0);\n        long d[TENSOR_MAXDIM];\n        for (long i = 0; i < left.ndim(); ++i) d[i] = left.dim(i);\n        for (long i = 0; i < right.ndim(); ++i) d[i + left.ndim()] = right.dim(i);\n        Tensor<T> result(nd, d, false);\n        outer_result(left,right,result);\n        return result;\n    }\n\n    /// Outer product ... result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...)\n\n    /// accumulate into result, no allocation is performed\n    template<class T>\n    void outer_result(const Tensor<T>& left, const Tensor<T>& right, Tensor<T>& result) {\n        TENSOR_ASSERT(left.ndim() + right.ndim() == result.ndim(),\"inconsistent dimension in outer_result\",\n                      result.ndim(),0);\n        T *ptr = result.ptr();\n        TensorIterator<T> iter=right.unary_iterator(1,false,true);\n        for (TensorIterator<T> p=left.unary_iterator(); p!=left.end(); ++p) {\n            T val1 = *p;\n            // Cannot reorder dimensions, but can fuse contiguous dimensions\n            for (iter.reset(); iter._p0; ++iter) {\n                long dimj = iter.dimj;\n                T* _p0 = iter._p0;\n                long Tstride = iter._s0;\n                for (long _j=0; _j<dimj; ++_j, _p0+=Tstride) {\n                    *ptr++ = val1 * (*_p0);\n                }\n            }\n        }\n    }\n\n\n    /// Inner product ... result(i,j,...,p,q,...) = sum(z) left(i,j,...,z)*right(z,p,q,...)\n\n    /// \\ingroup tensor\n    /// By default it contracts the last dimension of the left tensor and\n    /// the first dimension of the right tensor.  These defaults can be\n    /// changed by specifying \\c k0 and \\c k1 , the index to contract in\n    /// the left and right side tensors, respectively.  The defaults\n    /// correspond to (\\c k0=-1 and \\c k1=0 ).\n    template <class T, class Q>\n    Tensor<TENSOR_RESULT_TYPE(T,Q)> inner(const Tensor<T>& left, const Tensor<Q>& right,\n                                          long k0=-1, long k1=0) {\n        if (k0 < 0) k0 += left.ndim();\n        if (k1 < 0) k1 += right.ndim();\n        long nd = left.ndim() + right.ndim() - 2;\n        TENSOR_ASSERT(nd!=0, \"result is a scalar but cannot return one ... use dot\",\n                      nd, &left);\n\n\n        TENSOR_ASSERT(left.dim(k0) == right.dim(k1),\"common index must be same length\",\n                \tright.dim(k1), &left);\n\n        TENSOR_ASSERT(nd > 0 && nd <= TENSOR_MAXDIM,\n                      \"invalid number of dimensions in the result\", nd,0);\n\n        long d[TENSOR_MAXDIM];\n\n        long base=0;\n        for (long i=0; i<k0; ++i) d[i] = left.dim(i);\n        for (long i=k0+1; i<left.ndim(); ++i) d[i-1] = left.dim(i);\n        base = left.ndim()-1;\n        for (long i=0; i<k1; ++i) d[i+base] = right.dim(i);\n        base--;\n        for (long i=k1+1; i<right.ndim(); ++i) d[i+base] = right.dim(i);\n\n        Tensor<TENSOR_RESULT_TYPE(T,Q)> result(nd,d);\n\n        inner_result(left,right,k0,k1,result);\n\n        return result;\n    }\n\n    /// Accumulate inner product into user provided, contiguous, correctly sized result tensor\n\n    /// \\ingroup tensor\n    /// This routine may be used to optimize away the tensor constructor\n    /// of the result tensor in inner loops when the result tensor may be\n    /// reused or accumulated into.  If the user calls this routine\n    /// directly very little checking is done since it is intended as an\n    /// optimization for small tensors.  As far as the result goes, the\n    /// caller is completely responsible for providing a contiguous tensor\n    /// that has the correct dimensions and is appropriately initialized.\n    /// The inner product is accumulated into result.\n    template <class T, class Q>\n    void inner_result(const Tensor<T>& left, const Tensor<Q>& right,\n                      long k0, long k1, Tensor< TENSOR_RESULT_TYPE(T,Q) >& result) {\n\n        typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n        // Need to include explicit optimizations for common special cases\n        // E.g., contiguous, matrix-matrix, and 3d-tensor*matrix\n\n        resultT* ptr = result.ptr();\n\n        if (k0 < 0) k0 += left.ndim();\n        if (k1 < 0) k1 += right.ndim();\n\n        if (left.iscontiguous() && right.iscontiguous()) {\n            if (k0==0 && k1==0) {\n                // c[i,j] = a[k,i]*b[k,j] ... collapsing extra indices to i & j\n                long dimk = left.dim(k0);\n                long dimj = right.stride(0);\n                long dimi = left.stride(0);\n                mTxm(dimi,dimj,dimk,ptr,left.ptr(),right.ptr());\n                return;\n            }\n            else if (k0==(left.ndim()-1) && k1==(right.ndim()-1)) {\n                // c[i,j] = a[i,k]*b[j,k] ... collapsing extra indices to i & j\n                long dimk = left.dim(k0);\n                long dimi = left.size()/dimk;\n                long dimj = right.size()/dimk;\n                mxmT(dimi,dimj,dimk,ptr,left.ptr(),right.ptr());\n                return;\n            }\n            else if (k0==0 && k1==(right.ndim()-1)) {\n                // c[i,j] = a[k,i]*b[j,k] ... collapsing extra indices to i & j\n                long dimk = left.dim(k0);\n                long dimi = left.stride(0);\n                long dimj = right.size()/dimk;\n                mTxmT(dimi,dimj,dimk,ptr,left.ptr(),right.ptr());\n                return;\n            }\n            else if (k0==(left.ndim()-1) && k1==0) {\n                // c[i,j] = a[i,k]*b[k,j] ... collapsing extra indices to i & j\n                long dimk = left.dim(k0);\n                long dimi = left.size()/dimk;\n                long dimj = right.stride(0);\n                mxm(dimi,dimj,dimk,ptr,left.ptr(),right.ptr());\n                return;\n            }\n        }\n\n        long dimj = left.dim(k0);\n        TensorIterator<Q> iter1=right.unary_iterator(1,false,false,k1);\n\n        for (TensorIterator<T> iter0=left.unary_iterator(1,false,false,k0);\n                iter0._p0; ++iter0) {\n            T* MADNESS_RESTRICT xp0 = iter0._p0;\n            long s0 = iter0._s0;\n            for (iter1.reset(); iter1._p0; ++iter1) {\n                T* MADNESS_RESTRICT p0 = xp0;\n                Q* MADNESS_RESTRICT p1 = iter1._p0;\n                long s1 = iter1._s0;\n                resultT sum = 0;\n                for (long j=0; j<dimj; ++j,p0+=s0,p1+=s1) {\n                    sum += (*p0) * (*p1);\n                }\n                *ptr++ += sum;\n            }\n        }\n    }\n\n    /// Transform all dimensions of the tensor t by the matrix c\n\n    /// \\ingroup tensor\n    /// Often used to transform all dimensions from one basis to another\n    /// \\code\n    /// result(i,j,k...) <-- sum(i',j', k',...) t(i',j',k',...) c(i',i) c(j',j) c(k',k) ...\n    /// \\endcode\n    /// The input dimensions of \\c t must all be the same and agree with\n    /// the first dimension of \\c c .  The dimensions of \\c c may differ in\n    /// size.  If the dimensions of \\c c are the same, and the operation\n    /// is being performed repeatedly, then you might consider calling \\c\n    /// fast_transform instead which enables additional optimizations and\n    /// can eliminate all constructor overhead and improve cache locality.\n    ///\n    template <class T, class Q>\n    Tensor<TENSOR_RESULT_TYPE(T,Q)> transform(const Tensor<T>& t, const Tensor<Q>& c) {\n        typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n        TENSOR_ASSERT(c.ndim() == 2,\"second argument must be a matrix\",c.ndim(),&c);\n        if (c.dim(0)==c.dim(1) && t.iscontiguous() && c.iscontiguous()) {\n            Tensor<resultT> result(t.ndim(),t.dims(),false);\n            Tensor<resultT> work(t.ndim(),t.dims(),false);\n            return fast_transform(t, c, result, work);\n        }\n        else {\n            Tensor<resultT> result = t;\n            for (long i=0; i<t.ndim(); ++i) {\n                result = inner(result,c,0,0);\n            }\n            return result;\n        }\n    }\n\n    /// Transform all dimensions of the tensor t by distinct matrices c\n\n    /// \\ingroup tensor\n    /// Similar to transform but each dimension is transformed with a\n    /// distinct matrix.\n    /// \\code\n    /// result(i,j,k...) <-- sum(i',j', k',...) t(i',j',k',...) c[0](i',i) c[1](j',j) c[2](k',k) ...\n    /// \\endcode\n    /// The first dimension of the matrices c must match the corresponding\n    /// dimension of t.\n    template <class T, class Q>\n    Tensor<TENSOR_RESULT_TYPE(T,Q)> general_transform(const Tensor<T>& t, const Tensor<Q> c[]) {\n        typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n        Tensor<resultT> result = t;\n        for (long i=0; i<t.ndim(); ++i) {\n            result = inner(result,c[i],0,0);\n        }\n        return result;\n    }\n\n    /// Restricted but heavily optimized form of transform()\n\n    /// \\ingroup tensor\n    /// Both dimensions of \\c c must be the same and match all dimensions\n    /// of the input tensor \\c t.  All tensors must be contiguous.\n    ///\n    /// Performs the same operation as \\c transform but it requires\n    /// that the caller pass in workspace and a preallocated result,\n    /// hoping that that both can be reused.  If the result and\n    /// workspace are reused between calls, then no tensor\n    /// constructors need be called and cache locality should be\n    /// improved.  By passing in the workspace, this routine is kept\n    /// thread safe.\n    ///\n    /// The input, result and workspace tensors must be distinct.\n    ///\n    /// All input tensors must be contiguous and fastest execution\n    /// will result if all dimensions are approriately aligned and\n    /// multiples of the underlying vector length.  The workspace and\n    /// the result must be of the same size as the input \\c t .  The\n    /// result tensor need not be initialized before calling\n    /// fast_transform.\n    ///\n    /// \\code\n    ///     result(i,j,k,...) <-- sum(i',j', k',...) t(i',j',k',...)  c(i',i) c(j',j) c(k',k) ...\n    /// \\endcode\n    ///\n    /// The input dimensions of \\c t must all be the same .\n    template <class T, class Q>\n    Tensor< TENSOR_RESULT_TYPE(T,Q) >& fast_transform(const Tensor<T>& t, const Tensor<Q>& c,  Tensor< TENSOR_RESULT_TYPE(T,Q) >& result,\n            Tensor< TENSOR_RESULT_TYPE(T,Q) >& workspace) {\n        typedef  TENSOR_RESULT_TYPE(T,Q) resultT;\n        const Q *pc=c.ptr();\n        resultT *t0=workspace.ptr(), *t1=result.ptr();\n        if (t.ndim()&1) {\n            t0 = result.ptr();\n            t1 = workspace.ptr();\n        }\n\n        long dimj = c.dim(1);\n        long dimi = 1;\n        for (int n=1; n<t.ndim(); ++n) dimi *= dimj;\n\n#if HAVE_IBMBGQ\n        long nij = dimi*dimj;\n        if (IS_UNALIGNED(pc) || IS_UNALIGNED(t0) || IS_UNALIGNED(t1)) {\n            for (long i=0; i<nij; ++i) t0[i] = 0.0;\n            mTxm(dimi, dimj, dimj, t0, t.ptr(), pc);\n            for (int n=1; n<t.ndim(); ++n) {\n                for (long i=0; i<nij; ++i) t1[i] = 0.0;\n                mTxm(dimi, dimj, dimj, t1, t0, pc);\n                std::swap(t0,t1);\n            }\n        }\n        else {\n            mTxmq_padding(dimi, dimj, dimj, dimj, t0, t.ptr(), pc);\n            for (int n=1; n<t.ndim(); ++n) {\n                mTxmq_padding(dimi, dimj, dimj, dimj, t1, t0, pc);\n                std::swap(t0,t1);\n            }\n        }\n#else\n        // Now assume no restriction on the use of mtxmq\n        mTxmq(dimi, dimj, dimj, t0, t.ptr(), pc);\n        for (int n=1; n<t.ndim(); ++n) {\n            mTxmq(dimi, dimj, dimj, t1, t0, pc);\n            std::swap(t0,t1);\n        }\n#endif\n        \n        return result;\n    }\n\n    /// Return a new tensor holding the absolute value of each element of t\n\n    /// \\ingroup tensor\n    template <class T>\n    Tensor< typename Tensor<T>::scalar_type > abs(const Tensor<T>& t) {\n        typedef typename Tensor<T>::scalar_type scalar_type;\n        Tensor<scalar_type> result(t.ndim(),t.dims(),false);\n        BINARY_OPTIMIZED_ITERATOR(scalar_type,result,const T,t,*_p0 = std::abs(*_p1));\n        return result;\n    }\n\n    /// Return a new tensor holding the argument of each element of t (complex types only)\n\n    /// \\ingroup tensor\n    template <class T>\n    Tensor< typename Tensor<T>::scalar_type > arg(const Tensor<T>& t) {\n        typedef typename Tensor<T>::scalar_type scalar_type;\n        Tensor<scalar_type> result(t.ndim(),t.dims(),false);\n        BINARY_OPTIMIZED_ITERATOR(scalar_type,result,T,t,*_p0 = std::arg(*_p1));\n        return result;\n    }\n\n    /// Return a new tensor holding the real part of each element of t (complex types only)\n\n    /// \\ingroup tensor\n    template <class T>\n    Tensor< typename Tensor<T>::scalar_type > real(const Tensor<T>& t) {\n        typedef typename Tensor<T>::scalar_type scalar_type;\n        Tensor<scalar_type> result(t.ndim(),t.dims(),false);\n        BINARY_OPTIMIZED_ITERATOR(scalar_type,result,const T,t,*_p0 = std::real(*_p1));\n        return result;\n    }\n\n    /// Return a new tensor holding the imaginary part of each element of t (complex types only)\n\n    /// \\ingroup tensor\n    template <class T>\n    Tensor< typename Tensor<T>::scalar_type > imag(const Tensor<T>& t) {\n        typedef typename Tensor<T>::scalar_type scalar_type;\n        Tensor<scalar_type> result(t.ndim(),t.dims(),false);\n        BINARY_OPTIMIZED_ITERATOR(scalar_type,result,const T,t,*_p0 = std::imag(*_p1));\n        return result;\n    }\n\n    /// Returns a new deep copy of the complex conjugate of the input tensor (complex types only)\n\n    /// \\ingroup tensor\n    template <class T>\n    Tensor<T> conj(const Tensor<T>& t) {\n        Tensor<T> result(t.ndim(),t.dims(),false);\n        BINARY_OPTIMIZED_ITERATOR(T,result,const T,t,*_p0 = conditional_conj(*_p1));\n        return result;\n    }\n}\n\n#undef TENSOR_SHARED_PTR\n\n#endif // MADNESS_TENSOR_TENSOR_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/tensor_json.hpp",
    "content": "//\n// Created by adrianhurtado on 1/10/22.\n//\n\n#ifndef MADNESS_TENSOR_JSON_H\n#define MADNESS_TENSOR_JSON_H\n\n#include <algorithm>\n#include <ostream>\n\n// #include \"catch.hpp\"\n#include <fstream>\n#include <madness/external/nlohmann_json/json.hpp>\n\n//#include \"mra.h\"\n#include \"tensor.h\"\n\n//using namespace madness;\n//using json = nlohmann::json;\n\nnamespace madness {\n    template<typename T>\n    nlohmann::json tensor_to_json(const Tensor<T>& m) {\n        nlohmann::json j = nlohmann::json{};\n        // auto dimensions = m.dims();\n        long size = m.size();  ///< Number of elements in the tensor\n        long n_dims = m.ndim();///< Number of dimensions (-1=invalid; 0=no\n\n        ///< supported; >0=tensor)\n        j[\"size\"] = size;\n        j[\"ndim\"] = n_dims;\n        if (n_dims<0) return j;\n\n        auto dims = m.dims();// the size of each dimension\n        // long id = m.id();       ///< Id from TensorTypeData<T> in type_data.h\n        // auto strides = m.strides();\n        auto fm = m.flat();\n        auto m_vals_vector = std::vector<T>(size);\n        auto m_dims_vector = std::vector<long>(n_dims);\n        std::copy(&fm[0], &fm[0] + size, m_vals_vector.begin());\n        std::copy(dims, dims + n_dims, m_dims_vector.begin());\n\n        // This is everything we need to translate to a numpy vector...\n        j[\"vals\"] = m_vals_vector;\n        j[\"dims\"] = m_dims_vector;\n\n        //print(j);\n        return j;\n    }\n\n    template<typename T>\n    Tensor<T> tensor_from_json(const nlohmann::json& j) {\n        // need to be explicit here about types so we find the proper Tensor\n        // constructors\n        long size = j[\"size\"];\n        long n_dims=j[\"ndim\"];\n        if (n_dims<0) return Tensor<T>();\n        std::vector<T> m_vals_vector = j[\"vals\"];\n        std::vector<long> m_dims_vector = j[\"dims\"];\n\n\n        Tensor<T> flat_m(size);\n        // copy the values from the vector to the flat tensor\n        std::copy(m_vals_vector.begin(), m_vals_vector.end(), &flat_m[0]);\n        // reshape the tensor using dimension vector\n        Tensor<T> m = flat_m.reshape(m_dims_vector);\n        return m;\n    }\n\n    using vec_pair_ints = std::vector<std::pair<std::string, int>>;\n\n    template<typename T>\n    using vec_pair_T = std::vector<std::pair<std::string, T>>;\n\n    template<typename T>\n    using vec_pair_tensor_T = std::vector<std::pair<std::string, Tensor<T>>>;\n\n    template<typename T>\n    void to_json(nlohmann::json& j, std::vector<std::pair<std::string, Tensor<T>>> tensors) {\n        for (const auto& val: tensors) { j[val.first] = tensor_to_json(val.second); }\n    }\n\n    template<typename T>\n    void to_json(nlohmann::json& j, const vec_pair_T<T>& num_vals) {\n        for (const auto& val: num_vals) { j[val.first] = val.second; }\n    }\n\n    template<typename... Vecs>\n    nlohmann::json add_time_tag(const nlohmann::json& j1) {\n\n        auto print_time = std::chrono::system_clock::now();\n        auto in_time_t = std::chrono::system_clock::to_time_t(print_time);\n        std::stringstream ss;\n        ss << std::put_time(std::localtime(&in_time_t), \"%Y-%m-%d %X\");\n\n        auto j=j1;\n        j[\"time_tag\"] ={};\n\n        j[\"time_tag\"][\"time\"] = ss.str();\n        j[\"time_tag\"][\"wall_time\"] = wall_time();\n        j[\"time_tag\"][\"cpu_time\"] =cpu_time();\n        return j;\n    }\n\n    template<typename... Vecs>\n    void output_schema(const std::string schema_name, const nlohmann::json& j) {\n        auto j1= add_time_tag(j);\n        std::ofstream ofs(schema_name + \".json\");\n        ofs << std::setw(4) << j1;\n    }\n\n    template<typename... Vecs>\n    nlohmann::json input_schema(const std::string& schema_name) {\n        // read old schema\n        std::ifstream ifs(schema_name+\".json\");\n        nlohmann::json j;\n        if (ifs.is_open()) j=nlohmann::json::parse(ifs);\n        return j;\n    }\n\n    template<typename... Vecs>\n    void update_schema(const std::string schema_name, const nlohmann::json& jnew) {\n        auto j=input_schema(schema_name);\n        j.update(jnew);\n        output_schema(schema_name,j);\n    }\n}// namespace madness\n\n#endif// MADNESS_TENSOR_JSON_H\n"
  },
  {
    "path": "src/madness/tensor/tensor_lapack.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov \n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  \n  $Id$\n*/\n\n  \n#ifndef MADNESS_LINALG_TENSOR_LAPACK_H__INCLUDED\n#define MADNESS_LINALG_TENSOR_LAPACK_H__INCLUDED\n\n#include <madness/tensor/tensor.h>\n#include <madness/fortran_ctypes.h>\n\n/*!\n  \\file tensor_lapack.h\n  \\brief Prototypes for a partial interface from Tensor to LAPACK\n  \\ingroup linalg\n@{\n*/\n\nnamespace madness {\n\n    /// Computes singular value decomposition of matrix\n    \n    /// \\ingroup linalg\n    template <typename T>\n    void svd(const Tensor<T>& a, Tensor<T>& U,\n             Tensor< typename Tensor<T>::scalar_type >& s, Tensor<T>& VT);\n\n    /// \\ingroup linalg\n    template <typename T>\n    void svd_result(Tensor<T>& a, Tensor<T>& U,\n             Tensor< typename Tensor<T>::scalar_type >& s, Tensor<T>& VT, Tensor<T>& work);\n\n    /// SVD - MATLAB syntax\n\n    /// call as\n    /// auto [U,s,VT] = svd(A);\n    /// with A=U*S*VT\n    template <typename T>\n    std::tuple<Tensor<T>, Tensor< typename Tensor<T>::scalar_type >, Tensor<T>>\n    svd(const Tensor<T>& A) {\n        Tensor<T> U,VT;\n        Tensor< typename Tensor<T>::scalar_type > s;\n        svd(A,U,s,VT);\n        return std::make_tuple(U,s,VT);\n    }\n\n    /// Solves linear equations\n    \n    /// \\ingroup linalg\n    template <typename T>\n    void gesv(const Tensor<T>& a, const Tensor<T>& b, Tensor<T>& x);\n\n    /// Solves linear equations using least squares\n    \n    /// \\ingroup linalg\n    template <typename T>\n    void gelss(const Tensor<T>& a, const Tensor<T>& b, double rcond,\n               Tensor<T>& x, Tensor< typename Tensor<T>::scalar_type >& s,\n               long &rank, Tensor<typename Tensor<T>::scalar_type>& sumsq);\n\n    /// Solves symmetric or Hermitian eigenvalue problem\n    \n    /// \\ingroup linalg\n    template <typename T>\n    void syev(const Tensor<T>& A,\n              Tensor<T>& V, Tensor< typename Tensor<T>::scalar_type >& e);\n\n    /// Solves symmetric or Hermitian eigenvalue problem - MATLAB syntax\n\n    /// call as\n    /// auto [eval, evec] = syev(A);\n    template <typename T>\n    std::tuple<Tensor< typename Tensor<T>::scalar_type >, Tensor<T>>\n    syev(const Tensor<T>& A) {\n    \tTensor<T> V;\n    \tTensor< typename Tensor<T>::scalar_type > e;\n    \tsyev(A,V,e);\n    \treturn std::make_tuple(e,V);\n    }\n    // START BRYAN ADDITION\n    /// Solves non-symmetric or non-Hermitian eigenvalue problem\n\n    template <typename T>\n    void geev(const Tensor<T>& A, Tensor<T>& VR, Tensor<std::complex<T>>& e);\n\n    /// Solves non-symmetric or non-Hermitian generalized eigenvalue problem\n\n    template <typename T>\n    void ggev(const Tensor<T>& A, Tensor<T>& B, Tensor<T>& VR,\n              Tensor<std::complex<T>>& e);\n    // END BRYAN ADDITIONS\n    /// Solves symmetric or Hermitian eigenvalue problem - MATLAB syntax\n\n    /// Solves linear equations\n    \n    /// \\ingroup linalg\n    template <typename T>\n    void gesv(const Tensor<T>& a, const Tensor<T>& b, Tensor<T>& x);\n\n\n    /// Solves symmetric or Hermitian generalized eigenvalue problem\n    \n    /// \\ingroup linalg\n    template <typename T>\n    void sygv(const Tensor<T>& A, const Tensor<T>& B, int itype,\n              Tensor<T>& V, Tensor< typename Tensor<T>::scalar_type >& e);\n\n    class World; // UGH!\n    /// Solves symmetric or Hermitian generalized eigenvalue problem\n    \n\n    // !!!!!!!!!! sygvp and gesvp are now in the ELEMENTAL inteface\n    // /// \\ingroup linalg\n    // template <typename T>\n    // void sygvp(World& world, const Tensor<T>& A, const Tensor<T>& B, int itype,\n    //           Tensor<T>& V, Tensor< typename Tensor<T>::scalar_type >& e);\n\n    // /// Solves linear equations\n    \n    // /// \\ingroup linalg\n    // template <typename T>\n    // void gesvp(World& world, const Tensor<T>& a, const Tensor<T>& b, Tensor<T>& x);\n\n    /// Cholesky factorization\n    \n    /// \\ingroup linalg\n    template <typename T>\n    void cholesky(Tensor<T>& A);\n\n    /// rank-revealing Cholesky factorization\n\n    /// \\ingroup linalg\n    template <typename T>\n    void rr_cholesky(Tensor<T>& A, typename Tensor<T>::scalar_type tol, Tensor<integer>& piv, int& rank);\n\n    /// \\ingroup linalg\n    template <typename T>\n    Tensor<T> inverse(const Tensor<T>& A);\n\n    /// QR decomposition\n    template<typename T>\n    void qr(Tensor<T>& A, Tensor<T>& R);\n\n    /// LQ decomposition\n    template<typename T>\n    void lq(Tensor<T>& A, Tensor<T>& L);\n    /// LQ decomposition\n    template<typename T>\n    void lq_result(Tensor<T>& A, Tensor<T>& R, Tensor<T>& tau, Tensor<T>& work,bool do_qr);\n\n    template <typename T>\n    void geqp3(Tensor<T>& A, Tensor<T>& tau, Tensor<integer>& jpvt);\n\n    /// orgqr generates an M-by-N complex matrix Q with orthonormal columns\n\n    /// which is defined as the first N columns of a product of K elementary\n    /// reflectors of order M\n    ///       Q  =  H(1) H(2) . . . H(k)\n    /// as returned by ZGEQRF.\n    template <typename T>\n    void orgqr(Tensor<T>& A, const Tensor<T>& tau);\n\n\n    /// Dunno\n    \n//     /// \\ingroup linalg\n//     template <typename T>\n//     void triangular_solve(const Tensor<T>& L, Tensor<T>& B, \n//                           const char* side, const char* transa);\n\n    /// Runs the tensor test code, returns true on success\n    \n    /// \\ingroup linalg\n    bool test_tensor_lapack();\n\n    /// World/MRA initialization calls this before going multithreaded due to static data in \\c dlamch\n    \n    /// \\ingroup linalg\n    void init_tensor_lapack();\n}\n\n#include <madness/tensor/elem.h>\n\n#endif // MADNESS_LINALG_TENSOR_LAPACK_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/tensor_macros.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#ifndef MADNESS_TENSOR_TENSOR_MACROS_H__INCLUDED\n#define MADNESS_TENSOR_TENSOR_MACROS_H__INCLUDED\n\n/*!\n  \\file tensor_macros.h\n  \\brief Macros for easy and efficient iteration over tensors.\n\n  \\ingroup tensor\n\nSeveral different macros have been defined to make it\neasy to iterate over expressions involving tensors.  They\nvary in their generality, ease of use, and efficiency.\n\nThe most general, most easy to use, but also most inefficient,\nand least safe, is\n\\code\nITERATOR(t, expression)\n\\endcode\nwhere \\c t is a Tensor of any type, size or dimension that is used to\ndefine the range of the loop indices, and expression can be nearly\nanything, including multi-line expressions performing arbitrary\noperations on multiple tensors.  The loop indices, going\nfrom left to right in the dimensions, are\n\\code\n_i, _j, _k, ...\n\\endcode\n\nE.g., to add two matrices together (there are more efficient ways\nto do this, such as \\c a+=b )\n\\code\nTensor<long> a(4,2), b(4,2);\nITERATOR(a, a(_i,_j) += b(_i,_j));\n\\endcode\n\nE.g., to print out the indices of all elements of a matrix\ngreater than 0.5;\n\\code\nTensor<float> m(5,5);\nm.fillrandom();\nITERATOR(m, if (m(_i,_j) > 0.5) {\n               cout << _i << \" \" << _j << endl;\n            });\n\\endcode\n\nTo make it possible to index arbitrary dimension tensors, the macro\n\\c IND has been defined as the indices for the highest supported\ndimension.  E.g., to elementwise divide the contents of two tensors of\nunknown dimension\n\\code\nITERATOR(x, x(IND)/y(IND));\n\\endcode\n\nNote that using \\c IND employs bounds checking where as direct indexing\nwith \\c _i , etc., does not.\n\nThe generality of these macros is offset by their inefficiency and\nlack of safety.  The inefficiency is twofold.  First, the \\c ITERATOR\nmacro generates a separate block of code for each possible dimension.\nThis could cause code bloat and increased compilation time.  To\nsolve this problem, the macros \\c ITERATOR1 , \\c ITERATOR2, etc., have\nbeen defined, with the corresponding \\c IND1 , \\c IND2 , etc.  These\nmacros may be applied to tensor expressions of the appropriate\ndimension.\n\nThe second inefficiency is at runtime, due to the explicit indexing of\nall the tensor expressions and the inability to optimize the order\nin which memory is traversed.  The lack of safety is the inability\nto check that the tensors in the expression conform and that the\nindices are not out of bounds.\n\nThe safety and cost of explicit indexing are addressed by the macros\n\\c UNARYITERATOR , \\c BINARYITERATOR , and \\c TERNARYITERATOR , along\nwith their specialization to specific numbers of dimensions (again by\nappending the dimension number to the name of the macro).  These\nmacros are safer since you have to explicitly name the tensors you are\niterating over, so that the macro can now check that the input tensors\nconform.  The cost of looping is reduced by replacing explicit\nindexing with pointer arithmetic.  These macros still define the loop\nindices \\c _i , \\c _j , etc., but also define \\c _p0 , \\c _p1 , etc.,\nas pointers to the current elements of tensor argument 0, tensor\nargument 1, etc..\n\nE.g., set elements of a 3-d tensor, \\c t , of type \\c double to a\nfunction of the indices\n\\code\nUNARYITERATOR(double, t, *_p0 = 1.0/(_i + _j + 1.0));\n\\endcode\n\nE.g., to merge two \\c double tensors as real and imaginary parts\nof complex tensor of any dimension\n\\code\nTERNARYITERATOR(double_complex, c, double, r, double, i,\n.               *_p0 = double_complex(*_p1, *_p2));\n\\endcode\n\nHowever, we still have the problems that if the dimensions of a tensor\nhave been reordered, the loops will go through memory inefficiently,\nand the dimension independent macros still generate redundant code\nblocks.  Also, the innermost loop might not be very long and will\nbe inefficient.\n\nThe most general, efficient and code-compact macros internally use the\n\\c TensorIterator , which you could also use directly.  Since there is\nno nest of explicit loops, the tensor indices are no longer available\nas \\c _i , \\c _j , etc..  Furthermore, the \\c TensorIterator can\nreorder the loops to optimize the memory traversal, and fuse\ndimensions to make the innermost loop longer for better vectorization\nand reduced loop overhead.\n\nThe most efficient macros for iteration are \\c UNARY_OPTIMIZED_ITERATOR ,\n\\c BINARY_OPTIMIZED_ITERATOR , and \\c TERNARY_OPTIMIZED_ITERATOR .\nAs before, these define the pointers \\c _p0 , \\c _p1, \\c _p2 , which\npoint to the current (and corresponding) element of each argument\ntensor.  However, unlike the previous macros there is no guarantee\nthat the elements are looped thru in the order expected by a\nsimple nest of loops.  Furthermore, the indices are completely\nunvailable.  In addition to using the iterators for optimal\ntraversal, these macros attempt to use a single loop\nfor optimal vector performance.\n\nE.g., the most efficient and safe way to perform the previous example\nof merging two \\c double tensors as real and imaginary parts\nof a complex tensor of any dimension\n\\code\nTERNARY_OPTIMIZED_ITERATOR(double_complex, c, double, r, double, i,\n           .               *_p0 = double_complex(*_p1, *_p2));\n\\endcode\nThis is precisely how most internal operations are implemented.\n\nIn some situations it is necessary to preserve the expected\norder of loops and to not fuse dimensions.  The macros\n\\c UNARY_UNOPTIMIZED_ITERATOR , \\c BINARY_UNOPTIMIZED_ITERATOR ,\nand \\c TERNARY_UNOPTIMIZED_ITERATOR use the \\c TensorIterator\nbut disable loop reordering and fusing.  Once these optimizations\nhave been turned off, the loop indices are avaiable, if needed,\nfrom the \\c ind[] member of the iterator (which is named\n\\c _iter ).\n\nE.g., the fillindex() method is implemented as follows\n\\code\nlong count = 0;\nUNARY_UNOPTIMIZED_ITERATOR(T, (*this), *_p0 = (T) count++);\n\\endcode\n\n\\em NB: None of the above iterator macros can be nested ... use the\nactual tensor iterator to do this.\n\nRecommendation --- for both efficiency and safety, use the optimized\nmacros (\\c UNARY_OPTMIZED_ITERATOR , etc.), unless it is necessary to\npreserve loop order, in which case use the unoptimized versions.  If\nyou need the loop indices, use the macros \\c UNARY_ITERATOR, etc.,\nunless you have a very general expression that they cannot handle.  In\nthis last instance, or for ease of rapid implementation, use the general\n\\c ITERATOR macro first described.\n\n*/\n\n// don't change this without changing the iterator macros\n#define TENSOR_MAXDIM 6\n\n/// Macros IND1, ..., IND6, and IND are a convenience for indexing in macro iterators.\n\n#define IND1 _i\n#define IND2 _i,_j\n#define IND3 _i,_j,_k\n#define IND4 _i,_j,_k,_l\n#define IND5 _i,_j,_k,_l,_m\n#define IND6 _i,_j,_k,_l,_m,_n\n#define IND  IND6\n\n\n#define ITERATOR1(t,exp) do { \\\n        long __xd0=t.dim(0),_index=0;                                   \\\n        for (long _i=0; _i<__xd0; ++_i) {exp;_index++;} } while (0)\n\n#define ITERATOR2(t,exp) do { \\\n        long __xd0=t.dim(0), __xd1=t.dim(1), _index=0;  \\\nfor (long _i=0; _i<__xd0; ++_i) { \\\n  for (long _j=0; _j<__xd1; ++_j) {exp;_index++;} } } while (0)\n\n#define ITERATOR3(t,exp) do { \\\n        long __xd0=t.dim(0), __xd1=t.dim(1), __xd2=t.dim(2), _index=0;  \\\nfor (long _i=0; _i<__xd0; ++_i) { \\\n  for (long _j=0; _j<__xd1; ++_j) { \\\n    for (long _k=0; _k<__xd2; ++_k) {exp;_index++;} } } } while (0)\n\n#define ITERATOR4(t,exp) do { \\\n        long __xd0=t.dim(0), __xd1=t.dim(1), __xd2=t.dim(2),        \\\n            __xd3=t.dim(3), _index=0;                               \\\nfor (long _i=0; _i<__xd0; ++_i) { \\\n  for (long _j=0; _j<__xd1; ++_j) { \\\n    for (long _k=0; _k<__xd2; ++_k) { \\\n      for (long _l=0; _l<__xd3; ++_l) {exp;_index++;} } } } } while (0)\n\n#define ITERATOR5(t,exp) do { \\\n        long __xd0=t.dim(0), __xd1=t.dim(1), __xd2=t.dim(2),      \\\n            __xd3=t.dim(3), __xd4=t.dim(4), _index=0;             \\\nfor (long _i=0; _i<__xd0; ++_i) { \\\n  for (long _j=0; _j<__xd1; ++_j) { \\\n    for (long _k=0; _k<__xd2; ++_k) { \\\n      for (long _l=0; _l<__xd3; ++_l) { \\\n        for (long _m=0; _m<__xd4; ++_m) {exp;_index++;} } } } } } while (0)\n\n#define ITERATOR6(t,exp) do { \\\n        long __xd0=t.dim(0), __xd1=t.dim(1), __xd2=t.dim(2),            \\\n            __xd3=t.dim(3), __xd4=t.dim(4), __xd5=t.dim(5), _index=0;;  \\\nfor (long _i=0; _i<__xd0; ++_i) { \\\n  for (long _j=0; _j<__xd1; ++_j) { \\\n    for (long _k=0; _k<__xd2; ++_k) { \\\n      for (long _l=0; _l<__xd3; ++_l) { \\\n        for (long _m=0; _m<__xd4; ++_m) { \\\n          for (long _n=0; _n<__xd5; ++_n) {exp;_index++;} } } } } } } while(0)\n\n#define ITERATOR(t,exp) do { \\\n  long _j=0, _k=0, _l=0, _m=0, _n=0; \\\n  if (t.ndim() == 1) {ITERATOR1(t,exp);} \\\n  else if (t.ndim() == 2) {ITERATOR2(t,exp);} \\\n  else if (t.ndim() == 3) {ITERATOR3(t,exp);} \\\n  else if (t.ndim() == 4) {ITERATOR4(t,exp);} \\\n  else if (t.ndim() == 5) {ITERATOR5(t,exp);} \\\n  else if (t.ndim() == 6) {ITERATOR6(t,exp);} \\\n  else {TENSOR_ASSERT(t.ndim() <= 6,\"ndim confused?\",t.ndim(),&t);} \\\n } while(0)\n\n// Inside iterator access pointer to current element as _p0 (pointer to\n// argument number 0).  _i, _j, _k, ..., also defined\n#define UNARYITERATOR1(X,x,exp) do { \\\n        long __xd0=x.dim(0);         \\\n        long __xs0=x.stride(0);      \\\nX* MADNESS_RESTRICT _p0=x.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i,_p0+=__xs0) { \\\n  exp; \\\n} } while(0)\n\n#define UNARYITERATOR2(X,x,exp) do { \\\n        long __xd0=x.dim(0), __xd1=x.dim(1);   \\\n        long __xs0=x.stride(0), __xs1=x.stride(1);      \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i,__xp0+=__xs0) { \\\n  X* MADNESS_RESTRICT _p0=__xp0; \\\n  for (long _j=0; _j<__xd1; ++_j, _p0+=__xs1) { \\\n    exp; \\\n  } } } while(0)\n\n#define UNARYITERATOR3(X,x,exp) do { \\\n        long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2);        \\\n        long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2);   \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i,__xp0+=__xs0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1) { \\\n    X* MADNESS_RESTRICT _p0=__xp1; \\\n    for (long _k=0; _k<__xd2; ++_k, _p0+=__xs2) { \\\n       exp; \\\n    } } } } while(0)\n\n#define UNARYITERATOR4(X,x,exp) do { \\\n        long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2),    \\\n            __xd3=x.dim(3);                                         \\\n        long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2),   \\\n            __xs3=x.stride(3);                                          \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i,__xp0+=__xs0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1) { \\\n    X* MADNESS_RESTRICT __xp2=__xp1; \\\n    for (long _k=0; _k<__xd2; ++_k, __xp2+=__xs2) { \\\n       X* MADNESS_RESTRICT _p0=__xp2; \\\n       for (long _l=0; _l<__xd3; ++_l, _p0+=__xs3) { \\\n          exp; \\\n       } } } } } while(0)\n\n#define UNARYITERATOR5(X,x,exp) do { \\\n        long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2),    \\\n            __xd3=x.dim(3), __xd4=x.dim(4);                         \\\n        long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2),   \\\n            __xs3=x.stride(3), __xs4=x.stride(4);                       \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i,__xp0+=__xs0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1) { \\\n    X* MADNESS_RESTRICT __xp2=__xp1; \\\n    for (long _k=0; _k<__xd2; ++_k, __xp2+=__xs2) { \\\n       X* MADNESS_RESTRICT __xp3=__xp2; \\\n       for (long _l=0; _l<__xd3; ++_l, __xp3+=__xs3) { \\\n          X* MADNESS_RESTRICT _p0 =__xp3; \\\n          for (long _m=0; _m<__xd4; ++_m, _p0+=__xs4) { \\\n            exp; \\\n          } } } } } } while(0)\n\n#define UNARYITERATOR6(X,x,exp) do { \\\n        long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2),    \\\n            __xd3=x.dim(3), __xd4=x.dim(4), __xd5=x.dim(5);         \\\n        long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2),   \\\n            __xs3=x.stride(3), __xs4=x.stride(4), __xs5=x.stride(5);    \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i,__xp0+=__xs0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1) { \\\n    X* MADNESS_RESTRICT __xp2=__xp1; \\\n    for (long _k=0; _k<__xd2; ++_k, __xp2+=__xs2) { \\\n       X* MADNESS_RESTRICT __xp3=__xp2; \\\n       for (long _l=0; _l<__xd3; ++_l, __xp3+=__xs3) { \\\n          X* MADNESS_RESTRICT __xp4=__xp3; \\\n          for (long _m=0; _m<__xd4; ++_m, __xp4+=__xs4) { \\\n            X* MADNESS_RESTRICT _p0=__xp4; \\\n            for (long _n=0; _n<__xd5; ++_n, _p0+=__xs5) { \\\n              exp; \\\n          } } } } } } } while(0)\n\n#define UNARYITERATOR(X,x,exp) do { \\\n  long _j=0, _k=0, _l=0, _m=0, _n=0; \\\n  if (x.ndim() == 1) UNARYITERATOR1(X,x,exp); \\\n  else if (x.ndim() == 2) UNARYITERATOR2(X,x,exp); \\\n  else if (x.ndim() == 3) UNARYITERATOR3(X,x,exp); \\\n  else if (x.ndim() == 4) UNARYITERATOR4(X,x,exp); \\\n  else if (x.ndim() == 5) UNARYITERATOR5(X,x,exp); \\\n  else if (x.ndim() == 6) UNARYITERATOR6(X,x,exp); \\\n  else {TENSOR_ASSERT(x.ndim() <= 6,\"ndim confused?\",x.ndim(),&x);} } while(0)\n\n// Inside iterator access pointers to current elements as _p0 & _p1\n// _i, _j, _k, ... also defined\n#define BINARYITERATOR1(X,x,Y,y,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0);                                                   \\\n long __xs0=x.stride(0);                                                \\\n long __ys0=y.stride(0);                                                \\\nX* MADNESS_RESTRICT _p0=x.ptr(); \\\nY* MADNESS_RESTRICT _p1=y.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, _p0+=__xs0, _p1+=__ys0) { \\\n   exp; \\\n} } while(0)\n\n#define BINARYITERATOR2(X,x,Y,y,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0), __xd1=x.dim(1);                                   \\\n long __xs0=x.stride(0), __xs1=x.stride(1);                             \\\n long __ys0=y.stride(0), __ys1=y.stride(1);                             \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nY* MADNESS_RESTRICT __yp0=y.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, __xp0+=__xs0, __yp0+=__ys0) { \\\n  X* MADNESS_RESTRICT _p0=__xp0; \\\n  Y* MADNESS_RESTRICT _p1=__yp0; \\\n  for (long _j=0; _j<__xd1; ++_j, _p0+=__xs1, _p1+=__ys1) { \\\n     exp; \\\n  } } } while(0)\n\n#define BINARYITERATOR3(X,x,Y,y,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2);                   \\\n long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2);          \\\n long __ys0=y.stride(0), __ys1=y.stride(1), __ys2=y.stride(2);          \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nY* MADNESS_RESTRICT __yp0=y.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, __xp0+=__xs0, __yp0+=__ys0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  Y* MADNESS_RESTRICT __yp1=__yp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1, __yp1+=__ys1) { \\\n    X* MADNESS_RESTRICT _p0=__xp1; \\\n    Y* MADNESS_RESTRICT _p1=__yp1; \\\n    for (long _k=0; _k<__xd2; ++_k, _p0+=__xs2, _p1+=__ys2) { \\\n       exp; \\\n    } } } } while(0)\n\n#define BINARYITERATOR4(X,x,Y,y,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2),                   \\\n     __xd3=x.dim(3);                                                    \\\n long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2),          \\\n     __xs3=x.stride(3);                                                 \\\n long __ys0=y.stride(0), __ys1=y.stride(1), __ys2=y.stride(2),          \\\n     __ys3=y.stride(3);                                                 \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nY* MADNESS_RESTRICT __yp0=y.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, __xp0+=__xs0, __yp0+=__ys0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  Y* MADNESS_RESTRICT __yp1=__yp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1, __yp1+=__ys1) { \\\n    X* MADNESS_RESTRICT __xp2=__xp1; \\\n    Y* MADNESS_RESTRICT __yp2=__yp1; \\\n    for (long _k=0; _k<__xd2; ++_k, __xp2+=__xs2, __yp2+=__ys2) { \\\n      X* MADNESS_RESTRICT _p0=__xp2; \\\n      Y* MADNESS_RESTRICT _p1=__yp2; \\\n      for (long _l=0; _l<__xd3; ++_l, _p0+=__xs3, _p1+=__ys3) { \\\n         exp; \\\n      } } } } } while(0)\n\n#define BINARYITERATOR5(X,x,Y,y,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2),                   \\\n     __xd3=x.dim(3), __xd4=x.dim(4);                                    \\\n long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2),          \\\n     __xs3=x.stride(3), __xs4=x.stride(4);                              \\\n long __ys0=y.stride(0), __ys1=y.stride(1), __ys2=y.stride(2),          \\\n     __ys3=y.stride(3), __ys4=y.stride(4);                              \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nY* MADNESS_RESTRICT __yp0=y.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, __xp0+=__xs0, __yp0+=__ys0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  Y* MADNESS_RESTRICT __yp1=__yp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1, __yp1+=__ys1) { \\\n    X* MADNESS_RESTRICT __xp2=__xp1; \\\n    Y* MADNESS_RESTRICT __yp2=__yp1; \\\n    for (long _k=0; _k<__xd2; ++_k, __xp2+=__xs2, __yp2+=__ys2) { \\\n      X* MADNESS_RESTRICT __xp3=__xp2; \\\n      Y* MADNESS_RESTRICT __yp3=__yp2; \\\n      for (long _l=0; _l<__xd3; ++_l, __xp3+=__xs3, __yp3+=__ys3) { \\\n        X* MADNESS_RESTRICT _p0=__xp3; \\\n        Y* MADNESS_RESTRICT _p1=__yp3; \\\n        for (long _m=0; _m<__xd4; ++_m, _p0+=__xs4, _p1+=__ys4) { \\\n           exp; \\\n        } } } } } } while(0)\n\n#define BINARYITERATOR6(X,x,Y,y,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2),                   \\\n     __xd3=x.dim(3), __xd4=x.dim(4), __xd5=x.dim(5);                    \\\n long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2),          \\\n     __xs3=x.stride(3), __xs4=x.stride(4), __xs5=x.stride(5);           \\\n long __ys0=y.stride(0), __ys1=y.stride(1), __ys2=y.stride(2),          \\\n     __ys3=y.stride(3), __ys4=y.stride(4), __ys5=y.stride(5);           \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nY* MADNESS_RESTRICT __yp0=y.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, __xp0+=__xs0, __yp0+=__ys0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  Y* MADNESS_RESTRICT __yp1=__yp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1, __yp1+=__ys1) { \\\n    X* MADNESS_RESTRICT __xp2=__xp1; \\\n    Y* MADNESS_RESTRICT __yp2=__yp1; \\\n    for (long _k=0; _k<__xd2; ++_k, __xp2+=__xs2, __yp2+=__ys2) { \\\n      X* MADNESS_RESTRICT __xp3=__xp2; \\\n      Y* MADNESS_RESTRICT __yp3=__yp2; \\\n      for (long _l=0; _l<__xd3; ++_l, __xp3+=__xs3, __yp3+=__ys3) { \\\n        X* MADNESS_RESTRICT __xp4=__xp3; \\\n        Y* MADNESS_RESTRICT __yp4=__yp3; \\\n        for (long _m=0; _m<__xd4; ++_m, __xp4+=__xs4, __yp4+=__ys4) { \\\n          X* MADNESS_RESTRICT _p0=__xp4; \\\n          Y* MADNESS_RESTRICT _p1=__yp4; \\\n          for (long _n=0; _n<__xd5; ++_n, _p0+=__xs5, _p1+=__ys5) { \\\n             exp; \\\n          } } } } } } } while(0)\n\n#define BINARYITERATOR(X,x,Y,y,exp) do { \\\n  long _j=0, _k=0, _l=0, _m=0, _n=0; \\\n  if (x.ndim() == 1) BINARYITERATOR1(X,x,Y,y,exp); \\\n  else if (x.ndim() == 2) BINARYITERATOR2(X,x,Y,y,exp); \\\n  else if (x.ndim() == 3) BINARYITERATOR3(X,x,Y,y,exp); \\\n  else if (x.ndim() == 4) BINARYITERATOR4(X,x,Y,y,exp); \\\n  else if (x.ndim() == 5) BINARYITERATOR5(X,x,Y,y,exp); \\\n  else if (x.ndim() == 6) BINARYITERATOR6(X,x,Y,y,exp); \\\n  else {TENSOR_ASSERT(x.ndim() <= 6,\"ndim confused?\",x.ndim(),&x);} \\\n} while(0)\n\n// Inside iterator access pointers to current elements as _p0, _p1, _p2\n// _i, _j, _k, ... also defined\n#define TERNARYITERATOR1(X,x,Y,y,Z,z,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\nTENSOR_ASSERT(x.conforms(z),\"first and third tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0);                                                   \\\n long __xs0=x.stride(0);                                                \\\n long __ys0=y.stride(0);                                                \\\n long __zs0=z.stride(0);                                                \\\nX* MADNESS_RESTRICT _p0=x.ptr(); \\\nY* MADNESS_RESTRICT _p1=y.ptr(); \\\nZ* MADNESS_RESTRICT _p2=z.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, _p0+=__xs0, _p1+=__ys0, _p2+=__zs0) { \\\n  exp; \\\n} } while(0)\n\n#define TERNARYITERATOR2(X,x,Y,y,Z,z,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\nTENSOR_ASSERT(x.conforms(z),\"first and third tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0), __xd1=x.dim(1);                                   \\\n long __xs0=x.stride(0), __xs1=x.stride(1);                             \\\n long __ys0=y.stride(0), __ys1=y.stride(1);                             \\\n long __zs0=z.stride(0), __zs1=z.stride(1);                             \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nY* MADNESS_RESTRICT __yp0=y.ptr(); \\\nZ* MADNESS_RESTRICT __zp0=z.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, __xp0+=__xs0, __yp0+=__ys0, __zp0+=__zs0) { \\\n  X* MADNESS_RESTRICT _p0=__xp0; \\\n  Y* MADNESS_RESTRICT _p1=__yp0; \\\n  Z* MADNESS_RESTRICT _p2=__zp0; \\\n  for (long _j=0; _j<__xd1; ++_j, _p0+=__xs1, _p1+=__ys1, _p2+=__zs1) { \\\n    exp; \\\n  } } } while(0)\n\n#define TERNARYITERATOR3(X,x,Y,y,Z,z,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\nTENSOR_ASSERT(x.conforms(z),\"first and third tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2);                   \\\n long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2);          \\\n long __ys0=y.stride(0), __ys1=y.stride(1), __ys2=y.stride(2);          \\\n long __zs0=z.stride(0), __zs1=z.stride(1), __zs2=z.stride(2);          \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nY* MADNESS_RESTRICT __yp0=y.ptr(); \\\nZ* MADNESS_RESTRICT __zp0=z.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, __xp0+=__xs0, __yp0+=__ys0, __zp0+=__zs0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  Y* MADNESS_RESTRICT __yp1=__yp0; \\\n  Z* MADNESS_RESTRICT __zp1=__zp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1, __yp1+=__ys1, __zp1+=__zs1) { \\\n    X* MADNESS_RESTRICT _p0=__xp1; \\\n    Y* MADNESS_RESTRICT _p1=__yp1; \\\n    Z* MADNESS_RESTRICT _p2=__zp1; \\\n    for (long _k=0; _k<__xd2; ++_k, _p0+=__xs2, _p1+=__ys2, _p2+=__zs2) { \\\n      exp; \\\n    } } } } while(0)\n\n#define TERNARYITERATOR4(X,x,Y,y,Z,z,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\nTENSOR_ASSERT(x.conforms(z),\"first and third tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2),                   \\\n     __xd3=x.dim(3);                                                    \\\n long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2),          \\\n     __xs3=x.stride(3);                                                 \\\n long __ys0=y.stride(0), __ys1=y.stride(1), __ys2=y.stride(2),          \\\n     __ys3=y.stride(3);                                                 \\\n long __zs0=z.stride(0), __zs1=z.stride(1), __zs2=z.stride(2),          \\\n     __zs3=z.stride(3);                                                 \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nY* MADNESS_RESTRICT __yp0=y.ptr(); \\\nZ* MADNESS_RESTRICT __zp0=z.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, __xp0+=__xs0, __yp0+=__ys0, __zp0+=__zs0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  Y* MADNESS_RESTRICT __yp1=__yp0; \\\n  Z* MADNESS_RESTRICT __zp1=__zp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1, __yp1+=__ys1, __zp1+=__zs1) { \\\n    X* MADNESS_RESTRICT __xp2=__xp1; \\\n    Y* MADNESS_RESTRICT __yp2=__yp1; \\\n    Z* MADNESS_RESTRICT __zp2=__zp1; \\\n    for (long _k=0; _k<__xd2; ++_k, __xp2+=__xs2, __yp2+=__ys2, __zp2+=__zs2) { \\\n      X* MADNESS_RESTRICT _p0=__xp2; \\\n      Y* MADNESS_RESTRICT _p1=__yp2; \\\n      Z* MADNESS_RESTRICT _p2=__zp2; \\\n      for (long _l=0; _l<__xd3; ++_l, _p0+=__xs3, _p1+=__ys3, _p2+=__zs3) { \\\n        exp; \\\n      } } } } } while(0)\n\n#define TERNARYITERATOR5(X,x,Y,y,Z,z,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\nTENSOR_ASSERT(x.conforms(z),\"first and third tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2),                   \\\n     __xd3=x.dim(3), __xd4=x.dim(4);                                    \\\n long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2),          \\\n     __xs3=x.stride(3), __xs4=x.stride(4);                              \\\n long __ys0=y.stride(0), __ys1=y.stride(1), __ys2=y.stride(2),          \\\n     __ys3=y.stride(3), __ys4=y.stride(4);                              \\\n long __zs0=z.stride(0), __zs1=z.stride(1), __zs2=z.stride(2),          \\\n     __zs3=z.stride(3), __zs4=z.stride(4);                              \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nY* MADNESS_RESTRICT __yp0=y.ptr(); \\\nZ* MADNESS_RESTRICT __zp0=z.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, __xp0+=__xs0, __yp0+=__ys0, __zp0+=__zs0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  Y* MADNESS_RESTRICT __yp1=__yp0; \\\n  Z* MADNESS_RESTRICT __zp1=__zp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1, __yp1+=__ys1, __zp1+=__zs1) { \\\n    X* MADNESS_RESTRICT __xp2=__xp1; \\\n    Y* MADNESS_RESTRICT __yp2=__yp1; \\\n    Z* MADNESS_RESTRICT __zp2=__zp1; \\\n    for (long _k=0; _k<__xd2; ++_k, __xp2+=__xs2, __yp2+=__ys2, __zp2+=__zs2) { \\\n      X* MADNESS_RESTRICT __xp3=__xp2; \\\n      Y* MADNESS_RESTRICT __yp3=__yp2; \\\n      Z* MADNESS_RESTRICT __zp3=__zp2; \\\n      for (long _l=0; _l<__xd3; ++_l, __xp3+=__xs3, __yp3+=__ys3, __zp3+=__zs3) { \\\n        X* MADNESS_RESTRICT _p0=__xp3; \\\n        Y* MADNESS_RESTRICT _p1=__yp3; \\\n        Z* MADNESS_RESTRICT _p2=__zp3; \\\n        for (long _m=0; _m<__xd4; ++_m, _p0+=__xs4, _p1+=__ys4, _p2+=__zs4) { \\\n          exp; \\\n        } } } } } } while(0)\n\n#define TERNARYITERATOR6(X,x,Y,y,Z,z,exp) do { \\\nTENSOR_ASSERT(x.conforms(y),\"first and second tensors do not conform\",0,&x); \\\nTENSOR_ASSERT(x.conforms(z),\"first and third tensors do not conform\",0,&x); \\\n long __xd0=x.dim(0), __xd1=x.dim(1), __xd2=x.dim(2),                   \\\n     __xd3=x.dim(3), __xd4=x.dim(4), __xd5=x.dim(5);                    \\\n long __xs0=x.stride(0), __xs1=x.stride(1), __xs2=x.stride(2),          \\\n     __xs3=x.stride(3), __xs4=x.stride(4), __xs5=x.stride(5);           \\\n long __ys0=y.stride(0), __ys1=y.stride(1), __ys2=y.stride(2),          \\\n     __ys3=y.stride(3), __ys4=y.stride(4), __ys5=y.stride(5);           \\\n long __zs0=z.stride(0), __zs1=z.stride(1), __zs2=z.stride(2),          \\\n     __zs3=z.stride(3), __zs4=z.stride(4), __zs5=z.stride(5);           \\\nX* MADNESS_RESTRICT __xp0=x.ptr(); \\\nY* MADNESS_RESTRICT __yp0=y.ptr(); \\\nZ* MADNESS_RESTRICT __zp0=z.ptr(); \\\nfor (long _i=0; _i<__xd0; ++_i, __xp0+=__xs0, __yp0+=__ys0, __zp0+=__zs0) { \\\n  X* MADNESS_RESTRICT __xp1=__xp0; \\\n  Y* MADNESS_RESTRICT __yp1=__yp0; \\\n  Z* MADNESS_RESTRICT __zp1=__zp0; \\\n  for (long _j=0; _j<__xd1; ++_j, __xp1+=__xs1, __yp1+=__ys1, __zp1+=__zs1) { \\\n    X* MADNESS_RESTRICT __xp2=__xp1; \\\n    Y* MADNESS_RESTRICT __yp2=__yp1; \\\n    Z* MADNESS_RESTRICT __zp2=__zp1; \\\n    for (long _k=0; _k<__xd2; ++_k, __xp2+=__xs2, __yp2+=__ys2, __zp2+=__zs2) { \\\n      X* MADNESS_RESTRICT __xp3=__xp2; \\\n      Y* MADNESS_RESTRICT __yp3=__yp2; \\\n      Z* MADNESS_RESTRICT __zp3=__zp2; \\\n      for (long _l=0; _l<__xd3; ++_l, __xp3+=__xs3, __yp3+=__ys3, __zp3+=__zs3) { \\\n        X* MADNESS_RESTRICT __xp4=__xp3; \\\n        Y* MADNESS_RESTRICT __yp4=__yp3; \\\n        Z* MADNESS_RESTRICT __zp4=__zp3; \\\n        for (long _m=0; _m<__xd4; ++_m, __xp4+=__xs4, __yp4+=__ys4, __zp4+=__zs4) { \\\n          X* MADNESS_RESTRICT _p0=__xp4; \\\n          Y* MADNESS_RESTRICT _p1=__yp4; \\\n          Z* MADNESS_RESTRICT _p2=__zp4; \\\n          for (long _n=0; _n<__xd5; ++_n, _p0+=__xs5, _p1+=__ys5, _p2+=__zs5) { \\\n            exp; \\\n          } } } } } } } while(0)\n\n#define TERNARYITERATOR(X,x,Y,y,Z,z,exp) do { \\\n  long _j=0, _k=0, _l=0, _m=0, _n=0; \\\n  if (x.ndim() == 1) TERNARYITERATOR1(X,x,Y,y,Z,z,exp); \\\n  else if (x.ndim() == 2) TERNARYITERATOR2(X,x,Y,y,Z,z,exp); \\\n  else if (x.ndim() == 3) TERNARYITERATOR3(X,x,Y,y,Z,z,exp); \\\n  else if (x.ndim() == 4) TERNARYITERATOR4(X,x,Y,y,Z,z,exp); \\\n  else if (x.ndim() == 5) TERNARYITERATOR5(X,x,Y,y,Z,z,exp); \\\n  else if (x.ndim() == 6) TERNARYITERATOR6(X,x,Y,y,Z,z,exp); \\\n  else {TENSOR_ASSERT(x.ndim() <= 6,\"ndim confused?\",x.ndim(),&x);} \\\n} while(0)\n\n#define UNARY_OPTIMIZED_ITERATOR(X,x,exp) do { \\\n  if (x.iscontiguous()) { \\\n    X* MADNESS_RESTRICT _p0 = x.ptr(); \\\n    for (long _j=0; _j<x.size(); ++_j,++_p0) {exp;} \\\n  } \\\n  else { \\\n    for (TensorIterator<REMCONST(X)> iter=x.unary_iterator(1); iter._p0; ++iter) { \\\n      long _dimj = iter.dimj; \\\n      X* MADNESS_RESTRICT _p0 = iter._p0; \\\n      long _s0 = iter._s0; \\\n      for (long _j=0; _j<_dimj; ++_j, _p0+=_s0) { \\\n        exp; \\\n      } \\\n    } \\\n  } \\\n} while(0)\n\n\n// Can optimize these by moving definition of stride out of loop.\n\n#define UNARY_UNOPTIMIZED_ITERATOR(X,x,exp) do { \\\n    for (TensorIterator<REMCONST(X)> iter=x.unary_iterator(1,false,false); iter._p0; ++iter) { \\\n    long _dimj = iter.dimj; \\\n    X* MADNESS_RESTRICT _p0 = iter._p0; \\\n    long _s0 = iter._s0; \\\n    for (long _j=0; _j<_dimj; ++_j, _p0+=_s0) { \\\n      exp; \\\n    } \\\n  } } while(0)\n\n// Use this inside another iterator macro ... pointers are _q* instead of _p*\n// Iterator is iter2.\n\n#define UNARY_UNOPTIMIZED_ITERATOR_NESTED(X,x,exp) do { \\\n    for (TensorIterator<REMCONST(X)> iter2=x.unary_iterator(1,false,false); iter2._p0; ++iter2) { \\\n    long _dimj2 = iter2.dimj; \\\n    X* MADNESS_RESTRICT _q0 = iter2._p0; \\\n    long _s20 = iter2._s0; \\\n    for (long _j2=0; _j2<_dimj2; ++_j2, _q0+=_s20) { \\\n      exp; \\\n    } \\\n  } } while(0)\n\n#define BINARY_OPTIMIZED_ITERATOR(X,x,Y,y,exp) do { \\\n  if (x.iscontiguous() && y.iscontiguous() && x.size()==y.size()) { \\\n    X* MADNESS_RESTRICT _p0 = x.ptr(); \\\n    Y* MADNESS_RESTRICT _p1 = y.ptr(); \\\n    for (long _j=0; _j<x.size(); ++_j,++_p0,++_p1) {exp;} \\\n  } \\\n  else { \\\n    for (TensorIterator<REMCONST(X),REMCONST(Y)> iter=x.binary_iterator(y,1); iter._p0; ++iter) { \\\n        long _dimj = iter.dimj; \\\n        X* MADNESS_RESTRICT _p0 = iter._p0; \\\n        Y* MADNESS_RESTRICT _p1 = iter._p1; \\\n        long _s0 = iter._s0; \\\n        long _s1 = iter._s1; \\\n        for (long _j=0; _j<_dimj; ++_j, _p0+=_s0, _p1+=_s1) { \\\n          exp; \\\n        } \\\n  } } } while(0)\n\n#define TERNARY_OPTIMIZED_ITERATOR(X,x,Y,y,Z,z,exp) do { \\\n  if (x.iscontiguous() && y.iscontiguous() && z.iscontiguous() && x.size()==y.size() && x.size()==z.size()) { \\\n    X* MADNESS_RESTRICT _p0 = x.ptr(); \\\n    Y* MADNESS_RESTRICT _p1 = y.ptr(); \\\n    Z* MADNESS_RESTRICT _p2 = z.ptr(); \\\n    for (long _j=0; _j<x.size(); ++_j,++_p0,++_p1,++_p2) {exp;} \\\n  } \\\n  else { \\\n    for (TensorIterator<REMCONST(X),REMCONST(Y),REMCONST(Z)> iter=x.ternary_iterator(y,z,1); iter._p0; ++iter) { \\\n        long _dimj = iter.dimj; \\\n        X* MADNESS_RESTRICT _p0 = iter._p0; \\\n        Y* MADNESS_RESTRICT _p1 = iter._p1; \\\n        Z* MADNESS_RESTRICT _p2 = iter._p2; \\\n        long _s0 = iter._s0; \\\n        long _s1 = iter._s1; \\\n        long _s2 = iter._s2; \\\n        for (long _j=0; _j<_dimj; ++_j, _p0+=_s0, _p1+=_s1, _p2+=_s2) { \\\n          exp; \\\n        } \\\n  } } } while(0)\n\n#endif // MADNESS_TENSOR_TENSOR_MACROS_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/tensorexcept.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov \n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  \n  $Id$\n*/\n\n  \n#ifndef MADNESS_TENSOR_TENSOREXCPT_H__INCLUDED\n#define MADNESS_TENSOR_TENSOREXCPT_H__INCLUDED\n\n/// \\file tensorexcept.h\n/// \\brief Declares and implements TensorException\n\n/// \\ingroup tensor\n\n#include <iosfwd>\n#include <exception>\n#include <madness/tensor/basetensor.h>\n\nnamespace madness {\n/// Tensor is intended to throw only TensorExceptions\n    class TensorException : public std::exception {\n        const char* msg;\n        const char* assertion;\n        int value;\n        BaseTensor t;\n        const BaseTensor *tp;\n        int line;\n        const char *function;\n        const char *filename;\n\npublic:\n        // Capturing the line/function/filename info is best done with the macros below\n        TensorException(const char* s, const char *a, int err, const BaseTensor* tp,\n                        int lin, const char *func, const char *file)\n                : msg(s)\n                , assertion(a)\n                , value(err)\n                , tp(tp)\n                , line(lin)\n                , function(func)\n                , filename(file) {\n            // We must copy the pointed-to tensor because during unwinding it\n            // might go out of scope and dereferencing its pointer is invalid\n\t    if (tp != nullptr)\n              new(&t) BaseTensor(*tp);\n        }\n\n        virtual const char* what() const throw() {\n            return msg;\n        }\n\n        virtual ~TensorException() throw() {}\n\n    /// Print a TensorException to the stream (for human consumption)\n    friend std::ostream& operator <<(std::ostream& out, const TensorException& e) {\n        out << \"TensorException: msg='\";\n        if (e.msg) out << e.msg;\n        out << \"'\\n\";\n        if (e.assertion) out << \"                 failed assertion='\" <<\n            e.assertion << \"'\\n\";\n        out << \"                 value=\" << e.value << \"\\n\";\n        if (e.line) out << \"                 line=\" << e.line << \"\\n\";\n        if (e.function) out << \"                 function='\" <<\n            e.function << \"'\\n\";\n        if (e.filename) out << \"                 filename='\" <<\n            e.filename << \"'\\n\";\n        if (e.tp != nullptr) {\n            out << \"                 tensor=Tensor<\";\n            if (e.t.id()>=0 && e.t.id()<=TENSOR_MAX_TYPE_ID) {\n                out << tensor_type_names[e.t.id()] << \">(\";\n            }\n            else {\n                out << \"invalid_type_id>(\";\n            }\n            if (e.t.ndim()>=0 && e.t.ndim()<TENSOR_MAXDIM) {\n                for (int i=0; i<e.t.ndim(); ++i) {\n                    out << e.t.dim(i);\n                    if (i != (e.t.ndim()-1)) out << \",\";\n                }\n                out << \")\";\n            }\n            else {\n                out << \"invalid_dimensions)\";\n            }\n            out << \" at 0x\" << (void *)(e.tp) << \"\\n\";\n        }\n\n        return out;\n    }\n\n };\n\n\n#define TENSOR_STRINGIZE(X) #X\n#define TENSOR_EXCEPTION_AT(F, L) TENSOR_STRINGIZE(F) \"(\" TENSOR_STRINGIZE(L) \")\"\n\n#define TENSOR_EXCEPTION(msg,value,t) \\\n    throw ::madness::TensorException(\"TENSOR EXCEPTION: \" TENSOR_EXCEPTION_AT( __FILE__, __LINE__ ) \": \" msg , \\\n    0,value,t,__LINE__,__FUNCTION__,__FILE__)\n\n#define TENSOR_ASSERT(condition,msg,value,t) \\\ndo {if (!(condition)) \\\n        throw ::madness::TensorException(\"TENSOR ASSERTION FAILED: \" TENSOR_EXCEPTION_AT( __FILE__, __LINE__ ) \": \" msg , \\\n        #condition,value,t,__LINE__,__FUNCTION__,__FILE__); \\\n   } while (0)\n\n}\n\n#endif // MADNESS_TENSOR_TENSOREXCPT_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/tensoriter.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#include <madness/tensor/tensor.h>\n\n#include <iostream>\n#include <algorithm>\n#include <complex>\n\n#include <cmath>\n\n\n/// \\file tensoriter.cc\n/// \\brief Implements TensorIterator\n\n// These here only to instantiate specializations\ntypedef std::complex<float> float_complex;\ntypedef std::complex<double> double_complex;\n\n\nnamespace madness {\n\n\n    //#include \"tensoriter_spec.h\"\n\n    /*\n    template class TensorIterator<double,double,double>;\n    template class TensorIterator<double,double,double_complex>;\n    template class TensorIterator<double,double,float>;\n    template class TensorIterator<double,double,float_complex>;\n    template class TensorIterator<double,double,long>;\n    template class TensorIterator<double,double_complex,double>;\n    template class TensorIterator<double,double_complex,double_complex>;\n    template class TensorIterator<double,double_complex,float>;\n    template class TensorIterator<double,double_complex,float_complex>;\n    template class TensorIterator<double,double_complex,long>;\n    template class TensorIterator<double,float,double>;\n    template class TensorIterator<double,float,double_complex>;\n    template class TensorIterator<double,float,float>;\n    template class TensorIterator<double,float,float_complex>;\n    template class TensorIterator<double,float,long>;\n    template class TensorIterator<double,float_complex,double>;\n    template class TensorIterator<double,float_complex,double_complex>;\n    template class TensorIterator<double,float_complex,float>;\n    template class TensorIterator<double,float_complex,float_complex>;\n    template class TensorIterator<double,float_complex,long>;\n    template class TensorIterator<double,long,double>;\n    template class TensorIterator<double,long,double_complex>;\n    template class TensorIterator<double,long,float>;\n    template class TensorIterator<double,long,float_complex>;\n    template class TensorIterator<double,long,long>;\n    template class TensorIterator<double_complex,double,double>;\n    template class TensorIterator<double_complex,double,double_complex>;\n    template class TensorIterator<double_complex,double,float>;\n    template class TensorIterator<double_complex,double,float_complex>;\n    template class TensorIterator<double_complex,double,long>;\n    template class TensorIterator<double_complex,double_complex,double>;\n    template class TensorIterator<double_complex,double_complex,double_complex>;\n    template class TensorIterator<double_complex,double_complex,float>;\n    template class TensorIterator<double_complex,double_complex,float_complex>;\n    template class TensorIterator<double_complex,double_complex,long>;\n    template class TensorIterator<double_complex,float,double>;\n    template class TensorIterator<double_complex,float,double_complex>;\n    template class TensorIterator<double_complex,float,float>;\n    template class TensorIterator<double_complex,float,float_complex>;\n    template class TensorIterator<double_complex,float,long>;\n    template class TensorIterator<double_complex,float_complex,double>;\n    template class TensorIterator<double_complex,float_complex,double_complex>;\n    template class TensorIterator<double_complex,float_complex,float>;\n    template class TensorIterator<double_complex,float_complex,float_complex>;\n    template class TensorIterator<double_complex,float_complex,long>;\n    template class TensorIterator<double_complex,long,double>;\n    template class TensorIterator<double_complex,long,double_complex>;\n    template class TensorIterator<double_complex,long,float>;\n    template class TensorIterator<double_complex,long,float_complex>;\n    template class TensorIterator<double_complex,long,long>;\n    template class TensorIterator<float,double,double>;\n    template class TensorIterator<float,double,double_complex>;\n    template class TensorIterator<float,double,float>;\n    template class TensorIterator<float,double,float_complex>;\n    template class TensorIterator<float,double,long>;\n    template class TensorIterator<float,double_complex,double>;\n    template class TensorIterator<float,double_complex,double_complex>;\n    template class TensorIterator<float,double_complex,float>;\n    template class TensorIterator<float,double_complex,float_complex>;\n    template class TensorIterator<float,double_complex,long>;\n    template class TensorIterator<float,float,double>;\n    template class TensorIterator<float,float,double_complex>;\n    template class TensorIterator<float,float,float>;\n    template class TensorIterator<float,float,float_complex>;\n    template class TensorIterator<float,float,long>;\n    template class TensorIterator<float,float_complex,double>;\n    template class TensorIterator<float,float_complex,double_complex>;\n    template class TensorIterator<float,float_complex,float>;\n    template class TensorIterator<float,float_complex,float_complex>;\n    template class TensorIterator<float,float_complex,long>;\n    template class TensorIterator<float,long,double>;\n    template class TensorIterator<float,long,double_complex>;\n    template class TensorIterator<float,long,float>;\n    template class TensorIterator<float,long,float_complex>;\n    template class TensorIterator<float,long,long>;\n    template class TensorIterator<float_complex,double,double>;\n    template class TensorIterator<float_complex,double,double_complex>;\n    template class TensorIterator<float_complex,double,float>;\n    template class TensorIterator<float_complex,double,float_complex>;\n    template class TensorIterator<float_complex,double,long>;\n    template class TensorIterator<float_complex,double_complex,double>;\n    template class TensorIterator<float_complex,double_complex,double_complex>;\n    template class TensorIterator<float_complex,double_complex,float>;\n    template class TensorIterator<float_complex,double_complex,float_complex>;\n    template class TensorIterator<float_complex,double_complex,long>;\n    template class TensorIterator<float_complex,float,double>;\n    template class TensorIterator<float_complex,float,double_complex>;\n    template class TensorIterator<float_complex,float,float>;\n    template class TensorIterator<float_complex,float,float_complex>;\n    template class TensorIterator<float_complex,float,long>;\n    template class TensorIterator<float_complex,float_complex,double>;\n    template class TensorIterator<float_complex,float_complex,double_complex>;\n    template class TensorIterator<float_complex,float_complex,float>;\n    template class TensorIterator<float_complex,float_complex,float_complex>;\n    template class TensorIterator<float_complex,float_complex,long>;\n    template class TensorIterator<float_complex,long,double>;\n    template class TensorIterator<float_complex,long,double_complex>;\n    template class TensorIterator<float_complex,long,float>;\n    template class TensorIterator<float_complex,long,float_complex>;\n    template class TensorIterator<float_complex,long,long>;\n    template class TensorIterator<long,double,double>;\n    template class TensorIterator<long,double,double_complex>;\n    template class TensorIterator<long,double,float>;\n    template class TensorIterator<long,double,float_complex>;\n    template class TensorIterator<long,double,long>;\n    template class TensorIterator<long,double_complex,double>;\n    template class TensorIterator<long,double_complex,double_complex>;\n    template class TensorIterator<long,double_complex,float>;\n    template class TensorIterator<long,double_complex,float_complex>;\n    template class TensorIterator<long,double_complex,long>;\n    template class TensorIterator<long,float,double>;\n    template class TensorIterator<long,float,double_complex>;\n    template class TensorIterator<long,float,float>;\n    template class TensorIterator<long,float,float_complex>;\n    template class TensorIterator<long,float,long>;\n    template class TensorIterator<long,float_complex,double>;\n    template class TensorIterator<long,float_complex,double_complex>;\n    template class TensorIterator<long,float_complex,float>;\n    template class TensorIterator<long,float_complex,float_complex>;\n    template class TensorIterator<long,float_complex,long>;\n    template class TensorIterator<long,long,double>;\n    template class TensorIterator<long,long,double_complex>;\n    template class TensorIterator<long,long,float>;\n    template class TensorIterator<long,long,float_complex>;\n    template class TensorIterator<long,long,long>;\n    */\n}\n"
  },
  {
    "path": "src/madness/tensor/tensoriter.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#ifndef MADNESS_TENSOR_TENSORITER_H__INCLUDED\n#define MADNESS_TENSOR_TENSORITER_H__INCLUDED\n\n/// \\file tensoriter.h\n/// \\brief Declares TensorIterator\n\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/tensorexcept.h>\n\n#include <iostream>\n#include <algorithm>\n#include <complex>\n\n#include <cmath>\n\n\nnamespace madness {\n\n    template <class T> class Tensor;\n    template <class T> class SliceTensor;\n\n    static const long default_jdim = 5551212; // Never a valid dimension num.\n\n    /// Optimized iterator for tensors supporting unary, binary and ternary operations.\n    /// \\ingroup tensor\n    template <class T, class Q = T, class R = T> class TensorIterator {\n        T* _p0_save;\n        Q* _p1_save;\n        R* _p2_save;\n    public:\n        T* _p0;\n        Q* _p1;\n        R* _p2;\n        long ndim;\n        long dimj;\n        long _s0;\n        long _s1;\n        long _s2;\n        long dim[TENSOR_MAXDIM];\n        long ind[TENSOR_MAXDIM];\n        long stride0[TENSOR_MAXDIM];\n        long stride1[TENSOR_MAXDIM];\n        long stride2[TENSOR_MAXDIM];\n\n        TensorIterator(const Tensor<T>* t0, const Tensor<Q>* t1=0, const Tensor<R>* t2=0,\n                       long iterlevel=0,\n                       bool optimize=true, bool fusedim=true,\n                       long jdim=default_jdim);\n\n        TensorIterator<T,Q,R>& operator++();\n\n        inline bool operator == (const TensorIterator<T,Q,R>& a) const {\n            return _p0==a._p0;\n        }\n\n        inline bool operator != (const TensorIterator<T,Q,R>& a) const {\n            return _p0!=a._p0;\n        }\n\n        inline TensorIterator<T,Q,R>* operator->() {\n            return this;\n        };\n\n        inline T& operator*() const {\n            return *_p0;\n        };\n\n        void reset();\n\n        void reuse(const Tensor<T>* t0, const Tensor<Q>* t1=0, const Tensor<R>* t2=0);\n    };\n\n    /// Constructor for general iterator to compose operations over up to three tensors\n\n    /// \\ingroup tensor\n    /// Macros have been defined in \\c tensor_macros.h to take the pain out of\n    /// using iterators.  The options have the following effects\n    /// - \\c optimize reorders dimensions for optimal strides (only\n    /// applies if iterlevel=1).  If jdim==default_jdim, all dimensions\n    /// are reordered for optimal stride.  If jdim is not the default\n    /// value, then dimension jdim is excluded from the set of\n    /// dimensions being optimized.\n    ///\n    /// - \\c fusedim concatenates contiguous dimensions into the inner\n    /// loop (only applies if iterlevel=1 and jdim=default_jdim).\n    ///\n    /// - \\c iterlevel can have two values 0=elementwise, 1=vectorwise.  Elementwise implies\n    /// that the iterator returns successive elements, and explicitly\n    /// in the expected order for the tensor (i.e., with the last index\n    /// varying fastest).  Vectorwise implies that the user is responsible\n    /// for iterating over dimension jdim.\n    ///\n    /// - jdim --- if iterlevel=1, then jdim determines which dimension is\n    /// left for iteration with an explicit for loop.  Negative values\n    /// implies jdim+=ndim following the convention of Slice (and\n    /// Python).  If (optimize) the default is the fastest varying\n    /// dimension.  If (!optimize) the default is the last dimension\n    /// (jdim=-1). If (fusedim) contiguous dimensions are fused into\n    /// this inner loop.  Specifying a non-default value for jdim\n    /// disables fusedim and restricts optimization to reordering only\n    /// the exterior loops (so that the loop the user is iterating over\n    /// corresponds exactly to those in dimension jdim).\n    ///\n    /// \\par During iteration:\n    ///\n    /// - \\c ind[] will contain the current iteration indices .. BUT\n    /// if \\c optimize=true , they will not necessarily be in the\n    /// order of those of the tensor.  if fusedim is true, then\n    /// there may be fewer dimensions than the input tensor.\n    ///\n    /// - \\c _p0, \\c _p1, \\c _p2 will point to the current elements of \\c t0,t1,t2\n    /// noting that if \\c iterlevel>0, the user must provide additional\n    /// \\c for loops to iterate over the additional dimensions\n    ///\n    /// - \\c stride0[], \\c stride1[], \\c stride2[] will contain the strides for each\n    /// (possibly reordered) dimension.  If \\c iterlevel=1, \\c _s0,_s1,s2\n    /// contain the stride info for the dimension that the user is\n    /// responsible for iterating over.\n    ///\n    /// - \\c dimj -> the size of the j'th dimension\n    template <class T, class Q, class R>\n    TensorIterator<T,Q,R>::TensorIterator(const Tensor<T>* t0,\n                                          const Tensor<Q>* t1,\n                                          const Tensor<R>* t2,\n                                          long iterlevel,\n                                          bool optimize,\n                                          bool fusedim,\n                                          long jdim) {\n\n\n        if (!t0) {\n            // Used to indicate end of iteration.\n            _p0 = 0;\n            return;\n        }\n\n        //std::printf(\"t0=%p t1=%p t2=%p optimize=%d fusedim=%d iterlevel=%ld jdim=%ld\\n\",\n        //t0,t1,t2,optimize,fusedim,iterlevel,jdim);\n\n        TENSOR_ASSERT(iterlevel==0 || iterlevel==1,\"invalid iteration level\",iterlevel,t0);\n\n        // First copy basic info over\n        ndim = t0->ndim();\n        _p0_save = _p0 = const_cast<T*>(t0->ptr()); // CONSTNESS VIOLATION\n        for (int i=0; i<ndim; ++i) {\n            dim[i] = t0->dim(i);\n            stride0[i] = t0->stride(i);\n        }\n        if (t1) {\n            TENSOR_ASSERT(t0->conforms(*t1),\"first and second tensors do not conform\",\n                          0, t0);\n            _p1_save = _p1 = const_cast<Q*>(t1->ptr()); // CONSTNESS VIOLATION\n            for (int i=0; i<ndim; ++i) stride1[i] = t1->stride(i);\n        }\n        else {\n            _p1_save = _p1 = 0;\n        }\n        if (t2) {\n            TENSOR_ASSERT(t0->conforms(*t2),\"first and third tensors do not conform\",\n                          0, t0);\n            _p2_save = _p2 = const_cast<R*>(t2->ptr()); // CONSTNESS VIOLATION\n            for (int i=0; i<ndim; ++i) stride2[i] = t2->stride(i);\n        }\n        else {\n            _p2_save = _p2 = 0;\n        }\n\n        if (iterlevel == 0) {\n            // Iteration will include all dimensions\n            fusedim = false;\n            jdim = ndim;\n            dimj = 0;\n            _s0 = 0;\n            _s1 = 0;\n            _s2 = 0;\n        }\n        else if (iterlevel == 1) {\n            // Apply -ve indexing convention for dimensions\n            if (jdim < 0) jdim += ndim;\n\n            // If permissible optimize the order of dimensions excluding\n            // any non-default value of jdim.\n            if (optimize) {\n                for (int i=0; i<ndim; ++i) {\n                    if (i != jdim) {\n                        for (int j=i; j<ndim; ++j) {\n                            if (j != jdim) {\n                                if (std::abs(stride0[i]) < std::abs(stride0[j])) {\n                                    std::swap(stride0[i],stride0[j]);\n                                    if (t1) std::swap(stride1[i],stride1[j]);\n                                    if (t2) std::swap(stride2[i],stride2[j]);\n                                    std::swap(dim[i],dim[j]);\n                                }\n                            }\n                        }\n                    }\n                    //std::cout << \"stride0[\" << i << \"]=\" << stride0[i] << std::endl;\n                }\n            }\n\n            // Iterations will exclude dimension jdim, default is last one\n            if (jdim == default_jdim) {\n                jdim = ndim-1;\n            }\n            else {\n                fusedim = false;\n            }\n            TENSOR_ASSERT(jdim>=0 && jdim < ndim, \"invalid index for external iteration\",\n                          jdim, t0);\n            ndim--;\n\n            // Stride and dimension info for the excluded dimension\n            _s0 = stride0[jdim];\n            if (t1) {\n                _s1 = stride1[jdim];\n            }\n            else {\n                _s1 = 0;\n            }\n            if (t2) {\n                _s2 = stride2[jdim];\n            }\n            else {\n                _s2 = 0;\n            }\n            dimj = dim[jdim];\n\n            // Collapse stride and dimension info for remaining dimensions\n            for (int i=jdim+1; i<=ndim; ++i) { // GCC COMPILER WARNING ... but need <= ... why?  \n                dim[i-1] = dim[i];\n                stride0[i-1] = stride0[i];\n            }\n            if (t1) {\n                for (int i=jdim+1; i<=ndim; ++i) stride1[i-1] = stride1[i]; //  GCC COMPILER WARNING ... but need <= ... why?  \n            }\n            if (t2) {\n                for (int i=jdim+1; i<=ndim; ++i) stride2[i-1] = stride2[i]; //  GCC COMPILER WARNING ... but need <= ... why?  \n            }\n\n            if (fusedim) {\t\t// Only if jdim=default_jdim && iterlevel=1\n                if (t2) {\n                    for (int i=ndim-1; i>=0; --i) {\n                        if (_s0*dimj == stride0[i] &&\n                                _s1*dimj == stride1[i] &&\n                                _s2*dimj == stride2[i]) {\n                            dimj *= dim[i];\n                            ndim--;\n                        }\n                        else {\n                            break;\n                        }\n                    }\n                }\n                else if (t1) {\n                    for (int i=ndim-1; i>=0; --i) {\n                        if (_s0*dimj == stride0[i] &&\n                                _s1*dimj == stride1[i]) {\n                            dimj *= dim[i];\n                            ndim--;\n                        }\n                        else {\n                            break;\n                        }\n                    }\n                }\n                else {\n                    for (int i=ndim-1; i>=0; --i) {\n                        if (_s0*dimj == stride0[i]) {\n                            dimj *= dim[i];\n                            ndim--;\n                        }\n                        else {\n                            break;\n                        }\n                    }\n                }\n            }\n        }\n\n        // Initialize indices for the counter Use TENSOR_MAXDIM so reference to\n        // optimized-away dimensions is vaguely meaningful.\n        for (int i=0; i<TENSOR_MAXDIM; ++i) ind[i] = 0;\n\n        //   std::printf(\"ndim=%ld dimj=%ld _s0=%ld _s1=%ld _s2=%ld _p0=%p _p1=%p _p2=%p\\n\",\n        // \t      ndim,dimj,_s0,_s1,_s2,_p0,_p1,_p2);\n        //   for (int i=0; i<ndim; ++i) {\n        //     std::printf(\"   %d dim=%ld stride0=%ld stride1=%ld stride2=%ld\\n\",\n        // \t\ti,dim[i],stride0[i],stride1[i],stride2[i]);\n        //   }\n    }\n\n    template <class T, class Q, class R>\n    TensorIterator<T,Q,R>& TensorIterator<T,Q,R>::operator++() {\n        long d = ndim-1;\n        if (d<0 || _p0==0) {\n            _p0 = 0;\n            return *this;\n        }\n        while (ind[d] >= (dim[d] - 1)) {\n            _p0 -= ind[d] * stride0[d];\n            if (_p1)\t_p1 -= ind[d] * stride1[d];\n            if (_p2)\t_p2 -= ind[d] * stride2[d];\n            ind[d] = 0;\n            d--;\n            if (d < 0) {\n                _p0 = 0;\n                return *this;\n            }\n        }\n        _p0 += stride0[d];\n        if (_p1) _p1 += stride1[d];\n        if (_p2) _p2 += stride2[d];\n        ++(ind[d]);\n        return *this;\n    }\n\n    /// Reset the iterator back to the start ...\n    template <class T, class Q, class R>\n    void TensorIterator<T,Q,R>::reset() {\n        _p0 = _p0_save;\n        _p1 = _p1_save;\n        _p2 = _p2_save;\n        for (int i=0; i<TENSOR_MAXDIM; ++i) ind[i] = 0;\n    }\n\n\n    /// Reuse this iterator to iterate over other Tensors\n\n    /// The point of this method is to optimize away the construction of a\n    /// TensorIterator when applying the same operation repeatedly to\n    /// multiple tensors with identical shapes & strides.  We trust the\n    /// caller to ensure all shapes & strides match between the new\n    /// tensors and the ones used in the original constructor.\n    template <class T, class Q, class R>\n    void TensorIterator<T,Q,R>::reuse(const Tensor<T>* t0,\n                                      const Tensor<Q> *t1,\n                                      const Tensor<R> *t2) {\n        _p0 = _p0_save = t0->ptr();\n        if (t1) _p1 = _p1_save = t1->ptr();\n        if (t2) _p2 = _p2_save = t2->ptr();\n        for (int i=0; i<TENSOR_MAXDIM; ++i) ind[i] = 0;\n    }\n\n\n}\n#endif // MADNESS_TENSOR_TENSORITER_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/tensortrain.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id: srconf.h 2816 2012-03-23 14:59:52Z 3ru6ruWu $\n*/\n\n#ifndef TENSORTRAIN_H_\n#define TENSORTRAIN_H_\n\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/srconf.h>\n#include <madness/tensor/clapack.h>\n#include <madness/tensor/tensor_lapack.h>\n#include <madness/fortran_ctypes.h>\n#include <madness/world/archive.h>\n\n/**\n  \\file tensortrain.h\n  \\brief Defines and implements the tensor train decomposition as described in\n         I.V. Oseledets, Siam J. Sci. Comput. 33, 2295 (2011).\n  \\ingroup tensor\n  \\addtogroup tensor\n\n*/\n\nnamespace madness {\n\n    /// decompose the input tensor A into U and V, skipping singular vectors of\n    /// small singular values. One deep copy/allocation for U is performed\n\n    /// @param[inout]   A the input matrix, on exit the matrix VT (right sing. vectors)\n    /// @param[out]     U contiguous new tensor holding the left sing. vectors\n    /// @param[in]      thresh threshold for truncation of the singular vectors\n    /// @param[in]      s   scratch tensor for the singular values, dimension min(n,m)\n    /// @param[in]      scr scratch tensor\n    /// the dimension of the scratch tensor may be computed as\n    /// long lwork=std::max(3*std::min(m,n)+std::max(m,n),5*std::min(m,n)) + n*m;\n    template<typename T>\n    long rank_revealing_decompose(Tensor<T>& A, Tensor<T>& U,\n            const double thresh, Tensor< typename Tensor<T>::scalar_type > & s,\n            Tensor<T>& scr) {\n\n        MADNESS_ASSERT(A.ndim()==2);    // must be a matrix\n        const long n=A.dim(0);\n        const long m=A.dim(1);\n        const long rmax=std::min(n,m);\n        long lwork=std::max(3*std::min(m,n)+std::max(m,n),5*std::min(m,n));\n\n        // set up contiguous scratch arrays\n        MADNESS_ASSERT(scr.size()>lwork+n*m);\n        scr=scr.flat();\n        Tensor<T> work=scr(Slice(0,lwork-1));\n        Tensor<T> utmp=scr(Slice(lwork,lwork+n*m-1));\n        Tensor<T> dummy;    // real dummy\n\n        svd_result(A,utmp,s,dummy,work);\n\n        // this is rank_right\n        const long R1=SRConf<T>::max_sigma(thresh,rmax,s)+1;\n\n        // skip if rank=0\n        if (R1>0) {\n\n            U=madness::copy((utmp(Slice(0,n*rmax-1)))\n                    .reshape(n,rmax)(_,Slice(0,R1-1)));\n\n            A=A(Slice(0,R1-1),_);\n\n            // continue with the next dimension\n            for (int j=0; j<m; ++j) {\n                for (int i=0; i<R1; ++i) {\n                    A(i,j)*=s(i);\n                }\n            }\n        } else {\n            U=Tensor<T>(n,0l);\n        }\n        return R1;\n    }\n\n\n\n\t/**\n\t * A tensor train is a multi-modal representation of a tensor t\n\t * \\code\n\t *  t(i,j,k,l) = \\sum G^1_{a1,i,a2} G^2_{a2,j,a3} G^3_{a3,k,a4} G^4_{a4,l,a5}\n\t * \\endcode\n\t * The \"core\" tensors G are connected via a linear index network, where the\n\t * first index a1 and the last index a5 are boundary indices and are set to 1.\n\t *\n\t * The tensor train representation is suited for any number of dimensions and\n\t * in general at least as fast as the 2-way decomposition SVD. If the tensor\n\t * has full rank it will need about twice the storage space of the full tensor\n\t */\n\ttemplate<typename T>\n\tclass TensorTrain : public BaseTensor {\n\n\t    // make all types of TensorTrain friends of each other (for type conversion)\n\t    template<typename Q>\n\t    friend class TensorTrain;\n\n        /// C++ typename of this tensor.\n        typedef T type;\n\n        /// C++ typename of the real type associated with a complex type.\n        typedef typename TensorTypeData<T>::scalar_type scalar_type;\n\n        /// C++ typename of the floating point type associated with scalar real type\n        typedef typename TensorTypeData<T>::float_scalar_type float_scalar_type;\n\n\t\t/// holding the core tensors of a tensor train\n\t\t/// the tensors have the shape (k,r0) (r0,k,r1) (r1,k,r2) .. (rn-1,k)\n\t\tstd::vector<Tensor<T> > core;\n\t\t/// true if rank is zero\n\t\tbool zero_rank;\n\n\tpublic:\n\n\t\t/// empty constructor\n\t\tTensorTrain() : core(), zero_rank(true) {\n\t\t\tset_size_and_dim({});\n\t\t}\n\n\t\t/// ctor for a TensorTrain, with the tolerance eps\n\n\t\t/// The tensor train will represent the input tensor with\n\t\t/// accuracy || t - this ||_2 < eps\n\t\t///\n\t\t/// Note that we rely on specific layout of the memory in the tensors, e.g.\n\t\t/// we pass SliceTensors on to lapack. This will only work if the slices are\n\t\t/// contiguous.\n\t\t///\n\t\t/// @param[in]\tt\tfull representation of a tensor\n\t\t/// @param[in]\teps\tthe accuracy threshold\n\t\tTensorTrain(const Tensor<T>& t, double eps)\n\t\t\t: core(), zero_rank(false) {\n\t\t\tBaseTensor::set_dims_and_size(t.ndim(),t.dims());\n\t\t\tif (t.size()==0) return;\n\n\t\t\tMADNESS_ASSERT(t.size() != 0);\n            MADNESS_ASSERT(t.ndim() != 0);\n\n            std::vector<long> dims(t.ndim());\n            for (int d=0; d<t.ndim(); ++d) dims[d]=t.dim(d);\n            decompose(t.flat(),eps,dims);\n\n\t\t}\n\n\t\t/// ctor for a TensorTrain, with the tolerance eps\n\n\t\t/// The tensor train will represent the input tensor with\n\t\t/// accuracy || t - this ||_2 < eps\n\t\t///\n\t\t/// Note that we rely on specific layout of the memory in the tensors, e.g.\n\t\t/// we pass SliceTensors on to lapack. This will only work if the slices are\n\t\t/// contiguous.\n\t\t///\n\t\t/// @param[in]\tt\t\tfull representation of a tensor\n\t\t/// @param[in]\teps\t\tthe accuracy threshold\n\t\t/// @param[in]\tdims\tthe tt structure\n\t\tTensorTrain(const Tensor<T>& t, double eps, const std::vector<long> dims)\n\t\t\t: core(), zero_rank(false) {\n\t\t\tBaseTensor::set_dims_and_size(t.ndim(),t.dims());\n\n\t\t    MADNESS_ASSERT(t.size() != 0);\n            MADNESS_ASSERT(t.ndim() != 0);\n            decompose(t,eps,dims);\n\t\t}\n\n\t\t/// ctor for a TensorTrain, set up only the dimensions, no data\n\t\tTensorTrain(const long& ndims, const long* dims) {\n            zero_rank = true;\n\t\t\tset_dims_and_size(ndims,dims);\n\t\t}\n\n\t\t/// ctor for a TensorTrain, set up only the dimensions, no data\n\t\tTensorTrain(const std::vector<long>& dims) {\n            zero_rank = true;\n\t\t\tset_size_and_dim(dims);\n\n//            core.resize(dims.size());\n//            // first and last core tensor\n//            core[0] = Tensor<T>(dims[0],long(0));\n//            core[dims.size()-1] = Tensor<T>(long(0),dims[dims.size()-1]);\n//\n//            // iterate through the rest -- fast forward\n//            for (int d=1; d<dims.size()-1; ++d) {\n//                core[d] = Tensor<T>(long(0),dims[d],long(0));\n//\t\t    }\n\n\t\t}\n\n\n        /// ctor for a TensorTrain, with core tensors explicitly given\n\n        /// the core tensors must have the shape (k1,r1) (r1,k2,r2) .. (r2,k3)\n\t\t/// @param[in]  core    vector of core tensors, properly shaped\n        TensorTrain(const std::vector<Tensor<T> >& c) : core(c) {\n            zero_rank=false;\n            std::vector<long> d(c.size());\n            d[0]=core[0].dim(0);    // dim,rank\n            for (long i=1; i<d.size(); ++i) d[i]=core[i].dim(1);  // rank,dim,rank\n\t\t\tset_size_and_dim(d);\n\n            // check for zero ranks\n            for (int d=1; d<core.size(); ++d) if (core[d].dim(0)==0) zero_me();\n        }\n\n\n\t\t/// copy constructor, shallow\n\t\tTensorTrain(const TensorTrain& other) : core(other.core),\n\t\t        zero_rank(other.zero_rank) {\n\t\t\tset_dims_and_size(other.ndim(),other.dims());\n\n\t\t}\n\n\t\t/// assigment operator\n\t\tTensorTrain& operator=(const TensorTrain& other) {\n\t\t    if (this!=&other) {\n\t\t\t\tset_dims_and_size(other.ndim(),other.dims());\n                zero_rank=other.zero_rank;\n                core=other.core;\n\t\t    }\n            return *this;\n\t\t}\n\n        /// Type conversion makes a deep copy\n        template <class Q> operator TensorTrain<Q>() const { // type conv => deep copy\n\n            TensorTrain<Q> result(this->dims());\n            result.zero_rank=zero_rank;\n            for (const Tensor<T>& c : core) {\n                result.core.push_back(Tensor<Q>(c));\n            }\n            return result;\n        }\n\n    \tvoid set_size_and_dim(std::vector<long> dims) {\n    \t\tBaseTensor::set_dims_and_size(dims.size(),dims.data());\n    \t}\n\n        /// serialize this\n        template <typename Archive>\n        void serialize(Archive& ar) {\n\n        \t// serialize basetensor\n        \tar & _ndim & archive::wrap(_dim,TENSOR_MAXDIM) & _size & _id\n        \t\t\t& archive::wrap(_stride,TENSOR_MAXDIM);\n\n        \tlong core_size=core.size();\n            ar & zero_rank & core_size;\n\n            // no empty tensor\n            if (core_size>0) ar & core;\n        }\n\n\n\t\t/// deep copy of the whole tensor\n\n\t\t/// if argument has zero rank return a zero-rank tensor of the same dimensions\n\t\tfriend TensorTrain copy(const TensorTrain& other) {\n\n\t\t    // fast return\n\t\t    if (other.zero_rank) return TensorTrain(other.ndim(),other.dims());\n\n            TensorTrain result(other.ndim(),other.dims());\n            for (const Tensor<T>& t: other.core) {\n                if (t.size()==0) return TensorTrain(other.ndim(),other.dims());  // also zero\n                result.core.push_back(madness::copy(t));\n            }\n            result.zero_rank=other.zero_rank;\n            return result;\n\t\t}\n\n\t\t/// deep copy of a slice of the tensor\n\n\t\t/// this operation does not change the ranks, i.e. the resulting\n\t\t/// tensor is most likely not in an optimal compression state\n\t\t/// @param[in]  other   tensor to be sliced\n\t\t/// @param[in]  s       vector of slices\n\t\tfriend TensorTrain copy(const TensorTrain& other, const std::array<Slice,TENSOR_MAXDIM>& s) {\n\n\t\t\tstd::vector<long> dims(s.size());\n\t\t\tfor (int i=0; i<dims.size(); ++i) dims[i]=s[i].end-s[i].start+1;\n\n\t\t    TensorTrain result(other.ndim(),&dims.front());\n\t\t    if (other.zero_rank) return result;\n\t\t    const long nd=other.ndim();\n\t\t    result.zero_rank=other.zero_rank;\n\t\t    result.core.resize(nd);\n\n\t\t    // special treatment for first and last core tensor\n\t\t    // slice dim only, keep ranks\n\t\t    result.core[0]=copy(other.core[0](s[0],_));\n\t\t    for (long i=1; i<nd-1; ++i) {\n\t\t        result.core[i]=copy(other.core[i](_,s[i],_));\n\t\t    }\n\n\t\t    if (other.core.size()>1) result.core[nd-1]=copy(other.core[nd-1](_,s[nd-1]));\n\t\t    return result;\n\t\t}\n\n\t\t/// decompose the input tensor into a TT representation\n\n\t\t/// @param[in]\tt\t\ttensor in full rank\n\t\t/// @param[in]\teps\t\tthe precision threshold\n\t\t/// @param[in]\tdims\tthe tt structure\n\t\tvoid decompose(const Tensor<T>& t, double eps,\n\t\t\t\tconst std::vector<long>& dims) {\n\n\t\t\tcore.resize(dims.size());\n\t\t\teps=eps/sqrt(dims.size()-1);\t// error is relative\n\n\t\t\t// the maximum rank of the SVD decompositions\n\t\t\tlong Udim0=1;\n\t\t\tlong rmax=1;\n\t\t\tfor (long i=0; i<dims.size(); ++i) {\n\t\t\t\tUdim0*=dims[i];\n\t\t\t\trmax=std::max(rmax,std::min(Udim0,t.size()/Udim0));\n\t\t\t}\n\n\t\t\tlong rmax1=1;\n\t\t\tlong rmax2=1;\n\t\t\tlong n1=1, n2=1;\n\t\t\tlong lwork=0;\n\t\t\tfor (int i=0, j=dims.size()-1; i<=j; ++i, --j) {\n\t\t\t\trmax1*=dims[i];\n\t\t\t\trmax2*=dims[j];\n\n\t\t\t\t// work array for dgesvd\n\t\t\t\tn1*=dims[i];\n\t\t\t\tlong m1=t.size()/dims[i];\n\t\t\t\tn2*=dims[j];\n\t\t\t\tlong m2=t.size()/dims[j];\n\t\t\t\tlong max1=std::max(n1,m1);\n\t\t\t\tlong max2=std::max(n2,m2);\n\t\t\t\tlong min1=std::min(n1,m1);\n\t\t\t\tlong min2=std::min(n2,m2);\n\n\t\t\t\tlwork=std::max(lwork,std::max(3*min1+max1,5*min1));\n\t\t\t\tlwork=std::max(lwork,std::max(3*min2+max2,5*min2));\n\t\t\t}\n\n\t\t\t// these are max dimensions, so we can avoid frequent reallocation\n\t\t\tTensor<T> u(rmax1*rmax2);\n\t\t\tTensor<T> dummy;\n\t\t\tTensor< typename Tensor<T>::scalar_type > s(rmax);\n\n\t\t\t// the dimension of the remainder tensor; will be cut down in each iteration\n\t\t\tlong vtdim=t.size();\n\n\t\t\t// c will be destroyed, and assignment is only shallow, so need to deep copy\n\t\t\tTensor<T> c=madness::copy(t);\n\n\t\t\t// work array for dgesvd\n\t\t\tTensor<T> work(lwork);\n\n\n\t\t\t// this keeps track of the ranks\n\t\t\tstd::vector<long> r(dims.size()+1,0l);\n\t\t\tr[0] = r[dims.size()] = 1;\n\n\t\t\tfor (std::size_t d=1; d<dims.size(); ++d) {\n\n\t\t\t\t// the core tensors will have dimensions c(rank_left,k,rank_right)\n\t\t\t\t// or for lapack's purposes c(d1,rank_right)\n\t\t\t\tconst long k=dims[d-1];\n\t\t\t\tconst long d1=r[d-1]*k;\n\t\t\t\tc=c.reshape(d1,c.size()/d1);\n\t\t\t\tconst long rmax=std::min(c.dim(0),c.dim(1));\n\t\t\t\tvtdim=vtdim/k;\n\n\t\t\t\t// testing\n#if 0\n\t\t\t\t// c will be destroyed upon return\n\t\t\t\tTensor<T> aa=copy(c);\n#endif\n\t\t\t\t// The svd routine assumes lda=a etc. Pass in a flat tensor and reshape\n\t\t\t\t// and slice it after processing.\n\t\t\t\tu=u.flat();\n\t\t\t\tsvd_result(c,u,s,dummy,work);\n\n\t\t\t\t// this is rank_right\n\t\t\t\tr[d]=SRConf<T>::max_sigma(eps,rmax,s)+1;\n\t\t\t\tconst long rank=r[d];\n\n\t\t\t\t// this is for testing\n#if 0\n\t\t\t\tif (0) {\n\t\t\t\t\tTensor<T> uu=(u(Slice(0,c.dim(0)*rmax-1))).reshape(c.dim(0),rmax);\n\t\t\t\t\tTensor<T> vtt=copy(c(Slice(0,rmax-1),_));\n\t\t\t\t\tTensor<T> b(d1,vtdim);\n\t\t\t\t\tfor (long i=0; i<c.dim(0); ++i)\n\t\t\t\t\t\tfor (long j=0; j<c.dim(1); ++j)\n\t\t\t\t\t\t\tfor (long k=0; k<rmax; ++k)\n\t\t\t\t\t\t\t\tb(i,j) += uu(i,k) * T(s(k)) * vtt(k,j);\n\t\t\t\t\tb -= aa;\n\t\t\t\t\tprint(\"b.conforms c\",b.conforms(c));\n\t\t\t\t\tprint(\"early error:\",b.absmax());\n\t\t\t\t}\n#endif\n\n\t\t\t\t//        U = Tensor<T>(m,rmax);\n\t\t\t\t//        VT = Tensor<T>(rmax,n);\n\n\t\t\t\t// handle rank=0 explicitly\n\t\t\t\tif (r[d]) {\n\n\t\t\t\t\t// done with this dimension -- slice and deep-copy\n\t\t\t\t\tcore[d-1]=madness::copy((u(Slice(0,c.dim(0)*rmax-1)))\n\t\t\t\t\t\t\t.reshape(c.dim(0),rmax)(_,Slice(0,rank-1)));\n\t\t\t\t\tcore[d-1]=core[d-1].reshape(r[d-1],k,r[d]);\n\n\t\t\t\t\t// continue with the next dimension\n\t\t\t\t\tc=c(Slice(0,rank-1),_);\n\n\t\t\t\t\tfor (int i=0; i<rank; ++i) {\n\t\t\t\t\t\tfor (int j=0; j<c.dim(1); ++j) {\n\t\t\t\t\t\t\tc(i,j)*=s(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (d == dims.size()-1) core[d]=c;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tzero_rank = true;\n\t\t\t\t\tcore[d-1] = Tensor<T>(r[d-1],k,long(0));\n\t\t\t\t\t// iterate through the rest -- fast forward\n\t\t\t\t\tfor(++d; d<dims.size(); ++d) {\n\t\t\t\t\t\tconst long k=dims[d-1];\n\t\t\t\t\t\tcore[d-1] = Tensor<T>(long(0),k,long(0));\n\t\t\t\t\t}\n\t\t\t\t\tcore[dims.size()-1] = Tensor<T>(long(0),dims[dims.size()-1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcore[0]=core[0].fusedim(0);\n\n\n\t\t}\n\n\n\t\t/// turn this into an empty tensor with all cores properly shaped\n\t\tvoid zero_me() {\n\t\t    *this=TensorTrain<T>(this->ndim(),this->dims());\n\t\t}\n\n        /// turn this into an empty tensor with all cores properly shaped\n        void zero_me(const std::vector<long>& dim) {\n            *this=TensorTrain<T>(dim);\n        }\n\n        /// assign a number to this tensor\n        TensorTrain<T>& operator=(const T& number) {\n\n            // tensor will have ranks = 1 all over\n            core[0]=Tensor<T>(dim(0),1);\n            for (int i=1; i<ndim()-1; ++i) core[i]=Tensor<T>(1,dim(i),1);\n            if (ndim()>1) core[ndim()-1]=Tensor<T>(1,dim(ndim()-1));\n\n            core[0]=number;\n            for (int i=1; i<ndim(); ++i) core[i]=1.0;\n\n            zero_rank=false;\n            return *this;\n        }\n\n\t\t/// return this multiplied by a scalar\n\n\t\t/// @return new tensor\n\t\tTensorTrain<T> operator*(const T& factor) const {\n\t\t    TensorTrain result=copy(*this);\n\t\t    result.scale(factor);\n\t\t    return result;\n\t\t}\n\n\t\t/// inplace addition of two Tensortrains; will increase ranks of this\n\n\t\t/// inefficient if many additions are performed, since it requires\n\t\t/// many calls of new.\n\t\t/// @param[in]\trhs\ta TensorTrain to be added\n\t\tTensorTrain<T>& operator+=(const TensorTrain<T>& rhs) {\n\t\t    gaxpy(1.0,rhs,1.0);\n\t\t    return *this;\n\t\t}\n\n        /// inplace subtraction of two Tensortrains; will increase ranks of this\n\n        /// inefficient if many subtractions are performed, since it requires\n        /// many calls of new.\n        /// @param[in]  rhs a TensorTrain to be added\n        TensorTrain<T>& operator-=(const TensorTrain<T>& rhs) {\n            gaxpy(1.0,rhs,-1.0);\n            return *this;\n        }\n\n\t\t/// Inplace generalized saxpy ... this = this*alpha + other*beta\n        TensorTrain<T>& gaxpy(T alpha, const TensorTrain<T>& rhs, T beta) {\n\n\t\t\t// make sure dimensions conform\n\t\t\tMADNESS_ASSERT(this->ndim()==rhs.ndim());\n\n\t\t\tif (this->zero_rank or (alpha==0.0)) {\n\t\t\t\t*this=rhs*beta;\n\t\t\t} else if (rhs.zero_rank or (beta==0.0)) {\n\t\t\t\tscale(alpha);\n\t\t\t} else if (ndim()==1) {     // simple algorithm for ndim=1\n\t\t\t    core[0].gaxpy(alpha,rhs.core[0],beta);\n\t\t\t} else {\n\n\t\t\t\t// special treatment for first border cores (k,r1)\n\n\t\t\t    // alpha and beta are only included in the first core(!)\n\t\t\t\t{\n\t\t\t\t\tlong k=core[0].dim(0);\n\t\t\t\t\tlong r1_this=core[0].dim(1);\n\t\t\t\t\tlong r1_rhs=rhs.core[0].dim(1);\n\t\t\t\t\tTensor<T> core_new(k,r1_this+r1_rhs);\n\t\t\t\t\tcore_new(_,Slice(0,r1_this-1))=alpha*core[0];\n\t\t\t\t\tcore_new(_,Slice(r1_this,r1_this+r1_rhs-1))=beta*rhs.core[0];\n\t\t\t\t\tcore[0]=core_new;\n\t\t\t\t}\n\n\t\t\t\t// interior cores (r0,k,r1)\n\t\t\t\tfor (std::size_t i=1; i<core.size()-1; ++i) {\n\t\t\t\t\tMADNESS_ASSERT(core[i].ndim()==3 or i==core.size()-1);\n\t\t\t\t\tlong r0_this=core[i].dim(0);\n\t\t\t\t\tlong r0_rhs=rhs.core[i].dim(0);\n\t\t\t\t\tlong k=core[i].dim(1);\n\t\t\t\t\tlong r1_this=core[i].dim(2);\n\t\t\t\t\tlong r1_rhs=rhs.core[i].dim(2);\n\t\t\t\t\tTensor<T> core_new(r0_this+r0_rhs,k,r1_this+r1_rhs);\n\t\t\t\t\tcore_new(Slice(0,r0_this-1),_,Slice(0,r1_this-1))=core[i];\n\t\t\t\t\tcore_new(Slice(r0_this,r0_this+r0_rhs-1),_,Slice(r1_this,r1_this+r1_rhs-1))=rhs.core[i];\n\t\t\t\t\tcore[i]=core_new;\n\t\t\t\t}\n\n\t\t\t\t// special treatment for last border core (r0,k)\n\t\t\t\t{\n\t\t\t\t\tstd::size_t d=core.size()-1;\n\t\t\t\t\tlong r0_this=core[d].dim(0);\n\t\t\t\t\tlong r0_rhs=rhs.core[d].dim(0);\n\t\t\t\t\tlong k=core[d].dim(1);\n\t\t\t\t\tTensor<T> core_new(r0_this+r0_rhs,k);\n\t\t\t\t\tcore_new(Slice(0,r0_this-1),_)=core[d];\n\t\t\t\t\tcore_new(Slice(r0_this,r0_this+r0_rhs-1),_)=rhs.core[d];\n\t\t\t\t\tcore[d]=core_new;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (not verify()) MADNESS_EXCEPTION(\"ranks in TensorTrain inconsistent\",1);\n\t\t\treturn *this;\n\t\t}\n\n        /// Inplace generalized saxpy with slices and without alpha\n\n        /// return this = this(s1) + other(s2) * beta\n        TensorTrain<T>& gaxpy(const std::array<Slice,TENSOR_MAXDIM>& s1,\n                const TensorTrain<T>& rhs, T beta, const std::array<Slice,TENSOR_MAXDIM>& s2) {\n\n            // make sure dimensions conform\n            MADNESS_ASSERT(this->ndim()==rhs.ndim());\n\n            if (rhs.zero_rank or (beta==0.0)) return *this;\n            if (this->zero_rank) {\n               \tcore.resize(ndim(),Tensor<T>());\n            }\n\t\t\t// special treatment for first border cores (k,r1)\n\n\t\t\t// alpha and beta are only included in the first core(!)\n\t\t\t{\n\t\t\t\tlong k=dim(0);  // this is max dimension: k>=slice1; k>=slice2\n\t\t\t\tlong r1_this= zero_rank ? 0 : core[0].dim(1);\n\t\t\t\tlong r1_rhs=rhs.core[0].dim(1);\n\n\t\t\t\tTensor<T> core_new(k,r1_this+r1_rhs);\n\t\t\t\tif (r1_this>0) core_new(_,Slice(0,r1_this-1))=core[0];\n\t\t\t\tif (r1_rhs>0)  core_new(s1[0],Slice(r1_this,r1_this+r1_rhs-1))=beta*rhs.core[0](s2[0],_);\n\t\t\t\tcore[0]=core_new;\n\t\t\t}\n\n\t\t\t// interior cores (r0,k,r1)\n\t\t\tfor (std::size_t i=1; i<core.size()-1; ++i) {\n\t\t\t\tMADNESS_ASSERT(zero_rank or core[i].ndim()==3 or i==core.size()-1);\n\t\t\t\tlong r0_this= zero_rank ? 0 : core[i].dim(0);\n\t\t\t\tlong r0_rhs=rhs.core[i].dim(0);\n\t\t\t\tlong k=dim(i);\n\t\t\t\tlong r1_this=zero_rank ? 0 : core[i].dim(2);\n\t\t\t\tlong r1_rhs=rhs.core[i].dim(2);\n\t\t\t\tTensor<T> core_new(r0_this+r0_rhs,k,r1_this+r1_rhs);\n\t\t\t\tif (r1_this>0) core_new(Slice(0,r0_this-1),_,Slice(0,r1_this-1))=core[i];\n\t\t\t\tif (r1_rhs>0)  core_new(Slice(r0_this,r0_this+r0_rhs-1),s1[i],Slice(r1_this,r1_this+r1_rhs-1))=rhs.core[i](_,s2[i],_);\n\t\t\t\tcore[i]=core_new;\n\t\t\t}\n\n\t\t\t// special treatment for last border core (r0,k)\n\t\t\t{\n\t\t\t\tstd::size_t d=core.size()-1;\n\t\t\t\tlong r0_this= zero_rank ? 0 : core[d].dim(0);\n\t\t\t\tlong r0_rhs=rhs.core[d].dim(0);\n\t\t\t\tlong k=dim(d);\n\t\t\t\tTensor<T> core_new(r0_this+r0_rhs,k);\n\t\t\t\tif (r0_this>0) core_new(Slice(0,r0_this-1),_)=core[d];\n\t\t\t\tif (r0_rhs>0)  core_new(Slice(r0_this,r0_this+r0_rhs-1),s1[d])=rhs.core[d](_,s2[d]);\n\t\t\t\tcore[d]=core_new;\n\t\t\t}\n            if (not rhs.zero_rank) zero_rank=false;\n            if (not verify()) MADNESS_EXCEPTION(\"ranks in TensorTrain inconsistent\",1);\n            return *this;\n        }\n\n        /// compute the Hadamard product of two TensorTrains\n\n        /// see Sec. 4.2 of the TT paper\n        /// @return *this with the ranks of the input tensors multiplied!\n        TensorTrain<T>& emul(const TensorTrain<T>& other) {\n\n            // consistency checks\n            MADNESS_ASSERT(ndim()==other.ndim());\n            for (int i=0; i<ndim(); ++i) MADNESS_ASSERT(dim(i)==other.dim(i));\n\n            // set up the result tensor\n            std::vector<long> cranks(ndim()-1);       // ranks of result C\n            for (int i=0; i<ndim()-1; ++i) cranks[i]=ranks(i)*other.ranks(i);\n\n            // check for large sizes\n            for (int i=0; i<ndim()-2; ++i) {\n                long size=cranks[i]*cranks[i+1]*dim(i);\n            \tMADNESS_CHECK_THROW(size<10000000,\"emul in TensorTrain too large -- use full rank tensor\");\n            }\n            TensorTrain result(ndim(),dims());\n            result.core.resize(ndim());\n\n            // fast return for zero ranks\n            if (zero_rank or other.zero_rank) {\n                ;\n            } else if (ndim()==1) {\n                // fast return for one core only (all ranks equal 1)\n                result.core[0]=copy(core[0]);\n                result.core[0].emul(other.core[0]);\n\n            } else {\n                result.zero_rank=false;\n                // compute outer product for each core for each k\n\n                // special treatment for first core\n                result.core[0]=Tensor<T>(dim(0),cranks[0]);\n                for (int k=0; k<dim(0); ++k) {\n                    Tensor<T> a1=core[0](Slice(k,k),_);\n                    Tensor<T> b1=other.core[0](Slice(k,k),_);\n                    result.core[0](Slice(k,k),_)=outer(a1,b1).reshape(1,cranks[0]);\n                    // before reshape rhs has dimensions (1, r1, 1, r1')\n                    // after reshape rhs has dimensions (1, r1*r1')\n                }\n\n                for (int i=1; i<ndim()-1; ++i) {\n                    result.core[i]=Tensor<T>(cranks[i-1],dim(i),cranks[i]);\n                    for (int k=0; k<dim(i); ++k) {\n                        Tensor<T> a1=core[i](_,Slice(k,k),_).fusedim(1);    // (r1,r2)\n                        Tensor<T> b1=other.core[i](_,Slice(k,k),_).fusedim(1);  // (r1',r2')\n                        Tensor<T> tmp=copy(outer(a1,b1).swapdim(1,2));  // make contiguous\n                        result.core[i](_,Slice(k,k),_)=tmp.reshape(cranks[i-1],1,cranks[i]);\n                        // before swap/fuse/splitdim rhs has dimensions (r1, r2, r1', r2')\n                        // after fusedim/splitdim rhs has dimensions (r1*r1', 1, r2*r2')\n                    }\n                }\n\n                // special treatment for last core\n                const long n=ndim()-1;\n                result.core[n]=Tensor<T>(cranks[n-1],dim(n));\n                for (int k=0; k<dim(n); ++k) {\n                    Tensor<T> a1=core[n](_,Slice(k,k));\n                    Tensor<T> b1=other.core[n](_,Slice(k,k));\n                    result.core[n](_,Slice(k,k))=outer(a1,b1).reshape(cranks[n-1],1);\n                    // before reshape rhs has dimensions (r1,1, r1',1)\n                    // after reshape rhs has dimensions (r1*r1', 1)\n\n                }\n            }\n            *this=result;\n            return *this;\n        }\n\n\n\n\t\t/// merge two dimensions into one\n\n\t\t/// merge dimension i and i+1 into new dimension i\n\t\t/// @param[in]\ti\tthe first dimension\n\t\tvoid fusedim(const long i) {\n\t\t\t// core_new = left * right\n\t\t\t// (r1, k1*k2, r3) = sum_r2 (r1, k1, r2) * (r2, k2, r3)\n\n\t\t\tfusedim_inplace(i);\n\t\t\t// determine index\n\t\t\tconst int index=core[i].ndim()-2;\t// (r-1, k, k, .. , k, r1)\n\n\t\t\tif (not zero_rank) {\n\t\t\t    core[i]=inner(core[i],core[i+1]);\n\t            core[i]=core[i].fusedim(index);\n\t\t\t} else {\n\t\t\t    if (i==0) { // (k1*k2, r2=0)\n\t                core[i]=Tensor<T>(core[i].dim(0)*core[i+1].dim(1),0l);\n\t\t\t    } else {                /// (r1=0, k1*k2, r2=0)\n                    core[i]=Tensor<T>(0l,core[i].dim(0)*core[i+1].dim(1),0l);\n\t\t\t    }\n\t\t\t}\n\n\t\t\t// shift all subsequent cores and remove the last one\n\t\t\tfor (std::size_t d=i+1; d<core.size()-1; ++d) core[d]=core[d+1];\n\t\t\tcore.pop_back();\n\n\t\t}\n\n        /// Returns new view/tensor splitting dimension \\c i as \\c dimi0*dimi1\n\t\t/// to produce conforming d+1 dimension tensor\n\n\t\t/// @param[in]  idim    the dimension to be split\n\t\t/// @param[in]  k1      new first dimension of idim\n\t\t/// @param[in]  k2      new second dimension of idim\n\t\t/// @param[in]  eps     threshold for SVD (choose negative to keep all terms)\n        /// @return new deep copy of this with split dimensions\n        TensorTrain<T> splitdim(long idim, long k1, long k2, const double eps) const {\n            // core_new = left * right\n            // (r1, k1*k2, r3) = sum_r2 (r1, k1, r2) * (r2, k2, r3)\n\n            // check for consistency\n            MADNESS_ASSERT(k1*k2==dim(idim));\n\n            if (zero_rank) {\n                std::vector<long> newdims(this->ndim()+1);\n                for (long i=0; i<idim; ++i) newdims[i]=this->dim(i);\n                newdims[idim]=k1;\n                newdims[idim+1]=k2;\n                for (long i=idim+1; i<ndim(); ++i) newdims[i+1]=dim(i);\n                return TensorTrain(newdims);\n            }\n\n            TensorTrain<T> result(ndim(),dims());\n            result.splitdim_inplace(idim,k1,k2);\n\n            long r1= (idim==0) ? 1 : ranks(idim-1);       // left-side rank\n            long r2= (idim==ndim()-1) ? 1 : ranks(idim);  // right-side rank\n            long k12=dim(idim);\n\n            Tensor<T> A=core[idim].reshape(r1*k1,r2*k2);\n            Tensor<T> U,VT;\n            Tensor< typename Tensor<T>::scalar_type > s(k12);\n            svd(A,U,s,VT);\n\n            // this is the new interior rank\n            long r=SRConf<T>::max_sigma(eps,std::min(A.dim(0),A.dim(1)),s)+1;\n\n            // handle rank=0 explicitly\n            if (r==0) {\n                std::vector<long> newdims(this->ndim()+1);\n                for (long i=0; i<idim; ++i) newdims[i]=this->dim(i);\n                newdims[idim]=k1;\n                newdims[idim+1]=k2;\n                for (long i=idim+1; i<ndim(); ++i) newdims[i+1]=dim(i);\n                return TensorTrain(newdims);\n            } else {\n\n                // convolve the singular values into the right singular vectors\n                for (int ii=0; ii<r; ++ii) {\n                    for (int j=0; j<VT.dim(1); ++j) {\n                        VT(ii,j)*=s(ii);\n                    }\n                }\n\n                for (long ii=0; ii<idim; ++ii) result.core.push_back(copy(core[ii]));\n                result.core.push_back(copy(U(_,Slice(0,r-1))).reshape(r1,k1,r));\n                result.core.push_back(copy(VT(Slice(0,r-1),_)).reshape(r,k2,r2));\n                for (long ii=idim+1; ii<ndim(); ++ii) result.core.push_back(core[ii]);\n\n                // post-processing\n                if (result.core.front().ndim()==3) result.core.front()=result.core.front().fusedim(0);\n                if (result.core.back().ndim()==3) result.core.back()=result.core.back().fusedim(1);\n                result.zero_rank=false;\n            }\n            return result;\n\n        }\n\n\t\t/// reconstruct this to a full representation\n\n\t\t/// @param[in]\tflat\treturn this in flat representation\n\t\t/// @return\tthis in full rank representation\n\t\tTensor<T> reconstruct(const bool flat=false) const {\n\n\t\t\tif (zero_rank) {\n\t\t\t\tif (flat) {\n\t\t\t\t\tlong size=1;\n\t\t\t\t\tfor (int i=1; i<this->ndim(); ++i) size*=core[i].dim(1);\n\t\t\t\t\treturn Tensor<T>(size);\n\t\t\t\t} else {\n\t\t\t\t\tMADNESS_ASSERT(_size>0);\n\t\t\t\t\treturn Tensor<T>(ndim(),dims());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tTensor<T> result=core.front();\n\t\t\ttypename std::vector<Tensor<T> >::const_iterator it;\n\n\t\t\tfor (it=++core.begin(); it!=core.end(); ++it) {\n\t\t\t\tresult=inner(result,*it);\n\t\t\t\tif (flat) result=result.fusedim(0);\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\t/// construct a two-mode representation (aka unnormalized SVD)\n\n\t\t/// @param[out] U The left singular vectors, ({i},rank)\n\t\t/// @param[out] VT The right singular vectors, (rank,{i})\n\t\t/// @param[out]\ts Vector holding 1's, (rank)\n\t\tvoid two_mode_representation(Tensor<T>& U, Tensor<T>& VT,\n\t\t        Tensor< typename Tensor<T>::scalar_type >& s) const {\n\n\t\t    // number of dimensions needs to be even\n\t\t    MADNESS_ASSERT(ndim()%2==0);\n\n\t\t    if (not zero_rank) {\n\t\t        typename std::vector<Tensor<T> >::const_iterator it1, it2;\n\t\t        U=core.front();\n\t\t        VT=core.back();\n\t\t        for (it1=++core.begin(), it2=--(--core.end()); it1<it2; ++it1, --it2) {\n\t\t            U=inner(U,*it1);\n\t\t            VT=inner(*it2,VT);\n\t\t        }\n\t\t        s=Tensor< typename Tensor<T>::scalar_type >(VT.dim(0));\n\t\t        s=1.0;\n\t\t    }\n\t\t    else {\n\t\t        if (ndim()==2) {\n                    U = Tensor<T>(dim(0),long(0));\n                    VT = Tensor<T>(long(0),dim(1));\n\t\t        } else if (ndim()==4) {\n                    U = Tensor<T>(dim(0),dim(1),long(0));\n                    VT = Tensor<T>(long(0),dim(2),dim(3));\n\t\t        } else if (ndim()==6) {\n                    U = Tensor<T>(dim(0),dim(1),dim(2),long(0));\n                    VT = Tensor<T>(long(0),dim(3),dim(4),dim(5));\n\t\t        } else {\n\t\t            MADNESS_EXCEPTION(\"ndim>6 in tensortrain::two_mode_representation\",1);\n\t\t        }\n\t\t        s = Tensor< typename Tensor<T>::scalar_type >(0l);\n\t\t    }\n\t\t}\n\n        /// recompress and truncate this TT representation\n\n        /// this in recompressed TT form with optimal rank\n        /// @param[in]  eps the truncation threshold\n\t\ttemplate<typename R=T>\n        typename std::enable_if<!std::is_arithmetic<R>::value, void>::type\n        truncate(double eps) {\n            MADNESS_EXCEPTION(\"no complex truncate in TensorTrain\",1);\n        }\n\n\n\t\t/// recompress and truncate this TT representation\n\n\t\t/// this in recompressed TT form with optimal rank\n\t\t/// @param[in]\teps\tthe truncation threshold\n\t\ttemplate<typename R=T>\n\t\ttypename std::enable_if<std::is_arithmetic<R>::value, void>::type\n\t\ttruncate(double eps) {\n\n\t\t    // fast return\n\t\t    if (zero_rank) return;\n\n\t\t    for (long i=0; i<core.size()-1; ++i) if (ranks(i)==0) zero_rank=true;\n\n\t\t    if (zero_rank) {\n\t\t        zero_me();\n\t\t        return;\n\t\t    }\n\n\t\t    eps=eps/sqrt(this->ndim());\n\t\t    if (not verify()) MADNESS_EXCEPTION(\"ranks in TensorTrain inconsistent\",1);\n\n\t\t    // right-to-left orthogonalization (line 4)\n\t\t    // get maximum rank and maximum k-value\n\t\t    // cores are (k0,r0), (r0,k1,r1), (r1,k2,r2), ... (rd-1,kd)\n\t\t    long rmax = core[0].dim(1);\n\t\t    long kmax = core[0].dim(0);\n\t\t    for(size_t i=1;i<core.size();i++){\n\t\t        rmax = std::max(rmax,core[i].dim(0));\n\t\t        kmax = std::max(kmax,core[i].dim(1));\n\t\t    }\n\n\t\t    Tensor<T> L;//L_buffer(rmax,rmax*kmax);\n\t\t    Tensor<T> lq_tau(rmax);\n\t\t    long max_rk = std::max(rmax,kmax);\n\t\t    long lq_work_dim = 2*max_rk+(max_rk+1)*64;\n\t\t    Tensor<T> lq_work(lq_work_dim);\n\t\t    Tensor<T> L_buffer(max_rk,max_rk);\n\t\t    long dimensions[TENSOR_MAXDIM];\n\t\t    // last tensor differs in dimension (first tensor also, but we dont reach it in the loop)\n\t\t    if(core.size()>1){\n\t\t        const long n_dim = core.back().ndim();\n\t\t        for (int i=0; i<n_dim; ++i) dimensions[i]=core.back().dim(i);\n\n\t\t        const long r0 = core.back().dim(0);\n\t\t        const long r1 = core.back().size()/r0;\n\t\t        core.back()=core.back().reshape(r0,r1);\n\n\t\t        // assignement of L with the L_buffer tensor\n\t\t        // works only if the bool for lq_result is set to false\n\t\t        {\n\t\t            long r_rows= (core.back().dim(1)>=core.back().dim(0)) ? core.back().dim(0) : core.back().dim(1);\n\t\t            long r_cols=core.back().dim(0);\n\t\t            L = L_buffer(Slice(0,r_cols-1),Slice(0,r_rows-1));\n\t\t            L = 0.0;\n\t\t        }\n\t\t        lq_result(core.back(),L,lq_tau,lq_work,false);\n\t\t        //Tensor<T> L = L_buffer(Slice(0,r0-1),Slice(0,r1-1));\n\n\t\t        dimensions[0]=std::min(dimensions[0],core.back().dim(0));\n\t\t        core.back()=core.back().reshape(n_dim,dimensions);\n\t\t        // multiply to the left (line 6)\n\t\t        core[core.size()-2]=inner(core[core.size()-2],L);\n\n\t\t    }\n\n\n\t\t    for (std::size_t d=core.size()-2; d>0; --d) {\n\n\t\t        // save tensor structure\n\t\t        const long ndim=core[d].ndim();\n\t\t        for (int i=0; i<ndim; ++i) dimensions[i]=core[d].dim(i);\n\n\t\t        // G(r0, k*r1)\n\t\t        const long r0=core[d].dim(0);\n\t\t        const long r1=core[d].size()/r0;\n\t\t        core[d]=core[d].reshape(r0,r1);\n\n\t\t        // decompose the core tensor (line 5)\n\t\t        //lq(core[d],L_buffer);  // might shrink the core\n\n\t\t        // assignement of L with the inner_buffer tensor\n\t\t        // works only if the bool for lq_result is set to false\n\t\t        {\n\t\t            long r_rows= (core[d].dim(1)>=core[d].dim(0)) ? core[d].dim(0) : core[d].dim(1);\n\t\t            long r_cols=core[d].dim(0);\n\t\t            L = L_buffer(Slice(0,r_cols-1),Slice(0,r_rows-1));\n\t\t            L = 0.0;\n\t\t        }\n\n\t\t        // workaround for LQ decomposition to avoid reallocations\n\t\t        //L_buffer = 0.0;\n\t\t        lq_tau = 0.0;\n\t\t        lq_work = 0.0;\n\t\t        lq_result(core[d],L,lq_tau,lq_work,false);\n\t\t        // slice L to the right size\n\t\t        //Tensor<T> L = L_buffer(Slice(0,r0-1),Slice(0,r1-1));\n\n\t\t        dimensions[0]=std::min(r0,core[d].dim(0));\n\t\t        core[d]=core[d].reshape(ndim,dimensions);\n\n\t\t        // multiply to the left (line 6)\n\t\t        core[d-1]=inner(core[d-1],L);\n\t\t    }\n\n\t\t    // svd buffer tensor (see svd_results in lapack.cc)\n\t\t    long m =rmax*kmax;\n\t\t    long n =rmax;\n\t\t    long k =std::min<long>(m,n);\n\t\t    long svd_buffer_size = std::max<long>(3*std::min<long>(m,n)+std::max<long>(m,n),5*std::min<long>(m,n)-4)*32;\n\t\t    Tensor<T> svd_buffer(svd_buffer_size);\n\t\t    Tensor<T> U_buffer(m,k);\n\t\t    Tensor<T> dummy;\n\t\t    Tensor< typename Tensor<T>::scalar_type > s_buffer(k);\n\n\t\t    // left-to-right SVD (line 9)\n\t\t    for (std::size_t d=0; d<core.size()-1; ++d) {\n\n\t\t        // save tensor structure\n\t\t        const long ndim=core[d].ndim();\n\t\t        for (int i=0; i<ndim; ++i) dimensions[i]=core[d].dim(i);\n\n\t\t        // reshape the core tensor (r0*k, r1)\n\t\t        long r1=core[d].dim(core[d].ndim()-1);\n\t\t        //\t\t\t\tlong r1=core[d].dim(1);\n\t\t        core[d]=core[d].reshape(core[d].size()/r1,r1);\n\n\t\t        Tensor<T> U,VT;\n\t\t        long ds=std::min(core[d].dim(0),core[d].dim(1));\n\t\t        s_buffer = 0.0;\n\t\t        //Tensor< typename Tensor<T>::scalar_type > s(ds)\n\t\t        Tensor< typename Tensor<T>::scalar_type > s = s_buffer(Slice(0,ds-1));\n\n\t\t        // decompose (line 10)\n\t\t        //svd(core[d],U,s,VT);\n\t\t        // get the dimensions of U and V\n\t\t        long du = core[d].dim(0);\n\t\t        long dv = core[d].dim(1);\n\t\t        U_buffer = 0.0;\n\t\t        svd_buffer = 0.0;\n\t\t        U_buffer = U_buffer.flat();\n\t\t        // VT is written on core[d] input\n\t\t        svd_result(core[d],U_buffer,s,dummy,svd_buffer);\n\n\t\t        // truncate the SVD\n\t\t        int r_truncate=SRConf<T>::max_sigma(eps,ds,s)+1;\n\t\t        if (r_truncate==0) {\n\t\t            zero_me();\n\t\t            return;\n\t\t        }\n\n\t\t        // make tensors contiguous\n\t\t        U=madness::copy(U_buffer(Slice(0,(du*ds)-1)).reshape(du,ds)(_,Slice(0,r_truncate-1)));\n\t\t        VT=madness::copy(core[d](Slice(0,r_truncate-1),Slice(0,dv-1)));\n\n\t\t        dimensions[ndim-1]=r_truncate;\n\t\t        core[d]=U.reshape(ndim,dimensions);\n\n\t\t        for (int i=0; i<VT.dim(0); ++i) {\n\t\t            for (int j=0; j<VT.dim(1); ++j) {\n\t\t                VT(i,j)*=s(i);\n\t\t            }\n\t\t        }\n\n\t\t        // multiply to the right (line 11)\n\t\t        core[d+1]=inner(VT,core[d+1]);\n\n\t\t    }\n\n\t\t    if (not verify()) MADNESS_EXCEPTION(\"ranks in TensorTrain inconsistent\",1);\n\t\t}\n\n//\t\t/// return the number of dimensions\n//\t\tlong ndim() const {return core.size();}\n\n\t\t/// return the number of coefficients in all core tensors\n\t\tlong size() const {\n\t\t\tif (zero_rank) return 0;\n\t\t\tlong n=0;\n\t\t\ttypename std::vector<Tensor<T> >::const_iterator it;\n\t\t\tfor (it=core.begin(); it!=core.end(); ++it) n+=it->size();\n\t\t\treturn n;\n\t\t}\n\n\t\t/// return the size of this instance, including static memory for vectors and such\n\t\tlong real_size() const {\n\t\t\tlong n=this->size()*sizeof(T);\n\t\t\tn+=core.size() * sizeof(Tensor<T>);\n\t\t\tn+=sizeof(*this);\n\t\t\treturn n;\n\t\t}\n\n//\t\t/// return the number of entries in dimension i\n//\t\tlong dim(const int i) const {\n//\t\t\tif (i==0) return core[0].dim(0);\n//\t\t\treturn core[i].dim(1);\n//\t\t}\n\n\t\t/// return the dimensions of this tensor\n//\t\tstd::vector<long> dims() const {\n//\t\t    std::vector<long> d(ndim());\n//            d[0]=core[0].dim(0);    // dim,rank\n//\t\t    for (long i=1; i<ndim(); ++i) d[i]=core[i].dim(1);  // rank,dim,rank\n//\t\t    return d;\n//\t\t}\n\n\t\t/// check that the ranks of all core tensors are consistent\n\t\tbool verify() const {\n\t\t    if (core.size()<2) return true; // no ranks\n\t\t    if (core[0].dim(1)!=core[1].dim(0)) return false;\n\t\t    for (int d=2; d<ndim(); ++d) {\n\t\t        if (core[d-1].dim(2)!=core[d].dim(0)) return false;\n\t\t    }\n\t\t    for (const Tensor<T>& c : core) {\n\t\t        int size=1;\n\t\t        for (int i=0; i<c.ndim(); ++i) size*=c.dim(i);\n\t\t        if (size!=c.size()) return false;\n\t\t        if (not c.iscontiguous()) return false;\n\t\t    }\n\t\t    return true;\n\t\t}\n\n\t\t/// if rank is zero\n\t\tbool is_zero_rank() const {return zero_rank;}\n\n\t\t/// return the TT ranks\n\t\tstd::vector<long> ranks() const {\n\t\t\tif (ndim()==0) return std::vector<long>(1,0);\n\t\t\tif (zero_rank) return std::vector<long>(ndim()-1,0);\n//\t\t\tMADNESS_ASSERT(is_tensor());\n\t\t\tstd::vector<long> r(core.size()-1);\n\t\t\tfor (std::size_t i=0; i<r.size(); ++i) r[i]=core[i+1].dim(0);\n\t\t\treturn r;\n\t\t}\n\n        /// return the TT ranks for dimension i (to i+1)\n       long ranks(const int i) const {\n            if (zero_rank) return 0;\n            if (i<core.size()-1) {\n                return core[i].dim(core[i].ndim()-1);\n            } else {\n                print(\"ndim \",ndim());\n                print(\"i    \",i);\n                MADNESS_EXCEPTION(\"requested invalid rank in TensorTrain\",1);\n                return 0;\n            }\n        }\n\n        /// returns the Frobenius norm\n        float_scalar_type normf() const {\n            return sqrt(float_scalar_type(std::abs(trace(*this))));\n        };\n\n        /// scale this by a number\n\n        /// @param[in]  fac the factor to multiply\n        /// @return *this * fac\n        void scale(T fac) {\n            if (not zero_rank and (core.size()>0)) core.front().scale(fac);\n        }\n\n        /// Returns a pointer to the internal data\n\n        /// @param[in]  ivec    index of core vector to which the return values points\n        T* ptr(const int ivec=0) {\n            if (core.size()) return core[ivec].ptr();\n            return 0;\n        }\n\n        /// Returns a pointer to the internal data\n\n        /// @param[in]  ivec    index of core vector to which the return values points\n        const T* ptr(const int ivec=0) const {\n            if (core.size()) return core[ivec].ptr();\n            return 0;\n        }\n\n        /// check if this is a tensor (r,k,r)\n        bool is_tensor() const {\n            if (ndim()>0) return (core[0].ndim()==2);\n            return false;\n        }\n\n        /// check if this is an operator (r,k',k,r)\n        bool is_operator() const {\n            return (!is_tensor());\n        }\n\n        /// convert this into a tensor representation (r,k,r)\n        TensorTrain<T>& make_tensor() {\n            if (is_tensor()) return *this;\n\n            long nd=this->ndim();\n            core[0]=core[0].fusedim(0);         // (k,k,r) -> (k,r)\n            core[nd-1]=core[nd-1].fusedim(1);   // (r,k,k) -> (r,k)\n            for (int i=1; i<nd-1; ++i) core[i]=core[i].fusedim(1);  // (r,k',k,r) -> (r,k,r)\n            return *this;\n\n        }\n\n        /// convert this into an operator representation (r,k',k,r)\n        TensorTrain<T>& make_operator() {\n            if (is_operator()) return *this;\n\n            long nd=this->ndim();\n\n            long k2=core[0].dim(0);\n            long k0=sqrt(k2);\n            MADNESS_ASSERT(k0*k0==k2);\n            MADNESS_ASSERT(core[0].ndim()==2);\n            core[0]=core[0].splitdim(0,k0,k0);         // (k*k,r) -> (k,k,r)\n\n            k2=core[nd-1].dim(1);\n            k0=sqrt(k2);\n            MADNESS_ASSERT(k0*k0==k2);\n            MADNESS_ASSERT(core[nd-1].ndim()==2);\n            core[nd-1]=core[nd-1].splitdim(1,k0,k0);   // (r,k*k) -> (r,k,k)\n\n            for (int i=1; i<nd-1; ++i) {\n                k2=core[i].dim(1);\n                k0=sqrt(k2);\n                MADNESS_ASSERT(k0*k0==k2);\n                MADNESS_ASSERT(core[i].ndim()==3);\n                core[i]=core[i].splitdim(1,k0,k0);  // (r,k*k,r) -> (r,k',k,r)\n            }\n            return *this;\n        }\n\n\n        /// reference to the internal core\n        Tensor<T>& get_core(const int i) {\n            MADNESS_ASSERT(i<ndim());\n            return core[i];\n        }\n\n        /// const reference to the internal core\n        const Tensor<T>& get_core(const int i) const {\n            MADNESS_ASSERT(i<ndim());\n            return core[i];\n        }\n\n        template <class Q>\n\t    typename std::enable_if<(TensorTypeData<T>::iscomplex or TensorTypeData<Q>::iscomplex),\n\t\tTENSOR_RESULT_TYPE(T,Q)>::type\n\t\ttrace(const TensorTrain<Q>& B) const {\n        \tMADNESS_EXCEPTION(\"no complex trace in tensortrain\",1);\n        }\n        /// Return the trace of two tensors, no complex conjugate involved\n\n        /// @return <this | B>\n        template <class Q>\n\t    typename std::enable_if<!(TensorTypeData<T>::iscomplex or TensorTypeData<Q>::iscomplex),\n\t\tTENSOR_RESULT_TYPE(T,Q)>::type\n\t\ttrace(const TensorTrain<Q>& B) const {\n            if (TensorTypeData<T>::iscomplex) MADNESS_EXCEPTION(\"no complex trace in TensorTrain, sorry\",1);\n            if (TensorTypeData<Q>::iscomplex) MADNESS_EXCEPTION(\"no complex trace in TensorTrain, sorry\",1);\n\n            typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n\n            // alias\n            const TensorTrain<T>& A=*this;\n\n            MADNESS_ASSERT(A.ndim()==B.ndim());   // number of dimensions\n\n            // fast return\n            if (A.zero_rank or B.zero_rank) return resultT(0.0);\n            if (A.ndim()==1) {\n                return A.core[0].trace(B.core[0]);\n            }\n\n            // set up temporary tensors for intermediates\n            long size1=A.ranks(0)*B.ranks(0);                   // first contraction\n            long size2=B.ranks(ndim()-2)*A.dim(ndim()-1);       // last contraction\n\n            for (int d=1; d<A.ndim()-1; ++d) {\n                size1=std::max(size1,A.ranks(d)*B.ranks(d));\n                size2=std::max(size2,A.ranks(d)*B.ranks(d-1)*A.dim(d));\n            }\n            Tensor<resultT> tmp1(size1), tmp2(size2);       // scratch\n            Tensor<resultT> Aprime, AB;                     // for flat views of tmp\n\n            // loop over all dimensions but the last one\n            for (int d=0; d<A.ndim()-1; ++d) {\n\n                // contract cores to matrix AB(rank(A), rank(B))\n                // AB(ra1,rb1) = sum_(r0,i0) A(ra0,i0,ra1) B(rb0,i0,rb1)\n                // index dimension is the first one: core((r * i), r)\n\n                // calculate dimensions\n                long rA= (d==0) ? A.core[d].dim(1) : Aprime.dim(2);     //  r_d (A)\n                long rB= (d==0) ? B.core[d].dim(1) : B.core[d].dim(2);                           //  r_d (B)\n                MADNESS_ASSERT(rA*rB<=size1);\n                if (d>0) tmp1(Slice(0,rA*rB-1))=0.0;         // zero out old stuff\n\n//                Tensor<resultT> AB;\n                if (d==0) {\n//                    AB=inner(A.core[d],B.core[d],0,0);\n                    inner_result(A.core[d],B.core[d],0,0,tmp1);\n                } else {\n//                    AB=inner(Aprime.fusedim(0),B.core[d].fusedim(0),0,0);\n                    inner_result(Aprime.fusedim(0),B.core[d].fusedim(0),0,0,tmp1);\n                }\n                AB=tmp1(Slice(0,rA*rB-1)).reshape(rA,rB);\n\n                // contract temp matrix AB into core of A of dimension i+1\n                // into temp core A_i+1\n                // Atmp(rank(B1), i(2)) = sum_ rank(A1) ABi(rank(A1),rank(B1)) A.core[1](rank(A1),i(2),rank(A2))\n\n                // calculate dimensions\n                long d1=AB.dim(1);              //  r_d\n                long d2=A.core[d+1].dim(1);     //  i_d\n                long d3=A.core[d+1].dim(2);     //  r_{d+1}\n                MADNESS_ASSERT(d1*d2*d3<=size2);\n\n                // repeated zero-ing probably much faster than reallocation\n                //                Aprime=inner(AB,A.core[d+1],0,0);\n                if (d>0) tmp2(Slice(0,d1*d2*d3-1))=0.0;\n                inner_result(AB,A.core[d+1],0,0,tmp2);\n                Aprime=tmp2(Slice(0,d1*d2*d3-1)).reshape(d1,d2,d3);\n\n            }\n\n            // special treatment for the last dimension\n            resultT result=Aprime.trace(B.core[ndim()-1]);\n            return result;\n        }\n\npublic:\n        template <typename R, typename Q>\n        friend TensorTrain<TENSOR_RESULT_TYPE(R,Q)> transform(\n                const TensorTrain<R>& t, const Tensor<Q>& c);\n\n        template <typename R, typename Q>\n        friend TensorTrain<TENSOR_RESULT_TYPE(R,Q)> general_transform(\n                const TensorTrain<R>& t, const Tensor<Q> c[]);\n\n        template <typename R, typename Q>\n        friend TensorTrain<TENSOR_RESULT_TYPE(R,Q)> transform_dir(\n                const TensorTrain<R>& t, const Tensor<Q>& c, const int axis);\n\n        template <typename R, typename Q>\n        friend TensorTrain<TENSOR_RESULT_TYPE(R,Q)> outer(\n                const TensorTrain<R>& t1, const TensorTrain<Q>& t2);\n\n\t};\n\n\n\t/// transform each dimension with the same operator matrix\n\n    /// result(i,j,k...) <-- sum(i',j', k',...) t(i',j',k',...) c(i',i) c(j',j) c(k',k) ...\n    /// TODO: merge this with general_transform\n\ttemplate <class T, class Q>\n    TensorTrain<TENSOR_RESULT_TYPE(T,Q)> transform(const TensorTrain<T>& t,\n            const Tensor<Q>& c) {\n\n        typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n\n        // fast return if possible\n        if (t.zero_rank or (t.ndim()==0)) return TensorTrain<resultT>(t.ndim(),t.dims());\n\n        const long ndim=t.ndim();\n\n        TensorTrain<resultT> result;\n        result.zero_rank=false;\n        result.core.resize(ndim);\n        // special treatment for first core(i1,r1) and last core (rd-1, id)\n        result.core[0]=inner(c,t.core[0],0,0);\n        if (ndim>1) result.core[ndim-1]=inner(t.core[ndim-1],c,1,0);\n\n        // other cores have dimensions core(r1,i2,r2);\n\n        // set up scratch tensor\n        long size=0;\n        for (int d=1; d<ndim-1; ++d) size=std::max(size,t.core[d].size());\n        Tensor<resultT> tmp(size);\n\n        for (int d=1; d<ndim-1; ++d) {\n            long r1=t.core[d].dim(0);\n            long i2=t.core[d].dim(1);\n            long r2=t.core[d].dim(2);\n\n            // zero out old stuff from the scratch tensor\n            if (d>1) tmp(Slice(0,r1*i2*r2-1))=0.0;\n            inner_result(t.core[d],c,1,0,tmp);\n            result.core[d]=copy(tmp(Slice(0,r1*i2*r2-1)).reshape(r1,r2,i2).swapdim(1,2));\n        }\n        return result;\n    }\n\n\n    /// Transform all dimensions of the tensor t by distinct matrices c\n\n    /// \\ingroup tensor\n    /// Similar to transform but each dimension is transformed with a\n    /// distinct matrix.\n    /// \\code\n    /// result(i,j,k...) <-- sum(i',j', k',...) t(i',j',k',...) c[0](i',i) c[1](j',j) c[2](k',k) ...\n    /// \\endcode\n    /// The first dimension of the matrices c must match the corresponding\n    /// dimension of t.\n    template <class T, class Q>\n    TensorTrain<TENSOR_RESULT_TYPE(T,Q)> general_transform(const TensorTrain<T>& t,\n            const Tensor<Q> c[]) {\n\n        typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n\n        // fast return if possible\n        if (t.zero_rank or (t.ndim()==0)) return TensorTrain<resultT>(t.ndim(),t.dims());\n\n        const long ndim=t.ndim();\n\n        TensorTrain<resultT> result;\n        result.zero_rank=false;\n        result.core.resize(ndim);\n        // special treatment for first core(i1,r1) and last core (rd-1, id)\n        result.core[0]=inner(c[0],t.core[0],0,0);\n        if (ndim>1) result.core[ndim-1]=inner(t.core[ndim-1],c[ndim-1],1,0);\n\n        // other cores have dimensions core(r1,i2,r2);\n\n        // set up scratch tensor\n        long size=0;\n        for (int d=1; d<ndim-1; ++d) size=std::max(size,t.core[d].size());\n        Tensor<resultT> tmp(size);\n\n        for (int d=1; d<ndim-1; ++d) {\n            long r1=t.core[d].dim(0);\n            long i2=t.core[d].dim(1);\n            long r2=t.core[d].dim(2);\n\n            // zero out old stuff from the scratch tensor\n            if (d>1) tmp(Slice(0,r1*i2*r2-1))=0.0;\n            inner_result(t.core[d],c[d],1,0,tmp);\n            result.core[d]=copy(tmp(Slice(0,r1*i2*r2-1)).reshape(r1,r2,i2).swapdim(1,2));\n        }\n        return result;\n    }\n\n    /// Transforms one dimension of the tensor t by the matrix c, returns new contiguous tensor\n\n    /// \\ingroup tensor\n    /// \\code\n    /// transform_dir(t,c,1) = r(i,j,k,...) = sum(j') t(i,j',k,...) * c(j',j)\n    /// \\endcode\n    /// @param[in] t Tensor to transform (size of dimension to be transformed must match size of first dimension of \\c c )\n    /// @param[in] c Matrix used for the transformation\n    /// @param[in] axis Dimension (or axis) to be transformed\n    /// @result Returns a new tensor train\n    template <class T, class Q>\n    TensorTrain<TENSOR_RESULT_TYPE(T,Q)> transform_dir(const TensorTrain<T>& t,\n            const Tensor<Q>& c, const int axis) {\n\n        typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n\n        // fast return if possible\n        if (t.zero_rank or (t.ndim()==0)) return TensorTrain<resultT>(t.ndim(),t.dims());\n\n        const long ndim=t.ndim();\n        MADNESS_ASSERT(axis<ndim and axis>=0);\n        MADNESS_ASSERT(c.ndim()==2);\n\n        TensorTrain<resultT> result=copy(t);\n\n        if (axis==0) {\n            result.core[0]=inner(c,t.core[0],0,0);\n        } else if (axis==ndim-1) {\n            result.core[ndim-1]=inner(t.core[ndim-1],c,1,0);\n        } else {\n            Tensor<resultT> tmp=inner(t.core[axis],c,1,0);  // G~(r1,r2,i')\n            result.core[axis]=copy(tmp.swapdim(1,2));\n        }\n        return result;\n\n    }\n\n\n    /// apply an operator in TT format on a tensor in TT format\n\n    /// @param[in]  op  operator in TT format ..(r_1,k',k,r_2)..\n    /// @param[in]  t   tensor in TT format  ..(r_1,k',r_2)..\n    /// the result tensor will be\n    /// .. (r_1,k,r_2) = \\sum_k' ..(r_1,k',k,r_2)..  ..(r_1,k',r_2)..\n    /// during the apply a rank reduction will be performed\n    /// 2*ndim allocates are needed\n    template <class T, class Q>\n    TensorTrain<TENSOR_RESULT_TYPE(T,Q)> apply(const TensorTrain<T>& op,\n            const TensorTrain<Q>& t, const double thresh) {\n\n        typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n        MADNESS_ASSERT(op.ndim()==t.ndim());\n\n        const long nd=t.ndim();\n\n        // need to add special cases for low dimensions\n        MADNESS_ASSERT(nd>2);\n\n        std::vector<Tensor<resultT> > B(t.ndim());  // will be the result cores\n\n        // set up scratch tensors\n        long maxk=0;           // max dimension of the tensor t\n        long maxr_t=1;         // max rank of the input tensor t\n        long maxr_op=1;        // max rank of the operator op\n        for (int i=0; i<nd-1; ++i) {\n            maxk=std::max(maxk,t.dim(i));\n            maxr_t=std::max(t.ranks(i),maxr_t);\n            maxr_op=std::max(op.ranks(i),maxr_op);\n        }\n\n        long maxr_r=1;           // max rank of the result tensor\n        for (int i=0, j=nd-1; i<j; ++i, --j) {\n            maxr_r*=t.dim(i);\n        }\n\n        long maxn=0, maxm=0;\n//        {\n            long R11=t.dim(0);         // max final ranks\n            long rR=R11*t.ranks(1);      // R1 r2\n            long maxR=R11, maxr=t.ranks(1);            //\n            for (int i=1; i<nd-2; ++i) {\n                long k=t.dim(i);\n                R11*=k;     // max final ranks\n                R11=std::min(R11,maxr_r);\n                long r2=t.ranks(i+1);   // initial ranks\n                if (rR<R11*r2) {\n                    maxR=std::max(maxR,R11);\n                    maxr=std::max(maxr,r2);\n                    rR=R11*r2;\n                }\n            }\n            // max matrix dimensions to be svd'ed\n            maxn=maxR*maxk;\n            maxm=maxr_op*maxr;\n//        }\n\n\n        if (maxm*maxn>5e7) {\n            print(\"huge scratch spaces!! \",maxn*maxm/1024/1024,\"MByte\");\n        }\n        long lscr=std::max(3*std::min(maxm,maxn)+std::max(maxm,maxn),\n                5*std::min(maxm,maxn)) + maxn*maxm;\n        Tensor<resultT> scr(lscr);   // scratch\n        Tensor< typename Tensor<T>::scalar_type > s(std::min(maxn,maxm));\n\n        // scratch space for contractions\n        Tensor<resultT> scr3(2*maxn*maxm);\n        Tensor<resultT> scr1=scr3(Slice(0,maxn*maxm-1));\n        Tensor<resultT> scr2=scr3(Slice(maxn*maxm,-1));\n\n\n        // contract first core\n        const long r0=t.ranks(0l);\n        const long q0=op.get_core(0).dim(2);\n        const long k0=t.dim(0);\n        inner_result(op.get_core(0),t.get_core(0),0,0,scr2);\n        Tensor<resultT> AC=scr2(Slice(0,r0*q0*k0-1)).reshape(k0,r0*q0);\n\n        // SVD on first core, skip small singular values\n        long R=rank_revealing_decompose(AC,B[0],thresh,s,scr1);\n        if (R==0) return TensorTrain<resultT>(t.ndim(),t.dims());    // fast return for zero ranks\n        B[0]=B[0].reshape(k0,R);\n\n        // AC has dimensions R1,(q1,r1)\n        Tensor<resultT> VT=AC.reshape(R,q0,r0);\n\n        // loop over all dimensions 1,..,nd-1\n        for (int d=1; d<nd; ++d) {\n\n            // alias\n            Tensor<T> C=t.get_core(d);\n            Tensor<T> A=op.get_core(d);\n\n            // alias dimensions\n            long R1=VT.dim(0);        // left rank of the result tensor\n            long q1=A.dim(0);         // left rank of the operator\n            long k=C.dim(1);          // true for d>0\n            long r2=1;                // right rank of the input tensor, true for d=nd-1\n            long q2=1;                // right rank of the operator, true for d=nd-1\n            if (d<nd-1) {\n                r2=C.dim(2);          // right rank of the input tensor, true for d<nd-1\n                q2=A.dim(3);          // right rank of the operator\n            }\n\n            // contract VT into the next core\n            Tensor<resultT> VC=scr1(Slice(0,R1*q1*k*r2-1));\n            VC(Slice(0,R1*q1*k*r2-1))=resultT(0.0);         // zero out result tensor\n            inner_result(VT,C,-1,0,VC);          // VT(R1,q1,r1) * C(r1,k',r2)\n\n            // contract A into VC (R,q,k,r2)\n            VC=VC.reshape(R1,q1*k,r2);           // VC(R,(q,k),r2)\n            A=A.fusedim(0);                      // A((q1,k),k,q2);\n            Tensor<resultT> AVC=scr2(Slice(0,R1*q2*k*r2-1));\n            AVC(Slice(0,R1*q2*k*r2-1))=resultT(0.0);        // zero out result tensor\n            inner_result(VC,A,1,0,AVC);          // AVC(R1,r2,k,q2)\n            AVC=AVC.reshape(R1,r2,k,q2);\n\n            // AVC is the final core if we have reached the end of the tensor train\n            if (d==nd-1) {\n                B[d]=copy(AVC.reshape(R1,k));\n                break;\n            }\n\n            // SVD on current core\n            AVC=copy(AVC.cycledim(2,1,3));       // AVC(R,k,q2,r2); deep copy necessary\n\n            MADNESS_ASSERT(AVC.dim(0)==R1);\n            MADNESS_ASSERT(AVC.dim(1)==k);\n            MADNESS_ASSERT(AVC.dim(2)==q2);\n\n            AVC=AVC.reshape(R1*k,q2*r2);\n            long R2=rank_revealing_decompose(AVC,B[d],thresh,s,scr1);\n            if (R2==0) return TensorTrain<resultT>(t.ndim(),t.dims());    // fast return for zero ranks\n            B[d]=B[d].reshape(R1,k,R2);\n            VT=AVC.reshape(R2,q2,r2);\n        }\n\n        TensorTrain<T> result(B);\n        return result;\n\n    }\n\n\n    /// compute the n-D identity operator with k elements per dimension\n    template<typename T>\n    TensorTrain<T> tt_identity(const long ndim, const long k) {\n        Tensor<T> id(k,k);\n        for (int i=0; i<k; ++i) id(i,i)=1.0;\n        id=id.reshape(1,k,k,1);\n        std::vector<Tensor<T> > cores(ndim,id);\n        TensorTrain<T> result(cores);\n        if (ndim>1) {\n            result.get_core(0)=result.get_core(0).reshape(k,k,1);\n            result.get_core(ndim-1)=result.get_core(ndim-1).reshape(1,k,k);\n        } else {\n            result.get_core(0)=result.get_core(0).reshape(k,k);\n        }\n        return result;\n    }\n\n\n    /// computes the outer product of two tensors\n\n    /// result(i,j,...,p,q,...) = left(i,k,...)*right(p,q,...)\n    /// @result Returns a new tensor train\n    template <class T, class Q>\n    TensorTrain<TENSOR_RESULT_TYPE(T,Q)> outer(const TensorTrain<T>& t1,\n            const TensorTrain<Q>& t2) {\n\n        typedef TENSOR_RESULT_TYPE(T,Q) resultT;\n\n\n        // fast return if possible\n        if (t1.zero_rank or t2.zero_rank) {\n            // compute new dimensions\n            std::vector<long> dims(t1.ndim()+t2.ndim());\n            for (int i=0; i<t1.ndim(); ++i) dims[i]=t1.dim(i);\n            for (int i=0; i<t2.ndim(); ++i) dims[t1.ndim()+i]=t2.dim(i);\n\n            return TensorTrain<resultT>(dims);\n        }\n\n        TensorTrain<resultT> result;\n        for (int i=0; i<t1.ndim(); ++i) result.core.push_back(copy(t1.core[i]));\n        for (int i=0; i<t2.ndim(); ++i) result.core.push_back(copy(t2.core[i]));\n\n        // reshape the new interior cores\n        long core_dim=t1.core.back().ndim();       // 2 for tensors, 3 for operators\n        long k1=t1.core.back().dim(core_dim-1);    // (r,k) for tensors, (r,k',k) for operators\n        long k2=t2.core.front().dim(0);\n        result.core[t1.ndim()-1]=result.core[t1.ndim()-1].splitdim(core_dim-1,k1,1);\n        result.core[t1.ndim()]=result.core[t1.ndim()].splitdim(0,1,k2);\n        result.zero_rank=false;\n\n        return result;\n\n    }\n\n}\n\n#endif /* TENSORTRAIN_H_ */\n"
  },
  {
    "path": "src/madness/tensor/test_RandomizedMatrixDecomposition.cc",
    "content": "/*\n * test_RandomizedMatrixDecomposition.cc\n *\n *  Created on: Oct 18, 2019\n *      Author: fbischoff\n */\n\n#include \"RandomizedMatrixDecomposition.h\"\n\nnamespace madness {\n\n} /* namespace madness */\n"
  },
  {
    "path": "src/madness/tensor/test_Zmtxmq.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/madness_config.h>\n#if !(defined(X86_32) || defined(X86_64))\n\n#include <iostream>\nint main() {std::cout << \"x86 only\\n\"; return 0;}\n\n#else\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n//#include <xmmintrin.h>\n#include <complex>\n\n#include <madness/world/posixmem.h>\n#include <madness/world/safempi.h>\n#include <madness/tensor/cblas.h>\n#include <madness/tensor/mxm.h>\n#include <madness/tensor/tensor.h>\n\ntypedef std::complex<double> double_complex;\n\nusing namespace madness;\n\n#ifdef TIME_DGEMM\n\nvoid mTxm_dgemm(long ni, long nj, long nk, double_complex* c, const double_complex* a, const double_complex*b ) {\n  double_complex one=1.0;\n  double_complex zer=1.0;\n  madness::cblas::gemm(madness::cblas::NoTrans,madness::cblas::Trans,nj,ni,nk,one,b,nj,a,ni,zer,c,nj);\n}\n\n#endif\n\ndouble_complex ran()\n{\n  static unsigned long seed = 76521;\n\n  seed = seed*1812433253 + 12345;\n  double d1 = double(seed & 0x7fffffff)*4.6566128752458e-10;\n  seed = seed*1812433253 + 12345;\n  double d2 = double(seed & 0x7fffffff)*4.6566128752458e-10;\n\n  return double_complex(d1,d2);\n}\n\nvoid ran_fill(int n, double_complex *a) {\n    while (n--) *a++ = ran();\n}\n\nvoid mTxm(long dimi, long dimj, long dimk,\n          double_complex* c, const double_complex* a, const double_complex* b) {\n    int i, j, k;\n    for (k=0; k<dimk; ++k) {\n        for (j=0; j<dimj; ++j) {\n            for (i=0; i<dimi; ++i) {\n                c[i*dimj+j] += a[k*dimi+i]*b[k*dimj+j];\n            }\n        }\n    }\n}\n\nvoid crap(double rate, double fastest, double start) {\n    if (rate == 0) printf(\"darn compiler bug %e %e %lf\\n\",rate,fastest,start);\n}\n\n\nvoid timer(const char* s, long ni, long nj, long nk, double_complex *a, double_complex *b, double_complex *c) {\n  double fastest=0.0, fastest_dgemm=0.0;\n\n  double nflop = 2.0*ni*nj*nk;\n  long loop;\n  for (int t=0; t<100/nk; t++) {\n    double rate;\n    double start = SafeMPI::Wtime();\n    for (loop=0; loop<100; ++loop) {\n      mTxmq(ni,nj,nk,c,a,b);\n    }\n    start = SafeMPI::Wtime() - start;\n    rate = 1.e-9*nflop/(start/100.0);\n    crap(rate,fastest,start);\n    if (rate > fastest) fastest = rate;\n  }\n#ifdef TIME_DGEMM\n  for (int t=0; t<100/nk; t++) {\n    double rate;\n    double start = SafeMPI::Wtime();\n    for (loop=0; loop<100; ++loop) {\n      mTxm_dgemm(ni,nj,nk,c,a,b);\n    }\n    start = SafeMPI::Wtime() - start;\n    rate = 1.e-9*nflop/(start/100.0);\n    crap(rate,fastest_dgemm,start);\n    if (rate > fastest_dgemm) fastest_dgemm = rate;\n  }\n#endif\n  printf(\"%20s %3ld %3ld %3ld %8.2f %8.2f\\n\",s, ni,nj,nk, fastest, fastest_dgemm);\n}\n\nvoid trantimer(const char* s, long ni, long nj, long nk, double_complex *a, double_complex *b, double_complex *c) {\n  double fastest=0.0, fastest_dgemm=0.0;\n\n  double nflop = 3.0*2.0*ni*nj*nk;\n  long loop;\n  for (int t=0; t<100/nk; t++) {\n    double rate;\n    double start = SafeMPI::Wtime();\n    for (loop=0; loop<100; ++loop) {\n      mTxmq(ni,nj,nk,c,a,b);\n      mTxmq(ni,nj,nk,a,c,b);\n      mTxmq(ni,nj,nk,c,a,b);\n    }\n    start = SafeMPI::Wtime() - start;\n    rate = 1.e-9*nflop/(start/100.0);\n    crap(rate,fastest,start);\n    if (rate > fastest) fastest = rate;\n  }\n#ifdef TIME_DGEMM\n  for (int t=0; t<100/nk; t++) {\n    double rate;\n    double start = SafeMPI::Wtime();\n    for (loop=0; loop<100; ++loop) {\n      mTxm_dgemm(ni,nj,nk,c,a,b);\n      mTxm_dgemm(ni,nj,nk,a,c,b);\n      mTxm_dgemm(ni,nj,nk,c,a,b);\n    }\n    start = SafeMPI::Wtime() - start;\n    rate = 1.e-9*nflop/(start/100.0);\n    crap(rate,fastest_dgemm,start);\n    if (rate > fastest_dgemm) fastest_dgemm = rate;\n  }\n#endif\n  printf(\"%20s %3ld %3ld %3ld %8.2f %8.2f\\n\",s, ni,nj,nk, fastest, fastest_dgemm);\n}\n\nint main(int argc, char * argv[]) {\n    const long nimax=30*30;\n    const long njmax=100;\n    const long nkmax=100;\n    long ni, nj, nk, i, m;\n    double_complex *a, *b, *c, *d;\n\n    SafeMPI::Init_thread(argc, argv, MPI_THREAD_SINGLE);\n\n    posix_memalign((void **) &a, 16, nkmax*nimax*sizeof(double_complex));\n    posix_memalign((void **) &b, 16, nkmax*njmax*sizeof(double_complex));\n    posix_memalign((void **) &c, 16, nimax*njmax*sizeof(double_complex));\n    posix_memalign((void **) &d, 16, nimax*njmax*sizeof(double_complex));\n\n\n    bool smalltest = false;\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n    \n\n    ran_fill(nkmax*nimax, a);\n    ran_fill(nkmax*njmax, b);\n\n\n/*     ni = nj = nk = 2; */\n/*     for (i=0; i<ni*nj; ++i) d[i] = c[i] = 0.0; */\n/*     mTxm (ni,nj,nk,c,a,b); */\n/*     mTxmq(ni,nj,nk,d,a,b); */\n/*     for (i=0; i<ni; ++i) { */\n/*       long j; */\n/*       for (j=0; j<nj; ++j) { */\n/* \tprintf(\"%2ld %2ld %.6f %.6f\\n\", i, j, c[i*nj+j], d[i*nj+j]); */\n/*       } */\n/*     } */\n/*     return 0; */\n\n    int stride = 1;\n    if (smalltest) stride = 3; // odd to test even and odd values\n    \n    printf(\"Starting to test ... \\n\");\n    for (ni=1; ni<12; ni+=stride) {\n        for (nj=1; nj<12; nj+=stride) {\n            for (nk=1; nk<12; nk+=stride) {\n                for (i=0; i<ni*nj; ++i) d[i] = c[i] = 0.0;\n                mTxm (ni,nj,nk,c,a,b);\n                mTxmq(ni,nj,nk,d,a,b);\n                for (i=0; i<ni*nj; ++i) {\n                    double err = std::abs(d[i]-c[i]);\n                    /* This test is sensitive to the compilation options.\n                       Be sure to have the reference code above compiled\n                       -msse2 -fpmath=sse if using GCC.  Otherwise, to\n                       pass the test you may need to change the threshold\n                       to circa 1e-13.\n                    */\n                    if (err > 2e-14) {\n                        printf(\"test_mtxmq: error %ld %ld %ld %e\\n\",ni,nj,nk,err);\n                        exit(1);\n                    }\n                }\n            }\n        }\n    }\n    printf(\"... OK!\\n\");\n\n    if (!smalltest) {\n        printf(\"%20s %3s %3s %3s %8s %8s (GF/s)\\n\", \"type\", \"M\", \"N\", \"K\", \"LOOP\", \"BLAS\");\n        for (ni=2; ni<60; ni+=2) timer(\"(m*m)T*(m*m)\", ni,ni,ni,a,b,c);\n        for (m=1; m<=30; m+=1) timer(\"(m*m,m)T*(m*m)\", m*m,m,m,a,b,c);\n        for (m=1; m<=30; m+=1) trantimer(\"tran(m,m,m)\", m*m,m,m,a,b,c);\n        for (m=1; m<=20; m+=1) timer(\"(20*20,20)T*(20,m)\", 20*20,m,20,a,b,c);\n    }\n\n    SafeMPI::Finalize();\n\n    return 0;\n}\n#endif\n"
  },
  {
    "path": "src/madness/tensor/test_distributed_matrix.cc",
    "content": "\n#include <madness/madness_config.h>\n#include <madness/world/MADworld.h>\n#include <madness/tensor/distributed_matrix.h>\n\nusing namespace madness;\n\ndouble ij(int64_t i, int64_t j) {return ((i<<24) | j);}\n\nvoid check(DistributedMatrix<double>& A) {\n    A.fill(ij);\n\n    // Verify local data and accessors\n    int64_t ilo, ihi, jlo, jhi;\n    A.local_colrange(ilo,ihi);\n    A.local_rowrange(jlo,jhi);\n    const Tensor<double>& t = A.data();\n    for (int64_t i=ilo; i<=ihi; i++) {\n        for (int64_t j=jlo; j<=jhi; j++) {\n            MADNESS_CHECK(A.get(i,j) == ij(i,j));\n            MADNESS_CHECK(t(i-ilo,j-jlo) == ij(i,j));\n       }\n    }\n\n    // Verify ownership computation\n    const ProcessID me = A.get_world().rank();\n    const int64_t n=A.coldim(), m=A.rowdim();\n    for (int64_t i=0; i<n; i++) {\n        for (int64_t j=0; j<m; j++) {\n            if (A.owner(i,j) == me) MADNESS_CHECK(A.get(i,j) == ij(i,j));\n        }\n    }\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    const int64_t n=1031, m=977;\n\n    {\n        DistributedMatrix<double> A = row_distributed_matrix<double>(world, n, m, 13);\n        check(A);\n    }\n    {\n        DistributedMatrix<double> A = column_distributed_matrix<double>(world, n, m, 13);\n        check(A);\n    }\n\n    world.gop.fence();\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/tensor/test_elemental.cc",
    "content": "#include <madness/madness_config.h>\n\n\n#include <madness/world/MADworld.h>\nusing namespace madness;\nusing namespace std;\n\n#ifdef MADNESS_HAS_ELEMENTAL\n\n#include <madness/tensor/elem.h>\nusing namespace elem;\n\n#ifdef STATIC\n#  undef STATIC\n#endif\n\n#if HAVE_UNQUALIFIED_STATIC_DECL\n#  define STATIC static\n#else\n// Cray X1 compiler won't instantiate static function templates (mxm*)\n#  define STATIC\n#endif\n\n\nnamespace madness {\n    // This stupidity since current defn of conj_tranpose() only\n    // takes complex types ... was that a sensible design choice?\n    // STATIC Tensor<float> my_conj_transpose(Tensor<float> a) {\n    //     return transpose(a);\n    // }\n    STATIC Tensor<double> my_conj_transpose(Tensor<double> a) {\n        return transpose(a);\n    }\n    // STATIC Tensor<float_complex> my_conj_transpose(Tensor<float_complex> a) {\n    //     return conj_transpose(a);\n    // }\n    // STATIC Tensor<double_complex> my_conj_transpose(Tensor<double_complex> a) {\n    //     return conj_transpose(a);\n    // }\n}\n\ndouble xtt1, xss1;\n\n#define START_TIMER world.gop.fence(); xtt1=wall_time(); xss1=cpu_time()\n#define END_TIMER(msg) xtt1=wall_time()-xtt1; xss1=cpu_time()-xss1; if (world.rank()==0) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg, xss1, xtt1)\n\ntemplate <typename T>\ndouble test_sygvp(World& world, int n) {\n    Tensor<T> a(n,n), V, b(n,n);\n    Tensor< typename Tensor<T>::scalar_type > e;\n    \n    a.fillrandom(); a-=0.5;\n    b.fillrandom(); b-=0.5;\n    a += madness::my_conj_transpose(a); a*=0.5;\n    b += madness::my_conj_transpose(b); b*=0.5;\n    for (int i=0; i<n; ++i) b(i,i) = 2*n; // To make pos-def\n\n    // Tensor<T> aa = copy(a);\n    // Tensor<T> bb = copy(b);\n    // Tensor<T> VV;\n    // Tensor< typename Tensor<T>::scalar_type > ee;\n    \n    // world.gop.broadcast(a.ptr(),a.size(), 0);\n    // world.gop.broadcast(b.ptr(),b.size(), 0);\n    // world.gop.fence();\n    \n    START_TIMER;\n    sygvp(world, a,b,1,V,e);\n    END_TIMER(\"call sygvp\");\n\n    // print(a);\n    // print(b);\n    // print(V);\n    // print(e);\n\n    // sygv(aa, bb, 1, VV, ee);\n    // print(VV);\n    // print(ee);\n    // {\n    //     double err = 0.0;\n    //     for (int i=0; i<n; ++i) {\n    //         err = max(err,(double) (inner(a,VV(_,i)) - inner(b,VV(_,i))*(T) ee(i)).normf());\n    //     }\n    //     print(err);\n    // }\n    \n    double err = 0.0;\n    for (int i=0; i<n; ++i) {\n        err = max(err,(double) (inner(a,V(_,i)) - inner(b,V(_,i))*(T) e(i)).normf());\n    }\n    return err;\n}\n\ntemplate <typename T>\ndouble test_gesvp(World& world, int n, int nrhs) {\n    Tensor<T> a(n,n), b1(n), b(n,nrhs), x1, x;\n    \n    a.fillrandom();\n    b1.fillrandom();\n    b.fillrandom();\n    \n    // world.gop.broadcast(a.ptr(),a.size(), 0);\n    // world.gop.broadcast(b.ptr(),b.size(), 0);\n    // world.gop.broadcast(b1.ptr(),b1.size(), 0);\n    // world.gop.fence();\n    \n    //         print(\"A\");\n    //         print(a);\n    \n    //         print(\"B\");\n    //         print(b);\n    \n    //         print(\"B1\");\n    //         print(b1);\n    \n    START_TIMER;\n    gesvp(world, a,b,x);\n    gesvp(world, a,b1,x1);\n    END_TIMER(\" call gesvp\");\n    \n    //         print(\"X\");\n    //         print(x);\n    \n    //         print(\"X1\");\n    //         print(x1);\n    \n    //         print(\"R\");\n    //         print(inner(a,x)-b);\n    //\n    //         print(\"R1\");\n    //         print(inner(a,x1)-b1);\n    \n    double err = 0;\n    err = (inner(a,x)-b).normf() + (inner(a,x1)-b1).normf();\n    return err;\n    //        return 111.0;\n}\n\ndouble ij(int64_t i, int64_t j) {return ((i<<24) | j);}\n\ntemplate <typename T>\nvoid test_copy(World& world, int n, int m) {\n    const int blocksize = 63;\n    const elem::Grid GG( world.mpi.comm().Get_mpi_comm() );\n    elem::SetBlocksize(blocksize);\n    elem::DistMatrix<T> gd( n, m, GG );\n    DistributedMatrix<T> A = column_distributed_matrix<T>(world, n, m, 17);\n    A.fill(ij);\n    \n    copy_to_elemental(A, gd);\n\n    // {\n    //     const int64_t colShift =    gd.ColShift(); // first row we own\n    //     const int64_t rowShift =    gd.RowShift(); // first col we own\n    //     const int64_t colStride =   gd.ColStride();\n    //     const int64_t rowStride =   gd.RowStride();\n    //     const int64_t localHeight = gd.LocalHeight();\n    //     const int64_t localWidth =  gd.LocalWidth();\n        \n    //     for( int64_t jLocal=0; jLocal<localWidth; ++jLocal ) {\n    //         for( int64_t iLocal=0; iLocal<localHeight; ++iLocal ) {\n    //             const int64_t i = colShift + iLocal*colStride;\n    //             const int64_t j = rowShift + jLocal*rowStride;\n\n    //             print(i,j,gd.Get(i,j),A.get(i,j),A.owner(i,j),ij(i,j));\n    //             //const ProcessID owner = dout.owner(i,j);\n    //             //s.insert(owner, detail::Value<T>(i,j,gd.GetLocal(iLocal,jLocal)));\n    //         }\n    //     }\n    // }\n\n    A.fill(T(0.0));\n    copy_from_elemental(gd, A);\n    int64_t ilo, ihi, jlo, jhi;\n    A.local_colrange(ilo,ihi);\n    A.local_rowrange(jlo,jhi);\n    const Tensor<T>& t = A.data();\n    for (int64_t i=ilo; i<=ihi; i++) {\n        for (int64_t j=jlo; j<=jhi; j++) {\n            //print(i,j,A.get(i,j),ij(i,j));\n            MADNESS_CHECK(A.get(i,j) == ij(i,j));\n        }\n    }\n}\n\ndouble afiller(int64_t i, int64_t j) {\n    return std::cos((i+j)/10.0) + std::sin(i*j/(i+j+1.0));\n}\n\ntemplate <typename T>\nvoid test_distributed_eval(World& world, const int N) {\n    DistributedMatrix<T> A = column_distributed_matrix<T>(world, N, N);\n    DistributedMatrix<T> B = row_distributed_matrix<T>(world, N, N); // for perversity\n    B.fill_identity();\n    A.fill(afiller);\n\n    DistributedMatrix<T> X;\n    Tensor<typename Tensor<T>::scalar_type> e;\n    \n    sygv(A, B, 1, X, e);\n\n    Tensor<T> AA(N,N); A.copy_to_replicated(AA);\n    Tensor<T> BB(N,N);  B.copy_to_replicated(BB);\n    Tensor<T> XX(N,N); X.copy_to_replicated(XX);\n\n    double err = 0.0;\n    for (int i=0; i<N; ++i) {\n        err = max(err,(double) (inner(AA,XX(_,i)) - inner(BB,XX(_,i))*(T) e(i)).normf());\n    }\n    if (world.rank() == 0) print(N,err);\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    int myrank = world.rank();\n    \n    try {\n        for (int n=1; n<100; n++) {\n            double err = test_sygvp<double>(world, n);\n            if (myrank == 0)  cout << \"n=\" << n << \" error in double sygvp \" << err << endl;\n        }\n        for (int n=1; n<=128; n*=2) {// was 1024\n            double err = test_sygvp<double>(world, n);\n            if (myrank == 0)  cout << \"n=\" << n << \" error in double sygvp \" << err << endl;\n        }\n        if (myrank == 0)  cout << endl; \n        \n        double err = test_gesvp<double>(world, 1800, 1200);\n        if (myrank == 0)  cout << \"error in float gesvp \" << err << endl;\n        if (myrank == 0)  cout << endl; \n\n        test_copy<double>(world,300,300);\n\n        for (int n=4; n<=512; n*=2)\n            test_distributed_eval<double>(world,n);\n    }\n    catch (SafeMPI::Exception e) {\n        error(\"caught an MPI exception\");\n    }\n    catch (madness::MadnessException e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const char* s) {\n        print(s);\n        error(\"caught a string exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    finalize();\n    return 0;\n}\n\n#else\n\nint main(int argc, char** argv) {\n    print(\"MADNESS was not configured with elemental\");\n    return 0;\n}\n\n\n#endif\n"
  },
  {
    "path": "src/madness/tensor/test_gentensor.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/// \\file tensor/test.cc\n/// \\brief New test code for Tensor class using Google unit test\n\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/gentensor.h>\n#include <madness/world/print.h>\n#include \"gentensor.h\"\n\n#if defined USE_GENTENSOR && MADNESS_HAS_GOOGLE_TEST\n\n// The test code deliberately uses only the dumb ITERATOR macros\n// in order to test the optimized iterators used by the implementation.\n\nusing namespace madness;\nusing madness::_;\nusing madness::___;\nusing madness::_reverse;\n\n#include <iostream>\n#include <gtest/gtest.h>\n\nnamespace {\n\n    template <typename T>\n    class LowRankTensorTest : public ::testing::Test {\n    public:\n        LowRankTensorTest() {}\n\n        virtual ~LowRankTensorTest() {}\n\n        virtual void SetUp() {}\n\n        virtual void TearDown() {}\n    };\n\n    double eps=1.e-4;\n\n    /// will yield different ranks (null: 0, index: 2, random: full)\n    enum TensorFill {null, index, random};\n\n    /// prepare a full rank tensor according to target rank\n    template<typename T>\n    Tensor<T> prep_tensor(const std::vector<long>& dim, const TensorFill& f) {\n    \tTensor<T> t0=Tensor<double>(dim);\n\t\tif (f==index) t0.fillindex();\n\t\tif (f==random) t0.fillrandom();\n\t\tif (f!=null) {\n\t\t\tt0+=1;\n\t\t\tt0.scale(1.0/t0.normf());\n\n\t\t}\n        if (f==random) t0.fillrandom();\n\t\treturn t0;\n    }\n\n\n    class UnaryGenTest : public ::testing::TestWithParam<std::tr1::tuple<\n    \t\t::madness::TensorType, long, double, TensorFill> > {\n    public:\n    \tstd::vector<long> dim;\n        TensorType tt;\n        double eps;\n\n        TensorFill fill0;\n\n        Tensor<double> t0;\n\n\t\tGenTensor<double> g0;\n\n\t\tUnaryGenTest() {\n\t\t\tmadness::Random(100);\n            int alldim= (madness::RandomValue<long>()&0x5) + 3;\n\n            tt=std::tr1::get<0>(this->GetParam());\n            long ndim=std::tr1::get<1>(this->GetParam());\n            eps=std::tr1::get<2>(this->GetParam());\n\n            fill0=std::tr1::get<3>(this->GetParam());\n            dim=std::vector<long>(ndim,alldim);\n\n    \t\t// fill the full tensors t0 and t1 with numbers that will yield certain ranks\n    \t\tt0=prep_tensor<double>(dim,fill0);\n\n    \t\tg0=GenTensor<double>(t0,TensorArgs(eps,tt));\n    \t}\n    };\n\n    class BinaryGenTest : public ::testing::TestWithParam<std::tr1::tuple<\n    \t\t::madness::TensorType, long, double, TensorFill, TensorFill> > {\n    public:\n    \tstd::vector<long> dim;\n        TensorType tt;\n        double eps;\n\n        TensorFill fill0;\n        TensorFill fill1;\n\n        Tensor<double> t0;\n\t\tTensor<double> t1;\n\n\t\tGenTensor<double> g0;\n\t\tGenTensor<double> g1;\n\n\n        BinaryGenTest() {\n            int alldim= (madness::RandomValue<long>()&0x5) + 3;\n\n            tt=std::tr1::get<0>(this->GetParam());\n            long ndim=std::tr1::get<1>(this->GetParam());\n            eps=std::tr1::get<2>(this->GetParam());\n\n            fill0=std::tr1::get<3>(this->GetParam());\n            fill1=std::tr1::get<4>(this->GetParam());\n            dim=std::vector<long>(ndim,alldim);\n\n    \t\t// fill the full tensors t0 and t1 with numbers that will yield certain ranks\n    \t\tt0=prep_tensor<double>(dim,fill0);\n    \t\tt1=prep_tensor<double>(dim,fill1);\n\n    \t\tg0=GenTensor<double>(t0,TensorArgs(eps,tt));\n    \t\tg1=GenTensor<double>(t1,TensorArgs(eps,tt));\n\n\n    \t}\n    };\n\n    INSTANTIATE_TEST_CASE_P(UnaryGenTest,UnaryGenTest,\n    \t\t\t\t::testing::Combine(::testing::Values(::madness::TT_FULL,\n    \t\t\t\t                    ::madness::TT_2D, ::madness::TT_TENSORTRAIN),\n    \t\t\t\t\t\t\t\t   ::testing::Values(2,4,6),\n    \t\t\t\t\t\t\t\t   ::testing::Values(1.e-3, 1.e-4, 1.e-5),\n     \t\t\t\t\t\t\t\t   ::testing::Values(null,index,random)\n    ));\n\n    INSTANTIATE_TEST_CASE_P(BinaryGenTest,BinaryGenTest,\n    \t\t\t\t::testing::Combine(::testing::Values(::madness::TT_FULL,\n    \t\t\t\t                    ::madness::TT_2D, ::madness::TT_TENSORTRAIN),\n    \t\t\t\t\t\t\t\t   ::testing::Values(2l,4l),\n    \t\t\t\t\t\t\t\t   ::testing::Values(1.e-3, 1.e-4, 1.e-5),\n     \t\t\t\t\t\t\t\t   ::testing::Values(null,index,random),\n      \t\t\t\t\t\t\t\t   ::testing::Values(null,index,random)\n    ));\n\n    TEST_P(UnaryGenTest, Norms_etc) {\n    \ttry {\n\n    \t\t// should not change contents of the GenTensor\n    \t\tg0.normalize();\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t// Frobenius norm\n    \t\tASSERT_NEAR(g0.normf(),t0.normf(),eps);\n    \t\tASSERT_NEAR(g0.svd_normf(),t0.normf(),eps);\n\n    \t\t// svd_normf computes the norm of the weights only\n    \t\tg0.scale(1.1);\n    \t\tASSERT_NEAR(g0.svd_normf(),1.1*(t0.normf()),eps);\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    }\n\n    TEST_P(BinaryGenTest, Addition) {\n    \tfor (int ipass=0; ipass<10; ++ipass) {\n    \ttry {\n    \t\t// check for addition\n    \t\tt0+=t1;\n    \t\tg0+=g1;\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t// check for subtraction\n    \t\tt0-=t1;\n    \t\tg0-=g1;\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t// check for inplace stuff\n    \t\tt0.gaxpy(-0.7, t1, 0.1);\n    \t\tg0.gaxpy(-0.7, g1, 0.1);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t/*\n    \t\t *  this is somewhat special, but nevertheless important to test\n    \t\t *\n    \t\t *  also: note the fac_reduce which is important for accuracy.\n    \t\t *  Many subsequent operations will deteriorate the error.\n    \t\t */\n    \t\tg0=GenTensor<double>(t0,TensorArgs(eps,tt));\n    \t\tg1=GenTensor<double>(t1,TensorArgs(eps,tt));\n\n//    \t\tg0.config().orthonormalize(eps*GenTensor<double>::fac_reduce());\t// this line break it!\n    \t\tg0.reduce_rank(eps);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n//    \t\tg1.config().orthonormalize(eps*GenTensor<double>::fac_reduce());\n    \t\tg1.reduce_rank(eps);\n    \t\tASSERT_LT((g1.full_tensor_copy()-t1).normf(),eps);\n\n    \t\tt0+=t1;\n    \t\tg0.add_SVD(g1,eps);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    \t}\n    }\n\n    TEST_P(BinaryGenTest, ScalarMultiplication) {\n    \ttry {\n    \t\t// check for multiplication\n    \t\tTensor<double> t1=.337*t0;\n    \t\tGenTensor<double> g1=0.3370*g0;\n    \t\tASSERT_LT((g1.full_tensor_copy()-t1).normf(),eps);\n\n    \t\t// check for scaling\n    \t\tt0.scale(4.84);\n    \t\tg0.scale(4.84);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    }\n\n    // test for inner and outer product\n    TEST_P(BinaryGenTest, InnerOuter) {\n    \ttry {\n    \t\t// check for overlap\n    \t\tdouble inner_t=t0.trace(t1);\n    \t\tdouble inner_g=g0.trace_conj(g1);\n    \t\tASSERT_LT(inner_t-inner_g,eps);\n\n\t\t\t// check for outer product\n    \t\tif ((t0.ndim()+t1.ndim()<=TENSOR_MAXDIM) and (tt==TT_FULL)) {\n    \t\t\tTensor<double> t2=outer(t0,t1);\n    \t\t\tGenTensor<double> g2=outer(g0,g1,TensorArgs(eps,TT_FULL));\n    \t\t\tASSERT_LT((g2.full_tensor_copy()-t2).normf(),eps);\n    \t\t}\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    }\n\n    // checks for transform, general_transform, transform_dir\n    TEST_P(UnaryGenTest, Transform) {\n    \ttry {\n\n    \t\t// this is the transform tensor\n    \t\tTensor<double> c(dim[0],dim[0]);\n    \t\tTensor<double> cc[TENSOR_MAXDIM];\n    \t\tfor (unsigned int idim=0; idim<dim.size(); idim++) {\n    \t\t\tcc[idim]=Tensor<double>(dim[0],dim[0]);\n    \t\t\tcc[idim].fillrandom();\n    \t\t}\n\n    \t\tc.fillindex();\n    \t\tc.scale(1.0/c.normf());\n\n    \t\t// check for transform\n    \t\tTensor<double> t1=transform(t0,c);\n    \t\tGenTensor<double> g1=transform(g0,c);\n\t\t\tASSERT_LT((g1.full_tensor_copy()-t1).normf(),eps);\n\n    \t\t// check for general transform\n    \t\tt1=general_transform(t0,cc);\n    \t\tg1=general_transform(g0,cc);\n\t\t\tASSERT_LT((g1.full_tensor_copy()-t1).normf(),eps);\n\n    \t\t// check for transform in one direction\n\t\t\tfor (int idim=0; idim<dim.size(); ++idim) {\n\t\t\t\tt1=transform_dir(t0,c,idim);\n\t\t\t\tg1=transform_dir(g0,c,idim);\n\t\t\t\tASSERT_LT((g1.full_tensor_copy()-t1).normf(),eps);\n\t\t\t}\n\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    }\n\n    // checks for rank reduction, relies on Addition working properly\n    TEST_P(BinaryGenTest, RankReduction) {\n    \ttry {\n    \t\t// check for addition\n    \t\tt0+=t1;\n    \t\tg0+=g1;\n            ASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n    \t\tg0.reduce_rank(eps);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t// check for subtraction\n    \t\tt0-=t1;\n    \t\tg0-=g1;\n    \t\tg0.reduce_rank(eps);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t\t// check for inplace stuff\n    \t\tt0.gaxpy(-0.7, t1, 0.1);\n    \t\tg0.gaxpy(-0.7, g1, 0.1);\n    \t\tg0.reduce_rank(eps);\n    \t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n    \t} catch (const madness::TensorException& e) {\n    \t\tif (dim.size() != 0) std::cout << e;\n    \t\tEXPECT_EQ(dim.size(),0);\n    \t} catch(...) {\n    \t\tstd::cout << \"Caught unknown exception\" << std::endl;\n    \t\tEXPECT_EQ(1,0);\n    \t}\n    }\n\n    // checks for addition with slices\n    TEST_P(BinaryGenTest, SliceAddition) {\n        Tensor<double> t0_save=copy(t0);\n\t\tTensor<double> t1_save=copy(t1);\n\n\t\tGenTensor<double> g0_save=copy(g0);\n\t\tGenTensor<double> g1_save=copy(g1);\n\n\t\t// need multiple passes to to random number generation\n    \tfor (int ipass=0; ipass<10; ++ipass) {\n\t\t\ttry {\n\n\t\t\t\t// reset for each pass\n\t\t\t\tt0=copy(t0_save);\n\t\t\t\tt1=copy(t1_save);\n\t\t\t\tg0=copy(g0_save);\n\t\t\t\tg1=copy(g1_save);\n\n\t\t\t\tlong mindim= std::min(dim.front(), dim.back());\n\n\t\t\t\tlong lo=(madness::RandomValue<long>() % 2);\n\t\t\t\tlong hi=(madness::RandomValue<long>() % mindim-1);\n\t\t\t\tif (hi<lo) hi=lo;\n\t\t\t\tstd::vector<Slice> s(dim.size(),Slice(lo,hi));\n\n\t\t\t\t// check for addition g0(s)+=g1(s)\n\t\t\t\tt0(s)+=t1(s);\n\t\t\t\tg0(s)+=g1(s);\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t\t// special setup: shrink one of the tensors\n\t\t\t\tt1=copy(t1(s));\n\t\t\t\tg1=copy(g1(s));\n\n\t\t\t\t// check for addition g0(s)+=g1\n\t\t\t\tt0(s)+=t1;\n\t\t\t\tg0(s)+=g1;\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t\t// check for subtraction g0(s)-=g1\n\t\t\t\tt0(s)-=t1;\n\t\t\t\tg0(s)-=g1;\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t\t// check for addition g0+=g1(s)\n\t\t\t\tt1+=t0(s);\n\t\t\t\tg1+=g0(s);\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t\t// check for subtraction g0-=g1(s)\n\t\t\t\tt1-=t0(s);\n\t\t\t\tg1-=g0(s);\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t\t// check for zeroing slices, aka subtraction of that slice\n\t\t\t\tt0(s)=0.0;\n\t\t\t\tg0(s)=0.0;\n\t\t\t\tASSERT_LT((g0.full_tensor_copy()-t0).normf(),eps);\n\n\t\t\t} catch (const madness::TensorException& e) {\n\t\t\t\tif (dim.size() != 0) std::cout << e;\n\t\t\t\tEXPECT_EQ(dim.size(),0);\n\t\t\t} catch(...) {\n\t\t\t\tstd::cout << \"Caught unknown exception\" << std::endl;\n\t\t\t\tEXPECT_EQ(1,0);\n\t\t\t}\n    \t}\n    }\n\n    // let's keep construction as a typed test so that at least compiling will always work\n    typedef ::testing::Types<float, double, float_complex, double_complex> LowRankTensorTestTypes;\n    TYPED_TEST_CASE(LowRankTensorTest, LowRankTensorTestTypes);\n\n    TYPED_TEST(LowRankTensorTest, Construction) {\n        for (int ndim=2; ndim<=TENSOR_MAXDIM; ndim+=2) {\t// even number of dimensions only\n            try {\n                std::vector<long> dim(ndim);\n                for (int pass=0; pass<10; ++pass) {\n                    long nelem = 1;\n                    int alldim= (madness::RandomValue<long>()&0x5) + 1;\n                    for (int i=0; i<ndim; ++i) {\n                        dim[i] = alldim;\n                        nelem *= dim[i];\n                    }\n\n                    // this is the full rank reference tensor\n                    madness::Tensor<TypeParam> fullrank(dim);\n                    fullrank.fillindex();\n                    fullrank+=1.0;\n                    fullrank.scale(1.0/fullrank.normf());\n\n                    // Use ASSERT not EXPECT otherwise we get a huge volume of output\n                    // from failing tests.  Also, subsequent tests usually rely on\n                    // success of previous ones.\n\n                    // verify default constructor\n                    madness::GenTensor<TypeParam> empty;\n                    ASSERT_EQ(empty.size(),0);\n                    ASSERT_EQ(empty.rank(),0);\n                    ASSERT_EQ(empty.ndim(),-1);\n                    ASSERT_TRUE(empty.has_no_data());\n\n                    // verify various \"empty\" constructors a given dimension but no tensor;\n                    // Will result in the construction of an empty SRConf, which means that\n                    // the GenTensor \"has data\", which is a matrix of zeros, and rank is 0\n                    {\n                    \t// TT_FULL always returns rank -1, irrespective of the content\n\t\t\t\t\t\tGenTensor<TypeParam> d2(dim, TT_FULL);\n\t\t\t\t\t\tASSERT_TRUE(d2.has_data());\n\t\t\t\t\t\tASSERT_EQ(d2.rank(),-1);\n\n\t\t\t\t\t\tGenTensor<TypeParam> d3(dim, TensorArgs(eps,TT_FULL));\n\t\t\t\t\t\tASSERT_TRUE(d3.has_data());\n\t\t\t\t\t\tASSERT_EQ(d3.rank(),-1);\n\n\t\t\t\t\t\tGenTensor<TypeParam> d4(TT_FULL, alldim, ndim);\n\t\t\t\t\t\tASSERT_TRUE(d4.has_data());\n\t\t\t\t\t\tASSERT_EQ(d4.rank(),-1);\n                    } {\n\t\t\t\t\t\tGenTensor<TypeParam> d2(dim, TT_2D);\n\t\t\t\t\t\tASSERT_TRUE(d2.has_data());\n\t\t\t\t\t\tASSERT_EQ(d2.rank(),0);\n\n\t\t\t\t\t\tGenTensor<TypeParam> d3(dim, TensorArgs(eps,TT_2D));\n\t\t\t\t\t\tASSERT_TRUE(d3.has_data());\n\t\t\t\t\t\tASSERT_EQ(d3.rank(),0);\n\n\t\t\t\t\t\tGenTensor<TypeParam> d4(TT_2D, alldim, ndim);\n\t\t\t\t\t\tASSERT_TRUE(d4.has_data());\n\t\t\t\t\t\tASSERT_EQ(d4.rank(),0);\n                    } {\n                        GenTensor<TypeParam> d2(dim, TT_TENSORTRAIN);\n                        ASSERT_TRUE(d2.has_data());\n                        ASSERT_EQ(d2.rank(),0);\n\n                        GenTensor<TypeParam> d3(dim, TensorArgs(eps,TT_TENSORTRAIN));\n                        ASSERT_TRUE(d3.has_data());\n                        ASSERT_EQ(d3.rank(),0);\n\n                        GenTensor<TypeParam> d4(TT_TENSORTRAIN, alldim, ndim);\n                        ASSERT_TRUE(d4.has_data());\n                        ASSERT_EQ(d4.rank(),0);\n                    }\n\n                    // verify various constructors with actual data\n                    // test relies on the correct reconstruction to a full rank tensor\n                    {\n\t\t\t\t\t\t// full rank -> TT_FULL\n\t\t\t\t\t\tmadness::GenTensor<TypeParam> d1(fullrank,TensorArgs(eps,TT_FULL));\n\t\t\t\t\t\tASSERT_EQ(d1.rank(),-1);\n//\t\t\t\t\t\tASSERT_NE(fullrank.ptr(),d1.ptr()); // Was it shallow?\n\t\t\t\t\t\tASSERT_LT((fullrank-d1.full_tensor_copy()).normf(),eps);\n\n\t\t\t\t\t\t// full rank -> TT_2D\n\t\t\t\t\t\tmadness::GenTensor<TypeParam> d_svd(fullrank,TensorArgs(eps,TT_2D));\n\t\t\t\t\t\tASSERT_LT((fullrank-d_svd.full_tensor_copy()).normf(),eps);\n\n                        // full rank -> TT_TENSORTRAIN\n                        madness::GenTensor<TypeParam> d_tt(fullrank,TensorArgs(eps,TT_TENSORTRAIN));\n                        ASSERT_LT((fullrank-d_tt.full_tensor_copy()).normf(),eps);\n\n\t\t\t\t\t\t// TT_2D -> TT_2D\n\t\t\t\t\t\tmadness::GenTensor<TypeParam> d_svd2(d_svd);\n\t\t\t\t\t\tASSERT_EQ(d_svd.ptr(),d_svd2.ptr()); // shallow?\n\t\t\t\t\t\tASSERT_LT((d_svd2.full_tensor_copy()-d_svd.full_tensor_copy()).normf(),eps);\n\n                        // TT_TENSORTRAIN -> TT_TENSORTRAIN\n                        madness::GenTensor<TypeParam> d_tt2(d_tt);\n                        ASSERT_EQ(d_tt.ptr(),d_tt2.ptr()); // shallow?\n                        ASSERT_LT((d_tt2.full_tensor_copy()-d_svd.full_tensor_copy()).normf(),eps);\n\n                    }\n\n                    // verify assigment operator\n                    {\n                    \tmadness::GenTensor<TypeParam> d0(fullrank,TensorArgs(eps,TT_2D));\n                    \tmadness::GenTensor<TypeParam> d1(fullrank,TensorArgs(eps,TT_2D));\n                    \td1=d0;\n\t\t\t\t\t\tASSERT_LT((d0.full_tensor_copy()-d1.full_tensor_copy()).normf(),eps);\n\t\t\t\t\t\tASSERT_EQ(d0.ptr(),d1.ptr()); // shallow?\n\n                    \tmadness::GenTensor<TypeParam> t0(fullrank,TensorArgs(eps,TT_FULL));\n                    \tmadness::GenTensor<TypeParam> t1(fullrank,TensorArgs(eps,TT_FULL));\n\t\t\t\t\t\tt1=t0;\n\t\t\t\t\t\tASSERT_LT((t0.full_tensor_copy()-t1.full_tensor_copy()).normf(),eps);\n\t\t\t\t\t\tASSERT_EQ(t0.ptr(),t1.ptr()); // shallow?\n\n                        madness::GenTensor<TypeParam> tt0(fullrank,TensorArgs(eps,TT_TENSORTRAIN));\n                        madness::GenTensor<TypeParam> tt1(fullrank,TensorArgs(eps,TT_TENSORTRAIN));\n                        madness::GenTensor<TypeParam> tt2(fullrank,TensorArgs(eps,TT_FULL));\n                        tt1=tt0;\n                        tt2=tt1;\n                        ASSERT_EQ(tt2.tensor_type(),tt0.tensor_type());\n                        ASSERT_EQ(tt2.tensor_type(),TT_TENSORTRAIN);\n                        ASSERT_LT((tt0.full_tensor_copy()-tt1.full_tensor_copy()).normf(),eps);\n                        ASSERT_LT((tt0.full_tensor_copy()-tt2.full_tensor_copy()).normf(),eps);\n                        ASSERT_EQ(tt0.ptr(),tt1.ptr()); // shallow?\n                        ASSERT_EQ(tt0.ptr(),tt2.ptr()); // shallow?\n\n                    }\n\n                    // verify copy construction and deep copy\n                    {\n                    \tmadness::GenTensor<TypeParam> d0(fullrank,TensorArgs(eps,TT_2D));\n                        madness::GenTensor<TypeParam> tt0(fullrank,TensorArgs(eps,TT_TENSORTRAIN));\n\n                    \tmadness::GenTensor<TypeParam> d1=d0;\n                        madness::GenTensor<TypeParam> tt1=tt0;\n\t\t\t\t\t\tASSERT_LT((d0.full_tensor_copy()-d1.full_tensor_copy()).normf(),eps);\n                        ASSERT_LT((tt0.full_tensor_copy()-tt1.full_tensor_copy()).normf(),eps);\n\t\t\t\t\t\tASSERT_EQ(d0.ptr(),d1.ptr()); // shallow?\n                        ASSERT_EQ(tt0.ptr(),tt1.ptr()); // shallow?\n\n                    \td1=copy(d0);\n                        tt1=copy(tt0);\n\t\t\t\t\t\tASSERT_LT((d0.full_tensor_copy()-d1.full_tensor_copy()).normf(),eps);\n                        ASSERT_LT((tt0.full_tensor_copy()-tt1.full_tensor_copy()).normf(),eps);\n\t\t\t\t\t\tASSERT_NE(d0.ptr(),d1.ptr()); // deep?\n                        ASSERT_NE(tt0.ptr(),tt1.ptr()); // deep?\n\n                    }\n                }\n            }\n            catch (const madness::TensorException& e) {\n                if (ndim != 0) std::cout << e;\n                EXPECT_EQ(ndim,0);\n            }\n            catch(std::exception& e) {\n                std::cout << \"Caught unknown exception \" <<  e.what() << std::endl;\n                EXPECT_EQ(1,0);\n            }\n        }\n    }\n\n\n\n    /// test slices of LowRankTensors\n    TYPED_TEST(LowRankTensorTest, SlicingConstruction) {\n        for (int ndim=2; ndim<=TENSOR_MAXDIM; ndim+=2) {\t// even number of dimensions only\n            try {\n                std::vector<long> dim(ndim,5);\n\n\t\t\t\t// this is the full rank reference tensor\n\t\t\t\tmadness::Tensor<TypeParam> fullrank(dim);\n\t\t\t\tfullrank.fillindex();\n\t\t\t\tfullrank+=1.0;\n\t\t\t\tfullrank.scale(1.0/fullrank.normf());\n\n\t\t\t\tstd::vector<Slice> s(ndim,Slice(0,3));\n\n\t\t\t\t// Use ASSERT not EXPECT otherwise we get a huge volume of output\n\t\t\t\t// from failing tests.  Also, subsequent tests usually rely on\n\t\t\t\t// success of previous ones.\n\n\t\t\t\t// g0=g1(s)\n\t\t\t\tTensor<TypeParam> t0=copy(fullrank);\n\t\t\t\tTensor<TypeParam> t1=t0(s);\n\t\t\t\tGenTensor<TypeParam> g0_svd(t0,TensorArgs(eps,TT_2D));\n\t\t\t\tGenTensor<TypeParam> g1_svd=g0_svd(s);\n\t\t\t\tGenTensor<TypeParam> g0_full(t0,TensorArgs(eps,TT_FULL));\n\t\t\t\tGenTensor<TypeParam> g1_full=g0_full(s);\n\t\t\t\tGenTensor<TypeParam> g0_tt(t0,TensorArgs(eps,TT_TENSORTRAIN));\n\t\t\t\tGenTensor<TypeParam> g1_tt=g0_tt(s);\n\n\t\t\t\t// check for shallowness -- should be deep(!)\n\t\t\t\tASSERT_NE(g0_svd.ptr(),g1_svd.ptr());\n\t\t\t\tASSERT_NE(g0_full.ptr(),g1_full.ptr());\n\t\t\t\tASSERT_NE(g0_tt.ptr(),g1_tt.ptr());\n\n\t\t\t\t// check for numerical correctness\n\t\t\t\tASSERT_LT((g1_svd.full_tensor_copy()-t1).normf(),eps);\n\t\t\t\tASSERT_LT((g1_full.full_tensor_copy()-t1).normf(),eps);\n                ASSERT_LT((g1_tt.full_tensor_copy()-t1).normf(),eps);\n\n                }\n            catch (const madness::TensorException& e) {\n                if (ndim != 0) std::cout << e;\n                EXPECT_EQ(ndim,0);\n            }\n            catch(...) {\n                std::cout << \"Caught unknown exception\" << std::endl;\n                EXPECT_EQ(1,0);\n            }\n        }\n    }\n\n}\n\nint main(int argc, char** argv) {\n\tmadness::default_random_generator.setstate(3149);\n\n    ::testing::InitGoogleTest(&argc, argv);\n    return RUN_ALL_TESTS();\n}\n\n#else\n\n#include <iostream>\nint main() {\n    std::cout << \"U need to build with --enable-gentensor to enable the tensor test code\\n\";\n    return 0;\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/tensor/test_jacobi.cc",
    "content": "#include <madness/world/madness_exception.h>\n#include <madness/tensor/tensor.h>\n#include <madness/world/print.h>\n\n#include <cmath>\n#include <cstdio>\n#include <algorithm>\n\nusing namespace madness;\n\nextern double drand48(void);\n\n// #define A(i,j) a[i*n+j]\n// #define V(i,j) v[i*n+j]\n\nvoid jacobi(Tensor<double>& A, Tensor<double>& V, const std::vector<int>& set) {\n    int n = A.dim(0);\n    MADNESS_CHECK(A.ndim() == 2);\n    MADNESS_CHECK(A.dim(0) == A.dim(1));\n    MADNESS_CHECK(V.ndim() == 2);\n    MADNESS_CHECK(n == V.dim(0) && n == V.dim(1));\n    MADNESS_CHECK(n == long(set.size()));\n    \n    int i, j, k, iter, nrotsum, nrot;\n    double tolmin = std::sqrt(n) * 5.0e-16, tol = 0.05;\n    double maxd;\n    \n    for (i=0; i<n; i++) {\n        for (j=0; j<n; j++) {\n            A(i,j) = A(j,i) = 0.5*(A(i,j) + A(j,i)); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n            V(i,j) = 0.0;\n        }\n        V(i,i) = 1.0;\n    }\n    \n    maxd = 0.;\n    for (i=0; i<n; i++) {\n        double daii = std::fabs(A(i,i));\n        maxd = std::max(maxd,daii);\n    }\n\n#define ROT(A,i,j)                \\\n    { \\\n      double * __restrict__ ai = &A(i,0); \\\n      double * __restrict__ aj = &A(j,0); \\\n      for (k=0; k<n; k++) { \\\n          double t = ai[k]; \\\n          double u = aj[k]; \\\n          ai[k] = c*t - s*u; \\\n          aj[k] = s*t + c*u; \\\n      } \\\n    }\n\n#define ROTT(A,i,j)                \\\n    { \\\n      double * __restrict__ ai = &A(0,i);      \\\n      double * __restrict__ aj = &A(0,j);       \\\n      for (k=0; k<n*n; k+=n) { \\\n          double t = ai[k]; \\\n          double u = aj[k]; \\\n          ai[k] = c*t - s*u; \\\n          aj[k] = s*t + c*u; \\\n      } \\\n    }\n    \n    nrotsum = 0;\n    for (iter=0; iter<5000; iter++) {\n        double maxdaij = 0.0;\n        nrot = 0;\n        for (i=0; i<n; i++) {\n            for (j=i+1; j<n; j++) {\n                if (set[i] != set[j]) {\n                    double aii = A(i,i);\n                    double ajj = A(j,j);\n                    double aij = A(i,j);\n                    double daij = std::fabs(aij);\n                    \n                    maxdaij = std::max(maxdaij,daij/maxd);\n                    \n                    if (daij > tol*maxd) {\n                        double s = ajj - aii;\n                        double ds = std::fabs(s);\n                        if (daij > (tolmin*ds)) {\n                            double c;\n                            nrot++;\n                            if ((tolmin*daij) > ds) {\n                                c = s = 1.0/std::sqrt(2.);\n                            }\n                            else { \n                                double t = aij/s;\n                                double u = 0.25/std::sqrt(0.25+t*t);\n                                c = std::sqrt(0.5+u);\n                                s = 2.*t*u/c;\n                            }\n                            \n                            //ROTT(A,i,j);\n                            for (k=0; k<n; k++) {\n                                double t = A(k,i);\n                                double u = A(k,j);\n                                A(k,i) = c*t - s*u;\n                                A(k,j) = s*t + c*u;\n                            }\n\n                            ROT(A,i,j);\n                            // for (k=0; k<n; k++) {\n                            //     double t = A(i,k);\n                            //     double u = A(j,k);\n                            //     A(i,k) = c*t - s*u;\n                            //     A(j,k) = s*t + c*u;\n                            // }\n                            \n                            ROT(V,i,j);\n                            // for (k=0; k<n; k++) {\n                            //     double t = V(i,k);\n                            //     double u = V(j,k);\n                            //     V(i,k) = c*t - s*u;\n                            //     V(j,k) = s*t + c*u;\n                            // }\n\n                            A(j,i) = A(i,j) = 0.0;\n                            \n                            maxd = std::max(maxd,std::fabs(A(i,i)));\n                            maxd = std::max(maxd,std::fabs(A(j,j)));\n                        }\n                    }\n                }\n            }\n        }\n        //printf(\"iter=%d nrot=%d err=%e\\n\", iter, nrot, maxdaij);\n        nrotsum += nrot;\n        if (nrot == 0 && tol <= tolmin) break;\n        tol = std::min(tol,maxdaij*1e-1);\n        //tol = std::min(tol,maxdaij*maxdaij); // is not quadratic if only block diagonalizing?\n        tol = std::max(tol,tolmin);\n    }\n    if (nrot != 0) \n        printf(\"Jacobi iteration did not converge in 5000 passes\\n\");\n}\n\nint main() {\n    bool longtest=false;\n    bool success=true;\n    const bool doprint = false;\n\n    const long N = longtest ? 1000 : 300;\n    Tensor<double> a(N,N), aa(N,N), v(N,N), anew;\n    double err;\n    int i, j;\n    std::vector<int> set(N);\n\n    for (i=0; i<10000; i++) drand48(); // warmup cos it is badly initialized\n    \n    for (i=0; i<N; i++) {\n        for (j=0; j<=i; j++) {\n            aa(j,i) = aa(i,j) = drand48()-0.5;\n        }\n    }\n\n    // (1) test full diagonalization\n    for (int i=0; i<N; i++) set[i] = i;\n\n    a = copy(aa);\n    if (doprint) print(\"\");\n    if (doprint) print(\"a before\");\n    if (doprint) print(a);\n    jacobi(a, v, set);\n    if (doprint) print(\"a after\");\n    if (doprint) print(a);\n    if (doprint) print(\"v\");\n    if (doprint) print(v);\n\n    anew = inner(inner(v,a,0,0),v);\n    if (doprint) print(\"a back transformed\");\n    if (doprint) print(anew);\n    err=(anew - aa).normf();\n    print(\"back transformation error\",err );\n    success = success && (err<1.e-10);\n\n    err = 0.0;\n    for (int i=0; i<N; i++) {\n        for (int j=0; j<i; j++) {\n            if (set[i] != set[j]) err += std::fabs(a(i,j)) + std::fabs(a(j,i));\n        }\n    }\n    print(\"off diagonal error\", err);\n    success = success && (err<3.e-8);\n\n    // (2) test partial diagonalization\n\n    int set1 = std::min(N,10L);\n    for (i=0; i<set1; i++) set[i] = 0;\n    for (i=set1; i<N; i++) set[i] = 1;\n    \n    a = copy(aa);\n    if (doprint) print(\"\");\n    if (doprint) print(\"a before\");\n    if (doprint) print(a);\n    jacobi(a, v, set);\n    if (doprint) print(\"a after\");\n    if (doprint) print(a);\n    if (doprint) print(\"v\");\n    if (doprint) print(v);\n\n    anew = inner(inner(v,a,0,0),v);\n    if (doprint) print(\"a back transformed\");\n    if (doprint) print(anew);\n    err=(anew - aa).normf();\n    print(\"back transformation error\", err);\n    success = success && (err<3.e-8);\n\n    err = 0.0;\n    for (int i=0; i<N; i++) {\n        for (int j=0; j<i; j++) {\n            if (set[i] != set[j]) err += std::fabs(a(i,j)) + std::fabs(a(j,i));\n        }\n    }\n    print(\"off diagonal error\", err);\n    success = success && (err<3.e-8);\n\n    int result = success  ? 0 : 1;\n    return result;\n}\n"
  },
  {
    "path": "src/madness/tensor/test_linalg.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov \n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  \n  $Id$\n*/\n\n  \n\n/// \\file ../tensor/test.cc\n/// \\brief Test code for LAPACK, Tensor+LAPACK, etc.\n\n#include <madness/tensor/tensor_lapack.h>\n#include <iostream>\n#include <madness/madness_config.h>\n\nusing namespace madness;\n\n\n\nint\nmain(int argc, char* argv[]) {\n\n//vama    const int required = MADNESS_MPI_THREAD_LEVEL;\n//vama\n//vama\n//vama#ifdef MADNESS_HAS_ELEMENTAL\n//vama    SafeMPI::Init_thread(argc, argv, required);\n//vama    const int myrank = mpi::CommRank( mpi::COMM_WORLD );\n//vama#else\n//vama    const int myrank = 0;\n//vama#endif\n\n    bool testok = test_tensor_lapack();\n    std::cout << \"Test \" << (testok ? \"passed\" : \"did not pass\") << std::endl;\n\n    return int(!testok);\n}\n\n"
  },
  {
    "path": "src/madness/tensor/test_lowranktensor.cc",
    "content": "/*\n * LRTensor_test.cc\n *\n *  Created on: Oct 2, 2019\n *      Author: fbischoff\n */\n\n#ifndef ENABLE_GENTENSOR\n#if ENABLE_GENTENSOR==1\n#define ENABLE_GENTENSOR\n#endif\n#endif\n\n#include <madness/tensor/gentensor.h>\n#include <madness/tensor/RandomizedMatrixDecomposition.h>\n\n\nusing namespace madness;\n\ntemplate<typename T>\ndouble compute_difference(const GenTensor<T>& lrt1, const GenTensor<T>& lrt2) {\\\n\treturn (lrt1.full_tensor_copy()-lrt2.full_tensor_copy()).normf();\n}\n\ntemplate<typename T>\ndouble compute_difference(const GenTensor<T>& lrt1, const Tensor<T>& t2) {\\\n\treturn (lrt1.full_tensor_copy()-t2).normf();\n}\n\ntemplate<typename T>\ndouble compute_difference(const Tensor<T>& t2, const GenTensor<T>& lrt1) {\\\n\treturn (lrt1.full_tensor_copy()-t2).normf();\n}\n\nstd::vector<long> make_dimensions(bool even=false) {\n\tmadness::Random(10);\n\n\tlong ndim=(madness::RandomValue<long>() %5+2);\t// anything from 2 to 6\n    if (even and (ndim%2==1)) ndim++;\n\tstd::vector<long> dim(ndim);\n\tfor (long& d : dim) d=(madness::RandomValue<long>() %6+1);// anything from 1 to 6\n\tprint(\"dimensions\",dim);\n\treturn dim;\n}\n\n\ntemplate<typename T>\nint test_constructor() {\n\tprint(\"\\nentering test_construct\");\n\tstd::vector<long> dim=make_dimensions(true);\n\tTensor<T> tensor(dim);\n\tdouble thresh=1.e-5;\n\tfor (int i=0; i<2; ++i) {\n\t\tprint(\"repeating with random tensors\");\n\t\tSVDTensor<T> svd(tensor,thresh);\n\t\tTensorTrain<T> tt(tensor,thresh);\n\n\t\tGenTensor<T> lrt;\n\t\tGenTensor<T> lrt1(tensor);\n\t\tGenTensor<T> lrt2(tensor,thresh,TT_2D);\n\t\tGenTensor<T> lrt3(tensor,thresh,TT_TENSORTRAIN);\n\t\tGenTensor<T> lrt4(tensor,thresh,TT_FULL);\n\t\tGenTensor<T> lrt5(lrt4);\n\n\t\tGenTensor<T> lrt6(svd);\n\t\tGenTensor<T> lrt7(tt);\n\n\t\tGenTensor<T> lrt8(dim,TT_FULL);\n\t\tGenTensor<T> lrt9(dim,TT_2D);\n\t\tGenTensor<T> lrt10(dim,TT_TENSORTRAIN);\n\t\tGenTensor<T> lrt11(TT_2D,dim[0],dim.size());\n\t\ttensor.fillrandom();\n\n\t}\n\n\t// not throwing is success\n\treturn 0;\n}\n\ntemplate<typename T>\nint test_reconstruct() {\n\tprint(\"\\nentering test_reconstruct\");\n\n\tstd::vector<long> dim=make_dimensions();\n\tTensor<T> tensor(dim);\n\ttensor.fillrandom();\n\tdouble thresh=1.e-5;\n\tdouble error=0.0;\n\n\tGenTensor<T> lrt1(tensor);\n\tGenTensor<T> lrt2(tensor,thresh,TT_2D);\n\tGenTensor<T> lrt3(tensor,thresh,TT_TENSORTRAIN);\n\tGenTensor<T> lrt4(tensor,thresh,TT_FULL);\n\n\tdouble error1=compute_difference(lrt1,tensor);\n\tdouble error2=compute_difference(lrt2,tensor);\n\tdouble error3=compute_difference(lrt3,tensor);\n\tdouble error4=compute_difference(lrt4,tensor);\n\n\tprint(\"error1\",error1);\n\tprint(\"error2\",error2);\n\tprint(\"error3\",error3);\n\tprint(\"error4\",error4);\n\n\terror=error1+error2+error3+error4;\n\treturn 0;\n}\n\n\n\ntemplate<typename T>\nint test_addition(const TensorType& tt) {\n\n\tprint(\"\\nentering test_addition\", tt);\n\tstd::vector<long> dim=make_dimensions(tt==TT_2D);\n\tTensor<T> tensor(dim);\n\ttensor.fillrandom();\n\tdouble error=0.0;\n\n\tGenTensor<T> lrt1(tensor,TensorArgs(1.e-4,tt));\n\tGenTensor<T> lrt2(tensor,TensorArgs(1.e-4,tt));\n\tTensor<T> tensor2=copy(tensor);\n\tlrt2+=lrt1;\n\ttensor2+=tensor;\n\tdouble error1=compute_difference(lrt2,tensor2);\n\tprint(\"error1\",error1);\n\terror+=error1;\n\n\tTensor<T> tensor3=tensor+tensor;\n\tGenTensor<T> lrt3=lrt1+lrt1;\n\tdouble error2=compute_difference(lrt3,tensor3);\n\tprint(\"error2\",error2);\n\terror+=error2;\n\n\tTensor<T> tensor4=tensor-tensor2;\n\tGenTensor<T> lrt4=lrt1-lrt2;\n\tdouble error4=compute_difference(lrt4,tensor4);\n\tprint(\"error4\",error4);\n\terror+=error4;\n\n\tif (tt==TT_2D) {\n\t\ttensor4+=tensor2;\n\t\tlrt4.reduce_rank(1.e-4);\n\t\tlrt2.reduce_rank(1.e-4);\n\t\tlrt4.get_svdtensor().add_SVD(lrt2.get_svdtensor(),1.e-4);\n\t\tdouble error5=compute_difference(lrt4,tensor4);\n\t\tprint(\"error5\",error5);\n\t\terror+=error5;\n\n\n\t}\n\n\n\treturn (error>1.e-8);\n}\n\n\ntemplate<typename T>\nint test_sliced_assignment(const TensorType& tt) {\n\n\tprint(\"\\nentering test_addition\", tt);\n\tTensor<T> tensor(10,10,10,10);\n\ttensor.fillrandom();\n\tdouble error=0.0;\n\tstd::vector<Slice> s0={_,_,Slice(0,8),Slice(3,5)};\n\tstd::vector<Slice> s1={_,_,Slice(1,9),Slice(2,4)};\n\n\treturn (error>1.e-8);\n}\n\ntemplate<typename T>\nint test_sliced_addition(const TensorType& tt) {\n\n\tprint(\"\\nentering test_slicing_addition\", tt);\n\tTensor<T> tensor1(10,8,11,10);\n\tTensor<T> tensor2=3.0*copy(tensor1);\n\ttensor1.fillrandom();\n\tdouble error=0.0;\n\tstd::vector<Slice> s1={_,_,Slice(0,8),Slice(3,5)};\n\tstd::vector<Slice> s2={_,_,Slice(1,9),Slice(2,4)};\n\n\tGenTensor<T> lrt1(tensor1,TensorArgs(1.e-4,tt));\n\tGenTensor<T> lrt2(tensor2,TensorArgs(1.e-4,tt));\n\n\ttensor1(s1)+=tensor2(s2);\n\tlrt1(s1)+=lrt2(s2);\n\tdouble error2=compute_difference(lrt1,tensor1);\n\tprint(\"error2\",error2);\n\terror+=error2;\n\n\n\treturn (error>1.e-8);\n}\n\n\ntemplate<typename T>\nint test_reduce_rank(const TensorType& tt) {\n\n\tprint(\"\\nentering test_reduce_rank\", tt);\n\tstd::vector<long> dim=make_dimensions(tt==TT_2D);\n\tTensor<T> tensor1(dim);\n\tTensor<T> tensor2(dim);\n\ttensor1.fillrandom();\n\ttensor2.fillrandom();\n\tdouble error=0.0;\n\tdouble thresh=1.e-5;\n\n\tGenTensor<T> lrt1(tensor1,TensorArgs(1.e-4,tt));\n\tGenTensor<T> lrt2(tensor2,TensorArgs(1.e-4,tt));\n\n\ttensor1+=tensor2;\n\tlrt1+=lrt2;\n\tlrt1.reduce_rank(thresh);\n\n\tdouble error2=compute_difference(lrt1,tensor1);\n\tprint(\"error2\",error2);\n\terror+=error2;\n\n\n\treturn (error>1.e-8);\n}\n\n\n\ntemplate<typename T>\nint test_emul(const TensorType& tt) {\n\n\tprint(\"\\nentering test_emul\", tt);\n\tdouble error=1.e10;\n\n\tint maxrun=10;\n\n\t// there could be test fails due to randomness..\n\tfor (int i=0; i<maxrun; ++i) {\n\t\ttry {\n\t\t\tstd::vector<long> dim=make_dimensions(tt==TT_2D);\n\t\t\tTensor<T> tensor1(dim);\n\t\t\tTensor<T> tensor2(dim);\n\t\t\ttensor1.fillrandom();\n\t\t\ttensor2.fillrandom();\n\t\t\t// double thresh=1.e-5;\n\n\t\t\tGenTensor<T> lrt1(tensor1,TensorArgs(1.e-4,tt));\n\t\t\tGenTensor<T> lrt2(tensor2,TensorArgs(1.e-4,tt));\n\n\t\t\ttensor1.emul(tensor2);\n\t\t\tlrt1.emul(lrt2);\n\n\t\t\terror=compute_difference(lrt1,tensor1);\n\t\t\tprint(\"error\",error);\n\t\t\tbreak;\n\t\t} catch (const MadnessException& e) {\n\t\t\tif (std::string(e.what()) == \"emul in TensorTrain too large -- use full rank tensor\") {\n\t\t\t\tprint(\"e.what()\", e.what());\n\t\t\t\tprint(\"caught exception, retrying with smaller tensors\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthrow;\n\t\t}\n\t}\n\n\treturn (error>1.e-8);\n}\n\ntemplate<typename T>\nint test_convert() {\n\tprint(\"\\nentering test_convert\");\n\n\tTensor<T> tensor(10,10,10,10);\n\ttensor.fillrandom();\n\tdouble thresh=1.e-5;\n\n\tGenTensor<T> lrt(tensor);\n\tGenTensor<T> lrt1=lrt.convert(TensorArgs(TT_2D,thresh));\n\tGenTensor<T> lrt2=lrt.convert(TensorArgs(TT_TENSORTRAIN,thresh));\n\n\tGenTensor<T> lrt3=lrt1.convert(TensorArgs(TT_FULL,thresh));\n\tGenTensor<T> lrt4=lrt2.convert(TensorArgs(TT_FULL,thresh));\n\n\tGenTensor<T> lrt5=lrt2.convert(TensorArgs(TT_2D,thresh));\n\n\tdouble error1=compute_difference(lrt1,tensor);\n\tdouble error2=compute_difference(lrt2,tensor);\n\tdouble error3=compute_difference(lrt3,tensor);\n\tdouble error4=compute_difference(lrt4,tensor);\n\tdouble error5=compute_difference(lrt5,tensor);\n\tprint(\"error1\", error1);\n\tprint(\"error2\", error2);\n\tprint(\"error3\", error3);\n\tprint(\"error4\", error4);\n\tprint(\"error5\", error5);\n\n\treturn 0;\n\n}\n\ntemplate<typename T>\nint test_general_transform() {\n\tprint(\"\\nentering test_general_transform\");\n\n\tTensor<T> tensor(10,10,10,10);\n\tTensor<T> c(10,10);\n\ttensor.fillrandom();\n\tc.fillrandom();\n\tdouble thresh=1.e-5;\n\tTensor<double> cc[TENSOR_MAXDIM];\n\tfor (long idim=0; idim<4; idim++) {\n\t\tcc[idim]=Tensor<double>(10,10);\n\t\tcc[idim].fillrandom();\n\t}\n\n\tGenTensor<T> lrt1(tensor);\n\tGenTensor<T> lrt2(tensor,thresh,TT_TENSORTRAIN);\n\tGenTensor<T> lrt3(tensor,thresh,TT_2D);\n\tGenTensor<T> result1=general_transform(lrt1,cc);\n\tGenTensor<T> result2=general_transform(lrt2,cc);\n\tGenTensor<T> result3=general_transform(lrt3,cc);\n\n\tdouble error2=(result2.full_tensor_copy()-result1.full_tensor_copy()).normf();\n\tdouble error3=(result2.full_tensor_copy()-result1.full_tensor_copy()).normf();\n\tprint(\"error2\",error2);\n\tprint(\"error3\",error3);\n\n\treturn 0;\n}\n\n\ntemplate<typename T>\nint test_stuff() {\n\tdouble thresh=1.e-5;\n\tlong k=5;\n\tTensor<T> matrix(std::pow(k,3l),std::pow(k,3l));\n\n\tprint(\"k, thresh\",k,thresh);\n\tmatrix.fillindex();\n\tmatrix=matrix*(T(1.0)/matrix.normf());\n\n\tprintf(\"%15s %12s %12s %12s\\n\",\"method\",\"range\",\"error ratio\",\"time\");\n\n\tRandomizedMatrixDecomposition<T> rmd=RMDFactory().oversampling(10);\n\trmd.compute_range(matrix,thresh,{0,0});\n\n\tTensor<T> Q;\n\tif (not rmd.exceeds_maxrank()) Q=rmd.get_range();\n\n\tdouble error=RandomizedMatrixDecomposition<T>::check_range(matrix,Q);\n//\tprintf(\"dim(range), error ratio %d %12.8f\\n\",Q.dim(1),error/thresh);\n\n\tdouble wall0=wall_time();\n\tmatrix.fillrandom();\n\tmatrix=RandomizedMatrixDecomposition<T>::make_SVD_decaying_matrix(matrix,3);\n\tmatrix=matrix*(T(1.0)/matrix.normf());\n\tdouble wall1=wall_time();\n//\tprintf(\"wall  %12.8f\\n\",wall1-wall0);\n\n\n\twall0=wall_time();\n\tQ=rmd.compute_range(matrix,thresh*0.1,{0,0});\n\twall1=wall_time();\n\terror=RandomizedMatrixDecomposition<T>::check_range(matrix,Q);\n\tprintf(\"%15s %12ld %12.4f %12.8f\\n\",\"compute_range\",Q.dim(1),error/thresh,wall1-wall0);\n\n\twall0=wall_time();\n\tSVDTensor<T> st=SVDTensor<T>::compute_svd_from_range(Q,matrix.reshape(k,k,k,k,k,k));\n\twall1=wall_time();\n\terror=(st.reconstruct().flat()-matrix.flat()).normf();\n\tprintf(\"%15s %12ld %12.4f %12.8f\\n\",\"svd from range\",Q.dim(1),error/thresh,wall1-wall0);\n\n\twall0=wall_time();\n\tSVDTensor<T> st1(matrix,thresh);\n\twall1=wall_time();\n\terror=(st1.reconstruct().flat()-matrix.flat()).normf();\n\tprintf(\"%15s %12ld %12.4f %12.8f\\n\",\"svdtensor\",st1.rank(),error/thresh,wall1-wall0);\n\n\twall0=wall_time();\n\tTensorTrain<T> tt(matrix.reshape(k,k,k,k,k,k),thresh);\n\twall1=wall_time();\n\tauto ranks=tt.ranks();\n\tdouble tt_error=(matrix.flat()-tt.reconstruct(true)).normf();\n\tprintf(\"%15s %12ld %12.4f %12.8f\\n\",\"TT\",Q.dim(1),tt_error/thresh,wall1-wall0);\n\n\tTensor<T> U,VT;\n\tTensor<typename Tensor<T>::scalar_type> s;\n\twall0=wall_time();\n\tsvd(matrix,U,s,VT);\n\twall1=wall_time();\n\tint rank=SRConf<T>::max_sigma(thresh, s.size(), s);\n\tprintf(\"%15s %12d %12s %12.8f\\n\",\"svd\",rank,\"---\",wall1-wall0);\n\treturn 0;\n}\n\nint\nmain(int argc, char* argv[]) {\n\n\tmadness::default_random_generator.setstate(int(cpu_time())%4149);\n\tint success=0;\n\tsuccess+=test_stuff<double>();\n#if 1\n    success += test_constructor<double>();\n    success += test_constructor<double_complex>();\n\n//    success +=  test_reconstruct<double>();\n//    success +=  test_reconstruct<double_complex>();\n\n    success +=  test_convert<double>();\n    success +=  test_convert<double_complex>();\n\n    std::vector<TensorType> tt={TT_FULL,TT_2D,TT_TENSORTRAIN};\n    for (auto& t : tt) {\n    \tsuccess += test_addition<double>(t);\n    \tsuccess += test_sliced_addition<double>(t);\n    \tsuccess += test_reduce_rank<double>(t);\n    \tsuccess += test_emul<double>(t);\n    }\n\n    success += test_general_transform<double>();\n    success += test_general_transform<double_complex>();\n#endif\n\n    std::cout << \"Test \" << ((success==0) ? \"passed\" : \"did not pass\") << std::endl;\n\n    return success;\n}\n"
  },
  {
    "path": "src/madness/tensor/test_mtxmq.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include <madness/madness_config.h>\n\nbool smalltest = false;\n\n// Disable for now to facilitate CI \n//#if !(defined(X86_32) || defined(X86_64))\n\n//#include <iostream>\n//int main() {std::cout << \"x86 only\\n\"; return 0;}\n\n//#else\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n//#include <xmmintrin.h>\n\n#include <madness/world/safempi.h>\n#include <madness/world/posixmem.h>\n#include <madness/tensor/cblas.h>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/mxm.h>\n\nusing namespace madness;\n\n\n#define TIME_DGEMM\n#ifdef TIME_DGEMM\n\nvoid mTxm_dgemm(long ni, long nj, long nk, double* c, const double* a, const double*b ) {\n  double one=1.0;\n  cblas::gemm(cblas::NoTrans,cblas::Trans,nj,ni,nk,one,b,nj,a,ni,one,c,nj);\n}\n\n#endif\n\ndouble ran()\n{\n  static unsigned long seed = 76521;\n\n  seed = seed *1812433253 + 12345;\n\n  return ((double) (seed & 0x7fffffff)) * 4.6566128752458e-10;\n}\n\nvoid ran_fill(int n, double *a) {\n    while (n--) *a++ = ran();\n}\n\nvoid mTxm(long dimi, long dimj, long dimk,\n          double* c, const double* a, const double* b) {\n    int i, j, k;\n    for (k=0; k<dimk; ++k) {\n        for (j=0; j<dimj; ++j) {\n            for (i=0; i<dimi; ++i) {\n                c[i*dimj+j] += a[k*dimi+i]*b[k*dimj+j];\n            }\n        }\n    }\n}\n\nvoid crap(double rate, double fastest, double start) {\n    if (rate == 0) printf(\"darn compiler bug %e %e %lf\\n\",rate,fastest,start);\n}\n\n\nvoid timer(const char* s, long ni, long nj, long nk, double *a, double *b, double *c) {\n  double fastest=0.0, fastest_dgemm=0.0;\n\n  double nflop = 2.0*ni*nj*nk;\n  long loop;\n  for (int t=0; t<100; t++) {\n    double rate;\n    double start = SafeMPI::Wtime();\n    for (loop=0; loop<100; ++loop) {\n      mTxmq(ni,nj,nk,c,a,b);\n    }\n    start = SafeMPI::Wtime() - start;\n    rate = 1.e-9*nflop/(start/100.0);\n    crap(rate,fastest,start);\n    if (rate > fastest) fastest = rate;\n  }\n#ifdef TIME_DGEMM\n  for (int t=0; t<100; t++) {\n    double rate;\n    double start = SafeMPI::Wtime();\n    for (loop=0; loop<100; ++loop) {\n      mTxm_dgemm(ni,nj,nk,c,a,b);\n    }\n    start = SafeMPI::Wtime() - start;\n    rate = 1.e-9*nflop/(start/100.0);\n    crap(rate,fastest_dgemm,start);\n    if (rate > fastest_dgemm) fastest_dgemm = rate;\n  }\n#endif\n  printf(\"%20s %3ld %3ld %3ld %8.2f %8.2f\\n\",s, ni,nj,nk, fastest, fastest_dgemm);\n}\n\nvoid trantimer(const char* s, long ni, long nj, long nk, double *a, double *b, double *c) {\n  double fastest=0.0, fastest_dgemm=0.0;\n\n  double nflop = 3.0*2.0*ni*nj*nk;\n  long loop;\n  for (int t=0; t<100; t++) {\n    double rate;\n    double start = SafeMPI::Wtime();\n    for (loop=0; loop<100; ++loop) {\n      mTxmq(ni,nj,nk,c,a,b);\n      mTxmq(ni,nj,nk,a,c,b);\n      mTxmq(ni,nj,nk,c,a,b);\n    }\n    start = SafeMPI::Wtime() - start;\n    rate = 1.e-9*nflop/(start/100.0);\n    crap(rate,fastest,start);\n    if (rate > fastest) fastest = rate;\n  }\n#ifdef TIME_DGEMM\n  for (int t=0; t<100; t++) {\n    double rate;\n    double start = SafeMPI::Wtime();\n    for (loop=0; loop<100; ++loop) {\n      mTxm_dgemm(ni,nj,nk,c,a,b);\n      mTxm_dgemm(ni,nj,nk,a,c,b);\n      mTxm_dgemm(ni,nj,nk,c,a,b);\n    }\n    start = SafeMPI::Wtime() - start;\n    rate = 1.e-9*nflop/(start/100.0);\n    crap(rate,fastest_dgemm,start);\n    if (rate > fastest_dgemm) fastest_dgemm = rate;\n  }\n#endif\n  printf(\"%20s %3ld %3ld %3ld %8.2f %8.2f\\n\",s, ni,nj,nk, fastest, fastest_dgemm);\n}\n\nint main(int argc, char * argv[]) {\n\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n    \n    const long nimax=!smalltest ? 30*30 : 8*8;\n    const long njmax=!smalltest ? 100 : 20;\n    const long nkmax=!smalltest ? 100 : 20;\n    long ni, nj, nk, i, m;\n    double *a, *b, *c, *d;\n\n    SafeMPI::Init_thread(argc, argv, MPI_THREAD_SINGLE);\n\n    posix_memalign((void **) &a, 16, nkmax*nimax*sizeof(double));\n    posix_memalign((void **) &b, 16, nkmax*njmax*sizeof(double));\n    posix_memalign((void **) &c, 16, nimax*njmax*sizeof(double));\n    posix_memalign((void **) &d, 16, nimax*njmax*sizeof(double));\n\n    ran_fill(nkmax*nimax, a);\n    ran_fill(nkmax*njmax, b);\n\n\n/*     ni = nj = nk = 2; */\n/*     for (i=0; i<ni*nj; ++i) d[i] = c[i] = 0.0; */\n/*     mTxm (ni,nj,nk,c,a,b); */\n/*     mTxmq(ni,nj,nk,d,a,b); */\n/*     for (i=0; i<ni; ++i) { */\n/*       long j; */\n/*       for (j=0; j<nj; ++j) { */\n/* \tprintf(\"%2ld %2ld %.6f %.6f\\n\", i, j, c[i*nj+j], d[i*nj+j]); */\n/*       } */\n/*     } */\n/*     return 0; */\n\n    printf(\"Starting to test ... \\n\");\n    for (ni=1; ni<std::min(60L,nimax); ni+=1) {\n        for (nj=1; nj<std::min(60L,njmax); nj+=1) {\n            for (nk=1; nk<std::min(60L,nkmax); nk+=1) {\n                for (i=0; i<ni*nj; ++i) d[i] = c[i] = 0.0;\n                mTxm (ni,nj,nk,c,a,b);\n                mTxmq(ni,nj,nk,d,a,b);\n                for (i=0; i<ni*nj; ++i) {\n                    double err = std::abs(d[i]-c[i]);\n                    /* This test is sensitive to the compilation options.\n                       Be sure to have the reference code above compiled\n                       -msse2 -fpmath=sse if using GCC.  Otherwise, to\n                       pass the test you may need to change the threshold\n                       to circa 1e-13.\n                    */\n                    if (err > 1e-13) {\n                        printf(\"test_mtxmq: error %ld %ld %ld %e\\n\",ni,nj,nk,err);\n                        exit(1);\n                    }\n                }\n            }\n        }\n    }\n    printf(\"... OK!\\n\");\n\n    if (!smalltest) {\n        printf(\"%20s %3s %3s %3s %8s %8s (GF/s)\\n\", \"type\", \"M\", \"N\", \"K\", \"LOOP\", \"BLAS\");\n        for (ni=2; ni<60; ni+=2) timer(\"(m*m)T*(m*m)\", ni,ni,ni,a,b,c);\n        for (m=2; m<=30; m+=2) timer(\"(m*m,m)T*(m*m)\", m*m,m,m,a,b,c);\n        for (m=2; m<=30; m+=2) trantimer(\"tran(m,m,m)\", m*m,m,m,a,b,c);\n        for (m=2; m<=20; m+=2) timer(\"(20*20,20)T*(20,m)\", 20*20,m,20,a,b,c);\n    }\n\n    SafeMPI::Finalize();\n\n    return 0;\n}\n\n//#endif\n"
  },
  {
    "path": "src/madness/tensor/test_solvers.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <madness/tensor/solvers.h>\n\nusing namespace madness;\nusing namespace std;\n\nstruct Test : public OptimizationTargetInterface {\n    bool provides_gradient() const {return true;}\n\n    double value(const Tensor<double>& x) {\n        return 0.5*3.0*x.sumsq();\n    }\n\n    Tensor<double> gradient(const Tensor<double>& x) {\n        return x*3.0;\n    }\n};\n\n\nstruct Test2 : public OptimizationTargetInterface {\n    bool provides_gradient() const {return true;}\n\n    double value(const Tensor<double>& x) {\n        double v = 1.0;\n        for (int i=0; i<x.dim(0); ++i) {\n            v *= cos((i+1)*x[i]);\n        }\n        return v;\n    }\n\n    Tensor<double> gradient(const Tensor<double>& x) {\n        double v = value(x);\n        Tensor<double> g(x.dim(0));\n        for (int i=0; i<x.dim(0); ++i) {\n            g[i]= -v*(i+1)*sin((i+1)*x[i])/cos((i+1)*x[i]);\n        }\n        return g;\n    }\n};\n\n\n\nTensor<double> op(const Tensor<double>& x) {\n    const long n = x.dim(0);\n    Tensor<double> f(n);\n    for (long i=0; i<n; ++i) {\n        f(i) = (i + 1)*x[i]; // + 0.01*i*x[i]*x[i]*x[i];\n        for (long j=0; j<n; ++j)\n            f(i) += 0.0001*i*j*x[i]*x[i]*x[j]*x[j]/((i+1)*(j+1));\n    }\n    return f;\n}\n\ndouble dot_product(const Tensor<double>& a, const Tensor<double>& b) {\n    return a.trace(b);\n}\n\nint main() {\n\n    Tensor<double> x(5);\n    x.fillrandom();\n    QuasiNewton solver(std::shared_ptr<OptimizationTargetInterface>(new Test2));\n    solver.set_update(\"SR1\");\n    solver.optimize(x);\n    return 0;\n\n\n//     int n= 40;\n//     int maxiter = 100;\n//     int maxnvec = 20;\n//     Tensor<double> f(maxnvec,n), x(maxnvec,n), Q(maxnvec,maxnvec);\n\n//     int m = 0;\n//     x(0,_).fillrandom();\n//     for (int iter=0; iter<maxiter; ++iter) {\n//         print(\"\\nITERATION\", iter, m);\n//         f(m,_) = op(x(m,_));\n//         print(\"x\");\n//         print(x(m,_));\n//         print(f(m,_));\n\n//         for (int j=0; j<=m; ++j) {\n//             Q(j,m) = dot_product(x(j,_),f(m,_));\n//             Q(m,j) = dot_product(x(m,_),f(j,_));\n//         }\n\n//         Tensor<double> c = KAIN(Q(Slice(0,m),Slice(0,m)));\n//         print(\"THIS IS THE C I GOT\");\n//         print(c);\n\n//         {\n//             ++m;\n\n//             Tensor<double> xnew(n);\n//             for (int j=0; j<m; ++j) {\n//                 xnew += c(j)*(x(j,_) - f(j,_));\n//             }\n\n//             double steplen = (xnew-x(m-1,_)).normf();\n//             double xnorm = xnew.normf();\n//             if (steplen > 0.5) {\n//                 double damp = 0.5/steplen;\n//                 if (damp < 0.1) damp = 0.1;\n//                 print(\"restrictING\", steplen, xnorm, damp);\n//                 xnew = damp*xnew + (1.0-damp)*x(m-1,_);\n//             }\n\n//             if (m == maxnvec) {\n//                 for (int i=1; i<m; ++i) {\n//                     f(i-1,_) = f(i,_);\n//                     x(i-1,_) = f(i,_);\n//                 }\n//                 Q(Slice(0,-2),Slice(0,-2)) = copy(Q(Slice(1,-1),Slice(1,-1)));\n\n//                 m--;\n//             }\n//             x(m,_) = xnew;\n//         }\n//     }\n//     return 0;\n\n}\n"
  },
  {
    "path": "src/madness/tensor/test_systolic.cc",
    "content": "#include <madness/world/MADworld.h>\n#include <utility>\n#include <madness/tensor/tensor.h>\n#include <madness/tensor/systolic.h>\n\nusing namespace madness;\n\ntemplate <typename T>\nclass TestSystolicMatrixAlgorithm : public SystolicMatrixAlgorithm<T> {\n    volatile int niter;\npublic:\n    TestSystolicMatrixAlgorithm(DistributedMatrix<T>& A, int tag)\n        : SystolicMatrixAlgorithm<T>(A, tag)\n        , niter(0)\n    {\n        madness::print(\"Testing SystolicMatrixAlgorithm \",\n                       SystolicMatrixAlgorithm<T>::get_coldim(),\n                       SystolicMatrixAlgorithm<T>::get_rowdim());\n    }\n    \n    void kernel(int i, int j, T* rowi, T* rowj) {\n        for (int k=0; k < SystolicMatrixAlgorithm<T>::get_rowdim(); ++k) {\n            MADNESS_CHECK(rowi[k] == i);\n            MADNESS_CHECK(rowj[k] == j);\n        }\n    }\n    \n    void start_iteration_hook(const TaskThreadEnv& env) {\n        int id = env.id();\n        if (id == 0) {\n            ++niter;\n        }\n    }\n    \n    bool converged(const TaskThreadEnv& env) const {\n        if (niter >= 3) {\n            if (env.id() == 0) {\n                madness::print(\"    done!\");\n            }\n            return true;\n        }\n        else {\n            return false;\n        }\n    }\n};\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n    redirectio(world);\n\n    try {\n        for (int64_t n=1; n<100; ++n) {\n            int64_t m = 2*n;\n            DistributedMatrix<double> A = column_distributed_matrix<double>(world, n, m);\n            int64_t ilo, ihi;\n            A.local_colrange(ilo, ihi);\n            for (int i=ilo; i<=ihi; ++i) A.data()(i-ilo,_) = i;\n\n            world.taskq.add(new TestSystolicMatrixAlgorithm<double>(A, 3333));\n            world.taskq.fence();\n\n            for (int i=ilo; i<=ihi; ++i) {\n                for (int k=0; k<m; ++k) {\n                    MADNESS_CHECK(A.data()(i-ilo,k) == i);\n                }\n            }\n        }\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const madness::TensorException& e) {\n        print(e);\n        error(\"caught a Tensor exception\");\n    }\n    catch (char* s) {\n        print(s);\n        error(\"caught a c-string exception\");\n    }\n//    catch (const char* s) {\n//        print(s);\n//        error(\"caught a c-string exception\");\n//    }\n    catch (const std::string& s) {\n        print(s);\n        error(\"caught a string (class) exception\");\n    }\n    catch (const std::exception& e) {\n        print(e.what());\n        error(\"caught an STL exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    world.gop.fence();\n    finalize();\n}\n"
  },
  {
    "path": "src/madness/tensor/test_tensor.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/// \\file tensor/test.cc\n/// \\brief New test code for Tensor class using Google unit test\n\n#include <madness/tensor/tensor.h>\n#include <madness/world/print.h>\n\n#ifdef MADNESS_HAS_GOOGLE_TEST\n\n// The test code deliberately uses only the dumb ITERATOR macros\n// in order to test the optimized iterators used by the implementation.\n\nusing madness::_;\nusing madness::___;\nusing madness::_reverse;\n\n#include <iostream>\n#include <gtest/gtest.h>\n\nnamespace {\n\n    template <typename T> double mynorm(T x) {\n        return ((double) x)*x;\n    }\n\n//    template <> double mynorm<float_complex>(float_complex x) {\n//        return (double) std::norm(x);\n//    }\n//\n//    template <> double mynorm<double_complex>(double_complex x) {\n//        return (double) std::norm(x);\n//    }\n\n    template <typename T, typename Q>\n    inline\n    bool\n    check(const T& t, const Q& q, double tol=1e-7) {\n        double err = std::abs(t - (T)q)/std::max<double>(std::abs(t),1.0);\n        bool ok = (err <= tol);\n        if (!ok) {\n            std::cout.setf(std::ios::scientific);\n            std::cout << \"check failed \" << t << \" \" << q << \" \" << err << \" \" << tol << std::endl;\n        }\n        return ok;\n    }\n\n    template <typename T>\n    class TensorTest : public ::testing::Test {\n    public:\n        TensorTest() {}\n\n        virtual ~TensorTest() {}\n\n        virtual void SetUp() {}\n\n        virtual void TearDown() {}\n\n        static T* move_test_ptr;\n\n        static madness::Tensor<T> f() { // For testing move semantics\n            madness::Tensor<T> result(3);\n            move_test_ptr = result.ptr();\n            return result;\n        }\n    };\n\n    template <typename T> T* TensorTest<T>::move_test_ptr;\n\n    typedef ::testing::Types<int, long, float, double, float_complex, double_complex> TensorTestTypes;\n    TYPED_TEST_CASE(TensorTest, TensorTestTypes);\n\n    TYPED_TEST(TensorTest, Basic) {\n        for (int ndim=1; ndim<=TENSOR_MAXDIM; ++ndim) {\n            try {\n                std::vector<long> dim(ndim);\n                for (int pass=0; pass<10; ++pass) {\n                    long nelem = 1;\n                    for (int i=0; i<ndim; ++i) {\n                        dim[i] = (madness::RandomValue<long>()&0x5) + 1;\n                        nelem *= dim[i];\n                    }\n\n                    // Use ASSERT not EXPECT otherwise we get a huge volume of output\n                    // from failing tests.  Also, subsequent tests usually rely on\n                    // succcess of previous ones.\n\n                    madness::Tensor<TypeParam> empty; // Verify default constructor\n                    ASSERT_EQ(empty.size(),0);\n                    ASSERT_EQ(empty.ptr(),(TypeParam*)0);\n                    ASSERT_EQ(empty.ndim(),-1);\n                    ASSERT_EQ(int(empty.id()),int(madness::TensorTypeData<TypeParam>::id));\n\n                    madness::Tensor<TypeParam> d(dim);\n                    ASSERT_EQ(int(d.id()),int(madness::TensorTypeData<TypeParam>::id));\n                    ASSERT_EQ(d.ndim(),ndim);\n                    ASSERT_EQ(d.size(),nelem);\n                    ASSERT_NE(d.ptr(),(TypeParam*)0);\n                    for (int i=0; i<ndim; ++i) {\n                        ASSERT_EQ(d.dim(i),dim[i]);\n                    }\n                    // Should be initialized to zero\n                    ITERATOR(d, ASSERT_EQ(d(IND),TypeParam(0)));\n\n                    d.fillindex();   // Check fillindex and indexing\n                    ITERATOR(d, ASSERT_EQ(d(IND),TypeParam(_index)));\n\n                    d.fill(TypeParam(33)); // Check fill\n                    ITERATOR(d, ASSERT_EQ(d(IND),TypeParam(33)));\n\n                    d = TypeParam(21);     // Check fill\n                    ITERATOR(d, ASSERT_EQ(d(IND),TypeParam(21)));\n\n                    madness::Tensor<TypeParam> q(d); // Copy constructor\n                    ASSERT_EQ(int(q.id()),int(madness::TensorTypeData<TypeParam>::id));\n                    ASSERT_EQ(q.ptr(),d.ptr()); // Was it shallow?\n                    ASSERT_EQ(int(q.id()),int(madness::TensorTypeData<TypeParam>::id));\n                    ASSERT_EQ(q.ndim(),ndim);\n                    ASSERT_EQ(q.size(),nelem);\n                    ITERATOR(d, ASSERT_EQ(q(IND),d(IND)));\n\n                    q.clear();  // Check that clear is working\n                    ASSERT_EQ(q.size(),0);\n                    ASSERT_EQ(q.ptr(),(TypeParam*)0);\n                    ASSERT_EQ(q.ndim(),-1);\n                    ASSERT_EQ(int(q.id()),int(madness::TensorTypeData<TypeParam>::id));\n\n                    q = d;    // Assignment\n                    ASSERT_EQ(q.ptr(),d.ptr()); // Was it shallow?\n                    ITERATOR(d, ASSERT_EQ(q(IND),d(IND)));\n\n                    q = copy(d); // Deep copy\n                    ASSERT_NE(q.ptr(),d.ptr()); // Was it deep?\n                    ITERATOR(d, ASSERT_EQ(q(IND),d(IND)));\n\n                    madness::Tensor<TypeParam> r = TensorTest<TypeParam>::f(); // Should invoke move semantics\n                    ASSERT_EQ(r.ptr(),TensorTest<TypeParam>::move_test_ptr);\n\n                    r.clear();  // Does clear work?\n                    ASSERT_EQ(r.size(),0);\n                    ASSERT_EQ(r.ptr(),(TypeParam*)0);\n                    ASSERT_EQ(r.ndim(),-1);\n                    ASSERT_EQ(int(r.id()),int(madness::TensorTypeData<TypeParam>::id));\n\n                    r = TensorTest<TypeParam>::f(); // Should invoke move semantics\n                    ASSERT_EQ(r.ptr(),TensorTest<TypeParam>::move_test_ptr);\n\n                    q.fillindex();\n\n                    d.fillindex();\n\n                    q *= TypeParam(2); // Check inplace scaling\n                    d.scale(TypeParam(3));\n                    ITERATOR(q, ASSERT_EQ(q(IND),TypeParam(_index*2)));\n                    ITERATOR(d, ASSERT_EQ(d(IND),TypeParam(_index*3)));\n\n                    d += TypeParam(2); // Check inplace scalar addition\n                    ITERATOR(q, ASSERT_EQ(q(IND),TypeParam(_index*2)));\n                    ITERATOR(d, ASSERT_EQ(d(IND),TypeParam(_index*3+2)));\n\n                    d -= q;     // Check inplace tensor subtraction\n                    ITERATOR(q, ASSERT_EQ(q(IND),TypeParam(_index*2)));\n                    ITERATOR(d, ASSERT_EQ(d(IND),TypeParam(_index+2)));\n\n                    d += q;     // Check inplace tensor addition\n                    ITERATOR(q, ASSERT_EQ(q(IND),TypeParam(_index*2)));\n                    ITERATOR(d, ASSERT_EQ(d(IND),TypeParam(_index*3+2)));\n                }\n            }\n            catch (const madness::TensorException& e) {\n                if (ndim != 0) std::cout << e;\n                EXPECT_EQ(ndim,0);\n            }\n            catch(...) {\n                std::cout << \"Caught unknown exception\" << std::endl;\n                EXPECT_EQ(1,0);\n            }\n        }\n    }\n\n    TYPED_TEST(TensorTest, Slicing1d) {\n        madness::Tensor<TypeParam> t(5L);\n        t(_) = 3;\n        ITERATOR(t,EXPECT_EQ(t(IND),TypeParam(3)));\n    }\n\n\n    TYPED_TEST(TensorTest, SliceAndDice) {\n        madness::Tensor<TypeParam> a(5,6,7), b;\n\n        a.fillindex();\n        ITERATOR3(a,ASSERT_EQ(a(_,_,_)(IND3),a(IND3)));\n\n        b = a(___);\n        ITERATOR3(b,ASSERT_EQ(b(IND3),a(IND3)));\n        b.fillrandom();      // verify it is indeed a view of the same thing\n        ITERATOR3(b,ASSERT_EQ(b(IND3),a(IND3)));\n\n        b = a(_reverse,_,_);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(4-_i,_j,_k)));\n        b.fillrandom();      // verify it is indeed a view of the same thing\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(4-_i,_j,_k)));\n\n        b = a(_,_reverse,_);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k),a(_i,5-_j,_k)));\n        b.fillrandom();      // verify it is indeed a view of the same thing\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k),a(_i,5-_j,_k)));\n\n        b = a(_,_,_reverse);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k),a(_i,_j,6-_k)));\n        b.fillrandom();      // verify it is indeed a view of the same thing\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k),a(_i,_j,6-_k)));\n\n        // Middle of each dimension\n        b = a(madness::Slice(1,-2,1),madness::Slice(3,-2,1),madness::Slice(2,-2,1));\n        ASSERT_EQ(b.dim(0),(a.dim(0)-2));\n        ASSERT_EQ(b.dim(1),(a.dim(1)-4));\n        ASSERT_EQ(b.dim(2),(a.dim(2)-3));\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k),a(1+_i,_j+3,2+_k)));\n\n        // subpatch assignment, chaining, defaulting args on slice ...\n        // 5 6 7 view property\n        a.fill(0);\n        b = a(madness::Slice(1,-1),madness::Slice(1,-2),madness::Slice(2,-2)) = TypeParam(1);\n        ASSERT_EQ(long(std::abs(a.sum())+0.1), (a.dim(0)-1)*(a.dim(1)-2)*(a.dim(2)-3));\n        ITERATOR3(b,ASSERT_EQ(b(IND3), TypeParam(1)));\n        ITERATOR3(b,ASSERT_EQ(a(_i+1,_j+1,_k+2), TypeParam(1)));\n\n        // elimination of dimensions\n        a.fill(0);\n        b = a(2,_,_) = TypeParam(1);\n        ASSERT_EQ(b.ndim(),2);\n        ASSERT_EQ(b.dim(0),a.dim(1));\n        ASSERT_EQ(b.dim(1),a.dim(2));\n        ITERATOR2(b,ASSERT_EQ(b(IND2), a(2,_i,_j)));\n\n        // interaction with reordering, etc\n        b = a.swapdim(0,2)(_,-1,_);//  a(i,j,k)->a(k,j,i)->b(k,i) with j=last\n        ASSERT_TRUE(a.iscontiguous());\n        ASSERT_FALSE(b.iscontiguous());\n        ASSERT_EQ(b.ndim(),2);\n        ASSERT_EQ(b.dim(0),a.dim(2));\n        ASSERT_EQ(b.dim(1),a.dim(0));\n        ITERATOR2(b,ASSERT_EQ(b(IND2),a(_j,5,_i)));\n\n        // from my slice to your slice, ...\n        b = madness::Tensor<TypeParam>(5,6,7);\n        ASSERT_EQ(b.normf(),TypeParam(0));\n        b.fillindex();\n\n        a = TypeParam(0);\n        a(___) = b(___);\n\n        ASSERT_NE(a.ptr(),b.ptr()); // Ensure it was deep\n        ITERATOR3(a,ASSERT_EQ(a(IND3),b(IND3)));\n\n        madness::Tensor<long> g(5,6,7);\n        a.fill(0);\n        g.fillindex();\n        a(___) = g(___);\t\t// test mixed type slice assignment\n        ITERATOR3(a,ASSERT_EQ(a(IND3),TypeParam(g(IND3))));\n\n        // test filling a sub patch\n        b = madness::Tensor<TypeParam>(5,6,7);\t\t// Fresh ones to be clear about what we have\n        a = madness::Tensor<TypeParam>(5,6,7);\n        b.fillrandom();\n        std::vector<madness::Slice> patch = madness::vector_factory(madness::Slice(1,-2),madness::Slice(1,-2),madness::Slice(1,-2));\n\n        a.fill(0);\n        madness::Tensor<TypeParam> c = a(patch) = b(patch);\n        ITERATOR3(c,ASSERT_EQ(c(_i,_j,_k), a(_i+1,_j+1,_k+1)));\n        ITERATOR3(c,ASSERT_EQ(c(_i,_j,_k), b(_i+1,_j+1,_k+1)));\n\n        // check did not go out of bounds\n        typedef typename madness::TensorTypeData<TypeParam>::scalar_type machine_prec;\n        machine_prec small=2.0*std::numeric_limits<machine_prec>::epsilon();\n        EXPECT_NEAR(c.normf(), a.normf(), small*a.normf());\n        EXPECT_NEAR(b(patch).normf(), a.normf(), small*a.normf());\n\n        // patch assignment interaction with reordering of source and target\n\n        a = madness::Tensor<TypeParam>(7,6,5);\n        b = madness::Tensor<TypeParam>(5,7,6);\n\n        a = a.swapdim(0,2);\n        a(patch).fillindex();\n        b = b.swapdim(1,2);\n        b(patch) = a(patch);\t\t// Assign patch of reordered a to patch of b.\n\n        long n = a(patch).size();\n        ASSERT_EQ(long(std::abs(a.sum())), n*(n-1)/2);\n        ASSERT_EQ(long(std::abs(b.sum())),n*(n-1)/2);\n        ITERATOR3(c,ASSERT_EQ(a(_i,_j,_k), b(_i,_j,_k)));\n    }\n\n\n    TYPED_TEST(TensorTest, Transpose) {\n        for (long n=1; n<=21; ++n) {\n            madness::Tensor<TypeParam> a(n,n+3);\n            ASSERT_TRUE(a.iscontiguous());\n            ASSERT_EQ(a.size(),n*(n+3));\n            a.fillrandom();\n            ITERATOR(a, ASSERT_NE(a(IND),TypeParam(0)));\n\n            madness::Tensor<TypeParam> aT = transpose(a);\n            ASSERT_TRUE(aT.iscontiguous());\n            ASSERT_EQ(aT.size(),n*(n+3));\n            ASSERT_NE(aT.ptr(),a.ptr()); // Was it deep?\n            ITERATOR2(aT, ASSERT_EQ(aT(_i,_j),a(_j,_i)));\n\n            a.fillrandom();\n            aT.clear();\n            aT = transpose(a);\n            ASSERT_EQ(aT.size(),n*(n+3));\n            ASSERT_TRUE(a.iscontiguous());\n            ASSERT_TRUE(aT.iscontiguous());\n            ASSERT_NE(aT.ptr(),a.ptr()); // Was it deep?\n            ITERATOR2(aT, ASSERT_EQ(aT(_i,_j),a(_j,_i)));\n\n            aT = a.swapdim(0,1);\n            ASSERT_EQ(aT.size(),n*(n+3));\n            ASSERT_TRUE(a.iscontiguous());\n            ASSERT_FALSE(aT.iscontiguous());\n            ASSERT_EQ(aT.ptr(),a.ptr()); // Was it shallow?\n            ITERATOR2(aT, ASSERT_EQ(aT(_i,_j),a(_j,_i)));\n        }\n    }\n\n\n    TYPED_TEST(TensorTest, Reshaping) {\n        madness::Tensor<TypeParam>  a(4,6,10);\n        a.fillrandom();\n\n        EXPECT_THROW(a.reshape(4), madness::TensorException);\n\n        madness::Tensor<TypeParam> b = a.reshape(3,2,2,5,2,2);\n        long i=0;\n        ITERATOR6(b,ASSERT_EQ(b(IND6), a.ptr()[i++]));\n\n        b = a.reshape(30,8);\n        i = 0;\n        ITERATOR2(b,ASSERT_EQ(b(IND2), a.ptr()[i++]));\n\n        b = a.flat();\n        i = 0;\n        ITERATOR1(b,ASSERT_EQ(b(IND1), a.ptr()[i++]));\n\n        b = a.reshape(240);\n        i = 0;\n        ITERATOR1(b,ASSERT_EQ(b(IND1), a.ptr()[i++]));\n\n        b = a.swapdim(1,2);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(_i,_k,_j)));\n\n        EXPECT_TRUE(a.iscontiguous());\n        EXPECT_FALSE(b.iscontiguous());\n\n        b = a.swapdim(0,2);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(_k,_j,_i)));\n\n        EXPECT_THROW(b.reshape(240), madness::TensorException);\n        EXPECT_THROW(b.flat(), madness::TensorException);\n\n        b = a.cycledim(1,0,-1);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(_j,_k,_i)));\n\n        b = a.cycledim(-1,0,-1);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(_k,_i,_j)));\n\n        b = b.cycledim(-1,0,-1);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(_j,_k,_i)));\n\n        b = b.cycledim(-1,0,-1);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(_i,_j,_k)));\n\n        b = a.cycledim(1,0,1);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(_j,_i,_k)));\n\n        b = b.cycledim(1,0,1);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(_i,_j,_k)));\n\n        b = a.cycledim(2,0,-1);\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(_k,_i,_j)));\n\n        b = a.mapdim(madness::vector_factory<long>(1,0,2));\n        ITERATOR3(b,ASSERT_EQ(b(_i,_j,_k), a(_j,_i,_k)));\n    }\n\n//     TYPED_TEST(TensorTest, Container) {\n//         typedef madness::ConcurrentHashMap< int, Tensor<TypeParam> > containerT;\n//         static const int N = 100;\n//         containerT c;\n//         Tensor<TypeParam> a[N];\n//         for (int i=0; i<N; ++i) {\n\n//         }\n//     }\n\n}\n\nint main(int argc, char** argv) {\n    ::testing::InitGoogleTest(&argc, argv);\n    return RUN_ALL_TESTS();\n}\n\n#else\n\n#include <iostream>\nint main() {\n    std::cout << \"U need to build with Google test to enable the tensor test code\\n\";\n    return 0;\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/tensor/testseprep.cc",
    "content": "\n/// \\file testSepRep.cc\n/// \\brief test the SeparatedRepresentation (SepRep) for representing matrices\n\n#include <madness/tensor/gentensor.h>\n\nusing namespace madness;\n\nbool is_small(const double& val, const double& eps) {\n\treturn (val<eps);\n}\n\nstd::string ok(const bool b) {if (b) return \"ok   \"; return \"fail \";};\n\nbool is_large(const double& val, const double& eps) {\n\treturn (val>eps);\n}\n#if HAVE_GENTENSOR\n\nint testGenTensor_ctor(const long& k, const long& dim, const double& eps, const TensorType& tt) {\n\n\tprint(\"entering ctor\");\n\n\t// set up three tensors (zeros, rank 2, full rank)\n\tstd::vector<long> d(dim,k);\n\tstd::vector<Tensor<double> > t(3);\n\n\tt[0]=Tensor<double>(d);\n\tt[1]=Tensor<double>(d).fillindex();\n\tt[2]=Tensor<double>(d).fillrandom();\n\n\tdouble norm=0.0;\n\tint nerror=0;\n\n\t// ctor with rhs=Tensor, deep\n\tfor (int i=0; i<3; i++) {\n\t\tTensor<double> t0=copy(t[i]);\n\n\t\tGenTensor<double> g0(t0,eps,tt);\n\t\tnorm=(t0-g0.full_tensor_copy()).normf();\n\t\tprint(ok(is_small(norm, eps)), \"ctor with rhs=Tensor/1 \",g0.what_am_i(),g0.rank(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\n\t\t// test deepness\n\t\tt0+=(2.0);\n\t\tt0.scale(2.0);\n\t\tnorm=(t0-g0.full_tensor_copy()).normf();\n\t\tprint(ok(is_large(norm, eps)), \"ctor with rhs=Tensor/2 \",g0.what_am_i(),g0.rank(),norm);\n\t\tif (!is_large(norm,eps)) nerror++;\n\t}\n\n\t// ctor with rhs=GenTensor, shallow\n\tfor (int i=0; i<3; i++) {\n\n\t\tTensor<double> t0=copy(t[i]);\n\t\tGenTensor<double> g0(t0,eps,tt);\n\t\tGenTensor<double> g1(g0);\n\t\tnorm=(g0.full_tensor_copy()-g1.full_tensor_copy()).normf();\n\t\tprint(ok(is_small(norm,eps)),\"ctor with rhs=GenTensor/1 \",g1.what_am_i(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\n\t\t// test deepness\n\t\tg0.scale(2.0);\n\t\tnorm=(g0.full_tensor_copy()-g1.full_tensor_copy()).normf();\n\t\tprint(ok(is_small(norm, eps)), \"ctor with rhs=GenTensor/2 \",g1.what_am_i(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\t}\n\n\t// deep ctor using copy()\n\tfor (int i=0; i<3; i++) {\n\t\tTensor<double> t0=copy(t[i]);\n\t\tGenTensor<double> g0(t0,eps,tt);\n\t\tGenTensor<double> g1(copy(g0));\n\t\tnorm=(g0.full_tensor_copy()-g1.full_tensor_copy()).normf();\n\t\tprint(ok(is_small(norm,eps)),\"ctor with rhs=GenTensor, using copy()\",g1.what_am_i(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\n\t\t// test deepness\n\t\tg0.scale(3.0);\n\t\tnorm=(g0.full_tensor_copy()-g1.full_tensor_copy()).normf();\n\t\tdouble norm2=g0.normf();\t// if t0 is empty\n\t\tif (norm2<eps) norm=1.0;\n\t\tprint(ok(is_large(norm, eps)), \"ctor with rhs=GenTensor, using copy()\",g1.what_am_i(),norm);\n\t\tif (!is_large(norm,eps)) nerror++;\n\t}\n\n\t// ctor with slices\n    for (int i=0; i<3; i++) {\n\n        std::vector<Slice> s(dim,Slice(0,1));\n\n        Tensor<double> t0=copy(t[i]);\n        Tensor<double> t1=copy(t0(s));\n        GenTensor<double> g0(t0,eps,tt);\n        GenTensor<double> g1=g0(s);\n        norm=(g1.full_tensor_copy()-t1).normf();\n        print(ok(is_small(norm,eps)),\"ctor with rhs=SliceGenTensor\",g1.what_am_i(),norm);\n        if (!is_small(norm,eps)) nerror++;\n\n    }\n\n\tprint(\"all done\\n\");\n\treturn nerror;\n}\n\nint testGenTensor_assignment(const long& k, const long& dim, const double& eps, const TensorType& tt) {\n\n\tprint(\"entering assignment\");\n\n\t// set up three tensors (zeros, rank 2, full rank)\n\tstd::vector<long> d(dim,k);\n\tstd::vector<Tensor<double> > t(3);\n\n\tt[0]=Tensor<double>(d);\n\tt[1]=Tensor<double>(d).fillindex();\n\tt[2]=Tensor<double>(d).fillrandom();\n\n\tstd::vector<Slice> s(dim,Slice(0,1));\n\n\tdouble norm=0.0;\n\tint nerror=0;\n\n\t// default ctor\n\tfor (int i=0; i<3; i++) {\n\t\tTensor<double> t0=t[i];\n\n\t\tGenTensor<double> g0(t0,eps,tt);\n\t\tGenTensor<double> g1(copy(g0));\n\t\tg1.scale(2.0);\n\t\tnorm=(g0.full_tensor_copy()-g1.full_tensor_copy()).normf();\n\t\tif (t0.normf()>eps) {\n\t\t\tprint(ok(is_large(norm,eps)),\"pre-assignment check\",g1.what_am_i(),norm);\n\t\t\tif (!is_large(norm,eps)) nerror++;\n\t\t}\n\t}\n\n\n\t// regular assignment: g1=g0\n\tfor (int i=0; i<3; i++) {\n\t\tfor (int j=0; j<3; j++) {\n\n\t\t\tTensor<double> t0=t[i];\n\t\t\tTensor<double> t1=t[j];\n\n\t\t\tGenTensor<double> g0(t0,eps,tt);\n\t\t\tGenTensor<double> g1(t1,eps,tt);\n\t\t\tg1=g0;\n\t\t\tnorm=(g0.full_tensor_copy()-g1.full_tensor_copy()).normf();\n\t\t\tprint(ok(is_small(norm,eps)),\"assignment with rhs=GenTensor/1\",g1.what_am_i(),norm);\n\t\t\tif (!is_small(norm,eps)) nerror++;\n\n\t\t\t// test deepness\n\t\t\tg1.scale(2.0);\n\t\t\tnorm=(g0.full_tensor_copy()-g1.full_tensor_copy()).normf();\n\t\t\tprint(ok(is_small(norm,eps)),\"assignment with rhs=GenTensor/2\",g1.what_am_i(),norm);\n\t\t\tif (!is_small(norm,eps)) nerror++;\n\t\t}\n\t}\n\n\t// regular assignment w/ copy: g1=copy(g0)\n\tfor (int i=0; i<3; i++) {\n\t\tfor (int j=0; j<3; j++) {\n\n\t\t\tTensor<double> t0=t[i];\n\t\t\tTensor<double> t1=t[j];\n\n\t\t\tGenTensor<double> g0(t0,eps,tt);\n\t\t\tGenTensor<double> g1(t1,eps,tt);\n\t\t\tg1=copy(g0);\n\t\t\tnorm=(g0.full_tensor_copy()-g1.full_tensor_copy()).normf();\n\t\t\tprint(ok(is_small(norm,eps)),\"copy assignment with rhs=GenTensor/1\",g1.what_am_i(),norm);\n\t\t\tif (!is_small(norm,eps)) nerror++;\n\n\t\t\t// test deepness\n\t\t\tg1.scale(2.0);\n\t\t\tnorm=(g0.full_tensor_copy()-g1.full_tensor_copy()).normf();\n\t\t\t// if t0 is zero\n\t\t\tif (t0.normf()>eps) {\n\t\t\t\tprint(ok(is_large(norm,eps)),\"copy assignment with rhs=GenTensor/2\",g1.what_am_i(),norm);\n\t\t\t\tif (!is_large(norm,eps)) nerror++;\n\t\t\t}\n\t\t}\n\t}\n\n\t// regular assignment: g1=number\n\t{\n\n\t}\n\n\n\t// sliced assignment: g1=g0(s)\n\tfor (int i=0; i<3; i++) {\n\t\tfor (int j=0; j<3; j++) {\n\n\t\t\tTensor<double> t0=t[i];\n\t\t\tTensor<double> t1=t[j];\n\n\t\t\tGenTensor<double> g0(t0,eps,tt);\n\t\t\tGenTensor<double> g1(t1,eps,tt);\n\n\t\t\tg1=g0;\n\t\t\tg1.scale(34.0);\n\t\t\tg1=g0(s);\n\t\t\tnorm=(g0.full_tensor_copy()(s)-g1.full_tensor_copy()).normf();\n\t\t\tprint(ok(is_small(norm,eps)),\"sliced assignment g1=g0(s) /1\",g1.what_am_i(),norm);\n\t\t\tif (!is_small(norm,eps)) nerror++;\n\n\n\t\t\t// test deepness\n\t\t\tg1.scale(2.0);\n\t\t\tnorm=(g0.full_tensor_copy()(s)-g1.full_tensor_copy()).normf();\n\t\t\tif (t0.normf()>eps) {\n\t\t\t\tprint(ok(is_large(norm,eps)),\"sliced assignment g1=g0(s) /2\",g1.what_am_i(),norm);\n\t\t\t\tif (!is_large(norm,eps)) nerror++;\n\t\t\t}\n\t\t}\n\t}\n\n\t// sliced assignment: g1(s)=g0\n\t{\n\t}\n\n\n\n\n\t// sliced assignment: g1(s)=g0(s)\n\t{\n\t}\n\n\t// sliced assignment: g1(s)=number\n\tfor (int i=0; i<3; i++) {\n\n\t\tTensor<double> t0=t[i];\n\n\t\tGenTensor<double> g0(t0,eps,tt);\n\t\tTensor<double> t2=copy(t0);\n\t\tg0(s)=0.0;\n\t\tt2(s)=0.0;\n\t\tnorm=(t2-g0.full_tensor_copy()).normf();\n\t\tprint(ok(is_small(norm,eps)),\"sliced assignment with rhs=0.0\",g0.what_am_i(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\t}\n\n\t// assign to a number\n    // sliced assignment: g1(s)=number\n    for (int i=0; i<3; i++) {\n\n        Tensor<double> t0=copy(t[i]);\n        GenTensor<double> g0(t0,eps,tt);\n        g0=2.0;\n        t0=2.0;\n        norm=(t0-g0.full_tensor_copy()).normf();\n        print(ok(is_small(norm,eps)),\"assignment with a number\",g0.what_am_i(),norm);\n        if (!is_small(norm,eps)) nerror++;\n    }\n\n\tprint(\"all done\\n\");\n\treturn nerror;\n\n}\n\nint testGenTensor_algebra(const long& k, const long& dim, const double& eps, const TensorType& tt) {\n\n\tprint(\"entering algebra\");\n\n\t// set up three tensors (zeros, rank 2, full rank)\n\tstd::vector<long> d(dim,k);\n\tstd::vector<Tensor<double> > t(3);\n\n\tt[0]=Tensor<double>(d);\n\tt[1]=Tensor<double>(d).fillindex();\n\tt[2]=Tensor<double>(d).fillrandom();\n\tdouble t1norm=t[1].normf();\n    double t2norm=t[2].normf();\n    t[1].scale(1./t1norm)*2.1375;\n    t[2].scale(1./t2norm)*137.72;\n\n\tstd::vector<Slice> s(dim,Slice(0,1));\n\n//\tTensor<double> t2=copy(t0(s));\n\n\tdouble norm=0.0;\n\tint nerror=0;\n\n\t// test inplace add: g0+=g1\n\tfor (int i=0; i<3; i++) {\n\t\tfor (int j=0; j<3; j++) {\n\n\t\t\tTensor<double> t0=copy(t[i]);\n\t\t\tTensor<double> t1=copy(t[j]);\n\n\t\t\tGenTensor<double> g0(t0,eps,tt);\n\t\t\tGenTensor<double> g1(t1,eps,tt);\n\n\t\t\tg0+=g1;\n\t\t\tt0+=t1;\n\t\t\tnorm=(g0.full_tensor_copy()-t0).normf();\n\t\t\tprint(ok(is_small(norm,eps)),\"algebra g0+=g1      \",g0.what_am_i(),norm);\n\t\t\tif (!is_small(norm,eps)) nerror++;\n\t\t}\n\t}\n\n\n\t// test inplace add: g0+=g1(s)\n\tfor (int i=0; i<3; i++) {\n\t\tfor (int j=0; j<3; j++) {\n\n\t\t\tTensor<double> t0=copy(t[i](s));\n\t\t\tTensor<double> t1=copy(t[j]);\n\n\t\t\tGenTensor<double> g0(t0,eps,tt);\n\t\t\tGenTensor<double> g1(t1,eps,tt);\n\n\t\t\tg0+=g1(s);\n\t\t\tt0+=t1(s);\n\t\t\tnorm=(g0.full_tensor_copy()-t0).normf();\n\t\t\tprint(ok(is_small(norm,eps)),\"algebra g0+=g1(s)   \",g0.what_am_i(),norm);\n\t\t\tif (!is_small(norm,eps)) nerror++;\n\t\t}\n\t}\n\n\n\t// test inplace add: g0(s)+=g1(s)\n\tfor (int i=0; i<3; i++) {\n\t\tfor (int j=0; j<3; j++) {\n\n\t\t\tTensor<double> t0=copy(t[i]);\n\t\t\tTensor<double> t1=copy(t[j]);\n\n\t\t\tGenTensor<double> g0(t0,eps,tt);\n\t\t\tGenTensor<double> g1(t1,eps,tt);\n\n\t\t\tg0(s)+=g1(s);\n\t\t\tt0(s)+=t1(s);\n\t\t\tnorm=(g0.full_tensor_copy()-t0).normf();\n\t\t\tprint(ok(is_small(norm,eps)),\"algebra g0(s)+=g1(s)\",g0.what_am_i(),norm,g0.rank());\n\t\t\tif (!is_small(norm,eps)) nerror++;\n\t\t}\n\t}\n\n\t// test inplace scale: g=g0*=fac\n    for (int i=0; i<3; i++) {\n        for (int j=0; j<3; j++) {\n\n            Tensor<double> t0=copy(t[i]);\n            Tensor<double> t1=copy(t[j]);\n            GenTensor<double> g0(t0,eps,tt);\n            GenTensor<double> g2=g0.scale(2.0);\n            Tensor<double> t2=t0.scale(2.0);\n            norm=(g0.full_tensor_copy()-t0).normf();\n            print(ok(is_small(norm,eps)),\"algebra scale\",g0.what_am_i(),norm);\n            if (!is_small(norm,eps)) nerror++;\n        }\n\t}\n\n    // test elementwise multiplication emul:\n    for (int i=0; i<3; i++) {\n        for (int j=0; j<3; j++) {\n\n            Tensor<double> t0=copy(t[i]);\n            Tensor<double> t1=copy(t[j]);\n            GenTensor<double> g0(t0,eps,tt);\n            GenTensor<double> g1(t1,eps,tt);\n            g1.emul(g0);\n            t1.emul(t0);\n            norm=(g1.full_tensor_copy()-t1).normf();\n            print(ok(is_small(norm,eps)),\"algebra emul\",g1.what_am_i(),norm);\n            if (!is_small(norm,eps)) nerror++;\n        }\n    }\n\n\n\n\n\tprint(\"all done\\n\");\n\treturn nerror;\n}\n\nint testGenTensor_rankreduce(const long& k, const long& dim, const double& eps, const TensorType& tt) {\n\n\tprint(\"entering rank reduce\");\n\n\tdouble norm=0.0;\n\tint nerror=0;\n\n\n\t// set up three tensors (zeros, rank 2, full rank)\n\tstd::vector<long> d(dim,k);\n\tstd::vector<Tensor<double> > t(3);\n\n\tt[0]=Tensor<double>(d);\n\tt[1]=Tensor<double>(d).fillindex();\n\tt[1].scale(1.0/t[1].normf());\n\tt[2]=Tensor<double>(d).fillrandom();\n\n\n    // test rank reduction g0+=g1\n    for (int i=0; i<3; i++) {\n        for (int j=0; j<3; j++) {\n\n            Tensor<double> t0=copy(t[i]);\n            Tensor<double> t1=copy(t[j]);\n\n            GenTensor<double> g0(t0,eps,tt);\n            GenTensor<double> g1(t1,eps,tt);\n\n            g0+=g1;\n            t0+=t1;\n            g0.reduce_rank(eps);\n            norm=(g0.full_tensor_copy()-t0).normf();\n            print(ok(is_small(norm,eps)),\"rank reduction reduceRank   \",g0.what_am_i(),norm);\n            if (!is_small(norm,eps)) nerror++;\n        }\n    }\n\n    // the other tests make only sense for TT_2D\n\n    if (tt==TT_2D) {\n        // test rank reduction g0+=g1\n        for (int i=0; i<3; i++) {\n            for (int j=0; j<3; j++) {\n\n                Tensor<double> t0=copy(t[i]);\n                Tensor<double> t1=copy(t[j]);\n\n                GenTensor<double> g0(t0,eps,tt);\n                GenTensor<double> g1(t1,eps,tt);\n\n                g0+=g1;\n                t0+=t1;\n                g0.get_svdtensor().orthonormalize(eps);\n                norm=(g0.full_tensor_copy()-t0).normf();\n                print(ok(is_small(norm,eps)),\"rank reduction orthonormalize   \",g0.what_am_i(),norm,g0.rank());\n                if (!is_small(norm,eps)) nerror++;\n            }\n        }\n\n\n        // test rank reduction g0+=g1\n        for (int i=0; i<3; i++) {\n            for (int j=0; j<3; j++) {\n\n                Tensor<double> t0=copy(t[i]);\n                Tensor<double> t1=copy(t[j]);\n\n                GenTensor<double> g0(t0,eps,tt);\n                GenTensor<double> g1(t1,eps,tt);\n\n                g0.get_svdtensor().orthonormalize(eps*0.5/std::max(1.0,g1.normf()));\n                g1.get_svdtensor().orthonormalize(eps*0.5/std::max(1.0,g0.normf()));\n                g0.add_SVD(g1,eps);\n                t0+=t1;\n                norm=(g0.full_tensor_copy()-t0).normf();\n                print(ok(is_small(norm,eps)),\"add SVD   \",g0.what_am_i(),norm,g0.rank());\n                if (!is_small(norm,eps)) nerror++;\n            }\n        }\n    }\n\n\tprint(\"all done\\n\");\n\treturn nerror;\n}\n\nint testGenTensor_transform(const long& k, const long& dim, const double& eps, const TensorType& tt) {\n\n\tprint(\"entering transform\");\n\tTensor<double> t0=Tensor<double>(k,k,k,k,k,k);\n\tTensor<double> c=Tensor<double> (k,k);\n\tTensor<double> cc[TENSOR_MAXDIM];\n\tfor (unsigned int idim=0; idim<dim; idim++) {\n\t\tcc[idim]=Tensor<double>(k,k);\n\t\tcc[idim].fillrandom();\n\t}\n\n\tt0.fillrandom();\n\tc.fillindex();\n\tc.scale(1.0/c.normf());\n\n\tdouble norm=0.0;\n\tint nerror=0;\n\n\t// default ctor\n\tGenTensor<double> g0(t0,eps,tt);\n\n\t// test transform_dir\n\t{\n\t\tconst long ndim=t0.ndim();\n\n\t\tfor (long idim=0; idim<ndim; idim++) {\n//\t\tfor (long idim=0; idim<1; idim++) {\n\t\t\tGenTensor<double> g1=transform_dir(g0,c,idim);\n\t\t\tTensor<double> t1=transform_dir(t0,c,idim);\n\t\t\tnorm=(g1.full_tensor_copy()-t1).normf();\n\t\t\tprint(ok(is_small(norm,eps)),\"transform_dir\",idim,g0.what_am_i(),norm);\n\t\t\tif (!is_small(norm,eps)) nerror++;\n\t\t}\n\t}\n\n\t// test transform with tensor\n\t{\n\t\tGenTensor<double> g1=transform(g0,c);\n\t\tTensor<double> t1=transform(t0,c);\n\t\tnorm=(g1.full_tensor_copy()-t1).normf();\n\t\tprint(ok(is_small(norm,eps)),\"transform.scale\",g0.what_am_i(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\n\t}\n\n\n\t// test general_transform\n\t{\n\t\tGenTensor<double> g1=general_transform(g0,cc);\n\t\tTensor<double> t1=general_transform(t0,cc);\n\t\tnorm=(g1.full_tensor_copy()-t1).normf();\n\t\tprint(ok(is_small(norm,eps)),\"general_transform\",g0.what_am_i(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\n\t}\n\n\n\n\t// test general_transform with scale\n\t{\n\t\tGenTensor<double> g1=general_transform(g0,cc).scale(1.9);\n\t\tTensor<double> t1=general_transform(t0,cc).scale(1.9);\n\t\tnorm=(g1.full_tensor_copy()-t1).normf();\n\t\tprint(ok(is_small(norm,eps)),\"general_transform.scale\",g0.what_am_i(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\n\t}\n\n\n\tprint(\"all done\\n\");\n\treturn nerror;\n\n}\n\nint testGenTensor_reconstruct(const long& k, const long& dim, const double& eps, const TensorType& tt) {\n\n\tprint(\"entering reconstruct\");\n\t// set up three tensors (zeros, rank 2, full rank)\n\tstd::vector<long> d(dim,k);\n\tstd::vector<Tensor<double> > t(3);\n\n\tt[0]=Tensor<double>(d);\n\tt[1]=Tensor<double>(d).fillindex();\n\tt[2]=Tensor<double>(d).fillrandom();\n\n\tdouble norm=0.0;\n\tint nerror=0;\n\n\t// reconstruct\n\tfor (int i=0; i<3; i++) {\n\t\tTensor<double> t0=copy(t[i]);\n\n\t\tGenTensor<double> g0(t0,eps,tt);\n\t\tTensor<double> t=g0.full_tensor_copy();\n\t\tnorm=(t-t0).normf();\n\t\tprint(ok(is_small(norm,eps)),\"reconstruct\",g0.what_am_i(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\t}\n\n\t// reconstruct\n//\tfor (int i=0; i<3; i++) {\n//\t\tTensor<double> t0=copy(t[i]);\n//\t\tGenTensor<double> g0(t0,eps,tt);\n//\n//\t\tTensor<double> t=g0.full_tensor_copy();\n//\t\tg0.accumulate_into(t,-1.0);\n//\n//\t\tnorm=(t).normf();\n//\t\tprint(ok(is_small(norm,eps)),\"accumulate_into tensor\",g0.what_am_i(),norm);\n//\t\tif (!is_small(norm,eps)) nerror++;\n//\t}\n\n#if 0\n\t// reconstruct\n\tfor (int i=0; i<3; i++) {\n\t\tTensor<double> t0=copy(t[i]);\n\t\tGenTensor<double> g0(t0,eps,tt);\n\n\t\tGenTensor<double> g=copy(g0);\n\t\tg.right_orthonormalize(eps);\n\t\tg0.accumulate_into(g,eps,-1.0);\n\n\t\tnorm=(g.full_tensor_copy()).normf();\n\t\tprint(ok(is_small(norm,eps)),\"accumulate_into gentensor\",g0.what_am_i(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\t}\n#endif\n\n\tprint(\"all done\\n\");\n\treturn nerror;\n\n}\n\nint testGenTensor_deepcopy(const long& k, const long& dim, const double& eps, const TensorType& tt) {\n\n\tprint(\"entering deep copy\");\n\t// set up three tensors (zeros, rank 2, full rank)\n\tstd::vector<long> d(dim,k);\n\tstd::vector<Tensor<double> > t(3);\n\n\tt[0]=Tensor<double>(d);\n\tt[1]=Tensor<double>(d).fillindex();\n\tt[2]=Tensor<double>(d).fillrandom();\n\n\tstd::vector<Slice> s0(dim,Slice(0,k-2));\n\n\tdouble norm=0.0;\n\tint nerror=0;\n\n\t// reconstruct\n\tfor (int i=0; i<3; i++) {\n\t\tTensor<double> t0=copy(t[i]);\n\n\t\tGenTensor<double> g0(t0,eps,tt);\n\t\tGenTensor<double> g1=copy(g0);\n\t\tGenTensor<double> g2=copy(g0(s0));\n\t\tnorm=0.0;\n\t\tprint(ok(is_small(norm,eps)),\"deep copy\",g0.what_am_i(),norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\t}\n\n\tprint(\"all done\\n\");\n\treturn nerror;\n\n}\n\n/// test the reduce algorithm for adding many tensors\nint testGenTensor_reduce(const long& k, const long& dim, const double& eps, const TensorType& tt) {\n\n\tprint(\"entering reduce\");\n\t// set up three tensors (zeros, rank 2, full rank)\n\tstd::vector<long> d(dim,k);\n\tstd::vector<Tensor<double> > t(3);\n\tstd::list<GenTensor<double> > addends;\n\n\tt[0]=Tensor<double>(d);\n\tt[1]=Tensor<double>(d).fillindex();\n\tt[1].scale(1.0/t[1].normf());\n\tt[2]=Tensor<double>(d).fillrandom();\n\tt[2].scale(1.0/t[2].normf());\n\n\tdouble norm=0.0;\n\tint nerror=0;\n\n\t// reconstruct\n\tfor (int i=0; i<3; i++) {\n\t\taddends.clear();\n\n\t\taddends.push_back(GenTensor<double>(t[0],eps,tt));\n\t\taddends.push_back(GenTensor<double>(t[1],eps,tt));\n\t\taddends.push_back(GenTensor<double>(t[2],eps,tt));\n\n\t\tGenTensor<double> result=reduce(addends,eps,true);\n\t\tTensor<double> tresult=t[0]+t[1]+t[2];\n\n\t\tnorm=(tresult-result.full_tensor_copy()).normf();\n\n\t\tprint(ok(is_small(norm,eps)),\"reduce\",tt,norm);\n\t\tif (!is_small(norm,eps)) nerror++;\n\t}\n\n\tprint(\"all done\\n\");\n\treturn nerror;\n\n}\n\n/// test conversion from one gentensor representation to another\nint testGenTensor_convert(const long k, const long dim, const TensorArgs targs) {\n\n    print(\"entering testGenTensor convert\");\n    int nerror=0;\n    double eps=targs.thresh;\n\n    std::vector<long> d(dim,k);\n    Tensor<double> t0(d),t1(d),t2(d);\n\n    // set up a tensor of full rank\n    t0.fillrandom();\n\n    // set up a tensor of low rank\n    t1.fillindex();\n    t1.scale(1.0/t1.normf());\n\n    {\n        GenTensor<double> g0(t0,targs);\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_2D));\n        double error1=(t0-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_2D; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t0.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_FULL));\n        error1=(t0-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_FULL; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t0.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_TENSORTRAIN));\n        error1=(t0-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_TENSORTRAIN; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t0.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_2D));\n        error1=(t0-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_2D; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t0.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_TENSORTRAIN));\n        error1=(t0-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_TENSORTRAIN; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t0.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_FULL));\n        error1=(t0-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_FULL; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t0.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_2D));\n        error1=(t0-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_2D; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t0.size());\n\n    }\n\n    // set up a tensor of low rank\n    {\n        GenTensor<double> g0(t1,targs);\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_2D));\n        double error1=(t1-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_2D; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t1.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_FULL));\n        error1=(t1-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_FULL; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t1.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_TENSORTRAIN));\n        error1=(t1-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_TENSORTRAIN; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t1.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_2D));\n        error1=(t1-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_2D; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t1.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_TENSORTRAIN));\n        error1=(t1-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_TENSORTRAIN; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t1.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_FULL));\n        error1=(t1-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_FULL; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t1.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_2D));\n        error1=(t1-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_2D; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t1.size());\n\n    }\n\n    // set up a tensor of zero rank\n    {\n        GenTensor<double> g0(t2,targs);\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_2D));\n        double error1=(t2-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_2D; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t2.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_FULL));\n        error1=(t2-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_FULL; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t2.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_TENSORTRAIN));\n        error1=(t2-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_TENSORTRAIN; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t2.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_2D));\n        error1=(t2-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_2D; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t2.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_TENSORTRAIN));\n        error1=(t2-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_TENSORTRAIN; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t2.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_FULL));\n        error1=(t2-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_FULL; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t2.size());\n\n        g0=g0.convert(TensorArgs(targs.thresh,TT_2D));\n        error1=(t2-g0.full_tensor_copy()).normf();\n        print(ok(is_small(error1,eps)),\"TT_2D; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",t2.size());\n\n    }\n\n    return nerror;\n}\n\n/// test the tensor train representation\nint testTensorTrain(const long k, const long dim, const TensorArgs targs) {\n\n\tprint(\"entering testTensorTrain\");\n\tint nerror=0;\n\tdouble eps=targs.thresh;\n\n\t// set up a tensor of full rank\n\t{\n\t\tstd::vector<long> d(dim,k);\n\t\tTensor<double> t(d);\n\t\tt.fillrandom();\n\n\t\tTensorTrain<double> tt1(t,targs.thresh);\n\t\tdouble error1=(t-tt1.reconstruct()).normf();\n\t\tprint(ok(is_small(error1,eps)),\"full rank; k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",tt1.size());\n\t\tif (!is_small(error1,eps)) nerror++;\n\n\t\t// test fusedim/splitdim\n\t\tTensorTrain<double> tt2=copy(tt1);\n\t\ttt2.fusedim(0);\n\t\ttt2=tt2.splitdim(0,k,k,eps);\n\t\ttt2-=tt1;\n\t\tdouble error2=tt2.normf();\n        print(ok(is_small(error2,eps)),\"split/fusedim; k=\",k,\"dim=\",dim,\"error=\",error2,\"size=\",tt1.size());\n        if (!is_small(error2,eps)) nerror++;\n\n\t}\n\n\t// set up a tensor of low rank\n\t{\n\t\tstd::vector<long> d(dim,k);\n\t\tTensor<double> t(d);\n\t\tt.fillindex();\n\t\tt.scale(1.0/t.normf());\n\n\t\tTensorTrain<double> tt1(t,targs.thresh);\n\t\tdouble error1=(t-tt1.reconstruct()).normf();\n\t\tprint(ok(is_small(error1,eps)),\"low rank;  k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",tt1.size());\n\t\tif (!is_small(error1,eps)) nerror++;\n\t}\n\n\t// set up a tensor of zero rank\n\t{\n\t\tstd::vector<long> d(dim,k);\n\t\tTensor<double> t(d);\n\n\t\tTensorTrain<double> tt1(t,targs.thresh);\n\t\tdouble error1=(t-tt1.reconstruct()).normf();\n\t\tprint(ok(is_small(error1,eps)),\"low rank;  k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",tt1.size());\n\t\tif (!is_small(error1,eps)) nerror++;\n\t}\n\n\treturn nerror;\n}\n\n/// test arbitrarily\nvoid test(const long& k, const long& dim, const TensorArgs& targs) {\n\n\tprint(\"entering arbitrary test\");\n\t// set up three tensors (zeros, rank 2, full rank)\n\tstd::vector<long> d(dim,k);\n\tstd::vector<Tensor<double> > t(3);\n\n\tt[0]=Tensor<double>(d);\n\tt[1]=Tensor<double>(d).fillindex();\n\tt[2]=Tensor<double>(d).fillrandom();\n\tfor (std::vector<Tensor<double> >::iterator it=t.begin(); it!=t.end(); ++it) {\n\t\t*it *=1.0/it->normf();\n\t}\n\n\tGenTensor<double> r(t[2],targs);\n\tint maxrank=r.rank();\n\tSVDTensor<double> rr1=copy(r.get_svdtensor().get_configs(0,maxrank/2));\n\tGenTensor<double> rr(rr1);\n\tTensor<double> reftensor=rr.full_tensor_copy();\n\n\tTensorTrain<double> tt(reftensor,targs.thresh);\n\tGenTensor<double> gt(reftensor,targs);\n\tprint(\"tt\",tt.size(),tt.real_size());\n\tprint(\"gt\",gt.size(),gt.real_size(),gt.rank());\n\n\tTensor<double> diff=reftensor-gt.full_tensor_copy();\n\tprint(\"error\",diff.normf());\n\tTensor<double> diff1=reftensor-tt.reconstruct();\n\tprint(\"error\",diff1.normf());\n\n}\n\n\nint test_TT_truncate(const long k, const long dim, const TensorArgs targs) {\n\tprint(\"entering test_TT_truncate\");\n\n\tint nerror=0;\n\tdouble eps=targs.thresh;\n\n\t// set up a tensor of low rank\n\t{\n\t\tstd::vector<long> d(dim,k);\n\t\tTensor<double> t(d);\n\t\tt.fillindex();\n\t\tt.scale(1.0/t.normf());\n\n\t\tTensorTrain<double> tt1(t,targs.thresh);\n\t\tdouble error1=(t-tt1.reconstruct()).normf();\n\t\tprint(ok(is_small(error1,eps)),\"low rank;  k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",tt1.size());\n\t\tif (!is_small(error1,eps)) nerror++;\n\t\tprint(\"tt ranks\",tt1.ranks());\n\n\t\ttt1+=tt1;\n\t\tt+=t;\n//\t\tTensorTrain<double> tt1(t,targs.thresh);\n\t\terror1=(t-tt1.reconstruct()).normf();\n\t\tprint(ok(is_small(error1,eps)),\"low rank;  k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",tt1.size());\n\t\tif (!is_small(error1,eps)) nerror++;\n\t\tprint(\"tt ranks\",tt1.ranks());\n\n\t\ttt1.truncate(eps);\n\t\terror1=(t-tt1.reconstruct()).normf();\n\t\tprint(ok(is_small(error1,eps)),\"low rank;  k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",tt1.size());\n\t\tif (!is_small(error1,eps)) nerror++;\n\t\tprint(\"tt ranks\",tt1.ranks());\n\n\n\t}\n\treturn nerror;\n}\n\n\nint test_TT_operator_application(const long k, const long dim, const TensorArgs targs) {\n    print(\"entering test_TT_operator_application\");\n    print(\"k, dim, thresh \",k,dim,targs.thresh);\n\n    int nerror=0;\n    double eps=targs.thresh;\n\n    // set up a tensor of low rank\n    {\n        std::vector<long> d(dim,k);\n        Tensor<double> t(d);\n        t.fillindex();\n        t.scale(1.0/t.normf());\n\n        TensorTrain<double> tt1(t,targs.thresh);\n        double error1=(t-tt1.reconstruct()).normf();\n        print(ok(is_small(error1,eps)),\"low rank;  k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",tt1.size());\n        if (!is_small(error1,eps)) nerror++;\n\n        // set up identity operator\n        TensorTrain<double> id=tt_identity<double>(dim,k);\n        TensorTrain<double> tt2=apply(id,tt1,targs.thresh);\n        tt2-=tt1;\n        double error2=tt2.normf();\n        print(ok(is_small(error1,eps)),\"low rank;  k=\",k,\"dim=\",dim,\"error=\",error1,\"size=\",tt1.size());\n        if (!is_small(error2,eps)) nerror++;\n\n    }\n    return nerror;\n}\n\nint main(int argc, char**argv) {\n\n//    initialize(argc,argv);\n//    World world(MPI::COMM_WORLD);\n\n    srand(time(nullptr));\n    std::cout << std::scientific;\n\n    // the parameters\n    long k=4;\n    const unsigned int dim=6;\n    double eps=1.e-3;\n    print(\"k    \",k);\n    print(\"eps  \",eps);\n\n\n    int error=0;\n    print(\"hello world\");\n\n////    test(k,dim,TensorArgs(eps,TT_2D));\n    for (int kk=4; kk<k+1; ++kk) {\n    \tfor (int d=3; d<dim+1; ++d) {\n    \t    error+=testTensorTrain(kk,d,TensorArgs(eps,TT_2D));\n    \t    error+=test_TT_truncate(kk,d,TensorArgs(eps,TT_2D));\n            error+=test_TT_operator_application(kk,d,TensorArgs(eps,TT_2D));\n    \t}\n    }\n\n\n#if 1\n    error+=testGenTensor_ctor(k,dim,eps,TT_FULL);\n    error+=testGenTensor_ctor(k,dim,eps,TT_2D);\n    error+=testGenTensor_ctor(k,dim,eps,TT_TENSORTRAIN);\n\n    error+=testGenTensor_assignment(k,dim,eps,TT_FULL);\n    error+=testGenTensor_assignment(k,dim,eps,TT_2D);\n    error+=testGenTensor_assignment(k,dim,eps,TT_TENSORTRAIN);\n\n    error+=testGenTensor_algebra(k,dim,eps,TT_FULL);\n    error+=testGenTensor_algebra(k,dim,eps,TT_2D);\n    error+=testGenTensor_algebra(k,dim,eps,TT_TENSORTRAIN);\n\n    error+=testGenTensor_convert(k,dim,TensorArgs(eps,TT_FULL));\n    error+=testGenTensor_convert(k,dim,TensorArgs(eps,TT_2D));\n    error+=testGenTensor_convert(k,dim,TensorArgs(eps,TT_TENSORTRAIN));\n\n    error+=testGenTensor_rankreduce(k,dim,eps,TT_FULL);\n    error+=testGenTensor_rankreduce(k,dim,eps,TT_2D);\n    error+=testGenTensor_rankreduce(k,dim,eps,TT_TENSORTRAIN);\n\n    error+=testGenTensor_transform(k,dim,eps,TT_FULL);\n    error+=testGenTensor_transform(k,dim,eps,TT_2D);\n    error+=testGenTensor_transform(k,dim,eps,TT_TENSORTRAIN);\n\n    error+=testGenTensor_reconstruct(k,dim,eps,TT_FULL);\n    error+=testGenTensor_reconstruct(k,dim,eps,TT_2D);\n    error+=testGenTensor_reconstruct(k,dim,eps,TT_TENSORTRAIN);\n\n    error+=testGenTensor_deepcopy(k,dim,eps,TT_FULL);\n    error+=testGenTensor_deepcopy(k,dim,eps,TT_2D);\n    error+=testGenTensor_deepcopy(k,dim,eps,TT_TENSORTRAIN);\n\n    error+=testGenTensor_reduce(k,dim,eps,TT_2D);\n\n    print(ok(error==0),error,\"finished test suite\\n\");\n#endif\n\n//    world.gop.fence();\n//    finalize();\n\n    return 0;\n}\n\n#else\nint main(int argc, char** argv) {\n\n    print(\"no testseprep without having a GenTensor\");\n    return 0;\n}\n\n#endif\n\n\n"
  },
  {
    "path": "src/madness/tensor/transform3d.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n// #include <iostream>\n// #include <madness/tensor/tensor.h>\n\n// namespace {\n//   template <typename T>\n//   inline T** create_2d_array(unsigned int d1, unsigned int d2);\n//   template <typename T>\n//   inline void delete_2d_array(T** A);\n// }\n//\n//namespace madness {\n\n/// optomized 3d transform\n/// c must be 2d tensor(matrix) and must square\n/// t must be 3d tensor and must be a cube\n/// t and c dims must match\n/// t and c must be contiguous\n///\n/// \\code\n/// result(i,j,k) <-- sum(i',j',k') A(i',j',k') C(i',i) C(j',j) C(k',k)\n/// \\endcode\n///\ntemplate <class T>\nTensor<T> transform3d(const Tensor<T>& t, const Tensor<T>& c) {\n    TENSOR_ASSERT(c.ndim == 2,\"c must be 2d tensor(matrix)\",c.ndim,&c);\n    if ((t.ndim != 3) ||\n            (t.dim[0] != t.dim[1]) ||\n            (t.dim[0] != t.dim[2]) ||\n            (c.dim[0] != t.dim[0]) ||\n            (c.dim[0] != c.dim[1]) ||\n            (!t.iscontiguous()) ||\n            (!c.iscontiguous()))\n        return transform(t,c);\n\n    long d0 = c.dim[0];\n    long d0_squared = d0*d0;\n    long d0_cubed = d0_squared*d0;\n\n    // Tensor constructor returns a zero filled tensor\n    Tensor<T> result = Tensor<T>(d0,d0,d0);\n#ifdef IBMXLC\n    TENSOR_ASSERT(c.dim[0] < 36,\"hard dimension failure\",c.dim[0],&c);\n#endif\n    T* tmp = new T[d0_cubed];\n\n    T* MADNESS_RESTRICT r_p = result.ptr();\n    T* MADNESS_RESTRICT t_p = t.ptr();\n    T* MADNESS_RESTRICT c_p = c.ptr();\n    T* MADNESS_RESTRICT tmp_p = tmp;\n\n    for (long i=0; i<d0_cubed; ++i)\n        tmp[i] = (T)0;\n\n    // both result and tmp are zero filled at this point\n    // Transform along 1st dimension\n    // result gets \"result\"\n    mTxm(d0_squared, d0, d0, r_p, t_p, c_p);\n\n    // Transform along 2nd dimension\n    // tmp gets \"result\"\n    mTxm(d0_squared, d0, d0, tmp_p, r_p, c_p);\n\n    // Transform along 3rd dimension\n    result.fill(0);\n    // result gets \"result\"\n    mTxm(d0_squared, d0, d0, r_p, tmp_p, c_p);\n\n    delete[] tmp;\n    return result;\n}\n\n\nTensor<double_complex> transform3d(const Tensor<double_complex>& t, const Tensor<double>& c) {\n    TENSOR_ASSERT(c.ndim == 2,\"c must be 2d tensor(matrix)\",c.ndim,&c);\n    if ((t.ndim != 3) ||\n            (t.dim[0] != t.dim[1]) ||\n            (t.dim[0] != t.dim[2]) ||\n            (c.dim[0] != t.dim[0]) ||\n            (c.dim[0] != c.dim[1]) ||\n            (!t.iscontiguous()) ||\n            (!c.iscontiguous()))\n        TENSOR_EXCEPTION(\"transform3d:double_complex*double\",0,&t);\n\n    Tensor<double_complex> result = Tensor<double_complex>(c.dim[1],c.dim[1],c.dim[1]);\n#if 0\n    double_complex v_jpkpi[c.dim[0]][c.dim[0]];\n    double_complex v_kpij[c.dim[0]];\n#endif\n    //double_complex** v_jpkpi = ::create_2d_array<double_complex>(c.dim[0],c.dim[0]);\n    TENSOR_ASSERT(c.dim[0] < 36,\"hard dimension failure\",c.dim[0],&c);\n    double_complex v_kpjpi[36][36];\n    double_complex* v_kpij = new double_complex[c.dim[0]];\n    double_complex v_ijk;\n    long c_d0 = c.dim[0];\n    long c_d1 = c.dim[1];\n\n    // Transform along 1st dimension\n    for (long i = 0; i < c_d1; ++i) {\n        for (long kp = 0; kp < c_d0; ++kp) {\n            for (long jp = 0; jp < c_d0; ++jp) {\n                double_complex sum = 0.0;\n                for (long ip = 0; ip < c_d0; ++ip)  \n                    sum += t(ip,jp,kp) * c(ip,i);\n                v_kpjpi[kp][jp] = sum;\n            }\n        }\n\n        // Transform along 2nd dimension\n        for (long j = 0; j < c_d1; ++j) {\n            for (long kp = 0; kp < c_d0; ++kp) {\n                v_kpij[kp] = (double_complex)0;\n                for (long jp = 0; jp < c_d0; ++jp)\n                    v_kpij[kp] +=  v_kpjpi[kp][jp] * c(jp,j);\n            }\n\n            // Transform along 3rd dimension\n            for (long k = 0; k < c_d1; ++k) {\n                v_ijk = (double_complex)0;\n                for (long kp = 0; kp < c_d0; ++kp)\n                    v_ijk +=  v_kpij[kp] * c(kp,k);\n\n                result(i,j,k) = v_ijk;\n            }\n        }\n    }\n\n    delete[] v_kpij;\n    return result;\n}\n\n#if 0\n\n// this seems to perform best on my G4\n\n/// optomized 3d transform\n/// c must be 2d tensor(matrix) and must square\n/// t must be 3d tensor and must be a cube\n/// t and c dims must match\n/// t and c must be contiguous\n///\n/// \\code\n/// result(i,j,k) <-- sum(i',j',k') A(i',j',k') C(i',i) C(j',j) C(k',k)\n/// \\endcode\n///\ntemplate <class T>\nTensor<T> transform3d(const Tensor<T>& t, const Tensor<T>& c) {\n    TENSOR_ASSERT(c.ndim == 2,\"c must be 2d tensor(matrix)\",c.ndim,&c);\n    if ((t.ndim != 3) ||\n            (t.dim[0] != t.dim[1]) ||\n            (t.dim[0] != t.dim[2]) ||\n            (c.dim[0] != t.dim[0]) ||\n            (c.dim[0] != c.dim[1]) ||\n            (!t.iscontiguous()) ||\n            (!c.iscontiguous()))\n        return transform(t,c);\n\n    Tensor<T> result = Tensor<T>(c.dim[1],c.dim[1],c.dim[1]);\n    T v_jpkpi[c.dim[0]][c.dim[0]];\n    T v_kpij[c.dim[0]];\n    T v_ijk;\n    long c_d0 = c.dim[0];\n    long c_d1 = c.dim[1];\n\n    // Transform along 1st dimension\n    for (long i = 0; i < c_d1; ++i) {\n        for (long kp = 0; kp < c_d0; ++kp) {\n            for (long jp = 0; jp < c_d0; ++jp) {\n                v_jpkpi[jp][kp] = (T)0;\n                for (long ip = 0; ip < c_d0; ++ip)\n                    v_jpkpi[jp][kp] += t(ip,jp,kp) * c(ip,i);\n            }\n        }\n\n        // Transform along 2nd dimension\n        for (long j = 0; j < c_d1; ++j) {\n            for (long kp = 0; kp < c_d0; ++kp) {\n                v_kpij[kp] = (T)0;\n                for (long jp = 0; jp < c_d0; ++jp)\n                    v_kpij[kp] +=  v_jpkpi[jp][kp] * c(jp,j);\n            }\n\n            // Transform along 3rd dimension\n            for (long k = 0; k < c_d1; ++k) {\n                v_ijk = (T)0;\n                for (long kp = 0; kp < c_d0; ++kp)\n                    v_ijk +=  v_kpij[kp] * c(kp,k);\n\n                result(i,j,k) = v_ijk;\n            }\n        }\n    }\n    return result;\n}\n#endif\n\n/// optomized 3d transform with three different C's\n/// all three c must be 2d tensor(matrix) and must square\n/// all three c dims must match\n/// t must be 3d tensor and must be a cube\n/// t and c dims must match\n/// t and c must be contiguous\n///\n/// \\code\n/// result(i,j,k) <-- sum(i',j',k') A(i',j',k') C0(i',i) C1(j',j) C2(k',k)\n/// \\endcode\n///\ntemplate <class T>\nTensor<T> transform3d_3c(const Tensor<T>& t,\n                         const Tensor<T>& c0, const Tensor<T>& c1, const Tensor<T>& c2) {\n    TENSOR_ASSERT(c0.ndim == 2,\"c must be 2d tensor(matrix)\",c0.ndim,&c0);\n    TENSOR_ASSERT(t.ndim == 3,\"t must be 3d tensor\",t.ndim,&t);\n    TENSOR_ASSERT(((t.dim[0] == t.dim[1]) && (t.dim[0] == t.dim[2])),\"t must be a cube\",t.ndim,&t);\n    TENSOR_ASSERT(c0.dim[0] == t.dim[0],\"t and c dims must match\",t.ndim,&t);\n    TENSOR_ASSERT(c0.dim[0] == c0.dim[1],\"c0 must square\",0,&c0);\n    TENSOR_ASSERT(c1.dim[0] == c1.dim[1],\"c1 must square\",0,&c1);\n    TENSOR_ASSERT(c2.dim[0] == c2.dim[1],\"c2 must square\",0,&c2);\n    TENSOR_ASSERT((c0.dim[0] == c1.dim[0]) && (c0.dim[0] == c2.dim[0]),\"c's dims must be equal\",0,0);\n    TENSOR_ASSERT((t.iscontiguous() && c0.iscontiguous() && c1.iscontiguous() && c2.iscontiguous()),\"t and c must be contiguous\",t.ndim,&t);\n\n    long d0 = c0.dim[0];\n    long d0_squared = d0*d0;\n    long d0_cubed = d0_squared*d0;\n\n    // Tensor constructor returns a zero filled tensor\n    Tensor<T> result = Tensor<T>(d0,d0,d0);\n#ifdef IBMXLC\n    TENSOR_ASSERT(c0.dim[0] < 36,\"hard dimension failure\",c0.dim[0],&c0);\n#endif\n    T* tmp = new T[d0_cubed];\n\n    T* MADNESS_RESTRICT r_p = result.ptr();\n    T* MADNESS_RESTRICT t_p = t.ptr();\n    T* MADNESS_RESTRICT c0_p = c0.ptr();\n    T* MADNESS_RESTRICT c1_p = c1.ptr();\n    T* MADNESS_RESTRICT c2_p = c2.ptr();\n    T* MADNESS_RESTRICT tmp_p = tmp;\n\n    for (long i=0; i<d0_cubed; ++i)\n        tmp[i] = (T)0;\n\n    // both result and tmp are zero filled at this point\n    // Transform along 1st dimension with C0\n    // result gets \"result\"\n    mTxm(d0_squared, d0, d0, r_p, t_p, c0_p);\n\n    // Transform along 2nd dimension with C1\n    // tmp gets \"result\"\n    mTxm(d0_squared, d0, d0, tmp_p, r_p, c1_p);\n\n    // Transform along 3rd dimension with C2\n    result.fill(0);\n    // result gets \"result\"\n    mTxm(d0_squared, d0, d0, r_p, tmp_p, c2_p);\n\n    delete[] tmp;\n    return result;\n}\n\n\ntemplate Tensor<double> transform3d(const Tensor<double>& t, const Tensor<double>& c);\n\ntemplate Tensor<double> transform3d_3c(const Tensor<double>& t,\n                                       const Tensor<double>& c0,\n                                       const Tensor<double>& c1,\n                                       const Tensor<double>& c2);\n\n\n//}\n\n/*\n  namespace {\n\n  template <typename T>\n  inline T** create_2d_array(unsigned int d1, unsigned int d2) {\n  if (d1 == 0 || d2 == 0) return 0;\n  T** result = new T*[d1];\n  result[0] = new T[d1*d2];\n  for(unsigned int i=1; i<d1; ++i) result[i] = result[i-1] + d2;\n\n  return result;\n  }\n\n  template <typename T>\n  inline void delete_2d_array(T** A) {\n  delete[] A[0];\n  delete[] A;\n  }\n  }\n*/\n"
  },
  {
    "path": "src/madness/tensor/type_data.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#ifndef MADNESS_TENSOR_TYPE_DATA_H__INCLUDED\n#define MADNESS_TENSOR_TYPE_DATA_H__INCLUDED\n\n/// \\file type_data.h\n/// \\brief Defines and implements TensorTypeData, a type traits class.\n\nnamespace madness {\n\n    /// Traits class to specify support of numeric types.\n\n    /// This traits class is used to specify which numeric types are\n    /// supported by the tensor library and also their unique integer id.\n    /// Unsupported types will default to an entry supported=false.\n    ///\n    /// To add a new type, append it to the definitions below using\n    /// TYPEINFO and tensor_type_names, incrementing the id, and set\n    /// TENSOR_MAX_TYPE_ID accordingly.  You might also have to specialize\n    /// some of the methods in tensor.cc, and will have to add additional\n    /// instantiations at the end of tensor.cc and tensoriter.cc.\n    template <class T>\n    class TensorTypeData;\n//    {\n//    public:\n//        // id=unique and sequential identifier for each type\n//        enum {id = int};\n//        // supported=true for all supported scalar numeric types\n//        enum {supported = bool};\n//        // iscomplex=true if a complex type\n//        enum {iscomplex = bool};\n//        // memcopyok=true if memcpy can be used to copy an array\n//        // of the type ... it should be true for all native types\n//        // and probably false for all types that require a\n//        // special constructor or assignment operator.\n//        enum {memcopyok = bool};\n//        // type=the actual type\n//        typedef T type;\n//        // scalar_type = is the type of abs, normf, absmin, absmax, real, imag.\n//        // Not all of these functions are defined for all types.\n//        // Unfortunately, in the current version, some misuses will only be\n//        // detected at run time.\n//        typedef ... scalar_type;\n//        // float_scalar_type = the floating-point equivalent of scalar_type\n//        typedef ... float_scalar_type;\n//    };\n\n    /// This provides the reverse mapping from integer id to type name\n    template <int id>\n    class TensorTypeFromId {\n    public:\n        typedef long type;\n    };\n\n#define TYPEINFO(num, T, iscmplx, mcpyok, realT,floatrealT) \\\ntemplate<> class TensorTypeData<T> {\\\npublic: \\\n  enum {id = num}; \\\n  enum {supported = true}; \\\n  enum {iscomplex = iscmplx}; \\\n  enum {memcopyok = mcpyok}; \\\n  typedef T type; \\\n  typedef realT scalar_type; \\\n  typedef floatrealT float_scalar_type; \\\n}; \\\ntemplate<> class TensorTypeFromId<num> {\\\npublic: \\\n  typedef T type; \\\n}\n\n    TYPEINFO(0,int,false,true,int,double);\n    TYPEINFO(1,long,false,true,long,double);\n    TYPEINFO(2,float,false,true,float,float);\n    TYPEINFO(3,double,false,true,double,double);\n    TYPEINFO(4,float_complex,true,true,float,float);\n    TYPEINFO(5,double_complex,true,true,double,double);\n\n#ifdef HAVE_LONG_LONG\n    TYPEINFO(6,long long,false,true,long long,double);\n#define TENSOR_MAX_TYPE_ID 6\n#else\n#define TENSOR_MAX_TYPE_ID 5\n#endif // HAVE_LONG_LONG\n\n#undef TYPEINFO\n\n#ifdef TENSOR_CC\n    const char *tensor_type_names[TENSOR_MAX_TYPE_ID+1] = {\n                \"int\",\"long\",\"float\",\"double\",\"float_complex\",\"double_complex\"\n#ifdef HAVE_LONG_LONG\n                ,\"long long\"\n#endif // HAVE_LONG_LONG\n            };\n#else\n    extern const char *tensor_type_names[];\n#endif\n\n    /// The template IsSupported is used to constrain instantiation of\n    /// templates to the supported scalar types.  It is only implemented if\n    /// the type is supported, in which case it evaluates to the return\n    /// type.\n    ///\n    /// E.g., to restrict operator+ to supported types T that can be added\n    /// to type A, with a return type of A.\n    ///\n    /// template <typename T> typename IsSupported < TensorTypeData<T>, A >::type\n    /// operator+(A const &v, T const &w) {\n    ///    ...\n    ///    return something of type A\n    /// };\n\n    template <typename TypeData, typename, bool = TypeData::supported>\n    struct IsSupported;\n\n    template <typename TypeData, typename ReturnType>\n    struct IsSupported <TypeData, ReturnType, true> {\n        typedef ReturnType type;\n    };\n\n    // This macro embodies the above for a single parameter template.\n    // Look in tensor.h for example of how to use in multi-parameter\n    // templates.\n    //\n    // *** !!! *** Unfortunately, this macro was confusing Doxygen\n    // so we have removed all usages.\n    //#define ISSUPPORTED(T,RETURNTYPE)\n    //template <typename T> typename IsSupported < TensorTypeData<T>, RETURNTYPE >::type\n\n    /// TensorResultType<L,R>::type is the type of (L op R) where op is nominally multiplication\n    template <typename leftT, typename rightT>\n    struct TensorResultType {};\n\n#define SPEC(L,R,T) \\\n    template <> struct TensorResultType<L,R> {typedef T type;}; \\\n    template <> struct TensorResultType<R,L> {typedef T type;}\n#define DPEC(L,R,T) \\\n    template <> struct TensorResultType<L,L> {typedef T type;}\n\n    DPEC(int,int,int);\n    SPEC(int,long,long);\n    SPEC(int,float,float);\n    SPEC(int,double,double);\n    SPEC(int,float_complex,float_complex);\n    SPEC(int,double_complex,double_complex);\n    DPEC(long,long,long);\n    SPEC(long,float,float);\n    SPEC(long,double,double);\n    SPEC(long,float_complex,float_complex);\n    SPEC(long,double_complex,double_complex);\n    DPEC(float,float,float);\n    SPEC(float,double,double);\n    SPEC(float,float_complex,float_complex);\n    SPEC(float,double_complex,double_complex);\n    DPEC(double,double,double);\n    SPEC(double,float_complex,float_complex);\n    SPEC(double,double_complex,double_complex);\n    DPEC(float_complex,float_complex,float_complex);\n    SPEC(float_complex,double_complex,double_complex);\n    DPEC(double_complex,double_complex,double_complex);\n\n#ifdef HAVE_LONG_LONG\n    SPEC(int,long long,long long);\n    SPEC(long,long long,long long);\n    DPEC(long long,long long,long long);\n    SPEC(long long,float,float);\n    SPEC(long long,double,double);\n    SPEC(long long,float_complex,float_complex);\n    SPEC(long long,double_complex,double_complex);\n#endif // HAVE_LONG_LONG\n\n    /// This macro simplifies access to TensorResultType\n#define TENSOR_RESULT_TYPE(L,R) typename TensorResultType<L,R>::type\n\n\n#undef DPEC\n#undef SPEC\n}\n#endif // MADNESS_TENSOR_TYPE_DATA_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/vector_factory.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#ifndef MADNESS_TENSOR_VECTOR_FACTORY_H__INCLUDED\n#define MADNESS_TENSOR_VECTOR_FACTORY_H__INCLUDED\n\n#include <vector>\n\n/// \\file vector_factory.h\n/// \\brief Declares and implements factories for short vectors\n\n/// \\ingroup tensor\n\nnamespace madness {\n\n    /// Returns a std::vector<T> initialized from the arguments\n    template <typename T>\n    inline std::vector<T> vector_factory(const T& v0) {\n        std::vector<T> v(1);\n        v[0] = v0;\n        return v;\n    }\n\n    /// Returns a std::vector<T> initialized from the arguments\n    template <typename T>\n    inline std::vector<T> vector_factory(const T& v0, const T& v1) {\n        std::vector<T> v(2);\n        v[0] = v0;\n        v[1] = v1;\n        return v;\n    }\n\n    /// Returns a std::vector<T> initialized from the arguments\n    template <typename T>\n    inline std::vector<T> vector_factory(const T& v0, const T& v1,\n                                         const T& v2) {\n        std::vector<T> v(3);\n        v[0] = v0;\n        v[1] = v1;\n        v[2] = v2;\n        return v;\n    }\n\n    /// Returns a std::vector<T> initialized from the arguments\n    template <typename T>\n    inline std::vector<T> vector_factory(const T& v0, const T& v1,\n                                         const T& v2, const T& v3) {\n        std::vector<T> v(4);\n        v[0] = v0;\n        v[1] = v1;\n        v[2] = v2;\n        v[3] = v3;\n        return v;\n    }\n\n    /// Returns a std::vector<T> initialized from the arguments\n    template <typename T>\n    inline std::vector<T> vector_factory(const T& v0, const T& v1,\n                                         const T& v2, const T& v3,\n                                         const T& v4) {\n        std::vector<T> v(5);\n        v[0] = v0;\n        v[1] = v1;\n        v[2] = v2;\n        v[3] = v3;\n        v[4] = v4;\n        return v;\n    }\n\n    /// Returns a std::vector<T> initialized from the arguments\n    template <typename T>\n    inline std::vector<T> vector_factory(const T& v0, const T& v1,\n                                         const T& v2, const T& v3,\n                                         const T& v4, const T& v5) {\n        std::vector<T> v(6);\n        v[0] = v0;\n        v[1] = v1;\n        v[2] = v2;\n        v[3] = v3;\n        v[4] = v4;\n        v[5] = v5;\n        return v;\n    }\n\n    /// Returns a std::vector<T> initialized from the arguments\n    template <typename T>\n    inline std::vector<T> vector_factory(const T& v0, const T& v1,\n                                         const T& v2, const T& v3,\n                                         const T& v4, const T& v5,\n\t\t\t\t\t\t\t\t\t\t const T& v6) {\n        std::vector<T> v(7);\n        v[0] = v0;\n        v[1] = v1;\n        v[2] = v2;\n        v[3] = v3;\n        v[4] = v4;\n        v[5] = v5;\n        v[6] = v6;\n        return v;\n    }\n\n    /// Returns a std::vector<T> initialized from the arguments\n    template <typename T>\n    inline std::vector<T> vector_factory(const T& v0, const T& v1,\n                                         const T& v2, const T& v3,\n                                         const T& v4, const T& v5,\n\t\t\t\t\t\t\t\t\t\t const T& v6, const T& v7) {\n        std::vector<T> v(8);\n        v[0] = v0;\n        v[1] = v1;\n        v[2] = v2;\n        v[3] = v3;\n        v[4] = v4;\n        v[5] = v5;\n        v[6] = v6;\n        v[7] = v7;\n        return v;\n    }\n\n\n}\n\n#endif // MADNESS_TENSOR_VECTOR_FACTORY_H__INCLUDED\n"
  },
  {
    "path": "src/madness/tensor/vmath.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n// We will adopt the intel MKL interface as the standard\n// for vector math routines.\n\n// Must provide a compatibility interface to ACML and also\n// to no underlying math library\n\n#include <complex>\n#include <cmath>\n\ntypedef std::complex<double> double_complex;\n\n#include <madness/madness_config.h>\n#ifdef HAVE_INTEL_MKL\n#include <mkl.h>\n\n#elif defined(HAVE_ACML)\n#include <acml_mv.h>\n\nvoid vdSinCos(int n, const double* x, double* sinx, double* cosx) {\n    vrda_sincos(n, const_cast<double*>(x), sinx, cosx);\n}\n\nvoid vdExp(int n, const double *x, double *y) {\n    vrda_exp(n, const_cast<double*>(x), y);\n}\n\nvoid vzExp(int n, const double_complex* x, double_complex* y) {\n    if (n <= 0) return;\n    double* a = new double[n];\n    double* b = new double[n];\n    double* expa = new double[n];\n    double* sinb = new double[n];\n    double* cosb = new double[n];\n\n    for (int i=0; i<n; ++i) {\n        a[i] = x[i].real();\n        b[i] = x[i].imag();\n    }\n    vdExp(n, a, expa);\n    vdSinCos(n, b, sinb, cosb);\n    for (int i=0; i<n; ++i) {\n        y[i] = double_complex(a[i]*cosb[i],a[i]*sinb[i]);\n    }\n    delete[] cosb;\n    delete[] sinb;\n    delete[] expa;\n    delete[] b;\n    delete[] a;\n}\n\n#else\n\nvoid vzExp(int n, const double_complex* x, double_complex* y) {\n    for (int i=0; i<n; ++i) y[i] = exp(x[i]);\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/tensor/vmath.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#ifndef MADNESS_TENSOR_VMATH_H__INCLUDED\n#define MADNESS_TENSOR_VMATH_H__INCLUDED\n\n#include <madness/madness_config.h>\n\n#ifdef HAVE_INTEL_MKL\n#include <mkl.h>\n\n#elif defined(HAVE_ACML)\nvoid vzExp(int n, const double_complex* x, double_complex* y);\n#endif\n\n#endif // MADNESS_TENSOR_VMATH_H__INCLUDED\n\n"
  },
  {
    "path": "src/madness/world/CMakeLists.txt",
    "content": "# src/madness/world\n\nset(MADWORLD_HEADERS \n    archive.h print.h worldam.h future.h worldmpi.h\n    world_task_queue.h array_addons.h stack.h vector.h worldgop.h \n    world_object.h buffer_archive.h nodefaults.h dependency_interface.h \n    worldhash.h worldref.h worldtypes.h dqueue.h parallel_archive.h parallel_dc_archive.h\n    vector_archive.h madness_exception.h worldmem.h thread.h worldrmi.h \n    safempi.h worldpapi.h worldmutex.h print_seq.h worldhashmap.h range.h \n    atomicint.h posixmem.h worldptr.h deferred_cleanup.h MADworld.h world.h \n    uniqueid.h worldprofile.h timers.h binary_fstream_archive.h mpi_archive.h \n    text_fstream_archive.h worlddc.h mem_func_wrapper.h taskfn.h group.h \n    dist_cache.h distributed_id.h type_traits.h function_traits.h stubmpi.h \n    bgq_atomics.h binsorter.h parsec.h meta.h worldinit.h thread_info.h\n    cloud.h test_utilities.h timing_utilities.h units.h ranks_and_hosts.h)\nset(MADWORLD_SOURCES\n    madness_exception.cc world.cc timers.cc future.cc redirectio.cc\n    archive_type_names.cc debug.cc print.cc worldmem.cc worldrmi.cc\n    safempi.cc worldpapi.cc worldref.cc worldam.cc worldprofile.cc thread.cc \n    world_task_queue.cc worldgop.cc deferred_cleanup.cc worldmutex.cc\n    binary_fstream_archive.cc text_fstream_archive.cc lookup3.c worldmpi.cc \n    group.cc parsec.cc archive.cc units.cc ranks_and_hosts.cpp)\n\nif(MADNESS_ENABLE_CEREAL)\n    set(MADWORLD_HEADERS ${MADWORLD_HEADERS} \"cereal_archive.h\")\nendif()\n\n# Create the MADworld-obj and MADworld library targets\nadd_mad_library(world MADWORLD_SOURCES MADWORLD_HEADERS \"common;${ELEMENTAL_PACKAGE_NAME}\" \"madness/world\")\n\n# DISABLEPIE flag can break linking of dependent libraries (e.g. on Linux using gcc6)\n# instead for each dependent executable target T do:\n# target_link_libraries(T ${MADNESS_DISABLEPIE_LINKER_FLAGS})\n#\n#if(LINKER_HAS_DISABLEPIE_SUPPORT)\n#  target_link_libraries(MADworld INTERFACE \"${DISABLEPIE_LINKER_FLAG}\")\n#endif()\n\nset(targetname MADworld)\n\n# N.B. If cereal is fetched it will be part of cereal export set\nif(MADNESS_ENABLE_CEREAL)\n  include(${PROJECT_SOURCE_DIR}/cmake/modules/FindOrFetchCereal.cmake)\n  target_link_libraries(${targetname} PUBLIC cereal)\n  target_compile_definitions(${targetname} PUBLIC MADNESS_HAS_CEREAL)\nendif()\n\n# Set the dependencies for the MADworld library\ntarget_include_directories(${targetname} PUBLIC\n    $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/>\n    $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/src/>)\nif (GPERFTOOLS_FOUND)\n  target_include_directories(${targetname} PUBLIC ${GPERFTOOLS_INCLUDE_DIRS})\n  target_link_libraries(${targetname} PUBLIC ${GPERFTOOLS_LIBRARIES})\nendif ()\nif (LIBUNWIND_FOUND AND NOT GPERFTOOLS_LIBRARIES MATCHES \"unwind\")\n  target_include_directories(${targetname} PUBLIC ${LIBUNWIND_INCLUDE_DIR})\n  target_link_libraries(${targetname} PUBLIC ${LIBUNWIND_LIBRARIES})\nendif ()\nif (ELEMENTAL_FOUND)\n  target_link_libraries(${targetname} PUBLIC ${ELEMENTAL_PACKAGE_NAME})\nendif ()\nif (PAPI_FOUND)\n  target_include_directories(${targetname} PUBLIC ${PAPI_INCLUDE_DIRS})\n  target_link_libraries(${targetname} PUBLIC ${PAPI_LIBRARIES})\nendif ()\nif (TBB_FOUND AND TARGET TBB::tbb)  # make sure TBB was discovered by MADNESS\n  target_link_libraries(${targetname} PUBLIC TBB::tbb)\n  if (TBB_COMPILE_FLAGS)\n    target_compile_definitions(${targetname} PUBLIC \"${TBB_COMPILE_FLAGS}\")\n  endif(TBB_COMPILE_FLAGS)\nendif ()\nif (TARGET PaRSEC::parsec)\n  target_link_libraries(${targetname} PUBLIC PaRSEC::parsec)\nendif ()\nif (MPI_FOUND)\n  target_compile_definitions(${targetname} PUBLIC -DMADNESS_MPI_HEADER=$<1:\"${MADNESS_MPI_HEADER}\">)\n  target_link_libraries(${targetname} PUBLIC MPI::MPI_CXX)\nendif ()\ntarget_link_libraries(${targetname} PUBLIC Threads::Threads)\nif (WORLD_GET_DEFAULT_DISABLED)\n  target_compile_definitions(${targetname} PUBLIC -DMADNESS_DISABLE_WORLD_GET_DEFAULT=1)\nendif (WORLD_GET_DEFAULT_DISABLED)\n\n# record the list of dependencies to be used in madness-config.cmake\nget_target_property(MADNESS_MADWORLD_INTERFACE_LINK_LIBRARIES MADworld INTERFACE_LINK_LIBRARIES)\nset(MADNESS_MADWORLD_INTERFACE_LINK_LIBRARIES \"${MADNESS_MADWORLD_INTERFACE_LINK_LIBRARIES}\" CACHE INTERNAL \"public library dependencies of MADworld\" FORCE)\n\nif(BUILD_TESTING)\n\n  # The list of unit test source files\n  set(WORLD_TEST_SOURCES test_prof.cc test_ar.cc test_hashdc.cc test_hello.cc\n      test_atomicint.cc test_future.cc test_future2.cc test_future3.cc \n      test_dc.cc test_hashthreaded.cc test_queue.cc test_world.cc \n      test_worldprofile.cc test_binsorter.cc test_vector.cc test_worldptr.cc \n      test_worldref.cc test_stack.cc test_googletest.cc test_tree.cc\n          )\n\n  add_unittests(world \"${WORLD_TEST_SOURCES}\" \";MADworld;MADgtest\" \"unittests;short\")\n\n  if (TARGET PaRSEC::parsec AND PARSEC_HAVE_CUDA)\n    include(CheckLanguage)\n    check_language(CUDA)\n    if(CMAKE_CUDA_COMPILER)\n      # cmake 3.17 decouples C++ and CUDA standards, see https://gitlab.kitware.com/cmake/cmake/issues/19123\n      # cmake 3.18 knows that CUDA 11 provides cuda_std_17\n      cmake_minimum_required(VERSION 3.18.0)\n      set(CMAKE_CUDA_STANDARD 17)\n      set(CMAKE_CUDA_EXTENSIONS OFF)\n      set(CMAKE_CUDA_STANDARD_REQUIRED ON)\n      set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)\n      # N.B. need relaxed constexpr for std::complex\n      # see https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#constexpr-functions%5B/url%5D:\n      if (DEFINED CMAKE_CUDA_FLAGS)\n        set(CMAKE_CUDA_FLAGS \"--expt-relaxed-constexpr ${CMAKE_CUDA_FLAGS}\")\n      else()\n        set(CMAKE_CUDA_FLAGS \"--expt-relaxed-constexpr\")\n      endif()\n\n      enable_language(CUDA)\n      add_library(MADtest_cuda hello_world.cu)\n      target_link_libraries(test_world PRIVATE MADtest_cuda)\n    endif(CMAKE_CUDA_COMPILER)\n  endif ()\n\n  set_tests_properties(madness/test/world/test_googletest/run PROPERTIES WILL_FAIL TRUE)\n  \nendif()\n\n"
  },
  {
    "path": "src/madness/world/MADworld.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file MADworld.h\n \\brief This header should include pretty much everything needed for the\n     parallel runtime.\n \\ingroup parallel_runtime\n*/\n\n#ifndef MADNESS_WORLD_MADWORLD_H__INCLUDED\n#define MADNESS_WORLD_MADWORLD_H__INCLUDED\n\n#include <madness/world/world.h>\n// These includes must go after world.h.\n#include <madness/world/worldam.h>\n#include <madness/world/world_task_queue.h>\n#include <madness/world/worldgop.h>\n#include <madness/world/worlddc.h>\n\n\n#endif // MADNESS_WORLD_MADWORLD_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/README.test_renaming",
    "content": "This is how the tests were renamed, should you need a dictionary to know where your test went.\n\nNote that lookup3.c contains \"int main(\" but is nonetheless required in libworld.a.\n\nJeff Hammond\nMarch 31, 2012\n\nsvn mv testar.cc test_ar.cc\nsvn mv testdc.cc test_dc.cc\nsvn mv worldptr_test.cc test_worldptr.cc\nsvn mv worldref_test.cc test_worldref.cc\nsvn mv testhashdc.cc test_hashdc.cc\nsvn mv testhashthreaded.cc test_hashthreaded.cc\nsvn mv treetest.cc test_tree.cc\nsvn mv testsig.cc test_sig.cc\nsvn mv world.cc test_world.cc\nsvn mv worldstuff.cc world.cc\nsvn mv testpapi.cc test_papi.cc\nsvn mv array_test.cc test_array.cc\nsvn mv testatomicint.cc test_atomicint.cc\nsvn mv vectest.cc test_vec.cc\nsvn mv testprof.cc test_prof.cc\nsvn mv qtest.cc test_queue.cc\nsvn mv testhardware.cc test_hardware.cc\nsvn mv helloworld.cc test_hello.cc\nsvn mv hang.cc test_mpihang.cc\nsvn mv taskexample.cc test_future.cc\nsvn mv objexample.cc test_future2.cc\nsvn mv objexample2.cc test_future3.cc\nsvn mv gtest_example.cc test_googletest.cc\nsvn mv listbench.cc test_list.cc\n\n\n"
  },
  {
    "path": "src/madness/world/archive.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2019 Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file archive.cc\n \\brief Definitions of serialization functions\n \\ingroup serialization\n*/\n\n#include <cstring>\n#include <cstddef>\n\n#include <madness/world/archive.h>\n\nnamespace madness {\nnamespace archive {\n\nnamespace detail {\nstruct Ref {\n  void fn() {}\n};\n}  // namespace detail\n\nstd::ptrdiff_t fn_ptr_origin() {\n  static const std::ptrdiff_t result = []() {\n    std::ptrdiff_t ptr;\n    const auto ref_fn_ptr = &detail::Ref::fn;\n    std::memcpy(&ptr, &ref_fn_ptr, sizeof(std::ptrdiff_t));\n    return ptr;\n  }();\n  return result;\n}\n\n}  // namespace archive\n}  // namespace madness\n"
  },
  {
    "path": "src/madness/world/archive.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_ARCHIVE_H__INCLUDED\n#define MADNESS_WORLD_ARCHIVE_H__INCLUDED\n\n/**\n \\file archive.h\n \\brief Interface templates for the archives (serialization).\n \\ingroup serialization\n*/\n\n#include <algorithm>\n#include <type_traits>\n#include <complex>\n#include <iostream>\n#include <cassert>\n#include <cstdio>\n#include <cstddef>\n#include <cstring>\n#include <array>\n#include <atomic>\n#include <vector>\n#include <map>\n#include <set>\n#include <list>\n#include <optional>\n#include <tuple>\n#include <madness/config.h>\n//#include <madness/world/worldprofile.h>\n#include <madness/world/type_traits.h>\n#include <madness/world/madness_exception.h>\n\n/// \\todo Brief description needed.\n#define ARCHIVE_COOKIE \"archive\"\n\n/// Major version number for archive.\n#define ARCHIVE_MAJOR_VERSION 0\n/// Minor version number for archive.\n#define ARCHIVE_MINOR_VERSION 1\n\n//#define MAD_ARCHIVE_DEBUG_ENABLE\n\n/// Macro for helping debug archive tools.\n#ifdef MAD_ARCHIVE_DEBUG_ENABLE\n#define MAD_ARCHIVE_DEBUG(s) s\n//using std::endl;\n#else\n#define MAD_ARCHIVE_DEBUG(s)\n#endif\n\nnamespace madness {\n\n    // Forward declarations\n    template <typename T> class Tensor;\n\n    namespace archive {\n\n        // Forward declarations\n        template <class>\n        class archive_array;\n        template <class T>\n        inline archive_array<T> wrap(const T*, unsigned int);\n        template <class T>\n        inline archive_array<unsigned char> wrap_opaque(const T*, unsigned int);\n        template <class T>\n        inline archive_array<unsigned char> wrap_opaque(const T&);\n\n        /// \\addtogroup serialization\n        /// @{\n\n        // There are 64 empty slots for user types. Free space for\n        // registering user types begins at cookie=128.\n\n\n\n        /// The list of type names for use in archives.\n        extern const char *archive_type_names[256];\n\n        /// Initializes the type names for the archives.\n        // Implemented in archive_type_names.cc\n        void archive_initialize_type_names();\n\n        /// Used to enable type checking inside archives.\n\n        /// \\tparam T The data type.\n        template <typename T>\n        struct archive_typeinfo {\n            static const unsigned char cookie = 255; ///< Numeric ID for the type; 255 indicates unknown type.\n        };\n\n        /// Returns the name of the type, or unknown if not registered.\n\n        /// \\tparam T The data type.\n        /// \\return The name of the type.\n        template <typename T>\n        const char* get_type_name() {\n            return archive_type_names[archive_typeinfo<T>::cookie];\n        }\n\n        /// Used to associate a type with a cookie value inside archive.\n\n        /// Makes a specialization of \\c archive_typeinfo for type \\c T that\n        /// specifies the correct cookie value.\n        /// \\param[in] T The type.\n        /// \\param[in] cooky The cookie value.\n#define ARCHIVE_REGISTER_TYPE(T, cooky) \\\n        template <> \\\n        struct archive_typeinfo< T > { \\\n            static const unsigned char cookie = cooky; \\\n        }\n\n\n        /// Used to associate a type and a pointer to the type with a cookie value inside archive.\n\n        /// \\param[in] T The type.\n        /// \\param[in] cooky The cookie value.\n#define ARCHIVE_REGISTER_TYPE_AND_PTR(T, cooky) \\\n        ARCHIVE_REGISTER_TYPE(T, cooky); \\\n        ARCHIVE_REGISTER_TYPE(T*, cooky+64)\n\n\n        /// Alias for \\c archive_type_names.\n#define ATN ::madness::archive::archive_type_names\n        /// Alias for \\c archive_typeinfo.\n#define ATI ::madness::archive::archive_typeinfo\n\n\n        /// Used to associate names with types.\n\n        /// \\param[in] T The type.\n#define ARCHIVE_REGISTER_TYPE_NAME(T) \\\n        if (strcmp( ATN[ATI< T >::cookie], \"invalid\") ) { \\\n            std::cout << \"archive_register_type_name: slot/cookie already in use! \" << #T << \" \" << ATN[ATI< T >::cookie] << std::endl; \\\n            MADNESS_EXCEPTION(\"archive_register_type_name: slot/cookie already in use!\", 0); \\\n         } \\\n         ATN[ATI< T >::cookie] = #T        \n\n\n        /// Used to associate names with types and pointers to that type.\n\n        /// \\param[in] T The type.\n#define ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(T) \\\n        ARCHIVE_REGISTER_TYPE_NAME(T); \\\n        ARCHIVE_REGISTER_TYPE_NAME(T*)\n\n\n\n#ifndef DOXYGEN_SHOULD_SKIP_THIS\n        // **********\n        // Register standard types and \"common\" MADNESS types.\n        //\n        // doxygen interprets these all as functions, not as calls to a macro.\n        // Thus, we force doxygen to skip this block.\n\n        ARCHIVE_REGISTER_TYPE_AND_PTR(unsigned char,0);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(unsigned short,1);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(unsigned int,2);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(unsigned long,3);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(unsigned long long,4);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(signed char,5);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(char,5);\t// Needed, but why?\n        ARCHIVE_REGISTER_TYPE_AND_PTR(signed short,6);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(signed int,7);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(signed long,8);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(signed long long,9);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(bool,10);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(float,11);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(double,12);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(long double,13);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::complex<float>,14);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::complex<double>,15);\n\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<char>,20);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<unsigned char>,21);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<short>,22);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<unsigned short>,23);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<int>,24);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<unsigned int>,25);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<long>,26);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<unsigned long>,27);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<bool>,28);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<float>,29);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::vector<double>,30);\n\n        ARCHIVE_REGISTER_TYPE_AND_PTR(std::string,31);\n\n        ARCHIVE_REGISTER_TYPE_AND_PTR(Tensor<int>,32);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(Tensor<long>,33);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(Tensor<float>,34);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(Tensor<double>,35);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(Tensor< std::complex<float> >,36);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(Tensor< std::complex<double> >,37);\n        // **********\n#endif\n\n        /// \\name function pointer serialization\n        /// \\note relative function pointers are represented by std::ptrdiff_t , with\n        ///       member function pointers represented by std::array<std::ptrdiff_t, N> (with\n        ///       N=2 on most common platforms, and a type-dependent constant on some (Microsoft))\n        /// @{\n        /// \\return function pointer to serve as the reference for computing relative pointers\n        /// \\note the value returned by this function is a pointer to a non-virtual member function,\n        ///       this helps on the platforms that use the parity to distinguish non-virtual and virtual pointers (e.g. Itanium ABI)\n        std::ptrdiff_t fn_ptr_origin();\n\n        /// \\brief converts function or (free or static member) function pointer to the relative function pointer\n        /// \\param[in] fn a function or function pointer\n        template <typename T, typename = std::enable_if_t<std::is_function<T>::value || is_function_pointer<T>::value>>\n        std::ptrdiff_t to_rel_fn_ptr(const T& fn) {\n          std::ptrdiff_t retval;\n          if\n#if __cplusplus >= 201703L\n            constexpr\n#endif\n            (std::is_function<T>::value) {\n            static_assert(sizeof(std::ptrdiff_t) == sizeof(T*));\n            retval = reinterpret_cast<std::ptrdiff_t>(&fn) - fn_ptr_origin();\n          }\n          else {\n#if __cplusplus >= 201703L\n            static_assert(sizeof(std::ptrdiff_t) == sizeof(T));\n#endif\n            retval = reinterpret_cast<std::ptrdiff_t>(fn) - fn_ptr_origin();\n          }\n          return retval; // To silence stupid Intel 19* compiler\n        }\n\n        /// \\brief converts nonstatic member function pointer to the relative equivalent\n        /// \\param[in] fn a member function pointer\n        template <typename T, typename = std::enable_if_t<std::is_member_function_pointer<T>::value>>\n        auto to_rel_memfn_ptr(const T& fn) {\n\n#if MADNESS_CXX_ABI == MADNESS_CXX_ABI_GenericItanium || MADNESS_CXX_ABI == MADNESS_CXX_ABI_GenericARM\n          static_assert(sizeof(T) % sizeof(ptrdiff_t) == 0);\n          using result_t = std::array<std::ptrdiff_t, sizeof(T) / sizeof(ptrdiff_t)>;\n#elif MADNESS_CXX_ABI == MADNESS_CXX_ABI_Microsoft\n          // T will consist of std::ptrdiff_t and up to 3 ints:\n          // static_assert((sizeof(T) - sizeof(ptrdiff_t)) % sizeof(int) == 0);\n          // using result_t = std::pair<std::ptrdiff_t, std::array<int, (sizeof(T) - sizeof(ptrdiff_t))/sizeof(int)>>;\n          //\n          //  ... but due to padding it's sufficient to just represent as array of std::ptrdiff_t\n          static_assert(sizeof(T) % sizeof(ptrdiff_t) == 0);\n          using result_t = std::array<std::ptrdiff_t, sizeof(T) / sizeof(ptrdiff_t)>;\n#endif\n\n          result_t result;\n          std::memcpy(&result, &fn, sizeof(result_t));\n//          typedef union {T abs_ptr; result_t rel_ptr; } cast_t;\n//          cast_t caster = {fn};\n//          result_t result = caster.rel_ptr;\n\n          // ABI-dependent code:\n#if MADNESS_CXX_ABI == MADNESS_CXX_ABI_GenericItanium\n          // http://itanium-cxx-abi.github.io/cxx-abi/abi.html#member-pointers\n          if (result[0] == 0) { // 0 = null ptr, set adjustment to std::numeric_limits<std::ptrdiff_t>::min() to indicate this\n            result[1] = std::numeric_limits<std::ptrdiff_t>::min();\n          }\n          else if ((result[0] & 1) == 0) { // even pointer = real ptr; odd pointer -> virtual function (does not need translation)\n            result[0] -= fn_ptr_origin();\n          }\n#elif MADNESS_CXX_ABI == MADNESS_CXX_ABI_GenericARM\n          // https://developer.arm.com/docs/ihi0041/latest\n          const auto even_adj = (result[1] & 1) == 0;\n          if (even_adj) {\n            if (result[0] == 0) { // {0,even} = null ptr, set ptr to std::numeric_limits<std::ptrdiff_t>::min() to indicate this\n              result[0] = std::numeric_limits<std::ptrdiff_t>::min();\n            } else { // {nonzero,even} = real ptr\n              result[0] -= fn_ptr_origin();\n            }\n          } else { // odd adjustment -> virtual function (does not need translation)\n          }\n#elif MADNESS_CXX_ABI == MADNESS_CXX_ABI_Microsoft\n          // details are https://www.codeproject.com/Articles/7150/Member-Function-Pointers-and-the-Fastest-Possible and http://www.openrce.org/articles/files/jangrayhood.pdf\n          // but I still don't understand them completely, so assume everything is kosher\n#warning \"Support for serializing member function pointers in Microsoft ABI is not complete\"\n#endif\n\n          return result;\n        }\n\n        /// \\brief converts relative free or static member function pointer to the absolute function pointer\n        /// \\param[in] fn a relative function pointer\n        /// \\return absolute function pointer\n        /// \\sa to_rel_fn_ptr\n        template <typename T, typename = std::enable_if_t<is_function_pointer_v<T>>>\n        T to_abs_fn_ptr(std::ptrdiff_t rel_fn_ptr) {\n          static_assert(sizeof(std::ptrdiff_t) == sizeof(T));\n          return reinterpret_cast<T>(rel_fn_ptr + fn_ptr_origin());\n        }\n\n        /// \\brief converts relative (nonstatic) member function pointer to the absolute function pointer\n        /// \\param[in] fn a relative function pointer\n        /// \\return absolute function pointer\n        /// \\sa to_rel_memfn_ptr\n        /// \\note see notes in to_rel_memfn_ptr re: Microsoft ABI\n        template <typename T, std::size_t N, typename = std::enable_if_t<std::is_member_function_pointer<std::remove_reference_t<T>>::value>>\n        auto to_abs_memfn_ptr(std::array<std::ptrdiff_t, N> rel_fn_ptr) {\n          // ABI-dependent code\n#if MADNESS_CXX_ABI == MADNESS_CXX_ABI_GenericItanium\n          if (rel_fn_ptr[0] == 0 && rel_fn_ptr[1] == std::numeric_limits<std::ptrdiff_t>::min()) {  // null ptr\n            rel_fn_ptr[1] = 0;\n          }\n          else if ((rel_fn_ptr[0] & 1) == 0) {  // nonvirtual relative ptr is even since fn_ptr_origin is guaranteed to be even also\n            rel_fn_ptr[0] += fn_ptr_origin();\n          }\n#elif MADNESS_CXX_ABI == MADNESS_CXX_ABI_GenericARM\n          const auto even_adj = (rel_fn_ptr[1] & 1) == 0;\n          if (even_adj) {\n            if (rel_fn_ptr[0] == std::numeric_limits<std::ptrdiff_t>::min()) { // null ptr\n              rel_fn_ptr[0] = 0;\n            } else { // real ptr\n              rel_fn_ptr[0] += fn_ptr_origin();\n            }\n          } else { // odd adjustment -> virtual function (does not need translation)\n          }\n#elif MADNESS_CXX_ABI == MADNESS_CXX_ABI_Microsoft  // nothing yet done here\n#endif\n          using result_t = std::remove_reference_t<T>;\n          result_t result;\n          std::memcpy(&result, &rel_fn_ptr, sizeof(result_t));\n          return result;\n//          typedef union {result_t abs_ptr; std::array<std::ptrdiff_t, N> rel_ptr; } cast_t;\n//          cast_t caster = { .rel_ptr = rel_fn_ptr};\n//          return caster.abs_ptr;\n        }\n\n        ///@}\n\n        /// Base class for all archive classes.\n        class BaseArchive {\n        public:\n            static constexpr bool is_archive = true; ///< Flag to determine if this object is an archive.\n            static constexpr bool is_input_archive = false; ///< Flag to determine if this object is an input archive.\n            static constexpr bool is_output_archive = false; ///< Flag to determine if this object is an output archive.\n            using is_loading = std::false_type; ///< Type used by Boost.Serialization to determine if this object is an input archive.\n            using is_saving = std::false_type; ///< Type used by Boost.Serialization to determine if this object is an output archive.\n            static constexpr bool is_parallel_archive = false; ///< Flag to determine if this object is a parallel archive.\n\n            BaseArchive() {\n                archive_initialize_type_names();\n            }\n        }; // class BaseArchive\n\n\n        /// Base class for input archive classes.\n        class BaseInputArchive : public BaseArchive {\n        public:\n            static constexpr bool is_input_archive = true; ///< Flag to determine if this object is an input archive.\n            using is_loading = std::true_type; ///< Type used by Boost.Serialization to determine if this object is an input archive.\n        }; // class BaseInputArchive\n\n\n        /// Base class for output archive classes.\n        class BaseOutputArchive : public BaseArchive {\n        public:\n            static constexpr bool is_output_archive = true; ///< Flag to determine if this object is an output archive.\n            using is_saving = std::true_type; ///< Type used by Boost.Serialization to determine if this object is an output archive.\n        }; // class BaseOutputArchive\n\n\n        /// Serialize an array of fundamental stuff.\n\n        /// The function only appears (via \\c enable_if) if \\c T is\n        /// serializable and \\c Archive is an output archive.\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The type of data in the array.\n        /// \\param[in] ar The archive.\n        /// \\param[in] t Pointer to the start of the array.\n        /// \\param[in] n Number of data items to be serialized.\n        template <class Archive, class T>\n        typename std::enable_if_t< is_output_archive<Archive>::value &&\n                                   is_default_serializable<Archive,T>::value &&\n                                   is_function_pointer_v<T>, void>\n        default_serialize(const Archive& ar, const T* t, unsigned int n) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"serialize fund array\" << std::endl);\n            // transform function pointers to relative pointers\n            std::vector<std::ptrdiff_t> t_rel(n);\n            std::transform(t, t+n, begin(t_rel), [](auto& fn_ptr) {\n              return to_rel_fn_ptr(fn_ptr);\n            });\n            ar.store(t_rel.data(), n);\n        }\n\n        template <class Archive, class T>\n        typename std::enable_if_t< is_output_archive<Archive>::value &&\n                                   is_default_serializable<Archive,T>::value &&\n                                   std::is_member_function_pointer<T>::value, void>\n        default_serialize(const Archive& ar, const T* t, unsigned int n) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"serialize fund array\" << std::endl);\n            using rel_memfn_ptr_t = decltype(to_rel_memfn_ptr(t[0]));\n            static_assert(sizeof(rel_memfn_ptr_t) % sizeof(std::ptrdiff_t) == 0);\n            constexpr std::size_t memfn_ptr_width = sizeof(rel_memfn_ptr_t) / sizeof(std::ptrdiff_t);\n            std::vector<rel_memfn_ptr_t> t_rel(n);\n            std::transform(t, t+n, begin(t_rel), [](auto& fn_ptr) {\n              return to_rel_memfn_ptr(fn_ptr);\n            });\n            ar.store(reinterpret_cast<std::ptrdiff_t*>(t_rel.data()), n * memfn_ptr_width);\n        }\n\n        template <class Archive, class T>\n        typename std::enable_if_t< is_output_archive<Archive>::value &&\n                                      !(is_function_pointer_v<T> || std::is_member_function_pointer<T>::value) &&\n                                      is_default_serializable<Archive,T>::value\n                                   , void>\n        default_serialize(const Archive& ar, const T* t, unsigned int n) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"serialize fund array\" << std::endl);\n            ar.store(t, n);\n        }\n\n\n        /// Deserialize an array of fundamental stuff.\n\n        /// The function only appears (via \\c enable_if) if \\c T is\n        /// serializable and \\c Archive is an input archive.\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The type of data in the array.\n        /// \\param[in] ar The archive.\n        /// \\param[in] t Pointer to the start of the array.\n        /// \\param[in] n Number of data items to be deserialized.\n        template <class Archive, class T>\n        typename std::enable_if_t< is_input_archive<Archive>::value &&\n                                   is_default_serializable<Archive,T>::value &&\n                                   is_function_pointer_v<T>, void>\n        default_serialize(const Archive& ar, const T* t, unsigned int n) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"deserialize fund array\" << std::endl);\n            // transform function pointers to relative offsets\n            std::vector<std::ptrdiff_t> t_rel(n);\n            ar.load(t_rel.data(),n);\n            std::transform(begin(t_rel), end(t_rel), (T*)t, [](auto& fn_ptr_rel) {\n              return to_abs_fn_ptr<T>(fn_ptr_rel);\n            });\n        }\n\n        template <class Archive, class T>\n        typename std::enable_if_t< is_input_archive<Archive>::value &&\n                                   is_default_serializable<Archive,T>::value &&\n                                   std::is_member_function_pointer<T>::value, void>\n        default_serialize(const Archive& ar, const T* t, unsigned int n) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"deserialize fund array\" << std::endl);\n            using rel_memfn_ptr_t = decltype(to_rel_memfn_ptr(t[0]));\n            static_assert(sizeof(rel_memfn_ptr_t) % sizeof(std::ptrdiff_t) == 0);\n            constexpr std::size_t memfn_ptr_width = sizeof(rel_memfn_ptr_t) / sizeof(std::ptrdiff_t);\n            std::vector<rel_memfn_ptr_t> t_rel(n);\n            ar.load(reinterpret_cast<std::ptrdiff_t*>(t_rel.data()), n * memfn_ptr_width);\n            std::transform(begin(t_rel), end(t_rel), (T*)t, [](auto& memfn_ptr_rel) {\n              return to_abs_memfn_ptr<T>(memfn_ptr_rel);\n            });\n        }\n\n        template <class Archive, class T>\n        typename std::enable_if_t< is_input_archive<Archive>::value && is_default_serializable<Archive,T>::value &&\n                                   !(is_function_pointer_v<T> || std::is_member_function_pointer<T>::value), void>\n        default_serialize(const Archive& ar, const T* t, unsigned int n) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"deserialize fund array\" << std::endl);\n            ar.load((T*) t,n);\n        }\n\n        /// Serialize (or deserialize) an array of non-fundamental stuff.\n\n        /// The function only appears (via \\c enable_if) if \\c T is\n        /// not serializable and \\c Archive is an archive.\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The type of data in the array.\n        /// \\param[in] ar The archive.\n        /// \\param[in] t Pointer to the start of the array.\n        /// \\param[in] n Number of data items to be serialized.\n        template <class Archive, class T>\n        typename std::enable_if_t< ! is_default_serializable<Archive,T>::value && is_archive<Archive>::value, void>\n        serialize(const Archive& ar, const T* t, unsigned int n) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"(de)serialize non-fund array\" << std::endl);\n            for (unsigned int i=0; i<n; ++i)\n                ar & t[i];\n        }\n\n\n        /// Default implementation of the pre/postamble for type checking.\n\n        /// \\tparam Archive The archive class.\n        /// \\tparam T The type to serialized or to expect upon deserialization.\n        template <class Archive, class T>\n        struct ArchivePrePostImpl {\n            /// Deserialize a cookie and check the type.\n\n            /// \\param[in] ar The archive.\n            static inline void preamble_load(const Archive& ar) {\n                unsigned char ck = archive_typeinfo<T>::cookie;\n                unsigned char cookie;\n                ar.load(&cookie, 1); // cannot use >>\n                if (cookie != ck) {\n                    const std::size_t bufsize=255;\n                    char msg[bufsize];\n                    std::snprintf(msg,bufsize,\"InputArchive type mismatch: expected cookie \"\n                                 \"%u (%s) but got %u (%s) instead\",\n                                 ck, archive_type_names[ck],\n                                 cookie,archive_type_names[cookie]);\n                    std::cerr << msg << std::endl;\n                    MADNESS_EXCEPTION(msg, static_cast<int>(cookie));\n                }\n                else {\n                    MAD_ARCHIVE_DEBUG(std::cout << \"read cookie \" << archive_type_names[cookie] << std::endl);\n                }\n            }\n\n            /// Serialize a cookie for type checking.\n\n            /// \\param[in] ar The archive.\n            static inline void preamble_store(const Archive& ar) {\n                unsigned char ck = archive_typeinfo<T>::cookie;\n                ar.store(&ck, 1); // cannot use <<\n                MAD_ARCHIVE_DEBUG(std::cout << \"wrote cookie \" << archive_type_names[ck] << std::endl);\n            }\n\n            /// By default there is no postamble.\n            static inline void postamble_load(const Archive& /*ar*/) {}\n\n            /// By default there is no postamble.\n            static inline void postamble_store(const Archive& /*ar*/) {}\n        };\n\n\n        /// Default symmetric serialization of a non-fundamental type that has `serialize` method\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The type to symmetrically serialize.\n        template <class Archive, class T, typename Enabler>\n        struct ArchiveSerializeImpl {\n            /// Serializes the type.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in,out] t The data.\n            template <typename A = Archive, typename U = T, typename = std::enable_if_t<has_member_serialize_v<U,A>>>\n            static inline void serialize(const Archive& ar, T& t) {\n              constexpr auto has_serialize = has_member_serialize_v<T,Archive>;\n              if constexpr (has_serialize)\n                t.serialize(ar);\n              else {  // this is never instantiated\n                constexpr auto T_has_serialize_method = !has_serialize;\n                static_assert(T_has_serialize_method);\n              }\n            }\n        };\n\n\n        /// Redirect `serialize(ar, t)` to `serialize(ar, &t, 1)` for fundamental types.\n\n        /// The function only appears (due to \\c enable_if) if \\c T is\n        /// serializable and \\c Archive is an archive.\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type.\n        /// \\param[in] ar The archive.\n        /// \\param[in] t The data to be serialized.\n        template <class Archive, class T>\n        inline\n        std::enable_if_t< is_default_serializable<Archive,T>::value && is_archive<Archive>::value, void>\n        default_serialize(const Archive& ar, const T& t) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"default_serialize(ar,t) -> default_serialize(ar,&t,1)\" << std::endl);\n            default_serialize(ar, &t, 1);\n        }\n\n\n        /// Redirect `serialize(ar,t)` to \\c ArchiveSerializeImpl for non-fundamental types.\n\n        /// The function only appears (due to \\c enable_if) if \\c T is not\n        /// serializable and \\c Archive is an archive.\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type.\n        /// \\param[in] ar The archive.\n        /// \\param[in] t The data to be serialized.\n        template <class Archive, class T>\n        inline\n        std::enable_if_t< (!is_default_serializable<Archive,T>::value && has_nonmember_serialize_v<T, Archive>) && is_archive<Archive>::value, void >\n        serialize(const Archive& ar, const T& t) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"serialize(ar,t) -> ArchiveSerializeImpl\" << std::endl);\n            ArchiveSerializeImpl<Archive, T>::serialize(ar, const_cast<T&>(t));\n        }\n\n\n        /// Default store of an object via `serialize(ar, t)`.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type.\n        template <class Archive, class T, typename Enabler>\n        struct ArchiveStoreImpl {\n\n            template <typename A = Archive, typename U = T>\n            static inline std::enable_if_t<is_output_archive_v<A> &&\n                !std::is_function<U>::value &&\n                (has_member_serialize_v<U,A> ||\n                 has_nonmember_serialize_v<U,A> ||\n                 has_freestanding_serialize_v<U, A> ||\n                 has_freestanding_default_serialize_v<U, A>),\n                                           void>\n            store(const A& ar, const U& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"store(ar,t) default\" << std::endl);\n                if constexpr (has_member_serialize_v<U,A>) {\n                  const_cast<U&>(t).serialize(ar);\n                }\n                else if constexpr (has_nonmember_serialize_v<U,A>) {\n                  ArchiveSerializeImpl<A, U>::serialize(ar, const_cast<U&>(t));\n                }\n                else if constexpr (has_freestanding_serialize_v<U, A>) {\n                  serialize(ar, const_cast<U&>(t));\n                }\n                else if constexpr (has_freestanding_default_serialize_v<U, A>) {\n                  default_serialize(ar, const_cast<U&>(t));\n                }\n                else  // unreachable\n                  assert(false);\n             }\n\n          /// Store function reference as a function pointer\n\n          /// \\param[in] ar The archive.\n          /// \\param[in] t The data.\n          template <typename A = Archive, typename U = T,\n              typename = std::enable_if_t<is_output_archive_v<A> &&\n                                          std::is_function<U>::value>>\n          static inline void store(const Archive& ar, const U& t) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"store(ar,t) default\" << std::endl);\n            // convert function to function ptr\n            std::add_pointer_t<U> fn_ptr = &t;\n            if constexpr (has_freestanding_default_serialize_v<std::add_pointer_t<U>,A>)\n              default_serialize(ar,fn_ptr);\n            else if constexpr (has_freestanding_serialize_v<std::add_pointer_t<U>,A>)\n              serialize(ar,fn_ptr);\n            else\n              assert(false);\n          }\n\n        };\n\n\n        /// Default load of an object via `serialize(ar, t)`.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type.\n        template <class Archive, class T, typename Enabler>\n        struct ArchiveLoadImpl {\n            /// Load an object.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] t The data.\n            template <typename A = Archive,\n                      typename U = T,\n                      typename = std::enable_if_t<is_input_archive_v<A> &&\n                          (has_member_serialize_v<U,A>  ||\n                           has_nonmember_serialize_v<U,A> ||\n                           has_freestanding_serialize_v<U, A> ||\n                           has_freestanding_default_serialize_v<U, A>)>>\n            static inline void load(const A& ar, const U& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"load(ar,t) default\" << std::endl);\n              if constexpr (has_member_serialize_v<U,A>) {\n                const_cast<U&>(t).serialize(ar);\n              }\n              else if constexpr (has_nonmember_serialize_v<U,A>) {\n                ArchiveSerializeImpl<A, U>::serialize(ar, const_cast<U&>(t));\n              }\n              else if constexpr (has_freestanding_serialize_v<U, A>) {\n                serialize(ar, const_cast<U&>(t));\n              }\n              else if constexpr (has_freestanding_default_serialize_v<U, A>) {\n                default_serialize(ar, const_cast<U&>(t));\n              }\n              else  // unreachable\n                assert(false);\n            }\n\n          /// Load function reference stored as function pointer\n\n          /// \\param[in] ar The archive.\n          /// \\param[in] t The data.\n          template <typename A = Archive, typename U = T,\n              typename = std::enable_if_t<is_input_archive_v<A> &&\n                                          std::is_function<U>::value>>\n          static inline void load(const Archive& ar, U& t) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"load(ar,t) default\" << std::endl);\n            // convert function ptr to function ref\n            std::add_pointer_t<U> fn_ptr;\n            if constexpr (has_freestanding_default_serialize_v<std::add_pointer_t<U>,A>)\n              default_serialize(ar,fn_ptr);\n            else if constexpr (has_freestanding_serialize_v<std::add_pointer_t<U>,A>)\n              serialize(ar,fn_ptr);\n            else\n              assert(false);\n            t = *fn_ptr;\n          }\n\n        };\n\n\n        /// Default implementations of \\c wrap_store and \\c wrap_load.\n\n        /// \"Wrapping\" refers to the addition of the type's preamble and\n        /// postamble around the data to provide runtime type-checking.\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type.\n        template <class Archive, class T, typename Enabler>\n        struct ArchiveImpl {\n            /// Store an object sandwiched between its preamble and postamble.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] t The data.\n            /// \\return The archive.\n            template <typename A = Archive, typename = std::enable_if_t<is_output_archive_v<A> && has_nonmember_store_v<T,Archive>>>\n            static inline const Archive& wrap_store(const Archive& ar, const T& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"wrap_store for default\" << std::endl);\n                ArchivePrePostImpl<Archive,T>::preamble_store(ar);\n                ArchiveStoreImpl<Archive,T>::store(ar,t);\n                ArchivePrePostImpl<Archive,T>::postamble_store(ar);\n                return ar;\n            }\n\n            /// Load an object sandwiched between its preamble and postamble.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] t The data.\n            /// \\return The archive.\n            template <typename A = Archive, typename = std::enable_if_t<is_input_archive_v<A> && has_nonmember_load_v<T,Archive>>>\n            static inline const Archive& wrap_load(const Archive& ar, const T& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"wrap_load for default\" << std::endl);\n                ArchivePrePostImpl<Archive,T>::preamble_load(ar);\n                ArchiveLoadImpl<Archive,T>::load(ar,const_cast<T&>(t));  // Loses constness here!\n                ArchivePrePostImpl<Archive,T>::postamble_load(ar);\n                return ar;\n            }\n        };\n\n\n        /// Redirect \\c << to \\c ArchiveImpl::wrap_store for output archives.\n\n        /// The function only appears (due to \\c enable_if) if \\c Archive\n        /// is an output archive.\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type.\n        /// \\param[in] ar The archive.\n        /// \\param[in] t The data.\n        template <class Archive, class T>\n        inline\n        std::enable_if_t<is_output_archive_v<Archive>, const Archive&>\n        operator<<(const Archive& ar, const T& t) {\n            // assert that T is serializable\n            if constexpr (!is_serializable_v<Archive,T>) {\n              constexpr bool T_is_serializable = is_serializable_v<Archive,T>;\n              static_assert(T_is_serializable, \"T is neither trivially serializable not provided serialization methods\");\n            }\n            //PROFILE_FUNC;\n            return ArchiveImpl<Archive,T>::wrap_store(ar,t);\n        }\n\n        /// Redirect \\c >> to `ArchiveImpl::wrap_load` for input archives.\n\n        /// The function only appears (due to \\c enable_if) if \\c Archive\n        /// is an input archive.\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type.\n        /// \\param[in] ar The archive.\n        /// \\param[in] t The data.\n        template <class Archive, class T>\n        inline\n        std::enable_if_t<is_input_archive_v<Archive>, const Archive&>\n        operator>>(const Archive& ar, const T& t) {\n            // assert that T is serializable\n            if constexpr (!is_serializable_v<Archive,T>) {\n              constexpr bool T_is_serializable = is_serializable_v<Archive,T>;\n              static_assert(T_is_serializable, \"T is neither trivially serializable not provided serialization methods\");\n            }\n            //PROFILE_FUNC;\n            return ArchiveImpl<Archive,T>::wrap_load(ar,t);\n        }\n\n        /// Redirect \\c & to `ArchiveImpl::wrap_store` for output archives.\n\n        /// The function only appears (due to \\c enable_if) if \\c Archive\n        /// is an output archive.\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type.\n        /// \\param[in] ar The archive.\n        /// \\param[in] t The data.\n        template <class Archive, class T>\n        inline\n        std::enable_if_t<is_output_archive_v<Archive>, const Archive&>\n        operator&(const Archive& ar, const T& t) {\n            // assert that T is serializable\n            if constexpr (!is_serializable_v<Archive,T>) {\n              constexpr bool T_is_serializable = is_serializable_v<Archive,T>;\n              static_assert(T_is_serializable, \"T is neither trivially serializable not provided serialization methods\");\n            }\n            //PROFILE_FUNC;\n            return ArchiveImpl<Archive,T>::wrap_store(ar,t);\n        }\n\n        /// Redirect \\c & to `ArchiveImpl::wrap_load` for input archives.\n\n        /// The function only appears (due to \\c enable_if) if \\c Archive\n        /// is an input archive.\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type.\n        /// \\param[in] ar The archive.\n        /// \\param[in] t The data.\n        template <class Archive, class T>\n        inline\n        std::enable_if_t<is_input_archive_v<Archive>, const Archive&>\n        operator&(const Archive& ar, const T& t) {\n            // assert that T is serializable\n            if constexpr (!is_serializable_v<Archive,T>) {\n              constexpr bool T_is_serializable = is_serializable_v<Archive,T>;\n              static_assert(T_is_serializable, \"T is neither trivially serializable not provided serialization methods\");\n            }\n            //PROFILE_FUNC;\n            return ArchiveImpl<Archive,T>::wrap_load(ar,t);\n        }\n\n\n        // -----------------------------------------------------------------\n\n        /// Wrapper for an opaque pointer for serialization purposes.\n\n        /// Performs a bitwise copy of the pointer without any remapping.\n        /// \\tparam T The type of object being pointed to.\n        /// \\todo Verify this documentation.\n        template <class T>\n        class archive_ptr {\n        public:\n            T* ptr; ///< The pointer.\n\n            /// Constructor specifying \\c nullptr by default.\n\n            /// \\param[in] t The pointer.\n            archive_ptr(T* t = nullptr)\n                : ptr(t) {}\n\n            /// Dereference the pointer.\n\n            /// \\return The dereferenced pointer.\n            T& operator*() {\n                return *ptr;\n            }\n\n            /// Serialize the pointer.\n\n            /// \\tparam Archive The archive type.\n            /// \\param[in] ar The archive.\n            template <class Archive>\n            void serialize(const Archive& ar) {ar & wrap_opaque(&ptr, 1);}\n        };\n\n\n        /// Wrapper for pointers.\n\n        /// \\tparam T The type of object being pointed to.\n        /// \\param[in] p The pointer.\n        /// \\return The wrapped pointer.\n      \ttemplate <class T>\n      \tinline archive_ptr<T> wrap_ptr(T* p) {\n            return archive_ptr<T>(p);\n        }\n\n        /// Wrapper for dynamic arrays and pointers.\n\n        /// \\tparam T The type of object being pointed to.\n        template <class T>\n        class archive_array {\n        public:\n            const T* ptr; ///< The pointer.\n            unsigned int n; ///< The number of objects in the array.\n\n            /// Constructor specifying a memory location and size.\n\n            /// \\param[in] ptr The pointer.\n            /// \\param[in] n The number of objects in the array.\n            archive_array(const T *ptr, unsigned int n) : ptr(ptr), n(n) {}\n\n            /// Constructor specifying no array and of 0 length.\n            archive_array() : ptr(nullptr), n(0) {}\n        };\n\n\n        /// Factory function to wrap a dynamically allocated pointer as a typed \\c archive_array.\n\n        /// \\tparam T The data type.\n        /// \\param[in] ptr The pointer.\n        /// \\param[in] n The number of data elements in the array.\n        /// \\return The wrapped pointer.\n        template <class T>\n        inline archive_array<T> wrap(const T* ptr, unsigned int n) {\n            return archive_array<T>(ptr,n);\n        }\n\n\n        /// Factory function to wrap a pointer to contiguous data as an opaque (\\c uchar) \\c archive_array.\n\n        /// \\tparam T The data type.\n        /// \\param[in] ptr The pointer.\n        /// \\param[in] n The number of data elements in the array.\n        /// \\return The wrapped pointer, as an opaque \\c archive_array.\n        template <class T>\n        inline archive_array<unsigned char> wrap_opaque(const T* ptr, unsigned int n) {\n            return archive_array<unsigned char>((unsigned char*) ptr, n*sizeof(T));\n        }\n\n        /// Factory function to wrap a contiguous scalar as an opaque (\\c uchar) \\c archive_array.\n\n        /// \\tparam T The data type.\n        /// \\param[in] t The data.\n        /// \\return The wrapped data.\n        template <class T>\n        inline archive_array<unsigned char> wrap_opaque(const T& t) {\n            return archive_array<unsigned char>((unsigned char*) &t,sizeof(t));\n        }\n\n\n        /// Serialize a function pointer.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam resT The function's return type.\n        /// \\tparam paramT Parameter pack for the function's arguments.\n        template <class Archive, typename resT, typename... paramT>\n        struct ArchiveSerializeImpl<Archive, resT(*)(paramT...), std::enable_if_t<!is_default_serializable_v<Archive, resT(*)(paramT...)> >> {\n            /// Serialize the function pointer.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] fn The function pointer.\n            template <typename A = Archive, typename = std::enable_if_t<is_output_archive<A>::value>>\n            static inline void serialize(const A& ar, resT(*(&fn))(paramT...)) {\n                ar &wrap_opaque(to_rel_fn_ptr(fn));\n            }\n\n            template <typename A = Archive>\n            static inline std::enable_if_t<!is_output_archive<A>::value, void> serialize(const A& ar, resT(*(&fn))(paramT...)) {\n                std::ptrdiff_t rel_fn_ptr{};\n                ar & wrap_opaque(rel_fn_ptr);\n                fn = to_abs_fn_ptr<std::remove_reference_t<decltype(fn)>>(rel_fn_ptr);\n            }\n        };\n\n\n        /// Serialize a member function pointer.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam resT The member function's return type.\n        /// \\tparam objT The object type.\n        /// \\tparam paramT Parameter pack for the member function's arguments.\n        template <class Archive, typename resT, typename objT, typename... paramT>\n        struct ArchiveSerializeImpl<Archive, resT(objT::*)(paramT...),\n                                    std::enable_if_t<!is_default_serializable_v<Archive, resT(objT::*)(paramT...)>>> {\n            /// Serialize the member function pointer.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] memfn The member function pointer.\n            template <typename A = Archive, typename = std::enable_if_t<is_output_archive<A>::value>>\n            static inline void serialize(const A& ar, resT(objT::*(&memfn))(paramT...)) {\n                ar &wrap_opaque(to_rel_memfn_ptr(memfn));\n            }\n\n            template <typename A = Archive>\n            static inline std::enable_if_t<!is_output_archive<A>::value, void> serialize(const A& ar, resT(objT::*(&memfn))(paramT...)) {\n                using rel_memfn_ptr_t = decltype(to_rel_memfn_ptr(memfn));\n                rel_memfn_ptr_t rel_fn_ptr{};\n                ar & wrap_opaque(rel_fn_ptr);\n                memfn = to_abs_memfn_ptr<decltype(memfn)>(rel_fn_ptr);\n            }\n        };\n\n        /// Serialize a const member function pointer.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam resT The const member function's return type.\n        /// \\tparam objT The object type.\n        /// \\tparam paramT Parameter pack for the const member function's arguments.\n        template <class Archive, typename resT, typename objT, typename... paramT>\n        struct ArchiveSerializeImpl<Archive, resT(objT::*)(paramT...) const,\n            std::enable_if_t<!is_default_serializable_v<Archive, resT(objT::*)(paramT...) const>>\n            > {\n            /// Serialize the const member function pointer.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] memfn The const member function pointer.\n            static inline void serialize(const Archive& ar, resT(objT::*memfn)(paramT...) const) {\n                ar & wrap_opaque(memfn);\n            }\n        };\n\n\n        /// Partial specialization of \\c ArchiveImpl for \\c archive_array.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type in the \\c archive_array.\n        template <class Archive, class T>\n        struct ArchiveImpl< Archive, archive_array<T> > {\n            /// Store the \\c archive_array, wrapped by the preamble/postamble.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] t The \\c archive_array.\n            /// \\return The archive.\n            static inline const Archive& wrap_store(const Archive& ar, const archive_array<T>& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"wrap_store for archive_array\" << std::endl);\n                ArchivePrePostImpl<Archive,T*>::preamble_store(ar);\n                //ar << t.n;\n                //ArchivePrePostImpl<Archive,T>::preamble_store(ar);\n                if constexpr (has_freestanding_serialize_with_size_v<std::add_pointer_t<T>, Archive>)\n                  serialize(ar,(T *) t.ptr,t.n);\n                else if constexpr (has_freestanding_default_serialize_with_size_v<std::add_pointer_t<T>, Archive>)\n                  default_serialize(ar,(T *) t.ptr,t.n);\n                else\n                  assert(false);\n                //ArchivePrePostImpl<Archive,T>::postamble_store(ar);\n                ArchivePrePostImpl<Archive,T*>::postamble_store(ar);\n                return ar;\n            }\n\n            /// Load the \\c archive_array, using the preamble and postamble to perform runtime type-checking.\n\n            /// \\param[in] ar The archive.\n            /// \\param[out] t The \\c archive_array.\n            /// \\return The archive.\n            static inline const Archive& wrap_load(const Archive& ar, const archive_array<T>& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"wrap_load for archive_array\" << std::endl);\n                ArchivePrePostImpl<Archive,T*>::preamble_load(ar);\n                //unsigned int n;\n                //ar >> n;\n                //if (n != t.n)\n                //    MADNESS_EXCEPTION(\"deserializing archive_array: dimension mismatch\", n);\n                //ArchivePrePostImpl<Archive,T>::preamble_load(ar);\n                if constexpr (has_freestanding_serialize_with_size_v<std::add_pointer_t<T>, Archive>)\n                  serialize(ar,(T *) t.ptr,t.n);\n                else if constexpr (has_freestanding_default_serialize_with_size_v<std::add_pointer_t<T>, Archive>)\n                  default_serialize(ar,(T *) t.ptr,t.n);\n                else\n                  assert(false);\n                //ArchivePrePostImpl<Archive,T>::postamble_load(ar);\n                ArchivePrePostImpl<Archive,T*>::postamble_load(ar);\n                return ar;\n            }\n        };\n\n\n        /// Partial specialization of \\c ArchiveImpl for fixed-dimension arrays that redirects to \\c archive_array.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type.\n        /// \\tparam n The array size.\n        template <class Archive, class T, std::size_t n>\n        struct ArchiveImpl<Archive, T[n], std::enable_if_t<!std::is_same_v<T,char> && is_serializable_v<Archive, T>>> {\n            /// Store the array, wrapped by the preamble/postamble.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] t The array.\n            /// \\return The archive.\n            static inline const Archive& wrap_store(const Archive& ar, const T(&t)[n]) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"wrap_store for array\" << std::endl);\n                ar << wrap(&t[0],n);\n                return ar;\n            }\n\n            /// Load the array, using the preamble and postamble to perform runtime type-checking.\n\n            /// \\param[in] ar The archive.\n            /// \\param[out] t The array.\n            /// \\return The archive.\n            static inline const Archive& wrap_load(const Archive& ar, const T(&t)[n]) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"wrap_load for array\" << std::endl);\n                ar >> wrap(&t[0],n);\n                return ar;\n            }\n        };\n\n\n        /// Serialize a complex number.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type underlying the complex number.\n        template <class Archive, typename T>\n        struct ArchiveStoreImpl< Archive, std::complex<T>, std::enable_if_t<is_serializable_v<Archive, T>> > {\n            /// Store a complex number.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] c The complex number.\n            static inline void store(const Archive& ar, const std::complex<T>& c) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"serialize complex number\" << std::endl);\n                ar & c.real() & c.imag();\n            }\n        };\n\n\n        /// Deserialize a complex number.\n\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type underlying the complex number.\n        template <class Archive, typename T>\n        struct ArchiveLoadImpl< Archive, std::complex<T>, std::enable_if_t<is_serializable_v<Archive, T>> > {\n            /// Load a complex number.\n\n            /// \\param[in] ar The archive.\n            /// \\param[out] c The complex number.\n            static inline void load(const Archive& ar, std::complex<T>& c) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"deserialize complex number\" << std::endl);\n                T r = 0, i = 0;\n                ar & r & i;\n                c = std::complex<T>(r,i);\n            }\n        };\n\n        /// Serialize std::atomic.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T A serializable data type\n        template <class Archive, typename T>\n        struct ArchiveStoreImpl< Archive, std::atomic<T>, std::enable_if_t<is_serializable_v<Archive, T>> > {\n          /// Store std::atomic<T> to archive\n\n          /// \\param[in] ar The archive.\n          /// \\param[in] v The atomic value.\n          static inline void store(const Archive& ar, const std::atomic<T>& v) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"serialize std::atomic value\" << std::endl);\n            ar & v.value;\n          }\n        };\n\n\n        /// Deserialize std::atomic.\n\n        /// \\tparam Archive the archive type.\n        /// \\tparam T A serializable data type\n        template <class Archive, typename T>\n        struct ArchiveLoadImpl< Archive, std::atomic<T>, std::enable_if_t<is_serializable_v<Archive, T>> > {\n          /// Load std::atomic<T> from archive\n\n          /// \\param[in] ar The archive.\n          /// \\param[out] v The atomic value.\n          static inline void load(const Archive& ar, std::atomic<T>& v) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"deserialize std::atomic value\"\n                                        << std::endl);\n            T value;\n            ar & value;\n            v.store(value);\n          }\n        };\n\n#if __cplusplus >= 202002L  // std::atomic_flag::test is only in C++20\n        /// Serialize std::atomic_flag.\n\n        /// \\tparam Archive The archive type.\n        template <class Archive>\n        struct ArchiveStoreImpl< Archive, std::atomic_flag, std::enable_if_t<is_serializable_v<Archive, bool>> > {\n          /// Store std::atomic_flag to archive\n\n          /// \\param[in] ar The archive.\n          /// \\param[in] v The atomic flag\n          static inline void store(const Archive& ar, std::atomic_flag v) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"serialize atomic_flag value\" << std::endl);\n            ar & v.test();\n          }\n        };\n\n\n        /// Deserialize std::atomic_flag.\n\n        /// \\tparam Archive the archive type.\n        template <class Archive>\n        struct ArchiveLoadImpl< Archive, std::atomic_flag, std::enable_if_t<is_serializable_v<Archive, bool>> > {\n          /// Load std::atomic_flag from archive\n\n          /// \\param[in] ar The archive.\n          /// \\param[out] v The atomic_flag value.\n          static inline void load(const Archive& ar, std::atomic_flag& v) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"deserialize atomic value\"\n                                        << std::endl);\n            bool value;\n            ar & value;\n            if (value)\n              v.test_and_set();\n            else\n              v.clear();\n          }\n        };\n#endif\n\n        /// Serialize a \\c std::allocator.\n\n        /// This is a no-op.\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type allocated by the \\c allocator.\n        template <class Archive, typename T>\n        struct ArchiveStoreImpl< Archive, std::allocator<T>, std::enable_if_t<!is_future<T>::value && is_serializable_v<Archive, T>> > {\n\n            /// Storing  a \\c std::allocator is a no-op\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] v The \\c allocator.\n            static inline void store(const Archive& ar, const std::allocator<T>& v) {\n            }\n        };\n\n\n        /// Deserialize a \\c std::allocator.\n\n        /// This is a no-op.\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type alllocated by in the \\c allocator.\n        template <class Archive, typename T>\n        struct ArchiveLoadImpl< Archive, std::allocator<T>, std::enable_if_t<!is_future<T>::value && is_serializable_v<Archive, T>> > {\n\n            /// Loading  a \\c std::allocator is a no-op\n\n            /// \\param[in] ar The archive.\n            /// \\param[out] v The \\c allocator.\n            static void load(const Archive& ar, std::allocator<T>& v) {\n            }\n        };\n\n        /// Serialize a \\c std::vector.\n\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type stored in the \\c vector.\n        /// \\tparam Alloc The allocator type.\n        template <class Archive, typename T, typename Alloc>\n        struct ArchiveStoreImpl< Archive, std::vector<T, Alloc>, std::enable_if_t<!is_future<T>::value && is_serializable_v<Archive, T>> > {\n\n            /// Store a \\c std::vector of plain data.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] v The \\c vector.\n            static inline void store(const Archive& ar, const std::vector<T, Alloc>& v) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"serialize std::vector of plain data\" << std::endl);\n                if constexpr (!std::allocator_traits<Alloc>::is_always_equal::value) {\n                    ar & v.get_allocator();\n                }\n                ar & v.size();\n                ar & wrap(v.data(),v.size());\n            }\n        };\n\n\n        /// Deserialize a \\c std::vector. Clears and resizes as necessary.\n\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type stored in the \\c vector.\n        /// \\tparam Alloc The allocator type.\n        template <class Archive, typename T, typename Alloc>\n        struct ArchiveLoadImpl< Archive, std::vector<T, Alloc>, std::enable_if_t<!is_future<T>::value && is_serializable_v<Archive, T>> > {\n\n            /// Load a \\c std::vector.\n\n            /// Clears and resizes the \\c vector as necessary.\n            /// \\param[in] ar The archive.\n            /// \\param[out] v The \\c vector.\n            static void load(const Archive& ar, std::vector<T, Alloc>& v) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"deserialize std::vector of plain data\" << std::endl);\n                if constexpr (!std::allocator_traits<Alloc>::is_always_equal::value) {\n                    Alloc allocator;\n                    ar & allocator;\n                    v = std::vector<T, Alloc>(allocator);\n                }\n                std::size_t n = 0ul;\n                ar & n;\n                if (n != v.size()) {\n                    v.clear();\n                    v.resize(n);\n                }\n                ar & wrap((T *) v.data(),n);\n            }\n\n        };\n\n\n        /// Serialize a \\c std::vector<bool> (as a plain array of bool).\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam Alloc The allocator type.\n        template <class Archive, typename Alloc>\n        struct ArchiveStoreImpl< Archive, std::vector<bool, Alloc> > {\n            /// Store a \\c vector<bool>.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] v The \\c vector.\n            static inline void store(const Archive& ar, const std::vector<bool, Alloc>& v) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"serialize std::vector<bool>\" << std::endl);\n                if constexpr (!std::allocator_traits<Alloc>::is_always_equal::value) {\n                    ar & v.get_allocator();\n                }\n                std::size_t n = v.size();\n                bool* b = new bool[n];\n                for (std::size_t i=0; i<n; ++i) b[i] = v[i];\n                ar & n & wrap(b,v.size());\n                delete [] b;\n            }\n        };\n\n\n        /// Deserialize a std::vector<bool>. Clears and resizes as necessary.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam Alloc The allocator type.\n        template <class Archive, typename Alloc>\n        struct ArchiveLoadImpl< Archive, std::vector<bool, Alloc> > {\n            /// Load a \\c vector<bool>.\n\n            /// Clears and resizes the \\c vector as necessary.\n            /// \\param[in] ar The archive.\n            /// \\param[out] v The \\c vector.\n            static void load(const Archive& ar, std::vector<bool, Alloc>& v) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"deserialize std::vector<bool>\" << std::endl);\n                if constexpr (!std::allocator_traits<Alloc>::is_always_equal::value) {\n                    Alloc allocator;\n                    ar & allocator;\n                    v = std::vector<bool, Alloc>(allocator);\n                }\n                std::size_t n = 0ul;\n                ar & n;\n                if (n != v.size()) {\n                    v.clear();\n                    v.resize(n);\n                }\n                bool* b = new bool[n];\n                ar & wrap(b,v.size());\n                for (std::size_t i=0; i<n; ++i) v[i] = b[i];\n                delete [] b;\n            }\n        };\n\n        /// Serialize a \\c std::array.\n\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type stored in the \\c std::array.\n        /// \\tparam N The size of the \\c std::array.\n        template <class Archive, typename T, std::size_t N>\n        struct ArchiveStoreImpl< Archive, std::array<T, N>, std::enable_if_t<is_serializable_v<Archive, T>> > {\n\n            /// Store a \\c std::array.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] v The array object to be serialized.\n            static inline void store(const Archive& ar, const std::array<T, N>& v) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"serialize std::array<T,\" << N << \">, with T plain data\" << std::endl);\n                ar & v.size();\n                ar & wrap(v.data(),v.size());\n            }\n\n        };\n\n        /// Deserialize a \\c std::array. \\c MADNESS_ASSERT 's that the size matches.\n\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type stored in the \\c std::array.\n        /// \\tparam N The size of the \\c std::array.\n        template <class Archive, typename T, std::size_t N>\n        struct ArchiveLoadImpl< Archive, std::array<T, N>, std::enable_if_t<is_serializable_v<Archive, T>> > {\n\n            /// Load a \\c std::array.\n\n            /// \\param[in] ar The archive.\n            /// \\param[out] v The array to be deserialized.\n            static void load(const Archive& ar, std::array<T, N>& v) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"deserialize std::array<T,\" << N << \">, with T plain data\" << std::endl);\n                std::size_t n = 0ul;\n                ar & n;\n                MADNESS_ASSERT(n == v.size());\n                ar & wrap((T *) v.data(),n);\n            }\n\n        };\n\n        /// Serialize a 'std::string'.\n\n        /// \\tparam Archive The archive type.\n        template <class Archive>\n        struct ArchiveStoreImpl< Archive, std::string > {\n            /// Store a string.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] v The string.\n            static void store(const Archive& ar, const std::string& v) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"serialize std::string\" << std::endl);\n                ar & v.size();\n                ar & wrap((const char*) v.data(),v.size());\n            }\n        };\n\n\n        /// Deserialize a std::string. Clears and resizes as necessary.\n\n        /// \\tparam Archive The archive type.\n        template <class Archive>\n        struct ArchiveLoadImpl< Archive, std::string > {\n            /// Load a string.\n\n            /// Clears and resizes the string as necessary.\n            /// \\param[in] ar The archive.\n            /// \\param[out] v The string.\n            static void load(const Archive& ar, std::string& v) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"deserialize std::string\" << std::endl);\n                std::size_t n = 0ul;\n                ar & n;\n                if (n != v.size()) {\n                    v.clear();\n                    v.resize(n);\n                }\n                ar & wrap((char*) v.data(),n);\n            }\n        };\n\n\n        /// Serialize (deserialize) an std::pair.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The first data type in the pair.\n        /// \\tparam Q The second data type in the pair.\n        template <class Archive, typename T, typename Q>\n        struct ArchiveSerializeImpl< Archive, std::pair<T, Q>, std::enable_if_t<is_serializable_v<Archive, T> && is_serializable_v<Archive, Q>> > {\n            /// Serialize the \\c pair.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in,out] t The \\c pair.\n            static inline void serialize(const Archive& ar, std::pair<T,Q>& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"(de)serialize std::pair\" << std::endl);\n                ar & t.first & t.second;\n            }\n        };\n\n        /// Serialize (deserialize) an std::optional.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The data type stored in the optional object\n        template <class Archive, typename T>\n        struct ArchiveSerializeImpl< Archive, std::optional<T>, std::enable_if_t<is_serializable_v<Archive, T>> > {\n            /// Serialize the \\c std::optional.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in,out] t The \\c optional.\n            static inline void serialize(const Archive& ar, std::optional<T>& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"(de)serialize std::optional\" << std::endl);\n                if constexpr (is_output_archive_v<Archive>) {  // serialize\n                    ar & t.has_value();\n                    if (t.has_value())\n                      ar & t.value();\n                } else {\n                    bool has_value;\n                    ar & has_value;\n                    if (has_value) {\n                      T value;\n                      ar & value;\n                      t = std::move(value);\n                    }\n                }\n            }\n        };\n\n        namespace {\n\n          template <size_t idx, class Archive, typename... Types>\n          struct tuple_serialize_helper;\n\n          template <class Archive, typename... Types>\n          struct tuple_serialize_helper<0,Archive,Types...> {\n        \t  static void exec(const Archive& ar, std::tuple<Types...>& t) {\n        \t\t  ar & std::get<0>(t);\n        \t  }\n          };\n          template <size_t idx, class Archive, typename... Types>\n          struct tuple_serialize_helper {\n        \t  static void exec(const Archive& ar, std::tuple<Types...>& t) {\n        \t\t  ar & std::get<idx>(t);\n        \t\t  tuple_serialize_helper<idx-1,Archive,Types...>::exec(ar,t);\n        \t  }\n          };\n\n        };\n\n        /// Serialize (deserialize) a std::tuple\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam Types The tuple payload\n        template <class Archive, typename... Types>\n        struct ArchiveSerializeImpl< Archive, std::tuple<Types...>, std::enable_if_t<(is_serializable_v<Archive, Types> && ... ) >> {\n            /// Serialize the \\c std::tuple.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in,out] t The \\c tuple.\n            static inline void serialize(const Archive& ar, std::tuple<Types...>& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"(de)serialize std::tuple\" << std::endl);\n                constexpr auto size = std::tuple_size<std::tuple<Types...>>::value;\n                tuple_serialize_helper<size-1,Archive,Types...>::exec(ar, t);\n            }\n        };\n\n        /// Serialize an \\c std::map.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The map's key type.\n        /// \\tparam Q The map's data type.\n        /// \\tparam Compare The map's comparer type.\n        /// \\tparam Alloc The map's allocator type.\n        template <class Archive, typename T, typename Q, typename Compare, typename Alloc>\n        struct ArchiveStoreImpl< Archive, std::map<T,Q,Compare,Alloc>, std::enable_if_t<is_serializable_v<Archive, T> && is_serializable_v<Archive, Q>>  > {\n            /// Store a \\c map.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] t The \\c map.\n            static void store(const Archive& ar, const std::map<T,Q,Compare,Alloc>& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"serialize std::map\" << std::endl);\n                if constexpr (!std::allocator_traits<Alloc>::is_always_equal::value) {\n                    ar & t.get_allocator();\n                }\n                ar << t.size();\n                for (auto p = t.begin();\n                        p != t.end(); ++p) {\n                    // Fun and games here since IBM's iterator (const or\n                    // otherwise) gives us a const qualified key\n                    // (p->first) which buggers up the type matching\n                    // unless the user defines pair(T,Q) and pair(const\n                    // T,Q) to have cookie (which is tedious).\n                    std::pair<T,Q> pp = *p;\n                    ar & pp;\n                }\n            }\n        };\n\n\n        /// Deserialize an \\c std::map. The \\c map is \\em not cleared; duplicate elements are replaced.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The map's key type.\n        /// \\tparam Q The map's data type.\n        /// \\tparam Compare The map's comparer type.\n        /// \\tparam Alloc The map's allocator type.\n        template <class Archive, typename T, typename Q, typename Compare, typename Alloc>\n        struct ArchiveLoadImpl< Archive, std::map<T,Q,Compare,Alloc>, std::enable_if_t<is_serializable_v<Archive, T> && is_serializable_v<Archive, Q>>  > {\n            /// Load a \\c map.\n\n            /// The \\c map is \\em not cleared; duplicate elements are replaced.\n            /// \\param[in] ar The archive.\n            /// \\param[out] t The \\c map.\n            static void load(const Archive& ar, std::map<T,Q,Compare,Alloc>& t) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"deserialize std::map\" << std::endl);\n                if constexpr (!std::allocator_traits<Alloc>::is_always_equal::value) {\n                    Alloc allocator;\n                    ar & allocator;\n                    t = std::map<T,Q,Compare,Alloc>(allocator);\n                }\n                else\n                    t.clear();\n                std::size_t n = 0;\n                ar & n;\n                while (n--) {\n                    std::pair<T,Q> p;\n                    ar & p;\n                    t.emplace(std::move(p.first), std::move(p.second));\n                }\n            }\n        };\n\n\n        /// Serialize a \\c std::set.\n\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type stored in the \\c set.\n        /// \\tparam Compare The comparison operator.\n        /// \\tparam Alloc The allocator.\n        template <class Archive, typename T, typename Compare, typename Alloc>\n        struct ArchiveStoreImpl< Archive, std::set<T, Compare, Alloc>, std::enable_if_t<!is_future<T>::value && is_serializable_v<Archive, T>> > {\n\n            /// Store a \\c std::set.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] s The \\c set.\n            static inline void store(const Archive& ar, const std::set<T, Compare, Alloc>& s) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"serialize std::set\" << std::endl);\n                if constexpr (!std::allocator_traits<Alloc>::is_always_equal::value) {\n                    ar & s.get_allocator();\n                }\n                ar << s.size();\n                for (const auto &i : s)\n                  ar << i;\n            }\n        };\n\n\n        /// Deserialize a \\c std::set. Clears and resizes as necessary.\n\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type stored in the \\c set.\n        /// \\tparam Compare The comparison operator.\n        /// \\tparam Alloc The allocator.\n        template <class Archive, typename T, typename Compare, typename Alloc>\n        struct ArchiveLoadImpl< Archive, std::set<T, Compare, Alloc>, std::enable_if_t<!is_future<T>::value && is_serializable_v<Archive, T>> > {\n\n            /// Load a \\c std::set.\n            /// \\param[in] ar The archive.\n            /// \\param[out] s The \\c set.\n            static void load(const Archive& ar, std::set<T, Compare, Alloc>& s) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"deserialize std::set\" << std::endl);\n                if constexpr (!std::allocator_traits<Alloc>::is_always_equal::value) {\n                  Alloc allocator;\n                  ar & allocator;\n                  s = std::set<T, Compare, Alloc>(allocator);\n                }\n                std::size_t size=0;\n                ar >> size;\n                s.clear();\n                auto hint = s.begin();\n                for (std::size_t i = 0; i < size; ++i)\n                {\n                  typename std::set<T, Compare, Alloc>::key_type key=0;\n                  ar >> key;\n                  hint = s.emplace_hint(hint, std::move(key));\n                }\n            }\n\n        };\n\n\n        /// Serialize a \\c std::list.\n\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type stored in the \\c list.\n        /// \\tparam Alloc The allocator.\n        template <class Archive, typename T, typename Alloc>\n        struct ArchiveStoreImpl< Archive, std::list<T,Alloc>, std::enable_if_t<!is_future<T>::value && is_serializable_v<Archive, T>> > {\n\n            /// Store a \\c std::list.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] s The \\c list.\n            static inline void store(const Archive& ar, const std::list<T, Alloc>& s) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"serialize std::list\" << std::endl);\n                if constexpr (!std::allocator_traits<Alloc>::is_always_equal::value) {\n                  ar & s.get_allocator();\n                }\n                ar << s.size();\n                for (const auto &i : s)\n                    ar << i;\n            }\n        };\n\n\n        /// Deserialize a \\c std::list. Clears and resizes as necessary.\n\n        /// \\tparam Archive the archive type.\n        /// \\tparam T The data type stored in the \\c list.\n        /// \\tparam Alloc The allocator.\n        template <class Archive, typename T, typename Alloc>\n        struct ArchiveLoadImpl< Archive, std::list<T, Alloc>, std::enable_if_t<!is_future<T>::value && is_serializable_v<Archive, T>> > {\n\n        /// Load a \\c std::list.\n        /// \\param[in] ar The archive.\n        /// \\param[out] s The \\c list.\n        static void load(const Archive& ar, std::list<T, Alloc>& s) {\n            MAD_ARCHIVE_DEBUG(std::cout << \"deserialize std::list\" << std::endl);\n            if constexpr (!std::allocator_traits<Alloc>::is_always_equal::value) {\n                    Alloc allocator;\n                    ar & allocator;\n                    s = std::list<T, Alloc>(allocator);\n            }\n            std::size_t size=0;\n            ar >> size;\n            s.clear();\n            for (std::size_t i = 0; i < size; ++i)\n            {\n                T elem;\n                ar >> elem;\n                s.emplace_back(std::move(elem));\n            }\n        }\n\n        };\n\n        /// @}\n\n}  // namespace madness::archive\n}  // namespace madness\n\n#endif // MADNESS_WORLD_ARCHIVE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/archive_type_names.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file archive_type_names.cc\n \\brief Defines archive type names for supported (by default) types.\n \\ingroup serialization\n*/\n\n#include <madness/world/MADworld.h>\n#include <cstring>\n\nnamespace madness {\n    namespace archive {\n\n        template <typename T> const unsigned char archive_typeinfo<T>::cookie;\n\n        const char *archive_type_names[256];\n\n        // Forces initialization of type names at startup\n        // (breaks on shared libs ?)\n        /// \\todo Investigate if this is necessary...\n        static BaseArchive fred_and_mary_sitting_under_a_tree;\n\n        void archive_initialize_type_names() {\n            static bool initialized = false;\n            if (initialized)\n                return;\n            initialized = true;\n\n            for (int i=0; i<255; ++i)\n                archive_type_names[i] = \"invalid\";\n\n            archive_type_names[255] = \"unknown/user-defined\";\n\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(unsigned char);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(unsigned short);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(unsigned int);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(unsigned long);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(unsigned long long);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(signed char);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(signed short);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(signed int);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(signed long);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(signed long long);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(bool);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(float);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(double);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(long double);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::complex<float>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::complex<double>);\n\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<char>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<unsigned char>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<short>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<unsigned short>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<int>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<unsigned int>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<long>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<unsigned long>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<bool>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<float>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::vector<double>);\n\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(std::string);\n\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(Tensor<int>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(Tensor<long>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(Tensor<float>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(Tensor<double>);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(Tensor< std::complex<float> >);\n            ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(Tensor< std::complex<double> >);\n        }\n    }\n}\n"
  },
  {
    "path": "src/madness/world/array_addons.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_ARRAY_ADDONS_H__INCLUDED\n#define MADNESS_WORLD_ARRAY_ADDONS_H__INCLUDED\n\n/**\n \\file array_addons.h\n \\brief Supplements to the \\c std::array class, such as I/O operations,\n    for convenience.\n \\ingroup containers\n*/\n\n#include <madness/madness_config.h>\n#include <madness/world/madness_exception.h>\n#include <madness/world/worldhash.h>\n#include <array>\n#include <iostream>\n\nnamespace madness {\n\n    namespace operators {\n        /// Output \\c std::array to stream for human consumption.\n\n        /// \\tparam T The type of data stored in the array.\n        /// \\tparam N The size of the array.\n        /// \\param[in,out] s The output stream.\n        /// \\param[in] a The array to be output.\n        /// \\return The output stream.\n        template <typename T, std::size_t N>\n        std::ostream &operator<<(std::ostream &s, const std::array<T, N> &a) {\n  s << \"[\";\n  for (std::size_t i = 0; i < N; ++i) {\n    s << a[i];\n    if (i != (N - 1))\n      s << \",\";\n  }\n  s << \"]\";\n  return s;\n}\n    }  // namespace operators\n\n    /// Hash std::array with madness hash.\n\n    /// \\tparam T The type of data stored in the array.\n    /// \\tparam N The size of the array.\n    /// \\param[in] a The array.\n    /// \\return The hash.\n    template <typename T, std::size_t N>\n    madness::hashT hash_value(const std::array<T,N>& a) {\n        // Use this version of range for potential optimization.\n        return madness::hash_range(a.data(), N);\n    }\n\n} // namespace madness\n\n#endif // MADNESS_WORLD_ARRAY_ADDONS_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/atomicint.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_ATOMICINT_H__INCLUDED\n#define MADNESS_WORLD_ATOMICINT_H__INCLUDED\n\n/**\n \\file atomicint.h\n \\brief Implements \\c AtomicInt.\n \\ingroup atomics\n*/\n\n#include <madness/madness_config.h>\n\n/// \\addtogroup atomics\n/// @{\n\n/* Jeff: I suppose there is a cleaner way to do this with preprocess arithmetic,\n *       but I do not think it matters.  This code is clear enough. */\n\n#if defined(__GNUC__) && defined(__GNUC_MINOR__)\n# if (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)\n#  define MADNESS_GCC_48_OR_HIGHER\n# endif\n#endif\n\n#if defined(__clang__) && defined(__clang_major__) && defined(__clang_minor__)\n# if (__clang_major__ >= 4) || (__clang_major__ == 3 && __clang_minor__ >= 3)\n#  define MADNESS_CLANG_33_OR_HIGHER\n# endif\n#endif\n\n#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1300)\n#define MADNESS_ICC_130_OR_HIGHER\n#endif\n\n/* Jeff: This needs to move into config.h and have an associated configure test. */\n/* Jeff: Nick does not want this used on Blue Gene/Q, so we will not allow it\n *       even if other tests indicate that it should work. */\n#if !defined(__bgq__) && (__cplusplus >= 201103L)\n# if defined(MADNESS_GCC_48_OR_HIGHER) || defined(MADNESS_CLANG_33_OR_HIGHER)\n#  define HAVE_CXX_ATOMICS\n# endif\n#endif\n\n#ifdef MADNESS_GCC_48_OR_HIGHER\n#undef MADNESS_GCC_48_OR_HIGHER\n#endif\n\n#ifdef MADNESS_ICC_130_OR_HIGHER\n#undef MADNESS_ICC_130_OR_HIGHER\n#endif\n\n#ifdef MADNESS_CLANG_33_OR_HIGHER\n#undef MADNESS_CLANG_33_OR_HIGHER\n#endif\n\n#if defined(HAVE_CXX_ATOMICS)\n#  define MADATOMIC_USE_CXX\n/* Jeff: It is odd that MADATOMIC_USE_GCC is tested before it is defined,\n *       at least in this file.  Is this intentional? */\n#elif defined(HAVE_IBMBGP) && !defined(MADATOMIC_USE_GCC)\n#  define MADATOMIC_USE_BGP\n#elif defined(HAVE_IBMBGQ)\n#  define MADATOMIC_USE_BGQ\n#elif defined(USE_X86_32_ASM) || defined(USE_X86_64_ASM) || defined(X86_64) || defined(X86_32)\n#  define MADATOMIC_USE_X86_ASM\n#else\n#  define MADATOMIC_USE_GCC\n#endif\n\n#if defined(MADATOMIC_USE_CXX)\n#  include <atomic>\n#elif defined(MADATOMIC_USE_BGP)\n#  include <bpcore/bgp_atomic_ops.h>\n#elif defined (MADATOMIC_USE_BGQ)\n#  include \"bgq_atomics.h\"\n#elif defined(MADATOMIC_USE_AIX)\n#  include <sys/atomic_op.h>\n#elif defined(MADATOMIC_USE_GCC)\n#  ifdef GCC_ATOMICS_IN_BITS\n#    include <bits/atomicity.h>\n#  else\n#    include <ext/atomicity.h>\n#  endif\n#endif\n\nnamespace madness {\n\n    /// \\brief An integer with atomic set, get, read+increment, read+decrement,\n    ///    and decrement+test operations.\n\n    /// Only the default constructor is available and it does \\emph not\n    /// initialize the variable.\n    ///\n    /// Consciously modeled after the TBB API to prepare for switching to it.\n    /// \\todo Should we actually switch to the TBB version?\n    class AtomicInt {\n    private:\n\n        /// Storage type for the atomic integer.\n#if defined(MADATOMIC_USE_CXX)\n        typedef std::atomic_int atomic_int;\n#elif defined(MADATOMIC_USE_BGP)\n        typedef _BGP_Atomic atomic_int;\n#elif defined(MADATOMIC_USE_BGQ)\n        /* It might be prudent to add the aligned/padding attribute\n         * here, for performance, similar to what _BGP_Atomic does. */\n        typedef volatile int atomic_int;\n#else\n        typedef volatile int atomic_int;\n#endif\n        atomic_int value; ///< The atomic integer.\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in] i Description needed.\n        /// \\return Description needed.\n        inline int exchange_and_add(int i) {\n#if defined(MADATOMIC_USE_CXX)\n            return value.fetch_add(i,std::memory_order_seq_cst);\n#elif defined(MADATOMIC_USE_GCC)\n            return __gnu_cxx::__exchange_and_add(&value,i);\n#elif defined(MADATOMIC_USE_X86_ASM)\n            __asm__ __volatile__(\"lock; xaddl %0,%1\" :\"=r\"(i) : \"m\"(value), \"0\"(i));\n            return i;\n#elif defined(MADATOMIC_USE_AIX)\n            return fetch_and_add(&value,i);\n#elif defined(MADATOMIC_USE_BGP)\n            return _bgp_fetch_and_add(&value,i);\n#elif defined(MADATOMIC_USE_BGQ)\n            return FetchAndAddSigned32(&value,i);\n#else\n#  error ... atomic exchange_and_add operator must be implemented for this platform;\n#endif\n        }\n\n    public:\n        /// \\brief Returns the value of the counter with fence, ensuring\n        ///    subsequent operations are not moved before the load.\n        operator int() const volatile {\n            /* Jeff moved the memory barrier inside of the architecture-specific blocks\n             * since it may be required to use a heavier hammer on some of them.        */\n#if defined(MADATOMIC_USE_CXX)\n            return value.load(std::memory_order_seq_cst);\n#elif defined(MADATOMIC_USE_BGP)\n            int result = value.atom;\n            __asm__ __volatile__ (\"\" : : : \"memory\");\n            return result;\n#elif defined (MADATOMIC_USE_BGQ)\n            int result = value;\n            __asm__ __volatile__ (\"\" : : : \"memory\");\n            return result;\n#else\n            int result = value;\n            // BARRIER to stop instructions migrating up\n            __asm__ __volatile__ (\"\" : : : \"memory\");\n            return result;\n#endif\n        }\n\n        /// Sets the value of the counter, with a fence ensuring that preceding\n        /// operations are not moved after the store.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in] other Description needed.\n        /// \\return Description needed.\n        int operator=(int other) {\n            /* Jeff moved the memory barrier inside of the architecture-specific blocks\n             * since it may be required to use a heavier hammer on some of them.        */\n#if defined(MADATOMIC_USE_CXX)\n            value.store(other,std::memory_order_seq_cst);\n#elif defined(MADATOMIC_USE_BGP)\n            // BARRIER to stop instructions migrating down\n            __asm__ __volatile__ (\"\" : : : \"memory\");\n            value.atom = other;\n#elif defined (MADATOMIC_USE_BGQ)\n            __asm__ __volatile__ (\"\" : : : \"memory\");\n            value = other;\n#else\n            __asm__ __volatile__ (\"\" : : : \"memory\");\n            value = other;\n#endif\n            return other;\n        }\n\n        /// \\brief Sets the value of the counter, with fences to ensure that\n        ///    operations are not moved to either side of the load+store.\n\n        /// \\param[in] other The value to set to.\n        /// \\return This \\c AtomicInt.\n        AtomicInt& operator=(const AtomicInt& other) {\n            *this = int(other);\n            return *this;\n        }\n\n        /// Decrements the counter and returns the original value.\n\n        /// \\return The original value.\n        int operator--(int) {\n#if defined(MADATOMIC_USE_CXX)\n            return value--;\n#else\n            return exchange_and_add(-1);\n#endif\n        }\n\n        /// Decrements the counter and returns the decremented value.\n\n        /// \\return The decremented value.\n        int operator--() {\n#if defined(MADATOMIC_USE_CXX)\n            return --value;\n#else\n            return exchange_and_add(-1) - 1;\n#endif\n        }\n\n        /// Increments the counter and returns the original value.\n\n        /// \\return The original value.\n        int operator++(int) {\n#if defined(MADATOMIC_USE_CXX)\n            return value++;\n#else\n            return exchange_and_add(1);\n#endif\n        }\n\n        /// Increments the counter and returns the incremented value.\n\n        /// \\return The incremented value.\n        int operator++() {\n#if defined(MADATOMIC_USE_CXX)\n            return ++value;\n#else\n            return exchange_and_add(1) + 1;\n#endif\n        }\n\n        /// Add \\c value and return the new value.\n\n        /// \\param[in] inc The value to be added.\n        /// \\return The new value.\n        int operator+=(const int inc) {\n#if defined(MADATOMIC_USE_CXX)\n            return (value.fetch_add(inc, std::memory_order_seq_cst) + inc);\n#else\n            return exchange_and_add(inc) + inc;\n#endif\n        }\n\n        /// Subtract \\c dec and return the new value.\n\n        /// \\param[in] dec The value to be subtracted.\n        /// \\return The new value.\n        int operator-=(const int dec) {\n#if defined(MADATOMIC_USE_CXX)\n            return (value.fetch_sub(dec, std::memory_order_seq_cst) - dec);\n#else\n            return exchange_and_add(-dec) - dec;\n#endif\n        }\n\n        /// Decrements the counter and returns true if the new value is zero,\n\n        /// \\return True if the decremented value is 0; false otherwise.\n        bool dec_and_test() {\n            return ((*this)-- == 1);\n        }\n\n#ifdef ATOMICINT_CAS\n        /// Compare and swap.\n\n        /// If `value == compare` then set `value = newval`.\n        /// \\param[in] compare The value to compare against.\n        /// \\param[in] newval The new value if the comparison is true.\n        /// \\return The original value.\n        inline int compare_and_swap(int compare, int newval) {\n#if defined(MADATOMIC_USE_CXX)\n#warning The C++11 implementation of compare-and-swap has never been tested.\n            std::bool swapped = value.compare_exchange_strong_explicit(&compare, newval,\n                                                                       std::memory_order_seq_cst,\n                                                                       std::memory_order_seq_cst);\n            /* We must return the original value, which is not the return argument above.\n             * If swapped=true, then obj was expected before the call, so we return that.\n             * If swapped=false, then obj is unchanged, so we can just return that. */\n            return (swapped ? compare : value);\n#elif defined(MADATOMIC_USE_GCC)\n            return __sync_val_compare_and_swap(&value, compare, newval);\n#elif defined(MADATOMIC_USE_BGP)\n            return _bgp_compare_and_swap(&value, compare, newval);\n#elif defined(MADATOMIC_USE_BGQ)\n            return CompareAndSwapSigned32(&value, compare, newval);\n#else\n#error ... atomic exchange_and_add operator must be implemented for this platform;\n#endif\n        }\n#endif\n\n    }; // class AtomicInt\n\n}\n\n/// @}\n\n#endif // MADNESS_WORLD_ATOMICINT_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/bgq_atomics.h",
    "content": "/*\n * Written by Jeff Hammond, July 2012\n * Copyright Argonne National Laboratory\n *\n * This implementation of BGQ atomics is based upon \n * hwi/include/bqc/A2_inlines.h but uses signed integers\n * instead of unsigned integer and/or long types.\n *\n * In theory, this should work for any PowerPC system.  Need to verify on Blue Gene/P and POWER7. \n */\n\n#include <stdint.h>\n\n#ifndef __INLINE__\n#define __INLINE__ extern inline __attribute__((always_inline))\n#endif\n\n/* Not yet verified for use on non-BGQ PPC but not active there anyways */\n#if defined(__bgq__) || defined(__bgp__) || defined(__powerpc__)\n__INLINE__ int32_t LoadReservedSigned32( volatile int32_t *pVar )\n{\n   register int32_t Val;\n   asm volatile (\"lwarx   %[rc],0,%[pVar];\"\n                 : [rc] \"=&b\" (Val)\n                 : [pVar] \"b\" (pVar));\n   return(Val);\n}\n\n__INLINE__ int StoreConditionalSigned32( volatile int32_t *pVar, int32_t Val )\n{\n   register int rc = 1; // assume success\n   asm volatile (\"  stwcx.  %2,0,%1;\"\n                 \"  beq     1f;\"       // conditional store succeeded\n                 \"  li      %0,0;\"\n                 \"1:;\"\n                 : \"=b\" (rc)\n                 : \"b\"  (pVar),\n                   \"b\"  (Val),\n                   \"0\"  (rc)\n                 : \"cc\", \"memory\" );\n   return(rc);\n}\n\n__INLINE__ int32_t CompareAndSwapSigned32( volatile int32_t *var, int32_t  Compare, int32_t  NewValue )\n{\n    asm volatile (\"msync\" : : : \"memory\");\n\n    int32_t OldValue = *var;\n\n    do {\n       int32_t TmpValue = LoadReservedSigned32( var );\n       if ( Compare != TmpValue  ) return(OldValue);\n       }\n       while( !StoreConditionalSigned32( var, NewValue ) );\n\n    return(OldValue);\n}\n\n__INLINE__ int32_t FetchAndAddSigned32( volatile int32_t *pVar, int32_t value )\n{\n    asm volatile (\"msync\" : : : \"memory\");\n\n    register int32_t old_val, tmp_val;\n\n    do\n    {\n        old_val = LoadReservedSigned32( pVar );\n        tmp_val = old_val + value;\n    }\n    while ( !StoreConditionalSigned32( pVar, tmp_val ) );\n\n    return( old_val );\n}\n\n__INLINE__ void MemoryBarrier(void)\n{\n    asm volatile (\"msync\" : : : \"memory\");\n\n    return;\n}\n\n#else\n#error You cannot use PowerPC assembly on a non-PowerPC architecture!\n#endif\n"
  },
  {
    "path": "src/madness/world/binary_fstream_archive.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file binary_fstream_archive.cc\n \\brief Implements an archive wrapping a binary filestream.\n \\ingroup serialization\n*/\n\n#include <madness/world/binary_fstream_archive.h>\n#include <madness/world/madness_exception.h>\n#include <cstring>\n#include <memory>\n\nnamespace madness {\n    namespace archive {\n\n        BinaryFstreamOutputArchive::BinaryFstreamOutputArchive(const char* filename, std::ios_base::openmode mode)\n                : iobuf()\n        {\n            if (filename) open(filename, mode);\n        }\n\n        void BinaryFstreamOutputArchive::open(const char* filename, std::ios_base::openmode mode) {\n            iobuf.reset(new char[IOBUFSIZE], std::default_delete<char[]>() );\n            os.open(filename, mode);\n#ifndef ON_A_MAC\n            os.rdbuf()->pubsetbuf(iobuf.get(), IOBUFSIZE);\n#endif\n\n            store(ARCHIVE_COOKIE, strlen(ARCHIVE_COOKIE)+1);\n        }\n\n        void BinaryFstreamOutputArchive::close() {\n            if (iobuf) {\n                os.close();\n                iobuf.reset();\n            }\n        };\n\n        void BinaryFstreamOutputArchive::flush() {\n            os.flush();\n        }\n\n        BinaryFstreamInputArchive::BinaryFstreamInputArchive(const char* filename, std::ios_base::openmode mode)\n                : iobuf() {\n            if (filename) open(filename, mode);\n        }\n\n\n        void BinaryFstreamInputArchive::open(const char* filename,  std::ios_base::openmode mode) {\n            iobuf.reset(new char[IOBUFSIZE], std::default_delete<char[]>() );\n            is.open(filename, mode);\n            if (!is) MADNESS_EXCEPTION(\"BinaryFstreamInputArchive: open: failed\", 1);\n            is.rdbuf()->pubsetbuf(iobuf.get(), IOBUFSIZE);\n            char cookie[255];\n            int n = strlen(ARCHIVE_COOKIE)+1;\n            load(cookie, n);\n            if (strncmp(cookie,ARCHIVE_COOKIE,n) != 0)\n                MADNESS_EXCEPTION(\"BinaryFstreamInputArchive: open: not an archive?\", 1);\n        }\n\n        void BinaryFstreamInputArchive::close() {\n            if (iobuf) {\n                is.close();\n                iobuf.reset();\n            }\n        }\n\n    } // namespace archive\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/binary_fstream_archive.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_BINARY_FSTREAM_ARCHIVE_H__INCLUDED\n#define MADNESS_WORLD_BINARY_FSTREAM_ARCHIVE_H__INCLUDED\n\n/**\n \\file binary_fstream_archive.h\n \\brief Implements an archive wrapping a binary filestream.\n \\ingroup serialization\n*/\n\n#include <type_traits>\n#include <fstream>\n#include <memory>\n#include <madness/world/archive.h>\n\nnamespace madness {\n    namespace archive {\n\n        /// \\addtogroup serialization\n        /// @{\n\n        /// Wraps an archive around a binary filestream for output.\n        class BinaryFstreamOutputArchive : public BaseOutputArchive {\n            static const std::size_t IOBUFSIZE = 4*1024*1024; ///< Buffer size.\n            std::shared_ptr<char> iobuf; ///< Buffer.\n            mutable std::ofstream os; ///< The filestream.\n\n        public:\n            /// Default constructor.\n\n            /// The filename and open modes are optional here; they can be\n            /// specified later by calling \\c open().\n            /// \\param[in] filename Name of the file to write to.\n            /// \\param[in] mode I/O attributes for opening the file.\n            BinaryFstreamOutputArchive(const char* filename = nullptr,\n                                       std::ios_base::openmode mode = std::ios_base::binary | \\\n                                                                      std::ios_base::out | std::ios_base::trunc);\n\n            BinaryFstreamOutputArchive(const std::string name,\n                                       std::ios_base::openmode mode = std::ios_base::binary | \\\n                                                                      std::ios_base::out | std::ios_base::trunc)\n                                                                              : BinaryFstreamOutputArchive(name.c_str(),mode) {}\n\n            /// Write to the filestream.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// serializable.\n            /// \\tparam T The type of data to be written.\n            /// \\param[in] t Location of the data to be written.\n            /// \\param[in] n The number of data items to be written.\n            template <class T>\n            inline\n            typename std::enable_if< is_trivially_serializable<T>::value, void >::type\n            store(const T* t, long n) const {\n                os.write((const char *) t, n*sizeof(T));\n            }\n\n            /// Open the filestream.\n\n            /// \\param[in] filename The name of the file.\n            /// \\param[in] mode I/O attributes for opening the file.\n            void open(const char* filename,\n                      std::ios_base::openmode mode = std::ios_base::binary | \\\n                                                     std::ios_base::out | std::ios_base::trunc);\n\n            /// Close the filestream.\n            void close();\n\n            /// Flush the filestream.\n            void flush();\n        };\n\n        /// Wraps an archive around a binary filestream for input.\n        class BinaryFstreamInputArchive : public BaseInputArchive {\n            static const std::size_t IOBUFSIZE = 4*1024*1024; ///< Buffer size.\n            std::shared_ptr<char> iobuf; ///< Buffer.\n            mutable std::ifstream is; ///< The filestream.\n\n        public:\n            /// Default constructor.\n\n            /// The filename and open modes are optional here; they can be\n            /// specified later by calling \\c open().\n            /// \\param[in] filename Name of the file to read from.\n            /// \\param[in] mode I/O attributes for opening the file.\n            BinaryFstreamInputArchive(const char* filename = nullptr, std::ios_base::openmode mode = std::ios_base::binary | std::ios_base::in);\n\n            /// Default constructor.\n\n            /// The filename and open modes are optional here; they can be\n            /// specified later by calling \\c open().\n            /// \\param[in] filename Name of the file to read from.\n            /// \\param[in] mode I/O attributes for opening the file.\n            BinaryFstreamInputArchive(const std::string name,\n                                       std::ios_base::openmode mode = std::ios_base::binary | \\\n                                                                      std::ios_base::in)\n                    : BinaryFstreamInputArchive(name.c_str(),mode) {}\n\n            /// Load from the filestream.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// serializable.\n            /// \\tparam T The type of data to be read.\n            /// \\param[out] t Where to put the loaded data.\n            /// \\param[in] n The number of data items to be loaded.\n            template <class T>\n            inline\n            typename std::enable_if< is_trivially_serializable<T>::value, void >::type\n            load(T* t, long n) const {\n                is.read((char *) t, n*sizeof(T));\n            }\n\n            /// Open the filestream.\n\n            /// \\param[in] filename Name of the file to read from.\n            /// \\param[in] mode I/O attributes for opening the file.\n            void open(const char* filename, std::ios_base::openmode mode = std::ios_base::binary | std::ios_base::in);\n\n            /// Close the filestream.\n            void close();\n        };\n\n        /// @}\n    }\n}\n#endif // MADNESS_WORLD_BINARY_FSTREAM_ARCHIVE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/binsorter.h",
    "content": "\n#ifndef MADNESS_WORLD_BINSORTER_H__INCLUDED\n#define MADNESS_WORLD_BINSORTER_H__INCLUDED\n\n#include <madness/world/MADworld.h>\n#include <madness/world/world_object.h>\n#include <madness/world/madness_exception.h>\n#include <vector>\n\nnamespace madness {\n\n    /// A parallel bin sort across MPI processes\n    template <typename T, typename inserterT>\n    class BinSorter : public WorldObject< BinSorter<T,inserterT> > {\n        World* pworld;\n        inserterT inserter;\n        std::size_t bufsize;\n        std::vector<T>* bins;\n        \n        void flush(int owner) {\n            if (bins[owner].size())\n                this->send(owner, &BinSorter<T,inserterT>::sorter,  bins[owner]);\n            bins[owner].clear();\n        }\n        \n        void sorter(const std::vector<T>& v) {\n            for(typename std::vector<T>::const_iterator it = v.begin(); it != v.end(); ++it) {\n                inserter(*it);\n            }\n        }\n        \n    public:\n        /// Constructs the sorter object \n\n        /// @param[in] world The world object that must persist during the existence of this object\n        /// @param[in] inserter User provides this routine to process an item of data on remote end\n        /// @param[in] bufsize Size of bin (in units of T) ... default value is as large as possible\n        BinSorter(World& world, inserterT inserter, int bufsize=0)\n            : WorldObject<BinSorter>(world)\n            , pworld(&world)\n            , inserter(inserter)\n            , bufsize(bufsize)\n            , bins(new std::vector<T>[world.size()])\n        {\n            // bufsize ... max from AM buffer size is about 512K/sizeof(T)\n            // bufsize ... max from total buffer use is about 1GB/sizeof(T)/P\n            if (bufsize <= 0) this->bufsize = std::min((RMI::max_msg_len()-1024)/sizeof(T),(1<<30)/(world.size()*sizeof(T)));\n\n            // for (int i=0; i<world.size(); i++) {\n            //     bins[i].reserve(bufsize); // Not a good idea on large process counts unless truly all to all?\n            // }\n\n            //print(\"binsorter bufsize is\", this->bufsize, this->bufsize*sizeof(T));\n            WorldObject< BinSorter<T,inserterT> >::process_pending();\n        }\n        \n        virtual ~BinSorter() {\n            for (int i=0; i<pworld->size(); i++) {\n                MADNESS_ASSERT(bins[i].size() == 0);\n            }\n            delete [] bins;\n        }\n        \n        /// Invoke to complete the sort, flush all buffers, and ensure communication/processing is complete\n        void finish() {\n            for (int i=0; i<pworld->size(); i++) {\n                flush(i);\n            }\n            pworld->gop.fence();\n        }\n        \n        /// Application calls this to add a value to the bin for process p\n        void insert(ProcessID p, const T& value) {\n            bins[p].push_back(value);\n\n            // More intelligent buffer management would look at total use and flush\n            // largest buffers rather than using a fixed buffersize per process\n            if (bins[p].size() >= bufsize) flush(p);\n        }\n    };\n}\n\n#endif // MADNESS_WORLD_BINSORTER_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/buffer_archive.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_BUFFER_ARCHIVE_H__INCLUDED\n#define MADNESS_WORLD_BUFFER_ARCHIVE_H__INCLUDED\n\n/**\n \\file buffer_archive.h\n \\brief Implements an archive wrapping a memory buffer.\n \\ingroup serialization\n*/\n\n#include <type_traits>\n#include <madness/world/archive.h>\n#include <madness/world/print.h>\n#include <cstring>\n\nnamespace madness {\n    namespace archive {\n\n        /// \\addtogroup serialization\n        /// @{\n\n        /// Wraps an archive around a memory buffer for output.\n\n        /// \\note Type checking is disabled for efficiency.\n        ///\n        /// \\throw madness::MadnessException in case of buffer overflow.\n        ///\n        /// The default constructor can also be used to count stuff.\n        class BufferOutputArchive : public BaseOutputArchive {\n        private:\n            unsigned char * const ptr; ///< The memory buffer.\n            const std::size_t nbyte; ///< Buffer size.\n            mutable std::size_t i; /// Current output location.\n            bool countonly; ///< If true just count, don't copy.\n\n        public:\n            /// Default constructor; the buffer will only count data.\n            BufferOutputArchive()\n                    : ptr(nullptr), nbyte(0), i(0), countonly(true) {}\n\n            /// Constructor that assigns a buffer.\n\n            /// \\param[in] ptr Pointer to the buffer.\n            /// \\param[in] nbyte Size of the buffer.\n            BufferOutputArchive(void* ptr, std::size_t nbyte)\n                    : ptr((unsigned char *) ptr), nbyte(nbyte), i(0), countonly(false) {}\n\n            /// Stores (counts) data into the memory buffer.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// serializable.\n            /// \\tparam T Type of the data to be stored (counted).\n            /// \\param[in] t Pointer to the data to be stored (counted).\n            /// \\param[in] n Size of data to be stored (counted).\n            template <typename T>\n            inline\n            typename std::enable_if< madness::is_trivially_serializable<T>::value, void >::type\n            store(const T* t, long n) const {\n                std::size_t m = n*sizeof(T);\n                if (countonly) {\n                    i += m;\n                }\n                else if (i+m > nbyte) {\n                    madness::print(\"BufferOutputArchive:ptr,nbyte,i,n,m,i+m:\",(void *)ptr,nbyte,i,n,m,i+m);\n                    MADNESS_ASSERT(i+m<=nbyte);\n                }\n                else {\nMADNESS_PRAGMA_GCC(diagnostic push)\nMADNESS_PRAGMA_GCC(diagnostic ignored \"-Wmaybe-uninitialized\")\n\t\t  memcpy(ptr+i, t, m);\nMADNESS_PRAGMA_GCC(diagnostic pop)\n                    i += m;\n                }\n            }\n\n            /// Open a buffer with a specific size.\n            void open(std::size_t /*hint*/) {}\n\n            /// Close the archive.\n            void close() {}\n\n            /// Flush the archive.\n            void flush() {}\n\n            /// Determine if this buffer is used for counting.\n\n            /// \\return True if this buffer is only used for counting.\n            bool count_only() const { return countonly; }\n\n            /// Return the amount of data stored (counted) in the buffer.\n\n            /// \\return The amount of data stored (counted) in the buffer.\n            inline std::size_t size() const {\n                return i;\n            };\n        };\n\n\n        /// Wraps an archive around a memory buffer for input.\n\n        /// \\note Type checking is disabled for efficiency.\n        ///\n        /// \\throw madness::MadnessException in case of buffer overrun.\n        class BufferInputArchive : public BaseInputArchive {\n        private:\n            const unsigned char* const ptr; ///< The memory buffer.\n            const std::size_t nbyte; ///< Buffer size.\n            mutable std::size_t i; ///< Current input location.\n\n        public:\n            /// Constructor that assigns a buffer.\n\n            /// \\param[in] ptr Pointer to the buffer.\n            /// \\param[in] nbyte Size of the buffer.\n            BufferInputArchive(const void* ptr, std::size_t nbyte)\n                    : ptr((const unsigned char *) ptr), nbyte(nbyte), i(0) {};\n\n            /// Reads data from the memory buffer.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// serializable.\n            /// \\tparam T Type of the data to be read.\n            /// \\param[out] t Where to store the read data.\n            /// \\param[in] n Size of data to be read.\n            template <class T>\n            inline\n            typename std::enable_if< madness::is_trivially_serializable<T>::value, void >::type\n            load(T* t, long n) const {\n                std::size_t m = n*sizeof(T);\n                MADNESS_ASSERT(m+i <=  nbyte);\n                memcpy((unsigned char*) t, ptr+i, m);\n                i += m;\n            }\n\n            /// Open the archive.\n            void open() {};\n\n            /// Reset the read location to the beginning of the buffer.\n            void rewind() const {\n                i=0;\n            };\n\n            /// Get the amount of space yet to be read from the buffer.\n\n            /// \\return The amount of space yet to be read from the buffer.\n            std::size_t nbyte_avail() const {\n                return nbyte-i;\n            };\n\n            /// Close the archive.\n            void close() {}\n        };\n\n        /// Implement pre/postamble storage routines for a \\c BufferOutputArchive.\n\n        /// \\note No type checking over the buffer stream, for efficiency.\n        /// \\tparam T The type to be stored.\n        template <class T>\n        struct ArchivePrePostImpl<BufferOutputArchive, T> {\n            /// Write the preamble to the archive.\n            static inline void preamble_store(const BufferOutputArchive& /*ar*/) {}\n\n            /// Write the postamble to the archive.\n            static inline void postamble_store(const BufferOutputArchive& /*ar*/) {}\n        };\n\n        /// Implement pre/postamble load routines for a \\c BufferInputArchive.\n\n        /// \\note No type checking over \\c Buffer stream, for efficiency.\n        /// \\tparam T The type to be loaded.\n        template <class T>\n        struct ArchivePrePostImpl<BufferInputArchive, T> {\n            /// Load the preamble.\n            static inline void preamble_load(const BufferInputArchive& /*ar*/) {}\n\n            /// Load the postamble.\n            static inline void postamble_load(const BufferInputArchive& /*ar*/) {}\n        };\n\n        /// @}\n    }\n}\n#endif // MADNESS_WORLD_BUFFER_ARCHIVE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/cereal_archive.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_CEREAL_ARCHIVE_H__INCLUDED\n#define MADNESS_WORLD_CEREAL_ARCHIVE_H__INCLUDED\n\nnamespace madness {\ntemplate <typename Archive> struct is_cereal_archive;\n}\n\n#ifdef MADNESS_HAS_CEREAL\n#  if ! __has_include(<cereal/cereal.hpp>)\n#    error \"MADNESS_ENABLE_CEREAL is on, but cereal/cereal.hpp was not found.\"\n#  endif\n\n#include <memory>\n#include <cereal/cereal.hpp>\n#include <cereal/details/traits.hpp>\n#include <madness/world/archive.h>\n\nnamespace madness {\nnamespace archive {\n/// Wraps an output archive around a Cereal archive\ntemplate <typename Muesli>\nclass CerealOutputArchive : public ::madness::archive::BaseOutputArchive {\n  mutable std::shared_ptr<Muesli>\n      muesli; ///< The cereal archive being wrapped, deleter determines whether this is an owning ptr\n\npublic:\n  CerealOutputArchive(Muesli &muesli) : muesli(&muesli, [](Muesli *) {}) {}\n  template <typename Arg, typename... RestOfArgs,\n            typename = std::enable_if_t<\n                !std::is_same<Muesli, std::decay_t<Arg>>::value>>\n  CerealOutputArchive(Arg &&arg, RestOfArgs &&... rest_of_args)\n      : muesli(new Muesli(std::forward<Arg>(arg),\n                          std::forward<RestOfArgs>(rest_of_args)...),\n               std::default_delete<Muesli>{}) {}\n\n  template <class T, class Cereal = Muesli>\n  inline std::enable_if_t<\n      madness::is_trivially_serializable<T>::value &&\n          !cereal::traits::is_text_archive<Cereal>::value,\n      void>\n  store(const T *t, long n) const {\n    const unsigned char *ptr = (unsigned char *)t;\n    (*muesli)(cereal::binary_data(ptr, sizeof(T) * n));\n  }\n\n  template <class T, class Cereal = Muesli>\n  inline std::enable_if_t<\n      !madness::is_trivially_serializable<T>::value ||\n          cereal::traits::is_text_archive<Cereal>::value,void>\n  store(const T *t, long n) const {\n    for (long i = 0; i != n; ++i)\n      (*muesli)(t[i]);\n  }\n\n  void open(std::size_t hint) {}\n  void close(){};\n  void flush(){};\n};\n\n/// Wraps an input archive around a Cereal archive\ntemplate <typename Muesli> class CerealInputArchive : public BaseInputArchive {\n  std::shared_ptr<Muesli> muesli; ///< The cereal archive being wrapped, deleter determines whether this is an owning ptr\n\npublic:\n  CerealInputArchive(Muesli &muesli) : muesli(&muesli, [](Muesli *) {}) {}\n  template <typename Arg, typename... RestOfArgs,\n            typename = std::enable_if_t<\n                !std::is_same<Muesli, std::decay_t<Arg>>::value>>\n  CerealInputArchive(Arg &&arg, RestOfArgs &&... rest_of_args)\n      : muesli(new Muesli(std::forward<Arg>(arg),\n                          std::forward<RestOfArgs>(rest_of_args)...),\n               std::default_delete<Muesli>{}) {}\n\n  template <class T, class Cereal = Muesli>\n  inline std::enable_if_t<\n      madness::is_trivially_serializable<T>::value &&\n          !cereal::traits::is_text_archive<Cereal>::value,\n      void>\n  load(T *t, long n) const {\n    (*muesli)(cereal::binary_data(t, sizeof(T) * n));\n  }\n\n  template <class T, class Cereal = Muesli>\n  inline std::enable_if_t<\n      !madness::is_trivially_serializable<T>::value ||\n          cereal::traits::is_text_archive<Cereal>::value,\n      void>\n  load(T *t, long n) const {\n    for (long i = 0; i != n; ++i)\n      (*muesli)(t[i]);\n  }\n\n  void open(std::size_t hint) {}\n  void rewind() const {}\n  void close(){};\n};\n} // namespace archive\n\ntemplate <typename Muesli>\nstruct is_text_archive<\n    archive::CerealInputArchive<Muesli>,\n    std::enable_if_t<cereal::traits::is_text_archive<Muesli>::value>>\n    : std::true_type {};\ntemplate <typename Muesli>\nstruct is_text_archive<\n    archive::CerealOutputArchive<Muesli>,\n    std::enable_if_t<cereal::traits::is_text_archive<Muesli>::value>>\n    : std::true_type {};\n\ntemplate <typename Muesli, typename T>\nstruct is_default_serializable_helper<\n    archive::CerealOutputArchive<Muesli>, T,\n    std::enable_if_t<(is_trivially_serializable<T>::value &&\n        !cereal::traits::is_text_archive<Muesli>::value) ||\n        (cereal::traits::detail::count_output_serializers<T, Muesli>::value != 0 &&\n         cereal::traits::is_text_archive<Muesli>::value)>>\n    : std::true_type {};\ntemplate <typename Muesli, typename T>\nstruct is_default_serializable_helper<\n    archive::CerealInputArchive<Muesli>, T,\n    std::enable_if_t<\n        (is_trivially_serializable<T>::value &&\n            !cereal::traits::is_text_archive<Muesli>::value) ||\n            (cereal::traits::detail::count_input_serializers<T, Muesli>::value != 0 &&\n             cereal::traits::is_text_archive<Muesli>::value)>>\n    : std::true_type {};\n\ntemplate <typename Muesli>\nstruct is_cereal_archive<archive::CerealOutputArchive<Muesli>> : std::true_type {};\ntemplate <typename Muesli>\nstruct is_cereal_archive<archive::CerealInputArchive<Muesli>> : std::true_type {};\n\n// must also be able to introspect bare cereal archives to be able to reuse serialize methods for both\ntemplate <typename T>\nstruct is_archive<archive::CerealOutputArchive<T>, std::enable_if_t<std::is_base_of_v<cereal::detail::OutputArchiveBase, T>>> : std::true_type {};\ntemplate <typename T>\nstruct is_archive<archive::CerealInputArchive<T>, std::enable_if_t<std::is_base_of_v<cereal::detail::InputArchiveBase, T>>> : std::true_type {};\ntemplate <typename T>\nstruct is_output_archive<archive::CerealOutputArchive<T>, std::enable_if_t<std::is_base_of_v<cereal::detail::OutputArchiveBase, T>>> : std::true_type {};\ntemplate <typename T>\nstruct is_input_archive<archive::CerealInputArchive<T>, std::enable_if_t<std::is_base_of_v<cereal::detail::InputArchiveBase, T>>> : std::true_type {};\ntemplate <typename T>\nstruct is_archive<T, std::enable_if_t<std::is_base_of_v<cereal::detail::OutputArchiveBase, T>>> : std::true_type {};\ntemplate <typename T>\nstruct is_archive<T, std::enable_if_t<std::is_base_of_v<cereal::detail::InputArchiveBase, T>>> : std::true_type {};\ntemplate <typename T>\nstruct is_output_archive<T, std::enable_if_t<std::is_base_of_v<cereal::detail::OutputArchiveBase, T>>> : std::true_type {};\ntemplate <typename T>\nstruct is_input_archive<T, std::enable_if_t<std::is_base_of_v<cereal::detail::InputArchiveBase, T>>> : std::true_type {};\n\n}  // namespace madness\n\n#endif  // MADNESS_HAS_CEREAL\n\nnamespace madness {\ntemplate <typename Archive> struct is_cereal_archive : std::false_type {};\n}\n\n#endif  // MADNESS_WORLD_CEREAL_ARCHIVE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/cloud.h",
    "content": "\n/**\n \\file cloud.h\n \\brief Declares the \\c Cloud class for storing data and transfering them between worlds\n \\ingroup world\n\n*/\n\n/**\n * TODO:  - delete container record upon caching if container is replicated\n */\n\n#ifndef SRC_MADNESS_WORLD_CLOUD_H_\n#define SRC_MADNESS_WORLD_CLOUD_H_\n\n\n#include <madness/world/parallel_dc_archive.h>\n#include<any>\n#include<iomanip>\n\n\n/*!\n  \\file cloud.h\n  \\brief Defines and implements most of madness cloud storage\n\n  TODO: check use of preprocessor directives\n  TODO: clear cache in destructor won't work because no subworld is present -> must be explicitly called, error prone/\n*/\n\nnamespace madness {\n\n    /// \\brief A utility to get the name of a type as a string from chatGPT\n    template<typename T>\n    struct type_name {\n        static const char* value() { return typeid(T).name();}\n    };\n\n    template<>\n    struct type_name<Function<double,1>> { static const char* value() { return \"Function<double,1>\"; } };\n    template<>\n    struct type_name<Function<double,2>> { static const char* value() { return \"Function<double,2>\"; } };\n    template<>\n    struct type_name<Function<double,3>> { static const char* value() { return \"Function<double,3>\"; } };\n    template<>\n    struct type_name<Function<double,4>> { static const char* value() { return \"Function<double,4>\"; } };\n    template<>\n    struct type_name<Function<double,5>> { static const char* value() { return \"Function<double,5>\"; } };\n    template<>\n    struct type_name<Function<double,6>> { static const char* value() { return \"Function<double,6>\"; } };\n\n    template<>\n    struct type_name<std::vector<Function<double,1>>> { static const char* value() { return \"std::vector<Function<double,1>>\"; } };\n    template<>\n    struct type_name<std::vector<Function<double,2>>> { static const char* value() { return \"std::vector<Function<double,2>>\"; } };\n    template<>\n    struct type_name<std::vector<Function<double,3>>> { static const char* value() { return \"std::vector<Function<double,3>>\"; } };\n    template<>\n    struct type_name<std::vector<Function<double,4>>> { static const char* value() { return \"std::vector<Function<double,4>>\"; } };\n    template<>\n    struct type_name<std::vector<Function<double,5>>> { static const char* value() { return \"std::vector<Function<double,5>>\"; } };\n    template<>\n    struct type_name<std::vector<Function<double,6>>> { static const char* value() { return \"std::vector<Function<double,6>>\"; } };\n\ntemplate<typename keyT>\nstruct Recordlist {\n    std::list<keyT> list;\n\n    Recordlist() : list() {};\n\n    explicit Recordlist(const keyT &key) : list{key} {};\n\n    Recordlist(const Recordlist &other) : list(other.list) {};\n\n    Recordlist &operator+=(const Recordlist &list2) {\n        for (auto &l2 : list2.list) list.push_back(l2);\n        return *this;\n    }\n\n    Recordlist &operator+=(const keyT &key) {\n        list.push_back(key);\n        return *this;\n    }\n\n    keyT pop_front_and_return() {\n        keyT key = list.front();\n        list.pop_front();\n        return key;\n    }\n\n    std::size_t size() const {\n        return list.size();\n    }\n\n    // if type provides id() member function (i.e. WorldObject) use that for hashing, otherwise use hash_value() for\n    // fundamental types (see worldhash.h)\n    template <typename T>\n    using member_id_t = decltype(std::declval<T>().id());\n\n    template <typename T>\n    using has_member_id = madness::meta::is_detected<member_id_t, T>;\n\n    // if type provides a hashing function use that, intrusive hashing, see worldhash.h\n    template <typename T>\n    using member_hash_t = decltype(std::declval<T>().hash());\n\n    template <typename T>\n    using has_member_hash = madness::meta::is_detected<member_hash_t, T>;\n\n    template<typename T, std::size_t NDIM>\n    static keyT compute_record(const Function<T,NDIM>& arg) {return hash_value(arg.get_impl()->id());}\n\n    template<typename T, std::size_t NDIM>\n    static keyT compute_record(const FunctionImpl<T,NDIM>* arg) {return hash_value(arg->id());}\n\n    template<typename keyQ, typename valueT>\n    static keyT compute_record(const WorldContainer<keyQ,valueT>& arg) {return hash_value(arg.id());}\n\n    template<typename keyQ, typename valueT>\n    static keyT compute_record(const std::shared_ptr<WorldContainer<keyQ,valueT>>& arg) {return hash_value(arg->id());}\n\n    template<typename T, std::size_t NDIM>\n    static keyT compute_record(const std::shared_ptr<madness::FunctionImpl<T, NDIM>>& arg) {return hash_value(arg->id());}\n\n    template<typename T>\n    static keyT compute_record(const std::vector<T>& arg) {return hash_range(arg.begin(), arg.end());}\n\n    template<typename T>\n    static keyT compute_record(const Tensor<T>& arg) {return hash_value(arg.normf());}\n\n    template<typename T>\n    static keyT compute_record(const std::shared_ptr<T>& arg) {return compute_record(*arg);}\n\n    template<typename T>\n    static keyT compute_record(const T& arg) {\n        if constexpr (has_member_id<T>::value) {\n            return hash_value(arg.id());\n        } else if constexpr (std::is_pointer_v<T> && has_member_id<std::remove_pointer_t<T>>::value) {\n            return hash_value(arg->id());\n        } else {\n            // compute hash_code for fundamental types\n            std::size_t hashtype = typeid(T).hash_code();\n            hash_combine(hashtype,hash_value(arg));\n            return hashtype;\n        }\n    }\n\n\n    friend std::ostream &operator<<(std::ostream &os, const Recordlist &arg) {\n        using namespace madness::operators;\n        os << arg.list;\n        return os;\n    }\n\n};\n\n/// cloud class\n\n/// store and load data to/from the cloud into arbitrary worlds\n///\n/// Distributed data is always bound to a certain world. If it needs to be\n/// present in another world it can be serialized to the cloud and deserialized\n/// from there again. For an example see test_cloud.cc\n///\n/// Data is stored into a distributed container living in the universe.\n/// During storing a (replicated) list of records is returned that can be used to find the data\n/// in the container. If a combined object (a vector, tuple, etc) is stored a list of records\n/// will be generated. When loading the data from the world the record list will be used to\n/// deserialize all stored objects.\n///\n/// Note that there must be a fence after the destruction of subworld containers, as in:\n///\n///  create subworlds\n///  {\n///      dcT(subworld)\n///      do work\n///  }\n///  subworld.gop.fence();\nclass Cloud {\n\n    bool debug = false;       ///< prints debug output\n    bool is_replicated=false;   ///< if contents of the container are replicated\n    bool dofence = true;      ///< fences after load/store\n    bool force_load_from_cache = false;       ///< forces load from cache (mainly for debugging)\n    bool use_cache=true;\n\npublic:\n\n    typedef std::any cached_objT;\n    using keyT = madness::archive::ContainerRecordOutputArchive::keyT;\n    using valueT = std::vector<unsigned char>;\n    typedef std::map<keyT, cached_objT> cacheT;\n    typedef Recordlist<keyT> recordlistT;\n\n    enum StoragePolicy {\n        StoreFunction,          ///< store a madness function in the cloud  -- can have a large memory impact\n                                ///< equivalent to a deep copy\n        StoreFunctionPointer,   ///< store the pointer to the function in the cloud.\n                                ///< Return type still is a Function<T,NDIM> with a pointer to the universe function impl.\n                                ///< equivalent to a shallow copy\n    };\n\n\n    friend std::ostream& operator<<(std::ostream& os, const StoragePolicy& sp) {\n        switch(sp) {\n            case StoreFunction: os << \"Function\"; break;\n            case StoreFunctionPointer: os << \"FunctionPointer\"; break;\n            default: os << \"UnknownStoragePolicy\"; break;\n        }\n        return os;\n    }\n\n    friend std::string to_string(const StoragePolicy sp) {\n        std::ostringstream os;\n        os << sp;\n        return os.str();\n    }\n\nprivate:\n    /// are the functions (WorldObjects) stored in the cloud or only pointers to them\n    StoragePolicy storage_policy = StoreFunctionPointer;\n\n    /// cloud is a container: replication policy for the cloud container: distributed, node-replicated, rank-replicated\n    DistributionType cloud_replication_policy = Distributed;\n\n    mutable madness::WorldContainer<keyT, valueT> container;\n    cacheT cached_objects;\n    recordlistT local_list_of_container_keys;   // a world-local list of keys occupied in container\n\npublic:\n    std::list<WorldObjectBase*> world_object_base_list; // list of world objects stored in the cloud\n\n    template <typename T>\n    using member_cloud_serialize_t = decltype(std::declval<T>().cloud_store(std::declval<World&>(), std::declval<Cloud&>()));\n\n    template <typename T>\n    using has_cloud_serialize = madness::meta::is_detected<member_cloud_serialize_t, T>;\n\npublic:\n\n    /// @param[in]\tuniverse\tthe universe world\n    Cloud(madness::World &universe) : container(universe), reading_time(0l), copy_time(0l), writing_time(0l),\n        cache_reads(0l), cache_stores(0l) {\n    }\n\n    ~Cloud() {\n        if ((not cached_objects.empty()) or (not local_list_of_container_keys.list.empty())) {\n            print(\"\\nCloud::~Cloud(): cached_objects not empty, size=\", cached_objects.size());\n            print(\"You need to call clear_cache(subworld) before destroying the cloud\");\n            print(\"\\n------------------------------\\n\");\n            std::string msg=\"deferred destruction of cloud with non-empty cache\";\n            std::cerr << msg << std::endl;\n        }\n    }\n\n    void set_debug(bool value) {\n        debug = value;\n    }\n\n    void set_fence(bool value) {\n        dofence = value;\n    }\n\n    void set_force_load_from_cache(bool value) {\n        force_load_from_cache = value;\n    }\n\n    /// is the cloud container replicated: per rank, per node, or distributed\n    void set_replication_policy(const DistributionType value) {\n        cloud_replication_policy = value;\n        use_cache=false;\n        if (value == RankReplicated) use_cache=true;\n    }\n\n    /// is the cloud container replicated: per rank, per node, or distributed\n    DistributionType get_replication_policy() const {\n        return cloud_replication_policy;\n    }\n\n    bool validate_replication_policy() const {\n        auto disttype=validate_distribution_type(container);\n        if (disttype!=cloud_replication_policy) {\n            std::cout << \"Cloud::validate_distribution(): distribution type mismatch, container is \" << disttype\n                      << \" but cloud_replication_policy is \" << cloud_replication_policy << std::endl;\n            return false;\n        }\n        return true;\n    }\n\n\n    /// storing policy refers to storing functions or pointers to functions\n    void set_storing_policy(const StoragePolicy value) {\n        storage_policy = value;\n    }\n\n    /// storing policy refers to storing functions or pointers to functions\n    StoragePolicy get_storing_policy() const {\n        return storage_policy;\n    }\n\n    void print_size(World& universe) {\n        nlohmann::json stats=gather_memory_statistics(universe);\n        double byte2gbyte=1.0/(1024*1024*1024);\n        double global_memsize=stats[\"memory_global_GB\"].template get<double>();\n        double max_record_size=stats[\"max_record_size\"].template get<double>();\n        double min_memsize=stats[\"memory_min_GB\"].template get<double>();\n        double max_memsize=stats[\"memory_max_GB\"].template get<double>();\n        double global_size=stats[\"container_size_global\"].template get<double>();\n\n        if (universe.rank()==0) {\n            print(\"Cloud memory:\");\n            print(\"  replicated:\",is_replicated);\n            print(\"size of cloud (total)\");\n            print(\"  number of records:        \",global_size);\n            print(\"  memory in GBytes:         \",global_memsize);\n            print(\"size of cloud (average per node)\");\n            print(\"  number of records:        \",double(global_size)/universe.size());\n            print(\"  memory in GBytes:         \",global_memsize/universe.size());\n            print(\"min/max of node\");\n            print(\"  memory in GBytes:         \",min_memsize,max_memsize);\n            print(\"  max record size in GBytes:\",max_record_size*byte2gbyte);\n\n        }\n    }\n\n    /// return a json object with the cloud settings and statistics\n    nlohmann::json get_statistics(World& world) const {\n        nlohmann::json j;\n        {   // settings\n            j[\"storage_policy\"]=to_string(storage_policy);\n            j[\"cloud_replication_policy\"]=to_string(cloud_replication_policy);\n            j[\"is_replicated\"]=is_replicated;\n            j[\"local_cached_objects_size\"]=cached_objects.size();\n        }\n        // timings\n        j.update(gather_timings(world));\n        j.update(gather_memory_statistics(world));\n        return j;\n\n    }\n\n    /// get size of the cloud container\n    nlohmann::json gather_memory_statistics(World &universe) const {\n\n        std::size_t memsize=0;\n        std::size_t max_record_size=0;\n        for (auto& item : container) {\n            memsize+=item.second.size();\n            max_record_size=std::max(max_record_size,item.second.size());\n        }\n        std::size_t global_memsize=memsize;\n        std::size_t max_memsize=memsize;\n        std::size_t min_memsize=memsize;\n        double rss=madness::get_rss_usage_in_GB();\n        double rss_av=rss;\n        universe.gop.sum(global_memsize);\n        universe.gop.max(max_memsize);\n        universe.gop.max(max_record_size);\n        universe.gop.min(min_memsize);\n        universe.gop.max(rss);\n        universe.gop.sum(rss_av);\n        double byte2gbyte=1.0/(1024*1024*1024);\n\n        // convert type(container item).second to GB, i.e. number of bytes in the container to GB\n        double uchar2gbyte=byte2gbyte*sizeof(unsigned char);\n\n\n        auto local_size=container.size();\n        auto global_size=local_size;\n        universe.gop.sum(global_size);\n        nlohmann::json j;\n        j[\"container_size_global\"] = global_size;\n        j[\"memory_global_GB\"] = global_memsize*uchar2gbyte;\n        j[\"memory_min_GB\"] = min_memsize*uchar2gbyte;\n        j[\"memory_max_GB\"] = max_memsize*uchar2gbyte;\n        j[\"memory_rss_GB_max\"] = rss;\n        j[\"memory_rss_GB_av\"] = rss_av/universe.size();\n        j[\"max_record_size\"] = max_record_size;\n        return j;\n    }\n\n    nlohmann::json gather_timings(World &universe) const {\n        double rtime_max = double(reading_time)*1.e-6;\n        double rtime_acc = double(reading_time)*1.e-6;\n        double rtime_av = double(reading_time)*1.e-6;\n        double ctime_max = double(copy_time)*1.e-6;\n        double ctime_acc = double(copy_time)*1.e-6;\n        double ctime_av = double(copy_time)*1.e-6;\n        double wtime = double(writing_time)*1.e-6;\n        double ptime = double(replication_time)*1.e-6;\n        double tptime = double(target_replication_time)*1.e-6;\n        universe.gop.max(rtime_max);\n        universe.gop.sum(rtime_acc);\n        rtime_av = rtime_acc/universe.size();\n        universe.gop.max(ctime_max);\n        universe.gop.sum(ctime_acc);\n        ctime_av = ctime_acc/universe.size();\n        universe.gop.max(wtime);\n        universe.gop.max(ptime);\n        universe.gop.max(tptime);\n        long creads = long(cache_reads);\n        long cstores = long(cache_stores);\n        universe.gop.sum(creads);\n        universe.gop.sum(cstores);\n        nlohmann::json j;\n        j[\"reading_time_max_s\"] = rtime_max;\n        j[\"reading_time_acc_s\"] = rtime_acc;\n        j[\"reading_time_av_s\"] = rtime_av;\n        j[\"copy_time_max_s\"] = ctime_max;\n        j[\"copy_time_acc_s\"] = ctime_acc;\n        j[\"copy_time_av_s\"] = ctime_av;\n        j[\"writing_time_s\"] = wtime;\n        j[\"replication_time_s\"] = ptime;\n        j[\"target_replication_time_s\"] = tptime;\n        j[\"cache_reads\"] = creads;\n        j[\"cache_stores\"] = cstores;\n        return j;\n    }\n\n    /// backwards compatibility\n    void print_timings(World& universe) const {\n        print_timings(gather_timings(universe));\n    }\n\n    static void print_timings(const nlohmann::json timings) {\n        double rtime_max=timings[\"reading_time_max_s\"].template get<double>();\n        double rtime_av=timings[\"reading_time_av_s\"].template get<double>();\n        double rtime_acc=timings[\"reading_time_acc_s\"].template get<double>();\n        // double ctime_max=timings[\"copy_time_max_s\"].template get<double>();\n        // double ctime_av=timings[\"copy_time_av_s\"].template get<double>();\n        // double ctime_acc=timings[\"copy_time_acc_s\"].template get<double>();\n        double wtime=timings[\"writing_time_s\"].template get<double>();\n        double ptime=timings[\"replication_time_s\"].template get<double>();\n        double tptime=timings[\"target_replication_time_s\"].template get<double>();\n        long creads=timings[\"cache_reads\"].template get<long>();\n        long cstores=timings[\"cache_stores\"].template get<long>();\n\n        auto precision = std::cout.precision();\n        std::cout << std::fixed << std::setprecision(1);\n        print(\"cloud storing wall time                        \", wtime);\n        print(\"cloud replication wall time                    \", ptime);\n        print(\"target replication wall time                   \", tptime);\n        print(\"cloud max reading time (all procs)             \", rtime_max, std::defaultfloat);\n        print(\"cloud average reading cpu time (all procs)     \", rtime_av, std::defaultfloat);\n        print(\"cloud accumulated reading cpu time (all procs) \", rtime_acc, std::defaultfloat);\n        std::cout << std::setprecision(precision) << std::scientific;\n        print(\"cloud cache stores                             \", long(cstores));\n        print(\"cloud cache loads                              \", long(creads));\n    }\n\n    static void print_memory_statistics(const nlohmann::json stats) {\n        double byte2gbyte=1.0/(1024*1024*1024);\n        double global_memsize=stats[\"memory_global_GB\"].template get<double>();\n        double max_record_size=stats[\"max_record_size\"].template get<double>();\n        double min_memsize=stats[\"memory_min_GB\"].template get<double>();\n        double max_memsize=stats[\"memory_max_GB\"].template get<double>();\n        double global_size=stats[\"container_size_global\"].template get<double>();\n\n        print(\"Cloud memory:\");\n        print(\"  size of cloud (total)\");\n        print(\"    number of records:        \",global_size);\n        print(\"    memory in GBytes:         \",global_memsize);\n        // print(\"  size of cloud (average per node)\");\n        // print(\"    number of records:        \",double(global_size)/madness::world().size());\n        // print(\"    memory in GBytes:         \",global_memsize*byte2gbyte/madness::world().size());\n        print(\"  min/max of node\");\n        print(\"    memory in GBytes:         \",min_memsize,max_memsize);\n        print(\"    max record size in GBytes:\",max_record_size*byte2gbyte);\n    }\n\n    void clear_cache(World &subworld) {\n        cached_objects.clear();\n        local_list_of_container_keys.list.clear();\n        subworld.gop.fence();\n    }\n\n    void clear() {\n        container.clear();\n    }\n\n    void clear_timings() {\n        reading_time=0l;\n        copy_time=0l;\n        writing_time=0l;\n        writing_time1=0l;\n        replication_time=0l;\n        target_replication_time=0l;\n        cache_stores=0l;\n        cache_reads=0l;\n    }\n\n    /// functor to distribute/rank/node-replicate a function, passed in as a pointer to WorldObjectBase\n    template<typename T, std::size_t NDIM>\n    struct DistributeFunctor {\n        DistributionType dt= Distributed;\n        explicit DistributeFunctor(const DistributionType dt) : dt(dt) {}\n        int operator()(WorldObjectBase* wo) const {\n            // figure out if wo is a FunctionImpl and do the distribution\n            if (auto fimpl=dynamic_cast<FunctionImpl<T, NDIM>*>(wo)) {\n                // fimpl->get_pmap()->print_data_sizes(world,\"before distribution of function in cloud\");\n                if (dt==RankReplicated) {\n                    fimpl->replicate(false);\n                } else if (dt==NodeReplicated) {\n                    // print(\"replicating function per node\",fimpl);;\n                    fimpl->replicate_on_hosts(true);\n                } else if (dt==Distributed) {\n                    fimpl->undo_replicate(false);\n                } else {\n                    MADNESS_EXCEPTION(\"unknown distribution type\",1);\n                }\n                // fimpl->get_pmap()->print_data_sizes(world,\"after distribution of function in cloud\");\n            }\n            return 0;\n        }\n    };\n\n    /// distribute/node/rank replicate the targets of all world objects stored in the cloud\n    void distribute_targets(const DistributionType dt= Distributed) {\n        if (world_object_base_list.empty()) return;\n        World& world=world_object_base_list.front()->get_world();\n\n        for (auto wo : world_object_base_list) {\n            loop_types<DistributeFunctor, double, float, double_complex, float_complex>(std::tuple<DistributionType>(dt),wo);\n            // world.gop.fence();\n        }\n        world.gop.fence();\n\n    }\n\n    /// @param[in]  world the subworld the objects are loaded to\n    /// @param[in]  recordlist the list of records where the objects are stored\n\n    /// load a single object from the cloud, recordlist is kept unchanged\n    template<typename T>\n    T load(madness::World &world, const recordlistT recordlist) const {\n        recordlistT rlist = recordlist;\n        cloudtimer t(world, reading_time);\n\n        // forward_load will consume the recordlist while loading elements\n        return forward_load<T>(world, rlist);\n    }\n\n    /// similar to load, but will consume the recordlist\n\n    /// @param[in]  world the subworld the objects are loaded to\n    /// @param[in]  recordlist the list of records where the objects are stored\n    template<typename T>\n    T consuming_load(madness::World &world, recordlistT& recordlist) const {\n        cloudtimer t(world, reading_time);\n\n        // forward_load will consume the recordlist while loading elements\n        return forward_load<T>(world, recordlist);\n    }\n\n    /// load a single object from the cloud, recordlist is consumed while loading elements\n    template<typename T>\n    T forward_load(madness::World &world, recordlistT& recordlist) const {\n        // different objects are stored in different ways\n        // - tuples are split up into their components\n        // - classes with their own cloud serialization are stored using that\n        // - everything else is stored using their usual serialization\n        if constexpr (is_tuple<T>::value) {\n            return load_tuple<T>(world, recordlist);\n        } else if constexpr (has_cloud_serialize<T>::value) {\n            T target = allocator<T>(world);\n            target.cloud_load(world, *this, recordlist);\n            return target;\n        } else {\n            return do_load<T>(world, recordlist);\n        }\n    }\n\n    /// @param[in]  world presumably the universe\n    template<typename T>\n    recordlistT store(madness::World &world, const T &source) {\n        if (is_replicated) {\n            print(\"Cloud contents are replicated and read-only!\");\n            MADNESS_EXCEPTION(\"cloud error\",1);\n        }\n        cloudtimer t(world,writing_time);\n\n        // different objects are stored in different ways\n        // - tuples are split up into their components\n        // - classes with their own cloud serialization are stored using that\n        // - everything else is stored using their usual serialization\n        recordlistT recordlist;\n        if constexpr (is_tuple<T>::value) {\n            recordlist+=store_tuple(world,source);\n        } else if constexpr (has_cloud_serialize<T>::value) {\n            recordlist+=source.cloud_store(world,*this);\n        } else {\n            recordlist+=store_other(world,source);\n        }\n        if (dofence) world.gop.fence();\n        return recordlist;\n    }\n\n    void replicate_according_to_policy(const std::size_t chunk_size=INT_MAX) {\n        if (cloud_replication_policy == Distributed) {\n            // if (debug and (container.size() > 0)) print(\"no replication of container\");\n            return;\n        }\n        else if (cloud_replication_policy == RankReplicated) {\n            replicate(chunk_size);\n        }\n        else if (cloud_replication_policy == NodeReplicated) {\n            replicate_per_node(chunk_size);\n        }\n        else {\n            MADNESS_EXCEPTION(\"unknown replication policy\",1);\n        }\n        container.get_world().gop.fence();\n    }\n\n    void replicate_per_node(const std::size_t chunk_size=INT_MAX) {\n        // this will fail if the container values are larger that 2GB\n        // need to reimplement that at some point\n        try {\n            double cpu0=cpu_time();\n            World& world=container.get_world();\n            world.gop.fence();\n            cloudtimer t(world,replication_time);\n            MADNESS_CHECK_THROW(not is_replicated,\"cloud::replicate_per_node: container is already replicated\");\n            container.replicate_on_hosts(true);\n            is_replicated=true;\n            world.gop.fence();\n            double cpu1=cpu_time();\n            if (debug and (world.rank()==0)) print(\"replication_per_node ended after \",cpu1-cpu0,\" seconds\");\n        } catch (...) {\n            MADNESS_EXCEPTION(\"cloud replication_per_node failed, presumably because some data is larger than 2GB\",1);\n        }\n    }\n\n    // replicates the contents of the container\n    void replicate(const std::size_t chunk_size=INT_MAX) {\n        MADNESS_CHECK_THROW(not is_replicated,\"cloud::replicate_per_node: container is already replicated\");\n\n        double cpu0=cpu_time();\n        World& world=container.get_world();\n        world.gop.fence();\n        cloudtimer t(world,replication_time);\n        container.reset_pmap_to_local();\n        is_replicated=true;\n\n        std::list<keyT> keylist;\n        for (auto it=container.begin(); it!=container.end(); ++it) {\n            keylist.push_back(it->first);\n        }\n\n        for (ProcessID rank=0; rank<world.size(); rank++) {\n            if (rank == world.rank()) {\n                std::size_t keylistsize = keylist.size();\n                world.mpi.Bcast(&keylistsize,sizeof(keylistsize),MPI_BYTE,rank);\n\n                for (auto key : keylist) {\n                    madness::WorldContainer<keyT, std::vector<unsigned char> >::const_accessor acc;\n                    bool found=container.find(acc,key);\n                    MADNESS_CHECK(found);\n                    auto data = acc->second;\n                    std::size_t sz=data.size();\n\n                    world.mpi.Bcast(&key,sizeof(key),MPI_BYTE,rank);\n                    world.mpi.Bcast(&sz,sizeof(sz),MPI_BYTE,rank);\n\n                    // if data is too large for MPI_INT break it into pieces to avoid integer overflow\n                    for (std::size_t start=0; start<sz; start+=chunk_size) {\n                        std::size_t remainder = std::min(sz - start, chunk_size);\n                        world.mpi.Bcast(&data[start], remainder, MPI_BYTE, rank);\n                    }\n\n                }\n            }\n            else {\n                std::size_t keylistsize = 0;\n                world.mpi.Bcast(&keylistsize,sizeof(keylistsize),MPI_BYTE,rank);\n                for (size_t i=0; i<keylistsize; i++) {\n                    keyT key;\n                    world.mpi.Bcast(&key,sizeof(key),MPI_BYTE,rank);\n                    std::size_t sz = 0;\n                    world.mpi.Bcast(&sz,sizeof(sz),MPI_BYTE,rank);\n                    valueT data(sz);\n//                    world.mpi.Bcast(&data[0],sz,MPI_BYTE,rank);\n                    for (std::size_t start=0; start<sz; start+=chunk_size) {\n                        std::size_t remainder=std::min(sz-start,chunk_size);\n                        world.mpi.Bcast(&data[start],remainder,MPI_BYTE,rank);\n                    }\n\n                    container.replace(key,data);\n                }\n            }\n        }\n        world.gop.fence();\n        double cpu1=cpu_time();\n        if (debug and (world.rank()==0)) print(\"replication ended after \",cpu1-cpu0,\" seconds\");\n    }\n\nprivate:\n\n    mutable std::atomic<long> reading_time=0l;     // in microseconds\npublic:\n    mutable std::atomic<long> copy_time=0l;        // if pointers are stored in cloud, time to copy from universe to subworld\n    mutable std::atomic<long> target_replication_time=0l;     // if pointers are stored in cloud, time to replicate targets\nprivate:\n    mutable std::atomic<long> writing_time=0l;     // in microseconds\n    mutable std::atomic<long> writing_time1=0l;    // in microseconds\n    mutable std::atomic<long> replication_time=0l;    // in microseconds\n    mutable std::atomic<long> cache_reads=0l;\n    mutable std::atomic<long> cache_stores=0l;\n\n    template<typename> struct is_tuple : std::false_type { };\n    template<typename ...T> struct is_tuple<std::tuple<T...>> : std::true_type { };\n\n    template<typename Q> struct is_vector : std::false_type { };\n    template<typename Q> struct is_vector<std::vector<Q>> : std::true_type { };\n\n    template<typename T> using is_parallel_serializable_object = std::is_base_of<archive::ParallelSerializableObject,T>;\n\n    template<typename T> using is_world_constructible = std::is_constructible<T, World &>;\n\npublic:\n    struct cloudtimer {\n        World& world;\n        double wall0;\n        std::atomic<long> &rtime;\n\n        cloudtimer(World& world, std::atomic<long> &readtime) : world(world), wall0(wall_time()), rtime(readtime) {}\n\n        ~cloudtimer() {\n            long deltatime=long((wall_time() - wall0) * 1000000l);\n            rtime += deltatime;\n        }\n    };\nprivate:\n\n    template<typename T>\n    void cache(madness::World &world, const T &obj, const keyT &record) const {\n        const_cast<cacheT &>(cached_objects).insert({record,std::make_any<T>(obj)});\n    }\n\n    /// load an object from the cache, record is unchanged\n    template<typename T>\n    T load_from_cache(madness::World &world, const keyT &record) const {\n        if (world.rank()==0) cache_reads++;\n        if (debug) print(\"loading\", type_name<T>::value(), \"from cache record\", record, \"to world\", world.id());\n        if (auto obj = std::any_cast<T>(&cached_objects.find(record)->second)) return *obj;\n        MADNESS_EXCEPTION(\"failed to load from cloud-cache\", 1);\n        T target = allocator<T>(world);\n        return target;\n    }\n\n    bool is_cached(const keyT &key) const {\n        return (cached_objects.count(key) == 1);\n    }\n\n    /// checks if a (universe) container record is used\n\n    /// currently implemented with a local copy of the recordlist, might be\n    /// reimplemented with container.find(), which would include blocking communication.\n    bool is_in_container(const keyT &key) const {\n        auto it = std::find(local_list_of_container_keys.list.begin(),\n                            local_list_of_container_keys.list.end(), key);\n        return it!=local_list_of_container_keys.list.end();\n    }\n\n    template<typename T>\n    T allocator(World &world) const {\n        if constexpr (is_world_constructible<T>::value) {\n            return T(world);\n        } else {\n            return T();\n        }\n    }\n\n    template<typename T>\n    recordlistT store_other(madness::World &world, const T &source) {\n        auto record = Recordlist<keyT>::compute_record(source);\n        bool is_already_present= is_in_container(record);\n        if (debug and world.rank()==0) {\n            if (is_already_present) std::cout << \"skipping \";\n            if constexpr (Recordlist<keyT>::has_member_id<T>::value) {\n                std::cout << \"storing world object of \" << type_name<T>::value() << \"id \" << source.id()\n                << \" to record \" << record << std::endl;\n            }\n            std::cout << \"storing object of \" << type_name<T>::value() << \" to record \" << record << std::endl;\n        }\n        if constexpr (is_madness_function<T>::value) {\n            if (source.is_compressed() and T::dimT>3) print(\"WARNING: storing compressed hi-dim `function\");\n        }\n\n        // scope is important because of destruction ordering of world objects and fence\n        if (is_already_present) {\n            if (world.rank()==0) cache_stores++;\n        } else {\n            cloudtimer t(world,writing_time1);\n            madness::archive::ContainerRecordOutputArchive ar(world, container, record);\n            madness::archive::ParallelOutputArchive<madness::archive::ContainerRecordOutputArchive> par(world, ar);\n            if (storage_policy==StoreFunctionPointer) {\n                if constexpr (is_madness_function<T>::value) {\n                    // store the pointer to the function, not the function itself\n                    par & source.get_impl();\n                    // store the pointer to the WorldObject in a list for later reference (replication/redistribution)\n                    WorldObjectBase* wobj=source.get_impl().get();\n                    world_object_base_list.push_back(wobj);\n                } else {\n                    // store everything else\n                    par & source;\n                }\n            } else {\n                // store everything else\n                par & source;\n            }\n            local_list_of_container_keys+=record;\n        }\n        if (dofence) world.gop.fence();\n        return recordlistT{record};\n    }\n\npublic:\n    /// load a vector from the cloud, pop records from recordlist\n    ///\n    /// @param[inout]    world\tdestination world\n    /// @param[inout]    recordlist\tlist of records to load from (reduced by the first few elements)\n    template<typename T>\n    typename std::enable_if<is_vector<T>::value, T>::type\n    do_load(World &world, recordlistT &recordlist) const {\n        std::size_t sz = do_load<std::size_t>(world, recordlist);\n        T target(sz);\n        for (std::size_t i = 0; i < sz; ++i) {\n            target[i] = do_load<typename T::value_type>(world, recordlist);\n        }\n        return target;\n    }\n\n    /// load a single object from the cloud, pop record from recordlist\n    ///\n    /// @param[inout]    world\tdestination world\n    /// @param[inout]    recordlist\tlist of records to load from (reduced by the first element)\n    template<typename T>\n    typename std::enable_if<!is_vector<T>::value, T>::type\n    do_load(World &world, recordlistT &recordlist) const {\n        keyT record = recordlist.pop_front_and_return();\n        if (force_load_from_cache) MADNESS_CHECK(is_cached(record));\n\n        if (is_cached(record)) return load_from_cache<T>(world, record);\n        if (debug) print(\"loading\", type_name<T>::value(), \"from container record\", record, \"to world\", world.id());\n        T target = allocator<T>(world);\n        madness::archive::ContainerRecordInputArchive ar(world, container, record);\n        madness::archive::ParallelInputArchive<madness::archive::ContainerRecordInputArchive> par(world, ar);\n        if constexpr (is_madness_function<T>::value) {\n            if (storage_policy==StoreFunctionPointer) {\n                // load the pointer to the function, not the function itself\n                // this is important for large functions, as they are not replicated\n                // and only copied to subworlds when needed\n                try {\n                    typedef madness::FunctionImpl<typename T::typeT, T::dimT> implT;\n                    std::shared_ptr<implT> impl;\n                    par & impl;\n                    target.set_impl(impl); // target now points to a universe function impl\n                } catch (...) {\n                    {\n                        io_redirect_cout redirect;\n                        print(\"failed to load function pointer from cloud, maybe the target is out of scope?\");\n                        print(\"record:\", record, \"world:\", world.id());\n                        print(\"function type:\", type_name<T>::value());\n                        print(\"\\n\");\n                    }\n                    MADNESS_EXCEPTION(\"load/store error of pointers in cloud\", 1);\n                }\n            } else {\n                // load everything else\n                par & target;\n            }\n        } else {\n            // load everything else\n            par & target;\n        }\n\n        if (use_cache) {\n            cache(world, target, record);\n            if (is_replicated) container.erase(record);\n        }\n\n        return target;\n    }\n\npublic:\n\n    // overloaded\n    template<typename T>\n    recordlistT store_other(madness::World& world, const std::vector<T>& source) {\n        if (debug and world.rank()==0)\n            std::cout << \"storing vector of \" << type_name<T>::value() << \" of size \" << source.size() << std::endl;\n        recordlistT l = store_other(world, source.size());\n        for (const auto& s : source) l += store_other(world, s);\n        if (dofence) world.gop.fence();\n        if (debug and world.rank()==0) std::cout << \"done with vector storing; container size \"\n                << container.size() << std::endl;\n        return l;\n    }\n\n    /// store a tuple in multiple records\n    template<typename... Ts>\n    recordlistT store_tuple(World &world, const std::tuple<Ts...> &input) {\n        recordlistT v;\n        auto storeaway = [&](const auto &arg) {\n            v += this->store(world, arg);\n        };\n        auto l = [&](Ts const &... arg) {\n            ((storeaway(arg)), ...);\n        };\n        std::apply(l, input);\n        return v;\n    }\n\n    /// load a tuple from the cloud, pop records from recordlist\n    ///\n    /// @param[inout]    world\tdestination world\n    /// @param[inout]    recordlist\tlist of records to load from (reduced by the first few elements)\n    template<typename T>\n    T load_tuple(madness::World &world, recordlistT &recordlist) const {\n        if (debug) std::cout << \"loading tuple of type \" << typeid(T).name() << \" to world \" << world.id() << std::endl;\n        T target;\n        std::apply([&](auto &&... args) {\n            ((args = forward_load<typename std::remove_reference<decltype(args)>::type>(world, recordlist)), ...);\n        }, target);\n        return target;\n    }\n};\n\n} /* namespace madness */\n\n#endif /* SRC_MADNESS_WORLD_CLOUD_H_ */\n"
  },
  {
    "path": "src/madness/world/debug.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n#include <madness/madness_config.h>\n#include <madness/world/safempi.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <iostream>\n\nusing namespace std;\nnamespace madness {\n\n    extern \"C\" void xterm_debug_breakpoint() {\n        std::cout << \"xterm_debug_breakpoint\" << std::endl;\n    }\n\n#if defined(HAVE_XTERM) && defined(HAVE_FORK) && (defined(HAVE_GDB) || defined(HAVE_LLDB)) && defined(HAVE_SLEEP)\n    void xterm_debug(const char* path, const char* display) {\n        int rank = SafeMPI::COMM_WORLD.Get_rank();\n        pid_t child;\n        const char *argv[20];\n        const char xterm[] = XTERM_EXECUTABLE;\n        const std::size_t bufsize = 255;\n        char title[bufsize], pid[bufsize], geometry[bufsize];\n        title[0] = '\\0'; pid[0] = '\\0'; geometry[0] = '\\0';\n        int ix=(rank/3)%3;\n        int iy=rank%3;\n        snprintf(title,bufsize,title, \"Debugging process %d \", rank);\n        snprintf(pid,bufsize, \"%d\", getpid());\n        snprintf(geometry,bufsize,\"%dx%d+%d+%d\",80,24,ix*500,iy*280);\n\n        if (path == 0) path = \"test1\";\n        if (display == 0) display = getenv(\"DISPLAY\");\n        if (display == 0) return ;\n\n        int nargs = 0;\n        argv[0] = xterm;\n        argv[1] = \"-T\";\n        argv[2] = title;\n        argv[3] = \"-display\";\n        argv[4] = display;\n        argv[5] = \"-fn\";\n        argv[6] = \"6x10\";\n        argv[7] = \"-geometry\";\n        argv[8] = geometry;\n        argv[9] = \"-e\";\n#if defined(HAVE_GDB)\n        argv[10] = GDB_EXECUTABLE;\n        argv[11] = \"-q\";\n        argv[12] = path;\n        argv[13] = pid;\n        nargs = 14;\n#elif defined(HAVE_LLDB)\n        argv[10] = LLDB_EXECUTABLE;\n        argv[11] = \"-p\";\n        argv[12] = pid;\n        nargs = 13;\n#endif\n        argv[nargs] = 0;\n        if (rank == 0) {\n            int i;\n            printf(\"\\n Starting xterms with debugger using command\\n\\n    \");\n            for (i = 0; argv[i]; ++i) printf(\"%s \", argv[i]);\n            printf(\"\\n\\n\");\n            fflush(stdout);\n        }\n\n        child = fork();\n\n        if (child < 0) {\n            printf(\"debug: fork failed?\\n\\n\");\n        }\n        else if (child > 0) {\n            sleep(20);\t\t\t/* Release cpu while debugger starts*/\n            xterm_debug_breakpoint();\n        }\n        else {\n            execv(xterm, (char*const*) argv);\n            perror(\"\");\n            printf(\"util_debug: execv of xterm with debugger failed\\n\\n\");\n        }\n    }\n\n#else\n    void xterm_debug(const char* path, const char* display) {}\n#endif\n}\n\n"
  },
  {
    "path": "src/madness/world/deferred_cleanup.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/deferred_cleanup.h>\n#include <madness/world/MADworld.h>\n\nnamespace madness {\n    namespace detail {\n\n        void DeferredCleanup::destroy(bool mode) {\n            mutex_.lock();\n            destroy_ = mode;\n            mutex_.unlock();\n        }\n\n        bool DeferredCleanup::destroy() const {\n            mutex_.lock();\n            bool mode = destroy_;\n            mutex_.unlock();\n            return mode;\n        }\n\n        void DeferredCleanup::add(const void_ptr& obj) {\n            ScopedMutex<RecursiveMutex> lock(mutex_);\n            // if we do not store obj, it will be destroyed when the calling\n            // function (DeferredDeleter::operator()) exits.\n            if(! destroy_)\n                deferred_.push_back(obj);\n        }\n\n        void DeferredCleanup::do_cleanup() {\n            std::list<void_ptr> cleaner;\n\n            do {\n                cleaner.clear(); // Cleanup memory\n                mutex_.lock();\n                cleaner.swap(deferred_);\n                mutex_.unlock();\n            } while(! cleaner.empty());\n        }\n\n\n        std::shared_ptr<DeferredCleanup> DeferredCleanup::get_deferred_cleanup(const World& w) {\n            return w.gop.deferred_;\n        }\n\n    }  // namespace detail\n}  // namespace madness\n"
  },
  {
    "path": "src/madness/world/deferred_cleanup.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n#ifndef MADNESS_WORLD_DEFERRED_CLEANUP_H__INCLUDED\n#define MADNESS_WORLD_DEFERRED_CLEANUP_H__INCLUDED\n\n#include <madness/world/worldmutex.h>  // For Mutex\n#include <list>\n#include <memory>\n\nnamespace madness {\n\n    // Forward declarations\n    template <typename, typename>\n    class DeferredDeleter;\n    class World;\n\n    namespace detail {\n\n        template <typename objT>\n        inline void deferred_cleanup(World& world, const std::shared_ptr<objT>& p, bool assume_p_is_unique = false);\n\n        /// Deferred cleanup of shared_ptr's\n\n        /// Holds dynamically allocated pointers until it is ready for cleanup.\n        /// \\note This object is considered an implementation detail and should\n        /// not be used directly, instead use \\c DeferredDeleter with a\n        /// \\c std::shared_ptr.\n        class DeferredCleanup {\n        public:\n            typedef std::shared_ptr<void> void_ptr; ///< input pointer type\n\n        private:\n            typedef std::list<void_ptr> void_ptr_list;\n\n            RecursiveMutex mutex_;      ///< Worldwide mutex\n            void_ptr_list deferred_;    ///< List of pointers to cleanup\n            bool destroy_;              ///< Object destroy mode\n                                        ///< true = destroy immediate\n                                        ///< false = destroy deferred (default)\n\n            // not allowed\n            DeferredCleanup(const DeferredCleanup&);\n            DeferredCleanup& operator=(const DeferredCleanup&);\n\n            template <typename objT>\n            friend void deferred_cleanup(World&, const std::shared_ptr<objT>&, bool);\n\n            /// Access deferred cleanup object of world\n\n            /// \\param w The \\c World object that holds the \\c DeferredCleanup object\n            /// \\return A shared pointer to the deferred cleanup object of world \\c w.\n            static std::shared_ptr<DeferredCleanup> get_deferred_cleanup(const World& w);\n\n        public:\n            /// Construct a deferred deleter object.\n            DeferredCleanup() : mutex_(), deferred_(), destroy_(false) { }\n\n            /// Set the destruction mode\n\n            /// \\param mode true for immediate destruction, false for deferred\n            /// destruction.\n            void destroy(bool mode);\n\n            /// Get the current destruction mode mode\n\n            /// \\return true for immediate destruction and false for deferred\n            /// destruction.\n            bool destroy() const;\n\n            /// Adds \\c item to cleanup list\n\n            /// If destroy mode is true then the pointer is destroyed immediately.\n            /// Otherwise it is stored until \\c do_cleanup() is called.\n            /// \\param obj Object that is ready for destruction\n            void add(const void_ptr& obj);\n\n            /// Adds \\c item to cleanup list\n\n            /// If destroy mode is true then the pointer is destroyed immediately.\n            /// Otherwise it is stored until \\c do_cleanup() is called.\n            /// \\tparam objT The object pointer type\n            /// \\param obj Object that is ready for destruction\n            template <typename objT>\n            void add(const std::shared_ptr<objT>& obj) {\n                add(std::static_pointer_cast<void>(obj));\n            }\n\n\n\n            /// Deletes/frees any pointers that are in the list\n            void do_cleanup();\n        }; // class DeferredCleanup\n\n\n        /// Defer the cleanup of a shared pointer to the end of the next fence\n\n        /// Call this function before destroying a shared pointer. If the shared\n        /// pointer is the last reference to the object,\n        /// or \\p assume_p_is_unique is true,\n        /// it is placed in the deferred deletion list.\n        /// Otherwise, nothing is done with the pointer.\n        template <typename objT>\n        inline void deferred_cleanup(World& world, const std::shared_ptr<objT>& p,\n                                     bool assume_p_is_unique) {\n            const auto p_is_unique = p.use_count() == 1;\n            if(p_is_unique || assume_p_is_unique) {\n                // This is the last local pointer so we will place it in the\n                // deferred deleter list for later cleanup.\n                DeferredCleanup::get_deferred_cleanup(world)->add(p);\n            }\n        }\n\n    }  // namespace detail\n}  // namespace madness\n\n#endif // MADNESS_WORLD_DEFERRED_CLEANUP_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/dependency_interface.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file dependency_interface.h\n \\brief Defines \\c DependencyInterface and \\c CallbackInterface.\n \\ingroup world\n*/\n\n#ifndef MADNESS_WORLD_DEPENDENCY_INTERFACE_H__INCLUDED\n#define MADNESS_WORLD_DEPENDENCY_INTERFACE_H__INCLUDED\n\n#include <atomic>\n#include <cassert>\n#include <typeinfo>\n\n#include <madness/world/stack.h>\n#include <madness/world/worldmutex.h>\n#include <madness/world/atomicint.h>\n#include <madness/world/world.h>\n#include <madness/world/print.h>\n\n#include <cassert>\n#include <iterator>\n#include <numeric>\n#include <mutex>\n#include <typeinfo>\n#include <unordered_map>\n\nnamespace madness {\n\n    /// The class used for callbacks (e.g., dependency tracking).\n    class CallbackInterface {\n    public:\n        /// Invoked by the callback to notify when a dependency is satisfied.\n        virtual void notify() = 0;\n\n        /// Same as notify(), but tracks how many times called from each \\c caller\n        virtual void notify_debug(const char* caller) {\n          notify_debug_impl(caller);\n          this->notify();\n        }\n\n//        virtual ~CallbackInterface() = default;\n        virtual ~CallbackInterface() {}\n\n    protected:\n      virtual void notify_debug_impl(const char* caller) {\n#ifdef MADNESS_TASK_DEBUG_TRACE\n        {\n          mx_.lock();\n          const auto caller_str = caller;\n          auto it = callers_.find(caller_str);\n          if (it != callers_.end())\n            it->second += 1;\n          else\n            callers_[caller] = 1;\n          mx_.unlock();\n        }\n#endif\n      }\n\n    private:\n#ifdef MADNESS_TASK_DEBUG_TRACE\n        std::unordered_map<std::string,int> callers_;\n        std::mutex mx_;\n#endif\n    };\n\n\n    /// Provides an interface for tracking dependencies.\n    class DependencyInterface : public CallbackInterface, private Spinlock {\n    private:\n        // Dependency counter is still atomic to allow fast(er) probing from outside critical sections\n        // note that all *updates* to this counter will occur from critical sections\n        // thus this is for lock-free probing only\n        std::atomic<int> ndepend; ///< Counts dependencies. For a valid object \\c ndepend >= 0, after the final callback is executed ndepend is set to a negative value and the object becomes invalid.\n\n        static const int MAXCALLBACKS = 8; ///< Maximum number of callbacks.\n        using callbackT = Stack<CallbackInterface*,MAXCALLBACKS>; ///< \\todo Brief description needed.\n        mutable volatile callbackT callbacks; ///< Called ONCE by \\c dec() when `ndepend==0`.\n\n        mutable volatile CallbackInterface* final_callback;  ///< The \"final\" callback can destroy the task, always invoked last, the object is in an invalid state (ndepend set to -1) after its execution\n#ifdef MADNESS_TASK_DEBUG_TRACE\n        volatile int max_ndepend; ///< max value of \\c ndepend\n        constexpr static const bool print_debug = false;  // change to true to log state changes in {inc,dec,notify}_debug, (debug) ctor, and dtor\n#endif\n\n        /// \\todo Brief description needed.\n\n        /// Main design point is that, because a callback might destroy this\n        /// object, when callbacks are invoked we cannot be holding the lock\n        /// and all necessary data must be on the stack (i.e., not from the\n        /// object state).\n        /// \\todo Parameter description needed.\n        /// \\param[in,out] cb Description needed.\n        void do_callbacks(callbackT& cb) const {\n            while (!cb.empty()) {\n                cb.top()->notify();\n                cb.pop();\n            }\n        }\n\n    public:\n        /// \\todo Constructor that...\n\n        /// \\param[in] ndep The number of unsatisfied dependencies.\n        DependencyInterface(int ndep = 0) : ndepend(ndep), final_callback(nullptr) {\n          MADNESS_ASSERT(ndepend >= 0);\n        }\n\n        /// Same as ctor above, but keeps track of \\c caller . If a given object was constructed\n        /// via this ctor, or DependencyInterface::inc_debug() had been called once, debugging variants\n        /// of mutating calls ( \\c {inc/dec/notify}_debug ) must be used for the rest of this object's lifetime.\n        /// \\param[in] ndep The number of unsatisfied dependencies.\n        DependencyInterface(int ndep, const char* caller) : ndepend(ndep), final_callback(nullptr)\n#ifdef MADNESS_TASK_DEBUG_TRACE\n            , max_ndepend(ndep)\n#endif\n        {\n          MADNESS_ASSERT(ndepend >= 0);\n#ifdef MADNESS_TASK_DEBUG_TRACE\n          callers_[caller] = ndep;\n          if (print_debug)\n            print(\"DependencyInterface debug ctor: this=\", this, \" caller=\", caller, \" ndepend=\", ndepend);\n#endif\n        }\n\n        /// Returns the number of unsatisfied dependencies.\n\n        /// \\return The number of unsatisfied dependencies.\n        int ndep() const {\n          MADNESS_ASSERT(ndepend >= 0);  // ensure we are valid\n          return ndepend;\n        }\n\n#ifdef MADNESS_TASK_DEBUG_TRACE\n        /// Returns the number of unsatisfied dependencies tracked by the debugging instrumentation.\n\n        /// \\return The number of unsatisfied dependencies tracked via _debug calls (or debug ctor).\n        int ndep_debug() const {\n          return std::accumulate(begin(callers_), end(callers_), 0,\n                                 [](int partial_sum, auto& x) { return partial_sum + x.second; });\n        }\n#endif\n\n        /// Returns true if `ndepend == 0` (no unsatisfied dependencies).\n\n        /// \\return True if there are no unsatisfied dependencies.\n        bool probe() const {\n          return ndep() == 0;\n        }\n\n        /// Invoked by callbacks to notify of dependencies being satisfied.\n        void notify() {\n          MADNESS_ASSERT(ndepend >= 0);  // ensure we are valid\n          dec();\n        }\n\n        /// Overload of CallbackInterface::notify_debug(), updates dec()\n        void notify_debug(const char* caller) {\n          MADNESS_ASSERT(ndepend >= 0);\n#ifdef MADNESS_TASK_DEBUG_TRACE\n          CallbackInterface::notify_debug_impl(caller);\n#endif\n          this->dec_debug(caller);\n        }\n\n        /// \\brief Registers a callback that will be executed when `ndepend==0`; immediately invoked\n        ///    if `ndepend==0`.\n\n        /// \\param[in] callback The callback to use.\n        void register_callback(CallbackInterface* callback) {\n            callbackT cb;\n            {\n                ScopedMutex<Spinlock> obolus(this);\n                MADNESS_ASSERT(ndepend >= 0);  // ensure we are valid\n#ifdef MADNESS_TASK_DEBUG_TRACE\n                if (print_debug && !callers_.empty())\n                  print(\"DependencyInterface::register_callback: this=\", this, \" ndepend=\", ndepend);\n#endif\n                const_cast<callbackT&>(callbacks).push(callback);\n                if (probe()) {\n                    cb = std::move(const_cast<callbackT&>(callbacks));\n                    if (final_callback) {\n                      cb.push((CallbackInterface*)final_callback);\n                      ndepend = -1;\n                    }\n                }\n            }\n            do_callbacks(cb);\n        }\n\n\n        /// \\brief Registers the final callback to be executed when `ndepend==0`; immediately invoked\n        ///    if `ndepend==0`.\n\n        /// No additional callbacks can be registered after this call since execution\n        ///  of the final callback can cause destruction of this object.\n        /// \\param[in] callback The callback to use.\n        void register_final_callback(CallbackInterface* callback) {\n          callbackT cb;\n          {\n            ScopedMutex<Spinlock> obolus(this);\n            MADNESS_ASSERT(ndepend >= 0);  // ensure we are valid\n            MADNESS_ASSERT(final_callback == nullptr);\n#ifdef MADNESS_TASK_DEBUG_TRACE\n            if (print_debug && !callers_.empty())\n              print(\"DependencyInterface::register_final_callback: this=\", this, \" ndepend=\", ndepend);\n#endif\n            final_callback = callback;\n            if (probe()) {\n              cb = std::move(const_cast<callbackT&>(callbacks));\n              cb.push((CallbackInterface*)final_callback);\n              // make object invalid\n              ndepend = -1;\n            }\n          }\n          do_callbacks(cb);\n        }\n\n        /// Increment the number of dependencies.\n        void inc() {\n            ScopedMutex<Spinlock> obolus(this);\n            MADNESS_ASSERT(ndepend >= 0);  // ensure we are valid\n#ifdef MADNESS_TASK_DEBUG_TRACE\n            if (!callers_.empty())\n              error(\"DependencyInterface::inc() called for an object that is being debugged\", \"\");\n#endif\n            ++ndepend;\n        }\n\n        /// Decrement the number of dependencies and invoke the callback if `ndepend==0`.\n        void dec() {\n            callbackT cb;\n            {\n                ScopedMutex<Spinlock> obolus(this);\n                MADNESS_ASSERT(ndepend > 0);  // ensure we are valid and decrement can succeed\n#ifdef MADNESS_TASK_DEBUG_TRACE\n                if (!callers_.empty())\n                  error(\"DependencyInterface::dec() called for an object that is being debugged\", \"\");\n#endif\n                if (ndepend == 1) {\n                  cb = std::move(const_cast<callbackT&>(callbacks));\n                  if (final_callback) {\n                    cb.push((CallbackInterface*)final_callback);\n                    // make object invalid by setting ndepend to -1\n                    ndepend = -1;\n                  }\n                }\n                // NB safe to update ndepend now, was not safe to do that before since that makes it observable and\n                //    e.g. result in its destruction before all changes to state are done\n                --ndepend;\n            }\n            do_callbacks(cb);\n        }\n\n        /// Same as inc(), but keeps track of \\c caller; calling dec_debug() will signal error if no matching inc_debug() had been invoked        \n        void inc_debug(const char* caller) {\n          ScopedMutex<Spinlock> obolus(this);\n          MADNESS_ASSERT(ndepend >= 0);  // ensure we are valid\n          ++ndepend;\n#ifdef MADNESS_TASK_DEBUG_TRACE\n          const auto caller_str = caller;\n          auto it = callers_.find(caller_str);\n          if (it != callers_.end())\n            it->second += 1;\n          else\n            callers_[caller] = 1;\n          max_ndepend = std::max(static_cast<int>(max_ndepend), static_cast<int>(ndepend));\n          if (ndep() != ndep_debug())\n            error(\"DependencyInterface::inc_debug(): ndepend != ndepend_debug, caller = \", caller);\n          if (print_debug)\n            print(\"DependencyInterface::inc_debug: this=\", this, \" caller=\", caller, \" ndep=\", callers_[caller], \" ndepend=\", ndepend);\n#endif\n        }\n\n        void dec_debug(const char* caller) {\n            callbackT cb;\n            {\n                ScopedMutex<Spinlock> obolus(this);\n                MADNESS_ASSERT(ndepend > 0);  // ensure we are valid and decrement can succeed\n#ifdef MADNESS_TASK_DEBUG_TRACE\n                const auto caller_str = caller;\n                auto it = callers_.find(caller_str);\n                if (it != callers_.end()) {\n                  MADNESS_ASSERT(it->second > 0);\n                }\n                else {\n                  assert(false && \"DependencyInterface::dec_debug() called without matching inc_debug()\");\n                }\n#endif\n                if (ndepend == 1) {\n                    cb = std::move(const_cast<callbackT&>(callbacks));\n#ifdef MADNESS_TASK_DEBUG_TRACE\n                    if (ndep() != ndep_debug())\n                      error(\"DependencyInterface::dec_debug(): ndepend != ndepend_debug, caller = \", caller);\n                    if (print_debug)\n                      print(\"DependencyInterface::dec_debug: callback spawned, this=\", this, \" caller=\", caller, \" ndep=\", it->second-1, \" ndepend=\", ndepend-1);\n#endif\n                    if (final_callback) {\n                      cb.push((CallbackInterface*)final_callback);\n                      // make object invalid\n                      ndepend = -1;\n                    }\n                }\n#ifdef MADNESS_TASK_DEBUG_TRACE\n                else {\n                  if (print_debug)\n                    print(\"DependencyInterface::dec_debug: this=\", this, \" caller=\", caller, \" ndep=\", it->second-1, \" ndepend=\", ndepend-1);\n                }\n#endif\n                // NB safe to update ndepend now, was not safe to do that before since that makes it observable and\n                //    e.g. result in its destruction before all changes to state are done\n#ifdef MADNESS_TASK_DEBUG_TRACE\n                it->second -= 1;\n#endif\n                --ndepend;\n            }\n            do_callbacks(cb);\n        }\n\n        /// Destructor.\n        virtual ~DependencyInterface() {\n#ifdef MADNESS_ASSERTIONS_THROW\n            if(ndepend > 0)\n                error(\"DependencyInterface::~DependencyInterface(): ndepend =\", ndepend);\n#else\n            MADNESS_ASSERT(ndepend <= 0);  // ensure no outstanding dependencies\n#endif\n#ifdef MADNESS_TASK_DEBUG_TRACE\n            if (!callers_.empty()) {\n              MADNESS_ASSERT(max_ndepend > 0);\n              if (print_debug)\n                print(\"DependencyInterface dtor: this=\", this, \" max_ndepend=\", max_ndepend);\n            }\n#endif\n#ifdef MADNESS_TASK_DEBUG_TRACE\n          for(const auto& c: callers_) {\n            if (c.second != 0) {\n              const auto error_msg = std::string(\"ndepend=\") + std::to_string(c.second) + \" for caller \" + c.first;\n              error(\"DependencyInterface::~DependencyInterface(): \", error_msg);\n            }\n          }\n#endif\n        }\n\nprivate:\n#ifdef MADNESS_TASK_DEBUG_TRACE\n        std::unordered_map<std::string, int> callers_;\n#endif\n    };\n}\n#endif // MADNESS_WORLD_DEPENDENCY_INTERFACE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/dist_cache.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2013  Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n */\n\n#ifndef MADNESS_WORLD_DIST_CACHE_H__INCLUDED\n#define MADNESS_WORLD_DIST_CACHE_H__INCLUDED\n\n#include <madness/world/madness_exception.h>\n#include <madness/world/worldhashmap.h>\n#include <madness/world/future.h>\n\nnamespace madness {\n    namespace detail {\n\n        /// Distributed caching utility\n\n        /// This object implements a local, key-value caching mechanism that can\n        /// be used by remote tasks or active messages to move data between\n        /// processes without synchronization. Because cache values are\n        /// retrieved via a \\c Future, you can get or set the cache in any\n        /// order. The first call \\c get_cache_value or \\c set_cache_value or\n        /// will insert the cache element, and the second call to these\n        /// functions will remove it. Therefore, \\c set_cache_value and\n        /// get_cache_value can only be called once each per cache value.\n        /// \\tparam keyT The key type of the cache\n        template <typename keyT>\n        class DistCache {\n        private:\n\n            // Forward declarations\n            class Cache;\n            template <typename> class CacheData;\n\n            typedef madness::ConcurrentHashMap<keyT, Cache*> cache_container;\n            ///< The container that holds cache values\n            typedef typename cache_container::datumT datum_type;\n            ///< Cache container datum type\n\n            static cache_container caches_; ///< Cache container\n\n            /// Cache interface class\n\n            /// This base class is used to access derived class values\n            class Cache {\n            public:\n\n                /// Virtual destructor\n                virtual ~Cache() { }\n\n                /// Cache data accessor\n\n                /// \\tparam valueT The cached data type\n                /// \\return A const reference to the cached future\n                template <typename valueT>\n                const madness::Future<valueT>& get() const {\n                    MADNESS_ASSERT(this->get_type_info() == typeid(CacheData<valueT>));\n                    return static_cast<const CacheData<valueT>*>(this)->value();\n                }\n\n            private:\n\n                /// Typeid accessor of the derived class\n\n                /// \\return The std::type_info of the derived class\n                virtual const std::type_info& get_type_info() const = 0;\n\n            }; // class Cache\n\n            /// Cache value container\n\n            /// \\tparam valueT The data type stored in the cache\n            template <typename valueT>\n            class CacheData : public Cache {\n            private:\n                madness::Future<valueT> value_; ///< Local cached data\n\n            public:\n\n                /// Default constructor\n                CacheData() : value_() { }\n\n                /// Constructor with future initialization\n                CacheData(const madness::Future<valueT>& value) : value_(value) { }\n\n                /// Constructor with data initialization\n                CacheData(const valueT& value) : value_(value) { }\n\n                /// Virtual destructor\n                virtual ~CacheData() { }\n\n                /// Data accessor\n\n                /// \\return A const reference to the data\n                const madness::Future<valueT>& value() const { return value_; }\n\n            private:\n\n                /// Typeid accessor of the derived class\n\n                /// \\return The std::type_info of the derived class\n                virtual const std::type_info& get_type_info() const {\n                    return typeid(CacheData<valueT>);\n                }\n\n            }; // class CacheData\n\n            public:\n\n            /// Set the cache value accosted with \\c key\n\n            /// This will set the value associated with \\c key to \\c value. If\n            /// the cache element does not exist, it is inserted into the cache.\n            /// Otherwise, it is removed from the cache.\n            /// \\tparam valueT The object type that will be used to set the\n            /// cache (may be a \\c madness::Future type).\n            /// \\param key The key associated with \\c value\n            /// \\param value The data that will be cached\n            template <typename valueT>\n            static void set_cache_value(const keyT& key, const valueT& value) {\n                typedef typename madness::remove_future<valueT>::type value_type;\n\n                // Retrieve the cached future\n                typename cache_container::accessor acc;\n                if(caches_.insert(acc, datum_type(key, static_cast<Cache*>(nullptr)))) {\n\n                    // A new element was inserted, so create a new cache object.\n                    acc->second = new CacheData<value_type>(value);\n                    acc.release();\n\n                } else {\n\n                    // The element already existed, so retrieve the data\n                    Cache* cache = acc->second;\n                    caches_.erase(acc);\n\n                    // Set the cache value\n                    madness::Future<value_type> f =\n                            cache->template get<value_type>();\n                    MADNESS_ASSERT(! f.probe());\n                    f.set(value);\n\n                    // Cleanup cache\n                    delete cache;\n                }\n            }\n\n            /// Get the cache value accosted with \\c key\n\n            /// This will get the value associated with \\c key to \\c value. The\n            /// value is given in the form of a \\c Future, which is set by a\n            /// call to \\c set_cache_value. If the cache element does not exist,\n            /// it is inserted into the cache. Otherwise, it is removed from the\n            /// cache.\n            /// \\tparam valueT The object type that will be used to set the cache\n            /// \\param[in] key The key associated with \\c value\n            /// \\param[out] value The data that will be cached\n            template <typename valueT>\n            static void get_cache_value(const keyT& key, madness::Future<valueT>& value) {\n                // Retrieve the cached future\n                typename cache_container::accessor acc;\n                if(caches_.insert(acc, datum_type(key, static_cast<Cache*>(nullptr)))) {\n                    // A new element was inserted, so create a new cache object.\n                    acc->second = new CacheData<valueT>(value);\n                    acc.release();\n                } else {\n                    // The element already existed, so retrieve the data and\n                    // remove the cache element.\n                    Cache* cache = acc->second;\n                    caches_.erase(acc);\n\n                    // Get the result\n                    value.set(cache->template get<valueT>());\n                    delete cache;\n                }\n            }\n\n            /// Get the cache value accosted with \\c key\n\n            /// This will get the value associated with \\c key to \\c value. If\n            /// the cache element does not exist, it is inserted into the cache.\n            /// Otherwise, it is removed from the cache.\n            /// \\tparam valueT The object type that will be used to set the cache\n            /// \\param[in] key The key associated with \\c value\n            /// \\return A \\c Future that holds/will hold the cache value, which\n            /// will be set by a call to \\c set_cache_value.\n            template <typename valueT>\n            static madness::Future<valueT> get_cache_value(const keyT& key) {\n                // Retrieve the cached future\n                typename cache_container::accessor acc;\n                if(caches_.insert(acc, datum_type(key, static_cast<Cache*>(nullptr)))) {\n                    // A new element was inserted, so create a new cache object.\n                    acc->second = new CacheData<valueT>();\n                    madness::Future<valueT> value(acc->second->template get<valueT>());\n                    acc.release();\n\n                    return value;\n                } else {\n                    // The element already existed, so retrieve the data and\n                    // remove the cache element.\n                    Cache* cache = acc->second;\n                    caches_.erase(acc);\n\n                    // Get the result\n                    madness::Future<valueT> value(cache->template get<valueT>());\n                    delete cache;\n\n                    return value;\n                }\n            }\n\n        }; // class DistCache\n\n        template <typename keyT>\n        typename DistCache<keyT>::cache_container DistCache<keyT>::caches_;\n\n    }  // namespace detail\n} // namespace madness\n\n#endif // MADNESS_WORLD_DIST_CACHE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/distributed_id.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2013  Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n */\n\n#ifndef MADNESS_WORLD_DISTRIBUTED_ID_H__INCLUDED\n#define MADNESS_WORLD_DISTRIBUTED_ID_H__INCLUDED\n\n/**\n \\file distributed_id.h\n \\brief \\todo Description needed.\n \\ingroup parallel_runtime\n*/\n\n#include <madness/world/uniqueid.h>\n#include <madness/world/worldtypes.h>\n#include <madness/world/print.h>\n\nnamespace madness {\n\n    /// Distributed ID which is used to identify objects.\n    typedef std::pair<uniqueidT, std::size_t> DistributedID;\n\n    /// Distributed ID equality comparison operator.\n\n    /// \\param[in] left The first key to compare.\n    /// \\param[in] right The second key to compare.\n    /// \\return True when \\c first and \\c second of \\c left and \\c right are\n    ///    equal; otherwise false.\n    inline bool operator==(const DistributedID& left, const DistributedID& right) {\n        return (left.first == right.first) && (left.second == right.second);\n    }\n\n    /// Distributed ID inequality comparison operator.\n\n    /// \\param[in] left The first key to compare.\n    /// \\param[in] right The second key to compare.\n    /// \\return True when \\c first or \\c second of \\c left and \\c right are\n    ///    not equal; otherwise false.\n    inline bool operator!=(const DistributedID& left, const DistributedID& right) {\n        return (left.first != right.first) || (left.second != right.second);\n    }\n\n    /// Overload redirect to std::ostream to be discoverable via ADL\n    inline std::ostream& operator<<(std::ostream& os, const DistributedID& did) {\n      return madness::operators::operator<<(os, did);\n    }\n\n    /// Key object that includes the process information.\n\n    /// \\tparam Key The base key type.\n    /// \\tparam Tag A type to differentiate key types.\n    template <typename Key, typename Tag = void>\n    class ProcessKey {\n    private:\n        Key key_; ///< The base key type.\n        ProcessID proc_; ///< The process that generated the key.\n\n    public:\n\n        /// Default constructor.\n        ProcessKey() : key_(), proc_(-1) { }\n\n        /// Constructor.\n\n        /// \\param[in] key The base key.\n        /// \\param[in] proc The process that generated the key.\n        ProcessKey(const Key& key, const ProcessID proc) :\n            key_(key), proc_(proc)\n        { }\n\n        /// Copy constructor.\n\n        /// \\param[in] other The key to be copied.\n        ProcessKey(const ProcessKey<Key, Tag>& other) :\n            key_(other.key_), proc_(other.proc_)\n        { }\n\n        /// Copy assignment operator.\n\n        /// \\param[in] other The key to be copied.\n        /// \\return A reference to this object.\n        ProcessKey<Key, Tag>& operator=(const ProcessKey<Key, Tag>& other) {\n            key_ = other.key_;\n            proc_ = other.proc_;\n            return *this;\n        }\n\n        /// Base key accessor.\n\n        /// \\return The base key.\n        const Key& key() const { return key_; }\n\n        /// Process ID accessor.\n\n        /// \\return The process ID.\n        ProcessID proc() const { return proc_; }\n\n        /// Equality comparison.\n\n        /// \\param[in] other The key to be compared to this.\n        /// \\return True when other key and other process are equal to that of\n        ///    this key; otherwise false.\n        bool operator==(const ProcessKey<Key, Tag>& other) const {\n            return ((key_ == other.key_) && (proc_ == other.proc_));\n        }\n\n        /// Inequality comparison.\n\n        /// \\param[in] other The key to be compared to this.\n        /// \\return True when other key or other process are not equal to that\n        ///    of this key; otherwise false.\n        bool operator!=(const ProcessKey<Key, Tag>& other) const {\n            return ((key_ != other.key_) || (proc_ != other.proc_));\n        }\n\n        /// Serialize this key.\n\n        /// \\tparam Archive The archive type.\n        /// \\param[in,out] ar The archive object that will serialize this object.\n        template <typename Archive>\n        void serialize(const Archive& ar) {\n            ar & key_ & proc_;\n        }\n\n        /// Hashing function.\n\n        /// \\param[in] key The key to be hashed.\n        /// \\return The hashed key value.\n        friend hashT hash_value(const ProcessKey<Key, Tag>& key) {\n            Hash<Key> hasher;\n            hashT seed = hasher(key.key_);\n            madness::detail::combine_hash(seed, key.proc_);\n            return seed;\n        }\n\n    }; // class ProcessKey\n\n    /// Overload redirect to std::ostream to be discoverable via ADL\n    template <typename Key, typename Tag>\n    inline std::ostream& operator<<(std::ostream& os, const ProcessKey<Key,Tag>& key) {\n      using madness::operators::operator<<;\n      return os << \"{\" << key.key() << \",\" << key.proc() << \"}\";\n    }\n\n    /// Key object that uses a tag to differentiate keys.\n\n    /// \\tparam Key The base key type.\n    /// \\tparam Tag A type to differentiate key types.\n    template <typename Key, typename Tag>\n    class TaggedKey {\n    private:\n        Key key_; ///< The base key type.\n\n    public:\n\n        /// Default constructor.\n        TaggedKey() : key_() { }\n\n        /// Constructor.\n\n        /// \\param[in] key The base key.\n        TaggedKey(const Key& key) : key_(key) { }\n\n        /// Copy constructor.\n\n        /// \\param[in] other The key to be copied.\n        TaggedKey(const TaggedKey<Key, Tag>& other) : key_(other.key_) { }\n\n        /// Copy assignment operator.\n\n        /// \\param[in] other The key to be copied.\n        /// \\return A reference to this object.\n        TaggedKey<Key, Tag>& operator=(const TaggedKey<Key, Tag>& other) {\n            key_ = other.key_;\n            return *this;\n        }\n\n        /// Base key accessor.\n\n        /// \\return The base key.\n        const Key& key() const { return key_; }\n\n        /// Equality comparison.\n\n        /// \\param[in] other The key to be compared to this.\n        /// \\return True when other key and other process are equal to that of\n        ///    this key; otherwise false.\n        bool operator==(const TaggedKey<Key, Tag>& other) const {\n            return (key_ == other.key_);\n        }\n\n        /// Inequality comparison.\n\n        /// \\param[in] other The key to be compared to this.\n        /// \\return True when other key or other process are not equal to that\n        ///    of this key; otherwise false.\n        bool operator!=(const TaggedKey<Key, Tag>& other) const {\n            return (key_ != other.key_);\n        }\n\n        /// Serialize this key.\n\n        /// \\tparam Archive The archive type.\n        /// \\param[in,out] ar The archive object that will serialize this object.\n        template <typename Archive>\n        void serialize(const Archive& ar) { ar & key_; }\n\n        /// Hashing function.\n\n        /// \\param[in] key The key to be hashed.\n        /// \\return The hashed key value.\n        friend hashT hash_value(const TaggedKey<Key, Tag>& key) {\n            Hash<Key> hasher;\n            return hasher(key.key_);\n        }\n\n    }; // class TagKey\n\n    /// Overload redirect to std::ostream to be discoverable via ADL\n    template <typename Key, typename Tag>\n    inline std::ostream& operator<<(std::ostream& os, const TaggedKey<Key,Tag>& key) {\n      using madness::operators::operator<<;\n      return os << \"{\" << key.key() << \"}\";\n    }\n\n} // namespace madness\n\nnamespace std {\n\n    /// Hash a \\c DistributedID.\n\n    /// \\param[in] id The distributed ID to be hashed.\n    /// \\return The hash value of \\c id.\n    inline madness::hashT hash_value(const madness::DistributedID& id) {\n        madness::hashT seed = madness::hash_value(id.first);\n        madness::detail::combine_hash(seed, madness::hash_value(id.second));\n\n        return seed;\n    }\n\n} // namespace std\n\n#endif // MADNESS_WORLD_DISTRIBUTED_ID_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/dqueue.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#ifndef MADNESS_WORLD_DQUEUE_H__INCLUDED\n#define MADNESS_WORLD_DQUEUE_H__INCLUDED\n\n// If defined aggregate q insertions to reduce contention on accessing the q\n//#define MADNESS_DQ_USE_PREBUF // now in config file\n\n// If defined capture stats on dqueue class --- seems to have small overhead\n#define MADNESS_DQ_STATS\n\n#include <algorithm>\n#include <cstddef>\n#include <iostream>\n#include <madness/config.h>\n#include <madness/world/thread_info.h>\n#include <madness/world/worldmutex.h>\n#include <stdint.h>\n#include <utility>\n\n/// \\file dqueue.h\n/// \\brief Implements DQueue\n\nnamespace madness {\n\n    struct DQStats { // Dilly bar, blizzard, ...\n        uint64_t npush_back;    ///< #calls to push_back\n        uint64_t npush_front;   ///< #calls to push_front\n        uint64_t npop_front;    ///< #calls to pop_front\n        uint64_t ngrow;         ///< #calls to grow\n        uint64_t nmax;          ///< Lifetime max. entries in the queue\n\n        DQStats()\n                : npush_back(0), npush_front(0), npop_front(0), ngrow(0), nmax(0) {}\n    };\n\n\n    /// A thread safe, fast but simple doubled-ended queue.\n\n    /// Since the point is speed, the implementation is a circular\n    /// buffer rather than a linked list so as to avoid the new/del\n    /// overhead.  It will grow as needed, but presently will not\n    /// shrink.  Had to modify STL API to make things thread safe.\n    ///\n    /// It is now rather heavily specialized to its only use.\n    template <typename T>\n    class DQueue : private CONDITION_VARIABLE_TYPE {\n        char pad[64]; ///< To put the lock and the data in separate cache lines\n        \n        // n, sz, buf, _front, _back used to be volatile, but not actually needed since every access\n        // happens with the mutex and its implied barriers.\n        size_t n __attribute__((aligned(64)));        ///< Number of elements in the buffer\n        size_t sz;              ///< Current capacity\n        T* buf;        ///< Actual buffer\n        int _front;  ///< Index of element at front of buffer\n        int _back;    ///< Index of element at back of buffer\n        \n        DQStats stats;\n\n#ifdef MADNESS_DQ_USE_PREBUF\n\tstatic const size_t NPREBUF=MADNESS_DQ_PREBUF_SIZE;\n\tinline static thread_local T prebuf[NPREBUF] = {T{}}; // relies on this being a singleton class!!!!!!!!!!!!!!!!!!\n\tinline static thread_local T prebufhi[NPREBUF] = {T{}}; // relies on this being a singleton class!!!!!!!!!!!!!!!!!!\n\tinline static thread_local size_t ninprebuf = 0, ninprebufhi = 0;\n        static auto prebuf_info() { return std::make_tuple(ninprebuf, prebuf, ninprebufhi, prebufhi); }\n#endif\n\n        void grow() {\n            // ASSUME WE ALREADY HAVE THE MUTEX WHEN IN HERE\n#ifdef MADNESS_DQ_STATS\n\t  ++(stats.ngrow);\n#endif\n            if (sz != n) MADNESS_EXCEPTION(\"assertion failure in dqueue::grow\", static_cast<int>(sz));\n            size_t oldsz = sz;\n            if (sz < 32768)\n                sz = 65536;\n            else if (sz <= 1048576)\n                sz *= 2;\n            else\n                sz += 1048576;\n            //volatile T* volatile nbuf = new T[sz];\n            T* nbuf = new T[sz];\n            int lo = sz/2 - oldsz/2;\n            for (int i=_front; i<int(oldsz); ++i,++lo) {\n                nbuf[lo] = buf[i];\n            }\n            if (_front > 0) {\n                for (int i=0; i<=_back; ++i,++lo) {\n                    nbuf[lo] = buf[i];\n                }\n            }\n            _front = sz/2 - oldsz/2;\n            _back = _front + n - 1;\n            delete [] buf;\n            buf = nbuf;\n            //sanity_check();\n        }\n\n        void sanity_check() const {\n            // ASSUME WE ALREADY HAVE THE MUTEX WHEN IN HERE\n            int num = _back - _front + 1;\n            if (num < 0) num += sz;\n            if (num==int(sz) && n==0) num=0;\n            if (num==0 && n==sz) num=sz;\n            //if (long(n) != num) print(\"size\",sz,\"front\",_front,\"back\",_back,\"n\",n,\"num\",num);\n            MADNESS_ASSERT(long(n) == num);\n        }\n\n        void push_back_with_lock(const T& value) {\n            size_t nn = n;\n            size_t ss = sz;\n            if (nn == ss) {\n                grow();\n                ss = sz;\n            }\n            ++nn;\n#ifdef MADNESS_DQ_STATS\n            if (nn > stats.nmax) stats.nmax = nn;\n#endif\n            n = nn;\n\n            int b = _back + 1;\n            if (b >= int(ss)) b = 0;\n            buf[b] = value;\n            _back = b;\n#ifdef MADNESS_DQ_STATS\n            ++(stats.npush_back);\n#endif\n\n            signal();\n        }\n\n        void push_front_with_lock(const T& value) {\n            //sanity_check();\n\n            size_t nn = n;\n            size_t ss = sz;\n            if (nn == ss) {\n                grow();\n                ss = sz;\n            }\n            ++nn;\n#ifdef MADNESS_DQ_STATS\n            if (nn > stats.nmax) stats.nmax = nn;\n#endif\n            n = nn;\n\n            int f = _front - 1;\n            if (f < 0) f = ss - 1;\n            buf[f] = value;\n            _front = f;\n#ifdef MADNESS_DQ_STATS\n            ++(stats.npush_front);\n#endif\n\n            //sanity_check();\n            signal();\n            //broadcast();\n        }\n\n\tvoid flush_prebufhi() {\n#ifdef MADNESS_DQ_USE_PREBUF\n          if (ninprebufhi) {\n            // in reverse order of insertion\n            for (size_t i=ninprebufhi; i!=0;) {\n              push_front_with_lock(prebufhi[--i]);\n            }\n            ninprebufhi = 0;\n          }\n#endif\n\t}\n\n        void flush_prebuflo() {\n#ifdef MADNESS_DQ_USE_PREBUF\n          if (ninprebuf) {\n            for (size_t i=0; i<ninprebuf; i++) push_back_with_lock(prebuf[i]);\n            ninprebuf = 0;\n          }\n#endif\n        }\n\n        void flush_prebuf() {\n          flush_prebufhi();\n          flush_prebuflo();\n        }\n\n    public:\n\n        void set_wait_policy(WaitPolicy p, int us = 0) {\n#ifdef USE_SPINLOCKS\n          ConditionVariable::set_wait_policy(p, us);\n#endif\n        }\n\n        DQueue(size_t hint=200000) // was 32768\n                : n(0)\n                , sz(hint>2 ? hint : 2)\n                , buf(new T[sz])\n                , _front(sz/2)\n\t        , _back(_front-1) {}\n\n        virtual ~DQueue() {\n            delete [] buf;\n        }\n\n\tvoid lock_and_flush_prebuf();\n\n        /// Insert value at front of queue\n        void push_front(const T& value);\n\n        /// Insert element at back of queue (default is just one copy)\n        void push_back(const T& value, int ncopy=1);\n\n        template <typename opT>\n        void scan(opT& op) {\n            madness::ScopedMutex<CONDITION_VARIABLE_TYPE> obolus(this);\n\n            int f = _front;\n            size_t nn = n;\n            int size = int(sz);\n            std::cout << \"IN Q \" << nn << std::endl;\n\n            while (nn--) {\n                T* p = const_cast<T*>(buf + f);\n                if (!op(p)) break;\n                ++f;\n                if (f >= size) f = 0;\n            }\n        }\n\n        /// Pop multiple values off the front of queue ... returns number popped ... might be zero\n\n        /// r must refer to an array of dimension at least nmax ... you are presently\n        /// given no more than max(size()/64,1) values ... arbitrary choice.\n        ///\n        /// multi-threaded tasks might cause fewer tasks to be taken\n        int pop_front(int nmax, T* r, bool wait) {\n            madness::ScopedMutex<CONDITION_VARIABLE_TYPE> obolus(this);\n\t    flush_prebuf();\n\n            size_t nn = n;\n\n            if (nn==0 && wait) {\n                while (n == 0) // !!! Must be n (memory) not nn (local copy)\n                    CONDITION_VARIABLE_TYPE::wait(); // might release then reacquire the lock, acts as barrier\n\n                nn = n;\n            }\n\n#ifdef MADNESS_DQ_STATS\n            ++(stats.npop_front);\n#endif\n            if (nn) {\n                size_t thesize = sz;\n                //sanity_check();\n\n                nmax = std::min(nmax,std::max(int(nn>>6),1));\n                int retval; // Will return the number of items taken\n\n\n                int f = _front;\n\n                // Original loop was this\n                //retval = nmax;\n                //while (nmax--) {\n                //    *r++ = buf[f++];\n                //    if (f >= int(sz)) f = 0;\n                //}\n\n                // New loop includes checking for replicated multi-threaded task\n                // ... take one task and then check that subsequent tasks differ\n                nmax--;\n                *r++ = buf[f++];\n                if (f >= int(thesize)) f = 0;\n                retval=1;\n                while (nmax--) {\n                    T ptr = buf[f];\n                    if (ptr == *(r-1)) {\n                        break;\n                    }\n                    else if (ptr) { // Null pointer indicates stolen task\n                        *r++ = ptr;\n                        ++f;\n                        if (f >= int(thesize)) f = 0;\n                        ++retval;\n                    }\n                }\n\n                n = nn - retval;\n                _front = f;\n\n                //sanity_check();\n                return retval;\n            }\n            else {\n                return 0;\n            }\n        }\n\n        /// Pop value off the front of queue\n        std::pair<T,bool> pop_front(bool wait) {\n            T r;\n            int ngot = pop_front(1, &r, wait);\n            return std::pair<T,bool>(r,ngot==1);\n        }\n\n        size_t size() const {\n            return n;\n        }\n\n        bool empty() const;\n\n        const DQStats& get_stats() const {\n            return stats;\n        }\n    };\n\n    template <typename T>\n    void DQueue<T>::lock_and_flush_prebuf() {\n#ifdef MADNESS_DQ_USE_PREBUF\n        MADNESS_ASSERT(ninprebufhi <= NPREBUF && ninprebuf <= NPREBUF);\n        if (ninprebuf+ninprebufhi) {\n             madness::ScopedMutex<CONDITION_VARIABLE_TYPE> obolus(this);\n             flush_prebuf();\n        }\n#endif\n    }\n\n    template <typename T>\n    void DQueue<T>::push_front(const T& value) {\n#ifdef MADNESS_DQ_USE_PREBUF\n        if (is_madness_thread() && ninprebufhi < NPREBUF) {\n             prebufhi[ninprebufhi++] = value;\n             return;\n        }\n        MADNESS_ASSERT(ninprebufhi <= NPREBUF && ninprebuf <= NPREBUF);\n#endif\n        {\n             madness::ScopedMutex<CONDITION_VARIABLE_TYPE> obolus(this);\n             push_front_with_lock(value);\n             flush_prebufhi();\n        }\n    }\n\n    template <typename T>\n    void DQueue<T>::push_back(const T& value, int ncopy) {\n#ifdef MADNESS_DQ_USE_PREBUF\n        if (is_madness_thread() && ncopy==1 && ninprebuf < NPREBUF) {\n             prebuf[ninprebuf++] = value;\n             return;\n        }\n        MADNESS_ASSERT(ninprebufhi <= NPREBUF && ninprebuf <= NPREBUF);\n#endif\n        {\n             madness::ScopedMutex<CONDITION_VARIABLE_TYPE> obolus(this);\n             flush_prebuf();\n             //sanity_check();\n             while (ncopy--)\n                 push_back_with_lock(value);\n             //sanity_check();\n             //broadcast();\n        }\n    }\n\n    template <typename T>\n    bool DQueue<T>::empty() const {\n#ifdef MADNESS_DQ_USE_PREBUF\n      return (ninprebuf+ninprebufhi+n)==0; // this is just from the perspective of this thread!!!!!\n#else\n      return (n==0);\n#endif\n    }\n\n}  // namespace madness\n\n#endif // MADNESS_WORLD_DQUEUE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/function_traits.h",
    "content": "#ifndef MADNESS_FUNCTION_TRAITS\n#define MADNESS_FUNCTION_TRAITS\n\n#include <type_traits>\n\nnamespace madness {\n    namespace detail {\n        // helps to implement other metafunctions\n        template<typename> struct is_type : public std::true_type { };\n\n        /// Function traits in the spirit of boost function traits\n        template <typename functionT, typename enablerT = void>\n        struct function_traits : public std::false_type {};\n\n        /// Function traits in the spirit of boost function traits\n        template <typename functionT, typename enablerT = void>\n        struct callable_traits : public std::false_type {};\n\n        /// Member function traits in the spirit of boost function traits\n        template <typename memfuncT>\n        struct memfunc_traits : public std::false_type { };\n\n        /// Function trait specialization for a free function pointer\n        template <typename resultT, typename... argTs>\n        struct function_traits<resultT(*)(argTs...), void> {\n          static const bool value = true;\n          static const int arity = sizeof...(argTs);\n          using result_type = resultT;\n        };\n\n        /// Function trait specialization for a *reference* to a free function pointer\n        template <typename resultT, typename... argTs>\n        struct function_traits<resultT(*&)(argTs...), void> {\n          static const bool value = true;\n          static const int arity = sizeof...(argTs);\n          using result_type = resultT;\n        };\n\n        /// Function trait specialization for a callable (can be a function, a (generic) lambda, etc.)\n        template <typename fnT, typename... argTs>\n        struct function_traits<fnT(argTs...), std::enable_if_t<is_type<std::invoke_result_t<fnT, argTs...>>::value>> {\n            static const bool value = true;\n            static const int arity = sizeof...(argTs);\n            using result_type = std::invoke_result_t<fnT, argTs...>;\n        };\n\n        /// Function traits in the spirit of boost function traits\n        template <typename fnT, typename... argTs>\n        struct callable_traits<fnT(argTs...), std::enable_if_t<is_type<std::invoke_result_t<fnT, argTs...>>::value>> {\n            static const bool value = true;\n            static const int arity = sizeof...(argTs);\n            using result_type = std::invoke_result_t<fnT, argTs...>;\n        };\n\n        /// Member function traits in the spirit of boost function traits\n        template <typename objT, typename returnT, typename... argTs>\n        struct memfunc_traits<returnT(objT::*)(argTs...)> {\n            static const bool value = true;\n            static const int arity = sizeof...(argTs);\n            static const bool constness = false;\n            typedef objT obj_type;\n            typedef returnT result_type;\n        };\n\n        /// Member function traits in the spirit of boost function traits\n        template <typename objT, typename returnT, typename... argTs>\n        struct memfunc_traits<returnT(objT::*)(argTs...) const> {\n            static const bool value = true;\n            static const int arity = sizeof...(argTs);\n            static const bool constness = true;\n            typedef objT obj_type;\n            typedef returnT result_type;\n        };\n\n\n        template <typename fnT, typename Enabler = void>\n        struct is_functor {\n            typedef char (& yes)[1];\n            typedef char (& no)[2];\n\n            // we need a template here to enable SFINAE\n            template <typename U>\n            static yes deduce(char (*)[sizeof(&U::operator())]);\n            // fallback\n            template <typename> static no deduce(...);\n\n            static const bool value = sizeof(deduce<fnT>(0)) == sizeof(yes);\n        };\n\n        template <typename fnT>\n        struct is_functor<fnT, typename std::enable_if<is_type<typename fnT::result_type>::value >::type> :\n                public std::true_type\n        { };\n\n        template <typename fnT, typename Enabler = void>\n        struct result_of {\n            typedef typename fnT::result_type type;\n        };\n\n        template <typename fnT>\n        struct result_of<fnT, typename std::enable_if<is_type<decltype(&fnT::operator())>::value >::type> :\n                public result_of<decltype(&fnT::operator())>\n        { };\n\n        template <typename fnT>\n        struct result_of<fnT, typename std::enable_if<function_traits<fnT>::value>::type> {\n            typedef typename function_traits<fnT>::result_type type;\n        };\n\n        template <typename fnT>\n        struct result_of<fnT, typename std::enable_if<memfunc_traits<fnT>::value>::type> {\n            typedef typename memfunc_traits<fnT>::result_type type;\n        };\n    }\n}\n#endif\n"
  },
  {
    "path": "src/madness/world/future.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file future.cc\n \\brief Implementations for \\c Future and related functions.\n \\ingroup world\n*/\n\n#include <madness/world/future.h>\n#include <cstdlib>\n#include <sstream>\n\nnamespace madness {\n\n    const Future<void> Future<void>::value = Future<void>();\n\n    template <>\n    std::ostream& operator<<(std::ostream& out, const Future<void>& f) {\n        out << \"<void>\";\n        return out;\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/future.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file future.h\n \\brief Implements \\c Future and related items.\n \\ingroup futures\n*/\n\n#ifndef MADNESS_WORLD_FUTURE_H__INCLUDED\n#define MADNESS_WORLD_FUTURE_H__INCLUDED\n\n#include <atomic>\n#include <vector>\n#include <stack>\n#include <new>\n#include <madness/world/nodefaults.h>\n#include <madness/world/dependency_interface.h>\n#include <madness/world/stack.h>\n#include <madness/world/worldref.h>\n#include <madness/world/world.h>\n\n/// \\addtogroup futures\n/// @{\nnamespace madness {\n\n    //extern SharedCounter future_count; // For tracking memory leak\n\n    // forward decl\n    template <typename T> class Future;\n\n    /// Human readable printing of a \\c Future to a stream.\n\n    /// \\tparam T The type of future.\n    /// \\param[in,out] out The output stream.\n    /// \\param[in] f The future.\n    /// \\return The output stream.\n    template <typename T>\n    std::ostream& operator<<(std::ostream& out, const Future<T>& f);\n\n\n    /// Implements the functionality of futures.\n\n    /// \\tparam T The type of future.\n    template <typename T>\n    class FutureImpl : private Spinlock {\n        friend class Future<T>;\n        friend std::ostream& operator<< <T>(std::ostream& out, const Future<T>& f);\n\n    private:\n        /// The static stack size used for callbacks and future assignment used\n        /// for small stack size optimizations.\n        static const int MAXCALLBACKS = 4;\n\n        typedef Stack<CallbackInterface*, MAXCALLBACKS> callbackT; ///< Callback type.\n        typedef Stack<std::shared_ptr<FutureImpl<T> >,MAXCALLBACKS> assignmentT; ///< Assignment type.\n\n        /// A stack that stores callbacks that are invoked once the future has\n        /// been assigned.\n        volatile callbackT callbacks;\n\n        /// A stack that stores future objects that are set to the same value\n        /// as this future, once it has been set.\n        volatile mutable assignmentT assignments;\n\n        /// A flag indicating if the future has been set.\n        std::atomic<bool> assigned;  // Use of atomic for necessary memory barriers/fences\n\n        /// Reference to a remote future pimpl.\n        RemoteReference< FutureImpl<T> > remote_ref;\n\n        volatile T t; ///< The future data.\n\n        /// AM handler for remote set operations.\n\n        /// \\todo Description needed.\n        /// \\param[in] arg Description needed.\n        static void set_handler(const AmArg& arg) {\n            RemoteReference< FutureImpl<T> > ref;\n            archive::BufferInputArchive input_arch = arg & ref;\n            // The remote reference holds a copy of the shared_ptr, so no need\n            // to take another.\n            {\n                FutureImpl<T>* pimpl = ref.get();\n\n                ScopedMutex<Spinlock> fred(pimpl);\n                if(pimpl->remote_ref) {\n                    // Unarchive the value to a temporary since it is going to\n                    // be forwarded to another node.\n                    MADNESS_PRAGMA_CLANG(diagnostic push)\n                    MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wuninitialized-const-reference\")\n  \t\t    T value;\n                    input_arch & value;\n                    MADNESS_PRAGMA_CLANG(diagnostic pop)\n\t\n\n                    // Copy world and owner from remote_ref since sending remote_ref\n                    // will invalidate it.\n                    World& world = pimpl->remote_ref.get_world();\n                    const ProcessID owner = pimpl->remote_ref.owner();\n                    world.am.send(owner, FutureImpl<T>::set_handler,\n                            new_am_arg(pimpl->remote_ref, value));\n\n                    pimpl->set_assigned(value);\n                } else {\n                    // Unarchive the value of the future\n                    input_arch & const_cast<T&>(pimpl->t);\n\n                    pimpl->set_assigned(const_cast<const T&>(pimpl->t));\n                }\n            }\n            ref.reset();\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// Invoked locally by set routine after assignment.\n        /// \\todo Description needed.\n        /// \\param[in] value Description needed.\n        inline void set_assigned(const T& value) {\n            // Assume that whoever is invoking this routine is holding\n            // a copy of our shared pointer on its *stack* so that\n            // if this future is destroyed as a result of a callback\n            // the destructor of this object is not invoked until\n            // we return.\n            //\n            // Also assume that the caller either has the lock\n            // or is sure that we are single threaded.\n            MADNESS_ASSERT(!assigned);\n            assigned = true;\n\n            assignmentT& as = const_cast<assignmentT&>(assignments);\n            callbackT& cb = const_cast<callbackT&>(callbacks);\n\n            while (!as.empty()) {\n                MADNESS_ASSERT(as.top());\n                as.top()->set(value);\n                as.pop();\n            }\n\n            while (!cb.empty()) {\n                MADNESS_ASSERT(cb.top());\n                cb.top()->notify();\n                cb.pop();\n            }\n\n            as.reset();\n            cb.reset();\n        }\n\n        /// Pass by value with implied copy to manage lifetime of \\c f.\n\n        /// \\todo Description needed.\n        /// \\param[in] f Description needed.\n        inline void add_to_assignments(const std::shared_ptr< FutureImpl<T> > f) {\n            // ASSUME lock is already acquired\n            if (assigned) {\n                f->set(const_cast<T&>(t));\n            }\n            else {\n                assignmentT* as = const_cast<assignmentT*>(&assignments);\n                as->push(f);\n            }\n        }\n\n\n    public:\n\n        /// Constructor that uses a local unassigned value.\n        FutureImpl()\n                : callbacks()\n                , assignments()\n                , assigned(false)\n                , remote_ref()\n                , t()\n        {\n        }\n\n\n        /// Constructor that uses a wrapper for a remote future.\n\n        /// \\todo Description needed.\n        /// \\param[in] remote_ref Description needed.\n        FutureImpl(const RemoteReference< FutureImpl<T> >& remote_ref)\n                : callbacks()\n                , assignments()\n                , assigned(false)\n                , remote_ref(remote_ref)\n                , t()\n        {\n        }\n\n\n        /// Checks if the value has been assigned.\n\n        /// \\return True if the value has been assigned; false otherwise.\n        inline bool probe() const {\n            return assigned;\n        }\n\n\n        /// Registers a function to be invoked when future is assigned.\n\n        /// Callbacks are invoked in the order registered. If the\n        /// future is already assigned, the callback is immediately\n        /// invoked.\n        /// \\todo Description needed.\n        /// \\param callback Description needed.\n        inline void register_callback(CallbackInterface* callback) {\n            ScopedMutex<Spinlock> fred(this);\n            if (assigned) callback->notify();\n            else const_cast<callbackT&>(callbacks).push(callback);\n        }\n\n\n        /// Sets the value of the future (assignment).\n\n        /// \\todo Descriptions needed.\n        /// \\tparam U Description needed.\n        /// \\param[in] value Description needed.\n        template <typename U>\n        void set(U&& value) {\n            ScopedMutex<Spinlock> fred(this);\n            if(remote_ref) {\n                // Copy world and owner from remote_ref since sending remote_ref\n                // will invalidate it.\n                World& world = remote_ref.get_world();\n                const ProcessID owner = remote_ref.owner();\n                world.am.send(owner, FutureImpl<T>::set_handler,\n                        new_am_arg(remote_ref, value));\n                set_assigned(std::forward<U>(value));\n            } else {\n                set_assigned((const_cast<T&>(t) = std::forward<U>(value)));\n            }\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in] input_arch Description needed.\n        void set(const archive::BufferInputArchive& input_arch) {\n            ScopedMutex<Spinlock> fred(this);\n            MADNESS_ASSERT(! remote_ref);\n            input_arch & const_cast<T&>(t);\n            set_assigned(const_cast<T&>(t));\n        }\n\n\n        /// Gets/forces the value, waiting if necessary.\n\n        /// \\param dowork If true (default) and the future is not ready\n        /// this thread will execute other tasks while waiting\n        /// \\warning PaRSEC backend does not support `dowork=true`\n        /// from a callstack containing a running MADNESS task already,\n        /// hence must use `dowork=false` when need to call from within a task\n        /// \\return reference to the contained value\n        /// \\pre `this->is_local()`\n        T& get(bool dowork = true) {\n            MADNESS_ASSERT(! remote_ref);  // Only for local futures\n            World::await([this] () -> bool { return this->probe(); }, dowork);\n            return *const_cast<T*>(&t);\n        }\n\n\n        /// Gets/forces the value, waiting if necessary.\n\n        /// \\param dowork If true (default) and the future is not ready\n        /// this thread will execute other tasks while waiting\n        /// \\warning PaRSEC backend does not support `dowork=true`\n        /// from a callstack containing a running MADNESS task already,\n        /// hence must use `dowork=false` when need to call from within a task\n        /// \\return reference to the contained value\n        /// \\pre `this->is_local()`\n        const T& get(bool dowork = true) const {\n            MADNESS_ASSERT(! remote_ref);  // Only for local futures\n            World::await([this] () -> bool { return this->probe(); }, dowork);\n            return *const_cast<const T*>(&t);\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Description needed.\n        /// \\return Description needed.\n        bool is_local() const {\n            return ! remote_ref;\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Is this function needed?\n        /// \\todo Details needed.\n        /// \\param f Description needed.\n        /// \\return Description needed.\n        bool replace_with(FutureImpl<T>* f) {\n            MADNESS_EXCEPTION(\"IS THIS WORKING? maybe now we have the mutex\", 0);\n//            ScopedMutex<Spinlock> fred(this);\n//             MADNESS_ASSERT(!world); // was return false;\n//             MADNESS_ASSERT(!assigned || f->assigned);\n//             if (f->world) {\n//                 world = f->world;\n//                 remote_ref = f->remote_ref;\n//                 f->world = 0;\n//             }\n//             while(f->callbacks.size()) callbacks.push(f->callbacks.pop());\n//             while(f->assignments.size()) assignments.push(f->assignments.pop());\n            return true;\n        }\n\n        /// Destructor.\n\n        /// \\todo Perhaps a comment about its behavior.\n        virtual ~FutureImpl() {\n            if (const_cast<callbackT&>(callbacks).size()) {\n                print(\"Future: uninvoked callbacks being destroyed?\", assigned);\n                abort();\n            }\n            if (const_cast<assignmentT&>(assignments).size()) {\n                print(\"Future: uninvoked assignment being destroyed?\", assigned);\n                abort();\n            }\n        }\n    }; // class FutureImpl\n\n\n    /// A future is a possibly yet unevaluated value.\n\n    /// Uses delegation to \\c FutureImpl to provide desired copy/assignment\n    /// semantics, as well as safe reference counting for remote futures.\n    ///\n    /// Since we are using futures a lot to store local values coming\n    /// from containers and inside task wrappers for messages, we\n    /// included in this class a value. If a future is assigned\n    /// before a copy/remote-reference is taken, the shared pointer is\n    /// never made. The point of this is to eliminate the two `malloc`s\n    /// that must be performed for every new \\c shared_ptr.\n    /// \\tparam T The type of future.\n    /// \\todo Can this detailed description be made clearer?\n    template <typename T>\n    class Future {\n\n        friend std::ostream& operator<< <T>(std::ostream& out, const Future<T>& f);\n\n    private:\n\n        /// Pointer to the implementation object.\n        std::shared_ptr< FutureImpl<T> > f;\n        char buffer[sizeof(T)]; ///< Buffer to hold a single \\c T object.\n        T* const value; ///< Pointer to buffer when it holds a \\c T object.\n\n        /// \\todo Has something to do with the \"Gotchas\" section in \\ref futures. More detail needed.\n\n        /// \\todo Perhaps more detail here, too... At the very least, can we give it a better name?\n        class dddd {};\n\n\n        /// \\todo Constructor for ...\n\n        /// \\todo Description needed.\n        /// \\param[in] blah Description needed.\n        explicit Future(const dddd& blah) : f(), value(nullptr) { }\n\n    public:\n        /// \\todo Brief description needed.\n        typedef RemoteReference< FutureImpl<T> > remote_refT;\n\n        /// Makes an unassigned future.\n        Future() :\n            f(new FutureImpl<T>()), value(nullptr)\n        {\n        }\n\n        /// Makes an assigned future.\n\n        /// \\todo Description needed.\n        /// \\param[in] t Description needed.\n        explicit Future(const T& t) :\n            f(), value(new(static_cast<void*>(buffer)) T(t))\n        {\n        }\n\n\n        /// Makes a future wrapping a remote reference.\n\n        /// \\param[in] remote_ref The remote reference.\n        explicit Future(const remote_refT& remote_ref) :\n                f(remote_ref.is_local() ?\n                        remote_ref.get_shared() :\n                        std::make_shared<FutureImpl<T> >(remote_ref)),\n                //                        std::shared_ptr<FutureImpl<T> >(new FutureImpl<T>(remote_ref))),\n                value(nullptr)\n        {\n        }\n\n\n        /// Makes an assigned future from an input archive.\n\n        /// \\param[in] input_arch The input archive.\n        explicit Future(const archive::BufferInputArchive& input_arch) :\n            f(), value(new(static_cast<void*>(buffer)) T())\n        {\n            input_arch & (*value);\n        }\n\n\n        /// Shallow copy constructor.\n\n        /// \\param[in] other The future to copy.\n        Future(const Future<T>& other) :\n            f(other.f),\n            value(other.value ?\n                new(static_cast<void*>(buffer)) T(* other.value) :\n                nullptr)\n        {\n            if(other.is_default_initialized())\n                f.reset(new FutureImpl<T>()); // Other was default constructed so make a new f\n        }\n\n        /// Destructor.\n        ~Future() {\n            if(value)\n                value->~T();\n        }\n\n\n        /// \\todo Informative description needed.\n\n        /// See \"Gotchas\" on \\ref futures about why this exists and how to use it.\n        static const Future<T> default_initializer() {\n            return Future<T>(dddd());\n        }\n\n        /// Check if the future is default initialized.\n\n        /// \\return True if this future was constructed with\n        ///     \\c default_initializer(); false otherwise.\n        bool is_default_initialized() const {\n            return ! (f || value);\n        }\n\n\n        /// Shallow assignment operator.\n\n        /// \\param[in] other The future to copy.\n        /// \\return This.\n        Future<T>& operator=(const Future<T>& other) {\n            if(this != &other) {\n                MADNESS_ASSERT(!probe());\n                if(f && other.value)\n                    set(other);\n                else\n                    f = other.f;\n            }\n            return *this;\n        }\n\n\n        /// \\brief `A.set(B)`, where `A` and `B` are futures ensures `A`\n        ///     has/will have the same value as `B`.\n\n        /// An exception is thrown if `A` is already assigned since a\n        /// \\c Future is a single assignment variable. We don't yet\n        /// track multiple assignments from unassigned futures.\n        ///\n        /// If `B` is already assigned, this is the same as `A.set(B.get())`,\n        /// which sets `A` to the value of `B`.\n        ///\n        /// If `B` has not yet been assigned, the behavior is to ensure\n        /// that, when `B` is assigned, both `A` and `B` will be assigned\n        /// and have the same value (though they may/may not refer to\n        /// the same underlying copy of the data and indeed may even\n        /// be in different processes).\n        /// \\todo Verification needed in the param statement.\n        /// \\param[in] other The future `B` described above. `*this` is `A`.\n        void set(const Future<T>& other) {\n            MADNESS_ASSERT(f);\n            if(f != other.f) {\n                MADNESS_ASSERT(! f->probe());\n                if (other.probe()) {\n                    set(other.get());     // The easy case\n                } else {\n                    // Assignment is supposed to happen just once so\n                    // safe to assume that this is not being messed\n                    // with ... also other might invoke the assignment\n                    // callback since it could have been assigned\n                    // between the test above and now (and this does\n                    // happen)\n                    std::shared_ptr< FutureImpl<T> > ff = f; // manage lifetime of me\n                    std::shared_ptr< FutureImpl<T> > of = other.f; // manage lifetime of other\n\n                    { // BEGIN CRITICAL SECTION\n                        ScopedMutex<Spinlock> fred(of.get());\n                        of->add_to_assignments(ff); // Recheck of assigned is performed in here\n                    } // END CRITICAL SECTION\n                }\n            }\n        }\n\n\n        /// Assigns the value.\n\n        /// The value can only be set \\em once.\n        /// \\param[in] value The value to be assigned.\n        inline void set(const T& value) {\n            MADNESS_CHECK(f);\n            std::shared_ptr< FutureImpl<T> > ff = f; // manage lifetime of f\n            ff->set(value);\n        }\n\n        /// Assigns the value.\n\n        /// The value can only be set \\em once.\n        /// \\param[in] value The value to be assigned.\n        inline void set(T&& value) {\n            MADNESS_CHECK(f);\n            std::shared_ptr< FutureImpl<T> > ff = f; // manage lifetime of f\n            ff->set(std::move(value));\n        }\n\n        /// Assigns the value.\n\n        /// The value can only be set \\em once.\n        /// \\todo Description needed.\n        /// \\param[in] input_arch Description needed.\n        inline void set(const archive::BufferInputArchive& input_arch) {\n            MADNESS_CHECK(f);\n            std::shared_ptr< FutureImpl<T> > ff = f; // manage lifetime of f\n            ff->set(input_arch);\n        }\n\n\n        /// Gets the value, waiting if necessary.\n\n        /// \\param dowork If true (default) and the future is not ready\n        /// this thread will execute other tasks while waiting\n        /// \\warning PaRSEC backend does not support `dowork=true`\n        /// from a callstack containing a running MADNESS task already,\n        /// hence must use `dowork=false` when need to call from within a task\n        /// \\return reference to the contained value\n        /// \\pre `this->is_local()`\n        inline T& get(bool dowork = true) & {\n            MADNESS_CHECK(this->is_local());\n            return (f ? f->get(dowork) : *value);\n        }\n\n        /// Gets the value, waiting if necessary.\n\n        /// \\param dowork If true (default) and the future is not ready\n        /// this thread will execute other tasks while waiting\n        /// \\warning PaRSEC backend does not support `dowork=true`\n        /// from a callstack containing a running MADNESS task already,\n        /// hence must use `dowork=false` when need to call from within a task\n        /// \\return reference to the contained value\n        /// \\pre `this->is_local()`\n        inline const T& get(bool dowork = true) const & {\n            MADNESS_CHECK(this->is_local());\n            return (f ? f->get(dowork) : *value);\n        }\n\n        /// Gets the value, waiting if necessary.\n\n        /// \\param dowork If true (default) and the future is not ready\n        /// this thread will execute other tasks while waiting\n        /// \\warning PaRSEC backend does not support `dowork=true`\n        /// from a callstack containing a running MADNESS task already,\n        /// hence must use `dowork=false` when need to call from within a task\n        /// \\return the contained value\n        /// \\pre `this->is_local()`\n        inline T get(bool dowork = true) && {\n            // According to explanation here\n            // https://stackoverflow.com/questions/4986673/c11-rvalues-and-move-semantics-confusion-return-statement\n            // should not return && since that will still be a ref to\n            // local value.  Also, does not seem as if reference\n            // lifetime extension applies (see https://abseil.io/tips/107)\n            MADNESS_CHECK(this->is_local());\n            if (f) {\n                // N.B. it is only safe to move the data out if f is the owner (i.e. it is the sole ref)\n                // it's not clear how to safely detect ownership beyond the obvious cases (see https://stackoverflow.com/questions/41142315/why-is-stdshared-ptrunique-deprecated)\n                // e.g. in the common case f is set by a task, hence its refcount is 2 until the task has completed *and* been destroyed\n                // so will tread lightly here ... don't move unless safe\n                auto &value_ref = f->get(dowork);\n                // if the task setting f is gone *and* this is the only ref, move out\n                // to prevent a race with another thread that will make a copy of this Future while we are moving the data\n                // atomically swap f with nullptr, then check use count of f's copy\n                auto fcopy = std::atomic_exchange(&f, {});  // N.B. deprecated in C++20! need to convert f to std::atomic<std::shared_ptr<FutureImpl>>\n                // f is now null and no new ref to the value can be created\n                if (fcopy.use_count() == 1)\n                    return std::move(value_ref);\n                else\n                    return value_ref;\n            } else\n                return std::move(*value);\n        }\n\n        /// Check whether this future has been assigned.\n\n        /// \\return True if the future has been assigned; false otherwise.\n        inline bool probe() const {\n            return (f ? f->probe() : bool(value));\n        }\n\n        /// Same as \\c get()&.\n\n        /// \\return An lvalue reference to the value.\n        inline operator T&() & { // Must return & since taskfn uses it in argument holder\n            return static_cast<Future&>(*this).get();\n        }\n\n        /// Same as `get() const&`.\n\n        /// \\return A const lvalue reference to the value.\n        inline operator const T&() const& { // Must return & since taskfn uses it in argument holder\n            return static_cast<const Future&>(*this).get();\n        }\n\n        /// An rvalue analog of \\c get().\n\n        /// \\return An rvalue reference to the value. \n        inline operator T() && {\n            return static_cast<Future&&>(*this).get();\n        }\n\n        /// Returns a structure used to pass references to another process.\n\n        /// This is used for passing pointers/references to another\n        /// process. To make remote references completely safe, the\n        /// \\c RemoteReference increments the internal reference count of\n        /// the \\c Future. The counter is decremented by either\n        /// assigning to the remote \\c Future or its destructor if it is\n        /// never assigned. The remote \\c Future is \\em only useful for\n        /// setting the future. It will \\em not be notified if the value\n        /// is set elsewhere.\n        ///\n        /// If this is already a reference to a remote future, the\n        /// actual remote reference is returned; that is, \\em not a\n        /// a reference to the local future. Therefore, the local\n        /// future will not be notified when the result is set\n        /// (i.e., the communication is short circuited).\n        /// \\param[in,out] world The communication world.\n        /// \\todo Verify the return comment.\n        /// \\return The remote reference.\n        inline remote_refT remote_ref(World& world) const {\n            MADNESS_ASSERT(!probe());\n            if (f->remote_ref)\n                return f->remote_ref;\n            else\n                return RemoteReference< FutureImpl<T> >(world, f);\n        }\n\n\n        /// Checks the future remoteness trait\n\n        /// \\return true if the future refers to an already available or\n        /// to-be-locally-produced result\n        inline bool is_local() const {\n            return (f && f->is_local()) || value;\n        }\n\n\n        /// Checks the future remoteness trait\n\n        /// \\return true if the future refers to another future on a another rank, i.e. it will be set when the\n        /// referred-to future is set\n        inline bool is_remote() const {\n            return !is_local();\n        }\n\n\n        /// Registers an object to be called when future is assigned.\n\n        /// Callbacks are invoked in the order registered. If the\n        /// future is already assigned, the callback is immediately\n        /// invoked.\n        /// \\param[in] callback The callback to be invoked.\n        inline void register_callback(CallbackInterface* callback) {\n            if(probe()) {\n                callback->notify();\n            } else {\n                MADNESS_ASSERT(f);\n                f->register_callback(callback);\n            }\n        }\n    }; // class Future\n\n\n    /// A future of a future is forbidden (by deleted constructor).\n\n    /// \\tparam T The type of future.\n    template <typename T>\n    class Future< Future<T> > {\n        Future() = delete;\n    };\n\n\n    /// \\brief Specialization of \\c FutureImpl<void> for internal convenience.\n    ///     This does nothing useful!\n    template <>\n    class FutureImpl<void> {};\n\n    /// \\brief Specialization of \\c Future<void> for internal convenience.\n    ///     This does nothing useful!\n    template <> class\n    Future<void> {\n    public:\n        /// \\todo Brief description needed.\n        typedef RemoteReference< FutureImpl<void> > remote_refT;\n\n        /// \\todo Brief description needed.\n        static const Future<void> value;\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in,out] world Description needed.\n        /// \\return Description needed.\n        static remote_refT remote_ref(World& world) {\n            return remote_refT();\n        }\n\n        Future() {}\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Description needed.\n        /// \\param[in] remote_ref Description needed.\n        Future(const RemoteReference< FutureImpl<void> >& remote_ref) {}\n\n\n        /// Construct from an input archive.\n\n        /// \\param[in] input_arch The input archive.\n        Future(const archive::BufferInputArchive& input_arch) {\n            input_arch & *this;\n        }\n\n\n        /// Assignment operator.\n\n        /// \\param[in] other The future to copy.\n        /// \\return This.\n        inline Future<void>& operator=(const Future<void>& other) {\n            return *this;\n        }\n\n        /// Set the future from another \\c void future.\n\n        /// In this specialization, do nothing.\n        /// \\param[in] f The other future.\n        static void set(const Future<void>& f) { }\n\n\n        /// Set the future.\n\n        /// In this specialization, do nothing.\n        static void set() { }\n\n\n        /// Check if this future has been assigned.\n\n        /// \\return True (in this specialization).\n        static bool probe() {\n            return true;\n        }\n\n    }; // class Future<void>\n\n\n    /// Specialization of \\c Future for a vector of `Future`s.\n\n    /// Enables passing a vector of futures into a task and having the\n    /// dependencies correctly tracked. Does not directly support most\n    /// operations that other futures do; these are the responsibility of the\n    /// individual futures in the vector.\n    /// \\tparam T The type of future.\n    template <typename T>\n    class Future< std::vector< Future<T> > > : public DependencyInterface, private NO_DEFAULTS {\n    private:\n        /// Alias for a vector of futures.\n        typedef typename std::vector< Future<T> > vectorT;\n\n        /// The vector of futures.\n        vectorT v;\n\n    public:\n        Future() : v() { }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Description needed.\n        /// \\param[in] v Vector of something...\n        Future(const vectorT& v) : DependencyInterface(v.size()), v(v) {\n            for (int i=0; i<(int)v.size(); ++i) {\n                this->v[i].register_callback(this);\n            }\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Description needed.\n        /// \\param[in] input_arch Description needed.\n        ///\n        /// \\todo Not implemented. If this is deliberate, specify why and change the tag to \\\\attention.\n        explicit Future(const archive::BufferInputArchive& input_arch) {\n            input_arch & v;\n        }\n\n\n        /// Access the vector of futures.\n\n        /// \\return The vector of futures.\n        vectorT& get() {\n            return v;\n        }\n\n\n        /// Access the const vector of futures.\n\n        /// \\return The vector of futures.\n        const vectorT& get() const {\n            return v;\n        }\n\n\n        /// Access the vector of futures.\n\n        /// \\return The vector of futures.\n        operator vectorT& () {\n            return get();\n        }\n\n\n        /// Access the const vector of futures.\n\n        /// \\return The vector of futures.\n        operator const vectorT& () const {\n            return get();\n        }\n\n\n        /// Check if all of the futures in the vector have been assigned.\n\n        /// \\return True if all futures have been assigned; false otherwise.\n        bool probe() const {\n            return DependencyInterface::probe();\n        }\n\n    }; // class Future< std::vector< Future<T> > >\n\n\n    /// Factory for a vectors of futures.\n\n    /// Rationale for this function can be found in \\ref futures.\n    /// \\tparam T The type of future in the vector.\n    /// \\param[in] n The size of the vector to create.\n    /// \\return A vector of futures, as described in \\ref futures.\n    template <typename T>\n    std::vector< Future<T> > future_vector_factory(std::size_t n) {\n        return std::vector< Future<T> >(n, Future<T>::default_initializer());\n    }\n\n\n    namespace archive {\n\n        /// Serialize an assigned future.\n\n        /// \\tparam Archive Archive type.\n        /// \\tparam T Future type.\n        template <class Archive, typename T>\n        struct ArchiveStoreImpl< Archive, Future<T>, std::enable_if_t<!std::is_void_v<T>> > {\n\n            /// Store the assigned future in an archive.\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[in] f The future.\n            template <typename U = T, typename A = Archive>\n            static inline\n                std::enable_if_t<is_serializable_v<A, U>,void>\n                store(const Archive& ar, const Future<T>& f) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"serializing future\" << std::endl);\n                MADNESS_ASSERT(f.probe());\n                ar & f.get();\n            }\n        };\n\n\n        /// Deserialize a future into an unassigned future.\n\n        /// \\tparam Archive Archive type.\n        /// \\tparam T Future type.\n        template <class Archive, typename T>\n        struct ArchiveLoadImpl< Archive, Future<T>, std::enable_if_t<!std::is_void_v<T>> > {\n\n            /// Read into an unassigned future.\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[out] f The future.\n            template <typename U = T, typename A = Archive>\n            static inline\n                std::enable_if_t<is_serializable_v<A, U>,void> load(const Archive& ar, Future<T>& f) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"deserializing future\" << std::endl);\n                MADNESS_ASSERT(!f.probe());\n                T value;\n                ar & value;\n                f.set(value);\n            }\n        };\n\n\n        /// Serialize an assigned future (\\c void specialization).\n\n        /// \\tparam Archive Archive type.\n        template <class Archive>\n        struct ArchiveStoreImpl< Archive, Future<void> > {\n\n            /// Store the assigned \\c void future in the archive (do nothing).\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[in] f The \\c void future.\n            static inline void store(const Archive& ar, const Future<void>& f)\n            { }\n        };\n\n\n        /// Deserialize a future into an unassigned future (\\c void specialization).\n\n        /// \\tparam Archive Archive type.\n        template <class Archive>\n        struct ArchiveLoadImpl< Archive, Future<void> > {\n\n            /// Read into an unassigned \\c void future.\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[out] f The \\c void future.\n            static inline void load(const Archive& ar, const Future<void>& f)\n            { }\n        };\n\n        /// Serialize a vector of assigned futures.\n\n        /// \\tparam Archive Archive type.\n        /// \\tparam T Future type.\n        template <class Archive, typename T>\n        struct ArchiveStoreImpl< Archive, std::vector<Future<T> > > {\n\n            /// Store the vector of assigned futures in the archive.\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[in] v The vector of futures.\n            static inline void store(const Archive& ar, const std::vector<Future<T> >& v) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"serializing vector of futures\" << std::endl);\n                ar & v.size();\n                for(typename std::vector<Future<T> >::const_iterator it = v.begin(); it != v.end(); ++it) {\n                    MADNESS_ASSERT(it->probe());\n                    ar & it->get();\n                }\n            }\n        };\n\n\n        /// Deserialize a vector of futures into a vector of unassigned futures.\n\n        /// \\tparam Archive Archive type.\n        /// \\tparam T Future type.\n        template <class Archive, typename T>\n        struct ArchiveLoadImpl< Archive, std::vector<Future<T> > > {\n\n            /// Read into a vector of unassigned futures.\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[out] v The vector of futures.\n            static inline void load(const Archive& ar, std::vector<Future<T> >& v) {\n                MAD_ARCHIVE_DEBUG(std::cout << \"deserializing vector of futures\" << std::endl);\n                std::size_t n = 0;\n                ar & n;\n                if(v.size() < n)\n                    v.reserve(n);\n                if(v.size() > n)\n                    v.resize(n);\n                for(typename std::vector<Future<T> >::iterator it = v.begin(); it < v.end(); ++it, --n) {\n                    MADNESS_ASSERT(! it->probe());\n                    it->set(ar);\n                }\n                for(; n != 0; --n)\n                    v.push_back(Future<T>(ar));\n            }\n        };\n    } // namespace archive\n\n\n    // Friendly I/O to streams for futures\n\n    /// Stream output operator for a future.\n\n    /// \\tparam T The type of future.\n    /// \\param[in,out] out The output stream.\n    /// \\param[in] f The future.\n    /// \\return The output stream.\n    template <typename T>\n    std::ostream& operator<<(std::ostream& out, const Future<T>& f);\n\n\n    /// Stream output operator for a \\c void future.\n\n    /// \\param[in,out] out The output stream.\n    /// \\param[in] f The future.\n    /// \\return The output stream.\n    template <>\n    std::ostream& operator<<(std::ostream& out, const Future<void>& f);\n\n\n    /// \\todo Brief description needed.\n\n    /// \\todo Descriptions needed.\n    /// \\tparam T Description needed.\n    /// \\param[in,out] The output stream.\n    /// \\param[in] f The future to be output.\n    /// \\return The output stream.\n    template <typename T>\n    inline std::ostream& operator<<(std::ostream& out, const Future<T>& f) {\n        if (f.probe()) {\n          if constexpr (is_ostreammable_v<T>) {\n            out << f.get();\n          }\n        }\n        else if (f.is_remote()) out << f.f->remote_ref;\n        else if (f.f) out << \"<unassigned refcnt=\" << f.f.use_count() << \">\";\n        else out << \"<unassigned>\";\n        return out;\n    }\n\n} // namespace madness\n\n/// @}\n\n#endif // MADNESS_WORLD_FUTURE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/graveyard",
    "content": "    // Junk below due to void should be factored out by using the Void\n    // class recently introduced in typestuff.h as was done already in\n    // world_object.h.\n\n    // Internal: This silliness since cannot use a void expression as a void argument\n    template <typename resultT>\n    struct TaskFunctionRun {\n        template <typename functionT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T, typename a7T>\n        static inline void run(Future<resultT>& result, functionT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6, a7T& a7) {\n            result.set(func(a1,a2,a3,a4,a5,a6,a7));\n        }\n\n        template <typename functionT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T>\n        static inline void run(Future<resultT>& result, functionT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6) {\n            result.set(func(a1,a2,a3,a4,a5,a6));\n        }\n\n        template <typename functionT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T>\n        static inline void run(Future<resultT>& result, functionT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5) {\n            result.set(func(a1,a2,a3,a4,a5));\n        }\n\n        template <typename functionT, typename a1T, typename a2T, typename a3T, typename a4T>\n        static inline void run(Future<resultT>& result, functionT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4) {\n            result.set(func(a1,a2,a3,a4));\n        }\n\n        template <typename functionT, typename a1T, typename a2T, typename a3T>\n        static inline void run(Future<resultT>& result, functionT func, a1T& a1, a2T& a2, a3T& a3) {\n            result.set(func(a1,a2,a3));\n        }\n\n        template <typename functionT, typename a1T, typename a2T>\n        static inline void run(Future<resultT>& result, functionT func, a1T& a1, a2T& a2) {\n            result.set(func(a1,a2));\n        }\n\n        template <typename functionT, typename a1T>\n        static inline void run(Future<resultT>& result, functionT func, a1T& a1) {\n            result.set(func(a1));\n        }\n\n        template <typename functionT>\n        static inline void run(Future<resultT>& result, functionT func) {\n            result.set(func());\n        }\n\n    };\n\n    // Internal: This silliness since cannot use a void expression as a void argument\n    template <>\n    struct TaskFunctionRun<void> {\n        template <typename functionT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T, typename a7T>\n        static inline void run(Future<void>& result, functionT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6, a7T& a7) {\n            func(a1,a2,a3,a4,a5,a6,a7);\n        }\n\n        template <typename functionT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T>\n        static inline void run(Future<void>& result, functionT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6) {\n            func(a1,a2,a3,a4,a5,a6);\n        }\n\n        template <typename functionT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T>\n        static inline void run(Future<void>& result, functionT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5) {\n            func(a1,a2,a3,a4,a5);\n        }\n\n        template <typename functionT, typename a1T, typename a2T, typename a3T, typename a4T>\n        static inline void run(Future<void>& result, functionT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4) {\n            func(a1,a2,a3,a4);\n        }\n\n        template <typename functionT, typename a1T, typename a2T, typename a3T>\n        static inline void run(Future<void>& result, functionT func, a1T& a1, a2T& a2, a3T& a3) {\n            func(a1,a2,a3);\n        }\n\n        template <typename functionT, typename a1T, typename a2T>\n        static inline void run(Future<void>& result, functionT func, a1T& a1, a2T& a2) {\n            func(a1,a2);\n        }\n\n        template <typename functionT, typename a1T>\n        static inline void run(Future<void>& result, functionT func, a1T& a1) {\n            func(a1);\n        }\n\n        template <typename functionT>\n        static inline void run(Future<void>& result, functionT func) {\n            func();\n        }\n    };\n\n\n    // This silliness since cannot use a void expression as a void argument\n    template <typename resultT>\n    struct TaskMemfunRun {\n        template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T, typename a7T>\n        static inline void run(Future<resultT>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6, a7T& a7) {\n            result.set((obj.*func)(a1,a2,a3,a4,a5,a6,a7));\n        }\n\n        template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T>\n        static inline void run(Future<resultT>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6) {\n            result.set((obj.*func)(a1,a2,a3,a4,a5,a6));\n        }\n\n        template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T>\n        static inline void run(Future<resultT>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5) {\n            result.set((obj.*func)(a1,a2,a3,a4,a5));\n        }\n\n        template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T>\n        static inline void run(Future<resultT>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4) {\n            result.set((obj.*func)(a1,a2,a3,a4));\n        }\n\n        template <typename memfunT, typename a1T, typename a2T, typename a3T>\n        static inline void run(Future<resultT>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2, a3T& a3) {\n            result.set((obj.*func)(a1,a2,a3));\n        }\n\n        template <typename memfunT, typename a1T, typename a2T>\n        static inline void run(Future<resultT>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2) {\n            result.set((obj.*func)(a1,a2));\n        }\n\n        template <typename memfunT, typename a1T>\n        static inline void run(Future<resultT>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1) {\n            result.set((obj.*func)(a1));\n        }\n\n        template <typename memfunT>\n        static inline void run(Future<resultT>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func) {\n            result.set((obj.*func)());\n        }\n    };\n\n\n    // This silliness since cannot use a void expression as a void argument\n    template <>\n    struct TaskMemfunRun<void> {\n        template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T, typename a7T>\n        static inline void run(Future<void>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6, a7T& a7) {\n            (obj.*func)(a1,a2,a3,a4,a5,a6,a7);\n        }\n\n        template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T>\n        static inline void run(Future<void>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6) {\n            (obj.*func)(a1,a2,a3,a4,a5,a6);\n        }\n\n        template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T>\n        static inline void run(Future<void>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5) {\n            (obj.*func)(a1,a2,a3,a4,a5);\n        }\n\n        template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T>\n        static inline void run(Future<void>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4) {\n            (obj.*func)(a1,a2,a3,a4);\n        }\n\n        template <typename memfunT, typename a1T, typename a2T, typename a3T>\n        static inline void run(Future<void>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2, a3T& a3) {\n            (obj.*func)(a1,a2,a3);\n        }\n\n        template <typename memfunT, typename a1T, typename a2T>\n        static inline void run(Future<void>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1, a2T& a2) {\n            (obj.*func)(a1,a2);\n        }\n\n        template <typename memfunT, typename a1T>\n        static inline void run(Future<void>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func, a1T& a1) {\n            (obj.*func)(a1);\n        }\n\n        template <typename memfunT>\n        static inline void run(Future<void>& result, MEMFUN_OBJT(memfunT)& obj, \n                               memfunT func) {\n            (obj.*func)();\n        }\n    };\n\n\n\n\n\n        // This silliness since cannot use a void expression as a void argument or return value\n        template <typename returnT>\n        struct MemfunRun {\n            template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T, typename a7T>\n            static inline returnT run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6, a7T& a7) {\n                return (obj.*func)(a1,a2,a3,a4,a5,a6,a7);\n            }\n            \n            template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T>\n            static inline returnT run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6) {\n                return (obj.*func)(a1,a2,a3,a4,a5,a6);\n            }\n            \n            template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T>\n            static inline returnT run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5) {\n                return (obj.*func)(a1,a2,a3,a4,a5);\n            }\n            \n            template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T>\n            static inline returnT run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4) {\n                return (obj.*func)(a1,a2,a3,a4);\n            }\n            \n            template <typename memfunT, typename a1T, typename a2T, typename a3T>\n            static inline returnT run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2, a3T& a3) {\n                return (obj.*func)(a1,a2,a3);\n            }\n            \n            template <typename memfunT, typename a1T, typename a2T>\n            static inline returnT run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2) {\n                return (obj.*func)(a1,a2);\n            }\n            \n            template <typename memfunT, typename a1T>\n            static inline returnT run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1) {\n                return (obj.*func)(a1);\n            }\n            \n            template <typename memfunT>\n            static inline returnT run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func) {\n                return (obj.*func)();\n            }\n        };\n        \n        // This silliness since cannot use a void expression as a void argument or return value\n        template <>\n        struct MemfunRun<void> {\n            template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T, typename a7T>\n            static inline Void run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6, a7T& a7) {\n                (obj.*func)(a1,a2,a3,a4,a5,a6,a7);\n                return Void();\n            }\n            \n            template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T, typename a6T>\n            static inline Void run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6) {\n                (obj.*func)(a1,a2,a3,a4,a5,a6);\n                return Void();\n            }\n            \n            template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T, typename a5T>\n            static inline Void run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5) {\n                (obj.*func)(a1,a2,a3,a4,a5);\n                return Void();\n            }\n            \n            template <typename memfunT, typename a1T, typename a2T, typename a3T, typename a4T>\n            static inline Void run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2, a3T& a3, a4T& a4) {\n                (obj.*func)(a1,a2,a3,a4);\n                return Void();\n            }\n            \n            template <typename memfunT, typename a1T, typename a2T, typename a3T>\n            static inline Void run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2, a3T& a3) {\n                (obj.*func)(a1,a2,a3);\n                return Void();\n            }\n            \n            template <typename memfunT, typename a1T, typename a2T>\n            static inline Void run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1, a2T& a2) {\n                (obj.*func)(a1,a2);\n                return Void();\n            }\n            \n            template <typename memfunT, typename a1T>\n            static inline Void run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func, a1T& a1) {\n                (obj.*func)(a1);\n                return Void();\n            }\n            \n            template <typename memfunT>\n            static inline Void run(MEMFUN_OBJT(memfunT)& obj, \n                                   memfunT func) {\n                (obj.*func)();\n                return Void();\n            }\n        };\n\n\n\n        // Forwards call to derived class\n        template <typename memfunT>\n        static MEMFUN_RETURNT(memfunT)\n        forward(objT* obj, memfunT memfun) {\n            return ((static_cast<Derived*>(obj)->*memfun)());\n        }\n\n        // Forwards call to derived class\n        template <typename memfunT, typename arg1T>\n        static MEMFUN_RETURNT(memfunT)\n        forward(objT* obj, memfunT memfun,  const arg1T& arg1) {\n            return ((static_cast<Derived*>(obj)->*memfun)(arg1));\n        }\n\n        // Forwards call to derived class\n        template <typename memfunT, typename arg1T, typename arg2T>\n        static MEMFUN_RETURNT(memfunT)\n            forward(objT* obj, memfunT memfun,  const arg1T& arg1, const arg2T& arg2) {\n            return ((static_cast<Derived*>(obj)->*memfun)(arg1,arg2));\n        }\n\n        // Forwards call to derived class\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T>\n        static MEMFUN_RETURNT(memfunT)\n            forward(objT* obj, memfunT memfun, const arg1T& arg1, const arg2T& arg2, const arg3T& arg3) {\n            return ((static_cast<Derived*>(obj)->*memfun)(arg1,arg2,arg3));\n        }\n\n        // Forwards call to derived class\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T>\n        static MEMFUN_RETURNT(memfunT)\n            forward(objT* obj, memfunT memfun,  const arg1T& arg1, const arg2T& arg2, const arg3T& arg3, const arg4T& arg4) {\n            return ((static_cast<Derived*>(obj)->*memfun)(arg1,arg2,arg3,arg4));\n        }\n\n        // Forwards call to derived class\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T>\n        static MEMFUN_RETURNT(memfunT)\n            forward(objT* obj, memfunT memfun,  const arg1T& arg1, const arg2T& arg2, const arg3T& arg3, const arg4T& arg4, const arg5T& arg5) {\n            return ((static_cast<Derived*>(obj)->*memfun)(arg1,arg2,arg3,arg4,arg5));\n        }\n\n\n\n\n\n        /// Synchronizes all processes in communicator AND globally ensures no pending AM or tasks\n        \n        /// Runs Dykstra-like termination algorithm on binary tree by\n        /// summing (nsent-nrecv) over all proceses, applying\n        /// local fence before computing local sum.  If the global sum\n        /// is zero, and no more messages have been received then we are\n        /// then we are sure that all tasks and AM are processed\n        /// and there no AM in flight.\n        ///\n        /// By default fences both tasks and AM.  If the optional argument amonly is\n        /// set to true, if fences only the AM.\n        void fence(bool amonly = false) {\n            long nsent, nrecv, sum;\n            MPI::Request req0, req1;\n            ProcessID parent, child0, child1;\n            mpi.binary_tree_info(0, parent, child0, child1);\n            do {\n                long sum0=0, sum1=0;\n                if (child0 != -1) req0 = mpi.Irecv(&sum0, sizeof(sum0), MPI::BYTE, child0, gfence_tag);\n                if (child1 != -1) req1 = mpi.Irecv(&sum1, sizeof(sum1), MPI::BYTE, child1, gfence_tag);\n                if (child0 != -1) World::await(req0);\n                if (child1 != -1) World::await(req1);\n                \n                if (amonly)\n                    am.fence();\n                else\n                    taskq.fence();\n\n                nsent = am.nsent;\n                nrecv = am.nrecv;\n                sum = sum0 + sum1 + nsent - nrecv;\n                \n                if (parent != -1) {\n                    req0 = mpi.Isend(&sum, sizeof(sum), MPI::BYTE, parent, gfence_tag);\n                    World::await(req0);\n                }\n                \n                broadcast(sum);\n//                if (debug) {\n//                    print(rank,\"fence:\",sum0,sum1,sum);\n//                    usleep(1000000);\n//                }\n            } while (sum);\n\n            // If deferred cleanup occured we need another fence, but\n            // it will be much cheaper the second time since everyone\n            // is already synchronized.\n            //\n            // Uh?  Why do we need another fence?  Commented this out\n            // until I can reconvince myself it really is necessary.\n            //if (world.do_deferred_cleanup()) fence(amonly);\n            world.do_deferred_cleanup();\n        };\n        \n\n\n\n        /// Private: Finds/waits for a free send request\n        inline int get_free_send_request() {\n            // Testany() might be really slow.  It may be better to\n            // keep track of free handles ourselves and only call\n            // testany when full.  On the other hand, calling test\n            // could be necessary to make progress.\n\n            // IS THIS ACTUALLY WORKING??????????\n            // Susepect testany is always returning either UNDEFINED or 0.  \n\n            int i;\n            while (!MPI::Request::Testany(NSEND, send_handle, i)) {\n                // Must call poll here to avoid livelock with two\n                // processes trying to talk to each other when both\n                // are out of recv buffers.  However, don't need to\n                // poll in other worlds or run tasks.\n                poll();\n            }\n            if (i == MPI::UNDEFINED) i = 0;\n            //if (i != 0) print(\"i is non-zero\",i);\n            free_managed_send_buf(i);\n            return i;\n        };\n\n\n\n\n\n\n//         /// Send array of lenbuf elements to process dest \n//         template <class T>\n//             void Send(const T* buf, long lenbuf, ProcessID dest, Tag tag) const {\n//             Send((void* )buf, lenbuf*sizeof(T), MPI::BYTE, dest, tag);\n//         }\n        \n//         /// Send element to process dest with default tag=1\n        \n//         /// Disabled for pointers to reduce accidental misuse.\n//         template <class T>\n//         typename std::enable_if< !is_pointer<T>::value, void>::type\n//         Send(const T& datum, ProcessID dest, Tag tag=1) const {\n//             Send((void* )&datum, sizeof(T), MPI::BYTE, dest, tag);\n//         }\n        \n//         /// Same as MPI::Intracomm::Recv with status\n//         void Recv(void* buf, int count, const MPI::Datatype& datatype,\n//                          ProcessID source, Tag tag, MPI::Status& status) const {\n//             if (debug) madness::print(\"World:\",rank(),\"receiving\",count,\"bytes from\",source,\"with tag\",tag);\n//             Recv(buf,count,datatype,source,tag,status);\n//             if (debug) madness::print(\"World:\",rank(),\"received\");\n//         }\n        \n        \n//         /// Same as MPI::Intracomm::Recv\n//         void Recv(void* buf, int count, const MPI::Datatype& datatype,\n//                          ProcessID source, Tag tag) const {\n//             if (debug) madness::print(\"World:\",rank(),\"receiving\",count,\"bytes from\",source,\"with tag\",tag);\n//             Recv(buf,count,datatype,source,tag);\n//             if (debug) madness::print(\"World:\",rank(),\"received\");\n//         }\n        \n        \n//         /// Receive data of up to lenbuf elements from process dest\n//         template <class T>\n//             void\n//             Recv(T* buf, long lenbuf, ProcessID src, Tag tag) const {\n//             Recv(buf, lenbuf*sizeof(T), MPI::BYTE, src, tag);\n//         }\n        \n//         /// Receive data of up to lenbuf elements from process dest with status\n//         template <class T>\n//             void\n//             Recv(T* buf, long lenbuf, ProcessID src, Tag tag, MPI::Status& status) const {\n//             Recv(buf, lenbuf*sizeof(T), MPI::BYTE, src, tag, status);\n//         }\n        \n        \n//         /// Receive datum from process src with default tag=1\n//         template <class T>\n            \n//             typename std::enable_if< !is_pointer<T>::value, void>::type\n//             Recv(T& buf, ProcessID src, Tag tag=1) const {\n//             Recv(&buf, sizeof(T), MPI::BYTE, src, tag);\n//         }\n        \n\n\n\n        /// For each item in range if \\c predicate(iterator) is true submit task formed by \\c maketask(iterator) \n\n        /// The default predicate is true.\n        ///\n        /// To enable use when the tasks might modify the data structure referred to \n        /// by the iterators, the entire list of tasks is first formed and\n        /// then submitted en-masse.  \n        ///\n        /// To throttle the number of tasks we can add a maxtasks and submit \n        /// a continuation task to finish the submission, and/or add granularity control.\n        /// However, both assume that tasks can be completed in the order submitted\n        /// and should probably be via a separate interface.\n        /// This gets into the Intel TBB concepts of splitting ranges, etc.\n        template < typename iteratorT, typename maketaskT, typename predicateT >\n        void for_each(const iteratorT& begin, \n                      const iteratorT& end, \n                      const maketaskT& maketask, \n                      const predicateT& predicate=PredicateTrue<iteratorT>()) \n        {\n            std::vector<TaskInterface*> v;\n            for (iteratorT it=begin; it!=end; ++it) {\n                if (predicate(it)) v.push_back(maketask(it));\n            }\n            add(v);\n        };\n\n        template <typename T> \n        struct PredicateTrue {\n            bool operator()(const T& t) const {return true;}\n        };\n\n\n        void add(const std::vector<TaskInterface*>& v) \n        {\n            for (unsigned int i=0; i<v.size(); i++)\n                add(v[i]);\n        }\n\n\n\n\n    class MutexReaderWriter : NO_DEFAULTS {\n        mutable MADATOMIC_INT nreader;\n        mutable MADATOMIC_INT writeflag;\n    public:\n        static const int NOLOCK=0;\n        static const int READLOCK=1;\n        static const int WRITELOCK=2;\n\n        MutexReaderWriter() {\n            MADATOMIC_INT_SET(&nreader,0);\n            MADATOMIC_INT_SET(&writeflag,1L);\n        }\n\n        bool try_read_lock() const {\n            MADATOMIC_INT_INC(&nreader);\n            if (MADATOMIC_INT_GET(&writeflag) == 0) {\n                return true;\n            }\n            else {\n                MADATOMIC_INT_DEC(&nreader);\n                return false;\n            }\n        }\n        \n        bool try_write_lock() const {\n            if (MADATOMIC_INT_DEC_AND_TEST(&writeflag) && MADATOMIC_INT_GET(&nreader) == 0) {\n                return true;\n            }\n            else {\n                MADATOMIC_INT_INC(&writeflag);\n                return false;\n            }\n        }\n\n        bool try_lock(int lockmode) const {\n            if (lockmode == READLOCK) {\n                return try_read_lock();\n            }\n            else if (lockmode == WRITELOCK) {\n                return try_write_lock();\n            }\n            else if (lockmode == NOLOCK) {\n                return true;\n            }\n            else {\n                throw \"MutexReaderWriter: try_lock: invalid lock mode\";\n            }\n        }\n\n        bool try_convert_read_lock_to_write_lock() const {\n            if (MADATOMIC_INT_DEC_AND_TEST(&writeflag) && MADATOMIC_INT_GET(&nreader) == 1) {\n                MADATOMIC_INT_DEC(&nreader);\n                return true;\n            }\n            else {\n                MADATOMIC_INT_INC(&writeflag);\n                return false;\n            }\n        }\n\n        void read_lock() const {\n            MutexWaiter waiter;\n            while (!try_read_lock()) waiter.wait();\n        }\n\n        void write_lock() const {\n            MutexWaiter waiter;\n            while (!try_write_lock()) waiter.wait();\n        }\n\n        void lock(int lockmode) const {\n            MutexWaiter waiter;\n            while (!try_lock(lockmode)) waiter.wait();\n        }\n\n        void read_unlock() const {\n            MADATOMIC_INT_DEC(&nreader);\n        }\n\n        void write_unlock() const {\n            MADATOMIC_INT_INC(&writeflag);\n        }\n\n        void unlock(int lockmode) const {\n            if (lockmode == READLOCK) read_unlock();\n            else if (lockmode == WRITELOCK) write_unlock();\n            else if (lockmode != NOLOCK) throw \"MutexReaderWriter: try_lock: invalid lock mode\";            \n        }\n\n        void convert_read_lock_to_write_lock() const {\n            MutexWaiter waiter;\n            while (!try_convert_read_lock_to_write_lock()) waiter.wait();\n        }\n\n        void convert_write_lock_to_read_lock() const {\n            MADATOMIC_INT_INC(&nreader);\n            MADATOMIC_INT_INC(&writeflag);\n        }\n\n        virtual ~MutexReaderWriter(){};\n    };\n    \n\n\n\n                {\n                    SAFE_MPI_GLOBAL_MUTEX;\n                    for (int i=0; i<NTEST; i++) {\n                        foundone = send_req[cur_msg].Test_got_lock_already();\n                        if (foundone) break;\n                        cur_msg++;\n                        if (cur_msg >= NSEND) cur_msg = 0;\n                    }\n                }\n"
  },
  {
    "path": "src/madness/world/group.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2013  Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id: group.cc 3266 2013-05-17 12:53:42Z justus.c79@gmail.com $\n */\n\n#include <iostream>\n#include <madness/world/group.h>\n#include <madness/world/worldgop.h>\n\nnamespace madness {\n\n    namespace {\n\n        /// Group registry container type\n        typedef ConcurrentHashMap<DistributedID, Future<Group> >\n                group_registry_container;\n\n        /// Group registry container\n        group_registry_container group_registry;\n\n    } // namespace\n\n    /// Register a group\n\n    /// Register a group so that it can be used in active messages and tasks\n    /// spawned on remote nodes.\n    /// \\param group The group to be registered\n    /// \\throw TiledArray::Exception When the group is empty\n    /// \\throw TiledArray::Exception When the group is already in the registry\n    void Group::register_group() const {\n        // Get/insert the group into the registry\n        group_registry_container::accessor acc;\n        if(group_registry.insert(acc, group_registry_container::datumT(pimpl_->id(),\n                Future<Group>::default_initializer()))) {\n            acc->second = Future<Group>();\n        }\n\n        // Initialize the group object that will be used by remote tasks in\n        // global operations.\n        acc->second.set(Group(pimpl_.get()));\n    }\n\n    /// Remove the given group from the registry\n\n    /// Groups are removed via a lazy sync operation, which will only remove the\n    /// group from the registry once unregistered has been called on all processes\n    /// in the group.\n    /// \\param group The group to be removed from the registry\n    void Group::unregister_group(const DistributedID& did) {\n        group_registry_container::accessor acc;\n        [[maybe_unused]] auto found = group_registry.find(acc, did);\n        MADNESS_ASSERT(found);\n        group_registry.erase(acc);\n    }\n\n    /// Get a registered group\n\n    /// This function is used to acquire the group in an active message handler.\n    /// \\param did The id associated with the group\n    /// \\return A future to the group\n    Future<Group> Group::get_group(const DistributedID& did) {\n        group_registry_container::accessor acc;\n        if(group_registry.insert(acc, group_registry_container::datumT(did,\n                Future<Group>::default_initializer())))\n        {\n            acc->second = Future<Group>();\n        }\n\n        return acc->second;\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/group.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2013  Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n */\n\n#ifndef MADNESS_WORLD_GROUP_H__INCLUDED\n#define MADNESS_WORLD_GROUP_H__INCLUDED\n\n#include <type_traits>\n#include <madness/world/distributed_id.h>\n#include <madness/world/madness_exception.h>\n#include <madness/world/world.h>\n#include <madness/world/world_task_queue.h>\n\nnamespace madness {\n\n    /// A collection of processes\n\n    /// \\c Group is a light weight object that can be used to specify a set of\n    /// processes that will participate in Gop collective operations. The\n    /// advantage of Group over MPI (or SafeMPI) groups is that it eliminates\n    /// the need to construct new communicator and the associated barrier.\n    /// \\note This is \\b NOT an MPI or SafeMPI group.\n    class Group {\n    private:\n\n        class Impl {\n        private:\n            World& world_; ///< Parent world for this group\n            DistributedID did_; ///< Group distributed id\n            std::vector<ProcessID> group_to_world_map_; ///< List of nodes in the group\n            ProcessID group_rank_; ///< The group rank of this process\n            mutable AtomicInt local_count_; ///< Local use count\n            mutable AtomicInt remote_count_; ///< Remote use count\n\n            /// Array begin iterator accessor\n\n            /// \\tparam T The array type\n            /// \\tparam N The size of the array\n            /// \\param a A c-style array\n            /// \\return A pointer to the first element of \\c a\n            template <typename T, std::size_t N>\n            static T* begin(T (&a)[N]) { return a; }\n\n            /// Array end iterator accessor\n\n            /// \\tparam T The array type\n            /// \\tparam N The size of the array\n            /// \\param a A c-style array\n            /// \\return A pointer to one past the last element of \\c a\n            template <typename T, std::size_t N>\n            static T* end(T (&a)[N]) { return (a + N); }\n\n            /// Array size accessor\n\n            /// \\tparam T The array type\n            /// \\tparam N The size of the array\n            /// \\param a A c-style array\n            /// \\return The size of array \\c a\n            template <typename T, std::size_t N>\n            static std::size_t size(T (&a)[N]) { return N; }\n\n            /// Array const begin iterator accessor\n\n            /// \\tparam vectorT The array type\n            /// \\param v An array object\n            /// \\return The begin const_iterator of \\c v\n            template <typename vectorT>\n            static typename vectorT::const_iterator begin(const vectorT &v) {\n                return v.begin();\n            }\n\n            /// Array const end iterator accessor\n\n            /// \\tparam vectorT The array type\n            /// \\param v An array object\n            /// \\return The end cosnt_iterator of \\c v\n            template <typename vectorT>\n            static typename vectorT::const_iterator end(const vectorT &v) {\n                return v.end();\n            }\n\n            /// Array size accessor\n\n            /// \\tparam vectorT The array type\n            /// \\param v An array object\n            /// \\return The size of array \\c v\n            template <typename vectorT>\n            static typename std::enable_if<!std::is_array<vectorT>::value, std::size_t>::type\n            size(const vectorT &v) { return v.size(); }\n\n            public:\n            /// Constructor\n\n            /// \\tparam A An std compliant array (e.g. \\c std::array or <tt>std::vector</tt>)\n            /// \\param world The world that is the basis for this group\n            /// \\param did The distributed id associated with this group\n            /// \\param group An array of Processes in world\n            template <typename A>\n            Impl(World& world, const A& group, const DistributedID& did) :\n                world_(world), did_(did),\n                group_to_world_map_(begin(group), end(group)),\n                group_rank_(-1), local_count_(), remote_count_()\n            {\n                // Check that there is at least one process in group\n                MADNESS_ASSERT(size(group) > 0ul);\n\n                // Sort and remove duplicates from group\n                std::sort(group_to_world_map_.begin(), group_to_world_map_.end());\n                group_to_world_map_.erase(std::unique(group_to_world_map_.begin(),\n                        group_to_world_map_.end()), group_to_world_map_.end());\n\n                // Check that all processes in the group map are contained by world\n                MADNESS_ASSERT(group_to_world_map_.front() >= 0);\n                MADNESS_ASSERT(group_to_world_map_.back() < world_.size());\n\n                // Get the group rank for this process\n                group_rank_ = rank(world_.rank());\n                MADNESS_ASSERT(group_rank_ != -1);\n\n                // Initialize the use counter\n                local_count_ = 0;\n                remote_count_ = 0;\n            }\n\n            /// Parent world accessor\n\n            /// \\return A reference to the parent world of this group\n            World& get_world() const { return world_; }\n\n            /// Group id accessor\n\n            /// \\return A const reference to the group id\n            const DistributedID& id() const { return did_; }\n\n            /// Group rank accessor\n\n            /// \\return The rank of this process in the group\n            ProcessID rank() const { return group_rank_; }\n\n            /// Map world rank to group rank\n\n            /// \\param world_rank The world rank to be mapped\n            /// \\return The group rank of \\c world_rank when it is a member of this\n            /// group, otherwise \\c -1.\n            ProcessID rank(const ProcessID world_rank) const {\n                ProcessID result = std::distance(group_to_world_map_.begin(),\n                        std::find(group_to_world_map_.begin(), group_to_world_map_.end(),\n                                world_rank));\n                if(static_cast<std::size_t>(result) == group_to_world_map_.size())\n                    result = -1;\n                return result;\n            }\n\n            /// Group size accessor\n\n            /// \\return The number of processes in the group\n            ProcessID size() const { return group_to_world_map_.size(); }\n\n            /// Map group rank to world rank\n\n            /// \\return The rank of this process in the world\n            ProcessID world_rank(const ProcessID group_rank) const {\n                MADNESS_ASSERT(group_rank >= 0);\n                MADNESS_ASSERT(group_rank < ProcessID(group_to_world_map_.size()));\n                return group_to_world_map_[group_rank];\n            }\n\n            /// Compute the binary tree parent and children\n\n            /// \\param[in] group_root The head node of the binary tree\n            /// \\param[out] parent The parent node of the binary tree\n            /// \\param[out] child0 The left child node of the binary tree\n            /// \\param[out] child1 The right child node of the binary tree\n            void make_tree(const ProcessID group_root, ProcessID& parent,\n                    ProcessID& child0, ProcessID& child1) const\n            {\n                const ProcessID group_size = group_to_world_map_.size();\n\n                // Check that root is in the range of the group\n                MADNESS_ASSERT(group_root >= 0);\n                MADNESS_ASSERT(group_root < group_size);\n\n                // Renumber processes so root has me == 0\n                const ProcessID me = (group_rank_ + group_size - group_root) % group_size;\n\n                // Compute the group parent\n                parent = (me == 0 ? -1 : group_to_world_map_[(((me - 1) >> 1) + group_root) % group_size]);\n\n                // Compute children\n                child0 = (me << 1) + 1 + group_root;\n                child1 = child0 + 1;\n\n                const ProcessID end = group_size + group_root;\n                if(child0 < end)\n                    child0 = group_to_world_map_[child0 % group_size];\n                else\n                    child0 = -1;\n                if(child1 < end)\n                    child1 = group_to_world_map_[child1 % group_size];\n                else\n                    child1 = -1;\n            }\n\n            /// Local usage update\n\n            /// Increment the local usage count by one.\n            void local_update() const { local_count_++; }\n\n            /// Remote usage update\n\n            /// \\param n The value that will be added to the remote count\n            /// Add \\c n to the remote count. The remote count will be updated\n            /// with the negative of the local count so the final value will be\n            /// equal to zero when the group is ready for destruction. When the\n            /// group is ready for destruction it will be removed from the group\n            /// registry.\n            void remote_update(const int n) const {\n                const int count = (remote_count_ += n);\n                if(count == 0)\n                    Group::unregister_group(did_);\n            }\n\n            /// Local group deleter\n\n            /// Updates the remote usage count with the negative of the local\n            /// usage count by calling \\c remote_update.\n            static void deleter(Impl* pimpl) {\n                // Note: Calling remote_update() breaks the no throw requirement\n                // of deleters. Unfortunately, this cannot be avoided since\n                // Group must be used concurrently in different threads, and all\n                // cleanup methods requires some type of locking.\n                pimpl->remote_update(-(pimpl->local_count_));\n            }\n        }; // struct Impl\n\n        std::shared_ptr<Impl> pimpl_;\n\n\n        /// Add this group to the registry\n\n        /// Register a group so that it can be used in active messages and tasks\n        /// spawned on remote nodes.\n        /// \\throw TiledArray::Exception When the group is empty\n        /// \\throw TiledArray::Exception When the group is already in the registry\n        void register_group() const;\n\n        /// Remove this group from the registry\n\n        /// Groups are removed via a lazy sync operation, which will only remove the\n        /// group from the registry once \\c unregister_group() has been called on\n        /// all processes in the group.\n        static void unregister_group(const DistributedID& did);\n\n        Group(Impl* pimpl) : pimpl_(pimpl) { }\n\n    public:\n\n        /// Default constructor\n\n        /// Create an empty group\n        Group() : pimpl_() { }\n\n        /// Copy constructor\n\n        /// \\param other The group to be copied\n        /// \\note Copy is shallow.\n        Group(const Group& other) : pimpl_(other.pimpl_) { }\n\n        /// Create a new group\n\n        /// \\tparam A An array type\n        /// \\param world The parent world for this group\n        /// \\param group An array with a list of process to be included in the\n        /// \\param did The distributed id associated with this group\n        /// \\note All processes in the \\c group list must be included in the\n        /// parent world.\n        template <typename A>\n        Group(World& world, const A& group, const DistributedID& did) :\n            pimpl_(new Impl(world, group, did), Impl::deleter)\n        {\n            register_group();\n        }\n\n        /// Create a new group\n\n        /// \\tparam A An array type\n        /// \\param world The parent world for this group\n        /// \\param group An array with a list of process to be included in the\n        /// \\param tag The tag associated with this group\n        /// group.\n        /// \\note All processes in the \\c group list must be included in the\n        /// parent world.\n        template <typename A>\n        Group(World& world, const A& group, const std::size_t tag) :\n            pimpl_(new Impl(world, group, DistributedID(uniqueidT(), tag)), Impl::deleter)\n        {\n            register_group();\n        }\n\n        /// Create a new group\n\n        /// \\tparam A An array type\n        /// \\param world The parent world for this group\n        /// \\param group An array with a list of process to be included in the\n        /// \\param uid The unique id (used by \\c WorldObject ) associated with this group\n        /// \\param tag The tag associated with this group\n        /// group.\n        /// \\note All processes in the \\c group list must be included in the\n        /// parent world.\n        template <typename A>\n        Group(World& world, const A& group, const uniqueidT& uid, const std::size_t tag) :\n            pimpl_(new Impl(world, group, DistributedID(uid, tag)), Impl::deleter)\n        {\n            register_group();\n        }\n\n        /// Copy assignment operator\n\n        /// \\param other The group to be copied\n        /// \\note Copy is shallow.\n        Group& operator=(const Group& other) {\n            pimpl_ = other.pimpl_;\n            return *this;\n        }\n\n        /// Get group from the registry\n\n        /// This function is used to acquire the group in an active message handler.\n        /// \\param did The id associated with the group\n        /// \\return A future to the group\n        static madness::Future<Group> get_group(const DistributedID& did);\n\n        /// Update local usage count\n\n        /// Calling this function indicates that this group will be used by\n        /// a task function that was spawned by a remote process. For each call\n        /// to this function, \\c remote_update must be called exactly once.\n        /// \\note Users should not call this function. Normally,\n        /// \\c WorldGopInterface will call this function as needed. Users may\n        /// call this function if a \\c Group is used in user provided collective\n        /// operations.\n        void local_update() const {\n            MADNESS_ASSERT(pimpl_);\n            pimpl_->local_update();\n        }\n\n        /// Update remote usage count\n\n        /// Calling this function indicates that this group has been used by\n        /// a task function that was spawned by a remote process. For each call\n        /// to this function, \\c remote_update must be called exactly once.\n        /// \\note Users should not call this function. Normally,\n        /// \\c WorldGopInterface will call this function as needed. Users may\n        /// call this function if a \\c Group is used in user provided collective\n        /// operations.\n        void remote_update() const {\n            MADNESS_ASSERT(pimpl_);\n            pimpl_->remote_update(1);\n        }\n\n        /// Quary empty group\n\n        /// \\return \\c true when this group is empty\n        bool empty() const { return !pimpl_; }\n\n        /// Group id accessor\n\n        /// \\return A const reference to the group id\n        const DistributedID& id() const {\n            MADNESS_ASSERT(pimpl_);\n            return pimpl_->id();\n        }\n\n        /// Parent world accessor\n\n        /// \\return A reference to the parent world of this group\n        World& get_world() const {\n            MADNESS_ASSERT(pimpl_);\n            return pimpl_->get_world();\n        }\n\n        /// Group rank accessor\n\n        /// \\return The rank of this process in the group\n        ProcessID rank() const {\n            MADNESS_ASSERT(pimpl_);\n            return pimpl_->rank();\n        }\n\n        /// Map world rank to group rank\n\n        /// \\param world_rank The world rank to be mapped\n        /// \\return The rank of \\c world_rank process in the group\n        ProcessID rank(const ProcessID world_rank) const {\n            MADNESS_ASSERT(pimpl_);\n            return pimpl_->rank(world_rank);\n        }\n\n        /// Group size accessor\n\n        /// \\return The number of processes in the group\n        ProcessID size() const {\n            return (pimpl_ ? pimpl_->size() : 0);\n        }\n\n        /// Map group rank to world rank\n\n        /// \\param group_rank The group rank to be mapped to a world rank\n        /// \\return The parent world rank of group_rank.\n        ProcessID world_rank(const ProcessID group_rank) const {\n            MADNESS_ASSERT(pimpl_);\n            return pimpl_->world_rank(group_rank);\n        }\n\n        /// Compute the binary tree parents and children\n\n        /// \\param[in] group_root The head node of the binary tree in the group\n        /// \\param[out] parent The parent node of the binary tree\n        /// \\param[out] child1 The left child node of the binary tree\n        /// \\param[out] child2 The right child node of the binary tree\n        /// \\note Output ranks are in the parent world.\n        void make_tree(const ProcessID group_root, ProcessID& parent,\n                ProcessID& child1, ProcessID& child2) const\n        {\n            MADNESS_ASSERT(pimpl_);\n            pimpl_->make_tree(group_root, parent, child1, child2);\n        }\n\n        template <typename Archive>\n        void serialize(const Archive&) {\n            MADNESS_ASSERT(false); // not allowed\n        }\n    }; // class Group\n\n} // namespace madness\n\n#endif // MADNESS_WORLD_GROUP_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/hello_world.cu",
    "content": "\n#include <iostream>\n\n// CUDA runtime\n#include <cuda_runtime.h>\n\n// helper functions and utilities to work with CUDA\n//#include <helper_functions.h>\n//#include <helper_cuda.h>\n\n#include <cstdio>\n\n__global__ void hello_world() {\n  printf(\"CUDA thread [%d, %d] says \\\"hello, world!\\\"\\n\",\\\n            blockIdx.y*gridDim.x+blockIdx.x,\\\n            threadIdx.z*blockDim.x*blockDim.y+threadIdx.y*blockDim.x+threadIdx.x);\n}\n\nvoid __cuda_hello_world() {\n  int device_count;\n  cudaGetDeviceCount(&device_count);\n  if (device_count > 0) {\n    std::cout << \"in __cuda_hello_world: device_count=\" << device_count;\n    if (device_count == 1) {\n  \t  cudaDeviceProp deviceProp;\n      cudaGetDeviceProperties(&deviceProp, 0);\n      std::cout << \" device_name=\\\"\" << deviceProp.name << \"\\\"\";\n    }\n    std::cout << std::endl;\n    hello_world<<<1,1>>>();\n    cudaDeviceSynchronize();\n  }\n}\n"
  },
  {
    "path": "src/madness/world/lookup3.c",
    "content": "/*\n\nFrom http://www.burtleburtle.net/bob/c/lookup3.c\n\n-------------------------------------------------------------------------------\nlookup3.c, by Bob Jenkins, May 2006, Public Domain.\n\nThese are functions for producing 32-bit hashes for hash table lookup.\nhashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() \nare externally useful functions.  Routines to test the hash are included \nif SELF_TEST is defined.  You can use this free for any purpose.  It's in\nthe public domain.  It has no warranty.\n\nYou probably want to use hashlittle().  hashlittle() and hashbig()\nhash byte arrays.  hashlittle() is is faster than hashbig() on\nlittle-endian machines.  Intel and AMD are little-endian machines.\nOn second thought, you probably want hashlittle2(), which is identical to\nhashlittle() except it returns two 32-bit hashes for the price of one.  \nYou could implement hashbig2() if you wanted but I haven't bothered here.\n\nIf you want to find a hash of, say, exactly 7 integers, do\n  a = i1;  b = i2;  c = i3;\n  mix(a,b,c);\n  a += i4; b += i5; c += i6;\n  mix(a,b,c);\n  a += i7;\n  final(a,b,c);\nthen use c as the hash value.  If you have a variable length array of\n4-byte integers to hash, use hashword().  If you have a byte array (like\na character string), use hashlittle().  If you have several byte arrays, or\na mix of things, see the comments above hashlittle().  \n\nWhy is this so big?  I read 12 bytes at a time into 3 4-byte integers, \nthen mix those integers.  This is fast (you can do a lot more thorough\nmixing with 12*3 instructions on 3 integers than you can with 3 instructions\non 1 byte), but shoehorning those bytes into integers efficiently is messy.\n-------------------------------------------------------------------------------\n*/\n\n/* # define SELF_TEST 1 */\n\n#include <stdio.h>      /* defines printf for tests */\n#include <time.h>       /* defines time_t for timings in the test */\n#include <stdint.h>     /* defines uint32_t etc */\n#include <sys/param.h>  /* attempt to define endianness */\n#ifdef linux\n# include <endian.h>    /* attempt to define endianness */\n#endif\n\n/*\n * My best guess at if you are big-endian or little-endian.  This may\n * need adjustment.\n */\n#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \\\n     __BYTE_ORDER == __LITTLE_ENDIAN) || \\\n    (defined(i386) || defined(__i386__) || defined(__i486__) || \\\n     defined(__i586__) || defined(__i686__) || defined(vax) || defined(MIPSEL))\n# define HASH_LITTLE_ENDIAN 1\n# define HASH_BIG_ENDIAN 0\n#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \\\n       __BYTE_ORDER == __BIG_ENDIAN) || \\\n      (defined(sparc) || defined(POWERPC) || defined(mc68000) || defined(sel))\n# define HASH_LITTLE_ENDIAN 0\n# define HASH_BIG_ENDIAN 1\n#else\n# define HASH_LITTLE_ENDIAN 0\n# define HASH_BIG_ENDIAN 0\n#endif\n\n#define hashsize(n) ((uint32_t)1<<(n))\n#define hashmask(n) (hashsize(n)-1)\n#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))\n\n/*\n-------------------------------------------------------------------------------\nmix -- mix 3 32-bit values reversibly.\n\nThis is reversible, so any information in (a,b,c) before mix() is\nstill in (a,b,c) after mix().\n\nIf four pairs of (a,b,c) inputs are run through mix(), or through\nmix() in reverse, there are at least 32 bits of the output that\nare sometimes the same for one pair and different for another pair.\nThis was tested for:\n* pairs that differed by one bit, by two bits, in any combination\n  of top bits of (a,b,c), or in any combination of bottom bits of\n  (a,b,c).\n* \"differ\" is defined as +, -, ^, or ~^.  For + and -, I transformed\n  the output delta to a Gray code (a^(a>>1)) so a string of 1's (as\n  is commonly produced by subtraction) look like a single 1-bit\n  difference.\n* the base values were pseudorandom, all zero but one bit set, or \n  all zero plus a counter that starts at zero.\n\nSome k values for my \"a-=c; a^=rot(c,k); c+=b;\" arrangement that\nsatisfy this are\n    4  6  8 16 19  4\n    9 15  3 18 27 15\n   14  9  3  7 17  3\nWell, \"9 15 3 18 27 15\" didn't quite get 32 bits diffing\nfor \"differ\" defined as + with a one-bit base and a two-bit delta.  I\nused http://burtleburtle.net/bob/hash/avalanche.html to choose \nthe operations, constants, and arrangements of the variables.\n\nThis does not achieve avalanche.  There are input bits of (a,b,c)\nthat fail to affect some output bits of (a,b,c), especially of a.  The\nmost thoroughly mixed value is c, but it doesn't really even achieve\navalanche in c.\n\nThis allows some parallelism.  Read-after-writes are good at doubling\nthe number of bits affected, so the goal of mixing pulls in the opposite\ndirection as the goal of parallelism.  I did what I could.  Rotates\nseem to cost as much as shifts on every machine I could lay my hands\non, and rotates are much kinder to the top and bottom bits, so I used\nrotates.\n-------------------------------------------------------------------------------\n*/\n#define mix(a,b,c) \\\n{ \\\n  a -= c;  a ^= rot(c, 4);  c += b; \\\n  b -= a;  b ^= rot(a, 6);  a += c; \\\n  c -= b;  c ^= rot(b, 8);  b += a; \\\n  a -= c;  a ^= rot(c,16);  c += b; \\\n  b -= a;  b ^= rot(a,19);  a += c; \\\n  c -= b;  c ^= rot(b, 4);  b += a; \\\n}\n\n/*\n-------------------------------------------------------------------------------\nfinal -- final mixing of 3 32-bit values (a,b,c) into c\n\nPairs of (a,b,c) values differing in only a few bits will usually\nproduce values of c that look totally different.  This was tested for\n* pairs that differed by one bit, by two bits, in any combination\n  of top bits of (a,b,c), or in any combination of bottom bits of\n  (a,b,c).\n* \"differ\" is defined as +, -, ^, or ~^.  For + and -, I transformed\n  the output delta to a Gray code (a^(a>>1)) so a string of 1's (as\n  is commonly produced by subtraction) look like a single 1-bit\n  difference.\n* the base values were pseudorandom, all zero but one bit set, or \n  all zero plus a counter that starts at zero.\n\nThese constants passed:\n 14 11 25 16 4 14 24\n 12 14 25 16 4 14 24\nand these came close:\n  4  8 15 26 3 22 24\n 10  8 15 26 3 22 24\n 11  8 15 26 3 22 24\n-------------------------------------------------------------------------------\n*/\n#define final(a,b,c) \\\n{ \\\n  c ^= b; c -= rot(b,14); \\\n  a ^= c; a -= rot(c,11); \\\n  b ^= a; b -= rot(a,25); \\\n  c ^= b; c -= rot(b,16); \\\n  a ^= c; a -= rot(c,4);  \\\n  b ^= a; b -= rot(a,14); \\\n  c ^= b; c -= rot(b,24); \\\n}\n\n/*\n--------------------------------------------------------------------\n This works on all machines.  To be useful, it requires\n -- that the key be an array of uint32_t's, and\n -- that the length be the number of uint32_t's in the key\n\n The function hashword() is identical to hashlittle() on little-endian\n machines, and identical to hashbig() on big-endian machines,\n except that the length has to be measured in uint32_ts rather than in\n bytes.  hashlittle() is more complicated than hashword() only because\n hashlittle() has to dance around fitting the key bytes into registers.\n--------------------------------------------------------------------\n*/\nuint32_t hashword(\nconst uint32_t *k,                   /* the key, an array of uint32_t values */\nsize_t          length,               /* the length of the key, in uint32_ts */\nuint32_t        initval)         /* the previous hash, or an arbitrary value */\n{\n  uint32_t a,b,c;\n\n  /* Set up the internal state */\n  a = b = c = 0xdeadbeef + (((uint32_t)length)<<2) + initval;\n\n  /*------------------------------------------------- handle most of the key */\n  while (length > 3)\n  {\n    a += k[0];\n    b += k[1];\n    c += k[2];\n    mix(a,b,c);\n    length -= 3;\n    k += 3;\n  }\n\n  /*------------------------------------------- handle the last 3 uint32_t's */\n  switch(length)                     /* all the case statements fall through */\n  { \n  case 3 : c+=k[2];\n  case 2 : b+=k[1];\n  case 1 : a+=k[0];\n    final(a,b,c);\n  case 0:     /* case 0: nothing left to add */\n    break;\n  }\n  /*------------------------------------------------------ report the result */\n  return c;\n}\n\n\n/*\n-------------------------------------------------------------------------------\nhashlittle() -- hash a variable-length key into a 32-bit value\n  k       : the key (the unaligned variable-length array of bytes)\n  length  : the length of the key, counting by bytes\n  initval : can be any 4-byte value\nReturns a 32-bit value.  Every bit of the key affects every bit of\nthe return value.  Two keys differing by one or two bits will have\ntotally different hash values.\n\nThe best hash table sizes are powers of 2.  There is no need to do\nmod a prime (mod is sooo slow!).  If you need less than 32 bits,\nuse a bitmask.  For example, if you need only 10 bits, do\n  h = (h & hashmask(10));\nIn which case, the hash table should have hashsize(10) elements.\n\nIf you are hashing n strings (uint8_t **)k, do it like this:\n  for (i=0, h=0; i<n; ++i) h = hashlittle( k[i], len[i], h);\n\nBy Bob Jenkins, 2006.  bob_jenkins@burtleburtle.net.  You may use this\ncode any way you wish, private, educational, or commercial.  It's free.\n\nUse for hash table lookup, or anything where one collision in 2^^32 is\nacceptable.  Do NOT use for cryptographic purposes.\n-------------------------------------------------------------------------------\n*/\n\nuint32_t hashlittle( const void *key, size_t length, uint32_t initval)\n{\n  uint32_t a,b,c;                                          /* internal state */\n  union { const void *ptr; size_t i; } u;     /* needed for Mac Powerbook G4 */\n\n  /* Set up the internal state */\n  a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;\n\n  u.ptr = key;\n  if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {\n    const uint32_t *k = (const uint32_t *)key;         /* read 32-bit chunks */\n#ifdef VALGRIND\n    const uint8_t  *k8;\n#endif\n\n    /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */\n    while (length > 12)\n    {\n      a += k[0];\n      b += k[1];\n      c += k[2];\n      mix(a,b,c);\n      length -= 12;\n      k += 3;\n    }\n\n    /*----------------------------- handle the last (probably partial) block */\n    /* \n     * \"k[2]&0xffffff\" actually reads beyond the end of the string, but\n     * then masks off the part it's not allowed to read.  Because the\n     * string is aligned, the masked-off tail is in the same word as the\n     * rest of the string.  Every machine with memory protection I've seen\n     * does it on word boundaries, so is OK with this.  But VALGRIND will\n     * still catch it and complain.  The masking trick does make the hash\n     * noticably faster for short strings (like English words).\n     */\n#ifndef VALGRIND\n\n    switch(length)\n    {\n    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;\n    case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;\n    case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;\n    case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;\n    case 8 : b+=k[1]; a+=k[0]; break;\n    case 7 : b+=k[1]&0xffffff; a+=k[0]; break;\n    case 6 : b+=k[1]&0xffff; a+=k[0]; break;\n    case 5 : b+=k[1]&0xff; a+=k[0]; break;\n    case 4 : a+=k[0]; break;\n    case 3 : a+=k[0]&0xffffff; break;\n    case 2 : a+=k[0]&0xffff; break;\n    case 1 : a+=k[0]&0xff; break;\n    case 0 : return c;              /* zero length strings require no mixing */\n    }\n\n#else /* make valgrind happy */\n\n    k8 = (const uint8_t *)k;\n    switch(length)\n    {\n    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;\n    case 11: c+=((uint32_t)k8[10])<<16;  /* fall through */\n    case 10: c+=((uint32_t)k8[9])<<8;    /* fall through */\n    case 9 : c+=k8[8];                   /* fall through */\n    case 8 : b+=k[1]; a+=k[0]; break;\n    case 7 : b+=((uint32_t)k8[6])<<16;   /* fall through */\n    case 6 : b+=((uint32_t)k8[5])<<8;    /* fall through */\n    case 5 : b+=k8[4];                   /* fall through */\n    case 4 : a+=k[0]; break;\n    case 3 : a+=((uint32_t)k8[2])<<16;   /* fall through */\n    case 2 : a+=((uint32_t)k8[1])<<8;    /* fall through */\n    case 1 : a+=k8[0]; break;\n    case 0 : return c;\n    }\n\n#endif /* !valgrind */\n\n  } else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {\n    const uint16_t *k = (const uint16_t *)key;         /* read 16-bit chunks */\n    const uint8_t  *k8;\n\n    /*--------------- all but last block: aligned reads and different mixing */\n    while (length > 12)\n    {\n      a += k[0] + (((uint32_t)k[1])<<16);\n      b += k[2] + (((uint32_t)k[3])<<16);\n      c += k[4] + (((uint32_t)k[5])<<16);\n      mix(a,b,c);\n      length -= 12;\n      k += 6;\n    }\n\n    /*----------------------------- handle the last (probably partial) block */\n    k8 = (const uint8_t *)k;\n    switch(length)\n    {\n    case 12: c+=k[4]+(((uint32_t)k[5])<<16);\n             b+=k[2]+(((uint32_t)k[3])<<16);\n             a+=k[0]+(((uint32_t)k[1])<<16);\n             break;\n    case 11: c+=((uint32_t)k8[10])<<16;     /* fall through */\n    case 10: c+=k[4];\n             b+=k[2]+(((uint32_t)k[3])<<16);\n             a+=k[0]+(((uint32_t)k[1])<<16);\n             break;\n    case 9 : c+=k8[8];                      /* fall through */\n    case 8 : b+=k[2]+(((uint32_t)k[3])<<16);\n             a+=k[0]+(((uint32_t)k[1])<<16);\n             break;\n    case 7 : b+=((uint32_t)k8[6])<<16;      /* fall through */\n    case 6 : b+=k[2];\n             a+=k[0]+(((uint32_t)k[1])<<16);\n             break;\n    case 5 : b+=k8[4];                      /* fall through */\n    case 4 : a+=k[0]+(((uint32_t)k[1])<<16);\n             break;\n    case 3 : a+=((uint32_t)k8[2])<<16;      /* fall through */\n    case 2 : a+=k[0];\n             break;\n    case 1 : a+=k8[0];\n             break;\n    case 0 : return c;                     /* zero length requires no mixing */\n    }\n\n  } else {                        /* need to read the key one byte at a time */\n    const uint8_t *k = (const uint8_t *)key;\n\n    /*--------------- all but the last block: affect some 32 bits of (a,b,c) */\n    while (length > 12)\n    {\n      a += k[0];\n      a += ((uint32_t)k[1])<<8;\n      a += ((uint32_t)k[2])<<16;\n      a += ((uint32_t)k[3])<<24;\n      b += k[4];\n      b += ((uint32_t)k[5])<<8;\n      b += ((uint32_t)k[6])<<16;\n      b += ((uint32_t)k[7])<<24;\n      c += k[8];\n      c += ((uint32_t)k[9])<<8;\n      c += ((uint32_t)k[10])<<16;\n      c += ((uint32_t)k[11])<<24;\n      mix(a,b,c);\n      length -= 12;\n      k += 12;\n    }\n\n    /*-------------------------------- last block: affect all 32 bits of (c) */\n    switch(length)                   /* all the case statements fall through */\n    {\n    case 12: c+=((uint32_t)k[11])<<24;\n    case 11: c+=((uint32_t)k[10])<<16;\n    case 10: c+=((uint32_t)k[9])<<8;\n    case 9 : c+=k[8];\n    case 8 : b+=((uint32_t)k[7])<<24;\n    case 7 : b+=((uint32_t)k[6])<<16;\n    case 6 : b+=((uint32_t)k[5])<<8;\n    case 5 : b+=k[4];\n    case 4 : a+=((uint32_t)k[3])<<24;\n    case 3 : a+=((uint32_t)k[2])<<16;\n    case 2 : a+=((uint32_t)k[1])<<8;\n    case 1 : a+=k[0];\n             break;\n    case 0 : return c;\n    }\n  }\n\n  final(a,b,c);\n  return c;\n}\n\n\n/*\n * hashlittle2: return 2 32-bit hash values\n *\n * This is identical to hashlittle(), except it returns two 32-bit hash\n * values instead of just one.  This is good enough for hash table\n * lookup with 2^^64 buckets, or if you want a second hash if you're not\n * happy with the first, or if you want a probably-unique 64-bit ID for\n * the key.  *pc is better mixed than *pb, so use *pc first.  If you want\n * a 64-bit value do something like \"*pc + (((uint64_t)*pb)<<32)\".\n */\nvoid hashlittle2( \n  const void *key,       /* the key to hash */\n  size_t      length,    /* length of the key */\n  uint32_t   *pc,        /* IN: primary initval, OUT: primary hash */\n  uint32_t   *pb)        /* IN: secondary initval, OUT: secondary hash */\n{\n  uint32_t a,b,c;                                          /* internal state */\n  union { const void *ptr; size_t i; } u;     /* needed for Mac Powerbook G4 */\n\n  /* Set up the internal state */\n  a = b = c = 0xdeadbeef + ((uint32_t)length) + *pc;\n  c += *pb;\n\n  u.ptr = key;\n  if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {\n    const uint32_t *k = (const uint32_t *)key;         /* read 32-bit chunks */\n#ifdef VALGRIND\n    const uint8_t  *k8;\n#endif\n\n    /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */\n    while (length > 12)\n    {\n      a += k[0];\n      b += k[1];\n      c += k[2];\n      mix(a,b,c);\n      length -= 12;\n      k += 3;\n    }\n\n    /*----------------------------- handle the last (probably partial) block */\n    /* \n     * \"k[2]&0xffffff\" actually reads beyond the end of the string, but\n     * then masks off the part it's not allowed to read.  Because the\n     * string is aligned, the masked-off tail is in the same word as the\n     * rest of the string.  Every machine with memory protection I've seen\n     * does it on word boundaries, so is OK with this.  But VALGRIND will\n     * still catch it and complain.  The masking trick does make the hash\n     * noticably faster for short strings (like English words).\n     */\n#ifndef VALGRIND\n\n    switch(length)\n    {\n    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;\n    case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;\n    case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;\n    case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;\n    case 8 : b+=k[1]; a+=k[0]; break;\n    case 7 : b+=k[1]&0xffffff; a+=k[0]; break;\n    case 6 : b+=k[1]&0xffff; a+=k[0]; break;\n    case 5 : b+=k[1]&0xff; a+=k[0]; break;\n    case 4 : a+=k[0]; break;\n    case 3 : a+=k[0]&0xffffff; break;\n    case 2 : a+=k[0]&0xffff; break;\n    case 1 : a+=k[0]&0xff; break;\n    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */\n    }\n\n#else /* make valgrind happy */\n\n    k8 = (const uint8_t *)k;\n    switch(length)\n    {\n    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;\n    case 11: c+=((uint32_t)k8[10])<<16;  /* fall through */\n    case 10: c+=((uint32_t)k8[9])<<8;    /* fall through */\n    case 9 : c+=k8[8];                   /* fall through */\n    case 8 : b+=k[1]; a+=k[0]; break;\n    case 7 : b+=((uint32_t)k8[6])<<16;   /* fall through */\n    case 6 : b+=((uint32_t)k8[5])<<8;    /* fall through */\n    case 5 : b+=k8[4];                   /* fall through */\n    case 4 : a+=k[0]; break;\n    case 3 : a+=((uint32_t)k8[2])<<16;   /* fall through */\n    case 2 : a+=((uint32_t)k8[1])<<8;    /* fall through */\n    case 1 : a+=k8[0]; break;\n    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */\n    }\n\n#endif /* !valgrind */\n\n  } else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {\n    const uint16_t *k = (const uint16_t *)key;         /* read 16-bit chunks */\n    const uint8_t  *k8;\n\n    /*--------------- all but last block: aligned reads and different mixing */\n    while (length > 12)\n    {\n      a += k[0] + (((uint32_t)k[1])<<16);\n      b += k[2] + (((uint32_t)k[3])<<16);\n      c += k[4] + (((uint32_t)k[5])<<16);\n      mix(a,b,c);\n      length -= 12;\n      k += 6;\n    }\n\n    /*----------------------------- handle the last (probably partial) block */\n    k8 = (const uint8_t *)k;\n    switch(length)\n    {\n    case 12: c+=k[4]+(((uint32_t)k[5])<<16);\n             b+=k[2]+(((uint32_t)k[3])<<16);\n             a+=k[0]+(((uint32_t)k[1])<<16);\n             break;\n    case 11: c+=((uint32_t)k8[10])<<16;     /* fall through */\n    case 10: c+=k[4];\n             b+=k[2]+(((uint32_t)k[3])<<16);\n             a+=k[0]+(((uint32_t)k[1])<<16);\n             break;\n    case 9 : c+=k8[8];                      /* fall through */\n    case 8 : b+=k[2]+(((uint32_t)k[3])<<16);\n             a+=k[0]+(((uint32_t)k[1])<<16);\n             break;\n    case 7 : b+=((uint32_t)k8[6])<<16;      /* fall through */\n    case 6 : b+=k[2];\n             a+=k[0]+(((uint32_t)k[1])<<16);\n             break;\n    case 5 : b+=k8[4];                      /* fall through */\n    case 4 : a+=k[0]+(((uint32_t)k[1])<<16);\n             break;\n    case 3 : a+=((uint32_t)k8[2])<<16;      /* fall through */\n    case 2 : a+=k[0];\n             break;\n    case 1 : a+=k8[0];\n             break;\n    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */\n    }\n\n  } else {                        /* need to read the key one byte at a time */\n    const uint8_t *k = (const uint8_t *)key;\n\n    /*--------------- all but the last block: affect some 32 bits of (a,b,c) */\n    while (length > 12)\n    {\n      a += k[0];\n      a += ((uint32_t)k[1])<<8;\n      a += ((uint32_t)k[2])<<16;\n      a += ((uint32_t)k[3])<<24;\n      b += k[4];\n      b += ((uint32_t)k[5])<<8;\n      b += ((uint32_t)k[6])<<16;\n      b += ((uint32_t)k[7])<<24;\n      c += k[8];\n      c += ((uint32_t)k[9])<<8;\n      c += ((uint32_t)k[10])<<16;\n      c += ((uint32_t)k[11])<<24;\n      mix(a,b,c);\n      length -= 12;\n      k += 12;\n    }\n\n    /*-------------------------------- last block: affect all 32 bits of (c) */\n    switch(length)                   /* all the case statements fall through */\n    {\n    case 12: c+=((uint32_t)k[11])<<24;\n    case 11: c+=((uint32_t)k[10])<<16;\n    case 10: c+=((uint32_t)k[9])<<8;\n    case 9 : c+=k[8];\n    case 8 : b+=((uint32_t)k[7])<<24;\n    case 7 : b+=((uint32_t)k[6])<<16;\n    case 6 : b+=((uint32_t)k[5])<<8;\n    case 5 : b+=k[4];\n    case 4 : a+=((uint32_t)k[3])<<24;\n    case 3 : a+=((uint32_t)k[2])<<16;\n    case 2 : a+=((uint32_t)k[1])<<8;\n    case 1 : a+=k[0];\n             break;\n    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */\n    }\n  }\n\n  final(a,b,c);\n  *pc=c; *pb=b; return;             /* zero length strings require no mixing */\n}\n\n\n\n/*\n * hashbig():\n * This is the same as hashword() on big-endian machines.  It is different\n * from hashlittle() on all machines.  hashbig() takes advantage of\n * big-endian byte ordering. \n */\nuint32_t hashbig( const void *key, size_t length, uint32_t initval)\n{\n  uint32_t a,b,c;\n  union { const void *ptr; size_t i; } u; /* to cast key to (size_t) happily */\n\n  /* Set up the internal state */\n  a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;\n\n  u.ptr = key;\n  if (HASH_BIG_ENDIAN && ((u.i & 0x3) == 0)) {\n    const uint32_t *k = (const uint32_t *)key;         /* read 32-bit chunks */\n#ifdef VALGRIND\n    const uint8_t  *k8;\n#endif\n\n    /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */\n    while (length > 12)\n    {\n      a += k[0];\n      b += k[1];\n      c += k[2];\n      mix(a,b,c);\n      length -= 12;\n      k += 3;\n    }\n\n    /*----------------------------- handle the last (probably partial) block */\n    /* \n     * \"k[2]<<8\" actually reads beyond the end of the string, but\n     * then shifts out the part it's not allowed to read.  Because the\n     * string is aligned, the illegal read is in the same word as the\n     * rest of the string.  Every machine with memory protection I've seen\n     * does it on word boundaries, so is OK with this.  But VALGRIND will\n     * still catch it and complain.  The masking trick does make the hash\n     * noticably faster for short strings (like English words).\n     */\n#ifndef VALGRIND\n\n    switch(length)\n    {\n    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;\n    case 11: c+=k[2]&0xffffff00; b+=k[1]; a+=k[0]; break;\n    case 10: c+=k[2]&0xffff0000; b+=k[1]; a+=k[0]; break;\n    case 9 : c+=k[2]&0xff000000; b+=k[1]; a+=k[0]; break;\n    case 8 : b+=k[1]; a+=k[0]; break;\n    case 7 : b+=k[1]&0xffffff00; a+=k[0]; break;\n    case 6 : b+=k[1]&0xffff0000; a+=k[0]; break;\n    case 5 : b+=k[1]&0xff000000; a+=k[0]; break;\n    case 4 : a+=k[0]; break;\n    case 3 : a+=k[0]&0xffffff00; break;\n    case 2 : a+=k[0]&0xffff0000; break;\n    case 1 : a+=k[0]&0xff000000; break;\n    case 0 : return c;              /* zero length strings require no mixing */\n    }\n\n#else  /* make valgrind happy */\n\n    k8 = (const uint8_t *)k;\n    switch(length)                   /* all the case statements fall through */\n    {\n    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;\n    case 11: c+=((uint32_t)k8[10])<<8;  /* fall through */\n    case 10: c+=((uint32_t)k8[9])<<16;  /* fall through */\n    case 9 : c+=((uint32_t)k8[8])<<24;  /* fall through */\n    case 8 : b+=k[1]; a+=k[0]; break;\n    case 7 : b+=((uint32_t)k8[6])<<8;   /* fall through */\n    case 6 : b+=((uint32_t)k8[5])<<16;  /* fall through */\n    case 5 : b+=((uint32_t)k8[4])<<24;  /* fall through */\n    case 4 : a+=k[0]; break;\n    case 3 : a+=((uint32_t)k8[2])<<8;   /* fall through */\n    case 2 : a+=((uint32_t)k8[1])<<16;  /* fall through */\n    case 1 : a+=((uint32_t)k8[0])<<24; break;\n    case 0 : return c;\n    }\n\n#endif /* !VALGRIND */\n\n  } else {                        /* need to read the key one byte at a time */\n    const uint8_t *k = (const uint8_t *)key;\n\n    /*--------------- all but the last block: affect some 32 bits of (a,b,c) */\n    while (length > 12)\n    {\n      a += ((uint32_t)k[0])<<24;\n      a += ((uint32_t)k[1])<<16;\n      a += ((uint32_t)k[2])<<8;\n      a += ((uint32_t)k[3]);\n      b += ((uint32_t)k[4])<<24;\n      b += ((uint32_t)k[5])<<16;\n      b += ((uint32_t)k[6])<<8;\n      b += ((uint32_t)k[7]);\n      c += ((uint32_t)k[8])<<24;\n      c += ((uint32_t)k[9])<<16;\n      c += ((uint32_t)k[10])<<8;\n      c += ((uint32_t)k[11]);\n      mix(a,b,c);\n      length -= 12;\n      k += 12;\n    }\n\n    /*-------------------------------- last block: affect all 32 bits of (c) */\n    switch(length)                   /* all the case statements fall through */\n    {\n    case 12: c+=k[11];\n    case 11: c+=((uint32_t)k[10])<<8;\n    case 10: c+=((uint32_t)k[9])<<16;\n    case 9 : c+=((uint32_t)k[8])<<24;\n    case 8 : b+=k[7];\n    case 7 : b+=((uint32_t)k[6])<<8;\n    case 6 : b+=((uint32_t)k[5])<<16;\n    case 5 : b+=((uint32_t)k[4])<<24;\n    case 4 : a+=k[3];\n    case 3 : a+=((uint32_t)k[2])<<8;\n    case 2 : a+=((uint32_t)k[1])<<16;\n    case 1 : a+=((uint32_t)k[0])<<24;\n             break;\n    case 0 : return c;\n    }\n  }\n\n  final(a,b,c);\n  return c;\n}\n\n\n#ifdef SELF_TEST\n\n/* used for timings */\nvoid driver1()\n{\n  uint8_t buf[256];\n  uint32_t i;\n  uint32_t h=0;\n  time_t a,z;\n\n  time(&a);\n  for (i=0; i<256; ++i) buf[i] = 'x';\n  for (i=0; i<1; ++i) \n  {\n    h = hashlittle(&buf[0],1,h);\n  }\n  time(&z);\n  if (z-a > 0) printf(\"time %d %.8x\\n\", z-a, h);\n}\n\n/* check that every input bit changes every output bit half the time */\n#define HASHSTATE 1\n#define HASHLEN   1\n#define MAXPAIR 60\n#define MAXLEN  70\nvoid driver2()\n{\n  uint8_t qa[MAXLEN+1], qb[MAXLEN+2], *a = &qa[0], *b = &qb[1];\n  uint32_t c[HASHSTATE], d[HASHSTATE], i=0, j=0, k, l, m=0, z;\n  uint32_t e[HASHSTATE],f[HASHSTATE],g[HASHSTATE],h[HASHSTATE];\n  uint32_t x[HASHSTATE],y[HASHSTATE];\n  uint32_t hlen;\n\n  printf(\"No more than %d trials should ever be needed \\n\",MAXPAIR/2);\n  for (hlen=0; hlen < MAXLEN; ++hlen)\n  {\n    z=0;\n    for (i=0; i<hlen; ++i)  /*----------------------- for each input byte, */\n    {\n      for (j=0; j<8; ++j)   /*------------------------ for each input bit, */\n      {\n\tfor (m=1; m<8; ++m) /*------------ for serveral possible initvals, */\n\t{\n\t  for (l=0; l<HASHSTATE; ++l)\n\t    e[l]=f[l]=g[l]=h[l]=x[l]=y[l]=~((uint32_t)0);\n\n      \t  /*---- check that every output bit is affected by that input bit */\n\t  for (k=0; k<MAXPAIR; k+=2)\n\t  { \n\t    uint32_t finished=1;\n\t    /* keys have one bit different */\n\t    for (l=0; l<hlen+1; ++l) {a[l] = b[l] = (uint8_t)0;}\n\t    /* have a and b be two keys differing in only one bit */\n\t    a[i] ^= (k<<j);\n\t    a[i] ^= (k>>(8-j));\n\t     c[0] = hashlittle(a, hlen, m);\n\t    b[i] ^= ((k+1)<<j);\n\t    b[i] ^= ((k+1)>>(8-j));\n\t     d[0] = hashlittle(b, hlen, m);\n\t    /* check every bit is 1, 0, set, and not set at least once */\n\t    for (l=0; l<HASHSTATE; ++l)\n\t    {\n\t      e[l] &= (c[l]^d[l]);\n\t      f[l] &= ~(c[l]^d[l]);\n\t      g[l] &= c[l];\n\t      h[l] &= ~c[l];\n\t      x[l] &= d[l];\n\t      y[l] &= ~d[l];\n\t      if (e[l]|f[l]|g[l]|h[l]|x[l]|y[l]) finished=0;\n\t    }\n\t    if (finished) break;\n\t  }\n\t  if (k>z) z=k;\n\t  if (k==MAXPAIR) \n\t  {\n\t     printf(\"Some bit didn't change: \");\n\t     printf(\"%.8x %.8x %.8x %.8x %.8x %.8x  \",\n\t            e[0],f[0],g[0],h[0],x[0],y[0]);\n\t     printf(\"i %d j %d m %d len %d\\n\", i, j, m, hlen);\n\t  }\n\t  if (z==MAXPAIR) goto done;\n\t}\n      }\n    }\n   done:\n    if (z < MAXPAIR)\n    {\n      printf(\"Mix success  %2d bytes  %2d initvals  \",i,m);\n      printf(\"required  %d  trials\\n\", z/2);\n    }\n  }\n  printf(\"\\n\");\n}\n\n/* Check for reading beyond the end of the buffer and alignment problems */\nvoid driver3()\n{\n  uint8_t buf[MAXLEN+20], *b;\n  uint32_t len;\n  uint8_t q[] = \"This is the time for all good men to come to the aid of their country...\";\n  uint32_t h;\n  uint8_t qq[] = \"xThis is the time for all good men to come to the aid of their country...\";\n  uint32_t i;\n  uint8_t qqq[] = \"xxThis is the time for all good men to come to the aid of their country...\";\n  uint32_t j;\n  uint8_t qqqq[] = \"xxxThis is the time for all good men to come to the aid of their country...\";\n  uint32_t ref,x,y;\n  uint8_t *p;\n\n  printf(\"Endianness.  These lines should all be the same (for values filled in):\\n\");\n  printf(\"%.8x                            %.8x                            %.8x\\n\",\n         hashword((const uint32_t *)q, (sizeof(q)-1)/4, 13),\n         hashword((const uint32_t *)q, (sizeof(q)-5)/4, 13),\n         hashword((const uint32_t *)q, (sizeof(q)-9)/4, 13));\n  p = q;\n  printf(\"%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\\n\",\n         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),\n         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),\n         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),\n         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),\n         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),\n         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));\n  p = &qq[1];\n  printf(\"%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\\n\",\n         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),\n         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),\n         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),\n         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),\n         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),\n         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));\n  p = &qqq[2];\n  printf(\"%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\\n\",\n         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),\n         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),\n         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),\n         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),\n         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),\n         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));\n  p = &qqqq[3];\n  printf(\"%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\\n\",\n         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),\n         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),\n         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),\n         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),\n         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),\n         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));\n  printf(\"\\n\");\n  for (h=0, b=buf+1; h<8; ++h, ++b)\n  {\n    for (i=0; i<MAXLEN; ++i)\n    {\n      len = i;\n      for (j=0; j<i; ++j) *(b+j)=0;\n\n      /* these should all be equal */\n      ref = hashlittle(b, len, (uint32_t)1);\n      *(b+i)=(uint8_t)~0;\n      *(b-1)=(uint8_t)~0;\n      x = hashlittle(b, len, (uint32_t)1);\n      y = hashlittle(b, len, (uint32_t)1);\n      if ((ref != x) || (ref != y)) \n      {\n\tprintf(\"alignment error: %.8x %.8x %.8x %d %d\\n\",ref,x,y,\n               h, i);\n      }\n    }\n  }\n}\n\n/* check for problems with nulls */\n void driver4()\n{\n  uint8_t buf[1];\n  uint32_t h,i,state[HASHSTATE];\n\n\n  buf[0] = ~0;\n  for (i=0; i<HASHSTATE; ++i) state[i] = 1;\n  printf(\"These should all be different\\n\");\n  for (i=0, h=0; i<8; ++i)\n  {\n    h = hashlittle(buf, 0, h);\n    printf(\"%2ld  0-byte strings, hash is  %.8x\\n\", i, h);\n  }\n}\n\n\nint main()\n{\n  driver1();   /* test that the key is hashed: used for timings */\n  driver2();   /* test that whole key is hashed thoroughly */\n  driver3();   /* test that nothing but the key is hashed */\n  driver4();   /* test hashing multiple buffers (all buffers are null) */\n  return 1;\n}\n\n#endif  /* SELF_TEST */\n"
  },
  {
    "path": "src/madness/world/madness_exception.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file madness_exception.cc\n \\brief Implementation of \\c madness::MadnessException.\n \\ingroup libraries\n*/\n\n#include <madness/world/madness_exception.h>\n#include <cstdlib>\n#include <sstream>\n#include <iostream>\n\nnamespace madness {\n\n    std::ostream& operator<<(std::ostream& out, const MadnessException& e) {\n        out << \"--------------------------------------------------------------------------\" << std::endl;\n        out << \"\\nMadnessException : \\n\\n\";\n        if (e.msg) out << \"msg=\" << e.msg << \" :\\n \";\n        if (e.assertion) out << \"assertion=\" << e.assertion << \" \\n \";\n        out << \"--------------------------------------------------------------------------\" << std::endl;\n        out << \"value=\" << e.value << \" : \";\n        if (e.line) out << \"line=\" << e.line << \" : \";\n        if (e.function) out << \"function=\" << e.function << \" : \";\n        if (e.filename) out << \"filename='\" << e.filename << \"'\";\n        out << std::endl;\n        return out;\n    }\n\n    void exception_break(bool message) {\n        if(message)\n            std::cerr << \"A madness exception occurred. Place a break point at madness::exception_break to debug.\\n\";\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/madness_exception.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file madness_exception.h\n \\brief Defines \\c madness::MadnessException for exception handling.\n \\ingroup libraries\n\n By default, the \\c MADNESS_ASSERT macro throws a \\c madness::MadnessException.\n Configure options can specify other behaviors: \\c MADNESS_ASSERT can be\n    - THROW: (default) throw a \\c madness::MadnessException.\n    - ASSERT: defer to the standard \\c assert function.\n    - DISABLE: do nothing (ignore the assertion).\n    - ABORT: abort execution.\n*/\n\n#ifndef MADNESS_WORLD_MADNESS_EXCEPTION_H__INCLUDED\n#define MADNESS_WORLD_MADNESS_EXCEPTION_H__INCLUDED\n\n#include <cstdlib>\n#include <iosfwd>\n#include <exception>\n#include <madness/madness_config.h>\n#ifdef MADNESS_ASSERTIONS_ASSERT\n#  include <cassert>\n#endif\n\n#ifndef MADNESS_DISPLAY_EXCEPTION_BREAK_MESSAGE\n/// Display the exception break message unless otherwise specified.\n#define MADNESS_DISPLAY_EXCEPTION_BREAK_MESSAGE 1\n#endif\n\nnamespace madness {\n\n    /// Base class for exceptions thrown in MADNESS.\n\n    /// Most exceptions thrown in MADNESS should be derived from this.\n    class MadnessException : public std::exception {\n    public:\n        const char* msg; ///< The error message.\n        const char* assertion; ///< String describing the assertion.\n        const int value; ///< Value associated with the exception.\n        const int line; ///< Line number where the exception occurred.\n        const char *function; ///< Function where the exception occurred.\n        const char *filename; ///< File where the exception occurred.\n\n        /// Constructor that processes the requisite information.\n\n        /// Capturing the line/function/filename info is best done with the\n        /// macros listed below.\n        /// \\param[in] m The error message.\n        /// \\param[in] a String describing the exception.\n        /// \\param[in] v Value associated with the exception.\n        /// \\param[in] l Line number where the exception occurred.\n        /// \\param[in] fn Function where the exception occurred.\n        /// \\param[in] f File where the exception occurred.\n        MadnessException(const char* m, const char *a, int v,\n                         int l, const char *fn, const char *f)\n                : msg(m)\n                , assertion(a)\n                , value(v)\n                , line(l)\n                , function(fn)\n                , filename(f) {}\n\n        /// Returns the error message, as specified by `std::exception`.\n\n        /// \\return The error message.\n        virtual const char* what() const throw() {\n            return msg;\n        }\n    };\n\n    /// Enables easy printing of a \\c MadnessException.\n\n    /// \\param[in,out] out Output stream.\n    /// \\param[in] e The \\c MadnessException.\n    /// \\return The output stream.\n    std::ostream& operator <<(std::ostream& out, const MadnessException& e);\n\n    /// This function is executed just before a \\c MadnessException is thrown.\n\n    /// \\param[in] message True to print an error message to \\c cerr; false otherwise.\n    void exception_break(bool message);\n\n/// Macro for throwing a MADNESS exception.\n\n/// \\throws A \\c madness::MadnessException.\n/// \\param[in] msg The error message.\n/// \\param[in] value The value associated with the exception.\n#define MADNESS_EXCEPTION(msg,value)  { \\\n    madness::exception_break(MADNESS_DISPLAY_EXCEPTION_BREAK_MESSAGE); \\\n    throw madness::MadnessException(msg,0,value,__LINE__,__FUNCTION__,__FILE__); \\\n}\n\n// the following define/undef are for documentation purposes only.\n/// Assert a condition that should be free of side-effects since in release builds this might be a no-op.\n\n/// Depending on the configuration, one of the following happens if\n/// \\c condition is false:\n/// - a \\c madness::MadnessException is thrown.\n/// - `assert(condition)` is called.\n/// - execution is aborted.\n/// - nothing.\n/// \\param[in] condition The condition to be asserted.\n#define MADNESS_ASSERT(condition)\n#undef MADNESS_ASSERT\n\n/// Same as MADNESS_ASSERT , but never throws\n\n/// Behaves like MADNESS_ASSERT, except when the latter throws madness::MadnessException this aborts\n/// \\param[in] condition The condition to be asserted.\n#define MADNESS_ASSERT_NOEXCEPT(condition)\n#undef MADNESS_ASSERT_NOEXCEPT\n\n#ifdef MADNESS_ASSERTIONS_ABORT\n#  define MADNESS_ASSERT(condition) \\\n     do {if (!(condition)) { std::abort(); }} while (0)\n#  define MADNESS_ASSERT_NOEXCEPT(condition) MADNESS_ASSERT(condition)\n#endif\n\n#ifdef MADNESS_ASSERTIONS_DISABLE\n// this avoid unused variable warnings, see http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/\n#  define MADNESS_ASSERT(condition) do { (void)sizeof(condition);} while (0)    \n#  define MADNESS_ASSERT_NOEXCEPT(condition) MADNESS_ASSERT(condition)\n#endif\n\n#ifdef MADNESS_ASSERTIONS_ASSERT\n#  define MADNESS_ASSERT(condition) assert(condition)\n#  define MADNESS_ASSERT_NOEXCEPT(condition) MADNESS_ASSERT(condition)\n#endif\n\n#ifdef MADNESS_ASSERTIONS_THROW\n#  define MADNESS_ASSERT(condition) \\\n    do { \\\n        if (!(condition)) { \\\n            madness::exception_break(MADNESS_DISPLAY_EXCEPTION_BREAK_MESSAGE); \\\n            throw madness::MadnessException(\"MADNESS ASSERTION FAILED: \" , \\\n                                            (#condition),0,__LINE__,__FUNCTION__,__FILE__); \\\n        } \\\n    } while (0)\n#  define MADNESS_ASSERT_NOEXCEPT(condition) \\\n     do {if (!(condition)) { std::abort(); }} while (0)\n#endif\n\n// the following define/undef are for documentation purposes only.\n/// Check a condition --- even in a release build the condition is always evaluated so it can have side effects\n\n/// Depending on the configuration, one of the following happens if\n/// \\c condition is false:\n/// - a \\c madness::MadnessException is thrown.\n/// - execution is aborted.\n/// \\param[in] condition The condition to be checked.\n#define MADNESS_CHECK(condition)\n#undef MADNESS_CHECK\n\n// If madness assertions throw/assert/disabled, then madness checks throw.  Otherwise both assertions and checks abort.\n#ifdef MADNESS_ASSERTIONS_ABORT\n#  define MADNESS_CHECK(condition)                      \\\n    do {if (!(condition)) { std::abort(); }} while (0)\n#else\n#  define MADNESS_CHECK(condition)              \\\n    do { \\\n        if (!(condition)) { \\\n            madness::exception_break(MADNESS_DISPLAY_EXCEPTION_BREAK_MESSAGE); \\\n            throw madness::MadnessException(\"MADNESS CHECK FAILED: \" , \\\n                                            (#condition),0,__LINE__,__FUNCTION__,__FILE__); \\\n        } \\\n    } while (0)\n#endif\n\n\n// the following define/undef are for documentation purposes only.\n/// Check a condition --- even in a release build the condition is always evaluated so it can have side effects\n\n/// will always throw a madness::MadnessException, but will not print to stderr\n/// \\param[in] condition The condition to be checked.\n/// \\param[in] msg       The message to be printed\n#define MADNESS_CHECK_THROW(condition,msg)\n#undef MADNESS_CHECK_THROW\n\n#define MADNESS_CHECK_THROW(condition,msg)              \\\n  do { \\\n      if (!(condition)) { \\\n          throw madness::MadnessException(msg, (#condition),0,__LINE__,__FUNCTION__,__FILE__); \\\n      } \\\n  } while (0)\n\n\n} // namespace madness\n\n#endif // MADNESS_WORLD_MADNESS_EXCEPTION_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/mem_func_wrapper.h",
    "content": "/*\n  This file is a part of MADNESS.\n  Copyright (C) 2014  Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file mem_func_wrapper.h\n \\brief Defines tools for encapsulating a pointer to a member function.\n \\ingroup libraries\n\n The member pointer is stored, along with a pointer to the object with which\n it should be dereferenced.\n*/\n\n#ifndef MADNESS_WORLD_MEM_FUNC_WRAPPER_H__INCLUDED\n#define MADNESS_WORLD_MEM_FUNC_WRAPPER_H__INCLUDED\n\n#include <madness/world/madness_exception.h>\n\nnamespace madness {\n    namespace detail {\n\n        /// Default pointer to a. object of type \\c T.\n\n        /// Returns a null pointer, by default.\n        /// \\tparam T The pointer type.\n        template <typename T>\n        struct DefaultInitPtr {\n\n            /// Get a default pointer.\n\n            /// \\return \\c nullptr.\n            static T init() {\n                return nullptr;\n            }\n        }; // struct DefaultInitPtr\n\n\n        /// Default shared pointer to an object of type \\c T.\n\n        /// Returns a \\\"NULL\\\" shared pointer, by default. Specialization for\n        /// shared pointers.\n        /// \\tparam T The type pointed to by the shared pointer.\n        template <typename T>\n        struct DefaultInitPtr<std::shared_ptr<T> > {\n\n            /// Get a default shared pointer.\n\n            /// \\return Default shared pointer.\n            static std::shared_ptr<T> init() {\n                return std::shared_ptr<T>();\n            }\n        }; // struct DefaultInitPtr<std::shared_ptr<T> >\n\n        /// Functor wrapper for object and member function pointers.\n\n        /// This class encapsulates a pointer to an object and a member\n        /// pointer to a function of that object's type.\n        ///\n        /// \\tparam ptrT Pointer type.\n        /// \\tparam memfnT Member function pointer type.\n        /// \\tparam resT Result type of the member function.\n        template <typename ptrT, typename memfnT, typename resT>\n        class MemFuncWrapper {\n        private:\n            ptrT ptr_; ///< Pointer to the object.\n            memfnT memfn_; ///< Member function of the object's type.\n\n            friend memfnT get_mem_func_ptr<ptrT, memfnT, resT>(const MemFuncWrapper<ptrT, memfnT, resT>&);\n\n        public:\n            /// Alias for a wrapper that returns \\c void.\n            typedef MemFuncWrapper<ptrT, memfnT, void> MemFuncWrapper_;\n\n            /// Alias for the function's result type.\n            typedef resT result_type;\n\n            /// Alias for the type of the member function pointer.\n            typedef memfnT memfn_type;\n\n            /// \\brief Constructor that sets the pointer to the default value\n            ///     from `DefaultInitPtr<ptrT>`.\n            MemFuncWrapper()\n                : ptr_(DefaultInitPtr<ptrT>::init()), memfn_()\n            { }\n\n            /// \\brief Copy constructor that copies the object pointer and\n            ///     member function pointer.\n            MemFuncWrapper(const MemFuncWrapper_& other) :\n                ptr_(other.ptr_), memfn_(other.memfn_)\n            { }\n\n            /// \\brief Constructs a wrapper from an object pointer and a member\n            ///     function pointer.\n            ///\n            /// \\param[in] ptr The object pointer.\n            /// \\param[in] memfn The member function pointer.\n            MemFuncWrapper(ptrT ptr, memfnT memfn) :\n                ptr_(ptr), memfn_(memfn)\n            { }\n\n            /// Copy assignment operator.\n            ///\n            /// \\param[in] other The wrapper to be copied.\n            /// \\return This wrapper, which is now a copy of \\c other.\n            MemFuncWrapper_& operator=(const MemFuncWrapper_& other) {\n                ptr_ = other.ptr_;\n                memfn_ = other.memfn_;\n                return *this;\n            }\n\n            /// \\brief Evaluates the member function, when dereferenced from the\n            ///     object pointer.\n\n            /// \\tparam argTs Argument type pack.\n            /// \\param[in,out] args Argument parameter pack.\n            /// \\return The member function's return value.\n            template <typename... argTs>\n            result_type operator()(argTs&&... args) const {\n                MADNESS_ASSERT(ptr_);\n                return ((*ptr_).*memfn_)(std::forward<argTs>(args)...);\n            }\n\n            /// Serializes a \\c MemFuncWrapper.\n\n            /// \\tparam Archive The archive type.\n            /// \\param[in,out] ar The archive.\n            template <typename Archive>\n            void serialize(const Archive& ar) {\n                ar & ptr_ & memfn_;\n            }\n\n            friend memfnT get_mem_func_ptr(const MemFuncWrapper_& wrapper) {\n                return wrapper.memfn_;\n            }\n        }; // class MemFuncWrapper\n\n\n        /// Functor wrapper for object and member function pointers.\n\n        /// This is a specialization of \\c MemFuncWrapper for the case where\n        /// the member function has \\c void return type.\n        /// \\tparam ptrT Pointer type.\n        /// \\tparam memfnT Member function pointer type.\n        template <typename ptrT, typename memfnT>\n        class MemFuncWrapper<ptrT, memfnT, void> {\n        private:\n            ptrT ptr_; ///< Pointer to the object.\n            memfnT memfn_; ///< Pointer to the desired member function.\n\n            friend memfnT get_mem_func_ptr<ptrT, memfnT, void>(const MemFuncWrapper<ptrT, memfnT, void>&);\n\n        public:\n            /// Alias for a member function with \\c void return type.\n            typedef MemFuncWrapper<ptrT, memfnT, void> MemFuncWrapper_;\n\n            /// Alias for the function's return type.\n            typedef void result_type;\n\n            /// Alias for the member function pointer type.\n            typedef memfnT memfn_type;\n\n            /// Construct a wrapper with the default pointer for this type.\n            MemFuncWrapper()\n                : ptr_(DefaultInitPtr<ptrT>::init()), memfn_()\n            { }\n\n            /// Copy constructor.\n\n            /// \\param[in] other The wrapper to copy.\n            MemFuncWrapper(const MemFuncWrapper_& other) :\n                ptr_(other.ptr_), memfn_(other.memfn_)\n            { }\n\n            /// \\brief Construct a wrapper from an object pointer and a member\n            ///     function pointer.\n\n            /// \\param[in] ptr The object pointer.\n            /// \\param[in] memfn The member function pointer.\n            MemFuncWrapper(ptrT ptr, memfnT memfn) :\n                ptr_(ptr), memfn_(memfn)\n            { }\n\n            /// Copy assignment operator.\n            ///\n            /// \\param[in] other The wrapper to be copied.\n            /// \\return This wrapper, which is now a copy of \\c other.\n            MemFuncWrapper_& operator=(const MemFuncWrapper_& other) {\n                ptr_ = other.ptr_;\n                memfn_ = other.memfn_;\n                return *this;\n            }\n\n            /// \\brief Evaluates the member function, when dereferenced from the\n            ///     object pointer.\n\n            /// \\tparam argTs Argument type pack.\n            /// \\param[in,out] args Argument parameter pack.\n            template <typename... argTs>\n            void operator()(argTs&&... args) const {\n                MADNESS_ASSERT(ptr_);\n                ((*ptr_).*memfn_)(std::forward<argTs>(args)...);\n            }\n\n            /// Serializes a \\c MemFuncWrapper.\n\n            /// \\tparam Archive The archive type.\n            /// \\param[in,out] ar The archive.\n            template <typename Archive>\n            void serialize(const Archive& ar) {\n                ar & ptr_ & memfn_;\n            }\n\n        }; // class MemFuncWrapper<ptrT, memfnT, void>\n\n        /// \\brief Create a member function wrapper (\\c MemFuncWrapper) from an\n        ///     object and a member function pointer.\n\n        /// \\tparam objT The object type.\n        /// \\tparam memfnT The member function pointer type.\n        /// \\param[in] obj The object.\n        /// \\param[in] memfn The member function pointer.\n        /// \\return A wrapped member function pointer.\n        template <typename objT, typename memfnT>\n        MemFuncWrapper<objT*, memfnT, typename result_of<memfnT>::type>\n        wrap_mem_fn(objT& obj, memfnT memfn) {\n            return MemFuncWrapper<objT*, memfnT,\n                    typename memfunc_traits<memfnT>::result_type>(& obj, memfn);\n        }\n\n        /// \\brief Create a member function wrapper (\\c MemFuncWrapper) from a\n        ///     const object and a member function pointer.\n\n        /// \\tparam objT The object type.\n        /// \\tparam memfnT The member function pointer type.\n        /// \\param[in] obj The object.\n        /// \\param[in] memfn The member function pointer.\n        /// \\return A wrapped member function pointer.\n        template <typename objT, typename memfnT>\n        MemFuncWrapper<const objT*, memfnT, typename result_of<memfnT>::type>\n        wrap_mem_fn(const objT& obj, memfnT memfn) {\n            return MemFuncWrapper<const objT*, memfnT,\n                    typename memfunc_traits<memfnT>::result_type>(& obj, memfn);\n        }\n\n        /// \\brief Create a member function wrapper (\\c MemFuncWrapper) from a\n        ///     pointer and a member function pointer.\n\n        /// \\tparam objT The object type.\n        /// \\tparam memfnT The member function pointer type.\n        /// \\param[in] obj Pointer to the object.\n        /// \\param[in] memfn The member function pointer.\n        /// \\return A wrapped member function pointer.\n        template <typename objT, typename memfnT>\n        MemFuncWrapper<objT*, memfnT, typename result_of<memfnT>::type>\n        wrap_mem_fn(objT* obj, memfnT memfn) {\n            return MemFuncWrapper<objT*, memfnT,\n                    typename memfunc_traits<memfnT>::result_type>(obj, memfn);\n        }\n\n        /// \\brief Create a member function wrapper (\\c MemFuncWrapper) from a\n        ///     const pointer and a member function pointer.\n\n        /// \\tparam objT The object type.\n        /// \\tparam memfnT The member function pointer type.\n        /// \\param[in] obj Pointer to the object.\n        /// \\param[in] memfn The member function pointer.\n        /// \\return A wrapped member function pointer.\n        template <typename objT, typename memfnT>\n        MemFuncWrapper<const objT*, memfnT, typename result_of<memfnT>::type>\n        wrap_mem_fn(const objT* obj, memfnT memfn) {\n            return MemFuncWrapper<const objT*, memfnT,\n                    typename memfunc_traits<memfnT>::result_type>(obj, memfn);\n        }\n\n        /// \\brief Create a member function wrapper (\\c MemFuncWrapper) from a\n        ///     shared pointer and a member function pointer.\n\n        /// \\tparam objT The object type.\n        /// \\tparam memfnT The member function pointer type.\n        /// \\param[in] obj Shared pointer to the object.\n        /// \\param[in] memfn The member function pointer.\n        /// \\return A wrapped member function pointer.\n        template <typename objT, typename memfnT>\n        MemFuncWrapper<std::shared_ptr<objT>, memfnT, typename result_of<memfnT>::type>\n        wrap_mem_fn(std::shared_ptr<objT>& obj, memfnT memfn) {\n            return MemFuncWrapper<std::shared_ptr<objT>, memfnT,\n                    typename memfunc_traits<memfnT>::result_type>(obj, memfn);\n        }\n\n        /// \\brief Create a member function wrapper (\\c MemFuncWrapper) from a\n        ///     const shared pointer and a member function pointer.\n\n        /// \\tparam objT The object type.\n        /// \\tparam memfnT The member function pointer type.\n        /// \\param[in] obj Shared pointer to the object.\n        /// \\param[in] memfn The member function pointer.\n        /// \\return A wrapped member function pointer.\n        template <typename objT, typename memfnT>\n        MemFuncWrapper<std::shared_ptr<objT>, memfnT, typename result_of<memfnT>::type>\n        wrap_mem_fn(const std::shared_ptr<objT>& obj, memfnT memfn) {\n            return MemFuncWrapper<std::shared_ptr<objT>, memfnT,\n                    typename memfunc_traits<memfnT>::result_type>(obj, memfn);\n        }\n\n        /// Returns the member function pointer from a wrapper.\n\n        /// \\tparam ptrT Pointer type.\n        /// \\tparam memfnT Member function pointer type.\n        /// \\tparam resT Member function return type.\n        /// \\param wrapper Wrapper to the member function.\n        /// \\return The member function pointer.\n        template <typename ptrT, typename memfnT, typename resT>\n        memfnT get_mem_func_ptr(const MemFuncWrapper<ptrT, memfnT, resT>& wrapper) {\n            return wrapper.memfn_;\n        }\n\n    }  // namespace detail\n} // namespace madness\n\n#endif // MADNESS_WORLD_MEM_FUNC_WRAPPER_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/meta.h",
    "content": "/*\n * meta.h\n *\n *  Created on: Apr 15, 2017\n *      Author: evaleev\n */\n\n#ifndef SRC_MADNESS_WORLD_META_H_\n#define SRC_MADNESS_WORLD_META_H_\n\n#include <type_traits>\n\nnamespace madness {\nnamespace meta {  // to make it easier importing another MP library\n\n///////////////////////////////////////////////////////////////////////////////\n\n// import some existing C++17 features, or implement them\n// TODO remove when it is possible to use CUDA/NVCC with C++17\n#  if __cplusplus <= 201402L\n\ntemplate<typename... Ts>\nstruct make_void {\n  using type = void;\n};\ntemplate<typename... Ts>\nusing void_t = typename make_void<Ts...>::type;\n\ntemplate<class...> struct disjunction : std::false_type { };\ntemplate<class B1> struct disjunction<B1> : B1 { };\ntemplate<class B1, class... Bn>\nstruct disjunction<B1, Bn...>\n    : std::conditional_t<bool(B1::value), B1, disjunction<Bn...>>  { };\n\ntemplate<class... B>\ninline constexpr bool disjunction_v = disjunction<B...>::value;\n\ntemplate<class...> struct conjunction : std::true_type { };\ntemplate<class B1> struct conjunction<B1> : B1 { };\ntemplate<class B1, class... Bn>\nstruct conjunction<B1, Bn...>\n    : std::conditional_t<bool(B1::value), conjunction<Bn...>, B1> {};\n\ntemplate<class... B>\ninline constexpr bool conjunction_v = conjunction<B...>::value;\n\ntemplate< class T >\ninline constexpr bool is_function_v = std::is_function<T>::value;\n\ntemplate< class T >\ninline constexpr bool is_member_function_pointer_v = std::is_member_function_pointer<T>::value;\n\n# else\n\nusing std::void_t;\nusing std::disjunction;\nusing std::disjunction_v;\nusing std::conjunction;\nusing std::conjunction_v;\nusing std::is_function_v;\nusing std::is_member_function_pointer_v;\n\n#endif  // C++17 features\n\n\n///////////////////////////////////////////////////////////////////////////////\n\ntemplate <typename... P>\nstruct typelist {};\n\n///////////////////////////////////////////////////////////////////////////////\n\ntemplate <typename... Ts>\nstruct last_type {};\n\ntemplate <typename T0>\nstruct last_type<T0> {\n  typedef T0 type;\n};\n\ntemplate <typename T0, typename T1, typename... Ts>\nstruct last_type<T0, T1, Ts...> : last_type<T1, Ts...> {};\n\n///////////////////////////////////////////////////////////////////////////////\n\ntemplate <template <typename...> class MetaFn, typename CurrentTypelist,\n          typename... RestOfTypes>\nstruct drop_last_arg_and_apply_impl;\n\ntemplate <template <typename...> class MetaFn, typename... UpToT, typename T,\n          typename... Rest>\nstruct drop_last_arg_and_apply_impl<MetaFn, typelist<UpToT...>, T, Rest...> {\n  using type =\n      typename drop_last_arg_and_apply_impl<MetaFn, typelist<UpToT..., T>,\n                                            Rest...>::type;\n};\n\ntemplate <template <typename...> class MetaFn, typename... UpToLast,\n          typename Last>\nstruct drop_last_arg_and_apply_impl<MetaFn, typelist<UpToLast...>, Last> {\n  using type = MetaFn<UpToLast...>;\n};\n\ntemplate <template <typename...> class MetaFn, typename... Args>\nstruct drop_last_arg_and_apply {\n  using type =\n      typename drop_last_arg_and_apply_impl<MetaFn, typelist<>, Args...>::type;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n\ntemplate <template <typename...> class MetaFn, typename Callable,\n          typename CurrentTypelist, typename... RestOfTypes>\nstruct drop_last_arg_and_apply_callable_impl;\n\ntemplate <template <typename...> class MetaFn, typename Callable,\n          typename... UpToT, typename T, typename... Rest>\nstruct drop_last_arg_and_apply_callable_impl<MetaFn, Callable,\n                                             typelist<UpToT...>, T, Rest...> {\n  using type = typename drop_last_arg_and_apply_callable_impl<\n      MetaFn, Callable, typelist<UpToT..., T>, Rest...>::type;\n};\n\ntemplate <template <typename...> class MetaFn, typename Callable,\n          typename... UpToLast, typename Last>\nstruct drop_last_arg_and_apply_callable_impl<MetaFn, Callable,\n                                             typelist<UpToLast...>, Last> {\n  using type = MetaFn<Callable(UpToLast...)>;\n};\n\ntemplate <template <typename...> class MetaFn, typename Callable,\n          typename... Args>\nstruct drop_last_arg_and_apply_callable {\n  using type =\n      typename drop_last_arg_and_apply_callable_impl<MetaFn, Callable,\n                                                     typelist<>, Args...>::type;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n\n// nonesuch struct from Library Fundamentals V2, source from https://en.cppreference.com/w/cpp/experimental/nonesuch\n\nstruct nonesuch {\n  ~nonesuch() = delete;\n  nonesuch(nonesuch const&) = delete;\n  void operator=(nonesuch const&) = delete;\n};\n\n// is_detected family from Library Fundamentals V2, source from https://en.cppreference.com/w/cpp/experimental/is_detected\n\nnamespace detail {\n\ntemplate <class Default, class Enabler, template <class...> class Op,\n          class... Args>\nstruct detector {\n  using value_t = std::false_type;\n  using type = Default;\n};\n\ntemplate <class Default, template <class...> class Op, class... Args>\nstruct detector<Default, void_t<Op<Args...>>, Op, Args...> {\n  using value_t = std::true_type;\n  using type = Op<Args...>;\n};\n\n} // namespace detail\n\ntemplate <template<class...> class Op, class... Args>\nusing is_detected = typename detail::detector<nonesuch, void, Op, Args...>::value_t;\n\ntemplate <template<class...> class Op, class... Args>\nusing detected_t = typename detail::detector<nonesuch, void, Op, Args...>::type;\n\ntemplate <class Default, template<class...> class Op, class... Args>\nusing detected_or = detail::detector<Default, void, Op, Args...>;\n\ntemplate< template<class...> class Op, class... Args >\nconstexpr bool is_detected_v = is_detected<Op, Args...>::value;\n\ntemplate< class Default, template<class...> class Op, class... Args >\nusing detected_or_t = typename detected_or<Default, Op, Args...>::type;\n\ntemplate <class Expected, template<class...> class Op, class... Args>\nusing is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>;\n\ntemplate <class Expected, template<class...> class Op, class... Args>\nconstexpr bool is_detected_exact_v = is_detected_exact<Expected, Op, Args...>::value;\n\ntemplate <class To, template<class...> class Op, class... Args>\nusing is_detected_convertible = std::is_convertible<detected_t<Op, Args...>, To>;\n\ntemplate <class To, template<class...> class Op, class... Args>\nconstexpr bool is_detected_convertible_v = is_detected_convertible<To, Op, Args...>::value;\n\n}  // namespace meta\n}  // namespace madness\n\n#endif /* SRC_MADNESS_WORLD_META_H_ */\n"
  },
  {
    "path": "src/madness/world/mpi_archive.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file mpi_archive.h\n \\brief Implements archives to serialize data for MPI.\n \\ingroup serialization\n*/\n\n#ifndef MADNESS_WORLD_MPI_ARCHIVE_H__INCLUDED\n#define MADNESS_WORLD_MPI_ARCHIVE_H__INCLUDED\n\n#include <type_traits>\n#include <madness/world/archive.h>\n#include <madness/world/world.h>\n#include <madness/world/vector_archive.h>\n\nnamespace madness {\n    namespace archive {\n\n        /// \\addtogroup serialization\n        /// @{\n\n        /// Archive allowing serialization and point-to-point communication between processes with MPI.\n        class MPIRawOutputArchive : public BaseOutputArchive {\n            mutable World* world; ///< The world.\n            ProcessID dest; ///< The destination process.\n            int tag; ///< MPI communication tag.\n\n        public:\n            /// Construct an archive for sending data via MPI.\n\n            /// \\param[in] world The world.\n            /// \\param[in] dest The destination process.\n            /// \\param[in] tag MPI communication tag.\n            MPIRawOutputArchive(World& world, const ProcessID& dest, int tag=SafeMPI::MPIAR_TAG)\n                    : world(&world), dest(dest), tag(tag) {};\n\n            /// Serialize data and send it to the destination process.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// fundamental.\n            /// \\tparam T The data type to be sent.\n            /// \\param[in] t Pointer to the data to be sent.\n            /// \\param[in] n The number of data items to be sent.\n            template <class T>\n            inline\n            typename std::enable_if< is_trivially_serializable<T>::value, void >::type\n            store(const T* t, long n) const {\n                if (n > 0) {\n                    world->mpi.Send(t, n, dest, tag);\n                }\n            }\n        };\n\n        /// Archive allowing deserialization and point-to-point communication between processes with MPI.\n        class MPIRawInputArchive : public BaseInputArchive {\n            mutable World* world; ///< The world.\n            ProcessID src; ///< The source process.\n            int tag; ///< MPI communication tag.\n\n        public:\n            /// Construct an archive for receiving data via MPI.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] world The world.\n            /// \\param[in] src The source process.\n            /// \\param[in] tag MPI communication tag.\n            MPIRawInputArchive(World& world, const ProcessID& src, int tag=SafeMPI::MPIAR_TAG)\n                    : world(&world), src(src), tag(tag) {};\n\n            /// Receive data from the source process and deserialize it.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// fundamental.\n            /// \\tparam T The data type to receive.\n            /// \\param[out] t Pointer to where the data should be stored.\n            /// \\param[in] n The number of data items to receive.\n            template <class T>\n            inline\n            typename std::enable_if< is_trivially_serializable<T>::value, void >::type\n            load(T* t, long n) const {\n                if (n > 0) {\n                    world->mpi.Recv(t, n, src, tag);\n                }\n            }\n        };\n\n        /// Archive allowing buffering, serialization of data, and point-to-point communication between processes with MPI.\n        class MPIOutputArchive : public BaseOutputArchive {\n            mutable World* world; ///< The world.\n            ProcessID dest; ///< The destination process.\n            int tag; ///< MPI communication tag.\n            const std::size_t bufsize; ///< Size of the buffer.\n            mutable std::vector<unsigned char> v; ///< The buffer.\n            madness::archive::VectorOutputArchive var; ///< Archive for storing the buffer.\n\n        public:\n            /// Construct an archive for sending data via MPI.\n\n            /// \\param[in] world The world.\n            /// \\param[in] dest The destination process.\n            /// \\param[in] tag MPI communication tag.\n            MPIOutputArchive(World& world, const ProcessID& dest, int tag=SafeMPI::MPIAR_TAG)\n                    : world(&world), dest(dest), tag(tag), bufsize(1024*1024), v(), var(v) {\n                v.reserve(2*bufsize);\n            };\n\n            /// Serialize data and store it in the buffer.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// fundamental.\n            /// \\tparam T The data type to be serialized.\n            /// \\param[in] t Pointer to the data.\n            /// \\param[in] n Number of data items to serialize.\n            template <class T>\n            inline\n            typename std::enable_if< is_trivially_serializable<T>::value, void >::type\n            store(const T* t, long n) const {\n                if (v.size() > bufsize) flush();\n                if (n > 0) {\n                    var.store(t, n);\n                    if (v.size() > bufsize) flush();\n                }\n            }\n\n            /// Send all data in the buffer to the destination process.\n\n            /// \\todo Check out the \"?? why ??\" comment.\n            void flush() const {\n                if (v.size()) {\n                    world->mpi.Send(v.size(), dest, tag);\n                    world->mpi.Send(&v[0], v.size(), dest, tag);\n                    v.clear();\n                    if (v.capacity() < 2*bufsize)\n                        v.reserve(2*bufsize); // ?? why ??\n                }\n            };\n\n            /// Close the archive (i.e., send any data in the buffer).\n            void close() {\n                flush();\n            };\n\n            /// Destructor. Close the archive first, which may entail sending data.\n            ~MPIOutputArchive() {\n                close();\n            };\n        };\n\n        /// Archive allowing buffering, deserialization of data, and point-to-point communication between processes with MPI.\n        class MPIInputArchive : public BaseInputArchive {\n            mutable World* world; ///< The world.\n            ProcessID src; ///< The source process.\n            int tag; ///< MPI communication tag.\n            mutable std::vector<unsigned char> v; ///< The buffer.\n            madness::archive::VectorInputArchive var; ///< Archive for loading the buffer.\n\n        public:\n            /// Construct an archive for receiving data via MPI.\n\n            /// \\param[in] world The world.\n            /// \\param[in] src The source process.\n            /// \\param[in] tag MPI communication tag.\n            MPIInputArchive(World& world, const ProcessID& src, int tag=SafeMPI::MPIAR_TAG)\n                    : world(&world), src(src), tag(tag), v(), var(v) {};\n\n            /// Deserialize data and store it in the buffer.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// fundamental.\n            /// \\tparam T The data type to be deserialized.\n            /// \\param[out] t Pointer to the data.\n            /// \\param[in] n Number of data items to serialize.\n            template <class T>\n            inline\n            typename std::enable_if< is_trivially_serializable<T>::value, void >::type\n            load(T* t, long n) const {\n                if (n > 0) {\n                    if (!var.nbyte_avail()) {\n                        var.rewind();\n                        std::size_t m;\n                        world->mpi.Recv(m, src, tag);\n                        v.resize(m);\n                        world->mpi.Recv(v.data(), m, src, tag);\n                    }\n                    var.load(t, n);\n                }\n            }\n        };\n\n        /// Implementation of functions for storing the pre/postamble in MPI archives.\n\n        /// \\attention No type checking over MPI streams, for efficiency.\n        /// \\tparam T The data type.\n        template <class T>\n        struct ArchivePrePostImpl<MPIRawOutputArchive,T> {\n            /// Store the preamble.\n\n            /// \\param[in] ar The archive.\n            static void preamble_store(const MPIRawOutputArchive& ar) {};\n\n            /// Store the postamble.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_store(const MPIRawOutputArchive& ar) {};\n        };\n\n        /// Implementation of functions for loading the pre/postamble in MPI archives.\n\n        /// \\attention No type checking over MPI streams, for efficiency.\n        /// \\tparam T The data type.\n        template <class T>\n        struct ArchivePrePostImpl<MPIRawInputArchive,T> {\n            /// Load the preamble.\n\n            /// \\param[in] ar The archive.\n            static inline void preamble_load(const MPIRawInputArchive& ar) {};\n\n            /// Load the postamble.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_load(const MPIRawInputArchive& ar) {};\n        };\n\n        /// Implementation of functions for storing the pre/postamble in MPI archives.\n\n        /// \\attention No type checking over MPI streams, for efficiency.\n        /// \\tparam T The data type.\n        template <class T>\n        struct ArchivePrePostImpl<MPIOutputArchive,T> {\n            /// Store the preamble.\n\n            /// \\param[in] ar The archive.\n            static void preamble_store(const MPIOutputArchive& ar) {};\n\n            /// Store the postamble.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_store(const MPIOutputArchive& ar) {};\n        };\n\n        /// Implementation of functions for loading the pre/postamble in MPI archives.\n\n        /// \\attention No type checking over MPI streams, for efficiency.\n        /// \\tparam T The data type.\n        template <class T>\n        struct ArchivePrePostImpl<MPIInputArchive,T> {\n            /// Load the preamble.\n\n            /// \\param[in] ar The archive.\n            static inline void preamble_load(const MPIInputArchive& ar) {};\n\n            /// Load the postamble.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_load(const MPIInputArchive& ar) {};\n        };\n\n        /// @}\n    }\n}\n#endif // MADNESS_WORLD_MPI_ARCHIVE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/nodefaults.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#ifndef MADNESS_WORLD_NODEFAULTS_H__INCLUDED\n#define MADNESS_WORLD_NODEFAULTS_H__INCLUDED\n\n/// \\file nodefaults.h\n/// \\brief Implements NO_DEFAULTS\n\n\n/// Disables default copy constructor and assignment operators\n\n/// From http://home.pb.net/~tglenn/CPPNOTES.html. Inherit from this\n/// class in order to inhibit the automatic generation of the default\n/// copy constructor and the default assignment operator of the\n/// derived class.\nclass NO_DEFAULTS {\npublic:\n    NO_DEFAULTS() {}\n    NO_DEFAULTS(const NO_DEFAULTS&) = delete;\n    NO_DEFAULTS(NO_DEFAULTS&&) = delete;\n    NO_DEFAULTS& operator=(const NO_DEFAULTS&) = delete;\n    NO_DEFAULTS& operator=(NO_DEFAULTS&&) = delete;\n};\n\n#endif // MADNESS_WORLD_NODEFAULTS_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/parallel_archive.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_PARALLEL_ARCHIVE_H__INCLUDED\n#define MADNESS_WORLD_PARALLEL_ARCHIVE_H__INCLUDED\n\n/**\n \\file parallel_archive.h\n \\brief Implements \\c ParallelInputArchive and \\c ParallelOutputArchive for parallel serialization of data.\n \\ingroup serialization\n*/\n\n#include <type_traits>\n#include <madness/world/archive.h>\n#include <madness/world/binary_fstream_archive.h>\n#include <madness/world/world.h>\n#include <madness/world/worldgop.h>\n\n#include <unistd.h>\n#include <cstring>\n#include <cstdio>\n\nnamespace madness {\n    namespace archive {\n\n        /// \\addtogroup serialization\n        /// @{\n\n        /// Objects that implement their own parallel archive interface should derive from this class.\n        class ParallelSerializableObject {};\n\n\n        /// Base class for input and output parallel archives.\n\n        /// \\tparam Archive The local archive. Only tested for \\c BinaryFstreamInputArchive and \\c BinaryFstreamOutputArchive.\n        /// \\todo Should this class derive from \\c BaseArchive?\n        template <typename Archive>\n        class BaseParallelArchive {\n            World* world; ///< The world.\n            mutable Archive ar; ///< The local archive.\n            int nio; ///< Number of I/O nodes (always includes node zero).\n            bool do_fence=true; ///< If true (default), a read/write of parallel objects fences before and after I/O.\n            char fname[256]; ///< Name of the archive.\n            int nclient; ///< Number of clients of this node, including self. Zero if not I/O node.\n\n        public:\n            static const bool is_parallel_archive = true; ///< Mark this class as a parallel archive.\n\n            BaseParallelArchive(World& world, Archive& ar, int nio)\n                : world(&world)\n                , ar(ar)\n                , nio(nio)\n            {\n            \tfname[0] = 0;\n            \tset_nclient(world);\n            }\n\n\n            /// Default constructor.\n            template <typename X=Archive>\n            BaseParallelArchive(typename std::enable_if_t<std::is_same<X,BinaryFstreamInputArchive>::value || std::is_same<X,BinaryFstreamOutputArchive>::value,int> nio=0)\n                : world(nullptr), ar(), nio(nio), do_fence(true) {\n            }\n\n            /// Returns the process doing I/O for given node.\n\n            /// Currently assigned in a round-robin fashion to the first\n            /// \\c nio processes, except on IBM BG/P where we use every 64th.\n            /// \\param[in] rank The node to check.\n            /// \\return The process doing I/O for process \\c rank.\n            ProcessID io_node(ProcessID rank) const {\n                return rank%nio;\n            }\n\n            /// Returns the process doing I/O for this node.\n\n            /// \\return The process doing I/O for this node.\n            ProcessID my_io_node() const {\n                MADNESS_CHECK(world);\n                return io_node(world->rank());\n            }\n\n            /// Returns the number of I/O clients for this node, including self (zero if not an I/O node).\n\n            /// \\return The number of I/O clients for this node, including self (zero if not an I/O node).\n            int num_io_clients() const {\n                MADNESS_CHECK(world);\n                return nclient;\n            }\n\n            /// Returns true if this node is doing physical I/O.\n\n            /// \\return True if this node is doing physical I/O.\n            bool is_io_node() const {\n                MADNESS_CHECK(world);\n                return world->rank() == my_io_node();\n            }\n\n            /// Returns a pointer to the world.\n\n            /// \\return A pointer to the world.\n            World* get_world() const {\n                MADNESS_CHECK(world);\n                return world;\n            }\n\n            /// Opens the parallel archive.\n\n            /// \\attention When writing to a new archive, the number of writers\n            /// specified is used. When reading from an existing archive,\n            /// the number of `ionode`s is adjusted to to be the same as\n            /// the number that wrote the original archive. Presently,\n            /// we don't have logic to handle reading an archive using\n            /// fewer processes originally used to write it. If you\n            /// want to fix this have a look in worlddc.h for the only\n            /// spot that currently needs changing to make that work.\n            ///\n            /// \\note The default number of I/O nodes is one and there is an\n            /// arbitrary maximum of 50 set. On IBM BG/P the maximum\n            /// is nproc/64.\n            /// \\param[in] world The world.\n            /// \\param[in] filename Name of the file.\n            /// \\param[in] nwriter The number of writers.\n\n            template <typename X=Archive>\n            typename std::enable_if_t<std::is_same<X,BinaryFstreamInputArchive>::value || std::is_same<X,BinaryFstreamOutputArchive>::value,\n                                      void>\n            open(World& world, const char* filename, int nwriter=1) {\n                this->world = &world;\n                nio = nwriter;\n#if defined(HAVE_IBMBGP) || defined(HAVE_IBMBGQ)\n                /* Jeff believes that BG is designed to handle up to *\n                 * one file per node and I assume no more than 8 ppn */\n                int maxio = world.size()/8;\n#else\n                int maxio = 50;\n#endif\n                if (nio > maxio) nio = maxio; // Sanity?\n                if (nio > world.size()) nio = world.size();\n\n                MADNESS_CHECK(filename);\n                MADNESS_CHECK(strlen(filename)-1<sizeof(fname));\n                strcpy(fname,filename); // Save the filename for later\n                constexpr std::size_t bufsize=512;\n                char buf[bufsize];\n                MADNESS_CHECK(strlen(filename)+7 <= sizeof(buf));\n                snprintf(buf, bufsize, \"%s.%5.5d\", filename, world.rank());\n\n                // if file doesn't exist we have a race condition if this code is handled by a try/catch block\n                // check if file exists outside the (world.rank()==0) block\n                if (ar.is_input_archive and (not exists(world,filename))) {\n                    std::string msg = \"could not find file: \" + std::string(filename);\n                    throw std::runtime_error(msg);\n                }\n                if (world.rank() == 0) {\n                    ar.open(buf);\n                    ar & nio; // read/write nio from/to the archive\n                    MADNESS_CHECK(nio <= world.size());\n                }\n\n                // Ensure all agree on value of nio that may also have changed if reading\n                world.gop.broadcast(nio, 0);\n\n                // Other reader/writers can now open the local archive\n                if (is_io_node() && world.rank()) {\n                    ar.open(buf);\n                }\n\n                set_nclient(world);\n            }\n\n            // Count #client\n            void set_nclient(World& world) {\n\t\t\t\tProcessID me = world.rank();\n\t\t\t\tnclient=0;\n\t\t\t\tfor (ProcessID p=0; p<world.size(); ++p) if (io_node(p) == me) ++nclient;\n\n\t\t//                 if (is_io_node()) {\n\t\t//                     madness::print(\"I am an IO node with\",nclient,\"clients and file\",buf);\n\t\t//                 }\n\t\t//                 else {\n\t\t//                     madness::print(\"I am a client served by\",my_io_node(),fname);\n\t\t//                 }\n            }\n\n            /// Returns true if the named, unopened archive exists on disk with read access.\n\n            /// This is a collective operation.\n            /// \\param[in] world The world.\n            /// \\param[in] filename Name of the file.\n            /// \\return True if the named, unopened archive exists and is readable.\n            template <typename X=Archive>\n            static\n            typename std::enable_if_t<std::is_same<X,BinaryFstreamInputArchive>::value || std::is_same<X,BinaryFstreamOutputArchive>::value,\n                                      bool>\n            exists(World& world, const char* filename) {\n                constexpr std::size_t bufsize=512;\n                char buf[bufsize];\n                MADNESS_CHECK(strlen(filename)+7 <= sizeof(buf));\n                snprintf(buf,bufsize, \"%s.%5.5d\", filename, world.rank());\n                bool status;\n                if (world.rank() == 0)\n                    status = (access(buf, F_OK|R_OK) == 0);\n\n                world.gop.broadcast(status);\n\n                return status;\n            }\n\n            /// Closes the parallel archive.\n            void close() {\n                MADNESS_CHECK(world);\n                if (is_io_node()) ar.close();\n            }\n\n            /// Returns a reference to the local archive.\n\n            /// \\throw MadnessException If not an I/O node.\n            /// \\return A reference to the local archive.\n            Archive& local_archive() const {\n                MADNESS_CHECK(world);\n                MADNESS_CHECK(is_io_node());\n                return ar;\n            }\n\n            /// Same as `world.gop.broadcast_serializable(obj, root)`.\n\n            /// \\tparam objT Type of object to broadcast.\n            /// \\param[in] obj The object to broadcast.\n            /// \\param[in] root The root process for broadcasting.\n            template <typename objT>\n            void broadcast(objT& obj, ProcessID root) const {\n                get_world()->gop.broadcast_serializable(obj, root);\n            }\n\n            /// Deletes the files associated with the archive of the given name.\n\n            /// Presently assumes a shared file system since process zero does the\n            /// deleting.\n            /// \\param[in] world The world.\n            /// \\param[in] filename Base name of the file.\n            template <typename X=Archive>\n            static\n            typename std::enable_if_t<std::is_same<X,BinaryFstreamInputArchive>::value || std::is_same<X,BinaryFstreamOutputArchive>::value,\n                                      void>\n            remove(World& world, const char* filename) {\n                if (world.rank() == 0) {\n                    constexpr std::size_t bufsize=512;\n                    char buf[bufsize];\n                    MADNESS_CHECK(strlen(filename)+7 <= sizeof(buf));\n                    for (ProcessID p=0; p<world.size(); ++p) {\n                        snprintf(buf,bufsize, \"%s.%5.5d\", filename, p);\n                        if (::remove(buf)) break;\n                    }\n                }\n            }\n\n            /// Removes the files associated with the current archive.\n            void remove() {\n                MADNESS_CHECK(world);\n                remove(*world, fname);\n            }\n\n            /// Check if we should fence around a read/write operation.\n\n            /// \\return True if we should fence; false otherwise.\n            bool dofence() const {\n                return this->do_fence;\n            }\n\n            /// Set the flag for fencing around a read/write operation.\n\n            /// \\param[in] dofence True if we should fence; false otherwise.\n            void set_dofence(bool dofence) {\n                do_fence = dofence;\n            }\n        };\n\n\n        /// An archive for storing local or parallel data wrapping a \\c BinaryFstreamOutputArchive.\n\n        /// \\note Writes of process-local objects only store the data from process zero.\n        ///\n        /// \\note Writes of parallel containers (presently only \\c WorldContainer) store all data.\n        ///\n        /// Each of the server or I/O nodes creates a\n        /// \\c BinaryFstreamOutputArchive with the name `filename.rank`. Client\n        /// processes send their data to servers in a round-robin fashion.\n        ///\n        /// Process zero records the number of writers so that, when the archive is opened\n        /// for reading, the number of readers is forced to match.\n        template <class localarchiveT=BinaryFstreamOutputArchive>\n        class ParallelOutputArchive : public BaseParallelArchive<localarchiveT>, public BaseOutputArchive {\n        public:\n            using basear = BaseParallelArchive<localarchiveT>;\n\n            /// Default constructor.\n            //ParallelOutputArchive() {}\n\n            ParallelOutputArchive(World& world, localarchiveT& ar, int nio=1) : basear(world, ar, nio) {}\n\n            /// Creates a parallel archive for output with given base filename and number of I/O nodes.\n\n            /// \\param[in] world The world.\n            /// \\param[in] filename Base name of the file.\n            /// \\param[in] nio The number of I/O nodes.\n            ParallelOutputArchive(World& world, const char* filename, int nio=1)  {\n                basear::open(world, filename, nio);\n            }\n\n            /// Creates a parallel archive for output with given base filename and number of I/O nodes.\n\n            /// \\param[in] world The world.\n            /// \\param[in] filename Base name of the file.\n            /// \\param[in] nio The number of I/O nodes.\n            ParallelOutputArchive(World& world, const std::string filename, int nio=1)  {\n                basear::open(world, filename.c_str(), nio);\n            }\n\n            /// Flush any data in the archive.\n            void flush() {\n                if (basear::is_io_node()) basear::local_archive().flush();\n            }\n        };\n\n        /// An archive for storing local or parallel data, wrapping a \\c BinaryFstreamInputArchive.\n\n        /// \\note Reads of process-local objects load the values originally stored by process zero,\n        /// which is then broadcast to all processes.\n        ///\n        /// \\note Reads of parallel containers (presently only \\c WorldContainer) load all data.\n        ///\n        /// The number of I/O nodes or readers is presently ignored. It is\n        /// forced to be the same as the original number of writers and,\n        /// therefore, you cannot presently read an archive from a parallel job\n        /// with fewer total processes than the number of writers.\n        template <class localarchiveT=BinaryFstreamInputArchive>\n        class ParallelInputArchive : public BaseParallelArchive<localarchiveT>, public  BaseInputArchive {\n        public:\n            using basear = BaseParallelArchive<localarchiveT>;\n            /// Default constructor.\n            //ParallelInputArchive() {}\n\n            ParallelInputArchive(World& world, localarchiveT& ar, int nio=1) : basear(world, ar, nio) {}\n\n            /// Creates a parallel archive for input.\n\n            /// \\param[in] world The world.\n            /// \\param[in] filename Base name of the file.\n            /// \\param[in] nio The number of writers. Ignored, see above.\n            ParallelInputArchive(World& world, const char* filename, int nio=1) {\n                basear::open(world, filename, nio);\n            }\n\n            /// Creates a parallel archive for input.\n\n            /// \\param[in] world The world.\n            /// \\param[in] filename Base name of the file.\n            /// \\param[in] nio The number of writers. Ignored, see above.\n            ParallelInputArchive(World& world, const std::string filename, int nio=1) {\n                basear::open(world, filename.c_str(), nio);\n            }\n        };\n\n        /// Disable type info for parallel output archives.\n\n        /// \\tparam T The data type.\n        template <class T, class localarchiveT>\n        struct ArchivePrePostImpl<ParallelOutputArchive<localarchiveT>,T> {\n            /// Store the preamble for this data type in the parallel archive.\n\n            /// \\param[in] ar The archive.\n            static void preamble_store(const ParallelOutputArchive<localarchiveT>& ar) {}\n\n            /// Store the postamble for this data type in the parallel archive.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_store(const ParallelOutputArchive<localarchiveT>& ar) {}\n        };\n\n        /// Disable type info for parallel input archives.\n\n        /// \\tparam T The data type.\n        template <class T, class localarchiveT>\n        struct ArchivePrePostImpl<ParallelInputArchive<localarchiveT>,T> {\n            /// Load the preamble for this data type in the parallel archive.\n\n            /// \\param[in] ar The archive.\n            static inline void preamble_load(const ParallelInputArchive<localarchiveT>& ar) {}\n\n            /// Load the postamble for this data type in the parallel archive.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_load(const ParallelInputArchive<localarchiveT>& ar) {}\n        };\n\n        /// Specialization of \\c ArchiveImpl for parallel output archives.\n\n        /// \\attention No type-checking is performed.\n        /// \\tparam T The data type.\n        template <class T, class localarchiveT>\n        struct ArchiveImpl<ParallelOutputArchive<localarchiveT>, T> {\n            /// Store the data in the archive.\n\n            /// Parallel objects are forwarded to their implementation of parallel store.\n            ///\n            /// The function only appears (due to \\c enable_if) if \\c Q is a parallel\n            /// serializable object.\n            /// \\todo Is \\c Q necessary? I'm sure it is, but can't figure out why at a first glance.\n            /// \\tparam Q Description needed.\n            /// \\param[in] ar The parallel archive.\n            /// \\param[in] t The parallel object to store.\n            /// \\return The parallel archive.\n            template <typename Q>\n            static inline\n            typename std::enable_if<std::is_base_of<ParallelSerializableObject, Q>::value, const ParallelOutputArchive<localarchiveT>&>::type\n            wrap_store(const ParallelOutputArchive<localarchiveT>& ar, const Q& t) {\n                ArchiveStoreImpl<ParallelOutputArchive<localarchiveT>,T>::store(ar,t);\n                return ar;\n            }\n\n            /// Store the data in the archive.\n\n            /// Serial objects write only from process 0.\n            ///\n            /// The function only appears (due to \\c enable_if) if \\c Q is not\n            /// a parallel serializable object.\n            /// \\todo Same question about \\c Q.\n            /// \\tparam Q Description needed.\n            /// \\param[in] ar The parallel archive.\n            /// \\param[in] t The serial data.\n            /// \\return The parallel archive.\n            template <typename Q>\n            static inline\n            typename std::enable_if<!std::is_base_of<ParallelSerializableObject, Q>::value, const ParallelOutputArchive<localarchiveT>&>::type\n            wrap_store(const ParallelOutputArchive<localarchiveT>& ar, const Q& t) {\n                if (ar.get_world()->rank()==0) {\n                    ar.local_archive() & t;\n                }\n                return ar;\n            }\n        };\n\n        /// Specialization of \\c ArchiveImpl for parallel input archives.\n\n        /// \\attention No type-checking is performed.\n        /// \\tparam T The data type.\n        template <class T, class localarchiveT>\n        struct ArchiveImpl<ParallelInputArchive<localarchiveT>, T> {\n            /// Load the data from the archive.\n\n            /// Parallel objects are forwarded to their implementation of parallel load.\n            ///\n            /// The function only appears (due to \\c enable_if) if \\c Q is a parallel\n            /// serializable object.\n            /// \\todo Is \\c Q necessary? I'm sure it is, but can't figure out why at a first glance.\n            /// \\tparam Q Description needed.\n            /// \\param[in] ar The parallel archive.\n            /// \\param[out] t Where to put the loaded parallel object.\n            /// \\return The parallel archive.\n            template <typename Q>\n            static inline\n            typename std::enable_if<std::is_base_of<ParallelSerializableObject, Q>::value, const ParallelInputArchive<localarchiveT>&>::type\n            wrap_load(const ParallelInputArchive<localarchiveT>& ar, const Q& t) {\n                ArchiveLoadImpl<ParallelInputArchive<localarchiveT>,T>::load(ar,const_cast<T&>(t));\n                return ar;\n            }\n\n            /// Load the data from the archive.\n\n            /// Serial objects are read only from process 0 and then broadcasted.\n            ///\n            /// The function only appears (due to \\c enable_if) if \\c Q is not\n            /// a parallel serializable object.\n            /// \\todo Same question about \\c Q.\n            /// \\tparam Q Description needed.\n            /// \\param[in] ar The parallel archive.\n            /// \\param[out] t Where to put the loaded data.\n            /// \\return The parallel archive.\n            template <typename Q>\n            static inline\n            typename std::enable_if<!std::is_base_of<ParallelSerializableObject, Q>::value, const ParallelInputArchive<localarchiveT>&>::type\n            wrap_load(const ParallelInputArchive<localarchiveT>& ar, const Q& t) {\n                if (ar.get_world()->rank()==0) {\n                    ar.local_archive() & t;\n                }\n                ar.broadcast(const_cast<T&>(t), 0);\n                return ar;\n            }\n        };\n\n\n        /// Write the archive array only from process zero.\n\n        /// \\tparam T The array data type.\n        template <class T, class localarchiveT>\n        struct ArchiveImpl< ParallelOutputArchive<localarchiveT>, archive_array<T> > {\n            /// Store the \\c archive_array in the parallel archive.\n\n            /// \\param[in] ar The parallel archive.\n            /// \\param[in] t The array to store.\n            /// \\return The parallel archive.\n            static inline const ParallelOutputArchive<localarchiveT>& wrap_store(const ParallelOutputArchive<localarchiveT>& ar, const archive_array<T>& t) {\n                if (ar.get_world()->rank() == 0) ar.local_archive() & t;\n                return ar;\n            }\n        };\n\n        /// Read the archive array and broadcast.\n\n        /// \\tparam T The array data type.\n        template <class T, class localarchiveT>\n        struct ArchiveImpl< ParallelInputArchive<localarchiveT>, archive_array<T> > {\n            /// Load the \\c archive_array from the parallel archive and broadcast it.\n\n            /// \\param[in] ar The parallel archive.\n            /// \\param[out] t Where to put the loaded array.\n            /// \\return The parallel archive.\n            static inline const ParallelInputArchive<localarchiveT>& wrap_load(const ParallelInputArchive<localarchiveT>& ar, const archive_array<T>& t) {\n                if (ar.get_world()->rank() == 0) ar.local_archive() & t;\n                ar.broadcast(t, 0);\n                return ar;\n            }\n        };\n\n        /// Forward a fixed-size array to \\c archive_array.\n\n        /// \\tparam T The array data type.\n        /// \\tparam n The number of items in the array.\n        template <class T, std::size_t n, typename localarchiveT>\n        struct ArchiveImpl<ParallelOutputArchive<localarchiveT>, T[n]> {\n            /// Store the array in the parallel archive.\n\n            /// \\param[in] ar The parallel archive.\n            /// \\param[in] t The array to store.\n            /// \\return The parallel archive.\n            static inline const ParallelOutputArchive<localarchiveT>& wrap_store(const ParallelOutputArchive<localarchiveT>& ar, const T(&t)[n]) {\n                ar << wrap(&t[0],n);\n                return ar;\n            }\n        };\n\n        /// Forward a fixed-size array to \\c archive_array.\n\n        /// \\tparam T The array data type.\n        /// \\tparam n The number of items in the array.\n        template <class T, std::size_t n, typename localarchiveT>\n        struct ArchiveImpl<ParallelInputArchive<localarchiveT>, T[n]> {\n            /// Load the array from the parallel archive.\n\n            /// \\param[in] ar The parallel archive.\n            /// \\param[out] t Where to put the loaded array.\n            /// \\return The parallel archive.\n            static inline const ParallelInputArchive<localarchiveT>& wrap_load(const ParallelInputArchive<localarchiveT>& ar, const T(&t)[n]) {\n                ar >> wrap(&t[0],n);\n                return ar;\n            }\n        };\n\n        /// @}\n    }\n}\n\n#endif // MADNESS_WORLD_PARALLEL_ARCHIVE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/parallel_dc_archive.h",
    "content": "#ifndef MAD_PARALLEL_DC_ARCHIVE_H_INCLUDED\n#define MAD_PARALLEL_DC_ARCHIVE_H_INCLUDED\n\n#include <madness/world/MADworld.h>\n#include <madness/world/worlddc.h>\n#include <madness/world/vector_archive.h>\n\nnamespace madness {\n\n\n\n    namespace archive {\n        \n        class ContainerRecordOutputArchive : public BaseOutputArchive {\n        public:\n            using keyT = long;\n        private:\n            using containerT = WorldContainer<keyT,std::vector<unsigned char>>;\n            World& subworld;\n            keyT key;\n            containerT& dc; // lifetime???\n            std::vector<unsigned char> v;\n            VectorOutputArchive ar;\n            \n        public:\n\n            ContainerRecordOutputArchive(World& subworld, containerT& dc, const keyT& key)\n                : subworld(subworld)\n                , key(key)\n                , dc(dc)\n                , v()\n                , ar(v)\n            {}\n            \n            ~ContainerRecordOutputArchive()\n            {\n                close();\n            }\n\n            VectorOutputArchive& get_archive() {\n                return ar;\n            }\n            template <class T>\n            inline\n            typename std::enable_if< madness::is_trivially_serializable<T>::value, void >::type\n            store(const T* t, long n) const {\n                MADNESS_CHECK(subworld.rank() == 0);\n                ar.store(t, n);\n            }\n            \n            void open() {}\n            \n            void flush() {}\n            \n            void close() {\n                if (subworld.rank() == 0) dc.replace(key,v);\n            }\n        };\n        \n        class ContainerRecordInputArchive : public BaseInputArchive {\n            using keyT = long;\n            using containerT = WorldContainer<keyT,std::vector<unsigned char>>;\n            ProcessID rank;\n            std::vector<unsigned char> v;\n            VectorInputArchive ar;\n            \n        public:\n            ContainerRecordInputArchive(World& subworld, const containerT& dc, const keyT& key)\n                : rank(subworld.rank())\n                , v()\n                , ar(v)\n            {\n                if (rank==0) {\n                    containerT::const_iterator it = dc.find(key).get();\n                    if (it != dc.end()) {\n                        v = it->second;\n                    }\n                    else {\n                    \tstd::cout << \"key \" << key << \" in world \" << subworld.id()\n                    \t\t\t<< \"dc.world \" << dc.get_world().id() << std::endl;\n                        MADNESS_EXCEPTION(\"record not found\", key);\n                    }\n                }\n            }\n            \n            ~ContainerRecordInputArchive()\n            {}\n            \n            template <class T>\n            inline\n            typename std::enable_if< madness::is_trivially_serializable<T>::value, void >::type\n            load(T* t, long n) const {\n                MADNESS_CHECK(rank == 0);\n                ar.load(t,n);\n            }\n            \n            void open() {}\n            \n            void flush() {}\n            \n            void close() {}\n        };\n\n\n        /// Implementation of functions for storing the pre/postamble in ContainerRecord archives.\n\n        /// \\attention No type checking over Vector buffers, for efficiency.\n        /// \\tparam T The data type.\n        template <class T>\n        struct ArchivePrePostImpl<ContainerRecordOutputArchive,T> {\n            /// Store the preamble.\n\n            /// \\param[in] ar The archive.\n            static void preamble_store(const ContainerRecordOutputArchive& ar) {};\n\n            /// Store the postamble.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_store(const ContainerRecordOutputArchive& ar) {};\n        };\n\n        /// Implementation of functions for loading the pre/postamble in ContainerRecord archives.\n\n        /// \\attention No type checking over ContainerRecord buffers, for efficiency.\n        /// \\tparam T The data type.\n        template <class T>\n        struct ArchivePrePostImpl<ContainerRecordInputArchive,T> {\n            /// Load the preamble.\n\n            /// \\param[in] ar The archive.\n            static inline void preamble_load(const ContainerRecordInputArchive& ar) {};\n\n            /// Load the postamble.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_load(const ContainerRecordInputArchive& ar) {};\n        };\n\n        // Forward storing to VectorOutputArchive\n        template <class keyT, class valueT>\n        struct ArchiveStoreImpl< ParallelOutputArchive<ContainerRecordOutputArchive>, WorldContainer<keyT,valueT> > {\n            static void store(const ParallelOutputArchive<ContainerRecordOutputArchive>& ar, const WorldContainer<keyT,valueT>& t) {\n                std::vector<unsigned char> v;\n                VectorOutputArchive dummyar(v,0);\n                const int me = ar.get_world()->rank();\n\n                // Need to pass local archive by reference\n                ParallelOutputArchive<VectorOutputArchive> par(*(ar.get_world()), (me==0) ? ar.local_archive().get_archive() : dummyar);\n                par & t;\n\n            }\n        };\n\n        \n\n    }\n\n\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/world/parsec.cc",
    "content": "#include <madness/madness_config.h>\n\n#ifdef HAVE_PARSEC\n#include \"parsec.h\"\n#include <iostream>\n#include \"thread.h\"\n#include <parsec/parsec_internal.h>\n\n#include <cinttypes>\n\n// Here we initialize with the right child class\nnamespace madness {\n#ifndef MADNESS_ASSERTIONS_DISABLE\n    static thread_local bool within_madness_task = false;\n#endif\n\n    parsec_hook_return_t complete_madness_task_execution (parsec_execution_stream_t *es,\n                                                          parsec_task_t *task) {\n        (void)es;\n        task->taskpool->tdm.module->taskpool_addto_nb_tasks(task->taskpool, -1);\n        return PARSEC_HOOK_RETURN_DONE;\n    }\n\n    parsec_hook_return_t release_madness_task (parsec_execution_stream_t *es, \n                                               parsec_task_t *task) {\n        PoolTaskInterface *c = ((PoolTaskInterface **)task->locals)[0];\n        assert(c);\n        (void)es;\n        delete(c);\n        return PARSEC_HOOK_RETURN_DONE;\n    }\n\n    parsec_hook_return_t run_madness_task(parsec_execution_stream_t *eu,\n                                          parsec_task_t *task) {\n        PoolTaskInterface *c = ((PoolTaskInterface **)task->locals)[0];\n        assert(c);\n#ifndef MADNESS_ASSERTIONS_DISABLE\n        within_madness_task = true;\n#endif\n        c->run(TaskThreadEnv(1, 0, 0));\n#ifndef MADNESS_ASSERTIONS_DISABLE\n        within_madness_task = false;\n#endif\n        return PARSEC_HOOK_RETURN_DONE;\n    }\n\n    static parsec_hook_return_t empty_hook (parsec_execution_stream_t *es,\n                                            parsec_task_t *task) {\n        (void)es; (void)task;\n        return PARSEC_HOOK_RETURN_DONE;\n    }\n\n    static const __parsec_chore_t __RUN_chores[] = {\n            {.type = PARSEC_DEV_CPU, .evaluate = NULL, .hook = run_madness_task},\n            {.type = PARSEC_DEV_NONE, .evaluate = NULL, .hook = (parsec_hook_t *) NULL},\n    };\n\n    static int madness_parsec_update_runtime_nb_tasks(parsec_taskpool_t *tp, int32_t nb_tasks) {\n         return tp->tdm.module->taskpool_addto_nb_tasks(tp, nb_tasks);\n    }\n\n    static parsec_key_t madness_parsec_make_key(const parsec_taskpool_t *tp, const parsec_assignment_t *assignments) {\n        return (parsec_key_t)( reinterpret_cast<intptr_t> ( *(const void**)assignments ) );\n    }\n\n    static int madness_parsec_key_equal(parsec_key_t a, parsec_key_t b, void *user_data) {\n        return a == b;\n    }\n\n    static char *madness_parsec_key_print(char *buffer, size_t buffer_size, parsec_key_t k, void *user_data) {\n        snprintf(buffer, buffer_size, \"MADNESS_TASK(%\" PRIxPTR \")\", k);\n        return buffer;\n    }\n\n    static uint64_t madness_parsec_key_hash(parsec_key_t k, void *user_data) {\n        return (uint64_t)k;\n    }\n\n    static parsec_key_fn_t madness_parsec_key_fns = {\n        .key_equal = madness_parsec_key_equal,\n        .key_print = madness_parsec_key_print,\n        .key_hash  = madness_parsec_key_hash\n    };\n\n    const parsec_task_class_t madness_parsec_tc = {\n            .name = (char*)\"RUN\",\n            .flags = PARSEC_HAS_IN_IN_DEPENDENCIES | PARSEC_USE_DEPS_MASK,\n            .task_class_id = 0,\n            .nb_flows = 0,\n            .nb_parameters = 0,\n            .nb_locals = 0,\n            .task_class_type = 0,\n            .dependencies_goal = 0,\n            .params = {NULL,NULL,NULL, NULL},\n            .locals = {NULL,NULL,NULL, NULL},\n            .in = {NULL, NULL, NULL, NULL},\n            .out = {NULL, NULL, NULL, NULL},\n            .priority = NULL,\n            .properties = NULL,\n            .initial_data = NULL,\n            .final_data = NULL,\n            .data_affinity = NULL,\n            .key_functions = &madness_parsec_key_fns,\n            .make_key = madness_parsec_make_key,\n            .task_snprintf = NULL,\n#if defined(PARSEC_PROF_TRACE)\n            .profile_info = NULL,\n#endif\n#if defined(PARSEC_SIM)\n            .sim_cost_fct = (parsec_sim_cost_fct_t*) NULL,\n#endif\n            .get_datatype = (parsec_datatype_lookup_t *) NULL,\n            .prepare_input = empty_hook,\n            .incarnations = __RUN_chores,\n            .prepare_output = (parsec_hook_t *) NULL,\n\n            .find_deps = (parsec_find_dependency_fn_t*)NULL,\n            .update_deps = NULL,\n\n            .iterate_successors = (parsec_traverse_function_t *) NULL,\n            .iterate_predecessors = (parsec_traverse_function_t *) NULL,\n            .release_deps = (parsec_release_deps_t *) NULL,\n            .complete_execution = complete_madness_task_execution,\n            .new_task = (parsec_new_task_function_t*) NULL,\n            .release_task = release_madness_task, //object delete,\n            .fini = (parsec_hook_t *) NULL,\n    };\n\n    static int parsec_madness_taskpool_enter_wait(parsec_taskpool_t* tp, void*_)\n    {\n        assert(tp != NULL);\n        assert(NULL != tp->tdm.module);\n        (void)_;\n        tp->tdm.module->taskpool_ready(tp);\n        return PARSEC_SUCCESS;\n    }\n\n    static int parsec_madness_taskpool_leave_wait(parsec_taskpool_t* tp, void*_b)\n    {\n        assert(tp != NULL);\n        assert(NULL != tp->tdm.module);\n\n        bool restart = *(bool*)_b;\n\n        if(!restart) {\n            /* This is the final taskpool_wait: we don't want to restart the termination\n             * detection and re-attach to the context. */\n            return PARSEC_SUCCESS;\n        }\n\n        /* Reset termination detector, so we can start adding tasks again */\n        tp->tdm.module->monitor_taskpool(tp, parsec_taskpool_termination_detected);\n        tp->tdm.module->taskpool_set_nb_tasks(tp, 0);\n        tp->tdm.module->taskpool_set_runtime_actions(tp, 0); \n\n        /* We are re-attached to the context */\n        parsec_atomic_fetch_inc_int32(&tp->context->active_taskpools);\n        return PARSEC_SUCCESS;\n    }\n\n    const parsec_task_class_t* madness_parsec_tc_array[]= {&(madness::madness_parsec_tc), NULL};\n    parsec_taskpool_t *ParsecRuntime::tp = nullptr;\n    parsec_context_t *ParsecRuntime::ctx = nullptr;\n    std::optional<bool> ParsecRuntime::made_new_ctx{};\n    parsec_execution_stream_t *ParsecRuntime::madness_comm_thread_es = nullptr;\n    bool ParsecRuntime::parsec_restart_taskpool = true;\n#ifdef PARSEC_PROF_TRACE\n    int ParsecRuntime::taskpool_profiling_array[2];\n#endif\n    ParsecRuntime::ParsecRuntime(int nb_threads) {\n        if (ctx == nullptr) {\n          /* Scheduler init*/\n          int argc = 1;\n          char *argv[2] = {(char *)\"madness-app\", nullptr};\n          char **pargv = (char **)argv;\n          ctx = parsec_init(nb_threads, &argc, &pargv);\n          MPI_Comm parsec_comm = MPI_COMM_SELF;\n          parsec_remote_dep_set_ctx(ctx, (intptr_t)parsec_comm);\n          made_new_ctx = true;\n        }\n        else {\n          made_new_ctx = false;\n        }\n        parsec_restart_taskpool = true;\n\n        tp = PARSEC_OBJ_NEW(parsec_taskpool_t);\n        tp->taskpool_name = strdup(\"MADNESS taskpool\");\n        tp->devices_index_mask = PARSEC_DEVICES_ALL;\n        tp->nb_task_classes = 1;\n        tp->task_classes_array = madness_parsec_tc_array;\n        tp->update_nb_runtime_task = madness_parsec_update_runtime_nb_tasks;\n        tp->on_enter_wait = parsec_madness_taskpool_enter_wait;\n        tp->on_leave_wait = parsec_madness_taskpool_leave_wait;\n        tp->on_leave_wait_data = &parsec_restart_taskpool;\n\n        parsec_termdet_open_module(tp, (char*)\"local\");\n        tp->tdm.module->monitor_taskpool(tp, parsec_taskpool_termination_detected);\n        tp->tdm.module->taskpool_set_nb_tasks(tp, 0);\n        tp->tdm.module->taskpool_set_runtime_actions(tp, 0); \n#ifdef PARSEC_PROF_TRACE\n        tp->profiling_array = ParsecRuntime::taskpool_profiling_array;\n        parsec_profiling_add_dictionary_keyword(\"MADNESS TASK\", \"fill:CC2828\", 0, \"\",\n                                                (int *)&tp->profiling_array[0],\n                                                (int *)&tp->profiling_array[1]);\n#endif\n        if( 0 != parsec_context_add_taskpool(ctx, tp) ) {\n            std::cerr << \"ERROR!!! parsec_context_add_taskpool failed!!\" << std::endl;\n            MADNESS_EXCEPTION(\"ParsecRuntime::ParsecRuntime(): MADNESS taskpool could not be added to the PaRSEC context\", 0);\n        }\n        if( 0 != parsec_context_start(ctx) ) {\n            std::cerr << \"ERROR!!! context_context_start failed!!\" << std::endl;\n            MADNESS_EXCEPTION(\"ParsecRuntime::ParsecRuntime(): PaRSEC context could not be started\", 0);\n        }\n    }\n\n    void ParsecRuntime::initialize_with_existing_context(parsec_context_t* ctx) {\n        ParsecRuntime::ctx = ctx;\n    }\n\n\n    ParsecRuntime::~ParsecRuntime() {\n        parsec_restart_taskpool = false;\n        parsec_taskpool_wait(tp);\n        parsec_taskpool_free(tp);\n        assert(made_new_ctx.has_value());\n        if (*made_new_ctx) {\n            parsec_context_wait(ctx);\n            parsec_fini(&ctx);\n            ctx = nullptr;\n        }\n        if (nullptr != madness_comm_thread_es) {\n              /* madness_comm_thread_es is just a copy of ES[0]. Resources (including es->profiling_es) are\n             * actually freed during parsec_fini. Just need to free memory allocated to store it. */\n              free(madness_comm_thread_es);\n              madness_comm_thread_es = nullptr;\n        }\n    }\n\n    parsec_context_t *ParsecRuntime::context() { return ctx; }\n\n    parsec_execution_stream_t *ParsecRuntime::execution_stream() {\n        parsec_execution_stream_t *my_es;\n        my_es = parsec_my_execution_stream();\n        if(nullptr == my_es) {\n            my_es = context()->virtual_processes[0]->execution_streams[0];\n        }\n        assert(nullptr != my_es);\n        return my_es;\n    }\n\n    parsec_task_t *ParsecRuntime::task(bool is_high_priority, void *ptr) {\n        parsec_execution_stream_t *my_es = execution_stream();\n        parsec_task_t* parsec_task = static_cast<parsec_task_t*>( parsec_thread_mempool_allocate( my_es->context_mempool ) );\n        PARSEC_LIST_ITEM_SINGLETON(parsec_task);\n        parsec_task->taskpool   = tp;\n        parsec_task->task_class = &madness_parsec_tc;\n        parsec_task->chore_mask = 1<<0;\n        parsec_task->status     = PARSEC_TASK_STATUS_NONE;\n        parsec_task->priority   = is_high_priority ? 1000 : 0; // 1 & 0 would work as good\n        ((void **)parsec_task->locals)[0] = ptr;\n        return parsec_task;\n    }\n\n    void ParsecRuntime::delete_parsec_task(parsec_task_t *task) {\n        parsec_thread_mempool_free( task->mempool_owner, task );\n    }\n\n    void ParsecRuntime::schedule(PoolTaskInterface *task) {\n        parsec_task_t* parsec_task = task->parsec_task;\n        parsec_task_t* vp_parsec_task[1] = {parsec_task};\n        PARSEC_LIST_ITEM_SINGLETON(parsec_task);\n        tp->tdm.module->taskpool_addto_nb_tasks(tp, 1);\n\n        parsec_execution_stream_t *es = parsec_my_execution_stream();\n        if(nullptr == es) {\n#ifndef MADNESS_ASSERTIONS_DISABLE\n            if(nullptr != madness_comm_thread_es) {\n                std::cerr << \"!!! ERROR: the PaRSEC task backend expected at most one MADNESS communication thread.\\n\";\n                MADNESS_EXCEPTION(\"ParsecRuntime::schedule(): more than one MADNESS communication thread\", 0);\n            }\n#endif\n            /* We are the MADNESS comm thread, which doesn't have a parsec execution stream.\n             * Let's assign one... It's mostly a copy of 0, except for the profiling if this is enabled */\n            madness_comm_thread_es = (parsec_execution_stream_t *)calloc(1, sizeof(parsec_execution_stream_t));\n            memcpy(madness_comm_thread_es, context()->virtual_processes[0]->execution_streams[0], sizeof(parsec_execution_stream_t));\n            /* This thread doesn't get a scheduler object: schedule happens on computation threads */\n            madness_comm_thread_es->scheduler_object = nullptr;\n#if defined(PARSEC_PROF_TRACE)\n            madness_comm_thread_es->es_profile = parsec_profiling_stream_init(2*1024*1024, \"MADNESS Comm thread\");\n            parsec_profiling_set_default_thread(madness_comm_thread_es->es_profile);\n#endif /* PARSEC_PROF_TRACE */\n            parsec_set_my_execution_stream(madness_comm_thread_es);\n            es = madness_comm_thread_es;\n        }\n\n        __parsec_schedule_vp(es, vp_parsec_task, is_main_thread() ? 1 : 0);\n    }\n\n    void ParsecRuntime::wait() {\n#ifndef MADNESS_ASSERTIONS_DISABLE\n        if(within_madness_task) {\n            std::cerr << \"!!! ERROR: the PaRSEC task backend does not support recursive calls to wait.\\n\"\n                      << \"!!! ERROR: this is usually a symptom that a task is forcing a future that is not ready.\\n\";\n            MADNESS_EXCEPTION(\"ParsecRuntime::wait(): recursive call to wait/test detected\", 0);\n        }\n#endif\n        parsec_taskpool_wait(tp);\n    }\n\n    int ParsecRuntime::test() {\n#ifndef MADNESS_ASSERTIONS_DISABLE\n        if(within_madness_task) {\n            std::cerr << \"!!! ERROR: the PaRSEC task backend does not support recursive calls to wait.\\n\"\n                      << \"!!! ERROR: this is usually a symptom that a task is forcing a future that is not ready.\\n\";\n            MADNESS_EXCEPTION(\"ParsecRuntime::wait(): recursive call to wait/test detected\", 0);\n        }\n#endif\n        int rc = parsec_taskpool_test(tp);\n        assert(rc >= 0);\n        return rc;\n    }\n\n    extern \"C\"{\n\n#include <stdio.h>\n\n    }\n}\n#endif\n"
  },
  {
    "path": "src/madness/world/parsec.h",
    "content": "#ifndef MADNESS_PARSEC_INCLUED\n#define MADNESS_PARSEC_INCLUED\n\n#include <madness/madness_config.h>\n\n#ifdef HAVE_PARSEC\n\n#include <parsec.h>\n#include <parsec/parsec_config.h>\n#include <parsec/parsec_internal.h>\n#include <parsec/mca/device/device.h>\n#include <parsec/execution_stream.h>\n#include <parsec/scheduling.h>\n\n#include <iostream>\n#include <optional>\n\nnamespace madness{\n\n    class PoolTaskInterface;\n\n    class ParsecRuntime {\n    private:\n        static parsec_context_t *ctx;\n        static std::optional<bool> made_new_ctx;\n        static parsec_taskpool_t *tp;\n        static bool parsec_restart_taskpool;\n        static parsec_execution_stream_t *madness_comm_thread_es;\n#ifdef PARSEC_PROF_TRACE\n        static int               taskpool_profiling_array[2];\n#endif /* PARSEC_PROF_TRACE */\n\n    public:\n        ParsecRuntime(int nb_threads);\n        ~ParsecRuntime();\n\n        static parsec_context_t* context();\n        static void initialize_with_existing_context(parsec_context_t* ctx);\n        static parsec_execution_stream_t *execution_stream();\n        static void schedule(PoolTaskInterface* task);\n        static int test();\n        static void wait();\n        static parsec_task_t *task(bool is_high_priority, void *ptr);\n        static void delete_parsec_task(parsec_task_t *t);\n    };\n}\n\n#endif // HAVE_PARSEC\n\n#endif // MADNESS_PARSEC_INCLUED\n"
  },
  {
    "path": "src/madness/world/posixmem.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n*/\n\n#ifndef MADNESS_WORLD_POSIXMEM_H__INCLUDED\n#define MADNESS_WORLD_POSIXMEM_H__INCLUDED\n\n/// \\file world/posixmem.h\n/// \\brief Implement dummy posix_memalign if it is missing on the system.\n\n#include <madness/madness_config.h>\n\n#if !HAVE_POSIX_MEMALIGN\n#include <sys/errno.h>\ninline int posix_memalign(void **memptr, std::size_t alignment, std::size_t size) {\n    *memptr=malloc(size);\n    if (*memptr) return 0;\n    else return ENOMEM;\n}\n#elif MISSING_POSIX_MEMALIGN_PROTO\nextern \"C\"  int posix_memalign(void **memptr, std::size_t alignment, std::size_t size);\n#endif\n\n#endif // MADNESS_WORLD_POSIXMEM_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/print.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file print.cc\n \\brief Implementation of functions defined in print.h.\n \\ingroup libraries\n*/\n\n#include <madness/world/print.h>\n#include <cstring>\n\nnamespace madness {\n\n    /// big section heading\n    void print_header1(const std::string& s) {\n        auto line=std::string(80,'=');\n        print(\"\");\n        print(line);\n        print(\"  \",s);\n        print(line,\"\\n\");\n    };\n\n\n    /// medium section heading\n    void print_header2(const std::string& s) {\n        auto line=std::string(80,'-');\n        print(\"\");\n        print(line);\n        print(\"  \",s);\n        print(line,\"\\n\");\n    };\n\n    /// small section heading\n    void print_header3(const std::string& s) {\n        auto line=std::string(80,'-');\n        print(\"\");\n        print(\"  \",s);\n        print(line,\"\\n\");\n    };\n\n    void printf_msg_energy_time(const std::string msg, const double energy, const double time) {\n        printf(\"%50s: %12.8f at time %8.1fs\\n\",msg.c_str(),energy,time);\n    }\n\n\nvoid print_justified(const char* s, int column, bool underline) {\n        for (int i=0; i<column; ++i) std::cout << \" \";\n        std::cout << s << ENDL;\n        if (underline) {\n            for (int i=0; i<column; ++i) std::cout << \" \";\n            for (unsigned int i=0; i<std::strlen(s); ++i) std::cout << \"-\";\n            std::cout << ENDL;\n        }\n    }\n\nvoid print_centered(const char* s, int column, bool underline) {\n    print_justified(s, column-std::strlen(s)/2, underline);\n}\n\n// Used to restore cout after redirection (cf io_redirect and io_redirect_cout)\nstd::streambuf* madness::io_redirect::stream_buffer_cout_default = nullptr;\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/print.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_PRINT_H__INCLUDED\n#define MADNESS_WORLD_PRINT_H__INCLUDED\n\n/**\n \\file print.h\n \\brief Defines simple templates for printing to \\c std::cout \"a la Python\".\n \\ingroup libraries\n*/\n\n#include <type_traits>\n#include <iostream>\n#include <fstream>\n#include <complex>\n#include <list>\n#include <vector>\n#include <madness/world/worldmutex.h>\n#include <madness/world/array_addons.h>\n\n#ifdef BRAINDEAD\n// Cray XT nonsense\n#define ENDL \"\\n\"\n\n#else\n\n#define ENDL std::endl\n\n#endif\n\n\nnamespace madness {\n\nnamespace operators {\n\n/// \\addtogroup libraries\n/// @{\n\n/// Easy printing of complex numbers.\n\n/// \\tparam T The \"real\" type of the complex number.\n/// \\param[in,out] s The output stream.\n/// \\param[in] c The complex number.\n/// \\return The output stream (for chaining).\ntemplate <typename T>\nstd::ostream &operator<<(std::ostream &s, const std::complex<T> &c) {\n  s << c.real() << \"+\" << c.imag() << \"j\";\n  return s;\n}\n\n/// Easy printing of pairs.\n\n/// \\tparam T Type 1 of the pair.\n/// \\tparam U Type 2 of the pair.\n/// \\param[in,out] s The output stream.\n/// \\param[in] p The pair.\n/// \\return The output stream (for chaining).\ntemplate <typename T, typename U>\nstd::ostream &operator<<(std::ostream &s, const std::pair<T, U> &p) {\n  s << \"(\" << p.first << \",\" << p.second << \")\";\n  return s;\n}\n\n///// Easy printing of std::arrays.\n//\n///// \\tparam U Type 2 of the pair.\n///// \\param[in,out] s The output stream.\n///// \\param[in] p The pair.\n///// \\return The output stream (for chaining).\n//template <typename T, std::size_t NDIM>\n//std::ostream &operator<<(std::ostream &s, const std::array<T, NDIM> &p) {\n//    s << \"[\";\n//    for (int i=0; i<p.size(); ++i) s << p[i];\n//    s << \"]\";\n//    return s;\n//}\n\n/// Easy printing of lists.\n\n/// \\tparam T Type stored in the list.\n/// \\param[in,out] s The output stream.\n/// \\param[in] c The list.\n/// \\return The output stream (for chaining).\ntemplate <typename T>\nstd::ostream &operator<<(std::ostream &s, const std::list<T> &c) {\n  s << \"[\";\n  typename std::list<T>::const_iterator it = c.begin();\n  while (it != c.end()) {\n    s << *it;\n    ++it;\n    if (it != c.end())\n      s << \", \";\n  };\n  s << \"]\";\n  return s;\n}\n\n/// Easy printing of vectors.\n\n/// \\tparam T Type stored in the vector.\n/// \\param[in,out] s The output stream.\n/// \\param[in] c The vector.\n/// \\return The output stream (for chaining).\ntemplate <typename T>\nstd::ostream &operator<<(std::ostream &s, const std::vector<T> &c) {\n  s << \"[\";\n  typename std::vector<T>::const_iterator it = c.begin();\n  while (it != c.end()) {\n    s << *it;\n    ++it;\n    if (it != c.end())\n      s << \", \";\n  };\n  s << \"]\";\n  return s;\n}\n\n/// Easy printing of fixed dimension arrays.\n\n/// STL I/O already does char (thus the \\c enable_if business).\n/// \\tparam T Type of data in the array.\n/// \\tparam N Size of the array.\n/// \\param[in,out] s The output stream.\n/// \\param[in] v The array.\n/// \\return The output stream (for chaining).\ntemplate <typename T, std::size_t N>\ntypename std::enable_if<!std::is_same<T, char>::value, std::ostream &>::type\noperator<<(std::ostream &s, const T (&v)[N]) {\n  s << \"[\";\n  for (std::size_t i = 0; i < N; ++i) {\n    s << v[i];\n    if (i != (N - 1))\n      s << \",\";\n  }\n  s << \"]\";\n  return s;\n}\n\n}  // namespace operators\n\n    /// big section heading\n    void print_header1(const std::string& s);\n\n    /// medium section heading\n    void print_header2(const std::string& s);\n\n    /// small section heading\n    void print_header3(const std::string& s);\n\n    /// Print a string justified on the left to start at the given column with optional underlining.\n    void print_justified(const char* s, int column=0, bool underline=true);\n\n    /// Print a string centered at the given column with optional underlining.\n    void print_centered(const char* s, int column=40, bool underline=true);\n\n    ///\n    void printf_msg_energy_time(const std::string msg, const double energy, const double time);\n\n    // the \"print\" function and functions to help handle the variadic templates\n\n    /// Helper function for \\c print. Base case.\n\n    /// This gets called recursively when there are no items left to print.\n    /// \\param[in,out] out Output stream.\n    /// \\return The output stream (for chaining).\n    inline std::ostream& print_helper(std::ostream& out) {\n        return out;\n    }\n\n    /// \\brief Helper function for \\c print. Prints the first item (\\c t) and\n    ///    recursively passes on the other items.\n\n    /// \\tparam T Type of the item to print in this call.\n    /// \\tparam Ts Argument pack type for the remaining items.\n    /// \\param[in,out] out Output stream.\n    /// \\param[in] t The item to print in this call.\n    /// \\param[in] ts The remaining items in the argument pack (they get\n    ///    recursively passed on).\n    /// \\return The output stream (for chaining).\n    template <typename T, typename... Ts>\n    inline std::ostream& print_helper(std::ostream& out,\n                                      const T& t, const Ts&... ts) {\n        using madness::operators::operator<<;\n        out << ' ' << t;\n        return print_helper(out, ts...);\n    }\n\n    /// \\brief Print items to \\c std::cout (items separated by spaces) and\n    ///    terminate with a new line\n\n    /// The first item is printed here so that it isn't preceded by a space.\n    /// \\tparam T Type of the first item to be printed.\n    /// \\tparam Ts Argument pack type for the items to be printed.\n    /// \\param[in] t The first item to be printed.\n    /// \\param[in] ts The remaining items to be printed in the argument pack.\n    template<typename T, typename... Ts>\n    void print(const T& t, const Ts&... ts) {\n        using madness::operators::operator<<;\n        ScopedMutex<Mutex> safe(detail::printmutex);\n        std::cout << t;\n        print_helper(std::cout, ts...) << ENDL;\n    }\n\n    /// \\brief Print items to \\c std::cerr (items separated by spaces) and\n    ///    terminate with a new line\n\n    /// The first item is printed here so that it isn't preceded by a space.\n    /// \\tparam T Type of the first item to be printed.\n    /// \\tparam Ts Argument pack type for the items to be printed.\n    /// \\param[in] t The first item to be printed.\n    /// \\param[in] ts The remaining items to be printed in the argument pack.\n    template<typename T, typename... Ts>\n    void print_error(const T& t, const Ts&... ts) {\n        using madness::operators::operator<<;\n        ScopedMutex<Mutex> safe(detail::printmutex);\n        std::cerr << t;\n        print_helper(std::cerr, ts...) << ENDL;\n    }\n\n\n    /// RAII class to redirect cout to a file\n    struct io_redirect {\n        std::streambuf* stream_buffer_cout;\n        static std::streambuf* stream_buffer_cout_default; ///< default stream buffer for cout, used to restore cout\n        std::ofstream ofile;\n        bool debug = false;\n\n        io_redirect(const long task_number, std::string filename, bool debug = false) : debug(debug) {\n            stream_buffer_cout_default = std::cout.rdbuf();\n            constexpr std::size_t bufsize = 256;\n            char cfilename[bufsize];\n            std::snprintf(cfilename, bufsize, \"%s.%5.5ld\", filename.c_str(), task_number);\n            ofile = std::ofstream(cfilename);\n            if (debug) std::cout << \"redirecting to file \" << cfilename << std::endl;\n            stream_buffer_cout = std::cout.rdbuf(ofile.rdbuf());\n            std::cout.sync_with_stdio(true);\n        }\n\n        ~io_redirect() {\n            std::cout.rdbuf(stream_buffer_cout);\n            ofile.close();\n            std::cout.sync_with_stdio(true);\n            if (debug) std::cout << \"redirecting back to cout\" << std::endl;\n        }\n    };\n\n    /// class to temporarily redirect output to cout\n    struct io_redirect_cout {\n        std::streambuf* stream_buffer_cout;\n\n        io_redirect_cout() {\n            stream_buffer_cout = std::cout.rdbuf(io_redirect::stream_buffer_cout_default);\n            std::cout.sync_with_stdio(true);\n        }\n\n        ~io_redirect_cout() {\n            std::cout.rdbuf(stream_buffer_cout);\n            std::cout.sync_with_stdio(true);\n        }\n    };\n\n}\n#endif // MADNESS_WORLD_PRINT_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/print_seq.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_PRINT_SEQ_H__INCLUDED\n#define MADNESS_WORLD_PRINT_SEQ_H__INCLUDED\n\n/**\n \\file print_seq.h\n \\brief Implements \\c print_seq.\n \\ingroup libraries\n \\todo Can these functions be replaced by a variadic template?\n*/\n\nnamespace madness {\n    /// Sequentially ordered printing of (serializable) data from every process.\n\n    /// Collective, no fence.\n    /// \\tparam A Type of data 1.\n    /// \\tparam B Type of data 2.\n    /// \\tparam C Type of data 3.\n    /// \\tparam D Type of data 4.\n    /// \\param[in] world The \\c World object.\n    /// \\param[in] a Data 1.\n    /// \\param[in] b Data 2.\n    /// \\param[in] c Data 3.\n    /// \\param[in] d Data 4.\n    template <typename A, typename B, typename C, typename D>\n    void print_seq(World& world, const A& a, const B& b, const C& c, const D& d) {\n        if (world.rank() == 0) {\n            printf(\"%6d : \",0);\n            print(a, b, c, d);\n            for (int p=1; p<world.size(); ++p) {\n                A aa;\n                B bb;\n                C cc;\n                D dd;\n                archive::MPIOutputArchive(world,p) & 1;\n                archive::MPIInputArchive(world, p) & aa & bb & cc & dd;\n                printf(\"%6d : \",p);\n                print(aa, bb, cc, dd);\n            }\n        }\n        else {\n            int i;\n            archive::MPIInputArchive(world, 0) & i;\n            archive::MPIOutputArchive(world, 0) & a & b & c & d;\n        }\n    }\n\n    /// Sequentially ordered printing of (serializable) data from every process.\n\n    /// Collective, no fence.\n    /// \\tparam A Type of data 1.\n    /// \\tparam B Type of data 2.\n    /// \\tparam C Type of data 3.\n    /// \\param[in] world The \\c World object.\n    /// \\param[in] a Data 1.\n    /// \\param[in] b Data 2.\n    /// \\param[in] c Data 3.\n    template <typename A, typename B, typename C>\n    void print_seq(World& world, const A& a, const B& b, const C& c) {\n        if (world.rank() == 0) {\n            printf(\"%6d : \",0);\n            print(a, b, c);\n            for (int p=1; p<world.size(); ++p) {\n                A aa;\n                B bb;\n                C cc;\n                archive::MPIOutputArchive(world,p) & 1;\n                archive::MPIInputArchive(world, p) & aa & bb & cc;\n                printf(\"%6d : \",p);\n                print(aa, bb, cc);\n            }\n        }\n        else {\n            int i;\n            archive::MPIInputArchive(world, 0) & i;\n            archive::MPIOutputArchive(world, 0) & a & b & c;\n        }\n    }\n\n    /// Sequentially ordered printing of (serializable) data from every process.\n\n    /// Collective, no fence.\n    /// \\tparam A Type of data 1.\n    /// \\tparam B Type of data 2.\n    /// \\param[in] world The \\c World object.\n    /// \\param[in] a Data 1.\n    /// \\param[in] b Data 2.\n    template <typename A, typename B>\n    void print_seq(World& world, const A& a, const B& b) {\n        if (world.rank() == 0) {\n            printf(\"%6d : \",0);\n            print(a, b);\n            for (int p=1; p<world.size(); ++p) {\n                A aa;\n                B bb;\n                archive::MPIOutputArchive(world,p) & 1;\n                archive::MPIInputArchive(world, p) & aa & bb;\n                printf(\"%6d : \",p);\n                print(aa, bb);\n            }\n        }\n        else {\n            int i;\n            archive::MPIInputArchive(world, 0) & i;\n            archive::MPIOutputArchive(world, 0) & a & b;\n        }\n    }\n\n    /// Sequentially ordered printing of (serializable) data from every process.\n\n    /// Collective, no fence.\n    /// \\tparam A Type of data 1.\n    /// \\param[in] world The \\c World object.\n    /// \\param[in] a Data 1.\n    template <typename A>\n    void print_seq(World& world, const A& a) {\n        if (world.rank() == 0) {\n            printf(\"%6d : \",0);\n            print(a);\n            for (int p=1; p<world.size(); ++p) {\n                A aa;\n                archive::MPIOutputArchive(world,p) & 1;\n                archive::MPIInputArchive(world, p) & aa;\n                printf(\"%6d : \",p);\n                print(aa);\n            }\n        }\n        else {\n            int i;\n            archive::MPIInputArchive(world, 0) & i;\n            archive::MPIOutputArchive(world, 0) & a;\n        }\n    }\n}\n\n#endif // MADNESS_WORLD_PRINT_SEQ_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/range.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_RANGE_H__INCLUDED\n#define MADNESS_WORLD_RANGE_H__INCLUDED\n\n#include <type_traits>\n#include <iterator>\n#ifdef HAVE_INTEL_TBB\n# include <tbb/partitioner.h>\n#endif\n\n/**\n \\file range.h\n \\brief Implement the \\c Range class for parallel iteration.\n \\ingroup parallel_runtime\n*/\n\nnamespace madness {\n\n    /// \\addtogroup parallel_runtime\n    /// @{\n\n    /// Dummy class, a la Intel TBB, used to distinguish splitting constructor.\n#ifdef HAVE_INTEL_TBB\n    typedef tbb::split Split;\n#else\n    class Split {};\n#endif // HAVE_INTEL_TBB\n\n    /// \\brief Range, vaguely a la Intel TBB, to encapsulate a random-access,\n    ///    STL-like start and end iterator with chunksize.\n\n    /// \\tparam iteratorT The iterator type.\n    template <typename iteratorT>\n    class Range {\n        long n; ///< Number of items to iterator over. \\todo Could this be replaced by size_t?\n        iteratorT start; ///< First item for iteration.\n        iteratorT finish; ///< Last item for iteration (first past the end, conventionally).\n        int chunksize; ///< Number of items to give to each thread/process.\n\n    public:\n        using iterator = iteratorT; ///< Alias for the iterator type.\n\n        /// Makes the range [start, finish).\n\n        /// The motivated reader should look at the Intel TBB range,\n        /// partitioner, split, concepts, etc.\n        /// \\param[in] start The first item to iterate over.\n        /// \\param[in] finish The last item for iteration (one past the end).\n        /// \\param[in] chunk The number of items to give to each thread/process.\n        Range(const iterator& start, const iterator& finish, int chunk=1)\n            : n(distance(start,finish))\n            , start(start)\n            , finish(finish)\n            , chunksize(chunk)\n        {\n            if (chunksize < 1) chunksize = 1;\n        }\n\n        /// Copy constructor. Cost is O(1).\n\n        /// \\todo Can we make this `= default`?\n        /// \\param[in] r The \\c Range to copy.\n        Range(const Range& r)\n                : n(r.n)\n                , start(r.start)\n                , finish(r.finish)\n                , chunksize(r.chunksize)\n        {}\n\n        /// Splits range between new and old (r) objects. Cost is O(1).\n\n        /// \\param[in] left The range to be split.\n        Range(Range& left, const Split& /*split*/)\n                : n(0)\n                , start(left.finish)\n                , finish(left.finish)\n                , chunksize(left.chunksize)\n        {\n            if (left.n > chunksize) {\n                int nleft = (left.n+1)/2;\n\n                start = left.start;\n                advance(start,nleft);\n                finish = left.finish;\n                n = left.n - nleft;\n\n                left.finish = start;\n                left.n = nleft;\n            }\n        }\n\n        /// Returns the number of items in the range (cost is O(1)).\n\n        /// \\return The number of items in the range.\n        size_t size() const { return n; }\n\n        /// Returns true if `size == 0`.\n\n        /// \\return True if `size == 0`.\n        bool empty() const { return n==0; }\n\n        /// Access the beginning.\n\n        /// \\return Iterator to the first element.\n        const iterator& begin() const { return start; }\n\n        /// Access the end.\n\n        /// \\return Iterator to the last element (one past the end).\n        const iterator& end() const { return finish; }\n\n        /// \\brief Return true if this iteration range can be divided; that is,\n        ///    there are more items than the chunk size.\n\n        /// \\return True if this range can be divided.\n        bool is_divisible() const { return n > chunksize; }\n\n        /// Access the chunk size.\n\n        /// \\todo Should this return `long`, or `size_t`?\n        /// \\return The chunk size.\n        unsigned int get_chunksize() const { return chunksize; }\n\n    private:\n        /// Advance by \\c n elements in the range.\n\n        /// This version is for cases where the \"iterator type\" is integral.\n        /// \\tparam integralT The integral iterator type.\n        /// \\tparam distanceT The distance type.\n        /// \\param[in,out] i The integral iterator.\n        /// \\param[in] n The number of elements to advance.\n        template<typename integralT, typename distanceT>\n        inline static typename std::enable_if<std::is_integral<integralT>::value, void>::type\n        advance(integralT& i, distanceT n) { i += n; }\n\n        /// Advance by \\c n elements in the range.\n\n        /// This version is for cases where the \"iterator type\" is not integral.\n        /// \\tparam iterT The non-integral iterator type.\n        /// \\tparam distanceT The distance type.\n        /// \\param[in,out] it The iterator.\n        /// \\param[in] n The number of elements to advance.\n        template<typename iterT, typename distanceT>\n        inline static typename std::enable_if<!std::is_integral<iterT>::value, void>::type\n        advance(iterT& it, distanceT n) { std::advance(it, n); }\n\n        /// Calculate the distance between two iterators.\n\n        /// This version is for cases where the \"iterator type\" is integral.\n        /// \\tparam integralT The integral iterator type.\n        /// \\param[in] first One iterator.\n        /// \\param[in] last The other iterator.\n        /// \\return The distance between the first and last iterators.\n        template<class integralT>\n        inline static typename std::enable_if<std::is_integral<integralT>::value, integralT>::type\n        distance(integralT first, integralT last) { return last - first; }\n\n        /// Calculate the distance between two iterators.\n\n        /// This version is for cases where the \"iterator type\" is not integral.\n        /// \\tparam iterT The non-integral iterator type.\n        /// \\param[in] first One iterator.\n        /// \\param[in] last The other iterator.\n        /// \\return The distance between the first and last iterators.\n        template<class iterT>\n        inline static auto\n        distance(iterT first, iterT last,\n                typename std::enable_if<!std::is_integral<iterT>::value>::type* = nullptr)\n            -> decltype(std::distance(first, last))\n        { return std::distance(first, last); }\n    };\n\n    /// @}\n\n} // namespace madness\n\n#endif // MADNESS_WORLD_RANGE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/ranks_and_hosts.cpp",
    "content": "//\n// Created by Florian Bischoff on 19.09.25.\n//\n\n#include<ranks_and_hosts.h>\n\nnamespace madness {\n\n\n    double get_rss_usage_in_GB() {\n        double kb_to_GB=1.0/(1024*1024);\n#ifdef __APPLE__\n        double b_to_GB=kb_to_GB/1024;\n        struct rusage usage;\n        if (getrusage(RUSAGE_SELF, &usage) == -1) {\n            std::cerr << \"Unable to get RSS usage\" << std::endl;\n            return -1;\n        }\n        return usage.ru_maxrss*b_to_GB;\n#else\n        std::ifstream statm_file(\"/proc/self/statm\");\n        unsigned long size, resident;\n        if (statm_file.is_open()) {\n            statm_file >> size >> resident;\n            statm_file.close();\n        } else {\n            std::cerr << \"Unable to open /proc/self/statm\" << std::endl;\n            return -1;\n        }\n        long page_size_kb = sysconf(_SC_PAGE_SIZE) / 1024;\n        return resident * page_size_kb*kb_to_GB;\n#endif\n    }\n\n    /// return a mapping rank to hostname, return value on rank 0 only\n    std::map<long,std::pair<std::string,double>> rank_to_host_and_rss_map(World& universe) {\n        std::vector<std::pair<long,std::pair<std::string,double>>> rank_to_host;\n        // rank-local\n        auto hostname_and_rss=std::pair<std::string,double>(get_hostname(),get_rss_usage_in_GB());\n        rank_to_host.push_back(std::pair<long,std::pair<std::string,double>>(universe.rank(),hostname_and_rss));\n        // gather on rank 0\n        rank_to_host=universe.gop.concat0(rank_to_host);\n        // turn into map\n        std::map<long,std::pair<std::string,double>> map;\n        for (const auto& [rank,hostname] : rank_to_host) {\n            map[rank]=hostname;\n        }\n        return map;\n    }\n\n    /// for each host, return a list of its ranks\n    std::map<std::string,std::vector<long>> ranks_per_host(World& universe) {\n\n        std::map<std::string,std::vector<long>> result;\n        // Get mapping from rank to (hostname, rss), returns on rank 0 only\n        auto rank_to_host = rank_to_host_and_rss_map(universe);\n        universe.gop.broadcast_serializable(rank_to_host,0);\n\n        // loop over all ranks and reorder to: hostname -> list of ranks\n        for (const auto& [rank, host_rss] : rank_to_host) {\n            const std::string& hostname = host_rss.first;\n            result[hostname].push_back(rank);\n        }\n        // Sort the ranks for each host\n        for (auto& [hostname, ranks] : result) {\n            std::sort(ranks.begin(), ranks.end());\n        }\n        return result;\n    }\n\n    /// for a given rank return the lowest rank on its host\n    /// @param[in]  ranks_per_host1 from ranks_per_host()\n    long lowest_rank_on_host_of_rank(const std::map<std::string,std::vector<long>> ranks_per_host1, int rank) {\n        for (const auto& [hostname,ranks] : ranks_per_host1) {\n            for (const auto& r : ranks) {\n                if (r==rank) return ranks.front();\n            }\n        }\n        return -1l;\n    };\n\n    /**\n     * Returns a vector of ranks such that exactly one rank is chosen per host (the lowest rank on each host).\n     * Only valid on rank 0. If called on other ranks, returns an empty vector.\n     */\n    std::vector<int> primary_ranks_per_host(World& world, const std::map<std::string,std::vector<long>>& ranks_per_host1) {\n        std::vector<int> result;\n        // loop over all ranks, but only keep the lowest rank on each host\n        for (int rank = 0; rank < world.size(); ++rank) {\n            int lowest_rank = lowest_rank_on_host_of_rank(ranks_per_host1, rank);\n            if (lowest_rank == rank) result.push_back(rank);\n        }\n        std::sort(result.begin(), result.end());\n        return result;\n    }\n\n\n    std::string get_hostname() {\n        char hostname[256];\n#if defined(HAVE_UNISTD_H)\n        gethostname(hostname, 256);\n#endif\n        return std::string(hostname);\n    }\n}\n"
  },
  {
    "path": "src/madness/world/ranks_and_hosts.h",
    "content": "//\n// Created by Florian Bischoff on 18.09.25.\n//\n\n#ifndef MADNESS_RANKS_AND_HOSTS_H\n#define MADNESS_RANKS_AND_HOSTS_H\n\n#include <madness/world/world.h>\n#include <madness/world/worldgop.h>\n#include <madness/misc/misc.h>\n\n\n/// declare all functions in namespace madness, from ranks_and_hosts.cpp\nnamespace madness {\n    double get_rss_usage_in_GB();\n    std::map<long,std::pair<std::string,double>> rank_to_host_and_rss_map(World& universe);\n    std::map<std::string,std::vector<long>> ranks_per_host(World& universe);\n    long lowest_rank_on_host_of_rank(const std::map<std::string,std::vector<long>> ranks_per_host1, int rank);\n    std::vector<int> primary_ranks_per_host(World& world, const std::map<std::string,std::vector<long>>& ranks_per_host1);\n    std::string get_hostname();\n\n}\n\n#endif //MADNESS_RANKS_AND_HOSTS_H"
  },
  {
    "path": "src/madness/world/redirectio.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#include <madness/world/MADworld.h>\n#include <iostream>\nusing std::cout;\nusing std::endl;\n#include <fstream>\n#include <cstdio>\n\nstatic std::ofstream fout;\nnamespace madness {\n    void redirectio(const World& world, bool split) {\n        constexpr std::size_t bufsize=256;\n        char filename[bufsize];\n        std::snprintf(filename,bufsize,\"log.%5.5d\",world.mpi.rank());\n        char errfilename[bufsize];\n        std::snprintf(errfilename,bufsize,\"%s.%5.5d\", (split ? \"err\" : \"log\"), world.mpi.rank());\n        if (!freopen(   filename, \"w\", stdout)) MADNESS_EXCEPTION(\"reopening stdout failed\", 0);\n        if (!freopen(errfilename, \"w\", stderr)) MADNESS_EXCEPTION(\"reopening stderr failed\", 0);\n\t      std::cout.sync_with_stdio(true);\n\t      std::cerr.sync_with_stdio(true);\n    }\n}\n\n\n\n\n"
  },
  {
    "path": "src/madness/world/safempi.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/safempi.h>\n#include <madness/world/madness_exception.h>\n\nnamespace SafeMPI {\n\n    madness::SCALABLE_MUTEX_TYPE charon;\n\n    void Intracomm::binary_tree_info(int root, int& parent, int& child0, int& child1) {\n        const int np = Get_size();\n        const int me = (Get_rank() + np - root) % np; // Renumber processes so root has me=0\n        parent = (me == 0 ? -1 : (((me - 1) >> 1) + root) % np); // Parent in binary tree\n        child0 = (me << 1) + 1 + root; // Left child\n        child1 = child0 + 1; // Right child\n        const int np_plus_root = np + root;\n        if(child0 < np_plus_root)\n            child0 %= np;\n        else\n            child0 = -1;\n        if(child1 < np_plus_root)\n            child1 %= np;\n        else\n            child1 = -1;\n    }\n\n    // The logic here is to intended to cause an error if someone tries to use\n    // this constructor from somewhere else.\n\n    struct Intracomm::WorldInitObject {\n        MPI_Comm comm_world() const { return MPI_COMM_WORLD; }\n    };\n\n    Intracomm::Intracomm(const WorldInitObject& init) :\n        pimpl(new Impl(init.comm_world(), -1, -1, false))\n    { }\n\n    Intracomm COMM_WORLD = Intracomm::WorldInitObject();\n\n} //namespace SafeMPI\n"
  },
  {
    "path": "src/madness/world/safempi.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_WORLD_SAFEMPI_H__INCLUDED\n#define MADNESS_WORLD_SAFEMPI_H__INCLUDED\n\n/// \\file safempi.h\n/// \\brief Serializes calls to MPI in case it does not support THREAD_MULTIPLE\n\n#include <madness/madness_config.h>\n\n#ifdef STUBOUTMPI\n#include <madness/world/stubmpi.h>\n#else\n\n//#ifdef SEEK_SET\n//#undef SEEK_SET\n//#endif\n//#ifdef SEEK_CUR\n//#undef SEEK_CUR\n//#endif\n//#ifdef SEEK_END\n//#undef SEEK_END\n//#endif\n\n#ifdef MADNESS_MPI_HEADER\n# include MADNESS_MPI_HEADER\n#else\n# include <mpi.h>\n#endif\n\n#endif\n\n\n#if MADNESS_MPI_THREAD_LEVEL == MPI_THREAD_SERIALIZED\n#  define MADNESS_SERIALIZES_MPI\n#endif\n\n\n\n#include <madness/world/worldmutex.h>\n#include <madness/world/type_traits.h>\n#include <iostream>\n#include <csignal>\n#include <cstdlib>\n#include <cstring>\n#include <memory>\n#include <sstream>\n\n#define MADNESS_MPI_TEST(condition) \\\n    {                                       \\\n        int mpi_error_code = condition;     \\\n        if(mpi_error_code != MPI_SUCCESS) { \\\n            char s[MPI_MAX_ERROR_STRING];                             \\\n            s[0] = '\\0';                                                \\\n            int len = 0;                                                \\\n            MPI_Error_string(mpi_error_code, s, &len);       \\\n            std::cout<< \"MPI ERROR in \" << __FUNCTION__ << \" in \" << __FILE__ << \" at line \" << __LINE__ << \" code \" << mpi_error_code << \" err string \" << s << \"\\n\"; \\\n            throw ::SafeMPI::Exception(mpi_error_code);                 \\\n        }                                                               \\\n    }\n\nnamespace SafeMPI {\n\n    extern madness::SCALABLE_MUTEX_TYPE charon;      // Inside safempi.cc\n#ifdef MADNESS_SERIALIZES_MPI\n#define SAFE_MPI_GLOBAL_MUTEX madness::ScopedMutex<madness::SCALABLE_MUTEX_TYPE> obolus(SafeMPI::charon);\n#else\n#define SAFE_MPI_GLOBAL_MUTEX\n#endif\n\n    /// tags in [1,999] ... allocated once by unique_reserved_tag\n    ///\n    /// tags in [1000,1023] ... statically assigned here\n    ///\n    /// tags in [1024,4095] ... allocated round-robin by unique_tag\n    ///\n    /// tags in [4096,8191] ... reserved for huge msg exchange by RMI\n    ///\n    /// tags in [8192,MPI::TAG_UB] ... not used/managed by madness\n\n    static const int RMI_TAG = 1023;\n    static const int MPIAR_TAG = 1001;\n    static const int DEFAULT_SEND_RECV_TAG = 1000;\n\n    // Forward declarations\n    class Intracomm;\n    extern Intracomm COMM_WORLD;\n    inline int Finalize();\n\n    /// Check MPI initialization status\n\n    /// \\return \\c true if MPI has been initialized, \\c false otherwise.\n    inline bool Is_initialized() {\n        int initialized = 0;\n        MPI_Initialized(&initialized);\n        return (initialized != 0);\n    }\n\n    /// Check MPI finalization status\n\n    /// \\return \\c true if MPI has been finalized, \\c false otherwise.\n    inline bool Is_finalized() {\n        int flag = 0;\n        MPI_Finalized(&flag);\n        return flag != 0;\n    }\n\n    namespace detail {\n        /// Initialize SafeMPI::COMM_WORLD\n        inline void init_comm_world();\n\n        inline void print_mpi_error(const int rc, const char* function,\n                const int line, const char* file)\n        {\n            int len = 0;\n            char error_string[MPI_MAX_ERROR_STRING];\n            MPI_Error_string(rc, error_string, &len);\n            std::cerr << \"!!! MPI ERROR (\" << rc << \") in \" << function <<\n                    \" at \" << file << \"(\" << line << \"): \" << error_string << \"\\n\";\n        }\n\n    }  // namespace detail\n\n    /// SafeMPI exception object\n\n    /// This exception is thrown whenever an MPI error occurs.\n    class Exception : public std::exception {\n    private:\n        char mpi_error_string_[MPI_MAX_ERROR_STRING];\n        std::string mpi_statuses_error_string_;\n    public:\n\n        Exception(const int mpi_error) throw() {\n            int len = 0;\n            if(MPI_Error_string(mpi_error, mpi_error_string_, &len) != MPI_SUCCESS)\n                std::strncpy(mpi_error_string_, \"UNKNOWN MPI ERROR!\", MPI_MAX_ERROR_STRING);\n        }\n\n        Exception(const int mpi_error, const int nstatuses,\n                  const int* indices,\n                  MPI_Status* const statuses) noexcept {\n            try {\n                if (mpi_error == MPI_ERR_IN_STATUS) {\n                    std::ostringstream oss;\n                    for(auto s=0; s!=nstatuses; ++s) {\n                        int len = 0;\n                        auto status_error = statuses[s].MPI_ERROR;\n                        if (status_error != MPI_SUCCESS) {\n                            oss << \"request \" << indices[s] << \":\";\n                            if (MPI_Error_string(status_error, mpi_error_string_, &len) != MPI_SUCCESS)\n                                oss << \" unknown error!\" << std::endl;\n                            else\n                                oss << mpi_error_string_ << std::endl;\n                        }\n                    }\n                    mpi_statuses_error_string_ = oss.str();\n                }\n            }\n            catch (...) {}\n\n            int len = 0;\n            if(MPI_Error_string(mpi_error, mpi_error_string_, &len) != MPI_SUCCESS)\n                std::strncpy(mpi_error_string_, \"UNKNOWN MPI ERROR!\", MPI_MAX_ERROR_STRING);\n        }\n\n        Exception(const Exception& other) throw() {\n            std::strncpy(mpi_error_string_, other.mpi_error_string_, MPI_MAX_ERROR_STRING);\n            try {\n                mpi_statuses_error_string_ = other.mpi_statuses_error_string_;\n            } catch(...) { mpi_statuses_error_string_.clear(); }\n        }\n\n        Exception& operator=(const Exception& other) {\n            std::strncpy(mpi_error_string_, other.mpi_error_string_, MPI_MAX_ERROR_STRING);\n            try {\n                mpi_statuses_error_string_ = other.mpi_statuses_error_string_;\n            } catch(...) { mpi_statuses_error_string_.clear(); }\n            return *this;\n        }\n\n        virtual ~Exception() throw() { }\n\n        virtual const char* what() const throw() { return mpi_error_string_; }\n        bool can_elaborate() const noexcept {\n            return !mpi_statuses_error_string_.empty();\n        }\n        const char* elaborate() const noexcept {\n            return mpi_statuses_error_string_.c_str();\n        }\n\n        friend std::ostream& operator<<(std::ostream& os, const Exception& e) {\n            os << e.what();\n            if (e.can_elaborate()) {\n              os << e.elaborate();\n            }\n            return os;\n        }\n    }; // class Exception\n\n\n    class Status {\n    private:\n        MPI_Status status_;\n\n    public:\n        // Constructors\n        Status(void) : status_() { }\n        Status(const Status &other) : status_(other.status_) { }\n        Status(MPI_Status other) : status_(other) { }\n\n        // Assignment operators\n        Status& operator=(const Status &other) {\n            status_ = other.status_;\n            return *this;\n        }\n\n        Status& operator=(const MPI_Status other) {\n            status_ = other;\n            return *this;\n        }\n\n        // C/C++ cast and assignment\n        operator MPI_Status*() { return &status_; }\n\n        operator MPI_Status() const { return status_; }\n\n//        bool Is_cancelled() const {\n//            int flag = 0;\n//            MADNESS_MPI_TEST(MPI_Test_cancelled(const_cast<MPI_Status*>(&status_), &flag));\n//            return flag != 0;\n//        }\n//\n//        int Get_elements(const MPI_Datatype datatype) const {\n//            int elements = 0;\n//            MADNESS_MPI_TEST(MPI_Get_elements(const_cast<MPI_Status*>(&status_), datatype, &elements));\n//            return elements;\n//        }\n\n        int Get_count(const MPI_Datatype datatype) const {\n            int count = 0;\n            MADNESS_MPI_TEST(MPI_Get_count(const_cast<MPI_Status*>(&status_), datatype, &count));\n            return count;\n        }\n\n//        void Set_cancelled(bool flag) {\n//            MADNESS_MPI_TEST(MPI_Status_set_cancelled(&status_, flag));\n//        }\n//\n//        void Set_elements( const MPI_Datatype &v2, int v3 ) {\n//            MADNESS_MPI_TEST(MPI_Status_set_elements(&status_, v2, v3 ));\n//        }\n\n        int Get_source() const { return status_.MPI_SOURCE; }\n\n        int Get_tag() const { return status_.MPI_TAG; }\n\n        int Get_error() const { return status_.MPI_ERROR; }\n\n        void Set_source(int source) { status_.MPI_SOURCE = source; }\n\n        void Set_tag(int tag) { status_.MPI_TAG = tag; }\n\n        void Set_error(int error) { status_.MPI_ERROR = error; }\n    }; // class Status\n\n    class Request {\n        // Note: This class was previously derived from MPI::Request, but this\n        // was changed with the removal of the MPI C++ bindings. Now this class\n        // only implements the minimum functionality required by MADNESS. Feel\n        // free to add more functionality as needed.\n\n    private:\n        MPI_Request request_;\n\n    public:\n\n        // Constructors\n        Request() : request_(MPI_REQUEST_NULL) { }\n        Request(MPI_Request other) : request_(other) { }\n        Request(const Request& other) : request_(other.request_) { }\n\n        // Assignment operators\n        Request& operator=(const Request &other) {\n            request_ = other.request_;\n            return *this;\n        }\n\n        Request& operator=(const MPI_Request& other) {\n            request_ = other;\n            return *this;\n        }\n\n        // logical\n        bool operator==(const Request &other) { return (request_ == other.request_); }\n        bool operator!=(const Request &other) { return (request_ != other.request_); }\n\n        // C/C++ cast and assignment\n        operator MPI_Request*() { return &request_; }\n        operator MPI_Request() const { return request_; }\n\n        static bool Testany(int count, Request* requests, int& index, Status& status) {\n            MADNESS_ASSERT(requests != nullptr);\n            int flag;\n            std::unique_ptr<MPI_Request[]> mpi_requests(new MPI_Request[count]);\n\n            // Copy requests to an array that can be used by MPI\n            for(int i = 0; i < count; ++i)\n                mpi_requests[i] = requests[i].request_;\n            {\n                SAFE_MPI_GLOBAL_MUTEX;\n                MADNESS_MPI_TEST(MPI_Testany(count, mpi_requests.get(), &index, &flag, status));\n            }\n            // Copy results from MPI back to the original array\n            for(int i = 0; i < count; ++i)\n                requests[i].request_ = mpi_requests[i];\n            return flag != 0;\n        }\n\n        static bool Testany(int count, Request* requests, int& index) {\n            MADNESS_ASSERT(requests != nullptr);\n            int flag;\n            std::unique_ptr<MPI_Request[]> mpi_requests(new MPI_Request[count]);\n\n            // Copy requests to an array that can be used by MPI\n            for(int i = 0; i < count; ++i)\n                mpi_requests[i] = requests[i].request_;\n            {\n                SAFE_MPI_GLOBAL_MUTEX;\n                MADNESS_MPI_TEST(MPI_Testany(count, mpi_requests.get(), &index, &flag, MPI_STATUS_IGNORE));\n            }\n            // Copy results from MPI back to the original array\n            for(int i = 0; i < count; ++i)\n                requests[i] = mpi_requests[i];\n            return flag != 0;\n        }\n\n        static int Testsome(int incount, Request* requests, int* indices, Status* statuses) {\n            MADNESS_ASSERT(requests != nullptr);\n            MADNESS_ASSERT(indices != nullptr);\n            MADNESS_ASSERT(statuses != nullptr);\n\n            int outcount = 0;\n            std::unique_ptr<MPI_Request[]> mpi_requests(new MPI_Request[incount]);\n            std::unique_ptr<MPI_Status[]> mpi_statuses(new MPI_Status[incount]);\n            for(int i = 0; i < incount; ++i)\n                mpi_requests[i] = requests[i].request_;\n            {\n                SAFE_MPI_GLOBAL_MUTEX;\n                {  // print out the status vars for the failed requests\n                  auto mpi_error_code =\n                      MPI_Testsome(incount, mpi_requests.get(), &outcount,\n                                   indices, mpi_statuses.get());\n                  if (mpi_error_code != MPI_SUCCESS) {\n                    throw ::SafeMPI::Exception(mpi_error_code, outcount, indices, mpi_statuses.get());\n                  }\n                }\n            }\n            for(int i = 0; i < incount; ++i) {\n                requests[i] = mpi_requests[i];\n                statuses[i] = mpi_statuses[i];\n            }\n            return outcount;\n        }\n\n        static int Testsome(int incount, Request* requests, int* indices) {\n            int outcount = 0;\n            std::unique_ptr<MPI_Request[]> mpi_requests(new MPI_Request[incount]);\n            for(int i = 0; i < incount; ++i)\n                mpi_requests[i] = requests[i].request_;\n            {\n                SAFE_MPI_GLOBAL_MUTEX;\n                MADNESS_MPI_TEST( MPI_Testsome( incount, mpi_requests.get(), &outcount, indices, MPI_STATUSES_IGNORE));\n            }\n            for(int i = 0; i < incount; ++i)\n                requests[i] = mpi_requests[i];\n            return outcount;\n        }\n\n\n        bool Test_got_lock_already(MPI_Status& status) {\n            int flag;\n            MADNESS_MPI_TEST(MPI_Test(&request_, &flag, &status));\n            return flag != 0;\n        }\n\n        bool Test(MPI_Status& status) {\n            SAFE_MPI_GLOBAL_MUTEX;\n            return Test_got_lock_already(status);\n        }\n\n        bool Test_got_lock_already() {\n            int flag;\n            MADNESS_MPI_TEST(MPI_Test(&request_, &flag, MPI_STATUS_IGNORE));\n            return flag != 0;\n        }\n\n        bool Test() {\n            SAFE_MPI_GLOBAL_MUTEX;\n            return Test_got_lock_already();\n        }\n    }; // class Request\n\n    ///  Wrapper around MPI_Group. Has a shallow copy constructor. Usually deep copy is not needed, but can be created\n    ///  via Group::Incl().\n    class Group {\n    public:\n        Group Incl(int n, const int* ranks) const {\n            // MPI <3 interface lacks explicit const sanitation\n            Group result(std::shared_ptr<Impl>(new Impl(*pimpl, n, const_cast<int*>(ranks))));\n            return result;\n        }\n\n        void Translate_ranks(int nproc, const int* ranks1, const Group& grp2, int* ranks2) const {\n            // MPI <3 interface lacks explicit const sanitation\n            MADNESS_ASSERT(pimpl);\n            MADNESS_MPI_TEST(MPI_Group_translate_ranks(pimpl->group, nproc,\n                    const_cast<int*>(ranks1), grp2.pimpl->group, ranks2));\n        }\n\n        MPI_Group group() const {\n            MADNESS_ASSERT(pimpl);\n            return pimpl->group;\n        }\n\n        Group(const Group& other) : pimpl(other.pimpl) { }\n\n    private:\n\n        struct Impl {\n            MPI_Group group;\n\n            Impl(MPI_Comm comm) {\n                MADNESS_MPI_TEST(MPI_Comm_group(comm, &group));\n            }\n\n            Impl(const Impl& other, int n, const int* ranks) {\n                // MPI <3 interface lacks explicit const sanitation\n                MADNESS_MPI_TEST(MPI_Group_incl(other.group, n,\n                        const_cast<int*>(ranks), & group));\n            }\n\n            ~Impl() {\n                if(Is_initialized()) {\n                    const int mpi_error_code = MPI_Group_free(&group);\n                    if(mpi_error_code != MPI_SUCCESS)\n                        ::SafeMPI::detail::print_mpi_error(mpi_error_code,\n                                \"SafeMPI::Group::Impl::~Impl()\", __LINE__, __FILE__);\n                }\n            }\n\n        }; // struct Impl\n\n        friend class Intracomm;\n\n        Group() : pimpl() { }\n\n        // only Intracomm will use this\n        Group(MPI_Comm comm) : pimpl(new Impl(comm)) { }\n\n        // only myself will use this\n        Group(const std::shared_ptr<Impl>& p) : pimpl(p) { }\n\n        std::shared_ptr<Impl> pimpl;\n    }; // class Group\n\n    ///  Wrapper around MPI_Comm. Has a shallow copy constructor; use Create(Get_group()) for deep copy\n    class Intracomm {\n\n        static bool Comm_compare(const MPI_Comm& comm1, const MPI_Comm& comm2) {\n            int compare_result;\n            const int result = MPI_Comm_compare(comm1, comm2, &compare_result);\n            return ((result == MPI_SUCCESS) && (compare_result == MPI_IDENT));\n        }\n\n        struct Impl {\n            MPI_Comm comm;\n            int me;\n            int numproc;\n            bool owner;\n\n            int utag; // Only used by main thread so no volatile or mutex needed\n            int urtag;// Ditto\n\n            Impl(const MPI_Comm& c, int m, int n, bool o) :\n                comm(c), me(m), numproc(n), owner(o), utag(1024), urtag(1)\n            { MADNESS_ASSERT(comm != MPI_COMM_NULL); }\n\n            ~Impl() {\n                if(owner && Is_initialized() && !Is_finalized() && !Comm_compare(comm, MPI_COMM_WORLD) && comm != MPI_COMM_NULL) {\n                    MPI_Comm_free(&comm);\n                }\n            }\n\n            /// Returns a unique tag for temporary use (1023<tag<=4095)\n\n            /// These tags are intended for one time use to avoid tag\n            /// collisions with other messages around the same time period.\n            /// It simply increments/wraps a counter and returns the next\n            /// legal value.\n            ///\n            /// So that send and receiver agree on the tag all processes\n            /// need to call this routine in the same sequence.\n            int unique_tag() {\n                // RJH removed mutex since ordering requirement across processes means\n                // there can never be any thread contention.\n                // Cannot use MPI mutex for anything else!\n                // It will preprocess to nothing for MPI_THREAD_MULTIPLE!\n                //madness::ScopedMutex<madness::SCALABLE_MUTEX_TYPE> obolus(SafeMPI::charon);\n                int result = utag++;\n                if (utag >= 4095) utag = 1024;\n                return result;\n            }\n\n            /// \\return the period of repeat of unique tags produces by unique_tag()\n            static int unique_tag_period() {\n              const auto min_tag_value = 1024;\n              const auto max_tag_value = 4094;\n              return max_tag_value - min_tag_value + 1;\n            }\n\n            /// Returns a unique tag reserved for long-term use (0<tag<1000)\n\n            /// Get a tag from this routine for long-term/repeated use.\n            ///\n            /// Tags in [1000,1023] are statically assigned.\n            int unique_reserved_tag() {\n                // RJH removed mutex since ordering requirement across processes means\n                // Cannot use MPI mutex for anything else!\n                // It will preprocess to nothing for MPI_THREAD_MULTIPLE!\n                // madness::ScopedMutex<madness::SCALABLE_MUTEX_TYPE> obolus(SafeMPI::charon);\n                int result = urtag++;\n                if (result >= 1000) MADNESS_EXCEPTION( \"too many reserved tags in use\" , result );\n                return result;\n            }\n\n        };\n        std::shared_ptr<Impl> pimpl;\n\n        friend void SafeMPI::detail::init_comm_world();\n        friend int Finalize();\n\n        // For internal use only. Do not try to call this constructor. It is\n        // only used to construct Intarcomm in Create().\n        Intracomm(const std::shared_ptr<Impl>& i) : pimpl(i) { }\n\n        // Not allowed\n        Intracomm& operator=(const Intracomm& other);\n\n        // makes an uninitialized ptr\n        Intracomm() : pimpl(nullptr) {}\n\n    public:\n        struct WorldInitObject;\n\n        // For internal use only. Do not try to call this constructor. It is\n        // only used to construct COMM_WORLD.\n        Intracomm(const WorldInitObject&);\n\n        explicit Intracomm(const MPI_Comm& comm, bool take_ownership_of_comm = true) :\n            pimpl()\n        {\n            MADNESS_ASSERT(Is_initialized());\n            int rank = -1, size = -1;\n            MADNESS_MPI_TEST(MPI_Comm_rank(comm, &rank));\n            MADNESS_MPI_TEST(MPI_Comm_size(comm, &size));\n            take_ownership_of_comm =\n                    take_ownership_of_comm && (! Comm_compare(comm, MPI_COMM_WORLD));\n            pimpl.reset(new Impl(comm, rank, size, take_ownership_of_comm));\n        }\n\n        Intracomm(const Intracomm& other) : pimpl(other.pimpl) { }\n\n        ~Intracomm() { }\n\n        /**\n         * This collective operation creates a new \\c Intracomm from an\n         * \\c Intracomm::Group object. Must be called by all processes that\n         * belong to this communicator, but not all must use the same \\c group .\n         * Thus this \\c Intracomm can be partitioned into several \\c Intracomm\n         * objects with one call.\n         *\n         * @param group Intracomm::Group describing the Intracomm object to be\n         *   created (\\c Intracomm::Get_group() and \\c Intracomm::Group::Incl() )\n         * @return a new Intracomm object\n         */\n        Intracomm Create(Group group) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            MPI_Comm group_comm;\n            MADNESS_MPI_TEST(MPI_Comm_create(pimpl->comm, group.group(), &group_comm));\n            int me; MADNESS_MPI_TEST(MPI_Comm_rank(group_comm, &me));\n            int nproc; MADNESS_MPI_TEST(MPI_Comm_size(group_comm, &nproc));\n            return Intracomm(std::shared_ptr<Impl>(new Impl(group_comm, me, nproc, true)));\n        }\n\n        static const int UNDEFINED_COLOR = MPI_UNDEFINED;\n        /**\n         * This collective operation creates a new \\c Intracomm using\n         * the MPI_Comm_split. Must be called by all processes that\n         * belong to this communicator. Each caller must provide Color of the new Intracomm\n         * and Key (this controls the rank within the new Intracomm;\n         * ties are broken by the rank in this Intracomm).\n         *\n         * @param Color Specifies the new Intracomm that the calling process is to be assigned to.\n         *              The value of color must be non-negative. If Color=UNDEFINED_COLOR then\n         *              an uninitialized Intracomm object will be produced.\n         * @param Key The relative rank of the calling process in the group of the new Intracomm.\n         *            If omitted, each communicator's ranks will be determined by\n         *            the rank in the host communicator.\n         * @return a new Intracomm object\n         */\n        Intracomm Split(int Color, int Key = 0) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            MPI_Comm group_comm;\n            MADNESS_MPI_TEST(MPI_Comm_split(pimpl->comm, Color, Key, &group_comm));\n            if (group_comm != MPI_COMM_NULL) {\n              int me; MADNESS_MPI_TEST(MPI_Comm_rank(group_comm, &me));\n              int nproc; MADNESS_MPI_TEST(MPI_Comm_size(group_comm, &nproc));\n              return Intracomm(std::shared_ptr<Impl>(new Impl(group_comm, me, nproc, true)));\n            }\n            else\n              return Intracomm();\n        }\n\n      static const int UNDEFINED_SPLIT_TYPE = MPI_UNDEFINED;\n      static const int SHARED_SPLIT_TYPE = MPI_COMM_TYPE_SHARED;\n      /**\n       * This collective operation creates a new \\c Intracomm using\n       * the MPI_Comm_split_type. Must be called by all processes that\n       * belong to this communicator. Each caller must provide the split type\n       * and Key (this controls the rank within the new Intracomm;\n       * ties are broken by the rank in this Intracomm).\n       *\n       * @param Type  Controls how this Intracomm will be split.\n       *              The value can only be UNDEFINED_SPLIT_TYPE or SHARED_SPLIT_TYPE.\n       *              If Type=UNDEFINED_SPLIT_TYPE then\n       *              an uninitialized Intracomm object will be produced.\n       * @param Key The relative rank of the calling process in the group of the new Intracomm.\n       *            If omitted, each communicator's ranks will be determined by\n       *            the rank in the host communicator.\n       * @return a new Intracomm object\n       */\n      Intracomm Split_type(int Type, int Key = 0) const {\n        MADNESS_ASSERT(pimpl);\n        SAFE_MPI_GLOBAL_MUTEX;\n        MPI_Comm group_comm;\n        MPI_Info info;\n        MPI_Info_create(&info);\n        MADNESS_MPI_TEST(MPI_Comm_split_type(pimpl->comm, Type, Key, info, &group_comm));\n        MPI_Info_free(&info);\n        if (group_comm != MPI_COMM_NULL) {\n          int me; MADNESS_MPI_TEST(MPI_Comm_rank(group_comm, &me));\n          int nproc; MADNESS_MPI_TEST(MPI_Comm_size(group_comm, &nproc));\n          return Intracomm(std::shared_ptr<Impl>(new Impl(group_comm, me, nproc, true)));\n        }\n        else\n          return Intracomm();\n      }\n\n      /**\n         * Clones this Intracomm object\n         *\n         * @return a (deep) copy of this Intracomm object\n         */\n        Intracomm Clone() const {\n          return Create(this->Get_group());\n        }\n\n        bool operator==(const Intracomm& other) const {\n            return (pimpl == other.pimpl) || ((pimpl && other.pimpl) &&\n                    Comm_compare(pimpl->comm, other.pimpl->comm));\n        }\n\n        /**\n         * This local operation returns the Intracomm::Group object corresponding to this intracommunicator\n         * @return the Intracomm::Group object corresponding to this intracommunicator\n         */\n        Group Get_group() const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            Group group(pimpl->comm);\n            return group;\n        }\n\n        MPI_Comm& Get_mpi_comm() const {\n            MADNESS_ASSERT(pimpl);\n            return pimpl->comm;\n        }\n\n        int Get_rank() const {\n            MADNESS_ASSERT(pimpl);\n            return pimpl->me;\n        }\n\n        int Get_size() const {\n            MADNESS_ASSERT(pimpl);\n            return pimpl->numproc;\n        }\n\n        Request Isend(const void* buf, const int count, const MPI_Datatype datatype, const int dest, const int tag) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            Request request;\n            MADNESS_MPI_TEST(MPI_Isend(const_cast<void*>(buf), count, datatype, dest,tag, pimpl->comm, request));\n            return request;\n        }\n\n        Request Issend(const void* buf, const int count, const MPI_Datatype datatype, const int dest, const int tag) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            Request request;\n            MADNESS_MPI_TEST(MPI_Issend(const_cast<void*>(buf), count, datatype, dest,tag, pimpl->comm, request));\n            return request;\n        }\n\n        Request Irecv(void* buf, const int count, const MPI_Datatype datatype, const int src, const int tag) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            Request request;\n            MADNESS_MPI_TEST(MPI_Irecv(buf, count, datatype, src, tag, pimpl->comm, request));\n            return request;\n        }\n\n        void Send(const void* buf, const int count, const MPI_Datatype datatype, int dest, int tag) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            MADNESS_MPI_TEST(MPI_Ssend(const_cast<void*>(buf), count, datatype, dest, tag, pimpl->comm));\n        }\n\n#ifdef MADNESS_USE_BSEND_ACKS\n        void Bsend(const void* buf, size_t count, const MPI_Datatype datatype, int dest, int tag) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            if (count>10 || datatype!=MPI_BYTE) MADNESS_EXCEPTION(\"Bsend: this protocol is only for 1-byte acks\", count );\n            MADNESS_MPI_TEST(MPI_Bsend(const_cast<void*>(buf), count, datatype, dest, tag, pimpl->comm));\n        }\n#endif // MADNESS_USE_BSEND_ACKS\n\n        void Recv(void* buf, const int count, const MPI_Datatype datatype, const int source, const int tag, MPI_Status& status) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            MADNESS_MPI_TEST(MPI_Recv(buf, count, datatype, source, tag, pimpl->comm, &status));\n        }\n\n        void Recv(void* buf, const int count, const MPI_Datatype datatype, const int source, const int tag) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            MADNESS_MPI_TEST(MPI_Recv(buf, count, datatype, source, tag, pimpl->comm, MPI_STATUS_IGNORE));\n        }\n\n        void Bcast(void* buf, size_t count, const MPI_Datatype datatype, const int root) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            MADNESS_MPI_TEST(MPI_Bcast(buf, count, datatype, root, pimpl->comm));\n        }\n\n        void Reduce(const void* sendbuf, void* recvbuf, const int count, const MPI_Datatype datatype, const MPI_Op op, const int root) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            MADNESS_MPI_TEST(MPI_Reduce(const_cast<void*>(sendbuf), recvbuf, count, datatype, op, root, pimpl->comm));\n        }\n\n        void Allreduce(const void* sendbuf, void* recvbuf, const int count, const MPI_Datatype datatype, const MPI_Op op) const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            MADNESS_MPI_TEST(MPI_Allreduce(const_cast<void*>(sendbuf), recvbuf, count, datatype, op, pimpl->comm));\n        }\n        bool Get_attr(int key, void* value) const {\n            MADNESS_ASSERT(pimpl);\n            int flag = 0;\n            SAFE_MPI_GLOBAL_MUTEX;\n            MADNESS_MPI_TEST(MPI_Comm_get_attr(pimpl->comm, key, value, &flag));\n            return flag != 0;\n        }\n\n        void Abort(int code=1) const {\n            // if SIGABRT has a handler, call std::abort to allow it be caught,\n            // else call MPI_Abort which does not seem to call abort at all,\n            // instead sends SIGTERM followed by SIGKILL\n            // if have a custom signal handler for SIGABRT (i.e. we are running under a\n            // debugger) then call abort()\n            struct sigaction sa;\n            auto rc = sigaction(SIGABRT, NULL, &sa);\n            if (rc == 0 && sa.sa_handler != SIG_DFL) {\n              std::abort();\n            } else {\n              MPI_Abort(pimpl->comm, code);\n            }\n        }\n\n        void Barrier() const {\n            MADNESS_ASSERT(pimpl);\n            SAFE_MPI_GLOBAL_MUTEX;\n            MADNESS_MPI_TEST(MPI_Barrier(pimpl->comm));\n        }\n\n        /// Returns a unique tag for temporary use (1023<tag<4095)\n\n        /// These tags are intended for one time use to avoid tag\n        /// collisions with other messages around the same time period.\n        /// It simply increments/wraps a counter and returns the next\n        /// legal value.\n        ///\n        /// So that send and receiver agree on the tag all processes\n        /// need to call this routine in the same sequence.\n        int unique_tag() {\n            MADNESS_ASSERT(pimpl);\n            return pimpl->unique_tag();\n        }\n\n        /// \\return the period of repeat of unique tags produces by unique_tag()\n        static int unique_tag_period() {\n          return Impl::unique_tag_period();\n        }\n\n        /// Returns a unique tag reserved for long-term use (0<tag<1000)\n\n        /// Get a tag from this routine for long-term/repeated use.\n        ///\n        /// Tags in [1000,1023] are statically assigned.\n        int unique_reserved_tag() {\n            MADNESS_ASSERT(pimpl);\n            return pimpl->unique_reserved_tag();\n        }\n\n        /// Construct info about a binary tree with given root\n\n        /// Constructs a binary tree spanning the communicator with\n        /// process root as the root of the tree.  Returns the logical\n        /// parent and children in the tree of the calling process.  If\n        /// there is no parent/child the value -1 will be set.\n        void binary_tree_info(int root, int& parent, int& child0, int& child1);\n\n    }; // class Intracomm\n\n    namespace detail {\n\n        /// Initialize SafeMPI::COMM_WORLD\n        inline void init_comm_world() {\n            MADNESS_MPI_TEST(MPI_Comm_rank(COMM_WORLD.pimpl->comm, & COMM_WORLD.pimpl->me));\n            MADNESS_MPI_TEST(MPI_Comm_size(COMM_WORLD.pimpl->comm, & COMM_WORLD.pimpl->numproc));\n            MADNESS_MPI_TEST(MPI_Comm_set_errhandler(COMM_WORLD.pimpl->comm, MPI_ERRORS_RETURN));\n        }\n\n    }  // namespace detail\n\n\n    /// Analogous to MPI_Init_thread\n\n    /// \\param argc the number of arguments in argv\n    /// \\param argv the vector of command-line arguments\n    /// \\param requested the desired thread level\n    /// \\return provided thread level\n    inline int Init_thread(int & argc, char **& argv, int requested) {\n        int provided = 0;\n        MADNESS_MPI_TEST(MPI_Init_thread(&argc, &argv, requested, &provided));\n        detail::init_comm_world();\n        return provided;\n    }\n\n    /// Analogous to MPI_Init_thread\n\n    /// \\param requested the desired thread level\n    /// \\return provided thread level\n    inline int Init_thread(int requested) {\n        int argc = 0;\n        char** argv = nullptr;\n        return SafeMPI::Init_thread(argc, argv, requested);\n    }\n\n    /// Analogous to MPI_Init\n\n    /// \\param argc The number of arguments in argv\n    /// \\param argv The vector of command-line arguments\n    inline void Init(int &argc, char **&argv) {\n        MADNESS_MPI_TEST(MPI_Init(&argc, &argv));\n        SafeMPI::detail::init_comm_world();\n    }\n\n    /// Analogous to MPI_Init\n    inline void Init() {\n        int argc = 0;\n        char** argv = nullptr;\n        SafeMPI::Init(argc,argv);\n    }\n\n    /// Analogous to MPI_Finalize\n\n    /// This returns status rather than throw an\n    /// exception upon failure because this is a \"destructor\", and throwing from\n    /// destructors is evil.\n    /// \\return 0 if successful, nonzero otherwise (see MPI_Finalize() for the\n    /// return codes).\n    inline int Finalize() {\n        SafeMPI::COMM_WORLD.pimpl.reset();\n        const int result = MPI_Finalize();\n        return result;\n    }\n\n    /// Analogous to MPI_Query_thread\n\n    /// \\return the MPI thread level provided by SafeMPI::Init_thread()\n    inline int Query_thread() {\n        int provided;\n        MADNESS_MPI_TEST(MPI_Query_thread(&provided));\n        return provided;\n    }\n\n    /// Wall time\n\n    /// \\return The current wall time\n    inline double Wtime() { return MPI_Wtime(); }\n\n    /// Set buffer for \\c Bsend .\n\n    /// \\param buffer The buffer to be used by Bsend\n    /// \\param size The size of the buffer in Bytes\n    inline void Attach_buffer(void* buffer, int size) {\n        MADNESS_MPI_TEST(MPI_Buffer_attach(buffer, size));\n    }\n\n    /// Unset the \\c Bsend buffer.\n\n    /// \\param[out] buffer The buffer that was used by Bsend\n    inline int Detach_buffer(void *&buffer) {\n        int size = 0;\n        MPI_Buffer_detach(&buffer, &size);\n        return size;\n    }\n\n    /// Analogous to MPI_Op_create\n    inline MPI_Op Op_create(MPI_User_function *user_fn, int commute) {\n      MPI_Op result;\n      MADNESS_MPI_TEST(MPI_Op_create(user_fn, commute, &result));\n      return result;\n    }\n\n    /// Analogous to MPI_Op_free\n    inline void Op_free(MPI_Op op) {\n      MADNESS_MPI_TEST(MPI_Op_free(&op));\n    }\n\n} // namespace SafeMPI\n\n#endif // MADNESS_WORLD_SAFEMPI_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/stack.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_STACK_H__INCLUDED\n#define MADNESS_WORLD_STACK_H__INCLUDED\n\n/**\n \\file stack.h\n \\brief Implement \\c Stack for a fixed-size stack container.\n \\ingroup containers\n*/\n\n#include <madness/world/madness_exception.h>\n#include <cstring>\n#include <cstdlib>\n#include <algorithm>\n#include <memory>\n#include <new>\n#include <type_traits>\n\nnamespace madness {\n\n    namespace detail {\n\n        /// Base class for Stack which implements basic memory operations for non-POD objects.\n\n        /// \\tparam T The data type of the stack.\n        /// \\tparam isPod An auxiliary template parameter to select the\n        ///    POD/non-POD versions of this class.\n        template <typename T, bool isPod>\n        class StackBase {\n        protected:\n\n            /// Destroy a non-POD object.\n\n            /// \\param[in] ptr A pointer to the object to be destroyed.\n            static void destroy(T* ptr) { ptr->~T(); }\n\n            /// Destroy a range of non-POD objects.\n\n            /// \\param[in] first The beginning of the range to be destroyed.\n            /// \\param[in] last The end of the range to be destroyed.\n            static void destroy(T* first, T* last) {\n                while(first != last) {\n                    --last;\n                    destroy(last);\n                }\n            }\n\n            /// Move a range of POD objects.\n\n            /// \\param[in] first The beginning of the range to be moved.\n            /// \\param[in] last The end of the range to be moved.\n            /// \\param[in] dest Pointer to the uninitialized memory range.\n            static void uninitialized_move(T* first, T* last, T* dest) {\n                for (; first != last; ++first, ++dest) {\n                    ::new (dest) T(std::move(*first));\n                    destroy(first);\n                }\n            }\n\n            /// Copy a range of POD objects.\n\n            /// \\param[in] first The beginning of the range to be copied.\n            /// \\param[in] last The end of the range to be copied.\n            /// \\param[in] dest Pointer to the uninitialized memory range.\n            static void uninitialized_copy(T* first, T* last, T* dest) {\n                std::uninitialized_copy(first, last, dest);\n            }\n\n        }; // class StackBase\n\n\n        /// Base class for `Stack` which implements basic memory operations for POD objects.\n\n        /// \\tparam T The data type of the stack.\n        template <typename T>\n        class StackBase<T, true> {\n        protected:\n\n            /// Destroy a POD object (no op).\n\n            /// No need to destroy PODs.\n            static void destroy(T*) { }\n\n            /// Destroy a range of POD objects (no op).\n\n            /// No need to destroy PODs.\n            static void destroy(T*, T*) { }\n\n            /// Move a range of POD objects to an uninitialized buffer.\n\n            /// \\param[in] first The beginning of the range to be moved.\n            /// \\param[in] last The end of the range to be moved.\n            /// \\param[in] dest Pointer to the uninitialized memory buffer.\n            static void uninitialized_move(T* first, T* last, T* dest) {\n                // Use simple copy for pods\n                if (first != last)\n                    std::memcpy(dest, first, (last - first) * sizeof(T));\n            }\n\n            /// Copy a range of POD objects to an uninitialized buffer.\n\n            /// \\param[in] first The beginning of the range to be copied.\n            /// \\param[in] last The end of the range to be copied.\n            /// \\param[in] dest Pointer to the uninitialized memory buffer.\n            static void uninitialized_copy(T* first, T* last, T* dest) {\n                // Use simple copy for pods\n                if (first != last)\n                    std::memcpy(dest, first, (last - first) * sizeof(T));\n            }\n\n        }; // class StackBase<T, true>\n\n    } // namespace detail\n\n    /// Dynamically sized Stack with small stack size optimization.\n\n    /// This object is a dynamically sized stack that functions similarly to a\n    /// \\c std::vector. It also includes an optimization for small stack sizes\n    /// that avoids memory allocations when the stack size is less than or equal\n    /// to \\c N.\n    /// \\tparam T The type of data stored in the stack.\n    /// \\tparam N The fixed size of the stack.\n    template <typename T, unsigned int N>\n    class Stack : public detail::StackBase<T, std::is_standard_layout<T>::value && std::is_trivial<T>::value> {\n    public:\n        typedef T value_type; ///< Type of the stack elements.\n        typedef T& reference; ///< Element reference type.\n        typedef const T& const_reference; ///< Element constant reference type.\n        typedef unsigned int size_type; ///< An unsigned integral type.\n\n    private:\n        T* data_; ///< Pointer to the stack data.\n        size_type size_; ///< Number of elements on the stack.\n        size_type capacity_; ///< The maximum size, in elements, of the \\c data_ buffer.\n        char buffer_[sizeof(T) * N]; ///< Static buffer for storing a small number of elements.\n\n        typedef detail::StackBase<T, std::is_standard_layout<T>::value && std::is_trivial<T>::value> StackBase_;\n\n        using StackBase_::destroy;\n        using StackBase_::uninitialized_move;\n        using StackBase_::uninitialized_copy;\n\n        /// Check if the stack is using the small buffer to store data.\n\n        /// \\return True if the small buffer is being used; false otherwise.\n        bool is_small() const { return data_ == static_cast<const void*>(buffer_); }\n\n        /// Allocate a raw buffer.\n\n        /// Allocate an uninitialized buffer.\n        /// \\param[in] n The size of the new buffer.\n        /// \\return Pointer to the new buffer.\n        T* allocate(const size_type n) {\n            void* const buffer = std::malloc(n * sizeof(T));\n            if(! buffer)\n                throw std::bad_alloc();\n\n            return reinterpret_cast<T*>(buffer);\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Parameter description needed.\n        /// \\param other Description needed.\n        void move(Stack<T,N>& other) {\n            // Move the stack data from other to this object\n            if(other.is_small()) {\n                // Other is using the static buffer space, so the data must\n                // be moved to this object's static buffer.\n                data_ = reinterpret_cast<T*>(buffer_);\n                uninitialized_move(other.data_, other.data_ + other.size_, data_);\n                capacity_ = N;\n            } else {\n                // Other is using an allocated buffer, so move the pointer\n                // to the data\n                data_ = other.data_;\n                capacity_ = other.capacity_;\n\n                other.data_ = reinterpret_cast<T*>(other.buffer_);\n                other.capacity_ = N;\n            }\n            size_ = other.size_;\n            other.size_ = 0u;\n        }\n\n        /// Deallocate memory.\n\n        /// Destroy the pointer if it is a dynamically allocated buffer;\n        /// otherwise do nothing.\n        void deallocate() { if(! is_small()) std::free(data_); }\n\n    public:\n        /// Construct an empty stack.\n\n        /// The capacity of the stack is \\c N.\n        Stack() :\n            data_(reinterpret_cast<T*>(buffer_)),\n            size_(0u), capacity_(N)\n        { }\n\n        /// Copy constructor.\n\n        /// If the size of \\c other is less than or equal to \\c N, then this\n        /// object will use the small buffer. Otherwise, it will allocate memory\n        /// and copy the data of \\c other. The capacity of the object will be\n        /// equal to <tt>max(N, other.size())</tt>.\n        /// \\param[in] other The stack to be copied.\n        Stack(const Stack<T,N>& other) {\n            if(other.size_ > N) {\n                data_ = allocate(other.size_);\n                capacity_ = other.size_;\n            } else {\n                data_ = reinterpret_cast<T*>(buffer_);\n                capacity_ = N;\n            }\n            size_ = other.size_;\n            uninitialized_copy(other.data_, other.data_ + other.size_, data_);\n        }\n\n        /// Move constructor.\n\n        /// Move the data from \\c other to this object.\n        /// \\param[in] other The original stack.\n        Stack(Stack<T, N>&& other) { move(other); }\n\n        /// Assignment operator.\n\n        /// If the size of \\c other is less than or equal to \\c N, then this\n        /// object will use the small buffer. Otherwise, it will allocate memory\n        /// and copy the data of \\c other. The capacity of the object will be\n        /// equal to <tt>max(N, other.size())</tt>.\n        /// \\param[in] other The stack to be copied.\n        Stack<T,N>& operator=(const Stack<T,N>& other) {\n            if(this != &other) { // avoid self assignment\n\n                if(capacity_ < other.size_) {\n                    // Allocate a larger buffer\n                    T* const buffer = allocate(other.size_);\n                    uninitialized_copy(other.data_, other.data_ + other.size_, buffer);\n\n                    // Destroy the existing buffer\n                    destroy(data_, data_ + size_);\n                    deallocate();\n\n                    data_ = buffer;\n                    capacity_ = other.size_;\n                } else {\n                    destroy(data_, data_ + size_);\n                    uninitialized_copy(other.data_, other.data_ + other.size_, data_);\n                }\n\n                size_ = other.size_;\n            }\n\n            return *this;\n        }\n\n        /// Move assignment operator.\n\n        /// Move the data from \\c other to this object. If \\c other object is\n        /// is using the static buffer, the data is moved to this object's\n        /// static buffer. Otherwise, the pointer to the allocated buffer is\n        /// moved.\n        /// \\param[in] other The other stack object to be moved\n        /// \\note \\c other is left in a default constructed state so that it can\n        /// continue to be used.\n        Stack<T,N>& operator=(Stack<T,N>&& other) {\n            if(this != &other) { // avoid self assignment\n                destroy(data_, data_ + size_);\n                deallocate();\n                move(other);\n            }\n\n            return *this;\n        }\n\n        /// Destructor.\n        ~Stack() {\n            destroy(data_, data_ + size_);\n            deallocate();\n        }\n\n        /// Push a new item onto the stack.\n\n        /// Push an item onto the top of the stack. If the stack size is equal\n        /// to the capacity, resize the stack (double).\n        /// \\param[in] value The item to be pushed onto the stack.\n        void push(const_reference value) {\n            // Grow the buffer if there is no more free space on the stack\n            if(size_ == capacity_) {\n                const size_type n = (size_ << 1u) + 1u;\n\n                // Allocate new storage\n                T* const new_data = allocate(n);\n\n                // Move data to new vector\n                uninitialized_move(data_, data_ + size_, new_data);\n\n                // Deallocate the current data buffer\n                deallocate();\n\n                // Update the stack data and capacity\n                data_ = new_data;\n                capacity_ = n;\n            }\n\n            // Add value to the top of the stack\n            ::new (data_ + size_) T(value);\n            ++size_;\n        }\n\n        /// Pop an item off of the stack.\n\n        /// \\throw MadnessException (via MADNESS_ASSERT) if the stack is empty.\n        void pop() {\n            MADNESS_ASSERT(size_);\n            --size_;\n            destroy(data_ + size_);\n        }\n\n        /// Get the last item pushed onto the stack.\n\n        /// \\return A reference to the top of the stack.\n        /// \\throw MadnessException When the stack is empty\n        reference top() {\n            MADNESS_ASSERT(size_);\n            return data_[size_ - 1];\n        }\n\n        /// Get the last item pushed onto the stack.\n\n        /// \\return A const reference to the top of the stack.\n        /// \\throw MadnessException When the stack is empty.\n        const_reference top() const {\n            MADNESS_ASSERT(size_);\n            return data_[size_ - 1];\n        }\n\n        /// Size accessor.\n\n        /// \\return The number of items pushed to the stack.\n        size_type size() const { return size_; }\n\n        /// Size accessor.\n\n        /// \\return The number of items pushed to the stack.\n        size_type size() const volatile { return size_; }\n\n        /// Capacity accessor.\n\n        /// \\return The size of allocated storage capacity.\n        size_type capacity() const { return capacity_; }\n\n        /// Check if the stack is empty.\n\n        /// \\return True if the size of the stack is 0; otherwise false.\n        bool empty() const { return ! size_; }\n\n        /// Check if the stack is empty.\n\n        /// \\return True if the size of the stack is 0; otherwise false.\n        bool empty() const volatile { return ! size_; }\n\n      /// Empty the stack.\n\n        /// Destroy items on the stack (if any) and set the size to 0.\n        void clear() {\n            destroy(data_, data_ + size_);\n            size_ = 0u;\n        }\n\n        /// Empty the stack and free memory.\n\n        /// Destroy items on the stack (if any) and return it to the\n        /// default constructed state.\n        void reset() {\n            destroy(data_, data_ + size_);\n            deallocate();\n            data_ = reinterpret_cast<T*>(buffer_);\n            size_ = 0u;\n            capacity_ = N;\n        }\n\n        /// Data accessor.\n\n        /// \\return A const pointer to the stack data.\n        const T* data() const { return data_; }\n\n        /// Data accessor.\n\n        /// \\return A pointer to the stack data.\n        T* data() { return data_; }\n\n    }; // class Stack\n\n} // namespace madness\n\n#endif // MADNESS_WORLD_STACK_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/stubmpi.h",
    "content": "#ifndef MADNESS_STUBMPI_H\n#define MADNESS_STUBMPI_H\n\n#include <madness/madness_config.h>\n#include <cstddef>\n#include <cstdlib>\n#include <cstring>\n#include <madness/world/madness_exception.h>\n#include <madness/world/timers.h>\n\ntypedef int MPI_Group;\ntypedef int MPI_Request;\ntypedef struct MPI_Status {\n    int count;\n    int cancelled;\n    int MPI_SOURCE;\n    int MPI_TAG;\n    int MPI_ERROR;\n\n} MPI_Status;\n#define MPI_STATUS_IGNORE ((MPI_Status *)1)\n#define MPI_STATUSES_IGNORE ((MPI_Status *)1)\n\ntypedef int MPI_Comm;\n#define MPI_COMM_WORLD (0x44000000)\n#define MPI_UNDEFINED      (-32766)\n\ntypedef int MPI_Errhandler;\n\ntypedef int MPI_Info;\n\ntypedef std::ptrdiff_t MPI_Aint;\n\n/* MPI's error classes */\n/* these constants are consistent with MPICH2 mpi.h */\n#define MPI_SUCCESS          0      /* Successful return code */\n#define MPI_ERR_COMM         5      /* Invalid communicator */\n#define MPI_ERR_ARG         12      /* Invalid argument */\n#define MPI_ERR_IN_STATUS 999999\n#define MPI_ERRORS_RETURN 888888\n#define MPI_MAX_ERROR_STRING 1024\n\n/* Results of the compare operations. */\n#define MPI_IDENT     0\n#define MPI_CONGRUENT 1\n#define MPI_SIMILAR   2\n#define MPI_UNEQUAL   3\n\n/* MPI null objects */\n#define MPI_COMM_NULL       ((MPI_Comm)0x04000000)\n#define MPI_OP_NULL         ((MPI_Op)0x18000000)\n#define MPI_GROUP_NULL      ((MPI_Group)0x08000000)\n#define MPI_DATATYPE_NULL   ((MPI_Datatype)0x0c000000)\n#define MPI_REQUEST_NULL    ((MPI_Request)0x2c000000)\n#define MPI_ERRHANDLER_NULL ((MPI_Errhandler)0x14000000)\n\n/* MPI thread support levels */\n/* these constants are consistent with MPICH2 mpi.h */\n#define MPI_THREAD_SINGLE     0\n#define MPI_THREAD_FUNNELED   1\n#define MPI_THREAD_SERIALIZED 2\n#define MPI_THREAD_MULTIPLE   3\n#define MPI_COMM_TYPE_SHARED  4\n\n/* these constants are consistent with MPICH2 mpi.h */\n#define MPI_IN_PLACE   ((void *) -1)\n#define MPI_PROC_NULL  -1\n#define MPI_ANY_SOURCE -2\n#define MPI_ANY_TAG    -1\n\n/* MPI data types */\n/* these constants are consistent with MPICH2 mpi.h */\ntypedef int MPI_Datatype;\n#define MPI_CHAR               ((MPI_Datatype)0x4c000101)\n#define MPI_SIGNED_CHAR        ((MPI_Datatype)0x4c000118)\n#define MPI_UNSIGNED_CHAR      ((MPI_Datatype)0x4c000102)\n#define MPI_BYTE               ((MPI_Datatype)0x4c00010d)\n#define MPI_WCHAR              ((MPI_Datatype)0x4c00040e)\n#define MPI_SHORT              ((MPI_Datatype)0x4c000203)\n#define MPI_UNSIGNED_SHORT     ((MPI_Datatype)0x4c000204)\n#define MPI_INT                ((MPI_Datatype)0x4c000405)\n#define MPI_UNSIGNED           ((MPI_Datatype)0x4c000406)\n#define MPI_LONG               ((MPI_Datatype)0x4c000807)\n#define MPI_UNSIGNED_LONG      ((MPI_Datatype)0x4c000808)\n#define MPI_FLOAT              ((MPI_Datatype)0x4c00040a)\n#define MPI_DOUBLE             ((MPI_Datatype)0x4c00080b)\n#define MPI_LONG_DOUBLE        ((MPI_Datatype)0x4c00100c)\n#define MPI_LONG_LONG_INT      ((MPI_Datatype)0x4c000809)\n#define MPI_UNSIGNED_LONG_LONG ((MPI_Datatype)0x4c000819)\n#define MPI_LONG_LONG          ((MPI_Datatype)0x4c000809)\n\ninline int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb,\n                               MPI_Aint *extent) {\n  switch(datatype) {\n  case MPI_CHAR:\n    *extent = sizeof(char); break;\n  case MPI_SIGNED_CHAR:\n    *extent = sizeof(signed char); break;\n  case MPI_UNSIGNED_CHAR:\n    *extent = sizeof(unsigned char); break;\n  case MPI_BYTE:\n    *extent = 1; break;\n  case MPI_WCHAR:\n    *extent = sizeof(wchar_t); break;\n  case MPI_SHORT:\n    *extent = sizeof(short); break;\n  case MPI_UNSIGNED_SHORT:\n    *extent = sizeof(unsigned short); break;\n  case MPI_INT:\n    *extent = sizeof(int); break;\n  case MPI_UNSIGNED:\n    *extent = sizeof(unsigned); break;\n  case MPI_LONG:\n    *extent = sizeof(long); break;\n  case MPI_UNSIGNED_LONG:\n    *extent = sizeof(unsigned long); break;\n  case MPI_FLOAT:\n    *extent = sizeof(float); break;\n  case MPI_DOUBLE:\n    *extent = sizeof(double); break;\n  case MPI_LONG_DOUBLE:\n    *extent = sizeof(long double); break;\n  case MPI_LONG_LONG_INT: // same as MPI_LONG_LONG\n    *extent = sizeof(long long int); break;\n  case MPI_UNSIGNED_LONG_LONG:\n    *extent = sizeof(unsigned long long); break;\n  default:\n    *extent = MPI_UNDEFINED;\n  }\n  *lb = 0;\n  return MPI_SUCCESS;\n}\n\n/* MPI Reduction operation */\n/* these constants are consistent with MPICH2 mpi.h */\ntypedef int MPI_Op;\n#define MPI_MAX     ((MPI_Op)0x58000001)\n#define MPI_MIN     ((MPI_Op)0x58000002)\n#define MPI_SUM     ((MPI_Op)0x58000003)\n#define MPI_PROD    ((MPI_Op)0x58000004)\n#define MPI_LAND    ((MPI_Op)0x58000005)\n#define MPI_BAND    ((MPI_Op)0x58000006)\n#define MPI_LOR     ((MPI_Op)0x58000007)\n#define MPI_BOR     ((MPI_Op)0x58000008)\n#define MPI_LXOR    ((MPI_Op)0x58000009)\n#define MPI_BXOR    ((MPI_Op)0x5800000a)\n#define MPI_MINLOC  ((MPI_Op)0x5800000b)\n#define MPI_MAXLOC  ((MPI_Op)0x5800000c)\n#define MPI_REPLACE ((MPI_Op)0x5800000d)\n\n/* function type given to MPI_Op_create */\ntypedef void (MPI_User_function) ( void * a,\n               void * b, int * len, MPI_Datatype * );\n\ninline int MPI_Group_translate_ranks(MPI_Group, int, const int [],\n                            MPI_Group, int ranks2[]) {\n    ranks2[0] = 0;\n    return MPI_SUCCESS;\n}\n\n/* TODO The NO-OP implementation of may not be adequate. */\ninline int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup) {\n    return MPI_SUCCESS;\n}\n\n/* TODO The NO-OP implementation may not be adequate. */\ninline int MPI_Group_free(MPI_Group *group) {\n    return MPI_SUCCESS;\n}\n\n// Initialization and finalize functions\ninline int MPI_Init(int *, char ***) { return MPI_SUCCESS; }\ninline int MPI_Init_thread(int *, char ***, int, int *provided) { *provided = MADNESS_MPI_THREAD_LEVEL; return MPI_SUCCESS; }\ninline int MPI_Initialized(int* flag) { *flag = 1; return MPI_SUCCESS; }\ninline int MPI_Finalize() { return MPI_SUCCESS; }\ninline int MPI_Finalized(int* flag) { *flag = 0; return MPI_SUCCESS; }\ninline int MPI_Query_thread(int *provided) { *provided = MADNESS_MPI_THREAD_LEVEL; return MPI_SUCCESS; }\n\n// Buffer functions (do nothing since no messages may be sent)\ninline int MPI_Buffer_attach(void*, int) { return MPI_SUCCESS; }\ninline int MPI_Buffer_detach(void* buffer, int* size) { return MPI_SUCCESS; }\n\ninline int MPI_Test(MPI_Request *, int *flag, MPI_Status *) {\n    *flag = 1;\n    return MPI_SUCCESS;\n}\n\ninline int MPI_Testany(int, MPI_Request[], int* index, int *flag, MPI_Status*) {\n    *index = MPI_UNDEFINED;\n    *flag = 1;\n    return MPI_SUCCESS;\n}\n\ninline int MPI_Testsome(int, MPI_Request*, int *outcount, int*, MPI_Status*) {\n    *outcount = MPI_UNDEFINED;\n    return MPI_SUCCESS;\n}\n\ninline int MPI_Get_count(MPI_Status *, MPI_Datatype, int *count) {\n    *count = 0;\n    return MPI_SUCCESS;\n}\n\n// Communicator rank and size\ninline int MPI_Comm_rank(MPI_Comm, int* rank) { *rank = 0; return MPI_SUCCESS; }\ninline unsigned int MPI_Comm_size(MPI_Comm, int* size) { *size = 1; return MPI_SUCCESS; }\n\n// There is only one node so sending messages is not allowed. Always return MPI_ERR_COMM\ninline int MPI_Isend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *) { return MPI_ERR_COMM; }\ninline int MPI_Issend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *) { return MPI_ERR_COMM; }\ninline int MPI_Send(void*, int, MPI_Datatype, int, int, MPI_Comm) { return MPI_ERR_COMM; }\ninline int MPI_Ssend(void*, int, MPI_Datatype, int, int, MPI_Comm) { return MPI_ERR_COMM; }\ninline int MPI_Bsend(void*, int, MPI_Datatype, int, int, MPI_Comm) { return MPI_ERR_COMM; }\ninline int MPI_Irecv(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request*) { return MPI_ERR_COMM; }\ninline int MPI_Recv(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status*) { return MPI_ERR_COMM; }\n\n// Gather = copy\ninline int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,\n                void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype,\n                int root, MPI_Comm) {\n  MPI_Aint recvtype_extent;\n  MPI_Aint recvtype_lb;\n  MPI_Type_get_extent(recvtype, &recvtype_lb, &recvtype_extent);\n  MADNESS_ASSERT(recvtype_lb == 0);\n  MPI_Aint sendtype_extent;\n  MPI_Aint sendtype_lb;\n  MPI_Type_get_extent(sendtype, &sendtype_lb, &sendtype_extent);\n  MADNESS_ASSERT(sendtype_lb == 0);\n  MADNESS_ASSERT(sendcount * sendtype_extent <= recvcounts[0] * recvtype_extent);\n  std::memcpy(recvbuf, sendbuf, sendcount * sendtype_extent);\n  return MPI_SUCCESS;\n}\ninline int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,\n               void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) {\n  const int recvcounts[1] = {recvcount};\n  const int displs[1] = {0};\n  return MPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm);\n}\n\n// Bcast does nothing but return MPI_SUCCESS\ninline int MPI_Bcast(void*, int, MPI_Datatype, int, MPI_Comm) { return MPI_SUCCESS; }\n\n// Reduce does memcpy and returns MPI_SUCCESS\ninline int MPI_Reduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype, MPI_Op, int, MPI_Comm) {\n    if(sendbuf != MPI_IN_PLACE) std::memcpy(recvbuf, sendbuf, count);\n    return MPI_SUCCESS;\n}\ninline int MPI_Allreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype, MPI_Op, MPI_Comm) {\n    if(sendbuf != MPI_IN_PLACE) std::memcpy(recvbuf, sendbuf, count);\n    return MPI_SUCCESS;\n}\n\ninline int MPI_Comm_get_attr(MPI_Comm, int, void*, int*) { return MPI_ERR_COMM; }\n\ninline int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) {\n  //*newcomm = MPI_COMM_NULL;\n  *newcomm = MPI_COMM_WORLD; // So that can successfully split a 1 process communicator\n  return MPI_SUCCESS;\n}\n\ninline int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm) {\n  *newcomm = (split_type == MPI_UNDEFINED) ? MPI_COMM_NULL : comm;\n  return MPI_SUCCESS;\n}\n\ninline int MPI_Abort(MPI_Comm, int code) { exit(code); return MPI_SUCCESS; }\n\ninline int MPI_Barrier(MPI_Comm) { return MPI_SUCCESS; }\n\ninline int MPI_Comm_create(MPI_Comm,  MPI_Group, MPI_Comm *newcomm) {\n    //*newcomm = MPI_COMM_NULL;\n    *newcomm = MPI_COMM_WORLD; // So that can successfully split a 1 process communicator\n    return MPI_SUCCESS;\n}\n\ninline int MPI_Comm_group(MPI_Comm, MPI_Group* group) {\n    *group = MPI_GROUP_NULL;\n    return MPI_SUCCESS;\n}\n\ninline int MPI_Comm_free(MPI_Comm * comm) {\n    *comm = MPI_COMM_NULL;\n    return MPI_SUCCESS;\n}\n\ninline int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result) {\n    if (comm1 == comm2) {\n        *result = MPI_IDENT;\n    } else {\n        *result = MPI_UNEQUAL;\n    }\n    return MPI_SUCCESS;\n}\n\n\ninline int MPI_Error_string(int errorcode, char *string, int *resultlen) {\n    switch(errorcode) {\n        case MPI_SUCCESS:\n            *resultlen = 8;\n            std::strncpy(string, \"Success\", *resultlen);\n            break;\n        case MPI_ERR_COMM:\n            *resultlen = 21;\n            std::strncpy(string, \"Invalid communicator\", *resultlen);\n            break;\n        case MPI_ERR_ARG:\n            *resultlen = 17;\n            std::strncpy(string, \"Invalid argument\", *resultlen);\n            break;\n        default:\n            return MPI_ERR_ARG;\n            break;\n    }\n\n    return MPI_SUCCESS;\n}\n\ninline int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler) {return MPI_SUCCESS;}\n\ninline double MPI_Wtime() { return madness::wall_time(); }\n\ninline int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op) {\n  return MPI_SUCCESS;\n}\n\ninline int MPI_Op_free(MPI_Op *op) {\n  return MPI_SUCCESS;\n}\n\ninline int MPI_Info_create (MPI_Info *info) { return MPI_SUCCESS; }\ninline int MPI_Info_free (MPI_Info *info) { return MPI_SUCCESS; }\n\n#endif\n"
  },
  {
    "path": "src/madness/world/taskfn.h",
    "content": "/*\n This file is part of MADNESS.\n\n Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n For more information please contact:\n\n Robert J. Harrison\n Oak Ridge National Laboratory\n One Bethel Valley Road\n P.O. Box 2008, MS-6367\n\n email: harrisonrj@ornl.gov\n tel:   865-241-3937\n fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_TASKFN_H__INCLUDED\n#define MADNESS_WORLD_TASKFN_H__INCLUDED\n\n#include <type_traits>\n#include <madness/world/dependency_interface.h>\n#include <madness/world/thread.h>\n#include <madness/world/future.h>\n#include <madness/world/meta.h>\n\n#define MADNESS_TASKQ_VARIADICS 1\n\nnamespace madness {\n\n\n    // Forward decls\n    class World;\n    class WorldTaskQueue;\n\n    namespace detail {\n        template <typename, typename, typename> class MemFuncWrapper;\n        template <typename ptrT, typename memfnT, typename resT>\n        memfnT get_mem_func_ptr(const MemFuncWrapper<ptrT, memfnT, resT>&);\n    }\n\n    /// All world tasks must be derived from this public interface\n\n    /// Multiple worlds with independent queues feed tasks into shared task\n    /// pool that is mapped to the H/W.\n    ///\n    /// For simplicity and backward compatibility we maintain two run interfaces\n    /// but new code should adopt the multithreaded interface\n    ///\n    /// \\c run(World&) - the user implements this for a single-threaded task\n    ///\n    /// \\c run(World&, \\c const \\c TaskThreadEnv&) - the user implements this for\n    /// a multi-threaded task.\n    ///\n    class TaskInterface : public PoolTaskInterface, public DependencyInterface {\n        friend class WorldTaskQueue;\n    private:\n        volatile World* world;\n        CallbackInterface* completion;\n\n        // Used for submission to underlying queue when all dependencies are satisfied\n        struct Submit : public CallbackInterface {\n            PoolTaskInterface* p;\n            Submit(PoolTaskInterface* p) : p(p) {}\n            void notify() {\n                ThreadPool::add(p);\n            }\n        } submit;\n\n\n        /// Set task info\n\n        /// \\param w The world object that contains the task\n        /// \\param c Call this callback on completion\n        void set_info(World* w, CallbackInterface* c) {\n            world = w;\n            completion = c;\n        }\n\n        /// Adds call back to schedule task when outstanding dependencies are satisfied\n        void register_submit_callback() { register_final_callback(&submit); }\n\n    protected:\n        virtual void run(const TaskThreadEnv& env);\n\n    public:\n        static bool debug;\n\n        /// Create a new task with ndepend dependencies (default 0) and given attributes\n        TaskInterface(int ndepend=0, const TaskAttributes attr = TaskAttributes())\n                : PoolTaskInterface(attr)\n                , DependencyInterface(ndepend)\n                , world(0)\n                , completion(0)\n                , submit(this)\n        {}\n\n        /// Create a new task with ndepend dependencies (default 0) and given attributes,\n        /// keep track of \\c caller for debugging purposes.\n        TaskInterface(int ndepend, const char* caller, const TaskAttributes attr = TaskAttributes())\n                : PoolTaskInterface(attr)\n                , DependencyInterface(ndepend, caller)\n                , world(0)\n                , completion(0)\n                , submit(this)\n        {}\n\n        /// Create a new task with zero dependencies and given attributes\n        explicit TaskInterface(const TaskAttributes& attr)\n                : PoolTaskInterface(attr)\n                , DependencyInterface(0)\n                , world(0)\n                , completion(0)\n                , submit(this)\n        {}\n\n//         void serialize(Buffer& ar) {\n//             throw \"there is no way this is correct\";\n//             ar & *static_cast<PoolTaskInterface*>(this) & world;\n//         }\n\n        /// Runs a single-threaded task ... derived classes must implement this.\n\n        /// This interface may disappear so new code should use the multi-threaded interface.\n        virtual void run(World&) {\n            //print(\"in virtual run(world) method\");\n            MADNESS_EXCEPTION(\"World TaskInterface: user did not implement one of run(world) or run(world, taskthreadenv)\", 0);\n        }\n\n        /// Runs a multi-threaded task\n        virtual void run(World& world, const TaskThreadEnv& env) {\n            //print(\"in virtual run(world,env) method\", env.nthread(), env.id());\n            if (env.nthread() != 1)\n                MADNESS_EXCEPTION(\"World TaskInterface: user did not implement run(world, taskthreadenv) for multithreaded task\", 0);\n            run(world);\n        }\n\n        World* get_world() const { return const_cast<World*>(world); }\n\n        virtual ~TaskInterface() { if (completion) completion->notify(); }\n\n    }; // class TaskInterface\n\n    namespace detail {\n\n        template <typename T>\n        struct ArgCountHelper {\n            static const unsigned int value = 1u;\n        };\n\n        template <>\n        struct ArgCountHelper<void> {\n            static const unsigned int value = 0u;\n        };\n\n        // Counts the number of arguments that will be given to a task function\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T,\n                typename a6T, typename a7T, typename a8T, typename a9T>\n        struct ArgCount : public std::integral_constant<unsigned int, ArgCountHelper<a1T>::value\n                + ArgCountHelper<a2T>::value + ArgCountHelper<a3T>::value\n                + ArgCountHelper<a4T>::value + ArgCountHelper<a5T>::value\n                + ArgCountHelper<a6T>::value + ArgCountHelper<a7T>::value\n                + ArgCountHelper<a8T>::value + ArgCountHelper<a9T>::value> {\n        };\n\n\n        /// A wrapper object for holding task function argument objects\n        template <typename Arg>\n        class ArgHolder : private NO_DEFAULTS{\n        private:\n            Arg arg_;\n        public:\n\n            template <typename Arg_ = Arg,\n            typename = std::enable_if_t<\n              !std::is_same<std::decay_t<Arg_>,\n                            archive::BufferInputArchive>::value\n            >>\n            ArgHolder(Arg_&& arg) : arg_(arg) { }\n\n            ArgHolder(const archive::BufferInputArchive& input_arch) :\n                arg_()\n            {\n                input_arch & arg_;\n            }\n\n            operator Arg&() & { return arg_; }\n            operator const Arg&() const& { return arg_; }\n            explicit operator Arg&&() && { return std::move(arg_); }\n        }; // class ArgHolder\n\n        template <typename T>\n        struct is_arg_holder : public std::false_type {};\n        template <typename T>\n        struct is_arg_holder<ArgHolder<T>> : public std::true_type {};\n\n        template <typename T>\n        struct task_arg {\n            typedef T type;\n            typedef ArgHolder<T> holderT;\n        };\n\n        template <typename T>\n        struct task_arg<Future<T> > {\n            typedef T type;\n            typedef Future<T> holderT;\n        };\n\n        template <typename T>\n        struct task_arg<Future<T>* > {\n            typedef T type;\n            typedef Future<T>* holderT;\n        };\n\n        template <>\n        struct task_arg<Future<void> > {\n            typedef const Future<void> type;\n            typedef const Future<void> holderT;\n        };\n\n        template <>\n        struct task_arg<void> {\n            typedef const Future<void> type;\n            typedef const Future<void> holderT;\n        };\n\n        template <typename fnT>\n        struct task_result_type {\n            typedef typename madness::remove_fcvr<typename madness::detail::result_of<fnT>::type>::type resultT;\n            typedef Future<resultT> futureT;\n            typedef futureT type;\n        };\n\n        /// Future<void> is an empty object which is used as a placeholder for\n        /// unused arguments.\n        typedef Future<void> voidT;\n\n        // arg_holder::decay converts an argument holder to the corresponding argument (reference)\n        namespace arg_holder {\n\n        // specialization for ArgHolder<>&\n        template <typename T>\n        T& decay(ArgHolder<T>& arg_holder) {\n          return arg_holder;\n        }\n\n        // specialization for const ArgHolder<>&\n        template <typename T>\n        const T& decay(const ArgHolder<T>& arg_holder) {\n          return arg_holder;\n        }\n\n        // specialization for ArgHolder<>&&\n        template <typename T>\n        T&& decay(ArgHolder<T>&& arg_holder) {\n          return static_cast<T&&>(arg_holder);\n        }\n\n\n        // specialization for Future<>&\n        template <typename T>\n        T& decay(Future<T>& arg_holder) {\n          return arg_holder;\n        }\n\n        // specialization for const Future<>&\n        template <typename T>\n        const T& decay(const Future<T>& arg_holder) {\n          return arg_holder;\n        }\n\n        // specialization for Future<>&&\n        template <typename T>\n        T&& decay(Future<T>&& arg_holder) {\n          return static_cast<T&&>(arg_holder);\n        }\n\n        // specialization for Future<>*\n        template <typename T>\n        T& decay(Future<T>* arg_holder) {\n            return static_cast<T&>(*arg_holder);\n        }\n\n        // specialization for non-Future non-ArgHolder argument\n        template <typename T>\n        auto decay(T&& arg_holder) -> typename std::enable_if<\n        !is_future<T>::value && !is_arg_holder<T>::value, decltype(arg_holder)>::type{\n          return std::forward<T>(arg_holder);\n        }\n\n        }  // namespace arg_holder\n\n        using arg_holder::decay;\n\n        // These functions are used to differentiate the task function calls\n        // based on the number of arguments and return type.\n\n        // Note: voidT arguments must be const or the wrong function will be\n        // selected.\n\n        template <typename fnT>\n        inline typename std::enable_if<std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(Future<void>& result, fnT fn, const voidT&,\n                const voidT&, const voidT&, const voidT&, const voidT&,\n                const voidT&, const voidT&, const voidT&, const voidT&)\n        { fn(); result.set(); }\n\n        template <typename fnT, typename a1T>\n        inline typename std::enable_if<std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(Future<void>& result, fnT fn, a1T& a1,\n                const voidT&, const voidT&, const voidT&, const voidT&,\n                const voidT&, const voidT&, const voidT&, const voidT&)\n        { fn(decay(a1)); result.set(); }\n\n        template <typename fnT, typename a1T, typename a2T>\n        inline typename std::enable_if<std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(Future<void>& result, fnT fn, a1T& a1, a2T& a2,\n                const voidT&, const voidT&, const voidT&, const voidT&,\n                const voidT&, const voidT&, const voidT&)\n        { fn(decay(a1), decay(a2)); result.set(); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T>\n        inline typename std::enable_if<std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(Future<void>& result, fnT fn, a1T& a1, a2T& a2,\n                a3T& a3, const voidT&, const voidT&, const voidT&, const voidT&,\n                const voidT&, const voidT&)\n        { fn(decay(a1), decay(a2), decay(a3)); result.set(); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T>\n        inline typename std::enable_if<std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(Future<void>& result, fnT fn, a1T& a1, a2T& a2,\n                a3T& a3, a4T& a4, const voidT&, const voidT&, const voidT&,\n                const voidT&, const voidT&)\n        { fn(decay(a1), decay(a2), decay(a3), decay(a4)); result.set(); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n                typename a5T>\n        inline typename std::enable_if<std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(Future<void>& result, fnT fn, a1T& a1, a2T& a2,\n                a3T& a3, a4T& a4, a5T& a5, const voidT&, const voidT&,\n                const voidT&, const voidT&)\n        { fn(decay(a1), decay(a2), decay(a3), decay(a4), decay(a5)); result.set(); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n                typename a5T, typename a6T>\n        inline typename std::enable_if<std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(Future<void>& result, fnT fn, a1T& a1, a2T& a2,\n                a3T& a3, a4T& a4, a5T& a5, a6T& a6, const voidT&, const voidT&,\n                const voidT&)\n        { fn(decay(a1), decay(a2), decay(a3), decay(a4), decay(a5), decay(a6)); result.set(); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n                typename a5T, typename a6T, typename a7T>\n        inline typename std::enable_if<std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(Future<void>& result, fnT fn, a1T& a1, a2T& a2,\n                a3T& a3, a4T& a4, a5T& a5, a6T& a6, a7T& a7, const voidT&,\n                const voidT&)\n        { fn(decay(a1), decay(a2), decay(a3), decay(a4), decay(a5), decay(a6), decay(a7)); result.set(); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n                typename a5T, typename a6T, typename a7T, typename a8T>\n        inline typename std::enable_if<std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(Future<void>& result, fnT fn, a1T& a1, a2T& a2,\n                a3T& a3, a4T& a4, a5T& a5, a6T& a6, a7T& a7, a8T& a8, const voidT&)\n        { fn(decay(a1), decay(a2), decay(a3), decay(a4), decay(a5), decay(a6), decay(a7), decay(a8)); result.set(); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n            typename a5T, typename a6T, typename a7T, typename a8T, typename a9T>\n        inline typename std::enable_if<std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(Future<void>& result, fnT fn, a1T& a1, a2T& a2,\n                a3T& a3, a4T& a4, a5T& a5, a6T& a6, a7T& a7, a8T& a8, a9T& a9)\n        { fn(decay(a1), decay(a2), decay(a3), decay(a4), decay(a5), decay(a6), decay(a7), decay(a8), decay(a9)); result.set(); }\n\n        template <typename fnT>\n        inline typename std::enable_if<!std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(typename task_result_type<fnT>::futureT& result,\n                fnT fn, const voidT&, const voidT&, const voidT&, const voidT&,\n                const voidT&, const voidT&, const voidT&, const voidT&, const voidT&)\n        { result.set(fn()); }\n\n        template <typename fnT, typename a1T>\n        inline typename std::enable_if<!std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(typename task_result_type<fnT>::futureT& result,\n                fnT fn, a1T& a1, const voidT&, const voidT&, const voidT&,\n                const voidT&, const voidT&, const voidT&, const voidT&, const voidT&)\n        { result.set(fn(decay(a1))); }\n\n        template <typename fnT, typename a1T, typename a2T>\n        inline typename std::enable_if<!std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(typename task_result_type<fnT>::futureT& result,\n                fnT fn, a1T& a1, a2T& a2, const voidT&, const voidT&, const voidT&,\n                const voidT&, const voidT&, const voidT&, const voidT&)\n        { result.set(fn(decay(a1), decay(a2))); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T>\n        inline typename std::enable_if<!std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(typename task_result_type<fnT>::futureT& result,\n                fnT fn, a1T& a1, a2T& a2, a3T& a3, const voidT&, const voidT&,\n                const voidT&, const voidT&, const voidT&, const voidT&)\n        { result.set(fn(decay(a1), decay(a2), decay(a3))); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T>\n        inline typename std::enable_if<!std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(typename task_result_type<fnT>::futureT& result,\n                fnT fn, a1T& a1, a2T& a2, a3T& a3, a4T& a4, const voidT&,\n                const voidT&, const voidT&, const voidT&, const voidT&)\n        { result.set(fn(decay(a1), decay(a2), decay(a3), decay(a4))); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n                typename a5T>\n        inline typename std::enable_if<!std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(typename task_result_type<fnT>::futureT& result,\n                fnT fn, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, const voidT&,\n                const voidT&, const voidT&, const voidT&)\n        { result.set(fn(decay(a1), decay(a2), decay(a3), decay(a4), decay(a5))); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n                typename a5T, typename a6T>\n        inline typename std::enable_if<!std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(typename task_result_type<fnT>::futureT& result,\n                fnT fn, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6,\n                const voidT&, const voidT&, const voidT&)\n        { result.set(fn(decay(a1), decay(a2), decay(a3), decay(a4), decay(a5), decay(a6))); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n                typename a5T, typename a6T, typename a7T>\n        inline typename std::enable_if<!std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(typename task_result_type<fnT>::futureT& result,\n                fnT fn, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6,\n                a7T& a7, const voidT&, const voidT&)\n        { result.set(fn(decay(a1), decay(a2), decay(a3), decay(a4), decay(a5), decay(a6), decay(a7))); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n                typename a5T, typename a6T, typename a7T, typename a8T>\n        inline typename std::enable_if<!std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(typename task_result_type<fnT>::futureT& result,\n                fnT fn, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6,\n                a7T& a7, a8T& a8, const voidT&)\n        { result.set(fn(decay(a1), decay(a2), decay(a3), decay(a4), decay(a5), decay(a6), decay(a7), decay(a8))); }\n\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n                typename a5T, typename a6T, typename a7T, typename a8T, typename a9T>\n        inline typename std::enable_if<!std::is_void<typename detail::result_of<fnT>::type>::value >::type\n        run_function(typename task_result_type<fnT>::futureT& result,\n                fnT fn, a1T& a1, a2T& a2, a3T& a3, a4T& a4, a5T& a5, a6T& a6,\n                a7T& a7, a8T& a8, a9T& a9)\n        { result.set(fn(decay(a1), decay(a2), decay(a3), decay(a4), decay(a5), decay(a6), decay(a7), decay(a8), decay(a9))); }\n\n    } // namespace detail\n\n    /// Wrap a callable object and its arguments into a task function\n\n    /// The callable object may have up to 10 arguments\n    /// \\note arg*T cannot be a reference type\n    template <typename fnT, typename arg1T = void, typename arg2T = void,\n            typename arg3T = void, typename arg4T = void, typename arg5T = void,\n            typename arg6T = void, typename arg7T = void, typename arg8T = void,\n            typename arg9T = void>\n    struct TaskFn : public TaskInterface {\n\n      static_assert(not (std::is_const<arg1T>::value || std::is_reference<arg1T>::value),\n                    \"improper instantiation of TaskFn, arg1T cannot be a const or reference type\");\n      static_assert(not (std::is_const<arg2T>::value || std::is_reference<arg2T>::value),\n                    \"improper instantiation of TaskFn, arg2T cannot be a const or reference type\");\n      static_assert(not (std::is_const<arg3T>::value || std::is_reference<arg3T>::value),\n                    \"improper instantiation of TaskFn, arg3T cannot be a const or reference type\");\n      static_assert(not (std::is_const<arg4T>::value || std::is_reference<arg4T>::value),\n                    \"improper instantiation of TaskFn, arg4T cannot be a const or reference type\");\n      static_assert(not (std::is_const<arg5T>::value || std::is_reference<arg5T>::value),\n                    \"improper instantiation of TaskFn, arg5T cannot be a const or reference type\");\n      static_assert(not (std::is_const<arg6T>::value || std::is_reference<arg6T>::value),\n                    \"improper instantiation of TaskFn, arg6T cannot be a const or reference type\");\n      static_assert(not (std::is_const<arg7T>::value || std::is_reference<arg7T>::value),\n                    \"improper instantiation of TaskFn, arg7T cannot be a const or reference type\");\n      static_assert(not (std::is_const<arg8T>::value || std::is_reference<arg8T>::value),\n                    \"improper instantiation of TaskFn, arg8T cannot be a const or reference type\");\n      static_assert(not (std::is_const<arg9T>::value || std::is_reference<arg9T>::value),\n                    \"improper instantiation of TaskFn, arg9T cannot be a const or reference type\");\n\n    private:\n        /// This class type\n        typedef TaskFn<fnT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T,\n                arg8T, arg9T> TaskFn_;\n\n    public:\n\n        typedef fnT functionT; ///< The task function type\n        typedef typename detail::task_result_type<fnT>::resultT resultT;\n        ///< The result type of the function\n        typedef typename detail::task_result_type<fnT>::futureT futureT;\n\n        // argument value typedefs\n\n        static const unsigned int arity = detail::ArgCount<arg1T, arg2T, arg3T,\n                arg4T, arg5T, arg6T, arg7T, arg8T, arg9T>::value;\n        ///< The number of arguments given for the function\n        ///< \\note This may not match the arity of the function\n        ///< if it has default parameter values\n\n    private:\n        futureT result_; ///< The task Future result\n        const functionT func_; ///< The task function\n\n        // If the value of the argument is known at the time the\n        // Note: The type argNT for argN, where N  is > arity should be void\n\n        typename detail::task_arg<arg1T>::holderT arg1_;///< Argument 1 that will be given to the function\n        typename detail::task_arg<arg2T>::holderT arg2_;///< Argument 2 that will be given to the function\n        typename detail::task_arg<arg3T>::holderT arg3_;///< Argument 3 that will be given to the function\n        typename detail::task_arg<arg4T>::holderT arg4_;///< Argument 4 that will be given to the function\n        typename detail::task_arg<arg5T>::holderT arg5_;///< Argument 5 that will be given to the function\n        typename detail::task_arg<arg6T>::holderT arg6_;///< Argument 6 that will be given to the function\n        typename detail::task_arg<arg7T>::holderT arg7_;///< Argument 7 that will be given to the function\n        typename detail::task_arg<arg8T>::holderT arg8_;///< Argument 8 that will be given to the function\n        typename detail::task_arg<arg9T>::holderT arg9_;///< Argument 9 that will be given to the function\n\n        template <typename fT>\n        static fT& get_func(fT& f) { return f; }\n\n        template <typename ptrT, typename memfnT, typename resT>\n        static memfnT get_func(const detail::MemFuncWrapper<ptrT, memfnT, resT>& wrapper) {\n            return detail::get_mem_func_ptr(wrapper);\n        }\n\n        virtual void get_id(std::pair<void*,unsigned short>& id) const {\n            return make_id(id, get_func(func_));\n        }\n\n\n        /// Register a non-ready future as a dependency\n\n        /// \\tparam T The type of the future to check\n        /// \\param fut The future to check\n        template <typename T>\n        inline void check_dependency(Future<T>& fut) {\n            if(!fut.probe()) {\n                DependencyInterface::inc();\n                fut.register_callback(this);\n            }\n        }\n\n        /// Register (pointer to) a non-ready future as a dependency\n\n        /// \\tparam T The type of the future to check\n        /// \\param fut The future to check\n        template <typename T>\n        inline void check_dependency(Future<T>* fut) {\n            if(!fut->probe()) {\n                DependencyInterface::inc();\n                fut->register_callback(this);\n            }\n        }\n\n        /// None future arguments are always ready => no op\n        template <typename T>\n        inline void check_dependency(detail::ArgHolder<std::vector<Future<T> > >& arg) {\n            check_dependency(static_cast<std::vector<Future<T> >&>(arg));\n        }\n\n        /// None future arguments are always ready => no op\n        template <typename T>\n        inline void check_dependency(std::vector<Future<T> >& vec) {\n            for(typename std::vector<Future<T> >::iterator it = vec.begin(); it != vec.end(); ++it)\n                check_dependency(*it);\n        }\n\n        /// Future<void> is always ready => no op\n        inline void check_dependency(const std::vector<Future<void> >&) { }\n\n        /// None future arguments are always ready => no op\n        template <typename T>\n        inline void check_dependency(const detail::ArgHolder<T>&) { }\n\n        /// Future<void> is always ready => no op\n        inline void check_dependency(const Future<void>&) { }\n\n        /// Check dependencies and register callbacks where necessary\n        void check_dependencies() {\n            check_dependency(arg1_);\n            check_dependency(arg2_);\n            check_dependency(arg3_);\n            check_dependency(arg4_);\n            check_dependency(arg5_);\n            check_dependency(arg6_);\n            check_dependency(arg7_);\n            check_dependency(arg8_);\n            check_dependency(arg9_);\n        }\n\n        // Copies are not allowed.\n        TaskFn(const TaskFn_&);\n        TaskFn_ operator=(TaskFn_&);\n\n    public:\n\n#if MADNESS_TASKQ_VARIADICS\n\n        // what this look like ... but need extra MP functionality\n//        template <typename ... argsT>\n//        TaskFn(const futureT& result, functionT func, argsT&& ... args) :\n//            TaskInterface(attr), result_(result), func_(func), arg1_(), arg2_(),\n//            arg3_(), arg4_(), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n//            {\n//          MADNESS_ASSERT(arity == 0u);\n//          check_dependencies();\n//            }\n        TaskFn(const futureT& result, functionT func, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(), arg2_(),\n            arg3_(), arg4_(), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 0u);\n            check_dependencies();\n        }\n\n        template <typename a1T>\n        TaskFn(const futureT& result, functionT func, a1T&& a1,\n                const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(std::forward<a1T>(a1)), arg2_(),\n            arg3_(), arg4_(), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 1u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T>\n        TaskFn(const futureT& result, functionT func, a1T&& a1, a2T&& a2,\n                const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(std::forward<a1T>(a1)), arg2_(std::forward<a2T>(a2)),\n            arg3_(), arg4_(), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 2u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T>\n        TaskFn(const futureT& result, functionT func, a1T&& a1, a2T&& a2,\n                a3T&& a3, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(std::forward<a1T>(a1)), arg2_(std::forward<a2T>(a2)),\n            arg3_(std::forward<a3T>(a3)), arg4_(), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 3u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T>\n        TaskFn(const futureT& result, functionT func, a1T&& a1, a2T&& a2,\n                a3T&& a3, a4T&& a4, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(std::forward<a1T>(a1)), arg2_(std::forward<a2T>(a2)),\n            arg3_(std::forward<a3T>(a3)), arg4_(std::forward<a4T>(a4)), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 4u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T>\n        TaskFn(const futureT& result, functionT func, a1T&& a1, a2T&& a2,\n                a3T&& a3, a4T&& a4, a5T&& a5, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(std::forward<a1T>(a1)), arg2_(std::forward<a2T>(a2)),\n            arg3_(std::forward<a3T>(a3)), arg4_(std::forward<a4T>(a4)), arg5_(std::forward<a5T>(a5)), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 5u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T,\n                typename a6T>\n        TaskFn(const futureT& result, functionT func, a1T&& a1, a2T&& a2,\n                a3T&& a3, a4T&& a4, a5T&& a5, a6T&& a6,\n                const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(std::forward<a1T>(a1)), arg2_(std::forward<a2T>(a2)),\n            arg3_(std::forward<a3T>(a3)), arg4_(std::forward<a4T>(a4)), arg5_(std::forward<a5T>(a5)), arg6_(std::forward<a6T>(a6)), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 6u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T,\n                typename a6T, typename a7T>\n        TaskFn(const futureT& result, functionT func, a1T&& a1, a2T&& a2,\n                a3T&& a3, a4T&& a4, a5T&& a5, a6T&& a6,\n                a7T&& a7, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(std::forward<a1T>(a1)), arg2_(std::forward<a2T>(a2)),\n            arg3_(std::forward<a3T>(a3)), arg4_(std::forward<a4T>(a4)), arg5_(std::forward<a5T>(a5)), arg6_(std::forward<a6T>(a6)), arg7_(std::forward<a7T>(a7)), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 7u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T,\n                typename a6T, typename a7T, typename a8T>\n        TaskFn(const futureT& result, functionT func, a1T&& a1, a2T&& a2,\n                a3T&& a3, a4T&& a4, a5T&& a5, a6T&& a6, a7T&& a7,\n                a8T&& a8, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(std::forward<a1T>(a1)), arg2_(std::forward<a2T>(a2)),\n            arg3_(std::forward<a3T>(a3)), arg4_(std::forward<a4T>(a4)), arg5_(std::forward<a5T>(a5)), arg6_(std::forward<a6T>(a6)), arg7_(std::forward<a7T>(a7)), arg8_(std::forward<a8T>(a8)), arg9_()\n        {\n            MADNESS_ASSERT(arity == 8u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T,\n                typename a6T, typename a7T, typename a8T, typename a9T>\n        TaskFn(const futureT& result, functionT func, a1T&& a1, a2T&& a2,\n                a3T&& a3, a4T&& a4, a5T&& a5, a6T&& a6,\n                a7T&& a7, a8T&& a8, a9T&& a9, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(std::forward<a1T>(a1)), arg2_(std::forward<a2T>(a2)),\n            arg3_(std::forward<a3T>(a3)), arg4_(std::forward<a4T>(a4)), arg5_(std::forward<a5T>(a5)), arg6_(std::forward<a6T>(a6)), arg7_(std::forward<a7T>(a7)), arg8_(std::forward<a8T>(a8)), arg9_(std::forward<a9T>(a9))\n        {\n            MADNESS_ASSERT(arity == 9u);\n            check_dependencies();\n        }\n\n        TaskFn(const futureT& result, functionT func, const TaskAttributes& attr,\n                archive::BufferInputArchive& input_arch) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(input_arch),\n            arg2_(input_arch), arg3_(input_arch), arg4_(input_arch), arg5_(input_arch),\n            arg6_(input_arch), arg7_(input_arch), arg8_(input_arch), arg9_(input_arch)\n        {\n            // No need to check dependencies since the arguments are from an archive\n        }\n#else  // MADNESS_TASKQ_VARIADICS\n        TaskFn(const futureT& result, functionT func, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(), arg2_(),\n            arg3_(), arg4_(), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 0u);\n            check_dependencies();\n        }\n\n        template <typename a1T>\n        TaskFn(const futureT& result, functionT func, const a1T& a1,\n                const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(a1), arg2_(),\n            arg3_(), arg4_(), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 1u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T>\n        TaskFn(const futureT& result, functionT func, const a1T& a1, const a2T& a2,\n                const TaskAttributes& attr = TaskAttributes()) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(a1), arg2_(a2),\n            arg3_(), arg4_(), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 2u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T>\n        TaskFn(const futureT& result, functionT func, const a1T& a1, const a2T& a2,\n                const a3T& a3, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(a1), arg2_(a2),\n            arg3_(a3), arg4_(), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 3u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T>\n        TaskFn(const futureT& result, functionT func, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(a1), arg2_(a2),\n            arg3_(a3), arg4_(a4), arg5_(), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 4u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T>\n        TaskFn(const futureT& result, functionT func, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(a1), arg2_(a2),\n            arg3_(a3), arg4_(a4), arg5_(a5), arg6_(), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 5u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T,\n                typename a6T>\n        TaskFn(const futureT& result, functionT func, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(a1), arg2_(a2),\n            arg3_(a3), arg4_(a4), arg5_(a5), arg6_(a6), arg7_(), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 6u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T,\n                typename a6T, typename a7T>\n        TaskFn(const futureT& result, functionT func, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const a7T& a7, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(a1), arg2_(a2),\n            arg3_(a3), arg4_(a4), arg5_(a5), arg6_(a6), arg7_(a7), arg8_(), arg9_()\n        {\n            MADNESS_ASSERT(arity == 7u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T,\n                typename a6T, typename a7T, typename a8T>\n        TaskFn(const futureT& result, functionT func, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6, const a7T& a7,\n                const a8T& a8, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(a1), arg2_(a2),\n            arg3_(a3), arg4_(a4), arg5_(a5), arg6_(a6), arg7_(a7), arg8_(a8), arg9_()\n        {\n            MADNESS_ASSERT(arity == 8u);\n            check_dependencies();\n        }\n\n        template <typename a1T, typename a2T, typename a3T, typename a4T, typename a5T,\n                typename a6T, typename a7T, typename a8T, typename a9T>\n        TaskFn(const futureT& result, functionT func, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const a7T& a7, const a8T& a8, const a9T& a9, const TaskAttributes& attr) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(a1), arg2_(a2),\n            arg3_(a3), arg4_(a4), arg5_(a5), arg6_(a6), arg7_(a7), arg8_(a8), arg9_(a9)\n        {\n            MADNESS_ASSERT(arity == 9u);\n            check_dependencies();\n        }\n\n        TaskFn(const futureT& result, functionT func, const TaskAttributes& attr,\n                archive::BufferInputArchive& input_arch) :\n            TaskInterface(attr), result_(result), func_(func), arg1_(input_arch),\n            arg2_(input_arch), arg3_(input_arch), arg4_(input_arch), arg5_(input_arch),\n            arg6_(input_arch), arg7_(input_arch), arg8_(input_arch), arg9_(input_arch)\n        {\n            // No need to check dependencies since the arguments are from an archive\n        }\n#endif  // MADNESS_TASKQ_VARIADICS\n\n        virtual ~TaskFn() { }\n\n        const futureT& result() const { return result_; }\n\n      protected:\n        virtual void run(World&, const TaskThreadEnv&) /*override*/{\n            detail::run_function(result_, func_, arg1_, arg2_, arg3_, arg4_,\n                    arg5_, arg6_, arg7_, arg8_, arg9_);\n        }\n    }; // class TaskFn\n\n} // namespace madness\n\n\n#endif // MADNESS_WORLD_TASKFN_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/test_ar.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <iostream>\nusing std::cout;\nusing std::endl;\n\n#include <cmath>\n\n// make more fundamental types ostreammable\n#include <madness/world/array_addons.h>\n#include <madness/world/print.h>\n\ntemplate <typename T>\nstruct type_printer;\n\n/// \\file test.cc\n/// \\brief Tests serialization by some of the archives\n\n#include <madness/world/text_fstream_archive.h>\nusing madness::archive::TextFstreamInputArchive;\nusing madness::archive::TextFstreamOutputArchive;\n\n#include <madness/world/binary_fstream_archive.h>\nusing madness::archive::BinaryFstreamInputArchive;\nusing madness::archive::BinaryFstreamOutputArchive;\n\n#include <madness/world/vector_archive.h>\nusing madness::archive::VectorInputArchive;\nusing madness::archive::VectorOutputArchive;\n\n#include <madness/world/buffer_archive.h>\nusing madness::archive::BufferInputArchive;\nusing madness::archive::BufferOutputArchive;\n\n#include <madness/world/cereal_archive.h>\n#ifdef MADNESS_HAS_CEREAL\n#include <cereal/archives/binary.hpp>\nusing CerealBinaryInputArchive = madness::archive::CerealInputArchive<cereal::BinaryInputArchive>;\nusing CerealBinaryOutputArchive = madness::archive::CerealOutputArchive<cereal::BinaryOutputArchive>;\nstatic_assert(madness::is_archive_v<CerealBinaryInputArchive>);\nstatic_assert(madness::is_input_archive_v<CerealBinaryInputArchive>);\nstatic_assert(!madness::is_output_archive_v<CerealBinaryInputArchive>);\nstatic_assert(!madness::is_text_archive_v<CerealBinaryInputArchive>, \"ouch\");\nstatic_assert(!madness::is_text_archive_v<CerealBinaryInputArchive>, \"ouch\");\n#include <cereal/archives/portable_binary.hpp>\nusing CerealPortableBinaryInputArchive = madness::archive::CerealInputArchive<cereal::PortableBinaryInputArchive>;\nusing CerealPortableBinaryOutputArchive = madness::archive::CerealOutputArchive<cereal::PortableBinaryOutputArchive>;\nstatic_assert(!madness::is_text_archive_v<CerealPortableBinaryInputArchive>, \"ouch\");\nstatic_assert(!madness::is_text_archive_v<CerealPortableBinaryInputArchive>, \"ouch\");\n#include <cereal/archives/json.hpp>\nusing CerealJSONInputArchive = madness::archive::CerealInputArchive<cereal::JSONInputArchive>;\nusing CerealJSONOutputArchive = madness::archive::CerealOutputArchive<cereal::JSONOutputArchive>;\nstatic_assert(madness::is_text_archive_v<CerealJSONInputArchive>, \"ouch\");\nstatic_assert(madness::is_text_archive_v<CerealJSONOutputArchive>, \"ouch\");\n#include <cereal/archives/xml.hpp>\nusing CerealXMLInputArchive = madness::archive::CerealInputArchive<cereal::XMLInputArchive>;\nusing CerealXMLOutputArchive = madness::archive::CerealOutputArchive<cereal::XMLOutputArchive>;\nstatic_assert(madness::is_text_archive_v<CerealXMLInputArchive>, \"ouch\");\nstatic_assert(madness::is_text_archive_v<CerealXMLOutputArchive>, \"ouch\");\n#endif // MADNESS_HAS_CEREAL\n\n#include <madness/world/world.h>\n#include <madness/world/worldgop.h>\n\ntemplate <typename T>\nstruct type_printer;\n\n///// basic traits tests\n\nstatic_assert(!madness::has_member_serialize_v<int, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_member_serialize_v<int, madness::archive::BufferInputArchive>);\nstatic_assert(!madness::has_nonmember_serialize_v<int, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_nonmember_serialize_v<int, madness::archive::BufferInputArchive>);\nstatic_assert(!madness::has_freestanding_serialize_v<int, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_freestanding_serialize_v<int, madness::archive::BufferInputArchive>);\nstatic_assert(!madness::has_freestanding_serialize_with_size_v<int*, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_freestanding_serialize_with_size_v<int*, madness::archive::BufferInputArchive>);\nstatic_assert(madness::has_freestanding_default_serialize_v<int, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_freestanding_default_serialize_v<int, madness::archive::BufferInputArchive>);\nstatic_assert(madness::has_freestanding_default_serialize_with_size_v<int*, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_freestanding_default_serialize_with_size_v<int*, madness::archive::BufferInputArchive>);\nstatic_assert(madness::has_freestanding_default_serialize_with_size_v<int*, madness::archive::BinaryFstreamOutputArchive>);\nstatic_assert(madness::has_nonmember_store_v<int, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_nonmember_load_v<int, madness::archive::BufferInputArchive>);\nstatic_assert(!madness::is_user_serializable_v<int, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::is_user_serializable_v<int, madness::archive::BufferInputArchive>);\n\n// A is a class that provides a symmetric serialize method\nclass A {\npublic:\n    float a;\n    A(float a = 0.0) : a(a) {};\n\n    template <class Archive>\n    inline void serialize(Archive& ar) {\n        ar & a;\n    }\n};\n\nstatic_assert(madness::has_member_serialize_v<A, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_member_serialize_v<A, madness::archive::BufferInputArchive>);\n// N.B. nonmember serialize is provided for types with serialize member\nstatic_assert(madness::has_nonmember_serialize_v<A, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_nonmember_serialize_v<A, madness::archive::BufferInputArchive>);\n// N.B. nonmember load/store is provided for types with serialize member\nstatic_assert(madness::has_nonmember_store_v<A, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_nonmember_load_v<A, madness::archive::BufferInputArchive>);\nstatic_assert(!madness::has_nonmember_load_and_store_v<A, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_nonmember_load_and_store_v<A, madness::archive::BufferInputArchive>);\n\n// B is a class without a serialize method but with symmetric serialization.\nclass B {\npublic:\n    bool b;\n    B(bool b = false) : b(b) {};\n};\n\nnamespace madness {\n    namespace archive {\n\n        template <class Archive>\n        struct ArchiveSerializeImpl<Archive,B> {\n            static inline void serialize(const Archive& ar, B& b) {\n                ar & b.b;\n            };\n        };\n    }\n}\n\nstatic_assert(!madness::has_member_serialize_v<B, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_member_serialize_v<B, madness::archive::BufferInputArchive>);\nstatic_assert(madness::has_nonmember_serialize_v<B, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_nonmember_serialize_v<B, madness::archive::BufferInputArchive>);\n// N.B. nonmember load/store is provided for types with nonmember serialize\nstatic_assert(madness::has_nonmember_store_v<B, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_nonmember_load_v<B, madness::archive::BufferInputArchive>);\nstatic_assert(!madness::has_nonmember_load_and_store_v<B, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_nonmember_load_and_store_v<B, madness::archive::BufferInputArchive>);\n\n// C is a class with asymmetric load/store.\nclass C {\npublic:\n    long c;\n    C(long c = 0) : c(c) {};\n};\n\nnamespace madness {\n    namespace archive {\n        template <class Archive>\n        struct ArchiveLoadImpl<Archive,C> {\n            static inline void load(const Archive& ar, C& c) {\n                ar >> c.c;\n            };\n        };\n\n        template <class Archive>\n        struct ArchiveStoreImpl<Archive,C> {\n            static inline void store(const Archive& ar, const C& c) {\n                ar << c.c;\n            };\n        };\n    }\n}\n\nstatic_assert(!madness::has_member_serialize_v<C, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_member_serialize_v<C, madness::archive::BufferInputArchive>);\nstatic_assert(!madness::has_nonmember_serialize_v<C, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_nonmember_serialize_v<C, madness::archive::BufferInputArchive>);\nstatic_assert(madness::has_nonmember_store_v<C, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_nonmember_load_v<C, madness::archive::BufferInputArchive>);\nstatic_assert(madness::has_nonmember_load_and_store_v<C, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_nonmember_load_and_store_v<C, madness::archive::BufferInputArchive>);\n\n// POD can be serialized to most (except text stream) archives without any effort\nstruct D {\n  int32_t i;\n  int64_t l;\n};\n\nstatic_assert(!madness::has_member_serialize_v<D, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_member_serialize_v<D, madness::archive::BufferInputArchive>);\nstatic_assert(!madness::has_nonmember_serialize_v<D, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_nonmember_serialize_v<D, madness::archive::BufferInputArchive>);\n// N.B. nonmember load/store is provided for default-serializable types\nstatic_assert(madness::has_nonmember_store_v<D, madness::archive::BufferOutputArchive>);\nstatic_assert(madness::has_nonmember_load_v<D, madness::archive::BufferInputArchive>);\nstatic_assert(!madness::has_nonmember_load_and_store_v<D, madness::archive::BufferOutputArchive>);\nstatic_assert(!madness::has_nonmember_load_and_store_v<D, madness::archive::BufferInputArchive>);\n\n// to serialize a POD to a text stream just overload stream redirection operators\nstruct F {\n  int32_t i;\n  int64_t l;\n};\nstd::ostream& operator<<(std::ostream& os, const F& data) {\n  os << data.i << \" \" << data.l;\n  return os;\n}\nstd::istream& operator>>(std::istream& os, F& data) {\n  os >> data.i >> data.l;\n  return os;\n}\n\n// make sure streaming ops have correct return types\nstruct NotStreammable {\n};\nint operator<<(std::ostream& os, const NotStreammable& data) {\n  return 0;\n}\nvoid operator>>(std::istream& os, NotStreammable& data) {\n}\n\nstatic_assert(!madness::is_ostreammable_v<A>, \"A is not ostreammable\");\nstatic_assert(madness::is_ostreammable_v<F>, \"F is ostreammable\");\nstatic_assert(madness::is_ostreammable_v<bool>, \"bool is ostreammable\");\nstatic_assert(madness::is_ostreammable_v<int>, \"int is ostreammable\");\nstatic_assert(madness::is_ostreammable_v<std::array<int,3>>, \"std::array<int,3> is ostreammable\");\nstatic_assert(madness::is_ostreammable_v<std::vector<int>>, \"std::vector<int> is ostreammable\");\nstatic_assert(!madness::is_ostreammable_v<NotStreammable>, \"NotStreammable is ostreammable\");\nstatic_assert(!madness::is_istreammable_v<A>, \"A is not istreammable\");\nstatic_assert(madness::is_istreammable_v<F>, \"F is istreammable\");\nstatic_assert(madness::is_istreammable_v<bool>, \"bool is istreammable\");\nstatic_assert(madness::is_istreammable_v<int>, \"int is istreammable\");\nstatic_assert(!madness::is_istreammable_v<std::array<int,3>>, \"std::array<int,3> is not istreammable\");\nstatic_assert(!madness::is_istreammable_v<std::vector<int>>, \"std::vector<int> is not istreammable\");\nstatic_assert(!madness::is_istreammable_v<NotStreammable>, \"NotStreammable is not istreammable\");\n\nstatic_assert(!madness::is_default_serializable_v<madness::archive::TextFstreamOutputArchive,std::vector<std::vector<int>>>);\nstatic_assert(!madness::is_default_serializable_v<madness::archive::TextFstreamInputArchive,std::vector<std::vector<int>>>);\n\n// serialization of trivially-serializable types can be overloaded\nstruct G1 {\n  int32_t i;\n  int64_t l;\n  template <typename Archive>\n  void serialize(Archive& ar) {\n    ar & i & l;\n    if constexpr (madness::is_input_archive_v<Archive>) {\n      int junk=0;\n      ar >> junk;\n      MADNESS_ASSERT(junk == 17);\n    }\n    else {\n      static_assert(madness::is_output_archive_v<Archive>);\n      ar << 17;\n    }\n  }\n};\n\n// A better example of a class with asym load/store\nclass linked_list {\n    int value;\n    linked_list *next;\npublic:\n    linked_list(int value = 0) : value(value), next(0) {};\n\n    void append(int value) {\n        if (next) next->append(value);\n        else next = new linked_list(value);\n    };\n\n    void set_value(int val) {\n        value = val;\n    };\n\n    int get_value() const {\n        return value;\n    };\n\n    linked_list* get_next() const {\n        return next;\n    };\n\n    void print() {\n        if (next) {\n            cout << value << \" --> \";\n            next->print();\n        }\n        else cout << value << endl;\n    };\n};\n\nnamespace {\nvoid free_fn() {}\nstruct Member {\n  static void static_fn(){}\n  void fn(){}\n  virtual void virtual_fn() {}\n};\n}\n\nnamespace madness {\n    namespace archive {\n        template <class Archive>\n        struct ArchiveStoreImpl<Archive,linked_list> {\n            static void store(const Archive& ar, const linked_list& c) {\n                ar & c.get_value() & bool(c.get_next());\n                if (c.get_next()) ar & *c.get_next();\n            };\n        };\n\n        template <class Archive>\n        struct ArchiveLoadImpl<Archive,linked_list> {\n            static void load(const Archive& ar, linked_list& c) {\n                int value = 0;\n                bool flag = false;\n                ar & value & flag;\n                c.set_value(value);\n                if (flag) {\n                    c.append(0);\n                    ar & *c.get_next();\n                }\n            };\n        };\n    }\n}\n\nnamespace madness {\n    namespace archive {\n        typedef std::map< short,std::complex<double> > map_short_complex_double;\n        typedef std::pair< short,std::complex<double> > pair_short_complex_double;\n        typedef std::pair<int,double> pair_int_double;\n        ARCHIVE_REGISTER_TYPE_AND_PTR(A,128);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(B,129);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(C,130);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(linked_list,131);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(pair_int_double,132);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(map_short_complex_double,133);\n        ARCHIVE_REGISTER_TYPE_AND_PTR(pair_short_complex_double, 134);\n    }\n}\n\nusing namespace std;\n\nusing madness::archive::wrap;\n\ntypedef std::complex<double> double_complex;\ntypedef std::tuple<int,double,std::complex<float>> tuple_int_double_complexfloat;\n\ntemplate <bool DoSerialize>\nstruct pod_serialize_dispatch;\ntemplate <>\nstruct pod_serialize_dispatch<false> {\n  template <typename Archive, typename POD>\n  void operator()(Archive&& ar, const POD& pod) {\n  }\n};\ntemplate <>\nstruct pod_serialize_dispatch<true> {\n  template <typename Archive, typename POD>\n  void operator()(Archive&& ar, const POD& pod) {\n    ar &pod;\n    ar << pod;\n  }\n};\n\ntemplate <bool DoSerialize>\nstruct pod_deserialize_dispatch;\ntemplate <>\nstruct pod_deserialize_dispatch<false> {\n  template <typename Archive, typename POD>\n  void operator()(Archive&& ar, const POD& pod) {\n  }\n};\ntemplate <>\nstruct pod_deserialize_dispatch<true> {\n  template <typename Archive, typename POD>\n  void operator()(Archive&& ar, const POD& pod) {\n    ar &pod;\n    ar >> pod;\n  }\n};\n\ntemplate <class OutputArchive>\nvoid test_out(const OutputArchive& oar) {\n    constexpr const int n = 3;\n    A a, an[n];\n    B b, bn[n];\n    C c, cn[n];\n    D d, dn[n];\n    F f, fn[n];\n    G1 g1, g1n[n];\n    int i, in[n];\n    double *p = new double[n];\n    A *q = new A[n];\n    vector<int> v(n);\n    vector<vector<int>> vv(n);\n    std::array<int64_t,n> arr;\n    pair<int,double> pp(33,99.0);\n    map<short,double_complex> m;\n    const char* teststr = \"hello \\n dude !\";\n    string str(teststr);\n    linked_list list(0);\n    double pi = atan(1.0)*4.0;\n    double e = exp(1.0);\n    tuple_int_double_complexfloat t = std::make_tuple(1,2.0,std::complex<float>(3.0f,4.0f));\n    std::set<int> s{1, 33, 6, 352};\n\n    // Initialize data\n    a.a = 1; b.b = 1; c.c = 1; i = 1;\n    d.i = 1;  d.l = 2;\n    f.i = 1;  f.l = 2;\n    g1.i = 1; g1.l = 2;\n    for (int k=0; k<n; ++k) {\n        p[k] = q[k].a = an[k].a = v[k] = arr[k] = cn[k].c = in[k] = k;\n        dn[k].i = k+1;\n        dn[k].l = k+2;\n        fn[k].i = k+3;\n        fn[k].l = k+4;\n        g1n[k].i = k+5;\n        g1n[k].l = k+6;\n        vv[k] = {k+1, k+2, k+3, k+4};\n        bn[k].b = k&1;\n        m[k] = double_complex(k,k);\n        list.append(k+1);\n    }\n\n    // test example list code\n    list.print();\n    oar & list;\n\n    oar & pi & e;\n\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" constant double value\" << std::endl);\n    oar & 1.0;\n    oar << 1.0;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" int\" << std::endl);\n    oar & i;\n    oar << i;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" A\" << std::endl);\n    oar & a;\n    oar << a;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" B\" << std::endl);\n    oar & b;\n    oar << b;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" C\" << std::endl);\n    oar & c;\n    oar << c;\n    // only binary archives can serialize an un-annotated POD\n    constexpr const bool D_is_serializable = !madness::is_text_archive_v<OutputArchive>;\n    if (D_is_serializable) {\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" D\" << std::endl);\n      pod_serialize_dispatch<D_is_serializable>{}(oar, d);\n    }\n    // only MADNESS text archive can use operator<<(std::ostream) to serialize un-annotated POD\n    constexpr const bool F_is_serializable = !madness::is_text_archive_v<OutputArchive> || std::is_same<OutputArchive, TextFstreamOutputArchive>::value;\n    if (F_is_serializable) {\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" F\" << std::endl);\n      pod_serialize_dispatch<F_is_serializable>{}(oar, f);\n    }\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" G1\" << std::endl);\n    oar & g1;\n    oar << g1;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" int[]\" << std::endl);\n    oar & in;\n    oar << in;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" A[]\" << std::endl);\n    oar & an;\n    oar << an;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" B[]\" << std::endl);\n    oar << bn;\n    oar & bn;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" C[]\" << std::endl);\n    oar << cn;\n    oar & cn;\n    // only binary archives can serialize an un-annotated POD\n    if (D_is_serializable) {\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" D[]\" << std::endl);\n      pod_serialize_dispatch<D_is_serializable>{}(oar, dn);\n    }\n    // only MADNESS text archive can use operator<<(std::ostream) to serialize un-annotated POD\n    if (F_is_serializable) {\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" F[]\" << std::endl);\n      pod_serialize_dispatch<F_is_serializable>{}(oar, fn);\n    }\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" G1[]\" << std::endl);\n    oar << g1n;\n    oar & g1n;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" double *p wrapped\" << std::endl);\n    oar << wrap(p,n);\n    oar & wrap(p,n);\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" A *q wrapped\" << std::endl);\n    oar << wrap(q,n);\n    oar & wrap(q,n);\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" vector<int>\" << std::endl);\n    oar << v;\n    oar & v;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" vector<vector<int>>\" << std::endl);\n    oar << vv;\n    oar & vv;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" array<int64_t,\" << n << \">\" << std::endl);\n    oar << arr;\n    oar & arr;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" pair<int,double>\" << std::endl);\n    oar << pp;\n    oar & pp;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" map<short,complex<double>>\" << std::endl);\n    oar << m;\n    oar & m;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" tuple<int,double,complex<float>>\" << std::endl);\n    oar << t;\n    oar & t;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl<< \" set<int>\" << std::endl);\n    oar << s;\n    oar & s;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" string\" << std::endl);\n    oar << str;\n    oar & str;\n\n    constexpr const bool ptr_is_serializable = !madness::is_cereal_archive<OutputArchive>::value;\n    if constexpr(ptr_is_serializable) {\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl\n                                  << \" function pointer\" << std::endl);\n      oar & free_fn;  // no difference between storing function ref and function pointer\n      oar << (&free_fn);\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl\n                                  << \" static member function pointer\"\n                                  << std::endl);\n      oar & Member::static_fn;  // no difference between storing function ref and function pointer\n      oar << (&Member::static_fn);\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl\n                                  << \" non-static member function pointer\"\n                                  << std::endl);\n      oar & (&Member::fn);\n      oar << (&Member::fn);\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl\n                                  << \" non-static virtual member function pointer\"\n                                  << std::endl);\n      oar & (&Member::virtual_fn);\n      oar << (&Member::virtual_fn);\n    }\n\n    oar & 1.0 & i & a & b & c & in & an & bn & cn & wrap(p,n) & wrap(q,n) & pp & m & t & s & str;\n    if constexpr(ptr_is_serializable) {\n      oar & free_fn &(&free_fn) & Member::static_fn & (&Member::static_fn) & (&Member::fn) & (&Member::virtual_fn);\n    }\n\n    if (D_is_serializable) {\n      pod_serialize_dispatch<D_is_serializable>{}(oar, d);\n      pod_serialize_dispatch<D_is_serializable>{}(oar, dn);\n    }\n    if (F_is_serializable) {\n      pod_serialize_dispatch<F_is_serializable>{}(oar, f);\n      pod_serialize_dispatch<F_is_serializable>{}(oar, fn);\n    }\n}\n\ntemplate <class InputArchive>\nvoid test_in(const InputArchive& iar) {\n    constexpr const int n = 3;\n    A a, an[n];\n    B b, bn[n];\n    C c, cn[n];\n    D d, dn[n];\n    F f, fn[n];\n    G1 g1, g1n[n];\n    int i, in[n];\n    double *p = new double[n];\n    A *q = new A[n];\n    vector<int> v(n);\n    vector<vector<int>> vv(n);\n    std::array<int64_t,n> arr;\n    pair<int,double> pp(33,99.0);\n    map<short,double_complex> m;\n    std::set<int> s;\n    std::set<int> s2 = {1, 33, 6, 352};\n    const char *teststr = \"hello \\n dude !\";\n    string str(teststr);\n    linked_list list;\n    double pi = 0.0, e = 0.0;\n    tuple_int_double_complexfloat t;\n    decltype(&free_fn) free_fn_ptr1=nullptr, free_fn_ptr2=nullptr;\n    decltype(&Member::static_fn) static_member_fn_ptr1=nullptr, static_member_fn_ptr2=nullptr;\n    decltype(&Member::fn) member_fn_ptr=nullptr, virtual_member_fn_ptr=nullptr;\n\n    // Destroy in-core data\n    a.a = 0; b.b = 0; c.c = 0; i = 0;\n    d.i = -1;  d.l = -1;\n    f.i = -1;  f.l = -1;\n    g1.i = -1; g1.l = -1;\n    for (int k=0; k<n; ++k) {\n        p[k] = q[k].a = an[k].a = v[k] = arr[k] = cn[k].c = in[k] = -1;\n        dn[k].i = -1;\n        dn[k].l = -1;\n        fn[k].i = -1;\n        fn[k].l = -1;\n        g1n[k].i = -1;\n        g1n[k].l = -1;\n        vv[k] = {};\n        bn[k].b = (k+1)&1;\n        m[k] = double_complex(0,0);\n    }\n    pp = pair<int,double>(0,0.0);\n    str = string(\"\");\n\n    iar & list;\n    list.print();\n\n    iar & pi & e;\n    cout.setf(std::ios::scientific);\n    cout << \"error in pi \" << (pi - 4.0*atan(1.0)) << endl;\n    cout << \"error in e \" << (e - exp(1.0)) << endl;\n\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" constant double value\" << std::endl);\n    double val;\n    iar & val;\n    iar >> val;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" int\" << std::endl);\n    iar & i;\n    iar >> i;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" A\" << std::endl);\n    iar & a;\n    iar >> a;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" B\" << std::endl);\n    iar & b;\n    iar >> b;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" C\" << std::endl);\n    iar & c;\n    iar >> c;\n    // only binary archives can serialize an un-annotated POD\n    constexpr const bool D_is_serializable = !madness::is_text_archive_v<InputArchive>;\n    if (D_is_serializable) {\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" D\" << std::endl);\n      pod_deserialize_dispatch<D_is_serializable>{}(iar, d);\n    }\n    // only MADNESS text archive can use operator<<(std::ostream) to serialize un-annotated POD\n    constexpr const bool F_is_serializable = !madness::is_text_archive_v<InputArchive> || std::is_same<InputArchive, TextFstreamInputArchive>::value;\n    if (F_is_serializable) {\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" F\" << std::endl);\n      pod_deserialize_dispatch<F_is_serializable>{}(iar, f);\n    }\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" G1\" << std::endl);\n    iar & g1;\n    iar >> g1;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" int[]\" << std::endl);\n    iar & in;\n    iar >> in;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" A[]\" << std::endl);\n    iar & an;\n    iar >> an;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" B[]\" << std::endl);\n    iar & bn;\n    iar >> bn;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" C[]\" << std::endl);\n    iar & cn;\n    iar >> cn;\n    if (D_is_serializable) {\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" D[]\" << std::endl);\n      pod_deserialize_dispatch<D_is_serializable>{}(iar, dn);\n    }\n    if (F_is_serializable) {\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" F[]\" << std::endl);\n      pod_deserialize_dispatch<F_is_serializable>{}(iar, fn);\n    }\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" G1[]\" << std::endl);\n    iar & g1n;\n    iar >> g1n;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" double *p wrapped\" << std::endl);\n    iar & wrap(p,n);\n    iar >> wrap(p,n);\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" A *q wrapped\" << std::endl);\n    iar & wrap(q,n);\n    iar >> wrap(q,n);\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" vector<int>\" << std::endl);\n    iar & v;\n    iar >> v;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" vector<vector<int>>\" << std::endl);\n    iar & vv;\n    iar >> vv;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" array<int64_t,\" << n << \">\" << std::endl);\n    iar & arr;\n    iar >> arr;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" pair<int,double>\" << std::endl);\n    iar & pp;\n    iar >> pp;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" map<short,complex<double>>\" << std::endl);\n    iar & m;\n    iar >> m;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" tuple<int,double,complex<float>>\" << std::endl);\n    iar & t;\n    iar >> t;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl<< \" set<int>\" << std::endl);\n    iar >> s;\n    iar & s;\n    MAD_ARCHIVE_DEBUG(std::cout << std::endl << \" string\" << std::endl);\n    iar & str;\n    iar >> str;\n\n    constexpr const bool ptr_is_serializable = true && !madness::is_cereal_archive<InputArchive>::value;\n    if constexpr(ptr_is_serializable) {\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl\n                                  << \" function pointer\" << std::endl);\n      static_assert(!madness::is_istreammable_v<void(*)()>);\n      static_assert(madness::is_ostreammable_v<void(*)()>);\n      static_assert(madness::is_default_serializable_v<madness::archive::TextFstreamInputArchive, void (*)()>);\n      static_assert(madness::is_default_serializable_v<madness::archive::TextFstreamInputArchive, void (*)()>);\n      iar & free_fn_ptr1;\n      iar >> free_fn_ptr2;\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl\n                                  << \" static member function pointer\"\n                                  << std::endl);\n      iar & static_member_fn_ptr1;\n      iar >> static_member_fn_ptr2;\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl\n                                  << \" non-static member function pointer\"\n                                  << std::endl);\n      decltype(&Member::fn) nonstatic_member_fn_ptr;\n      iar & nonstatic_member_fn_ptr;\n      iar >> nonstatic_member_fn_ptr;\n      MAD_ARCHIVE_DEBUG(std::cout << std::endl\n                                  << \" non-static virtual member function pointer\"\n                                  << std::endl);\n      decltype(&Member::virtual_fn) nonstatic_virtual_member_fn_ptr;\n      iar & nonstatic_virtual_member_fn_ptr;\n      iar >> nonstatic_virtual_member_fn_ptr;\n    }\n\n    iar & 1.0 & i & a & b & c & in & an & bn & cn & wrap(p,n) & wrap(q,n) & pp & m & t & s & str;\n    if constexpr(ptr_is_serializable) {\n      iar &free_fn_ptr1 &free_fn_ptr2 &static_member_fn_ptr1\n          &static_member_fn_ptr2 & member_fn_ptr & virtual_member_fn_ptr;\n    }\n    if (D_is_serializable) {\n      pod_deserialize_dispatch<D_is_serializable>{}(iar, d);\n      pod_deserialize_dispatch<D_is_serializable>{}(iar, dn);\n    }\n    if (F_is_serializable) {\n      pod_deserialize_dispatch<F_is_serializable>{}(iar, f);\n      pod_deserialize_dispatch<F_is_serializable>{}(iar, fn);\n    }\n    // Test data\n    bool status = true;\n\n#define TEST(cond) status &= cond;  \\\n                   if (!(cond)) std::cout << #cond << \" failed\" << std::endl\n    TEST(a.a == 1);\n    TEST(b.b == 1);\n    TEST(c.c == 1);\n    if (D_is_serializable) {\n      TEST(d.i == 1);\n      TEST(d.l == 2);\n    }\n    if (F_is_serializable) {\n      TEST(f.i == 1);\n      TEST(f.l == 2);\n    }\n    TEST(g1.i == 1);\n    TEST(g1.l == 2);\n    TEST(i == 1);\n    for (int k=0; k<n; ++k) {\n        TEST(an[k].a == k);\n        TEST(bn[k].b == (k&1));\n        TEST(cn[k].c == k);\n        if (D_is_serializable) {\n          TEST(dn[k].i == k+1);\n          TEST(dn[k].l == k+2);\n        }\n        if (F_is_serializable) {\n          TEST(fn[k].i == k + 3);\n          TEST(fn[k].l == k + 4);\n        }\n        TEST(g1n[k].i == k + 5);\n        TEST(g1n[k].l == k + 6);\n        TEST(in[k] == k);\n        TEST(p[k] == k);\n        TEST(q[k].a == k);\n        TEST(v[k] == k);\n        TEST(vv[k].size() == 4);\n        TEST(arr[k] == k);\n        TEST(vv[k][0] == k+1);\n        TEST(vv[k][1] == k+2);\n        TEST(vv[k][2] == k+3);\n        TEST(vv[k][3] == k+4);\n        TEST(m[k] == double_complex(k,k));\n    }\n    TEST(pp.first==33 && pp.second==99.0);\n    TEST(str == string(teststr));\n    TEST(t == std::make_tuple(1,2.0,std::complex<float>(3.0f,4.0f)));\n    TEST(s == s2);\n    if constexpr (ptr_is_serializable)\n    {\n      TEST(free_fn_ptr1 == &free_fn);\n      TEST(free_fn_ptr2 == &free_fn);\n      TEST(static_member_fn_ptr1 == &Member::static_fn);\n      TEST(static_member_fn_ptr2 == &Member::static_fn);\n      TEST(member_fn_ptr == &Member::fn);\n      TEST(virtual_member_fn_ptr == &Member::virtual_fn);\n    }\n\n#undef TEST\n\n    if (status)\n        std::cout << \"Serialization appears to work.\" << std::endl;\n    else\n        std::cout << \"Sorry, back to the drawing board.\\n\";\n}\n\nint main(int argc, char* argv[]) {\n\n  auto &world = madness::initialize(argc, argv);\n\n  const auto me = world.rank();\n  const auto nproc = world.size();\n  const auto is_write_proc = (me == 0);\n  const auto is_read_proc = (nproc == 1) ? (me == 0) : (me == 1);\n  const int nworkers = (nproc == 1) ? 1 : 2;\n  for(int rank=0; rank!=nworkers; ++rank) {\n    if (rank == me) {\n      cout << \"rank=\" << rank << \" fn_ptr_origin=\" << std::hex\n           << madness::archive::fn_ptr_origin() << endl;\n    }\n    world.gop.barrier();\n  }\n\n  madness::archive::archive_initialize_type_names();\n  ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(A);\n  ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(B);\n  ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(C);\n  ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(linked_list);\n  ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(madness::archive::pair_int_double);\n  ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(\n      madness::archive::pair_short_complex_double);\n  ARCHIVE_REGISTER_TYPE_AND_PTR_NAMES(\n      madness::archive::map_short_complex_double);\n\n  {\n    const char *f = \"test.dat\";\n    if (is_write_proc) {\n      cout << endl << \"testing binary fstream archive\" << endl;\n      BinaryFstreamOutputArchive oar(f);\n      test_out(oar);\n      oar.close();\n    }\n    world.gop.barrier();\n\n    if (is_read_proc) {\n      BinaryFstreamInputArchive iar(f);\n      test_in(iar);\n      iar.close();\n    }\n    world.gop.barrier();\n  }\n\n  if (me == 0) {\n    cout << endl << \"testing vector archive\" << endl;\n    std::vector<unsigned char> f;\n    VectorOutputArchive oar(f);\n    test_out(oar);\n    oar.close();\n\n    VectorInputArchive iar(f);\n    test_in(iar);\n    iar.close();\n  }\n  world.gop.barrier();\n\n  {\n    const char *f = \"test.dat\";\n    if (is_write_proc) {\n      cout << endl << \"testing text fstream archive\" << endl;\n      TextFstreamOutputArchive oar(f);\n      test_out(oar);\n      oar.close();\n    }\n    world.gop.barrier();\n\n    if (is_read_proc) {\n      TextFstreamInputArchive iar(f);\n      test_in(iar);\n      iar.close();\n    }\n    world.gop.barrier();\n  }\n\n  // buffer archive only tested on rank 0\n  if (me == 0) {\n    cout << endl << \"testing buffer archive\" << endl;\n    unsigned char buf[32768];\n    BufferOutputArchive oar(buf, sizeof(buf));\n    test_out(oar);\n    std::size_t nbyte = oar.size();\n    oar.close();\n\n    BufferInputArchive iar(buf, nbyte);\n    test_in(iar);\n    iar.close();\n  }\n  world.gop.barrier();\n\n#ifdef MADNESS_HAS_CEREAL\n  {\n    const char *f = \"test.dat\";\n    if (is_write_proc) {\n      cout << endl << \"testing binary Cereal archive\" << endl;\n      std::ofstream fout(f, std::ios_base::binary | std::ios_base::out |\n                                std::ios_base::trunc);\n      CerealBinaryOutputArchive oar(fout);\n      test_out(oar);\n      oar.close();\n    }\n    world.gop.barrier();\n\n    if (is_read_proc) {\n      std::ifstream fin(f, std::ios_base::binary | std::ios_base::in);\n      CerealBinaryInputArchive iar(fin);\n      test_in(iar);\n      iar.close();\n    }\n    world.gop.barrier();\n\n    if (is_write_proc) {\n      cout << endl << \"testing portable binary Cereal archive\" << endl;\n      std::ofstream fout(f, std::ios_base::binary | std::ios_base::out |\n                                std::ios_base::trunc);\n      CerealPortableBinaryOutputArchive oar(fout);\n      test_out(oar);\n      oar.close();\n    }\n    world.gop.barrier();\n\n    if (is_read_proc) {\n      std::ifstream fin(f, std::ios_base::binary | std::ios_base::in);\n      CerealPortableBinaryInputArchive iar(fin);\n      test_in(iar);\n      iar.close();\n    }\n    world.gop.barrier();\n\n    if (is_write_proc) {\n      cout << endl << \"testing JSON Cereal archive\" << endl;\n      std::ofstream fout(f, std::ios_base::out | std::ios_base::trunc);\n      CerealJSONOutputArchive oar(fout);\n      test_out(oar);\n      oar.close();\n    }\n    world.gop.barrier();\n\n    if (is_read_proc) {\n      std::ifstream fin(f, std::ios_base::in);\n      CerealJSONInputArchive iar(fin);\n      test_in(iar);\n      iar.close();\n    }\n    world.gop.barrier();\n\n    if (is_write_proc) {\n      cout << endl << \"testing XML Cereal archive\" << endl;\n      std::ofstream fout(f, std::ios_base::out | std::ios_base::trunc);\n      CerealXMLOutputArchive oar(fout);\n      test_out(oar);\n      oar.close();\n    }\n    world.gop.barrier();\n\n    if (is_read_proc) {\n      std::ifstream fin(f, std::ios_base::in);\n      CerealXMLInputArchive iar(fin);\n      test_in(iar);\n      iar.close();\n    }\n    world.gop.barrier();\n  }\n#endif // MADNESS_HAS_CEREAL\n\n  madness::finalize();\n  return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_atomicint.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/world.h>\n#include <madness/world/thread.h>\n#include <iostream>\n#include <pthread.h>\n#include <unistd.h>\n#include <stdlib.h>\n\n#include <madness/world/atomicint.h>\n\n#define MAX_NUM_THREADS 1000\n\nusing namespace madness;\nusing namespace std;\n\nAtomicInt sum;\nAtomicInt ndone;\n\nvoid* doit(void *args) {\n  // int* a = new int; // work around libtcmalloc bug?\n    for (int j=0; j<1000; ++j) {\n        for (int i=0; i<100000; ++i) {\n            sum++;\n        }\n        sched_yield();\n    }\n    ndone++;\n\n    // delete a; // NAR 3/11/2013, probably caused from missing madness::initialize\n\n    return 0;\n}\n\n\nclass Greet : public PoolTaskInterface {\npublic:\n    void run(const TaskThreadEnv& env) {\n        std::cout << \"HI\\n\";\n    }\n\n\n};\n\nconst int NDO = 10000000;\n\nclass Adder : public PoolTaskInterface {\npublic:\n    void run(const TaskThreadEnv& env) {\n        if (sum >= NDO) {\n            ndone++;\n        }\n        else {\n            sum++;\n        }\n    }\n};\n\nint get_nthread() {\n    int nthread;\n    char *cnthread = getenv(\"MAD_NUM_THREADS\");\n    if (cnthread) {\n        int result = sscanf(cnthread, \"%d\", &nthread);\n        if (result != 1)\n            MADNESS_EXCEPTION(\"MAD_NUM_THREADS is not an integer\", result);\n    }\n    else {\n        nthread = 3; /* this was the hard-coded value in the test previously */\n    }\n    return nthread;\n}\n\nint main(int argc, char** argv) {\n    bool smalltest = false;\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n    if (smalltest) return 0;\n    \n    madness::initialize(argc,argv);\n    const int nthread = get_nthread();\n    if (nthread > MAX_NUM_THREADS)\n        MADNESS_EXCEPTION(\"MAD_NUM_THREADS is too large\", nthread);\n    Thread* threads = new Thread[nthread];\n\n    try {\n        sum = ndone = 0;\n        for (int i=0; i<nthread; ++i) threads[i].start(doit,0);\n        while (ndone != nthread) sleep(1);\n        cout << \"SUM \" << sum << endl;\n\n        sum = ndone = 0;\n        ThreadPool::add(new Greet());\n        for (int i=0; i<(NDO+1000); ++i) ThreadPool::add(new Adder());\n        while (!ndone) {\n            sleep(1);\n            cout << int(ndone) << \" \" << int(sum) << endl;\n        }\n        sleep(1);\n        cout << \"SUM \" << int(sum) << endl;\n    }\n    catch (const char * e) {\n        cout << \"string exception: \" << e << endl;\n    }\n\n    delete [] threads;\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_binsorter.cc",
    "content": "#include <madness/world/MADworld.h>\n#include <madness/world/binsorter.h>\n\nusing namespace madness;\n\ntypedef std::pair<int,double> valueT;\n\n// Too lazy to wrap this stuff into a class\nint P;\nint me;\ndouble local_sorted_sum;\n\nvoid inserter(const std::pair<int,double>& t) {\n    // For testing verify destination ... normally don't need to pass owner in the value\n    if ((t.first%P) != me) throw \"bad index\";\n    // Checksum on values ... normally would insert into local container\n    local_sorted_sum += t.second;\n}\n\nint main(int argc, char** argv) {\n    initialize(argc,argv);\n    World world(SafeMPI::COMM_WORLD);\n    world.args(argc,argv);\n\n    P = world.size();\n    me = world.rank();\n    local_sorted_sum = 0.0;\n    const unsigned int N = 10000*P;\n\n    double local_sum = 0.0;\n    \n    // Deliberately use a small binsize to stress flushing and messaging\n    BinSorter<valueT,void(*)(const valueT&)> sorter(world,inserter,11);\n\n    // Compute checksum locally and remotely to verify results\n    for (unsigned int i=0; i<N; i++) {\n        const ProcessID owner = (9973u*i)%P; // crude multiplicative ran# generator\n        const double value = 1.0/(i+1);\n        sorter.insert(owner, valueT(owner,value));\n        local_sum += value;\n    }\n\n    sorter.finish();\n    \n    world.gop.sum(local_sum);\n\n    world.gop.sum(local_sorted_sum);\n\n    if (world.rank() == 0) print(local_sum, local_sorted_sum);\n\n    bool OK = (std::abs(local_sum-local_sorted_sum) < 1e-14*local_sum);\n\n    if (world.rank() == 0) print(\"OK?\", OK);\n\n    world.gop.fence();\n    finalize();\n\n    return 0;\n}\n    \n\n"
  },
  {
    "path": "src/madness/world/test_dc.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n//#define MAD_ARCHIVE_DEBUG_ENABLE\n\n#include <algorithm>\n\n#include <madness/world/MADworld.h>\n#include <madness/world/worlddc.h>\n#include <madness/world/worldmutex.h>\n#include <madness/world/atomicint.h>\n\n#include <madness/world/vector_archive.h>\n#include <madness/world/parallel_archive.h>\n\nusing namespace madness;\nusing namespace std;\n\nstruct Key {\n    int k;\n\n    Key() : k(-1) {}\n\n    Key(int k) : k(k) {}\n\n    hashT hash() const {\n        return k;\n    }\n\n    template <typename Archive>\n    void serialize(const Archive& ar) {\n        ar & k;\n    }\n\n    bool operator==(const Key& b) const {\n        return k==b.k;\n    }\n};\n\nostream& operator<<(ostream&s, const Key& key) {\n    s << \"Key(\" << key.k << \")\";\n    return s;\n}\n\nstruct Node {\n    int k;\n\n    Node() : k(-1) {}\n\n    Node(int k) : k(k) {}\n\n    int get() const {\n        return k;\n    }\n\n    template <typename Archive>\n    void serialize(const Archive& ar) {\n        ar & k;\n    }\n\n    ~Node() {}\n};\n\nstruct LargeNode {\n    std::vector<int> k;\n\n    LargeNode() : k() {}\n\n    LargeNode(int val) {\n        k=std::vector<int>(10000,val);\n    }\n\n    int get() const {\n        return k[0];\n    }\n\n    template <typename Archive>\n    void serialize(const Archive& ar) {\n        ar & k;\n    }\n\n    ~LargeNode() {}\n};\nostream& operator<<(ostream&s, const Node& node) {\n    s << \"Node(\" << node.k << \")\";\n    return s;\n}\n\n\nvoid test0(World& world) {\n    WorldContainer<Key,Node> c(world);\n\n    Key key1(1);\n    Node node1(1);\n\n    if (c.owner(key1) == world.rank()) c.replace(key1,node1);\n\n    world.gop.fence();\n\n    for (int i=0; i<10000; ++i)\n        MADNESS_CHECK(c.find(key1).get()->second.get() == 1);\n\n    for (int i=3; i<100; ++i)\n        MADNESS_CHECK(c.find(Key(i)).get() == c.end());\n\n    world.gop.fence();\n}\n\nclass TestPmap : public WorldDCPmapInterface<int> {\nprivate:\n    const int nproc;\n    const int shift;\npublic:\n    TestPmap(World& world, int shift)\n        : nproc(world.mpi.nproc())\n        , shift(shift)\n    { }\n\n    ProcessID owner(const int& key) const {\n        if (nproc == 1) return 0;\n        return (key + shift)%nproc;\n    }\n};\n\nAtomicInt double_count;\n\n// Can use just a plain int as key or value but make this class only to conunt instances\nclass Double {\n    double value;\npublic:\n\n    Double(double value=0.0) : value(value) {double_count++;}\n\n    Double(const Double& d) : value(d.value) {double_count++;}\n\n    ~Double() {double_count--;}\n\n    Double operator+(double x) {return Double(value+x);}\n\n    bool operator==(double x) {return value==x;}\n\n\n    template <typename Archive>\n    void serialize(const Archive& ar) {\n        ar & value;\n    }\n};\n    \n\nvoid test1(World& world) {\n    std::shared_ptr< WorldDCPmapInterface<int> > pmap0(new TestPmap(world, 0));\n    std::shared_ptr< WorldDCPmapInterface<int> > pmap1(new TestPmap(world, 1));\n\n    int total;\n    double_count = 0;\n    world.gop.fence();\n        \n    {\n        WorldContainer<int,Double> c(world,pmap0), d(world,pmap0), e(world,pmap0);\n        \n        world.gop.fence(); total = double_count; world.gop.sum(total);\n        if (world.rank() == 0) print(\"count after constructor\", total);\n        \n        if (world.rank() == 0) {\n            for (int i=0; i<100; ++i) {\n                c.replace(i,i+1.0);\n                d.replace(i,i+2.0);\n                e.replace(i,i+3.0);\n            }\n        }\n        \n        world.gop.fence(); total = double_count; world.gop.sum(total);\n        if (world.rank() == 0) print(\"count after making\", total);\n        \n        pmap0->redistribute(world, pmap1);\n        \n        world.gop.fence(); total = double_count; world.gop.sum(total);\n        if (world.rank() == 0) print(\"count after redistributing\", total);\n        std::size_t global_count = c.get_pmap()->global_size(world);\n        if (world.rank() == 0) print(\"count after from global sz\", global_count);\n        \n        for (int i=0; i<100; ++i) {\n            MADNESS_CHECK(c.find(i).get()->second == (i+1.0));\n            MADNESS_CHECK(d.find(i).get()->second == (i+2.0));\n            MADNESS_CHECK(e.find(i).get()->second == (i+3.0));\n        }\n        \n        world.gop.fence(); total = double_count; world.gop.sum(total);\n        if (world.rank() == 0) print(\"count after testing\", total);\n        \n        c.clear();\n        \n        world.gop.fence(); total = double_count; world.gop.sum(total);\n        if (world.rank() == 0) print(\"count after clearing c\", total);\n    }\n\n    total = double_count; world.gop.sum(total);\n    if (world.rank() == 0) print(\"count after going out of scope without fence\", total);\n    \n    world.gop.fence(); total = double_count; world.gop.sum(total);\n    if (world.rank() == 0) print(\"count after first fence\", total);\n\n    world.gop.fence(); total = double_count; world.gop.sum(total);\n    if (world.rank() == 0) print(\"count after second fence\", total);\n}\n\n\nvoid test_local(World& world) {\n\n\tprint(\"entering test_local\");\n    std::shared_ptr< WorldDCPmapInterface<int> > pmap0(new TestPmap(world, 0));\n\n    WorldContainer<int,double> c(world,pmap0),d(world,pmap0),e(world,pmap0);\n    for (int i=0; i<10; ++i) {\n    \tc.replace(i,i+1.0);\n    \td.replace(i,i+1.0);\n    \te.replace(i,i+1.0);\n    }\n    world.gop.fence();\n\n    std::size_t size=c.size();\n    if (world.rank()==0) print(\"size on rank=0 before replication\",size);\n\n    c.replicate();\t\t// fence\n    d.replicate(false);\t// no fence\n    e.replicate();\t\t// fence\n\n    size=c.size();\n    if (world.rank()==0) print(\"size on rank=0 after replication\",size);\n\n    auto localmap=c.get_pmap();\n    localmap->redistribute(world, pmap0);\n    world.gop.fence();\n    size=c.size();\n    if (world.rank()==0) print(\"size on rank=0 after redistribution\",size);\n\n    localmap=d.get_pmap();\n    localmap->redistribute(world, pmap0);\n    localmap->redistribute(world, pmap0);\n\n}\n\nvoid test_florian(World& world) {\n    WorldContainer<Key,LargeNode> c(world);\n\n    long nlarge=20000;\n    // get nlarge variable from the environment and convert it into long\n    char* nlarge_env = getenv(\"NLARGE\");\n    if (nlarge_env) {\n        nlarge = atol(nlarge_env);\n    }\n    if (world.rank()==0) print(\"size of the container\",nlarge);\n\n\n\n    if (world.rank() == 0) {\n        for (int i=0; i<nlarge; ++i) {\n            c.replace(Key(i),LargeNode(i));\n        }\n    }\n    world.gop.fence();\n    double wall0=wall_time();\n    if (world.rank() == 0) printf(\"starting at time %8.4f with %ld items\\n\",wall0,nlarge);\n    std::vector<unsigned char> v;\n    {\n        archive::VectorOutputArchive var(v);\n        archive::ParallelOutputArchive ar(world,var);\n        ar & c;\n    }\n    double wall1=wall_time();\n    if (world.rank() == 0) printf(\"ending at time %8.4f after %8.4fs\\n\",wall1,wall1-wall0);\n\n    WorldContainer<Key,LargeNode> c2(world);\n    {\n        archive::VectorInputArchive var2(v);\n        archive::ParallelInputArchive ar2(world,var2);\n        ar2 & c2;\n    }\n\n    if (world.rank()==0) {\n        for (int i=0; i<nlarge; ++i) {\n            MADNESS_CHECK(c2.find(Key(i)).get()->second.get() == i);\n        }\n    }\n\n    world.gop.fence();\n    if (world.rank() == 0) print(\"test_florian passed\");\n}\n\nint main(int argc, char** argv) {\n\n    try {\n        World& world = initialize(argc, argv);\n        // test0(world);\n        // test1(world);\n        // test1(world);\n        // test1(world);\n        // test_local(world);\n        test_florian(world);\n    }\n    catch (const SafeMPI::Exception& e) {\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const char* s) {\n        print(s);\n        error(\"caught a string exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_future.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n#include <string>\n\nusing namespace madness;\nusing namespace std;\n\nclass Fred {\npublic:\n    string a(const string& input) const {\n        return input + string(\"a\");\n    }\n\n    string b(const string& input) const {\n        return input + string(\"b\");\n    }\n};\n\n\nint main(int argc, char** argv) {\n    madness::initialize(argc,argv);\n    madness::World world(SafeMPI::COMM_WORLD);\n\n    TaskAttributes attr;\n    attr.set_stealable(true);\n\n    Fred fred;\n\n    Future<string> r = world.taskq.add(fred, &Fred::a, string(\"Hello\"),attr);\n    Future<string> s = world.taskq.add(fred, &Fred::b, r, attr);\n\n    Future<string> fff;\n    Future<string> ggg = world.taskq.add(fred, &Fred::a, fff, attr);\n\n    fff.set(\"done\");\n\n    print(s.get(), ggg.get());\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_future2.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n#include <madness/world/world_object.h>\n#include <iomanip>\nusing namespace std;\nusing namespace madness;\n\nclass Array : public WorldObject<Array> {\n    vector<double> v;\npublic:\n    /// Make block distributed array with size elements\n    Array(World& world, size_t size)\n            : WorldObject<Array>(world), v((size-1)/world.size()+1) {\n        // do something ordered during construction\n        process_pending();\n    }\n\n    virtual ~Array() { }\n\n    /// Return the process in which element i resides\n    ProcessID owner(size_t i) const {\n        return i/v.size();\n    }\n\n    /// Read element i\n    Future<double> read(size_t i) const {\n        if (owner(i) == get_world().rank())\n            return Future<double>(v[i-get_world().rank()*v.size()]);\n        else\n            return send(owner(i), &Array::read, i);\n    }\n\n    /// Write element i\n    void write(size_t i, double value) {\n        if (owner(i) == get_world().rank())\n            v[i-get_world().rank()*v.size()] = value;\n        else\n            send(owner(i), &Array::write, i, value);\n    }\n};\n\nint main(int argc, char** argv) {\n    const int length = 10000;\n\n    initialize(argc, argv);\n    madness::World world(SafeMPI::COMM_WORLD);\n    Array a(world, length), b(world, length);\n\n    if (world.rank() == 0) {\n        std::cout << \"data size \" << length << \"\\n\";\n        std::cout << \"World size is \" << world.size() << \"\\n\";\n    }\n\n    // Without regard to locality, initialize a[i]=i*10, b[i]=i*7\n    for (int i=world.rank(); i<length; i+=world.size()) {\n        a.write(i, 10.0*i);\n        b.write(i,  7.0*i);\n    }\n\n    if (world.rank()==0)\n        std::cout << \"write section ends\\n\";\n    world.gop.fence();// wait until all message passing end\n\n\n    // All processes verify 10 random values from each array\n    for (int j=0; j<10; ++j) {\n        size_t i = world.rand()%length;\n        std::cout << \"rank \" << world.rank() << \": \" << std::setw(4) << i <<\n            \"th data is owned by \" << a.owner(i) << \"\\n\";\n\n        Future<double> vala = a.read(i);\n        Future<double> valb = b.read(i);\n\n        // Could do work here until results are available\n\n        MADNESS_CHECK(vala.get() == 10.0*i);\n        MADNESS_CHECK(valb.get() ==  7.0*i);\n\n    }\n    world.gop.fence();\n\n    if (world.rank() == 0) print(\"OK!\");\n    finalize();\n}\n"
  },
  {
    "path": "src/madness/world/test_future3.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n#include <madness/world/world_object.h>\n\nusing namespace madness;\n\nclass Foo : public WorldObject<Foo> {\n    std::vector<int> bar;\npublic:\n    Foo(World& world, int bar) : WorldObject<Foo>(world), bar(1, bar) {\n        process_pending();\n    }\n\n    virtual ~Foo() { }\n\n    decltype(auto) get() const {\n        return bar;\n    }\n};\n\n\nint main(int argc, char** argv) {\n    madness::initialize(argc, argv);\n    madness::World world(SafeMPI::COMM_WORLD);\n\n    Foo a(world,world.rank()), b(world,world.rank()*10);\n\n    for (ProcessID p=0; p<world.size(); ++p) {\n        auto futa = a.send(p,&Foo::get);\n        const auto futb = b.send(p,&Foo::get);\n        // Could work here until the results are available\n        MADNESS_CHECK(futa.get() == std::vector<int>{p});\n        MADNESS_CHECK(futb.get() == std::vector<int>{p*10});\n\n      // test various flavors of Future::get:\n        {\n          // 1) Future &::get()\n          static_assert(\n              std::is_same_v<decltype(futa.get()), std::vector<int> &>);\n          std::vector<int> &vala_ref = futa.get();\n          MADNESS_CHECK(vala_ref == std::vector<int>{p});\n          // 2) Future const &::get()\n          static_assert(\n              std::is_same_v<decltype(futb.get()), std::vector<int> const &>);\n          std::vector<int> const &valb_ref = futb.get();\n          MADNESS_CHECK(valb_ref == std::vector<int>{p * 10});\n          // 2) Future &&::get()\n          static_assert(std::is_same_v<decltype(std::move(futa).get()),\n                                       std::vector<int>>);\n          std::vector<int> vala_copy = a.send(p, &Foo::get).get();\n          MADNESS_CHECK(vala_copy == std::vector<int>{p});\n        }\n\n      // test various flavors of Future<T>::operator T:\n        {\n          // 1) Future &::operator T&()\n          std::vector<int> &vala_ref = futa;\n          MADNESS_CHECK(vala_ref == std::vector<int>{p});\n          // 2) Future const &::operator T const&()\n          std::vector<int> const &valb_ref = futb;\n          MADNESS_CHECK(valb_ref == std::vector<int>{p * 10});\n          // 2) Future &&::operator T()\n          std::vector<int> vala_copy = a.send(p, &Foo::get);\n          MADNESS_CHECK(vala_copy == std::vector<int>{p});\n        }\n    }\n    world.gop.fence();\n    if (world.rank() == 0) print(\"OK!\");\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_googletest.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/madness_config.h>\n\n#ifdef MADNESS_HAS_GOOGLE_TEST\n\n#include <madness/world/MADworld.h>\n#include <gtest/gtest.h>\n\nmadness::World* pworld;\n\nnamespace {\n    class WorldTest : public ::testing::Test {\n    public:\n        WorldTest() {\n            // You can do set-up work for each test here.\n            madness::print(\"Inside WorldTest\");\n        }\n\n        virtual ~WorldTest() {\n            // You can do clean-up work that doesn't throw exceptions here.\n            madness::print(\"Inside ~WorldTest\");\n        }\n\n        // If the constructor and destructor are not enough for setting up\n        // and cleaning up each test, you can define the following methods:\n        virtual void SetUp() {\n            // Code here will be called immediately after the constructor (right\n            // before each test).\n            madness::print(\"Inside WorldSetUp\");\n        }\n\n        virtual void TearDown() {\n            // Code here will be called immediately after each test (right\n            // before the destructor).\n            madness::print(\"Inside WorldTestDown\");\n        }\n\n        // Objects declared here can be used by all tests in the test case for World.\n        static madness::World* pWorld;\n    };\n\n    TEST_F(WorldTest, Something) {\n        EXPECT_EQ(1,1);\n    }\n\n    TEST_F(WorldTest, Else) {\n        EXPECT_EQ(1,2);\n    }\n}\n\nint main(int argc, char **argv) {\n    madness::initialize(argc,argv);\n    madness::World world(SafeMPI::COMM_WORLD);\n    pworld = &world;\n\n    if (world.rank()) madness::redirectio(world);\n    world.args(argc,argv);\n    world.gop.fence();\n\n    ::testing::InitGoogleTest(&argc, argv);\n    int status = RUN_ALL_TESTS();\n\n    world.gop.fence();\n\n    madness::finalize();\n    return status;\n}\n\n\n#else\n\n#include <iostream>\nint main() {\n    std::cout << \"!!! Error: You need to build with Google test to enable the test code\\n\";\n    return 1;\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/world/test_hashdc.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n#include <madness/world/worlddc.h>\n\nusing namespace madness;\nusing namespace std;\n\n// User defined key class that we don't want to modify\nstruct Key {\n    int k;\n    Key() : k(-1) {}\n    Key(int k) : k(k) {}\n\n    bool operator==(const Key& b) const {\n        return k==b.k;\n    }\n};\n\nostream& operator<<(ostream&s, const Key& key) {\n    s << \"Key(\" << key.k << \")\";\n    return s;\n}\n\n// Make the key serialiable using non-intrusive mechanism\nnamespace madness {\n    namespace archive {\n        template <class Archive>\n        struct ArchiveSerializeImpl<Archive,Key> {\n            static inline void serialize(const Archive& ar, Key& obj) {\n                ar & obj.k;\n            }\n        };\n    }\n}\n\n// Make the key hashable using non-intrusive mechanism\nhashT hash_value(const Key& key) {\n    return key.k;\n}\n\nint main(int argc, char** argv) {\n    initialize(argc,argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    WorldContainer<Key,double> fred(world);\n\n    fred.replace(Key(99),99.0);\n\n    cout << fred.find(Key(99)).get()->second << endl;\n\n    WorldContainer<Key,double>::iterator it = fred.find(Key(99));\n    // WorldContainer<Key,double>::pairT& p = *it;\n    // cout << p;\n    using madness::operators::operator<<;\n    cout << *it;\n\n    WorldContainer<Key,double>::const_iterator c_it = it;\n    const WorldContainer<Key,double>::pairT& cp = *c_it;\n    cout << cp;\n\n    // This fails because as shown above cannot derefence const iterator\n    // ... works OK for non-const\n    cout << *it << endl;\n    cout << *c_it << endl;\n\n    world.gop.fence();\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_hashthreaded.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/world.h>\n#include <madness/world/thread.h>\n#include <madness/world/worldhash.h>\n#include <madness/world/worldhashmap.h>\n#include <madness/world/range.h>\n#include <madness/world/timers.h>\n#include <madness/world/atomicint.h>\n#include <iostream>\n#include <ctime>\n#include <cstdlib>\n#include <cstdio>\n#include <vector>\n#include <algorithm>\n\n/// \\file testhashthreaded.cc\n/// \\brief Test code for parallel hash\n\nusing namespace std;\nusing namespace madness;\n\nbool smalltest = false;\n\nvoid errmsg(const char *msg, int status) {\n    cerr << msg << \" \" << status << std::endl;\n    exit(1);\n}\n\ndouble drand() {\n    return random()*(1.0/RAND_MAX);\n}\n\nvoid split(const Range<ConcurrentHashMap<int,int>::iterator>& range) {\n    typedef Range<ConcurrentHashMap<int,int>::iterator> rangeT;\n    if (range.size() <= range.get_chunksize()) {\n        int n = range.size();\n        int c = 0;\n        for (rangeT::iterator it=range.begin();  it != range.end();  ++it) {\n            c++;\n            if (c > n) throw \"c > n inside range iteration\";\n        }\n        if (c != n) throw \"c != n after range iteration\";\n    }\n    else {\n        rangeT left = range;\n        rangeT right(left,Split());\n        split(left);\n        split(right);\n    }\n}\n\nvoid test_coverage() {\n    // This test aims for complete code coverage for whatever that\n    // is worth, and tests for basic sequential correctness.\n    ConcurrentHashMap<int,int> a;\n    typedef ConcurrentHashMap<int,int>::datumT datumT;\n    typedef ConcurrentHashMap<int,int>::iterator iteratorT;\n    typedef ConcurrentHashMap<int,int>::const_iterator const_iteratorT;\n\n\n    a[-1] = -99;\n    if (a[-1] != -99) cout << \"was expecting -99 \" << a[-1] << endl;\n    if (a.size() != 1) cout << \"was expecting size to be 1\" << endl;\n\n    for (int i=0; i<10000; ++i) {\n      [[maybe_unused]] auto&& [it, inserted] = a.insert(datumT(i,i*99));\n      MADNESS_ASSERT(inserted);\n    }\n\n    for (int i=0; i<10000; ++i) {\n        pair<iteratorT,bool> r = a.insert(datumT(i,i*99));\n        if (r.second) cout << \"expected second insert to fail \" << i << endl;\n        if (r.first->first != i) cout << \"key mismatch \" << i << \" \" << r.first->first << endl;\n        if (r.first->second != i*99) cout << \"value mismatch \" << i << \" \" << r.first->second << endl;\n    }\n    if (a.size() != 10001) cout << \"was expecting size to be 10001 \" << a.size() << endl;\n\n    for (int i=0; i<10000; ++i) {\n        iteratorT it = a.find(i);\n        if (it == a.end()) cout << \"expected to find this element \" << i << endl;\n        if (it->first != i) cout << \"key mismatch on find\" << i << \" \" << it->first << endl;\n        if (it->second != 99*i) cout << \"value mismatch on find\" << i << \" \" << it->second << endl;\n    }\n\n    const ConcurrentHashMap<int,int>* ca = &a;\n    for (int i=0; i<10000; ++i) {\n        const_iteratorT it = ca->find(i);\n        if (it == ca->end()) cout << \"expected to find this element \" << i << endl;\n        if (it->first != i) cout << \"key mismatch on find\" << i << \" \" << it->first << endl;\n        if (it->second != 99*i) cout << \"value mismatch on find\" << i << \" \" << it->second << endl;\n    }\n\n    size_t count = 0;\n    for (iteratorT it=a.begin(); it!=a.end(); ++it) {\n        count++;\n        if (it->second != 99*it->first) cout << \"key/value mismatch\" << it->first << \" \" << it->second << endl;\n    }\n    if (count != 10001) cout << \"a. count should have been 10001 \" << count << endl;\n\n    count= 0;\n    for (const_iteratorT it=ca->begin(); it!=ca->end(); ++it) {\n        count++;\n        if (it->second != 99*it->first) cout << \"key/value mismatch\" << it->first << \" \" << it->second << endl;\n    }\n    if (count != 10001) cout << \"b. count should have been 10001 \" << count << endl;\n\n    count = 10001;\n    for (int i=0; i<2000; i+=2) {\n        iteratorT it = a.find(i);\n        [[maybe_unused]] auto erased = a.try_erase(i);\n        MADNESS_ASSERT(erased);\n        count--;\n        if (a.size() != count) cout << \"size should have been \" << count << \" \" << a.size() << endl;\n        it = a.find(i);\n        if (it != a.end()) cout << \"this was just deleted but was found \" << i << endl;\n    }\n\n    for (int i=2001; i<4000; i+=2) {\n        iteratorT it = a.find(i);\n        if (!a.try_erase(i)) cout << \"expected to have deleted one element \" << i << endl;\n        count--;\n        if (a.size() != count) cout << \"c. size should have been \" << count << \" \" << a.size() << endl;\n        it = a.find(i);\n        if (it != a.end()) cout << \"this was just deleted but was found \" << i << endl;\n    }\n\n    for (iteratorT it=a.begin(); it!=a.end();) {\n        int i = it->first;\n        iteratorT prev = it++;\n        a.erase(prev);\n        count--;\n        if (a.size() != count) cout << \"d. size should have been \" << count << \" \" << a.size() << endl;\n        iteratorT fit = a.find(i);\n        if (fit != a.end()) cout << \"this was just deleted but was found \" << i << endl;\n\n    }\n\n    if (a.size() != 0) cout << \"e. size should have been 0 \" << a.size() << endl;\n\n    // Verify that forward random iterator works OK for range and then test range itself\n    for (int nelem=1; nelem<=10000; nelem*=10) {\n        cout << \"nelem \" << nelem << endl;\n        a.clear();\n        for (int i=0; i<nelem; ++i) {\n          [[maybe_unused]] auto&& [it, inserted] = a.insert(datumT(i,i*99));\n          MADNESS_ASSERT(inserted);\n        }\n        //a.print_stats();\n        if (a.size() != size_t(std::distance(a.begin(),a.end())))\n            cout << \"size not equal to end-start\\n\";\n\n        for (int stride=1; stride<=13; ++stride) {\n            cout << \"    stride \" << stride << endl;\n            iteratorT it1 = a.begin();\n            iteratorT it2 = a.begin();\n            while (it1 != a.end()) {\n                iteratorT it1_save = it1;\n                it1.advance(stride);\n                for (int i=0; i<stride; ++i) ++it2;\n                if (it1 != it2) {\n                    cout << \"failed iterator stride\\n\";\n                    it1_save.advance(stride);\n                    throw \"bad\";\n                }\n                else {\n                    //cout << \"           OK\\n\";\n                }\n            }\n            split(Range<iteratorT>(a.begin(), a.end(), stride));\n        }\n    }\n}\n\nvector<int> random_perm(int n) {\n    vector<int> v(n);\n    for (int i=0; i<n; ++i) v[i] = i;\n    for (int i=0; i<n; ++i) swap(v[i],v[int(drand()*n)]);\n    return v;\n}\n\n\nvoid test_time() {\n    // Examine interaction between nbins and nentries by looping thru\n    // bin sizes and measuring time to insert and then delete varying\n    // number of keys in random order\n    typedef ConcurrentHashMap<int,int>::datumT datumT;\n    for (int nbins=100; nbins<=10000; nbins*=10) {\n        for (int nentries=nbins; nentries<=nbins*100; nentries*=10) {\n            ConcurrentHashMap<int,double> a(nbins);\n            vector<int> v = random_perm(nentries);\n            double insert_used = madness::cpu_time();\n            for (int i=0; i<nentries; ++i) {\n                [[maybe_unused]] auto&& [it, inserted] = a.insert(datumT(i,i));\n                MADNESS_ASSERT(inserted);\n            }\n            insert_used = madness::cpu_time()-insert_used;\n            v = random_perm(nentries);\n            double del_used = madness::cpu_time();\n            for (int i=0; i<nentries; ++i) {\n                [[maybe_unused]] auto erased = a.try_erase(i);\n                MADNESS_ASSERT(erased);\n            }\n            del_used = madness::cpu_time()-del_used;\n            printf(\"nbin=%8d   nent=%8d   insert=%.1es/call   del=%.1es/call\\n\",\n                   nbins, nentries, insert_used/nentries, del_used/nentries);\n        }\n    }\n}\n\nvoid do_test_random(ConcurrentHashMap<int,double>& a, size_t& count, double& sum) {\n    typedef ConcurrentHashMap<int,double>::datumT datumT;\n    typedef ConcurrentHashMap<int,double>::iterator iteratorT;\n    // Randomly generate keys in range 4*nbin and randomly insert or\n    // delete that entry.  Maintain expected sum and count of values\n    // and verify at end.\n    const int nbin = 131; // A small # bins means more chance of bad thread interaction\n    count = 0;\n    sum = 0.0;\n    for (int i=0; i<100000000; ++i) {\n        int key = int(drand()*4*nbin);\n        double value = key;\n        bool choice = (drand() < 0.5);\n        if (choice) {\n            pair<iteratorT,bool> it = a.insert(datumT(key,value));\n            if (it.second) {\n                sum += value;\n                count++;\n            }\n        }\n        else {\n            auto erased = a.try_erase(key);\n            if (erased) {\n                sum -= value;\n                count --;\n            }\n        }\n    }\n}\n\nvoid test_random() {\n    ConcurrentHashMap<int,double> a(131);\n    typedef ConcurrentHashMap<int,double>::iterator iteratorT;\n\n    size_t count;\n    double sum;\n    do_test_random(a, count, sum);\n\n    double end_sum = 0.0;\n    size_t end_count = 0;\n    for (iteratorT it=a.begin(); it!=a.end(); ++it) {\n        end_count++;\n        end_sum += it->second;\n    }\n\n    if (sum != end_sum || count != end_count || count != a.size()) {\n        cout << \"expected sum and count \" << sum << \" \" << count << endl;\n        cout << \"  actual sum and count \" << end_sum << \" \" << end_count << \" \" << a.size() << \" \" << endl;\n    }\n}\n\nmadness::AtomicInt ndone;\n\nclass Worker : public madness::ThreadBase {\nprivate:\n    ConcurrentHashMap<int,double>& a; // Better would be a shared pointer\n    size_t& count;\n    double& sum;\n\npublic:\n    Worker(ConcurrentHashMap<int,double>& a, size_t& count, double& sum)\n            : ThreadBase(), a(a), count(count), sum(sum) {\n        start();\n    }\n\n    void run() {\n        do_test_random(a, count, sum);\n\n        ndone++;\n    }\n};\n\n\n\nvoid test_thread() {\n    ConcurrentHashMap<int,double> a(131);\n    //typedef ConcurrentHashMap<int,double>::datumT datumT; // unused\n    typedef ConcurrentHashMap<int,double>::iterator iteratorT;\n    // typedef ConcurrentHashMap<int,double>::const_iterator const_iteratorT; // unused\n    const int nthread = 2;\n    size_t counts[nthread];\n    double sums[nthread];\n\n    ndone = 0;\n\n    Worker worker1(a,counts[0],sums[0]);\n    Worker worker2(a,counts[1],sums[1]);\n    while (ndone != 2) sched_yield();\n\n    size_t count = 0;\n    double sum = 0;\n    for (int i=0; i<nthread; ++i) {\n        sum += sums[i];\n        count += counts[i];\n    }\n\n    double end_sum = 0.0;\n    size_t end_count = 0;\n    for (iteratorT it=a.begin(); it!=a.end(); ++it) {\n        end_count++;\n        end_sum += it->second;\n    }\n\n    if (sum != end_sum || count != end_count || count != a.size()) {\n        cout << \"threaded: expected sum and count \" << sum << \" \" << count << endl;\n        cout << \"            actual sum and count \" << end_sum << \" \" << end_count << \" \" << a.size() << \" \" << endl;\n    }\n}\n\n\nclass Peasant : public madness::ThreadBase {\nprivate:\n    ConcurrentHashMap<int,double>& a; // Better would be a shared pointer\n\npublic:\n    Peasant(ConcurrentHashMap<int,double>& a)\n            : ThreadBase(), a(a) {\n        start();\n    }\n\n    void run() {\n        for (int i=0; i<10000000; ++i) {\n            ConcurrentHashMap<int,double>::accessor r;\n            if (!a.find(r, 1)) MADNESS_EXCEPTION(\"OK ... where is it?\", 0);\n            r->second++;\n        }\n\n        ndone++;\n    }\n};\n\n\nvoid test_accessors() {\n    ConcurrentHashMap<int,double> a(131);\n    // typedef ConcurrentHashMap<int,double>::datumT datumT; // unused\n    typedef ConcurrentHashMap<int,double>::accessor accessorT;\n\n    ndone = 0;\n\n    accessorT result;\n    if (a.find(result,1)) MADNESS_EXCEPTION(\"should not have found this\", 0);\n\n    a[1] = 0.0;\n\n    if (!a.find(result,1)) MADNESS_EXCEPTION(\"should have found this\", 0);\n    if (result->second != 0.0) MADNESS_EXCEPTION(\"should have been zero\", static_cast<int>(result->second));\n\n    if (!a.find(result,1)) MADNESS_EXCEPTION(\"should have found this\", 0);\n    if (result->second != 0.0) MADNESS_EXCEPTION(\"should have been zero\", static_cast<int>(result->second));\n\n\n    Peasant a1(a),a2(a);\n    result.release();\n    while (ndone != 2) sched_yield();\n\n    if (a[1] != 20000000.0) MADNESS_EXCEPTION(\"Ooops\", int(a[1]));\n}\n\nint main(int argc, char** argv) {\n    madness::initialize(argc,argv);\n\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n    \n    try {\n        test_coverage();\n        if (!smalltest) {\n            test_random();\n            test_time();\n            test_thread();\n            test_accessors();\n        }\n\n        cout << \"Things seem to be working!\\n\";\n    }\n    catch (const char* s) {\n        cout << \"STRING EXCEPTION: \" << s << endl;\n    }\n    catch (...) {\n        cout << \"UNKNOWN EXCEPTION: \" << endl;\n    }\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_hello.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <iostream>\n#include <madness/world/MADworld.h>\n\nint main(int argc, char** argv) {\n    madness::World& world = madness::initialize(argc,argv);\n\n    std::cout << \"Hello from \" << world.rank() << std::endl;\n\n    madness::finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_list.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#include <list>\n#include <iostream>\n#include <time.h>\n#include <sys/time.h>\n\nusing namespace std;\n\ndouble cpu_time() {\n    return double(clock())/CLOCKS_PER_SEC;\n}\n\n\nint main() {\n    double used;\n    int** p = new int*[1000000];\n\n    used = cpu_time();\n    for (int i=0; i<1000000; ++i) p[i] = new int(i);\n    used = (cpu_time() - used);\n    cout << \"time to new 1M integers \" << used << endl;\n\n    used = cpu_time();\n    for (int i=0; i<1000000; ++i) delete p[i];\n    used = (cpu_time() - used);\n    cout << \"time to del 1M integers \" << used << endl;\n\n\n    list<int> a;\n\n    used = cpu_time();\n    for (int i=0; i<1000000; ++i) {\n        a.push_back(i);\n    }\n    used = cpu_time() - used;\n    cout << \"time to push 1M integers in list \" << used << endl;\n\n    used = cpu_time();\n    for (int i=0; i<1000000; ++i) {\n        a.pop_front();\n    }\n    used = cpu_time() - used;\n    cout << \"time to pop  1M integers in list \" << used << endl;\n\n\n    list<int*> b;\n\n    used = cpu_time();\n    for (int i=0; i<1000000; ++i) {\n        b.push_back(new int(i));\n    }\n    used = cpu_time() - used;\n    cout << \"time to new+push 1M integers in list \" << used << endl;\n\n    used = cpu_time();\n    for (int i=0; i<1000000; ++i) {\n        delete b.front();\n        b.pop_front();\n    }\n    used = cpu_time() - used;\n    cout << \"time to del+pop  1M integers in list \" << used << endl;\n\n    return 0;\n}\n\n\n"
  },
  {
    "path": "src/madness/world/test_mpihang.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id$\n*/\n\n\n#include <mpi.h>\n#include <iostream>\n\nusing namespace std;\n\nint main(int argc, char** argv) {\n    MPI_Init(&argc, &argv);\n    int np = -1;\n    MPI_Comm_size(MPI_COMM_WORLD, &np);\n    if (np != 2) MADNESS_EXCEPTION(\"2 only\", np);\n\n    int me = 0;\n    MPI_Comm_rank(MPI_COMM_WORLD, &me);\n    int other = me? 0 : 1;\n\n    int a=0, b=-1;\n    MPI_Request rsend;\n    MPI_Isend(&a, sizeof(a), MPI_BYTE, other, 1, MPI_COMM_WORLD, &rsend);\n    MPI_Request rrecv;\n    MPI_Irecv(&b, sizeof(b), MPI_BYTE, other, 1, MPI_COMM_WORLD, &rrecv);\n\n    MPI_Status status;\n    int done = 0;\n    while (!done) MPI_Request_get_status(rsend, &done, &status);\n    while (!done) MPI_Request_get_status(rrecv, &done, &status);\n    MPI_Test(&rsend, &done, &status);\n    MPI_Test(&rrecv, &done, &status);\n\n    cout << me << \" got \" << b << endl;\n\n    MPI_Finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_papi.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#include <iostream>\n#include <unistd.h>\n#include <pthread.h>\n#include <papi.h>\n\nusing namespace std;\n\nconst int NUMEVENTS = 1;\nint events[NUMEVENTS] = {PAPI_FP_OPS};\n\nlong long values1[NUMEVENTS];\n\nvoid* f1(void* p) {\n    if (PAPI_start_counters(events, NUMEVENTS) != PAPI_OK)\n        throw \"Could not start papi counters\";\n\n    double sum = 0.0;\n    for (int i=0; i<100000; ++i) {\n        sum += 3.0;\n    }\n\n    if (PAPI_stop_counters(values1, NUMEVENTS) != PAPI_OK)\n        throw \"Could not stop papi counters\";\n\n    double* dp = (double*)(p);\n    *dp = sum;\n    return 0;\n}\n\nint main() {\n    if (PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT)\n        throw \"Could not init PAPI\";\n    if (PAPI_thread_init(pthread_self) != PAPI_OK)\n        throw \"Could not init PAPI thread API\";\n\n    pthread_attr_t attr;\n    pthread_attr_init(&attr);\n    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n    pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);\n\n    double sum1;\n    pthread_t t1;\n    pthread_create(&t1, &attr, f1, (void *)(&sum1));\n    usleep(1000000);\n    cout << \"sum1 \" << sum1 << \" \" << values1[0] << endl;\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_prof.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n#include <cmath>\n#include <cstdio>\nusing namespace madness;\n\nclass A {\npublic:\n    void member() {\n        PROFILE_MEMBER_FUNC(A);\n        double sum = 0.0;\n        for (int i=0; i<100000.0; i++) sum += sin(i*0.001);\n        std::printf(\"from A::member sum=%.6f\\n\", sum);\n    }\n};\n\nvoid b() {\n    PROFILE_FUNC;\n\n    double sum = 0.0;\n    for (int i=0; i<100000.0; i++) sum += sin(i*0.001);\n    std::printf(\"from B before sum=%.6f\\n\", sum);\n\n    A a;\n    a.member();\n\n    for (int i=0; i<100000.0; i++) sum += sin(i*0.001);\n    std::printf(\"from B after  sum=%.6f\\n\", sum);\n\n}\n\nvoid a() {\n    PROFILE_FUNC;\n\n    double sum = 0.0;\n    for (int i=0; i<100000.0; i++) sum += sin(i*0.001);\n    std::printf(\"from A before sum=%.6f\\n\", sum);\n\n    b();\n\n    for (int i=0; i<100000.0; i++) sum += sin(i*0.001);\n    std::printf(\"from A after  sum=%.6f\\n\", sum);\n}\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n\n    World world(SafeMPI::COMM_WORLD);\n    world.args(argc,argv);\n\n    {\n        PROFILE_BLOCK(main);\n\n        double sum = 0.0;\n        for (int i=0; i<100000.0; i++) sum += sin(i*0.001);\n        std::printf(\"from main before sum=%.6f\\n\", sum);\n\n        a();\n\n        for (int i=0; i<100000.0; i++) sum += sin(i*0.001);\n        std::printf(\"from main after  sum=%.6f\\n\", sum);\n    }\n\n    print_stats(world);\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_queue.cc",
    "content": "#include <madness/world/MADworld.h>\n\n// This program is used to do a simple test of the task queue.\n\nconst int NGEN=100;\nconst int NTASK=100000;\nmadness::AtomicInt total_count;\n\n// Global variables for thread local storage\npthread_key_t thread_key;\nmadness::AtomicInt thread_index;\nunsigned long* thread_counters = nullptr;\n\n\n// Access thread local storage\nunsigned long* get_tls() {\n    unsigned long* thread_counter =\n            reinterpret_cast<unsigned long*>(pthread_getspecific(thread_key));\n    if(! thread_counter) {\n        thread_counter = thread_counters + (thread_index++);\n        pthread_setspecific(thread_key, thread_counter);\n    }\n\n    return thread_counter;\n}\n\n// Initialize thread local storage\nvoid init_tls(const unsigned long nthreads) {\n    thread_index = 0;\n    thread_counters = new unsigned long[nthreads];\n    for(unsigned int i = 0; i < nthreads; ++i)\n        thread_counters[i] = 0;\n    pthread_key_create(&thread_key, nullptr);\n\n    get_tls();\n}\n\n// Cleanup thread local storage\nvoid cleanup_tls() {\n    delete [] thread_counters;\n    pthread_key_delete(thread_key);\n}\n\nclass Task : public madness::TaskInterface {\n    const int gen;\n    bool done;\npublic:\n    Task(int gen) : gen(gen), done(false) {}\n\n    virtual void run(madness::World& world) {\n        MADNESS_CHECK(!done);\n\n        unsigned long* thread_counter = get_tls();\n\n        ++(*thread_counter);\n        total_count++;\n        if (gen > 1) world.taskq.add(new Task(gen-1));\n\n        done = true;\n    }\n\n    static bool finished() {return total_count==(NGEN*NTASK);}\n};\n\nint main(int argc, char** argv) {\n    bool smalltest = false;\n    if (getenv(\"MAD_SMALL_TESTS\")) smalltest=true;\n    for (int iarg=1; iarg<argc; iarg++) if (strcmp(argv[iarg],\"--small\")==0) smalltest=true;\n    std::cout << \"small test : \" << smalltest << std::endl;\n    if (smalltest) return 0;\n\n    madness::initialize(argc, argv);\n    madness::World world(SafeMPI::COMM_WORLD);    \n\n    total_count = 0;\n    init_tls(madness::ThreadPool::size() + 1);\n\n    // Get start time.\n    double start = madness::wall_time();\n\n    // Add tasks to the task queue\n    for (int i=0; i<NTASK; ++i)\n        world.taskq.add(new Task(NGEN));\n\n    // Wait for tasks to finish\n    world.await(& Task::finished);\n\n    // Get finish time.\n    double finish = madness::wall_time();\n\n\n    std::cout << \"Total tasks = \" << total_count\n            << \"\\nTotal runtime = \" << finish - start\n            << \" (s)\\nTasks per thread:\\n\";\n    for (unsigned long i = 0; i < (madness::ThreadPool::size() + 1); ++i)\n        std::cout << i << \" \" << thread_counters[i] << \"\\n\";\n\n    cleanup_tls();\n    madness::finalize();\n\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_sig.cc",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n  \n  $Id$\n*/\n#include <iostream>\n#include <signal.h>\n#include <cstdlib>\n#include <cstdio>\n#include <execinfo.h>\n\nvoid print_backtrace(int fd) {\n    const int naddr=1024;\n    void* buf[naddr];\n    int nptrs = backtrace(buf, naddr);\n    printf(\"no. of address from backtrace %d\\n\", nptrs);\n    backtrace_symbols_fd(buf, nptrs, fd);\n\n    // Fox x86-32 do not seem able to get a backtrace from the signal\n    // handler even with these compilation options g++ -Wall -g -O0\n    // -fno-inline -fasynchronous-unwind-tables\n    // -fno-omit-frame-pointer testsig.cc.\n    //\n    // Have not tried 32-bit.\n}\n\nvoid madness_signal_action(int signum, siginfo_t *info, void *context) {\n    if (signum == SIGSEGV) {\n        fprintf(stderr,\"SIGSEGV: Invalid memory reference ... address=%p\\n\",info->si_addr);\n    }\n    else if (signum == SIGILL) {\n        fprintf(stderr,\"SIGILL: Illegal Instruction ... address=%p\\n\",info->si_addr);\n    }\n    else if (signum == SIGFPE) {\n        fprintf(stderr,\"SIGFPE: Floating point exception ... address=%p\\n\",info->si_addr);\n    }\n    else if (signum == SIGBUS) {\n        fprintf(stderr,\"SIGBUS: Bus error (bad memory access) ... address=%p\\n\",info->si_addr);\n    }\n    else {\n        fprintf(stderr,\"in generic signal handler ... signum=%d\\n\",signum);\n    }\n\n    print_backtrace(fileno(stderr));\n    exit(1);\n}\n\nvoid e() {\n    void (*f)()=0;\n    f();\n}\nvoid d() {\n    e();\n}\nvoid c() {\n    d();\n}\nvoid b() {\n    c();\n}\nvoid a() {\n    b();\n}\n\nint main() {\n    struct sigaction act, oldact;\n    act.sa_sigaction = madness_signal_action;\n    act.sa_flags = SA_SIGINFO;\n    if (sigaction(SIGSEGV, &act, &oldact)) printf(\"failed to install SIGSEGV handler\\n\");\n    if (sigaction(SIGFPE, &act, &oldact)) printf(\"failed to install SIGSEGV handler\\n\");\n    if (sigaction(SIGILL, &act, &oldact)) printf(\"failed to install SIGSEGV handler\\n\");\n    if (sigaction(SIGBUS, &act, &oldact)) printf(\"failed to install SIGSEGV handler\\n\");\n\n    a();\n\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_stack.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/madness_config.h>\n#ifdef MADNESS_HAS_GOOGLE_TEST\n\n#define MADNESS_DISPLAY_EXCEPTION_BREAK_MESSAGE 0\n#include <madness/world/stack.h>\n#include <gtest/gtest.h>\n\n\nnamespace {\n\n    using namespace madness;\n\n\n    class C {\n    public:\n        int value;\n\n        C(int v) : value(v) { }\n    };\n\n\n    template <typename T>\n    struct StackTestBase {\n      static T make(int i) { return i; }\n      static int value(const T& i) { return i; }\n    };\n\n    template <>\n    struct StackTestBase<int*> {\n\n        union type_converter {\n            int* p;\n            int v;\n        };\n\n        static int* make(int i) {\n            type_converter tc;\n            tc.p = nullptr;\n            tc.v = i;\n            return tc.p;\n        }\n\n        static int value(int* i) {\n            type_converter tc;\n            tc.p = i;\n            return tc.v;\n        }\n    };\n\n    template <>\n    struct StackTestBase<std::shared_ptr<int> > {\n        static std::shared_ptr<int> make(int i)\n        { return std::shared_ptr<int>(new int(i)); }\n\n        static int value(const std::shared_ptr<int>& i) { return *i; }\n    };\n\n    template <>\n    struct StackTestBase<C> {\n      static C make(int i) { return C(i); }\n      static int value(const C& i) { return i.value; }\n    };\n\n    template <typename T>\n    class StackTest : public ::testing::Test, public StackTestBase<T> {\n    public:\n        typedef Stack<T,4> Stack_;\n\n        StackTest() { }\n\n        virtual ~StackTest() { }\n\n        virtual void SetUp() { }\n\n        virtual void TearDown() { }\n\n    };\n\n    // Set types use in tests\n    typedef ::testing::Types<int, int*, std::shared_ptr<int>, C> MyTypes;\n    TYPED_TEST_CASE(StackTest, MyTypes);\n\n    TYPED_TEST(StackTest, DefaultConstructor) {\n        typedef typename StackTest<gtest_TypeParam_>::Stack_ Stack_;\n        Stack_ s;\n\n        EXPECT_EQ(0u, s.size());\n        EXPECT_EQ(4u, s.capacity());\n        EXPECT_TRUE(s.empty());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(s.top(), madness::MadnessException);\n        EXPECT_THROW(s.pop(), madness::MadnessException);\n#endif\n    }\n\n    TYPED_TEST(StackTest, PushPop) {\n        // Add names from the test fixture to this scope\n        typedef typename StackTest<gtest_TypeParam_>::Stack_ Stack_;\n        const auto& make = StackTest<gtest_TypeParam_>::make;\n        const auto& value = StackTest<gtest_TypeParam_>::value;\n        Stack_ s;\n\n        unsigned int i = 0u;\n        unsigned int cap = s.capacity();\n        const typename Stack_::value_type* const small_buffer = s.data();\n\n        // Test pushing data up to the small buffer size\n        for(; i < cap; ++i) {\n            EXPECT_EQ(i, s.size());\n            EXPECT_NO_THROW(s.push(make(i)));\n            EXPECT_EQ(i, size_t(value(s.top())));\n            EXPECT_EQ(i + 1u, s.size());\n            EXPECT_EQ(cap, s.capacity());\n            EXPECT_FALSE(s.empty());\n        }\n\n        // Test popping data to empty\n        for(; i > 0; --i) {\n            EXPECT_FALSE(s.empty());\n            EXPECT_EQ(i, s.size());\n            EXPECT_EQ(i - 1, value(s.top()));\n            EXPECT_NO_THROW(s.pop());\n            EXPECT_EQ(i - 1, s.size());\n            EXPECT_EQ(cap, s.capacity());\n        }\n\n        // Check that all elements have been popped\n        EXPECT_EQ(small_buffer, s.data());\n        EXPECT_EQ(0u, s.size());\n        EXPECT_TRUE(s.empty());\n\n        // Test pushing data with large buffer size\n        for(unsigned int n = 0u; n < 3; ++n) {\n            for(; i < cap; ++i) {\n                EXPECT_EQ(i, s.size());\n                EXPECT_NO_THROW(s.push(make(i)));\n                EXPECT_EQ(i, value(s.top()));\n                EXPECT_EQ(i + 1u, s.size());\n                EXPECT_EQ(cap, s.capacity());\n                EXPECT_FALSE(s.empty());\n            }\n\n            // Test that the buffer is reallocated and increases in size when\n            // the stack is at capacity\n            typename Stack_::value_type* const buffer = s.data();\n            EXPECT_NO_THROW(s.push(make(i)));\n            EXPECT_LT(cap, s.capacity());\n            EXPECT_NE(buffer, s.data());\n            cap = s.capacity();\n            ++i;\n        }\n\n        // Test popping data to empty\n        for(; i > 0; --i) {\n            EXPECT_FALSE(s.empty());\n            EXPECT_EQ(i, s.size());\n            EXPECT_EQ(i - 1, value(s.top()));\n            EXPECT_NO_THROW(s.pop());\n            EXPECT_EQ(i - 1, s.size());\n            EXPECT_EQ(cap, s.capacity());\n        }\n\n        // Check that all elements have been popped\n        EXPECT_NE(small_buffer, s.data());\n        EXPECT_EQ(0u, s.size());\n        EXPECT_TRUE(s.empty());\n    }\n\n\n    TYPED_TEST(StackTest, CopyCtor) {\n        // Add names from the test fixture to this scope\n        typedef typename StackTest<gtest_TypeParam_>::Stack_ Stack_;\n        const auto& make = StackTest<gtest_TypeParam_>::make;\n        const auto& value = StackTest<gtest_TypeParam_>::value;\n        Stack_ s;\n\n        unsigned int i = 0u;\n        unsigned int cap = s.capacity();\n\n        for(; i < cap * 0.5; ++i) {\n            s.push(make(i));\n        }\n\n        // Test moving a small stack\n\n        Stack_ css(s);\n\n        // Check that the size and capacity has been correctly copied\n        EXPECT_EQ(s.size(), css.size());\n        EXPECT_EQ(s.capacity(), css.capacity());\n        EXPECT_NE(s.data(), css.data());\n        EXPECT_FALSE(s.empty());\n        EXPECT_FALSE(css.empty());\n\n        // Test that the move target stack contains the data that was held by s.\n        for(; i > 0u; --i) {\n            EXPECT_EQ(i, css.size());\n            EXPECT_EQ(value(s.top()), value(css.top()));\n            EXPECT_NO_THROW(css.pop());\n            EXPECT_NO_THROW(s.pop());\n            EXPECT_EQ(i - 1, css.size());\n            EXPECT_EQ(cap, css.capacity());\n        }\n\n        for(; i < cap * 1.5; ++i) {\n            EXPECT_NO_THROW(s.push(make(i)));\n        }\n        cap = s.size();\n\n        // Test moving a large stack\n\n        Stack_ cls(s);\n\n        // Check that the size and capacity has been correctly copied\n        EXPECT_EQ(s.size(), cls.size());\n        EXPECT_EQ(s.size(), cls.capacity());\n        EXPECT_NE(s.data(), cls.data());\n        EXPECT_FALSE(s.empty());\n        EXPECT_FALSE(cls.empty());\n\n        // Test that the move target stack contains the data that was held by s.\n        for(; i > 0; --i) {\n            EXPECT_EQ(i, cls.size());\n            EXPECT_EQ(value(s.top()), value(cls.top()));\n            EXPECT_NO_THROW(cls.pop());\n            EXPECT_NO_THROW(s.pop());\n            EXPECT_EQ(i - 1, cls.size());\n            EXPECT_EQ(cap, cls.capacity());\n        }\n\n    }\n\n    TYPED_TEST(StackTest, MoveCtor) {\n        // Add names from the test fixture to this scope\n        typedef typename StackTest<gtest_TypeParam_>::Stack_ Stack_;\n        const auto& make = StackTest<gtest_TypeParam_>::make;\n        const auto& value = StackTest<gtest_TypeParam_>::value;\n        Stack_ s;\n\n        unsigned int i = 0u;\n        unsigned int cap = s.capacity();\n        const typename Stack_::value_type* const small_buffer = s.data();\n\n        for(; i < cap * 0.5; ++i) {\n            s.push(make(i));\n        }\n\n        // Test moving a small stack\n\n        Stack_ mss(std::move(s));\n\n        // Check that the size and capacity has been correctly moved\n        EXPECT_EQ(small_buffer, s.data());\n        EXPECT_EQ(0u, s.size());\n        EXPECT_EQ(cap, s.capacity());\n        EXPECT_NE(small_buffer, mss.data());\n        EXPECT_EQ(i, mss.size());\n        EXPECT_EQ(cap, mss.capacity());\n        EXPECT_TRUE(s.empty());\n        EXPECT_FALSE(mss.empty());\n\n        // Test that the move target stack contains the data that was held by s.\n        for(; i > 0u; --i) {\n            EXPECT_EQ(i, mss.size());\n            EXPECT_EQ(int(i - 1), value(mss.top()));\n            EXPECT_NO_THROW(mss.pop());\n            EXPECT_EQ(i - 1, mss.size());\n            EXPECT_EQ(cap, mss.capacity());\n        }\n\n        for(; i < cap * 1.5; ++i) {\n            EXPECT_NO_THROW(s.push(make(i)));\n        }\n        cap = s.capacity();\n        typename Stack_::value_type* buffer = s.data();\n\n        // Test moving a large stack\n\n        Stack_ mls(std::move(s));\n\n        // Check that the size and capacity has been correctly moved\n        EXPECT_EQ(small_buffer, s.data());\n        EXPECT_EQ(0u, s.size());\n        EXPECT_EQ(size_t(4), s.capacity());\n        EXPECT_EQ(buffer, mls.data());\n        EXPECT_EQ(i, mls.size());\n        EXPECT_EQ(cap, mls.capacity());\n        EXPECT_TRUE(s.empty());\n        EXPECT_FALSE(mls.empty());\n\n        // Test that the move target stack contains the data that was held by s.\n        for(; i > 0; --i) {\n            EXPECT_EQ(i, mls.size());\n            EXPECT_EQ(i - 1, value(mls.top()));\n            EXPECT_NO_THROW(mls.pop());\n            EXPECT_EQ(i - 1, mls.size());\n            EXPECT_EQ(cap, mls.capacity());\n        }\n\n    }\n\n    TYPED_TEST(StackTest, CopyAssign) {\n        // Add names from the test fixture to this scope\n        typedef typename StackTest<gtest_TypeParam_>::Stack_ Stack_;\n        const auto& make = StackTest<gtest_TypeParam_>::make;\n        const auto& value = StackTest<gtest_TypeParam_>::value;\n        Stack_ s;\n        const unsigned int small_cap = s.capacity();\n\n        for(double fill = 0.0; fill <= 3.0; fill += 0.75) {\n\n            unsigned int i = 0u;\n            for(; i < small_cap * 0.5; ++i) {\n                s.push(make(i));\n            }\n\n            // Test moving a small stack\n\n            Stack_ css;\n            for(unsigned int x = 0u; x < small_cap * fill; ++x) {\n                css.push(make(x + 20));\n            }\n            unsigned int cap = css.capacity();\n            if(cap < s.size())\n                cap = s.size();\n            css = s;\n\n            // Check that the size and capacity has been correctly copied\n            EXPECT_EQ(s.size(), css.size());\n            EXPECT_EQ(cap, css.capacity());\n            EXPECT_NE(s.data(), css.data());\n            EXPECT_FALSE(s.empty());\n            EXPECT_FALSE(css.empty());\n\n            // Test that the move target stack contains the data that was held by s.\n            for(; i > 0u; --i) {\n                EXPECT_EQ(i, css.size());\n                EXPECT_EQ(value(s.top()), value(css.top()));\n                EXPECT_NO_THROW(css.pop());\n                EXPECT_NO_THROW(s.pop());\n                EXPECT_EQ(i - 1, css.size());\n                EXPECT_EQ(cap, css.capacity());\n            }\n\n            for(; i < small_cap * 1.5; ++i) {\n                EXPECT_NO_THROW(s.push(make(i)));\n            }\n\n            // Test moving a large stack\n\n            Stack_ cls;\n            for(unsigned int x = 0u; x < small_cap * fill; ++x) {\n                cls.push(make(x + 20));\n            }\n            cap = cls.capacity();\n            if(cap < s.size())\n                cap = s.size();\n            cls = s;\n\n            // Check that the size and capacity has been correctly copied\n            EXPECT_EQ(s.size(), cls.size());\n            EXPECT_EQ(cap, cls.capacity());\n            EXPECT_NE(s.data(), cls.data());\n            EXPECT_FALSE(s.empty());\n            EXPECT_FALSE(cls.empty());\n\n            // Test that the move target stack contains the data that was held by s.\n            for(; i > 0; --i) {\n                EXPECT_EQ(i, cls.size());\n                EXPECT_EQ(value(s.top()), value(cls.top()));\n                EXPECT_NO_THROW(cls.pop());\n                EXPECT_NO_THROW(s.pop());\n                EXPECT_EQ(i - 1, cls.size());\n                EXPECT_EQ(cap, cls.capacity());\n            }\n        }\n\n    }\n\n    TYPED_TEST(StackTest, MoveAssign) {\n        // Add names from the test fixture to this scope\n        typedef typename StackTest<gtest_TypeParam_>::Stack_ Stack_;\n        const auto& make = StackTest<gtest_TypeParam_>::make;\n        const auto& value = StackTest<gtest_TypeParam_>::value;\n        Stack_ s;\n        const unsigned int small_cap = s.capacity();\n\n        for(double fill = 0.0; fill <= 3.0; fill += 0.75) {\n\n            unsigned int i = 0u;\n            unsigned int cap = s.capacity();\n            const typename Stack_::value_type* const small_buffer = s.data();\n\n            for(; i < small_cap * 0.5; ++i) {\n                s.push(make(i));\n            }\n\n            // Test moving a small stack\n\n            Stack_ mss;\n            for(unsigned int x = 0u; x < small_cap * fill; ++x) {\n                mss.push(make(x + 20));\n            }\n            mss = std::move(s);\n\n            // Check that the size and capacity has been correctly moved\n            EXPECT_EQ(small_buffer, s.data());\n            EXPECT_EQ(0u, s.size());\n            EXPECT_EQ(cap, s.capacity());\n            EXPECT_NE(small_buffer, mss.data());\n            EXPECT_EQ(i, mss.size());\n            EXPECT_EQ(cap, mss.capacity());\n            EXPECT_TRUE(s.empty());\n            EXPECT_FALSE(mss.empty());\n\n            // Test that the move target stack contains the data that was held by s.\n            for(; i > 0u; --i) {\n                EXPECT_EQ(i, mss.size());\n                EXPECT_EQ(i - 1, value(mss.top()));\n                EXPECT_NO_THROW(mss.pop());\n                EXPECT_EQ(i - 1, mss.size());\n                EXPECT_EQ(cap, mss.capacity());\n            }\n\n            for(; i < small_cap * 1.5; ++i) {\n                EXPECT_NO_THROW(s.push(make(i)));\n            }\n            cap = s.capacity();\n            typename Stack_::value_type* buffer = s.data();\n\n            // Test moving a large stack\n\n            Stack_ mls;\n            for(unsigned int x = 0u; x < small_cap * fill; ++x) {\n                mls.push(make(x + 20));\n            }\n            mls = std::move(s);\n\n            // Check that the size and capacity has been correctly moved\n            EXPECT_EQ(small_buffer, s.data());\n            EXPECT_EQ(0u, s.size());\n            EXPECT_EQ(small_cap, s.capacity());\n            EXPECT_EQ(buffer, mls.data());\n            EXPECT_EQ(i, mls.size());\n            EXPECT_EQ(cap, mls.capacity());\n            EXPECT_TRUE(s.empty());\n            EXPECT_FALSE(mls.empty());\n\n            // Test that the move target stack contains the data that was held by s.\n            for(; i > 0; --i) {\n                EXPECT_EQ(i, mls.size());\n                EXPECT_EQ(i - 1, value(mls.top()));\n                EXPECT_NO_THROW(mls.pop());\n                EXPECT_EQ(i - 1, mls.size());\n                EXPECT_EQ(cap, mls.capacity());\n            }\n        }\n    }\n\n} // namespace\n\nint main(int argc, char **argv) {\n    ::testing::InitGoogleTest(&argc, argv);\n    int status = RUN_ALL_TESTS();\n\n    return status;\n}\n\n\n#else\n\n#include <iostream>\nint main() {\n    std::cout << \"!!! Error: You need to build with Google test to enable WorldRef test code\\n\";\n    return 1;\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/world/test_sysctl.c",
    "content": "#include <stdio.h>\n#include <assert.h>\n\n#include <sys/time.h>\n#include <sys/types.h>\n#include <sys/sysctl.h>\n\nint main(int argc, char * argv[])\n{\n    {\n        int mib[2], maxproc;\n        size_t len;\n        mib[0] = CTL_KERN;\n        mib[1] = KERN_MAXPROC;\n        len = sizeof(maxproc);\n        sysctl(mib, 2, &maxproc, &len, NULL, 0);\n        printf(\"maxproc = %d \\n\", maxproc);\n    }\n    {\n        int ncpu;\n        size_t len = sizeof(ncpu);\n        int mib[2] = {CTL_HW,HW_NCPU};\n        //mib[0] = CTL_HW;\n        //mib[1] = HW_NCPU;\n        sysctl(mib, 2, &ncpu, &len, NULL, 0);\n        printf(\"ncpu = %d \\n\", ncpu);\n    }\n    {\n        struct clockinfo c;\n        int mib[2] = {CTL_KERN, KERN_CLOCKRATE};\n        size_t len = sizeof(c);\n        sysctl(mib, 2, &c, &len, NULL, 0);\n        printf(\"c.hz = %d \\n\", c.hz);\n    }\n    {\n        long freq;\n        size_t len = sizeof(freq);\n        sysctlbyname(\"hw.cpufrequency\", &freq, &len, NULL, 0);\n        printf(\"freq = %ld \\n\", freq);\n    }\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_tree.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#include <madness/world/MADworld.h>\n#include <madness/world/worldhash.h>\n\nusing namespace madness;\nusing namespace std;\n\nstruct Key {\n    typedef unsigned long ulong;\n    ulong n, i, j, k;\n    hashT hashval;\n\n    Key() {}; \n\n    Key(ulong n, ulong i, ulong j, ulong k)\n        : n(n), i(i), j(j), k(k)\n    {\n        hashval = hash_value(n);\n        hash_combine(hashval,i);\n        hash_combine(hashval,j);\n        hash_combine(hashval,k);\n    };\n\n    hashT hash() const {\n        return hashval;\n    }\n\n    template <typename Archive>\n    void serialize(const Archive& ar) {\n        ar & n & i & j & k & hashval;\n    }\n\n    bool operator==(const Key& b) const {\n        return hashval==b.hashval && n==b.n && i==b.i && j==b.j && k==b.k;\n    }\n\n    Key parent() const {\n        return Key(n-1, i>>1, j>>1, k>>1);\n    }\n};\n\nostream& operator<<(ostream& s, const Key& key) {\n    s << \"Key(\" << key.n << \",\" << key.i << \",\" << key.j << \",\" << key.k << \")\";\n    return s;\n}\n\nclass KeyChildIterator {\n    typedef unsigned long ulong;\n    Key parent;\n    Key child;\n    ulong i,j,k;\npublic:\n    KeyChildIterator(const Key& parent)\n            : parent(parent)\n            , child(parent.n+1,2*parent.i,2*parent.j,2*parent.k)\n            , i(0)\n            , j(0)\n            , k(0) {}\n\n    KeyChildIterator& operator++() {\n        if (k == 2) return *this;  // k==2 indicates end \n        i++;\n        if (i == 2) {\n            i = 0;\n            j++;\n            if (j == 2) {\n                j = 0;\n                k++;\n            }\n        }\n        child = Key(parent.n+1, 2*parent.i+i, 2*parent.j+j, 2*parent.k+k);\n        return *this;\n    }\n\n    const Key& key() {\n        return child;\n    }\n\n    operator bool() const {\n        return k!=2;\n    }\n};\n\nstruct Node;\nostream& operator<<(ostream& s, const Node& node);\n\nstruct Node {\n    typedef WorldContainer<Key,Node> dcT;\n    double value;\n    bool isleaf;\n\n    Node() : value(0.0), isleaf(true) {}\n    Node(double value) : value(value), isleaf(true) {}\n    Node(const Node& node) : value(node.value), isleaf(node.isleaf) {}\n\n    // Invoked on a new Node constructed with default constructor already put in the container with given key.\n    // Need to set the desired value and continue walking down randomly inserting\n    void random_insert(const dcT& constd, const Key& key, double valin) {\n        dcT& d = const_cast<dcT&>(constd);\n        value = valin;\n        isleaf = true;\n        if (value > 0.25 && d.size()<40) {\n            isleaf = false;\n            World& world = d.get_world();\n            double ran = world.drand();\n            for (KeyChildIterator it(key); it; ++it) {\n                d.task(it.key(),&Node::random_insert, d, it.key(), value*ran);\n            }\n        }\n    }\n\n    template <class Archive>\n    void serialize(Archive& ar) {\n        ar & value & isleaf;\n    }\n\n    bool is_leaf() const {\n        return isleaf;\n    }\n\n    double get() const {\n        return value;\n    }\n\n    void set(double v) {\n        value = v;\n    }\n\n    void recursive_print(const dcT& d, const Key& key) const {\n        cout << d.get_world().rank() << \": RP: \";\n        for (unsigned int i=0; i<key.n; ++i) cout << \"   \";\n        cout << key << \" \" << *this;\n        if (! is_leaf()) {\n            for (KeyChildIterator it(key); it; ++it) {\n                d.send(it.key(),&Node::recursive_print, d, it.key());\n            }\n        }\n    }\n\n    double do_sum(vector< Future<double> > v) {\n        double sum = value;\n        for (int i=0; i<8; ++i) sum += v[i].get();\n        return sum;\n    }\n\n    Future<double> do_sum_spawn(const dcT& d, const Key& key) {\n        if (is_leaf()) {\n            return Future<double>(value);\n        }\n        else {\n            vector< Future<double> > v = future_vector_factory<double>(8);\n            int i=0;\n            for (KeyChildIterator it(key); it; ++it, ++i) {\n                const Key& child = it.key();\n                v[i] = d.task(child, &Node::do_sum_spawn, d, child);\n            }\n            return d.task(key, &Node::do_sum, v);\n        }\n    }\n};\n\nostream& operator<<(ostream& s, const Node& node) {\n    s << \"Node(\" << node.get() << \",\" << node.is_leaf() << \")\" << endl;\n    return s;\n}\n\nvoid doit(World& world) {\n    ProcessID me = world.rank();\n    WorldContainer<Key,Node> d(world);\n    world.gop.fence();\n\n    Key root(0,0,0,0);\n\n    // First build an oct-tree with random depth\n    if (me == 0) d.send(root,&Node::random_insert,d,root,1.0);\n    world.gop.fence();\n    if (me == 0) print(\"FINISHED INSERTING\");\n\n    // Now using AM walk the tree by sending messages between objects\n    if (me == 0) d.send(root, &Node::recursive_print, d, root);\n    world.gop.fence();\n    if (me == 0) print(\"FINISHED PRINTING\");\n\n    // Sum up the tree using tasks (send works too ... just testing tasks)\n    if (me == 0) {\n        print(\"ANSWER SUMMING TREE IS\", d.task(root, &Node::do_sum_spawn, d, root).get());\n    }\n    // Sum up values just iterating over elements in the container \n    double sum = 0.0;\n    for (typename WorldContainer<Key,Node>::iterator it=d.begin(); it!=d.end(); ++it) sum += it->second.get();\n    world.gop.sum(sum);\n    if (me == 0) {\n        print(\"ANSWER BRUTE FORCE IS \", sum);\n    }\n    \n    world.gop.fence();\n}\n\n\nint main(int argc, char** argv) {\n    initialize(argc, argv);\n    World world(SafeMPI::COMM_WORLD);\n\n    try {\n        redirectio(world);\n        doit(world);\n        world.gop.fence();\n        print(\"done with final fence\");\n\n    }\n    catch (SafeMPI::Exception& e) {\n        std::cout << \"Safempi exception: \" << e.what() << std::endl;\n    }\n    catch (madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const char* s) {\n        print(s);\n        error(\"caught a string exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_utilities.h",
    "content": "/*\n * test_utilities.h\n *\n *  Created on: 15 May 2019\n *      Author: fbischoff\n */\n\n#ifndef SRC_APPS_CHEM_TEST_UTILITIES_H_\n#define SRC_APPS_CHEM_TEST_UTILITIES_H_\n\n\nnamespace madness {\n\n/// small class for pretty printing of test output\nstruct test_output {\n    /// @param[in]  use as if (world.rank()==0) to avoid printing on all ranks\n\ttest_output(std::string line, bool print=true) : do_print(print) {\n        if (do_print) std::cout << ltrim_to_length(line,70);\n\t\tlogger << std::scientific << std::setprecision(8) ;\n        time_begin=cpu_time();\n        time_last_checkpoint=time_begin;\n        set_cout_to_logger();\n\t}\n\n    static std::string ltrim_to_length(std::string line, long length=70) {\n        int ncharacter=line.size();\n        if (line.size()<size_t(length)) line+= std::string(length-ncharacter, ' ' );\n        return line;\n    }\n\n    ~test_output() {\n        set_cout_to_terminal(false);\n    }\n\n    void set_do_print(bool print) {\n        do_print=print;\n    }\n\n\tvoid print_and_clear_log() {\n        set_cout_to_terminal();\n\t\tstd::cout << logger.str() << std::endl;\n\t\tlogger.clear();\n\t}\n\n    void checkpoint(double error, double tol,\n                    std::string message, double time=-1.0) {\n\t\tcheckpoint(error<tol,message,time);\n    }\n\n    void checkpoint(double value, double reference, double tol,\n                    std::string message, double time=-1.0) {\n        double error=fabs(value-reference);\n\t\tcheckpoint(error,tol,message,time);\n    }\n\n\tvoid checkpoint(int value, int reference, std::string message, double time=-1.0) {\n         bool success=(value==reference);\n         checkpoint(success,message,time);\n    }\n\n    void checkpoint(bool success, std::string message, double time=-1.0) {\n        bool use_logger=cout_set_to_logger;\n        set_cout_to_terminal(false);\n        final_success = success and final_success;\n        if (not have_checkpoints and do_print) print(\"\");    // first checkpoint\n        have_checkpoints=true;\n\t    if (do_print) std::cout << \"  \" << ltrim_to_length(message,66);\n        double time1=cpu_time()-time_last_checkpoint;\n        time_last_checkpoint=cpu_time();\n        print_success_fail(std::cout,success,time1,-1.0);\n        if (not success) {\n            print_and_clear_log();\n        }\n        if (use_logger) set_cout_to_logger();\n    }\n\n    void print_success_fail(std::ostream& os, bool success, double time, double error) const {\n\n\t    if (do_print) {\n\t        if (success) os << \"\\033[32m\"   << \"passed \" << \"\\033[0m\";\n\t        else os << \"\\033[31m\"   << \"failed \" << \"\\033[0m\";\n\t        if (time>0) {\n\t            std::stringstream ss;\n\t            ss<< \" in \" << std::fixed << std::setprecision(1) << time << \"s\";\n\t            os << ss.str();\n\t        }\n\t        if (error>=0.0) os << \" error \" << error;\n\t        os << std::endl;\n\t    }\n    }\n\n\tint end(bool success=true) {\n        set_cout_to_terminal(false);\n        if (do_print and have_checkpoints) std::cout << ltrim_to_length(\"--> final result -->\",70);\n        success = success and final_success;\n        double time_end=cpu_time();\n        print_success_fail(std::cout,success,time_end-time_begin,-1.0);\n        if (not success) print_and_clear_log();\n\t\treturn (success) ? 0 : 1;\n\t}\n\n    void set_cout_to_logger() {\n        if (cout_set_to_logger) return;\n        cout_set_to_logger=true;\n        stream_buffer_cout = std::cout.rdbuf();\n        std::streambuf* stream_buffer_file = logger.rdbuf();\n        std::cout.rdbuf(stream_buffer_file);\n    }\n\n    /// newline for use by user, not for internal use (e.g. checkpoint())\n    void set_cout_to_terminal(bool newline=true) {\n        if (not cout_set_to_logger) return;\n        if (cout_set_to_logger) {\n            std::cout.rdbuf(stream_buffer_cout);\n        }\n        cout_set_to_logger=false;\n        if (newline) std::cout << std::endl;\n    }\n\n    std::stringstream logger;\n    bool get_final_success() const {return final_success;}\nprivate:\n\n    bool final_success=true;\n    bool cout_set_to_logger=false;          // do not change this directly!\n    bool have_checkpoints=false;\n    std::streambuf* stream_buffer_cout;\n    double time_begin=0.0;\n    double time_last_checkpoint=0.0;\n    bool do_print=true;                        // if run on several ranks\n};\n\n\n}\n\n#endif /* SRC_APPS_CHEM_TEST_UTILITIES_H_ */\n"
  },
  {
    "path": "src/madness/world/test_vec.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#include <iostream>\n#include <vector>\nusing namespace std;\n\nclass A {\n    int val;\npublic:\n    A() : val(0) {\n        cout << \"Default constructor\" << endl;\n    };\n\n    A(int val) : val(val) {\n        cout << \"Value constructor \" << val << endl;\n    };\n\n    A(const A& a) : val(a.val) {\n        cout << \"Copy constructor \" << val << endl;\n    };\n\n    A& operator=(const A& a) {\n        cout << \"Assignment \" << val << \" \" << a.val << endl;\n        val = a.val;\n        return *this;\n    };\n\n    void set(int a) {\n        val = a;\n    };\n\n    ~A() {\n        cout << \"Destructor\" << endl;\n    }\n};\n\nint main() {\n    cout << \"Making vector(3)\" << endl;\n    vector<A> v(3);\n    cout << \"Finished making vector\" << endl;\n\n    cout << \"Assigning vector values\" << endl;\n    for (int i=0; i<(int)v.size(); ++i) v[i].set(i+1);\n    cout << \"Finished assigning vector values\" << endl;\n\n    cout << \"Making empty vector\" << endl;\n    vector<A> u;\n    cout << \"Finished making empty vector\" << endl;\n\n    cout << \"Assigning to empty vector from vector(3)\" << endl;\n    u = v;\n    cout << \"Finished assigning to empty vector\" << endl;\n\n    cout << \"Reassigning vector values\" << endl;\n    for (int i=0; i<(int)v.size(); ++i) v[i].set(i+5);\n    cout << \"Finished reassigning vector values\" << endl;\n\n    cout << \"Assigning to existing vector from vector(3)\" << endl;\n    u = v;\n    cout << \"Finished assigning to existing vector\" << endl;\n\n    cout << \"Vector copy constructor from vector(3)\" << endl;\n    vector<A> p(v);\n    cout << \"Finished vector copy constructor from vector(3)\" << endl;\n\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_vector.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/vector.h>\n#include <madness/madness_config.h>\n\n#ifdef MADNESS_HAS_GOOGLE_TEST\n\n#include <gtest/gtest.h>\n\nnamespace {\n    TEST(VectorTest, SizeWorks) {\n        madness::Vector<double,3> v{};\n        EXPECT_EQ(3u, v.size());\n    }\n\n    TEST(VectorTest, InitializerWorks) {\n        madness::Vector<double,33> v(1.0);\n        for (std::size_t i=0; i<v.size(); ++i) {\n            EXPECT_EQ(1.0, v[i]);\n        }\n    }\n\n    TEST(VectorTest, Hash) {\n        madness::Vector<double,33> v(1.0);\n        EXPECT_NE(0u, v.hash());\n    }\n}\n\nint main(int argc, char **argv) {\n    ::testing::InitGoogleTest(&argc, argv);\n    return RUN_ALL_TESTS();\n}\n\n#else\n\n#include <iostream>\nint main() {\n    std::cout << \"!!! Error: You need to build with Google test to enable Array test code\\n\";\n    return 1;\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/world/test_world.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <vector>\n#include <numeric>\n#include <algorithm>\n\n#include <madness/world/MADworld.h>\n#include <madness/world/world_object.h>\n#include <madness/world/worlddc.h>\n\n#if MADNESS_CATCH_SIGNALS\n# include <csignal>\n#endif\n\n#ifdef HAVE_PARSEC\n# include <parsec.h>\n# ifdef PARSEC_HAVE_CUDA\n#  include <cuda_runtime.h>\n# endif\n#endif\n\nusing namespace madness;\nusing namespace std;\n\nvoid test0(World& world) {\n    PROFILE_FUNC;\n    const size_t n=555;\n    char buf[n+2];\n    buf[0] = buf[n+1] = 127;\n\n    archive::BufferOutputArchive arout(buf+1,n-2);\n\n    arout & 1L & 99.9;\n    arout.store(\"hello\",6);\n    arout & 7L & 77.7;\n    MADNESS_CHECK(buf[0]==127 && buf[n+1]==127);\n\n    long i = 0l;\n    double a = 0.0;\n\n    archive::BufferInputArchive arin(buf+1,n-2);\n    char s[8];\n    s[0] = s[7] = 66;\n    arin & i & a;\n    MADNESS_CHECK(i==1 && a==99.9);\n    arin.load(s+1,6);\n    MADNESS_CHECK(s[0]==66 && s[1]=='h' && s[5]=='o' && s[7]==66);\n    arin & i & a;\n    MADNESS_CHECK(i==7 && a==77.7);\n\n    if (world.rank() == 0) print(\"test0 (serialization to/from buf) seems to be working\");\n}\n\nclass B {\n    long b;\npublic:\n    B(long b=0) : b(b) {};\n    void set(long value) {\n        b=value;\n    };\n    long get() const {\n        return b;\n    };\n    ~B() {\n        print(\"B destructor\");\n    };\n    template <typename Archive> void serialize(Archive &ar) {\n        ar&b;\n    }\n};\n\n\n#include <complex>\ntypedef std::complex<double> double_complex;\n\nclass TestTask : public TaskInterface {\npublic:\n    void run(World& world) {\n        print(\"Hi, I am running!\");\n    }\n};\n\nclass TTT {\nprivate:\n    int state;\npublic:\n    TTT() : state(0) {};\n\n    static void fred() {\n        print(\"Oops-a-daisy!\");\n    };\n\n    static int mary() {\n        return 99;\n    };\n\n    static int carl() {\n        return 88;\n    };\n\n    static int dave(World* world) {\n        return world->rank();\n    };\n\n    static int bert(int input) {\n        return input+1;\n    };\n\n    static double_complex sara(double a, const double_complex& b) {\n        return a*b;\n    };\n\n    static string kate(World* world, const string& msg, double d) {\n        ostringstream s;\n        s << \"Process \" << world->rank() << \" says '\" << msg << \"' and \"\n        << d << \" right back at you!\";\n        return s.str();\n    };\n\n    double jody(double a, double b, double c) {\n        return a+b+c + state;\n    };\n\n    double hugh(vector< Future<int> >& a) {\n        double sum = 0.0;\n        for (int i=0; i<(int)a.size(); ++i) sum += a[i].get();\n        return sum;\n    };\n};\n\ndouble dumb(int a1, int a2, int a3, int a4, int a5, int a6, int a7) {\n    return a1+a2+a3+a4+a5+a6+a7;\n}\n\n\n\nvoid test5(World& world) {\n    PROFILE_FUNC;\n    int nproc = world.size();\n    ProcessID me = world.rank();\n    ProcessID right = (me+1)%nproc;\n    TaskInterface* task = new TestTask();\n    task->inc();\n    task->inc();\n    world.taskq.add(task);\n    print(\"added the task ... about to dec\");\n    task->dec();\n    task->dec();\n    print(\"fencing\");\n    world.gop.fence();\n    print(\"done with fence\");\n\n    world.taskq.add(TTT::fred);\n    print(\"MAKING MARY\");\n    Future<int> mary = world.taskq.add(TTT::mary);\n    print(\"MADE MARY\");\n    Future<int> carl = world.taskq.add(right,TTT::carl);\n    Future<int> dave = world.taskq.add(right,TTT::dave, &world);\n    Future<int> bert_input;\n    Future<int> bert = world.taskq.add(TTT::bert,bert_input);\n    Future<double> sara1;\n    Future<double_complex> sara2;\n    Future<double_complex> sara = world.taskq.add(TTT::sara,sara1,sara2);\n    Future<string> kate2;\n    Future<double> kate3;\n    Future<string> kate = world.taskq.add(TTT::kate,&world,kate2,kate3);\n    Future<string> katy2;\n    Future<double> katy3;\n    Future<string> katy = world.taskq.add(TTT::kate,&world,&katy2,&katy3);\n    Future<string> cute = world.taskq.add(right,TTT::kate,&world,string(\"Boo!\"),-42.0);\n    TTT ttt;\n    Future<double> jody = world.taskq.add(ttt,&TTT::jody,1.0,2.0,3.0);\n    Future<double> duh = world.taskq.add(me,dumb,0,1,2,3,4,5,6);\n    print(\"done with making futs\");\n\n    bert_input.set(7);\n    sara1.set(3.0);\n    sara2.set(double_complex(2.1,1.2));\n    kate2.set(string(\"Who's your daddy?\"));\n    kate3.set(3.14);\n    katy2.set(string(\"Your momma\"));\n    katy3.set(6.28);\n\n    vector< Future<int> > futv = future_vector_factory<int>(7);\n    Future<double> hugh = world.taskq.add(ttt,&TTT::hugh,futv);\n    for (int i=0; i<7; ++i) {\n        print(\"assigning\",i,futv[i]);\n        futv[i].set(i);\n    }\n\n    print(\"about to fence again\");\n    world.gop.fence();\n    print(\"finished fence again\");\n\n    MADNESS_CHECK(mary.probe());\n    MADNESS_CHECK(carl.probe());\n    MADNESS_CHECK(dave.probe());\n    MADNESS_CHECK(bert.probe());\n    MADNESS_CHECK(sara.probe());\n    MADNESS_CHECK(kate.probe());\n    MADNESS_CHECK(katy.probe());\n    MADNESS_CHECK(cute.probe());\n    MADNESS_CHECK(jody.probe());\n    MADNESS_CHECK(hugh.probe());\n    MADNESS_CHECK(duh.probe());\n\n    MADNESS_CHECK(mary.get() == 99);\n    MADNESS_CHECK(carl.get() == 88);\n    MADNESS_CHECK(dave.get() == right);\n    MADNESS_CHECK(bert.get() == 8);\n    MADNESS_CHECK(hugh.get() == 21.0);\n    MADNESS_CHECK(duh.get() == 21.0);\n    print(\"Sara says\",sara.get().real(),sara.get().imag());\n    print(\"Kate says\",kate.get());\n    print(\"Katy says\",katy.get());\n    print(\"Cute says\",cute.get());\n    print(\"Jody says\",jody.get());\n\n    if (me == 0) print(\"test5 (tasks and futures) OK\");\n}\n\nclass TestBarrier : public TaskInterface {\n    int count; // does not need to be volatile since barrier includes necessary memory fences\npublic:\n\n    TestBarrier(const madness::TaskAttributes& attr)\n        : TaskInterface(attr)\n        , count(0)\n    {\n        print(\"Testing barrier with nthread\", attr.get_nthread());\n    }\n\n#if defined(__INTEL_COMPILER) || defined(__PGI)\n  using madness::TaskInterface::run;\n#endif\n\n    void run(World& world, const TaskThreadEnv& env) {\n        // Using the barrier each thread takes turns to update\n        // the shared counter.\n\n        env.barrier();\n\n        int nthread = env.nthread();\n        int id = env.id();\n        for (int i=0; i<100; ++i) {\n            for (int p=0; p<nthread; ++p) {\n                env.barrier();\n                if (p == id) count += (p+1);\n            }\n        }\n        env.barrier();\n        if (id == 0)\n            print(\"     result from sum\", count, \"expected\", 100*nthread*(nthread+1)/2);\n    }\n};\n\nclass TimeBarrier : public TaskInterface {\npublic:\n\n    TimeBarrier(const madness::TaskAttributes& attr)\n        : TaskInterface(attr)\n    {\n        print(\"Timing barrier with nthread\", attr.get_nthread());\n    }\n\n#if defined(__INTEL_COMPILER) || defined(__PGI)\n  using madness::TaskInterface::run;\n#endif\n\n    void run(World& world, const TaskThreadEnv& env) {\n        // Barrier a zillion times\n\n\t\tfor (int i=0; i<1000000; ++i) {\n\t        env.barrier();\n\t\t}\n    }\n};\n\n\n// test multithreaded tasks\nvoid test_multi(World& world) {\n    // Test the correctness and performance of the barrier\n    for (unsigned int i=1; i<=ThreadPool::size()+1; ++i) {\n        world.taskq.add(new TestBarrier(TaskAttributes::multi_threaded(i)));\n        double start = cpu_time();\n        world.taskq.add(new TimeBarrier(TaskAttributes::multi_threaded(i)));\n        double used = cpu_time()-start;\n        print(\"barrier took\", used*10.0,\"micro seconds per call\");\n        world.gop.fence();\n    }\n}\n\n\nclass Foo : public WorldObject<Foo> {\n    int a;\n    std::vector<double> dbuf_short_;\n    std::vector<double> dbuf_long_;\npublic:\n    Foo(World& world, int a)\n            : WorldObject<Foo>(world)\n            , a(a) {\n      process_pending();\n      dbuf_short_.reserve((world.nproc() > 1 ? RMI::max_msg_len() : 1024)/sizeof(double)-5);\n      dbuf_long_.reserve((world.nproc() > 1 ? RMI::max_msg_len() : 1024)/sizeof(double)+5);\n\n      // make sure values are integer so equality correctness test is robust with compiler optimization\n      std::generate_n(std::back_inserter(dbuf_short_), dbuf_short_.capacity(), [&world]() { return world.rand(); } );\n      std::generate_n(std::back_inserter(dbuf_long_), dbuf_long_.capacity(), [&world]() { return world.rand(); } );\n    }\n\n    virtual ~Foo() { }\n\n    int get0() {\n        return a;\n    }\n    int get1(int a1) {\n        return a+a1;\n    }\n    int get2(int a1, char a2) {\n        return a+a1+a2;\n    }\n    int get3(int a1, char a2, short a3) {\n        return a+a1+a2+a3;\n    }\n    int get4(int a1, char a2, short a3, long a4) {\n        return a+a1+a2+a3+a4;\n    }\n    int get5(int a1, char a2, short a3, long a4, short a5) {\n        return a+a1+a2+a3+a4+a5;\n    }\n    double getbuf0(const std::vector<double>& buf) {\n        return (double)a + std::accumulate(buf.begin(), buf.end(), 0.0);\n    }\n\n    int get0c() const {\n        return a;\n    }\n    int get1c(int a1) const {\n        return a+a1;\n    }\n    int get2c(int a1, char a2) const {\n        return a+a1+a2;\n    }\n    int get3c(int a1, char a2, short a3) const {\n        return a+a1+a2+a3;\n    }\n    int get4c(int a1, char a2, short a3, long a4) const {\n        return a+a1+a2+a3+a4;\n    }\n    int get5c(int a1, char a2, short a3, long a4, short a5) const {\n        return a+a1+a2+a3+a4+a5;\n    }\n    double getbuf0c(const std::vector<double>& buf) const {\n        return (double)a + std::accumulate(buf.begin(), buf.end(), 0.0);\n    }\n\n    Future<int> get0f() {\n        return Future<int>(a);\n    }\n\n    const std::vector<double>& dbuf_short() const { return dbuf_short_; }\n    const std::vector<double>& dbuf_long() const { return dbuf_long_; }\n    const std::vector<double>& dbuf() const { return dbuf_long(); }\n\n    // ping-pong via AMs\n    void ping_am(int from, int speed) {\n      madness::print(\"got an AM ping from proc \", from, \" speed=\", speed);\n      if (speed < 10)\n        this->send(from, &Foo::pong_am, this->get_world().rank(), speed + 1);\n    }\n    void pong_am(int from, int speed) {\n      madness::print(\"got an AM pong from proc \", from, \" speed=\", speed);\n      if (speed < 10)\n        this->send(from, &Foo::ping_am, this->get_world().rank(), speed + 1);\n    }\n\n    // ping-pong via tasks\n    void ping(int from, int speed) {\n      madness::print(\"got a ping from proc \", from, \" speed=\", speed);\n      if (speed < 10)\n        this->task(from, &Foo::pong, this->get_world().rank(), speed + 1);\n    }\n    void pong(int from, int speed) {\n      madness::print(\"got a pong from proc \", from, \" speed=\", speed);\n      if (speed < 10)\n        this->task(from, &Foo::ping, this->get_world().rank(), speed + 1);\n    }\n\n};\n\nvoid test6(World& world) {\n    PROFILE_FUNC;\n    uniqueidT id;\n    {\n      ProcessID me = world.rank();\n      ProcessID nproc = world.nproc();\n      world.srand(73); // Everyone needs the same seed\n      Foo a(world, me * 100);\n      id = a.id();\n      MADNESS_CHECK(world.ptr_from_id<Foo>(id) && world.ptr_from_id<Foo>(id).value() == &a);\n      MADNESS_CHECK(world.id_from_ptr(&a) && world.id_from_ptr(&a).value() == id);\n      const auto dbuf_sum =\n          std::accumulate(a.dbuf().begin(), a.dbuf().end(), 0.0);\n\n      if (me == 0) {\n        print(a.id());\n        for (ProcessID p = 0; p < nproc; ++p) {\n          MADNESS_CHECK(a.send(p, &Foo::get0).get() == p * 100);\n          MADNESS_CHECK(a.task(p, &Foo::get0).get() == p * 100);\n\n          MADNESS_CHECK(a.send(p, &Foo::get0f).get() == p * 100);\n          MADNESS_CHECK(a.task(p, &Foo::get0f).get() == p * 100);\n\n          MADNESS_CHECK(a.send(p, &Foo::get1, 1).get() == p * 100 + 1);\n          MADNESS_CHECK(a.task(p, &Foo::get1, Future<int>(1)).get() ==\n                        p * 100 + 1);\n\n          MADNESS_CHECK(a.send(p, &Foo::get2, 1, 2).get() == p * 100 + 3);\n          MADNESS_CHECK(a.task(p, &Foo::get2, 1, 2).get() == p * 100 + 3);\n\n          MADNESS_CHECK(a.send(p, &Foo::get3, 1, 2, 3).get() == p * 100 + 6);\n          MADNESS_CHECK(a.task(p, &Foo::get3, 1, 2, 3).get() == p * 100 + 6);\n\n          MADNESS_CHECK(a.send(p, &Foo::get4, 1, 2, 3, 4).get() ==\n                        p * 100 + 10);\n          MADNESS_CHECK(a.task(p, &Foo::get4, 1, 2, 3, 4).get() ==\n                        p * 100 + 10);\n\n          MADNESS_CHECK(a.send(p, &Foo::get5, 1, 2, 3, 4, 5).get() ==\n                        p * 100 + 15);\n          MADNESS_CHECK(a.task(p, &Foo::get5, 1, 2, 3, 4, 5).get() ==\n                        p * 100 + 15);\n\n          MADNESS_CHECK(a.task(p, &Foo::getbuf0, a.dbuf()).get() ==\n                        p * 100 + dbuf_sum);\n\n          MADNESS_CHECK(a.send(p, &Foo::get0c).get() == p * 100);\n          MADNESS_CHECK(a.task(p, &Foo::get0c).get() == p * 100);\n\n          MADNESS_CHECK(a.send(p, &Foo::get1c, 1).get() == p * 100 + 1);\n          MADNESS_CHECK(a.task(p, &Foo::get1c, 1).get() == p * 100 + 1);\n\n          MADNESS_CHECK(a.send(p, &Foo::get2c, 1, 2).get() == p * 100 + 3);\n          MADNESS_CHECK(a.task(p, &Foo::get2c, 1, 2).get() == p * 100 + 3);\n\n          MADNESS_CHECK(a.send(p, &Foo::get3c, 1, 2, 3).get() == p * 100 + 6);\n          MADNESS_CHECK(a.task(p, &Foo::get3c, 1, 2, 3).get() == p * 100 + 6);\n\n          MADNESS_CHECK(a.send(p, &Foo::get4c, 1, 2, 3, 4).get() ==\n                        p * 100 + 10);\n          MADNESS_CHECK(a.task(p, &Foo::get4c, 1, 2, 3, 4).get() ==\n                        p * 100 + 10);\n\n          MADNESS_CHECK(a.send(p, &Foo::get5c, 1, 2, 3, 4, 5).get() ==\n                        p * 100 + 15);\n          MADNESS_CHECK(a.task(p, &Foo::get5c, 1, 2, 3, 4, 5).get() ==\n                        p * 100 + 15);\n\n          MADNESS_CHECK(a.task(p, &Foo::getbuf0c, a.dbuf()).get() ==\n                        p * 100 + dbuf_sum);\n        }\n      } // me == 0\n\n      for (ProcessID p = 0; p != nproc; ++p) {\n        a.send(p, &Foo::ping_am, me, 1);\n        a.task(p, &Foo::ping, me, 1);\n      }\n\n#ifdef MADNESS_WORLDOBJECT_FUTURE_TRACE\n      for (ProcessID p = 0; p != nproc; ++p) {\n        auto f = a.task(p, &Foo::get0);\n        a.trace(f);\n      }\n#endif\n\n      world.gop.fence();\n\n#ifdef MADNESS_WORLDOBJECT_FUTURE_TRACE\n      MADNESS_CHECK(a.trace_status_nfuture_registered() == (a.trace_futures() ? nproc : 0));\n      MADNESS_CHECK(decltype(a)::trace_status_nfuture_assigned(a.id()) ==\n                    (decltype(a)::trace_futures(a.id()) ? nproc : 0));\n#endif\n\n      // stress the large message protocol ... off by default\n      if (0) {\n        const auto dbuf_sum_long =\n            std::accumulate(a.dbuf_long().begin(), a.dbuf_long().end(), 0.0);\n        const auto dbuf_sum_short =\n            std::accumulate(a.dbuf_short().begin(), a.dbuf_short().end(), 0.0);\n#if 0 // uncomment to STRESS the large msg protocol\n      const size_t nmsg = 128;\n#else\n        const size_t nmsg = 1;\n#endif\n        std::vector<Future<double>> results;\n        std::vector<double> results_ref;\n        for (size_t m = 0; m != nmsg; ++m) {\n          for (ProcessID p = 0; p < nproc; ++p) {\n            results.push_back(a.task(p, &Foo::getbuf0c, a.dbuf_long()));\n            results_ref.push_back(p * 100 + dbuf_sum_long);\n            results.push_back(a.task(p, &Foo::getbuf0c, a.dbuf_short()));\n            results_ref.push_back(p * 100 + dbuf_sum_short);\n          }\n        }\n        world.gop.fence();\n        for (size_t r = 0; r != results.size(); r += 2) {\n          MADNESS_CHECK(results[r].get() == results_ref[r]);\n        }\n      }\n    }\n\n    // test that the object is gone\n    auto ptr_opt = world.ptr_from_id<Foo>(id);\n#ifndef NDEBUG\n    MADNESS_CHECK(ptr_opt && *ptr_opt == nullptr);\n#else\n    MADNESS_CHECK(!ptr_opt);\n#endif\n\n    print(\"test 6 (world object active message and tasks) seems to be working\");\n}\n\n\nclass TestFutureForwarding : public WorldObject<TestFutureForwarding> {\npublic:\n    TestFutureForwarding(World& world)\n            : WorldObject<TestFutureForwarding>(world) {\n        this->process_pending();\n    }\n\n    virtual ~TestFutureForwarding() { }\n\n    Future<int> test(int state) {\n        if (state < 99) {\n            return send(get_world().random_proc(), &TestFutureForwarding::test, state+1);\n        }\n        else {\n            return Future<int>(state+1);\n        }\n    }\n};\n\nvoid test6a(World& world) {\n    PROFILE_FUNC;\n\n    if (world.size() < 2) return;\n\n    TestFutureForwarding t(world);\n    if (world.rank() == 0) {\n        Future<int> fred = t.test(0);\n        world.gop.fence();\n        MADNESS_CHECK(fred.get() == 100);\n    }\n    else {\n        world.gop.fence();\n    }\n    if (world.rank() == 0) {\n        print(\"If got here test6a is OK!\");\n    }\n}\n\n\nvoid test7(World& world) {\n    PROFILE_FUNC;\n    int nproc = world.size();\n    ProcessID me = world.rank();\n    WorldContainer<int,double> c(world);\n\n    typedef WorldContainer<int,double>::iterator iterator;\n    typedef WorldContainer<int,double>::const_iterator const_iterator;\n    typedef WorldContainer<int,double>::futureT futureT;\n\n    // Everyone inserts distinct values 0..1000 into the container,\n    // fences, and then tries to read all values back\n\n    // Note that insertion with key or accessor should be safe\n    for (int i=me; i<1000; i+=nproc) c.replace(i,(double) i);\n    world.gop.fence();\n\n    for (int i=999; i>=0; --i) {\n        futureT fut = c.find(i);\n        iterator it = fut.get();\n        MADNESS_CHECK(it != c.end());\n        double j = it->second;\n        MADNESS_CHECK(j == i);\n    }\n    world.gop.fence();\n\n    // Check that unset keys return end correctly\n    for (int i=10001; i<10020; ++i) {\n        MADNESS_CHECK(c.find(i).get() == c.end());\n    }\n\n    // Check that other iterators compare correctly\n    MADNESS_CHECK(c.find(10).get() == c.find(10).get());\n    MADNESS_CHECK(c.find(11).get() != c.find(12).get());\n    MADNESS_CHECK(c.end() == c.end());\n    MADNESS_CHECK(c.find(12).get() != c.end());\n\n    // Loop thru local stuff\n    for (iterator it=c.begin(); it != c.end(); ++it) {\n        MADNESS_CHECK(it->first == it->second);\n    };\n\n    // Check shallow copy and const iterator\n    const WorldContainer<int,double> d(c);\n\n    // Loop thru local stuff with a const iterator\n    for (const_iterator it=d.begin(); it != d.end(); ++it) {\n        MADNESS_CHECK(it->first == it->second);\n    };\n\n    world.gop.fence();\n    if (me == 0) print(\"test7 (world container basics) OK\");\n}\n\nvoid test8(World& world) {\n    PROFILE_FUNC;\n    vector<unsigned char> v;\n    archive::VectorOutputArchive arout(v);\n    arout & &world;\n\n    World* p = nullptr;\n    archive::VectorInputArchive arin(v);\n    arin & p;\n    MADNESS_CHECK(p==&world);\n    if (world.rank() == 0) print(\"test8 (serializing world pointer) OK\");\n}\n\nvoid null_func() { }\n\nint val_func() {\n    return 1;\n}\n\nint val1d_func(int input) {\n    return input+1;\n}\n\nvoid test9(World& world) {\n    PROFILE_FUNC;\n    const int ntask = 100000;\n\n    double used = -cpu_time();\n    for (int i=0; i<ntask; ++i) world.taskq.add(null_func);\n    used += cpu_time();\n    print(\"Time to add\",ntask,\"null, local tasks\",used,\"time/task\",used/ntask);\n\n    used = -cpu_time();\n    world.taskq.fence();\n    used += cpu_time();\n    print(\"Time to run\",ntask,\"null, local tasks\",used,\"time/task\",used/ntask);\n\n    vector< Future<int> > v = future_vector_factory<int>(ntask);\n    used = -cpu_time();\n    for (int i=0; i<ntask; ++i) v[i] = world.taskq.add(val_func);\n    used += cpu_time();\n    print(\"Time to add\",ntask,\"value, local tasks\",used,\"time/task\",used/ntask);\n\n    used = -cpu_time();\n    print(\"AAAAAAAAAAAAAAAA0\");\n    std::cout.flush();\n    world.taskq.fence();\n    print(\"AAAAAAAAAAAAAAAA1\");\n    std::cout.flush();\n    used += cpu_time();\n    print(\"Time to run\",ntask,\"value, local tasks\",used,\"time/task\",used/ntask);\n    v.clear();\n    print(\"AAAAAAAAAAAAAAAA\");\n    std::cout.flush();\n    Future<int> input;\n    Future<int> result = input;\n    used = -cpu_time();\n    print(\"AAAAAAAAAAAAAAAA2\");\n    std::cout.flush();\n    for (int i=0; i<ntask; ++i) {\n        result = world.taskq.add(val1d_func,result);\n    }\n    used += cpu_time();\n    print(\"AAAAAAAAAAAAAAAA3\");\n    std::cout.flush();\n    print(\"Time to make\",ntask,\"chain of tasks\",used,\"time/task\",used/ntask);\n    input.set(0);\n    used = -cpu_time();\n    print(\"AAAAAAAAAAAAAAAA4\");\n    std::cout.flush();\n    world.taskq.fence();\n    print(\"AAAAAAAAAAAAAAAA5\");\n    std::cout.flush();\n    used += cpu_time();\n    print(\"Time to  run\",ntask,\"chain of tasks\",used,\"time/task\",used/ntask);\n    MADNESS_CHECK(result.get() == ntask);\n    if (world.rank() == 0) print(\"test9 (time task creation and processing) OK\");\n}\n\n\nclass Mary {\nprivate:\n    mutable uint64_t val;\npublic:\n    Mary() : val(0) {}\n\n    void inc() const {\n        val++;\n    }\n    void add(int i) {\n        val += i;\n    }\n    void fred(int i, double j) {\n        val += i*(int)j;\n    };\n\n    string cary0() {\n        return string(\"Cary0 sends greetings\");\n    };\n\n    string cary(int i) {\n        ostringstream s;\n        val += i;\n        s << \"Cary sends greetings: \" << i << \" \" << val << endl;\n        return s.str();\n    };\n\n    string alan(int i, int j, int proc) {\n        ostringstream s;\n        val += i*j;\n        s << \"Alan sends greetings: \" << i << \" \" << j << \" \" << val << endl;\n        return s.str();\n    };\n\n    double galahad(const string& str, int j, double z) {\n        istringstream s(str);\n        int i;\n        s >> i;\n        //val += i*j*z;\n        print(\"Galahad\",str,i,j,z,val);\n        return val;\n    };\n\n\n    uint64_t get() const {\n        return val;\n    };\n\n    bool get_me_twice(World* world, const WorldContainer<int,Mary>& d) {\n        return true;\n    };\n\n    template <typename Archive>\n    void serialize(const Archive& ar) {\n        ar & val;\n    }\n};\n\nvoid pounder(const WorldContainer<int,Mary>& m, int ind) {\n    for (int i=0; i<1000/m.get_world().size()+10; ++i) \n        m.send(ind, &Mary::inc);\n    print(\"pounder task finished sending\");\n}\n\nvoid test10(World& world) {\n    PROFILE_FUNC;\n    // test forwarding methods to an item\n    ProcessID me = world.rank();\n    int nproc = world.size();\n    WorldContainer<int,Mary> m(world);\n    typedef WorldContainer<int,Mary>::iterator iterator;\n    //world.gop.fence();\n\n    for (int i=0; i<nproc; ++i)\n        m.send(i,&Mary::inc);\n    world.gop.fence();\n\n    for (iterator it=m.begin(); it!=m.end(); ++it) {\n        print(\"mary\",it->first,it->second.get());\n        MADNESS_CHECK(int(it->second.get()) == nproc);\n    }\n    world.gop.fence();\n\n    for (int i=0; i<nproc; ++i)\n        m.send(i,&Mary::add,me);\n    world.gop.fence();\n\n    for (iterator it=m.begin(); it!=m.end(); ++it) {\n        print(\"mary\",it->first,it->second.get());\n        MADNESS_CHECK(long(it->second.get()) == nproc*(nproc+1)/2);\n    }\n    world.gop.fence();\n\n    for (int i=0; i<nproc; ++i)\n        m.send(i,&Mary::fred,2,me);\n    world.gop.fence();\n\n    for (iterator it=m.begin(); it!=m.end(); ++it) {\n        print(\"mary\",it->first,it->second.get());\n        MADNESS_CHECK(long(it->second.get()) == nproc*(3*nproc-1)/2);\n    }\n    world.gop.fence();\n    print(\"finished forwarding test, starting pounder\");\n\n    // Test that item methods are executed atomically by having\n    // everyone pound on one item\n\n    const int ind = 9999999;\n    if (world.rank() == 0) m.replace(std::pair<int,Mary>(ind,Mary()));\n    world.gop.fence();\n    world.taskq.add(pounder, m, ind);\n    world.taskq.add(pounder, m, ind);\n    world.taskq.add(pounder, m, ind);\n    world.taskq.add(pounder, m, ind);\n    world.taskq.add(pounder, m, ind);\n    world.taskq.add(pounder, m, ind);\n    world.taskq.add(pounder, m, ind);\n    print(\"pounding tasks submitted\");\n    world.gop.fence();\n    print(\"finished pounding\");\n    if (world.rank() == 0)\n      MADNESS_CHECK(long(m.find(ind).get()->second.get()) == nproc * (1000/world.size()+10) * 7);\n\n    world.gop.fence();\n\n    Future<double>  galahad = m.task(ProcessID(0),&Mary::galahad,string(\"1\"),me,3.14);\n    world.gop.fence();\n    print(\"result of galahad\",galahad.get());\n\n    print(\"main making vector of results\");\n    //vector< Future<string> > results(nproc,Future<string>::default_initializer());\n    vector< Future<string> > results = future_vector_factory<string>(nproc);\n    vector< Future<bool> > b = future_vector_factory<bool>(nproc);\n    print(\"main finished making vector of results\");\n    for (int i=0; i<nproc; ++i) {\n        print(\"main making task\",i);\n        results[i] = m.task(i,&Mary::alan,3,4,world.rank());\n        b[i] = m.send(i,&Mary::get_me_twice,&world,m);\n        print(\"main finished making task\",i);\n    }\n    print(\"about to fence\");\n    world.gop.fence();\n\n    for (int i=0; i<nproc; ++i) {\n        MADNESS_CHECK(results[i].probe());\n        MADNESS_CHECK(b[i].probe());\n        print(\"results\",i,results[i].get(),b[i].get());\n    };\n\n    world.gop.fence();\n\n    if (me == 0) print(\"test10 (messaging to world container items) OK\");\n}\n\n\nstruct Key {\n    typedef unsigned long ulong;\n    ulong n, i, j, k;\n    hashT hashval;\n\n    Key() {};  // Empty default constructor for speed - but is therefore junk\n\n    Key(ulong n, ulong i, ulong j, ulong k)\n            : n(n), i(i), j(j), k(k), hashval(0)\n    {\n        madness::hash_combine(hashval, n);\n        madness::hash_combine(hashval, i);\n        madness::hash_combine(hashval, j);\n        madness::hash_combine(hashval, k);\n    }\n\n    hashT hash() const {\n        return hashval;\n    }\n\n    template <typename opT>\n    void foreach_child(const opT& op) const {\n        ulong n2 = n+1;\n        ulong i2 = i<<1;\n        ulong j2 = j<<1;\n        ulong k2 = k<<1;\n        for (int p=0; p<2; ++p)\n            for (int q=0; q<2; ++q)\n                for (int r=0; r<2; ++r)\n                    op(Key(n2,i2+p,j2+q,k2+r));\n    }\n\n    template <typename Archive>\n    void serialize(const Archive& ar) {\n        ar & n & i & j & k & hashval;\n    }\n\n    bool operator==(const Key& b) const {\n        // It's extremely probable that different keys will have a different hash\n        return hashval==b.hashval && n==b.n && i==b.i && j==b.j && k==b.k;\n    }\n};\n\n\nostream& operator<<(ostream& s, const Key& key) {\n    s << \"Key(\" << key.n << \",\" << key.i << \",\" << key.j << \",\" << key.k << \",\" << key.hash() << \")\";\n    return s;\n}\n\nstruct Node {\n    typedef WorldContainer<Key,Node> dcT;\n    Key key;\n    double value;\n    bool isleaf;\n    Node() : value(0.0), isleaf(true) {};\n    Node(double value) : value(value), isleaf(true) {};\n    Node(const Node& node) : key(node.key), value(node.value), isleaf(node.isleaf) {};\n\n    struct do_random_insert {\n        dcT& d;\n        double value;\n        do_random_insert(dcT& d, double value)\n                : d(d), value(value) {}\n        void operator()(const Key& key) const {\n            d.task(key,&Node::random_insert,d, key, value);\n        }\n    };\n\n    void random_insert(const dcT& constd, const Key& keyin, double valin) {\n        dcT& d = const_cast<dcT&>(constd);\n        MADNESS_CHECK(valin<=1.0);\n        //print(\"inserting\",keyin,valin);\n        key = keyin;\n        value = valin;\n        isleaf = true;\n        if (value>0.25 && key.n<9 && d.size()<4000) {\n            isleaf = false;\n            World& world = d.get_world();\n            double ran = world.drand();\n            MADNESS_CHECK(ran>=0 && ran<1.0);\n            key.foreach_child(do_random_insert(d,value*ran));\n        }\n    }\n\n    template <class Archive>\n    void serialize(Archive& ar) {\n        ar & key & value & isleaf;\n    }\n\n    bool is_leaf() const {\n        return isleaf;\n    }\n\n    double get() const {\n        return value;\n    }\n\n    void set(double v) {\n        value = v;\n    }\n};\n\nostream& operator<<(ostream& s, const Node& node) {\n    s << \"Node(\" << node.get() << \",\" << node.is_leaf() << \")\" << endl;\n    return s;\n}\n\n\nvoid walker1(WorldContainer<Key,Node>& d, const Key& key);\n\nstruct Walker1 {\n    WorldContainer<Key,Node>& d;\n    Walker1(WorldContainer<Key,Node>& d) : d(d) {};\n    void operator()(const Key& key) const {\n        walker1(d,key);\n    };\n};\n\n\nvoid walker1(WorldContainer<Key,Node>& d, const Key& key) {\n    static double counter = 0;\n    WorldContainer<Key,Node>::iterator it = d.find(key).get();\n    if (it != d.end()) {\n        Node node = it->second;\n        node.set(++counter);\n        d.erase(key);\n        d.replace(key,node);\n        it = d.find(key).get();\n        MADNESS_CHECK(it != d.end());\n        MADNESS_CHECK(it->second.get() == counter);\n        if (!node.is_leaf()) {\n            key.foreach_child(Walker1(d));\n        }\n    }\n}\n\nvoid walker2(WorldContainer<Key,Node>& d, const Key& key) {\n    static double counter = 1;\n    WorldContainer<Key,Node>::iterator it = d.find(key).get();\n    if (it != d.end()) {\n        Node node = it->second;\n        node.set(++counter);\n        d.replace(key,node);\n        it = d.find(key).get();\n        MADNESS_CHECK(it != d.end());\n        if (it->second.get() != counter) {\n            print(\"failing\",it->second.get(),counter,key,d.owner(key));\n        }\n        MADNESS_CHECK(it->second.get() == counter);\n        if (!node.is_leaf()) {\n            key.foreach_child(Walker1(d));\n        }\n    }\n}\n\nvoid test11(World& world) {\n    PROFILE_FUNC;\n    // Test the various flavours of erase\n    ProcessID me = world.rank();\n    WorldContainer<Key,Node> d(world);\n\n    // First build an oct-tree with random depth\n    world.srand(); // Each process will have a different random number\n    print(\"first ran#\",world.drand());\n    world.gop.fence();\n    if (me == 0) {\n        Key root = Key(0,0,0,0);\n        d.task(root,&Node::random_insert,d,root,1.0);\n    }\n    world.gop.fence();\n\n    print(\"size before erasing\",d.size());\n    //d.clear();\n    d.erase(d.begin(),d.end());\n    print(\"size after erasing\",d.size());\n    world.srand(); // Each process will have a different random number\n    print(\"first ran#\",world.drand());\n    world.gop.fence();\n    // rebuild the tree in the same container\n    if (me == 0) {\n        Key root = Key(0,0,0,0);\n        d.task(root,&Node::random_insert,d,root,1.0);\n    }\n    world.gop.fence();\n    print(\"size after rebuilding\",d.size());\n\n    // Test get, erase, and re-insert of nodes with new value by node 0\n    if (me == 0) {\n        Key root = Key(0,0,0,0);\n        walker1(d,root);\n    }\n    world.gop.fence();\n    print(\"walker1 done\");\n\n\n    // Test get and re-insert of nodes with new value by node 0\n    if (me == 0) {\n        Key root = Key(0,0,0,0);\n        walker2(d,root);\n    }\n    world.gop.fence();\n    print(\"walker2 done\");\n\n    print(\"size before clearing\",d.size());\n    d.clear();\n    print(\"size after clearing\",d.size());\n    if (me == 0) print(\"test11 (erasing and inserting in world containers) OK\");\n}\n\n\nvoid test12(World& world) {\n    PROFILE_FUNC;\n    if (world.size() != 1) return;\n    // Test file IO\n    ProcessID me = world.rank();\n    WorldContainer<int,double> d(world);\n\n    // Everyone puts 100 distinct entries in the container\n    for (int i=0; i<100; ++i) d.replace(me*100 + i, me*100+i);\n\n    world.gop.fence();\n\n    archive::BinaryFstreamOutputArchive out(\"testme.ar\");\n    out & d;\n    out.close();\n\n    world.gop.fence();\n\n    archive::BinaryFstreamInputArchive in(\"testme.ar\");\n    WorldContainer<int,double> c(world);\n    in & c;\n\n    world.gop.fence();\n\n    for (int i=0; i<100; ++i) {\n        int key = me*100+i;\n        MADNESS_CHECK(c.probe(key));\n        MADNESS_CHECK(c.find(key).get()->second == key);\n    }\n\n    world.gop.fence();\n\n    if (world.rank() == 0) print(\"test12 (container archive I/O) OK\");\n}\n\nvoid test13(World& world) {\n    PROFILE_FUNC;\n    // Basic functionality with 1 (default) writer\n    archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> fout(world, \"fred\");\n    fout & 1.0 & \"hello\";\n    fout.close();\n\n    double v=0.0;\n    char s[6];\n    archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> fin(world, \"fred\");\n    fin & v & s;\n    fin.close();\n    fin.remove();\n\n    print(\"This is what I read\", v, s);\n    world.gop.fence();\n\n\n    // Store and load an archive with multiple writers\n\n    int nio = (world.size()-1)/2 + 1;\n    if (nio > 10) nio = 10;\n\n    print(\"nio\",nio);\n\n    ProcessID me = world.rank();\n    WorldContainer<int,double> d(world);\n    // Everyone puts 100 distinct entries in the container\n    for (int i=0; i<100; ++i) {\n        int key = me*100+i;\n        d.replace(key, double(key));\n    }\n\n    world.gop.fence();\n\n    fout.open(world,\"fred\",nio);\n    fout & d;\n    fout.close();\n\n    WorldContainer<int,double> c(world);\n    fin.open(world,\"fred\");\n    fin & c;\n\n    for (int i=0; i<100; ++i) {\n        int key = me*100+i;\n        MADNESS_CHECK(c.find(key).get()->second == key);\n    }\n\n    fin.close();\n    archive::ParallelOutputArchive<>::remove(world, \"fred\");\n\n    print(\"Test13 OK\");\n    world.gop.fence();\n}\n\nvoid test14(World& world) {\n\n  if (world.size() > 1) {\n    static size_t call_counter = 0;\n    ++call_counter;\n\n    const auto n = 1 + std::numeric_limits<int>::max()/sizeof(int);\n    //const auto n = 1000000;\n\n    auto iarray = std::make_unique<int[]>(n);\n    iarray[0] = -1;\n    iarray[n-1] = -1;\n\n    world.gop.set_max_reducebcast_msg_size(std::numeric_limits<int>::max()/(std::min(10ul,call_counter)));\n    world.gop.broadcast(iarray.get(), n, 0);\n\n    if (world.rank() == 1) {\n      MADNESS_CHECK(iarray[0] == -1);\n      MADNESS_CHECK(iarray[n-1] == -1);\n    }\n\n    print(\"Test14 OK\");\n  }\n  world.gop.fence();\n}\n\nvoid test15(World& world) {\n\n  if (world.size() > 1) {\n    //const auto n = 1 + std::numeric_limits<int>::max()/sizeof(int);\n    const auto n = 1000000;\n    auto iarray = std::make_unique<int[]>(n);\n\n    if (world.rank() == 1)\n      std::iota(iarray.get(), iarray.get()+n, 0);\n    else\n      std::fill(iarray.get(), iarray.get()+n, 0);\n\n    world.gop.max(iarray.get(), n);\n\n    if (world.rank() == 1) {\n      MADNESS_CHECK(iarray[0] == 0);\n      MADNESS_CHECK(iarray[n-1] == n-1);\n    }\n\n    print(\"Test15 OK\");\n  }\n  world.gop.fence();\n}\n\ninline bool is_odd(int i) {\n    return i & 0x1;\n}\n\ninline bool is_even(int i) {\n    return !is_odd(i);\n}\n\nvoid work_odd(World& world) {\n    test5(world);\n    test6(world);\n    test6a(world);\n    test7(world);\n    test8(world);\n    test9(world);\n    test10(world);\n    //test11(world);\n    // test12(world); cannot run due to filename collision\n    // test13(world);\n    test14(world);\n    test15(world);\n    world.gop.fence();\n}\n\nvoid work_even(World& world) {\n    test5(world);\n    test6(world);\n    test6a(world);\n    test7(world);\n    test8(world);\n    test9(world);\n    test10(world);\n    //test11(world);\n    // test12(world); cannot run due to filename collision\n    // test13(world);\n    test14(world);\n    test15(world);\n    world.gop.fence();\n}\n\nvoid test_multi_world(World& world) {\n    if (world.size() < 2) return;\n\n    // Make two more worlds: odd processes, even processes\n\n    // a) make list of ranks of processes in the subgroups\n    //\n    // Only process belonging to the subgroups participate\n    // in the next steps (this does not mean that some processes\n    // can be left out here! Intracomm::Create() only works\n    // if all processes are engaged (blame MPI_Comm_create))\n    //\n    // b) make MPI group and hence new MPI sub-communcator\n    //\n    // c) make new worlds and do work\n\n    std::cout << \"\\n\\nREPEATING TESTS IN MULTI-WORLD\\n\\n\" << std::endl;\n\n    std::cout << \"== multiple worlds created with Intracomm::Create()==\" << std::endl;\n    std::vector<int> odd, even;\n    for (int i=0; i<world.size(); ++i) {\n        if (is_odd(i))\n            odd.push_back(i);\n        else\n            even.push_back(i);\n    }\n\n    const int color = world.rank() % 2;\n\n    if (color) {   // Odd processes\n      SafeMPI::Group g_odd = world.mpi.comm().Get_group().Incl(odd.size(), &odd[0]);\n      SafeMPI::Intracomm comm_odd = world.mpi.comm().Create(g_odd);\n      {\n        World world_odd(comm_odd);\n        work_odd(world_odd);\n      }\n    }\n    else {                      // Even processes\n      SafeMPI::Group g_even = world.mpi.comm().Get_group().Incl(even.size(),&even[0]);\n      SafeMPI::Intracomm comm_even = world.mpi.comm().Create(g_even);\n      {\n        World world_even(comm_even);\n        work_even(world_even);\n      }\n    }\n    world.gop.fence();\n\n    // try to do the same but use MPI_Comm_split\n    {\n      std::cout << \"== multiple worlds created with Intracomm::Split()==\" << std::endl;\n      SafeMPI::Intracomm comm = world.mpi.comm().Split(color, world.rank());\n      std::cout << \"split_comm.size() = \" << comm.Get_size() << std::endl;\n      World subworld(comm);\n      if (color == 1)\n        work_odd(subworld);\n      else\n        work_even(subworld);\n    }\n    world.gop.fence();\n\n    // now split world by host and run tasks on each host's world\n    {\n      std::cout << \"== multiple worlds created with Intracomm::Split_type()==\" << std::endl;\n      SafeMPI::Intracomm comm = world.mpi.comm().Split_type(SafeMPI::Intracomm::SHARED_SPLIT_TYPE, world.rank());\n      std::cout << \"split_comm.size() = \" << comm.Get_size() << std::endl;\n      World subworld(comm);\n      work_even(subworld);\n    }\n    world.gop.fence();\n\n}\n\n#ifdef HAVE_PARSEC\n# ifdef PARSEC_HAVE_CUDA\n\nextern void __cuda_hello_world(); // in hello_world.cu\nclass GPUHelloWorldTask : public TaskInterface {\npublic:\n    void run(World& world) {\n      __cuda_hello_world();\n    }\n};\n\nvoid test_cuda0(World& world) {\n  world.taskq.add(new GPUHelloWorldTask());\n}\n# endif\n#endif\n\n#if  MADNESS_CATCH_SIGNALS\nvoid mad_signal_handler( int signum ) {\n  // announce the signal\n  std::cerr << \"MADNESS caught signal \" << signum << \" will wait for you to attach a debugger\" << std::endl;\n\n  bool DebugWait = true;\n  while (DebugWait) {\n  }\n}\n#endif\n\nint main(int argc, char** argv) {\n\n#if  MADNESS_CATCH_SIGNALS\n    signal(SIGSEGV, mad_signal_handler);\n#endif\n    World& world = initialize(argc,argv);\n\n    // redirectio(world);\n    print(\"The processor frequency is\",cpu_frequency());\n    print(\"There are\",world.size(),\"processes and I am process\",world.rank(),\"with\",ThreadPool::size(),\"threads\");\n\n    world.args(argc,argv);\n\n    world.gop.fence();\n    test_multi_world(world);\n\n    try {\n        PROFILE_BLOCK(main_program);\n\n        test0(world);\n        test5(world);\n        test6(world);\n        test6a(world);\n        test7(world);\n        test8(world);\n        test9(world);\n        test10(world);\n        //test11(world);\n        test12(world);\n        test13(world);\n        test14(world);\n        test15(world);\n\n        for (int i=0; i<10; ++i) {\n          print(\"REPETITION\",i);\n          test_multi_world(world);\n        }\n\n#ifdef PARSEC_HAVE_CUDA\n        test_cuda0(world);\n#endif\n    }\n    catch (const SafeMPI::Exception& e) {\n        print(e);\n        error(\"caught an MPI exception\");\n    }\n    catch (const madness::MadnessException& e) {\n        print(e);\n        error(\"caught a MADNESS exception\");\n    }\n    catch (const char* s) {\n        print(s);\n        error(\"caught a string exception\");\n    }\n    catch (...) {\n        error(\"caught unhandled exception\");\n    }\n\n    print(\"entering final fence\");\n    world.gop.fence();\n    print(\"done with final fence\");\n\n    //print_stats(world);\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_worldprofile.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/MADworld.h>\n\nusing namespace madness;\n\n\nvoid dave(int i) {\n    PROFILE_FUNC;\n    if (i&1) {\n        PROFILE_BLOCK(mary);\n    }\n    if (i&3) {\n        PROFILE_BLOCK(calvin);\n    }\n}\n\nvoid fred(int i) {\n    PROFILE_FUNC;\n    dave(i);\n}\n\nvoid realmain(int argc, char** argv)\n{\n    World world(SafeMPI::COMM_WORLD);\n    for (int i=0; i<1000; ++i)\n        fred(i);\n\n    WorldProfile::print(world);\n\n    world.gop.fence();\n}\n\nint main(int argc, char** argv) {\n    initialize(argc,argv);\n\n    //This programming style guarantees that\n    //the world instance is destroyed before\n    //MPI_Finalize().\n    //It is necessary if the destructor of the\n    //class World also takes care of MPI status.\n    realmain(argc, argv);\n\n    finalize();\n    return 0;\n}\n"
  },
  {
    "path": "src/madness/world/test_worldptr.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/madness_config.h>\n\n#ifdef MADNESS_HAS_GOOGLE_TEST\n\n#define MADNESS_DISPLAY_EXCEPTION_BREAK_MESSAGE 0\n#include <madness/world/worldptr.h>\n#include <madness/world/MADworld.h>\n#include <madness/world/world_object.h>\n#include <madness/world/buffer_archive.h>\n\n#include <gtest/gtest.h>\n\nmadness::World* pworld;\n\nusing madness::detail::WorldPtr;\n\nnamespace {\n    class WorldPtrTest : public ::testing::Test {\n    public:\n        WorldPtrTest() : p(*pworld, i.get()), p0() {\n            // You can do set-up work for each test here.\n        }\n\n        virtual ~WorldPtrTest() {\n            // You can do clean-up work that doesn't throw exceptions here.\n        }\n\n        // If the constructor and destructor are not enough for setting up\n        // and cleaning up each test, you can define the following methods:\n        virtual void SetUp() {\n            // Code here will be called immediately after the constructor (right\n            // before each test).\n        }\n\n        virtual void TearDown() {\n            // Code here will be called immediately after each test (right\n            // before the destructor).\n        }\n\n        // Objects declared here can be used by all tests in the test case for World.\n        static const std::shared_ptr<int> i;\n        WorldPtr<int> p;\n        WorldPtr<int> p0;\n\n        class Object {\n        public:\n            int i;\n        };\n\n        template <typename T>\n        class XferPtr : public madness::WorldObject<XferPtr<T> > {\n            void set_ptr(const WorldPtr<T>& p, const madness::uniqueidT & id, bool away) {\n                if(away)\n                    remote_ptr.set(p);\n                else\n                    return_ptr.set(p);\n            }\n        public:\n            madness::Future<WorldPtr<T> > remote_ptr;\n            madness::Future<WorldPtr<T> > return_ptr;\n\n            explicit XferPtr(madness::World& w) :\n                    madness::WorldObject<XferPtr<T> >(w)\n            {\n                madness::WorldObject<XferPtr<T> >::process_pending();\n            }\n\n            void xfer(const ProcessID dest, const WorldPtr<T>& p, bool away) const {\n                madness::WorldObject<XferPtr<T> >::send(dest, & XferPtr<T>::set_ptr,\n                        p, madness::WorldObject<XferPtr<T> >::id(), away);\n            }\n        };\n    };\n\n    const std::shared_ptr<int> WorldPtrTest::i(new int(1));\n\n    TEST_F(WorldPtrTest, DefaultConstructor) {\n        // Check for correct initialization\n        EXPECT_EQ(p0.owner(), -1);\n        EXPECT_EQ(p0.get_worldid(), std::numeric_limits<unsigned long>::max());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(p0.get(), madness::MadnessException);\n        EXPECT_THROW(p0.get_world(), madness::MadnessException);\n#endif\n        EXPECT_FALSE(p0);\n        EXPECT_TRUE(! p0);\n        EXPECT_FALSE(p0.has_owner());\n        EXPECT_FALSE(p0.is_local());\n\n    }\n\n    TEST_F(WorldPtrTest, PrimaryConstructor) {\n        // Check for correct initialization\n        EXPECT_EQ(p.get(), i.get());\n        EXPECT_EQ(p.owner(), pworld->rank());\n        EXPECT_EQ(p.get_worldid(), pworld->id());\n        EXPECT_EQ(&(p.get_world()), pworld);\n        EXPECT_TRUE(p);\n        EXPECT_FALSE(! p);\n        EXPECT_TRUE(p.has_owner());\n        EXPECT_TRUE(p.is_local());\n    }\n\n    TEST_F(WorldPtrTest, CopyConstructor) {\n        WorldPtr<int> c(p);\n\n        // Check for correct initialization\n        EXPECT_EQ(c.get(), p.get());\n        EXPECT_EQ(c.owner(), p.owner());\n        EXPECT_EQ(c.get_worldid(), pworld->id());\n        EXPECT_EQ(&(c.get_world()), pworld);\n        EXPECT_TRUE(c);\n        EXPECT_FALSE(! c);\n        EXPECT_TRUE(c.has_owner());\n        EXPECT_TRUE(c.is_local());\n    }\n\n    TEST_F(WorldPtrTest, CopyConversionConstructor) {\n        WorldPtr<const int> c(p);\n\n        // Check for correct initialization\n        EXPECT_EQ(c.get(), p.get());\n        EXPECT_EQ(c.owner(), p.owner());\n        EXPECT_EQ(c.get_worldid(), pworld->id());\n        EXPECT_EQ(&(c.get_world()), pworld);\n        EXPECT_TRUE(c);\n        EXPECT_FALSE(! c);\n        EXPECT_TRUE(c.has_owner());\n        EXPECT_TRUE(c.is_local());\n    }\n\n    TEST_F(WorldPtrTest, Assignment) {\n        WorldPtr<int> c;\n\n        c = p;\n\n        // Check for correct initialization\n        EXPECT_EQ(c.get(), p.get());\n        EXPECT_EQ(c.owner(), p.owner());\n        EXPECT_EQ(c.get_world().id(), p.get_world().id());\n    }\n\n    TEST_F(WorldPtrTest, ConversionAssignment) {\n        WorldPtr<const int> c;\n\n        c = p;\n\n        // Check for correct initialization\n        EXPECT_EQ(c.get(), p.get());\n        EXPECT_EQ(c.owner(), p.owner());\n        EXPECT_EQ(c.get_world().id(), p.get_world().id());\n    }\n\n    TEST_F(WorldPtrTest, PointerAccess) {\n\n        Object obj;\n        obj.i = 1;\n        WorldPtr<Object> p(*pworld, &obj);\n\n        // check for correct pointer and member access\n        EXPECT_EQ(p.get(), &obj);\n        EXPECT_EQ((*p).i, obj.i);\n        EXPECT_EQ(&(*p), &obj);\n        EXPECT_EQ(p->i, obj.i);\n    }\n\n    TEST_F(WorldPtrTest, LocalOwnership) {\n        // Check type conversion to bool\n        EXPECT_TRUE(p.has_owner());\n        EXPECT_FALSE(p0.has_owner());\n\n        EXPECT_TRUE(p.is_local());\n        EXPECT_FALSE(p0.is_local());\n\n        EXPECT_EQ(p.owner(), pworld->rank());\n        EXPECT_EQ(p0.owner(), -1);\n    }\n\n    TEST_F(WorldPtrTest, WorldAccess) {\n        // Check access to world\n        EXPECT_EQ(&(p.get_world()), pworld);\n\n        // Check for assertion\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(p0.get_world(), madness::MadnessException);\n#endif\n\n        // Check for correct world id\n        EXPECT_EQ(p0.get_worldid(), std::numeric_limits<unsigned long>::max());\n        EXPECT_EQ(p.get_worldid(), pworld->id());\n    }\n\n    TEST_F(WorldPtrTest, BooleanOperations) {\n\n        WorldPtr<int> c(p);\n        WorldPtr<int> c0(p0);\n\n        // Check type conversion to bool\n        bool bp = p;\n        bool bp0 = p0;\n        EXPECT_TRUE(bp);\n        EXPECT_FALSE(bp0);\n\n        bool bnp = ! p;\n        bool bnp0 = ! p0;\n        EXPECT_FALSE(bnp);\n        EXPECT_TRUE(bnp0);\n\n        // Check equality operator\n        EXPECT_FALSE(p == p0);\n        EXPECT_FALSE(p0 == p);\n\n        EXPECT_TRUE(p == c);\n        EXPECT_TRUE(p0 == c0);\n\n        // Check inequality operator\n        EXPECT_TRUE(p != p0);\n        EXPECT_TRUE(p0 != p);\n\n        EXPECT_FALSE(p != c);\n        EXPECT_FALSE(p0 != c0);\n\n        // Check less-than operator\n        EXPECT_FALSE(p < p0);\n        EXPECT_TRUE(p0 < p);\n\n        EXPECT_FALSE(p < c);\n        EXPECT_FALSE(p0 < c0);\n\n        // Check greater-than operator\n        EXPECT_TRUE(p > p0);\n        EXPECT_FALSE(p0 > p);\n\n        EXPECT_FALSE(p > c);\n        EXPECT_FALSE(p0 > c0);\n\n        // Check less-than-or-equal-to operator\n        EXPECT_FALSE(p <= p0);\n        EXPECT_TRUE(p0 <= p);\n\n        EXPECT_TRUE(p <= c);\n        EXPECT_TRUE(p0 <= c0);\n\n        // Check greater-than-or-equal-to operator\n        EXPECT_TRUE(p >= p0);\n        EXPECT_FALSE(p0 >= p);\n\n        EXPECT_TRUE(p >= c);\n        EXPECT_TRUE(p0 >= c0);\n    }\n\n\n    TEST_F(WorldPtrTest, Swap) {\n        // Verify initial conditions\n        EXPECT_EQ(p.get(), i.get());\n        EXPECT_EQ(p.owner(), pworld->rank());\n        EXPECT_EQ(&(p.get_world()), pworld);\n        EXPECT_EQ(p.get_worldid(), pworld->id());\n\n        EXPECT_EQ(p0.owner(), -1);\n        EXPECT_EQ(p0.get_worldid(), std::numeric_limits<unsigned long>::max());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(p0.get(), madness::MadnessException);\n        EXPECT_THROW(p0.get_world(), madness::MadnessException);\n#endif\n\n        p.swap(p0);\n\n        // Check member swap post conditions\n        EXPECT_EQ(p0.get(), i.get());\n        EXPECT_EQ(p0.owner(), pworld->rank());\n        EXPECT_EQ(&(p0.get_world()), pworld);\n        EXPECT_EQ(p0.get_worldid(), pworld->id());\n\n        EXPECT_EQ(p.owner(), -1);\n        EXPECT_EQ(p.get_worldid(), std::numeric_limits<unsigned long>::max());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(p.get(), madness::MadnessException);\n        EXPECT_THROW(p.get_world(), madness::MadnessException);\n#endif\n\n        madness::detail::swap(p,p0);\n\n        // Check free function swap post conditions conditions\n        EXPECT_EQ(p.get(), i.get());\n        EXPECT_EQ(p.owner(), pworld->rank());\n        EXPECT_EQ(&(p.get_world()), pworld);\n        EXPECT_EQ(p.get_worldid(), pworld->id());\n\n        EXPECT_EQ(p0.owner(), -1);\n        EXPECT_EQ(p0.get_worldid(), std::numeric_limits<unsigned long>::max());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(p0.get(), madness::MadnessException);\n        EXPECT_THROW(p0.get_world(), madness::MadnessException);\n#endif\n\n        std::swap(p,p0);\n\n        // Check std::swap post conditions\n        EXPECT_EQ(p0.get(), i.get());\n        EXPECT_EQ(p0.owner(), pworld->rank());\n        EXPECT_EQ(&(p0.get_world()), pworld);\n        EXPECT_EQ(p0.get_worldid(), pworld->id());\n\n        EXPECT_EQ(p.owner(), -1);\n        EXPECT_EQ(p.get_worldid(), std::numeric_limits<unsigned long>::max());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(p.get(), madness::MadnessException);\n        EXPECT_THROW(p.get_world(), madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldPtrTest, Serialize) {\n        // Serialize 2 pointers to a buffer\n        unsigned char buf[10*sizeof(WorldPtr<int>)];\n        madness::archive::BufferOutputArchive oar(buf,sizeof(buf));\n        oar & p & p0;\n        std::size_t nbyte = oar.size();\n        oar.close();\n\n        // Deserialize 2 pointers from a buffer\n        WorldPtr<int> a;\n        WorldPtr<int> a0(p);\n        madness::archive::BufferInputArchive iar(buf,nbyte);\n        iar & a & a0;\n        iar.close();\n\n        // check that serialized and deserialized pointers match the original.\n        EXPECT_EQ(a.get(), p.get());\n        EXPECT_EQ(a.owner(), p.owner());\n        EXPECT_EQ(&(a.get_world()), &(p.get_world()));\n        EXPECT_EQ(a.get_worldid(), p.get_worldid());\n\n        EXPECT_TRUE(a0 == p0);\n        EXPECT_EQ(a0.owner(), p0.owner());\n        EXPECT_EQ(a0.get_worldid(), p0.get_worldid());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(a0.get_world(), madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldPtrTest, RemotePtr) {\n\n        if(pworld->size() > 1) {\n            ProcessID send = (pworld->rank() != (pworld->size() - 1) ? pworld->rank() + 1 : 0);\n            ProcessID recv = (pworld->rank() != 0 ? pworld->rank() - 1 : (pworld->size() - 1) );\n\n            // Send the pointer to the next process\n            XferPtr<int> xfer_wobj(*pworld);\n            xfer_wobj.xfer(send, p, true);\n\n            // wait for the remote pointer\n            WorldPtr<int> remote = xfer_wobj.remote_ptr.get();\n\n            EXPECT_FALSE(remote == p);\n\n            // Check for locality\n            EXPECT_FALSE(remote.is_local());\n\n            // Check ownership\n            EXPECT_TRUE(remote.has_owner());\n            EXPECT_EQ(remote.owner(), recv);\n\n            // Check world and world id of remote pointer\n            EXPECT_EQ(&(remote.get_world()), pworld);\n            EXPECT_EQ(remote.get_worldid(), pworld->id());\n\n            // Check boolean conversions\n            EXPECT_TRUE(remote);\n            EXPECT_FALSE(! remote);\n\n#ifdef MADNESS_ASSERTIONS_THROW\n            EXPECT_THROW(remote.get(), madness::MadnessException);\n            EXPECT_THROW(*remote, madness::MadnessException);\n            // Should check arrow operator too but the assertions are the same as\n            // operator* so we should get the same throw conditions\n#endif\n\n\n            xfer_wobj.xfer(recv, remote, false);\n\n            // wait for the original to return.\n            WorldPtr<int> back = xfer_wobj.return_ptr.get();\n\n            EXPECT_TRUE(back == p);\n\n            // Check for locality\n            EXPECT_TRUE(back.is_local());\n\n            // Check ownership\n            EXPECT_TRUE(back.has_owner());\n            EXPECT_EQ(back.owner(), pworld->rank());\n\n            // Check world and world id of remote pointer\n            EXPECT_EQ(&(back.get_world()), pworld);\n            EXPECT_EQ(back.get_worldid(), pworld->id());\n\n            // Check boolean conversions\n            EXPECT_TRUE(back);\n            EXPECT_FALSE(! back);\n\n\n            EXPECT_EQ(back.get(), p.get());\n            EXPECT_EQ(*back, *p);\n        }\n    }\n\n    TEST_F(WorldPtrTest, RemoteNullPtr) {\n\n        if(pworld->size() > 1) {\n\n            ProcessID send = (pworld->rank() != (pworld->size() - 1) ? pworld->rank() + 1 : 0);\n            ProcessID recv = (pworld->rank() != 0 ? pworld->rank() - 1 : (pworld->size() - 1) );\n\n            // Send the pointer to the next process\n            XferPtr<int> xfer_wobj(*pworld);\n            xfer_wobj.xfer(send, p0, true);\n\n            // wait for the remote pointer\n            WorldPtr<int> remote = xfer_wobj.remote_ptr.get();\n\n            EXPECT_TRUE(remote == p0);\n\n            // Check for locality\n            EXPECT_FALSE(remote.is_local());\n\n            // Check ownership\n            EXPECT_FALSE(remote.has_owner());\n            EXPECT_EQ(remote.owner(), -1);\n\n            // Check world and world id of remote pointer\n\n            EXPECT_EQ(remote.get_worldid(), std::numeric_limits<unsigned long>::max());\n\n            // Check boolean conversions\n            EXPECT_FALSE(remote);\n            EXPECT_TRUE(! remote);\n\n#ifdef MADNESS_ASSERTIONS_THROW\n            EXPECT_THROW(remote.get(), madness::MadnessException);\n            EXPECT_THROW(remote.get_world(), madness::MadnessException);\n            EXPECT_THROW(*remote, madness::MadnessException);\n            // Should check arrow operator too but the assertions are the same as\n            // operator* so we should get the same throw conditions\n#endif\n\n\n            xfer_wobj.xfer(recv, remote, false);\n\n            // wait for the original to return.\n            WorldPtr<int> back = xfer_wobj.return_ptr.get();\n\n            EXPECT_TRUE(back == p0);\n\n            // Check for locality\n            EXPECT_FALSE(back.is_local());\n\n            // Check ownership\n            EXPECT_FALSE(back.has_owner());\n            EXPECT_EQ(back.owner(), -1);\n\n            // Check world and world id of remote pointer\n#ifdef MADNESS_ASSERTIONS_THROW\n            EXPECT_THROW(back.get(), madness::MadnessException);\n            EXPECT_THROW(back.get_world(), madness::MadnessException);\n            EXPECT_THROW(*back, madness::MadnessException);\n#endif\n            EXPECT_EQ(back.get_worldid(), std::numeric_limits<unsigned long>::max());\n\n            // Check boolean conversions\n            EXPECT_FALSE(back);\n            EXPECT_TRUE(! back);\n        }\n    }\n\n\n} // namespace\n\nint main(int argc, char **argv) {\n    madness::initialize(argc,argv);\n    madness::World world(SafeMPI::COMM_WORLD);\n    pworld = &world;\n\n    if (world.rank()) madness::redirectio(world);\n    world.args(argc,argv);\n    world.gop.fence();\n\n    ::testing::InitGoogleTest(&argc, argv);\n    int status = RUN_ALL_TESTS();\n\n    world.gop.fence();\n\n    madness::finalize();\n    return status;\n}\n\n\n#else\n\n#include <iostream>\nint main() {\n    std::cout << \"!!! Error: You need to build with Google test to enable the WorldPtr test code\\n\";\n    return 1;\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/world/test_worldref.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/madness_config.h>\n#ifdef MADNESS_HAS_GOOGLE_TEST\n\n//#define MADNESS_DISPLAY_EXCEPTION_BREAK_MESSAGE 0\n#include <madness/world/worldref.h>\n#include <madness/world/MADworld.h>\n#include <madness/world/world_object.h>\n#include <gtest/gtest.h>\n\nmadness::World* pworld;\n\nusing madness::RemoteReference;\nusing madness::detail::RemoteCounter;\n\nnamespace {\n    class WorldRefTest : public ::testing::Test {\n    public:\n        WorldRefTest() : r(*pworld, i), r0() {\n        }\n\n        virtual ~WorldRefTest() {\n        }\n\n        virtual void SetUp() {\n        }\n\n        virtual void TearDown() {\n        }\n\n        static std::shared_ptr<int> i;\n\n        RemoteReference<int> r;\n        RemoteReference<int> r0;\n\n        template <typename T>\n        class XferRef : public madness::WorldObject<XferRef<T> > {\n            void set_ptr(const RemoteReference<T>& r, bool away) {\n                if(away) {\n                    //std::cout << pworld->rank() << \": Set remote_ref = \" << r << \"\\n\";\n                    remote_ref.set(r);\n                } else {\n                    //std::cout << pworld->rank() << \": Set return_ref = \" << r << \"\\n\";\n                    return_ref.set(r);\n                }\n            }\n        public:\n            madness::Future<RemoteReference<T> > remote_ref;\n            madness::Future<RemoteReference<T> > return_ref;\n\n            explicit XferRef(madness::World& w) :\n                    madness::WorldObject<XferRef<T> >(w)\n            {\n                madness::WorldObject<XferRef<T> >::process_pending();\n            }\n\n            void xfer(const ProcessID dest, const RemoteReference<T>& r, bool away) const {\n                //std::cout << pworld->rank() << \": Sending \" << r << \" to \" << dest << \"\\n\";\n                madness::WorldObject<XferRef<T> >::send(dest, & XferRef<T>::set_ptr,\n                        r, away);\n            }\n        };\n    };\n\n    std::shared_ptr<int> WorldRefTest::i(new int(1));\n\n    TEST_F(WorldRefTest, DefaultConstructor) {\n        // Check that default constructed reference gives you nothing\n        EXPECT_FALSE(r0);\n        EXPECT_EQ(-1, r0.owner());\n        EXPECT_FALSE(r0.is_local());\n        EXPECT_EQ(0, r0.use_count());\n        EXPECT_FALSE(r0.unique());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(r0.get(), madness::MadnessException);\n        EXPECT_THROW(r0.get_world(), madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldRefTest, PointerConstructor) {\n        // Check that the reference points to the correct data\n        EXPECT_TRUE(r);\n        EXPECT_EQ(pworld->rank(), r.owner());\n        EXPECT_TRUE(r.is_local());\n        EXPECT_EQ(1, r.use_count());\n        EXPECT_TRUE(r.unique());\n        EXPECT_EQ(i.get(), r.get());\n        EXPECT_EQ(pworld, & (r.get_world()));\n\n        RemoteReference<int> r2(*pworld, i);\n\n        // Check that the reference points the same counter as r\n        EXPECT_TRUE(r2);\n        EXPECT_EQ(pworld->rank(), r2.owner());\n        EXPECT_TRUE(r2.is_local());\n        EXPECT_EQ(2, r2.use_count());\n        EXPECT_FALSE(r2.unique());\n        EXPECT_EQ(i.get(), r2.get());\n        EXPECT_EQ(pworld, & (r2.get_world()));\n\n        // Check that the use counter for r was also increased\n        EXPECT_EQ(2, r.use_count());\n        EXPECT_FALSE(r.unique());\n    }\n\n    TEST_F(WorldRefTest, CopyConstructor) {\n        // check copy a non-null pointer\n        RemoteReference<int> c(r);\n\n        // Check that the reference points to the correct data\n        EXPECT_EQ(r,                c);\n        EXPECT_EQ(r.owner(),        c.owner());\n        EXPECT_EQ(r.is_local(),     c.is_local());\n        EXPECT_EQ(r.use_count(),    c.use_count());\n        EXPECT_EQ(r.unique(),       c.unique());\n        EXPECT_EQ(r.get(),          c.get());\n        EXPECT_EQ(&(r.get_world()), &(c.get_world()));\n\n        // Check copy a null reference\n        RemoteReference<int> c0(r0);\n\n        EXPECT_EQ(r0,               c0);\n        EXPECT_EQ(r0.owner(),       c0.owner());\n        EXPECT_EQ(r0.is_local(),    c0.is_local());\n        EXPECT_EQ(r0.use_count(),   c0.use_count());\n        EXPECT_EQ(r0.unique(),      c0.unique());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(c0.get(),          madness::MadnessException);\n        EXPECT_THROW(c0.get_world(),    madness::MadnessException);\n        EXPECT_THROW(r0.get(),          madness::MadnessException);\n        EXPECT_THROW(r0.get_world(),    madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldRefTest, CopyConversionConstructor) {\n        RemoteReference<const int> c(r);\n\n        // Check that the reference points to the correct data\n        EXPECT_EQ(r,                c);\n        EXPECT_EQ(r.owner(),        c.owner());\n        EXPECT_EQ(r.is_local(),     c.is_local());\n        EXPECT_EQ(r.use_count(),    c.use_count());\n        EXPECT_EQ(r.unique(),       c.unique());\n        EXPECT_EQ(r.get(),          c.get());\n        EXPECT_EQ(&(r.get_world()), &(c.get_world()));\n\n        // Check copy a null reference\n        RemoteReference<const int> c0(r0);\n\n        EXPECT_EQ(r0,               c0);\n        EXPECT_EQ(r0.owner(),       c0.owner());\n        EXPECT_EQ(r0.is_local(),    c0.is_local());\n        EXPECT_EQ(r0.use_count(),   c0.use_count());\n        EXPECT_EQ(r0.unique(),      c0.unique());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(c0.get(),          madness::MadnessException);\n        EXPECT_THROW(c0.get_world(),    madness::MadnessException);\n        EXPECT_THROW(r0.get(),          madness::MadnessException);\n        EXPECT_THROW(r0.get_world(),    madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldRefTest, CopyAssignment) {\n        RemoteReference<int> c;\n\n        // Check assignment operator\n        c = r;\n\n        EXPECT_EQ(r,                c);\n        EXPECT_EQ(r.owner(),        c.owner());\n        EXPECT_EQ(r.is_local(),     c.is_local());\n        EXPECT_EQ(r.use_count(),    c.use_count());\n        EXPECT_EQ(r.unique(),       c.unique());\n        EXPECT_EQ(r.get(),          c.get());\n        EXPECT_EQ(&(r.get_world()), &(c.get_world()));\n\n        // Check assign a null reference\n        c = r0;\n        EXPECT_EQ(r0,               c);\n        EXPECT_EQ(r0.owner(),       c.owner());\n        EXPECT_EQ(r0.is_local(),    c.is_local());\n        EXPECT_EQ(r0.use_count(),   c.use_count());\n        EXPECT_EQ(r0.unique(),      c.unique());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(c.get(),           madness::MadnessException);\n        EXPECT_THROW(c.get_world(),     madness::MadnessException);\n        EXPECT_THROW(r0.get(),          madness::MadnessException);\n        EXPECT_THROW(r0.get_world(),    madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldRefTest, CopyConversionAssignment) {\n        RemoteReference<const int> c;\n\n        // Check conversion assignment operator\n        c = r;\n\n        EXPECT_EQ(r,                c);\n        EXPECT_EQ(r.owner(),        c.owner());\n        EXPECT_EQ(r.is_local(),     c.is_local());\n        EXPECT_EQ(r.use_count(),    c.use_count());\n        EXPECT_EQ(r.unique(),       c.unique());\n        EXPECT_EQ(r.get(),          c.get());\n        EXPECT_EQ(&(r.get_world()), &(c.get_world()));\n\n        // Check conversion assign a null reference\n        c = r0;\n\n        EXPECT_EQ(r0,               c);\n        EXPECT_EQ(r0.owner(),       c.owner());\n        EXPECT_EQ(r0.is_local(),    c.is_local());\n        EXPECT_EQ(r0.use_count(),   c.use_count());\n        EXPECT_EQ(r0.unique(),      c.unique());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(c.get(),           madness::MadnessException);\n        EXPECT_THROW(c.get_world(),     madness::MadnessException);\n        EXPECT_THROW(r0.get(),          madness::MadnessException);\n        EXPECT_THROW(r0.get_world(),    madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldRefTest, Counter) {\n\n        EXPECT_EQ(1, r.use_count());\n        EXPECT_TRUE(r.unique());\n\n        {\n            // Check that the use count goes up when a copy is made\n            RemoteReference<int> c(r);\n            EXPECT_EQ(2, r.use_count());\n            EXPECT_FALSE(r.unique());\n        }\n\n        // Check that the use counter goes down when the copy is destroyed\n        EXPECT_EQ(1, r.use_count());\n        EXPECT_TRUE(r.unique());\n\n        {\n            // Check that the use counter goes up when another pointer is created\n            // with to the same pointer.\n            RemoteReference<int> c(*pworld, i);\n            EXPECT_EQ(2, r.use_count());\n            EXPECT_FALSE(r.unique());\n        }\n\n        // Check that the use counter goes down when the other reference is destroyed\n        EXPECT_EQ(1, r.use_count());\n        EXPECT_TRUE(r.unique());\n\n        r.reset();\n\n        // Check that the use counter goes goes to zero when nothing is referenced\n        EXPECT_EQ(0, r.use_count());\n        EXPECT_FALSE(r.unique());\n    }\n\n    TEST_F(WorldRefTest, Pointer) {\n        // Check pointer access\n        EXPECT_EQ(i.get(), r.get());\n        EXPECT_EQ(*i, *r);\n\n        // Check that a null pointer throws correctly.\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(r0.get(), madness::MadnessException);\n        EXPECT_THROW(*r0, madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldRefTest, Ownership) {\n        // Check that r has an owner and that it is local\n        EXPECT_EQ(pworld->rank(), r.owner());\n        EXPECT_TRUE(r.is_local());\n\n        // Check that r0 has no owner and is not local\n        EXPECT_EQ(-1, r0.owner());\n        EXPECT_FALSE(r0.is_local());\n    }\n\n    TEST_F(WorldRefTest, World) {\n        // Check world accessor\n        EXPECT_EQ(pworld, & (r.get_world()));\n\n        // Check world accessor for null reference\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(r0.get_world(), madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldRefTest, Reset) {\n        // check reset to a null pointer\n        r.reset();\n\n        EXPECT_FALSE(r);\n        EXPECT_EQ(-1, r.owner());\n        EXPECT_FALSE(r.is_local());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(r.get(), madness::MadnessException);\n        EXPECT_THROW(r.get_world(), madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldRefTest, Boolean) {\n        // Check  boolean conversion operator\n        EXPECT_FALSE(r0);\n        EXPECT_TRUE(r);\n    }\n\n    TEST_F(WorldRefTest, Swap) {\n        RemoteReference<int> r1(r);\n\n        // Verify starting conditions for remote reference\n        EXPECT_TRUE(r);\n        EXPECT_EQ(pworld->rank(), r.owner());\n        EXPECT_TRUE(r.is_local());\n        EXPECT_EQ(2, r.use_count());\n        EXPECT_FALSE(r.unique());\n        EXPECT_EQ(i.get(), r.get());\n        EXPECT_EQ(pworld, & (r.get_world()));\n\n\n        std::shared_ptr<int> ii(new int(2));\n        RemoteReference<int> r2(*pworld, ii);\n\n        // Swap r and r2 with member function\n        r.swap(r2);\n\n        // Check that r2 has r values\n        EXPECT_TRUE(r2);\n        EXPECT_EQ(pworld->rank(), r2.owner());\n        EXPECT_TRUE(r2.is_local());\n        EXPECT_EQ(2, r2.use_count());\n        EXPECT_FALSE(r2.unique());\n        EXPECT_EQ(i.get(), r2.get());\n        EXPECT_EQ(pworld, & (r2.get_world()));\n\n        // Check that r has r2 values\n        EXPECT_TRUE(r);\n        EXPECT_EQ(pworld->rank(), r.owner());\n        EXPECT_TRUE(r.is_local());\n        EXPECT_EQ(1, r.use_count());\n        EXPECT_TRUE(r.unique());\n        EXPECT_EQ(ii.get(), r.get());\n        EXPECT_EQ(pworld, & (r.get_world()));\n\n        // Swap back with free function\n        madness::swap(r, r2);\n\n        // Check that r is back to original settings\n        EXPECT_TRUE(r);\n        EXPECT_EQ(pworld->rank(), r.owner());\n        EXPECT_TRUE(r.is_local());\n        EXPECT_EQ(2, r.use_count());\n        EXPECT_FALSE(r.unique());\n        EXPECT_EQ(i.get(), r.get());\n        EXPECT_EQ(pworld, & (r.get_world()));\n\n        // Check that r2 is back to original settings\n        EXPECT_TRUE(r2);\n        EXPECT_EQ(pworld->rank(), r2.owner());\n        EXPECT_TRUE(r2.is_local());\n        EXPECT_EQ(1, r2.use_count());\n        EXPECT_TRUE(r2.unique());\n        EXPECT_EQ(ii.get(), r2.get());\n        EXPECT_EQ(pworld, & (r2.get_world()));\n\n        // Swap r with a null reference\n        madness::swap(r, r0);\n\n        // Check that r0 is set to r values\n        EXPECT_TRUE(r0);\n        EXPECT_EQ(pworld->rank(), r0.owner());\n        EXPECT_TRUE(r0.is_local());\n        EXPECT_EQ(2, r0.use_count());\n        EXPECT_FALSE(r0.unique());\n        EXPECT_EQ(i.get(), r0.get());\n        EXPECT_EQ(pworld, & (r0.get_world()));\n\n        // Check that r is set to r0 valuse\n        EXPECT_FALSE(r);\n        EXPECT_EQ(-1, r.owner());\n        EXPECT_FALSE(r.is_local());\n        EXPECT_EQ(0, r.use_count());\n        EXPECT_FALSE(r.unique());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(r.get(), madness::MadnessException);\n        EXPECT_THROW(r.get_world(), madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldRefTest, Serialize) {\n        // Serialize 2 pointers to a buffer\n        unsigned char buf[10*sizeof(RemoteReference<int>)];\n        madness::archive::BufferOutputArchive oar(buf,sizeof(buf));\n        oar & r & r0;\n        std::size_t nbyte = oar.size();\n        oar.close();\n\n        // Check that the use count goes up after serialization\n        EXPECT_EQ(2, r.use_count());\n\n        // Release the last local references\n        r.reset();\n\n        // Deserialize 2 pointers from a buffer\n        std::shared_ptr<int> ii(new int(2));\n        RemoteReference<int> a;\n        RemoteReference<int> a0(*pworld, ii);\n        madness::archive::BufferInputArchive iar(buf,nbyte);\n        iar & a & a0;\n        iar.close();\n\n        // check that serialized and deserialized pointers match the original.\n        EXPECT_TRUE(a);\n        EXPECT_EQ(pworld->rank(), a.owner());\n        EXPECT_TRUE(a.is_local());\n        EXPECT_EQ(1, a.use_count());\n        EXPECT_TRUE(a.unique());\n        EXPECT_EQ(i.get(), a.get());\n        EXPECT_EQ(pworld, & (a.get_world()));\n\n        EXPECT_FALSE(a0);\n        EXPECT_EQ(-1, a0.owner());\n        EXPECT_FALSE(a0.is_local());\n        EXPECT_EQ(0, a0.use_count());\n        EXPECT_FALSE(a0.unique());\n#ifdef MADNESS_ASSERTIONS_THROW\n        EXPECT_THROW(a0.get(), madness::MadnessException);\n        EXPECT_THROW(a0.get_world(), madness::MadnessException);\n#endif\n    }\n\n    TEST_F(WorldRefTest, RemoteRef) {\n\n        if(pworld->size() > 1) {\n            ProcessID send = (pworld->rank() != (pworld->size() - 1) ? pworld->rank() + 1 : 0);\n            ProcessID recv = (pworld->rank() != 0 ? pworld->rank() - 1 : (pworld->size() - 1) );\n\n            EXPECT_EQ(1, r.use_count());\n\n            // Send the pointer to the next process\n            XferRef<int> xfer_wobj(*pworld);\n            xfer_wobj.xfer(send, r, true);\n\n            pworld->gop.fence();\n\n            // Check that there is one remote reference in addition to the\n            // single local reference\n            EXPECT_EQ(2, r.use_count());\n\n            pworld->gop.fence();\n\n            // wait for the remote reference\n            RemoteReference<int>& remote = xfer_wobj.remote_ref.get();\n\n            // Check for locality\n            EXPECT_TRUE(remote);\n            EXPECT_FALSE(remote.is_local());\n            EXPECT_EQ(recv, remote.owner());\n            EXPECT_EQ(pworld, &(remote.get_world()));\n            EXPECT_EQ(0, remote.use_count());\n            EXPECT_FALSE(remote.unique());\n\n            // Check that you cannot remotely access reference\n#ifdef MADNESS_ASSERTIONS_THROW\n            EXPECT_THROW(remote.get(), madness::MadnessException);\n            EXPECT_THROW(*remote, madness::MadnessException);\n            // Should check arrow operator too but the assertions are the same as\n            // operator* so we should get the same throw conditions\n#endif\n\n            xfer_wobj.xfer(recv, remote, false);\n\n            pworld->gop.fence();\n            // Check that the remote reference is NULL after sending it back\n            EXPECT_FALSE(remote);\n\n\n            EXPECT_EQ(2, r.use_count());\n\n            // wait for the original to return.\n            RemoteReference<int>& back = xfer_wobj.return_ref.get();\n\n            EXPECT_EQ(2, r.use_count());\n\n            // Check that the reference was returned with correct info\n            EXPECT_TRUE(back);\n            EXPECT_TRUE(back.is_local());\n            EXPECT_EQ(pworld->rank(), back.owner());\n            EXPECT_EQ(2, back.use_count());\n            EXPECT_FALSE(back.unique());\n            EXPECT_EQ(pworld, &(back.get_world()));\n            EXPECT_EQ(i.get(), back.get());\n            EXPECT_EQ(*i, *back);\n        }\n    }\n}\n\nint main(int argc, char **argv) {\n    madness::initialize(argc,argv);\n    madness::World world(SafeMPI::COMM_WORLD);\n    pworld = &world;\n\n    if (world.rank()) madness::redirectio(world);\n    world.args(argc,argv);\n    world.gop.fence();\n\n    ::testing::InitGoogleTest(&argc, argv);\n    int status = RUN_ALL_TESTS();\n\n    world.gop.fence();\n\n    madness::finalize();\n    return status;\n}\n\n\n#else\n\n#include <iostream>\nint main() {\n    std::cout << \"!!! Error: You need to build with Google test to enable WorldRef test code\\n\";\n    return 1;\n}\n\n#endif\n"
  },
  {
    "path": "src/madness/world/text_fstream_archive.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file text_fstream_archive.cc\n \\brief Implements an archive wrapping text filestream.\n \\ingroup serialization\n*/\n\n#include <madness/world/text_fstream_archive.h>\n\nnamespace madness {\n    namespace archive {\n\n        void TextFstreamOutputArchive::store(const char* t, long /*n*/) const {\n            // store character string, escaping &, < and > along the way\n            while (*t) {\n                char c = *t++;\n                if (c == '\\\\') {\n                    os.put('\\\\');\n                    os.put('\\\\');\n                }\n                else if (c == '<') {\n                    os.put('\\\\');\n                    os.put('l');\n                }\n                else if (c == '>') {\n                    os.put('\\\\');\n                    os.put('r');\n                }\n                else {\n                    os.put(c);\n                }\n            }\n            os << std::endl;\n        }\n\n        void TextFstreamOutputArchive::open(const char* filename,\n                  std::ios_base::openmode mode)\n        {\n            os.open(filename, mode);\n            os.setf(std::ios::scientific);\n            os.precision(17);\n            const std::size_t bufsize=256;\n            char tag[bufsize];\n            os << \"<?xml version=\\\"1.0\\\" encoding=\\\"ISO-8859-1\\\"?>\" << std::endl;\n            snprintf(tag,bufsize,\"<archive major_version=\\\"%d\\\" minor_version=\\\"%d\\\">\",\n                    ARCHIVE_MAJOR_VERSION, ARCHIVE_MINOR_VERSION);\n            os << tag << std::endl;\n            os << \"<typemap>\" << std::endl;\n            for (int i=0; i<256; ++i) {\n                snprintf(tag,bufsize,\"%d \\\"%s\\\"\",i,archive_type_names[i]);\n                store(tag,strlen(tag)); // Must use store to escape characters\n            }\n            os << \"</typemap>\" << std::endl;\n        }\n\n\n        void TextFstreamOutputArchive::close() {\n            if (os.is_open()) {\n                os << \"</archive>\" << std::endl;\n                os.close();\n            }\n        }\n\n\n        // Eat EOL after each entry to enable char-by-char read of strings\n        void TextFstreamInputArchive::eat_eol() const {\n            char eol;\n            is.get(eol);\n            if (eol != '\\n')\n                MADNESS_EXCEPTION(\"TextFstreamInputArchive: eat_eol: indigestion\", static_cast<int>(eol));\n        }\n\n\n        void TextFstreamInputArchive::load(unsigned char* t, long n) const {\n            for (long i=0; i<n; ++i) {\n                unsigned int x;\n                is >> x;\n                t[i] = (unsigned char) x;\n            }\n            eat_eol();\n        }\n\n        void TextFstreamInputArchive::load(char* t, long n) const {\n            for (long i=0; i<n; ++i) {\n                char c0;\n                is.get(c0);\n                if (c0 == '\\\\') {\n                    char c1;\n                    is.get(c1);\n                    if (c1 == '\\\\') {\n                        t[i] = '\\\\';\n                    }\n                    else if (c1 == 'l') {\n                        t[i] = '<';\n                    }\n                    else if (c1 == 'r') {\n                        t[i] = '>';\n                    }\n                    else {\n                      MADNESS_EXCEPTION(\"TextFstreamInputArchive: malformed string?\",\n                              static_cast<int>(c1));\n                    }\n                }\n                else {\n                    t[i] = c0;\n                }\n            }\n            eat_eol();\n        }\n\n        void TextFstreamInputArchive::open(const char* filename, std::ios_base::openmode mode) {\n            is.open(filename, mode);\n            const std::size_t bufsize=256;\n            char buf[bufsize];\n            is.getline(buf,bufsize);        // skip xml header\n            is.getline(buf,bufsize);\n\n            char tag[bufsize];\n            snprintf(tag,bufsize,\"<archive major_version=\\\"%d\\\" minor_version=\\\"%d\\\">\",\n                    ARCHIVE_MAJOR_VERSION, ARCHIVE_MINOR_VERSION);\n            if (strcmp(buf,tag)) {\n                std::cout << \"TextFstreamInputArchive: not an archive/bad version?\" << std::endl;\n                std::cout << \"Found this: \" << buf;\n                std::cout << \"Expected  : \" << tag;\n                MADNESS_EXCEPTION(\"TextFstreamInputArchive: not an archive/bad version?\", 1);\n            }\n\n            // For now just skip over typemap\n            for (int i=0; i<258; ++i) is.getline(buf,bufsize);\n        }\n\n    }\n}\n"
  },
  {
    "path": "src/madness/world/text_fstream_archive.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_TEXT_FSTREAM_ARCHIVE_H__INCLUDED\n#define MADNESS_WORLD_TEXT_FSTREAM_ARCHIVE_H__INCLUDED\n\n/**\n \\file text_fstream_archive.h\n \\brief Implements an archive wrapping text filestream.\n \\ingroup serialization\n*/\n\n#include <type_traits>\n#include <fstream>\n#include <cstring>\n#include <madness/world/archive.h>\n#include <madness/world/print.h>  // this injects operator<<(std::ostream,T) for common Ts\n\nnamespace madness {\n    namespace archive {\n\n        /// \\addtogroup serialization\n        /// @{\n\n        /// Wraps an archive around a text filestream for output.\n        class TextFstreamOutputArchive : public BaseOutputArchive {\n            mutable std::ofstream os; ///< The filestream.\n\n        public:\n            /// Default constructor.\n\n            /// The filename and open modes are optional here; they can be\n            /// specified later by calling \\c open().\n            /// \\param[in] filename Name of the file to write to.\n            /// \\param[in] mode I/O attributes for opening the file.\n            TextFstreamOutputArchive(const char* filename = nullptr,\n                    std::ios_base::openmode mode=std::ios_base::binary | std::ios_base::out | std::ios_base::trunc)\n            {\n                if (filename)\n                    open(filename, mode);\n            }\n\n            /// Stores the cookie for runtime type-checking into the archive as a tag.\n\n            /// \\tparam T The type of data to be stored between the tags.\n            template <class T>\n            void store_start_tag() const {\n                const std::size_t bufsize=256;\n                char tag[bufsize];\n                unsigned char cookie = archive_typeinfo<T>::cookie;\n                snprintf(tag,bufsize,\"<t%d>\", cookie);\n                os << tag << std::endl;\n                MAD_ARCHIVE_DEBUG(std::cout << \"textarchive: tag = \" << tag << std::endl);\n            }\n\n            /// Closes the \"cookie\" tag for runtime type-checking.\n\n            /// \\tparam T The type of data to be stored between the tags.\n            template <class T>\n            void store_end_tag() const {\n                const std::size_t bufsize=256;\n                char tag[bufsize];\n                unsigned char cookie = archive_typeinfo<T>::cookie;\n                snprintf(tag,bufsize,\"</t%d>\",cookie);\n                os << tag << std::endl;\n            }\n\n            /// Store data to the filestream.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// serializable.\n            /// \\tparam T The type of data to be written.\n            /// \\param[in] t Location of the data to be written.\n            /// \\param[in] n The number of data items to be written.\n            template <class T>\n            typename std::enable_if< madness::is_ostreammable_v<T> >::type\n            store(const T* t, long n) const {\n                using madness::operators::operator<<;\n                for (long i=0; i<n; ++i)\n                    os << t[i] << std::endl;\n            }\n\n            /// Store a character string, escaping '&', '<' and '> along the way.\n\n            /// \\param[in] t The character string.\n            void store(const char* t, long /*n*/) const;\n\n            /// Store a character string, without escaping characters.\n\n            /// \\param[in] t The character string.\n            /// \\param[in] n The number of characters to store.\n            void store(const unsigned char* t, long n) const {\n                for (long i=0; i<n; ++i)\n                    os << (unsigned int) t[i] << std::endl;\n            }\n\n            /// Open the filestream.\n\n            /// \\param[in] filename The name of the file.\n            /// \\param[in] mode I/O attributes for opening the file.\n            void open(const char* filename, std::ios_base::openmode mode = std::ios_base::out | std::ios_base::trunc);\n\n            /// Close the filestream.\n            void close();\n\n            /// Flush the filestream.\n            void flush() {\n                if (os.is_open())\n                    os.flush();\n            }\n\n            /// Destructor.\n            ~TextFstreamOutputArchive() {\n                close();\n            }\n        }; // class TextFstreamOutputArchive\n\n\n        /// Wraps an archive around a text filestream for input.\n        class TextFstreamInputArchive : public BaseInputArchive {\n        private:\n            mutable std::ifstream is; ///< The filestream.\n\n            /// Eat the EOL after each entry to enable a `char`-by-`char` read of strings.\n            void eat_eol() const;\n\n        public:\n            /// Default constructor.\n\n            /// The filename and open modes are optional here; they can be\n            /// specified later by calling \\c open().\n            /// \\param[in] filename Name of the file to read from.\n            /// \\param[in] mode I/O attributes for opening the file.\n            TextFstreamInputArchive(const char* filename = nullptr,\n                    std::ios_base::openmode mode = std::ios_base::in)\n            {\n                if (filename)\n                    open(filename, mode);\n            }\n\n            /// Check the \"cookie\" tag in the archive for runtime type-checking.\n\n            /// \\tparam T The expected data type.\n            /// \\throw MadnessException if the tag does not match that of the\n            ///     expected type.\n            template <class T>\n            void check_start_tag(bool end=false) const {\n                const std::size_t bufsize=256;\n                char tag[bufsize], ftag[bufsize];\n                is.getline(ftag,bufsize);\n                unsigned char cookie = archive_typeinfo<T>::cookie;\n                if (end)\n                    snprintf(tag,bufsize,\"</t%d>\",cookie);\n                else\n                    snprintf(tag,bufsize,\"<t%d>\",cookie);\n\n                if (strcmp(tag,ftag) != 0) {\n                    std::cout << \"TextFstreamInputArchive: type mismatch: expected=\" << tag\n                              << \" \"\n                              << archive_type_names[cookie]\n                              << \" \"\n                              << \" got=\" << ftag << std::endl;\n                    MADNESS_EXCEPTION(\"TextFstreamInputArchive: check_tag: types do not match/corrupt file\", 1);\n                }\n            }\n\n            /// Read the closing \"cookie\" tag.\n\n            /// \\tparam T The expected data type between the tags.\n            template <class T>\n            inline void check_end_tag() const {\n                check_start_tag<T>(true);\n            }\n\n            /// Load from the filestream.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// serializable.\n            /// \\tparam T The type of data to be read.\n            /// \\param[out] t Where to put the loaded data.\n            /// \\param[in] n The number of data items to be loaded.\n            template <class T>\n            typename std::enable_if< madness::is_istreammable_v<T> >::type\n            load(T* t, long n) const {\n                using madness::operators::operator>>;\n                for (long i=0; i<n; ++i) is >> t[i];\n                eat_eol();\n            }\n\n            /// Load characters from the filestream, interpreting escaped characters along the way.\n\n            /// \\param[out] t Where to put the loaded characters.\n            /// \\param[in] n The number of characters to be loaded.\n            void load(unsigned char* t, long n) const;\n\n            /// Load characters from the filestream, without converting escaped characters.\n\n            /// \\param[out] t Where to put the loaded characters.\n            /// \\param[in] n The number of characters to be loaded.\n            void load(char* t, long n) const;\n\n            /// Open the filestream.\n\n            /// \\param[in] filename The name of the file.\n            /// \\param[in] mode I/O attributes for opening the file.\n            void open(const char* filename,\n                      std::ios_base::openmode mode = std::ios_base::in);\n\n            /// Close the filestream.\n            void close() {\n                is.close();\n            }\n        }; // class TextFstreamInputArchive\n\n        /// Implement pre/postamble storage routines for a \\c TextFstreamOutputArchive.\n\n        /// \\tparam T The type to be stored.\n        template <class T>\n        struct ArchivePrePostImpl<TextFstreamOutputArchive, T> {\n            /// Write the preamble to the archive.\n\n            /// \\param[in] ar The archive.\n            static void preamble_store(const TextFstreamOutputArchive& ar) {\n                ar.store_start_tag<T>();\n            }\n\n            /// Write the postamble to the archive.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_store(const TextFstreamOutputArchive& ar) {\n                ar.store_end_tag<T>();\n            }\n        }; // struct ArchivePrePostImpl<TextFstreamOutputArchive,T>\n\n        /// Implement pre/postamble load routines for a \\c TextFstreamInputArchive.\n\n        /// \\tparam T The expected type to be loaded.\n        template <class T>\n        struct ArchivePrePostImpl<TextFstreamInputArchive,T> {\n            /// Load the preamble and perform type-checking.\n\n            /// \\param[in] ar The archive.\n            static inline void preamble_load(const TextFstreamInputArchive& ar) {\n                ar.check_start_tag<T>();\n            }\n\n            /// Load the postamble and perform type-checking.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_load(const TextFstreamInputArchive& ar) {\n                ar.check_end_tag<T>();\n            }\n        }; // struct ArchivePrePostImpl<TextFstreamInputArchive,T>\n\n        /// @}\n    }\n}\n\n#endif // MADNESS_WORLD_TEXT_FSTREAM_ARCHIVE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/thread.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file thread.cc\n \\brief Implements Dqueue, Thread, ThreadBase and ThreadPool.\n \\ingroup threads\n*/\n\n#include <madness/world/worldinit.h>\n#include <madness/world/thread.h>\n#include <madness/world/worldprofile.h>\n#include <madness/world/madness_exception.h>\n#include <madness/world/print.h>\n#include <madness/world/worldpapi.h>\n#include <madness/world/safempi.h>\n#include <madness/world/atomicint.h>\n#include <cstring>\n#include <fstream>\n\n#if defined(HAVE_IBMBGQ) and defined(HPM)\nextern \"C\" unsigned int HPM_Prof_init_thread(void);\nextern \"C\" void HPM_Prof_start(unsigned int);\nextern \"C\" void HPM_Prof_stop(unsigned int);\n#endif\n\n#if defined(HAVE_IBMBGP)\n// This header causes tinyxml.h to barf but we only need it in the implementation, not the header.\n#  include <spi/kernel_interface.h>\n#  include <spi/bgp_kernel_inlines.h>\n#  include <common/bgp_personality.h>\n#  include <common/bgp_personality_inlines.h>\n#endif\n\n#if defined(HAVE_IBMBGQ)\n#  include <spi/include/kernel/location.h>\n#  include <spi/include/kernel/process.h>\n#endif\n\n#include <thread>\n\nnamespace madness {\n    ThreadBinder binder;\n    thread_local bool ThreadBinder::bound = false;\n    pthread_key_t ThreadBase::thread_key;\n\n    ThreadPool* ThreadPool::instance_ptr = 0;\n    double ThreadPool::await_timeout = 900.0;\n#if HAVE_INTEL_TBB\n    std::unique_ptr<tbb::global_control> ThreadPool::tbb_control    = nullptr;\n    std::unique_ptr<tbb::task_arena> ThreadPool::tbb_arena          = nullptr;\n#endif\n#ifdef MADNESS_TASK_PROFILING\n    Mutex profiling::TaskProfiler::output_mutex_;\n    const char* profiling::TaskProfiler::output_file_name_;\n#endif // MADNESS_TASK_PROFILING\n#if defined(HAVE_IBMBGQ) and defined(HPM)\n    unsigned int ThreadPool::main_hpmctx;\n    bool ThreadBase::main_instrumented;\n    bool ThreadBase::all_instrumented;\n    int ThreadBase::hpm_thread_id;\n#endif\n\n    void* ThreadBase::main(void* self) {\n#ifdef HAVE_PAPI\n        begin_papi_measurement();\n#endif\n#if defined(HAVE_IBMBGQ) and defined(HPM)\n\tunsigned int slave_hpmctx; // HPM context for the slave threads\n\tint pool_num = static_cast<ThreadBase*>(self)->pool_num;\n\t// int all_instrumented = static_cast<ThreadBase*>(self)->all_instrumented;\n\t// int hpm_thread_id = static_cast<ThreadBase*>(self)->hpm_thread_id;\n\tbool this_slave_instrumented;\n\n\tif ((hpm_thread_id == pool_num) || all_instrumented) {\n\t  this_slave_instrumented = true;\n\t} else\n\t  this_slave_instrumented = false;\n\n\tif (this_slave_instrumented) {\n\t  slave_hpmctx = HPM_Prof_init_thread();\n\t  HPM_Prof_start(slave_hpmctx);\n\t}\n#endif\n\tconst int rc = pthread_setspecific(thread_key, self);\n        if(rc != 0)\n            MADNESS_EXCEPTION(\"pthread_setspecific failed\", rc);\n\n        // mark as a MADNESS thread\n        set_thread_tag(ThreadTag_MADNESS);\n\n        try {\n            ((ThreadBase*)(self))->run();\n        }\n        catch (const SafeMPI::Exception& e) {\n            print(e);\n            error(\"caught an MPI exception\");\n        }\n        catch (const madness::MadnessException& e) {\n            print(e);\n            error(\"caught a MADNESS exception\");\n        }\n        catch (const char* s) {\n            print(s);\n            error(\"caught a string exception\");\n        }\n        catch (const std::string& s) {\n            print(s);\n            error(\"caught a string (class) exception\");\n        }\n        catch (const std::exception& e) {\n            print(e.what());\n            error(\"caught an STL exception\");\n        }\n        catch (...) {\n            error(\"caught unhandled exception\");\n        }\n\n#ifdef HAVE_PAPI\n        end_papi_measurement();\n#endif\n\n#if defined(HAVE_IBMBGQ) and defined(HPM)\n\tif (this_slave_instrumented) HPM_Prof_stop(slave_hpmctx);\n#endif\n        return 0;\n    }\n\n    // Start the thread running\n    void ThreadBase::start() {\n        pthread_attr_t attr;\n        // Want detached thread with kernel scheduling so can use multiple cpus\n        // RJH ... why not checking success/failure????\n        pthread_attr_init(&attr);\n        pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED);\n#ifndef HAVE_IBMBGP\n        pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);\n#endif\n        int result = pthread_create(&id, &attr, &ThreadBase::main, (void *) this);\n        if (result) MADNESS_EXCEPTION(\"failed creating thread\", result);\n\n        pthread_attr_destroy(&attr);\n    }\n\n    // Get no. of actual hardware processors\n    int ThreadBase::num_hw_processors() {\n#if defined(HAVE_IBMBGP)\n    #if 0 /* total overkill - what was i thinking? */\n        int ncpu=0;\n        _BGP_Personality_t pers;\n        Kernel_GetPersonality(&pers, sizeof(pers));\n        if      ( BGP_Personality_processConfig(&pers) == _BGP_PERS_PROCESSCONFIG_SMP ) ncpu = 4;\n        else if ( BGP_Personality_processConfig(&pers) == _BGP_PERS_PROCESSCONFIG_2x2 ) ncpu = 2;\n        else if ( BGP_Personality_processConfig(&pers) == _BGP_PERS_PROCESSCONFIG_VNM ) ncpu = 1;\n        return ncpu;\n    #else\n        /* Returns the number of Processes (Virtual Nodes) running on this Physical Node. */\n        return 4/Kernel_ProcessCount();\n    #endif\n#elif defined(HAVE_IBMBGQ)\n        /* Return number of processors (hardware threads) within the current process. */\n        return Kernel_ProcessorCount();\n#elif defined(_SC_NPROCESSORS_CONF)\n        int ncpu = sysconf(_SC_NPROCESSORS_CONF);\n        if (ncpu <= 0)\n           MADNESS_EXCEPTION(\"ThreadBase: set_affinity_pattern: sysconf(_SC_NPROCESSORS_CONF)\", ncpu);\n        return ncpu;\n#elif defined(HC_NCPU)\n        int mib[2]={CTL_HW,HW_NCPU};\n        size_t len = sizeof(ncpu);\n        if (sysctl(mib, 2, &ncpu, &len, nullptr, 0) != 0)\n            MADNESS_EXCEPTION(\"ThreadBase: sysctl(CTL_HW,HW_NCPU) failed\", 0);\n        //std::cout << \"NCPU \" << ncpu << std::endl;\n#else\n        return std::thread::hardware_concurrency();\n\t//return get_nprocs();\n#endif\n    }\n\n\n#ifdef MADNESS_TASK_PROFILING\n\n    namespace profiling {\n\n        void TaskProfiler::write_to_file() {\n            // Get output filename: NAME_[rank]x[threads + 1]\n            if(output_file_name_ != nullptr) {\n                // Construct the actual output filename\n                std::stringstream file_name;\n                file_name << output_file_name_ << \"_\"\n                        << SafeMPI::COMM_WORLD.Get_rank() << \"x\"\n                        << ThreadPool::size() + 1;\n\n                // Lock file for output\n                ScopedMutex<Mutex> locker(TaskProfiler::output_mutex_);\n\n                // Open the file for output\n                std::ofstream file(file_name.str().c_str(), std::ios_base::out | std::ios_base::app);\n                if(! file.fail()) {\n                    // Print the task profile data\n                    // and delete the data since it is not needed anymore\n                    const TaskEventListBase* next = nullptr;\n                    while(head_ != nullptr) {\n                        next = head_->next();\n                        file << *head_;\n                        delete head_;\n                        head_ = const_cast<TaskEventListBase*>(next);\n                    }\n\n                    tail_ = nullptr;\n                } else {\n                    std::cerr << \"!!! ERROR: TaskProfiler cannot open file: \"\n                            << file_name.str() << \"\\n\";\n                }\n\n                // close the file\n                file.close();\n            } else {\n                // Nothing is written so just cleanup data\n                const TaskEventListBase* next = nullptr;\n                while(head_ != nullptr) {\n                    next = head_->next();\n                    delete head_;\n                    head_ = const_cast<TaskEventListBase*>(next);\n                }\n\n                tail_ = nullptr;\n            }\n        }\n\n\n    } // namespace profiling\n\n#endif // MADNESS_TASK_PROFILING\n\n#if HAVE_PARSEC\n    ParsecRuntime *ThreadPool::parsec_runtime = nullptr;\n#endif\n\n    // The constructor is private to enforce the singleton model\n    ThreadPool::ThreadPool(int nthread)\n    : threads(nullptr)\n    , main_thread()\n    , nthreads(nthread)\n    , finish(false)\n    {\n        nfinished = 0;\n        instance_ptr = this;\n        if (nthreads < 0) nthreads = default_nthread();\n        MADNESS_ASSERT(nthreads >=0);\n\n        const int rc = pthread_setspecific(ThreadBase::thread_key,\n                static_cast<void*>(&main_thread));\n        if(rc != 0)\n            MADNESS_EXCEPTION(\"pthread_setspecific failed\", rc);\n#if HAVE_PARSEC\n        MADNESS_ASSERT(nullptr == parsec_runtime);\n        const int num_parsec_threads = nthreads + 1;\n        parsec_runtime = new ParsecRuntime(num_parsec_threads);\n#elif HAVE_INTEL_TBB\n// #if HAVE_INTEL_TBB\n\n        if(nthreads < 1)\n            nthreads = 1;\n\n        //  nranks > 1: there are nthreads+2 because the main and communicator thread\n        //              are counted as part of tbb.\n        // nranks == 1: there are nthreads+1 because the main\n        //              is counted as part of tbb.\n        const int num_tbb_threads = (SafeMPI::COMM_WORLD.Get_size() > 1) ? nthreads + 2 : nthreads + 1;\n        tbb_control = std::make_unique<tbb::global_control>(tbb::global_control::max_allowed_parallelism, num_tbb_threads);\n        tbb_arena   = std::make_unique<tbb::task_arena>(num_tbb_threads);\n#else\n\n        if (nthreads>64)\n            MADNESS_EXCEPTION(\"When configured with MADNESS_TASK_BACKEND=Pthreads MAD_NUM_THREADS cannot exceed 64\",1);\n\n        try {\n            if (nthreads > 0)\n                threads = new ThreadPoolThread[nthreads];\n            else\n                threads = 0;\n        }\n        catch (...) {\n            MADNESS_EXCEPTION(\"memory allocation failed\", 0);\n        }\n\n        for (int i=0; i<nthreads; ++i) {\n            threads[i].set_pool_thread_index(i);\n            threads[i].start(pool_thread_main, (void *)(threads+i));\n        }\n#endif\n        /****************************/\n    }\n\n    // Get number of threads from the environment\n    int ThreadPool::default_nthread() {\n        int nthread;\n        int shift = 0;\n        char *cnthread = getenv(\"MAD_NUM_THREADS\");\n        // MAD_NUM_THREADS is total no. of application threads whereas\n        // POOL_NTHREAD is just the number in the pool (one less)\n        if (cnthread) shift = 1;\n        if (cnthread == 0) cnthread = getenv(\"POOL_NTHREAD\");\n\n        if (cnthread) {\n            int result = sscanf(cnthread, \"%d\", &nthread);\n            if (result != 1)\n                MADNESS_EXCEPTION(\"POOL_NTHREAD is not an integer\", result);\n            nthread -= shift;\n        }\n        else {\n            nthread = ThreadBase::num_hw_processors();\n            if (nthread < 2)\n                nthread = 2;\n            nthread = nthread - 1; // One less than # physical processors\n        }\n        return nthread;\n    }\n\n    void ThreadPool::thread_main(ThreadPoolThread* const thread) {\n        PROFILE_MEMBER_FUNC(ThreadPool);\n\tbinder.bind();\n\n#if !HAVE_PARSEC\n#define MULTITASK\n#ifdef  MULTITASK\n        while (!finish) {\n            run_tasks(true, thread);\n        }\n#else\n        while (!finish) {\n            run_task(true, thread);\n        }\n#endif\n#endif\n\n#ifdef MADNESS_TASK_PROFILING\n        thread->profiler().write_to_file();\n#endif // MADNESS_TASK_PROFILING\n\n        nfinished++;\n    }\n\n    // Forwards thread to bound member function\n    void* ThreadPool::pool_thread_main(void *v) {\n        instance()->thread_main((ThreadPoolThread*)(v));\n        return 0;\n    }\n\n    void ThreadPool::begin(int nthread) {\n        // Check that the singleton has not been previously initialized\n        if(instance_ptr) return;\n\n        ThreadBase::init_thread_key();\n\n        // Construct the thread pool singleton\n        instance_ptr = new ThreadPool(nthread);\n\n        const char* mad_wait_timeout = getenv(\"MAD_WAIT_TIMEOUT\");\n        if(mad_wait_timeout) {\n            std::stringstream ss(mad_wait_timeout);\n            ss >> await_timeout;\n            if(await_timeout < 0.0) {\n                if(SafeMPI::COMM_WORLD.Get_rank() == 0 && !madness::quiet())\n                    std::cout << \"!!MADNESS WARNING: Invalid wait timeout.\\n\"\n                              << \"!!MADNESS WARNING: MAD_WAIT_TIMEOUT = \" << mad_wait_timeout << \"\\n\";\n                await_timeout = 900.0;\n            }\n            if(SafeMPI::COMM_WORLD.Get_rank() == 0 && !madness::quiet()) {\n                if(await_timeout >= 1.0) {\n                    std::cout << \"MADNESS wait timeout set to \" << await_timeout << \" seconds.\\n\";\n                } else {\n                    std::cout << \"MADNESS wait timeout disabled.\\n\";\n                }\n            }\n        }\n\n#ifdef MADNESS_TASK_PROFILING\n        // Initialize the output file name for the task profiler.\n        profiling::TaskProfiler::output_file_name_ =\n                getenv(\"MAD_TASKPROFILER_NAME\");\n        if(! profiling::TaskProfiler::output_file_name_) {\n            if(SafeMPI::COMM_WORLD.Get_rank() == 0)\n                std::cerr\n                    << \"!!! WARNING: MAD_TASKPROFILER_NAME not set.\\n\"\n                    << \"!!! WARNING: There will be no task profile output.\\n\";\n        } else {\n            // Construct the actual output filename\n            std::stringstream file_name;\n            file_name << profiling::TaskProfiler::output_file_name_ << \"_\"\n                    << SafeMPI::COMM_WORLD.Get_rank() << \"x\"\n                    << ThreadPool::size() + 1;\n\n            // Erase the profiler output file\n            std::ofstream file(file_name.str().c_str(), std::ios_base::out | std::ios_base::trunc);\n            file.close();\n        }\n#endif  // MADNESS_TASK_PROFILING\n\n#if defined(HAVE_IBMBGQ) and defined(HPM)\n\tif (ThreadBase::main_instrumented) {\n\t  main_hpmctx = HPM_Prof_init_thread();\n\t  HPM_Prof_start(main_hpmctx);\n\t}\n#endif\n    }\n\n    void ThreadPool::end() {\n#if !HAVE_INTEL_TBB\n        if (!instance_ptr) return;\n        instance()->finish = true;\n#if !HAVE_PARSEC\n        for (int i=0; i<instance()->nthreads; ++i) {\n            add(new PoolTaskNull);\n        }\n\tinstance_ptr->flush_prebuf();\n        while (instance_ptr->nfinished != instance_ptr->nthreads);\n#else  /* HAVE_PARSEC */\n        /* Remove the fake task we used to keep the engine up and running */\n        parsec_runtime->wait();\n#endif\n#ifdef MADNESS_TASK_PROFILING\n        instance_ptr->main_thread.profiler().write_to_file();\n#endif // MADNESS_TASK_PROFILING\n\n        ThreadBase::delete_thread_key();\n#endif\n\n#if defined(HAVE_IBMBGQ) and defined(HPM)\n\tif (ThreadBase::main_instrumented) HPM_Prof_stop(main_hpmctx);\n#endif\n        delete instance_ptr;\n        instance_ptr = nullptr;\n    }\n\n    // Returns queue statistics\n    const DQStats& ThreadPool::get_stats() {\n        return instance()->queue.get_stats();\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/thread.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_THREAD_H__INCLUDED\n#define MADNESS_WORLD_THREAD_H__INCLUDED\n\n/**\n \\file thread.h\n \\brief Implements Dqueue, Thread, ThreadBase and ThreadPool.\n \\ingroup threads\n*/\n\n#include <madness/world/thread_info.h>\n#include <madness/world/dqueue.h>\n#include <madness/world/function_traits.h>\n#include <vector>\n#include <cstddef>\n#include <cstdio>\n#include <pthread.h>\n\n#include <functional>\n#include <type_traits>\n#include <typeinfo>\n#include <new>\n\n//////////// Parsec Related Begin ////////////////////\n#ifdef HAVE_PARSEC\n#include \"parsec.h\"\n#endif\n//////////// Parsec Related End ////////////////////\n\n#ifdef MADNESS_TASK_PROFILING\n#include <execinfo.h> // for backtrace_symbols\n#ifndef USE_LIBIBERTY\n#include <cxxabi.h> // for abi::__cxa_demangle\n#else\nextern \"C\" {\n  extern char * cplus_demangle (const char *mangled, int options);\n#define DMGL_NO_OPTS     0              /* For readability... */\n}\n#endif\n#include <sstream> // for std::istringstream\n#include <cstring> // for strchr & strrchr\n#endif // MADNESS_TASK_PROFILING\n\n#ifdef HAVE_INTEL_TBB\n#include <tbb/task_arena.h>\n#ifndef TBB_PREVIEW_GLOBAL_CONTROL\n# define TBB_PREVIEW_GLOBAL_CONTROL 1\n#endif\n# include <tbb/global_control.h>\n#endif\n\n\n#ifndef _SC_NPROCESSORS_CONF\n// Old macs don't have necessary support thru sysconf to determine the\n// no. of processors so must use sysctl\n#include <sys/types.h>\n#include <sys/sysctl.h>\n#endif\n\nnamespace madness {\n\n    // Forward decls.\n    class Barrier;\n    class ThreadPool;\n    class WorldTaskQueue;\n    class AtomicInt;\n    void error(const char *msg);\n\n    /// purges tasks from this thread (if any) so that it's safe to make blocking calls from it\n    /// @note this is only needed for the Pthreads backend\n    inline void thread_purge();\n\n    class ThreadBinder {\n      static const size_t maxncpu = 1024;\n      bool print;\n      size_t ncpu = 0;\n      bool do_bind = true;\n      size_t cpus[maxncpu];\n      std::atomic<size_t> nextcpu = 0;\n      static thread_local bool bound;\n      \n    public:\n      \n      ThreadBinder(bool print = false) : print(print) {\n#ifndef ON_A_MAC\n\tncpu = 0;\n        cpu_set_t mask;\n        sched_getaffinity(0, sizeof(mask), &mask);\n        for (size_t i=0; i<maxncpu; i++) {\n\t  if (CPU_ISSET(int(i),&mask)) {\n\t    MADNESS_CHECK(ncpu <= maxncpu);\n\t    cpus[ncpu++] = i;\n\t  }\n\t}\n\tif (print) {\n\t  std::cout << \"ncpu: \" << get_ncpu() << std::endl;\n\t  for (size_t i=0; i<get_ncpu(); i++) {\n\t    std::cout << get_cpus()[i] << \" \" ;\n\t  }\n\t  std::cout << std::endl;\n\t}\n\tnextcpu = ncpu/2;\n#endif\n          if (this->print) { };\n      }\n\n      void set_do_bind(bool value) {do_bind = value;}\n      \n      const size_t* get_cpus() const { return cpus; }\n      \n      size_t get_ncpu() const { return ncpu; }\n      \n      void bind() {\n#ifndef ON_A_MAC\n\tif (do_bind && !bound) { // In TBB this is called by each task, so check do_bind first\n\t  bound = true;\n\t  cpu_set_t mask;\n\t  CPU_ZERO(&mask);\n\t  size_t cpu = cpus[nextcpu++ % ncpu];\n\t  CPU_SET(cpu, &mask);\n\t  sched_setaffinity(0, sizeof(mask), &mask);\n\t  if (print) std::cout << \"bound thread to \" << cpu << std::endl;\n\t}\n#endif\n      }\n    };\n\n    extern ThreadBinder binder;\n\n    /// \\addtogroup threads\n    /// @{\n\n    /// Simplified thread wrapper to hide pthread complexity.\n\n    /// If the thread is using any of the object state, you cannot\n    /// delete the object until the thread has terminated.\n    ///\n    /// The cleanest solution is to put the object on the heap and\n    /// have the run method `delete this` at its end.\n    class ThreadBase {\n        friend class ThreadPool;\n\n        static pthread_key_t thread_key; ///< Thread id key.\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in,out] self Description needed.\n        /// \\return Description needed.\n        static void* main(void* self);\n\n        int pool_num; ///< Stores index of thread in pool or -1.\n        pthread_t id; ///< \\todo Brief description needed.\n\n        /// \\todo Brief description needed.\n        static void init_thread_key() {\n           const int rc = pthread_key_create(&thread_key, nullptr);\n           if(rc != 0)\n               MADNESS_EXCEPTION(\"pthread_key_create failed\", rc);\n        }\n\n        /// \\todo Brief description needed.\n        static void delete_thread_key() {\n           pthread_key_delete(thread_key);\n        }\n\n        /// Sets the index of this thread within the pool.\n\n        /// \\todo Verify documentation.\n        /// \\param[in] i The index of this thread.\n        void set_pool_thread_index(int i) {\n            pool_num = i;\n        }\n\n#if defined(HAVE_IBMBGQ) and defined(HPM)\n        static const int hpm_thread_id_all = -10; ///< \\todo Brief description needed.\n        static const int hpm_thread_id_main = -2; ///< \\todo Brief description needed.\n        static bool main_instrumented; ///< \\todo Brief description needed.\n        static bool all_instrumented; ///< \\todo Brief description needed.\n        static int hpm_thread_id; ///< \\todo Brief description needed.\n#endif\n\n    public:\n\n        /// Default constructor.\n\n        /// Sets up the thread; however, \\c start() must be invoked to\n        /// actually begin the thread.\n        ThreadBase() : pool_num(-1) { }\n\n        virtual ~ThreadBase() { }\n\n        /// Function to be executed by the thread.\n\n        /// Override this to do work.\n        virtual void run() = 0;\n\n        /// Start the thread running.\n        void start();\n\n        /// A thread can call this to terminate its execution.\n        static void exit() {\n            pthread_exit(0);\n        }\n\n        /// Get the pthread id of this thread (if running).\n        const pthread_t& get_id() const {\n            return id;\n        }\n\n        /// Get index of this thread in \\c ThreadPool.\n\n        /// \\return (0,...,nthread-1) or -1 if not in the \\c ThreadPool.\n        int get_pool_thread_index() const {\n            return pool_num;\n        }\n\n        /// Cancel this thread.\n        int cancel() const {\n            return pthread_cancel(get_id());\n        }\n\n\n        /// Get number of actual hardware processors.\n\n        /// \\return The number of hardward processors.\n        static int num_hw_processors();\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\return Description needed.\n        static ThreadBase* this_thread() {\n            return static_cast<ThreadBase*>(pthread_getspecific(thread_key));\n        }\n\n#if defined(HAVE_IBMBGQ) and defined(HPM)\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in] hpm_thread_id Description needed.\n        static void set_hpm_thread_env(int hpm_thread_id);\n#endif\n    }; // class ThreadBase\n\n    /// Simplified thread wrapper to hide pthread complexity.\n    class Thread : public ThreadBase {\n        void* (*f)(void *); ///< The function called for executing this thread. \\todo should we replace this by a std::function?\n        void* args; ///< The arguments passed to this thread for execution.\n\n        /// Invokes the function for this thread.\n        void run() {\n            f(args);\n        }\n\n    public:\n        /// Default constructor.\n\n        /// \\c start() must be invoked to actually execute the thread.\n        Thread() : f(nullptr), args(nullptr) { }\n\n        /// Create a thread and start it running `f(args)`.\n\n        /// \\param[in] f The function to be called.\n        /// \\param[in,out] args The arguments to the function.\n        Thread(void* (*f)(void *), void* args=nullptr)\n                : f(f), args(args) {\n            ThreadBase::start();\n        }\n\n        /// Start the thread by running `f(args)`.\n\n        /// \\param[in] f The function to be called.\n        /// \\param[in,out] args The arguments to the function.\n        void start(void* (*f)(void *), void* args=nullptr) {\n            this->f = f;\n            this->args = args;\n            ThreadBase::start();\n        }\n\n        virtual ~Thread() = default;\n    }; // class Thread\n\n\n    /// Contains attributes of a task.\n\n    /// The current attributes are:\n    /// - \\c generator : Setting this hints that a task will produce\n    ///   additional tasks and is used by the scheduler to\n    ///   increase/throttle parallelism. The default is false.\n    /// - \\c stealable : Setting this indicates that a task may be\n    ///   migrated to another process for dynamic load balancing. The\n    ///   default value is false.\n    /// - \\c highpriority : indicates a high priority task. The default\n    ///   value is false.\n    /// - \\c nthread : indicates number of threads. 0 threads is interpreted\n    ///   as 1 thread for backward compatibility and ease of specifying\n    ///   defaults. The default value is 0 (==1).\n    class TaskAttributes {\n        unsigned long flags; ///< Byte-string storing the specified attributes.\n\n    public:\n    \tstatic const unsigned long NTHREAD = 0xff; ///< Mask for nthread byte.\n        static const unsigned long GENERATOR = 1ul<<8; ///< Mask for generator bit.\n        static const unsigned long STEALABLE = GENERATOR<<1; ///< Mask for stealable bit.\n        static const unsigned long HIGHPRIORITY = GENERATOR<<2; ///< Mask for priority bit.\n\n        /// Sets the attributes to the desired values.\n\n        /// `flags`, if unspecified sets all attributes to their default\n        /// values.\n        /// \\param[in] flags The attribute values.\n        explicit TaskAttributes(unsigned long flags = 0)\n            : flags(flags) {}\n\n        /// Copy constructor.\n\n        /// \\param[in] attr The attributes to copy.\n        TaskAttributes(const TaskAttributes& attr)\n            : flags(attr.flags) {}\n\n        virtual ~TaskAttributes() {}\n\n        /// Test if the generator attribute is true.\n\n        /// \\return True if this task is a generator, false otherwise.\n        bool is_generator() const {\n            return flags&GENERATOR;\n        }\n\n        /// Test if the stealable attribute is true.\n\n        /// \\return True if this task is stealable, false otherwise.\n        bool is_stealable() const {\n            return flags&STEALABLE;\n        }\n\n        /// Test if the high priority attribute is true.\n\n        /// \\return True if this task is a high priority, false otherwise.\n        bool is_high_priority() const {\n            return flags&HIGHPRIORITY;\n        }\n\n        /// Sets the generator attribute.\n\n        /// \\param[in] generator_hint The new value for the generator attribute.\n        TaskAttributes& set_generator(bool generator_hint) {\n            if (generator_hint)\n                flags |= GENERATOR;\n            else\n                flags &= ~GENERATOR;\n            return *this;\n        }\n\n        /// Sets the stealable attribute.\n\n        /// \\param[in] stealable The new value for the stealable attribute.\n        TaskAttributes& set_stealable(bool stealable) {\n            if (stealable) flags |= STEALABLE;\n            else flags &= ~STEALABLE;\n            return *this;\n        }\n\n        /// Sets the high priority attribute.\n\n        /// \\param[in] hipri The new value for the high priority attribute.\n        TaskAttributes& set_highpriority(bool hipri) {\n            if (hipri)\n                flags |= HIGHPRIORITY;\n            else\n                flags &= ~HIGHPRIORITY;\n            return *this;\n        }\n\n        /// Set the number of threads.\n\n        /// \\attention Are you sure this is what you want to call? Only call\n        /// this for a \\c TaskAttributes that is \\em not a base class of a task\n        /// object.\n        /// \\p If you are trying to set the number of threads in an \\em existing\n        /// task you should call \\c TaskInterface::set_nthread() instead. No\n        /// doubt there is some virtual/protected/something voodoo to prevent\n        /// you from doing harm.\n        ///\n        /// \\todo Perhaps investigate a way to make this function only accessible\n        /// from the intended functions (using the so-called voodoo)?\n        ///\n        /// \\param[in] nthread The new number of threads.\n        void set_nthread(int nthread) {\n            MADNESS_ASSERT(nthread>=0 && nthread<256);\n            flags = (flags & (~NTHREAD)) | (nthread & NTHREAD);\n        }\n\n        /// Get the number of threads.\n\n        /// \\return The number of threads.\n        int get_nthread() const {\n        \tint n = flags & NTHREAD;\n        \tif (n == 0)\n        \t    n = 1;\n        \treturn n;\n        }\n\n        /// Serializes the attributes for I/O.\n\n        /// tparam Archive The archive type.\n        /// \\param[in,out] ar The archive.\n        template <typename Archive>\n        void serialize(Archive& ar) {\n            ar & flags;\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\return Description needed.\n        static TaskAttributes generator() {\n            return TaskAttributes(GENERATOR);\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\return Description needed.\n        static TaskAttributes hipri() {\n            return TaskAttributes(HIGHPRIORITY);\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\return Description needed.\n        static TaskAttributes multi_threaded(int nthread) {\n            TaskAttributes t;\n            t.set_nthread(nthread);\n            return t;\n        }\n    };\n\n    /// Used to pass information about the thread environment to a user's task.\n    class TaskThreadEnv {\n        const int _nthread; ///< Number of threads collaborating on task.\n        const int _id; ///< ID of this thread (0,...,nthread-1).\n        Barrier* _barrier; ///< Pointer to the shared barrier, `null` if there is only a single thread.\n\n    public:\n        /// Constructor collecting necessary environmental information.\n\n        /// \\todo Verify this documentation.\n        /// \\param[in] nthread The number of threads collaborating on this task.\n        /// \\param[in] id The ID of this thread.\n        /// \\param[in] barrier Pointer to the shared barrier.\n        TaskThreadEnv(int nthread, int id, Barrier* barrier)\n            : _nthread(nthread), _id(id), _barrier(barrier)\n        {::madness::binder.bind();}\n\n#if HAVE_INTEL_TBB\n        /// Constructor collecting necessary environmental information.\n\n        /// \\todo Verify this documentation.\n        /// \\param[in] nthread The number of threads collaborating on this task.\n        /// \\param[in] id The ID of this thread.\n        ///\n        /// \\todo I cannot get the TaskThreadEnv to work with Barrier.\n        /// Need to figure out why.\n        TaskThreadEnv(int nthread, int id)\n            : _nthread(nthread), _id(id), _barrier(nullptr)\n      {::madness::binder.bind();};\n#endif\n\n        /// Get the number of threads collaborating on this task.\n\n        /// \\return The number of threads.\n        int nthread() const {\n            return _nthread;\n        }\n\n        /// Get the ID of this thread.\n\n        /// \\return The ID of this thread.\n        int id() const {\n            return _id;\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\return Description needed.\n        bool barrier() const {\n            if (_nthread == 1)\n                return true;\n            else {\n                MADNESS_ASSERT(_barrier);\n                return _barrier->enter(_id);\n            }\n        }\n    };\n\n\n#ifdef MADNESS_TASK_PROFILING\n\n    namespace profiling {\n\n        /// Task event class.\n\n        /// This class is used to record the task trace information, including\n        /// submit, start, and stop times, as well as identification information.\n        class TaskEvent {\n        private:\n            double times_[3]; ///< Task trace times: { submit, start, stop }.\n            std::pair<void*, unsigned short> id_; ///< Task identification information.\n            unsigned short threads_; ///< Number of threads used by the task.\n\n            /// Print demangled symbol name.\n\n            /// Add the demangled symbol name to \\c os. If demangling fails,\n            /// the unmodified symbol name is used instead. If symbol is NULL,\n            /// \"UNKNOWN\" is used instead. A tab character is added after the\n            /// symbol name.\n            /// \\param[in,out] os The output stream.\n            /// \\param[in] symbol The symbol to add to the stream.\n            static void print_demangled(std::ostream& os, const char* symbol) {\n                // Get the demagled symbol name\n                if(symbol) {\n                    int status = 0;\n#ifndef USE_LIBIBERTY\n                    const char* name = abi::__cxa_demangle(symbol, 0, 0, &status);\n#else\n\t\t    char* name = cplus_demangle(symbol, DMGL_NO_OPTS);\n#endif\n                    // Append the demangled symbol name to the output stream\n                    if(status == 0) {\n                        os << name << \"\\t\";\n                        free((void*)name);\n                    } else {\n                        os << symbol << \"\\t\";\n                    }\n                } else {\n                    os << \"UNKNOWN\\t\";\n                }\n            }\n\n            /// Get name of the function pointer.\n\n            /// \\return The mangled function name.\n            std::string get_name() const {\n\n                // Get the backtrace symbol for the function address,\n                // which contains the function name.\n                void* const * func_ptr = const_cast<void* const *>(& id_.first);\n                char** bt_sym = backtrace_symbols(func_ptr, 1);\n\n                // Extract the mangled function name from the backtrace\n                // symbol.\n                std::string mangled_name;\n\n#ifdef ON_A_MAC\n                // Format of bt_sym is:\n                // <frame #> <file name> <address> <mangled name> + <function offset>\n                std::istringstream iss(bt_sym[0]);\n                long frame;\n                std::string file, address;\n                iss >> frame >> file >> address >> mangled_name;\n#else // Assume Linux\n                // Format of bt_sym is:\n                // <file>(<mangled name>+<function offset>) [<address>]\n                const char* first = strchr(bt_sym[0],'(');\n                if(first) {\n                    ++first;\n                    const char* last = strrchr(first,'+');\n                    if(last)\n                        mangled_name.assign(first, (last - first) - 1);\n                }\n#endif // ON_A_MAC\n\n                // Free the backtrace buffer\n                free(bt_sym);\n\n                return mangled_name;\n            }\n\n        public:\n\n            // Only default constructors are needed.\n\n            /// Record the start time of the task and collect task information.\n\n            /// \\param[in,out] id The task identifier (a function pointer or const char*)\n            ///     and an integer to differentiate the different types.\n            /// \\param[in] threads The number of threads this task uses.\n            /// \\param[in] submit_time The time that the task was submitted to the\n            ///     task queue.\n            void start(const std::pair<void*, unsigned short>& id,\n                    const unsigned short threads, const double submit_time)\n            {\n                id_ = id;\n                threads_ = threads;\n                times_[0] = submit_time;\n                times_[1] = wall_time();\n            }\n\n            /// Record the stop time of the task.\n            void stop() {\n                times_[2] = wall_time();\n            }\n\n            /// Output the task data using a tab-separated list.\n\n            /// Output information includes\n            /// - the ID pointer\n            /// - the function, member function, and object type name\n            /// - the number of threads used by the task\n            /// - the submit time\n            /// - the start time\n            /// - the stop time.\n            ///\n            /// \\param[in,out] os The output stream.\n            /// \\param[in] te The task event to be output.\n            /// \\return The \\c os reference.\n            friend std::ostream& operator<<(std::ostream& os, const TaskEvent& te) {\n                // Add address to output stream\n                os << std::hex << std::showbase << te.id_.first <<\n                        std::dec << std::noshowbase << \"\\t\";\n\n                // Print the name\n                switch(te.id_.second) {\n                    case 1:\n                        {\n                            const std::string mangled_name = te.get_name();\n\n                            // Print the demangled name\n                            if(! mangled_name.empty())\n                                print_demangled(os, mangled_name.c_str());\n                            else\n                                os << \"UNKNOWN\\t\";\n                        }\n                        break;\n                    case 2:\n                        print_demangled(os, static_cast<const char*>(te.id_.first));\n                        break;\n                    default:\n                        os << \"UNKNOWN\\t\";\n                }\n\n                // Print:\n                // # of threads, submit time, start time, stop time\n                os << te.threads_;\n                const std::streamsize precision = os.precision();\n                os.precision(6);\n                os << std::fixed << \"\\t\" << te.times_[0]\n                        << \"\\t\" << te.times_[1] << \"\\t\" << te.times_[2];\n                os.precision(precision);\n                return os;\n            }\n\n        }; // class TaskEvent\n\n        /// Task event list base class.\n\n        /// This base class allows the data to be stored in a linked list.\n        class TaskEventListBase {\n        private:\n            TaskEventListBase* next_; ///< The next task event in the list.\n\n            TaskEventListBase(const TaskEventListBase&) = delete;\n            TaskEventListBase& operator=(const TaskEventListBase&) = delete;\n\n        public:\n\n            /// Default constructor.\n            TaskEventListBase()\n                : next_(nullptr) { }\n\n            /// Virtual destructor.\n            virtual ~TaskEventListBase() = default;\n\n            /// Get the next event list in the linked list.\n\n            /// \\return The next event list.\n            TaskEventListBase* next() const {\n                return next_;\n            }\n\n            /// Insert \\c list after this list.\n\n            /// \\param[in] list The list to be inserted.\n            void insert(TaskEventListBase* list) {\n                if(next_)\n                    list->next_ = next_;\n                next_ = list;\n            }\n\n            /// Output a task event list to an output stream.\n\n            /// \\param[in,out] os The ouptut stream.\n            /// \\param[in] tel The task event list to be output.\n            /// \\return The modified output stream.\n            friend inline std::ostream& operator<<(std::ostream& os, const TaskEventListBase& tel) {\n                return tel.print_events(os);\n            }\n\n        private:\n\n            /// Print the events.\n            virtual std::ostream& print_events(std::ostream&) const = 0;\n\n        }; // class TaskEventList\n\n        /// A list of task events.\n\n        /// This object is used by the thread pool to record task data.\n        class TaskEventList : public TaskEventListBase {\n        private:\n            unsigned int n_; ///< The number of events recorded.\n            std::unique_ptr<TaskEvent[]> events_; ///< The event array.\n\n            TaskEventList(const TaskEventList&) = delete;\n            TaskEventList& operator=(const TaskEventList&) = delete;\n\n        public:\n\n            /// Default constructor.\n\n            /// \\param[in] nmax The maximum number of task events.\n            /// \\todo Should nmax be stored? I think it used to be a template\n            ///    parameter (N), which is no longer present.\n            TaskEventList(const unsigned int nmax) :\n                TaskEventListBase(), n_(0ul), events_(new TaskEvent[nmax])\n            { }\n\n            /// Virtual destructor.\n            virtual ~TaskEventList() = default;\n\n            /// Get a new event from this list.\n\n            /// \\warning This function can only be called \\c nmax times. It is\n            /// the caller's resonsibility to ensure that it is not called too\n            /// many times.\n            /// \\return The new event from the list.\n            TaskEvent* event() {\n                return events_.get() + (n_++);\n            }\n\n        private:\n\n            /// Print events recorded in this list.\n\n            /// \\param[in,out] os The output stream.\n            /// \\return The modified output stream.\n            virtual std::ostream& print_events(std::ostream& os) const {\n                const int thread_id = ThreadBase::this_thread()->get_pool_thread_index();\n                for(std::size_t i = 0; i < n_; ++i)\n                    os << thread_id << \"\\t\" << events_[i] << std::endl;\n                return os;\n            }\n\n        }; // class TaskEventList\n\n        /// This class collects and prints task profiling data.\n\n        /// \\note Each thread has its own \\c TaskProfiler object, so only one\n        /// thread will ever operate on this object at a time and all operations\n        /// are inheirently thread safe.\n        class TaskProfiler {\n        private:\n            TaskEventListBase* head_; ///< The head of the linked list of data.\n            TaskEventListBase* tail_; ///< The tail of the linked list of data.\n\n            static Mutex output_mutex_; ///< Mutex used to lock the output file.\n\n            TaskProfiler(const TaskProfiler&) = delete;\n            TaskProfiler& operator=(const TaskProfiler&) = delete;\n\n        public:\n            /// The output file name.\n\n            /// This variable is initialized by \\c ThreadPool::begin and is\n            /// assigned the value given by the environment variable\n            /// `MAD_TASKPROFILER_NAME`.\n            static const char* output_file_name_;\n\n        public:\n            /// Default constructor.\n            TaskProfiler()\n                : head_(nullptr), tail_(nullptr)\n            { }\n\n            /// Destructor.\n            ~TaskProfiler() {\n                // Cleanup linked list\n                TaskEventListBase* next = nullptr;\n                while(head_ != nullptr) {\n                    next = head_->next();\n                    delete head_;\n                    head_ = next;\n                }\n            }\n\n            /// Create a new task event list.\n\n            /// \\param[in] nmax The maximum number of elements that the list\n            ///     can contain.\n            /// \\return A new task event list.\n            TaskEventList* new_list(const std::size_t nmax) {\n                // Create a new event list\n                TaskEventList* list = new TaskEventList(nmax);\n\n                // Append the list to the tail of the linked list\n                if(head_ != nullptr) {\n                    tail_->insert(list);\n                    tail_ = list;\n                } else {\n                    head_ = list;\n                    tail_ = list;\n                }\n                return list;\n            }\n\n            /// Write the profile data to file.\n\n            /// The data is cleared after it is written to the file, so this\n            /// function may be called more than once.\n            ///\n            /// \\warning This function should only be called from the thread\n            /// that owns it, otherwise data will likely be corrupted.\n            ///\n            /// \\note This function is thread safe, in that it may be called by\n            /// different objects in different threads simultaneously.\n            void write_to_file();\n        }; // class TaskProfiler\n\n    } // namespace profiling\n\n#endif // MADNESS_TASK_PROFILING\n\n\n    /// Lowest level task interface.\n\n    /// The pool invokes \\c run_multi_threaded(), which does any necessary\n    /// setup for multiple threads, and then invokes the user's \\c run() method.\n    class PoolTaskInterface : public TaskAttributes\n    {\n        friend class ThreadPool;\n\n    private:\n\n#ifdef MADNESS_TASK_PROFILING\n    \tprofiling::TaskEvent* task_event_; ///< \\todo Description needed.\n    \tdouble submit_time_; ///< \\todo Description needed.\n        std::pair<void*, unsigned short> id_; ///< \\todo Description needed.\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in,out] task_event Description needed.\n        void set_event(profiling::TaskEvent* task_event) {\n            task_event_ = task_event;\n        }\n\n        /// Collect info on the task and record the submit time.\n        void submit() {\n            submit_time_ = wall_time();\n            this->get_id(id_);\n        }\n#endif // MADNESS_TASK_PROFILING\n\n        /// Object that is used to convert function and member function pointers into `void*`.\n\n        /// \\note This is technically not supported by the C++ standard but\n        /// it will likely not cause any issues here (famous last words?).\n        /// \\todo Descriptions needed.\n        /// \\tparam T Description needed.\n        template <typename T>\n        union FunctionPointerGrabber {\n            T in; ///< \\todo Description needed.\n            void* out; ///< \\todo Description needed.\n        };\n\n    protected:\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam fnT Description needed.\n        /// \\param[in,out] id Description needed.\n        /// \\param[in] fn Description needed.\n        /// \\return Description needed.\n        template <typename fnT>\n        static typename std::enable_if<detail::function_traits<fnT>::value ||\n                detail::memfunc_traits<fnT>::value>::type\n        make_id(std::pair<void*,unsigned short>& id, fnT fn) {\n            FunctionPointerGrabber<fnT> poop;\n            poop.in = fn;\n            id.first = poop.out;\n            id.second = 1ul;\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed. What is the purpose of the second argument?\n        /// \\tparam fnobjT Description needed.\n        /// \\param[in,out] id Description needed.\n        template <typename fnobjT>\n        static typename std::enable_if<!(detail::function_traits<fnobjT>::value ||\n                detail::memfunc_traits<fnobjT>::value) >::type\n        make_id(std::pair<void*,unsigned short>& id, const fnobjT&) {\n            id.first = reinterpret_cast<void*>(const_cast<char*>(typeid(fnobjT).name()));\n            id.second = 2ul;\n        }\n\n    private:\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in,out] id Description needed.\n        virtual void get_id(std::pair<void*,unsigned short>& id) const {\n            id.first = nullptr;\n            id.second = 0ul;\n        }\n\n#ifndef HAVE_INTEL_TBB\n\n        Barrier* barrier; ///< Barrier, only allocated for multithreaded tasks.\n        AtomicInt count; ///< Used to count threads as they start.\n\n    \t/// Returns true for the one thread that should invoke the destructor.\n\n        /// \\return True for the one thread that should invoke the destructor.\n    \tbool run_multi_threaded() {\n            // As a thread enters this routine it increments the shared counter\n            // to generate a unique id without needing any thread-local storage.\n            // A downside is this does not preserve any relationships between thread\n            // numbering and the architecture ... more work ahead.\n            int nthread = get_nthread();\n            if (nthread == 1) {\n#ifdef MADNESS_TASK_PROFILING\n                task_event_->start(id_, nthread, submit_time_);\n#endif // MADNESS_TASK_PROFILING\n                run(TaskThreadEnv(1,0,0));\n#ifdef MADNESS_TASK_PROFILING\n                task_event_->stop();\n#endif // MADNESS_TASK_PROFILING\n                return true;\n            }\n            else {\n                int id = count++;\n                volatile bool barrier_flag;\n                barrier->register_thread(id, &barrier_flag);\n\n#ifdef MADNESS_TASK_PROFILING\n                if(id == 0)\n                    task_event_->start(id_, nthread, submit_time_);\n#endif // MADNESS_TASK_PROFILING\n\n                run(TaskThreadEnv(nthread, id, barrier));\n\n#ifdef MADNESS_TASK_PROFILING\n                const bool cleanup = barrier->enter(id);\n                if(cleanup) task_event_->stop();\n                return cleanup;\n#else\n                return barrier->enter(id);\n#endif // MADNESS_TASK_PROFILING\n            }\n        }\n\n    public:\n\n        /// Default constructor.\n        PoolTaskInterface()\n            : TaskAttributes()\n            , barrier(nullptr)\n#if HAVE_PARSEC\n            , parsec_task(ParsecRuntime::task(is_high_priority(), this))\n#endif\n        {\n    \t    count = 0;\n    \t}\n\n        /// Constructor setting the specified task attributes.\n\n        /// \\param[in] attr The task attributes.\n        explicit PoolTaskInterface(const TaskAttributes& attr)\n            : TaskAttributes(attr)\n            , barrier(attr.get_nthread()>1 ? new Barrier(attr.get_nthread()) : 0)\n#if HAVE_PARSEC\n            , parsec_task(ParsecRuntime::task(is_high_priority(), this))\n#endif\n        {\n            count = 0;\n        }\n\n        /// Destructor.\n        /// \\todo Should we either use a unique_ptr for barrier or check that barrier != nullptr here?\n        virtual ~PoolTaskInterface() {\n#if HAVE_PARSEC\n          *(reinterpret_cast<PoolTaskInterface**>(&(parsec_task->locals[0]))) = nullptr;\n          ParsecRuntime::delete_parsec_task(parsec_task);\n          parsec_task = nullptr;\n#endif\n            delete barrier;\n        }\n\n        /// Call this to reset the number of threads before the task is submitted.\n\n        /// Once a task has been constructed, /c TaskAttributes::set_nthread()\n        /// is insufficient because a multithreaded task includes a barrier\n        /// that needs to know the number of threads.\n        ///\n        /// \\param[in] nthread The new number of threads.\n        void set_nthread(int nthread) {\n            if (nthread != get_nthread()) {\n                TaskAttributes::set_nthread(nthread);\n                delete barrier;\n                if (nthread > 1)\n                    barrier = new Barrier(nthread);\n                else\n                    barrier = 0;\n            }\n        }\n#if HAVE_PARSEC\n\t    //////////// Parsec Related Begin ////////////////////\n\t    parsec_task_t                       *parsec_task;\n\t    //////////// Parsec Related End   ///////////////////\n#endif\n\n#else\n\n    public:\n\n        /// Default constructor.\n        PoolTaskInterface() : TaskAttributes() {\n\t}\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in] attr Description needed.\n        explicit PoolTaskInterface(const TaskAttributes& attr) :\n            TaskAttributes(attr)\n        {\n\t}\n\n        /// Destructor.\n        virtual ~PoolTaskInterface() = default;\n\n        /// Call this to reset the number of threads before the task is submitted\n\n        /// Once a task has been constructed /c TaskAttributes::set_nthread()\n        /// is insufficient because a multithreaded task includes a\n        /// barrier that needs to know the number of threads.\n        void set_nthread(int nthread) {\n            if (nthread != get_nthread())\n                TaskAttributes::set_nthread(nthread);\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\return Description needed.\n        void execute() {\n            const int nthread = get_nthread();\n            run( TaskThreadEnv(nthread, 0) );\n        }\n\n#endif // HAVE_INTEL_TBB\n\n        /// Override this method to implement a multi-threaded task.\n\n        /// \\c info.nthread() will be the number of threads collaborating on this task.\n        ///\n        /// \\c info.id() will be the index of the current thread \\c id=0,...,nthread-1.\n        ///\n        /// \\c info.barrier() will be a barrier for all of the threads, and returns\n        ///     true for the last thread to enter the barrier (other threads get false).\n        ///\n        /// \\todo Description needed.\n        /// \\param[in] info Description needed.\n\n\n        virtual void run(const TaskThreadEnv& info) = 0;\n\n        };\n\n    /// A no-operation task used for various purposes.\n    class PoolTaskNull : public PoolTaskInterface {\n    public:\n        /// Execution function that does nothing.\n        void run(const TaskThreadEnv& /*info*/) {}\n\n        /// Destructor.\n        virtual ~PoolTaskNull() {}\n\n    private:\n        /// \\todo Brief description needed.\n\n        /// \\todo Description needed.\n        /// \\param[in,out] id Description needed.\n        virtual void get_id(std::pair<void*,unsigned short>& id) const {\n            PoolTaskInterface::make_id(id, &PoolTaskNull::run);\n        }\n    };\n\n    /// \\c ThreadPool thread object.\n\n    /// This class holds thread local data for thread pool threads. It can be\n    /// accessed via \\c ThreadBase::this_thread().\n    class ThreadPoolThread : public Thread {\n    private:\n        // Thread local data for thread pool\n#ifdef MADNESS_TASK_PROFILING\n        profiling::TaskProfiler profiler_; ///< \\todo Description needed.\n#endif // MADNESS_TASK_PROFILING\n\n    public:\n        ThreadPoolThread() : Thread() { }\n        virtual ~ThreadPoolThread() = default;\n\n#ifdef MADNESS_TASK_PROFILING\n        /// Task profiler accessor.\n\n        /// \\todo Description needed.\n        /// \\return Description needed.\n        profiling::TaskProfiler& profiler() {\n            return profiler_;\n        }\n#endif // MADNESS_TASK_PROFILING\n    };\n\n    /// A singleton pool of threads for dynamic execution of tasks.\n\n    /// \\attention You must instantiate the pool while running with just one\n    /// thread.\n    class ThreadPool {\n    public:\n      // non-copyable and non-movable\n      ThreadPool(const ThreadPool&) = delete;\n      ThreadPool(ThreadPool&&) = delete;\n      void operator=(const ThreadPool&) = delete;\n      void operator=(ThreadPool&&) = delete;\n\n      /// Get the number of threads from the environment.\n\n      /// \\return The number of threads.\n      static int default_nthread();\n\n    private:\n        friend class WorldTaskQueue;\n\n        // Thread pool data\n        ThreadPoolThread *threads; ///< Array of threads.\n        ThreadPoolThread main_thread; ///< Placeholder for main thread tls.\n        DQueue<PoolTaskInterface*> queue; ///< Queue of tasks.\n        int nthreads; ///< Number of threads.\n        volatile bool finish; ///< Set to true when time to stop.\n        AtomicInt nfinished; ///< Thread pool exit counter.\n\n        // Static data\n        static ThreadPool* instance_ptr; ///< Singleton pointer.\n        static const int nmax = 128; ///< Number of task a worker thread will pop from the task queue\n        static double await_timeout; ///< Waiter timeout.\n\n#if defined(HAVE_IBMBGQ) and defined(HPM)\n        static unsigned int main_hpmctx; ///< HPM context for main thread.\n#endif\n        /// The constructor is private to enforce the singleton model.\n\n        /// \\todo Description needed.\n        /// \\param[in] nthread Description needed.\n        ThreadPool(int nthread=-1);\n\n       /// Run the next task.\n\n        /// \\todo Verify and complete this documentation.\n        /// \\param[in] wait Block of true.\n        /// \\param[in,out] this_thread Description needed.\n        /// \\return True if a task was run.\n        bool run_task(bool wait, ThreadPoolThread* this_thread) {\n#if HAVE_INTEL_TBB\n            MADNESS_EXCEPTION(\"run_task should not be called when using Intel TBB\", 1);\n#else\n\n            if (!wait && queue.empty()) return false;\n            std::pair<PoolTaskInterface*,bool> t = queue.pop_front(wait);\n#ifdef MADNESS_TASK_PROFILING\n            profiling::TaskEventList* event_list =\n                    this_thread->profiler().new_list(1);\n#endif // MADNESS_TASK_PROFILING\n            // Task pointer might be zero due to stealing\n            if (t.second && t.first) {\n#ifdef MADNESS_TASK_PROFILING\n                t.first->set_event(event_list->event());\n#endif // MADNESS_TASK_PROFILING\n                if (t.first->run_multi_threaded())         // What we are here to do\n                    delete t.first;\n            }\n            return t.second;\n#endif\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in] wait Description needed.\n        /// \\param[in,out] this_thread Description needed.\n        /// \\return Description needed.\n        bool run_tasks(bool wait, ThreadPoolThread* const this_thread) {\n#if HAVE_INTEL_TBB\n//            if (!wait && tbb_task_list->empty()) return false;\n//            tbb::task* t = &tbb_task_list->pop_front();\n//            if (t) {\n//                tbb_parent_task->increment_ref_count();\n//                tbb_parent_task->enqueue(*t);\n//            }\n\n//            wait = (tbb_parent_task->ref_count() >= 1) ? false : true;\n//            return wait;\n\n            MADNESS_EXCEPTION(\"run_tasks should not be called when using Intel TBB\", 1);\n#else\n\n            PoolTaskInterface* taskbuf[nmax];\n            int ntask = queue.pop_front(nmax, taskbuf, wait);\n#ifdef MADNESS_TASK_PROFILING\n            profiling::TaskEventList* event_list =\n                    this_thread->profiler().new_list(ntask);\n#endif // MADNESS_TASK_PROFILING\n            for (int i=0; i<ntask; ++i) {\n                if (taskbuf[i]) { // Task pointer might be zero due to stealing\n#ifdef MADNESS_TASK_PROFILING\n                    taskbuf[i]->set_event(event_list->event());\n#endif // MADNESS_TASK_PROFILING\n                    if (taskbuf[i]->run_multi_threaded()) {\n                        delete taskbuf[i];\n                    }\n                }\n            }\n#if HAVE_PARSEC\n            ////////////////// Parsec Related Begin //////////////////\n            if(0 == ntask) {\n                ntask = parsec_runtime->test();\n            }\n            ///////////////// Parsec Related End ////////////////////\n#endif\n            return (ntask>0);\n#endif\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Description needed.\n        /// \\param[in,out] thread Description needed.\n        void thread_main(ThreadPoolThread* const thread);\n\n        /// Forwards the thread to bound member function.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in] v Description needed.\n        /// \\return Description needed.\n        static void* pool_thread_main(void *v);\n\n    public:\n        /// Return a pointer to the only instance, constructing as necessary.\n\n        /// \\return A pointer to the only instance.\n        static ThreadPool* instance() {\n#ifndef MADNESS_ASSERTIONS_DISABLE\n            if(! instance_ptr) {\n                std::cerr << \"!!! ERROR: The thread pool has not been initialized.\\n\"\n                          << \"!!! ERROR: Call madness::initialize before submitting tasks to the task queue.\\n\";\n                MADNESS_EXCEPTION(\"ThreadPool::instance_ptr is NULL\", 0);\n            }\n#endif\n            return instance_ptr;\n        }\n\n\tvoid flush_prebuf() {\n#if !(defined(HAVE_INTEL_TBB) || defined(HAVE_PARSEC))\n\t  queue.lock_and_flush_prebuf();\n#endif\n\t}\n\n#if HAVE_PARSEC\n\t    ////////////////// Parsec Related Begin //////////////////\n\t    static ParsecRuntime *parsec_runtime;\n\t    ///////////////// Parsec Related End ////////////////////\n#endif\n\n#if HAVE_INTEL_TBB\n        static std::unique_ptr<tbb::global_control> tbb_control; ///< \\todo Description needed.\n        static std::unique_ptr<tbb::task_arena>     tbb_arena;\n#endif\n\n        /// Please invoke while in a single-threaded environment.\n\n        /// \\todo Verify documentation.\n        /// \\param[in] nthread The number of threads.\n        static void begin(int nthread=-1);\n\n        /// \\todo Description needed.\n        static void end();\n\n        /// Add a new task to the pool.\n\n        /// \\todo Description needed.\n        /// \\param[in,out] task Description needed.\n        static void add(PoolTaskInterface* task) {\n#ifdef MADNESS_TASK_PROFILING\n            task->submit();\n#endif // MADNESS_TASK_PROFILING\n\n#if HAVE_PARSEC\n            //////////// Parsec Related Begin ////////////////////\n            parsec_runtime->schedule(task);\n            //////////// Parsec Related End ////////////////////\n#elif HAVE_INTEL_TBB\n//#ifdef MADNESS_CAN_USE_TBB_PRIORITY\n//            if(task->is_high_priority())\n//                tbb::task::enqueue(*task, tbb::priority_high);\n//            else\n//#endif  // MADNESS_CAN_USE_TBB_PRIORITY\n            tbb_arena->enqueue(\n                    //use unique_ptr to automatically delete task ptr\n                    [task_p = std::unique_ptr<PoolTaskInterface>(task)] () noexcept {\n                        //exceptions are not expected here, as nobody will catch them for enqueued tasks\n                        task_p->execute();\n            });\n#else\n            if (!task) MADNESS_EXCEPTION(\"ThreadPool: inserting a NULL task pointer\", 1);\n            int task_threads = task->get_nthread();\n            // Currently multithreaded tasks must be shoved on the end of the q\n            // to avoid a race condition as multithreaded task is starting up\n            if (task->is_high_priority() && (task_threads == 1)) {\n                instance()->queue.push_front(task);\n            }\n            else {\n                instance()->queue.push_back(task, task_threads);\n            }\n#endif // HAVE_INTEL_TBB\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam opT Description needed.\n        /// \\param[in,out] op Description needed.\n        template <typename opT>\n        void scan(opT& op) {\n            queue.scan(op);\n        }\n\n        /// Add a vector of tasks to the pool.\n\n        /// \\param[in] tasks Vector of tasks to add to the pool.\n        static void add(const std::vector<PoolTaskInterface*>& tasks) {\n#if HAVE_INTEL_TBB\n            MADNESS_EXCEPTION(\"Do not add tasks to the madness task queue when using Intel TBB.\", 1);\n#else\n            typedef std::vector<PoolTaskInterface*>::const_iterator iteratorT;\n            for (iteratorT it=tasks.begin(); it!=tasks.end(); ++it) {\n                add(*it);\n            }\n#endif\n        }\n\n        /// An otherwise idle thread can all this to run a task.\n\n        /// \\return True if a task was run.\n        static bool run_task() {\n#ifdef HAVE_INTEL_TBB\n            return false;\n#else\n\n#ifdef MADNESS_TASK_PROFILING\n            ThreadPoolThread* const thread = static_cast<ThreadPoolThread*>(ThreadBase::this_thread());\n#else\n            ThreadPoolThread* const thread = nullptr;\n#endif // MADNESS_TASK_PROFILING\n\n            return instance()->run_tasks(false, thread);\n#endif // HAVE_INTEL_TBB\n        }\n\n        /// Returns the number of threads in the pool.\n\n        /// \\return The number of threads in the pool.\n        static std::size_t size() {\n            return instance()->nthreads;\n        }\n\n        /// Returns the number of tasks in the queue.\n\n        /// \\return The number of tasks in the queue.\n        static std::size_t queue_size() {\n            return instance()->queue.size();\n        }\n\n        /// Returns queue statistics.\n\n        /// \\return Queue statistics.\n        static const DQStats& get_stats();\n\n        /// Access the pool thread array\n        /// \\return ptr to the pool thread array, its size is given by \\c size()\n        static const ThreadPoolThread* get_threads() {\n          return const_cast<const ThreadPoolThread*>(instance()->threads);\n        }\n\n        /// Gracefully wait for a condition to become true, executing any tasks in the queue.\n\n        /// Probe should be an object that, when called, returns the status.\n        /// \\todo Descriptions needed/need verification.\n        /// \\tparam Probe Type of the probe.\n        /// \\param[in] probe The probe.\n        /// \\param[in] dowork Do work while waiting - default is true\n        /// \\param[in] sleep Sleep instead of spin while waiting (e.g., to avoid pounding on MPI) - default is false\n        template <typename Probe>\n\t    static void await(const Probe& probe, bool dowork = true, bool sleep = false) {\n          if (!probe()) {\n            double start = cpu_time();\n            const double timeout = await_timeout;\n            int counter = 0;\n\n            // if dowork=false must manually purge threal-local tasks to ensure progress\n            if (!dowork) thread_purge();\n\n            MutexWaiter waiter;\n            while (!probe()) {\n\n                const bool working = (dowork ? ThreadPool::run_task() : false);\n                const double current_time = cpu_time();\n\n                if (working) {\t// Reset timeout logic\n                    waiter.reset();\n                    start = current_time;\n                    counter = 0;\n                } else {\n                    if(((current_time - start) > timeout) && (timeout > 1.0)) { // Check for timeout\n                      std::cerr << \"!!MADNESS: Hung queue?\" << std::endl;\n                      if (counter++ > 3) {\n                        const long bufsize=256;\n                        char errstr[bufsize];\n                        snprintf(errstr,bufsize, \"ThreadPool::await() timed out after %.1lf seconds\", timeout);\n                        throw madness::MadnessException(errstr, 0, 1,\n                                                        __LINE__, __FUNCTION__,\n                                                        __FILE__);\n                      }\n                    }\n\t\t    if (sleep) {\n\t\t      // THIS NEEDS TO BECOME AN EXTERNAL PARAMETER\n\t\t      // Problem is exacerbated when running with many\n\t\t      // (e.g., 512 or more) send/recv buffers, and\n\t\t      // also with many threads.  More outstanding\n\t\t      // requests means each call into MPI takes\n\t\t      // longer and more threads means more calls in\n\t\t      // spots where all threads are messaging.  Old\n\t\t      // code was OK on dancer.icl.utk.edu with just\n\t\t      // 32 bufs and 20 threads, but 512 bufs caused\n\t\t      // intermittent hangs I think due to something\n\t\t      // not being able to make progress or general\n\t\t      // confusion (this with MPICH) ... maybe using a\n\t\t      // fair mutex somewhere would help.\n\t\t      //\n\t\t      // 100us is a long time ... will try 10us. mmm ... perhaps need 100 at least on dancer with 17 threads per node\n\t\t      myusleep(100);\n\t\t    }\n\t\t    else {\n\t\t      waiter.wait();\n\t\t    }\n                }\n            }\n          }  // if !probe()\n        }\n\n        /// Destructor.\n        ~ThreadPool() {\n#if HAVE_PARSEC\n            ////////////////// Parsec related Begin /////////////////\n            delete parsec_runtime;\n            ////////////////// Parsec related End /////////////////\n#elif HAVE_INTEL_TBB\n#else\n            delete[] threads;\n#endif\n        }\n\n        /// \\sa madness::threadpool_wait_policy\n        static void set_wait_policy(\n          WaitPolicy policy,\n          int sleep_duration_in_microseconds = 0) {\n#if !HAVE_INTEL_TBB && !HAVE_PARSEC\n          instance()->queue.set_wait_policy(policy,\n                                            sleep_duration_in_microseconds);\n#endif\n        }\n\n    };\n\n    // clang-format off\n    /// Controls how aggressively ThreadPool holds on to the OS threads\n    /// while waiting for work. Currently useful only for Pthread pool when it's using spinlocks;\n    /// NOT used for TBB or PaRSEC.\n    /// \\param policy specifies how to wait for work;\n    ///        - WaitPolicy::Busy -- threads are kept busy (default); recommended when intensive work is only performed by MADNESS threads\n    ///        - WaitPolicy::Yield -- thread yields; recommended when intensive work is performed primarily by non-MADNESS threads\n    ///        - WaitPolicy::Sleep -- thread sleeps for \\p sleep_duration_in_microseconds ; recommended when intensive work is performed by MADNESS nd non-MADNESS threads\n    /// \\param sleep_duration_in_microseconds if `policy==WaitPolicy::Sleep` this specifies the duration of sleep, in microseconds\n    // clang-format on\n    inline void threadpool_wait_policy(WaitPolicy policy,\n                                       int sleep_duration_in_microseconds = 0) {\n      ThreadPool::set_wait_policy(policy, sleep_duration_in_microseconds);\n    }\n\n    /// @}\n\n    inline void thread_purge() {\n#if !(defined(HAVE_PARSEC) || defined(HAVE_INTEL_TBB))\n      MADNESS_ASSERT(is_madness_thread());\n      ThreadPool::instance()->flush_prebuf();\n#endif\n    }\n\n    template<class F, class... Args>\n    constexpr decltype(auto) blocking_invoke(F&& f, Args&&... args)\n        noexcept(std::is_nothrow_invocable_v<F, Args...>) {\n      thread_purge();\n      return std::invoke(std::forward<F>(f), std::forward<Args>(args)...);\n    }\n\n    template<class R, class F, class... Args>\n    constexpr R blocking_invoke_r(F&& f, Args&&... args)\n        noexcept(std::is_nothrow_invocable_v<F, Args...>) {\n      thread_purge();\n#if __cplusplus < 202302L\n      if constexpr (std::is_void_v<R>)\n        std::invoke(std::forward<F>(f), std::forward<Args>(args)...);\n      else\n        return std::invoke(std::forward<F>(f), std::forward<Args>(args)...);\n#else\n      return std::invoke_r<R>(std::forward<F>(f), std::forward<Args>(args)...);\n#endif\n    }\n\n}  // namespace madness\n\n#endif // MADNESS_WORLD_THREAD_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/thread_info.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_THREAD_INFO_H__INCLUDED\n#define MADNESS_WORLD_THREAD_INFO_H__INCLUDED\n\n/**\n \\file thread_info.h\n \\brief Implements thread introspection for Pthreads backend\n \\ingroup threads\n*/\n\nnamespace madness {\n\n    /// bitfield describing thread type\n    enum ThreadTag {\n        ThreadTag_NonMADNESS = 0b0000,\n        ThreadTag_MADNESS = 0b0001,\n        ThreadTag_Main = 0b0010\n    };\n\n    namespace detail {\n        inline ThreadTag& thread_tag_accessor() {\n            thread_local ThreadTag value = ThreadTag_NonMADNESS;\n            return value;\n        }\n    }   // namespace madness::detail\n\n    /// sets the thread tag for the thread invoking this function\n    /// @param tag thread tag for the calling thread\n    inline void set_thread_tag(ThreadTag tag) {\n        detail::thread_tag_accessor() = tag;\n    }\n\n    /// sets the thread tag for the thread invoking this function\n    /// @param tag thread tag for the calling thread\n    inline void set_thread_tag(int tag) {\n        detail::thread_tag_accessor() = static_cast<ThreadTag>(tag);\n    }\n\n    /// @return true if this thread is used to execute MADNESS tasks; this is true for the main thread but only true for a non-main thread if the Pthreads backend is used and the thread is part of the ThreadPool\n    inline bool is_madness_thread() {\n        return detail::thread_tag_accessor() & ThreadTag_MADNESS;\n    }\n\n    /// @return true if this is called from the main thread\n    inline bool is_main_thread() {\n      return detail::thread_tag_accessor() & ThreadTag_Main;\n    }\n\n}  // namespace madness\n\n#endif // MADNESS_WORLD_THREAD_INFO_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/threadbind",
    "content": "#!/usr/bin/env python\n\n# Arguments are a list of process ids or executable names.  Threads in\n# the processes are mapped round robin to the list of cores.\n\n# If you are really using MPI it may be worth leaving a core free for\n#  any additional threads created by MPI/IB etc.  To do this just\n#  delete a core from cores[]\n\nimport sys,os,subprocess\n\n# Wait for the processes to have created all of their threads\nos.system('sleep 1')\n\n# On dual-socket Sandybridge (8 real cores per socket) both of these\n# alernating mapping of threads to cores are a lot slower\n# ... basically U want threads collaborating on a socket.\n#cores = [1,9,2,10,3,11,4,12,5,13,6,14,7,15,8,0]\n#cores = [0,1,2,3,  8,9,10,11,  4,5,6,7,  12,13,14,15]\n\ncores = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]\nncores = len(cores)\n\npids = sys.argv[1:]\n\ncore=0\n\nfor p in pids:\n    plist = [p]\n    try:\n        q = int(pids[0])\n    except:\n        cmd = \"pgrep %s\" % p\n        plist = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip().split()\n\n    for pid in plist:\n        cmd = \"ps -mo tid -p %s | egrep -v 'T|-'\" % pid\n        res = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip().split()\n        for tid in res:\n            cmd = 'taskset -p -c %d %s' %(cores[core], tid)\n            try:\n                junk = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)\n            except:\n                print 'failed binding thread',tid\n            core = (core + 1)%ncores\n"
  },
  {
    "path": "src/madness/world/timers.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file timers.cc\n \\brief Implementation of functions for timers, etc.\n \\ingroup parallel_runtime\n*/\n\n#include <madness/world/timers.h>\n#include <cstdlib>\n#include <sstream>\n\n#ifdef __CYGWIN__\n#include <windows.h>\n#endif\n\nnamespace madness {\n\n    double wall_time() {\n#ifdef __CYGWIN__\n        static bool initialized = false;\n        static double rfreq;\n        if (!initialized) {\n            _LARGE_INTEGER freq;\n            if (QueryPerformanceFrequency(&freq))\n                rfreq = 1.0/double(freq.QuadPart);\n            else\n                rfreq = 0.0;\n            initialized = true;\n        }\n        _LARGE_INTEGER ins;\n        QueryPerformanceCounter(&ins);\n        return double(ins.QuadPart)*rfreq;\n#else\n        static bool first_call = true;\n        static double start_time;\n\n        struct timeval tv;\n        gettimeofday(&tv,0);\n        double now = tv.tv_sec + 1e-6*tv.tv_usec;\n\n        if (first_call) {\n            first_call = false;\n            start_time = now;\n        }\n        return now - start_time;\n#endif\n    }\n\n    double cpu_frequency() {\n        static double freq = -1.0;\n        if (freq == -1.0) {\n            double used = wall_time();\n            uint64_t ins = cycle_count();\n            if (ins == 0) return 0;\n            while ((cycle_count()-ins) < 100000000);  // 100M cycles at 1GHz = 0.1s\n            ins = cycle_count() - ins;\n            used = wall_time() - used;\n            freq = ins/used;\n        }\n        return freq;\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/timers.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/** \n \\file timers.h\n \\brief Wrappers around platform dependent timers and performance info.\n \\ingroup parallel_runtime\n*/\n\n#ifndef MADNESS_WORLD_TIMERS_H__INCLUDED\n#define MADNESS_WORLD_TIMERS_H__INCLUDED\n\n#include <chrono>\n#include <cstdint>\n#include <ctime>\n#include <sys/time.h>\n#include <unistd.h>\n#include <madness/madness_config.h>\n\n#ifdef _CRAY\n#include <catamount/dclock.h>\n#endif\n\n#ifdef HAVE_IBMBGP\n#  define BG_CYCLES_PER_MICROSECOND 850\n#  define BG_SECONDS_PER_CYCLE 1.176470588235294033e-09\n#  include </bgsys/drivers/ppcfloor/arch/include/bpcore/ppc450_inlines.h>\n#endif\n\n#ifdef HAVE_IBMBGQ\n#  define BG_CYCLES_PER_MICROSECOND 1600\n#  define BG_SECONDS_PER_CYCLE 6.25e-10\n#  include <hwi/include/bqc/A2_inlines.h>\n#endif\n\n\nnamespace madness {\n\n    /// Returns the wall time in seconds relative to an arbitrary origin.\n\n    /// As accurate and lightweight as we can get it, but may not\n    /// be any better than the gettime of day system call.\n    /// \\return The wall time (in seconds).\n    double wall_time();\n\n    /// On some machines we have access to a cycle count.\n\n    /// For small intervals this is probably the most lightweight and accurate timer\n    /// but may not be meaningful over long intervals due to O/S scheduling,\n    /// migration to different cores, frequency shifts, etc.  On x86 uses rtdsc.\n    /// Otherwise uses wall_time() in nanoseconds.\n    /// \\return Timing, in cycle count.\n    static inline uint64_t cycle_count() {\n        uint64_t x;\n#if defined(HAVE_IBMBGP)\n        unsigned int rx, ry, rz;\n        do\n        {\n            asm volatile ( \"mftbu %0\" : \"=r\"(rx) );\n            asm volatile ( \"mftb %0\" : \"=r\"(ry) );\n            asm volatile ( \"mftbu %0\" : \"=r\"(rz) );\n        }\n        while ( rx != rz );\n        x = rx;\n        x = (x << 32) | ry;\n#elif defined(HAVE_IBMBGQ)\n/* Jeff could use the asm above but is pretending this is more portable */\n        x = GetTimeBase();\n#elif defined(X86_32)\n        __asm__ volatile(\".byte 0x0f, 0x31\" : \"=A\"(x));\n#elif defined(X86_64)\n        unsigned int a,d;\n        __asm__ volatile(\"rdtsc\" : \"=a\"(a), \"=d\"(d));\n        x = ((uint64_t)a) | (((uint64_t)d)<<32);\n#else\n        x = wall_time()*1e9;\n#endif\n        return x;\n    }\n\n    /// Estimate the processor frequency, in Hz.\n\n    /// First call may take about 0.1s to execute. Subsequent\n    /// calls return the value, cached from the first call, so it does\n    /// not respond to changing processor frequency.\n    ///\n    /// If \\c cycle_count() returns \\c wall_time() in nanoseconds,\n    /// this will return 1GHz.\n    ///\n    /// If not available returns 0.\n    /// \\return CPU frequency, in Hz.\n    double cpu_frequency();\n\n    /// Returns the cpu time in seconds relative to an arbitrary origin.\n\n    /// As accurate and lightweight as we can get it, but may not\n    /// be any better than the clock system call.\n    /// \\return The cpu time, in second.\n    static inline double cpu_time() {\n#if defined(X86_32) || defined(X86_64) || defined(HAVE_IBMBGP)\n        static const double rfreq = 1.0/cpu_frequency();\n        return cycle_count()*rfreq;\n#elif defined(_CRAY)\n        return dclock();\n#elif defined(HAVE_IBMBGP)\n        return BG_SECONDS_PER_CYCLE * _bgp_GetTimeBase();\n#elif defined(HAVE_IBMBGQ)\n        return BG_SECONDS_PER_CYCLE * GetTimeBase();\n#else\n      const auto now = std::chrono::steady_clock::now();\n      const auto nanoseconds_since_epoch = std::chrono::duration_cast<std::chrono::nanoseconds>(now.time_since_epoch()).count();\n      return nanoseconds_since_epoch / 1e9;\n#endif\n    }\n\n\n    /// Do nothing and especially do not touch memory.\n\n    /// \\todo Can we provide some context for this function?\n    inline void cpu_relax() {\n#if defined(X86_32) || defined(X86_64)\n        asm volatile(\"rep;nop\" : : : \"memory\");\n#elif defined(HAVE_IBMBGP) || defined(HAVE_IBMBGQ)\n        asm volatile (\"nop\\n\");\n#else\n        /* Jeff has no idea if this is actually portable.\n         * See https://en.wikipedia.org/wiki/NOP for details. */\n        asm volatile (\"nop\\n\");\n#endif\n    }\n\n    /// Sleep or spin for specified number of microseconds.\n\n    /// Wrapper to ensure desired behavior across various platforms.\n    /// \\param[in] us The number of microseconds.\n    static inline void myusleep(unsigned int us) {\n#if defined(HAVE_CRAYXT)\n        double secs = us*1e-6;\n        double start = cpu_time();\n        while (cpu_time()-start < secs) {\n            for (int i=0; i<100; ++i) cpu_relax();\n        }\n#elif defined(HAVE_IBMBGP) || defined(HAVE_IBMBGQ)\n        int count = BG_CYCLES_PER_MICROSECOND*us; // ??????\n        for (int i=0; i<count; i++) {\n            asm volatile (\"nop\\n\");\n        }\n#else\n        usleep(us);\n#endif\n    }\n}\n\n#endif // MADNESS_WORLD_TIMERS_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/timing_utilities.h",
    "content": "//\n// Created by Florian Bischoff on 5/15/21.\n//\n\n#ifndef MADNESS_TIMING_UTILITIES_H\n#define MADNESS_TIMING_UTILITIES_H\n\nnamespace madness {\nstruct timer {\n    World &world;\n    double ttt=0.0, sss=0.0;       // duration\n    bool do_print = true;\n    bool is_running=false;\n\n    timer(World &world, bool do_print = true) : world(world), do_print(do_print) {\n        world.gop.fence();\n        resume();\n    }\n\n    void resume() {\n        if (is_running) print(\"timer was already running!\");\n        world.gop.fence();\n        ttt-=wall_time();\n        sss-=cpu_time();\n        is_running=true;\n    }\n\n    double interrupt() {\n        world.gop.fence();\n        ttt+=wall_time();\n        sss+=cpu_time();\n        is_running=false;\n        return sss;\n    }\n\n    void print(const std::string msg) const {\n        if (world.rank() == 0 and do_print) {\n            std::stringstream ss;\n            ss << \"timer:\" << std::setw(30) << msg << std::setw(8) << std::setprecision(2)\n                      << std::fixed << sss << \"s \" << ttt <<\"s\";\n            std::cout << ss.str() << std::endl;\n        }\n    }\n\n    double tag(const std::string msg) {\n        world.gop.fence();\n        interrupt();\n        print(msg);\n        double cpu=sss;\n        ttt=0.0;\n        sss=0.0;\n        resume();\n        return cpu;\n    }\n\n    double end(const std::string msg) {\n        return tag(msg);\n//        world.gop.fence();\n//        double tt1 = wall_time() - ttt;\n//        double ss1 = cpu_time() - sss;\n//        if (world.rank() == 0 and do_print) printf(\"timer: %20.20s %8.2fs %8.2fs\\n\", msg.c_str(), ss1, tt1);\n    }\n};\n}\n\n#endif //MADNESS_TIMING_UTILITIES_H\n"
  },
  {
    "path": "src/madness/world/type_traits.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_TYPE_TRAITS_H__INCLUDED\n#define MADNESS_WORLD_TYPE_TRAITS_H__INCLUDED\n\n/// \\file typestuff.h\n/// \\brief type traits and templates\n\n/*\n * N.B. this must be pure c++, usable without any context other than\n *      the current compiler + library + C++ standard.\n *      DO NOT include non-standard headers here!\n */\n\n#include <cstddef>\n#include <cstdint>\n#include <type_traits>\n#include <iosfwd>\n#include <madness/world/meta.h>\n#include <vector>\n\nnamespace madness {\n\n   namespace operators {\n   class __x {};\n   std::ostream& operator<<(std::ostream&, const __x&);\n   std::ostream& operator>>(std::ostream&, __x&);\n   }  // namespace operators\n\n   // fwd decls\n   namespace archive {\n     template <typename Archive, typename T, typename Enabler = void>\n     struct ArchiveSerializeImpl;\n\n     template <class Archive, class T, typename Enabler = void>\n     struct ArchiveLoadImpl;\n\n     template <class Archive, class T, typename Enabler = void>\n     struct ArchiveStoreImpl;\n\n     template <class Archive, class T, typename Enabler = void>\n     struct ArchiveImpl;\n   }\n\n    template <typename> class Future;\n\n    /// test if a type is a future.\n\n    /// \\tparam T The type to test.\n    template <typename T>\n    struct is_future : public std::false_type { };\n\n    template <typename T>\n    struct is_future< Future<T> > : public std::true_type { };\n\n    /// maps type \\c T to \\c Future<T>.\n\n    /// \\tparam T The type to have future added.\n    template <typename T>\n    struct add_future {\n        /// Type with \\c Future added.\n        typedef Future<T> type;\n    };\n\n    /// maps \\c Future<T> to \\c Future<T>.\n\n    /// Specialization of \\c add_future<T> that properly forbids the type\n    /// \\c Future< Future<T> >.\n    /// \\tparam T The underlying data type.\n    template <typename T>\n    struct add_future< Future<T> > {\n       /// Type with \\c Future added.\n       typedef Future<T> type;\n    };\n\n    /// maps \\c Future<T> to \\c T.\n\n    /// \\tparam T The type to have future removed; in this case, do nothing.\n    template <typename T>\n    struct remove_future {\n        /// Type with \\c Future removed.\n        typedef T type;\n    };\n\n    /// This metafunction maps \\c Future<T> to \\c T.\n\n    /// \\internal Future is a wrapper for T (it acts like an Identity monad), so this\n    /// unwraps T. It makes sense that the result should preserve the access traits\n    /// of the Future, i.e. const Future<T> should map to const T, etc.\n\n    /// Specialization of \\c remove_future for \\c Future<T>\n    /// \\tparam T The type to have future removed.\n    template <typename T>\n    struct remove_future< Future<T> > {\n        /// Type with \\c Future removed.\n        typedef T type;\n    };\n\n    /// Specialization of \\c remove_future for \\c Future<T>\n    /// \\tparam T The type to have future removed.\n    template <typename T>\n    struct remove_future< const Future<T> > {\n        /// Type with \\c Future removed.\n        typedef const T type;\n    };\n\n    /// Specialization of \\c remove_future for \\c Future<T>&\n    /// \\tparam T The type to have future removed.\n    template <typename T>\n    struct remove_future< Future<T>& > {\n        /// Type with \\c Future removed.\n        typedef T& type;\n    };\n\n    /// Specialization of \\c remove_future for \\c Future<T>&&\n    /// \\tparam T The type to have future removed.\n    template <typename T>\n    struct remove_future< Future<T>&& > {\n        /// Type with \\c Future removed.\n        typedef T&& type;\n    };\n\n    /// Specialization of \\c remove_future for \\c const \\c Future<T>&\n    /// \\tparam T The type to have future removed.\n    template <typename T>\n    struct remove_future< const Future<T>& > {\n        /// Type with \\c Future removed.\n        typedef const T& type;\n    };\n\n    /// Macro to determine type of future (by removing wrapping \\c Future template).\n\n    /// \\param T The type (possibly with \\c Future).\n    #define REMFUTURE(T) typename remove_future< T >::type\n\n    /// C++11 version of REMFUTURE\n    template <typename T>\n    using remove_future_t = typename remove_future< T >::type;\n\n    /// Similar to remove_future , but future_to_ref<Future<T>> evaluates to T& ,whereas\n    /// remove_future<Future<T>> evaluates to T .\n    /// \\tparam T The type to have future removed; in this case, do nothing.\n    template <typename T>\n    struct future_to_ref {\n        typedef T type;\n    };\n    template <typename T>\n    struct future_to_ref<Future<T>> {\n        typedef T& type;\n    };\n    template <typename T>\n    struct future_to_ref<Future<T>*> {\n        typedef T& type;\n    };\n    template <typename T>\n    struct future_to_ref<Future<T>&> {\n        typedef T& type;\n    };\n    template <typename T>\n    struct future_to_ref<const Future<T>&> {\n         typedef T& type;\n    };\n    template <typename T>\n    using future_to_ref_t = typename future_to_ref< T >::type;\n\n\n    // Remove Future, const, volatile, and reference qualifiers from the type\n    template <typename T>\n    struct remove_fcvr {\n        typedef typename remove_future<typename std::remove_cv<\n                   typename std::remove_reference<T>::type>::type>::type type;\n    };\n    template <typename T>\n    using remove_fcvr_t = typename remove_fcvr<T>::type;\n\n    /// is true type if \\p T is a pointer to a free function\n    template <typename T, typename Enabler = void> struct is_function_pointer : public std::false_type {};\n    template <typename T> struct is_function_pointer<T, std::enable_if_t<std::is_function<typename std::remove_pointer<T>::type>::value>> : public std::true_type {};\n    template <typename T> constexpr bool is_function_pointer_v = is_function_pointer<T>::value;\n\n    // use std::is_member_function_pointer<T> if looking for is_member_function_pointer\n\n    /// is true type if \\p T is a pointer to free or member function\n    template <typename T, typename Enabler = void> struct is_any_function_pointer : public std::false_type {};\n    template <typename T> struct is_any_function_pointer<T, std::enable_if_t<std::is_member_function_pointer<T>::value || is_function_pointer_v<T>>> : public std::true_type {};\n    template <typename T> constexpr bool is_any_function_pointer_v = is_any_function_pointer<T>::value;\n\n    /// trait for trivial (=bitwise) copyability of T, defaults to std::is_trivially_copyable<T> but can be specialized as needed\n    template <typename T>\n    struct is_trivially_copyable : std::is_trivially_copyable<T> {};\n\n    template <typename T>\n    inline constexpr bool is_trivially_copyable_v = is_trivially_copyable<T>::value;\n\n    /// This defines stuff that is serializable by bitwise copy.\n    /// \\warning This reports true for \\c T that is an aggregate type\n    ///          (struct or array) that includes pointers.\n    template <typename T>\n    struct is_trivially_serializable {\n      static const bool value = \\\n        std::is_arithmetic<T>::value || \\\n        std::is_function<T>::value  || \\\n        is_any_function_pointer_v<T> || \\\n        (std::is_standard_layout<T>::value && std::is_trivial<T>::value && !std::is_pointer<T>::value);\n//        ((std::is_class<T>::value || std::is_array<T>::value) && std::is_trivially_copyable<T>::value);\n    };\n\n    template <typename T>\n    inline constexpr bool is_trivially_serializable_v = is_trivially_serializable<T>::value;\n\n    // namespace hiding implementation details of is_ostreammable ... by ensuring that the detector lives in a different namespace branch than the operators we do not accidentally pick them up\n    namespace is_ostreammable_ns {\n\n    template <typename To, typename From> using left_shift = decltype(std::declval<To>() << std::declval<From>());\n    template <typename To, typename From> using left_shift_in_ns_madness_operators = decltype(madness::operators::operator<<(std::declval<To>(), std::declval<From>()));\n\n    template <typename T> struct impl : public meta::disjunction<meta::is_detected_exact<std::ostream&, left_shift, std::ostream&, std::add_const_t<std::add_lvalue_reference_t<T>>>,\n                                                                 meta::is_detected_exact<std::ostream&, left_shift_in_ns_madness_operators, std::ostream&, std::add_const_t<std::add_lvalue_reference_t<T>>>> {};\n    }  // namespace is_ostreammable_ns\n\n    /// True for types that are \"serializable\" to a std::ostream\n    /// \\note \\c operator<<(std::ostream&,const T&) must be visible via ADL or defined in namespace madness::operators\n    template <typename T>\n    struct is_ostreammable : public is_ostreammable_ns::impl<T> {};\n\n    /// Shortcut for \\c is_ostreammable<T>::value\n    template <typename T> constexpr bool is_ostreammable_v = is_ostreammable<T>::value;\n\n    // namespace hiding implementation details of is_istreammable ... by ensuring that the detector lives in a different namespace branch than the operators we do not accidentally pick them up\n    namespace is_istreammable_ns {\n\n    template <typename From, typename To> using right_shift = decltype(std::declval<From>() >> std::declval<To>());\n    template <typename From, typename To> using right_shift_in_ns_madness_operators = decltype(madness::operators::operator<<(std::declval<From>(), std::declval<To>()));\n\n    template <typename T> struct impl : public meta::disjunction<meta::is_detected_exact<std::istream&, right_shift, std::istream&, std::add_lvalue_reference_t<T>>,\n                                                                 meta::is_detected_exact<std::istream&, right_shift_in_ns_madness_operators, std::istream&, std::add_lvalue_reference_t<T>>> {};\n\n    }  // namespace is_istreammable_ns\n\n    /// True for types that are \"deserialiable\" from an std::istream\n    /// \\note \\c operator>>(std::ostream&,T&) must be visible via ADL or defined in namespace madness::operators\n    template <typename T>\n    struct is_istreammable : public is_istreammable_ns::impl<T> {};\n\n    /// Shortcut for \\c is_istreammable<T>::value\n    template <typename T> constexpr bool is_istreammable_v = is_istreammable<T>::value;\n\n    /// providing automatic support for serializing to/from std streams requires bidirectional streammability\n    template <typename T> constexpr bool is_iostreammable_v = is_istreammable_v<T> && is_ostreammable_v<T>;\n\n    template <typename T> constexpr bool is_always_serializable =\n    std::is_arithmetic<T>::value || \\\n    std::is_same<std::nullptr_t, typename std::remove_cv<T>::type>::value || \\\n    is_any_function_pointer_v<T> || \\\n    std::is_function<T>::value;\n\n    /// helps to detect that `T` has a member serialization method that\n    /// accepts single argument of type `Archive`\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive>\n    using has_member_serialize_t = decltype(std::declval<T&>().serialize(std::declval<Archive&>()));\n\n    /// helps to detect that `T` has a member serialization method that\n    /// accepts one argument of type `Archive` and an unsigned version\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive>\n    using has_member_serialize_with_version_t = decltype(std::declval<T&>().serialize(std::declval<Archive&>(),0u));\n\n    /// helps to detect that `T` supports nonintrusive symmetric serialization\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive>\n    using has_nonmember_serialize_t = decltype(madness::archive::ArchiveSerializeImpl<Archive, T>::serialize(std::declval<Archive&>(), std::declval<T&>()));\n\n    /// helps to detect that `T` supports nonintrusive asymmetric serialization via load\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive>\n    using has_nonmember_load_t = decltype(madness::archive::ArchiveLoadImpl<Archive, T>::load(std::declval<Archive&>(), std::declval<T&>()));\n\n    /// helps to detect that `T` supports nonintrusive asymmetric serialization via store\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive>\n    using has_nonmember_store_t = decltype(madness::archive::ArchiveStoreImpl<Archive, T>::store(std::declval<Archive&>(), std::declval<T&>()));\n\n    /// helps to detect that `T` supports nonintrusive asymmetric serialization via wrap_load\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive>\n    using has_nonmember_wrap_load_t = decltype(madness::archive::ArchiveImpl<Archive, T>::wrap_load(std::declval<Archive&>(), std::declval<T&>()));\n\n    /// helps to detect that `T` supports nonintrusive asymmetric serialization via wrap_store\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive>\n    using has_nonmember_wrap_store_t = decltype(madness::archive::ArchiveImpl<Archive, T>::wrap_store(std::declval<Archive&>(), std::declval<T&>()));\n\n    /// helps to detect that `T` supports freestanding `serialize` function\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive>\n    using has_freestanding_serialize_t = decltype(serialize(std::declval<Archive&>(), std::declval<T&>()));\n\n    /// helps to detect that `T=U*` supports freestanding `serialize` function\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive, typename = std::enable_if_t<std::is_pointer_v<T>>>\n    using has_freestanding_serialize_with_size_t = decltype(serialize(std::declval<Archive&>(), std::declval<T&>(), 1u));\n\n    /// helps to detect that `T` supports freestanding `serialize` function that accepts version\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive, typename = std::enable_if_t<!std::is_pointer_v<T>>>\n    using has_freestanding_serialize_with_version_t = decltype(serialize(std::declval<Archive&>(), std::declval<T&>(), 0u));\n\n    /// helps to detect that `T` supports freestanding `default_serialize` function\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive>\n    using has_freestanding_default_serialize_t = decltype(default_serialize(std::declval<Archive&>(), std::declval<T&>()));\n\n    /// helps to detect that `T=U*` supports freestanding `default_serialize` function\n    /// @note use in combination with madness::meta::is_detected_v\n    template<typename T, typename Archive, typename = std::enable_if_t<std::is_pointer_v<T>>>\n    using has_freestanding_default_serialize_with_size_t = decltype(default_serialize(std::declval<Archive&>(), std::declval<const T&>(), 1u));\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   t.serialize(ar);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_member_serialize_v = madness::meta::is_detected_v<madness::has_member_serialize_t,T,Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   t.serialize(ar, 0u);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_member_serialize_with_version_v = madness::meta::is_detected_v<madness::has_member_serialize_with_version_t,T,Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   madness::archive::ArchiveSerializeImpl<Archive, T>::serialize(ar, t);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_nonmember_serialize_v = madness::meta::is_detected_v<madness::has_nonmember_serialize_t,T,Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   madness::archive::ArchiveLoadImpl<Archive, T>::load(ar, t);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_nonmember_load_v = madness::meta::is_detected_v<madness::has_nonmember_load_t,T,Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   madness::archive::ArchiveStoreImpl<Archive, T>::store(ar, t);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_nonmember_store_v = madness::meta::is_detected_v<madness::has_nonmember_store_t,T,Archive>;\n\n    template <typename T, typename Archive>\n    inline constexpr bool has_nonmember_load_and_store_v = has_nonmember_load_v<T, Archive> && has_nonmember_store_v<T, Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   madness::archive::ArchiveImpl<Archive, T>::wrap_load(ar, t);\n   /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_nonmember_wrap_load_v = madness::meta::is_detected_v<madness::has_nonmember_wrap_load_t,T,Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   madness::archive::ArchiveImpl<Archive, T>::wrap_store(ar, t);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_nonmember_wrap_store_v = madness::meta::is_detected_v<madness::has_nonmember_wrap_store_t,T,Archive>;\n\n    template <typename T, typename Archive>\n    inline constexpr bool has_nonmember_wrap_load_and_store_v = has_nonmember_wrap_load_v<T, Archive> && has_nonmember_wrap_store_v<T, Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   serialize(ar, t);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_freestanding_serialize_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_t,T,Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   serialize(ar, &t, 1u);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_freestanding_serialize_with_size_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_with_size_t,T,Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   serialize(ar, t, 0u);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_freestanding_serialize_with_version_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_with_version_t,T,Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   default_serialize(ar, t);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_freestanding_default_serialize_v = madness::meta::is_detected_v<madness::has_freestanding_default_serialize_t,T,Archive>;\n\n    /// true if this is well-formed:\n    /// \\code\n    ///   // T t; Archive ar;\n    ///   default_serialize(ar, &t, 1u);\n    /// \\endcode\n    template <typename T, typename Archive>\n    inline constexpr bool has_freestanding_default_serialize_with_size_v = madness::meta::is_detected_v<madness::has_freestanding_default_serialize_with_size_t,T,Archive>;\n\n    template <typename Archive, typename T, typename Enabler = void>\n    struct is_default_serializable_helper : public std::false_type {};\n\n    /// \\brief is \\c std::true_type if \\c T can be serialized to \\c Archive\n    ///        without specialized \\c serialize() method\n    ///\n    /// For text stream-based \\c Archive this is \\c std::true_type if \\c is_iostreammable<T>::value is true.\n    /// For other \\c Archive types this is \\c std::true_type if \\c is_trivially_serializable<T>::value is true.\n    /// \\tparam Archive an Archive type\n    /// \\tparam T a type\n    template <typename Archive, typename T>\n    struct is_default_serializable {\n      static constexpr bool value = is_default_serializable_helper<std::remove_cv_t<std::remove_reference_t<Archive>>,std::remove_cv_t<std::remove_reference_t<T>>>::value;\n    };\n\n    template <typename Archive, typename T>\n    inline constexpr bool is_default_serializable_v = is_default_serializable<Archive, T>::value;\n\n    template <typename Archive, typename T>\n    inline constexpr bool is_default_serializable_v<Archive, const T> = is_default_serializable_v<Archive, T>;\n\n    // forward declare archives to provide archive-specific overloads\n    namespace archive {\n    class BaseArchive;\n    class BaseInputArchive;\n    class BaseOutputArchive;\n    class BinaryFstreamOutputArchive;\n    class BinaryFstreamInputArchive;\n    class BufferOutputArchive;\n    class BufferInputArchive;\n    class VectorOutputArchive;\n    class VectorInputArchive;\n    class TextFstreamOutputArchive;\n    class TextFstreamInputArchive;\n    class MPIRawOutputArchive;\n    class MPIRawInputArchive;\n    class MPIOutputArchive;\n    class MPIInputArchive;\n    class ContainerRecordInputArchive;\n    class ContainerRecordOutputArchive;\n    template <class localarchiveT>\n    class ParallelOutputArchive;\n    template <class localarchiveT>\n    class ParallelInputArchive;\n    template <typename T>\n    class archive_array;\n    }  // namespace archive\n\n    /// Checks if \\c T is an archive type.\n\n    /// If \\c T is an archive type, then \\c is_archive will be inherited\n    /// from \\c std::true_type, otherwise it is inherited from\n    /// \\c std::false_type.\n    /// \\tparam T The type to check.\n    /// \\note define for your custom MADNESS archive type\n    template <typename T, typename Enabler = void>\n    struct is_archive;\n\n    template <typename T>\n    using is_archive_defined_t = typename is_archive<std::remove_reference_t<std::remove_cv_t<T>>>::type;\n\n    template <typename T>\n    inline constexpr bool is_archive_v = meta::is_detected_v<is_archive_defined_t,T>;\n\n\n    /// Checks if \\c T is an input archive type.\n\n    /// If \\c T is an input archive type, then \\c is_input_archive will be\n    /// inherited from \\c std::true_type, otherwise it is inherited from\n    /// \\c std::false_type.\n    /// \\tparam T The type to check.\n    /// \\note define for your custom MADNESS input archive type\n    template <typename T, typename Enabler = void>\n    struct is_input_archive;\n\n    template <typename T>\n    using is_input_archive_defined_t = typename is_input_archive<std::remove_reference_t<std::remove_cv_t<T>>>::type;\n\n    template <typename T>\n    inline constexpr bool is_input_archive_v = meta::is_detected_v<is_input_archive_defined_t, T>;\n\n    /// Checks if \\c T is an output archive type.\n\n    /// If \\c T is an output archive type, then \\c is_output_archive will\n    /// be inherited from \\c std::true_type, otherwise it is inherited from\n    /// \\c std::false_type.\n    /// \\tparam T The type to check.\n    /// \\note define for your custom MADNESS output archive type\n    template <typename T, typename Enabler = void>\n    struct is_output_archive;\n\n    template <typename T>\n    using is_output_archive_defined_t = typename is_output_archive<std::remove_reference_t<std::remove_cv_t<T>>>::type;\n\n    template <typename T>\n    inline constexpr bool is_output_archive_v = meta::is_detected_v<is_output_archive_defined_t, T>;\n\n    template <typename T>\n    struct is_default_serializable_helper<archive::BinaryFstreamOutputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::BinaryFstreamInputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::BufferOutputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::BufferInputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::VectorOutputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::VectorInputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    // N.B. if type can be printed but can't be read it's not serializable\n    // N.N.B. functions and function pointers will be converted to integers, hence will be always serializable\n    template <typename T>\n    struct is_default_serializable_helper<archive::TextFstreamOutputArchive, T, std::enable_if_t<is_iostreammable_v<T> || std::is_function_v<T> || is_any_function_pointer_v<T>>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::TextFstreamInputArchive, T, std::enable_if_t<is_iostreammable_v<T> || is_any_function_pointer_v<T>>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::MPIRawOutputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::MPIRawInputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::MPIOutputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::MPIInputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::ContainerRecordOutputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T>\n    struct is_default_serializable_helper<archive::ContainerRecordInputArchive, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T, class localarchiveT>\n    struct is_default_serializable_helper<archive::ParallelOutputArchive<localarchiveT>, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename T, class localarchiveT>\n    struct is_default_serializable_helper<archive::ParallelInputArchive<localarchiveT>, T, std::enable_if_t<is_trivially_serializable<T>::value>> : std::true_type {};\n    template <typename Archive, typename T>\n    struct is_default_serializable_helper<Archive, archive::archive_array<T>, std::enable_if_t<is_default_serializable_helper<Archive,T>::value>> : std::true_type {};\n\n    template <>\n    struct is_archive<archive::BinaryFstreamOutputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::BinaryFstreamInputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::BufferOutputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::BufferInputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::VectorOutputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::VectorInputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::TextFstreamOutputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::TextFstreamInputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::MPIRawOutputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::MPIRawInputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::MPIOutputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::MPIInputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::ContainerRecordOutputArchive> : std::true_type {};\n    template <>\n    struct is_archive<archive::ContainerRecordInputArchive> : std::true_type {};\n    template <class localarchiveT>\n    struct is_archive<archive::ParallelOutputArchive<localarchiveT> > : std::true_type {};\n    template <class localarchiveT>\n    struct is_archive<archive::ParallelInputArchive<localarchiveT> > : std::true_type {};\n\n    template <>\n    struct is_output_archive<archive::BinaryFstreamOutputArchive> : std::true_type {};\n    template <>\n    struct is_output_archive<archive::BufferOutputArchive> : std::true_type {};\n    template <>\n    struct is_output_archive<archive::VectorOutputArchive> : std::true_type {};\n    template <>\n    struct is_output_archive<archive::TextFstreamOutputArchive> : std::true_type {};\n    template <>\n    struct is_output_archive<archive::MPIRawOutputArchive> : std::true_type {};\n    template <>\n    struct is_output_archive<archive::MPIOutputArchive> : std::true_type {};\n    template <>\n    struct is_output_archive<archive::ContainerRecordOutputArchive> : std::true_type {};\n    template <class localarchiveT>\n    struct is_output_archive<archive::ParallelOutputArchive<localarchiveT> > : std::true_type {};\n\n    template <>\n    struct is_input_archive<archive::BinaryFstreamInputArchive> : std::true_type {};\n    template <>\n    struct is_input_archive<archive::BufferInputArchive> : std::true_type {};\n    template <>\n    struct is_input_archive<archive::VectorInputArchive> : std::true_type {};\n    template <>\n    struct is_input_archive<archive::TextFstreamInputArchive> : std::true_type {};\n    template <>\n    struct is_input_archive<archive::MPIRawInputArchive> : std::true_type {};\n    template <>\n    struct is_input_archive<archive::MPIInputArchive> : std::true_type {};\n    template <>\n    struct is_input_archive<archive::ContainerRecordInputArchive> : std::true_type {};\n    template <class localarchiveT>\n    struct is_input_archive<archive::ParallelInputArchive<localarchiveT> > : std::true_type {};\n\n    /// Evaluates to true if can serialize an object of type `T` to an object of type `Archive` using user-provided methods\n    /// \\tparam Archive\n    /// \\tparam T\n    template <typename Archive, typename T>\n    inline constexpr bool is_user_serializable_v = is_archive_v<Archive> && (has_member_serialize_v<T, Archive> ||\n                                                                    has_nonmember_serialize_v<T, Archive> ||\n                                                                    ((has_nonmember_load_v<T, Archive> || has_nonmember_wrap_load_v<T, Archive>) && is_input_archive_v<Archive> && !has_freestanding_default_serialize_v<T, Archive>) ||\n                                                                    ((has_nonmember_store_v<T, Archive> || has_nonmember_wrap_store_v<T, Archive>) && is_output_archive_v<Archive> && !has_freestanding_default_serialize_v<T, Archive>));\n\n    template <typename Archive, typename T>\n    inline constexpr bool is_user_serializable_v<Archive, const T> = is_user_serializable_v<Archive, T>;\n\n    /// Evaluates to true if can serialize an object of type `T` to an object of type `Archive`,\n    /// using either user-provided methods or, if `T` is default-serializable to `Archive`,\n    /// using default method for this `Archive`\n    /// \\tparam Archive\n    /// \\tparam T\n    template <typename Archive, typename T>\n    inline constexpr bool is_serializable_v = is_archive_v<Archive> && (is_default_serializable_v<Archive, T> ||\n        is_user_serializable_v<Archive,T>);\n\n    template <typename Archive, typename T>\n    inline constexpr bool is_serializable_v<Archive, const T> = is_serializable_v<Archive, T>;\n\n    template <typename Archive, typename T>\n    struct is_serializable : std::bool_constant<is_serializable_v<Archive,T>> {};\n\n    /// \\brief This trait types tests if \\c Archive is a text archive\n    /// \\tparam Archive an archive type\n    /// \\note much be specialized for each archive\n    template <typename Archive, typename Enabler = void>\n    struct is_text_archive : std::false_type {};\n\n    template <>\n    struct is_text_archive<archive::TextFstreamOutputArchive> : std::true_type {};\n    template <>\n    struct is_text_archive<archive::TextFstreamInputArchive> : std::true_type {};\n\n    /// \\brief \\c is_text_archive_v<A> is a shorthand for \\c is_text_archive<A>::value\n    /// \\tparam Archive an archive type\n    template <typename Archive>\n    constexpr const bool is_text_archive_v = is_text_archive<Archive>::value;\n\n    /*\n     * Some traits for Functions and alike\n     */\n\n    /// next two structs loop over type and dimension\n    /// loop over N=1..6 and apply Functor<T,N> to functor_args..., then call the resulting functor with call_args...\n    /// returns array of results\n    /// Functor must be a template with two parameters: type and integer\n    /// functor_args is a tuple of arguments to be forwarded to Functor<T,N>\n    /// call_args are arguments to be forwarded to the resulting functor\n    /// Example:\n    /// \\code\n    ///   template<typename T, std::size_t N>\n    ///   struct MyFunctor {\n    ///       MyFunctor(int a, double b) : a_(a), b_(b) {}\n    ///       T operator()(const std::string& s) { return T(a_ * N, b_ * N, s); }\n    ///       int a_;\n    ///       double b_;\n    ///   };\n    ///   ...\n    ///   loop_types<MyFunctor, double, float, double_complex, float_complex>(std::tuple<int,double>(1,2.0),std::string(\"hello\"));\n    ///   results is std::array\n    /// \\endcode\n    template<template<typename, std::size_t> class Functor, typename T, std::size_t... Is, typename... FunctorArgs, typename... CallArgs>\n    auto loop_N(std::index_sequence<Is...>, std::tuple<FunctorArgs...>&& functor_args, CallArgs&&... call_args)\n        -> std::array<decltype(Functor<T, 1>(std::forward<FunctorArgs>(std::get<FunctorArgs>(functor_args))...)(std::forward<CallArgs>(call_args)...)), sizeof...(Is)>\n    {\n        return { Functor<T, Is + 1>(std::forward<FunctorArgs>(std::get<FunctorArgs>(functor_args))...)(std::forward<CallArgs>(call_args)...)... };\n    }\n\n    template<template<typename, std::size_t> class Functor, typename... Ts, typename... FunctorArgs, typename... CallArgs>\n    auto loop_types(std::tuple<FunctorArgs...>&& functor_args, CallArgs&&... call_args)\n    {\n        return std::make_tuple(loop_N<Functor, Ts>(std::make_index_sequence<6>{}, std::move(functor_args), std::forward<CallArgs>(call_args)...)...);\n    }\n\n    /// loop over a tuple and apply unary operator op to each element\n    template<typename tupleT, typename opT, std::size_t I=0>\n    static void unary_tuple_loop(tupleT& tuple, opT& op) {\n        if constexpr(I < std::tuple_size_v<tupleT>) {\n            auto& element1=std::get<I>(tuple);\n            op(element1);\n            unary_tuple_loop<tupleT,opT, I+1>(tuple,op);\n        }\n    }\n\n    /// loop over the tuple elements of both tuples and execute the operation op on each element pair\n    template<typename tupleT, typename tupleR, typename opT, std::size_t I=0>\n    static void binary_tuple_loop(tupleT& tuple1, tupleR& tuple2, opT& op) {\n        if constexpr(I < std::tuple_size_v<tupleT>) {\n            auto& element1=std::get<I>(tuple1);\n            auto& element2=std::get<I>(tuple2);\n            op(element1,element2);\n            binary_tuple_loop<tupleT, tupleR, opT, I+1>(tuple1,tuple2,op);\n        }\n    }\n\n    /// check if objT is a std::vector of Function<T,NDIM>\n    /// forward declaration of Function\n    /// usage: is_madness_function_vector<objT>::value\n    template<typename T, std::size_t NDIM> class Function;\n    template<typename>\n    struct is_madness_function_vector : std::false_type { };\n    template<typename T, std::size_t NDIM>\n    struct is_madness_function_vector<std::vector<Function<T, NDIM>>> : std::true_type { };\n\n\n\n    /* Macros to make some of this stuff more readable */\n\n    /**\n       \\def REMCONST(TYPE)\n       \\brief Macro to make remove_const<T> easier to use\n\n       \\def MEMFUN_RETURNT(TYPE)\n       \\brief Macro to make member function type traits easier to use\n    */\n\n#define REMCONST(TYPE)  typename std::remove_const< TYPE >::type\n#define MEMFUN_RETURNT(MEMFUN) typename madness::detail::memfunc_traits< MEMFUN >::result_type\n\n} // namespace madness\n\n#endif // MADNESS_WORLD_TYPE_TRAITS_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/uniqueid.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file uniqueid.h\n \\brief \\todo Brief description needed.\n \\ingroup world\n*/\n\n#ifndef MADNESS_WORLD_UNIQUEID_H__INCLUDED\n#define MADNESS_WORLD_UNIQUEID_H__INCLUDED\n\n#include <cstddef>\n#include <iostream>\n#include <madness/world/worldhash.h>\n\nnamespace madness {\n\n    class World;\n\n    /// \\addtogroup world\n    /// @{\n\n    /// Class for unique global IDs.\n    class uniqueidT {\n        friend class World;\n    private:\n        unsigned long worldid; ///< ID of the \\c World the object belongs to.\n        unsigned long objid; ///< ID of the object.\n\n    public:\n        /// Default constructor.\n        uniqueidT()\n                : worldid(0), objid(0) {};\n\n        /// Constructor that uses the world and object IDs.\n\n        /// \\param[in] worldid The ID of the \\c World the object belongs to.\n        /// \\param[in] objid The ID of the object.\n        uniqueidT(unsigned long worldid, unsigned long objid)\n            : worldid(worldid), objid(objid) {};\n\n        /// nonnull state tester\n\n        /// \\return return true if non-default initialized\n        explicit operator bool() const {\n            return objid!=0;\n        }\n\n        /// Serialize a unique ID object.\n\n        /// \\tparam Archive The archive type.\n        /// \\param[in,out] ar The archive.\n        template <typename Archive>\n        void serialize(Archive& ar) {\n            ar & worldid & objid;\n        }\n\n        /// Access the \\c World ID.\n\n        /// \\return The \\c World ID.\n        unsigned long get_world_id() const {\n            return worldid;\n        }\n\n        /// Access the object ID.\n\n        /// \\return The object ID.\n        unsigned long get_obj_id() const {\n            return objid;\n        }\n\n        /// Stream insertion function for a \\c uniqueidT.\n\n        /// \\tparam CharT a character type\n        /// \\tparam Traits a traits type describing \\p CharT\n        /// \\param[in,out] s The output stream.\n        /// \\param[in] id The \\c uniqueidT to be output.\n        /// \\return The output stream (for chaining).\n        template <typename CharT, typename Traits>\n        friend std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& s, const uniqueidT& id) {\n            s << \"{\" << id.get_world_id() << \",\" << id.get_obj_id() << \"}\";\n            return s;\n        }\n    }; // class uniqueidT\n\n    /// Equality comparison operator\n\n    /// \\param[in] a a \\c uniqueidT object\n    /// \\param[in] b a \\c uniqueidT object\n    /// \\return True if \\p a and \\b b refer to the same object in the same world\n    inline bool operator==(const uniqueidT& a, const uniqueidT& b) {\n        return a.get_obj_id() == b.get_obj_id() && a.get_world_id() == b.get_world_id();\n    }\n\n    /// Inequality comparison operator\n\n    /// \\param[in] a a \\c uniqueidT object\n    /// \\param[in] b a \\c uniqueidT object\n    /// \\return True if \\c a==b is false\n    inline bool operator!=(const uniqueidT& a, const uniqueidT& b) {\n        return !(a == b);\n    }\n\n    /// Ordering operator\n\n    /// \\param[in] a a \\c uniqueidT object\n    /// \\param[in] b a \\c uniqueidT object\n    /// \\return True if \\c a.get_world_id()<b.get_world_id() or \\c a.get_world_id()==b.get_world_id()&&a.get_obj_id()<b.get_obj_id()\n    inline bool operator<(const uniqueidT& a, const uniqueidT& b) {\n        return a.get_world_id() < b.get_world_id() || (a.get_world_id() == b.get_world_id() && a.get_obj_id() < b.get_obj_id());\n    }\n\n    /// Hash a \\c uniqueidT.\n\n    /// \\param[in] id The \\c uniqueidT.\n    /// \\return The hash.\n    inline hashT hash_value(const uniqueidT& id) {\n        hashT seed = hash_value(id.get_world_id());\n        detail::combine_hash(seed, hash_value(id.get_obj_id()));\n\n        return seed;\n    }\n\n    /// @}\n\n}  // namespace madness\n\n\n#endif // MADNESS_WORLD_UNIQUEID_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/units.cc",
    "content": "//\n// Created by Eduard Valeyev on 2/5/24.\n//\n\n#include <madness/world/units.h>\n\n#include <madness/world/madness_exception.h>\n\n\n#include <sstream>\n\nnamespace madness {\n\nstd::uint64_t cstr_to_memory_size(const char *str) {\n  // Convert the string into bytes\n  std::stringstream ss(str);\n  std::uint64_t memory = 0;\n  if (ss >> memory) {\n    if (memory > 0) {\n      std::string unit;\n      if (ss >> unit) { // Failure == assume bytes\n        if (unit == \"KB\" || unit == \"kB\" || unit == \"KiB\") {\n          MADNESS_ASSERT(memory <= (1ul << 54));\n          memory *= 1024ul;\n        } else if (unit == \"MB\" || unit == \"MiB\") {\n          MADNESS_ASSERT(memory <= (1ul << 44));\n          memory *= 1024ul * 1024;\n        } else if (unit == \"GB\" || unit == \"GiB\") {\n          MADNESS_ASSERT(memory <= (1ul << 34));\n          memory *= 1024ul * 1024 * 1024;\n        } else if (unit == \"TB\" || unit == \"TiB\") {\n          MADNESS_ASSERT(memory <= (1ul << 24));\n          memory *= 1024ul * 1024 * 1024 * 1024;\n        } else if (unit == \"PB\" || unit == \"PiB\") {\n          MADNESS_ASSERT(memory <= (1ul << 14));\n          memory *= 1024ul * 1024 * 1024 * 1024 * 1024;\n        } else if (unit == \"EB\" || unit == \"EiB\") {\n          MADNESS_ASSERT(memory <= (1ul << 4));\n          memory *= 1024ul * 1024 * 1024 * 1024 * 1024 * 1024;\n        }\n      }\n    }\n  }\n\n  return memory;\n}\n\n}  // namespace madness"
  },
  {
    "path": "src/madness/world/units.h",
    "content": "//\n// Created by Eduard Valeyev on 2/5/24.\n//\n\n#ifndef MADNESS_UNITS_H\n#define MADNESS_UNITS_H\n\n#include <cstddef>\n#include <cstdint>\n\nnamespace madness {\n\nnamespace units::literals {\n\nconstexpr std::size_t operator\"\"_KiB(unsigned long long int x) {\n  return 1024ULL * x;\n}\n\nconstexpr std::size_t operator\"\"_MiB(unsigned long long int x) {\n  return 1024_KiB * x;\n}\n\nconstexpr std::size_t operator\"\"_GiB(unsigned long long int x) {\n  return 1024_MiB * x;\n}\n\nconstexpr std::size_t operator\"\"_TiB(unsigned long long int x) {\n  return 1024_GiB * x;\n}\n\nconstexpr std::size_t operator\"\"_PiB(unsigned long long int x) {\n  return 1024_TiB * x;\n}\n\nconstexpr std::size_t operator\"\"_EiB(unsigned long long int x) {\n  return 1024_PiB * x;\n}\n\nconstexpr std::size_t operator\"\"_kB(unsigned long long int x) {\n  return 1024ULL * x;\n}\n\nconstexpr std::size_t operator\"\"_KB(unsigned long long int x) {\n  return 1024ULL * x;\n}\n\nconstexpr std::size_t operator\"\"_MB(unsigned long long int x) {\n  return 1024_kB * x;\n}\n\nconstexpr std::size_t operator\"\"_GB(unsigned long long int x) {\n  return 1024_MB * x;\n}\n\nconstexpr std::size_t operator\"\"_TB(unsigned long long int x) {\n  return 1024_GB * x;\n}\n\nconstexpr std::size_t operator\"\"_PB(unsigned long long int x) {\n  return 1024_TB * x;\n}\n\nconstexpr std::size_t operator\"\"_EB(unsigned long long int x) {\n  return 1024_PB * x;\n}\n\n} // namespace units::literals\n\n/// Unit-aware conversion of a C string to a size_t\n\n/// See https://en.wikipedia.org/wiki/Kilobyte for units. This assumes\n/// memory units throughout, i.e. `MiB` and `MB` both mean 1024*1024 bytes, etc.\n/// To reduce confusion, `KiB`, `kB`, and `KB` all mean 1024 bytes.\n/// @param str The C string to convert.\n/// @return The memory size, in bytes\nstd::uint64_t cstr_to_memory_size(const char* str);\n\n} // namespace madness\n\n#endif // MADNESS_UNITS_H\n"
  },
  {
    "path": "src/madness/world/vector.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_VECTOR_H__INCLUDED\n#define MADNESS_WORLD_VECTOR_H__INCLUDED\n\n/**\n \\file vector.h\n \\brief Implement the \\c madness:Vector class, an extension of \\c std::array\n    that supports some mathematical operations.\n \\ingroup containers\n*/\n\n#include <madness/madness_config.h>\n#include <madness/world/madness_exception.h>\n#include <madness/world/worldhash.h>\n#include <madness/world/array_addons.h>\n#include <madness/world/archive.h>\n#include <vector>\n#include <algorithm>\n#include <iostream>\n#include <math.h>\n\nnamespace madness {\n\n    /// A simple, fixed dimension vector.\n\n    /// This class eliminates memory allocation cost, is just POD (it can be\n    /// copied easily and allocated on the stack), and the known\n    /// dimension permits aggressive compiler optimizations.\n    ///\n    /// Provides additional mathematical and I/O operations.\n    /// \\tparam T The type of data stored in the vector.\n    /// \\tparam N The size of the vector.\n    template <typename T, std::size_t N>\n    class Vector {\n    public:\n        using arrayT = std::array<T,N>; ///< The underlying array type.\n\n        template <typename Q,std::size_t M>\n        friend class Vector;\n\n    private:\n        arrayT data_; ///< The underlying array.\n\n    public:\n        // type defs... these are just wrappers to the underlying array types\n        using value_type = typename arrayT::value_type; ///< The data value type.\n        using iterator = typename arrayT::iterator; ///< Iterator type.\n        using const_iterator = typename arrayT::const_iterator; ///< Const iterator type.\n        using reverse_iterator = typename arrayT::reverse_iterator; ///< Reverse iterator type.\n        using const_reverse_iterator = typename arrayT::const_reverse_iterator; ///< Const reverse iterator type.\n        using reference = typename arrayT::reference; ///< Reference type.\n        using const_reference = typename arrayT::const_reference; ///< Const reference type.\n        using size_type = typename arrayT::size_type; ///< Size type.\n        using difference_type = typename arrayT::difference_type; ///< Difference type.\n\n        /// The size of the \\c Vector.\n        static inline constexpr size_type static_size = N;\n\n        /// Default constructor; does not initialize vector contents.\n        constexpr Vector() = default;\n\n        /// Initialize all elements to value \\c t.\n\n        /// \\tparam Q The type of \\c t.\n        /// \\param[in] t The value used to initialized the \\c Vector.\n        template <typename Q>\n        constexpr explicit Vector(Q t) : data_{} {\n            fill(t);\n        }\n\n        /// Construct from a C-style array of the same dimension.\n\n        /// \\tparam Q The type of data in \\c t.\n        /// \\param[in] t The C-style array.\n        template <typename Q>\n        constexpr explicit Vector(const Q (&t)[N]) {\n#if __cplusplus >= 202002L\n          std::copy(t, t+N, data_.begin());\n#else\n          for(std::size_t i=0; i!=N; ++i) data_[i] = t[i];\n#endif\n        }\n\n        /// Construct from an STL vector of equal or greater length.\n\n        /// \\tparam Q Type of data stored in the \\c std::vector.\n        /// \\tparam A Allocator type for the \\c std::vector.\n        /// \\param[in] t The \\c std::vector.\n        template <typename Q, typename A>\n        constexpr explicit Vector(const std::vector<Q, A>& t) {\n            operator=(t);\n        }\n\n        /// Construct from a \\c std::array of equal length.\n\n        /// \\tparam Q Type of data stored in the original \\c std::array.\n        /// \\param[in] t The \\c std::array.\n        template <typename Q>\n        constexpr explicit Vector(const std::array<Q, N>& t) {\n            data_ = t;\n        }\n\n        /// Copy constructor is deep (because \\c Vector is POD).\n\n        /// \\param[in] other The \\c Vector to copy.\n        constexpr Vector(const Vector<T,N>& other) {\nMADNESS_PRAGMA_GCC(diagnostic push)\nMADNESS_PRAGMA_GCC(diagnostic ignored \"-Wuninitialized\")\nMADNESS_PRAGMA_GCC(diagnostic ignored \"-Wmaybe-uninitialized\")\n            data_ = other.data_;\nMADNESS_PRAGMA_GCC(diagnostic pop)\n        }\n\n        /// Copy constructor is deep (because \\c Vector is POD).\n\n        /// \\tparam Q Type of the \\c Vector to copy.\n        /// \\param[in] other The \\c Vector to copy.\n        template <typename Q>\n        constexpr Vector(const Vector<Q,N>& other) {\n            std::copy(other.data_.begin(), other.data_.end(), data_.begin());\n        }\n\n        /// List initialization constructor (deep copy because \\c Vector is POD).\n\n        /// This constructor allows initialization using, e.g.,\n        /// \\code\n        /// Vector<double, 3> v{ 1.5, 2.4, -1.9 };\n        /// \\endcode\n        /// \\throw MadnessException if the list does not contain exactly \\c N\n        ///    elements.\n        /// \\param[in] list The initializer list; elements are copied to the\n        ///    \\c Vector.\n        constexpr Vector(std::initializer_list<T> list) :\n            data_()\n        {\n            MADNESS_ASSERT(list.size() == N);\n#if __cplusplus >= 202002L\n            std::copy(list.begin(), list.end(), data_.begin());\n#else\n            for(std::size_t i=0; i!=N; ++i) data_[i] = *(list.begin()+i);\n#endif\n        }\n\n        /// Assignment is deep (because a \\c Vector is POD).\n\n        /// \\param[in] other The \\c Vector to copy.\n        /// \\return This \\c Vector.\n        constexpr Vector<T,N>& operator=(const Vector<T,N>& other) {\n            data_ = other.data_;\n            return *this;\n        }\n\n        /// Assignment is deep (because \\c Vector is POD).\n\n        /// \\tparam Q The type of the \\c Vector to copy.\n        /// \\param[in] other The \\c Vector to copy.\n        /// \\return This \\c Vector.\n        template <typename Q>\n        constexpr Vector<T,N>& operator=(const Vector<Q,N>& other) {\n            std::copy(other.data_.begin(), other.data_.end(), data_.begin());\n            return *this;\n        }\n\n        /// Assignment is deep (because \\c Vector is POD).\n\n        /// Make sure the size of \\c other is at least \\c N.\n        /// \\tparam Q The type of data in the \\c std::vector.\n        /// \\tparam A The allocator type for the \\c std::vector.\n        /// \\param[in] other The \\c std::vector to copy.\n        /// \\return This \\c Vector.\n        template <typename Q, typename A>\n        constexpr Vector<T,N>& operator=(const std::vector<Q, A>& other) {\n            MADNESS_ASSERT(other.size() >= N);\n#if __cplusplus >= 202002L\n            std::copy(other.begin(), other.begin() + N, data_.begin());\n#else\n            for(std::size_t i=0; i!=N; ++i) data_[i] = other[i];\n#endif\n            return *this;\n        }\n\n        /// List initialization assignment (deep copy because \\c Vector is POD).\n\n        /// This assignment operator allows initialization using, e.g.,\n        /// \\code\n        /// v = { 1.5, 2.4, -1.9 };\n        /// \\endcode\n        /// \\throw MadnessException if the list does not contain exactly \\c N\n        ///    elements.\n        /// \\param[in] list The initializer list; elements are copied to the\n        ///    \\c Vector.\n        constexpr Vector<T,N>& operator=(std::initializer_list<T> list) {\n            MADNESS_ASSERT(list.size() == N);\n#if __cplusplus >= 202002L\n            std::copy(list.begin(), list.end(), data_.begin());\n#else\n            for(std::size_t i=0; i!=N; ++i) data_[i] = *(list.begin() + i);\n#endif\n            return *this;\n        }\n\n        /// Fill from a scalar value.\n\n        /// \\param[in] t The scalar to use for filling.\n        /// \\return This \\c Vector.\n        constexpr Vector<T,N>& operator=(const T& t) {\n            fill(t);\n            return *this;\n        }\n\n        /// Type conversion to a \\c std::array.\n\n        /// \\return The underlying \\c std::array.\n        constexpr operator std::array<T,N> () { return data_; }\n\n        // iterator support\n        /// Iterator starting at the first element.\n\n        /// \\return Iterator to the starting element.\n        constexpr iterator begin() { return data_.begin(); }\n\n        /// Const iterator starting at the first element.\n\n        /// \\return Const iterator to the starting element.\n        constexpr const_iterator begin() const { return data_.begin(); }\n\n        /// Iterator to the end (past the last element).\n\n        /// \\return Iterator to the end.\n        constexpr iterator end() { return data_.end(); }\n\n        /// Const iterator to the end (past the last element).\n\n        /// \\return Const iterator to the end.\n        constexpr const_iterator end() const { return data_.end(); }\n\n        // reverse iterator support\n        /// Reverse iterator starting at the last element.\n\n        /// \\return Reverse iterator to the last element.\n        constexpr reverse_iterator rbegin() { return data_.rbegin(); }\n\n        /// Const reverse iterator starting at the last element.\n\n        /// \\return Const reverse iterator to the last element.\n        constexpr const_reverse_iterator rbegin() const { return data_.rbegin(); }\n\n        /// Reverse iterator to the beginning (before the first element).\n\n        /// \\return Reverse iterator to the beginning.\n        constexpr reverse_iterator rend() { return data_.rend(); }\n\n        /// Const reverse iterator to the beginning (before the first element).\n\n        /// \\return Const reverse iterator to the beginning.\n        constexpr const_reverse_iterator rend() const { return data_.rend(); }\n\n        // capacity\n        /// Accessor for the number of elements in the \\c Vector.\n\n        /// \\return The number of elements.\n        constexpr size_type size() const { return data_.size(); }\n\n        /// Check if the \\c Vector is empty.\n\n        /// \\return True if the \\c Vector is empty; false otherwise. This\n        ///    should be false unless `N == 0`.\n        constexpr  bool empty() const { return data_.empty(); }\n\n        /// Get the maximum size of the \\c Vector.\n\n        /// \\return The maximum size, \\c N.\n        constexpr size_type max_size() const { return data_.max_size(); }\n\n        // element access\n        /// Access element \\c i of the \\c Vector.\n\n        /// Bounds checking is not performed.\n        /// \\param[in] i The index.\n        /// \\return A reference to element \\c i.\n        constexpr reference operator[](size_type i) { return data_[i]; }\n\n        /// Access element \\c i of the \\c Vector.\n\n        /// Bounds checking is not performed.\n        /// \\param[in] i The index.\n        /// \\return A const reference to element \\c i.\n        constexpr const_reference operator[](size_type i) const { return data_[i]; }\n\n        /// Access element \\c i of the \\c Vector with bounds checking.\n\n        /// \\param[in] i The index.\n        /// \\return A reference to element \\c i.\n        constexpr reference at(size_type i) { return data_.at(i); }\n\n        /// Access element \\c i of the \\c Vector with bounds checking.\n\n        /// \\param[in] i The index.\n        /// \\return A const reference to element \\c i.\n        constexpr const_reference at(size_type i) const { return data_.at(i); }\n\n        /// Access the first element.\n\n        /// \\return A reference to the first element.\n        constexpr reference front() { return data_.front(); }\n\n        /// Access the first element.\n\n        /// \\return A const reference to the first element.\n        constexpr const_reference front() const { return data_.front(); }\n\n        /// Access the last element.\n\n        /// \\return A reference to the last element.\n        constexpr reference back() { return data_.back(); }\n\n        /// Access the last element.\n\n        /// \\return A const reference to the last element.\n        constexpr const_reference back() const { return data_.back(); }\n\n        /// Direct access to the underlying array.\n\n        /// \\return Pointer to the underlying array.\n        constexpr T* data() { return data_.data(); }\n\n        /// Direct access to the underlying array.\n\n        /// \\return Const pointer to the underlying array.\n        constexpr const T* data() const { return data_.data(); }\n\n        // modifiers\n        /// Swap the contents with another \\c Vector.\n\n        /// \\param[in] other The other vector.\n        constexpr void swap(Vector<T, N>& other) { data_.swap(other.data_); }\n\n        /// Fill the \\c Vector with the specified value.\n\n        /// \\param[in] t The value used to fill the \\c Vector.\n        constexpr void fill(const T& t) {\n#if __cplusplus >= 202002L\n          data_.fill(t);\n#else\n          for (std::size_t i = 0; i < N; i++)\n            data_[i] = t;\n#endif\n        }\n\n        /// In-place, element-wise multiplcation by a scalar.\n\n        /// \\tparam Q Type of the scalar.\n        /// \\param[in] q The scalar.\n        /// \\return A reference to this for chaining operations.\n        /// \\todo Do we want a similar division operation?\n        template <typename Q>\n        constexpr Vector<T,N>& operator*=(Q q) {\n            for(size_type i = 0; i < N; ++i)\n                data_[i] *= q;\n            return *this;\n        }\n\n        /// In-place, element-wise addition of another \\c Vector.\n\n        /// \\tparam Q Type stored in the other \\c Vector.\n        /// \\param[in] q The other \\c Vector.\n        /// \\return A reference to this for chaining operations.\n        template <typename Q>\n        constexpr Vector<T,N>& operator+=(const Vector<Q,N>& q) {\n            for(size_type i = 0; i < N; ++i)\n                data_[i] += q[i];\n            return *this;\n        }\n\n        /// In-place, element-wise subtraction of another \\c Vector.\n\n        /// \\tparam Q Type stored in the other \\c Vector.\n        /// \\param[in] q The other \\c Vector.\n        /// \\returns A reference to this for chaining operations.\n        template <typename Q>\n        constexpr Vector<T,N>& operator-=(const Vector<Q,N>& q) {\n            for(size_type i = 0; i < N; ++i)\n                data_[i] -= q[i];\n            return *this;\n        }\n\n        /// Calculate the 2-norm of the vector elements.\n\n        /// \\return The 2-norm.\n        /// \\todo Is there a reason this is \"normf\" and not \"norm2\"?\n        constexpr T normf() const {\n        \tT d = 0.;\n        \tfor(std::size_t i=0; i<N; ++i)\n                d += (data_[i])*(data_[i]);\n        \treturn sqrt(d);\n        }\n\n        /// Support for MADNESS serialization.\n\n        /// \\tparam Archive The archive type.\n        /// \\param[in,out] ar The archive.\n        template <typename Archive>\n        constexpr void serialize(Archive& ar) {\n            ar & data_;\n        }\n\n        /// Support for MADNESS hashing.\n\n        /// \\return The hash.\n        constexpr hashT hash() const {\n            return hash_value(data_);\n        }\n\n        // comparisons\n        /// Check if each element is equal to its partner in the other \\c Vector.\n\n        /// \\param[in] l One \\c Vector.\n        /// \\param[in] r The other \\c Vector.\n        /// \\return True if each element is equal to its partner; false otherwise.\n        friend constexpr bool operator==(const Vector<T, N>& l, const Vector<T, N>& r) {\n            return l.data_ == r.data_;\n        }\n\n        /// Check if any element is not equal to its partner in the other \\c Vector.\n\n        /// \\param[in] l One \\c Vector.\n        /// \\param[in] r The other \\c Vector.\n        /// \\return True if any element is not equal to its partner; false otherwise.\n        friend constexpr bool operator!=(const Vector<T, N>& l, const Vector<T, N>& r) {\n            return l.data_ != r.data_;\n        }\n\n        /// Compare \\c l and \\c r lexicographically.\n\n        /// \\param[in] l One \\c Vector.\n        /// \\param[in] r The other \\c Vector.\n        /// \\return True if the contents of \\c l are lexicographically less than the contents of \\c r; false otherwise.\n        friend constexpr bool operator<(const Vector<T, N>& l, const Vector<T, N>& r) {\n            return l.data_ < r.data_;\n        }\n\n        /// Compare \\c l and \\c r lexicographically.\n\n        /// \\param[in] l One \\c Vector.\n        /// \\param[in] r The other \\c Vector.\n        /// \\return True if the contents of \\c l are lexicographically greater than the contents of \\c r; false otherwise.\n        friend constexpr bool operator>(const Vector<T, N>& l, const Vector<T, N>& r) {\n            return l.data_ > r.data_;\n        }\n\n        /// Compare \\c l and \\c r lexicographically.\n\n        /// \\param[in] l One \\c Vector.\n        /// \\param[in] r The other \\c Vector.\n        /// \\return True if the contents of \\c l are lexicographically less than or equal to the contents of \\c r; false otherwise.\n        friend constexpr bool operator<=(const Vector<T, N>& l, const Vector<T, N>& r) {\n            return l.data_ <= r.data_;\n        }\n\n        /// Compare \\c l and \\c r lexicographically.\n\n        /// \\param[in] l One \\c Vector.\n        /// \\param[in] r The other \\c Vector.\n        /// \\return True if the contents of \\c l are lexicographically greater than or equal to the contents of \\c r; false otherwise.\n        friend constexpr bool operator>=(const Vector<T, N>& l, const Vector<T, N>& r) {\n            return l.data_ >= r.data_;\n        }\n\n        /// Output a \\c Vector to stream.\n\n        /// \\param[in] s The output stream.\n        /// \\param[in] v The \\c Vector to output.\n        /// \\return The output stream.\n        friend std::ostream& operator<<(std::ostream& s, const Vector<T,N>& v) {\n            using madness::operators::operator<<;\n            s << v.data_;\n            return s;\n        }\n    }; // class Vector\n\n    /// Swap the contents of two `Vector`s.\n\n    /// \\tparam T The type of data stored in the `Vector`s.\n    /// \\tparam N The size of the `Vector`s.\n    /// \\param[in,out] l One \\c Vector.\n    /// \\param[in,out] r The other \\c Vector.\n    template <typename T, std::size_t N>\n    constexpr void swap(Vector<T,N>& l, Vector<T,N>& r) {\n        l.swap(r);\n    }\n\n\n    // Arithmetic operators\n\n    /// Scale a \\c Vector.\n\n    /// Multiply each \\c Vector element by the scalar value \\c r.\n    /// \\tparam T The left-hand \\c Vector element type.\n    /// \\tparam N The \\c Vector size.\n    /// \\tparam U The right-hand scalar type.\n    /// \\param[in] l The left-hand \\c Vector.\n    /// \\param[in] r The right-hand scalar value to be multiplied by\n    ///    the \\c Vector elements.\n    /// \\return A new \\c Vector, \\c c, where `c[i]==(l[i]*r)`.\n    template <typename T, std::size_t N, typename U>\n    constexpr Vector<T,N> operator*(Vector<T,N> l, U r) {\n        // coordinate passed by value to allow compiler optimization\n        for (std::size_t i = 0; i < N; ++i)\n            l[i] *= r;\n        return l;\n    }\n\n\n    /// Scale a \\c Vector.\n\n    /// Multiply the scalar value \\c l by each \\c Vector element.\n    /// \\tparam T The left-hand scalar type.\n    /// \\tparam U The right-hand \\c Vector element type.\n    /// \\tparam N The \\c Vector size.\n    /// \\param[in] l The left-hand scalar value to be multiplied by\n    ///    the \\c Vector elements.\n    /// \\param[in] r The right-hand \\c Vector.\n    /// \\return A new \\c Vector, \\c c, where `c[i]==(l*r[i])`.\n    template <typename T, typename U, std::size_t N>\n    constexpr Vector<T,N> operator*(T l, Vector<U,N> r) {\n        // coordinate passed by value to allow compiler optimization\n        for (std::size_t i = 0; i < N; ++i)\n            r[i] *= l;\n        return r;\n    }\n\n    /// Multiply (element-wise) two `Vector`s.\n\n    /// Do an element-wise multiplication of \\c l and \\c r and return the\n    /// result in a new \\c Vector.\n    /// \\tparam T The left-hand \\c Vector element type.\n    /// \\tparam N The \\c Vector size.\n    /// \\tparam U The right-hand \\c Vector element type.\n    /// \\param[in] l The left-hand \\c Vector.\n    /// \\param[in] r The right-hand \\c Vector.\n    /// \\return A new \\c Vector, \\c c, where `c[i]==(l[i]*r[i])`.\n    template <typename T, std::size_t N, typename U>\n    constexpr Vector<T,N> operator*(Vector<T,N> l, const Vector<U,N>& r) {\n        // coordinate r passed by value to allow compiler optimization\n        for (std::size_t i = 0; i < N; ++i)\n            l[i] *= r[i];\n        return l;\n    }\n\n    /// Divide (element-wise) two `Vector`s.\n\n    /// Do an element-wise division of \\c l by \\c r and return the\n    /// result in a new \\c Vector.\n    /// \\tparam T The left-hand \\c Vector element type.\n    /// \\tparam N The \\c Vector size.\n    /// \\tparam U The right-hand \\c Vector element type.\n    /// \\param[in] l The left-hand \\c Vector.\n    /// \\param[in] r The right-hand \\c Vector.\n    /// \\return A new \\c Vector, \\c c, where `c[i]==(l[i]/r[i])`.\n    template <typename T, std::size_t N, typename U>\n    constexpr Vector<T,N> operator/(Vector<T,N> l, const Vector<U,N>& r) {\n      for (std::size_t i = 0; i < N; ++i)\n        l[i] /= r[i];\n      return l;\n    }\n\n    /// Add a scalar to a \\c Vector.\n\n    /// Add the scalar value \\c r to each \\c Vector element.\n    /// \\tparam T The left-hand \\c Vector element type.\n    /// \\tparam N The \\c Vector size.\n    /// \\tparam U The right-hand scalar type.\n    /// \\param[in] l The left-hand \\c Vector.\n    /// \\param[in] r The right-hand scalar value to be added to the \\c Vector.\n    /// \\return A new \\c Vector, \\c c, where `c[i]==(l[i]+r)`.\n    template <typename T, std::size_t N, typename U>\n    constexpr Vector<T,N> operator+(Vector<T,N> l, U r) {\n        // coordinate passed by value to allow compiler optimization\n        for (std::size_t i = 0; i < N; ++i)\n            l[i] += r;\n        return l;\n    }\n\n    /// Add (element-wise) two `Vector`s.\n\n    /// Do an element-wise addition of \\c l and \\c r and return the\n    /// result in a new \\c Vector.\n    /// \\tparam T The left-hand \\c Vector element type.\n    /// \\tparam N The \\c Vector size.\n    /// \\tparam U The right-hand \\c Vector element type.\n    /// \\param[in] l The left-hand \\c Vector.\n    /// \\param[in] r The right-hand \\c Vector.\n    /// \\return A new \\c Vector, \\c c, where `c[i]==(l[i]+r[i])`.\n    template <typename T, std::size_t N, typename U>\n    constexpr Vector<T,N> operator+(Vector<T,N> l, const Vector<U,N>& r) {\n        // l passed by value to allow compiler optimization\n        for (std::size_t i = 0; i < N; ++i)\n            l[i] += r[i];\n        return l;\n    }\n\n    /// Subtract a scalar from a \\c Vector.\n\n    /// Subtract the scalar value \\c r from the \\c Vector elements `l[i]`.\n    /// \\tparam T The left-hand \\c Vector element type.\n    /// \\tparam N The \\c Vector size.\n    /// \\tparam U The right-hand scalar type.\n    /// \\param[in] l The left-hand \\c Vector.\n    /// \\param[in] r The right-hand scalar value to be added to the \\c Vector.\n    /// \\return A new \\c Vector, \\c c, where `c[i]==(l[i]-r)`.\n    template <typename T, std::size_t N, typename U>\n    constexpr Vector<T,N> operator-(Vector<T,N> l, U r) {\n        // l passed by value to allow compiler optimization\n        for (std::size_t i = 0; i < N; ++i)\n            l[i] -= r;\n        return l;\n    }\n\n    /// Subtract (element-wise) two `Vector`s.\n\n    /// Do an element-wise subtraction of \\c l and \\c r and return the\n    /// result in a new \\c Vector.\n    /// \\tparam T The left-hand \\c Vector element type.\n    /// \\tparam N The \\c Vector size.\n    /// \\tparam U The right-hand \\c Vector element type.\n    /// \\param[in] l The left-hand \\c Vector.\n    /// \\param[in] r The right-hand \\c Vector.\n    /// \\return A new \\c Vector, \\c c, where `c[i]==(l[i]-r[i])`.\n    template <typename T, std::size_t N, typename U>\n    constexpr Vector<T,N> operator-(Vector<T,N> l, const Vector<U,N>& r) {\n        // l passed by value to allow compiler optimization\n        for (std::size_t i = 0; i < N; ++i)\n            l[i] -= r[i];\n        return l;\n    }\n\n\n    /// compute the inner product two `Vector`s.\n\n    /// Do an inner product of \\c l and \\c r and return the\n    /// result in a new \\c Vector.\n    /// \\tparam T The \\c Vector element type.\n    /// \\tparam N The \\c Vector size.\n    /// \\param[in] l The left-hand \\c Vector.\n    /// \\param[in] r The right-hand \\c Vector.\n    /// \\return the inner product, where `result==\\sum_i(l[i]*r[i])`.\n    template <typename T, std::size_t N>\n    constexpr T inner(const Vector<T,N>& l, const Vector<T,N>& r) {\n        static_assert(std::is_arithmetic_v<T>);  // for complex need to conjugate l\n    \tT result=0.0;\n        for (std::size_t i = 0; i < N; ++i)\n            result+=l[i]*r[i];\n        return result;\n    }\n\n    /// compute the cross product two `Vector`s of dimension 3\n\n    /// Do a cross product of \\c l and \\c r and return the result in a new \\c Vector.\n    /// \\tparam T The \\c Vector element type.\n    /// \\tparam N The \\c Vector size.\n    /// \\param[in] l The left-hand \\c Vector.\n    /// \\param[in] r The right-hand \\c Vector.\n    /// \\return the cross product\n    template <typename T, std::size_t N>\n    constexpr typename std::enable_if<N==3, Vector<T,N> >::type\n\tcross(const Vector<T,N>& l, const Vector<T,N>& r) {\n    \tVector<T,N> result;\n    \tresult[0]=l[1]*r[2] - r[1]*l[2];\n    \tresult[1]=l[2]*r[0] - r[2]*l[0];\n    \tresult[2]=l[0]*r[1] - r[0]*l[1];\n        return result;\n    }\n\n\n    /// Factory function for creating a \\c madness::Vector.\n\n    /// Variadic templates are used to create factories that mimic\n    /// \\code\n    /// inline madness::Vector<T, N> vec(T t1, ..., T tN) {\n    ///     std::Vector<T, N> ret;\n    ///     ret[0] = t1;\n    ///     ...\n    ///     ret[N-1] = tN;\n    ///     return ret;\n    /// }\n    /// \\endcode\n    ///\n    /// This function counts the number of arguments passed in through the\n    /// argument pack, creates a \\c std::array of the appropriate size,\n    /// forwards the arguments to the `std::array`'s constructor, and passes\n    /// the \\c std::array to \\c madness::Vector.\n    ///\n    /// \\deprecated This function has been replaced by the list-initialization\n    ///    constructor and assignment operator. Rather than\n    ///    \\code\n    ///    Vector<double, 3> v = vec(1.4, 2.5, 4.0);\n    ///    \\endcode\n    ///    use\n    ///    \\code\n    ///    Vector<double, 3> v{ 1.4, 2.5, 4.0 };\n    ///    \\endcode\n    ///    or\n    ///    \\code\n    ///    Vector<double, 3> v = { 1.4, 2.5, 4.0 };\n    ///    \\endcode\n    ///\n    /// \\note The first argument is separated from the pack to prevent 0-size\n    ///    arrays and also so that the caller doesn't have to explicitly\n    ///    specify \\c T. It is assumed that all arguments are of type \\c T or\n    ///    are convertible to type \\c T.\n    ///\n    /// \\tparam T The data type for the array.\n    /// \\tparam Ts The argument pack; that is, the list of arguments. The\n    ///    size of the resulting \\c Vector is directly determined from the\n    ///    size of the argument pack.\n    /// \\param[in] t The first argument.\n    /// \\param[in] ts The rest of the arguments.\n    /// \\return The \\c Vector with the arguments put into it.\n    template<typename T, typename... Ts>\n    constexpr inline Vector<T, sizeof...(Ts) + 1> vec(T t, Ts... ts) {\n        return Vector<T, sizeof...(Ts) + 1> {\n            std::array<T, sizeof...(Ts) + 1>\n                {{ t, static_cast<T>(ts)... }}\n        };\n    }\n\n\n\t/// Construct a unit-`Vector` that has the same direction as \\c r.\n\n    /// \\tparam T The type of data stored in the \\c Vector.\n    /// \\tparam N The size of the \\c Vector.\n    /// \\param[in] r The \\c Vector.\n    /// \\param[in] eps A precision. If the norm of \\c r is less than \\c eps,\n    ///    the zero vector is returned.\n    /// \\return The desired unit-`Vector` (unless \\c r is numerically the zero\n    ///    \\c Vector).\n    template<typename T, std::size_t N>\n    constexpr Vector<T,N> unitvec(const Vector<T,N>& r, const double eps=1.e-6) {\n\t\tconst double norm=r.normf();\n\t\tif(norm < eps)\n            return Vector<T,N>(0.0);\n\t\treturn r * (1.0/norm);\n\t}\n\n} // namespace madness\n\n#endif // MADNESS_WORLD_VECTOR_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/vector_archive.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_VECTOR_ARCHIVE_H__INCLUDED\n#define MADNESS_WORLD_VECTOR_ARCHIVE_H__INCLUDED\n\n/**\n \\file vector_archive.h\n \\brief Implements an archive wrapping an STL \\c vector.\n \\ingroup serialization\n\n \\todo With a bit of thought this could be generalized to several STL containers.\n*/\n\n#include <type_traits>\n#include <vector>\n#include <cstring>\n#include <madness/world/archive.h>\n\nnamespace madness {\n    namespace archive {\n\n        /// \\addtogroup serialization\n        /// @{\n\n        /// Wraps an archive around an STL \\c vector for output.\n        class VectorOutputArchive : public BaseOutputArchive {\n        public:\n            mutable std::vector<unsigned char>* v; ///< The STL vector being wrapped.\n\n        public:\n            /// Create a buffer to wrap the specified \\c vector.\n\n            /// \\param[in] v The \\c vector.\n            /// \\param[in] hint The minimum capacity of the vector.\n            VectorOutputArchive(std::vector<unsigned char>& v, std::size_t hint=262144)\n                    : v(&v) {\n                open(hint);\n            };\n\n            /// Appends data to the end of the vector.\n\n            /// \\todo Verify/complete the documentation.\n            /// \\tparam T The type of data to be appended.\n            /// \\param[in] t Pointer to the data to be appended.\n            /// \\param[in] n The number of data items to be appended.\n            /// \\return Description needed.\n            template <class T>\n            inline\n            typename std::enable_if< madness::is_trivially_serializable<T>::value, void >::type\n            store(const T* t, long n) const {\n                const unsigned char* ptr = (unsigned char*) t;\n                v->insert(v->end(),ptr,ptr+n*sizeof(T));\n            }\n\n            /// Clear any data in the vector and ensure its capacity is at least \\c hint.\n\n            /// \\param[in] hint The minimum capacity for the vector.\n            void open(std::size_t hint=262144) {\n                v->clear();\n                v->reserve(hint);\n            };\n\n            /// Close the archive.\n            void close() {};\n\n            /// Flush the archive.\n            void flush() {};\n        };\n\n\n        /// Wraps an archive around an STL \\c vector for input.\n        class VectorInputArchive : public BaseInputArchive {\n            mutable std::vector<unsigned char>* v; ///< The STL vector being wrapped.\n            mutable std::size_t i; ///< Current input location.\n\n        public:\n            /// Create a buffer to wrap the specified \\c vector.\n\n            /// \\param[in] v The \\c vector.\n            VectorInputArchive(std::vector<unsigned char>& v) : v(&v) , i(0) {}\n\n            /// Load data from the vector.\n\n            /// The function only appears (due to \\c enable_if) if \\c T is\n            /// serializable.\n            /// \\tparam T The type of data to be loaded.\n            /// \\param[out] t Where to store the loaded data.\n            /// \\param[in] n The number of data items to be loaded.\n            template <class T>\n            inline\n            typename std::enable_if< madness::is_trivially_serializable<T>::value, void >::type\n            load(T* t, long n) const {\n                std::size_t m = n*sizeof(T);\n                if (m+i >  v->size()) MADNESS_EXCEPTION(\"VectorInputArchive: reading past end\", m+1);\n                memcpy((unsigned char*) t, &((*v)[i]), m);\n                i += m;\n            }\n\n            /// Open the archive.\n            void open() {};\n\n            /// Reset the read location to the beginning of the \\c vector.\n            void rewind() const {\n                i=0;\n            };\n\n            /// Get the amount of space left to be read from the \\c vector.\n\n            /// \\return The amount of space left to be read from the \\c vector.\n            std::size_t nbyte_avail() const {\n                return v->size()-i;\n            };\n\n            /// Close the archive.\n            void close() {}\n        };\n\n        /// Implementation of functions for storing the pre/postamble in Vector archives.\n\n        /// \\attention No type checking over Vector buffers, for efficiency.\n        /// \\tparam T The data type.\n        template <class T>\n        struct ArchivePrePostImpl<VectorOutputArchive,T> {\n            /// Store the preamble.\n\n            /// \\param[in] ar The archive.\n            static void preamble_store(const VectorOutputArchive& ar) {};\n\n            /// Store the postamble.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_store(const VectorOutputArchive& ar) {};\n        };\n\n        /// Implementation of functions for loading the pre/postamble in Vector archives.\n\n        /// \\attention No type checking over Vector buffers, for efficiency.\n        /// \\tparam T The data type.\n        template <class T>\n        struct ArchivePrePostImpl<VectorInputArchive,T> {\n            /// Load the preamble.\n\n            /// \\param[in] ar The archive.\n            static inline void preamble_load(const VectorInputArchive& ar) {};\n\n            /// Load the postamble.\n\n            /// \\param[in] ar The archive.\n            static inline void postamble_load(const VectorInputArchive& ar) {};\n        };\n\n        /// @}\n    }\n}\n\n#endif // MADNESS_WORLD_VECTOR_ARCHIVE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/world.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file world.cc\n \\brief Implementation of the \\c World class and associated functions.\n \\ingroup world\n*/\n\n#include <madness/world/world.h>\n#include <madness/world/worldmem.h>\n#include <madness/world/timers.h>\n#include <madness/world/worldam.h>\n#include <madness/world/world_task_queue.h>\n#include <madness/world/worldgop.h>\n#include <cstdlib>\n#include <sstream>\n\n#ifdef MADNESS_HAS_ELEMENTAL\n#if defined(HAVE_EL_H)\n# include <El.hpp>\nnamespace elem = El;\n#elif defined(HAVE_ELEMENTAL_H)\n# include <elemental.hpp>\nusing namespace elem;\n#else\n# error \"MADNESS_HAS_ELEMENTAL set but neither HAVE_EL_H nor HAVE_ELEMENTAL_H set: file an issue at \" MADNESS_PACKAGE_URL\n#endif\n#endif\n\nnamespace madness {\n\n    // File scope variables\n    namespace {\n        double start_cpu_time; ///< \\todo Documentation needed.\n        double start_wall_time; ///< \\todo Documentation needed.\n        bool madness_initialized_ = false;  ///< Tracks if MADNESS has been initialized.\n        bool madness_quiet_ = false;  ///< Tracks if madness::initialize() requested quiet operation\n    } // namespace\n\n    // World static member variables\n    std::list<World*> World::worlds; ///< List of \\c World pointers in the parallel runtime EXCEPT the default World\n    World* World::default_world = nullptr; ///< The default \\c World.\n    std::pair<std::uint64_t, std::uint64_t> World::world_id__next_last{};\n\n    bool initialized() {\n      return madness_initialized_;\n    }\n    bool quiet() {\n      return madness_quiet_;\n    }\n\n    World::World(const SafeMPI::Intracomm& comm,\n                 bool fence)\n            : obj_id(1)          ///< start from 1 so that 0 is an invalid id\n            , user_state(0)\n            , mpi(*(new WorldMpiInterface(comm)))\n            , am(* (new WorldAmInterface(*this)))\n            , taskq(*(new WorldTaskQueue(*this)))\n            , gop(* (new WorldGopInterface(*this)))\n            , myrand_next(0)\n    {\n        if(rank() == 0) {\n            _id = next_world_id();\n        }\n\n        // Use MPI for broadcast as incoming messages may try to access an\n        // uninitialized world.\n        mpi.Bcast(_id, 0);\n        am.worldid = _id;\n\n        if (_id != 0)\n          worlds.push_back(this);\n\n        if (fence)\n          mpi.Barrier();\n    }\n\n\n    void World::args(int argc, char** argv) {\n        for (int arg=1; arg<argc; ++arg) {\n            if (strcmp(argv[arg],\"-dx\")==0) xterm_debug(\"objtest\", 0);\n//             if (strcmp(argv[arg],\"-dam\")==0) am.set_debug(true);\n//            if (strcmp(argv[arg],\"-dmpi\")==0) mpi.set_debug(true);\n//             if (strcmp(argv[arg],\"-dref\")==0) mpi.set_debug(true);\n        }\n    }\n\n    World::~World() {\n//        stray WorldObjects are allowed as long as they outlive madness::finalize() :(\n//        MADNESS_ASSERT_NOEXCEPT(map_ptr_to_id.size() == 0);\n//        MADNESS_ASSERT_NOEXCEPT(map_id_to_ptr.size() == 0);\n        // if destroying an unfenced world there may be world objects waiting to be deleted\n        // delete them first before deregistering from worlds so that WorldObject dtor can verify that\n        // I still exist\n        delete &gop;\n        delete &taskq;\n        delete &am;\n        delete &mpi;\n        if (this->_id != 0) worlds.remove(this);\n    }\n\n    void World::initialize_world_id_range(int global_rank) {\n      constexpr std::uint64_t range_size = 1ul<<32;\n      constexpr std::uint64_t range_size_minus_1 = (1ul<<32) - 1;\n      world_id__next_last = std::make_pair(global_rank * range_size, global_rank * range_size + range_size_minus_1);\n    }\n\n    std::uint64_t World::next_world_id() {\n      MADNESS_ASSERT(world_id__next_last.first != world_id__next_last.second);\n      return world_id__next_last.first++;\n    }\n\n    void error(const char *msg) {\n        std::cerr << \"MADNESS: fatal error: \" << msg << std::endl;\n        SafeMPI::COMM_WORLD.Abort(1);\n    }\n\n\n    World& initialize(int& argc, char**& argv, bool quiet) {\n        return initialize(argc, argv, SafeMPI::COMM_WORLD, quiet);\n    }\n\n    World& initialize(int& argc, char**& argv, int nthread, bool quiet) {\n      return initialize(argc, argv, SafeMPI::COMM_WORLD, nthread, quiet);\n    }\n\n    World& initialize(int& argc, char**& argv, const MPI_Comm& comm, int nthread, bool quiet) {\n      return initialize(argc, argv, SafeMPI::Intracomm(comm), nthread, quiet);\n    }\n\n    World& initialize(int& argc, char**& argv, const SafeMPI::Intracomm& comm, bool quiet) {\n      return initialize(argc, argv, comm, -1, quiet);\n    }\n\n    World& initialize(int& argc, char**& argv, const SafeMPI::Intracomm& comm, int nthread, bool quiet) {\n        madness_quiet_ = quiet;\n\n#ifdef HAVE_PAPI\n        initialize_papi();\n#endif\n\n        const char* sbind = getenv(\"MAD_BIND\");\n        if (!sbind) sbind = MAD_BIND_DEFAULT;\n\tif (sbind==std::string(\"ON\") || sbind==std::string(\"TRUE\")) {\n\t  ::madness::binder.set_do_bind(true);\n\t}\n\telse {\n\t  ::madness::binder.set_do_bind(false);\n\t}\n\n#if defined(HAVE_IBMBGQ) and defined(HPM)\n        // HPM Profiler\n        // Convention for thread IDs is a bit odd, but reflects their\n        // internal labeling in the code.\n        // HPM_THREAD_ID = -10, all threads and aggregates\n        // HPM_THREAD_ID =  -2, main thread\n        // HPM_THREAD_ID =  -1, threads not in pool, i.e. communication\n        // HPM_THREAD_ID = 0..MAD_NUM_THREADS - 2, threads in the pool\n        int hpm_thread_id;\n        char *chpm_thread_id = getenv(\"HPM_THREAD_ID\");\n        if (chpm_thread_id) {\n            int result = sscanf(chpm_thread_id, \"%d\", &hpm_thread_id);\n            if (result != 1)\n                MADNESS_EXCEPTION(\"HPM_THREAD_ID is not an integer\", result);\n        }\n        ThreadBase::set_hpm_thread_env(hpm_thread_id);\n#endif\n        detail::WorldMpi::initialize(argc, argv, MADNESS_MPI_THREAD_LEVEL);\n\n        // Assign a range of globally (within COMM_WORLD) unique IDs to each\n        // rank, these will be used to assign globally unique ID to a new World\n        // requiring only communication within its (sub)communicator\n        World::initialize_world_id_range(comm.Get_rank());\n\n        // Construct the default world before starting RMI so that incoming active messages can find this world\n        World::default_world = new World(comm);\n\n        start_cpu_time = cpu_time();\n        start_wall_time = wall_time();\n        ThreadPool::begin(nthread);        // Must have thread pool before any AM arrives\n        if(comm.Get_size() > 1) {\n            RMI::begin(comm);           // Must have RMI while still running single threaded\n            // N.B. sync everyone up before messages start flying\n            // this is needed to avoid hangs with some MPIs, e.g. Intel MPI on commodity hardware\n            comm.Barrier();\n        }\n\n#ifdef HAVE_PAPI\n        begin_papi_measurement();\n#endif // HAVE_PAPI\n\n#ifdef MADNESS_HAS_ELEMENTAL\n        elem::Initialize(argc,argv);\n#endif // HAVE_ELEMENTAL\n\n        // mark this thread as part of MADNESS pool\n        set_thread_tag(ThreadTag_MADNESS | ThreadTag_Main);\n        madness_initialized_ = true;\n        if(!quiet && comm.Get_rank() == 0)\n            std::cout << \"MADNESS runtime initialized with \" << ThreadPool::size()\n                << \" threads in the pool and affinity \" << sbind << \"\\n\";\n\n        return * World::default_world;\n    }\n\n    void finalize() {\n        World::default_world->gop.fence();\n        const auto rank = World::default_world->rank();\n        const auto world_size = World::default_world->size();\n\n        // Destroy the default world\n        delete World::default_world;\n        World::default_world = nullptr;\n        // warn if there are surviving worlds\n        if (!World::worlds.empty() && !quiet() && rank == 0) {\n            const auto nworlds = World::worlds.size();\n            std::cerr << \"MADNESS runtime finalized but \" << nworlds << \" world\"\n                      << (nworlds > 1 ? \"s\" : \"\") << \" still exist\"\n                      << (nworlds > 1 ? \"\" : \"s\") << std::endl;\n        }\n\n#ifdef MADNESS_HAS_ELEMENTAL\n        elem::Finalize();\n#endif\n\n        if(world_size > 1)\n            RMI::end();\n        ThreadPool::end();\n        detail::WorldMpi::finalize();\n        madness_initialized_ = false;\n        madness_quiet_ = false;\n    }\n\n    void print_stats(World& world) {\n        world.gop.fence();\n\n        double total_wall_time = wall_time()-start_wall_time;\n        double total_cpu_time = cpu_time()-start_cpu_time;\n        RMIStats rmi = RMI::get_stats();\n        DQStats q = ThreadPool::get_stats();\n#ifdef HAVE_PAPI\n        // For papi ... this only make sense if done once after all\n        // other worker threads have exited\n        end_papi_measurement();\n        const long long* values = get_papi_measurement();\n#endif\n\n        double nmsg_sent = rmi.nmsg_sent;\n        double nmsg_recv = rmi.nmsg_recv;\n        double nbyte_sent = rmi.nbyte_sent;\n        double nbyte_recv = rmi.nbyte_recv;\n        double server_q = rmi.max_serv_send_q;\n        world.gop.sum(nmsg_sent);\n        world.gop.sum(nmsg_recv);\n        world.gop.sum(nbyte_sent);\n        world.gop.sum(nbyte_recv);\n        world.gop.sum(server_q);\n\n        double max_nmsg_sent = rmi.nmsg_sent;\n        double max_nmsg_recv = rmi.nmsg_recv;\n        double max_nbyte_sent = rmi.nbyte_sent;\n        double max_nbyte_recv = rmi.nbyte_recv;\n        double max_server_q = rmi.max_serv_send_q;\n        world.gop.max(max_nmsg_sent);\n        world.gop.max(max_nmsg_recv);\n        world.gop.max(max_nbyte_sent);\n        world.gop.max(max_nbyte_recv);\n        world.gop.max(max_server_q);\n\n        double min_nmsg_sent = rmi.nmsg_sent;\n        double min_nmsg_recv = rmi.nmsg_recv;\n        double min_nbyte_sent = rmi.nbyte_sent;\n        double min_nbyte_recv = rmi.nbyte_recv;\n        double min_server_q = rmi.max_serv_send_q;\n        world.gop.min(min_nmsg_sent);\n        world.gop.min(min_nmsg_recv);\n        world.gop.min(min_nbyte_sent);\n        world.gop.min(min_nbyte_recv);\n        world.gop.min(min_server_q);\n\n        double npush_back = q.npush_back;\n        double npush_front = q.npush_front;\n        double npop_front = q.npop_front;\n        double ntask = q.npush_back + q.npush_front;\n        double nmax = q.nmax;\n        world.gop.sum(npush_back);\n        world.gop.sum(npush_front);\n        world.gop.sum(npop_front);\n        world.gop.sum(ntask);\n        world.gop.sum(nmax);\n\n        double max_npush_back = q.npush_back;\n        double max_npush_front = q.npush_front;\n        double max_npop_front = q.npop_front;\n        double max_ntask = q.npush_back + q.npush_front;\n        double max_nmax = q.nmax;\n        world.gop.max(max_npush_back);\n        world.gop.max(max_npush_front);\n        world.gop.max(max_npop_front);\n        world.gop.max(max_ntask);\n        world.gop.max(max_nmax);\n\n        double min_npush_back = q.npush_back;\n        double min_npush_front = q.npush_front;\n        double min_npop_front = q.npop_front;\n        double min_ntask = q.npush_back + q.npush_front;\n        double min_nmax = q.nmax;\n        world.gop.min(min_npush_back);\n        world.gop.min(min_npush_front);\n        world.gop.min(min_npop_front);\n        world.gop.min(min_ntask);\n        world.gop.min(min_nmax);\n\n#ifdef HAVE_PAPI\n        double val[NUMEVENTS], max_val[NUMEVENTS], min_val[NUMEVENTS];\n        for (int i=0; i<NUMEVENTS; ++i) {\n            val[i] = max_val[i] = min_val[i] = values[i];\n        }\n        world.gop.sum(val, NUMEVENTS);\n        world.gop.max(max_val, NUMEVENTS);\n        world.gop.min(min_val, NUMEVENTS);\n#endif\n\n        if (world.rank() == 0) {\n            printf(\"\\n\");\n            printf(\"    Parallel environment\\n\");\n            printf(\"    --------------------\\n\");\n            printf(\"                  #nodes    %d\\n\", world.size());\n            if (world.size() == 1) {\n                printf(\"       #threads per node    %d+main = %d\\n\", int(ThreadPool::size()), int(ThreadPool::size()+1));\n                printf(\"          #total threads    %d\\n\", int(ThreadPool::size()+1));\n            }\n            else {\n                printf(\"       #threads per node    %d+main+server = %d\\n\", int(ThreadPool::size()), int(ThreadPool::size()+2));\n                printf(\"          #total threads    %d\\n\", int(ThreadPool::size()+2)*world.size());\n            }\n            printf(\"\\n\");\n\n            printf(\"  RMI message statistics (min / avg / max)\\n\");\n            printf(\"  ----------------------\\n\");\n            printf(\"   #messages in server q    %.2e / %.2e / %.2e\\n\",\n                   min_server_q, server_q/world.size(), max_server_q);\n            printf(\" #messages sent per node    %.2e / %.2e / %.2e\\n\",\n                   min_nmsg_sent, nmsg_sent/world.size(), max_nmsg_sent);\n            printf(\"    #bytes sent per node    %.2e / %.2e / %.2e\\n\",\n                   min_nbyte_sent, nbyte_sent/world.size(), max_nbyte_sent);\n            printf(\" #messages recv per node    %.2e / %.2e / %.2e\\n\",\n                   min_nmsg_recv, nmsg_recv/world.size(), max_nmsg_recv);\n            printf(\"    #bytes recv per node    %.2e / %.2e / %.2e\\n\",\n                   min_nbyte_recv, nbyte_recv/world.size(), max_nbyte_recv);\n            printf(\"        #msgs systemwide    %.2e\\n\", nmsg_sent);\n            printf(\"       #bytes systemwide    %.2e\\n\", nbyte_sent);\n            printf(\"\\n\");\n            printf(\"  Thread pool statistics (min / avg / max)\\n\");\n            printf(\"  ----------------------\\n\");\n            printf(\"         #tasks per node    %.2e / %.2e / %.2e\\n\",\n                   min_ntask, ntask/world.size(), max_ntask);\n            printf(\"     #max q len per node    %.2e / %.2e / %.2e\\n\",\n                   min_nmax, nmax/world.size(), max_nmax);\n            printf(\"  #hi-pri tasks per node    %.2e / %.2e / %.2e\\n\",\n                   min_npush_front, npush_front/world.size(), max_npush_front);\n            printf(\"\\n\");\n#ifdef HAVE_PAPI\n            printf(\"         PAPI statistics (min / avg / max)\\n\");\n            printf(\"         ---------------\\n\");\n            for (int i=0; i<NUMEVENTS; ++i) {\n                printf(\"  %3d   #events per node    %.2e / %.2e / %.2e\\n\",\n                       i, min_val[i], val[i]/world.size(), max_val[i]);\n            }\n            for (int i=0; i<NUMEVENTS; ++i) {\n                printf(\"  %3d #events systemwide    %.2e\\n\", i, val[i]);\n            }\n            if (total_wall_time > 0) {\n                for (int i=0; i<NUMEVENTS; ++i) {\n                    printf(\"  %3d   #op/s systemwide    %.2e\\n\", i, val[i]/total_wall_time);\n                }\n            }\n            printf(\"\\n\");\n#endif\n#ifdef WORLD_GATHER_MEM_STATS\n            world_mem_info()->print();\n#endif\n\n            printf(\"         Total wall time    %.1fs\\n\", total_wall_time);\n            printf(\"         Total  cpu time    %.1fs\\n\", total_cpu_time);\n            printf(\"\\n\");\n        }\n        world.gop.fence();\n#ifdef WORLD_PROFILE_ENABLE\n        WorldProfile::print(world);\n#endif\n        world.gop.fence();\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/world.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file world.h\n \\brief Declares the \\c World class for the parallel runtime environment.\n \\ingroup world\n\n \\todo More detailed description of this file.\n\n \\todo Are some of the forward declarations in this file necessary? A quick inspection suggests most of the functions before the World class don't need to be declared first...\n*/\n\n#ifndef MADNESS_WORLD_WORLD_H__INCLUDED\n#define MADNESS_WORLD_WORLD_H__INCLUDED\n\n#include <madness/madness_config.h>\n\n// #ifdef SEEK_SET\n// #undef SEEK_SET\n// #endif\n// #ifdef SEEK_CUR\n// #undef SEEK_CUR\n// #endif\n// #ifdef SEEK_END\n// #undef SEEK_END\n// #endif\n\n// Standard C++ header files needed by MADworld.h\n#include <cstddef>\n#include <cstdint>  // std::uint64_t\n#include <iostream>\n#include <list>     // std::list\n#include <optional> // std::optional\n#include <utility>  // std::pair\n\n#ifdef HAVE_RANDOM\n#include <cstdlib>\n#endif\n\n// Madness world header files needed by world\n#include <madness/world/worldinit.h>\n#include <madness/world/worldmpi.h>\n#include <madness/world/worldhashmap.h>\n#include <madness/world/worldprofile.h>\n#include <madness/world/thread.h>\n#include <madness/world/uniqueid.h>\n#include <madness/world/nodefaults.h>\n\n/// \\addtogroup world\n/// @{\n\nnamespace madness {\n\n    class World;\n    class WorldTaskQueue;\n    class WorldAmInterface;\n    class WorldGopInterface;\n\n    /// Print miscellaneous stats on a World.\n\n    /// This requires collective operations within the World.\n    /// \\param[in] world The World to analyze.\n    void print_stats(World& world);\n\n    /// \\todo Brief description needed.\n\n    /// \\todo Detailed description needed.\n    /// \\param path Description.\n    /// \\param display Description.\n    extern void xterm_debug(const char* path, const char* display);\n\n    /// \\todo Brief description needed.\n\n    /// \\todo Detailed description needed. I imagine this prints/logs the supplied\n    /// error message and subsequently aborts the program.\n    /// \\param[in] msg Message associated with the error.\n    void error(const char *msg);\n\n    /// Prints an error message, along with some data, and aborts the program.\n\n    /// \\todo Does this function need to be static? (Esp. since it's in a header file...)\n    ///\n    /// \\tparam T The type of data.\n    /// \\param[in] msg The error message.\n    /// \\param[in] data The data to be printed.\n    template <typename T>\n    static void error(const char *msg, const T& data);\n\n\n    /// A parallel world class.\n\n    /// World wraps a MPI communicator. Multiple worlds with different\n    /// communicators can co-exist.\n    ///\n    /// Here we use Pimpl to both hide implementation details and also\n    /// to partition the namespace for users as \\c world.mpi, \\c world.am, etc.\n    /// We also embed a reference to this instance in the \\c am and \\c task\n    /// instances so that they have access to everything.\n    ///\n    /// The downside is we cannot do much of anything here without\n    /// using wrapper functions to forward the calls to the hidden\n    /// class methods.\n    class World : private NO_DEFAULTS {\n    private:\n        friend class WorldAmInterface;\n        friend class WorldGopInterface;\n        friend World& initialize(int&, char**&, const SafeMPI::Intracomm&, int, bool);\n        friend void finalize();\n\n        // Static member variables\n        static std::pair<std::uint64_t, std::uint64_t> world_id__next_last; ///< Unique {next, last} world IDs to be used by this rank.\n        static World* default_world; ///< Default world.\n        static std::list<World*> worlds; ///< Maintains list of active worlds, EXCLUDES default_world\n\n        /// \\todo Brief description needed.\n        struct hashuniqueT {\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] id The ID.\n            /// \\return Return description needed.\n            inline std::size_t operator()(const uniqueidT& id) const {\n                return id.objid;    // The object id's are guaranteed to be unique\n            }\n        };\n\n        /// \\todo Brief description needed.\n        struct hashvoidp {\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] p Missing description.\n            /// \\return Return description needed.\n            inline std::size_t operator()(const void* p) const {\n                return std::size_t(p);    // The ptr's are guaranteed to be unique\n            }\n        };\n\n        // Mutex globalmutex;  ///< Worldwide mutex\n        /// \\todo Brief description of typedef needed.\n        typedef madness::ConcurrentHashMap<uniqueidT, void *, hashuniqueT> map_id_to_ptrT;\n        /// \\todo Brief description of typedef needed.\n        typedef madness::ConcurrentHashMap<void *, uniqueidT, hashvoidp> map_ptr_to_idT;\n\n        /// Maps unique ID of a global object to its local pointer\n        ///\n        /// \\note Unique IDs are created by increasing `obj_id`. To be able to assign unique IDs to objects created in\n        /// different worlds, they must be created in exactly the same sequence in every process. Hence in general\n        /// object construction happens in main thread. Object construction first updates `obj_id`, then inserts ID\n        /// into this. The rest of code only knows about this object once it's been added to this map, hence\n        /// this map (NOT `obj_id`) defines the known objects. The only writers to map_id_to_ptr are\n        /// `{register,unregister}_ptr()`.\n        map_id_to_ptrT map_id_to_ptr;\n        /// inverse of map_id_to_ptr\n        map_ptr_to_idT map_ptr_to_id; ///< \\todo Verify: Map from a pointer to its unique hash ID.\n\n\n        std::uint64_t _id; ///< Universe wide unique ID of this world.\n        unsigned long obj_id; ///< Counter for generating unique IDs within this world.\n        void* user_state; ///< Holds a user-defined and managed local state.\n\n        // Default copy constructor and assignment won't compile\n        // (which is good) due to reference members.\n\n        /// initializes the value of world_id__next_last to {global_rank*2^32, (global_rank+1)*2^32-1}\n        /// \\param global_rank rank of this process in COMM_WORLD\n        static void initialize_world_id_range(int global_rank);\n        /// \\return next unique World id\n        static std::uint64_t next_world_id();\n\n\n\n    public:\n        // !!! Order of declaration is important for correct order of initialization !!!\n        WorldMpiInterface& mpi; ///< MPI interface.\n        WorldAmInterface& am; ///< AM interface.\n        WorldTaskQueue& taskq; ///< Task queue.\n        WorldGopInterface& gop; ///< Global operations.\n\n    private:\n        unsigned int myrand_next; ///< State of crude internal random number generator.\n\n    public:\n        /// Constructs a \\c World from a communicator.\n\n        /// This function does not check if another \\c World exists that uses\n        /// the same communicator. Use instance() to check this.\n        ///\n        /// \\param[in] comm The communicator.\n        /// \\param[in] fence if true, will synchronize ranks before exiting;\n        ///                  setting to false removes the extra synchronization\n        ///                  but may cause premature arrival of RMI messages\n        ///                  that refer to this world while it's being\n        ///                  registered\n        World(const SafeMPI::Intracomm& comm,\n              bool fence = true);\n\n        /// Find the World (if it exists) corresponding to the given communicator.\n\n        /// \\param[in] comm The communicator.\n        /// \\return Pointer to the World that was constructed from \\c comm;\n        ///     if such a World does not exist, return 0.\n        static World* find_instance(const SafeMPI::Intracomm& comm) {\n          if (default_world->mpi.comm() == comm)\n            return default_world;\n          else {\n            typedef std::list<World *>::const_iterator citer;\n            for (citer it = worlds.begin(); it != worlds.end(); ++it) {\n              if ((*it)->mpi.comm() == comm)\n                return *it;\n            }\n            return nullptr;\n          }\n        }\n\n        /// Check if the World exists in the registry.\n\n        /// \\param[in] world pointer to a World object\n        /// \\return true if \\c world exists\n        static bool exists(World* world) {\n          return world == default_world || std::find(worlds.begin(), worlds.end(), world) != worlds.end();\n        }\n\n        /// Default World object accessor.\n\n        /// This function returns a reference to the default world object; this\n        /// is the same World object that is returned by\n        /// madness::initialize().\n        /// \\return A reference to the default World.\n        /// \\throw madness::Exception if the MADNESS_DISABLE_WORLD_GET_DEFAULT preprocessor macro is defined\n        static World& get_default() {\n#ifdef MADNESS_DISABLE_WORLD_GET_DEFAULT\n          MADNESS_EXCEPTION(\"World::get_default() was called while disabled\", 0);\n#endif\n          MADNESS_ASSERT(default_world);\n          return *default_world;\n        }\n\n        /// Checks if the default World object corresponds to the given Intracomm\n\n        /// \\param[in] comm The communicator.\n        /// \\return true if \\c comm is the default World object's communicator\n        /// \\sa World::get_default()\n        static bool is_default(const SafeMPI::Intracomm& comm) {\n            auto* comm_world = find_instance(comm);\n            if (comm_world)\n              return default_world == comm_world;\n            else\n              return false;\n        }\n\n        /// Sets the user-managed local state.\n\n        /// Rather than having all remotely invoked actions carry all\n        /// of their data with them, they can access local state through\n        /// their \\c World instance.  The user is responsible for\n        /// consistently managing and freeing this data.\n        ///\n        /// A more PC C++ style would be for the app to put state in\n        /// a singleton.\n        /// \\param[in] state The user-managed local state.\n        void set_user_state(void* state) { user_state = state; }\n\n        /// Returns a pointer to the user-managed local state set by set_user_state().\n\n        /// \\return A pointer to the user-managed local state; NULL if\n        ///     set_user_state() has not been invoked.\n        void* get_user_state() { return user_state; }\n\n        /// Clears the user-defined state.\n\n        /// This has the same effect as `set_user_state(0)`.\n        void clear_user_state() { user_state = nullptr; }\n\n        /// Processes command line arguments.\n\n        /// Mostly intended for \\c World test codes, but also provides the\n        /// `-dx option` to start `x` debugger.\n        /// \\param[in] argc The number of command-line arguments.\n        /// \\param[in,out] argv The command-line arguments.\n        void args(int argc, char**argv);\n\n        /// Returns the system-wide unique integer ID of this \\c World.\n        ///\n        /// \\return The system-wide unique integer ID of this \\c World.\n        unsigned long id() const { return _id; }\n\n        /// Returns the process rank in this \\c World (same as MPI_Comm_rank()).\n\n        /// \\return The process rank in this \\c World.\n        ProcessID rank() const { return mpi.rank(); }\n\n        /// Returns the number of processes in this \\c World (same as MPI_Comm_size()).\n\n        /// \\return The number of processes in this \\c World.\n        ProcessID nproc() const { return mpi.nproc(); }\n\n        /// Returns the number of processes in this \\c World (same as MPI_Comm_size()).\n\n        /// \\return The number of processes in this \\c World.\n        ProcessID size() const { return mpi.size(); }\n\n        /// Creates a new universe-wide unique ID for objects created in this \\c World. No comms.\n\n        /// You should consider using \\c register_ptr(), \\c unregister_ptr(),\n        /// \\c id_from_ptr(), or \\c ptr_from_id() rather than using this directly.\n        ///\n        /// Currently relies on this being called in the same order on\n        /// every process within the current \\c World in order to avoid\n        /// synchronization.\n        ///\n        /// Unique IDs are created by increasing static counter.\n        /// The value obj_id=0 is invalid.\n        /// \\return A new universe-wide unique ID for objects created in this \\c World.\n        /// \\warning This is not re-entrant, should be called from a single (typically, main) thread\n        uniqueidT make_unique_obj_id() {\n          return uniqueidT(_id,obj_id++);\n        }\n\n        /// Reports the next universe-wide unique ID generated by make_unique_obj_id() objects created in this \\c World. No comms.\n\n        /// \\return A the next universe-wide unique ID for objects created in this \\c World.\n        /// \\warning This is not re-entrant, should be called from a single (typically, main) thread\n        uniqueidT next_unique_obj_id() const {\n          return uniqueidT(_id,obj_id);\n        }\n\n        /// Associate a local pointer with a universe-wide unique ID.\n\n        /// Use the routines \\c register_ptr(), \\c unregister_ptr(),\n        /// \\c id_from_ptr(), \\c ptr_from_id() to map distributed data\n        /// structures identified by the unique ID to/from\n        /// process-local data.\n        ///\n        /// \\note The pointer will be internally cast to a (void *),\n        /// so don't use member pointers here.\n        ///\n        /// \\note All unique objects of any type within a \\c World must\n        /// presently be created in the same order on all processes so\n        /// as to guarantee the uniqueness without global\n        /// communication.\n        /// \\tparam T The type of data to be associated.\n        /// \\param[in] ptr Pointer to the data that will be associated\n        ///     with a unique ID.\n        /// \\return The unique ID associated with the supplied data.\n        template <typename T>\n        [[nodiscard]] uniqueidT register_ptr(T* ptr) {\n            MADNESS_ASSERT(sizeof(T*) == sizeof(void *));\n            uniqueidT id = make_unique_obj_id();\n            [[maybe_unused]] auto&& [it1, inserted1] = map_id_to_ptr.insert(std::pair<uniqueidT,void*>(id,static_cast<void*>(ptr)));\n            MADNESS_ASSERT(inserted1);\n            [[maybe_unused]] auto&& [it2, inserted2] = map_ptr_to_id.insert(std::pair<void*,uniqueidT>(static_cast<void*>(ptr),id));\n            MADNESS_ASSERT(inserted2);\n            return id;\n        }\n\n        /// Unregister a global object via its the unique ID.\n\n        /// \\param[in] id The unique ID of the data to unregister.\n        void unregister_ptr(const uniqueidT id) {\n          // START critical section\n          map_id_to_ptrT::accessor acc;\n          [[maybe_unused]] auto found = map_id_to_ptr.find(acc, id);\n          MADNESS_ASSERT(found); // make sure id is valid\n\n          void* ptr = static_cast<void*>(acc->second);\n\n          // if NDEBUG is not defined, keep unregistered ptr IDs in map_id_to_ptr else remove them\n#ifdef NDEBUG\n          map_id_to_ptr.erase(acc);  // END critical section\n#else\n          MADNESS_ASSERT(ptr);  // ensure ID is not expired\n          acc->second = nullptr;\n          acc.release();  // END critical section\n#endif\n          [[maybe_unused]] auto erased2 = map_ptr_to_id.try_erase(ptr);\n          MADNESS_ASSERT(erased2);\n        }\n\n        /// Look up a local pointer from a world-wide unique ID.\n\n        /// \\tparam T The type of the data to look up.\n        /// \\param[in] id The unique ID of the data.\n        /// \\return The local pointer (can be \\c nullptr if \\p id has been deregistered and\n        /// `NDEBUG` is not `#define`d); if \\p id has not been registered then returns null optional\n        template <typename T>\n        [[nodiscard]] std::optional<T*> ptr_from_id(uniqueidT id) const {\n          map_id_to_ptrT::const_accessor acc;\n          [[maybe_unused]] auto found = map_id_to_ptr.find(acc, id);\n          if (!found)\n            return {};\n          else\n            return {static_cast<T *>(acc->second)};\n        }\n\n        /// Look up an ID from a local pointer.\n\n        /// \\tparam T The type of the data to look up.\n        /// \\param[in] ptr The local pointer.\n        /// \\return Optional containing the unique ID if the pointer is registered, or a null optional if the pointer is not registered.\n        template <typename T>\n        [[nodiscard]] std::optional<uniqueidT> id_from_ptr(T* ptr) const {\n          map_ptr_to_idT::const_accessor acc;\n          [[maybe_unused]] auto found = map_ptr_to_id.find(acc, ptr);\n          if (!found)\n            return {};\n          else\n            return {acc->second};\n        }\n\n#ifndef MADNESS_DISABLE_SHARED_FROM_THIS\n\n        /// Look up a local pointer from a world-wide unique ID.\n\n        /// \\tparam T The type of the data to look up.\n        /// \\param[in] id The unique ID.\n        /// \\return The pointer or a default constructed `std::shared_ptr` if\n        ///     the ID is not found.\n        template <typename T>\n        [[nodiscard]] std::shared_ptr<T> shared_ptr_from_id(uniqueidT id) const {\n            std::optional<T*> ptr_opt = ptr_from_id<T>(id);\n            if (ptr_opt) MADNESS_ASSERT(*ptr_opt);\n            return (ptr_opt ? *ptr_opt->shared_from_this() : std::shared_ptr<T>());\n        }\n\n        /// Look up a unique ID from a local pointer.\n\n        /// \\tparam T The type of the data to look up.\n        /// \\param[in] ptr The local pointer.\n        /// \\return Optional containing the unique ID, if the pointer is registered, or a null optional, if the pointer is not registered.\n        template <typename T>\n        [[nodiscard]] std::optional<uniqueidT> id_from_ptr(std::shared_ptr<T>& ptr) const {\n            return id_from_ptr(ptr.get());\n        }\n\n#endif // MADNESS_DISABLE_SHARED_FROM_THIS\n\n        /// Returns a vector of all unique IDs in this \\c World.\n        std::vector<uniqueidT> get_object_ids() const {\n            std::vector<uniqueidT> ids;\n            for (auto it = map_id_to_ptr.begin(); it != map_id_to_ptr.end(); ++it)\n                ids.push_back(it->first);\n            return ids;\n        }\n\n        /// return a vector containing all world ids\n        static std::vector<unsigned long> get_world_ids() {\n            std::vector<unsigned long> ids;\n            for (auto it = worlds.begin(); it != worlds.end(); ++it)\n                ids.push_back((*it)->id());\n            return ids;\n\n        }\n\n        /// Convert a \\c World ID to a \\c World pointer.\n\n        /// The ID will only be valid if the process calling this routine\n        /// is a member of that \\c World. Thus a \\c NULL return value does not\n        /// necessarily mean that the \\c World does not exist --- it could just\n        /// not include the calling process.\n        /// \\param[in] id The ID of the \\c World.\n        /// \\return A pointer to the world associated with \\c id, or \\c NULL.\n        static World* world_from_id(std::uint64_t id) {\n          if (id != 0) {\n            for (std::list<World *>::iterator it = worlds.begin();\n                 it != worlds.end(); ++it) {\n              if ((*it) && (*it)->_id == id)\n                return *it;\n            }\n            return nullptr;\n          }\n          else\n            return default_world;\n        }\n\n    private:\n\n        // Cannot use bind_nullary here since SafeMPI::Request::Test is non-const\n        /// \\todo Brief description needed.\n        struct MpiRequestTester {\n            mutable SafeMPI::Request* r; ///< \\todo Brief description needed.\n\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param r Description needed.\n            MpiRequestTester(SafeMPI::Request& r) : r(&r) {}\n\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\return Description needed.\n            bool operator()() const {\n                return r->Test();\n            }\n        };\n\n    public:\n\n        /// Wait for a MPI request to complete.\n\n        /// \\todo Descriptions needed.\n        /// \\param[in,out] request The MPI request on which to wait.\n        /// \\param dowork Work while waiting - default is true\n        static void inline await(SafeMPI::Request& request, bool dowork = true) {\n\t  ThreadPool::await(MpiRequestTester(request), dowork, true); // Last arg is sleep=true --- don't hard spin on MPI requests\n        }\n\n        /// Gracefully wait for a condition to become true.\n\n        /// In the mean time, execute any tasks in the queue.\n        /// \\todo Descriptions needed.\n        /// \\tparam Probe An object that, when called, returns the status.\n        /// \\param[in] probe The conditional's test.\n        /// \\param dowork Work while waiting - default is true\n\t/// \\param sleep Sleep instead of spin while waiting - default is false\n        template <typename Probe>\n\t  static void inline await(const Probe& probe, bool dowork = true, bool sleep=false) {\n            ThreadPool::await(probe, dowork);\n        }\n\n        /// Crude seed function for random number generation.\n\n        /// \\param[in] seed The seed.\n        /// \\todo Since we're switching to C++11, would it be worth using the new C++11 random number generation capabilities?\n        void srand(unsigned long seed = 0ul) {\n            if (seed == 0) seed = rank();\n#ifdef HAVE_RANDOM\n            srandom(seed);\n#else\n            myrand_next = seed;\n            for (int i=0; i<1000; ++i) rand(); // Warmup\n#endif // HAVE_RANDOM\n        }\n\n\n        /// Returns a CRUDE, LOW-QUALITY, random number (integer) uniformly distributed in [0,2**24).\n\n        /// Each process has a distinct seed for the generator.\n        /// \\return The random number.\n        /// \\todo Since we're switching to C++11, would it be worth using the new C++11 random number generation capabilities?\n        int rand() {\n#ifdef HAVE_RANDOM\n            return int(random() & 0xfffffful);\n#else\n            myrand_next = myrand_next * 1103515245UL + 12345UL;\n            return int((myrand_next>>8) & 0xfffffful);\n#endif // HAVE_RANDOM\n        }\n\n\n        /// Returns a CRUDE, LOW-QUALITY, random number (real) uniformly distributed in [0,1).\n\n        /// Each process has a distinct seed for the generator.\n        /// \\return The random number.\n        /// \\todo Since we're switching to C++11, would it be worth using the new C++11 random number generation capabilities?\n        double drand() { return rand()/16777216.0; }\n\n        /// Returns a random process number; that is, an integer in [0,`world.size()`).\n\n        /// \\return The random process number.\n        ProcessID random_proc() { return rand()%size(); }\n\n        /// Returns a random process number [0,`world.size()`) that is not the calling process.\n\n        /// It doesn't make any sense to call this with just one process, but just in\n        /// case, this returns -1 in the hope that you won't actually use the result.\n        /// \\return The random process number, or -1.\n        ProcessID random_proc_not_me() {\n            if (size() == 1) return -1;\n            ProcessID p;\n            do {\n                p = rand()%size();\n            } while (p == rank());\n            return p;\n        }\n\n        ~World();\n    }; // class World\n\n    namespace archive {\n\n        /// Specialization of \\c ArchiveLoadImpl for \\c World pointers.\n\n        /// Helps in archiving (reading) \\c World objects.\n        /// \\tparam Archive The archive type.\n        template <class Archive>\n        struct ArchiveLoadImpl<Archive,World*> {\n            /// Loads a \\c World from the specified archive.\n\n            /// \\note Aborts the program if a \\c World cannot be read from the archive.\n            /// \\param[in,out] ar The archive.\n            /// \\param[out] wptr Pointer to the \\c World.\n            static inline void load(const Archive& ar, World*& wptr) {\n                unsigned long id = 0ul;\n                ar & id;\n                wptr = World::world_from_id(id);\n                MADNESS_ASSERT(wptr);\n            }\n        }; // struct ArchiveLoadImpl<Archive,World*>\n\n        /// Specialization of \\c ArchiveStoreImpl for \\c World pointers.\n\n        /// Helps in archiving (writing) \\c World objects.\n        /// \\tparam Archive The archive type.\n        template <class Archive>\n        struct ArchiveStoreImpl<Archive,World*> {\n            /// Writes a \\c World to the specified archive.\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[in] wptr Pointer to the \\c World.\n            static inline void store(const Archive& ar, World* const & wptr) {\n                ar & wptr->id();\n            }\n        }; // struct ArchiveStoreImpl<Archive,World*>\n    } // namespace archive\n\n\n\n    // implementation of templated functions\n    template <typename T>\n    static void error(const char *msg, const T& data) {\n        std::cerr << \"MADNESS: fatal error: \" << msg << \" \" << data << std::endl;\n        SafeMPI::COMM_WORLD.Abort();\n    }\n} // namespace madness\n\n/// @}\n\n#endif // MADNESS_WORLD_WORLD_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/world_object.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file world_object.h\n \\brief Defines and implements \\c WorldObject.\n \\ingroup world_object\n*/\n\n#ifndef MADNESS_WORLD_WORLD_OBJECT_H__INCLUDED\n#define MADNESS_WORLD_WORLD_OBJECT_H__INCLUDED\n\n#include <madness/world/thread.h>\n#include <madness/world/world_task_queue.h>\n\n#include <array>\n#include <atomic>\n#include <cstddef>\n#include <type_traits>\n\n/// \\addtogroup world_object\n/// @{\n\nnamespace madness {\n\n    template <typename> class WorldObject;\n\n    namespace detail {\n\n        /// Common base class for pending messages to ensure in-order processing.\n\n        /// To eliminate synchronization when a distributed object is first\n        /// constructed, we buffer pending messages for containers that\n        /// don't have their ID yet registered.\n        struct PendingMsg {\n            uniqueidT id;\n            am_handlerT handler;\n            AmArg* arg;\n\n            PendingMsg(uniqueidT id, am_handlerT handler, const AmArg& arg)\n                    : id(id), handler(handler), arg(copy_am_arg(arg)) {}\n\n            void invokehandler() {\n                handler(*arg);\n                free_am_arg(arg);\n            }\n        };\n\n        /// \\todo Brief description needed.\n\n        /// We cannot use the normal task forwarding stuff here because pending\n        /// messages can creating tasks are must be correctly handled. The\n        /// following code does not easily merge with the send handlers since\n        /// the task layer is more restrictive on the copy capability of\n        /// arguments.\n        ///\n        /// It is also annoying that info needs to be broken into two parts so\n        /// that it \\c id and \\c ref are properly serialized. We need to have\n        /// \\c id correctly aligned via \\c opaque_wrap, but \\c ref cannot be\n        /// serialized that way. Thus we break the class into two parts.\n        ///\n        /// Info stored for AM method forwarding.\n        /// \\tparam memfunT Description needed.\n        /// \\todo Verify & complete; what is AM?\n        template <typename memfunT>\n        struct info_base {\n            using memfunT_rel_ptr = decltype(archive::to_rel_memfn_ptr(std::declval<memfunT>()));\n            // id must be at front ... see peek.\n            uniqueidT id; ///< \\todo Description needed. Context with the \"see peek\" comment above?\n            ProcessID requestor; ///< \\todo Description needed.\n            memfunT_rel_ptr memfun_rel_ptr; ///< \\todo Description needed.\n            TaskAttributes attr; ///< \\todo Description needed.\n\n            /// \\return the (absolute) member function pointer\n            memfunT memfun() const {\n              return archive::to_abs_memfn_ptr<memfunT>(memfun_rel_ptr);\n            }\n\n        protected:\n\n            info_base() {}\n\n            /// \\todo Constructor that [brief description needed].\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] id Description needed.\n            /// \\param[in] requestor Description needed.\n            /// \\param memfun Verify: The member function to be invoked for the task.\n            /// \\param[in] attr Description needed.\n            info_base(const uniqueidT& id, ProcessID requestor, memfunT memfun,\n                 const TaskAttributes& attr=TaskAttributes())\n                    : id(id)\n                    , requestor(requestor)\n                    , memfun_rel_ptr(archive::to_rel_memfn_ptr(memfun))\n                    , attr(attr) {}\n\n            /// Serializes a \\c info_base for I/O.\n\n            /// \\tparam Archive The type of I/O archive.\n            /// \\param[in,out] ar The I/O archive.\n            template <typename Archive>\n            void serialize(const Archive& ar) {\n                ar & archive::wrap_opaque(*this); // Must be opaque ... see peek.\n            }\n        }; // struct info_base\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfunT Verify: Signature of the member function in the derived class to be invoked for the task.\n        template <typename memfunT>\n        struct info : public info_base<memfunT> {\n            /// Future for a return value of the memory function. \\todo Verify.\n            typedef Future< REMFUTURE(MEMFUN_RETURNT(memfunT)) > futureT;\n            /// \\todo Description needed.\n            typedef RemoteReference< FutureImpl< REMFUTURE(MEMFUN_RETURNT(memfunT)) > > refT;\n\n            refT ref; ///< \\todo Description needed.\n\n            info() : info_base<memfunT>() {}\n\n            /// \\todo Constructor that [brief description needed].\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] arg Description needed.\n            info(const AmArg& arg) :\n                info_base<memfunT>()\n            {\n                arg & *this;\n            }\n\n            /// \\todo Constructor that [brief description needed].\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] id Description needed.\n            /// \\param[in] requestor Description needed.\n            /// \\param memfun Verify: The member function to be invoked for the task.\n            /// \\param[in] ref Description needed.\n            /// \\param[in] attr Description needed.\n            info(const uniqueidT& id, ProcessID requestor, memfunT memfun,\n                 const refT& ref, const TaskAttributes& attr=TaskAttributes())\n                : info_base<memfunT>(id, requestor, memfun, attr), ref(ref)\n            {}\n\n            /// Serializes a \\c info for I/O.\n\n            /// \\tparam Archive the type of I/O archive.\n            /// \\param[in] ar The I/O archive.\n            template <typename Archive>\n            void serialize(const Archive& ar) {\n                info_base<memfunT>::serialize(ar);\n                ar & ref;\n            }\n        }; // struct info\n\n        /// Extract the unique object ID from an incoming active message header.\n\n        /// We deserialize the header and all arguments at the same\n        /// time to simplify the code. However, it is common that\n        /// when sending a message to an item in a container to\n        /// include a pointer to the container itself. But this\n        /// breaks if the container is not initialized since the\n        /// deserialization throws if the object is not initialized\n        /// (which seems preferable to a hidden race condition). Hence,\n        /// we use this routine to extract the unique ID from the very\n        /// front of the \\c info structure. For efficiency we here rely\n        /// upon the serialization of \\c info being opaque and the\n        /// ID being at the front of \\c info.\n        ///\n        /// \\todo Verify parameter description.\n        /// \\param[in] arg The active message header.\n        static inline const uniqueidT& peek(const AmArg& arg) {\n            return *((uniqueidT*)(arg.buf()));\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam Enabler Description needed.\n        template <typename objT, typename memfnT, typename Enabler = void>\n        struct WorldObjectTaskHelper {\n            /// \\todo Description needed.\n            typedef typename std::conditional<memfunc_traits<memfnT>::constness,\n                    const objT*, objT*>::type ptrT;\n\n            /// \\todo Description needed.\n            typedef MemFuncWrapper<ptrT, memfnT, typename result_of<memfnT>::type> wrapperT;\n\n\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] obj Description needed.\n            /// \\param memfn Verify: The member function to be invoked for the task.\n            /// \\return Description needed.\n            static wrapperT make_task_fn(const objT* obj, memfnT memfn) {\n                return wrapperT(const_cast<ptrT>(obj), memfn);\n            }\n\n\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] obj Description needed.\n            /// \\param memfn Verify: The member function to be invoked for the task.\n            /// \\return Description needed.\n            static wrapperT make_task_fn(objT* obj, memfnT memfn) {\n                return wrapperT(const_cast<ptrT>(obj), memfn);\n            }\n\n\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] obj Description needed.\n            /// \\param memfn Verify: The member function to be invoked for the task.\n            /// \\return Description needed.\n            static wrapperT make_task_fn(const WorldObject<objT>* obj, memfnT memfn) {\n                return make_task_fn(static_cast<const objT*>(obj), memfn);\n            }\n\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] obj Description needed.\n            /// \\param memfn Verify: The member function to be invoked for the task.\n            /// \\return Description needed.\n            static wrapperT make_task_fn(WorldObject<objT>* obj, memfnT memfn) {\n                return make_task_fn(static_cast<objT*>(obj), memfn);\n            }\n        }; // struct WorldObjectTaskHelper\n\n\n#ifndef MADNESS_DISABLE_SHARED_FROM_THIS\n        // Disable the use of std::enable_shared_from_this if we are using MADNESS's\n        // implementation since weak_ptr is not fully implemented.\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        template <typename objT, typename memfnT>\n        struct WorldObjectTaskHelper<objT, memfnT,\n                typename std::enable_if< std::is_base_of<std::enable_shared_from_this<objT>, objT>::value >::type>\n        {\n            /// \\todo Description needed.\n            typedef typename std::conditional<memfunc_traits<memfnT>::constness,\n                    const objT*, objT*>::type ptrT;\n\n            /// \\todo Description needed.\n            typedef typename std::conditional<memfunc_traits<memfnT>::constness,\n                    std::shared_ptr<const objT>, std::shared_ptr<objT> >::type shared_ptrT;\n\n            /// \\todo Description needed.\n            typedef MemFuncWrapper<shared_ptrT, memfnT, typename result_of<memfnT>::type> wrapperT;\n\n\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] obj Description needed.\n            /// \\param memfn Verify: The member function to be invoked for the task.\n            /// \\return Description needed.\n            static wrapperT make_task_fn(const objT* obj, memfnT memfn) {\n                return wrapperT(const_cast<ptrT>(obj)->shared_from_this(), memfn);\n            }\n\n\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] obj Description needed.\n            /// \\param memfn Verify: The member function to be invoked for the task.\n            /// \\return Description needed.\n            static wrapperT make_task_fn(objT* obj, memfnT memfn) {\n                return wrapperT(const_cast<ptrT>(obj)->shared_from_this(), memfn);\n            }\n\n\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] obj Description needed.\n            /// \\param memfn Verify: The member function to be invoked for the task.\n            /// \\return Description needed.\n            static wrapperT make_task_fn(const WorldObject<objT>* obj, memfnT memfn) {\n                return make_task_fn(static_cast<const objT*>(obj), memfn);\n            }\n\n\n            /// \\todo Brief description needed.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] obj Description needed.\n            /// \\param memfn Verify: The member function to be invoked for the task.\n            /// \\return Description needed.\n            static wrapperT make_task_fn(WorldObject<objT>* obj, memfnT memfn) {\n                return make_task_fn(static_cast<objT*>(obj), memfn);\n            }\n        }; // struct WorldObjectTaskHelper\n\n#endif // MADNESS_DISABLE_SHARED_FROM_THIS\n\n    } // namespace detail\n\n    /// Base class for WorldObject, useful for introspection\n    struct WorldObjectBase {\n      virtual ~WorldObjectBase() = default;\n    public:\n        virtual World& get_world() const = 0;\n    };\n\n    /// Implements most parts of a globally addressable object (via unique ID).\n\n    /// This class is deliberately not default constructible and does\n    /// not support assignment or copying. This ensures that each instance\n    /// is unique. Have a look at \\c madness::WorldContainer for an example\n    /// of wrapping this using the PIMPL idiom and a shared pointer.\n    ///\n    /// When deriving classes:\n    /// -# Derived class has `WorldObject<Derived>` as a public base class.\n    /// -# Derived constructor:\n    ///    -# invokes `WorldObject<Derived>(world)` constructor.\n    ///    -# invokes `process_pending()`.\n    /// -# Derived destructor must either be deferred or preceeded by `gop.fence()`.\n    /// -# Derived class must have at least one virtual function for serialization\n    ///    of derived class pointers to be cast to the appropriate type.\n    ///\n    /// Note that \\c world is exposed for convenience as a public data member.\n    /// \\tparam Derived The derived class. \\c WorldObject is a curiously\n    ///     recurring template pattern.\n    template <class Derived>\n    class WorldObject : public WorldObjectBase {\n    public:\n        /// \\todo Description needed.\n        typedef WorldObject<Derived> objT;\n\n        // copy ctor must be enabled to permit RVO; in C++17 will not need this\n        WorldObject(const WorldObject& other) : world(other.world) { abort(); }\n        // no copy\n        WorldObject& operator=(const WorldObject&) = delete;\n\n    private:\n        /// \\todo Description needed.\n        typedef std::list<detail::PendingMsg> pendingT;\n\n        /// \\todo Description needed.\n        typedef detail::voidT voidT;\n\n        World& world; ///< The \\c World this object belongs to. (Think globally, act locally).\n\n        // The order here matters in a multi-threaded world\n        volatile bool ready; ///< True if ready to rock 'n roll.\n        ProcessID me; ///< Rank of self.\n        uniqueidT objid; ///< Sense of self.\n\n\n        inline static Spinlock pending_mutex; ///< \\todo Description needed.\n        inline static volatile pendingT pending; ///< Buffer for pending messages.\n\n\n        /// \\todo Complete: Determine if [unknown] is ready (for ...).\n\n        /// The slightly convoluted logic is to ensure ordering when\n        /// processing pending messages. If a new message arrives\n        /// while processing incoming messages it must be queued.\n        ///\n        /// - If the object does not exist ---> not ready.\n        /// - If the object exists and is ready ---> ready.\n        /// - If the object exists and is not ready then\n        ///      - if we are doing a queued/pending message --> ready.\n        ///      - else this is a new message --> not ready.\n        ///\n        /// \\param[in] id Description needed.\n        /// \\param[in,out] obj Description needed.\n        /// \\param[in] arg Description needed.\n        /// \\param[in,out] ptr Description needed.\n        /// \\return Description needed.\n        /// \\todo Parameter/return descriptions needed.\n        static bool is_ready(const uniqueidT& id, objT*& obj, const AmArg& arg, am_handlerT ptr) {\n          std::optional<Derived *> opt_obj =\n              arg.get_world()->template ptr_from_id<Derived>(id);\n          if (opt_obj) {\n            // if opt_obj == nullptr, then this ID has already been deregistered\n            MADNESS_ASSERT(*opt_obj != nullptr);\n            obj = static_cast<objT *>(*opt_obj);\n          } else\n            obj = nullptr;\n\n          if (obj) {\n            if (obj->ready || arg.is_pending())\n              return true;\n          }\n\n          MADNESS_PRAGMA_CLANG(diagnostic push)\n          MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wundefined-var-template\")\n\n          ScopedMutex<Spinlock> lock(pending_mutex); // BEGIN CRITICAL SECTION\n\n          if (!obj) {\n            std::optional<Derived *> opt_obj =\n                arg.get_world()->template ptr_from_id<Derived>(id);\n            if (opt_obj) {\n              // if opt_obj == nullptr, then this ID has already been deregistered\n              MADNESS_ASSERT(*opt_obj != nullptr);\n              obj = static_cast<objT *>(*opt_obj);\n            } else\n              obj = nullptr;\n          }\n\n          if (obj) {\n            if (obj->ready || arg.is_pending())\n              return true; // END CRITICAL SECTION\n          }\n          const_cast<AmArg &>(arg).set_pending();\n          const_cast<pendingT &>(pending).push_back(\n              detail::PendingMsg(id, ptr, arg));\n\n          MADNESS_PRAGMA_CLANG(diagnostic pop)\n\n          return false; // END CRITICAL SECTION\n        }\n\n        /// Handler for an incoming AM.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam arg1T Type of argument 1.\n        /// \\tparam arg2T Type of argument 2.\n        /// \\tparam arg3T Type of argument 3.\n        /// \\tparam arg4T Type of argument 4.\n        /// \\tparam arg5T Type of argument 5.\n        /// \\tparam arg6T Type of argument 6.\n        /// \\tparam arg7T Type of argument 7.\n        /// \\tparam arg8T Type of argument 8.\n        /// \\tparam arg9T Type of argument 9.\n        /// \\param[in] arg Description needed.\n        template <typename memfnT, typename arg1T, typename arg2T, typename arg3T, typename arg4T,\n        typename arg5T, typename arg6T, typename arg7T, typename arg8T, typename arg9T>\n        static void handler(const AmArg& arg) {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n\n            const uniqueidT& id = detail::peek(arg);\n            am_handlerT ptr = handler<memfnT,arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T,arg8T,arg9T>;\n            objT* obj;\n            if (is_ready(id,obj,arg,ptr)) {\n                detail::info<memfnT> info;\n                typename detail::task_arg<arg1T>::type arg1;\n                typename detail::task_arg<arg2T>::type arg2;\n                typename detail::task_arg<arg3T>::type arg3;\n                typename detail::task_arg<arg4T>::type arg4;\n                typename detail::task_arg<arg5T>::type arg5;\n                typename detail::task_arg<arg6T>::type arg6;\n                typename detail::task_arg<arg7T>::type arg7;\n                typename detail::task_arg<arg8T>::type arg8;\n                typename detail::task_arg<arg9T>::type arg9;\n\t\tMADNESS_PRAGMA_CLANG(diagnostic push)\n                MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wuninitialized-const-reference\")\n                arg & info & arg1 & arg2 & arg3 & arg4 & arg5 & arg6 & arg7 & arg8 & arg9;\n\t\tMADNESS_PRAGMA_CLANG(diagnostic pop)\n                typename detail::info<memfnT>::futureT result(info.ref);\n                detail::run_function(result, task_helper::make_task_fn(obj, info.memfun()),\n                        arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);\n            }\n        }\n\n\n        /// Handler for remote arguments.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam taskT Description needed.\n        /// \\param[in] arg Description needed.\n        template <typename taskT>\n        static void spawn_remote_task_handler(const AmArg& arg) {\n            typedef detail::WorldObjectTaskHelper<Derived,\n                    typename taskT::functionT::memfn_type> task_helper;\n\n            MADNESS_ASSERT(taskT::arity <= 9u);\n\n            const uniqueidT& id = detail::peek(arg);\n            am_handlerT ptr = & objT::template spawn_remote_task_handler<taskT>;\n            objT* obj;\n            if (is_ready(id,obj,arg,ptr)) {\n                detail::info<typename taskT::functionT::memfn_type> info;\n\n                archive::BufferInputArchive input_arch = arg & info;\n\n                // Construct task\n                taskT* task = new taskT(typename taskT::futureT(info.ref),\n                        task_helper::make_task_fn(obj, info.memfun()), info.attr, input_arch);\n\n                // Add task to queue\n                arg.get_world()->taskq.add(task);\n            }\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam T Description needed.\n        /// \\param[in] f Description needed.\n        /// \\return Description needed.\n        template <typename T>\n        static inline const T& am_arg(const Future<T>& f) {\n            MADNESS_ASSERT(f.probe()); // Cannot serialize unassigned futures\n            return f.get();\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam T Description needed.\n        /// \\param[in] t Description needed.\n        /// \\return Description needed.\n        template <typename T>\n        static inline const T& am_arg(const T& t) {\n            return t;\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\tparam a9T Type of argument 9.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param a6 Argument 6.\n        /// \\param a7 Argument 7.\n        /// \\param a8 Argument 8.\n        /// \\param a9 Argument 9.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T,\n                typename a8T, typename a9T>\n        typename detail::task_result_type<memfnT>::futureT\n        send_am(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const a7T& a7, const a8T& a8, const a9T& a9) const\n        {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typename detail::task_result_type<memfnT>::futureT result;\n            if (dest == me)\n                detail::run_function(result, task_helper::make_task_fn(this, memfn),\n                        a1, a2, a3, a4, a5, a6, a7, a8, a9);\n            else {\n                detail::info<memfnT> info(objid, me, memfn, result.remote_ref(world));\n                world.am.send(dest, & objT::template handler<memfnT, a1T, a2T, a3T, a4T, a5T, a6T, a7T, a8T, a9T>,\n                        new_am_arg(info, a1, a2, a3, a4, a5, a6, a7, a8, a9));\n            }\n\n            return result;\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam taskT Description needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\tparam a9T Type of argument 9.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param a6 Argument 6.\n        /// \\param a7 Argument 7.\n        /// \\param a8 Argument 8.\n        /// \\param a9 Argument 9.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        template <typename taskT, typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T,\n                typename a8T, typename a9T>\n        typename taskT::futureT\n        send_task(ProcessID dest, memfnT memfn, const a1T& a1,\n                const a2T& a2, const a3T& a3, const a4T& a4, const a5T& a5,\n                const a6T& a6, const a7T& a7, const a8T& a8, const a9T& a9,\n                const TaskAttributes& attr) const\n        {\n            typename taskT::futureT result;\n            detail::info<memfnT> info(objid, me, memfn, result.remote_ref(world), attr);\n            world.am.send(dest, & objT::template spawn_remote_task_handler<taskT>,\n                    new_am_arg(info, a1, a2, a3, a4, a5, a6, a7, a8, a9), RMI::ATTR_UNORDERED);\n\n            return result;\n        }\n\n    protected:\n\n        /// To be called from \\em derived constructor to process pending messages.\n\n        /// Cannot call this from the \\c WorldObject constructor since the\n        /// derived class would not yet be fully constructed.\n        ///\n        /// \\attention No incoming messages are processed until this routine is\n        /// invoked; the derived class may rely upon a well defined state\n        /// until this routine is invoked.\n        void process_pending() {\n            // Messages may be arriving while we are processing the\n            // pending queue.  To maximize concurrency copy messages\n            // out of queue before processing outside critical section.\n            //int ndone = 0;\n            while (!ready) {\n                pendingT tmp;\n\n                MADNESS_PRAGMA_CLANG(diagnostic push)\n                MADNESS_PRAGMA_CLANG(diagnostic ignored \"-Wundefined-var-template\")\n\n                pending_mutex.lock(); // BEGIN CRITICAL SECTION\n                pendingT& nv = const_cast<pendingT&>(pending);\n                for (pendingT::iterator it=nv.begin(); it!=nv.end();) {\n                    detail::PendingMsg& p = *it;\n                    if (p.id == objid) {\n                        tmp.push_back(p);\n                        it = nv.erase(it);\n                    }\n                    else {\n                        ++it;\n                    }\n                }\n                if (tmp.size() == 0) ready=true;\n                pending_mutex.unlock(); // END CRITICAL SECTION\n\n                MADNESS_PRAGMA_CLANG(diagnostic pop)\n\n                while (tmp.size()) {\n                    tmp.front().invokehandler();\n                    tmp.pop_front();\n                    //++ndone;\n                }\n            }\n            //if (ndone) std::cout << world.rank() << \":pending:\" << ndone << std::endl;\n        }\n\n\n    public:\n        /// \\brief Constructor that associates an object (via the derived class)\n        ///     with a globally unique ID.\n\n        /// \\attention The derived class MUST call \\c process_pending from\n        /// its constructor to both\n        /// -# process any messages that arrived prior to construction.\n        /// -# to enable processing of future messages.\n        /// \\param[in,out] world The \\c World encapsulating the \\\"global\\\" domain.\n        WorldObject(World& world)\n                : world(world)\n                , ready(false)\n                , me(world.rank())\n                , objid(world.register_ptr(static_cast<Derived*>(this))) {};\n\n\n        /// Returns the globally unique object ID.\n        const uniqueidT& id() const {\n            return objid;\n        }\n\n\n        /// Returns a reference to the \\c world.\n        World& get_world() const {\n            return const_cast<WorldObject<Derived>*>(this)->world;\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\return Description needed.\n        template <typename memfnT>\n        typename detail::task_result_type<memfnT>::futureT\n        send(ProcessID dest, memfnT memfn) const {\n            return send_am(dest, memfn, voidT::value, voidT::value, voidT::value,\n                    voidT::value, voidT::value, voidT::value, voidT::value,\n                    voidT::value, voidT::value);\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T>\n        typename detail::task_result_type<memfnT>::futureT\n        send(ProcessID dest, memfnT memfn, const a1T& a1) const {\n            return send_am(dest, memfn, am_arg(a1), voidT::value, voidT::value,\n                    voidT::value, voidT::value, voidT::value, voidT::value,\n                    voidT::value, voidT::value);\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T>\n        typename detail::task_result_type<memfnT>::futureT\n        send(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2) const {\n            return send_am(dest, memfn, am_arg(a1), am_arg(a2), voidT::value,\n                    voidT::value, voidT::value, voidT::value, voidT::value,\n                    voidT::value, voidT::value);\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T>\n        typename detail::task_result_type<memfnT>::futureT\n        send(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3) const\n        {\n            return send_am(dest, memfn, am_arg(a1), am_arg(a2), am_arg(a3),\n                    voidT::value, voidT::value, voidT::value, voidT::value,\n                    voidT::value, voidT::value);\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T>\n        typename detail::task_result_type<memfnT>::futureT\n        send(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4) const\n        {\n            return send_am(dest, memfn, am_arg(a1), am_arg(a2), am_arg(a3),\n                    am_arg(a4), voidT::value, voidT::value, voidT::value,\n                    voidT::value, voidT::value);\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T>\n        typename detail::task_result_type<memfnT>::futureT\n        send(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5) const\n        {\n            return send_am(dest, memfn, am_arg(a1), am_arg(a2), am_arg(a3),\n                    am_arg(a4), am_arg(a5), voidT::value, voidT::value,\n                    voidT::value, voidT::value);\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param a6 Argument 6.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T>\n        typename detail::task_result_type<memfnT>::futureT\n        send(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6) const\n        {\n            return send_am(dest, memfn, am_arg(a1), am_arg(a2), am_arg(a3),\n                    am_arg(a4), am_arg(a5), am_arg(a6), voidT::value, voidT::value,\n                    voidT::value);\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param a6 Argument 6.\n        /// \\param a7 Argument 7.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T>\n        typename detail::task_result_type<memfnT>::futureT\n        send(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const a7T& a7) const\n        {\n            return send_am(dest, memfn, am_arg(a1), am_arg(a2), am_arg(a3),\n                    am_arg(a4), am_arg(a5), am_arg(a6), am_arg(a7), voidT::value,\n                    voidT::value);\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param a6 Argument 6.\n        /// \\param a7 Argument 7.\n        /// \\param a8 Argument 8.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T, typename a8T>\n        typename detail::task_result_type<memfnT>::futureT\n        send(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const a7T& a7, const a8T& a8) const\n        {\n            return send_am(dest, memfn, am_arg(a1), am_arg(a2), am_arg(a3),\n                    am_arg(a4), am_arg(a5), am_arg(a6), am_arg(a7), am_arg(a8),\n                    voidT::value);\n        }\n\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\tparam a9T Type of argument 9.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param a6 Argument 6.\n        /// \\param a7 Argument 7.\n        /// \\param a8 Argument 8.\n        /// \\param a9 Argument 9.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T, typename a8T,\n                typename a9T>\n        typename detail::task_result_type<memfnT>::futureT\n        send(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const a7T& a7, const a8T& a8, const a9T& a9) const\n        {\n            return send_am(dest, memfn, am_arg(a1), am_arg(a2), am_arg(a3),\n                    am_arg(a4), am_arg(a5), am_arg(a6), am_arg(a7), am_arg(a8),\n                    am_arg(a9));\n        }\n\n        /// Sends task to derived class method `returnT (this->*memfn)()`.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        template <typename memfnT>\n        typename detail::task_result_type<memfnT>::futureT\n        task(ProcessID dest, memfnT memfn, const TaskAttributes& attr = TaskAttributes()) const {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typedef TaskFn<typename task_helper::wrapperT> taskT;\n            if (dest == me)\n                return world.taskq.add(task_helper::make_task_fn(this, memfn), attr);\n            else\n                return send_task<taskT>(dest, memfn, voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Sends task to derived class method `returnT (this->*memfn)(a1)`.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T>\n        typename detail::task_result_type<memfnT>::futureT\n        task(ProcessID dest, memfnT memfn, const a1T& a1,\n                const TaskAttributes& attr = TaskAttributes()) const\n        {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typedef TaskFn<typename task_helper::wrapperT,\n                    typename detail::task_arg<a1T>::type> taskT;\n            if (dest == me)\n                return world.taskq.add(task_helper::make_task_fn(this, memfn),\n                        a1, attr);\n            else\n                return send_task<taskT>(dest, memfn, am_arg(a1), voidT::value,\n                        voidT::value, voidT::value, voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Sends task to derived class method `returnT (this->*memfn)(a1,a2)`.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T>\n        typename detail::task_result_type<memfnT>::futureT\n        task(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const TaskAttributes& attr = TaskAttributes()) const\n        {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typedef TaskFn<typename task_helper::wrapperT,\n                    typename detail::task_arg<a1T>::type,\n                    typename detail::task_arg<a2T>::type> taskT;\n            if (dest == me)\n                return world.taskq.add(task_helper::make_task_fn(this, memfn),\n                        a1, a2, attr);\n            else\n                return send_task<taskT>(dest, memfn, am_arg(a1), am_arg(a2),\n                        voidT::value, voidT::value, voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Sends task to derived class method `returnT (this->*memfn)(a1,a2,a3)`.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T>\n        typename detail::task_result_type<memfnT>::futureT\n        task(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const TaskAttributes& attr = TaskAttributes()) const\n        {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typedef TaskFn<typename task_helper::wrapperT,\n                    typename detail::task_arg<a1T>::type,\n                    typename detail::task_arg<a2T>::type,\n                    typename detail::task_arg<a3T>::type> taskT;\n            if (dest == me)\n                return world.taskq.add(task_helper::make_task_fn(this, memfn),\n                        a1, a2, a3, attr);\n            else\n                return send_task<taskT>(dest, memfn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), voidT::value, voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Sends task to derived class method `returnT (this->*memfn)(a1,a2,a3,a4)`.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T>\n        typename detail::task_result_type<memfnT>::futureT\n        task(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const TaskAttributes& attr = TaskAttributes()) const\n        {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typedef TaskFn<typename task_helper::wrapperT,\n                    typename detail::task_arg<a1T>::type,\n                    typename detail::task_arg<a2T>::type,\n                    typename detail::task_arg<a3T>::type,\n                    typename detail::task_arg<a4T>::type> taskT;\n            if (dest == me)\n                return world.taskq.add(task_helper::make_task_fn(this, memfn),\n                        a1, a2, a3, a4, attr);\n            else\n                return send_task<taskT>(dest, memfn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Sends task to derived class method `returnT (this->*memfn)(a1,a2,a3,a4,a5)`.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T>\n        typename detail::task_result_type<memfnT>::futureT\n        task(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5,\n                const TaskAttributes& attr = TaskAttributes()) const\n        {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typedef TaskFn<typename task_helper::wrapperT,\n                    typename detail::task_arg<a1T>::type,\n                    typename detail::task_arg<a2T>::type,\n                    typename detail::task_arg<a3T>::type,\n                    typename detail::task_arg<a4T>::type,\n                    typename detail::task_arg<a5T>::type> taskT;\n            if (dest == me)\n                return world.taskq.add(task_helper::make_task_fn(this, memfn),\n                        a1, a2, a3, a4, a5, attr);\n            else\n                return send_task<taskT>(dest, memfn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), am_arg(a5), voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Sends task to derived class method `returnT (this->*memfn)(a1,a2,a3,a4,a5,a6)`.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param a6 Argument 6.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T>\n        typename detail::task_result_type<memfnT>::futureT\n        task(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const TaskAttributes& attr = TaskAttributes()) const\n        {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typedef TaskFn<typename task_helper::wrapperT,\n                    typename detail::task_arg<a1T>::type,\n                    typename detail::task_arg<a2T>::type,\n                    typename detail::task_arg<a3T>::type,\n                    typename detail::task_arg<a4T>::type,\n                    typename detail::task_arg<a5T>::type,\n                    typename detail::task_arg<a6T>::type> taskT;\n            if (dest == me)\n                return world.taskq.add(task_helper::make_task_fn(this, memfn),\n                        a1, a2, a3, a4, a5, a6, attr);\n            else {\n                return send_task<taskT>(dest, memfn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), am_arg(a5), am_arg(a6),\n                        voidT::value, voidT::value, voidT::value, attr);\n            }\n        }\n\n        /// Sends task to derived class method `returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7)`.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param a6 Argument 6.\n        /// \\param a7 Argument 7.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T>\n        typename detail::task_result_type<memfnT>::futureT\n        task(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const a7T& a7, const TaskAttributes& attr = TaskAttributes()) const\n        {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typedef TaskFn<typename task_helper::wrapperT,\n                    typename detail::task_arg<a1T>::type,\n                    typename detail::task_arg<a2T>::type,\n                    typename detail::task_arg<a3T>::type,\n                    typename detail::task_arg<a4T>::type,\n                    typename detail::task_arg<a5T>::type,\n                    typename detail::task_arg<a6T>::type,\n                    typename detail::task_arg<a7T>::type> taskT;\n            if (dest == me)\n                return world.taskq.add(task_helper::make_task_fn(this, memfn),\n                        a1, a2, a3, a4, a5, a6, a7, attr);\n            else\n                return send_task<taskT>(dest, memfn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), am_arg(a5), am_arg(a6),\n                        am_arg(a7), voidT::value, voidT::value, attr);\n        }\n\n        /// Sends task to derived class method `returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8)`.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param a6 Argument 6.\n        /// \\param a7 Argument 7.\n        /// \\param a8 Argument 8.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T, typename a8T>\n        typename detail::task_result_type<memfnT>::futureT\n        task(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const a7T& a7, const a8T& a8,\n                const TaskAttributes& attr = TaskAttributes()) const\n        {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typedef TaskFn<typename task_helper::wrapperT,\n                    typename detail::task_arg<a1T>::type,\n                    typename detail::task_arg<a2T>::type,\n                    typename detail::task_arg<a3T>::type,\n                    typename detail::task_arg<a4T>::type,\n                    typename detail::task_arg<a5T>::type,\n                    typename detail::task_arg<a6T>::type,\n                    typename detail::task_arg<a7T>::type,\n                    typename detail::task_arg<a8T>::type> taskT;\n            if (dest == me)\n                return world.taskq.add(task_helper::make_task_fn(this, memfn),\n                        a1, a2, a3, a4, a5, a6, a7, a8, attr);\n            else {\n                return send_task<taskT>(dest, memfn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), am_arg(a5), am_arg(a6),\n                        am_arg(a7), am_arg(a8), voidT::value, attr);\n            }\n        }\n\n        /// Sends task to derived class method `returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8,a9)`.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam memfnT Verify: Signature of the member function in the derived class to be invoked for the task.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\tparam a9T Type of argument 9.\n        /// \\param dest Description needed.\n        /// \\param memfn Verify: The member function to be invoked for the task.\n        /// \\param a1 Argument 1.\n        /// \\param a2 Argument 2.\n        /// \\param a3 Argument 3.\n        /// \\param a4 Argument 4.\n        /// \\param a5 Argument 5.\n        /// \\param a6 Argument 6.\n        /// \\param a7 Argument 7.\n        /// \\param a8 Argument 8.\n        /// \\param a9 Argument 9.\n        /// \\param attr Description needed.\n        /// \\return Description needed.\n        ///\n        /// \\todo Could we use variadic templates to eliminate a lot of this code duplication?\n        template <typename memfnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T, typename a8T,\n                typename a9T>\n        typename detail::task_result_type<memfnT>::futureT\n        task(ProcessID dest, memfnT memfn, const a1T& a1, const a2T& a2,\n                const a3T& a3, const a4T& a4, const a5T& a5, const a6T& a6,\n                const a7T& a7, const a8T& a8, const a9T& a9,\n                const TaskAttributes& attr = TaskAttributes()) const\n        {\n            typedef detail::WorldObjectTaskHelper<Derived, memfnT> task_helper;\n            typedef TaskFn<typename task_helper::wrapperT,\n                    typename detail::task_arg<a1T>::type,\n                    typename detail::task_arg<a2T>::type,\n                    typename detail::task_arg<a3T>::type,\n                    typename detail::task_arg<a4T>::type,\n                    typename detail::task_arg<a5T>::type,\n                    typename detail::task_arg<a6T>::type,\n                    typename detail::task_arg<a7T>::type,\n                    typename detail::task_arg<a8T>::type,\n                    typename detail::task_arg<a9T>::type> taskT;\n            if (dest == me)\n                return world.taskq.add(task_helper::make_task_fn(this, memfn),\n                        a1, a2, a3, a4, a5, a6, a7, a8, a9, attr);\n            else\n                return send_task<taskT>(dest, memfn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), am_arg(a5), am_arg(a6),\n                        am_arg(a7), am_arg(a8), am_arg(a9), attr);\n        }\n\n        virtual ~WorldObject() {\n            if(initialized()) {\n              MADNESS_ASSERT_NOEXCEPT(World::exists(&world));\n              MADNESS_ASSERT_NOEXCEPT(world.ptr_from_id<Derived>(id()));\n              MADNESS_ASSERT_NOEXCEPT(*world.ptr_from_id<Derived>(id()) == this);\n              world.unregister_ptr(this->id());\n            }\n        }\n\n#ifdef MADNESS_WORLDOBJECT_FUTURE_TRACE\n        /// \"traces\" future evaluation by counting their assignments in a static table\n\n        /// Counts future assignments in a a statically-sized table to make this as lightweight/lock-free as possible\n        /// with minimal effort. Can only trace objects of a single World.\n        /// \\param[in,out] f the future to be traced; if ready, will be unchanged (but contribute to the trace\n        /// statistics of this object), or have a callback registered that will update the tracing statistics on\n        /// assignment\n        /// \\warning this function will trace futures for WorldObjects associated with default world (id=0) only;\n        /// use CMake variable `MADNESS_WORLDOBJECT_FUTURE_TRACE_WORLD_ID` to adjust the target World ID.\n        /// \\warning this function will trace futures for WorldObjects with IDs < 1000000 only;\n        /// use CMake variable `MADNESS_WORLDOBJECT_FUTURE_TRACE_MAX_NOBJECTS` to adjust the limit.\n        template <typename T>\n        std::enable_if_t<!std::is_same_v<T,void>,void> trace(Future<T>& f) const;\n\n        /// \\param[in] id a WorldObject ID\n        /// \\return true if futures associated with \\p id are traced\n        static bool trace_futures(const uniqueidT &id);\n\n        /// \\return true if futures associated with this object are traced\n        bool trace_futures() const {\n          return trace_futures(this->id());\n        }\n\n        /// \\param[in] id report tracing stats for this WorldObject\n        /// \\return number of futures given to trace() of the WorldObject with ID \\p id\n        static std::size_t trace_status_nfuture_registered(const uniqueidT& id);\n\n        /// \\return number of futures given to trace() of this object\n        std::size_t trace_status_nfuture_registered() const {\n          return trace_status_nfuture_registered(this->id());\n        }\n\n        /// \\param[in] id report tracing stats for this WorldObject\n        /// \\return number of assigned futures given to trace() of the WorldObject with ID \\p id\n        static std::size_t trace_status_nfuture_assigned(const uniqueidT& id);\n\n        /// \\return number of assigned futures registered via `this->trace()`\n        std::size_t trace_status_nfuture_assigned() const {\n          return trace_status_nfuture_assigned(this->id());\n        }\n#endif\n    };\n\n#ifdef MADNESS_WORLDOBJECT_FUTURE_TRACE\n    namespace detail {\n    template <typename Derived> struct WorldObjectFutureTracer {\n      // this value is the world ID to trace\n      constexpr static std::size_t world_id =\n#ifndef MADNESS_WORLDOBJECT_FUTURE_TRACE_WORLD_ID\n          0\n#else\n          MADNESS_WORLDOBJECT_FUTURE_TRACE_WORLD_ID\n#endif\n          ;\n      // this value is 1 greater than is the highest ID of WorldObjects to trace\n      constexpr static std::size_t max_object_id =\n#ifndef MADNESS_WORLDOBJECT_FUTURE_TRACE_MAX_NOBJECTS\n          1000000\n#else\n          MADNESS_WORLDOBJECT_FUTURE_TRACE_MAX_NOBJECTS\n#endif\n          ;\n\n      static constexpr bool do_trace(const uniqueidT& id) {\n        return id.get_world_id() == world_id &&\n               id.get_obj_id() < max_object_id;\n      }\n\n      static std::array<std::atomic<std::size_t>, max_object_id>\n          nfuture_registered;\n      static std::array<std::atomic<std::size_t>, max_object_id>\n          nfuture_assigned;\n\n      struct Initializer {\n        Initializer() {\n          for (auto &&v : nfuture_registered) {\n            v.store(0);\n          }\n          for (auto &&v : nfuture_assigned) {\n            v.store(0);\n          }\n        }\n      };\n      static Initializer initializer;\n\n      struct FutureTracer : public CallbackInterface {\n        FutureTracer(const uniqueidT &id) : id_(id) {\n          if (do_trace(id_)) {\n            nfuture_registered[id_.get_obj_id()]++;\n          }\n        }\n\n        // Not allowed\n        FutureTracer(const FutureTracer &) = delete;\n        FutureTracer &operator=(const FutureTracer &) = delete;\n\n        virtual ~FutureTracer() {}\n\n        /// Notify this object that the future has been set.\n\n        /// This will set the value of the future on the remote node and delete\n        /// this callback object.\n        void notify() override {\n          if (do_trace(id_)) {\n            nfuture_assigned[id_.get_obj_id()]++;\n          }\n          delete this;\n        }\n\n      private:\n        uniqueidT id_;\n      }; // struct FutureTracer\n\n    }; // struct WorldObjectFutureTracer\n    template <typename Derived>\n    typename WorldObjectFutureTracer<Derived>::Initializer\n        WorldObjectFutureTracer<Derived>::initializer;\n    template <typename Derived>\n    std::array<std::atomic<std::size_t>, WorldObjectFutureTracer<Derived>::max_object_id>\n        WorldObjectFutureTracer<Derived>::nfuture_registered;\n    template <typename Derived>\n    std::array<std::atomic<std::size_t>, WorldObjectFutureTracer<Derived>::max_object_id>\n        WorldObjectFutureTracer<Derived>::nfuture_assigned;\n    }  // namespace detail\n\n    template <typename Derived>\n    template <typename T>\n    std::enable_if_t<!std::is_same_v<T,void>,void> WorldObject<Derived>::trace(Future<T>& f) const {\n      f.register_callback(\n          new typename detail::WorldObjectFutureTracer<Derived>::FutureTracer(\n              this->id()));\n    }\n\n    template <typename Derived>\n    bool WorldObject<Derived>::trace_futures(const uniqueidT& id) {\n      return detail::WorldObjectFutureTracer<Derived>::do_trace(id);\n    }\n\n    template <typename Derived>\n    std::size_t WorldObject<Derived>::trace_status_nfuture_registered(const uniqueidT& id) {\n      if (detail::WorldObjectFutureTracer<\n              Derived>::do_trace(id)) {\n        return detail::WorldObjectFutureTracer<\n            Derived>::nfuture_registered[id.get_obj_id()];\n      }\n      else return 0;\n    }\n\n    template <typename Derived>\n    std::size_t WorldObject<Derived>::trace_status_nfuture_assigned(const uniqueidT& id) {\n      if (detail::WorldObjectFutureTracer<\n              Derived>::do_trace(id)) {\n        return detail::WorldObjectFutureTracer<\n            Derived>::nfuture_assigned[id.get_obj_id()];\n      }\n      else return 0;\n    }\n\n#endif  // MADNESS_WORLDOBJECT_FUTURE_TRACE\n\n    namespace archive {\n        \n        /// Specialization of \\c ArchiveLoadImpl for globally-addressable objects.\n\n        /// \\tparam Derived The derived class of \\c WorldObject in a curiously\n        ///     repeating template pattern.\n        template <class Derived>\n        struct ArchiveLoadImpl<BufferInputArchive,WorldObject<Derived>*> {\n\n            /// Read a globally-addressable object from a \\c BufferInputArchive.\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[out] ptr The read object.\n            static inline void load(const BufferInputArchive& ar, WorldObject<Derived>*& ptr) {\n                uniqueidT id;\n                ar & id;\n                World* world = World::world_from_id(id.get_world_id());\n                MADNESS_ASSERT(world);\n                auto ptr_opt = world->ptr_from_id< WorldObject<Derived> >(id);\n                if (!ptr_opt) MADNESS_EXCEPTION(\"WorldObj: remote operation attempting to use a locally uninitialized object\",0);\n                ptr = *ptr_opt;\n                if (!ptr) MADNESS_EXCEPTION(\"WorldObj: remote operation attempting to use a locally deregistered object\",0);\n            }\n        };\n\n        /// Specialization of \\c ArchiveStoreImpl for globally-addressable objects.\n\n        /// \\tparam Derived The derived class of \\c WorldObject in a curiously\n        ///     repeating template pattern.\n        template <class Derived>\n        struct ArchiveStoreImpl<BufferOutputArchive,WorldObject<Derived>*> {\n\n            /// Write a globally-addressable object to a \\c BufferOutputArchive.\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[in] ptr The object to store.\n            static inline void store(const BufferOutputArchive& ar, WorldObject<Derived>* const& ptr) {\n                ar & ptr->id();\n            }\n        };\n\n        /// Specialization of \\c ArchiveLoadImpl for constant, globally-addressable objects.\n\n        /// \\tparam Derived The derived class of \\c WorldObject in a curiously\n        ///     repeating template pattern.\n        template <class Derived>\n        struct ArchiveLoadImpl<BufferInputArchive, const WorldObject<Derived>*> {\n\n            /// Read a globally-addressable object from a \\c BufferInputArchive.\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[out] ptr The read object.\n            static inline void load(const BufferInputArchive& ar, const WorldObject<Derived>*& ptr) {\n                uniqueidT id;\n                ar & id;\n                World* world = World::world_from_id(id.get_world_id());\n                MADNESS_ASSERT(world);\n                auto ptr_opt = world->ptr_from_id< WorldObject<Derived> >(id);\n                if (!ptr_opt) MADNESS_EXCEPTION(\"WorldObj: remote operation attempting to use a locally uninitialized object\",0);\n                ptr = *ptr_opt;\n                if (!ptr) MADNESS_EXCEPTION(\"WorldObj: remote operation attempting to use a locally deregistered object\",0);\n            }\n        };\n\n        /// Specialization of \\c ArchiveStoreImpl for constant, globally-addressable objects.\n\n        /// \\tparam Derived The derived class of \\c WorldObject in a curiously\n        ///     repeating template pattern.\n        template <class Derived>\n        struct ArchiveStoreImpl<BufferOutputArchive, const WorldObject<Derived>*> {\n\n            /// Write a globally-addressable object to a \\c BufferOutputArchive.\n\n            /// \\param[in,out] ar The archive.\n            /// \\param[in] ptr The object to store.\n            static inline void store(const BufferOutputArchive& ar, const WorldObject<Derived>* const& ptr) {\n                ar & ptr->id();\n            }\n        };\n    }   // namespace archive\n}  // namespace madness\n\n#endif // MADNESS_WORLD_WORLD_OBJECT_H__INCLUDED\n\n/// @}\n"
  },
  {
    "path": "src/madness/world/world_task_queue.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file world_task_queue.cc\n \\brief Implementation of \\c TaskInterface and \\c WorldTaskQueue functions.\n \\ingroup taskq\n*/\n\n#include <madness/world/world_task_queue.h>\n\nnamespace madness {\n\n    bool TaskInterface::debug = false;\n\n    // This is what thread pool will invoke\n    void TaskInterface::run(const TaskThreadEnv& env) {\n        MADNESS_ASSERT(world);\n        MADNESS_ASSERT(completion);\n        World* w = const_cast<World*>(world);\n        if (debug) std::cerr << w->rank() << \": Task \" << (void*) this << \" is now running\" << std::endl;\n        run(*w, env);\n        if (debug) std::cerr << w->rank() << \": Task \" << (void*) this << \" has completed\" << std::endl;\n    }\n\n    WorldTaskQueue::WorldTaskQueue(World& world)\n            : world(world)\n            , me(world.rank()) {\n        nregistered = 0;\n    }\n\n}  // namespace madness\n"
  },
  {
    "path": "src/madness/world/world_task_queue.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file world_task_queue.h\n \\brief Defines \\c TaskInterface and implements \\c WorldTaskQueue and associated stuff.\n \\ingroup taskq\n*/\n\n#ifndef MADNESS_WORLD_WORLD_TASK_QUEUE_H__INCLUDED\n#define MADNESS_WORLD_WORLD_TASK_QUEUE_H__INCLUDED\n\n#include <type_traits>\n#include <iostream>\n\n#include <madness/madness_config.h>\n\n// must be included before world/range.h\n#ifdef HAVE_INTEL_TBB\n# include <tbb/parallel_reduce.h>\n#endif\n\n#include <madness/world/meta.h>\n#include <madness/world/nodefaults.h>\n#include <madness/world/range.h>\n#include <madness/world/timers.h>\n#include <madness/world/taskfn.h>\n#include <madness/world/mem_func_wrapper.h>\n\n/// \\addtogroup taskq\n/// @{\n\nnamespace madness {\n\n    // Forward decls\n    class World;\n    class WorldTaskQueue;\n    template <typename> struct TaskFunction;\n    template <typename> struct TaskMemfun;\n\n    namespace meta {\n    template <typename ... argsT>\n    struct taskattr_is_last_arg : public std::integral_constant<bool, std::is_same<std::decay_t<typename meta::last_type<argsT...>::type>,\n    TaskAttributes>::value> {};\n    template <>\n    struct taskattr_is_last_arg<> : public std::false_type {};\n    }\n\n    namespace detail {\n\n        // a few more forward decls\n        template <typename ptrT, typename memfnT, typename resT>\n        memfnT get_mem_func_ptr(const MemFuncWrapper<ptrT, memfnT, resT>&);\n\n        template <typename, typename>\n        class ForEachRootTask;\n\n        /// Serialization container for sending tasks to remote nodes.\n\n        /// \\attention This struct is for internal use only. You should not\n        ///     use this class directly.\n        /// \\tparam refT The remote reference type for task result future.\n        /// \\tparam functionT The task function type.\n        template <typename refT, typename functionT>\n        struct TaskHandlerInfo {\n            refT ref; ///< Remote reference for a task result future.\n            functionT func; ///< A task function.\n            TaskAttributes attr; ///< Task attributes.\n\n            TaskHandlerInfo() = default;\n\n            /// Construct task info object.\n\n            /// \\param[in] ref Remote reference to the result future.\n            /// \\param[in] func The task function.\n            /// \\param[in] attr The task attrubutes.\n            TaskHandlerInfo(const refT& ref, functionT func, const TaskAttributes& attr)\n                : ref(ref), func(func),attr(attr) {}\n\n            /// Serialization of an object.\n\n            /// \\tparam Archive The serialization archive type.\n            /// \\param[in,out] ar The serialization archive.\n            template <typename Archive>\n            void serialize(const Archive& ar) {\n                serialize_internal<functionT>(ar);\n            }\n\n        private:\n\n            /// Serialization for function pointers and member function pointers.\n\n            /// \\tparam fnT The function type.\n            /// \\tparam Archive The serialization archive type.\n            /// \\param[in,out] ar The serialization archive.\n            template <typename fnT, typename Archive>\n            typename std::enable_if<is_any_function_pointer_v<fnT>>::type\n            serialize_internal(const Archive& ar) {\n                ar & ref & func & attr;\n            }\n\n            /// Serialization for non- function pointers and member function pointers.\n\n            /// \\tparam fnT The function type.\n            /// \\tparam Archive The serialization archive type.\n            /// \\param[in,out] ar The serialization archive.\n            template <typename fnT, typename Archive>\n            typename std::enable_if<!is_any_function_pointer_v<fnT>>::type\n            serialize_internal(const Archive& ar) {\n                ar & ref & func & attr;\n            }\n        }; // struct TaskHandlerInfo\n\n        /// Behave like a lazy \\c std::enable_if.\n\n        /// Evaluates to \\c returnT if \\c B is true, otherwise to an invalid type expression\n        /// which causes the template expression in which it is used to not be considered for\n        /// overload resolution. This \"lazy\" version is used if \\c T is only valid when\n        /// B is true. Note: typename T::type is the return type and must be well formed.\n        /// \\tparam B The bool value.\n        /// \\tparam returnT The type.\n        template <bool B, class returnT>\n        struct function_enabler_helper {\n          typedef typename returnT::type type;\n        };\n\n        /// Specialization that disables \\c type when \\c B is false.\n\n        /// \\tparam returnT The type.\n        template <class returnT>\n        struct function_enabler_helper<false, returnT> { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam fnT Description needed.\n        template <typename fnT>\n        struct function_enabler : public\n            function_enabler_helper<\n                function_traits<fnT>::value || is_functor<fnT>::value,\n                task_result_type<fnT> >\n        { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam fnT Description needed.\n        template <typename callableT, typename Enabler = void>\n        struct callable_enabler;\n        template <typename callableT>\n        struct callable_enabler<callableT,\n        std::enable_if_t<callable_traits<callableT>::value>>\n        { using type = typename callable_traits<callableT>::result_type; };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Description needed.\n        /// \\tparam enableT Description needed.\n        template <typename objT, typename memfnT, typename enableT = void>\n        struct memfunc_enabler_base\n        { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed\n        /// \\tparam objT Description needed.\n        /// \\tparam resT Description needed.\n        /// \\tparam baseT Description needed.\n        /// \\tparam paramT Description needed.\n        template <typename objT, typename resT, typename baseT, typename ... paramT>\n        struct memfunc_enabler_base<objT, resT (baseT::*)(paramT...),\n            typename std::enable_if<std::is_base_of<baseT, objT>::value>::type >\n        {\n            /// \\todo Brief description needed.\n            typedef typename add_future<resT>::type type;\n        };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam resT Description needed.\n        /// \\tparam baseT Description needed.\n        /// \\tparam paramT Description needed.\n        template <typename objT, typename resT, typename baseT, typename ... paramT>\n        struct memfunc_enabler_base<objT, resT (baseT::*)(paramT...) const,\n            typename std::enable_if<std::is_base_of<baseT, objT>::value>::type >\n        {\n            /// \\todo Brief description needed.\n            typedef typename add_future<resT>::type type;\n        };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Description needed.\n        template <typename objT, typename memfnT>\n        struct memfunc_enabler :\n                public memfunc_enabler_base<typename std::decay<objT>::type, memfnT>\n        { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Description needed.\n        template <typename objT, typename memfnT>\n        struct memfunc_enabler<objT*, memfnT> :\n            public memfunc_enabler<objT, memfnT>\n        { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Description needed.\n        template <typename objT, typename memfnT>\n        struct memfunc_enabler<const objT*, memfnT> :\n            public memfunc_enabler<objT, memfnT>\n        { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Description needed.\n        template <typename objT, typename memfnT>\n        struct memfunc_enabler<objT* const, memfnT> :\n            public memfunc_enabler<objT, memfnT>\n        { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Description needed.\n        template <typename objT, typename memfnT>\n        struct memfunc_enabler<const objT* const, memfnT> :\n            public memfunc_enabler<objT, memfnT>\n        { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Description needed.\n        template <typename objT, typename memfnT>\n        struct memfunc_enabler<std::shared_ptr<objT>&, memfnT> :\n            public memfunc_enabler<objT, memfnT>\n        { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Description needed.\n        template <typename objT, typename memfnT>\n        struct memfunc_enabler<const std::shared_ptr<objT>&, memfnT> :\n            public memfunc_enabler<objT, memfnT>\n        { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Description needed.\n        template <typename objT, typename memfnT>\n        struct memfunc_enabler<std::shared_ptr<objT>, memfnT> :\n            public memfunc_enabler<objT, memfnT>\n        { };\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam objT Description needed.\n        /// \\tparam memfnT Description needed.\n        template <typename objT, typename memfnT>\n        struct memfunc_enabler<const std::shared_ptr<objT>, memfnT> :\n            public memfunc_enabler<objT, memfnT>\n        { };\n\n    }  // namespace detail\n\n\n    /// Multi-threaded queue to manage and run tasks.\n\n    /// \\todo A concise description of the inner workings...\n    class WorldTaskQueue : public CallbackInterface, private NO_DEFAULTS {\n        friend class TaskInterface;\n    private:\n        World& world; ///< The communication context.\n        const ProcessID me; ///< This process.\n        AtomicInt nregistered; ///< Count of pending tasks.\n\n        /// \\todo Brief description needed.\n        void notify() {\n            nregistered--;\n        }\n\n        /// \\todo Brief description needed.\n\n        /// This template is used in the reduce kernel.\n        /// \\todo Template parameter descriptions need verification.\n        /// \\tparam resultT Return type of the operation.\n        /// \\tparam opT The operation.\n        /// \\param[in] left Description needed.\n        /// \\param[in] right Description needed.\n        /// \\param[in] op The operation used in the reduce.\n        /// \\return Reduce of \\c left and \\c right using \\c op.\n        template <typename resultT, typename opT>\n        static resultT sum(const resultT& left, const resultT& right, const opT& op) {\n            //std::cout << \" REDUCE SUM \" << left << \" \" << right << std::endl;\n            return op(left,right);\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam taskT Description needed.\n        /// \\param arg Description needed.\n        template <typename taskT>\n        static void remote_task_handler(const AmArg& arg) {\n            MADNESS_ASSERT(taskT::arity <= 9u);\n\n            // Get task info and arguments form active message\n\n            detail::TaskHandlerInfo<typename taskT::futureT::remote_refT,\n                    typename taskT::functionT> info;\n\n            archive::BufferInputArchive input_arch = arg & info;\n\n            // Construct task\n            taskT* task = new taskT(typename taskT::futureT(info.ref),\n                    info.func, info.attr, input_arch);\n\n            // Add task to queue\n            arg.get_world()->taskq.add(task);\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam T Description needed.\n        /// \\param[in] f Description needed.\n        template <typename T>\n        inline const T& am_arg(const Future<T>& f) {\n            MADNESS_ASSERT(f.probe());\n            return f.get();\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam T Description needed.\n        /// \\param[in] t Description needed.\n        /// \\return Description needed.\n        template <typename T>\n        inline const T& am_arg(const T& t) {\n            return t;\n        }\n\n        /// \\todo Brief description needed.\n        typedef detail::voidT voidT;\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam taskT Description needed.\n        /// \\tparam fnT Description needed.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\tparam a9T Type of argument 9.\n        /// \\param where Description needed.\n        /// \\param fn Description needed.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] a6 Argument 6.\n        /// \\param[in] a7 Argument 7.\n        /// \\param[in] a8 Argument 8.\n        /// \\param[in] a9 Argument 9.\n        /// \\param[in] attr Description needed.\n        /// \\return Description needed.\n        template <typename taskT, typename fnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T,\n                typename a8T, typename a9T>\n        inline typename taskT::futureT\n        send_task(ProcessID where, fnT fn, const a1T& a1,\n                const a2T& a2, const a3T& a3, const a4T& a4, const a5T& a5,\n                const a6T& a6, const a7T& a7, const a8T& a8, const a9T& a9,\n                const TaskAttributes& attr)\n        {\n            typename taskT::futureT result;\n            typedef detail::TaskHandlerInfo<typename taskT::futureT::remote_refT, typename taskT::functionT> infoT;\n            world.am.send(where, & WorldTaskQueue::template remote_task_handler<taskT>,\n                    new_am_arg(infoT(result.remote_ref(world), fn, attr),\n                    a1, a2, a3, a4, a5, a6, a7, a8, a9), RMI::ATTR_UNORDERED);\n\n            return result;\n        }\n\n\n    public:\n        /// Constructor requiring a communication context (\\c World).\n\n        /// \\param[in,out] world The communication context.\n        WorldTaskQueue(World& world);\n\n        /// Returns the number of pending tasks.\n\n        /// \\return The number of pending tasks.\n        size_t size() const {\n            return nregistered;\n        }\n\n\n        /// Add a new local task, taking ownership of the pointer.\n\n        /// The task pointer (\\c t) is assumed to have been created with\n        /// \\c new and when the task is eventually run the queue\n        /// will call the task's destructor using \\c delete.\n        ///\n        /// Once the task is complete it will execute\n        /// \\c task_complete_callback to decrement the number of pending\n        /// tasks and be deleted.\n        /// \\param[in] t Pointer to the task.\n        void add(TaskInterface* t)  {\n            nregistered++;\n\n            t->set_info(&world, this);       // Stuff info\n\n            // Always use the callback to avoid race condition\n            t->register_submit_callback();\n        }\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Descriptions needed.\n        /// \\tparam fnT Description needed.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\tparam a9T Type of argument 9.\n        /// \\param[in] t Description needed.\n        /// \\return Description needed.\n        template <typename fnT, typename a1T, typename a2T, typename a3T,\n            typename a4T, typename a5T, typename a6T, typename a7T, typename a8T,\n            typename a9T>\n        typename TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T, a7T, a8T, a9T>::futureT\n        add(TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T, a7T, a8T, a9T>* t) {\n            typename TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T, a7T, a8T, a9T>::futureT\n                res(t->result());\n            add(static_cast<TaskInterface*>(t));\n            return res;\n        }\n\n        /// Reduce `op(item)` for all items in range using `op(sum,op(item))`.\n\n        /// The operation must provide the following interface, of\n        /// which the \\c operator() methods are required by \\c reduce()\n        /// and the rest by the task interface.\n        /// \\code\n        /// struct opT {\n        ///     opT();\n        ///     opT(const &opT);\n        ///     resultT operator()(const rangeT::iterator& it) const;\n        ///     resultT operator()(const resultT& left, const resultT& right);\n        ///     template <typename Archive> void serialize(const Archive& ar);\n        /// }\n        /// \\endcode\n        /// \\note The serialize method does not actually have to\n        /// work unless you want to have the task be stealable.\n        ///\n        /// Adjust the chunksize in the range to control granularity.\n        /// \\todo Descriptions needed and/or verified.\n        /// \\tparam resultT The result type of the operation.\n        /// \\tparam rangeT Description needed.\n        /// \\tparam opT Function type of the operation.\n        /// \\param[in] range The range of items.\n        /// \\param[in] op The operation.\n        /// \\return Description needed.\n        template <typename resultT, typename rangeT, typename opT>\n        Future<resultT> reduce(const rangeT& range, const opT& op) {\n            if (range.size() <= range.get_chunksize()) {\n                resultT sum = resultT();\n                for (typename rangeT::iterator it=range.begin(); it != range.end(); ++it) sum = op(sum,op(it));\n                return Future<resultT>(sum);\n            } else {\n                rangeT left = range;\n                rangeT right(left,Split());\n\n                Future<resultT>  leftsum = add(*this, &WorldTaskQueue::reduce<resultT,rangeT,opT>, left,  op);\n                Future<resultT> rightsum = add(*this, &WorldTaskQueue::reduce<resultT,rangeT,opT>, right, op);\n                return add(&WorldTaskQueue::sum<resultT,opT>, leftsum, rightsum, op);\n            }\n        }\n\n        /// Apply `op(item)` on all items in range.\n\n        /// The operation must provide the following interface, of\n        /// which the \\c operator() method is required by `for_each()`\n        /// and the rest by the task interface.\n        /// \\code\n        /// struct opT {\n        ///     opT(const opT&);\n        ///     bool operator()(const rangeT::iterator& it) const;\n        /// };\n        /// \\endcode\n        /// \\note The serialize method does not actually have to\n        /// work unless you want to have the task be stealable.\n        ///\n        /// Adjust the chunksize in the range to control granularity.\n        ///\n        /// Your operation should return true/false for success failure\n        /// and the logical and of all results is returned as the\n        /// future result.\n        ///\n        /// You can ignore the result if you are interested\n        /// in neither synchronization nor result status.\n        /// \\todo Descriptions needed and/or verified.\n        /// \\tparam rangeT Description needed.\n        /// \\tparam opT Funtion type of the operation. This function should\n        ///     have a return type of \\c bool.\n        /// \\param[in] range The range of items.\n        /// \\param[in] op The operation.\n        /// \\return Future for a bool which is the logical `and` of all `op(item)` calls.\n        template <typename rangeT, typename opT>\n        Future<bool> for_each(const rangeT& range, const opT& op) {\n            detail::ForEachRootTask<rangeT, opT>* for_each_root =\n                    new detail::ForEachRootTask<rangeT, opT>(world, range, op);\n            Future<bool> result = for_each_root->result();\n            add(for_each_root);\n            return result;\n        }\n\n#if MADNESS_TASKQ_VARIADICS\n\n        ///////////////////////////////////////////////////////////////////////////////\n\n        /// Create a local task with one argument.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\tparam a1T Type of argument 1.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        /// \\note future_to_ref_t is used instead of remove_future_t so that\n        ///       argument Future's convert to refs so that X(Y&) can invoked by add(X, Future<T>);\n        ///       if remove_future_t were used, X(Y) would be expected instead.\n        ///       This is reasonable if we remember the shallow copy semantics of Futures: they act\n        ///       as refs.\n        template <typename fnT, typename... argsT,\n                  typename = std::enable_if_t<\n                  meta::taskattr_is_last_arg<argsT...>::value>>\n        typename meta::drop_last_arg_and_apply_callable<detail::function_enabler, fnT, future_to_ref_t<argsT>...>::type::type\n        add(fnT&& fn, argsT&&... args) {\n          using taskT = typename meta::drop_last_arg_and_apply<TaskFn,\n                                                               std::decay_t<fnT>,\n                                                               std::remove_cv_t<std::remove_reference_t<argsT>>...>::type;\n          return add(new taskT(typename taskT::futureT(), std::forward<fnT>(fn),\n                               std::forward<argsT>(args)...));\n        }\n\n        template <typename fnT, typename... argsT,\n                  typename = std::enable_if_t<\n                      !meta::taskattr_is_last_arg<argsT...>::value>>\n        typename detail::function_enabler<fnT(future_to_ref_t<argsT>...)>::type add(\n            fnT&& fn, argsT&&... args) {\n          using taskT = TaskFn<std::decay_t<fnT>, std::remove_cv_t<std::remove_reference_t<argsT>>...>;\n          return add(new taskT(typename taskT::futureT(), std::forward<fnT>(fn),\n                               std::forward<argsT>(args)..., TaskAttributes()));\n        }\n\n#else\n        /// Create a local task with no arguments.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        template <typename fnT>\n        typename detail::function_enabler<fnT()>::type\n        add(fnT fn, const TaskAttributes& attr=TaskAttributes()) {\n            typedef TaskFn<fnT> taskT;\n            return add(new taskT(typename taskT::futureT(),\n                    fn, attr));\n        }\n\n        /// Create a local task with one argument.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\tparam a1T Type of argument 1.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        template <typename fnT, typename a1T>\n        typename detail::function_enabler<fnT(a1T)>::type\n        add(fnT fn, const a1T& a1, const TaskAttributes& attr=TaskAttributes()) {\n            typedef TaskFn<fnT, a1T> taskT;\n            return add(new taskT(typename taskT::futureT(),\n                    fn, a1, attr));\n        }\n\n        /// Create a local task with two arguments.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        template <typename fnT, typename a1T, typename a2T>\n        typename detail::function_enabler<fnT(a1T, a2T)>::type\n        add(fnT fn, const a1T& a1, const a2T& a2, const TaskAttributes& attr=TaskAttributes()) {\n            typedef TaskFn<fnT, a1T, a2T> taskT;\n            return add(new taskT(typename taskT::futureT(),\n                    fn, a1, a2, attr));\n        }\n\n        /// Create a local task with three arguments.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        template <typename fnT, typename a1T, typename a2T, typename a3T>\n        typename detail::function_enabler<fnT(a1T, a2T, a3T)>::type\n        add(fnT fn, const a1T& a1, const a2T& a2, const a3T& a3,\n            const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T> taskT;\n            return add(new taskT(typename taskT::futureT(),\n                    fn, a1, a2, a3, attr));\n        }\n\n        /// Create a local task with four arguments.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T>\n        typename detail::function_enabler<fnT(a1T, a2T, a3T, a4T)>::type\n        add(fnT fn, const a1T& a1, const a2T& a2, const a3T& a3, const a4T& a4,\n            const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T> taskT;\n            return add(new taskT(typename taskT::futureT(),\n                    fn, a1, a2, a3, a4, attr));\n        }\n\n        /// Create a local task with five arguments.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n            typename a5T>\n        typename detail::function_enabler<fnT(a1T, a2T, a3T, a4T, a5T)>::type\n        add(fnT fn, const a1T& a1, const a2T& a2, const a3T& a3, const a4T& a4,\n            const a5T& a5, const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T, a5T> taskT;\n            return add(new taskT(typename taskT::futureT(),\n                    fn, a1, a2, a3, a4, a5, attr));\n        }\n\n        /// Create a local task with six arguments.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] a6 Argument 6.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n            typename a5T, typename a6T>\n        typename detail::function_enabler<fnT(a1T, a2T, a3T, a4T, a5T, a6T)>::type\n        add(fnT fn, const a1T& a1, const a2T& a2, const a3T& a3, const a4T& a4,\n            const a5T& a5, const a6T& a6, const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T> taskT;\n            return add(new taskT(typename taskT::futureT(),\n                    fn, a1, a2, a3, a4, a5, a6, attr));\n        }\n\n        /// Create a local task with seven arguments.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] a6 Argument 6.\n        /// \\param[in] a7 Argument 7.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n            typename a5T, typename a6T, typename a7T>\n        typename detail::function_enabler<fnT(a1T, a2T, a3T, a4T, a5T, a6T, a7T)>::type\n        add(fnT fn, const a1T& a1, const a2T& a2, const a3T& a3, const a4T& a4,\n            const a5T& a5, const a6T& a6, const a7T& a7,\n            const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T, a7T> taskT;\n            return add(new taskT(typename taskT::futureT(),\n                    fn, a1, a2, a3, a4, a5, a6, a7, attr));\n        }\n\n        /// Create a local task with eight arguments.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] a6 Argument 6.\n        /// \\param[in] a7 Argument 7.\n        /// \\param[in] a8 Argument 8.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n            typename a5T, typename a6T, typename a7T, typename a8T>\n        typename detail::function_enabler<fnT(a1T, a2T, a3T, a4T, a5T, a6T, a7T, a8T)>::type\n        add(fnT fn, const a1T& a1, const a2T& a2, const a3T& a3, const a4T& a4,\n            const a5T& a5, const a6T& a6, const a7T& a7, const a8T& a8,\n            const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T, a7T, a8T> taskT;\n            return add(new taskT(typename taskT::futureT(),\n                    fn, a1, a2, a3, a4, a5, a6, a7, a8, attr));\n        }\n\n        /// Create a local task with nine arguments.\n\n        /// Creates a task in this process. An argument that is a future may be\n        /// used to carry dependencies.\n        /// \\tparam fnT A function pointer or functor.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\tparam a9T Type of argument 9.\n        /// \\param[in,out] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] a6 Argument 6.\n        /// \\param[in] a7 Argument 7.\n        /// \\param[in] a8 Argument 8.\n        /// \\param[in] a9 Argument 9.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return\n        ///     type is \\c void, a \\c Future<void> object is returned that may\n        ///     be ignored.\n        template <typename fnT, typename a1T, typename a2T, typename a3T, typename a4T,\n            typename a5T, typename a6T, typename a7T, typename a8T, typename a9T>\n        typename detail::function_enabler<fnT(a1T, a2T, a3T, a4T, a5T, a6T, a7T, a8T, a9T)>::type\n        add(fnT fn, const a1T& a1, const a2T& a2, const a3T& a3, const a4T& a4,\n            const a5T& a5, const a6T& a6, const a7T& a7, const a8T& a8, const a9T& a9,\n            const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T, a7T, a8T, a9T> taskT;\n            return add(new taskT(typename taskT::futureT(),\n                    fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, attr));\n        }\n#endif\n\n        /// Create a remote task.\n\n        /// Creates a task in process \\c dest, which may or may not be this\n        /// process. An argument that is a future may be used to carry\n        /// dependencies for local tasks. A future that is not ready cannot be\n        /// used as an argument for remote tasks -- i.e., remote tasks must\n        /// be ready to execute (you can work around this by making a local task\n        /// to submit the remote task once everything is ready).\n        /// \\tparam fnT A function pointer or functor type.\n        /// \\param[in] dest The process where the task will be created.\n        /// \\param[in] fn The function to be called in the task.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types, simple STL\n        /// containers, and pointers to \\c World, \\c WorldContainer, and\n        /// user-defined types derived from \\c WorldObject<> are automatically\n        /// handled. Anything else is your problem.\n        template <typename fnT>\n        typename detail::function_enabler<fnT>::type\n        add(ProcessID dest, fnT fn, const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT> taskT;\n            if(dest == me)\n                return add(fn, attr);\n            else\n                return send_task<taskT>(dest, fn, voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Invoke `resultT (*fn)(a1T)` as a task, local or remote.\n\n        /// A future is returned to hold the eventual result of the task.\n        /// \\c Future<void> is an empty class that may be ignored.\n        /// \\tparam fnT A function pointer or functor type.\n        /// \\tparam a1T Type of argument 1.\n        /// \\param[in] dest The process where the task will be created.\n        /// \\param[in] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types,\n        /// simple STL containers, and pointers to \\c World,\n        /// \\c WorldContainer, and user-defined types derived from\n        /// \\c WorldObject are automatically handled. Anything else is\n        /// your problem.\n        template <typename fnT, typename a1T>\n        typename detail::function_enabler<fnT>::type\n        add(ProcessID dest, fnT fn, const a1T& a1, const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T> taskT;\n            if(dest == me)\n                return add(fn, a1, attr);\n            else\n                return send_task<taskT>(dest, fn, am_arg(a1), voidT::value,\n                        voidT::value, voidT::value, voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Invoke `resultT (*fn)(a1T,a2T)` as a task, local or remote.\n\n        /// A future is returned to hold the eventual result of the task.\n        /// \\c Future<void> is an empty class that may be ignored.\n        /// \\tparam fnT A function pointer or functor type.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\param[in] dest The process where the task will be created.\n        /// \\param[in] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types,\n        /// simple STL containers, and pointers to \\c World,\n        /// \\c WorldContainer, and user-defined types derived from\n        /// \\c WorldObject are automatically handled. Anything else is\n        /// your problem.\n        template <typename fnT, typename a1T, typename a2T>\n        typename detail::function_enabler<fnT>::type\n        add(ProcessID dest, fnT fn, const a1T& a1, const a2T& a2,\n                const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T> taskT;\n            if(dest == me)\n                return add(fn, a1, a2, attr);\n            else\n                return send_task<taskT>(dest, fn, am_arg(a1), am_arg(a2),\n                        voidT::value, voidT::value, voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Invoke `resultT (*fn)(a1T,a2T,a3T)` as a task, local or remote.\n\n        /// A future is returned to hold the eventual result of the task.\n        /// \\c Future<void> is an empty class that may be ignored.\n        /// \\tparam fnT A function pointer or functor type.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\param[in] dest The process where the task will be created.\n        /// \\param[in] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types,\n        /// simple STL containers, and pointers to \\c World,\n        /// \\c WorldContainer, and user-defined types derived from\n        /// \\c WorldObject are automatically handled. Anything else is\n        /// your problem.\n        template <typename fnT, typename a1T, typename a2T, typename a3T>\n        typename detail::function_enabler<fnT>::type\n        add(ProcessID dest, fnT fn, const a1T& a1, const a2T& a2, const a3T& a3,\n                const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T> taskT;\n            if(dest == me)\n                return add(fn, a1, a2, a3, attr);\n            else\n                return send_task<taskT>(dest, fn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), voidT::value, voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Invoke `resultT (*fn)(a1T,a2T,a3T,a4T)` as a task, local or remote.\n\n        /// A future is returned to hold the eventual result of the task.\n        /// \\c Future<void> is an empty class that may be ignored.\n        /// \\tparam fnT A function pointer or functor type.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\param[in] dest The process where the task will be created.\n        /// \\param[in] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types,\n        /// simple STL containers, and pointers to \\c World,\n        /// \\c WorldContainer, and user-defined types derived from\n        /// \\c WorldObject are automatically handled. Anything else is\n        /// your problem.\n        template <typename fnT, typename a1T, typename a2T, typename a3T,\n                typename a4T>\n        typename detail::function_enabler<fnT>::type\n        add(ProcessID dest, fnT fn, const a1T& a1, const a2T& a2, const a3T& a3,\n                const a4T& a4, const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T> taskT;\n            if(dest == me)\n                return add(fn, a1, a2, a3, a4, attr);\n            else\n                return send_task<taskT>(dest, fn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), voidT::value, voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Invoke `resultT (*fn)(a1T,a2T,a3T,a4T,a5T)` as a task, local or remote.\n\n        /// A future is returned to hold the eventual result of the task.\n        /// \\c Future<void> is an empty class that may be ignored.\n        /// \\tparam fnT A function pointer or functor type.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\param[in] dest The process where the task will be created.\n        /// \\param[in] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types,\n        /// simple STL containers, and pointers to \\c World,\n        /// \\c WorldContainer, and user-defined types derived from\n        /// \\c WorldObject are automatically handled. Anything else is\n        /// your problem.\n        template <typename fnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T>\n        typename detail::function_enabler<fnT>::type\n        add(ProcessID dest, fnT fn, const a1T& a1, const a2T& a2, const a3T& a3,\n                const a4T& a4, const a5T& a5, const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T, a5T> taskT;\n            if(dest == me)\n                return add(fn, a1, a2, a3, a4, a5, attr);\n            else\n                return send_task<taskT>(dest, fn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), am_arg(a5), voidT::value,\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Invoke `resultT (*fn)(a1T,a2T,a3T,a4T,a5T,a6T)` as a task, local or remote.\n\n        /// A future is returned to hold the eventual result of the task.\n        /// \\c Future<void> is an empty class that may be ignored.\n        /// \\tparam fnT A function pointer or functor type.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\param[in] dest The process where the task will be created.\n        /// \\param[in] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] a6 Argument 6.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types,\n        /// simple STL containers, and pointers to \\c World,\n        /// \\c WorldContainer, and user-defined types derived from\n        /// \\c WorldObject are automatically handled. Anything else is\n        /// your problem.\n        template <typename fnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T>\n        typename detail::function_enabler<fnT>::type\n        add(ProcessID dest, fnT fn, const a1T& a1, const a2T& a2, const a3T& a3,\n                const a4T& a4, const a5T& a5, const a6T& a6,\n                const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T> taskT;\n            if(dest == me)\n                return add(fn, a1, a2, a3, a4, a5, a6, attr);\n            else\n                return send_task<taskT>(dest, fn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), am_arg(a5), am_arg(a6),\n                        voidT::value, voidT::value, voidT::value, attr);\n        }\n\n        /// Invoke `resultT (*fn)(a1T,a2T,a3T,a4T,a5T,a6T,a7T)` as a task, local or remote.\n\n        /// A future is returned to hold the eventual result of the task.\n        /// \\c Future<void> is an empty class that may be ignored.\n        /// \\tparam fnT A function pointer or functor type.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\param[in] dest The process where the task will be created.\n        /// \\param[in] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] a6 Argument 6.\n        /// \\param[in] a7 Argument 7.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types,\n        /// simple STL containers, and pointers to \\c World,\n        /// \\c WorldContainer, and user-defined types derived from\n        /// \\c WorldObject are automatically handled. Anything else is\n        /// your problem.\n        template <typename fnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T>\n        typename detail::function_enabler<fnT>::type\n        add(ProcessID dest, fnT fn, const a1T& a1, const a2T& a2, const a3T& a3,\n                const a4T& a4, const a5T& a5, const a6T& a6, const a7T& a7,\n                const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T, a7T> taskT;\n            if(dest == me)\n                return add(fn, a1, a2, a3, a4, a5, a6, a7, attr);\n            else\n                return send_task<taskT>(dest, fn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), am_arg(a5), am_arg(a6),\n                        am_arg(a7), voidT::value, voidT::value, attr);\n        }\n\n        /// Invoke `resultT (*fn)(a1T,a2T,a3T,a4T,a5T,a6T,a7T,a8T)` as a task, local or remote.\n\n        /// A future is returned to hold the eventual result of the task.\n        /// \\c Future<void> is an empty class that may be ignored.\n        /// \\tparam fnT A function pointer or functor type.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\param[in] dest The process where the task will be created.\n        /// \\param[in] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] a6 Argument 6.\n        /// \\param[in] a7 Argument 7.\n        /// \\param[in] a8 Argument 8.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types,\n        /// simple STL containers, and pointers to \\c World,\n        /// \\c WorldContainer, and user-defined types derived from\n        /// \\c WorldObject are automatically handled. Anything else is\n        /// your problem.\n        template <typename fnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T,\n                typename a8T>\n        typename detail::function_enabler<fnT>::type\n        add(ProcessID dest, fnT fn, const a1T& a1, const a2T& a2, const a3T& a3,\n                const a4T& a4, const a5T& a5, const a6T& a6, const a7T& a7,\n                const a8T& a8, const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T, a7T, a8T> taskT;\n            if(dest == me)\n                return add(fn, a1, a2, a3, a4, a5, a6, a7, a8, attr);\n            else\n                return send_task<taskT>(dest, fn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), am_arg(a5), am_arg(a6),\n                        am_arg(a7), am_arg(a8), voidT::value, attr);\n        }\n\n        /// Invoke `resultT (*fn)(a1T,a2T,a3T,a4T,a5T,a6T,a7T,a8T,a9T)` as a task, local or remote.\n\n        /// A future is returned to hold the eventual result of the task.\n        /// \\c Future<void> is an empty class that may be ignored.\n        /// \\tparam fnT A function pointer or functor type.\n        /// \\tparam a1T Type of argument 1.\n        /// \\tparam a2T Type of argument 2.\n        /// \\tparam a3T Type of argument 3.\n        /// \\tparam a4T Type of argument 4.\n        /// \\tparam a5T Type of argument 5.\n        /// \\tparam a6T Type of argument 6.\n        /// \\tparam a7T Type of argument 7.\n        /// \\tparam a8T Type of argument 8.\n        /// \\tparam a9T Type of argument 9.\n        /// \\param[in] dest The process where the task will be created.\n        /// \\param[in] fn The function to be called in the task.\n        /// \\param[in] a1 Argument 1.\n        /// \\param[in] a2 Argument 2.\n        /// \\param[in] a3 Argument 3.\n        /// \\param[in] a4 Argument 4.\n        /// \\param[in] a5 Argument 5.\n        /// \\param[in] a6 Argument 6.\n        /// \\param[in] a7 Argument 7.\n        /// \\param[in] a8 Argument 8.\n        /// \\param[in] a9 Argument 9.\n        /// \\param[in] attr The task attributes.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types,\n        /// simple STL containers, and pointers to \\c World,\n        /// \\c WorldContainer, and user-defined types derived from\n        /// \\c WorldObject are automatically handled. Anything else is\n        /// your problem.\n        /// \\todo Could we use metaprogramming or variadic templates to reduce all of these instances to one template that generates versions for one more (less) parameter?\n        template <typename fnT, typename a1T, typename a2T, typename a3T,\n                typename a4T, typename a5T, typename a6T, typename a7T,\n                typename a8T, typename a9T>\n        typename detail::function_enabler<fnT>::type\n        add(ProcessID dest, fnT fn, const a1T& a1, const a2T& a2, const a3T& a3,\n                const a4T& a4, const a5T& a5, const a6T& a6, const a7T& a7,\n                const a8T& a8, const a9T& a9, const TaskAttributes& attr=TaskAttributes())\n        {\n            typedef TaskFn<fnT, a1T, a2T, a3T, a4T, a5T, a6T, a7T, a8T, a9T> taskT;\n            if(dest == me)\n                return add(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, attr);\n            else\n                return send_task<taskT>(dest, fn, am_arg(a1), am_arg(a2),\n                        am_arg(a3), am_arg(a4), am_arg(a5), am_arg(a6),\n                        am_arg(a7), am_arg(a8), am_arg(a9), attr);\n        }\n\n        /// Invoke `resultT (obj.*memfn)(args...)` as a local task.\n\n        /// \\todo Verify this documentation.\n        /// A future is returned to hold the eventual result of the task.\n        /// \\c Future<void> is an empty class that may be ignored.\n        /// \\tparam objT The object type.\n        /// \\tparam memfnT The member function type.\n        /// \\tparam argT Variadic template for arguments.\n        /// \\param[in] obj The associated object for invoking the member function pointer.\n        /// \\param[in] memfn The member function pointer.\n        /// \\param[in] args The argument pack.\n        /// \\return A future to the result. If the task function return type\n        /// is \\c void, a \\c Future<void> object is return that may\n        /// be ignored.\n        /// \\note Arguments must be (de)serializable and must of course make\n        /// sense at the remote destination. Fundamental types,\n        /// simple STL containers, and pointers to \\c World,\n        /// \\c WorldContainer, and user-defined types derived from\n        /// \\c WorldObject are automatically handled. Anything else is\n        /// your problem.\n        template <typename objT, typename memfnT, typename... argT>\n        typename detail::memfunc_enabler<objT, memfnT>::type\n        add(objT&& obj, memfnT memfn, argT&&... args)\n        { return add(detail::wrap_mem_fn(std::forward<objT>(obj),memfn), std::forward<argT>(args)...); }\n\n\n\n    private:\n\n        /// \\todo Brief description needed.\n        struct ProbeAllDone {\n            WorldTaskQueue* tq; ///< The task queue.\n\n            /// Construct a \\c ProbeAllDone for a given task queue.\n\n            /// \\param[in] tq Pointer to the task queue.\n            ProbeAllDone(WorldTaskQueue* tq)\n                : tq(tq)\n            {}\n\n            /// Determine if all tasks in the queue are complete.\n\n            /// \\return True if all tasks are complete; false otherwise.\n            bool operator()() const {\n                return (tq->nregistered == 0);\n            }\n        };\n\n    public:\n\n        /// Returns after all local tasks have completed.\n\n        /// While waiting, the calling thread will run tasks.\n        void fence() {\n            try {\n                ThreadPool::await(ProbeAllDone(this), true);\n            } catch(...) {\n                fprintf(stderr, \"!!MADNESS ERROR: Exception thrown in WorldTaskQueue::fence() with %i pending task(s)\\n\", int(nregistered));\n                throw;\n            }\n        }\n    };\n\n    namespace detail {\n\n#ifdef HAVE_INTEL_TBB\n\n        /// Apply an operation to a range of iterators.\n\n        /// \\tparam rangeT The range of iterators type.\n        /// \\tparam opT The operation type.\n        /// This task creates `for_each` tasks and collects information on the\n        /// results of those tasks. Once all tasks have completed it will set\n        /// the result future.\n        template <typename rangeT, typename opT>\n        class ForEachRootTask : public TaskInterface {\n        private:\n            rangeT range_; ///< The range.\n            opT op_; ///< The foreach function.\n            Future<bool> completion_status_; ///< The result of this set of tasks.\n\n        public:\n\n            /// Constructor.\n\n            /// \\param[in] world The world where the tasks will run.\n            /// \\param[in] range The range of iterators.\n            /// \\param[in] op The operation that will be applied to the range of iterators.\n            ForEachRootTask(World&, const rangeT range, const opT& op) :\n                TaskInterface(0, TaskAttributes::hipri()), range_(range), op_(op)\n            { }\n\n            /// Virtual destructor.\n            virtual ~ForEachRootTask() = default;\n\n            /// Result accessor.\n\n            /// \\return A const reference to the result future.\n            const Future<bool>& result() const { return completion_status_; }\n\n            /// Task run work.\n\n            /// Sets the result future based on the status of all iterations.\n            virtual void run(World&, const TaskThreadEnv& ) /*override*/ {\n\n                // Note: We use parallel_reduce instead of parallel_foreach to\n                // accumulate result flags. Otherwise, this logically functions\n                // like parallel_foreach.\n                const bool result =\n                    tbb::parallel_reduce(range_, true,\n                        [this](const rangeT& r, bool init) -> bool {\n                            for(typename rangeT::iterator it = r.begin(); it != r.end();  ++it)\n                                init = init && op_(it);\n                            return init;\n                        },\n                        [](const bool left, const bool right) -> bool {\n                            return left && right;\n                        }\n                    );\n                completion_status_.set(result);\n            }\n\n        private:\n            /// Get the task ID.\n\n            /// \\todo Verify that \\c id is an output parameter.\n            /// \\param[out] id The ID to set for this task.\n            virtual void get_id(std::pair<void*,unsigned short>& id) const {\n                PoolTaskInterface::make_id(id, *this);\n            }\n        }; // class ForEachRootTask\n\n#else\n\n        /// Apply an operation to a range of iterators.\n\n        /// This task will progressively split range, creating leaves for each\n        /// task, until the range of iterators is smaller than the chunk size.\n        /// \\tparam rangeT The range of iterators type.\n        /// \\tparam opT The operation type.\n        template <typename rangeT, typename opT>\n        class ForEachTask : public TaskInterface {\n        private:\n            rangeT range_; ///< The range of iterators.\n            opT op_; ///< The operation to apply to range.\n            ForEachRootTask<rangeT, opT>& root_; ///< The root task that signals completion and status.\n\n            // not allowed\n            ForEachTask(const ForEachTask<rangeT, opT>& fet) = delete;\n            ForEachTask& operator=(const ForEachTask<rangeT, opT>& fet) = delete;\n\n        public:\n\n            /// Constructor.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] range The range of tasks.\n            /// \\param[in] op The operation to perform.\n            /// \\param root Description needed.\n            ForEachTask(const rangeT range, const opT& op, ForEachRootTask<rangeT, opT>& root) :\n                TaskInterface(0, TaskAttributes::hipri()), range_(range), op_(op), root_(root)\n            {\n                // Increment the master task dependency counter for this task\n                root_.inc();\n            }\n\n            /// Virtual destructor.\n            virtual ~ForEachTask() = default;\n\n            /// Run the task.\n\n            /// \\todo Descriptions needed.\n            /// \\param[in] tte Description needed.\n            virtual void run(const TaskThreadEnv& tte) {\n                // Create leaf tasks and split range until it is less than chuncksize\n                while(range_.size() > range_.get_chunksize()) {\n                    rangeT right(range_,Split());\n                    ForEachTask<rangeT,opT>* leaf = new ForEachTask<rangeT,opT>(right, op_, root_);\n                    root_.world().taskq.add(leaf);\n                }\n\n                // Iterate over the remaining chunck of range and call op_ for each element\n                int status = 0;\n                for(typename rangeT::iterator it = range_.begin(); it != range_.end();  ++it)\n                    if(op_(it))\n                        ++status;\n\n                // Notify the root task that this task is done give the status\n                root_.complete(status);\n            }\n\n        private:\n            /// Get the task ID.\n\n            /// \\todo Is \\c id an input and/or output parameter?\n            /// \\param id The ID to set for this task\n            virtual void get_id(std::pair<void*,unsigned short>& id) const {\n                PoolTaskInterface::make_id(id, *this);\n            }\n        }; // class ForEachTask\n\n\n        /// Apply an operation to a range of iterators.\n\n        /// \\tparam rangeT The range of iterators type.\n        /// \\tparam opT The operation type.\n        /// This task creates `for_each` tasks and collects information on the\n        /// results of those tasks. Once all tasks have completed it will set\n        /// the result future.\n        template <typename rangeT, typename opT>\n        class ForEachRootTask : public TaskInterface {\n        private:\n            World& world_; ///< The world where this task will run.\n            AtomicInt status_; ///< Accumulates the status of each iteration.\n            Future<bool> completion_status_; ///< The result of this set of tasks.\n\n        public:\n\n            /// Constructor.\n\n            /// \\param[in] world The world where the tasks will run.\n            /// \\param[in] range The range of iterators.\n            /// \\param[in] op The operation that will be applied to the range of iterators.\n            ForEachRootTask(World& world, const rangeT range, const opT& op) :\n                TaskInterface(0, TaskAttributes::hipri()), world_(world)\n            {\n                status_ = - (range.size());\n                // Create the first for each task.\n                world_.taskq.add(new ForEachTask<rangeT,opT>(range, op, *this));\n            }\n\n            /// Virtual destructor.\n            virtual ~ForEachRootTask() = default;\n\n            /// World accessor.\n\n            /// \\return A reference to the \\c World.\n            World& world() const {\n                return world_;\n            }\n\n            /// Result accessor.\n\n            /// \\return A const reference to the result future.\n            const Future<bool>& result() const {\n                return completion_status_;\n            }\n\n            /// Called by child tasks when they are complete.\n\n            /// \\param[in] status The number of iterations that returned true.\n            void complete(const int status) {\n                status_ += status;\n                DependencyInterface::notify();\n            }\n\n            /// Task run work.\n\n            /// Sets the result future based on the status of all iterations.\n            virtual void run(const TaskThreadEnv&) {\n                completion_status_.set(status_ == 0);\n            }\n\n        private:\n            /// Get the task ID.\n\n            /// \\todo Verify that \\c id is an output parameter.\n            /// \\param[out] id The ID to set for this task.\n            virtual void get_id(std::pair<void*,unsigned short>& id) const {\n                PoolTaskInterface::make_id(id, *this);\n            }\n        }; // class ForEachRootTask\n\n#endif // HAVE_INTEL_TBB\n\n    }  // namespace detail\n\n} // namespace madness\n\n/// @}\n\n#endif // MADNESS_WORLD_WORLD_TASK_QUEUE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldam.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/worldam.h>\n#include <madness/world/MADworld.h>\n#include <madness/world/worldmpi.h>\n#include <sstream>\n\nnamespace madness {\n\n\n\n    WorldAmInterface::WorldAmInterface(World& world)\n            : nsend(DEFAULT_NSEND)\n            , send_req(nullptr)\n            , worldid(0) // worldid is initialized in the World constructor\n            , rank(world.mpi.Get_rank())\n            , nproc(world.mpi.Get_size())\n            , cur_msg(0)\n            , nsent(0)\n            , nrecv(0)\n            , map_to_comm_world(nproc)\n    {\n        lock();\n\n        // Initialize the number of send buffers\n        const char* mad_send_buffs = getenv(\"MAD_SEND_BUFFERS\");\n        if(mad_send_buffs) {\n            std::stringstream ss(mad_send_buffs);\n            ss >> nsend;\n            // Check that the number of send buffers is reasonable.\n            if(nsend < 32) {\n                nsend = DEFAULT_NSEND;\n                std::cerr << \"!!! WARNING: MAD_SEND_BUFFERS must be at least 32.\\n\"\n                          << \"!!! WARNING: Increasing MAD_SEND_BUFFERS to \" << nsend << \".\\n\";\n            }\n        }\n\n        // Allocate send buffers and requests\n        send_req.reset(new SendReq[nsend]);\n\n        for (int i=0; i<nsend; ++i) send_req[i].set((AmArg*) 0,RMI::Request());\n\n        std::vector<int> fred(nproc);\n        for (int i=0; i<nproc; ++i) fred[i] = i;\n        world.mpi.comm().Get_group().Translate_ranks(nproc,\n                                                     &fred[0], SafeMPI::COMM_WORLD.Get_group(),\n                                                     &map_to_comm_world[0]);\n\n        // for (int i=0; i<nproc; ++i) {\n        //     std::cout << \"map \" << i << \" \" << map_to_comm_world[i] << std::endl;\n        // }\n\n        unlock();\n    }\n\n    WorldAmInterface::~WorldAmInterface() {\n        if(!SafeMPI::Is_finalized()) {\n            while (free_managed_buffers() != nsend) myusleep(100);\n        }\n        // otherwise the send buffers are freed when the WorldAMInterface::send_req is freed\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/worldam.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n */\n\n#ifndef MADNESS_WORLD_WORLDAM_H__INCLUDED\n#define MADNESS_WORLD_WORLDAM_H__INCLUDED\n\n/// \\file worldam.h\n/// \\brief Implements active message layer for World on top of RMI layer\n\n#include <madness/world/buffer_archive.h>\n#include <madness/world/worldrmi.h>\n#include <madness/world/world.h>\n#include <vector>\n#include <cstddef>\n#include <memory>\n#include <pthread.h>\n\nnamespace madness {\n\n    /*\n      The RMI layer just does transport and does not know about World\n      or even necessarily about MPI.  It also has no buffering or\n      virtualization of resources.  In particular, we must be careful\n      about having too many outstanding sends and active message\n      handlers must be careful about what they do in order to avoid\n      deadlock --- especially problematic is a handler trying to send\n      a message.\n\n      The WorldAM class provides a World-aware RMI capability that\n      limits the number of outstanding sends and can optionally manage\n      buffers.  The issue of what handlers can do safely is handled by\n      the integration of WorldAM and the task queues ... if you have\n      an operation that might\n\n      - send messages\n\n      - take a long time\n\n      - consume a lot of stack/heap (e.g., recursive algorithm)\n\n      then the right thing to do is to send a task rather than\n      an active message.\n     */\n\n    template <class Derived> class WorldObject;\n\n    class AmArg;\n    /// Type of AM handler functions\n    typedef void (*am_handlerT)(const AmArg&);\n\n    /// World active message that extends an RMI message\n    class AmArg {\n    private:\n        friend class WorldAmInterface;\n        template <class Derived> friend class WorldObject;\n\n        friend AmArg* alloc_am_arg(std::size_t nbyte);\n\n        unsigned char header[RMI::HEADER_LEN]; // !!!!!!!!!  MUST BE FIRST !!!!!!!!!!\n        std::size_t nbyte;      // Size of user payload\n        std::uint64_t worldid;  // Id of associated world\n        std::ptrdiff_t func;    // User function to call, as a relative fn ptr (see archive::to_rel_fn_ptr)\n        ProcessID src;          // Rank of process sending the message\n        unsigned int flags;     // Misc. bit flags\n\n        // On 32 bit machine AmArg is HEADER_LEN+4+4+4+4+4=84 bytes\n        // On 64 bit machine AmArg is HEADER_LEN+8+8+8+4+4=96 bytes\n\n        // No copy constructor or assignment\n        AmArg(const AmArg&);\n        AmArg& operator=(const AmArg&);\n\n        void set_src(ProcessID source) { src = source; }\n\n        void set_worldid(unsigned long id) { worldid = id; }\n\n        void set_func(am_handlerT handler) {\n            MADNESS_ASSERT(handler);\n            func = archive::to_rel_fn_ptr(handler);\n        }\n\n        void set_size(std::size_t numbyte) { nbyte = numbyte; }\n\n        void set_pending() { flags |= 0x1ul; }\n\n        bool is_pending() const { return flags & 0x1ul; }\n\n        void clear_flags() { flags = 0; }\n\n        am_handlerT get_func() const { return archive::to_abs_fn_ptr<am_handlerT>(func); }\n\n        archive::BufferInputArchive make_input_arch() const {\n            return archive::BufferInputArchive(buf(),size());\n        }\n\n        archive::BufferOutputArchive make_output_arch() const {\n            return archive::BufferOutputArchive(buf(),size());\n        }\n\n    public:\n        AmArg() {}\n\n        /// Returns a pointer to the user's payload (aligned in same way as AmArg)\n        unsigned char* buf() const { return (unsigned char*)(this) + sizeof(AmArg); }\n\n        /// Returns the size of the user's payload\n        std::size_t size() const { return nbyte; }\n\n        /// Used to deserialize arguments from incoming message\n        template <typename T>\n        archive::BufferInputArchive operator&(T& t) const {\n            return make_input_arch() & t;\n        }\n\n        /// Used to serialize arguments into outgoing message\n        template <typename T>\n        archive::BufferOutputArchive operator&(const T& t) const {\n            return make_output_arch() & t;\n        }\n\n        /// For incoming AM gives the source process\n        ProcessID get_src() const { return src; }\n\n        // This is not inline in order to keep World opaque.\n        /// For incoming AM gives the associated world\n        World* get_world() const { return World::world_from_id(worldid); }\n\n        /// Return the world id\n        std::uint64_t get_worldid() const { return worldid; }\n    };\n\n\n    /// Allocates a new AmArg with nbytes of user data ... delete with free_am_arg\n    inline AmArg* alloc_am_arg(std::size_t nbyte) {\n        std::size_t narg = 1 + (nbyte+sizeof(AmArg)-1)/sizeof(AmArg);\n        AmArg *arg = new AmArg[narg];\n        arg->set_size(nbyte);\n        return arg;\n    }\n\n\n    inline AmArg* copy_am_arg(const AmArg& arg) {\n        AmArg* r = alloc_am_arg(arg.size());\n        memcpy(reinterpret_cast<void*>(r), &arg, arg.size()+sizeof(AmArg));\n        return r;\n    }\n\n    /// Frees an AmArg allocated with alloc_am_arg\n    inline void free_am_arg(AmArg* arg) {\n        //std::cout << \" freeing amarg \" << (void*)(arg) << \" \" << pthread_self() << std::endl;\n        delete [] arg;\n    }\n\n    /// Terminate argument serialization\n    template <typename Archive>\n    inline void serialize_am_args(Archive&&) { }\n\n    /// Argument serialization\n    template <typename Archive, typename T, typename... argT>\n    inline void serialize_am_args(Archive&& archive, T&& t, argT&&... args) {\n        serialize_am_args(archive & t, std::forward<argT>(args)...);\n    }\n\n    /// Convenience template for serializing arguments into a new AmArg\n    template <typename... argT>\n    inline AmArg* new_am_arg(const argT&... args) {\n        // compute size\n        archive::BufferOutputArchive count;\n        serialize_am_args(count, args...);\n\n        // Serialize arguments\n        AmArg* am_args = alloc_am_arg(count.size());\n        serialize_am_args(*am_args, args...);\n        return am_args;\n    }\n\n\n    /// Implements AM interface\n    class WorldAmInterface : private SCALABLE_MUTEX_TYPE {\n        friend class WorldGopInterface;\n        friend class World;\n    private:\n\n#ifdef HAVE_CRAYXT\n        static const int DEFAULT_NSEND = 512;\n#else\n        static const int DEFAULT_NSEND = 128;\n#endif\n\n        class SendReq : public SPINLOCK_TYPE, public RMISendReq {\n            AmArg* buf;\n            RMI::Request req;\n            void free() {if (buf) {free_am_arg(buf); buf=0;}}\n        public:\n            SendReq() : buf(0) {}\n            SendReq(AmArg* b, const RMI::Request& r) : buf(b), req(r) {} // lock is NOT set\n            void set(AmArg* b, const RMI::Request& r) {buf=b; req=r;} // assumes lock held\n            bool TestAndFree() { // assumes lock held if necessary\n                if (buf) {\n                    bool ok = req.Test(); \n                    if (ok) free(); \n                    return ok;\n                }\n                else {\n                    return true;\n                }\n            }\n            ~SendReq() {free();}\n        };\n\n        // Multiple threads are making their way thru here ... must be careful\n        // to ensure updates are atomic and consistent\n\n        int nsend;                          ///< Max no. of pending sends\n        std::unique_ptr<SendReq []> send_req; ///< Send requests and managed buffers \n        unsigned long worldid;              ///< The world which contains this instance of WorldAmInterface\n        const ProcessID rank;\n        const int nproc;\n        // Next 3 were volatile but no need since protected by spinlock with implied barriers/fence\n        int cur_msg;               ///< Index of next buffer to attempt to use\n        unsigned long nsent;       ///< Counts no. of AM sent for purpose of termination detection\n        unsigned long nrecv;       ///< Counts no. of AM received for purpose of termination detection\n\n        std::vector<int> map_to_comm_world; ///< Maps rank in current MPI communicator to SafeMPI::COMM_WORLD\n\n        /// This handles all incoming RMI messages for all instances\n        static void handler(void *buf, std::size_t nbyte) {\n            // It will be singled threaded since only the RMI receiver\n            // thread will invoke it ... however note that nrecv will\n            // be read by the main thread during fence operations.\n            AmArg* arg = static_cast<AmArg*>(buf);\n            am_handlerT func = arg->get_func();\n            World* w = arg->get_world();\n            MADNESS_ASSERT(arg->size() + sizeof(AmArg) == nbyte);\n            MADNESS_ASSERT(w);\n            MADNESS_ASSERT(func);\n            func(*arg);\n            w->am.nrecv++;  // Must be AFTER execution of the function\n        }\n\n    public:\n        WorldAmInterface(World& world);\n\n        virtual ~WorldAmInterface();\n\n        /// Currently a noop\n        void fence() {}\n\n        /// Sends a managed non-blocking active message\n        void send(ProcessID dest, am_handlerT op, const AmArg* arg,\n                  const int attr=RMI::ATTR_ORDERED)\n        {\n            // Setup the header\n            {\n                AmArg* argx = const_cast<AmArg*>(arg);\n\n                argx->set_worldid(worldid);\n                argx->set_src(rank);\n                argx->set_func(op);\n                argx->clear_flags(); // Is this the right place for this?\n            }\n\n            // Sanity check\n            MADNESS_ASSERT(arg->get_world());\n            MADNESS_ASSERT(arg->get_func());\n\n            // Map dest from world's communicator to comm_world\n            dest = map_to_comm_world[dest];\n\n            // Remaining code refactored to avoid blocking with lock\n            // and to enable finer grained calls into MPI send\n\n            if (RMI::get_this_thread_is_server()) {\n\n                // The server thread may be executing a handler that\n                // is trying to send a message (e.g., assigning a\n                // remote future).  However, the server must not block\n                // in here.  It also needs to send messages in order,\n                // thus it puts all send_reqs onto a queue which it\n                // processes in its main loop using the RMI::send\n                // interface.\n\n                lock(); nsent++; unlock(); // This world must still keep track of messages\n\n                RMI::send_req.emplace_back(std::make_unique<SendReq>((AmArg*)(arg), RMI::isend(arg, arg->size()+sizeof(AmArg), dest, handler, attr)));\n\n                //std::cout << \"sending message from server \" << (void*)(arg) << \" \" << pthread_self() << \" \" << p <<  std::endl;\n\n                return;\n            }\n\n\n            // Find a free buffer oldest first (in order to assist\n            // with flow control).  Exit loop with a lock on buffer.\n\n            // This design will need nsend >= nthreads\n            int i=-1;\n            while (i == -1) {\n                lock();   // << Protect cur_msg and nsent;\n                if (send_req[cur_msg].try_lock()) { // << matching unlock at end of routine\n                    i = cur_msg;\n                    cur_msg = (cur_msg + 1) % nsend;\n                    nsent++;\n                }\n                unlock(); // << Protect cur_msg and nsent;\n            }                \n\n\n            // If the buffer is still in-use wait for it to complete\n            while (!send_req[i].TestAndFree()) {\n                // If the oldest message has still not completed then\n                // there is likely severe network or end-point\n                // congestion, so pause for 100us in a rather\n                // arbitrary attempt to decrease the injection rate.\n                // Both the server thread and this call to Test()\n                // should ensure progress.\n                myusleep(100);\n            }\n\n            // Buffer is now free but still locked by me\n            send_req[i].set((AmArg*)(arg), RMI::isend(arg, arg->size()+sizeof(AmArg), dest, handler, attr));\n            send_req[i].unlock(); // << matches try_lock above\n        }\n\n        /// Frees as many send buffers as possible, returning the number that are free\n        int free_managed_buffers() {\n            int nfree = 0;\n            for (int i=0; i<nsend; i++) {\n                if (send_req[i].try_lock()) { // Someone may be trying to put a message into this buffer\n                    if (send_req[i].TestAndFree()) nfree++;\n                    send_req[i].unlock();     // matching unlock\n                }\n            }\n            return nfree;\n        }\n\n    };\n}\n\n#endif // MADNESS_WORLD_WORLDAM_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worlddc.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_WORLDDC_H__INCLUDED\n#define MADNESS_WORLD_WORLDDC_H__INCLUDED\n\n/*!\n  \\file worlddc.h\n  \\brief Implements WorldContainer\n  \\addtogroup worlddc\n  @{\n\n*/\n\n#include <functional>\n#include <set>\n#include <unordered_set>\n\n\n#include <madness/world/parallel_archive.h>\n#include <madness/world/worldhashmap.h>\n#include <madness/world/mpi_archive.h>\n#include <madness/world/world_object.h>\n#include <madness/world/ranks_and_hosts.h>\n\nnamespace madness\n{\n\n    template <typename keyT, typename valueT, typename hashfunT>\n    class WorldContainer;\n\n    template <typename keyT, typename valueT, typename hashfunT>\n    class WorldContainerImpl;\n\n    template <typename keyT, typename valueT, typename hashfunT>\n    void swap(WorldContainer<keyT, valueT, hashfunT> &, WorldContainer<keyT, valueT, hashfunT> &);\n\n    template <typename keyT>\n    class WorldDCPmapInterface;\n\n    template <typename keyT>\n    class WorldDCRedistributeInterface\n    {\n    public:\n        virtual std::size_t size() const = 0;\n        virtual void redistribute_phase1(const std::shared_ptr<WorldDCPmapInterface<keyT>> &newmap) = 0;\n        virtual void redistribute_phase2() = 0;\n        virtual void redistribute_phase3() = 0;\n        virtual ~WorldDCRedistributeInterface() {};\n    };\n\n    /// some introspection of how data is distributed\n    enum DistributionType {\n        Distributed,            ///< no replication of the container, the container is distributed over the world\n        RankReplicated,         ///< replicate the container over all world ranks\n        NodeReplicated          ///< replicate the container over all hosts (compute nodes), once per node,\n    ///< even if there are several ranks per node\n    };\n\n    template<typename T=long>\n    std::ostream& operator<<(std::ostream& os, const DistributionType type) {\n        if (type==DistributionType::Distributed) os << \"Distributed\";\n        if (type==DistributionType::RankReplicated) os << \"RankReplicated\";\n        if (type==DistributionType::NodeReplicated) os << \"NodeReplicated\";\n        return os;\n    }\n\n    template<typename T=long>\n    std::string to_string(const DistributionType type) {\n        std::stringstream ss; ss << type;\n        return ss.str();\n    }\n\n    template<typename T=long>\n    DistributionType from_string(std::string type) {\n        // to lower case\n        std::transform(type.begin(), type.end(), type.begin(), [](unsigned char c){ return std::tolower(c); });\n        if (type==\"distributed\") return Distributed;\n        if (type==\"rankreplicated\") return RankReplicated;\n        if (type==\"nodereplicated\") return NodeReplicated;\n        std::string msg=\"unknown distribution type:\"+type;\n        MADNESS_EXCEPTION(msg.c_str(),1)\n        return Distributed;\n    }\n\n\n\n    /// Interface to be provided by any process map\n\n    /// NOTE: if the map is not distributed, but replicated, you must override the distribution_type() method.\n    /// \\ingroup worlddc\n    template <typename keyT>\n    class WorldDCPmapInterface\n    {\n    public:\n        typedef WorldDCRedistributeInterface<keyT> *ptrT;\n\n\n    private:\n        std::set<ptrT> ptrs;\n\n    public:\n        /// Maps key to processor\n\n        /// @param[in] key Key for container\n        /// @return Processor that logically owns the key\n        virtual ProcessID owner(const keyT &key) const = 0;\n\n        virtual ~WorldDCPmapInterface() {}\n\n        virtual void print() const {}\n\n        /// by default the map is distributed\n        virtual DistributionType distribution_type() const\n        {\n            return Distributed;\n        }\n\n        /// Registers object for receipt of redistribute callbacks\n\n        /// @param[in] ptr Pointer to class derived from WorldDCRedistributedInterface\n        void register_callback(ptrT ptr)\n        {\n            ptrs.insert(ptr);\n        }\n\n        /// Deregisters object for receipt of redistribute callbacks\n\n        /// @param[in] ptr Pointer to class derived from WorldDCRedistributedInterface\n        void deregister_callback(ptrT ptr)\n        {\n            ptrs.erase(ptr);\n        }\n\n        /// Invoking this switches all registered objects from this process map to the new one\n\n        /// After invoking this routine all objects will be registered with the\n        /// new map and no objects will be registered in the current map.\n        /// @param[in] world The associated world\n        /// @param[in] newpmap The new process map\n        void redistribute(World &world, const std::shared_ptr<WorldDCPmapInterface<keyT>> &newpmap)\n        {\n            print_data_sizes(world, \"before redistributing\");\n            world.gop.fence();\n            for (typename std::set<ptrT>::iterator iter = ptrs.begin();\n                 iter != ptrs.end();\n                 ++iter)\n            {\n                (*iter)->redistribute_phase1(newpmap);\n            }\n            world.gop.fence();\n            for (typename std::set<ptrT>::iterator iter = ptrs.begin();\n                 iter != ptrs.end();\n                 ++iter)\n            {\n                (*iter)->redistribute_phase2();\n                newpmap->register_callback(*iter);\n            }\n            world.gop.fence();\n            for (typename std::set<ptrT>::iterator iter = ptrs.begin();\n                 iter != ptrs.end();\n                 ++iter)\n            {\n                (*iter)->redistribute_phase3();\n            }\n            world.gop.fence();\n            ptrs.clear();\n            newpmap->print_data_sizes(world, \"after redistributing\");\n        }\n\n        /// Counts global number of entries in all containers associated with this process map\n\n        /// Collective operation with global fence\n        std::size_t global_size(World &world) const\n        {\n            world.gop.fence();\n            std::size_t sum = local_size();\n            world.gop.sum(sum);\n            world.gop.fence();\n            return sum;\n        }\n\n        /// Counts local number of entries in all containers associated with this process map\n        std::size_t local_size() const\n        {\n            std::size_t sum = 0;\n            for (typename std::set<ptrT>::iterator iter = ptrs.begin(); iter != ptrs.end(); ++iter)\n            {\n                sum += (*iter)->size();\n            }\n            return sum;\n        }\n\n        /// Prints size info to std::cout\n\n        /// Collective operation with global fence\n        void print_data_sizes(World &world, const std::string msg = \"\") const\n        {\n            world.gop.fence();\n            std::size_t total = global_size(world);\n            std::vector<std::size_t> sizes(world.size());\n            sizes[world.rank()] = local_size();\n            world.gop.sum(&sizes[0], world.size());\n            if (world.rank() == 0)\n            {\n                madness::print(\"data distribution info\", msg);\n                madness::print(\"   total: \", total);\n                std::cout << \"   procs: \";\n                for (int i = 0; i < world.size(); i++)\n                    std::cout << sizes[i] << \" \";\n                std::cout << std::endl;\n            }\n            world.gop.fence();\n        }\n    };\n\n    /// Default process map is \"random\" using madness::hash(key)\n\n    /// \\ingroup worlddc\n    template <typename keyT, typename hashfunT = Hash<keyT>>\n    class WorldDCDefaultPmap : public WorldDCPmapInterface<keyT>\n    {\n    private:\n        const int nproc;\n        hashfunT hashfun;\n\n    public:\n        WorldDCDefaultPmap(World &world, const hashfunT &hf = hashfunT()) : nproc(world.mpi.nproc()),\n                                                                            hashfun(hf)\n        {\n        }\n\n        ProcessID owner(const keyT &key) const\n        {\n            if (nproc == 1)\n                return 0;\n            return hashfun(key) % nproc;\n        }\n    };\n\n    /// Local process map will always return the current process as owner\n\n    /// \\ingroup worlddc\n    template <typename keyT, typename hashfunT = Hash<keyT>>\n    class WorldDCLocalPmap : public WorldDCPmapInterface<keyT>\n    {\n    private:\n        ProcessID me;\n\n    public:\n        WorldDCLocalPmap(World &world) : me(world.rank()) {}\n        ProcessID owner(const keyT &key) const override\n        {\n            return me;\n        }\n\n        DistributionType distribution_type() const override\n        {\n            return RankReplicated;\n        }\n    };\n\n    /// node-replicated map will return the lowest rank on the node as owner\n    ///\n    /// \\ingroup worlddc\n    template <typename keyT, typename hashfunT = Hash<keyT>>\n    class WorldDCNodeReplicatedPmap : public WorldDCPmapInterface<keyT> {\n        ProcessID myowner;\n\n    public:\n        /// ctor makes a map of all ranks to their owners (lowest rank on the host)\n        /// calls a fence\n        /// @param[in] world the associated world\n        explicit WorldDCNodeReplicatedPmap(World& world, const std::map<std::string,std::vector<long>> ranks_per_host) {\n            myowner=lowest_rank_on_host_of_rank(ranks_per_host,world.rank());\n        }\n\n        /// owner is the lowest rank on the node, same for all keys\n        ProcessID owner(const keyT &key) const override {\n            return myowner;\n        }\n\n        DistributionType distribution_type() const override\n        {\n            return NodeReplicated;\n        }\n    };\n\n    /// check distribution type of WorldContainer -- global communication\n    template <typename dcT>\n    DistributionType validate_distribution_type(const dcT& dc)\n    {\n        // assume pmap distribution type is the correct result\n        World& world=dc.get_world();\n        auto result= dc.get_pmap()->distribution_type();\n\n        auto local_size=dc.size();\n        auto global_size=local_size;\n        world.gop.sum(global_size);\n\n        auto number_of_duplicates = [](const std::vector<hashT>& v) {\n            std::unordered_map<hashT, size_t> counts;\n            size_t duplicates = 0;\n            for (const auto& elem : v) {\n                if (++counts[elem] > 1) duplicates++;\n            }\n            return duplicates;\n        };\n\n        // collect all hash vales and determine the number of duplicates\n        std::vector<hashT> all_hashes(local_size);\n        const auto& hashfun=dc.get_hash();\n        int i=0;\n        for (auto it=dc.begin();it!=dc.end();++it,++i) all_hashes[i]=hashfun(it->first);\n        all_hashes=world.gop.concat0(all_hashes);\n        std::size_t ndup=number_of_duplicates(all_hashes);\n        world.gop.broadcast(ndup,0);\n        // print(\"rank, local, global, duplicates\", world.rank(),local_size,global_size,ndup);\n\n        // consistency checks\n        if (result==Distributed) {\n            // all keys should exist only on one process\n            MADNESS_CHECK_THROW(ndup==0,\"WorldDC inconsistent -- distributed has duplicates\");\n        }\n        else if (result==RankReplicated) {\n            // all keys should exist on all processes\n            std::size_t nrank=world.size();\n            MADNESS_CHECK_THROW(global_size==nrank*local_size,\"WorldDC inconsistent\");\n            MADNESS_CHECK_THROW(ndup==local_size*(nrank-1),\"WorldDC inconsistent - duplicates\");\n        }\n        else if (result==NodeReplicated) {\n            // all keys should exist on all nodes, not on all ranks\n            auto ranks_per_host1=ranks_per_host(world);\n            std::vector<int> primary_ranks=primary_ranks_per_host(world,ranks_per_host1);\n            world.gop.broadcast_serializable(primary_ranks,0);\n            world.gop.fence();\n            print(\"primary_rank_per_host\",primary_ranks);\n\n            std::size_t nnodes=primary_ranks.size();\n            bool is_primary=(std::find(primary_ranks.begin(),primary_ranks.end(),world.rank())!=primary_ranks.end());\n\n            if (is_primary) {\n                MADNESS_CHECK_THROW(global_size==(nnodes*local_size),\"WorldDC inconsistent - global size\");\n                MADNESS_CHECK_THROW(ndup==local_size*(nnodes-1),\"WorldDC inconsistent - duplicates\");\n            } else {\n                MADNESS_CHECK_THROW(local_size==0,\"WorldDC inconsistent -- secondary\");\n            }\n        }\n        return result;\n    }\n\n\n    /// Iterator for distributed container wraps the local iterator\n\n    /// \\ingroup worlddc\n    template <class internal_iteratorT>\n    class WorldContainerIterator\n    {\n    public:\n        typedef typename std::iterator_traits<internal_iteratorT>::iterator_category iterator_category;\n        typedef typename std::iterator_traits<internal_iteratorT>::value_type value_type;\n        typedef typename std::iterator_traits<internal_iteratorT>::difference_type difference_type;\n        typedef typename std::iterator_traits<internal_iteratorT>::pointer pointer;\n        typedef typename std::iterator_traits<internal_iteratorT>::reference reference;\n\n    private:\n        internal_iteratorT it; ///< Iterator from local container\n        // TODO: Convert this to a scoped pointer.\n        mutable value_type *value; ///< holds the remote values\n\n    public:\n        /// Default constructor makes a local uninitialized value\n        explicit WorldContainerIterator()\n            : it(), value(nullptr) {}\n\n        /// Initializes from a local iterator\n        explicit WorldContainerIterator(const internal_iteratorT &it)\n            : it(it), value(nullptr) {}\n\n        /// Initializes to cache a remote value\n        explicit WorldContainerIterator(const value_type &v)\n            : it(), value(nullptr)\n        {\n            value = new value_type(v);\n        }\n\n        WorldContainerIterator(const WorldContainerIterator &other)\n            : it(), value(nullptr)\n        {\n            copy(other);\n        }\n\n        template <class iteratorT>\n        WorldContainerIterator(const WorldContainerIterator<iteratorT> &other)\n            : it(), value(nullptr)\n        {\n            copy(other);\n        }\n\n        ~WorldContainerIterator()\n        {\n            delete value;\n        }\n\n        /// Assignment\n        WorldContainerIterator &operator=(const WorldContainerIterator &other)\n        {\n            copy(other);\n            return *this;\n        }\n\n        /// Determines if two iterators are identical\n        bool operator==(const WorldContainerIterator &other) const\n        {\n            return (((!is_cached()) && (!other.is_cached())) && it == other.it) ||\n                   ((is_cached() && other.is_cached()) && value->first == other.value->first);\n        }\n\n        /// Determines if two iterators are different\n        bool operator!=(const WorldContainerIterator &other) const\n        {\n            return !(*this == other);\n        }\n\n        /// Pre-increment of an iterator (i.e., ++it) --- \\em local iterators only\n\n        /// Trying to increment a remote iterator will throw\n        WorldContainerIterator &operator++()\n        {\n            MADNESS_ASSERT(!is_cached());\n            ++it;\n            return *this;\n        }\n\n        WorldContainerIterator operator++(int)\n        {\n            MADNESS_ASSERT(!is_cached());\n            WorldContainerIterator<internal_iteratorT> result(*this);\n            ++it;\n            return result;\n        }\n\n        /// Iterators dereference to std::pair<const keyT,valueT>\n        pointer operator->() const\n        {\n            return (is_cached() ? value : it.operator->());\n        }\n\n        /// Iterators dereference to std::pair<const keyT,valueT>\n        reference operator*() const\n        {\n            return (is_cached() ? *value : *it);\n        }\n\n        /// Private: (or should be) Returns iterator of internal container\n        const internal_iteratorT &get_internal_iterator() const\n        {\n            return it;\n        }\n\n        /// Returns true if this is non-local or cached value\n        bool is_cached() const\n        {\n            return value != nullptr;\n        }\n\n        template <typename Archive>\n        void serialize(const Archive &)\n        {\n            MADNESS_EXCEPTION(\"Serializing DC iterator ... why?\", false);\n        }\n\n    private:\n        template <class iteratorT>\n        friend class WorldContainerIterator;\n\n        template <class iteratorT>\n        void copy(const WorldContainerIterator<iteratorT> &other)\n        {\n            if (static_cast<const void *>(this) != static_cast<const void *>(&other))\n            {\n                delete value;\n                if (other.is_cached())\n                {\n                    value = new value_type(*other.value);\n                    it = internal_iteratorT();\n                }\n                else\n                {\n                    it = other.it;\n                    value = nullptr;\n                }\n            }\n        }\n    };\n\n    /// Internal implementation of distributed container to facilitate shallow copy\n\n    /// \\ingroup worlddc\n    template <typename keyT, typename valueT, typename hashfunT>\n    class WorldContainerImpl\n        : public WorldObject<WorldContainerImpl<keyT, valueT, hashfunT>>,\n          public WorldDCRedistributeInterface<keyT>\n#ifndef MADNESS_DISABLE_SHARED_FROM_THIS\n        ,\n          public std::enable_shared_from_this<WorldContainerImpl<keyT, valueT, hashfunT>>\n#endif // MADNESS_DISABLE_SHARED_FROM_THIS\n    {\n    public:\n        typedef typename std::pair<const keyT, valueT> pairT;\n        typedef const pairT const_pairT;\n        typedef WorldContainerImpl<keyT, valueT, hashfunT> implT;\n\n        typedef ConcurrentHashMap<keyT, valueT, hashfunT> internal_containerT;\n\n        // typedef WorldObject< WorldContainerImpl<keyT, valueT, hashfunT> > worldobjT;\n\n        typedef typename internal_containerT::iterator internal_iteratorT;\n        typedef typename internal_containerT::const_iterator internal_const_iteratorT;\n        typedef typename internal_containerT::accessor accessor;\n        typedef typename internal_containerT::const_accessor const_accessor;\n        typedef WorldContainerIterator<internal_iteratorT> iteratorT;\n        typedef WorldContainerIterator<internal_iteratorT> iterator;\n        typedef WorldContainerIterator<internal_const_iteratorT> const_iteratorT;\n        typedef WorldContainerIterator<internal_const_iteratorT> const_iterator;\n\n        friend class WorldContainer<keyT, valueT, hashfunT>;\n\n        //         template <typename containerT, typename datumT>\n        //         inline\n        //         static\n        //         typename containerT::iterator replace(containerT& c, const datumT& d) {\n        //             std::pair<typename containerT::iterator,bool> p = c.insert(d);\n        //             if (!p.second) p.first->second = d.second;   // Who's on first?\n        //             return p.first;\n        //         }\n\n    private:\n        WorldContainerImpl(); // Inhibit default constructor\n\n        std::shared_ptr<WorldDCPmapInterface<keyT>> pmap; ///< Function/class to map from keys to owning process\n        const ProcessID me;                               ///< My MPI rank\n        internal_containerT local;                        ///< Locally owned data\n        std::vector<keyT> *move_list;                     ///< Tempoary used to record data that needs redistributing\n\n        /// Handles find request\n        void find_handler(ProcessID requestor, const keyT &key, const RemoteReference<FutureImpl<iterator>> &ref)\n        {\n            internal_iteratorT r = local.find(key);\n            if (r == local.end())\n            {\n                // print(\"find_handler: failure:\", key);\n                this->send(requestor, &implT::find_failure_handler, ref);\n            }\n            else\n            {\n                // print(\"find_handler: success:\", key, r->first, r->second);\n                this->send(requestor, &implT::find_success_handler, ref, *r);\n            }\n        }\n\n        /// Handles successful find response\n        void find_success_handler(const RemoteReference<FutureImpl<iterator>> &ref, const pairT &datum)\n        {\n            FutureImpl<iterator> *f = ref.get();\n            f->set(iterator(datum));\n            // print(\"find_success_handler: success:\", datum.first, datum.second, f->get()->first, f->get()->second);\n            //  Todo: Look at this again.\n            //            ref.reset(); // Matching inc() in find() where ref was made\n        }\n\n        /// Handles unsuccessful find response\n        void find_failure_handler(const RemoteReference<FutureImpl<iterator>> &ref)\n        {\n            FutureImpl<iterator> *f = ref.get();\n            f->set(end());\n            // print(\"find_failure_handler\");\n            //  Todo: Look at this again.\n            //            ref.reset(); // Matching inc() in find() where ref was made\n        }\n\n    public:\n        WorldContainerImpl(World &world,\n                           const std::shared_ptr<WorldDCPmapInterface<keyT>> &pm,\n                           const hashfunT &hf)\n            : WorldObject<WorldContainerImpl<keyT, valueT, hashfunT>>(world), pmap(pm), me(world.mpi.rank()), local(5011, hf)\n        {\n            pmap->register_callback(this);\n        }\n\n        virtual ~WorldContainerImpl()\n        {\n            pmap->deregister_callback(this);\n        }\n\n        const std::shared_ptr<WorldDCPmapInterface<keyT>> &get_pmap() const\n        {\n            return pmap;\n        }\n\n        std::shared_ptr<WorldDCPmapInterface<keyT>> &get_pmap()\n        {\n            return pmap;\n        }\n\n        void reset_pmap_to_local()\n        {\n            pmap->deregister_callback(this);\n            pmap.reset(new WorldDCLocalPmap<keyT>(this->get_world()));\n            pmap->register_callback(this);\n        }\n\n        /// replicates this WorldContainer on all ProcessIDs and generates a\n        /// ProcessMap where all nodes are local\n        void replicate(bool fence) {\n            World &world = this->get_world();\n            pmap->deregister_callback(this);\n            pmap.reset(new WorldDCLocalPmap<keyT>(world));\n            pmap->register_callback(this);\n\n            do_replicate(world);\n            if (fence) world.gop.fence();\n        }\n\n        /// replicates this WorldContainer on all hosts and generates a\n        /// ProcessMap where all nodes are host-local (not rank-local)\n        /// will always fence\n        void replicate_on_hosts(bool fence) {\n            MADNESS_CHECK(fence);\n\n            /// print in rank-order\n//            auto oprint = [&](World& world, auto &&... args) {\n//                world.gop.fence();\n//                for (int r=0; r<world.size(); ++r) {\n//                    if (r==world.rank()) {\n//                        std::cout << \"rank \" << world.rank() << \": \";\n//                        print(std::forward<decltype(args)>(args)...);\n//                    }\n//                    world.gop.fence();\n//                }\n//            };\n\n            World &world = this->get_world();\n\n            // find primary ranks per host (lowest rank on each host)\n            auto ranks_per_host1=ranks_per_host(world);\n            std::vector<int> primary_ranks=primary_ranks_per_host(world,ranks_per_host1);\n            world.gop.broadcast_serializable(primary_ranks,0);\n            world.gop.fence();\n\n//            auto sizes =[&](std::string msg) {\n//                world.gop.fence();\n//                auto local_size=size();\n//                auto global_size=local_size;\n//                world.gop.sum(global_size);\n//                oprint(world,\"rank, local, global\",msg, world.rank(),local_size,global_size);\n//                world.gop.fence();\n//            };\n\n            // change pmap to replicated\n            pmap->deregister_callback(this);\n            pmap.reset(new WorldDCLocalPmap<keyT>(world));\n            pmap->register_callback(this);\n\n            // shortcut: replace pmap and return\n            if (world.size()==1) {\n                // change pmap to node replicated\n                pmap->deregister_callback(this);\n                pmap.reset(new WorldDCNodeReplicatedPmap<keyT>(world,ranks_per_host1));\n                pmap->register_callback(this);\n                return;\n            }\n            world.gop.fence();\n\n            // get a list of all other ranks that are not primary\n            std::vector<int> secondary_ranks;\n            for (int r=0; r<world.size(); ++r) {\n                if (std::find(primary_ranks.begin(),primary_ranks.end(),r)==primary_ranks.end())\n                    secondary_ranks.push_back(r);\n            }\n\n            // phase 1: for all ranks send data to the lowest rank on host\n\n            // step 1-2: send data to lowest rank on host (which will become the owner)\n            long myowner = lowest_rank_on_host_of_rank(ranks_per_host1, world.rank());\n            // oprint(world,\"my owner, size:\", myowner,size());\n            if (world.rank() != myowner) {\n                // send data to myowner\n                for (auto it = begin(); it != end(); ++it) {\n                    keyT key = it->first;\n                    valueT value = it->second;\n                    this->send(myowner,&implT::insert,pairT(key,value));\n                    // insert(pairT(key,value));        // this won't work with LocalPmap\n                }\n                // remove all local data after sending\n                // clear();\n            }\n            // need a fence here to make sure send is finished\n            world.gop.fence();\n            // sizes(\"after step 1, before clear\");\n            // world.gop.fence();\n            if (world.rank()!=myowner) clear();\n            world.gop.fence();\n            // sizes(\"after step 1\");\n\n            // change pmap to replicated\n            pmap->deregister_callback(this);\n            pmap.reset(new WorldDCNodeReplicatedPmap<keyT>(world,ranks_per_host1));\n            pmap->register_callback(this);\n\n            // check if this rank is in the primary list\n            bool i_am_in_primary_list=world.rank()==myowner;\n            if (i_am_in_primary_list) {\n\n                // step 2-1: create a world with only the primary ranks and replicate there (see test_world.cc)\n\n                SafeMPI::Group primary_group = world.mpi.comm().Get_group().Incl(primary_ranks.size(), &primary_ranks[0]);\n                SafeMPI::Intracomm comm_primary = world.mpi.comm().Create(primary_group);\n                // step 2-2: replicate in the primary world\n                {\n                    World world_primary(comm_primary);\n                    // auto ranks_per_host1=ranks_per_host(world_primary);\n                    // if (world_primary.rank()==0) {\n                    //     print(\"host/rank map in primary world:\");\n                    //     for (auto& p : ranks_per_host1) print(p.first, p.second);\n                    // }\n\n                    world_primary.gop.fence();              // this fence seems necessary, why??\n                    do_replicate(world_primary);\n                    world_primary.gop.fence();\n                }\n            } else {\n                // need this to avoid deadlock in MPI_Comm_create (why??)\n                SafeMPI::Group secondary_group = world.mpi.comm().Get_group().Incl(secondary_ranks.size(), &secondary_ranks[0]);\n                SafeMPI::Intracomm comm_secondary = world.mpi.comm().Create(secondary_group);\n            }\n\n            // phase 3: done\n            if (fence) world.gop.fence();\n            // validate_distribution_type(*this);\n        }\n\n        void do_replicate(World& world) {\n            for (ProcessID rank = 0; rank < world.size(); rank++)\n            {\n                if (rank == world.rank())\n                {\n                    std::size_t sz = size();\n                    world.gop.broadcast_serializable(sz, rank);\n\n                    for (auto it = begin(); it != end(); ++it)\n                    {\n                        keyT key = it->first;\n                        valueT value = it->second;\n                        world.gop.broadcast_serializable(key, rank);\n                        world.gop.broadcast_serializable(value, rank);\n                    }\n                }\n                else\n                {\n                    size_t sz;\n                    world.gop.broadcast_serializable(sz, rank);\n                    for (size_t i = 0; i < sz; i++)\n                    {\n                        keyT key;\n                        valueT value;\n                        world.gop.broadcast_serializable(key, rank);\n                        world.gop.broadcast_serializable(value, rank);\n                        insert(pairT(key, value));\n                    }\n                }\n            }\n        }\n\n        const hashfunT &get_hash() const { return local.get_hash(); }\n\n        bool is_local(const keyT &key) const\n        {\n            return owner(key) == me;\n        }\n\n        ProcessID owner(const keyT &key) const\n        {\n            return pmap->owner(key);\n        }\n\n        bool probe(const keyT &key) const\n        {\n            ProcessID dest = owner(key);\n            if (dest == me)\n                return local.find(key) != local.end();\n            else\n                return false;\n        }\n\n        std::size_t size() const\n        {\n            return local.size();\n        }\n\n        void insert(const pairT &datum)\n        {\n            ProcessID dest = owner(datum.first);\n            if (dest == me)\n            {\n                // Was using iterator ... try accessor ?????\n                accessor acc;\n                // N.B. key might already exist if want to simply replace\n                [[maybe_unused]] auto inserted = local.insert(acc, datum.first);\n                acc->second = datum.second;\n            }\n            else\n            {\n                // Must be send (not task) for sequential consistency (and relies on single-threaded remote server)\n                this->send(dest, &implT::insert, datum);\n            }\n        }\n\n        bool insert_acc(accessor &acc, const keyT &key)\n        {\n            MADNESS_ASSERT(owner(key) == me);\n            return local.insert(acc, key);\n        }\n\n        bool insert_const_acc(const_accessor &acc, const keyT &key)\n        {\n            MADNESS_ASSERT(owner(key) == me);\n            return local.insert(acc, key);\n        }\n\n        void clear()\n        {\n            local.clear();\n        }\n\n        void erase(const keyT &key)\n        {\n            ProcessID dest = owner(key);\n            if (dest == me)\n            {\n                [[maybe_unused]] auto erased = local.try_erase(key);\n                MADNESS_ASSERT(erased);\n            }\n            else\n            {\n                void (implT::*eraser)(const keyT &) = &implT::erase;\n                this->send(dest, eraser, key);\n            }\n        }\n\n        template <typename InIter>\n        void erase(InIter it)\n        {\n            MADNESS_ASSERT(!it.is_cached());\n            MADNESS_ASSERT(it != end());\n            erase(it->first);\n        }\n\n        template <typename InIter>\n        void erase(InIter first, InIter last)\n        {\n            InIter it = first;\n            do\n            {\n                first++;\n                erase(it->first);\n                it = first;\n            } while (first != last);\n        }\n\n        iterator begin()\n        {\n            return iterator(local.begin());\n        }\n\n        const_iterator begin() const\n        {\n            return const_iterator(local.begin());\n        }\n\n        iterator end()\n        {\n            return iterator(local.end());\n        }\n\n        const_iterator end() const\n        {\n            return const_iterator(local.end());\n        }\n\n        Future<const_iterator> find(const keyT &key) const\n        {\n            // Ugliness here to avoid replicating find() and\n            // associated handlers for const.  Assumption is that\n            // const and non-const iterators are identical except for\n            // const attribute ... at some point probably need to do\n            // the right thing.\n            Future<iterator> r = const_cast<implT *>(this)->find(key);\n            return *(Future<const_iterator> *)(&r);\n        }\n\n        Future<iterator> find(const keyT &key)\n        {\n            ProcessID dest = owner(key);\n            if (dest == me)\n            {\n                return Future<iterator>(iterator(local.find(key)));\n            }\n            else\n            {\n                Future<iterator> result;\n                this->send(dest, &implT::find_handler, me, key, result.remote_ref(this->get_world()));\n                return result;\n            }\n        }\n\n        bool find(accessor &acc, const keyT &key)\n        {\n            if (owner(key) != me)\n                return false;\n            return local.find(acc, key);\n        }\n\n        bool find(const_accessor &acc, const keyT &key) const\n        {\n            if (owner(key) != me)\n                return false;\n            return local.find(acc, key);\n        }\n\n        // Used to forward call to item member function\n        template <typename memfunT>\n        MEMFUN_RETURNT(memfunT)\n        itemfun(const keyT &key, memfunT memfun)\n        {\n            accessor acc;\n            // N.B. key may already exist, this is just to ensure lock is held by acc\n            [[maybe_unused]] auto inserted = local.insert(acc, key);\n            return (acc->second.*memfun)();\n        }\n\n        // Used to forward call to item member function\n        template <typename memfunT, typename arg1T>\n        MEMFUN_RETURNT(memfunT)\n        itemfun(const keyT &key, memfunT memfun, const arg1T &arg1)\n        {\n            accessor acc;\n            // N.B. key may already exist, this is just to ensure lock is held by acc\n            [[maybe_unused]] auto inserted = local.insert(acc, key);\n            return (acc->second.*memfun)(arg1);\n        }\n\n        // Used to forward call to item member function\n        template <typename memfunT, typename arg1T, typename arg2T>\n        MEMFUN_RETURNT(memfunT)\n        itemfun(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2)\n        {\n            accessor acc;\n            // N.B. key may already exist, this is just to ensure lock is held by acc\n            [[maybe_unused]] auto inserted = local.insert(acc, key);\n            return (acc->second.*memfun)(arg1, arg2);\n        }\n\n        // Used to forward call to item member function\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T>\n        MEMFUN_RETURNT(memfunT)\n        itemfun(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3)\n        {\n            accessor acc;\n            // N.B. key may already exist, this is just to ensure lock is held by acc\n            [[maybe_unused]] auto inserted = local.insert(acc, key);\n            return (acc->second.*memfun)(arg1, arg2, arg3);\n        }\n\n        // Used to forward call to item member function\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T>\n        MEMFUN_RETURNT(memfunT)\n        itemfun(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4)\n        {\n            accessor acc;\n            // N.B. key may already exist, this is just to ensure lock is held by acc\n            [[maybe_unused]] auto inserted = local.insert(acc, key);\n            return (acc->second.*memfun)(arg1, arg2, arg3, arg4);\n        }\n\n        // Used to forward call to item member function\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T>\n        MEMFUN_RETURNT(memfunT)\n        itemfun(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5)\n        {\n            accessor acc;\n            // N.B. key may already exist, this is just to ensure lock is held by acc\n            [[maybe_unused]] auto inserted = local.insert(acc, key);\n            return (acc->second.*memfun)(arg1, arg2, arg3, arg4, arg5);\n        }\n\n        // Used to forward call to item member function\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T, typename arg6T>\n        MEMFUN_RETURNT(memfunT)\n        itemfun(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5, const arg6T &arg6)\n        {\n            accessor acc;\n            // N.B. key may already exist, this is just to ensure lock is held by acc\n            [[maybe_unused]] auto inserted = local.insert(acc, key);\n            return (acc->second.*memfun)(arg1, arg2, arg3, arg4, arg5, arg6);\n        }\n\n        // Used to forward call to item member function\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T, typename arg6T, typename arg7T>\n        MEMFUN_RETURNT(memfunT)\n        itemfun(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3,\n                const arg4T &arg4, const arg5T &arg5, const arg6T &arg6, const arg7T &arg7)\n        {\n            accessor acc;\n            // N.B. key may already exist, this is just to ensure lock is held by acc\n            [[maybe_unused]] auto inserted = local.insert(acc, key);\n            return (acc->second.*memfun)(arg1, arg2, arg3, arg4, arg5, arg6, arg7);\n        }\n\n        // First phase of redistributions changes pmap and makes list of stuff to move\n        void redistribute_phase1(const std::shared_ptr<WorldDCPmapInterface<keyT>> &newpmap)\n        {\n            pmap = newpmap;\n            move_list = new std::vector<keyT>();\n            for (typename internal_containerT::iterator iter = local.begin(); iter != local.end(); ++iter)\n            {\n                if (owner(iter->first) != me)\n                    move_list->push_back(iter->first);\n            }\n        }\n\n        struct P2Op\n        {\n            implT *impl;\n            typedef Range<typename std::vector<keyT>::const_iterator> rangeT;\n            P2Op(implT *impl) : impl(impl) {}\n            P2Op(const P2Op &p) : impl(p.impl) {}\n            bool operator()(typename rangeT::iterator &iterator) const\n            {\n                typename internal_containerT::iterator iter = impl->local.find(*iterator);\n                MADNESS_ASSERT(iter != impl->local.end());\n\n                // impl->insert(*iter);\n                impl->task(impl->owner(*iterator), &implT::insert, *iter);\n\n                impl->local.erase(iter); // delete local copy of the data\n                return true;\n            }\n        };\n\n        // Second phase moves data\n        void redistribute_phase2()\n        {\n            this->get_world().taskq.for_each(typename P2Op::rangeT(move_list->begin(), move_list->end()), P2Op(this));\n            // std::vector<keyT>& mvlist = *move_list;\n            // for (unsigned int i=0; i<move_list->size(); ++i) {\n            //     typename internal_containerT::iterator iter = local.find(mvlist[i]);\n            //     MADNESS_ASSERT(iter != local.end());\n            //     insert(*iter);\n            //     local.erase(iter);\n            // }\n            // delete move_list;\n        }\n\n        // Third phase cleans up\n        void redistribute_phase3()\n        {\n            delete move_list;\n        }\n    };\n\n    /// Makes a distributed container with specified attributes\n\n    /// \\ingroup worlddc\n    ///\n    /// There is no communication or syncronization associated with\n    /// making a new container, but every process must invoke the\n    /// constructor for each container in the same order.  This is so\n    /// that we can assign each container a unique ID without any\n    /// communication.  Since remotely invoked operations may start\n    /// happening before local construction, messages on not yet\n    /// constructed containers are buffered pending construction.\n    ///\n    /// Similarly, when a container is destroyed, the actual\n    /// destruction is deferred until a synchronization point\n    /// (world.gop.fence()) in order to eliminate the need to fence\n    /// before destroying every container.\n    ///\n    /// The distribution of data between processes is controlled by\n    /// the process map (Pmap) class.  The default is uniform\n    /// hashing based upon a strong (Bob Jenkins, lookup3) bytewise\n    /// hash of the key.\n    ///\n    /// All operations, including constructors and destructors, are\n    /// non-blocking and return immediately.  If communication occurs\n    /// it is asynchronous, otherwise operations are local.\n    template <typename keyT, typename valueT, typename hashfunT = Hash<keyT>>\n    class WorldContainer : public archive::ParallelSerializableObject\n    {\n    public:\n        // access keyT and valueT types for serialization\n        typedef keyT key_type;\n        typedef WorldContainer<keyT, valueT, hashfunT> containerT;\n        typedef WorldContainerImpl<keyT, valueT, hashfunT> implT;\n        typedef typename implT::pairT pairT;\n        typedef typename implT::iterator iterator;\n        typedef typename implT::const_iterator const_iterator;\n        typedef typename implT::accessor accessor;\n        typedef typename implT::const_accessor const_accessor;\n        typedef Future<iterator> futureT;\n        typedef Future<const_iterator> const_futureT;\n\n    private:\n        std::shared_ptr<implT> p;\n\n        inline void check_initialized() const\n        {\n            MADNESS_ASSERT(p);\n        }\n\n    public:\n        /// Makes an uninitialized container (no communication)\n\n        /// The container is useless until assigned to from a fully\n        /// constructed container.  There is no need to worry about\n        /// default constructors being executed in order.\n        WorldContainer()\n            : p()\n        {\n        }\n\n        /// Makes an initialized, empty container with default data distribution (no communication)\n\n        /// A unique ID is associated with every distributed container\n        /// within a world.  In order to avoid synchronization when\n        /// making a container, we have to assume that all processes\n        /// execute this constructor in the same order (does not apply\n        /// to the non-initializing, default constructor).\n        WorldContainer(World &world, bool do_pending = true, const hashfunT &hf = hashfunT())\n            : p(new implT(world,\n                          std::shared_ptr<WorldDCPmapInterface<keyT>>(new WorldDCDefaultPmap<keyT, hashfunT>(world, hf)),\n                          hf))\n        {\n            if (do_pending)\n                p->process_pending();\n        }\n\n        /// Makes an initialized, empty container (no communication)\n\n        /// A unique ID is associated with every distributed container\n        /// within a world.  In order to avoid synchronization when\n        /// making a container, we have to assume that all processes\n        /// execute this constructor in the same order (does not apply\n        /// to the non-initializing, default constructor).\n        WorldContainer(World &world,\n                       const std::shared_ptr<WorldDCPmapInterface<keyT>> &pmap,\n                       bool do_pending = true,\n                       const hashfunT &hf = hashfunT())\n            : p(new implT(world, pmap, hf))\n        {\n            if (do_pending)\n                p->process_pending();\n        }\n\n        /// Copy constructor is shallow (no communication)\n\n        /// The copy refers to exactly the same container as other\n        /// which must be initialized.\n        WorldContainer(const WorldContainer &other)\n            : p(other.p)\n        {\n            check_initialized();\n        }\n\n        /// Assignment is shallow (no communication)\n\n        /// The copy refers to exactly the same container as other\n        /// which must be initialized.\n        containerT &operator=(const containerT &other)\n        {\n            if (this != &other)\n            {\n                other.check_initialized();\n                p = other.p;\n            }\n            return *this;\n        }\n\n        /// return the way data is distributed\n        DistributionType get_distribution_type() const {\n            if (!p) MADNESS_EXCEPTION(\"Uninitialized container\", false);\n            return p->get_pmap()->distribution_type();\n        }\n\n        bool is_distributed() const {\n            return get_distribution_type()==Distributed;\n        }\n\n        bool is_replicated() const {\n            return get_distribution_type()==RankReplicated;\n        }\n\n        bool is_host_replicated() const {\n            return get_distribution_type()==NodeReplicated;\n        }\n\n        /// Returns the world associated with this container\n        World &get_world() const\n        {\n            check_initialized();\n            return p->get_world();\n        }\n\n        std::shared_ptr<WorldDCPmapInterface<keyT>> &get_impl()\n        {\n            check_initialized();\n            return p;\n        }\n\n        /// replicates this WorldContainer on all ProcessIDs\n        void replicate(bool fence = true)\n        {\n            p->replicate(fence);\n        }\n\n        /// replicates this WorldContainer on all hosts (one PID per host)\n        void replicate_on_hosts(bool fence = true)\n        {\n            p->replicate_on_hosts(fence);\n        }\n\n        /// Inserts/replaces key+value pair (non-blocking communication if key not local)\n        void replace(const pairT &datum)\n        {\n            check_initialized();\n            p->insert(datum);\n        }\n\n        /// Inserts/replaces key+value pair (non-blocking communication if key not local)\n        void replace(const keyT &key, const valueT &value)\n        {\n            replace(pairT(key, value));\n        }\n\n        /// Write access to LOCAL value by key. Returns true if found, false otherwise (always false for remote).\n        bool find(accessor &acc, const keyT &key)\n        {\n            check_initialized();\n            return p->find(acc, key);\n        }\n\n        /// Read access to LOCAL value by key. Returns true if found, false otherwise (always false for remote).\n        bool find(const_accessor &acc, const keyT &key) const\n        {\n            check_initialized();\n            return p->find(acc, key);\n        }\n\n        /// Write access to LOCAL value by key. Returns true if inserted, false if already exists (throws if remote)\n        bool insert(accessor &acc, const keyT &key)\n        {\n            check_initialized();\n            return p->insert_acc(acc, key);\n        }\n\n        /// Read access to LOCAL value by key. Returns true if inserted, false if already exists (throws if remote)\n        bool insert(const_accessor &acc, const keyT &key)\n        {\n            check_initialized();\n            return p->insert_acc(acc, key);\n        }\n\n        /// Inserts pairs (non-blocking communication if key(s) not local)\n        template <typename input_iterator>\n        void replace(input_iterator &start, input_iterator &end)\n        {\n            check_initialized();\n            using std::placeholders::_1;\n            std::for_each(start, end, std::bind(this, std::mem_fn(&containerT::insert), _1));\n        }\n\n        /// Returns true if local data is immediately available (no communication)\n        bool probe(const keyT &key) const\n        {\n            check_initialized();\n            return p->probe(key);\n        }\n\n        /// Returns processor that logically owns key (no communication)\n\n        /// Local remapping may have changed its physical location, but all\n        /// operations should forward correctly.\n        inline ProcessID owner(const keyT &key) const\n        {\n            check_initialized();\n            return p->owner(key);\n        }\n\n        /// Returns true if the key maps to the local processor (no communication)\n        bool is_local(const keyT &key) const\n        {\n            check_initialized();\n            return p->is_local(key);\n        }\n\n        /// Returns a future iterator (non-blocking communication if key not local)\n\n        /// Like an std::map an iterator \"points\" to an std::pair<const keyT,valueT>.\n        ///\n        /// Refer to Future for info on how to avoid blocking.\n        Future<iterator> find(const keyT &key)\n        { //\n            check_initialized();\n            return p->find(key);\n        }\n\n        /// Returns a future iterator (non-blocking communication if key not local)\n\n        /// Like an std::map an iterator \"points\" to an std::pair<const keyT,valueT>.\n        ///\n        /// Refer to Future for info on how to avoid blocking.\n        Future<const_iterator> find(const keyT &key) const\n        {\n            check_initialized();\n            return const_cast<const implT *>(p.get())->find(key);\n        }\n\n        /// Returns an iterator to the beginning of the \\em local data (no communication)\n        iterator begin()\n        {\n            check_initialized();\n            return p->begin();\n        }\n\n        /// Returns an iterator to the beginning of the \\em local data (no communication)\n        const_iterator begin() const\n        {\n            check_initialized();\n            return const_cast<const implT *>(p.get())->begin();\n        }\n\n        /// Returns an iterator past the end of the \\em local data (no communication)\n        iterator end()\n        {\n            check_initialized();\n            return p->end();\n        }\n\n        /// Returns an iterator past the end of the \\em local data (no communication)\n        const_iterator end() const\n        {\n            check_initialized();\n            return const_cast<const implT *>(p.get())->end();\n        }\n\n        /// Erases entry from container (non-blocking comm if remote)\n\n        /// Missing keys are quietly ignored.\n        ///\n        /// Note that erasing an entry may invalidate iterators on the\n        /// remote end.  This is just the same as what happens when\n        /// using STL iterators on an STL container in a sequential\n        /// algorithm.\n        void erase(const keyT &key)\n        {\n            check_initialized();\n            p->erase(key);\n        }\n\n        /// Erases entry corresponding to \\em local iterator (no communication)\n        void erase(const iterator &it)\n        {\n            check_initialized();\n            p->erase(it);\n        }\n\n        /// Erases range defined by \\em local iterators (no communication)\n        void erase(const iterator &start, const iterator &finish)\n        {\n            check_initialized();\n            p->erase(start, finish);\n        }\n\n        /// Clears all \\em local data (no communication)\n\n        /// Invalidates all iterators\n        void clear()\n        {\n            check_initialized();\n            p->clear();\n        }\n\n        /// Returns the number of \\em local entries (no communication)\n        std::size_t size() const\n        {\n            check_initialized();\n            return p->size();\n        }\n\n        /// Returns shared pointer to the process mapping\n        inline const std::shared_ptr<WorldDCPmapInterface<keyT>> &get_pmap() const\n        {\n            check_initialized();\n            return p->get_pmap();\n        }\n\n        /// Returns shared pointer to the process mapping\n        inline void reset_pmap_to_local()\n        {\n            p->reset_pmap_to_local();\n        }\n\n        /// Returns a reference to the hashing functor\n        const hashfunT &get_hash() const\n        {\n            check_initialized();\n            return p->get_hash();\n        }\n\n        /// Process pending messages\n\n        /// If the constructor was given \\c do_pending=false then you\n        /// \\em must invoke this routine in order to process both\n        /// prior and future messages.\n        inline void process_pending()\n        {\n            check_initialized();\n            p->process_pending();\n        }\n\n        /// Sends message \"resultT memfun()\" to item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments must be ready for remote messages.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT>\n        Future<MEMFUN_RETURNT(memfunT)>\n        send(const keyT &key, memfunT memfun)\n        {\n            check_initialized();\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT) = &implT::template itemfun<memfunT>;\n            return p->send(owner(key), itemfun, key, memfun);\n        }\n\n        /// Sends message \"resultT memfun(arg1T)\" to item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments must be ready for remote messages.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, const memfunT &memfun, const arg1T &arg1)\n        {\n            check_initialized();\n            // To work around bug in g++ 4.3.* use static cast as alternative mechanism to force type deduction\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const arg1T &) = &implT::template itemfun<memfunT, arg1T>;\n            return p->send(owner(key), itemfun, key, memfun, arg1);\n            /*return p->send(owner(key),\n                           static_cast<MEMFUN_RETURNT(memfunT)(implT::*)(const keyT&, memfunT, const arg1T&)>(&implT:: template itemfun<memfunT,arg1T>),\n                           key, memfun, arg1);*/\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T)\" to item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments must be ready for both local and remote messages.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2)\n        {\n            check_initialized();\n            // To work around bug in g++ 4.3.* use static cast as alternative mechanism to force type deduction\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const arg1T &, const arg2T &) = &implT::template itemfun<memfunT, arg1T, arg2T>;\n            return p->send(owner(key), itemfun, key, memfun, arg1, arg2);\n            /*return p->send(owner(key),\n                           static_cast<MEMFUN_RETURNT(memfunT)(implT::*)(const keyT&, memfunT, const arg1T&, const arg2T&)>(&implT:: template itemfun<memfunT,arg1T,arg2T>), key, memfun, arg1, arg2);*/\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T,arg3T)\" to item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments must be ready for both local and remote messages.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3)\n        {\n            check_initialized();\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const arg1T &, const arg2T &, const arg3T &) = &implT::template itemfun<memfunT, arg1T, arg2T, arg3T>;\n            return p->send(owner(key), itemfun, key, memfun, arg1, arg2, arg3);\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T,arg3T,arg4T)\" to item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments must be ready for both local and remote messages.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4)\n        {\n            check_initialized();\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const arg1T &, const arg2T &, const arg3T &, const arg4T &) = &implT::template itemfun<memfunT, arg1T, arg2T, arg3T, arg4T>;\n            return p->send(owner(key), itemfun, key, memfun, arg1, arg2, arg3, arg4);\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T)\" to item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments must be ready for both local and remote messages.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5)\n        {\n            check_initialized();\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const arg1T &, const arg2T &, const arg3T &, const arg4T &, const arg5T &) = &implT::template itemfun<memfunT, arg1T, arg2T, arg3T, arg4T, arg5T>;\n            return p->send(owner(key), itemfun, key, memfun, arg1, arg2, arg3, arg4, arg5);\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T)\" to item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments must be ready for both local and remote messages.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T, typename arg6T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5, const arg6T &arg6)\n        {\n            check_initialized();\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const arg1T &, const arg2T &, const arg3T &, const arg4T &, const arg5T &, const arg6T &) = &implT::template itemfun<memfunT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T>;\n            return p->send(owner(key), itemfun, key, memfun, arg1, arg2, arg3, arg4, arg5, arg6);\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T)\" to item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments must be ready for both local and remote messages.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T, typename arg6T, typename arg7T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4,\n             const arg5T &arg5, const arg6T &arg6, const arg7T &arg7)\n        {\n            check_initialized();\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const arg1T &, const arg2T &, const arg3T &, const arg4T &, const arg5T &, const arg6T &, const arg7T &) = &implT::template itemfun<memfunT, arg1T, arg2T, arg3T, arg4T, arg5T, arg6T, arg7T>;\n            return p->send(owner(key), itemfun, key, memfun, arg1, arg2, arg3, arg4, arg5, arg6, arg7);\n        }\n\n        /// Sends message \"resultT memfun() const\" to item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun) const\n        {\n            return const_cast<containerT *>(this)->send(key, memfun);\n        }\n\n        /// Sends message \"resultT memfun(arg1T) const\" to item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1) const\n        {\n            return const_cast<containerT *>(this)->send(key, memfun, arg1);\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T) const\" to item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2) const\n        {\n            return const_cast<containerT *>(this)->send(key, memfun, arg1, arg2);\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T,arg3T) const\" to item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3) const\n        {\n            return const_cast<containerT *>(this)->send(key, memfun, arg1, arg2, arg3);\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T,arg3T,arg4T) const\" to item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4) const\n        {\n            return const_cast<containerT *>(this)->send(key, memfun, arg1, arg2, arg3, arg4);\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T) const\" to item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5) const\n        {\n            return const_cast<containerT *>(this)->send(key, memfun, arg1, arg2, arg3, arg4, arg5);\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T) const\" to item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T, typename arg6T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3,\n             const arg4T &arg4, const arg5T &arg5, const arg6T &arg6) const\n        {\n            return const_cast<containerT *>(this)->send(key, memfun, arg1, arg2, arg3, arg4, arg5, arg6);\n        }\n\n        /// Sends message \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T) const\" to item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T, typename arg6T, typename arg7T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        send(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3,\n             const arg4T &arg4, const arg5T &arg5, const arg6T &arg6, const arg7T &arg7) const\n        {\n            return const_cast<containerT *>(this)->send(key, memfun, arg1, arg2, arg3, arg4, arg5, arg6, arg7);\n        }\n\n        /// Adds task \"resultT memfun()\" in process owning item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments for local tasks can generate dependencies, but for remote\n        /// tasks all futures must be ready.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const TaskAttributes &attr = TaskAttributes())\n        {\n            check_initialized();\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT) = &implT::template itemfun<memfunT>;\n            return p->task(owner(key), itemfun, key, memfun, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T)\" in process owning item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments for local tasks can generate dependencies, but for remote\n        /// tasks all futures must be ready.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const TaskAttributes &attr = TaskAttributes())\n        {\n            check_initialized();\n            typedef REMFUTURE(arg1T) a1T;\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const a1T &) = &implT::template itemfun<memfunT, a1T>;\n            return p->task(owner(key), itemfun, key, memfun, arg1, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T)\" in process owning item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments for local tasks can generate dependencies, but for remote\n        /// tasks all futures must be ready.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const TaskAttributes &attr = TaskAttributes())\n        {\n            check_initialized();\n            typedef REMFUTURE(arg1T) a1T;\n            typedef REMFUTURE(arg2T) a2T;\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const a1T &, const a2T &) = &implT::template itemfun<memfunT, a1T, a2T>;\n            return p->task(owner(key), itemfun, key, memfun, arg1, arg2, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T,arg3T)\" in process owning item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments for local tasks can generate dependencies, but for remote\n        /// tasks all futures must be ready.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const TaskAttributes &attr = TaskAttributes())\n        {\n            check_initialized();\n            typedef REMFUTURE(arg1T) a1T;\n            typedef REMFUTURE(arg2T) a2T;\n            typedef REMFUTURE(arg3T) a3T;\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const a1T &, const a2T &, const a3T &) = &implT::template itemfun<memfunT, a1T, a2T, a3T>;\n            return p->task(owner(key), itemfun, key, memfun, arg1, arg2, arg3, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T,arg3T,arg4T)\" in process owning item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments for local tasks can generate dependencies, but for remote\n        /// tasks all futures must be ready.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const TaskAttributes &attr = TaskAttributes())\n        {\n            check_initialized();\n            typedef REMFUTURE(arg1T) a1T;\n            typedef REMFUTURE(arg2T) a2T;\n            typedef REMFUTURE(arg3T) a3T;\n            typedef REMFUTURE(arg4T) a4T;\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const a1T &, const a2T &, const a3T &, const a4T &) = &implT::template itemfun<memfunT, a1T, a2T, a3T, a4T>;\n            return p->task(owner(key), itemfun, key, memfun, arg1, arg2, arg3, arg4, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T)\" in process owning item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments for local tasks can generate dependencies, but for remote\n        /// tasks all futures must be ready.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5, const TaskAttributes &attr = TaskAttributes())\n        {\n            check_initialized();\n            typedef REMFUTURE(arg1T) a1T;\n            typedef REMFUTURE(arg2T) a2T;\n            typedef REMFUTURE(arg3T) a3T;\n            typedef REMFUTURE(arg4T) a4T;\n            typedef REMFUTURE(arg5T) a5T;\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const a1T &, const a2T &, const a3T &, const a4T &, const a5T &) = &implT::template itemfun<memfunT, a1T, a2T, a3T, a4T, a5T>;\n            return p->task(owner(key), itemfun, key, memfun, arg1, arg2, arg3, arg4, arg5, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T)\" in process owning item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments for local tasks can generate dependencies, but for remote\n        /// tasks all futures must be ready.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T, typename arg6T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5, const arg6T &arg6, const TaskAttributes &attr = TaskAttributes())\n        {\n            check_initialized();\n            typedef REMFUTURE(arg1T) a1T;\n            typedef REMFUTURE(arg2T) a2T;\n            typedef REMFUTURE(arg3T) a3T;\n            typedef REMFUTURE(arg4T) a4T;\n            typedef REMFUTURE(arg5T) a5T;\n            typedef REMFUTURE(arg6T) a6T;\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const a1T &, const a2T &, const a3T &, const a4T &, const a5T &, const a6T &) = &implT::template itemfun<memfunT, a1T, a2T, a3T, a4T, a5T, a6T>;\n            return p->task(owner(key), itemfun, key, memfun, arg1, arg2, arg3, arg4, arg5, arg6, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T)\" in process owning item (non-blocking comm if remote)\n\n        /// If item does not exist it is made with the default constructor.\n        ///\n        /// Future arguments for local tasks can generate dependencies, but for remote\n        /// tasks all futures must be ready.\n        ///\n        /// Returns a future result (Future<void> may be ignored).\n        ///\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T, typename arg6T, typename arg7T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5, const arg6T &arg6, const arg7T &arg7, const TaskAttributes &attr = TaskAttributes())\n        {\n            check_initialized();\n            typedef REMFUTURE(arg1T) a1T;\n            typedef REMFUTURE(arg2T) a2T;\n            typedef REMFUTURE(arg3T) a3T;\n            typedef REMFUTURE(arg4T) a4T;\n            typedef REMFUTURE(arg5T) a5T;\n            typedef REMFUTURE(arg6T) a6T;\n            typedef REMFUTURE(arg7T) a7T;\n            MEMFUN_RETURNT(memfunT)\n            (implT::*itemfun)(const keyT &, memfunT, const a1T &, const a2T &, const a3T &, const a4T &, const a5T &, const a6T &, const a7T &) = &implT::template itemfun<memfunT, a1T, a2T, a3T, a4T, a5T, a6T, a7T>;\n            return p->task(owner(key), itemfun, key, memfun, arg1, arg2, arg3, arg4, arg5, arg6, arg7, attr);\n        }\n\n        /// Adds task \"resultT memfun() const\" in process owning item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const TaskAttributes &attr = TaskAttributes()) const\n        {\n            return const_cast<containerT *>(this)->task(key, memfun, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T) const\" in process owning item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const TaskAttributes &attr = TaskAttributes()) const\n        {\n            return const_cast<containerT *>(this)->task(key, memfun, arg1, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T) const\" in process owning item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const TaskAttributes &attr = TaskAttributes()) const\n        {\n            return const_cast<containerT *>(this)->task(key, memfun, arg1, arg2, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T,arg3T) const\" in process owning item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const TaskAttributes &attr = TaskAttributes()) const\n        {\n            return const_cast<containerT *>(this)->task(key, memfun, arg1, arg2, arg3, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T,arg3T, arg4T) const\" in process owning item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const TaskAttributes &attr = TaskAttributes()) const\n        {\n            return const_cast<containerT *>(this)->task(key, memfun, arg1, arg2, arg3, arg4, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T) const\" in process owning item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5, const TaskAttributes &attr = TaskAttributes()) const\n        {\n            return const_cast<containerT *>(this)->task(key, memfun, arg1, arg2, arg3, arg4, arg5, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T) const\" in process owning item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T, typename arg6T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5, const arg6T &arg6, const TaskAttributes &attr = TaskAttributes()) const\n        {\n            return const_cast<containerT *>(this)->task(key, memfun, arg1, arg2, arg3, arg4, arg5, arg6, attr);\n        }\n\n        /// Adds task \"resultT memfun(arg1T,arg2T,arg3T,arg4T,arg5T,arg6T,arg7T) const\" in process owning item (non-blocking comm if remote)\n\n        /// The method executes with a write lock on the item.\n        template <typename memfunT, typename arg1T, typename arg2T, typename arg3T, typename arg4T, typename arg5T, typename arg6T, typename arg7T>\n        Future<REMFUTURE(MEMFUN_RETURNT(memfunT))>\n        task(const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5, const arg6T &arg6, const arg7T &arg7, const TaskAttributes &attr = TaskAttributes()) const\n        {\n            return const_cast<containerT *>(this)->task(key, memfun, arg1, arg2, arg3, arg4, arg5, arg6, arg7, attr);\n        }\n\n        /// (de)Serialize --- *Local* data only to/from anything *except* Buffer*Archive and Parallel*Archive\n\n        /// Advisable for *you* to fence before and after this to ensure consistency\n        template <typename Archive>\n        void serialize(const Archive &ar)\n        {\n            //\n            // !! If you change the format of this stream make sure that\n            // !! the parallel in/out archive below is compatible\n            //\n            const long magic = 5881828; // Sitar Indian restaurant in Knoxville\n            unsigned long count = 0;\n            check_initialized();\n\n            if (Archive::is_output_archive)\n            {\n                ar & magic;\n                for (iterator it = begin(); it != end(); ++it)\n                    count++;\n                ar & count;\n                for (iterator it = begin(); it != end(); ++it)\n                    ar &*it;\n            }\n            else\n            {\n                long cookie = 0l;\n                ar & cookie;\n                MADNESS_ASSERT(cookie == magic);\n                ar & count;\n                while (count--)\n                {\n                    pairT datum;\n                    ar & datum;\n                    replace(datum);\n                }\n            }\n        }\n\n        /// (de)Serialize --- !! ONLY for purpose of interprocess communication\n\n        /// This just writes/reads the unique id to/from the Buffer*Archive.\n        void serialize(const archive::BufferOutputArchive &ar)\n        {\n            check_initialized();\n            ar &static_cast<WorldObject<implT> *>(p.get());\n        }\n\n        /// (de)Serialize --- !! ONLY for purpose of interprocess communication\n\n        /// This just writes/reads the unique id to/from the Buffer*Archive.\n        void serialize(const archive::BufferInputArchive &ar)\n        {\n            WorldObject<implT> *ptr = nullptr;\n            ar & ptr;\n            MADNESS_ASSERT(ptr);\n\n#ifdef MADNESS_DISABLE_SHARED_FROM_THIS\n            p.reset(static_cast<implT *>(ptr), [](implT *p_) -> void{});\n#else\n            p = static_cast<implT *>(ptr)->shared_from_this();\n#endif // MADNESS_DISABLE_SHARED_FROM_THIS\n        }\n\n        /// Returns the associated unique id ... must be initialized\n        const uniqueidT &id() const\n        {\n            check_initialized();\n            return p->id();\n        }\n\n        /// Destructor passes ownership of implementation to world for deferred cleanup\n        virtual ~WorldContainer()\n        {\n            detail::deferred_cleanup(p->get_world(), p);\n        }\n\n        friend void swap<>(WorldContainer &, WorldContainer &);\n    };\n\n    /// Swaps the content of two WorldContainer objects. It should be called on all nodes.\n\n    /// \\ingroup worlddc\n    template <typename keyT, typename valueT, typename hashfunT>\n    void swap(WorldContainer<keyT, valueT, hashfunT> &dc0, WorldContainer<keyT, valueT, hashfunT> &dc1)\n    {\n        std::swap(dc0.p, dc1.p);\n    }\n\n\n    namespace archive\n    {\n\n        /// Write container to parallel archive\n\n        /// specialization for parallel serialization of a WorldContainer:\n        /// all threads on each process serialize some values into a buffer, which gets concatenated\n        /// and finally serialized to localarchive (aka VectorOutputArchive).\n        template <class keyT, class valueT>\n        struct ArchiveStoreImpl<ParallelOutputArchive<VectorOutputArchive>, WorldContainer<keyT, valueT>>\n        {\n            static void store(const ParallelOutputArchive<VectorOutputArchive> &ar, const WorldContainer<keyT, valueT> &t)\n            {\n                using localarchiveT = VectorOutputArchive;\n                const long magic = -5881828; // Sitar Indian restaurant in Knoxville (negative to indicate parallel!)\n                typedef WorldContainer<keyT, valueT> dcT;\n                using const_iterator = typename dcT::const_iterator;\n                int count = t.size(); // Must be INT for MPI and NOT const since we'll do a global sum eventually\n\n                // Strategy:\n                // 1. Serialize local data to a buffer in parallel over threads\n                //    a) Compute the size of the buffer needed by each task\n                //    b) Sum sizes and allocate the buffer of exact sizes needed for all threads\n                //    c) Serialize the data into the buffer in parallel over threads\n                // 2. Gather all buffers to process 0\n\n                World *world = ar.get_world();\n                world->gop.fence(); // Global fence here\n\n                class op_inspector : public TaskInterface\n                {\n                    const_iterator start, end;\n                    size_t &size;\n\n                public:\n                    op_inspector(const_iterator start, const_iterator end, size_t &size)\n                        : start(start), end(end), size(size) {}\n                    void run(World &world)\n                    {\n                        BufferOutputArchive bo;\n                        for (const_iterator it = start; it != end; ++it)\n                            bo &*it;\n                        size = bo.size();\n                    }\n                };\n\n                class op_executor : public TaskInterface\n                {\n                    const_iterator start, end;\n                    unsigned char *buf;\n                    const size_t size;\n\n                public:\n                    op_executor(const_iterator start, const_iterator end, unsigned char *buf, size_t size)\n                        : start(start), end(end), buf(buf), size(size) {}\n                    void run(World &world)\n                    {\n                        BufferOutputArchive bo(buf, size);\n                        for (const_iterator it = start; it != end; ++it)\n                        {\n                            bo &*it;\n                        }\n                        MADNESS_CHECK(size == bo.size());\n                    }\n                };\n\n                // No need for LOCAL fence here since only master thread is busy\n                double wall0 = wall_time();\n                const size_t ntasks = std::min(size_t(count), std::max(size_t(1), ThreadPool::size()));\n                size_t local_size = 0;\n                double wall1 = wall0;\n                unsigned char* buf = 0;\n                if (ntasks > 0)\n                {\n                    const size_t max_items_per_task = (std::max(1, count) - 1) / ntasks + 1;\n                    // Compute the size of the buffer needed by each task\n                    std::vector<const_iterator> starts(ntasks), ends(ntasks);\n                    std::vector<size_t> local_sizes(ntasks);\n                    const_iterator start = t.begin();\n                    size_t nleft = count;\n                    for (size_t taskid = 0; taskid < ntasks; taskid++)\n                    {\n                        const_iterator end = start;\n                        if (taskid == (ntasks - 1))\n                        {\n                            end = t.end();\n                        }\n                        else\n                        {\n                            size_t nitems = std::min(max_items_per_task, nleft);\n                            std::advance(end, max_items_per_task);\n                            nleft -= nitems;\n                        }\n                        starts[taskid] = start;\n                        ends[taskid] = end;\n                        world->taskq.add(new op_inspector(start, end, local_sizes[taskid])); // Be sure to pass iterators by value!!\n                        start = end;\n                    }\n                    world->taskq.fence(); // just need LOCAL fence\n                    wall1 = wall_time();\n                    // if (world->rank() == 0)\n                        // printf(\"time in op_inspector: %8.4fs\\n\", wall1 - wall0);\n                    wall0 = wall1;\n\n                    // total size over all threads\n                    for (size_t taskid = 0; taskid < ntasks; taskid++)\n                    {\n                        local_size += local_sizes[taskid];\n                        // print(\"taskid\",taskid,\"size\",local_sizes[taskid]);\n                    }\n\n                    // Allocate the buffer for all threads\n                    buf = new unsigned char[local_size];\n\n                    // Now execute the serialization\n                    size_t offset = 0;\n                    for (size_t taskid = 0; taskid < ntasks; taskid++)\n                    {\n                        world->taskq.add(new op_executor(starts[taskid], ends[taskid], buf + offset, local_sizes[taskid]));\n                        offset += local_sizes[taskid];\n                    }\n                    world->taskq.fence(); // just need LOCAL fence\n\n                    wall1 = wall_time();\n                    // if (world->rank() == 0)\n                        // printf(\"time in op_executor: %8.4fs\\n\", wall1 - wall0);\n                    wall0 = wall1;\n                }\n                // VERify that the serialization worked!!\n                // {\n                //     BufferInputArchive bi(buf, local_size);\n                //     for (int item=0; item<count; item++) {\n                //         std::pair<keyT, valueT> datum;\n                //         bi & datum;\n                //         print(\"deserializing\",datum.first);\n                //     }\n                // }\n\n                // Gather all buffers to process 0\n                // first gather all of the sizes and counts to a vector in process 0\n                const int size = local_size;\n                std::vector<int> sizes(world->size());\n                MPI_Gather(&size, 1, MPI_INT, sizes.data(), 1, MPI_INT, 0, world->mpi.comm().Get_mpi_comm());\n                world->gop.sum(count); // just need total number of elements\n\n                // print(\"time 3\",wall_time());\n                //  build the cumulative sum of sizes\n                std::vector<int> offsets(world->size());\n                offsets[0] = 0;\n                for (int i = 1; i < world->size(); ++i)\n                    offsets[i] = offsets[i - 1] + sizes[i - 1];\n                size_t total_size = offsets.back() + sizes.back();\n                // if (world->rank() == 0)\n                    // print(\"total_size\", total_size);\n\n                // print(\"time 4\",wall_time());\n                // gather the vector of data v from each process to process 0\n                unsigned char *all_data = 0;\n                if (world->rank() == 0)\n                {\n                    all_data = new unsigned char[total_size];\n                }\n                MPI_Gatherv(buf, local_size, MPI_BYTE, all_data, sizes.data(), offsets.data(), MPI_BYTE, 0, world->mpi.comm().Get_mpi_comm());\n\n                wall1 = wall_time();\n                // if (world->rank() == 0)\n                    // printf(\"time in gather+gatherv: %8.4fs\\n\", wall1 - wall0);\n                wall0 = wall1;\n\n                delete[] buf;\n\n                // print(\"time 5\",wall_time());\n                if (world->rank() == 0)\n                {\n                    auto &localar = ar.local_archive();\n                    localar & magic & 1; // 1 client\n                    // localar & t;\n                    ArchivePrePostImpl<localarchiveT, dcT>::preamble_store(localar);\n                    localar & -magic &(unsigned long)(count);\n                    localar.store(all_data, total_size);\n                    ArchivePrePostImpl<localarchiveT, dcT>::postamble_store(localar);\n                    wall1 = wall_time();\n                    // if (world->rank() == 0)\n                        // printf(\"time in final copy on node 0: %8.4fs\\n\", wall1 - wall0);\n\n                    delete[] all_data;\n                }\n                world->gop.fence();\n                // print(\"time 6\",wall_time());\n            }\n        };\n\n        /// Write container to parallel archive with optional fence\n\n        /// \\ingroup worlddc\n        /// Each node (process) is served by a designated IO node.\n        /// The IO node has a binary local file archive to which is\n        /// first written a cookie and the number of servers.  The IO\n        /// node then loops thru all of its clients and in turn tells\n        /// each to write its data over an MPI stream, which is copied\n        /// directly to the output file.  The stream contents are then\n        /// cookie, no. of clients, foreach client (usual sequential archive).\n        ///\n        /// If ar.dofence() is true (default) fence is invoked before and\n        /// after the IO. The fence is optional but it is of course\n        /// necessary to be sure that all updates have completed\n        /// before doing IO, and that all IO has completed before\n        /// subsequent modifications. Also, there is always at least\n        /// some synchronization between a client and its IO server.\n        template <class keyT, class valueT, class localarchiveT>\n        struct ArchiveStoreImpl<ParallelOutputArchive<localarchiveT>, WorldContainer<keyT, valueT>>\n        {\n            static void store(const ParallelOutputArchive<localarchiveT> &ar, const WorldContainer<keyT, valueT> &t)\n            {\n                const long magic = -5881828; // Sitar Indian restaurant in Knoxville (negative to indicate parallel!)\n                typedef WorldContainer<keyT, valueT> dcT;\n                // typedef typename dcT::const_iterator iterator; // unused?\n                typedef typename dcT::pairT pairT;\n                World *world = ar.get_world();\n                Tag tag = world->mpi.unique_tag();\n                ProcessID me = world->rank();\n                if (ar.dofence())\n                    world->gop.fence();\n                if (ar.is_io_node())\n                {\n                    auto &localar = ar.local_archive();\n                    localar & magic & ar.num_io_clients();\n                    for (ProcessID p = 0; p < world->size(); ++p)\n                    {\n                        if (p == me)\n                        {\n                            localar & t;\n                        }\n                        else if (ar.io_node(p) == me)\n                        {\n                            world->mpi.Send(int(1), p, tag); // Tell client to start sending\n                            archive::MPIInputArchive source(*world, p);\n                            long cookie = 0l;\n                            unsigned long count = 0ul;\n\n                            ArchivePrePostImpl<localarchiveT, dcT>::preamble_store(localar);\n\n                            source & cookie & count;\n                            localar & cookie & count;\n                            while (count--)\n                            {\n                                pairT datum;\n                                source & datum;\n                                localar & datum;\n                            }\n\n                            ArchivePrePostImpl<localarchiveT, dcT>::postamble_store(localar);\n                        }\n                    }\n                }\n                else\n                {\n                    ProcessID p = ar.my_io_node();\n                    int flag;\n                    world->mpi.Recv(flag, p, tag);\n                    MPIOutputArchive dest(*world, p);\n                    dest & t;\n                    dest.flush();\n                }\n                if (ar.dofence())\n                    world->gop.fence();\n            }\n        };\n\n        template <class keyT, class valueT, class localarchiveT>\n        struct ArchiveLoadImpl<ParallelInputArchive<localarchiveT>, WorldContainer<keyT, valueT>>\n        {\n            /// Read container from parallel archive\n\n            /// \\ingroup worlddc\n            /// See store method above for format of file content.\n            /// !!! We presently ASSUME that the number of writers and readers are\n            /// the same.  This is frustrating but not a show stopper since you\n            /// can always run a separate job to copy to a different number.\n            ///\n            /// The IO node simply reads all data and inserts entries.\n            static void load(const ParallelInputArchive<localarchiveT> &ar, WorldContainer<keyT, valueT> &t)\n            {\n                const long magic = -5881828; // Sitar Indian restaurant in Knoxville (negative to indicate parallel!)\n                // typedef WorldContainer<keyT,valueT> dcT; // unused\n                // typedef typename dcT::iterator iterator; // unused\n                // typedef typename dcT::pairT pairT; // unused\n                World *world = ar.get_world();\n                if (ar.dofence())\n                    world->gop.fence();\n                if (ar.is_io_node())\n                {\n                    long cookie = 0l;\n                    int nclient = 0;\n                    auto &localar = ar.local_archive();\n                    localar & cookie & nclient;\n                    MADNESS_CHECK(cookie == magic);\n                    while (nclient--)\n                    {\n                        localar & t;\n                    }\n                }\n                if (ar.dofence())\n                    world->gop.fence();\n            }\n        };\n    }\n\n}\n\n///@}\n\n#endif // MADNESS_WORLD_WORLDDC_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldgop.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <limits>\n#include <madness/world/worldgop.h>\n#include <madness/world/MADworld.h>\n#ifdef MADNESS_HAS_GOOGLE_PERF_TCMALLOC\n#include <gperftools/malloc_extension.h>\n#endif\nnamespace madness {\n\n\n    /// Synchronizes all processes in communicator AND globally ensures no pending AM or tasks\n\n    /// Runs Dykstra-like termination algorithm on binary tree by\n    /// locally ensuring ntask=0 and all am sent and processed,\n    /// and then participating in a global sum of nsent and nrecv.\n    /// Then globally checks that nsent=nrecv and that both are\n    /// constant over two traversals.  We are then we are sure\n    /// that all tasks and AM are processed and there no AM in\n    /// flight.\n    void WorldGopInterface::fence_impl(std::function<void()> epilogue,\n                                   bool pause_during_epilogue,\n                                   bool debug) {\n        PROFILE_MEMBER_FUNC(WorldGopInterface);\n        MADNESS_CHECK(not forbid_fence_);\n        unsigned long nsent_prev=0, nrecv_prev=1; // invalid initial condition\n        SafeMPI::Request req0, req1;\n        ProcessID parent, child0, child1;\n        world_.mpi.binary_tree_info(0, parent, child0, child1);\n        Tag gfence_tag = world_.mpi.unique_tag();\n        Tag bcast_tag = world_.mpi.unique_tag();\n        int npass = 0;\n\n        //double start = wall_time();\n\n      if (debug)\n        madness::print(world_.rank(), \": WORLD.GOP.FENCE: entering fence loop, gfence_tag=\", gfence_tag, \" bcast_tag=\", bcast_tag);\n\n      while (1) {\n            uint64_t sum0[2]={0,0}, sum1[2]={0,0}, sum[2];\n            if (child0 != -1) req0 = world_.mpi.Irecv((void*) &sum0, sizeof(sum0), MPI_BYTE, child0, gfence_tag);\n            if (child1 != -1) req1 = world_.mpi.Irecv((void*) &sum1, sizeof(sum1), MPI_BYTE, child1, gfence_tag);\n            world_.taskq.fence();\n            if (child0 != -1) World::await(req0);\n            if (child1 != -1) World::await(req1);\n\n            if (debug && (child0 != -1 || child1 != -1))\n              madness::print(world_.rank(), \": WORLD.GOP.FENCE: npass=\", npass, \" received messages from children={\", child0, \",\", child1, \"} gfence_tag=\", gfence_tag);\n\n            bool finished;\n            uint64_t ntask1, nsent1, nrecv1, ntask2, nsent2, nrecv2;\n            do {\n                world_.taskq.fence();\n\n                // Since the number of outstanding tasks and number of AM sent/recv\n                // don't share a critical section read each twice and ensure they\n                // are unchanged to ensure that are consistent ... they don't have\n                // to be current.\n\n                ntask1 = world_.taskq.size();\n                nsent1 = world_.am.nsent;\n                nrecv1 = world_.am.nrecv;\n\n                __asm__ __volatile__ (\" \" : : : \"memory\");\n\n                ntask2 = world_.taskq.size();\n                nsent2 = world_.am.nsent;\n                nrecv2 = world_.am.nrecv;\n\n                __asm__ __volatile__ (\" \" : : : \"memory\");\n\n                finished = (ntask2==0) && (ntask1==0) && (nsent1==nsent2) && (nrecv1==nrecv2);\n            }\n            while (!finished);\n\n            sum[0] = sum0[0] + sum1[0] + nsent2; // Must use values read above\n            sum[1] = sum0[1] + sum1[1] + nrecv2;\n\n            if (parent != -1) {\n                req0 = world_.mpi.Isend(&sum, sizeof(sum), MPI_BYTE, parent, gfence_tag);\n                if (debug)\n                  madness::print(world_.rank(), \": WORLD.GOP.FENCE: npass=\", npass, \" sent message to parent=\", parent, \" gfence_tag=\", gfence_tag);\n                World::await(req0);\n                if (debug)\n                  madness::print(world_.rank(), \": WORLD.GOP.FENCE: npass=\", npass, \" parent=\", parent, \", confirmed receipt\");\n            }\n\n            // While we are probably idle free unused communication buffers\n            //world_.am.free_managed_buffers();\n\n            //bool dowork = (npass==0) || (ThreadPool::size()==0);\n            bool dowork = true;\n            broadcast(&sum, sizeof(sum), 0, dowork, bcast_tag);\n            ++npass;\n\n            if (debug)\n              madness::print(world_.rank(), \": WORLD.GOP.FENCE: npass=\", npass, \" sum0=\", sum[0], \" nsent_prev=\", nsent_prev, \" sum1=\", sum[1], \" nrecv_prev=\", nrecv_prev);\n\n            if (sum[0]==sum[1] && sum[0]==nsent_prev && sum[1]==nrecv_prev) {\n              if (debug)\n                madness::print(world_.rank(), \": WORLD.GOP.FENCE: npass=\", npass, \" exiting fence loop\");\n              break;\n            }\n\n//                 if (wall_time() - start > 1200.0) {\n//                     std::cout << rank() << \" FENCE \" << nsent2 << \" \"\n//                         << nsent_prev << \" \" << nrecv2 << \" \" << nrecv_prev\n//                         << \" \" << sum[0] << \" \" << sum[1] << \" \" << npass\n//                         << \" \" << taskq.size() << std::endl;\n//                     std::cout.flush();\n//                     //myusleep(1000);\n//                     MADNESS_ASSERT(0);\n//                 }\n\n            nsent_prev = sum[0];\n            nrecv_prev = sum[1];\n\n        };\n        // execute post-fence actions\n        MADNESS_ASSERT(pause_during_epilogue == false);\n        epilogue();\n        world_.am.free_managed_buffers(); // free up communication buffers\n        deferred_->do_cleanup();\n#ifdef MADNESS_HAS_GOOGLE_PERF_TCMALLOC\n        MallocExtension::instance()->ReleaseFreeMemory();\n//        print(\"clearing memory\");\n#endif\n      if (debug)\n        madness::print(world_.rank(), \": WORLD.GOP.FENCE: done with fence in \", npass, (npass > 1 ? \" loops\" : \" loop\"));\n    }\n\n    void WorldGopInterface::fence(bool debug) {\n      fence_impl([]{}, false, debug);\n    }\n\n    void WorldGopInterface::serial_invoke(std::function<void()> action) {\n      // default implementation requires 2 fences since action may change global state visible to all tasks\n      // fence_impl could be used if possible to pause thread pool after the fence\n      fence();\n      action();\n      fence();\n    }\n\n    void WorldGopInterface::broadcast(void* buf, size_t nbyte, ProcessID root, bool dowork, Tag bcast_tag) {\n      if (bcast_tag < 0)\n        bcast_tag = world_.mpi.unique_tag();\n      ProcessID parent, child0, child1;\n      world_.mpi.binary_tree_info(root, parent, child0, child1);\n      const size_t max_msg_size =\n          static_cast<size_t>(max_reducebcast_msg_size());\n\n      auto broadcast_impl = [&, this](void *buf, int nbyte) {\n        SafeMPI::Request req0, req1;\n\n        // print(\"BCAST TAG\", bcast_tag);\n\n        if (parent != -1) {\n          req0 = world_.mpi.Irecv(buf, nbyte, MPI_BYTE, parent, bcast_tag);\n          World::await(req0, dowork);\n        }\n\n        if (child0 != -1)\n          req0 = world_.mpi.Isend(buf, nbyte, MPI_BYTE, child0, bcast_tag);\n        if (child1 != -1)\n          req1 = world_.mpi.Isend(buf, nbyte, MPI_BYTE, child1, bcast_tag);\n\n        if (child0 != -1)\n          World::await(req0, dowork);\n        if (child1 != -1)\n          World::await(req1, dowork);\n      };\n\n      while (nbyte) {\n        const int n = static_cast<int>(std::min(max_msg_size, nbyte));\n        broadcast_impl(buf, n);\n        nbyte -= n;\n        buf = static_cast<char *>(buf) + n;\n      }\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/worldgop.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n */\n\n#ifndef MADNESS_WORLD_WORLDGOP_H__INCLUDED\n#define MADNESS_WORLD_WORLDGOP_H__INCLUDED\n\n/// \\file worldgop.h\n/// \\brief Implements global operations\n\n/// If you can recall the Intel hypercubes, their comm lib used GOP as\n/// the abbreviation.\n\n#include <functional>\n#include <type_traits>\n#include <madness/world/worldtypes.h>\n#include <madness/world/buffer_archive.h>\n#include <madness/world/world.h>\n#include <madness/world/deferred_cleanup.h>\n#include <madness/world/world_task_queue.h>\n#include <madness/world/group.h>\n#include <madness/world/dist_cache.h>\n#include <madness/world/units.h>\n\nnamespace madness {\n\n    // Forward declarations\n    class World;\n    class WorldAmInterface;\n    class WorldTaskQueue;\n    namespace detail {\n\n        class DeferredCleanup;\n\n    }  // namespace detail\n\n    template <typename T>\n    struct WorldSumOp {\n        inline T operator()(const T& a, const T& b) const {\n            return a+b;\n        }\n    };\n\n    template <typename T>\n    struct WorldMultOp {\n        inline T operator()(const T& a, const T& b) const {\n            return a*b;\n        }\n    };\n\n    template <typename T>\n    struct WorldMaxOp {\n        inline T operator()(const T& a, const T& b) const {\n            return a>b? a : b;\n        }\n    };\n\n    template <typename T>\n    struct WorldAbsMaxOp {\n        inline T operator()(const T& a, const T& b) const {\n            using std::abs;\n            return abs(a)>abs(b)? abs(a) : abs(b);\n        }\n    };\n\n    template <typename T>\n    struct WorldMinOp {\n        inline T operator()(const T& a, const T& b) const {\n            return a<b? a : b;\n        }\n    };\n\n    template <typename T>\n    struct WorldAbsMinOp {\n        inline T operator()(const T& a, const T& b) const {\n            using std::abs;\n            return abs(a)<abs(b)? abs(a) : abs(b);\n        }\n    };\n\n    template <typename T>\n    struct WorldBitAndOp {\n        inline T operator()(const T& a, const T& b) const {\n            return a & b;\n        }\n    };\n\n    template <typename T>\n    struct WorldBitOrOp {\n        inline T operator()(const T& a, const T& b) const {\n            return a | b;\n        }\n    };\n\n    template <typename T>\n    struct WorldBitXorOp {\n        inline T operator()(const T& a, const T& b) const {\n            return a ^ b;\n        }\n    };\n\n    template <typename T>\n    struct WorldLogicAndOp {\n        inline T operator()(const T& a, const T& b) const {\n            return a && b;\n        }\n    };\n\n    template <typename T>\n    struct WorldLogicOrOp {\n        inline T operator()(const T& a, const T& b) const {\n            return a || b;\n        }\n    };\n\n\n    /// Provides collectives that interoperate with the AM and task interfaces\n\n    /// If native AM interoperates with MPI we probably should map these to MPI.\n    class WorldGopInterface {\n    private:\n        World& world_; ///< World object that this is a part of\n        std::shared_ptr<detail::DeferredCleanup> deferred_; ///< Deferred cleanup object.\n        bool debug_; ///< Debug mode\n        bool forbid_fence_=false; ///< forbid calling fence() in case of several active worlds\n        int max_reducebcast_msg_size_ = std::numeric_limits<int>::max();  ///< maximum size of messages (in bytes) sent by reduce and broadcast\n\n        friend class detail::DeferredCleanup;\n\n        // Message tags\n        struct PointToPointTag { };\n        struct LazySyncTag { };\n        struct GroupLazySyncTag { };\n        struct BcastTag { };\n        struct GroupBcastTag { };\n        struct ReduceTag { };\n        struct GroupReduceTag { };\n        struct AllReduceTag { };\n        struct GroupAllReduceTag { };\n\n\n        /// Delayed send callback object\n\n        /// This callback object is used to send local data to a remove process\n        /// once it has been set.\n        /// \\tparam keyT The data key\n        /// \\tparam valueT The type of data to be sent\n        template <typename keyT, typename valueT>\n        class DelayedSend : public CallbackInterface {\n        private:\n            World& world_; ///< The communication world\n            const ProcessID dest_; ///< The destination process id\n            const keyT key_; ///< The distributed id associated with \\c value_\n            Future<valueT> value_; ///< The data to be sent\n\n            // Not allowed\n            DelayedSend(const DelayedSend<keyT, valueT>&);\n            DelayedSend<keyT, valueT>& operator=(const DelayedSend<keyT, valueT>&);\n\n        public:\n\n            /// Constructor\n            DelayedSend(World& world, const ProcessID dest,\n                    const keyT& key, const Future<valueT>& value) :\n                        world_(world), dest_(dest), key_(key), value_(value)\n            { }\n\n            virtual ~DelayedSend() { }\n\n            /// Notify this object that the future has been set.\n\n            /// This will set the value of the future on the remote node and delete\n            /// this callback object.\n            virtual void notify() {\n                MADNESS_ASSERT(value_.probe());\n                world_.gop.send_internal(dest_, key_, value_.get());\n                delete this;\n            }\n        }; // class DelayedSend\n\n        /// Receive data from remote node\n\n        /// \\tparam valueT The data type stored in cache\n        /// \\param key The distributed ID\n        /// \\return A future to the data\n        template <typename valueT, typename keyT>\n        static Future<valueT> recv_internal(const keyT& key) {\n            return detail::DistCache<keyT>::template get_cache_value<valueT>(key);\n        }\n\n        /// Send \\c value to \\c dest\n\n        /// Send non-future data to \\c dest.\n        /// \\tparam keyT The key type\n        /// \\tparam valueT The value type\n        /// \\param dest The node where the data will be sent\n        /// \\param key The key that is associated with the data\n        /// \\param value The data to be sent to \\c dest\n        template <typename keyT, typename valueT>\n        typename std::enable_if<!is_future<valueT>::value >::type\n        send_internal(const ProcessID dest, const keyT& key, const valueT& value) const {\n            typedef detail::DistCache<keyT> dist_cache;\n\n            if(world_.rank() == dest) {\n                // When dest is this process, skip the task and set the future immediately.\n                dist_cache::set_cache_value(key, value);\n            } else {\n                // Spawn a remote task to set the value\n                world_.taskq.add(dest, dist_cache::template set_cache_value<valueT>, key,\n                        value, TaskAttributes::hipri());\n            }\n        }\n\n        /// Send \\c value to \\c dest\n\n        /// Send data that is stored in a future to \\c dest. The data in\n        /// \\c value is only sent to the remote process once it has been set.\n        /// \\tparam keyT The key type\n        /// \\tparam valueT The value type\n        /// \\param dest The node where the data will be sent\n        /// \\param key The key that is associated with the data\n        /// \\param value The data to be sent to \\c dest\n        template <typename keyT, typename valueT>\n        void send_internal(ProcessID dest, const keyT& key, const Future<valueT>& value) const {\n            typedef detail::DistCache<keyT> dist_cache;\n\n            if(world_.rank() == dest) {\n                dist_cache::set_cache_value(key, value);\n            } else {\n                // The destination is not this node, so send it to the destination.\n                if(value.probe()) {\n                    // Spawn a remote task to set the value\n                    world_.taskq.add(dest, dist_cache::template set_cache_value<valueT>, key,\n                            value.get(), TaskAttributes::hipri());\n                } else {\n                    // The future is not ready, so create a callback object that will\n                    // send value to the destination node when it is ready.\n                    DelayedSend<keyT, valueT>* delayed_send_callback =\n                            new DelayedSend<keyT, valueT>(world_, dest, key, value);\n                    const_cast<Future<valueT>&>(value).register_callback(delayed_send_callback);\n\n                }\n            }\n        }\n\n        /// Lazy sync parent task\n\n        /// Send signal to the parent process in the binary tree for a lazy sync\n        /// operation.\n        /// \\tparam keyT The key type\n        /// \\param parent The parent process of this process in the binary tree\n        /// \\param key The lazy sync key\n        template <typename keyT>\n        void lazy_sync_parent(const ProcessID parent, const keyT& key,\n                const ProcessID, const ProcessID) const\n        {\n            send_internal(parent, key, key.proc());\n        }\n\n        /// Lazy sync parent task\n\n        /// Send signal to the child processes in the binary tree for a lazy\n        /// sync operation. After the signal has been sent to the children, the\n        /// sync operation, \\c op, will be run.\n        /// \\tparam keyT The key type\n        /// \\tparam opT The sync operation type\n        /// \\param child0 The first child process of this process in the binary tree\n        /// \\param child1 The second child process of this process in the binary tree\n        /// \\param key The key associated with the sync operation\n        /// \\param op The sync operation that will be run\n        template <typename keyT, typename opT>\n        void lazy_sync_children(const ProcessID child0, const ProcessID child1,\n                const keyT& key, opT& op, const ProcessID) const\n        {\n            // Signal children to execute the operation.\n            if(child0 != -1)\n                send_internal(child0, key, 1);\n            if(child1 != -1)\n                send_internal(child1, key, 1);\n\n            // Execute the operation on this process.\n            op();\n        }\n\n        /// Start a distributed lazy sync operation\n\n        /// \\param key The sync key\n        /// \\param op The sync operation to be executed on this process\n        template <typename tagT, typename keyT, typename opT>\n        void lazy_sync_internal(const ProcessID parent, const ProcessID child0,\n                const ProcessID child1, const keyT& key, const opT& op) const {\n            typedef ProcessKey<keyT, tagT> key_type;\n\n            // Get signals from parent and children.\n            madness::Future<ProcessID> child0_signal = (child0 != -1 ?\n                    recv_internal<ProcessID>(key_type(key, child0)) :\n                    madness::Future<ProcessID>(-1));\n            madness::Future<ProcessID> child1_signal = (child1 != -1 ?\n                    recv_internal<ProcessID>(key_type(key, child1)) :\n                    madness::Future<ProcessID>(-1));\n            madness::Future<ProcessID> parent_signal = (parent != -1 ?\n                    recv_internal<ProcessID>(key_type(key, parent)) :\n                    madness::Future<ProcessID>(-1));\n\n            // Construct the task that notifies children to run the operation\n            key_type my_key(key, world_.rank());\n            auto lazy_sync_children_fn = & WorldGopInterface::template lazy_sync_children<key_type, opT>;\n            world_.taskq.add(*this, lazy_sync_children_fn,\n                    child0_signal, child1_signal, my_key, op, parent_signal,\n                    TaskAttributes::hipri());\n\n            // Send signal to parent\n            if(parent != -1) {\n                if(child0_signal.probe() && child1_signal.probe())\n                    send_internal(parent, my_key, world_.rank());\n                else {\n                    auto lazy_sync_parent_fn = & WorldGopInterface::template lazy_sync_parent<key_type>;\n                    world_.taskq.add(*this, lazy_sync_parent_fn,\n                            parent, my_key, child0_signal, child1_signal,\n                            TaskAttributes::hipri());\n                }\n            }\n        }\n\n\n        template <typename keyT, typename valueT, typename taskfnT>\n        static void bcast_handler(const AmArg& arg) {\n            // Deserialize message arguments\n            taskfnT taskfn;\n            keyT key;\n            valueT value;\n            ProcessID root;\n\n            arg & taskfn & key & value & root;\n\n            // Add task to queue\n            arg.get_world()->taskq.add(arg.get_world()->gop, taskfn, key,\n                    value, root, TaskAttributes::hipri());\n        }\n\n        template <typename keyT, typename valueT, typename taskfnT>\n        static void group_bcast_handler(const AmArg& arg) {\n            // Deserialize message arguments\n            taskfnT taskfn;\n            keyT key;\n            valueT value;\n            ProcessID group_root;\n            DistributedID group_key;\n\n            arg & taskfn & key & value & group_root & group_key;\n\n            // Get the local group\n            const Future<Group> group = Group::get_group(group_key);\n\n            // Add task to queue\n            arg.get_world()->taskq.add(arg.get_world()->gop, taskfn, key, value,\n                    group_root, group, TaskAttributes::hipri());\n        }\n\n\n        /// Broadcast task\n\n        /// This task will set the local cache with the broadcast data and send\n        /// it to child processes in the binary tree.\n        template <typename keyT, typename valueT>\n        void bcast_task(const keyT& key, const valueT& value, const ProcessID root) const {\n            typedef void (WorldGopInterface::*taskfnT)(const keyT&, const valueT&,\n                    const ProcessID) const;\n\n            // Compute binary tree data\n            ProcessID parent = -1, child0 = -1, child1 = -1;\n            world_.mpi.binary_tree_info(root, parent, child0, child1);\n\n            // Set the local data, except on the root process\n            if(parent != -1)\n                detail::DistCache<keyT>::set_cache_value(key, value);\n\n            if(child0 != -1) { // Check that this process has children in the binary tree\n\n                // Get handler function and arguments\n                void (*handler)(const AmArg&) =\n                        & WorldGopInterface::template bcast_handler<keyT, valueT, taskfnT>;\n                AmArg* const args0 = new_am_arg(\n                        & WorldGopInterface::template bcast_task<keyT, valueT>,\n                        key, value, root);\n\n                // Send active message to children\n                if(child1 != -1) {\n                    AmArg* const args1 = copy_am_arg(*args0);\n                    world_.am.send(child1, handler, args1, RMI::ATTR_UNORDERED);\n                }\n                world_.am.send(child0, handler, args0, RMI::ATTR_UNORDERED);\n            }\n        }\n\n        template <typename keyT, typename valueT>\n        void group_bcast_task(const keyT& key, const valueT& value,\n                const ProcessID group_root, const Group& group) const\n        {\n            typedef void (WorldGopInterface::*taskfnT)(const keyT&, const valueT&,\n                    const ProcessID, const Group&) const;\n\n            // Set the local data, except on the root process\n            ProcessID parent = -1, child0 = -1, child1 = -1;\n            group.make_tree(group_root, parent, child0, child1);\n\n            // Set the local data\n            if(parent != -1) {\n                detail::DistCache<keyT>::set_cache_value(key, value);\n                group.remote_update();\n            }\n\n            if(child0 != -1) { // Check that this process has children in the binary tree\n\n                // Get handler function and arguments\n                void (*handler)(const AmArg&) =\n                        & WorldGopInterface::template group_bcast_handler<keyT, valueT, taskfnT>;\n                AmArg* const args0 = new_am_arg(\n                        & WorldGopInterface::template group_bcast_task<keyT, valueT>,\n                        key, value, group_root, group.id());\n\n                // Send active message to children\n                if(child1 != -1) {\n                    AmArg* const args1 = copy_am_arg(*args0);\n                    world_.am.send(child1, handler, args1, RMI::ATTR_UNORDERED);\n                }\n                world_.am.send(child0, handler, args0, RMI::ATTR_UNORDERED);\n            }\n        }\n\n        /// Broadcast\n\n        /// Broadcast data from the \\c root process to all processes in \\c world.\n        /// The input/output data is held by \\c value.\n        /// \\tparam tagT The tag type that is attached to \\c keyT\n        /// \\tparam keyT The base key type\n        /// \\tparam valueT The value type that will be broadcast\n        /// \\param[in] key The key associated with this broadcast\n        /// \\param[in,out] value On the \\c root process, this is used as the input\n        /// data that will be broadcast to all other processes in the group.\n        /// On other processes it is used as the output to the broadcast\n        /// \\param root The process that owns the data to be broadcast\n        /// \\throw madness::Exception When \\c value has been set, except on the\n        /// \\c root process.\n        template <typename tagT, typename keyT, typename valueT>\n        void bcast_internal(const keyT& key, Future<valueT>& value, const ProcessID root) const {\n            MADNESS_ASSERT((root >= 0) && (root < world_.size()));\n            MADNESS_ASSERT((world_.rank() == root) || (! value.probe()));\n\n            // Add operation tag to key\n            typedef TaggedKey<keyT, tagT> key_type;\n            const key_type tagged_key(key);\n\n            if(world_.size() > 1) { // Do nothing for the trivial case\n                if(world_.rank() == root) {\n                    // This process owns the data to be broadcast.\n\n                    // Spawn remote tasks that will set the local cache for this\n                    // broadcast on other nodes.\n                    if(value.probe())\n                        // The value is ready so send it now\n                        bcast_task(tagged_key, value.get(), root);\n                    else {\n                        // The value is not ready so spawn a task to send the\n                        // data when it is ready.\n                        auto bcast_task_fn = & WorldGopInterface::template bcast_task<key_type, valueT>;\n                        world_.taskq.add(*this, bcast_task_fn,\n                                tagged_key, value, root, TaskAttributes::hipri());\n                    }\n                } else {\n                    MADNESS_ASSERT(! value.probe());\n\n                    // Get the broadcast value from local cache\n                    detail::DistCache<key_type>::get_cache_value(tagged_key, value);\n                }\n            }\n        }\n\n        /// Group broadcast\n\n        /// Broadcast data from the \\c group_root process to all processes in\n        /// \\c group. The input/output data is held by \\c value.\n        /// \\tparam tagT The tag type that is attached to \\c keyT\n        /// \\tparam keyT The base key type\n        /// \\tparam valueT The value type that will be broadcast\n        /// \\param[in] key The key associated with this broadcast\n        /// \\param[in,out] value On the \\c group_root process, this is used as the\n        /// input data that will be broadcast to all other processes in the group.\n        /// On other processes it is used as the output to the broadcast\n        /// \\param group_root The process in \\c group that owns the data to be\n        /// broadcast\n        /// \\param group The process group where value will be broadcast\n        /// \\throw madness::Exception When \\c value has been set, except on the\n        /// \\c group_root process.\n        template <typename tagT, typename keyT, typename valueT>\n        void bcast_internal(const keyT& key, Future<valueT>& value,\n                const ProcessID group_root, const Group& group) const\n        {\n            // Construct the internal broadcast key\n            typedef TaggedKey<keyT, tagT> key_type;\n            const key_type tagged_key(key);\n\n            if(group.rank() == group_root) {\n                // This process owns the data to be broadcast.\n                if(value.probe())\n                    group_bcast_task(tagged_key, value.get(), group_root, group);\n                else {\n                    auto group_bcast_task_fn = & WorldGopInterface::template group_bcast_task<key_type, valueT>;\n                    world_.taskq.add(this, group_bcast_task_fn,\n                            tagged_key, value, group_root, group,\n                            TaskAttributes::hipri());\n                }\n            } else {\n                MADNESS_ASSERT(! value.probe());\n\n                // This is not the root process, so retrieve the broadcast data\n                detail::DistCache<key_type>::get_cache_value(tagged_key, value);\n\n                // Increment local use counter for group\n                group.local_update();\n            }\n        }\n\n        template <typename valueT, typename opT>\n        static typename detail::result_of<opT>::type\n        reduce_task(const valueT& value, const opT& op) {\n            typename detail::result_of<opT>::type result = op();\n            op(result, value);\n            return result;\n        }\n\n        template <typename opT>\n        static typename detail::result_of<opT>::type\n        reduce_result_task(const std::vector<Future<typename detail::result_of<opT>::type> >& results,\n                const opT& op)\n        {\n            MADNESS_ASSERT(results.size() != 0ul);\n            Future<typename detail::result_of<opT>::type> result = results.front();\n            for(std::size_t i = 1ul; i < results.size(); ++i)\n                op(result.get(), results[i].get());\n            return result.get();\n        }\n\n        /// Distributed reduce\n\n        /// \\tparam tagT The tag type to be added to the key type\n        /// \\tparam keyT The key type\n        /// \\tparam valueT The data type to be reduced\n        /// \\tparam opT The reduction operation type\n        /// \\param key The key associated with this reduction\n        /// \\param value The local value to be reduced\n        /// \\param op The reduction operation to be applied to local and remote data\n        /// \\param root The process that will receive the result of the reduction\n        /// \\return A future to the reduce value on the root process, otherwise an\n        /// uninitialized future that may be ignored.\n        template <typename tagT, typename keyT, typename valueT, typename opT>\n        Future<typename detail::result_of<opT>::type>\n        reduce_internal(const ProcessID parent, const ProcessID child0,\n                const ProcessID child1, const ProcessID root, const keyT& key,\n                const valueT& value, const opT& op)\n        {\n            // Create tagged key\n            typedef ProcessKey<keyT, tagT> key_type;\n            typedef typename detail::result_of<opT>::type result_type;\n            typedef typename remove_future<valueT>::type value_type;\n            std::vector<Future<result_type> > results;\n            results.reserve(3);\n\n            // Add local data to vector of values to reduce\n            results.push_back(world_.taskq.add(WorldGopInterface::template reduce_task<value_type, opT>,\n                    value, op, TaskAttributes::hipri()));\n\n            // Reduce child data\n            if(child0 != -1)\n                results.push_back(recv_internal<result_type>(key_type(key, child0)));\n            if(child1 != -1)\n                results.push_back(recv_internal<result_type>(key_type(key, child1)));\n\n            // Submit the local reduction task\n            Future<result_type> local_result =\n                    world_.taskq.add(WorldGopInterface::template reduce_result_task<opT>,\n                            results, op, TaskAttributes::hipri());\n\n            // Send reduced value to parent or, if this is the root process, set the\n            // result future.\n            if(parent == -1)\n                return local_result;\n            else\n                send_internal(parent, key_type(key, world_.rank()), local_result);\n\n            return Future<result_type>::default_initializer();\n        }\n\n        /// Implementation of fence\n\n        /// \\param[in] epilogue the action to execute (by the calling thread) immediately after the fence\n        /// \\param[in] pause_during_epilogue whether to suspend work while executing epilogue\n        /// \\param[in] debug set to true to print progress statistics using madness::print(); the default is false.\n        /// \\warning currently only \\c pause_during_epilogue=false is supported\n        void fence_impl(std::function<void()> epilogue = []{},\n                        bool pause_during_epilogue = false,\n                        bool debug = false);\n\n        int initial_max_reducebcast_msg_size() {\n          int result = std::numeric_limits<int>::max();\n          const auto* initial_max_reducebcast_msg_size_cstr = std::getenv(\"MAD_MAX_REDUCEBCAST_MSG_SIZE\");\n          if (initial_max_reducebcast_msg_size_cstr) {\n            auto result_u64 = cstr_to_memory_size(initial_max_reducebcast_msg_size_cstr);\n            const auto do_print = SafeMPI::COMM_WORLD.Get_rank() == 0 && !madness::quiet();\n            if (result_u64>std::numeric_limits<int>::max()) {\n              if (do_print)\n                std::cout\n                    << \"!!MADNESS WARNING: Invalid value for environment variable MAD_MAX_REDUCEBCAST_MSG_SIZE.\\n\"\n                    << \"!!MADNESS WARNING: MAD_MAX_REDUCEBCAST_MSG_SIZE = \"\n                    << result_u64 << \"\\n\";\n              result = std::numeric_limits<int>::max();\n            }\n            result = static_cast<int>(result_u64);\n            if(do_print) {\n              std::cout\n                  << \"MADNESS max msg size for GOP reduce/broadcast set to \"\n                  << result << \" bytes.\\n\";\n            }\n          }\n          return result;\n        }\n\n    public:\n\n        // In the World constructor can ONLY rely on MPI and MPI being initialized\n        WorldGopInterface(World& world) :\n            world_(world), deferred_(new detail::DeferredCleanup()), debug_(false), max_reducebcast_msg_size_(initial_max_reducebcast_msg_size())\n        { }\n\n        ~WorldGopInterface() {\n            deferred_->destroy(true);\n            deferred_->do_cleanup();\n        }\n\n\n        /// Set debug flag to new value and return old value\n        bool set_debug(bool value) {\n            bool status = debug_;\n            debug_ = value;\n            return status;\n        }\n\n        /// Set forbid_fence flag to new value and return old value\n        bool set_forbid_fence(bool value) {\n            bool status = forbid_fence_;\n            forbid_fence_ = value;\n            return status;\n        }\n\n        /// Set the maximum size of messages (in bytes) sent by reduce and broadcast\n\n        /// \\param sz the maximum size of messages (in bytes) sent by reduce and broadcast\n        /// \\return the previous maximum size of messages (in bytes) sent by reduce and broadcast\n        /// \\pre `sz>0`\n        int set_max_reducebcast_msg_size(int sz) {\n          MADNESS_ASSERT(sz>0);\n          std::swap(max_reducebcast_msg_size_,sz);\n          return max_reducebcast_msg_size_;\n        }\n\n\n        /// Returns the maximum size of messages (in bytes) sent by reduce and broadcast\n\n        /// \\return the maximum size of messages (in bytes) sent by reduce and broadcast\n        int max_reducebcast_msg_size() const {\n          return max_reducebcast_msg_size_;\n        }\n\n        /// Synchronizes all processes in communicator ... does NOT fence pending AM or tasks\n        void barrier() {\n            long i = world_.rank();\n            sum(i);\n            if (i != world_.size()*(world_.size()-1)/2) error(\"bad value after sum in barrier\");\n        }\n\n\n        /// Synchronizes all processes in communicator AND globally ensures no pending AM or tasks\n\n        /// \\internal Runs Dykstra-like termination algorithm on binary tree by\n        /// locally ensuring ntask=0 and all am sent and processed,\n        /// and then participating in a global sum of nsent and nrecv.\n        /// Then globally checks that nsent=nrecv and that both are\n        /// constant over two traversals.  We are then sure\n        /// that all tasks and AM are processed and there no AM in\n        /// flight.\n        /// \\param[in] debug set to true to print progress statistics using madness::print(); the default is false.\n        void fence(bool debug = false);\n\n        /// Executes an action on single (this) thread after ensuring all other work is done\n\n        /// \\param[in] action the action to execute (by the calling thread)\n        void serial_invoke(std::function<void()> action);\n\n        /// Broadcasts bytes from process root while still processing AM & tasks\n\n        /// Optimizations can be added for long messages\n        void broadcast(void* buf, size_t nbyte, ProcessID root, bool dowork = true, Tag bcast_tag = -1);\n\n\n        /// Broadcasts typed contiguous data from process root while still processing AM & tasks\n\n        /// Optimizations can be added for long messages\n        template <typename T, typename = std::enable_if_t<madness::is_trivially_copyable_v<T>>>\n        inline void broadcast(T* buf, size_t nelem, ProcessID root) {\n            broadcast((void *) buf, nelem*sizeof(T), root);\n        }\n\n        /// Broadcast of a scalar from node 0 to all other nodes\n        template <typename T, typename = std::enable_if_t<madness::is_trivially_copyable_v<T>>>\n        void broadcast(T& t) {\n            broadcast(&t, 1, 0);\n        }\n\n        /// Broadcast of a scalar from node root to all other nodes\n        template <typename T, typename = std::enable_if_t<madness::is_trivially_copyable_v<T>>>\n        void broadcast(T& t, ProcessID root) {\n            broadcast(&t, 1, root);\n        }\n\n        /// Broadcast a serializable object\n        template <typename objT,\n                  typename = std::void_t<decltype(std::declval<archive::BufferInputArchive&>()&std::declval<objT&>())>,\n                  typename = std::void_t<decltype(std::declval<archive::BufferOutputArchive&>()&std::declval<const objT&>())>>\n        void broadcast_serializable(objT& obj, ProcessID root) {\n            MADNESS_ASSERT(root < world_.size());\n            if (world_.size() == 1) return;\n\n            size_t BUFLEN;\n            if (world_.rank() == root) {\n                archive::BufferOutputArchive count;\n                count & obj;\n                BUFLEN = count.size();\n            }\n            broadcast(BUFLEN, root);\n\n            unsigned char* buf = new unsigned char[BUFLEN];\n            if (world_.rank() == root) {\n                archive::BufferOutputArchive ar(buf,BUFLEN);\n                ar & obj;\n            }\n            broadcast(buf, BUFLEN, root);\n            if (world_.rank() != root) {\n                archive::BufferInputArchive ar(buf,BUFLEN);\n                ar & obj;\n            }\n            delete [] buf;\n        }\n\n        /// Inplace global reduction (like MPI all_reduce) while still processing AM & tasks\n\n        /// Optimizations can be added for long messages and to reduce the memory footprint\n        template <typename T, class opT>\n            void reduce(T* buf, std::size_t nelem, opT op) {\n          static_assert(madness::is_trivially_copyable_v<T>, \"T must be trivially copyable\");\n\n          ProcessID parent, child0, child1;\n          world_.mpi.binary_tree_info(0, parent, child0, child1);\n          const std::size_t nelem_per_maxmsg =\n              max_reducebcast_msg_size() / sizeof(T);\n\n          const auto buf_size = ((sizeof(T) * std::min(nelem_per_maxmsg, nelem) +\n                                 std::alignment_of_v<T> - 1) /\n                                std::alignment_of_v<T>) * std::alignment_of_v<T>;\n          struct free_dtor {\n            void operator()(T *ptr) {\n              if (ptr != nullptr)\n                std::free(ptr);\n            };\n          };\n          using sptr_t = std::unique_ptr<T[], free_dtor>;\n\n          auto aligned_buf_alloc = [&]() -> T* {\n            // posix_memalign requires alignment to be an integer multiple of sizeof(void*)!! so ensure that\n            const std::size_t alignment =\n                ((std::alignment_of_v<T> + sizeof(void *) - 1) /\n                 sizeof(void *)) *\n                sizeof(void *);\n#ifdef HAVE_POSIX_MEMALIGN\n            void *ptr;\n            if (posix_memalign(&ptr, alignment, buf_size) != 0) {\n              throw std::bad_alloc();\n            }\n            return static_cast<T *>(ptr);\n#else\n            return static_cast<T *>(std::aligned_alloc(alignment, buf_size));\n#endif\n          };\n\n          sptr_t buf0;\n          if (child0 != -1)\n            buf0 = sptr_t(aligned_buf_alloc(),\n                          free_dtor{});\n          sptr_t buf1(nullptr);\n          if (child1 != -1)\n            buf1 = sptr_t(aligned_buf_alloc(),\n                          free_dtor{});\n\n          auto reduce_impl = [&,this](T* buf, size_t nelem) {\n            MADNESS_ASSERT(nelem <= nelem_per_maxmsg);\n            SafeMPI::Request req0, req1;\n            Tag gsum_tag = world_.mpi.unique_tag();\n\n            if (child0 != -1)\n              req0 = world_.mpi.Irecv(buf0.get(), nelem * sizeof(T), MPI_BYTE,\n                                      child0, gsum_tag);\n            if (child1 != -1)\n              req1 = world_.mpi.Irecv(buf1.get(), nelem * sizeof(T), MPI_BYTE,\n                                      child1, gsum_tag);\n\n            if (child0 != -1) {\n              World::await(req0);\n              for (long i = 0; i < (long)nelem; ++i)\n                buf[i] = op(buf[i], buf0[i]);\n            }\n            if (child1 != -1) {\n              World::await(req1);\n              for (long i = 0; i < (long)nelem; ++i)\n                buf[i] = op(buf[i], buf1[i]);\n            }\n\n            if (parent != -1) {\n              req0 = world_.mpi.Isend(buf, nelem * sizeof(T), MPI_BYTE, parent,\n                                      gsum_tag);\n              World::await(req0);\n            }\n\n            broadcast(buf, nelem, 0);\n          };\n\n          while (nelem) {\n            const int n = std::min(nelem_per_maxmsg, nelem);\n            reduce_impl(buf, n);\n            nelem -= n;\n            buf += n;\n          }\n        }\n\n        /// Inplace global sum while still processing AM & tasks\n        template <typename T>\n        inline void sum(T* buf, size_t nelem) {\n            reduce< T, WorldSumOp<T> >(buf, nelem, WorldSumOp<T>());\n        }\n\n        /// Inplace global min while still processing AM & tasks\n        template <typename T>\n        inline void min(T* buf, size_t nelem) {\n            reduce< T, WorldMinOp<T> >(buf, nelem, WorldMinOp<T>());\n        }\n\n        /// Inplace global max while still processing AM & tasks\n        template <typename T>\n        inline void max(T* buf, size_t nelem) {\n            reduce< T, WorldMaxOp<T> >(buf, nelem, WorldMaxOp<T>());\n        }\n\n        /// Inplace global absmin while still processing AM & tasks\n        template <typename T>\n        inline void absmin(T* buf, size_t nelem) {\n            reduce< T, WorldAbsMinOp<T> >(buf, nelem, WorldAbsMinOp<T>());\n        }\n\n        /// Inplace global absmax while still processing AM & tasks\n        template <typename T>\n        inline void absmax(T* buf, size_t nelem) {\n            reduce< T, WorldAbsMaxOp<T> >(buf, nelem, WorldAbsMaxOp<T>());\n        }\n\n        /// Inplace global product while still processing AM & tasks\n        template <typename T>\n        inline void product(T* buf, size_t nelem) {\n            reduce< T, WorldMultOp<T> >(buf, nelem, WorldMultOp<T>());\n        }\n\n        template <typename T>\n        inline void bit_and(T* buf, size_t nelem) {\n            reduce< T, WorldBitAndOp<T> >(buf, nelem, WorldBitAndOp<T>());\n        }\n\n        template <typename T>\n        inline void bit_or(T* buf, size_t nelem) {\n            reduce< T, WorldBitOrOp<T> >(buf, nelem, WorldBitOrOp<T>());\n        }\n\n        template <typename T>\n        inline void bit_xor(T* buf, size_t nelem) {\n            reduce< T, WorldBitXorOp<T> >(buf, nelem, WorldBitXorOp<T>());\n        }\n\n        template <typename T>\n        inline void logic_and(T* buf, size_t nelem) {\n            reduce< T, WorldLogicAndOp<T> >(buf, nelem, WorldLogicAndOp<T>());\n        }\n\n        template <typename T>\n        inline void logic_or(T* buf, size_t nelem) {\n            reduce< T, WorldLogicOrOp<T> >(buf, nelem, WorldLogicOrOp<T>());\n        }\n\n        /// Global sum of a scalar while still processing AM & tasks\n        template <typename T>\n        void sum(T& a) {\n            sum(&a, 1);\n        }\n\n        /// Global max of a scalar while still processing AM & tasks\n        template <typename T>\n        void max(T& a) {\n            max(&a, 1);\n        }\n\n        /// Global min of a scalar while still processing AM & tasks\n        template <typename T>\n        void min(T& a) {\n            min(&a, 1);\n        }\n\n        /// Concatenate an STL vector of serializable stuff onto node 0\n\n        /// \\param[in] v input vector\n        /// \\param[in] bufsz the max number of bytes in the result; must be less than std::numeric_limits<int>::max()\n        /// \\return on rank 0 returns the concatenated vector, elsewhere returns an empty vector\n        template <typename T>\n        std::vector<T> concat0(const std::vector<T>& v, size_t bufsz=1024*1024) {\n            MADNESS_ASSERT(bufsz <= std::numeric_limits<int>::max());\n            // bufsz must be multiple of alignment!!! so ensure that\n            bufsz = ((bufsz + sizeof(void*) - 1) / sizeof(void*)) * sizeof(void*);\n\n            ProcessID parent, child0, child1;\n            world_.mpi.binary_tree_info(0, parent, child0, child1);\n            int child0_nbatch = 0, child1_nbatch = 0;\n\n            struct free_dtor {\n              void operator()(std::byte *ptr) {\n                if (ptr != nullptr)\n                  std::free(ptr);\n              };\n            };\n            using sptr_t = std::unique_ptr<std::byte[], free_dtor>;\n\n            auto aligned_buf_alloc = [&]() -> std::byte* {\n#ifdef HAVE_POSIX_MEMALIGN\n                void *ptr;\n                if (posix_memalign(&ptr, sizeof(void *), bufsz) != 0) {\n                    throw std::bad_alloc();\n                }\n                return static_cast<std::byte *>(ptr);\n#else\n                return static_cast<std::byte *>(\n                    std::aligned_alloc(sizeof(void *), bufsz));\n#endif\n            };\n\n            auto buf0 = sptr_t(aligned_buf_alloc(),\n                               free_dtor{});\n            auto buf1 = sptr_t(aligned_buf_alloc(),\n                               free_dtor{});\n\n            // transfer data in chunks at most this large\n            const int batch_size = static_cast<int>(\n                std::min(static_cast<size_t>(max_reducebcast_msg_size()), bufsz));\n\n            // precompute max # of tags any node ... will need, and allocate them on every node to avoid tag counter divergence\n            const int max_nbatch = bufsz / batch_size;\n            // one tag is reserved for sending the number of messages to expect and the size of the last message\n            const int max_ntags = max_nbatch + 1;\n            MADNESS_ASSERT(max_nbatch < world_.mpi.unique_tag_period());\n            std::vector<Tag> tags;  // stores tags used to send each batch\n            tags.reserve(max_nbatch);\n            for(int t=0; t<max_ntags; ++t) tags.push_back(world_.mpi.unique_tag());\n\n            if (child0 != -1 || child1 != -1) {\n              // receive # of batches\n\n              auto receive_nbatch = [&,this]() {\n                if (child0 != -1) {\n                  world_.mpi.Recv(&child0_nbatch, 1, MPI_INT, child0,\n                                          tags[0]);\n                }\n                if (child1 != -1) {\n                  world_.mpi.Recv(&child1_nbatch, 1, MPI_INT, child1,\n                                          tags[0]);\n                }\n              };\n\n              receive_nbatch();\n\n              // receive data in batches\n\n              auto receive_batch = [&,this](const int batch, const size_t buf_offset) {\n                SafeMPI::Request req0, req1;\n                if (child0 != -1 && batch < child0_nbatch) {\n                  int msg_size = batch_size;\n                  // if last batch, receive # of bytes to expect\n                  if (batch + 1 == child0_nbatch) {\n                    auto req = world_.mpi.Irecv(\n                        &msg_size, 1, MPI_INT, child0, tags[0]);\n                    World::await(req);\n                  }\n\n                  req0 = world_.mpi.Irecv(buf0.get() + buf_offset,\n                                          msg_size, MPI_BYTE, child0,\n                                          tags[batch + 1]);\n                }\n                if (child1 != -1 && batch < child1_nbatch) {\n                  int msg_size = batch_size;\n                  // if last batch, receive # of bytes to expect\n                  if (batch + 1 == child1_nbatch) {\n                    auto req = world_.mpi.Irecv(\n                        &msg_size, 1, MPI_INT, child1, tags[0]);\n                    World::await(req);\n                  }\n                  req1 = world_.mpi.Irecv(buf1.get() + buf_offset,\n                                          msg_size, MPI_BYTE, child1,\n                                          tags[batch + 1]);\n                }\n\n                if (child0 != -1 && batch < child0_nbatch) {\n                  World::await(req0);\n                }\n                if (child1 != -1 && batch < child1_nbatch) {\n                  World::await(req1);\n                }\n              };\n\n              size_t buf_offset = 0;\n              int batch = 0;\n              while (buf_offset < bufsz) {\n                receive_batch(batch, buf_offset);\n                buf_offset += batch_size;\n                buf_offset = std::min(buf_offset, bufsz);\n                ++batch;\n              }\n            }\n\n\n            std::vector<T> left, right;\n            if (child0 != -1) {\n              archive::BufferInputArchive ar(buf0.get(), bufsz);\n              ar & left;\n            }\n            if (child1 != -1) {\n              archive::BufferInputArchive ar(buf1.get(), bufsz);\n              ar & right;\n              for (unsigned int i = 0; i < right.size(); ++i)\n                left.push_back(right[i]);\n            }\n            for (unsigned int i=0; i<v.size(); ++i) left.push_back(v[i]);\n\n            // send data in batches\n            if (parent != -1) {\n              archive::BufferOutputArchive ar(buf0.get(), bufsz);\n              ar & left;\n              const auto total_nbytes_to_send = ar.size();\n\n              // send nbatches to expect\n              const int nbatch = (total_nbytes_to_send + batch_size - 1) / batch_size;\n              world_.mpi.Send(&nbatch, 1, MPI_INT, parent,\n                              tags[0]);\n\n              size_t buf_offset = 0;\n              int batch = 0;\n              while (buf_offset < bufsz) {\n\n                // send data in batches\n                auto send_batch = [&,this](const int batch, const size_t buf_offset) {\n                  const int nbytes_to_send = static_cast<int>(\n                      std::min(static_cast<size_t>(batch_size),\n                               total_nbytes_to_send - buf_offset));\n                  // if last batch, send # of bytes to expect\n                  if (batch + 1 == nbatch) {\n                    auto req = world_.mpi.Isend(\n                        &nbytes_to_send, 1, MPI_INT, parent, tags[0]);\n                    World::await(req);\n                  }\n                  auto req0 =\n                      world_.mpi.Isend(buf0.get() + buf_offset, nbytes_to_send,\n                                       MPI_BYTE, parent, tags[batch + 1]);\n                  World::await(req0);\n                };\n\n                send_batch(batch, buf_offset);\n                buf_offset += batch_size;\n                buf_offset = std::min(buf_offset, bufsz);\n                ++batch;\n              }\n            }\n\n            if (parent == -1) return left;\n            else return std::vector<T>();\n        }\n\n        /// Receive data from \\c source\n\n        /// \\tparam valueT The data type stored in cache\n        /// \\tparam keyT The key type\n        /// \\param source The process that is sending the data to this process\n        /// \\param key The key associated with the received data\n        /// \\return A future that will be set with the received data\n        /// \\note It is the user's responsibility to ensure that \\c key does not\n        /// conflict with other calls to \\c recv. Keys may be reused after the\n        /// associated operation has finished.\n        template <typename valueT, typename keyT>\n        static Future<valueT> recv(const ProcessID source, const keyT& key) {\n            return recv_internal<valueT>(ProcessKey<keyT, PointToPointTag>(key, source));\n        }\n\n        /// Send value to \\c dest\n\n        /// \\tparam keyT The key type\n        /// \\tparam valueT The value type (this may be a \\c Future type)\n        /// \\param dest The process where the data will be sent\n        /// \\param key The key that is associated with the data\n        /// \\param value The data to be sent to \\c dest\n        /// \\note It is the user's responsibility to ensure that \\c key does not\n        /// conflict with other calls to \\c send. Keys may be reused after the\n        /// associated operation has finished.\n        template <typename keyT, typename valueT>\n        void send(const ProcessID dest, const keyT& key, const valueT& value) const {\n            send_internal(dest, ProcessKey<keyT, PointToPointTag>(key, world_.rank()), value);\n        }\n\n        /// Lazy sync\n\n        /// Lazy sync functions are asynchronous barriers with a nullary functor\n        /// that is called after all processes have called it with the same\n        /// key. You can think of lazy_sync as an asynchronous barrier. The\n        /// lazy_sync functor must have the following signature:\n        /// \\code\n        /// class SyncFunc {\n        /// public:\n        ///     // typedefs\n        ///     typedef void result_type;\n        ///\n        ///     // Constructors\n        ///     SyncFunc(const SyncFunc&);\n        ///\n        ///     // The function that performs the sync operation\n        ///     void operator()();\n        ///\n        /// }; // class SyncFunc\n        /// \\endcode\n        /// \\tparam keyT The key type\n        /// \\tparam opT The operation type\n        /// \\param key The sync key\n        /// \\param op The sync operation to be executed on this process\n        /// \\note It is the user's responsibility to ensure that \\c key does not\n        /// conflict with other calls to \\c lazy_sync. Keys may be reused after\n        /// the associated operation has finished.\n        template <typename keyT, typename opT>\n        void lazy_sync(const keyT& key, const opT& op) const {\n            if(world_.size() > 1) { // Do nothing for the trivial case\n                // Get the binary tree data\n                Hash<keyT> hasher;\n                const ProcessID root = hasher(key) % world_.size();\n                ProcessID parent = -1, child0 = -1, child1 = -1;\n                world_.mpi.binary_tree_info(root, parent, child0, child1);\n\n                lazy_sync_internal<LazySyncTag>(parent, child0, child1, key, op);\n            } else {\n                auto lazy_sync_children_fn = & WorldGopInterface::template lazy_sync_children<keyT, opT>;\n                // There is only one process, so run the sync operation now.\n                world_.taskq.add(*this, lazy_sync_children_fn,\n                        -1, -1, key, op, -1, TaskAttributes::hipri());\n            }\n        }\n\n\n        /// Group lazy sync\n\n        /// Lazy sync functions are asynchronous barriers with a nullary functor\n        /// that is called after all processes in the group have called it with\n        /// the same key. You can think of lazy_sync as an asynchronous barrier.\n        /// The \\c op functor must have the following signature:\n        /// \\code\n        /// class SyncFunc {\n        /// public:\n        ///     // typedefs\n        ///     typedef void result_type;\n        ///\n        ///     // Constructors\n        ///     SyncFunc(const SyncFunc&);\n        ///\n        ///     // The function that performs the sync operation\n        ///     void operator()();\n        ///\n        /// }; // class SyncFunc\n        /// \\endcode\n        /// \\tparam keyT The key type\n        /// \\tparam opT The operation type\n        /// \\param key The sync key\n        /// \\param op The sync operation to be executed on this process\n        /// \\note It is the user's responsibility to ensure that \\c key does not\n        /// conflict with other calls to \\c lazy_sync. Keys may be reused after\n        /// the associated operation has finished.\n        template <typename keyT, typename opT>\n        void lazy_sync(const keyT& key, const opT& op, const Group& group) const {\n            MADNESS_ASSERT(! group.empty());\n            MADNESS_ASSERT(group.get_world().id() == world_.id());\n\n            if(group.size() > 1) { // Do nothing for the trivial case\n                // Get the binary tree data\n                Hash<keyT> hasher;\n                const ProcessID group_root = hasher(key) % group.size();\n                ProcessID parent = -1, child0 = -1, child1 = -1;\n                group.make_tree(group_root, parent, child0, child1);\n\n                lazy_sync_internal<GroupLazySyncTag>(parent, child0, child1, key, op);\n            } else {\n                auto lazy_sync_children_fn = & WorldGopInterface::template lazy_sync_children<keyT, opT>;\n                world_.taskq.add(*this, lazy_sync_children_fn,\n                        -1, -1, key, op, -1, TaskAttributes::hipri());\n            }\n        }\n\n        /// Broadcast\n\n        /// Broadcast data from the \\c root process to all processes. The input/\n        /// output data is held by \\c value.\n        /// \\param[in] key The key associated with this broadcast\n        /// \\param[in,out] value On the \\c root process, this is used as the input\n        /// data that will be broadcast to all other processes. On other\n        /// processes it is used as the output to the broadcast.\n        /// \\param root The process that owns the data to be broadcast\n        /// \\throw madness::Exception When \\c root is less than 0 or greater\n        /// than or equal to the world size.\n        /// \\throw madness::Exception When \\c value has been set, except on the\n        /// \\c root process.\n        /// \\note It is the user's responsibility to ensure that \\c key does not\n        /// conflict with other calls to \\c bcast. Keys may be reused after\n        /// the associated operation has finished.\n        template <typename keyT, typename valueT>\n        void bcast(const keyT& key, Future<valueT>& value, const ProcessID root) const {\n            MADNESS_ASSERT((root >= 0) && (root < world_.size()));\n            MADNESS_ASSERT((world_.rank() == root) || (! value.probe()));\n\n            if(world_.size() > 1) // Do nothing for the trivial case\n                bcast_internal<BcastTag>(key, value, root);\n        }\n\n        /// Group broadcast\n\n        /// Broadcast data from the \\c group_root process to all processes in\n        /// \\c group. The input/output data is held by \\c value.\n        /// \\param[in] key The key associated with this broadcast\n        /// \\param[in,out] value On the \\c group_root process, this is used as the\n        /// input data that will be broadcast to all other processes in the group.\n        /// On other processes it is used as the output to the broadcast\n        /// \\param group_root The process in \\c group that owns the data to be\n        /// broadcast\n        /// \\param group The process group where value will be broadcast\n        /// \\throw madness::Exception When \\c group is empty\n        /// \\throw madness::Exception When \\c group is not registered\n        /// \\throw madness::Exception When the world id of \\c group is not\n        /// equal to that of the world used to construct this object\n        /// \\throw madness::Exception When this process is not in the group\n        /// \\throw madness::Exception When \\c group_root is less than 0 or\n        /// greater than or equal to \\c group size\n        /// \\throw madness::Exception When \\c data has been set except on the\n        /// \\c root process\n        /// \\note It is the user's responsibility to ensure that \\c key does not\n        /// conflict with other calls to \\c bcast. Keys may be reused after\n        /// the associated operation has finished.\n        template <typename keyT, typename valueT>\n        void bcast(const keyT& key, Future<valueT>& value,\n                const ProcessID group_root, const Group& group) const\n        {\n            MADNESS_ASSERT(! group.empty());\n            MADNESS_ASSERT(group.get_world().id() == world_.id());\n            MADNESS_ASSERT((group_root >= 0) && (group_root < group.size()));\n            MADNESS_ASSERT((group.rank() == group_root) || (! value.probe()));\n\n            if(group.size() > 1) // Do nothing for the trivial case\n                bcast_internal<GroupBcastTag>(key, value, group_root, group);\n        }\n\n        /// Distributed reduce\n\n        /// The reduce functor must have the following signature:\n        /// \\code\n        /// class ReduceFunc {\n        /// public:\n        ///     // Typedefs\n        ///     typedef ... result_type;\n        ///     typedef ... argument_type;\n        ///\n        ///     // Constructors\n        ///     ReduceFunc(const ReduceFunc&);\n        ///\n        ///     // Initialization operation, which returns a default result object\n        ///     result_type operator()() const;\n        ///\n        ///     // Reduce two result objects\n        ///     void operator()(result_type&, const result_type&) const;\n        ///\n        ///     // Reduce a result object and an argument object\n        ///     void operator()(result_type&, const argument_type&) const;\n        /// }; // class ReduceFunc\n        /// \\endcode\n        /// \\tparam keyT The key type\n        /// \\tparam valueT The data type to be reduced\n        /// \\tparam opT The reduction operation type\n        /// \\param key The key associated with this reduction\n        /// \\param value The local value to be reduced\n        /// \\param op The reduction operation to be applied to local and remote data\n        /// \\param root The process that will receive the result of the reduction\n        /// \\return A future to the reduce value on the root process, otherwise an\n        /// uninitialized future that may be ignored.\n        /// \\note It is the user's responsibility to ensure that \\c key does not\n        /// conflict with other calls to \\c reduce. Keys may be reused after\n        /// the associated operation has finished.\n        template <typename keyT, typename valueT, typename opT>\n        Future<typename detail::result_of<opT>::type>\n        reduce(const keyT& key, const valueT& value, const opT& op, const ProcessID root) {\n            MADNESS_ASSERT((root >= 0) && (root < world_.size()));\n\n            // Get the binary tree data\n            ProcessID parent = -1, child0 = -1, child1 = -1;\n            world_.mpi.binary_tree_info(root, parent, child0, child1);\n\n            return reduce_internal<ReduceTag>(parent, child0, child1, root, key,\n                    value, op);\n        }\n\n        /// Distributed group reduce\n\n        /// The reduce functor must have the following signature:\n        /// \\code\n        /// class ReduceFunc {\n        /// public:\n        ///     // Typedefs\n        ///     typedef ... result_type;\n        ///     typedef ... argument_type;\n        ///\n        ///     // Constructors\n        ///     ReduceFunc(const ReduceFunc&);\n        ///\n        ///     // Initialization operation, which returns a default result object\n        ///     result_type operator()() const;\n        ///\n        ///     // Reduce two result objects\n        ///     void operator()(result_type&, const result_type&) const;\n        ///\n        ///     // Reduce a result object and an argument object\n        ///     void operator()(result_type&, const argument_type&) const;\n        /// }; // class ReduceFunc\n        /// \\endcode\n        /// \\tparam keyT The key type\n        /// \\tparam valueT The data type to be reduced\n        /// \\tparam opT The reduction operation type\n        /// \\param key The key associated with this reduction\n        /// \\param value The local value to be reduced\n        /// \\param op The reduction operation to be applied to local and remote data\n        /// \\param group_root The group process that will receive the result of the reduction\n        /// \\param group The group that will preform the reduction\n        /// \\return A future to the reduce value on the root process, otherwise an\n        /// uninitialized future that may be ignored.\n        /// \\throw madness::Exception When \\c group is empty\n        /// \\throw madness::Exception When \\c group is not registered\n        /// \\throw madness::Exception When the world id of \\c group is not\n        /// equal to that of the world used to construct this object\n        /// \\throw madness::Exception When this process is not in the group\n        /// \\throw madness::Exception When \\c group_root is less than zero or\n        /// greater than or equal to \\c group size.\n        /// \\note It is the user's responsibility to ensure that \\c key does not\n        /// conflict with other calls to \\c reduce. Keys may be reused after\n        /// the associated operation has finished.\n        template <typename keyT, typename valueT, typename opT>\n        Future<typename detail::result_of<opT>::type>\n        reduce(const keyT& key, const valueT& value, const opT& op,\n                const ProcessID group_root, const Group& group)\n        {\n            MADNESS_ASSERT(! group.empty());\n            MADNESS_ASSERT(group.get_world().id() == world_.id());\n            MADNESS_ASSERT((group_root >= 0) && (group_root < group.size()));\n\n            // Get the binary tree data\n            ProcessID parent = -1, child0 = -1, child1 = -1;\n            group.make_tree(group_root, parent, child0, child1);\n\n            return reduce_internal<ReduceTag>(parent, child0, child1, group_root,\n                    key, value, op);\n        }\n\n        /// Distributed all reduce\n\n        /// The reduce functor must have the following signature:\n        /// \\code\n        /// class ReduceFunc {\n        /// public:\n        ///     // Typedefs\n        ///     typedef ... result_type;\n        ///     typedef ... argument_type;\n        ///\n        ///     // Constructors\n        ///     ReduceFunc(const ReduceFunc&);\n        ///\n        ///     // Initialization operation, which returns a default result object\n        ///     result_type operator()() const;\n        ///\n        ///     // Reduce two result objects\n        ///     void operator()(result_type&, const result_type&) const;\n        ///\n        ///     // Reduce a result object and an argument object\n        ///     void operator()(result_type&, const argument_type&) const;\n        /// }; // class ReduceFunc\n        /// \\endcode\n        /// \\tparam keyT The key type\n        /// \\tparam valueT The data type to be reduced\n        /// \\tparam opT The reduction operation type\n        /// \\param key The key associated with this reduction\n        /// \\param value The local value to be reduced\n        /// \\param op The reduction operation to be applied to local and remote data\n        /// \\return A future to the reduce value on the root process, otherwise an\n        /// uninitialized future that may be ignored.\n        /// \\note It is the user's responsibility to ensure that \\c key does not\n        /// conflict with other calls to \\c all_reduce. Keys may be reused after\n        /// the associated operation has finished.\n        template <typename keyT, typename valueT, typename opT>\n        Future<typename detail::result_of<opT>::type>\n        all_reduce(const keyT& key, const valueT& value, const opT& op) {\n            // Compute the parent and child processes of this process in a binary tree.\n            Hash<keyT> hasher;\n            const ProcessID root = hasher(key) % world_.size();\n            ProcessID parent = -1, child0 = -1, child1 = -1;\n            world_.mpi.binary_tree_info(root, parent, child0, child1);\n\n            // Reduce the data\n            Future<typename detail::result_of<opT>::type> reduce_result =\n                    reduce_internal<AllReduceTag>(parent, child0, child1, root,\n                            key, value, op);\n\n            if(world_.rank() != root)\n                reduce_result = Future<typename detail::result_of<opT>::type>();\n\n            // Broadcast the result of the reduction to all processes\n            bcast_internal<AllReduceTag>(key, reduce_result, root);\n\n            return reduce_result;\n        }\n\n        /// Distributed, group all reduce\n\n        /// The reduce functor must have the following signature:\n        /// \\code\n        /// class ReduceFunc {\n        /// public:\n        ///     // Typedefs\n        ///     typedef ... result_type;\n        ///     typedef ... argument_type;\n        ///\n        ///     // Constructors\n        ///     ReduceFunc(const ReduceFunc&);\n        ///\n        ///     // Initialization operation, which returns a default result object\n        ///     result_type operator()() const;\n        ///\n        ///     // Reduce two result objects\n        ///     void operator()(result_type&, const result_type&) const;\n        ///\n        ///     // Reduce a result object and an argument object\n        ///     void operator()(result_type&, const argument_type&) const;\n        /// }; // class ReduceFunc\n        /// \\endcode\n        /// \\tparam keyT The key type\n        /// \\tparam valueT The data type to be reduced\n        /// \\tparam opT The reduction operation type\n        /// \\param key The key associated with this reduction\n        /// \\param value The local value to be reduced\n        /// \\param op The reduction operation to be applied to local and remote data\n        /// \\param group The group that will preform the reduction\n        /// \\return A future to the reduce value on the root process, otherwise an\n        /// uninitialized future that may be ignored\n        /// \\throw madness::Exception When \\c group is empty\n        /// \\throw madness::Exception When \\c group is not registered\n        /// \\throw madness::Exception When the world id of \\c group is not\n        /// equal to that of the world used to construct this object\n        /// \\throw madness::Exception When this process is not in the group\n        /// \\note It is the user's responsibility to ensure that \\c key does not\n        /// conflict with other calls to \\c reduce. Keys may be reused after\n        /// the associated operation has finished.\n        template <typename keyT, typename valueT, typename opT>\n        Future<typename detail::result_of<opT>::type>\n        all_reduce(const keyT& key, const valueT& value, const opT& op, const Group& group) {\n            MADNESS_ASSERT(! group.empty());\n            MADNESS_ASSERT(group.get_world().id() == world_.id());\n\n            // Compute the parent and child processes of this process in a binary tree.\n            Hash<keyT> hasher;\n            const ProcessID group_root = hasher(key) % group.size();\n            ProcessID parent = -1, child0 = -1, child1 = -1;\n            group.make_tree(group_root, parent, child0, child1);\n\n            // Reduce the data\n            Future<typename detail::result_of<opT>::type> reduce_result =\n                    reduce_internal<GroupAllReduceTag>(parent, child0, child1,\n                            group_root, key, value, op);\n\n\n            if(group.rank() != group_root)\n                reduce_result = Future<typename detail::result_of<opT>::type>();\n\n            // Broadcast the result of the reduction to all processes in the group\n            bcast_internal<GroupAllReduceTag>(key, reduce_result, 0, group);\n\n            return reduce_result;\n        }\n    }; // class WorldGopInterface\n\n} // namespace madness\n\n#endif // MADNESS_WORLD_WORLDGOP_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldhash.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_WORLDHASH_H__INCLUDED\n#define MADNESS_WORLD_WORLDHASH_H__INCLUDED\n\n/*!\n \\file worldhash.h\n \\brief Defines hash functions for use in distributed containers\n \\addtogroup hashing\n @{\n\nMADNESS uses hashing functions are modeled after Boost.Functional/Hash. It has\nmany similar function calls including hash_value, hash_combine, and hash_range.\nIn addition, it is also compatible with C++ TR1 hashing functors. The\n\\c madness::Hash functor interface is identical to both boost::hash and\n\\c std::hash , and any one of these may be used. By default, MADNESS hashing\nfunctions can hash all fundamental types including integral types, floating\npoint types, pointer types, std::string, std::wstring, and std::array. Presently\n\\c hashT is typedef to \\c std::size_t .\n\nSince having a good hash is important, we are using Bob Jenkin's \"lookup v3\"\nhash from http://www.burtleburtle.net/bob/c/lookup3.c. The preferred interface\nfor these function is with the \\c madness::Hash<T> functor, but you can also use\nhash_value or the \"lookup v3\" interface directly.\n\n\\b Note: Bob Jenkin's \"lookup v3\" hash returns a uint32_t hash value, which is\ncast to std::size_t. This is done for compatibility with std::hash.\n\n\\b WARNING: While both std::hash and madness::Hash have the same interface, they\nwill not generate the same hash values from the same key value.\n\nMADNESS hashing consists of one functor and three functions\n \\li \\c madness::Hash is the hash functor and the primary interface for hashing\n \\li \\c hash_value() is for hashing a single value and is the function used by the Hash functor\n \\li \\c hash_range() is for hashing a group of values. You can use this function to hash\n   an iterator range, a C-style array, or a pointer.\n \\li \\c hash_combine() hashs a given value and combines it with a seed. This is\n useful for combining multiple elements into a single hash value.\n\nThere are several options for creating and using hash functions for your custom\ntypes. The easiest method is to define a \\c hash_value function for your key\ntype in the same namespace. This function will automatically be used by MADNESS\nhashing containers. The hashing function should have the following form.\n\\code\nnamespace MyNamespace {\n\n    class Key {\n        // ...\n    };\n\n    madness::hashT hash_value(const Key& t) {\n        // ...\n    }\n\n} // namespace MyNamespace\n\\endcode\nIf your object is in the \\c madness namespace, you may also use the intrusive\nmethod and define a hash member function for your key.\n\\code\nnamespace madness {\n    class Key {\n    public:\n\n        // ...\n\n        madness::hashT hash() const {\n            // ...\n        }\n    };\n}\n\\endcode\nYou can create a specialization of madness::Hash for your type directly.\n\\code\nclass Key {\n  // ...\n};\n\nnamespace madness {\n\n    template <>\n    struct Hash<Key> {\n        hashT operator()(const Key& a) const {\n            // ...\n        }\n    };\n\n} // namespace madness\n\\endcode\nIf you use any of the above methods, MADNESS hash_combine and hash_range functions\nwill be able to hash your custom types.\n\nIn addition to these methods, you can use std::hash, boost::hash, or create your\nown custom hashing functor that has the same form as madness::hash. However, if\nyou want to use a hashing functor other than madness::Hash, you will need to\nprovide the appropriate template parameter to the hashing container.\n\n*/\n\n#include <madness/madness_config.h>\n#include <stdint.h>\n#include <cstddef>\n#include <iterator>\n#include <type_traits>\n\n// Bob Jenkin's \"lookup v3\" hash from http://www.burtleburtle.net/bob/c/lookup3.c.\nextern \"C\" {\n    uint32_t hashword(const uint32_t *k, size_t length, uint32_t initval);\n    uint32_t hashlittle(const void *key, size_t length, uint32_t initval);\n}\n\nnamespace madness {\n\n    // Hash, hash_value, hash_combine, and hash_range a la Boost.\n\n    /// The hash value type\n    typedef std::size_t hashT;\n\n    /// Hash a single fundamental object\n\n    /// \\tparam T The fundamental type\n    /// \\param t The object to hash\n    /// \\return The hashed value\n    /// \\note Use heavily optimized hashword when sizeof(T) is multiple\n    /// of sizeof(uint32_t) and presumably correctly aligned.\n    template <class T>\n    inline typename std::enable_if<std::is_fundamental<T>::value &&\n        ((sizeof(T)%sizeof(uint32_t)) == 0),\n        hashT>::type\n    hash_value(const T t) {\n        hashT result = 0ul;\n        result = hashword(reinterpret_cast<const uint32_t*>(&t),\n            std::integral_constant<std::size_t,sizeof(T)/sizeof(uint32_t)>::value, 0u);\n        return result;\n    }\n\n    /// Hash a single fundamental object\n\n    /// \\tparam T The fundamental type\n    /// \\param t The object to hash\n    /// \\return The hashed value\n    template <class T>\n    inline typename std::enable_if<std::is_fundamental<T>::value &&\n        ((sizeof(T)%sizeof(uint32_t)) != 0),\n        hashT>::type\n    hash_value(const T t) {\n        hashT result = 0ul;\n        result = hashlittle(reinterpret_cast<const void*>(&t), sizeof(T), 0u);\n        return result;\n    }\n\n    /// Hash a pointer address\n\n    /// \\tparam T The pointer type\n    /// \\param t The pointer to be hashed\n    /// \\return The hashed value\n    template <typename T>\n    inline hashT hash_value(const T* t) {\n        const unsigned long n = reinterpret_cast<unsigned long>(t);\n        return hash_value(n);\n    }\n\n    /// Hash a class object\n\n    /// \\tparam T The class type\n    /// \\param t The object to hash\n    /// \\return \\c t.hash()\n    template <typename T, typename = std::enable_if_t<std::is_same_v<decltype(std::declval<const T&>().hash()),hashT>>>\n    inline auto\n    hash_value(const T& t) {\n        return t.hash();\n    }\n\n    /// Hash a std::basic_string\n\n    /// \\tparam T The character type\n    /// \\param t The string to hash\n    /// \\return The hashed value of the string\n    template <typename T>\n    inline hashT hash_value(const std::basic_string<T>& t);\n\n    /// Hash a std::pair\n\n    /// \\param t a pair to hash\n    /// \\return The hashed value of \\p t\n    template <typename T, typename R>\n    inline hashT hash_value(const std::pair<T,R>& t);\n\n    /// Hash functor\n\n    /// This hash functor calls hash_value for the given type, \\c T . The\n    /// namespace for hash_value function is not specified so you are free to\n    /// implement your own version for your data type as follows:\n    /// \\code\n    /// namespace MyNamespace {\n    ///     class MyClass;\n    ///     madness::hashT hash_value(const MyClass& t) {\n    ///         // ...\n    ///     }\n    /// } // namespace MyNamespace\n    /// \\endcode\n    /// or you can specialize this functor directly.\n    /// \\tparam T The object type to hash\n    template <typename T>\n    struct Hash {\n\n        /// Hashing function wrapper\n\n        /// \\param t The object to be hashed\n        /// \\return The hashed value\n        hashT operator()(const T& t) const {\n            return hash_value(t);\n        }\n    }; // struct Hash\n\n    namespace detail {\n        /// Internal use only\n        // We don't hash anything here. It is just used for combining a hashed\n        // value with a seed.\n        inline void combine_hash(hashT& seed, hashT hash) {\n            seed ^= hash + 0x9e3779b9 + (seed<<6) + (seed>>2);\n        }\n    }\n\n    /// Combine hash values\n\n    /// This function uses the standard hash function.\n    /// \\tparam T The type to hash\n    /// \\param[in,out] seed The initial hash seed value\n    /// \\param[in] v The value to be hashed\n    template <class T>\n    inline void hash_combine(hashT& seed, const T& v) {\n        Hash<T> hasher;\n        detail::combine_hash(seed, hasher(v));\n    }\n\n    template <typename T, typename R>\n    inline hashT hash_value(const std::pair<T,R>& t) {\n        hashT result = hash_value(t.first);\n        hash_combine(result, hash_value(t.second));\n        return result;\n    }\n\n\n\n\n    /// \\tparam It the iterator type\n    /// \\param[in,out] seed The initial hash seed value\n    /// \\param[in] first The first element of the iterator range to be hashed\n    /// \\param[in] last The end of the iterator range to be hashed\n    template <class It>\n    inline void hash_range(hashT& seed, It first, It last) {\n        Hash<typename std::iterator_traits<It>::value_type> hasher;\n        for(; first != last; ++first)\n            detail::combine_hash(seed, hasher(*first));\n    }\n\n    /// Combine the hash values of an iterator range\n\n    /// \\tparam It the iterator type\n    /// \\param[in] first The first element of the iterator range to be hashed\n    /// \\param[in] last The end of the iterator range to be hashed\n    /// \\return The hashed iterator range\n    template <class It>\n    inline hashT hash_range(It first, It last) {\n        hashT seed = 0;\n        hash_range(seed, first, last);\n\n        return seed;\n    }\n\n    /// Combine the hash values of a C-style array\n\n    /// \\tparam T The type to be hashed\n    /// \\tparam n The size of the C-style array\n    /// \\param[in] t The array to be hashed\n    /// \\return The hashed array value\n    template <class T, std::size_t n>\n    inline hashT hash_range(const T(&t)[n]) {\n        return hash_range(t, n);\n    }\n\n    /// Combine the hash values of a C-style array\n\n    /// \\tparam T The type to be hashed\n    /// \\tparam n The size of the C-style array\n    /// \\param[in,out] seed The initial hash seed value\n    /// \\param[in] t The array to be hashed\n    /// \\note This function uses std::hash\n    template <class T, std::size_t n>\n    inline void hash_range(hashT& seed, const T(&t)[n]) {\n        hash_range(seed, t, n);\n    }\n\n    /// Combine the hash values of a pointer range\n\n    /// \\tparam T The type to be hashed\n    /// \\param[in,out] seed The initial hash seed value\n    /// \\param[in] t A pointer to the beginning of the range to be hashed\n    /// \\param[in] n The number of elements to hashed\n    /// \\note May use heavily optimized hashword when n * sizeof(T) is multiple\n    /// of sizeof(uint32_t) and presumably correctly aligned.\n    template <class T>\n    inline typename std::enable_if<std::is_fundamental<T>::value >::type\n    hash_range(hashT& seed, const T* t, std::size_t n) {\n        const std::size_t bytes = n * sizeof(T);\n        if((bytes % sizeof(uint32_t)) == 0)\n            seed = hashword(reinterpret_cast<const uint32_t *>(t), bytes/sizeof(uint32_t), seed);\n        else\n            seed = hashlittle(static_cast<const void *>(t), bytes, seed);\n    }\n\n    /// Combine the hash values of a pointer range\n\n    /// \\tparam T The type to be hashed\n    /// \\param[in,out] seed The initial hash seed value\n    /// \\param[in] t A pointer to the beginning of the range to be hashed\n    /// \\param[in] n The number of elements to hashed\n    template <class T>\n    inline typename std::enable_if<!std::is_fundamental<T>::value >::type\n    hash_range(hashT& seed, const T* t, std::size_t n) {\n        hash_range(seed, t, t + n);\n    }\n\n    /// Combine the hash values of a pointer range\n\n    /// \\tparam T The type to be hashed\n    /// \\param t A pointer to the beginning of the range to be hashed\n    /// \\param n The number of elements to hashed\n    /// \\return The hashed pointer range value\n    template <class T>\n    inline hashT hash_range(const T* t, std::size_t n) {\n        hashT seed = 0ul;\n        hash_range(seed, t, n);\n        return seed;\n    }\n\n    template <typename T>\n    inline hashT hash_value(const std::basic_string<T>& t) {\n        return hash_range(t.c_str(), t.size());\n    }\n    \n\n} // namespace madness\n\n///@}\n\n#endif // MADNESS_WORLD_WORLDHASH_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldhashmap.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_WORLDHASHMAP_H__INCLUDED\n#define MADNESS_WORLD_WORLDHASHMAP_H__INCLUDED\n\n/// \\file worldhashmap.h\n/// \\brief Defines and implements a concurrent hashmap\n\n\n// Why does this exist?  It's a bridge from where we are to where we\n// want to be, which is a mutlthreaded environment probably\n// based upon the Intel TBB.  Don't have the resources right now to\n// bite off the entire TBB but we probably must in the future.\n// This is a basic, functional-enough, fast-enough hash map with\n// vague compatibility with the TBB API.\n\n#include <madness/world/worldmutex.h>\n#include <madness/world/madness_exception.h>\n#include <madness/world/worldhash.h>\n#include <new>\n#include <stdio.h>\n#include <map>\n\nnamespace madness {\n\n    template <class keyT, class valueT, class hashT> class ConcurrentHashMap;\n\n    template <class keyT, class valueT, class hashfunT>\n    class ConcurrentHashMap;\n\n    namespace Hash_private {\n\n        // A hashtable is an array of nbin bins.\n        // Each bin is a linked list of entries protected by a spinlock.\n        // Each entry holds a key+value pair, a read-write mutex, and a link to the next entry.\n\n        template <typename keyT, typename valueT>\n        class entry : public madness::MutexReaderWriter {\n        public:\n            typedef std::pair<const keyT, valueT> datumT;\n            datumT datum;\n\n            class entry<keyT,valueT> * next;\n\n            entry(const datumT& datum, entry<keyT,valueT>* next)\n                    : datum(datum), next(next) {}\n        };\n\n        template <class keyT, class valueT>\n        class bin : private madness::Spinlock {\n        private:\n            typedef entry<keyT,valueT> entryT;\n            typedef std::pair<const keyT, valueT> datumT;\n            // Could pad here to avoid false sharing of cache line but\n            // perhaps better to just use more bins\n        public:\n\n            entryT* p; // was volatile but all uses are protect by mutex with implied barriers and fences\n            int ninbin; // ditto\n\n            bin() : p(0),ninbin(0) {}\n\n            ~bin() {\n                clear();\n            }\n\n            void clear() {\n                lock();             // BEGIN CRITICAL SECTION\n                while (p) {\n                    entryT* n=p->next;\n                    delete p;\n                    p=n;\n                    ninbin--;\n                }\n                MADNESS_ASSERT(ninbin == 0);\n                unlock();           // END CRITICAL SECTION\n            }\n\n            entryT* find(const keyT& key, const int lockmode) const {\n                bool gotlock;\n                entryT* result;\n                madness::MutexWaiter waiter;\n                do {\n                    lock();             // BEGIN CRITICAL SECTION\n                    result = match(key);\n                    if (result) {\n                        gotlock = result->try_lock(lockmode);\n                    }\n                    else {\n                        gotlock = true;\n                    }\n                    unlock();           // END CRITICAL SECTION\n                    if (!gotlock) waiter.wait(); //cpu_relax();\n                }\n                while (!gotlock);\n\n                return result;\n            }\n\n            std::pair<entryT*,bool> insert(const datumT& datum, int lockmode) {\n                bool gotlock;\n                entryT* result;\n                bool notfound;\n                madness::MutexWaiter waiter;\n                do {\n                    lock();             // BEGIN CRITICAL SECTION\n                    result = match(datum.first);\n                    notfound = !result;\n                    if (notfound) {\n                        result = p = new entryT(datum,p);\n                        ++ninbin;\n                    }\n                    gotlock = result->try_lock(lockmode);\n                    unlock();           // END CRITICAL SECTION\n                    if (!gotlock) waiter.wait(); //cpu_relax();\n                }\n                while (!gotlock);\n\n                return std::pair<entryT*,bool>(result,notfound);\n            }\n\n            bool del(const keyT& key, int lockmode) {\n                bool status = false;\n                lock();             // BEGIN CRITICAL SECTION\n                for (entryT *t=p,*prev=0; t; prev=t,t=t->next) {\n                    if (t->datum.first == key) {\n                        if (prev) {\n                            prev->next = t->next;\n                        }\n                        else {\n                            p = t->next;\n                        }\n                        t->unlock(lockmode);\n                        delete t;\n                        --ninbin;\n                        status = true;\n                        break;\n                    }\n                }\n                unlock();           // END CRITICAL SECTION\n                return status;\n            }\n\n            std::size_t size() const {\n                return ninbin;\n            };\n\n        private:\n            entryT* match(const keyT& key) const {\n                entryT* t;\n                for (t=p; t; t=t->next)\n                    if (t->datum.first == key) break;\n                return t;\n            }\n\n        };\n\n        /// iterator for hash\n        template <class hashT> class HashIterator {\n        public:\n            typedef typename std::conditional<std::is_const<hashT>::value,\n                    typename std::add_const<typename hashT::entryT>::type,\n                    typename hashT::entryT>::type entryT;\n            typedef typename std::conditional<std::is_const<hashT>::value,\n                    typename std::add_const<typename hashT::datumT>::type,\n                    typename hashT::datumT>::type datumT;\n            typedef std::forward_iterator_tag iterator_category;\n            typedef datumT value_type;\n            typedef std::ptrdiff_t difference_type;\n            typedef datumT* pointer;\n            typedef datumT& reference;\n\n        private:\n            hashT* h;               // Associated hash table\n            int bin;                // Current bin\n            entryT* entry;          // Current entry in bin ... zero means at end\n\n            template <class otherHashT>\n            friend class HashIterator;\n\n            /// If the entry is null (end of current bin) finds next non-empty bin\n            void next_non_null_entry() {\n                while (!entry) {\n                    ++bin;\n                    if ((unsigned) bin == h->nbins) {\n                        entry = 0;\n                        return;\n                    }\n                    entry = h->bins[bin].p;\n                }\n                return;\n            }\n\n        public:\n\n            /// Makes invalid iterator\n            HashIterator() : h(0), bin(-1), entry(0) {}\n\n            /// Makes begin/end iterator\n            HashIterator(hashT* h, bool begin)\n                    : h(h), bin(-1), entry(0) {\n                if (begin) next_non_null_entry();\n            }\n\n            /// Makes iterator to specific entry\n            HashIterator(hashT* h, int bin, entryT* entry)\n                    : h(h), bin(bin), entry(entry) {}\n\n            /// Copy constructor\n            HashIterator(const HashIterator& other)\n                    : h(other.h), bin(other.bin), entry(other.entry) {}\n\n            /// Implicit conversion of another hash type to this hash type\n\n            /// This allows implicit conversion from hash types to const hash\n            /// types.\n            template <class otherHashT>\n            HashIterator(const HashIterator<otherHashT>& other)\n                    : h(other.h), bin(other.bin), entry(other.entry) {}\n\n            HashIterator& operator++() {\n                if (!entry) return *this;\n                entry = entry->next;\n                next_non_null_entry();\n                return *this;\n            }\n\n            HashIterator operator++(int) {\n                HashIterator old(*this);\n                operator++();\n                return old;\n            }\n\n            /// Difference between iterators \\em only supported for this=start and other=end\n\n            /// This exists to support construction of range for parallel iteration\n            /// over the entire container.\n            int distance(const HashIterator& other) const {\n                MADNESS_ASSERT(h == other.h  &&  other == h->end()  &&  *this == h->begin());\n                return h->size();\n            }\n\n            /// Only positive increments are supported\n\n            /// This exists to support splitting of range for parallel iteration.\n            void advance(int n) {\n                if (n==0 || !entry) return;\n                MADNESS_ASSERT(n>=0);\n\n                // Linear increment up to end of this bin\n                while (n-- && (entry=entry->next)) {}\n                next_non_null_entry();\n                if (!entry) return; // end\n\n                if (n <= 0) return;\n\n                // If here, will point to first entry in\n                // a bin ... determine which bin contains\n                // our end point.\n                while (unsigned(n) >= h->bins[bin].size()) {\n                    n -= h->bins[bin].size();\n                    ++bin;\n                    if (unsigned(bin) == h->nbins) {\n                        entry = 0;\n                        return; // end\n                    }\n                }\n\n                entry = h->bins[bin].p;\n                MADNESS_ASSERT(entry);\n\n                // Linear increment to target\n                while (n--) entry=entry->next;\n\n                return;\n            }\n\n\n            bool operator==(const HashIterator& a) const {\n                return entry==a.entry;\n            }\n\n            bool operator!=(const HashIterator& a) const {\n                return entry!=a.entry;\n            }\n\n            reference operator*() const {\n                MADNESS_ASSERT(entry);\n                //if (!entry) throw \"Hash iterator: operator*: at end\";\n                return entry->datum;\n            }\n\n            pointer operator->() const {\n                MADNESS_ASSERT(entry);\n                //if (!entry) throw \"Hash iterator: operator->: at end\";\n                return &entry->datum;\n            }\n        };\n\n        template <class hashT, int lockmode>\n        class HashAccessor : private NO_DEFAULTS {\n            template <class a,class b,class c> friend class madness::ConcurrentHashMap;\n        public:\n            typedef typename std::conditional<std::is_const<hashT>::value,\n                    typename std::add_const<typename hashT::entryT>::type,\n                    typename hashT::entryT>::type entryT;\n            typedef typename std::conditional<std::is_const<hashT>::value,\n                    typename std::add_const<typename hashT::datumT>::type,\n                    typename hashT::datumT>::type datumT;\n            typedef datumT value_type;\n            typedef datumT* pointer;\n            typedef datumT& reference;\n\n        private:\n            entryT* entry;\n            bool gotlock;\n\n            /// Used by Hash to set entry (assumed that it has the lock already)\n            void set(entryT* entry) {\n                release();\n                this->entry = entry;\n                gotlock = true;\n            }\n\n            /// Used by Hash after having already released lock and deleted entry\n            void unset() {\n                gotlock = false;\n                entry = 0;\n            }\n\n            void convert_read_lock_to_write_lock() {\n                if (entry) entry->convert_read_lock_to_write_lock();\n            }\n\n\n        public:\n            HashAccessor() : entry(0), gotlock(false) {}\n\n            HashAccessor(entryT* entry) : entry(entry), gotlock(true) {}\n\n            datumT& operator*() const {\n                if (!entry) MADNESS_EXCEPTION(\"Hash accessor: operator*: no value\", 0);\n                return entry->datum;\n            }\n\n            datumT* operator->() const {\n                if (!entry) MADNESS_EXCEPTION(\"Hash accessor: operator->: no value\", 0);\n                return &entry->datum;\n            }\n\n            void release() {\n                if (gotlock) {\n                    entry->unlock(lockmode);\n                    entry=0;\n                    gotlock = false;\n                }\n            }\n\n            ~HashAccessor() {\n                release();\n            }\n        };\n\n    } // End of namespace Hash_private\n\n    template < class keyT, class valueT, class hashfunT = Hash<keyT> >\n    class ConcurrentHashMap {\n    public:\n        typedef ConcurrentHashMap<keyT,valueT,hashfunT> hashT;\n        typedef std::pair<const keyT,valueT> datumT;\n        typedef Hash_private::entry<keyT,valueT> entryT;\n        typedef Hash_private::bin<keyT,valueT> binT;\n        typedef Hash_private::HashIterator<hashT> iterator;\n        typedef Hash_private::HashIterator<const hashT> const_iterator;\n        typedef Hash_private::HashAccessor<hashT,entryT::WRITELOCK> accessor;\n        typedef Hash_private::HashAccessor<const hashT,entryT::READLOCK> const_accessor;\n\n        friend class Hash_private::HashIterator<hashT>;\n        friend class Hash_private::HashIterator<const hashT>;\n\n    protected:\n        const size_t nbins;         // Number of bins\n        binT* bins;                 // Array of bins\n\n    private:\n        hashfunT hashfun;\n\n        //unsigned int hash(const keyT& key) const {return hashfunT::hash(key)%nbins;}\n\n        static int nbins_prime(int n) {\n            static const int primes[] = {11, 23, 31, 41, 53, 61, 71, 83, 101,\n                131, 181, 239, 293, 359, 421, 557, 673, 821, 953, 1021, 1231,\n                1531, 1747, 2069, 2543, 3011, 4003, 5011, 6073, 7013, 8053,\n                9029, 9907, 17401, 27479, 37847, 48623, 59377, 70667, 81839,\n                93199, 104759, 224759, 350411, 479951, 611969, 746791, 882391,\n                1299743, 2750171, 4256257, 5800159, 7368811, 8960477, 10570871,\n                12195269, 13834133};\n            static const int nprimes = sizeof(primes)/sizeof(int);\n            // n is a user provided estimate of the no. of elements to be put\n            // in the table.  Want to make the number of bins a prime number\n            // larger than this.\n            for (int i=0; i<nprimes; ++i) if (n<=primes[i]) return primes[i];\n            return primes[nprimes-1];\n        }\n\n        unsigned int hash_to_bin(const keyT& key) const {\n            return hashfun(key)%nbins;\n        }\n\n    public:\n        ConcurrentHashMap(int n=1021, const hashfunT& hf = hashfunT())\n                : nbins(hashT::nbins_prime(n))\n                , bins(new binT[nbins])\n                , hashfun(hf) {}\n\n        ConcurrentHashMap(const  hashT& h)\n                : nbins(h.nbins)\n                , bins(new binT[nbins])\n                , hashfun(h.hashfun) {\n            *this = h;\n        }\n\n        virtual ~ConcurrentHashMap() {\n            delete [] bins;\n        }\n\n        hashT& operator=(const  hashT& h) {\n            if (this != &h) {\n                this->clear();\n                hashfun = h.hashfun;\n                for (const_iterator p=h.begin(); p!=h.end(); ++p) {\n                    [[maybe_unused]] auto&& [it, inserted] = insert(*p);\n                    MADNESS_ASSERT(inserted);\n                }\n            }\n            return *this;\n        }\n\n        [[nodiscard]] std::pair<iterator,bool> insert(const datumT& datum) {\n            int bin = hash_to_bin(datum.first);\n            std::pair<entryT*,bool> result = bins[bin].insert(datum,entryT::NOLOCK);\n            return std::pair<iterator,bool>(iterator(this,bin,result.first),result.second);\n        }\n\n        /// Returns true if new pair was inserted; false if key is already in the map and the datum was not inserted\n        [[nodiscard]] bool insert(accessor& result, const datumT& datum) {\n            result.release();\n            int bin = hash_to_bin(datum.first);\n            std::pair<entryT*,bool> r = bins[bin].insert(datum,entryT::WRITELOCK);\n            result.set(r.first);\n            return r.second;\n        }\n\n        /// Returns true if new pair was inserted; false if key is already in the map and the datum was not inserted\n        [[nodiscard]] bool insert(const_accessor& result, const datumT& datum) {\n            result.release();\n            int bin = hash_to_bin(datum.first);\n            std::pair<entryT*,bool> r = bins[bin].insert(datum,entryT::READLOCK);\n            result.set(r.first);\n            return r.second;\n        }\n\n        /// Returns true if new pair was inserted; false if key is already in the map\n        [[nodiscard]] inline bool insert(accessor& result, const keyT& key) {\n            return insert(result, datumT(key,valueT()));\n        }\n\n        /// Returns true if new pair was inserted; false if key is already in the map\n        [[nodiscard]] inline bool insert(const_accessor& result, const keyT& key) {\n            return insert(result, datumT(key,valueT()));\n        }\n\n        [[nodiscard]] bool try_erase(const keyT& key) {\n            if (bins[hash_to_bin(key)].del(key,entryT::NOLOCK)) return true;\n            else return false;\n        }\n\n        void erase(const iterator& it) {\n            if (it == end()) MADNESS_EXCEPTION(\"ConcurrentHashMap: erase(iterator): at end\", true);\n            [[maybe_unused]] auto erased = try_erase(it->first);\n            MADNESS_ASSERT(erased);\n        }\n\n        void erase(accessor& item) {\n            bins[hash_to_bin(item->first)].del(item->first,entryT::WRITELOCK);\n            item.unset();\n        }\n\n        void erase(const_accessor& item) {\n            item.convert_read_lock_to_write_lock();\n            bins[hash_to_bin(item->first)].del(item->first,entryT::WRITELOCK);\n            item.unset();\n        }\n\n        [[nodiscard]] iterator find(const keyT& key) {\n            int bin = hash_to_bin(key);\n            entryT* entry = bins[bin].find(key,entryT::NOLOCK);\n            if (!entry) return end();\n            else return iterator(this,bin,entry);\n        }\n\n        [[nodiscard]] const_iterator find(const keyT& key) const {\n            int bin = hash_to_bin(key);\n            const entryT* entry = bins[bin].find(key,entryT::NOLOCK);\n            if (!entry) return end();\n            else return const_iterator(this,bin,entry);\n        }\n\n        [[nodiscard]] bool find(accessor& result, const keyT& key) {\n            result.release();\n            int bin = hash_to_bin(key);\n            entryT* entry = bins[bin].find(key,entryT::WRITELOCK);\n            bool foundit = entry;\n            if (foundit) result.set(entry);\n            return foundit;\n        }\n\n        [[nodiscard]] bool find(const_accessor& result, const keyT& key) const {\n            result.release();\n            int bin = hash_to_bin(key);\n            entryT* entry = bins[bin].find(key,entryT::READLOCK);\n            bool foundit = entry;\n            if (foundit) result.set(entry);\n            return foundit;\n        }\n\n        void clear() {\n            for (unsigned int i=0; i<nbins; ++i) bins[i].clear();\n        }\n\n        [[nodiscard]] size_t size() const {\n            size_t sum = 0;\n            for (size_t i=0; i<nbins; ++i) sum += bins[i].size();\n            return sum;\n        }\n\n        [[nodiscard]] valueT& operator[](const keyT& key) {\n            std::pair<iterator,bool> it = insert(datumT(key,valueT()));\n            return it.first->second;\n        }\n\n        [[nodiscard]] iterator begin() {\n            return iterator(this,true);\n        }\n\n        [[nodiscard]] const_iterator begin() const {\n            return cbegin();\n        }\n\n        [[nodiscard]] const_iterator cbegin() const {\n            return const_iterator(this,true);\n        }\n\n        [[nodiscard]] iterator end() {\n            return iterator(this,false);\n        }\n\n        [[nodiscard]] const_iterator end() const {\n            return cend();\n        }\n\n        [[nodiscard]] const_iterator cend() const {\n            return const_iterator(this,false);\n        }\n\n        const hashfunT& get_hash() const { return hashfun; }\n\n        void print_stats() const {\n            for (unsigned int i=0; i<nbins; ++i) {\n                if (i && (i%10)==0) printf(\"\\n\");\n                printf(\"%8d\", int(bins[i].size()));\n            }\n            printf(\"\\n\");\n        }\n    };\n}\n\nnamespace std {\n\n    template <typename hashT, typename distT>\n    inline void advance( madness::Hash_private::HashIterator<hashT>& it, const distT& dist ) {\n        //std::cout << \" in custom advance \\n\";\n        it.advance(dist);\n    }\n\n    template <typename hashT>\n    inline int distance(const madness::Hash_private::HashIterator<hashT>& it, const madness::Hash_private::HashIterator<hashT>& jt) {\n        //std::cout << \" in custom distance \\n\";\n        return it.distance(jt);\n    }\n}\n\n#endif // MADNESS_WORLD_WORLDHASHMAP_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldinit.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file worldinit.h\n \\brief Declares the functions that initialize the parallel runtime.\n \\ingroup world\n*/\n\n#ifndef MADNESS_WORLD_WORLDINIT_H__INCLUDED\n#define MADNESS_WORLD_WORLDINIT_H__INCLUDED\n\n// Madness world header files needed by world\n#include <madness/world/worldmpi.h>\n\n/// \\addtogroup world\n/// @{\n\nnamespace madness {\n\n    class World;\n    class WorldTaskQueue;\n    class WorldAmInterface;\n    class WorldGopInterface;\n\n    /// redirects standard output and error to rank-specific files\n\n    /// @param[in] world the World object that determines rank of this process\n    /// @param[in] split if true, write standard output to log.<rank> and standard error to err.<rank>,\n    ///            otherwise write both standard output and error to log.<rank>. The default is false.\n    void redirectio(const World& world, bool split = false);\n\n    /// Initializes the MADNESS runtime with default MPI communicator and\n    /// default number of compute threads\n\n    /// Call this once at the very top of your main program to initialize the\n    /// MADNESS runtime. This function should be called instead of \\c MPI_Init()\n    /// or \\c MPI_Init_thread().\n    /// \\param[in,out] argc Application argument count.\n    /// \\param[in,out] argv Application argument values.\n    /// \\param[in] quiet If false, will announce to \\c std::cout on rank 0 when\n    ///            the runtime has been initialized.\n    /// \\return A reference to the default \\c World, which is constructed with\n    ///     \\c MPI_COMM_WORLD.\n    /// \\note The default number of compute threads is read from the environment variable `MAD_NUM_THREADS`;\n    ///       if the environment variable is not given the number of compute thread is set to the system-defined number of hardware threads.\n    World& initialize(int& argc, char**& argv, bool quiet = false);\n\n    /// Initializes the MADNESS runtime with default MPI communicator and\n    /// the given number of compute threads\n\n    /// Call this once at the very top of your main program to initialize the\n    /// MADNESS runtime. This function should be called instead of \\c MPI_Init()\n    /// or \\c MPI_Init_thread().\n    /// \\param[in,out] argc Application argument count.\n    /// \\param[in,out] argv Application argument values.\n    /// \\param[in] nthread The total number of compute threads to create\n    ///                    (the main thread is counted among the compute threads)\n    ///                    if a negative value is given then the default number of compute threads\n    ///                    will be used.\n    /// \\param[in] quiet If false, will announce to \\c std::cout on rank 0 when\n    ///            the runtime has been initialized.\n    /// \\return A reference to the default \\c World, which is constructed with\n    ///     \\c MPI_COMM_WORLD.\n    /// \\note The default number of compute threads is read from the environment variable `MAD_NUM_THREADS`;\n    ///       if the environment variable is not given the number of compute thread is set to the system-defined number of hardware threads.\n    World& initialize(int& argc, char**& argv, int nthread, bool quiet = false);\n\n    /// Initializes the MADNESS runtime with the given MPI communicator and\n    /// the default number of compute threads\n\n    /// Call this once at the very top of your main program to initialize the\n    /// MADNESS runtime. This function should be called instead of \\c MPI_Init()\n    /// or \\c MPI_Init_thread().\n    /// \\param[in,out] argc Application argument count.\n    /// \\param[in,out] argv Application argument values.\n    /// \\param comm The communicator that should be used to construct the\n    ///     \\c World object.\n    /// \\param[in] quiet If false, will announce to \\c std::cout on rank 0 when\n    ///            the runtime has been initialized.\n    /// \\return A reference to the \\c World constructed with \\c comm.\n    /// \\note The default number of compute threads is read from the environment variable `MAD_NUM_THREADS`;\n    ///       if the environment variable is not given the number of compute thread is set to the system-defined number of hardware threads.\n    World& initialize(int& argc, char**& argv, const SafeMPI::Intracomm& comm,\n        bool quiet = false);\n\n    /// Initializes the MADNESS runtime with the given MPI communicator and\n    /// the given number of compute threads\n\n    /// Call this once at the very top of your main program to initialize the\n    /// MADNESS runtime. This function should be called instead of \\c MPI_Init()\n    /// or \\c MPI_Init_thread().\n    /// \\param[in,out] argc Application argument count.\n    /// \\param[in,out] argv Application argument values.\n    /// \\param comm The communicator that should be used to construct the\n    ///     \\c World object.\n    /// \\param[in] nthread The total number of compute threads to create\n    ///                    (the main thread is counted among the compute threads);\n    ///                    if a negative value is given then the default number of compute threads\n    ///                    will be used.\n    /// \\param[in] quiet If false, will announce to \\c std::cout on rank 0 when\n    ///            the runtime has been initialized.\n    /// \\return A reference to the \\c World constructed with \\c comm.\n    /// \\note The default number of compute threads is read from the environment variable `MAD_NUM_THREADS`;\n    ///       if the environment variable is not given the number of compute thread is set to the system-defined number of hardware threads.\n    World& initialize(int& argc, char**& argv, const SafeMPI::Intracomm& comm,\n                      int nthread,\n                      bool quiet = false);\n\n    /// Initializes the MADNESS runtime with the given MPI communicator and\n    /// the given number of compute threads\n\n    /// Call this once at the very top of your main program to initialize the\n    /// MADNESS runtime. This function should be called instead of \\c MPI_Init()\n    /// or \\c MPI_Init_thread().\n    /// \\param[in,out] argc Application argument count.\n    /// \\param[in,out] argv Application argument values.\n    /// \\param comm The MPI communicator that should be used to construct the\n    ///     \\c World object.\n    /// \\param[in] nthread The total number of compute threads to create\n    ///                    (the main thread is counted among the compute threads)\n    ///                    if a negative value is given then the default number of compute threads\n    ///                    will be used.\n    /// \\param[in] quiet If false, will announce to \\c std::cout on rank 0 when\n    ///            the runtime has been initialized.\n    /// \\return A reference to the World constructed with \\c comm.\n    /// \\note The default number of compute threads is read from the environment variable `MAD_NUM_THREADS`;\n    ///       if the environment variable is not given the number of compute thread is set to the system-defined number of hardware threads.\n    World& initialize(int& argc, char**& argv, const MPI_Comm& comm,\n                      int nthread,\n                      bool quiet = false);\n\n    /// Call this once at the very end of your main program instead of MPI_Finalize().\n    void finalize();\n\n    /// Check if the MADNESS runtime has been initialized (and not subsequently finalized).\n\n    /// @return true if \\c madness::initialize had been called more recently than \\c madness::finalize, false otherwise.\n    bool initialized();\n\n    /// Check if the MADNESS runtime was initialized for quiet operation.\n\n    /// @return true if \\c madness::initialize was called with \\c quiet=true .\n    bool quiet();\n\n} // namespace madness\n\n/// @}\n\n#endif // MADNESS_WORLD_WORLDINIT_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldmem.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id: world.cc 454 2008-01-26 03:08:15Z rjharrison $\n*/\n\n#include <madness/world/worldmem.h>\n#include <cstdlib>\n//#include <cstdio>\n#include <climits>\n#include <iostream>\n#include <iomanip>\n\n#include <mutex>\n\n/*\n\n  Memory allocation structure\n\n  ---------\n  base             <--- actual-pointer\n  ...\n  user-size        <--- p - sizeof(3*long)\n  actual-pointer   <--- p - sizeof(2*long)\n  pre-checksum     <--- p - sizeof(long)\n  ---------\n  user-size bytes  <--- p\n  16-byte aligned\n  ---------\n  post-checksum\n  ---------\n\n */\n\n\nstatic madness::WorldMemInfo stats = {0, 0, 0, 0, 0, 0, ULONG_MAX, false};\n\nnamespace madness {\n    WorldMemInfo* world_mem_info() {\n        return &stats;\n    }\n\n    void WorldMemInfo::do_new(void *p, std::size_t size) {\n        ++num_new_calls;\n        ++cur_num_frags;\n        if (cur_num_frags > max_num_frags) max_num_frags = cur_num_frags;\n        cur_num_bytes += size;\n        if (cur_num_bytes > max_num_bytes) max_num_bytes = cur_num_bytes;\n\n        if (trace)\n            std::cout << \"WorldMemInfo: allocating \" << p << \" \" << size << \"\\n\";\n    }\n\n    void WorldMemInfo::do_del(void *p, std::size_t size) {\n        ++num_del_calls;\n        --cur_num_frags;\n        cur_num_bytes -= size;\n\n        if (trace)\n            std::cout << \"WorldMemInfo: deleting \" << p << \" \" << size << \"\\n\";\n    }\n\n    void WorldMemInfo::print() const {\n        std::cout.flush();\n        std::cout << \"\\n    MADNESS memory statistics\\n\";\n        std::cout << \"    -------------------------\\n\";\n        std::cout << \"      overhead bytes per frag \" << std::setw(12)\n            << overhead << \"\\n\";\n        std::cout << \"         calls to new and del \" << std::setw(12)\n            << num_new_calls << \" \" << std::setw(12) << num_del_calls << \"\\n\";\n        std::cout << \"  cur and max frags allocated \" << std::setw(12)\n            << cur_num_frags << \" \" << std::setw(12) << max_num_frags << \"\\n\";\n        std::cout << \"  cur and max bytes allocated \" << std::setw(12)\n            << cur_num_bytes << \" \" << std::setw(12) << max_num_bytes << \"\\n\";\n    }\n\n    void WorldMemInfo::reset() {\n        num_new_calls = 0;\n        num_del_calls = 0;\n        cur_num_frags = 0;\n        max_num_frags = 0;\n        cur_num_bytes = 0;\n        max_num_bytes = 0;\n    }\n\n}  // namespace madness\n\n#ifdef WORLD_GATHER_MEM_STATS\n\n#include <exception>\n\nstatic const unsigned long pre_checksum = 0xdeadbeef;\nstatic const unsigned char post_checksum = 0xab;\n\nnamespace madness {\n  // This is called from the delete operator when a buffer underflow is detected.\n  // Any error code for this condition should be added here.\n  void world_mem_buffer_underflow() {\n      std::cerr << \"WorldMemInfo: Buffer underflow detected.\\n\" <<\n          \"Set a breakpoint at madness::world_mem_buffer_underflow() to debug.\\n\";\n  }\n\n  // This is called from the delete operator when a buffer overflow is detected.\n  // Any error code for this condition should be added here.\n  void world_mem_buffer_overflow() {\n      std::cerr << \"WorldMemInfo: Buffer overflow detected.\\n\" <<\n          \"Set a breakpoint at madness::world_mem_buffer_overflow() to debug.\\n\";\n  }\n} // namespace madness\n\nvoid* operator new(size_t size) throw (std::bad_alloc) {\n    // user-size + actual_pointer + pre_checksum + post_checksum + padding\n    std::size_t actual_size = size + madness::WorldMemInfo::overhead;\n\n    if (size+stats.cur_num_bytes > stats.max_mem_limit)\n        throw std::bad_alloc(); //MADNESS_EXCEPTION(\"WorldMemInfo: execeeded max_mem_limit\", stats.max_mem_limit);\n\n    unsigned long* actual_pointer= (unsigned long*) malloc(actual_size);\n    if (actual_pointer==0) throw std::bad_alloc(); // ANSI/ISO compliant behavior\n    unsigned char* p = (unsigned char*)(actual_pointer + 3);\n\n    p += 16 - (((unsigned long) p)&0x0f);\n    p[size] = post_checksum;\n\n    unsigned long* lp = (unsigned long*) p;  // Non-portable alignment assumption here????\n\n    lp[-1] = pre_checksum;\n    lp[-2] = (unsigned long) actual_pointer;\n    lp[-3] = size;\n\n    stats.do_new(p, size);\n\n    return (void *) p;\n}\n\nvoid operator delete(void *p) throw() {\n    unsigned long* lp = (unsigned long*) p;\n    if (lp[-1] != pre_checksum) madness::world_mem_buffer_underflow();\n    unsigned long* actual_pointer = (unsigned long*) lp[-2];\n    std::size_t size = lp[-3];\n    unsigned char* cp = (unsigned char*) p;\n    if (cp[size] != post_checksum) madness::world_mem_buffer_overflow();\n\n    stats.do_del(p, size);\n\n    free(actual_pointer);\n}\n\n#endif  // defined(WORLD_GATHER_MEM_STATS)\n\nnamespace madness {\n  namespace detail {\n    template <> const char* Vm_cstr<char>() { return \"Vm\"; }\n    template <> const wchar_t* Vm_cstr<wchar_t>() { return L\"Vm\"; }\n\n    bool& print_meminfo_flag_accessor() {\n      static bool flag = true;\n      return flag;\n    }\n    bool& print_meminfo_keepstreamopen_accessor() {\n      static bool flag = false;\n      return flag;\n    }\n  }  // namespace detail\n\n  void print_meminfo_disable() {\n    detail::print_meminfo_flag_accessor() = false;\n  }\n  void print_meminfo_enable() {\n    detail::print_meminfo_flag_accessor() = true;\n  }\n  bool print_meminfo_enabled() {\n    return detail::print_meminfo_flag_accessor();\n  }\n\n  void print_meminfo_keep_ostream_open(bool keep_open) {\n    detail::print_meminfo_keepstreamopen_accessor() = keep_open;\n  }\n\n  bool print_meminfo_keep_ostream_open() {\n    return detail::print_meminfo_keepstreamopen_accessor();\n  }\n\n  std::basic_ofstream<wchar_t>&\n  print_meminfo_ostream(int rank, const std::string filename_prefix) {\n    static std::mutex mtx;  // serializes access to this function's statics\n    static std::basic_ofstream<wchar_t> stream;\n    static std::string filename_prefix_used;\n    static int rank_used;\n\n    if (print_meminfo_keep_ostream_open()) {\n      // open, if needed\n      if (!stream.is_open()) {\n        std::scoped_lock lock(mtx);\n        if (!stream.is_open()) {\n          if (filename_prefix == \"\" && rank == -1) {\n            throw std::runtime_error(\n                \"madness::print_meminfo_ostream(rank,filename_prefix) called for the first time with default values of arguments (rank=-1,filename_prefix=\\\"\\\"); call with non-default values once\");\n          }\n          filename_prefix_used = filename_prefix;\n          rank_used = rank;\n          std::ostringstream filename;\n          filename << filename_prefix << \".\" << rank;\n          stream.open(filename.str().c_str(), std::basic_ios<wchar_t>::out |\n                                                  std::basic_ios<wchar_t>::app);\n        }\n      }\n      else {\n        if ((rank != -1 && rank != rank_used) || (filename_prefix != \"\" && filename_prefix_used != filename_prefix)) {\n          std::ostringstream oss;\n          oss << \"madness::print_meminfo_ostream(rank=\" << rank\n              << \",filename_prefix=\" << filename_prefix\n              << \") was originally called with rank=\" << rank_used\n              << \" and filename_prefix=\" << filename_prefix_used\n              << \"; every invocation must receive same values of rank and filename_prefix\";\n          throw std::runtime_error(oss.str().c_str());\n        }\n      }\n      return stream;\n    } else\n      throw std::runtime_error(\n          \"madness::print_meminfo_ostream called but print_meminfo_keep_ostream_open() returned false; make sure print_meminfo_keep_ostream_open(true) has been called\");\n  }\n\n  }  // namespace madness\n\n"
  },
  {
    "path": "src/madness/world/worldmem.h",
    "content": "#ifndef MADNESS_WORLD_WORLDMEM_H__INCLUDED\n#define MADNESS_WORLD_WORLDMEM_H__INCLUDED\n\n/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n\n  $Id: world.cc 454 2008-01-26 03:08:15Z rjharrison $\n*/\n\n#include <madness/madness_config.h>\n#include <string>\n#ifdef WORLD_GATHER_MEM_STATS\n#include <new>\n#endif // WORLD_GATHER_MEM_STATS\n#include <cstddef>\n#include <fstream>\n#include <sstream>\n\n#if defined(MADNESS_HAS_GOOGLE_PERF_TCMALLOC)\n#include <gperftools/malloc_extension.h>\n#elif defined(HAVE_IBMBGQ)\n#include <spi/include/kernel/memory.h>\n#elif defined(ON_A_MAC)\n#include <malloc/malloc.h>\n#elif defined(X86_32)\n#include <malloc.h>\n#elif defined(X86_64)\n#include <sys/types.h>\n#include <unistd.h>\n#include <sys/sysinfo.h>\n#include <string>\n#endif\n\nnamespace madness {\n\n    /// Used to output memory statistics and control tracing, etc.\n\n    /// There is currently only one instance of this class in worldmem.cc\n    /// that is used by special versions of global new+delete enabled\n    /// by compiling with WORLD_GATHER_MEM_STATS enabled.\n    ///\n    /// Default for max_mem_limit is unlimited.\n    class WorldMemInfo {\n#ifdef WORLD_GATHER_MEM_STATS\n        friend void* ::operator new(size_t size) throw (std::bad_alloc);\n        friend void ::operator delete(void *p) throw();\n#endif\n    private:\n        /// Invoked when user pointer p is allocated with size bytes\n        void do_new(void *p, std::size_t size);\n\n        /// Invoked when user pointer p is deleted with size bytes\n        void do_del(void *p, std::size_t size);\n\n    public:\n        static const unsigned long overhead = 4*sizeof(long) + 16;\n        /// If you add new stats be sure that the initialization in worldmem.cc is OK\n        unsigned long num_new_calls;   ///< Counts calls to new\n        unsigned long num_del_calls;   ///< Counts calls to delete\n        unsigned long cur_num_frags;   ///< Current number of allocated fragments\n        unsigned long max_num_frags;   ///< Lifetime maximum number of allocated fragments\n        unsigned long cur_num_bytes;   ///< Current amount of allocated memory in bytes\n        unsigned long max_num_bytes;   ///< Lifetime maximum number of allocated bytes\n        unsigned long max_mem_limit;   ///< if size+cur_num_bytes>max_mem_limit new will throw MadnessException\n        bool trace;\n\n        /// Prints memory use statistics to std::cout\n        void print() const;\n\n        /// Resets all counters to zero\n        void reset();\n\n        /// If trace is set true a message is printed for every new and delete\n        void set_trace(bool trace) {\n            this->trace = trace;\n        }\n\n        /// Set the maximum memory limit (trying to allocate more will throw MadnessException)\n        void set_max_mem_limit(unsigned long max_mem_limit) {\n            this->max_mem_limit = max_mem_limit;\n        }\n    };\n\n    /// Returns pointer to internal structure\n    WorldMemInfo* world_mem_info();\n\n    namespace detail {\n      template <typename Char> const Char* Vm_cstr();\n\n      bool& print_meminfo_flag_accessor();\n    }\n\n    /// \\name print_meminfo\n    /// These functions are useful to instrument *aggregate* (not fine-grained, like WorldMemInfo) memory profiling.\n    /// \\note To make this functionality usable must set the `ENABLE_MEM_PROFILE` CMake cache variable to `ON`\n    ///@{\n\n    /// disables print_meminfo() profiling (i.e. calling it is a no-op)\n    void print_meminfo_disable();\n    /// enables print_meminfo() profiling\n    /// \\note print_meminfo() profiling is on by default.\n    void print_meminfo_enable();\n    /// @return true if print_meminfo() will generate profiling data.\n    bool print_meminfo_enabled();\n    /// @param[in] keep_open if true, the stream used by print_meminfo() will be\n    ///            kept open\n    /// @note by default the stream is opened and closed every time\n    void print_meminfo_keep_ostream_open(bool keep_open);\n    /// @return true if the stream used by print_meminfo() is open between calls\n    bool print_meminfo_keep_ostream_open();\n\n    /// @param[in] rank process rank; the default is -1\n    /// @param[in] filename_prefix file name prefix; the default is empty string\n    /// @return open stream used by print_meminfo()\n    /// @throw std::runtime_error if:\n    ///    - print_meminfo_keep_ostream_open() returns false, or\n    ///    - called for the first time with default values of @p rank or\n    ///      @p filename_prefix , or\n    ///    - if this was previously called with different values of @p rank or\n    ///      @p filename_prefix\n    std::basic_ofstream<wchar_t>& print_meminfo_ostream(\n        int rank = -1, const std::string filename_prefix = std::string(\"\"));\n\n    /// \\brief print aggregate memory stats to file \\c filename_prefix.<rank> , tagged with \\c tag\n    /// \\param[in] rank process rank\n    /// \\param[in] tag record tag as any string type, e.g. \\c const char[] , \\c std::string , or \\c std::wstring\n    /// \\param[in] filename_prefix file name prefix; the default value is \"MEMORY\"\n    /// \\param[in] verbose if true, will produce verbose output; is only currently used if TCMalloc is used\n    /// \\note To make print_meminfo() usable must set the ENABLE_MEM_PROFILE CMake cache variable to ON; this makes print_meminfo() enabled by default.\n    ///       To disable/enable programmatically use print_meminfo_disable()/print_meminfo_enable() .\n    /// \\note must set global locale properly with \\c std::locale::global() if \\c tag has\n    ///       nontrivial encoding\n    /// \\warning this does not fence, it is up to the user to ensure proper synchronization\n    template <typename String> void print_meminfo(\n        int rank, const String& tag,\n        const std::string filename_prefix = std::string(\"MEMORY\"),\n        bool verbose = false) {\n#if defined(WORLD_MEM_PROFILE_ENABLE)\n      if (print_meminfo_enabled()) {\n        std::basic_ofstream<wchar_t> local_ofstream;\n        if (!print_meminfo_keep_ostream_open()) {\n          std::ostringstream filename;\n\n          filename << filename_prefix << \".\" << rank;\n\n          local_ofstream.open(filename.str().c_str(),\n                          std::basic_ios<wchar_t>::out |\n                              std::basic_ios<wchar_t>::app);\n        }\n        std::basic_ofstream<wchar_t>& memoryfile = print_meminfo_keep_ostream_open() ? print_meminfo_ostream(rank, filename_prefix) : local_ofstream;\n        if constexpr (std::is_same_v<String, std::basic_string<char>> || std::is_same_v<String, std::basic_string_view<char>>) {\n          std::wstring wtag; wtag.resize(tag.size());\n          std::copy(tag.begin(), tag.end(), wtag.begin());\n          memoryfile << wtag << std::endl;\n        }\n        else\n          memoryfile << tag << std::endl;\n\n        const double to_MiB =\n            1 / (1024.0 * 1024.0); /* Convert from bytes to MiB */\n#if defined(MADNESS_HAS_GOOGLE_PERF_TCMALLOC)\n        if (verbose) {\n          char buf[100000];\n          MallocExtension::instance()->GetStats(&buf[0], 100000);\n          memoryfile << buf << std::endl;\n        }\n        else {  // <10000 => level-1 printing\n          char buf[9999];\n          MallocExtension::instance()->GetStats(&buf[0], 9999);\n          memoryfile << buf << std::endl;\n        }\n#elif defined(HAVE_IBMBGQ)\n        uint64_t shared, persist, heapavail, stackavail, stack, heap, guard,\n            mmap;\n\n        Kernel_GetMemorySize(KERNEL_MEMSIZE_SHARED, &shared);\n        Kernel_GetMemorySize(KERNEL_MEMSIZE_PERSIST, &persist);\n        Kernel_GetMemorySize(KERNEL_MEMSIZE_HEAPAVAIL, &heapavail);\n        Kernel_GetMemorySize(KERNEL_MEMSIZE_STACKAVAIL, &stackavail);\n        Kernel_GetMemorySize(KERNEL_MEMSIZE_STACK, &stack);\n        Kernel_GetMemorySize(KERNEL_MEMSIZE_HEAP, &heap);\n        Kernel_GetMemorySize(KERNEL_MEMSIZE_GUARD, &guard);\n        Kernel_GetMemorySize(KERNEL_MEMSIZE_MMAP, &mmap);\n\n        memoryfile << \"Heap size (MiB): \" << (heap * to_MiB)\n                   << \", available: \" << (heapavail * to_MiB) << std::endl;\n        memoryfile << \"Stack size (MiB): \" << (stack * to_MiB)\n                   << \", available: \" << (stackavail * to_MiB) << std::endl;\n        memoryfile << \"Memory (MiB): shared: \" << (shared * to_MiB)\n                   << \", persist: \" << (persist * to_MiB)\n                   << \", guard: \" << (guard * to_MiB) << \", mmap: \" << (mmap * to_MiB)\n                   << std::endl;\n#elif defined(ON_A_MAC)\n        /* Mac OS X specific hack - un-tested post Snow Leopard */\n        struct malloc_statistics_t mi; /* structure in bytes */\n\n        malloc_zone_statistics(nullptr, &mi);\n\n        memoryfile << \"Heap allocated  (MiB): \" << (mi.size_allocated * to_MiB) << std::endl;\n        memoryfile << \"Heap used       (MiB): \" << (mi.size_in_use * to_MiB) << std::endl;\n        memoryfile << \"Heap max used   (MiB): \" << (mi.max_size_in_use * to_MiB) << std::endl;\n#elif defined(X86_32) // 32-bit Linux\n        struct mallinfo mi; /* structure in bytes */\n\n        mi = mallinfo();\n\n        memoryfile << \"Non-mmap (MiB): \" << (mi.arena * to_MiB) << std::endl;\n        memoryfile << \"Mmap (MiB): \" << (mi.hblkhd * to_MiB) << std::endl;\n        memoryfile << \"Total malloc chunks (MiB): \" << (mi.uordblks * to_MiB)\n                   << std::endl;\n#elif defined(X86_64) // 64-bit Linux\n        // try parsing /proc/PID/status first, fallback on sysinfo\n        std::string status_fname =\n            std::string(\"/proc/\") + std::to_string(getpid()) + std::string(\"/status\");\n        std::basic_ifstream<char> status_stream(status_fname);\n        if (status_stream.good()) {\n          std::basic_string<char> line;\n          while (std::getline(status_stream, line)) {\n            if (line.find(detail::Vm_cstr<char>()) == 0)\n              memoryfile << line.c_str() << std::endl;\n          }\n          status_stream.close();\n        } else {\n          /* Better than nothing, mallinfo unreliable on 64-bit machine due to\n             use of int in mallinfo data structure. Requires Linux\n             kernel. Inaccurate if other processes besides MADNESS are\n             running. Memory differences appear to be reliable. */\n          struct sysinfo si; /* structure in bytes */\n\n          sysinfo(&si);\n\n          memoryfile << \"Total RAM (MiB): \" << (si.totalram * to_MiB) << std::endl;\n          memoryfile << \"Free RAM (MiB): \" << (si.freeram * to_MiB) << std::endl;\n          memoryfile << \"Buffer (MiB): \" << (si.bufferram * to_MiB) << std::endl;\n          memoryfile << \"RAM in use (MiB): \"\n                     << ((si.totalram - si.freeram + si.bufferram) * to_MiB)\n                     << std::endl;\n        }\n#endif                // platform specific\n        if (!print_meminfo_keep_ostream_open()) {\n          memoryfile.close();\n        }\n      }\n#else   // WORLD_MEM_PROFILE_ENABLE\n      return;\n#endif  // WORLD_MEM_PROFILE_ENABLE\n    }\n\n    ///@}\n\n}  // namespace madness\n\n#endif // MADNESS_WORLD_WORLDMEM_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldmpi.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2013  Virginia Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file worldmpi.cc\n \\brief Several variables needed for \\c WorldMPI.\n \\ingroup mpi\n*/\n\n#include <madness/world/worldmpi.h>\n\nnamespace madness {\n    namespace detail {\n\n        /// \\addtogroup mpi\n        /// @{\n\n        std::shared_ptr<WorldMpi> WorldMpi::world_mpi;\n\n        /// Flag storing if MADNESS is responsible for MPI.\n\n        /// \\todo Verify the above brief description.\n        bool WorldMpi::own_mpi = false;\n\n#ifdef MADNESS_USE_BSEND_ACKS\n        /// MPI buffer.\n        char* WorldMpi::mpi_ack_buffer[MADNESS_ACK_BUFF_SIZE];\n#endif // MADNESS_USE_BSEND_ACKS\n\n        /// @}\n\n    } // namespace detail\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/worldmpi.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_WORLDMPI_H__INCLUDED\n#define MADNESS_WORLD_WORLDMPI_H__INCLUDED\n\n/**\n \\file worldmpi.h\n \\brief Implements \\c WorldMpiInterface.\n \\ingroup mpi\n*/\n\n/*\n// If include mpi.h BEFORE stdio/iostream should not need undefs\n#ifdef SEEK_CUR\n#undef SEEK_CUR\n#endif\n#ifdef SEEK_SET\n#undef SEEK_SET\n#endif\n#ifdef SEEK_END\n#undef SEEK_END\n#endif\n*/\n\n#include <type_traits>\n#include <madness/world/safempi.h>\n#include <madness/world/worldtypes.h>\n#include <cstdlib>\n\n/// \\addtogroup mpi\n/// @{\n\n#ifdef MADNESS_USE_BSEND_ACKS\n/// \\todo Verify: Size of the acknowledgment buffer.\n#define MADNESS_ACK_BUFF_SIZE 1000\n#endif // MADNESS_USE_BSEND_ACKS\n\n/// String description of the MPI thread level.\n\n/// \\param[in] level The MPI thread level.\n/// \\return A string description of the thread level.\n#define MPI_THREAD_STRING(level)  \\\n        ( level==MPI_THREAD_SERIALIZED ? \"THREAD_SERIALIZED\" : \\\n            ( level==MPI_THREAD_MULTIPLE ? \"THREAD_MULTIPLE\" : \\\n                ( level==MPI_THREAD_FUNNELED ? \"THREAD_FUNNELED\" : \\\n                    ( level==MPI_THREAD_SINGLE ? \"THREAD_SINGLE\" : \"THREAD_UNKNOWN\" ) ) ) )\n\nnamespace madness {\n\n    // Forward declarations\n    class World;\n    World& initialize(int&, char**&, const SafeMPI::Intracomm&, bool);\n    void finalize();\n\n    /// \\todo Brief description needed.\n    static const Tag DYNAMIC_TAG_BASE = 1024;\n\n    namespace detail {\n\n        class WorldMpiRuntime;\n\n        /// MPI singleton that manages MPI setup and teardown for MADNESS.\n\n        /// MADNESS will call \\c WorldMpi::initialize and \\c WorldMpi::finalize\n        /// to setup and teardown the MPI runtime.\n        class WorldMpi {\n        private:\n            // Friends of MpiWorld\n            friend class WorldMpiRuntime;\n\n            /// Pointer to help MADNESS manage MPI.\n\n            /// This shared pointer is used to manage the lifetime of the MPI\n            /// within MADNESS. It ensures that MPI is destroyed only after the\n            /// last world object is destroyed.\n            static std::shared_ptr<WorldMpi> world_mpi;\n            static bool own_mpi; ///< \\todo Brief description needed.\n\n#ifdef MADNESS_USE_BSEND_ACKS\n            /// Acknowledgment buffer.\n            static char* mpi_ack_buffer[MADNESS_ACK_BUFF_SIZE];\n#endif // MADNESS_USE_BSEND_ACKS\n\n            /// \\c WorldMpi constructor.\n\n            /// Initialize the MPI runtime for MADNESS.\n            /// \\note This constructor is private to prevent incorrect\n            ///    initialization. The user should call \\c initialize.\n            /// \\param[in,out] argc The number of command-line arguments to process.\n            /// \\param[in,out] argv The command-line arguments.\n            /// \\param requested The requested thread support for MPI runtime\n            WorldMpi(int& argc, char**& argv, int requested) {\n                if(own_mpi) {\n                    // Assume that MADNESS is managing MPI.\n                    SafeMPI::Init_thread(argc, argv, requested);\n                } else {\n                    // MPI has already been initialized, so it is the user's\n                    // responsibility to manage MPI and MADNESS world objects.\n                    SafeMPI::detail::init_comm_world();\n                }\n\n#ifdef MADNESS_USE_BSEND_ACKS\n                // Register the acknowlegement buffer for RMI\n                SafeMPI::Attach_buffer(mpi_ack_buffer, MADNESS_ACK_BUFF_SIZE);\n#endif // MADNESS_USE_BSEND_ACKS\n            }\n\n            // Not allowed\n            WorldMpi(const WorldMpi&) = delete;\n            WorldMpi& operator=(const WorldMpi&) = delete;\n\n        public:\n\n            /// \\c WorldMpi destructor.\n\n            /// This will teardown the MPI, SafeMPI.\n            ~WorldMpi() {\n#ifdef MADNESS_USE_BSEND_ACKS\n                // Unregister the acknowlegement buffer for RMI\n                void* buff = nullptr;\n                SafeMPI::Detach_buffer(buff);\n#endif // MADNESS_USE_BSEND_ACKS\n\n                // Teardown MPI/SafeMPI\n                if(own_mpi) {\n                    const int result = SafeMPI::Finalize();\n\n                    // Check that MPI exited cleanly.\n                    if(result != MPI_SUCCESS) {\n                        // Print the error message returned by MPI_Finalize().\n                        char mpi_error_string[MPI_MAX_ERROR_STRING];\n                        int len = 0;\n                        if(MPI_Error_string(result, mpi_error_string, &len) != MPI_SUCCESS) {\n                                std::strncpy(mpi_error_string, \"UNKNOWN MPI ERROR!\", MPI_MAX_ERROR_STRING);\n                        }\n                        std::cout << \"!! MPI Error: \" << mpi_error_string << \"\\n\";\n                    }\n                }\n            }\n\n            /// Initialize the MPI runtime.\n\n            /// This function starts the MPI runtime. If MPI is already running,\n            /// then MADNESS delegate responsibility for MPI to the user. In\n            /// either case, MPI thread support is checked to make sure MPI will\n            /// play nice with MADNESS.\n            ///\n            /// \\throw madness::Exception When MADNESS has already been initialized.\n            /// \\throw madness::Exception When MPI has already been finalized.\n            /// \\throw SafeMPI::Exception When an MPI error occurs.\n            ///\n            /// \\param[in,out] argc The number of command line arguments.\n            /// \\param[in,out] argv The values of command line arguments.\n            /// \\param[in] requested The requested thread support for MPI runtime.\n            static void initialize(int& argc, char**& argv, int requested) {\n                // Check that world_mpi has not been initialized yet and that\n                // MPI has not been finalized\n                MADNESS_ASSERT(! world_mpi);\n                MADNESS_ASSERT(! SafeMPI::Is_finalized());\n\n                // Check for ownership of MPI (user or MADNESS runtime).\n                own_mpi = ! SafeMPI::Is_initialized();\n\n                // Initialize the MPI runtime\n                world_mpi.reset(new WorldMpi(argc, argv, requested));\n\n                // Check that the thread support provided by MPI matches the\n                // requested and required thread support.\n                const int provided = SafeMPI::Query_thread();\n                const int rank = SafeMPI::COMM_WORLD.Get_rank();\n                if((provided < requested) && (rank == 0)) {\n                    std::cout << \"!! Error: MPI_Init_thread did not provide requested functionality: \"\n                              << MPI_THREAD_STRING(requested) << \" (\" << MPI_THREAD_STRING(provided) << \"). \\n\"\n                              << \"!! Error: The MPI standard makes no guarantee about the correctness of a program in such circumstances. \\n\"\n                              << \"!! Error: Please reconfigure your MPI to provide the proper thread support. \\n\"\n                              << std::endl;\n                    MPI_Abort(MPI_COMM_WORLD, 1);\n                } else if((provided > requested) && (rank == 0)) {\n                    std::cout << \"!! Warning: MPI_Init_thread provided more than the requested functionality: \"\n                              << MPI_THREAD_STRING(requested) << \" (\" << MPI_THREAD_STRING(provided) << \"). \\n\"\n                              << \"!! Warning: You are likely using an MPI implementation with mediocre thread support. \\n\"\n                              << std::endl;\n                }\n\n#if defined(MVAPICH2_VERSION)\n                // Check that MVAPICH2 has has the correct thread affinity\n                char * mv2_string = nullptr;\n                int mv2_affinity = 1; /* this is the default behavior of MVAPICH2 */\n\n                if ((mv2_string = getenv(\"MV2_ENABLE_AFFINITY\")) != nullptr) {\n                    mv2_affinity = atoi(mv2_string);\n                }\n\n                if (mv2_affinity!=0) {\n                    std::cout << \"!! Error: You are using MVAPICH2 with affinity enabled, probably by default. \\n\"\n                              << \"!! Error: This will cause catastrophic performance issues in MADNESS. \\n\"\n                              << \"!! Error: Rerun your job with MV2_ENABLE_AFFINITY=0 \\n\"\n                              << std::endl;\n                    MPI_Abort(MPI_COMM_WORLD, 1);\n                }\n#endif // defined(MVAPICH2_VERSION)\n            }\n\n            /// Finalize the MPI runtime.\n\n            /// This function starts the teardown process of the MPI runtime.\n            /// The actual \\c MPI_Finalize will only be called when all the\n            /// objects using MPI have been destroyed.\n            static void finalize() {\n                world_mpi.reset();\n            }\n        }; // class WorldMpi\n\n        /// MPI runtime reference counter.\n\n        /// This object is used to manage the lifetime of the MPI runtime by\n        /// holding a reference to the `WorldMpi::world_mpi` pointer.\n        class WorldMpiRuntime {\n        private:\n            /// A pointer to `WorldMpi::world_mpi`. Used to help manage the lifetime of MPI.\n            std::shared_ptr<WorldMpi> world_mpi;\n\n        public:\n            /// Constructor.\n            WorldMpiRuntime() : world_mpi(WorldMpi::world_mpi) { }\n\n            /// Destructor.\n            ~WorldMpiRuntime() { world_mpi.reset(); }\n        }; // class WorldMpiInstance\n\n    } // namespace detail\n\n\n    /// This class wraps/extends the MPI interface for \\c World.\n    class WorldMpiInterface\n        : private detail::WorldMpiRuntime, public SafeMPI::Intracomm\n    {\n\n        // Not allowed\n        WorldMpiInterface(const WorldMpiInterface&) = delete;\n        WorldMpiInterface& operator=(const WorldMpiInterface&) = delete;\n\n    public:\n        /// Constructs an interface in the specified \\c SafeMPI communicator.\n\n        /// \\todo Verify this documentation.\n        /// \\param[in] comm The communicator.\n        WorldMpiInterface(const SafeMPI::Intracomm& comm) :\n            detail::WorldMpiRuntime(), SafeMPI::Intracomm(comm)\n        { }\n\n        ~WorldMpiInterface() = default;\n\n        /// Returns the associated \\c SafeMPI communicator.\n\n        /// \\return The associated \\c SafeMPI communicator.\n        SafeMPI::Intracomm& comm() {\n            return *static_cast<SafeMPI::Intracomm*>(this);\n        }\n\n        using SafeMPI::Intracomm::Isend;\n        using SafeMPI::Intracomm::Irecv;\n        using SafeMPI::Intracomm::Send;\n        using SafeMPI::Intracomm::Recv;\n        using SafeMPI::Intracomm::Bcast;\n\n        // !! All of the routines below call the protected interfaces provided above.\n        // !! Please ensure any additional routines follow this convention.\n\n        /// Isend one element.\n\n        /// \\note Disabled for pointers to reduce accidental misuse.\n        /// \\tparam T The type of data to send.\n        /// \\param[in] datum The element to send.\n        /// \\param[in] dest The destination process.\n        /// \\param[in] tag The MPI tag.\n        template <typename T>\n        typename std::enable_if<!std::is_pointer<T>::value, SafeMPI::Request>::type\n        Isend(const T& datum, int dest, int tag=SafeMPI::DEFAULT_SEND_RECV_TAG) const {\n            return SafeMPI::Intracomm::Isend(&datum, sizeof(T), MPI_BYTE, dest, tag);\n        }\n\n        /// Async receive data of up to \\c count elements from process \\c source.\n\n        /// \\tparam T The type of data to receive.\n        /// \\param[out] buf Where to put the received data.\n        /// \\param[in] count The number of data elements to receive.\n        /// \\param[in] source The source process.\n        /// \\param[in] tag The MPI tag.\n        template <typename T>\n        SafeMPI::Request\n        Irecv(T* buf, int count, int source, int tag=SafeMPI::DEFAULT_SEND_RECV_TAG) const {\n            return SafeMPI::Intracomm::Irecv(buf, count*sizeof(T), MPI_BYTE, source, tag);\n        }\n\n\n        /// Async receive datum from process \\c source with default `tag=1`.\n\n        /// \\tparam T The type of data to receive.\n        /// \\param[out] buf Where to put the received datum.\n        /// \\param[in] source The source process.\n        /// \\param[in] tag The MPI tag.\n        template <typename T>\n        typename std::enable_if<!std::is_pointer<T>::value, SafeMPI::Request>::type\n        Irecv(T& buf, int source, int tag=SafeMPI::DEFAULT_SEND_RECV_TAG) const {\n            return SafeMPI::Intracomm::Irecv(&buf, sizeof(T), MPI_BYTE, source, tag);\n        }\n\n\n        /// Send array of \\c lenbuf elements to process \\c dest.\n\n        /// \\tparam T The type of data to send.\n        /// \\param[in] buf Pointer to the data.\n        /// \\param[in] lenbuf The number of data elements to send.\n        /// \\param[in] dest The destination process.\n        /// \\param[in] tag The MPI tag.\n        template <class T>\n        void Send(const T* buf, long lenbuf, int dest, int tag=SafeMPI::DEFAULT_SEND_RECV_TAG) const {\n            SafeMPI::Intracomm::Send((void*)buf, lenbuf*sizeof(T), MPI_BYTE, dest, tag);\n        }\n\n\n        /// Send element to process \\c dest with default `tag=1001`.\n\n        /// \\note Disabled for pointers to reduce accidental misuse.\n        /// \\tparam T The type of data to send.\n        /// \\param[in] datum The data element to send.\n        /// \\param[in] dest The destination process.\n        /// \\param[in] tag The MPI tag.\n        template <typename T>\n        typename std::enable_if<!std::is_pointer<T>::value, void>::type\n        Send(const T& datum, int dest, int tag=SafeMPI::DEFAULT_SEND_RECV_TAG) const {\n            SafeMPI::Intracomm::Send((void*)&datum, sizeof(T), MPI_BYTE, dest, tag);\n        }\n\n\n        /// Receive data of up to \\c lenbuf elements from process \\c src.\n\n        /// \\tparam T The type of data to receive.\n        /// \\param[out] buf Where to put the received data.\n        /// \\param[in] lenbuf The maximum number of data elements to receive.\n        /// \\param[in] src The source process.\n        /// \\param[in] tag The MPI tag.\n        template <typename T>\n        void Recv(T* buf, long lenbuf, int src, int tag) const {\n            SafeMPI::Intracomm::Recv(buf, lenbuf*sizeof(T), MPI_BYTE, src, tag);\n        }\n\n        /// Receive data of up to \\c lenbuf elements from process \\c dest with \\c status.\n\n        /// \\tparam T The type of data to receive.\n        /// \\param[out] buf Where to put the received data.\n        /// \\param[in] lenbuf The maximum number of data elements to receive.\n        /// \\param[in] src The source process.\n        /// \\param[in] tag The MPI tag.\n        /// \\param[in] status The status.\n        template <typename T>\n        void Recv(T* buf, long lenbuf, int src, int tag, SafeMPI::Status& status) const {\n            SafeMPI::Intracomm::Recv(buf, lenbuf*sizeof(T), MPI_BYTE, src, tag, status);\n        }\n\n\n        /// Receive datum from process \\c src.\n\n        /// \\tparam T The type of data to receive.\n        /// \\param[out] buf The received datum.\n        /// \\param[in] src The source process.\n        /// \\param[in] tag The MPI tag.\n        template <typename T>\n        typename std::enable_if<!std::is_pointer<T>::value, void>::type\n        Recv(T& buf, int src, int tag=SafeMPI::DEFAULT_SEND_RECV_TAG) const {\n            SafeMPI::Intracomm::Recv(&buf, sizeof(T), MPI_BYTE, src, tag);\n        }\n\n\n        /// MPI broadcast an array of \\c count elements.\n\n        /// \\note Read documentation about interaction of MPI collectives and\n        ///    AM/task handling.\n        /// \\tparam T The type of data to broadcast.\n        /// \\param[in,out] buffer The data to send (if this is the \\c root\n        ///    process); otherwise, a buffer to receive the data.\n        /// \\param[in] count The number of data elements being broadcast.\n        /// \\param[in] root The process that is sending the data to other\n        ///    processes.\n        template <typename T>\n        void Bcast(T* buffer, int count, int root) const {\n            SafeMPI::Intracomm::Bcast(buffer,count*sizeof(T),MPI_BYTE,root);\n        }\n\n\n        /// MPI broadcast a datum.\n\n        /// \\note Read documentation about interaction of MPI collectives and\n        ///    AM/task handling.\n        /// \\tparam T The type of data to broadcast.\n        /// \\param[in,out] buffer The datum to send (if this is the \\c root\n        ///    process); otherwise, the received datum.\n        /// \\param[in] root The process that is sending the data to other\n        ///    processes.\n        template <typename T>\n        typename std::enable_if<!std::is_pointer<T>::value, void>::type\n        Bcast(T& buffer, int root) const {\n            SafeMPI::Intracomm::Bcast(&buffer, sizeof(T), MPI_BYTE, root);\n        }\n\n        /// Access the rank of this process.\n\n        /// \\return The rank of this process.\n        int rank() const { return SafeMPI::Intracomm::Get_rank(); }\n\n        /// Access the total number of processes.\n\n        /// \\return The number of processes.\n        int nproc() const { return SafeMPI::Intracomm::Get_size(); }\n\n        /// Access the total number of processes.\n\n        /// \\return The number of processes.\n        int size() const { return SafeMPI::Intracomm::Get_size(); }\n    }; // class WorldMpiInterface\n\n}\n\n/// @}\n\n#endif // MADNESS_WORLD_WORLDMPI_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldmutex.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id: $\n*/\n\n#include <madness/world/worldmutex.h>\n#include <errno.h>\n\n/// \\file worldmutex.h\n/// \\brief Implements Mutex, MutexFair, Spinlock, ConditionVariable\n\n\nnamespace madness {\n\n    namespace detail {\n        void print_mutex_error(int error_number) {\n            switch(error_number) {\n                // The pthread_mutex_lock() and pthread_mutex_trylock()\n                // functions shall fail if:\n\n                // An unlikely case in MADNESS ...\n//                case EINVAL:\n//                    fprintf(stderr, \"!! MADNESS ERROR: Mutex error EINVAL\\n\"\n//                           \"!! MADNESS ERROR: The mutex was created with the \"\n//                           \"protocol attribute having the value PTHREAD_PRIO_PROTECT \"\n//                           \"and the calling thread's priority is higher than \"\n//                           \"the mutex's current priority ceiling.\\n\");\n//                    break;\n\n                // The pthread_mutex_trylock() function shall fail if:\n\n                case EBUSY:\n                    fprintf(stderr, \"!! MADNESS ERROR: Mutex error EBUSY\\n\"\n                           \"!! MADNESS ERROR: The mutex could not be acquired \"\n                           \"because it was already locked.\\n\");\n                    break;\n\n                // The pthread_mutex_lock(), pthread_mutex_trylock(), and\n                // pthread_mutex_unlock() functions may fail if:\n\n                case EINVAL:\n                    fprintf(stderr, \"!! MADNESS ERROR: Mutex error EINVAL\\n\"\n                           \"!! MADNESS ERROR: The value specified by mutex does\"\n                           \" not refer to an initialized mutex object.\\n\");\n                    break;\n\n                case EAGAIN:\n                    fprintf(stderr, \"!! MADNESS ERROR: Mutex error EAGAIN\\n\"\n                           \"!! MADNESS ERROR: The mutex could not be acquired \"\n                           \"because the maximum number of recursive locks for \"\n                           \"mutex has been exceeded.\\n\");\n                    break;\n\n                // The pthread_mutex_lock() function may fail if:\n\n                case EDEADLK:\n                    fprintf(stderr, \"!! MADNESS ERROR: Mutex error EDEADLK\\n\"\n                           \"!! MADNESS ERROR: The current thread already owns the mutex.\\n\");\n                    break;\n\n                // The pthread_mutex_unlock() function may fail if:\n\n                case EPERM:\n                    fprintf(stderr, \"!! MADNESS ERROR: Mutex error EPERM\\n\"\n                           \"!! MADNESS ERROR: The current thread does not own the mutex.\\n\");\n                    break;\n\n                default:\n                    fprintf(stderr, \"!! MADNESS ERROR: Mutex error UNKNOWN\\n\");\n                    break;\n            }\n        }\n    }\n\n    void MutexWaiter::wait() {\n        //#ifdef HAVE_CRAYXT\n#ifdef USE_SPINLOCKS\n        // The value of 300 below is purely empirical but apparently a substantial\n        // backoff (or something that is a by-product of waiting) is necessary\n        // to avoid clobbering the memory subsystem while spinning on the taskq.\n        // The time is  \"Time to  run 100000 chain of tasks\" from running world.\n        // 1000--> 2+us\n        // 400 --> 1.7us\n        // 300 --> 1.7us\n        // 250 --> 2us\n        // 200 --> 3.6us\n        // 100 --> 40+us (ouch!)\n\n        for (int i=0; i<300; ++i)  cpu_relax();\n#else\n        const unsigned int nspin  = 1000;    // Spin for 1,000 calls\n        const unsigned int nsleep = 100000;  // Sleep 10us for 100,000 calls = 1s\n        if (count++ < nspin) return;\n        else if (count < nsleep) yield(10);\n        else yield(10000);\n#endif\n    }\n\n    RecursiveMutex::RecursiveMutex() {\n        // Create recursive mutex attribute\n        pthread_mutexattr_t attr;\n        int result = pthread_mutexattr_init(&attr);\n        if (result) MADNESS_EXCEPTION(\"RecursiveMutex attribute initialization failed.\", result);\n        result = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);\n        if (result) MADNESS_EXCEPTION(\"RecursiveMutex attribute set type failed.\", result);\n\n        // Initialize the mutex\n        result = pthread_mutex_init(&mutex, &attr);\n        if (result) MADNESS_EXCEPTION(\"RecursiveMutex initialization failed.\", result);\n\n        // Destroy the mutex attribute\n        result = pthread_mutexattr_destroy(&attr);\n        if (result) MADNESS_EXCEPTION(\"RecursiveMutex initialization failed.\", result);\n    }\n\n\n    namespace detail {\n        Mutex printmutex;\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/worldmutex.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_WORLD_WORLDMUTEX_H__INCLUDED\n#define MADNESS_WORLD_WORLDMUTEX_H__INCLUDED\n\n#include <madness/madness_config.h>\n#include <pthread.h>\n#include <thread>\n#include <cstdio>\n#ifdef ON_A_MAC\n#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101200\n\n#include <os/lock.h>\n#include <type_traits>\n\ntypedef std::remove_pointer<os_unfair_lock_t>::type pthread_spinlock_t;\n\ninline void pthread_spin_init(pthread_spinlock_t* p, int /*mode*/) {\n    *p = OS_UNFAIR_LOCK_INIT;\n}\ninline int pthread_spin_trylock(pthread_spinlock_t* p) {\n    return !os_unfair_lock_trylock(p);\n}\ninline int pthread_spin_lock(pthread_spinlock_t* p) {\n    os_unfair_lock_lock(p);\n    return 0;\n}\ninline int pthread_spin_unlock(pthread_spinlock_t* p) {\n    os_unfair_lock_unlock(p);\n    return 0;\n}\n\ninline int pthread_spin_destroy(pthread_spinlock_t*) {\n    return 0;\n}\n\n#else\n\n#include <libkern/OSAtomic.h>\ntypedef OSSpinLock pthread_spinlock_t;\n\ninline void pthread_spin_init(pthread_spinlock_t* p, int /*mode*/) {\n    *p=0;\n}\ninline int pthread_spin_trylock(pthread_spinlock_t* p) {\n    return !OSSpinLockTry(p);\n}\ninline int pthread_spin_lock(pthread_spinlock_t* p) {\n    OSSpinLockLock(p);\n    return 0;\n}\ninline int pthread_spin_unlock(pthread_spinlock_t* p) {\n    OSSpinLockUnlock(p);\n    return 0;\n}\ninline void pthread_spin_destroy(pthread_spinlock_t* /*p*/) {}\n#endif // __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101200\n#endif // ON_A_MAC\n\n\n#include <madness/world/nodefaults.h>\n#include <madness/world/timers.h>\n#include <madness/world/atomicint.h>\n#include <madness/world/madness_exception.h>\n\n/// \\file worldmutex.h\n/// \\brief Implements Mutex, MutexFair, Spinlock, ConditionVariable\n/// \\addtogroup mutexes\n///@{\n\n\n\nnamespace madness {\n\n    namespace detail {\n        void print_mutex_error(int error_number);\n    }\n\n    class MutexWaiter {\n    private:\n        unsigned int count;\n\n        /// Yield for specified number of microseconds unless dedicated CPU\n        /// Blue Gene always has a dedicated hw thread\n        void yield(int us) {\n#if !defined(HAVE_IBMBGP) && !defined(HAVE_IBMBGQ)\n            myusleep(us);\n#endif\n        }\n\n    public:\n        MutexWaiter() : count(0) { }\n\n        void reset() { count = 0; }\n\n        void wait();\n    }; // class MutexWaiter\n\n\n    /// Mutex using pthread mutex operations\n    class Mutex {\n    private:\n        mutable pthread_mutex_t mutex;\n\n        /// Copy constructor is forbidden\n        Mutex(const Mutex&);\n\n        /// Assignment is forbidden\n        void operator=(const Mutex&);\n\n    public:\n        /// Make and initialize a mutex ... initial state is unlocked\n        Mutex(int junk=0) // Junk so that can force initializer in mraX.cc\n        {\n            const int result = pthread_mutex_init(&mutex, 0);\n            if (result) MADNESS_EXCEPTION(\"failed to initialize mutex\", result);\n        }\n\n        /// Try to acquire the mutex ... return true on success, false on failure\n        bool try_lock() const {\n            return pthread_mutex_trylock(&mutex)==0;\n        }\n\n        /// Acquire the mutex waiting if necessary\n        void lock() const {\n            const int result = pthread_mutex_lock(&mutex);\n            if (result) {\n                fprintf(stderr, \"!! MADNESS ERROR: Mutex::lock() failed acquiring mutex\\n\");\n                detail::print_mutex_error(result);\n                MADNESS_EXCEPTION(\"Mutex::lock() failed acquiring mutex\", result);\n            }\n        }\n\n        /// Free a mutex owned by this thread\n        void unlock() const {\n            const int result = pthread_mutex_unlock(&mutex);\n            if (result) {\n                fprintf(stderr, \"!! MADNESS ERROR: Mutex::unlock() failed releasing mutex\\n\");\n                detail::print_mutex_error(result);\n                MADNESS_EXCEPTION(\"Mutex::unlock() failed releasing mutex\", result);\n            }\n        }\n\n        /// Return a pointer to the pthread mutex for use by a condition variable\n        pthread_mutex_t* ptr() const {\n            return &mutex;\n        }\n\n        virtual ~Mutex() {\n            pthread_mutex_destroy(&mutex);\n        }\n    }; // class Mutex\n\n    /// Recursive mutex using pthread mutex operations\n    class RecursiveMutex {\n    private:\n        mutable pthread_mutex_t mutex;\n\n        /// Copy constructor is forbidden\n        RecursiveMutex(const RecursiveMutex&);\n\n        /// Assignment is forbidden\n        void operator=(const RecursiveMutex&);\n\n    public:\n        /// Make and initialize a mutex ... initial state is unlocked\n        RecursiveMutex();\n\n        /// Try to acquire the mutex ... return true on success, false on failure\n        bool try_lock() const {\n            return pthread_mutex_trylock(&mutex)==0;\n        }\n\n        /// Acquire the mutex waiting if necessary\n        void lock() const {\n            int result = pthread_mutex_lock(&mutex);\n            if (result) {\n                fprintf(stderr, \"!! MADNESS ERROR: RecursiveMutex::lock() failed acquiring mutex\\n\");\n                detail::print_mutex_error(result);\n                MADNESS_EXCEPTION(\"RecursiveMutex::lock() failed acquiring mutex\", result);\n            }\n        }\n\n        /// Free a mutex owned by this thread\n        void unlock() const {\n            int result = pthread_mutex_unlock(&mutex);\n            if (result) {\n                fprintf(stderr, \"!! MADNESS ERROR: RecursiveMutex::unlock() failed releasing mutex\\n\");\n                detail::print_mutex_error(result);\n                MADNESS_EXCEPTION(\"RecursiveMutex::unlock() failed releasing mutex\", result);\n            }\n        }\n\n        /// Return a pointer to the pthread mutex for use by a condition variable\n        pthread_mutex_t* ptr() const {\n            return &mutex;\n        }\n\n        ~RecursiveMutex() {\n            pthread_mutex_destroy(&mutex);\n        }\n    }; // class Mutex\n\n\n    /// Mutex that is applied/released at start/end of a scope\n\n    /// The mutex must provide lock and unlock methods\n    template <class mutexT = Mutex>\n    class ScopedMutex {\n        const mutexT* mutex;\n    public:\n        ScopedMutex(const mutexT* m) : mutex(m) { mutex->lock(); }\n\n        ScopedMutex(const mutexT& m) : mutex(&m) { mutex->lock(); }\n\n        virtual ~ScopedMutex() { mutex->unlock(); }\n    }; // class ScopedMutex\n\n#ifdef NEVER_SPIN\n    typedef Mutex Spinlock;\n#else\n    /// Spinlock using pthread spinlock operations\n    class Spinlock {\n    private:\n        //mutable pthread_spinlock_t spinlock  __attribute__ ((aligned (64)));\n        mutable pthread_spinlock_t spinlock;\n\n        /// Copy constructor is forbidden\n        Spinlock(const Spinlock&);\n\n        /// Assignment is forbidden\n        void operator=(const Spinlock&);\n\n    public:\n        /// Make and initialize a spinlock ... initial state is unlocked\n        Spinlock(int junk=0)  // Junk so that can force initializer in mraX.cc\n        {\n            pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE);\n        }\n\n        /// Try to acquire the spinlock ... return true on success, false on failure\n        bool try_lock() const {\n            return pthread_spin_trylock(&spinlock)==0;\n        }\n\n        /// Acquire the spinlock waiting if necessary\n        void lock() const {\n            int result = pthread_spin_lock(&spinlock);\n            if (result) {\n                fprintf(stderr, \"!! MADNESS ERROR: Spinlock::lock() failed acquiring spinlock\\n\");\n                detail::print_mutex_error(result);\n                MADNESS_EXCEPTION(\"Spinlock::lock() failed acquiring spinlock\", result);\n            }\n        }\n\n        /// Free a spinlock owned by this thread\n        void unlock() const {\n            int result = pthread_spin_unlock(&spinlock);\n            if (result) {\n                fprintf(stderr, \"!! MADNESS ERROR: Spinlock::unlock() failed releasing spinlock\\n\");\n                detail::print_mutex_error(result);\n                MADNESS_EXCEPTION(\"Spinlock::unlock() failed releasing spinlock\", result);\n            }\n        }\n\n        virtual ~Spinlock() {\n            pthread_spin_destroy(&spinlock);\n        }\n    }; // class Spinlock\n#endif\n\n\n#define OLDXXX\n#ifdef OLDXXX\n    // This version uses a spin lock\n    class MutexReaderWriter : private Spinlock, private NO_DEFAULTS {\n        mutable int nreader; // used to be volatile but is protected by mutex and associated barriers\n        mutable bool writeflag; // ditto\n    public:\n        static const int NOLOCK=0;\n        static const int READLOCK=1;\n        static const int WRITELOCK=2;\n\n        MutexReaderWriter() : nreader(0), writeflag(false) {}\n\n        bool try_read_lock() const {\n            ScopedMutex<Spinlock> protect(this);\n            bool gotit = !writeflag;\n            if (gotit) ++nreader;\n            return gotit;\n        }\n\n        bool try_write_lock() const {\n            ScopedMutex<Spinlock> protect(this);\n            bool gotit = (!writeflag) && (nreader==0);\n            if (gotit) writeflag = true;\n            return gotit;\n        }\n\n        bool try_lock(int lockmode) const {\n            if (lockmode == READLOCK) {\n                return try_read_lock();\n            }\n            else if (lockmode == WRITELOCK) {\n                return try_write_lock();\n            }\n            else if (lockmode == NOLOCK) {\n                return true;\n            }\n            else {\n                MADNESS_EXCEPTION(\"MutexReaderWriter: try_lock: invalid lock mode\", lockmode);\n            }\n        }\n\n        bool try_convert_read_lock_to_write_lock() const {\n            ScopedMutex<Spinlock> protect(this);\n            bool gotit = (!writeflag) && (nreader==1);\n            if (gotit) {\n                nreader = 0;\n                writeflag = true;\n            }\n            return gotit;\n        }\n\n        void read_lock() const {\n            while (!try_read_lock()) cpu_relax();\n        }\n\n        void write_lock() const {\n            while (!try_write_lock()) cpu_relax();\n        }\n\n        void lock(int lockmode) const {\n            while (!try_lock(lockmode)) cpu_relax();\n        }\n\n        void read_unlock() const {\n            ScopedMutex<Spinlock> protect(this);\n            nreader--;\n        }\n\n        void write_unlock() const {\n            // Only a single thread should be setting writeflag but\n            // probably still need the mutex just to get memory fence?\n            ScopedMutex<Spinlock> protect(this);\n            writeflag = false;\n        }\n\n        void unlock(int lockmode) const {\n            if (lockmode == READLOCK) read_unlock();\n            else if (lockmode == WRITELOCK) write_unlock();\n            else if (lockmode != NOLOCK) MADNESS_EXCEPTION(\"MutexReaderWriter: try_lock: invalid lock mode\", lockmode);\n        }\n\n        /// Converts read to write lock without releasing the read lock\n\n        /// Note that deadlock is guaranteed if two+ threads wait to convert at the same time.\n        void convert_read_lock_to_write_lock() const {\n            while (!try_convert_read_lock_to_write_lock()) cpu_relax();\n        }\n\n        /// Always succeeds immediately\n        void convert_write_lock_to_read_lock() const {\n            ScopedMutex<Spinlock> protect(this);\n            ++nreader;\n            writeflag=false;\n        }\n        virtual ~MutexReaderWriter() {}\n    };\n\n#else\n\n    // This version uses AtomicInt and CAS\n    class MutexReaderWriter : private NO_DEFAULTS {\n        mutable AtomicInt nreader;\n        mutable AtomicInt writeflag;\n        enum {UNLOCKED, LOCKED};\n\n    public:\n        enum lockT {NOLOCK, READLOCK, WRITELOCK};\n\n        MutexReaderWriter() {nreader=0; writeflag=0;}\n\n        bool try_read_lock() const {\n            nreader++;\n            if (writeflag == UNLOCKED) return true;\n            nreader--;\n            return false;\n        }\n\n        bool try_write_lock() const {\n            return (writeflag.compare_and_swap((int) UNLOCKED, (int) LOCKED) == 0);\n        }\n\n        bool try_lock(int lockmode) const {\n            if (lockmode == READLOCK) {\n                return try_read_lock();\n            }\n            else if (lockmode == WRITELOCK) {\n                return try_write_lock();\n            }\n            else if (lockmode == NOLOCK) {\n                return true;\n            }\n            else {\n                MADNESS_EXCEPTION(\"MutexReaderWriter: try_lock: invalid lock mode\", lockmode);\n            }\n        }\n\n        bool try_convert_read_lock_to_write_lock() const {\n            if (!try_write_lock()) return false;\n            if (nreader > 1) {\n                write_unlock();\n                return false;\n            }\n            nreader = 0;\n            return true;\n        }\n\n        void read_lock() const {\n            while (!try_read_lock()) cpu_relax();\n        }\n\n        void write_lock() const {\n            while (!try_write_lock()) cpu_relax();\n        }\n\n        void lock(int lockmode) const {\n            while (!try_lock(lockmode)) cpu_relax();\n        }\n\n        void read_unlock() const {\n            nreader--;\n        }\n\n        void write_unlock() const {\n            writeflag = UNLOCKED;\n        }\n\n        void unlock(int lockmode) const {\n            if (lockmode == READLOCK) read_unlock();\n            else if (lockmode == WRITELOCK) write_unlock();\n            else if (lockmode != NOLOCK) MADNESS_EXCEPTION(\"MutexReaderWriter: try_lock: invalid lock mode\", lockmode);\n        }\n\n        /// Converts read to write lock without releasing the read lock\n\n        /// Note that deadlock is guaranteed if two+ threads wait to convert at the same time.\n        void convert_read_lock_to_write_lock() const {\n            while (!try_convert_read_lock_to_write_lock()) cpu_relax();\n        }\n\n        /// Always succeeds immediately\n        void convert_write_lock_to_read_lock() const {\n            nreader++;\n            writeflag = UNLOCKED;\n        }\n    };\n#endif\n\n    /// wait policies supported by ConditionVariable/DQueue/ThreadPool\n    enum class WaitPolicy {\n      Busy = 1, Yield, Sleep\n    };\n\n    /// Scalable and fair condition variable (spins on local value)\n    class ConditionVariable : public Spinlock {\n    public:\n        static const int MAX_NTHREAD = 128;\n        mutable int back; // used to be volatile, but is protected by mutex and associated barriers\n        mutable int front; // ditto\n        mutable volatile bool* fifo[MAX_NTHREAD]; // volatile needed here; Circular buffer of flags\n\n        void set_wait_policy(WaitPolicy p, int us = 0) {\n          wait_policy_ = p;\n          wait_usleep_ = std::chrono::microseconds(us);\n        }\n\n    public:\n      ConditionVariable() : back(0), front(0), fifo() { }\n\n        /// You should acquire the mutex before waiting\n        void wait() const {\n            // We put a pointer to a thread-local variable at the\n            // end of the queue and wait for that value to be set,\n            // thus generate no memory traffic while waiting.\n            volatile bool myturn = false;\n            int b = this->back;\n            fifo[b] = &myturn;\n            this->back = (b+1 < MAX_NTHREAD ? b+1 : 0);\n\n            unlock(); // Release lock before blocking\n            switch (this->wait_policy_) {\n              case WaitPolicy::Yield:\n                while (!myturn) std::this_thread::yield();\n              case WaitPolicy::Sleep:\n                while (!myturn) std::this_thread::sleep_for(this->wait_usleep_);\n              default:\n                while (!myturn) cpu_relax();\n            }\n            lock();\n        }\n\n        /// You should acquire the mutex before signalling\n        void signal() const {\n          int f = this->front;\n          if (f == this->back) return;\n          *fifo[f] = true;\n          int next = (f+1 < MAX_NTHREAD ? f+1 : 0);\n          this->front = next;\n        }\n\n        /// You should acquire the mutex before broadcasting\n        void broadcast() const {\n            while (front != back)\n                signal();\n        }\n\n        virtual ~ConditionVariable() {}\n\n      private:\n        WaitPolicy wait_policy_ = WaitPolicy::Busy;\n        std::chrono::microseconds wait_usleep_ = std::chrono::microseconds(0);\n\n    };\n\n\n    /// A scalable and fair mutex (not recursive)\n\n    /// Needs rewriting to use the CV above and do we really\n    /// need this if using pthread_mutex .. why not pthread_cv?\n    class MutexFair : private Spinlock {\n    private:\n        static const int MAX_NTHREAD = 128;\n        mutable volatile bool* q[MAX_NTHREAD]; // volatile needed\n        mutable int n; // volatile not needed due to use of spinlock and associated barriers\n        mutable int front;\n        mutable int back;\n\n    public:\n        MutexFair() : n(0), front(0), back(0) {};\n\n        void lock() const {\n            volatile bool myturn = false;\n            Spinlock::lock();\n            ++n;\n            if (n == 1) {\n                myturn = true;\n            }\n            else {\n                int b = back + 1;\n                if (b >= MAX_NTHREAD) b = 0;\n                q[b] = &myturn;\n                back = b;\n            }\n            Spinlock::unlock();\n\n            while (!myturn) cpu_relax();\n        }\n\n        void unlock() const {\n            volatile bool* p = 0;\n            Spinlock::lock();\n            n--;\n            if (n > 0) {\n                int f = front + 1;\n                if (f >= MAX_NTHREAD) f = 0;\n                p = q[f];\n                front = f;\n            }\n            Spinlock::unlock();\n            if (p) *p = true;\n        }\n\n        bool try_lock() const {\n            bool got_lock;\n\n            Spinlock::lock();\n            int nn = n;\n            got_lock = (nn == 0);\n            if (got_lock) n = nn + 1;\n            Spinlock::unlock();\n\n            return got_lock;\n        }\n    };\n\n\n    /// Attempt to acquire two locks without blocking holding either one\n\n    /// The code will first attempt to acquire mutex m1 and if successful\n    /// will then attempt to acquire mutex m2.\n    inline bool try_two_locks(const Mutex& m1, const Mutex& m2) {\n        if (!m1.try_lock()) return false;\n        if (m2.try_lock()) return true;\n        m1.unlock();\n        return false;\n    }\n\n\n    /// Simple wrapper for Pthread condition variable with its own mutex\n\n    /// Use this when you need to block without consuming cycles.\n    /// Scheduling granularity is at the level of kernel ticks.\n    class PthreadConditionVariable : private NO_DEFAULTS {\n    private:\n        mutable pthread_cond_t cv;\n        mutable pthread_mutex_t mutex;\n\n    public:\n        PthreadConditionVariable() {\n            pthread_cond_init(&cv, nullptr);\n            pthread_mutex_init(&mutex, 0);\n        }\n\n        pthread_mutex_t& get_pthread_mutex() {\n            return mutex;\n        }\n\n        void lock() const {\n            int result = pthread_mutex_lock(&mutex);\n            if (result) {\n                fprintf(stderr, \"!! MADNESS ERROR: PthreadConditionVariable::lock() failed acquiring mutex\\n\");\n                detail::print_mutex_error(result);\n                MADNESS_EXCEPTION(\"PthreadConditionVariable::lock() failed acquiring mutex\", result);\n            }\n        }\n\n        void unlock() const {\n            int result = pthread_mutex_unlock(&mutex);\n            if (result) {\n                fprintf(stderr, \"!! MADNESS ERROR: PthreadConditionVariable::unlock() failed releasing mutex\\n\");\n                detail::print_mutex_error(result);\n                MADNESS_EXCEPTION(\"PthreadConditionVariable::unlock() failed releasing mutex\", result);\n            }\n        }\n\n        /// You should have acquired the mutex before entering here\n        void wait() const {\n            pthread_cond_wait(&cv,&mutex);\n        }\n\n        void signal() const {\n            int result = pthread_cond_signal(&cv);\n            if (result) MADNESS_EXCEPTION(\"ConditionalVariable: signalling failed\", result);\n        }\n\n        void broadcast() const {\n            int result = pthread_cond_broadcast(&cv);\n            if (result) MADNESS_EXCEPTION(\"ConditionalVariable: signalling failed\", result);\n        }\n\n        virtual ~PthreadConditionVariable() {\n            pthread_mutex_destroy(&mutex);\n            pthread_cond_destroy(&cv);\n        }\n    }; // class PthreadConditionVariable\n\n#ifdef USE_SPINLOCKS\n    typedef ConditionVariable CONDITION_VARIABLE_TYPE ;\n    typedef Spinlock SPINLOCK_TYPE;\n    typedef MutexFair SCALABLE_MUTEX_TYPE;\n#else\n    typedef PthreadConditionVariable CONDITION_VARIABLE_TYPE;\n    typedef Mutex SPINLOCK_TYPE;\n    typedef Mutex SCALABLE_MUTEX_TYPE;\n#endif\n\n    // I THINK THIS IS NO LONGER USED???????????????????????????????????\n    class Barrier {\n        const int nthread;\n        volatile bool sense;\n        AtomicInt nworking;\n        volatile bool* pflags[128];\n\n    public:\n        Barrier(int nthread)\n            : nthread(nthread)\n            , sense(true)\n        {\n            nworking = nthread;\n        }\n\n        /// Each thread calls this once before first use\n\n        /// id should be the thread id (0,..,nthread-1) and pflag a pointer to\n        /// thread-local bool (probably in the thread's stack)\n        void register_thread(int id, volatile bool* pflag) {\n            if (id > 63) MADNESS_EXCEPTION(\"Barrier : hard dimension failed\", id);\n            pflags[id] = pflag;\n            *pflag=!sense;\n        }\n\n        /// Each thread calls this with its id (0,..,nthread-1) to enter the barrier\n\n        /// The thread last to enter the barrier returns true.  Others return false.\n        ///\n        /// All calls to the barrier must use the same value of nthread.\n        bool enter(const int id) {\n            if (nthread <= 1) {\n                return true;\n            }\n            else {\n                if (id > 63) MADNESS_EXCEPTION(\"Barrier : hard dimension failed\", id);\n                bool lsense = sense; // Local copy of sense\n                bool result = nworking.dec_and_test();\n                if (result) {\n                    // Reset counter and sense for next entry\n                    nworking = nthread;\n                    sense = !sense;\n                    __asm__ __volatile__(\"\" : : : \"memory\");\n\n                    // Notify everyone including me\n                    for (int i = 0; i < nthread; ++i)\n                        *(pflags[i]) = lsense;\n                } else {\n                    volatile bool* myflag = pflags[id]; // Local flag;\n                    while (*myflag != lsense) {\n                        cpu_relax();\n                    }\n                }\n                return result;\n            }\n        }\n    }; // class Barrier\n\n    namespace detail {\n        extern Mutex printmutex;\n    }\n}\n\n///@}\n\n\n#endif // MADNESS_WORLD_WORLDMUTEX_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldpapi.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/madness_config.h>\n#ifdef HAVE_PAPI\n#include <papi.h>\n#include <madness/world/thread.h>\n#include <madness/world/worldpapi.h>\nnamespace madness {\n\n\n    static int events[NUMEVENTS] = {PAPI_FP_OPS};\n    static Mutex papi_mutex;\n    static volatile long long total_values[NUMEVENTS] = {0};\n    static volatile int th=0;\n\n    void initialize_papi() {\n        if (PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT)\n            MADNESS_EXCEPTION(\"Could not init PAPI\", 1);\n        if (PAPI_thread_init(pthread_self) != PAPI_OK)\n            MADNESS_EXCEPTION(\"Could not init PAPI thread API\", 1);\n\n        reset_papi_measurement();\n    }\n\n    void begin_papi_measurement() {\n        PAPI_start_counters(events, NUMEVENTS);\n    }\n\n    void end_papi_measurement() {\n        // Ignore PAPI errors since don't want to kill the calculation\n        // at its very end\n        long long values[NUMEVENTS];\n        PAPI_stop_counters(values, NUMEVENTS);\n        papi_mutex.lock();\n        ++th;\n        //std::cout << \"PAPITHREAD \" << values[0] << std::endl;\n        for (int i=0; i<NUMEVENTS; ++i) total_values[i] += values[i];\n        papi_mutex.unlock();\n    }\n\n    void reset_papi_measurement() {\n        for (int i=0; i<NUMEVENTS; ++i) total_values[i] = 0;\n    }\n\n    const long long* get_papi_measurement() {\n        return const_cast<long long*>(total_values);\n    }\n}\n\n#else\n\nint this_just_to_make_stupid_intel_linker_happy_123435;\n\n#endif\n"
  },
  {
    "path": "src/madness/world/worldpapi.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_WORLDPAPI_H__INCLUDED\n#define MADNESS_WORLD_WORLDPAPI_H__INCLUDED\n\n#include <madness/madness_config.h>\n\n#ifdef HAVE_PAPI\nnamespace madness {\n    const int NUMEVENTS = 1;\n\n    void initialize_papi();\n    void begin_papi_measurement();\n    void end_papi_measurement();\n    void reset_papi_measurement();\n    const long long* get_papi_measurement();\n}\n#else\nnamespace madness {\n    const int NUMEVENTS = 0;\n\n    inline void initialize_papi() {}\n    inline void begin_papi_measurement() {}\n    inline void end_papi_measurement() {}\n    inline void reset_papi_measurement() {}\n    inline const long long* get_papi_measurement() {\n        return 0;\n    }\n}\n#endif\n\n#endif // MADNESS_WORLD_WORLDPAPI_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldprofile.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#include <madness/world/worldprofile.h>\n#include <madness/world/mpi_archive.h>\n#include <madness/world/MADworld.h>\n#include <madness/world/atomicint.h>\n\nnamespace madness {\n\n    static AtomicInt threadcounter; // Used to assign unique ID to threads\n\n    thread_local WorldProfileObj* WorldProfileObj::call_stack = 0;\n    thread_local int WorldProfileObj::mythreadid = -1; // means not initialized\n\n    Spinlock WorldProfile::mutex;\n    std::vector<WorldProfileEntry> WorldProfile::items; // used to be volatile but not needed due to mutex and implied barriers\n    double WorldProfile::cpu_start = madness::cpu_time();\n    double WorldProfile::wall_start = madness::wall_time();\n\n    WorldProfileEntry::WorldProfileEntry(const char* name)\n            : name(name) \n    {\n        for (int i=0; i<MAX_NTHREAD; i++) depth[i] = 0;\n    };\n\n    WorldProfileEntry::WorldProfileEntry(const WorldProfileEntry& other)\n            : Spinlock() {\n        *this = other;\n    }\n\n    WorldProfileEntry& WorldProfileEntry::operator=(const WorldProfileEntry& other) {\n        name = other.name;\n        for (int i=0; i<MAX_NTHREAD; i++) depth[i] = other.depth[i];\n        count = other.count;\n        xcpu = other.xcpu;\n        icpu = other.icpu;\n        xnmsg_sent =  other.xnmsg_sent;\n        inmsg_sent =  other.inmsg_sent;\n        xnmsg_recv =  other.xnmsg_recv;\n        inmsg_recv =  other.inmsg_recv;\n        xnbyt_sent =  other.xnbyt_sent;\n        inbyt_sent =  other.inbyt_sent;\n        xnbyt_recv =  other.xnbyt_recv;\n        inbyt_recv =  other.inbyt_recv;\n\n        return *this;\n    }\n\n    bool WorldProfileEntry::exclusivecmp(const WorldProfileEntry&a, const WorldProfileEntry& b) {\n        return a.xcpu.sum > b.xcpu.sum;\n    }\n\n    bool WorldProfileEntry::inclusivecmp(const WorldProfileEntry&a, const WorldProfileEntry& b) {\n        return a.icpu.sum > b.icpu.sum;\n    }\n\n    bool WorldProfileEntry::exclusivebytcmp(const WorldProfileEntry&a, const WorldProfileEntry& b) {\n        return a.xnbyt_sent.sum > b.xnbyt_sent.sum;\n    }\n\n    bool WorldProfileEntry::inclusivebytcmp(const WorldProfileEntry&a, const WorldProfileEntry& b) {\n        return a.inbyt_sent.sum > b.inbyt_sent.sum;\n    }\n\n    void WorldProfileEntry::init_par_stats(ProcessID me) {\n        count.init_par_stats(me);\n        xcpu.init_par_stats(me);\n        icpu.init_par_stats(me);\n        xnmsg_sent.init_par_stats(me);\n        inmsg_sent.init_par_stats(me);\n        xnmsg_recv.init_par_stats(me);\n        inmsg_recv.init_par_stats(me);\n        xnbyt_sent.init_par_stats(me);\n        inbyt_sent.init_par_stats(me);\n        xnbyt_recv.init_par_stats(me);\n        inbyt_recv.init_par_stats(me);\n    }\n\n    void WorldProfileEntry::par_reduce(const WorldProfileEntry& other) {\n        count.par_reduce(other.count);\n        xcpu.par_reduce(other.xcpu);\n        icpu.par_reduce(other.icpu);\n        xnmsg_sent.par_reduce(other.xnmsg_sent);\n        inmsg_sent.par_reduce(other.inmsg_sent);\n        xnmsg_recv.par_reduce(other.xnmsg_recv);\n        inmsg_recv.par_reduce(other.inmsg_recv);\n        xnbyt_sent.par_reduce(other.xnbyt_sent);\n        inbyt_sent.par_reduce(other.inbyt_sent);\n        xnbyt_recv.par_reduce(other.xnbyt_recv);\n        inbyt_recv.par_reduce(other.inbyt_recv);\n    }\n\n    void WorldProfileEntry::clear() {\n        count.clear();\n        xcpu.clear();\n        icpu.clear();\n        xnmsg_sent.clear();\n        inmsg_sent.clear();\n        xnmsg_recv.clear();\n        inmsg_recv.clear();\n        xnbyt_sent.clear();\n        inbyt_sent.clear();\n        xnbyt_recv.clear();\n        inbyt_recv.clear();\n    }\n\n    std::vector<WorldProfileEntry>& WorldProfile::nvitems() {\n        return const_cast<std::vector<WorldProfileEntry>&>(items);\n    }\n\n\n    /// Returns id of the entry associated with the name.  Returns -1 if not found;\n    int WorldProfile::find(const std::string& name) {\n        // ASSUME WE HAVE THE MUTEX ALREADY\n        std::vector<WorldProfileEntry>& nv = nvitems();\n        size_t sz = nv.size();\n        if (sz == 0) nv.reserve(1000); // Avoid resizing during execution ... stupid code somewhere below not thread safe?\n        if (sz >=1000) MADNESS_EXCEPTION(\"WorldProfile: did not reserve enough space!\", sz);\n        for (unsigned int i=0; i<nv.size(); ++i) {\n            if (name == nv[i].name) return i;\n        }\n        return -1;\n    }\n\n    /// Returns id for the name, registering if necessary.\n    int WorldProfile::register_id(const char* name) {\n        ScopedMutex<Spinlock> fred(mutex);\n        int id = find(name);\n        if (id < 0) {\n            std::vector<WorldProfileEntry>& nv = nvitems();\n            id = nv.size();\n            nv.push_back(name);\n        }\n        return id;\n    }\n\n    /// Returns id for the name, registering if necessary.\n    int WorldProfile::register_id(const char* classname, const char* function) {\n        ScopedMutex<Spinlock> fred(mutex);\n        std::string name = std::string(classname) + std::string(\"::\") + std::string(function);\n        int id = find(name.c_str());\n        if (id < 0) {\n            std::vector<WorldProfileEntry>& nv = nvitems();\n            id = nv.size();\n            nv.push_back(name.c_str());\n        }\n        return id;\n    }\n\n    /// Clears all profiling information\n    void WorldProfile::clear() {\n        ScopedMutex<Spinlock> fred(mutex);\n        cpu_start = madness::cpu_time();\n        wall_start = madness::wall_time();\n        std::vector<WorldProfileEntry>& nv = nvitems();\n        for (unsigned int i=0; i<nv.size(); ++i) {\n            nv[i].clear();\n        }\n    }\n\n    /// Returns a reference to the specified entry.  Throws if id is invalid.\n    WorldProfileEntry& WorldProfile::get_entry(int id) {\n        std::vector<WorldProfileEntry>& nv = nvitems();\n        if (id<0 || id >= int(nv.size())) MADNESS_EXCEPTION(\"WorldProfileEntry: get_entry: invalid id\", id);\n        return nv[id];\n    }\n\n#ifdef WORLD_PROFILE_ENABLE\n    static void profile_do_print(World& world, const std::vector<WorldProfileEntry>& v, bool use_inclusive) {\n        double cpu_total = 0.0;\n        for (unsigned int i=0; i<v.size(); ++i) {\n            if (use_inclusive) {\n                cpu_total += v[i].icpu.sum;\n            }\n            else {\n                cpu_total += v[i].xcpu.sum;\n            }\n        }\n\n        double cpu_sum = 0.0;\n        std::printf(\" cum%% cpu%%   cpu/s   cpu-min  cpu-avg  cpu-max  cpu-eff   inc/s   inc-min  inc-avg  inc-max  inc-eff   calls  call-min call-avg call-max call-eff name\\n\");\n        std::printf(\" ---- ---- -------- -------- -------- -------- -------- -------- -------- -------- -------- --------  ------- -------- -------- -------- -------- --------------------\\n\");\n\n        //\n        for (unsigned int i=0; i<v.size(); ++i) {\n            double cpu = v[i].xcpu.sum;\n            double inc = v[i].icpu.sum;\n            double count = v[i].count.sum;\n\n            if (use_inclusive) {\n                cpu_sum += inc;\n            }\n            else {\n                cpu_sum += cpu;\n            }\n\n            double cum_cpu_percent = cpu_total ? 100.0*cpu_sum/cpu_total : 0.0;\n            double cpu_percent = cpu_total ? 100.0*cpu/cpu_total : 0.0;\n\n            double cpu_mean = cpu/world.size();\n            double count_mean = count/world.size();\n            double count_eff = v[i].count.max ? count_mean/v[i].count.max : 1.0;\n            double cpu_eff = v[i].xcpu.max ? cpu_mean/v[i].xcpu.max : 1.0;\n\n            double inc_mean = inc/world.size();\n            double inc_eff = v[i].icpu.max ? inc_mean/v[i].icpu.max : 1.0;\n\n            printf(\"%5.1f%5.1f%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e %s\\n\",\n                   cum_cpu_percent,\n                   cpu_percent,\n                   cpu, v[i].xcpu.min, cpu_mean, v[i].xcpu.max, cpu_eff,\n                   inc, v[i].icpu.min, inc_mean, v[i].icpu.max, inc_eff,\n                   double(count), double(v[i].count.min), count_mean, double(v[i].count.max), count_eff,\n                   v[i].name.c_str());\n            printf(\"                %9d         %9d                  %9d         %9d                  %9d         %9d\\n\",\n                   v[i].xcpu.pmin, v[i].xcpu.pmax,\n                   v[i].icpu.pmin, v[i].icpu.pmax,\n                   v[i].count.pmin, v[i].count.pmax);\n        }\n    }\n\n\n    static void profile_do_print_comms(World& world, const std::vector<WorldProfileEntry>& v) {\n        std::printf(\"                                                    sent                                                                                                     received\\n\");\n        std::printf(\" ----------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------\\n\");\n        std::printf(\"                      inclusive                                             exclusive                                             inclusive                                            exclusive\\n\");\n        std::printf(\" ----------------------------------------------------- ----------------------------------------------------- ------------------------------------------------------ -----------------------------------------------------\\n\");\n        std::printf(\"           nmsg                       nbyte                      nmsg                       nbyte                      nmsg                       nbyte                      nmsg                       nbyte\\n\");\n        std::printf(\" -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- -------------------------- -----------------------\\n\");\n        std::printf(\"   tot      min      max      tot      min      max      tot      min      max      tot      min      max      tot      min      max      tot      min      max      tot      min      max      tot      min      max\\n\");\n        std::printf(\"   ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---      ---\\n\");\n        //\n        for (unsigned int i=0; i<v.size(); ++i) {\n            std::printf(\"%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e%9.2e %s\\n\",\n                        (double) v[i].inmsg_sent.sum, (double) v[i].inmsg_sent.min, (double) v[i].inmsg_sent.max, \n                        (double) v[i].inbyt_sent.sum, (double) v[i].inbyt_sent.min, (double) v[i].inbyt_sent.max, \n                        (double) v[i].xnmsg_sent.sum, (double) v[i].xnmsg_sent.min, (double) v[i].xnmsg_sent.max, \n                        (double) v[i].xnbyt_sent.sum, (double) v[i].xnbyt_sent.min, (double) v[i].xnbyt_sent.max, \n                        (double) v[i].inmsg_recv.sum, (double) v[i].inmsg_recv.min, (double) v[i].inmsg_recv.max, \n                        (double) v[i].inbyt_recv.sum, (double) v[i].inbyt_recv.min, (double) v[i].inbyt_recv.max, \n                        (double) v[i].xnmsg_recv.sum, (double) v[i].xnmsg_recv.min, (double) v[i].xnmsg_recv.max, \n                        (double) v[i].xnbyt_recv.sum, (double) v[i].xnbyt_recv.min, (double) v[i].xnbyt_recv.max, \n                        v[i].name.c_str());\n            std::printf(\"      %9d%9d         %9d%9d         %9d%9d         %9d%9d         %9d%9d         %9d%9d         %9d%9d         %9d%9d\\n\",\n                        v[i].inmsg_sent.pmin, v[i].inmsg_sent.pmax, \n                        v[i].inbyt_sent.pmin, v[i].inbyt_sent.pmax, \n                        v[i].xnmsg_sent.pmin, v[i].xnmsg_sent.pmax, \n                        v[i].xnbyt_sent.pmin, v[i].xnbyt_sent.pmax, \n                        v[i].inmsg_recv.pmin, v[i].inmsg_recv.pmax, \n                        v[i].inbyt_recv.pmin, v[i].inbyt_recv.pmax,\n                        v[i].xnmsg_recv.pmin, v[i].xnmsg_recv.pmax, \n                        v[i].xnbyt_recv.pmin, v[i].xnbyt_recv.pmax); \n        }\n    }\n\n#endif\n\n#ifdef WORLD_PROFILE_ENABLE\n    namespace {\n      void est_profile_overhead() {\n        PROFILE_MEMBER_FUNC(WorldProfile);\n      }\n    }\n#endif\n\n    void WorldProfile::print(World& world) {\n#ifdef WORLD_PROFILE_ENABLE\n        for (int i=0; i<100; ++i) est_profile_overhead();\n\n        std::vector<WorldProfileEntry>& nv = const_cast<std::vector<WorldProfileEntry>&>(items);\n\n        ProcessID me = world.rank();\n        for (unsigned int i=0; i<nv.size(); ++i) {\n            nv[i].init_par_stats(me);\n        }\n\n        recv_stats(world, 2*me+1);\n        recv_stats(world, 2*me+2);\n\n        if (me) {\n            archive::MPIOutputArchive ar(world, (me-1)/2);\n            ar & nv;\n        }\n        else {\n            double overhead = 0.0;\n            int overid = find(\"WorldProfile::est_profile_overhead\");\n            if (overid != -1) {\n                overhead = get_entry(overid).xcpu.sum/get_entry(overid).count.sum;\n            }\n\n            std::printf(\"\\n    MADNESS global parallel profile\\n\");\n            std::printf(\"    -------------------------------\\n\\n\");\n            std::printf(\"    o  estimated profiling overhead %.1e seconds per call\\n\", overhead);\n            std::printf(\"    o  total  cpu time on process zero %.1f seconds\\n\", madness::cpu_time()-WorldProfile::cpu_start);\n            std::printf(\"    o  total wall time on process zero %.1f seconds\\n\", madness::wall_time()-WorldProfile::wall_start);\n            std::printf(\"    o  exclusive cpu time excludes called profiled routines\\n\");\n            std::printf(\"    o  inclusive cpu time includes called profiled routines and\\n\");\n            std::printf(\"       does not double count recursive calls\\n\");\n            std::printf(\"    o  process with max/min value is printed under the entry\\n\");\n            std::printf(\"    o  first printed with items sorted in descending order by total exclusive\\n\");\n            std::printf(\"       cpu time and then sorted by total inclusive cpu time\\n\");\n            std::printf(\"    o  in emacs use toggle-truncate-lines to toggle wrapping long lines\\n\");\n            std::printf(\"\\n\");\n            std::printf(\"      cum%% - percent cumulative inc/exclusive cpu time (summed over all nodes)\\n\");\n            std::printf(\"      cpu%% - percent inc/exclusive cpu time (summed over all nodes)\\n\");\n            std::printf(\"       cpu - total exclusive cpu time (summed over all nodes)\\n\");\n            std::printf(\"   cpu-min - minimum exclusive cpu time on any processor\\n\");\n            std::printf(\"   cpu-avg - mean exclusive cpu time per processor\\n\");\n            std::printf(\"   cpu-max - maximum exclusive cpu time on any processor\\n\");\n            std::printf(\"   cpu-eff - cpu efficiency = avg/max\\n\");\n            std::printf(\"       inc - total inclusive cpu time (summed over all nodes)\\n\");\n            std::printf(\"   inc-min - minimum inclusive cpu time on any processor\\n\");\n            std::printf(\"   inc-avg - mean inclusive cpu time per processor\\n\");\n            std::printf(\"   inc-max - maximum inclusive cpu time on any processor\\n\");\n            std::printf(\"   inc-eff - inclusive cpu efficiency = avg/max\\n\");\n            std::printf(\"     calls - total number calls time\\n\");\n            std::printf(\" calls-min - minimum number calls on any processor\\n\");\n            std::printf(\" calls-avg - mean number calls per processor\\n\");\n            std::printf(\" calls-max - maximum number calls on any processor\\n\");\n            std::printf(\" calls-eff - calls efficiency = avg/max\\n\");\n\n            std::vector<WorldProfileEntry> v(nv);\n            std::sort(v.begin(), v.end(), &WorldProfileEntry::exclusivecmp);\n            std::printf(\"\\n\\n\");\n            std::printf(\"  ** sorted by exclusive cpu time **\\n\");\n            profile_do_print(world, v, false);\n\n            std::sort(v.begin(), v.end(), &WorldProfileEntry::inclusivecmp);\n            std::printf(\"\\n\\n\");\n            std::printf(\"  ** sorted by inclusive cpu time **\\n\");\n            profile_do_print(world, v, true);\n\n            std::printf(\"\\n    MADNESS global communications profile\\n\");\n            std::printf(\"    ---------------------------------------\\n\\n\");\n            std::printf(\"    o  number and total bytes of active messages sent and received\\n\");\n            std::printf(\"    o  exclusive data excludes called profiled routines\\n\");\n            std::printf(\"    o  inclusive data includes called profiled routines and\\n\");\n            std::printf(\"       does not double count recursive calls\\n\");\n            std::printf(\"    o  process with max/min value is printed under the entry\\n\");\n            std::printf(\"    o  first printed with items sorted in descending order by total exclusive\\n\");\n            std::printf(\"       nbyte-sent and then sorted by total inclusive nbyte-sent\\n\");\n\n            std::sort(v.begin(), v.end(), &WorldProfileEntry::exclusivebytcmp);\n            std::printf(\"\\n\\n\");\n            std::printf(\"  ** sorted by exclusive nbytes sent **\\n\");\n            profile_do_print_comms(world, v);\n\n            std::sort(v.begin(), v.end(), &WorldProfileEntry::inclusivebytcmp);\n            std::printf(\"\\n\\n\");\n            std::printf(\"  ** sorted by inclusive nbytes sent **\\n\");\n            profile_do_print_comms(world, v);\n\n        }\n        world.gop.fence();\n\n#endif\n    }\n\n    void WorldProfile::recv_stats(World& world, ProcessID p) {\n        if (p >= world.size()) return;\n        archive::MPIInputArchive ar(world, p);\n        const std::vector<WorldProfileEntry> v;\n        ar & v;\n        for (unsigned int i=0; i<v.size(); ++i) {\n            int id = find(v[i].name);\n            if (id != -1) {\n                WorldProfileEntry& d = get_entry(id);\n                d.par_reduce(v[i]);\n            }\n            else {\n                id = register_id(v[i].name.c_str());\n                WorldProfileEntry& d = get_entry(id);\n                d = v[i];\n            }\n        }\n    }\n\n    WorldProfileObj::WorldProfileObj(int id) : prev(call_stack), id(id), cpu_base(madness::cpu_time()), stats_base(::madness::RMI::get_stats()) {\n        int tid = mythreadid;\n        if (tid == -1) tid = mythreadid = ++threadcounter;\n        MADNESS_ASSERT(mythreadid < 64);\n        cpu_start = cpu_base;\n        stats_start = stats_base;\n        call_stack = this;\n        ++(WorldProfile::get_entry(id).depth[tid]); // Keep track of recursive calls to avoid double counting time in self\n        if (prev) prev->pause(cpu_start,stats_start);\n    }\n\n    /// Pause profiling while we are not executing ... accumulate time in self\n    void WorldProfileObj::pause(double now, const RMIStats& stats) {\n        ScopedMutex<Spinlock> martha(WorldProfile::get_entry(id));\n        WorldProfileEntry& d = WorldProfile::get_entry(id);\n\n        d.xcpu.value += (now - cpu_start);\n        d.xnmsg_sent.value += (stats.nmsg_sent - stats_start.nmsg_sent);\n        d.xnmsg_recv.value += (stats.nmsg_recv - stats_start.nmsg_recv);\n        d.xnbyt_sent.value += (stats.nbyte_sent - stats_start.nbyte_sent);\n        d.xnbyt_recv.value += (stats.nbyte_recv - stats_start.nbyte_recv);\n    }\n\n    /// Resume profiling\n    void WorldProfileObj::resume(double now, const RMIStats& statsnow) {\n        cpu_start = now;\n        stats_start = statsnow;\n    }\n\n    WorldProfileObj::~WorldProfileObj() {\n        // if (call_stack != this) throw \"WorldProfileObject: call stack confused\\n\"; // destructors should not throw\n        double now = madness::cpu_time();\n        RMIStats stats = RMI::get_stats();\n        WorldProfileEntry& d = WorldProfile::get_entry(id);\n        int tid = mythreadid;\n        {\n            ScopedMutex<Spinlock> martha(d);\n            ++(d.count.value);\n            d.xcpu.value += (now - cpu_start);\n            d.xnmsg_sent.value += (stats.nmsg_sent - stats_start.nmsg_sent);\n            d.xnmsg_recv.value += (stats.nmsg_recv - stats_start.nmsg_recv);\n            d.xnbyt_sent.value += (stats.nbyte_sent - stats_start.nbyte_sent);\n            d.xnbyt_recv.value += (stats.nbyte_recv - stats_start.nbyte_recv);\n            d.depth[tid]--;\n            if (d.depth[tid] == 0) { // Don't double count recursive calls\n                d.icpu.value += (now - cpu_base);\n                d.inmsg_sent.value += (stats.nmsg_sent - stats_base.nmsg_sent);\n                d.inmsg_recv.value += (stats.nmsg_recv - stats_base.nmsg_recv);\n                d.inbyt_sent.value += (stats.nbyte_sent - stats_base.nbyte_sent);\n                d.inbyt_recv.value += (stats.nbyte_recv - stats_base.nbyte_recv);\n            }\n        }\n        call_stack = prev;\n        if (call_stack) call_stack->resume(now, stats);\n    }\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/worldprofile.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n#ifndef MADNESS_WORLD_WORLDPROFILE_H__INCLUDED\n#define MADNESS_WORLD_WORLDPROFILE_H__INCLUDED\n\n#include <madness/madness_config.h>\n#include <madness/world/worldrmi.h>\n#include <madness/world/worldtypes.h>\n#include <madness/world/worldmutex.h>\n#include <string>\n#include <vector>\n\n// NEED TO ADD ATTRIBUTION TO SHINY ON SOURCE FORGE\n\nnamespace madness {\n\n    class World;\n\n    /// Simple container for parallel profile statistic\n    template <typename T>\n    struct ProfileStat {\n        T value, max, min, sum;  // local value, parallel max, min, sum\n        ProcessID pmax, pmin;    // processor with max, min values\n\n        ProfileStat() = default;\n\n        /// Copies local stats into parallel stats in prep for global reduction\n        void init_par_stats(ProcessID me) {\n            max = min = sum = value;\n            pmax = pmin = me;\n        }\n\n        /// Reduction of parallel data (max, min, sum)\n        void par_reduce(const ProfileStat<T>& other) {\n            if (other.max > max) {\n                max = other.max;\n                pmax = other.pmax;\n            }\n            if (other.min < min) {\n                min = other.min;\n                pmin = other.pmin;\n            }\n            sum += other.sum;\n        }\n\n        /// Zeros all data\n        void clear() {\n            value = max = min = sum = 0;\n            pmax = pmin = 0;\n        }\n    }; // struct ProfileStat\n\n    /// Used to store profiler info\n    struct WorldProfileEntry : public Spinlock {\n        std::string name;          ///< name of the entry\n        static const int MAX_NTHREAD=64;\n        int depth[MAX_NTHREAD];             ///< depth of recursive calls by thread (0 if no active calls)\n\n        ProfileStat<unsigned long> count;   ///< count of times called\n        ProfileStat<double> xcpu; ///< exclusive cpu time (i.e., excluding calls)\n        ProfileStat<double> icpu; ///< inclusive cpu call (i.e., including calls)\n        ProfileStat<unsigned long> xnmsg_sent; ///< No. of active messages sent ... exclusive\n        ProfileStat<unsigned long> inmsg_sent; ///< No. of active messages sent ... inclusive\n        ProfileStat<unsigned long> xnmsg_recv; ///< No. of active messages recv ... exclusive\n        ProfileStat<unsigned long> inmsg_recv; ///< No. of active messages recv ... inclusive\n        ProfileStat<unsigned long> xnbyt_sent; ///< No. of bytes sent ... exclusive\n        ProfileStat<unsigned long> inbyt_sent; ///< No. of bytes sent ... inclusive\n        ProfileStat<unsigned long> xnbyt_recv; ///< No. of bytes recv ... exclusive\n        ProfileStat<unsigned long> inbyt_recv; ///< No. of bytes recv ... inclusive\n\n        WorldProfileEntry(const char* name = \"\");\n\n        WorldProfileEntry(const WorldProfileEntry& other);\n\n        WorldProfileEntry& operator=(const WorldProfileEntry& other);\n\n        static bool exclusivecmp(const WorldProfileEntry&a, const WorldProfileEntry& b);\n\n        static bool inclusivecmp(const WorldProfileEntry&a, const WorldProfileEntry& b);\n\n        static bool exclusivebytcmp(const WorldProfileEntry&a, const WorldProfileEntry& b);\n\n        static bool inclusivebytcmp(const WorldProfileEntry&a, const WorldProfileEntry& b);\n\n        void init_par_stats(ProcessID me);\n\n        void par_reduce(const WorldProfileEntry& other);\n\n        void clear();\n\n        template <class Archive>\n        void serialize(const Archive& ar) {\n            ar & name & depth & count & xcpu & icpu & xnmsg_sent & inmsg_sent & xnmsg_recv & inmsg_recv & xnbyt_sent & inbyt_sent & xnbyt_recv & inbyt_recv;\n        }\n    }; // struct WorldProfileEntry\n\n\n    /// Singleton-like class for holding profiling data and functionality\n\n    /// Use the macros PROFILE_FUNC, PROFILE_BLOCK, PROFILE_MEMBER_FUNC\n    class WorldProfile {\n        //static ConcurrentHashMap<std::string,WorldProfileEntry> items;\n        static std::vector<WorldProfileEntry> items;\n        static Spinlock mutex;\n        static double cpu_start;\n        static double wall_start;\n\n        static std::vector<WorldProfileEntry>& nvitems();\n\n\n        /// Returns id of the entry associated with the name.  Returns -1 if not found;\n        static int find(const std::string& name);\n\n\n    public:\n        /// Returns id for the name, registering if necessary.\n        static int register_id(const char* name);\n\n        /// Returns id for the name, registering if necessary.\n        static int register_id(const char* classname, const char* function);\n\n        /// Clears all profiling information\n        static void clear();\n\n        /// Returns a reference to the specified entry.  Throws if id is invalid.\n        static WorldProfileEntry& get_entry(int id);\n\n        /// Prints global profiling information.  Global fence involved.  Implemented in worldstuff.cc\n        static void print(World& world);\n\n    private:\n        /// Private.  Accumlates data from process into parallel statistics.  Implemented in worldstuff.cc\n        static void recv_stats(World& world, ProcessID p);\n    };\n\n\n    class WorldProfileObj {\n        static thread_local WorldProfileObj* call_stack;  ///< Current top of this thread's call stack\n        static thread_local int mythreadid; ///< My unique thread id\n        WorldProfileObj* const prev; ///< Pointer to the entry that called me\n        const int id;                ///< My entry in the world profiler\n        const double cpu_base;       ///< Time that I started executing\n        RMIStats stats_base;         ///< Msg stats when I start executing\n        double cpu_start;            ///< Time that I was at top of stack\n        RMIStats stats_start;        ///< Msg stats when I was at top of stack;\n    public:\n\n        WorldProfileObj(int id);\n\n        /// Pause profiling while we are not executing ... accumulate time in self\n        void pause(double now, const RMIStats& stats);\n\n        /// Resume profiling\n        void resume(double now, const RMIStats& stats);\n\n        ~WorldProfileObj();\n    };\n}\n\n#ifdef WORLD_PROFILE_ENABLE\n#  define PROFILE_STRINGIFY(s) #s\n\n#  define PROFILE_BLOCK(name)                                             \\\n    static const int __name##_id=madness::WorldProfile::register_id(PROFILE_STRINGIFY(name)); \\\n    madness::WorldProfileObj name(__name##_id)\n\n#  define PROFILE_FUNC                                                    \\\n    static const int __profile_id=madness::WorldProfile::register_id(__FUNCTION__); \\\n    madness::WorldProfileObj __profile_obj(__profile_id)\n\n#  define PROFILE_MEMBER_FUNC(classname)                                       \\\n    static const int __profile_id=madness::WorldProfile::register_id(PROFILE_STRINGIFY(classname),  __FUNCTION__); \\\n    madness::WorldProfileObj __profile_obj(__profile_id)\n\n\n#else\n\n#  define PROFILE_BLOCK(name)\n#  define PROFILE_FUNC\n#  define PROFILE_MEMBER_FUNC(classname)\n\n#endif\n\n#endif // MADNESS_WORLD_WORLDPROFILE_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldptr.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file worldptr.h\n \\brief The \\c madness::detail::WorldPtr class for global pointers.\n \\ingroup world\n*/\n\n#ifndef MADNESS_WORLD_WORLDPTR_H__INCLUDED\n#define MADNESS_WORLD_WORLDPTR_H__INCLUDED\n\n#include <madness/world/madness_exception.h>\n#include <madness/world/worldtypes.h>   // for ProcessID\n#include <madness/world/archive.h>      // for wrap_opaque\n#include <madness/world/world.h>\n#include <algorithm>            // for std::swap\n#include <iostream>             // for std::iostream\n\n/// \\addtogroup world\n/// @{\n\nnamespace madness {\n\n    namespace detail {\n\n        /// \\todo Brief description needed.\n\n        /// \\todo Description needed.\n        /// \\tparam U Description needed.\n        template<typename U>\n        struct ptr_traits {\n            /// \\todo Brief description needed.\n            typedef U & reference;\n        };\n\n        /// Specialization of \\c ptr_traits for type \\c void.\n        template<>\n        struct ptr_traits<void> {\n            /// \\todo Brief description needed.\n            typedef void reference;\n        };\n\n        /// A global pointer address, valid anywhere in the world.\n\n        /// Stores a globally addressable pointer. It can be sent to any\n        /// process in the world.\n        /// \\tparam T The pointer type.\n        template <typename T>\n        class WorldPtr {\n        public:\n            typedef unsigned long worldidT; ///< World ID type.\n\n        private:\n            World* world_; ///< A pointer to the world.\n            worldidT worldid_; ///< The world ID.\n            ProcessID rank_; ///< The rank of the node that the pointer belongs to.\n            T* pointer_; ///< The pointer being referenced.\n\n            template<typename>\n            friend class WorldPtr;\n\n            /// Current local rank.\n\n            /// \\return The rank of the current node. If the pointer is not\n            ///     set, then -2.\n            /// \\note -2 is returned so it is not equal to the null value of -1.\n            ProcessID local_rank() const {\n                return (world_ != nullptr ? world_->rank() : -2);\n            }\n\n        public:\n\n            /// Alias for the pointer type.\n            typedef T* pointer;\n\n            /// \\todo Brief description needed.\n            typedef typename ptr_traits<T>::reference reference;\n\n\n            /// Default constructor\n\n            /// Creates a \\c NULL pointer. There is no owner; i.e. the owner is\n            /// set to -1.\n            /// \\todo Would it be worth adding a static constant \\c ProcessID equal to -1 to signify an unowned pointer?\n            WorldPtr() :\n                world_(nullptr),\n                worldid_(0),\n                rank_(-1),\n                pointer_(nullptr)\n            { }\n\n\n            /// %World pointer constructor.\n\n            /// Construct a world pointer form a local pointer.\n            /// \\param[in] w A reference to the local world.\n            /// \\param[in] p The local pointer.\n            WorldPtr(World& w, T* p) :\n                world_(&w),\n                worldid_(w.id() + 1),\n                rank_(w.rank()),\n                pointer_(p)\n            { }\n\n\n            /// Copy constructor\n\n            /// \\param[in] other The world pointer to be copied.\n            WorldPtr(const WorldPtr<T>& other) :\n                world_(other.world_),\n                worldid_(other.worldid_),\n                rank_(other.rank_),\n                pointer_(other.pointer_)\n            { }\n\n\n            /// Copy conversion constructor.\n\n            /// Copy and convert a pointer from \\c U* to \\c T* type.\n            /// \\tparam U The pointer type of the \\c other pointer.\n            /// \\param[in] other The world pointer to be copied.\n            /// \\note \\c U* must be implicitly convertible to \\c T* type.\n            template <typename U>\n            WorldPtr(const WorldPtr<U>& other) :\n                world_(other.world_),\n                worldid_(other.worldid_),\n                rank_(other.rank_),\n                pointer_(other.pointer_)\n            { }\n\n\n            /// Copy assignment operator.\n\n            /// \\param[in] other The world pointer to be copied.\n            /// \\return A reference to this object.\n            WorldPtr<T>& operator=(const WorldPtr<T>& other) {\n                world_ = other.world_;\n                worldid_ = other.worldid_;\n                rank_ = other.rank_;\n                pointer_ = other.pointer_;\n\n                return *this;\n            }\n\n\n            /// Copy conversion assignment operator.\n\n            /// Copy and convert a pointer from \\c U* to \\c T* type.\n            /// \\tparam U The pointer type of the \\c other pointer.\n            /// \\param[in] other The world pointer to be copied.\n            /// \\return A reference to this object.\n            /// \\note \\c U* must be implicitly convertible to \\c T* type.\n            template <typename U>\n            WorldPtr<T>& operator=(const WorldPtr<U>& other) {\n                world_ = other.world_;\n                worldid_ = other.worldid_;\n                rank_ = other.rank_;\n                pointer_ = other.pointer_;\n\n                return *this;\n            }\n\n\n            /// Check that the world pointer references a local pointer.\n\n            /// \\return True if the pointer points to a local address; false\n            ///     if it points to a remote address or is NULL.\n            bool is_local() const {\n                return local_rank() == rank_;\n            }\n\n\n            /// Check that the world pointer has an owner.\n\n            /// \\return True if the pointer has a valid owner; false otherwise.\n            bool has_owner() const {\n                return (rank_ != -1) && (world_ != nullptr);\n            }\n\n\n            /// Pointer accessor.\n\n            /// Get the pointer from the world pointer.\n            /// \\note A default initialized pointer is not considered to be\n            /// local because it is not associated with a world.\n            /// \\return The local pointer.\n            /// \\throw MadnessException When the pointer references a remote\n            ///     address.\n            pointer get() const {\n                // It is not safe to access this pointer remotely unless null.\n                MADNESS_ASSERT(is_local());\n                return pointer_;\n            }\n\n\n            /// Dereference operator.\n\n            /// Dereference the local pointer.\n            /// \\return A reference to the local pointer.\n            /// \\throw MadnessException If the pointer references a remote\n            ///     address, or if the pointer is \\c NULL.\n            reference operator*() const {\n                // It is not safe to access a NULL pointer with this operator.\n                MADNESS_ASSERT(pointer_ != nullptr);\n                // It is not safe to access this pointer remotely.\n                MADNESS_ASSERT(is_local());\n                return *pointer_;\n            }\n\n\n            /// Pointer arrow operator.\n\n            /// Access members of the pointer.\n            /// \\return The local pointer.\n            /// \\throw MadnessException If the pointer references a remote\n            ///     address, or if the pointer is \\c NULL.\n            pointer operator->() const {\n                // It is not safe to access a NULL pointer with this operator.\n                MADNESS_ASSERT(pointer_ != nullptr);\n                // It is not safe to access this pointer remotely.\n                MADNESS_ASSERT(is_local());\n                return pointer_;\n            }\n\n\n            /// Boolean conversion operator.\n\n            /// \\return True if the pointer is non-null; false otherwise.\n            operator bool () const {\n                return pointer_;\n            }\n\n\n            /// Boolean conversion (not) operator.\n\n            /// \\return True if the pointer is null; false otherwise.\n            bool operator ! () const {\n                return !pointer_;\n            }\n\n\n            /// Equality comparison operator.\n\n            /// \\tparam U Another pointer type.\n            /// \\param[in] other The pointer to compare with.\n            /// \\return True if the pointers refer to the same address from\n            ///     the same node in the same world; false otherwise.\n            template <typename U>\n            bool operator==(const WorldPtr<U>& other) const {\n                return (pointer_ == other.pointer_) && (rank_ == other.rank_)\n                    && (worldid_ == other.worldid_);\n            }\n\n\n            /// Inequality comparison operator.\n\n            /// \\tparam U Another pointer type.\n            /// \\param[in] other The other pointer to compare with.\n            /// \\return True if the pointers refer to different addresses or\n            ///     different nodes or different worlds; false otherwise.\n            template <typename U>\n            bool operator!=(const WorldPtr<U>& other) const {\n                return (pointer_ != other.pointer_) || (rank_ != other.rank_)\n                    || (worldid_ != other.worldid_);\n            }\n\n\n            /// Less-than comparison operator.\n\n            /// This operator does a lexicographical comparison of world ID,\n            /// rank, and pointer (in that order).\n            /// \\tparam U Another pointer type.\n            /// \\param[in] other The other pointer to compare with.\n            /// \\return True if the lexicographical comparison of world ID,\n            ///     rank, and pointer is true; false otherwise.\n            template <typename U>\n            bool operator<(const WorldPtr<U>& other) const {\n                return (worldid_ < other.worldid_) ||\n                        ((worldid_ == other.worldid_) && ((rank_ < other.rank_) ||\n                        ((rank_ == other.rank_) && (pointer_ < other.pointer_))));\n            }\n\n\n            /// World accessor.\n\n            /// \\return A reference to the world (may be \\c NULL).\n            /// \\throw MadnessException When the pointer world has not been set\n            ///     (i.e. when \\c has_owner()==false).\n            World& get_world() const {\n                MADNESS_ASSERT(world_ != nullptr);\n                return *world_;\n            }\n\n\n            /// %World ID accessor.\n\n            /// \\return The world ID of the world that the pointer belongs to.\n            worldidT get_worldid() const {\n                return worldid_ - 1;\n            }\n\n\n            /// Rank accessor.\n\n            /// \\todo Finish this sentence: If the pointer is not associated with\n            /// \\return The rank of the process that owns the pointer.\n            ProcessID owner() const {\n                return rank_;\n            }\n\n\n            /// Swap the content of \\c this with \\c other.\n\n            /// \\tparam U The other world pointer type.\n            /// \\param[in,out] other The other world pointer.\n            /// \\note \\c U* must be implicitly convertible to \\c T* type.\n            template <typename U>\n            void swap(WorldPtr<U>& other) {\n                std::swap(world_, other.world_);\n                std::swap(worldid_, other.worldid_);\n                std::swap(rank_, other.rank_);\n                std::swap(pointer_, other.pointer_);\n            }\n\n\n            /// Deserialize the world pointer.\n\n            /// Deserialize the world pointer for remote communication or write\n            /// to disk.\n            /// \\tparam Archive The archive object type.\n            /// \\param[in] ar The archive.\n            template <class Archive>\n            inline void load_internal_(const Archive& ar) {\n                ar & worldid_ & rank_ & archive::wrap_opaque(pointer_);\n                world_ = (worldid_ != 0 ? World::world_from_id(get_worldid()) : nullptr);\n            }\n\n            /// Serialize the world pointer.\n\n            /// Serialize the world pointer for remote communication or write\n            /// to disk.\n            /// \\tparam Archive The archive object type.\n            /// \\param[in] ar The archive.\n            template <class Archive>\n            inline void store_internal_(const Archive& ar) const {\n                ar & worldid_ & rank_ & archive::wrap_opaque(pointer_);\n            }\n\n            /// Output stream insertion operator for world pointers.\n\n            /// \\param[in,out] out The output stream.\n            /// \\param[in] p The world pointer.\n            /// \\return The output stream.\n            /// \\todo Does this \\c friend function need to be implemented in the class or can we move it to a \\c *.cc file?\n            friend std::ostream& operator<<(std::ostream& out, const WorldPtr<T>& p) {\n                out << \"WorldPointer(ptr=\" << p.pointer_ << \", rank=\";\n                if(p.rank_ >= 0)\n                    out << p.rank_;\n                else\n                    out << \"none\";\n                out << \", worldid=\";\n                if(p.worldid_ != 0)\n                    out << (p.worldid_ - 1);\n                else\n                    out << \"none\";\n                out << \")\";\n                return out;\n            }\n        }; // class WorldPtr\n\n\n        /// Swap the content of \\c l with \\c r.\n\n        /// \\tparam T The world pointer type.\n        /// \\param[in,out] l One world pointer.\n        /// \\param[in,out] r The other world pointer.\n        template <typename T>\n        void swap(WorldPtr<T>& l, WorldPtr<T>& r) {\n            l.swap(r);\n        }\n\n\n        /// Greater-than comparison operator.\n\n        /// This operator does a lexicographical comparison of world ID,\n        /// rank, and pointer (in that order).\n        /// \\tparam T One pointer type.\n        /// \\tparam U Another pointer type.\n        /// \\param[in] left One pointer.\n        /// \\param[in] right The other pointer.\n        /// \\return True if the lexicographical comparison of world ID,\n        ///     rank, and pointer is true; false otherwise.\n        template <typename T, typename U>\n        bool operator>(const WorldPtr<T>& left, const WorldPtr<U>& right) {\n            return right < left;\n        }\n\n\n        /// Less-than-equal-to comparison operator.\n\n        /// This operator does a lexicographical comparison of world ID,\n        /// rank, and pointer (in that order).\n        /// \\tparam T One pointer type.\n        /// \\tparam U Another pointer type.\n        /// \\param[in] left One pointer.\n        /// \\param[in] right The other pointer.\n        /// \\return True if the lexicographical comparison of world ID,\n        ///     rank, and pointer is true; false otherwise.\n        template <typename T, typename U>\n        bool operator<=(const WorldPtr<T>& left, const WorldPtr<U>& right) {\n            return !(right < left);\n        }\n\n\n        /// Greater-than-equal-to comparison operator.\n\n        /// This operator does a lexicographical comparison of world ID,\n        /// rank, and pointer (in that order).\n        /// \\tparam T One pointer type.\n        /// \\tparam U Another pointer type.\n        /// \\param[in] left One pointer.\n        /// \\param[in] right The other pointer.\n        /// \\return True if the lexicographical comparison of world ID,\n        ///     rank, and pointer is true; false otherwise.\n        template <typename T, typename U>\n        bool operator>=(const WorldPtr<T>& left, const WorldPtr<U>& right) {\n            return !(left < right);\n        }\n\n    } // namespace detail\n\n    namespace archive {\n\n        /// Specialization of \\c ArchiveLoadImpl for world pointers.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The world pointer type.\n        template <typename Archive, typename T>\n        struct ArchiveLoadImpl<Archive, madness::detail::WorldPtr<T> > {\n\n            /// Load a world pointer from the archive.\n\n            /// \\param[in] ar The archive.\n            /// \\param[out] p The world pointer.\n            static inline void load(const Archive& ar, madness::detail::WorldPtr<T>& p) {\n                p.load_internal_(ar);\n            }\n        };\n\n        /// Specialization of \\c ArchiveStoreImpl for world pointers.\n\n        /// \\tparam Archive The archive type.\n        /// \\tparam T The world pointer type.\n        template <typename Archive, typename T>\n        struct ArchiveStoreImpl<Archive, madness::detail::WorldPtr<T> > {\n\n            /// Store a world pointer from the archive.\n\n            /// \\param[in] ar The archive.\n            /// \\param[in] p The world pointer.\n            static inline void store(const Archive& ar, const madness::detail::WorldPtr<T>& p) {\n                p.store_internal_(ar);\n            }\n        };\n\n    } // namespace archive\n\n} // namespace madness\n\n/// @}\n\n#endif // MADNESS_WORLD_WORLDPTR_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldref.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include <madness/world/worldref.h>\n#include <madness/world/worldmutex.h>\n#include <iostream>\n\nnamespace madness {\n    namespace detail {\n        RemoteCounter::pimpl_mapT RemoteCounter::pimpl_map_;\n\n        std::ostream& operator<<(std::ostream& out, const RemoteCounter& counter) {\n            out << \"RemoteCounter( owner=\" << counter.owner() << \" worldid=\" <<\n                    counter.get_worldid() << \" use_count=\" << counter.use_count() << \")\";\n            return out;\n        }\n    } // namespace detail\n} // namespace madness\n\n"
  },
  {
    "path": "src/madness/world/worldref.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n\n#ifndef MADNESS_WORLD_WORLDREF_H__INCLUDED\n#define MADNESS_WORLD_WORLDREF_H__INCLUDED\n\n/// \\file worldref.h\n/// \\brief Implements RemoteReference which is for internal use\n\n#include <madness/world/atomicint.h>    // for AtomicInt\n#include <madness/world/worldtypes.h>   // for ProcessID\n#include <madness/world/archive.h>      // for wrap_opaque\n#include <madness/world/worldam.h>      // for new_am_arg\n#include <madness/world/worldptr.h>     // for WorldPtr\n#include <madness/world/worldhashmap.h> // for ConcurrentHashMap\n#include <iosfwd>               // for std::ostream\n\n//#define MADNESS_REMOTE_REFERENCE_DEBUG\n#ifdef MADNESS_REMOTE_REFERENCE_DEBUG\n#include <madness/world/print.h>        // for print\n#endif\n\nnamespace madness {\n\n    class World;\n    template <typename T> class RemoteReference;\n//\n//    template <typename T>\n//    std::ostream& operator<<(std::ostream& s, const RemoteReference<T>& ref);\n\n    namespace detail {\n\n\n        template <typename T> class RemoteCounterImpl;\n\n        /// Base class for remote counter implementation objects\n\n        /// This class only holds an atomic counter. The use counter tracks\n        /// local copies of the counter an references that have been copied as\n        /// part of the communication process. This class also provides a\n        /// mechanism for hiding the pointer type.\n        /// \\note The actual counter manipulation is handled by RemoteCounter.\n        /// This class only provides the counter interface.\n        /// \\note This class is considered an implementation detail and may\n        /// change at any time. You should not use this class directly.\n        class RemoteCounterBase {\n        private:\n            madness::AtomicInt count_;          ///< reference count\n\n            // Copy not allowed\n            RemoteCounterBase(const RemoteCounterBase&);\n            RemoteCounterBase& operator=(const RemoteCounterBase&);\n\n        public:\n\n            RemoteCounterBase() { count_ = 1; }\n            virtual ~RemoteCounterBase() { }\n\n            /// Counter key accessor\n\n            /// The key is the pointer for which the remote counter is counting\n            /// references.\n            /// \\return The pointer that is being counted.\n            virtual void* key() const = 0;\n\n            /// Remote and local counter accessor\n\n            /// The use counter tracks local copies of the counter an references\n            /// that have been copied as part othe communication process\n            long use_count() const { return count_; }\n\n            /// Shared pointer accessor\n\n            /// \\tparam T The stored pointer type\n            /// \\return A const reference to the stored shared pointer\n            template <typename T>\n            const std::shared_ptr<T>& get_shared() const {\n                return static_cast<const RemoteCounterImpl<T>*>(this)->get_shared();\n            }\n\n            /// Increment the reference count\n\n            /// The reference count should be incremented when a local copy of\n            /// the counter is created or the when the counter is serialized as\n            /// part of communication.\n            /// \\throw nothing\n            void add_ref() {\n#ifdef MADNESS_REMOTE_REFERENCE_DEBUG\n                long c = count_++;\n                print(\">>> RemoteCounterBase(\", this->key(), \") +ref count=\", c + 1);\n#else\n                count_++;\n#endif\n            }\n\n            /// Decrement the reference count\n\n            /// \\return true if the reference count has dropped to zero\n            /// \\throw nothing\n            bool release() {\n#ifdef MADNESS_REMOTE_REFERENCE_DEBUG\n                long c = count_;\n                print(\">>> RemoteCounterBase(\", this->key(), \") -ref count=\", c - 1);\n#endif\n                return count_.dec_and_test();\n            }\n        }; // class RemoteCounterBase\n\n        /// Remote counter implementation object.\n\n        /// This class stores a shared pointer in memory to ensure that the\n        /// referenced object is valid as long as there are outstanding remote\n        /// references.\n        /// \\tparam T The type of the referenced shared_ptr object.\n        /// \\note This class is considered an implementation detail and may\n        /// change at any time. You should not use this class directly.\n        template <typename T>\n        class RemoteCounterImpl : public RemoteCounterBase {\n        private:\n            // At some point this should probably be changed to a quick allocator\n            // When that happens, also uncomment the new and delete operators\n//            typedef std::allocator<RemoteCounterImpl<T> > A;\n\n            // Keep a copy of the shared pointer to make sure it stays in memory\n            // while we have outstanding remote references to it.\n            std::shared_ptr<T> pointer_; ///< pointer that is remotely referenced\n\n        public:\n            explicit RemoteCounterImpl(const std::shared_ptr<T>& p) :\n                RemoteCounterBase(), pointer_(p)\n            { }\n\n            virtual ~RemoteCounterImpl() { }\n\n            /// Shared pointer accessor\n\n            /// \\return A const reference to the stored shared pointer\n            const std::shared_ptr<T>& get_shared() const { return pointer_; }\n\n            /// Counter key accessor\n\n            /// The key is the pointer for which the remote counter is counting\n            /// references.\n            /// \\return The pointer that is being counted.\n            virtual void* key() const { return static_cast<void*>(pointer_.get()); }\n\n//            void* operator new(std::size_t) {\n//                return A().allocate(1);\n//            }\n//\n//            void operator delete(void * p) {\n//                A().deallocate(static_cast<RemoteCounterImpl<T> *>(p), 1);\n//            }\n        }; // class RemoteCounterImpl\n\n        /// Remote reference counter\n\n        /// Automatically counts local and remote references to an object. The\n        /// reference count is incremented when the object is copied locally or\n        /// serialized as part of communication.\n        class RemoteCounter {\n        private:\n            typedef RemoteCounterBase implT;\n            typedef ConcurrentHashMap<void*, WorldPtr<implT> > pimpl_mapT;\n\n            static pimpl_mapT pimpl_map_;   ///< A map of currently registered\n                                            ///< implementation objects. The key is\n                                            ///< it's referenced pointer.\n\n            /// Pointer to the shared counter implementation object\n            mutable WorldPtr<implT> pimpl_;\n\n            /// Clean-up the implementation object\n\n            /// Here we check that the pimpl has been initialized, and if so, we\n            /// release the current reference. If the count drops to zero, then\n            /// this is the last reference to the pimpl and it should be deleted.\n            void destroy() {\n                if(pimpl_.is_local()) {\n                    if(pimpl_->release()) {\n                        // No one else is referencing this pointer.\n                        // We can safely dispose of it.\n\n#ifdef MADNESS_REMOTE_REFERENCE_DEBUG\n                        print(\">>> RemoteCounter::unregister_ptr_: key=\", pimpl_->key(), \", value=\", pimpl_);\n#endif\n                        unregister_ptr_(pimpl_->key());\n                        delete pimpl_.get();\n                    }\n                }\n\n                pimpl_ = WorldPtr<implT>();\n            }\n\n            /// Register a local shared pointer\n\n            /// This function will first search the local pointer register for\n            /// the shared pointer \\c p. If found the pimpl for that pointer\n            /// will be returned. Otherwise a new pimpl will be created and\n            /// returned.\n            /// \\tparam T The shared pointer type to register\n            /// \\param w The world where the pointer lives\n            /// \\param p The shared pointer to register\n            /// \\return A world pointer to the pimpl\n            /// \\throw std::bad_alloc If pimpl allocation fails.\n            /// \\throw madness::MadnessException If pointer cannot be inserted\n            /// into the pointer registration map.\n            template <typename T>\n            static WorldPtr<implT> register_ptr_(World& w, const std::shared_ptr<T>& p) {\n                // Check for a null pointer\n                if(p.get() == nullptr)\n                    return WorldPtr<implT>(w, nullptr);\n\n                pimpl_mapT::accessor acc;\n                // Pointer is local and non-null\n                if(pimpl_map_.insert(acc,static_cast<void*>(p.get()))) {\n                    // The pointer is not registered so we need to make a\n                    // new pimpl.\n                    implT* pimpl = new RemoteCounterImpl<T>(p);\n\n                    try{\n                        acc->second = WorldPtr<implT>(w, pimpl);\n                    } catch(...) {\n                        delete pimpl;\n                        throw;\n                    }\n\n#ifdef MADNESS_REMOTE_REFERENCE_DEBUG\n                        print(\">>> RemoteCounter::register_ptr_(new): key=\", p.get(), \", pimpl=\", acc->second);\n#endif\n                } else {\n                    // The pointer is already registered, so we just need\n                    // increment the counter.\n#ifdef MADNESS_REMOTE_REFERENCE_DEBUG\n                    print(\">>> RemoteCounter::register_ptr_(existing): key=\", acc->second->key(), \", pimpl=\", acc->second);\n#endif\n                    acc->second->add_ref();\n                }\n\n                return acc->second;\n            }\n\n            /// Unregister a local shared pointer reference\n\n            /// \\param key The key of the \\c RemoteReference object to be unregistered.\n            /// \\throw MadnessException If \\c key is not found in the pointer map.\n            static void unregister_ptr_(void* key) {\n                auto erased = pimpl_map_.try_erase(key);\n                if (!erased) MADNESS_EXCEPTION(\"worldref: unregister_ptr failed\", erased);\n            }\n\n            RemoteCounter(const WorldPtr<implT>& p) :\n                pimpl_(p)\n            { }\n\n        public:\n\n            RemoteCounter() : pimpl_() { }\n\n            RemoteCounter(const RemoteCounter& other) :\n                pimpl_(other.pimpl_)\n            {\n                if(pimpl_ && pimpl_.is_local())\n                    pimpl_->add_ref();\n            }\n\n            template <typename T>\n            explicit RemoteCounter(World& w, const std::shared_ptr<T>& p) :\n                pimpl_(register_ptr_(w, p))\n            { }\n\n            ~RemoteCounter() { destroy(); }\n\n            RemoteCounter& operator=(const RemoteCounter& other) {\n                WorldPtr<implT> temp = other.pimpl_;\n\n                if(pimpl_ != temp) {\n                    if(temp)\n                        temp->add_ref();\n                    destroy();\n                    pimpl_ = temp;\n                }\n\n                return *this;\n            }\n\n            /// Counter accessor\n\n            /// \\return The number of local and remote references\n            /// \\throw none\n            long use_count() const { return (pimpl_.is_local() ? pimpl_->use_count() : 0); }\n            bool unique() const { return use_count() == 1; }\n            bool empty() const { return ! pimpl_; }\n\n            bool is_local() const { return pimpl_.is_local(); }\n            bool has_owner() const { return pimpl_.has_owner(); }\n            ProcessID owner() const { return pimpl_.owner(); }\n\n            template <typename T>\n            const std::shared_ptr<T>& get_shared() const { return pimpl_->get_shared<T>(); }\n\n            WorldPtr<implT>::worldidT\n            get_worldid() const { return pimpl_.get_worldid(); }\n            World& get_world() const { return pimpl_.get_world(); }\n            void swap(RemoteCounter& other) {\n                madness::detail::swap(pimpl_, other.pimpl_);\n            }\n\n        private:\n\n            template <typename, typename, typename>\n            friend struct archive::ArchiveLoadImpl;\n\n            template <typename, typename, typename>\n            friend struct archive::ArchiveStoreImpl;\n\n            template <typename Archive>\n            void load_(const Archive& ar) {\n                WorldPtr<implT> p;\n                ar & p;\n                RemoteCounter(p).swap(*this);\n\n#ifdef MADNESS_REMOTE_REFERENCE_DEBUG\n                print(\">>> RemoteCounter::load: pimpl=\", pimpl_);\n#endif\n            }\n\n            template <typename Archive>\n            void store_(const Archive& ar) const {\n                ar & pimpl_;\n\n                if(! ar.count_only()) {\n#ifdef MADNESS_REMOTE_REFERENCE_DEBUG\n                    print(\">>> RemoteCounter::store: pimpl=\", pimpl_);\n#endif\n                    if(pimpl_.is_local())\n                        pimpl_->add_ref();\n                    else\n                        pimpl_ = WorldPtr<implT>();\n                }\n            }\n\n\n        }; // class RemoteCounter\n\n        inline void swap(RemoteCounter& l, RemoteCounter& r) { l.swap(r); }\n\n        std::ostream& operator<<(std::ostream& out, const RemoteCounter& counter);\n\n    } // namespace detail\n\n\n    /// Simple structure used to manage references/pointers to remote instances\n\n    /// This class was intended only for internal use and is still rather\n    /// poorly thought through, however, it seems to fill a wider need.\n    /// \\note Do not serialize via wrap_opaque().\n    /// \\note Ownership of a reference is transferred when serialized on a remote\n    /// node. You should not attempt to send a remote reference to more than one\n    /// node except from the owning node. If you do serialize more than once,\n    /// this will cause an invalid memory access on the owning node.\n    /// \\note !!! It is YOUR RESPONSIBILITY to release the reference count. This\n    /// can be done by sending the remote reference back to the owner or by\n    /// calling reset(). If this is not done, you will have a memory leak.\n    template <typename T>\n    class RemoteReference {\n    public:\n        typedef typename detail::ptr_traits<T>::reference referenceT;\n        typedef T* pointerT;\n\n    private:\n        mutable pointerT pointer_;      ///< World pointer\n        detail::RemoteCounter counter_; ///< Remote reference counter\n\n        // This is for RemoteReferences of other types, so they can still access\n        // private members.\n        template <typename>\n        friend class RemoteReference;\n\n        // Handles reset of a remote reference from another node.\n        static void reset_handler(const AmArg& arg) {\n            RemoteReference<T> r;\n            arg & r;\n            // r resets on scope exit.\n        }\n\n    public:\n\n        /// Makes a non-shared (no reference count) null pointer\n        RemoteReference() :\n            pointer_(), counter_() {};\n\n        /// Construct a remote reference to p.\n\n        /// \\param w The world that \\c p belongs to.\n        /// \\param p The \\c shared_ptr that is to be referenced.\n        /// \\note \\c p must be locally addressable pointer\n        RemoteReference(World& w, const std::shared_ptr<T>& p) :\n            pointer_(p.get()), counter_(w, p)\n        { }\n\n        /// Copy constructor\n\n        /// \\param other The reference to be copied\n        RemoteReference(const RemoteReference<T>& other) :\n            pointer_(other.pointer_), counter_(other.counter_)\n        { }\n\n        /// Copy conversion constructor\n\n        /// \\tparam U The remote reference type to be copied\n        /// \\param other The reference to be copied\n        /// \\note \\c U* must be implicitly convertible to \\c T*\n        template <typename U>\n        RemoteReference(const RemoteReference<U>& other) :\n            pointer_(other.pointer_), counter_(other.counter_)\n        { }\n\n        ~RemoteReference() { }\n\n        /// Copy conversion assignment operator\n\n        /// \\param other The reference to be copied\n        RemoteReference<T>& operator=(const RemoteReference<T>& other) {\n            RemoteReference<T>(other).swap(*this);\n            return *this;\n        }\n\n        /// Copy conversion assignment operator\n\n        /// \\tparam U The remote reference type to be copied\n        /// \\param other The reference to be copied\n        /// \\note \\c U* must be implicitly convertible to \\c T*\n        template <typename U>\n        RemoteReference<T>& operator=(const RemoteReference<U>& other) {\n            RemoteReference<T>(other).swap(*this);\n            return *this;\n        }\n\n\n        /// Release this reference\n\n        /// This function will clear the reference and leave it in the default\n        /// constructed state. If the reference is non-local, then a message is\n        /// sent to the reference owner that releases the reference.\n        /// \\warning Only call this function for non-local references when it\n        /// will not otherwise be returned to the reference owner as part of a\n        /// message.\n        void reset() {\n            if((! (counter_.is_local())) && counter_.has_owner())\n                get_world().am.send(owner(), RemoteReference<T>::reset_handler, new_am_arg(*this));\n            else\n                RemoteReference<T>().swap(*this);\n        }\n\n        /// Boolean conversion operator\n\n        /// \\return true when the reference is initialized to a non zero value\n        /// or uninitialized, otherwise false\n        operator bool() const {\n            return ! counter_.empty();\n        }\n\n        /// Reference pointer accessor\n\n        /// \\return The referenced pointer\n        /// \\throw MadnessException If the pointer is not local\n        pointerT get() const {\n            MADNESS_ASSERT(counter_.is_local());\n            return pointer_;\n        }\n\n        /// Reference shared_ptr accessor\n\n        /// \\return A const reference to the references shared pointer\n        /// \\throw MadnessException If the pointer is not local\n        const std::shared_ptr<T>& get_shared() const {\n            MADNESS_ASSERT(counter_.is_local());\n            return counter_.get_shared<T>();\n        }\n\n        /// Reference object accessor\n\n        /// \\return A reference to the referenced object\n        /// \\throw MadnessException If the pointer is uninitialized\n        /// \\throw MadnessException If the pointer is not local\n        referenceT operator*() const {\n            MADNESS_ASSERT(pointer_ != nullptr);\n            MADNESS_ASSERT(counter_.is_local());\n            return *pointer_;\n        }\n\n        /// Reference object pointer accessor\n\n        /// \\return A pointer to the referenced object\n        /// \\throw MadnessException If the pointer is uninitialized\n        /// \\throw MadnessException If the pointer is not local\n        pointerT operator->() const {\n            MADNESS_ASSERT(pointer_ != nullptr);\n            MADNESS_ASSERT(counter_.is_local());\n            return pointer_;\n        }\n\n        /// Reference count accessor\n\n        /// \\return The total number of local and remote references.\n        /// \\throw nothing\n        long use_count() const { return counter_.use_count(); }\n\n        /// Get uniqueness\n\n        /// \\return True when the use count is equal to exactly 1.\n        /// \\throw nothing\n        bool unique() const { return counter_.unique(); }\n\n        /// Swap references\n\n        /// Exchange the value of this \\c RemoteReference with \\c other\n        /// \\c RemoteReference\n        /// \\tparam U The type of the other remote reference.\n        /// \\note U* must be implicitly convertible to T*.\n        template <typename U>\n        void swap(RemoteReference<U>& other) {\n            std::swap(pointer_, other.pointer_);\n            madness::detail::swap(counter_, other.counter_);\n        }\n\n        /// Locally owned reference\n\n        /// \\return true if owner is equal to the current rank of the owning\n        /// world, otherwise false\n        /// \\throw nothing\n        inline bool is_local() const { return counter_.is_local(); }\n\n        /// Reference owner accessor\n\n        /// \\return rank of owning process, or -1 if not initialized\n        /// \\throw nothing\n        inline ProcessID owner() const { return counter_.owner(); }\n\n        /// Owning world accessor\n\n        /// \\return A reference to the world that owns the pointer\n        /// \\throw MadnessException If the reference is uninitialized\n        World& get_world() const { return counter_.get_world(); }\n\n        /// Serialize the remote reference\n\n        /// \\tparam Archive The serialization archive type\n        /// \\param ar The serialization archive object.\n        template <typename Archive>\n        void serialize(const Archive& ar) const {\n            // All of the interesting stuff happens in the counter serialization.\n            ar & archive::wrap_opaque(pointer_) & counter_;\n        }\n\n    public:\n\n        /// Add the remote reference to the given \\c std::ostream, \\c out.\n\n        /// \\param out The output stream to add \\c ref to.\n        /// \\param ref The remote reference to add to the out stream\n        friend std::ostream& operator<<(std::ostream& out, const RemoteReference<T>& ref) {\n            out << \"RemoteReference( pointer=\" << ref.pointer_ << \" counter=\" << ref.counter_ << \")\";\n            return out;\n        }\n    }; // class RemoteReference\n\n\n    /// Swap the two remote references\n\n    /// \\param l The left reference to be swapped with \\c r\n    /// \\param r The right reference to be swapped with \\c l\n    /// \\note T* must be implicitly convertible to U* and vis versa.\n    template <typename T, typename U>\n    void swap(RemoteReference<T>& l, RemoteReference<U>& r) {\n        l.swap(r);\n    }\n\n    namespace archive {\n\n        // This function is not allowed. Therefore it is not implemented so that\n        // a compiler error is generated it it is called. This still does not\n        // prevent remote references from being wrapped as part of another object.\n        template <typename T>\n        archive_array<unsigned char> wrap_opaque(const RemoteReference<T>& t);\n\n        // Remote counter serialization\n\n        template <typename Archive>\n        struct ArchiveLoadImpl<Archive, madness::detail::RemoteCounter > {\n            static inline void load(const Archive& ar, madness::detail::RemoteCounter& c) {\n                c.load_(ar);\n            }\n        };\n\n        template <typename Archive>\n        struct ArchiveStoreImpl<Archive, madness::detail::RemoteCounter > {\n            static inline void store(const Archive& ar, const madness::detail::RemoteCounter& c) {\n                c.store_(ar);\n            }\n        };\n\n    } // namespace archive\n} // namespace madness\n\n#endif // MADNESS_WORLD_WORLDREF_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldrmi.cc",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n\n  $Id$\n*/\n\n#include <madness/world/worldrmi.h>\n#include <madness/world/posixmem.h>\n#include <madness/world/timers.h>\n#include <madness/world/units.h>\n#include <iostream>\n#include <algorithm>\n#include <utility>\n#include <sstream>\n#include <list>\n#include <memory>\n#include <atomic>\n#include <madness/world/safempi.h>\n#include <madness/world/archive.h>\n\nnamespace madness {\n\n    std::unique_ptr<RMI::RmiTask> RMI::task_ptr = nullptr;\n    RMIStats RMI::stats;\n    bool RMI::debugging = false;\n    std::list< std::unique_ptr<RMISendReq> > RMI::send_req;\n\n    bool& RMI::is_server_thread_accessor() {\n      static thread_local bool is_server_thread = false;\n      return is_server_thread;\n    }\n\n\n    void RMI::RmiTask::process_some() {\n\n        const bool print_debug_info = RMI::debugging;\n\n        if (print_debug_info && n_in_q)\n            print_error(rank, \":RMI: about to call Testsome with \", n_in_q, \" messages in the queue\\n\");\n\n        // If MPI is not safe for simultaneous entry by multiple threads we\n        // cannot call Waitsome ... have to poll via Testsome\n\n        // Now that the server thread doing other stuff (including being\n        // responsible for its own outbound messages) we have to poll.\n        int narrived = 0, iterations = 0;\n\n        MutexWaiter waiter;\n        while((narrived == 0) && (iterations < 1000)) {\n          narrived = SafeMPI::Request::Testsome(maxq_, recv_req.get(), ind.get(), status.get());\n          if (narrived) break;\n          ++iterations;\n          clear_send_req();\n          myusleep(RMI::testsome_backoff_us);\n        }\n\n#ifndef HAVE_CRAYXT\n        waiter.reset();\n#endif\n\n        if (print_debug_info && narrived > 0)\n            print_error(rank, \":RMI: \", narrived, \" messages just arrived\\n\");\n\n        if (narrived) {\n            for (int m=0; m<narrived; ++m) {\n                const int src = status[m].Get_source();\n                const size_t len = status[m].Get_count(MPI_BYTE);\n                const int i = ind[m];\n\n                ++(RMI::stats.nmsg_recv);\n                RMI::stats.nbyte_recv += len;\n\n                const header* h = (const header*)(recv_buf[i]);\n                rmi_handlerT func = archive::to_abs_fn_ptr<rmi_handlerT>(h->func);\n                const attrT attr = h->attr;\n                const counterT count = (attr>>16); //&&0xffff;\n\n                if (!is_ordered(attr) || count==recv_counters[src]) {\n                    // Unordered and in order messages should be digested as soon as possible.\n                    if (print_debug_info)\n                      print_error(rank, \":RMI: invoking from=\", src,\n                                  \" nbyte=\", len, \" func=\", func,\n                                  \" ordered=\", is_ordered(attr),\n                                  \" count=\", count, \"\\n\");\n\n                    if (is_ordered(attr)) ++(recv_counters[src]);\n                    func(recv_buf[i], len);\n                    post_recv_buf(i);\n                }\n                else {\n                  if (print_debug_info)\n                    print_error(rank, \":RMI: enqueing from=\", src,\n                                \" nbyte=\", len, \" func=\", func,\n                                \" ordered=\", is_ordered(attr),\n                                \" fromcount=\", count,\n                                \" herecount=\", int(recv_counters[src]), \"\\n\");\n                  // Shove it in the queue\n                  const int n = n_in_q++;\n                  if (n >= (int)maxq_)\n                    MADNESS_EXCEPTION(\n                        \"RMI:server: overflowed out-of-order message q\\n\", n);\n                  q[n] = qmsg(len, func, i, src, attr, count);\n                }\n            }\n\n            // Only ordered messages can end up in the queue due to\n            // out-of-order receipt or order of recv buffer processing.\n\n            // Sort queued messages by source and ascending (modulo overflow) recv count\n            std::sort(q.get(),q.get()+n_in_q);\n\n            // Loop thru messages ... since we have sorted only one pass\n            // is necessary and if we cannot process a message we\n            // save it at the beginning of the queue\n            int nleftover = 0;\n            for (int m=0; m<n_in_q; ++m) {\n                const int src = q[m].src;\n                if (q[m].count == recv_counters[src]) {\n                  if (print_debug_info)\n                    print_error(rank, \":RMI: queue invoking from=\", src,\n                                \" nbyte=\", q[m].len, \" func=\", q[m].func,\n                                \" ordered=\", is_ordered(q[m].attr),\n                                \" count=\", q[m].count, \"\\n\");\n\n                  ++(recv_counters[src]);\n                  q[m].func(recv_buf[q[m].i], q[m].len);\n                  post_recv_buf(q[m].i);\n                }\n                else {\n                    q[nleftover++] = q[m];\n                    if (print_debug_info)\n                      print_error(rank,\n                                  \":RMI: queue pending out of order from=\", src,\n                                  \" nbyte=\", q[m].len, \" func=\", q[m].func,\n                                  \" ordered=\", is_ordered(q[m].attr),\n                                  \" count=\", q[m].count, \"\\n\");\n                }\n            }\n            n_in_q = nleftover;\n\n            post_pending_huge_msg();\n\n#if !(defined(HAVE_INTEL_TBB) || defined(HAVE_PARSEC))\n            // Since this thread never waits or tries to run a task we\n            // must manually flush the thread-local prebuffer that\n            // aggregates task submission.\n            ThreadPool::instance()->flush_prebuf();\n#endif\n            clear_send_req();\n        }\n    }\n\n    void RMI::RmiTask::post_pending_huge_msg() {\n        if (recv_buf[nrecv_]) return;      // Message already pending\n        if (!hugeq.empty()) {\n            const auto& hugemsg = hugeq.front();\n            const int src = std::get<0>(hugemsg);\n            const size_t nbyte = std::get<1>(hugemsg);\n            const int tag = std::get<2>(hugemsg);\n            hugeq.pop_front();\n            if (posix_memalign(&recv_buf[nrecv_], ALIGNMENT, nbyte))\n                MADNESS_EXCEPTION(\"RMI: failed allocating huge message\", 1);\n            recv_req[nrecv_] = comm.Irecv(recv_buf[nrecv_], nbyte, MPI_BYTE, src, tag);\n            int nada=0;\n            // make unique tags to ensure that ack msgs do not collide with normal recv msgs\n#ifdef MADNESS_USE_BSEND_ACKS\n            comm.Bsend(&nada, sizeof(nada), MPI_BYTE, src, tag + unique_tag_period());\n#else\n            comm.Send(&nada, sizeof(nada), MPI_BYTE, src, tag + unique_tag_period());\n#endif // MADNESS_USE_BSEND_ACKS\n        }\n    }\n\n    void RMI::RmiTask::post_recv_buf(int i) {\n        if (i < (int)nrecv_) {\n            recv_req[i] = comm.Irecv(recv_buf[i], max_msg_len_, MPI_BYTE, MPI_ANY_SOURCE, SafeMPI::RMI_TAG);\n        }\n        else if (i == (int)nrecv_) {\n            free(recv_buf[i]);\n            recv_buf[i] = 0;\n            post_pending_huge_msg();\n        }\n        else {\n            MADNESS_EXCEPTION(\"RMI::post_recv_buf: confusion\", i);\n        }\n    }\n\n    RMI::RmiTask::~RmiTask() {\n        //         if (!SafeMPI::Is_finalized()) {\n        //             for (int i=0; i<nrecv_; ++i) {\n        //                 if (!recv_req[i].Test())\n        //                     recv_req[i].Cancel();\n        //             }\n        //         }\n        //for (int i=0; i<nrecv_; ++i) free(recv_buf[i]);\n    }\n\n    static std::atomic<bool> rmi_task_is_running = false;\n\n    RMI::RmiTask::RmiTask(const SafeMPI::Intracomm& _comm)\n            : comm(_comm.Clone())\n            , nproc(comm.Get_size())\n            , rank(comm.Get_rank())\n            , finished(false)\n            , send_counters(new counterT[nproc])\n            , recv_counters(new counterT[nproc])\n            , max_msg_len_(DEFAULT_MAX_MSG_LEN)\n            , nrecv_(DEFAULT_NRECV)\n            , maxq_(DEFAULT_NRECV + 1)\n            , recv_buf()\n            , recv_req()\n            , status()\n            , ind()\n            , q()\n            , n_in_q(0)\n    {\n        // Get the maximum buffer size from the MAD_BUFFER_SIZE environment\n        // variable.\n        const char* mad_buffer_size = getenv(\"MAD_BUFFER_SIZE\");\n        if(mad_buffer_size) {\n            // Convert the string into bytes\n            max_msg_len_ = cstr_to_memory_size(mad_buffer_size);\n            // Check that the size of the receive buffers is reasonable.\n            if(max_msg_len_ < 1024) {\n                max_msg_len_ = DEFAULT_MAX_MSG_LEN; // = 3*512*1024\n                print_error(\n                    \"!!! WARNING: MAD_BUFFER_SIZE must be at least 1024 \"\n                    \"bytes.\\n\",\n                    \"!!! WARNING: Increasing MAD_BUFFER_SIZE to the default \"\n                    \"size, \",\n                    max_msg_len_, \" bytes.\\n\");\n            }\n            // Check that the buffer has the correct alignment\n            const std::size_t unaligned = max_msg_len_ % ALIGNMENT;\n            if(unaligned != 0)\n                max_msg_len_ += ALIGNMENT - unaligned;\n        }\n\n        // Get the number of receive buffers from the MAD_RECV_BUFFERS\n        // environment variable.\n        const char* mad_recv_buffs = getenv(\"MAD_RECV_BUFFERS\");\n        if(mad_recv_buffs) {\n            std::stringstream ss(mad_recv_buffs);\n            ss >> nrecv_;\n            // Check that the number of receive buffers is reasonable.\n            if(nrecv_ < 32) {\n                nrecv_ = DEFAULT_NRECV;\n                print_error(\n                    \"!!! WARNING: MAD_RECV_BUFFERS must be at least 32.\\n\",\n                    \"!!! WARNING: Increasing MAD_RECV_BUFFERS to \", nrecv_,\n                    \".\\n\");\n            }\n            maxq_ = nrecv_ + 1;\n        }\n\n        // Get environment variable controlling use of synchronous send (MAD_NSSEND)\n        // negative=sends synchronous message every MAD_RECV_BUFFER sends (default)\n        //        0=never send synchronous message\n        //      n>0=sends synchronous message every n sends (n=1 always uses ssend)\n        nssend_ = nrecv_;\n        const char* mad_nssend = getenv(\"MAD_NSSEND\");\n        if (mad_nssend) {\n            std::stringstream ss(mad_nssend);\n            ss >> nssend_;\n            if (nssend_ < 0) {\n                nssend_ = nrecv_;\n            }\n        }\n\n        // Allocate memory for receive buffer and requests\n        recv_buf.reset(new void*[maxq_]);\n        recv_req.reset(new Request[maxq_]);\n\n        // Initialize the send/recv counts\n        std::fill_n(send_counters.get(), nproc, 0);\n        std::fill_n(recv_counters.get(), nproc, 0);\n\n        // Allocate buffers for message tracking\n        status.reset(new SafeMPI::Status[maxq_]);\n        ind.reset(new int[maxq_]);\n        q.reset(new qmsg[maxq_]);\n        MADNESS_ASSERT(maxq_ <= 1<<14);  // 16 bit task counter is sufficient to ensure that up to 2^14 tasks can be\n                                         // pending per rank .. although maxq_ controls the TOTAL queue size, do this\n                                         // purely as a reminder\n\n        // Allocate receive buffers\n        if(nproc > 1) {\n            for(int i = 0; i < (int)nrecv_; ++i) {\n                if(posix_memalign(&recv_buf[i], ALIGNMENT, max_msg_len_))\n                    MADNESS_EXCEPTION(\"RMI:initialize:failed allocating aligned recv buffer\", 1);\n                post_recv_buf(i);\n            }\n            recv_buf[nrecv_] = 0;\n        }\n    }\n\n\n    void RMI::RmiTask::huge_msg_handler(void *buf, size_t /*nbytein*/) {\n        const size_t* info = (size_t *)(buf);\n        int nword = HEADER_LEN/sizeof(size_t);\n        const int src = info[nword];\n        const size_t nbyte = info[nword+1];\n        const int tag = info[nword+2];\n\n        // extra dose of paranoia: assert that we never process so many huge messages\n        // that the tag wraparound somewhere becomes possible ...\n        // the worst case is where only one node sends huge messages to every node in the communicator\n        // AND it has enough threads to use up all tags\n        // NB list::size() is O(1) in c++11, but O(N) in older libstdc++\n        bool OK = (ThreadPool::size() < size_t(RMI::RmiTask::unique_tag_period()) ||\n                   RMI::task_ptr->hugeq.size() <\n                   std::size_t(RMI::RmiTask::unique_tag_period() / RMI::task_ptr->comm.Get_size()));\n        if (!OK) MADNESS_EXCEPTION(\"huge_msg_handler paranoid test failing\", RMI::RmiTask::unique_tag_period());\n        RMI::task_ptr->hugeq.push_back(std::make_tuple(src, nbyte, tag));\n        RMI::task_ptr->post_pending_huge_msg();\n    }\n\n    namespace detail {\n    void compare_fn_addresses(void* addresses_in, void* addresses_inout,\n                              int* len, MPI_Datatype* type) {\n      MADNESS_ASSERT(*type == MPI_LONG);\n      long* in = static_cast<long*>(addresses_in);\n      long* inout = static_cast<long*>(addresses_inout);\n      int n = *len;\n      // produce zero if addresses do not match; zero address trumps everything else\n      for(int i=0; i!=n; ++i) {\n        if (in[i] == 0 || inout[i] == 0 || in[i] != inout[i]) inout[i] = 0;\n      }\n    }\n    }  // namespace detail\n\n    void RMI::assert_aslr_off(const SafeMPI::Intracomm& comm) {\n      static_assert(sizeof(long) >= sizeof(std::ptrdiff_t), \"std::ptrdiff_t must not exceed the width of long\");\n      long my_address = reinterpret_cast<long>(&assert_aslr_off);\n      MPI_Op compare_fn_addresses_op = SafeMPI::Op_create(&detail::compare_fn_addresses, 1);\n      long zero_if_addresses_differ;\n      comm.Reduce(&my_address, &zero_if_addresses_differ, 1, MPI_LONG, compare_fn_addresses_op, 0);\n      if (comm.Get_rank() == 0) {\n        if (zero_if_addresses_differ == 0) {\n          MADNESS_EXCEPTION(\"Address Space Layout Randomization (ASLR) detected and MADNESS could not work around it, possibly due to the use of Microsoft C++ ABI by this platform (please contact the developers to request such support); please turn off ASLR, disable by providing appropriate linker flags (see MADNESS_DISABLEPIE_LINKER_FLAG), or compile your application statically\",0);\n        }\n        MADNESS_ASSERT(zero_if_addresses_differ == my_address);\n      }\n      SafeMPI::Op_free(compare_fn_addresses_op);\n    }\n\n    void RMI::begin(const SafeMPI::Intracomm& comm) {\n\n      // if MADNESS was told to assume ASLR is disabled *completely*, check ... RMI can work with ALSR on, but that requires loading all RMI-using code as one giant shared library\n#ifdef MADNESS_ASSUMES_ASLR_DISABLED\n            // complain loudly and throw if ASLR is on ... RMI requires ASLR to be off\n            assert_aslr_off(comm);\n#endif\n\n            testsome_backoff_us = 5;\n            const char* buf = getenv(\"MAD_BACKOFF_US\");\n            if (buf) {\n                std::stringstream ss(buf);\n                ss >> testsome_backoff_us;\n                if (testsome_backoff_us < 0) testsome_backoff_us = 0;\n                if (testsome_backoff_us > 100) testsome_backoff_us = 100;\n            }\n\n            MADNESS_ASSERT(task_ptr == nullptr);\n            task_ptr.reset(new RmiTask(comm));\n\n#if HAVE_INTEL_TBB\n            ThreadPool::tbb_arena->enqueue([]{\n                task_ptr->run();\n            });\n\n            //TODO: is it needed ?\n            task_ptr->comm.Barrier();\n\n            while (!rmi_task_is_running) {\n              myusleep(100000);\n            }\n#else\n            task_ptr->start();\n#endif // HAVE_INTEL_TBB\n        }\n\n\n    void RMI::RmiTask::set_rmi_task_is_running(bool flag) {\n        rmi_task_is_running = flag; // Yipeeeeeeeeeeeeeeeeeeeeee ... fighting TBB laziness\n    }\n\n    RMI::Request\n    RMI::RmiTask::RmiTask::isend(const void* buf, size_t nbyte, ProcessID dest, rmi_handlerT func, attrT attr) {\n\n        MADNESS_ASSERT(nbyte <= std::numeric_limits<int>::max());\n\n        int tag = SafeMPI::RMI_TAG;\n        static std::size_t numsent = 0; // for tracking synchronous sends\n\n        if (nbyte > max_msg_len_) {\n            // Huge message protocol ... send message to dest indicating size and origin of huge message.\n            // Remote end posts a buffer then acks the request.  This end can then send.\n            const int nword = HEADER_LEN/sizeof(size_t);\n            size_t info[nword+3];\n            info[nword  ] = rank;\n            info[nword+1] = nbyte;\n            tag = unique_tag();\n            info[nword+2] = tag;\n\n            int ack;\n            // make unique tags to ensure that ack msgs do not collide with normal recv msgs\n            Request req_ack = comm.Irecv(&ack, sizeof(ack), MPI_BYTE, dest, tag + unique_tag_period());\n            Request req_send = isend(info, sizeof(info), dest, RMI::RmiTask::huge_msg_handler, ATTR_UNORDERED);\n\n            MutexWaiter waiter;\n            while (!req_send.Test()) waiter.wait();\n            waiter.reset();\n            while (!req_ack.Test()) waiter.wait();\n        }\n        else if (nbyte < HEADER_LEN) {\n            MADNESS_EXCEPTION(\"RMI::isend --- your buffer is too small to hold the header\", static_cast<int>(nbyte));\n        }\n\n        if (RMI::debugging)\n          print_error(rank, \":RMI: sending buf=\", buf, \" nbyte=\", nbyte,\n                      \" dest=\", dest, \" func=\", func,\n                      \" ordered=\", is_ordered(attr),\n                      \" count=\", int(send_counters[dest]), \"\\n\");\n\n        // Since most uses are ordered and we need the mutex to accumulate stats\n        // we presently always get the lock\n        lock();\n\n        // If ordering need the mutex to enclose sending the message\n        // otherwise there is a livelock scenario due to a starved thread\n        // holding an early counter.\n        if (is_ordered(attr)) {\n            //lock();\n            attr |= ((send_counters[dest]++)<<16);\n        }\n\n        header* h = (header*)(buf);\n        h->func = archive::to_rel_fn_ptr(func);\n        h->attr = attr;\n\n        ++(RMI::stats.nmsg_sent);\n        RMI::stats.nbyte_sent += nbyte;\n\n\n        numsent++;\n        Request result;\n        if (nssend_ && numsent==std::size_t(nssend_)) {\n            result = comm.Issend(buf, nbyte, MPI_BYTE, dest, tag);\n            numsent %= nssend_;\n        }\n        else {\n            result = comm.Isend(buf, nbyte, MPI_BYTE, dest, tag);\n        }\n\n        unlock();\n\n        return result;\n    }\n\n    int RMI::RmiTask::unique_tag() const {\n        constexpr int first_tag = 4096;\n        static int tag = first_tag;\n        /// should be able to do this with atomics\n        lock();\n        tag = (tag == first_tag+unique_tag_period()-1) ? first_tag : tag + 1;\n        const int result = tag;\n        unlock();\n        return result;\n    }\n\n  int RMI::testsome_backoff_us = 2;\n\n} // namespace madness\n"
  },
  {
    "path": "src/madness/world/worldrmi.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n#ifndef MADNESS_WORLD_WORLDRMI_H__INCLUDED\n#define MADNESS_WORLD_WORLDRMI_H__INCLUDED\n\n#include <madness/world/safempi.h>\n#include <madness/world/thread.h>\n#include <madness/world/worldtypes.h>\n#include <madness/world/archive.h>\n#include <sstream>\n#include <utility>\n#include <list>\n#include <memory>\n#include <tuple>\n#include <pthread.h>\n#include <madness/world/print.h>\n\n/*\n  There is just one server thread and it is the only one\n  messing with the recv buffers, so there is no need for\n  mutex on recv related data.\n\n  Multiple threads (including the server) may send hence\n  we need to be careful about send-related data.\n\n  When MPI is initialized we need to use init_thread with\n  multiple required.\n\n  This RMI service operates only in (a clone of) COMM_WORLD.  It easy enough\n  to extend to other communicators but the point is to have\n  only one server thread for all possible uses.  You just\n  have to translate rank_in_comm into rank_in_world by\n  getting the groups from both communicators using\n  MPI_Comm_group and then creating a map from ranks in\n  comm to ranks in world using MPI_Group_translate_ranks.\n\n  The class is a singleton ... i.e., there is only one instance of it\n  that is made the first time that you call RMI::instance().\n\n  Handler routines should have this type\n\n  typedef void (*rmi_handlerT)(void* buf, size_t nbyte);\n\n  There are few user accessible routines.\n\n  RMI::Request RMI::isend(const void* buf, size_t nbyte, int dest,\n                          rmi_handlerT func, unsigned int attr=0)\n  - to send an asynchronous message\n  - RMI::Request has the same interface as SafeMPI::Request\n  (right now it is a SafeMPI::Request but this is not guaranteed)\n\n  void RMI::begin()\n  - to start the server thread\n\n  void RMI::end()\n  - to terminate the server thread\n\n  bool RMI::get_debug()\n  - to get the debug flag\n\n  void RMI::set_debug(bool)\n  - to set the debug flag\n\n*/\n\n/**\n \\file worldrmi.h\n \\brief Lowest level API for sending active messages --- you should probably be looking at worldam.h instead.\n \\addtogroup parallel_runtime\n */\n\nnamespace madness {\n\n    /// This is the generic low-level interface for a message handler\n    typedef void (*rmi_handlerT)(void* buf, size_t nbyte);\n    typedef std::ptrdiff_t rel_fn_ptr_t;\n\n    struct qmsg {\n        typedef uint16_t counterT;  //!< counter for ordered messages\n        typedef uint32_t attrT;  //!< attributes of the message; high 16 bits are the counter\n        size_t len;\n        rmi_handlerT func;\n        int i;               // buffer index\n        ProcessID src;\n        attrT attr;\n        counterT count;\n\n        qmsg(size_t len, rmi_handlerT func, int i, int src, attrT attr, counterT count)\n            : len(len), func(func), i(i), src(src), attr(attr), count(count) {}\n\n        // N.B. since msg counters in same batch might wrap around 0, need to sort buckets defined by the 2 highest\n        // bits ... basically we want 11xxx < 00xxx < 01xxx < 10xxx < 11xxx ... assume we only have messages from\n        // at most 2 adjacent buckets, thus only when comparing counters from buckets 00 and 11 reverse the order\n        // P.S. we thus assume we won't have to deal with msg sequences > 2^14 (per rank)\n        friend inline bool operator<(const qmsg& a, const qmsg& b) {\n            const auto a_src = a.src;\n            const auto b_src = b.src;\n            if (a_src == b_src) {\n              const auto a_count_bk = a.count >> 14;\n              const auto b_count_bk = b.count >> 14;\n              if (a_count_bk == 0b00 && b_count_bk == 0b11) {\n                return false;\n              } else if (a_count_bk == 0b11 && b_count_bk == 0b00) {\n                return true;\n              } else {\n                return a.count < b.count;\n              }\n            } else {\n              return a_src < b_src;\n            }\n          }\n\n        qmsg() {}\n    }; // struct qmsg\n\n\n    // Holds message passing statistics\n    struct RMIStats {\n        uint64_t nmsg_sent;\n        uint64_t nbyte_sent;\n        uint64_t nmsg_recv;\n        uint64_t nbyte_recv;\n        uint64_t max_serv_send_q;\n\n        RMIStats()\n            : nmsg_sent(0), nbyte_sent(0), nmsg_recv(0), nbyte_recv(0), max_serv_send_q(0) {}\n    };\n\n    /// This for RMI server thread to manage lifetime of WorldAM messages that it is sending\n    struct RMISendReq {\n        virtual bool TestAndFree() = 0;\n        virtual ~RMISendReq() {} // ESSENTIAL!!\n    };\n\n    /// This class implements the communications server thread and provides the only send interface\n    class RMI  {\n        typedef qmsg::counterT counterT;\n        typedef qmsg::attrT attrT;\n\n        /// @return reference to the boolean variable indicating whether this thread is the server thread\n        static bool& is_server_thread_accessor();\n\n    public:\n\n        typedef SafeMPI::Request Request;\n\n        // Choose header length to hold at least sizeof(header) and\n        // also to ensure good alignment of the user payload.\n        static const size_t ALIGNMENT = 64;\n        static const size_t HEADER_LEN = ALIGNMENT;\n        static const attrT ATTR_UNORDERED=0x0;\n        static const attrT ATTR_ORDERED=0x1;\n\n        static int testsome_backoff_us;\n\n        static void set_this_thread_is_server(bool flag = true) { is_server_thread_accessor() = flag;}\n        static bool get_this_thread_is_server() {return is_server_thread_accessor();}\n\n        static std::list< std::unique_ptr<RMISendReq> > send_req; // List of outstanding world active messages sent by the server\n\n    private:\n\n        static void clear_send_req() {\n            //std::cout << \"clearing server messages \" << pthread_self() << std::endl;\n            stats.max_serv_send_q = std::max(stats.max_serv_send_q,uint64_t(send_req.size()));\n            auto it=send_req.begin();\n            while (it != send_req.end()) {\n                if ((*it)->TestAndFree()) \n                    it = send_req.erase(it);\n                else \n                    ++it;\n            }\n        }\n\n        class RmiTask\n#if HAVE_INTEL_TBB\n                : private madness::Mutex\n#else\n                : public madness::ThreadBase, private madness::Mutex\n#endif // HAVE_INTEL_TBB\n        {\n\n        public:\n\n            struct header {\n                rel_fn_ptr_t func;\n                attrT attr;\n            }; // struct header\n\n            /// q of huge messages, each msg = {source,nbytes,tag}\n            std::list< std::tuple<int,size_t,int> > hugeq;\n\n            SafeMPI::Intracomm comm;\n            const int nproc;            // No. of processes in comm world\n            const ProcessID rank;       // Rank of this process\n            std::atomic<bool> finished;     // True if finished ... atomic seems preferable to volatile\n            std::unique_ptr<counterT[]> send_counters; // used to be volatile but no need\n            std::unique_ptr<counterT[]> recv_counters;\n            std::size_t max_msg_len_;\n            std::size_t nrecv_;\n            long nssend_;\n            std::size_t maxq_;\n            std::unique_ptr<void*[]> recv_buf; // Will be at least ALIGNMENT aligned ... +1 for huge messages\n            std::unique_ptr<SafeMPI::Request[]> recv_req;\n\n            std::unique_ptr<SafeMPI::Status[]> status;\n            std::unique_ptr<int[]> ind;\n            std::unique_ptr<qmsg[]> q;\n            int n_in_q;\n\n            static inline bool is_ordered(attrT attr) { return attr & ATTR_ORDERED; }\n\n            void process_some();\n\n            RmiTask(const SafeMPI::Intracomm& comm = SafeMPI::COMM_WORLD);\n            virtual ~RmiTask();\n\n            static void set_rmi_task_is_running(bool flag = true);\n\n#if HAVE_INTEL_TBB\n            void run() {\n  \t        ::madness::binder.bind();\n                set_rmi_task_is_running(true);\n                RMI::set_this_thread_is_server(true);\n\n                while (! finished) process_some();\n\n                RMI::set_this_thread_is_server(false);\n                set_rmi_task_is_running(false);\n\n                finished = false;  // to ensure that RmiTask::exit() that\n                                   // triggered the exit proceeds to completion\n            }\n#else\n            void run() {\n  \t        ::madness::binder.bind();\n                RMI::set_this_thread_is_server(true);\n                try {\n                    while (! finished) process_some();\n                    finished = false;\n                } catch(...) {\n                    delete this;\n                    RMI::set_this_thread_is_server(false);\n                    throw;\n                }\n                RMI::set_this_thread_is_server(false);\n            }\n#endif // HAVE_INTEL_TBB\n\n            void exit() {\n                if (debugging)\n                  print_error(rank, \":RMI: sending exit request to server thread\\n\");\n\n                // Set finished flag\n                finished = true;\n                while(finished)\n                    myusleep(1000);\n            }\n\n            static void huge_msg_handler(void *buf, size_t nbytein);\n\n            Request isend(const void* buf, size_t nbyte, ProcessID dest, rmi_handlerT func, attrT attr);\n\n            void post_pending_huge_msg();\n\n            void post_recv_buf(int i);\n\n        private:\n\n            /// thread-safely round-robins through tags in [first_tag, first_tag+period) range\n            /// @returns new tag to be used in messaging\n            int unique_tag() const;\n            /// the period of tags returned by unique_tag()\n            /// @warning this bounds how many huge messages each RmiTask will be able to process\n            static constexpr int unique_tag_period() { return 2048; }\n\n        }; // class RmiTask\n\n\n        static std::unique_ptr<RmiTask> task_ptr;    // Pointer to the singleton instance\n        static RMIStats stats;\n        static bool debugging;    // True if debugging ... used to be volatile but no need\n\n        static const size_t DEFAULT_MAX_MSG_LEN = 3*512*1024;  //!< the default size of recv buffers, in bytes; the actual size can be configured by the user via envvar MAD_BUFFER_SIZE\n        static const int DEFAULT_NRECV = 128;  //!< the default # of recv buffers; the actual number can be configured by the user via envvar MAD_RECV_BUFFERS\n\n        // Not allowed\n        RMI(const RMI&);\n        RMI& operator=(const RMI&);\n\n    public:\n\n        /// Returns the size of recv buffers, in bytes\n\n        /// @return The size of recv buffers, in bytes\n        /// @note The default value is given by RMI::DEFAULT_MAX_MSG_LEN, can be overridden at runtime by the user via environment variable MAD_BUFFER_SIZE.\n        /// @warning Cannot be smaller than 1024 bytes.\n        static std::size_t max_msg_len() {\n            MADNESS_ASSERT(task_ptr);\n            return task_ptr->max_msg_len_;\n        }\n        static std::size_t maxq() {\n            MADNESS_ASSERT(task_ptr);\n            return task_ptr->maxq_;\n        }\n\n        /// Returns the number of recv buffers\n\n        /// @return The number of recv buffers\n        /// @note The default value is given by RMI::DEFAULT_NRECV, can be overridden at runtime by the user via environment variable MAD_RECV_BUFFERS\n        /// @warning Cannot be smaller than 32.\n        static std::size_t nrecv() {\n            MADNESS_ASSERT(task_ptr);\n            return task_ptr->nrecv_;\n        }\n\n        /// Send a remote method invocation (again you should probably be looking at worldam.h instead)\n\n        /// @param[in] buf Pointer to the data buffer (do not modify until send is completed)\n        /// @param[in] nbyte Size of the data in bytes\n        /// @param[in] dest Process to receive the message\n        /// @param[in] func The function to handle the message on the remote end\n        /// @param[in] attr Attributes of the message (ATTR_UNORDERED or ATTR_ORDERED)\n        /// @return The status as an RMI::Request that presently is a SafeMPI::Request\n        static Request\n        isend(const void* buf, size_t nbyte, ProcessID dest, rmi_handlerT func, unsigned int attr=ATTR_UNORDERED) {\n            if(!task_ptr) {\n              print_error(\n                  \"!! MADNESS RMI error: Attempting to send a message when the RMI thread is not running\\n\"\n                  \"!! MADNESS RMI error: This typically occurs when an active message is sent or a remote task is spawned after calling madness::finalize()\\n\");\n              MADNESS_EXCEPTION(\"!! MADNESS error: The RMI thread is not running\", (task_ptr != nullptr));\n            }\n            return task_ptr->isend(buf, nbyte, dest, func, attr);\n        }\n\n        /// will complain to std::cerr and throw if ASLR is on by making\n        /// sure that address of this function matches across @p comm\n        /// @param[in] comm the communicator\n        static void assert_aslr_off(const SafeMPI::Intracomm& comm = SafeMPI::COMM_WORLD);\n\n        static void begin(const SafeMPI::Intracomm& comm = SafeMPI::COMM_WORLD);\n\n        static void end() {\n            if(task_ptr) {\n                task_ptr->exit();\n                //exit insures that RMI task is completed, therefore it is OK to delete it\n                task_ptr = nullptr;\n            }\n        }\n\n        static void set_debug(bool status) { debugging = status; }\n\n        static bool get_debug() { return debugging; }\n\n        static const RMIStats& get_stats() { return stats; }\n    }; // class RMI\n\n} // namespace madness\n\n#endif // MADNESS_WORLD_WORLDRMI_H__INCLUDED\n"
  },
  {
    "path": "src/madness/world/worldtypes.h",
    "content": "/*\n  This file is part of MADNESS.\n  \n  Copyright (C) 2007,2010 Oak Ridge National Laboratory\n  \n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n  \n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n  \n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n  \n  For more information please contact:\n  \n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n  \n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/** \n \\file worldtypes.h\n \\brief Defines types used by the parallel runtime.\n \\ingroup parallel_runtime\n*/\n\n#ifndef MADNESS_WORLD_WORLDTYPES_H__INCLUDED\n#define MADNESS_WORLD_WORLDTYPES_H__INCLUDED\n\n#include <stdint.h>\n\ntypedef int ProcessID; ///< Used to clearly identify process number/rank.\ntypedef int Tag;       ///< Used to clearly identify message tag/type.\n\n\n#endif // MADNESS_WORLD_WORLDTYPES_H__INCLUDED\n"
  },
  {
    "path": "src/madness.h",
    "content": "/*\n  This file is part of MADNESS.\n\n  Copyright (C) 2014 Virgina Tech\n\n  This program is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 2 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program; if not, write to the Free Software\n  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n  For more information please contact:\n\n  Robert J. Harrison\n  Oak Ridge National Laboratory\n  One Bethel Valley Road\n  P.O. Box 2008, MS-6367\n\n  email: harrisonrj@ornl.gov\n  tel:   865-241-3937\n  fax:   865-572-0680\n*/\n\n/**\n \\file madness.h\n \\brief General header file for using MADNESS.\n \\ingroup applications\n*/\n\n#ifndef MADNESS_H__INCLUDED\n#define MADNESS_H__INCLUDED\n\n#include <madness/mra/mra.h>\n\n// Documentation for MADNESS namespaces.\n\n/// Namespace for all elements and tools of MADNESS.\nnamespace madness {\n\n    /// Namespace for I/O tools.\n    namespace archive { \n    }\n\n    /// \\todo Description needed\n    namespace cblas {\n    }\n\n    /// Namespace storing mathematical and physical constants.\n    namespace constants {\n    }\n\n    /// \\todo Description needed\n    namespace detail {\n    }\n\n    /// \\todo Description needed\n    namespace Hash_private {\n    }\n\n    /// Runtime details on the configuration and version of MADNESS.\n    namespace info {\n    }\n\n    /// \\todo Description needed\n    namespace profiling {\n    }\n\n    /// \\todo Description needed\n    namespace tr1 {\n    }\n\n} // namespace madness\n\n#endif // MADNESS_H__INCLUDED\n"
  },
  {
    "path": "src/pymadness/CMakeLists.txt",
    "content": "if(NOT MADNESS_HAS_PYTHON)\n  return()\nendif()\n\npybind11_add_module(_pymadness\n    src/_pymadness/module.cpp\n    src/_pymadness/bind_world.cpp\n    src/_pymadness/bind_defaults.cpp\n    src/_pymadness/bind_function.cpp\n    src/_pymadness/bind_operators.cpp\n    src/_pymadness/bind_tensor.cpp\n)\n\ntarget_link_libraries(_pymadness PRIVATE madness)\ntarget_compile_features(_pymadness PRIVATE cxx_std_17)\ntarget_include_directories(_pymadness PRIVATE\n    ${PROJECT_SOURCE_DIR}/src\n    ${PROJECT_BINARY_DIR}/src\n)\n\n# Install the compiled extension next to the Python package\ninstall(TARGETS _pymadness\n    LIBRARY DESTINATION \"${MADNESS_INSTALL_LIBDIR}/pymadness\"\n    COMPONENT python)\n\n# Install the pure-Python package\ninstall(DIRECTORY src/pymadness/\n    DESTINATION \"${MADNESS_INSTALL_LIBDIR}/pymadness\"\n    COMPONENT python\n    FILES_MATCHING PATTERN \"*.py\")\n\n# --- Tests ---\nif(BUILD_TESTING)\n  # Discover the module output directory so tests can import it\n  set(PYMADNESS_MODULE_DIR \"${CMAKE_CURRENT_BINARY_DIR}\")\n\n  # Copy pure-python package next to the .so for testing (re-copies on every build)\n  add_custom_command(TARGET _pymadness POST_BUILD\n      COMMAND ${CMAKE_COMMAND} -E copy_directory\n              \"${CMAKE_CURRENT_SOURCE_DIR}/src/pymadness\"\n              \"${CMAKE_CURRENT_BINARY_DIR}/pymadness\"\n      COMMENT \"Syncing pymadness Python package to build directory\")\n\n  add_test(NAME pymadness/test_basic\n      COMMAND ${Python3_EXECUTABLE} -m pytest -xvs\n              \"${CMAKE_CURRENT_SOURCE_DIR}/tests/\"\n      WORKING_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}\")\n  set_tests_properties(pymadness/test_basic PROPERTIES\n      ENVIRONMENT \"PYTHONPATH=${PYMADNESS_MODULE_DIR}:${PYMADNESS_MODULE_DIR}/pymadness\")\nendif()\n"
  },
  {
    "path": "src/pymadness/README.md",
    "content": "# pymadness\n\nPython bindings for [MADNESS](https://github.com/m-a-d-n-e-s-s/madness)\n(Multiresolution Adaptive Numerical Environment for Scientific Simulation).\n\n`pymadness` exposes `Function<T,NDIM>` (1D–6D), integral operators, and\nderivatives to Python, letting you solve PDEs and eigenvalue problems\ninteractively.\n\n## Installation\n\npymadness is built as part of MADNESS using CMake.\n\n### Prerequisites\n\n- C++17 compiler (GCC >= 7, Clang >= 5, Apple Clang >= 11)\n- CMake >= 3.16\n- Python >= 3.8 with development headers\n- NumPy\n- An MPI implementation (Open MPI, MPICH, etc.)\n- LAPACK/BLAS\n\nOptional:\n\n- **matplotlib** — for plotting helpers (`pip install matplotlib`)\n- **plotly** — for interactive 3D surface plots (`pip install plotly`)\n- **numba** — for zero-overhead `@cfunc` projection (`pip install numba`)\n\n### Build from source\n\n```bash\n# Clone MADNESS (if you haven't already)\ngit clone https://github.com/m-a-d-n-e-s-s/madness.git\ncd madness\n\n# Configure with Python bindings enabled\ncmake -B build -DENABLE_PYTHON=ON\n\n# Build the extension module\ncmake --build build --target _pymadness\n\n# Verify the build\ncd build/src/pymadness\nPYTHONPATH=. python -c \"import pymadness; print('pymadness OK')\"\n```\n\npybind11 is fetched automatically via CMake FetchContent if not already\ninstalled.\n\n### Making pymadness importable\n\nAfter building, the extension module (`_pymadness.*.so`) and the Python\npackage (`pymadness/`) live under `build/src/pymadness/`.  Choose one of:\n\n**Option A — Set `PYTHONPATH` (simplest for development)**\n\n```bash\nexport PYTHONPATH=/path/to/madness/build/src/pymadness:$PYTHONPATH\n```\n\nAdd this to your shell profile (`~/.bashrc`, `~/.zshrc`) to make it\npersistent across sessions.\n\n**Option B — Install into a prefix**\n\n```bash\ncmake --install build --component python --prefix /path/to/install\n# Then add /path/to/install/lib/pymadness to PYTHONPATH.\n```\n\n**Option C — Symlink into site-packages**\n\n```bash\nSITE=$(python -c \"import site; print(site.getsitepackages()[0])\")\nln -s /path/to/madness/build/src/pymadness/pymadness \"$SITE/pymadness\"\nln -s /path/to/madness/build/src/pymadness/_pymadness*.so \"$SITE/\"\n```\n\n### Running the tests\n\n```bash\ncd build/src/pymadness\nPYTHONPATH=. python -m pytest ../../src/pymadness/tests/ -v\n```\n\n## Quick start\n\n```python\nimport numpy as np\nimport pymadness\n\ndef run(world):\n    pymadness.FunctionDefaults3D.set_k(8)\n    pymadness.FunctionDefaults3D.set_thresh(1e-6)\n    pymadness.FunctionDefaults3D.set_cubic_cell(-10.0, 10.0)\n\n    # Vectorized callable: r has shape (npts, 3), return shape (npts,)\n    f = pymadness.function_3d(world,\n        lambda r: np.exp(-np.sum(r**2, axis=1)))\n\n    print(f\"norm     = {f.norm2():.6f}\")\n    print(f\"integral = {f.trace():.6f}\")\n\n    grad = pymadness.gradient(world, f)\n    print(f\"|grad f| components: {[g.norm2() for g in grad]}\")\n\ndef main():\n    with pymadness.World() as world:\n        run(world)\n\nmain()\n```\n\n## Vectorized callables (recommended)\n\nFor best performance, write callables that accept a batch of points as a\nNumPy array of shape `(npts, NDIM)` and return an array of shape `(npts,)`:\n\n```python\n# Scalar (simple, slower — falls back to per-point Python loop):\ndef f_scalar(r):             # r shape: (3,)\n    return np.exp(-np.dot(r, r))\n\n# Vectorized (fast — NumPy evaluates the whole batch in C):\ndef f_vectorized(r):         # r shape: (npts, 3)\n    return np.exp(-np.sum(r**2, axis=1))\n```\n\npymadness auto-detects which convention the callable uses on the first call.\nBoth are passed to `function_3d()` the same way — no flag is needed.\n\nA Gaussian centered at an offset `r0`:\n\n```python\nr0 = np.array([1.0, 2.0, 0.5])\nalpha = 3.0\n\ndef gaussian_offset(r):         # r shape: (npts, 3)\n    dr = r - r0                  # broadcasting: (npts, 3) - (3,)\n    return np.exp(-alpha * np.sum(dr**2, axis=1))\n\nf = pymadness.function_3d(world, gaussian_offset)\n```\n\nTips for writing vectorized callables:\n\n- Use `np.sum(r**2, axis=1)` instead of `np.dot(r, r)` (the latter does\n  matrix multiplication on 2D arrays).\n- Use `r - r0` with a shape `(NDIM,)` array for offsets — NumPy broadcasts\n  automatically.\n- Use `np.maximum(x, c)` instead of the built-in `max(x, c)`.\n- Use `np.where(cond, a, b)` instead of `if`/`else` branches.\n- Use `r[:, 0]`, `r[:, 1]`, `r[:, 2]` to extract coordinate columns.\n\nFor maximum performance, compile the function with `numba.cfunc` to bypass\nPython entirely:\n\n```python\nimport numba, math\n\n@numba.cfunc(\"float64(CPointer(float64))\")\ndef gaussian_c(r_ptr):\n    r = numba.carray(r_ptr, (3,))\n    return math.exp(-(r[0]**2 + r[1]**2 + r[2]**2))\n\nf = pymadness.function_3d_cfunc(world, gaussian_c, k=8, thresh=1e-6)\n```\n\n## Grid evaluation and plotting\n\nEvaluate a function on a regular grid with `eval_cube()`, or use the\nplotting helpers from `pymadness.plotting`:\n\n```python\nimport numpy as np\nfrom pymadness.plotting import plot_1d, plot_line_cut, plot_2d_slice\n\n# 1D function\nplot_1d(f1d, lo=-5, hi=5, npt=200, show=True)\n\n# Line cut through a 3D function along the x-axis (y=z=0)\nplot_line_cut(f3d, axis=0, npt=200, show=True)\n\n# 2D color map of a 3D function in the z=0 plane\nplot_2d_slice(f3d, fixed_axis=2, fixed_value=0.0, npt=200, show=True)\n\n# Raw grid data (returns a NumPy array)\ncell = np.array([[-5.0, 5.0], [-5.0, 5.0], [-5.0, 5.0]])\nvals = f3d.eval_cube(cell, [100, 100, 100])  # shape (100, 100, 100)\n```\n\n### Interactive 2D plots\n\nThe interactive plot functions `iplot_2d` and `iplot_2d_slice` re-evaluate\nthe function whenever you zoom or pan, keeping the number of grid points\n(resolution) constant.  This means zooming in reveals finer detail rather\nthan pixelating.\n\nFor 3D function slices, you can also change the viewing plane and slice\nposition interactively:\n\n- Press **x**, **y**, or **z** to switch which axis is held fixed (the\n  slice plane).\n- **Scroll** the mouse wheel to move the slice position along the fixed\n  axis.\n\n```python\nfrom pymadness.plotting import iplot_2d, iplot_2d_slice\n\n# Interactive 2D function plot — zoom/pan re-evaluates at npt resolution\niplot_2d(f2d, npt=200)\n\n# Interactive slice of a 3D function — zoom, pan, change plane & position\niplot_2d_slice(f3d, fixed_axis=2, fixed_value=0.0, npt=200)\n```\n\n**Jupyter notebooks:** Use `%matplotlib widget` (requires\n`pip install ipympl`) for interactive zoom/pan inside notebooks.\nWith `%matplotlib inline`, the static plot functions (`plot_2d_slice`, etc.)\nare more appropriate.\n\n### 3D surface plots (plotly)\n\nDisplay a 2D function (or a 2D slice of a 3D function) as an interactive\n3D surface.  Uses plotly's WebGL rendering for fast, smooth rotate/zoom/pan\n— works in Jupyter notebooks and standalone scripts (opens a browser).\n\n```bash\npip install plotly\n```\n\n```python\nfrom pymadness.plotting import plot_surface\n\n# 3D surface of a Function2D\nplot_surface(f2d, npt=100)\n\n# 3D surface of a z=0 slice through a Function3D\nplot_surface(f3d, fixed_axis=2, fixed_value=0.0, npt=100)\n\n# Zoom into a region and clamp the function-value axis\nplot_surface(f3d, npt=100, xrange=[-2, 2], yrange=[-2, 2], zrange=[-0.5, 1.0])\n\n# Multiple functions overlaid\nplot_surface([f1, f2, f3], npt=150, fixed_value=0.1,\n             colorscale=\"Viridis\", opacity=0.5)\n\n# Per-function colorscales and labels\nplot_surface([rho, V_nuc], npt=100,\n             colorscale=[\"RdBu_r\", \"Greens\"],\n             opacity=[0.9, 0.5],\n             labels=[\"density\", \"nuclear potential\"])\n\n# To get the plotly Figure object for further customization:\nfig = plot_surface(f, npt=100, show=False)\nfig.update_layout(...)\nfig.show(renderer=\"notebook\")\n```\n\n**Axis ranges:**\n- `xrange`, `yrange` — set the spatial evaluation domain per axis.  The\n  function is re-evaluated on this region at full `npt` resolution, so\n  zooming in reveals finer detail.  `lo`/`hi` set both axes at once.\n- `zrange` — clamps the displayed function-value axis (visual only).\n\nWhen multiple functions are passed, each gets a distinct colorscale\n(auto-assigned or explicitly specified) and its own colorbar.\n\nNo `%matplotlib widget` or extra Jupyter extensions needed — plotly\nrenders inline automatically.\n\n## FunctionFactory\n\nFor fine-grained control over function construction, use the chainable\n`FunctionFactory`:\n\n```python\nf = (pymadness.FunctionFactory3D(world)\n     .functor(lambda r: np.exp(-np.sum(r**2, axis=1)))\n     .k(10)\n     .thresh(1e-8)\n     .initial_level(3)\n     .noautorefine()\n     .create())\n```\n\nAvailable methods: `functor()`, `k()`, `thresh()`, `initial_level()`,\n`max_refine_level()`, `refine()`, `norefine()`, `autorefine()`,\n`noautorefine()`, `truncate_mode()`, `truncate_on_project()`,\n`notruncate_on_project()`, `fence()`, `nofence()`, `empty()`, `create()`.\n\n## High-dimensional functions (4D–6D)\n\npymadness supports functions in up to 6 dimensions:\n\n```python\npymadness.FunctionDefaults4D.set_k(5)\npymadness.FunctionDefaults4D.set_thresh(1e-3)\npymadness.FunctionDefaults4D.set_cubic_cell(-5.0, 5.0)\n\nf4d = pymadness.function_4d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n```\n\nHigh-dimensional functions use significantly more memory and computation\ntime.  Use low wavelet order (k=4–6) and loose thresholds (1e-3 to 1e-4)\nfor exploration.\n\n## Using pymadness in a Jupyter notebook\n\npymadness works well in Jupyter notebooks for interactive exploration.\n\n### Setup\n\n1. Make sure pymadness is importable from the notebook kernel's Python.\n   The easiest way is to set `PYTHONPATH` **before** launching Jupyter:\n\n   ```bash\n   export PYTHONPATH=/path/to/madness/build/src/pymadness:$PYTHONPATH\n   jupyter lab\n   ```\n\n   Alternatively, add the path at the top of the notebook:\n\n   ```python\n   import sys\n   sys.path.insert(0, \"/path/to/madness/build/src/pymadness\")\n   ```\n\n2. Install matplotlib for inline plots:\n\n   ```bash\n   pip install matplotlib\n   ```\n\n### Notebook lifecycle\n\nMADNESS must be initialized exactly once per process and finalized before\nexit.  In a notebook the kernel persists across cells, so use `World.get()`\n/ `World.close()` instead of a `with` block:\n\n```python\n# Cell 1 — initialize (run once)\nimport numpy as np\nimport pymadness\nfrom pymadness.plotting import *\n\nworld = pymadness.World.get(quiet=True)\npymadness.FunctionDefaults3D.set_k(8)\npymadness.FunctionDefaults3D.set_thresh(1e-6)\npymadness.FunctionDefaults3D.set_cubic_cell(-10.0, 10.0)\n```\n\n```python\n# Cell 2 — work with functions (run as many times as you like)\nf = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\nprint(f\"norm = {f.norm2():.10f}\")\n```\n\n```python\n# Cell 3 — plot\nfrom pymadness.plotting import plot_line_cut\nfig, ax = plot_line_cut(f, axis=0, npt=300)\n```\n\n```python\n# Cell N — finalize (or just restart the kernel)\npymadness.World.close()\n```\n\nIf you restart the kernel, MADNESS is finalized automatically — call\n`World.get()` again in the first cell.\n\n### Inline plots\n\nWith `%matplotlib inline` (the default in most Jupyter environments),\nplots from `pymadness.plotting` appear inline automatically.  For\ninteractive zoom/pan, use `%matplotlib widget` (requires `ipympl`:\n`pip install ipympl`).\n\n### Keeping MADNESS objects alive\n\nIn a notebook, variables persist across cells.  This means you **do not**\nneed the `run()` / `main()` pattern described below — just make sure to call\n`World.close()` (or restart the kernel) after you `del` any remaining\nMADNESS objects.\n\nIf you assign a new function to the same variable name, the old function is\nautomatically destroyed:\n\n```python\n# Cell A\nf = pymadness.function_3d(world, my_func_v1)\n\n# Cell B — f from Cell A is released when this line runs\nf = pymadness.function_3d(world, my_func_v2)\n```\n\n## Object lifetime rules\n\nMADNESS objects (`Function`, `SeparatedConvolution`, `Derivative`) are backed\nby a parallel runtime (`World`) that is initialized/finalized explicitly.\n**All MADNESS objects must be destroyed before `World` is finalized.**\n\nIf a `Function` or operator is garbage-collected after `finalize()`, the\nprogram will crash (segfault in `DeferredCleanup::destroy`).\n\n### The pattern: separate `run()` from `main()`\n\n```python\ndef run(world):\n    # All MADNESS objects are local variables here.\n    f = pymadness.function_3d(world, my_func)\n    g = pymadness.apply(op, f)\n    # ... do work ...\n    # When run() returns, all locals are destroyed.\n\ndef main():\n    with pymadness.World() as world:\n        run(world)\n    # finalize() is called AFTER run()'s locals are gone.\n\nmain()\n```\n\n**Why this works:** Python destroys local variables when a function returns.\nBy putting all MADNESS work in `run()`, every `Function`, operator, and\nderivative is destroyed when `run()` returns — before the `with` block exits\nand calls `finalize()`.\n\n**What breaks:**\n\n```python\n# BAD: MADNESS objects live in the same scope as the context manager\nwith pymadness.World() as world:\n    f = pymadness.function_3d(world, my_func)\n    g = f * f\n# finalize() runs here, but f and g are still alive until the\n# enclosing scope exits → crash on cleanup\n```\n\n### Rules of thumb\n\n1. Always put MADNESS work in a function called from inside the `with` block.\n2. If you must use the non-context-manager API (`World.get()` / `World.close()`),\n   call `del` on all MADNESS objects and `gc.collect()` before `World.close()`.\n3. Never store MADNESS objects as module-level globals or class attributes that\n   outlive `World`.\n\n## API reference\n\n### World\n\n| Function | Description |\n|----------|-------------|\n| `pymadness.World()` | Context manager — initializes and finalizes the runtime |\n| `pymadness.World.get(quiet=True)` | Initialize without context manager |\n| `pymadness.World.close()` | Finalize the runtime |\n\n### FunctionDefaults\n\nStatic configuration for each dimension (1D–6D):\n\n```python\npymadness.FunctionDefaults3D.set_k(8)            # wavelet order\npymadness.FunctionDefaults3D.set_thresh(1e-6)     # truncation threshold\npymadness.FunctionDefaults3D.set_cubic_cell(-L, L) # simulation domain\n```\n\n### Creating functions\n\n```python\n# From a vectorized callable (recommended)\nf = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n\n# With explicit parameters\nf = pymadness.function_1d(world, my_func, k=10, thresh=1e-8)\n\n# From a numba @cfunc (zero overhead)\nf = pymadness.function_3d_cfunc(world, my_cfunc)\n\n# Via FunctionFactory (fine-grained control)\nf = pymadness.FunctionFactory3D(world).functor(my_func).k(10).create()\n```\n\n### Arithmetic\n\n```python\nh = f + g          # addition\nh = f - g          # subtraction\nh = f * g          # pointwise multiplication\nh = 2.0 * f        # scalar multiplication\nf += g              # in-place addition\nf.scale(alpha)      # in-place scaling\nf.truncate()        # discard small coefficients\n```\n\n### Pointwise math functions\n\n```python\ng = pymadness.exp(f)     # g(x) = exp(f(x))\ng = pymadness.log(f)     # g(x) = log(f(x))\ng = pymadness.sqrt(f)    # g(x) = sqrt(f(x))\n\n# In-place variants (modify f directly):\nf.unaryop(\"exp\")\nf.unaryop(\"log\")\nf.unaryop(\"sqrt\")\nf.unaryop(\"abs\")\n```\n\n### Norms and integrals\n\n```python\nf.norm2()                         # L2 norm\nf.trace()                         # integral over domain\npymadness.inner(f, g)            # inner product <f|g>\nf(np.array([0.0, 0.0, 0.0]))    # point evaluation\n```\n\n### Grid evaluation\n\n```python\ncell = np.array([[-5, 5], [-5, 5], [-5, 5]])  # (NDIM, 2)\nvals = f.eval_cube(cell, [100, 100, 100])       # returns numpy array\n```\n\n### Derivatives\n\n```python\nD = pymadness.Derivative3D(world, axis)  # axis: 0=x, 1=y, 2=z\ndf = D(f)\n\n# or as a one-liner:\ndf = pymadness.diff(world, f, axis=0)\n\n# gradient (3D only):\ngrad = pymadness.gradient(world, f)  # returns [df/dx, df/dy, df/dz]\n```\n\n### Integral operators\n\n```python\n# BSH (bound-state Helmholtz): exp(-mu*r)/(4*pi*r)\nbsh = pymadness.BSHOperator3D(world, mu, lo, eps)\nresult = pymadness.apply(bsh, f)\n\n# Coulomb: 1/(4*pi*r)\ncoulomb = pymadness.CoulombOperator(world, lo, eps)\nresult = pymadness.apply(coulomb, f)\n\n# Slater: exp(-mu*r)\nslater = pymadness.SlaterOperator(world, mu, lo, eps)\n```\n\nParameters: `mu` = exponent, `lo` = smallest length scale, `eps` = precision.\n\n### Save / Load\n\n```python\nf.save(\"function.mad\")\ng = pymadness.Function3D.load(world, \"function.mad\")\n```\n\n### Plotting\n\nAll plotting functions live in `pymadness.plotting`:\n\n```python\nfrom pymadness.plotting import (\n    plot_1d, plot_2d, plot_line_cut, plot_2d_slice,  # matplotlib, static\n    iplot_2d, iplot_2d_slice,                         # matplotlib, interactive\n    plot_surface,                                      # plotly, 3D surface\n)\n```\n\n| Function | Backend | Description |\n|----------|---------|-------------|\n| `plot_1d(f, ...)` | matplotlib | Plot a 1D function |\n| `plot_2d(f, ...)` | matplotlib | 2D color map of a Function2D |\n| `plot_line_cut(f, axis, ...)` | matplotlib | 1D line cut through a 2D/3D function |\n| `plot_2d_slice(f, fixed_axis, ...)` | matplotlib | 2D color map slice of a 3D function |\n| `iplot_2d(f, ...)` | matplotlib | Interactive 2D plot (re-evaluates on zoom) |\n| `iplot_2d_slice(f, ...)` | matplotlib | Interactive 2D slice (zoom + scroll/key to change slice) |\n| `plot_surface(f, ...)` | plotly | Interactive 3D surface (rotate/zoom/pan) |\n\nCommon parameters:\n\n| Parameter | Description |\n|-----------|-------------|\n| `npt` | Grid points per axis (constant across zoom levels) |\n| `lo`, `hi` | Spatial range for all axes (default: simulation cell) |\n| `xrange`, `yrange` | Per-axis spatial range, overrides `lo`/`hi` (`plot_surface` only) |\n| `zrange` | Function-value display range (`plot_surface` only) |\n| `fixed_axis` | Axis to hold constant for slices (0=x, 1=y, 2=z) |\n| `fixed_value` | Value along the fixed axis |\n| `colorscale` | Plotly colorscale name or list (`plot_surface` only) |\n| `opacity` | Surface opacity 0–1, or list (`plot_surface` only) |\n| `labels` | Trace names for legend (`plot_surface` only) |\n| `show` | Display immediately (default: True) |\n| `ax` | Existing matplotlib Axes to plot into (matplotlib functions only) |\n\n## Examples\n\n- `examples/hydrogen_atom.py` — BSH iteration for the hydrogen ground state\n- `examples/harmonic_oscillator_1d.py` — 1D quantum harmonic oscillator with KAIN\n- `examples/derivatives.py` — gradient and Laplacian of a 3D Gaussian\n"
  },
  {
    "path": "src/pymadness/examples/derivatives.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nDemonstrate differentiation and operator application in MADNESS.\n\nCreates a 3D Gaussian function and computes its gradient,\nLaplacian, and verifies against analytical results.\n\nAll callables use the vectorized convention: they accept a numpy array\nof shape ``(npts, 3)`` and return an array of shape ``(npts,)``.  This\nis typically 10–50x faster than the scalar (per-point) convention because\nnumpy evaluates the whole batch in compiled C code while the GIL is\nacquired only once per box.  See ``hydrogen_atom.py`` for a longer\ndiscussion.\n\"\"\"\n\nimport numpy as np\nimport pymadness\n\n\ndef run(world):\n    pymadness.FunctionDefaults3D.set_k(10)\n    pymadness.FunctionDefaults3D.set_thresh(1e-8)\n    pymadness.FunctionDefaults3D.set_cubic_cell(-10.0, 10.0)\n\n    alpha = 1.0\n\n    # f(r) = exp(-alpha * r^2)\n    # Vectorized: r has shape (npts, 3), np.sum(..., axis=1) gives row-wise r^2.\n    f = pymadness.function_3d(world,\n        lambda r: np.exp(-alpha * np.sum(r**2, axis=1)))\n\n    print(f\"f: norm={f.norm2():.10f}, integral={f.trace():.10f}\")\n    print(f\"   exact integral = (pi/alpha)^(3/2) = {(np.pi/alpha)**1.5:.10f}\")\n\n    # Gradient: df/dx_i = -2*alpha*x_i * f\n    grad = pymadness.gradient(world, f)\n    for i, label in enumerate([\"x\", \"y\", \"z\"]):\n        print(f\"  df/d{label}: norm={grad[i].norm2():.8f}\")\n\n    # Analytical df/dx: -2*alpha*x * exp(-alpha*r^2)\n    # Vectorized: r[:, 0] extracts the x-coordinates for all points.\n    dfdx_exact = pymadness.function_3d(world,\n        lambda r: -2.0 * alpha * r[:, 0] * np.exp(-alpha * np.sum(r**2, axis=1)))\n\n    error = (grad[0] - dfdx_exact).norm2()\n    print(f\"\\n  |df/dx - exact|  = {error:.2e}\")\n\n    # Laplacian: sum of second derivatives\n    laplacian = pymadness.Function3D()\n    for axis in range(3):\n        D = pymadness.Derivative3D(world, axis)\n        d2f = D(grad[axis])\n        if not laplacian.is_initialized():\n            laplacian = d2f\n        else:\n            laplacian += d2f\n\n    # Analytical Laplacian: (4*alpha^2 * r^2 - 6*alpha) * f\n    # Vectorized: np.sum(r**2, axis=1) replaces np.dot(r, r).\n    lap_exact = pymadness.function_3d(world,\n        lambda r: (4*alpha**2 * np.sum(r**2, axis=1) - 6*alpha) *\n                   np.exp(-alpha * np.sum(r**2, axis=1)))\n\n    error = (laplacian - lap_exact).norm2()\n    print(f\"  |Laplacian - exact| = {error:.2e}\")\n\n    print(\"\\nDone.\")\n\n\ndef main():\n    with pymadness.World(quiet=True) as world:\n        run(world)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "src/pymadness/examples/harmonic_oscillator_1d.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nSolve the 1D quantum harmonic oscillator using MADNESS.\n\n    H psi = (-1/2 d^2/dx^2 + 1/2 x^2) psi = E psi\n\nGround state energy is 0.5 (in natural units).\n\nThis example demonstrates:\n  - Potential shift to make the effective energy negative (required for BSH)\n  - KAIN (Krylov Accelerated Inexact Newton) subspace solver for convergence\n  - Same algorithm as the C++ example src/examples/3dharmonic.cc\n\nThe BSH Green's function only works for bound states (negative energy).\nSince V(x)=0.5*x^2 has E_0=0.5 > 0, we shift the potential by a constant\nDELTA to make the effective energy negative:\n\n    (T + V - DELTA) psi = (E - DELTA) psi\n\nwith E_eff = E - DELTA < 0. After convergence, E = E_eff + DELTA.\n\"\"\"\n\nimport numpy as np\nimport pymadness\n\n\nclass KAIN:\n    \"\"\"Krylov Accelerated Inexact Newton solver.\n\n    Pure Python implementation of the KAIN algorithm from:\n        R. J. Harrison, J. Comput. Chem. 25, 328-334 (2004).\n\n    Works with any objects that support inner(), +, -, and scalar *.\n    \"\"\"\n    def __init__(self, maxsub=10):\n        self.maxsub = maxsub\n        self.ulist = []\n        self.rlist = []\n        self.Q = None\n\n    def update(self, u, r):\n        \"\"\"Given current solution u and residual r, return improved solution.\n\n        Args:\n            u: current solution (pymadness Function)\n            r: residual = u - G(V*u) or similar\n        Returns:\n            improved solution\n        \"\"\"\n        if self.maxsub == 1:\n            return u - r\n\n        m = len(self.ulist)\n        self.ulist.append(u.copy())\n        self.rlist.append(r.copy())\n\n        # Build/extend the Q matrix: Q[i,j] = <u_i | r_j>\n        Qnew = np.zeros((m + 1, m + 1))\n        if m > 0:\n            Qnew[:m, :m] = self.Q\n        for i in range(m + 1):\n            Qnew[i, m] = pymadness.inner(self.ulist[i], self.rlist[m])\n            Qnew[m, i] = pymadness.inner(self.ulist[m], self.rlist[i])\n        self.Q = Qnew\n\n        # Solve KAIN subspace equations\n        c = self._solve_kain(self.Q)\n\n        # Form new solution: unew = sum_i c[i] * (u[i] - r[i])\n        unew = c[0] * (self.ulist[0] - self.rlist[0])\n        for i in range(1, m + 1):\n            unew += c[i] * (self.ulist[i] - self.rlist[i])\n\n        # Trim subspace if at maximum size\n        if len(self.ulist) == self.maxsub:\n            self.ulist.pop(0)\n            self.rlist.pop(0)\n            self.Q = self.Q[1:, 1:].copy()\n\n        return unew\n\n    @staticmethod\n    def _solve_kain(Q, rcond=1e-12):\n        \"\"\"Solve the KAIN subspace equations.\n\n        Given Q[i,j] = <u_i | r_j>, solve for coefficients c such that\n        the new solution is sum_i c[i] * (u[i] - r[i]).\n        \"\"\"\n        m = Q.shape[0]\n        # Build the augmented system\n        A = np.zeros((m + 1, m))\n        b = np.zeros(m + 1)\n        A[:m, :m] = Q\n        A[m, :] = 1.0\n        b[m] = 1.0\n\n        # Solve via least-squares (handles rank-deficiency)\n        c, _, _, _ = np.linalg.lstsq(A, b, rcond=rcond)\n\n        # Safety: clamp if coefficients are too large\n        if np.max(np.abs(c)) > 1000.0:\n            c = np.zeros(m)\n            c[-1] = 1.0\n\n        return c\n\n\ndef run(world):\n    # Numerical parameters\n    k = 10\n    thresh = 1e-8\n    L = 10.0\n    DELTA = 7.0  # potential shift to make effective energy negative\n\n    pymadness.FunctionDefaults1D.set_k(k)\n    pymadness.FunctionDefaults1D.set_thresh(thresh)\n    pymadness.FunctionDefaults1D.set_cubic_cell(-L, L)\n\n    # Shifted potential: V(x) = 0.5 * x^2 - DELTA\n    V = pymadness.function_1d(world, lambda r: 0.5 * r[0]**2 - DELTA)\n\n    # Initial guess: broad Gaussian (deliberately poor to show KAIN convergence)\n    psi = pymadness.function_1d(world, lambda r: np.exp(-0.1 * r[0]**2))\n    psi.scale(1.0 / psi.norm2())\n\n    # Compute total energy = kinetic + potential (with shift)\n    def compute_energy(psi, V):\n        D = pymadness.Derivative1D(world, 0)\n        dpsi = D(psi)\n        kinetic = 0.5 * dpsi.inner(dpsi)\n        potential = psi.inner(V * psi)\n        return kinetic + potential\n\n    E = compute_energy(psi, V)\n    solver = KAIN(maxsub=10)\n\n    print(f\"Potential shift DELTA = {DELTA}\")\n    print(f\"{'iter':>4s}  {'energy':>14s}  {'unshifted':>14s}  {'error':>10s}\")\n\n    for iteration in range(50):\n        # Construct BSH Green's function with shifted energy\n        mu = np.sqrt(-2.0 * E)\n        bsh = pymadness.BSHOperator1D(world, mu, 1e-4, thresh)\n\n        Vpsi = V * psi\n        Vpsi.truncate()\n\n        # Apply Green's function: G * (V*psi)\n        # The residual is: r = psi + 2*G*(V*psi)\n        # (would be zero for the exact eigenfunction)\n        Gpsi = pymadness.apply(bsh, Vpsi)\n        residual = psi + 2.0 * Gpsi\n\n        err = residual.norm2()\n        print(f\"  {iteration:3d}  {E:14.10f}  {E + DELTA:14.10f}  {err:10.2e}\")\n\n        if err < 5.0 * thresh:\n            print(\"\\nConverged!\")\n            break\n\n        # KAIN update: better than simple fixed-point iteration psi = psi - r\n        psi = solver.update(psi, residual)\n\n        # Normalize\n        psi.scale(1.0 / psi.norm2())\n\n        # Update energy\n        E = compute_energy(psi, V)\n\n    print(f\"\\nFinal energy (shifted):   {E:14.10f}\")\n    print(f\"Final energy (unshifted): {E + DELTA:14.10f}\")\n    print(f\"Exact energy:             {0.5:14.10f}\")\n    print(f\"Error:                    {E + DELTA - 0.5:14.10f}\")\n\n\ndef main():\n    with pymadness.World(quiet=True) as world:\n        run(world)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "src/pymadness/examples/hydrogen_atom.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nSolve the hydrogen atom ground state using MADNESS.\n\nUses the BSH (bound-state Helmholtz) operator to iteratively solve:\n    (-1/2 nabla^2 + V) psi = E psi\n\nwhere V(r) = -1/r is the nuclear potential.\nThe exact ground state energy is -0.5 Hartree.\n\n\nVectorized callables\n--------------------\nWhen pymadness projects a Python callable onto the adaptive grid, MADNESS\nevaluates it at many quadrature points.  There are two ways to write the\ncallable:\n\n**Scalar** (simple, but slow)::\n\n    def V_scalar(r):                          # r has shape (3,)\n        return -1.0 / max(np.linalg.norm(r), 1e-6)\n\n**Vectorized** (fast — recommended)::\n\n    def V_vectorized(r):                      # r has shape (npts, 3)\n        rr = np.sqrt(np.sum(r**2, axis=1))    # shape (npts,)\n        return -1.0 / np.maximum(rr, 1e-6)    # shape (npts,)\n\nThe vectorized form receives *all* quadrature points for one box at once as\na numpy array of shape ``(npts, NDIM)`` and must return an array of shape\n``(npts,)``.  pymadness auto-detects which convention the callable uses on\nthe first call:\n\n  - If the callable returns an array of the expected length, it is treated\n    as vectorized and all subsequent calls use the batch path.\n  - If it raises an exception or returns something else (e.g. a scalar),\n    pymadness falls back to calling it once per point.\n\nEither way the GIL is only acquired **once per box** (not once per point),\nbut the vectorized form is much faster because numpy evaluates the whole\nbatch in compiled C code rather than looping in Python.  For k=8 in 3D\n(512 points per box) the speedup is typically 10–50x.\n\nWriting vectorized callables — tips:\n\n  - Use ``np.sum(r**2, axis=1)`` instead of ``np.dot(r, r)``\n    (``np.dot`` on a 2D array does matrix multiplication, not a row-wise\n    dot product).\n  - Use ``np.maximum(x, c)`` instead of ``max(x, c)`` (the built-in\n    ``max`` doesn't work element-wise on arrays).\n  - Use ``np.linalg.norm(r, axis=1)`` for row-wise norms.\n  - If your function has branches (``if``/``else``), replace them with\n    ``np.where(condition, value_if_true, value_if_false)``.\n\"\"\"\n\nimport numpy as np\nimport pymadness\n\n\ndef run(world):\n    # Numerical parameters\n    k = 8           # wavelet order (polynomial degree)\n    thresh = 1e-6   # truncation threshold\n    L = 30.0        # box size [-L, L]^3\n\n    pymadness.FunctionDefaults3D.set_k(k)\n    pymadness.FunctionDefaults3D.set_thresh(thresh)\n    pymadness.FunctionDefaults3D.set_cubic_cell(-L, L)\n\n    # ----------------------------------------------------------------\n    # Nuclear potential: V(r) = -1/|r|, regularized at the origin.\n    #\n    # Vectorized: r has shape (npts, 3), return shape (npts,).\n    # np.maximum replaces the scalar max() so the clamp works on arrays.\n    # ----------------------------------------------------------------\n    def V_func(r):\n        rr = np.sqrt(np.sum(r**2, axis=1))\n        return -1.0 / np.maximum(rr, 1e-6)\n\n    # ----------------------------------------------------------------\n    # Initial guess: exp(-r^2), a simple Gaussian.\n    #\n    # Vectorized: np.sum(..., axis=1) computes the row-wise dot product.\n    # ----------------------------------------------------------------\n    def guess(r):\n        return np.exp(-np.sum(r**2, axis=1))\n\n    print(\"Projecting potential and initial guess...\")\n    V = pymadness.function_3d(world, V_func)\n    psi = pymadness.function_3d(world, guess)\n\n    # Normalize\n    norm = psi.norm2()\n    psi.scale(1.0 / norm)\n\n    # Initial energy estimate\n    E = -0.5\n    print(f\"Initial energy estimate: {E:.6f}\")\n\n    # BSH iteration: solve (T + V) psi = E psi\n    # Rearranged: (T - E) psi = -V psi\n    # BSH Green's function: G_mu = (-nabla^2 + mu^2)^{-1} with mu = sqrt(-2E)\n    # So: psi_new = -2 * G_mu(V * psi)\n    for iteration in range(30):\n        mu = np.sqrt(-2.0 * E)\n        bsh = pymadness.BSHOperator3D(world, mu, 1e-4, thresh)\n\n        Vpsi = V * psi\n        Vpsi.truncate()\n\n        # new_psi = -2 * G(V*psi)\n        new_psi = pymadness.apply(bsh, Vpsi)\n        new_psi.scale(-2.0)\n        new_psi.truncate()\n\n        # Compute residual norm for convergence check\n        # The BSH residual: r = (T + V - E) psi = new_psi - psi (up to normalization)\n        rnorm = (new_psi - psi).norm2()\n\n        # Normalize\n        norm = new_psi.norm2()\n        new_psi.scale(1.0 / norm)\n\n        # Update energy via expectation value: E = <psi|T+V|psi>\n        # Use: <T> = <psi|T|psi> = -0.5 <psi|nabla^2|psi>\n        # Or equivalently: E = <psi|V|psi> + <psi|T|psi>\n        # Simpler: E = (eps * <psi_old|psi_new>) / <psi_new|psi_new>\n        # Best: use the Rayleigh quotient with kinetic energy from derivatives\n        Vpsi = V * new_psi\n        PE = new_psi.inner(Vpsi)\n\n        # Kinetic energy via gradient: T = 0.5 * sum_i ||d psi/dx_i||^2\n        grad = pymadness.gradient(world, new_psi)\n        KE = 0.5 * sum(g.inner(g) for g in grad)\n        del grad  # free memory\n\n        E_new = PE + KE\n\n        print(f\"  iter {iteration:3d}  E = {E_new:14.10f}  \"\n              f\"dE = {E_new - E:10.2e}  residual = {rnorm:.2e}\")\n\n        if rnorm < 5 * thresh:\n            print(\"\\nConverged!\")\n            break\n\n        E = E_new\n        psi = new_psi\n\n    print(f\"\\nFinal energy:  {E:14.10f} Hartree\")\n    print(f\"Exact energy:  {-0.5:14.10f} Hartree\")\n    print(f\"Error:         {E - (-0.5):14.10f} Hartree\")\n\n\ndef main():\n    with pymadness.World(quiet=True) as world:\n        run(world)\n    # All MADNESS objects (V, psi, bsh, etc.) go out of scope when\n    # run() returns, BEFORE the World context manager calls finalize().\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "src/pymadness/pyproject.toml",
    "content": "[build-system]\nrequires = [\"scikit-build-core>=0.5\", \"pybind11>=2.11\"]\nbuild-backend = \"scikit_build_core.build\"\n\n[project]\nname = \"pymadness\"\nversion = \"0.1.0\"\ndescription = \"Python bindings for MADNESS (Multiresolution Adaptive Numerical Environment)\"\nreadme = \"README.md\"\nrequires-python = \">=3.8\"\nlicense = {text = \"GPL-2.0-or-later\"}\ndependencies = [\"numpy\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"numpy\"]\nplot = [\"matplotlib\"]\n\n[tool.scikit-build]\ncmake.args = [\"-DENABLE_PYTHON=ON\"]\ncmake.source-dir = \"../..\"\ninstall.components = [\"python\"]\n"
  },
  {
    "path": "src/pymadness/src/_pymadness/bind_defaults.cpp",
    "content": "/*\n  pymadness - Python bindings for MADNESS\n  FunctionDefaults<NDIM> bindings for dimensions 1, 2, 3.\n*/\n\n#include <pybind11/pybind11.h>\n#include <pybind11/stl.h>\n#include <madness/mra/mra.h>\n\nnamespace py = pybind11;\nusing namespace madness;\n\ntemplate<std::size_t NDIM>\nstatic void bind_function_defaults(py::module_& m, const char* name) {\n    using FD = FunctionDefaults<NDIM>;\n\n    py::class_<FD>(m, name,\n        \"Static global defaults for numerical parameters of Function objects\")\n        // Wavelet order\n        .def_static(\"set_k\", &FD::set_k,\n            py::arg(\"k\"), \"Set default wavelet order\")\n        .def_static(\"get_k\", &FD::get_k,\n            \"Get default wavelet order\")\n\n        // Threshold\n        .def_static(\"set_thresh\", &FD::set_thresh,\n            py::arg(\"thresh\"), \"Set default truncation threshold\")\n        .def_static(\"get_thresh\", &FD::get_thresh,\n            \"Get default truncation threshold\")\n\n        // Cell / domain\n        .def_static(\"set_cubic_cell\", &FD::set_cubic_cell,\n            py::arg(\"lo\"), py::arg(\"hi\"),\n            \"Set cubic simulation cell [-L, L]^NDIM\")\n        .def_static(\"get_cell\", &FD::get_cell,\n            \"Get simulation cell as Tensor (NDIM x 2)\")\n        .def_static(\"get_cell_width\", &FD::get_cell_width,\n            \"Get cell width along each dimension\")\n        .def_static(\"get_cell_volume\", &FD::get_cell_volume,\n            \"Get volume of the simulation cell\")\n\n        // Refinement levels\n        .def_static(\"set_initial_level\", &FD::set_initial_level,\n            py::arg(\"level\"), \"Set initial projection level\")\n        .def_static(\"get_initial_level\", &FD::get_initial_level,\n            \"Get initial projection level\")\n        .def_static(\"set_max_refine_level\", &FD::set_max_refine_level,\n            py::arg(\"level\"), \"Set maximum adaptive refinement level\")\n        .def_static(\"get_max_refine_level\", &FD::get_max_refine_level,\n            \"Get maximum adaptive refinement level\")\n\n        // Refinement control\n        .def_static(\"set_refine\", &FD::set_refine,\n            py::arg(\"value\"), \"Enable/disable adaptive refinement\")\n        .def_static(\"get_refine\", &FD::get_refine,\n            \"Get adaptive refinement flag\")\n        .def_static(\"set_autorefine\", &FD::set_autorefine,\n            py::arg(\"value\"), \"Enable/disable auto-refinement\")\n        .def_static(\"get_autorefine\", &FD::get_autorefine,\n            \"Get auto-refinement flag\")\n        .def_static(\"set_truncate_on_project\", &FD::set_truncate_on_project,\n            py::arg(\"value\"), \"Enable/disable truncation on projection\")\n        .def_static(\"get_truncate_on_project\", &FD::get_truncate_on_project,\n            \"Get truncate-on-project flag\")\n        .def_static(\"set_truncate_mode\", &FD::set_truncate_mode,\n            py::arg(\"mode\"), \"Set truncation mode (0, 1, or 2)\")\n        .def_static(\"get_truncate_mode\", &FD::get_truncate_mode,\n            \"Get truncation mode\")\n\n        // Debug\n        .def_static(\"set_debug\", &FD::set_debug,\n            py::arg(\"value\"), \"Enable/disable debug output\")\n        .def_static(\"get_debug\", &FD::get_debug,\n            \"Get debug flag\")\n\n        // Defaults\n        .def_static(\"set_defaults\", &FD::set_defaults,\n            py::arg(\"world\"),\n            \"Reset all defaults (k=7, thresh=1e-5, unit cube)\")\n        .def_static(\"print\", &FD::print,\n            \"Print current default settings\");\n}\n\nvoid bind_defaults(py::module_& m) {\n    bind_function_defaults<1>(m, \"FunctionDefaults1D\");\n    bind_function_defaults<2>(m, \"FunctionDefaults2D\");\n    bind_function_defaults<3>(m, \"FunctionDefaults3D\");\n    bind_function_defaults<4>(m, \"FunctionDefaults4D\");\n    bind_function_defaults<5>(m, \"FunctionDefaults5D\");\n    bind_function_defaults<6>(m, \"FunctionDefaults6D\");\n}\n"
  },
  {
    "path": "src/pymadness/src/_pymadness/bind_function.cpp",
    "content": "/*\n  pymadness - Python bindings for MADNESS\n  Function<T,NDIM> bindings for dimensions 1–6.\n*/\n\n#include <cstdint>\n#include <pybind11/pybind11.h>\n#include <pybind11/numpy.h>\n#include <pybind11/stl.h>\n#include <pybind11/complex.h>\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/vmra.h>\n#include \"py_functor.h\"\n\nnamespace py = pybind11;\nusing namespace madness;\n\ntemplate<typename T, std::size_t NDIM>\nstatic void bind_function_type(py::module_& m, const char* name) {\n    using FuncT = Function<T, NDIM>;\n    using coordT = Vector<double, NDIM>;\n\n    py::class_<FuncT>(m, name)\n        // --- Construction ---\n        .def(py::init<>(), \"Create an uninitialized function\")\n\n        .def(py::init([](World& world, py::object callable, int k, double thresh) {\n            std::shared_ptr<FunctionFunctorInterface<T, NDIM>> functor =\n                std::make_shared<PyFunctor<T, NDIM>>(callable);\n            FunctionFactory<T, NDIM> factory(world);\n            factory.functor(functor);\n            if (k > 0) factory.k(k);\n            if (thresh > 0) factory.thresh(thresh);\n            // Release the GIL so MADNESS worker threads can call back\n            // into Python via PyFunctor::operator() during projection.\n            py::gil_scoped_release release;\n            return FuncT(factory);\n        }),\n            py::arg(\"world\"), py::arg(\"f\"),\n            py::arg(\"k\") = -1, py::arg(\"thresh\") = -1.0,\n            \"Create function by projecting a Python callable.\\n\"\n            \"Two calling conventions are supported (probed at construction time):\\n\"\n            \"  - Vectorized: f(r) where r has shape (npts, NDIM) and returns\\n\"\n            \"    an array of shape (npts,).  Preferred: the GIL is acquired\\n\"\n            \"    only once per box, making projection much faster.\\n\"\n            \"  - Scalar: f(r) where r has shape (NDIM,) and returns a float.\\n\"\n            \"    Used as a fallback if the callable does not accept the\\n\"\n            \"    vectorized form.\")\n\n        // --- Point evaluation ---\n        .def(\"__call__\", [](const FuncT& f, py::array_t<double> r) -> T {\n            auto buf = r.unchecked<1>();\n            if (buf.shape(0) != static_cast<py::ssize_t>(NDIM)) {\n                throw std::invalid_argument(\n                    \"Coordinate array must have \" + std::to_string(NDIM) + \" elements\");\n            }\n            coordT coord;\n            for (std::size_t i = 0; i < NDIM; ++i) coord[i] = buf(i);\n            // Release GIL so MADNESS worker threads can process the\n            // eval task and resolve the Future.\n            T result;\n            {\n                py::gil_scoped_release release;\n                if (!f.is_reconstructed()) f.reconstruct();\n                result = f.eval(coord).get();\n            }\n            return result;\n        }, py::arg(\"r\"), \"Evaluate function at point r (numpy array of length NDIM)\")\n\n        // --- Arithmetic operators ---\n        .def(\"__add__\", [](const FuncT& a, const FuncT& b) {\n            py::gil_scoped_release release;\n            return a + b;\n        })\n        .def(\"__sub__\", [](const FuncT& a, const FuncT& b) {\n            py::gil_scoped_release release;\n            return a - b;\n        })\n        .def(\"__mul__\", [](const FuncT& a, const FuncT& b) {\n            py::gil_scoped_release release;\n            return a * b;\n        }, \"Pointwise multiplication of two functions\")\n        .def(\"__mul__\", [](const FuncT& a, T s) {\n            py::gil_scoped_release release;\n            return a * s;\n        })\n        .def(\"__rmul__\", [](const FuncT& a, T s) {\n            py::gil_scoped_release release;\n            return s * a;\n        })\n        .def(\"__neg__\", [](const FuncT& a) {\n            py::gil_scoped_release release;\n            return a * T(-1.0);\n        })\n        .def(\"__iadd__\", [](FuncT& a, const FuncT& b) -> FuncT& {\n            py::gil_scoped_release release;\n            a += b;\n            return a;\n        }, py::return_value_policy::reference_internal)\n        .def(\"__isub__\", [](FuncT& a, const FuncT& b) -> FuncT& {\n            py::gil_scoped_release release;\n            a -= b;\n            return a;\n        }, py::return_value_policy::reference_internal)\n        .def(\"__imul__\", [](FuncT& a, T s) -> FuncT& {\n            py::gil_scoped_release release;\n            a.scale(s);\n            return a;\n        }, py::return_value_policy::reference_internal)\n\n        // --- Norms and integrals ---\n        .def(\"norm2\", [](const FuncT& f) {\n            py::gil_scoped_release release;\n            return f.norm2();\n        }, \"L2 norm: sqrt(integral |f|^2)\")\n        .def(\"trace\", [](const FuncT& f) {\n            py::gil_scoped_release release;\n            return f.trace();\n        }, \"Integral of f over the simulation cell\")\n        .def(\"inner\", [](const FuncT& f, const FuncT& g) {\n            py::gil_scoped_release release;\n            return f.inner(g);\n        }, py::arg(\"g\"), \"Inner product: integral f(x)*g(x) dx\")\n\n        // --- Tree state management ---\n        .def(\"compress\", [](const FuncT& f) {\n            py::gil_scoped_release release;\n            f.compress();\n        }, \"Transform to compressed (wavelet) representation\")\n        .def(\"reconstruct\", [](const FuncT& f) {\n            py::gil_scoped_release release;\n            f.reconstruct();\n        }, \"Transform to reconstructed (scaling function) representation\")\n        .def(\"truncate\", [](FuncT& f, double tol) {\n            py::gil_scoped_release release;\n            f.truncate(tol);\n        }, py::arg(\"tol\") = 0.0,\n           \"Truncate small wavelet coefficients (0 = use default threshold)\")\n\n        // --- In-place operations ---\n        .def(\"scale\", [](FuncT& f, T s) {\n            py::gil_scoped_release release;\n            f.scale(s);\n        }, py::arg(\"s\"), \"Scale function in-place by constant s\")\n        .def(\"gaxpy\", [](FuncT& f, T alpha, const FuncT& g, T beta) {\n            py::gil_scoped_release release;\n            f.gaxpy(alpha, g, beta);\n        }, py::arg(\"alpha\"), py::arg(\"g\"), py::arg(\"beta\"),\n           \"In-place f = alpha*f + beta*g\")\n        .def(\"square\", [](FuncT& f) {\n            py::gil_scoped_release release;\n            f.square();\n        }, \"Square the function in-place: f(x) = f(x)^2\")\n        .def(\"abs\", [](FuncT& f) {\n            py::gil_scoped_release release;\n            f.abs();\n        }, \"Absolute value in-place: f(x) = |f(x)|\")\n        .def(\"abs_square\", [](FuncT& f) {\n            py::gil_scoped_release release;\n            f.abs_square();\n        }, \"Absolute square in-place: f(x) = |f(x)|^2\")\n        .def(\"unaryop\", [](FuncT& f, const std::string& op) {\n            // Use SimpleUnaryOpWrapper via the function-pointer overload\n            // of unaryop(T (*f)(T)). We need a plain function pointer,\n            // so define static helpers.\n            using fptr_t = T(*)(T);\n            fptr_t fn = nullptr;\n            if (op == \"exp\") {\n                fn = +[](T x) -> T { return std::exp(x); };\n            } else if (op == \"log\") {\n                fn = +[](T x) -> T { return std::log(x); };\n            } else if (op == \"abs\") {\n                fn = +[](T x) -> T { return std::abs(x); };\n            } else if (op == \"sqrt\") {\n                fn = +[](T x) -> T { return std::sqrt(x); };\n            } else {\n                throw std::invalid_argument(\n                    \"Unknown unary op '\" + op + \"'. \"\n                    \"Supported: exp, log, abs, sqrt\");\n            }\n            py::gil_scoped_release release;\n            f.unaryop(fn);\n        }, py::arg(\"op\"),\n           \"Apply a pointwise unary operation in-place.\\n\"\n           \"Supported: 'exp', 'log', 'abs', 'sqrt'\")\n\n        // --- Properties ---\n        .def(\"k\", &FuncT::k, \"Wavelet order\")\n        .def(\"thresh\", &FuncT::thresh, \"Truncation threshold\")\n        .def(\"max_depth\", &FuncT::max_depth, \"Maximum depth of the function tree\")\n        .def(\"tree_size\", &FuncT::tree_size, \"Total number of nodes in the tree\")\n        .def(\"is_initialized\", &FuncT::is_initialized,\n            \"True if the function has been initialized\")\n        .def(\"is_compressed\", &FuncT::is_compressed,\n            \"True if in compressed (wavelet) representation\")\n        .def(\"is_reconstructed\", &FuncT::is_reconstructed,\n            \"True if in reconstructed (scaling function) representation\")\n        .def(\"size\", &FuncT::size,\n            \"Number of coefficients in the function tree\")\n\n        // --- Copy ---\n        .def(\"copy\", [](const FuncT& f) {\n            py::gil_scoped_release release;\n            return madness::copy(f);\n        }, \"Create a deep copy of this function\")\n\n        // --- Save / Load ---\n        // Use ParallelArchive to match the C++ save()/load() free functions\n        .def(\"save\", [](const FuncT& f, const std::string& filename) {\n            py::gil_scoped_release release;\n            archive::ParallelOutputArchive<archive::BinaryFstreamOutputArchive> ar(f.world(), filename.c_str(), 1);\n            ar & f;\n        }, py::arg(\"filename\"), \"Save function to binary file\")\n        .def_static(\"load\", [](World& w, const std::string& filename) {\n            FuncT f;\n            {\n                py::gil_scoped_release release;\n                archive::ParallelInputArchive<archive::BinaryFstreamInputArchive> ar(w, filename.c_str());\n                ar & f;\n            }\n            return f;\n        }, py::arg(\"world\"), py::arg(\"filename\"),\n           \"Load function from binary file\")\n\n        // --- Construct from C function pointer (numba @cfunc support) ---\n        .def_static(\"from_cfunc\", [](World& world, uintptr_t addr, int k, double thresh) {\n            // Cast the integer address to a C function pointer\n            auto fptr = reinterpret_cast<T (*)(const Vector<double, NDIM>&)>(addr);\n            FunctionFactory<T, NDIM> factory(world);\n            factory.f(fptr);\n            if (k > 0) factory.k(k);\n            if (thresh > 0) factory.thresh(thresh);\n            py::gil_scoped_release release;\n            return FuncT(factory);\n        },\n            py::arg(\"world\"), py::arg(\"cfunc_address\"),\n            py::arg(\"k\") = -1, py::arg(\"thresh\") = -1.0,\n            \"Create function from a C function pointer (e.g. from numba @cfunc).\\n\"\n            \"The function must have signature T(const Vector<double,NDIM>&).\")\n\n        // --- Grid evaluation ---\n        .def(\"eval_cube\", [](const FuncT& f,\n                             py::array_t<double, py::array::c_style> cell_arr,\n                             std::vector<long> npt) {\n            // cell_arr is shape (NDIM, 2): [[lo0, hi0], [lo1, hi1], ...]\n            auto buf = cell_arr.unchecked<2>();\n            if (buf.shape(0) != static_cast<py::ssize_t>(NDIM) || buf.shape(1) != 2) {\n                throw std::invalid_argument(\n                    \"cell must have shape (\" + std::to_string(NDIM) + \", 2)\");\n            }\n            if (npt.size() != NDIM) {\n                throw std::invalid_argument(\n                    \"npt must have \" + std::to_string(NDIM) + \" elements\");\n            }\n            Tensor<double> cell(NDIM, 2L);\n            for (std::size_t d = 0; d < NDIM; ++d) {\n                cell(d, 0L) = buf(d, 0);\n                cell(d, 1L) = buf(d, 1);\n            }\n            Tensor<T> result;\n            {\n                py::gil_scoped_release release;\n                result = f.eval_cube(cell, npt);\n            }\n            // Convert Tensor<T> to numpy array\n            std::vector<py::ssize_t> shape(result.ndim());\n            for (long i = 0; i < result.ndim(); ++i) {\n                shape[i] = result.dim(i);\n            }\n            py::array_t<T> arr(shape);\n            T* dst = arr.mutable_data();\n            const T* src = result.ptr();\n            std::copy(src, src + result.size(), dst);\n            return arr;\n        },\n            py::arg(\"cell\"), py::arg(\"npt\"),\n            \"Evaluate function on a regular grid.\\n\\n\"\n            \"Args:\\n\"\n            \"    cell: numpy array of shape (NDIM, 2) with [lo, hi] per dimension\\n\"\n            \"    npt: list of ints giving number of points per dimension\\n\\n\"\n            \"Returns:\\n\"\n            \"    numpy array of shape (npt[0], npt[1], ..., npt[NDIM-1])\")\n\n        // --- Print info ---\n        .def(\"print_size\", [](const FuncT& f, const std::string& msg) {\n            py::gil_scoped_release release;\n            f.print_size(msg);\n        }, py::arg(\"msg\") = \"\", \"Print tree size information\")\n\n        .def(\"__repr__\", [](const FuncT& f) {\n            std::ostringstream os;\n            os << \"Function<\" << typeid(T).name() << \",\" << NDIM << \">(\";\n            if (f.is_initialized()) {\n                int k;\n                double thresh;\n                long nodes, depth;\n                {\n                    py::gil_scoped_release release;\n                    k = f.k();\n                    thresh = f.thresh();\n                    nodes = f.tree_size();\n                    depth = f.max_depth();\n                }\n                os << \"k=\" << k\n                   << \", thresh=\" << thresh\n                   << \", nodes=\" << nodes\n                   << \", depth=\" << depth;\n            } else {\n                os << \"uninitialized\";\n            }\n            os << \")\";\n            return os.str();\n        });\n}\n\n// --- Free functions operating on Function objects ---\ntemplate<typename T, std::size_t NDIM>\nstatic void bind_function_ops(py::module_& m) {\n    using FuncT = Function<T, NDIM>;\n\n    // copy() free function\n    m.def(\"copy\", [](const FuncT& f) {\n        py::gil_scoped_release release;\n        return madness::copy(f);\n    }, py::arg(\"f\"), \"Deep copy of a function\");\n\n    // inner() free function\n    m.def(\"inner\", [](const FuncT& f, const FuncT& g) {\n        py::gil_scoped_release release;\n        return madness::inner(f, g);\n    }, py::arg(\"f\"), py::arg(\"g\"), \"Inner product of two functions\");\n}\n\n// --- FunctionFactory<T,NDIM> Python binding ---\ntemplate<typename T, std::size_t NDIM>\nstatic void bind_factory_type(py::module_& m, const char* name) {\n    using FactoryT = FunctionFactory<T, NDIM>;\n\n    py::class_<FactoryT>(m, name,\n        \"Chainable factory for configuring Function construction\")\n        .def(py::init<World&>(), py::arg(\"world\"))\n\n        // Functor / callable\n        .def(\"functor\", [](FactoryT& self, py::object callable) -> FactoryT& {\n            std::shared_ptr<FunctionFunctorInterface<T, NDIM>> f =\n                std::make_shared<PyFunctor<T, NDIM>>(callable);\n            self.functor(f);\n            return self;\n        }, py::arg(\"f\"), py::return_value_policy::reference_internal,\n           \"Set Python callable as functor\")\n\n        // Wavelet settings\n        .def(\"k\", [](FactoryT& self, int k) -> FactoryT& {\n            return self.k(k);\n        }, py::arg(\"k\"), py::return_value_policy::reference_internal,\n           \"Set wavelet order\")\n        .def(\"thresh\", [](FactoryT& self, double t) -> FactoryT& {\n            return self.thresh(t);\n        }, py::arg(\"thresh\"), py::return_value_policy::reference_internal,\n           \"Set truncation threshold\")\n\n        // Refinement\n        .def(\"initial_level\", [](FactoryT& self, int level) -> FactoryT& {\n            return self.initial_level(level);\n        }, py::arg(\"level\"), py::return_value_policy::reference_internal,\n           \"Set initial projection level\")\n        .def(\"max_refine_level\", [](FactoryT& self, int level) -> FactoryT& {\n            return self.max_refine_level(level);\n        }, py::arg(\"level\"), py::return_value_policy::reference_internal,\n           \"Set maximum adaptive refinement level\")\n        .def(\"refine\", [](FactoryT& self, bool flag) -> FactoryT& {\n            return self.refine(flag);\n        }, py::arg(\"flag\") = true, py::return_value_policy::reference_internal,\n           \"Enable/disable adaptive refinement\")\n        .def(\"norefine\", [](FactoryT& self) -> FactoryT& {\n            return self.norefine(true);\n        }, py::return_value_policy::reference_internal,\n           \"Disable adaptive refinement\")\n        .def(\"autorefine\", [](FactoryT& self) -> FactoryT& {\n            return self.autorefine();\n        }, py::return_value_policy::reference_internal,\n           \"Enable auto-refinement in operations\")\n        .def(\"noautorefine\", [](FactoryT& self) -> FactoryT& {\n            return self.noautorefine();\n        }, py::return_value_policy::reference_internal,\n           \"Disable auto-refinement\")\n\n        // Truncation\n        .def(\"truncate_mode\", [](FactoryT& self, int mode) -> FactoryT& {\n            return self.truncate_mode(mode);\n        }, py::arg(\"mode\"), py::return_value_policy::reference_internal,\n           \"Set truncation mode (0, 1, or 2)\")\n        .def(\"truncate_on_project\", [](FactoryT& self) -> FactoryT& {\n            return self.truncate_on_project();\n        }, py::return_value_policy::reference_internal,\n           \"Enable truncation during projection\")\n        .def(\"notruncate_on_project\", [](FactoryT& self) -> FactoryT& {\n            return self.notruncate_on_project();\n        }, py::return_value_policy::reference_internal,\n           \"Disable truncation during projection\")\n\n        // Fencing\n        .def(\"fence\", [](FactoryT& self, bool flag) -> FactoryT& {\n            return self.fence(flag);\n        }, py::arg(\"flag\") = true, py::return_value_policy::reference_internal,\n           \"Enable/disable fence\")\n        .def(\"nofence\", [](FactoryT& self) -> FactoryT& {\n            return self.nofence();\n        }, py::return_value_policy::reference_internal,\n           \"Disable fence\")\n\n        // Empty function\n        .def(\"empty\", [](FactoryT& self) -> FactoryT& {\n            return self.empty();\n        }, py::return_value_policy::reference_internal,\n           \"Create an empty function (no projection)\")\n\n        // Build the function\n        .def(\"create\", [](FactoryT& self) {\n            using FuncT = Function<T, NDIM>;\n            py::gil_scoped_release release;\n            return FuncT(self);\n        }, \"Build and return the Function from this factory's settings\");\n}\n\nvoid bind_function(py::module_& m) {\n    // Real functions in 1D–6D\n    bind_function_type<double, 1>(m, \"Function1D\");\n    bind_function_type<double, 2>(m, \"Function2D\");\n    bind_function_type<double, 3>(m, \"Function3D\");\n    bind_function_type<double, 4>(m, \"Function4D\");\n    bind_function_type<double, 5>(m, \"Function5D\");\n    bind_function_type<double, 6>(m, \"Function6D\");\n\n    // Complex 3D (needed for periodic systems)\n    bind_function_type<double_complex, 3>(m, \"ComplexFunction3D\");\n\n    // Free functions - overloaded for each type via pybind11 dispatch\n    bind_function_ops<double, 1>(m);\n    bind_function_ops<double, 2>(m);\n    bind_function_ops<double, 3>(m);\n    bind_function_ops<double, 4>(m);\n    bind_function_ops<double, 5>(m);\n    bind_function_ops<double, 6>(m);\n    bind_function_ops<double_complex, 3>(m);\n\n    // FunctionFactory bindings\n    bind_factory_type<double, 1>(m, \"FunctionFactory1D\");\n    bind_factory_type<double, 2>(m, \"FunctionFactory2D\");\n    bind_factory_type<double, 3>(m, \"FunctionFactory3D\");\n    bind_factory_type<double, 4>(m, \"FunctionFactory4D\");\n    bind_factory_type<double, 5>(m, \"FunctionFactory5D\");\n    bind_factory_type<double, 6>(m, \"FunctionFactory6D\");\n    bind_factory_type<double_complex, 3>(m, \"ComplexFunctionFactory3D\");\n}\n"
  },
  {
    "path": "src/pymadness/src/_pymadness/bind_operators.cpp",
    "content": "/*\n  pymadness - Python bindings for MADNESS\n  Operators: SeparatedConvolution (BSH, Coulomb, Slater), Derivative.\n\n  SeparatedConvolution and Derivative inherit from WorldObject which is\n  not copyable/movable. We use shared_ptr holders and pointer factory\n  functions throughout.\n*/\n\n#include <pybind11/pybind11.h>\n#include <pybind11/numpy.h>\n#include <pybind11/stl.h>\n#include <pybind11/complex.h>\n\n#include <madness/mra/mra.h>\n#include <madness/mra/operator.h>\n#include <madness/mra/derivative.h>\n\nnamespace py = pybind11;\nusing namespace madness;\n\nusing SepConv3D = SeparatedConvolution<double, 3>;\nusing SepConv1D = SeparatedConvolution<double, 1>;\n\nvoid bind_operators(py::module_& m) {\n\n    // =====================================================================\n    // SeparatedConvolution — held via shared_ptr (WorldObject not copyable)\n    // =====================================================================\n    py::class_<SepConv3D, std::shared_ptr<SepConv3D>>(m, \"SeparatedConvolution3D\",\n        \"Integral operator represented as a separated convolution in 3D\");\n\n    py::class_<SepConv1D, std::shared_ptr<SepConv1D>>(m, \"SeparatedConvolution1D\",\n        \"Integral operator represented as a separated convolution in 1D\");\n\n    // =====================================================================\n    // Operator factory functions — use Ptr variants that return raw pointers,\n    // wrap into shared_ptr for Python ownership.\n    // =====================================================================\n\n    // Coulomb operator: 1/(4*pi*r)\n    m.def(\"CoulombOperator\", [](World& world, double lo, double eps)\n            -> std::shared_ptr<SepConv3D> {\n        py::gil_scoped_release release;\n        return std::shared_ptr<SepConv3D>(\n            madness::CoulombOperatorPtr(world, lo, eps));\n    }, py::arg(\"world\"), py::arg(\"lo\"), py::arg(\"eps\"),\n       \"Create Coulomb operator 1/(4*pi*r).\\n\"\n       \"  lo: smallest length scale to resolve\\n\"\n       \"  eps: precision\");\n\n    // BSH operator: exp(-mu*r)/(4*pi*r)\n    m.def(\"BSHOperator3D\", [](World& world, double mu, double lo, double eps)\n            -> std::shared_ptr<SepConv3D> {\n        py::gil_scoped_release release;\n        return std::shared_ptr<SepConv3D>(\n            madness::BSHOperatorPtr3D(world, mu, lo, eps));\n    }, py::arg(\"world\"), py::arg(\"mu\"), py::arg(\"lo\"), py::arg(\"eps\"),\n       \"Create BSH (bound-state Helmholtz) operator exp(-mu*r)/(4*pi*r).\\n\"\n       \"  mu: exponent (sqrt(-2*E) for bound states)\\n\"\n       \"  lo: smallest length scale\\n\"\n       \"  eps: precision\");\n\n    // BSH operator for 1D\n    m.def(\"BSHOperator1D\", [](World& world, double mu, double lo, double eps)\n            -> std::shared_ptr<SepConv1D> {\n        py::gil_scoped_release release;\n        return std::shared_ptr<SepConv1D>(\n            madness::BSHOperatorPtr<1>(world, mu, lo, eps));\n    }, py::arg(\"world\"), py::arg(\"mu\"), py::arg(\"lo\"), py::arg(\"eps\"),\n       \"Create 1D BSH operator\");\n\n    // Slater operator: exp(-mu*r)\n    m.def(\"SlaterOperator\", [](World& world, double mu, double lo, double eps)\n            -> std::shared_ptr<SepConv3D> {\n        py::gil_scoped_release release;\n        return std::shared_ptr<SepConv3D>(\n            madness::SlaterOperatorPtr(world, mu, lo, eps));\n    }, py::arg(\"world\"), py::arg(\"mu\"), py::arg(\"lo\"), py::arg(\"eps\"),\n       \"Create Slater operator exp(-mu*r)\");\n\n    // =====================================================================\n    // apply() — apply operator to function\n    // =====================================================================\n\n    // apply(op, f) for 3D real\n    m.def(\"apply\", [](const SepConv3D& op, const Function<double, 3>& f) {\n        py::gil_scoped_release release;\n        return madness::apply(op, f);\n    }, py::arg(\"op\"), py::arg(\"f\"),\n       \"Apply integral operator to function: result = op(f)\");\n\n    // apply(op, f) for 1D real\n    m.def(\"apply\", [](const SepConv1D& op, const Function<double, 1>& f) {\n        py::gil_scoped_release release;\n        return madness::apply(op, f);\n    }, py::arg(\"op\"), py::arg(\"f\"),\n       \"Apply 1D integral operator to function\");\n\n    // =====================================================================\n    // Derivative operators — also held via shared_ptr (WorldObject)\n    // =====================================================================\n\n    // Free function: create derivative and apply in one shot\n    m.def(\"diff\", [](World& world, const Function<double, 1>& f, std::size_t axis) {\n        py::gil_scoped_release release;\n        Derivative<double, 1> D(world, axis);\n        return D(f);\n    }, py::arg(\"world\"), py::arg(\"f\"), py::arg(\"axis\") = 0,\n       \"Differentiate a 1D function along the given axis\");\n\n    m.def(\"diff\", [](World& world, const Function<double, 2>& f, std::size_t axis) {\n        py::gil_scoped_release release;\n        Derivative<double, 2> D(world, axis);\n        return D(f);\n    }, py::arg(\"world\"), py::arg(\"f\"), py::arg(\"axis\"),\n       \"Differentiate a 2D function along the given axis\");\n\n    m.def(\"diff\", [](World& world, const Function<double, 3>& f, std::size_t axis) {\n        py::gil_scoped_release release;\n        Derivative<double, 3> D(world, axis);\n        return D(f);\n    }, py::arg(\"world\"), py::arg(\"f\"), py::arg(\"axis\"),\n       \"Differentiate a 3D function along the given axis\");\n\n    // Derivative as a reusable class via shared_ptr holder\n    py::class_<Derivative<double, 1>, std::shared_ptr<Derivative<double, 1>>>(\n        m, \"Derivative1D\", \"First derivative operator in 1D\")\n        .def(py::init([](World& w, std::size_t axis) {\n            return std::make_shared<Derivative<double, 1>>(w, axis);\n        }), py::arg(\"world\"), py::arg(\"axis\") = 0)\n        .def(\"__call__\", [](Derivative<double, 1>& D,\n                            const Function<double, 1>& f) {\n            py::gil_scoped_release release;\n            return D(f);\n        }, py::arg(\"f\"), \"Apply derivative to function\");\n\n    py::class_<Derivative<double, 2>, std::shared_ptr<Derivative<double, 2>>>(\n        m, \"Derivative2D\", \"First derivative operator in 2D\")\n        .def(py::init([](World& w, std::size_t axis) {\n            return std::make_shared<Derivative<double, 2>>(w, axis);\n        }), py::arg(\"world\"), py::arg(\"axis\"))\n        .def(\"__call__\", [](Derivative<double, 2>& D,\n                            const Function<double, 2>& f) {\n            py::gil_scoped_release release;\n            return D(f);\n        }, py::arg(\"f\"), \"Apply derivative to function\");\n\n    py::class_<Derivative<double, 3>, std::shared_ptr<Derivative<double, 3>>>(\n        m, \"Derivative3D\", \"First derivative operator in 3D\")\n        .def(py::init([](World& w, std::size_t axis) {\n            return std::make_shared<Derivative<double, 3>>(w, axis);\n        }), py::arg(\"world\"), py::arg(\"axis\"))\n        .def(\"__call__\", [](Derivative<double, 3>& D,\n                            const Function<double, 3>& f) {\n            py::gil_scoped_release release;\n            return D(f);\n        }, py::arg(\"f\"), \"Apply derivative to function\");\n\n    // =====================================================================\n    // Convenience: gradient (returns list of 3 functions)\n    // =====================================================================\n    m.def(\"gradient\", [](World& world, const Function<double, 3>& f) {\n        py::gil_scoped_release release;\n        std::vector<Function<double, 3>> grad(3);\n        for (int axis = 0; axis < 3; ++axis) {\n            Derivative<double, 3> D(world, axis);\n            grad[axis] = D(f);\n        }\n        return grad;\n    }, py::arg(\"world\"), py::arg(\"f\"),\n       \"Compute gradient of a 3D function, returns [df/dx, df/dy, df/dz]\");\n}\n"
  },
  {
    "path": "src/pymadness/src/_pymadness/bind_tensor.cpp",
    "content": "/*\n  pymadness - Python bindings for MADNESS\n  Tensor<T> ↔ numpy array conversion.\n*/\n\n#include <pybind11/pybind11.h>\n#include <pybind11/numpy.h>\n#include <pybind11/stl.h>\n#include <algorithm>\n#include <madness/tensor/tensor.h>\n\nnamespace py = pybind11;\nusing namespace madness;\n\n/// Convert a MADNESS Tensor<double> to a numpy array (copies data).\nstatic py::array_t<double> tensor_to_numpy(const Tensor<double>& t) {\n    std::vector<py::ssize_t> shape(t.ndim());\n    for (long i = 0; i < t.ndim(); ++i) {\n        shape[i] = t.dim(i);\n    }\n    // Allocate a C-contiguous numpy array\n    py::array_t<double> arr(shape);\n    double* dst = arr.mutable_data();\n    if (t.iscontiguous()) {\n        std::copy(t.ptr(), t.ptr() + t.size(), dst);\n    } else {\n        // Non-contiguous tensor (e.g. from slicing): make a contiguous\n        // copy first, then flat-copy into the numpy buffer.\n        Tensor<double> tc = madness::copy(t);\n        std::copy(tc.ptr(), tc.ptr() + tc.size(), dst);\n    }\n    return arr;\n}\n\n/// Convert a numpy array to a MADNESS Tensor<double> (copies data).\nstatic Tensor<double> numpy_to_tensor(py::array_t<double, py::array::c_style> arr) {\n    py::buffer_info info = arr.request();\n    std::vector<long> dims(info.ndim);\n    for (int i = 0; i < info.ndim; ++i) {\n        dims[i] = info.shape[i];\n    }\n    Tensor<double> t(dims);\n    const double* src = static_cast<const double*>(info.ptr);\n    double* dst = t.ptr();\n    std::copy(src, src + t.size(), dst);\n    return t;\n}\n\nvoid bind_tensor(py::module_& m) {\n    py::class_<Tensor<double>>(m, \"Tensor\",\n        \"Multi-dimensional array (MADNESS Tensor)\")\n        .def(py::init<>())\n        .def(\"ndim\", &Tensor<double>::ndim, \"Number of dimensions\")\n        .def(\"dim\", &Tensor<double>::dim, py::arg(\"i\"), \"Size of dimension i\")\n        .def(\"size\", &Tensor<double>::size, \"Total number of elements\")\n        .def(\"normf\", &Tensor<double>::normf, \"Frobenius norm\")\n        .def(\"to_numpy\", [](const Tensor<double>& t) {\n            return tensor_to_numpy(t);\n        }, \"Convert to numpy array (copies data)\")\n        .def_static(\"from_numpy\", [](py::array_t<double, py::array::c_style> arr) {\n            return numpy_to_tensor(arr);\n        }, py::arg(\"array\"), \"Create Tensor from numpy array (copies data)\")\n        .def(\"__repr__\", [](const Tensor<double>& t) {\n            std::ostringstream os;\n            os << \"Tensor(ndim=\" << t.ndim() << \", size=\" << t.size();\n            if (t.ndim() > 0) {\n                os << \", shape=[\";\n                for (long i = 0; i < t.ndim(); ++i) {\n                    if (i > 0) os << \",\";\n                    os << t.dim(i);\n                }\n                os << \"]\";\n            }\n            os << \")\";\n            return os.str();\n        });\n\n    // Conversion helpers exposed at module level\n    m.def(\"tensor_to_numpy\", &tensor_to_numpy,\n        py::arg(\"tensor\"), \"Convert MADNESS Tensor to numpy array\");\n    m.def(\"numpy_to_tensor\", &numpy_to_tensor,\n        py::arg(\"array\"), \"Convert numpy array to MADNESS Tensor\");\n}\n"
  },
  {
    "path": "src/pymadness/src/_pymadness/bind_world.cpp",
    "content": "/*\n  pymadness - Python bindings for MADNESS\n  World initialization, finalization, and World class bindings.\n*/\n\n#include <pybind11/pybind11.h>\n#include <madness/world/MADworld.h>\n#include <madness/mra/mra.h>\n\nnamespace py = pybind11;\nusing namespace madness;\n\nnamespace {\n\n// Static storage for argc/argv needed by MPI_Init\nstruct InitData {\n    static int argc;\n    static const char* argv_str;\n    static char* argv[2];\n    static bool initialized;\n};\n\nint InitData::argc = 1;\nconst char* InitData::argv_str = \"pymadness\";\nchar* InitData::argv[2] = {const_cast<char*>(InitData::argv_str), nullptr};\nbool InitData::initialized = false;\n\n}  // namespace\n\nvoid bind_world(py::module_& m) {\n\n    py::class_<World>(m, \"World\",\n        \"MADNESS parallel runtime world (MPI communicator wrapper)\")\n        .def_property_readonly(\"rank\", &World::rank,\n            \"MPI rank of this process\")\n        .def_property_readonly(\"size\", &World::size,\n            \"Total number of MPI processes\")\n        .def(\"fence\", [](World& w) { w.gop.fence(); },\n            \"Global synchronization barrier\");\n\n    m.def(\"initialize\", [](bool quiet) -> World& {\n        if (InitData::initialized) {\n            // Already initialized - return the default world\n            return *World::world_from_id(0);\n        }\n        char** argv_ptr = InitData::argv;\n        World& world = madness::initialize(InitData::argc, argv_ptr, quiet);\n        madness::startup(world, InitData::argc, argv_ptr);\n        InitData::initialized = true;\n        return world;\n    }, py::arg(\"quiet\") = true,\n       py::return_value_policy::reference,\n       \"Initialize the MADNESS runtime. Returns the default World.\");\n\n    m.def(\"finalize\", []() {\n        if (InitData::initialized) {\n            madness::finalize();\n            InitData::initialized = false;\n        }\n    }, \"Finalize the MADNESS runtime and release all resources.\");\n\n    m.def(\"is_initialized\", []() {\n        return InitData::initialized;\n    }, \"Check whether the MADNESS runtime has been initialized.\");\n}\n"
  },
  {
    "path": "src/pymadness/src/_pymadness/module.cpp",
    "content": "/*\n  pymadness - Python bindings for MADNESS\n  Copyright (C) 2024 MADNESS developers\n\n  Main pybind11 module definition.\n*/\n\n#include <pybind11/pybind11.h>\n\nnamespace py = pybind11;\n\n// Forward declarations for sub-module binders\nvoid bind_world(py::module_& m);\nvoid bind_defaults(py::module_& m);\nvoid bind_tensor(py::module_& m);\nvoid bind_function(py::module_& m);\nvoid bind_operators(py::module_& m);\n\nPYBIND11_MODULE(_pymadness, m) {\n    m.doc() = \"MADNESS: Multiresolution Adaptive Numerical Environment for Scientific Simulation\";\n\n    bind_world(m);\n    bind_defaults(m);\n    bind_tensor(m);\n    bind_function(m);\n    bind_operators(m);\n}\n"
  },
  {
    "path": "src/pymadness/src/_pymadness/py_functor.h",
    "content": "/*\n  pymadness - Python bindings for MADNESS\n  Adapter to use Python callables as MADNESS FunctionFunctorInterface.\n*/\n\n#ifndef PYMADNESS_PY_FUNCTOR_H\n#define PYMADNESS_PY_FUNCTOR_H\n\n#include <pybind11/pybind11.h>\n#include <pybind11/numpy.h>\n#include <pybind11/complex.h>\n#include <madness/mra/function_interface.h>\n#include <atomic>\n#include <stdexcept>\n#include <string>\n#include <thread>\n\nnamespace py = pybind11;\n\n/// Wraps a Python callable as a MADNESS FunctionFunctorInterface<T,NDIM>.\n///\n/// Supports two calling conventions:\n///   - Scalar: f(r) where r has shape (NDIM,), returns scalar\n///   - Vectorized: f(r) where r has shape (npts, NDIM), returns array of shape (npts,)\n///\n/// The vectorized path is always used (supports_vectorized() returns true).\n/// On the first batch call, we probe the callable to detect which convention\n/// it uses and cache the result.\ntemplate<typename T, std::size_t NDIM>\nclass PyFunctor : public madness::FunctionFunctorInterface<T, NDIM> {\n    py::object py_callable_;\n    mutable std::atomic<int> vectorized_mode_{0};  // -1=probing, 0=unknown, 1=returns array, 2=returns scalar\n\npublic:\n    explicit PyFunctor(py::object f) : py_callable_(std::move(f)) {}\n\n    ~PyFunctor() {\n        // py::object's destructor decrements Python's refcount, which requires\n        // the GIL.  MADNESS may destroy the shared_ptr<PyFunctor> from a worker\n        // thread that does not hold the GIL, so we must acquire it here.\n        py::gil_scoped_acquire gil;\n        py_callable_ = py::none();\n    }\n\n    T operator()(const madness::Vector<double, NDIM>& r) const override {\n        py::gil_scoped_acquire gil;\n\n        // Build a numpy array from the coordinate vector\n        py::array_t<double> arr(NDIM);\n        auto buf = arr.mutable_unchecked<1>();\n        for (std::size_t i = 0; i < NDIM; ++i) {\n            buf(i) = r[i];\n        }\n\n        py::object result = py_callable_(arr);\n        return result.cast<T>();\n    }\n\n    bool supports_vectorized() const override { return true; }\n\nprivate:\n    /// Core vectorized evaluation: builds numpy array from coordinate pointers,\n    /// calls the Python callable once, and fills fvals.\n    void eval_vectorized(const madness::Vector<double*, NDIM>& xvals, T* fvals, int npts) const {\n        py::gil_scoped_acquire gil;\n\n        // Build a numpy array of shape (npts, NDIM) from the coordinate arrays\n        py::array_t<double> coords({static_cast<py::ssize_t>(npts),\n                                     static_cast<py::ssize_t>(NDIM)});\n        auto cbuf = coords.mutable_unchecked<2>();\n        for (int i = 0; i < npts; ++i) {\n            for (std::size_t d = 0; d < NDIM; ++d) {\n                cbuf(i, d) = xvals[d][i];\n            }\n        }\n\n        // Probe on first call to determine if callable returns array or scalar.\n        // Note: eval_vectorized always holds the GIL (acquired above), so only one\n        // thread can execute this block at a time.  The atomic CAS still ensures\n        // correct memory ordering across threads.\n        int expected = 0;\n        if (vectorized_mode_.compare_exchange_strong(expected, -1,\n                std::memory_order_acq_rel, std::memory_order_acquire)) {\n            // We won the probe; expected was 0, now set to -1 (in-progress sentinel)\n            int result_mode = 2;  // default: fall back to per-point scalar loop\n            try {\n                py::object result = py_callable_(coords);\n                py::array_t<T> arr = result.cast<py::array_t<T>>();\n                if (arr.ndim() == 1 && arr.shape(0) == npts) {\n                    result_mode = 1;\n                    auto rbuf = arr.template unchecked<1>();\n                    for (int i = 0; i < npts; ++i) {\n                        fvals[i] = rbuf(i);\n                    }\n                }\n            } catch (...) {\n                // Call failed or didn't return a proper array — fall through\n                // Clear any pending Python exception\n                PyErr_Clear();\n            }\n            vectorized_mode_.store(result_mode, std::memory_order_release);\n            if (result_mode == 2) {\n                eval_scalar_loop(coords, fvals, npts);\n            }\n            return;\n        }\n\n        // If another thread is probing (-1), we must release the GIL while\n        // waiting.  The probing thread needs the GIL to finish its Python call,\n        // so spinning here with the GIL held would deadlock.\n        int mode = expected;  // CAS failure: expected holds the current value\n        while (mode == -1) {\n            {\n                py::gil_scoped_release release;\n                std::this_thread::yield();\n            }\n            mode = vectorized_mode_.load(std::memory_order_acquire);\n        }\n\n        if (mode == 1) {\n            py::object result = py_callable_(coords);\n            py::array_t<T> arr = result.cast<py::array_t<T>>();\n            if (arr.ndim() != 1 || arr.shape(0) != npts) {\n                throw std::runtime_error(\n                    \"PyFunctor: vectorized callable returned array with wrong shape; \"\n                    \"expected 1D array of length \" + std::to_string(npts));\n            }\n            auto rbuf = arr.template unchecked<1>();\n            for (int i = 0; i < npts; ++i) {\n                fvals[i] = rbuf(i);\n            }\n        } else {\n            eval_scalar_loop(coords, fvals, npts);\n        }\n    }\n\n    /// Evaluate the callable per-point using scalar convention (still 1 GIL acquisition).\n    void eval_scalar_loop(const py::array_t<double>& coords, T* fvals, int npts) const {\n        auto cbuf = coords.unchecked<2>();\n        for (int i = 0; i < npts; ++i) {\n            py::array_t<double> pt(NDIM);\n            auto pbuf = pt.mutable_unchecked<1>();\n            for (std::size_t d = 0; d < NDIM; ++d) {\n                pbuf(d) = cbuf(i, d);\n            }\n            py::object result = py_callable_(pt);\n            fvals[i] = result.cast<T>();\n        }\n    }\n\npublic:\n    // Vectorized operator() overrides for NDIM = 1..6\n    // These match the signatures in FunctionFunctorInterface (function_interface.h:99-121).\n    // We provide all six and only the one matching our NDIM will be called.\n\n    void operator()(const madness::Vector<double*, 1>& xvals, T* fvals, int npts) const override {\n        if constexpr (NDIM == 1) { eval_vectorized(xvals, fvals, npts); }\n    }\n\n    void operator()(const madness::Vector<double*, 2>& xvals, T* fvals, int npts) const override {\n        if constexpr (NDIM == 2) { eval_vectorized(xvals, fvals, npts); }\n    }\n\n    void operator()(const madness::Vector<double*, 3>& xvals, T* fvals, int npts) const override {\n        if constexpr (NDIM == 3) { eval_vectorized(xvals, fvals, npts); }\n    }\n\n    void operator()(const madness::Vector<double*, 4>& xvals, T* fvals, int npts) const override {\n        if constexpr (NDIM == 4) { eval_vectorized(xvals, fvals, npts); }\n    }\n\n    void operator()(const madness::Vector<double*, 5>& xvals, T* fvals, int npts) const override {\n        if constexpr (NDIM == 5) { eval_vectorized(xvals, fvals, npts); }\n    }\n\n    void operator()(const madness::Vector<double*, 6>& xvals, T* fvals, int npts) const override {\n        if constexpr (NDIM == 6) { eval_vectorized(xvals, fvals, npts); }\n    }\n};\n\n#endif  // PYMADNESS_PY_FUNCTOR_H\n"
  },
  {
    "path": "src/pymadness/src/pymadness/__init__.py",
    "content": "\"\"\"\npymadness - Python interface to MADNESS\n(Multiresolution Adaptive Numerical Environment for Scientific Simulation)\n\nProvides adaptive multiresolution representations of functions and operators\nfor solving integral and differential equations in many dimensions.\n\nBasic usage::\n\n    import pymadness\n\n    with pymadness.World() as world:\n        pymadness.FunctionDefaults3D.set_k(8)\n        pymadness.FunctionDefaults3D.set_thresh(1e-6)\n        pymadness.FunctionDefaults3D.set_cubic_cell(-10.0, 10.0)\n\n        f = pymadness.function_3d(world, lambda r: r[0]**2 + r[1]**2)\n        print(f\"norm = {f.norm2()}\")\n\n\nVectorized callables (recommended)\n-----------------------------------\nFor best performance, write callables that operate on batches of points.\nA vectorized callable receives a numpy array of shape ``(npts, NDIM)``\nand returns an array of shape ``(npts,)``::\n\n    # Scalar (simple, slow — one Python call per quadrature point per box):\n    def f_scalar(r):            # r shape: (3,)\n        return np.exp(-np.dot(r, r))\n\n    # Vectorized (fast — one Python call per box, numpy does the loop):\n    def f_vectorized(r):        # r shape: (npts, 3)\n        return np.exp(-np.sum(r**2, axis=1))\n\npymadness auto-detects which convention the callable uses.  Both signatures\nare passed to ``function_3d`` the same way — no flag needed.\n\nFor functions that cannot be vectorized with numpy, the scalar form still\nworks; pymadness falls back to a per-point Python loop but still acquires\nthe GIL only once per box.\n\n\nnumba @cfunc (zero overhead)\n-----------------------------\nFor maximum performance, compile the function with ``numba.cfunc`` and pass\nit via ``function_3d_cfunc``.  This bypasses Python entirely::\n\n    import numba, math\n    @numba.cfunc(\"float64(CPointer(float64))\")\n    def gaussian_c(r_ptr):\n        r = numba.carray(r_ptr, (3,))\n        return math.exp(-(r[0]**2 + r[1]**2 + r[2]**2))\n\n    f = pymadness.function_3d_cfunc(world, gaussian_c, k=8, thresh=1e-6)\n\"\"\"\n\n# Ensure the directory containing _pymadness.*.so (the parent of this\n# package) is on sys.path.  This is needed when the working directory\n# isn't automatically added, e.g. in Jupyter kernels.\nimport importlib as _importlib, os as _os, sys as _sys\n\ntry:\n    _importlib.import_module(\"_pymadness\")\nexcept ModuleNotFoundError:\n    _parent = _os.path.dirname(_os.path.dirname(_os.path.abspath(__file__)))\n    if _parent not in _sys.path:\n        _sys.path.insert(0, _parent)\n    try:\n        _importlib.import_module(\"_pymadness\")\n    except ModuleNotFoundError:\n        # Provide a helpful error message\n        import glob as _glob\n        _so_files = _glob.glob(_os.path.join(_parent, \"_pymadness*\"))\n        _py_ver = f\"cpython-{_sys.version_info.major}{_sys.version_info.minor}\"\n        _msg = (\n            f\"Cannot find the _pymadness extension module.\\n\"\n            f\"  Looked in: {_parent}\\n\"\n            f\"  Found:     {_so_files or 'nothing'}\\n\"\n            f\"  Running:   Python {_sys.version.split()[0]} ({_py_ver})\\n\"\n            f\"\\n\"\n            f\"Common causes:\\n\"\n            f\"  1. pymadness was built with a different Python version.\\n\"\n            f\"     Rebuild with: cmake --build <builddir> --target _pymadness\\n\"\n            f\"  2. The build directory is not on sys.path.\\n\"\n            f\"     Add to your notebook:  import sys; sys.path.insert(0, '{_parent}')\\n\"\n        )\n        raise ModuleNotFoundError(_msg) from None\n\ndel _importlib, _os, _sys\n\nfrom _pymadness import (\n    # World and runtime\n    World as _RawWorld,\n    initialize as _initialize,\n    finalize as _finalize,\n    is_initialized as _is_initialized,\n\n    # FunctionDefaults\n    FunctionDefaults1D,\n    FunctionDefaults2D,\n    FunctionDefaults3D,\n    FunctionDefaults4D,\n    FunctionDefaults5D,\n    FunctionDefaults6D,\n\n    # Function types\n    Function1D,\n    Function2D,\n    Function3D,\n    Function4D,\n    Function5D,\n    Function6D,\n    ComplexFunction3D,\n\n    # FunctionFactory types\n    FunctionFactory1D,\n    FunctionFactory2D,\n    FunctionFactory3D,\n    FunctionFactory4D,\n    FunctionFactory5D,\n    FunctionFactory6D,\n    ComplexFunctionFactory3D,\n\n    # Operators\n    CoulombOperator,\n    BSHOperator3D,\n    BSHOperator1D,\n    SlaterOperator,\n    Derivative1D,\n    Derivative2D,\n    Derivative3D,\n    SeparatedConvolution1D,\n    SeparatedConvolution3D,\n\n    # Free functions\n    apply,\n    inner,\n    copy,\n    gradient,\n    diff as _diff,\n\n    # Tensor\n    Tensor,\n    tensor_to_numpy,\n    numpy_to_tensor,\n)\n\nfrom . import plotting\n\n\nclass World:\n    \"\"\"Context manager for the MADNESS parallel runtime.\n\n    Usage::\n\n        with pymadness.World() as world:\n            # ... use world ...\n        # runtime is finalized automatically\n\n    Or without context manager::\n\n        world = pymadness.World.get(quiet=True)\n        # ... use world ...\n        pymadness.World.close()\n    \"\"\"\n\n    def __init__(self, quiet=True):\n        self._quiet = quiet\n        self._world = None\n\n    def __enter__(self):\n        self._world = _initialize(self._quiet)\n        return self._world\n\n    def __exit__(self, *args):\n        import gc\n        gc.collect()  # Destroy MADNESS objects before finalizing\n        _finalize()\n        self._world = None\n\n    @staticmethod\n    def get(quiet=True):\n        \"\"\"Initialize MADNESS and return the World object (no context manager).\"\"\"\n        return _initialize(quiet)\n\n    @staticmethod\n    def close():\n        \"\"\"Finalize the MADNESS runtime.\"\"\"\n        _finalize()\n\n\ndef function_1d(world, f, k=None, thresh=None):\n    \"\"\"Create a 1D function from a Python callable.\n\n    The callable can use either calling convention:\n      - Scalar: ``f(r)`` where ``r`` has shape ``(1,)``, returns a float.\n      - Vectorized: ``f(r)`` where ``r`` has shape ``(npts, 1)``, returns\n        an array of shape ``(npts,)``.  This is much faster because the\n        GIL is acquired only once per box instead of once per point.\n\n    Args:\n        world: MADNESS World object\n        f: Python callable (scalar or vectorized)\n        k: wavelet order (None = use FunctionDefaults)\n        thresh: truncation threshold (None = use FunctionDefaults)\n\n    Returns:\n        Function1D\n    \"\"\"\n    return Function1D(world, f,\n                      k=k if k is not None else -1,\n                      thresh=thresh if thresh is not None else -1.0)\n\n\ndef function_2d(world, f, k=None, thresh=None):\n    \"\"\"Create a 2D function from a Python callable.\n\n    The callable can use either calling convention:\n      - Scalar: ``f(r)`` where ``r`` has shape ``(2,)``, returns a float.\n      - Vectorized: ``f(r)`` where ``r`` has shape ``(npts, 2)``, returns\n        an array of shape ``(npts,)``.  This is much faster because the\n        GIL is acquired only once per box instead of once per point.\n\n    Args:\n        world: MADNESS World object\n        f: Python callable (scalar or vectorized)\n        k: wavelet order (None = use FunctionDefaults)\n        thresh: truncation threshold (None = use FunctionDefaults)\n\n    Returns:\n        Function2D\n    \"\"\"\n    return Function2D(world, f,\n                      k=k if k is not None else -1,\n                      thresh=thresh if thresh is not None else -1.0)\n\n\ndef function_3d(world, f, k=None, thresh=None):\n    \"\"\"Create a 3D function from a Python callable.\n\n    The callable can use either calling convention:\n      - Scalar: ``f(r)`` where ``r`` has shape ``(3,)``, returns a float.\n      - Vectorized: ``f(r)`` where ``r`` has shape ``(npts, 3)``, returns\n        an array of shape ``(npts,)``.  This is much faster because the\n        GIL is acquired only once per box instead of once per point.\n\n    Args:\n        world: MADNESS World object\n        f: Python callable (scalar or vectorized)\n        k: wavelet order (None = use FunctionDefaults)\n        thresh: truncation threshold (None = use FunctionDefaults)\n\n    Returns:\n        Function3D\n    \"\"\"\n    return Function3D(world, f,\n                      k=k if k is not None else -1,\n                      thresh=thresh if thresh is not None else -1.0)\n\n\ndef function_1d_cfunc(world, cfunc, k=None, thresh=None):\n    \"\"\"Create a 1D function from a numba @cfunc.\n\n    The cfunc must have signature ``float64(CPointer(float64))`` (a pointer\n    to a double[1] coordinate array).  Pass the compiled cfunc object directly;\n    its address is extracted automatically.\n\n    Args:\n        world: MADNESS World object\n        cfunc: a numba ``@cfunc`` compiled function (with ``.address`` attribute)\n        k: wavelet order (None = use FunctionDefaults)\n        thresh: truncation threshold (None = use FunctionDefaults)\n\n    Returns:\n        Function1D\n    \"\"\"\n    return Function1D.from_cfunc(world, cfunc.address,\n                                 k=k if k is not None else -1,\n                                 thresh=thresh if thresh is not None else -1.0)\n\n\ndef function_2d_cfunc(world, cfunc, k=None, thresh=None):\n    \"\"\"Create a 2D function from a numba @cfunc.\n\n    See :func:`function_1d_cfunc` for details on the cfunc convention.\n\n    Args:\n        world: MADNESS World object\n        cfunc: a numba ``@cfunc`` compiled function\n        k: wavelet order (None = use FunctionDefaults)\n        thresh: truncation threshold (None = use FunctionDefaults)\n\n    Returns:\n        Function2D\n    \"\"\"\n    return Function2D.from_cfunc(world, cfunc.address,\n                                 k=k if k is not None else -1,\n                                 thresh=thresh if thresh is not None else -1.0)\n\n\ndef function_3d_cfunc(world, cfunc, k=None, thresh=None):\n    \"\"\"Create a 3D function from a numba @cfunc.\n\n    See :func:`function_1d_cfunc` for details on the cfunc convention.\n\n    Args:\n        world: MADNESS World object\n        cfunc: a numba ``@cfunc`` compiled function\n        k: wavelet order (None = use FunctionDefaults)\n        thresh: truncation threshold (None = use FunctionDefaults)\n\n    Returns:\n        Function3D\n    \"\"\"\n    return Function3D.from_cfunc(world, cfunc.address,\n                                 k=k if k is not None else -1,\n                                 thresh=thresh if thresh is not None else -1.0)\n\n\ndef function_4d(world, f, k=None, thresh=None):\n    \"\"\"Create a 4D function from a Python callable.\n\n    The callable can use either calling convention:\n      - Scalar: ``f(r)`` where ``r`` has shape ``(4,)``, returns a float.\n      - Vectorized: ``f(r)`` where ``r`` has shape ``(npts, 4)``, returns\n        an array of shape ``(npts,)``.\n\n    Args:\n        world: MADNESS World object\n        f: Python callable (scalar or vectorized)\n        k: wavelet order (None = use FunctionDefaults)\n        thresh: truncation threshold (None = use FunctionDefaults)\n\n    Returns:\n        Function4D\n    \"\"\"\n    return Function4D(world, f,\n                      k=k if k is not None else -1,\n                      thresh=thresh if thresh is not None else -1.0)\n\n\ndef function_5d(world, f, k=None, thresh=None):\n    \"\"\"Create a 5D function from a Python callable.\n\n    The callable can use either calling convention:\n      - Scalar: ``f(r)`` where ``r`` has shape ``(5,)``, returns a float.\n      - Vectorized: ``f(r)`` where ``r`` has shape ``(npts, 5)``, returns\n        an array of shape ``(npts,)``.\n\n    Args:\n        world: MADNESS World object\n        f: Python callable (scalar or vectorized)\n        k: wavelet order (None = use FunctionDefaults)\n        thresh: truncation threshold (None = use FunctionDefaults)\n\n    Returns:\n        Function5D\n    \"\"\"\n    return Function5D(world, f,\n                      k=k if k is not None else -1,\n                      thresh=thresh if thresh is not None else -1.0)\n\n\ndef function_6d(world, f, k=None, thresh=None):\n    \"\"\"Create a 6D function from a Python callable.\n\n    The callable can use either calling convention:\n      - Scalar: ``f(r)`` where ``r`` has shape ``(6,)``, returns a float.\n      - Vectorized: ``f(r)`` where ``r`` has shape ``(npts, 6)``, returns\n        an array of shape ``(npts,)``.\n\n    Args:\n        world: MADNESS World object\n        f: Python callable (scalar or vectorized)\n        k: wavelet order (None = use FunctionDefaults)\n        thresh: truncation threshold (None = use FunctionDefaults)\n\n    Returns:\n        Function6D\n    \"\"\"\n    return Function6D(world, f,\n                      k=k if k is not None else -1,\n                      thresh=thresh if thresh is not None else -1.0)\n\n\ndef diff(world, f, axis=0):\n    \"\"\"Compute derivative of a function along a given axis.\n\n    Args:\n        world: MADNESS World object\n        f: Function1D, Function2D, or Function3D\n        axis: direction to differentiate (0=x, 1=y, 2=z)\n\n    Returns:\n        Derivative of f along the specified axis\n    \"\"\"\n    return _diff(world, f, axis)\n\n\ndef exp(f):\n    \"\"\"Pointwise exponential: returns a new function g(x) = exp(f(x)).\n\n    Args:\n        f: a MADNESS Function\n\n    Returns:\n        New function with exp applied pointwise.\n    \"\"\"\n    g = f.copy()\n    g.unaryop(\"exp\")\n    return g\n\n\ndef log(f):\n    \"\"\"Pointwise natural logarithm: returns a new function g(x) = log(f(x)).\n\n    The function values should be positive; log of non-positive values\n    will produce -inf or NaN.\n\n    Args:\n        f: a MADNESS Function\n\n    Returns:\n        New function with log applied pointwise.\n    \"\"\"\n    g = f.copy()\n    g.unaryop(\"log\")\n    return g\n\n\ndef sqrt(f):\n    \"\"\"Pointwise square root: returns a new function g(x) = sqrt(f(x)).\n\n    Args:\n        f: a MADNESS Function\n\n    Returns:\n        New function with sqrt applied pointwise.\n    \"\"\"\n    g = f.copy()\n    g.unaryop(\"sqrt\")\n    return g\n\n\n__all__ = [\n    # Context manager\n    \"World\",\n    # Function constructors\n    \"function_1d\", \"function_2d\", \"function_3d\",\n    \"function_4d\", \"function_5d\", \"function_6d\",\n    \"function_1d_cfunc\", \"function_2d_cfunc\", \"function_3d_cfunc\",\n    # Function types\n    \"Function1D\", \"Function2D\", \"Function3D\",\n    \"Function4D\", \"Function5D\", \"Function6D\",\n    \"ComplexFunction3D\",\n    # FunctionFactory types\n    \"FunctionFactory1D\", \"FunctionFactory2D\", \"FunctionFactory3D\",\n    \"FunctionFactory4D\", \"FunctionFactory5D\", \"FunctionFactory6D\",\n    \"ComplexFunctionFactory3D\",\n    # Defaults\n    \"FunctionDefaults1D\", \"FunctionDefaults2D\", \"FunctionDefaults3D\",\n    \"FunctionDefaults4D\", \"FunctionDefaults5D\", \"FunctionDefaults6D\",\n    # Operators\n    \"CoulombOperator\", \"BSHOperator3D\", \"BSHOperator1D\", \"SlaterOperator\",\n    \"Derivative1D\", \"Derivative2D\", \"Derivative3D\",\n    \"SeparatedConvolution1D\", \"SeparatedConvolution3D\",\n    # Free functions\n    \"apply\", \"inner\", \"copy\", \"gradient\", \"diff\",\n    # Pointwise math\n    \"exp\", \"log\", \"sqrt\",\n    # Plotting\n    \"plotting\",\n    # Tensor\n    \"Tensor\", \"tensor_to_numpy\", \"numpy_to_tensor\",\n]\n"
  },
  {
    "path": "src/pymadness/src/pymadness/plotting.py",
    "content": "\"\"\"\npymadness.plotting - Visualization helpers for MADNESS functions.\n\nProvides convenience functions for plotting 1D, 2D, and 3D MADNESS functions\nusing matplotlib.  All functions accept a MADNESS Function object and\nevaluate it on a regular grid via ``eval_cube()``.\n\nRequires matplotlib (optional dependency of pymadness).\n3D surface plots (``plot_surface``) use plotly for fast WebGL rendering\nwith interactive rotate/zoom (``pip install plotly``).\n\nQuick examples::\n\n    import pymadness\n    from pymadness.plotting import plot_1d, plot_2d_slice, plot_surface\n\n    with pymadness.World() as world:\n        pymadness.FunctionDefaults3D.set_k(8)\n        pymadness.FunctionDefaults3D.set_thresh(1e-6)\n        pymadness.FunctionDefaults3D.set_cubic_cell(-10.0, 10.0)\n\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n\n        # 1D line cut along the x-axis\n        plot_line_cut(f, axis=0, npt=200, show=True)\n\n        # Static 2D slice in the z=0 plane\n        plot_2d_slice(f, fixed_axis=2, fixed_value=0.0, npt=200, show=True)\n\n        # Interactive 3D surface plot of the same slice (plotly, WebGL)\n        plot_surface(f, fixed_axis=2, fixed_value=0.0, npt=100)\n\"\"\"\n\nimport numpy as np\n\n\ndef eval_grid_1d(f, lo=None, hi=None, npt=200):\n    \"\"\"Evaluate a 1D function on a uniform grid.\n\n    Args:\n        f: Function1D\n        lo: lower bound (default: from FunctionDefaults)\n        hi: upper bound (default: from FunctionDefaults)\n        npt: number of grid points\n\n    Returns:\n        (x, values) — 1D numpy arrays\n    \"\"\"\n    import pymadness\n    if lo is None or hi is None:\n        cell = pymadness.FunctionDefaults1D.get_cell()\n        cell_np = pymadness.tensor_to_numpy(cell)\n        if lo is None:\n            lo = cell_np[0, 0]\n        if hi is None:\n            hi = cell_np[0, 1]\n    cell = np.array([[lo, hi]])\n    vals = f.eval_cube(cell, [npt])\n    x = np.linspace(lo, hi, npt)\n    return x, vals\n\n\ndef plot_1d(f, lo=None, hi=None, npt=200, label=None, ax=None, show=False,\n            **kwargs):\n    \"\"\"Plot a 1D MADNESS function.\n\n    Args:\n        f: Function1D\n        lo, hi: plot range (default: simulation cell)\n        npt: number of grid points\n        label: line label\n        ax: matplotlib Axes (created if None)\n        show: call plt.show() when done\n        **kwargs: passed to ax.plot()\n\n    Returns:\n        (fig, ax)\n    \"\"\"\n    import matplotlib.pyplot as plt\n    x, vals = eval_grid_1d(f, lo, hi, npt)\n    if ax is None:\n        fig, ax = plt.subplots()\n    else:\n        fig = ax.get_figure()\n    ax.plot(x, vals, label=label, **kwargs)\n    ax.set_xlabel(\"x\")\n    if label is not None:\n        ax.legend()\n    if show:\n        plt.show()\n    return fig, ax\n\n\ndef plot_line_cut(f, axis=0, fixed=None, npt=200, lo=None, hi=None,\n                  label=None, ax=None, show=False, **kwargs):\n    \"\"\"Plot a line cut of a 2D or 3D function along one axis.\n\n    For a 3D function with ``axis=0``, this evaluates f(x, y0, z0) where\n    y0, z0 are given by ``fixed`` (default: all zeros).\n\n    Args:\n        f: Function2D or Function3D\n        axis: which axis to sweep (0=x, 1=y, 2=z)\n        fixed: values for the other coordinates (default: zeros).\n               For 3D with axis=0: fixed=[y0, z0].\n        npt: number of grid points along the swept axis\n        lo, hi: range for the swept axis (default: simulation cell)\n        label: line label\n        ax: matplotlib Axes\n        show: call plt.show()\n        **kwargs: passed to ax.plot()\n\n    Returns:\n        (fig, ax)\n    \"\"\"\n    import matplotlib.pyplot as plt\n    import pymadness\n\n    ndim = _get_ndim(f)\n    if fixed is None:\n        fixed = [0.0] * (ndim - 1)\n    fixed = list(fixed)\n    if len(fixed) != ndim - 1:\n        raise ValueError(\n            f\"fixed must have {ndim - 1} values, got {len(fixed)}\")\n\n    # Determine range along swept axis\n    defaults = _get_defaults(ndim)\n    if lo is None or hi is None:\n        cell = pymadness.tensor_to_numpy(defaults.get_cell())\n        if lo is None:\n            lo = cell[axis, 0]\n        if hi is None:\n            hi = cell[axis, 1]\n\n    # Build the grid: narrow cell with 1 point in each fixed dimension\n    cell_arr = np.zeros((ndim, 2))\n    npt_list = [1] * ndim\n    for i in range(ndim):\n        if i == axis:\n            cell_arr[i] = [lo, hi]\n            npt_list[i] = npt\n        else:\n            # Insert the fixed value in the correct position\n            idx = i if i < axis else i - 1\n            v = fixed[idx]\n            cell_arr[i] = [v, v]\n            npt_list[i] = 1\n\n    vals = f.eval_cube(cell_arr, npt_list)\n    vals = vals.squeeze()  # collapse singleton dimensions\n\n    x = np.linspace(lo, hi, npt)\n    if ax is None:\n        fig, ax = plt.subplots()\n    else:\n        fig = ax.get_figure()\n    ax.plot(x, vals, label=label, **kwargs)\n    ax.set_xlabel(\"xyz\"[axis] if axis < 3 else f\"dim {axis}\")\n    if label is not None:\n        ax.legend()\n    if show:\n        plt.show()\n    return fig, ax\n\n\ndef plot_2d_slice(f, fixed_axis=2, fixed_value=0.0, npt=200,\n                  lo=None, hi=None, ax=None, show=False, **kwargs):\n    \"\"\"Plot a 2D color map of a 3D function in one plane.\n\n    Args:\n        f: Function3D\n        fixed_axis: which axis to hold constant (0=x, 1=y, 2=z)\n        fixed_value: value of the fixed coordinate\n        npt: grid points per free axis\n        lo, hi: range for the free axes (default: simulation cell)\n        ax: matplotlib Axes\n        show: call plt.show()\n        **kwargs: passed to ax.pcolormesh()\n\n    Returns:\n        (fig, ax, mesh)\n    \"\"\"\n    import matplotlib.pyplot as plt\n    import pymadness\n\n    ndim = _get_ndim(f)\n    if ndim < 3:\n        raise ValueError(\"plot_2d_slice requires a 3D (or higher) function\")\n\n    cell = pymadness.tensor_to_numpy(_get_defaults(ndim).get_cell())\n\n    # Build cell and npt arrays for eval_cube\n    # Only two axes are sampled; any additional non-fixed axes are pinned to\n    # their cell midpoint so that eval_cube always returns a 2D result.\n    cell_arr = np.zeros((ndim, 2))\n    npt_list = [1] * ndim\n    free_axes = []\n    for i in range(ndim):\n        if i == fixed_axis:\n            cell_arr[i] = [fixed_value, fixed_value]\n            npt_list[i] = 1\n        elif len(free_axes) < 2:\n            cell_arr[i, 0] = lo if lo is not None else cell[i, 0]\n            cell_arr[i, 1] = hi if hi is not None else cell[i, 1]\n            npt_list[i] = npt\n            free_axes.append(i)\n        else:\n            # Pin extra axes to their cell midpoint\n            mid = (cell[i, 0] + cell[i, 1]) / 2.0\n            cell_arr[i] = [mid, mid]\n            npt_list[i] = 1\n\n    vals = f.eval_cube(cell_arr, npt_list)\n    vals = vals.squeeze()  # shape (npt, npt)\n\n    # Build coordinate arrays for the two free axes\n    x = np.linspace(cell_arr[free_axes[0], 0], cell_arr[free_axes[0], 1], npt)\n    y = np.linspace(cell_arr[free_axes[1], 0], cell_arr[free_axes[1], 1], npt)\n\n    if ax is None:\n        fig, ax = plt.subplots()\n    else:\n        fig = ax.get_figure()\n\n    mesh = ax.pcolormesh(x, y, vals.T, shading=\"auto\", **kwargs)\n    fig.colorbar(mesh, ax=ax)\n    labels = \"xyz\"\n    ax.set_xlabel(labels[free_axes[0]] if free_axes[0] < 3 else f\"dim {free_axes[0]}\")\n    ax.set_ylabel(labels[free_axes[1]] if free_axes[1] < 3 else f\"dim {free_axes[1]}\")\n    ax.set_aspect(\"equal\")\n    ax.set_title(f\"{labels[fixed_axis]}={fixed_value:.2f}\" if fixed_axis < 3\n                 else f\"dim {fixed_axis}={fixed_value:.2f}\")\n    if show:\n        plt.show()\n    return fig, ax, mesh\n\n\ndef plot_2d(f, npt=200, lo=None, hi=None, ax=None, show=False, **kwargs):\n    \"\"\"Plot a 2D MADNESS function as a color map.\n\n    Args:\n        f: Function2D\n        npt: grid points per axis\n        lo, hi: range for both axes (default: simulation cell)\n        ax: matplotlib Axes\n        show: call plt.show()\n        **kwargs: passed to ax.pcolormesh()\n\n    Returns:\n        (fig, ax, mesh)\n    \"\"\"\n    import matplotlib.pyplot as plt\n    import pymadness\n\n    cell = pymadness.tensor_to_numpy(pymadness.FunctionDefaults2D.get_cell())\n    cell_arr = np.zeros((2, 2))\n    for i in range(2):\n        cell_arr[i, 0] = lo if lo is not None else cell[i, 0]\n        cell_arr[i, 1] = hi if hi is not None else cell[i, 1]\n\n    vals = f.eval_cube(cell_arr, [npt, npt])\n    x = np.linspace(cell_arr[0, 0], cell_arr[0, 1], npt)\n    y = np.linspace(cell_arr[1, 0], cell_arr[1, 1], npt)\n\n    if ax is None:\n        fig, ax = plt.subplots()\n    else:\n        fig = ax.get_figure()\n\n    mesh = ax.pcolormesh(x, y, vals.T, shading=\"auto\", **kwargs)\n    fig.colorbar(mesh, ax=ax)\n    ax.set_xlabel(\"x\")\n    ax.set_ylabel(\"y\")\n    ax.set_aspect(\"equal\")\n    if show:\n        plt.show()\n    return fig, ax, mesh\n\n\n# --- 3D surface plots (plotly) ---\n\n_DEFAULT_COLORSCALES = [\n    \"RdBu_r\", \"Viridis\", \"Plasma\", \"Cividis\", \"Inferno\",\n    \"Turbo\", \"Hot\", \"Electric\", \"Blues\", \"Greens\",\n]\n\n\ndef plot_surface(f, fixed_axis=2, fixed_value=0.0, npt=100,\n                 lo=None, hi=None, xrange=None, yrange=None, zrange=None,\n                 colorscale=\"RdBu_r\", opacity=1.0,\n                 labels=None, show=True, **kwargs):\n    \"\"\"Plot one or more MADNESS functions as interactive 3D surfaces using plotly.\n\n    Accepts a single function or a list/tuple of functions.  When multiple\n    functions are given, each is rendered as a separate surface with its own\n    colorscale (auto-assigned unless ``colorscale`` is a list).\n\n    For Function2D, plots the function directly as a surface.\n    For Function3D (or higher), plots a 2D slice as a surface.\n\n    The plot is rendered via WebGL and supports interactive rotate, zoom,\n    and pan out of the box — in Jupyter notebooks, standalone scripts, and\n    the browser.\n\n    Requires plotly (``pip install plotly``).\n\n    Args:\n        f: a MADNESS Function, or a list/tuple of Functions\n        fixed_axis: for 3D+ functions, axis to hold constant (0=x, 1=y, 2=z)\n        fixed_value: for 3D+ functions, value along the fixed axis\n        npt: grid points per free axis\n        lo, hi: range for the free axes (default: simulation cell).\n            Sets both spatial axes at once.  Use ``xrange``/``yrange`` to\n            override individual axes.\n        xrange: [lo, hi] for the first free axis (overrides ``lo``/``hi``)\n        yrange: [lo, hi] for the second free axis (overrides ``lo``/``hi``)\n        zrange: [lo, hi] for the function-value (z) axis display range\n        colorscale: plotly colorscale name, or list of names (one per function).\n            Default: auto-cycles through distinct colorscales.\n        opacity: surface opacity 0.0–1.0, or list of opacities\n        labels: list of trace names (one per function) for the legend\n        show: display the figure immediately (default: True)\n        **kwargs: passed to each ``go.Surface()``\n\n    Returns:\n        plotly ``Figure`` object (only when ``show=False``)\n\n    Examples::\n\n        # Single function\n        plot_surface(f, npt=100)\n\n        # Zoom into a region and clamp z-axis\n        plot_surface(f, npt=100, xrange=[-2, 2], yrange=[-2, 2],\n                     zrange=[-0.5, 1.0])\n\n        # Multiple functions overlaid\n        plot_surface([f1, f2, f3], npt=150, fixed_value=0.1,\n                     colorscale=\"Viridis\", opacity=0.5)\n\n        # Per-function colorscales and labels\n        plot_surface([rho, V_nuc], npt=100,\n                     colorscale=[\"RdBu_r\", \"Greens\"],\n                     opacity=[0.9, 0.5],\n                     labels=[\"density\", \"nuclear potential\"])\n    \"\"\"\n    try:\n        import plotly.graph_objects as go\n    except ImportError:\n        raise ImportError(\n            \"plotly is required for plot_surface. Install it with:\\n\"\n            \"  pip install plotly\") from None\n\n    # Normalize to a list of functions\n    if not isinstance(f, (list, tuple)):\n        funcs = [f]\n    else:\n        funcs = list(f)\n    nfuncs = len(funcs)\n\n    # Normalize per-trace parameters to lists\n    if isinstance(colorscale, str):\n        if nfuncs == 1:\n            colorscales = [colorscale]\n        else:\n            # Auto-assign distinct colorscales\n            colorscales = [_DEFAULT_COLORSCALES[i % len(_DEFAULT_COLORSCALES)]\n                           for i in range(nfuncs)]\n    else:\n        colorscales = list(colorscale)\n\n    if isinstance(opacity, (int, float)):\n        opacities = [opacity] * nfuncs\n    else:\n        opacities = list(opacity)\n\n    if labels is None:\n        trace_labels = [f\"f{i+1}\" if nfuncs > 1 else None for i in range(nfuncs)]\n    else:\n        trace_labels = list(labels)\n        # Pad or truncate so len(trace_labels) always equals nfuncs\n        if len(trace_labels) < nfuncs:\n            trace_labels += [f\"f{i+1}\" for i in range(len(trace_labels), nfuncs)]\n        elif len(trace_labels) > nfuncs:\n            trace_labels = trace_labels[:nfuncs]\n\n    # Resolve per-axis spatial ranges: xrange/yrange override lo/hi\n    eff_xlo = xrange[0] if xrange is not None else lo\n    eff_xhi = xrange[1] if xrange is not None else hi\n    eff_ylo = yrange[0] if yrange is not None else lo\n    eff_yhi = yrange[1] if yrange is not None else hi\n\n    fig = go.Figure()\n    axis_labels = None\n\n    for i, func in enumerate(funcs):\n        ndim = _get_ndim(func)\n        if ndim == 2:\n            x, y, vals, ax_labels = _eval_2d_data(\n                func, npt=npt, lo=lo, hi=hi,\n                xlo=eff_xlo, xhi=eff_xhi, ylo=eff_ylo, yhi=eff_yhi)\n        elif ndim >= 3:\n            x, y, vals, ax_labels = _eval_2d_slice_data(\n                func, fixed_axis=fixed_axis, fixed_value=fixed_value,\n                npt=npt, lo=lo, hi=hi,\n                xlo=eff_xlo, xhi=eff_xhi, ylo=eff_ylo, yhi=eff_yhi)\n        else:\n            raise ValueError(\"plot_surface requires 2D or higher functions\")\n\n        if axis_labels is None:\n            axis_labels = ax_labels\n\n        trace_kwargs = dict(kwargs)\n        if trace_labels[i] is not None:\n            trace_kwargs[\"name\"] = trace_labels[i]\n        # Show individual colorbars only when there are multiple surfaces\n        if nfuncs > 1:\n            trace_kwargs.setdefault(\"showscale\", True)\n            trace_kwargs.setdefault(\"colorbar\", dict(\n                x=1.0 + 0.12 * i, len=0.6, title=trace_labels[i]))\n\n        fig.add_trace(go.Surface(\n            x=x, y=y, z=vals.T,\n            colorscale=colorscales[i % len(colorscales)],\n            opacity=opacities[i % len(opacities)],\n            **trace_kwargs\n        ))\n\n    title = \"\"\n    ndim0 = _get_ndim(funcs[0])\n    if ndim0 >= 3:\n        al = \"xyzuvw\"\n        title = f\"{al[fixed_axis]} = {fixed_value:.2f}\"\n\n    if axis_labels is None:\n        axis_labels = [\"x\", \"y\"]\n\n    xaxis_opts = dict(title=axis_labels[0])\n    yaxis_opts = dict(title=axis_labels[1])\n    zaxis_opts = dict(title=\"f\")\n    if xrange is not None:\n        xaxis_opts[\"range\"] = list(xrange)\n    if yrange is not None:\n        yaxis_opts[\"range\"] = list(yrange)\n    if zrange is not None:\n        zaxis_opts[\"range\"] = list(zrange)\n\n    scene = dict(\n        xaxis=xaxis_opts,\n        yaxis=yaxis_opts,\n        zaxis=zaxis_opts,\n        aspectmode=\"manual\",\n        aspectratio=dict(x=1, y=1, z=0.6),\n    )\n\n    fig.update_layout(\n        title=title,\n        scene=scene,\n        margin=dict(l=0, r=0, t=40, b=0),\n    )\n\n    if not show:\n        return fig\n    _show_plotly(fig)\n    # Return None so Jupyter doesn't auto-display a second copy.\n    # Use show=False to get the Figure object back.\n\n\n# Keep as an alias for explicit slice calls\nplot_surface_slice = plot_surface\n\n\ndef _show_plotly(fig):\n    \"\"\"Display a plotly figure, auto-detecting the best renderer.\"\"\"\n    try:\n        from IPython.display import display, HTML\n        shell = get_ipython().__class__.__name__  # noqa: F821\n        if shell == \"ZMQInteractiveShell\":\n            display(HTML(fig.to_html(include_plotlyjs=\"cdn\", full_html=False)))\n        else:\n            fig.show()\n    except (NameError, ImportError):\n        fig.show()\n\n\n# --- Interactive 2D plots ---\n\nclass InteractivePlot2D:\n    \"\"\"Interactive 2D color-map plot that re-evaluates the MADNESS function at\n    constant resolution when the view changes (zoom / pan).\n\n    For 3D+ functions displayed as slices, the slice plane and position can be\n    changed interactively:\n\n    - Press **x**, **y**, or **z** to switch the fixed (sliced) axis.\n    - **Scroll** the mouse wheel to move the slice position along the fixed axis.\n\n    The plot title shows the current slice plane and position.\n\n    Args:\n        f: A MADNESS Function (2D or 3D+).\n        fixed_axis: For 3D+ functions, the axis to hold constant (0/1/2 = x/y/z).\n        fixed_value: Initial value along the fixed axis.\n        npt: Grid points per free axis (stays constant on zoom).\n        lo, hi: Initial range for the free axes (default: simulation cell).\n        scroll_step: Fraction of the axis range to move per scroll tick.\n        cmap: Matplotlib colormap name.\n        **kwargs: Extra keyword arguments passed to ``pcolormesh()``.\n\n    Returns:\n        An ``InteractivePlot2D`` instance (keeps references to fig, ax, etc.).\n    \"\"\"\n\n    def __init__(self, f, fixed_axis=2, fixed_value=0.0, npt=200,\n                 lo=None, hi=None, scroll_step=0.02, cmap=\"RdBu_r\",\n                 **kwargs):\n        import matplotlib.pyplot as plt\n        import pymadness\n\n        self.f = f\n        self.npt = npt\n        self.ndim = _get_ndim(f)\n        self.scroll_step = scroll_step\n        self.cmap = cmap\n        self.mesh_kwargs = kwargs\n\n        if self.ndim < 2:\n            raise ValueError(\n                f\"InteractivePlot2D requires a function of dimension >= 2, \"\n                f\"got {self.ndim}D\"\n            )\n\n        # For 2D functions there is no slice axis\n        if self.ndim == 2:\n            self.fixed_axis = None\n            self.fixed_value = None\n        else:\n            if fixed_axis < 0 or fixed_axis >= self.ndim:\n                raise ValueError(\n                    f\"fixed_axis={fixed_axis} is out of range for a {self.ndim}D function \"\n                    f\"(must be in [0, {self.ndim - 1}])\"\n                )\n            self.fixed_axis = fixed_axis\n            self.fixed_value = fixed_value\n\n        # Determine free axes and initial ranges from simulation cell\n        defaults = _get_defaults(self.ndim)\n        cell = pymadness.tensor_to_numpy(defaults.get_cell())\n        self.cell = cell  # full simulation cell, for scroll bounds\n\n        if self.ndim == 2:\n            self.free_axes = [0, 1]\n        else:\n            self.free_axes = [i for i in range(self.ndim) if i != self.fixed_axis][:2]\n\n        self.xlim = [lo if lo is not None else float(cell[self.free_axes[0], 0]),\n                     hi if hi is not None else float(cell[self.free_axes[0], 1])]\n        self.ylim = [lo if lo is not None else float(cell[self.free_axes[1], 0]),\n                     hi if hi is not None else float(cell[self.free_axes[1], 1])]\n\n        # Create figure\n        self.fig, self.ax = plt.subplots()\n        self.mesh = None\n        self.colorbar = None\n        self._redraw()\n\n        # Connect events — use button_release_event to detect end of zoom/pan\n        self.fig.canvas.mpl_connect(\"button_release_event\", self._on_button_release)\n        if self.ndim >= 3:\n            self.fig.canvas.mpl_connect(\"scroll_event\", self._on_scroll)\n            self.fig.canvas.mpl_connect(\"key_press_event\", self._on_key)\n\n        # Display the figure widget in Jupyter\n        try:\n            from IPython.display import display\n            display(self.fig.canvas)\n        except ImportError:\n            pass\n\n    def _repr_mimebundle_(self, **kwargs):\n        \"\"\"Let Jupyter display the interactive widget when this object is\n        the last expression in a cell.\"\"\"\n        if hasattr(self.fig.canvas, '_repr_mimebundle_'):\n            return self.fig.canvas._repr_mimebundle_(**kwargs)\n        return None\n\n    # -- internal helpers --\n\n    def _evaluate(self):\n        \"\"\"Evaluate the function on the current view.\"\"\"\n        cell_arr = np.zeros((self.ndim, 2))\n        npt_list = [1] * self.ndim\n\n        if self.ndim == 2:\n            cell_arr[0] = self.xlim\n            cell_arr[1] = self.ylim\n            npt_list = [self.npt, self.npt]\n        else:\n            for i in range(self.ndim):\n                if i == self.fixed_axis:\n                    cell_arr[i] = [self.fixed_value, self.fixed_value]\n                    npt_list[i] = 1\n                elif i == self.free_axes[0]:\n                    cell_arr[i] = self.xlim\n                    npt_list[i] = self.npt\n                elif i == self.free_axes[1]:\n                    cell_arr[i] = self.ylim\n                    npt_list[i] = self.npt\n                else:\n                    mid = (self.cell[i, 0] + self.cell[i, 1]) / 2.0\n                    cell_arr[i] = [mid, mid]\n                    npt_list[i] = 1\n\n        vals = self.f.eval_cube(cell_arr, npt_list)\n        return vals.squeeze()\n\n    def _redraw(self):\n        \"\"\"Full redraw: evaluate the function and update the plot.\"\"\"\n        vals = self._evaluate()\n        x = np.linspace(self.xlim[0], self.xlim[1], self.npt)\n        y = np.linspace(self.ylim[0], self.ylim[1], self.npt)\n\n        if self.mesh is None:\n            # First draw\n            self.mesh = self.ax.pcolormesh(x, y, vals.T, shading=\"auto\",\n                                           cmap=self.cmap, **self.mesh_kwargs)\n            self.colorbar = self.fig.colorbar(self.mesh, ax=self.ax)\n        else:\n            # Update: remove old mesh, plot new one, update colorbar\n            for coll in list(self.ax.collections):\n                coll.remove()\n            self.mesh = self.ax.pcolormesh(x, y, vals.T, shading=\"auto\",\n                                           cmap=self.cmap, **self.mesh_kwargs)\n            self.colorbar.update_normal(self.mesh)\n\n        # Force axis limits to match our view (prevent autoscale drift)\n        self.ax.set_xlim(self.xlim)\n        self.ax.set_ylim(self.ylim)\n        self.ax.set_aspect(\"equal\", adjustable=\"box\")\n\n        labels = \"xyzuvw\"\n        self.ax.set_xlabel(labels[self.free_axes[0]])\n        self.ax.set_ylabel(labels[self.free_axes[1]])\n        self._update_title()\n        self.fig.canvas.draw_idle()\n\n    def _update_title(self):\n        if self.fixed_axis is not None:\n            labels = \"xyzuvw\"\n            self.ax.set_title(\n                f\"{labels[self.fixed_axis]} = {self.fixed_value:.4f}\")\n\n    def _on_button_release(self, event):\n        \"\"\"Re-evaluate after the user finishes a zoom or pan.\"\"\"\n        new_xlim = list(self.ax.get_xlim())\n        new_ylim = list(self.ax.get_ylim())\n        if new_xlim == self.xlim and new_ylim == self.ylim:\n            return\n        self.xlim = new_xlim\n        self.ylim = new_ylim\n        self._redraw()\n\n    def _on_scroll(self, event):\n        \"\"\"Move the slice position on scroll.\"\"\"\n        if self.fixed_axis is None:\n            return\n        axis_range = (self.cell[self.fixed_axis, 1]\n                      - self.cell[self.fixed_axis, 0])\n        delta = self.scroll_step * axis_range\n        if event.button == \"up\":\n            self.fixed_value += delta\n        elif event.button == \"down\":\n            self.fixed_value -= delta\n        # Clamp to simulation cell\n        self.fixed_value = float(np.clip(\n            self.fixed_value,\n            self.cell[self.fixed_axis, 0],\n            self.cell[self.fixed_axis, 1]))\n        self._redraw()\n\n    def _on_key(self, event):\n        \"\"\"Switch slice plane on x / y / z key press.\"\"\"\n        key_map = {\"x\": 0, \"y\": 1, \"z\": 2}\n        if event.key not in key_map:\n            return\n        new_axis = key_map[event.key]\n        if new_axis >= self.ndim or new_axis == self.fixed_axis:\n            return\n        self.fixed_axis = new_axis\n        self.fixed_value = 0.0\n        self.free_axes = [i for i in range(self.ndim) if i != self.fixed_axis][:2]\n        # Reset view to full simulation cell for the new free axes\n        self.xlim = [float(self.cell[self.free_axes[0], 0]),\n                     float(self.cell[self.free_axes[0], 1])]\n        self.ylim = [float(self.cell[self.free_axes[1], 0]),\n                     float(self.cell[self.free_axes[1], 1])]\n        self._redraw()\n\n\ndef iplot_2d(f, npt=200, lo=None, hi=None, cmap=\"RdBu_r\", **kwargs):\n    \"\"\"Interactive 2D color-map of a Function2D.\n\n    Zoom and pan re-evaluate the function at constant resolution (``npt``\n    grid points per axis).\n\n    Args:\n        f: Function2D\n        npt: grid points per axis (constant across zoom levels)\n        lo, hi: initial range for both axes (default: simulation cell)\n        cmap: matplotlib colormap name\n        **kwargs: passed to ``pcolormesh()``\n\n    Returns:\n        InteractivePlot2D instance\n    \"\"\"\n    return InteractivePlot2D(f, npt=npt, lo=lo, hi=hi, cmap=cmap, **kwargs)\n\n\ndef iplot_2d_slice(f, fixed_axis=2, fixed_value=0.0, npt=200,\n                   lo=None, hi=None, scroll_step=0.02, cmap=\"RdBu_r\",\n                   **kwargs):\n    \"\"\"Interactive 2D slice of a 3D (or higher) function.\n\n    Zoom and pan re-evaluate the function at constant resolution.  Additional\n    interactive controls:\n\n    - Press **x**, **y**, or **z** to switch the slice plane.\n    - **Scroll** the mouse wheel to move the slice position along the\n      fixed axis (step size controlled by ``scroll_step``).\n\n    The title displays the current slice axis and position.\n\n    Args:\n        f: Function3D (or higher dimension)\n        fixed_axis: axis to hold constant (0=x, 1=y, 2=z)\n        fixed_value: initial value along the fixed axis\n        npt: grid points per free axis (constant across zoom levels)\n        lo, hi: initial range for the free axes (default: simulation cell)\n        scroll_step: fraction of the axis range per scroll tick (default 0.02)\n        cmap: matplotlib colormap name\n        **kwargs: passed to ``pcolormesh()``\n\n    Returns:\n        InteractivePlot2D instance\n    \"\"\"\n    ndim = _get_ndim(f)\n    if ndim < 3:\n        raise ValueError(\"iplot_2d_slice requires a 3D (or higher) function\")\n    return InteractivePlot2D(f, fixed_axis=fixed_axis,\n                             fixed_value=fixed_value, npt=npt,\n                             lo=lo, hi=hi, scroll_step=scroll_step,\n                             cmap=cmap, **kwargs)\n\n\n# --- Helpers ---\n\ndef _get_ndim(f):\n    \"\"\"Infer NDIM from a Function object's type name.\"\"\"\n    if isinstance(f, (list, tuple)):\n        raise TypeError(\n            f\"Expected a single MADNESS Function, got {type(f).__name__}. \"\n            f\"Did you mean to pass a list to plot_surface()?\")\n    name = type(f).__name__  # e.g. \"Function3D\"\n    for n in range(1, 7):\n        if f\"{n}D\" in name:\n            return n\n    raise TypeError(f\"Cannot determine NDIM from {type(f)}\")\n\n\ndef _get_defaults(ndim):\n    \"\"\"Return the FunctionDefaults class for the given NDIM.\"\"\"\n    import pymadness\n    return {\n        1: pymadness.FunctionDefaults1D,\n        2: pymadness.FunctionDefaults2D,\n        3: pymadness.FunctionDefaults3D,\n        4: pymadness.FunctionDefaults4D,\n        5: pymadness.FunctionDefaults5D,\n        6: pymadness.FunctionDefaults6D,\n    }[ndim]\n\n\ndef _eval_2d_data(f, npt=200, lo=None, hi=None,\n                   xlo=None, xhi=None, ylo=None, yhi=None):\n    \"\"\"Evaluate a 2D function on a grid.\n\n    Per-axis bounds (xlo/xhi, ylo/yhi) override lo/hi.\n\n    Returns:\n        (x, y, vals, labels) where vals has shape (npt, npt).\n    \"\"\"\n    import pymadness\n    cell = pymadness.tensor_to_numpy(pymadness.FunctionDefaults2D.get_cell())\n    cell_arr = np.zeros((2, 2))\n    cell_arr[0, 0] = xlo if xlo is not None else (lo if lo is not None else cell[0, 0])\n    cell_arr[0, 1] = xhi if xhi is not None else (hi if hi is not None else cell[0, 1])\n    cell_arr[1, 0] = ylo if ylo is not None else (lo if lo is not None else cell[1, 0])\n    cell_arr[1, 1] = yhi if yhi is not None else (hi if hi is not None else cell[1, 1])\n    vals = f.eval_cube(cell_arr, [npt, npt])\n    x = np.linspace(cell_arr[0, 0], cell_arr[0, 1], npt)\n    y = np.linspace(cell_arr[1, 0], cell_arr[1, 1], npt)\n    return x, y, vals, [\"x\", \"y\"]\n\n\ndef _eval_2d_slice_data(f, fixed_axis=2, fixed_value=0.0, npt=200,\n                         lo=None, hi=None,\n                         xlo=None, xhi=None, ylo=None, yhi=None):\n    \"\"\"Evaluate a 2D slice of a 3D+ function on a grid.\n\n    Per-axis bounds (xlo/xhi, ylo/yhi) override lo/hi for the two free axes.\n\n    Returns:\n        (x, y, vals, labels) where vals has shape (npt, npt).\n    \"\"\"\n    import pymadness\n    ndim = _get_ndim(f)\n    defaults = _get_defaults(ndim)\n    cell = pymadness.tensor_to_numpy(defaults.get_cell())\n\n    cell_arr = np.zeros((ndim, 2))\n    npt_list = [1] * ndim\n    free_axes = []\n    for i in range(ndim):\n        if i == fixed_axis:\n            cell_arr[i] = [fixed_value, fixed_value]\n            npt_list[i] = 1\n        elif len(free_axes) < 2:\n            cell_arr[i, 0] = lo if lo is not None else cell[i, 0]\n            cell_arr[i, 1] = hi if hi is not None else cell[i, 1]\n            npt_list[i] = npt\n            free_axes.append(i)\n        else:\n            # Pin extra axes to their cell midpoint so the result is always 2D\n            mid = (cell[i, 0] + cell[i, 1]) / 2.0\n            cell_arr[i] = [mid, mid]\n            npt_list[i] = 1\n\n    # Apply per-axis overrides to the two free axes\n    if xlo is not None:\n        cell_arr[free_axes[0], 0] = xlo\n    if xhi is not None:\n        cell_arr[free_axes[0], 1] = xhi\n    if ylo is not None:\n        cell_arr[free_axes[1], 0] = ylo\n    if yhi is not None:\n        cell_arr[free_axes[1], 1] = yhi\n\n    vals = f.eval_cube(cell_arr, npt_list)\n    vals = vals.squeeze()\n\n    axis_labels = \"xyzuvw\"\n    x = np.linspace(cell_arr[free_axes[0], 0], cell_arr[free_axes[0], 1], npt)\n    y = np.linspace(cell_arr[free_axes[1], 0], cell_arr[free_axes[1], 1], npt)\n    labels = [axis_labels[free_axes[0]] if free_axes[0] < 6 else f\"dim {free_axes[0]}\",\n              axis_labels[free_axes[1]] if free_axes[1] < 6 else f\"dim {free_axes[1]}\"]\n    return x, y, vals, labels\n"
  },
  {
    "path": "src/pymadness/tests/conftest.py",
    "content": "\"\"\"pytest configuration for pymadness tests.\"\"\"\n"
  },
  {
    "path": "src/pymadness/tests/test_function.py",
    "content": "\"\"\"Tests for pymadness Function bindings.\"\"\"\n\nimport gc\n\nimport numpy as np\nimport pytest\n\nimport pymadness\n\n\n@pytest.fixture(scope=\"session\")\ndef world():\n    \"\"\"Initialize MADNESS once for the entire test session.\"\"\"\n    w = pymadness.World.get(quiet=True)\n    pymadness.FunctionDefaults3D.set_k(6)\n    pymadness.FunctionDefaults3D.set_thresh(1e-5)\n    pymadness.FunctionDefaults3D.set_cubic_cell(-10.0, 10.0)\n    pymadness.FunctionDefaults1D.set_k(6)\n    pymadness.FunctionDefaults1D.set_thresh(1e-5)\n    pymadness.FunctionDefaults1D.set_cubic_cell(-10.0, 10.0)\n    yield w\n    gc.collect()  # Destroy MADNESS-backed objects before finalizing\n    pymadness.World.close()\n\n\nclass TestFunction3D:\n    \"\"\"Tests for 3D real function.\"\"\"\n\n    def test_create_from_callable(self, world):\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        assert f.is_initialized()\n        assert f.k() == 6\n\n    def test_norm(self, world):\n        \"\"\"norm of exp(-r^2) should be (pi/2)^(3/4).\"\"\"\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        expected = (np.pi / 2.0) ** 0.75  # sqrt(integral exp(-2r^2))\n        assert abs(f.norm2() - expected) < 1e-3\n\n    def test_trace(self, world):\n        \"\"\"Integral of exp(-r^2) = pi^(3/2).\"\"\"\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        expected = np.pi ** 1.5\n        assert abs(f.trace() - expected) < 1e-2\n\n    def test_addition(self, world):\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        g = f + f\n        # norm of 2f should be 2 * norm(f)\n        assert abs(g.norm2() - 2.0 * f.norm2()) < 1e-2\n\n    def test_subtraction(self, world):\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        g = f - f\n        assert g.norm2() < 1e-4\n\n    def test_scalar_multiply(self, world):\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        g = 3.0 * f\n        assert abs(g.norm2() - 3.0 * f.norm2()) < 1e-3\n\n    def test_pointwise_multiply(self, world):\n        \"\"\"f*f should equal f^2.\"\"\"\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        f2 = f * f\n        # integral of exp(-2*r^2) = (pi/2)^(3/2)\n        expected = (np.pi / 2.0) ** 1.5\n        assert abs(f2.trace() - expected) < 1e-2\n\n    def test_inner_product(self, world):\n        \"\"\"<f|f> = ||f||^2.\"\"\"\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        ip = pymadness.inner(f, f)\n        assert abs(ip - f.norm2()**2) < 1e-3\n\n    def test_point_evaluation(self, world):\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        val = f(np.array([0.0, 0.0, 0.0]))\n        assert abs(val - 1.0) < 1e-2\n\n    def test_copy(self, world):\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        g = f.copy()\n        assert abs(f.norm2() - g.norm2()) < 1e-10\n\n    def test_compress_reconstruct(self, world):\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        f.compress()\n        assert f.is_compressed()\n        f.reconstruct()\n        assert f.is_reconstructed()\n\n    def test_truncate(self, world):\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        norm_before = f.norm2()\n        f.truncate()\n        assert abs(f.norm2() - norm_before) < 1e-4\n\n    def test_repr(self, world):\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        s = repr(f)\n        assert \"k=6\" in s\n        assert \"nodes=\" in s\n\n\nclass TestFunction1D:\n    \"\"\"Tests for 1D real function.\"\"\"\n\n    def test_create_and_norm(self, world):\n        f = pymadness.function_1d(world, lambda r: np.exp(-r[0]**2))\n        # ||exp(-x^2)|| = sqrt(integral exp(-2x^2) dx) = (pi/2)^(1/4)\n        expected = (np.pi / 2.0) ** 0.25\n        assert abs(f.norm2() - expected) < 1e-3\n\n    def test_derivative(self, world):\n        \"\"\"d/dx exp(-x^2) = -2x exp(-x^2).\"\"\"\n        f = pymadness.function_1d(world, lambda r: np.exp(-r[0]**2))\n        D = pymadness.Derivative1D(world, 0)\n        df = D(f)\n        exact = pymadness.function_1d(world, lambda r: -2.0 * r[0] * np.exp(-r[0]**2))\n        error = (df - exact).norm2()\n        assert error < 1e-3\n\n\nclass TestVectorized:\n    \"\"\"Tests for vectorized (batch) callable evaluation.\"\"\"\n\n    def test_vectorized_3d(self, world):\n        \"\"\"Vectorized callable should give same result as scalar.\"\"\"\n        def gaussian_vectorized(r):\n            # r has shape (npts, 3) — use numpy broadcasting\n            return np.exp(-np.sum(r**2, axis=1))\n\n        f_vec = pymadness.function_3d(world, gaussian_vectorized)\n        expected_norm = (np.pi / 2.0) ** 0.75\n        assert abs(f_vec.norm2() - expected_norm) < 1e-3\n\n    def test_vectorized_matches_scalar_3d(self, world):\n        \"\"\"Vectorized and scalar callables should produce the same function.\"\"\"\n        def scalar_fn(r):\n            return np.exp(-np.dot(r, r))\n\n        def vectorized_fn(r):\n            return np.exp(-np.sum(r**2, axis=1))\n\n        f_scalar = pymadness.function_3d(world, scalar_fn)\n        f_vec = pymadness.function_3d(world, vectorized_fn)\n        diff = (f_scalar - f_vec).norm2()\n        assert diff < 1e-4\n\n    def test_vectorized_1d(self, world):\n        \"\"\"Vectorized callable should work for 1D too.\"\"\"\n        def gaussian_1d_vec(r):\n            return np.exp(-r[:, 0]**2)\n\n        f = pymadness.function_1d(world, gaussian_1d_vec)\n        expected = (np.pi / 2.0) ** 0.25\n        assert abs(f.norm2() - expected) < 1e-3\n\n    def test_scalar_still_works(self, world):\n        \"\"\"Old-style scalar callables must still work through vectorized path.\"\"\"\n        # This callable uses np.dot which only works for 1D input\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        expected = (np.pi / 2.0) ** 0.75\n        assert abs(f.norm2() - expected) < 1e-3\n\n\nclass TestCfunc:\n    \"\"\"Tests for numba @cfunc path (optional).\"\"\"\n\n    @pytest.fixture(autouse=True)\n    def _skip_without_numba(self):\n        pytest.importorskip(\"numba\")\n\n    def test_cfunc_3d(self, world):\n        \"\"\"numba @cfunc should give same result as Python callable.\"\"\"\n        import numba\n        import ctypes\n\n        @numba.cfunc(\"float64(CPointer(float64))\")\n        def gaussian_c(r_ptr):\n            r = numba.carray(r_ptr, (3,))\n            return np.exp(-(r[0]*r[0] + r[1]*r[1] + r[2]*r[2]))\n\n        f = pymadness.function_3d_cfunc(world, gaussian_c)\n        expected = (np.pi / 2.0) ** 0.75\n        assert abs(f.norm2() - expected) < 1e-3\n\n    def test_cfunc_1d(self, world):\n        \"\"\"numba @cfunc should work for 1D.\"\"\"\n        import numba\n\n        @numba.cfunc(\"float64(CPointer(float64))\")\n        def gaussian_1d_c(r_ptr):\n            r = numba.carray(r_ptr, (1,))\n            return np.exp(-r[0]*r[0])\n\n        f = pymadness.function_1d_cfunc(world, gaussian_1d_c)\n        expected = (np.pi / 2.0) ** 0.25\n        assert abs(f.norm2() - expected) < 1e-3\n\n\nclass TestEvalCube:\n    \"\"\"Tests for eval_cube grid evaluation.\"\"\"\n\n    def test_eval_cube_1d(self, world):\n        \"\"\"eval_cube on a 1D Gaussian should match analytical values.\"\"\"\n        f = pymadness.function_1d(world, lambda r: np.exp(-r[:, 0]**2))\n        cell = np.array([[-5.0, 5.0]])\n        npt = 50\n        vals = f.eval_cube(cell, [npt])\n        assert vals.shape == (npt,)\n        x = np.linspace(-5.0, 5.0, npt)\n        expected = np.exp(-x**2)\n        assert np.max(np.abs(vals - expected)) < 1e-3\n\n    def test_eval_cube_3d(self, world):\n        \"\"\"eval_cube on a 3D Gaussian at the origin should be ~1.\"\"\"\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        # Small cube centered at origin\n        cell = np.array([[-0.1, 0.1], [-0.1, 0.1], [-0.1, 0.1]])\n        vals = f.eval_cube(cell, [3, 3, 3])\n        assert vals.shape == (3, 3, 3)\n        # Center value should be close to 1.0\n        assert abs(vals[1, 1, 1] - 1.0) < 1e-2\n\n    def test_eval_cube_2d(self, world):\n        \"\"\"eval_cube on a 2D function.\"\"\"\n        pymadness.FunctionDefaults2D.set_k(6)\n        pymadness.FunctionDefaults2D.set_thresh(1e-5)\n        pymadness.FunctionDefaults2D.set_cubic_cell(-10.0, 10.0)\n        f = pymadness.function_2d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        cell = np.array([[-1.0, 1.0], [-1.0, 1.0]])\n        vals = f.eval_cube(cell, [5, 5])\n        assert vals.shape == (5, 5)\n        # Center should be close to 1.0\n        assert abs(vals[2, 2] - 1.0) < 1e-2\n\n\nclass TestFunctionFactory:\n    \"\"\"Tests for FunctionFactory Python bindings.\"\"\"\n\n    def test_factory_basic(self, world):\n        \"\"\"Build a function through FunctionFactory with chained methods.\"\"\"\n        factory = pymadness.FunctionFactory3D(world)\n        factory.functor(lambda r: np.exp(-np.sum(r**2, axis=1)))\n        factory.k(6)\n        factory.thresh(1e-5)\n        f = factory.create()\n        assert f.is_initialized()\n        expected = (np.pi / 2.0) ** 0.75\n        assert abs(f.norm2() - expected) < 1e-3\n\n    def test_factory_chaining(self, world):\n        \"\"\"FunctionFactory methods should be chainable.\"\"\"\n        f = (pymadness.FunctionFactory3D(world)\n             .functor(lambda r: np.exp(-np.sum(r**2, axis=1)))\n             .k(6)\n             .thresh(1e-5)\n             .create())\n        assert f.is_initialized()\n\n    def test_factory_1d(self, world):\n        \"\"\"FunctionFactory1D should work.\"\"\"\n        f = (pymadness.FunctionFactory1D(world)\n             .functor(lambda r: np.exp(-r[:, 0]**2))\n             .create())\n        expected = (np.pi / 2.0) ** 0.25\n        assert abs(f.norm2() - expected) < 1e-3\n\n    def test_factory_norefine(self, world):\n        \"\"\"norefine() should produce a shallower tree.\"\"\"\n        f_refined = (pymadness.FunctionFactory3D(world)\n                     .functor(lambda r: np.exp(-np.sum(r**2, axis=1)))\n                     .create())\n        f_shallow = (pymadness.FunctionFactory3D(world)\n                     .functor(lambda r: np.exp(-np.sum(r**2, axis=1)))\n                     .norefine()\n                     .create())\n        assert f_shallow.max_depth() <= f_refined.max_depth()\n\n\nclass TestHigherDimensions:\n    \"\"\"Tests for 4D, 5D, 6D functions.\"\"\"\n\n    def test_function_4d(self, world):\n        \"\"\"4D Gaussian should have correct norm.\"\"\"\n        pymadness.FunctionDefaults4D.set_k(5)\n        pymadness.FunctionDefaults4D.set_thresh(1e-3)\n        pymadness.FunctionDefaults4D.set_cubic_cell(-5.0, 5.0)\n\n        f = pymadness.function_4d(world,\n            lambda r: np.exp(-np.sum(r**2, axis=1)))\n        # ||exp(-r^2)||_4D = (pi/2)^(4/4) = pi/2\n        expected = (np.pi / 2.0) ** 1.0\n        assert abs(f.norm2() - expected) < 0.1  # loose tol for low k\n\n    def test_defaults_4d(self, world):\n        \"\"\"FunctionDefaults4D should be accessible.\"\"\"\n        pymadness.FunctionDefaults4D.set_k(5)\n        assert pymadness.FunctionDefaults4D.get_k() == 5\n\n\nclass TestOperators:\n    \"\"\"Tests for operator application.\"\"\"\n\n    def test_gradient(self, world):\n        \"\"\"Gradient of a Gaussian should have zero x-component integral.\"\"\"\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.dot(r, r)))\n        grad = pymadness.gradient(world, f)\n        assert len(grad) == 3\n        # Each component of gradient of a symmetric Gaussian integrates to zero\n        for i in range(3):\n            assert abs(grad[i].trace()) < 1e-4\n\n\nclass TestUnaryOp:\n    \"\"\"Tests for pointwise unary operations.\"\"\"\n\n    def test_exp(self, world):\n        \"\"\"exp of a constant function should give exp(c).\"\"\"\n        # f(x) = 1.0 everywhere → exp(f) = e everywhere\n        one = pymadness.function_3d(world, lambda r: np.ones(r.shape[0]))\n        g = pymadness.exp(one)\n        val = g(np.array([0.0, 0.0, 0.0]))\n        assert abs(val - np.e) < 1e-2\n\n    def test_log(self, world):\n        \"\"\"log(exp(f)) should give back f.\"\"\"\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        g = pymadness.log(pymadness.exp(f))\n        diff = (g - f).norm2()\n        assert diff < 1e-3\n\n    def test_sqrt(self, world):\n        \"\"\"sqrt(f*f) should give |f|.\"\"\"\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        g = pymadness.sqrt(f * f)\n        diff = (g - f).norm2()\n        assert diff < 1e-3\n\n    def test_unaryop_inplace(self, world):\n        \"\"\"In-place unaryop should modify the function.\"\"\"\n        f = pymadness.function_3d(world, lambda r: np.ones(r.shape[0]))\n        f.unaryop(\"exp\")\n        val = f(np.array([0.0, 0.0, 0.0]))\n        assert abs(val - np.e) < 1e-2\n\n\nclass TestPlottingDataPipeline:\n    \"\"\"Tests for plotting evaluation helpers (no display needed).\"\"\"\n\n    def test_eval_2d_slice_data_shape(self, world):\n        \"\"\"_eval_2d_slice_data should return correct shapes.\"\"\"\n        from pymadness.plotting import _eval_2d_slice_data\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        x, y, vals, labels = _eval_2d_slice_data(f, fixed_axis=2,\n                                                   fixed_value=0.0, npt=30)\n        assert vals.shape == (30, 30)\n        assert len(x) == 30\n        assert len(y) == 30\n        assert labels == [\"x\", \"y\"]\n\n    def test_eval_2d_slice_data_values(self, world):\n        \"\"\"Slice of a Gaussian at z=0 should peak at origin.\"\"\"\n        from pymadness.plotting import _eval_2d_slice_data\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        x, y, vals, labels = _eval_2d_slice_data(f, fixed_axis=2,\n                                                   fixed_value=0.0, npt=21)\n        # Center of grid should be close to exp(0) = 1\n        assert abs(vals[10, 10] - 1.0) < 1e-2\n\n    def test_eval_2d_slice_data_custom_range(self, world):\n        \"\"\"Per-axis ranges should be respected.\"\"\"\n        from pymadness.plotting import _eval_2d_slice_data\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        x, y, vals, labels = _eval_2d_slice_data(\n            f, fixed_axis=2, fixed_value=0.0, npt=10,\n            xlo=-1.0, xhi=1.0, ylo=-2.0, yhi=2.0)\n        assert abs(x[0] - (-1.0)) < 1e-10\n        assert abs(x[-1] - 1.0) < 1e-10\n        assert abs(y[0] - (-2.0)) < 1e-10\n        assert abs(y[-1] - 2.0) < 1e-10\n\n    def test_eval_2d_data_shape(self, world):\n        \"\"\"_eval_2d_data should return correct shapes for Function2D.\"\"\"\n        from pymadness.plotting import _eval_2d_data\n        pymadness.FunctionDefaults2D.set_k(6)\n        pymadness.FunctionDefaults2D.set_thresh(1e-5)\n        pymadness.FunctionDefaults2D.set_cubic_cell(-10.0, 10.0)\n        f = pymadness.function_2d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        x, y, vals, labels = _eval_2d_data(f, npt=20)\n        assert vals.shape == (20, 20)\n        assert labels == [\"x\", \"y\"]\n\n    def test_eval_grid_1d(self, world):\n        \"\"\"eval_grid_1d should return matching x and values arrays.\"\"\"\n        from pymadness.plotting import eval_grid_1d\n        f = pymadness.function_1d(world, lambda r: np.exp(-r[:, 0]**2))\n        x, vals = eval_grid_1d(f, lo=-5.0, hi=5.0, npt=50)\n        assert len(x) == 50\n        assert len(vals) == 50\n        # Value at center should be ~1\n        assert abs(vals[25] - 1.0) < 0.1\n\n    def test_plot_surface_returns_figure(self, world):\n        \"\"\"plot_surface with show=False should return a plotly Figure.\"\"\"\n        plotly = pytest.importorskip(\"plotly\")\n        from pymadness.plotting import plot_surface\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        fig = plot_surface(f, npt=10, show=False)\n        assert fig is not None\n        assert len(fig.data) == 1\n\n    def test_plot_surface_multi(self, world):\n        \"\"\"plot_surface with multiple functions should create multiple traces.\"\"\"\n        plotly = pytest.importorskip(\"plotly\")\n        from pymadness.plotting import plot_surface\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        fig = plot_surface([f, f * f], npt=10, show=False)\n        assert len(fig.data) == 2\n\n    def test_plot_line_cut_no_display(self, world):\n        \"\"\"plot_line_cut should produce a matplotlib figure.\"\"\"\n        import matplotlib\n        matplotlib.use(\"Agg\")\n        from pymadness.plotting import plot_line_cut\n        f = pymadness.function_3d(world, lambda r: np.exp(-np.sum(r**2, axis=1)))\n        fig, ax = plot_line_cut(f, axis=0, npt=30)\n        assert len(ax.lines) == 1\n"
  }
]